diff --git a/accessapproval/apiv1/access_approval_client.go b/accessapproval/apiv1/access_approval_client.go index 66968c1edcdd..6506a68ccfa9 100755 --- a/accessapproval/apiv1/access_approval_client.go +++ b/accessapproval/apiv1/access_approval_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accessapprovalpb "cloud.google.com/go/accessapproval/apiv1/accessapprovalpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -353,6 +352,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new access approval client based on gRPC. @@ -412,6 +413,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: accessapprovalpb.NewAccessApprovalClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -458,6 +460,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new access approval rest client. @@ -508,6 +512,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -571,7 +576,7 @@ func (c *gRPCClient) ListApprovalRequests(ctx context.Context, req *accessapprov } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListApprovalRequests(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListApprovalRequests, req, settings.GRPC, c.logger, "ListApprovalRequests") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *gRPCClient) GetApprovalRequest(ctx context.Context, req *accessapproval var resp *accessapprovalpb.ApprovalRequest err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetApprovalRequest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetApprovalRequest, req, settings.GRPC, c.logger, "GetApprovalRequest") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *gRPCClient) ApproveApprovalRequest(ctx context.Context, req *accessappr var resp *accessapprovalpb.ApprovalRequest err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApproveApprovalRequest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApproveApprovalRequest, req, settings.GRPC, c.logger, "ApproveApprovalRequest") return err }, opts...) if err != nil { @@ -642,7 +647,7 @@ func (c *gRPCClient) DismissApprovalRequest(ctx context.Context, req *accessappr var resp *accessapprovalpb.ApprovalRequest err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DismissApprovalRequest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DismissApprovalRequest, req, settings.GRPC, c.logger, "DismissApprovalRequest") return err }, opts...) if err != nil { @@ -660,7 +665,7 @@ func (c *gRPCClient) InvalidateApprovalRequest(ctx context.Context, req *accessa var resp *accessapprovalpb.ApprovalRequest err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InvalidateApprovalRequest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InvalidateApprovalRequest, req, settings.GRPC, c.logger, "InvalidateApprovalRequest") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *gRPCClient) GetAccessApprovalSettings(ctx context.Context, req *accessa var resp *accessapprovalpb.AccessApprovalSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAccessApprovalSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAccessApprovalSettings, req, settings.GRPC, c.logger, "GetAccessApprovalSettings") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *gRPCClient) UpdateAccessApprovalSettings(ctx context.Context, req *acce var resp *accessapprovalpb.AccessApprovalSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAccessApprovalSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAccessApprovalSettings, req, settings.GRPC, c.logger, "UpdateAccessApprovalSettings") return err }, opts...) if err != nil { @@ -713,7 +718,7 @@ func (c *gRPCClient) DeleteAccessApprovalSettings(ctx context.Context, req *acce opts = append((*c.CallOptions).DeleteAccessApprovalSettings[0:len((*c.CallOptions).DeleteAccessApprovalSettings):len((*c.CallOptions).DeleteAccessApprovalSettings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAccessApprovalSettings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAccessApprovalSettings, req, settings.GRPC, c.logger, "DeleteAccessApprovalSettings") return err }, opts...) return err @@ -728,7 +733,7 @@ func (c *gRPCClient) GetAccessApprovalServiceAccount(ctx context.Context, req *a var resp *accessapprovalpb.AccessApprovalServiceAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAccessApprovalServiceAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAccessApprovalServiceAccount, req, settings.GRPC, c.logger, "GetAccessApprovalServiceAccount") return err }, opts...) if err != nil { @@ -787,21 +792,10 @@ func (c *restClient) ListApprovalRequests(ctx context.Context, req *accessapprov } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApprovalRequests") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -864,17 +858,7 @@ func (c *restClient) GetApprovalRequest(ctx context.Context, req *accessapproval httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApprovalRequest") if err != nil { return err } @@ -933,17 +917,7 @@ func (c *restClient) ApproveApprovalRequest(ctx context.Context, req *accessappr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveApprovalRequest") if err != nil { return err } @@ -1008,17 +982,7 @@ func (c *restClient) DismissApprovalRequest(ctx context.Context, req *accessappr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DismissApprovalRequest") if err != nil { return err } @@ -1081,17 +1045,7 @@ func (c *restClient) InvalidateApprovalRequest(ctx context.Context, req *accessa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InvalidateApprovalRequest") if err != nil { return err } @@ -1141,17 +1095,7 @@ func (c *restClient) GetAccessApprovalSettings(ctx context.Context, req *accessa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccessApprovalSettings") if err != nil { return err } @@ -1216,17 +1160,7 @@ func (c *restClient) UpdateAccessApprovalSettings(ctx context.Context, req *acce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccessApprovalSettings") if err != nil { return err } @@ -1278,15 +1212,8 @@ func (c *restClient) DeleteAccessApprovalSettings(ctx context.Context, req *acce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccessApprovalSettings") + return err }, opts...) } @@ -1324,17 +1251,7 @@ func (c *restClient) GetAccessApprovalServiceAccount(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccessApprovalServiceAccount") if err != nil { return err } diff --git a/accessapproval/apiv1/access_approval_client_example_go123_test.go b/accessapproval/apiv1/access_approval_client_example_go123_test.go index edb2b8aae820..961dfc07f7af 100644 --- a/accessapproval/apiv1/access_approval_client_example_go123_test.go +++ b/accessapproval/apiv1/access_approval_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListApprovalRequests_all() { } for resp, err := range c.ListApprovalRequests(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/accessapproval/apiv1/accessapprovalpb/accessapproval.pb.go b/accessapproval/apiv1/accessapprovalpb/accessapproval.pb.go index 2a45bba14015..256fb345426c 100755 --- a/accessapproval/apiv1/accessapprovalpb/accessapproval.pb.go +++ b/accessapproval/apiv1/accessapprovalpb/accessapproval.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/accessapproval/v1/accessapproval.proto @@ -212,11 +212,9 @@ type AccessLocations struct { func (x *AccessLocations) Reset() { *x = AccessLocations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessLocations) String() string { @@ -227,7 +225,7 @@ func (*AccessLocations) ProtoMessage() {} func (x *AccessLocations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +267,9 @@ type AccessReason struct { func (x *AccessReason) Reset() { *x = AccessReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessReason) String() string { @@ -284,7 +280,7 @@ func (*AccessReason) ProtoMessage() {} func (x *AccessReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +328,9 @@ type SignatureInfo struct { func (x *SignatureInfo) Reset() { *x = SignatureInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignatureInfo) String() string { @@ -347,7 +341,7 @@ func (*SignatureInfo) ProtoMessage() {} func (x *SignatureInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +424,9 @@ type ApproveDecision struct { func (x *ApproveDecision) Reset() { *x = ApproveDecision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveDecision) String() string { @@ -445,7 +437,7 @@ func (*ApproveDecision) ProtoMessage() {} func (x *ApproveDecision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,11 +503,9 @@ type DismissDecision struct { func (x *DismissDecision) Reset() { *x = DismissDecision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DismissDecision) String() string { @@ -526,7 +516,7 @@ func (*DismissDecision) ProtoMessage() {} func (x *DismissDecision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +558,9 @@ type ResourceProperties struct { func (x *ResourceProperties) Reset() { *x = ResourceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceProperties) String() string { @@ -583,7 +571,7 @@ func (*ResourceProperties) ProtoMessage() {} func (x *ResourceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +632,9 @@ type ApprovalRequest struct { func (x *ApprovalRequest) Reset() { *x = ApprovalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApprovalRequest) String() string { @@ -659,7 +645,7 @@ func (*ApprovalRequest) ProtoMessage() {} func (x *ApprovalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +823,9 @@ type EnrolledService struct { func (x *EnrolledService) Reset() { *x = EnrolledService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnrolledService) String() string { @@ -852,7 +836,7 @@ func (*EnrolledService) ProtoMessage() {} func (x *EnrolledService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +922,9 @@ type AccessApprovalSettings struct { func (x *AccessApprovalSettings) Reset() { *x = AccessApprovalSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessApprovalSettings) String() string { @@ -953,7 +935,7 @@ func (*AccessApprovalSettings) ProtoMessage() {} func (x *AccessApprovalSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1017,9 @@ type AccessApprovalServiceAccount struct { func (x *AccessApprovalServiceAccount) Reset() { *x = AccessApprovalServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessApprovalServiceAccount) String() string { @@ -1050,7 +1030,7 @@ func (*AccessApprovalServiceAccount) ProtoMessage() {} func (x *AccessApprovalServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1089,9 @@ type ListApprovalRequestsMessage struct { func (x *ListApprovalRequestsMessage) Reset() { *x = ListApprovalRequestsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApprovalRequestsMessage) String() string { @@ -1124,7 +1102,7 @@ func (*ListApprovalRequestsMessage) ProtoMessage() {} func (x *ListApprovalRequestsMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1181,11 +1159,9 @@ type ListApprovalRequestsResponse struct { func (x *ListApprovalRequestsResponse) Reset() { *x = ListApprovalRequestsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApprovalRequestsResponse) String() string { @@ -1196,7 +1172,7 @@ func (*ListApprovalRequestsResponse) ProtoMessage() {} func (x *ListApprovalRequestsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1239,11 +1215,9 @@ type GetApprovalRequestMessage struct { func (x *GetApprovalRequestMessage) Reset() { *x = GetApprovalRequestMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApprovalRequestMessage) String() string { @@ -1254,7 +1228,7 @@ func (*GetApprovalRequestMessage) ProtoMessage() {} func (x *GetApprovalRequestMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1264,9 @@ type ApproveApprovalRequestMessage struct { func (x *ApproveApprovalRequestMessage) Reset() { *x = ApproveApprovalRequestMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveApprovalRequestMessage) String() string { @@ -1305,7 +1277,7 @@ func (*ApproveApprovalRequestMessage) ProtoMessage() {} func (x *ApproveApprovalRequestMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1318,9 @@ type DismissApprovalRequestMessage struct { func (x *DismissApprovalRequestMessage) Reset() { *x = DismissApprovalRequestMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DismissApprovalRequestMessage) String() string { @@ -1361,7 +1331,7 @@ func (*DismissApprovalRequestMessage) ProtoMessage() {} func (x *DismissApprovalRequestMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1395,11 +1365,9 @@ type InvalidateApprovalRequestMessage struct { func (x *InvalidateApprovalRequestMessage) Reset() { *x = InvalidateApprovalRequestMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvalidateApprovalRequestMessage) String() string { @@ -1410,7 +1378,7 @@ func (*InvalidateApprovalRequestMessage) ProtoMessage() {} func (x *InvalidateApprovalRequestMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,11 +1413,9 @@ type GetAccessApprovalSettingsMessage struct { func (x *GetAccessApprovalSettingsMessage) Reset() { *x = GetAccessApprovalSettingsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccessApprovalSettingsMessage) String() string { @@ -1460,7 +1426,7 @@ func (*GetAccessApprovalSettingsMessage) ProtoMessage() {} func (x *GetAccessApprovalSettingsMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1471,9 @@ type UpdateAccessApprovalSettingsMessage struct { func (x *UpdateAccessApprovalSettingsMessage) Reset() { *x = UpdateAccessApprovalSettingsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccessApprovalSettingsMessage) String() string { @@ -1520,7 +1484,7 @@ func (*UpdateAccessApprovalSettingsMessage) ProtoMessage() {} func (x *UpdateAccessApprovalSettingsMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,11 +1525,9 @@ type DeleteAccessApprovalSettingsMessage struct { func (x *DeleteAccessApprovalSettingsMessage) Reset() { *x = DeleteAccessApprovalSettingsMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccessApprovalSettingsMessage) String() string { @@ -1576,7 +1538,7 @@ func (*DeleteAccessApprovalSettingsMessage) ProtoMessage() {} func (x *DeleteAccessApprovalSettingsMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1572,9 @@ type GetAccessApprovalServiceAccountMessage struct { func (x *GetAccessApprovalServiceAccountMessage) Reset() { *x = GetAccessApprovalServiceAccountMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccessApprovalServiceAccountMessage) String() string { @@ -1625,7 +1585,7 @@ func (*GetAccessApprovalServiceAccountMessage) ProtoMessage() {} func (x *GetAccessApprovalServiceAccountMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2252,248 +2212,6 @@ func file_google_cloud_accessapproval_v1_accessapproval_proto_init() { if File_google_cloud_accessapproval_v1_accessapproval_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessLocations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AccessReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SignatureInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ApproveDecision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DismissDecision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ResourceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ApprovalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EnrolledService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AccessApprovalSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessApprovalServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListApprovalRequestsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListApprovalRequestsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetApprovalRequestMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ApproveApprovalRequestMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DismissApprovalRequestMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*InvalidateApprovalRequestMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetAccessApprovalSettingsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccessApprovalSettingsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccessApprovalSettingsMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetAccessApprovalServiceAccountMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_accessapproval_v1_accessapproval_proto_msgTypes[2].OneofWrappers = []any{ (*SignatureInfo_GooglePublicKeyPem)(nil), (*SignatureInfo_CustomerKmsKeyVersion)(nil), diff --git a/accessapproval/apiv1/helpers.go b/accessapproval/apiv1/helpers.go index 34284c7af7b9..9113b3b8af3e 100755 --- a/accessapproval/apiv1/helpers.go +++ b/accessapproval/apiv1/helpers.go @@ -18,10 +18,20 @@ package accessapproval import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "accessapproval.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/accesscontextmanager/apiv1/access_context_manager_client.go b/accesscontextmanager/apiv1/access_context_manager_client.go index a63b8edf59ca..51b400ab3378 100755 --- a/accesscontextmanager/apiv1/access_context_manager_client.go +++ b/accesscontextmanager/apiv1/access_context_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -740,6 +739,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new access context manager client based on gRPC. @@ -776,6 +777,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: accesscontextmanagerpb.NewAccessContextManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -839,6 +841,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new access context manager rest client. @@ -866,6 +870,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -936,7 +941,7 @@ func (c *gRPCClient) ListAccessPolicies(ctx context.Context, req *accesscontextm } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAccessPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAccessPolicies, req, settings.GRPC, c.logger, "ListAccessPolicies") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *gRPCClient) GetAccessPolicy(ctx context.Context, req *accesscontextmana var resp *accesscontextmanagerpb.AccessPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAccessPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAccessPolicy, req, settings.GRPC, c.logger, "GetAccessPolicy") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *gRPCClient) CreateAccessPolicy(ctx context.Context, req *accesscontextm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAccessPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAccessPolicy, req, settings.GRPC, c.logger, "CreateAccessPolicy") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *gRPCClient) UpdateAccessPolicy(ctx context.Context, req *accesscontextm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAccessPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAccessPolicy, req, settings.GRPC, c.logger, "UpdateAccessPolicy") return err }, opts...) if err != nil { @@ -1026,7 +1031,7 @@ func (c *gRPCClient) DeleteAccessPolicy(ctx context.Context, req *accesscontextm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAccessPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAccessPolicy, req, settings.GRPC, c.logger, "DeleteAccessPolicy") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *gRPCClient) ListAccessLevels(ctx context.Context, req *accesscontextman } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAccessLevels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAccessLevels, req, settings.GRPC, c.logger, "ListAccessLevels") return err }, opts...) if err != nil { @@ -1092,7 +1097,7 @@ func (c *gRPCClient) GetAccessLevel(ctx context.Context, req *accesscontextmanag var resp *accesscontextmanagerpb.AccessLevel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAccessLevel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAccessLevel, req, settings.GRPC, c.logger, "GetAccessLevel") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *gRPCClient) CreateAccessLevel(ctx context.Context, req *accesscontextma var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAccessLevel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAccessLevel, req, settings.GRPC, c.logger, "CreateAccessLevel") return err }, opts...) if err != nil { @@ -1130,7 +1135,7 @@ func (c *gRPCClient) UpdateAccessLevel(ctx context.Context, req *accesscontextma var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAccessLevel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAccessLevel, req, settings.GRPC, c.logger, "UpdateAccessLevel") return err }, opts...) if err != nil { @@ -1150,7 +1155,7 @@ func (c *gRPCClient) DeleteAccessLevel(ctx context.Context, req *accesscontextma var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAccessLevel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAccessLevel, req, settings.GRPC, c.logger, "DeleteAccessLevel") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *gRPCClient) ReplaceAccessLevels(ctx context.Context, req *accesscontext var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReplaceAccessLevels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReplaceAccessLevels, req, settings.GRPC, c.logger, "ReplaceAccessLevels") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *gRPCClient) ListServicePerimeters(ctx context.Context, req *accessconte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServicePerimeters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServicePerimeters, req, settings.GRPC, c.logger, "ListServicePerimeters") return err }, opts...) if err != nil { @@ -1236,7 +1241,7 @@ func (c *gRPCClient) GetServicePerimeter(ctx context.Context, req *accesscontext var resp *accesscontextmanagerpb.ServicePerimeter err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetServicePerimeter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetServicePerimeter, req, settings.GRPC, c.logger, "GetServicePerimeter") return err }, opts...) if err != nil { @@ -1254,7 +1259,7 @@ func (c *gRPCClient) CreateServicePerimeter(ctx context.Context, req *accesscont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateServicePerimeter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateServicePerimeter, req, settings.GRPC, c.logger, "CreateServicePerimeter") return err }, opts...) if err != nil { @@ -1274,7 +1279,7 @@ func (c *gRPCClient) UpdateServicePerimeter(ctx context.Context, req *accesscont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateServicePerimeter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateServicePerimeter, req, settings.GRPC, c.logger, "UpdateServicePerimeter") return err }, opts...) if err != nil { @@ -1294,7 +1299,7 @@ func (c *gRPCClient) DeleteServicePerimeter(ctx context.Context, req *accesscont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteServicePerimeter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteServicePerimeter, req, settings.GRPC, c.logger, "DeleteServicePerimeter") return err }, opts...) if err != nil { @@ -1314,7 +1319,7 @@ func (c *gRPCClient) ReplaceServicePerimeters(ctx context.Context, req *accessco var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReplaceServicePerimeters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReplaceServicePerimeters, req, settings.GRPC, c.logger, "ReplaceServicePerimeters") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *gRPCClient) CommitServicePerimeters(ctx context.Context, req *accesscon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CommitServicePerimeters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CommitServicePerimeters, req, settings.GRPC, c.logger, "CommitServicePerimeters") return err }, opts...) if err != nil { @@ -1365,7 +1370,7 @@ func (c *gRPCClient) ListGcpUserAccessBindings(ctx context.Context, req *accessc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGcpUserAccessBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGcpUserAccessBindings, req, settings.GRPC, c.logger, "ListGcpUserAccessBindings") return err }, opts...) if err != nil { @@ -1400,7 +1405,7 @@ func (c *gRPCClient) GetGcpUserAccessBinding(ctx context.Context, req *accesscon var resp *accesscontextmanagerpb.GcpUserAccessBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGcpUserAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGcpUserAccessBinding, req, settings.GRPC, c.logger, "GetGcpUserAccessBinding") return err }, opts...) if err != nil { @@ -1418,7 +1423,7 @@ func (c *gRPCClient) CreateGcpUserAccessBinding(ctx context.Context, req *access var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGcpUserAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGcpUserAccessBinding, req, settings.GRPC, c.logger, "CreateGcpUserAccessBinding") return err }, opts...) if err != nil { @@ -1438,7 +1443,7 @@ func (c *gRPCClient) UpdateGcpUserAccessBinding(ctx context.Context, req *access var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGcpUserAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGcpUserAccessBinding, req, settings.GRPC, c.logger, "UpdateGcpUserAccessBinding") return err }, opts...) if err != nil { @@ -1458,7 +1463,7 @@ func (c *gRPCClient) DeleteGcpUserAccessBinding(ctx context.Context, req *access var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGcpUserAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGcpUserAccessBinding, req, settings.GRPC, c.logger, "DeleteGcpUserAccessBinding") return err }, opts...) if err != nil { @@ -1478,7 +1483,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1496,7 +1501,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1514,7 +1519,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1532,7 +1537,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1589,21 +1594,10 @@ func (c *restClient) ListAccessPolicies(ctx context.Context, req *accesscontextm } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccessPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1667,17 +1661,7 @@ func (c *restClient) GetAccessPolicy(ctx context.Context, req *accesscontextmana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccessPolicy") if err != nil { return err } @@ -1733,21 +1717,10 @@ func (c *restClient) CreateAccessPolicy(ctx context.Context, req *accesscontextm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAccessPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1816,21 +1789,10 @@ func (c *restClient) UpdateAccessPolicy(ctx context.Context, req *accesscontextm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccessPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1884,21 +1846,10 @@ func (c *restClient) DeleteAccessPolicy(ctx context.Context, req *accesscontextm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccessPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1966,21 +1917,10 @@ func (c *restClient) ListAccessLevels(ctx context.Context, req *accesscontextman } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccessLevels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2048,17 +1988,7 @@ func (c *restClient) GetAccessLevel(ctx context.Context, req *accesscontextmanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccessLevel") if err != nil { return err } @@ -2120,21 +2050,10 @@ func (c *restClient) CreateAccessLevel(ctx context.Context, req *accesscontextma httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAccessLevel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2205,21 +2124,10 @@ func (c *restClient) UpdateAccessLevel(ctx context.Context, req *accesscontextma httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccessLevel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2274,21 +2182,10 @@ func (c *restClient) DeleteAccessLevel(ctx context.Context, req *accesscontextma httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccessLevel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2360,21 +2257,10 @@ func (c *restClient) ReplaceAccessLevels(ctx context.Context, req *accesscontext httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceAccessLevels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2439,21 +2325,10 @@ func (c *restClient) ListServicePerimeters(ctx context.Context, req *accessconte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServicePerimeters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2518,17 +2393,7 @@ func (c *restClient) GetServicePerimeter(ctx context.Context, req *accesscontext httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServicePerimeter") if err != nil { return err } @@ -2591,21 +2456,10 @@ func (c *restClient) CreateServicePerimeter(ctx context.Context, req *accesscont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServicePerimeter") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2676,21 +2530,10 @@ func (c *restClient) UpdateServicePerimeter(ctx context.Context, req *accesscont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServicePerimeter") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2745,21 +2588,10 @@ func (c *restClient) DeleteServicePerimeter(ctx context.Context, req *accesscont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServicePerimeter") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2827,21 +2659,10 @@ func (c *restClient) ReplaceServicePerimeters(ctx context.Context, req *accessco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceServicePerimeters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2911,21 +2732,10 @@ func (c *restClient) CommitServicePerimeters(ctx context.Context, req *accesscon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CommitServicePerimeters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2990,21 +2800,10 @@ func (c *restClient) ListGcpUserAccessBindings(ctx context.Context, req *accessc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGcpUserAccessBindings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3069,17 +2868,7 @@ func (c *restClient) GetGcpUserAccessBinding(ctx context.Context, req *accesscon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGcpUserAccessBinding") if err != nil { return err } @@ -3144,21 +2933,10 @@ func (c *restClient) CreateGcpUserAccessBinding(ctx context.Context, req *access httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGcpUserAccessBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3226,21 +3004,10 @@ func (c *restClient) UpdateGcpUserAccessBinding(ctx context.Context, req *access httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGcpUserAccessBinding") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3294,21 +3061,10 @@ func (c *restClient) DeleteGcpUserAccessBinding(ctx context.Context, req *access httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGcpUserAccessBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3370,17 +3126,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3437,17 +3183,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -3508,17 +3244,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3568,17 +3294,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/accesscontextmanager/apiv1/access_context_manager_client_example_go123_test.go b/accesscontextmanager/apiv1/access_context_manager_client_example_go123_test.go index 21e2dafc8e1b..7ca20323cac0 100644 --- a/accesscontextmanager/apiv1/access_context_manager_client_example_go123_test.go +++ b/accesscontextmanager/apiv1/access_context_manager_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAccessLevels_all() { } for resp, err := range c.ListAccessLevels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListAccessPolicies_all() { } for resp, err := range c.ListAccessPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListGcpUserAccessBindings_all() { } for resp, err := range c.ListGcpUserAccessBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListServicePerimeters_all() { } for resp, err := range c.ListServicePerimeters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_context_manager.pb.go b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_context_manager.pb.go index dab5b8943666..464a8ebaf7ce 100755 --- a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_context_manager.pb.go +++ b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_context_manager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/identity/accesscontextmanager/v1/access_context_manager.proto @@ -119,11 +119,9 @@ type ListAccessPoliciesRequest struct { func (x *ListAccessPoliciesRequest) Reset() { *x = ListAccessPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessPoliciesRequest) String() string { @@ -134,7 +132,7 @@ func (*ListAccessPoliciesRequest) ProtoMessage() {} func (x *ListAccessPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type ListAccessPoliciesResponse struct { func (x *ListAccessPoliciesResponse) Reset() { *x = ListAccessPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessPoliciesResponse) String() string { @@ -200,7 +196,7 @@ func (*ListAccessPoliciesResponse) ProtoMessage() {} func (x *ListAccessPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +239,9 @@ type GetAccessPolicyRequest struct { func (x *GetAccessPolicyRequest) Reset() { *x = GetAccessPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccessPolicyRequest) String() string { @@ -258,7 +252,7 @@ func (*GetAccessPolicyRequest) ProtoMessage() {} func (x *GetAccessPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +288,9 @@ type UpdateAccessPolicyRequest struct { func (x *UpdateAccessPolicyRequest) Reset() { *x = UpdateAccessPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccessPolicyRequest) String() string { @@ -309,7 +301,7 @@ func (*UpdateAccessPolicyRequest) ProtoMessage() {} func (x *UpdateAccessPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +344,9 @@ type DeleteAccessPolicyRequest struct { func (x *DeleteAccessPolicyRequest) Reset() { *x = DeleteAccessPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccessPolicyRequest) String() string { @@ -367,7 +357,7 @@ func (*DeleteAccessPolicyRequest) ProtoMessage() {} func (x *DeleteAccessPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +407,9 @@ type ListAccessLevelsRequest struct { func (x *ListAccessLevelsRequest) Reset() { *x = ListAccessLevelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessLevelsRequest) String() string { @@ -432,7 +420,7 @@ func (*ListAccessLevelsRequest) ProtoMessage() {} func (x *ListAccessLevelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +479,9 @@ type ListAccessLevelsResponse struct { func (x *ListAccessLevelsResponse) Reset() { *x = ListAccessLevelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessLevelsResponse) String() string { @@ -506,7 +492,7 @@ func (*ListAccessLevelsResponse) ProtoMessage() {} func (x *ListAccessLevelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +546,9 @@ type GetAccessLevelRequest struct { func (x *GetAccessLevelRequest) Reset() { *x = GetAccessLevelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccessLevelRequest) String() string { @@ -575,7 +559,7 @@ func (*GetAccessLevelRequest) ProtoMessage() {} func (x *GetAccessLevelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +609,9 @@ type CreateAccessLevelRequest struct { func (x *CreateAccessLevelRequest) Reset() { *x = CreateAccessLevelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAccessLevelRequest) String() string { @@ -640,7 +622,7 @@ func (*CreateAccessLevelRequest) ProtoMessage() {} func (x *CreateAccessLevelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +669,9 @@ type UpdateAccessLevelRequest struct { func (x *UpdateAccessLevelRequest) Reset() { *x = UpdateAccessLevelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccessLevelRequest) String() string { @@ -702,7 +682,7 @@ func (*UpdateAccessLevelRequest) ProtoMessage() {} func (x *UpdateAccessLevelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +727,9 @@ type DeleteAccessLevelRequest struct { func (x *DeleteAccessLevelRequest) Reset() { *x = DeleteAccessLevelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccessLevelRequest) String() string { @@ -762,7 +740,7 @@ func (*DeleteAccessLevelRequest) ProtoMessage() {} func (x *DeleteAccessLevelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +794,9 @@ type ReplaceAccessLevelsRequest struct { func (x *ReplaceAccessLevelsRequest) Reset() { *x = ReplaceAccessLevelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceAccessLevelsRequest) String() string { @@ -831,7 +807,7 @@ func (*ReplaceAccessLevelsRequest) ProtoMessage() {} func (x *ReplaceAccessLevelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +857,9 @@ type ReplaceAccessLevelsResponse struct { func (x *ReplaceAccessLevelsResponse) Reset() { *x = ReplaceAccessLevelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceAccessLevelsResponse) String() string { @@ -896,7 +870,7 @@ func (*ReplaceAccessLevelsResponse) ProtoMessage() {} func (x *ReplaceAccessLevelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,11 +916,9 @@ type ListServicePerimetersRequest struct { func (x *ListServicePerimetersRequest) Reset() { *x = ListServicePerimetersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicePerimetersRequest) String() string { @@ -957,7 +929,7 @@ func (*ListServicePerimetersRequest) ProtoMessage() {} func (x *ListServicePerimetersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +981,9 @@ type ListServicePerimetersResponse struct { func (x *ListServicePerimetersResponse) Reset() { *x = ListServicePerimetersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicePerimetersResponse) String() string { @@ -1024,7 +994,7 @@ func (*ListServicePerimetersResponse) ProtoMessage() {} func (x *ListServicePerimetersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1069,11 +1039,9 @@ type GetServicePerimeterRequest struct { func (x *GetServicePerimeterRequest) Reset() { *x = GetServicePerimeterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServicePerimeterRequest) String() string { @@ -1084,7 +1052,7 @@ func (*GetServicePerimeterRequest) ProtoMessage() {} func (x *GetServicePerimeterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1095,9 @@ type CreateServicePerimeterRequest struct { func (x *CreateServicePerimeterRequest) Reset() { *x = CreateServicePerimeterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServicePerimeterRequest) String() string { @@ -1142,7 +1108,7 @@ func (*CreateServicePerimeterRequest) ProtoMessage() {} func (x *CreateServicePerimeterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1152,9 @@ type UpdateServicePerimeterRequest struct { func (x *UpdateServicePerimeterRequest) Reset() { *x = UpdateServicePerimeterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServicePerimeterRequest) String() string { @@ -1201,7 +1165,7 @@ func (*UpdateServicePerimeterRequest) ProtoMessage() {} func (x *UpdateServicePerimeterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1246,11 +1210,9 @@ type DeleteServicePerimeterRequest struct { func (x *DeleteServicePerimeterRequest) Reset() { *x = DeleteServicePerimeterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServicePerimeterRequest) String() string { @@ -1261,7 +1223,7 @@ func (*DeleteServicePerimeterRequest) ProtoMessage() {} func (x *DeleteServicePerimeterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1277,9 @@ type ReplaceServicePerimetersRequest struct { func (x *ReplaceServicePerimetersRequest) Reset() { *x = ReplaceServicePerimetersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceServicePerimetersRequest) String() string { @@ -1330,7 +1290,7 @@ func (*ReplaceServicePerimetersRequest) ProtoMessage() {} func (x *ReplaceServicePerimetersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1340,9 @@ type ReplaceServicePerimetersResponse struct { func (x *ReplaceServicePerimetersResponse) Reset() { *x = ReplaceServicePerimetersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceServicePerimetersResponse) String() string { @@ -1395,7 +1353,7 @@ func (*ReplaceServicePerimetersResponse) ProtoMessage() {} func (x *ReplaceServicePerimetersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,11 +1403,9 @@ type CommitServicePerimetersRequest struct { func (x *CommitServicePerimetersRequest) Reset() { *x = CommitServicePerimetersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitServicePerimetersRequest) String() string { @@ -1460,7 +1416,7 @@ func (*CommitServicePerimetersRequest) ProtoMessage() {} func (x *CommitServicePerimetersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1461,9 @@ type CommitServicePerimetersResponse struct { func (x *CommitServicePerimetersResponse) Reset() { *x = CommitServicePerimetersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitServicePerimetersResponse) String() string { @@ -1520,7 +1474,7 @@ func (*CommitServicePerimetersResponse) ProtoMessage() {} func (x *CommitServicePerimetersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,11 +1517,9 @@ type ListGcpUserAccessBindingsRequest struct { func (x *ListGcpUserAccessBindingsRequest) Reset() { *x = ListGcpUserAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGcpUserAccessBindingsRequest) String() string { @@ -1578,7 +1530,7 @@ func (*ListGcpUserAccessBindingsRequest) ProtoMessage() {} func (x *ListGcpUserAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1630,11 +1582,9 @@ type ListGcpUserAccessBindingsResponse struct { func (x *ListGcpUserAccessBindingsResponse) Reset() { *x = ListGcpUserAccessBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGcpUserAccessBindingsResponse) String() string { @@ -1645,7 +1595,7 @@ func (*ListGcpUserAccessBindingsResponse) ProtoMessage() {} func (x *ListGcpUserAccessBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,11 +1637,9 @@ type GetGcpUserAccessBindingRequest struct { func (x *GetGcpUserAccessBindingRequest) Reset() { *x = GetGcpUserAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGcpUserAccessBindingRequest) String() string { @@ -1702,7 +1650,7 @@ func (*GetGcpUserAccessBindingRequest) ProtoMessage() {} func (x *GetGcpUserAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1740,11 +1688,9 @@ type CreateGcpUserAccessBindingRequest struct { func (x *CreateGcpUserAccessBindingRequest) Reset() { *x = CreateGcpUserAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGcpUserAccessBindingRequest) String() string { @@ -1755,7 +1701,7 @@ func (*CreateGcpUserAccessBindingRequest) ProtoMessage() {} func (x *CreateGcpUserAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1805,11 +1751,9 @@ type UpdateGcpUserAccessBindingRequest struct { func (x *UpdateGcpUserAccessBindingRequest) Reset() { *x = UpdateGcpUserAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGcpUserAccessBindingRequest) String() string { @@ -1820,7 +1764,7 @@ func (*UpdateGcpUserAccessBindingRequest) ProtoMessage() {} func (x *UpdateGcpUserAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1862,11 +1806,9 @@ type DeleteGcpUserAccessBindingRequest struct { func (x *DeleteGcpUserAccessBindingRequest) Reset() { *x = DeleteGcpUserAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGcpUserAccessBindingRequest) String() string { @@ -1877,7 +1819,7 @@ func (*DeleteGcpUserAccessBindingRequest) ProtoMessage() {} func (x *DeleteGcpUserAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1910,11 +1852,9 @@ type GcpUserAccessBindingOperationMetadata struct { func (x *GcpUserAccessBindingOperationMetadata) Reset() { *x = GcpUserAccessBindingOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpUserAccessBindingOperationMetadata) String() string { @@ -1925,7 +1865,7 @@ func (*GcpUserAccessBindingOperationMetadata) ProtoMessage() {} func (x *GcpUserAccessBindingOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1949,11 +1889,9 @@ type AccessContextManagerOperationMetadata struct { func (x *AccessContextManagerOperationMetadata) Reset() { *x = AccessContextManagerOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessContextManagerOperationMetadata) String() string { @@ -1964,7 +1902,7 @@ func (*AccessContextManagerOperationMetadata) ProtoMessage() {} func (x *AccessContextManagerOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2923,380 +2861,6 @@ func file_google_identity_accesscontextmanager_v1_access_context_manager_proto_i file_google_identity_accesscontextmanager_v1_access_policy_proto_init() file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_init() file_google_identity_accesscontextmanager_v1_service_perimeter_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAccessPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccessPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccessPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessLevelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessLevelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetAccessLevelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateAccessLevelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccessLevelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccessLevelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceAccessLevelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceAccessLevelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListServicePerimetersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListServicePerimetersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetServicePerimeterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateServicePerimeterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServicePerimeterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServicePerimeterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceServicePerimetersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceServicePerimetersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CommitServicePerimetersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CommitServicePerimetersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListGcpUserAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListGcpUserAccessBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetGcpUserAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateGcpUserAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGcpUserAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGcpUserAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GcpUserAccessBindingOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_context_manager_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AccessContextManagerOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_level.pb.go b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_level.pb.go index 1f87ba9a23eb..528d2054ee97 100755 --- a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_level.pb.go +++ b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_level.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/identity/accesscontextmanager/v1/access_level.proto @@ -121,11 +121,9 @@ type AccessLevel struct { func (x *AccessLevel) Reset() { *x = AccessLevel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessLevel) String() string { @@ -136,7 +134,7 @@ func (*AccessLevel) ProtoMessage() {} func (x *AccessLevel) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +241,9 @@ type BasicLevel struct { func (x *BasicLevel) Reset() { *x = BasicLevel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicLevel) String() string { @@ -258,7 +254,7 @@ func (*BasicLevel) ProtoMessage() {} func (x *BasicLevel) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +329,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -348,7 +342,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +413,9 @@ type CustomLevel struct { func (x *CustomLevel) Reset() { *x = CustomLevel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomLevel) String() string { @@ -434,7 +426,7 @@ func (*CustomLevel) ProtoMessage() {} func (x *CustomLevel) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +480,9 @@ type DevicePolicy struct { func (x *DevicePolicy) Reset() { *x = DevicePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DevicePolicy) String() string { @@ -503,7 +493,7 @@ func (*DevicePolicy) ProtoMessage() {} func (x *DevicePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +571,9 @@ type OsConstraint struct { func (x *OsConstraint) Reset() { *x = OsConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OsConstraint) String() string { @@ -596,7 +584,7 @@ func (*OsConstraint) ProtoMessage() {} func (x *OsConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,80 +827,6 @@ func file_google_identity_accesscontextmanager_v1_access_level_proto_init() { if File_google_identity_accesscontextmanager_v1_access_level_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessLevel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BasicLevel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomLevel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DevicePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OsConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_identity_accesscontextmanager_v1_access_level_proto_msgTypes[0].OneofWrappers = []any{ (*AccessLevel_Basic)(nil), (*AccessLevel_Custom)(nil), diff --git a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_policy.pb.go b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_policy.pb.go index 127c0190dcc5..98d6f9349962 100755 --- a/accesscontextmanager/apiv1/accesscontextmanagerpb/access_policy.pb.go +++ b/accesscontextmanager/apiv1/accesscontextmanagerpb/access_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/identity/accesscontextmanager/v1/access_policy.proto @@ -84,11 +84,9 @@ type AccessPolicy struct { func (x *AccessPolicy) Reset() { *x = AccessPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_access_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_access_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessPolicy) String() string { @@ -99,7 +97,7 @@ func (*AccessPolicy) ProtoMessage() {} func (x *AccessPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_access_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,20 +248,6 @@ func file_google_identity_accesscontextmanager_v1_access_policy_proto_init() { if File_google_identity_accesscontextmanager_v1_access_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_identity_accesscontextmanager_v1_access_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/accesscontextmanager/apiv1/accesscontextmanagerpb/gcp_user_access_binding.pb.go b/accesscontextmanager/apiv1/accesscontextmanagerpb/gcp_user_access_binding.pb.go index e45fe93baf0b..ebdb04ba85cd 100755 --- a/accesscontextmanager/apiv1/accesscontextmanagerpb/gcp_user_access_binding.pb.go +++ b/accesscontextmanager/apiv1/accesscontextmanagerpb/gcp_user_access_binding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/identity/accesscontextmanager/v1/gcp_user_access_binding.proto @@ -66,11 +66,9 @@ type GcpUserAccessBinding struct { func (x *GcpUserAccessBinding) Reset() { *x = GcpUserAccessBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpUserAccessBinding) String() string { @@ -81,7 +79,7 @@ func (*GcpUserAccessBinding) ProtoMessage() {} func (x *GcpUserAccessBinding) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,20 +200,6 @@ func file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_ if File_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_identity_accesscontextmanager_v1_gcp_user_access_binding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcpUserAccessBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/accesscontextmanager/apiv1/accesscontextmanagerpb/service_perimeter.pb.go b/accesscontextmanager/apiv1/accesscontextmanagerpb/service_perimeter.pb.go index cadbf306cb8d..3de154467ecd 100755 --- a/accesscontextmanager/apiv1/accesscontextmanagerpb/service_perimeter.pb.go +++ b/accesscontextmanager/apiv1/accesscontextmanagerpb/service_perimeter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/identity/accesscontextmanager/v1/service_perimeter.proto @@ -222,11 +222,9 @@ type ServicePerimeter struct { func (x *ServicePerimeter) Reset() { *x = ServicePerimeter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeter) String() string { @@ -237,7 +235,7 @@ func (*ServicePerimeter) ProtoMessage() {} func (x *ServicePerimeter) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +361,9 @@ type ServicePerimeterConfig struct { func (x *ServicePerimeterConfig) Reset() { *x = ServicePerimeterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig) String() string { @@ -378,7 +374,7 @@ func (*ServicePerimeterConfig) ProtoMessage() {} func (x *ServicePerimeterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +450,9 @@ type ServicePerimeterConfig_VpcAccessibleServices struct { func (x *ServicePerimeterConfig_VpcAccessibleServices) Reset() { *x = ServicePerimeterConfig_VpcAccessibleServices{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_VpcAccessibleServices) String() string { @@ -469,7 +463,7 @@ func (*ServicePerimeterConfig_VpcAccessibleServices) ProtoMessage() {} func (x *ServicePerimeterConfig_VpcAccessibleServices) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +510,9 @@ type ServicePerimeterConfig_MethodSelector struct { func (x *ServicePerimeterConfig_MethodSelector) Reset() { *x = ServicePerimeterConfig_MethodSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_MethodSelector) String() string { @@ -531,7 +523,7 @@ func (*ServicePerimeterConfig_MethodSelector) ProtoMessage() {} func (x *ServicePerimeterConfig_MethodSelector) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +609,9 @@ type ServicePerimeterConfig_ApiOperation struct { func (x *ServicePerimeterConfig_ApiOperation) Reset() { *x = ServicePerimeterConfig_ApiOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_ApiOperation) String() string { @@ -632,7 +622,7 @@ func (*ServicePerimeterConfig_ApiOperation) ProtoMessage() {} func (x *ServicePerimeterConfig_ApiOperation) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +672,9 @@ type ServicePerimeterConfig_IngressSource struct { func (x *ServicePerimeterConfig_IngressSource) Reset() { *x = ServicePerimeterConfig_IngressSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_IngressSource) String() string { @@ -697,7 +685,7 @@ func (*ServicePerimeterConfig_IngressSource) ProtoMessage() {} func (x *ServicePerimeterConfig_IngressSource) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +790,9 @@ type ServicePerimeterConfig_IngressFrom struct { func (x *ServicePerimeterConfig_IngressFrom) Reset() { *x = ServicePerimeterConfig_IngressFrom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_IngressFrom) String() string { @@ -817,7 +803,7 @@ func (*ServicePerimeterConfig_IngressFrom) ProtoMessage() {} func (x *ServicePerimeterConfig_IngressFrom) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +873,9 @@ type ServicePerimeterConfig_IngressTo struct { func (x *ServicePerimeterConfig_IngressTo) Reset() { *x = ServicePerimeterConfig_IngressTo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_IngressTo) String() string { @@ -902,7 +886,7 @@ func (*ServicePerimeterConfig_IngressTo) ProtoMessage() {} func (x *ServicePerimeterConfig_IngressTo) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,11 +955,9 @@ type ServicePerimeterConfig_IngressPolicy struct { func (x *ServicePerimeterConfig_IngressPolicy) Reset() { *x = ServicePerimeterConfig_IngressPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_IngressPolicy) String() string { @@ -986,7 +968,7 @@ func (*ServicePerimeterConfig_IngressPolicy) ProtoMessage() {} func (x *ServicePerimeterConfig_IngressPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1025,9 @@ type ServicePerimeterConfig_EgressFrom struct { func (x *ServicePerimeterConfig_EgressFrom) Reset() { *x = ServicePerimeterConfig_EgressFrom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_EgressFrom) String() string { @@ -1058,7 +1038,7 @@ func (*ServicePerimeterConfig_EgressFrom) ProtoMessage() {} func (x *ServicePerimeterConfig_EgressFrom) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1114,9 @@ type ServicePerimeterConfig_EgressTo struct { func (x *ServicePerimeterConfig_EgressTo) Reset() { *x = ServicePerimeterConfig_EgressTo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_EgressTo) String() string { @@ -1149,7 +1127,7 @@ func (*ServicePerimeterConfig_EgressTo) ProtoMessage() {} func (x *ServicePerimeterConfig_EgressTo) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1210,9 @@ type ServicePerimeterConfig_EgressPolicy struct { func (x *ServicePerimeterConfig_EgressPolicy) Reset() { *x = ServicePerimeterConfig_EgressPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServicePerimeterConfig_EgressPolicy) String() string { @@ -1247,7 +1223,7 @@ func (*ServicePerimeterConfig_EgressPolicy) ProtoMessage() {} func (x *ServicePerimeterConfig_EgressPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,152 +1544,6 @@ func file_google_identity_accesscontextmanager_v1_service_perimeter_proto_init() if File_google_identity_accesscontextmanager_v1_service_perimeter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_VpcAccessibleServices); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_MethodSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_ApiOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_IngressSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_IngressFrom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_IngressTo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_IngressPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_EgressFrom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_EgressTo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ServicePerimeterConfig_EgressPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_identity_accesscontextmanager_v1_service_perimeter_proto_msgTypes[3].OneofWrappers = []any{ (*ServicePerimeterConfig_MethodSelector_Method)(nil), (*ServicePerimeterConfig_MethodSelector_Permission)(nil), diff --git a/accesscontextmanager/apiv1/helpers.go b/accesscontextmanager/apiv1/helpers.go index 996a6207cfd3..fcb33d6acf80 100755 --- a/accesscontextmanager/apiv1/helpers.go +++ b/accesscontextmanager/apiv1/helpers.go @@ -18,10 +18,20 @@ package accesscontextmanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "accesscontextmanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/advisorynotifications/apiv1/advisory_notifications_client.go b/advisorynotifications/apiv1/advisory_notifications_client.go index 82c36d6a9970..07bf80db84b1 100755 --- a/advisorynotifications/apiv1/advisory_notifications_client.go +++ b/advisorynotifications/apiv1/advisory_notifications_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( advisorynotificationspb "cloud.google.com/go/advisorynotifications/apiv1/advisorynotificationspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -206,6 +205,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new advisory notifications service client based on gRPC. @@ -232,6 +233,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: advisorynotificationspb.NewAdvisoryNotificationsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -278,6 +280,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new advisory notifications service rest client. @@ -295,6 +299,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -358,7 +363,7 @@ func (c *gRPCClient) ListNotifications(ctx context.Context, req *advisorynotific } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNotifications(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNotifications, req, settings.GRPC, c.logger, "ListNotifications") return err }, opts...) if err != nil { @@ -393,7 +398,7 @@ func (c *gRPCClient) GetNotification(ctx context.Context, req *advisorynotificat var resp *advisorynotificationspb.Notification err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNotification(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNotification, req, settings.GRPC, c.logger, "GetNotification") return err }, opts...) if err != nil { @@ -411,7 +416,7 @@ func (c *gRPCClient) GetSettings(ctx context.Context, req *advisorynotifications var resp *advisorynotificationspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSettings, req, settings.GRPC, c.logger, "GetSettings") return err }, opts...) if err != nil { @@ -429,7 +434,7 @@ func (c *gRPCClient) UpdateSettings(ctx context.Context, req *advisorynotificati var resp *advisorynotificationspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSettings, req, settings.GRPC, c.logger, "UpdateSettings") return err }, opts...) if err != nil { @@ -489,21 +494,10 @@ func (c *restClient) ListNotifications(ctx context.Context, req *advisorynotific } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotifications") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -569,17 +563,7 @@ func (c *restClient) GetNotification(ctx context.Context, req *advisorynotificat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotification") if err != nil { return err } @@ -629,17 +613,7 @@ func (c *restClient) GetSettings(ctx context.Context, req *advisorynotifications httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSettings") if err != nil { return err } @@ -696,17 +670,7 @@ func (c *restClient) UpdateSettings(ctx context.Context, req *advisorynotificati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSettings") if err != nil { return err } diff --git a/advisorynotifications/apiv1/advisory_notifications_client_example_go123_test.go b/advisorynotifications/apiv1/advisory_notifications_client_example_go123_test.go index e0871fda6d5a..2626c6cda63e 100644 --- a/advisorynotifications/apiv1/advisory_notifications_client_example_go123_test.go +++ b/advisorynotifications/apiv1/advisory_notifications_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListNotifications_all() { } for resp, err := range c.ListNotifications(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/advisorynotifications/apiv1/advisorynotificationspb/service.pb.go b/advisorynotifications/apiv1/advisorynotificationspb/service.pb.go index df3b9abe516f..86d25aa45f4e 100755 --- a/advisorynotifications/apiv1/advisorynotificationspb/service.pb.go +++ b/advisorynotifications/apiv1/advisorynotificationspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/advisorynotifications/v1/service.proto @@ -243,11 +243,9 @@ type Notification struct { func (x *Notification) Reset() { *x = Notification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Notification) String() string { @@ -258,7 +256,7 @@ func (*Notification) ProtoMessage() {} func (x *Notification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +322,9 @@ type Text struct { func (x *Text) Reset() { *x = Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Text) String() string { @@ -339,7 +335,7 @@ func (*Text) ProtoMessage() {} func (x *Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +383,9 @@ type Subject struct { func (x *Subject) Reset() { *x = Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subject) String() string { @@ -402,7 +396,7 @@ func (*Subject) ProtoMessage() {} func (x *Subject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,11 +436,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -457,7 +449,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +510,9 @@ type Attachment struct { func (x *Attachment) Reset() { *x = Attachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attachment) String() string { @@ -533,7 +523,7 @@ func (*Attachment) ProtoMessage() {} func (x *Attachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +586,9 @@ type Csv struct { func (x *Csv) Reset() { *x = Csv{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Csv) String() string { @@ -611,7 +599,7 @@ func (*Csv) ProtoMessage() {} func (x *Csv) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +660,9 @@ type ListNotificationsRequest struct { func (x *ListNotificationsRequest) Reset() { *x = ListNotificationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationsRequest) String() string { @@ -687,7 +673,7 @@ func (*ListNotificationsRequest) ProtoMessage() {} func (x *ListNotificationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +740,9 @@ type ListNotificationsResponse struct { func (x *ListNotificationsResponse) Reset() { *x = ListNotificationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationsResponse) String() string { @@ -769,7 +753,7 @@ func (*ListNotificationsResponse) ProtoMessage() {} func (x *ListNotificationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +810,9 @@ type GetNotificationRequest struct { func (x *GetNotificationRequest) Reset() { *x = GetNotificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationRequest) String() string { @@ -841,7 +823,7 @@ func (*GetNotificationRequest) ProtoMessage() {} func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +876,9 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings) String() string { @@ -909,7 +889,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +937,9 @@ type NotificationSettings struct { func (x *NotificationSettings) Reset() { *x = NotificationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationSettings) String() string { @@ -972,7 +950,7 @@ func (*NotificationSettings) ProtoMessage() {} func (x *NotificationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +987,9 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingsRequest) String() string { @@ -1024,7 +1000,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1058,11 +1034,9 @@ type UpdateSettingsRequest struct { func (x *UpdateSettingsRequest) Reset() { *x = UpdateSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingsRequest) String() string { @@ -1073,7 +1047,7 @@ func (*UpdateSettingsRequest) ProtoMessage() {} func (x *UpdateSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1081,9 @@ type Message_Body struct { func (x *Message_Body) Reset() { *x = Message_Body{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message_Body) String() string { @@ -1122,7 +1094,7 @@ func (*Message_Body) ProtoMessage() {} func (x *Message_Body) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1129,9 @@ type Csv_CsvRow struct { func (x *Csv_CsvRow) Reset() { *x = Csv_CsvRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Csv_CsvRow) String() string { @@ -1172,7 +1142,7 @@ func (*Csv_CsvRow) ProtoMessage() {} func (x *Csv_CsvRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1599,188 +1569,6 @@ func file_google_cloud_advisorynotifications_v1_service_proto_init() { if File_google_cloud_advisorynotifications_v1_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Notification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Attachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Csv); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NotificationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Message_Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Csv_CsvRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_advisorynotifications_v1_service_proto_msgTypes[4].OneofWrappers = []any{ (*Attachment_Csv)(nil), } diff --git a/advisorynotifications/apiv1/helpers.go b/advisorynotifications/apiv1/helpers.go index 5b7baced64af..91eeab123a76 100755 --- a/advisorynotifications/apiv1/helpers.go +++ b/advisorynotifications/apiv1/helpers.go @@ -18,10 +18,20 @@ package advisorynotifications import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "advisorynotifications.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/ai/generativelanguage/apiv1/generative_client.go b/ai/generativelanguage/apiv1/generative_client.go index 0c5ba2b8bc79..c70a08dfbf72 100755 --- a/ai/generativelanguage/apiv1/generative_client.go +++ b/ai/generativelanguage/apiv1/generative_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -324,6 +323,8 @@ type generativeGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenerativeClient creates a new generative service client based on gRPC. @@ -351,6 +352,7 @@ func NewGenerativeClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generativeClient: generativelanguagepb.NewGenerativeServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -398,6 +400,8 @@ type generativeRESTClient struct { // Points back to the CallOptions field of the containing GenerativeClient CallOptions **GenerativeCallOptions + + logger *slog.Logger } // NewGenerativeRESTClient creates a new generative service rest client. @@ -416,6 +420,7 @@ func NewGenerativeRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -468,7 +473,7 @@ func (c *generativeGRPCClient) GenerateContent(ctx context.Context, req *generat var resp *generativelanguagepb.GenerateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.GenerateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.GenerateContent, req, settings.GRPC, c.logger, "GenerateContent") return err }, opts...) if err != nil { @@ -486,7 +491,9 @@ func (c *generativeGRPCClient) StreamGenerateContent(ctx context.Context, req *g var resp generativelanguagepb.GenerativeService_StreamGenerateContentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateContent") resp, err = c.generativeClient.StreamGenerateContent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateContent") return err }, opts...) if err != nil { @@ -504,7 +511,7 @@ func (c *generativeGRPCClient) EmbedContent(ctx context.Context, req *generative var resp *generativelanguagepb.EmbedContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.EmbedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.EmbedContent, req, settings.GRPC, c.logger, "EmbedContent") return err }, opts...) if err != nil { @@ -522,7 +529,7 @@ func (c *generativeGRPCClient) BatchEmbedContents(ctx context.Context, req *gene var resp *generativelanguagepb.BatchEmbedContentsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.BatchEmbedContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.BatchEmbedContents, req, settings.GRPC, c.logger, "BatchEmbedContents") return err }, opts...) if err != nil { @@ -540,7 +547,7 @@ func (c *generativeGRPCClient) CountTokens(ctx context.Context, req *generativel var resp *generativelanguagepb.CountTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.CountTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.CountTokens, req, settings.GRPC, c.logger, "CountTokens") return err }, opts...) if err != nil { @@ -557,7 +564,7 @@ func (c *generativeGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -572,7 +579,7 @@ func (c *generativeGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -601,7 +608,7 @@ func (c *generativeGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -672,17 +679,7 @@ func (c *generativeRESTClient) GenerateContent(ctx context.Context, req *generat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateContent") if err != nil { return err } @@ -738,15 +735,11 @@ func (c *generativeRESTClient) StreamGenerateContent(ctx context.Context, req *g httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamGenerateContent") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamGenerateContentRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -848,17 +841,7 @@ func (c *generativeRESTClient) EmbedContent(ctx context.Context, req *generative httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EmbedContent") if err != nil { return err } @@ -916,17 +899,7 @@ func (c *generativeRESTClient) BatchEmbedContents(ctx context.Context, req *gene httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchEmbedContents") if err != nil { return err } @@ -984,17 +957,7 @@ func (c *generativeRESTClient) CountTokens(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountTokens") if err != nil { return err } @@ -1047,15 +1010,8 @@ func (c *generativeRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1092,17 +1048,7 @@ func (c *generativeRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1167,21 +1113,10 @@ func (c *generativeRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1/generative_client_example_go123_test.go b/ai/generativelanguage/apiv1/generative_client_example_go123_test.go index e78886231996..ec303ed36b9d 100644 --- a/ai/generativelanguage/apiv1/generative_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1/generative_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGenerativeClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/citation.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/citation.pb.go index 6c258591019f..869675e71695 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/citation.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/citation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/citation.proto @@ -48,11 +48,9 @@ type CitationMetadata struct { func (x *CitationMetadata) Reset() { *x = CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationMetadata) String() string { @@ -63,7 +61,7 @@ func (*CitationMetadata) ProtoMessage() {} func (x *CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type CitationSource struct { func (x *CitationSource) Reset() { *x = CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationSource) String() string { @@ -124,7 +120,7 @@ func (*CitationSource) ProtoMessage() {} func (x *CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_citation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,32 +237,6 @@ func file_google_ai_generativelanguage_v1_citation_proto_init() { if File_google_ai_generativelanguage_v1_citation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_citation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_citation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1_citation_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/content.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/content.pb.go index 28cc9a3153fd..8806fb2e4109 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/content.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/content.proto @@ -58,11 +58,9 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content) String() string { @@ -73,7 +71,7 @@ func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type Part struct { func (x *Part) Reset() { *x = Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Part) String() string { @@ -138,7 +134,7 @@ func (*Part) ProtoMessage() {} func (x *Part) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type Blob struct { func (x *Blob) Reset() { *x = Blob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Blob) String() string { @@ -230,7 +224,7 @@ func (*Blob) ProtoMessage() {} func (x *Blob) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,44 +325,6 @@ func file_google_ai_generativelanguage_v1_content_proto_init() { if File_google_ai_generativelanguage_v1_content_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Blob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1_content_proto_msgTypes[1].OneofWrappers = []any{ (*Part_Text)(nil), (*Part_InlineData)(nil), diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/generative_service.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/generative_service.pb.go index b56524d9148b..6dbd2632ed75 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/generative_service.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/generative_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/generative_service.proto @@ -304,11 +304,9 @@ type GenerateContentRequest struct { func (x *GenerateContentRequest) Reset() { *x = GenerateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentRequest) String() string { @@ -319,7 +317,7 @@ func (*GenerateContentRequest) ProtoMessage() {} func (x *GenerateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +457,9 @@ type GenerationConfig struct { func (x *GenerationConfig) Reset() { *x = GenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig) String() string { @@ -474,7 +470,7 @@ func (*GenerationConfig) ProtoMessage() {} func (x *GenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +582,9 @@ type GenerateContentResponse struct { func (x *GenerateContentResponse) Reset() { *x = GenerateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse) String() string { @@ -601,7 +595,7 @@ func (*GenerateContentResponse) ProtoMessage() {} func (x *GenerateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +676,9 @@ type Candidate struct { func (x *Candidate) Reset() { *x = Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Candidate) String() string { @@ -697,7 +689,7 @@ func (*Candidate) ProtoMessage() {} func (x *Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +782,9 @@ type LogprobsResult struct { func (x *LogprobsResult) Reset() { *x = LogprobsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult) String() string { @@ -805,7 +795,7 @@ func (*LogprobsResult) ProtoMessage() {} func (x *LogprobsResult) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +840,9 @@ type RetrievalMetadata struct { func (x *RetrievalMetadata) Reset() { *x = RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrievalMetadata) String() string { @@ -865,7 +853,7 @@ func (*RetrievalMetadata) ProtoMessage() {} func (x *RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +895,9 @@ type GroundingMetadata struct { func (x *GroundingMetadata) Reset() { *x = GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingMetadata) String() string { @@ -922,7 +908,7 @@ func (*GroundingMetadata) ProtoMessage() {} func (x *GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +974,9 @@ type SearchEntryPoint struct { func (x *SearchEntryPoint) Reset() { *x = SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntryPoint) String() string { @@ -1003,7 +987,7 @@ func (*SearchEntryPoint) ProtoMessage() {} func (x *SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1048,11 +1032,9 @@ type GroundingChunk struct { func (x *GroundingChunk) Reset() { *x = GroundingChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk) String() string { @@ -1063,7 +1045,7 @@ func (*GroundingChunk) ProtoMessage() {} func (x *GroundingChunk) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1105,9 @@ type Segment struct { func (x *Segment) Reset() { *x = Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Segment) String() string { @@ -1138,7 +1118,7 @@ func (*Segment) ProtoMessage() {} func (x *Segment) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1182,9 @@ type GroundingSupport struct { func (x *GroundingSupport) Reset() { *x = GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingSupport) String() string { @@ -1217,7 +1195,7 @@ func (*GroundingSupport) ProtoMessage() {} func (x *GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1265,9 @@ type EmbedContentRequest struct { func (x *EmbedContentRequest) Reset() { *x = EmbedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedContentRequest) String() string { @@ -1302,7 +1278,7 @@ func (*EmbedContentRequest) ProtoMessage() {} func (x *EmbedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1364,11 +1340,9 @@ type ContentEmbedding struct { func (x *ContentEmbedding) Reset() { *x = ContentEmbedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentEmbedding) String() string { @@ -1379,7 +1353,7 @@ func (*ContentEmbedding) ProtoMessage() {} func (x *ContentEmbedding) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1387,9 @@ type EmbedContentResponse struct { func (x *EmbedContentResponse) Reset() { *x = EmbedContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedContentResponse) String() string { @@ -1428,7 +1400,7 @@ func (*EmbedContentResponse) ProtoMessage() {} func (x *EmbedContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1442,9 @@ type BatchEmbedContentsRequest struct { func (x *BatchEmbedContentsRequest) Reset() { *x = BatchEmbedContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedContentsRequest) String() string { @@ -1485,7 +1455,7 @@ func (*BatchEmbedContentsRequest) ProtoMessage() {} func (x *BatchEmbedContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1527,11 +1497,9 @@ type BatchEmbedContentsResponse struct { func (x *BatchEmbedContentsResponse) Reset() { *x = BatchEmbedContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedContentsResponse) String() string { @@ -1542,7 +1510,7 @@ func (*BatchEmbedContentsResponse) ProtoMessage() {} func (x *BatchEmbedContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,11 +1564,9 @@ type CountTokensRequest struct { func (x *CountTokensRequest) Reset() { *x = CountTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensRequest) String() string { @@ -1611,7 +1577,7 @@ func (*CountTokensRequest) ProtoMessage() {} func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1662,11 +1628,9 @@ type CountTokensResponse struct { func (x *CountTokensResponse) Reset() { *x = CountTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensResponse) String() string { @@ -1677,7 +1641,7 @@ func (*CountTokensResponse) ProtoMessage() {} func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,11 +1680,9 @@ type GenerateContentResponse_PromptFeedback struct { func (x *GenerateContentResponse_PromptFeedback) Reset() { *x = GenerateContentResponse_PromptFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_PromptFeedback) String() string { @@ -1731,7 +1693,7 @@ func (*GenerateContentResponse_PromptFeedback) ProtoMessage() {} func (x *GenerateContentResponse_PromptFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1779,11 +1741,9 @@ type GenerateContentResponse_UsageMetadata struct { func (x *GenerateContentResponse_UsageMetadata) Reset() { *x = GenerateContentResponse_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_UsageMetadata) String() string { @@ -1794,7 +1754,7 @@ func (*GenerateContentResponse_UsageMetadata) ProtoMessage() {} func (x *GenerateContentResponse_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,11 +1806,9 @@ type LogprobsResult_Candidate struct { func (x *LogprobsResult_Candidate) Reset() { *x = LogprobsResult_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_Candidate) String() string { @@ -1861,7 +1819,7 @@ func (*LogprobsResult_Candidate) ProtoMessage() {} func (x *LogprobsResult_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1909,11 +1867,9 @@ type LogprobsResult_TopCandidates struct { func (x *LogprobsResult_TopCandidates) Reset() { *x = LogprobsResult_TopCandidates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_TopCandidates) String() string { @@ -1924,7 +1880,7 @@ func (*LogprobsResult_TopCandidates) ProtoMessage() {} func (x *LogprobsResult_TopCandidates) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1960,11 +1916,9 @@ type GroundingChunk_Web struct { func (x *GroundingChunk_Web) Reset() { *x = GroundingChunk_Web{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_Web) String() string { @@ -1975,7 +1929,7 @@ func (*GroundingChunk_Web) ProtoMessage() {} func (x *GroundingChunk_Web) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2588,284 +2542,6 @@ func file_google_ai_generativelanguage_v1_generative_service_proto_init() { file_google_ai_generativelanguage_v1_citation_proto_init() file_google_ai_generativelanguage_v1_content_proto_init() file_google_ai_generativelanguage_v1_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EmbedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ContentEmbedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EmbedContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_PromptFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_TopCandidates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_Web); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[1].OneofWrappers = []any{} file_google_ai_generativelanguage_v1_generative_service_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/model.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/model.pb.go index d6681faba34b..c090f3322377 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/model.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/model.proto @@ -110,11 +110,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -125,7 +123,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,20 +311,6 @@ func file_google_ai_generativelanguage_v1_model_proto_init() { if File_google_ai_generativelanguage_v1_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1_model_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/model_service.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/model_service.pb.go index a366a962d0d7..08ae5c7cc2ff 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/model_service.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/model_service.proto @@ -56,11 +56,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -71,7 +69,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -132,7 +128,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -192,7 +186,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,44 +325,6 @@ func file_google_ai_generativelanguage_v1_model_service_proto_init() { return } file_google_ai_generativelanguage_v1_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1/generativelanguagepb/safety.pb.go b/ai/generativelanguage/apiv1/generativelanguagepb/safety.pb.go index b620f539002e..4b5bd276ec78 100755 --- a/ai/generativelanguage/apiv1/generativelanguagepb/safety.pb.go +++ b/ai/generativelanguage/apiv1/generativelanguagepb/safety.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1/safety.proto @@ -282,11 +282,9 @@ type SafetyRating struct { func (x *SafetyRating) Reset() { *x = SafetyRating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyRating) String() string { @@ -297,7 +295,7 @@ func (*SafetyRating) ProtoMessage() {} func (x *SafetyRating) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +348,9 @@ type SafetySetting struct { func (x *SafetySetting) Reset() { *x = SafetySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySetting) String() string { @@ -365,7 +361,7 @@ func (*SafetySetting) ProtoMessage() {} func (x *SafetySetting) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1_safety_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,32 +517,6 @@ func file_google_ai_generativelanguage_v1_safety_proto_init() { if File_google_ai_generativelanguage_v1_safety_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1_safety_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SafetyRating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1_safety_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SafetySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1/helpers.go b/ai/generativelanguage/apiv1/helpers.go index b5534b6f1b0f..101cfeee0c6f 100755 --- a/ai/generativelanguage/apiv1/helpers.go +++ b/ai/generativelanguage/apiv1/helpers.go @@ -18,10 +18,20 @@ package generativelanguage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "generativelanguage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/ai/generativelanguage/apiv1/model_client.go b/ai/generativelanguage/apiv1/model_client.go index 242f8c0f6d9f..428f12fb0e5b 100755 --- a/ai/generativelanguage/apiv1/model_client.go +++ b/ai/generativelanguage/apiv1/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -180,6 +179,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -206,6 +207,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: generativelanguagepb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -253,6 +255,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -270,6 +274,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -322,7 +327,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *generativelanguagep var resp *generativelanguagepb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -348,7 +353,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *generativelanguag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -382,7 +387,7 @@ func (c *modelGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -397,7 +402,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -426,7 +431,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -490,17 +495,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *generativelanguagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -563,21 +558,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *generativelanguag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -643,15 +627,8 @@ func (c *modelRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -688,17 +665,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -763,21 +730,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1/model_client_example_go123_test.go b/ai/generativelanguage/apiv1/model_client_example_go123_test.go index f9f78348ba37..67dc5f4ace28 100644 --- a/ai/generativelanguage/apiv1/model_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1/model_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/cache_client.go b/ai/generativelanguage/apiv1beta/cache_client.go index 1547324cf9f4..9811377ea5bc 100755 --- a/ai/generativelanguage/apiv1beta/cache_client.go +++ b/ai/generativelanguage/apiv1beta/cache_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type cacheGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCacheClient creates a new cache service client based on gRPC. @@ -224,6 +225,7 @@ func NewCacheClient(ctx context.Context, opts ...option.ClientOption) (*CacheCli connPool: connPool, cacheClient: generativelanguagepb.NewCacheServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -271,6 +273,8 @@ type cacheRESTClient struct { // Points back to the CallOptions field of the containing CacheClient CallOptions **CacheCallOptions + + logger *slog.Logger } // NewCacheRESTClient creates a new cache service rest client. @@ -291,6 +295,7 @@ func NewCacheRESTClient(ctx context.Context, opts ...option.ClientOption) (*Cach endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -351,7 +356,7 @@ func (c *cacheGRPCClient) ListCachedContents(ctx context.Context, req *generativ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cacheClient.ListCachedContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cacheClient.ListCachedContents, req, settings.GRPC, c.logger, "ListCachedContents") return err }, opts...) if err != nil { @@ -383,7 +388,7 @@ func (c *cacheGRPCClient) CreateCachedContent(ctx context.Context, req *generati var resp *generativelanguagepb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cacheClient.CreateCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cacheClient.CreateCachedContent, req, settings.GRPC, c.logger, "CreateCachedContent") return err }, opts...) if err != nil { @@ -401,7 +406,7 @@ func (c *cacheGRPCClient) GetCachedContent(ctx context.Context, req *generativel var resp *generativelanguagepb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cacheClient.GetCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cacheClient.GetCachedContent, req, settings.GRPC, c.logger, "GetCachedContent") return err }, opts...) if err != nil { @@ -419,7 +424,7 @@ func (c *cacheGRPCClient) UpdateCachedContent(ctx context.Context, req *generati var resp *generativelanguagepb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cacheClient.UpdateCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cacheClient.UpdateCachedContent, req, settings.GRPC, c.logger, "UpdateCachedContent") return err }, opts...) if err != nil { @@ -436,7 +441,7 @@ func (c *cacheGRPCClient) DeleteCachedContent(ctx context.Context, req *generati opts = append((*c.CallOptions).DeleteCachedContent[0:len((*c.CallOptions).DeleteCachedContent):len((*c.CallOptions).DeleteCachedContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cacheClient.DeleteCachedContent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cacheClient.DeleteCachedContent, req, settings.GRPC, c.logger, "DeleteCachedContent") return err }, opts...) return err @@ -451,7 +456,7 @@ func (c *cacheGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *cacheGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -551,21 +556,10 @@ func (c *cacheRESTClient) ListCachedContents(ctx context.Context, req *generativ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCachedContents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -632,17 +626,7 @@ func (c *cacheRESTClient) CreateCachedContent(ctx context.Context, req *generati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCachedContent") if err != nil { return err } @@ -692,17 +676,7 @@ func (c *cacheRESTClient) GetCachedContent(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCachedContent") if err != nil { return err } @@ -766,17 +740,7 @@ func (c *cacheRESTClient) UpdateCachedContent(ctx context.Context, req *generati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCachedContent") if err != nil { return err } @@ -823,15 +787,8 @@ func (c *cacheRESTClient) DeleteCachedContent(ctx context.Context, req *generati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCachedContent") + return err }, opts...) } @@ -868,17 +825,7 @@ func (c *cacheRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -943,21 +890,10 @@ func (c *cacheRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/cache_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/cache_client_example_go123_test.go index 0acc0454d7b3..0a26559b906c 100644 --- a/ai/generativelanguage/apiv1beta/cache_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/cache_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCacheClient_ListCachedContents_all() { } for resp, err := range c.ListCachedContents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCacheClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/discuss_client.go b/ai/generativelanguage/apiv1beta/discuss_client.go index 5aaf65e4eb07..9f892b6d3783 100755 --- a/ai/generativelanguage/apiv1beta/discuss_client.go +++ b/ai/generativelanguage/apiv1beta/discuss_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -212,6 +211,8 @@ type discussGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDiscussClient creates a new discuss service client based on gRPC. @@ -241,6 +242,7 @@ func NewDiscussClient(ctx context.Context, opts ...option.ClientOption) (*Discus connPool: connPool, discussClient: generativelanguagepb.NewDiscussServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -288,6 +290,8 @@ type discussRESTClient struct { // Points back to the CallOptions field of the containing DiscussClient CallOptions **DiscussCallOptions + + logger *slog.Logger } // NewDiscussRESTClient creates a new discuss service rest client. @@ -308,6 +312,7 @@ func NewDiscussRESTClient(ctx context.Context, opts ...option.ClientOption) (*Di endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -360,7 +365,7 @@ func (c *discussGRPCClient) GenerateMessage(ctx context.Context, req *generative var resp *generativelanguagepb.GenerateMessageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.discussClient.GenerateMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.discussClient.GenerateMessage, req, settings.GRPC, c.logger, "GenerateMessage") return err }, opts...) if err != nil { @@ -378,7 +383,7 @@ func (c *discussGRPCClient) CountMessageTokens(ctx context.Context, req *generat var resp *generativelanguagepb.CountMessageTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.discussClient.CountMessageTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.discussClient.CountMessageTokens, req, settings.GRPC, c.logger, "CountMessageTokens") return err }, opts...) if err != nil { @@ -396,7 +401,7 @@ func (c *discussGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -425,7 +430,7 @@ func (c *discussGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -490,17 +495,7 @@ func (c *discussRESTClient) GenerateMessage(ctx context.Context, req *generative httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateMessage") if err != nil { return err } @@ -556,17 +551,7 @@ func (c *discussRESTClient) CountMessageTokens(ctx context.Context, req *generat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountMessageTokens") if err != nil { return err } @@ -616,17 +601,7 @@ func (c *discussRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -691,21 +666,10 @@ func (c *discussRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/discuss_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/discuss_client_example_go123_test.go index dbcf46e3b56b..fc8a51c5148a 100644 --- a/ai/generativelanguage/apiv1beta/discuss_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/discuss_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDiscussClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/file_client.go b/ai/generativelanguage/apiv1beta/file_client.go index f7cac4de787e..242b0db529e3 100755 --- a/ai/generativelanguage/apiv1beta/file_client.go +++ b/ai/generativelanguage/apiv1beta/file_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -183,6 +182,8 @@ type fileGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFileClient creates a new file service client based on gRPC. @@ -209,6 +210,7 @@ func NewFileClient(ctx context.Context, opts ...option.ClientOption) (*FileClien connPool: connPool, fileClient: generativelanguagepb.NewFileServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -256,6 +258,8 @@ type fileRESTClient struct { // Points back to the CallOptions field of the containing FileClient CallOptions **FileCallOptions + + logger *slog.Logger } // NewFileRESTClient creates a new file service rest client. @@ -273,6 +277,7 @@ func NewFileRESTClient(ctx context.Context, opts ...option.ClientOption) (*FileC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -322,7 +327,7 @@ func (c *fileGRPCClient) CreateFile(ctx context.Context, req *generativelanguage var resp *generativelanguagepb.CreateFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fileClient.CreateFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fileClient.CreateFile, req, settings.GRPC, c.logger, "CreateFile") return err }, opts...) if err != nil { @@ -348,7 +353,7 @@ func (c *fileGRPCClient) ListFiles(ctx context.Context, req *generativelanguagep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fileClient.ListFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fileClient.ListFiles, req, settings.GRPC, c.logger, "ListFiles") return err }, opts...) if err != nil { @@ -383,7 +388,7 @@ func (c *fileGRPCClient) GetFile(ctx context.Context, req *generativelanguagepb. var resp *generativelanguagepb.File err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fileClient.GetFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fileClient.GetFile, req, settings.GRPC, c.logger, "GetFile") return err }, opts...) if err != nil { @@ -400,7 +405,7 @@ func (c *fileGRPCClient) DeleteFile(ctx context.Context, req *generativelanguage opts = append((*c.CallOptions).DeleteFile[0:len((*c.CallOptions).DeleteFile):len((*c.CallOptions).DeleteFile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.fileClient.DeleteFile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.fileClient.DeleteFile, req, settings.GRPC, c.logger, "DeleteFile") return err }, opts...) return err @@ -415,7 +420,7 @@ func (c *fileGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *fileGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -506,17 +511,7 @@ func (c *fileRESTClient) CreateFile(ctx context.Context, req *generativelanguage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFile") if err != nil { return err } @@ -578,21 +573,10 @@ func (c *fileRESTClient) ListFiles(ctx context.Context, req *generativelanguagep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -655,17 +639,7 @@ func (c *fileRESTClient) GetFile(ctx context.Context, req *generativelanguagepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFile") if err != nil { return err } @@ -712,15 +686,8 @@ func (c *fileRESTClient) DeleteFile(ctx context.Context, req *generativelanguage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFile") + return err }, opts...) } @@ -757,17 +724,7 @@ func (c *fileRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -832,21 +789,10 @@ func (c *fileRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/file_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/file_client_example_go123_test.go index 5d734f931be0..5dc0a05c8edb 100644 --- a/ai/generativelanguage/apiv1beta/file_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/file_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFileClient_ListFiles_all() { } for resp, err := range c.ListFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFileClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/generative_client.go b/ai/generativelanguage/apiv1beta/generative_client.go index bb90610ad297..bd0d619ea6d5 100755 --- a/ai/generativelanguage/apiv1beta/generative_client.go +++ b/ai/generativelanguage/apiv1beta/generative_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -346,6 +345,8 @@ type generativeGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenerativeClient creates a new generative service client based on gRPC. @@ -373,6 +374,7 @@ func NewGenerativeClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generativeClient: generativelanguagepb.NewGenerativeServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -420,6 +422,8 @@ type generativeRESTClient struct { // Points back to the CallOptions field of the containing GenerativeClient CallOptions **GenerativeCallOptions + + logger *slog.Logger } // NewGenerativeRESTClient creates a new generative service rest client. @@ -438,6 +442,7 @@ func NewGenerativeRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -490,7 +495,7 @@ func (c *generativeGRPCClient) GenerateContent(ctx context.Context, req *generat var resp *generativelanguagepb.GenerateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.GenerateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.GenerateContent, req, settings.GRPC, c.logger, "GenerateContent") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *generativeGRPCClient) GenerateAnswer(ctx context.Context, req *generati var resp *generativelanguagepb.GenerateAnswerResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.GenerateAnswer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.GenerateAnswer, req, settings.GRPC, c.logger, "GenerateAnswer") return err }, opts...) if err != nil { @@ -526,7 +531,9 @@ func (c *generativeGRPCClient) StreamGenerateContent(ctx context.Context, req *g var resp generativelanguagepb.GenerativeService_StreamGenerateContentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateContent") resp, err = c.generativeClient.StreamGenerateContent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateContent") return err }, opts...) if err != nil { @@ -544,7 +551,7 @@ func (c *generativeGRPCClient) EmbedContent(ctx context.Context, req *generative var resp *generativelanguagepb.EmbedContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.EmbedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.EmbedContent, req, settings.GRPC, c.logger, "EmbedContent") return err }, opts...) if err != nil { @@ -562,7 +569,7 @@ func (c *generativeGRPCClient) BatchEmbedContents(ctx context.Context, req *gene var resp *generativelanguagepb.BatchEmbedContentsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.BatchEmbedContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.BatchEmbedContents, req, settings.GRPC, c.logger, "BatchEmbedContents") return err }, opts...) if err != nil { @@ -580,7 +587,7 @@ func (c *generativeGRPCClient) CountTokens(ctx context.Context, req *generativel var resp *generativelanguagepb.CountTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeClient.CountTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeClient.CountTokens, req, settings.GRPC, c.logger, "CountTokens") return err }, opts...) if err != nil { @@ -598,7 +605,7 @@ func (c *generativeGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -627,7 +634,7 @@ func (c *generativeGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -698,17 +705,7 @@ func (c *generativeRESTClient) GenerateContent(ctx context.Context, req *generat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateContent") if err != nil { return err } @@ -765,17 +762,7 @@ func (c *generativeRESTClient) GenerateAnswer(ctx context.Context, req *generati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateAnswer") if err != nil { return err } @@ -831,15 +818,11 @@ func (c *generativeRESTClient) StreamGenerateContent(ctx context.Context, req *g httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamGenerateContent") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamGenerateContentRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -941,17 +924,7 @@ func (c *generativeRESTClient) EmbedContent(ctx context.Context, req *generative httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EmbedContent") if err != nil { return err } @@ -1009,17 +982,7 @@ func (c *generativeRESTClient) BatchEmbedContents(ctx context.Context, req *gene httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchEmbedContents") if err != nil { return err } @@ -1077,17 +1040,7 @@ func (c *generativeRESTClient) CountTokens(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountTokens") if err != nil { return err } @@ -1137,17 +1090,7 @@ func (c *generativeRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1212,21 +1155,10 @@ func (c *generativeRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/generative_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/generative_client_example_go123_test.go index 241c7f92b3d6..678da0b57033 100644 --- a/ai/generativelanguage/apiv1beta/generative_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/generative_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGenerativeClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/cache_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/cache_service.pb.go index bb54acb4f270..0758f5fae4be 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/cache_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/cache_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/cache_service.proto @@ -63,11 +63,9 @@ type ListCachedContentsRequest struct { func (x *ListCachedContentsRequest) Reset() { *x = ListCachedContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCachedContentsRequest) String() string { @@ -78,7 +76,7 @@ func (*ListCachedContentsRequest) ProtoMessage() {} func (x *ListCachedContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type ListCachedContentsResponse struct { func (x *ListCachedContentsResponse) Reset() { *x = ListCachedContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCachedContentsResponse) String() string { @@ -137,7 +133,7 @@ func (*ListCachedContentsResponse) ProtoMessage() {} func (x *ListCachedContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type CreateCachedContentRequest struct { func (x *CreateCachedContentRequest) Reset() { *x = CreateCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCachedContentRequest) String() string { @@ -193,7 +187,7 @@ func (*CreateCachedContentRequest) ProtoMessage() {} func (x *CreateCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +222,9 @@ type GetCachedContentRequest struct { func (x *GetCachedContentRequest) Reset() { *x = GetCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCachedContentRequest) String() string { @@ -243,7 +235,7 @@ func (*GetCachedContentRequest) ProtoMessage() {} func (x *GetCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +271,9 @@ type UpdateCachedContentRequest struct { func (x *UpdateCachedContentRequest) Reset() { *x = UpdateCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCachedContentRequest) String() string { @@ -294,7 +284,7 @@ func (*UpdateCachedContentRequest) ProtoMessage() {} func (x *UpdateCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +326,9 @@ type DeleteCachedContentRequest struct { func (x *DeleteCachedContentRequest) Reset() { *x = DeleteCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCachedContentRequest) String() string { @@ -351,7 +339,7 @@ func (*DeleteCachedContentRequest) ProtoMessage() {} func (x *DeleteCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,80 +563,6 @@ func file_google_ai_generativelanguage_v1beta_cache_service_proto_init() { return } file_google_ai_generativelanguage_v1beta_cached_content_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCachedContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCachedContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cache_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/cached_content.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/cached_content.pb.go index dad39323b1fe..70b78ad6d135 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/cached_content.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/cached_content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/cached_content.proto @@ -84,11 +84,9 @@ type CachedContent struct { func (x *CachedContent) Reset() { *x = CachedContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CachedContent) String() string { @@ -99,7 +97,7 @@ func (*CachedContent) ProtoMessage() {} func (x *CachedContent) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +235,9 @@ type CachedContent_UsageMetadata struct { func (x *CachedContent_UsageMetadata) Reset() { *x = CachedContent_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CachedContent_UsageMetadata) String() string { @@ -252,7 +248,7 @@ func (*CachedContent_UsageMetadata) ProtoMessage() {} func (x *CachedContent_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,32 +420,6 @@ func file_google_ai_generativelanguage_v1beta_cached_content_proto_init() { return } file_google_ai_generativelanguage_v1beta_content_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CachedContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CachedContent_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_cached_content_proto_msgTypes[0].OneofWrappers = []any{ (*CachedContent_ExpireTime)(nil), (*CachedContent_Ttl)(nil), diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/citation.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/citation.pb.go index 162452f70c5c..1ae6f0d1abf4 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/citation.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/citation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/citation.proto @@ -48,11 +48,9 @@ type CitationMetadata struct { func (x *CitationMetadata) Reset() { *x = CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationMetadata) String() string { @@ -63,7 +61,7 @@ func (*CitationMetadata) ProtoMessage() {} func (x *CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type CitationSource struct { func (x *CitationSource) Reset() { *x = CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationSource) String() string { @@ -124,7 +120,7 @@ func (*CitationSource) ProtoMessage() {} func (x *CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,32 +238,6 @@ func file_google_ai_generativelanguage_v1beta_citation_proto_init() { if File_google_ai_generativelanguage_v1beta_citation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_citation_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/content.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/content.pb.go index 2dd101f4ce35..e60668e02211 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/content.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/content.proto @@ -349,11 +349,9 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content) String() string { @@ -364,7 +362,7 @@ func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +417,9 @@ type Part struct { func (x *Part) Reset() { *x = Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Part) String() string { @@ -434,7 +430,7 @@ func (*Part) ProtoMessage() {} func (x *Part) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +582,9 @@ type Blob struct { func (x *Blob) Reset() { *x = Blob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Blob) String() string { @@ -601,7 +595,7 @@ func (*Blob) ProtoMessage() {} func (x *Blob) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +638,9 @@ type FileData struct { func (x *FileData) Reset() { *x = FileData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileData) String() string { @@ -659,7 +651,7 @@ func (*FileData) ProtoMessage() {} func (x *FileData) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +699,9 @@ type ExecutableCode struct { func (x *ExecutableCode) Reset() { *x = ExecutableCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutableCode) String() string { @@ -722,7 +712,7 @@ func (*ExecutableCode) ProtoMessage() {} func (x *ExecutableCode) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +759,9 @@ type CodeExecutionResult struct { func (x *CodeExecutionResult) Reset() { *x = CodeExecutionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CodeExecutionResult) String() string { @@ -784,7 +772,7 @@ func (*CodeExecutionResult) ProtoMessage() {} func (x *CodeExecutionResult) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +833,9 @@ type Tool struct { func (x *Tool) Reset() { *x = Tool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool) String() string { @@ -860,7 +846,7 @@ func (*Tool) ProtoMessage() {} func (x *Tool) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +894,9 @@ type GoogleSearchRetrieval struct { func (x *GoogleSearchRetrieval) Reset() { *x = GoogleSearchRetrieval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleSearchRetrieval) String() string { @@ -923,7 +907,7 @@ func (*GoogleSearchRetrieval) ProtoMessage() {} func (x *GoogleSearchRetrieval) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +944,9 @@ type DynamicRetrievalConfig struct { func (x *DynamicRetrievalConfig) Reset() { *x = DynamicRetrievalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DynamicRetrievalConfig) String() string { @@ -975,7 +957,7 @@ func (*DynamicRetrievalConfig) ProtoMessage() {} func (x *DynamicRetrievalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +999,9 @@ type CodeExecution struct { func (x *CodeExecution) Reset() { *x = CodeExecution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CodeExecution) String() string { @@ -1032,7 +1012,7 @@ func (*CodeExecution) ProtoMessage() {} func (x *CodeExecution) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1040,9 @@ type ToolConfig struct { func (x *ToolConfig) Reset() { *x = ToolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolConfig) String() string { @@ -1075,7 +1053,7 @@ func (*ToolConfig) ProtoMessage() {} func (x *ToolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1117,11 +1095,9 @@ type FunctionCallingConfig struct { func (x *FunctionCallingConfig) Reset() { *x = FunctionCallingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCallingConfig) String() string { @@ -1132,7 +1108,7 @@ func (*FunctionCallingConfig) ProtoMessage() {} func (x *FunctionCallingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1162,9 @@ type FunctionDeclaration struct { func (x *FunctionDeclaration) Reset() { *x = FunctionDeclaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionDeclaration) String() string { @@ -1201,7 +1175,7 @@ func (*FunctionDeclaration) ProtoMessage() {} func (x *FunctionDeclaration) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1229,9 @@ type FunctionCall struct { func (x *FunctionCall) Reset() { *x = FunctionCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCall) String() string { @@ -1270,7 +1242,7 @@ func (*FunctionCall) ProtoMessage() {} func (x *FunctionCall) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1291,9 @@ type FunctionResponse struct { func (x *FunctionResponse) Reset() { *x = FunctionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionResponse) String() string { @@ -1334,7 +1304,7 @@ func (*FunctionResponse) ProtoMessage() {} func (x *FunctionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1374,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -1419,7 +1387,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1487,9 @@ type GroundingPassage struct { func (x *GroundingPassage) Reset() { *x = GroundingPassage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingPassage) String() string { @@ -1534,7 +1500,7 @@ func (*GroundingPassage) ProtoMessage() {} func (x *GroundingPassage) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1575,11 +1541,9 @@ type GroundingPassages struct { func (x *GroundingPassages) Reset() { *x = GroundingPassages{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingPassages) String() string { @@ -1590,7 +1554,7 @@ func (*GroundingPassages) ProtoMessage() {} func (x *GroundingPassages) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1947,224 +1911,6 @@ func file_google_ai_generativelanguage_v1beta_content_proto_init() { if File_google_ai_generativelanguage_v1beta_content_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Blob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FileData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExecutableCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CodeExecutionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Tool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GoogleSearchRetrieval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DynamicRetrievalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CodeExecution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ToolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCallingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FunctionDeclaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FunctionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GroundingPassage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GroundingPassages); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_content_proto_msgTypes[1].OneofWrappers = []any{ (*Part_Text)(nil), (*Part_InlineData)(nil), diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/discuss_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/discuss_service.pb.go index 84c6b66fdfca..8cafc6b2247b 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/discuss_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/discuss_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/discuss_service.proto @@ -86,11 +86,9 @@ type GenerateMessageRequest struct { func (x *GenerateMessageRequest) Reset() { *x = GenerateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateMessageRequest) String() string { @@ -101,7 +99,7 @@ func (*GenerateMessageRequest) ProtoMessage() {} func (x *GenerateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +180,9 @@ type GenerateMessageResponse struct { func (x *GenerateMessageResponse) Reset() { *x = GenerateMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateMessageResponse) String() string { @@ -197,7 +193,7 @@ func (*GenerateMessageResponse) ProtoMessage() {} func (x *GenerateMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +261,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -280,7 +274,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +360,9 @@ type MessagePrompt struct { func (x *MessagePrompt) Reset() { *x = MessagePrompt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessagePrompt) String() string { @@ -381,7 +373,7 @@ func (*MessagePrompt) ProtoMessage() {} func (x *MessagePrompt) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -448,7 +438,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type CountMessageTokensRequest struct { func (x *CountMessageTokensRequest) Reset() { *x = CountMessageTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountMessageTokensRequest) String() string { @@ -514,7 +502,7 @@ func (*CountMessageTokensRequest) ProtoMessage() {} func (x *CountMessageTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +547,9 @@ type CountMessageTokensResponse struct { func (x *CountMessageTokensResponse) Reset() { *x = CountMessageTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountMessageTokensResponse) String() string { @@ -574,7 +560,7 @@ func (*CountMessageTokensResponse) ProtoMessage() {} func (x *CountMessageTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,92 +795,6 @@ func file_google_ai_generativelanguage_v1beta_discuss_service_proto_init() { } file_google_ai_generativelanguage_v1beta_citation_proto_init() file_google_ai_generativelanguage_v1beta_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MessagePrompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CountMessageTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CountMessageTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta_discuss_service_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/file.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/file.pb.go index ba17fdfd8255..4e113089105b 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/file.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/file.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/file.proto @@ -141,11 +141,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -156,7 +154,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +283,9 @@ type VideoMetadata struct { func (x *VideoMetadata) Reset() { *x = VideoMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoMetadata) String() string { @@ -300,7 +296,7 @@ func (*VideoMetadata) ProtoMessage() {} func (x *VideoMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,32 +445,6 @@ func file_google_ai_generativelanguage_v1beta_file_proto_init() { if File_google_ai_generativelanguage_v1beta_file_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_file_proto_msgTypes[0].OneofWrappers = []any{ (*File_VideoMetadata)(nil), } diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/file_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/file_service.pb.go index 1e21b901ef80..259c8b7480a1 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/file_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/file_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/file_service.proto @@ -53,11 +53,9 @@ type CreateFileRequest struct { func (x *CreateFileRequest) Reset() { *x = CreateFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFileRequest) String() string { @@ -68,7 +66,7 @@ func (*CreateFileRequest) ProtoMessage() {} func (x *CreateFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type CreateFileResponse struct { func (x *CreateFileResponse) Reset() { *x = CreateFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFileResponse) String() string { @@ -117,7 +113,7 @@ func (*CreateFileResponse) ProtoMessage() {} func (x *CreateFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +150,9 @@ type ListFilesRequest struct { func (x *ListFilesRequest) Reset() { *x = ListFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesRequest) String() string { @@ -169,7 +163,7 @@ func (*ListFilesRequest) ProtoMessage() {} func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type ListFilesResponse struct { func (x *ListFilesResponse) Reset() { *x = ListFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesResponse) String() string { @@ -228,7 +220,7 @@ func (*ListFilesResponse) ProtoMessage() {} func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +262,9 @@ type GetFileRequest struct { func (x *GetFileRequest) Reset() { *x = GetFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFileRequest) String() string { @@ -285,7 +275,7 @@ func (*GetFileRequest) ProtoMessage() {} func (x *GetFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +310,9 @@ type DeleteFileRequest struct { func (x *DeleteFileRequest) Reset() { *x = DeleteFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFileRequest) String() string { @@ -335,7 +323,7 @@ func (*DeleteFileRequest) ProtoMessage() {} func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,80 +502,6 @@ func file_google_ai_generativelanguage_v1beta_file_service_proto_init() { return } file_google_ai_generativelanguage_v1beta_file_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_file_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/generative_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/generative_service.pb.go index 784ef16c9882..409b9a5b766d 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/generative_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/generative_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/generative_service.proto @@ -440,11 +440,9 @@ type GenerateContentRequest struct { func (x *GenerateContentRequest) Reset() { *x = GenerateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentRequest) String() string { @@ -455,7 +453,7 @@ func (*GenerateContentRequest) ProtoMessage() {} func (x *GenerateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +640,9 @@ type GenerationConfig struct { func (x *GenerationConfig) Reset() { *x = GenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig) String() string { @@ -657,7 +653,7 @@ func (*GenerationConfig) ProtoMessage() {} func (x *GenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +776,9 @@ type SemanticRetrieverConfig struct { func (x *SemanticRetrieverConfig) Reset() { *x = SemanticRetrieverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SemanticRetrieverConfig) String() string { @@ -795,7 +789,7 @@ func (*SemanticRetrieverConfig) ProtoMessage() {} func (x *SemanticRetrieverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -872,11 +866,9 @@ type GenerateContentResponse struct { func (x *GenerateContentResponse) Reset() { *x = GenerateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse) String() string { @@ -887,7 +879,7 @@ func (*GenerateContentResponse) ProtoMessage() {} func (x *GenerateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -973,11 +965,9 @@ type Candidate struct { func (x *Candidate) Reset() { *x = Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Candidate) String() string { @@ -988,7 +978,7 @@ func (*Candidate) ProtoMessage() {} func (x *Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1078,9 @@ type LogprobsResult struct { func (x *LogprobsResult) Reset() { *x = LogprobsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult) String() string { @@ -1103,7 +1091,7 @@ func (*LogprobsResult) ProtoMessage() {} func (x *LogprobsResult) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,11 +1135,9 @@ type AttributionSourceId struct { func (x *AttributionSourceId) Reset() { *x = AttributionSourceId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSourceId) String() string { @@ -1162,7 +1148,7 @@ func (*AttributionSourceId) ProtoMessage() {} func (x *AttributionSourceId) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1230,11 +1216,9 @@ type GroundingAttribution struct { func (x *GroundingAttribution) Reset() { *x = GroundingAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingAttribution) String() string { @@ -1245,7 +1229,7 @@ func (*GroundingAttribution) ProtoMessage() {} func (x *GroundingAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1274,9 @@ type RetrievalMetadata struct { func (x *RetrievalMetadata) Reset() { *x = RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrievalMetadata) String() string { @@ -1305,7 +1287,7 @@ func (*RetrievalMetadata) ProtoMessage() {} func (x *RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1329,9 @@ type GroundingMetadata struct { func (x *GroundingMetadata) Reset() { *x = GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingMetadata) String() string { @@ -1362,7 +1342,7 @@ func (*GroundingMetadata) ProtoMessage() {} func (x *GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1428,11 +1408,9 @@ type SearchEntryPoint struct { func (x *SearchEntryPoint) Reset() { *x = SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntryPoint) String() string { @@ -1443,7 +1421,7 @@ func (*SearchEntryPoint) ProtoMessage() {} func (x *SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1488,11 +1466,9 @@ type GroundingChunk struct { func (x *GroundingChunk) Reset() { *x = GroundingChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk) String() string { @@ -1503,7 +1479,7 @@ func (*GroundingChunk) ProtoMessage() {} func (x *GroundingChunk) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,11 +1539,9 @@ type Segment struct { func (x *Segment) Reset() { *x = Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Segment) String() string { @@ -1578,7 +1552,7 @@ func (*Segment) ProtoMessage() {} func (x *Segment) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1642,11 +1616,9 @@ type GroundingSupport struct { func (x *GroundingSupport) Reset() { *x = GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingSupport) String() string { @@ -1657,7 +1629,7 @@ func (*GroundingSupport) ProtoMessage() {} func (x *GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1751,11 +1723,9 @@ type GenerateAnswerRequest struct { func (x *GenerateAnswerRequest) Reset() { *x = GenerateAnswerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAnswerRequest) String() string { @@ -1766,7 +1736,7 @@ func (*GenerateAnswerRequest) ProtoMessage() {} func (x *GenerateAnswerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1898,11 +1868,9 @@ type GenerateAnswerResponse struct { func (x *GenerateAnswerResponse) Reset() { *x = GenerateAnswerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAnswerResponse) String() string { @@ -1913,7 +1881,7 @@ func (*GenerateAnswerResponse) ProtoMessage() {} func (x *GenerateAnswerResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1983,11 +1951,9 @@ type EmbedContentRequest struct { func (x *EmbedContentRequest) Reset() { *x = EmbedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedContentRequest) String() string { @@ -1998,7 +1964,7 @@ func (*EmbedContentRequest) ProtoMessage() {} func (x *EmbedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +2026,9 @@ type ContentEmbedding struct { func (x *ContentEmbedding) Reset() { *x = ContentEmbedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentEmbedding) String() string { @@ -2075,7 +2039,7 @@ func (*ContentEmbedding) ProtoMessage() {} func (x *ContentEmbedding) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,11 +2073,9 @@ type EmbedContentResponse struct { func (x *EmbedContentResponse) Reset() { *x = EmbedContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedContentResponse) String() string { @@ -2124,7 +2086,7 @@ func (*EmbedContentResponse) ProtoMessage() {} func (x *EmbedContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2166,11 +2128,9 @@ type BatchEmbedContentsRequest struct { func (x *BatchEmbedContentsRequest) Reset() { *x = BatchEmbedContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedContentsRequest) String() string { @@ -2181,7 +2141,7 @@ func (*BatchEmbedContentsRequest) ProtoMessage() {} func (x *BatchEmbedContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,11 +2183,9 @@ type BatchEmbedContentsResponse struct { func (x *BatchEmbedContentsResponse) Reset() { *x = BatchEmbedContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedContentsResponse) String() string { @@ -2238,7 +2196,7 @@ func (*BatchEmbedContentsResponse) ProtoMessage() {} func (x *BatchEmbedContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2292,11 +2250,9 @@ type CountTokensRequest struct { func (x *CountTokensRequest) Reset() { *x = CountTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensRequest) String() string { @@ -2307,7 +2263,7 @@ func (*CountTokensRequest) ProtoMessage() {} func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2360,11 +2316,9 @@ type CountTokensResponse struct { func (x *CountTokensResponse) Reset() { *x = CountTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensResponse) String() string { @@ -2375,7 +2329,7 @@ func (*CountTokensResponse) ProtoMessage() {} func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2421,11 +2375,9 @@ type GenerateContentResponse_PromptFeedback struct { func (x *GenerateContentResponse_PromptFeedback) Reset() { *x = GenerateContentResponse_PromptFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_PromptFeedback) String() string { @@ -2436,7 +2388,7 @@ func (*GenerateContentResponse_PromptFeedback) ProtoMessage() {} func (x *GenerateContentResponse_PromptFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2486,11 +2438,9 @@ type GenerateContentResponse_UsageMetadata struct { func (x *GenerateContentResponse_UsageMetadata) Reset() { *x = GenerateContentResponse_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_UsageMetadata) String() string { @@ -2501,7 +2451,7 @@ func (*GenerateContentResponse_UsageMetadata) ProtoMessage() {} func (x *GenerateContentResponse_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2560,11 +2510,9 @@ type LogprobsResult_Candidate struct { func (x *LogprobsResult_Candidate) Reset() { *x = LogprobsResult_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_Candidate) String() string { @@ -2575,7 +2523,7 @@ func (*LogprobsResult_Candidate) ProtoMessage() {} func (x *LogprobsResult_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2623,11 +2571,9 @@ type LogprobsResult_TopCandidates struct { func (x *LogprobsResult_TopCandidates) Reset() { *x = LogprobsResult_TopCandidates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_TopCandidates) String() string { @@ -2638,7 +2584,7 @@ func (*LogprobsResult_TopCandidates) ProtoMessage() {} func (x *LogprobsResult_TopCandidates) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2676,11 +2622,9 @@ type AttributionSourceId_GroundingPassageId struct { func (x *AttributionSourceId_GroundingPassageId) Reset() { *x = AttributionSourceId_GroundingPassageId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSourceId_GroundingPassageId) String() string { @@ -2691,7 +2635,7 @@ func (*AttributionSourceId_GroundingPassageId) ProtoMessage() {} func (x *AttributionSourceId_GroundingPassageId) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2738,11 +2682,9 @@ type AttributionSourceId_SemanticRetrieverChunk struct { func (x *AttributionSourceId_SemanticRetrieverChunk) Reset() { *x = AttributionSourceId_SemanticRetrieverChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSourceId_SemanticRetrieverChunk) String() string { @@ -2753,7 +2695,7 @@ func (*AttributionSourceId_SemanticRetrieverChunk) ProtoMessage() {} func (x *AttributionSourceId_SemanticRetrieverChunk) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2796,11 +2738,9 @@ type GroundingChunk_Web struct { func (x *GroundingChunk_Web) Reset() { *x = GroundingChunk_Web{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_Web) String() string { @@ -2811,7 +2751,7 @@ func (*GroundingChunk_Web) ProtoMessage() {} func (x *GroundingChunk_Web) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2857,11 +2797,9 @@ type GenerateAnswerResponse_InputFeedback struct { func (x *GenerateAnswerResponse_InputFeedback) Reset() { *x = GenerateAnswerResponse_InputFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAnswerResponse_InputFeedback) String() string { @@ -2872,7 +2810,7 @@ func (*GenerateAnswerResponse_InputFeedback) ProtoMessage() {} func (x *GenerateAnswerResponse_InputFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3760,380 +3698,6 @@ func file_google_ai_generativelanguage_v1beta_generative_service_proto_init() { file_google_ai_generativelanguage_v1beta_content_proto_init() file_google_ai_generativelanguage_v1beta_retriever_proto_init() file_google_ai_generativelanguage_v1beta_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SemanticRetrieverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSourceId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GroundingAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAnswerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAnswerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*EmbedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ContentEmbedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*EmbedContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_PromptFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_TopCandidates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSourceId_GroundingPassageId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSourceId_SemanticRetrieverChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_Web); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAnswerResponse_InputFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[1].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta_generative_service_proto_msgTypes[2].OneofWrappers = []any{} diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/model.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/model.pb.go index b156a14b56aa..f4d73463fa0f 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/model.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/model.proto @@ -110,11 +110,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -125,7 +123,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,20 +312,6 @@ func file_google_ai_generativelanguage_v1beta_model_proto_init() { if File_google_ai_generativelanguage_v1beta_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_model_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/model_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/model_service.pb.go index cd1c2a9b40a0..5ce5f5096d50 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/model_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/model_service.proto @@ -59,11 +59,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -74,7 +72,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -135,7 +131,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +176,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -195,7 +189,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +232,9 @@ type GetTunedModelRequest struct { func (x *GetTunedModelRequest) Reset() { *x = GetTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTunedModelRequest) String() string { @@ -253,7 +245,7 @@ func (*GetTunedModelRequest) ProtoMessage() {} func (x *GetTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +308,9 @@ type ListTunedModelsRequest struct { func (x *ListTunedModelsRequest) Reset() { *x = ListTunedModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTunedModelsRequest) String() string { @@ -331,7 +321,7 @@ func (*ListTunedModelsRequest) ProtoMessage() {} func (x *ListTunedModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +373,9 @@ type ListTunedModelsResponse struct { func (x *ListTunedModelsResponse) Reset() { *x = ListTunedModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTunedModelsResponse) String() string { @@ -398,7 +386,7 @@ func (*ListTunedModelsResponse) ProtoMessage() {} func (x *ListTunedModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +432,9 @@ type CreateTunedModelRequest struct { func (x *CreateTunedModelRequest) Reset() { *x = CreateTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTunedModelRequest) String() string { @@ -459,7 +445,7 @@ func (*CreateTunedModelRequest) ProtoMessage() {} func (x *CreateTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +495,9 @@ type CreateTunedModelMetadata struct { func (x *CreateTunedModelMetadata) Reset() { *x = CreateTunedModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTunedModelMetadata) String() string { @@ -524,7 +508,7 @@ func (*CreateTunedModelMetadata) ProtoMessage() {} func (x *CreateTunedModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +572,9 @@ type UpdateTunedModelRequest struct { func (x *UpdateTunedModelRequest) Reset() { *x = UpdateTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTunedModelRequest) String() string { @@ -603,7 +585,7 @@ func (*UpdateTunedModelRequest) ProtoMessage() {} func (x *UpdateTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +627,9 @@ type DeleteTunedModelRequest struct { func (x *DeleteTunedModelRequest) Reset() { *x = DeleteTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTunedModelRequest) String() string { @@ -660,7 +640,7 @@ func (*DeleteTunedModelRequest) ProtoMessage() {} func (x *DeleteTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,128 +946,6 @@ func file_google_ai_generativelanguage_v1beta_model_service_proto_init() { } file_google_ai_generativelanguage_v1beta_model_proto_init() file_google_ai_generativelanguage_v1beta_tuned_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTunedModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTunedModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateTunedModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_model_service_proto_msgTypes[6].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/permission.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/permission.pb.go index c555b5e9436f..758f85b15b5d 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/permission.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/permission.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/permission.proto @@ -190,11 +190,9 @@ type Permission struct { func (x *Permission) Reset() { *x = Permission{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Permission) String() string { @@ -205,7 +203,7 @@ func (*Permission) ProtoMessage() {} func (x *Permission) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,20 +346,6 @@ func file_google_ai_generativelanguage_v1beta_permission_proto_init() { if File_google_ai_generativelanguage_v1beta_permission_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_permission_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Permission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_permission_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/permission_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/permission_service.pb.go index 84f398a69319..8c40430e92f6 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/permission_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/permission_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/permission_service.proto @@ -60,11 +60,9 @@ type CreatePermissionRequest struct { func (x *CreatePermissionRequest) Reset() { *x = CreatePermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePermissionRequest) String() string { @@ -75,7 +73,7 @@ func (*CreatePermissionRequest) ProtoMessage() {} func (x *CreatePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,11 +119,9 @@ type GetPermissionRequest struct { func (x *GetPermissionRequest) Reset() { *x = GetPermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPermissionRequest) String() string { @@ -136,7 +132,7 @@ func (*GetPermissionRequest) ProtoMessage() {} func (x *GetPermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +185,9 @@ type ListPermissionsRequest struct { func (x *ListPermissionsRequest) Reset() { *x = ListPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPermissionsRequest) String() string { @@ -204,7 +198,7 @@ func (*ListPermissionsRequest) ProtoMessage() {} func (x *ListPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +251,9 @@ type ListPermissionsResponse struct { func (x *ListPermissionsResponse) Reset() { *x = ListPermissionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPermissionsResponse) String() string { @@ -272,7 +264,7 @@ func (*ListPermissionsResponse) ProtoMessage() {} func (x *ListPermissionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +310,9 @@ type UpdatePermissionRequest struct { func (x *UpdatePermissionRequest) Reset() { *x = UpdatePermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePermissionRequest) String() string { @@ -333,7 +323,7 @@ func (*UpdatePermissionRequest) ProtoMessage() {} func (x *UpdatePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +368,9 @@ type DeletePermissionRequest struct { func (x *DeletePermissionRequest) Reset() { *x = DeletePermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePermissionRequest) String() string { @@ -393,7 +381,7 @@ func (*DeletePermissionRequest) ProtoMessage() {} func (x *DeletePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +420,9 @@ type TransferOwnershipRequest struct { func (x *TransferOwnershipRequest) Reset() { *x = TransferOwnershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOwnershipRequest) String() string { @@ -447,7 +433,7 @@ func (*TransferOwnershipRequest) ProtoMessage() {} func (x *TransferOwnershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +471,9 @@ type TransferOwnershipResponse struct { func (x *TransferOwnershipResponse) Reset() { *x = TransferOwnershipResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOwnershipResponse) String() string { @@ -500,7 +484,7 @@ func (*TransferOwnershipResponse) ProtoMessage() {} func (x *TransferOwnershipResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,104 +751,6 @@ func file_google_ai_generativelanguage_v1beta_permission_service_proto_init() { return } file_google_ai_generativelanguage_v1beta_permission_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPermissionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeletePermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransferOwnershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_permission_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransferOwnershipResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/prediction_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/prediction_service.pb.go index b4a94dbbbe9e..a13c9e322a1a 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/prediction_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/prediction_service.proto @@ -59,11 +59,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -74,7 +72,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -137,7 +133,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,32 +256,6 @@ func file_google_ai_generativelanguage_v1beta_prediction_service_proto_init() { if File_google_ai_generativelanguage_v1beta_prediction_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever.pb.go index eb39d8f681df..3c97120329e9 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/retriever.proto @@ -200,11 +200,9 @@ type Corpus struct { func (x *Corpus) Reset() { *x = Corpus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Corpus) String() string { @@ -215,7 +213,7 @@ func (*Corpus) ProtoMessage() {} func (x *Corpus) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +285,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -302,7 +298,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +360,9 @@ type StringList struct { func (x *StringList) Reset() { *x = StringList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringList) String() string { @@ -379,7 +373,7 @@ func (*StringList) ProtoMessage() {} func (x *StringList) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +413,9 @@ type CustomMetadata struct { func (x *CustomMetadata) Reset() { *x = CustomMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomMetadata) String() string { @@ -434,7 +426,7 @@ func (*CustomMetadata) ProtoMessage() {} func (x *CustomMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +522,9 @@ type MetadataFilter struct { func (x *MetadataFilter) Reset() { *x = MetadataFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataFilter) String() string { @@ -545,7 +535,7 @@ func (*MetadataFilter) ProtoMessage() {} func (x *MetadataFilter) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +589,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -614,7 +602,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +694,9 @@ type Chunk struct { func (x *Chunk) Reset() { *x = Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk) String() string { @@ -721,7 +707,7 @@ func (*Chunk) ProtoMessage() {} func (x *Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +778,9 @@ type ChunkData struct { func (x *ChunkData) Reset() { *x = ChunkData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChunkData) String() string { @@ -807,7 +791,7 @@ func (*ChunkData) ProtoMessage() {} func (x *ChunkData) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,104 +1045,6 @@ func file_google_ai_generativelanguage_v1beta_retriever_proto_init() { if File_google_ai_generativelanguage_v1beta_retriever_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Corpus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StringList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MetadataFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ChunkData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_retriever_proto_msgTypes[3].OneofWrappers = []any{ (*CustomMetadata_StringValue)(nil), (*CustomMetadata_StringListValue)(nil), diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever_service.pb.go index cf2942782491..207eaf65cb5e 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/retriever_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/retriever_service.proto @@ -54,11 +54,9 @@ type CreateCorpusRequest struct { func (x *CreateCorpusRequest) Reset() { *x = CreateCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCorpusRequest) String() string { @@ -69,7 +67,7 @@ func (*CreateCorpusRequest) ProtoMessage() {} func (x *CreateCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104,11 +102,9 @@ type GetCorpusRequest struct { func (x *GetCorpusRequest) Reset() { *x = GetCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCorpusRequest) String() string { @@ -119,7 +115,7 @@ func (*GetCorpusRequest) ProtoMessage() {} func (x *GetCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +152,9 @@ type UpdateCorpusRequest struct { func (x *UpdateCorpusRequest) Reset() { *x = UpdateCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCorpusRequest) String() string { @@ -171,7 +165,7 @@ func (*UpdateCorpusRequest) ProtoMessage() {} func (x *UpdateCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +213,9 @@ type DeleteCorpusRequest struct { func (x *DeleteCorpusRequest) Reset() { *x = DeleteCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCorpusRequest) String() string { @@ -234,7 +226,7 @@ func (*DeleteCorpusRequest) ProtoMessage() {} func (x *DeleteCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +279,9 @@ type ListCorporaRequest struct { func (x *ListCorporaRequest) Reset() { *x = ListCorporaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCorporaRequest) String() string { @@ -302,7 +292,7 @@ func (*ListCorporaRequest) ProtoMessage() {} func (x *ListCorporaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +337,9 @@ type ListCorporaResponse struct { func (x *ListCorporaResponse) Reset() { *x = ListCorporaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCorporaResponse) String() string { @@ -362,7 +350,7 @@ func (*ListCorporaResponse) ProtoMessage() {} func (x *ListCorporaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type QueryCorpusRequest struct { func (x *QueryCorpusRequest) Reset() { *x = QueryCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCorpusRequest) String() string { @@ -461,7 +447,7 @@ func (*QueryCorpusRequest) ProtoMessage() {} func (x *QueryCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +502,9 @@ type QueryCorpusResponse struct { func (x *QueryCorpusResponse) Reset() { *x = QueryCorpusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCorpusResponse) String() string { @@ -531,7 +515,7 @@ func (*QueryCorpusResponse) ProtoMessage() {} func (x *QueryCorpusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +551,9 @@ type RelevantChunk struct { func (x *RelevantChunk) Reset() { *x = RelevantChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelevantChunk) String() string { @@ -582,7 +564,7 @@ func (*RelevantChunk) ProtoMessage() {} func (x *RelevantChunk) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +608,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -641,7 +621,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +663,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -698,7 +676,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +714,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -751,7 +727,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +775,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -814,7 +788,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +844,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -885,7 +857,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +909,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -952,7 +922,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1006,9 @@ type QueryDocumentRequest struct { func (x *QueryDocumentRequest) Reset() { *x = QueryDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDocumentRequest) String() string { @@ -1051,7 +1019,7 @@ func (*QueryDocumentRequest) ProtoMessage() {} func (x *QueryDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,11 +1074,9 @@ type QueryDocumentResponse struct { func (x *QueryDocumentResponse) Reset() { *x = QueryDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDocumentResponse) String() string { @@ -1121,7 +1087,7 @@ func (*QueryDocumentResponse) ProtoMessage() {} func (x *QueryDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1124,9 @@ type CreateChunkRequest struct { func (x *CreateChunkRequest) Reset() { *x = CreateChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChunkRequest) String() string { @@ -1173,7 +1137,7 @@ func (*CreateChunkRequest) ProtoMessage() {} func (x *CreateChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,11 +1183,9 @@ type BatchCreateChunksRequest struct { func (x *BatchCreateChunksRequest) Reset() { *x = BatchCreateChunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateChunksRequest) String() string { @@ -1234,7 +1196,7 @@ func (*BatchCreateChunksRequest) ProtoMessage() {} func (x *BatchCreateChunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1275,11 +1237,9 @@ type BatchCreateChunksResponse struct { func (x *BatchCreateChunksResponse) Reset() { *x = BatchCreateChunksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateChunksResponse) String() string { @@ -1290,7 +1250,7 @@ func (*BatchCreateChunksResponse) ProtoMessage() {} func (x *BatchCreateChunksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1325,11 +1285,9 @@ type GetChunkRequest struct { func (x *GetChunkRequest) Reset() { *x = GetChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChunkRequest) String() string { @@ -1340,7 +1298,7 @@ func (*GetChunkRequest) ProtoMessage() {} func (x *GetChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1335,9 @@ type UpdateChunkRequest struct { func (x *UpdateChunkRequest) Reset() { *x = UpdateChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChunkRequest) String() string { @@ -1392,7 +1348,7 @@ func (*UpdateChunkRequest) ProtoMessage() {} func (x *UpdateChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1438,11 +1394,9 @@ type BatchUpdateChunksRequest struct { func (x *BatchUpdateChunksRequest) Reset() { *x = BatchUpdateChunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateChunksRequest) String() string { @@ -1453,7 +1407,7 @@ func (*BatchUpdateChunksRequest) ProtoMessage() {} func (x *BatchUpdateChunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1448,9 @@ type BatchUpdateChunksResponse struct { func (x *BatchUpdateChunksResponse) Reset() { *x = BatchUpdateChunksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateChunksResponse) String() string { @@ -1509,7 +1461,7 @@ func (*BatchUpdateChunksResponse) ProtoMessage() {} func (x *BatchUpdateChunksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1544,11 +1496,9 @@ type DeleteChunkRequest struct { func (x *DeleteChunkRequest) Reset() { *x = DeleteChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChunkRequest) String() string { @@ -1559,7 +1509,7 @@ func (*DeleteChunkRequest) ProtoMessage() {} func (x *DeleteChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1597,11 +1547,9 @@ type BatchDeleteChunksRequest struct { func (x *BatchDeleteChunksRequest) Reset() { *x = BatchDeleteChunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteChunksRequest) String() string { @@ -1612,7 +1560,7 @@ func (*BatchDeleteChunksRequest) ProtoMessage() {} func (x *BatchDeleteChunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,11 +1616,9 @@ type ListChunksRequest struct { func (x *ListChunksRequest) Reset() { *x = ListChunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChunksRequest) String() string { @@ -1683,7 +1629,7 @@ func (*ListChunksRequest) ProtoMessage() {} func (x *ListChunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1681,9 @@ type ListChunksResponse struct { func (x *ListChunksResponse) Reset() { *x = ListChunksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChunksResponse) String() string { @@ -1750,7 +1694,7 @@ func (*ListChunksResponse) ProtoMessage() {} func (x *ListChunksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2426,344 +2370,6 @@ func file_google_ai_generativelanguage_v1beta_retriever_service_proto_init() { return } file_google_ai_generativelanguage_v1beta_retriever_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCorporaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCorporaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*QueryCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*QueryCorpusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RelevantChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*QueryDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*QueryDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateChunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateChunksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateChunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateChunksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteChunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListChunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_retriever_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListChunksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/safety.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/safety.pb.go index 0c999e36caee..8e3df34d9cbd 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/safety.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/safety.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/safety.proto @@ -330,11 +330,9 @@ type ContentFilter struct { func (x *ContentFilter) Reset() { *x = ContentFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentFilter) String() string { @@ -345,7 +343,7 @@ func (*ContentFilter) ProtoMessage() {} func (x *ContentFilter) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +392,9 @@ type SafetyFeedback struct { func (x *SafetyFeedback) Reset() { *x = SafetyFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyFeedback) String() string { @@ -409,7 +405,7 @@ func (*SafetyFeedback) ProtoMessage() {} func (x *SafetyFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +456,9 @@ type SafetyRating struct { func (x *SafetyRating) Reset() { *x = SafetyRating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyRating) String() string { @@ -475,7 +469,7 @@ func (*SafetyRating) ProtoMessage() {} func (x *SafetyRating) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +522,9 @@ type SafetySetting struct { func (x *SafetySetting) Reset() { *x = SafetySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySetting) String() string { @@ -543,7 +535,7 @@ func (*SafetySetting) ProtoMessage() {} func (x *SafetySetting) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -732,56 +724,6 @@ func file_google_ai_generativelanguage_v1beta_safety_proto_init() { if File_google_ai_generativelanguage_v1beta_safety_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContentFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SafetyFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SafetyRating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SafetySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_safety_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/text_service.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/text_service.pb.go index b8a7b688bbe3..1913e21f75af 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/text_service.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/text_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/text_service.proto @@ -123,11 +123,9 @@ type GenerateTextRequest struct { func (x *GenerateTextRequest) Reset() { *x = GenerateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTextRequest) String() string { @@ -138,7 +136,7 @@ func (*GenerateTextRequest) ProtoMessage() {} func (x *GenerateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +240,9 @@ type GenerateTextResponse struct { func (x *GenerateTextResponse) Reset() { *x = GenerateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTextResponse) String() string { @@ -257,7 +253,7 @@ func (*GenerateTextResponse) ProtoMessage() {} func (x *GenerateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,11 +303,9 @@ type TextPrompt struct { func (x *TextPrompt) Reset() { *x = TextPrompt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextPrompt) String() string { @@ -322,7 +316,7 @@ func (*TextPrompt) ProtoMessage() {} func (x *TextPrompt) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +360,9 @@ type TextCompletion struct { func (x *TextCompletion) Reset() { *x = TextCompletion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextCompletion) String() string { @@ -381,7 +373,7 @@ func (*TextCompletion) ProtoMessage() {} func (x *TextCompletion) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +424,9 @@ type EmbedTextRequest struct { func (x *EmbedTextRequest) Reset() { *x = EmbedTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedTextRequest) String() string { @@ -447,7 +437,7 @@ func (*EmbedTextRequest) ProtoMessage() {} func (x *EmbedTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +478,9 @@ type EmbedTextResponse struct { func (x *EmbedTextResponse) Reset() { *x = EmbedTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedTextResponse) String() string { @@ -503,7 +491,7 @@ func (*EmbedTextResponse) ProtoMessage() {} func (x *EmbedTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +535,9 @@ type BatchEmbedTextRequest struct { func (x *BatchEmbedTextRequest) Reset() { *x = BatchEmbedTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedTextRequest) String() string { @@ -562,7 +548,7 @@ func (*BatchEmbedTextRequest) ProtoMessage() {} func (x *BatchEmbedTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +596,9 @@ type BatchEmbedTextResponse struct { func (x *BatchEmbedTextResponse) Reset() { *x = BatchEmbedTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEmbedTextResponse) String() string { @@ -625,7 +609,7 @@ func (*BatchEmbedTextResponse) ProtoMessage() {} func (x *BatchEmbedTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +643,9 @@ type Embedding struct { func (x *Embedding) Reset() { *x = Embedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Embedding) String() string { @@ -674,7 +656,7 @@ func (*Embedding) ProtoMessage() {} func (x *Embedding) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +700,9 @@ type CountTextTokensRequest struct { func (x *CountTextTokensRequest) Reset() { *x = CountTextTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTextTokensRequest) String() string { @@ -733,7 +713,7 @@ func (*CountTextTokensRequest) ProtoMessage() {} func (x *CountTextTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +758,9 @@ type CountTextTokensResponse struct { func (x *CountTextTokensResponse) Reset() { *x = CountTextTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTextTokensResponse) String() string { @@ -793,7 +771,7 @@ func (*CountTextTokensResponse) ProtoMessage() {} func (x *CountTextTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,140 +1077,6 @@ func file_google_ai_generativelanguage_v1beta_text_service_proto_init() { } file_google_ai_generativelanguage_v1beta_citation_proto_init() file_google_ai_generativelanguage_v1beta_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextPrompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextCompletion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EmbedTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EmbedTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchEmbedTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Embedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CountTextTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CountTextTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[3].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta_text_service_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/ai/generativelanguage/apiv1beta/generativelanguagepb/tuned_model.pb.go b/ai/generativelanguage/apiv1beta/generativelanguagepb/tuned_model.pb.go index 81af2c4eb4ac..dd2f67d55ab6 100755 --- a/ai/generativelanguage/apiv1beta/generativelanguagepb/tuned_model.pb.go +++ b/ai/generativelanguage/apiv1beta/generativelanguagepb/tuned_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta/tuned_model.proto @@ -163,11 +163,9 @@ type TunedModel struct { func (x *TunedModel) Reset() { *x = TunedModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModel) String() string { @@ -178,7 +176,7 @@ func (*TunedModel) ProtoMessage() {} func (x *TunedModel) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +326,9 @@ type TunedModelSource struct { func (x *TunedModelSource) Reset() { *x = TunedModelSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModelSource) String() string { @@ -343,7 +339,7 @@ func (*TunedModelSource) ProtoMessage() {} func (x *TunedModelSource) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +389,9 @@ type TuningTask struct { func (x *TuningTask) Reset() { *x = TuningTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningTask) String() string { @@ -408,7 +402,7 @@ func (*TuningTask) ProtoMessage() {} func (x *TuningTask) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +477,9 @@ type Hyperparameters struct { func (x *Hyperparameters) Reset() { *x = Hyperparameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hyperparameters) String() string { @@ -498,7 +490,7 @@ func (*Hyperparameters) ProtoMessage() {} func (x *Hyperparameters) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +580,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -603,7 +593,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +646,9 @@ type TuningExamples struct { func (x *TuningExamples) Reset() { *x = TuningExamples{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningExamples) String() string { @@ -671,7 +659,7 @@ func (*TuningExamples) ProtoMessage() {} func (x *TuningExamples) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +699,9 @@ type TuningExample struct { func (x *TuningExample) Reset() { *x = TuningExample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningExample) String() string { @@ -726,7 +712,7 @@ func (*TuningExample) ProtoMessage() {} func (x *TuningExample) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +777,9 @@ type TuningSnapshot struct { func (x *TuningSnapshot) Reset() { *x = TuningSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningSnapshot) String() string { @@ -806,7 +790,7 @@ func (*TuningSnapshot) ProtoMessage() {} func (x *TuningSnapshot) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,104 +1061,6 @@ func file_google_ai_generativelanguage_v1beta_tuned_model_proto_init() { if File_google_ai_generativelanguage_v1beta_tuned_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TunedModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TunedModelSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TuningTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Hyperparameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TuningExamples); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TuningExample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TuningSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta_tuned_model_proto_msgTypes[0].OneofWrappers = []any{ (*TunedModel_TunedModelSource)(nil), (*TunedModel_BaseModel)(nil), diff --git a/ai/generativelanguage/apiv1beta/helpers.go b/ai/generativelanguage/apiv1beta/helpers.go index b5534b6f1b0f..101cfeee0c6f 100755 --- a/ai/generativelanguage/apiv1beta/helpers.go +++ b/ai/generativelanguage/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package generativelanguage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "generativelanguage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/ai/generativelanguage/apiv1beta/model_client.go b/ai/generativelanguage/apiv1beta/model_client.go index 9f32a1653a68..44c40eb451f0 100755 --- a/ai/generativelanguage/apiv1beta/model_client.go +++ b/ai/generativelanguage/apiv1beta/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -390,6 +389,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -416,6 +417,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: generativelanguagepb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -479,6 +481,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -496,6 +500,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -558,7 +563,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *generativelanguagep var resp *generativelanguagepb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *generativelanguag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *modelGRPCClient) GetTunedModel(ctx context.Context, req *generativelang var resp *generativelanguagepb.TunedModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetTunedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetTunedModel, req, settings.GRPC, c.logger, "GetTunedModel") return err }, opts...) if err != nil { @@ -645,7 +650,7 @@ func (c *modelGRPCClient) ListTunedModels(ctx context.Context, req *generativela } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListTunedModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListTunedModels, req, settings.GRPC, c.logger, "ListTunedModels") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *modelGRPCClient) CreateTunedModel(ctx context.Context, req *generativel var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CreateTunedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CreateTunedModel, req, settings.GRPC, c.logger, "CreateTunedModel") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *modelGRPCClient) UpdateTunedModel(ctx context.Context, req *generativel var resp *generativelanguagepb.TunedModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateTunedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateTunedModel, req, settings.GRPC, c.logger, "UpdateTunedModel") return err }, opts...) if err != nil { @@ -714,7 +719,7 @@ func (c *modelGRPCClient) DeleteTunedModel(ctx context.Context, req *generativel opts = append((*c.CallOptions).DeleteTunedModel[0:len((*c.CallOptions).DeleteTunedModel):len((*c.CallOptions).DeleteTunedModel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.modelClient.DeleteTunedModel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.modelClient.DeleteTunedModel, req, settings.GRPC, c.logger, "DeleteTunedModel") return err }, opts...) return err @@ -729,7 +734,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -822,17 +827,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *generativelanguagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -895,21 +890,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *generativelanguag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -972,17 +956,7 @@ func (c *modelRESTClient) GetTunedModel(ctx context.Context, req *generativelang httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTunedModel") if err != nil { return err } @@ -1047,21 +1021,10 @@ func (c *modelRESTClient) ListTunedModels(ctx context.Context, req *generativela } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTunedModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1136,21 +1099,10 @@ func (c *modelRESTClient) CreateTunedModel(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTunedModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1215,17 +1167,7 @@ func (c *modelRESTClient) UpdateTunedModel(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTunedModel") if err != nil { return err } @@ -1272,15 +1214,8 @@ func (c *modelRESTClient) DeleteTunedModel(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTunedModel") + return err }, opts...) } @@ -1317,17 +1252,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1392,21 +1317,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/model_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/model_client_example_go123_test.go index 49e385ce1c09..f1a093b1d48d 100644 --- a/ai/generativelanguage/apiv1beta/model_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/model_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelClient_ListTunedModels_all() { } for resp, err := range c.ListTunedModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/permission_client.go b/ai/generativelanguage/apiv1beta/permission_client.go index 0f6f006fbbd1..56f43391cdda 100755 --- a/ai/generativelanguage/apiv1beta/permission_client.go +++ b/ai/generativelanguage/apiv1beta/permission_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -310,6 +309,8 @@ type permissionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPermissionClient creates a new permission service client based on gRPC. @@ -336,6 +337,7 @@ func NewPermissionClient(ctx context.Context, opts ...option.ClientOption) (*Per connPool: connPool, permissionClient: generativelanguagepb.NewPermissionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -383,6 +385,8 @@ type permissionRESTClient struct { // Points back to the CallOptions field of the containing PermissionClient CallOptions **PermissionCallOptions + + logger *slog.Logger } // NewPermissionRESTClient creates a new permission service rest client. @@ -400,6 +404,7 @@ func NewPermissionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -452,7 +457,7 @@ func (c *permissionGRPCClient) CreatePermission(ctx context.Context, req *genera var resp *generativelanguagepb.Permission err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.permissionClient.CreatePermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.permissionClient.CreatePermission, req, settings.GRPC, c.logger, "CreatePermission") return err }, opts...) if err != nil { @@ -470,7 +475,7 @@ func (c *permissionGRPCClient) GetPermission(ctx context.Context, req *generativ var resp *generativelanguagepb.Permission err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.permissionClient.GetPermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.permissionClient.GetPermission, req, settings.GRPC, c.logger, "GetPermission") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *permissionGRPCClient) ListPermissions(ctx context.Context, req *generat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.permissionClient.ListPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.permissionClient.ListPermissions, req, settings.GRPC, c.logger, "ListPermissions") return err }, opts...) if err != nil { @@ -534,7 +539,7 @@ func (c *permissionGRPCClient) UpdatePermission(ctx context.Context, req *genera var resp *generativelanguagepb.Permission err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.permissionClient.UpdatePermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.permissionClient.UpdatePermission, req, settings.GRPC, c.logger, "UpdatePermission") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *permissionGRPCClient) DeletePermission(ctx context.Context, req *genera opts = append((*c.CallOptions).DeletePermission[0:len((*c.CallOptions).DeletePermission):len((*c.CallOptions).DeletePermission)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.permissionClient.DeletePermission(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.permissionClient.DeletePermission, req, settings.GRPC, c.logger, "DeletePermission") return err }, opts...) return err @@ -566,7 +571,7 @@ func (c *permissionGRPCClient) TransferOwnership(ctx context.Context, req *gener var resp *generativelanguagepb.TransferOwnershipResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.permissionClient.TransferOwnership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.permissionClient.TransferOwnership, req, settings.GRPC, c.logger, "TransferOwnership") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *permissionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *permissionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -679,17 +684,7 @@ func (c *permissionRESTClient) CreatePermission(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePermission") if err != nil { return err } @@ -739,17 +734,7 @@ func (c *permissionRESTClient) GetPermission(ctx context.Context, req *generativ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPermission") if err != nil { return err } @@ -811,21 +796,10 @@ func (c *permissionRESTClient) ListPermissions(ctx context.Context, req *generat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPermissions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -902,17 +876,7 @@ func (c *permissionRESTClient) UpdatePermission(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePermission") if err != nil { return err } @@ -959,15 +923,8 @@ func (c *permissionRESTClient) DeletePermission(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePermission") + return err }, opts...) } @@ -1012,17 +969,7 @@ func (c *permissionRESTClient) TransferOwnership(ctx context.Context, req *gener httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TransferOwnership") if err != nil { return err } @@ -1072,17 +1019,7 @@ func (c *permissionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1147,21 +1084,10 @@ func (c *permissionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/permission_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/permission_client_example_go123_test.go index d08089a4f996..6efbb51f53eb 100644 --- a/ai/generativelanguage/apiv1beta/permission_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/permission_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExamplePermissionClient_ListPermissions_all() { } for resp, err := range c.ListPermissions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExamplePermissionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/prediction_client.go b/ai/generativelanguage/apiv1beta/prediction_client.go index ef3560f8fdf3..5e4ed582837b 100755 --- a/ai/generativelanguage/apiv1beta/prediction_client.go +++ b/ai/generativelanguage/apiv1beta/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -156,6 +155,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -182,6 +183,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: generativelanguagepb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -229,6 +231,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -246,6 +250,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -298,7 +303,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *generativelangu var resp *generativelanguagepb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -316,7 +321,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -345,7 +350,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -410,17 +415,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *generativelangu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -470,17 +465,7 @@ func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -545,21 +530,10 @@ func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/prediction_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/prediction_client_example_go123_test.go index 4fae5638bd4b..d706385c16a9 100644 --- a/ai/generativelanguage/apiv1beta/prediction_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/prediction_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/retriever_client.go b/ai/generativelanguage/apiv1beta/retriever_client.go index 1123ae4c75ce..e92173ada638 100755 --- a/ai/generativelanguage/apiv1beta/retriever_client.go +++ b/ai/generativelanguage/apiv1beta/retriever_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -665,6 +664,8 @@ type retrieverGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRetrieverClient creates a new retriever service client based on gRPC. @@ -691,6 +692,7 @@ func NewRetrieverClient(ctx context.Context, opts ...option.ClientOption) (*Retr connPool: connPool, retrieverClient: generativelanguagepb.NewRetrieverServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -738,6 +740,8 @@ type retrieverRESTClient struct { // Points back to the CallOptions field of the containing RetrieverClient CallOptions **RetrieverCallOptions + + logger *slog.Logger } // NewRetrieverRESTClient creates a new retriever service rest client. @@ -755,6 +759,7 @@ func NewRetrieverRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -804,7 +809,7 @@ func (c *retrieverGRPCClient) CreateCorpus(ctx context.Context, req *generativel var resp *generativelanguagepb.Corpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.CreateCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.CreateCorpus, req, settings.GRPC, c.logger, "CreateCorpus") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *retrieverGRPCClient) GetCorpus(ctx context.Context, req *generativelang var resp *generativelanguagepb.Corpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.GetCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.GetCorpus, req, settings.GRPC, c.logger, "GetCorpus") return err }, opts...) if err != nil { @@ -840,7 +845,7 @@ func (c *retrieverGRPCClient) UpdateCorpus(ctx context.Context, req *generativel var resp *generativelanguagepb.Corpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.UpdateCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.UpdateCorpus, req, settings.GRPC, c.logger, "UpdateCorpus") return err }, opts...) if err != nil { @@ -857,7 +862,7 @@ func (c *retrieverGRPCClient) DeleteCorpus(ctx context.Context, req *generativel opts = append((*c.CallOptions).DeleteCorpus[0:len((*c.CallOptions).DeleteCorpus):len((*c.CallOptions).DeleteCorpus)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.retrieverClient.DeleteCorpus(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.retrieverClient.DeleteCorpus, req, settings.GRPC, c.logger, "DeleteCorpus") return err }, opts...) return err @@ -880,7 +885,7 @@ func (c *retrieverGRPCClient) ListCorpora(ctx context.Context, req *generativela } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.ListCorpora(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.ListCorpora, req, settings.GRPC, c.logger, "ListCorpora") return err }, opts...) if err != nil { @@ -915,7 +920,7 @@ func (c *retrieverGRPCClient) QueryCorpus(ctx context.Context, req *generativela var resp *generativelanguagepb.QueryCorpusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.QueryCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.QueryCorpus, req, settings.GRPC, c.logger, "QueryCorpus") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *retrieverGRPCClient) CreateDocument(ctx context.Context, req *generativ var resp *generativelanguagepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *retrieverGRPCClient) GetDocument(ctx context.Context, req *generativela var resp *generativelanguagepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *retrieverGRPCClient) UpdateDocument(ctx context.Context, req *generativ var resp *generativelanguagepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *retrieverGRPCClient) DeleteDocument(ctx context.Context, req *generativ opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.retrieverClient.DeleteDocument(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.retrieverClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) return err @@ -1012,7 +1017,7 @@ func (c *retrieverGRPCClient) ListDocuments(ctx context.Context, req *generative } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -1047,7 +1052,7 @@ func (c *retrieverGRPCClient) QueryDocument(ctx context.Context, req *generative var resp *generativelanguagepb.QueryDocumentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.QueryDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.QueryDocument, req, settings.GRPC, c.logger, "QueryDocument") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *retrieverGRPCClient) CreateChunk(ctx context.Context, req *generativela var resp *generativelanguagepb.Chunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.CreateChunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.CreateChunk, req, settings.GRPC, c.logger, "CreateChunk") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *retrieverGRPCClient) BatchCreateChunks(ctx context.Context, req *genera var resp *generativelanguagepb.BatchCreateChunksResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.BatchCreateChunks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.BatchCreateChunks, req, settings.GRPC, c.logger, "BatchCreateChunks") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *retrieverGRPCClient) GetChunk(ctx context.Context, req *generativelangu var resp *generativelanguagepb.Chunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.GetChunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.GetChunk, req, settings.GRPC, c.logger, "GetChunk") return err }, opts...) if err != nil { @@ -1119,7 +1124,7 @@ func (c *retrieverGRPCClient) UpdateChunk(ctx context.Context, req *generativela var resp *generativelanguagepb.Chunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.UpdateChunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.UpdateChunk, req, settings.GRPC, c.logger, "UpdateChunk") return err }, opts...) if err != nil { @@ -1137,7 +1142,7 @@ func (c *retrieverGRPCClient) BatchUpdateChunks(ctx context.Context, req *genera var resp *generativelanguagepb.BatchUpdateChunksResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.BatchUpdateChunks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.BatchUpdateChunks, req, settings.GRPC, c.logger, "BatchUpdateChunks") return err }, opts...) if err != nil { @@ -1154,7 +1159,7 @@ func (c *retrieverGRPCClient) DeleteChunk(ctx context.Context, req *generativela opts = append((*c.CallOptions).DeleteChunk[0:len((*c.CallOptions).DeleteChunk):len((*c.CallOptions).DeleteChunk)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.retrieverClient.DeleteChunk(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.retrieverClient.DeleteChunk, req, settings.GRPC, c.logger, "DeleteChunk") return err }, opts...) return err @@ -1168,7 +1173,7 @@ func (c *retrieverGRPCClient) BatchDeleteChunks(ctx context.Context, req *genera opts = append((*c.CallOptions).BatchDeleteChunks[0:len((*c.CallOptions).BatchDeleteChunks):len((*c.CallOptions).BatchDeleteChunks)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.retrieverClient.BatchDeleteChunks(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.retrieverClient.BatchDeleteChunks, req, settings.GRPC, c.logger, "BatchDeleteChunks") return err }, opts...) return err @@ -1194,7 +1199,7 @@ func (c *retrieverGRPCClient) ListChunks(ctx context.Context, req *generativelan } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.retrieverClient.ListChunks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.retrieverClient.ListChunks, req, settings.GRPC, c.logger, "ListChunks") return err }, opts...) if err != nil { @@ -1229,7 +1234,7 @@ func (c *retrieverGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1258,7 +1263,7 @@ func (c *retrieverGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1321,17 +1326,7 @@ func (c *retrieverRESTClient) CreateCorpus(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCorpus") if err != nil { return err } @@ -1381,17 +1376,7 @@ func (c *retrieverRESTClient) GetCorpus(ctx context.Context, req *generativelang httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCorpus") if err != nil { return err } @@ -1455,17 +1440,7 @@ func (c *retrieverRESTClient) UpdateCorpus(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCorpus") if err != nil { return err } @@ -1515,15 +1490,8 @@ func (c *retrieverRESTClient) DeleteCorpus(ctx context.Context, req *generativel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCorpus") + return err }, opts...) } @@ -1572,21 +1540,10 @@ func (c *retrieverRESTClient) ListCorpora(ctx context.Context, req *generativela } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCorpora") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1655,17 +1612,7 @@ func (c *retrieverRESTClient) QueryCorpus(ctx context.Context, req *generativela httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryCorpus") if err != nil { return err } @@ -1722,17 +1669,7 @@ func (c *retrieverRESTClient) CreateDocument(ctx context.Context, req *generativ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } @@ -1782,17 +1719,7 @@ func (c *retrieverRESTClient) GetDocument(ctx context.Context, req *generativela httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1856,17 +1783,7 @@ func (c *retrieverRESTClient) UpdateDocument(ctx context.Context, req *generativ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } @@ -1916,15 +1833,8 @@ func (c *retrieverRESTClient) DeleteDocument(ctx context.Context, req *generativ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") + return err }, opts...) } @@ -1973,21 +1883,10 @@ func (c *retrieverRESTClient) ListDocuments(ctx context.Context, req *generative } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2056,17 +1955,7 @@ func (c *retrieverRESTClient) QueryDocument(ctx context.Context, req *generative httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryDocument") if err != nil { return err } @@ -2123,17 +2012,7 @@ func (c *retrieverRESTClient) CreateChunk(ctx context.Context, req *generativela httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChunk") if err != nil { return err } @@ -2189,17 +2068,7 @@ func (c *retrieverRESTClient) BatchCreateChunks(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateChunks") if err != nil { return err } @@ -2249,17 +2118,7 @@ func (c *retrieverRESTClient) GetChunk(ctx context.Context, req *generativelangu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChunk") if err != nil { return err } @@ -2323,17 +2182,7 @@ func (c *retrieverRESTClient) UpdateChunk(ctx context.Context, req *generativela httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChunk") if err != nil { return err } @@ -2389,17 +2238,7 @@ func (c *retrieverRESTClient) BatchUpdateChunks(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateChunks") if err != nil { return err } @@ -2446,15 +2285,8 @@ func (c *retrieverRESTClient) DeleteChunk(ctx context.Context, req *generativela httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChunk") + return err }, opts...) } @@ -2494,15 +2326,8 @@ func (c *retrieverRESTClient) BatchDeleteChunks(ctx context.Context, req *genera httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteChunks") + return err }, opts...) } @@ -2551,21 +2376,10 @@ func (c *retrieverRESTClient) ListChunks(ctx context.Context, req *generativelan } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChunks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2628,17 +2442,7 @@ func (c *retrieverRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2703,21 +2507,10 @@ func (c *retrieverRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/retriever_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/retriever_client_example_go123_test.go index cca6e87f605a..6a88872266ec 100644 --- a/ai/generativelanguage/apiv1beta/retriever_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/retriever_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleRetrieverClient_ListChunks_all() { } for resp, err := range c.ListChunks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleRetrieverClient_ListCorpora_all() { } for resp, err := range c.ListCorpora(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleRetrieverClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleRetrieverClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta/text_client.go b/ai/generativelanguage/apiv1beta/text_client.go index 3c033821d072..2576e6b4cadc 100755 --- a/ai/generativelanguage/apiv1beta/text_client.go +++ b/ai/generativelanguage/apiv1beta/text_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -273,6 +272,8 @@ type textGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTextClient creates a new text service client based on gRPC. @@ -302,6 +303,7 @@ func NewTextClient(ctx context.Context, opts ...option.ClientOption) (*TextClien connPool: connPool, textClient: generativelanguagepb.NewTextServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -349,6 +351,8 @@ type textRESTClient struct { // Points back to the CallOptions field of the containing TextClient CallOptions **TextCallOptions + + logger *slog.Logger } // NewTextRESTClient creates a new text service rest client. @@ -369,6 +373,7 @@ func NewTextRESTClient(ctx context.Context, opts ...option.ClientOption) (*TextC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -421,7 +426,7 @@ func (c *textGRPCClient) GenerateText(ctx context.Context, req *generativelangua var resp *generativelanguagepb.GenerateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.GenerateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.GenerateText, req, settings.GRPC, c.logger, "GenerateText") return err }, opts...) if err != nil { @@ -439,7 +444,7 @@ func (c *textGRPCClient) EmbedText(ctx context.Context, req *generativelanguagep var resp *generativelanguagepb.EmbedTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.EmbedText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.EmbedText, req, settings.GRPC, c.logger, "EmbedText") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *textGRPCClient) BatchEmbedText(ctx context.Context, req *generativelang var resp *generativelanguagepb.BatchEmbedTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.BatchEmbedText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.BatchEmbedText, req, settings.GRPC, c.logger, "BatchEmbedText") return err }, opts...) if err != nil { @@ -475,7 +480,7 @@ func (c *textGRPCClient) CountTextTokens(ctx context.Context, req *generativelan var resp *generativelanguagepb.CountTextTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.CountTextTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.CountTextTokens, req, settings.GRPC, c.logger, "CountTextTokens") return err }, opts...) if err != nil { @@ -493,7 +498,7 @@ func (c *textGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -522,7 +527,7 @@ func (c *textGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -587,17 +592,7 @@ func (c *textRESTClient) GenerateText(ctx context.Context, req *generativelangua httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateText") if err != nil { return err } @@ -653,17 +648,7 @@ func (c *textRESTClient) EmbedText(ctx context.Context, req *generativelanguagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EmbedText") if err != nil { return err } @@ -720,17 +705,7 @@ func (c *textRESTClient) BatchEmbedText(ctx context.Context, req *generativelang httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchEmbedText") if err != nil { return err } @@ -786,17 +761,7 @@ func (c *textRESTClient) CountTextTokens(ctx context.Context, req *generativelan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountTextTokens") if err != nil { return err } @@ -846,17 +811,7 @@ func (c *textRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -921,21 +876,10 @@ func (c *textRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta/text_client_example_go123_test.go b/ai/generativelanguage/apiv1beta/text_client_example_go123_test.go index d8efa3e00121..a77c12a163bb 100644 --- a/ai/generativelanguage/apiv1beta/text_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta/text_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTextClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta2/discuss_client.go b/ai/generativelanguage/apiv1beta2/discuss_client.go index 3d825b92f048..63df8b0ea576 100755 --- a/ai/generativelanguage/apiv1beta2/discuss_client.go +++ b/ai/generativelanguage/apiv1beta2/discuss_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta2/generativelanguagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -189,6 +188,8 @@ type discussGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDiscussClient creates a new discuss service client based on gRPC. @@ -218,6 +219,7 @@ func NewDiscussClient(ctx context.Context, opts ...option.ClientOption) (*Discus connPool: connPool, discussClient: generativelanguagepb.NewDiscussServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -264,6 +266,8 @@ type discussRESTClient struct { // Points back to the CallOptions field of the containing DiscussClient CallOptions **DiscussCallOptions + + logger *slog.Logger } // NewDiscussRESTClient creates a new discuss service rest client. @@ -284,6 +288,7 @@ func NewDiscussRESTClient(ctx context.Context, opts ...option.ClientOption) (*Di endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -336,7 +341,7 @@ func (c *discussGRPCClient) GenerateMessage(ctx context.Context, req *generative var resp *generativelanguagepb.GenerateMessageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.discussClient.GenerateMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.discussClient.GenerateMessage, req, settings.GRPC, c.logger, "GenerateMessage") return err }, opts...) if err != nil { @@ -354,7 +359,7 @@ func (c *discussGRPCClient) CountMessageTokens(ctx context.Context, req *generat var resp *generativelanguagepb.CountMessageTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.discussClient.CountMessageTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.discussClient.CountMessageTokens, req, settings.GRPC, c.logger, "CountMessageTokens") return err }, opts...) if err != nil { @@ -402,17 +407,7 @@ func (c *discussRESTClient) GenerateMessage(ctx context.Context, req *generative httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateMessage") if err != nil { return err } @@ -468,17 +463,7 @@ func (c *discussRESTClient) CountMessageTokens(ctx context.Context, req *generat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountMessageTokens") if err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/citation.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/citation.pb.go index 18c64f500869..5b5ee62914ab 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/citation.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/citation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/citation.proto @@ -48,11 +48,9 @@ type CitationMetadata struct { func (x *CitationMetadata) Reset() { *x = CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationMetadata) String() string { @@ -63,7 +61,7 @@ func (*CitationMetadata) ProtoMessage() {} func (x *CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type CitationSource struct { func (x *CitationSource) Reset() { *x = CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationSource) String() string { @@ -124,7 +120,7 @@ func (*CitationSource) ProtoMessage() {} func (x *CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,32 +238,6 @@ func file_google_ai_generativelanguage_v1beta2_citation_proto_init() { if File_google_ai_generativelanguage_v1beta2_citation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta2_citation_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/discuss_service.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/discuss_service.pb.go index b64270d17f29..f3bb1453eef3 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/discuss_service.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/discuss_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/discuss_service.proto @@ -86,11 +86,9 @@ type GenerateMessageRequest struct { func (x *GenerateMessageRequest) Reset() { *x = GenerateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateMessageRequest) String() string { @@ -101,7 +99,7 @@ func (*GenerateMessageRequest) ProtoMessage() {} func (x *GenerateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +180,9 @@ type GenerateMessageResponse struct { func (x *GenerateMessageResponse) Reset() { *x = GenerateMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateMessageResponse) String() string { @@ -197,7 +193,7 @@ func (*GenerateMessageResponse) ProtoMessage() {} func (x *GenerateMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +261,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -280,7 +274,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +360,9 @@ type MessagePrompt struct { func (x *MessagePrompt) Reset() { *x = MessagePrompt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessagePrompt) String() string { @@ -381,7 +373,7 @@ func (*MessagePrompt) ProtoMessage() {} func (x *MessagePrompt) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -448,7 +438,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type CountMessageTokensRequest struct { func (x *CountMessageTokensRequest) Reset() { *x = CountMessageTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountMessageTokensRequest) String() string { @@ -514,7 +502,7 @@ func (*CountMessageTokensRequest) ProtoMessage() {} func (x *CountMessageTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +547,9 @@ type CountMessageTokensResponse struct { func (x *CountMessageTokensResponse) Reset() { *x = CountMessageTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountMessageTokensResponse) String() string { @@ -574,7 +560,7 @@ func (*CountMessageTokensResponse) ProtoMessage() {} func (x *CountMessageTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,92 +797,6 @@ func file_google_ai_generativelanguage_v1beta2_discuss_service_proto_init() { } file_google_ai_generativelanguage_v1beta2_citation_proto_init() file_google_ai_generativelanguage_v1beta2_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MessagePrompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CountMessageTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CountMessageTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta2_discuss_service_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/model.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/model.pb.go index 4b7893cd1a09..86570b751458 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/model.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/model.proto @@ -103,11 +103,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -118,7 +116,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,20 +294,6 @@ func file_google_ai_generativelanguage_v1beta2_model_proto_init() { if File_google_ai_generativelanguage_v1beta2_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta2_model_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/model_service.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/model_service.pb.go index ccec35ae4c9f..d4e70cd17f6f 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/model_service.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/model_service.proto @@ -56,11 +56,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -71,7 +69,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -133,7 +129,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -193,7 +187,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,44 +329,6 @@ func file_google_ai_generativelanguage_v1beta2_model_service_proto_init() { return } file_google_ai_generativelanguage_v1beta2_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/safety.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/safety.pb.go index 750dc235cb07..e3b55374c35f 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/safety.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/safety.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/safety.proto @@ -300,11 +300,9 @@ type ContentFilter struct { func (x *ContentFilter) Reset() { *x = ContentFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentFilter) String() string { @@ -315,7 +313,7 @@ func (*ContentFilter) ProtoMessage() {} func (x *ContentFilter) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +362,9 @@ type SafetyFeedback struct { func (x *SafetyFeedback) Reset() { *x = SafetyFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyFeedback) String() string { @@ -379,7 +375,7 @@ func (*SafetyFeedback) ProtoMessage() {} func (x *SafetyFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +424,9 @@ type SafetyRating struct { func (x *SafetyRating) Reset() { *x = SafetyRating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyRating) String() string { @@ -443,7 +437,7 @@ func (*SafetyRating) ProtoMessage() {} func (x *SafetyRating) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +483,9 @@ type SafetySetting struct { func (x *SafetySetting) Reset() { *x = SafetySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySetting) String() string { @@ -504,7 +496,7 @@ func (*SafetySetting) ProtoMessage() {} func (x *SafetySetting) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,56 +672,6 @@ func file_google_ai_generativelanguage_v1beta2_safety_proto_init() { if File_google_ai_generativelanguage_v1beta2_safety_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContentFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SafetyFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SafetyRating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SafetySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta2_safety_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/ai/generativelanguage/apiv1beta2/generativelanguagepb/text_service.pb.go b/ai/generativelanguage/apiv1beta2/generativelanguagepb/text_service.pb.go index 526771aa54ae..653f634fae69 100755 --- a/ai/generativelanguage/apiv1beta2/generativelanguagepb/text_service.pb.go +++ b/ai/generativelanguage/apiv1beta2/generativelanguagepb/text_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/ai/generativelanguage/v1beta2/text_service.proto @@ -112,11 +112,9 @@ type GenerateTextRequest struct { func (x *GenerateTextRequest) Reset() { *x = GenerateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTextRequest) String() string { @@ -127,7 +125,7 @@ func (*GenerateTextRequest) ProtoMessage() {} func (x *GenerateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type GenerateTextResponse struct { func (x *GenerateTextResponse) Reset() { *x = GenerateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTextResponse) String() string { @@ -246,7 +242,7 @@ func (*GenerateTextResponse) ProtoMessage() {} func (x *GenerateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +292,9 @@ type TextPrompt struct { func (x *TextPrompt) Reset() { *x = TextPrompt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextPrompt) String() string { @@ -311,7 +305,7 @@ func (*TextPrompt) ProtoMessage() {} func (x *TextPrompt) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +349,9 @@ type TextCompletion struct { func (x *TextCompletion) Reset() { *x = TextCompletion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextCompletion) String() string { @@ -370,7 +362,7 @@ func (*TextCompletion) ProtoMessage() {} func (x *TextCompletion) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +413,9 @@ type EmbedTextRequest struct { func (x *EmbedTextRequest) Reset() { *x = EmbedTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedTextRequest) String() string { @@ -436,7 +426,7 @@ func (*EmbedTextRequest) ProtoMessage() {} func (x *EmbedTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +467,9 @@ type EmbedTextResponse struct { func (x *EmbedTextResponse) Reset() { *x = EmbedTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbedTextResponse) String() string { @@ -492,7 +480,7 @@ func (*EmbedTextResponse) ProtoMessage() {} func (x *EmbedTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +514,9 @@ type Embedding struct { func (x *Embedding) Reset() { *x = Embedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Embedding) String() string { @@ -541,7 +527,7 @@ func (*Embedding) ProtoMessage() {} func (x *Embedding) ProtoReflect() protoreflect.Message { mi := &file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -774,92 +760,6 @@ func file_google_ai_generativelanguage_v1beta2_text_service_proto_init() { } file_google_ai_generativelanguage_v1beta2_citation_proto_init() file_google_ai_generativelanguage_v1beta2_safety_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextPrompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextCompletion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EmbedTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EmbedTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Embedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[3].OneofWrappers = []any{} file_google_ai_generativelanguage_v1beta2_text_service_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/ai/generativelanguage/apiv1beta2/helpers.go b/ai/generativelanguage/apiv1beta2/helpers.go index b5534b6f1b0f..101cfeee0c6f 100755 --- a/ai/generativelanguage/apiv1beta2/helpers.go +++ b/ai/generativelanguage/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package generativelanguage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "generativelanguage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/ai/generativelanguage/apiv1beta2/model_client.go b/ai/generativelanguage/apiv1beta2/model_client.go index fcaec22365ba..9eee0fcf6dd5 100755 --- a/ai/generativelanguage/apiv1beta2/model_client.go +++ b/ai/generativelanguage/apiv1beta2/model_client.go @@ -19,7 +19,7 @@ package generativelanguage import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta2/generativelanguagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -187,6 +186,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -213,6 +214,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: generativelanguagepb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -259,6 +261,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -276,6 +280,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,7 +333,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *generativelanguagep var resp *generativelanguagepb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -354,7 +359,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *generativelanguag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -413,17 +418,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *generativelanguagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -485,21 +480,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *generativelanguag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ai/generativelanguage/apiv1beta2/model_client_example_go123_test.go b/ai/generativelanguage/apiv1beta2/model_client_example_go123_test.go index abd2cc3f6c09..6973f090716f 100644 --- a/ai/generativelanguage/apiv1beta2/model_client_example_go123_test.go +++ b/ai/generativelanguage/apiv1beta2/model_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ai/generativelanguage/apiv1beta2/text_client.go b/ai/generativelanguage/apiv1beta2/text_client.go index 0a75df99c636..a160068f8ef3 100755 --- a/ai/generativelanguage/apiv1beta2/text_client.go +++ b/ai/generativelanguage/apiv1beta2/text_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( generativelanguagepb "cloud.google.com/go/ai/generativelanguage/apiv1beta2/generativelanguagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -189,6 +188,8 @@ type textGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTextClient creates a new text service client based on gRPC. @@ -218,6 +219,7 @@ func NewTextClient(ctx context.Context, opts ...option.ClientOption) (*TextClien connPool: connPool, textClient: generativelanguagepb.NewTextServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -264,6 +266,8 @@ type textRESTClient struct { // Points back to the CallOptions field of the containing TextClient CallOptions **TextCallOptions + + logger *slog.Logger } // NewTextRESTClient creates a new text service rest client. @@ -284,6 +288,7 @@ func NewTextRESTClient(ctx context.Context, opts ...option.ClientOption) (*TextC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -336,7 +341,7 @@ func (c *textGRPCClient) GenerateText(ctx context.Context, req *generativelangua var resp *generativelanguagepb.GenerateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.GenerateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.GenerateText, req, settings.GRPC, c.logger, "GenerateText") return err }, opts...) if err != nil { @@ -354,7 +359,7 @@ func (c *textGRPCClient) EmbedText(ctx context.Context, req *generativelanguagep var resp *generativelanguagepb.EmbedTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textClient.EmbedText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textClient.EmbedText, req, settings.GRPC, c.logger, "EmbedText") return err }, opts...) if err != nil { @@ -402,17 +407,7 @@ func (c *textRESTClient) GenerateText(ctx context.Context, req *generativelangua httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateText") if err != nil { return err } @@ -468,17 +463,7 @@ func (c *textRESTClient) EmbedText(ctx context.Context, req *generativelanguagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EmbedText") if err != nil { return err } diff --git a/aiplatform/apiv1/aiplatformpb/accelerator_type.pb.go b/aiplatform/apiv1/aiplatformpb/accelerator_type.pb.go index 2a8436662fc9..22baf8fe2a86 100755 --- a/aiplatform/apiv1/aiplatformpb/accelerator_type.pb.go +++ b/aiplatform/apiv1/aiplatformpb/accelerator_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/accelerator_type.proto diff --git a/aiplatform/apiv1/aiplatformpb/annotation.pb.go b/aiplatform/apiv1/aiplatformpb/annotation.pb.go index bb65ded4d302..8a1161521922 100755 --- a/aiplatform/apiv1/aiplatformpb/annotation.pb.go +++ b/aiplatform/apiv1/aiplatformpb/annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/annotation.proto @@ -94,11 +94,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -109,7 +107,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,20 +295,6 @@ func file_google_cloud_aiplatform_v1_annotation_proto_init() { return } file_google_cloud_aiplatform_v1_user_action_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/annotation_spec.pb.go b/aiplatform/apiv1/aiplatformpb/annotation_spec.pb.go index 91fcc25fa7a9..60be3d086f4c 100755 --- a/aiplatform/apiv1/aiplatformpb/annotation_spec.pb.go +++ b/aiplatform/apiv1/aiplatformpb/annotation_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/annotation_spec.proto @@ -60,11 +60,9 @@ type AnnotationSpec struct { func (x *AnnotationSpec) Reset() { *x = AnnotationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_annotation_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_annotation_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpec) String() string { @@ -75,7 +73,7 @@ func (*AnnotationSpec) ProtoMessage() {} func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_annotation_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,20 +209,6 @@ func file_google_cloud_aiplatform_v1_annotation_spec_proto_init() { if File_google_cloud_aiplatform_v1_annotation_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_annotation_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/api_auth.pb.go b/aiplatform/apiv1/aiplatformpb/api_auth.pb.go index 791d4defd98f..e64d6e9a8709 100755 --- a/aiplatform/apiv1/aiplatformpb/api_auth.pb.go +++ b/aiplatform/apiv1/aiplatformpb/api_auth.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/api_auth.proto @@ -52,11 +52,9 @@ type ApiAuth struct { func (x *ApiAuth) Reset() { *x = ApiAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiAuth) String() string { @@ -67,7 +65,7 @@ func (*ApiAuth) ProtoMessage() {} func (x *ApiAuth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type ApiAuth_ApiKeyConfig struct { func (x *ApiAuth_ApiKeyConfig) Reset() { *x = ApiAuth_ApiKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiAuth_ApiKeyConfig) String() string { @@ -135,7 +131,7 @@ func (*ApiAuth_ApiKeyConfig) ProtoMessage() {} func (x *ApiAuth_ApiKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,32 +233,6 @@ func file_google_cloud_aiplatform_v1_api_auth_proto_init() { if File_google_cloud_aiplatform_v1_api_auth_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ApiAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApiAuth_ApiKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_api_auth_proto_msgTypes[0].OneofWrappers = []any{ (*ApiAuth_ApiKeyConfig_)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/artifact.pb.go b/aiplatform/apiv1/aiplatformpb/artifact.pb.go index 8fd10a0ffccc..a3f59cc4af3d 100755 --- a/aiplatform/apiv1/aiplatformpb/artifact.pb.go +++ b/aiplatform/apiv1/aiplatformpb/artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/artifact.proto @@ -149,11 +149,9 @@ type Artifact struct { func (x *Artifact) Reset() { *x = Artifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifact) String() string { @@ -164,7 +162,7 @@ func (*Artifact) ProtoMessage() {} func (x *Artifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,20 +381,6 @@ func file_google_cloud_aiplatform_v1_artifact_proto_init() { if File_google_cloud_aiplatform_v1_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Artifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/batch_prediction_job.pb.go b/aiplatform/apiv1/aiplatformpb/batch_prediction_job.pb.go index d65dd12569d9..004cabb532d6 100755 --- a/aiplatform/apiv1/aiplatformpb/batch_prediction_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/batch_prediction_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -222,11 +222,9 @@ type BatchPredictionJob struct { func (x *BatchPredictionJob) Reset() { *x = BatchPredictionJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob) String() string { @@ -237,7 +235,7 @@ func (*BatchPredictionJob) ProtoMessage() {} func (x *BatchPredictionJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +478,9 @@ type BatchPredictionJob_InputConfig struct { func (x *BatchPredictionJob_InputConfig) Reset() { *x = BatchPredictionJob_InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_InputConfig) String() string { @@ -495,7 +491,7 @@ func (*BatchPredictionJob_InputConfig) ProtoMessage() {} func (x *BatchPredictionJob_InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +657,9 @@ type BatchPredictionJob_InstanceConfig struct { func (x *BatchPredictionJob_InstanceConfig) Reset() { *x = BatchPredictionJob_InstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_InstanceConfig) String() string { @@ -676,7 +670,7 @@ func (*BatchPredictionJob_InstanceConfig) ProtoMessage() {} func (x *BatchPredictionJob_InstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +738,9 @@ type BatchPredictionJob_OutputConfig struct { func (x *BatchPredictionJob_OutputConfig) Reset() { *x = BatchPredictionJob_OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_OutputConfig) String() string { @@ -759,7 +751,7 @@ func (*BatchPredictionJob_OutputConfig) ProtoMessage() {} func (x *BatchPredictionJob_OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +878,9 @@ type BatchPredictionJob_OutputInfo struct { func (x *BatchPredictionJob_OutputInfo) Reset() { *x = BatchPredictionJob_OutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_OutputInfo) String() string { @@ -901,7 +891,7 @@ func (*BatchPredictionJob_OutputInfo) ProtoMessage() {} func (x *BatchPredictionJob_OutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1308,68 +1298,6 @@ func file_google_cloud_aiplatform_v1_batch_prediction_job_proto_init() { file_google_cloud_aiplatform_v1_machine_resources_proto_init() file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_init() file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_InstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_OutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_batch_prediction_job_proto_msgTypes[1].OneofWrappers = []any{ (*BatchPredictionJob_InputConfig_GcsSource)(nil), (*BatchPredictionJob_InputConfig_BigquerySource)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/completion_stats.pb.go b/aiplatform/apiv1/aiplatformpb/completion_stats.pb.go index 79491cd43bc9..0efff93b50c0 100755 --- a/aiplatform/apiv1/aiplatformpb/completion_stats.pb.go +++ b/aiplatform/apiv1/aiplatformpb/completion_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/completion_stats.proto @@ -61,11 +61,9 @@ type CompletionStats struct { func (x *CompletionStats) Reset() { *x = CompletionStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_completion_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_completion_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionStats) String() string { @@ -76,7 +74,7 @@ func (*CompletionStats) ProtoMessage() {} func (x *CompletionStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_completion_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,20 +187,6 @@ func file_google_cloud_aiplatform_v1_completion_stats_proto_init() { if File_google_cloud_aiplatform_v1_completion_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_completion_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompletionStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/content.pb.go b/aiplatform/apiv1/aiplatformpb/content.pb.go index ecb80dea0304..3bb7f3d19e66 100755 --- a/aiplatform/apiv1/aiplatformpb/content.pb.go +++ b/aiplatform/apiv1/aiplatformpb/content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/content.proto @@ -510,11 +510,9 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content) String() string { @@ -525,7 +523,7 @@ func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +580,9 @@ type Part struct { func (x *Part) Reset() { *x = Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Part) String() string { @@ -597,7 +593,7 @@ func (*Part) ProtoMessage() {} func (x *Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +737,9 @@ type Blob struct { func (x *Blob) Reset() { *x = Blob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Blob) String() string { @@ -756,7 +750,7 @@ func (*Blob) ProtoMessage() {} func (x *Blob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +793,9 @@ type FileData struct { func (x *FileData) Reset() { *x = FileData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileData) String() string { @@ -814,7 +806,7 @@ func (*FileData) ProtoMessage() {} func (x *FileData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,11 +849,9 @@ type VideoMetadata struct { func (x *VideoMetadata) Reset() { *x = VideoMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoMetadata) String() string { @@ -872,7 +862,7 @@ func (*VideoMetadata) ProtoMessage() {} func (x *VideoMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +941,9 @@ type GenerationConfig struct { func (x *GenerationConfig) Reset() { *x = GenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig) String() string { @@ -966,7 +954,7 @@ func (*GenerationConfig) ProtoMessage() {} func (x *GenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1096,11 +1084,9 @@ type SafetySetting struct { func (x *SafetySetting) Reset() { *x = SafetySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySetting) String() string { @@ -1111,7 +1097,7 @@ func (*SafetySetting) ProtoMessage() {} func (x *SafetySetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1156,9 @@ type SafetyRating struct { func (x *SafetyRating) Reset() { *x = SafetyRating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyRating) String() string { @@ -1185,7 +1169,7 @@ func (*SafetyRating) ProtoMessage() {} func (x *SafetyRating) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1238,9 @@ type CitationMetadata struct { func (x *CitationMetadata) Reset() { *x = CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationMetadata) String() string { @@ -1269,7 +1251,7 @@ func (*CitationMetadata) ProtoMessage() {} func (x *CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1295,9 @@ type Citation struct { func (x *Citation) Reset() { *x = Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Citation) String() string { @@ -1328,7 +1308,7 @@ func (*Citation) ProtoMessage() {} func (x *Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1419,11 +1399,9 @@ type Candidate struct { func (x *Candidate) Reset() { *x = Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Candidate) String() string { @@ -1434,7 +1412,7 @@ func (*Candidate) ProtoMessage() {} func (x *Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1512,9 @@ type LogprobsResult struct { func (x *LogprobsResult) Reset() { *x = LogprobsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult) String() string { @@ -1549,7 +1525,7 @@ func (*LogprobsResult) ProtoMessage() {} func (x *LogprobsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1574,9 @@ type Segment struct { func (x *Segment) Reset() { *x = Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Segment) String() string { @@ -1613,7 +1587,7 @@ func (*Segment) ProtoMessage() {} func (x *Segment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1647,9 @@ type GroundingChunk struct { func (x *GroundingChunk) Reset() { *x = GroundingChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk) String() string { @@ -1688,7 +1660,7 @@ func (*GroundingChunk) ProtoMessage() {} func (x *GroundingChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1763,11 +1735,9 @@ type GroundingSupport struct { func (x *GroundingSupport) Reset() { *x = GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingSupport) String() string { @@ -1778,7 +1748,7 @@ func (*GroundingSupport) ProtoMessage() {} func (x *GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1834,11 +1804,9 @@ type GroundingMetadata struct { func (x *GroundingMetadata) Reset() { *x = GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingMetadata) String() string { @@ -1849,7 +1817,7 @@ func (*GroundingMetadata) ProtoMessage() {} func (x *GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1915,11 +1883,9 @@ type SearchEntryPoint struct { func (x *SearchEntryPoint) Reset() { *x = SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntryPoint) String() string { @@ -1930,7 +1896,7 @@ func (*SearchEntryPoint) ProtoMessage() {} func (x *SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1975,11 +1941,9 @@ type RetrievalMetadata struct { func (x *RetrievalMetadata) Reset() { *x = RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrievalMetadata) String() string { @@ -1990,7 +1954,7 @@ func (*RetrievalMetadata) ProtoMessage() {} func (x *RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1993,9 @@ type GenerationConfig_RoutingConfig struct { func (x *GenerationConfig_RoutingConfig) Reset() { *x = GenerationConfig_RoutingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig) String() string { @@ -2044,7 +2006,7 @@ func (*GenerationConfig_RoutingConfig) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2112,11 +2074,9 @@ type GenerationConfig_RoutingConfig_AutoRoutingMode struct { func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) Reset() { *x = GenerationConfig_RoutingConfig_AutoRoutingMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) String() string { @@ -2127,7 +2087,7 @@ func (*GenerationConfig_RoutingConfig_AutoRoutingMode) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2162,11 +2122,9 @@ type GenerationConfig_RoutingConfig_ManualRoutingMode struct { func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) Reset() { *x = GenerationConfig_RoutingConfig_ManualRoutingMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) String() string { @@ -2177,7 +2135,7 @@ func (*GenerationConfig_RoutingConfig_ManualRoutingMode) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2215,11 +2173,9 @@ type LogprobsResult_Candidate struct { func (x *LogprobsResult_Candidate) Reset() { *x = LogprobsResult_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_Candidate) String() string { @@ -2230,7 +2186,7 @@ func (*LogprobsResult_Candidate) ProtoMessage() {} func (x *LogprobsResult_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2278,11 +2234,9 @@ type LogprobsResult_TopCandidates struct { func (x *LogprobsResult_TopCandidates) Reset() { *x = LogprobsResult_TopCandidates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_TopCandidates) String() string { @@ -2293,7 +2247,7 @@ func (*LogprobsResult_TopCandidates) ProtoMessage() {} func (x *LogprobsResult_TopCandidates) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2329,11 +2283,9 @@ type GroundingChunk_Web struct { func (x *GroundingChunk_Web) Reset() { *x = GroundingChunk_Web{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_Web) String() string { @@ -2344,7 +2296,7 @@ func (*GroundingChunk_Web) ProtoMessage() {} func (x *GroundingChunk_Web) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2389,11 +2341,9 @@ type GroundingChunk_RetrievedContext struct { func (x *GroundingChunk_RetrievedContext) Reset() { *x = GroundingChunk_RetrievedContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_RetrievedContext) String() string { @@ -2404,7 +2354,7 @@ func (*GroundingChunk_RetrievedContext) ProtoMessage() {} func (x *GroundingChunk_RetrievedContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_content_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3019,308 +2969,6 @@ func file_google_cloud_aiplatform_v1_content_proto_init() { } file_google_cloud_aiplatform_v1_openapi_proto_init() file_google_cloud_aiplatform_v1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Blob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FileData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VideoMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SafetySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SafetyRating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig_AutoRoutingMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig_ManualRoutingMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_TopCandidates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_Web); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_content_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_RetrievedContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_content_proto_msgTypes[1].OneofWrappers = []any{ (*Part_Text)(nil), (*Part_InlineData)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/context.pb.go b/aiplatform/apiv1/aiplatformpb/context.pb.go index cb54e7a2f08f..a7a321346197 100755 --- a/aiplatform/apiv1/aiplatformpb/context.pb.go +++ b/aiplatform/apiv1/aiplatformpb/context.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/context.proto @@ -89,11 +89,9 @@ type Context struct { func (x *Context) Reset() { *x = Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Context) String() string { @@ -104,7 +102,7 @@ func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,20 +307,6 @@ func file_google_cloud_aiplatform_v1_context_proto_init() { if File_google_cloud_aiplatform_v1_context_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/custom_job.pb.go b/aiplatform/apiv1/aiplatformpb/custom_job.pb.go index aac744a1b25b..cd5ab69053c6 100755 --- a/aiplatform/apiv1/aiplatformpb/custom_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/custom_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/custom_job.proto @@ -177,11 +177,9 @@ type CustomJob struct { func (x *CustomJob) Reset() { *x = CustomJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomJob) String() string { @@ -192,7 +190,7 @@ func (*CustomJob) ProtoMessage() {} func (x *CustomJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -437,11 +435,9 @@ type CustomJobSpec struct { func (x *CustomJobSpec) Reset() { *x = CustomJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomJobSpec) String() string { @@ -452,7 +448,7 @@ func (*CustomJobSpec) ProtoMessage() {} func (x *CustomJobSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +586,9 @@ type WorkerPoolSpec struct { func (x *WorkerPoolSpec) Reset() { *x = WorkerPoolSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerPoolSpec) String() string { @@ -605,7 +599,7 @@ func (*WorkerPoolSpec) ProtoMessage() {} func (x *WorkerPoolSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +702,9 @@ type ContainerSpec struct { func (x *ContainerSpec) Reset() { *x = ContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerSpec) String() string { @@ -723,7 +715,7 @@ func (*ContainerSpec) ProtoMessage() {} func (x *ContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +786,9 @@ type PythonPackageSpec struct { func (x *PythonPackageSpec) Reset() { *x = PythonPackageSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PythonPackageSpec) String() string { @@ -809,7 +799,7 @@ func (*PythonPackageSpec) ProtoMessage() {} func (x *PythonPackageSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +876,9 @@ type Scheduling struct { func (x *Scheduling) Reset() { *x = Scheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling) String() string { @@ -901,7 +889,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,80 +1277,6 @@ func file_google_cloud_aiplatform_v1_custom_job_proto_init() { file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomJobSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WorkerPoolSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PythonPackageSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Scheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_custom_job_proto_msgTypes[2].OneofWrappers = []any{ (*WorkerPoolSpec_ContainerSpec)(nil), (*WorkerPoolSpec_PythonPackageSpec)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/data_item.pb.go b/aiplatform/apiv1/aiplatformpb/data_item.pb.go index 550be9496278..ae0f03d0314c 100755 --- a/aiplatform/apiv1/aiplatformpb/data_item.pb.go +++ b/aiplatform/apiv1/aiplatformpb/data_item.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/data_item.proto @@ -79,11 +79,9 @@ type DataItem struct { func (x *DataItem) Reset() { *x = DataItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_data_item_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_data_item_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataItem) String() string { @@ -94,7 +92,7 @@ func (*DataItem) ProtoMessage() {} func (x *DataItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_data_item_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,20 +267,6 @@ func file_google_cloud_aiplatform_v1_data_item_proto_init() { if File_google_cloud_aiplatform_v1_data_item_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_data_item_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/data_labeling_job.pb.go b/aiplatform/apiv1/aiplatformpb/data_labeling_job.pb.go index cefd182f5e83..752fd762d2ec 100755 --- a/aiplatform/apiv1/aiplatformpb/data_labeling_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/data_labeling_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/data_labeling_job.proto @@ -176,11 +176,9 @@ type DataLabelingJob struct { func (x *DataLabelingJob) Reset() { *x = DataLabelingJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataLabelingJob) String() string { @@ -191,7 +189,7 @@ func (*DataLabelingJob) ProtoMessage() {} func (x *DataLabelingJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +358,9 @@ type ActiveLearningConfig struct { func (x *ActiveLearningConfig) Reset() { *x = ActiveLearningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActiveLearningConfig) String() string { @@ -375,7 +371,7 @@ func (*ActiveLearningConfig) ProtoMessage() {} func (x *ActiveLearningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +467,9 @@ type SampleConfig struct { func (x *SampleConfig) Reset() { *x = SampleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleConfig) String() string { @@ -486,7 +480,7 @@ func (*SampleConfig) ProtoMessage() {} func (x *SampleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +568,9 @@ type TrainingConfig struct { func (x *TrainingConfig) Reset() { *x = TrainingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainingConfig) String() string { @@ -589,7 +581,7 @@ func (*TrainingConfig) ProtoMessage() {} func (x *TrainingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,56 +837,6 @@ func file_google_cloud_aiplatform_v1_data_labeling_job_proto_init() { } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataLabelingJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ActiveLearningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SampleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TrainingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_data_labeling_job_proto_msgTypes[1].OneofWrappers = []any{ (*ActiveLearningConfig_MaxDataItemCount)(nil), (*ActiveLearningConfig_MaxDataItemPercentage)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/dataset.pb.go b/aiplatform/apiv1/aiplatformpb/dataset.pb.go index cea835f06e2f..acdc74d7e0a9 100755 --- a/aiplatform/apiv1/aiplatformpb/dataset.pb.go +++ b/aiplatform/apiv1/aiplatformpb/dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/dataset.proto @@ -165,11 +165,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -180,7 +178,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +352,9 @@ type ImportDataConfig struct { func (x *ImportDataConfig) Reset() { *x = ImportDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataConfig) String() string { @@ -369,7 +365,7 @@ func (*ImportDataConfig) ProtoMessage() {} func (x *ImportDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +503,9 @@ type ExportDataConfig struct { func (x *ExportDataConfig) Reset() { *x = ExportDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataConfig) String() string { @@ -522,7 +516,7 @@ func (*ExportDataConfig) ProtoMessage() {} func (x *ExportDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +652,9 @@ type ExportFractionSplit struct { func (x *ExportFractionSplit) Reset() { *x = ExportFractionSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFractionSplit) String() string { @@ -673,7 +665,7 @@ func (*ExportFractionSplit) ProtoMessage() {} func (x *ExportFractionSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +741,9 @@ type ExportFilterSplit struct { func (x *ExportFilterSplit) Reset() { *x = ExportFilterSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFilterSplit) String() string { @@ -764,7 +754,7 @@ func (*ExportFilterSplit) ProtoMessage() {} func (x *ExportFilterSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,68 +1040,6 @@ func file_google_cloud_aiplatform_v1_dataset_proto_init() { file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_saved_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportFractionSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportFilterSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_dataset_proto_msgTypes[1].OneofWrappers = []any{ (*ImportDataConfig_GcsSource)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/dataset_service.pb.go b/aiplatform/apiv1/aiplatformpb/dataset_service.pb.go index 6f3c1a5f1a6c..5c37848c6a44 100755 --- a/aiplatform/apiv1/aiplatformpb/dataset_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/dataset_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/dataset_service.proto @@ -59,11 +59,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateDatasetOperationMetadata struct { func (x *CreateDatasetOperationMetadata) Reset() { *x = CreateDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateDatasetOperationMetadata) ProtoMessage() {} func (x *CreateDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +165,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -184,7 +178,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +228,9 @@ type UpdateDatasetRequest struct { func (x *UpdateDatasetRequest) Reset() { *x = UpdateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetRequest) String() string { @@ -249,7 +241,7 @@ func (*UpdateDatasetRequest) ProtoMessage() {} func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +289,9 @@ type UpdateDatasetVersionRequest struct { func (x *UpdateDatasetVersionRequest) Reset() { *x = UpdateDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetVersionRequest) String() string { @@ -312,7 +302,7 @@ func (*UpdateDatasetVersionRequest) ProtoMessage() {} func (x *UpdateDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +374,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -399,7 +387,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +459,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -486,7 +472,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +516,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -545,7 +529,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +569,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -600,7 +582,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +621,9 @@ type ImportDataResponse struct { func (x *ImportDataResponse) Reset() { *x = ImportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataResponse) String() string { @@ -654,7 +634,7 @@ func (*ImportDataResponse) ProtoMessage() {} func (x *ImportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +662,9 @@ type ImportDataOperationMetadata struct { func (x *ImportDataOperationMetadata) Reset() { *x = ImportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationMetadata) String() string { @@ -697,7 +675,7 @@ func (*ImportDataOperationMetadata) ProtoMessage() {} func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +714,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -751,7 +727,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +776,9 @@ type ExportDataResponse struct { func (x *ExportDataResponse) Reset() { *x = ExportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataResponse) String() string { @@ -815,7 +789,7 @@ func (*ExportDataResponse) ProtoMessage() {} func (x *ExportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +834,9 @@ type ExportDataOperationMetadata struct { func (x *ExportDataOperationMetadata) Reset() { *x = ExportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata) String() string { @@ -875,7 +847,7 @@ func (*ExportDataOperationMetadata) ProtoMessage() {} func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +895,9 @@ type CreateDatasetVersionRequest struct { func (x *CreateDatasetVersionRequest) Reset() { *x = CreateDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetVersionRequest) String() string { @@ -938,7 +908,7 @@ func (*CreateDatasetVersionRequest) ProtoMessage() {} func (x *CreateDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,11 +950,9 @@ type CreateDatasetVersionOperationMetadata struct { func (x *CreateDatasetVersionOperationMetadata) Reset() { *x = CreateDatasetVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetVersionOperationMetadata) String() string { @@ -995,7 +963,7 @@ func (*CreateDatasetVersionOperationMetadata) ProtoMessage() {} func (x *CreateDatasetVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1000,9 @@ type DeleteDatasetVersionRequest struct { func (x *DeleteDatasetVersionRequest) Reset() { *x = DeleteDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetVersionRequest) String() string { @@ -1047,7 +1013,7 @@ func (*DeleteDatasetVersionRequest) ProtoMessage() {} func (x *DeleteDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,11 +1053,9 @@ type GetDatasetVersionRequest struct { func (x *GetDatasetVersionRequest) Reset() { *x = GetDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetVersionRequest) String() string { @@ -1102,7 +1066,7 @@ func (*GetDatasetVersionRequest) ProtoMessage() {} func (x *GetDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1121,9 @@ type ListDatasetVersionsRequest struct { func (x *ListDatasetVersionsRequest) Reset() { *x = ListDatasetVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetVersionsRequest) String() string { @@ -1172,7 +1134,7 @@ func (*ListDatasetVersionsRequest) ProtoMessage() {} func (x *ListDatasetVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1206,9 @@ type ListDatasetVersionsResponse struct { func (x *ListDatasetVersionsResponse) Reset() { *x = ListDatasetVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetVersionsResponse) String() string { @@ -1259,7 +1219,7 @@ func (*ListDatasetVersionsResponse) ProtoMessage() {} func (x *ListDatasetVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1263,9 @@ type RestoreDatasetVersionRequest struct { func (x *RestoreDatasetVersionRequest) Reset() { *x = RestoreDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatasetVersionRequest) String() string { @@ -1318,7 +1276,7 @@ func (*RestoreDatasetVersionRequest) ProtoMessage() {} func (x *RestoreDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1311,9 @@ type RestoreDatasetVersionOperationMetadata struct { func (x *RestoreDatasetVersionOperationMetadata) Reset() { *x = RestoreDatasetVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatasetVersionOperationMetadata) String() string { @@ -1368,7 +1324,7 @@ func (*RestoreDatasetVersionOperationMetadata) ProtoMessage() {} func (x *RestoreDatasetVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1416,11 +1372,9 @@ type ListDataItemsRequest struct { func (x *ListDataItemsRequest) Reset() { *x = ListDataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsRequest) String() string { @@ -1431,7 +1385,7 @@ func (*ListDataItemsRequest) ProtoMessage() {} func (x *ListDataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1457,9 @@ type ListDataItemsResponse struct { func (x *ListDataItemsResponse) Reset() { *x = ListDataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsResponse) String() string { @@ -1518,7 +1470,7 @@ func (*ListDataItemsResponse) ProtoMessage() {} func (x *ListDataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1628,11 +1580,9 @@ type SearchDataItemsRequest struct { func (x *SearchDataItemsRequest) Reset() { *x = SearchDataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsRequest) String() string { @@ -1643,7 +1593,7 @@ func (*SearchDataItemsRequest) ProtoMessage() {} func (x *SearchDataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1746,9 @@ type SearchDataItemsResponse struct { func (x *SearchDataItemsResponse) Reset() { *x = SearchDataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsResponse) String() string { @@ -1811,7 +1759,7 @@ func (*SearchDataItemsResponse) ProtoMessage() {} func (x *SearchDataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1811,9 @@ type DataItemView struct { func (x *DataItemView) Reset() { *x = DataItemView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataItemView) String() string { @@ -1878,7 +1824,7 @@ func (*DataItemView) ProtoMessage() {} func (x *DataItemView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,11 +1886,9 @@ type ListSavedQueriesRequest struct { func (x *ListSavedQueriesRequest) Reset() { *x = ListSavedQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesRequest) String() string { @@ -1955,7 +1899,7 @@ func (*ListSavedQueriesRequest) ProtoMessage() {} func (x *ListSavedQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2027,11 +1971,9 @@ type ListSavedQueriesResponse struct { func (x *ListSavedQueriesResponse) Reset() { *x = ListSavedQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesResponse) String() string { @@ -2042,7 +1984,7 @@ func (*ListSavedQueriesResponse) ProtoMessage() {} func (x *ListSavedQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2086,11 +2028,9 @@ type DeleteSavedQueryRequest struct { func (x *DeleteSavedQueryRequest) Reset() { *x = DeleteSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSavedQueryRequest) String() string { @@ -2101,7 +2041,7 @@ func (*DeleteSavedQueryRequest) ProtoMessage() {} func (x *DeleteSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2140,11 +2080,9 @@ type GetAnnotationSpecRequest struct { func (x *GetAnnotationSpecRequest) Reset() { *x = GetAnnotationSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationSpecRequest) String() string { @@ -2155,7 +2093,7 @@ func (*GetAnnotationSpecRequest) ProtoMessage() {} func (x *GetAnnotationSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2210,11 +2148,9 @@ type ListAnnotationsRequest struct { func (x *ListAnnotationsRequest) Reset() { *x = ListAnnotationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsRequest) String() string { @@ -2225,7 +2161,7 @@ func (*ListAnnotationsRequest) ProtoMessage() {} func (x *ListAnnotationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2297,11 +2233,9 @@ type ListAnnotationsResponse struct { func (x *ListAnnotationsResponse) Reset() { *x = ListAnnotationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsResponse) String() string { @@ -2312,7 +2246,7 @@ func (*ListAnnotationsResponse) ProtoMessage() {} func (x *ListAnnotationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2358,11 +2292,9 @@ type SearchDataItemsRequest_OrderByAnnotation struct { func (x *SearchDataItemsRequest_OrderByAnnotation) Reset() { *x = SearchDataItemsRequest_OrderByAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsRequest_OrderByAnnotation) String() string { @@ -2373,7 +2305,7 @@ func (*SearchDataItemsRequest_OrderByAnnotation) ProtoMessage() {} func (x *SearchDataItemsRequest_OrderByAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,416 +3214,6 @@ func file_google_cloud_aiplatform_v1_dataset_service_proto_init() { file_google_cloud_aiplatform_v1_model_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_saved_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatasetVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DataItemView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsRequest_OrderByAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_dataset_service_proto_msgTypes[24].OneofWrappers = []any{ (*SearchDataItemsRequest_OrderByDataItem)(nil), (*SearchDataItemsRequest_OrderByAnnotation_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/dataset_version.pb.go b/aiplatform/apiv1/aiplatformpb/dataset_version.pb.go index 2e11bb8f7961..95589909d483 100755 --- a/aiplatform/apiv1/aiplatformpb/dataset_version.pb.go +++ b/aiplatform/apiv1/aiplatformpb/dataset_version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/dataset_version.proto @@ -72,11 +72,9 @@ type DatasetVersion struct { func (x *DatasetVersion) Reset() { *x = DatasetVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_dataset_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_dataset_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetVersion) String() string { @@ -87,7 +85,7 @@ func (*DatasetVersion) ProtoMessage() {} func (x *DatasetVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_dataset_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,20 +275,6 @@ func file_google_cloud_aiplatform_v1_dataset_version_proto_init() { if File_google_cloud_aiplatform_v1_dataset_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_dataset_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DatasetVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/deployed_index_ref.pb.go b/aiplatform/apiv1/aiplatformpb/deployed_index_ref.pb.go index 689f35a34d47..8e3bb30f79e1 100755 --- a/aiplatform/apiv1/aiplatformpb/deployed_index_ref.pb.go +++ b/aiplatform/apiv1/aiplatformpb/deployed_index_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/deployed_index_ref.proto @@ -52,11 +52,9 @@ type DeployedIndexRef struct { func (x *DeployedIndexRef) Reset() { *x = DeployedIndexRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployed_index_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployed_index_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexRef) String() string { @@ -67,7 +65,7 @@ func (*DeployedIndexRef) ProtoMessage() {} func (x *DeployedIndexRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployed_index_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,20 +171,6 @@ func file_google_cloud_aiplatform_v1_deployed_index_ref_proto_init() { if File_google_cloud_aiplatform_v1_deployed_index_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_deployed_index_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/deployed_model_ref.pb.go b/aiplatform/apiv1/aiplatformpb/deployed_model_ref.pb.go index 0551fd1b27bc..c1d6a7c3f242 100755 --- a/aiplatform/apiv1/aiplatformpb/deployed_model_ref.pb.go +++ b/aiplatform/apiv1/aiplatformpb/deployed_model_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/deployed_model_ref.proto @@ -50,11 +50,9 @@ type DeployedModelRef struct { func (x *DeployedModelRef) Reset() { *x = DeployedModelRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployed_model_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployed_model_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModelRef) String() string { @@ -65,7 +63,7 @@ func (*DeployedModelRef) ProtoMessage() {} func (x *DeployedModelRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployed_model_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,20 +158,6 @@ func file_google_cloud_aiplatform_v1_deployed_model_ref_proto_init() { if File_google_cloud_aiplatform_v1_deployed_model_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_deployed_model_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModelRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/deployment_resource_pool.pb.go b/aiplatform/apiv1/aiplatformpb/deployment_resource_pool.pb.go index 64a3867a29ea..c79d629cc471 100755 --- a/aiplatform/apiv1/aiplatformpb/deployment_resource_pool.pb.go +++ b/aiplatform/apiv1/aiplatformpb/deployment_resource_pool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/deployment_resource_pool.proto @@ -81,11 +81,9 @@ type DeploymentResourcePool struct { func (x *DeploymentResourcePool) Reset() { *x = DeploymentResourcePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeploymentResourcePool) String() string { @@ -96,7 +94,7 @@ func (*DeploymentResourcePool) ProtoMessage() {} func (x *DeploymentResourcePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,20 +279,6 @@ func file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_init() { } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeploymentResourcePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/deployment_resource_pool_service.pb.go b/aiplatform/apiv1/aiplatformpb/deployment_resource_pool_service.pb.go index 8a99b2ae3371..b8261be157ec 100755 --- a/aiplatform/apiv1/aiplatformpb/deployment_resource_pool_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/deployment_resource_pool_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto @@ -65,11 +65,9 @@ type CreateDeploymentResourcePoolRequest struct { func (x *CreateDeploymentResourcePoolRequest) Reset() { *x = CreateDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentResourcePoolRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateDeploymentResourcePoolRequest) ProtoMessage() {} func (x *CreateDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type CreateDeploymentResourcePoolOperationMetadata struct { func (x *CreateDeploymentResourcePoolOperationMetadata) Reset() { *x = CreateDeploymentResourcePoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentResourcePoolOperationMetadata) String() string { @@ -143,7 +139,7 @@ func (*CreateDeploymentResourcePoolOperationMetadata) ProtoMessage() {} func (x *CreateDeploymentResourcePoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +175,9 @@ type GetDeploymentResourcePoolRequest struct { func (x *GetDeploymentResourcePoolRequest) Reset() { *x = GetDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentResourcePoolRequest) String() string { @@ -194,7 +188,7 @@ func (*GetDeploymentResourcePoolRequest) ProtoMessage() {} func (x *GetDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +233,9 @@ type ListDeploymentResourcePoolsRequest struct { func (x *ListDeploymentResourcePoolsRequest) Reset() { *x = ListDeploymentResourcePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentResourcePoolsRequest) String() string { @@ -254,7 +246,7 @@ func (*ListDeploymentResourcePoolsRequest) ProtoMessage() {} func (x *ListDeploymentResourcePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type ListDeploymentResourcePoolsResponse struct { func (x *ListDeploymentResourcePoolsResponse) Reset() { *x = ListDeploymentResourcePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentResourcePoolsResponse) String() string { @@ -320,7 +310,7 @@ func (*ListDeploymentResourcePoolsResponse) ProtoMessage() {} func (x *ListDeploymentResourcePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type UpdateDeploymentResourcePoolRequest struct { func (x *UpdateDeploymentResourcePoolRequest) Reset() { *x = UpdateDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentResourcePoolRequest) String() string { @@ -383,7 +371,7 @@ func (*UpdateDeploymentResourcePoolRequest) ProtoMessage() {} func (x *UpdateDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +412,9 @@ type UpdateDeploymentResourcePoolOperationMetadata struct { func (x *UpdateDeploymentResourcePoolOperationMetadata) Reset() { *x = UpdateDeploymentResourcePoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentResourcePoolOperationMetadata) String() string { @@ -439,7 +425,7 @@ func (*UpdateDeploymentResourcePoolOperationMetadata) ProtoMessage() {} func (x *UpdateDeploymentResourcePoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +461,9 @@ type DeleteDeploymentResourcePoolRequest struct { func (x *DeleteDeploymentResourcePoolRequest) Reset() { *x = DeleteDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeploymentResourcePoolRequest) String() string { @@ -490,7 +474,7 @@ func (*DeleteDeploymentResourcePoolRequest) ProtoMessage() {} func (x *DeleteDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +520,9 @@ type QueryDeployedModelsRequest struct { func (x *QueryDeployedModelsRequest) Reset() { *x = QueryDeployedModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDeployedModelsRequest) String() string { @@ -551,7 +533,7 @@ func (*QueryDeployedModelsRequest) ProtoMessage() {} func (x *QueryDeployedModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +594,9 @@ type QueryDeployedModelsResponse struct { func (x *QueryDeployedModelsResponse) Reset() { *x = QueryDeployedModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDeployedModelsResponse) String() string { @@ -627,7 +607,7 @@ func (*QueryDeployedModelsResponse) ProtoMessage() {} func (x *QueryDeployedModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,128 +1010,6 @@ func file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_init file_google_cloud_aiplatform_v1_deployment_resource_pool_proto_init() file_google_cloud_aiplatform_v1_endpoint_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentResourcePoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentResourcePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentResourcePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentResourcePoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*QueryDeployedModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_deployment_resource_pool_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*QueryDeployedModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/encryption_spec.pb.go b/aiplatform/apiv1/aiplatformpb/encryption_spec.pb.go index bd9bf29ebea9..755d43f1b273 100755 --- a/aiplatform/apiv1/aiplatformpb/encryption_spec.pb.go +++ b/aiplatform/apiv1/aiplatformpb/encryption_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/encryption_spec.proto @@ -53,11 +53,9 @@ type EncryptionSpec struct { func (x *EncryptionSpec) Reset() { *x = EncryptionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_encryption_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_encryption_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionSpec) String() string { @@ -68,7 +66,7 @@ func (*EncryptionSpec) ProtoMessage() {} func (x *EncryptionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_encryption_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,20 +147,6 @@ func file_google_cloud_aiplatform_v1_encryption_spec_proto_init() { if File_google_cloud_aiplatform_v1_encryption_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_encryption_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/endpoint.pb.go b/aiplatform/apiv1/aiplatformpb/endpoint.pb.go index c0fdbb8da407..1b4f03c9ea03 100755 --- a/aiplatform/apiv1/aiplatformpb/endpoint.pb.go +++ b/aiplatform/apiv1/aiplatformpb/endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/endpoint.proto @@ -151,11 +151,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -166,7 +164,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +429,9 @@ type DeployedModel struct { func (x *DeployedModel) Reset() { *x = DeployedModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModel) String() string { @@ -446,7 +442,7 @@ func (*DeployedModel) ProtoMessage() {} func (x *DeployedModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +635,9 @@ type PrivateEndpoints struct { func (x *PrivateEndpoints) Reset() { *x = PrivateEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateEndpoints) String() string { @@ -654,7 +648,7 @@ func (*PrivateEndpoints) ProtoMessage() {} func (x *PrivateEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +713,9 @@ type PredictRequestResponseLoggingConfig struct { func (x *PredictRequestResponseLoggingConfig) Reset() { *x = PredictRequestResponseLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequestResponseLoggingConfig) String() string { @@ -734,7 +726,7 @@ func (*PredictRequestResponseLoggingConfig) ProtoMessage() {} func (x *PredictRequestResponseLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +774,9 @@ type FasterDeploymentConfig struct { func (x *FasterDeploymentConfig) Reset() { *x = FasterDeploymentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FasterDeploymentConfig) String() string { @@ -797,7 +787,7 @@ func (*FasterDeploymentConfig) ProtoMessage() {} func (x *FasterDeploymentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +821,9 @@ type ClientConnectionConfig struct { func (x *ClientConnectionConfig) Reset() { *x = ClientConnectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectionConfig) String() string { @@ -846,7 +834,7 @@ func (*ClientConnectionConfig) ProtoMessage() {} func (x *ClientConnectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +872,9 @@ type DeployedModel_Status struct { func (x *DeployedModel_Status) Reset() { *x = DeployedModel_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModel_Status) String() string { @@ -899,7 +885,7 @@ func (*DeployedModel_Status) ProtoMessage() {} func (x *DeployedModel_Status) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1293,92 +1279,6 @@ func file_google_cloud_aiplatform_v1_endpoint_proto_init() { file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() file_google_cloud_aiplatform_v1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PrivateEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequestResponseLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FasterDeploymentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModel_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_endpoint_proto_msgTypes[1].OneofWrappers = []any{ (*DeployedModel_DedicatedResources)(nil), (*DeployedModel_AutomaticResources)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/endpoint_service.pb.go b/aiplatform/apiv1/aiplatformpb/endpoint_service.pb.go index 751fc619ae1e..c6f449efde1b 100755 --- a/aiplatform/apiv1/aiplatformpb/endpoint_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/endpoint_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/endpoint_service.proto @@ -74,11 +74,9 @@ type CreateEndpointRequest struct { func (x *CreateEndpointRequest) Reset() { *x = CreateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointRequest) String() string { @@ -89,7 +87,7 @@ func (*CreateEndpointRequest) ProtoMessage() {} func (x *CreateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type CreateEndpointOperationMetadata struct { func (x *CreateEndpointOperationMetadata) Reset() { *x = CreateEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointOperationMetadata) String() string { @@ -153,7 +149,7 @@ func (*CreateEndpointOperationMetadata) ProtoMessage() {} func (x *CreateEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type GetEndpointRequest struct { func (x *GetEndpointRequest) Reset() { *x = GetEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointRequest) String() string { @@ -205,7 +199,7 @@ func (*GetEndpointRequest) ProtoMessage() {} func (x *GetEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +276,9 @@ type ListEndpointsRequest struct { func (x *ListEndpointsRequest) Reset() { *x = ListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsRequest) String() string { @@ -297,7 +289,7 @@ func (*ListEndpointsRequest) ProtoMessage() {} func (x *ListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +364,9 @@ type ListEndpointsResponse struct { func (x *ListEndpointsResponse) Reset() { *x = ListEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsResponse) String() string { @@ -387,7 +377,7 @@ func (*ListEndpointsResponse) ProtoMessage() {} func (x *ListEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type UpdateEndpointRequest struct { func (x *UpdateEndpointRequest) Reset() { *x = UpdateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointRequest) String() string { @@ -447,7 +435,7 @@ func (*UpdateEndpointRequest) ProtoMessage() {} func (x *UpdateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +479,9 @@ type UpdateEndpointLongRunningRequest struct { func (x *UpdateEndpointLongRunningRequest) Reset() { *x = UpdateEndpointLongRunningRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointLongRunningRequest) String() string { @@ -506,7 +492,7 @@ func (*UpdateEndpointLongRunningRequest) ProtoMessage() {} func (x *UpdateEndpointLongRunningRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +527,9 @@ type UpdateEndpointOperationMetadata struct { func (x *UpdateEndpointOperationMetadata) Reset() { *x = UpdateEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointOperationMetadata) String() string { @@ -556,7 +540,7 @@ func (*UpdateEndpointOperationMetadata) ProtoMessage() {} func (x *UpdateEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +577,9 @@ type DeleteEndpointRequest struct { func (x *DeleteEndpointRequest) Reset() { *x = DeleteEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointRequest) String() string { @@ -608,7 +590,7 @@ func (*DeleteEndpointRequest) ProtoMessage() {} func (x *DeleteEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +647,9 @@ type DeployModelRequest struct { func (x *DeployModelRequest) Reset() { *x = DeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelRequest) String() string { @@ -680,7 +660,7 @@ func (*DeployModelRequest) ProtoMessage() {} func (x *DeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +709,9 @@ type DeployModelResponse struct { func (x *DeployModelResponse) Reset() { *x = DeployModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelResponse) String() string { @@ -744,7 +722,7 @@ func (*DeployModelResponse) ProtoMessage() {} func (x *DeployModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +757,9 @@ type DeployModelOperationMetadata struct { func (x *DeployModelOperationMetadata) Reset() { *x = DeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelOperationMetadata) String() string { @@ -794,7 +770,7 @@ func (*DeployModelOperationMetadata) ProtoMessage() {} func (x *DeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +817,9 @@ type UndeployModelRequest struct { func (x *UndeployModelRequest) Reset() { *x = UndeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelRequest) String() string { @@ -856,7 +830,7 @@ func (*UndeployModelRequest) ProtoMessage() {} func (x *UndeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +876,9 @@ type UndeployModelResponse struct { func (x *UndeployModelResponse) Reset() { *x = UndeployModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelResponse) String() string { @@ -917,7 +889,7 @@ func (*UndeployModelResponse) ProtoMessage() {} func (x *UndeployModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +917,9 @@ type UndeployModelOperationMetadata struct { func (x *UndeployModelOperationMetadata) Reset() { *x = UndeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelOperationMetadata) String() string { @@ -960,7 +930,7 @@ func (*UndeployModelOperationMetadata) ProtoMessage() {} func (x *UndeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +983,9 @@ type MutateDeployedModelRequest struct { func (x *MutateDeployedModelRequest) Reset() { *x = MutateDeployedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelRequest) String() string { @@ -1028,7 +996,7 @@ func (*MutateDeployedModelRequest) ProtoMessage() {} func (x *MutateDeployedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1045,9 @@ type MutateDeployedModelResponse struct { func (x *MutateDeployedModelResponse) Reset() { *x = MutateDeployedModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelResponse) String() string { @@ -1092,7 +1058,7 @@ func (*MutateDeployedModelResponse) ProtoMessage() {} func (x *MutateDeployedModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1093,9 @@ type MutateDeployedModelOperationMetadata struct { func (x *MutateDeployedModelOperationMetadata) Reset() { *x = MutateDeployedModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelOperationMetadata) String() string { @@ -1142,7 +1106,7 @@ func (*MutateDeployedModelOperationMetadata) ProtoMessage() {} func (x *MutateDeployedModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1618,224 +1582,6 @@ func file_google_cloud_aiplatform_v1_endpoint_service_proto_init() { } file_google_cloud_aiplatform_v1_endpoint_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointLongRunningRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_endpoint_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/entity_type.pb.go b/aiplatform/apiv1/aiplatformpb/entity_type.pb.go index 5ad8b0caf420..4a3f2029c4b7 100755 --- a/aiplatform/apiv1/aiplatformpb/entity_type.pb.go +++ b/aiplatform/apiv1/aiplatformpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/entity_type.proto @@ -100,11 +100,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -115,7 +113,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,20 +316,6 @@ func file_google_cloud_aiplatform_v1_entity_type_proto_init() { return } file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/env_var.pb.go b/aiplatform/apiv1/aiplatformpb/env_var.pb.go index a5b23a3f9c0c..960c203dd094 100755 --- a/aiplatform/apiv1/aiplatformpb/env_var.pb.go +++ b/aiplatform/apiv1/aiplatformpb/env_var.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/env_var.proto @@ -56,11 +56,9 @@ type EnvVar struct { func (x *EnvVar) Reset() { *x = EnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_env_var_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_env_var_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvVar) String() string { @@ -71,7 +69,7 @@ func (*EnvVar) ProtoMessage() {} func (x *EnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_env_var_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,20 +158,6 @@ func file_google_cloud_aiplatform_v1_env_var_proto_init() { if File_google_cloud_aiplatform_v1_env_var_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_env_var_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/evaluated_annotation.pb.go b/aiplatform/apiv1/aiplatformpb/evaluated_annotation.pb.go index 822a971ffcd4..f299711a7a85 100755 --- a/aiplatform/apiv1/aiplatformpb/evaluated_annotation.pb.go +++ b/aiplatform/apiv1/aiplatformpb/evaluated_annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/evaluated_annotation.proto @@ -227,11 +227,9 @@ type EvaluatedAnnotation struct { func (x *EvaluatedAnnotation) Reset() { *x = EvaluatedAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluatedAnnotation) String() string { @@ -242,7 +240,7 @@ func (*EvaluatedAnnotation) ProtoMessage() {} func (x *EvaluatedAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,11 +323,9 @@ type EvaluatedAnnotationExplanation struct { func (x *EvaluatedAnnotationExplanation) Reset() { *x = EvaluatedAnnotationExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluatedAnnotationExplanation) String() string { @@ -340,7 +336,7 @@ func (*EvaluatedAnnotationExplanation) ProtoMessage() {} func (x *EvaluatedAnnotationExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +385,9 @@ type ErrorAnalysisAnnotation struct { func (x *ErrorAnalysisAnnotation) Reset() { *x = ErrorAnalysisAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorAnalysisAnnotation) String() string { @@ -404,7 +398,7 @@ func (*ErrorAnalysisAnnotation) ProtoMessage() {} func (x *ErrorAnalysisAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +457,9 @@ type ErrorAnalysisAnnotation_AttributedItem struct { func (x *ErrorAnalysisAnnotation_AttributedItem) Reset() { *x = ErrorAnalysisAnnotation_AttributedItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorAnalysisAnnotation_AttributedItem) String() string { @@ -478,7 +470,7 @@ func (*ErrorAnalysisAnnotation_AttributedItem) ProtoMessage() {} func (x *ErrorAnalysisAnnotation_AttributedItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,56 +666,6 @@ func file_google_cloud_aiplatform_v1_evaluated_annotation_proto_init() { return } file_google_cloud_aiplatform_v1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluatedAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluatedAnnotationExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ErrorAnalysisAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluated_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ErrorAnalysisAnnotation_AttributedItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/evaluation_service.pb.go b/aiplatform/apiv1/aiplatformpb/evaluation_service.pb.go index d0f9008c7108..06c7f7b6438b 100755 --- a/aiplatform/apiv1/aiplatformpb/evaluation_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/evaluation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/evaluation_service.proto @@ -248,11 +248,9 @@ type EvaluateInstancesRequest struct { func (x *EvaluateInstancesRequest) Reset() { *x = EvaluateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateInstancesRequest) String() string { @@ -263,7 +261,7 @@ func (*EvaluateInstancesRequest) ProtoMessage() {} func (x *EvaluateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +703,9 @@ type EvaluateInstancesResponse struct { func (x *EvaluateInstancesResponse) Reset() { *x = EvaluateInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateInstancesResponse) String() string { @@ -720,7 +716,7 @@ func (*EvaluateInstancesResponse) ProtoMessage() {} func (x *EvaluateInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1135,11 +1131,9 @@ type ExactMatchInput struct { func (x *ExactMatchInput) Reset() { *x = ExactMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchInput) String() string { @@ -1150,7 +1144,7 @@ func (*ExactMatchInput) ProtoMessage() {} func (x *ExactMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1187,9 @@ type ExactMatchInstance struct { func (x *ExactMatchInstance) Reset() { *x = ExactMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchInstance) String() string { @@ -1208,7 +1200,7 @@ func (*ExactMatchInstance) ProtoMessage() {} func (x *ExactMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1247,11 +1239,9 @@ type ExactMatchSpec struct { func (x *ExactMatchSpec) Reset() { *x = ExactMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchSpec) String() string { @@ -1262,7 +1252,7 @@ func (*ExactMatchSpec) ProtoMessage() {} func (x *ExactMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1279,9 @@ type ExactMatchResults struct { func (x *ExactMatchResults) Reset() { *x = ExactMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchResults) String() string { @@ -1304,7 +1292,7 @@ func (*ExactMatchResults) ProtoMessage() {} func (x *ExactMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1326,9 @@ type ExactMatchMetricValue struct { func (x *ExactMatchMetricValue) Reset() { *x = ExactMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchMetricValue) String() string { @@ -1353,7 +1339,7 @@ func (*ExactMatchMetricValue) ProtoMessage() {} func (x *ExactMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1389,11 +1375,9 @@ type BleuInput struct { func (x *BleuInput) Reset() { *x = BleuInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuInput) String() string { @@ -1404,7 +1388,7 @@ func (*BleuInput) ProtoMessage() {} func (x *BleuInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,11 +1431,9 @@ type BleuInstance struct { func (x *BleuInstance) Reset() { *x = BleuInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuInstance) String() string { @@ -1462,7 +1444,7 @@ func (*BleuInstance) ProtoMessage() {} func (x *BleuInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1504,11 +1486,9 @@ type BleuSpec struct { func (x *BleuSpec) Reset() { *x = BleuSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuSpec) String() string { @@ -1519,7 +1499,7 @@ func (*BleuSpec) ProtoMessage() {} func (x *BleuSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1553,11 +1533,9 @@ type BleuResults struct { func (x *BleuResults) Reset() { *x = BleuResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuResults) String() string { @@ -1568,7 +1546,7 @@ func (*BleuResults) ProtoMessage() {} func (x *BleuResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1602,11 +1580,9 @@ type BleuMetricValue struct { func (x *BleuMetricValue) Reset() { *x = BleuMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuMetricValue) String() string { @@ -1617,7 +1593,7 @@ func (*BleuMetricValue) ProtoMessage() {} func (x *BleuMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1629,9 @@ type RougeInput struct { func (x *RougeInput) Reset() { *x = RougeInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeInput) String() string { @@ -1668,7 +1642,7 @@ func (*RougeInput) ProtoMessage() {} func (x *RougeInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,11 +1685,9 @@ type RougeInstance struct { func (x *RougeInstance) Reset() { *x = RougeInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeInstance) String() string { @@ -1726,7 +1698,7 @@ func (*RougeInstance) ProtoMessage() {} func (x *RougeInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1744,9 @@ type RougeSpec struct { func (x *RougeSpec) Reset() { *x = RougeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeSpec) String() string { @@ -1787,7 +1757,7 @@ func (*RougeSpec) ProtoMessage() {} func (x *RougeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1835,11 +1805,9 @@ type RougeResults struct { func (x *RougeResults) Reset() { *x = RougeResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeResults) String() string { @@ -1850,7 +1818,7 @@ func (*RougeResults) ProtoMessage() {} func (x *RougeResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,11 +1852,9 @@ type RougeMetricValue struct { func (x *RougeMetricValue) Reset() { *x = RougeMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeMetricValue) String() string { @@ -1899,7 +1865,7 @@ func (*RougeMetricValue) ProtoMessage() {} func (x *RougeMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1935,11 +1901,9 @@ type CoherenceInput struct { func (x *CoherenceInput) Reset() { *x = CoherenceInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceInput) String() string { @@ -1950,7 +1914,7 @@ func (*CoherenceInput) ProtoMessage() {} func (x *CoherenceInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1955,9 @@ type CoherenceInstance struct { func (x *CoherenceInstance) Reset() { *x = CoherenceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceInstance) String() string { @@ -2006,7 +1968,7 @@ func (*CoherenceInstance) ProtoMessage() {} func (x *CoherenceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2040,11 +2002,9 @@ type CoherenceSpec struct { func (x *CoherenceSpec) Reset() { *x = CoherenceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceSpec) String() string { @@ -2055,7 +2015,7 @@ func (*CoherenceSpec) ProtoMessage() {} func (x *CoherenceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2093,11 +2053,9 @@ type CoherenceResult struct { func (x *CoherenceResult) Reset() { *x = CoherenceResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceResult) String() string { @@ -2108,7 +2066,7 @@ func (*CoherenceResult) ProtoMessage() {} func (x *CoherenceResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2158,11 +2116,9 @@ type FluencyInput struct { func (x *FluencyInput) Reset() { *x = FluencyInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyInput) String() string { @@ -2173,7 +2129,7 @@ func (*FluencyInput) ProtoMessage() {} func (x *FluencyInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2214,11 +2170,9 @@ type FluencyInstance struct { func (x *FluencyInstance) Reset() { *x = FluencyInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyInstance) String() string { @@ -2229,7 +2183,7 @@ func (*FluencyInstance) ProtoMessage() {} func (x *FluencyInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2263,11 +2217,9 @@ type FluencySpec struct { func (x *FluencySpec) Reset() { *x = FluencySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencySpec) String() string { @@ -2278,7 +2230,7 @@ func (*FluencySpec) ProtoMessage() {} func (x *FluencySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2316,11 +2268,9 @@ type FluencyResult struct { func (x *FluencyResult) Reset() { *x = FluencyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyResult) String() string { @@ -2331,7 +2281,7 @@ func (*FluencyResult) ProtoMessage() {} func (x *FluencyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2381,11 +2331,9 @@ type SafetyInput struct { func (x *SafetyInput) Reset() { *x = SafetyInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyInput) String() string { @@ -2396,7 +2344,7 @@ func (*SafetyInput) ProtoMessage() {} func (x *SafetyInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2437,11 +2385,9 @@ type SafetyInstance struct { func (x *SafetyInstance) Reset() { *x = SafetyInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyInstance) String() string { @@ -2452,7 +2398,7 @@ func (*SafetyInstance) ProtoMessage() {} func (x *SafetyInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2486,11 +2432,9 @@ type SafetySpec struct { func (x *SafetySpec) Reset() { *x = SafetySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySpec) String() string { @@ -2501,7 +2445,7 @@ func (*SafetySpec) ProtoMessage() {} func (x *SafetySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2539,11 +2483,9 @@ type SafetyResult struct { func (x *SafetyResult) Reset() { *x = SafetyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyResult) String() string { @@ -2554,7 +2496,7 @@ func (*SafetyResult) ProtoMessage() {} func (x *SafetyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2604,11 +2546,9 @@ type GroundednessInput struct { func (x *GroundednessInput) Reset() { *x = GroundednessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessInput) String() string { @@ -2619,7 +2559,7 @@ func (*GroundednessInput) ProtoMessage() {} func (x *GroundednessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2663,11 +2603,9 @@ type GroundednessInstance struct { func (x *GroundednessInstance) Reset() { *x = GroundednessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessInstance) String() string { @@ -2678,7 +2616,7 @@ func (*GroundednessInstance) ProtoMessage() {} func (x *GroundednessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2719,11 +2657,9 @@ type GroundednessSpec struct { func (x *GroundednessSpec) Reset() { *x = GroundednessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessSpec) String() string { @@ -2734,7 +2670,7 @@ func (*GroundednessSpec) ProtoMessage() {} func (x *GroundednessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2772,11 +2708,9 @@ type GroundednessResult struct { func (x *GroundednessResult) Reset() { *x = GroundednessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessResult) String() string { @@ -2787,7 +2721,7 @@ func (*GroundednessResult) ProtoMessage() {} func (x *GroundednessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2837,11 +2771,9 @@ type FulfillmentInput struct { func (x *FulfillmentInput) Reset() { *x = FulfillmentInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInput) String() string { @@ -2852,7 +2784,7 @@ func (*FulfillmentInput) ProtoMessage() {} func (x *FulfillmentInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2895,11 +2827,9 @@ type FulfillmentInstance struct { func (x *FulfillmentInstance) Reset() { *x = FulfillmentInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInstance) String() string { @@ -2910,7 +2840,7 @@ func (*FulfillmentInstance) ProtoMessage() {} func (x *FulfillmentInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2951,11 +2881,9 @@ type FulfillmentSpec struct { func (x *FulfillmentSpec) Reset() { *x = FulfillmentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentSpec) String() string { @@ -2966,7 +2894,7 @@ func (*FulfillmentSpec) ProtoMessage() {} func (x *FulfillmentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3004,11 +2932,9 @@ type FulfillmentResult struct { func (x *FulfillmentResult) Reset() { *x = FulfillmentResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentResult) String() string { @@ -3019,7 +2945,7 @@ func (*FulfillmentResult) ProtoMessage() {} func (x *FulfillmentResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3069,11 +2995,9 @@ type SummarizationQualityInput struct { func (x *SummarizationQualityInput) Reset() { *x = SummarizationQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityInput) String() string { @@ -3084,7 +3008,7 @@ func (*SummarizationQualityInput) ProtoMessage() {} func (x *SummarizationQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3131,11 +3055,9 @@ type SummarizationQualityInstance struct { func (x *SummarizationQualityInstance) Reset() { *x = SummarizationQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityInstance) String() string { @@ -3146,7 +3068,7 @@ func (*SummarizationQualityInstance) ProtoMessage() {} func (x *SummarizationQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3204,11 +3126,9 @@ type SummarizationQualitySpec struct { func (x *SummarizationQualitySpec) Reset() { *x = SummarizationQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualitySpec) String() string { @@ -3219,7 +3139,7 @@ func (*SummarizationQualitySpec) ProtoMessage() {} func (x *SummarizationQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3264,11 +3184,9 @@ type SummarizationQualityResult struct { func (x *SummarizationQualityResult) Reset() { *x = SummarizationQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityResult) String() string { @@ -3279,7 +3197,7 @@ func (*SummarizationQualityResult) ProtoMessage() {} func (x *SummarizationQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3329,11 +3247,9 @@ type PairwiseSummarizationQualityInput struct { func (x *PairwiseSummarizationQualityInput) Reset() { *x = PairwiseSummarizationQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityInput) String() string { @@ -3344,7 +3260,7 @@ func (*PairwiseSummarizationQualityInput) ProtoMessage() {} func (x *PairwiseSummarizationQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3393,11 +3309,9 @@ type PairwiseSummarizationQualityInstance struct { func (x *PairwiseSummarizationQualityInstance) Reset() { *x = PairwiseSummarizationQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityInstance) String() string { @@ -3408,7 +3322,7 @@ func (*PairwiseSummarizationQualityInstance) ProtoMessage() {} func (x *PairwiseSummarizationQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3473,11 +3387,9 @@ type PairwiseSummarizationQualitySpec struct { func (x *PairwiseSummarizationQualitySpec) Reset() { *x = PairwiseSummarizationQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualitySpec) String() string { @@ -3488,7 +3400,7 @@ func (*PairwiseSummarizationQualitySpec) ProtoMessage() {} func (x *PairwiseSummarizationQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3533,11 +3445,9 @@ type PairwiseSummarizationQualityResult struct { func (x *PairwiseSummarizationQualityResult) Reset() { *x = PairwiseSummarizationQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityResult) String() string { @@ -3548,7 +3458,7 @@ func (*PairwiseSummarizationQualityResult) ProtoMessage() {} func (x *PairwiseSummarizationQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3598,11 +3508,9 @@ type SummarizationHelpfulnessInput struct { func (x *SummarizationHelpfulnessInput) Reset() { *x = SummarizationHelpfulnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessInput) String() string { @@ -3613,7 +3521,7 @@ func (*SummarizationHelpfulnessInput) ProtoMessage() {} func (x *SummarizationHelpfulnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3660,11 +3568,9 @@ type SummarizationHelpfulnessInstance struct { func (x *SummarizationHelpfulnessInstance) Reset() { *x = SummarizationHelpfulnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessInstance) String() string { @@ -3675,7 +3581,7 @@ func (*SummarizationHelpfulnessInstance) ProtoMessage() {} func (x *SummarizationHelpfulnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3733,11 +3639,9 @@ type SummarizationHelpfulnessSpec struct { func (x *SummarizationHelpfulnessSpec) Reset() { *x = SummarizationHelpfulnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessSpec) String() string { @@ -3748,7 +3652,7 @@ func (*SummarizationHelpfulnessSpec) ProtoMessage() {} func (x *SummarizationHelpfulnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3793,11 +3697,9 @@ type SummarizationHelpfulnessResult struct { func (x *SummarizationHelpfulnessResult) Reset() { *x = SummarizationHelpfulnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessResult) String() string { @@ -3808,7 +3710,7 @@ func (*SummarizationHelpfulnessResult) ProtoMessage() {} func (x *SummarizationHelpfulnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3858,11 +3760,9 @@ type SummarizationVerbosityInput struct { func (x *SummarizationVerbosityInput) Reset() { *x = SummarizationVerbosityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityInput) String() string { @@ -3873,7 +3773,7 @@ func (*SummarizationVerbosityInput) ProtoMessage() {} func (x *SummarizationVerbosityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3920,11 +3820,9 @@ type SummarizationVerbosityInstance struct { func (x *SummarizationVerbosityInstance) Reset() { *x = SummarizationVerbosityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityInstance) String() string { @@ -3935,7 +3833,7 @@ func (*SummarizationVerbosityInstance) ProtoMessage() {} func (x *SummarizationVerbosityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3993,11 +3891,9 @@ type SummarizationVerbositySpec struct { func (x *SummarizationVerbositySpec) Reset() { *x = SummarizationVerbositySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbositySpec) String() string { @@ -4008,7 +3904,7 @@ func (*SummarizationVerbositySpec) ProtoMessage() {} func (x *SummarizationVerbositySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4053,11 +3949,9 @@ type SummarizationVerbosityResult struct { func (x *SummarizationVerbosityResult) Reset() { *x = SummarizationVerbosityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityResult) String() string { @@ -4068,7 +3962,7 @@ func (*SummarizationVerbosityResult) ProtoMessage() {} func (x *SummarizationVerbosityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4118,11 +4012,9 @@ type QuestionAnsweringQualityInput struct { func (x *QuestionAnsweringQualityInput) Reset() { *x = QuestionAnsweringQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityInput) String() string { @@ -4133,7 +4025,7 @@ func (*QuestionAnsweringQualityInput) ProtoMessage() {} func (x *QuestionAnsweringQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4180,11 +4072,9 @@ type QuestionAnsweringQualityInstance struct { func (x *QuestionAnsweringQualityInstance) Reset() { *x = QuestionAnsweringQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityInstance) String() string { @@ -4195,7 +4085,7 @@ func (*QuestionAnsweringQualityInstance) ProtoMessage() {} func (x *QuestionAnsweringQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4253,11 +4143,9 @@ type QuestionAnsweringQualitySpec struct { func (x *QuestionAnsweringQualitySpec) Reset() { *x = QuestionAnsweringQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualitySpec) String() string { @@ -4268,7 +4156,7 @@ func (*QuestionAnsweringQualitySpec) ProtoMessage() {} func (x *QuestionAnsweringQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4313,11 +4201,9 @@ type QuestionAnsweringQualityResult struct { func (x *QuestionAnsweringQualityResult) Reset() { *x = QuestionAnsweringQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityResult) String() string { @@ -4328,7 +4214,7 @@ func (*QuestionAnsweringQualityResult) ProtoMessage() {} func (x *QuestionAnsweringQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4378,11 +4264,9 @@ type PairwiseQuestionAnsweringQualityInput struct { func (x *PairwiseQuestionAnsweringQualityInput) Reset() { *x = PairwiseQuestionAnsweringQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityInput) String() string { @@ -4393,7 +4277,7 @@ func (*PairwiseQuestionAnsweringQualityInput) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4442,11 +4326,9 @@ type PairwiseQuestionAnsweringQualityInstance struct { func (x *PairwiseQuestionAnsweringQualityInstance) Reset() { *x = PairwiseQuestionAnsweringQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityInstance) String() string { @@ -4457,7 +4339,7 @@ func (*PairwiseQuestionAnsweringQualityInstance) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4522,11 +4404,9 @@ type PairwiseQuestionAnsweringQualitySpec struct { func (x *PairwiseQuestionAnsweringQualitySpec) Reset() { *x = PairwiseQuestionAnsweringQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualitySpec) String() string { @@ -4537,7 +4417,7 @@ func (*PairwiseQuestionAnsweringQualitySpec) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4582,11 +4462,9 @@ type PairwiseQuestionAnsweringQualityResult struct { func (x *PairwiseQuestionAnsweringQualityResult) Reset() { *x = PairwiseQuestionAnsweringQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityResult) String() string { @@ -4597,7 +4475,7 @@ func (*PairwiseQuestionAnsweringQualityResult) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4647,11 +4525,9 @@ type QuestionAnsweringRelevanceInput struct { func (x *QuestionAnsweringRelevanceInput) Reset() { *x = QuestionAnsweringRelevanceInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceInput) String() string { @@ -4662,7 +4538,7 @@ func (*QuestionAnsweringRelevanceInput) ProtoMessage() {} func (x *QuestionAnsweringRelevanceInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4709,11 +4585,9 @@ type QuestionAnsweringRelevanceInstance struct { func (x *QuestionAnsweringRelevanceInstance) Reset() { *x = QuestionAnsweringRelevanceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceInstance) String() string { @@ -4724,7 +4598,7 @@ func (*QuestionAnsweringRelevanceInstance) ProtoMessage() {} func (x *QuestionAnsweringRelevanceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4782,11 +4656,9 @@ type QuestionAnsweringRelevanceSpec struct { func (x *QuestionAnsweringRelevanceSpec) Reset() { *x = QuestionAnsweringRelevanceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceSpec) String() string { @@ -4797,7 +4669,7 @@ func (*QuestionAnsweringRelevanceSpec) ProtoMessage() {} func (x *QuestionAnsweringRelevanceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4842,11 +4714,9 @@ type QuestionAnsweringRelevanceResult struct { func (x *QuestionAnsweringRelevanceResult) Reset() { *x = QuestionAnsweringRelevanceResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceResult) String() string { @@ -4857,7 +4727,7 @@ func (*QuestionAnsweringRelevanceResult) ProtoMessage() {} func (x *QuestionAnsweringRelevanceResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4907,11 +4777,9 @@ type QuestionAnsweringHelpfulnessInput struct { func (x *QuestionAnsweringHelpfulnessInput) Reset() { *x = QuestionAnsweringHelpfulnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessInput) String() string { @@ -4922,7 +4790,7 @@ func (*QuestionAnsweringHelpfulnessInput) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4969,11 +4837,9 @@ type QuestionAnsweringHelpfulnessInstance struct { func (x *QuestionAnsweringHelpfulnessInstance) Reset() { *x = QuestionAnsweringHelpfulnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessInstance) String() string { @@ -4984,7 +4850,7 @@ func (*QuestionAnsweringHelpfulnessInstance) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5042,11 +4908,9 @@ type QuestionAnsweringHelpfulnessSpec struct { func (x *QuestionAnsweringHelpfulnessSpec) Reset() { *x = QuestionAnsweringHelpfulnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessSpec) String() string { @@ -5057,7 +4921,7 @@ func (*QuestionAnsweringHelpfulnessSpec) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5102,11 +4966,9 @@ type QuestionAnsweringHelpfulnessResult struct { func (x *QuestionAnsweringHelpfulnessResult) Reset() { *x = QuestionAnsweringHelpfulnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessResult) String() string { @@ -5117,7 +4979,7 @@ func (*QuestionAnsweringHelpfulnessResult) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5167,11 +5029,9 @@ type QuestionAnsweringCorrectnessInput struct { func (x *QuestionAnsweringCorrectnessInput) Reset() { *x = QuestionAnsweringCorrectnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessInput) String() string { @@ -5182,7 +5042,7 @@ func (*QuestionAnsweringCorrectnessInput) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5229,11 +5089,9 @@ type QuestionAnsweringCorrectnessInstance struct { func (x *QuestionAnsweringCorrectnessInstance) Reset() { *x = QuestionAnsweringCorrectnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessInstance) String() string { @@ -5244,7 +5102,7 @@ func (*QuestionAnsweringCorrectnessInstance) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5302,11 +5160,9 @@ type QuestionAnsweringCorrectnessSpec struct { func (x *QuestionAnsweringCorrectnessSpec) Reset() { *x = QuestionAnsweringCorrectnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessSpec) String() string { @@ -5317,7 +5173,7 @@ func (*QuestionAnsweringCorrectnessSpec) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5362,11 +5218,9 @@ type QuestionAnsweringCorrectnessResult struct { func (x *QuestionAnsweringCorrectnessResult) Reset() { *x = QuestionAnsweringCorrectnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessResult) String() string { @@ -5377,7 +5231,7 @@ func (*QuestionAnsweringCorrectnessResult) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5427,11 +5281,9 @@ type PointwiseMetricInput struct { func (x *PointwiseMetricInput) Reset() { *x = PointwiseMetricInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricInput) String() string { @@ -5442,7 +5294,7 @@ func (*PointwiseMetricInput) ProtoMessage() {} func (x *PointwiseMetricInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5488,11 +5340,9 @@ type PointwiseMetricInstance struct { func (x *PointwiseMetricInstance) Reset() { *x = PointwiseMetricInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricInstance) String() string { @@ -5503,7 +5353,7 @@ func (*PointwiseMetricInstance) ProtoMessage() {} func (x *PointwiseMetricInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5557,11 +5407,9 @@ type PointwiseMetricSpec struct { func (x *PointwiseMetricSpec) Reset() { *x = PointwiseMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricSpec) String() string { @@ -5572,7 +5420,7 @@ func (*PointwiseMetricSpec) ProtoMessage() {} func (x *PointwiseMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5608,11 +5456,9 @@ type PointwiseMetricResult struct { func (x *PointwiseMetricResult) Reset() { *x = PointwiseMetricResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricResult) String() string { @@ -5623,7 +5469,7 @@ func (*PointwiseMetricResult) ProtoMessage() {} func (x *PointwiseMetricResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5666,11 +5512,9 @@ type PairwiseMetricInput struct { func (x *PairwiseMetricInput) Reset() { *x = PairwiseMetricInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricInput) String() string { @@ -5681,7 +5525,7 @@ func (*PairwiseMetricInput) ProtoMessage() {} func (x *PairwiseMetricInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5727,11 +5571,9 @@ type PairwiseMetricInstance struct { func (x *PairwiseMetricInstance) Reset() { *x = PairwiseMetricInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricInstance) String() string { @@ -5742,7 +5584,7 @@ func (*PairwiseMetricInstance) ProtoMessage() {} func (x *PairwiseMetricInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5796,11 +5638,9 @@ type PairwiseMetricSpec struct { func (x *PairwiseMetricSpec) Reset() { *x = PairwiseMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricSpec) String() string { @@ -5811,7 +5651,7 @@ func (*PairwiseMetricSpec) ProtoMessage() {} func (x *PairwiseMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5847,11 +5687,9 @@ type PairwiseMetricResult struct { func (x *PairwiseMetricResult) Reset() { *x = PairwiseMetricResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricResult) String() string { @@ -5862,7 +5700,7 @@ func (*PairwiseMetricResult) ProtoMessage() {} func (x *PairwiseMetricResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5905,11 +5743,9 @@ type ToolCallValidInput struct { func (x *ToolCallValidInput) Reset() { *x = ToolCallValidInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidInput) String() string { @@ -5920,7 +5756,7 @@ func (*ToolCallValidInput) ProtoMessage() {} func (x *ToolCallValidInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5958,11 +5794,9 @@ type ToolCallValidSpec struct { func (x *ToolCallValidSpec) Reset() { *x = ToolCallValidSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidSpec) String() string { @@ -5973,7 +5807,7 @@ func (*ToolCallValidSpec) ProtoMessage() {} func (x *ToolCallValidSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6002,11 +5836,9 @@ type ToolCallValidInstance struct { func (x *ToolCallValidInstance) Reset() { *x = ToolCallValidInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidInstance) String() string { @@ -6017,7 +5849,7 @@ func (*ToolCallValidInstance) ProtoMessage() {} func (x *ToolCallValidInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6058,11 +5890,9 @@ type ToolCallValidResults struct { func (x *ToolCallValidResults) Reset() { *x = ToolCallValidResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidResults) String() string { @@ -6073,7 +5903,7 @@ func (*ToolCallValidResults) ProtoMessage() {} func (x *ToolCallValidResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6107,11 +5937,9 @@ type ToolCallValidMetricValue struct { func (x *ToolCallValidMetricValue) Reset() { *x = ToolCallValidMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidMetricValue) String() string { @@ -6122,7 +5950,7 @@ func (*ToolCallValidMetricValue) ProtoMessage() {} func (x *ToolCallValidMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6158,11 +5986,9 @@ type ToolNameMatchInput struct { func (x *ToolNameMatchInput) Reset() { *x = ToolNameMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchInput) String() string { @@ -6173,7 +5999,7 @@ func (*ToolNameMatchInput) ProtoMessage() {} func (x *ToolNameMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6211,11 +6037,9 @@ type ToolNameMatchSpec struct { func (x *ToolNameMatchSpec) Reset() { *x = ToolNameMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchSpec) String() string { @@ -6226,7 +6050,7 @@ func (*ToolNameMatchSpec) ProtoMessage() {} func (x *ToolNameMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6255,11 +6079,9 @@ type ToolNameMatchInstance struct { func (x *ToolNameMatchInstance) Reset() { *x = ToolNameMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchInstance) String() string { @@ -6270,7 +6092,7 @@ func (*ToolNameMatchInstance) ProtoMessage() {} func (x *ToolNameMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6311,11 +6133,9 @@ type ToolNameMatchResults struct { func (x *ToolNameMatchResults) Reset() { *x = ToolNameMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchResults) String() string { @@ -6326,7 +6146,7 @@ func (*ToolNameMatchResults) ProtoMessage() {} func (x *ToolNameMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6360,11 +6180,9 @@ type ToolNameMatchMetricValue struct { func (x *ToolNameMatchMetricValue) Reset() { *x = ToolNameMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchMetricValue) String() string { @@ -6375,7 +6193,7 @@ func (*ToolNameMatchMetricValue) ProtoMessage() {} func (x *ToolNameMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6411,11 +6229,9 @@ type ToolParameterKeyMatchInput struct { func (x *ToolParameterKeyMatchInput) Reset() { *x = ToolParameterKeyMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchInput) String() string { @@ -6426,7 +6242,7 @@ func (*ToolParameterKeyMatchInput) ProtoMessage() {} func (x *ToolParameterKeyMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6464,11 +6280,9 @@ type ToolParameterKeyMatchSpec struct { func (x *ToolParameterKeyMatchSpec) Reset() { *x = ToolParameterKeyMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchSpec) String() string { @@ -6479,7 +6293,7 @@ func (*ToolParameterKeyMatchSpec) ProtoMessage() {} func (x *ToolParameterKeyMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6508,11 +6322,9 @@ type ToolParameterKeyMatchInstance struct { func (x *ToolParameterKeyMatchInstance) Reset() { *x = ToolParameterKeyMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchInstance) String() string { @@ -6523,7 +6335,7 @@ func (*ToolParameterKeyMatchInstance) ProtoMessage() {} func (x *ToolParameterKeyMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6564,11 +6376,9 @@ type ToolParameterKeyMatchResults struct { func (x *ToolParameterKeyMatchResults) Reset() { *x = ToolParameterKeyMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchResults) String() string { @@ -6579,7 +6389,7 @@ func (*ToolParameterKeyMatchResults) ProtoMessage() {} func (x *ToolParameterKeyMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6613,11 +6423,9 @@ type ToolParameterKeyMatchMetricValue struct { func (x *ToolParameterKeyMatchMetricValue) Reset() { *x = ToolParameterKeyMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchMetricValue) String() string { @@ -6628,7 +6436,7 @@ func (*ToolParameterKeyMatchMetricValue) ProtoMessage() {} func (x *ToolParameterKeyMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6664,11 +6472,9 @@ type ToolParameterKVMatchInput struct { func (x *ToolParameterKVMatchInput) Reset() { *x = ToolParameterKVMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchInput) String() string { @@ -6679,7 +6485,7 @@ func (*ToolParameterKVMatchInput) ProtoMessage() {} func (x *ToolParameterKVMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6720,11 +6526,9 @@ type ToolParameterKVMatchSpec struct { func (x *ToolParameterKVMatchSpec) Reset() { *x = ToolParameterKVMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchSpec) String() string { @@ -6735,7 +6539,7 @@ func (*ToolParameterKVMatchSpec) ProtoMessage() {} func (x *ToolParameterKVMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6771,11 +6575,9 @@ type ToolParameterKVMatchInstance struct { func (x *ToolParameterKVMatchInstance) Reset() { *x = ToolParameterKVMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchInstance) String() string { @@ -6786,7 +6588,7 @@ func (*ToolParameterKVMatchInstance) ProtoMessage() {} func (x *ToolParameterKVMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6827,11 +6629,9 @@ type ToolParameterKVMatchResults struct { func (x *ToolParameterKVMatchResults) Reset() { *x = ToolParameterKVMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchResults) String() string { @@ -6842,7 +6642,7 @@ func (*ToolParameterKVMatchResults) ProtoMessage() {} func (x *ToolParameterKVMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6876,11 +6676,9 @@ type ToolParameterKVMatchMetricValue struct { func (x *ToolParameterKVMatchMetricValue) Reset() { *x = ToolParameterKVMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchMetricValue) String() string { @@ -6891,7 +6689,7 @@ func (*ToolParameterKVMatchMetricValue) ProtoMessage() {} func (x *ToolParameterKVMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6927,11 +6725,9 @@ type CometInput struct { func (x *CometInput) Reset() { *x = CometInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CometInput) String() string { @@ -6942,7 +6738,7 @@ func (*CometInput) ProtoMessage() {} func (x *CometInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6988,11 +6784,9 @@ type CometSpec struct { func (x *CometSpec) Reset() { *x = CometSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CometSpec) String() string { @@ -7003,7 +6797,7 @@ func (*CometSpec) ProtoMessage() {} func (x *CometSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7056,11 +6850,9 @@ type CometInstance struct { func (x *CometInstance) Reset() { *x = CometInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CometInstance) String() string { @@ -7071,7 +6863,7 @@ func (*CometInstance) ProtoMessage() {} func (x *CometInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7120,11 +6912,9 @@ type CometResult struct { func (x *CometResult) Reset() { *x = CometResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CometResult) String() string { @@ -7135,7 +6925,7 @@ func (*CometResult) ProtoMessage() {} func (x *CometResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7171,11 +6961,9 @@ type MetricxInput struct { func (x *MetricxInput) Reset() { *x = MetricxInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricxInput) String() string { @@ -7186,7 +6974,7 @@ func (*MetricxInput) ProtoMessage() {} func (x *MetricxInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7232,11 +7020,9 @@ type MetricxSpec struct { func (x *MetricxSpec) Reset() { *x = MetricxSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricxSpec) String() string { @@ -7247,7 +7033,7 @@ func (*MetricxSpec) ProtoMessage() {} func (x *MetricxSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7300,11 +7086,9 @@ type MetricxInstance struct { func (x *MetricxInstance) Reset() { *x = MetricxInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricxInstance) String() string { @@ -7315,7 +7099,7 @@ func (*MetricxInstance) ProtoMessage() {} func (x *MetricxInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7364,11 +7148,9 @@ type MetricxResult struct { func (x *MetricxResult) Reset() { *x = MetricxResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricxResult) String() string { @@ -7379,7 +7161,7 @@ func (*MetricxResult) ProtoMessage() {} func (x *MetricxResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9088,1316 +8870,6 @@ func file_google_cloud_aiplatform_v1_evaluation_service_proto_init() { if File_google_cloud_aiplatform_v1_evaluation_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BleuInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BleuInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BleuSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BleuResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BleuMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RougeInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RougeInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RougeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RougeResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RougeMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FluencyInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FluencyInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*FluencySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FluencyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SafetyInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SafetyInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SafetySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SafetyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbositySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*CometInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*CometSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*CometInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*CometResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*MetricxInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*MetricxSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*MetricxInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*MetricxResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_evaluation_service_proto_msgTypes[0].OneofWrappers = []any{ (*EvaluateInstancesRequest_ExactMatchInput)(nil), (*EvaluateInstancesRequest_BleuInput)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/event.pb.go b/aiplatform/apiv1/aiplatformpb/event.pb.go index c77409011de4..11ddf99334fc 100755 --- a/aiplatform/apiv1/aiplatformpb/event.pb.go +++ b/aiplatform/apiv1/aiplatformpb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/event.proto @@ -121,11 +121,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -136,7 +134,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,20 +278,6 @@ func file_google_cloud_aiplatform_v1_event_proto_init() { if File_google_cloud_aiplatform_v1_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/execution.pb.go b/aiplatform/apiv1/aiplatformpb/execution.pb.go index 31e39eb375ce..ca4a083ead0f 100755 --- a/aiplatform/apiv1/aiplatformpb/execution.pb.go +++ b/aiplatform/apiv1/aiplatformpb/execution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/execution.proto @@ -160,11 +160,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_execution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_execution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -175,7 +173,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_execution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,20 +387,6 @@ func file_google_cloud_aiplatform_v1_execution_proto_init() { if File_google_cloud_aiplatform_v1_execution_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_execution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/explanation.pb.go b/aiplatform/apiv1/aiplatformpb/explanation.pb.go index 074cdbf30d94..cc756066d154 100755 --- a/aiplatform/apiv1/aiplatformpb/explanation.pb.go +++ b/aiplatform/apiv1/aiplatformpb/explanation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/explanation.proto @@ -291,11 +291,9 @@ type Explanation struct { func (x *Explanation) Reset() { *x = Explanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Explanation) String() string { @@ -306,7 +304,7 @@ func (*Explanation) ProtoMessage() {} func (x *Explanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type ModelExplanation struct { func (x *ModelExplanation) Reset() { *x = ModelExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelExplanation) String() string { @@ -383,7 +379,7 @@ func (*ModelExplanation) ProtoMessage() {} func (x *ModelExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,11 +509,9 @@ type Attribution struct { func (x *Attribution) Reset() { *x = Attribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attribution) String() string { @@ -528,7 +522,7 @@ func (*Attribution) ProtoMessage() {} func (x *Attribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +600,9 @@ type Neighbor struct { func (x *Neighbor) Reset() { *x = Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Neighbor) String() string { @@ -621,7 +613,7 @@ func (*Neighbor) ProtoMessage() {} func (x *Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +656,9 @@ type ExplanationSpec struct { func (x *ExplanationSpec) Reset() { *x = ExplanationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationSpec) String() string { @@ -679,7 +669,7 @@ func (*ExplanationSpec) ProtoMessage() {} func (x *ExplanationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +733,9 @@ type ExplanationParameters struct { func (x *ExplanationParameters) Reset() { *x = ExplanationParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationParameters) String() string { @@ -758,7 +746,7 @@ func (*ExplanationParameters) ProtoMessage() {} func (x *ExplanationParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +873,9 @@ type SampledShapleyAttribution struct { func (x *SampledShapleyAttribution) Reset() { *x = SampledShapleyAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampledShapleyAttribution) String() string { @@ -900,7 +886,7 @@ func (*SampledShapleyAttribution) ProtoMessage() {} func (x *SampledShapleyAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +940,9 @@ type IntegratedGradientsAttribution struct { func (x *IntegratedGradientsAttribution) Reset() { *x = IntegratedGradientsAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntegratedGradientsAttribution) String() string { @@ -969,7 +953,7 @@ func (*IntegratedGradientsAttribution) ProtoMessage() {} func (x *IntegratedGradientsAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,11 +1024,9 @@ type XraiAttribution struct { func (x *XraiAttribution) Reset() { *x = XraiAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XraiAttribution) String() string { @@ -1055,7 +1037,7 @@ func (*XraiAttribution) ProtoMessage() {} func (x *XraiAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1120,11 +1102,9 @@ type SmoothGradConfig struct { func (x *SmoothGradConfig) Reset() { *x = SmoothGradConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmoothGradConfig) String() string { @@ -1135,7 +1115,7 @@ func (*SmoothGradConfig) ProtoMessage() {} func (x *SmoothGradConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1229,11 +1209,9 @@ type FeatureNoiseSigma struct { func (x *FeatureNoiseSigma) Reset() { *x = FeatureNoiseSigma{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureNoiseSigma) String() string { @@ -1244,7 +1222,7 @@ func (*FeatureNoiseSigma) ProtoMessage() {} func (x *FeatureNoiseSigma) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1264,9 @@ type BlurBaselineConfig struct { func (x *BlurBaselineConfig) Reset() { *x = BlurBaselineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlurBaselineConfig) String() string { @@ -1301,7 +1277,7 @@ func (*BlurBaselineConfig) ProtoMessage() {} func (x *BlurBaselineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1321,9 @@ type Examples struct { func (x *Examples) Reset() { *x = Examples{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Examples) String() string { @@ -1360,7 +1334,7 @@ func (*Examples) ProtoMessage() {} func (x *Examples) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1468,11 +1442,9 @@ type Presets struct { func (x *Presets) Reset() { *x = Presets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Presets) String() string { @@ -1483,7 +1455,7 @@ func (*Presets) ProtoMessage() {} func (x *Presets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1532,11 +1504,9 @@ type ExplanationSpecOverride struct { func (x *ExplanationSpecOverride) Reset() { *x = ExplanationSpecOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationSpecOverride) String() string { @@ -1547,7 +1517,7 @@ func (*ExplanationSpecOverride) ProtoMessage() {} func (x *ExplanationSpecOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1602,11 +1572,9 @@ type ExplanationMetadataOverride struct { func (x *ExplanationMetadataOverride) Reset() { *x = ExplanationMetadataOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadataOverride) String() string { @@ -1617,7 +1585,7 @@ func (*ExplanationMetadataOverride) ProtoMessage() {} func (x *ExplanationMetadataOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1659,11 +1627,9 @@ type ExamplesOverride struct { func (x *ExamplesOverride) Reset() { *x = ExamplesOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplesOverride) String() string { @@ -1674,7 +1640,7 @@ func (*ExamplesOverride) ProtoMessage() {} func (x *ExamplesOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1740,11 +1706,9 @@ type ExamplesRestrictionsNamespace struct { func (x *ExamplesRestrictionsNamespace) Reset() { *x = ExamplesRestrictionsNamespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplesRestrictionsNamespace) String() string { @@ -1755,7 +1719,7 @@ func (*ExamplesRestrictionsNamespace) ProtoMessage() {} func (x *ExamplesRestrictionsNamespace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1811,11 +1775,9 @@ type FeatureNoiseSigma_NoiseSigmaForFeature struct { func (x *FeatureNoiseSigma_NoiseSigmaForFeature) Reset() { *x = FeatureNoiseSigma_NoiseSigmaForFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureNoiseSigma_NoiseSigmaForFeature) String() string { @@ -1826,7 +1788,7 @@ func (*FeatureNoiseSigma_NoiseSigmaForFeature) ProtoMessage() {} func (x *FeatureNoiseSigma_NoiseSigmaForFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1832,9 @@ type Examples_ExampleGcsSource struct { func (x *Examples_ExampleGcsSource) Reset() { *x = Examples_ExampleGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Examples_ExampleGcsSource) String() string { @@ -1885,7 +1845,7 @@ func (*Examples_ExampleGcsSource) ProtoMessage() {} func (x *Examples_ExampleGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1933,11 +1893,9 @@ type ExplanationMetadataOverride_InputMetadataOverride struct { func (x *ExplanationMetadataOverride_InputMetadataOverride) Reset() { *x = ExplanationMetadataOverride_InputMetadataOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadataOverride_InputMetadataOverride) String() string { @@ -1948,7 +1906,7 @@ func (*ExplanationMetadataOverride_InputMetadataOverride) ProtoMessage() {} func (x *ExplanationMetadataOverride_InputMetadataOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2381,260 +2339,6 @@ func file_google_cloud_aiplatform_v1_explanation_proto_init() { } file_google_cloud_aiplatform_v1_explanation_metadata_proto_init() file_google_cloud_aiplatform_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Explanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Attribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SampledShapleyAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IntegratedGradientsAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*XraiAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SmoothGradConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FeatureNoiseSigma); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BlurBaselineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Examples); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Presets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationSpecOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadataOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExamplesOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExamplesRestrictionsNamespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FeatureNoiseSigma_NoiseSigmaForFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Examples_ExampleGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadataOverride_InputMetadataOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_explanation_proto_msgTypes[5].OneofWrappers = []any{ (*ExplanationParameters_SampledShapleyAttribution)(nil), (*ExplanationParameters_IntegratedGradientsAttribution)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/explanation_metadata.pb.go b/aiplatform/apiv1/aiplatformpb/explanation_metadata.pb.go index b8ac1958d8ac..16ee67630079 100755 --- a/aiplatform/apiv1/aiplatformpb/explanation_metadata.pb.go +++ b/aiplatform/apiv1/aiplatformpb/explanation_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/explanation_metadata.proto @@ -447,11 +447,9 @@ type ExplanationMetadata struct { func (x *ExplanationMetadata) Reset() { *x = ExplanationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata) String() string { @@ -462,7 +460,7 @@ func (*ExplanationMetadata) ProtoMessage() {} func (x *ExplanationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +589,9 @@ type ExplanationMetadata_InputMetadata struct { func (x *ExplanationMetadata_InputMetadata) Reset() { *x = ExplanationMetadata_InputMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata) String() string { @@ -606,7 +602,7 @@ func (*ExplanationMetadata_InputMetadata) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -732,11 +728,9 @@ type ExplanationMetadata_OutputMetadata struct { func (x *ExplanationMetadata_OutputMetadata) Reset() { *x = ExplanationMetadata_OutputMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_OutputMetadata) String() string { @@ -747,7 +741,7 @@ func (*ExplanationMetadata_OutputMetadata) ProtoMessage() {} func (x *ExplanationMetadata_OutputMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +853,9 @@ type ExplanationMetadata_InputMetadata_FeatureValueDomain struct { func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) Reset() { *x = ExplanationMetadata_InputMetadata_FeatureValueDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) String() string { @@ -874,7 +866,7 @@ func (*ExplanationMetadata_InputMetadata_FeatureValueDomain) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +954,9 @@ type ExplanationMetadata_InputMetadata_Visualization struct { func (x *ExplanationMetadata_InputMetadata_Visualization) Reset() { *x = ExplanationMetadata_InputMetadata_Visualization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata_Visualization) String() string { @@ -977,7 +967,7 @@ func (*ExplanationMetadata_InputMetadata_Visualization) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata_Visualization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,68 +1288,6 @@ func file_google_cloud_aiplatform_v1_explanation_metadata_proto_init() { if File_google_cloud_aiplatform_v1_explanation_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_OutputMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata_FeatureValueDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata_Visualization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_explanation_metadata_proto_msgTypes[2].OneofWrappers = []any{ (*ExplanationMetadata_OutputMetadata_IndexDisplayNameMapping)(nil), (*ExplanationMetadata_OutputMetadata_DisplayNameMappingKey)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/feature.pb.go b/aiplatform/apiv1/aiplatformpb/feature.pb.go index 610425d24d15..fac65061f589 100755 --- a/aiplatform/apiv1/aiplatformpb/feature.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature.proto @@ -246,11 +246,9 @@ type Feature struct { func (x *Feature) Reset() { *x = Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature) String() string { @@ -261,7 +259,7 @@ func (*Feature) ProtoMessage() {} func (x *Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +371,9 @@ type Feature_MonitoringStatsAnomaly struct { func (x *Feature_MonitoringStatsAnomaly) Reset() { *x = Feature_MonitoringStatsAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature_MonitoringStatsAnomaly) String() string { @@ -388,7 +384,7 @@ func (*Feature_MonitoringStatsAnomaly) ProtoMessage() {} func (x *Feature_MonitoringStatsAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,32 +583,6 @@ func file_google_cloud_aiplatform_v1_feature_proto_init() { return } file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Feature_MonitoringStatsAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/feature_group.pb.go b/aiplatform/apiv1/aiplatformpb/feature_group.pb.go index de9808afa311..abd457ae72c7 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_group.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_group.proto @@ -75,11 +75,9 @@ type FeatureGroup struct { func (x *FeatureGroup) Reset() { *x = FeatureGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup) String() string { @@ -90,7 +88,7 @@ func (*FeatureGroup) ProtoMessage() {} func (x *FeatureGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +209,9 @@ type FeatureGroup_BigQuery struct { func (x *FeatureGroup_BigQuery) Reset() { *x = FeatureGroup_BigQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup_BigQuery) String() string { @@ -226,7 +222,7 @@ func (*FeatureGroup_BigQuery) ProtoMessage() {} func (x *FeatureGroup_BigQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +286,9 @@ type FeatureGroup_BigQuery_TimeSeries struct { func (x *FeatureGroup_BigQuery_TimeSeries) Reset() { *x = FeatureGroup_BigQuery_TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup_BigQuery_TimeSeries) String() string { @@ -305,7 +299,7 @@ func (*FeatureGroup_BigQuery_TimeSeries) ProtoMessage() {} func (x *FeatureGroup_BigQuery_TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,44 +457,6 @@ func file_google_cloud_aiplatform_v1_feature_group_proto_init() { return } file_google_cloud_aiplatform_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup_BigQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup_BigQuery_TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_feature_group_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureGroup_BigQuery_)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/feature_monitoring_stats.pb.go b/aiplatform/apiv1/aiplatformpb/feature_monitoring_stats.pb.go index 1b9fbc6453b5..b7b1689210ce 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_monitoring_stats.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_monitoring_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_monitoring_stats.proto @@ -96,11 +96,9 @@ type FeatureStatsAnomaly struct { func (x *FeatureStatsAnomaly) Reset() { *x = FeatureStatsAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureStatsAnomaly) String() string { @@ -111,7 +109,7 @@ func (*FeatureStatsAnomaly) ProtoMessage() {} func (x *FeatureStatsAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,20 +254,6 @@ func file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_init() { if File_google_cloud_aiplatform_v1_feature_monitoring_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_monitoring_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureStatsAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/feature_online_store.pb.go b/aiplatform/apiv1/aiplatformpb/feature_online_store.pb.go index ec7c747fa3db..6089478c5906 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_online_store.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_online_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_online_store.proto @@ -146,11 +146,9 @@ type FeatureOnlineStore struct { func (x *FeatureOnlineStore) Reset() { *x = FeatureOnlineStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore) String() string { @@ -161,7 +159,7 @@ func (*FeatureOnlineStore) ProtoMessage() {} func (x *FeatureOnlineStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +300,9 @@ type FeatureOnlineStore_Bigtable struct { func (x *FeatureOnlineStore_Bigtable) Reset() { *x = FeatureOnlineStore_Bigtable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Bigtable) String() string { @@ -317,7 +313,7 @@ func (*FeatureOnlineStore_Bigtable) ProtoMessage() {} func (x *FeatureOnlineStore_Bigtable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +344,9 @@ type FeatureOnlineStore_Optimized struct { func (x *FeatureOnlineStore_Optimized) Reset() { *x = FeatureOnlineStore_Optimized{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Optimized) String() string { @@ -363,7 +357,7 @@ func (*FeatureOnlineStore_Optimized) ProtoMessage() {} func (x *FeatureOnlineStore_Optimized) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +397,9 @@ type FeatureOnlineStore_DedicatedServingEndpoint struct { func (x *FeatureOnlineStore_DedicatedServingEndpoint) Reset() { *x = FeatureOnlineStore_DedicatedServingEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_DedicatedServingEndpoint) String() string { @@ -418,7 +410,7 @@ func (*FeatureOnlineStore_DedicatedServingEndpoint) ProtoMessage() {} func (x *FeatureOnlineStore_DedicatedServingEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +468,9 @@ type FeatureOnlineStore_Bigtable_AutoScaling struct { func (x *FeatureOnlineStore_Bigtable_AutoScaling) Reset() { *x = FeatureOnlineStore_Bigtable_AutoScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Bigtable_AutoScaling) String() string { @@ -491,7 +481,7 @@ func (*FeatureOnlineStore_Bigtable_AutoScaling) ProtoMessage() {} func (x *FeatureOnlineStore_Bigtable_AutoScaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,68 +712,6 @@ func file_google_cloud_aiplatform_v1_feature_online_store_proto_init() { } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Bigtable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Optimized); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_DedicatedServingEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Bigtable_AutoScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_feature_online_store_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureOnlineStore_Bigtable_)(nil), (*FeatureOnlineStore_Optimized_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/feature_online_store_admin_service.pb.go b/aiplatform/apiv1/aiplatformpb/feature_online_store_admin_service.pb.go index 0e8686c30fd0..fa37d405de12 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_online_store_admin_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_online_store_admin_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto @@ -68,11 +68,9 @@ type CreateFeatureOnlineStoreRequest struct { func (x *CreateFeatureOnlineStoreRequest) Reset() { *x = CreateFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOnlineStoreRequest) String() string { @@ -83,7 +81,7 @@ func (*CreateFeatureOnlineStoreRequest) ProtoMessage() {} func (x *CreateFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetFeatureOnlineStoreRequest struct { func (x *GetFeatureOnlineStoreRequest) Reset() { *x = GetFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureOnlineStoreRequest) String() string { @@ -147,7 +143,7 @@ func (*GetFeatureOnlineStoreRequest) ProtoMessage() {} func (x *GetFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type ListFeatureOnlineStoresRequest struct { func (x *ListFeatureOnlineStoresRequest) Reset() { *x = ListFeatureOnlineStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureOnlineStoresRequest) String() string { @@ -241,7 +235,7 @@ func (*ListFeatureOnlineStoresRequest) ProtoMessage() {} func (x *ListFeatureOnlineStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ListFeatureOnlineStoresResponse struct { func (x *ListFeatureOnlineStoresResponse) Reset() { *x = ListFeatureOnlineStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureOnlineStoresResponse) String() string { @@ -324,7 +316,7 @@ func (*ListFeatureOnlineStoresResponse) ProtoMessage() {} func (x *ListFeatureOnlineStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +376,9 @@ type UpdateFeatureOnlineStoreRequest struct { func (x *UpdateFeatureOnlineStoreRequest) Reset() { *x = UpdateFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOnlineStoreRequest) String() string { @@ -399,7 +389,7 @@ func (*UpdateFeatureOnlineStoreRequest) ProtoMessage() {} func (x *UpdateFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +437,9 @@ type DeleteFeatureOnlineStoreRequest struct { func (x *DeleteFeatureOnlineStoreRequest) Reset() { *x = DeleteFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureOnlineStoreRequest) String() string { @@ -462,7 +450,7 @@ func (*DeleteFeatureOnlineStoreRequest) ProtoMessage() {} func (x *DeleteFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +509,9 @@ type CreateFeatureViewRequest struct { func (x *CreateFeatureViewRequest) Reset() { *x = CreateFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureViewRequest) String() string { @@ -536,7 +522,7 @@ func (*CreateFeatureViewRequest) ProtoMessage() {} func (x *CreateFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type GetFeatureViewRequest struct { func (x *GetFeatureViewRequest) Reset() { *x = GetFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureViewRequest) String() string { @@ -609,7 +593,7 @@ func (*GetFeatureViewRequest) ProtoMessage() {} func (x *GetFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +671,9 @@ type ListFeatureViewsRequest struct { func (x *ListFeatureViewsRequest) Reset() { *x = ListFeatureViewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewsRequest) String() string { @@ -702,7 +684,7 @@ func (*ListFeatureViewsRequest) ProtoMessage() {} func (x *ListFeatureViewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -770,11 +752,9 @@ type ListFeatureViewsResponse struct { func (x *ListFeatureViewsResponse) Reset() { *x = ListFeatureViewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewsResponse) String() string { @@ -785,7 +765,7 @@ func (*ListFeatureViewsResponse) ProtoMessage() {} func (x *ListFeatureViewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +830,9 @@ type UpdateFeatureViewRequest struct { func (x *UpdateFeatureViewRequest) Reset() { *x = UpdateFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureViewRequest) String() string { @@ -865,7 +843,7 @@ func (*UpdateFeatureViewRequest) ProtoMessage() {} func (x *UpdateFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +887,9 @@ type DeleteFeatureViewRequest struct { func (x *DeleteFeatureViewRequest) Reset() { *x = DeleteFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureViewRequest) String() string { @@ -924,7 +900,7 @@ func (*DeleteFeatureViewRequest) ProtoMessage() {} func (x *DeleteFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -958,11 +934,9 @@ type CreateFeatureOnlineStoreOperationMetadata struct { func (x *CreateFeatureOnlineStoreOperationMetadata) Reset() { *x = CreateFeatureOnlineStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOnlineStoreOperationMetadata) String() string { @@ -973,7 +947,7 @@ func (*CreateFeatureOnlineStoreOperationMetadata) ProtoMessage() {} func (x *CreateFeatureOnlineStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +981,9 @@ type UpdateFeatureOnlineStoreOperationMetadata struct { func (x *UpdateFeatureOnlineStoreOperationMetadata) Reset() { *x = UpdateFeatureOnlineStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOnlineStoreOperationMetadata) String() string { @@ -1022,7 +994,7 @@ func (*UpdateFeatureOnlineStoreOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureOnlineStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,11 +1028,9 @@ type CreateFeatureViewOperationMetadata struct { func (x *CreateFeatureViewOperationMetadata) Reset() { *x = CreateFeatureViewOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureViewOperationMetadata) String() string { @@ -1071,7 +1041,7 @@ func (*CreateFeatureViewOperationMetadata) ProtoMessage() {} func (x *CreateFeatureViewOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,11 +1075,9 @@ type UpdateFeatureViewOperationMetadata struct { func (x *UpdateFeatureViewOperationMetadata) Reset() { *x = UpdateFeatureViewOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureViewOperationMetadata) String() string { @@ -1120,7 +1088,7 @@ func (*UpdateFeatureViewOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureViewOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1124,9 @@ type SyncFeatureViewRequest struct { func (x *SyncFeatureViewRequest) Reset() { *x = SyncFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncFeatureViewRequest) String() string { @@ -1171,7 +1137,7 @@ func (*SyncFeatureViewRequest) ProtoMessage() {} func (x *SyncFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1173,9 @@ type SyncFeatureViewResponse struct { func (x *SyncFeatureViewResponse) Reset() { *x = SyncFeatureViewResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncFeatureViewResponse) String() string { @@ -1222,7 +1186,7 @@ func (*SyncFeatureViewResponse) ProtoMessage() {} func (x *SyncFeatureViewResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1223,9 @@ type GetFeatureViewSyncRequest struct { func (x *GetFeatureViewSyncRequest) Reset() { *x = GetFeatureViewSyncRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureViewSyncRequest) String() string { @@ -1274,7 +1236,7 @@ func (*GetFeatureViewSyncRequest) ProtoMessage() {} func (x *GetFeatureViewSyncRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1304,9 @@ type ListFeatureViewSyncsRequest struct { func (x *ListFeatureViewSyncsRequest) Reset() { *x = ListFeatureViewSyncsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewSyncsRequest) String() string { @@ -1357,7 +1317,7 @@ func (*ListFeatureViewSyncsRequest) ProtoMessage() {} func (x *ListFeatureViewSyncsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,11 +1385,9 @@ type ListFeatureViewSyncsResponse struct { func (x *ListFeatureViewSyncsResponse) Reset() { *x = ListFeatureViewSyncsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewSyncsResponse) String() string { @@ -1440,7 +1398,7 @@ func (*ListFeatureViewSyncsResponse) ProtoMessage() {} func (x *ListFeatureViewSyncsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,260 +1999,6 @@ func file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_in file_google_cloud_aiplatform_v1_feature_view_proto_init() file_google_cloud_aiplatform_v1_feature_view_sync_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureOnlineStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureOnlineStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOnlineStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOnlineStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureViewOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureViewOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SyncFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SyncFeatureViewResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureViewSyncRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewSyncsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_admin_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewSyncsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/feature_online_store_service.pb.go b/aiplatform/apiv1/aiplatformpb/feature_online_store_service.pb.go index 1961882a8fab..3c42c81d5b4e 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_online_store_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_online_store_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_online_store_service.proto @@ -179,11 +179,9 @@ type FeatureViewDataKey struct { func (x *FeatureViewDataKey) Reset() { *x = FeatureViewDataKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewDataKey) String() string { @@ -194,7 +192,7 @@ func (*FeatureViewDataKey) ProtoMessage() {} func (x *FeatureViewDataKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +268,9 @@ type FetchFeatureValuesRequest struct { func (x *FetchFeatureValuesRequest) Reset() { *x = FetchFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesRequest) String() string { @@ -285,7 +281,7 @@ func (*FetchFeatureValuesRequest) ProtoMessage() {} func (x *FetchFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +337,9 @@ type FetchFeatureValuesResponse struct { func (x *FetchFeatureValuesResponse) Reset() { *x = FetchFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse) String() string { @@ -356,7 +350,7 @@ func (*FetchFeatureValuesResponse) ProtoMessage() {} func (x *FetchFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +440,9 @@ type NearestNeighborQuery struct { func (x *NearestNeighborQuery) Reset() { *x = NearestNeighborQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery) String() string { @@ -461,7 +453,7 @@ func (*NearestNeighborQuery) ProtoMessage() {} func (x *NearestNeighborQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +565,9 @@ type SearchNearestEntitiesRequest struct { func (x *SearchNearestEntitiesRequest) Reset() { *x = SearchNearestEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearestEntitiesRequest) String() string { @@ -588,7 +578,7 @@ func (*SearchNearestEntitiesRequest) ProtoMessage() {} func (x *SearchNearestEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +626,9 @@ type NearestNeighbors struct { func (x *NearestNeighbors) Reset() { *x = NearestNeighbors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighbors) String() string { @@ -651,7 +639,7 @@ func (*NearestNeighbors) ProtoMessage() {} func (x *NearestNeighbors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +674,9 @@ type SearchNearestEntitiesResponse struct { func (x *SearchNearestEntitiesResponse) Reset() { *x = SearchNearestEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearestEntitiesResponse) String() string { @@ -701,7 +687,7 @@ func (*SearchNearestEntitiesResponse) ProtoMessage() {} func (x *SearchNearestEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +722,9 @@ type FeatureViewDataKey_CompositeKey struct { func (x *FeatureViewDataKey_CompositeKey) Reset() { *x = FeatureViewDataKey_CompositeKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewDataKey_CompositeKey) String() string { @@ -751,7 +735,7 @@ func (*FeatureViewDataKey_CompositeKey) ProtoMessage() {} func (x *FeatureViewDataKey_CompositeKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +770,9 @@ type FetchFeatureValuesResponse_FeatureNameValuePairList struct { func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) Reset() { *x = FetchFeatureValuesResponse_FeatureNameValuePairList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) String() string { @@ -801,7 +783,7 @@ func (*FetchFeatureValuesResponse_FeatureNameValuePairList) ProtoMessage() {} func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +821,9 @@ type FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair st func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) Reset() { *x = FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) String() string { @@ -854,7 +834,7 @@ func (*FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +894,9 @@ type NearestNeighborQuery_Embedding struct { func (x *NearestNeighborQuery_Embedding) Reset() { *x = NearestNeighborQuery_Embedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_Embedding) String() string { @@ -929,7 +907,7 @@ func (*NearestNeighborQuery_Embedding) ProtoMessage() {} func (x *NearestNeighborQuery_Embedding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +952,9 @@ type NearestNeighborQuery_StringFilter struct { func (x *NearestNeighborQuery_StringFilter) Reset() { *x = NearestNeighborQuery_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_StringFilter) String() string { @@ -989,7 +965,7 @@ func (*NearestNeighborQuery_StringFilter) ProtoMessage() {} func (x *NearestNeighborQuery_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,11 +1032,9 @@ type NearestNeighborQuery_NumericFilter struct { func (x *NearestNeighborQuery_NumericFilter) Reset() { *x = NearestNeighborQuery_NumericFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_NumericFilter) String() string { @@ -1071,7 +1045,7 @@ func (*NearestNeighborQuery_NumericFilter) ProtoMessage() {} func (x *NearestNeighborQuery_NumericFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,11 +1147,9 @@ type NearestNeighborQuery_Parameters struct { func (x *NearestNeighborQuery_Parameters) Reset() { *x = NearestNeighborQuery_Parameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_Parameters) String() string { @@ -1188,7 +1160,7 @@ func (*NearestNeighborQuery_Parameters) ProtoMessage() {} func (x *NearestNeighborQuery_Parameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1236,11 +1208,9 @@ type NearestNeighbors_Neighbor struct { func (x *NearestNeighbors_Neighbor) Reset() { *x = NearestNeighbors_Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighbors_Neighbor) String() string { @@ -1251,7 +1221,7 @@ func (*NearestNeighbors_Neighbor) ProtoMessage() {} func (x *NearestNeighbors_Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,188 +1599,6 @@ func file_google_cloud_aiplatform_v1_feature_online_store_service_proto_init() { return } file_google_cloud_aiplatform_v1_featurestore_online_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewDataKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearestEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighbors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearestEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewDataKey_CompositeKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse_FeatureNameValuePairList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_Embedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_NumericFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_Parameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighbors_Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_feature_online_store_service_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureViewDataKey_Key)(nil), (*FeatureViewDataKey_CompositeKey_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/feature_registry_service.pb.go b/aiplatform/apiv1/aiplatformpb/feature_registry_service.pb.go index 0ce3b02d346e..41d9c87bcc55 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_registry_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_registry_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_registry_service.proto @@ -68,11 +68,9 @@ type CreateFeatureGroupRequest struct { func (x *CreateFeatureGroupRequest) Reset() { *x = CreateFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureGroupRequest) String() string { @@ -83,7 +81,7 @@ func (*CreateFeatureGroupRequest) ProtoMessage() {} func (x *CreateFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetFeatureGroupRequest struct { func (x *GetFeatureGroupRequest) Reset() { *x = GetFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureGroupRequest) String() string { @@ -147,7 +143,7 @@ func (*GetFeatureGroupRequest) ProtoMessage() {} func (x *GetFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type ListFeatureGroupsRequest struct { func (x *ListFeatureGroupsRequest) Reset() { *x = ListFeatureGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureGroupsRequest) String() string { @@ -241,7 +235,7 @@ func (*ListFeatureGroupsRequest) ProtoMessage() {} func (x *ListFeatureGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ListFeatureGroupsResponse struct { func (x *ListFeatureGroupsResponse) Reset() { *x = ListFeatureGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureGroupsResponse) String() string { @@ -324,7 +316,7 @@ func (*ListFeatureGroupsResponse) ProtoMessage() {} func (x *ListFeatureGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +375,9 @@ type UpdateFeatureGroupRequest struct { func (x *UpdateFeatureGroupRequest) Reset() { *x = UpdateFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureGroupRequest) String() string { @@ -398,7 +388,7 @@ func (*UpdateFeatureGroupRequest) ProtoMessage() {} func (x *UpdateFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +436,9 @@ type DeleteFeatureGroupRequest struct { func (x *DeleteFeatureGroupRequest) Reset() { *x = DeleteFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureGroupRequest) String() string { @@ -461,7 +449,7 @@ func (*DeleteFeatureGroupRequest) ProtoMessage() {} func (x *DeleteFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,11 +490,9 @@ type CreateFeatureGroupOperationMetadata struct { func (x *CreateFeatureGroupOperationMetadata) Reset() { *x = CreateFeatureGroupOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureGroupOperationMetadata) String() string { @@ -517,7 +503,7 @@ func (*CreateFeatureGroupOperationMetadata) ProtoMessage() {} func (x *CreateFeatureGroupOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +537,9 @@ type UpdateFeatureGroupOperationMetadata struct { func (x *UpdateFeatureGroupOperationMetadata) Reset() { *x = UpdateFeatureGroupOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureGroupOperationMetadata) String() string { @@ -566,7 +550,7 @@ func (*UpdateFeatureGroupOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureGroupOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +584,9 @@ type CreateRegistryFeatureOperationMetadata struct { func (x *CreateRegistryFeatureOperationMetadata) Reset() { *x = CreateRegistryFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRegistryFeatureOperationMetadata) String() string { @@ -615,7 +597,7 @@ func (*CreateRegistryFeatureOperationMetadata) ProtoMessage() {} func (x *CreateRegistryFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -649,11 +631,9 @@ type UpdateFeatureOperationMetadata struct { func (x *UpdateFeatureOperationMetadata) Reset() { *x = UpdateFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOperationMetadata) String() string { @@ -664,7 +644,7 @@ func (*UpdateFeatureOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,128 +1062,6 @@ func file_google_cloud_aiplatform_v1_feature_registry_service_proto_init() { file_google_cloud_aiplatform_v1_feature_group_proto_init() file_google_cloud_aiplatform_v1_featurestore_service_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureGroupOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureGroupOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateRegistryFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_registry_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/feature_selector.pb.go b/aiplatform/apiv1/aiplatformpb/feature_selector.pb.go index 7066e7a30728..f266ceca1dd0 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_selector.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_selector.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_selector.proto @@ -53,11 +53,9 @@ type IdMatcher struct { func (x *IdMatcher) Reset() { *x = IdMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdMatcher) String() string { @@ -68,7 +66,7 @@ func (*IdMatcher) ProtoMessage() {} func (x *IdMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type FeatureSelector struct { func (x *FeatureSelector) Reset() { *x = FeatureSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSelector) String() string { @@ -117,7 +113,7 @@ func (*FeatureSelector) ProtoMessage() {} func (x *FeatureSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,32 +200,6 @@ func file_google_cloud_aiplatform_v1_feature_selector_proto_init() { if File_google_cloud_aiplatform_v1_feature_selector_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IdMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_selector_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/feature_view.pb.go b/aiplatform/apiv1/aiplatformpb/feature_view.pb.go index 8ecd27f25a7f..31ddbe3be71a 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_view.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_view.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_view.proto @@ -152,11 +152,9 @@ type FeatureView struct { func (x *FeatureView) Reset() { *x = FeatureView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView) String() string { @@ -167,7 +165,7 @@ func (*FeatureView) ProtoMessage() {} func (x *FeatureView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +312,9 @@ type FeatureView_BigQuerySource struct { func (x *FeatureView_BigQuerySource) Reset() { *x = FeatureView_BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_BigQuerySource) String() string { @@ -329,7 +325,7 @@ func (*FeatureView_BigQuerySource) ProtoMessage() {} func (x *FeatureView_BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +374,9 @@ type FeatureView_SyncConfig struct { func (x *FeatureView_SyncConfig) Reset() { *x = FeatureView_SyncConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_SyncConfig) String() string { @@ -393,7 +387,7 @@ func (*FeatureView_SyncConfig) ProtoMessage() {} func (x *FeatureView_SyncConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +455,9 @@ type FeatureView_IndexConfig struct { func (x *FeatureView_IndexConfig) Reset() { *x = FeatureView_IndexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig) String() string { @@ -476,7 +468,7 @@ func (*FeatureView_IndexConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +577,9 @@ type FeatureView_FeatureRegistrySource struct { func (x *FeatureView_FeatureRegistrySource) Reset() { *x = FeatureView_FeatureRegistrySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_FeatureRegistrySource) String() string { @@ -600,7 +590,7 @@ func (*FeatureView_FeatureRegistrySource) ProtoMessage() {} func (x *FeatureView_FeatureRegistrySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +643,9 @@ type FeatureView_VertexRagSource struct { func (x *FeatureView_VertexRagSource) Reset() { *x = FeatureView_VertexRagSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_VertexRagSource) String() string { @@ -668,7 +656,7 @@ func (*FeatureView_VertexRagSource) ProtoMessage() {} func (x *FeatureView_VertexRagSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +694,9 @@ type FeatureView_IndexConfig_BruteForceConfig struct { func (x *FeatureView_IndexConfig_BruteForceConfig) Reset() { *x = FeatureView_IndexConfig_BruteForceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig_BruteForceConfig) String() string { @@ -721,7 +707,7 @@ func (*FeatureView_IndexConfig_BruteForceConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig_BruteForceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +735,9 @@ type FeatureView_IndexConfig_TreeAHConfig struct { func (x *FeatureView_IndexConfig_TreeAHConfig) Reset() { *x = FeatureView_IndexConfig_TreeAHConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig_TreeAHConfig) String() string { @@ -764,7 +748,7 @@ func (*FeatureView_IndexConfig_TreeAHConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig_TreeAHConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +785,9 @@ type FeatureView_FeatureRegistrySource_FeatureGroup struct { func (x *FeatureView_FeatureRegistrySource_FeatureGroup) Reset() { *x = FeatureView_FeatureRegistrySource_FeatureGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_FeatureRegistrySource_FeatureGroup) String() string { @@ -816,7 +798,7 @@ func (*FeatureView_FeatureRegistrySource_FeatureGroup) ProtoMessage() {} func (x *FeatureView_FeatureRegistrySource_FeatureGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,116 +1069,6 @@ func file_google_cloud_aiplatform_v1_feature_view_proto_init() { if File_google_cloud_aiplatform_v1_feature_view_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_SyncConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_FeatureRegistrySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_VertexRagSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig_BruteForceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig_TreeAHConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_FeatureRegistrySource_FeatureGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_feature_view_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureView_BigQuerySource_)(nil), (*FeatureView_FeatureRegistrySource_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/feature_view_sync.pb.go b/aiplatform/apiv1/aiplatformpb/feature_view_sync.pb.go index 41e853984f8d..2b04ca96e835 100755 --- a/aiplatform/apiv1/aiplatformpb/feature_view_sync.pb.go +++ b/aiplatform/apiv1/aiplatformpb/feature_view_sync.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/feature_view_sync.proto @@ -67,11 +67,9 @@ type FeatureViewSync struct { func (x *FeatureViewSync) Reset() { *x = FeatureViewSync{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewSync) String() string { @@ -82,7 +80,7 @@ func (*FeatureViewSync) ProtoMessage() {} func (x *FeatureViewSync) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +162,9 @@ type FeatureViewSync_SyncSummary struct { func (x *FeatureViewSync_SyncSummary) Reset() { *x = FeatureViewSync_SyncSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewSync_SyncSummary) String() string { @@ -179,7 +175,7 @@ func (*FeatureViewSync_SyncSummary) ProtoMessage() {} func (x *FeatureViewSync_SyncSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,32 +331,6 @@ func file_google_cloud_aiplatform_v1_feature_view_sync_proto_init() { if File_google_cloud_aiplatform_v1_feature_view_sync_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewSync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_feature_view_sync_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewSync_SyncSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/featurestore.pb.go b/aiplatform/apiv1/aiplatformpb/featurestore.pb.go index 4f604c8cd4d1..5442eee71c03 100755 --- a/aiplatform/apiv1/aiplatformpb/featurestore.pb.go +++ b/aiplatform/apiv1/aiplatformpb/featurestore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/featurestore.proto @@ -157,11 +157,9 @@ type Featurestore struct { func (x *Featurestore) Reset() { *x = Featurestore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore) String() string { @@ -172,7 +170,7 @@ func (*Featurestore) ProtoMessage() {} func (x *Featurestore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +282,9 @@ type Featurestore_OnlineServingConfig struct { func (x *Featurestore_OnlineServingConfig) Reset() { *x = Featurestore_OnlineServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore_OnlineServingConfig) String() string { @@ -299,7 +295,7 @@ func (*Featurestore_OnlineServingConfig) ProtoMessage() {} func (x *Featurestore_OnlineServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type Featurestore_OnlineServingConfig_Scaling struct { func (x *Featurestore_OnlineServingConfig_Scaling) Reset() { *x = Featurestore_OnlineServingConfig_Scaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore_OnlineServingConfig_Scaling) String() string { @@ -369,7 +363,7 @@ func (*Featurestore_OnlineServingConfig_Scaling) ProtoMessage() {} func (x *Featurestore_OnlineServingConfig_Scaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,44 +554,6 @@ func file_google_cloud_aiplatform_v1_featurestore_proto_init() { return } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore_OnlineServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore_OnlineServingConfig_Scaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/featurestore_monitoring.pb.go b/aiplatform/apiv1/aiplatformpb/featurestore_monitoring.pb.go index be5c2bfed141..9dda6c5e770f 100755 --- a/aiplatform/apiv1/aiplatformpb/featurestore_monitoring.pb.go +++ b/aiplatform/apiv1/aiplatformpb/featurestore_monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/featurestore_monitoring.proto @@ -191,11 +191,9 @@ type FeaturestoreMonitoringConfig struct { func (x *FeaturestoreMonitoringConfig) Reset() { *x = FeaturestoreMonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig) String() string { @@ -206,7 +204,7 @@ func (*FeaturestoreMonitoringConfig) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +283,9 @@ type FeaturestoreMonitoringConfig_SnapshotAnalysis struct { func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) Reset() { *x = FeaturestoreMonitoringConfig_SnapshotAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) String() string { @@ -300,7 +296,7 @@ func (*FeaturestoreMonitoringConfig_SnapshotAnalysis) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +352,9 @@ type FeaturestoreMonitoringConfig_ImportFeaturesAnalysis struct { func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) Reset() { *x = FeaturestoreMonitoringConfig_ImportFeaturesAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) String() string { @@ -371,7 +365,7 @@ func (*FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +408,9 @@ type FeaturestoreMonitoringConfig_ThresholdConfig struct { func (x *FeaturestoreMonitoringConfig_ThresholdConfig) Reset() { *x = FeaturestoreMonitoringConfig_ThresholdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_ThresholdConfig) String() string { @@ -429,7 +421,7 @@ func (*FeaturestoreMonitoringConfig_ThresholdConfig) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_ThresholdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,56 +613,6 @@ func file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_init() { if File_google_cloud_aiplatform_v1_featurestore_monitoring_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_SnapshotAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_ImportFeaturesAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_ThresholdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_featurestore_monitoring_proto_msgTypes[3].OneofWrappers = []any{ (*FeaturestoreMonitoringConfig_ThresholdConfig_Value)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/featurestore_online_service.pb.go b/aiplatform/apiv1/aiplatformpb/featurestore_online_service.pb.go index 1bccd4b29b45..481e5d14750b 100755 --- a/aiplatform/apiv1/aiplatformpb/featurestore_online_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/featurestore_online_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/featurestore_online_service.proto @@ -62,11 +62,9 @@ type WriteFeatureValuesRequest struct { func (x *WriteFeatureValuesRequest) Reset() { *x = WriteFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesRequest) String() string { @@ -77,7 +75,7 @@ func (*WriteFeatureValuesRequest) ProtoMessage() {} func (x *WriteFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type WriteFeatureValuesPayload struct { func (x *WriteFeatureValuesPayload) Reset() { *x = WriteFeatureValuesPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesPayload) String() string { @@ -138,7 +134,7 @@ func (*WriteFeatureValuesPayload) ProtoMessage() {} func (x *WriteFeatureValuesPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type WriteFeatureValuesResponse struct { func (x *WriteFeatureValuesResponse) Reset() { *x = WriteFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesResponse) String() string { @@ -192,7 +186,7 @@ func (*WriteFeatureValuesResponse) ProtoMessage() {} func (x *WriteFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type ReadFeatureValuesRequest struct { func (x *ReadFeatureValuesRequest) Reset() { *x = ReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesRequest) String() string { @@ -245,7 +237,7 @@ func (*ReadFeatureValuesRequest) ProtoMessage() {} func (x *ReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +291,9 @@ type ReadFeatureValuesResponse struct { func (x *ReadFeatureValuesResponse) Reset() { *x = ReadFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse) String() string { @@ -314,7 +304,7 @@ func (*ReadFeatureValuesResponse) ProtoMessage() {} func (x *ReadFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type StreamingReadFeatureValuesRequest struct { func (x *StreamingReadFeatureValuesRequest) Reset() { *x = StreamingReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingReadFeatureValuesRequest) String() string { @@ -383,7 +371,7 @@ func (*StreamingReadFeatureValuesRequest) ProtoMessage() {} func (x *StreamingReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type FeatureValue struct { func (x *FeatureValue) Reset() { *x = FeatureValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValue) String() string { @@ -461,7 +447,7 @@ func (*FeatureValue) ProtoMessage() {} func (x *FeatureValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +632,9 @@ type StructValue struct { func (x *StructValue) Reset() { *x = StructValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructValue) String() string { @@ -661,7 +645,7 @@ func (*StructValue) ProtoMessage() {} func (x *StructValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -697,11 +681,9 @@ type StructFieldValue struct { func (x *StructFieldValue) Reset() { *x = StructFieldValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructFieldValue) String() string { @@ -712,7 +694,7 @@ func (*StructFieldValue) ProtoMessage() {} func (x *StructFieldValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +735,9 @@ type FeatureValueList struct { func (x *FeatureValueList) Reset() { *x = FeatureValueList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValueList) String() string { @@ -768,7 +748,7 @@ func (*FeatureValueList) ProtoMessage() {} func (x *FeatureValueList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +782,9 @@ type ReadFeatureValuesResponse_FeatureDescriptor struct { func (x *ReadFeatureValuesResponse_FeatureDescriptor) Reset() { *x = ReadFeatureValuesResponse_FeatureDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_FeatureDescriptor) String() string { @@ -817,7 +795,7 @@ func (*ReadFeatureValuesResponse_FeatureDescriptor) ProtoMessage() {} func (x *ReadFeatureValuesResponse_FeatureDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +837,9 @@ type ReadFeatureValuesResponse_Header struct { func (x *ReadFeatureValuesResponse_Header) Reset() { *x = ReadFeatureValuesResponse_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_Header) String() string { @@ -874,7 +850,7 @@ func (*ReadFeatureValuesResponse_Header) ProtoMessage() {} func (x *ReadFeatureValuesResponse_Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -922,11 +898,9 @@ type ReadFeatureValuesResponse_EntityView struct { func (x *ReadFeatureValuesResponse_EntityView) Reset() { *x = ReadFeatureValuesResponse_EntityView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_EntityView) String() string { @@ -937,7 +911,7 @@ func (*ReadFeatureValuesResponse_EntityView) ProtoMessage() {} func (x *ReadFeatureValuesResponse_EntityView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +956,9 @@ type ReadFeatureValuesResponse_EntityView_Data struct { func (x *ReadFeatureValuesResponse_EntityView_Data) Reset() { *x = ReadFeatureValuesResponse_EntityView_Data{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_EntityView_Data) String() string { @@ -997,7 +969,7 @@ func (*ReadFeatureValuesResponse_EntityView_Data) ProtoMessage() {} func (x *ReadFeatureValuesResponse_EntityView_Data) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1045,9 @@ type FeatureValue_Metadata struct { func (x *FeatureValue_Metadata) Reset() { *x = FeatureValue_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValue_Metadata) String() string { @@ -1088,7 +1058,7 @@ func (*FeatureValue_Metadata) ProtoMessage() {} func (x *FeatureValue_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1461,188 +1431,6 @@ func file_google_cloud_aiplatform_v1_featurestore_online_service_proto_init() { } file_google_cloud_aiplatform_v1_feature_selector_proto_init() file_google_cloud_aiplatform_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamingReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StructValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StructFieldValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValueList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_FeatureDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_EntityView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_EntityView_Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValue_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_featurestore_online_service_proto_msgTypes[6].OneofWrappers = []any{ (*FeatureValue_BoolValue)(nil), (*FeatureValue_DoubleValue)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/featurestore_service.pb.go b/aiplatform/apiv1/aiplatformpb/featurestore_service.pb.go index 1a6a058164de..ddca426127ff 100755 --- a/aiplatform/apiv1/aiplatformpb/featurestore_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/featurestore_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/featurestore_service.proto @@ -70,11 +70,9 @@ type CreateFeaturestoreRequest struct { func (x *CreateFeaturestoreRequest) Reset() { *x = CreateFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeaturestoreRequest) String() string { @@ -85,7 +83,7 @@ func (*CreateFeaturestoreRequest) ProtoMessage() {} func (x *CreateFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type GetFeaturestoreRequest struct { func (x *GetFeaturestoreRequest) Reset() { *x = GetFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeaturestoreRequest) String() string { @@ -149,7 +145,7 @@ func (*GetFeaturestoreRequest) ProtoMessage() {} func (x *GetFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type ListFeaturestoresRequest struct { func (x *ListFeaturestoresRequest) Reset() { *x = ListFeaturestoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturestoresRequest) String() string { @@ -248,7 +242,7 @@ func (*ListFeaturestoresRequest) ProtoMessage() {} func (x *ListFeaturestoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +317,9 @@ type ListFeaturestoresResponse struct { func (x *ListFeaturestoresResponse) Reset() { *x = ListFeaturestoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturestoresResponse) String() string { @@ -338,7 +330,7 @@ func (*ListFeaturestoresResponse) ProtoMessage() {} func (x *ListFeaturestoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +389,9 @@ type UpdateFeaturestoreRequest struct { func (x *UpdateFeaturestoreRequest) Reset() { *x = UpdateFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeaturestoreRequest) String() string { @@ -412,7 +402,7 @@ func (*UpdateFeaturestoreRequest) ProtoMessage() {} func (x *UpdateFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +450,9 @@ type DeleteFeaturestoreRequest struct { func (x *DeleteFeaturestoreRequest) Reset() { *x = DeleteFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeaturestoreRequest) String() string { @@ -475,7 +463,7 @@ func (*DeleteFeaturestoreRequest) ProtoMessage() {} func (x *DeleteFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +544,9 @@ type ImportFeatureValuesRequest struct { func (x *ImportFeatureValuesRequest) Reset() { *x = ImportFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesRequest) String() string { @@ -571,7 +557,7 @@ func (*ImportFeatureValuesRequest) ProtoMessage() {} func (x *ImportFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +730,9 @@ type ImportFeatureValuesResponse struct { func (x *ImportFeatureValuesResponse) Reset() { *x = ImportFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesResponse) String() string { @@ -759,7 +743,7 @@ func (*ImportFeatureValuesResponse) ProtoMessage() {} func (x *ImportFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +823,9 @@ type BatchReadFeatureValuesRequest struct { func (x *BatchReadFeatureValuesRequest) Reset() { *x = BatchReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest) String() string { @@ -854,7 +836,7 @@ func (*BatchReadFeatureValuesRequest) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +978,9 @@ type ExportFeatureValuesRequest struct { func (x *ExportFeatureValuesRequest) Reset() { *x = ExportFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest) String() string { @@ -1011,7 +991,7 @@ func (*ExportFeatureValuesRequest) ProtoMessage() {} func (x *ExportFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1089,9 @@ type DestinationFeatureSetting struct { func (x *DestinationFeatureSetting) Reset() { *x = DestinationFeatureSetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationFeatureSetting) String() string { @@ -1124,7 +1102,7 @@ func (*DestinationFeatureSetting) ProtoMessage() {} func (x *DestinationFeatureSetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1147,9 @@ type FeatureValueDestination struct { func (x *FeatureValueDestination) Reset() { *x = FeatureValueDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValueDestination) String() string { @@ -1184,7 +1160,7 @@ func (*FeatureValueDestination) ProtoMessage() {} func (x *FeatureValueDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1277,11 +1253,9 @@ type ExportFeatureValuesResponse struct { func (x *ExportFeatureValuesResponse) Reset() { *x = ExportFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesResponse) String() string { @@ -1292,7 +1266,7 @@ func (*ExportFeatureValuesResponse) ProtoMessage() {} func (x *ExportFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1291,9 @@ type BatchReadFeatureValuesResponse struct { func (x *BatchReadFeatureValuesResponse) Reset() { *x = BatchReadFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesResponse) String() string { @@ -1332,7 +1304,7 @@ func (*BatchReadFeatureValuesResponse) ProtoMessage() {} func (x *BatchReadFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,11 +1344,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -1387,7 +1357,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1438,11 +1408,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -1453,7 +1421,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1533,11 +1501,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -1548,7 +1514,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1623,11 +1589,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -1638,7 +1602,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1667,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -1718,7 +1680,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,11 +1727,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -1780,7 +1740,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1798,9 @@ type CreateFeatureRequest struct { func (x *CreateFeatureRequest) Reset() { *x = CreateFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureRequest) String() string { @@ -1853,7 +1811,7 @@ func (*CreateFeatureRequest) ProtoMessage() {} func (x *CreateFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1913,11 +1871,9 @@ type BatchCreateFeaturesRequest struct { func (x *BatchCreateFeaturesRequest) Reset() { *x = BatchCreateFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesRequest) String() string { @@ -1928,7 +1884,7 @@ func (*BatchCreateFeaturesRequest) ProtoMessage() {} func (x *BatchCreateFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1970,11 +1926,9 @@ type BatchCreateFeaturesResponse struct { func (x *BatchCreateFeaturesResponse) Reset() { *x = BatchCreateFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesResponse) String() string { @@ -1985,7 +1939,7 @@ func (*BatchCreateFeaturesResponse) ProtoMessage() {} func (x *BatchCreateFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2026,11 +1980,9 @@ type GetFeatureRequest struct { func (x *GetFeatureRequest) Reset() { *x = GetFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureRequest) String() string { @@ -2041,7 +1993,7 @@ func (*GetFeatureRequest) ProtoMessage() {} func (x *GetFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2139,11 +2091,9 @@ type ListFeaturesRequest struct { func (x *ListFeaturesRequest) Reset() { *x = ListFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturesRequest) String() string { @@ -2154,7 +2104,7 @@ func (*ListFeaturesRequest) ProtoMessage() {} func (x *ListFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2238,11 +2188,9 @@ type ListFeaturesResponse struct { func (x *ListFeaturesResponse) Reset() { *x = ListFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturesResponse) String() string { @@ -2253,7 +2201,7 @@ func (*ListFeaturesResponse) ProtoMessage() {} func (x *ListFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2370,11 +2318,9 @@ type SearchFeaturesRequest struct { func (x *SearchFeaturesRequest) Reset() { *x = SearchFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFeaturesRequest) String() string { @@ -2385,7 +2331,7 @@ func (*SearchFeaturesRequest) ProtoMessage() {} func (x *SearchFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2454,11 +2400,9 @@ type SearchFeaturesResponse struct { func (x *SearchFeaturesResponse) Reset() { *x = SearchFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFeaturesResponse) String() string { @@ -2469,7 +2413,7 @@ func (*SearchFeaturesResponse) ProtoMessage() {} func (x *SearchFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2532,11 +2476,9 @@ type UpdateFeatureRequest struct { func (x *UpdateFeatureRequest) Reset() { *x = UpdateFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureRequest) String() string { @@ -2547,7 +2489,7 @@ func (*UpdateFeatureRequest) ProtoMessage() {} func (x *UpdateFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2594,11 +2536,9 @@ type DeleteFeatureRequest struct { func (x *DeleteFeatureRequest) Reset() { *x = DeleteFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureRequest) String() string { @@ -2609,7 +2549,7 @@ func (*DeleteFeatureRequest) ProtoMessage() {} func (x *DeleteFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,11 +2583,9 @@ type CreateFeaturestoreOperationMetadata struct { func (x *CreateFeaturestoreOperationMetadata) Reset() { *x = CreateFeaturestoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeaturestoreOperationMetadata) String() string { @@ -2658,7 +2596,7 @@ func (*CreateFeaturestoreOperationMetadata) ProtoMessage() {} func (x *CreateFeaturestoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2692,11 +2630,9 @@ type UpdateFeaturestoreOperationMetadata struct { func (x *UpdateFeaturestoreOperationMetadata) Reset() { *x = UpdateFeaturestoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeaturestoreOperationMetadata) String() string { @@ -2707,7 +2643,7 @@ func (*UpdateFeaturestoreOperationMetadata) ProtoMessage() {} func (x *UpdateFeaturestoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2695,9 @@ type ImportFeatureValuesOperationMetadata struct { func (x *ImportFeatureValuesOperationMetadata) Reset() { *x = ImportFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesOperationMetadata) String() string { @@ -2774,7 +2708,7 @@ func (*ImportFeatureValuesOperationMetadata) ProtoMessage() {} func (x *ImportFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2784,9 @@ type ExportFeatureValuesOperationMetadata struct { func (x *ExportFeatureValuesOperationMetadata) Reset() { *x = ExportFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesOperationMetadata) String() string { @@ -2865,7 +2797,7 @@ func (*ExportFeatureValuesOperationMetadata) ProtoMessage() {} func (x *ExportFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2899,11 +2831,9 @@ type BatchReadFeatureValuesOperationMetadata struct { func (x *BatchReadFeatureValuesOperationMetadata) Reset() { *x = BatchReadFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesOperationMetadata) String() string { @@ -2914,7 +2844,7 @@ func (*BatchReadFeatureValuesOperationMetadata) ProtoMessage() {} func (x *BatchReadFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2948,11 +2878,9 @@ type DeleteFeatureValuesOperationMetadata struct { func (x *DeleteFeatureValuesOperationMetadata) Reset() { *x = DeleteFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesOperationMetadata) String() string { @@ -2963,7 +2891,7 @@ func (*DeleteFeatureValuesOperationMetadata) ProtoMessage() {} func (x *DeleteFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2997,11 +2925,9 @@ type CreateEntityTypeOperationMetadata struct { func (x *CreateEntityTypeOperationMetadata) Reset() { *x = CreateEntityTypeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeOperationMetadata) String() string { @@ -3012,7 +2938,7 @@ func (*CreateEntityTypeOperationMetadata) ProtoMessage() {} func (x *CreateEntityTypeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3046,11 +2972,9 @@ type CreateFeatureOperationMetadata struct { func (x *CreateFeatureOperationMetadata) Reset() { *x = CreateFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOperationMetadata) String() string { @@ -3061,7 +2985,7 @@ func (*CreateFeatureOperationMetadata) ProtoMessage() {} func (x *CreateFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3095,11 +3019,9 @@ type BatchCreateFeaturesOperationMetadata struct { func (x *BatchCreateFeaturesOperationMetadata) Reset() { *x = BatchCreateFeaturesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesOperationMetadata) String() string { @@ -3110,7 +3032,7 @@ func (*BatchCreateFeaturesOperationMetadata) ProtoMessage() {} func (x *BatchCreateFeaturesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3154,11 +3076,9 @@ type DeleteFeatureValuesRequest struct { func (x *DeleteFeatureValuesRequest) Reset() { *x = DeleteFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest) String() string { @@ -3169,7 +3089,7 @@ func (*DeleteFeatureValuesRequest) ProtoMessage() {} func (x *DeleteFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3251,11 +3171,9 @@ type DeleteFeatureValuesResponse struct { func (x *DeleteFeatureValuesResponse) Reset() { *x = DeleteFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse) String() string { @@ -3266,7 +3184,7 @@ func (*DeleteFeatureValuesResponse) ProtoMessage() {} func (x *DeleteFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3341,11 +3259,9 @@ type EntityIdSelector struct { func (x *EntityIdSelector) Reset() { *x = EntityIdSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityIdSelector) String() string { @@ -3356,7 +3272,7 @@ func (*EntityIdSelector) ProtoMessage() {} func (x *EntityIdSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3419,11 +3335,9 @@ type ImportFeatureValuesRequest_FeatureSpec struct { func (x *ImportFeatureValuesRequest_FeatureSpec) Reset() { *x = ImportFeatureValuesRequest_FeatureSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesRequest_FeatureSpec) String() string { @@ -3434,7 +3348,7 @@ func (*ImportFeatureValuesRequest_FeatureSpec) ProtoMessage() {} func (x *ImportFeatureValuesRequest_FeatureSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3477,11 +3391,9 @@ type BatchReadFeatureValuesRequest_PassThroughField struct { func (x *BatchReadFeatureValuesRequest_PassThroughField) Reset() { *x = BatchReadFeatureValuesRequest_PassThroughField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest_PassThroughField) String() string { @@ -3492,7 +3404,7 @@ func (*BatchReadFeatureValuesRequest_PassThroughField) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest_PassThroughField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3535,11 +3447,9 @@ type BatchReadFeatureValuesRequest_EntityTypeSpec struct { func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) Reset() { *x = BatchReadFeatureValuesRequest_EntityTypeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) String() string { @@ -3550,7 +3460,7 @@ func (*BatchReadFeatureValuesRequest_EntityTypeSpec) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3605,11 +3515,9 @@ type ExportFeatureValuesRequest_SnapshotExport struct { func (x *ExportFeatureValuesRequest_SnapshotExport) Reset() { *x = ExportFeatureValuesRequest_SnapshotExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest_SnapshotExport) String() string { @@ -3620,7 +3528,7 @@ func (*ExportFeatureValuesRequest_SnapshotExport) ProtoMessage() {} func (x *ExportFeatureValuesRequest_SnapshotExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3668,11 +3576,9 @@ type ExportFeatureValuesRequest_FullExport struct { func (x *ExportFeatureValuesRequest_FullExport) Reset() { *x = ExportFeatureValuesRequest_FullExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest_FullExport) String() string { @@ -3683,7 +3589,7 @@ func (*ExportFeatureValuesRequest_FullExport) ProtoMessage() {} func (x *ExportFeatureValuesRequest_FullExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3727,11 +3633,9 @@ type DeleteFeatureValuesRequest_SelectEntity struct { func (x *DeleteFeatureValuesRequest_SelectEntity) Reset() { *x = DeleteFeatureValuesRequest_SelectEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest_SelectEntity) String() string { @@ -3742,7 +3646,7 @@ func (*DeleteFeatureValuesRequest_SelectEntity) ProtoMessage() {} func (x *DeleteFeatureValuesRequest_SelectEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3789,11 +3693,9 @@ type DeleteFeatureValuesRequest_SelectTimeRangeAndFeature struct { func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) Reset() { *x = DeleteFeatureValuesRequest_SelectTimeRangeAndFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) String() string { @@ -3804,7 +3706,7 @@ func (*DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) ProtoMessage() {} func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3857,11 +3759,9 @@ type DeleteFeatureValuesResponse_SelectEntity struct { func (x *DeleteFeatureValuesResponse_SelectEntity) Reset() { *x = DeleteFeatureValuesResponse_SelectEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse_SelectEntity) String() string { @@ -3872,7 +3772,7 @@ func (*DeleteFeatureValuesResponse_SelectEntity) ProtoMessage() {} func (x *DeleteFeatureValuesResponse_SelectEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3925,11 +3825,9 @@ type DeleteFeatureValuesResponse_SelectTimeRangeAndFeature struct { func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) Reset() { *x = DeleteFeatureValuesResponse_SelectTimeRangeAndFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) String() string { @@ -3940,7 +3838,7 @@ func (*DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) ProtoMessage() {} func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5216,620 +5114,6 @@ func file_google_cloud_aiplatform_v1_featurestore_service_proto_init() { file_google_cloud_aiplatform_v1_featurestore_proto_init() file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturestoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturestoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DestinationFeatureSetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValueDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeaturestoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeaturestoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*EntityIdSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesRequest_FeatureSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest_PassThroughField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest_EntityTypeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest_SnapshotExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest_FullExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest_SelectEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest_SelectTimeRangeAndFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse_SelectEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse_SelectTimeRangeAndFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_featurestore_service_proto_msgTypes[6].OneofWrappers = []any{ (*ImportFeatureValuesRequest_AvroSource)(nil), (*ImportFeatureValuesRequest_BigquerySource)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go b/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go index af819bd99273..ae0171a4a08c 100755 --- a/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/genai_tuning_service.proto @@ -58,11 +58,9 @@ type CreateTuningJobRequest struct { func (x *CreateTuningJobRequest) Reset() { *x = CreateTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTuningJobRequest) String() string { @@ -73,7 +71,7 @@ func (*CreateTuningJobRequest) ProtoMessage() {} func (x *CreateTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type GetTuningJobRequest struct { func (x *GetTuningJobRequest) Reset() { *x = GetTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTuningJobRequest) String() string { @@ -131,7 +127,7 @@ func (*GetTuningJobRequest) ProtoMessage() {} func (x *GetTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +172,9 @@ type ListTuningJobsRequest struct { func (x *ListTuningJobsRequest) Reset() { *x = ListTuningJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTuningJobsRequest) String() string { @@ -191,7 +185,7 @@ func (*ListTuningJobsRequest) ProtoMessage() {} func (x *ListTuningJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +246,9 @@ type ListTuningJobsResponse struct { func (x *ListTuningJobsResponse) Reset() { *x = ListTuningJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTuningJobsResponse) String() string { @@ -267,7 +259,7 @@ func (*ListTuningJobsResponse) ProtoMessage() {} func (x *ListTuningJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +302,9 @@ type CancelTuningJobRequest struct { func (x *CancelTuningJobRequest) Reset() { *x = CancelTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelTuningJobRequest) String() string { @@ -325,7 +315,7 @@ func (*CancelTuningJobRequest) ProtoMessage() {} func (x *CancelTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +362,9 @@ type RebaseTunedModelRequest struct { func (x *RebaseTunedModelRequest) Reset() { *x = RebaseTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebaseTunedModelRequest) String() string { @@ -387,7 +375,7 @@ func (*RebaseTunedModelRequest) ProtoMessage() {} func (x *RebaseTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +438,9 @@ type RebaseTunedModelOperationMetadata struct { func (x *RebaseTunedModelOperationMetadata) Reset() { *x = RebaseTunedModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebaseTunedModelOperationMetadata) String() string { @@ -465,7 +451,7 @@ func (*RebaseTunedModelOperationMetadata) ProtoMessage() {} func (x *RebaseTunedModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,92 +721,6 @@ func file_google_cloud_aiplatform_v1_genai_tuning_service_proto_init() { file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_tuning_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTuningJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTuningJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CancelTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RebaseTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RebaseTunedModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/hyperparameter_tuning_job.pb.go b/aiplatform/apiv1/aiplatformpb/hyperparameter_tuning_job.pb.go index e5c1c0f5d286..19a30a1c7b24 100755 --- a/aiplatform/apiv1/aiplatformpb/hyperparameter_tuning_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/hyperparameter_tuning_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto @@ -106,11 +106,9 @@ type HyperparameterTuningJob struct { func (x *HyperparameterTuningJob) Reset() { *x = HyperparameterTuningJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_hyperparameter_tuning_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_hyperparameter_tuning_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HyperparameterTuningJob) String() string { @@ -121,7 +119,7 @@ func (*HyperparameterTuningJob) ProtoMessage() {} func (x *HyperparameterTuningJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_hyperparameter_tuning_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,20 +438,6 @@ func file_google_cloud_aiplatform_v1_hyperparameter_tuning_job_proto_init() { file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() file_google_cloud_aiplatform_v1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_hyperparameter_tuning_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HyperparameterTuningJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/index.pb.go b/aiplatform/apiv1/aiplatformpb/index.pb.go index 17971a50a34e..ffe539575587 100755 --- a/aiplatform/apiv1/aiplatformpb/index.pb.go +++ b/aiplatform/apiv1/aiplatformpb/index.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/index.proto @@ -237,11 +237,9 @@ type Index struct { func (x *Index) Reset() { *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index) String() string { @@ -252,7 +250,7 @@ func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +399,9 @@ type IndexDatapoint struct { func (x *IndexDatapoint) Reset() { *x = IndexDatapoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint) String() string { @@ -416,7 +412,7 @@ func (*IndexDatapoint) ProtoMessage() {} func (x *IndexDatapoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +485,9 @@ type IndexStats struct { func (x *IndexStats) Reset() { *x = IndexStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexStats) String() string { @@ -504,7 +498,7 @@ func (*IndexStats) ProtoMessage() {} func (x *IndexStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +550,9 @@ type IndexDatapoint_SparseEmbedding struct { func (x *IndexDatapoint_SparseEmbedding) Reset() { *x = IndexDatapoint_SparseEmbedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_SparseEmbedding) String() string { @@ -571,7 +563,7 @@ func (*IndexDatapoint_SparseEmbedding) ProtoMessage() {} func (x *IndexDatapoint_SparseEmbedding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +609,9 @@ type IndexDatapoint_Restriction struct { func (x *IndexDatapoint_Restriction) Reset() { *x = IndexDatapoint_Restriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_Restriction) String() string { @@ -632,7 +622,7 @@ func (*IndexDatapoint_Restriction) ProtoMessage() {} func (x *IndexDatapoint_Restriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +683,9 @@ type IndexDatapoint_NumericRestriction struct { func (x *IndexDatapoint_NumericRestriction) Reset() { *x = IndexDatapoint_NumericRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_NumericRestriction) String() string { @@ -708,7 +696,7 @@ func (*IndexDatapoint_NumericRestriction) ProtoMessage() {} func (x *IndexDatapoint_NumericRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +796,9 @@ type IndexDatapoint_CrowdingTag struct { func (x *IndexDatapoint_CrowdingTag) Reset() { *x = IndexDatapoint_CrowdingTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_CrowdingTag) String() string { @@ -823,7 +809,7 @@ func (*IndexDatapoint_CrowdingTag) ProtoMessage() {} func (x *IndexDatapoint_CrowdingTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,92 +1078,6 @@ func file_google_cloud_aiplatform_v1_index_proto_init() { } file_google_cloud_aiplatform_v1_deployed_index_ref_proto_init() file_google_cloud_aiplatform_v1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_index_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*IndexStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_SparseEmbedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_Restriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_NumericRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_CrowdingTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_index_proto_msgTypes[6].OneofWrappers = []any{ (*IndexDatapoint_NumericRestriction_ValueInt)(nil), (*IndexDatapoint_NumericRestriction_ValueFloat)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/index_endpoint.pb.go b/aiplatform/apiv1/aiplatformpb/index_endpoint.pb.go index 9bda4ad1de8a..a659347dbd40 100755 --- a/aiplatform/apiv1/aiplatformpb/index_endpoint.pb.go +++ b/aiplatform/apiv1/aiplatformpb/index_endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/index_endpoint.proto @@ -124,11 +124,9 @@ type IndexEndpoint struct { func (x *IndexEndpoint) Reset() { *x = IndexEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexEndpoint) String() string { @@ -139,7 +137,7 @@ func (*IndexEndpoint) ProtoMessage() {} func (x *IndexEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +378,9 @@ type DeployedIndex struct { func (x *DeployedIndex) Reset() { *x = DeployedIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndex) String() string { @@ -395,7 +391,7 @@ func (*DeployedIndex) ProtoMessage() {} func (x *DeployedIndex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,11 +509,9 @@ type DeployedIndexAuthConfig struct { func (x *DeployedIndexAuthConfig) Reset() { *x = DeployedIndexAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexAuthConfig) String() string { @@ -528,7 +522,7 @@ func (*DeployedIndexAuthConfig) ProtoMessage() {} func (x *DeployedIndexAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +566,9 @@ type IndexPrivateEndpoints struct { func (x *IndexPrivateEndpoints) Reset() { *x = IndexPrivateEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexPrivateEndpoints) String() string { @@ -587,7 +579,7 @@ func (*IndexPrivateEndpoints) ProtoMessage() {} func (x *IndexPrivateEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +637,9 @@ type DeployedIndexAuthConfig_AuthProvider struct { func (x *DeployedIndexAuthConfig_AuthProvider) Reset() { *x = DeployedIndexAuthConfig_AuthProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexAuthConfig_AuthProvider) String() string { @@ -660,7 +650,7 @@ func (*DeployedIndexAuthConfig_AuthProvider) ProtoMessage() {} func (x *DeployedIndexAuthConfig_AuthProvider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,68 +939,6 @@ func file_google_cloud_aiplatform_v1_index_endpoint_proto_init() { file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() file_google_cloud_aiplatform_v1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IndexEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*IndexPrivateEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexAuthConfig_AuthProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/index_endpoint_service.pb.go b/aiplatform/apiv1/aiplatformpb/index_endpoint_service.pb.go index 362c5ba5a8be..dfea32af385f 100755 --- a/aiplatform/apiv1/aiplatformpb/index_endpoint_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/index_endpoint_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/index_endpoint_service.proto @@ -59,11 +59,9 @@ type CreateIndexEndpointRequest struct { func (x *CreateIndexEndpointRequest) Reset() { *x = CreateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateIndexEndpointRequest) ProtoMessage() {} func (x *CreateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateIndexEndpointOperationMetadata struct { func (x *CreateIndexEndpointOperationMetadata) Reset() { *x = CreateIndexEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateIndexEndpointOperationMetadata) ProtoMessage() {} func (x *CreateIndexEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetIndexEndpointRequest struct { func (x *GetIndexEndpointRequest) Reset() { *x = GetIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexEndpointRequest) String() string { @@ -183,7 +177,7 @@ func (*GetIndexEndpointRequest) ProtoMessage() {} func (x *GetIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +243,9 @@ type ListIndexEndpointsRequest struct { func (x *ListIndexEndpointsRequest) Reset() { *x = ListIndexEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsRequest) String() string { @@ -264,7 +256,7 @@ func (*ListIndexEndpointsRequest) ProtoMessage() {} func (x *ListIndexEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type ListIndexEndpointsResponse struct { func (x *ListIndexEndpointsResponse) Reset() { *x = ListIndexEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsResponse) String() string { @@ -347,7 +337,7 @@ func (*ListIndexEndpointsResponse) ProtoMessage() {} func (x *ListIndexEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +382,9 @@ type UpdateIndexEndpointRequest struct { func (x *UpdateIndexEndpointRequest) Reset() { *x = UpdateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexEndpointRequest) String() string { @@ -407,7 +395,7 @@ func (*UpdateIndexEndpointRequest) ProtoMessage() {} func (x *UpdateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +439,9 @@ type DeleteIndexEndpointRequest struct { func (x *DeleteIndexEndpointRequest) Reset() { *x = DeleteIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexEndpointRequest) String() string { @@ -466,7 +452,7 @@ func (*DeleteIndexEndpointRequest) ProtoMessage() {} func (x *DeleteIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type DeployIndexRequest struct { func (x *DeployIndexRequest) Reset() { *x = DeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexRequest) String() string { @@ -520,7 +504,7 @@ func (*DeployIndexRequest) ProtoMessage() {} func (x *DeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,11 +546,9 @@ type DeployIndexResponse struct { func (x *DeployIndexResponse) Reset() { *x = DeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexResponse) String() string { @@ -577,7 +559,7 @@ func (*DeployIndexResponse) ProtoMessage() {} func (x *DeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +596,9 @@ type DeployIndexOperationMetadata struct { func (x *DeployIndexOperationMetadata) Reset() { *x = DeployIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexOperationMetadata) String() string { @@ -629,7 +609,7 @@ func (*DeployIndexOperationMetadata) ProtoMessage() {} func (x *DeployIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +656,9 @@ type UndeployIndexRequest struct { func (x *UndeployIndexRequest) Reset() { *x = UndeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexRequest) String() string { @@ -691,7 +669,7 @@ func (*UndeployIndexRequest) ProtoMessage() {} func (x *UndeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +708,9 @@ type UndeployIndexResponse struct { func (x *UndeployIndexResponse) Reset() { *x = UndeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexResponse) String() string { @@ -745,7 +721,7 @@ func (*UndeployIndexResponse) ProtoMessage() {} func (x *UndeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +749,9 @@ type UndeployIndexOperationMetadata struct { func (x *UndeployIndexOperationMetadata) Reset() { *x = UndeployIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexOperationMetadata) String() string { @@ -788,7 +762,7 @@ func (*UndeployIndexOperationMetadata) ProtoMessage() {} func (x *UndeployIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +805,9 @@ type MutateDeployedIndexRequest struct { func (x *MutateDeployedIndexRequest) Reset() { *x = MutateDeployedIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexRequest) String() string { @@ -846,7 +818,7 @@ func (*MutateDeployedIndexRequest) ProtoMessage() {} func (x *MutateDeployedIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +860,9 @@ type MutateDeployedIndexResponse struct { func (x *MutateDeployedIndexResponse) Reset() { *x = MutateDeployedIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexResponse) String() string { @@ -903,7 +873,7 @@ func (*MutateDeployedIndexResponse) ProtoMessage() {} func (x *MutateDeployedIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +910,9 @@ type MutateDeployedIndexOperationMetadata struct { func (x *MutateDeployedIndexOperationMetadata) Reset() { *x = MutateDeployedIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexOperationMetadata) String() string { @@ -955,7 +923,7 @@ func (*MutateDeployedIndexOperationMetadata) ProtoMessage() {} func (x *MutateDeployedIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1390,200 +1358,6 @@ func file_google_cloud_aiplatform_v1_index_endpoint_service_proto_init() { } file_google_cloud_aiplatform_v1_index_endpoint_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_endpoint_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/index_service.pb.go b/aiplatform/apiv1/aiplatformpb/index_service.pb.go index 4a3df3db4e45..f294c73daf13 100755 --- a/aiplatform/apiv1/aiplatformpb/index_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/index_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/index_service.proto @@ -173,11 +173,9 @@ type CreateIndexRequest struct { func (x *CreateIndexRequest) Reset() { *x = CreateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexRequest) String() string { @@ -188,7 +186,7 @@ func (*CreateIndexRequest) ProtoMessage() {} func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +230,9 @@ type CreateIndexOperationMetadata struct { func (x *CreateIndexOperationMetadata) Reset() { *x = CreateIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexOperationMetadata) String() string { @@ -247,7 +243,7 @@ func (*CreateIndexOperationMetadata) ProtoMessage() {} func (x *CreateIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +287,9 @@ type GetIndexRequest struct { func (x *GetIndexRequest) Reset() { *x = GetIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexRequest) String() string { @@ -306,7 +300,7 @@ func (*GetIndexRequest) ProtoMessage() {} func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +349,9 @@ type ListIndexesRequest struct { func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesRequest) String() string { @@ -370,7 +362,7 @@ func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type ListIndexesResponse struct { func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesResponse) String() string { @@ -453,7 +443,7 @@ func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type UpdateIndexRequest struct { func (x *UpdateIndexRequest) Reset() { *x = UpdateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexRequest) String() string { @@ -514,7 +502,7 @@ func (*UpdateIndexRequest) ProtoMessage() {} func (x *UpdateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +546,9 @@ type UpdateIndexOperationMetadata struct { func (x *UpdateIndexOperationMetadata) Reset() { *x = UpdateIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexOperationMetadata) String() string { @@ -573,7 +559,7 @@ func (*UpdateIndexOperationMetadata) ProtoMessage() {} func (x *UpdateIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +603,9 @@ type DeleteIndexRequest struct { func (x *DeleteIndexRequest) Reset() { *x = DeleteIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexRequest) String() string { @@ -632,7 +616,7 @@ func (*DeleteIndexRequest) ProtoMessage() {} func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +663,9 @@ type UpsertDatapointsRequest struct { func (x *UpsertDatapointsRequest) Reset() { *x = UpsertDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDatapointsRequest) String() string { @@ -694,7 +676,7 @@ func (*UpsertDatapointsRequest) ProtoMessage() {} func (x *UpsertDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +722,9 @@ type UpsertDatapointsResponse struct { func (x *UpsertDatapointsResponse) Reset() { *x = UpsertDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDatapointsResponse) String() string { @@ -755,7 +735,7 @@ func (*UpsertDatapointsResponse) ProtoMessage() {} func (x *UpsertDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +767,9 @@ type RemoveDatapointsRequest struct { func (x *RemoveDatapointsRequest) Reset() { *x = RemoveDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDatapointsRequest) String() string { @@ -802,7 +780,7 @@ func (*RemoveDatapointsRequest) ProtoMessage() {} func (x *RemoveDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +819,9 @@ type RemoveDatapointsResponse struct { func (x *RemoveDatapointsResponse) Reset() { *x = RemoveDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDatapointsResponse) String() string { @@ -856,7 +832,7 @@ func (*RemoveDatapointsResponse) ProtoMessage() {} func (x *RemoveDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +866,9 @@ type NearestNeighborSearchOperationMetadata struct { func (x *NearestNeighborSearchOperationMetadata) Reset() { *x = NearestNeighborSearchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata) String() string { @@ -905,7 +879,7 @@ func (*NearestNeighborSearchOperationMetadata) ProtoMessage() {} func (x *NearestNeighborSearchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +929,9 @@ type NearestNeighborSearchOperationMetadata_RecordError struct { func (x *NearestNeighborSearchOperationMetadata_RecordError) Reset() { *x = NearestNeighborSearchOperationMetadata_RecordError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata_RecordError) String() string { @@ -970,7 +942,7 @@ func (*NearestNeighborSearchOperationMetadata_RecordError) ProtoMessage() {} func (x *NearestNeighborSearchOperationMetadata_RecordError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1015,9 @@ type NearestNeighborSearchOperationMetadata_ContentValidationStats struct { func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) Reset() { *x = NearestNeighborSearchOperationMetadata_ContentValidationStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) String() string { @@ -1058,7 +1028,7 @@ func (*NearestNeighborSearchOperationMetadata_ContentValidationStats) ProtoMessa func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1529,188 +1499,6 @@ func file_google_cloud_aiplatform_v1_index_service_proto_init() { } file_google_cloud_aiplatform_v1_index_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpsertDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpsertDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata_RecordError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_index_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata_ContentValidationStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/io.pb.go b/aiplatform/apiv1/aiplatformpb/io.pb.go index dd739e9e41d8..9865bd1965c1 100755 --- a/aiplatform/apiv1/aiplatformpb/io.pb.go +++ b/aiplatform/apiv1/aiplatformpb/io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/io.proto @@ -102,11 +102,9 @@ type AvroSource struct { func (x *AvroSource) Reset() { *x = AvroSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSource) String() string { @@ -117,7 +115,7 @@ func (*AvroSource) ProtoMessage() {} func (x *AvroSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type CsvSource struct { func (x *CsvSource) Reset() { *x = CsvSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvSource) String() string { @@ -166,7 +162,7 @@ func (*CsvSource) ProtoMessage() {} func (x *CsvSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -217,7 +211,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +248,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -269,7 +261,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +298,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -321,7 +311,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type BigQueryDestination struct { func (x *BigQueryDestination) Reset() { *x = BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestination) String() string { @@ -380,7 +368,7 @@ func (*BigQueryDestination) ProtoMessage() {} func (x *BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +402,9 @@ type CsvDestination struct { func (x *CsvDestination) Reset() { *x = CsvDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvDestination) String() string { @@ -429,7 +415,7 @@ func (*CsvDestination) ProtoMessage() {} func (x *CsvDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +449,9 @@ type TFRecordDestination struct { func (x *TFRecordDestination) Reset() { *x = TFRecordDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TFRecordDestination) String() string { @@ -478,7 +462,7 @@ func (*TFRecordDestination) ProtoMessage() {} func (x *TFRecordDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +506,9 @@ type ContainerRegistryDestination struct { func (x *ContainerRegistryDestination) Reset() { *x = ContainerRegistryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerRegistryDestination) String() string { @@ -537,7 +519,7 @@ func (*ContainerRegistryDestination) ProtoMessage() {} func (x *ContainerRegistryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +553,9 @@ type GoogleDriveSource struct { func (x *GoogleDriveSource) Reset() { *x = GoogleDriveSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleDriveSource) String() string { @@ -586,7 +566,7 @@ func (*GoogleDriveSource) ProtoMessage() {} func (x *GoogleDriveSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +597,9 @@ type DirectUploadSource struct { func (x *DirectUploadSource) Reset() { *x = DirectUploadSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectUploadSource) String() string { @@ -632,7 +610,7 @@ func (*DirectUploadSource) ProtoMessage() {} func (x *DirectUploadSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +637,9 @@ type SlackSource struct { func (x *SlackSource) Reset() { *x = SlackSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource) String() string { @@ -674,7 +650,7 @@ func (*SlackSource) ProtoMessage() {} func (x *SlackSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +684,9 @@ type JiraSource struct { func (x *JiraSource) Reset() { *x = JiraSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JiraSource) String() string { @@ -723,7 +697,7 @@ func (*JiraSource) ProtoMessage() {} func (x *JiraSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +731,9 @@ type SharePointSources struct { func (x *SharePointSources) Reset() { *x = SharePointSources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharePointSources) String() string { @@ -772,7 +744,7 @@ func (*SharePointSources) ProtoMessage() {} func (x *SharePointSources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +780,9 @@ type GoogleDriveSource_ResourceId struct { func (x *GoogleDriveSource_ResourceId) Reset() { *x = GoogleDriveSource_ResourceId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleDriveSource_ResourceId) String() string { @@ -823,7 +793,7 @@ func (*GoogleDriveSource_ResourceId) ProtoMessage() {} func (x *GoogleDriveSource_ResourceId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +839,9 @@ type SlackSource_SlackChannels struct { func (x *SlackSource_SlackChannels) Reset() { *x = SlackSource_SlackChannels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource_SlackChannels) String() string { @@ -884,7 +852,7 @@ func (*SlackSource_SlackChannels) ProtoMessage() {} func (x *SlackSource_SlackChannels) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,11 +897,9 @@ type SlackSource_SlackChannels_SlackChannel struct { func (x *SlackSource_SlackChannels_SlackChannel) Reset() { *x = SlackSource_SlackChannels_SlackChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource_SlackChannels_SlackChannel) String() string { @@ -944,7 +910,7 @@ func (*SlackSource_SlackChannels_SlackChannel) ProtoMessage() {} func (x *SlackSource_SlackChannels_SlackChannel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +971,9 @@ type JiraSource_JiraQueries struct { func (x *JiraSource_JiraQueries) Reset() { *x = JiraSource_JiraQueries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JiraSource_JiraQueries) String() string { @@ -1020,7 +984,7 @@ func (*JiraSource_JiraQueries) ProtoMessage() {} func (x *JiraSource_JiraQueries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1071,9 @@ type SharePointSources_SharePointSource struct { func (x *SharePointSources_SharePointSource) Reset() { *x = SharePointSources_SharePointSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharePointSources_SharePointSource) String() string { @@ -1122,7 +1084,7 @@ func (*SharePointSources_SharePointSource) ProtoMessage() {} func (x *SharePointSources_SharePointSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_io_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1507,236 +1469,6 @@ func file_google_cloud_aiplatform_v1_io_proto_init() { return } file_google_cloud_aiplatform_v1_api_auth_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AvroSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CsvSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CsvDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TFRecordDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ContainerRegistryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GoogleDriveSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DirectUploadSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*JiraSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SharePointSources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GoogleDriveSource_ResourceId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource_SlackChannels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource_SlackChannels_SlackChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*JiraSource_JiraQueries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_io_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SharePointSources_SharePointSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_io_proto_msgTypes[18].OneofWrappers = []any{ (*SharePointSources_SharePointSource_SharepointFolderPath)(nil), (*SharePointSources_SharePointSource_SharepointFolderId)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/job_service.pb.go b/aiplatform/apiv1/aiplatformpb/job_service.pb.go index 0c8ac33a30cb..9c8690506cd4 100755 --- a/aiplatform/apiv1/aiplatformpb/job_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/job_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/job_service.proto @@ -60,11 +60,9 @@ type CreateCustomJobRequest struct { func (x *CreateCustomJobRequest) Reset() { *x = CreateCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomJobRequest) String() string { @@ -75,7 +73,7 @@ func (*CreateCustomJobRequest) ProtoMessage() {} func (x *CreateCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type GetCustomJobRequest struct { func (x *GetCustomJobRequest) Reset() { *x = GetCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomJobRequest) String() string { @@ -134,7 +130,7 @@ func (*GetCustomJobRequest) ProtoMessage() {} func (x *GetCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type ListCustomJobsRequest struct { func (x *ListCustomJobsRequest) Reset() { *x = ListCustomJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomJobsRequest) String() string { @@ -217,7 +211,7 @@ func (*ListCustomJobsRequest) ProtoMessage() {} func (x *ListCustomJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +279,9 @@ type ListCustomJobsResponse struct { func (x *ListCustomJobsResponse) Reset() { *x = ListCustomJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomJobsResponse) String() string { @@ -300,7 +292,7 @@ func (*ListCustomJobsResponse) ProtoMessage() {} func (x *ListCustomJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +336,9 @@ type DeleteCustomJobRequest struct { func (x *DeleteCustomJobRequest) Reset() { *x = DeleteCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomJobRequest) String() string { @@ -359,7 +349,7 @@ func (*DeleteCustomJobRequest) ProtoMessage() {} func (x *DeleteCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +386,9 @@ type CancelCustomJobRequest struct { func (x *CancelCustomJobRequest) Reset() { *x = CancelCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCustomJobRequest) String() string { @@ -411,7 +399,7 @@ func (*CancelCustomJobRequest) ProtoMessage() {} func (x *CancelCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +437,9 @@ type CreateDataLabelingJobRequest struct { func (x *CreateDataLabelingJobRequest) Reset() { *x = CreateDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataLabelingJobRequest) String() string { @@ -464,7 +450,7 @@ func (*CreateDataLabelingJobRequest) ProtoMessage() {} func (x *CreateDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +494,9 @@ type GetDataLabelingJobRequest struct { func (x *GetDataLabelingJobRequest) Reset() { *x = GetDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataLabelingJobRequest) String() string { @@ -523,7 +507,7 @@ func (*GetDataLabelingJobRequest) ProtoMessage() {} func (x *GetDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +577,9 @@ type ListDataLabelingJobsRequest struct { func (x *ListDataLabelingJobsRequest) Reset() { *x = ListDataLabelingJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataLabelingJobsRequest) String() string { @@ -608,7 +590,7 @@ func (*ListDataLabelingJobsRequest) ProtoMessage() {} func (x *ListDataLabelingJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +663,9 @@ type ListDataLabelingJobsResponse struct { func (x *ListDataLabelingJobsResponse) Reset() { *x = ListDataLabelingJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataLabelingJobsResponse) String() string { @@ -696,7 +676,7 @@ func (*ListDataLabelingJobsResponse) ProtoMessage() {} func (x *ListDataLabelingJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +720,9 @@ type DeleteDataLabelingJobRequest struct { func (x *DeleteDataLabelingJobRequest) Reset() { *x = DeleteDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataLabelingJobRequest) String() string { @@ -755,7 +733,7 @@ func (*DeleteDataLabelingJobRequest) ProtoMessage() {} func (x *DeleteDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +770,9 @@ type CancelDataLabelingJobRequest struct { func (x *CancelDataLabelingJobRequest) Reset() { *x = CancelDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelDataLabelingJobRequest) String() string { @@ -807,7 +783,7 @@ func (*CancelDataLabelingJobRequest) ProtoMessage() {} func (x *CancelDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +822,9 @@ type CreateHyperparameterTuningJobRequest struct { func (x *CreateHyperparameterTuningJobRequest) Reset() { *x = CreateHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHyperparameterTuningJobRequest) String() string { @@ -861,7 +835,7 @@ func (*CreateHyperparameterTuningJobRequest) ProtoMessage() {} func (x *CreateHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,11 +879,9 @@ type GetHyperparameterTuningJobRequest struct { func (x *GetHyperparameterTuningJobRequest) Reset() { *x = GetHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHyperparameterTuningJobRequest) String() string { @@ -920,7 +892,7 @@ func (*GetHyperparameterTuningJobRequest) ProtoMessage() {} func (x *GetHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +961,9 @@ type ListHyperparameterTuningJobsRequest struct { func (x *ListHyperparameterTuningJobsRequest) Reset() { *x = ListHyperparameterTuningJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHyperparameterTuningJobsRequest) String() string { @@ -1004,7 +974,7 @@ func (*ListHyperparameterTuningJobsRequest) ProtoMessage() {} func (x *ListHyperparameterTuningJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1044,9 @@ type ListHyperparameterTuningJobsResponse struct { func (x *ListHyperparameterTuningJobsResponse) Reset() { *x = ListHyperparameterTuningJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHyperparameterTuningJobsResponse) String() string { @@ -1089,7 +1057,7 @@ func (*ListHyperparameterTuningJobsResponse) ProtoMessage() {} func (x *ListHyperparameterTuningJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1101,9 @@ type DeleteHyperparameterTuningJobRequest struct { func (x *DeleteHyperparameterTuningJobRequest) Reset() { *x = DeleteHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHyperparameterTuningJobRequest) String() string { @@ -1148,7 +1114,7 @@ func (*DeleteHyperparameterTuningJobRequest) ProtoMessage() {} func (x *DeleteHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1151,9 @@ type CancelHyperparameterTuningJobRequest struct { func (x *CancelHyperparameterTuningJobRequest) Reset() { *x = CancelHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelHyperparameterTuningJobRequest) String() string { @@ -1200,7 +1164,7 @@ func (*CancelHyperparameterTuningJobRequest) ProtoMessage() {} func (x *CancelHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1202,9 @@ type CreateNasJobRequest struct { func (x *CreateNasJobRequest) Reset() { *x = CreateNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNasJobRequest) String() string { @@ -1253,7 +1215,7 @@ func (*CreateNasJobRequest) ProtoMessage() {} func (x *CreateNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1259,9 @@ type GetNasJobRequest struct { func (x *GetNasJobRequest) Reset() { *x = GetNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNasJobRequest) String() string { @@ -1312,7 +1272,7 @@ func (*GetNasJobRequest) ProtoMessage() {} func (x *GetNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1340,9 @@ type ListNasJobsRequest struct { func (x *ListNasJobsRequest) Reset() { *x = ListNasJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasJobsRequest) String() string { @@ -1395,7 +1353,7 @@ func (*ListNasJobsRequest) ProtoMessage() {} func (x *ListNasJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1465,11 +1423,9 @@ type ListNasJobsResponse struct { func (x *ListNasJobsResponse) Reset() { *x = ListNasJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasJobsResponse) String() string { @@ -1480,7 +1436,7 @@ func (*ListNasJobsResponse) ProtoMessage() {} func (x *ListNasJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,11 +1480,9 @@ type DeleteNasJobRequest struct { func (x *DeleteNasJobRequest) Reset() { *x = DeleteNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNasJobRequest) String() string { @@ -1539,7 +1493,7 @@ func (*DeleteNasJobRequest) ProtoMessage() {} func (x *DeleteNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,11 +1530,9 @@ type CancelNasJobRequest struct { func (x *CancelNasJobRequest) Reset() { *x = CancelNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelNasJobRequest) String() string { @@ -1591,7 +1543,7 @@ func (*CancelNasJobRequest) ProtoMessage() {} func (x *CancelNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1628,11 +1580,9 @@ type GetNasTrialDetailRequest struct { func (x *GetNasTrialDetailRequest) Reset() { *x = GetNasTrialDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNasTrialDetailRequest) String() string { @@ -1643,7 +1593,7 @@ func (*GetNasTrialDetailRequest) ProtoMessage() {} func (x *GetNasTrialDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,11 +1639,9 @@ type ListNasTrialDetailsRequest struct { func (x *ListNasTrialDetailsRequest) Reset() { *x = ListNasTrialDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasTrialDetailsRequest) String() string { @@ -1704,7 +1652,7 @@ func (*ListNasTrialDetailsRequest) ProtoMessage() {} func (x *ListNasTrialDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1758,11 +1706,9 @@ type ListNasTrialDetailsResponse struct { func (x *ListNasTrialDetailsResponse) Reset() { *x = ListNasTrialDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasTrialDetailsResponse) String() string { @@ -1773,7 +1719,7 @@ func (*ListNasTrialDetailsResponse) ProtoMessage() {} func (x *ListNasTrialDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1764,9 @@ type CreateBatchPredictionJobRequest struct { func (x *CreateBatchPredictionJobRequest) Reset() { *x = CreateBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBatchPredictionJobRequest) String() string { @@ -1833,7 +1777,7 @@ func (*CreateBatchPredictionJobRequest) ProtoMessage() {} func (x *CreateBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1877,11 +1821,9 @@ type GetBatchPredictionJobRequest struct { func (x *GetBatchPredictionJobRequest) Reset() { *x = GetBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBatchPredictionJobRequest) String() string { @@ -1892,7 +1834,7 @@ func (*GetBatchPredictionJobRequest) ProtoMessage() {} func (x *GetBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1961,11 +1903,9 @@ type ListBatchPredictionJobsRequest struct { func (x *ListBatchPredictionJobsRequest) Reset() { *x = ListBatchPredictionJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchPredictionJobsRequest) String() string { @@ -1976,7 +1916,7 @@ func (*ListBatchPredictionJobsRequest) ProtoMessage() {} func (x *ListBatchPredictionJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +1984,9 @@ type ListBatchPredictionJobsResponse struct { func (x *ListBatchPredictionJobsResponse) Reset() { *x = ListBatchPredictionJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchPredictionJobsResponse) String() string { @@ -2059,7 +1997,7 @@ func (*ListBatchPredictionJobsResponse) ProtoMessage() {} func (x *ListBatchPredictionJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2103,11 +2041,9 @@ type DeleteBatchPredictionJobRequest struct { func (x *DeleteBatchPredictionJobRequest) Reset() { *x = DeleteBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBatchPredictionJobRequest) String() string { @@ -2118,7 +2054,7 @@ func (*DeleteBatchPredictionJobRequest) ProtoMessage() {} func (x *DeleteBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2091,9 @@ type CancelBatchPredictionJobRequest struct { func (x *CancelBatchPredictionJobRequest) Reset() { *x = CancelBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelBatchPredictionJobRequest) String() string { @@ -2170,7 +2104,7 @@ func (*CancelBatchPredictionJobRequest) ProtoMessage() {} func (x *CancelBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2142,9 @@ type CreateModelDeploymentMonitoringJobRequest struct { func (x *CreateModelDeploymentMonitoringJobRequest) Reset() { *x = CreateModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelDeploymentMonitoringJobRequest) String() string { @@ -2223,7 +2155,7 @@ func (*CreateModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *CreateModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2221,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesRequest struct { func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) String() string { @@ -2304,7 +2234,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesRequest) ProtoMessage() {} func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2395,11 +2325,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesResponse struct { func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) String() string { @@ -2410,7 +2338,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesResponse) ProtoMessage() {} func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2454,11 +2382,9 @@ type GetModelDeploymentMonitoringJobRequest struct { func (x *GetModelDeploymentMonitoringJobRequest) Reset() { *x = GetModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelDeploymentMonitoringJobRequest) String() string { @@ -2469,7 +2395,7 @@ func (*GetModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *GetModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2532,11 +2458,9 @@ type ListModelDeploymentMonitoringJobsRequest struct { func (x *ListModelDeploymentMonitoringJobsRequest) Reset() { *x = ListModelDeploymentMonitoringJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelDeploymentMonitoringJobsRequest) String() string { @@ -2547,7 +2471,7 @@ func (*ListModelDeploymentMonitoringJobsRequest) ProtoMessage() {} func (x *ListModelDeploymentMonitoringJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2613,11 +2537,9 @@ type ListModelDeploymentMonitoringJobsResponse struct { func (x *ListModelDeploymentMonitoringJobsResponse) Reset() { *x = ListModelDeploymentMonitoringJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelDeploymentMonitoringJobsResponse) String() string { @@ -2628,7 +2550,7 @@ func (*ListModelDeploymentMonitoringJobsResponse) ProtoMessage() {} func (x *ListModelDeploymentMonitoringJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,11 +2622,9 @@ type UpdateModelDeploymentMonitoringJobRequest struct { func (x *UpdateModelDeploymentMonitoringJobRequest) Reset() { *x = UpdateModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelDeploymentMonitoringJobRequest) String() string { @@ -2715,7 +2635,7 @@ func (*UpdateModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *UpdateModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2679,9 @@ type DeleteModelDeploymentMonitoringJobRequest struct { func (x *DeleteModelDeploymentMonitoringJobRequest) Reset() { *x = DeleteModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelDeploymentMonitoringJobRequest) String() string { @@ -2774,7 +2692,7 @@ func (*DeleteModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *DeleteModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2811,11 +2729,9 @@ type PauseModelDeploymentMonitoringJobRequest struct { func (x *PauseModelDeploymentMonitoringJobRequest) Reset() { *x = PauseModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseModelDeploymentMonitoringJobRequest) String() string { @@ -2826,7 +2742,7 @@ func (*PauseModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *PauseModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2779,9 @@ type ResumeModelDeploymentMonitoringJobRequest struct { func (x *ResumeModelDeploymentMonitoringJobRequest) Reset() { *x = ResumeModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeModelDeploymentMonitoringJobRequest) String() string { @@ -2878,7 +2792,7 @@ func (*ResumeModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *ResumeModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2913,11 +2827,9 @@ type UpdateModelDeploymentMonitoringJobOperationMetadata struct { func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) Reset() { *x = UpdateModelDeploymentMonitoringJobOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) String() string { @@ -2928,7 +2840,7 @@ func (*UpdateModelDeploymentMonitoringJobOperationMetadata) ProtoMessage() {} func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,11 +2881,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjectiv func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) String() string { @@ -2984,7 +2894,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObject func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4246,548 +4156,6 @@ func file_google_cloud_aiplatform_v1_job_service_proto_init() { file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_init() file_google_cloud_aiplatform_v1_nas_job_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CancelCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListDataLabelingJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDataLabelingJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CancelDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListHyperparameterTuningJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListHyperparameterTuningJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CancelHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListNasJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListNasJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CancelNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetNasTrialDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListNasTrialDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListNasTrialDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchPredictionJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchPredictionJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*CancelBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListModelDeploymentMonitoringJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListModelDeploymentMonitoringJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*PauseModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ResumeModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelDeploymentMonitoringJobOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_job_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/job_state.pb.go b/aiplatform/apiv1/aiplatformpb/job_state.pb.go index 3b35c2c8a83b..1a6ea40d1929 100755 --- a/aiplatform/apiv1/aiplatformpb/job_state.pb.go +++ b/aiplatform/apiv1/aiplatformpb/job_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/job_state.proto diff --git a/aiplatform/apiv1/aiplatformpb/lineage_subgraph.pb.go b/aiplatform/apiv1/aiplatformpb/lineage_subgraph.pb.go index 6d7eb9604c3b..a5326c226196 100755 --- a/aiplatform/apiv1/aiplatformpb/lineage_subgraph.pb.go +++ b/aiplatform/apiv1/aiplatformpb/lineage_subgraph.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/lineage_subgraph.proto @@ -52,11 +52,9 @@ type LineageSubgraph struct { func (x *LineageSubgraph) Reset() { *x = LineageSubgraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_lineage_subgraph_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_lineage_subgraph_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineageSubgraph) String() string { @@ -67,7 +65,7 @@ func (*LineageSubgraph) ProtoMessage() {} func (x *LineageSubgraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_lineage_subgraph_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,20 +185,6 @@ func file_google_cloud_aiplatform_v1_lineage_subgraph_proto_init() { file_google_cloud_aiplatform_v1_artifact_proto_init() file_google_cloud_aiplatform_v1_event_proto_init() file_google_cloud_aiplatform_v1_execution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_lineage_subgraph_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LineageSubgraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/llm_utility_service.pb.go b/aiplatform/apiv1/aiplatformpb/llm_utility_service.pb.go index d1ddf101eead..9c6c257e5b25 100755 --- a/aiplatform/apiv1/aiplatformpb/llm_utility_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/llm_utility_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/llm_utility_service.proto @@ -64,11 +64,9 @@ type ComputeTokensRequest struct { func (x *ComputeTokensRequest) Reset() { *x = ComputeTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTokensRequest) String() string { @@ -79,7 +77,7 @@ func (*ComputeTokensRequest) ProtoMessage() {} func (x *ComputeTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type TokensInfo struct { func (x *TokensInfo) Reset() { *x = TokensInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokensInfo) String() string { @@ -153,7 +149,7 @@ func (*TokensInfo) ProtoMessage() {} func (x *TokensInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type ComputeTokensResponse struct { func (x *ComputeTokensResponse) Reset() { *x = ComputeTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTokensResponse) String() string { @@ -218,7 +212,7 @@ func (*ComputeTokensResponse) ProtoMessage() {} func (x *ComputeTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,44 +401,6 @@ func file_google_cloud_aiplatform_v1_llm_utility_service_proto_init() { } file_google_cloud_aiplatform_v1_content_proto_init() file_google_cloud_aiplatform_v1_prediction_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TokensInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/machine_resources.pb.go b/aiplatform/apiv1/aiplatformpb/machine_resources.pb.go index 925024dc2fd4..62009021e530 100755 --- a/aiplatform/apiv1/aiplatformpb/machine_resources.pb.go +++ b/aiplatform/apiv1/aiplatformpb/machine_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/machine_resources.proto @@ -72,11 +72,9 @@ type MachineSpec struct { func (x *MachineSpec) Reset() { *x = MachineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineSpec) String() string { @@ -87,7 +85,7 @@ func (*MachineSpec) ProtoMessage() {} func (x *MachineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +206,9 @@ type DedicatedResources struct { func (x *DedicatedResources) Reset() { *x = DedicatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DedicatedResources) String() string { @@ -223,7 +219,7 @@ func (*DedicatedResources) ProtoMessage() {} func (x *DedicatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +305,9 @@ type AutomaticResources struct { func (x *AutomaticResources) Reset() { *x = AutomaticResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomaticResources) String() string { @@ -324,7 +318,7 @@ func (*AutomaticResources) ProtoMessage() {} func (x *AutomaticResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +367,9 @@ type BatchDedicatedResources struct { func (x *BatchDedicatedResources) Reset() { *x = BatchDedicatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDedicatedResources) String() string { @@ -388,7 +380,7 @@ func (*BatchDedicatedResources) ProtoMessage() {} func (x *BatchDedicatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type ResourcesConsumed struct { func (x *ResourcesConsumed) Reset() { *x = ResourcesConsumed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcesConsumed) String() string { @@ -453,7 +443,7 @@ func (*ResourcesConsumed) ProtoMessage() {} func (x *ResourcesConsumed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +481,9 @@ type DiskSpec struct { func (x *DiskSpec) Reset() { *x = DiskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskSpec) String() string { @@ -506,7 +494,7 @@ func (*DiskSpec) ProtoMessage() {} func (x *DiskSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +542,9 @@ type PersistentDiskSpec struct { func (x *PersistentDiskSpec) Reset() { *x = PersistentDiskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistentDiskSpec) String() string { @@ -569,7 +555,7 @@ func (*PersistentDiskSpec) ProtoMessage() {} func (x *PersistentDiskSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +603,9 @@ type NfsMount struct { func (x *NfsMount) Reset() { *x = NfsMount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsMount) String() string { @@ -632,7 +616,7 @@ func (*NfsMount) ProtoMessage() {} func (x *NfsMount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +676,9 @@ type AutoscalingMetricSpec struct { func (x *AutoscalingMetricSpec) Reset() { *x = AutoscalingMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingMetricSpec) String() string { @@ -707,7 +689,7 @@ func (*AutoscalingMetricSpec) ProtoMessage() {} func (x *AutoscalingMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +738,9 @@ type ShieldedVmConfig struct { func (x *ShieldedVmConfig) Reset() { *x = ShieldedVmConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedVmConfig) String() string { @@ -771,7 +751,7 @@ func (*ShieldedVmConfig) ProtoMessage() {} func (x *ShieldedVmConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,128 +952,6 @@ func file_google_cloud_aiplatform_v1_machine_resources_proto_init() { } file_google_cloud_aiplatform_v1_accelerator_type_proto_init() file_google_cloud_aiplatform_v1_reservation_affinity_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MachineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DedicatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutomaticResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchDedicatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourcesConsumed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DiskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PersistentDiskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NfsMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_machine_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedVmConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/manual_batch_tuning_parameters.pb.go b/aiplatform/apiv1/aiplatformpb/manual_batch_tuning_parameters.pb.go index ef5bd6fbf0eb..55f43bc36f1a 100755 --- a/aiplatform/apiv1/aiplatformpb/manual_batch_tuning_parameters.pb.go +++ b/aiplatform/apiv1/aiplatformpb/manual_batch_tuning_parameters.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/manual_batch_tuning_parameters.proto @@ -54,11 +54,9 @@ type ManualBatchTuningParameters struct { func (x *ManualBatchTuningParameters) Reset() { *x = ManualBatchTuningParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualBatchTuningParameters) String() string { @@ -69,7 +67,7 @@ func (*ManualBatchTuningParameters) ProtoMessage() {} func (x *ManualBatchTuningParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,20 +150,6 @@ func file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_init() if File_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_manual_batch_tuning_parameters_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ManualBatchTuningParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/match_service.pb.go b/aiplatform/apiv1/aiplatformpb/match_service.pb.go index a7207e194821..d36d48c4612e 100755 --- a/aiplatform/apiv1/aiplatformpb/match_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/match_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/match_service.proto @@ -69,11 +69,9 @@ type FindNeighborsRequest struct { func (x *FindNeighborsRequest) Reset() { *x = FindNeighborsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest) String() string { @@ -84,7 +82,7 @@ func (*FindNeighborsRequest) ProtoMessage() {} func (x *FindNeighborsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type FindNeighborsResponse struct { func (x *FindNeighborsResponse) Reset() { *x = FindNeighborsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse) String() string { @@ -155,7 +151,7 @@ func (*FindNeighborsResponse) ProtoMessage() {} func (x *FindNeighborsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +192,9 @@ type ReadIndexDatapointsRequest struct { func (x *ReadIndexDatapointsRequest) Reset() { *x = ReadIndexDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadIndexDatapointsRequest) String() string { @@ -211,7 +205,7 @@ func (*ReadIndexDatapointsRequest) ProtoMessage() {} func (x *ReadIndexDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +254,9 @@ type ReadIndexDatapointsResponse struct { func (x *ReadIndexDatapointsResponse) Reset() { *x = ReadIndexDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadIndexDatapointsResponse) String() string { @@ -275,7 +267,7 @@ func (*ReadIndexDatapointsResponse) ProtoMessage() {} func (x *ReadIndexDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +328,9 @@ type FindNeighborsRequest_Query struct { func (x *FindNeighborsRequest_Query) Reset() { *x = FindNeighborsRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest_Query) String() string { @@ -351,7 +341,7 @@ func (*FindNeighborsRequest_Query) ProtoMessage() {} func (x *FindNeighborsRequest_Query) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +430,9 @@ type FindNeighborsRequest_Query_RRF struct { func (x *FindNeighborsRequest_Query_RRF) Reset() { *x = FindNeighborsRequest_Query_RRF{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest_Query_RRF) String() string { @@ -455,7 +443,7 @@ func (*FindNeighborsRequest_Query_RRF) ProtoMessage() {} func (x *FindNeighborsRequest_Query_RRF) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type FindNeighborsResponse_Neighbor struct { func (x *FindNeighborsResponse_Neighbor) Reset() { *x = FindNeighborsResponse_Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse_Neighbor) String() string { @@ -511,7 +497,7 @@ func (*FindNeighborsResponse_Neighbor) ProtoMessage() {} func (x *FindNeighborsResponse_Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +547,9 @@ type FindNeighborsResponse_NearestNeighbors struct { func (x *FindNeighborsResponse_NearestNeighbors) Reset() { *x = FindNeighborsResponse_NearestNeighbors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse_NearestNeighbors) String() string { @@ -576,7 +560,7 @@ func (*FindNeighborsResponse_NearestNeighbors) ProtoMessage() {} func (x *FindNeighborsResponse_NearestNeighbors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -814,104 +798,6 @@ func file_google_cloud_aiplatform_v1_match_service_proto_init() { return } file_google_cloud_aiplatform_v1_index_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReadIndexDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadIndexDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest_Query_RRF); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse_Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse_NearestNeighbors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_match_service_proto_msgTypes[4].OneofWrappers = []any{ (*FindNeighborsRequest_Query_Rrf)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/metadata_schema.pb.go b/aiplatform/apiv1/aiplatformpb/metadata_schema.pb.go index 8de3dd247291..178f115cccde 100755 --- a/aiplatform/apiv1/aiplatformpb/metadata_schema.pb.go +++ b/aiplatform/apiv1/aiplatformpb/metadata_schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/metadata_schema.proto @@ -125,11 +125,9 @@ type MetadataSchema struct { func (x *MetadataSchema) Reset() { *x = MetadataSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataSchema) String() string { @@ -140,7 +138,7 @@ func (*MetadataSchema) ProtoMessage() {} func (x *MetadataSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,20 +295,6 @@ func file_google_cloud_aiplatform_v1_metadata_schema_proto_init() { if File_google_cloud_aiplatform_v1_metadata_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_metadata_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/metadata_service.pb.go b/aiplatform/apiv1/aiplatformpb/metadata_service.pb.go index 2051a83cace2..9adfe33eff3b 100755 --- a/aiplatform/apiv1/aiplatformpb/metadata_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/metadata_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/metadata_service.proto @@ -69,11 +69,9 @@ type CreateMetadataStoreRequest struct { func (x *CreateMetadataStoreRequest) Reset() { *x = CreateMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataStoreRequest) String() string { @@ -84,7 +82,7 @@ func (*CreateMetadataStoreRequest) ProtoMessage() {} func (x *CreateMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type CreateMetadataStoreOperationMetadata struct { func (x *CreateMetadataStoreOperationMetadata) Reset() { *x = CreateMetadataStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataStoreOperationMetadata) String() string { @@ -148,7 +144,7 @@ func (*CreateMetadataStoreOperationMetadata) ProtoMessage() {} func (x *CreateMetadataStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +181,9 @@ type GetMetadataStoreRequest struct { func (x *GetMetadataStoreRequest) Reset() { *x = GetMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataStoreRequest) String() string { @@ -200,7 +194,7 @@ func (*GetMetadataStoreRequest) ProtoMessage() {} func (x *GetMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +243,9 @@ type ListMetadataStoresRequest struct { func (x *ListMetadataStoresRequest) Reset() { *x = ListMetadataStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataStoresRequest) String() string { @@ -264,7 +256,7 @@ func (*ListMetadataStoresRequest) ProtoMessage() {} func (x *ListMetadataStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +310,9 @@ type ListMetadataStoresResponse struct { func (x *ListMetadataStoresResponse) Reset() { *x = ListMetadataStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataStoresResponse) String() string { @@ -333,7 +323,7 @@ func (*ListMetadataStoresResponse) ProtoMessage() {} func (x *ListMetadataStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +371,9 @@ type DeleteMetadataStoreRequest struct { func (x *DeleteMetadataStoreRequest) Reset() { *x = DeleteMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMetadataStoreRequest) String() string { @@ -396,7 +384,7 @@ func (*DeleteMetadataStoreRequest) ProtoMessage() {} func (x *DeleteMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +427,9 @@ type DeleteMetadataStoreOperationMetadata struct { func (x *DeleteMetadataStoreOperationMetadata) Reset() { *x = DeleteMetadataStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMetadataStoreOperationMetadata) String() string { @@ -454,7 +440,7 @@ func (*DeleteMetadataStoreOperationMetadata) ProtoMessage() {} func (x *DeleteMetadataStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,11 +488,9 @@ type CreateArtifactRequest struct { func (x *CreateArtifactRequest) Reset() { *x = CreateArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateArtifactRequest) String() string { @@ -517,7 +501,7 @@ func (*CreateArtifactRequest) ProtoMessage() {} func (x *CreateArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +552,9 @@ type GetArtifactRequest struct { func (x *GetArtifactRequest) Reset() { *x = GetArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetArtifactRequest) String() string { @@ -583,7 +565,7 @@ func (*GetArtifactRequest) ProtoMessage() {} func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +652,9 @@ type ListArtifactsRequest struct { func (x *ListArtifactsRequest) Reset() { *x = ListArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsRequest) String() string { @@ -685,7 +665,7 @@ func (*ListArtifactsRequest) ProtoMessage() {} func (x *ListArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +733,9 @@ type ListArtifactsResponse struct { func (x *ListArtifactsResponse) Reset() { *x = ListArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsResponse) String() string { @@ -768,7 +746,7 @@ func (*ListArtifactsResponse) ProtoMessage() {} func (x *ListArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +797,9 @@ type UpdateArtifactRequest struct { func (x *UpdateArtifactRequest) Reset() { *x = UpdateArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateArtifactRequest) String() string { @@ -834,7 +810,7 @@ func (*UpdateArtifactRequest) ProtoMessage() {} func (x *UpdateArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +865,9 @@ type DeleteArtifactRequest struct { func (x *DeleteArtifactRequest) Reset() { *x = DeleteArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteArtifactRequest) String() string { @@ -904,7 +878,7 @@ func (*DeleteArtifactRequest) ProtoMessage() {} func (x *DeleteArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +929,9 @@ type PurgeArtifactsRequest struct { func (x *PurgeArtifactsRequest) Reset() { *x = PurgeArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsRequest) String() string { @@ -970,7 +942,7 @@ func (*PurgeArtifactsRequest) ProtoMessage() {} func (x *PurgeArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +996,9 @@ type PurgeArtifactsResponse struct { func (x *PurgeArtifactsResponse) Reset() { *x = PurgeArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsResponse) String() string { @@ -1039,7 +1009,7 @@ func (*PurgeArtifactsResponse) ProtoMessage() {} func (x *PurgeArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,11 +1051,9 @@ type PurgeArtifactsMetadata struct { func (x *PurgeArtifactsMetadata) Reset() { *x = PurgeArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsMetadata) String() string { @@ -1096,7 +1064,7 @@ func (*PurgeArtifactsMetadata) ProtoMessage() {} func (x *PurgeArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1111,9 @@ type CreateContextRequest struct { func (x *CreateContextRequest) Reset() { *x = CreateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContextRequest) String() string { @@ -1158,7 +1124,7 @@ func (*CreateContextRequest) ProtoMessage() {} func (x *CreateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1209,11 +1175,9 @@ type GetContextRequest struct { func (x *GetContextRequest) Reset() { *x = GetContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContextRequest) String() string { @@ -1224,7 +1188,7 @@ func (*GetContextRequest) ProtoMessage() {} func (x *GetContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1281,9 @@ type ListContextsRequest struct { func (x *ListContextsRequest) Reset() { *x = ListContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsRequest) String() string { @@ -1332,7 +1294,7 @@ func (*ListContextsRequest) ProtoMessage() {} func (x *ListContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1362,9 @@ type ListContextsResponse struct { func (x *ListContextsResponse) Reset() { *x = ListContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsResponse) String() string { @@ -1415,7 +1375,7 @@ func (*ListContextsResponse) ProtoMessage() {} func (x *ListContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1465,11 +1425,9 @@ type UpdateContextRequest struct { func (x *UpdateContextRequest) Reset() { *x = UpdateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContextRequest) String() string { @@ -1480,7 +1438,7 @@ func (*UpdateContextRequest) ProtoMessage() {} func (x *UpdateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1496,9 @@ type DeleteContextRequest struct { func (x *DeleteContextRequest) Reset() { *x = DeleteContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContextRequest) String() string { @@ -1553,7 +1509,7 @@ func (*DeleteContextRequest) ProtoMessage() {} func (x *DeleteContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1611,11 +1567,9 @@ type PurgeContextsRequest struct { func (x *PurgeContextsRequest) Reset() { *x = PurgeContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsRequest) String() string { @@ -1626,7 +1580,7 @@ func (*PurgeContextsRequest) ProtoMessage() {} func (x *PurgeContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1634,9 @@ type PurgeContextsResponse struct { func (x *PurgeContextsResponse) Reset() { *x = PurgeContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsResponse) String() string { @@ -1695,7 +1647,7 @@ func (*PurgeContextsResponse) ProtoMessage() {} func (x *PurgeContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1689,9 @@ type PurgeContextsMetadata struct { func (x *PurgeContextsMetadata) Reset() { *x = PurgeContextsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsMetadata) String() string { @@ -1752,7 +1702,7 @@ func (*PurgeContextsMetadata) ProtoMessage() {} func (x *PurgeContextsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1800,11 +1750,9 @@ type AddContextArtifactsAndExecutionsRequest struct { func (x *AddContextArtifactsAndExecutionsRequest) Reset() { *x = AddContextArtifactsAndExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextArtifactsAndExecutionsRequest) String() string { @@ -1815,7 +1763,7 @@ func (*AddContextArtifactsAndExecutionsRequest) ProtoMessage() {} func (x *AddContextArtifactsAndExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1861,11 +1809,9 @@ type AddContextArtifactsAndExecutionsResponse struct { func (x *AddContextArtifactsAndExecutionsResponse) Reset() { *x = AddContextArtifactsAndExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextArtifactsAndExecutionsResponse) String() string { @@ -1876,7 +1822,7 @@ func (*AddContextArtifactsAndExecutionsResponse) ProtoMessage() {} func (x *AddContextArtifactsAndExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1909,11 +1855,9 @@ type AddContextChildrenRequest struct { func (x *AddContextChildrenRequest) Reset() { *x = AddContextChildrenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextChildrenRequest) String() string { @@ -1924,7 +1868,7 @@ func (*AddContextChildrenRequest) ProtoMessage() {} func (x *AddContextChildrenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1963,11 +1907,9 @@ type AddContextChildrenResponse struct { func (x *AddContextChildrenResponse) Reset() { *x = AddContextChildrenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextChildrenResponse) String() string { @@ -1978,7 +1920,7 @@ func (*AddContextChildrenResponse) ProtoMessage() {} func (x *AddContextChildrenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2011,11 +1953,9 @@ type RemoveContextChildrenRequest struct { func (x *RemoveContextChildrenRequest) Reset() { *x = RemoveContextChildrenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveContextChildrenRequest) String() string { @@ -2026,7 +1966,7 @@ func (*RemoveContextChildrenRequest) ProtoMessage() {} func (x *RemoveContextChildrenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2065,11 +2005,9 @@ type RemoveContextChildrenResponse struct { func (x *RemoveContextChildrenResponse) Reset() { *x = RemoveContextChildrenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveContextChildrenResponse) String() string { @@ -2080,7 +2018,7 @@ func (*RemoveContextChildrenResponse) ProtoMessage() {} func (x *RemoveContextChildrenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,11 +2053,9 @@ type QueryContextLineageSubgraphRequest struct { func (x *QueryContextLineageSubgraphRequest) Reset() { *x = QueryContextLineageSubgraphRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryContextLineageSubgraphRequest) String() string { @@ -2130,7 +2066,7 @@ func (*QueryContextLineageSubgraphRequest) ProtoMessage() {} func (x *QueryContextLineageSubgraphRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2179,11 +2115,9 @@ type CreateExecutionRequest struct { func (x *CreateExecutionRequest) Reset() { *x = CreateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExecutionRequest) String() string { @@ -2194,7 +2128,7 @@ func (*CreateExecutionRequest) ProtoMessage() {} func (x *CreateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2245,11 +2179,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -2260,7 +2192,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2347,11 +2279,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -2362,7 +2292,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2430,11 +2360,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -2445,7 +2373,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2496,11 +2424,9 @@ type UpdateExecutionRequest struct { func (x *UpdateExecutionRequest) Reset() { *x = UpdateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExecutionRequest) String() string { @@ -2511,7 +2437,7 @@ func (*UpdateExecutionRequest) ProtoMessage() {} func (x *UpdateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2566,11 +2492,9 @@ type DeleteExecutionRequest struct { func (x *DeleteExecutionRequest) Reset() { *x = DeleteExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExecutionRequest) String() string { @@ -2581,7 +2505,7 @@ func (*DeleteExecutionRequest) ProtoMessage() {} func (x *DeleteExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2632,11 +2556,9 @@ type PurgeExecutionsRequest struct { func (x *PurgeExecutionsRequest) Reset() { *x = PurgeExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsRequest) String() string { @@ -2647,7 +2569,7 @@ func (*PurgeExecutionsRequest) ProtoMessage() {} func (x *PurgeExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2702,11 +2624,9 @@ type PurgeExecutionsResponse struct { func (x *PurgeExecutionsResponse) Reset() { *x = PurgeExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsResponse) String() string { @@ -2717,7 +2637,7 @@ func (*PurgeExecutionsResponse) ProtoMessage() {} func (x *PurgeExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2679,9 @@ type PurgeExecutionsMetadata struct { func (x *PurgeExecutionsMetadata) Reset() { *x = PurgeExecutionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsMetadata) String() string { @@ -2774,7 +2692,7 @@ func (*PurgeExecutionsMetadata) ProtoMessage() {} func (x *PurgeExecutionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2814,11 +2732,9 @@ type AddExecutionEventsRequest struct { func (x *AddExecutionEventsRequest) Reset() { *x = AddExecutionEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExecutionEventsRequest) String() string { @@ -2829,7 +2745,7 @@ func (*AddExecutionEventsRequest) ProtoMessage() {} func (x *AddExecutionEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2868,11 +2784,9 @@ type AddExecutionEventsResponse struct { func (x *AddExecutionEventsResponse) Reset() { *x = AddExecutionEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExecutionEventsResponse) String() string { @@ -2883,7 +2797,7 @@ func (*AddExecutionEventsResponse) ProtoMessage() {} func (x *AddExecutionEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2913,11 +2827,9 @@ type QueryExecutionInputsAndOutputsRequest struct { func (x *QueryExecutionInputsAndOutputsRequest) Reset() { *x = QueryExecutionInputsAndOutputsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryExecutionInputsAndOutputsRequest) String() string { @@ -2928,7 +2840,7 @@ func (*QueryExecutionInputsAndOutputsRequest) ProtoMessage() {} func (x *QueryExecutionInputsAndOutputsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2976,11 +2888,9 @@ type CreateMetadataSchemaRequest struct { func (x *CreateMetadataSchemaRequest) Reset() { *x = CreateMetadataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataSchemaRequest) String() string { @@ -2991,7 +2901,7 @@ func (*CreateMetadataSchemaRequest) ProtoMessage() {} func (x *CreateMetadataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3042,11 +2952,9 @@ type GetMetadataSchemaRequest struct { func (x *GetMetadataSchemaRequest) Reset() { *x = GetMetadataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataSchemaRequest) String() string { @@ -3057,7 +2965,7 @@ func (*GetMetadataSchemaRequest) ProtoMessage() {} func (x *GetMetadataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3108,11 +3016,9 @@ type ListMetadataSchemasRequest struct { func (x *ListMetadataSchemasRequest) Reset() { *x = ListMetadataSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataSchemasRequest) String() string { @@ -3123,7 +3029,7 @@ func (*ListMetadataSchemasRequest) ProtoMessage() {} func (x *ListMetadataSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3184,11 +3090,9 @@ type ListMetadataSchemasResponse struct { func (x *ListMetadataSchemasResponse) Reset() { *x = ListMetadataSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataSchemasResponse) String() string { @@ -3199,7 +3103,7 @@ func (*ListMetadataSchemasResponse) ProtoMessage() {} func (x *ListMetadataSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3279,11 +3183,9 @@ type QueryArtifactLineageSubgraphRequest struct { func (x *QueryArtifactLineageSubgraphRequest) Reset() { *x = QueryArtifactLineageSubgraphRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryArtifactLineageSubgraphRequest) String() string { @@ -3294,7 +3196,7 @@ func (*QueryArtifactLineageSubgraphRequest) ProtoMessage() {} func (x *QueryArtifactLineageSubgraphRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4482,596 +4384,6 @@ func file_google_cloud_aiplatform_v1_metadata_service_proto_init() { file_google_cloud_aiplatform_v1_metadata_schema_proto_init() file_google_cloud_aiplatform_v1_metadata_store_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMetadataStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AddContextArtifactsAndExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AddContextArtifactsAndExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AddContextChildrenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AddContextChildrenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RemoveContextChildrenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*RemoveContextChildrenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*QueryContextLineageSubgraphRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*CreateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AddExecutionEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AddExecutionEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*QueryExecutionInputsAndOutputsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*QueryArtifactLineageSubgraphRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/metadata_store.pb.go b/aiplatform/apiv1/aiplatformpb/metadata_store.pb.go index 1304b9caa5b9..c86356e0daeb 100755 --- a/aiplatform/apiv1/aiplatformpb/metadata_store.pb.go +++ b/aiplatform/apiv1/aiplatformpb/metadata_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/metadata_store.proto @@ -64,11 +64,9 @@ type MetadataStore struct { func (x *MetadataStore) Reset() { *x = MetadataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore) String() string { @@ -79,7 +77,7 @@ func (*MetadataStore) ProtoMessage() {} func (x *MetadataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,11 +153,9 @@ type MetadataStore_MetadataStoreState struct { func (x *MetadataStore_MetadataStoreState) Reset() { *x = MetadataStore_MetadataStoreState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore_MetadataStoreState) String() string { @@ -170,7 +166,7 @@ func (*MetadataStore_MetadataStoreState) ProtoMessage() {} func (x *MetadataStore_MetadataStoreState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +201,9 @@ type MetadataStore_DataplexConfig struct { func (x *MetadataStore_DataplexConfig) Reset() { *x = MetadataStore_DataplexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore_DataplexConfig) String() string { @@ -220,7 +214,7 @@ func (*MetadataStore_DataplexConfig) ProtoMessage() {} func (x *MetadataStore_DataplexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,44 +355,6 @@ func file_google_cloud_aiplatform_v1_metadata_store_proto_init() { return } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore_MetadataStoreState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_metadata_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore_DataplexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/migratable_resource.pb.go b/aiplatform/apiv1/aiplatformpb/migratable_resource.pb.go index d4a45e4f128c..b1f2b9f2aeb0 100755 --- a/aiplatform/apiv1/aiplatformpb/migratable_resource.pb.go +++ b/aiplatform/apiv1/aiplatformpb/migratable_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/migratable_resource.proto @@ -61,11 +61,9 @@ type MigratableResource struct { func (x *MigratableResource) Reset() { *x = MigratableResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource) String() string { @@ -76,7 +74,7 @@ func (*MigratableResource) ProtoMessage() {} func (x *MigratableResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type MigratableResource_MlEngineModelVersion struct { func (x *MigratableResource_MlEngineModelVersion) Reset() { *x = MigratableResource_MlEngineModelVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_MlEngineModelVersion) String() string { @@ -209,7 +205,7 @@ func (*MigratableResource_MlEngineModelVersion) ProtoMessage() {} func (x *MigratableResource_MlEngineModelVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +250,9 @@ type MigratableResource_AutomlModel struct { func (x *MigratableResource_AutomlModel) Reset() { *x = MigratableResource_AutomlModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_AutomlModel) String() string { @@ -269,7 +263,7 @@ func (*MigratableResource_AutomlModel) ProtoMessage() {} func (x *MigratableResource_AutomlModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type MigratableResource_AutomlDataset struct { func (x *MigratableResource_AutomlDataset) Reset() { *x = MigratableResource_AutomlDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_AutomlDataset) String() string { @@ -329,7 +321,7 @@ func (*MigratableResource_AutomlDataset) ProtoMessage() {} func (x *MigratableResource_AutomlDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +369,9 @@ type MigratableResource_DataLabelingDataset struct { func (x *MigratableResource_DataLabelingDataset) Reset() { *x = MigratableResource_DataLabelingDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_DataLabelingDataset) String() string { @@ -392,7 +382,7 @@ func (*MigratableResource_DataLabelingDataset) ProtoMessage() {} func (x *MigratableResource_DataLabelingDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +434,9 @@ type MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset struct func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) Reset() { *x = MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) String() string { @@ -459,7 +447,7 @@ func (*MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) Prot func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,80 +673,6 @@ func file_google_cloud_aiplatform_v1_migratable_resource_proto_init() { if File_google_cloud_aiplatform_v1_migratable_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_MlEngineModelVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_AutomlModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_AutomlDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_DataLabelingDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_migratable_resource_proto_msgTypes[0].OneofWrappers = []any{ (*MigratableResource_MlEngineModelVersion_)(nil), (*MigratableResource_AutomlModel_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/migration_service.pb.go b/aiplatform/apiv1/aiplatformpb/migration_service.pb.go index f9513fd9ebfc..3e05eac6751d 100755 --- a/aiplatform/apiv1/aiplatformpb/migration_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/migration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/migration_service.proto @@ -76,11 +76,9 @@ type SearchMigratableResourcesRequest struct { func (x *SearchMigratableResourcesRequest) Reset() { *x = SearchMigratableResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchMigratableResourcesRequest) String() string { @@ -91,7 +89,7 @@ func (*SearchMigratableResourcesRequest) ProtoMessage() {} func (x *SearchMigratableResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type SearchMigratableResourcesResponse struct { func (x *SearchMigratableResourcesResponse) Reset() { *x = SearchMigratableResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchMigratableResourcesResponse) String() string { @@ -167,7 +163,7 @@ func (*SearchMigratableResourcesResponse) ProtoMessage() {} func (x *SearchMigratableResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type BatchMigrateResourcesRequest struct { func (x *BatchMigrateResourcesRequest) Reset() { *x = BatchMigrateResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesRequest) String() string { @@ -229,7 +223,7 @@ func (*BatchMigrateResourcesRequest) ProtoMessage() {} func (x *BatchMigrateResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +270,9 @@ type MigrateResourceRequest struct { func (x *MigrateResourceRequest) Reset() { *x = MigrateResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest) String() string { @@ -291,7 +283,7 @@ func (*MigrateResourceRequest) ProtoMessage() {} func (x *MigrateResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +382,9 @@ type BatchMigrateResourcesResponse struct { func (x *BatchMigrateResourcesResponse) Reset() { *x = BatchMigrateResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesResponse) String() string { @@ -405,7 +395,7 @@ func (*BatchMigrateResourcesResponse) ProtoMessage() {} func (x *BatchMigrateResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +437,9 @@ type MigrateResourceResponse struct { func (x *MigrateResourceResponse) Reset() { *x = MigrateResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceResponse) String() string { @@ -462,7 +450,7 @@ func (*MigrateResourceResponse) ProtoMessage() {} func (x *MigrateResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +526,9 @@ type BatchMigrateResourcesOperationMetadata struct { func (x *BatchMigrateResourcesOperationMetadata) Reset() { *x = BatchMigrateResourcesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesOperationMetadata) String() string { @@ -553,7 +539,7 @@ func (*BatchMigrateResourcesOperationMetadata) ProtoMessage() {} func (x *BatchMigrateResourcesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +595,9 @@ type MigrateResourceRequest_MigrateMlEngineModelVersionConfig struct { func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) Reset() { *x = MigrateResourceRequest_MigrateMlEngineModelVersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) String() string { @@ -624,7 +608,7 @@ func (*MigrateResourceRequest_MigrateMlEngineModelVersionConfig) ProtoMessage() func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +661,9 @@ type MigrateResourceRequest_MigrateAutomlModelConfig struct { func (x *MigrateResourceRequest_MigrateAutomlModelConfig) Reset() { *x = MigrateResourceRequest_MigrateAutomlModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateAutomlModelConfig) String() string { @@ -692,7 +674,7 @@ func (*MigrateResourceRequest_MigrateAutomlModelConfig) ProtoMessage() {} func (x *MigrateResourceRequest_MigrateAutomlModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +721,9 @@ type MigrateResourceRequest_MigrateAutomlDatasetConfig struct { func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateAutomlDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) String() string { @@ -754,7 +734,7 @@ func (*MigrateResourceRequest_MigrateAutomlDatasetConfig) ProtoMessage() {} func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +785,9 @@ type MigrateResourceRequest_MigrateDataLabelingDatasetConfig struct { func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateDataLabelingDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) String() string { @@ -820,7 +798,7 @@ func (*MigrateResourceRequest_MigrateDataLabelingDatasetConfig) ProtoMessage() { func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +849,9 @@ type MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabeling func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) String() string { @@ -887,7 +863,7 @@ func (*MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabeli func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +909,9 @@ type BatchMigrateResourcesOperationMetadata_PartialResult struct { func (x *BatchMigrateResourcesOperationMetadata_PartialResult) Reset() { *x = BatchMigrateResourcesOperationMetadata_PartialResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesOperationMetadata_PartialResult) String() string { @@ -948,7 +922,7 @@ func (*BatchMigrateResourcesOperationMetadata_PartialResult) ProtoMessage() {} func (x *BatchMigrateResourcesOperationMetadata_PartialResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1375,164 +1349,6 @@ func file_google_cloud_aiplatform_v1_migration_service_proto_init() { } file_google_cloud_aiplatform_v1_migratable_resource_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchMigratableResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchMigratableResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateMlEngineModelVersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateAutomlModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateAutomlDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateDataLabelingDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesOperationMetadata_PartialResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_migration_service_proto_msgTypes[3].OneofWrappers = []any{ (*MigrateResourceRequest_MigrateMlEngineModelVersionConfig_)(nil), (*MigrateResourceRequest_MigrateAutomlModelConfig_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/model.pb.go b/aiplatform/apiv1/aiplatformpb/model.pb.go index ac7783537c7b..488f6f9d7718 100755 --- a/aiplatform/apiv1/aiplatformpb/model.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model.proto @@ -498,11 +498,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -513,7 +511,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +771,9 @@ type LargeModelReference struct { func (x *LargeModelReference) Reset() { *x = LargeModelReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LargeModelReference) String() string { @@ -788,7 +784,7 @@ func (*LargeModelReference) ProtoMessage() {} func (x *LargeModelReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +819,9 @@ type ModelGardenSource struct { func (x *ModelGardenSource) Reset() { *x = ModelGardenSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelGardenSource) String() string { @@ -838,7 +832,7 @@ func (*ModelGardenSource) ProtoMessage() {} func (x *ModelGardenSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +867,9 @@ type GenieSource struct { func (x *GenieSource) Reset() { *x = GenieSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenieSource) String() string { @@ -888,7 +880,7 @@ func (*GenieSource) ProtoMessage() {} func (x *GenieSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +956,9 @@ type PredictSchemata struct { func (x *PredictSchemata) Reset() { *x = PredictSchemata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictSchemata) String() string { @@ -979,7 +969,7 @@ func (*PredictSchemata) ProtoMessage() {} func (x *PredictSchemata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1247,9 @@ type ModelContainerSpec struct { func (x *ModelContainerSpec) Reset() { *x = ModelContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelContainerSpec) String() string { @@ -1272,7 +1260,7 @@ func (*ModelContainerSpec) ProtoMessage() {} func (x *ModelContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1384,11 +1372,9 @@ type Port struct { func (x *Port) Reset() { *x = Port{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Port) String() string { @@ -1399,7 +1385,7 @@ func (*Port) ProtoMessage() {} func (x *Port) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1437,11 +1423,9 @@ type ModelSourceInfo struct { func (x *ModelSourceInfo) Reset() { *x = ModelSourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelSourceInfo) String() string { @@ -1452,7 +1436,7 @@ func (*ModelSourceInfo) ProtoMessage() {} func (x *ModelSourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1506,11 +1490,9 @@ type Probe struct { func (x *Probe) Reset() { *x = Probe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Probe) String() string { @@ -1521,7 +1503,7 @@ func (*Probe) ProtoMessage() {} func (x *Probe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1592,9 @@ type Model_ExportFormat struct { func (x *Model_ExportFormat) Reset() { *x = Model_ExportFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ExportFormat) String() string { @@ -1625,7 +1605,7 @@ func (*Model_ExportFormat) ProtoMessage() {} func (x *Model_ExportFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1684,11 +1664,9 @@ type Model_DataStats struct { func (x *Model_DataStats) Reset() { *x = Model_DataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_DataStats) String() string { @@ -1699,7 +1677,7 @@ func (*Model_DataStats) ProtoMessage() {} func (x *Model_DataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,11 +1748,9 @@ type Model_OriginalModelInfo struct { func (x *Model_OriginalModelInfo) Reset() { *x = Model_OriginalModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_OriginalModelInfo) String() string { @@ -1785,7 +1761,7 @@ func (*Model_OriginalModelInfo) ProtoMessage() {} func (x *Model_OriginalModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1823,11 +1799,9 @@ type Model_BaseModelSource struct { func (x *Model_BaseModelSource) Reset() { *x = Model_BaseModelSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_BaseModelSource) String() string { @@ -1838,7 +1812,7 @@ func (*Model_BaseModelSource) ProtoMessage() {} func (x *Model_BaseModelSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1909,11 +1883,9 @@ type Probe_ExecAction struct { func (x *Probe_ExecAction) Reset() { *x = Probe_ExecAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Probe_ExecAction) String() string { @@ -1924,7 +1896,7 @@ func (*Probe_ExecAction) ProtoMessage() {} func (x *Probe_ExecAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2395,176 +2367,6 @@ func file_google_cloud_aiplatform_v1_model_proto_init() { file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_env_var_proto_init() file_google_cloud_aiplatform_v1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LargeModelReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelGardenSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GenieSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictSchemata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Port); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelSourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Probe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Model_ExportFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Model_DataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Model_OriginalModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Model_BaseModelSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Probe_ExecAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_model_proto_msgTypes[8].OneofWrappers = []any{ (*Probe_Exec)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/model_deployment_monitoring_job.pb.go b/aiplatform/apiv1/aiplatformpb/model_deployment_monitoring_job.pb.go index 74c04366dabd..c0d3a8e2f9bb 100755 --- a/aiplatform/apiv1/aiplatformpb/model_deployment_monitoring_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_deployment_monitoring_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto @@ -378,11 +378,9 @@ type ModelDeploymentMonitoringJob struct { func (x *ModelDeploymentMonitoringJob) Reset() { *x = ModelDeploymentMonitoringJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringJob) String() string { @@ -393,7 +391,7 @@ func (*ModelDeploymentMonitoringJob) ProtoMessage() {} func (x *ModelDeploymentMonitoringJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +603,9 @@ type ModelDeploymentMonitoringBigQueryTable struct { func (x *ModelDeploymentMonitoringBigQueryTable) Reset() { *x = ModelDeploymentMonitoringBigQueryTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringBigQueryTable) String() string { @@ -620,7 +616,7 @@ func (*ModelDeploymentMonitoringBigQueryTable) ProtoMessage() {} func (x *ModelDeploymentMonitoringBigQueryTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +674,9 @@ type ModelDeploymentMonitoringObjectiveConfig struct { func (x *ModelDeploymentMonitoringObjectiveConfig) Reset() { *x = ModelDeploymentMonitoringObjectiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringObjectiveConfig) String() string { @@ -693,7 +687,7 @@ func (*ModelDeploymentMonitoringObjectiveConfig) ProtoMessage() {} func (x *ModelDeploymentMonitoringObjectiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,11 +739,9 @@ type ModelDeploymentMonitoringScheduleConfig struct { func (x *ModelDeploymentMonitoringScheduleConfig) Reset() { *x = ModelDeploymentMonitoringScheduleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringScheduleConfig) String() string { @@ -760,7 +752,7 @@ func (*ModelDeploymentMonitoringScheduleConfig) ProtoMessage() {} func (x *ModelDeploymentMonitoringScheduleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +799,9 @@ type ModelMonitoringStatsAnomalies struct { func (x *ModelMonitoringStatsAnomalies) Reset() { *x = ModelMonitoringStatsAnomalies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsAnomalies) String() string { @@ -822,7 +812,7 @@ func (*ModelMonitoringStatsAnomalies) ProtoMessage() {} func (x *ModelMonitoringStatsAnomalies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,11 +870,9 @@ type ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata struct { func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) Reset() { *x = ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) String() string { @@ -895,7 +883,7 @@ func (*ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) ProtoMessa func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +931,9 @@ type ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies struct { func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) Reset() { *x = ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) String() string { @@ -958,7 +944,7 @@ func (*ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) ProtoMessage func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1419,92 +1405,6 @@ func file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_init( file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() file_google_cloud_aiplatform_v1_model_monitoring_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringBigQueryTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringObjectiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringScheduleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsAnomalies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_deployment_monitoring_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/model_evaluation.pb.go b/aiplatform/apiv1/aiplatformpb/model_evaluation.pb.go index 968f94d0eab8..af3d2c53e950 100755 --- a/aiplatform/apiv1/aiplatformpb/model_evaluation.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_evaluation.proto @@ -103,11 +103,9 @@ type ModelEvaluation struct { func (x *ModelEvaluation) Reset() { *x = ModelEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation) String() string { @@ -118,7 +116,7 @@ func (*ModelEvaluation) ProtoMessage() {} func (x *ModelEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type ModelEvaluation_ModelEvaluationExplanationSpec struct { func (x *ModelEvaluation_ModelEvaluationExplanationSpec) Reset() { *x = ModelEvaluation_ModelEvaluationExplanationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation_ModelEvaluationExplanationSpec) String() string { @@ -243,7 +239,7 @@ func (*ModelEvaluation_ModelEvaluationExplanationSpec) ProtoMessage() {} func (x *ModelEvaluation_ModelEvaluationExplanationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,32 +403,6 @@ func file_google_cloud_aiplatform_v1_model_evaluation_proto_init() { return } file_google_cloud_aiplatform_v1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation_ModelEvaluationExplanationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/model_evaluation_slice.pb.go b/aiplatform/apiv1/aiplatformpb/model_evaluation_slice.pb.go index 4dbd45261d8b..e5ebd7ac6488 100755 --- a/aiplatform/apiv1/aiplatformpb/model_evaluation_slice.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_evaluation_slice.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_evaluation_slice.proto @@ -71,11 +71,9 @@ type ModelEvaluationSlice struct { func (x *ModelEvaluationSlice) Reset() { *x = ModelEvaluationSlice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice) String() string { @@ -86,7 +84,7 @@ func (*ModelEvaluationSlice) ProtoMessage() {} func (x *ModelEvaluationSlice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +165,9 @@ type ModelEvaluationSlice_Slice struct { func (x *ModelEvaluationSlice_Slice) Reset() { *x = ModelEvaluationSlice_Slice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice) String() string { @@ -182,7 +178,7 @@ func (*ModelEvaluationSlice_Slice) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type ModelEvaluationSlice_Slice_SliceSpec struct { func (x *ModelEvaluationSlice_Slice_SliceSpec) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec) String() string { @@ -248,7 +242,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +334,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_SliceConfig struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_SliceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) String() string { @@ -355,7 +347,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +438,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_Range struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) String() string { @@ -461,7 +451,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_Range) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +495,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_Value struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) String() string { @@ -520,7 +508,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_Value) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,80 +739,6 @@ func file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_init() { return } file_google_cloud_aiplatform_v1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_msgTypes[3].OneofWrappers = []any{ (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig_Value)(nil), (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig_Range)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/model_garden_service.pb.go b/aiplatform/apiv1/aiplatformpb/model_garden_service.pb.go index e6c6ba624e5d..3061cc77c627 100755 --- a/aiplatform/apiv1/aiplatformpb/model_garden_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_garden_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_garden_service.proto @@ -123,11 +123,9 @@ type GetPublisherModelRequest struct { func (x *GetPublisherModelRequest) Reset() { *x = GetPublisherModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_garden_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_garden_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublisherModelRequest) String() string { @@ -138,7 +136,7 @@ func (*GetPublisherModelRequest) ProtoMessage() {} func (x *GetPublisherModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_garden_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,20 +304,6 @@ func file_google_cloud_aiplatform_v1_model_garden_service_proto_init() { return } file_google_cloud_aiplatform_v1_publisher_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_garden_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPublisherModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/model_monitoring.pb.go b/aiplatform/apiv1/aiplatformpb/model_monitoring.pb.go index a2bfa6bebd64..1ada429398ff 100755 --- a/aiplatform/apiv1/aiplatformpb/model_monitoring.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_monitoring.proto @@ -109,11 +109,9 @@ type ModelMonitoringObjectiveConfig struct { func (x *ModelMonitoringObjectiveConfig) Reset() { *x = ModelMonitoringObjectiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig) String() string { @@ -124,7 +122,7 @@ func (*ModelMonitoringObjectiveConfig) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +189,9 @@ type ModelMonitoringAlertConfig struct { func (x *ModelMonitoringAlertConfig) Reset() { *x = ModelMonitoringAlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlertConfig) String() string { @@ -206,7 +202,7 @@ func (*ModelMonitoringAlertConfig) ProtoMessage() {} func (x *ModelMonitoringAlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -274,11 +270,9 @@ type ThresholdConfig struct { func (x *ThresholdConfig) Reset() { *x = ThresholdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThresholdConfig) String() string { @@ -289,7 +283,7 @@ func (*ThresholdConfig) ProtoMessage() {} func (x *ThresholdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +344,9 @@ type SamplingStrategy struct { func (x *SamplingStrategy) Reset() { *x = SamplingStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SamplingStrategy) String() string { @@ -365,7 +357,7 @@ func (*SamplingStrategy) ProtoMessage() {} func (x *SamplingStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +414,9 @@ type ModelMonitoringObjectiveConfig_TrainingDataset struct { func (x *ModelMonitoringObjectiveConfig_TrainingDataset) Reset() { *x = ModelMonitoringObjectiveConfig_TrainingDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_TrainingDataset) String() string { @@ -437,7 +427,7 @@ func (*ModelMonitoringObjectiveConfig_TrainingDataset) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig_TrainingDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +545,9 @@ type ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig struct func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) Reset() { *x = ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) String() string { @@ -570,7 +558,7 @@ func (*ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) Pro func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +616,9 @@ type ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig struct { func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) Reset() { *x = ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) String() string { @@ -643,7 +629,7 @@ func (*ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) ProtoMessa func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +682,9 @@ type ModelMonitoringObjectiveConfig_ExplanationConfig struct { func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) Reset() { *x = ModelMonitoringObjectiveConfig_ExplanationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) String() string { @@ -711,7 +695,7 @@ func (*ModelMonitoringObjectiveConfig_ExplanationConfig) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +747,9 @@ type ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline struct func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) Reset() { *x = ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) String() string { @@ -778,7 +760,7 @@ func (*ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) Pro func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,11 +835,9 @@ type ModelMonitoringAlertConfig_EmailAlertConfig struct { func (x *ModelMonitoringAlertConfig_EmailAlertConfig) Reset() { *x = ModelMonitoringAlertConfig_EmailAlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlertConfig_EmailAlertConfig) String() string { @@ -868,7 +848,7 @@ func (*ModelMonitoringAlertConfig_EmailAlertConfig) ProtoMessage() {} func (x *ModelMonitoringAlertConfig_EmailAlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +882,9 @@ type SamplingStrategy_RandomSampleConfig struct { func (x *SamplingStrategy_RandomSampleConfig) Reset() { *x = SamplingStrategy_RandomSampleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SamplingStrategy_RandomSampleConfig) String() string { @@ -917,7 +895,7 @@ func (*SamplingStrategy_RandomSampleConfig) ProtoMessage() {} func (x *SamplingStrategy_RandomSampleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,140 +1264,6 @@ func file_google_cloud_aiplatform_v1_model_monitoring_proto_init() { return } file_google_cloud_aiplatform_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ThresholdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SamplingStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_TrainingDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_ExplanationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlertConfig_EmailAlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SamplingStrategy_RandomSampleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_model_monitoring_proto_msgTypes[1].OneofWrappers = []any{ (*ModelMonitoringAlertConfig_EmailAlertConfig_)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/model_service.pb.go b/aiplatform/apiv1/aiplatformpb/model_service.pb.go index dc977a439b66..fd9a2f670261 100755 --- a/aiplatform/apiv1/aiplatformpb/model_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/model_service.proto @@ -76,11 +76,9 @@ type UploadModelRequest struct { func (x *UploadModelRequest) Reset() { *x = UploadModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelRequest) String() string { @@ -91,7 +89,7 @@ func (*UploadModelRequest) ProtoMessage() {} func (x *UploadModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,11 +153,9 @@ type UploadModelOperationMetadata struct { func (x *UploadModelOperationMetadata) Reset() { *x = UploadModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelOperationMetadata) String() string { @@ -170,7 +166,7 @@ func (*UploadModelOperationMetadata) ProtoMessage() {} func (x *UploadModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +205,9 @@ type UploadModelResponse struct { func (x *UploadModelResponse) Reset() { *x = UploadModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelResponse) String() string { @@ -224,7 +218,7 @@ func (*UploadModelResponse) ProtoMessage() {} func (x *UploadModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -294,7 +286,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +363,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -386,7 +376,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +451,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -476,7 +464,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +538,9 @@ type ListModelVersionsRequest struct { func (x *ListModelVersionsRequest) Reset() { *x = ListModelVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelVersionsRequest) String() string { @@ -565,7 +551,7 @@ func (*ListModelVersionsRequest) ProtoMessage() {} func (x *ListModelVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +628,9 @@ type ListModelVersionsResponse struct { func (x *ListModelVersionsResponse) Reset() { *x = ListModelVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelVersionsResponse) String() string { @@ -657,7 +641,7 @@ func (*ListModelVersionsResponse) ProtoMessage() {} func (x *ListModelVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +704,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -735,7 +717,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +762,9 @@ type UpdateExplanationDatasetRequest struct { func (x *UpdateExplanationDatasetRequest) Reset() { *x = UpdateExplanationDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetRequest) String() string { @@ -795,7 +775,7 @@ func (*UpdateExplanationDatasetRequest) ProtoMessage() {} func (x *UpdateExplanationDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +817,9 @@ type UpdateExplanationDatasetOperationMetadata struct { func (x *UpdateExplanationDatasetOperationMetadata) Reset() { *x = UpdateExplanationDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetOperationMetadata) String() string { @@ -852,7 +830,7 @@ func (*UpdateExplanationDatasetOperationMetadata) ProtoMessage() {} func (x *UpdateExplanationDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +866,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -903,7 +879,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +917,9 @@ type DeleteModelVersionRequest struct { func (x *DeleteModelVersionRequest) Reset() { *x = DeleteModelVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelVersionRequest) String() string { @@ -956,7 +930,7 @@ func (*DeleteModelVersionRequest) ProtoMessage() {} func (x *DeleteModelVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +981,9 @@ type MergeVersionAliasesRequest struct { func (x *MergeVersionAliasesRequest) Reset() { *x = MergeVersionAliasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MergeVersionAliasesRequest) String() string { @@ -1022,7 +994,7 @@ func (*MergeVersionAliasesRequest) ProtoMessage() {} func (x *MergeVersionAliasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1068,11 +1040,9 @@ type ExportModelRequest struct { func (x *ExportModelRequest) Reset() { *x = ExportModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest) String() string { @@ -1083,7 +1053,7 @@ func (*ExportModelRequest) ProtoMessage() {} func (x *ExportModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,11 +1099,9 @@ type ExportModelOperationMetadata struct { func (x *ExportModelOperationMetadata) Reset() { *x = ExportModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata) String() string { @@ -1144,7 +1112,7 @@ func (*ExportModelOperationMetadata) ProtoMessage() {} func (x *ExportModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1152,9 @@ type UpdateExplanationDatasetResponse struct { func (x *UpdateExplanationDatasetResponse) Reset() { *x = UpdateExplanationDatasetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetResponse) String() string { @@ -1199,7 +1165,7 @@ func (*UpdateExplanationDatasetResponse) ProtoMessage() {} func (x *UpdateExplanationDatasetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,11 +1191,9 @@ type ExportModelResponse struct { func (x *ExportModelResponse) Reset() { *x = ExportModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelResponse) String() string { @@ -1240,7 +1204,7 @@ func (*ExportModelResponse) ProtoMessage() {} func (x *ExportModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1283,11 +1247,9 @@ type CopyModelRequest struct { func (x *CopyModelRequest) Reset() { *x = CopyModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelRequest) String() string { @@ -1298,7 +1260,7 @@ func (*CopyModelRequest) ProtoMessage() {} func (x *CopyModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1355,9 @@ type CopyModelOperationMetadata struct { func (x *CopyModelOperationMetadata) Reset() { *x = CopyModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelOperationMetadata) String() string { @@ -1408,7 +1368,7 @@ func (*CopyModelOperationMetadata) ProtoMessage() {} func (x *CopyModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,11 +1407,9 @@ type CopyModelResponse struct { func (x *CopyModelResponse) Reset() { *x = CopyModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelResponse) String() string { @@ -1462,7 +1420,7 @@ func (*CopyModelResponse) ProtoMessage() {} func (x *CopyModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1507,11 +1465,9 @@ type ImportModelEvaluationRequest struct { func (x *ImportModelEvaluationRequest) Reset() { *x = ImportModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportModelEvaluationRequest) String() string { @@ -1522,7 +1478,7 @@ func (*ImportModelEvaluationRequest) ProtoMessage() {} func (x *ImportModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1524,9 @@ type BatchImportModelEvaluationSlicesRequest struct { func (x *BatchImportModelEvaluationSlicesRequest) Reset() { *x = BatchImportModelEvaluationSlicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportModelEvaluationSlicesRequest) String() string { @@ -1583,7 +1537,7 @@ func (*BatchImportModelEvaluationSlicesRequest) ProtoMessage() {} func (x *BatchImportModelEvaluationSlicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1580,9 @@ type BatchImportModelEvaluationSlicesResponse struct { func (x *BatchImportModelEvaluationSlicesResponse) Reset() { *x = BatchImportModelEvaluationSlicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportModelEvaluationSlicesResponse) String() string { @@ -1641,7 +1593,7 @@ func (*BatchImportModelEvaluationSlicesResponse) ProtoMessage() {} func (x *BatchImportModelEvaluationSlicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1632,9 @@ type BatchImportEvaluatedAnnotationsRequest struct { func (x *BatchImportEvaluatedAnnotationsRequest) Reset() { *x = BatchImportEvaluatedAnnotationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportEvaluatedAnnotationsRequest) String() string { @@ -1695,7 +1645,7 @@ func (*BatchImportEvaluatedAnnotationsRequest) ProtoMessage() {} func (x *BatchImportEvaluatedAnnotationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1687,9 @@ type BatchImportEvaluatedAnnotationsResponse struct { func (x *BatchImportEvaluatedAnnotationsResponse) Reset() { *x = BatchImportEvaluatedAnnotationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportEvaluatedAnnotationsResponse) String() string { @@ -1752,7 +1700,7 @@ func (*BatchImportEvaluatedAnnotationsResponse) ProtoMessage() {} func (x *BatchImportEvaluatedAnnotationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1737,9 @@ type GetModelEvaluationRequest struct { func (x *GetModelEvaluationRequest) Reset() { *x = GetModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationRequest) String() string { @@ -1804,7 +1750,7 @@ func (*GetModelEvaluationRequest) ProtoMessage() {} func (x *GetModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1853,11 +1799,9 @@ type ListModelEvaluationsRequest struct { func (x *ListModelEvaluationsRequest) Reset() { *x = ListModelEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsRequest) String() string { @@ -1868,7 +1812,7 @@ func (*ListModelEvaluationsRequest) ProtoMessage() {} func (x *ListModelEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1936,11 +1880,9 @@ type ListModelEvaluationsResponse struct { func (x *ListModelEvaluationsResponse) Reset() { *x = ListModelEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsResponse) String() string { @@ -1951,7 +1893,7 @@ func (*ListModelEvaluationsResponse) ProtoMessage() {} func (x *ListModelEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1995,11 +1937,9 @@ type GetModelEvaluationSliceRequest struct { func (x *GetModelEvaluationSliceRequest) Reset() { *x = GetModelEvaluationSliceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationSliceRequest) String() string { @@ -2010,7 +1950,7 @@ func (*GetModelEvaluationSliceRequest) ProtoMessage() {} func (x *GetModelEvaluationSliceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2062,11 +2002,9 @@ type ListModelEvaluationSlicesRequest struct { func (x *ListModelEvaluationSlicesRequest) Reset() { *x = ListModelEvaluationSlicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationSlicesRequest) String() string { @@ -2077,7 +2015,7 @@ func (*ListModelEvaluationSlicesRequest) ProtoMessage() {} func (x *ListModelEvaluationSlicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2145,11 +2083,9 @@ type ListModelEvaluationSlicesResponse struct { func (x *ListModelEvaluationSlicesResponse) Reset() { *x = ListModelEvaluationSlicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationSlicesResponse) String() string { @@ -2160,7 +2096,7 @@ func (*ListModelEvaluationSlicesResponse) ProtoMessage() {} func (x *ListModelEvaluationSlicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2219,11 +2155,9 @@ type ExportModelRequest_OutputConfig struct { func (x *ExportModelRequest_OutputConfig) Reset() { *x = ExportModelRequest_OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest_OutputConfig) String() string { @@ -2234,7 +2168,7 @@ func (*ExportModelRequest_OutputConfig) ProtoMessage() {} func (x *ExportModelRequest_OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2288,11 +2222,9 @@ type ExportModelOperationMetadata_OutputInfo struct { func (x *ExportModelOperationMetadata_OutputInfo) Reset() { *x = ExportModelOperationMetadata_OutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata_OutputInfo) String() string { @@ -2303,7 +2235,7 @@ func (*ExportModelOperationMetadata_OutputInfo) ProtoMessage() {} func (x *ExportModelOperationMetadata_OutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3141,416 +3073,6 @@ func file_google_cloud_aiplatform_v1_model_service_proto_init() { file_google_cloud_aiplatform_v1_model_evaluation_proto_init() file_google_cloud_aiplatform_v1_model_evaluation_slice_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListModelVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListModelVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MergeVersionAliasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ImportModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportModelEvaluationSlicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportModelEvaluationSlicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportEvaluatedAnnotationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportEvaluatedAnnotationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationSliceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationSlicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationSlicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest_OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata_OutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_model_service_proto_msgTypes[18].OneofWrappers = []any{ (*CopyModelRequest_ModelId)(nil), (*CopyModelRequest_ParentModel)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/nas_job.pb.go b/aiplatform/apiv1/aiplatformpb/nas_job.pb.go index 7f178e647a46..502cebfb1a67 100755 --- a/aiplatform/apiv1/aiplatformpb/nas_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/nas_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/nas_job.proto @@ -270,11 +270,9 @@ type NasJob struct { func (x *NasJob) Reset() { *x = NasJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJob) String() string { @@ -285,7 +283,7 @@ func (*NasJob) ProtoMessage() {} func (x *NasJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +427,9 @@ type NasTrialDetail struct { func (x *NasTrialDetail) Reset() { *x = NasTrialDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasTrialDetail) String() string { @@ -444,7 +440,7 @@ func (*NasTrialDetail) ProtoMessage() {} func (x *NasTrialDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +506,9 @@ type NasJobSpec struct { func (x *NasJobSpec) Reset() { *x = NasJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec) String() string { @@ -525,7 +519,7 @@ func (*NasJobSpec) ProtoMessage() {} func (x *NasJobSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +589,9 @@ type NasJobOutput struct { func (x *NasJobOutput) Reset() { *x = NasJobOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobOutput) String() string { @@ -610,7 +602,7 @@ func (*NasJobOutput) ProtoMessage() {} func (x *NasJobOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +664,9 @@ type NasTrial struct { func (x *NasTrial) Reset() { *x = NasTrial{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasTrial) String() string { @@ -687,7 +677,7 @@ func (*NasTrial) ProtoMessage() {} func (x *NasTrial) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +749,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec) String() string { @@ -774,7 +762,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +819,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) String() string { @@ -846,7 +832,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +885,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) String() string { @@ -914,7 +898,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +961,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) String() string { @@ -992,7 +974,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1042,11 +1024,9 @@ type NasJobOutput_MultiTrialJobOutput struct { func (x *NasJobOutput_MultiTrialJobOutput) Reset() { *x = NasJobOutput_MultiTrialJobOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobOutput_MultiTrialJobOutput) String() string { @@ -1057,7 +1037,7 @@ func (*NasJobOutput_MultiTrialJobOutput) ProtoMessage() {} func (x *NasJobOutput_MultiTrialJobOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,128 +1425,6 @@ func file_google_cloud_aiplatform_v1_nas_job_proto_init() { file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() file_google_cloud_aiplatform_v1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NasJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NasTrialDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NasJobOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NasTrial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NasJobOutput_MultiTrialJobOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_nas_job_proto_msgTypes[2].OneofWrappers = []any{ (*NasJobSpec_MultiTrialAlgorithmSpec_)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/network_spec.pb.go b/aiplatform/apiv1/aiplatformpb/network_spec.pb.go index 7ddc8efe3b05..86eb59ae2bf3 100755 --- a/aiplatform/apiv1/aiplatformpb/network_spec.pb.go +++ b/aiplatform/apiv1/aiplatformpb/network_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/network_spec.proto @@ -55,11 +55,9 @@ type NetworkSpec struct { func (x *NetworkSpec) Reset() { *x = NetworkSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_network_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_network_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkSpec) String() string { @@ -70,7 +68,7 @@ func (*NetworkSpec) ProtoMessage() {} func (x *NetworkSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_network_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,20 +177,6 @@ func file_google_cloud_aiplatform_v1_network_spec_proto_init() { if File_google_cloud_aiplatform_v1_network_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_network_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/notebook_euc_config.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_euc_config.pb.go index cc17cf45c6c5..a3afbfe2742a 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_euc_config.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_euc_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_euc_config.proto @@ -58,11 +58,9 @@ type NotebookEucConfig struct { func (x *NotebookEucConfig) Reset() { *x = NotebookEucConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_euc_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_euc_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookEucConfig) String() string { @@ -73,7 +71,7 @@ func (*NotebookEucConfig) ProtoMessage() {} func (x *NotebookEucConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_euc_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,20 +163,6 @@ func file_google_cloud_aiplatform_v1_notebook_euc_config_proto_init() { if File_google_cloud_aiplatform_v1_notebook_euc_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_euc_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookEucConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/notebook_execution_job.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_execution_job.pb.go index 163faa98b6ac..89d8d95adde4 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_execution_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_execution_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_execution_job.proto @@ -125,11 +125,9 @@ type NotebookExecutionJob struct { func (x *NotebookExecutionJob) Reset() { *x = NotebookExecutionJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob) String() string { @@ -140,7 +138,7 @@ func (*NotebookExecutionJob) ProtoMessage() {} func (x *NotebookExecutionJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +430,9 @@ type NotebookExecutionJob_DataformRepositorySource struct { func (x *NotebookExecutionJob_DataformRepositorySource) Reset() { *x = NotebookExecutionJob_DataformRepositorySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_DataformRepositorySource) String() string { @@ -447,7 +443,7 @@ func (*NotebookExecutionJob_DataformRepositorySource) ProtoMessage() {} func (x *NotebookExecutionJob_DataformRepositorySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +489,9 @@ type NotebookExecutionJob_GcsNotebookSource struct { func (x *NotebookExecutionJob_GcsNotebookSource) Reset() { *x = NotebookExecutionJob_GcsNotebookSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_GcsNotebookSource) String() string { @@ -508,7 +502,7 @@ func (*NotebookExecutionJob_GcsNotebookSource) ProtoMessage() {} func (x *NotebookExecutionJob_GcsNotebookSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +543,9 @@ type NotebookExecutionJob_DirectNotebookSource struct { func (x *NotebookExecutionJob_DirectNotebookSource) Reset() { *x = NotebookExecutionJob_DirectNotebookSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_DirectNotebookSource) String() string { @@ -564,7 +556,7 @@ func (*NotebookExecutionJob_DirectNotebookSource) ProtoMessage() {} func (x *NotebookExecutionJob_DirectNotebookSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +594,9 @@ type NotebookExecutionJob_CustomEnvironmentSpec struct { func (x *NotebookExecutionJob_CustomEnvironmentSpec) Reset() { *x = NotebookExecutionJob_CustomEnvironmentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_CustomEnvironmentSpec) String() string { @@ -617,7 +607,7 @@ func (*NotebookExecutionJob_CustomEnvironmentSpec) ProtoMessage() {} func (x *NotebookExecutionJob_CustomEnvironmentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +652,9 @@ type NotebookExecutionJob_WorkbenchRuntime struct { func (x *NotebookExecutionJob_WorkbenchRuntime) Reset() { *x = NotebookExecutionJob_WorkbenchRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_WorkbenchRuntime) String() string { @@ -677,7 +665,7 @@ func (*NotebookExecutionJob_WorkbenchRuntime) ProtoMessage() {} func (x *NotebookExecutionJob_WorkbenchRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,80 +945,6 @@ func file_google_cloud_aiplatform_v1_notebook_execution_job_proto_init() { file_google_cloud_aiplatform_v1_job_state_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() file_google_cloud_aiplatform_v1_network_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_DataformRepositorySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_GcsNotebookSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_DirectNotebookSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_CustomEnvironmentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_WorkbenchRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_notebook_execution_job_proto_msgTypes[0].OneofWrappers = []any{ (*NotebookExecutionJob_DataformRepositorySource_)(nil), (*NotebookExecutionJob_GcsNotebookSource_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/notebook_idle_shutdown_config.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_idle_shutdown_config.pb.go index dc3ad68d3e8c..715fadb88594 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_idle_shutdown_config.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_idle_shutdown_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_idle_shutdown_config.proto @@ -54,11 +54,9 @@ type NotebookIdleShutdownConfig struct { func (x *NotebookIdleShutdownConfig) Reset() { *x = NotebookIdleShutdownConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookIdleShutdownConfig) String() string { @@ -69,7 +67,7 @@ func (*NotebookIdleShutdownConfig) ProtoMessage() {} func (x *NotebookIdleShutdownConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,20 +166,6 @@ func file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_init() if File_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookIdleShutdownConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/notebook_runtime.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_runtime.pb.go index 1d38513c767e..e972a2dd5957 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_runtime.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_runtime.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_runtime.proto @@ -289,11 +289,9 @@ type NotebookRuntimeTemplate struct { func (x *NotebookRuntimeTemplate) Reset() { *x = NotebookRuntimeTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntimeTemplate) String() string { @@ -304,7 +302,7 @@ func (*NotebookRuntimeTemplate) ProtoMessage() {} func (x *NotebookRuntimeTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +522,9 @@ type NotebookRuntime struct { func (x *NotebookRuntime) Reset() { *x = NotebookRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntime) String() string { @@ -539,7 +535,7 @@ func (*NotebookRuntime) ProtoMessage() {} func (x *NotebookRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,32 +1027,6 @@ func file_google_cloud_aiplatform_v1_notebook_runtime_proto_init() { file_google_cloud_aiplatform_v1_notebook_euc_config_proto_init() file_google_cloud_aiplatform_v1_notebook_idle_shutdown_config_proto_init() file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntimeTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_runtime_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/notebook_runtime_template_ref.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_runtime_template_ref.pb.go index 96e4907f72f9..dda5549b8818 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_runtime_template_ref.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_runtime_template_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_runtime_template_ref.proto @@ -48,11 +48,9 @@ type NotebookRuntimeTemplateRef struct { func (x *NotebookRuntimeTemplateRef) Reset() { *x = NotebookRuntimeTemplateRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntimeTemplateRef) String() string { @@ -63,7 +61,7 @@ func (*NotebookRuntimeTemplateRef) ProtoMessage() {} func (x *NotebookRuntimeTemplateRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,20 +151,6 @@ func file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_init() if File_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_runtime_template_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntimeTemplateRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/notebook_service.pb.go b/aiplatform/apiv1/aiplatformpb/notebook_service.pb.go index d66ad4d05818..bd3b8319994a 100755 --- a/aiplatform/apiv1/aiplatformpb/notebook_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/notebook_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/notebook_service.proto @@ -114,11 +114,9 @@ type CreateNotebookRuntimeTemplateRequest struct { func (x *CreateNotebookRuntimeTemplateRequest) Reset() { *x = CreateNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookRuntimeTemplateRequest) String() string { @@ -129,7 +127,7 @@ func (*CreateNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *CreateNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type CreateNotebookRuntimeTemplateOperationMetadata struct { func (x *CreateNotebookRuntimeTemplateOperationMetadata) Reset() { *x = CreateNotebookRuntimeTemplateOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookRuntimeTemplateOperationMetadata) String() string { @@ -193,7 +189,7 @@ func (*CreateNotebookRuntimeTemplateOperationMetadata) ProtoMessage() {} func (x *CreateNotebookRuntimeTemplateOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +226,9 @@ type GetNotebookRuntimeTemplateRequest struct { func (x *GetNotebookRuntimeTemplateRequest) Reset() { *x = GetNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookRuntimeTemplateRequest) String() string { @@ -245,7 +239,7 @@ func (*GetNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *GetNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +318,9 @@ type ListNotebookRuntimeTemplatesRequest struct { func (x *ListNotebookRuntimeTemplatesRequest) Reset() { *x = ListNotebookRuntimeTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimeTemplatesRequest) String() string { @@ -339,7 +331,7 @@ func (*ListNotebookRuntimeTemplatesRequest) ProtoMessage() {} func (x *ListNotebookRuntimeTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +406,9 @@ type ListNotebookRuntimeTemplatesResponse struct { func (x *ListNotebookRuntimeTemplatesResponse) Reset() { *x = ListNotebookRuntimeTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimeTemplatesResponse) String() string { @@ -429,7 +419,7 @@ func (*ListNotebookRuntimeTemplatesResponse) ProtoMessage() {} func (x *ListNotebookRuntimeTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +463,9 @@ type DeleteNotebookRuntimeTemplateRequest struct { func (x *DeleteNotebookRuntimeTemplateRequest) Reset() { *x = DeleteNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookRuntimeTemplateRequest) String() string { @@ -488,7 +476,7 @@ func (*DeleteNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *DeleteNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +518,9 @@ type UpdateNotebookRuntimeTemplateRequest struct { func (x *UpdateNotebookRuntimeTemplateRequest) Reset() { *x = UpdateNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotebookRuntimeTemplateRequest) String() string { @@ -545,7 +531,7 @@ func (*UpdateNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *UpdateNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +582,9 @@ type AssignNotebookRuntimeRequest struct { func (x *AssignNotebookRuntimeRequest) Reset() { *x = AssignNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignNotebookRuntimeRequest) String() string { @@ -611,7 +595,7 @@ func (*AssignNotebookRuntimeRequest) ProtoMessage() {} func (x *AssignNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +654,9 @@ type AssignNotebookRuntimeOperationMetadata struct { func (x *AssignNotebookRuntimeOperationMetadata) Reset() { *x = AssignNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignNotebookRuntimeOperationMetadata) String() string { @@ -685,7 +667,7 @@ func (*AssignNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *AssignNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +712,9 @@ type GetNotebookRuntimeRequest struct { func (x *GetNotebookRuntimeRequest) Reset() { *x = GetNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookRuntimeRequest) String() string { @@ -745,7 +725,7 @@ func (*GetNotebookRuntimeRequest) ProtoMessage() {} func (x *GetNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +818,9 @@ type ListNotebookRuntimesRequest struct { func (x *ListNotebookRuntimesRequest) Reset() { *x = ListNotebookRuntimesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimesRequest) String() string { @@ -853,7 +831,7 @@ func (*ListNotebookRuntimesRequest) ProtoMessage() {} func (x *ListNotebookRuntimesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +906,9 @@ type ListNotebookRuntimesResponse struct { func (x *ListNotebookRuntimesResponse) Reset() { *x = ListNotebookRuntimesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimesResponse) String() string { @@ -943,7 +919,7 @@ func (*ListNotebookRuntimesResponse) ProtoMessage() {} func (x *ListNotebookRuntimesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +964,9 @@ type DeleteNotebookRuntimeRequest struct { func (x *DeleteNotebookRuntimeRequest) Reset() { *x = DeleteNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookRuntimeRequest) String() string { @@ -1003,7 +977,7 @@ func (*DeleteNotebookRuntimeRequest) ProtoMessage() {} func (x *DeleteNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1015,9 @@ type UpgradeNotebookRuntimeRequest struct { func (x *UpgradeNotebookRuntimeRequest) Reset() { *x = UpgradeNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeRequest) String() string { @@ -1056,7 +1028,7 @@ func (*UpgradeNotebookRuntimeRequest) ProtoMessage() {} func (x *UpgradeNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1066,9 @@ type UpgradeNotebookRuntimeOperationMetadata struct { func (x *UpgradeNotebookRuntimeOperationMetadata) Reset() { *x = UpgradeNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeOperationMetadata) String() string { @@ -1109,7 +1079,7 @@ func (*UpgradeNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *UpgradeNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1118,9 @@ type UpgradeNotebookRuntimeResponse struct { func (x *UpgradeNotebookRuntimeResponse) Reset() { *x = UpgradeNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeResponse) String() string { @@ -1163,7 +1131,7 @@ func (*UpgradeNotebookRuntimeResponse) ProtoMessage() {} func (x *UpgradeNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1162,9 @@ type StartNotebookRuntimeRequest struct { func (x *StartNotebookRuntimeRequest) Reset() { *x = StartNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeRequest) String() string { @@ -1209,7 +1175,7 @@ func (*StartNotebookRuntimeRequest) ProtoMessage() {} func (x *StartNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1247,11 +1213,9 @@ type StartNotebookRuntimeOperationMetadata struct { func (x *StartNotebookRuntimeOperationMetadata) Reset() { *x = StartNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeOperationMetadata) String() string { @@ -1262,7 +1226,7 @@ func (*StartNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *StartNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1301,11 +1265,9 @@ type StartNotebookRuntimeResponse struct { func (x *StartNotebookRuntimeResponse) Reset() { *x = StartNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeResponse) String() string { @@ -1316,7 +1278,7 @@ func (*StartNotebookRuntimeResponse) ProtoMessage() {} func (x *StartNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1309,9 @@ type StopNotebookRuntimeRequest struct { func (x *StopNotebookRuntimeRequest) Reset() { *x = StopNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeRequest) String() string { @@ -1362,7 +1322,7 @@ func (*StopNotebookRuntimeRequest) ProtoMessage() {} func (x *StopNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1357,9 @@ type StopNotebookRuntimeOperationMetadata struct { func (x *StopNotebookRuntimeOperationMetadata) Reset() { *x = StopNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeOperationMetadata) String() string { @@ -1412,7 +1370,7 @@ func (*StopNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *StopNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1444,11 +1402,9 @@ type StopNotebookRuntimeResponse struct { func (x *StopNotebookRuntimeResponse) Reset() { *x = StopNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeResponse) String() string { @@ -1459,7 +1415,7 @@ func (*StopNotebookRuntimeResponse) ProtoMessage() {} func (x *StopNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1447,9 @@ type CreateNotebookExecutionJobRequest struct { func (x *CreateNotebookExecutionJobRequest) Reset() { *x = CreateNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookExecutionJobRequest) String() string { @@ -1506,7 +1460,7 @@ func (*CreateNotebookExecutionJobRequest) ProtoMessage() {} func (x *CreateNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1512,9 @@ type CreateNotebookExecutionJobOperationMetadata struct { func (x *CreateNotebookExecutionJobOperationMetadata) Reset() { *x = CreateNotebookExecutionJobOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookExecutionJobOperationMetadata) String() string { @@ -1573,7 +1525,7 @@ func (*CreateNotebookExecutionJobOperationMetadata) ProtoMessage() {} func (x *CreateNotebookExecutionJobOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1568,9 @@ type GetNotebookExecutionJobRequest struct { func (x *GetNotebookExecutionJobRequest) Reset() { *x = GetNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookExecutionJobRequest) String() string { @@ -1631,7 +1581,7 @@ func (*GetNotebookExecutionJobRequest) ProtoMessage() {} func (x *GetNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1657,9 @@ type ListNotebookExecutionJobsRequest struct { func (x *ListNotebookExecutionJobsRequest) Reset() { *x = ListNotebookExecutionJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookExecutionJobsRequest) String() string { @@ -1722,7 +1670,7 @@ func (*ListNotebookExecutionJobsRequest) ProtoMessage() {} func (x *ListNotebookExecutionJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1744,9 @@ type ListNotebookExecutionJobsResponse struct { func (x *ListNotebookExecutionJobsResponse) Reset() { *x = ListNotebookExecutionJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookExecutionJobsResponse) String() string { @@ -1811,7 +1757,7 @@ func (*ListNotebookExecutionJobsResponse) ProtoMessage() {} func (x *ListNotebookExecutionJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1852,11 +1798,9 @@ type DeleteNotebookExecutionJobRequest struct { func (x *DeleteNotebookExecutionJobRequest) Reset() { *x = DeleteNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookExecutionJobRequest) String() string { @@ -1867,7 +1811,7 @@ func (*DeleteNotebookExecutionJobRequest) ProtoMessage() {} func (x *DeleteNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2630,344 +2574,6 @@ func file_google_cloud_aiplatform_v1_notebook_service_proto_init() { file_google_cloud_aiplatform_v1_notebook_execution_job_proto_init() file_google_cloud_aiplatform_v1_notebook_runtime_proto_init() file_google_cloud_aiplatform_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookRuntimeTemplateOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimeTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimeTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AssignNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AssignNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookExecutionJobOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookExecutionJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookExecutionJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_notebook_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/openapi.pb.go b/aiplatform/apiv1/aiplatformpb/openapi.pb.go index e85b545b37ce..7ae47758bbd4 100755 --- a/aiplatform/apiv1/aiplatformpb/openapi.pb.go +++ b/aiplatform/apiv1/aiplatformpb/openapi.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/openapi.proto @@ -183,11 +183,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_openapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_openapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -198,7 +196,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_openapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,20 +504,6 @@ func file_google_cloud_aiplatform_v1_openapi_proto_init() { if File_google_cloud_aiplatform_v1_openapi_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_openapi_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/operation.pb.go b/aiplatform/apiv1/aiplatformpb/operation.pb.go index dff8d393410d..699726046712 100755 --- a/aiplatform/apiv1/aiplatformpb/operation.pb.go +++ b/aiplatform/apiv1/aiplatformpb/operation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/operation.proto @@ -59,11 +59,9 @@ type GenericOperationMetadata struct { func (x *GenericOperationMetadata) Reset() { *x = GenericOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericOperationMetadata) String() string { @@ -74,7 +72,7 @@ func (*GenericOperationMetadata) ProtoMessage() {} func (x *GenericOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type DeleteOperationMetadata struct { func (x *DeleteOperationMetadata) Reset() { *x = DeleteOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationMetadata) String() string { @@ -137,7 +133,7 @@ func (*DeleteOperationMetadata) ProtoMessage() {} func (x *DeleteOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_operation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,32 +242,6 @@ func file_google_cloud_aiplatform_v1_operation_proto_init() { if File_google_cloud_aiplatform_v1_operation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenericOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/persistent_resource.pb.go b/aiplatform/apiv1/aiplatformpb/persistent_resource.pb.go index 71363c01ce2b..399605cd50d4 100755 --- a/aiplatform/apiv1/aiplatformpb/persistent_resource.pb.go +++ b/aiplatform/apiv1/aiplatformpb/persistent_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/persistent_resource.proto @@ -187,11 +187,9 @@ type PersistentResource struct { func (x *PersistentResource) Reset() { *x = PersistentResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistentResource) String() string { @@ -202,7 +200,7 @@ func (*PersistentResource) ProtoMessage() {} func (x *PersistentResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +339,9 @@ type ResourcePool struct { func (x *ResourcePool) Reset() { *x = ResourcePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePool) String() string { @@ -356,7 +352,7 @@ func (*ResourcePool) ProtoMessage() {} func (x *ResourcePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +428,9 @@ type ResourceRuntimeSpec struct { func (x *ResourceRuntimeSpec) Reset() { *x = ResourceRuntimeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRuntimeSpec) String() string { @@ -447,7 +441,7 @@ func (*ResourceRuntimeSpec) ProtoMessage() {} func (x *ResourceRuntimeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +510,9 @@ type RaySpec struct { func (x *RaySpec) Reset() { *x = RaySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RaySpec) String() string { @@ -531,7 +523,7 @@ func (*RaySpec) ProtoMessage() {} func (x *RaySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +591,9 @@ type ResourceRuntime struct { func (x *ResourceRuntime) Reset() { *x = ResourceRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRuntime) String() string { @@ -614,7 +604,7 @@ func (*ResourceRuntime) ProtoMessage() {} func (x *ResourceRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +653,9 @@ type ServiceAccountSpec struct { func (x *ServiceAccountSpec) Reset() { *x = ServiceAccountSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccountSpec) String() string { @@ -678,7 +666,7 @@ func (*ServiceAccountSpec) ProtoMessage() {} func (x *ServiceAccountSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +707,9 @@ type RayMetricSpec struct { func (x *RayMetricSpec) Reset() { *x = RayMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayMetricSpec) String() string { @@ -734,7 +720,7 @@ func (*RayMetricSpec) ProtoMessage() {} func (x *RayMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +754,9 @@ type RayLogsSpec struct { func (x *RayLogsSpec) Reset() { *x = RayLogsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayLogsSpec) String() string { @@ -783,7 +767,7 @@ func (*RayLogsSpec) ProtoMessage() {} func (x *RayLogsSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +811,9 @@ type ResourcePool_AutoscalingSpec struct { func (x *ResourcePool_AutoscalingSpec) Reset() { *x = ResourcePool_AutoscalingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePool_AutoscalingSpec) String() string { @@ -842,7 +824,7 @@ func (*ResourcePool_AutoscalingSpec) ProtoMessage() {} func (x *ResourcePool_AutoscalingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1163,116 +1145,6 @@ func file_google_cloud_aiplatform_v1_persistent_resource_proto_init() { } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_machine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PersistentResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRuntimeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RaySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccountSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RayMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RayLogsSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePool_AutoscalingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_aiplatform_v1_persistent_resource_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} diff --git a/aiplatform/apiv1/aiplatformpb/persistent_resource_service.pb.go b/aiplatform/apiv1/aiplatformpb/persistent_resource_service.pb.go index d986b7758e3d..740e09197601 100755 --- a/aiplatform/apiv1/aiplatformpb/persistent_resource_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/persistent_resource_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/persistent_resource_service.proto @@ -65,11 +65,9 @@ type CreatePersistentResourceRequest struct { func (x *CreatePersistentResourceRequest) Reset() { *x = CreatePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePersistentResourceRequest) String() string { @@ -80,7 +78,7 @@ func (*CreatePersistentResourceRequest) ProtoMessage() {} func (x *CreatePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,11 +128,9 @@ type CreatePersistentResourceOperationMetadata struct { func (x *CreatePersistentResourceOperationMetadata) Reset() { *x = CreatePersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePersistentResourceOperationMetadata) String() string { @@ -145,7 +141,7 @@ func (*CreatePersistentResourceOperationMetadata) ProtoMessage() {} func (x *CreatePersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +184,9 @@ type UpdatePersistentResourceOperationMetadata struct { func (x *UpdatePersistentResourceOperationMetadata) Reset() { *x = UpdatePersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePersistentResourceOperationMetadata) String() string { @@ -203,7 +197,7 @@ func (*UpdatePersistentResourceOperationMetadata) ProtoMessage() {} func (x *UpdatePersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +240,9 @@ type RebootPersistentResourceOperationMetadata struct { func (x *RebootPersistentResourceOperationMetadata) Reset() { *x = RebootPersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebootPersistentResourceOperationMetadata) String() string { @@ -261,7 +253,7 @@ func (*RebootPersistentResourceOperationMetadata) ProtoMessage() {} func (x *RebootPersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type GetPersistentResourceRequest struct { func (x *GetPersistentResourceRequest) Reset() { *x = GetPersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPersistentResourceRequest) String() string { @@ -320,7 +310,7 @@ func (*GetPersistentResourceRequest) ProtoMessage() {} func (x *GetPersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +353,9 @@ type ListPersistentResourcesRequest struct { func (x *ListPersistentResourcesRequest) Reset() { *x = ListPersistentResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPersistentResourcesRequest) String() string { @@ -378,7 +366,7 @@ func (*ListPersistentResourcesRequest) ProtoMessage() {} func (x *ListPersistentResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +419,9 @@ type ListPersistentResourcesResponse struct { func (x *ListPersistentResourcesResponse) Reset() { *x = ListPersistentResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPersistentResourcesResponse) String() string { @@ -446,7 +432,7 @@ func (*ListPersistentResourcesResponse) ProtoMessage() {} func (x *ListPersistentResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +476,9 @@ type DeletePersistentResourceRequest struct { func (x *DeletePersistentResourceRequest) Reset() { *x = DeletePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePersistentResourceRequest) String() string { @@ -505,7 +489,7 @@ func (*DeletePersistentResourceRequest) ProtoMessage() {} func (x *DeletePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +530,9 @@ type UpdatePersistentResourceRequest struct { func (x *UpdatePersistentResourceRequest) Reset() { *x = UpdatePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePersistentResourceRequest) String() string { @@ -561,7 +543,7 @@ func (*UpdatePersistentResourceRequest) ProtoMessage() {} func (x *UpdatePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +587,9 @@ type RebootPersistentResourceRequest struct { func (x *RebootPersistentResourceRequest) Reset() { *x = RebootPersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebootPersistentResourceRequest) String() string { @@ -620,7 +600,7 @@ func (*RebootPersistentResourceRequest) ProtoMessage() {} func (x *RebootPersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,128 +943,6 @@ func file_google_cloud_aiplatform_v1_persistent_resource_service_proto_init() { } file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_persistent_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreatePersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RebootPersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetPersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPersistentResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPersistentResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeletePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_persistent_resource_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RebootPersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/pipeline_failure_policy.pb.go b/aiplatform/apiv1/aiplatformpb/pipeline_failure_policy.pb.go index 02c875430ef7..b472c7206f66 100755 --- a/aiplatform/apiv1/aiplatformpb/pipeline_failure_policy.pb.go +++ b/aiplatform/apiv1/aiplatformpb/pipeline_failure_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/pipeline_failure_policy.proto diff --git a/aiplatform/apiv1/aiplatformpb/pipeline_job.pb.go b/aiplatform/apiv1/aiplatformpb/pipeline_job.pb.go index 9960a707bbb6..c40230e7c397 100755 --- a/aiplatform/apiv1/aiplatformpb/pipeline_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/pipeline_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/pipeline_job.proto @@ -220,11 +220,9 @@ type PipelineJob struct { func (x *PipelineJob) Reset() { *x = PipelineJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob) String() string { @@ -235,7 +233,7 @@ func (*PipelineJob) ProtoMessage() {} func (x *PipelineJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +409,9 @@ type PipelineTemplateMetadata struct { func (x *PipelineTemplateMetadata) Reset() { *x = PipelineTemplateMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTemplateMetadata) String() string { @@ -426,7 +422,7 @@ func (*PipelineTemplateMetadata) ProtoMessage() {} func (x *PipelineTemplateMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +460,9 @@ type PipelineJobDetail struct { func (x *PipelineJobDetail) Reset() { *x = PipelineJobDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJobDetail) String() string { @@ -479,7 +473,7 @@ func (*PipelineJobDetail) ProtoMessage() {} func (x *PipelineJobDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +549,9 @@ type PipelineTaskDetail struct { func (x *PipelineTaskDetail) Reset() { *x = PipelineTaskDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail) String() string { @@ -570,7 +562,7 @@ func (*PipelineTaskDetail) ProtoMessage() {} func (x *PipelineTaskDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +683,9 @@ type PipelineTaskExecutorDetail struct { func (x *PipelineTaskExecutorDetail) Reset() { *x = PipelineTaskExecutorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail) String() string { @@ -706,7 +696,7 @@ func (*PipelineTaskExecutorDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +797,9 @@ type PipelineJob_RuntimeConfig struct { func (x *PipelineJob_RuntimeConfig) Reset() { *x = PipelineJob_RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig) String() string { @@ -822,7 +810,7 @@ func (*PipelineJob_RuntimeConfig) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +875,9 @@ type PipelineJob_RuntimeConfig_InputArtifact struct { func (x *PipelineJob_RuntimeConfig_InputArtifact) Reset() { *x = PipelineJob_RuntimeConfig_InputArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig_InputArtifact) String() string { @@ -902,7 +888,7 @@ func (*PipelineJob_RuntimeConfig_InputArtifact) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig_InputArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -967,11 +953,9 @@ type PipelineTaskDetail_PipelineTaskStatus struct { func (x *PipelineTaskDetail_PipelineTaskStatus) Reset() { *x = PipelineTaskDetail_PipelineTaskStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail_PipelineTaskStatus) String() string { @@ -982,7 +966,7 @@ func (*PipelineTaskDetail_PipelineTaskStatus) ProtoMessage() {} func (x *PipelineTaskDetail_PipelineTaskStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1014,9 @@ type PipelineTaskDetail_ArtifactList struct { func (x *PipelineTaskDetail_ArtifactList) Reset() { *x = PipelineTaskDetail_ArtifactList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail_ArtifactList) String() string { @@ -1045,7 +1027,7 @@ func (*PipelineTaskDetail_ArtifactList) ProtoMessage() {} func (x *PipelineTaskDetail_ArtifactList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1081,9 @@ type PipelineTaskExecutorDetail_ContainerDetail struct { func (x *PipelineTaskExecutorDetail_ContainerDetail) Reset() { *x = PipelineTaskExecutorDetail_ContainerDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail_ContainerDetail) String() string { @@ -1114,7 +1094,7 @@ func (*PipelineTaskExecutorDetail_ContainerDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail_ContainerDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1154,9 @@ type PipelineTaskExecutorDetail_CustomJobDetail struct { func (x *PipelineTaskExecutorDetail_CustomJobDetail) Reset() { *x = PipelineTaskExecutorDetail_CustomJobDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail_CustomJobDetail) String() string { @@ -1189,7 +1167,7 @@ func (*PipelineTaskExecutorDetail_CustomJobDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail_CustomJobDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,140 +1671,6 @@ func file_google_cloud_aiplatform_v1_pipeline_job_proto_init() { file_google_cloud_aiplatform_v1_pipeline_failure_policy_proto_init() file_google_cloud_aiplatform_v1_pipeline_state_proto_init() file_google_cloud_aiplatform_v1_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTemplateMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJobDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig_InputArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail_PipelineTaskStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail_ArtifactList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail_ContainerDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail_CustomJobDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_pipeline_job_proto_msgTypes[4].OneofWrappers = []any{ (*PipelineTaskExecutorDetail_ContainerDetail_)(nil), (*PipelineTaskExecutorDetail_CustomJobDetail_)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/pipeline_service.pb.go b/aiplatform/apiv1/aiplatformpb/pipeline_service.pb.go index 1219661f494f..e891b7ce2dab 100755 --- a/aiplatform/apiv1/aiplatformpb/pipeline_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/pipeline_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/pipeline_service.proto @@ -56,11 +56,9 @@ type BatchCancelPipelineJobsOperationMetadata struct { func (x *BatchCancelPipelineJobsOperationMetadata) Reset() { *x = BatchCancelPipelineJobsOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsOperationMetadata) String() string { @@ -71,7 +69,7 @@ func (*BatchCancelPipelineJobsOperationMetadata) ProtoMessage() {} func (x *BatchCancelPipelineJobsOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type CreateTrainingPipelineRequest struct { func (x *CreateTrainingPipelineRequest) Reset() { *x = CreateTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTrainingPipelineRequest) String() string { @@ -124,7 +120,7 @@ func (*CreateTrainingPipelineRequest) ProtoMessage() {} func (x *CreateTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetTrainingPipelineRequest struct { func (x *GetTrainingPipelineRequest) Reset() { *x = GetTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTrainingPipelineRequest) String() string { @@ -183,7 +177,7 @@ func (*GetTrainingPipelineRequest) ProtoMessage() {} func (x *GetTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type ListTrainingPipelinesRequest struct { func (x *ListTrainingPipelinesRequest) Reset() { *x = ListTrainingPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrainingPipelinesRequest) String() string { @@ -266,7 +258,7 @@ func (*ListTrainingPipelinesRequest) ProtoMessage() {} func (x *ListTrainingPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type ListTrainingPipelinesResponse struct { func (x *ListTrainingPipelinesResponse) Reset() { *x = ListTrainingPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrainingPipelinesResponse) String() string { @@ -349,7 +339,7 @@ func (*ListTrainingPipelinesResponse) ProtoMessage() {} func (x *ListTrainingPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +383,9 @@ type DeleteTrainingPipelineRequest struct { func (x *DeleteTrainingPipelineRequest) Reset() { *x = DeleteTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTrainingPipelineRequest) String() string { @@ -408,7 +396,7 @@ func (*DeleteTrainingPipelineRequest) ProtoMessage() {} func (x *DeleteTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +433,9 @@ type CancelTrainingPipelineRequest struct { func (x *CancelTrainingPipelineRequest) Reset() { *x = CancelTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelTrainingPipelineRequest) String() string { @@ -460,7 +446,7 @@ func (*CancelTrainingPipelineRequest) ProtoMessage() {} func (x *CancelTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type CreatePipelineJobRequest struct { func (x *CreatePipelineJobRequest) Reset() { *x = CreatePipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineJobRequest) String() string { @@ -520,7 +504,7 @@ func (*CreatePipelineJobRequest) ProtoMessage() {} func (x *CreatePipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +555,9 @@ type GetPipelineJobRequest struct { func (x *GetPipelineJobRequest) Reset() { *x = GetPipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineJobRequest) String() string { @@ -586,7 +568,7 @@ func (*GetPipelineJobRequest) ProtoMessage() {} func (x *GetPipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +664,9 @@ type ListPipelineJobsRequest struct { func (x *ListPipelineJobsRequest) Reset() { *x = ListPipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineJobsRequest) String() string { @@ -697,7 +677,7 @@ func (*ListPipelineJobsRequest) ProtoMessage() {} func (x *ListPipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +752,9 @@ type ListPipelineJobsResponse struct { func (x *ListPipelineJobsResponse) Reset() { *x = ListPipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineJobsResponse) String() string { @@ -787,7 +765,7 @@ func (*ListPipelineJobsResponse) ProtoMessage() {} func (x *ListPipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +809,9 @@ type DeletePipelineJobRequest struct { func (x *DeletePipelineJobRequest) Reset() { *x = DeletePipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineJobRequest) String() string { @@ -846,7 +822,7 @@ func (*DeletePipelineJobRequest) ProtoMessage() {} func (x *DeletePipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +863,9 @@ type BatchDeletePipelineJobsRequest struct { func (x *BatchDeletePipelineJobsRequest) Reset() { *x = BatchDeletePipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePipelineJobsRequest) String() string { @@ -902,7 +876,7 @@ func (*BatchDeletePipelineJobsRequest) ProtoMessage() {} func (x *BatchDeletePipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -944,11 +918,9 @@ type BatchDeletePipelineJobsResponse struct { func (x *BatchDeletePipelineJobsResponse) Reset() { *x = BatchDeletePipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePipelineJobsResponse) String() string { @@ -959,7 +931,7 @@ func (*BatchDeletePipelineJobsResponse) ProtoMessage() {} func (x *BatchDeletePipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +968,9 @@ type CancelPipelineJobRequest struct { func (x *CancelPipelineJobRequest) Reset() { *x = CancelPipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelPipelineJobRequest) String() string { @@ -1011,7 +981,7 @@ func (*CancelPipelineJobRequest) ProtoMessage() {} func (x *CancelPipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1022,9 @@ type BatchCancelPipelineJobsRequest struct { func (x *BatchCancelPipelineJobsRequest) Reset() { *x = BatchCancelPipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsRequest) String() string { @@ -1067,7 +1035,7 @@ func (*BatchCancelPipelineJobsRequest) ProtoMessage() {} func (x *BatchCancelPipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1077,9 @@ type BatchCancelPipelineJobsResponse struct { func (x *BatchCancelPipelineJobsResponse) Reset() { *x = BatchCancelPipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsResponse) String() string { @@ -1124,7 +1090,7 @@ func (*BatchCancelPipelineJobsResponse) ProtoMessage() {} func (x *BatchCancelPipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,212 +1575,6 @@ func file_google_cloud_aiplatform_v1_pipeline_service_proto_init() { file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_pipeline_job_proto_init() file_google_cloud_aiplatform_v1_training_pipeline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTrainingPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTrainingPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CancelTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetPipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeletePipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CancelPipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_pipeline_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/pipeline_state.pb.go b/aiplatform/apiv1/aiplatformpb/pipeline_state.pb.go index e829f795d386..336e75dad924 100755 --- a/aiplatform/apiv1/aiplatformpb/pipeline_state.pb.go +++ b/aiplatform/apiv1/aiplatformpb/pipeline_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/pipeline_state.proto diff --git a/aiplatform/apiv1/aiplatformpb/prediction_service.pb.go b/aiplatform/apiv1/aiplatformpb/prediction_service.pb.go index e325695c150c..3728a49dc283 100755 --- a/aiplatform/apiv1/aiplatformpb/prediction_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/prediction_service.proto @@ -135,11 +135,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -150,7 +148,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -233,7 +229,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +317,9 @@ type RawPredictRequest struct { func (x *RawPredictRequest) Reset() { *x = RawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawPredictRequest) String() string { @@ -336,7 +330,7 @@ func (*RawPredictRequest) ProtoMessage() {} func (x *RawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +376,9 @@ type StreamRawPredictRequest struct { func (x *StreamRawPredictRequest) Reset() { *x = StreamRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamRawPredictRequest) String() string { @@ -397,7 +389,7 @@ func (*StreamRawPredictRequest) ProtoMessage() {} func (x *StreamRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +437,9 @@ type DirectPredictRequest struct { func (x *DirectPredictRequest) Reset() { *x = DirectPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectPredictRequest) String() string { @@ -460,7 +450,7 @@ func (*DirectPredictRequest) ProtoMessage() {} func (x *DirectPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,11 +501,9 @@ type DirectPredictResponse struct { func (x *DirectPredictResponse) Reset() { *x = DirectPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectPredictResponse) String() string { @@ -526,7 +514,7 @@ func (*DirectPredictResponse) ProtoMessage() {} func (x *DirectPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +568,9 @@ type DirectRawPredictRequest struct { func (x *DirectRawPredictRequest) Reset() { *x = DirectRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectRawPredictRequest) String() string { @@ -595,7 +581,7 @@ func (*DirectRawPredictRequest) ProtoMessage() {} func (x *DirectRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +630,9 @@ type DirectRawPredictResponse struct { func (x *DirectRawPredictResponse) Reset() { *x = DirectRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectRawPredictResponse) String() string { @@ -659,7 +643,7 @@ func (*DirectRawPredictResponse) ProtoMessage() {} func (x *DirectRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +689,9 @@ type StreamDirectPredictRequest struct { func (x *StreamDirectPredictRequest) Reset() { *x = StreamDirectPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectPredictRequest) String() string { @@ -720,7 +702,7 @@ func (*StreamDirectPredictRequest) ProtoMessage() {} func (x *StreamDirectPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +753,9 @@ type StreamDirectPredictResponse struct { func (x *StreamDirectPredictResponse) Reset() { *x = StreamDirectPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectPredictResponse) String() string { @@ -786,7 +766,7 @@ func (*StreamDirectPredictResponse) ProtoMessage() {} func (x *StreamDirectPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -851,11 +831,9 @@ type StreamDirectRawPredictRequest struct { func (x *StreamDirectRawPredictRequest) Reset() { *x = StreamDirectRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectRawPredictRequest) String() string { @@ -866,7 +844,7 @@ func (*StreamDirectRawPredictRequest) ProtoMessage() {} func (x *StreamDirectRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +893,9 @@ type StreamDirectRawPredictResponse struct { func (x *StreamDirectRawPredictResponse) Reset() { *x = StreamDirectRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectRawPredictResponse) String() string { @@ -930,7 +906,7 @@ func (*StreamDirectRawPredictResponse) ProtoMessage() {} func (x *StreamDirectRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +951,9 @@ type StreamingPredictRequest struct { func (x *StreamingPredictRequest) Reset() { *x = StreamingPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPredictRequest) String() string { @@ -990,7 +964,7 @@ func (*StreamingPredictRequest) ProtoMessage() {} func (x *StreamingPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1015,9 @@ type StreamingPredictResponse struct { func (x *StreamingPredictResponse) Reset() { *x = StreamingPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPredictResponse) String() string { @@ -1056,7 +1028,7 @@ func (*StreamingPredictResponse) ProtoMessage() {} func (x *StreamingPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1093,9 @@ type StreamingRawPredictRequest struct { func (x *StreamingRawPredictRequest) Reset() { *x = StreamingRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRawPredictRequest) String() string { @@ -1136,7 +1106,7 @@ func (*StreamingRawPredictRequest) ProtoMessage() {} func (x *StreamingRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1155,9 @@ type StreamingRawPredictResponse struct { func (x *StreamingRawPredictResponse) Reset() { *x = StreamingRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRawPredictResponse) String() string { @@ -1200,7 +1168,7 @@ func (*StreamingRawPredictResponse) ProtoMessage() {} func (x *StreamingRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1266,11 +1234,9 @@ type ExplainRequest struct { func (x *ExplainRequest) Reset() { *x = ExplainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainRequest) String() string { @@ -1281,7 +1247,7 @@ func (*ExplainRequest) ProtoMessage() {} func (x *ExplainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1321,9 @@ type ExplainResponse struct { func (x *ExplainResponse) Reset() { *x = ExplainResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainResponse) String() string { @@ -1370,7 +1334,7 @@ func (*ExplainResponse) ProtoMessage() {} func (x *ExplainResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1407,9 @@ type CountTokensRequest struct { func (x *CountTokensRequest) Reset() { *x = CountTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensRequest) String() string { @@ -1458,7 +1420,7 @@ func (*CountTokensRequest) ProtoMessage() {} func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1499,9 @@ type CountTokensResponse struct { func (x *CountTokensResponse) Reset() { *x = CountTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensResponse) String() string { @@ -1552,7 +1512,7 @@ func (*CountTokensResponse) ProtoMessage() {} func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1633,11 +1593,9 @@ type GenerateContentRequest struct { func (x *GenerateContentRequest) Reset() { *x = GenerateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentRequest) String() string { @@ -1648,7 +1606,7 @@ func (*GenerateContentRequest) ProtoMessage() {} func (x *GenerateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1739,11 +1697,9 @@ type GenerateContentResponse struct { func (x *GenerateContentResponse) Reset() { *x = GenerateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse) String() string { @@ -1754,7 +1710,7 @@ func (*GenerateContentResponse) ProtoMessage() {} func (x *GenerateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1813,11 +1769,9 @@ type GenerateContentResponse_PromptFeedback struct { func (x *GenerateContentResponse_PromptFeedback) Reset() { *x = GenerateContentResponse_PromptFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_PromptFeedback) String() string { @@ -1828,7 +1782,7 @@ func (*GenerateContentResponse_PromptFeedback) ProtoMessage() {} func (x *GenerateContentResponse_PromptFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1836,9 @@ type GenerateContentResponse_UsageMetadata struct { func (x *GenerateContentResponse_UsageMetadata) Reset() { *x = GenerateContentResponse_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_UsageMetadata) String() string { @@ -1897,7 +1849,7 @@ func (*GenerateContentResponse_UsageMetadata) ProtoMessage() {} func (x *GenerateContentResponse_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2669,296 +2621,6 @@ func file_google_cloud_aiplatform_v1_prediction_service_proto_init() { file_google_cloud_aiplatform_v1_explanation_proto_init() file_google_cloud_aiplatform_v1_tool_proto_init() file_google_cloud_aiplatform_v1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DirectPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DirectPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DirectRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DirectRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExplainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExplainResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_PromptFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[18].OneofWrappers = []any{} file_google_cloud_aiplatform_v1_prediction_service_proto_msgTypes[20].OneofWrappers = []any{} type x struct{} diff --git a/aiplatform/apiv1/aiplatformpb/publisher_model.pb.go b/aiplatform/apiv1/aiplatformpb/publisher_model.pb.go index e4e3a7af51a3..2aa3641488b8 100755 --- a/aiplatform/apiv1/aiplatformpb/publisher_model.pb.go +++ b/aiplatform/apiv1/aiplatformpb/publisher_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/publisher_model.proto @@ -260,11 +260,9 @@ type PublisherModel struct { func (x *PublisherModel) Reset() { *x = PublisherModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel) String() string { @@ -275,7 +273,7 @@ func (*PublisherModel) ProtoMessage() {} func (x *PublisherModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +368,9 @@ type PublisherModel_ResourceReference struct { func (x *PublisherModel_ResourceReference) Reset() { *x = PublisherModel_ResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_ResourceReference) String() string { @@ -385,7 +381,7 @@ func (*PublisherModel_ResourceReference) ProtoMessage() {} func (x *PublisherModel_ResourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +485,9 @@ type PublisherModel_Documentation struct { func (x *PublisherModel_Documentation) Reset() { *x = PublisherModel_Documentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_Documentation) String() string { @@ -504,7 +498,7 @@ func (*PublisherModel_Documentation) ProtoMessage() {} func (x *PublisherModel_Documentation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +563,9 @@ type PublisherModel_CallToAction struct { func (x *PublisherModel_CallToAction) Reset() { *x = PublisherModel_CallToAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction) String() string { @@ -584,7 +576,7 @@ func (*PublisherModel_CallToAction) ProtoMessage() {} func (x *PublisherModel_CallToAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +703,9 @@ type PublisherModel_CallToAction_RegionalResourceReferences struct { func (x *PublisherModel_CallToAction_RegionalResourceReferences) Reset() { *x = PublisherModel_CallToAction_RegionalResourceReferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_RegionalResourceReferences) String() string { @@ -726,7 +716,7 @@ func (*PublisherModel_CallToAction_RegionalResourceReferences) ProtoMessage() {} func (x *PublisherModel_CallToAction_RegionalResourceReferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +780,9 @@ type PublisherModel_CallToAction_ViewRestApi struct { func (x *PublisherModel_CallToAction_ViewRestApi) Reset() { *x = PublisherModel_CallToAction_ViewRestApi{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_ViewRestApi) String() string { @@ -805,7 +793,7 @@ func (*PublisherModel_CallToAction_ViewRestApi) ProtoMessage() {} func (x *PublisherModel_CallToAction_ViewRestApi) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +834,9 @@ type PublisherModel_CallToAction_OpenNotebooks struct { func (x *PublisherModel_CallToAction_OpenNotebooks) Reset() { *x = PublisherModel_CallToAction_OpenNotebooks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_OpenNotebooks) String() string { @@ -861,7 +847,7 @@ func (*PublisherModel_CallToAction_OpenNotebooks) ProtoMessage() {} func (x *PublisherModel_CallToAction_OpenNotebooks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +881,9 @@ type PublisherModel_CallToAction_OpenFineTuningPipelines struct { func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) Reset() { *x = PublisherModel_CallToAction_OpenFineTuningPipelines{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) String() string { @@ -910,7 +894,7 @@ func (*PublisherModel_CallToAction_OpenFineTuningPipelines) ProtoMessage() {} func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -973,11 +957,9 @@ type PublisherModel_CallToAction_Deploy struct { func (x *PublisherModel_CallToAction_Deploy) Reset() { *x = PublisherModel_CallToAction_Deploy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_Deploy) String() string { @@ -988,7 +970,7 @@ func (*PublisherModel_CallToAction_Deploy) ProtoMessage() {} func (x *PublisherModel_CallToAction_Deploy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1131,11 +1113,9 @@ type PublisherModel_CallToAction_DeployGke struct { func (x *PublisherModel_CallToAction_DeployGke) Reset() { *x = PublisherModel_CallToAction_DeployGke{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_DeployGke) String() string { @@ -1146,7 +1126,7 @@ func (*PublisherModel_CallToAction_DeployGke) ProtoMessage() {} func (x *PublisherModel_CallToAction_DeployGke) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1164,9 @@ type PublisherModel_CallToAction_Deploy_DeployMetadata struct { func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) Reset() { *x = PublisherModel_CallToAction_Deploy_DeployMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) String() string { @@ -1199,7 +1177,7 @@ func (*PublisherModel_CallToAction_Deploy_DeployMetadata) ProtoMessage() {} func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,140 +1658,6 @@ func file_google_cloud_aiplatform_v1_publisher_model_proto_init() { } file_google_cloud_aiplatform_v1_machine_resources_proto_init() file_google_cloud_aiplatform_v1_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_ResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_Documentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_RegionalResourceReferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_ViewRestApi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_OpenNotebooks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_OpenFineTuningPipelines); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_Deploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_DeployGke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_Deploy_DeployMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_publisher_model_proto_msgTypes[1].OneofWrappers = []any{ (*PublisherModel_ResourceReference_Uri)(nil), (*PublisherModel_ResourceReference_ResourceName)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/reservation_affinity.pb.go b/aiplatform/apiv1/aiplatformpb/reservation_affinity.pb.go index d398059ed1ae..95221a787bde 100755 --- a/aiplatform/apiv1/aiplatformpb/reservation_affinity.pb.go +++ b/aiplatform/apiv1/aiplatformpb/reservation_affinity.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/reservation_affinity.proto @@ -116,11 +116,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_reservation_affinity_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_reservation_affinity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -131,7 +129,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_reservation_affinity_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,20 +253,6 @@ func file_google_cloud_aiplatform_v1_reservation_affinity_proto_init() { if File_google_cloud_aiplatform_v1_reservation_affinity_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_reservation_affinity_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/saved_query.pb.go b/aiplatform/apiv1/aiplatformpb/saved_query.pb.go index 15112d699fcb..5929c0c540c2 100755 --- a/aiplatform/apiv1/aiplatformpb/saved_query.pb.go +++ b/aiplatform/apiv1/aiplatformpb/saved_query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/saved_query.proto @@ -85,11 +85,9 @@ type SavedQuery struct { func (x *SavedQuery) Reset() { *x = SavedQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_saved_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_saved_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedQuery) String() string { @@ -100,7 +98,7 @@ func (*SavedQuery) ProtoMessage() {} func (x *SavedQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_saved_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,20 +287,6 @@ func file_google_cloud_aiplatform_v1_saved_query_proto_init() { if File_google_cloud_aiplatform_v1_saved_query_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_saved_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SavedQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/schedule.pb.go b/aiplatform/apiv1/aiplatformpb/schedule.pb.go index 8ac755dd8561..a178336f6735 100755 --- a/aiplatform/apiv1/aiplatformpb/schedule.pb.go +++ b/aiplatform/apiv1/aiplatformpb/schedule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/schedule.proto @@ -183,11 +183,9 @@ type Schedule struct { func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -198,7 +196,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +410,9 @@ type Schedule_RunResponse struct { func (x *Schedule_RunResponse) Reset() { *x = Schedule_RunResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule_RunResponse) String() string { @@ -427,7 +423,7 @@ func (*Schedule_RunResponse) ProtoMessage() {} func (x *Schedule_RunResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,32 +636,6 @@ func file_google_cloud_aiplatform_v1_schedule_proto_init() { } file_google_cloud_aiplatform_v1_notebook_service_proto_init() file_google_cloud_aiplatform_v1_pipeline_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Schedule_RunResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_schedule_proto_msgTypes[0].OneofWrappers = []any{ (*Schedule_Cron)(nil), (*Schedule_CreatePipelineJobRequest)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/schedule_service.pb.go b/aiplatform/apiv1/aiplatformpb/schedule_service.pb.go index cdca3b6e0e72..841fd30846c8 100755 --- a/aiplatform/apiv1/aiplatformpb/schedule_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/schedule_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/schedule_service.proto @@ -59,11 +59,9 @@ type CreateScheduleRequest struct { func (x *CreateScheduleRequest) Reset() { *x = CreateScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateScheduleRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateScheduleRequest) ProtoMessage() {} func (x *CreateScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetScheduleRequest struct { func (x *GetScheduleRequest) Reset() { *x = GetScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScheduleRequest) String() string { @@ -133,7 +129,7 @@ func (*GetScheduleRequest) ProtoMessage() {} func (x *GetScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type ListSchedulesRequest struct { func (x *ListSchedulesRequest) Reset() { *x = ListSchedulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesRequest) String() string { @@ -242,7 +236,7 @@ func (*ListSchedulesRequest) ProtoMessage() {} func (x *ListSchedulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +304,9 @@ type ListSchedulesResponse struct { func (x *ListSchedulesResponse) Reset() { *x = ListSchedulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesResponse) String() string { @@ -325,7 +317,7 @@ func (*ListSchedulesResponse) ProtoMessage() {} func (x *ListSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +361,9 @@ type DeleteScheduleRequest struct { func (x *DeleteScheduleRequest) Reset() { *x = DeleteScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteScheduleRequest) String() string { @@ -384,7 +374,7 @@ func (*DeleteScheduleRequest) ProtoMessage() {} func (x *DeleteScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +411,9 @@ type PauseScheduleRequest struct { func (x *PauseScheduleRequest) Reset() { *x = PauseScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseScheduleRequest) String() string { @@ -436,7 +424,7 @@ func (*PauseScheduleRequest) ProtoMessage() {} func (x *PauseScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type ResumeScheduleRequest struct { func (x *ResumeScheduleRequest) Reset() { *x = ResumeScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeScheduleRequest) String() string { @@ -494,7 +480,7 @@ func (*ResumeScheduleRequest) ProtoMessage() {} func (x *ResumeScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +530,9 @@ type UpdateScheduleRequest struct { func (x *UpdateScheduleRequest) Reset() { *x = UpdateScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateScheduleRequest) String() string { @@ -559,7 +543,7 @@ func (*UpdateScheduleRequest) ProtoMessage() {} func (x *UpdateScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,104 +828,6 @@ func file_google_cloud_aiplatform_v1_schedule_service_proto_init() { } file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_schedule_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PauseScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResumeScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_schedule_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/service_networking.pb.go b/aiplatform/apiv1/aiplatformpb/service_networking.pb.go index 313fbbc8b0b5..631dfab53249 100755 --- a/aiplatform/apiv1/aiplatformpb/service_networking.pb.go +++ b/aiplatform/apiv1/aiplatformpb/service_networking.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/service_networking.proto @@ -56,11 +56,9 @@ type PSCAutomationConfig struct { func (x *PSCAutomationConfig) Reset() { *x = PSCAutomationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PSCAutomationConfig) String() string { @@ -71,7 +69,7 @@ func (*PSCAutomationConfig) ProtoMessage() {} func (x *PSCAutomationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type PrivateServiceConnectConfig struct { func (x *PrivateServiceConnectConfig) Reset() { *x = PrivateServiceConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateServiceConnectConfig) String() string { @@ -134,7 +130,7 @@ func (*PrivateServiceConnectConfig) ProtoMessage() {} func (x *PrivateServiceConnectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +183,9 @@ type PscAutomatedEndpoints struct { func (x *PscAutomatedEndpoints) Reset() { *x = PscAutomatedEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscAutomatedEndpoints) String() string { @@ -202,7 +196,7 @@ func (*PscAutomatedEndpoints) ProtoMessage() {} func (x *PscAutomatedEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,44 +325,6 @@ func file_google_cloud_aiplatform_v1_service_networking_proto_init() { if File_google_cloud_aiplatform_v1_service_networking_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PSCAutomationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PrivateServiceConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_service_networking_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PscAutomatedEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/specialist_pool.pb.go b/aiplatform/apiv1/aiplatformpb/specialist_pool.pb.go index 5846897f46b1..25de0f9aab83 100755 --- a/aiplatform/apiv1/aiplatformpb/specialist_pool.pb.go +++ b/aiplatform/apiv1/aiplatformpb/specialist_pool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/specialist_pool.proto @@ -66,11 +66,9 @@ type SpecialistPool struct { func (x *SpecialistPool) Reset() { *x = SpecialistPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpecialistPool) String() string { @@ -81,7 +79,7 @@ func (*SpecialistPool) ProtoMessage() {} func (x *SpecialistPool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,20 +221,6 @@ func file_google_cloud_aiplatform_v1_specialist_pool_proto_init() { if File_google_cloud_aiplatform_v1_specialist_pool_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_specialist_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpecialistPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/specialist_pool_service.pb.go b/aiplatform/apiv1/aiplatformpb/specialist_pool_service.pb.go index 5a4729971cd4..53950d120320 100755 --- a/aiplatform/apiv1/aiplatformpb/specialist_pool_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/specialist_pool_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/specialist_pool_service.proto @@ -59,11 +59,9 @@ type CreateSpecialistPoolRequest struct { func (x *CreateSpecialistPoolRequest) Reset() { *x = CreateSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpecialistPoolRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateSpecialistPoolRequest) ProtoMessage() {} func (x *CreateSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateSpecialistPoolOperationMetadata struct { func (x *CreateSpecialistPoolOperationMetadata) Reset() { *x = CreateSpecialistPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpecialistPoolOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateSpecialistPoolOperationMetadata) ProtoMessage() {} func (x *CreateSpecialistPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetSpecialistPoolRequest struct { func (x *GetSpecialistPoolRequest) Reset() { *x = GetSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpecialistPoolRequest) String() string { @@ -183,7 +177,7 @@ func (*GetSpecialistPoolRequest) ProtoMessage() {} func (x *GetSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type ListSpecialistPoolsRequest struct { func (x *ListSpecialistPoolsRequest) Reset() { *x = ListSpecialistPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecialistPoolsRequest) String() string { @@ -245,7 +237,7 @@ func (*ListSpecialistPoolsRequest) ProtoMessage() {} func (x *ListSpecialistPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +295,9 @@ type ListSpecialistPoolsResponse struct { func (x *ListSpecialistPoolsResponse) Reset() { *x = ListSpecialistPoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecialistPoolsResponse) String() string { @@ -318,7 +308,7 @@ func (*ListSpecialistPoolsResponse) ProtoMessage() {} func (x *ListSpecialistPoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type DeleteSpecialistPoolRequest struct { func (x *DeleteSpecialistPoolRequest) Reset() { *x = DeleteSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpecialistPoolRequest) String() string { @@ -380,7 +368,7 @@ func (*DeleteSpecialistPoolRequest) ProtoMessage() {} func (x *DeleteSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +412,9 @@ type UpdateSpecialistPoolRequest struct { func (x *UpdateSpecialistPoolRequest) Reset() { *x = UpdateSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpecialistPoolRequest) String() string { @@ -439,7 +425,7 @@ func (*UpdateSpecialistPoolRequest) ProtoMessage() {} func (x *UpdateSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +471,9 @@ type UpdateSpecialistPoolOperationMetadata struct { func (x *UpdateSpecialistPoolOperationMetadata) Reset() { *x = UpdateSpecialistPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpecialistPoolOperationMetadata) String() string { @@ -500,7 +484,7 @@ func (*UpdateSpecialistPoolOperationMetadata) ProtoMessage() {} func (x *UpdateSpecialistPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,104 +782,6 @@ func file_google_cloud_aiplatform_v1_specialist_pool_service_proto_init() { } file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_specialist_pool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpecialistPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecialistPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecialistPoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_specialist_pool_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpecialistPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/study.pb.go b/aiplatform/apiv1/aiplatformpb/study.pb.go index 6308405b6d3e..2b8edfed9b57 100755 --- a/aiplatform/apiv1/aiplatformpb/study.pb.go +++ b/aiplatform/apiv1/aiplatformpb/study.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/study.proto @@ -485,11 +485,9 @@ type Study struct { func (x *Study) Reset() { *x = Study{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Study) String() string { @@ -500,7 +498,7 @@ func (*Study) ProtoMessage() {} func (x *Study) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +617,9 @@ type Trial struct { func (x *Trial) Reset() { *x = Trial{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trial) String() string { @@ -634,7 +630,7 @@ func (*Trial) ProtoMessage() {} func (x *Trial) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +752,9 @@ type TrialContext struct { func (x *TrialContext) Reset() { *x = TrialContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrialContext) String() string { @@ -771,7 +765,7 @@ func (*TrialContext) ProtoMessage() {} func (x *TrialContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +809,9 @@ type StudyTimeConstraint struct { func (x *StudyTimeConstraint) Reset() { *x = StudyTimeConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudyTimeConstraint) String() string { @@ -830,7 +822,7 @@ func (*StudyTimeConstraint) ProtoMessage() {} func (x *StudyTimeConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +907,9 @@ type StudySpec struct { func (x *StudySpec) Reset() { *x = StudySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec) String() string { @@ -930,7 +920,7 @@ func (*StudySpec) ProtoMessage() {} func (x *StudySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1051,9 @@ type Measurement struct { func (x *Measurement) Reset() { *x = Measurement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Measurement) String() string { @@ -1076,7 +1064,7 @@ func (*Measurement) ProtoMessage() {} func (x *Measurement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1120,9 @@ type Trial_Parameter struct { func (x *Trial_Parameter) Reset() { *x = Trial_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trial_Parameter) String() string { @@ -1147,7 +1133,7 @@ func (*Trial_Parameter) ProtoMessage() {} func (x *Trial_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1180,9 @@ type StudySpec_MetricSpec struct { func (x *StudySpec_MetricSpec) Reset() { *x = StudySpec_MetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MetricSpec) String() string { @@ -1209,7 +1193,7 @@ func (*StudySpec_MetricSpec) ProtoMessage() {} func (x *StudySpec_MetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1258,9 @@ type StudySpec_ParameterSpec struct { func (x *StudySpec_ParameterSpec) Reset() { *x = StudySpec_ParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec) String() string { @@ -1289,7 +1271,7 @@ func (*StudySpec_ParameterSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1395,9 @@ type StudySpec_DecayCurveAutomatedStoppingSpec struct { func (x *StudySpec_DecayCurveAutomatedStoppingSpec) Reset() { *x = StudySpec_DecayCurveAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_DecayCurveAutomatedStoppingSpec) String() string { @@ -1428,7 +1408,7 @@ func (*StudySpec_DecayCurveAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_DecayCurveAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1450,9 @@ type StudySpec_MedianAutomatedStoppingSpec struct { func (x *StudySpec_MedianAutomatedStoppingSpec) Reset() { *x = StudySpec_MedianAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MedianAutomatedStoppingSpec) String() string { @@ -1485,7 +1463,7 @@ func (*StudySpec_MedianAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_MedianAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1543,9 @@ type StudySpec_ConvexAutomatedStoppingSpec struct { func (x *StudySpec_ConvexAutomatedStoppingSpec) Reset() { *x = StudySpec_ConvexAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ConvexAutomatedStoppingSpec) String() string { @@ -1580,7 +1556,7 @@ func (*StudySpec_ConvexAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_ConvexAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1669,9 @@ type StudySpec_StudyStoppingConfig struct { func (x *StudySpec_StudyStoppingConfig) Reset() { *x = StudySpec_StudyStoppingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_StudyStoppingConfig) String() string { @@ -1708,7 +1682,7 @@ func (*StudySpec_StudyStoppingConfig) ProtoMessage() {} func (x *StudySpec_StudyStoppingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1766,9 @@ type StudySpec_MetricSpec_SafetyMetricConfig struct { func (x *StudySpec_MetricSpec_SafetyMetricConfig) Reset() { *x = StudySpec_MetricSpec_SafetyMetricConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MetricSpec_SafetyMetricConfig) String() string { @@ -1807,7 +1779,7 @@ func (*StudySpec_MetricSpec_SafetyMetricConfig) ProtoMessage() {} func (x *StudySpec_MetricSpec_SafetyMetricConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1857,11 +1829,9 @@ type StudySpec_ParameterSpec_DoubleValueSpec struct { func (x *StudySpec_ParameterSpec_DoubleValueSpec) Reset() { *x = StudySpec_ParameterSpec_DoubleValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_DoubleValueSpec) String() string { @@ -1872,7 +1842,7 @@ func (*StudySpec_ParameterSpec_DoubleValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_DoubleValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1929,11 +1899,9 @@ type StudySpec_ParameterSpec_IntegerValueSpec struct { func (x *StudySpec_ParameterSpec_IntegerValueSpec) Reset() { *x = StudySpec_ParameterSpec_IntegerValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_IntegerValueSpec) String() string { @@ -1944,7 +1912,7 @@ func (*StudySpec_ParameterSpec_IntegerValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_IntegerValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1999,11 +1967,9 @@ type StudySpec_ParameterSpec_CategoricalValueSpec struct { func (x *StudySpec_ParameterSpec_CategoricalValueSpec) Reset() { *x = StudySpec_ParameterSpec_CategoricalValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_CategoricalValueSpec) String() string { @@ -2014,7 +1980,7 @@ func (*StudySpec_ParameterSpec_CategoricalValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_CategoricalValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2066,11 +2032,9 @@ type StudySpec_ParameterSpec_DiscreteValueSpec struct { func (x *StudySpec_ParameterSpec_DiscreteValueSpec) Reset() { *x = StudySpec_ParameterSpec_DiscreteValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_DiscreteValueSpec) String() string { @@ -2081,7 +2045,7 @@ func (*StudySpec_ParameterSpec_DiscreteValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_DiscreteValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2131,11 +2095,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec struct { func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) String() string { @@ -2146,7 +2108,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2242,11 +2204,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition str func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) String() string { @@ -2257,7 +2217,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2292,11 +2252,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition struct { func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) String() string { @@ -2307,7 +2265,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) Proto func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2343,11 +2301,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) String() string { @@ -2358,7 +2314,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueConditio func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2395,11 +2351,9 @@ type Measurement_Metric struct { func (x *Measurement_Metric) Reset() { *x = Measurement_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Measurement_Metric) String() string { @@ -2410,7 +2364,7 @@ func (*Measurement_Metric) ProtoMessage() {} func (x *Measurement_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_study_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3047,284 +3001,6 @@ func file_google_cloud_aiplatform_v1_study_proto_init() { if File_google_cloud_aiplatform_v1_study_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_study_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Study); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Trial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TrialContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StudyTimeConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Measurement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Trial_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_DecayCurveAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MedianAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ConvexAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_StudyStoppingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MetricSpec_SafetyMetricConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_DoubleValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_IntegerValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_CategoricalValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_DiscreteValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_study_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Measurement_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_study_proto_msgTypes[3].OneofWrappers = []any{ (*StudyTimeConstraint_MaxDuration)(nil), (*StudyTimeConstraint_EndTime)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard.pb.go index ea2c6566c960..b662c360c079 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard.proto @@ -95,11 +95,9 @@ type Tensorboard struct { func (x *Tensorboard) Reset() { *x = Tensorboard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tensorboard) String() string { @@ -110,7 +108,7 @@ func (*Tensorboard) ProtoMessage() {} func (x *Tensorboard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,20 +334,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_proto_init() { return } file_google_cloud_aiplatform_v1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tensorboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard_data.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard_data.pb.go index d4a5998b8fef..86c969e46218 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard_data.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard_data.proto @@ -55,11 +55,9 @@ type TimeSeriesData struct { func (x *TimeSeriesData) Reset() { *x = TimeSeriesData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesData) String() string { @@ -70,7 +68,7 @@ func (*TimeSeriesData) ProtoMessage() {} func (x *TimeSeriesData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type TimeSeriesDataPoint struct { func (x *TimeSeriesDataPoint) Reset() { *x = TimeSeriesDataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesDataPoint) String() string { @@ -143,7 +139,7 @@ func (*TimeSeriesDataPoint) ProtoMessage() {} func (x *TimeSeriesDataPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +233,9 @@ type Scalar struct { func (x *Scalar) Reset() { *x = Scalar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scalar) String() string { @@ -252,7 +246,7 @@ func (*Scalar) ProtoMessage() {} func (x *Scalar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type TensorboardTensor struct { func (x *TensorboardTensor) Reset() { *x = TensorboardTensor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTensor) String() string { @@ -305,7 +297,7 @@ func (*TensorboardTensor) ProtoMessage() {} func (x *TensorboardTensor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +339,9 @@ type TensorboardBlobSequence struct { func (x *TensorboardBlobSequence) Reset() { *x = TensorboardBlobSequence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardBlobSequence) String() string { @@ -362,7 +352,7 @@ func (*TensorboardBlobSequence) ProtoMessage() {} func (x *TensorboardBlobSequence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +390,9 @@ type TensorboardBlob struct { func (x *TensorboardBlob) Reset() { *x = TensorboardBlob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardBlob) String() string { @@ -415,7 +403,7 @@ func (*TensorboardBlob) ProtoMessage() {} func (x *TensorboardBlob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,80 +562,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_data_proto_init() { return } file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesDataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Scalar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTensor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardBlobSequence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardBlob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_tensorboard_data_proto_msgTypes[1].OneofWrappers = []any{ (*TimeSeriesDataPoint_Scalar)(nil), (*TimeSeriesDataPoint_Tensor)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard_experiment.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard_experiment.pb.go index 42f2be234ad7..638efe252c6b 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard_experiment.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard_experiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard_experiment.proto @@ -84,11 +84,9 @@ type TensorboardExperiment struct { func (x *TensorboardExperiment) Reset() { *x = TensorboardExperiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardExperiment) String() string { @@ -99,7 +97,7 @@ func (*TensorboardExperiment) ProtoMessage() {} func (x *TensorboardExperiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,20 +270,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_init() { if File_google_cloud_aiplatform_v1_tensorboard_experiment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardExperiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard_run.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard_run.pb.go index 21fe7815e0c1..546c2b356ba4 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard_run.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard_run.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard_run.proto @@ -84,11 +84,9 @@ type TensorboardRun struct { func (x *TensorboardRun) Reset() { *x = TensorboardRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardRun) String() string { @@ -99,7 +97,7 @@ func (*TensorboardRun) ProtoMessage() {} func (x *TensorboardRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,20 +260,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_run_proto_init() { if File_google_cloud_aiplatform_v1_tensorboard_run_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_run_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard_service.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard_service.pb.go index 4f1f05bcbc1f..81c30da9c790 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard_service.proto @@ -59,11 +59,9 @@ type CreateTensorboardRequest struct { func (x *CreateTensorboardRequest) Reset() { *x = CreateTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateTensorboardRequest) ProtoMessage() {} func (x *CreateTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetTensorboardRequest struct { func (x *GetTensorboardRequest) Reset() { *x = GetTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardRequest) String() string { @@ -133,7 +129,7 @@ func (*GetTensorboardRequest) ProtoMessage() {} func (x *GetTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +185,9 @@ type ListTensorboardsRequest struct { func (x *ListTensorboardsRequest) Reset() { *x = ListTensorboardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardsRequest) String() string { @@ -204,7 +198,7 @@ func (*ListTensorboardsRequest) ProtoMessage() {} func (x *ListTensorboardsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type ListTensorboardsResponse struct { func (x *ListTensorboardsResponse) Reset() { *x = ListTensorboardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardsResponse) String() string { @@ -294,7 +286,7 @@ func (*ListTensorboardsResponse) ProtoMessage() {} func (x *ListTensorboardsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +337,9 @@ type UpdateTensorboardRequest struct { func (x *UpdateTensorboardRequest) Reset() { *x = UpdateTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardRequest) String() string { @@ -360,7 +350,7 @@ func (*UpdateTensorboardRequest) ProtoMessage() {} func (x *UpdateTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +394,9 @@ type DeleteTensorboardRequest struct { func (x *DeleteTensorboardRequest) Reset() { *x = DeleteTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardRequest) String() string { @@ -419,7 +407,7 @@ func (*DeleteTensorboardRequest) ProtoMessage() {} func (x *DeleteTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +444,9 @@ type ReadTensorboardUsageRequest struct { func (x *ReadTensorboardUsageRequest) Reset() { *x = ReadTensorboardUsageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageRequest) String() string { @@ -471,7 +457,7 @@ func (*ReadTensorboardUsageRequest) ProtoMessage() {} func (x *ReadTensorboardUsageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +492,9 @@ type ReadTensorboardUsageResponse struct { func (x *ReadTensorboardUsageResponse) Reset() { *x = ReadTensorboardUsageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse) String() string { @@ -521,7 +505,7 @@ func (*ReadTensorboardUsageResponse) ProtoMessage() {} func (x *ReadTensorboardUsageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +542,9 @@ type ReadTensorboardSizeRequest struct { func (x *ReadTensorboardSizeRequest) Reset() { *x = ReadTensorboardSizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardSizeRequest) String() string { @@ -573,7 +555,7 @@ func (*ReadTensorboardSizeRequest) ProtoMessage() {} func (x *ReadTensorboardSizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +590,9 @@ type ReadTensorboardSizeResponse struct { func (x *ReadTensorboardSizeResponse) Reset() { *x = ReadTensorboardSizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardSizeResponse) String() string { @@ -623,7 +603,7 @@ func (*ReadTensorboardSizeResponse) ProtoMessage() {} func (x *ReadTensorboardSizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +648,9 @@ type CreateTensorboardExperimentRequest struct { func (x *CreateTensorboardExperimentRequest) Reset() { *x = CreateTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardExperimentRequest) String() string { @@ -683,7 +661,7 @@ func (*CreateTensorboardExperimentRequest) ProtoMessage() {} func (x *CreateTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +712,9 @@ type GetTensorboardExperimentRequest struct { func (x *GetTensorboardExperimentRequest) Reset() { *x = GetTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardExperimentRequest) String() string { @@ -749,7 +725,7 @@ func (*GetTensorboardExperimentRequest) ProtoMessage() {} func (x *GetTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +781,9 @@ type ListTensorboardExperimentsRequest struct { func (x *ListTensorboardExperimentsRequest) Reset() { *x = ListTensorboardExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardExperimentsRequest) String() string { @@ -820,7 +794,7 @@ func (*ListTensorboardExperimentsRequest) ProtoMessage() {} func (x *ListTensorboardExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +869,9 @@ type ListTensorboardExperimentsResponse struct { func (x *ListTensorboardExperimentsResponse) Reset() { *x = ListTensorboardExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardExperimentsResponse) String() string { @@ -910,7 +882,7 @@ func (*ListTensorboardExperimentsResponse) ProtoMessage() {} func (x *ListTensorboardExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +933,9 @@ type UpdateTensorboardExperimentRequest struct { func (x *UpdateTensorboardExperimentRequest) Reset() { *x = UpdateTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardExperimentRequest) String() string { @@ -976,7 +946,7 @@ func (*UpdateTensorboardExperimentRequest) ProtoMessage() {} func (x *UpdateTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +990,9 @@ type DeleteTensorboardExperimentRequest struct { func (x *DeleteTensorboardExperimentRequest) Reset() { *x = DeleteTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardExperimentRequest) String() string { @@ -1035,7 +1003,7 @@ func (*DeleteTensorboardExperimentRequest) ProtoMessage() {} func (x *DeleteTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1045,9 @@ type BatchCreateTensorboardRunsRequest struct { func (x *BatchCreateTensorboardRunsRequest) Reset() { *x = BatchCreateTensorboardRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardRunsRequest) String() string { @@ -1092,7 +1058,7 @@ func (*BatchCreateTensorboardRunsRequest) ProtoMessage() {} func (x *BatchCreateTensorboardRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1100,9 @@ type BatchCreateTensorboardRunsResponse struct { func (x *BatchCreateTensorboardRunsResponse) Reset() { *x = BatchCreateTensorboardRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardRunsResponse) String() string { @@ -1149,7 +1113,7 @@ func (*BatchCreateTensorboardRunsResponse) ProtoMessage() {} func (x *BatchCreateTensorboardRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1158,9 @@ type CreateTensorboardRunRequest struct { func (x *CreateTensorboardRunRequest) Reset() { *x = CreateTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardRunRequest) String() string { @@ -1209,7 +1171,7 @@ func (*CreateTensorboardRunRequest) ProtoMessage() {} func (x *CreateTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1222,9 @@ type GetTensorboardRunRequest struct { func (x *GetTensorboardRunRequest) Reset() { *x = GetTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardRunRequest) String() string { @@ -1275,7 +1235,7 @@ func (*GetTensorboardRunRequest) ProtoMessage() {} func (x *GetTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,11 +1274,9 @@ type ReadTensorboardBlobDataRequest struct { func (x *ReadTensorboardBlobDataRequest) Reset() { *x = ReadTensorboardBlobDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardBlobDataRequest) String() string { @@ -1329,7 +1287,7 @@ func (*ReadTensorboardBlobDataRequest) ProtoMessage() {} func (x *ReadTensorboardBlobDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1371,11 +1329,9 @@ type ReadTensorboardBlobDataResponse struct { func (x *ReadTensorboardBlobDataResponse) Reset() { *x = ReadTensorboardBlobDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardBlobDataResponse) String() string { @@ -1386,7 +1342,7 @@ func (*ReadTensorboardBlobDataResponse) ProtoMessage() {} func (x *ReadTensorboardBlobDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1398,9 @@ type ListTensorboardRunsRequest struct { func (x *ListTensorboardRunsRequest) Reset() { *x = ListTensorboardRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardRunsRequest) String() string { @@ -1457,7 +1411,7 @@ func (*ListTensorboardRunsRequest) ProtoMessage() {} func (x *ListTensorboardRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1532,11 +1486,9 @@ type ListTensorboardRunsResponse struct { func (x *ListTensorboardRunsResponse) Reset() { *x = ListTensorboardRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardRunsResponse) String() string { @@ -1547,7 +1499,7 @@ func (*ListTensorboardRunsResponse) ProtoMessage() {} func (x *ListTensorboardRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1550,9 @@ type UpdateTensorboardRunRequest struct { func (x *UpdateTensorboardRunRequest) Reset() { *x = UpdateTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardRunRequest) String() string { @@ -1613,7 +1563,7 @@ func (*UpdateTensorboardRunRequest) ProtoMessage() {} func (x *UpdateTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1657,11 +1607,9 @@ type DeleteTensorboardRunRequest struct { func (x *DeleteTensorboardRunRequest) Reset() { *x = DeleteTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardRunRequest) String() string { @@ -1672,7 +1620,7 @@ func (*DeleteTensorboardRunRequest) ProtoMessage() {} func (x *DeleteTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,11 +1664,9 @@ type BatchCreateTensorboardTimeSeriesRequest struct { func (x *BatchCreateTensorboardTimeSeriesRequest) Reset() { *x = BatchCreateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardTimeSeriesRequest) String() string { @@ -1731,7 +1677,7 @@ func (*BatchCreateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *BatchCreateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1773,11 +1719,9 @@ type BatchCreateTensorboardTimeSeriesResponse struct { func (x *BatchCreateTensorboardTimeSeriesResponse) Reset() { *x = BatchCreateTensorboardTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardTimeSeriesResponse) String() string { @@ -1788,7 +1732,7 @@ func (*BatchCreateTensorboardTimeSeriesResponse) ProtoMessage() {} func (x *BatchCreateTensorboardTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1833,11 +1777,9 @@ type CreateTensorboardTimeSeriesRequest struct { func (x *CreateTensorboardTimeSeriesRequest) Reset() { *x = CreateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardTimeSeriesRequest) String() string { @@ -1848,7 +1790,7 @@ func (*CreateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *CreateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1841,9 @@ type GetTensorboardTimeSeriesRequest struct { func (x *GetTensorboardTimeSeriesRequest) Reset() { *x = GetTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardTimeSeriesRequest) String() string { @@ -1914,7 +1854,7 @@ func (*GetTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *GetTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1970,11 +1910,9 @@ type ListTensorboardTimeSeriesRequest struct { func (x *ListTensorboardTimeSeriesRequest) Reset() { *x = ListTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardTimeSeriesRequest) String() string { @@ -1985,7 +1923,7 @@ func (*ListTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *ListTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +1998,9 @@ type ListTensorboardTimeSeriesResponse struct { func (x *ListTensorboardTimeSeriesResponse) Reset() { *x = ListTensorboardTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardTimeSeriesResponse) String() string { @@ -2075,7 +2011,7 @@ func (*ListTensorboardTimeSeriesResponse) ProtoMessage() {} func (x *ListTensorboardTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2127,11 +2063,9 @@ type UpdateTensorboardTimeSeriesRequest struct { func (x *UpdateTensorboardTimeSeriesRequest) Reset() { *x = UpdateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardTimeSeriesRequest) String() string { @@ -2142,7 +2076,7 @@ func (*UpdateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *UpdateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,11 +2120,9 @@ type DeleteTensorboardTimeSeriesRequest struct { func (x *DeleteTensorboardTimeSeriesRequest) Reset() { *x = DeleteTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardTimeSeriesRequest) String() string { @@ -2201,7 +2133,7 @@ func (*DeleteTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *DeleteTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2245,11 +2177,9 @@ type BatchReadTensorboardTimeSeriesDataRequest struct { func (x *BatchReadTensorboardTimeSeriesDataRequest) Reset() { *x = BatchReadTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadTensorboardTimeSeriesDataRequest) String() string { @@ -2260,7 +2190,7 @@ func (*BatchReadTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *BatchReadTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2302,11 +2232,9 @@ type BatchReadTensorboardTimeSeriesDataResponse struct { func (x *BatchReadTensorboardTimeSeriesDataResponse) Reset() { *x = BatchReadTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadTensorboardTimeSeriesDataResponse) String() string { @@ -2317,7 +2245,7 @@ func (*BatchReadTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *BatchReadTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2361,11 +2289,9 @@ type ReadTensorboardTimeSeriesDataRequest struct { func (x *ReadTensorboardTimeSeriesDataRequest) Reset() { *x = ReadTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardTimeSeriesDataRequest) String() string { @@ -2376,7 +2302,7 @@ func (*ReadTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *ReadTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2425,11 +2351,9 @@ type ReadTensorboardTimeSeriesDataResponse struct { func (x *ReadTensorboardTimeSeriesDataResponse) Reset() { *x = ReadTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardTimeSeriesDataResponse) String() string { @@ -2440,7 +2364,7 @@ func (*ReadTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *ReadTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2479,11 +2403,9 @@ type WriteTensorboardExperimentDataRequest struct { func (x *WriteTensorboardExperimentDataRequest) Reset() { *x = WriteTensorboardExperimentDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardExperimentDataRequest) String() string { @@ -2494,7 +2416,7 @@ func (*WriteTensorboardExperimentDataRequest) ProtoMessage() {} func (x *WriteTensorboardExperimentDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2533,11 +2455,9 @@ type WriteTensorboardExperimentDataResponse struct { func (x *WriteTensorboardExperimentDataResponse) Reset() { *x = WriteTensorboardExperimentDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardExperimentDataResponse) String() string { @@ -2548,7 +2468,7 @@ func (*WriteTensorboardExperimentDataResponse) ProtoMessage() {} func (x *WriteTensorboardExperimentDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2584,11 +2504,9 @@ type WriteTensorboardRunDataRequest struct { func (x *WriteTensorboardRunDataRequest) Reset() { *x = WriteTensorboardRunDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardRunDataRequest) String() string { @@ -2599,7 +2517,7 @@ func (*WriteTensorboardRunDataRequest) ProtoMessage() {} func (x *WriteTensorboardRunDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2638,11 +2556,9 @@ type WriteTensorboardRunDataResponse struct { func (x *WriteTensorboardRunDataResponse) Reset() { *x = WriteTensorboardRunDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardRunDataResponse) String() string { @@ -2653,7 +2569,7 @@ func (*WriteTensorboardRunDataResponse) ProtoMessage() {} func (x *WriteTensorboardRunDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2701,11 +2617,9 @@ type ExportTensorboardTimeSeriesDataRequest struct { func (x *ExportTensorboardTimeSeriesDataRequest) Reset() { *x = ExportTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTensorboardTimeSeriesDataRequest) String() string { @@ -2716,7 +2630,7 @@ func (*ExportTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *ExportTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2784,11 +2698,9 @@ type ExportTensorboardTimeSeriesDataResponse struct { func (x *ExportTensorboardTimeSeriesDataResponse) Reset() { *x = ExportTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTensorboardTimeSeriesDataResponse) String() string { @@ -2799,7 +2711,7 @@ func (*ExportTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *ExportTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2840,11 +2752,9 @@ type CreateTensorboardOperationMetadata struct { func (x *CreateTensorboardOperationMetadata) Reset() { *x = CreateTensorboardOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardOperationMetadata) String() string { @@ -2855,7 +2765,7 @@ func (*CreateTensorboardOperationMetadata) ProtoMessage() {} func (x *CreateTensorboardOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,11 +2799,9 @@ type UpdateTensorboardOperationMetadata struct { func (x *UpdateTensorboardOperationMetadata) Reset() { *x = UpdateTensorboardOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardOperationMetadata) String() string { @@ -2904,7 +2812,7 @@ func (*UpdateTensorboardOperationMetadata) ProtoMessage() {} func (x *UpdateTensorboardOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2940,11 +2848,9 @@ type ReadTensorboardUsageResponse_PerUserUsageData struct { func (x *ReadTensorboardUsageResponse_PerUserUsageData) Reset() { *x = ReadTensorboardUsageResponse_PerUserUsageData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse_PerUserUsageData) String() string { @@ -2955,7 +2861,7 @@ func (*ReadTensorboardUsageResponse_PerUserUsageData) ProtoMessage() {} func (x *ReadTensorboardUsageResponse_PerUserUsageData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2902,9 @@ type ReadTensorboardUsageResponse_PerMonthUsageData struct { func (x *ReadTensorboardUsageResponse_PerMonthUsageData) Reset() { *x = ReadTensorboardUsageResponse_PerMonthUsageData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse_PerMonthUsageData) String() string { @@ -3011,7 +2915,7 @@ func (*ReadTensorboardUsageResponse_PerMonthUsageData) ProtoMessage() {} func (x *ReadTensorboardUsageResponse_PerMonthUsageData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4293,584 +4197,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_service_proto_init() { file_google_cloud_aiplatform_v1_tensorboard_experiment_proto_init() file_google_cloud_aiplatform_v1_tensorboard_run_proto_init() file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardSizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardSizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardBlobDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardBlobDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardExperimentDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardExperimentDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardRunDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardRunDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ExportTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ExportTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse_PerUserUsageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse_PerMonthUsageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/tensorboard_time_series.pb.go b/aiplatform/apiv1/aiplatformpb/tensorboard_time_series.pb.go index 63c62f64c11b..5219762642a1 100755 --- a/aiplatform/apiv1/aiplatformpb/tensorboard_time_series.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tensorboard_time_series.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tensorboard_time_series.proto @@ -132,11 +132,9 @@ type TensorboardTimeSeries struct { func (x *TensorboardTimeSeries) Reset() { *x = TensorboardTimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTimeSeries) String() string { @@ -147,7 +145,7 @@ func (*TensorboardTimeSeries) ProtoMessage() {} func (x *TensorboardTimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +249,9 @@ type TensorboardTimeSeries_Metadata struct { func (x *TensorboardTimeSeries_Metadata) Reset() { *x = TensorboardTimeSeries_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTimeSeries_Metadata) String() string { @@ -266,7 +262,7 @@ func (*TensorboardTimeSeries_Metadata) ProtoMessage() {} func (x *TensorboardTimeSeries_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,32 +428,6 @@ func file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_init() { if File_google_cloud_aiplatform_v1_tensorboard_time_series_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tensorboard_time_series_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTimeSeries_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/tool.pb.go b/aiplatform/apiv1/aiplatformpb/tool.pb.go index 14a3179fb28d..53eeb1655a8c 100755 --- a/aiplatform/apiv1/aiplatformpb/tool.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tool.proto @@ -181,11 +181,9 @@ type Tool struct { func (x *Tool) Reset() { *x = Tool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool) String() string { @@ -196,7 +194,7 @@ func (*Tool) ProtoMessage() {} func (x *Tool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +273,9 @@ type FunctionDeclaration struct { func (x *FunctionDeclaration) Reset() { *x = FunctionDeclaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionDeclaration) String() string { @@ -290,7 +286,7 @@ func (*FunctionDeclaration) ProtoMessage() {} func (x *FunctionDeclaration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +347,9 @@ type FunctionCall struct { func (x *FunctionCall) Reset() { *x = FunctionCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCall) String() string { @@ -366,7 +360,7 @@ func (*FunctionCall) ProtoMessage() {} func (x *FunctionCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +410,9 @@ type FunctionResponse struct { func (x *FunctionResponse) Reset() { *x = FunctionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionResponse) String() string { @@ -431,7 +423,7 @@ func (*FunctionResponse) ProtoMessage() {} func (x *FunctionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +473,9 @@ type Retrieval struct { func (x *Retrieval) Reset() { *x = Retrieval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Retrieval) String() string { @@ -496,7 +486,7 @@ func (*Retrieval) ProtoMessage() {} func (x *Retrieval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +575,9 @@ type VertexRagStore struct { func (x *VertexRagStore) Reset() { *x = VertexRagStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexRagStore) String() string { @@ -600,7 +588,7 @@ func (*VertexRagStore) ProtoMessage() {} func (x *VertexRagStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -660,11 +648,9 @@ type VertexAISearch struct { func (x *VertexAISearch) Reset() { *x = VertexAISearch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexAISearch) String() string { @@ -675,7 +661,7 @@ func (*VertexAISearch) ProtoMessage() {} func (x *VertexAISearch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +695,9 @@ type GoogleSearchRetrieval struct { func (x *GoogleSearchRetrieval) Reset() { *x = GoogleSearchRetrieval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleSearchRetrieval) String() string { @@ -724,7 +708,7 @@ func (*GoogleSearchRetrieval) ProtoMessage() {} func (x *GoogleSearchRetrieval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +745,9 @@ type DynamicRetrievalConfig struct { func (x *DynamicRetrievalConfig) Reset() { *x = DynamicRetrievalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DynamicRetrievalConfig) String() string { @@ -776,7 +758,7 @@ func (*DynamicRetrievalConfig) ProtoMessage() {} func (x *DynamicRetrievalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -817,11 +799,9 @@ type ToolConfig struct { func (x *ToolConfig) Reset() { *x = ToolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolConfig) String() string { @@ -832,7 +812,7 @@ func (*ToolConfig) ProtoMessage() {} func (x *ToolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +850,9 @@ type FunctionCallingConfig struct { func (x *FunctionCallingConfig) Reset() { *x = FunctionCallingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCallingConfig) String() string { @@ -885,7 +863,7 @@ func (*FunctionCallingConfig) ProtoMessage() {} func (x *FunctionCallingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +906,9 @@ type RagRetrievalConfig struct { func (x *RagRetrievalConfig) Reset() { *x = RagRetrievalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig) String() string { @@ -943,7 +919,7 @@ func (*RagRetrievalConfig) ProtoMessage() {} func (x *RagRetrievalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +965,9 @@ type VertexRagStore_RagResource struct { func (x *VertexRagStore_RagResource) Reset() { *x = VertexRagStore_RagResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexRagStore_RagResource) String() string { @@ -1004,7 +978,7 @@ func (*VertexRagStore_RagResource) ProtoMessage() {} func (x *VertexRagStore_RagResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1027,9 @@ type RagRetrievalConfig_Filter struct { func (x *RagRetrievalConfig_Filter) Reset() { *x = RagRetrievalConfig_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_Filter) String() string { @@ -1068,7 +1040,7 @@ func (*RagRetrievalConfig_Filter) ProtoMessage() {} func (x *RagRetrievalConfig_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tool_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1392,176 +1364,6 @@ func file_google_cloud_aiplatform_v1_tool_proto_init() { return } file_google_cloud_aiplatform_v1_openapi_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FunctionDeclaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FunctionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Retrieval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VertexRagStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VertexAISearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GoogleSearchRetrieval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DynamicRetrievalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ToolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCallingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*VertexRagStore_RagResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tool_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_tool_proto_msgTypes[4].OneofWrappers = []any{ (*Retrieval_VertexAiSearch)(nil), (*Retrieval_VertexRagStore)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/training_pipeline.pb.go b/aiplatform/apiv1/aiplatformpb/training_pipeline.pb.go index d7bf5d32151c..3ec2ced7a792 100755 --- a/aiplatform/apiv1/aiplatformpb/training_pipeline.pb.go +++ b/aiplatform/apiv1/aiplatformpb/training_pipeline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/training_pipeline.proto @@ -147,11 +147,9 @@ type TrainingPipeline struct { func (x *TrainingPipeline) Reset() { *x = TrainingPipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainingPipeline) String() string { @@ -162,7 +160,7 @@ func (*TrainingPipeline) ProtoMessage() {} func (x *TrainingPipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +405,9 @@ type InputDataConfig struct { func (x *InputDataConfig) Reset() { *x = InputDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputDataConfig) String() string { @@ -422,7 +418,7 @@ func (*InputDataConfig) ProtoMessage() {} func (x *InputDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +652,9 @@ type FractionSplit struct { func (x *FractionSplit) Reset() { *x = FractionSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FractionSplit) String() string { @@ -671,7 +665,7 @@ func (*FractionSplit) ProtoMessage() {} func (x *FractionSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +741,9 @@ type FilterSplit struct { func (x *FilterSplit) Reset() { *x = FilterSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilterSplit) String() string { @@ -762,7 +754,7 @@ func (*FilterSplit) ProtoMessage() {} func (x *FilterSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +810,9 @@ type PredefinedSplit struct { func (x *PredefinedSplit) Reset() { *x = PredefinedSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredefinedSplit) String() string { @@ -833,7 +823,7 @@ func (*PredefinedSplit) ProtoMessage() {} func (x *PredefinedSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +871,9 @@ type TimestampSplit struct { func (x *TimestampSplit) Reset() { *x = TimestampSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampSplit) String() string { @@ -896,7 +884,7 @@ func (*TimestampSplit) ProtoMessage() {} func (x *TimestampSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +962,9 @@ type StratifiedSplit struct { func (x *StratifiedSplit) Reset() { *x = StratifiedSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StratifiedSplit) String() string { @@ -989,7 +975,7 @@ func (*StratifiedSplit) ProtoMessage() {} func (x *StratifiedSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1322,92 +1308,6 @@ func file_google_cloud_aiplatform_v1_training_pipeline_proto_init() { file_google_cloud_aiplatform_v1_io_proto_init() file_google_cloud_aiplatform_v1_model_proto_init() file_google_cloud_aiplatform_v1_pipeline_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TrainingPipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InputDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FractionSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FilterSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredefinedSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TimestampSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StratifiedSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_training_pipeline_proto_msgTypes[1].OneofWrappers = []any{ (*InputDataConfig_FractionSplit)(nil), (*InputDataConfig_FilterSplit)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go b/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go index 7e98a381ee4f..b1f155ba2e0e 100755 --- a/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go +++ b/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/tuning_job.proto @@ -179,11 +179,9 @@ type TuningJob struct { func (x *TuningJob) Reset() { *x = TuningJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningJob) String() string { @@ -194,7 +192,7 @@ func (*TuningJob) ProtoMessage() {} func (x *TuningJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +379,9 @@ type TunedModel struct { func (x *TunedModel) Reset() { *x = TunedModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModel) String() string { @@ -396,7 +392,7 @@ func (*TunedModel) ProtoMessage() {} func (x *TunedModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +449,9 @@ type SupervisedTuningDatasetDistribution struct { func (x *SupervisedTuningDatasetDistribution) Reset() { *x = SupervisedTuningDatasetDistribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDatasetDistribution) String() string { @@ -468,7 +462,7 @@ func (*SupervisedTuningDatasetDistribution) ProtoMessage() {} func (x *SupervisedTuningDatasetDistribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +576,9 @@ type SupervisedTuningDataStats struct { func (x *SupervisedTuningDataStats) Reset() { *x = SupervisedTuningDataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDataStats) String() string { @@ -597,7 +589,7 @@ func (*SupervisedTuningDataStats) ProtoMessage() {} func (x *SupervisedTuningDataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +697,9 @@ type TuningDataStats struct { func (x *TuningDataStats) Reset() { *x = TuningDataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningDataStats) String() string { @@ -720,7 +710,7 @@ func (*TuningDataStats) ProtoMessage() {} func (x *TuningDataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +767,9 @@ type SupervisedHyperParameters struct { func (x *SupervisedHyperParameters) Reset() { *x = SupervisedHyperParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedHyperParameters) String() string { @@ -792,7 +780,7 @@ func (*SupervisedHyperParameters) ProtoMessage() {} func (x *SupervisedHyperParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +834,9 @@ type SupervisedTuningSpec struct { func (x *SupervisedTuningSpec) Reset() { *x = SupervisedTuningSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningSpec) String() string { @@ -861,7 +847,7 @@ func (*SupervisedTuningSpec) ProtoMessage() {} func (x *SupervisedTuningSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +901,9 @@ type TunedModelRef struct { func (x *TunedModelRef) Reset() { *x = TunedModelRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModelRef) String() string { @@ -930,7 +914,7 @@ func (*TunedModelRef) ProtoMessage() {} func (x *TunedModelRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +1001,9 @@ type SupervisedTuningDatasetDistribution_DatasetBucket struct { func (x *SupervisedTuningDatasetDistribution_DatasetBucket) Reset() { *x = SupervisedTuningDatasetDistribution_DatasetBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDatasetDistribution_DatasetBucket) String() string { @@ -1032,7 +1014,7 @@ func (*SupervisedTuningDatasetDistribution_DatasetBucket) ProtoMessage() {} func (x *SupervisedTuningDatasetDistribution_DatasetBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,116 +1406,6 @@ func file_google_cloud_aiplatform_v1_tuning_job_proto_init() { file_google_cloud_aiplatform_v1_content_proto_init() file_google_cloud_aiplatform_v1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1_job_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TuningJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TunedModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDatasetDistribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TuningDataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedHyperParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TunedModelRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDatasetDistribution_DatasetBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0].OneofWrappers = []any{ (*TuningJob_BaseModel)(nil), (*TuningJob_SupervisedTuningSpec)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/types.pb.go b/aiplatform/apiv1/aiplatformpb/types.pb.go index 52338f05ea61..08433dfdb7e0 100755 --- a/aiplatform/apiv1/aiplatformpb/types.pb.go +++ b/aiplatform/apiv1/aiplatformpb/types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/types.proto @@ -131,11 +131,9 @@ type BoolArray struct { func (x *BoolArray) Reset() { *x = BoolArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoolArray) String() string { @@ -146,7 +144,7 @@ func (*BoolArray) ProtoMessage() {} func (x *BoolArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type DoubleArray struct { func (x *DoubleArray) Reset() { *x = DoubleArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleArray) String() string { @@ -195,7 +191,7 @@ func (*DoubleArray) ProtoMessage() {} func (x *DoubleArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type Int64Array struct { func (x *Int64Array) Reset() { *x = Int64Array{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Int64Array) String() string { @@ -244,7 +238,7 @@ func (*Int64Array) ProtoMessage() {} func (x *Int64Array) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +272,9 @@ type StringArray struct { func (x *StringArray) Reset() { *x = StringArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringArray) String() string { @@ -293,7 +285,7 @@ func (*StringArray) ProtoMessage() {} func (x *StringArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type Tensor struct { func (x *Tensor) Reset() { *x = Tensor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tensor) String() string { @@ -377,7 +367,7 @@ func (*Tensor) ProtoMessage() {} func (x *Tensor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,68 +603,6 @@ func file_google_cloud_aiplatform_v1_types_proto_init() { if File_google_cloud_aiplatform_v1_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BoolArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DoubleArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Int64Array); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StringArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Tensor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/unmanaged_container_model.pb.go b/aiplatform/apiv1/aiplatformpb/unmanaged_container_model.pb.go index 52614f0f965f..ad09bb8245d7 100755 --- a/aiplatform/apiv1/aiplatformpb/unmanaged_container_model.pb.go +++ b/aiplatform/apiv1/aiplatformpb/unmanaged_container_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/unmanaged_container_model.proto @@ -55,11 +55,9 @@ type UnmanagedContainerModel struct { func (x *UnmanagedContainerModel) Reset() { *x = UnmanagedContainerModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnmanagedContainerModel) String() string { @@ -70,7 +68,7 @@ func (*UnmanagedContainerModel) ProtoMessage() {} func (x *UnmanagedContainerModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,20 +183,6 @@ func file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_init() { return } file_google_cloud_aiplatform_v1_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_unmanaged_container_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UnmanagedContainerModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/aiplatformpb/user_action_reference.pb.go b/aiplatform/apiv1/aiplatformpb/user_action_reference.pb.go index 900c0086b428..0dad0a8b1a89 100755 --- a/aiplatform/apiv1/aiplatformpb/user_action_reference.pb.go +++ b/aiplatform/apiv1/aiplatformpb/user_action_reference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/user_action_reference.proto @@ -54,11 +54,9 @@ type UserActionReference struct { func (x *UserActionReference) Reset() { *x = UserActionReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_user_action_reference_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_user_action_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserActionReference) String() string { @@ -69,7 +67,7 @@ func (*UserActionReference) ProtoMessage() {} func (x *UserActionReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_user_action_reference_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,20 +196,6 @@ func file_google_cloud_aiplatform_v1_user_action_reference_proto_init() { if File_google_cloud_aiplatform_v1_user_action_reference_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_user_action_reference_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserActionReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_user_action_reference_proto_msgTypes[0].OneofWrappers = []any{ (*UserActionReference_Operation)(nil), (*UserActionReference_DataLabelingJob)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/value.pb.go b/aiplatform/apiv1/aiplatformpb/value.pb.go index 5be585eea174..e4d5f6a62281 100755 --- a/aiplatform/apiv1/aiplatformpb/value.pb.go +++ b/aiplatform/apiv1/aiplatformpb/value.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/value.proto @@ -51,11 +51,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_value_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -66,7 +64,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,20 +192,6 @@ func file_google_cloud_aiplatform_v1_value_proto_init() { if File_google_cloud_aiplatform_v1_value_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_value_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_value_proto_msgTypes[0].OneofWrappers = []any{ (*Value_IntValue)(nil), (*Value_DoubleValue)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/vertex_rag_data.pb.go b/aiplatform/apiv1/aiplatformpb/vertex_rag_data.pb.go index e4caa8453461..c6ead7652d36 100755 --- a/aiplatform/apiv1/aiplatformpb/vertex_rag_data.pb.go +++ b/aiplatform/apiv1/aiplatformpb/vertex_rag_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/vertex_rag_data.proto @@ -165,11 +165,9 @@ type RagEmbeddingModelConfig struct { func (x *RagEmbeddingModelConfig) Reset() { *x = RagEmbeddingModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig) String() string { @@ -180,7 +178,7 @@ func (*RagEmbeddingModelConfig) ProtoMessage() {} func (x *RagEmbeddingModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +244,9 @@ type RagVectorDbConfig struct { func (x *RagVectorDbConfig) Reset() { *x = RagVectorDbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig) String() string { @@ -261,7 +257,7 @@ func (*RagVectorDbConfig) ProtoMessage() {} func (x *RagVectorDbConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +353,9 @@ type FileStatus struct { func (x *FileStatus) Reset() { *x = FileStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStatus) String() string { @@ -372,7 +366,7 @@ func (*FileStatus) ProtoMessage() {} func (x *FileStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +409,9 @@ type CorpusStatus struct { func (x *CorpusStatus) Reset() { *x = CorpusStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorpusStatus) String() string { @@ -430,7 +422,7 @@ func (*CorpusStatus) ProtoMessage() {} func (x *CorpusStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +483,9 @@ type RagCorpus struct { func (x *RagCorpus) Reset() { *x = RagCorpus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagCorpus) String() string { @@ -506,7 +496,7 @@ func (*RagCorpus) ProtoMessage() {} func (x *RagCorpus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +614,9 @@ type RagFile struct { func (x *RagFile) Reset() { *x = RagFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFile) String() string { @@ -639,7 +627,7 @@ func (*RagFile) ProtoMessage() {} func (x *RagFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +798,9 @@ type RagFileChunkingConfig struct { func (x *RagFileChunkingConfig) Reset() { *x = RagFileChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileChunkingConfig) String() string { @@ -825,7 +811,7 @@ func (*RagFileChunkingConfig) ProtoMessage() {} func (x *RagFileChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,11 +863,9 @@ type RagFileTransformationConfig struct { func (x *RagFileTransformationConfig) Reset() { *x = RagFileTransformationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileTransformationConfig) String() string { @@ -892,7 +876,7 @@ func (*RagFileTransformationConfig) ProtoMessage() {} func (x *RagFileTransformationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -926,11 +910,9 @@ type UploadRagFileConfig struct { func (x *UploadRagFileConfig) Reset() { *x = UploadRagFileConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileConfig) String() string { @@ -941,7 +923,7 @@ func (*UploadRagFileConfig) ProtoMessage() {} func (x *UploadRagFileConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +981,9 @@ type ImportRagFilesConfig struct { func (x *ImportRagFilesConfig) Reset() { *x = ImportRagFilesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesConfig) String() string { @@ -1014,7 +994,7 @@ func (*ImportRagFilesConfig) ProtoMessage() {} func (x *ImportRagFilesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,11 +1184,9 @@ type RagEmbeddingModelConfig_VertexPredictionEndpoint struct { func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) Reset() { *x = RagEmbeddingModelConfig_VertexPredictionEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) String() string { @@ -1219,7 +1197,7 @@ func (*RagEmbeddingModelConfig_VertexPredictionEndpoint) ProtoMessage() {} func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1242,9 @@ type RagVectorDbConfig_RagManagedDb struct { func (x *RagVectorDbConfig_RagManagedDb) Reset() { *x = RagVectorDbConfig_RagManagedDb{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_RagManagedDb) String() string { @@ -1279,7 +1255,7 @@ func (*RagVectorDbConfig_RagManagedDb) ProtoMessage() {} func (x *RagVectorDbConfig_RagManagedDb) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1283,9 @@ type RagVectorDbConfig_Pinecone struct { func (x *RagVectorDbConfig_Pinecone) Reset() { *x = RagVectorDbConfig_Pinecone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_Pinecone) String() string { @@ -1322,7 +1296,7 @@ func (*RagVectorDbConfig_Pinecone) ProtoMessage() {} func (x *RagVectorDbConfig_Pinecone) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1362,11 +1336,9 @@ type RagVectorDbConfig_VertexVectorSearch struct { func (x *RagVectorDbConfig_VertexVectorSearch) Reset() { *x = RagVectorDbConfig_VertexVectorSearch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_VertexVectorSearch) String() string { @@ -1377,7 +1349,7 @@ func (*RagVectorDbConfig_VertexVectorSearch) ProtoMessage() {} func (x *RagVectorDbConfig_VertexVectorSearch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,11 +1392,9 @@ type RagFileChunkingConfig_FixedLengthChunking struct { func (x *RagFileChunkingConfig_FixedLengthChunking) Reset() { *x = RagFileChunkingConfig_FixedLengthChunking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileChunkingConfig_FixedLengthChunking) String() string { @@ -1435,7 +1405,7 @@ func (*RagFileChunkingConfig_FixedLengthChunking) ProtoMessage() {} func (x *RagFileChunkingConfig_FixedLengthChunking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1871,188 +1841,6 @@ func file_google_cloud_aiplatform_v1_vertex_rag_data_proto_init() { } file_google_cloud_aiplatform_v1_api_auth_proto_init() file_google_cloud_aiplatform_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FileStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CorpusStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RagCorpus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RagFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RagFileChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RagFileTransformationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig_VertexPredictionEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_RagManagedDb); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_Pinecone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_VertexVectorSearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RagFileChunkingConfig_FixedLengthChunking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_vertex_rag_data_proto_msgTypes[0].OneofWrappers = []any{ (*RagEmbeddingModelConfig_VertexPredictionEndpoint_)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/vertex_rag_data_service.pb.go b/aiplatform/apiv1/aiplatformpb/vertex_rag_data_service.pb.go index ef6a5cca7cce..2a5e5b838776 100755 --- a/aiplatform/apiv1/aiplatformpb/vertex_rag_data_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/vertex_rag_data_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/vertex_rag_data_service.proto @@ -59,11 +59,9 @@ type CreateRagCorpusRequest struct { func (x *CreateRagCorpusRequest) Reset() { *x = CreateRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRagCorpusRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateRagCorpusRequest) ProtoMessage() {} func (x *CreateRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetRagCorpusRequest struct { func (x *GetRagCorpusRequest) Reset() { *x = GetRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRagCorpusRequest) String() string { @@ -133,7 +129,7 @@ func (*GetRagCorpusRequest) ProtoMessage() {} func (x *GetRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type ListRagCorporaRequest struct { func (x *ListRagCorporaRequest) Reset() { *x = ListRagCorporaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagCorporaRequest) String() string { @@ -193,7 +187,7 @@ func (*ListRagCorporaRequest) ProtoMessage() {} func (x *ListRagCorporaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +241,9 @@ type ListRagCorporaResponse struct { func (x *ListRagCorporaResponse) Reset() { *x = ListRagCorporaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagCorporaResponse) String() string { @@ -262,7 +254,7 @@ func (*ListRagCorporaResponse) ProtoMessage() {} func (x *ListRagCorporaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +302,9 @@ type DeleteRagCorpusRequest struct { func (x *DeleteRagCorpusRequest) Reset() { *x = DeleteRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRagCorpusRequest) String() string { @@ -325,7 +315,7 @@ func (*DeleteRagCorpusRequest) ProtoMessage() {} func (x *DeleteRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +364,9 @@ type UploadRagFileRequest struct { func (x *UploadRagFileRequest) Reset() { *x = UploadRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileRequest) String() string { @@ -389,7 +377,7 @@ func (*UploadRagFileRequest) ProtoMessage() {} func (x *UploadRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +431,9 @@ type UploadRagFileResponse struct { func (x *UploadRagFileResponse) Reset() { *x = UploadRagFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileResponse) String() string { @@ -458,7 +444,7 @@ func (*UploadRagFileResponse) ProtoMessage() {} func (x *UploadRagFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +517,9 @@ type ImportRagFilesRequest struct { func (x *ImportRagFilesRequest) Reset() { *x = ImportRagFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesRequest) String() string { @@ -546,7 +530,7 @@ func (*ImportRagFilesRequest) ProtoMessage() {} func (x *ImportRagFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +583,9 @@ type ImportRagFilesResponse struct { func (x *ImportRagFilesResponse) Reset() { *x = ImportRagFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesResponse) String() string { @@ -614,7 +596,7 @@ func (*ImportRagFilesResponse) ProtoMessage() {} func (x *ImportRagFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +688,9 @@ type GetRagFileRequest struct { func (x *GetRagFileRequest) Reset() { *x = GetRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRagFileRequest) String() string { @@ -721,7 +701,7 @@ func (*GetRagFileRequest) ProtoMessage() {} func (x *GetRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +747,9 @@ type ListRagFilesRequest struct { func (x *ListRagFilesRequest) Reset() { *x = ListRagFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagFilesRequest) String() string { @@ -782,7 +760,7 @@ func (*ListRagFilesRequest) ProtoMessage() {} func (x *ListRagFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +814,9 @@ type ListRagFilesResponse struct { func (x *ListRagFilesResponse) Reset() { *x = ListRagFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagFilesResponse) String() string { @@ -851,7 +827,7 @@ func (*ListRagFilesResponse) ProtoMessage() {} func (x *ListRagFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +871,9 @@ type DeleteRagFileRequest struct { func (x *DeleteRagFileRequest) Reset() { *x = DeleteRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRagFileRequest) String() string { @@ -910,7 +884,7 @@ func (*DeleteRagFileRequest) ProtoMessage() {} func (x *DeleteRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +919,9 @@ type CreateRagCorpusOperationMetadata struct { func (x *CreateRagCorpusOperationMetadata) Reset() { *x = CreateRagCorpusOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRagCorpusOperationMetadata) String() string { @@ -960,7 +932,7 @@ func (*CreateRagCorpusOperationMetadata) ProtoMessage() {} func (x *CreateRagCorpusOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +967,9 @@ type UpdateRagCorpusRequest struct { func (x *UpdateRagCorpusRequest) Reset() { *x = UpdateRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRagCorpusRequest) String() string { @@ -1010,7 +980,7 @@ func (*UpdateRagCorpusRequest) ProtoMessage() {} func (x *UpdateRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1015,9 @@ type UpdateRagCorpusOperationMetadata struct { func (x *UpdateRagCorpusOperationMetadata) Reset() { *x = UpdateRagCorpusOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRagCorpusOperationMetadata) String() string { @@ -1060,7 +1028,7 @@ func (*UpdateRagCorpusOperationMetadata) ProtoMessage() {} func (x *UpdateRagCorpusOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1072,9 @@ type ImportRagFilesOperationMetadata struct { func (x *ImportRagFilesOperationMetadata) Reset() { *x = ImportRagFilesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesOperationMetadata) String() string { @@ -1119,7 +1085,7 @@ func (*ImportRagFilesOperationMetadata) ProtoMessage() {} func (x *ImportRagFilesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,212 +1575,6 @@ func file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_init() { } file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_vertex_rag_data_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRagCorporaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListRagCorporaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListRagFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListRagFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateRagCorpusOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRagCorpusOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_vertex_rag_data_service_proto_msgTypes[6].OneofWrappers = []any{ (*UploadRagFileResponse_RagFile)(nil), (*UploadRagFileResponse_Error)(nil), diff --git a/aiplatform/apiv1/aiplatformpb/vertex_rag_service.pb.go b/aiplatform/apiv1/aiplatformpb/vertex_rag_service.pb.go index 752c9c983af5..76c06209ce0c 100755 --- a/aiplatform/apiv1/aiplatformpb/vertex_rag_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/vertex_rag_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/vertex_rag_service.proto @@ -59,11 +59,9 @@ type RagQuery struct { func (x *RagQuery) Reset() { *x = RagQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagQuery) String() string { @@ -74,7 +72,7 @@ func (*RagQuery) ProtoMessage() {} func (x *RagQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +143,9 @@ type RetrieveContextsRequest struct { func (x *RetrieveContextsRequest) Reset() { *x = RetrieveContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest) String() string { @@ -160,7 +156,7 @@ func (*RetrieveContextsRequest) ProtoMessage() {} func (x *RetrieveContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type RagContexts struct { func (x *RagContexts) Reset() { *x = RagContexts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagContexts) String() string { @@ -241,7 +235,7 @@ func (*RagContexts) ProtoMessage() {} func (x *RagContexts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +270,9 @@ type RetrieveContextsResponse struct { func (x *RetrieveContextsResponse) Reset() { *x = RetrieveContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsResponse) String() string { @@ -291,7 +283,7 @@ func (*RetrieveContextsResponse) ProtoMessage() {} func (x *RetrieveContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +330,9 @@ type AugmentPromptRequest struct { func (x *AugmentPromptRequest) Reset() { *x = AugmentPromptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptRequest) String() string { @@ -353,7 +343,7 @@ func (*AugmentPromptRequest) ProtoMessage() {} func (x *AugmentPromptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +418,9 @@ type AugmentPromptResponse struct { func (x *AugmentPromptResponse) Reset() { *x = AugmentPromptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptResponse) String() string { @@ -443,7 +431,7 @@ func (*AugmentPromptResponse) ProtoMessage() {} func (x *AugmentPromptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type CorroborateContentRequest struct { func (x *CorroborateContentRequest) Reset() { *x = CorroborateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentRequest) String() string { @@ -511,7 +497,7 @@ func (*CorroborateContentRequest) ProtoMessage() {} func (x *CorroborateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +556,9 @@ type CorroborateContentResponse struct { func (x *CorroborateContentResponse) Reset() { *x = CorroborateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentResponse) String() string { @@ -585,7 +569,7 @@ func (*CorroborateContentResponse) ProtoMessage() {} func (x *CorroborateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +629,9 @@ type Fact struct { func (x *Fact) Reset() { *x = Fact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fact) String() string { @@ -660,7 +642,7 @@ func (*Fact) ProtoMessage() {} func (x *Fact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +718,9 @@ type Claim struct { func (x *Claim) Reset() { *x = Claim{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Claim) String() string { @@ -751,7 +731,7 @@ func (*Claim) ProtoMessage() {} func (x *Claim) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -814,11 +794,9 @@ type RetrieveContextsRequest_VertexRagStore struct { func (x *RetrieveContextsRequest_VertexRagStore) Reset() { *x = RetrieveContextsRequest_VertexRagStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest_VertexRagStore) String() string { @@ -829,7 +807,7 @@ func (*RetrieveContextsRequest_VertexRagStore) ProtoMessage() {} func (x *RetrieveContextsRequest_VertexRagStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +854,9 @@ type RetrieveContextsRequest_VertexRagStore_RagResource struct { func (x *RetrieveContextsRequest_VertexRagStore_RagResource) Reset() { *x = RetrieveContextsRequest_VertexRagStore_RagResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest_VertexRagStore_RagResource) String() string { @@ -891,7 +867,7 @@ func (*RetrieveContextsRequest_VertexRagStore_RagResource) ProtoMessage() {} func (x *RetrieveContextsRequest_VertexRagStore_RagResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +923,9 @@ type RagContexts_Context struct { func (x *RagContexts_Context) Reset() { *x = RagContexts_Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagContexts_Context) String() string { @@ -962,7 +936,7 @@ func (*RagContexts_Context) ProtoMessage() {} func (x *RagContexts_Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +994,9 @@ type AugmentPromptRequest_Model struct { func (x *AugmentPromptRequest_Model) Reset() { *x = AugmentPromptRequest_Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptRequest_Model) String() string { @@ -1035,7 +1007,7 @@ func (*AugmentPromptRequest_Model) ProtoMessage() {} func (x *AugmentPromptRequest_Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1049,9 @@ type CorroborateContentRequest_Parameters struct { func (x *CorroborateContentRequest_Parameters) Reset() { *x = CorroborateContentRequest_Parameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentRequest_Parameters) String() string { @@ -1092,7 +1062,7 @@ func (*CorroborateContentRequest_Parameters) ProtoMessage() {} func (x *CorroborateContentRequest_Parameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,188 +1409,6 @@ func file_google_cloud_aiplatform_v1_vertex_rag_service_proto_init() { } file_google_cloud_aiplatform_v1_content_proto_init() file_google_cloud_aiplatform_v1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RagQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RagContexts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Fact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Claim); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest_VertexRagStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest_VertexRagStore_RagResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RagContexts_Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptRequest_Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentRequest_Parameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1_vertex_rag_service_proto_msgTypes[0].OneofWrappers = []any{ (*RagQuery_Text)(nil), } diff --git a/aiplatform/apiv1/aiplatformpb/vizier_service.pb.go b/aiplatform/apiv1/aiplatformpb/vizier_service.pb.go index bc9e691e05af..2ee560319578 100755 --- a/aiplatform/apiv1/aiplatformpb/vizier_service.pb.go +++ b/aiplatform/apiv1/aiplatformpb/vizier_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1/vizier_service.proto @@ -57,11 +57,9 @@ type GetStudyRequest struct { func (x *GetStudyRequest) Reset() { *x = GetStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStudyRequest) String() string { @@ -72,7 +70,7 @@ func (*GetStudyRequest) ProtoMessage() {} func (x *GetStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type CreateStudyRequest struct { func (x *CreateStudyRequest) Reset() { *x = CreateStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStudyRequest) String() string { @@ -125,7 +121,7 @@ func (*CreateStudyRequest) ProtoMessage() {} func (x *CreateStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +170,9 @@ type ListStudiesRequest struct { func (x *ListStudiesRequest) Reset() { *x = ListStudiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudiesRequest) String() string { @@ -189,7 +183,7 @@ func (*ListStudiesRequest) ProtoMessage() {} func (x *ListStudiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type ListStudiesResponse struct { func (x *ListStudiesResponse) Reset() { *x = ListStudiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudiesResponse) String() string { @@ -257,7 +249,7 @@ func (*ListStudiesResponse) ProtoMessage() {} func (x *ListStudiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +292,9 @@ type DeleteStudyRequest struct { func (x *DeleteStudyRequest) Reset() { *x = DeleteStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStudyRequest) String() string { @@ -315,7 +305,7 @@ func (*DeleteStudyRequest) ProtoMessage() {} func (x *DeleteStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +343,9 @@ type LookupStudyRequest struct { func (x *LookupStudyRequest) Reset() { *x = LookupStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupStudyRequest) String() string { @@ -368,7 +356,7 @@ func (*LookupStudyRequest) ProtoMessage() {} func (x *LookupStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +455,9 @@ type SuggestTrialsRequest struct { func (x *SuggestTrialsRequest) Reset() { *x = SuggestTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsRequest) String() string { @@ -482,7 +468,7 @@ func (*SuggestTrialsRequest) ProtoMessage() {} func (x *SuggestTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +530,9 @@ type SuggestTrialsResponse struct { func (x *SuggestTrialsResponse) Reset() { *x = SuggestTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsResponse) String() string { @@ -559,7 +543,7 @@ func (*SuggestTrialsResponse) ProtoMessage() {} func (x *SuggestTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +604,9 @@ type SuggestTrialsMetadata struct { func (x *SuggestTrialsMetadata) Reset() { *x = SuggestTrialsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsMetadata) String() string { @@ -635,7 +617,7 @@ func (*SuggestTrialsMetadata) ProtoMessage() {} func (x *SuggestTrialsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +662,9 @@ type CreateTrialRequest struct { func (x *CreateTrialRequest) Reset() { *x = CreateTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTrialRequest) String() string { @@ -695,7 +675,7 @@ func (*CreateTrialRequest) ProtoMessage() {} func (x *CreateTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +719,9 @@ type GetTrialRequest struct { func (x *GetTrialRequest) Reset() { *x = GetTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTrialRequest) String() string { @@ -754,7 +732,7 @@ func (*GetTrialRequest) ProtoMessage() {} func (x *GetTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +774,9 @@ type ListTrialsRequest struct { func (x *ListTrialsRequest) Reset() { *x = ListTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrialsRequest) String() string { @@ -811,7 +787,7 @@ func (*ListTrialsRequest) ProtoMessage() {} func (x *ListTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +840,9 @@ type ListTrialsResponse struct { func (x *ListTrialsResponse) Reset() { *x = ListTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrialsResponse) String() string { @@ -879,7 +853,7 @@ func (*ListTrialsResponse) ProtoMessage() {} func (x *ListTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,11 +899,9 @@ type AddTrialMeasurementRequest struct { func (x *AddTrialMeasurementRequest) Reset() { *x = AddTrialMeasurementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddTrialMeasurementRequest) String() string { @@ -940,7 +912,7 @@ func (*AddTrialMeasurementRequest) ProtoMessage() {} func (x *AddTrialMeasurementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +966,9 @@ type CompleteTrialRequest struct { func (x *CompleteTrialRequest) Reset() { *x = CompleteTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteTrialRequest) String() string { @@ -1009,7 +979,7 @@ func (*CompleteTrialRequest) ProtoMessage() {} func (x *CompleteTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1037,9 @@ type DeleteTrialRequest struct { func (x *DeleteTrialRequest) Reset() { *x = DeleteTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTrialRequest) String() string { @@ -1082,7 +1050,7 @@ func (*DeleteTrialRequest) ProtoMessage() {} func (x *DeleteTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1119,11 +1087,9 @@ type CheckTrialEarlyStoppingStateRequest struct { func (x *CheckTrialEarlyStoppingStateRequest) Reset() { *x = CheckTrialEarlyStoppingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateRequest) String() string { @@ -1134,7 +1100,7 @@ func (*CheckTrialEarlyStoppingStateRequest) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1135,9 @@ type CheckTrialEarlyStoppingStateResponse struct { func (x *CheckTrialEarlyStoppingStateResponse) Reset() { *x = CheckTrialEarlyStoppingStateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateResponse) String() string { @@ -1184,7 +1148,7 @@ func (*CheckTrialEarlyStoppingStateResponse) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1224,11 +1188,9 @@ type CheckTrialEarlyStoppingStateMetatdata struct { func (x *CheckTrialEarlyStoppingStateMetatdata) Reset() { *x = CheckTrialEarlyStoppingStateMetatdata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateMetatdata) String() string { @@ -1239,7 +1201,7 @@ func (*CheckTrialEarlyStoppingStateMetatdata) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateMetatdata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1252,9 @@ type StopTrialRequest struct { func (x *StopTrialRequest) Reset() { *x = StopTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopTrialRequest) String() string { @@ -1305,7 +1265,7 @@ func (*StopTrialRequest) ProtoMessage() {} func (x *StopTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1300,9 @@ type ListOptimalTrialsRequest struct { func (x *ListOptimalTrialsRequest) Reset() { *x = ListOptimalTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOptimalTrialsRequest) String() string { @@ -1355,7 +1313,7 @@ func (*ListOptimalTrialsRequest) ProtoMessage() {} func (x *ListOptimalTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1351,9 @@ type ListOptimalTrialsResponse struct { func (x *ListOptimalTrialsResponse) Reset() { *x = ListOptimalTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOptimalTrialsResponse) String() string { @@ -1408,7 +1364,7 @@ func (*ListOptimalTrialsResponse) ProtoMessage() {} func (x *ListOptimalTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1952,272 +1908,6 @@ func file_google_cloud_aiplatform_v1_vizier_service_proto_init() { } file_google_cloud_aiplatform_v1_operation_proto_init() file_google_cloud_aiplatform_v1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListStudiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListStudiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LookupStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddTrialMeasurementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CompleteTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateMetatdata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StopTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListOptimalTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1_vizier_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListOptimalTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1/dataset_client.go b/aiplatform/apiv1/dataset_client.go index cf7e5bb2f063..c009feeefae3 100755 --- a/aiplatform/apiv1/dataset_client.go +++ b/aiplatform/apiv1/dataset_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -437,6 +438,8 @@ type datasetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDatasetClient creates a new dataset service client based on gRPC. @@ -463,6 +466,7 @@ func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*Datase connPool: connPool, datasetClient: aiplatformpb.NewDatasetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -519,7 +523,7 @@ func (c *datasetGRPCClient) CreateDataset(ctx context.Context, req *aiplatformpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -539,7 +543,7 @@ func (c *datasetGRPCClient) GetDataset(ctx context.Context, req *aiplatformpb.Ge var resp *aiplatformpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -557,7 +561,7 @@ func (c *datasetGRPCClient) UpdateDataset(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.UpdateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.UpdateDataset, req, settings.GRPC, c.logger, "UpdateDataset") return err }, opts...) if err != nil { @@ -586,7 +590,7 @@ func (c *datasetGRPCClient) ListDatasets(ctx context.Context, req *aiplatformpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -621,7 +625,7 @@ func (c *datasetGRPCClient) DeleteDataset(ctx context.Context, req *aiplatformpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) if err != nil { @@ -641,7 +645,7 @@ func (c *datasetGRPCClient) ImportData(ctx context.Context, req *aiplatformpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -661,7 +665,7 @@ func (c *datasetGRPCClient) ExportData(ctx context.Context, req *aiplatformpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -681,7 +685,7 @@ func (c *datasetGRPCClient) CreateDatasetVersion(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.CreateDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.CreateDatasetVersion, req, settings.GRPC, c.logger, "CreateDatasetVersion") return err }, opts...) if err != nil { @@ -701,7 +705,7 @@ func (c *datasetGRPCClient) UpdateDatasetVersion(ctx context.Context, req *aipla var resp *aiplatformpb.DatasetVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.UpdateDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.UpdateDatasetVersion, req, settings.GRPC, c.logger, "UpdateDatasetVersion") return err }, opts...) if err != nil { @@ -719,7 +723,7 @@ func (c *datasetGRPCClient) DeleteDatasetVersion(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteDatasetVersion, req, settings.GRPC, c.logger, "DeleteDatasetVersion") return err }, opts...) if err != nil { @@ -739,7 +743,7 @@ func (c *datasetGRPCClient) GetDatasetVersion(ctx context.Context, req *aiplatfo var resp *aiplatformpb.DatasetVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetDatasetVersion, req, settings.GRPC, c.logger, "GetDatasetVersion") return err }, opts...) if err != nil { @@ -768,7 +772,7 @@ func (c *datasetGRPCClient) ListDatasetVersions(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDatasetVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDatasetVersions, req, settings.GRPC, c.logger, "ListDatasetVersions") return err }, opts...) if err != nil { @@ -803,7 +807,7 @@ func (c *datasetGRPCClient) RestoreDatasetVersion(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.RestoreDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.RestoreDatasetVersion, req, settings.GRPC, c.logger, "RestoreDatasetVersion") return err }, opts...) if err != nil { @@ -834,7 +838,7 @@ func (c *datasetGRPCClient) ListDataItems(ctx context.Context, req *aiplatformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDataItems, req, settings.GRPC, c.logger, "ListDataItems") return err }, opts...) if err != nil { @@ -880,7 +884,7 @@ func (c *datasetGRPCClient) SearchDataItems(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.SearchDataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.SearchDataItems, req, settings.GRPC, c.logger, "SearchDataItems") return err }, opts...) if err != nil { @@ -926,7 +930,7 @@ func (c *datasetGRPCClient) ListSavedQueries(ctx context.Context, req *aiplatfor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListSavedQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListSavedQueries, req, settings.GRPC, c.logger, "ListSavedQueries") return err }, opts...) if err != nil { @@ -961,7 +965,7 @@ func (c *datasetGRPCClient) DeleteSavedQuery(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteSavedQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteSavedQuery, req, settings.GRPC, c.logger, "DeleteSavedQuery") return err }, opts...) if err != nil { @@ -981,7 +985,7 @@ func (c *datasetGRPCClient) GetAnnotationSpec(ctx context.Context, req *aiplatfo var resp *aiplatformpb.AnnotationSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetAnnotationSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetAnnotationSpec, req, settings.GRPC, c.logger, "GetAnnotationSpec") return err }, opts...) if err != nil { @@ -1010,7 +1014,7 @@ func (c *datasetGRPCClient) ListAnnotations(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListAnnotations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListAnnotations, req, settings.GRPC, c.logger, "ListAnnotations") return err }, opts...) if err != nil { @@ -1045,7 +1049,7 @@ func (c *datasetGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1074,7 +1078,7 @@ func (c *datasetGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1109,7 +1113,7 @@ func (c *datasetGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1127,7 +1131,7 @@ func (c *datasetGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1145,7 +1149,7 @@ func (c *datasetGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1162,7 +1166,7 @@ func (c *datasetGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1176,7 +1180,7 @@ func (c *datasetGRPCClient) DeleteOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1191,7 +1195,7 @@ func (c *datasetGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1220,7 +1224,7 @@ func (c *datasetGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1255,7 +1259,7 @@ func (c *datasetGRPCClient) WaitOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/dataset_client_example_go123_test.go b/aiplatform/apiv1/dataset_client_example_go123_test.go index b1f17711cd26..b756103ea72d 100644 --- a/aiplatform/apiv1/dataset_client_example_go123_test.go +++ b/aiplatform/apiv1/dataset_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDatasetClient_ListAnnotations_all() { } for resp, err := range c.ListAnnotations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDatasetClient_ListDataItems_all() { } for resp, err := range c.ListDataItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDatasetClient_ListDatasetVersions_all() { } for resp, err := range c.ListDatasetVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDatasetClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDatasetClient_ListSavedQueries_all() { } for resp, err := range c.ListSavedQueries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleDatasetClient_SearchDataItems_all() { } for resp, err := range c.SearchDataItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleDatasetClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleDatasetClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/deployment_resource_pool_client.go b/aiplatform/apiv1/deployment_resource_pool_client.go index db79eef0f4db..79f6bfea0fd1 100755 --- a/aiplatform/apiv1/deployment_resource_pool_client.go +++ b/aiplatform/apiv1/deployment_resource_pool_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -296,6 +297,8 @@ type deploymentResourcePoolGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDeploymentResourcePoolClient creates a new deployment resource pool service client based on gRPC. @@ -322,6 +325,7 @@ func NewDeploymentResourcePoolClient(ctx context.Context, opts ...option.ClientO connPool: connPool, deploymentResourcePoolClient: aiplatformpb.NewDeploymentResourcePoolServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -378,7 +382,7 @@ func (c *deploymentResourcePoolGRPCClient) CreateDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.CreateDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.CreateDeploymentResourcePool, req, settings.GRPC, c.logger, "CreateDeploymentResourcePool") return err }, opts...) if err != nil { @@ -398,7 +402,7 @@ func (c *deploymentResourcePoolGRPCClient) GetDeploymentResourcePool(ctx context var resp *aiplatformpb.DeploymentResourcePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.GetDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.GetDeploymentResourcePool, req, settings.GRPC, c.logger, "GetDeploymentResourcePool") return err }, opts...) if err != nil { @@ -427,7 +431,7 @@ func (c *deploymentResourcePoolGRPCClient) ListDeploymentResourcePools(ctx conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.ListDeploymentResourcePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.ListDeploymentResourcePools, req, settings.GRPC, c.logger, "ListDeploymentResourcePools") return err }, opts...) if err != nil { @@ -462,7 +466,7 @@ func (c *deploymentResourcePoolGRPCClient) UpdateDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.UpdateDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.UpdateDeploymentResourcePool, req, settings.GRPC, c.logger, "UpdateDeploymentResourcePool") return err }, opts...) if err != nil { @@ -482,7 +486,7 @@ func (c *deploymentResourcePoolGRPCClient) DeleteDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.DeleteDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.DeleteDeploymentResourcePool, req, settings.GRPC, c.logger, "DeleteDeploymentResourcePool") return err }, opts...) if err != nil { @@ -513,7 +517,7 @@ func (c *deploymentResourcePoolGRPCClient) QueryDeployedModels(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.QueryDeployedModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.QueryDeployedModels, req, settings.GRPC, c.logger, "QueryDeployedModels") return err }, opts...) if err != nil { @@ -548,7 +552,7 @@ func (c *deploymentResourcePoolGRPCClient) GetLocation(ctx context.Context, req var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -577,7 +581,7 @@ func (c *deploymentResourcePoolGRPCClient) ListLocations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -612,7 +616,7 @@ func (c *deploymentResourcePoolGRPCClient) GetIamPolicy(ctx context.Context, req var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -630,7 +634,7 @@ func (c *deploymentResourcePoolGRPCClient) SetIamPolicy(ctx context.Context, req var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -648,7 +652,7 @@ func (c *deploymentResourcePoolGRPCClient) TestIamPermissions(ctx context.Contex var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -665,7 +669,7 @@ func (c *deploymentResourcePoolGRPCClient) CancelOperation(ctx context.Context, opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -679,7 +683,7 @@ func (c *deploymentResourcePoolGRPCClient) DeleteOperation(ctx context.Context, opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -694,7 +698,7 @@ func (c *deploymentResourcePoolGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -723,7 +727,7 @@ func (c *deploymentResourcePoolGRPCClient) ListOperations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -758,7 +762,7 @@ func (c *deploymentResourcePoolGRPCClient) WaitOperation(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/deployment_resource_pool_client_example_go123_test.go b/aiplatform/apiv1/deployment_resource_pool_client_example_go123_test.go index c8a569e88c0a..1cf17c97c20f 100644 --- a/aiplatform/apiv1/deployment_resource_pool_client_example_go123_test.go +++ b/aiplatform/apiv1/deployment_resource_pool_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDeploymentResourcePoolClient_ListDeploymentResourcePools_all() { } for resp, err := range c.ListDeploymentResourcePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDeploymentResourcePoolClient_QueryDeployedModels_all() { } for resp, err := range c.QueryDeployedModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDeploymentResourcePoolClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDeploymentResourcePoolClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/endpoint_client.go b/aiplatform/apiv1/endpoint_client.go index 23e4db9bf2ca..ff6154a5e780 100755 --- a/aiplatform/apiv1/endpoint_client.go +++ b/aiplatform/apiv1/endpoint_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -345,6 +346,8 @@ type endpointGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEndpointClient creates a new endpoint service client based on gRPC. @@ -371,6 +374,7 @@ func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*Endpo connPool: connPool, endpointClient: aiplatformpb.NewEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -427,7 +431,7 @@ func (c *endpointGRPCClient) CreateEndpoint(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.CreateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.CreateEndpoint, req, settings.GRPC, c.logger, "CreateEndpoint") return err }, opts...) if err != nil { @@ -447,7 +451,7 @@ func (c *endpointGRPCClient) GetEndpoint(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.GetEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.GetEndpoint, req, settings.GRPC, c.logger, "GetEndpoint") return err }, opts...) if err != nil { @@ -476,7 +480,7 @@ func (c *endpointGRPCClient) ListEndpoints(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.ListEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.ListEndpoints, req, settings.GRPC, c.logger, "ListEndpoints") return err }, opts...) if err != nil { @@ -511,7 +515,7 @@ func (c *endpointGRPCClient) UpdateEndpoint(ctx context.Context, req *aiplatform var resp *aiplatformpb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UpdateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UpdateEndpoint, req, settings.GRPC, c.logger, "UpdateEndpoint") return err }, opts...) if err != nil { @@ -529,7 +533,7 @@ func (c *endpointGRPCClient) UpdateEndpointLongRunning(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UpdateEndpointLongRunning(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UpdateEndpointLongRunning, req, settings.GRPC, c.logger, "UpdateEndpointLongRunning") return err }, opts...) if err != nil { @@ -549,7 +553,7 @@ func (c *endpointGRPCClient) DeleteEndpoint(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.DeleteEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.DeleteEndpoint, req, settings.GRPC, c.logger, "DeleteEndpoint") return err }, opts...) if err != nil { @@ -569,7 +573,7 @@ func (c *endpointGRPCClient) DeployModel(ctx context.Context, req *aiplatformpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.DeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.DeployModel, req, settings.GRPC, c.logger, "DeployModel") return err }, opts...) if err != nil { @@ -589,7 +593,7 @@ func (c *endpointGRPCClient) UndeployModel(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UndeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UndeployModel, req, settings.GRPC, c.logger, "UndeployModel") return err }, opts...) if err != nil { @@ -609,7 +613,7 @@ func (c *endpointGRPCClient) MutateDeployedModel(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.MutateDeployedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.MutateDeployedModel, req, settings.GRPC, c.logger, "MutateDeployedModel") return err }, opts...) if err != nil { @@ -629,7 +633,7 @@ func (c *endpointGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -658,7 +662,7 @@ func (c *endpointGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -693,7 +697,7 @@ func (c *endpointGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -711,7 +715,7 @@ func (c *endpointGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -729,7 +733,7 @@ func (c *endpointGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -746,7 +750,7 @@ func (c *endpointGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -760,7 +764,7 @@ func (c *endpointGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -775,7 +779,7 @@ func (c *endpointGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -804,7 +808,7 @@ func (c *endpointGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -839,7 +843,7 @@ func (c *endpointGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/endpoint_client_example_go123_test.go b/aiplatform/apiv1/endpoint_client_example_go123_test.go index eb8d1f94ae94..d423cdf7f920 100644 --- a/aiplatform/apiv1/endpoint_client_example_go123_test.go +++ b/aiplatform/apiv1/endpoint_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEndpointClient_ListEndpoints_all() { } for resp, err := range c.ListEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEndpointClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEndpointClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/evaluation_client.go b/aiplatform/apiv1/evaluation_client.go index d0ff6981653f..8d203e35f901 100755 --- a/aiplatform/apiv1/evaluation_client.go +++ b/aiplatform/apiv1/evaluation_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -223,6 +224,8 @@ type evaluationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEvaluationClient creates a new evaluation service client based on gRPC. @@ -249,6 +252,7 @@ func NewEvaluationClient(ctx context.Context, opts ...option.ClientOption) (*Eva connPool: connPool, evaluationClient: aiplatformpb.NewEvaluationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -294,7 +298,7 @@ func (c *evaluationGRPCClient) EvaluateInstances(ctx context.Context, req *aipla var resp *aiplatformpb.EvaluateInstancesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.EvaluateInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.EvaluateInstances, req, settings.GRPC, c.logger, "EvaluateInstances") return err }, opts...) if err != nil { @@ -312,7 +316,7 @@ func (c *evaluationGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -341,7 +345,7 @@ func (c *evaluationGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -376,7 +380,7 @@ func (c *evaluationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -394,7 +398,7 @@ func (c *evaluationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -412,7 +416,7 @@ func (c *evaluationGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -429,7 +433,7 @@ func (c *evaluationGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -443,7 +447,7 @@ func (c *evaluationGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -458,7 +462,7 @@ func (c *evaluationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -487,7 +491,7 @@ func (c *evaluationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -522,7 +526,7 @@ func (c *evaluationGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/evaluation_client_example_go123_test.go b/aiplatform/apiv1/evaluation_client_example_go123_test.go index b8fb19a4744d..ba7edfcfb241 100644 --- a/aiplatform/apiv1/evaluation_client_example_go123_test.go +++ b/aiplatform/apiv1/evaluation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEvaluationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEvaluationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/feature_online_store_admin_client.go b/aiplatform/apiv1/feature_online_store_admin_client.go index 9b1ee77b7e56..b65e51758cb7 100755 --- a/aiplatform/apiv1/feature_online_store_admin_client.go +++ b/aiplatform/apiv1/feature_online_store_admin_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -375,6 +376,8 @@ type featureOnlineStoreAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureOnlineStoreAdminClient creates a new feature online store admin service client based on gRPC. @@ -402,6 +405,7 @@ func NewFeatureOnlineStoreAdminClient(ctx context.Context, opts ...option.Client connPool: connPool, featureOnlineStoreAdminClient: aiplatformpb.NewFeatureOnlineStoreAdminServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -458,7 +462,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CreateFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.CreateFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.CreateFeatureOnlineStore, req, settings.GRPC, c.logger, "CreateFeatureOnlineStore") return err }, opts...) if err != nil { @@ -478,7 +482,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureOnlineStore(ctx context.Co var resp *aiplatformpb.FeatureOnlineStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureOnlineStore, req, settings.GRPC, c.logger, "GetFeatureOnlineStore") return err }, opts...) if err != nil { @@ -507,7 +511,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureOnlineStores(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureOnlineStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureOnlineStores, req, settings.GRPC, c.logger, "ListFeatureOnlineStores") return err }, opts...) if err != nil { @@ -542,7 +546,7 @@ func (c *featureOnlineStoreAdminGRPCClient) UpdateFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.UpdateFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.UpdateFeatureOnlineStore, req, settings.GRPC, c.logger, "UpdateFeatureOnlineStore") return err }, opts...) if err != nil { @@ -562,7 +566,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.DeleteFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.DeleteFeatureOnlineStore, req, settings.GRPC, c.logger, "DeleteFeatureOnlineStore") return err }, opts...) if err != nil { @@ -582,7 +586,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CreateFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.CreateFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.CreateFeatureView, req, settings.GRPC, c.logger, "CreateFeatureView") return err }, opts...) if err != nil { @@ -602,7 +606,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureView(ctx context.Context, var resp *aiplatformpb.FeatureView err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureView, req, settings.GRPC, c.logger, "GetFeatureView") return err }, opts...) if err != nil { @@ -631,7 +635,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureViews(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureViews(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureViews, req, settings.GRPC, c.logger, "ListFeatureViews") return err }, opts...) if err != nil { @@ -666,7 +670,7 @@ func (c *featureOnlineStoreAdminGRPCClient) UpdateFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.UpdateFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.UpdateFeatureView, req, settings.GRPC, c.logger, "UpdateFeatureView") return err }, opts...) if err != nil { @@ -686,7 +690,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.DeleteFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.DeleteFeatureView, req, settings.GRPC, c.logger, "DeleteFeatureView") return err }, opts...) if err != nil { @@ -706,7 +710,7 @@ func (c *featureOnlineStoreAdminGRPCClient) SyncFeatureView(ctx context.Context, var resp *aiplatformpb.SyncFeatureViewResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.SyncFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.SyncFeatureView, req, settings.GRPC, c.logger, "SyncFeatureView") return err }, opts...) if err != nil { @@ -724,7 +728,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureViewSync(ctx context.Conte var resp *aiplatformpb.FeatureViewSync err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureViewSync(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureViewSync, req, settings.GRPC, c.logger, "GetFeatureViewSync") return err }, opts...) if err != nil { @@ -753,7 +757,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureViewSyncs(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureViewSyncs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureViewSyncs, req, settings.GRPC, c.logger, "ListFeatureViewSyncs") return err }, opts...) if err != nil { @@ -788,7 +792,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetLocation(ctx context.Context, req var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -817,7 +821,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListLocations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -852,7 +856,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -870,7 +874,7 @@ func (c *featureOnlineStoreAdminGRPCClient) SetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -888,7 +892,7 @@ func (c *featureOnlineStoreAdminGRPCClient) TestIamPermissions(ctx context.Conte var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -905,7 +909,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CancelOperation(ctx context.Context, opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -919,7 +923,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteOperation(ctx context.Context, opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -934,7 +938,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetOperation(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -963,7 +967,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListOperations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -998,7 +1002,7 @@ func (c *featureOnlineStoreAdminGRPCClient) WaitOperation(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/feature_online_store_admin_client_example_go123_test.go b/aiplatform/apiv1/feature_online_store_admin_client_example_go123_test.go index 17b6c4710aa8..59514fb2287e 100644 --- a/aiplatform/apiv1/feature_online_store_admin_client_example_go123_test.go +++ b/aiplatform/apiv1/feature_online_store_admin_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureOnlineStores_all() { } for resp, err := range c.ListFeatureOnlineStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureViewSyncs_all() { } for resp, err := range c.ListFeatureViewSyncs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureViews_all() { } for resp, err := range c.ListFeatureViews(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/feature_online_store_client.go b/aiplatform/apiv1/feature_online_store_client.go index 65d1afe26746..31ac5612a3a8 100755 --- a/aiplatform/apiv1/feature_online_store_client.go +++ b/aiplatform/apiv1/feature_online_store_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -233,6 +234,8 @@ type featureOnlineStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureOnlineStoreClient creates a new feature online store service client based on gRPC. @@ -259,6 +262,7 @@ func NewFeatureOnlineStoreClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, featureOnlineStoreClient: aiplatformpb.NewFeatureOnlineStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -304,7 +308,7 @@ func (c *featureOnlineStoreGRPCClient) FetchFeatureValues(ctx context.Context, r var resp *aiplatformpb.FetchFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreClient.FetchFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreClient.FetchFeatureValues, req, settings.GRPC, c.logger, "FetchFeatureValues") return err }, opts...) if err != nil { @@ -322,7 +326,7 @@ func (c *featureOnlineStoreGRPCClient) SearchNearestEntities(ctx context.Context var resp *aiplatformpb.SearchNearestEntitiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreClient.SearchNearestEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreClient.SearchNearestEntities, req, settings.GRPC, c.logger, "SearchNearestEntities") return err }, opts...) if err != nil { @@ -340,7 +344,7 @@ func (c *featureOnlineStoreGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -369,7 +373,7 @@ func (c *featureOnlineStoreGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -404,7 +408,7 @@ func (c *featureOnlineStoreGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -422,7 +426,7 @@ func (c *featureOnlineStoreGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -440,7 +444,7 @@ func (c *featureOnlineStoreGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -457,7 +461,7 @@ func (c *featureOnlineStoreGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -471,7 +475,7 @@ func (c *featureOnlineStoreGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -486,7 +490,7 @@ func (c *featureOnlineStoreGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -515,7 +519,7 @@ func (c *featureOnlineStoreGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -550,7 +554,7 @@ func (c *featureOnlineStoreGRPCClient) WaitOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/feature_online_store_client_example_go123_test.go b/aiplatform/apiv1/feature_online_store_client_example_go123_test.go index e6f2f77b97d5..0b9632903714 100644 --- a/aiplatform/apiv1/feature_online_store_client_example_go123_test.go +++ b/aiplatform/apiv1/feature_online_store_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFeatureOnlineStoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFeatureOnlineStoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/feature_registry_client.go b/aiplatform/apiv1/feature_registry_client.go index de300324909a..1b3d4647ef8b 100755 --- a/aiplatform/apiv1/feature_registry_client.go +++ b/aiplatform/apiv1/feature_registry_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -365,6 +366,8 @@ type featureRegistryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureRegistryClient creates a new feature registry service client based on gRPC. @@ -392,6 +395,7 @@ func NewFeatureRegistryClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, featureRegistryClient: aiplatformpb.NewFeatureRegistryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -448,7 +452,7 @@ func (c *featureRegistryGRPCClient) CreateFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeatureGroup, req, settings.GRPC, c.logger, "CreateFeatureGroup") return err }, opts...) if err != nil { @@ -468,7 +472,7 @@ func (c *featureRegistryGRPCClient) GetFeatureGroup(ctx context.Context, req *ai var resp *aiplatformpb.FeatureGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeatureGroup, req, settings.GRPC, c.logger, "GetFeatureGroup") return err }, opts...) if err != nil { @@ -497,7 +501,7 @@ func (c *featureRegistryGRPCClient) ListFeatureGroups(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatureGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatureGroups, req, settings.GRPC, c.logger, "ListFeatureGroups") return err }, opts...) if err != nil { @@ -532,7 +536,7 @@ func (c *featureRegistryGRPCClient) UpdateFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.UpdateFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.UpdateFeatureGroup, req, settings.GRPC, c.logger, "UpdateFeatureGroup") return err }, opts...) if err != nil { @@ -552,7 +556,7 @@ func (c *featureRegistryGRPCClient) DeleteFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.DeleteFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.DeleteFeatureGroup, req, settings.GRPC, c.logger, "DeleteFeatureGroup") return err }, opts...) if err != nil { @@ -572,7 +576,7 @@ func (c *featureRegistryGRPCClient) CreateFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeature, req, settings.GRPC, c.logger, "CreateFeature") return err }, opts...) if err != nil { @@ -592,7 +596,7 @@ func (c *featureRegistryGRPCClient) BatchCreateFeatures(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.BatchCreateFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.BatchCreateFeatures, req, settings.GRPC, c.logger, "BatchCreateFeatures") return err }, opts...) if err != nil { @@ -612,7 +616,7 @@ func (c *featureRegistryGRPCClient) GetFeature(ctx context.Context, req *aiplatf var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeature, req, settings.GRPC, c.logger, "GetFeature") return err }, opts...) if err != nil { @@ -641,7 +645,7 @@ func (c *featureRegistryGRPCClient) ListFeatures(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatures, req, settings.GRPC, c.logger, "ListFeatures") return err }, opts...) if err != nil { @@ -676,7 +680,7 @@ func (c *featureRegistryGRPCClient) UpdateFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.UpdateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.UpdateFeature, req, settings.GRPC, c.logger, "UpdateFeature") return err }, opts...) if err != nil { @@ -696,7 +700,7 @@ func (c *featureRegistryGRPCClient) DeleteFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.DeleteFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.DeleteFeature, req, settings.GRPC, c.logger, "DeleteFeature") return err }, opts...) if err != nil { @@ -716,7 +720,7 @@ func (c *featureRegistryGRPCClient) GetLocation(ctx context.Context, req *locati var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -745,7 +749,7 @@ func (c *featureRegistryGRPCClient) ListLocations(ctx context.Context, req *loca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -780,7 +784,7 @@ func (c *featureRegistryGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -798,7 +802,7 @@ func (c *featureRegistryGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -816,7 +820,7 @@ func (c *featureRegistryGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -833,7 +837,7 @@ func (c *featureRegistryGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -847,7 +851,7 @@ func (c *featureRegistryGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -862,7 +866,7 @@ func (c *featureRegistryGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -891,7 +895,7 @@ func (c *featureRegistryGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -926,7 +930,7 @@ func (c *featureRegistryGRPCClient) WaitOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/feature_registry_client_example_go123_test.go b/aiplatform/apiv1/feature_registry_client_example_go123_test.go index 0960cdac1df9..d6f7fb6da70c 100644 --- a/aiplatform/apiv1/feature_registry_client_example_go123_test.go +++ b/aiplatform/apiv1/feature_registry_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeatureRegistryClient_ListFeatureGroups_all() { } for resp, err := range c.ListFeatureGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeatureRegistryClient_ListFeatures_all() { } for resp, err := range c.ListFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeatureRegistryClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeatureRegistryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/featurestore_client.go b/aiplatform/apiv1/featurestore_client.go index 2b7c68799fa4..423657382ed5 100755 --- a/aiplatform/apiv1/featurestore_client.go +++ b/aiplatform/apiv1/featurestore_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -516,6 +517,8 @@ type featurestoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeaturestoreClient creates a new featurestore service client based on gRPC. @@ -542,6 +545,7 @@ func NewFeaturestoreClient(ctx context.Context, opts ...option.ClientOption) (*F connPool: connPool, featurestoreClient: aiplatformpb.NewFeaturestoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -598,7 +602,7 @@ func (c *featurestoreGRPCClient) CreateFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateFeaturestore, req, settings.GRPC, c.logger, "CreateFeaturestore") return err }, opts...) if err != nil { @@ -618,7 +622,7 @@ func (c *featurestoreGRPCClient) GetFeaturestore(ctx context.Context, req *aipla var resp *aiplatformpb.Featurestore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetFeaturestore, req, settings.GRPC, c.logger, "GetFeaturestore") return err }, opts...) if err != nil { @@ -647,7 +651,7 @@ func (c *featurestoreGRPCClient) ListFeaturestores(ctx context.Context, req *aip } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListFeaturestores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListFeaturestores, req, settings.GRPC, c.logger, "ListFeaturestores") return err }, opts...) if err != nil { @@ -682,7 +686,7 @@ func (c *featurestoreGRPCClient) UpdateFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateFeaturestore, req, settings.GRPC, c.logger, "UpdateFeaturestore") return err }, opts...) if err != nil { @@ -702,7 +706,7 @@ func (c *featurestoreGRPCClient) DeleteFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeaturestore, req, settings.GRPC, c.logger, "DeleteFeaturestore") return err }, opts...) if err != nil { @@ -722,7 +726,7 @@ func (c *featurestoreGRPCClient) CreateEntityType(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -742,7 +746,7 @@ func (c *featurestoreGRPCClient) GetEntityType(ctx context.Context, req *aiplatf var resp *aiplatformpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -771,7 +775,7 @@ func (c *featurestoreGRPCClient) ListEntityTypes(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -806,7 +810,7 @@ func (c *featurestoreGRPCClient) UpdateEntityType(ctx context.Context, req *aipl var resp *aiplatformpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -824,7 +828,7 @@ func (c *featurestoreGRPCClient) DeleteEntityType(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) if err != nil { @@ -844,7 +848,7 @@ func (c *featurestoreGRPCClient) CreateFeature(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateFeature, req, settings.GRPC, c.logger, "CreateFeature") return err }, opts...) if err != nil { @@ -864,7 +868,7 @@ func (c *featurestoreGRPCClient) BatchCreateFeatures(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.BatchCreateFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.BatchCreateFeatures, req, settings.GRPC, c.logger, "BatchCreateFeatures") return err }, opts...) if err != nil { @@ -884,7 +888,7 @@ func (c *featurestoreGRPCClient) GetFeature(ctx context.Context, req *aiplatform var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetFeature, req, settings.GRPC, c.logger, "GetFeature") return err }, opts...) if err != nil { @@ -913,7 +917,7 @@ func (c *featurestoreGRPCClient) ListFeatures(ctx context.Context, req *aiplatfo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListFeatures, req, settings.GRPC, c.logger, "ListFeatures") return err }, opts...) if err != nil { @@ -948,7 +952,7 @@ func (c *featurestoreGRPCClient) UpdateFeature(ctx context.Context, req *aiplatf var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateFeature, req, settings.GRPC, c.logger, "UpdateFeature") return err }, opts...) if err != nil { @@ -966,7 +970,7 @@ func (c *featurestoreGRPCClient) DeleteFeature(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeature, req, settings.GRPC, c.logger, "DeleteFeature") return err }, opts...) if err != nil { @@ -986,7 +990,7 @@ func (c *featurestoreGRPCClient) ImportFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ImportFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ImportFeatureValues, req, settings.GRPC, c.logger, "ImportFeatureValues") return err }, opts...) if err != nil { @@ -1006,7 +1010,7 @@ func (c *featurestoreGRPCClient) BatchReadFeatureValues(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.BatchReadFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.BatchReadFeatureValues, req, settings.GRPC, c.logger, "BatchReadFeatureValues") return err }, opts...) if err != nil { @@ -1026,7 +1030,7 @@ func (c *featurestoreGRPCClient) ExportFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ExportFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ExportFeatureValues, req, settings.GRPC, c.logger, "ExportFeatureValues") return err }, opts...) if err != nil { @@ -1046,7 +1050,7 @@ func (c *featurestoreGRPCClient) DeleteFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeatureValues, req, settings.GRPC, c.logger, "DeleteFeatureValues") return err }, opts...) if err != nil { @@ -1077,7 +1081,7 @@ func (c *featurestoreGRPCClient) SearchFeatures(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.SearchFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.SearchFeatures, req, settings.GRPC, c.logger, "SearchFeatures") return err }, opts...) if err != nil { @@ -1112,7 +1116,7 @@ func (c *featurestoreGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1141,7 +1145,7 @@ func (c *featurestoreGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1176,7 +1180,7 @@ func (c *featurestoreGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1194,7 +1198,7 @@ func (c *featurestoreGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1212,7 +1216,7 @@ func (c *featurestoreGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1229,7 +1233,7 @@ func (c *featurestoreGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1243,7 +1247,7 @@ func (c *featurestoreGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1258,7 +1262,7 @@ func (c *featurestoreGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1287,7 +1291,7 @@ func (c *featurestoreGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1322,7 +1326,7 @@ func (c *featurestoreGRPCClient) WaitOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/featurestore_client_example_go123_test.go b/aiplatform/apiv1/featurestore_client_example_go123_test.go index 06592ce9f7fe..f0b63275c07d 100644 --- a/aiplatform/apiv1/featurestore_client_example_go123_test.go +++ b/aiplatform/apiv1/featurestore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeaturestoreClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeaturestoreClient_ListFeatures_all() { } for resp, err := range c.ListFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeaturestoreClient_ListFeaturestores_all() { } for resp, err := range c.ListFeaturestores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeaturestoreClient_SearchFeatures_all() { } for resp, err := range c.SearchFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleFeaturestoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleFeaturestoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/featurestore_online_serving_client.go b/aiplatform/apiv1/featurestore_online_serving_client.go index 83128b01eb21..c87905ecad31 100755 --- a/aiplatform/apiv1/featurestore_online_serving_client.go +++ b/aiplatform/apiv1/featurestore_online_serving_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -247,6 +248,8 @@ type featurestoreOnlineServingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeaturestoreOnlineServingClient creates a new featurestore online serving service client based on gRPC. @@ -273,6 +276,7 @@ func NewFeaturestoreOnlineServingClient(ctx context.Context, opts ...option.Clie connPool: connPool, featurestoreOnlineServingClient: aiplatformpb.NewFeaturestoreOnlineServingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -318,7 +322,7 @@ func (c *featurestoreOnlineServingGRPCClient) ReadFeatureValues(ctx context.Cont var resp *aiplatformpb.ReadFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreOnlineServingClient.ReadFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreOnlineServingClient.ReadFeatureValues, req, settings.GRPC, c.logger, "ReadFeatureValues") return err }, opts...) if err != nil { @@ -336,7 +340,9 @@ func (c *featurestoreOnlineServingGRPCClient) StreamingReadFeatureValues(ctx con var resp aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingReadFeatureValues") resp, err = c.featurestoreOnlineServingClient.StreamingReadFeatureValues(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingReadFeatureValues") return err }, opts...) if err != nil { @@ -354,7 +360,7 @@ func (c *featurestoreOnlineServingGRPCClient) WriteFeatureValues(ctx context.Con var resp *aiplatformpb.WriteFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreOnlineServingClient.WriteFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreOnlineServingClient.WriteFeatureValues, req, settings.GRPC, c.logger, "WriteFeatureValues") return err }, opts...) if err != nil { @@ -372,7 +378,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetLocation(ctx context.Context, r var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -401,7 +407,7 @@ func (c *featurestoreOnlineServingGRPCClient) ListLocations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -436,7 +442,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -454,7 +460,7 @@ func (c *featurestoreOnlineServingGRPCClient) SetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -472,7 +478,7 @@ func (c *featurestoreOnlineServingGRPCClient) TestIamPermissions(ctx context.Con var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -489,7 +495,7 @@ func (c *featurestoreOnlineServingGRPCClient) CancelOperation(ctx context.Contex opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -503,7 +509,7 @@ func (c *featurestoreOnlineServingGRPCClient) DeleteOperation(ctx context.Contex opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -518,7 +524,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -547,7 +553,7 @@ func (c *featurestoreOnlineServingGRPCClient) ListOperations(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -582,7 +588,7 @@ func (c *featurestoreOnlineServingGRPCClient) WaitOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/featurestore_online_serving_client_example_go123_test.go b/aiplatform/apiv1/featurestore_online_serving_client_example_go123_test.go index e78d1b02ae94..4b4f2b391b35 100644 --- a/aiplatform/apiv1/featurestore_online_serving_client_example_go123_test.go +++ b/aiplatform/apiv1/featurestore_online_serving_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFeaturestoreOnlineServingClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFeaturestoreOnlineServingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/gen_ai_tuning_client.go b/aiplatform/apiv1/gen_ai_tuning_client.go index 395ecd3e6170..acf354c0b3af 100755 --- a/aiplatform/apiv1/gen_ai_tuning_client.go +++ b/aiplatform/apiv1/gen_ai_tuning_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -286,6 +287,8 @@ type genAiTuningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenAiTuningClient creates a new gen ai tuning service client based on gRPC. @@ -312,6 +315,7 @@ func NewGenAiTuningClient(ctx context.Context, opts ...option.ClientOption) (*Ge connPool: connPool, genAiTuningClient: aiplatformpb.NewGenAiTuningServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -368,7 +372,7 @@ func (c *genAiTuningGRPCClient) CreateTuningJob(ctx context.Context, req *aiplat var resp *aiplatformpb.TuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.CreateTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.CreateTuningJob, req, settings.GRPC, c.logger, "CreateTuningJob") return err }, opts...) if err != nil { @@ -386,7 +390,7 @@ func (c *genAiTuningGRPCClient) GetTuningJob(ctx context.Context, req *aiplatfor var resp *aiplatformpb.TuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.GetTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.GetTuningJob, req, settings.GRPC, c.logger, "GetTuningJob") return err }, opts...) if err != nil { @@ -415,7 +419,7 @@ func (c *genAiTuningGRPCClient) ListTuningJobs(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.ListTuningJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.ListTuningJobs, req, settings.GRPC, c.logger, "ListTuningJobs") return err }, opts...) if err != nil { @@ -449,7 +453,7 @@ func (c *genAiTuningGRPCClient) CancelTuningJob(ctx context.Context, req *aiplat opts = append((*c.CallOptions).CancelTuningJob[0:len((*c.CallOptions).CancelTuningJob):len((*c.CallOptions).CancelTuningJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.genAiTuningClient.CancelTuningJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.genAiTuningClient.CancelTuningJob, req, settings.GRPC, c.logger, "CancelTuningJob") return err }, opts...) return err @@ -464,7 +468,7 @@ func (c *genAiTuningGRPCClient) RebaseTunedModel(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.RebaseTunedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.RebaseTunedModel, req, settings.GRPC, c.logger, "RebaseTunedModel") return err }, opts...) if err != nil { @@ -484,7 +488,7 @@ func (c *genAiTuningGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -513,7 +517,7 @@ func (c *genAiTuningGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -548,7 +552,7 @@ func (c *genAiTuningGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -566,7 +570,7 @@ func (c *genAiTuningGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -584,7 +588,7 @@ func (c *genAiTuningGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -601,7 +605,7 @@ func (c *genAiTuningGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -615,7 +619,7 @@ func (c *genAiTuningGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -630,7 +634,7 @@ func (c *genAiTuningGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -659,7 +663,7 @@ func (c *genAiTuningGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -694,7 +698,7 @@ func (c *genAiTuningGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/gen_ai_tuning_client_example_go123_test.go b/aiplatform/apiv1/gen_ai_tuning_client_example_go123_test.go index 733d4e824b4b..916c4bc97ea8 100644 --- a/aiplatform/apiv1/gen_ai_tuning_client_example_go123_test.go +++ b/aiplatform/apiv1/gen_ai_tuning_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGenAiTuningClient_ListTuningJobs_all() { } for resp, err := range c.ListTuningJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGenAiTuningClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGenAiTuningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/helpers.go b/aiplatform/apiv1/helpers.go index 842a9555bdb0..2e7f7875c402 100755 --- a/aiplatform/apiv1/helpers.go +++ b/aiplatform/apiv1/helpers.go @@ -18,10 +18,16 @@ package aiplatform import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "aiplatform.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +49,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/aiplatform/apiv1/index_client.go b/aiplatform/apiv1/index_client.go index 7a120b062252..92613b37e1c7 100755 --- a/aiplatform/apiv1/index_client.go +++ b/aiplatform/apiv1/index_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -307,6 +308,8 @@ type indexGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIndexClient creates a new index service client based on gRPC. @@ -333,6 +336,7 @@ func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexCli connPool: connPool, indexClient: aiplatformpb.NewIndexServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -389,7 +393,7 @@ func (c *indexGRPCClient) CreateIndex(ctx context.Context, req *aiplatformpb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.CreateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") return err }, opts...) if err != nil { @@ -409,7 +413,7 @@ func (c *indexGRPCClient) GetIndex(ctx context.Context, req *aiplatformpb.GetInd var resp *aiplatformpb.Index err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.GetIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.GetIndex, req, settings.GRPC, c.logger, "GetIndex") return err }, opts...) if err != nil { @@ -438,7 +442,7 @@ func (c *indexGRPCClient) ListIndexes(ctx context.Context, req *aiplatformpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.ListIndexes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") return err }, opts...) if err != nil { @@ -473,7 +477,7 @@ func (c *indexGRPCClient) UpdateIndex(ctx context.Context, req *aiplatformpb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.UpdateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.UpdateIndex, req, settings.GRPC, c.logger, "UpdateIndex") return err }, opts...) if err != nil { @@ -493,7 +497,7 @@ func (c *indexGRPCClient) DeleteIndex(ctx context.Context, req *aiplatformpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.DeleteIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") return err }, opts...) if err != nil { @@ -513,7 +517,7 @@ func (c *indexGRPCClient) UpsertDatapoints(ctx context.Context, req *aiplatformp var resp *aiplatformpb.UpsertDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.UpsertDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.UpsertDatapoints, req, settings.GRPC, c.logger, "UpsertDatapoints") return err }, opts...) if err != nil { @@ -531,7 +535,7 @@ func (c *indexGRPCClient) RemoveDatapoints(ctx context.Context, req *aiplatformp var resp *aiplatformpb.RemoveDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.RemoveDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.RemoveDatapoints, req, settings.GRPC, c.logger, "RemoveDatapoints") return err }, opts...) if err != nil { @@ -549,7 +553,7 @@ func (c *indexGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -578,7 +582,7 @@ func (c *indexGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -613,7 +617,7 @@ func (c *indexGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -631,7 +635,7 @@ func (c *indexGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -649,7 +653,7 @@ func (c *indexGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -666,7 +670,7 @@ func (c *indexGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -680,7 +684,7 @@ func (c *indexGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -695,7 +699,7 @@ func (c *indexGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -724,7 +728,7 @@ func (c *indexGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -759,7 +763,7 @@ func (c *indexGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/index_client_example_go123_test.go b/aiplatform/apiv1/index_client_example_go123_test.go index c06a122559d3..4949c32c5add 100644 --- a/aiplatform/apiv1/index_client_example_go123_test.go +++ b/aiplatform/apiv1/index_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIndexClient_ListIndexes_all() { } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIndexClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIndexClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/index_endpoint_client.go b/aiplatform/apiv1/index_endpoint_client.go index 3c8a24c47a65..ff82b6534a56 100755 --- a/aiplatform/apiv1/index_endpoint_client.go +++ b/aiplatform/apiv1/index_endpoint_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -329,6 +330,8 @@ type indexEndpointGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIndexEndpointClient creates a new index endpoint service client based on gRPC. @@ -355,6 +358,7 @@ func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, indexEndpointClient: aiplatformpb.NewIndexEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -411,7 +415,7 @@ func (c *indexEndpointGRPCClient) CreateIndexEndpoint(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.CreateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.CreateIndexEndpoint, req, settings.GRPC, c.logger, "CreateIndexEndpoint") return err }, opts...) if err != nil { @@ -431,7 +435,7 @@ func (c *indexEndpointGRPCClient) GetIndexEndpoint(ctx context.Context, req *aip var resp *aiplatformpb.IndexEndpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.GetIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.GetIndexEndpoint, req, settings.GRPC, c.logger, "GetIndexEndpoint") return err }, opts...) if err != nil { @@ -460,7 +464,7 @@ func (c *indexEndpointGRPCClient) ListIndexEndpoints(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.ListIndexEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.ListIndexEndpoints, req, settings.GRPC, c.logger, "ListIndexEndpoints") return err }, opts...) if err != nil { @@ -495,7 +499,7 @@ func (c *indexEndpointGRPCClient) UpdateIndexEndpoint(ctx context.Context, req * var resp *aiplatformpb.IndexEndpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.UpdateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.UpdateIndexEndpoint, req, settings.GRPC, c.logger, "UpdateIndexEndpoint") return err }, opts...) if err != nil { @@ -513,7 +517,7 @@ func (c *indexEndpointGRPCClient) DeleteIndexEndpoint(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.DeleteIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.DeleteIndexEndpoint, req, settings.GRPC, c.logger, "DeleteIndexEndpoint") return err }, opts...) if err != nil { @@ -533,7 +537,7 @@ func (c *indexEndpointGRPCClient) DeployIndex(ctx context.Context, req *aiplatfo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.DeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.DeployIndex, req, settings.GRPC, c.logger, "DeployIndex") return err }, opts...) if err != nil { @@ -553,7 +557,7 @@ func (c *indexEndpointGRPCClient) UndeployIndex(ctx context.Context, req *aiplat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.UndeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.UndeployIndex, req, settings.GRPC, c.logger, "UndeployIndex") return err }, opts...) if err != nil { @@ -573,7 +577,7 @@ func (c *indexEndpointGRPCClient) MutateDeployedIndex(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.MutateDeployedIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.MutateDeployedIndex, req, settings.GRPC, c.logger, "MutateDeployedIndex") return err }, opts...) if err != nil { @@ -593,7 +597,7 @@ func (c *indexEndpointGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -622,7 +626,7 @@ func (c *indexEndpointGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -657,7 +661,7 @@ func (c *indexEndpointGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -675,7 +679,7 @@ func (c *indexEndpointGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -693,7 +697,7 @@ func (c *indexEndpointGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -710,7 +714,7 @@ func (c *indexEndpointGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -724,7 +728,7 @@ func (c *indexEndpointGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -739,7 +743,7 @@ func (c *indexEndpointGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -768,7 +772,7 @@ func (c *indexEndpointGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -803,7 +807,7 @@ func (c *indexEndpointGRPCClient) WaitOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/index_endpoint_client_example_go123_test.go b/aiplatform/apiv1/index_endpoint_client_example_go123_test.go index 7b65591a4e9d..b82dcff11f48 100644 --- a/aiplatform/apiv1/index_endpoint_client_example_go123_test.go +++ b/aiplatform/apiv1/index_endpoint_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIndexEndpointClient_ListIndexEndpoints_all() { } for resp, err := range c.ListIndexEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIndexEndpointClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIndexEndpointClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/job_client.go b/aiplatform/apiv1/job_client.go index e4db8e714a1c..9c5f3571239e 100755 --- a/aiplatform/apiv1/job_client.go +++ b/aiplatform/apiv1/job_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -613,6 +614,8 @@ type jobGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobClient creates a new job service client based on gRPC. @@ -639,6 +642,7 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, connPool: connPool, jobClient: aiplatformpb.NewJobServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -695,7 +699,7 @@ func (c *jobGRPCClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.C var resp *aiplatformpb.CustomJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateCustomJob, req, settings.GRPC, c.logger, "CreateCustomJob") return err }, opts...) if err != nil { @@ -713,7 +717,7 @@ func (c *jobGRPCClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetC var resp *aiplatformpb.CustomJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetCustomJob, req, settings.GRPC, c.logger, "GetCustomJob") return err }, opts...) if err != nil { @@ -742,7 +746,7 @@ func (c *jobGRPCClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListCustomJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListCustomJobs, req, settings.GRPC, c.logger, "ListCustomJobs") return err }, opts...) if err != nil { @@ -777,7 +781,7 @@ func (c *jobGRPCClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteCustomJob, req, settings.GRPC, c.logger, "DeleteCustomJob") return err }, opts...) if err != nil { @@ -796,7 +800,7 @@ func (c *jobGRPCClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.C opts = append((*c.CallOptions).CancelCustomJob[0:len((*c.CallOptions).CancelCustomJob):len((*c.CallOptions).CancelCustomJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelCustomJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelCustomJob, req, settings.GRPC, c.logger, "CancelCustomJob") return err }, opts...) return err @@ -811,7 +815,7 @@ func (c *jobGRPCClient) CreateDataLabelingJob(ctx context.Context, req *aiplatfo var resp *aiplatformpb.DataLabelingJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateDataLabelingJob, req, settings.GRPC, c.logger, "CreateDataLabelingJob") return err }, opts...) if err != nil { @@ -829,7 +833,7 @@ func (c *jobGRPCClient) GetDataLabelingJob(ctx context.Context, req *aiplatformp var resp *aiplatformpb.DataLabelingJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetDataLabelingJob, req, settings.GRPC, c.logger, "GetDataLabelingJob") return err }, opts...) if err != nil { @@ -858,7 +862,7 @@ func (c *jobGRPCClient) ListDataLabelingJobs(ctx context.Context, req *aiplatfor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListDataLabelingJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListDataLabelingJobs, req, settings.GRPC, c.logger, "ListDataLabelingJobs") return err }, opts...) if err != nil { @@ -893,7 +897,7 @@ func (c *jobGRPCClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatfo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteDataLabelingJob, req, settings.GRPC, c.logger, "DeleteDataLabelingJob") return err }, opts...) if err != nil { @@ -912,7 +916,7 @@ func (c *jobGRPCClient) CancelDataLabelingJob(ctx context.Context, req *aiplatfo opts = append((*c.CallOptions).CancelDataLabelingJob[0:len((*c.CallOptions).CancelDataLabelingJob):len((*c.CallOptions).CancelDataLabelingJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelDataLabelingJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelDataLabelingJob, req, settings.GRPC, c.logger, "CancelDataLabelingJob") return err }, opts...) return err @@ -927,7 +931,7 @@ func (c *jobGRPCClient) CreateHyperparameterTuningJob(ctx context.Context, req * var resp *aiplatformpb.HyperparameterTuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateHyperparameterTuningJob, req, settings.GRPC, c.logger, "CreateHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -945,7 +949,7 @@ func (c *jobGRPCClient) GetHyperparameterTuningJob(ctx context.Context, req *aip var resp *aiplatformpb.HyperparameterTuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetHyperparameterTuningJob, req, settings.GRPC, c.logger, "GetHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -974,7 +978,7 @@ func (c *jobGRPCClient) ListHyperparameterTuningJobs(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListHyperparameterTuningJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListHyperparameterTuningJobs, req, settings.GRPC, c.logger, "ListHyperparameterTuningJobs") return err }, opts...) if err != nil { @@ -1009,7 +1013,7 @@ func (c *jobGRPCClient) DeleteHyperparameterTuningJob(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteHyperparameterTuningJob, req, settings.GRPC, c.logger, "DeleteHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -1028,7 +1032,7 @@ func (c *jobGRPCClient) CancelHyperparameterTuningJob(ctx context.Context, req * opts = append((*c.CallOptions).CancelHyperparameterTuningJob[0:len((*c.CallOptions).CancelHyperparameterTuningJob):len((*c.CallOptions).CancelHyperparameterTuningJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelHyperparameterTuningJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelHyperparameterTuningJob, req, settings.GRPC, c.logger, "CancelHyperparameterTuningJob") return err }, opts...) return err @@ -1043,7 +1047,7 @@ func (c *jobGRPCClient) CreateNasJob(ctx context.Context, req *aiplatformpb.Crea var resp *aiplatformpb.NasJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateNasJob, req, settings.GRPC, c.logger, "CreateNasJob") return err }, opts...) if err != nil { @@ -1061,7 +1065,7 @@ func (c *jobGRPCClient) GetNasJob(ctx context.Context, req *aiplatformpb.GetNasJ var resp *aiplatformpb.NasJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetNasJob, req, settings.GRPC, c.logger, "GetNasJob") return err }, opts...) if err != nil { @@ -1090,7 +1094,7 @@ func (c *jobGRPCClient) ListNasJobs(ctx context.Context, req *aiplatformpb.ListN } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListNasJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListNasJobs, req, settings.GRPC, c.logger, "ListNasJobs") return err }, opts...) if err != nil { @@ -1125,7 +1129,7 @@ func (c *jobGRPCClient) DeleteNasJob(ctx context.Context, req *aiplatformpb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteNasJob, req, settings.GRPC, c.logger, "DeleteNasJob") return err }, opts...) if err != nil { @@ -1144,7 +1148,7 @@ func (c *jobGRPCClient) CancelNasJob(ctx context.Context, req *aiplatformpb.Canc opts = append((*c.CallOptions).CancelNasJob[0:len((*c.CallOptions).CancelNasJob):len((*c.CallOptions).CancelNasJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelNasJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelNasJob, req, settings.GRPC, c.logger, "CancelNasJob") return err }, opts...) return err @@ -1159,7 +1163,7 @@ func (c *jobGRPCClient) GetNasTrialDetail(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.NasTrialDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetNasTrialDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetNasTrialDetail, req, settings.GRPC, c.logger, "GetNasTrialDetail") return err }, opts...) if err != nil { @@ -1188,7 +1192,7 @@ func (c *jobGRPCClient) ListNasTrialDetails(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListNasTrialDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListNasTrialDetails, req, settings.GRPC, c.logger, "ListNasTrialDetails") return err }, opts...) if err != nil { @@ -1223,7 +1227,7 @@ func (c *jobGRPCClient) CreateBatchPredictionJob(ctx context.Context, req *aipla var resp *aiplatformpb.BatchPredictionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateBatchPredictionJob, req, settings.GRPC, c.logger, "CreateBatchPredictionJob") return err }, opts...) if err != nil { @@ -1241,7 +1245,7 @@ func (c *jobGRPCClient) GetBatchPredictionJob(ctx context.Context, req *aiplatfo var resp *aiplatformpb.BatchPredictionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetBatchPredictionJob, req, settings.GRPC, c.logger, "GetBatchPredictionJob") return err }, opts...) if err != nil { @@ -1270,7 +1274,7 @@ func (c *jobGRPCClient) ListBatchPredictionJobs(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListBatchPredictionJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListBatchPredictionJobs, req, settings.GRPC, c.logger, "ListBatchPredictionJobs") return err }, opts...) if err != nil { @@ -1305,7 +1309,7 @@ func (c *jobGRPCClient) DeleteBatchPredictionJob(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteBatchPredictionJob, req, settings.GRPC, c.logger, "DeleteBatchPredictionJob") return err }, opts...) if err != nil { @@ -1324,7 +1328,7 @@ func (c *jobGRPCClient) CancelBatchPredictionJob(ctx context.Context, req *aipla opts = append((*c.CallOptions).CancelBatchPredictionJob[0:len((*c.CallOptions).CancelBatchPredictionJob):len((*c.CallOptions).CancelBatchPredictionJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelBatchPredictionJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelBatchPredictionJob, req, settings.GRPC, c.logger, "CancelBatchPredictionJob") return err }, opts...) return err @@ -1339,7 +1343,7 @@ func (c *jobGRPCClient) CreateModelDeploymentMonitoringJob(ctx context.Context, var resp *aiplatformpb.ModelDeploymentMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "CreateModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1368,7 +1372,7 @@ func (c *jobGRPCClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchModelDeploymentMonitoringStatsAnomalies, req, settings.GRPC, c.logger, "SearchModelDeploymentMonitoringStatsAnomalies") return err }, opts...) if err != nil { @@ -1403,7 +1407,7 @@ func (c *jobGRPCClient) GetModelDeploymentMonitoringJob(ctx context.Context, req var resp *aiplatformpb.ModelDeploymentMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "GetModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1432,7 +1436,7 @@ func (c *jobGRPCClient) ListModelDeploymentMonitoringJobs(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListModelDeploymentMonitoringJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListModelDeploymentMonitoringJobs, req, settings.GRPC, c.logger, "ListModelDeploymentMonitoringJobs") return err }, opts...) if err != nil { @@ -1467,7 +1471,7 @@ func (c *jobGRPCClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.UpdateModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.UpdateModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "UpdateModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1487,7 +1491,7 @@ func (c *jobGRPCClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "DeleteModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1506,7 +1510,7 @@ func (c *jobGRPCClient) PauseModelDeploymentMonitoringJob(ctx context.Context, r opts = append((*c.CallOptions).PauseModelDeploymentMonitoringJob[0:len((*c.CallOptions).PauseModelDeploymentMonitoringJob):len((*c.CallOptions).PauseModelDeploymentMonitoringJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.PauseModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.PauseModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "PauseModelDeploymentMonitoringJob") return err }, opts...) return err @@ -1520,7 +1524,7 @@ func (c *jobGRPCClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, opts = append((*c.CallOptions).ResumeModelDeploymentMonitoringJob[0:len((*c.CallOptions).ResumeModelDeploymentMonitoringJob):len((*c.CallOptions).ResumeModelDeploymentMonitoringJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.ResumeModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.ResumeModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "ResumeModelDeploymentMonitoringJob") return err }, opts...) return err @@ -1535,7 +1539,7 @@ func (c *jobGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLoca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1564,7 +1568,7 @@ func (c *jobGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1599,7 +1603,7 @@ func (c *jobGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1617,7 +1621,7 @@ func (c *jobGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1635,7 +1639,7 @@ func (c *jobGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestI var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1652,7 +1656,7 @@ func (c *jobGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1666,7 +1670,7 @@ func (c *jobGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1681,7 +1685,7 @@ func (c *jobGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1710,7 +1714,7 @@ func (c *jobGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1745,7 +1749,7 @@ func (c *jobGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.Wa var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/job_client_example_go123_test.go b/aiplatform/apiv1/job_client_example_go123_test.go index 9a40b8dab7ae..2f90edacc214 100644 --- a/aiplatform/apiv1/job_client_example_go123_test.go +++ b/aiplatform/apiv1/job_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleJobClient_ListBatchPredictionJobs_all() { } for resp, err := range c.ListBatchPredictionJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleJobClient_ListCustomJobs_all() { } for resp, err := range c.ListCustomJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleJobClient_ListDataLabelingJobs_all() { } for resp, err := range c.ListDataLabelingJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleJobClient_ListHyperparameterTuningJobs_all() { } for resp, err := range c.ListHyperparameterTuningJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleJobClient_ListModelDeploymentMonitoringJobs_all() { } for resp, err := range c.ListModelDeploymentMonitoringJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleJobClient_ListNasJobs_all() { } for resp, err := range c.ListNasJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleJobClient_ListNasTrialDetails_all() { } for resp, err := range c.ListNasTrialDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies_all() { } for resp, err := range c.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleJobClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleJobClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/llm_utility_client.go b/aiplatform/apiv1/llm_utility_client.go index fdc98687a8a7..f44abf7c47aa 100755 --- a/aiplatform/apiv1/llm_utility_client.go +++ b/aiplatform/apiv1/llm_utility_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -231,6 +232,8 @@ type llmUtilityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLlmUtilityClient creates a new llm utility service client based on gRPC. @@ -257,6 +260,7 @@ func NewLlmUtilityClient(ctx context.Context, opts ...option.ClientOption) (*Llm connPool: connPool, llmUtilityClient: aiplatformpb.NewLlmUtilityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -302,7 +306,7 @@ func (c *llmUtilityGRPCClient) CountTokens(ctx context.Context, req *aiplatformp var resp *aiplatformpb.CountTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.llmUtilityClient.CountTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.llmUtilityClient.CountTokens, req, settings.GRPC, c.logger, "CountTokens") return err }, opts...) if err != nil { @@ -320,7 +324,7 @@ func (c *llmUtilityGRPCClient) ComputeTokens(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ComputeTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.llmUtilityClient.ComputeTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.llmUtilityClient.ComputeTokens, req, settings.GRPC, c.logger, "ComputeTokens") return err }, opts...) if err != nil { @@ -338,7 +342,7 @@ func (c *llmUtilityGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -367,7 +371,7 @@ func (c *llmUtilityGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -402,7 +406,7 @@ func (c *llmUtilityGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -420,7 +424,7 @@ func (c *llmUtilityGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -438,7 +442,7 @@ func (c *llmUtilityGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -455,7 +459,7 @@ func (c *llmUtilityGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -469,7 +473,7 @@ func (c *llmUtilityGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -484,7 +488,7 @@ func (c *llmUtilityGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -513,7 +517,7 @@ func (c *llmUtilityGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -548,7 +552,7 @@ func (c *llmUtilityGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/llm_utility_client_example_go123_test.go b/aiplatform/apiv1/llm_utility_client_example_go123_test.go index fff285599acc..6b3886553115 100644 --- a/aiplatform/apiv1/llm_utility_client_example_go123_test.go +++ b/aiplatform/apiv1/llm_utility_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleLlmUtilityClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleLlmUtilityClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/match_client.go b/aiplatform/apiv1/match_client.go index 6f62acba8b68..db75d6863662 100755 --- a/aiplatform/apiv1/match_client.go +++ b/aiplatform/apiv1/match_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -233,6 +234,8 @@ type matchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMatchClient creates a new match service client based on gRPC. @@ -260,6 +263,7 @@ func NewMatchClient(ctx context.Context, opts ...option.ClientOption) (*MatchCli connPool: connPool, matchClient: aiplatformpb.NewMatchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -305,7 +309,7 @@ func (c *matchGRPCClient) FindNeighbors(ctx context.Context, req *aiplatformpb.F var resp *aiplatformpb.FindNeighborsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.matchClient.FindNeighbors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.matchClient.FindNeighbors, req, settings.GRPC, c.logger, "FindNeighbors") return err }, opts...) if err != nil { @@ -323,7 +327,7 @@ func (c *matchGRPCClient) ReadIndexDatapoints(ctx context.Context, req *aiplatfo var resp *aiplatformpb.ReadIndexDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.matchClient.ReadIndexDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.matchClient.ReadIndexDatapoints, req, settings.GRPC, c.logger, "ReadIndexDatapoints") return err }, opts...) if err != nil { @@ -341,7 +345,7 @@ func (c *matchGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -370,7 +374,7 @@ func (c *matchGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -405,7 +409,7 @@ func (c *matchGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -423,7 +427,7 @@ func (c *matchGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -441,7 +445,7 @@ func (c *matchGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -458,7 +462,7 @@ func (c *matchGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -472,7 +476,7 @@ func (c *matchGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -487,7 +491,7 @@ func (c *matchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -516,7 +520,7 @@ func (c *matchGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -551,7 +555,7 @@ func (c *matchGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/match_client_example_go123_test.go b/aiplatform/apiv1/match_client_example_go123_test.go index e64b2d512eb6..89ff794185b8 100644 --- a/aiplatform/apiv1/match_client_example_go123_test.go +++ b/aiplatform/apiv1/match_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleMatchClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleMatchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/metadata_client.go b/aiplatform/apiv1/metadata_client.go index f979720bdeac..f673a6df6389 100755 --- a/aiplatform/apiv1/metadata_client.go +++ b/aiplatform/apiv1/metadata_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -555,6 +556,8 @@ type metadataGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetadataClient creates a new metadata service client based on gRPC. @@ -581,6 +584,7 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad connPool: connPool, metadataClient: aiplatformpb.NewMetadataServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -637,7 +641,7 @@ func (c *metadataGRPCClient) CreateMetadataStore(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateMetadataStore, req, settings.GRPC, c.logger, "CreateMetadataStore") return err }, opts...) if err != nil { @@ -657,7 +661,7 @@ func (c *metadataGRPCClient) GetMetadataStore(ctx context.Context, req *aiplatfo var resp *aiplatformpb.MetadataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetMetadataStore, req, settings.GRPC, c.logger, "GetMetadataStore") return err }, opts...) if err != nil { @@ -686,7 +690,7 @@ func (c *metadataGRPCClient) ListMetadataStores(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListMetadataStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListMetadataStores, req, settings.GRPC, c.logger, "ListMetadataStores") return err }, opts...) if err != nil { @@ -721,7 +725,7 @@ func (c *metadataGRPCClient) DeleteMetadataStore(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteMetadataStore, req, settings.GRPC, c.logger, "DeleteMetadataStore") return err }, opts...) if err != nil { @@ -741,7 +745,7 @@ func (c *metadataGRPCClient) CreateArtifact(ctx context.Context, req *aiplatform var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateArtifact, req, settings.GRPC, c.logger, "CreateArtifact") return err }, opts...) if err != nil { @@ -759,7 +763,7 @@ func (c *metadataGRPCClient) GetArtifact(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetArtifact, req, settings.GRPC, c.logger, "GetArtifact") return err }, opts...) if err != nil { @@ -788,7 +792,7 @@ func (c *metadataGRPCClient) ListArtifacts(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListArtifacts, req, settings.GRPC, c.logger, "ListArtifacts") return err }, opts...) if err != nil { @@ -823,7 +827,7 @@ func (c *metadataGRPCClient) UpdateArtifact(ctx context.Context, req *aiplatform var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateArtifact, req, settings.GRPC, c.logger, "UpdateArtifact") return err }, opts...) if err != nil { @@ -841,7 +845,7 @@ func (c *metadataGRPCClient) DeleteArtifact(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteArtifact, req, settings.GRPC, c.logger, "DeleteArtifact") return err }, opts...) if err != nil { @@ -861,7 +865,7 @@ func (c *metadataGRPCClient) PurgeArtifacts(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeArtifacts, req, settings.GRPC, c.logger, "PurgeArtifacts") return err }, opts...) if err != nil { @@ -881,7 +885,7 @@ func (c *metadataGRPCClient) CreateContext(ctx context.Context, req *aiplatformp var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateContext, req, settings.GRPC, c.logger, "CreateContext") return err }, opts...) if err != nil { @@ -899,7 +903,7 @@ func (c *metadataGRPCClient) GetContext(ctx context.Context, req *aiplatformpb.G var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetContext, req, settings.GRPC, c.logger, "GetContext") return err }, opts...) if err != nil { @@ -928,7 +932,7 @@ func (c *metadataGRPCClient) ListContexts(ctx context.Context, req *aiplatformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListContexts, req, settings.GRPC, c.logger, "ListContexts") return err }, opts...) if err != nil { @@ -963,7 +967,7 @@ func (c *metadataGRPCClient) UpdateContext(ctx context.Context, req *aiplatformp var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateContext, req, settings.GRPC, c.logger, "UpdateContext") return err }, opts...) if err != nil { @@ -981,7 +985,7 @@ func (c *metadataGRPCClient) DeleteContext(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteContext, req, settings.GRPC, c.logger, "DeleteContext") return err }, opts...) if err != nil { @@ -1001,7 +1005,7 @@ func (c *metadataGRPCClient) PurgeContexts(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeContexts, req, settings.GRPC, c.logger, "PurgeContexts") return err }, opts...) if err != nil { @@ -1021,7 +1025,7 @@ func (c *metadataGRPCClient) AddContextArtifactsAndExecutions(ctx context.Contex var resp *aiplatformpb.AddContextArtifactsAndExecutionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddContextArtifactsAndExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddContextArtifactsAndExecutions, req, settings.GRPC, c.logger, "AddContextArtifactsAndExecutions") return err }, opts...) if err != nil { @@ -1039,7 +1043,7 @@ func (c *metadataGRPCClient) AddContextChildren(ctx context.Context, req *aiplat var resp *aiplatformpb.AddContextChildrenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddContextChildren(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddContextChildren, req, settings.GRPC, c.logger, "AddContextChildren") return err }, opts...) if err != nil { @@ -1057,7 +1061,7 @@ func (c *metadataGRPCClient) RemoveContextChildren(ctx context.Context, req *aip var resp *aiplatformpb.RemoveContextChildrenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.RemoveContextChildren(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.RemoveContextChildren, req, settings.GRPC, c.logger, "RemoveContextChildren") return err }, opts...) if err != nil { @@ -1075,7 +1079,7 @@ func (c *metadataGRPCClient) QueryContextLineageSubgraph(ctx context.Context, re var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryContextLineageSubgraph(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryContextLineageSubgraph, req, settings.GRPC, c.logger, "QueryContextLineageSubgraph") return err }, opts...) if err != nil { @@ -1093,7 +1097,7 @@ func (c *metadataGRPCClient) CreateExecution(ctx context.Context, req *aiplatfor var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateExecution, req, settings.GRPC, c.logger, "CreateExecution") return err }, opts...) if err != nil { @@ -1111,7 +1115,7 @@ func (c *metadataGRPCClient) GetExecution(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -1140,7 +1144,7 @@ func (c *metadataGRPCClient) ListExecutions(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -1175,7 +1179,7 @@ func (c *metadataGRPCClient) UpdateExecution(ctx context.Context, req *aiplatfor var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateExecution, req, settings.GRPC, c.logger, "UpdateExecution") return err }, opts...) if err != nil { @@ -1193,7 +1197,7 @@ func (c *metadataGRPCClient) DeleteExecution(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteExecution, req, settings.GRPC, c.logger, "DeleteExecution") return err }, opts...) if err != nil { @@ -1213,7 +1217,7 @@ func (c *metadataGRPCClient) PurgeExecutions(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeExecutions, req, settings.GRPC, c.logger, "PurgeExecutions") return err }, opts...) if err != nil { @@ -1233,7 +1237,7 @@ func (c *metadataGRPCClient) AddExecutionEvents(ctx context.Context, req *aiplat var resp *aiplatformpb.AddExecutionEventsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddExecutionEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddExecutionEvents, req, settings.GRPC, c.logger, "AddExecutionEvents") return err }, opts...) if err != nil { @@ -1251,7 +1255,7 @@ func (c *metadataGRPCClient) QueryExecutionInputsAndOutputs(ctx context.Context, var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryExecutionInputsAndOutputs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryExecutionInputsAndOutputs, req, settings.GRPC, c.logger, "QueryExecutionInputsAndOutputs") return err }, opts...) if err != nil { @@ -1269,7 +1273,7 @@ func (c *metadataGRPCClient) CreateMetadataSchema(ctx context.Context, req *aipl var resp *aiplatformpb.MetadataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateMetadataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateMetadataSchema, req, settings.GRPC, c.logger, "CreateMetadataSchema") return err }, opts...) if err != nil { @@ -1287,7 +1291,7 @@ func (c *metadataGRPCClient) GetMetadataSchema(ctx context.Context, req *aiplatf var resp *aiplatformpb.MetadataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetMetadataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetMetadataSchema, req, settings.GRPC, c.logger, "GetMetadataSchema") return err }, opts...) if err != nil { @@ -1316,7 +1320,7 @@ func (c *metadataGRPCClient) ListMetadataSchemas(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListMetadataSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListMetadataSchemas, req, settings.GRPC, c.logger, "ListMetadataSchemas") return err }, opts...) if err != nil { @@ -1351,7 +1355,7 @@ func (c *metadataGRPCClient) QueryArtifactLineageSubgraph(ctx context.Context, r var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryArtifactLineageSubgraph(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryArtifactLineageSubgraph, req, settings.GRPC, c.logger, "QueryArtifactLineageSubgraph") return err }, opts...) if err != nil { @@ -1369,7 +1373,7 @@ func (c *metadataGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1398,7 +1402,7 @@ func (c *metadataGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1433,7 +1437,7 @@ func (c *metadataGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1451,7 +1455,7 @@ func (c *metadataGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1469,7 +1473,7 @@ func (c *metadataGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1486,7 +1490,7 @@ func (c *metadataGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1500,7 +1504,7 @@ func (c *metadataGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1515,7 +1519,7 @@ func (c *metadataGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1544,7 +1548,7 @@ func (c *metadataGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1579,7 +1583,7 @@ func (c *metadataGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/metadata_client_example_go123_test.go b/aiplatform/apiv1/metadata_client_example_go123_test.go index 58e92b46ee8e..1fa75a8507a4 100644 --- a/aiplatform/apiv1/metadata_client_example_go123_test.go +++ b/aiplatform/apiv1/metadata_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleMetadataClient_ListArtifacts_all() { } for resp, err := range c.ListArtifacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleMetadataClient_ListContexts_all() { } for resp, err := range c.ListContexts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleMetadataClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleMetadataClient_ListMetadataSchemas_all() { } for resp, err := range c.ListMetadataSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleMetadataClient_ListMetadataStores_all() { } for resp, err := range c.ListMetadataStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleMetadataClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleMetadataClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/migration_client.go b/aiplatform/apiv1/migration_client.go index a942a9c2234e..195d7bad3c6f 100755 --- a/aiplatform/apiv1/migration_client.go +++ b/aiplatform/apiv1/migration_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -254,6 +255,8 @@ type migrationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMigrationClient creates a new migration service client based on gRPC. @@ -281,6 +284,7 @@ func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*Migr connPool: connPool, migrationClient: aiplatformpb.NewMigrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -348,7 +352,7 @@ func (c *migrationGRPCClient) SearchMigratableResources(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.migrationClient.SearchMigratableResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.migrationClient.SearchMigratableResources, req, settings.GRPC, c.logger, "SearchMigratableResources") return err }, opts...) if err != nil { @@ -383,7 +387,7 @@ func (c *migrationGRPCClient) BatchMigrateResources(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.migrationClient.BatchMigrateResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.migrationClient.BatchMigrateResources, req, settings.GRPC, c.logger, "BatchMigrateResources") return err }, opts...) if err != nil { @@ -403,7 +407,7 @@ func (c *migrationGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -432,7 +436,7 @@ func (c *migrationGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -467,7 +471,7 @@ func (c *migrationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -485,7 +489,7 @@ func (c *migrationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -503,7 +507,7 @@ func (c *migrationGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -520,7 +524,7 @@ func (c *migrationGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -534,7 +538,7 @@ func (c *migrationGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -549,7 +553,7 @@ func (c *migrationGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -578,7 +582,7 @@ func (c *migrationGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -613,7 +617,7 @@ func (c *migrationGRPCClient) WaitOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/migration_client_example_go123_test.go b/aiplatform/apiv1/migration_client_example_go123_test.go index e2f719143f1c..e05e9f8bf3f9 100644 --- a/aiplatform/apiv1/migration_client_example_go123_test.go +++ b/aiplatform/apiv1/migration_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleMigrationClient_SearchMigratableResources_all() { } for resp, err := range c.SearchMigratableResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleMigrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleMigrationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/model_client.go b/aiplatform/apiv1/model_client.go index 0aae61d295c1..10263cd690a9 100755 --- a/aiplatform/apiv1/model_client.go +++ b/aiplatform/apiv1/model_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -434,6 +435,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -460,6 +463,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: aiplatformpb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -516,7 +520,7 @@ func (c *modelGRPCClient) UploadModel(ctx context.Context, req *aiplatformpb.Upl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UploadModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UploadModel, req, settings.GRPC, c.logger, "UploadModel") return err }, opts...) if err != nil { @@ -536,7 +540,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *aiplatformpb.GetMod var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -565,7 +569,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *aiplatformpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -611,7 +615,7 @@ func (c *modelGRPCClient) ListModelVersions(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelVersions, req, settings.GRPC, c.logger, "ListModelVersions") return err }, opts...) if err != nil { @@ -646,7 +650,7 @@ func (c *modelGRPCClient) UpdateModel(ctx context.Context, req *aiplatformpb.Upd var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -664,7 +668,7 @@ func (c *modelGRPCClient) UpdateExplanationDataset(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateExplanationDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateExplanationDataset, req, settings.GRPC, c.logger, "UpdateExplanationDataset") return err }, opts...) if err != nil { @@ -684,7 +688,7 @@ func (c *modelGRPCClient) DeleteModel(ctx context.Context, req *aiplatformpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.DeleteModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) if err != nil { @@ -704,7 +708,7 @@ func (c *modelGRPCClient) DeleteModelVersion(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.DeleteModelVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.DeleteModelVersion, req, settings.GRPC, c.logger, "DeleteModelVersion") return err }, opts...) if err != nil { @@ -724,7 +728,7 @@ func (c *modelGRPCClient) MergeVersionAliases(ctx context.Context, req *aiplatfo var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.MergeVersionAliases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.MergeVersionAliases, req, settings.GRPC, c.logger, "MergeVersionAliases") return err }, opts...) if err != nil { @@ -742,7 +746,7 @@ func (c *modelGRPCClient) ExportModel(ctx context.Context, req *aiplatformpb.Exp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ExportModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ExportModel, req, settings.GRPC, c.logger, "ExportModel") return err }, opts...) if err != nil { @@ -762,7 +766,7 @@ func (c *modelGRPCClient) CopyModel(ctx context.Context, req *aiplatformpb.CopyM var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CopyModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CopyModel, req, settings.GRPC, c.logger, "CopyModel") return err }, opts...) if err != nil { @@ -782,7 +786,7 @@ func (c *modelGRPCClient) ImportModelEvaluation(ctx context.Context, req *aiplat var resp *aiplatformpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ImportModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ImportModelEvaluation, req, settings.GRPC, c.logger, "ImportModelEvaluation") return err }, opts...) if err != nil { @@ -800,7 +804,7 @@ func (c *modelGRPCClient) BatchImportModelEvaluationSlices(ctx context.Context, var resp *aiplatformpb.BatchImportModelEvaluationSlicesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.BatchImportModelEvaluationSlices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.BatchImportModelEvaluationSlices, req, settings.GRPC, c.logger, "BatchImportModelEvaluationSlices") return err }, opts...) if err != nil { @@ -818,7 +822,7 @@ func (c *modelGRPCClient) BatchImportEvaluatedAnnotations(ctx context.Context, r var resp *aiplatformpb.BatchImportEvaluatedAnnotationsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.BatchImportEvaluatedAnnotations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.BatchImportEvaluatedAnnotations, req, settings.GRPC, c.logger, "BatchImportEvaluatedAnnotations") return err }, opts...) if err != nil { @@ -836,7 +840,7 @@ func (c *modelGRPCClient) GetModelEvaluation(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModelEvaluation, req, settings.GRPC, c.logger, "GetModelEvaluation") return err }, opts...) if err != nil { @@ -865,7 +869,7 @@ func (c *modelGRPCClient) ListModelEvaluations(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelEvaluations, req, settings.GRPC, c.logger, "ListModelEvaluations") return err }, opts...) if err != nil { @@ -900,7 +904,7 @@ func (c *modelGRPCClient) GetModelEvaluationSlice(ctx context.Context, req *aipl var resp *aiplatformpb.ModelEvaluationSlice err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModelEvaluationSlice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModelEvaluationSlice, req, settings.GRPC, c.logger, "GetModelEvaluationSlice") return err }, opts...) if err != nil { @@ -929,7 +933,7 @@ func (c *modelGRPCClient) ListModelEvaluationSlices(ctx context.Context, req *ai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelEvaluationSlices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelEvaluationSlices, req, settings.GRPC, c.logger, "ListModelEvaluationSlices") return err }, opts...) if err != nil { @@ -964,7 +968,7 @@ func (c *modelGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -993,7 +997,7 @@ func (c *modelGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1028,7 +1032,7 @@ func (c *modelGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1046,7 +1050,7 @@ func (c *modelGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1064,7 +1068,7 @@ func (c *modelGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1081,7 +1085,7 @@ func (c *modelGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1095,7 +1099,7 @@ func (c *modelGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1110,7 +1114,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1139,7 +1143,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1174,7 +1178,7 @@ func (c *modelGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/model_client_example_go123_test.go b/aiplatform/apiv1/model_client_example_go123_test.go index e9df8b9932c1..358942542a9b 100644 --- a/aiplatform/apiv1/model_client_example_go123_test.go +++ b/aiplatform/apiv1/model_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleModelClient_ListModelEvaluationSlices_all() { } for resp, err := range c.ListModelEvaluationSlices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleModelClient_ListModelEvaluations_all() { } for resp, err := range c.ListModelEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleModelClient_ListModelVersions_all() { } for resp, err := range c.ListModelVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleModelClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/model_garden_client.go b/aiplatform/apiv1/model_garden_client.go index 5e264981e531..0efd34a2a3bf 100755 --- a/aiplatform/apiv1/model_garden_client.go +++ b/aiplatform/apiv1/model_garden_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -223,6 +224,8 @@ type modelGardenGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelGardenClient creates a new model garden service client based on gRPC. @@ -249,6 +252,7 @@ func NewModelGardenClient(ctx context.Context, opts ...option.ClientOption) (*Mo connPool: connPool, modelGardenClient: aiplatformpb.NewModelGardenServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -294,7 +298,7 @@ func (c *modelGardenGRPCClient) GetPublisherModel(ctx context.Context, req *aipl var resp *aiplatformpb.PublisherModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelGardenClient.GetPublisherModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelGardenClient.GetPublisherModel, req, settings.GRPC, c.logger, "GetPublisherModel") return err }, opts...) if err != nil { @@ -312,7 +316,7 @@ func (c *modelGardenGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -341,7 +345,7 @@ func (c *modelGardenGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -376,7 +380,7 @@ func (c *modelGardenGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -394,7 +398,7 @@ func (c *modelGardenGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -412,7 +416,7 @@ func (c *modelGardenGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -429,7 +433,7 @@ func (c *modelGardenGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -443,7 +447,7 @@ func (c *modelGardenGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -458,7 +462,7 @@ func (c *modelGardenGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -487,7 +491,7 @@ func (c *modelGardenGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -522,7 +526,7 @@ func (c *modelGardenGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/model_garden_client_example_go123_test.go b/aiplatform/apiv1/model_garden_client_example_go123_test.go index 8317c13e29c9..6696e9e8e494 100644 --- a/aiplatform/apiv1/model_garden_client_example_go123_test.go +++ b/aiplatform/apiv1/model_garden_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelGardenClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelGardenClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/notebook_client.go b/aiplatform/apiv1/notebook_client.go index 52c3922a74c0..7f06ed50da12 100755 --- a/aiplatform/apiv1/notebook_client.go +++ b/aiplatform/apiv1/notebook_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -419,6 +420,8 @@ type notebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotebookClient creates a new notebook service client based on gRPC. @@ -445,6 +448,7 @@ func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*Noteb connPool: connPool, notebookClient: aiplatformpb.NewNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -501,7 +505,7 @@ func (c *notebookGRPCClient) CreateNotebookRuntimeTemplate(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "CreateNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -521,7 +525,7 @@ func (c *notebookGRPCClient) GetNotebookRuntimeTemplate(ctx context.Context, req var resp *aiplatformpb.NotebookRuntimeTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "GetNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -550,7 +554,7 @@ func (c *notebookGRPCClient) ListNotebookRuntimeTemplates(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookRuntimeTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookRuntimeTemplates, req, settings.GRPC, c.logger, "ListNotebookRuntimeTemplates") return err }, opts...) if err != nil { @@ -585,7 +589,7 @@ func (c *notebookGRPCClient) DeleteNotebookRuntimeTemplate(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "DeleteNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -605,7 +609,7 @@ func (c *notebookGRPCClient) UpdateNotebookRuntimeTemplate(ctx context.Context, var resp *aiplatformpb.NotebookRuntimeTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "UpdateNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -623,7 +627,7 @@ func (c *notebookGRPCClient) AssignNotebookRuntime(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.AssignNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.AssignNotebookRuntime, req, settings.GRPC, c.logger, "AssignNotebookRuntime") return err }, opts...) if err != nil { @@ -643,7 +647,7 @@ func (c *notebookGRPCClient) GetNotebookRuntime(ctx context.Context, req *aiplat var resp *aiplatformpb.NotebookRuntime err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookRuntime, req, settings.GRPC, c.logger, "GetNotebookRuntime") return err }, opts...) if err != nil { @@ -672,7 +676,7 @@ func (c *notebookGRPCClient) ListNotebookRuntimes(ctx context.Context, req *aipl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookRuntimes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookRuntimes, req, settings.GRPC, c.logger, "ListNotebookRuntimes") return err }, opts...) if err != nil { @@ -707,7 +711,7 @@ func (c *notebookGRPCClient) DeleteNotebookRuntime(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookRuntime, req, settings.GRPC, c.logger, "DeleteNotebookRuntime") return err }, opts...) if err != nil { @@ -727,7 +731,7 @@ func (c *notebookGRPCClient) UpgradeNotebookRuntime(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeNotebookRuntime, req, settings.GRPC, c.logger, "UpgradeNotebookRuntime") return err }, opts...) if err != nil { @@ -747,7 +751,7 @@ func (c *notebookGRPCClient) StartNotebookRuntime(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StartNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StartNotebookRuntime, req, settings.GRPC, c.logger, "StartNotebookRuntime") return err }, opts...) if err != nil { @@ -767,7 +771,7 @@ func (c *notebookGRPCClient) StopNotebookRuntime(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StopNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StopNotebookRuntime, req, settings.GRPC, c.logger, "StopNotebookRuntime") return err }, opts...) if err != nil { @@ -787,7 +791,7 @@ func (c *notebookGRPCClient) CreateNotebookExecutionJob(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateNotebookExecutionJob, req, settings.GRPC, c.logger, "CreateNotebookExecutionJob") return err }, opts...) if err != nil { @@ -807,7 +811,7 @@ func (c *notebookGRPCClient) GetNotebookExecutionJob(ctx context.Context, req *a var resp *aiplatformpb.NotebookExecutionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookExecutionJob, req, settings.GRPC, c.logger, "GetNotebookExecutionJob") return err }, opts...) if err != nil { @@ -836,7 +840,7 @@ func (c *notebookGRPCClient) ListNotebookExecutionJobs(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookExecutionJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookExecutionJobs, req, settings.GRPC, c.logger, "ListNotebookExecutionJobs") return err }, opts...) if err != nil { @@ -871,7 +875,7 @@ func (c *notebookGRPCClient) DeleteNotebookExecutionJob(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookExecutionJob, req, settings.GRPC, c.logger, "DeleteNotebookExecutionJob") return err }, opts...) if err != nil { @@ -891,7 +895,7 @@ func (c *notebookGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -920,7 +924,7 @@ func (c *notebookGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -955,7 +959,7 @@ func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -973,7 +977,7 @@ func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -991,7 +995,7 @@ func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1008,7 +1012,7 @@ func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1022,7 +1026,7 @@ func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1037,7 +1041,7 @@ func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1066,7 +1070,7 @@ func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1101,7 +1105,7 @@ func (c *notebookGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/notebook_client_example_go123_test.go b/aiplatform/apiv1/notebook_client_example_go123_test.go index 0e6b70a28a9c..197da954e3de 100644 --- a/aiplatform/apiv1/notebook_client_example_go123_test.go +++ b/aiplatform/apiv1/notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleNotebookClient_ListNotebookExecutionJobs_all() { } for resp, err := range c.ListNotebookExecutionJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleNotebookClient_ListNotebookRuntimeTemplates_all() { } for resp, err := range c.ListNotebookRuntimeTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleNotebookClient_ListNotebookRuntimes_all() { } for resp, err := range c.ListNotebookRuntimes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/persistent_resource_client.go b/aiplatform/apiv1/persistent_resource_client.go index 2453bc315d60..b061b60c9a3b 100755 --- a/aiplatform/apiv1/persistent_resource_client.go +++ b/aiplatform/apiv1/persistent_resource_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -303,6 +304,8 @@ type persistentResourceGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPersistentResourceClient creates a new persistent resource service client based on gRPC. @@ -329,6 +332,7 @@ func NewPersistentResourceClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, persistentResourceClient: aiplatformpb.NewPersistentResourceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -385,7 +389,7 @@ func (c *persistentResourceGRPCClient) CreatePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.CreatePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.CreatePersistentResource, req, settings.GRPC, c.logger, "CreatePersistentResource") return err }, opts...) if err != nil { @@ -405,7 +409,7 @@ func (c *persistentResourceGRPCClient) GetPersistentResource(ctx context.Context var resp *aiplatformpb.PersistentResource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.GetPersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.GetPersistentResource, req, settings.GRPC, c.logger, "GetPersistentResource") return err }, opts...) if err != nil { @@ -434,7 +438,7 @@ func (c *persistentResourceGRPCClient) ListPersistentResources(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.ListPersistentResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.ListPersistentResources, req, settings.GRPC, c.logger, "ListPersistentResources") return err }, opts...) if err != nil { @@ -469,7 +473,7 @@ func (c *persistentResourceGRPCClient) DeletePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.DeletePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.DeletePersistentResource, req, settings.GRPC, c.logger, "DeletePersistentResource") return err }, opts...) if err != nil { @@ -489,7 +493,7 @@ func (c *persistentResourceGRPCClient) UpdatePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.UpdatePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.UpdatePersistentResource, req, settings.GRPC, c.logger, "UpdatePersistentResource") return err }, opts...) if err != nil { @@ -509,7 +513,7 @@ func (c *persistentResourceGRPCClient) RebootPersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.RebootPersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.RebootPersistentResource, req, settings.GRPC, c.logger, "RebootPersistentResource") return err }, opts...) if err != nil { @@ -529,7 +533,7 @@ func (c *persistentResourceGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -558,7 +562,7 @@ func (c *persistentResourceGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -593,7 +597,7 @@ func (c *persistentResourceGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -611,7 +615,7 @@ func (c *persistentResourceGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -629,7 +633,7 @@ func (c *persistentResourceGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -646,7 +650,7 @@ func (c *persistentResourceGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -660,7 +664,7 @@ func (c *persistentResourceGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -675,7 +679,7 @@ func (c *persistentResourceGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -704,7 +708,7 @@ func (c *persistentResourceGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -739,7 +743,7 @@ func (c *persistentResourceGRPCClient) WaitOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/persistent_resource_client_example_go123_test.go b/aiplatform/apiv1/persistent_resource_client_example_go123_test.go index d662af6437a1..931592a6672d 100644 --- a/aiplatform/apiv1/persistent_resource_client_example_go123_test.go +++ b/aiplatform/apiv1/persistent_resource_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePersistentResourceClient_ListPersistentResources_all() { } for resp, err := range c.ListPersistentResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePersistentResourceClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePersistentResourceClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/pipeline_client.go b/aiplatform/apiv1/pipeline_client.go index a8aa6d47d04b..c648e26b9671 100755 --- a/aiplatform/apiv1/pipeline_client.go +++ b/aiplatform/apiv1/pipeline_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -387,6 +388,8 @@ type pipelineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPipelineClient creates a new pipeline service client based on gRPC. @@ -415,6 +418,7 @@ func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*Pipel connPool: connPool, pipelineClient: aiplatformpb.NewPipelineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -471,7 +475,7 @@ func (c *pipelineGRPCClient) CreateTrainingPipeline(ctx context.Context, req *ai var resp *aiplatformpb.TrainingPipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.CreateTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.CreateTrainingPipeline, req, settings.GRPC, c.logger, "CreateTrainingPipeline") return err }, opts...) if err != nil { @@ -489,7 +493,7 @@ func (c *pipelineGRPCClient) GetTrainingPipeline(ctx context.Context, req *aipla var resp *aiplatformpb.TrainingPipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.GetTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.GetTrainingPipeline, req, settings.GRPC, c.logger, "GetTrainingPipeline") return err }, opts...) if err != nil { @@ -518,7 +522,7 @@ func (c *pipelineGRPCClient) ListTrainingPipelines(ctx context.Context, req *aip } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.ListTrainingPipelines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.ListTrainingPipelines, req, settings.GRPC, c.logger, "ListTrainingPipelines") return err }, opts...) if err != nil { @@ -553,7 +557,7 @@ func (c *pipelineGRPCClient) DeleteTrainingPipeline(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.DeleteTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.DeleteTrainingPipeline, req, settings.GRPC, c.logger, "DeleteTrainingPipeline") return err }, opts...) if err != nil { @@ -572,7 +576,7 @@ func (c *pipelineGRPCClient) CancelTrainingPipeline(ctx context.Context, req *ai opts = append((*c.CallOptions).CancelTrainingPipeline[0:len((*c.CallOptions).CancelTrainingPipeline):len((*c.CallOptions).CancelTrainingPipeline)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pipelineClient.CancelTrainingPipeline(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pipelineClient.CancelTrainingPipeline, req, settings.GRPC, c.logger, "CancelTrainingPipeline") return err }, opts...) return err @@ -587,7 +591,7 @@ func (c *pipelineGRPCClient) CreatePipelineJob(ctx context.Context, req *aiplatf var resp *aiplatformpb.PipelineJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.CreatePipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.CreatePipelineJob, req, settings.GRPC, c.logger, "CreatePipelineJob") return err }, opts...) if err != nil { @@ -605,7 +609,7 @@ func (c *pipelineGRPCClient) GetPipelineJob(ctx context.Context, req *aiplatform var resp *aiplatformpb.PipelineJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.GetPipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.GetPipelineJob, req, settings.GRPC, c.logger, "GetPipelineJob") return err }, opts...) if err != nil { @@ -634,7 +638,7 @@ func (c *pipelineGRPCClient) ListPipelineJobs(ctx context.Context, req *aiplatfo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.ListPipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.ListPipelineJobs, req, settings.GRPC, c.logger, "ListPipelineJobs") return err }, opts...) if err != nil { @@ -669,7 +673,7 @@ func (c *pipelineGRPCClient) DeletePipelineJob(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.DeletePipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.DeletePipelineJob, req, settings.GRPC, c.logger, "DeletePipelineJob") return err }, opts...) if err != nil { @@ -689,7 +693,7 @@ func (c *pipelineGRPCClient) BatchDeletePipelineJobs(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.BatchDeletePipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.BatchDeletePipelineJobs, req, settings.GRPC, c.logger, "BatchDeletePipelineJobs") return err }, opts...) if err != nil { @@ -708,7 +712,7 @@ func (c *pipelineGRPCClient) CancelPipelineJob(ctx context.Context, req *aiplatf opts = append((*c.CallOptions).CancelPipelineJob[0:len((*c.CallOptions).CancelPipelineJob):len((*c.CallOptions).CancelPipelineJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pipelineClient.CancelPipelineJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pipelineClient.CancelPipelineJob, req, settings.GRPC, c.logger, "CancelPipelineJob") return err }, opts...) return err @@ -723,7 +727,7 @@ func (c *pipelineGRPCClient) BatchCancelPipelineJobs(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.BatchCancelPipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.BatchCancelPipelineJobs, req, settings.GRPC, c.logger, "BatchCancelPipelineJobs") return err }, opts...) if err != nil { @@ -743,7 +747,7 @@ func (c *pipelineGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -772,7 +776,7 @@ func (c *pipelineGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -807,7 +811,7 @@ func (c *pipelineGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -825,7 +829,7 @@ func (c *pipelineGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -843,7 +847,7 @@ func (c *pipelineGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -860,7 +864,7 @@ func (c *pipelineGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -874,7 +878,7 @@ func (c *pipelineGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -889,7 +893,7 @@ func (c *pipelineGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -918,7 +922,7 @@ func (c *pipelineGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -953,7 +957,7 @@ func (c *pipelineGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/pipeline_client_example_go123_test.go b/aiplatform/apiv1/pipeline_client_example_go123_test.go index 26889e59c3ba..e0f010ad2977 100644 --- a/aiplatform/apiv1/pipeline_client_example_go123_test.go +++ b/aiplatform/apiv1/pipeline_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePipelineClient_ListPipelineJobs_all() { } for resp, err := range c.ListPipelineJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePipelineClient_ListTrainingPipelines_all() { } for resp, err := range c.ListTrainingPipelines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePipelineClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExamplePipelineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/prediction_client.go b/aiplatform/apiv1/prediction_client.go index d67972e2f2f7..9613fffac846 100755 --- a/aiplatform/apiv1/prediction_client.go +++ b/aiplatform/apiv1/prediction_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -346,6 +347,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -372,6 +375,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: aiplatformpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -417,7 +421,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *aiplatformpb.Pr var resp *aiplatformpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -435,7 +439,7 @@ func (c *predictionGRPCClient) RawPredict(ctx context.Context, req *aiplatformpb var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.RawPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.RawPredict, req, settings.GRPC, c.logger, "RawPredict") return err }, opts...) if err != nil { @@ -453,7 +457,9 @@ func (c *predictionGRPCClient) StreamRawPredict(ctx context.Context, req *aiplat var resp aiplatformpb.PredictionService_StreamRawPredictClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamRawPredict") resp, err = c.predictionClient.StreamRawPredict(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamRawPredict") return err }, opts...) if err != nil { @@ -471,7 +477,7 @@ func (c *predictionGRPCClient) DirectPredict(ctx context.Context, req *aiplatfor var resp *aiplatformpb.DirectPredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.DirectPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.DirectPredict, req, settings.GRPC, c.logger, "DirectPredict") return err }, opts...) if err != nil { @@ -489,7 +495,7 @@ func (c *predictionGRPCClient) DirectRawPredict(ctx context.Context, req *aiplat var resp *aiplatformpb.DirectRawPredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.DirectRawPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.DirectRawPredict, req, settings.GRPC, c.logger, "DirectRawPredict") return err }, opts...) if err != nil { @@ -504,7 +510,9 @@ func (c *predictionGRPCClient) StreamDirectPredict(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamDirectPredict[0:len((*c.CallOptions).StreamDirectPredict):len((*c.CallOptions).StreamDirectPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamDirectPredict") resp, err = c.predictionClient.StreamDirectPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamDirectPredict") return err }, opts...) if err != nil { @@ -519,7 +527,9 @@ func (c *predictionGRPCClient) StreamDirectRawPredict(ctx context.Context, opts opts = append((*c.CallOptions).StreamDirectRawPredict[0:len((*c.CallOptions).StreamDirectRawPredict):len((*c.CallOptions).StreamDirectRawPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamDirectRawPredict") resp, err = c.predictionClient.StreamDirectRawPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamDirectRawPredict") return err }, opts...) if err != nil { @@ -534,7 +544,9 @@ func (c *predictionGRPCClient) StreamingPredict(ctx context.Context, opts ...gax opts = append((*c.CallOptions).StreamingPredict[0:len((*c.CallOptions).StreamingPredict):len((*c.CallOptions).StreamingPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingPredict") resp, err = c.predictionClient.StreamingPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingPredict") return err }, opts...) if err != nil { @@ -552,7 +564,9 @@ func (c *predictionGRPCClient) ServerStreamingPredict(ctx context.Context, req * var resp aiplatformpb.PredictionService_ServerStreamingPredictClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ServerStreamingPredict") resp, err = c.predictionClient.ServerStreamingPredict(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ServerStreamingPredict") return err }, opts...) if err != nil { @@ -567,7 +581,9 @@ func (c *predictionGRPCClient) StreamingRawPredict(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingRawPredict[0:len((*c.CallOptions).StreamingRawPredict):len((*c.CallOptions).StreamingRawPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRawPredict") resp, err = c.predictionClient.StreamingRawPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRawPredict") return err }, opts...) if err != nil { @@ -585,7 +601,7 @@ func (c *predictionGRPCClient) Explain(ctx context.Context, req *aiplatformpb.Ex var resp *aiplatformpb.ExplainResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Explain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Explain, req, settings.GRPC, c.logger, "Explain") return err }, opts...) if err != nil { @@ -603,7 +619,7 @@ func (c *predictionGRPCClient) GenerateContent(ctx context.Context, req *aiplatf var resp *aiplatformpb.GenerateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.GenerateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.GenerateContent, req, settings.GRPC, c.logger, "GenerateContent") return err }, opts...) if err != nil { @@ -621,7 +637,9 @@ func (c *predictionGRPCClient) StreamGenerateContent(ctx context.Context, req *a var resp aiplatformpb.PredictionService_StreamGenerateContentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateContent") resp, err = c.predictionClient.StreamGenerateContent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateContent") return err }, opts...) if err != nil { @@ -639,7 +657,7 @@ func (c *predictionGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -668,7 +686,7 @@ func (c *predictionGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -703,7 +721,7 @@ func (c *predictionGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -721,7 +739,7 @@ func (c *predictionGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -739,7 +757,7 @@ func (c *predictionGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -756,7 +774,7 @@ func (c *predictionGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -770,7 +788,7 @@ func (c *predictionGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -785,7 +803,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -814,7 +832,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -849,7 +867,7 @@ func (c *predictionGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/prediction_client_example_go123_test.go b/aiplatform/apiv1/prediction_client_example_go123_test.go index dbbb5ec1b3c4..a6cac2f92a41 100644 --- a/aiplatform/apiv1/prediction_client_example_go123_test.go +++ b/aiplatform/apiv1/prediction_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExamplePredictionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/schedule_client.go b/aiplatform/apiv1/schedule_client.go index 1760e2924224..bc30ffb10321 100755 --- a/aiplatform/apiv1/schedule_client.go +++ b/aiplatform/apiv1/schedule_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -308,6 +309,8 @@ type scheduleGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewScheduleClient creates a new schedule service client based on gRPC. @@ -335,6 +338,7 @@ func NewScheduleClient(ctx context.Context, opts ...option.ClientOption) (*Sched connPool: connPool, scheduleClient: aiplatformpb.NewScheduleServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -391,7 +395,7 @@ func (c *scheduleGRPCClient) CreateSchedule(ctx context.Context, req *aiplatform var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.CreateSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.CreateSchedule, req, settings.GRPC, c.logger, "CreateSchedule") return err }, opts...) if err != nil { @@ -409,7 +413,7 @@ func (c *scheduleGRPCClient) DeleteSchedule(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.DeleteSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.DeleteSchedule, req, settings.GRPC, c.logger, "DeleteSchedule") return err }, opts...) if err != nil { @@ -429,7 +433,7 @@ func (c *scheduleGRPCClient) GetSchedule(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.GetSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.GetSchedule, req, settings.GRPC, c.logger, "GetSchedule") return err }, opts...) if err != nil { @@ -458,7 +462,7 @@ func (c *scheduleGRPCClient) ListSchedules(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.ListSchedules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.ListSchedules, req, settings.GRPC, c.logger, "ListSchedules") return err }, opts...) if err != nil { @@ -492,7 +496,7 @@ func (c *scheduleGRPCClient) PauseSchedule(ctx context.Context, req *aiplatformp opts = append((*c.CallOptions).PauseSchedule[0:len((*c.CallOptions).PauseSchedule):len((*c.CallOptions).PauseSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.scheduleClient.PauseSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.scheduleClient.PauseSchedule, req, settings.GRPC, c.logger, "PauseSchedule") return err }, opts...) return err @@ -506,7 +510,7 @@ func (c *scheduleGRPCClient) ResumeSchedule(ctx context.Context, req *aiplatform opts = append((*c.CallOptions).ResumeSchedule[0:len((*c.CallOptions).ResumeSchedule):len((*c.CallOptions).ResumeSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.scheduleClient.ResumeSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.scheduleClient.ResumeSchedule, req, settings.GRPC, c.logger, "ResumeSchedule") return err }, opts...) return err @@ -521,7 +525,7 @@ func (c *scheduleGRPCClient) UpdateSchedule(ctx context.Context, req *aiplatform var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.UpdateSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.UpdateSchedule, req, settings.GRPC, c.logger, "UpdateSchedule") return err }, opts...) if err != nil { @@ -539,7 +543,7 @@ func (c *scheduleGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -568,7 +572,7 @@ func (c *scheduleGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -603,7 +607,7 @@ func (c *scheduleGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -621,7 +625,7 @@ func (c *scheduleGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -639,7 +643,7 @@ func (c *scheduleGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -656,7 +660,7 @@ func (c *scheduleGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -670,7 +674,7 @@ func (c *scheduleGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -685,7 +689,7 @@ func (c *scheduleGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -714,7 +718,7 @@ func (c *scheduleGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -749,7 +753,7 @@ func (c *scheduleGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/schedule_client_example_go123_test.go b/aiplatform/apiv1/schedule_client_example_go123_test.go index 7c870d152789..5d9e87c11084 100644 --- a/aiplatform/apiv1/schedule_client_example_go123_test.go +++ b/aiplatform/apiv1/schedule_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleScheduleClient_ListSchedules_all() { } for resp, err := range c.ListSchedules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleScheduleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleScheduleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/specialist_pool_client.go b/aiplatform/apiv1/specialist_pool_client.go index 447660ff7705..0446a91380f7 100755 --- a/aiplatform/apiv1/specialist_pool_client.go +++ b/aiplatform/apiv1/specialist_pool_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -293,6 +294,8 @@ type specialistPoolGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpecialistPoolClient creates a new specialist pool service client based on gRPC. @@ -324,6 +327,7 @@ func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, specialistPoolClient: aiplatformpb.NewSpecialistPoolServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -380,7 +384,7 @@ func (c *specialistPoolGRPCClient) CreateSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.CreateSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.CreateSpecialistPool, req, settings.GRPC, c.logger, "CreateSpecialistPool") return err }, opts...) if err != nil { @@ -400,7 +404,7 @@ func (c *specialistPoolGRPCClient) GetSpecialistPool(ctx context.Context, req *a var resp *aiplatformpb.SpecialistPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.GetSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.GetSpecialistPool, req, settings.GRPC, c.logger, "GetSpecialistPool") return err }, opts...) if err != nil { @@ -429,7 +433,7 @@ func (c *specialistPoolGRPCClient) ListSpecialistPools(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.ListSpecialistPools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.ListSpecialistPools, req, settings.GRPC, c.logger, "ListSpecialistPools") return err }, opts...) if err != nil { @@ -464,7 +468,7 @@ func (c *specialistPoolGRPCClient) DeleteSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.DeleteSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.DeleteSpecialistPool, req, settings.GRPC, c.logger, "DeleteSpecialistPool") return err }, opts...) if err != nil { @@ -484,7 +488,7 @@ func (c *specialistPoolGRPCClient) UpdateSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.UpdateSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.UpdateSpecialistPool, req, settings.GRPC, c.logger, "UpdateSpecialistPool") return err }, opts...) if err != nil { @@ -504,7 +508,7 @@ func (c *specialistPoolGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -533,7 +537,7 @@ func (c *specialistPoolGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -568,7 +572,7 @@ func (c *specialistPoolGRPCClient) GetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -586,7 +590,7 @@ func (c *specialistPoolGRPCClient) SetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -604,7 +608,7 @@ func (c *specialistPoolGRPCClient) TestIamPermissions(ctx context.Context, req * var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -621,7 +625,7 @@ func (c *specialistPoolGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -635,7 +639,7 @@ func (c *specialistPoolGRPCClient) DeleteOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -650,7 +654,7 @@ func (c *specialistPoolGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -679,7 +683,7 @@ func (c *specialistPoolGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -714,7 +718,7 @@ func (c *specialistPoolGRPCClient) WaitOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/specialist_pool_client_example_go123_test.go b/aiplatform/apiv1/specialist_pool_client_example_go123_test.go index 45322c9caf0a..a4fbc3aefdf9 100644 --- a/aiplatform/apiv1/specialist_pool_client_example_go123_test.go +++ b/aiplatform/apiv1/specialist_pool_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSpecialistPoolClient_ListSpecialistPools_all() { } for resp, err := range c.ListSpecialistPools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSpecialistPoolClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSpecialistPoolClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/tensorboard_client.go b/aiplatform/apiv1/tensorboard_client.go index a282d4157aa3..a697fe531f61 100755 --- a/aiplatform/apiv1/tensorboard_client.go +++ b/aiplatform/apiv1/tensorboard_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -523,6 +524,8 @@ type tensorboardGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTensorboardClient creates a new tensorboard service client based on gRPC. @@ -549,6 +552,7 @@ func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*Te connPool: connPool, tensorboardClient: aiplatformpb.NewTensorboardServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -605,7 +609,7 @@ func (c *tensorboardGRPCClient) CreateTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboard, req, settings.GRPC, c.logger, "CreateTensorboard") return err }, opts...) if err != nil { @@ -625,7 +629,7 @@ func (c *tensorboardGRPCClient) GetTensorboard(ctx context.Context, req *aiplatf var resp *aiplatformpb.Tensorboard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboard, req, settings.GRPC, c.logger, "GetTensorboard") return err }, opts...) if err != nil { @@ -643,7 +647,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboard, req, settings.GRPC, c.logger, "UpdateTensorboard") return err }, opts...) if err != nil { @@ -674,7 +678,7 @@ func (c *tensorboardGRPCClient) ListTensorboards(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboards(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboards, req, settings.GRPC, c.logger, "ListTensorboards") return err }, opts...) if err != nil { @@ -709,7 +713,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboard, req, settings.GRPC, c.logger, "DeleteTensorboard") return err }, opts...) if err != nil { @@ -729,7 +733,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardUsage(ctx context.Context, req *a var resp *aiplatformpb.ReadTensorboardUsageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardUsage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardUsage, req, settings.GRPC, c.logger, "ReadTensorboardUsage") return err }, opts...) if err != nil { @@ -747,7 +751,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardSize(ctx context.Context, req *ai var resp *aiplatformpb.ReadTensorboardSizeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardSize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardSize, req, settings.GRPC, c.logger, "ReadTensorboardSize") return err }, opts...) if err != nil { @@ -765,7 +769,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardExperiment(ctx context.Context, var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardExperiment, req, settings.GRPC, c.logger, "CreateTensorboardExperiment") return err }, opts...) if err != nil { @@ -783,7 +787,7 @@ func (c *tensorboardGRPCClient) GetTensorboardExperiment(ctx context.Context, re var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardExperiment, req, settings.GRPC, c.logger, "GetTensorboardExperiment") return err }, opts...) if err != nil { @@ -801,7 +805,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardExperiment(ctx context.Context, var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardExperiment, req, settings.GRPC, c.logger, "UpdateTensorboardExperiment") return err }, opts...) if err != nil { @@ -830,7 +834,7 @@ func (c *tensorboardGRPCClient) ListTensorboardExperiments(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardExperiments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardExperiments, req, settings.GRPC, c.logger, "ListTensorboardExperiments") return err }, opts...) if err != nil { @@ -865,7 +869,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardExperiment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardExperiment, req, settings.GRPC, c.logger, "DeleteTensorboardExperiment") return err }, opts...) if err != nil { @@ -885,7 +889,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardRun(ctx context.Context, req *a var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardRun, req, settings.GRPC, c.logger, "CreateTensorboardRun") return err }, opts...) if err != nil { @@ -903,7 +907,7 @@ func (c *tensorboardGRPCClient) BatchCreateTensorboardRuns(ctx context.Context, var resp *aiplatformpb.BatchCreateTensorboardRunsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchCreateTensorboardRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchCreateTensorboardRuns, req, settings.GRPC, c.logger, "BatchCreateTensorboardRuns") return err }, opts...) if err != nil { @@ -921,7 +925,7 @@ func (c *tensorboardGRPCClient) GetTensorboardRun(ctx context.Context, req *aipl var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardRun, req, settings.GRPC, c.logger, "GetTensorboardRun") return err }, opts...) if err != nil { @@ -939,7 +943,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardRun(ctx context.Context, req *a var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardRun, req, settings.GRPC, c.logger, "UpdateTensorboardRun") return err }, opts...) if err != nil { @@ -968,7 +972,7 @@ func (c *tensorboardGRPCClient) ListTensorboardRuns(ctx context.Context, req *ai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardRuns, req, settings.GRPC, c.logger, "ListTensorboardRuns") return err }, opts...) if err != nil { @@ -1003,7 +1007,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardRun(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardRun, req, settings.GRPC, c.logger, "DeleteTensorboardRun") return err }, opts...) if err != nil { @@ -1023,7 +1027,7 @@ func (c *tensorboardGRPCClient) BatchCreateTensorboardTimeSeries(ctx context.Con var resp *aiplatformpb.BatchCreateTensorboardTimeSeriesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchCreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchCreateTensorboardTimeSeries, req, settings.GRPC, c.logger, "BatchCreateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1041,7 +1045,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardTimeSeries(ctx context.Context, var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardTimeSeries, req, settings.GRPC, c.logger, "CreateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1059,7 +1063,7 @@ func (c *tensorboardGRPCClient) GetTensorboardTimeSeries(ctx context.Context, re var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardTimeSeries, req, settings.GRPC, c.logger, "GetTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1077,7 +1081,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardTimeSeries(ctx context.Context, var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardTimeSeries, req, settings.GRPC, c.logger, "UpdateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1106,7 +1110,7 @@ func (c *tensorboardGRPCClient) ListTensorboardTimeSeries(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardTimeSeries, req, settings.GRPC, c.logger, "ListTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1141,7 +1145,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardTimeSeries(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardTimeSeries, req, settings.GRPC, c.logger, "DeleteTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1161,7 +1165,7 @@ func (c *tensorboardGRPCClient) BatchReadTensorboardTimeSeriesData(ctx context.C var resp *aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchReadTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "BatchReadTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1179,7 +1183,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardTimeSeriesData(ctx context.Contex var resp *aiplatformpb.ReadTensorboardTimeSeriesDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "ReadTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1197,7 +1201,9 @@ func (c *tensorboardGRPCClient) ReadTensorboardBlobData(ctx context.Context, req var resp aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadTensorboardBlobData") resp, err = c.tensorboardClient.ReadTensorboardBlobData(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadTensorboardBlobData") return err }, opts...) if err != nil { @@ -1215,7 +1221,7 @@ func (c *tensorboardGRPCClient) WriteTensorboardExperimentData(ctx context.Conte var resp *aiplatformpb.WriteTensorboardExperimentDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.WriteTensorboardExperimentData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.WriteTensorboardExperimentData, req, settings.GRPC, c.logger, "WriteTensorboardExperimentData") return err }, opts...) if err != nil { @@ -1233,7 +1239,7 @@ func (c *tensorboardGRPCClient) WriteTensorboardRunData(ctx context.Context, req var resp *aiplatformpb.WriteTensorboardRunDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.WriteTensorboardRunData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.WriteTensorboardRunData, req, settings.GRPC, c.logger, "WriteTensorboardRunData") return err }, opts...) if err != nil { @@ -1262,7 +1268,7 @@ func (c *tensorboardGRPCClient) ExportTensorboardTimeSeriesData(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ExportTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ExportTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "ExportTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1297,7 +1303,7 @@ func (c *tensorboardGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1326,7 +1332,7 @@ func (c *tensorboardGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1361,7 +1367,7 @@ func (c *tensorboardGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1379,7 +1385,7 @@ func (c *tensorboardGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1397,7 +1403,7 @@ func (c *tensorboardGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1414,7 +1420,7 @@ func (c *tensorboardGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1428,7 +1434,7 @@ func (c *tensorboardGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1443,7 +1449,7 @@ func (c *tensorboardGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1472,7 +1478,7 @@ func (c *tensorboardGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1507,7 +1513,7 @@ func (c *tensorboardGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/tensorboard_client_example_go123_test.go b/aiplatform/apiv1/tensorboard_client_example_go123_test.go index 6f716ac883ea..d3efd571c449 100644 --- a/aiplatform/apiv1/tensorboard_client_example_go123_test.go +++ b/aiplatform/apiv1/tensorboard_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTensorboardClient_ExportTensorboardTimeSeriesData_all() { } for resp, err := range c.ExportTensorboardTimeSeriesData(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTensorboardClient_ListTensorboardExperiments_all() { } for resp, err := range c.ListTensorboardExperiments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTensorboardClient_ListTensorboardRuns_all() { } for resp, err := range c.ListTensorboardRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleTensorboardClient_ListTensorboardTimeSeries_all() { } for resp, err := range c.ListTensorboardTimeSeries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleTensorboardClient_ListTensorboards_all() { } for resp, err := range c.ListTensorboards(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleTensorboardClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleTensorboardClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/vertex_rag_client.go b/aiplatform/apiv1/vertex_rag_client.go index 7a16c17a41b5..520776c712f3 100755 --- a/aiplatform/apiv1/vertex_rag_client.go +++ b/aiplatform/apiv1/vertex_rag_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -242,6 +243,8 @@ type vertexRagGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVertexRagClient creates a new vertex rag service client based on gRPC. @@ -268,6 +271,7 @@ func NewVertexRagClient(ctx context.Context, opts ...option.ClientOption) (*Vert connPool: connPool, vertexRagClient: aiplatformpb.NewVertexRagServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -313,7 +317,7 @@ func (c *vertexRagGRPCClient) RetrieveContexts(ctx context.Context, req *aiplatf var resp *aiplatformpb.RetrieveContextsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.RetrieveContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.RetrieveContexts, req, settings.GRPC, c.logger, "RetrieveContexts") return err }, opts...) if err != nil { @@ -331,7 +335,7 @@ func (c *vertexRagGRPCClient) AugmentPrompt(ctx context.Context, req *aiplatform var resp *aiplatformpb.AugmentPromptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.AugmentPrompt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.AugmentPrompt, req, settings.GRPC, c.logger, "AugmentPrompt") return err }, opts...) if err != nil { @@ -349,7 +353,7 @@ func (c *vertexRagGRPCClient) CorroborateContent(ctx context.Context, req *aipla var resp *aiplatformpb.CorroborateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.CorroborateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.CorroborateContent, req, settings.GRPC, c.logger, "CorroborateContent") return err }, opts...) if err != nil { @@ -367,7 +371,7 @@ func (c *vertexRagGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -396,7 +400,7 @@ func (c *vertexRagGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -431,7 +435,7 @@ func (c *vertexRagGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -449,7 +453,7 @@ func (c *vertexRagGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -467,7 +471,7 @@ func (c *vertexRagGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -484,7 +488,7 @@ func (c *vertexRagGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -498,7 +502,7 @@ func (c *vertexRagGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -513,7 +517,7 @@ func (c *vertexRagGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -542,7 +546,7 @@ func (c *vertexRagGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -577,7 +581,7 @@ func (c *vertexRagGRPCClient) WaitOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/vertex_rag_client_example_go123_test.go b/aiplatform/apiv1/vertex_rag_client_example_go123_test.go index 9ec7cf3d2f01..19baabad92a9 100644 --- a/aiplatform/apiv1/vertex_rag_client_example_go123_test.go +++ b/aiplatform/apiv1/vertex_rag_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleVertexRagClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleVertexRagClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/vertex_rag_data_client.go b/aiplatform/apiv1/vertex_rag_data_client.go index e30703208f38..b0af1b64c60b 100755 --- a/aiplatform/apiv1/vertex_rag_data_client.go +++ b/aiplatform/apiv1/vertex_rag_data_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -342,6 +343,8 @@ type vertexRagDataGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVertexRagDataClient creates a new vertex rag data service client based on gRPC. @@ -368,6 +371,7 @@ func NewVertexRagDataClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, vertexRagDataClient: aiplatformpb.NewVertexRagDataServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -424,7 +428,7 @@ func (c *vertexRagDataGRPCClient) CreateRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.CreateRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.CreateRagCorpus, req, settings.GRPC, c.logger, "CreateRagCorpus") return err }, opts...) if err != nil { @@ -444,7 +448,7 @@ func (c *vertexRagDataGRPCClient) UpdateRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.UpdateRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.UpdateRagCorpus, req, settings.GRPC, c.logger, "UpdateRagCorpus") return err }, opts...) if err != nil { @@ -464,7 +468,7 @@ func (c *vertexRagDataGRPCClient) GetRagCorpus(ctx context.Context, req *aiplatf var resp *aiplatformpb.RagCorpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.GetRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.GetRagCorpus, req, settings.GRPC, c.logger, "GetRagCorpus") return err }, opts...) if err != nil { @@ -493,7 +497,7 @@ func (c *vertexRagDataGRPCClient) ListRagCorpora(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ListRagCorpora(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ListRagCorpora, req, settings.GRPC, c.logger, "ListRagCorpora") return err }, opts...) if err != nil { @@ -528,7 +532,7 @@ func (c *vertexRagDataGRPCClient) DeleteRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.DeleteRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.DeleteRagCorpus, req, settings.GRPC, c.logger, "DeleteRagCorpus") return err }, opts...) if err != nil { @@ -548,7 +552,7 @@ func (c *vertexRagDataGRPCClient) UploadRagFile(ctx context.Context, req *aiplat var resp *aiplatformpb.UploadRagFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.UploadRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.UploadRagFile, req, settings.GRPC, c.logger, "UploadRagFile") return err }, opts...) if err != nil { @@ -566,7 +570,7 @@ func (c *vertexRagDataGRPCClient) ImportRagFiles(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ImportRagFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ImportRagFiles, req, settings.GRPC, c.logger, "ImportRagFiles") return err }, opts...) if err != nil { @@ -586,7 +590,7 @@ func (c *vertexRagDataGRPCClient) GetRagFile(ctx context.Context, req *aiplatfor var resp *aiplatformpb.RagFile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.GetRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.GetRagFile, req, settings.GRPC, c.logger, "GetRagFile") return err }, opts...) if err != nil { @@ -615,7 +619,7 @@ func (c *vertexRagDataGRPCClient) ListRagFiles(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ListRagFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ListRagFiles, req, settings.GRPC, c.logger, "ListRagFiles") return err }, opts...) if err != nil { @@ -650,7 +654,7 @@ func (c *vertexRagDataGRPCClient) DeleteRagFile(ctx context.Context, req *aiplat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.DeleteRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.DeleteRagFile, req, settings.GRPC, c.logger, "DeleteRagFile") return err }, opts...) if err != nil { @@ -670,7 +674,7 @@ func (c *vertexRagDataGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -699,7 +703,7 @@ func (c *vertexRagDataGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -734,7 +738,7 @@ func (c *vertexRagDataGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -752,7 +756,7 @@ func (c *vertexRagDataGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -770,7 +774,7 @@ func (c *vertexRagDataGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -787,7 +791,7 @@ func (c *vertexRagDataGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -801,7 +805,7 @@ func (c *vertexRagDataGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -816,7 +820,7 @@ func (c *vertexRagDataGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -845,7 +849,7 @@ func (c *vertexRagDataGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -880,7 +884,7 @@ func (c *vertexRagDataGRPCClient) WaitOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/vertex_rag_data_client_example_go123_test.go b/aiplatform/apiv1/vertex_rag_data_client_example_go123_test.go index 08dd8377578c..468de9a92f73 100644 --- a/aiplatform/apiv1/vertex_rag_data_client_example_go123_test.go +++ b/aiplatform/apiv1/vertex_rag_data_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVertexRagDataClient_ListRagCorpora_all() { } for resp, err := range c.ListRagCorpora(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVertexRagDataClient_ListRagFiles_all() { } for resp, err := range c.ListRagFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVertexRagDataClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleVertexRagDataClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1/vizier_client.go b/aiplatform/apiv1/vizier_client.go index fac312f35dfb..648a47b32b02 100755 --- a/aiplatform/apiv1/vizier_client.go +++ b/aiplatform/apiv1/vizier_client.go @@ -19,6 +19,7 @@ package aiplatform import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -379,6 +380,8 @@ type vizierGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVizierClient creates a new vizier service client based on gRPC. @@ -409,6 +412,7 @@ func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierC connPool: connPool, vizierClient: aiplatformpb.NewVizierServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -465,7 +469,7 @@ func (c *vizierGRPCClient) CreateStudy(ctx context.Context, req *aiplatformpb.Cr var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CreateStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CreateStudy, req, settings.GRPC, c.logger, "CreateStudy") return err }, opts...) if err != nil { @@ -483,7 +487,7 @@ func (c *vizierGRPCClient) GetStudy(ctx context.Context, req *aiplatformpb.GetSt var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.GetStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.GetStudy, req, settings.GRPC, c.logger, "GetStudy") return err }, opts...) if err != nil { @@ -512,7 +516,7 @@ func (c *vizierGRPCClient) ListStudies(ctx context.Context, req *aiplatformpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListStudies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListStudies, req, settings.GRPC, c.logger, "ListStudies") return err }, opts...) if err != nil { @@ -546,7 +550,7 @@ func (c *vizierGRPCClient) DeleteStudy(ctx context.Context, req *aiplatformpb.De opts = append((*c.CallOptions).DeleteStudy[0:len((*c.CallOptions).DeleteStudy):len((*c.CallOptions).DeleteStudy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.vizierClient.DeleteStudy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.vizierClient.DeleteStudy, req, settings.GRPC, c.logger, "DeleteStudy") return err }, opts...) return err @@ -561,7 +565,7 @@ func (c *vizierGRPCClient) LookupStudy(ctx context.Context, req *aiplatformpb.Lo var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.LookupStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.LookupStudy, req, settings.GRPC, c.logger, "LookupStudy") return err }, opts...) if err != nil { @@ -579,7 +583,7 @@ func (c *vizierGRPCClient) SuggestTrials(ctx context.Context, req *aiplatformpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.SuggestTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.SuggestTrials, req, settings.GRPC, c.logger, "SuggestTrials") return err }, opts...) if err != nil { @@ -599,7 +603,7 @@ func (c *vizierGRPCClient) CreateTrial(ctx context.Context, req *aiplatformpb.Cr var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CreateTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CreateTrial, req, settings.GRPC, c.logger, "CreateTrial") return err }, opts...) if err != nil { @@ -617,7 +621,7 @@ func (c *vizierGRPCClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTr var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.GetTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.GetTrial, req, settings.GRPC, c.logger, "GetTrial") return err }, opts...) if err != nil { @@ -646,7 +650,7 @@ func (c *vizierGRPCClient) ListTrials(ctx context.Context, req *aiplatformpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListTrials, req, settings.GRPC, c.logger, "ListTrials") return err }, opts...) if err != nil { @@ -681,7 +685,7 @@ func (c *vizierGRPCClient) AddTrialMeasurement(ctx context.Context, req *aiplatf var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.AddTrialMeasurement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.AddTrialMeasurement, req, settings.GRPC, c.logger, "AddTrialMeasurement") return err }, opts...) if err != nil { @@ -699,7 +703,7 @@ func (c *vizierGRPCClient) CompleteTrial(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CompleteTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CompleteTrial, req, settings.GRPC, c.logger, "CompleteTrial") return err }, opts...) if err != nil { @@ -716,7 +720,7 @@ func (c *vizierGRPCClient) DeleteTrial(ctx context.Context, req *aiplatformpb.De opts = append((*c.CallOptions).DeleteTrial[0:len((*c.CallOptions).DeleteTrial):len((*c.CallOptions).DeleteTrial)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.vizierClient.DeleteTrial(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.vizierClient.DeleteTrial, req, settings.GRPC, c.logger, "DeleteTrial") return err }, opts...) return err @@ -731,7 +735,7 @@ func (c *vizierGRPCClient) CheckTrialEarlyStoppingState(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CheckTrialEarlyStoppingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CheckTrialEarlyStoppingState, req, settings.GRPC, c.logger, "CheckTrialEarlyStoppingState") return err }, opts...) if err != nil { @@ -751,7 +755,7 @@ func (c *vizierGRPCClient) StopTrial(ctx context.Context, req *aiplatformpb.Stop var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.StopTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.StopTrial, req, settings.GRPC, c.logger, "StopTrial") return err }, opts...) if err != nil { @@ -769,7 +773,7 @@ func (c *vizierGRPCClient) ListOptimalTrials(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ListOptimalTrialsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListOptimalTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListOptimalTrials, req, settings.GRPC, c.logger, "ListOptimalTrials") return err }, opts...) if err != nil { @@ -787,7 +791,7 @@ func (c *vizierGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -816,7 +820,7 @@ func (c *vizierGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -851,7 +855,7 @@ func (c *vizierGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -869,7 +873,7 @@ func (c *vizierGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -887,7 +891,7 @@ func (c *vizierGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Te var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -904,7 +908,7 @@ func (c *vizierGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -918,7 +922,7 @@ func (c *vizierGRPCClient) DeleteOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -933,7 +937,7 @@ func (c *vizierGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -962,7 +966,7 @@ func (c *vizierGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -997,7 +1001,7 @@ func (c *vizierGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { diff --git a/aiplatform/apiv1/vizier_client_example_go123_test.go b/aiplatform/apiv1/vizier_client_example_go123_test.go index dd0c7e83ac2d..5a3ec0ae19d2 100644 --- a/aiplatform/apiv1/vizier_client_example_go123_test.go +++ b/aiplatform/apiv1/vizier_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVizierClient_ListStudies_all() { } for resp, err := range c.ListStudies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVizierClient_ListTrials_all() { } for resp, err := range c.ListTrials(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVizierClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleVizierClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/aiplatformpb/accelerator_type.pb.go b/aiplatform/apiv1beta1/aiplatformpb/accelerator_type.pb.go index 382cfbfe1504..1461ffbc9802 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/accelerator_type.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/accelerator_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/accelerator_type.proto diff --git a/aiplatform/apiv1beta1/aiplatformpb/annotation.pb.go b/aiplatform/apiv1beta1/aiplatformpb/annotation.pb.go index 31ceacd1deb7..6c4d523febc7 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/annotation.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/annotation.proto @@ -94,11 +94,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -109,7 +107,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,20 +298,6 @@ func file_google_cloud_aiplatform_v1beta1_annotation_proto_init() { return } file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/annotation_spec.pb.go b/aiplatform/apiv1beta1/aiplatformpb/annotation_spec.pb.go index ccbf0ba79ad2..7b1b8c2d8063 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/annotation_spec.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/annotation_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/annotation_spec.proto @@ -60,11 +60,9 @@ type AnnotationSpec struct { func (x *AnnotationSpec) Reset() { *x = AnnotationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_annotation_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_annotation_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpec) String() string { @@ -75,7 +73,7 @@ func (*AnnotationSpec) ProtoMessage() {} func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_annotation_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,20 +211,6 @@ func file_google_cloud_aiplatform_v1beta1_annotation_spec_proto_init() { if File_google_cloud_aiplatform_v1beta1_annotation_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_annotation_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/api_auth.pb.go b/aiplatform/apiv1beta1/aiplatformpb/api_auth.pb.go index 9384ad1ddd5c..8c854bc6429f 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/api_auth.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/api_auth.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/api_auth.proto @@ -52,11 +52,9 @@ type ApiAuth struct { func (x *ApiAuth) Reset() { *x = ApiAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiAuth) String() string { @@ -67,7 +65,7 @@ func (*ApiAuth) ProtoMessage() {} func (x *ApiAuth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type ApiAuth_ApiKeyConfig struct { func (x *ApiAuth_ApiKeyConfig) Reset() { *x = ApiAuth_ApiKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiAuth_ApiKeyConfig) String() string { @@ -135,7 +131,7 @@ func (*ApiAuth_ApiKeyConfig) ProtoMessage() {} func (x *ApiAuth_ApiKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,32 +228,6 @@ func file_google_cloud_aiplatform_v1beta1_api_auth_proto_init() { if File_google_cloud_aiplatform_v1beta1_api_auth_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ApiAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApiAuth_ApiKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_api_auth_proto_msgTypes[0].OneofWrappers = []any{ (*ApiAuth_ApiKeyConfig_)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/artifact.pb.go b/aiplatform/apiv1beta1/aiplatformpb/artifact.pb.go index 24687a02d1e8..8c4c85ff3651 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/artifact.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/artifact.proto @@ -149,11 +149,9 @@ type Artifact struct { func (x *Artifact) Reset() { *x = Artifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifact) String() string { @@ -164,7 +162,7 @@ func (*Artifact) ProtoMessage() {} func (x *Artifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,20 +383,6 @@ func file_google_cloud_aiplatform_v1beta1_artifact_proto_init() { if File_google_cloud_aiplatform_v1beta1_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Artifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/batch_prediction_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/batch_prediction_job.pb.go index 8e69d84e3649..3ef4b4804f7a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/batch_prediction_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/batch_prediction_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/batch_prediction_job.proto @@ -230,11 +230,9 @@ type BatchPredictionJob struct { func (x *BatchPredictionJob) Reset() { *x = BatchPredictionJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob) String() string { @@ -245,7 +243,7 @@ func (*BatchPredictionJob) ProtoMessage() {} func (x *BatchPredictionJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +508,9 @@ type BatchPredictionJob_InputConfig struct { func (x *BatchPredictionJob_InputConfig) Reset() { *x = BatchPredictionJob_InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_InputConfig) String() string { @@ -525,7 +521,7 @@ func (*BatchPredictionJob_InputConfig) ProtoMessage() {} func (x *BatchPredictionJob_InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +687,9 @@ type BatchPredictionJob_InstanceConfig struct { func (x *BatchPredictionJob_InstanceConfig) Reset() { *x = BatchPredictionJob_InstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_InstanceConfig) String() string { @@ -706,7 +700,7 @@ func (*BatchPredictionJob_InstanceConfig) ProtoMessage() {} func (x *BatchPredictionJob_InstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +770,9 @@ type BatchPredictionJob_OutputConfig struct { func (x *BatchPredictionJob_OutputConfig) Reset() { *x = BatchPredictionJob_OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_OutputConfig) String() string { @@ -791,7 +783,7 @@ func (*BatchPredictionJob_OutputConfig) ProtoMessage() {} func (x *BatchPredictionJob_OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +910,9 @@ type BatchPredictionJob_OutputInfo struct { func (x *BatchPredictionJob_OutputInfo) Reset() { *x = BatchPredictionJob_OutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictionJob_OutputInfo) String() string { @@ -933,7 +923,7 @@ func (*BatchPredictionJob_OutputInfo) ProtoMessage() {} func (x *BatchPredictionJob_OutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,68 +1376,6 @@ func file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_init() { file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_init() file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_InstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictionJob_OutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_batch_prediction_job_proto_msgTypes[1].OneofWrappers = []any{ (*BatchPredictionJob_InputConfig_GcsSource)(nil), (*BatchPredictionJob_InputConfig_BigquerySource)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/cached_content.pb.go b/aiplatform/apiv1beta1/aiplatformpb/cached_content.pb.go index 184da6fd6630..004fbb243442 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/cached_content.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/cached_content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/cached_content.proto @@ -84,11 +84,9 @@ type CachedContent struct { func (x *CachedContent) Reset() { *x = CachedContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CachedContent) String() string { @@ -99,7 +97,7 @@ func (*CachedContent) ProtoMessage() {} func (x *CachedContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +244,9 @@ type CachedContent_UsageMetadata struct { func (x *CachedContent_UsageMetadata) Reset() { *x = CachedContent_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CachedContent_UsageMetadata) String() string { @@ -261,7 +257,7 @@ func (*CachedContent_UsageMetadata) ProtoMessage() {} func (x *CachedContent_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,32 +468,6 @@ func file_google_cloud_aiplatform_v1beta1_cached_content_proto_init() { } file_google_cloud_aiplatform_v1beta1_content_proto_init() file_google_cloud_aiplatform_v1beta1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CachedContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CachedContent_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_cached_content_proto_msgTypes[0].OneofWrappers = []any{ (*CachedContent_ExpireTime)(nil), (*CachedContent_Ttl)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/completion_stats.pb.go b/aiplatform/apiv1beta1/aiplatformpb/completion_stats.pb.go index 2fec6945c872..51ff873f8ba3 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/completion_stats.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/completion_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/completion_stats.proto @@ -61,11 +61,9 @@ type CompletionStats struct { func (x *CompletionStats) Reset() { *x = CompletionStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_completion_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_completion_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionStats) String() string { @@ -76,7 +74,7 @@ func (*CompletionStats) ProtoMessage() {} func (x *CompletionStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_completion_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,20 +189,6 @@ func file_google_cloud_aiplatform_v1beta1_completion_stats_proto_init() { if File_google_cloud_aiplatform_v1beta1_completion_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_completion_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompletionStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/content.pb.go b/aiplatform/apiv1beta1/aiplatformpb/content.pb.go index 8c3f28d713f7..98f68cde8022 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/content.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/content.proto @@ -510,11 +510,9 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content) String() string { @@ -525,7 +523,7 @@ func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +582,9 @@ type Part struct { func (x *Part) Reset() { *x = Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Part) String() string { @@ -599,7 +595,7 @@ func (*Part) ProtoMessage() {} func (x *Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +767,9 @@ type Blob struct { func (x *Blob) Reset() { *x = Blob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Blob) String() string { @@ -786,7 +780,7 @@ func (*Blob) ProtoMessage() {} func (x *Blob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +823,9 @@ type FileData struct { func (x *FileData) Reset() { *x = FileData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileData) String() string { @@ -844,7 +836,7 @@ func (*FileData) ProtoMessage() {} func (x *FileData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +879,9 @@ type VideoMetadata struct { func (x *VideoMetadata) Reset() { *x = VideoMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoMetadata) String() string { @@ -902,7 +892,7 @@ func (*VideoMetadata) ProtoMessage() {} func (x *VideoMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +974,9 @@ type GenerationConfig struct { func (x *GenerationConfig) Reset() { *x = GenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig) String() string { @@ -999,7 +987,7 @@ func (*GenerationConfig) ProtoMessage() {} func (x *GenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1124,9 @@ type SafetySetting struct { func (x *SafetySetting) Reset() { *x = SafetySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySetting) String() string { @@ -1151,7 +1137,7 @@ func (*SafetySetting) ProtoMessage() {} func (x *SafetySetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,11 +1196,9 @@ type SafetyRating struct { func (x *SafetyRating) Reset() { *x = SafetyRating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyRating) String() string { @@ -1225,7 +1209,7 @@ func (*SafetyRating) ProtoMessage() {} func (x *SafetyRating) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,11 +1278,9 @@ type CitationMetadata struct { func (x *CitationMetadata) Reset() { *x = CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CitationMetadata) String() string { @@ -1309,7 +1291,7 @@ func (*CitationMetadata) ProtoMessage() {} func (x *CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1335,9 @@ type Citation struct { func (x *Citation) Reset() { *x = Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Citation) String() string { @@ -1368,7 +1348,7 @@ func (*Citation) ProtoMessage() {} func (x *Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1457,11 +1437,9 @@ type Candidate struct { func (x *Candidate) Reset() { *x = Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Candidate) String() string { @@ -1472,7 +1450,7 @@ func (*Candidate) ProtoMessage() {} func (x *Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1543,9 @@ type LogprobsResult struct { func (x *LogprobsResult) Reset() { *x = LogprobsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult) String() string { @@ -1580,7 +1556,7 @@ func (*LogprobsResult) ProtoMessage() {} func (x *LogprobsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,11 +1605,9 @@ type Segment struct { func (x *Segment) Reset() { *x = Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Segment) String() string { @@ -1644,7 +1618,7 @@ func (*Segment) ProtoMessage() {} func (x *Segment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,11 +1678,9 @@ type GroundingChunk struct { func (x *GroundingChunk) Reset() { *x = GroundingChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk) String() string { @@ -1719,7 +1691,7 @@ func (*GroundingChunk) ProtoMessage() {} func (x *GroundingChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1766,9 @@ type GroundingSupport struct { func (x *GroundingSupport) Reset() { *x = GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingSupport) String() string { @@ -1809,7 +1779,7 @@ func (*GroundingSupport) ProtoMessage() {} func (x *GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1867,11 +1837,9 @@ type GroundingMetadata struct { func (x *GroundingMetadata) Reset() { *x = GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingMetadata) String() string { @@ -1882,7 +1850,7 @@ func (*GroundingMetadata) ProtoMessage() {} func (x *GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1923,9 @@ type SearchEntryPoint struct { func (x *SearchEntryPoint) Reset() { *x = SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntryPoint) String() string { @@ -1970,7 +1936,7 @@ func (*SearchEntryPoint) ProtoMessage() {} func (x *SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2015,11 +1981,9 @@ type RetrievalMetadata struct { func (x *RetrievalMetadata) Reset() { *x = RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrievalMetadata) String() string { @@ -2030,7 +1994,7 @@ func (*RetrievalMetadata) ProtoMessage() {} func (x *RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2069,11 +2033,9 @@ type GenerationConfig_RoutingConfig struct { func (x *GenerationConfig_RoutingConfig) Reset() { *x = GenerationConfig_RoutingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig) String() string { @@ -2084,7 +2046,7 @@ func (*GenerationConfig_RoutingConfig) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2152,11 +2114,9 @@ type GenerationConfig_RoutingConfig_AutoRoutingMode struct { func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) Reset() { *x = GenerationConfig_RoutingConfig_AutoRoutingMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) String() string { @@ -2167,7 +2127,7 @@ func (*GenerationConfig_RoutingConfig_AutoRoutingMode) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig_AutoRoutingMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2202,11 +2162,9 @@ type GenerationConfig_RoutingConfig_ManualRoutingMode struct { func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) Reset() { *x = GenerationConfig_RoutingConfig_ManualRoutingMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) String() string { @@ -2217,7 +2175,7 @@ func (*GenerationConfig_RoutingConfig_ManualRoutingMode) ProtoMessage() {} func (x *GenerationConfig_RoutingConfig_ManualRoutingMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2255,11 +2213,9 @@ type LogprobsResult_Candidate struct { func (x *LogprobsResult_Candidate) Reset() { *x = LogprobsResult_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_Candidate) String() string { @@ -2270,7 +2226,7 @@ func (*LogprobsResult_Candidate) ProtoMessage() {} func (x *LogprobsResult_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2318,11 +2274,9 @@ type LogprobsResult_TopCandidates struct { func (x *LogprobsResult_TopCandidates) Reset() { *x = LogprobsResult_TopCandidates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogprobsResult_TopCandidates) String() string { @@ -2333,7 +2287,7 @@ func (*LogprobsResult_TopCandidates) ProtoMessage() {} func (x *LogprobsResult_TopCandidates) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2369,11 +2323,9 @@ type GroundingChunk_Web struct { func (x *GroundingChunk_Web) Reset() { *x = GroundingChunk_Web{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_Web) String() string { @@ -2384,7 +2336,7 @@ func (*GroundingChunk_Web) ProtoMessage() {} func (x *GroundingChunk_Web) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2429,11 +2381,9 @@ type GroundingChunk_RetrievedContext struct { func (x *GroundingChunk_RetrievedContext) Reset() { *x = GroundingChunk_RetrievedContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingChunk_RetrievedContext) String() string { @@ -2444,7 +2394,7 @@ func (*GroundingChunk_RetrievedContext) ProtoMessage() {} func (x *GroundingChunk_RetrievedContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3095,308 +3045,6 @@ func file_google_cloud_aiplatform_v1beta1_content_proto_init() { } file_google_cloud_aiplatform_v1beta1_openapi_proto_init() file_google_cloud_aiplatform_v1beta1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Blob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FileData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VideoMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SafetySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SafetyRating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig_AutoRoutingMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerationConfig_RoutingConfig_ManualRoutingMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*LogprobsResult_TopCandidates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_Web); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GroundingChunk_RetrievedContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1].OneofWrappers = []any{ (*Part_Text)(nil), (*Part_InlineData)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/context.pb.go b/aiplatform/apiv1beta1/aiplatformpb/context.pb.go index 8b74904c2aa7..ddd269a212f7 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/context.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/context.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/context.proto @@ -89,11 +89,9 @@ type Context struct { func (x *Context) Reset() { *x = Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Context) String() string { @@ -104,7 +102,7 @@ func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,20 +309,6 @@ func file_google_cloud_aiplatform_v1beta1_context_proto_init() { if File_google_cloud_aiplatform_v1beta1_context_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/custom_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/custom_job.pb.go index 0c594746b482..6b4669917ca2 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/custom_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/custom_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/custom_job.proto @@ -177,11 +177,9 @@ type CustomJob struct { func (x *CustomJob) Reset() { *x = CustomJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomJob) String() string { @@ -192,7 +190,7 @@ func (*CustomJob) ProtoMessage() {} func (x *CustomJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +437,9 @@ type CustomJobSpec struct { func (x *CustomJobSpec) Reset() { *x = CustomJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomJobSpec) String() string { @@ -454,7 +450,7 @@ func (*CustomJobSpec) ProtoMessage() {} func (x *CustomJobSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +595,9 @@ type WorkerPoolSpec struct { func (x *WorkerPoolSpec) Reset() { *x = WorkerPoolSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerPoolSpec) String() string { @@ -614,7 +608,7 @@ func (*WorkerPoolSpec) ProtoMessage() {} func (x *WorkerPoolSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,11 +711,9 @@ type ContainerSpec struct { func (x *ContainerSpec) Reset() { *x = ContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerSpec) String() string { @@ -732,7 +724,7 @@ func (*ContainerSpec) ProtoMessage() {} func (x *ContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +795,9 @@ type PythonPackageSpec struct { func (x *PythonPackageSpec) Reset() { *x = PythonPackageSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PythonPackageSpec) String() string { @@ -818,7 +808,7 @@ func (*PythonPackageSpec) ProtoMessage() {} func (x *PythonPackageSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +885,9 @@ type Scheduling struct { func (x *Scheduling) Reset() { *x = Scheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling) String() string { @@ -910,7 +898,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1320,80 +1308,6 @@ func file_google_cloud_aiplatform_v1beta1_custom_job_proto_init() { file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomJobSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WorkerPoolSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PythonPackageSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Scheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_custom_job_proto_msgTypes[2].OneofWrappers = []any{ (*WorkerPoolSpec_ContainerSpec)(nil), (*WorkerPoolSpec_PythonPackageSpec)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/data_item.pb.go b/aiplatform/apiv1beta1/aiplatformpb/data_item.pb.go index e49c8f656b7f..f6781eb770b2 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/data_item.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/data_item.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/data_item.proto @@ -80,11 +80,9 @@ type DataItem struct { func (x *DataItem) Reset() { *x = DataItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_data_item_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_data_item_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataItem) String() string { @@ -95,7 +93,7 @@ func (*DataItem) ProtoMessage() {} func (x *DataItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_data_item_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,20 +271,6 @@ func file_google_cloud_aiplatform_v1beta1_data_item_proto_init() { if File_google_cloud_aiplatform_v1beta1_data_item_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_data_item_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/data_labeling_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/data_labeling_job.pb.go index b354002a00bf..07b55ca6911f 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/data_labeling_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/data_labeling_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/data_labeling_job.proto @@ -176,11 +176,9 @@ type DataLabelingJob struct { func (x *DataLabelingJob) Reset() { *x = DataLabelingJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataLabelingJob) String() string { @@ -191,7 +189,7 @@ func (*DataLabelingJob) ProtoMessage() {} func (x *DataLabelingJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +358,9 @@ type ActiveLearningConfig struct { func (x *ActiveLearningConfig) Reset() { *x = ActiveLearningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActiveLearningConfig) String() string { @@ -375,7 +371,7 @@ func (*ActiveLearningConfig) ProtoMessage() {} func (x *ActiveLearningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +467,9 @@ type SampleConfig struct { func (x *SampleConfig) Reset() { *x = SampleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleConfig) String() string { @@ -486,7 +480,7 @@ func (*SampleConfig) ProtoMessage() {} func (x *SampleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +568,9 @@ type TrainingConfig struct { func (x *TrainingConfig) Reset() { *x = TrainingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainingConfig) String() string { @@ -589,7 +581,7 @@ func (*TrainingConfig) ProtoMessage() {} func (x *TrainingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,56 +842,6 @@ func file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_init() { } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_job_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataLabelingJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ActiveLearningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SampleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TrainingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_data_labeling_job_proto_msgTypes[1].OneofWrappers = []any{ (*ActiveLearningConfig_MaxDataItemCount)(nil), (*ActiveLearningConfig_MaxDataItemPercentage)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/dataset.pb.go b/aiplatform/apiv1beta1/aiplatformpb/dataset.pb.go index 171af3467308..12b2e9f47930 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/dataset.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/dataset.proto @@ -113,11 +113,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -128,7 +126,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +301,9 @@ type ImportDataConfig struct { func (x *ImportDataConfig) Reset() { *x = ImportDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataConfig) String() string { @@ -318,7 +314,7 @@ func (*ImportDataConfig) ProtoMessage() {} func (x *ImportDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +404,9 @@ type ExportDataConfig struct { func (x *ExportDataConfig) Reset() { *x = ExportDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataConfig) String() string { @@ -423,7 +417,7 @@ func (*ExportDataConfig) ProtoMessage() {} func (x *ExportDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +518,9 @@ type ExportFractionSplit struct { func (x *ExportFractionSplit) Reset() { *x = ExportFractionSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFractionSplit) String() string { @@ -539,7 +531,7 @@ func (*ExportFractionSplit) ProtoMessage() {} func (x *ExportFractionSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,56 +787,6 @@ func file_google_cloud_aiplatform_v1beta1_dataset_proto_init() { file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_saved_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportFractionSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_dataset_proto_msgTypes[1].OneofWrappers = []any{ (*ImportDataConfig_GcsSource)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/dataset_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/dataset_service.pb.go index 082031dfc97d..f4712799eefb 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/dataset_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/dataset_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/dataset_service.proto @@ -59,11 +59,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateDatasetOperationMetadata struct { func (x *CreateDatasetOperationMetadata) Reset() { *x = CreateDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateDatasetOperationMetadata) ProtoMessage() {} func (x *CreateDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -183,7 +177,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +227,9 @@ type UpdateDatasetRequest struct { func (x *UpdateDatasetRequest) Reset() { *x = UpdateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetRequest) String() string { @@ -248,7 +240,7 @@ func (*UpdateDatasetRequest) ProtoMessage() {} func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +288,9 @@ type UpdateDatasetVersionRequest struct { func (x *UpdateDatasetVersionRequest) Reset() { *x = UpdateDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetVersionRequest) String() string { @@ -311,7 +301,7 @@ func (*UpdateDatasetVersionRequest) ProtoMessage() {} func (x *UpdateDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +373,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -398,7 +386,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +458,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -485,7 +471,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +515,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -544,7 +528,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +568,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -599,7 +581,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +620,9 @@ type ImportDataResponse struct { func (x *ImportDataResponse) Reset() { *x = ImportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataResponse) String() string { @@ -653,7 +633,7 @@ func (*ImportDataResponse) ProtoMessage() {} func (x *ImportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +661,9 @@ type ImportDataOperationMetadata struct { func (x *ImportDataOperationMetadata) Reset() { *x = ImportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationMetadata) String() string { @@ -696,7 +674,7 @@ func (*ImportDataOperationMetadata) ProtoMessage() {} func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +713,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -750,7 +726,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,11 +771,9 @@ type ExportDataResponse struct { func (x *ExportDataResponse) Reset() { *x = ExportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataResponse) String() string { @@ -810,7 +784,7 @@ func (*ExportDataResponse) ProtoMessage() {} func (x *ExportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +822,9 @@ type ExportDataOperationMetadata struct { func (x *ExportDataOperationMetadata) Reset() { *x = ExportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata) String() string { @@ -863,7 +835,7 @@ func (*ExportDataOperationMetadata) ProtoMessage() {} func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -911,11 +883,9 @@ type CreateDatasetVersionRequest struct { func (x *CreateDatasetVersionRequest) Reset() { *x = CreateDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetVersionRequest) String() string { @@ -926,7 +896,7 @@ func (*CreateDatasetVersionRequest) ProtoMessage() {} func (x *CreateDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +938,9 @@ type CreateDatasetVersionOperationMetadata struct { func (x *CreateDatasetVersionOperationMetadata) Reset() { *x = CreateDatasetVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetVersionOperationMetadata) String() string { @@ -983,7 +951,7 @@ func (*CreateDatasetVersionOperationMetadata) ProtoMessage() {} func (x *CreateDatasetVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +988,9 @@ type DeleteDatasetVersionRequest struct { func (x *DeleteDatasetVersionRequest) Reset() { *x = DeleteDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetVersionRequest) String() string { @@ -1035,7 +1001,7 @@ func (*DeleteDatasetVersionRequest) ProtoMessage() {} func (x *DeleteDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1040,9 @@ type GetDatasetVersionRequest struct { func (x *GetDatasetVersionRequest) Reset() { *x = GetDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetVersionRequest) String() string { @@ -1089,7 +1053,7 @@ func (*GetDatasetVersionRequest) ProtoMessage() {} func (x *GetDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1108,9 @@ type ListDatasetVersionsRequest struct { func (x *ListDatasetVersionsRequest) Reset() { *x = ListDatasetVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetVersionsRequest) String() string { @@ -1159,7 +1121,7 @@ func (*ListDatasetVersionsRequest) ProtoMessage() {} func (x *ListDatasetVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1193,9 @@ type ListDatasetVersionsResponse struct { func (x *ListDatasetVersionsResponse) Reset() { *x = ListDatasetVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetVersionsResponse) String() string { @@ -1246,7 +1206,7 @@ func (*ListDatasetVersionsResponse) ProtoMessage() {} func (x *ListDatasetVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1250,9 @@ type RestoreDatasetVersionRequest struct { func (x *RestoreDatasetVersionRequest) Reset() { *x = RestoreDatasetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatasetVersionRequest) String() string { @@ -1305,7 +1263,7 @@ func (*RestoreDatasetVersionRequest) ProtoMessage() {} func (x *RestoreDatasetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1298,9 @@ type RestoreDatasetVersionOperationMetadata struct { func (x *RestoreDatasetVersionOperationMetadata) Reset() { *x = RestoreDatasetVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatasetVersionOperationMetadata) String() string { @@ -1355,7 +1311,7 @@ func (*RestoreDatasetVersionOperationMetadata) ProtoMessage() {} func (x *RestoreDatasetVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1359,9 @@ type ListDataItemsRequest struct { func (x *ListDataItemsRequest) Reset() { *x = ListDataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsRequest) String() string { @@ -1418,7 +1372,7 @@ func (*ListDataItemsRequest) ProtoMessage() {} func (x *ListDataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1490,11 +1444,9 @@ type ListDataItemsResponse struct { func (x *ListDataItemsResponse) Reset() { *x = ListDataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsResponse) String() string { @@ -1505,7 +1457,7 @@ func (*ListDataItemsResponse) ProtoMessage() {} func (x *ListDataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1615,11 +1567,9 @@ type SearchDataItemsRequest struct { func (x *SearchDataItemsRequest) Reset() { *x = SearchDataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsRequest) String() string { @@ -1630,7 +1580,7 @@ func (*SearchDataItemsRequest) ProtoMessage() {} func (x *SearchDataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1783,11 +1733,9 @@ type SearchDataItemsResponse struct { func (x *SearchDataItemsResponse) Reset() { *x = SearchDataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsResponse) String() string { @@ -1798,7 +1746,7 @@ func (*SearchDataItemsResponse) ProtoMessage() {} func (x *SearchDataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1798,9 @@ type DataItemView struct { func (x *DataItemView) Reset() { *x = DataItemView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataItemView) String() string { @@ -1865,7 +1811,7 @@ func (*DataItemView) ProtoMessage() {} func (x *DataItemView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1927,11 +1873,9 @@ type ListSavedQueriesRequest struct { func (x *ListSavedQueriesRequest) Reset() { *x = ListSavedQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesRequest) String() string { @@ -1942,7 +1886,7 @@ func (*ListSavedQueriesRequest) ProtoMessage() {} func (x *ListSavedQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2014,11 +1958,9 @@ type ListSavedQueriesResponse struct { func (x *ListSavedQueriesResponse) Reset() { *x = ListSavedQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesResponse) String() string { @@ -2029,7 +1971,7 @@ func (*ListSavedQueriesResponse) ProtoMessage() {} func (x *ListSavedQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2073,11 +2015,9 @@ type DeleteSavedQueryRequest struct { func (x *DeleteSavedQueryRequest) Reset() { *x = DeleteSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSavedQueryRequest) String() string { @@ -2088,7 +2028,7 @@ func (*DeleteSavedQueryRequest) ProtoMessage() {} func (x *DeleteSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2127,11 +2067,9 @@ type GetAnnotationSpecRequest struct { func (x *GetAnnotationSpecRequest) Reset() { *x = GetAnnotationSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationSpecRequest) String() string { @@ -2142,7 +2080,7 @@ func (*GetAnnotationSpecRequest) ProtoMessage() {} func (x *GetAnnotationSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2135,9 @@ type ListAnnotationsRequest struct { func (x *ListAnnotationsRequest) Reset() { *x = ListAnnotationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsRequest) String() string { @@ -2212,7 +2148,7 @@ func (*ListAnnotationsRequest) ProtoMessage() {} func (x *ListAnnotationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2284,11 +2220,9 @@ type ListAnnotationsResponse struct { func (x *ListAnnotationsResponse) Reset() { *x = ListAnnotationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsResponse) String() string { @@ -2299,7 +2233,7 @@ func (*ListAnnotationsResponse) ProtoMessage() {} func (x *ListAnnotationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2345,11 +2279,9 @@ type SearchDataItemsRequest_OrderByAnnotation struct { func (x *SearchDataItemsRequest_OrderByAnnotation) Reset() { *x = SearchDataItemsRequest_OrderByAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDataItemsRequest_OrderByAnnotation) String() string { @@ -2360,7 +2292,7 @@ func (*SearchDataItemsRequest_OrderByAnnotation) ProtoMessage() {} func (x *SearchDataItemsRequest_OrderByAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3289,416 +3221,6 @@ func file_google_cloud_aiplatform_v1beta1_dataset_service_proto_init() { file_google_cloud_aiplatform_v1beta1_dataset_version_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_saved_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatasetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatasetVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DataItemView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchDataItemsRequest_OrderByAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_dataset_service_proto_msgTypes[24].OneofWrappers = []any{ (*SearchDataItemsRequest_OrderByDataItem)(nil), (*SearchDataItemsRequest_OrderByAnnotation_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/dataset_version.pb.go b/aiplatform/apiv1beta1/aiplatformpb/dataset_version.pb.go index 8ed88e6d4974..a320a4e4f073 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/dataset_version.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/dataset_version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/dataset_version.proto @@ -72,11 +72,9 @@ type DatasetVersion struct { func (x *DatasetVersion) Reset() { *x = DatasetVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_dataset_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_dataset_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetVersion) String() string { @@ -87,7 +85,7 @@ func (*DatasetVersion) ProtoMessage() {} func (x *DatasetVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_dataset_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,20 +277,6 @@ func file_google_cloud_aiplatform_v1beta1_dataset_version_proto_init() { if File_google_cloud_aiplatform_v1beta1_dataset_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_dataset_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DatasetVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/deployed_index_ref.pb.go b/aiplatform/apiv1beta1/aiplatformpb/deployed_index_ref.pb.go index 5977e2507af8..39faed481fb8 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/deployed_index_ref.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/deployed_index_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/deployed_index_ref.proto @@ -52,11 +52,9 @@ type DeployedIndexRef struct { func (x *DeployedIndexRef) Reset() { *x = DeployedIndexRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexRef) String() string { @@ -67,7 +65,7 @@ func (*DeployedIndexRef) ProtoMessage() {} func (x *DeployedIndexRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_init() { if File_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/deployed_model_ref.pb.go b/aiplatform/apiv1beta1/aiplatformpb/deployed_model_ref.pb.go index c7fb52d06b87..c682cb593fd9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/deployed_model_ref.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/deployed_model_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/deployed_model_ref.proto @@ -50,11 +50,9 @@ type DeployedModelRef struct { func (x *DeployedModelRef) Reset() { *x = DeployedModelRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModelRef) String() string { @@ -65,7 +63,7 @@ func (*DeployedModelRef) ProtoMessage() {} func (x *DeployedModelRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,20 +160,6 @@ func file_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto_init() { if File_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_deployed_model_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModelRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool.pb.go b/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool.pb.go index 63ff1105ba8a..71c3d2322999 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto @@ -81,11 +81,9 @@ type DeploymentResourcePool struct { func (x *DeploymentResourcePool) Reset() { *x = DeploymentResourcePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeploymentResourcePool) String() string { @@ -96,7 +94,7 @@ func (*DeploymentResourcePool) ProtoMessage() {} func (x *DeploymentResourcePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,20 +283,6 @@ func file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_init() } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeploymentResourcePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool_service.pb.go index 3542483edd51..5d4f0a07e76e 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/deployment_resource_pool_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto @@ -65,11 +65,9 @@ type CreateDeploymentResourcePoolRequest struct { func (x *CreateDeploymentResourcePoolRequest) Reset() { *x = CreateDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentResourcePoolRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateDeploymentResourcePoolRequest) ProtoMessage() {} func (x *CreateDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type CreateDeploymentResourcePoolOperationMetadata struct { func (x *CreateDeploymentResourcePoolOperationMetadata) Reset() { *x = CreateDeploymentResourcePoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentResourcePoolOperationMetadata) String() string { @@ -143,7 +139,7 @@ func (*CreateDeploymentResourcePoolOperationMetadata) ProtoMessage() {} func (x *CreateDeploymentResourcePoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +175,9 @@ type GetDeploymentResourcePoolRequest struct { func (x *GetDeploymentResourcePoolRequest) Reset() { *x = GetDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentResourcePoolRequest) String() string { @@ -194,7 +188,7 @@ func (*GetDeploymentResourcePoolRequest) ProtoMessage() {} func (x *GetDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +233,9 @@ type ListDeploymentResourcePoolsRequest struct { func (x *ListDeploymentResourcePoolsRequest) Reset() { *x = ListDeploymentResourcePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentResourcePoolsRequest) String() string { @@ -254,7 +246,7 @@ func (*ListDeploymentResourcePoolsRequest) ProtoMessage() {} func (x *ListDeploymentResourcePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type ListDeploymentResourcePoolsResponse struct { func (x *ListDeploymentResourcePoolsResponse) Reset() { *x = ListDeploymentResourcePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentResourcePoolsResponse) String() string { @@ -320,7 +310,7 @@ func (*ListDeploymentResourcePoolsResponse) ProtoMessage() {} func (x *ListDeploymentResourcePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type UpdateDeploymentResourcePoolRequest struct { func (x *UpdateDeploymentResourcePoolRequest) Reset() { *x = UpdateDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentResourcePoolRequest) String() string { @@ -383,7 +371,7 @@ func (*UpdateDeploymentResourcePoolRequest) ProtoMessage() {} func (x *UpdateDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +412,9 @@ type UpdateDeploymentResourcePoolOperationMetadata struct { func (x *UpdateDeploymentResourcePoolOperationMetadata) Reset() { *x = UpdateDeploymentResourcePoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentResourcePoolOperationMetadata) String() string { @@ -439,7 +425,7 @@ func (*UpdateDeploymentResourcePoolOperationMetadata) ProtoMessage() {} func (x *UpdateDeploymentResourcePoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +461,9 @@ type DeleteDeploymentResourcePoolRequest struct { func (x *DeleteDeploymentResourcePoolRequest) Reset() { *x = DeleteDeploymentResourcePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeploymentResourcePoolRequest) String() string { @@ -490,7 +474,7 @@ func (*DeleteDeploymentResourcePoolRequest) ProtoMessage() {} func (x *DeleteDeploymentResourcePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +520,9 @@ type QueryDeployedModelsRequest struct { func (x *QueryDeployedModelsRequest) Reset() { *x = QueryDeployedModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDeployedModelsRequest) String() string { @@ -551,7 +533,7 @@ func (*QueryDeployedModelsRequest) ProtoMessage() {} func (x *QueryDeployedModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +594,9 @@ type QueryDeployedModelsResponse struct { func (x *QueryDeployedModelsResponse) Reset() { *x = QueryDeployedModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDeployedModelsResponse) String() string { @@ -627,7 +607,7 @@ func (*QueryDeployedModelsResponse) ProtoMessage() {} func (x *QueryDeployedModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,128 +1021,6 @@ func file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_proto_init() file_google_cloud_aiplatform_v1beta1_endpoint_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentResourcePoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentResourcePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentResourcePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentResourcePoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeploymentResourcePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*QueryDeployedModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_deployment_resource_pool_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*QueryDeployedModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/encryption_spec.pb.go b/aiplatform/apiv1beta1/aiplatformpb/encryption_spec.pb.go index 30d0e4469754..a3c0236f6fe4 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/encryption_spec.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/encryption_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/encryption_spec.proto @@ -53,11 +53,9 @@ type EncryptionSpec struct { func (x *EncryptionSpec) Reset() { *x = EncryptionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionSpec) String() string { @@ -68,7 +66,7 @@ func (*EncryptionSpec) ProtoMessage() {} func (x *EncryptionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,20 +149,6 @@ func file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() { if File_google_cloud_aiplatform_v1beta1_encryption_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/endpoint.pb.go b/aiplatform/apiv1beta1/aiplatformpb/endpoint.pb.go index e2982faab2f1..9f12c6cd5da1 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/endpoint.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/endpoint.proto @@ -151,11 +151,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -166,7 +164,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +426,9 @@ type DeployedModel struct { func (x *DeployedModel) Reset() { *x = DeployedModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModel) String() string { @@ -443,7 +439,7 @@ func (*DeployedModel) ProtoMessage() {} func (x *DeployedModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +632,9 @@ type PrivateEndpoints struct { func (x *PrivateEndpoints) Reset() { *x = PrivateEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateEndpoints) String() string { @@ -651,7 +645,7 @@ func (*PrivateEndpoints) ProtoMessage() {} func (x *PrivateEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +710,9 @@ type PredictRequestResponseLoggingConfig struct { func (x *PredictRequestResponseLoggingConfig) Reset() { *x = PredictRequestResponseLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequestResponseLoggingConfig) String() string { @@ -731,7 +723,7 @@ func (*PredictRequestResponseLoggingConfig) ProtoMessage() {} func (x *PredictRequestResponseLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +771,9 @@ type ClientConnectionConfig struct { func (x *ClientConnectionConfig) Reset() { *x = ClientConnectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectionConfig) String() string { @@ -794,7 +784,7 @@ func (*ClientConnectionConfig) ProtoMessage() {} func (x *ClientConnectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +818,9 @@ type FasterDeploymentConfig struct { func (x *FasterDeploymentConfig) Reset() { *x = FasterDeploymentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FasterDeploymentConfig) String() string { @@ -843,7 +831,7 @@ func (*FasterDeploymentConfig) ProtoMessage() {} func (x *FasterDeploymentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +869,9 @@ type DeployedModel_Status struct { func (x *DeployedModel_Status) Reset() { *x = DeployedModel_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedModel_Status) String() string { @@ -896,7 +882,7 @@ func (*DeployedModel_Status) ProtoMessage() {} func (x *DeployedModel_Status) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,92 +1285,6 @@ func file_google_cloud_aiplatform_v1beta1_endpoint_proto_init() { file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PrivateEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequestResponseLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FasterDeploymentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeployedModel_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_endpoint_proto_msgTypes[1].OneofWrappers = []any{ (*DeployedModel_DedicatedResources)(nil), (*DeployedModel_AutomaticResources)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/endpoint_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/endpoint_service.pb.go index 3690d12cc10b..52874d194318 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/endpoint_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/endpoint_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/endpoint_service.proto @@ -74,11 +74,9 @@ type CreateEndpointRequest struct { func (x *CreateEndpointRequest) Reset() { *x = CreateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointRequest) String() string { @@ -89,7 +87,7 @@ func (*CreateEndpointRequest) ProtoMessage() {} func (x *CreateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type CreateEndpointOperationMetadata struct { func (x *CreateEndpointOperationMetadata) Reset() { *x = CreateEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointOperationMetadata) String() string { @@ -153,7 +149,7 @@ func (*CreateEndpointOperationMetadata) ProtoMessage() {} func (x *CreateEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type GetEndpointRequest struct { func (x *GetEndpointRequest) Reset() { *x = GetEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointRequest) String() string { @@ -205,7 +199,7 @@ func (*GetEndpointRequest) ProtoMessage() {} func (x *GetEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +266,9 @@ type ListEndpointsRequest struct { func (x *ListEndpointsRequest) Reset() { *x = ListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsRequest) String() string { @@ -287,7 +279,7 @@ func (*ListEndpointsRequest) ProtoMessage() {} func (x *ListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +347,9 @@ type ListEndpointsResponse struct { func (x *ListEndpointsResponse) Reset() { *x = ListEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsResponse) String() string { @@ -370,7 +360,7 @@ func (*ListEndpointsResponse) ProtoMessage() {} func (x *ListEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type UpdateEndpointRequest struct { func (x *UpdateEndpointRequest) Reset() { *x = UpdateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointRequest) String() string { @@ -430,7 +418,7 @@ func (*UpdateEndpointRequest) ProtoMessage() {} func (x *UpdateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +462,9 @@ type UpdateEndpointLongRunningRequest struct { func (x *UpdateEndpointLongRunningRequest) Reset() { *x = UpdateEndpointLongRunningRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointLongRunningRequest) String() string { @@ -489,7 +475,7 @@ func (*UpdateEndpointLongRunningRequest) ProtoMessage() {} func (x *UpdateEndpointLongRunningRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +510,9 @@ type UpdateEndpointOperationMetadata struct { func (x *UpdateEndpointOperationMetadata) Reset() { *x = UpdateEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointOperationMetadata) String() string { @@ -539,7 +523,7 @@ func (*UpdateEndpointOperationMetadata) ProtoMessage() {} func (x *UpdateEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +560,9 @@ type DeleteEndpointRequest struct { func (x *DeleteEndpointRequest) Reset() { *x = DeleteEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointRequest) String() string { @@ -591,7 +573,7 @@ func (*DeleteEndpointRequest) ProtoMessage() {} func (x *DeleteEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +630,9 @@ type DeployModelRequest struct { func (x *DeployModelRequest) Reset() { *x = DeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelRequest) String() string { @@ -663,7 +643,7 @@ func (*DeployModelRequest) ProtoMessage() {} func (x *DeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +692,9 @@ type DeployModelResponse struct { func (x *DeployModelResponse) Reset() { *x = DeployModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelResponse) String() string { @@ -727,7 +705,7 @@ func (*DeployModelResponse) ProtoMessage() {} func (x *DeployModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -762,11 +740,9 @@ type DeployModelOperationMetadata struct { func (x *DeployModelOperationMetadata) Reset() { *x = DeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelOperationMetadata) String() string { @@ -777,7 +753,7 @@ func (*DeployModelOperationMetadata) ProtoMessage() {} func (x *DeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +800,9 @@ type UndeployModelRequest struct { func (x *UndeployModelRequest) Reset() { *x = UndeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelRequest) String() string { @@ -839,7 +813,7 @@ func (*UndeployModelRequest) ProtoMessage() {} func (x *UndeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +859,9 @@ type UndeployModelResponse struct { func (x *UndeployModelResponse) Reset() { *x = UndeployModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelResponse) String() string { @@ -900,7 +872,7 @@ func (*UndeployModelResponse) ProtoMessage() {} func (x *UndeployModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +900,9 @@ type UndeployModelOperationMetadata struct { func (x *UndeployModelOperationMetadata) Reset() { *x = UndeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelOperationMetadata) String() string { @@ -943,7 +913,7 @@ func (*UndeployModelOperationMetadata) ProtoMessage() {} func (x *UndeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +966,9 @@ type MutateDeployedModelRequest struct { func (x *MutateDeployedModelRequest) Reset() { *x = MutateDeployedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelRequest) String() string { @@ -1011,7 +979,7 @@ func (*MutateDeployedModelRequest) ProtoMessage() {} func (x *MutateDeployedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1028,9 @@ type MutateDeployedModelResponse struct { func (x *MutateDeployedModelResponse) Reset() { *x = MutateDeployedModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelResponse) String() string { @@ -1075,7 +1041,7 @@ func (*MutateDeployedModelResponse) ProtoMessage() {} func (x *MutateDeployedModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1110,11 +1076,9 @@ type MutateDeployedModelOperationMetadata struct { func (x *MutateDeployedModelOperationMetadata) Reset() { *x = MutateDeployedModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedModelOperationMetadata) String() string { @@ -1125,7 +1089,7 @@ func (*MutateDeployedModelOperationMetadata) ProtoMessage() {} func (x *MutateDeployedModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1613,224 +1577,6 @@ func file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_endpoint_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointLongRunningRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_endpoint_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/entity_type.pb.go b/aiplatform/apiv1beta1/aiplatformpb/entity_type.pb.go index 279f92293faa..3365027faebc 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/entity_type.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/entity_type.proto @@ -100,11 +100,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -115,7 +113,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,20 +319,6 @@ func file_google_cloud_aiplatform_v1beta1_entity_type_proto_init() { return } file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/env_var.pb.go b/aiplatform/apiv1beta1/aiplatformpb/env_var.pb.go index ede9752c64c1..4f4c19ca5702 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/env_var.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/env_var.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/env_var.proto @@ -56,11 +56,9 @@ type EnvVar struct { func (x *EnvVar) Reset() { *x = EnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_env_var_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_env_var_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvVar) String() string { @@ -71,7 +69,7 @@ func (*EnvVar) ProtoMessage() {} func (x *EnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_env_var_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,20 +158,6 @@ func file_google_cloud_aiplatform_v1beta1_env_var_proto_init() { if File_google_cloud_aiplatform_v1beta1_env_var_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_env_var_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/evaluated_annotation.pb.go b/aiplatform/apiv1beta1/aiplatformpb/evaluated_annotation.pb.go index 8cc82e5dfbe4..70ff74242e84 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/evaluated_annotation.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/evaluated_annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/evaluated_annotation.proto @@ -227,11 +227,9 @@ type EvaluatedAnnotation struct { func (x *EvaluatedAnnotation) Reset() { *x = EvaluatedAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluatedAnnotation) String() string { @@ -242,7 +240,7 @@ func (*EvaluatedAnnotation) ProtoMessage() {} func (x *EvaluatedAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,11 +323,9 @@ type EvaluatedAnnotationExplanation struct { func (x *EvaluatedAnnotationExplanation) Reset() { *x = EvaluatedAnnotationExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluatedAnnotationExplanation) String() string { @@ -340,7 +336,7 @@ func (*EvaluatedAnnotationExplanation) ProtoMessage() {} func (x *EvaluatedAnnotationExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +385,9 @@ type ErrorAnalysisAnnotation struct { func (x *ErrorAnalysisAnnotation) Reset() { *x = ErrorAnalysisAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorAnalysisAnnotation) String() string { @@ -404,7 +398,7 @@ func (*ErrorAnalysisAnnotation) ProtoMessage() {} func (x *ErrorAnalysisAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +457,9 @@ type ErrorAnalysisAnnotation_AttributedItem struct { func (x *ErrorAnalysisAnnotation_AttributedItem) Reset() { *x = ErrorAnalysisAnnotation_AttributedItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorAnalysisAnnotation_AttributedItem) String() string { @@ -478,7 +470,7 @@ func (*ErrorAnalysisAnnotation_AttributedItem) ProtoMessage() {} func (x *ErrorAnalysisAnnotation_AttributedItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,56 +670,6 @@ func file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_init() { return } file_google_cloud_aiplatform_v1beta1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluatedAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluatedAnnotationExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ErrorAnalysisAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluated_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ErrorAnalysisAnnotation_AttributedItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/evaluation_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/evaluation_service.pb.go index 7551a1d8e4cc..5aba4d66e84a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/evaluation_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/evaluation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/evaluation_service.proto @@ -144,11 +144,9 @@ type EvaluateInstancesRequest struct { func (x *EvaluateInstancesRequest) Reset() { *x = EvaluateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateInstancesRequest) String() string { @@ -159,7 +157,7 @@ func (*EvaluateInstancesRequest) ProtoMessage() {} func (x *EvaluateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +662,9 @@ type EvaluateInstancesResponse struct { func (x *EvaluateInstancesResponse) Reset() { *x = EvaluateInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateInstancesResponse) String() string { @@ -679,7 +675,7 @@ func (*EvaluateInstancesResponse) ProtoMessage() {} func (x *EvaluateInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1151,9 @@ type ExactMatchInput struct { func (x *ExactMatchInput) Reset() { *x = ExactMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchInput) String() string { @@ -1170,7 +1164,7 @@ func (*ExactMatchInput) ProtoMessage() {} func (x *ExactMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1207,9 @@ type ExactMatchInstance struct { func (x *ExactMatchInstance) Reset() { *x = ExactMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchInstance) String() string { @@ -1228,7 +1220,7 @@ func (*ExactMatchInstance) ProtoMessage() {} func (x *ExactMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1267,11 +1259,9 @@ type ExactMatchSpec struct { func (x *ExactMatchSpec) Reset() { *x = ExactMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchSpec) String() string { @@ -1282,7 +1272,7 @@ func (*ExactMatchSpec) ProtoMessage() {} func (x *ExactMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1309,11 +1299,9 @@ type ExactMatchResults struct { func (x *ExactMatchResults) Reset() { *x = ExactMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchResults) String() string { @@ -1324,7 +1312,7 @@ func (*ExactMatchResults) ProtoMessage() {} func (x *ExactMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,11 +1346,9 @@ type ExactMatchMetricValue struct { func (x *ExactMatchMetricValue) Reset() { *x = ExactMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchMetricValue) String() string { @@ -1373,7 +1359,7 @@ func (*ExactMatchMetricValue) ProtoMessage() {} func (x *ExactMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1409,11 +1395,9 @@ type BleuInput struct { func (x *BleuInput) Reset() { *x = BleuInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuInput) String() string { @@ -1424,7 +1408,7 @@ func (*BleuInput) ProtoMessage() {} func (x *BleuInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1467,11 +1451,9 @@ type BleuInstance struct { func (x *BleuInstance) Reset() { *x = BleuInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuInstance) String() string { @@ -1482,7 +1464,7 @@ func (*BleuInstance) ProtoMessage() {} func (x *BleuInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,11 +1506,9 @@ type BleuSpec struct { func (x *BleuSpec) Reset() { *x = BleuSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuSpec) String() string { @@ -1539,7 +1519,7 @@ func (*BleuSpec) ProtoMessage() {} func (x *BleuSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,11 +1553,9 @@ type BleuResults struct { func (x *BleuResults) Reset() { *x = BleuResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuResults) String() string { @@ -1588,7 +1566,7 @@ func (*BleuResults) ProtoMessage() {} func (x *BleuResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1600,9 @@ type BleuMetricValue struct { func (x *BleuMetricValue) Reset() { *x = BleuMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BleuMetricValue) String() string { @@ -1637,7 +1613,7 @@ func (*BleuMetricValue) ProtoMessage() {} func (x *BleuMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1649,9 @@ type RougeInput struct { func (x *RougeInput) Reset() { *x = RougeInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeInput) String() string { @@ -1688,7 +1662,7 @@ func (*RougeInput) ProtoMessage() {} func (x *RougeInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1705,9 @@ type RougeInstance struct { func (x *RougeInstance) Reset() { *x = RougeInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeInstance) String() string { @@ -1746,7 +1718,7 @@ func (*RougeInstance) ProtoMessage() {} func (x *RougeInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1764,9 @@ type RougeSpec struct { func (x *RougeSpec) Reset() { *x = RougeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeSpec) String() string { @@ -1807,7 +1777,7 @@ func (*RougeSpec) ProtoMessage() {} func (x *RougeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1825,9 @@ type RougeResults struct { func (x *RougeResults) Reset() { *x = RougeResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeResults) String() string { @@ -1870,7 +1838,7 @@ func (*RougeResults) ProtoMessage() {} func (x *RougeResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1904,11 +1872,9 @@ type RougeMetricValue struct { func (x *RougeMetricValue) Reset() { *x = RougeMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RougeMetricValue) String() string { @@ -1919,7 +1885,7 @@ func (*RougeMetricValue) ProtoMessage() {} func (x *RougeMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1921,9 @@ type CoherenceInput struct { func (x *CoherenceInput) Reset() { *x = CoherenceInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceInput) String() string { @@ -1970,7 +1934,7 @@ func (*CoherenceInput) ProtoMessage() {} func (x *CoherenceInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2011,11 +1975,9 @@ type CoherenceInstance struct { func (x *CoherenceInstance) Reset() { *x = CoherenceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceInstance) String() string { @@ -2026,7 +1988,7 @@ func (*CoherenceInstance) ProtoMessage() {} func (x *CoherenceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +2022,9 @@ type CoherenceSpec struct { func (x *CoherenceSpec) Reset() { *x = CoherenceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceSpec) String() string { @@ -2075,7 +2035,7 @@ func (*CoherenceSpec) ProtoMessage() {} func (x *CoherenceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2113,11 +2073,9 @@ type CoherenceResult struct { func (x *CoherenceResult) Reset() { *x = CoherenceResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CoherenceResult) String() string { @@ -2128,7 +2086,7 @@ func (*CoherenceResult) ProtoMessage() {} func (x *CoherenceResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2178,11 +2136,9 @@ type FluencyInput struct { func (x *FluencyInput) Reset() { *x = FluencyInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyInput) String() string { @@ -2193,7 +2149,7 @@ func (*FluencyInput) ProtoMessage() {} func (x *FluencyInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,11 +2190,9 @@ type FluencyInstance struct { func (x *FluencyInstance) Reset() { *x = FluencyInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyInstance) String() string { @@ -2249,7 +2203,7 @@ func (*FluencyInstance) ProtoMessage() {} func (x *FluencyInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2283,11 +2237,9 @@ type FluencySpec struct { func (x *FluencySpec) Reset() { *x = FluencySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencySpec) String() string { @@ -2298,7 +2250,7 @@ func (*FluencySpec) ProtoMessage() {} func (x *FluencySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2336,11 +2288,9 @@ type FluencyResult struct { func (x *FluencyResult) Reset() { *x = FluencyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FluencyResult) String() string { @@ -2351,7 +2301,7 @@ func (*FluencyResult) ProtoMessage() {} func (x *FluencyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2401,11 +2351,9 @@ type SafetyInput struct { func (x *SafetyInput) Reset() { *x = SafetyInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyInput) String() string { @@ -2416,7 +2364,7 @@ func (*SafetyInput) ProtoMessage() {} func (x *SafetyInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2457,11 +2405,9 @@ type SafetyInstance struct { func (x *SafetyInstance) Reset() { *x = SafetyInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyInstance) String() string { @@ -2472,7 +2418,7 @@ func (*SafetyInstance) ProtoMessage() {} func (x *SafetyInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2506,11 +2452,9 @@ type SafetySpec struct { func (x *SafetySpec) Reset() { *x = SafetySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySpec) String() string { @@ -2521,7 +2465,7 @@ func (*SafetySpec) ProtoMessage() {} func (x *SafetySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2559,11 +2503,9 @@ type SafetyResult struct { func (x *SafetyResult) Reset() { *x = SafetyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetyResult) String() string { @@ -2574,7 +2516,7 @@ func (*SafetyResult) ProtoMessage() {} func (x *SafetyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2624,11 +2566,9 @@ type GroundednessInput struct { func (x *GroundednessInput) Reset() { *x = GroundednessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessInput) String() string { @@ -2639,7 +2579,7 @@ func (*GroundednessInput) ProtoMessage() {} func (x *GroundednessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2683,11 +2623,9 @@ type GroundednessInstance struct { func (x *GroundednessInstance) Reset() { *x = GroundednessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessInstance) String() string { @@ -2698,7 +2636,7 @@ func (*GroundednessInstance) ProtoMessage() {} func (x *GroundednessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2739,11 +2677,9 @@ type GroundednessSpec struct { func (x *GroundednessSpec) Reset() { *x = GroundednessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessSpec) String() string { @@ -2754,7 +2690,7 @@ func (*GroundednessSpec) ProtoMessage() {} func (x *GroundednessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2792,11 +2728,9 @@ type GroundednessResult struct { func (x *GroundednessResult) Reset() { *x = GroundednessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundednessResult) String() string { @@ -2807,7 +2741,7 @@ func (*GroundednessResult) ProtoMessage() {} func (x *GroundednessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2857,11 +2791,9 @@ type FulfillmentInput struct { func (x *FulfillmentInput) Reset() { *x = FulfillmentInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInput) String() string { @@ -2872,7 +2804,7 @@ func (*FulfillmentInput) ProtoMessage() {} func (x *FulfillmentInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2915,11 +2847,9 @@ type FulfillmentInstance struct { func (x *FulfillmentInstance) Reset() { *x = FulfillmentInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInstance) String() string { @@ -2930,7 +2860,7 @@ func (*FulfillmentInstance) ProtoMessage() {} func (x *FulfillmentInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2971,11 +2901,9 @@ type FulfillmentSpec struct { func (x *FulfillmentSpec) Reset() { *x = FulfillmentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentSpec) String() string { @@ -2986,7 +2914,7 @@ func (*FulfillmentSpec) ProtoMessage() {} func (x *FulfillmentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3024,11 +2952,9 @@ type FulfillmentResult struct { func (x *FulfillmentResult) Reset() { *x = FulfillmentResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentResult) String() string { @@ -3039,7 +2965,7 @@ func (*FulfillmentResult) ProtoMessage() {} func (x *FulfillmentResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3089,11 +3015,9 @@ type SummarizationQualityInput struct { func (x *SummarizationQualityInput) Reset() { *x = SummarizationQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityInput) String() string { @@ -3104,7 +3028,7 @@ func (*SummarizationQualityInput) ProtoMessage() {} func (x *SummarizationQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3151,11 +3075,9 @@ type SummarizationQualityInstance struct { func (x *SummarizationQualityInstance) Reset() { *x = SummarizationQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityInstance) String() string { @@ -3166,7 +3088,7 @@ func (*SummarizationQualityInstance) ProtoMessage() {} func (x *SummarizationQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3224,11 +3146,9 @@ type SummarizationQualitySpec struct { func (x *SummarizationQualitySpec) Reset() { *x = SummarizationQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualitySpec) String() string { @@ -3239,7 +3159,7 @@ func (*SummarizationQualitySpec) ProtoMessage() {} func (x *SummarizationQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3284,11 +3204,9 @@ type SummarizationQualityResult struct { func (x *SummarizationQualityResult) Reset() { *x = SummarizationQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationQualityResult) String() string { @@ -3299,7 +3217,7 @@ func (*SummarizationQualityResult) ProtoMessage() {} func (x *SummarizationQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3349,11 +3267,9 @@ type PairwiseSummarizationQualityInput struct { func (x *PairwiseSummarizationQualityInput) Reset() { *x = PairwiseSummarizationQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityInput) String() string { @@ -3364,7 +3280,7 @@ func (*PairwiseSummarizationQualityInput) ProtoMessage() {} func (x *PairwiseSummarizationQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3413,11 +3329,9 @@ type PairwiseSummarizationQualityInstance struct { func (x *PairwiseSummarizationQualityInstance) Reset() { *x = PairwiseSummarizationQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityInstance) String() string { @@ -3428,7 +3342,7 @@ func (*PairwiseSummarizationQualityInstance) ProtoMessage() {} func (x *PairwiseSummarizationQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3493,11 +3407,9 @@ type PairwiseSummarizationQualitySpec struct { func (x *PairwiseSummarizationQualitySpec) Reset() { *x = PairwiseSummarizationQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualitySpec) String() string { @@ -3508,7 +3420,7 @@ func (*PairwiseSummarizationQualitySpec) ProtoMessage() {} func (x *PairwiseSummarizationQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3553,11 +3465,9 @@ type PairwiseSummarizationQualityResult struct { func (x *PairwiseSummarizationQualityResult) Reset() { *x = PairwiseSummarizationQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseSummarizationQualityResult) String() string { @@ -3568,7 +3478,7 @@ func (*PairwiseSummarizationQualityResult) ProtoMessage() {} func (x *PairwiseSummarizationQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3618,11 +3528,9 @@ type SummarizationHelpfulnessInput struct { func (x *SummarizationHelpfulnessInput) Reset() { *x = SummarizationHelpfulnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessInput) String() string { @@ -3633,7 +3541,7 @@ func (*SummarizationHelpfulnessInput) ProtoMessage() {} func (x *SummarizationHelpfulnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3680,11 +3588,9 @@ type SummarizationHelpfulnessInstance struct { func (x *SummarizationHelpfulnessInstance) Reset() { *x = SummarizationHelpfulnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessInstance) String() string { @@ -3695,7 +3601,7 @@ func (*SummarizationHelpfulnessInstance) ProtoMessage() {} func (x *SummarizationHelpfulnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3753,11 +3659,9 @@ type SummarizationHelpfulnessSpec struct { func (x *SummarizationHelpfulnessSpec) Reset() { *x = SummarizationHelpfulnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessSpec) String() string { @@ -3768,7 +3672,7 @@ func (*SummarizationHelpfulnessSpec) ProtoMessage() {} func (x *SummarizationHelpfulnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3813,11 +3717,9 @@ type SummarizationHelpfulnessResult struct { func (x *SummarizationHelpfulnessResult) Reset() { *x = SummarizationHelpfulnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationHelpfulnessResult) String() string { @@ -3828,7 +3730,7 @@ func (*SummarizationHelpfulnessResult) ProtoMessage() {} func (x *SummarizationHelpfulnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3878,11 +3780,9 @@ type SummarizationVerbosityInput struct { func (x *SummarizationVerbosityInput) Reset() { *x = SummarizationVerbosityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityInput) String() string { @@ -3893,7 +3793,7 @@ func (*SummarizationVerbosityInput) ProtoMessage() {} func (x *SummarizationVerbosityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3940,11 +3840,9 @@ type SummarizationVerbosityInstance struct { func (x *SummarizationVerbosityInstance) Reset() { *x = SummarizationVerbosityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityInstance) String() string { @@ -3955,7 +3853,7 @@ func (*SummarizationVerbosityInstance) ProtoMessage() {} func (x *SummarizationVerbosityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4013,11 +3911,9 @@ type SummarizationVerbositySpec struct { func (x *SummarizationVerbositySpec) Reset() { *x = SummarizationVerbositySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbositySpec) String() string { @@ -4028,7 +3924,7 @@ func (*SummarizationVerbositySpec) ProtoMessage() {} func (x *SummarizationVerbositySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4073,11 +3969,9 @@ type SummarizationVerbosityResult struct { func (x *SummarizationVerbosityResult) Reset() { *x = SummarizationVerbosityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationVerbosityResult) String() string { @@ -4088,7 +3982,7 @@ func (*SummarizationVerbosityResult) ProtoMessage() {} func (x *SummarizationVerbosityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4138,11 +4032,9 @@ type QuestionAnsweringQualityInput struct { func (x *QuestionAnsweringQualityInput) Reset() { *x = QuestionAnsweringQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityInput) String() string { @@ -4153,7 +4045,7 @@ func (*QuestionAnsweringQualityInput) ProtoMessage() {} func (x *QuestionAnsweringQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4200,11 +4092,9 @@ type QuestionAnsweringQualityInstance struct { func (x *QuestionAnsweringQualityInstance) Reset() { *x = QuestionAnsweringQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityInstance) String() string { @@ -4215,7 +4105,7 @@ func (*QuestionAnsweringQualityInstance) ProtoMessage() {} func (x *QuestionAnsweringQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4273,11 +4163,9 @@ type QuestionAnsweringQualitySpec struct { func (x *QuestionAnsweringQualitySpec) Reset() { *x = QuestionAnsweringQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualitySpec) String() string { @@ -4288,7 +4176,7 @@ func (*QuestionAnsweringQualitySpec) ProtoMessage() {} func (x *QuestionAnsweringQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4333,11 +4221,9 @@ type QuestionAnsweringQualityResult struct { func (x *QuestionAnsweringQualityResult) Reset() { *x = QuestionAnsweringQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringQualityResult) String() string { @@ -4348,7 +4234,7 @@ func (*QuestionAnsweringQualityResult) ProtoMessage() {} func (x *QuestionAnsweringQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4398,11 +4284,9 @@ type PairwiseQuestionAnsweringQualityInput struct { func (x *PairwiseQuestionAnsweringQualityInput) Reset() { *x = PairwiseQuestionAnsweringQualityInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityInput) String() string { @@ -4413,7 +4297,7 @@ func (*PairwiseQuestionAnsweringQualityInput) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4462,11 +4346,9 @@ type PairwiseQuestionAnsweringQualityInstance struct { func (x *PairwiseQuestionAnsweringQualityInstance) Reset() { *x = PairwiseQuestionAnsweringQualityInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityInstance) String() string { @@ -4477,7 +4359,7 @@ func (*PairwiseQuestionAnsweringQualityInstance) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4542,11 +4424,9 @@ type PairwiseQuestionAnsweringQualitySpec struct { func (x *PairwiseQuestionAnsweringQualitySpec) Reset() { *x = PairwiseQuestionAnsweringQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualitySpec) String() string { @@ -4557,7 +4437,7 @@ func (*PairwiseQuestionAnsweringQualitySpec) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4602,11 +4482,9 @@ type PairwiseQuestionAnsweringQualityResult struct { func (x *PairwiseQuestionAnsweringQualityResult) Reset() { *x = PairwiseQuestionAnsweringQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseQuestionAnsweringQualityResult) String() string { @@ -4617,7 +4495,7 @@ func (*PairwiseQuestionAnsweringQualityResult) ProtoMessage() {} func (x *PairwiseQuestionAnsweringQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4667,11 +4545,9 @@ type QuestionAnsweringRelevanceInput struct { func (x *QuestionAnsweringRelevanceInput) Reset() { *x = QuestionAnsweringRelevanceInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceInput) String() string { @@ -4682,7 +4558,7 @@ func (*QuestionAnsweringRelevanceInput) ProtoMessage() {} func (x *QuestionAnsweringRelevanceInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4729,11 +4605,9 @@ type QuestionAnsweringRelevanceInstance struct { func (x *QuestionAnsweringRelevanceInstance) Reset() { *x = QuestionAnsweringRelevanceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceInstance) String() string { @@ -4744,7 +4618,7 @@ func (*QuestionAnsweringRelevanceInstance) ProtoMessage() {} func (x *QuestionAnsweringRelevanceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4802,11 +4676,9 @@ type QuestionAnsweringRelevanceSpec struct { func (x *QuestionAnsweringRelevanceSpec) Reset() { *x = QuestionAnsweringRelevanceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceSpec) String() string { @@ -4817,7 +4689,7 @@ func (*QuestionAnsweringRelevanceSpec) ProtoMessage() {} func (x *QuestionAnsweringRelevanceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4862,11 +4734,9 @@ type QuestionAnsweringRelevanceResult struct { func (x *QuestionAnsweringRelevanceResult) Reset() { *x = QuestionAnsweringRelevanceResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringRelevanceResult) String() string { @@ -4877,7 +4747,7 @@ func (*QuestionAnsweringRelevanceResult) ProtoMessage() {} func (x *QuestionAnsweringRelevanceResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4927,11 +4797,9 @@ type QuestionAnsweringHelpfulnessInput struct { func (x *QuestionAnsweringHelpfulnessInput) Reset() { *x = QuestionAnsweringHelpfulnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessInput) String() string { @@ -4942,7 +4810,7 @@ func (*QuestionAnsweringHelpfulnessInput) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4989,11 +4857,9 @@ type QuestionAnsweringHelpfulnessInstance struct { func (x *QuestionAnsweringHelpfulnessInstance) Reset() { *x = QuestionAnsweringHelpfulnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessInstance) String() string { @@ -5004,7 +4870,7 @@ func (*QuestionAnsweringHelpfulnessInstance) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5062,11 +4928,9 @@ type QuestionAnsweringHelpfulnessSpec struct { func (x *QuestionAnsweringHelpfulnessSpec) Reset() { *x = QuestionAnsweringHelpfulnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessSpec) String() string { @@ -5077,7 +4941,7 @@ func (*QuestionAnsweringHelpfulnessSpec) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5122,11 +4986,9 @@ type QuestionAnsweringHelpfulnessResult struct { func (x *QuestionAnsweringHelpfulnessResult) Reset() { *x = QuestionAnsweringHelpfulnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringHelpfulnessResult) String() string { @@ -5137,7 +4999,7 @@ func (*QuestionAnsweringHelpfulnessResult) ProtoMessage() {} func (x *QuestionAnsweringHelpfulnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5187,11 +5049,9 @@ type QuestionAnsweringCorrectnessInput struct { func (x *QuestionAnsweringCorrectnessInput) Reset() { *x = QuestionAnsweringCorrectnessInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessInput) String() string { @@ -5202,7 +5062,7 @@ func (*QuestionAnsweringCorrectnessInput) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5249,11 +5109,9 @@ type QuestionAnsweringCorrectnessInstance struct { func (x *QuestionAnsweringCorrectnessInstance) Reset() { *x = QuestionAnsweringCorrectnessInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessInstance) String() string { @@ -5264,7 +5122,7 @@ func (*QuestionAnsweringCorrectnessInstance) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5322,11 +5180,9 @@ type QuestionAnsweringCorrectnessSpec struct { func (x *QuestionAnsweringCorrectnessSpec) Reset() { *x = QuestionAnsweringCorrectnessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessSpec) String() string { @@ -5337,7 +5193,7 @@ func (*QuestionAnsweringCorrectnessSpec) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5382,11 +5238,9 @@ type QuestionAnsweringCorrectnessResult struct { func (x *QuestionAnsweringCorrectnessResult) Reset() { *x = QuestionAnsweringCorrectnessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuestionAnsweringCorrectnessResult) String() string { @@ -5397,7 +5251,7 @@ func (*QuestionAnsweringCorrectnessResult) ProtoMessage() {} func (x *QuestionAnsweringCorrectnessResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5447,11 +5301,9 @@ type PointwiseMetricInput struct { func (x *PointwiseMetricInput) Reset() { *x = PointwiseMetricInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricInput) String() string { @@ -5462,7 +5314,7 @@ func (*PointwiseMetricInput) ProtoMessage() {} func (x *PointwiseMetricInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5508,11 +5360,9 @@ type PointwiseMetricInstance struct { func (x *PointwiseMetricInstance) Reset() { *x = PointwiseMetricInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricInstance) String() string { @@ -5523,7 +5373,7 @@ func (*PointwiseMetricInstance) ProtoMessage() {} func (x *PointwiseMetricInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5577,11 +5427,9 @@ type PointwiseMetricSpec struct { func (x *PointwiseMetricSpec) Reset() { *x = PointwiseMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricSpec) String() string { @@ -5592,7 +5440,7 @@ func (*PointwiseMetricSpec) ProtoMessage() {} func (x *PointwiseMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5628,11 +5476,9 @@ type PointwiseMetricResult struct { func (x *PointwiseMetricResult) Reset() { *x = PointwiseMetricResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PointwiseMetricResult) String() string { @@ -5643,7 +5489,7 @@ func (*PointwiseMetricResult) ProtoMessage() {} func (x *PointwiseMetricResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5686,11 +5532,9 @@ type PairwiseMetricInput struct { func (x *PairwiseMetricInput) Reset() { *x = PairwiseMetricInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricInput) String() string { @@ -5701,7 +5545,7 @@ func (*PairwiseMetricInput) ProtoMessage() {} func (x *PairwiseMetricInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5747,11 +5591,9 @@ type PairwiseMetricInstance struct { func (x *PairwiseMetricInstance) Reset() { *x = PairwiseMetricInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricInstance) String() string { @@ -5762,7 +5604,7 @@ func (*PairwiseMetricInstance) ProtoMessage() {} func (x *PairwiseMetricInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5816,11 +5658,9 @@ type PairwiseMetricSpec struct { func (x *PairwiseMetricSpec) Reset() { *x = PairwiseMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricSpec) String() string { @@ -5831,7 +5671,7 @@ func (*PairwiseMetricSpec) ProtoMessage() {} func (x *PairwiseMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5867,11 +5707,9 @@ type PairwiseMetricResult struct { func (x *PairwiseMetricResult) Reset() { *x = PairwiseMetricResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PairwiseMetricResult) String() string { @@ -5882,7 +5720,7 @@ func (*PairwiseMetricResult) ProtoMessage() {} func (x *PairwiseMetricResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5925,11 +5763,9 @@ type ToolCallValidInput struct { func (x *ToolCallValidInput) Reset() { *x = ToolCallValidInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidInput) String() string { @@ -5940,7 +5776,7 @@ func (*ToolCallValidInput) ProtoMessage() {} func (x *ToolCallValidInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5978,11 +5814,9 @@ type ToolCallValidSpec struct { func (x *ToolCallValidSpec) Reset() { *x = ToolCallValidSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidSpec) String() string { @@ -5993,7 +5827,7 @@ func (*ToolCallValidSpec) ProtoMessage() {} func (x *ToolCallValidSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6022,11 +5856,9 @@ type ToolCallValidInstance struct { func (x *ToolCallValidInstance) Reset() { *x = ToolCallValidInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidInstance) String() string { @@ -6037,7 +5869,7 @@ func (*ToolCallValidInstance) ProtoMessage() {} func (x *ToolCallValidInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6078,11 +5910,9 @@ type ToolCallValidResults struct { func (x *ToolCallValidResults) Reset() { *x = ToolCallValidResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidResults) String() string { @@ -6093,7 +5923,7 @@ func (*ToolCallValidResults) ProtoMessage() {} func (x *ToolCallValidResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6127,11 +5957,9 @@ type ToolCallValidMetricValue struct { func (x *ToolCallValidMetricValue) Reset() { *x = ToolCallValidMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallValidMetricValue) String() string { @@ -6142,7 +5970,7 @@ func (*ToolCallValidMetricValue) ProtoMessage() {} func (x *ToolCallValidMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6178,11 +6006,9 @@ type ToolNameMatchInput struct { func (x *ToolNameMatchInput) Reset() { *x = ToolNameMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchInput) String() string { @@ -6193,7 +6019,7 @@ func (*ToolNameMatchInput) ProtoMessage() {} func (x *ToolNameMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6231,11 +6057,9 @@ type ToolNameMatchSpec struct { func (x *ToolNameMatchSpec) Reset() { *x = ToolNameMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchSpec) String() string { @@ -6246,7 +6070,7 @@ func (*ToolNameMatchSpec) ProtoMessage() {} func (x *ToolNameMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6275,11 +6099,9 @@ type ToolNameMatchInstance struct { func (x *ToolNameMatchInstance) Reset() { *x = ToolNameMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchInstance) String() string { @@ -6290,7 +6112,7 @@ func (*ToolNameMatchInstance) ProtoMessage() {} func (x *ToolNameMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6331,11 +6153,9 @@ type ToolNameMatchResults struct { func (x *ToolNameMatchResults) Reset() { *x = ToolNameMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchResults) String() string { @@ -6346,7 +6166,7 @@ func (*ToolNameMatchResults) ProtoMessage() {} func (x *ToolNameMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6380,11 +6200,9 @@ type ToolNameMatchMetricValue struct { func (x *ToolNameMatchMetricValue) Reset() { *x = ToolNameMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolNameMatchMetricValue) String() string { @@ -6395,7 +6213,7 @@ func (*ToolNameMatchMetricValue) ProtoMessage() {} func (x *ToolNameMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6431,11 +6249,9 @@ type ToolParameterKeyMatchInput struct { func (x *ToolParameterKeyMatchInput) Reset() { *x = ToolParameterKeyMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchInput) String() string { @@ -6446,7 +6262,7 @@ func (*ToolParameterKeyMatchInput) ProtoMessage() {} func (x *ToolParameterKeyMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6484,11 +6300,9 @@ type ToolParameterKeyMatchSpec struct { func (x *ToolParameterKeyMatchSpec) Reset() { *x = ToolParameterKeyMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchSpec) String() string { @@ -6499,7 +6313,7 @@ func (*ToolParameterKeyMatchSpec) ProtoMessage() {} func (x *ToolParameterKeyMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6528,11 +6342,9 @@ type ToolParameterKeyMatchInstance struct { func (x *ToolParameterKeyMatchInstance) Reset() { *x = ToolParameterKeyMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchInstance) String() string { @@ -6543,7 +6355,7 @@ func (*ToolParameterKeyMatchInstance) ProtoMessage() {} func (x *ToolParameterKeyMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6584,11 +6396,9 @@ type ToolParameterKeyMatchResults struct { func (x *ToolParameterKeyMatchResults) Reset() { *x = ToolParameterKeyMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchResults) String() string { @@ -6599,7 +6409,7 @@ func (*ToolParameterKeyMatchResults) ProtoMessage() {} func (x *ToolParameterKeyMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6633,11 +6443,9 @@ type ToolParameterKeyMatchMetricValue struct { func (x *ToolParameterKeyMatchMetricValue) Reset() { *x = ToolParameterKeyMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKeyMatchMetricValue) String() string { @@ -6648,7 +6456,7 @@ func (*ToolParameterKeyMatchMetricValue) ProtoMessage() {} func (x *ToolParameterKeyMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6684,11 +6492,9 @@ type ToolParameterKVMatchInput struct { func (x *ToolParameterKVMatchInput) Reset() { *x = ToolParameterKVMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchInput) String() string { @@ -6699,7 +6505,7 @@ func (*ToolParameterKVMatchInput) ProtoMessage() {} func (x *ToolParameterKVMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6740,11 +6546,9 @@ type ToolParameterKVMatchSpec struct { func (x *ToolParameterKVMatchSpec) Reset() { *x = ToolParameterKVMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchSpec) String() string { @@ -6755,7 +6559,7 @@ func (*ToolParameterKVMatchSpec) ProtoMessage() {} func (x *ToolParameterKVMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6791,11 +6595,9 @@ type ToolParameterKVMatchInstance struct { func (x *ToolParameterKVMatchInstance) Reset() { *x = ToolParameterKVMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchInstance) String() string { @@ -6806,7 +6608,7 @@ func (*ToolParameterKVMatchInstance) ProtoMessage() {} func (x *ToolParameterKVMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6847,11 +6649,9 @@ type ToolParameterKVMatchResults struct { func (x *ToolParameterKVMatchResults) Reset() { *x = ToolParameterKVMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchResults) String() string { @@ -6862,7 +6662,7 @@ func (*ToolParameterKVMatchResults) ProtoMessage() {} func (x *ToolParameterKVMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6896,11 +6696,9 @@ type ToolParameterKVMatchMetricValue struct { func (x *ToolParameterKVMatchMetricValue) Reset() { *x = ToolParameterKVMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolParameterKVMatchMetricValue) String() string { @@ -6911,7 +6709,7 @@ func (*ToolParameterKVMatchMetricValue) ProtoMessage() {} func (x *ToolParameterKVMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6947,11 +6745,9 @@ type TrajectoryExactMatchInput struct { func (x *TrajectoryExactMatchInput) Reset() { *x = TrajectoryExactMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryExactMatchInput) String() string { @@ -6962,7 +6758,7 @@ func (*TrajectoryExactMatchInput) ProtoMessage() {} func (x *TrajectoryExactMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7001,11 +6797,9 @@ type TrajectoryExactMatchSpec struct { func (x *TrajectoryExactMatchSpec) Reset() { *x = TrajectoryExactMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryExactMatchSpec) String() string { @@ -7016,7 +6810,7 @@ func (*TrajectoryExactMatchSpec) ProtoMessage() {} func (x *TrajectoryExactMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7045,11 +6839,9 @@ type TrajectoryExactMatchInstance struct { func (x *TrajectoryExactMatchInstance) Reset() { *x = TrajectoryExactMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryExactMatchInstance) String() string { @@ -7060,7 +6852,7 @@ func (*TrajectoryExactMatchInstance) ProtoMessage() {} func (x *TrajectoryExactMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7101,11 +6893,9 @@ type TrajectoryExactMatchResults struct { func (x *TrajectoryExactMatchResults) Reset() { *x = TrajectoryExactMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryExactMatchResults) String() string { @@ -7116,7 +6906,7 @@ func (*TrajectoryExactMatchResults) ProtoMessage() {} func (x *TrajectoryExactMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7150,11 +6940,9 @@ type TrajectoryExactMatchMetricValue struct { func (x *TrajectoryExactMatchMetricValue) Reset() { *x = TrajectoryExactMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryExactMatchMetricValue) String() string { @@ -7165,7 +6953,7 @@ func (*TrajectoryExactMatchMetricValue) ProtoMessage() {} func (x *TrajectoryExactMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7201,11 +6989,9 @@ type TrajectoryInOrderMatchInput struct { func (x *TrajectoryInOrderMatchInput) Reset() { *x = TrajectoryInOrderMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryInOrderMatchInput) String() string { @@ -7216,7 +7002,7 @@ func (*TrajectoryInOrderMatchInput) ProtoMessage() {} func (x *TrajectoryInOrderMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7256,11 +7042,9 @@ type TrajectoryInOrderMatchSpec struct { func (x *TrajectoryInOrderMatchSpec) Reset() { *x = TrajectoryInOrderMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryInOrderMatchSpec) String() string { @@ -7271,7 +7055,7 @@ func (*TrajectoryInOrderMatchSpec) ProtoMessage() {} func (x *TrajectoryInOrderMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7300,11 +7084,9 @@ type TrajectoryInOrderMatchInstance struct { func (x *TrajectoryInOrderMatchInstance) Reset() { *x = TrajectoryInOrderMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryInOrderMatchInstance) String() string { @@ -7315,7 +7097,7 @@ func (*TrajectoryInOrderMatchInstance) ProtoMessage() {} func (x *TrajectoryInOrderMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7356,11 +7138,9 @@ type TrajectoryInOrderMatchResults struct { func (x *TrajectoryInOrderMatchResults) Reset() { *x = TrajectoryInOrderMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryInOrderMatchResults) String() string { @@ -7371,7 +7151,7 @@ func (*TrajectoryInOrderMatchResults) ProtoMessage() {} func (x *TrajectoryInOrderMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7405,11 +7185,9 @@ type TrajectoryInOrderMatchMetricValue struct { func (x *TrajectoryInOrderMatchMetricValue) Reset() { *x = TrajectoryInOrderMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryInOrderMatchMetricValue) String() string { @@ -7420,7 +7198,7 @@ func (*TrajectoryInOrderMatchMetricValue) ProtoMessage() {} func (x *TrajectoryInOrderMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7456,11 +7234,9 @@ type TrajectoryAnyOrderMatchInput struct { func (x *TrajectoryAnyOrderMatchInput) Reset() { *x = TrajectoryAnyOrderMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryAnyOrderMatchInput) String() string { @@ -7471,7 +7247,7 @@ func (*TrajectoryAnyOrderMatchInput) ProtoMessage() {} func (x *TrajectoryAnyOrderMatchInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7511,11 +7287,9 @@ type TrajectoryAnyOrderMatchSpec struct { func (x *TrajectoryAnyOrderMatchSpec) Reset() { *x = TrajectoryAnyOrderMatchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryAnyOrderMatchSpec) String() string { @@ -7526,7 +7300,7 @@ func (*TrajectoryAnyOrderMatchSpec) ProtoMessage() {} func (x *TrajectoryAnyOrderMatchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7555,11 +7329,9 @@ type TrajectoryAnyOrderMatchInstance struct { func (x *TrajectoryAnyOrderMatchInstance) Reset() { *x = TrajectoryAnyOrderMatchInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryAnyOrderMatchInstance) String() string { @@ -7570,7 +7342,7 @@ func (*TrajectoryAnyOrderMatchInstance) ProtoMessage() {} func (x *TrajectoryAnyOrderMatchInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7611,11 +7383,9 @@ type TrajectoryAnyOrderMatchResults struct { func (x *TrajectoryAnyOrderMatchResults) Reset() { *x = TrajectoryAnyOrderMatchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryAnyOrderMatchResults) String() string { @@ -7626,7 +7396,7 @@ func (*TrajectoryAnyOrderMatchResults) ProtoMessage() {} func (x *TrajectoryAnyOrderMatchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7660,11 +7430,9 @@ type TrajectoryAnyOrderMatchMetricValue struct { func (x *TrajectoryAnyOrderMatchMetricValue) Reset() { *x = TrajectoryAnyOrderMatchMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryAnyOrderMatchMetricValue) String() string { @@ -7675,7 +7443,7 @@ func (*TrajectoryAnyOrderMatchMetricValue) ProtoMessage() {} func (x *TrajectoryAnyOrderMatchMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7711,11 +7479,9 @@ type TrajectoryPrecisionInput struct { func (x *TrajectoryPrecisionInput) Reset() { *x = TrajectoryPrecisionInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryPrecisionInput) String() string { @@ -7726,7 +7492,7 @@ func (*TrajectoryPrecisionInput) ProtoMessage() {} func (x *TrajectoryPrecisionInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7765,11 +7531,9 @@ type TrajectoryPrecisionSpec struct { func (x *TrajectoryPrecisionSpec) Reset() { *x = TrajectoryPrecisionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryPrecisionSpec) String() string { @@ -7780,7 +7544,7 @@ func (*TrajectoryPrecisionSpec) ProtoMessage() {} func (x *TrajectoryPrecisionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7809,11 +7573,9 @@ type TrajectoryPrecisionInstance struct { func (x *TrajectoryPrecisionInstance) Reset() { *x = TrajectoryPrecisionInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryPrecisionInstance) String() string { @@ -7824,7 +7586,7 @@ func (*TrajectoryPrecisionInstance) ProtoMessage() {} func (x *TrajectoryPrecisionInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7865,11 +7627,9 @@ type TrajectoryPrecisionResults struct { func (x *TrajectoryPrecisionResults) Reset() { *x = TrajectoryPrecisionResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryPrecisionResults) String() string { @@ -7880,7 +7640,7 @@ func (*TrajectoryPrecisionResults) ProtoMessage() {} func (x *TrajectoryPrecisionResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7914,11 +7674,9 @@ type TrajectoryPrecisionMetricValue struct { func (x *TrajectoryPrecisionMetricValue) Reset() { *x = TrajectoryPrecisionMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryPrecisionMetricValue) String() string { @@ -7929,7 +7687,7 @@ func (*TrajectoryPrecisionMetricValue) ProtoMessage() {} func (x *TrajectoryPrecisionMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7965,11 +7723,9 @@ type TrajectoryRecallInput struct { func (x *TrajectoryRecallInput) Reset() { *x = TrajectoryRecallInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryRecallInput) String() string { @@ -7980,7 +7736,7 @@ func (*TrajectoryRecallInput) ProtoMessage() {} func (x *TrajectoryRecallInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8019,11 +7775,9 @@ type TrajectoryRecallSpec struct { func (x *TrajectoryRecallSpec) Reset() { *x = TrajectoryRecallSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryRecallSpec) String() string { @@ -8034,7 +7788,7 @@ func (*TrajectoryRecallSpec) ProtoMessage() {} func (x *TrajectoryRecallSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8063,11 +7817,9 @@ type TrajectoryRecallInstance struct { func (x *TrajectoryRecallInstance) Reset() { *x = TrajectoryRecallInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryRecallInstance) String() string { @@ -8078,7 +7830,7 @@ func (*TrajectoryRecallInstance) ProtoMessage() {} func (x *TrajectoryRecallInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8119,11 +7871,9 @@ type TrajectoryRecallResults struct { func (x *TrajectoryRecallResults) Reset() { *x = TrajectoryRecallResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryRecallResults) String() string { @@ -8134,7 +7884,7 @@ func (*TrajectoryRecallResults) ProtoMessage() {} func (x *TrajectoryRecallResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8168,11 +7918,9 @@ type TrajectoryRecallMetricValue struct { func (x *TrajectoryRecallMetricValue) Reset() { *x = TrajectoryRecallMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectoryRecallMetricValue) String() string { @@ -8183,7 +7931,7 @@ func (*TrajectoryRecallMetricValue) ProtoMessage() {} func (x *TrajectoryRecallMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8219,11 +7967,9 @@ type TrajectorySingleToolUseInput struct { func (x *TrajectorySingleToolUseInput) Reset() { *x = TrajectorySingleToolUseInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectorySingleToolUseInput) String() string { @@ -8234,7 +7980,7 @@ func (*TrajectorySingleToolUseInput) ProtoMessage() {} func (x *TrajectorySingleToolUseInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8276,11 +8022,9 @@ type TrajectorySingleToolUseSpec struct { func (x *TrajectorySingleToolUseSpec) Reset() { *x = TrajectorySingleToolUseSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectorySingleToolUseSpec) String() string { @@ -8291,7 +8035,7 @@ func (*TrajectorySingleToolUseSpec) ProtoMessage() {} func (x *TrajectorySingleToolUseSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8325,11 +8069,9 @@ type TrajectorySingleToolUseInstance struct { func (x *TrajectorySingleToolUseInstance) Reset() { *x = TrajectorySingleToolUseInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectorySingleToolUseInstance) String() string { @@ -8340,7 +8082,7 @@ func (*TrajectorySingleToolUseInstance) ProtoMessage() {} func (x *TrajectorySingleToolUseInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8374,11 +8116,9 @@ type TrajectorySingleToolUseResults struct { func (x *TrajectorySingleToolUseResults) Reset() { *x = TrajectorySingleToolUseResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectorySingleToolUseResults) String() string { @@ -8389,7 +8129,7 @@ func (*TrajectorySingleToolUseResults) ProtoMessage() {} func (x *TrajectorySingleToolUseResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8423,11 +8163,9 @@ type TrajectorySingleToolUseMetricValue struct { func (x *TrajectorySingleToolUseMetricValue) Reset() { *x = TrajectorySingleToolUseMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrajectorySingleToolUseMetricValue) String() string { @@ -8438,7 +8176,7 @@ func (*TrajectorySingleToolUseMetricValue) ProtoMessage() {} func (x *TrajectorySingleToolUseMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8472,11 +8210,9 @@ type Trajectory struct { func (x *Trajectory) Reset() { *x = Trajectory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trajectory) String() string { @@ -8487,7 +8223,7 @@ func (*Trajectory) ProtoMessage() {} func (x *Trajectory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8523,11 +8259,9 @@ type ToolCall struct { func (x *ToolCall) Reset() { *x = ToolCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCall) String() string { @@ -8538,7 +8272,7 @@ func (*ToolCall) ProtoMessage() {} func (x *ToolCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10648,1604 +10382,6 @@ func file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_init() { if File_google_cloud_aiplatform_v1beta1_evaluation_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BleuInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BleuInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BleuSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BleuResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BleuMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RougeInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RougeInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RougeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RougeResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RougeMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CoherenceResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FluencyInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FluencyInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*FluencySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FluencyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SafetyInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SafetyInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SafetySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SafetyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GroundednessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseSummarizationQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationHelpfulnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbositySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationVerbosityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseQuestionAnsweringQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringRelevanceResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringHelpfulnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*QuestionAnsweringCorrectnessResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*PointwiseMetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*PairwiseMetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallValidMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*ToolNameMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKeyMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*ToolParameterKVMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryExactMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryExactMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryExactMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryExactMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryExactMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryInOrderMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryInOrderMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryInOrderMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryInOrderMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryInOrderMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryAnyOrderMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryAnyOrderMatchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryAnyOrderMatchInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryAnyOrderMatchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryAnyOrderMatchMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryPrecisionInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryPrecisionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryPrecisionInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryPrecisionResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryPrecisionMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryRecallInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryRecallSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryRecallInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryRecallResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*TrajectoryRecallMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*TrajectorySingleToolUseInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*TrajectorySingleToolUseSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*TrajectorySingleToolUseInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*TrajectorySingleToolUseResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*TrajectorySingleToolUseMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*Trajectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*ToolCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_evaluation_service_proto_msgTypes[0].OneofWrappers = []any{ (*EvaluateInstancesRequest_ExactMatchInput)(nil), (*EvaluateInstancesRequest_BleuInput)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/event.pb.go b/aiplatform/apiv1beta1/aiplatformpb/event.pb.go index 38382c93201b..eabb2ccb7db9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/event.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/event.proto @@ -121,11 +121,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -136,7 +134,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,20 +281,6 @@ func file_google_cloud_aiplatform_v1beta1_event_proto_init() { if File_google_cloud_aiplatform_v1beta1_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/execution.pb.go b/aiplatform/apiv1beta1/aiplatformpb/execution.pb.go index 3eca7f2c07a3..c35f3ada0368 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/execution.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/execution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/execution.proto @@ -160,11 +160,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_execution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_execution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -175,7 +173,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_execution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,20 +390,6 @@ func file_google_cloud_aiplatform_v1beta1_execution_proto_init() { if File_google_cloud_aiplatform_v1beta1_execution_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_execution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/explanation.pb.go b/aiplatform/apiv1beta1/aiplatformpb/explanation.pb.go index c256a7426d5a..173b3a8da802 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/explanation.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/explanation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/explanation.proto @@ -291,11 +291,9 @@ type Explanation struct { func (x *Explanation) Reset() { *x = Explanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Explanation) String() string { @@ -306,7 +304,7 @@ func (*Explanation) ProtoMessage() {} func (x *Explanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type ModelExplanation struct { func (x *ModelExplanation) Reset() { *x = ModelExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelExplanation) String() string { @@ -383,7 +379,7 @@ func (*ModelExplanation) ProtoMessage() {} func (x *ModelExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +510,9 @@ type Attribution struct { func (x *Attribution) Reset() { *x = Attribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attribution) String() string { @@ -529,7 +523,7 @@ func (*Attribution) ProtoMessage() {} func (x *Attribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +601,9 @@ type Neighbor struct { func (x *Neighbor) Reset() { *x = Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Neighbor) String() string { @@ -622,7 +614,7 @@ func (*Neighbor) ProtoMessage() {} func (x *Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +657,9 @@ type ExplanationSpec struct { func (x *ExplanationSpec) Reset() { *x = ExplanationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationSpec) String() string { @@ -680,7 +670,7 @@ func (*ExplanationSpec) ProtoMessage() {} func (x *ExplanationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +734,9 @@ type ExplanationParameters struct { func (x *ExplanationParameters) Reset() { *x = ExplanationParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationParameters) String() string { @@ -759,7 +747,7 @@ func (*ExplanationParameters) ProtoMessage() {} func (x *ExplanationParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +874,9 @@ type SampledShapleyAttribution struct { func (x *SampledShapleyAttribution) Reset() { *x = SampledShapleyAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampledShapleyAttribution) String() string { @@ -901,7 +887,7 @@ func (*SampledShapleyAttribution) ProtoMessage() {} func (x *SampledShapleyAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +941,9 @@ type IntegratedGradientsAttribution struct { func (x *IntegratedGradientsAttribution) Reset() { *x = IntegratedGradientsAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntegratedGradientsAttribution) String() string { @@ -970,7 +954,7 @@ func (*IntegratedGradientsAttribution) ProtoMessage() {} func (x *IntegratedGradientsAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1025,9 @@ type XraiAttribution struct { func (x *XraiAttribution) Reset() { *x = XraiAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XraiAttribution) String() string { @@ -1056,7 +1038,7 @@ func (*XraiAttribution) ProtoMessage() {} func (x *XraiAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1103,9 @@ type SmoothGradConfig struct { func (x *SmoothGradConfig) Reset() { *x = SmoothGradConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmoothGradConfig) String() string { @@ -1136,7 +1116,7 @@ func (*SmoothGradConfig) ProtoMessage() {} func (x *SmoothGradConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1230,11 +1210,9 @@ type FeatureNoiseSigma struct { func (x *FeatureNoiseSigma) Reset() { *x = FeatureNoiseSigma{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureNoiseSigma) String() string { @@ -1245,7 +1223,7 @@ func (*FeatureNoiseSigma) ProtoMessage() {} func (x *FeatureNoiseSigma) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1265,9 @@ type BlurBaselineConfig struct { func (x *BlurBaselineConfig) Reset() { *x = BlurBaselineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlurBaselineConfig) String() string { @@ -1302,7 +1278,7 @@ func (*BlurBaselineConfig) ProtoMessage() {} func (x *BlurBaselineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1325,9 @@ type Examples struct { func (x *Examples) Reset() { *x = Examples{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Examples) String() string { @@ -1364,7 +1338,7 @@ func (*Examples) ProtoMessage() {} func (x *Examples) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1479,11 +1453,9 @@ type Presets struct { func (x *Presets) Reset() { *x = Presets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Presets) String() string { @@ -1494,7 +1466,7 @@ func (*Presets) ProtoMessage() {} func (x *Presets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1543,11 +1515,9 @@ type ExplanationSpecOverride struct { func (x *ExplanationSpecOverride) Reset() { *x = ExplanationSpecOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationSpecOverride) String() string { @@ -1558,7 +1528,7 @@ func (*ExplanationSpecOverride) ProtoMessage() {} func (x *ExplanationSpecOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1614,11 +1584,9 @@ type ExplanationMetadataOverride struct { func (x *ExplanationMetadataOverride) Reset() { *x = ExplanationMetadataOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadataOverride) String() string { @@ -1629,7 +1597,7 @@ func (*ExplanationMetadataOverride) ProtoMessage() {} func (x *ExplanationMetadataOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,11 +1639,9 @@ type ExamplesOverride struct { func (x *ExamplesOverride) Reset() { *x = ExamplesOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplesOverride) String() string { @@ -1686,7 +1652,7 @@ func (*ExamplesOverride) ProtoMessage() {} func (x *ExamplesOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1752,11 +1718,9 @@ type ExamplesRestrictionsNamespace struct { func (x *ExamplesRestrictionsNamespace) Reset() { *x = ExamplesRestrictionsNamespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplesRestrictionsNamespace) String() string { @@ -1767,7 +1731,7 @@ func (*ExamplesRestrictionsNamespace) ProtoMessage() {} func (x *ExamplesRestrictionsNamespace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1824,11 +1788,9 @@ type FeatureNoiseSigma_NoiseSigmaForFeature struct { func (x *FeatureNoiseSigma_NoiseSigmaForFeature) Reset() { *x = FeatureNoiseSigma_NoiseSigmaForFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureNoiseSigma_NoiseSigmaForFeature) String() string { @@ -1839,7 +1801,7 @@ func (*FeatureNoiseSigma_NoiseSigmaForFeature) ProtoMessage() {} func (x *FeatureNoiseSigma_NoiseSigmaForFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1883,11 +1845,9 @@ type Examples_ExampleGcsSource struct { func (x *Examples_ExampleGcsSource) Reset() { *x = Examples_ExampleGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Examples_ExampleGcsSource) String() string { @@ -1898,7 +1858,7 @@ func (*Examples_ExampleGcsSource) ProtoMessage() {} func (x *Examples_ExampleGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1946,11 +1906,9 @@ type ExplanationMetadataOverride_InputMetadataOverride struct { func (x *ExplanationMetadataOverride_InputMetadataOverride) Reset() { *x = ExplanationMetadataOverride_InputMetadataOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadataOverride_InputMetadataOverride) String() string { @@ -1961,7 +1919,7 @@ func (*ExplanationMetadataOverride_InputMetadataOverride) ProtoMessage() {} func (x *ExplanationMetadataOverride_InputMetadataOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2412,260 +2370,6 @@ func file_google_cloud_aiplatform_v1beta1_explanation_proto_init() { } file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_init() file_google_cloud_aiplatform_v1beta1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Explanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Attribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SampledShapleyAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IntegratedGradientsAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*XraiAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SmoothGradConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FeatureNoiseSigma); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BlurBaselineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Examples); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Presets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationSpecOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadataOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExamplesOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExamplesRestrictionsNamespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FeatureNoiseSigma_NoiseSigmaForFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Examples_ExampleGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadataOverride_InputMetadataOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_explanation_proto_msgTypes[5].OneofWrappers = []any{ (*ExplanationParameters_SampledShapleyAttribution)(nil), (*ExplanationParameters_IntegratedGradientsAttribution)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/explanation_metadata.pb.go b/aiplatform/apiv1beta1/aiplatformpb/explanation_metadata.pb.go index 28189350d309..7e66241c1824 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/explanation_metadata.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/explanation_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/explanation_metadata.proto @@ -447,11 +447,9 @@ type ExplanationMetadata struct { func (x *ExplanationMetadata) Reset() { *x = ExplanationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata) String() string { @@ -462,7 +460,7 @@ func (*ExplanationMetadata) ProtoMessage() {} func (x *ExplanationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +590,9 @@ type ExplanationMetadata_InputMetadata struct { func (x *ExplanationMetadata_InputMetadata) Reset() { *x = ExplanationMetadata_InputMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata) String() string { @@ -607,7 +603,7 @@ func (*ExplanationMetadata_InputMetadata) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,11 +729,9 @@ type ExplanationMetadata_OutputMetadata struct { func (x *ExplanationMetadata_OutputMetadata) Reset() { *x = ExplanationMetadata_OutputMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_OutputMetadata) String() string { @@ -748,7 +742,7 @@ func (*ExplanationMetadata_OutputMetadata) ProtoMessage() {} func (x *ExplanationMetadata_OutputMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +854,9 @@ type ExplanationMetadata_InputMetadata_FeatureValueDomain struct { func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) Reset() { *x = ExplanationMetadata_InputMetadata_FeatureValueDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) String() string { @@ -875,7 +867,7 @@ func (*ExplanationMetadata_InputMetadata_FeatureValueDomain) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata_FeatureValueDomain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,11 +955,9 @@ type ExplanationMetadata_InputMetadata_Visualization struct { func (x *ExplanationMetadata_InputMetadata_Visualization) Reset() { *x = ExplanationMetadata_InputMetadata_Visualization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplanationMetadata_InputMetadata_Visualization) String() string { @@ -978,7 +968,7 @@ func (*ExplanationMetadata_InputMetadata_Visualization) ProtoMessage() {} func (x *ExplanationMetadata_InputMetadata_Visualization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1305,68 +1295,6 @@ func file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_init() { if File_google_cloud_aiplatform_v1beta1_explanation_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_OutputMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata_FeatureValueDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExplanationMetadata_InputMetadata_Visualization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_explanation_metadata_proto_msgTypes[2].OneofWrappers = []any{ (*ExplanationMetadata_OutputMetadata_IndexDisplayNameMapping)(nil), (*ExplanationMetadata_OutputMetadata_DisplayNameMappingKey)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/extension.pb.go b/aiplatform/apiv1beta1/aiplatformpb/extension.pb.go index 48e59aeaee73..90e4374c3c1b 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/extension.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/extension.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/extension.proto @@ -215,11 +215,9 @@ type Extension struct { func (x *Extension) Reset() { *x = Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Extension) String() string { @@ -230,7 +228,7 @@ func (*Extension) ProtoMessage() {} func (x *Extension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +342,9 @@ type ExtensionManifest struct { func (x *ExtensionManifest) Reset() { *x = ExtensionManifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionManifest) String() string { @@ -359,7 +355,7 @@ func (*ExtensionManifest) ProtoMessage() {} func (x *ExtensionManifest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +417,9 @@ type ExtensionOperation struct { func (x *ExtensionOperation) Reset() { *x = ExtensionOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionOperation) String() string { @@ -436,7 +430,7 @@ func (*ExtensionOperation) ProtoMessage() {} func (x *ExtensionOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +479,9 @@ type AuthConfig struct { func (x *AuthConfig) Reset() { *x = AuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig) String() string { @@ -500,7 +492,7 @@ func (*AuthConfig) ProtoMessage() {} func (x *AuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +621,9 @@ type RuntimeConfig struct { func (x *RuntimeConfig) Reset() { *x = RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig) String() string { @@ -644,7 +634,7 @@ func (*RuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +715,9 @@ type ExtensionPrivateServiceConnectConfig struct { func (x *ExtensionPrivateServiceConnectConfig) Reset() { *x = ExtensionPrivateServiceConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionPrivateServiceConnectConfig) String() string { @@ -740,7 +728,7 @@ func (*ExtensionPrivateServiceConnectConfig) ProtoMessage() {} func (x *ExtensionPrivateServiceConnectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +765,9 @@ type ExtensionManifest_ApiSpec struct { func (x *ExtensionManifest_ApiSpec) Reset() { *x = ExtensionManifest_ApiSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionManifest_ApiSpec) String() string { @@ -792,7 +778,7 @@ func (*ExtensionManifest_ApiSpec) ProtoMessage() {} func (x *ExtensionManifest_ApiSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +857,9 @@ type AuthConfig_ApiKeyConfig struct { func (x *AuthConfig_ApiKeyConfig) Reset() { *x = AuthConfig_ApiKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig_ApiKeyConfig) String() string { @@ -886,7 +870,7 @@ func (*AuthConfig_ApiKeyConfig) ProtoMessage() {} func (x *AuthConfig_ApiKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +925,9 @@ type AuthConfig_HttpBasicAuthConfig struct { func (x *AuthConfig_HttpBasicAuthConfig) Reset() { *x = AuthConfig_HttpBasicAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig_HttpBasicAuthConfig) String() string { @@ -956,7 +938,7 @@ func (*AuthConfig_HttpBasicAuthConfig) ProtoMessage() {} func (x *AuthConfig_HttpBasicAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +982,9 @@ type AuthConfig_GoogleServiceAccountConfig struct { func (x *AuthConfig_GoogleServiceAccountConfig) Reset() { *x = AuthConfig_GoogleServiceAccountConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig_GoogleServiceAccountConfig) String() string { @@ -1015,7 +995,7 @@ func (*AuthConfig_GoogleServiceAccountConfig) ProtoMessage() {} func (x *AuthConfig_GoogleServiceAccountConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1032,9 @@ type AuthConfig_OauthConfig struct { func (x *AuthConfig_OauthConfig) Reset() { *x = AuthConfig_OauthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig_OauthConfig) String() string { @@ -1067,7 +1045,7 @@ func (*AuthConfig_OauthConfig) ProtoMessage() {} func (x *AuthConfig_OauthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1123,9 @@ type AuthConfig_OidcConfig struct { func (x *AuthConfig_OidcConfig) Reset() { *x = AuthConfig_OidcConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthConfig_OidcConfig) String() string { @@ -1160,7 +1136,7 @@ func (*AuthConfig_OidcConfig) ProtoMessage() {} func (x *AuthConfig_OidcConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1249,11 +1225,9 @@ type RuntimeConfig_CodeInterpreterRuntimeConfig struct { func (x *RuntimeConfig_CodeInterpreterRuntimeConfig) Reset() { *x = RuntimeConfig_CodeInterpreterRuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig_CodeInterpreterRuntimeConfig) String() string { @@ -1264,7 +1238,7 @@ func (*RuntimeConfig_CodeInterpreterRuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig_CodeInterpreterRuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1310,11 +1284,9 @@ type RuntimeConfig_VertexAISearchRuntimeConfig struct { func (x *RuntimeConfig_VertexAISearchRuntimeConfig) Reset() { *x = RuntimeConfig_VertexAISearchRuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig_VertexAISearchRuntimeConfig) String() string { @@ -1325,7 +1297,7 @@ func (*RuntimeConfig_VertexAISearchRuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig_VertexAISearchRuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1723,176 +1695,6 @@ func file_google_cloud_aiplatform_v1beta1_extension_proto_init() { return } file_google_cloud_aiplatform_v1beta1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionManifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionPrivateServiceConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionManifest_ApiSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig_ApiKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig_HttpBasicAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig_GoogleServiceAccountConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig_OauthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AuthConfig_OidcConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeConfig_CodeInterpreterRuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeConfig_VertexAISearchRuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_extension_proto_msgTypes[3].OneofWrappers = []any{ (*AuthConfig_ApiKeyConfig_)(nil), (*AuthConfig_HttpBasicAuthConfig_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/extension_execution_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/extension_execution_service.pb.go index a0540d49e0c2..7a2963bd6ee9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/extension_execution_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/extension_execution_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/extension_execution_service.proto @@ -74,11 +74,9 @@ type ExecuteExtensionRequest struct { func (x *ExecuteExtensionRequest) Reset() { *x = ExecuteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteExtensionRequest) String() string { @@ -89,7 +87,7 @@ func (*ExecuteExtensionRequest) ProtoMessage() {} func (x *ExecuteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type ExecuteExtensionResponse struct { func (x *ExecuteExtensionResponse) Reset() { *x = ExecuteExtensionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteExtensionResponse) String() string { @@ -161,7 +157,7 @@ func (*ExecuteExtensionResponse) ProtoMessage() {} func (x *ExecuteExtensionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type QueryExtensionRequest struct { func (x *QueryExtensionRequest) Reset() { *x = QueryExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryExtensionRequest) String() string { @@ -219,7 +213,7 @@ func (*QueryExtensionRequest) ProtoMessage() {} func (x *QueryExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +259,9 @@ type QueryExtensionResponse struct { func (x *QueryExtensionResponse) Reset() { *x = QueryExtensionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryExtensionResponse) String() string { @@ -280,7 +272,7 @@ func (*QueryExtensionResponse) ProtoMessage() {} func (x *QueryExtensionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,56 +465,6 @@ func file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_init } file_google_cloud_aiplatform_v1beta1_content_proto_init() file_google_cloud_aiplatform_v1beta1_extension_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteExtensionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QueryExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_execution_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QueryExtensionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/extension_registry_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/extension_registry_service.pb.go index 63e8eda2e97d..fcac08e216c4 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/extension_registry_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/extension_registry_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/extension_registry_service.proto @@ -59,11 +59,9 @@ type ImportExtensionRequest struct { func (x *ImportExtensionRequest) Reset() { *x = ImportExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportExtensionRequest) String() string { @@ -74,7 +72,7 @@ func (*ImportExtensionRequest) ProtoMessage() {} func (x *ImportExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type ImportExtensionOperationMetadata struct { func (x *ImportExtensionOperationMetadata) Reset() { *x = ImportExtensionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportExtensionOperationMetadata) String() string { @@ -132,7 +128,7 @@ func (*ImportExtensionOperationMetadata) ProtoMessage() {} func (x *ImportExtensionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +165,9 @@ type GetExtensionRequest struct { func (x *GetExtensionRequest) Reset() { *x = GetExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExtensionRequest) String() string { @@ -184,7 +178,7 @@ func (*GetExtensionRequest) ProtoMessage() {} func (x *GetExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +222,9 @@ type UpdateExtensionRequest struct { func (x *UpdateExtensionRequest) Reset() { *x = UpdateExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExtensionRequest) String() string { @@ -243,7 +235,7 @@ func (*UpdateExtensionRequest) ProtoMessage() {} func (x *UpdateExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +298,9 @@ type ListExtensionsRequest struct { func (x *ListExtensionsRequest) Reset() { *x = ListExtensionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExtensionsRequest) String() string { @@ -321,7 +311,7 @@ func (*ListExtensionsRequest) ProtoMessage() {} func (x *ListExtensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +379,9 @@ type ListExtensionsResponse struct { func (x *ListExtensionsResponse) Reset() { *x = ListExtensionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExtensionsResponse) String() string { @@ -404,7 +392,7 @@ func (*ListExtensionsResponse) ProtoMessage() {} func (x *ListExtensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +436,9 @@ type DeleteExtensionRequest struct { func (x *DeleteExtensionRequest) Reset() { *x = DeleteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExtensionRequest) String() string { @@ -463,7 +449,7 @@ func (*DeleteExtensionRequest) ProtoMessage() {} func (x *DeleteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,92 +714,6 @@ func file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_init( } file_google_cloud_aiplatform_v1beta1_extension_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImportExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportExtensionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListExtensionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListExtensionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_extension_registry_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature.pb.go index b214adc64798..3d74cdb6ea86 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature.proto @@ -273,11 +273,9 @@ type Feature struct { func (x *Feature) Reset() { *x = Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature) String() string { @@ -288,7 +286,7 @@ func (*Feature) ProtoMessage() {} func (x *Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +420,9 @@ type Feature_MonitoringStatsAnomaly struct { func (x *Feature_MonitoringStatsAnomaly) Reset() { *x = Feature_MonitoringStatsAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature_MonitoringStatsAnomaly) String() string { @@ -437,7 +433,7 @@ func (*Feature_MonitoringStatsAnomaly) ProtoMessage() {} func (x *Feature_MonitoringStatsAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,32 +671,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_proto_init() { file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_init() file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_init() file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Feature_MonitoringStatsAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_group.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_group.pb.go index 6f0301a5505c..0f38e223f0cd 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_group.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_group.proto @@ -75,11 +75,9 @@ type FeatureGroup struct { func (x *FeatureGroup) Reset() { *x = FeatureGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup) String() string { @@ -90,7 +88,7 @@ func (*FeatureGroup) ProtoMessage() {} func (x *FeatureGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +209,9 @@ type FeatureGroup_BigQuery struct { func (x *FeatureGroup_BigQuery) Reset() { *x = FeatureGroup_BigQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup_BigQuery) String() string { @@ -226,7 +222,7 @@ func (*FeatureGroup_BigQuery) ProtoMessage() {} func (x *FeatureGroup_BigQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +286,9 @@ type FeatureGroup_BigQuery_TimeSeries struct { func (x *FeatureGroup_BigQuery_TimeSeries) Reset() { *x = FeatureGroup_BigQuery_TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureGroup_BigQuery_TimeSeries) String() string { @@ -305,7 +299,7 @@ func (*FeatureGroup_BigQuery_TimeSeries) ProtoMessage() {} func (x *FeatureGroup_BigQuery_TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,44 +461,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_group_proto_init() { return } file_google_cloud_aiplatform_v1beta1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup_BigQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureGroup_BigQuery_TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_feature_group_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureGroup_BigQuery_)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_monitor.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_monitor.pb.go index cae0235faf31..612ba8af90b3 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_monitor.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_monitor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_monitor.proto @@ -77,11 +77,9 @@ type FeatureMonitor struct { func (x *FeatureMonitor) Reset() { *x = FeatureMonitor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMonitor) String() string { @@ -92,7 +90,7 @@ func (*FeatureMonitor) ProtoMessage() {} func (x *FeatureMonitor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type ScheduleConfig struct { func (x *ScheduleConfig) Reset() { *x = ScheduleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduleConfig) String() string { @@ -195,7 +191,7 @@ func (*ScheduleConfig) ProtoMessage() {} func (x *ScheduleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +226,9 @@ type FeatureSelectionConfig struct { func (x *FeatureSelectionConfig) Reset() { *x = FeatureSelectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSelectionConfig) String() string { @@ -245,7 +239,7 @@ func (*FeatureSelectionConfig) ProtoMessage() {} func (x *FeatureSelectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +296,9 @@ type FeatureStatsAndAnomaly struct { func (x *FeatureStatsAndAnomaly) Reset() { *x = FeatureStatsAndAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureStatsAndAnomaly) String() string { @@ -317,7 +309,7 @@ func (*FeatureStatsAndAnomaly) ProtoMessage() {} func (x *FeatureStatsAndAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +400,9 @@ type FeatureStatsAndAnomalySpec struct { func (x *FeatureStatsAndAnomalySpec) Reset() { *x = FeatureStatsAndAnomalySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureStatsAndAnomalySpec) String() string { @@ -423,7 +413,7 @@ func (*FeatureStatsAndAnomalySpec) ProtoMessage() {} func (x *FeatureStatsAndAnomalySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +459,9 @@ type FeatureSelectionConfig_FeatureConfig struct { func (x *FeatureSelectionConfig_FeatureConfig) Reset() { *x = FeatureSelectionConfig_FeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSelectionConfig_FeatureConfig) String() string { @@ -484,7 +472,7 @@ func (*FeatureSelectionConfig_FeatureConfig) ProtoMessage() {} func (x *FeatureSelectionConfig_FeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,80 +689,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_init() { if File_google_cloud_aiplatform_v1beta1_feature_monitor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMonitor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ScheduleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSelectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureStatsAndAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FeatureStatsAndAnomalySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSelectionConfig_FeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_msgTypes[4].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_monitor_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_monitor_job.pb.go index b9f660f6a983..234ba394da83 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_monitor_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_monitor_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_monitor_job.proto @@ -135,11 +135,9 @@ type FeatureMonitorJob struct { func (x *FeatureMonitorJob) Reset() { *x = FeatureMonitorJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMonitorJob) String() string { @@ -150,7 +148,7 @@ func (*FeatureMonitorJob) ProtoMessage() {} func (x *FeatureMonitorJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +247,9 @@ type FeatureMonitorJob_JobSummary struct { func (x *FeatureMonitorJob_JobSummary) Reset() { *x = FeatureMonitorJob_JobSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMonitorJob_JobSummary) String() string { @@ -264,7 +260,7 @@ func (*FeatureMonitorJob_JobSummary) ProtoMessage() {} func (x *FeatureMonitorJob_JobSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,32 +463,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_init() { return } file_google_cloud_aiplatform_v1beta1_feature_monitor_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMonitorJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMonitorJob_JobSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_monitoring_stats.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_monitoring_stats.pb.go index 947098c451cb..7a816b01510a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_monitoring_stats.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_monitoring_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto @@ -96,11 +96,9 @@ type FeatureStatsAnomaly struct { func (x *FeatureStatsAnomaly) Reset() { *x = FeatureStatsAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureStatsAnomaly) String() string { @@ -111,7 +109,7 @@ func (*FeatureStatsAnomaly) ProtoMessage() {} func (x *FeatureStatsAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,20 +256,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_init() if File_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_monitoring_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureStatsAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store.pb.go index 6e485ae26ccf..aa88965c572a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_online_store.proto @@ -151,11 +151,9 @@ type FeatureOnlineStore struct { func (x *FeatureOnlineStore) Reset() { *x = FeatureOnlineStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore) String() string { @@ -166,7 +164,7 @@ func (*FeatureOnlineStore) ProtoMessage() {} func (x *FeatureOnlineStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +313,9 @@ type FeatureOnlineStore_Bigtable struct { func (x *FeatureOnlineStore_Bigtable) Reset() { *x = FeatureOnlineStore_Bigtable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Bigtable) String() string { @@ -330,7 +326,7 @@ func (*FeatureOnlineStore_Bigtable) ProtoMessage() {} func (x *FeatureOnlineStore_Bigtable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +357,9 @@ type FeatureOnlineStore_Optimized struct { func (x *FeatureOnlineStore_Optimized) Reset() { *x = FeatureOnlineStore_Optimized{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Optimized) String() string { @@ -376,7 +370,7 @@ func (*FeatureOnlineStore_Optimized) ProtoMessage() {} func (x *FeatureOnlineStore_Optimized) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +410,9 @@ type FeatureOnlineStore_DedicatedServingEndpoint struct { func (x *FeatureOnlineStore_DedicatedServingEndpoint) Reset() { *x = FeatureOnlineStore_DedicatedServingEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_DedicatedServingEndpoint) String() string { @@ -431,7 +423,7 @@ func (*FeatureOnlineStore_DedicatedServingEndpoint) ProtoMessage() {} func (x *FeatureOnlineStore_DedicatedServingEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +477,9 @@ type FeatureOnlineStore_EmbeddingManagement struct { func (x *FeatureOnlineStore_EmbeddingManagement) Reset() { *x = FeatureOnlineStore_EmbeddingManagement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_EmbeddingManagement) String() string { @@ -500,7 +490,7 @@ func (*FeatureOnlineStore_EmbeddingManagement) ProtoMessage() {} func (x *FeatureOnlineStore_EmbeddingManagement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +534,9 @@ type FeatureOnlineStore_Bigtable_AutoScaling struct { func (x *FeatureOnlineStore_Bigtable_AutoScaling) Reset() { *x = FeatureOnlineStore_Bigtable_AutoScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStore_Bigtable_AutoScaling) String() string { @@ -559,7 +547,7 @@ func (*FeatureOnlineStore_Bigtable_AutoScaling) ProtoMessage() {} func (x *FeatureOnlineStore_Bigtable_AutoScaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,80 +797,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_init() { } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Bigtable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Optimized); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_DedicatedServingEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_EmbeddingManagement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStore_Bigtable_AutoScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_feature_online_store_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureOnlineStore_Bigtable_)(nil), (*FeatureOnlineStore_Optimized_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_admin_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_admin_service.pb.go index 132eba0b2b5d..b49d1d0b0f80 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_admin_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_admin_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_online_store_admin_service.proto @@ -68,11 +68,9 @@ type CreateFeatureOnlineStoreRequest struct { func (x *CreateFeatureOnlineStoreRequest) Reset() { *x = CreateFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOnlineStoreRequest) String() string { @@ -83,7 +81,7 @@ func (*CreateFeatureOnlineStoreRequest) ProtoMessage() {} func (x *CreateFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetFeatureOnlineStoreRequest struct { func (x *GetFeatureOnlineStoreRequest) Reset() { *x = GetFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureOnlineStoreRequest) String() string { @@ -147,7 +143,7 @@ func (*GetFeatureOnlineStoreRequest) ProtoMessage() {} func (x *GetFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type ListFeatureOnlineStoresRequest struct { func (x *ListFeatureOnlineStoresRequest) Reset() { *x = ListFeatureOnlineStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureOnlineStoresRequest) String() string { @@ -241,7 +235,7 @@ func (*ListFeatureOnlineStoresRequest) ProtoMessage() {} func (x *ListFeatureOnlineStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ListFeatureOnlineStoresResponse struct { func (x *ListFeatureOnlineStoresResponse) Reset() { *x = ListFeatureOnlineStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureOnlineStoresResponse) String() string { @@ -324,7 +316,7 @@ func (*ListFeatureOnlineStoresResponse) ProtoMessage() {} func (x *ListFeatureOnlineStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +376,9 @@ type UpdateFeatureOnlineStoreRequest struct { func (x *UpdateFeatureOnlineStoreRequest) Reset() { *x = UpdateFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOnlineStoreRequest) String() string { @@ -399,7 +389,7 @@ func (*UpdateFeatureOnlineStoreRequest) ProtoMessage() {} func (x *UpdateFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +437,9 @@ type DeleteFeatureOnlineStoreRequest struct { func (x *DeleteFeatureOnlineStoreRequest) Reset() { *x = DeleteFeatureOnlineStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureOnlineStoreRequest) String() string { @@ -462,7 +450,7 @@ func (*DeleteFeatureOnlineStoreRequest) ProtoMessage() {} func (x *DeleteFeatureOnlineStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +509,9 @@ type CreateFeatureViewRequest struct { func (x *CreateFeatureViewRequest) Reset() { *x = CreateFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureViewRequest) String() string { @@ -536,7 +522,7 @@ func (*CreateFeatureViewRequest) ProtoMessage() {} func (x *CreateFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type GetFeatureViewRequest struct { func (x *GetFeatureViewRequest) Reset() { *x = GetFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureViewRequest) String() string { @@ -609,7 +593,7 @@ func (*GetFeatureViewRequest) ProtoMessage() {} func (x *GetFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +671,9 @@ type ListFeatureViewsRequest struct { func (x *ListFeatureViewsRequest) Reset() { *x = ListFeatureViewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewsRequest) String() string { @@ -702,7 +684,7 @@ func (*ListFeatureViewsRequest) ProtoMessage() {} func (x *ListFeatureViewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -770,11 +752,9 @@ type ListFeatureViewsResponse struct { func (x *ListFeatureViewsResponse) Reset() { *x = ListFeatureViewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewsResponse) String() string { @@ -785,7 +765,7 @@ func (*ListFeatureViewsResponse) ProtoMessage() {} func (x *ListFeatureViewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +829,9 @@ type UpdateFeatureViewRequest struct { func (x *UpdateFeatureViewRequest) Reset() { *x = UpdateFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureViewRequest) String() string { @@ -864,7 +842,7 @@ func (*UpdateFeatureViewRequest) ProtoMessage() {} func (x *UpdateFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +885,9 @@ type DeleteFeatureViewRequest struct { func (x *DeleteFeatureViewRequest) Reset() { *x = DeleteFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureViewRequest) String() string { @@ -922,7 +898,7 @@ func (*DeleteFeatureViewRequest) ProtoMessage() {} func (x *DeleteFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +932,9 @@ type CreateFeatureOnlineStoreOperationMetadata struct { func (x *CreateFeatureOnlineStoreOperationMetadata) Reset() { *x = CreateFeatureOnlineStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOnlineStoreOperationMetadata) String() string { @@ -971,7 +945,7 @@ func (*CreateFeatureOnlineStoreOperationMetadata) ProtoMessage() {} func (x *CreateFeatureOnlineStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +979,9 @@ type UpdateFeatureOnlineStoreOperationMetadata struct { func (x *UpdateFeatureOnlineStoreOperationMetadata) Reset() { *x = UpdateFeatureOnlineStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOnlineStoreOperationMetadata) String() string { @@ -1020,7 +992,7 @@ func (*UpdateFeatureOnlineStoreOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureOnlineStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1026,9 @@ type CreateFeatureViewOperationMetadata struct { func (x *CreateFeatureViewOperationMetadata) Reset() { *x = CreateFeatureViewOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureViewOperationMetadata) String() string { @@ -1069,7 +1039,7 @@ func (*CreateFeatureViewOperationMetadata) ProtoMessage() {} func (x *CreateFeatureViewOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,11 +1073,9 @@ type UpdateFeatureViewOperationMetadata struct { func (x *UpdateFeatureViewOperationMetadata) Reset() { *x = UpdateFeatureViewOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureViewOperationMetadata) String() string { @@ -1118,7 +1086,7 @@ func (*UpdateFeatureViewOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureViewOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1122,9 @@ type SyncFeatureViewRequest struct { func (x *SyncFeatureViewRequest) Reset() { *x = SyncFeatureViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncFeatureViewRequest) String() string { @@ -1169,7 +1135,7 @@ func (*SyncFeatureViewRequest) ProtoMessage() {} func (x *SyncFeatureViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1205,11 +1171,9 @@ type SyncFeatureViewResponse struct { func (x *SyncFeatureViewResponse) Reset() { *x = SyncFeatureViewResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncFeatureViewResponse) String() string { @@ -1220,7 +1184,7 @@ func (*SyncFeatureViewResponse) ProtoMessage() {} func (x *SyncFeatureViewResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1221,9 @@ type GetFeatureViewSyncRequest struct { func (x *GetFeatureViewSyncRequest) Reset() { *x = GetFeatureViewSyncRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureViewSyncRequest) String() string { @@ -1272,7 +1234,7 @@ func (*GetFeatureViewSyncRequest) ProtoMessage() {} func (x *GetFeatureViewSyncRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1302,9 @@ type ListFeatureViewSyncsRequest struct { func (x *ListFeatureViewSyncsRequest) Reset() { *x = ListFeatureViewSyncsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewSyncsRequest) String() string { @@ -1355,7 +1315,7 @@ func (*ListFeatureViewSyncsRequest) ProtoMessage() {} func (x *ListFeatureViewSyncsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1423,11 +1383,9 @@ type ListFeatureViewSyncsResponse struct { func (x *ListFeatureViewSyncsResponse) Reset() { *x = ListFeatureViewSyncsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureViewSyncsResponse) String() string { @@ -1438,7 +1396,7 @@ func (*ListFeatureViewSyncsResponse) ProtoMessage() {} func (x *ListFeatureViewSyncsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2056,260 +2014,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_pro file_google_cloud_aiplatform_v1beta1_feature_view_proto_init() file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureOnlineStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureOnlineStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureOnlineStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOnlineStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOnlineStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureViewOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureViewOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SyncFeatureViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SyncFeatureViewResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureViewSyncRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewSyncsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_admin_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureViewSyncsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_service.pb.go index 7ae29bdfc616..65d80cf0c130 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_online_store_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_online_store_service.proto @@ -235,11 +235,9 @@ type FeatureViewDataKey struct { func (x *FeatureViewDataKey) Reset() { *x = FeatureViewDataKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewDataKey) String() string { @@ -250,7 +248,7 @@ func (*FeatureViewDataKey) ProtoMessage() {} func (x *FeatureViewDataKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +338,9 @@ type FetchFeatureValuesRequest struct { func (x *FetchFeatureValuesRequest) Reset() { *x = FetchFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesRequest) String() string { @@ -355,7 +351,7 @@ func (*FetchFeatureValuesRequest) ProtoMessage() {} func (x *FetchFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +445,9 @@ type FetchFeatureValuesResponse struct { func (x *FetchFeatureValuesResponse) Reset() { *x = FetchFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse) String() string { @@ -464,7 +458,7 @@ func (*FetchFeatureValuesResponse) ProtoMessage() {} func (x *FetchFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +538,9 @@ type StreamingFetchFeatureValuesRequest struct { func (x *StreamingFetchFeatureValuesRequest) Reset() { *x = StreamingFetchFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingFetchFeatureValuesRequest) String() string { @@ -559,7 +551,7 @@ func (*StreamingFetchFeatureValuesRequest) ProtoMessage() {} func (x *StreamingFetchFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +609,9 @@ type StreamingFetchFeatureValuesResponse struct { func (x *StreamingFetchFeatureValuesResponse) Reset() { *x = StreamingFetchFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingFetchFeatureValuesResponse) String() string { @@ -632,7 +622,7 @@ func (*StreamingFetchFeatureValuesResponse) ProtoMessage() {} func (x *StreamingFetchFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -697,11 +687,9 @@ type NearestNeighborQuery struct { func (x *NearestNeighborQuery) Reset() { *x = NearestNeighborQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery) String() string { @@ -712,7 +700,7 @@ func (*NearestNeighborQuery) ProtoMessage() {} func (x *NearestNeighborQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +812,9 @@ type SearchNearestEntitiesRequest struct { func (x *SearchNearestEntitiesRequest) Reset() { *x = SearchNearestEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearestEntitiesRequest) String() string { @@ -839,7 +825,7 @@ func (*SearchNearestEntitiesRequest) ProtoMessage() {} func (x *SearchNearestEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +873,9 @@ type NearestNeighbors struct { func (x *NearestNeighbors) Reset() { *x = NearestNeighbors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighbors) String() string { @@ -902,7 +886,7 @@ func (*NearestNeighbors) ProtoMessage() {} func (x *NearestNeighbors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +921,9 @@ type SearchNearestEntitiesResponse struct { func (x *SearchNearestEntitiesResponse) Reset() { *x = SearchNearestEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearestEntitiesResponse) String() string { @@ -952,7 +934,7 @@ func (*SearchNearestEntitiesResponse) ProtoMessage() {} func (x *SearchNearestEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +969,9 @@ type FeatureViewDataKey_CompositeKey struct { func (x *FeatureViewDataKey_CompositeKey) Reset() { *x = FeatureViewDataKey_CompositeKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewDataKey_CompositeKey) String() string { @@ -1002,7 +982,7 @@ func (*FeatureViewDataKey_CompositeKey) ProtoMessage() {} func (x *FeatureViewDataKey_CompositeKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1017,9 @@ type FetchFeatureValuesResponse_FeatureNameValuePairList struct { func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) Reset() { *x = FetchFeatureValuesResponse_FeatureNameValuePairList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) String() string { @@ -1052,7 +1030,7 @@ func (*FetchFeatureValuesResponse_FeatureNameValuePairList) ProtoMessage() {} func (x *FetchFeatureValuesResponse_FeatureNameValuePairList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1068,9 @@ type FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair st func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) Reset() { *x = FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) String() string { @@ -1105,7 +1081,7 @@ func (*FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) func (x *FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1165,11 +1141,9 @@ type NearestNeighborQuery_Embedding struct { func (x *NearestNeighborQuery_Embedding) Reset() { *x = NearestNeighborQuery_Embedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_Embedding) String() string { @@ -1180,7 +1154,7 @@ func (*NearestNeighborQuery_Embedding) ProtoMessage() {} func (x *NearestNeighborQuery_Embedding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,11 +1199,9 @@ type NearestNeighborQuery_StringFilter struct { func (x *NearestNeighborQuery_StringFilter) Reset() { *x = NearestNeighborQuery_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_StringFilter) String() string { @@ -1240,7 +1212,7 @@ func (*NearestNeighborQuery_StringFilter) ProtoMessage() {} func (x *NearestNeighborQuery_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1279,9 @@ type NearestNeighborQuery_NumericFilter struct { func (x *NearestNeighborQuery_NumericFilter) Reset() { *x = NearestNeighborQuery_NumericFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_NumericFilter) String() string { @@ -1322,7 +1292,7 @@ func (*NearestNeighborQuery_NumericFilter) ProtoMessage() {} func (x *NearestNeighborQuery_NumericFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1394,9 @@ type NearestNeighborQuery_Parameters struct { func (x *NearestNeighborQuery_Parameters) Reset() { *x = NearestNeighborQuery_Parameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborQuery_Parameters) String() string { @@ -1439,7 +1407,7 @@ func (*NearestNeighborQuery_Parameters) ProtoMessage() {} func (x *NearestNeighborQuery_Parameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1455,9 @@ type NearestNeighbors_Neighbor struct { func (x *NearestNeighbors_Neighbor) Reset() { *x = NearestNeighbors_Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighbors_Neighbor) String() string { @@ -1502,7 +1468,7 @@ func (*NearestNeighbors_Neighbor) ProtoMessage() {} func (x *NearestNeighbors_Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1971,212 +1937,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_ini return } file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewDataKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamingFetchFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingFetchFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearestEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighbors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearestEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewDataKey_CompositeKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse_FeatureNameValuePairList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FetchFeatureValuesResponse_FeatureNameValuePairList_FeatureNameValuePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_Embedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_NumericFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborQuery_Parameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighbors_Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_feature_online_store_service_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureViewDataKey_Key)(nil), (*FeatureViewDataKey_CompositeKey_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_registry_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_registry_service.pb.go index c1a8e9a92ecb..e5ae5e8a87d5 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_registry_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_registry_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_registry_service.proto @@ -68,11 +68,9 @@ type CreateFeatureGroupRequest struct { func (x *CreateFeatureGroupRequest) Reset() { *x = CreateFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureGroupRequest) String() string { @@ -83,7 +81,7 @@ func (*CreateFeatureGroupRequest) ProtoMessage() {} func (x *CreateFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetFeatureGroupRequest struct { func (x *GetFeatureGroupRequest) Reset() { *x = GetFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureGroupRequest) String() string { @@ -147,7 +143,7 @@ func (*GetFeatureGroupRequest) ProtoMessage() {} func (x *GetFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type ListFeatureGroupsRequest struct { func (x *ListFeatureGroupsRequest) Reset() { *x = ListFeatureGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureGroupsRequest) String() string { @@ -241,7 +235,7 @@ func (*ListFeatureGroupsRequest) ProtoMessage() {} func (x *ListFeatureGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ListFeatureGroupsResponse struct { func (x *ListFeatureGroupsResponse) Reset() { *x = ListFeatureGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureGroupsResponse) String() string { @@ -324,7 +316,7 @@ func (*ListFeatureGroupsResponse) ProtoMessage() {} func (x *ListFeatureGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +375,9 @@ type UpdateFeatureGroupRequest struct { func (x *UpdateFeatureGroupRequest) Reset() { *x = UpdateFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureGroupRequest) String() string { @@ -398,7 +388,7 @@ func (*UpdateFeatureGroupRequest) ProtoMessage() {} func (x *UpdateFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +436,9 @@ type DeleteFeatureGroupRequest struct { func (x *DeleteFeatureGroupRequest) Reset() { *x = DeleteFeatureGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureGroupRequest) String() string { @@ -461,7 +449,7 @@ func (*DeleteFeatureGroupRequest) ProtoMessage() {} func (x *DeleteFeatureGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +503,9 @@ type CreateFeatureMonitorRequest struct { func (x *CreateFeatureMonitorRequest) Reset() { *x = CreateFeatureMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureMonitorRequest) String() string { @@ -530,7 +516,7 @@ func (*CreateFeatureMonitorRequest) ProtoMessage() {} func (x *CreateFeatureMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +565,9 @@ type GetFeatureMonitorRequest struct { func (x *GetFeatureMonitorRequest) Reset() { *x = GetFeatureMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureMonitorRequest) String() string { @@ -594,7 +578,7 @@ func (*GetFeatureMonitorRequest) ProtoMessage() {} func (x *GetFeatureMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +656,9 @@ type ListFeatureMonitorsRequest struct { func (x *ListFeatureMonitorsRequest) Reset() { *x = ListFeatureMonitorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureMonitorsRequest) String() string { @@ -687,7 +669,7 @@ func (*ListFeatureMonitorsRequest) ProtoMessage() {} func (x *ListFeatureMonitorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +734,9 @@ type DeleteFeatureMonitorRequest struct { func (x *DeleteFeatureMonitorRequest) Reset() { *x = DeleteFeatureMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureMonitorRequest) String() string { @@ -767,7 +747,7 @@ func (*DeleteFeatureMonitorRequest) ProtoMessage() {} func (x *DeleteFeatureMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +787,9 @@ type ListFeatureMonitorsResponse struct { func (x *ListFeatureMonitorsResponse) Reset() { *x = ListFeatureMonitorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureMonitorsResponse) String() string { @@ -822,7 +800,7 @@ func (*ListFeatureMonitorsResponse) ProtoMessage() {} func (x *ListFeatureMonitorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +841,9 @@ type CreateFeatureGroupOperationMetadata struct { func (x *CreateFeatureGroupOperationMetadata) Reset() { *x = CreateFeatureGroupOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureGroupOperationMetadata) String() string { @@ -878,7 +854,7 @@ func (*CreateFeatureGroupOperationMetadata) ProtoMessage() {} func (x *CreateFeatureGroupOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,11 +888,9 @@ type UpdateFeatureGroupOperationMetadata struct { func (x *UpdateFeatureGroupOperationMetadata) Reset() { *x = UpdateFeatureGroupOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureGroupOperationMetadata) String() string { @@ -927,7 +901,7 @@ func (*UpdateFeatureGroupOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureGroupOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +935,9 @@ type CreateRegistryFeatureOperationMetadata struct { func (x *CreateRegistryFeatureOperationMetadata) Reset() { *x = CreateRegistryFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRegistryFeatureOperationMetadata) String() string { @@ -976,7 +948,7 @@ func (*CreateRegistryFeatureOperationMetadata) ProtoMessage() {} func (x *CreateRegistryFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +982,9 @@ type UpdateFeatureOperationMetadata struct { func (x *UpdateFeatureOperationMetadata) Reset() { *x = UpdateFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureOperationMetadata) String() string { @@ -1025,7 +995,7 @@ func (*UpdateFeatureOperationMetadata) ProtoMessage() {} func (x *UpdateFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1029,9 @@ type CreateFeatureMonitorOperationMetadata struct { func (x *CreateFeatureMonitorOperationMetadata) Reset() { *x = CreateFeatureMonitorOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureMonitorOperationMetadata) String() string { @@ -1074,7 +1042,7 @@ func (*CreateFeatureMonitorOperationMetadata) ProtoMessage() {} func (x *CreateFeatureMonitorOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1083,9 @@ type CreateFeatureMonitorJobRequest struct { func (x *CreateFeatureMonitorJobRequest) Reset() { *x = CreateFeatureMonitorJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureMonitorJobRequest) String() string { @@ -1130,7 +1096,7 @@ func (*CreateFeatureMonitorJobRequest) ProtoMessage() {} func (x *CreateFeatureMonitorJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1181,11 +1147,9 @@ type GetFeatureMonitorJobRequest struct { func (x *GetFeatureMonitorJobRequest) Reset() { *x = GetFeatureMonitorJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureMonitorJobRequest) String() string { @@ -1196,7 +1160,7 @@ func (*GetFeatureMonitorJobRequest) ProtoMessage() {} func (x *GetFeatureMonitorJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,11 +1226,9 @@ type ListFeatureMonitorJobsRequest struct { func (x *ListFeatureMonitorJobsRequest) Reset() { *x = ListFeatureMonitorJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureMonitorJobsRequest) String() string { @@ -1277,7 +1239,7 @@ func (*ListFeatureMonitorJobsRequest) ProtoMessage() {} func (x *ListFeatureMonitorJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1307,9 @@ type ListFeatureMonitorJobsResponse struct { func (x *ListFeatureMonitorJobsResponse) Reset() { *x = ListFeatureMonitorJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeatureMonitorJobsResponse) String() string { @@ -1360,7 +1320,7 @@ func (*ListFeatureMonitorJobsResponse) ProtoMessage() {} func (x *ListFeatureMonitorJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2069,248 +2029,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_init() file_google_cloud_aiplatform_v1beta1_feature_monitor_job_proto_init() file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureMonitorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureMonitorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureGroupOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureGroupOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateRegistryFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureMonitorOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureMonitorJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureMonitorJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureMonitorJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_registry_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListFeatureMonitorJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_selector.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_selector.pb.go index a713bd81ad0d..71e6d76b6216 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_selector.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_selector.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_selector.proto @@ -53,11 +53,9 @@ type IdMatcher struct { func (x *IdMatcher) Reset() { *x = IdMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdMatcher) String() string { @@ -68,7 +66,7 @@ func (*IdMatcher) ProtoMessage() {} func (x *IdMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type FeatureSelector struct { func (x *FeatureSelector) Reset() { *x = FeatureSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSelector) String() string { @@ -117,7 +113,7 @@ func (*FeatureSelector) ProtoMessage() {} func (x *FeatureSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,32 +203,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_selector_proto_init() { if File_google_cloud_aiplatform_v1beta1_feature_selector_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IdMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_selector_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_view.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_view.pb.go index fcac8cb92266..55f7018fb41b 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_view.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_view.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_view.proto @@ -291,11 +291,9 @@ type FeatureView struct { func (x *FeatureView) Reset() { *x = FeatureView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView) String() string { @@ -306,7 +304,7 @@ func (*FeatureView) ProtoMessage() {} func (x *FeatureView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +480,9 @@ type FeatureView_BigQuerySource struct { func (x *FeatureView_BigQuerySource) Reset() { *x = FeatureView_BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_BigQuerySource) String() string { @@ -497,7 +493,7 @@ func (*FeatureView_BigQuerySource) ProtoMessage() {} func (x *FeatureView_BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +539,9 @@ type FeatureView_SyncConfig struct { func (x *FeatureView_SyncConfig) Reset() { *x = FeatureView_SyncConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_SyncConfig) String() string { @@ -558,7 +552,7 @@ func (*FeatureView_SyncConfig) ProtoMessage() {} func (x *FeatureView_SyncConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +617,9 @@ type FeatureView_VectorSearchConfig struct { func (x *FeatureView_VectorSearchConfig) Reset() { *x = FeatureView_VectorSearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_VectorSearchConfig) String() string { @@ -638,7 +630,7 @@ func (*FeatureView_VectorSearchConfig) ProtoMessage() {} func (x *FeatureView_VectorSearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +765,9 @@ type FeatureView_IndexConfig struct { func (x *FeatureView_IndexConfig) Reset() { *x = FeatureView_IndexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig) String() string { @@ -788,7 +778,7 @@ func (*FeatureView_IndexConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,11 +887,9 @@ type FeatureView_FeatureRegistrySource struct { func (x *FeatureView_FeatureRegistrySource) Reset() { *x = FeatureView_FeatureRegistrySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_FeatureRegistrySource) String() string { @@ -912,7 +900,7 @@ func (*FeatureView_FeatureRegistrySource) ProtoMessage() {} func (x *FeatureView_FeatureRegistrySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,11 +953,9 @@ type FeatureView_VertexRagSource struct { func (x *FeatureView_VertexRagSource) Reset() { *x = FeatureView_VertexRagSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_VertexRagSource) String() string { @@ -980,7 +966,7 @@ func (*FeatureView_VertexRagSource) ProtoMessage() {} func (x *FeatureView_VertexRagSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1011,9 @@ type FeatureView_OptimizedConfig struct { func (x *FeatureView_OptimizedConfig) Reset() { *x = FeatureView_OptimizedConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_OptimizedConfig) String() string { @@ -1040,7 +1024,7 @@ func (*FeatureView_OptimizedConfig) ProtoMessage() {} func (x *FeatureView_OptimizedConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1070,11 +1054,9 @@ type FeatureView_VectorSearchConfig_BruteForceConfig struct { func (x *FeatureView_VectorSearchConfig_BruteForceConfig) Reset() { *x = FeatureView_VectorSearchConfig_BruteForceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_VectorSearchConfig_BruteForceConfig) String() string { @@ -1085,7 +1067,7 @@ func (*FeatureView_VectorSearchConfig_BruteForceConfig) ProtoMessage() {} func (x *FeatureView_VectorSearchConfig_BruteForceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1112,11 +1094,9 @@ type FeatureView_VectorSearchConfig_TreeAHConfig struct { func (x *FeatureView_VectorSearchConfig_TreeAHConfig) Reset() { *x = FeatureView_VectorSearchConfig_TreeAHConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_VectorSearchConfig_TreeAHConfig) String() string { @@ -1127,7 +1107,7 @@ func (*FeatureView_VectorSearchConfig_TreeAHConfig) ProtoMessage() {} func (x *FeatureView_VectorSearchConfig_TreeAHConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1138,9 @@ type FeatureView_IndexConfig_BruteForceConfig struct { func (x *FeatureView_IndexConfig_BruteForceConfig) Reset() { *x = FeatureView_IndexConfig_BruteForceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig_BruteForceConfig) String() string { @@ -1173,7 +1151,7 @@ func (*FeatureView_IndexConfig_BruteForceConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig_BruteForceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1179,9 @@ type FeatureView_IndexConfig_TreeAHConfig struct { func (x *FeatureView_IndexConfig_TreeAHConfig) Reset() { *x = FeatureView_IndexConfig_TreeAHConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_IndexConfig_TreeAHConfig) String() string { @@ -1216,7 +1192,7 @@ func (*FeatureView_IndexConfig_TreeAHConfig) ProtoMessage() {} func (x *FeatureView_IndexConfig_TreeAHConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1253,11 +1229,9 @@ type FeatureView_FeatureRegistrySource_FeatureGroup struct { func (x *FeatureView_FeatureRegistrySource_FeatureGroup) Reset() { *x = FeatureView_FeatureRegistrySource_FeatureGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureView_FeatureRegistrySource_FeatureGroup) String() string { @@ -1268,7 +1242,7 @@ func (*FeatureView_FeatureRegistrySource_FeatureGroup) ProtoMessage() {} func (x *FeatureView_FeatureRegistrySource_FeatureGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1661,164 +1635,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_view_proto_init() { return } file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_SyncConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_VectorSearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_FeatureRegistrySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_VertexRagSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_OptimizedConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_VectorSearchConfig_BruteForceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_VectorSearchConfig_TreeAHConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig_BruteForceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_IndexConfig_TreeAHConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FeatureView_FeatureRegistrySource_FeatureGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_feature_view_proto_msgTypes[0].OneofWrappers = []any{ (*FeatureView_BigQuerySource_)(nil), (*FeatureView_FeatureRegistrySource_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/feature_view_sync.pb.go b/aiplatform/apiv1beta1/aiplatformpb/feature_view_sync.pb.go index eb0811a5588d..e06fc8f55566 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/feature_view_sync.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/feature_view_sync.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/feature_view_sync.proto @@ -67,11 +67,9 @@ type FeatureViewSync struct { func (x *FeatureViewSync) Reset() { *x = FeatureViewSync{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewSync) String() string { @@ -82,7 +80,7 @@ func (*FeatureViewSync) ProtoMessage() {} func (x *FeatureViewSync) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +162,9 @@ type FeatureViewSync_SyncSummary struct { func (x *FeatureViewSync_SyncSummary) Reset() { *x = FeatureViewSync_SyncSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureViewSync_SyncSummary) String() string { @@ -179,7 +175,7 @@ func (*FeatureViewSync_SyncSummary) ProtoMessage() {} func (x *FeatureViewSync_SyncSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,32 +333,6 @@ func file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_init() { if File_google_cloud_aiplatform_v1beta1_feature_view_sync_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewSync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_feature_view_sync_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureViewSync_SyncSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/featurestore.pb.go b/aiplatform/apiv1beta1/aiplatformpb/featurestore.pb.go index cd5b78daf083..46370b27b816 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/featurestore.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/featurestore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/featurestore.proto @@ -157,11 +157,9 @@ type Featurestore struct { func (x *Featurestore) Reset() { *x = Featurestore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore) String() string { @@ -172,7 +170,7 @@ func (*Featurestore) ProtoMessage() {} func (x *Featurestore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +282,9 @@ type Featurestore_OnlineServingConfig struct { func (x *Featurestore_OnlineServingConfig) Reset() { *x = Featurestore_OnlineServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore_OnlineServingConfig) String() string { @@ -299,7 +295,7 @@ func (*Featurestore_OnlineServingConfig) ProtoMessage() {} func (x *Featurestore_OnlineServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type Featurestore_OnlineServingConfig_Scaling struct { func (x *Featurestore_OnlineServingConfig_Scaling) Reset() { *x = Featurestore_OnlineServingConfig_Scaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Featurestore_OnlineServingConfig_Scaling) String() string { @@ -369,7 +363,7 @@ func (*Featurestore_OnlineServingConfig_Scaling) ProtoMessage() {} func (x *Featurestore_OnlineServingConfig_Scaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,44 +558,6 @@ func file_google_cloud_aiplatform_v1beta1_featurestore_proto_init() { return } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore_OnlineServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Featurestore_OnlineServingConfig_Scaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/featurestore_monitoring.pb.go b/aiplatform/apiv1beta1/aiplatformpb/featurestore_monitoring.pb.go index daf4a6aaff11..8e85562300ab 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/featurestore_monitoring.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/featurestore_monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto @@ -192,11 +192,9 @@ type FeaturestoreMonitoringConfig struct { func (x *FeaturestoreMonitoringConfig) Reset() { *x = FeaturestoreMonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig) String() string { @@ -207,7 +205,7 @@ func (*FeaturestoreMonitoringConfig) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +295,9 @@ type FeaturestoreMonitoringConfig_SnapshotAnalysis struct { func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) Reset() { *x = FeaturestoreMonitoringConfig_SnapshotAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) String() string { @@ -312,7 +308,7 @@ func (*FeaturestoreMonitoringConfig_SnapshotAnalysis) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_SnapshotAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +372,9 @@ type FeaturestoreMonitoringConfig_ImportFeaturesAnalysis struct { func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) Reset() { *x = FeaturestoreMonitoringConfig_ImportFeaturesAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) String() string { @@ -391,7 +385,7 @@ func (*FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_ImportFeaturesAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +428,9 @@ type FeaturestoreMonitoringConfig_ThresholdConfig struct { func (x *FeaturestoreMonitoringConfig_ThresholdConfig) Reset() { *x = FeaturestoreMonitoringConfig_ThresholdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeaturestoreMonitoringConfig_ThresholdConfig) String() string { @@ -449,7 +441,7 @@ func (*FeaturestoreMonitoringConfig_ThresholdConfig) ProtoMessage() {} func (x *FeaturestoreMonitoringConfig_ThresholdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,56 +646,6 @@ func file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_init() { if File_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_SnapshotAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_ImportFeaturesAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FeaturestoreMonitoringConfig_ThresholdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_featurestore_monitoring_proto_msgTypes[3].OneofWrappers = []any{ (*FeaturestoreMonitoringConfig_ThresholdConfig_Value)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/featurestore_online_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/featurestore_online_service.pb.go index fa658a9b6365..e1458a49c6bf 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/featurestore_online_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/featurestore_online_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/featurestore_online_service.proto @@ -62,11 +62,9 @@ type WriteFeatureValuesRequest struct { func (x *WriteFeatureValuesRequest) Reset() { *x = WriteFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesRequest) String() string { @@ -77,7 +75,7 @@ func (*WriteFeatureValuesRequest) ProtoMessage() {} func (x *WriteFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type WriteFeatureValuesPayload struct { func (x *WriteFeatureValuesPayload) Reset() { *x = WriteFeatureValuesPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesPayload) String() string { @@ -138,7 +134,7 @@ func (*WriteFeatureValuesPayload) ProtoMessage() {} func (x *WriteFeatureValuesPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type WriteFeatureValuesResponse struct { func (x *WriteFeatureValuesResponse) Reset() { *x = WriteFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFeatureValuesResponse) String() string { @@ -192,7 +186,7 @@ func (*WriteFeatureValuesResponse) ProtoMessage() {} func (x *WriteFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type ReadFeatureValuesRequest struct { func (x *ReadFeatureValuesRequest) Reset() { *x = ReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesRequest) String() string { @@ -245,7 +237,7 @@ func (*ReadFeatureValuesRequest) ProtoMessage() {} func (x *ReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +291,9 @@ type ReadFeatureValuesResponse struct { func (x *ReadFeatureValuesResponse) Reset() { *x = ReadFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse) String() string { @@ -314,7 +304,7 @@ func (*ReadFeatureValuesResponse) ProtoMessage() {} func (x *ReadFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type StreamingReadFeatureValuesRequest struct { func (x *StreamingReadFeatureValuesRequest) Reset() { *x = StreamingReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingReadFeatureValuesRequest) String() string { @@ -383,7 +371,7 @@ func (*StreamingReadFeatureValuesRequest) ProtoMessage() {} func (x *StreamingReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type FeatureValue struct { func (x *FeatureValue) Reset() { *x = FeatureValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValue) String() string { @@ -461,7 +447,7 @@ func (*FeatureValue) ProtoMessage() {} func (x *FeatureValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +632,9 @@ type StructValue struct { func (x *StructValue) Reset() { *x = StructValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructValue) String() string { @@ -661,7 +645,7 @@ func (*StructValue) ProtoMessage() {} func (x *StructValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -697,11 +681,9 @@ type StructFieldValue struct { func (x *StructFieldValue) Reset() { *x = StructFieldValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructFieldValue) String() string { @@ -712,7 +694,7 @@ func (*StructFieldValue) ProtoMessage() {} func (x *StructFieldValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +735,9 @@ type FeatureValueList struct { func (x *FeatureValueList) Reset() { *x = FeatureValueList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValueList) String() string { @@ -768,7 +748,7 @@ func (*FeatureValueList) ProtoMessage() {} func (x *FeatureValueList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +782,9 @@ type ReadFeatureValuesResponse_FeatureDescriptor struct { func (x *ReadFeatureValuesResponse_FeatureDescriptor) Reset() { *x = ReadFeatureValuesResponse_FeatureDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_FeatureDescriptor) String() string { @@ -817,7 +795,7 @@ func (*ReadFeatureValuesResponse_FeatureDescriptor) ProtoMessage() {} func (x *ReadFeatureValuesResponse_FeatureDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +837,9 @@ type ReadFeatureValuesResponse_Header struct { func (x *ReadFeatureValuesResponse_Header) Reset() { *x = ReadFeatureValuesResponse_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_Header) String() string { @@ -874,7 +850,7 @@ func (*ReadFeatureValuesResponse_Header) ProtoMessage() {} func (x *ReadFeatureValuesResponse_Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -922,11 +898,9 @@ type ReadFeatureValuesResponse_EntityView struct { func (x *ReadFeatureValuesResponse_EntityView) Reset() { *x = ReadFeatureValuesResponse_EntityView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_EntityView) String() string { @@ -937,7 +911,7 @@ func (*ReadFeatureValuesResponse_EntityView) ProtoMessage() {} func (x *ReadFeatureValuesResponse_EntityView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +956,9 @@ type ReadFeatureValuesResponse_EntityView_Data struct { func (x *ReadFeatureValuesResponse_EntityView_Data) Reset() { *x = ReadFeatureValuesResponse_EntityView_Data{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFeatureValuesResponse_EntityView_Data) String() string { @@ -997,7 +969,7 @@ func (*ReadFeatureValuesResponse_EntityView_Data) ProtoMessage() {} func (x *ReadFeatureValuesResponse_EntityView_Data) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1045,9 @@ type FeatureValue_Metadata struct { func (x *FeatureValue_Metadata) Reset() { *x = FeatureValue_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValue_Metadata) String() string { @@ -1088,7 +1058,7 @@ func (*FeatureValue_Metadata) ProtoMessage() {} func (x *FeatureValue_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1473,188 +1443,6 @@ func file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_init } file_google_cloud_aiplatform_v1beta1_feature_selector_proto_init() file_google_cloud_aiplatform_v1beta1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamingReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StructValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StructFieldValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValueList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_FeatureDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_EntityView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReadFeatureValuesResponse_EntityView_Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValue_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_featurestore_online_service_proto_msgTypes[6].OneofWrappers = []any{ (*FeatureValue_BoolValue)(nil), (*FeatureValue_DoubleValue)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/featurestore_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/featurestore_service.pb.go index e3c8193aa094..cf4cee897343 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/featurestore_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/featurestore_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -70,11 +70,9 @@ type CreateFeaturestoreRequest struct { func (x *CreateFeaturestoreRequest) Reset() { *x = CreateFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeaturestoreRequest) String() string { @@ -85,7 +83,7 @@ func (*CreateFeaturestoreRequest) ProtoMessage() {} func (x *CreateFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type GetFeaturestoreRequest struct { func (x *GetFeaturestoreRequest) Reset() { *x = GetFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeaturestoreRequest) String() string { @@ -149,7 +145,7 @@ func (*GetFeaturestoreRequest) ProtoMessage() {} func (x *GetFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type ListFeaturestoresRequest struct { func (x *ListFeaturestoresRequest) Reset() { *x = ListFeaturestoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturestoresRequest) String() string { @@ -248,7 +242,7 @@ func (*ListFeaturestoresRequest) ProtoMessage() {} func (x *ListFeaturestoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +317,9 @@ type ListFeaturestoresResponse struct { func (x *ListFeaturestoresResponse) Reset() { *x = ListFeaturestoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturestoresResponse) String() string { @@ -338,7 +330,7 @@ func (*ListFeaturestoresResponse) ProtoMessage() {} func (x *ListFeaturestoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +389,9 @@ type UpdateFeaturestoreRequest struct { func (x *UpdateFeaturestoreRequest) Reset() { *x = UpdateFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeaturestoreRequest) String() string { @@ -412,7 +402,7 @@ func (*UpdateFeaturestoreRequest) ProtoMessage() {} func (x *UpdateFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +450,9 @@ type DeleteFeaturestoreRequest struct { func (x *DeleteFeaturestoreRequest) Reset() { *x = DeleteFeaturestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeaturestoreRequest) String() string { @@ -475,7 +463,7 @@ func (*DeleteFeaturestoreRequest) ProtoMessage() {} func (x *DeleteFeaturestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +544,9 @@ type ImportFeatureValuesRequest struct { func (x *ImportFeatureValuesRequest) Reset() { *x = ImportFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesRequest) String() string { @@ -571,7 +557,7 @@ func (*ImportFeatureValuesRequest) ProtoMessage() {} func (x *ImportFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +730,9 @@ type ImportFeatureValuesResponse struct { func (x *ImportFeatureValuesResponse) Reset() { *x = ImportFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesResponse) String() string { @@ -759,7 +743,7 @@ func (*ImportFeatureValuesResponse) ProtoMessage() {} func (x *ImportFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +823,9 @@ type BatchReadFeatureValuesRequest struct { func (x *BatchReadFeatureValuesRequest) Reset() { *x = BatchReadFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest) String() string { @@ -854,7 +836,7 @@ func (*BatchReadFeatureValuesRequest) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +978,9 @@ type ExportFeatureValuesRequest struct { func (x *ExportFeatureValuesRequest) Reset() { *x = ExportFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest) String() string { @@ -1011,7 +991,7 @@ func (*ExportFeatureValuesRequest) ProtoMessage() {} func (x *ExportFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1089,9 @@ type DestinationFeatureSetting struct { func (x *DestinationFeatureSetting) Reset() { *x = DestinationFeatureSetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationFeatureSetting) String() string { @@ -1124,7 +1102,7 @@ func (*DestinationFeatureSetting) ProtoMessage() {} func (x *DestinationFeatureSetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1147,9 @@ type FeatureValueDestination struct { func (x *FeatureValueDestination) Reset() { *x = FeatureValueDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureValueDestination) String() string { @@ -1184,7 +1160,7 @@ func (*FeatureValueDestination) ProtoMessage() {} func (x *FeatureValueDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1277,11 +1253,9 @@ type ExportFeatureValuesResponse struct { func (x *ExportFeatureValuesResponse) Reset() { *x = ExportFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesResponse) String() string { @@ -1292,7 +1266,7 @@ func (*ExportFeatureValuesResponse) ProtoMessage() {} func (x *ExportFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1291,9 @@ type BatchReadFeatureValuesResponse struct { func (x *BatchReadFeatureValuesResponse) Reset() { *x = BatchReadFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesResponse) String() string { @@ -1332,7 +1304,7 @@ func (*BatchReadFeatureValuesResponse) ProtoMessage() {} func (x *BatchReadFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,11 +1344,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -1387,7 +1357,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1438,11 +1408,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -1453,7 +1421,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1533,11 +1501,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -1548,7 +1514,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1623,11 +1589,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -1638,7 +1602,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1667,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -1718,7 +1680,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1726,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -1779,7 +1739,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1797,9 @@ type CreateFeatureRequest struct { func (x *CreateFeatureRequest) Reset() { *x = CreateFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureRequest) String() string { @@ -1852,7 +1810,7 @@ func (*CreateFeatureRequest) ProtoMessage() {} func (x *CreateFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1912,11 +1870,9 @@ type BatchCreateFeaturesRequest struct { func (x *BatchCreateFeaturesRequest) Reset() { *x = BatchCreateFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesRequest) String() string { @@ -1927,7 +1883,7 @@ func (*BatchCreateFeaturesRequest) ProtoMessage() {} func (x *BatchCreateFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1969,11 +1925,9 @@ type BatchCreateFeaturesResponse struct { func (x *BatchCreateFeaturesResponse) Reset() { *x = BatchCreateFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesResponse) String() string { @@ -1984,7 +1938,7 @@ func (*BatchCreateFeaturesResponse) ProtoMessage() {} func (x *BatchCreateFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1983,9 @@ type GetFeatureRequest struct { func (x *GetFeatureRequest) Reset() { *x = GetFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeatureRequest) String() string { @@ -2044,7 +1996,7 @@ func (*GetFeatureRequest) ProtoMessage() {} func (x *GetFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2149,11 +2101,9 @@ type ListFeaturesRequest struct { func (x *ListFeaturesRequest) Reset() { *x = ListFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturesRequest) String() string { @@ -2164,7 +2114,7 @@ func (*ListFeaturesRequest) ProtoMessage() {} func (x *ListFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2248,11 +2198,9 @@ type ListFeaturesResponse struct { func (x *ListFeaturesResponse) Reset() { *x = ListFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeaturesResponse) String() string { @@ -2263,7 +2211,7 @@ func (*ListFeaturesResponse) ProtoMessage() {} func (x *ListFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2380,11 +2328,9 @@ type SearchFeaturesRequest struct { func (x *SearchFeaturesRequest) Reset() { *x = SearchFeaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFeaturesRequest) String() string { @@ -2395,7 +2341,7 @@ func (*SearchFeaturesRequest) ProtoMessage() {} func (x *SearchFeaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2464,11 +2410,9 @@ type SearchFeaturesResponse struct { func (x *SearchFeaturesResponse) Reset() { *x = SearchFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFeaturesResponse) String() string { @@ -2479,7 +2423,7 @@ func (*SearchFeaturesResponse) ProtoMessage() {} func (x *SearchFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2542,11 +2486,9 @@ type UpdateFeatureRequest struct { func (x *UpdateFeatureRequest) Reset() { *x = UpdateFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeatureRequest) String() string { @@ -2557,7 +2499,7 @@ func (*UpdateFeatureRequest) ProtoMessage() {} func (x *UpdateFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2604,11 +2546,9 @@ type DeleteFeatureRequest struct { func (x *DeleteFeatureRequest) Reset() { *x = DeleteFeatureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureRequest) String() string { @@ -2619,7 +2559,7 @@ func (*DeleteFeatureRequest) ProtoMessage() {} func (x *DeleteFeatureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2653,11 +2593,9 @@ type CreateFeaturestoreOperationMetadata struct { func (x *CreateFeaturestoreOperationMetadata) Reset() { *x = CreateFeaturestoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeaturestoreOperationMetadata) String() string { @@ -2668,7 +2606,7 @@ func (*CreateFeaturestoreOperationMetadata) ProtoMessage() {} func (x *CreateFeaturestoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2702,11 +2640,9 @@ type UpdateFeaturestoreOperationMetadata struct { func (x *UpdateFeaturestoreOperationMetadata) Reset() { *x = UpdateFeaturestoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeaturestoreOperationMetadata) String() string { @@ -2717,7 +2653,7 @@ func (*UpdateFeaturestoreOperationMetadata) ProtoMessage() {} func (x *UpdateFeaturestoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2769,11 +2705,9 @@ type ImportFeatureValuesOperationMetadata struct { func (x *ImportFeatureValuesOperationMetadata) Reset() { *x = ImportFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesOperationMetadata) String() string { @@ -2784,7 +2718,7 @@ func (*ImportFeatureValuesOperationMetadata) ProtoMessage() {} func (x *ImportFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2860,11 +2794,9 @@ type ExportFeatureValuesOperationMetadata struct { func (x *ExportFeatureValuesOperationMetadata) Reset() { *x = ExportFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesOperationMetadata) String() string { @@ -2875,7 +2807,7 @@ func (*ExportFeatureValuesOperationMetadata) ProtoMessage() {} func (x *ExportFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2909,11 +2841,9 @@ type BatchReadFeatureValuesOperationMetadata struct { func (x *BatchReadFeatureValuesOperationMetadata) Reset() { *x = BatchReadFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesOperationMetadata) String() string { @@ -2924,7 +2854,7 @@ func (*BatchReadFeatureValuesOperationMetadata) ProtoMessage() {} func (x *BatchReadFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2958,11 +2888,9 @@ type DeleteFeatureValuesOperationMetadata struct { func (x *DeleteFeatureValuesOperationMetadata) Reset() { *x = DeleteFeatureValuesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesOperationMetadata) String() string { @@ -2973,7 +2901,7 @@ func (*DeleteFeatureValuesOperationMetadata) ProtoMessage() {} func (x *DeleteFeatureValuesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3007,11 +2935,9 @@ type CreateEntityTypeOperationMetadata struct { func (x *CreateEntityTypeOperationMetadata) Reset() { *x = CreateEntityTypeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeOperationMetadata) String() string { @@ -3022,7 +2948,7 @@ func (*CreateEntityTypeOperationMetadata) ProtoMessage() {} func (x *CreateEntityTypeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3056,11 +2982,9 @@ type CreateFeatureOperationMetadata struct { func (x *CreateFeatureOperationMetadata) Reset() { *x = CreateFeatureOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeatureOperationMetadata) String() string { @@ -3071,7 +2995,7 @@ func (*CreateFeatureOperationMetadata) ProtoMessage() {} func (x *CreateFeatureOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3105,11 +3029,9 @@ type BatchCreateFeaturesOperationMetadata struct { func (x *BatchCreateFeaturesOperationMetadata) Reset() { *x = BatchCreateFeaturesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateFeaturesOperationMetadata) String() string { @@ -3120,7 +3042,7 @@ func (*BatchCreateFeaturesOperationMetadata) ProtoMessage() {} func (x *BatchCreateFeaturesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3164,11 +3086,9 @@ type DeleteFeatureValuesRequest struct { func (x *DeleteFeatureValuesRequest) Reset() { *x = DeleteFeatureValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest) String() string { @@ -3179,7 +3099,7 @@ func (*DeleteFeatureValuesRequest) ProtoMessage() {} func (x *DeleteFeatureValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3261,11 +3181,9 @@ type DeleteFeatureValuesResponse struct { func (x *DeleteFeatureValuesResponse) Reset() { *x = DeleteFeatureValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse) String() string { @@ -3276,7 +3194,7 @@ func (*DeleteFeatureValuesResponse) ProtoMessage() {} func (x *DeleteFeatureValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3351,11 +3269,9 @@ type EntityIdSelector struct { func (x *EntityIdSelector) Reset() { *x = EntityIdSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityIdSelector) String() string { @@ -3366,7 +3282,7 @@ func (*EntityIdSelector) ProtoMessage() {} func (x *EntityIdSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3429,11 +3345,9 @@ type ImportFeatureValuesRequest_FeatureSpec struct { func (x *ImportFeatureValuesRequest_FeatureSpec) Reset() { *x = ImportFeatureValuesRequest_FeatureSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFeatureValuesRequest_FeatureSpec) String() string { @@ -3444,7 +3358,7 @@ func (*ImportFeatureValuesRequest_FeatureSpec) ProtoMessage() {} func (x *ImportFeatureValuesRequest_FeatureSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3487,11 +3401,9 @@ type BatchReadFeatureValuesRequest_PassThroughField struct { func (x *BatchReadFeatureValuesRequest_PassThroughField) Reset() { *x = BatchReadFeatureValuesRequest_PassThroughField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest_PassThroughField) String() string { @@ -3502,7 +3414,7 @@ func (*BatchReadFeatureValuesRequest_PassThroughField) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest_PassThroughField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3545,11 +3457,9 @@ type BatchReadFeatureValuesRequest_EntityTypeSpec struct { func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) Reset() { *x = BatchReadFeatureValuesRequest_EntityTypeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) String() string { @@ -3560,7 +3470,7 @@ func (*BatchReadFeatureValuesRequest_EntityTypeSpec) ProtoMessage() {} func (x *BatchReadFeatureValuesRequest_EntityTypeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3615,11 +3525,9 @@ type ExportFeatureValuesRequest_SnapshotExport struct { func (x *ExportFeatureValuesRequest_SnapshotExport) Reset() { *x = ExportFeatureValuesRequest_SnapshotExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest_SnapshotExport) String() string { @@ -3630,7 +3538,7 @@ func (*ExportFeatureValuesRequest_SnapshotExport) ProtoMessage() {} func (x *ExportFeatureValuesRequest_SnapshotExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3678,11 +3586,9 @@ type ExportFeatureValuesRequest_FullExport struct { func (x *ExportFeatureValuesRequest_FullExport) Reset() { *x = ExportFeatureValuesRequest_FullExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFeatureValuesRequest_FullExport) String() string { @@ -3693,7 +3599,7 @@ func (*ExportFeatureValuesRequest_FullExport) ProtoMessage() {} func (x *ExportFeatureValuesRequest_FullExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3737,11 +3643,9 @@ type DeleteFeatureValuesRequest_SelectEntity struct { func (x *DeleteFeatureValuesRequest_SelectEntity) Reset() { *x = DeleteFeatureValuesRequest_SelectEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest_SelectEntity) String() string { @@ -3752,7 +3656,7 @@ func (*DeleteFeatureValuesRequest_SelectEntity) ProtoMessage() {} func (x *DeleteFeatureValuesRequest_SelectEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3799,11 +3703,9 @@ type DeleteFeatureValuesRequest_SelectTimeRangeAndFeature struct { func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) Reset() { *x = DeleteFeatureValuesRequest_SelectTimeRangeAndFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) String() string { @@ -3814,7 +3716,7 @@ func (*DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) ProtoMessage() {} func (x *DeleteFeatureValuesRequest_SelectTimeRangeAndFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3867,11 +3769,9 @@ type DeleteFeatureValuesResponse_SelectEntity struct { func (x *DeleteFeatureValuesResponse_SelectEntity) Reset() { *x = DeleteFeatureValuesResponse_SelectEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse_SelectEntity) String() string { @@ -3882,7 +3782,7 @@ func (*DeleteFeatureValuesResponse_SelectEntity) ProtoMessage() {} func (x *DeleteFeatureValuesResponse_SelectEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3935,11 +3835,9 @@ type DeleteFeatureValuesResponse_SelectTimeRangeAndFeature struct { func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) Reset() { *x = DeleteFeatureValuesResponse_SelectTimeRangeAndFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) String() string { @@ -3950,7 +3848,7 @@ func (*DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) ProtoMessage() {} func (x *DeleteFeatureValuesResponse_SelectTimeRangeAndFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5276,620 +5174,6 @@ func file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_init() { file_google_cloud_aiplatform_v1beta1_featurestore_proto_init() file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturestoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturestoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeaturestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DestinationFeatureSetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FeatureValueDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchFeaturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeaturestoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeaturestoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeatureOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateFeaturesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*EntityIdSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ImportFeatureValuesRequest_FeatureSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest_PassThroughField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadFeatureValuesRequest_EntityTypeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest_SnapshotExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ExportFeatureValuesRequest_FullExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest_SelectEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesRequest_SelectTimeRangeAndFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse_SelectEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeatureValuesResponse_SelectTimeRangeAndFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_featurestore_service_proto_msgTypes[6].OneofWrappers = []any{ (*ImportFeatureValuesRequest_AvroSource)(nil), (*ImportFeatureValuesRequest_BigquerySource)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/gen_ai_cache_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/gen_ai_cache_service.pb.go index 310b8dc5880d..9f6e4e061b76 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/gen_ai_cache_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/gen_ai_cache_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/gen_ai_cache_service.proto @@ -57,11 +57,9 @@ type CreateCachedContentRequest struct { func (x *CreateCachedContentRequest) Reset() { *x = CreateCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCachedContentRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateCachedContentRequest) ProtoMessage() {} func (x *CreateCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type GetCachedContentRequest struct { func (x *GetCachedContentRequest) Reset() { *x = GetCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCachedContentRequest) String() string { @@ -129,7 +125,7 @@ func (*GetCachedContentRequest) ProtoMessage() {} func (x *GetCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type UpdateCachedContentRequest struct { func (x *UpdateCachedContentRequest) Reset() { *x = UpdateCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCachedContentRequest) String() string { @@ -182,7 +176,7 @@ func (*UpdateCachedContentRequest) ProtoMessage() {} func (x *UpdateCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +218,9 @@ type DeleteCachedContentRequest struct { func (x *DeleteCachedContentRequest) Reset() { *x = DeleteCachedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCachedContentRequest) String() string { @@ -239,7 +231,7 @@ func (*DeleteCachedContentRequest) ProtoMessage() {} func (x *DeleteCachedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +276,9 @@ type ListCachedContentsRequest struct { func (x *ListCachedContentsRequest) Reset() { *x = ListCachedContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCachedContentsRequest) String() string { @@ -299,7 +289,7 @@ func (*ListCachedContentsRequest) ProtoMessage() {} func (x *ListCachedContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +340,9 @@ type ListCachedContentsResponse struct { func (x *ListCachedContentsResponse) Reset() { *x = ListCachedContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCachedContentsResponse) String() string { @@ -365,7 +353,7 @@ func (*ListCachedContentsResponse) ProtoMessage() {} func (x *ListCachedContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,80 +607,6 @@ func file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_init() { return } file_google_cloud_aiplatform_v1beta1_cached_content_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCachedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCachedContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_gen_ai_cache_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCachedContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/genai_tuning_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/genai_tuning_service.pb.go index 699a3a946a4b..a17ed50ddf20 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/genai_tuning_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/genai_tuning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto @@ -58,11 +58,9 @@ type CreateTuningJobRequest struct { func (x *CreateTuningJobRequest) Reset() { *x = CreateTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTuningJobRequest) String() string { @@ -73,7 +71,7 @@ func (*CreateTuningJobRequest) ProtoMessage() {} func (x *CreateTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type GetTuningJobRequest struct { func (x *GetTuningJobRequest) Reset() { *x = GetTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTuningJobRequest) String() string { @@ -131,7 +127,7 @@ func (*GetTuningJobRequest) ProtoMessage() {} func (x *GetTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type ListTuningJobsRequest struct { func (x *ListTuningJobsRequest) Reset() { *x = ListTuningJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTuningJobsRequest) String() string { @@ -190,7 +184,7 @@ func (*ListTuningJobsRequest) ProtoMessage() {} func (x *ListTuningJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type ListTuningJobsResponse struct { func (x *ListTuningJobsResponse) Reset() { *x = ListTuningJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTuningJobsResponse) String() string { @@ -266,7 +258,7 @@ func (*ListTuningJobsResponse) ProtoMessage() {} func (x *ListTuningJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +301,9 @@ type CancelTuningJobRequest struct { func (x *CancelTuningJobRequest) Reset() { *x = CancelTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelTuningJobRequest) String() string { @@ -324,7 +314,7 @@ func (*CancelTuningJobRequest) ProtoMessage() {} func (x *CancelTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +361,9 @@ type RebaseTunedModelRequest struct { func (x *RebaseTunedModelRequest) Reset() { *x = RebaseTunedModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebaseTunedModelRequest) String() string { @@ -386,7 +374,7 @@ func (*RebaseTunedModelRequest) ProtoMessage() {} func (x *RebaseTunedModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +437,9 @@ type RebaseTunedModelOperationMetadata struct { func (x *RebaseTunedModelOperationMetadata) Reset() { *x = RebaseTunedModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebaseTunedModelOperationMetadata) String() string { @@ -464,7 +450,7 @@ func (*RebaseTunedModelOperationMetadata) ProtoMessage() {} func (x *RebaseTunedModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,92 +729,6 @@ func file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_init() { file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_tuning_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTuningJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTuningJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CancelTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RebaseTunedModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_genai_tuning_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RebaseTunedModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/hyperparameter_tuning_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/hyperparameter_tuning_job.pb.go index 3dba5a73e4e2..18fa561af4ee 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/hyperparameter_tuning_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/hyperparameter_tuning_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto @@ -106,11 +106,9 @@ type HyperparameterTuningJob struct { func (x *HyperparameterTuningJob) Reset() { *x = HyperparameterTuningJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_hyperparameter_tuning_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_hyperparameter_tuning_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HyperparameterTuningJob) String() string { @@ -121,7 +119,7 @@ func (*HyperparameterTuningJob) ProtoMessage() {} func (x *HyperparameterTuningJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_hyperparameter_tuning_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,20 +443,6 @@ func file_google_cloud_aiplatform_v1beta1_hyperparameter_tuning_job_proto_init() file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_hyperparameter_tuning_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HyperparameterTuningJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/index.pb.go b/aiplatform/apiv1beta1/aiplatformpb/index.pb.go index 3b7a3e4df30a..3b0f2a0a7e16 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/index.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/index.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/index.proto @@ -237,11 +237,9 @@ type Index struct { func (x *Index) Reset() { *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index) String() string { @@ -252,7 +250,7 @@ func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +399,9 @@ type IndexDatapoint struct { func (x *IndexDatapoint) Reset() { *x = IndexDatapoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint) String() string { @@ -416,7 +412,7 @@ func (*IndexDatapoint) ProtoMessage() {} func (x *IndexDatapoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +485,9 @@ type IndexStats struct { func (x *IndexStats) Reset() { *x = IndexStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexStats) String() string { @@ -504,7 +498,7 @@ func (*IndexStats) ProtoMessage() {} func (x *IndexStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +550,9 @@ type IndexDatapoint_SparseEmbedding struct { func (x *IndexDatapoint_SparseEmbedding) Reset() { *x = IndexDatapoint_SparseEmbedding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_SparseEmbedding) String() string { @@ -571,7 +563,7 @@ func (*IndexDatapoint_SparseEmbedding) ProtoMessage() {} func (x *IndexDatapoint_SparseEmbedding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +609,9 @@ type IndexDatapoint_Restriction struct { func (x *IndexDatapoint_Restriction) Reset() { *x = IndexDatapoint_Restriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_Restriction) String() string { @@ -632,7 +622,7 @@ func (*IndexDatapoint_Restriction) ProtoMessage() {} func (x *IndexDatapoint_Restriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +683,9 @@ type IndexDatapoint_NumericRestriction struct { func (x *IndexDatapoint_NumericRestriction) Reset() { *x = IndexDatapoint_NumericRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_NumericRestriction) String() string { @@ -708,7 +696,7 @@ func (*IndexDatapoint_NumericRestriction) ProtoMessage() {} func (x *IndexDatapoint_NumericRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +796,9 @@ type IndexDatapoint_CrowdingTag struct { func (x *IndexDatapoint_CrowdingTag) Reset() { *x = IndexDatapoint_CrowdingTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexDatapoint_CrowdingTag) String() string { @@ -823,7 +809,7 @@ func (*IndexDatapoint_CrowdingTag) ProtoMessage() {} func (x *IndexDatapoint_CrowdingTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,92 +1084,6 @@ func file_google_cloud_aiplatform_v1beta1_index_proto_init() { } file_google_cloud_aiplatform_v1beta1_deployed_index_ref_proto_init() file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*IndexStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_SparseEmbedding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_Restriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_NumericRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IndexDatapoint_CrowdingTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_index_proto_msgTypes[6].OneofWrappers = []any{ (*IndexDatapoint_NumericRestriction_ValueInt)(nil), (*IndexDatapoint_NumericRestriction_ValueFloat)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/index_endpoint.pb.go b/aiplatform/apiv1beta1/aiplatformpb/index_endpoint.pb.go index ea84798d5084..c6709d6ebd77 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/index_endpoint.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/index_endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/index_endpoint.proto @@ -124,11 +124,9 @@ type IndexEndpoint struct { func (x *IndexEndpoint) Reset() { *x = IndexEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexEndpoint) String() string { @@ -139,7 +137,7 @@ func (*IndexEndpoint) ProtoMessage() {} func (x *IndexEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +379,9 @@ type DeployedIndex struct { func (x *DeployedIndex) Reset() { *x = DeployedIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndex) String() string { @@ -396,7 +392,7 @@ func (*DeployedIndex) ProtoMessage() {} func (x *DeployedIndex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +510,9 @@ type DeployedIndexAuthConfig struct { func (x *DeployedIndexAuthConfig) Reset() { *x = DeployedIndexAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexAuthConfig) String() string { @@ -529,7 +523,7 @@ func (*DeployedIndexAuthConfig) ProtoMessage() {} func (x *DeployedIndexAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +567,9 @@ type IndexPrivateEndpoints struct { func (x *IndexPrivateEndpoints) Reset() { *x = IndexPrivateEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexPrivateEndpoints) String() string { @@ -588,7 +580,7 @@ func (*IndexPrivateEndpoints) ProtoMessage() {} func (x *IndexPrivateEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +638,9 @@ type DeployedIndexAuthConfig_AuthProvider struct { func (x *DeployedIndexAuthConfig_AuthProvider) Reset() { *x = DeployedIndexAuthConfig_AuthProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexAuthConfig_AuthProvider) String() string { @@ -661,7 +651,7 @@ func (*DeployedIndexAuthConfig_AuthProvider) ProtoMessage() {} func (x *DeployedIndexAuthConfig_AuthProvider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,68 +946,6 @@ func file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_init() { file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IndexEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*IndexPrivateEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexAuthConfig_AuthProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/index_endpoint_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/index_endpoint_service.pb.go index fd4e02335320..f742edb6e7ed 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/index_endpoint_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/index_endpoint_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/index_endpoint_service.proto @@ -59,11 +59,9 @@ type CreateIndexEndpointRequest struct { func (x *CreateIndexEndpointRequest) Reset() { *x = CreateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateIndexEndpointRequest) ProtoMessage() {} func (x *CreateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateIndexEndpointOperationMetadata struct { func (x *CreateIndexEndpointOperationMetadata) Reset() { *x = CreateIndexEndpointOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateIndexEndpointOperationMetadata) ProtoMessage() {} func (x *CreateIndexEndpointOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetIndexEndpointRequest struct { func (x *GetIndexEndpointRequest) Reset() { *x = GetIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexEndpointRequest) String() string { @@ -183,7 +177,7 @@ func (*GetIndexEndpointRequest) ProtoMessage() {} func (x *GetIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +243,9 @@ type ListIndexEndpointsRequest struct { func (x *ListIndexEndpointsRequest) Reset() { *x = ListIndexEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsRequest) String() string { @@ -264,7 +256,7 @@ func (*ListIndexEndpointsRequest) ProtoMessage() {} func (x *ListIndexEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type ListIndexEndpointsResponse struct { func (x *ListIndexEndpointsResponse) Reset() { *x = ListIndexEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsResponse) String() string { @@ -347,7 +337,7 @@ func (*ListIndexEndpointsResponse) ProtoMessage() {} func (x *ListIndexEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +382,9 @@ type UpdateIndexEndpointRequest struct { func (x *UpdateIndexEndpointRequest) Reset() { *x = UpdateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexEndpointRequest) String() string { @@ -407,7 +395,7 @@ func (*UpdateIndexEndpointRequest) ProtoMessage() {} func (x *UpdateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +439,9 @@ type DeleteIndexEndpointRequest struct { func (x *DeleteIndexEndpointRequest) Reset() { *x = DeleteIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexEndpointRequest) String() string { @@ -466,7 +452,7 @@ func (*DeleteIndexEndpointRequest) ProtoMessage() {} func (x *DeleteIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type DeployIndexRequest struct { func (x *DeployIndexRequest) Reset() { *x = DeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexRequest) String() string { @@ -520,7 +504,7 @@ func (*DeployIndexRequest) ProtoMessage() {} func (x *DeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,11 +546,9 @@ type DeployIndexResponse struct { func (x *DeployIndexResponse) Reset() { *x = DeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexResponse) String() string { @@ -577,7 +559,7 @@ func (*DeployIndexResponse) ProtoMessage() {} func (x *DeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +596,9 @@ type DeployIndexOperationMetadata struct { func (x *DeployIndexOperationMetadata) Reset() { *x = DeployIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexOperationMetadata) String() string { @@ -629,7 +609,7 @@ func (*DeployIndexOperationMetadata) ProtoMessage() {} func (x *DeployIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +656,9 @@ type UndeployIndexRequest struct { func (x *UndeployIndexRequest) Reset() { *x = UndeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexRequest) String() string { @@ -691,7 +669,7 @@ func (*UndeployIndexRequest) ProtoMessage() {} func (x *UndeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +708,9 @@ type UndeployIndexResponse struct { func (x *UndeployIndexResponse) Reset() { *x = UndeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexResponse) String() string { @@ -745,7 +721,7 @@ func (*UndeployIndexResponse) ProtoMessage() {} func (x *UndeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +749,9 @@ type UndeployIndexOperationMetadata struct { func (x *UndeployIndexOperationMetadata) Reset() { *x = UndeployIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexOperationMetadata) String() string { @@ -788,7 +762,7 @@ func (*UndeployIndexOperationMetadata) ProtoMessage() {} func (x *UndeployIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +803,9 @@ type MutateDeployedIndexRequest struct { func (x *MutateDeployedIndexRequest) Reset() { *x = MutateDeployedIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexRequest) String() string { @@ -844,7 +816,7 @@ func (*MutateDeployedIndexRequest) ProtoMessage() {} func (x *MutateDeployedIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +858,9 @@ type MutateDeployedIndexResponse struct { func (x *MutateDeployedIndexResponse) Reset() { *x = MutateDeployedIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexResponse) String() string { @@ -901,7 +871,7 @@ func (*MutateDeployedIndexResponse) ProtoMessage() {} func (x *MutateDeployedIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +908,9 @@ type MutateDeployedIndexOperationMetadata struct { func (x *MutateDeployedIndexOperationMetadata) Reset() { *x = MutateDeployedIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateDeployedIndexOperationMetadata) String() string { @@ -953,7 +921,7 @@ func (*MutateDeployedIndexOperationMetadata) ProtoMessage() {} func (x *MutateDeployedIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,200 +1368,6 @@ func file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_index_endpoint_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_endpoint_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MutateDeployedIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/index_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/index_service.pb.go index 2a52251a1239..5c65a9b3e3f5 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/index_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/index_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/index_service.proto @@ -173,11 +173,9 @@ type CreateIndexRequest struct { func (x *CreateIndexRequest) Reset() { *x = CreateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexRequest) String() string { @@ -188,7 +186,7 @@ func (*CreateIndexRequest) ProtoMessage() {} func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +230,9 @@ type CreateIndexOperationMetadata struct { func (x *CreateIndexOperationMetadata) Reset() { *x = CreateIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexOperationMetadata) String() string { @@ -247,7 +243,7 @@ func (*CreateIndexOperationMetadata) ProtoMessage() {} func (x *CreateIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +287,9 @@ type GetIndexRequest struct { func (x *GetIndexRequest) Reset() { *x = GetIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexRequest) String() string { @@ -306,7 +300,7 @@ func (*GetIndexRequest) ProtoMessage() {} func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +349,9 @@ type ListIndexesRequest struct { func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesRequest) String() string { @@ -370,7 +362,7 @@ func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type ListIndexesResponse struct { func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesResponse) String() string { @@ -453,7 +443,7 @@ func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type UpdateIndexRequest struct { func (x *UpdateIndexRequest) Reset() { *x = UpdateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexRequest) String() string { @@ -514,7 +502,7 @@ func (*UpdateIndexRequest) ProtoMessage() {} func (x *UpdateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +546,9 @@ type UpdateIndexOperationMetadata struct { func (x *UpdateIndexOperationMetadata) Reset() { *x = UpdateIndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexOperationMetadata) String() string { @@ -573,7 +559,7 @@ func (*UpdateIndexOperationMetadata) ProtoMessage() {} func (x *UpdateIndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +603,9 @@ type DeleteIndexRequest struct { func (x *DeleteIndexRequest) Reset() { *x = DeleteIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexRequest) String() string { @@ -632,7 +616,7 @@ func (*DeleteIndexRequest) ProtoMessage() {} func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +663,9 @@ type UpsertDatapointsRequest struct { func (x *UpsertDatapointsRequest) Reset() { *x = UpsertDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDatapointsRequest) String() string { @@ -694,7 +676,7 @@ func (*UpsertDatapointsRequest) ProtoMessage() {} func (x *UpsertDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +722,9 @@ type UpsertDatapointsResponse struct { func (x *UpsertDatapointsResponse) Reset() { *x = UpsertDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpsertDatapointsResponse) String() string { @@ -755,7 +735,7 @@ func (*UpsertDatapointsResponse) ProtoMessage() {} func (x *UpsertDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +767,9 @@ type RemoveDatapointsRequest struct { func (x *RemoveDatapointsRequest) Reset() { *x = RemoveDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDatapointsRequest) String() string { @@ -802,7 +780,7 @@ func (*RemoveDatapointsRequest) ProtoMessage() {} func (x *RemoveDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +819,9 @@ type RemoveDatapointsResponse struct { func (x *RemoveDatapointsResponse) Reset() { *x = RemoveDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDatapointsResponse) String() string { @@ -856,7 +832,7 @@ func (*RemoveDatapointsResponse) ProtoMessage() {} func (x *RemoveDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +866,9 @@ type NearestNeighborSearchOperationMetadata struct { func (x *NearestNeighborSearchOperationMetadata) Reset() { *x = NearestNeighborSearchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata) String() string { @@ -905,7 +879,7 @@ func (*NearestNeighborSearchOperationMetadata) ProtoMessage() {} func (x *NearestNeighborSearchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +929,9 @@ type NearestNeighborSearchOperationMetadata_RecordError struct { func (x *NearestNeighborSearchOperationMetadata_RecordError) Reset() { *x = NearestNeighborSearchOperationMetadata_RecordError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata_RecordError) String() string { @@ -970,7 +942,7 @@ func (*NearestNeighborSearchOperationMetadata_RecordError) ProtoMessage() {} func (x *NearestNeighborSearchOperationMetadata_RecordError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1015,9 @@ type NearestNeighborSearchOperationMetadata_ContentValidationStats struct { func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) Reset() { *x = NearestNeighborSearchOperationMetadata_ContentValidationStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) String() string { @@ -1058,7 +1028,7 @@ func (*NearestNeighborSearchOperationMetadata_ContentValidationStats) ProtoMessa func (x *NearestNeighborSearchOperationMetadata_ContentValidationStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1541,188 +1511,6 @@ func file_google_cloud_aiplatform_v1beta1_index_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_index_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpsertDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpsertDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata_RecordError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_index_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NearestNeighborSearchOperationMetadata_ContentValidationStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/io.pb.go b/aiplatform/apiv1beta1/aiplatformpb/io.pb.go index a5643a5bc4b5..b832bac37db4 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/io.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/io.proto @@ -102,11 +102,9 @@ type AvroSource struct { func (x *AvroSource) Reset() { *x = AvroSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSource) String() string { @@ -117,7 +115,7 @@ func (*AvroSource) ProtoMessage() {} func (x *AvroSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type CsvSource struct { func (x *CsvSource) Reset() { *x = CsvSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvSource) String() string { @@ -166,7 +162,7 @@ func (*CsvSource) ProtoMessage() {} func (x *CsvSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -217,7 +211,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +248,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -269,7 +261,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +298,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -321,7 +311,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type BigQueryDestination struct { func (x *BigQueryDestination) Reset() { *x = BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestination) String() string { @@ -380,7 +368,7 @@ func (*BigQueryDestination) ProtoMessage() {} func (x *BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +402,9 @@ type CsvDestination struct { func (x *CsvDestination) Reset() { *x = CsvDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvDestination) String() string { @@ -429,7 +415,7 @@ func (*CsvDestination) ProtoMessage() {} func (x *CsvDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +449,9 @@ type TFRecordDestination struct { func (x *TFRecordDestination) Reset() { *x = TFRecordDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TFRecordDestination) String() string { @@ -478,7 +462,7 @@ func (*TFRecordDestination) ProtoMessage() {} func (x *TFRecordDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +506,9 @@ type ContainerRegistryDestination struct { func (x *ContainerRegistryDestination) Reset() { *x = ContainerRegistryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerRegistryDestination) String() string { @@ -537,7 +519,7 @@ func (*ContainerRegistryDestination) ProtoMessage() {} func (x *ContainerRegistryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +553,9 @@ type GoogleDriveSource struct { func (x *GoogleDriveSource) Reset() { *x = GoogleDriveSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleDriveSource) String() string { @@ -586,7 +566,7 @@ func (*GoogleDriveSource) ProtoMessage() {} func (x *GoogleDriveSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +597,9 @@ type DirectUploadSource struct { func (x *DirectUploadSource) Reset() { *x = DirectUploadSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectUploadSource) String() string { @@ -632,7 +610,7 @@ func (*DirectUploadSource) ProtoMessage() {} func (x *DirectUploadSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +637,9 @@ type SlackSource struct { func (x *SlackSource) Reset() { *x = SlackSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource) String() string { @@ -674,7 +650,7 @@ func (*SlackSource) ProtoMessage() {} func (x *SlackSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +684,9 @@ type JiraSource struct { func (x *JiraSource) Reset() { *x = JiraSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JiraSource) String() string { @@ -723,7 +697,7 @@ func (*JiraSource) ProtoMessage() {} func (x *JiraSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +731,9 @@ type SharePointSources struct { func (x *SharePointSources) Reset() { *x = SharePointSources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharePointSources) String() string { @@ -772,7 +744,7 @@ func (*SharePointSources) ProtoMessage() {} func (x *SharePointSources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +780,9 @@ type GoogleDriveSource_ResourceId struct { func (x *GoogleDriveSource_ResourceId) Reset() { *x = GoogleDriveSource_ResourceId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleDriveSource_ResourceId) String() string { @@ -823,7 +793,7 @@ func (*GoogleDriveSource_ResourceId) ProtoMessage() {} func (x *GoogleDriveSource_ResourceId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +839,9 @@ type SlackSource_SlackChannels struct { func (x *SlackSource_SlackChannels) Reset() { *x = SlackSource_SlackChannels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource_SlackChannels) String() string { @@ -884,7 +852,7 @@ func (*SlackSource_SlackChannels) ProtoMessage() {} func (x *SlackSource_SlackChannels) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,11 +897,9 @@ type SlackSource_SlackChannels_SlackChannel struct { func (x *SlackSource_SlackChannels_SlackChannel) Reset() { *x = SlackSource_SlackChannels_SlackChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlackSource_SlackChannels_SlackChannel) String() string { @@ -944,7 +910,7 @@ func (*SlackSource_SlackChannels_SlackChannel) ProtoMessage() {} func (x *SlackSource_SlackChannels_SlackChannel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +971,9 @@ type JiraSource_JiraQueries struct { func (x *JiraSource_JiraQueries) Reset() { *x = JiraSource_JiraQueries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JiraSource_JiraQueries) String() string { @@ -1020,7 +984,7 @@ func (*JiraSource_JiraQueries) ProtoMessage() {} func (x *JiraSource_JiraQueries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1071,9 @@ type SharePointSources_SharePointSource struct { func (x *SharePointSources_SharePointSource) Reset() { *x = SharePointSources_SharePointSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharePointSources_SharePointSource) String() string { @@ -1122,7 +1084,7 @@ func (*SharePointSources_SharePointSource) ProtoMessage() {} func (x *SharePointSources_SharePointSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1514,236 +1476,6 @@ func file_google_cloud_aiplatform_v1beta1_io_proto_init() { return } file_google_cloud_aiplatform_v1beta1_api_auth_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AvroSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CsvSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CsvDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TFRecordDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ContainerRegistryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GoogleDriveSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DirectUploadSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*JiraSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SharePointSources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GoogleDriveSource_ResourceId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource_SlackChannels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SlackSource_SlackChannels_SlackChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*JiraSource_JiraQueries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SharePointSources_SharePointSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_io_proto_msgTypes[18].OneofWrappers = []any{ (*SharePointSources_SharePointSource_SharepointFolderPath)(nil), (*SharePointSources_SharePointSource_SharepointFolderId)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/job_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/job_service.pb.go index 8b4ef11a1d76..8cd6a518c4d4 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/job_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/job_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/job_service.proto @@ -60,11 +60,9 @@ type CreateCustomJobRequest struct { func (x *CreateCustomJobRequest) Reset() { *x = CreateCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomJobRequest) String() string { @@ -75,7 +73,7 @@ func (*CreateCustomJobRequest) ProtoMessage() {} func (x *CreateCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type GetCustomJobRequest struct { func (x *GetCustomJobRequest) Reset() { *x = GetCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomJobRequest) String() string { @@ -134,7 +130,7 @@ func (*GetCustomJobRequest) ProtoMessage() {} func (x *GetCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type ListCustomJobsRequest struct { func (x *ListCustomJobsRequest) Reset() { *x = ListCustomJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomJobsRequest) String() string { @@ -217,7 +211,7 @@ func (*ListCustomJobsRequest) ProtoMessage() {} func (x *ListCustomJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +279,9 @@ type ListCustomJobsResponse struct { func (x *ListCustomJobsResponse) Reset() { *x = ListCustomJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomJobsResponse) String() string { @@ -300,7 +292,7 @@ func (*ListCustomJobsResponse) ProtoMessage() {} func (x *ListCustomJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +336,9 @@ type DeleteCustomJobRequest struct { func (x *DeleteCustomJobRequest) Reset() { *x = DeleteCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomJobRequest) String() string { @@ -359,7 +349,7 @@ func (*DeleteCustomJobRequest) ProtoMessage() {} func (x *DeleteCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +386,9 @@ type CancelCustomJobRequest struct { func (x *CancelCustomJobRequest) Reset() { *x = CancelCustomJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCustomJobRequest) String() string { @@ -411,7 +399,7 @@ func (*CancelCustomJobRequest) ProtoMessage() {} func (x *CancelCustomJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +437,9 @@ type CreateDataLabelingJobRequest struct { func (x *CreateDataLabelingJobRequest) Reset() { *x = CreateDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataLabelingJobRequest) String() string { @@ -464,7 +450,7 @@ func (*CreateDataLabelingJobRequest) ProtoMessage() {} func (x *CreateDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +494,9 @@ type GetDataLabelingJobRequest struct { func (x *GetDataLabelingJobRequest) Reset() { *x = GetDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataLabelingJobRequest) String() string { @@ -523,7 +507,7 @@ func (*GetDataLabelingJobRequest) ProtoMessage() {} func (x *GetDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +577,9 @@ type ListDataLabelingJobsRequest struct { func (x *ListDataLabelingJobsRequest) Reset() { *x = ListDataLabelingJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataLabelingJobsRequest) String() string { @@ -608,7 +590,7 @@ func (*ListDataLabelingJobsRequest) ProtoMessage() {} func (x *ListDataLabelingJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +663,9 @@ type ListDataLabelingJobsResponse struct { func (x *ListDataLabelingJobsResponse) Reset() { *x = ListDataLabelingJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataLabelingJobsResponse) String() string { @@ -696,7 +676,7 @@ func (*ListDataLabelingJobsResponse) ProtoMessage() {} func (x *ListDataLabelingJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +720,9 @@ type DeleteDataLabelingJobRequest struct { func (x *DeleteDataLabelingJobRequest) Reset() { *x = DeleteDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataLabelingJobRequest) String() string { @@ -755,7 +733,7 @@ func (*DeleteDataLabelingJobRequest) ProtoMessage() {} func (x *DeleteDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +770,9 @@ type CancelDataLabelingJobRequest struct { func (x *CancelDataLabelingJobRequest) Reset() { *x = CancelDataLabelingJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelDataLabelingJobRequest) String() string { @@ -807,7 +783,7 @@ func (*CancelDataLabelingJobRequest) ProtoMessage() {} func (x *CancelDataLabelingJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +822,9 @@ type CreateHyperparameterTuningJobRequest struct { func (x *CreateHyperparameterTuningJobRequest) Reset() { *x = CreateHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHyperparameterTuningJobRequest) String() string { @@ -861,7 +835,7 @@ func (*CreateHyperparameterTuningJobRequest) ProtoMessage() {} func (x *CreateHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,11 +879,9 @@ type GetHyperparameterTuningJobRequest struct { func (x *GetHyperparameterTuningJobRequest) Reset() { *x = GetHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHyperparameterTuningJobRequest) String() string { @@ -920,7 +892,7 @@ func (*GetHyperparameterTuningJobRequest) ProtoMessage() {} func (x *GetHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +961,9 @@ type ListHyperparameterTuningJobsRequest struct { func (x *ListHyperparameterTuningJobsRequest) Reset() { *x = ListHyperparameterTuningJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHyperparameterTuningJobsRequest) String() string { @@ -1004,7 +974,7 @@ func (*ListHyperparameterTuningJobsRequest) ProtoMessage() {} func (x *ListHyperparameterTuningJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1044,9 @@ type ListHyperparameterTuningJobsResponse struct { func (x *ListHyperparameterTuningJobsResponse) Reset() { *x = ListHyperparameterTuningJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHyperparameterTuningJobsResponse) String() string { @@ -1089,7 +1057,7 @@ func (*ListHyperparameterTuningJobsResponse) ProtoMessage() {} func (x *ListHyperparameterTuningJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1101,9 @@ type DeleteHyperparameterTuningJobRequest struct { func (x *DeleteHyperparameterTuningJobRequest) Reset() { *x = DeleteHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHyperparameterTuningJobRequest) String() string { @@ -1148,7 +1114,7 @@ func (*DeleteHyperparameterTuningJobRequest) ProtoMessage() {} func (x *DeleteHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1151,9 @@ type CancelHyperparameterTuningJobRequest struct { func (x *CancelHyperparameterTuningJobRequest) Reset() { *x = CancelHyperparameterTuningJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelHyperparameterTuningJobRequest) String() string { @@ -1200,7 +1164,7 @@ func (*CancelHyperparameterTuningJobRequest) ProtoMessage() {} func (x *CancelHyperparameterTuningJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1202,9 @@ type CreateNasJobRequest struct { func (x *CreateNasJobRequest) Reset() { *x = CreateNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNasJobRequest) String() string { @@ -1253,7 +1215,7 @@ func (*CreateNasJobRequest) ProtoMessage() {} func (x *CreateNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1259,9 @@ type GetNasJobRequest struct { func (x *GetNasJobRequest) Reset() { *x = GetNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNasJobRequest) String() string { @@ -1312,7 +1272,7 @@ func (*GetNasJobRequest) ProtoMessage() {} func (x *GetNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1340,9 @@ type ListNasJobsRequest struct { func (x *ListNasJobsRequest) Reset() { *x = ListNasJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasJobsRequest) String() string { @@ -1395,7 +1353,7 @@ func (*ListNasJobsRequest) ProtoMessage() {} func (x *ListNasJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1465,11 +1423,9 @@ type ListNasJobsResponse struct { func (x *ListNasJobsResponse) Reset() { *x = ListNasJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasJobsResponse) String() string { @@ -1480,7 +1436,7 @@ func (*ListNasJobsResponse) ProtoMessage() {} func (x *ListNasJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,11 +1480,9 @@ type DeleteNasJobRequest struct { func (x *DeleteNasJobRequest) Reset() { *x = DeleteNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNasJobRequest) String() string { @@ -1539,7 +1493,7 @@ func (*DeleteNasJobRequest) ProtoMessage() {} func (x *DeleteNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,11 +1530,9 @@ type CancelNasJobRequest struct { func (x *CancelNasJobRequest) Reset() { *x = CancelNasJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelNasJobRequest) String() string { @@ -1591,7 +1543,7 @@ func (*CancelNasJobRequest) ProtoMessage() {} func (x *CancelNasJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1628,11 +1580,9 @@ type GetNasTrialDetailRequest struct { func (x *GetNasTrialDetailRequest) Reset() { *x = GetNasTrialDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNasTrialDetailRequest) String() string { @@ -1643,7 +1593,7 @@ func (*GetNasTrialDetailRequest) ProtoMessage() {} func (x *GetNasTrialDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,11 +1639,9 @@ type ListNasTrialDetailsRequest struct { func (x *ListNasTrialDetailsRequest) Reset() { *x = ListNasTrialDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasTrialDetailsRequest) String() string { @@ -1704,7 +1652,7 @@ func (*ListNasTrialDetailsRequest) ProtoMessage() {} func (x *ListNasTrialDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1758,11 +1706,9 @@ type ListNasTrialDetailsResponse struct { func (x *ListNasTrialDetailsResponse) Reset() { *x = ListNasTrialDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNasTrialDetailsResponse) String() string { @@ -1773,7 +1719,7 @@ func (*ListNasTrialDetailsResponse) ProtoMessage() {} func (x *ListNasTrialDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1764,9 @@ type CreateBatchPredictionJobRequest struct { func (x *CreateBatchPredictionJobRequest) Reset() { *x = CreateBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBatchPredictionJobRequest) String() string { @@ -1833,7 +1777,7 @@ func (*CreateBatchPredictionJobRequest) ProtoMessage() {} func (x *CreateBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1877,11 +1821,9 @@ type GetBatchPredictionJobRequest struct { func (x *GetBatchPredictionJobRequest) Reset() { *x = GetBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBatchPredictionJobRequest) String() string { @@ -1892,7 +1834,7 @@ func (*GetBatchPredictionJobRequest) ProtoMessage() {} func (x *GetBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1961,11 +1903,9 @@ type ListBatchPredictionJobsRequest struct { func (x *ListBatchPredictionJobsRequest) Reset() { *x = ListBatchPredictionJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchPredictionJobsRequest) String() string { @@ -1976,7 +1916,7 @@ func (*ListBatchPredictionJobsRequest) ProtoMessage() {} func (x *ListBatchPredictionJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +1984,9 @@ type ListBatchPredictionJobsResponse struct { func (x *ListBatchPredictionJobsResponse) Reset() { *x = ListBatchPredictionJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchPredictionJobsResponse) String() string { @@ -2059,7 +1997,7 @@ func (*ListBatchPredictionJobsResponse) ProtoMessage() {} func (x *ListBatchPredictionJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2103,11 +2041,9 @@ type DeleteBatchPredictionJobRequest struct { func (x *DeleteBatchPredictionJobRequest) Reset() { *x = DeleteBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBatchPredictionJobRequest) String() string { @@ -2118,7 +2054,7 @@ func (*DeleteBatchPredictionJobRequest) ProtoMessage() {} func (x *DeleteBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2091,9 @@ type CancelBatchPredictionJobRequest struct { func (x *CancelBatchPredictionJobRequest) Reset() { *x = CancelBatchPredictionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelBatchPredictionJobRequest) String() string { @@ -2170,7 +2104,7 @@ func (*CancelBatchPredictionJobRequest) ProtoMessage() {} func (x *CancelBatchPredictionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2142,9 @@ type CreateModelDeploymentMonitoringJobRequest struct { func (x *CreateModelDeploymentMonitoringJobRequest) Reset() { *x = CreateModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelDeploymentMonitoringJobRequest) String() string { @@ -2223,7 +2155,7 @@ func (*CreateModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *CreateModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2221,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesRequest struct { func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) String() string { @@ -2304,7 +2234,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesRequest) ProtoMessage() {} func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2395,11 +2325,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesResponse struct { func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) String() string { @@ -2410,7 +2338,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesResponse) ProtoMessage() {} func (x *SearchModelDeploymentMonitoringStatsAnomaliesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2454,11 +2382,9 @@ type GetModelDeploymentMonitoringJobRequest struct { func (x *GetModelDeploymentMonitoringJobRequest) Reset() { *x = GetModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelDeploymentMonitoringJobRequest) String() string { @@ -2469,7 +2395,7 @@ func (*GetModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *GetModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2532,11 +2458,9 @@ type ListModelDeploymentMonitoringJobsRequest struct { func (x *ListModelDeploymentMonitoringJobsRequest) Reset() { *x = ListModelDeploymentMonitoringJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelDeploymentMonitoringJobsRequest) String() string { @@ -2547,7 +2471,7 @@ func (*ListModelDeploymentMonitoringJobsRequest) ProtoMessage() {} func (x *ListModelDeploymentMonitoringJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2613,11 +2537,9 @@ type ListModelDeploymentMonitoringJobsResponse struct { func (x *ListModelDeploymentMonitoringJobsResponse) Reset() { *x = ListModelDeploymentMonitoringJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelDeploymentMonitoringJobsResponse) String() string { @@ -2628,7 +2550,7 @@ func (*ListModelDeploymentMonitoringJobsResponse) ProtoMessage() {} func (x *ListModelDeploymentMonitoringJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,11 +2622,9 @@ type UpdateModelDeploymentMonitoringJobRequest struct { func (x *UpdateModelDeploymentMonitoringJobRequest) Reset() { *x = UpdateModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelDeploymentMonitoringJobRequest) String() string { @@ -2715,7 +2635,7 @@ func (*UpdateModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *UpdateModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2679,9 @@ type DeleteModelDeploymentMonitoringJobRequest struct { func (x *DeleteModelDeploymentMonitoringJobRequest) Reset() { *x = DeleteModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelDeploymentMonitoringJobRequest) String() string { @@ -2774,7 +2692,7 @@ func (*DeleteModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *DeleteModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2811,11 +2729,9 @@ type PauseModelDeploymentMonitoringJobRequest struct { func (x *PauseModelDeploymentMonitoringJobRequest) Reset() { *x = PauseModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseModelDeploymentMonitoringJobRequest) String() string { @@ -2826,7 +2742,7 @@ func (*PauseModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *PauseModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2779,9 @@ type ResumeModelDeploymentMonitoringJobRequest struct { func (x *ResumeModelDeploymentMonitoringJobRequest) Reset() { *x = ResumeModelDeploymentMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeModelDeploymentMonitoringJobRequest) String() string { @@ -2878,7 +2792,7 @@ func (*ResumeModelDeploymentMonitoringJobRequest) ProtoMessage() {} func (x *ResumeModelDeploymentMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2913,11 +2827,9 @@ type UpdateModelDeploymentMonitoringJobOperationMetadata struct { func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) Reset() { *x = UpdateModelDeploymentMonitoringJobOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) String() string { @@ -2928,7 +2840,7 @@ func (*UpdateModelDeploymentMonitoringJobOperationMetadata) ProtoMessage() {} func (x *UpdateModelDeploymentMonitoringJobOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,11 +2881,9 @@ type SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjectiv func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) Reset() { *x = SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) String() string { @@ -2984,7 +2894,7 @@ func (*SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObject func (x *SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4284,548 +4194,6 @@ func file_google_cloud_aiplatform_v1beta1_job_service_proto_init() { file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_init() file_google_cloud_aiplatform_v1beta1_nas_job_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CancelCustomJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListDataLabelingJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDataLabelingJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CancelDataLabelingJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListHyperparameterTuningJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListHyperparameterTuningJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CancelHyperparameterTuningJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListNasJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListNasJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CancelNasJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetNasTrialDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListNasTrialDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListNasTrialDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchPredictionJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchPredictionJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*CancelBatchPredictionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListModelDeploymentMonitoringJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListModelDeploymentMonitoringJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*PauseModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ResumeModelDeploymentMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelDeploymentMonitoringJobOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_job_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/job_state.pb.go b/aiplatform/apiv1beta1/aiplatformpb/job_state.pb.go index 57b0d02f87e0..c15b499428bf 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/job_state.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/job_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/job_state.proto diff --git a/aiplatform/apiv1beta1/aiplatformpb/lineage_subgraph.pb.go b/aiplatform/apiv1beta1/aiplatformpb/lineage_subgraph.pb.go index d5281a55b71a..dbfd9eef2ef9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/lineage_subgraph.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/lineage_subgraph.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/lineage_subgraph.proto @@ -52,11 +52,9 @@ type LineageSubgraph struct { func (x *LineageSubgraph) Reset() { *x = LineageSubgraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_lineage_subgraph_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_lineage_subgraph_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineageSubgraph) String() string { @@ -67,7 +65,7 @@ func (*LineageSubgraph) ProtoMessage() {} func (x *LineageSubgraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_lineage_subgraph_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,20 +189,6 @@ func file_google_cloud_aiplatform_v1beta1_lineage_subgraph_proto_init() { file_google_cloud_aiplatform_v1beta1_artifact_proto_init() file_google_cloud_aiplatform_v1beta1_event_proto_init() file_google_cloud_aiplatform_v1beta1_execution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_lineage_subgraph_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LineageSubgraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/llm_utility_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/llm_utility_service.pb.go index 04673f7f62d7..50148f82839b 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/llm_utility_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/llm_utility_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/llm_utility_service.proto @@ -64,11 +64,9 @@ type ComputeTokensRequest struct { func (x *ComputeTokensRequest) Reset() { *x = ComputeTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTokensRequest) String() string { @@ -79,7 +77,7 @@ func (*ComputeTokensRequest) ProtoMessage() {} func (x *ComputeTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type TokensInfo struct { func (x *TokensInfo) Reset() { *x = TokensInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokensInfo) String() string { @@ -153,7 +149,7 @@ func (*TokensInfo) ProtoMessage() {} func (x *TokensInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type ComputeTokensResponse struct { func (x *ComputeTokensResponse) Reset() { *x = ComputeTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTokensResponse) String() string { @@ -218,7 +212,7 @@ func (*ComputeTokensResponse) ProtoMessage() {} func (x *ComputeTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,44 +373,6 @@ func file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_init() { return } file_google_cloud_aiplatform_v1beta1_content_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TokensInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_llm_utility_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/machine_resources.pb.go b/aiplatform/apiv1beta1/aiplatformpb/machine_resources.pb.go index 9ced39fd74c3..6ae03718e82a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/machine_resources.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/machine_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/machine_resources.proto @@ -72,11 +72,9 @@ type MachineSpec struct { func (x *MachineSpec) Reset() { *x = MachineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineSpec) String() string { @@ -87,7 +85,7 @@ func (*MachineSpec) ProtoMessage() {} func (x *MachineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +206,9 @@ type DedicatedResources struct { func (x *DedicatedResources) Reset() { *x = DedicatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DedicatedResources) String() string { @@ -223,7 +219,7 @@ func (*DedicatedResources) ProtoMessage() {} func (x *DedicatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +305,9 @@ type AutomaticResources struct { func (x *AutomaticResources) Reset() { *x = AutomaticResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomaticResources) String() string { @@ -324,7 +318,7 @@ func (*AutomaticResources) ProtoMessage() {} func (x *AutomaticResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +367,9 @@ type BatchDedicatedResources struct { func (x *BatchDedicatedResources) Reset() { *x = BatchDedicatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDedicatedResources) String() string { @@ -388,7 +380,7 @@ func (*BatchDedicatedResources) ProtoMessage() {} func (x *BatchDedicatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type ResourcesConsumed struct { func (x *ResourcesConsumed) Reset() { *x = ResourcesConsumed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcesConsumed) String() string { @@ -453,7 +443,7 @@ func (*ResourcesConsumed) ProtoMessage() {} func (x *ResourcesConsumed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +481,9 @@ type DiskSpec struct { func (x *DiskSpec) Reset() { *x = DiskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskSpec) String() string { @@ -506,7 +494,7 @@ func (*DiskSpec) ProtoMessage() {} func (x *DiskSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +542,9 @@ type PersistentDiskSpec struct { func (x *PersistentDiskSpec) Reset() { *x = PersistentDiskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistentDiskSpec) String() string { @@ -569,7 +555,7 @@ func (*PersistentDiskSpec) ProtoMessage() {} func (x *PersistentDiskSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +603,9 @@ type NfsMount struct { func (x *NfsMount) Reset() { *x = NfsMount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsMount) String() string { @@ -632,7 +616,7 @@ func (*NfsMount) ProtoMessage() {} func (x *NfsMount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +676,9 @@ type AutoscalingMetricSpec struct { func (x *AutoscalingMetricSpec) Reset() { *x = AutoscalingMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingMetricSpec) String() string { @@ -707,7 +689,7 @@ func (*AutoscalingMetricSpec) ProtoMessage() {} func (x *AutoscalingMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +738,9 @@ type ShieldedVmConfig struct { func (x *ShieldedVmConfig) Reset() { *x = ShieldedVmConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedVmConfig) String() string { @@ -771,7 +751,7 @@ func (*ShieldedVmConfig) ProtoMessage() {} func (x *ShieldedVmConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,128 +957,6 @@ func file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() { } file_google_cloud_aiplatform_v1beta1_accelerator_type_proto_init() file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MachineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DedicatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutomaticResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchDedicatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourcesConsumed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DiskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PersistentDiskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NfsMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_machine_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedVmConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/manual_batch_tuning_parameters.pb.go b/aiplatform/apiv1beta1/aiplatformpb/manual_batch_tuning_parameters.pb.go index 471e6908e6e0..2efd3d414974 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/manual_batch_tuning_parameters.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/manual_batch_tuning_parameters.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto @@ -54,11 +54,9 @@ type ManualBatchTuningParameters struct { func (x *ManualBatchTuningParameters) Reset() { *x = ManualBatchTuningParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualBatchTuningParameters) String() string { @@ -69,7 +67,7 @@ func (*ManualBatchTuningParameters) ProtoMessage() {} func (x *ManualBatchTuningParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,20 +152,6 @@ func file_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto_i if File_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_manual_batch_tuning_parameters_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ManualBatchTuningParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/match_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/match_service.pb.go index 3a89148697c0..554bcfbedd3d 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/match_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/match_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/match_service.proto @@ -69,11 +69,9 @@ type FindNeighborsRequest struct { func (x *FindNeighborsRequest) Reset() { *x = FindNeighborsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest) String() string { @@ -84,7 +82,7 @@ func (*FindNeighborsRequest) ProtoMessage() {} func (x *FindNeighborsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type FindNeighborsResponse struct { func (x *FindNeighborsResponse) Reset() { *x = FindNeighborsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse) String() string { @@ -155,7 +151,7 @@ func (*FindNeighborsResponse) ProtoMessage() {} func (x *FindNeighborsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +192,9 @@ type ReadIndexDatapointsRequest struct { func (x *ReadIndexDatapointsRequest) Reset() { *x = ReadIndexDatapointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadIndexDatapointsRequest) String() string { @@ -211,7 +205,7 @@ func (*ReadIndexDatapointsRequest) ProtoMessage() {} func (x *ReadIndexDatapointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +254,9 @@ type ReadIndexDatapointsResponse struct { func (x *ReadIndexDatapointsResponse) Reset() { *x = ReadIndexDatapointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadIndexDatapointsResponse) String() string { @@ -275,7 +267,7 @@ func (*ReadIndexDatapointsResponse) ProtoMessage() {} func (x *ReadIndexDatapointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +328,9 @@ type FindNeighborsRequest_Query struct { func (x *FindNeighborsRequest_Query) Reset() { *x = FindNeighborsRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest_Query) String() string { @@ -351,7 +341,7 @@ func (*FindNeighborsRequest_Query) ProtoMessage() {} func (x *FindNeighborsRequest_Query) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +430,9 @@ type FindNeighborsRequest_Query_RRF struct { func (x *FindNeighborsRequest_Query_RRF) Reset() { *x = FindNeighborsRequest_Query_RRF{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsRequest_Query_RRF) String() string { @@ -455,7 +443,7 @@ func (*FindNeighborsRequest_Query_RRF) ProtoMessage() {} func (x *FindNeighborsRequest_Query_RRF) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type FindNeighborsResponse_Neighbor struct { func (x *FindNeighborsResponse_Neighbor) Reset() { *x = FindNeighborsResponse_Neighbor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse_Neighbor) String() string { @@ -511,7 +497,7 @@ func (*FindNeighborsResponse_Neighbor) ProtoMessage() {} func (x *FindNeighborsResponse_Neighbor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +547,9 @@ type FindNeighborsResponse_NearestNeighbors struct { func (x *FindNeighborsResponse_NearestNeighbors) Reset() { *x = FindNeighborsResponse_NearestNeighbors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNeighborsResponse_NearestNeighbors) String() string { @@ -576,7 +560,7 @@ func (*FindNeighborsResponse_NearestNeighbors) ProtoMessage() {} func (x *FindNeighborsResponse_NearestNeighbors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,104 +804,6 @@ func file_google_cloud_aiplatform_v1beta1_match_service_proto_init() { return } file_google_cloud_aiplatform_v1beta1_index_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReadIndexDatapointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadIndexDatapointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsRequest_Query_RRF); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse_Neighbor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FindNeighborsResponse_NearestNeighbors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_match_service_proto_msgTypes[4].OneofWrappers = []any{ (*FindNeighborsRequest_Query_Rrf)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/metadata_schema.pb.go b/aiplatform/apiv1beta1/aiplatformpb/metadata_schema.pb.go index af0ff5948c39..fcc6887db6e4 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/metadata_schema.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/metadata_schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/metadata_schema.proto @@ -125,11 +125,9 @@ type MetadataSchema struct { func (x *MetadataSchema) Reset() { *x = MetadataSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataSchema) String() string { @@ -140,7 +138,7 @@ func (*MetadataSchema) ProtoMessage() {} func (x *MetadataSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,20 +298,6 @@ func file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_init() { if File_google_cloud_aiplatform_v1beta1_metadata_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/metadata_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/metadata_service.pb.go index 18ba0412b505..ccf63c611c12 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/metadata_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/metadata_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/metadata_service.proto @@ -69,11 +69,9 @@ type CreateMetadataStoreRequest struct { func (x *CreateMetadataStoreRequest) Reset() { *x = CreateMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataStoreRequest) String() string { @@ -84,7 +82,7 @@ func (*CreateMetadataStoreRequest) ProtoMessage() {} func (x *CreateMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type CreateMetadataStoreOperationMetadata struct { func (x *CreateMetadataStoreOperationMetadata) Reset() { *x = CreateMetadataStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataStoreOperationMetadata) String() string { @@ -148,7 +144,7 @@ func (*CreateMetadataStoreOperationMetadata) ProtoMessage() {} func (x *CreateMetadataStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +181,9 @@ type GetMetadataStoreRequest struct { func (x *GetMetadataStoreRequest) Reset() { *x = GetMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataStoreRequest) String() string { @@ -200,7 +194,7 @@ func (*GetMetadataStoreRequest) ProtoMessage() {} func (x *GetMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +243,9 @@ type ListMetadataStoresRequest struct { func (x *ListMetadataStoresRequest) Reset() { *x = ListMetadataStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataStoresRequest) String() string { @@ -264,7 +256,7 @@ func (*ListMetadataStoresRequest) ProtoMessage() {} func (x *ListMetadataStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +310,9 @@ type ListMetadataStoresResponse struct { func (x *ListMetadataStoresResponse) Reset() { *x = ListMetadataStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataStoresResponse) String() string { @@ -333,7 +323,7 @@ func (*ListMetadataStoresResponse) ProtoMessage() {} func (x *ListMetadataStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +371,9 @@ type DeleteMetadataStoreRequest struct { func (x *DeleteMetadataStoreRequest) Reset() { *x = DeleteMetadataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMetadataStoreRequest) String() string { @@ -396,7 +384,7 @@ func (*DeleteMetadataStoreRequest) ProtoMessage() {} func (x *DeleteMetadataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +427,9 @@ type DeleteMetadataStoreOperationMetadata struct { func (x *DeleteMetadataStoreOperationMetadata) Reset() { *x = DeleteMetadataStoreOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMetadataStoreOperationMetadata) String() string { @@ -454,7 +440,7 @@ func (*DeleteMetadataStoreOperationMetadata) ProtoMessage() {} func (x *DeleteMetadataStoreOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,11 +488,9 @@ type CreateArtifactRequest struct { func (x *CreateArtifactRequest) Reset() { *x = CreateArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateArtifactRequest) String() string { @@ -517,7 +501,7 @@ func (*CreateArtifactRequest) ProtoMessage() {} func (x *CreateArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +552,9 @@ type GetArtifactRequest struct { func (x *GetArtifactRequest) Reset() { *x = GetArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetArtifactRequest) String() string { @@ -583,7 +565,7 @@ func (*GetArtifactRequest) ProtoMessage() {} func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +652,9 @@ type ListArtifactsRequest struct { func (x *ListArtifactsRequest) Reset() { *x = ListArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsRequest) String() string { @@ -685,7 +665,7 @@ func (*ListArtifactsRequest) ProtoMessage() {} func (x *ListArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +733,9 @@ type ListArtifactsResponse struct { func (x *ListArtifactsResponse) Reset() { *x = ListArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsResponse) String() string { @@ -768,7 +746,7 @@ func (*ListArtifactsResponse) ProtoMessage() {} func (x *ListArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +798,9 @@ type UpdateArtifactRequest struct { func (x *UpdateArtifactRequest) Reset() { *x = UpdateArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateArtifactRequest) String() string { @@ -835,7 +811,7 @@ func (*UpdateArtifactRequest) ProtoMessage() {} func (x *UpdateArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +866,9 @@ type DeleteArtifactRequest struct { func (x *DeleteArtifactRequest) Reset() { *x = DeleteArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteArtifactRequest) String() string { @@ -905,7 +879,7 @@ func (*DeleteArtifactRequest) ProtoMessage() {} func (x *DeleteArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +930,9 @@ type PurgeArtifactsRequest struct { func (x *PurgeArtifactsRequest) Reset() { *x = PurgeArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsRequest) String() string { @@ -971,7 +943,7 @@ func (*PurgeArtifactsRequest) ProtoMessage() {} func (x *PurgeArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +997,9 @@ type PurgeArtifactsResponse struct { func (x *PurgeArtifactsResponse) Reset() { *x = PurgeArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsResponse) String() string { @@ -1040,7 +1010,7 @@ func (*PurgeArtifactsResponse) ProtoMessage() {} func (x *PurgeArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,11 +1052,9 @@ type PurgeArtifactsMetadata struct { func (x *PurgeArtifactsMetadata) Reset() { *x = PurgeArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeArtifactsMetadata) String() string { @@ -1097,7 +1065,7 @@ func (*PurgeArtifactsMetadata) ProtoMessage() {} func (x *PurgeArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1112,9 @@ type CreateContextRequest struct { func (x *CreateContextRequest) Reset() { *x = CreateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContextRequest) String() string { @@ -1159,7 +1125,7 @@ func (*CreateContextRequest) ProtoMessage() {} func (x *CreateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,11 +1176,9 @@ type GetContextRequest struct { func (x *GetContextRequest) Reset() { *x = GetContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContextRequest) String() string { @@ -1225,7 +1189,7 @@ func (*GetContextRequest) ProtoMessage() {} func (x *GetContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1318,11 +1282,9 @@ type ListContextsRequest struct { func (x *ListContextsRequest) Reset() { *x = ListContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsRequest) String() string { @@ -1333,7 +1295,7 @@ func (*ListContextsRequest) ProtoMessage() {} func (x *ListContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1363,9 @@ type ListContextsResponse struct { func (x *ListContextsResponse) Reset() { *x = ListContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsResponse) String() string { @@ -1416,7 +1376,7 @@ func (*ListContextsResponse) ProtoMessage() {} func (x *ListContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1467,11 +1427,9 @@ type UpdateContextRequest struct { func (x *UpdateContextRequest) Reset() { *x = UpdateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContextRequest) String() string { @@ -1482,7 +1440,7 @@ func (*UpdateContextRequest) ProtoMessage() {} func (x *UpdateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1540,11 +1498,9 @@ type DeleteContextRequest struct { func (x *DeleteContextRequest) Reset() { *x = DeleteContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContextRequest) String() string { @@ -1555,7 +1511,7 @@ func (*DeleteContextRequest) ProtoMessage() {} func (x *DeleteContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1613,11 +1569,9 @@ type PurgeContextsRequest struct { func (x *PurgeContextsRequest) Reset() { *x = PurgeContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsRequest) String() string { @@ -1628,7 +1582,7 @@ func (*PurgeContextsRequest) ProtoMessage() {} func (x *PurgeContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1682,11 +1636,9 @@ type PurgeContextsResponse struct { func (x *PurgeContextsResponse) Reset() { *x = PurgeContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsResponse) String() string { @@ -1697,7 +1649,7 @@ func (*PurgeContextsResponse) ProtoMessage() {} func (x *PurgeContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1739,11 +1691,9 @@ type PurgeContextsMetadata struct { func (x *PurgeContextsMetadata) Reset() { *x = PurgeContextsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeContextsMetadata) String() string { @@ -1754,7 +1704,7 @@ func (*PurgeContextsMetadata) ProtoMessage() {} func (x *PurgeContextsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1802,11 +1752,9 @@ type AddContextArtifactsAndExecutionsRequest struct { func (x *AddContextArtifactsAndExecutionsRequest) Reset() { *x = AddContextArtifactsAndExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextArtifactsAndExecutionsRequest) String() string { @@ -1817,7 +1765,7 @@ func (*AddContextArtifactsAndExecutionsRequest) ProtoMessage() {} func (x *AddContextArtifactsAndExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1811,9 @@ type AddContextArtifactsAndExecutionsResponse struct { func (x *AddContextArtifactsAndExecutionsResponse) Reset() { *x = AddContextArtifactsAndExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextArtifactsAndExecutionsResponse) String() string { @@ -1878,7 +1824,7 @@ func (*AddContextArtifactsAndExecutionsResponse) ProtoMessage() {} func (x *AddContextArtifactsAndExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1911,11 +1857,9 @@ type AddContextChildrenRequest struct { func (x *AddContextChildrenRequest) Reset() { *x = AddContextChildrenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextChildrenRequest) String() string { @@ -1926,7 +1870,7 @@ func (*AddContextChildrenRequest) ProtoMessage() {} func (x *AddContextChildrenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1965,11 +1909,9 @@ type AddContextChildrenResponse struct { func (x *AddContextChildrenResponse) Reset() { *x = AddContextChildrenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddContextChildrenResponse) String() string { @@ -1980,7 +1922,7 @@ func (*AddContextChildrenResponse) ProtoMessage() {} func (x *AddContextChildrenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2013,11 +1955,9 @@ type RemoveContextChildrenRequest struct { func (x *RemoveContextChildrenRequest) Reset() { *x = RemoveContextChildrenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveContextChildrenRequest) String() string { @@ -2028,7 +1968,7 @@ func (*RemoveContextChildrenRequest) ProtoMessage() {} func (x *RemoveContextChildrenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2067,11 +2007,9 @@ type RemoveContextChildrenResponse struct { func (x *RemoveContextChildrenResponse) Reset() { *x = RemoveContextChildrenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveContextChildrenResponse) String() string { @@ -2082,7 +2020,7 @@ func (*RemoveContextChildrenResponse) ProtoMessage() {} func (x *RemoveContextChildrenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2117,11 +2055,9 @@ type QueryContextLineageSubgraphRequest struct { func (x *QueryContextLineageSubgraphRequest) Reset() { *x = QueryContextLineageSubgraphRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryContextLineageSubgraphRequest) String() string { @@ -2132,7 +2068,7 @@ func (*QueryContextLineageSubgraphRequest) ProtoMessage() {} func (x *QueryContextLineageSubgraphRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2181,11 +2117,9 @@ type CreateExecutionRequest struct { func (x *CreateExecutionRequest) Reset() { *x = CreateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExecutionRequest) String() string { @@ -2196,7 +2130,7 @@ func (*CreateExecutionRequest) ProtoMessage() {} func (x *CreateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2181,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -2262,7 +2194,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2349,11 +2281,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -2364,7 +2294,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2432,11 +2362,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -2447,7 +2375,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2499,11 +2427,9 @@ type UpdateExecutionRequest struct { func (x *UpdateExecutionRequest) Reset() { *x = UpdateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExecutionRequest) String() string { @@ -2514,7 +2440,7 @@ func (*UpdateExecutionRequest) ProtoMessage() {} func (x *UpdateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2569,11 +2495,9 @@ type DeleteExecutionRequest struct { func (x *DeleteExecutionRequest) Reset() { *x = DeleteExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExecutionRequest) String() string { @@ -2584,7 +2508,7 @@ func (*DeleteExecutionRequest) ProtoMessage() {} func (x *DeleteExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2635,11 +2559,9 @@ type PurgeExecutionsRequest struct { func (x *PurgeExecutionsRequest) Reset() { *x = PurgeExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsRequest) String() string { @@ -2650,7 +2572,7 @@ func (*PurgeExecutionsRequest) ProtoMessage() {} func (x *PurgeExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2705,11 +2627,9 @@ type PurgeExecutionsResponse struct { func (x *PurgeExecutionsResponse) Reset() { *x = PurgeExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsResponse) String() string { @@ -2720,7 +2640,7 @@ func (*PurgeExecutionsResponse) ProtoMessage() {} func (x *PurgeExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2762,11 +2682,9 @@ type PurgeExecutionsMetadata struct { func (x *PurgeExecutionsMetadata) Reset() { *x = PurgeExecutionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeExecutionsMetadata) String() string { @@ -2777,7 +2695,7 @@ func (*PurgeExecutionsMetadata) ProtoMessage() {} func (x *PurgeExecutionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2817,11 +2735,9 @@ type AddExecutionEventsRequest struct { func (x *AddExecutionEventsRequest) Reset() { *x = AddExecutionEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExecutionEventsRequest) String() string { @@ -2832,7 +2748,7 @@ func (*AddExecutionEventsRequest) ProtoMessage() {} func (x *AddExecutionEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2871,11 +2787,9 @@ type AddExecutionEventsResponse struct { func (x *AddExecutionEventsResponse) Reset() { *x = AddExecutionEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExecutionEventsResponse) String() string { @@ -2886,7 +2800,7 @@ func (*AddExecutionEventsResponse) ProtoMessage() {} func (x *AddExecutionEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2916,11 +2830,9 @@ type QueryExecutionInputsAndOutputsRequest struct { func (x *QueryExecutionInputsAndOutputsRequest) Reset() { *x = QueryExecutionInputsAndOutputsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryExecutionInputsAndOutputsRequest) String() string { @@ -2931,7 +2843,7 @@ func (*QueryExecutionInputsAndOutputsRequest) ProtoMessage() {} func (x *QueryExecutionInputsAndOutputsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2979,11 +2891,9 @@ type CreateMetadataSchemaRequest struct { func (x *CreateMetadataSchemaRequest) Reset() { *x = CreateMetadataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataSchemaRequest) String() string { @@ -2994,7 +2904,7 @@ func (*CreateMetadataSchemaRequest) ProtoMessage() {} func (x *CreateMetadataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3045,11 +2955,9 @@ type GetMetadataSchemaRequest struct { func (x *GetMetadataSchemaRequest) Reset() { *x = GetMetadataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataSchemaRequest) String() string { @@ -3060,7 +2968,7 @@ func (*GetMetadataSchemaRequest) ProtoMessage() {} func (x *GetMetadataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3111,11 +3019,9 @@ type ListMetadataSchemasRequest struct { func (x *ListMetadataSchemasRequest) Reset() { *x = ListMetadataSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataSchemasRequest) String() string { @@ -3126,7 +3032,7 @@ func (*ListMetadataSchemasRequest) ProtoMessage() {} func (x *ListMetadataSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3187,11 +3093,9 @@ type ListMetadataSchemasResponse struct { func (x *ListMetadataSchemasResponse) Reset() { *x = ListMetadataSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataSchemasResponse) String() string { @@ -3202,7 +3106,7 @@ func (*ListMetadataSchemasResponse) ProtoMessage() {} func (x *ListMetadataSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,11 +3186,9 @@ type QueryArtifactLineageSubgraphRequest struct { func (x *QueryArtifactLineageSubgraphRequest) Reset() { *x = QueryArtifactLineageSubgraphRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryArtifactLineageSubgraphRequest) String() string { @@ -3297,7 +3199,7 @@ func (*QueryArtifactLineageSubgraphRequest) ProtoMessage() {} func (x *QueryArtifactLineageSubgraphRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4524,596 +4426,6 @@ func file_google_cloud_aiplatform_v1beta1_metadata_service_proto_init() { file_google_cloud_aiplatform_v1beta1_metadata_schema_proto_init() file_google_cloud_aiplatform_v1beta1_metadata_store_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMetadataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMetadataStoreOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PurgeArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PurgeContextsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AddContextArtifactsAndExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AddContextArtifactsAndExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AddContextChildrenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AddContextChildrenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RemoveContextChildrenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*RemoveContextChildrenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*QueryContextLineageSubgraphRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*CreateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*PurgeExecutionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AddExecutionEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AddExecutionEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*QueryExecutionInputsAndOutputsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*QueryArtifactLineageSubgraphRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/metadata_store.pb.go b/aiplatform/apiv1beta1/aiplatformpb/metadata_store.pb.go index 3f4ec6f4dd13..ae362aec2af6 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/metadata_store.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/metadata_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/metadata_store.proto @@ -64,11 +64,9 @@ type MetadataStore struct { func (x *MetadataStore) Reset() { *x = MetadataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore) String() string { @@ -79,7 +77,7 @@ func (*MetadataStore) ProtoMessage() {} func (x *MetadataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,11 +153,9 @@ type MetadataStore_MetadataStoreState struct { func (x *MetadataStore_MetadataStoreState) Reset() { *x = MetadataStore_MetadataStoreState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore_MetadataStoreState) String() string { @@ -170,7 +166,7 @@ func (*MetadataStore_MetadataStoreState) ProtoMessage() {} func (x *MetadataStore_MetadataStoreState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +201,9 @@ type MetadataStore_DataplexConfig struct { func (x *MetadataStore_DataplexConfig) Reset() { *x = MetadataStore_DataplexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataStore_DataplexConfig) String() string { @@ -220,7 +214,7 @@ func (*MetadataStore_DataplexConfig) ProtoMessage() {} func (x *MetadataStore_DataplexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,44 +359,6 @@ func file_google_cloud_aiplatform_v1beta1_metadata_store_proto_init() { return } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore_MetadataStoreState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_metadata_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MetadataStore_DataplexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/migratable_resource.pb.go b/aiplatform/apiv1beta1/aiplatformpb/migratable_resource.pb.go index 014ae8c791a2..f84f48a80ca9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/migratable_resource.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/migratable_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/migratable_resource.proto @@ -61,11 +61,9 @@ type MigratableResource struct { func (x *MigratableResource) Reset() { *x = MigratableResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource) String() string { @@ -76,7 +74,7 @@ func (*MigratableResource) ProtoMessage() {} func (x *MigratableResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type MigratableResource_MlEngineModelVersion struct { func (x *MigratableResource_MlEngineModelVersion) Reset() { *x = MigratableResource_MlEngineModelVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_MlEngineModelVersion) String() string { @@ -209,7 +205,7 @@ func (*MigratableResource_MlEngineModelVersion) ProtoMessage() {} func (x *MigratableResource_MlEngineModelVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +250,9 @@ type MigratableResource_AutomlModel struct { func (x *MigratableResource_AutomlModel) Reset() { *x = MigratableResource_AutomlModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_AutomlModel) String() string { @@ -269,7 +263,7 @@ func (*MigratableResource_AutomlModel) ProtoMessage() {} func (x *MigratableResource_AutomlModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type MigratableResource_AutomlDataset struct { func (x *MigratableResource_AutomlDataset) Reset() { *x = MigratableResource_AutomlDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_AutomlDataset) String() string { @@ -329,7 +321,7 @@ func (*MigratableResource_AutomlDataset) ProtoMessage() {} func (x *MigratableResource_AutomlDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +369,9 @@ type MigratableResource_DataLabelingDataset struct { func (x *MigratableResource_DataLabelingDataset) Reset() { *x = MigratableResource_DataLabelingDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_DataLabelingDataset) String() string { @@ -392,7 +382,7 @@ func (*MigratableResource_DataLabelingDataset) ProtoMessage() {} func (x *MigratableResource_DataLabelingDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +434,9 @@ type MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset struct func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) Reset() { *x = MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) String() string { @@ -459,7 +447,7 @@ func (*MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) Prot func (x *MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,80 +677,6 @@ func file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_init() { if File_google_cloud_aiplatform_v1beta1_migratable_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_MlEngineModelVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_AutomlModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_AutomlDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_DataLabelingDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MigratableResource_DataLabelingDataset_DataLabelingAnnotatedDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_msgTypes[0].OneofWrappers = []any{ (*MigratableResource_MlEngineModelVersion_)(nil), (*MigratableResource_AutomlModel_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/migration_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/migration_service.pb.go index 1872cfba88c1..f7b2c2564aa2 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/migration_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/migration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/migration_service.proto @@ -77,11 +77,9 @@ type SearchMigratableResourcesRequest struct { func (x *SearchMigratableResourcesRequest) Reset() { *x = SearchMigratableResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchMigratableResourcesRequest) String() string { @@ -92,7 +90,7 @@ func (*SearchMigratableResourcesRequest) ProtoMessage() {} func (x *SearchMigratableResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,11 +151,9 @@ type SearchMigratableResourcesResponse struct { func (x *SearchMigratableResourcesResponse) Reset() { *x = SearchMigratableResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchMigratableResourcesResponse) String() string { @@ -168,7 +164,7 @@ func (*SearchMigratableResourcesResponse) ProtoMessage() {} func (x *SearchMigratableResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type BatchMigrateResourcesRequest struct { func (x *BatchMigrateResourcesRequest) Reset() { *x = BatchMigrateResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesRequest) String() string { @@ -230,7 +224,7 @@ func (*BatchMigrateResourcesRequest) ProtoMessage() {} func (x *BatchMigrateResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +271,9 @@ type MigrateResourceRequest struct { func (x *MigrateResourceRequest) Reset() { *x = MigrateResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest) String() string { @@ -292,7 +284,7 @@ func (*MigrateResourceRequest) ProtoMessage() {} func (x *MigrateResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +383,9 @@ type BatchMigrateResourcesResponse struct { func (x *BatchMigrateResourcesResponse) Reset() { *x = BatchMigrateResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesResponse) String() string { @@ -406,7 +396,7 @@ func (*BatchMigrateResourcesResponse) ProtoMessage() {} func (x *BatchMigrateResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +438,9 @@ type MigrateResourceResponse struct { func (x *MigrateResourceResponse) Reset() { *x = MigrateResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceResponse) String() string { @@ -463,7 +451,7 @@ func (*MigrateResourceResponse) ProtoMessage() {} func (x *MigrateResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +527,9 @@ type BatchMigrateResourcesOperationMetadata struct { func (x *BatchMigrateResourcesOperationMetadata) Reset() { *x = BatchMigrateResourcesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesOperationMetadata) String() string { @@ -554,7 +540,7 @@ func (*BatchMigrateResourcesOperationMetadata) ProtoMessage() {} func (x *BatchMigrateResourcesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +596,9 @@ type MigrateResourceRequest_MigrateMlEngineModelVersionConfig struct { func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) Reset() { *x = MigrateResourceRequest_MigrateMlEngineModelVersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) String() string { @@ -625,7 +609,7 @@ func (*MigrateResourceRequest_MigrateMlEngineModelVersionConfig) ProtoMessage() func (x *MigrateResourceRequest_MigrateMlEngineModelVersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +662,9 @@ type MigrateResourceRequest_MigrateAutomlModelConfig struct { func (x *MigrateResourceRequest_MigrateAutomlModelConfig) Reset() { *x = MigrateResourceRequest_MigrateAutomlModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateAutomlModelConfig) String() string { @@ -693,7 +675,7 @@ func (*MigrateResourceRequest_MigrateAutomlModelConfig) ProtoMessage() {} func (x *MigrateResourceRequest_MigrateAutomlModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +722,9 @@ type MigrateResourceRequest_MigrateAutomlDatasetConfig struct { func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateAutomlDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) String() string { @@ -755,7 +735,7 @@ func (*MigrateResourceRequest_MigrateAutomlDatasetConfig) ProtoMessage() {} func (x *MigrateResourceRequest_MigrateAutomlDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,11 +786,9 @@ type MigrateResourceRequest_MigrateDataLabelingDatasetConfig struct { func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateDataLabelingDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) String() string { @@ -821,7 +799,7 @@ func (*MigrateResourceRequest_MigrateDataLabelingDatasetConfig) ProtoMessage() { func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -872,11 +850,9 @@ type MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabeling func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) Reset() { *x = MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) String() string { @@ -888,7 +864,7 @@ func (*MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabeli func (x *MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -934,11 +910,9 @@ type BatchMigrateResourcesOperationMetadata_PartialResult struct { func (x *BatchMigrateResourcesOperationMetadata_PartialResult) Reset() { *x = BatchMigrateResourcesOperationMetadata_PartialResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchMigrateResourcesOperationMetadata_PartialResult) String() string { @@ -949,7 +923,7 @@ func (*BatchMigrateResourcesOperationMetadata_PartialResult) ProtoMessage() {} func (x *BatchMigrateResourcesOperationMetadata_PartialResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1384,164 +1358,6 @@ func file_google_cloud_aiplatform_v1beta1_migration_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_migratable_resource_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchMigratableResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchMigratableResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateMlEngineModelVersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateAutomlModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateAutomlDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateDataLabelingDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MigrateResourceRequest_MigrateDataLabelingDatasetConfig_MigrateDataLabelingAnnotatedDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchMigrateResourcesOperationMetadata_PartialResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_migration_service_proto_msgTypes[3].OneofWrappers = []any{ (*MigrateResourceRequest_MigrateMlEngineModelVersionConfig_)(nil), (*MigrateResourceRequest_MigrateAutomlModelConfig_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/model.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model.pb.go index a60418b6b29e..1e3ccdf47ddd 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model.proto @@ -493,11 +493,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -508,7 +506,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +752,9 @@ type LargeModelReference struct { func (x *LargeModelReference) Reset() { *x = LargeModelReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LargeModelReference) String() string { @@ -769,7 +765,7 @@ func (*LargeModelReference) ProtoMessage() {} func (x *LargeModelReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +800,9 @@ type ModelGardenSource struct { func (x *ModelGardenSource) Reset() { *x = ModelGardenSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelGardenSource) String() string { @@ -819,7 +813,7 @@ func (*ModelGardenSource) ProtoMessage() {} func (x *ModelGardenSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +848,9 @@ type GenieSource struct { func (x *GenieSource) Reset() { *x = GenieSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenieSource) String() string { @@ -869,7 +861,7 @@ func (*GenieSource) ProtoMessage() {} func (x *GenieSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +937,9 @@ type PredictSchemata struct { func (x *PredictSchemata) Reset() { *x = PredictSchemata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictSchemata) String() string { @@ -960,7 +950,7 @@ func (*PredictSchemata) ProtoMessage() {} func (x *PredictSchemata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1235,9 @@ type ModelContainerSpec struct { func (x *ModelContainerSpec) Reset() { *x = ModelContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelContainerSpec) String() string { @@ -1260,7 +1248,7 @@ func (*ModelContainerSpec) ProtoMessage() {} func (x *ModelContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,11 +1360,9 @@ type Port struct { func (x *Port) Reset() { *x = Port{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Port) String() string { @@ -1387,7 +1373,7 @@ func (*Port) ProtoMessage() {} func (x *Port) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,11 +1411,9 @@ type ModelSourceInfo struct { func (x *ModelSourceInfo) Reset() { *x = ModelSourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelSourceInfo) String() string { @@ -1440,7 +1424,7 @@ func (*ModelSourceInfo) ProtoMessage() {} func (x *ModelSourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1478,9 @@ type Probe struct { func (x *Probe) Reset() { *x = Probe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Probe) String() string { @@ -1509,7 +1491,7 @@ func (*Probe) ProtoMessage() {} func (x *Probe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1580,9 @@ type Model_ExportFormat struct { func (x *Model_ExportFormat) Reset() { *x = Model_ExportFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ExportFormat) String() string { @@ -1613,7 +1593,7 @@ func (*Model_ExportFormat) ProtoMessage() {} func (x *Model_ExportFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1656,11 +1636,9 @@ type Model_OriginalModelInfo struct { func (x *Model_OriginalModelInfo) Reset() { *x = Model_OriginalModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_OriginalModelInfo) String() string { @@ -1671,7 +1649,7 @@ func (*Model_OriginalModelInfo) ProtoMessage() {} func (x *Model_OriginalModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,11 +1687,9 @@ type Model_BaseModelSource struct { func (x *Model_BaseModelSource) Reset() { *x = Model_BaseModelSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_BaseModelSource) String() string { @@ -1724,7 +1700,7 @@ func (*Model_BaseModelSource) ProtoMessage() {} func (x *Model_BaseModelSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1795,11 +1771,9 @@ type Probe_ExecAction struct { func (x *Probe_ExecAction) Reset() { *x = Probe_ExecAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Probe_ExecAction) String() string { @@ -1810,7 +1784,7 @@ func (*Probe_ExecAction) ProtoMessage() {} func (x *Probe_ExecAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2256,164 +2230,6 @@ func file_google_cloud_aiplatform_v1beta1_model_proto_init() { file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_env_var_proto_init() file_google_cloud_aiplatform_v1beta1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LargeModelReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelGardenSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GenieSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictSchemata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Port); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelSourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Probe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Model_ExportFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Model_OriginalModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Model_BaseModelSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Probe_ExecAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_proto_msgTypes[8].OneofWrappers = []any{ (*Probe_Exec)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_deployment_monitoring_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_deployment_monitoring_job.pb.go index e9f60105785a..c9d3c7104f77 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_deployment_monitoring_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_deployment_monitoring_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto @@ -378,11 +378,9 @@ type ModelDeploymentMonitoringJob struct { func (x *ModelDeploymentMonitoringJob) Reset() { *x = ModelDeploymentMonitoringJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringJob) String() string { @@ -393,7 +391,7 @@ func (*ModelDeploymentMonitoringJob) ProtoMessage() {} func (x *ModelDeploymentMonitoringJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +603,9 @@ type ModelDeploymentMonitoringBigQueryTable struct { func (x *ModelDeploymentMonitoringBigQueryTable) Reset() { *x = ModelDeploymentMonitoringBigQueryTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringBigQueryTable) String() string { @@ -620,7 +616,7 @@ func (*ModelDeploymentMonitoringBigQueryTable) ProtoMessage() {} func (x *ModelDeploymentMonitoringBigQueryTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +674,9 @@ type ModelDeploymentMonitoringObjectiveConfig struct { func (x *ModelDeploymentMonitoringObjectiveConfig) Reset() { *x = ModelDeploymentMonitoringObjectiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringObjectiveConfig) String() string { @@ -693,7 +687,7 @@ func (*ModelDeploymentMonitoringObjectiveConfig) ProtoMessage() {} func (x *ModelDeploymentMonitoringObjectiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,11 +739,9 @@ type ModelDeploymentMonitoringScheduleConfig struct { func (x *ModelDeploymentMonitoringScheduleConfig) Reset() { *x = ModelDeploymentMonitoringScheduleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringScheduleConfig) String() string { @@ -760,7 +752,7 @@ func (*ModelDeploymentMonitoringScheduleConfig) ProtoMessage() {} func (x *ModelDeploymentMonitoringScheduleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +799,9 @@ type ModelMonitoringStatsAnomalies struct { func (x *ModelMonitoringStatsAnomalies) Reset() { *x = ModelMonitoringStatsAnomalies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsAnomalies) String() string { @@ -822,7 +812,7 @@ func (*ModelMonitoringStatsAnomalies) ProtoMessage() {} func (x *ModelMonitoringStatsAnomalies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,11 +870,9 @@ type ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata struct { func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) Reset() { *x = ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) String() string { @@ -895,7 +883,7 @@ func (*ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) ProtoMessa func (x *ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +931,9 @@ type ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies struct { func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) Reset() { *x = ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) String() string { @@ -958,7 +944,7 @@ func (*ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) ProtoMessage func (x *ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1428,92 +1414,6 @@ func file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_ file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringBigQueryTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringObjectiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringScheduleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsAnomalies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_deployment_monitoring_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsAnomalies_FeatureHistoricStatsAnomalies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_evaluation.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_evaluation.pb.go index 0ed7123d93ee..9f5d4d4c48eb 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_evaluation.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_evaluation.proto @@ -84,11 +84,9 @@ type ModelEvaluation struct { func (x *ModelEvaluation) Reset() { *x = ModelEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation) String() string { @@ -99,7 +97,7 @@ func (*ModelEvaluation) ProtoMessage() {} func (x *ModelEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type ModelEvaluation_ModelEvaluationExplanationSpec struct { func (x *ModelEvaluation_ModelEvaluationExplanationSpec) Reset() { *x = ModelEvaluation_ModelEvaluationExplanationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation_ModelEvaluationExplanationSpec) String() string { @@ -217,7 +213,7 @@ func (*ModelEvaluation_ModelEvaluationExplanationSpec) ProtoMessage() {} func (x *ModelEvaluation_ModelEvaluationExplanationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +279,9 @@ type ModelEvaluation_BiasConfig struct { func (x *ModelEvaluation_BiasConfig) Reset() { *x = ModelEvaluation_BiasConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation_BiasConfig) String() string { @@ -298,7 +292,7 @@ func (*ModelEvaluation_BiasConfig) ProtoMessage() {} func (x *ModelEvaluation_BiasConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,44 +477,6 @@ func file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_init() { } file_google_cloud_aiplatform_v1beta1_explanation_proto_init() file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation_ModelEvaluationExplanationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation_BiasConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_evaluation_slice.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_evaluation_slice.pb.go index aad43f729d6d..1434648df300 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_evaluation_slice.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_evaluation_slice.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto @@ -72,11 +72,9 @@ type ModelEvaluationSlice struct { func (x *ModelEvaluationSlice) Reset() { *x = ModelEvaluationSlice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice) String() string { @@ -87,7 +85,7 @@ func (*ModelEvaluationSlice) ProtoMessage() {} func (x *ModelEvaluationSlice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +166,9 @@ type ModelEvaluationSlice_Slice struct { func (x *ModelEvaluationSlice_Slice) Reset() { *x = ModelEvaluationSlice_Slice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice) String() string { @@ -183,7 +179,7 @@ func (*ModelEvaluationSlice_Slice) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +230,9 @@ type ModelEvaluationSlice_Slice_SliceSpec struct { func (x *ModelEvaluationSlice_Slice_SliceSpec) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec) String() string { @@ -249,7 +243,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +335,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_SliceConfig struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_SliceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) String() string { @@ -356,7 +348,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_SliceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +439,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_Range struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) String() string { @@ -462,7 +452,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_Range) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_Range) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +496,9 @@ type ModelEvaluationSlice_Slice_SliceSpec_Value struct { func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) Reset() { *x = ModelEvaluationSlice_Slice_SliceSpec_Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) String() string { @@ -521,7 +509,7 @@ func (*ModelEvaluationSlice_Slice_SliceSpec_Value) ProtoMessage() {} func (x *ModelEvaluationSlice_Slice_SliceSpec_Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,80 +744,6 @@ func file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_init() { return } file_google_cloud_aiplatform_v1beta1_explanation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluationSlice_Slice_SliceSpec_Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_msgTypes[3].OneofWrappers = []any{ (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig_Value)(nil), (*ModelEvaluationSlice_Slice_SliceSpec_SliceConfig_Range)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go index 5bab0744829f..b57a26f199b3 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_garden_service.proto @@ -123,11 +123,9 @@ type GetPublisherModelRequest struct { func (x *GetPublisherModelRequest) Reset() { *x = GetPublisherModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublisherModelRequest) String() string { @@ -138,7 +136,7 @@ func (*GetPublisherModelRequest) ProtoMessage() {} func (x *GetPublisherModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +222,9 @@ type ListPublisherModelsRequest struct { func (x *ListPublisherModelsRequest) Reset() { *x = ListPublisherModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublisherModelsRequest) String() string { @@ -239,7 +235,7 @@ func (*ListPublisherModelsRequest) ProtoMessage() {} func (x *ListPublisherModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +322,9 @@ type ListPublisherModelsResponse struct { func (x *ListPublisherModelsResponse) Reset() { *x = ListPublisherModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublisherModelsResponse) String() string { @@ -341,7 +335,7 @@ func (*ListPublisherModelsResponse) ProtoMessage() {} func (x *ListPublisherModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,44 +537,6 @@ func file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_init() { return } file_google_cloud_aiplatform_v1beta1_publisher_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPublisherModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListPublisherModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPublisherModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitor.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitor.pb.go index 0d13a43a269a..1fd0a78fc6ad 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitor.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitor.proto @@ -98,11 +98,9 @@ type ModelMonitor struct { func (x *ModelMonitor) Reset() { *x = ModelMonitor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitor) String() string { @@ -113,7 +111,7 @@ func (*ModelMonitor) ProtoMessage() {} func (x *ModelMonitor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +281,9 @@ type ModelMonitoringSchema struct { func (x *ModelMonitoringSchema) Reset() { *x = ModelMonitoringSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringSchema) String() string { @@ -298,7 +294,7 @@ func (*ModelMonitoringSchema) ProtoMessage() {} func (x *ModelMonitoringSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +345,9 @@ type ModelMonitor_ModelMonitoringTarget struct { func (x *ModelMonitor_ModelMonitoringTarget) Reset() { *x = ModelMonitor_ModelMonitoringTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitor_ModelMonitoringTarget) String() string { @@ -364,7 +358,7 @@ func (*ModelMonitor_ModelMonitoringTarget) ProtoMessage() {} func (x *ModelMonitor_ModelMonitoringTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,11 +414,9 @@ type ModelMonitor_ModelMonitoringTarget_VertexModelSource struct { func (x *ModelMonitor_ModelMonitoringTarget_VertexModelSource) Reset() { *x = ModelMonitor_ModelMonitoringTarget_VertexModelSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitor_ModelMonitoringTarget_VertexModelSource) String() string { @@ -435,7 +427,7 @@ func (*ModelMonitor_ModelMonitoringTarget_VertexModelSource) ProtoMessage() {} func (x *ModelMonitor_ModelMonitoringTarget_VertexModelSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +477,9 @@ type ModelMonitoringSchema_FieldSchema struct { func (x *ModelMonitoringSchema_FieldSchema) Reset() { *x = ModelMonitoringSchema_FieldSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringSchema_FieldSchema) String() string { @@ -500,7 +490,7 @@ func (*ModelMonitoringSchema_FieldSchema) ProtoMessage() {} func (x *ModelMonitoringSchema_FieldSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,68 +739,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitor_proto_init() { } file_google_cloud_aiplatform_v1beta1_explanation_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitor_ModelMonitoringTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitor_ModelMonitoringTarget_VertexModelSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringSchema_FieldSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_monitor_proto_msgTypes[0].OneofWrappers = []any{ (*ModelMonitor_TabularObjective)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring.pb.go index 925137996f71..113d6d64e715 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring.proto @@ -116,11 +116,9 @@ type ModelMonitoringConfig struct { func (x *ModelMonitoringConfig) Reset() { *x = ModelMonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringConfig) String() string { @@ -131,7 +129,7 @@ func (*ModelMonitoringConfig) ProtoMessage() {} func (x *ModelMonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type ModelMonitoringObjectiveConfig struct { func (x *ModelMonitoringObjectiveConfig) Reset() { *x = ModelMonitoringObjectiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig) String() string { @@ -209,7 +205,7 @@ func (*ModelMonitoringObjectiveConfig) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type ModelMonitoringAlertConfig struct { func (x *ModelMonitoringAlertConfig) Reset() { *x = ModelMonitoringAlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlertConfig) String() string { @@ -291,7 +285,7 @@ func (*ModelMonitoringAlertConfig) ProtoMessage() {} func (x *ModelMonitoringAlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +353,9 @@ type ThresholdConfig struct { func (x *ThresholdConfig) Reset() { *x = ThresholdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThresholdConfig) String() string { @@ -374,7 +366,7 @@ func (*ThresholdConfig) ProtoMessage() {} func (x *ThresholdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +427,9 @@ type SamplingStrategy struct { func (x *SamplingStrategy) Reset() { *x = SamplingStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SamplingStrategy) String() string { @@ -450,7 +440,7 @@ func (*SamplingStrategy) ProtoMessage() {} func (x *SamplingStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +497,9 @@ type ModelMonitoringObjectiveConfig_TrainingDataset struct { func (x *ModelMonitoringObjectiveConfig_TrainingDataset) Reset() { *x = ModelMonitoringObjectiveConfig_TrainingDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_TrainingDataset) String() string { @@ -522,7 +510,7 @@ func (*ModelMonitoringObjectiveConfig_TrainingDataset) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig_TrainingDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +628,9 @@ type ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig struct func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) Reset() { *x = ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) String() string { @@ -655,7 +641,7 @@ func (*ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) Pro func (x *ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +699,9 @@ type ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig struct { func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) Reset() { *x = ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) String() string { @@ -728,7 +712,7 @@ func (*ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) ProtoMessa func (x *ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +765,9 @@ type ModelMonitoringObjectiveConfig_ExplanationConfig struct { func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) Reset() { *x = ModelMonitoringObjectiveConfig_ExplanationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) String() string { @@ -796,7 +778,7 @@ func (*ModelMonitoringObjectiveConfig_ExplanationConfig) ProtoMessage() {} func (x *ModelMonitoringObjectiveConfig_ExplanationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +830,9 @@ type ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline struct func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) Reset() { *x = ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) String() string { @@ -863,7 +843,7 @@ func (*ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) Pro func (x *ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +918,9 @@ type ModelMonitoringAlertConfig_EmailAlertConfig struct { func (x *ModelMonitoringAlertConfig_EmailAlertConfig) Reset() { *x = ModelMonitoringAlertConfig_EmailAlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlertConfig_EmailAlertConfig) String() string { @@ -953,7 +931,7 @@ func (*ModelMonitoringAlertConfig_EmailAlertConfig) ProtoMessage() {} func (x *ModelMonitoringAlertConfig_EmailAlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +965,9 @@ type SamplingStrategy_RandomSampleConfig struct { func (x *SamplingStrategy_RandomSampleConfig) Reset() { *x = SamplingStrategy_RandomSampleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SamplingStrategy_RandomSampleConfig) String() string { @@ -1002,7 +978,7 @@ func (*SamplingStrategy_RandomSampleConfig) ProtoMessage() {} func (x *SamplingStrategy_RandomSampleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,152 +1387,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_init() { return } file_google_cloud_aiplatform_v1beta1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ThresholdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SamplingStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_TrainingDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_TrainingPredictionSkewDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_PredictionDriftDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_ExplanationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveConfig_ExplanationConfig_ExplanationBaseline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlertConfig_EmailAlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SamplingStrategy_RandomSampleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_monitoring_proto_msgTypes[2].OneofWrappers = []any{ (*ModelMonitoringAlertConfig_EmailAlertConfig_)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_alert.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_alert.pb.go index 926a3c420832..1e57f5df491f 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_alert.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_alert.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring_alert.proto @@ -53,11 +53,9 @@ type ModelMonitoringAlertCondition struct { func (x *ModelMonitoringAlertCondition) Reset() { *x = ModelMonitoringAlertCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlertCondition) String() string { @@ -68,7 +66,7 @@ func (*ModelMonitoringAlertCondition) ProtoMessage() {} func (x *ModelMonitoringAlertCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type ModelMonitoringAnomaly struct { func (x *ModelMonitoringAnomaly) Reset() { *x = ModelMonitoringAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAnomaly) String() string { @@ -143,7 +139,7 @@ func (*ModelMonitoringAnomaly) ProtoMessage() {} func (x *ModelMonitoringAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +216,9 @@ type ModelMonitoringAlert struct { func (x *ModelMonitoringAlert) Reset() { *x = ModelMonitoringAlert{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAlert) String() string { @@ -235,7 +229,7 @@ func (*ModelMonitoringAlert) ProtoMessage() {} func (x *ModelMonitoringAlert) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +292,9 @@ type ModelMonitoringAnomaly_TabularAnomaly struct { func (x *ModelMonitoringAnomaly_TabularAnomaly) Reset() { *x = ModelMonitoringAnomaly_TabularAnomaly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringAnomaly_TabularAnomaly) String() string { @@ -313,7 +305,7 @@ func (*ModelMonitoringAnomaly_TabularAnomaly) ProtoMessage() {} func (x *ModelMonitoringAnomaly_TabularAnomaly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,56 +478,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_init() { if File_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlertCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAlert); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringAnomaly_TabularAnomaly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_msgTypes[0].OneofWrappers = []any{ (*ModelMonitoringAlertCondition_Threshold)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_job.pb.go index ee36a77185ac..a98e3c5fbda5 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring_job.proto @@ -83,11 +83,9 @@ type ModelMonitoringJob struct { func (x *ModelMonitoringJob) Reset() { *x = ModelMonitoringJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringJob) String() string { @@ -98,7 +96,7 @@ func (*ModelMonitoringJob) ProtoMessage() {} func (x *ModelMonitoringJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,11 +193,9 @@ type ModelMonitoringJobExecutionDetail struct { func (x *ModelMonitoringJobExecutionDetail) Reset() { *x = ModelMonitoringJobExecutionDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringJobExecutionDetail) String() string { @@ -210,7 +206,7 @@ func (*ModelMonitoringJobExecutionDetail) ProtoMessage() {} func (x *ModelMonitoringJobExecutionDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +263,9 @@ type ModelMonitoringJobExecutionDetail_ProcessedDataset struct { func (x *ModelMonitoringJobExecutionDetail_ProcessedDataset) Reset() { *x = ModelMonitoringJobExecutionDetail_ProcessedDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringJobExecutionDetail_ProcessedDataset) String() string { @@ -282,7 +276,7 @@ func (*ModelMonitoringJobExecutionDetail_ProcessedDataset) ProtoMessage() {} func (x *ModelMonitoringJobExecutionDetail_ProcessedDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,44 +492,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_init() { } file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringJobExecutionDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringJobExecutionDetail_ProcessedDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_service.pb.go index 0bd99c490026..e940564b0181 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring_service.proto @@ -66,11 +66,9 @@ type CreateModelMonitorRequest struct { func (x *CreateModelMonitorRequest) Reset() { *x = CreateModelMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMonitorRequest) String() string { @@ -81,7 +79,7 @@ func (*CreateModelMonitorRequest) ProtoMessage() {} func (x *CreateModelMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,11 +128,9 @@ type CreateModelMonitorOperationMetadata struct { func (x *CreateModelMonitorOperationMetadata) Reset() { *x = CreateModelMonitorOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMonitorOperationMetadata) String() string { @@ -145,7 +141,7 @@ func (*CreateModelMonitorOperationMetadata) ProtoMessage() {} func (x *CreateModelMonitorOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +179,9 @@ type UpdateModelMonitorRequest struct { func (x *UpdateModelMonitorRequest) Reset() { *x = UpdateModelMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelMonitorRequest) String() string { @@ -198,7 +192,7 @@ func (*UpdateModelMonitorRequest) ProtoMessage() {} func (x *UpdateModelMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +234,9 @@ type UpdateModelMonitorOperationMetadata struct { func (x *UpdateModelMonitorOperationMetadata) Reset() { *x = UpdateModelMonitorOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelMonitorOperationMetadata) String() string { @@ -255,7 +247,7 @@ func (*UpdateModelMonitorOperationMetadata) ProtoMessage() {} func (x *UpdateModelMonitorOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +284,9 @@ type GetModelMonitorRequest struct { func (x *GetModelMonitorRequest) Reset() { *x = GetModelMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelMonitorRequest) String() string { @@ -307,7 +297,7 @@ func (*GetModelMonitorRequest) ProtoMessage() {} func (x *GetModelMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +342,9 @@ type ListModelMonitorsRequest struct { func (x *ListModelMonitorsRequest) Reset() { *x = ListModelMonitorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelMonitorsRequest) String() string { @@ -367,7 +355,7 @@ func (*ListModelMonitorsRequest) ProtoMessage() {} func (x *ListModelMonitorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +423,9 @@ type ListModelMonitorsResponse struct { func (x *ListModelMonitorsResponse) Reset() { *x = ListModelMonitorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelMonitorsResponse) String() string { @@ -450,7 +436,7 @@ func (*ListModelMonitorsResponse) ProtoMessage() {} func (x *ListModelMonitorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +482,9 @@ type DeleteModelMonitorRequest struct { func (x *DeleteModelMonitorRequest) Reset() { *x = DeleteModelMonitorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelMonitorRequest) String() string { @@ -511,7 +495,7 @@ func (*DeleteModelMonitorRequest) ProtoMessage() {} func (x *DeleteModelMonitorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +547,9 @@ type CreateModelMonitoringJobRequest struct { func (x *CreateModelMonitoringJobRequest) Reset() { *x = CreateModelMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMonitoringJobRequest) String() string { @@ -578,7 +560,7 @@ func (*CreateModelMonitoringJobRequest) ProtoMessage() {} func (x *CreateModelMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +611,9 @@ type GetModelMonitoringJobRequest struct { func (x *GetModelMonitoringJobRequest) Reset() { *x = GetModelMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelMonitoringJobRequest) String() string { @@ -644,7 +624,7 @@ func (*GetModelMonitoringJobRequest) ProtoMessage() {} func (x *GetModelMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +670,9 @@ type ListModelMonitoringJobsRequest struct { func (x *ListModelMonitoringJobsRequest) Reset() { *x = ListModelMonitoringJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelMonitoringJobsRequest) String() string { @@ -705,7 +683,7 @@ func (*ListModelMonitoringJobsRequest) ProtoMessage() {} func (x *ListModelMonitoringJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +749,9 @@ type ListModelMonitoringJobsResponse struct { func (x *ListModelMonitoringJobsResponse) Reset() { *x = ListModelMonitoringJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelMonitoringJobsResponse) String() string { @@ -786,7 +762,7 @@ func (*ListModelMonitoringJobsResponse) ProtoMessage() {} func (x *ListModelMonitoringJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,11 +806,9 @@ type DeleteModelMonitoringJobRequest struct { func (x *DeleteModelMonitoringJobRequest) Reset() { *x = DeleteModelMonitoringJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelMonitoringJobRequest) String() string { @@ -845,7 +819,7 @@ func (*DeleteModelMonitoringJobRequest) ProtoMessage() {} func (x *DeleteModelMonitoringJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +866,9 @@ type SearchModelMonitoringStatsRequest struct { func (x *SearchModelMonitoringStatsRequest) Reset() { *x = SearchModelMonitoringStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringStatsRequest) String() string { @@ -907,7 +879,7 @@ func (*SearchModelMonitoringStatsRequest) ProtoMessage() {} func (x *SearchModelMonitoringStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +946,9 @@ type SearchModelMonitoringStatsResponse struct { func (x *SearchModelMonitoringStatsResponse) Reset() { *x = SearchModelMonitoringStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringStatsResponse) String() string { @@ -989,7 +959,7 @@ func (*SearchModelMonitoringStatsResponse) ProtoMessage() {} func (x *SearchModelMonitoringStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1021,9 @@ type SearchModelMonitoringAlertsRequest struct { func (x *SearchModelMonitoringAlertsRequest) Reset() { *x = SearchModelMonitoringAlertsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringAlertsRequest) String() string { @@ -1066,7 +1034,7 @@ func (*SearchModelMonitoringAlertsRequest) ProtoMessage() {} func (x *SearchModelMonitoringAlertsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1118,9 @@ type SearchModelMonitoringAlertsResponse struct { func (x *SearchModelMonitoringAlertsResponse) Reset() { *x = SearchModelMonitoringAlertsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringAlertsResponse) String() string { @@ -1165,7 +1131,7 @@ func (*SearchModelMonitoringAlertsResponse) ProtoMessage() {} func (x *SearchModelMonitoringAlertsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1752,212 +1718,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_job_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMonitorOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelMonitorOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetModelMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelMonitorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListModelMonitorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelMonitorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetModelMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListModelMonitoringJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListModelMonitoringJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelMonitoringJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringAlertsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringAlertsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_spec.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_spec.pb.go index c6329df7d7d2..d8162a154356 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_spec.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring_spec.proto @@ -111,11 +111,9 @@ type ModelMonitoringSpec struct { func (x *ModelMonitoringSpec) Reset() { *x = ModelMonitoringSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringSpec) String() string { @@ -126,7 +124,7 @@ func (*ModelMonitoringSpec) ProtoMessage() {} func (x *ModelMonitoringSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +186,9 @@ type ModelMonitoringObjectiveSpec struct { func (x *ModelMonitoringObjectiveSpec) Reset() { *x = ModelMonitoringObjectiveSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveSpec) String() string { @@ -203,7 +199,7 @@ func (*ModelMonitoringObjectiveSpec) ProtoMessage() {} func (x *ModelMonitoringObjectiveSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type ModelMonitoringOutputSpec struct { func (x *ModelMonitoringOutputSpec) Reset() { *x = ModelMonitoringOutputSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringOutputSpec) String() string { @@ -292,7 +286,7 @@ func (*ModelMonitoringOutputSpec) ProtoMessage() {} func (x *ModelMonitoringOutputSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +333,9 @@ type ModelMonitoringInput struct { func (x *ModelMonitoringInput) Reset() { *x = ModelMonitoringInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput) String() string { @@ -354,7 +346,7 @@ func (*ModelMonitoringInput) ProtoMessage() {} func (x *ModelMonitoringInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +475,9 @@ type ModelMonitoringNotificationSpec struct { func (x *ModelMonitoringNotificationSpec) Reset() { *x = ModelMonitoringNotificationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringNotificationSpec) String() string { @@ -498,7 +488,7 @@ func (*ModelMonitoringNotificationSpec) ProtoMessage() {} func (x *ModelMonitoringNotificationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +558,9 @@ type ModelMonitoringObjectiveSpec_DataDriftSpec struct { func (x *ModelMonitoringObjectiveSpec_DataDriftSpec) Reset() { *x = ModelMonitoringObjectiveSpec_DataDriftSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveSpec_DataDriftSpec) String() string { @@ -583,7 +571,7 @@ func (*ModelMonitoringObjectiveSpec_DataDriftSpec) ProtoMessage() {} func (x *ModelMonitoringObjectiveSpec_DataDriftSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +651,9 @@ type ModelMonitoringObjectiveSpec_FeatureAttributionSpec struct { func (x *ModelMonitoringObjectiveSpec_FeatureAttributionSpec) Reset() { *x = ModelMonitoringObjectiveSpec_FeatureAttributionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveSpec_FeatureAttributionSpec) String() string { @@ -678,7 +664,7 @@ func (*ModelMonitoringObjectiveSpec_FeatureAttributionSpec) ProtoMessage() {} func (x *ModelMonitoringObjectiveSpec_FeatureAttributionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +723,9 @@ type ModelMonitoringObjectiveSpec_TabularObjective struct { func (x *ModelMonitoringObjectiveSpec_TabularObjective) Reset() { *x = ModelMonitoringObjectiveSpec_TabularObjective{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringObjectiveSpec_TabularObjective) String() string { @@ -752,7 +736,7 @@ func (*ModelMonitoringObjectiveSpec_TabularObjective) ProtoMessage() {} func (x *ModelMonitoringObjectiveSpec_TabularObjective) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +792,9 @@ type ModelMonitoringInput_ModelMonitoringDataset struct { func (x *ModelMonitoringInput_ModelMonitoringDataset) Reset() { *x = ModelMonitoringInput_ModelMonitoringDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_ModelMonitoringDataset) String() string { @@ -823,7 +805,7 @@ func (*ModelMonitoringInput_ModelMonitoringDataset) ProtoMessage() {} func (x *ModelMonitoringInput_ModelMonitoringDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +896,9 @@ type ModelMonitoringInput_BatchPredictionOutput struct { func (x *ModelMonitoringInput_BatchPredictionOutput) Reset() { *x = ModelMonitoringInput_BatchPredictionOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_BatchPredictionOutput) String() string { @@ -929,7 +909,7 @@ func (*ModelMonitoringInput_BatchPredictionOutput) ProtoMessage() {} func (x *ModelMonitoringInput_BatchPredictionOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +946,9 @@ type ModelMonitoringInput_VertexEndpointLogs struct { func (x *ModelMonitoringInput_VertexEndpointLogs) Reset() { *x = ModelMonitoringInput_VertexEndpointLogs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_VertexEndpointLogs) String() string { @@ -981,7 +959,7 @@ func (*ModelMonitoringInput_VertexEndpointLogs) ProtoMessage() {} func (x *ModelMonitoringInput_VertexEndpointLogs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1004,9 @@ type ModelMonitoringInput_TimeOffset struct { func (x *ModelMonitoringInput_TimeOffset) Reset() { *x = ModelMonitoringInput_TimeOffset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_TimeOffset) String() string { @@ -1041,7 +1017,7 @@ func (*ModelMonitoringInput_TimeOffset) ProtoMessage() {} func (x *ModelMonitoringInput_TimeOffset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1062,9 @@ type ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource struct func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource) Reset() { *x = ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource) String() string { @@ -1101,7 +1075,7 @@ func (*ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource) Pro func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1119,9 @@ type ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource s func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource) Reset() { *x = ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource) String() string { @@ -1160,7 +1132,7 @@ func (*ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource func (x *ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1204,9 @@ type ModelMonitoringNotificationSpec_EmailConfig struct { func (x *ModelMonitoringNotificationSpec_EmailConfig) Reset() { *x = ModelMonitoringNotificationSpec_EmailConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringNotificationSpec_EmailConfig) String() string { @@ -1247,7 +1217,7 @@ func (*ModelMonitoringNotificationSpec_EmailConfig) ProtoMessage() {} func (x *ModelMonitoringNotificationSpec_EmailConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1283,11 +1253,9 @@ type ModelMonitoringNotificationSpec_NotificationChannelConfig struct { func (x *ModelMonitoringNotificationSpec_NotificationChannelConfig) Reset() { *x = ModelMonitoringNotificationSpec_NotificationChannelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringNotificationSpec_NotificationChannelConfig) String() string { @@ -1298,7 +1266,7 @@ func (*ModelMonitoringNotificationSpec_NotificationChannelConfig) ProtoMessage() func (x *ModelMonitoringNotificationSpec_NotificationChannelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,200 +1724,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_init() { file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_model_monitoring_alert_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringOutputSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringNotificationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveSpec_DataDriftSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveSpec_FeatureAttributionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringObjectiveSpec_TabularObjective); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_ModelMonitoringDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_BatchPredictionOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_VertexEndpointLogs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_TimeOffset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringInput_ModelMonitoringDataset_ModelMonitoringBigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringNotificationSpec_EmailConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringNotificationSpec_NotificationChannelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_monitoring_spec_proto_msgTypes[1].OneofWrappers = []any{ (*ModelMonitoringObjectiveSpec_TabularObjective_)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_stats.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_stats.pb.go index 8f190f02c2cd..437245b9de59 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_stats.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_monitoring_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_monitoring_stats.proto @@ -51,11 +51,9 @@ type ModelMonitoringStats struct { func (x *ModelMonitoringStats) Reset() { *x = ModelMonitoringStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStats) String() string { @@ -66,7 +64,7 @@ func (*ModelMonitoringStats) ProtoMessage() {} func (x *ModelMonitoringStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type ModelMonitoringStatsDataPoint struct { func (x *ModelMonitoringStatsDataPoint) Reset() { *x = ModelMonitoringStatsDataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsDataPoint) String() string { @@ -148,7 +144,7 @@ func (*ModelMonitoringStatsDataPoint) ProtoMessage() {} func (x *ModelMonitoringStatsDataPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +236,9 @@ type ModelMonitoringTabularStats struct { func (x *ModelMonitoringTabularStats) Reset() { *x = ModelMonitoringTabularStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringTabularStats) String() string { @@ -255,7 +249,7 @@ func (*ModelMonitoringTabularStats) ProtoMessage() {} func (x *ModelMonitoringTabularStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +299,9 @@ type SearchModelMonitoringStatsFilter struct { func (x *SearchModelMonitoringStatsFilter) Reset() { *x = SearchModelMonitoringStatsFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringStatsFilter) String() string { @@ -320,7 +312,7 @@ func (*SearchModelMonitoringStatsFilter) ProtoMessage() {} func (x *SearchModelMonitoringStatsFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +370,9 @@ type ModelMonitoringStatsDataPoint_TypedValue struct { func (x *ModelMonitoringStatsDataPoint_TypedValue) Reset() { *x = ModelMonitoringStatsDataPoint_TypedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsDataPoint_TypedValue) String() string { @@ -393,7 +383,7 @@ func (*ModelMonitoringStatsDataPoint_TypedValue) ProtoMessage() {} func (x *ModelMonitoringStatsDataPoint_TypedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +459,9 @@ type ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue struct { func (x *ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue) Reset() { *x = ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue) String() string { @@ -484,7 +472,7 @@ func (*ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue) ProtoMess func (x *ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +525,9 @@ type SearchModelMonitoringStatsFilter_TabularStatsFilter struct { func (x *SearchModelMonitoringStatsFilter_TabularStatsFilter) Reset() { *x = SearchModelMonitoringStatsFilter_TabularStatsFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchModelMonitoringStatsFilter_TabularStatsFilter) String() string { @@ -552,7 +538,7 @@ func (*SearchModelMonitoringStatsFilter_TabularStatsFilter) ProtoMessage() {} func (x *SearchModelMonitoringStatsFilter_TabularStatsFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,92 +764,6 @@ func file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_init() { if File_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsDataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringTabularStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringStatsFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsDataPoint_TypedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelMonitoringStatsDataPoint_TypedValue_DistributionDataValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchModelMonitoringStatsFilter_TabularStatsFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_monitoring_stats_proto_msgTypes[0].OneofWrappers = []any{ (*ModelMonitoringStats_TabularStats)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_service.pb.go index e510726a389a..2d2a2fb8b02b 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/model_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/model_service.proto @@ -76,11 +76,9 @@ type UploadModelRequest struct { func (x *UploadModelRequest) Reset() { *x = UploadModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelRequest) String() string { @@ -91,7 +89,7 @@ func (*UploadModelRequest) ProtoMessage() {} func (x *UploadModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,11 +153,9 @@ type UploadModelOperationMetadata struct { func (x *UploadModelOperationMetadata) Reset() { *x = UploadModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelOperationMetadata) String() string { @@ -170,7 +166,7 @@ func (*UploadModelOperationMetadata) ProtoMessage() {} func (x *UploadModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +205,9 @@ type UploadModelResponse struct { func (x *UploadModelResponse) Reset() { *x = UploadModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadModelResponse) String() string { @@ -224,7 +218,7 @@ func (*UploadModelResponse) ProtoMessage() {} func (x *UploadModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -294,7 +286,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +353,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -376,7 +366,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +434,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -459,7 +447,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +521,9 @@ type ListModelVersionsRequest struct { func (x *ListModelVersionsRequest) Reset() { *x = ListModelVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelVersionsRequest) String() string { @@ -548,7 +534,7 @@ func (*ListModelVersionsRequest) ProtoMessage() {} func (x *ListModelVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +611,9 @@ type ListModelVersionsResponse struct { func (x *ListModelVersionsResponse) Reset() { *x = ListModelVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelVersionsResponse) String() string { @@ -640,7 +624,7 @@ func (*ListModelVersionsResponse) ProtoMessage() {} func (x *ListModelVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +687,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -718,7 +700,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +745,9 @@ type UpdateExplanationDatasetRequest struct { func (x *UpdateExplanationDatasetRequest) Reset() { *x = UpdateExplanationDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetRequest) String() string { @@ -778,7 +758,7 @@ func (*UpdateExplanationDatasetRequest) ProtoMessage() {} func (x *UpdateExplanationDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +800,9 @@ type UpdateExplanationDatasetOperationMetadata struct { func (x *UpdateExplanationDatasetOperationMetadata) Reset() { *x = UpdateExplanationDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetOperationMetadata) String() string { @@ -835,7 +813,7 @@ func (*UpdateExplanationDatasetOperationMetadata) ProtoMessage() {} func (x *UpdateExplanationDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +849,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -886,7 +862,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -924,11 +900,9 @@ type DeleteModelVersionRequest struct { func (x *DeleteModelVersionRequest) Reset() { *x = DeleteModelVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelVersionRequest) String() string { @@ -939,7 +913,7 @@ func (*DeleteModelVersionRequest) ProtoMessage() {} func (x *DeleteModelVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +964,9 @@ type MergeVersionAliasesRequest struct { func (x *MergeVersionAliasesRequest) Reset() { *x = MergeVersionAliasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MergeVersionAliasesRequest) String() string { @@ -1005,7 +977,7 @@ func (*MergeVersionAliasesRequest) ProtoMessage() {} func (x *MergeVersionAliasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1023,9 @@ type ExportModelRequest struct { func (x *ExportModelRequest) Reset() { *x = ExportModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest) String() string { @@ -1066,7 +1036,7 @@ func (*ExportModelRequest) ProtoMessage() {} func (x *ExportModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1112,11 +1082,9 @@ type ExportModelOperationMetadata struct { func (x *ExportModelOperationMetadata) Reset() { *x = ExportModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata) String() string { @@ -1127,7 +1095,7 @@ func (*ExportModelOperationMetadata) ProtoMessage() {} func (x *ExportModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1135,9 @@ type UpdateExplanationDatasetResponse struct { func (x *UpdateExplanationDatasetResponse) Reset() { *x = UpdateExplanationDatasetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExplanationDatasetResponse) String() string { @@ -1182,7 +1148,7 @@ func (*UpdateExplanationDatasetResponse) ProtoMessage() {} func (x *UpdateExplanationDatasetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1208,11 +1174,9 @@ type ExportModelResponse struct { func (x *ExportModelResponse) Reset() { *x = ExportModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelResponse) String() string { @@ -1223,7 +1187,7 @@ func (*ExportModelResponse) ProtoMessage() {} func (x *ExportModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1266,11 +1230,9 @@ type CopyModelRequest struct { func (x *CopyModelRequest) Reset() { *x = CopyModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelRequest) String() string { @@ -1281,7 +1243,7 @@ func (*CopyModelRequest) ProtoMessage() {} func (x *CopyModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1338,9 @@ type CopyModelOperationMetadata struct { func (x *CopyModelOperationMetadata) Reset() { *x = CopyModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelOperationMetadata) String() string { @@ -1391,7 +1351,7 @@ func (*CopyModelOperationMetadata) ProtoMessage() {} func (x *CopyModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1430,11 +1390,9 @@ type CopyModelResponse struct { func (x *CopyModelResponse) Reset() { *x = CopyModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyModelResponse) String() string { @@ -1445,7 +1403,7 @@ func (*CopyModelResponse) ProtoMessage() {} func (x *CopyModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1490,11 +1448,9 @@ type ImportModelEvaluationRequest struct { func (x *ImportModelEvaluationRequest) Reset() { *x = ImportModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportModelEvaluationRequest) String() string { @@ -1505,7 +1461,7 @@ func (*ImportModelEvaluationRequest) ProtoMessage() {} func (x *ImportModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1507,9 @@ type BatchImportModelEvaluationSlicesRequest struct { func (x *BatchImportModelEvaluationSlicesRequest) Reset() { *x = BatchImportModelEvaluationSlicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportModelEvaluationSlicesRequest) String() string { @@ -1566,7 +1520,7 @@ func (*BatchImportModelEvaluationSlicesRequest) ProtoMessage() {} func (x *BatchImportModelEvaluationSlicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1563,9 @@ type BatchImportModelEvaluationSlicesResponse struct { func (x *BatchImportModelEvaluationSlicesResponse) Reset() { *x = BatchImportModelEvaluationSlicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportModelEvaluationSlicesResponse) String() string { @@ -1624,7 +1576,7 @@ func (*BatchImportModelEvaluationSlicesResponse) ProtoMessage() {} func (x *BatchImportModelEvaluationSlicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1615,9 @@ type BatchImportEvaluatedAnnotationsRequest struct { func (x *BatchImportEvaluatedAnnotationsRequest) Reset() { *x = BatchImportEvaluatedAnnotationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportEvaluatedAnnotationsRequest) String() string { @@ -1678,7 +1628,7 @@ func (*BatchImportEvaluatedAnnotationsRequest) ProtoMessage() {} func (x *BatchImportEvaluatedAnnotationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1720,11 +1670,9 @@ type BatchImportEvaluatedAnnotationsResponse struct { func (x *BatchImportEvaluatedAnnotationsResponse) Reset() { *x = BatchImportEvaluatedAnnotationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchImportEvaluatedAnnotationsResponse) String() string { @@ -1735,7 +1683,7 @@ func (*BatchImportEvaluatedAnnotationsResponse) ProtoMessage() {} func (x *BatchImportEvaluatedAnnotationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1720,9 @@ type GetModelEvaluationRequest struct { func (x *GetModelEvaluationRequest) Reset() { *x = GetModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationRequest) String() string { @@ -1787,7 +1733,7 @@ func (*GetModelEvaluationRequest) ProtoMessage() {} func (x *GetModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1836,11 +1782,9 @@ type ListModelEvaluationsRequest struct { func (x *ListModelEvaluationsRequest) Reset() { *x = ListModelEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsRequest) String() string { @@ -1851,7 +1795,7 @@ func (*ListModelEvaluationsRequest) ProtoMessage() {} func (x *ListModelEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1863,9 @@ type ListModelEvaluationsResponse struct { func (x *ListModelEvaluationsResponse) Reset() { *x = ListModelEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsResponse) String() string { @@ -1934,7 +1876,7 @@ func (*ListModelEvaluationsResponse) ProtoMessage() {} func (x *ListModelEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1920,9 @@ type GetModelEvaluationSliceRequest struct { func (x *GetModelEvaluationSliceRequest) Reset() { *x = GetModelEvaluationSliceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationSliceRequest) String() string { @@ -1993,7 +1933,7 @@ func (*GetModelEvaluationSliceRequest) ProtoMessage() {} func (x *GetModelEvaluationSliceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2045,11 +1985,9 @@ type ListModelEvaluationSlicesRequest struct { func (x *ListModelEvaluationSlicesRequest) Reset() { *x = ListModelEvaluationSlicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationSlicesRequest) String() string { @@ -2060,7 +1998,7 @@ func (*ListModelEvaluationSlicesRequest) ProtoMessage() {} func (x *ListModelEvaluationSlicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2128,11 +2066,9 @@ type ListModelEvaluationSlicesResponse struct { func (x *ListModelEvaluationSlicesResponse) Reset() { *x = ListModelEvaluationSlicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationSlicesResponse) String() string { @@ -2143,7 +2079,7 @@ func (*ListModelEvaluationSlicesResponse) ProtoMessage() {} func (x *ListModelEvaluationSlicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2202,11 +2138,9 @@ type ExportModelRequest_OutputConfig struct { func (x *ExportModelRequest_OutputConfig) Reset() { *x = ExportModelRequest_OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest_OutputConfig) String() string { @@ -2217,7 +2151,7 @@ func (*ExportModelRequest_OutputConfig) ProtoMessage() {} func (x *ExportModelRequest_OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2271,11 +2205,9 @@ type ExportModelOperationMetadata_OutputInfo struct { func (x *ExportModelOperationMetadata_OutputInfo) Reset() { *x = ExportModelOperationMetadata_OutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata_OutputInfo) String() string { @@ -2286,7 +2218,7 @@ func (*ExportModelOperationMetadata_OutputInfo) ProtoMessage() {} func (x *ExportModelOperationMetadata_OutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3148,416 +3080,6 @@ func file_google_cloud_aiplatform_v1beta1_model_service_proto_init() { file_google_cloud_aiplatform_v1beta1_model_evaluation_proto_init() file_google_cloud_aiplatform_v1beta1_model_evaluation_slice_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UploadModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListModelVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListModelVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MergeVersionAliasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExplanationDatasetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CopyModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ImportModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportModelEvaluationSlicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportModelEvaluationSlicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportEvaluatedAnnotationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BatchImportEvaluatedAnnotationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationSliceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationSlicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationSlicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest_OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata_OutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_model_service_proto_msgTypes[18].OneofWrappers = []any{ (*CopyModelRequest_ModelId)(nil), (*CopyModelRequest_ParentModel)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/nas_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/nas_job.pb.go index a6670d0022ab..eb7c29b4ef80 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/nas_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/nas_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/nas_job.proto @@ -270,11 +270,9 @@ type NasJob struct { func (x *NasJob) Reset() { *x = NasJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJob) String() string { @@ -285,7 +283,7 @@ func (*NasJob) ProtoMessage() {} func (x *NasJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +427,9 @@ type NasTrialDetail struct { func (x *NasTrialDetail) Reset() { *x = NasTrialDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasTrialDetail) String() string { @@ -444,7 +440,7 @@ func (*NasTrialDetail) ProtoMessage() {} func (x *NasTrialDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +506,9 @@ type NasJobSpec struct { func (x *NasJobSpec) Reset() { *x = NasJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec) String() string { @@ -525,7 +519,7 @@ func (*NasJobSpec) ProtoMessage() {} func (x *NasJobSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +589,9 @@ type NasJobOutput struct { func (x *NasJobOutput) Reset() { *x = NasJobOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobOutput) String() string { @@ -610,7 +602,7 @@ func (*NasJobOutput) ProtoMessage() {} func (x *NasJobOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +664,9 @@ type NasTrial struct { func (x *NasTrial) Reset() { *x = NasTrial{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasTrial) String() string { @@ -687,7 +677,7 @@ func (*NasTrial) ProtoMessage() {} func (x *NasTrial) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +749,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec) String() string { @@ -774,7 +762,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +819,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) String() string { @@ -846,7 +832,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +885,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) String() string { @@ -914,7 +898,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +961,9 @@ type NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec struct { func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) Reset() { *x = NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) String() string { @@ -992,7 +974,7 @@ func (*NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) ProtoMessage() {} func (x *NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1042,11 +1024,9 @@ type NasJobOutput_MultiTrialJobOutput struct { func (x *NasJobOutput_MultiTrialJobOutput) Reset() { *x = NasJobOutput_MultiTrialJobOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NasJobOutput_MultiTrialJobOutput) String() string { @@ -1057,7 +1037,7 @@ func (*NasJobOutput_MultiTrialJobOutput) ProtoMessage() {} func (x *NasJobOutput_MultiTrialJobOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1455,128 +1435,6 @@ func file_google_cloud_aiplatform_v1beta1_nas_job_proto_init() { file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NasJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NasTrialDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NasJobOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NasTrial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NasJobOutput_MultiTrialJobOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_nas_job_proto_msgTypes[2].OneofWrappers = []any{ (*NasJobSpec_MultiTrialAlgorithmSpec_)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/network_spec.pb.go b/aiplatform/apiv1beta1/aiplatformpb/network_spec.pb.go index 93c7c5a050b0..c280f092e39c 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/network_spec.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/network_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/network_spec.proto @@ -55,11 +55,9 @@ type NetworkSpec struct { func (x *NetworkSpec) Reset() { *x = NetworkSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_network_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_network_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkSpec) String() string { @@ -70,7 +68,7 @@ func (*NetworkSpec) ProtoMessage() {} func (x *NetworkSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_network_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,20 +180,6 @@ func file_google_cloud_aiplatform_v1beta1_network_spec_proto_init() { if File_google_cloud_aiplatform_v1beta1_network_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_network_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_euc_config.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_euc_config.pb.go index b7ba21f31f0a..f8014b883d8c 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_euc_config.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_euc_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_euc_config.proto @@ -58,11 +58,9 @@ type NotebookEucConfig struct { func (x *NotebookEucConfig) Reset() { *x = NotebookEucConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookEucConfig) String() string { @@ -73,7 +71,7 @@ func (*NotebookEucConfig) ProtoMessage() {} func (x *NotebookEucConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,20 +165,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_init() { if File_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookEucConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_execution_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_execution_job.pb.go index ba8f7233626e..92c39daadd43 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_execution_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_execution_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_execution_job.proto @@ -125,11 +125,9 @@ type NotebookExecutionJob struct { func (x *NotebookExecutionJob) Reset() { *x = NotebookExecutionJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob) String() string { @@ -140,7 +138,7 @@ func (*NotebookExecutionJob) ProtoMessage() {} func (x *NotebookExecutionJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +430,9 @@ type NotebookExecutionJob_DataformRepositorySource struct { func (x *NotebookExecutionJob_DataformRepositorySource) Reset() { *x = NotebookExecutionJob_DataformRepositorySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_DataformRepositorySource) String() string { @@ -447,7 +443,7 @@ func (*NotebookExecutionJob_DataformRepositorySource) ProtoMessage() {} func (x *NotebookExecutionJob_DataformRepositorySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +489,9 @@ type NotebookExecutionJob_GcsNotebookSource struct { func (x *NotebookExecutionJob_GcsNotebookSource) Reset() { *x = NotebookExecutionJob_GcsNotebookSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_GcsNotebookSource) String() string { @@ -508,7 +502,7 @@ func (*NotebookExecutionJob_GcsNotebookSource) ProtoMessage() {} func (x *NotebookExecutionJob_GcsNotebookSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +543,9 @@ type NotebookExecutionJob_DirectNotebookSource struct { func (x *NotebookExecutionJob_DirectNotebookSource) Reset() { *x = NotebookExecutionJob_DirectNotebookSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_DirectNotebookSource) String() string { @@ -564,7 +556,7 @@ func (*NotebookExecutionJob_DirectNotebookSource) ProtoMessage() {} func (x *NotebookExecutionJob_DirectNotebookSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +594,9 @@ type NotebookExecutionJob_CustomEnvironmentSpec struct { func (x *NotebookExecutionJob_CustomEnvironmentSpec) Reset() { *x = NotebookExecutionJob_CustomEnvironmentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_CustomEnvironmentSpec) String() string { @@ -617,7 +607,7 @@ func (*NotebookExecutionJob_CustomEnvironmentSpec) ProtoMessage() {} func (x *NotebookExecutionJob_CustomEnvironmentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +652,9 @@ type NotebookExecutionJob_WorkbenchRuntime struct { func (x *NotebookExecutionJob_WorkbenchRuntime) Reset() { *x = NotebookExecutionJob_WorkbenchRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookExecutionJob_WorkbenchRuntime) String() string { @@ -677,7 +665,7 @@ func (*NotebookExecutionJob_WorkbenchRuntime) ProtoMessage() {} func (x *NotebookExecutionJob_WorkbenchRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,80 +952,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_init() { file_google_cloud_aiplatform_v1beta1_job_state_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_network_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_DataformRepositorySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_GcsNotebookSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_DirectNotebookSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_CustomEnvironmentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NotebookExecutionJob_WorkbenchRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_msgTypes[0].OneofWrappers = []any{ (*NotebookExecutionJob_DataformRepositorySource_)(nil), (*NotebookExecutionJob_GcsNotebookSource_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_idle_shutdown_config.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_idle_shutdown_config.pb.go index de76719096ff..f3a945b37a40 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_idle_shutdown_config.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_idle_shutdown_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_idle_shutdown_config.proto @@ -54,11 +54,9 @@ type NotebookIdleShutdownConfig struct { func (x *NotebookIdleShutdownConfig) Reset() { *x = NotebookIdleShutdownConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookIdleShutdownConfig) String() string { @@ -69,7 +67,7 @@ func (*NotebookIdleShutdownConfig) ProtoMessage() {} func (x *NotebookIdleShutdownConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,20 +168,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_in if File_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookIdleShutdownConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime.pb.go index 602a88254ac6..389a59731b2d 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_runtime.proto @@ -289,11 +289,9 @@ type NotebookRuntimeTemplate struct { func (x *NotebookRuntimeTemplate) Reset() { *x = NotebookRuntimeTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntimeTemplate) String() string { @@ -304,7 +302,7 @@ func (*NotebookRuntimeTemplate) ProtoMessage() {} func (x *NotebookRuntimeTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +522,9 @@ type NotebookRuntime struct { func (x *NotebookRuntime) Reset() { *x = NotebookRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntime) String() string { @@ -539,7 +535,7 @@ func (*NotebookRuntime) ProtoMessage() {} func (x *NotebookRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,32 +1036,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_init() { file_google_cloud_aiplatform_v1beta1_notebook_euc_config_proto_init() file_google_cloud_aiplatform_v1beta1_notebook_idle_shutdown_config_proto_init() file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntimeTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime_template_ref.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime_template_ref.pb.go index 63289361070a..646706681ee6 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime_template_ref.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_runtime_template_ref.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_runtime_template_ref.proto @@ -48,11 +48,9 @@ type NotebookRuntimeTemplateRef struct { func (x *NotebookRuntimeTemplateRef) Reset() { *x = NotebookRuntimeTemplateRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotebookRuntimeTemplateRef) String() string { @@ -63,7 +61,7 @@ func (*NotebookRuntimeTemplateRef) ProtoMessage() {} func (x *NotebookRuntimeTemplateRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +153,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_in if File_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_runtime_template_ref_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotebookRuntimeTemplateRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/notebook_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/notebook_service.pb.go index 0f9543d6b05b..1da8be142175 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/notebook_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/notebook_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/notebook_service.proto @@ -114,11 +114,9 @@ type CreateNotebookRuntimeTemplateRequest struct { func (x *CreateNotebookRuntimeTemplateRequest) Reset() { *x = CreateNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookRuntimeTemplateRequest) String() string { @@ -129,7 +127,7 @@ func (*CreateNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *CreateNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type CreateNotebookRuntimeTemplateOperationMetadata struct { func (x *CreateNotebookRuntimeTemplateOperationMetadata) Reset() { *x = CreateNotebookRuntimeTemplateOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookRuntimeTemplateOperationMetadata) String() string { @@ -193,7 +189,7 @@ func (*CreateNotebookRuntimeTemplateOperationMetadata) ProtoMessage() {} func (x *CreateNotebookRuntimeTemplateOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +226,9 @@ type GetNotebookRuntimeTemplateRequest struct { func (x *GetNotebookRuntimeTemplateRequest) Reset() { *x = GetNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookRuntimeTemplateRequest) String() string { @@ -245,7 +239,7 @@ func (*GetNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *GetNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +318,9 @@ type ListNotebookRuntimeTemplatesRequest struct { func (x *ListNotebookRuntimeTemplatesRequest) Reset() { *x = ListNotebookRuntimeTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimeTemplatesRequest) String() string { @@ -339,7 +331,7 @@ func (*ListNotebookRuntimeTemplatesRequest) ProtoMessage() {} func (x *ListNotebookRuntimeTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +406,9 @@ type ListNotebookRuntimeTemplatesResponse struct { func (x *ListNotebookRuntimeTemplatesResponse) Reset() { *x = ListNotebookRuntimeTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimeTemplatesResponse) String() string { @@ -429,7 +419,7 @@ func (*ListNotebookRuntimeTemplatesResponse) ProtoMessage() {} func (x *ListNotebookRuntimeTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +463,9 @@ type DeleteNotebookRuntimeTemplateRequest struct { func (x *DeleteNotebookRuntimeTemplateRequest) Reset() { *x = DeleteNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookRuntimeTemplateRequest) String() string { @@ -488,7 +476,7 @@ func (*DeleteNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *DeleteNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +518,9 @@ type UpdateNotebookRuntimeTemplateRequest struct { func (x *UpdateNotebookRuntimeTemplateRequest) Reset() { *x = UpdateNotebookRuntimeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotebookRuntimeTemplateRequest) String() string { @@ -545,7 +531,7 @@ func (*UpdateNotebookRuntimeTemplateRequest) ProtoMessage() {} func (x *UpdateNotebookRuntimeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +582,9 @@ type AssignNotebookRuntimeRequest struct { func (x *AssignNotebookRuntimeRequest) Reset() { *x = AssignNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignNotebookRuntimeRequest) String() string { @@ -611,7 +595,7 @@ func (*AssignNotebookRuntimeRequest) ProtoMessage() {} func (x *AssignNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +654,9 @@ type AssignNotebookRuntimeOperationMetadata struct { func (x *AssignNotebookRuntimeOperationMetadata) Reset() { *x = AssignNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignNotebookRuntimeOperationMetadata) String() string { @@ -685,7 +667,7 @@ func (*AssignNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *AssignNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +712,9 @@ type GetNotebookRuntimeRequest struct { func (x *GetNotebookRuntimeRequest) Reset() { *x = GetNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookRuntimeRequest) String() string { @@ -745,7 +725,7 @@ func (*GetNotebookRuntimeRequest) ProtoMessage() {} func (x *GetNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +818,9 @@ type ListNotebookRuntimesRequest struct { func (x *ListNotebookRuntimesRequest) Reset() { *x = ListNotebookRuntimesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimesRequest) String() string { @@ -853,7 +831,7 @@ func (*ListNotebookRuntimesRequest) ProtoMessage() {} func (x *ListNotebookRuntimesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +906,9 @@ type ListNotebookRuntimesResponse struct { func (x *ListNotebookRuntimesResponse) Reset() { *x = ListNotebookRuntimesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookRuntimesResponse) String() string { @@ -943,7 +919,7 @@ func (*ListNotebookRuntimesResponse) ProtoMessage() {} func (x *ListNotebookRuntimesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +964,9 @@ type DeleteNotebookRuntimeRequest struct { func (x *DeleteNotebookRuntimeRequest) Reset() { *x = DeleteNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookRuntimeRequest) String() string { @@ -1003,7 +977,7 @@ func (*DeleteNotebookRuntimeRequest) ProtoMessage() {} func (x *DeleteNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1015,9 @@ type UpgradeNotebookRuntimeRequest struct { func (x *UpgradeNotebookRuntimeRequest) Reset() { *x = UpgradeNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeRequest) String() string { @@ -1056,7 +1028,7 @@ func (*UpgradeNotebookRuntimeRequest) ProtoMessage() {} func (x *UpgradeNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1066,9 @@ type UpgradeNotebookRuntimeOperationMetadata struct { func (x *UpgradeNotebookRuntimeOperationMetadata) Reset() { *x = UpgradeNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeOperationMetadata) String() string { @@ -1109,7 +1079,7 @@ func (*UpgradeNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *UpgradeNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1118,9 @@ type UpgradeNotebookRuntimeResponse struct { func (x *UpgradeNotebookRuntimeResponse) Reset() { *x = UpgradeNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeNotebookRuntimeResponse) String() string { @@ -1163,7 +1131,7 @@ func (*UpgradeNotebookRuntimeResponse) ProtoMessage() {} func (x *UpgradeNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1162,9 @@ type StartNotebookRuntimeRequest struct { func (x *StartNotebookRuntimeRequest) Reset() { *x = StartNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeRequest) String() string { @@ -1209,7 +1175,7 @@ func (*StartNotebookRuntimeRequest) ProtoMessage() {} func (x *StartNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1247,11 +1213,9 @@ type StartNotebookRuntimeOperationMetadata struct { func (x *StartNotebookRuntimeOperationMetadata) Reset() { *x = StartNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeOperationMetadata) String() string { @@ -1262,7 +1226,7 @@ func (*StartNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *StartNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1301,11 +1265,9 @@ type StartNotebookRuntimeResponse struct { func (x *StartNotebookRuntimeResponse) Reset() { *x = StartNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNotebookRuntimeResponse) String() string { @@ -1316,7 +1278,7 @@ func (*StartNotebookRuntimeResponse) ProtoMessage() {} func (x *StartNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1309,9 @@ type StopNotebookRuntimeRequest struct { func (x *StopNotebookRuntimeRequest) Reset() { *x = StopNotebookRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeRequest) String() string { @@ -1362,7 +1322,7 @@ func (*StopNotebookRuntimeRequest) ProtoMessage() {} func (x *StopNotebookRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1357,9 @@ type StopNotebookRuntimeOperationMetadata struct { func (x *StopNotebookRuntimeOperationMetadata) Reset() { *x = StopNotebookRuntimeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeOperationMetadata) String() string { @@ -1412,7 +1370,7 @@ func (*StopNotebookRuntimeOperationMetadata) ProtoMessage() {} func (x *StopNotebookRuntimeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1444,11 +1402,9 @@ type StopNotebookRuntimeResponse struct { func (x *StopNotebookRuntimeResponse) Reset() { *x = StopNotebookRuntimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNotebookRuntimeResponse) String() string { @@ -1459,7 +1415,7 @@ func (*StopNotebookRuntimeResponse) ProtoMessage() {} func (x *StopNotebookRuntimeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1447,9 @@ type CreateNotebookExecutionJobRequest struct { func (x *CreateNotebookExecutionJobRequest) Reset() { *x = CreateNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookExecutionJobRequest) String() string { @@ -1506,7 +1460,7 @@ func (*CreateNotebookExecutionJobRequest) ProtoMessage() {} func (x *CreateNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1512,9 @@ type CreateNotebookExecutionJobOperationMetadata struct { func (x *CreateNotebookExecutionJobOperationMetadata) Reset() { *x = CreateNotebookExecutionJobOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotebookExecutionJobOperationMetadata) String() string { @@ -1573,7 +1525,7 @@ func (*CreateNotebookExecutionJobOperationMetadata) ProtoMessage() {} func (x *CreateNotebookExecutionJobOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1568,9 @@ type GetNotebookExecutionJobRequest struct { func (x *GetNotebookExecutionJobRequest) Reset() { *x = GetNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotebookExecutionJobRequest) String() string { @@ -1631,7 +1581,7 @@ func (*GetNotebookExecutionJobRequest) ProtoMessage() {} func (x *GetNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,11 +1656,9 @@ type ListNotebookExecutionJobsRequest struct { func (x *ListNotebookExecutionJobsRequest) Reset() { *x = ListNotebookExecutionJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookExecutionJobsRequest) String() string { @@ -1721,7 +1669,7 @@ func (*ListNotebookExecutionJobsRequest) ProtoMessage() {} func (x *ListNotebookExecutionJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1742,9 @@ type ListNotebookExecutionJobsResponse struct { func (x *ListNotebookExecutionJobsResponse) Reset() { *x = ListNotebookExecutionJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotebookExecutionJobsResponse) String() string { @@ -1809,7 +1755,7 @@ func (*ListNotebookExecutionJobsResponse) ProtoMessage() {} func (x *ListNotebookExecutionJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1796,9 @@ type DeleteNotebookExecutionJobRequest struct { func (x *DeleteNotebookExecutionJobRequest) Reset() { *x = DeleteNotebookExecutionJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotebookExecutionJobRequest) String() string { @@ -1865,7 +1809,7 @@ func (*DeleteNotebookExecutionJobRequest) ProtoMessage() {} func (x *DeleteNotebookExecutionJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2649,344 +2593,6 @@ func file_google_cloud_aiplatform_v1beta1_notebook_service_proto_init() { file_google_cloud_aiplatform_v1beta1_notebook_execution_job_proto_init() file_google_cloud_aiplatform_v1beta1_notebook_runtime_proto_init() file_google_cloud_aiplatform_v1beta1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookRuntimeTemplateOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimeTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimeTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotebookRuntimeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AssignNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AssignNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookRuntimesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StartNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StopNotebookRuntimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotebookExecutionJobOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookExecutionJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListNotebookExecutionJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_notebook_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotebookExecutionJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/openapi.pb.go b/aiplatform/apiv1beta1/aiplatformpb/openapi.pb.go index 3d27598b1e29..4a2ba79089ab 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/openapi.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/openapi.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/openapi.proto @@ -180,11 +180,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_openapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_openapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -195,7 +193,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_openapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,20 +505,6 @@ func file_google_cloud_aiplatform_v1beta1_openapi_proto_init() { if File_google_cloud_aiplatform_v1beta1_openapi_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_openapi_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/operation.pb.go b/aiplatform/apiv1beta1/aiplatformpb/operation.pb.go index e57ffd453b2e..5edcaa8f53e9 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/operation.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/operation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/operation.proto @@ -59,11 +59,9 @@ type GenericOperationMetadata struct { func (x *GenericOperationMetadata) Reset() { *x = GenericOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericOperationMetadata) String() string { @@ -74,7 +72,7 @@ func (*GenericOperationMetadata) ProtoMessage() {} func (x *GenericOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type DeleteOperationMetadata struct { func (x *DeleteOperationMetadata) Reset() { *x = DeleteOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationMetadata) String() string { @@ -137,7 +133,7 @@ func (*DeleteOperationMetadata) ProtoMessage() {} func (x *DeleteOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,32 +245,6 @@ func file_google_cloud_aiplatform_v1beta1_operation_proto_init() { if File_google_cloud_aiplatform_v1beta1_operation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenericOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/persistent_resource.pb.go b/aiplatform/apiv1beta1/aiplatformpb/persistent_resource.pb.go index 29f5f172c8ab..4fa86814996a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/persistent_resource.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/persistent_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/persistent_resource.proto @@ -193,11 +193,9 @@ type PersistentResource struct { func (x *PersistentResource) Reset() { *x = PersistentResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistentResource) String() string { @@ -208,7 +206,7 @@ func (*PersistentResource) ProtoMessage() {} func (x *PersistentResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type ResourcePool struct { func (x *ResourcePool) Reset() { *x = ResourcePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePool) String() string { @@ -383,7 +379,7 @@ func (*ResourcePool) ProtoMessage() {} func (x *ResourcePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +455,9 @@ type ResourceRuntimeSpec struct { func (x *ResourceRuntimeSpec) Reset() { *x = ResourceRuntimeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRuntimeSpec) String() string { @@ -474,7 +468,7 @@ func (*ResourceRuntimeSpec) ProtoMessage() {} func (x *ResourceRuntimeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +539,9 @@ type RaySpec struct { func (x *RaySpec) Reset() { *x = RaySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RaySpec) String() string { @@ -560,7 +552,7 @@ func (*RaySpec) ProtoMessage() {} func (x *RaySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +636,9 @@ type ResourceRuntime struct { func (x *ResourceRuntime) Reset() { *x = ResourceRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRuntime) String() string { @@ -659,7 +649,7 @@ func (*ResourceRuntime) ProtoMessage() {} func (x *ResourceRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +706,9 @@ type ServiceAccountSpec struct { func (x *ServiceAccountSpec) Reset() { *x = ServiceAccountSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccountSpec) String() string { @@ -731,7 +719,7 @@ func (*ServiceAccountSpec) ProtoMessage() {} func (x *ServiceAccountSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +760,9 @@ type RayMetricSpec struct { func (x *RayMetricSpec) Reset() { *x = RayMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayMetricSpec) String() string { @@ -787,7 +773,7 @@ func (*RayMetricSpec) ProtoMessage() {} func (x *RayMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +807,9 @@ type RayLogsSpec struct { func (x *RayLogsSpec) Reset() { *x = RayLogsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayLogsSpec) String() string { @@ -836,7 +820,7 @@ func (*RayLogsSpec) ProtoMessage() {} func (x *RayLogsSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,11 +864,9 @@ type ResourcePool_AutoscalingSpec struct { func (x *ResourcePool_AutoscalingSpec) Reset() { *x = ResourcePool_AutoscalingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePool_AutoscalingSpec) String() string { @@ -895,7 +877,7 @@ func (*ResourcePool_AutoscalingSpec) ProtoMessage() {} func (x *ResourcePool_AutoscalingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,116 +1239,6 @@ func file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_init() { file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PersistentResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRuntimeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RaySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccountSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RayMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RayLogsSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePool_AutoscalingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} diff --git a/aiplatform/apiv1beta1/aiplatformpb/persistent_resource_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/persistent_resource_service.pb.go index eef6cb988678..a7b6007ab7a6 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/persistent_resource_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/persistent_resource_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/persistent_resource_service.proto @@ -65,11 +65,9 @@ type CreatePersistentResourceRequest struct { func (x *CreatePersistentResourceRequest) Reset() { *x = CreatePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePersistentResourceRequest) String() string { @@ -80,7 +78,7 @@ func (*CreatePersistentResourceRequest) ProtoMessage() {} func (x *CreatePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,11 +128,9 @@ type CreatePersistentResourceOperationMetadata struct { func (x *CreatePersistentResourceOperationMetadata) Reset() { *x = CreatePersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePersistentResourceOperationMetadata) String() string { @@ -145,7 +141,7 @@ func (*CreatePersistentResourceOperationMetadata) ProtoMessage() {} func (x *CreatePersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +184,9 @@ type UpdatePersistentResourceOperationMetadata struct { func (x *UpdatePersistentResourceOperationMetadata) Reset() { *x = UpdatePersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePersistentResourceOperationMetadata) String() string { @@ -203,7 +197,7 @@ func (*UpdatePersistentResourceOperationMetadata) ProtoMessage() {} func (x *UpdatePersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +240,9 @@ type RebootPersistentResourceOperationMetadata struct { func (x *RebootPersistentResourceOperationMetadata) Reset() { *x = RebootPersistentResourceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebootPersistentResourceOperationMetadata) String() string { @@ -261,7 +253,7 @@ func (*RebootPersistentResourceOperationMetadata) ProtoMessage() {} func (x *RebootPersistentResourceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type GetPersistentResourceRequest struct { func (x *GetPersistentResourceRequest) Reset() { *x = GetPersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPersistentResourceRequest) String() string { @@ -320,7 +310,7 @@ func (*GetPersistentResourceRequest) ProtoMessage() {} func (x *GetPersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +352,9 @@ type ListPersistentResourcesRequest struct { func (x *ListPersistentResourcesRequest) Reset() { *x = ListPersistentResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPersistentResourcesRequest) String() string { @@ -377,7 +365,7 @@ func (*ListPersistentResourcesRequest) ProtoMessage() {} func (x *ListPersistentResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +418,9 @@ type ListPersistentResourcesResponse struct { func (x *ListPersistentResourcesResponse) Reset() { *x = ListPersistentResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPersistentResourcesResponse) String() string { @@ -445,7 +431,7 @@ func (*ListPersistentResourcesResponse) ProtoMessage() {} func (x *ListPersistentResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +475,9 @@ type DeletePersistentResourceRequest struct { func (x *DeletePersistentResourceRequest) Reset() { *x = DeletePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePersistentResourceRequest) String() string { @@ -504,7 +488,7 @@ func (*DeletePersistentResourceRequest) ProtoMessage() {} func (x *DeletePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +529,9 @@ type UpdatePersistentResourceRequest struct { func (x *UpdatePersistentResourceRequest) Reset() { *x = UpdatePersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePersistentResourceRequest) String() string { @@ -560,7 +542,7 @@ func (*UpdatePersistentResourceRequest) ProtoMessage() {} func (x *UpdatePersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +586,9 @@ type RebootPersistentResourceRequest struct { func (x *RebootPersistentResourceRequest) Reset() { *x = RebootPersistentResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebootPersistentResourceRequest) String() string { @@ -619,7 +599,7 @@ func (*RebootPersistentResourceRequest) ProtoMessage() {} func (x *RebootPersistentResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,128 +951,6 @@ func file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_init } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_persistent_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreatePersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RebootPersistentResourceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetPersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPersistentResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPersistentResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeletePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_persistent_resource_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RebootPersistentResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/pipeline_failure_policy.pb.go b/aiplatform/apiv1beta1/aiplatformpb/pipeline_failure_policy.pb.go index 8200dbe9462c..fe299c390045 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/pipeline_failure_policy.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/pipeline_failure_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto diff --git a/aiplatform/apiv1beta1/aiplatformpb/pipeline_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/pipeline_job.pb.go index 9ebc8f721e0d..8901b45ef906 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/pipeline_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/pipeline_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/pipeline_job.proto @@ -291,11 +291,9 @@ type PipelineJob struct { func (x *PipelineJob) Reset() { *x = PipelineJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob) String() string { @@ -306,7 +304,7 @@ func (*PipelineJob) ProtoMessage() {} func (x *PipelineJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +515,9 @@ type PipelineTemplateMetadata struct { func (x *PipelineTemplateMetadata) Reset() { *x = PipelineTemplateMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTemplateMetadata) String() string { @@ -532,7 +528,7 @@ func (*PipelineTemplateMetadata) ProtoMessage() {} func (x *PipelineTemplateMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +566,9 @@ type PipelineJobDetail struct { func (x *PipelineJobDetail) Reset() { *x = PipelineJobDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJobDetail) String() string { @@ -585,7 +579,7 @@ func (*PipelineJobDetail) ProtoMessage() {} func (x *PipelineJobDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +655,9 @@ type PipelineTaskDetail struct { func (x *PipelineTaskDetail) Reset() { *x = PipelineTaskDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail) String() string { @@ -676,7 +668,7 @@ func (*PipelineTaskDetail) ProtoMessage() {} func (x *PipelineTaskDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +789,9 @@ type PipelineTaskExecutorDetail struct { func (x *PipelineTaskExecutorDetail) Reset() { *x = PipelineTaskExecutorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail) String() string { @@ -812,7 +802,7 @@ func (*PipelineTaskExecutorDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +878,9 @@ type PipelineTaskRerunConfig struct { func (x *PipelineTaskRerunConfig) Reset() { *x = PipelineTaskRerunConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskRerunConfig) String() string { @@ -903,7 +891,7 @@ func (*PipelineTaskRerunConfig) ProtoMessage() {} func (x *PipelineTaskRerunConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +993,9 @@ type PipelineJob_RuntimeConfig struct { func (x *PipelineJob_RuntimeConfig) Reset() { *x = PipelineJob_RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig) String() string { @@ -1020,7 +1006,7 @@ func (*PipelineJob_RuntimeConfig) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,11 +1078,9 @@ type PipelineJob_RuntimeConfig_InputArtifact struct { func (x *PipelineJob_RuntimeConfig_InputArtifact) Reset() { *x = PipelineJob_RuntimeConfig_InputArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig_InputArtifact) String() string { @@ -1107,7 +1091,7 @@ func (*PipelineJob_RuntimeConfig_InputArtifact) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig_InputArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,11 +1157,9 @@ type PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail struct { func (x *PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail) Reset() { *x = PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail) String() string { @@ -1188,7 +1170,7 @@ func (*PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail) ProtoMessage() func (x *PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1220,9 @@ type PipelineJob_RuntimeConfig_DefaultRuntime struct { func (x *PipelineJob_RuntimeConfig_DefaultRuntime) Reset() { *x = PipelineJob_RuntimeConfig_DefaultRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig_DefaultRuntime) String() string { @@ -1253,7 +1233,7 @@ func (*PipelineJob_RuntimeConfig_DefaultRuntime) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig_DefaultRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,11 +1294,9 @@ type PipelineTaskDetail_PipelineTaskStatus struct { func (x *PipelineTaskDetail_PipelineTaskStatus) Reset() { *x = PipelineTaskDetail_PipelineTaskStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail_PipelineTaskStatus) String() string { @@ -1329,7 +1307,7 @@ func (*PipelineTaskDetail_PipelineTaskStatus) ProtoMessage() {} func (x *PipelineTaskDetail_PipelineTaskStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1355,9 @@ type PipelineTaskDetail_ArtifactList struct { func (x *PipelineTaskDetail_ArtifactList) Reset() { *x = PipelineTaskDetail_ArtifactList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail_ArtifactList) String() string { @@ -1392,7 +1368,7 @@ func (*PipelineTaskDetail_ArtifactList) ProtoMessage() {} func (x *PipelineTaskDetail_ArtifactList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,11 +1423,9 @@ type PipelineTaskExecutorDetail_ContainerDetail struct { func (x *PipelineTaskExecutorDetail_ContainerDetail) Reset() { *x = PipelineTaskExecutorDetail_ContainerDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail_ContainerDetail) String() string { @@ -1462,7 +1436,7 @@ func (*PipelineTaskExecutorDetail_ContainerDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail_ContainerDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1522,11 +1496,9 @@ type PipelineTaskExecutorDetail_CustomJobDetail struct { func (x *PipelineTaskExecutorDetail_CustomJobDetail) Reset() { *x = PipelineTaskExecutorDetail_CustomJobDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail_CustomJobDetail) String() string { @@ -1537,7 +1509,7 @@ func (*PipelineTaskExecutorDetail_CustomJobDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail_CustomJobDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1550,9 @@ type PipelineTaskRerunConfig_ArtifactList struct { func (x *PipelineTaskRerunConfig_ArtifactList) Reset() { *x = PipelineTaskRerunConfig_ArtifactList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskRerunConfig_ArtifactList) String() string { @@ -1593,7 +1563,7 @@ func (*PipelineTaskRerunConfig_ArtifactList) ProtoMessage() {} func (x *PipelineTaskRerunConfig_ArtifactList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,11 +1599,9 @@ type PipelineTaskRerunConfig_Inputs struct { func (x *PipelineTaskRerunConfig_Inputs) Reset() { *x = PipelineTaskRerunConfig_Inputs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskRerunConfig_Inputs) String() string { @@ -1644,7 +1612,7 @@ func (*PipelineTaskRerunConfig_Inputs) ProtoMessage() {} func (x *PipelineTaskRerunConfig_Inputs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2324,200 +2292,6 @@ func file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_init() { file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_init() file_google_cloud_aiplatform_v1beta1_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTemplateMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJobDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskRerunConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig_InputArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig_PersistentResourceRuntimeDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PipelineJob_RuntimeConfig_DefaultRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail_PipelineTaskStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskDetail_ArtifactList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail_ContainerDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskExecutorDetail_CustomJobDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskRerunConfig_ArtifactList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PipelineTaskRerunConfig_Inputs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_msgTypes[4].OneofWrappers = []any{ (*PipelineTaskExecutorDetail_ContainerDetail_)(nil), (*PipelineTaskExecutorDetail_CustomJobDetail_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/pipeline_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/pipeline_service.pb.go index 6ab0d261d75f..8a33f964c891 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/pipeline_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/pipeline_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/pipeline_service.proto @@ -56,11 +56,9 @@ type BatchCancelPipelineJobsOperationMetadata struct { func (x *BatchCancelPipelineJobsOperationMetadata) Reset() { *x = BatchCancelPipelineJobsOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsOperationMetadata) String() string { @@ -71,7 +69,7 @@ func (*BatchCancelPipelineJobsOperationMetadata) ProtoMessage() {} func (x *BatchCancelPipelineJobsOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type CreateTrainingPipelineRequest struct { func (x *CreateTrainingPipelineRequest) Reset() { *x = CreateTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTrainingPipelineRequest) String() string { @@ -124,7 +120,7 @@ func (*CreateTrainingPipelineRequest) ProtoMessage() {} func (x *CreateTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetTrainingPipelineRequest struct { func (x *GetTrainingPipelineRequest) Reset() { *x = GetTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTrainingPipelineRequest) String() string { @@ -183,7 +177,7 @@ func (*GetTrainingPipelineRequest) ProtoMessage() {} func (x *GetTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type ListTrainingPipelinesRequest struct { func (x *ListTrainingPipelinesRequest) Reset() { *x = ListTrainingPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrainingPipelinesRequest) String() string { @@ -266,7 +258,7 @@ func (*ListTrainingPipelinesRequest) ProtoMessage() {} func (x *ListTrainingPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type ListTrainingPipelinesResponse struct { func (x *ListTrainingPipelinesResponse) Reset() { *x = ListTrainingPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrainingPipelinesResponse) String() string { @@ -349,7 +339,7 @@ func (*ListTrainingPipelinesResponse) ProtoMessage() {} func (x *ListTrainingPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +383,9 @@ type DeleteTrainingPipelineRequest struct { func (x *DeleteTrainingPipelineRequest) Reset() { *x = DeleteTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTrainingPipelineRequest) String() string { @@ -408,7 +396,7 @@ func (*DeleteTrainingPipelineRequest) ProtoMessage() {} func (x *DeleteTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +433,9 @@ type CancelTrainingPipelineRequest struct { func (x *CancelTrainingPipelineRequest) Reset() { *x = CancelTrainingPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelTrainingPipelineRequest) String() string { @@ -460,7 +446,7 @@ func (*CancelTrainingPipelineRequest) ProtoMessage() {} func (x *CancelTrainingPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type CreatePipelineJobRequest struct { func (x *CreatePipelineJobRequest) Reset() { *x = CreatePipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineJobRequest) String() string { @@ -520,7 +504,7 @@ func (*CreatePipelineJobRequest) ProtoMessage() {} func (x *CreatePipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +555,9 @@ type GetPipelineJobRequest struct { func (x *GetPipelineJobRequest) Reset() { *x = GetPipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineJobRequest) String() string { @@ -586,7 +568,7 @@ func (*GetPipelineJobRequest) ProtoMessage() {} func (x *GetPipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +664,9 @@ type ListPipelineJobsRequest struct { func (x *ListPipelineJobsRequest) Reset() { *x = ListPipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineJobsRequest) String() string { @@ -697,7 +677,7 @@ func (*ListPipelineJobsRequest) ProtoMessage() {} func (x *ListPipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +752,9 @@ type ListPipelineJobsResponse struct { func (x *ListPipelineJobsResponse) Reset() { *x = ListPipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineJobsResponse) String() string { @@ -787,7 +765,7 @@ func (*ListPipelineJobsResponse) ProtoMessage() {} func (x *ListPipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +809,9 @@ type DeletePipelineJobRequest struct { func (x *DeletePipelineJobRequest) Reset() { *x = DeletePipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineJobRequest) String() string { @@ -846,7 +822,7 @@ func (*DeletePipelineJobRequest) ProtoMessage() {} func (x *DeletePipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +863,9 @@ type BatchDeletePipelineJobsRequest struct { func (x *BatchDeletePipelineJobsRequest) Reset() { *x = BatchDeletePipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePipelineJobsRequest) String() string { @@ -902,7 +876,7 @@ func (*BatchDeletePipelineJobsRequest) ProtoMessage() {} func (x *BatchDeletePipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -944,11 +918,9 @@ type BatchDeletePipelineJobsResponse struct { func (x *BatchDeletePipelineJobsResponse) Reset() { *x = BatchDeletePipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePipelineJobsResponse) String() string { @@ -959,7 +931,7 @@ func (*BatchDeletePipelineJobsResponse) ProtoMessage() {} func (x *BatchDeletePipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +968,9 @@ type CancelPipelineJobRequest struct { func (x *CancelPipelineJobRequest) Reset() { *x = CancelPipelineJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelPipelineJobRequest) String() string { @@ -1011,7 +981,7 @@ func (*CancelPipelineJobRequest) ProtoMessage() {} func (x *CancelPipelineJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1022,9 @@ type BatchCancelPipelineJobsRequest struct { func (x *BatchCancelPipelineJobsRequest) Reset() { *x = BatchCancelPipelineJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsRequest) String() string { @@ -1067,7 +1035,7 @@ func (*BatchCancelPipelineJobsRequest) ProtoMessage() {} func (x *BatchCancelPipelineJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1077,9 @@ type BatchCancelPipelineJobsResponse struct { func (x *BatchCancelPipelineJobsResponse) Reset() { *x = BatchCancelPipelineJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCancelPipelineJobsResponse) String() string { @@ -1124,7 +1090,7 @@ func (*BatchCancelPipelineJobsResponse) ProtoMessage() {} func (x *BatchCancelPipelineJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,212 +1590,6 @@ func file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_init() { file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_pipeline_job_proto_init() file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTrainingPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTrainingPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CancelTrainingPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetPipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeletePipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CancelPipelineJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchCancelPipelineJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/pipeline_state.pb.go b/aiplatform/apiv1beta1/aiplatformpb/pipeline_state.pb.go index 33d3eb804008..1acee108c263 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/pipeline_state.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/pipeline_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/pipeline_state.proto diff --git a/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go index 223466bf1345..4cd502a9f467 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -136,11 +136,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -151,7 +149,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +218,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -235,7 +231,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +319,9 @@ type RawPredictRequest struct { func (x *RawPredictRequest) Reset() { *x = RawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawPredictRequest) String() string { @@ -338,7 +332,7 @@ func (*RawPredictRequest) ProtoMessage() {} func (x *RawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +378,9 @@ type StreamRawPredictRequest struct { func (x *StreamRawPredictRequest) Reset() { *x = StreamRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamRawPredictRequest) String() string { @@ -399,7 +391,7 @@ func (*StreamRawPredictRequest) ProtoMessage() {} func (x *StreamRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +439,9 @@ type DirectPredictRequest struct { func (x *DirectPredictRequest) Reset() { *x = DirectPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectPredictRequest) String() string { @@ -462,7 +452,7 @@ func (*DirectPredictRequest) ProtoMessage() {} func (x *DirectPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,11 +503,9 @@ type DirectPredictResponse struct { func (x *DirectPredictResponse) Reset() { *x = DirectPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectPredictResponse) String() string { @@ -528,7 +516,7 @@ func (*DirectPredictResponse) ProtoMessage() {} func (x *DirectPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +570,9 @@ type DirectRawPredictRequest struct { func (x *DirectRawPredictRequest) Reset() { *x = DirectRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectRawPredictRequest) String() string { @@ -597,7 +583,7 @@ func (*DirectRawPredictRequest) ProtoMessage() {} func (x *DirectRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +632,9 @@ type DirectRawPredictResponse struct { func (x *DirectRawPredictResponse) Reset() { *x = DirectRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectRawPredictResponse) String() string { @@ -661,7 +645,7 @@ func (*DirectRawPredictResponse) ProtoMessage() {} func (x *DirectRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +691,9 @@ type StreamDirectPredictRequest struct { func (x *StreamDirectPredictRequest) Reset() { *x = StreamDirectPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectPredictRequest) String() string { @@ -722,7 +704,7 @@ func (*StreamDirectPredictRequest) ProtoMessage() {} func (x *StreamDirectPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +755,9 @@ type StreamDirectPredictResponse struct { func (x *StreamDirectPredictResponse) Reset() { *x = StreamDirectPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectPredictResponse) String() string { @@ -788,7 +768,7 @@ func (*StreamDirectPredictResponse) ProtoMessage() {} func (x *StreamDirectPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,11 +833,9 @@ type StreamDirectRawPredictRequest struct { func (x *StreamDirectRawPredictRequest) Reset() { *x = StreamDirectRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectRawPredictRequest) String() string { @@ -868,7 +846,7 @@ func (*StreamDirectRawPredictRequest) ProtoMessage() {} func (x *StreamDirectRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -917,11 +895,9 @@ type StreamDirectRawPredictResponse struct { func (x *StreamDirectRawPredictResponse) Reset() { *x = StreamDirectRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamDirectRawPredictResponse) String() string { @@ -932,7 +908,7 @@ func (*StreamDirectRawPredictResponse) ProtoMessage() {} func (x *StreamDirectRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +954,9 @@ type StreamingPredictRequest struct { func (x *StreamingPredictRequest) Reset() { *x = StreamingPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPredictRequest) String() string { @@ -993,7 +967,7 @@ func (*StreamingPredictRequest) ProtoMessage() {} func (x *StreamingPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1018,9 @@ type StreamingPredictResponse struct { func (x *StreamingPredictResponse) Reset() { *x = StreamingPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPredictResponse) String() string { @@ -1059,7 +1031,7 @@ func (*StreamingPredictResponse) ProtoMessage() {} func (x *StreamingPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1096,9 @@ type StreamingRawPredictRequest struct { func (x *StreamingRawPredictRequest) Reset() { *x = StreamingRawPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRawPredictRequest) String() string { @@ -1139,7 +1109,7 @@ func (*StreamingRawPredictRequest) ProtoMessage() {} func (x *StreamingRawPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1158,9 @@ type StreamingRawPredictResponse struct { func (x *StreamingRawPredictResponse) Reset() { *x = StreamingRawPredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRawPredictResponse) String() string { @@ -1203,7 +1171,7 @@ func (*StreamingRawPredictResponse) ProtoMessage() {} func (x *StreamingRawPredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1278,11 +1246,9 @@ type ExplainRequest struct { func (x *ExplainRequest) Reset() { *x = ExplainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainRequest) String() string { @@ -1293,7 +1259,7 @@ func (*ExplainRequest) ProtoMessage() {} func (x *ExplainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1343,9 @@ type ExplainResponse struct { func (x *ExplainResponse) Reset() { *x = ExplainResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainResponse) String() string { @@ -1392,7 +1356,7 @@ func (*ExplainResponse) ProtoMessage() {} func (x *ExplainResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1473,11 +1437,9 @@ type CountTokensRequest struct { func (x *CountTokensRequest) Reset() { *x = CountTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensRequest) String() string { @@ -1488,7 +1450,7 @@ func (*CountTokensRequest) ProtoMessage() {} func (x *CountTokensRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1530,9 @@ type CountTokensResponse struct { func (x *CountTokensResponse) Reset() { *x = CountTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CountTokensResponse) String() string { @@ -1583,7 +1543,7 @@ func (*CountTokensResponse) ProtoMessage() {} func (x *CountTokensResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1670,11 +1630,9 @@ type GenerateContentRequest struct { func (x *GenerateContentRequest) Reset() { *x = GenerateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentRequest) String() string { @@ -1685,7 +1643,7 @@ func (*GenerateContentRequest) ProtoMessage() {} func (x *GenerateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1783,11 +1741,9 @@ type GenerateContentResponse struct { func (x *GenerateContentResponse) Reset() { *x = GenerateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse) String() string { @@ -1798,7 +1754,7 @@ func (*GenerateContentResponse) ProtoMessage() {} func (x *GenerateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1858,11 +1814,9 @@ type ChatCompletionsRequest struct { func (x *ChatCompletionsRequest) Reset() { *x = ChatCompletionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChatCompletionsRequest) String() string { @@ -1873,7 +1827,7 @@ func (*ChatCompletionsRequest) ProtoMessage() {} func (x *ChatCompletionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1872,9 @@ type PredictLongRunningResponse struct { func (x *PredictLongRunningResponse) Reset() { *x = PredictLongRunningResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictLongRunningResponse) String() string { @@ -1933,7 +1885,7 @@ func (*PredictLongRunningResponse) ProtoMessage() {} func (x *PredictLongRunningResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1934,9 @@ type PredictLongRunningMetadata struct { func (x *PredictLongRunningMetadata) Reset() { *x = PredictLongRunningMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictLongRunningMetadata) String() string { @@ -1997,7 +1947,7 @@ func (*PredictLongRunningMetadata) ProtoMessage() {} func (x *PredictLongRunningMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2028,11 +1978,9 @@ type GenerateVideoResponse struct { func (x *GenerateVideoResponse) Reset() { *x = GenerateVideoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateVideoResponse) String() string { @@ -2043,7 +1991,7 @@ func (*GenerateVideoResponse) ProtoMessage() {} func (x *GenerateVideoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2096,11 +2044,9 @@ type ExplainResponse_ConcurrentExplanation struct { func (x *ExplainResponse_ConcurrentExplanation) Reset() { *x = ExplainResponse_ConcurrentExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainResponse_ConcurrentExplanation) String() string { @@ -2111,7 +2057,7 @@ func (*ExplainResponse_ConcurrentExplanation) ProtoMessage() {} func (x *ExplainResponse_ConcurrentExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2149,11 +2095,9 @@ type GenerateContentResponse_PromptFeedback struct { func (x *GenerateContentResponse_PromptFeedback) Reset() { *x = GenerateContentResponse_PromptFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_PromptFeedback) String() string { @@ -2164,7 +2108,7 @@ func (*GenerateContentResponse_PromptFeedback) ProtoMessage() {} func (x *GenerateContentResponse_PromptFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2221,11 +2165,9 @@ type GenerateContentResponse_UsageMetadata struct { func (x *GenerateContentResponse_UsageMetadata) Reset() { *x = GenerateContentResponse_UsageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateContentResponse_UsageMetadata) String() string { @@ -2236,7 +2178,7 @@ func (*GenerateContentResponse_UsageMetadata) ProtoMessage() {} func (x *GenerateContentResponse_UsageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3188,356 +3130,6 @@ func file_google_cloud_aiplatform_v1beta1_prediction_service_proto_init() { file_google_cloud_aiplatform_v1beta1_explanation_proto_init() file_google_cloud_aiplatform_v1beta1_tool_proto_init() file_google_cloud_aiplatform_v1beta1_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DirectPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DirectPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DirectRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DirectRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StreamDirectRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRawPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRawPredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExplainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExplainResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CountTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ChatCompletionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PredictLongRunningResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PredictLongRunningMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GenerateVideoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExplainResponse_ConcurrentExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_PromptFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GenerateContentResponse_UsageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[18].OneofWrappers = []any{} file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[20].OneofWrappers = []any{} file_google_cloud_aiplatform_v1beta1_prediction_service_proto_msgTypes[23].OneofWrappers = []any{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go b/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go index 36c5ee75e5db..f891e3c6bcfc 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/publisher_model.proto @@ -263,11 +263,9 @@ type PublisherModel struct { func (x *PublisherModel) Reset() { *x = PublisherModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel) String() string { @@ -278,7 +276,7 @@ func (*PublisherModel) ProtoMessage() {} func (x *PublisherModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +378,9 @@ type PublisherModel_ResourceReference struct { func (x *PublisherModel_ResourceReference) Reset() { *x = PublisherModel_ResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_ResourceReference) String() string { @@ -395,7 +391,7 @@ func (*PublisherModel_ResourceReference) ProtoMessage() {} func (x *PublisherModel_ResourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +495,9 @@ type PublisherModel_Parent struct { func (x *PublisherModel_Parent) Reset() { *x = PublisherModel_Parent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_Parent) String() string { @@ -514,7 +508,7 @@ func (*PublisherModel_Parent) ProtoMessage() {} func (x *PublisherModel_Parent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +552,9 @@ type PublisherModel_Documentation struct { func (x *PublisherModel_Documentation) Reset() { *x = PublisherModel_Documentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_Documentation) String() string { @@ -573,7 +565,7 @@ func (*PublisherModel_Documentation) ProtoMessage() {} func (x *PublisherModel_Documentation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +630,9 @@ type PublisherModel_CallToAction struct { func (x *PublisherModel_CallToAction) Reset() { *x = PublisherModel_CallToAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction) String() string { @@ -653,7 +643,7 @@ func (*PublisherModel_CallToAction) ProtoMessage() {} func (x *PublisherModel_CallToAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +770,9 @@ type PublisherModel_CallToAction_RegionalResourceReferences struct { func (x *PublisherModel_CallToAction_RegionalResourceReferences) Reset() { *x = PublisherModel_CallToAction_RegionalResourceReferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_RegionalResourceReferences) String() string { @@ -795,7 +783,7 @@ func (*PublisherModel_CallToAction_RegionalResourceReferences) ProtoMessage() {} func (x *PublisherModel_CallToAction_RegionalResourceReferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +847,9 @@ type PublisherModel_CallToAction_ViewRestApi struct { func (x *PublisherModel_CallToAction_ViewRestApi) Reset() { *x = PublisherModel_CallToAction_ViewRestApi{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_ViewRestApi) String() string { @@ -874,7 +860,7 @@ func (*PublisherModel_CallToAction_ViewRestApi) ProtoMessage() {} func (x *PublisherModel_CallToAction_ViewRestApi) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +901,9 @@ type PublisherModel_CallToAction_OpenNotebooks struct { func (x *PublisherModel_CallToAction_OpenNotebooks) Reset() { *x = PublisherModel_CallToAction_OpenNotebooks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_OpenNotebooks) String() string { @@ -930,7 +914,7 @@ func (*PublisherModel_CallToAction_OpenNotebooks) ProtoMessage() {} func (x *PublisherModel_CallToAction_OpenNotebooks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +948,9 @@ type PublisherModel_CallToAction_OpenFineTuningPipelines struct { func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) Reset() { *x = PublisherModel_CallToAction_OpenFineTuningPipelines{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) String() string { @@ -979,7 +961,7 @@ func (*PublisherModel_CallToAction_OpenFineTuningPipelines) ProtoMessage() {} func (x *PublisherModel_CallToAction_OpenFineTuningPipelines) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1042,11 +1024,9 @@ type PublisherModel_CallToAction_Deploy struct { func (x *PublisherModel_CallToAction_Deploy) Reset() { *x = PublisherModel_CallToAction_Deploy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_Deploy) String() string { @@ -1057,7 +1037,7 @@ func (*PublisherModel_CallToAction_Deploy) ProtoMessage() {} func (x *PublisherModel_CallToAction_Deploy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1180,9 @@ type PublisherModel_CallToAction_DeployGke struct { func (x *PublisherModel_CallToAction_DeployGke) Reset() { *x = PublisherModel_CallToAction_DeployGke{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_DeployGke) String() string { @@ -1215,7 +1193,7 @@ func (*PublisherModel_CallToAction_DeployGke) ProtoMessage() {} func (x *PublisherModel_CallToAction_DeployGke) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1253,11 +1231,9 @@ type PublisherModel_CallToAction_Deploy_DeployMetadata struct { func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) Reset() { *x = PublisherModel_CallToAction_Deploy_DeployMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) String() string { @@ -1268,7 +1244,7 @@ func (*PublisherModel_CallToAction_Deploy_DeployMetadata) ProtoMessage() {} func (x *PublisherModel_CallToAction_Deploy_DeployMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1779,152 +1755,6 @@ func file_google_cloud_aiplatform_v1beta1_publisher_model_proto_init() { } file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() file_google_cloud_aiplatform_v1beta1_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_ResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_Parent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_Documentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_RegionalResourceReferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_ViewRestApi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_OpenNotebooks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_OpenFineTuningPipelines); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_Deploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_DeployGke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PublisherModel_CallToAction_Deploy_DeployMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1].OneofWrappers = []any{ (*PublisherModel_ResourceReference_Uri)(nil), (*PublisherModel_ResourceReference_ResourceName)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go index deb69e6e0a78..9b10fea0d7af 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/reasoning_engine.proto @@ -53,11 +53,9 @@ type ReasoningEngineSpec struct { func (x *ReasoningEngineSpec) Reset() { *x = ReasoningEngineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReasoningEngineSpec) String() string { @@ -68,7 +66,7 @@ func (*ReasoningEngineSpec) ProtoMessage() {} func (x *ReasoningEngineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type ReasoningEngine struct { func (x *ReasoningEngine) Reset() { *x = ReasoningEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReasoningEngine) String() string { @@ -138,7 +134,7 @@ func (*ReasoningEngine) ProtoMessage() {} func (x *ReasoningEngine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type ReasoningEngineSpec_PackageSpec struct { func (x *ReasoningEngineSpec_PackageSpec) Reset() { *x = ReasoningEngineSpec_PackageSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReasoningEngineSpec_PackageSpec) String() string { @@ -236,7 +230,7 @@ func (*ReasoningEngineSpec_PackageSpec) ProtoMessage() {} func (x *ReasoningEngineSpec_PackageSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,44 +405,6 @@ func file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_init() { if File_google_cloud_aiplatform_v1beta1_reasoning_engine_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReasoningEngineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReasoningEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReasoningEngineSpec_PackageSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go index 9b4d79a40132..52d7bd7defba 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto @@ -62,11 +62,9 @@ type QueryReasoningEngineRequest struct { func (x *QueryReasoningEngineRequest) Reset() { *x = QueryReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryReasoningEngineRequest) String() string { @@ -77,7 +75,7 @@ func (*QueryReasoningEngineRequest) ProtoMessage() {} func (x *QueryReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +123,9 @@ type QueryReasoningEngineResponse struct { func (x *QueryReasoningEngineResponse) Reset() { *x = QueryReasoningEngineResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryReasoningEngineResponse) String() string { @@ -140,7 +136,7 @@ func (*QueryReasoningEngineResponse) ProtoMessage() {} func (x *QueryReasoningEngineResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +178,9 @@ type StreamQueryReasoningEngineRequest struct { func (x *StreamQueryReasoningEngineRequest) Reset() { *x = StreamQueryReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamQueryReasoningEngineRequest) String() string { @@ -197,7 +191,7 @@ func (*StreamQueryReasoningEngineRequest) ProtoMessage() {} func (x *StreamQueryReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,44 +371,6 @@ func file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_pro if File_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*QueryReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QueryReasoningEngineResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StreamQueryReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go index 14222962d037..a671df277ea3 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto @@ -59,11 +59,9 @@ type CreateReasoningEngineRequest struct { func (x *CreateReasoningEngineRequest) Reset() { *x = CreateReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReasoningEngineRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateReasoningEngineRequest) ProtoMessage() {} func (x *CreateReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type CreateReasoningEngineOperationMetadata struct { func (x *CreateReasoningEngineOperationMetadata) Reset() { *x = CreateReasoningEngineOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReasoningEngineOperationMetadata) String() string { @@ -132,7 +128,7 @@ func (*CreateReasoningEngineOperationMetadata) ProtoMessage() {} func (x *CreateReasoningEngineOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +165,9 @@ type GetReasoningEngineRequest struct { func (x *GetReasoningEngineRequest) Reset() { *x = GetReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReasoningEngineRequest) String() string { @@ -184,7 +178,7 @@ func (*GetReasoningEngineRequest) ProtoMessage() {} func (x *GetReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +215,9 @@ type UpdateReasoningEngineRequest struct { func (x *UpdateReasoningEngineRequest) Reset() { *x = UpdateReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReasoningEngineRequest) String() string { @@ -236,7 +228,7 @@ func (*UpdateReasoningEngineRequest) ProtoMessage() {} func (x *UpdateReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +271,9 @@ type UpdateReasoningEngineOperationMetadata struct { func (x *UpdateReasoningEngineOperationMetadata) Reset() { *x = UpdateReasoningEngineOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReasoningEngineOperationMetadata) String() string { @@ -294,7 +284,7 @@ func (*UpdateReasoningEngineOperationMetadata) ProtoMessage() {} func (x *UpdateReasoningEngineOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,11 +327,9 @@ type ListReasoningEnginesRequest struct { func (x *ListReasoningEnginesRequest) Reset() { *x = ListReasoningEnginesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReasoningEnginesRequest) String() string { @@ -352,7 +340,7 @@ func (*ListReasoningEnginesRequest) ProtoMessage() {} func (x *ListReasoningEnginesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +401,9 @@ type ListReasoningEnginesResponse struct { func (x *ListReasoningEnginesResponse) Reset() { *x = ListReasoningEnginesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReasoningEnginesResponse) String() string { @@ -428,7 +414,7 @@ func (*ListReasoningEnginesResponse) ProtoMessage() {} func (x *ListReasoningEnginesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +458,9 @@ type DeleteReasoningEngineRequest struct { func (x *DeleteReasoningEngineRequest) Reset() { *x = DeleteReasoningEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReasoningEngineRequest) String() string { @@ -487,7 +471,7 @@ func (*DeleteReasoningEngineRequest) ProtoMessage() {} func (x *DeleteReasoningEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,104 +764,6 @@ func file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_init() } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateReasoningEngineOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReasoningEngineOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListReasoningEnginesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListReasoningEnginesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReasoningEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/reservation_affinity.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reservation_affinity.pb.go index e237a9fbc73d..a520fa08ff88 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/reservation_affinity.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/reservation_affinity.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/reservation_affinity.proto @@ -116,11 +116,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -131,7 +129,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,20 +256,6 @@ func file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_init() { if File_google_cloud_aiplatform_v1beta1_reservation_affinity_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/saved_query.pb.go b/aiplatform/apiv1beta1/aiplatformpb/saved_query.pb.go index f371a234dcbe..d767fab8bb75 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/saved_query.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/saved_query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/saved_query.proto @@ -85,11 +85,9 @@ type SavedQuery struct { func (x *SavedQuery) Reset() { *x = SavedQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_saved_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_saved_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedQuery) String() string { @@ -100,7 +98,7 @@ func (*SavedQuery) ProtoMessage() {} func (x *SavedQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_saved_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,20 +289,6 @@ func file_google_cloud_aiplatform_v1beta1_saved_query_proto_init() { if File_google_cloud_aiplatform_v1beta1_saved_query_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_saved_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SavedQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/schedule.pb.go b/aiplatform/apiv1beta1/aiplatformpb/schedule.pb.go index f09505e88c0b..efd9684798f7 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/schedule.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/schedule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/schedule.proto @@ -184,11 +184,9 @@ type Schedule struct { func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -199,7 +197,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +426,9 @@ type Schedule_RunResponse struct { func (x *Schedule_RunResponse) Reset() { *x = Schedule_RunResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule_RunResponse) String() string { @@ -443,7 +439,7 @@ func (*Schedule_RunResponse) ProtoMessage() {} func (x *Schedule_RunResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,32 +672,6 @@ func file_google_cloud_aiplatform_v1beta1_schedule_proto_init() { file_google_cloud_aiplatform_v1beta1_model_monitoring_service_proto_init() file_google_cloud_aiplatform_v1beta1_notebook_service_proto_init() file_google_cloud_aiplatform_v1beta1_pipeline_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Schedule_RunResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_schedule_proto_msgTypes[0].OneofWrappers = []any{ (*Schedule_Cron)(nil), (*Schedule_CreatePipelineJobRequest)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/schedule_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/schedule_service.pb.go index 4056d75d9508..210bc62b9dd0 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/schedule_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/schedule_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/schedule_service.proto @@ -59,11 +59,9 @@ type CreateScheduleRequest struct { func (x *CreateScheduleRequest) Reset() { *x = CreateScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateScheduleRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateScheduleRequest) ProtoMessage() {} func (x *CreateScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetScheduleRequest struct { func (x *GetScheduleRequest) Reset() { *x = GetScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScheduleRequest) String() string { @@ -133,7 +129,7 @@ func (*GetScheduleRequest) ProtoMessage() {} func (x *GetScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type ListSchedulesRequest struct { func (x *ListSchedulesRequest) Reset() { *x = ListSchedulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesRequest) String() string { @@ -242,7 +236,7 @@ func (*ListSchedulesRequest) ProtoMessage() {} func (x *ListSchedulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +304,9 @@ type ListSchedulesResponse struct { func (x *ListSchedulesResponse) Reset() { *x = ListSchedulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesResponse) String() string { @@ -325,7 +317,7 @@ func (*ListSchedulesResponse) ProtoMessage() {} func (x *ListSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +361,9 @@ type DeleteScheduleRequest struct { func (x *DeleteScheduleRequest) Reset() { *x = DeleteScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteScheduleRequest) String() string { @@ -384,7 +374,7 @@ func (*DeleteScheduleRequest) ProtoMessage() {} func (x *DeleteScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +411,9 @@ type PauseScheduleRequest struct { func (x *PauseScheduleRequest) Reset() { *x = PauseScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseScheduleRequest) String() string { @@ -436,7 +424,7 @@ func (*PauseScheduleRequest) ProtoMessage() {} func (x *PauseScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type ResumeScheduleRequest struct { func (x *ResumeScheduleRequest) Reset() { *x = ResumeScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeScheduleRequest) String() string { @@ -494,7 +480,7 @@ func (*ResumeScheduleRequest) ProtoMessage() {} func (x *ResumeScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +530,9 @@ type UpdateScheduleRequest struct { func (x *UpdateScheduleRequest) Reset() { *x = UpdateScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateScheduleRequest) String() string { @@ -559,7 +543,7 @@ func (*UpdateScheduleRequest) ProtoMessage() {} func (x *UpdateScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,104 +838,6 @@ func file_google_cloud_aiplatform_v1beta1_schedule_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_schedule_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PauseScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResumeScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_schedule_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/service_networking.pb.go b/aiplatform/apiv1beta1/aiplatformpb/service_networking.pb.go index f30080f9a722..992eb9003671 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/service_networking.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/service_networking.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/service_networking.proto @@ -56,11 +56,9 @@ type PSCAutomationConfig struct { func (x *PSCAutomationConfig) Reset() { *x = PSCAutomationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PSCAutomationConfig) String() string { @@ -71,7 +69,7 @@ func (*PSCAutomationConfig) ProtoMessage() {} func (x *PSCAutomationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type PrivateServiceConnectConfig struct { func (x *PrivateServiceConnectConfig) Reset() { *x = PrivateServiceConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateServiceConnectConfig) String() string { @@ -139,7 +135,7 @@ func (*PrivateServiceConnectConfig) ProtoMessage() {} func (x *PrivateServiceConnectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +195,9 @@ type PscAutomatedEndpoints struct { func (x *PscAutomatedEndpoints) Reset() { *x = PscAutomatedEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscAutomatedEndpoints) String() string { @@ -214,7 +208,7 @@ func (*PscAutomatedEndpoints) ProtoMessage() {} func (x *PscAutomatedEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +267,9 @@ type PscInterfaceConfig struct { func (x *PscInterfaceConfig) Reset() { *x = PscInterfaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscInterfaceConfig) String() string { @@ -288,7 +280,7 @@ func (*PscInterfaceConfig) ProtoMessage() {} func (x *PscInterfaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,56 +411,6 @@ func file_google_cloud_aiplatform_v1beta1_service_networking_proto_init() { if File_google_cloud_aiplatform_v1beta1_service_networking_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PSCAutomationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PrivateServiceConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PscAutomatedEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_service_networking_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PscInterfaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/specialist_pool.pb.go b/aiplatform/apiv1beta1/aiplatformpb/specialist_pool.pb.go index 4a720487964e..22f126718d7a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/specialist_pool.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/specialist_pool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/specialist_pool.proto @@ -66,11 +66,9 @@ type SpecialistPool struct { func (x *SpecialistPool) Reset() { *x = SpecialistPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpecialistPool) String() string { @@ -81,7 +79,7 @@ func (*SpecialistPool) ProtoMessage() {} func (x *SpecialistPool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,20 +223,6 @@ func file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_init() { if File_google_cloud_aiplatform_v1beta1_specialist_pool_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpecialistPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/specialist_pool_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/specialist_pool_service.pb.go index 4e081b369205..f1fb38ab3c79 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/specialist_pool_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/specialist_pool_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/specialist_pool_service.proto @@ -59,11 +59,9 @@ type CreateSpecialistPoolRequest struct { func (x *CreateSpecialistPoolRequest) Reset() { *x = CreateSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpecialistPoolRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateSpecialistPoolRequest) ProtoMessage() {} func (x *CreateSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type CreateSpecialistPoolOperationMetadata struct { func (x *CreateSpecialistPoolOperationMetadata) Reset() { *x = CreateSpecialistPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpecialistPoolOperationMetadata) String() string { @@ -131,7 +127,7 @@ func (*CreateSpecialistPoolOperationMetadata) ProtoMessage() {} func (x *CreateSpecialistPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type GetSpecialistPoolRequest struct { func (x *GetSpecialistPoolRequest) Reset() { *x = GetSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpecialistPoolRequest) String() string { @@ -183,7 +177,7 @@ func (*GetSpecialistPoolRequest) ProtoMessage() {} func (x *GetSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type ListSpecialistPoolsRequest struct { func (x *ListSpecialistPoolsRequest) Reset() { *x = ListSpecialistPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecialistPoolsRequest) String() string { @@ -245,7 +237,7 @@ func (*ListSpecialistPoolsRequest) ProtoMessage() {} func (x *ListSpecialistPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +295,9 @@ type ListSpecialistPoolsResponse struct { func (x *ListSpecialistPoolsResponse) Reset() { *x = ListSpecialistPoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecialistPoolsResponse) String() string { @@ -318,7 +308,7 @@ func (*ListSpecialistPoolsResponse) ProtoMessage() {} func (x *ListSpecialistPoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type DeleteSpecialistPoolRequest struct { func (x *DeleteSpecialistPoolRequest) Reset() { *x = DeleteSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpecialistPoolRequest) String() string { @@ -380,7 +368,7 @@ func (*DeleteSpecialistPoolRequest) ProtoMessage() {} func (x *DeleteSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +412,9 @@ type UpdateSpecialistPoolRequest struct { func (x *UpdateSpecialistPoolRequest) Reset() { *x = UpdateSpecialistPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpecialistPoolRequest) String() string { @@ -439,7 +425,7 @@ func (*UpdateSpecialistPoolRequest) ProtoMessage() {} func (x *UpdateSpecialistPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +471,9 @@ type UpdateSpecialistPoolOperationMetadata struct { func (x *UpdateSpecialistPoolOperationMetadata) Reset() { *x = UpdateSpecialistPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpecialistPoolOperationMetadata) String() string { @@ -500,7 +484,7 @@ func (*UpdateSpecialistPoolOperationMetadata) ProtoMessage() {} func (x *UpdateSpecialistPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,104 +790,6 @@ func file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_specialist_pool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpecialistPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecialistPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecialistPoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpecialistPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_specialist_pool_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpecialistPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/study.pb.go b/aiplatform/apiv1beta1/aiplatformpb/study.pb.go index 4de6a6be1750..711e8a784b4c 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/study.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/study.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/study.proto @@ -485,11 +485,9 @@ type Study struct { func (x *Study) Reset() { *x = Study{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Study) String() string { @@ -500,7 +498,7 @@ func (*Study) ProtoMessage() {} func (x *Study) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +617,9 @@ type Trial struct { func (x *Trial) Reset() { *x = Trial{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trial) String() string { @@ -634,7 +630,7 @@ func (*Trial) ProtoMessage() {} func (x *Trial) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +752,9 @@ type TrialContext struct { func (x *TrialContext) Reset() { *x = TrialContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrialContext) String() string { @@ -771,7 +765,7 @@ func (*TrialContext) ProtoMessage() {} func (x *TrialContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +809,9 @@ type StudyTimeConstraint struct { func (x *StudyTimeConstraint) Reset() { *x = StudyTimeConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudyTimeConstraint) String() string { @@ -830,7 +822,7 @@ func (*StudyTimeConstraint) ProtoMessage() {} func (x *StudyTimeConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +911,9 @@ type StudySpec struct { func (x *StudySpec) Reset() { *x = StudySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec) String() string { @@ -934,7 +924,7 @@ func (*StudySpec) ProtoMessage() {} func (x *StudySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1080,9 @@ type Measurement struct { func (x *Measurement) Reset() { *x = Measurement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Measurement) String() string { @@ -1105,7 +1093,7 @@ func (*Measurement) ProtoMessage() {} func (x *Measurement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1161,11 +1149,9 @@ type Trial_Parameter struct { func (x *Trial_Parameter) Reset() { *x = Trial_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trial_Parameter) String() string { @@ -1176,7 +1162,7 @@ func (*Trial_Parameter) ProtoMessage() {} func (x *Trial_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1209,9 @@ type StudySpec_MetricSpec struct { func (x *StudySpec_MetricSpec) Reset() { *x = StudySpec_MetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MetricSpec) String() string { @@ -1238,7 +1222,7 @@ func (*StudySpec_MetricSpec) ProtoMessage() {} func (x *StudySpec_MetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1287,9 @@ type StudySpec_ParameterSpec struct { func (x *StudySpec_ParameterSpec) Reset() { *x = StudySpec_ParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec) String() string { @@ -1318,7 +1300,7 @@ func (*StudySpec_ParameterSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1424,9 @@ type StudySpec_DecayCurveAutomatedStoppingSpec struct { func (x *StudySpec_DecayCurveAutomatedStoppingSpec) Reset() { *x = StudySpec_DecayCurveAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_DecayCurveAutomatedStoppingSpec) String() string { @@ -1457,7 +1437,7 @@ func (*StudySpec_DecayCurveAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_DecayCurveAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,11 +1479,9 @@ type StudySpec_MedianAutomatedStoppingSpec struct { func (x *StudySpec_MedianAutomatedStoppingSpec) Reset() { *x = StudySpec_MedianAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MedianAutomatedStoppingSpec) String() string { @@ -1514,7 +1492,7 @@ func (*StudySpec_MedianAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_MedianAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,11 +1572,9 @@ type StudySpec_ConvexAutomatedStoppingSpec struct { func (x *StudySpec_ConvexAutomatedStoppingSpec) Reset() { *x = StudySpec_ConvexAutomatedStoppingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ConvexAutomatedStoppingSpec) String() string { @@ -1609,7 +1585,7 @@ func (*StudySpec_ConvexAutomatedStoppingSpec) ProtoMessage() {} func (x *StudySpec_ConvexAutomatedStoppingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1683,9 @@ type StudySpec_ConvexStopConfig struct { func (x *StudySpec_ConvexStopConfig) Reset() { *x = StudySpec_ConvexStopConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ConvexStopConfig) String() string { @@ -1722,7 +1696,7 @@ func (*StudySpec_ConvexStopConfig) ProtoMessage() {} func (x *StudySpec_ConvexStopConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1790,11 +1764,9 @@ type StudySpec_TransferLearningConfig struct { func (x *StudySpec_TransferLearningConfig) Reset() { *x = StudySpec_TransferLearningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_TransferLearningConfig) String() string { @@ -1805,7 +1777,7 @@ func (*StudySpec_TransferLearningConfig) ProtoMessage() {} func (x *StudySpec_TransferLearningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1890,11 +1862,9 @@ type StudySpec_StudyStoppingConfig struct { func (x *StudySpec_StudyStoppingConfig) Reset() { *x = StudySpec_StudyStoppingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_StudyStoppingConfig) String() string { @@ -1905,7 +1875,7 @@ func (*StudySpec_StudyStoppingConfig) ProtoMessage() {} func (x *StudySpec_StudyStoppingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1989,11 +1959,9 @@ type StudySpec_MetricSpec_SafetyMetricConfig struct { func (x *StudySpec_MetricSpec_SafetyMetricConfig) Reset() { *x = StudySpec_MetricSpec_SafetyMetricConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_MetricSpec_SafetyMetricConfig) String() string { @@ -2004,7 +1972,7 @@ func (*StudySpec_MetricSpec_SafetyMetricConfig) ProtoMessage() {} func (x *StudySpec_MetricSpec_SafetyMetricConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2022,9 @@ type StudySpec_ParameterSpec_DoubleValueSpec struct { func (x *StudySpec_ParameterSpec_DoubleValueSpec) Reset() { *x = StudySpec_ParameterSpec_DoubleValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_DoubleValueSpec) String() string { @@ -2069,7 +2035,7 @@ func (*StudySpec_ParameterSpec_DoubleValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_DoubleValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2126,11 +2092,9 @@ type StudySpec_ParameterSpec_IntegerValueSpec struct { func (x *StudySpec_ParameterSpec_IntegerValueSpec) Reset() { *x = StudySpec_ParameterSpec_IntegerValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_IntegerValueSpec) String() string { @@ -2141,7 +2105,7 @@ func (*StudySpec_ParameterSpec_IntegerValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_IntegerValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2196,11 +2160,9 @@ type StudySpec_ParameterSpec_CategoricalValueSpec struct { func (x *StudySpec_ParameterSpec_CategoricalValueSpec) Reset() { *x = StudySpec_ParameterSpec_CategoricalValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_CategoricalValueSpec) String() string { @@ -2211,7 +2173,7 @@ func (*StudySpec_ParameterSpec_CategoricalValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_CategoricalValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2263,11 +2225,9 @@ type StudySpec_ParameterSpec_DiscreteValueSpec struct { func (x *StudySpec_ParameterSpec_DiscreteValueSpec) Reset() { *x = StudySpec_ParameterSpec_DiscreteValueSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_DiscreteValueSpec) String() string { @@ -2278,7 +2238,7 @@ func (*StudySpec_ParameterSpec_DiscreteValueSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_DiscreteValueSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2288,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec struct { func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) String() string { @@ -2343,7 +2301,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec) ProtoMessage() {} func (x *StudySpec_ParameterSpec_ConditionalParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2439,11 +2397,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition str func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) String() string { @@ -2454,7 +2410,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2445,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition struct { func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) String() string { @@ -2504,7 +2458,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) Proto func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2540,11 +2494,9 @@ type StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) Reset() { *x = StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) String() string { @@ -2555,7 +2507,7 @@ func (*StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueConditio func (x *StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2592,11 +2544,9 @@ type Measurement_Metric struct { func (x *Measurement_Metric) Reset() { *x = Measurement_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Measurement_Metric) String() string { @@ -2607,7 +2557,7 @@ func (*Measurement_Metric) ProtoMessage() {} func (x *Measurement_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3299,308 +3249,6 @@ func file_google_cloud_aiplatform_v1beta1_study_proto_init() { if File_google_cloud_aiplatform_v1beta1_study_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Study); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Trial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TrialContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StudyTimeConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Measurement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Trial_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_DecayCurveAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MedianAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ConvexAutomatedStoppingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ConvexStopConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_TransferLearningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_StudyStoppingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_MetricSpec_SafetyMetricConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_DoubleValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_IntegerValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_CategoricalValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_DiscreteValueSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_DiscreteValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_IntValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*StudySpec_ParameterSpec_ConditionalParameterSpec_CategoricalValueCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Measurement_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_study_proto_msgTypes[3].OneofWrappers = []any{ (*StudyTimeConstraint_MaxDuration)(nil), (*StudyTimeConstraint_EndTime)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard.pb.go index e7f0af2d1874..5149fd7a6866 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard.proto @@ -95,11 +95,9 @@ type Tensorboard struct { func (x *Tensorboard) Reset() { *x = Tensorboard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tensorboard) String() string { @@ -110,7 +108,7 @@ func (*Tensorboard) ProtoMessage() {} func (x *Tensorboard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,20 +337,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_proto_init() { return } file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tensorboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_data.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_data.pb.go index 97fb805d96d4..6fd9abd5a6e0 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_data.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard_data.proto @@ -55,11 +55,9 @@ type TimeSeriesData struct { func (x *TimeSeriesData) Reset() { *x = TimeSeriesData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesData) String() string { @@ -70,7 +68,7 @@ func (*TimeSeriesData) ProtoMessage() {} func (x *TimeSeriesData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type TimeSeriesDataPoint struct { func (x *TimeSeriesDataPoint) Reset() { *x = TimeSeriesDataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesDataPoint) String() string { @@ -143,7 +139,7 @@ func (*TimeSeriesDataPoint) ProtoMessage() {} func (x *TimeSeriesDataPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +233,9 @@ type Scalar struct { func (x *Scalar) Reset() { *x = Scalar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scalar) String() string { @@ -252,7 +246,7 @@ func (*Scalar) ProtoMessage() {} func (x *Scalar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type TensorboardTensor struct { func (x *TensorboardTensor) Reset() { *x = TensorboardTensor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTensor) String() string { @@ -305,7 +297,7 @@ func (*TensorboardTensor) ProtoMessage() {} func (x *TensorboardTensor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +339,9 @@ type TensorboardBlobSequence struct { func (x *TensorboardBlobSequence) Reset() { *x = TensorboardBlobSequence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardBlobSequence) String() string { @@ -362,7 +352,7 @@ func (*TensorboardBlobSequence) ProtoMessage() {} func (x *TensorboardBlobSequence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +390,9 @@ type TensorboardBlob struct { func (x *TensorboardBlob) Reset() { *x = TensorboardBlob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardBlob) String() string { @@ -415,7 +403,7 @@ func (*TensorboardBlob) ProtoMessage() {} func (x *TensorboardBlob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,80 +567,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_init() { return } file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesDataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Scalar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTensor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardBlobSequence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardBlob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_tensorboard_data_proto_msgTypes[1].OneofWrappers = []any{ (*TimeSeriesDataPoint_Scalar)(nil), (*TimeSeriesDataPoint_Tensor)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_experiment.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_experiment.pb.go index 20e6524ed2b5..75ad2225a6ee 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_experiment.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_experiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto @@ -84,11 +84,9 @@ type TensorboardExperiment struct { func (x *TensorboardExperiment) Reset() { *x = TensorboardExperiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardExperiment) String() string { @@ -99,7 +97,7 @@ func (*TensorboardExperiment) ProtoMessage() {} func (x *TensorboardExperiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,20 +273,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_init() { if File_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardExperiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_run.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_run.pb.go index ddbc14c94ada..4ad43a7dcaa7 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_run.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_run.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard_run.proto @@ -84,11 +84,9 @@ type TensorboardRun struct { func (x *TensorboardRun) Reset() { *x = TensorboardRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardRun) String() string { @@ -99,7 +97,7 @@ func (*TensorboardRun) ProtoMessage() {} func (x *TensorboardRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,20 +263,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_init() { if File_google_cloud_aiplatform_v1beta1_tensorboard_run_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_service.pb.go index a5dae9739312..439aaac5e6a3 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard_service.proto @@ -59,11 +59,9 @@ type CreateTensorboardRequest struct { func (x *CreateTensorboardRequest) Reset() { *x = CreateTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateTensorboardRequest) ProtoMessage() {} func (x *CreateTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetTensorboardRequest struct { func (x *GetTensorboardRequest) Reset() { *x = GetTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardRequest) String() string { @@ -133,7 +129,7 @@ func (*GetTensorboardRequest) ProtoMessage() {} func (x *GetTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +185,9 @@ type ListTensorboardsRequest struct { func (x *ListTensorboardsRequest) Reset() { *x = ListTensorboardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardsRequest) String() string { @@ -204,7 +198,7 @@ func (*ListTensorboardsRequest) ProtoMessage() {} func (x *ListTensorboardsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type ListTensorboardsResponse struct { func (x *ListTensorboardsResponse) Reset() { *x = ListTensorboardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardsResponse) String() string { @@ -294,7 +286,7 @@ func (*ListTensorboardsResponse) ProtoMessage() {} func (x *ListTensorboardsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +337,9 @@ type UpdateTensorboardRequest struct { func (x *UpdateTensorboardRequest) Reset() { *x = UpdateTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardRequest) String() string { @@ -360,7 +350,7 @@ func (*UpdateTensorboardRequest) ProtoMessage() {} func (x *UpdateTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +394,9 @@ type DeleteTensorboardRequest struct { func (x *DeleteTensorboardRequest) Reset() { *x = DeleteTensorboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardRequest) String() string { @@ -419,7 +407,7 @@ func (*DeleteTensorboardRequest) ProtoMessage() {} func (x *DeleteTensorboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +444,9 @@ type ReadTensorboardUsageRequest struct { func (x *ReadTensorboardUsageRequest) Reset() { *x = ReadTensorboardUsageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageRequest) String() string { @@ -471,7 +457,7 @@ func (*ReadTensorboardUsageRequest) ProtoMessage() {} func (x *ReadTensorboardUsageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +492,9 @@ type ReadTensorboardUsageResponse struct { func (x *ReadTensorboardUsageResponse) Reset() { *x = ReadTensorboardUsageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse) String() string { @@ -521,7 +505,7 @@ func (*ReadTensorboardUsageResponse) ProtoMessage() {} func (x *ReadTensorboardUsageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +542,9 @@ type ReadTensorboardSizeRequest struct { func (x *ReadTensorboardSizeRequest) Reset() { *x = ReadTensorboardSizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardSizeRequest) String() string { @@ -573,7 +555,7 @@ func (*ReadTensorboardSizeRequest) ProtoMessage() {} func (x *ReadTensorboardSizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +590,9 @@ type ReadTensorboardSizeResponse struct { func (x *ReadTensorboardSizeResponse) Reset() { *x = ReadTensorboardSizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardSizeResponse) String() string { @@ -623,7 +603,7 @@ func (*ReadTensorboardSizeResponse) ProtoMessage() {} func (x *ReadTensorboardSizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +648,9 @@ type CreateTensorboardExperimentRequest struct { func (x *CreateTensorboardExperimentRequest) Reset() { *x = CreateTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardExperimentRequest) String() string { @@ -683,7 +661,7 @@ func (*CreateTensorboardExperimentRequest) ProtoMessage() {} func (x *CreateTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +712,9 @@ type GetTensorboardExperimentRequest struct { func (x *GetTensorboardExperimentRequest) Reset() { *x = GetTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardExperimentRequest) String() string { @@ -749,7 +725,7 @@ func (*GetTensorboardExperimentRequest) ProtoMessage() {} func (x *GetTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +781,9 @@ type ListTensorboardExperimentsRequest struct { func (x *ListTensorboardExperimentsRequest) Reset() { *x = ListTensorboardExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardExperimentsRequest) String() string { @@ -820,7 +794,7 @@ func (*ListTensorboardExperimentsRequest) ProtoMessage() {} func (x *ListTensorboardExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +869,9 @@ type ListTensorboardExperimentsResponse struct { func (x *ListTensorboardExperimentsResponse) Reset() { *x = ListTensorboardExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardExperimentsResponse) String() string { @@ -910,7 +882,7 @@ func (*ListTensorboardExperimentsResponse) ProtoMessage() {} func (x *ListTensorboardExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +933,9 @@ type UpdateTensorboardExperimentRequest struct { func (x *UpdateTensorboardExperimentRequest) Reset() { *x = UpdateTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardExperimentRequest) String() string { @@ -976,7 +946,7 @@ func (*UpdateTensorboardExperimentRequest) ProtoMessage() {} func (x *UpdateTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +990,9 @@ type DeleteTensorboardExperimentRequest struct { func (x *DeleteTensorboardExperimentRequest) Reset() { *x = DeleteTensorboardExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardExperimentRequest) String() string { @@ -1035,7 +1003,7 @@ func (*DeleteTensorboardExperimentRequest) ProtoMessage() {} func (x *DeleteTensorboardExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1045,9 @@ type BatchCreateTensorboardRunsRequest struct { func (x *BatchCreateTensorboardRunsRequest) Reset() { *x = BatchCreateTensorboardRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardRunsRequest) String() string { @@ -1092,7 +1058,7 @@ func (*BatchCreateTensorboardRunsRequest) ProtoMessage() {} func (x *BatchCreateTensorboardRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1100,9 @@ type BatchCreateTensorboardRunsResponse struct { func (x *BatchCreateTensorboardRunsResponse) Reset() { *x = BatchCreateTensorboardRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardRunsResponse) String() string { @@ -1149,7 +1113,7 @@ func (*BatchCreateTensorboardRunsResponse) ProtoMessage() {} func (x *BatchCreateTensorboardRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1158,9 @@ type CreateTensorboardRunRequest struct { func (x *CreateTensorboardRunRequest) Reset() { *x = CreateTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardRunRequest) String() string { @@ -1209,7 +1171,7 @@ func (*CreateTensorboardRunRequest) ProtoMessage() {} func (x *CreateTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1222,9 @@ type GetTensorboardRunRequest struct { func (x *GetTensorboardRunRequest) Reset() { *x = GetTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardRunRequest) String() string { @@ -1275,7 +1235,7 @@ func (*GetTensorboardRunRequest) ProtoMessage() {} func (x *GetTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,11 +1274,9 @@ type ReadTensorboardBlobDataRequest struct { func (x *ReadTensorboardBlobDataRequest) Reset() { *x = ReadTensorboardBlobDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardBlobDataRequest) String() string { @@ -1329,7 +1287,7 @@ func (*ReadTensorboardBlobDataRequest) ProtoMessage() {} func (x *ReadTensorboardBlobDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1371,11 +1329,9 @@ type ReadTensorboardBlobDataResponse struct { func (x *ReadTensorboardBlobDataResponse) Reset() { *x = ReadTensorboardBlobDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardBlobDataResponse) String() string { @@ -1386,7 +1342,7 @@ func (*ReadTensorboardBlobDataResponse) ProtoMessage() {} func (x *ReadTensorboardBlobDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1398,9 @@ type ListTensorboardRunsRequest struct { func (x *ListTensorboardRunsRequest) Reset() { *x = ListTensorboardRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardRunsRequest) String() string { @@ -1457,7 +1411,7 @@ func (*ListTensorboardRunsRequest) ProtoMessage() {} func (x *ListTensorboardRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1532,11 +1486,9 @@ type ListTensorboardRunsResponse struct { func (x *ListTensorboardRunsResponse) Reset() { *x = ListTensorboardRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardRunsResponse) String() string { @@ -1547,7 +1499,7 @@ func (*ListTensorboardRunsResponse) ProtoMessage() {} func (x *ListTensorboardRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1550,9 @@ type UpdateTensorboardRunRequest struct { func (x *UpdateTensorboardRunRequest) Reset() { *x = UpdateTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardRunRequest) String() string { @@ -1613,7 +1563,7 @@ func (*UpdateTensorboardRunRequest) ProtoMessage() {} func (x *UpdateTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1657,11 +1607,9 @@ type DeleteTensorboardRunRequest struct { func (x *DeleteTensorboardRunRequest) Reset() { *x = DeleteTensorboardRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardRunRequest) String() string { @@ -1672,7 +1620,7 @@ func (*DeleteTensorboardRunRequest) ProtoMessage() {} func (x *DeleteTensorboardRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,11 +1664,9 @@ type BatchCreateTensorboardTimeSeriesRequest struct { func (x *BatchCreateTensorboardTimeSeriesRequest) Reset() { *x = BatchCreateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardTimeSeriesRequest) String() string { @@ -1731,7 +1677,7 @@ func (*BatchCreateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *BatchCreateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1773,11 +1719,9 @@ type BatchCreateTensorboardTimeSeriesResponse struct { func (x *BatchCreateTensorboardTimeSeriesResponse) Reset() { *x = BatchCreateTensorboardTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTensorboardTimeSeriesResponse) String() string { @@ -1788,7 +1732,7 @@ func (*BatchCreateTensorboardTimeSeriesResponse) ProtoMessage() {} func (x *BatchCreateTensorboardTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1833,11 +1777,9 @@ type CreateTensorboardTimeSeriesRequest struct { func (x *CreateTensorboardTimeSeriesRequest) Reset() { *x = CreateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardTimeSeriesRequest) String() string { @@ -1848,7 +1790,7 @@ func (*CreateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *CreateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1841,9 @@ type GetTensorboardTimeSeriesRequest struct { func (x *GetTensorboardTimeSeriesRequest) Reset() { *x = GetTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorboardTimeSeriesRequest) String() string { @@ -1914,7 +1854,7 @@ func (*GetTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *GetTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1970,11 +1910,9 @@ type ListTensorboardTimeSeriesRequest struct { func (x *ListTensorboardTimeSeriesRequest) Reset() { *x = ListTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardTimeSeriesRequest) String() string { @@ -1985,7 +1923,7 @@ func (*ListTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *ListTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +1998,9 @@ type ListTensorboardTimeSeriesResponse struct { func (x *ListTensorboardTimeSeriesResponse) Reset() { *x = ListTensorboardTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorboardTimeSeriesResponse) String() string { @@ -2075,7 +2011,7 @@ func (*ListTensorboardTimeSeriesResponse) ProtoMessage() {} func (x *ListTensorboardTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2127,11 +2063,9 @@ type UpdateTensorboardTimeSeriesRequest struct { func (x *UpdateTensorboardTimeSeriesRequest) Reset() { *x = UpdateTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardTimeSeriesRequest) String() string { @@ -2142,7 +2076,7 @@ func (*UpdateTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *UpdateTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,11 +2120,9 @@ type DeleteTensorboardTimeSeriesRequest struct { func (x *DeleteTensorboardTimeSeriesRequest) Reset() { *x = DeleteTensorboardTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTensorboardTimeSeriesRequest) String() string { @@ -2201,7 +2133,7 @@ func (*DeleteTensorboardTimeSeriesRequest) ProtoMessage() {} func (x *DeleteTensorboardTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2245,11 +2177,9 @@ type BatchReadTensorboardTimeSeriesDataRequest struct { func (x *BatchReadTensorboardTimeSeriesDataRequest) Reset() { *x = BatchReadTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadTensorboardTimeSeriesDataRequest) String() string { @@ -2260,7 +2190,7 @@ func (*BatchReadTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *BatchReadTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2302,11 +2232,9 @@ type BatchReadTensorboardTimeSeriesDataResponse struct { func (x *BatchReadTensorboardTimeSeriesDataResponse) Reset() { *x = BatchReadTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchReadTensorboardTimeSeriesDataResponse) String() string { @@ -2317,7 +2245,7 @@ func (*BatchReadTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *BatchReadTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2361,11 +2289,9 @@ type ReadTensorboardTimeSeriesDataRequest struct { func (x *ReadTensorboardTimeSeriesDataRequest) Reset() { *x = ReadTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardTimeSeriesDataRequest) String() string { @@ -2376,7 +2302,7 @@ func (*ReadTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *ReadTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2425,11 +2351,9 @@ type ReadTensorboardTimeSeriesDataResponse struct { func (x *ReadTensorboardTimeSeriesDataResponse) Reset() { *x = ReadTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardTimeSeriesDataResponse) String() string { @@ -2440,7 +2364,7 @@ func (*ReadTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *ReadTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2479,11 +2403,9 @@ type WriteTensorboardExperimentDataRequest struct { func (x *WriteTensorboardExperimentDataRequest) Reset() { *x = WriteTensorboardExperimentDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardExperimentDataRequest) String() string { @@ -2494,7 +2416,7 @@ func (*WriteTensorboardExperimentDataRequest) ProtoMessage() {} func (x *WriteTensorboardExperimentDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2533,11 +2455,9 @@ type WriteTensorboardExperimentDataResponse struct { func (x *WriteTensorboardExperimentDataResponse) Reset() { *x = WriteTensorboardExperimentDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardExperimentDataResponse) String() string { @@ -2548,7 +2468,7 @@ func (*WriteTensorboardExperimentDataResponse) ProtoMessage() {} func (x *WriteTensorboardExperimentDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2584,11 +2504,9 @@ type WriteTensorboardRunDataRequest struct { func (x *WriteTensorboardRunDataRequest) Reset() { *x = WriteTensorboardRunDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardRunDataRequest) String() string { @@ -2599,7 +2517,7 @@ func (*WriteTensorboardRunDataRequest) ProtoMessage() {} func (x *WriteTensorboardRunDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2638,11 +2556,9 @@ type WriteTensorboardRunDataResponse struct { func (x *WriteTensorboardRunDataResponse) Reset() { *x = WriteTensorboardRunDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteTensorboardRunDataResponse) String() string { @@ -2653,7 +2569,7 @@ func (*WriteTensorboardRunDataResponse) ProtoMessage() {} func (x *WriteTensorboardRunDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2701,11 +2617,9 @@ type ExportTensorboardTimeSeriesDataRequest struct { func (x *ExportTensorboardTimeSeriesDataRequest) Reset() { *x = ExportTensorboardTimeSeriesDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTensorboardTimeSeriesDataRequest) String() string { @@ -2716,7 +2630,7 @@ func (*ExportTensorboardTimeSeriesDataRequest) ProtoMessage() {} func (x *ExportTensorboardTimeSeriesDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2784,11 +2698,9 @@ type ExportTensorboardTimeSeriesDataResponse struct { func (x *ExportTensorboardTimeSeriesDataResponse) Reset() { *x = ExportTensorboardTimeSeriesDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTensorboardTimeSeriesDataResponse) String() string { @@ -2799,7 +2711,7 @@ func (*ExportTensorboardTimeSeriesDataResponse) ProtoMessage() {} func (x *ExportTensorboardTimeSeriesDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2840,11 +2752,9 @@ type CreateTensorboardOperationMetadata struct { func (x *CreateTensorboardOperationMetadata) Reset() { *x = CreateTensorboardOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTensorboardOperationMetadata) String() string { @@ -2855,7 +2765,7 @@ func (*CreateTensorboardOperationMetadata) ProtoMessage() {} func (x *CreateTensorboardOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,11 +2799,9 @@ type UpdateTensorboardOperationMetadata struct { func (x *UpdateTensorboardOperationMetadata) Reset() { *x = UpdateTensorboardOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTensorboardOperationMetadata) String() string { @@ -2904,7 +2812,7 @@ func (*UpdateTensorboardOperationMetadata) ProtoMessage() {} func (x *UpdateTensorboardOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2940,11 +2848,9 @@ type ReadTensorboardUsageResponse_PerUserUsageData struct { func (x *ReadTensorboardUsageResponse_PerUserUsageData) Reset() { *x = ReadTensorboardUsageResponse_PerUserUsageData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse_PerUserUsageData) String() string { @@ -2955,7 +2861,7 @@ func (*ReadTensorboardUsageResponse_PerUserUsageData) ProtoMessage() {} func (x *ReadTensorboardUsageResponse_PerUserUsageData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2902,9 @@ type ReadTensorboardUsageResponse_PerMonthUsageData struct { func (x *ReadTensorboardUsageResponse_PerMonthUsageData) Reset() { *x = ReadTensorboardUsageResponse_PerMonthUsageData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadTensorboardUsageResponse_PerMonthUsageData) String() string { @@ -3011,7 +2915,7 @@ func (*ReadTensorboardUsageResponse_PerMonthUsageData) ProtoMessage() {} func (x *ReadTensorboardUsageResponse_PerMonthUsageData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4329,584 +4233,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_init() { file_google_cloud_aiplatform_v1beta1_tensorboard_experiment_proto_init() file_google_cloud_aiplatform_v1beta1_tensorboard_run_proto_init() file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardSizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardSizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardBlobDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardBlobDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTensorboardTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorboardTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTensorboardTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*BatchReadTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardExperimentDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardExperimentDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardRunDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*WriteTensorboardRunDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ExportTensorboardTimeSeriesDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ExportTensorboardTimeSeriesDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CreateTensorboardOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTensorboardOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse_PerUserUsageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ReadTensorboardUsageResponse_PerMonthUsageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_time_series.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_time_series.pb.go index ab10f94fb121..ed7d02693f49 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tensorboard_time_series.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tensorboard_time_series.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto @@ -132,11 +132,9 @@ type TensorboardTimeSeries struct { func (x *TensorboardTimeSeries) Reset() { *x = TensorboardTimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTimeSeries) String() string { @@ -147,7 +145,7 @@ func (*TensorboardTimeSeries) ProtoMessage() {} func (x *TensorboardTimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +249,9 @@ type TensorboardTimeSeries_Metadata struct { func (x *TensorboardTimeSeries_Metadata) Reset() { *x = TensorboardTimeSeries_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorboardTimeSeries_Metadata) String() string { @@ -266,7 +262,7 @@ func (*TensorboardTimeSeries_Metadata) ProtoMessage() {} func (x *TensorboardTimeSeries_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,32 +431,6 @@ func file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_init() { if File_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tensorboard_time_series_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TensorboardTimeSeries_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/tool.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tool.pb.go index 4f04c30f4a0d..4b565e07d324 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tool.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tool.proto @@ -293,11 +293,9 @@ type Tool struct { func (x *Tool) Reset() { *x = Tool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool) String() string { @@ -308,7 +306,7 @@ func (*Tool) ProtoMessage() {} func (x *Tool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +376,9 @@ type ToolUseExample struct { func (x *ToolUseExample) Reset() { *x = ToolUseExample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolUseExample) String() string { @@ -393,7 +389,7 @@ func (*ToolUseExample) ProtoMessage() {} func (x *ToolUseExample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +521,9 @@ type FunctionDeclaration struct { func (x *FunctionDeclaration) Reset() { *x = FunctionDeclaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionDeclaration) String() string { @@ -540,7 +534,7 @@ func (*FunctionDeclaration) ProtoMessage() {} func (x *FunctionDeclaration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,11 +595,9 @@ type FunctionCall struct { func (x *FunctionCall) Reset() { *x = FunctionCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCall) String() string { @@ -616,7 +608,7 @@ func (*FunctionCall) ProtoMessage() {} func (x *FunctionCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +658,9 @@ type FunctionResponse struct { func (x *FunctionResponse) Reset() { *x = FunctionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionResponse) String() string { @@ -681,7 +671,7 @@ func (*FunctionResponse) ProtoMessage() {} func (x *FunctionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,11 +718,9 @@ type ExecutableCode struct { func (x *ExecutableCode) Reset() { *x = ExecutableCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutableCode) String() string { @@ -743,7 +731,7 @@ func (*ExecutableCode) ProtoMessage() {} func (x *ExecutableCode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +777,9 @@ type CodeExecutionResult struct { func (x *CodeExecutionResult) Reset() { *x = CodeExecutionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CodeExecutionResult) String() string { @@ -804,7 +790,7 @@ func (*CodeExecutionResult) ProtoMessage() {} func (x *CodeExecutionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +840,9 @@ type Retrieval struct { func (x *Retrieval) Reset() { *x = Retrieval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Retrieval) String() string { @@ -869,7 +853,7 @@ func (*Retrieval) ProtoMessage() {} func (x *Retrieval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +946,9 @@ type VertexRagStore struct { func (x *VertexRagStore) Reset() { *x = VertexRagStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexRagStore) String() string { @@ -977,7 +959,7 @@ func (*VertexRagStore) ProtoMessage() {} func (x *VertexRagStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1027,9 @@ type VertexAISearch struct { func (x *VertexAISearch) Reset() { *x = VertexAISearch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexAISearch) String() string { @@ -1060,7 +1040,7 @@ func (*VertexAISearch) ProtoMessage() {} func (x *VertexAISearch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1074,9 @@ type GoogleSearchRetrieval struct { func (x *GoogleSearchRetrieval) Reset() { *x = GoogleSearchRetrieval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleSearchRetrieval) String() string { @@ -1109,7 +1087,7 @@ func (*GoogleSearchRetrieval) ProtoMessage() {} func (x *GoogleSearchRetrieval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1124,9 @@ type DynamicRetrievalConfig struct { func (x *DynamicRetrievalConfig) Reset() { *x = DynamicRetrievalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DynamicRetrievalConfig) String() string { @@ -1161,7 +1137,7 @@ func (*DynamicRetrievalConfig) ProtoMessage() {} func (x *DynamicRetrievalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1178,9 @@ type ToolConfig struct { func (x *ToolConfig) Reset() { *x = ToolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolConfig) String() string { @@ -1217,7 +1191,7 @@ func (*ToolConfig) ProtoMessage() {} func (x *ToolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1229,9 @@ type FunctionCallingConfig struct { func (x *FunctionCallingConfig) Reset() { *x = FunctionCallingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionCallingConfig) String() string { @@ -1270,7 +1242,7 @@ func (*FunctionCallingConfig) ProtoMessage() {} func (x *FunctionCallingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1289,9 @@ type RagRetrievalConfig struct { func (x *RagRetrievalConfig) Reset() { *x = RagRetrievalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig) String() string { @@ -1332,7 +1302,7 @@ func (*RagRetrievalConfig) ProtoMessage() {} func (x *RagRetrievalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1388,11 +1358,9 @@ type Tool_CodeExecution struct { func (x *Tool_CodeExecution) Reset() { *x = Tool_CodeExecution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_CodeExecution) String() string { @@ -1403,7 +1371,7 @@ func (*Tool_CodeExecution) ProtoMessage() {} func (x *Tool_CodeExecution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1432,11 +1400,9 @@ type ToolUseExample_ExtensionOperation struct { func (x *ToolUseExample_ExtensionOperation) Reset() { *x = ToolUseExample_ExtensionOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolUseExample_ExtensionOperation) String() string { @@ -1447,7 +1413,7 @@ func (*ToolUseExample_ExtensionOperation) ProtoMessage() {} func (x *ToolUseExample_ExtensionOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1493,11 +1459,9 @@ type VertexRagStore_RagResource struct { func (x *VertexRagStore_RagResource) Reset() { *x = VertexRagStore_RagResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexRagStore_RagResource) String() string { @@ -1508,7 +1472,7 @@ func (*VertexRagStore_RagResource) ProtoMessage() {} func (x *VertexRagStore_RagResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1552,11 +1516,9 @@ type RagRetrievalConfig_HybridSearch struct { func (x *RagRetrievalConfig_HybridSearch) Reset() { *x = RagRetrievalConfig_HybridSearch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_HybridSearch) String() string { @@ -1567,7 +1529,7 @@ func (*RagRetrievalConfig_HybridSearch) ProtoMessage() {} func (x *RagRetrievalConfig_HybridSearch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1571,9 @@ type RagRetrievalConfig_Filter struct { func (x *RagRetrievalConfig_Filter) Reset() { *x = RagRetrievalConfig_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_Filter) String() string { @@ -1624,7 +1584,7 @@ func (*RagRetrievalConfig_Filter) ProtoMessage() {} func (x *RagRetrievalConfig_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,11 +1666,9 @@ type RagRetrievalConfig_Ranking struct { func (x *RagRetrievalConfig_Ranking) Reset() { *x = RagRetrievalConfig_Ranking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_Ranking) String() string { @@ -1721,7 +1679,7 @@ func (*RagRetrievalConfig_Ranking) ProtoMessage() {} func (x *RagRetrievalConfig_Ranking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1788,11 +1746,9 @@ type RagRetrievalConfig_Ranking_RankService struct { func (x *RagRetrievalConfig_Ranking_RankService) Reset() { *x = RagRetrievalConfig_Ranking_RankService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_Ranking_RankService) String() string { @@ -1803,7 +1759,7 @@ func (*RagRetrievalConfig_Ranking_RankService) ProtoMessage() {} func (x *RagRetrievalConfig_Ranking_RankService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1794,9 @@ type RagRetrievalConfig_Ranking_LlmRanker struct { func (x *RagRetrievalConfig_Ranking_LlmRanker) Reset() { *x = RagRetrievalConfig_Ranking_LlmRanker{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagRetrievalConfig_Ranking_LlmRanker) String() string { @@ -1853,7 +1807,7 @@ func (*RagRetrievalConfig_Ranking_LlmRanker) ProtoMessage() {} func (x *RagRetrievalConfig_Ranking_LlmRanker) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2277,284 +2231,6 @@ func file_google_cloud_aiplatform_v1beta1_tool_proto_init() { return } file_google_cloud_aiplatform_v1beta1_openapi_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ToolUseExample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FunctionDeclaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FunctionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExecutableCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CodeExecutionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Retrieval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*VertexRagStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VertexAISearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GoogleSearchRetrieval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DynamicRetrievalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ToolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FunctionCallingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Tool_CodeExecution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ToolUseExample_ExtensionOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*VertexRagStore_RagResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_HybridSearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_Ranking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_Ranking_RankService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RagRetrievalConfig_Ranking_LlmRanker); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_tool_proto_msgTypes[1].OneofWrappers = []any{ (*ToolUseExample_ExtensionOperation_)(nil), (*ToolUseExample_FunctionName)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/training_pipeline.pb.go b/aiplatform/apiv1beta1/aiplatformpb/training_pipeline.pb.go index 113aa816b499..94cf801f0fc6 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/training_pipeline.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/training_pipeline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/training_pipeline.proto @@ -148,11 +148,9 @@ type TrainingPipeline struct { func (x *TrainingPipeline) Reset() { *x = TrainingPipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainingPipeline) String() string { @@ -163,7 +161,7 @@ func (*TrainingPipeline) ProtoMessage() {} func (x *TrainingPipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +406,9 @@ type InputDataConfig struct { func (x *InputDataConfig) Reset() { *x = InputDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputDataConfig) String() string { @@ -423,7 +419,7 @@ func (*InputDataConfig) ProtoMessage() {} func (x *InputDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +653,9 @@ type FractionSplit struct { func (x *FractionSplit) Reset() { *x = FractionSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FractionSplit) String() string { @@ -672,7 +666,7 @@ func (*FractionSplit) ProtoMessage() {} func (x *FractionSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +742,9 @@ type FilterSplit struct { func (x *FilterSplit) Reset() { *x = FilterSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilterSplit) String() string { @@ -763,7 +755,7 @@ func (*FilterSplit) ProtoMessage() {} func (x *FilterSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +811,9 @@ type PredefinedSplit struct { func (x *PredefinedSplit) Reset() { *x = PredefinedSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredefinedSplit) String() string { @@ -834,7 +824,7 @@ func (*PredefinedSplit) ProtoMessage() {} func (x *PredefinedSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +872,9 @@ type TimestampSplit struct { func (x *TimestampSplit) Reset() { *x = TimestampSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampSplit) String() string { @@ -897,7 +885,7 @@ func (*TimestampSplit) ProtoMessage() {} func (x *TimestampSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +963,9 @@ type StratifiedSplit struct { func (x *StratifiedSplit) Reset() { *x = StratifiedSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StratifiedSplit) String() string { @@ -990,7 +976,7 @@ func (*StratifiedSplit) ProtoMessage() {} func (x *StratifiedSplit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,92 +1316,6 @@ func file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_init() { file_google_cloud_aiplatform_v1beta1_io_proto_init() file_google_cloud_aiplatform_v1beta1_model_proto_init() file_google_cloud_aiplatform_v1beta1_pipeline_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TrainingPipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InputDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FractionSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FilterSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredefinedSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TimestampSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StratifiedSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_training_pipeline_proto_msgTypes[1].OneofWrappers = []any{ (*InputDataConfig_FractionSplit)(nil), (*InputDataConfig_FilterSplit)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/tuning_job.pb.go b/aiplatform/apiv1beta1/aiplatformpb/tuning_job.pb.go index 99e31bbfe48b..f34dbd794cdb 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/tuning_job.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/tuning_job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/tuning_job.proto @@ -186,11 +186,9 @@ type TuningJob struct { func (x *TuningJob) Reset() { *x = TuningJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningJob) String() string { @@ -201,7 +199,7 @@ func (*TuningJob) ProtoMessage() {} func (x *TuningJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +421,9 @@ type TunedModel struct { func (x *TunedModel) Reset() { *x = TunedModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModel) String() string { @@ -438,7 +434,7 @@ func (*TunedModel) ProtoMessage() {} func (x *TunedModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +491,9 @@ type SupervisedTuningDatasetDistribution struct { func (x *SupervisedTuningDatasetDistribution) Reset() { *x = SupervisedTuningDatasetDistribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDatasetDistribution) String() string { @@ -510,7 +504,7 @@ func (*SupervisedTuningDatasetDistribution) ProtoMessage() {} func (x *SupervisedTuningDatasetDistribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +618,9 @@ type SupervisedTuningDataStats struct { func (x *SupervisedTuningDataStats) Reset() { *x = SupervisedTuningDataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDataStats) String() string { @@ -639,7 +631,7 @@ func (*SupervisedTuningDataStats) ProtoMessage() {} func (x *SupervisedTuningDataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +750,9 @@ type DatasetDistribution struct { func (x *DatasetDistribution) Reset() { *x = DatasetDistribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetDistribution) String() string { @@ -773,7 +763,7 @@ func (*DatasetDistribution) ProtoMessage() {} func (x *DatasetDistribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +860,9 @@ type DatasetStats struct { func (x *DatasetStats) Reset() { *x = DatasetStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetStats) String() string { @@ -885,7 +873,7 @@ func (*DatasetStats) ProtoMessage() {} func (x *DatasetStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +956,9 @@ type DistillationDataStats struct { func (x *DistillationDataStats) Reset() { *x = DistillationDataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistillationDataStats) String() string { @@ -983,7 +969,7 @@ func (*DistillationDataStats) ProtoMessage() {} func (x *DistillationDataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1007,9 @@ type TuningDataStats struct { func (x *TuningDataStats) Reset() { *x = TuningDataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuningDataStats) String() string { @@ -1036,7 +1020,7 @@ func (*TuningDataStats) ProtoMessage() {} func (x *TuningDataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1091,9 @@ type SupervisedHyperParameters struct { func (x *SupervisedHyperParameters) Reset() { *x = SupervisedHyperParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedHyperParameters) String() string { @@ -1122,7 +1104,7 @@ func (*SupervisedHyperParameters) ProtoMessage() {} func (x *SupervisedHyperParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,11 +1158,9 @@ type SupervisedTuningSpec struct { func (x *SupervisedTuningSpec) Reset() { *x = SupervisedTuningSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningSpec) String() string { @@ -1191,7 +1171,7 @@ func (*SupervisedTuningSpec) ProtoMessage() {} func (x *SupervisedTuningSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1238,9 @@ type DistillationSpec struct { func (x *DistillationSpec) Reset() { *x = DistillationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistillationSpec) String() string { @@ -1273,7 +1251,7 @@ func (*DistillationSpec) ProtoMessage() {} func (x *DistillationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1381,11 +1359,9 @@ type DistillationHyperParameters struct { func (x *DistillationHyperParameters) Reset() { *x = DistillationHyperParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistillationHyperParameters) String() string { @@ -1396,7 +1372,7 @@ func (*DistillationHyperParameters) ProtoMessage() {} func (x *DistillationHyperParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1427,9 @@ type PartnerModelTuningSpec struct { func (x *PartnerModelTuningSpec) Reset() { *x = PartnerModelTuningSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartnerModelTuningSpec) String() string { @@ -1466,7 +1440,7 @@ func (*PartnerModelTuningSpec) ProtoMessage() {} func (x *PartnerModelTuningSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1494,9 @@ type TunedModelRef struct { func (x *TunedModelRef) Reset() { *x = TunedModelRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunedModelRef) String() string { @@ -1535,7 +1507,7 @@ func (*TunedModelRef) ProtoMessage() {} func (x *TunedModelRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1594,9 @@ type SupervisedTuningDatasetDistribution_DatasetBucket struct { func (x *SupervisedTuningDatasetDistribution_DatasetBucket) Reset() { *x = SupervisedTuningDatasetDistribution_DatasetBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupervisedTuningDatasetDistribution_DatasetBucket) String() string { @@ -1637,7 +1607,7 @@ func (*SupervisedTuningDatasetDistribution_DatasetBucket) ProtoMessage() {} func (x *SupervisedTuningDatasetDistribution_DatasetBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1690,11 +1660,9 @@ type DatasetDistribution_DistributionBucket struct { func (x *DatasetDistribution_DistributionBucket) Reset() { *x = DatasetDistribution_DistributionBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetDistribution_DistributionBucket) String() string { @@ -1705,7 +1673,7 @@ func (*DatasetDistribution_DistributionBucket) ProtoMessage() {} func (x *DatasetDistribution_DistributionBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2313,200 +2281,6 @@ func file_google_cloud_aiplatform_v1beta1_tuning_job_proto_init() { file_google_cloud_aiplatform_v1beta1_content_proto_init() file_google_cloud_aiplatform_v1beta1_encryption_spec_proto_init() file_google_cloud_aiplatform_v1beta1_job_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TuningJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TunedModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDatasetDistribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DatasetDistribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DatasetStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DistillationDataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TuningDataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedHyperParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DistillationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DistillationHyperParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PartnerModelTuningSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TunedModelRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SupervisedTuningDatasetDistribution_DatasetBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DatasetDistribution_DistributionBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_tuning_job_proto_msgTypes[0].OneofWrappers = []any{ (*TuningJob_BaseModel)(nil), (*TuningJob_SupervisedTuningSpec)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/types.pb.go b/aiplatform/apiv1beta1/aiplatformpb/types.pb.go index b4938010856e..409f9e203b9e 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/types.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/types.proto @@ -131,11 +131,9 @@ type BoolArray struct { func (x *BoolArray) Reset() { *x = BoolArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoolArray) String() string { @@ -146,7 +144,7 @@ func (*BoolArray) ProtoMessage() {} func (x *BoolArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type DoubleArray struct { func (x *DoubleArray) Reset() { *x = DoubleArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleArray) String() string { @@ -195,7 +191,7 @@ func (*DoubleArray) ProtoMessage() {} func (x *DoubleArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type Int64Array struct { func (x *Int64Array) Reset() { *x = Int64Array{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Int64Array) String() string { @@ -244,7 +238,7 @@ func (*Int64Array) ProtoMessage() {} func (x *Int64Array) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +272,9 @@ type StringArray struct { func (x *StringArray) Reset() { *x = StringArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringArray) String() string { @@ -293,7 +285,7 @@ func (*StringArray) ProtoMessage() {} func (x *StringArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type Tensor struct { func (x *Tensor) Reset() { *x = Tensor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tensor) String() string { @@ -377,7 +367,7 @@ func (*Tensor) ProtoMessage() {} func (x *Tensor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,68 +606,6 @@ func file_google_cloud_aiplatform_v1beta1_types_proto_init() { if File_google_cloud_aiplatform_v1beta1_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BoolArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DoubleArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Int64Array); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StringArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Tensor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/ui_pipeline_spec.pb.go b/aiplatform/apiv1beta1/aiplatformpb/ui_pipeline_spec.pb.go index ef9991659fcf..c16ff8b3ca33 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/ui_pipeline_spec.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/ui_pipeline_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/ui_pipeline_spec.proto @@ -56,11 +56,9 @@ type ArtifactTypeSchema struct { func (x *ArtifactTypeSchema) Reset() { *x = ArtifactTypeSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactTypeSchema) String() string { @@ -71,7 +69,7 @@ func (*ArtifactTypeSchema) ProtoMessage() {} func (x *ArtifactTypeSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type RuntimeArtifact struct { func (x *RuntimeArtifact) Reset() { *x = RuntimeArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeArtifact) String() string { @@ -207,7 +203,7 @@ func (*RuntimeArtifact) ProtoMessage() {} func (x *RuntimeArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,32 +388,6 @@ func file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_init() { return } file_google_cloud_aiplatform_v1beta1_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ArtifactTypeSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_ui_pipeline_spec_proto_msgTypes[0].OneofWrappers = []any{ (*ArtifactTypeSchema_SchemaTitle)(nil), (*ArtifactTypeSchema_SchemaUri)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/unmanaged_container_model.pb.go b/aiplatform/apiv1beta1/aiplatformpb/unmanaged_container_model.pb.go index 8f433f243757..0916a7d7055e 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/unmanaged_container_model.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/unmanaged_container_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto @@ -55,11 +55,9 @@ type UnmanagedContainerModel struct { func (x *UnmanagedContainerModel) Reset() { *x = UnmanagedContainerModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnmanagedContainerModel) String() string { @@ -70,7 +68,7 @@ func (*UnmanagedContainerModel) ProtoMessage() {} func (x *UnmanagedContainerModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,20 +186,6 @@ func file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_init() return } file_google_cloud_aiplatform_v1beta1_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_unmanaged_container_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UnmanagedContainerModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/aiplatformpb/user_action_reference.pb.go b/aiplatform/apiv1beta1/aiplatformpb/user_action_reference.pb.go index 381cc672667b..4f63dc38c1c2 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/user_action_reference.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/user_action_reference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/user_action_reference.proto @@ -54,11 +54,9 @@ type UserActionReference struct { func (x *UserActionReference) Reset() { *x = UserActionReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserActionReference) String() string { @@ -69,7 +67,7 @@ func (*UserActionReference) ProtoMessage() {} func (x *UserActionReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,20 +199,6 @@ func file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_init() { if File_google_cloud_aiplatform_v1beta1_user_action_reference_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserActionReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_user_action_reference_proto_msgTypes[0].OneofWrappers = []any{ (*UserActionReference_Operation)(nil), (*UserActionReference_DataLabelingJob)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/value.pb.go b/aiplatform/apiv1beta1/aiplatformpb/value.pb.go index 5c3eb857902a..066319a7f55a 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/value.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/value.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/value.proto @@ -51,11 +51,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_value_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -66,7 +64,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,20 +194,6 @@ func file_google_cloud_aiplatform_v1beta1_value_proto_init() { if File_google_cloud_aiplatform_v1beta1_value_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_value_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_value_proto_msgTypes[0].OneofWrappers = []any{ (*Value_IntValue)(nil), (*Value_DoubleValue)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data.pb.go b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data.pb.go index b7474543a8fa..9401925ab4fc 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/vertex_rag_data.proto @@ -219,11 +219,9 @@ type RagEmbeddingModelConfig struct { func (x *RagEmbeddingModelConfig) Reset() { *x = RagEmbeddingModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig) String() string { @@ -234,7 +232,7 @@ func (*RagEmbeddingModelConfig) ProtoMessage() {} func (x *RagEmbeddingModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +314,9 @@ type RagVectorDbConfig struct { func (x *RagVectorDbConfig) Reset() { *x = RagVectorDbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig) String() string { @@ -331,7 +327,7 @@ func (*RagVectorDbConfig) ProtoMessage() {} func (x *RagVectorDbConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +451,9 @@ type FileStatus struct { func (x *FileStatus) Reset() { *x = FileStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStatus) String() string { @@ -470,7 +464,7 @@ func (*FileStatus) ProtoMessage() {} func (x *FileStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +508,9 @@ type VertexAiSearchConfig struct { func (x *VertexAiSearchConfig) Reset() { *x = VertexAiSearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexAiSearchConfig) String() string { @@ -529,7 +521,7 @@ func (*VertexAiSearchConfig) ProtoMessage() {} func (x *VertexAiSearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +557,9 @@ type CorpusStatus struct { func (x *CorpusStatus) Reset() { *x = CorpusStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorpusStatus) String() string { @@ -580,7 +570,7 @@ func (*CorpusStatus) ProtoMessage() {} func (x *CorpusStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +640,9 @@ type RagCorpus struct { func (x *RagCorpus) Reset() { *x = RagCorpus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagCorpus) String() string { @@ -665,7 +653,7 @@ func (*RagCorpus) ProtoMessage() {} func (x *RagCorpus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -817,11 +805,9 @@ type RagFile struct { func (x *RagFile) Reset() { *x = RagFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFile) String() string { @@ -832,7 +818,7 @@ func (*RagFile) ProtoMessage() {} func (x *RagFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1011,9 @@ type RagFileChunkingConfig struct { func (x *RagFileChunkingConfig) Reset() { *x = RagFileChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileChunkingConfig) String() string { @@ -1040,7 +1024,7 @@ func (*RagFileChunkingConfig) ProtoMessage() {} func (x *RagFileChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1108,11 +1092,9 @@ type RagFileTransformationConfig struct { func (x *RagFileTransformationConfig) Reset() { *x = RagFileTransformationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileTransformationConfig) String() string { @@ -1123,7 +1105,7 @@ func (*RagFileTransformationConfig) ProtoMessage() {} func (x *RagFileTransformationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1166,11 +1148,9 @@ type RagFileParsingConfig struct { func (x *RagFileParsingConfig) Reset() { *x = RagFileParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileParsingConfig) String() string { @@ -1181,7 +1161,7 @@ func (*RagFileParsingConfig) ProtoMessage() {} func (x *RagFileParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1239,9 @@ type UploadRagFileConfig struct { func (x *UploadRagFileConfig) Reset() { *x = UploadRagFileConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileConfig) String() string { @@ -1274,7 +1252,7 @@ func (*UploadRagFileConfig) ProtoMessage() {} func (x *UploadRagFileConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1325,9 @@ type ImportRagFilesConfig struct { func (x *ImportRagFilesConfig) Reset() { *x = ImportRagFilesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesConfig) String() string { @@ -1362,7 +1338,7 @@ func (*ImportRagFilesConfig) ProtoMessage() {} func (x *ImportRagFilesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1567,11 +1543,9 @@ type RagEmbeddingModelConfig_VertexPredictionEndpoint struct { func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) Reset() { *x = RagEmbeddingModelConfig_VertexPredictionEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) String() string { @@ -1582,7 +1556,7 @@ func (*RagEmbeddingModelConfig_VertexPredictionEndpoint) ProtoMessage() {} func (x *RagEmbeddingModelConfig_VertexPredictionEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1634,11 +1608,9 @@ type RagEmbeddingModelConfig_SparseEmbeddingConfig struct { func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig) Reset() { *x = RagEmbeddingModelConfig_SparseEmbeddingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig) String() string { @@ -1649,7 +1621,7 @@ func (*RagEmbeddingModelConfig_SparseEmbeddingConfig) ProtoMessage() {} func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1679,9 @@ type RagEmbeddingModelConfig_HybridSearchConfig struct { func (x *RagEmbeddingModelConfig_HybridSearchConfig) Reset() { *x = RagEmbeddingModelConfig_HybridSearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig_HybridSearchConfig) String() string { @@ -1722,7 +1692,7 @@ func (*RagEmbeddingModelConfig_HybridSearchConfig) ProtoMessage() {} func (x *RagEmbeddingModelConfig_HybridSearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1771,11 +1741,9 @@ type RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25 struct { func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25) Reset() { *x = RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25) String() string { @@ -1786,7 +1754,7 @@ func (*RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25) ProtoMessage() {} func (x *RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,11 +1799,9 @@ type RagVectorDbConfig_RagManagedDb struct { func (x *RagVectorDbConfig_RagManagedDb) Reset() { *x = RagVectorDbConfig_RagManagedDb{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_RagManagedDb) String() string { @@ -1846,7 +1812,7 @@ func (*RagVectorDbConfig_RagManagedDb) ProtoMessage() {} func (x *RagVectorDbConfig_RagManagedDb) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1878,11 +1844,9 @@ type RagVectorDbConfig_Weaviate struct { func (x *RagVectorDbConfig_Weaviate) Reset() { *x = RagVectorDbConfig_Weaviate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_Weaviate) String() string { @@ -1893,7 +1857,7 @@ func (*RagVectorDbConfig_Weaviate) ProtoMessage() {} func (x *RagVectorDbConfig_Weaviate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1935,11 +1899,9 @@ type RagVectorDbConfig_Pinecone struct { func (x *RagVectorDbConfig_Pinecone) Reset() { *x = RagVectorDbConfig_Pinecone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_Pinecone) String() string { @@ -1950,7 +1912,7 @@ func (*RagVectorDbConfig_Pinecone) ProtoMessage() {} func (x *RagVectorDbConfig_Pinecone) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1948,9 @@ type RagVectorDbConfig_VertexFeatureStore struct { func (x *RagVectorDbConfig_VertexFeatureStore) Reset() { *x = RagVectorDbConfig_VertexFeatureStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_VertexFeatureStore) String() string { @@ -2001,7 +1961,7 @@ func (*RagVectorDbConfig_VertexFeatureStore) ProtoMessage() {} func (x *RagVectorDbConfig_VertexFeatureStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2001,9 @@ type RagVectorDbConfig_VertexVectorSearch struct { func (x *RagVectorDbConfig_VertexVectorSearch) Reset() { *x = RagVectorDbConfig_VertexVectorSearch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagVectorDbConfig_VertexVectorSearch) String() string { @@ -2056,7 +2014,7 @@ func (*RagVectorDbConfig_VertexVectorSearch) ProtoMessage() {} func (x *RagVectorDbConfig_VertexVectorSearch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2099,11 +2057,9 @@ type RagFileChunkingConfig_FixedLengthChunking struct { func (x *RagFileChunkingConfig_FixedLengthChunking) Reset() { *x = RagFileChunkingConfig_FixedLengthChunking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileChunkingConfig_FixedLengthChunking) String() string { @@ -2114,7 +2070,7 @@ func (*RagFileChunkingConfig_FixedLengthChunking) ProtoMessage() {} func (x *RagFileChunkingConfig_FixedLengthChunking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2111,9 @@ type RagFileParsingConfig_AdvancedParser struct { func (x *RagFileParsingConfig_AdvancedParser) Reset() { *x = RagFileParsingConfig_AdvancedParser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileParsingConfig_AdvancedParser) String() string { @@ -2170,7 +2124,7 @@ func (*RagFileParsingConfig_AdvancedParser) ProtoMessage() {} func (x *RagFileParsingConfig_AdvancedParser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2215,11 +2169,9 @@ type RagFileParsingConfig_LayoutParser struct { func (x *RagFileParsingConfig_LayoutParser) Reset() { *x = RagFileParsingConfig_LayoutParser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagFileParsingConfig_LayoutParser) String() string { @@ -2230,7 +2182,7 @@ func (*RagFileParsingConfig_LayoutParser) ProtoMessage() {} func (x *RagFileParsingConfig_LayoutParser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2871,296 +2823,6 @@ func file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_init() { } file_google_cloud_aiplatform_v1beta1_api_auth_proto_init() file_google_cloud_aiplatform_v1beta1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FileStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VertexAiSearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CorpusStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RagCorpus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RagFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RagFileChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RagFileTransformationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RagFileParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig_VertexPredictionEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig_SparseEmbeddingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig_HybridSearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RagEmbeddingModelConfig_SparseEmbeddingConfig_Bm25); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_RagManagedDb); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_Weaviate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_Pinecone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_VertexFeatureStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RagVectorDbConfig_VertexVectorSearch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RagFileChunkingConfig_FixedLengthChunking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RagFileParsingConfig_AdvancedParser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RagFileParsingConfig_LayoutParser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_msgTypes[0].OneofWrappers = []any{ (*RagEmbeddingModelConfig_VertexPredictionEndpoint_)(nil), (*RagEmbeddingModelConfig_HybridSearchConfig_)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data_service.pb.go index 53c1d7587d90..dca348f4fef8 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_data_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/vertex_rag_data_service.proto @@ -59,11 +59,9 @@ type CreateRagCorpusRequest struct { func (x *CreateRagCorpusRequest) Reset() { *x = CreateRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRagCorpusRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateRagCorpusRequest) ProtoMessage() {} func (x *CreateRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetRagCorpusRequest struct { func (x *GetRagCorpusRequest) Reset() { *x = GetRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRagCorpusRequest) String() string { @@ -133,7 +129,7 @@ func (*GetRagCorpusRequest) ProtoMessage() {} func (x *GetRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type ListRagCorporaRequest struct { func (x *ListRagCorporaRequest) Reset() { *x = ListRagCorporaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagCorporaRequest) String() string { @@ -193,7 +187,7 @@ func (*ListRagCorporaRequest) ProtoMessage() {} func (x *ListRagCorporaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +241,9 @@ type ListRagCorporaResponse struct { func (x *ListRagCorporaResponse) Reset() { *x = ListRagCorporaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagCorporaResponse) String() string { @@ -262,7 +254,7 @@ func (*ListRagCorporaResponse) ProtoMessage() {} func (x *ListRagCorporaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +302,9 @@ type DeleteRagCorpusRequest struct { func (x *DeleteRagCorpusRequest) Reset() { *x = DeleteRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRagCorpusRequest) String() string { @@ -325,7 +315,7 @@ func (*DeleteRagCorpusRequest) ProtoMessage() {} func (x *DeleteRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +364,9 @@ type UploadRagFileRequest struct { func (x *UploadRagFileRequest) Reset() { *x = UploadRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileRequest) String() string { @@ -389,7 +377,7 @@ func (*UploadRagFileRequest) ProtoMessage() {} func (x *UploadRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +431,9 @@ type UploadRagFileResponse struct { func (x *UploadRagFileResponse) Reset() { *x = UploadRagFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRagFileResponse) String() string { @@ -458,7 +444,7 @@ func (*UploadRagFileResponse) ProtoMessage() {} func (x *UploadRagFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +517,9 @@ type ImportRagFilesRequest struct { func (x *ImportRagFilesRequest) Reset() { *x = ImportRagFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesRequest) String() string { @@ -546,7 +530,7 @@ func (*ImportRagFilesRequest) ProtoMessage() {} func (x *ImportRagFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +583,9 @@ type ImportRagFilesResponse struct { func (x *ImportRagFilesResponse) Reset() { *x = ImportRagFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesResponse) String() string { @@ -614,7 +596,7 @@ func (*ImportRagFilesResponse) ProtoMessage() {} func (x *ImportRagFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +688,9 @@ type GetRagFileRequest struct { func (x *GetRagFileRequest) Reset() { *x = GetRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRagFileRequest) String() string { @@ -721,7 +701,7 @@ func (*GetRagFileRequest) ProtoMessage() {} func (x *GetRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +747,9 @@ type ListRagFilesRequest struct { func (x *ListRagFilesRequest) Reset() { *x = ListRagFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagFilesRequest) String() string { @@ -782,7 +760,7 @@ func (*ListRagFilesRequest) ProtoMessage() {} func (x *ListRagFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +814,9 @@ type ListRagFilesResponse struct { func (x *ListRagFilesResponse) Reset() { *x = ListRagFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRagFilesResponse) String() string { @@ -851,7 +827,7 @@ func (*ListRagFilesResponse) ProtoMessage() {} func (x *ListRagFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +871,9 @@ type DeleteRagFileRequest struct { func (x *DeleteRagFileRequest) Reset() { *x = DeleteRagFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRagFileRequest) String() string { @@ -910,7 +884,7 @@ func (*DeleteRagFileRequest) ProtoMessage() {} func (x *DeleteRagFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +919,9 @@ type CreateRagCorpusOperationMetadata struct { func (x *CreateRagCorpusOperationMetadata) Reset() { *x = CreateRagCorpusOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRagCorpusOperationMetadata) String() string { @@ -960,7 +932,7 @@ func (*CreateRagCorpusOperationMetadata) ProtoMessage() {} func (x *CreateRagCorpusOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +967,9 @@ type UpdateRagCorpusRequest struct { func (x *UpdateRagCorpusRequest) Reset() { *x = UpdateRagCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRagCorpusRequest) String() string { @@ -1010,7 +980,7 @@ func (*UpdateRagCorpusRequest) ProtoMessage() {} func (x *UpdateRagCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1015,9 @@ type UpdateRagCorpusOperationMetadata struct { func (x *UpdateRagCorpusOperationMetadata) Reset() { *x = UpdateRagCorpusOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRagCorpusOperationMetadata) String() string { @@ -1060,7 +1028,7 @@ func (*UpdateRagCorpusOperationMetadata) ProtoMessage() {} func (x *UpdateRagCorpusOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1072,9 @@ type ImportRagFilesOperationMetadata struct { func (x *ImportRagFilesOperationMetadata) Reset() { *x = ImportRagFilesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRagFilesOperationMetadata) String() string { @@ -1119,7 +1085,7 @@ func (*ImportRagFilesOperationMetadata) ProtoMessage() {} func (x *ImportRagFilesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,212 +1590,6 @@ func file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_vertex_rag_data_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRagCorporaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListRagCorporaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UploadRagFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListRagFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListRagFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRagFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateRagCorpusOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRagCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRagCorpusOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportRagFilesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_vertex_rag_data_service_proto_msgTypes[6].OneofWrappers = []any{ (*UploadRagFileResponse_RagFile)(nil), (*UploadRagFileResponse_Error)(nil), diff --git a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_service.pb.go index c522396bef2b..7be9583c50ea 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/vertex_rag_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/vertex_rag_service.proto @@ -67,11 +67,9 @@ type RagQuery struct { func (x *RagQuery) Reset() { *x = RagQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagQuery) String() string { @@ -82,7 +80,7 @@ func (*RagQuery) ProtoMessage() {} func (x *RagQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +167,9 @@ type RetrieveContextsRequest struct { func (x *RetrieveContextsRequest) Reset() { *x = RetrieveContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest) String() string { @@ -184,7 +180,7 @@ func (*RetrieveContextsRequest) ProtoMessage() {} func (x *RetrieveContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +246,9 @@ type RagContexts struct { func (x *RagContexts) Reset() { *x = RagContexts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagContexts) String() string { @@ -265,7 +259,7 @@ func (*RagContexts) ProtoMessage() {} func (x *RagContexts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +294,9 @@ type RetrieveContextsResponse struct { func (x *RetrieveContextsResponse) Reset() { *x = RetrieveContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsResponse) String() string { @@ -315,7 +307,7 @@ func (*RetrieveContextsResponse) ProtoMessage() {} func (x *RetrieveContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type AugmentPromptRequest struct { func (x *AugmentPromptRequest) Reset() { *x = AugmentPromptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptRequest) String() string { @@ -377,7 +367,7 @@ func (*AugmentPromptRequest) ProtoMessage() {} func (x *AugmentPromptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +442,9 @@ type AugmentPromptResponse struct { func (x *AugmentPromptResponse) Reset() { *x = AugmentPromptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptResponse) String() string { @@ -467,7 +455,7 @@ func (*AugmentPromptResponse) ProtoMessage() {} func (x *AugmentPromptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +508,9 @@ type CorroborateContentRequest struct { func (x *CorroborateContentRequest) Reset() { *x = CorroborateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentRequest) String() string { @@ -535,7 +521,7 @@ func (*CorroborateContentRequest) ProtoMessage() {} func (x *CorroborateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type CorroborateContentResponse struct { func (x *CorroborateContentResponse) Reset() { *x = CorroborateContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentResponse) String() string { @@ -609,7 +593,7 @@ func (*CorroborateContentResponse) ProtoMessage() {} func (x *CorroborateContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +653,9 @@ type Fact struct { func (x *Fact) Reset() { *x = Fact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fact) String() string { @@ -684,7 +666,7 @@ func (*Fact) ProtoMessage() {} func (x *Fact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,11 +742,9 @@ type Claim struct { func (x *Claim) Reset() { *x = Claim{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Claim) String() string { @@ -775,7 +755,7 @@ func (*Claim) ProtoMessage() {} func (x *Claim) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +813,9 @@ type RagQuery_Ranking struct { func (x *RagQuery_Ranking) Reset() { *x = RagQuery_Ranking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagQuery_Ranking) String() string { @@ -848,7 +826,7 @@ func (*RagQuery_Ranking) ProtoMessage() {} func (x *RagQuery_Ranking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +873,9 @@ type RetrieveContextsRequest_VertexRagStore struct { func (x *RetrieveContextsRequest_VertexRagStore) Reset() { *x = RetrieveContextsRequest_VertexRagStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest_VertexRagStore) String() string { @@ -910,7 +886,7 @@ func (*RetrieveContextsRequest_VertexRagStore) ProtoMessage() {} func (x *RetrieveContextsRequest_VertexRagStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,11 +941,9 @@ type RetrieveContextsRequest_VertexRagStore_RagResource struct { func (x *RetrieveContextsRequest_VertexRagStore_RagResource) Reset() { *x = RetrieveContextsRequest_VertexRagStore_RagResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveContextsRequest_VertexRagStore_RagResource) String() string { @@ -980,7 +954,7 @@ func (*RetrieveContextsRequest_VertexRagStore_RagResource) ProtoMessage() {} func (x *RetrieveContextsRequest_VertexRagStore_RagResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,11 +1020,9 @@ type RagContexts_Context struct { func (x *RagContexts_Context) Reset() { *x = RagContexts_Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RagContexts_Context) String() string { @@ -1061,7 +1033,7 @@ func (*RagContexts_Context) ProtoMessage() {} func (x *RagContexts_Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1135,11 +1107,9 @@ type AugmentPromptRequest_Model struct { func (x *AugmentPromptRequest_Model) Reset() { *x = AugmentPromptRequest_Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AugmentPromptRequest_Model) String() string { @@ -1150,7 +1120,7 @@ func (*AugmentPromptRequest_Model) ProtoMessage() {} func (x *AugmentPromptRequest_Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1192,11 +1162,9 @@ type CorroborateContentRequest_Parameters struct { func (x *CorroborateContentRequest_Parameters) Reset() { *x = CorroborateContentRequest_Parameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorroborateContentRequest_Parameters) String() string { @@ -1207,7 +1175,7 @@ func (*CorroborateContentRequest_Parameters) ProtoMessage() {} func (x *CorroborateContentRequest_Parameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1586,200 +1554,6 @@ func file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_content_proto_init() file_google_cloud_aiplatform_v1beta1_tool_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RagQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RagContexts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Fact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Claim); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RagQuery_Ranking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest_VertexRagStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveContextsRequest_VertexRagStore_RagResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RagContexts_Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AugmentPromptRequest_Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CorroborateContentRequest_Parameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_aiplatform_v1beta1_vertex_rag_service_proto_msgTypes[0].OneofWrappers = []any{ (*RagQuery_Text)(nil), } diff --git a/aiplatform/apiv1beta1/aiplatformpb/vizier_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/vizier_service.pb.go index 14b75f4814b0..d8dc3bba11bf 100755 --- a/aiplatform/apiv1beta1/aiplatformpb/vizier_service.pb.go +++ b/aiplatform/apiv1beta1/aiplatformpb/vizier_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/aiplatform/v1beta1/vizier_service.proto @@ -57,11 +57,9 @@ type GetStudyRequest struct { func (x *GetStudyRequest) Reset() { *x = GetStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStudyRequest) String() string { @@ -72,7 +70,7 @@ func (*GetStudyRequest) ProtoMessage() {} func (x *GetStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type CreateStudyRequest struct { func (x *CreateStudyRequest) Reset() { *x = CreateStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStudyRequest) String() string { @@ -125,7 +121,7 @@ func (*CreateStudyRequest) ProtoMessage() {} func (x *CreateStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +170,9 @@ type ListStudiesRequest struct { func (x *ListStudiesRequest) Reset() { *x = ListStudiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudiesRequest) String() string { @@ -189,7 +183,7 @@ func (*ListStudiesRequest) ProtoMessage() {} func (x *ListStudiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type ListStudiesResponse struct { func (x *ListStudiesResponse) Reset() { *x = ListStudiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStudiesResponse) String() string { @@ -257,7 +249,7 @@ func (*ListStudiesResponse) ProtoMessage() {} func (x *ListStudiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +292,9 @@ type DeleteStudyRequest struct { func (x *DeleteStudyRequest) Reset() { *x = DeleteStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStudyRequest) String() string { @@ -315,7 +305,7 @@ func (*DeleteStudyRequest) ProtoMessage() {} func (x *DeleteStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +343,9 @@ type LookupStudyRequest struct { func (x *LookupStudyRequest) Reset() { *x = LookupStudyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupStudyRequest) String() string { @@ -368,7 +356,7 @@ func (*LookupStudyRequest) ProtoMessage() {} func (x *LookupStudyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +455,9 @@ type SuggestTrialsRequest struct { func (x *SuggestTrialsRequest) Reset() { *x = SuggestTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsRequest) String() string { @@ -482,7 +468,7 @@ func (*SuggestTrialsRequest) ProtoMessage() {} func (x *SuggestTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +530,9 @@ type SuggestTrialsResponse struct { func (x *SuggestTrialsResponse) Reset() { *x = SuggestTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsResponse) String() string { @@ -559,7 +543,7 @@ func (*SuggestTrialsResponse) ProtoMessage() {} func (x *SuggestTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +604,9 @@ type SuggestTrialsMetadata struct { func (x *SuggestTrialsMetadata) Reset() { *x = SuggestTrialsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestTrialsMetadata) String() string { @@ -635,7 +617,7 @@ func (*SuggestTrialsMetadata) ProtoMessage() {} func (x *SuggestTrialsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +662,9 @@ type CreateTrialRequest struct { func (x *CreateTrialRequest) Reset() { *x = CreateTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTrialRequest) String() string { @@ -695,7 +675,7 @@ func (*CreateTrialRequest) ProtoMessage() {} func (x *CreateTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +719,9 @@ type GetTrialRequest struct { func (x *GetTrialRequest) Reset() { *x = GetTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTrialRequest) String() string { @@ -754,7 +732,7 @@ func (*GetTrialRequest) ProtoMessage() {} func (x *GetTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +774,9 @@ type ListTrialsRequest struct { func (x *ListTrialsRequest) Reset() { *x = ListTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrialsRequest) String() string { @@ -811,7 +787,7 @@ func (*ListTrialsRequest) ProtoMessage() {} func (x *ListTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +840,9 @@ type ListTrialsResponse struct { func (x *ListTrialsResponse) Reset() { *x = ListTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrialsResponse) String() string { @@ -879,7 +853,7 @@ func (*ListTrialsResponse) ProtoMessage() {} func (x *ListTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,11 +899,9 @@ type AddTrialMeasurementRequest struct { func (x *AddTrialMeasurementRequest) Reset() { *x = AddTrialMeasurementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddTrialMeasurementRequest) String() string { @@ -940,7 +912,7 @@ func (*AddTrialMeasurementRequest) ProtoMessage() {} func (x *AddTrialMeasurementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +966,9 @@ type CompleteTrialRequest struct { func (x *CompleteTrialRequest) Reset() { *x = CompleteTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteTrialRequest) String() string { @@ -1009,7 +979,7 @@ func (*CompleteTrialRequest) ProtoMessage() {} func (x *CompleteTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1037,9 @@ type DeleteTrialRequest struct { func (x *DeleteTrialRequest) Reset() { *x = DeleteTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTrialRequest) String() string { @@ -1082,7 +1050,7 @@ func (*DeleteTrialRequest) ProtoMessage() {} func (x *DeleteTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1119,11 +1087,9 @@ type CheckTrialEarlyStoppingStateRequest struct { func (x *CheckTrialEarlyStoppingStateRequest) Reset() { *x = CheckTrialEarlyStoppingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateRequest) String() string { @@ -1134,7 +1100,7 @@ func (*CheckTrialEarlyStoppingStateRequest) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1135,9 @@ type CheckTrialEarlyStoppingStateResponse struct { func (x *CheckTrialEarlyStoppingStateResponse) Reset() { *x = CheckTrialEarlyStoppingStateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateResponse) String() string { @@ -1184,7 +1148,7 @@ func (*CheckTrialEarlyStoppingStateResponse) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1224,11 +1188,9 @@ type CheckTrialEarlyStoppingStateMetatdata struct { func (x *CheckTrialEarlyStoppingStateMetatdata) Reset() { *x = CheckTrialEarlyStoppingStateMetatdata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckTrialEarlyStoppingStateMetatdata) String() string { @@ -1239,7 +1201,7 @@ func (*CheckTrialEarlyStoppingStateMetatdata) ProtoMessage() {} func (x *CheckTrialEarlyStoppingStateMetatdata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1252,9 @@ type StopTrialRequest struct { func (x *StopTrialRequest) Reset() { *x = StopTrialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopTrialRequest) String() string { @@ -1305,7 +1265,7 @@ func (*StopTrialRequest) ProtoMessage() {} func (x *StopTrialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1300,9 @@ type ListOptimalTrialsRequest struct { func (x *ListOptimalTrialsRequest) Reset() { *x = ListOptimalTrialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOptimalTrialsRequest) String() string { @@ -1355,7 +1313,7 @@ func (*ListOptimalTrialsRequest) ProtoMessage() {} func (x *ListOptimalTrialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1351,9 @@ type ListOptimalTrialsResponse struct { func (x *ListOptimalTrialsResponse) Reset() { *x = ListOptimalTrialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOptimalTrialsResponse) String() string { @@ -1408,7 +1364,7 @@ func (*ListOptimalTrialsResponse) ProtoMessage() {} func (x *ListOptimalTrialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,272 +1928,6 @@ func file_google_cloud_aiplatform_v1beta1_vizier_service_proto_init() { } file_google_cloud_aiplatform_v1beta1_operation_proto_init() file_google_cloud_aiplatform_v1beta1_study_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListStudiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListStudiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LookupStudyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SuggestTrialsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddTrialMeasurementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CompleteTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CheckTrialEarlyStoppingStateMetatdata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StopTrialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListOptimalTrialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_aiplatform_v1beta1_vizier_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListOptimalTrialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aiplatform/apiv1beta1/dataset_client.go b/aiplatform/apiv1beta1/dataset_client.go index 3da547c0b299..91481e4f205c 100755 --- a/aiplatform/apiv1beta1/dataset_client.go +++ b/aiplatform/apiv1beta1/dataset_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -516,6 +515,8 @@ type datasetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDatasetClient creates a new dataset service client based on gRPC. @@ -542,6 +543,7 @@ func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*Datase connPool: connPool, datasetClient: aiplatformpb.NewDatasetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -607,6 +609,8 @@ type datasetRESTClient struct { // Points back to the CallOptions field of the containing DatasetClient CallOptions **DatasetCallOptions + + logger *slog.Logger } // NewDatasetRESTClient creates a new dataset service rest client. @@ -624,6 +628,7 @@ func NewDatasetRESTClient(ctx context.Context, opts ...option.ClientOption) (*Da endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -686,7 +691,7 @@ func (c *datasetGRPCClient) CreateDataset(ctx context.Context, req *aiplatformpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -706,7 +711,7 @@ func (c *datasetGRPCClient) GetDataset(ctx context.Context, req *aiplatformpb.Ge var resp *aiplatformpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -724,7 +729,7 @@ func (c *datasetGRPCClient) UpdateDataset(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.UpdateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.UpdateDataset, req, settings.GRPC, c.logger, "UpdateDataset") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *datasetGRPCClient) ListDatasets(ctx context.Context, req *aiplatformpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *datasetGRPCClient) DeleteDataset(ctx context.Context, req *aiplatformpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) if err != nil { @@ -808,7 +813,7 @@ func (c *datasetGRPCClient) ImportData(ctx context.Context, req *aiplatformpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *datasetGRPCClient) ExportData(ctx context.Context, req *aiplatformpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *datasetGRPCClient) CreateDatasetVersion(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.CreateDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.CreateDatasetVersion, req, settings.GRPC, c.logger, "CreateDatasetVersion") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *datasetGRPCClient) UpdateDatasetVersion(ctx context.Context, req *aipla var resp *aiplatformpb.DatasetVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.UpdateDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.UpdateDatasetVersion, req, settings.GRPC, c.logger, "UpdateDatasetVersion") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *datasetGRPCClient) DeleteDatasetVersion(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteDatasetVersion, req, settings.GRPC, c.logger, "DeleteDatasetVersion") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *datasetGRPCClient) GetDatasetVersion(ctx context.Context, req *aiplatfo var resp *aiplatformpb.DatasetVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetDatasetVersion, req, settings.GRPC, c.logger, "GetDatasetVersion") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *datasetGRPCClient) ListDatasetVersions(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDatasetVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDatasetVersions, req, settings.GRPC, c.logger, "ListDatasetVersions") return err }, opts...) if err != nil { @@ -970,7 +975,7 @@ func (c *datasetGRPCClient) RestoreDatasetVersion(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.RestoreDatasetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.RestoreDatasetVersion, req, settings.GRPC, c.logger, "RestoreDatasetVersion") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *datasetGRPCClient) ListDataItems(ctx context.Context, req *aiplatformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListDataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListDataItems, req, settings.GRPC, c.logger, "ListDataItems") return err }, opts...) if err != nil { @@ -1047,7 +1052,7 @@ func (c *datasetGRPCClient) SearchDataItems(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.SearchDataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.SearchDataItems, req, settings.GRPC, c.logger, "SearchDataItems") return err }, opts...) if err != nil { @@ -1093,7 +1098,7 @@ func (c *datasetGRPCClient) ListSavedQueries(ctx context.Context, req *aiplatfor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListSavedQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListSavedQueries, req, settings.GRPC, c.logger, "ListSavedQueries") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *datasetGRPCClient) DeleteSavedQuery(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.DeleteSavedQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.DeleteSavedQuery, req, settings.GRPC, c.logger, "DeleteSavedQuery") return err }, opts...) if err != nil { @@ -1148,7 +1153,7 @@ func (c *datasetGRPCClient) GetAnnotationSpec(ctx context.Context, req *aiplatfo var resp *aiplatformpb.AnnotationSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.GetAnnotationSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.GetAnnotationSpec, req, settings.GRPC, c.logger, "GetAnnotationSpec") return err }, opts...) if err != nil { @@ -1177,7 +1182,7 @@ func (c *datasetGRPCClient) ListAnnotations(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datasetClient.ListAnnotations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datasetClient.ListAnnotations, req, settings.GRPC, c.logger, "ListAnnotations") return err }, opts...) if err != nil { @@ -1212,7 +1217,7 @@ func (c *datasetGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1241,7 +1246,7 @@ func (c *datasetGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1276,7 +1281,7 @@ func (c *datasetGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1294,7 +1299,7 @@ func (c *datasetGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1312,7 +1317,7 @@ func (c *datasetGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1329,7 +1334,7 @@ func (c *datasetGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1343,7 +1348,7 @@ func (c *datasetGRPCClient) DeleteOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1358,7 +1363,7 @@ func (c *datasetGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1387,7 +1392,7 @@ func (c *datasetGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *datasetGRPCClient) WaitOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1470,21 +1475,10 @@ func (c *datasetRESTClient) CreateDataset(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1542,17 +1536,7 @@ func (c *datasetRESTClient) GetDataset(ctx context.Context, req *aiplatformpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataset") if err != nil { return err } @@ -1616,17 +1600,7 @@ func (c *datasetRESTClient) UpdateDataset(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataset") if err != nil { return err } @@ -1701,21 +1675,10 @@ func (c *datasetRESTClient) ListDatasets(ctx context.Context, req *aiplatformpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1777,21 +1740,10 @@ func (c *datasetRESTClient) DeleteDataset(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1847,21 +1799,10 @@ func (c *datasetRESTClient) ImportData(ctx context.Context, req *aiplatformpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1917,21 +1858,10 @@ func (c *datasetRESTClient) ExportData(ctx context.Context, req *aiplatformpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1988,21 +1918,10 @@ func (c *datasetRESTClient) CreateDatasetVersion(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatasetVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2067,17 +1986,7 @@ func (c *datasetRESTClient) UpdateDatasetVersion(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatasetVersion") if err != nil { return err } @@ -2126,21 +2035,10 @@ func (c *datasetRESTClient) DeleteDatasetVersion(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDatasetVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2198,17 +2096,7 @@ func (c *datasetRESTClient) GetDatasetVersion(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatasetVersion") if err != nil { return err } @@ -2283,21 +2171,10 @@ func (c *datasetRESTClient) ListDatasetVersions(ctx context.Context, req *aiplat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasetVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2359,21 +2236,10 @@ func (c *datasetRESTClient) RestoreDatasetVersion(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RestoreDatasetVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2449,21 +2315,10 @@ func (c *datasetRESTClient) ListDataItems(ctx context.Context, req *aiplatformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataItems") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2575,21 +2430,10 @@ func (c *datasetRESTClient) SearchDataItems(ctx context.Context, req *aiplatform } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchDataItems") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2677,21 +2521,10 @@ func (c *datasetRESTClient) ListSavedQueries(ctx context.Context, req *aiplatfor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSavedQueries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2753,21 +2586,10 @@ func (c *datasetRESTClient) DeleteSavedQuery(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSavedQuery") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2825,17 +2647,7 @@ func (c *datasetRESTClient) GetAnnotationSpec(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotationSpec") if err != nil { return err } @@ -2910,21 +2722,10 @@ func (c *datasetRESTClient) ListAnnotations(ctx context.Context, req *aiplatform } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnnotations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2987,17 +2788,7 @@ func (c *datasetRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3062,21 +2853,10 @@ func (c *datasetRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3146,17 +2926,7 @@ func (c *datasetRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -3216,17 +2986,7 @@ func (c *datasetRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3288,17 +3048,7 @@ func (c *datasetRESTClient) TestIamPermissions(ctx context.Context, req *iampb.T httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3345,15 +3095,8 @@ func (c *datasetRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3387,15 +3130,8 @@ func (c *datasetRESTClient) DeleteOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3432,17 +3168,7 @@ func (c *datasetRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3507,21 +3233,10 @@ func (c *datasetRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3591,17 +3306,7 @@ func (c *datasetRESTClient) WaitOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/dataset_client_example_go123_test.go b/aiplatform/apiv1beta1/dataset_client_example_go123_test.go index d637d335f62b..99968fbc189d 100644 --- a/aiplatform/apiv1beta1/dataset_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/dataset_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDatasetClient_ListAnnotations_all() { } for resp, err := range c.ListAnnotations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDatasetClient_ListDataItems_all() { } for resp, err := range c.ListDataItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDatasetClient_ListDatasetVersions_all() { } for resp, err := range c.ListDatasetVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDatasetClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDatasetClient_ListSavedQueries_all() { } for resp, err := range c.ListSavedQueries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleDatasetClient_SearchDataItems_all() { } for resp, err := range c.SearchDataItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleDatasetClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleDatasetClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/deployment_resource_pool_client.go b/aiplatform/apiv1beta1/deployment_resource_pool_client.go index 824152080fed..545741e75112 100755 --- a/aiplatform/apiv1beta1/deployment_resource_pool_client.go +++ b/aiplatform/apiv1beta1/deployment_resource_pool_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -323,6 +322,8 @@ type deploymentResourcePoolGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDeploymentResourcePoolClient creates a new deployment resource pool service client based on gRPC. @@ -349,6 +350,7 @@ func NewDeploymentResourcePoolClient(ctx context.Context, opts ...option.ClientO connPool: connPool, deploymentResourcePoolClient: aiplatformpb.NewDeploymentResourcePoolServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -414,6 +416,8 @@ type deploymentResourcePoolRESTClient struct { // Points back to the CallOptions field of the containing DeploymentResourcePoolClient CallOptions **DeploymentResourcePoolCallOptions + + logger *slog.Logger } // NewDeploymentResourcePoolRESTClient creates a new deployment resource pool service rest client. @@ -431,6 +435,7 @@ func NewDeploymentResourcePoolRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -493,7 +498,7 @@ func (c *deploymentResourcePoolGRPCClient) CreateDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.CreateDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.CreateDeploymentResourcePool, req, settings.GRPC, c.logger, "CreateDeploymentResourcePool") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *deploymentResourcePoolGRPCClient) GetDeploymentResourcePool(ctx context var resp *aiplatformpb.DeploymentResourcePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.GetDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.GetDeploymentResourcePool, req, settings.GRPC, c.logger, "GetDeploymentResourcePool") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *deploymentResourcePoolGRPCClient) ListDeploymentResourcePools(ctx conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.ListDeploymentResourcePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.ListDeploymentResourcePools, req, settings.GRPC, c.logger, "ListDeploymentResourcePools") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *deploymentResourcePoolGRPCClient) UpdateDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.UpdateDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.UpdateDeploymentResourcePool, req, settings.GRPC, c.logger, "UpdateDeploymentResourcePool") return err }, opts...) if err != nil { @@ -597,7 +602,7 @@ func (c *deploymentResourcePoolGRPCClient) DeleteDeploymentResourcePool(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.DeleteDeploymentResourcePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.DeleteDeploymentResourcePool, req, settings.GRPC, c.logger, "DeleteDeploymentResourcePool") return err }, opts...) if err != nil { @@ -628,7 +633,7 @@ func (c *deploymentResourcePoolGRPCClient) QueryDeployedModels(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentResourcePoolClient.QueryDeployedModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentResourcePoolClient.QueryDeployedModels, req, settings.GRPC, c.logger, "QueryDeployedModels") return err }, opts...) if err != nil { @@ -663,7 +668,7 @@ func (c *deploymentResourcePoolGRPCClient) GetLocation(ctx context.Context, req var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *deploymentResourcePoolGRPCClient) ListLocations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *deploymentResourcePoolGRPCClient) GetIamPolicy(ctx context.Context, req var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *deploymentResourcePoolGRPCClient) SetIamPolicy(ctx context.Context, req var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *deploymentResourcePoolGRPCClient) TestIamPermissions(ctx context.Contex var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *deploymentResourcePoolGRPCClient) CancelOperation(ctx context.Context, opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -794,7 +799,7 @@ func (c *deploymentResourcePoolGRPCClient) DeleteOperation(ctx context.Context, opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -809,7 +814,7 @@ func (c *deploymentResourcePoolGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -838,7 +843,7 @@ func (c *deploymentResourcePoolGRPCClient) ListOperations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *deploymentResourcePoolGRPCClient) WaitOperation(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -920,21 +925,10 @@ func (c *deploymentResourcePoolRESTClient) CreateDeploymentResourcePool(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeploymentResourcePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -985,17 +979,7 @@ func (c *deploymentResourcePoolRESTClient) GetDeploymentResourcePool(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeploymentResourcePool") if err != nil { return err } @@ -1057,21 +1041,10 @@ func (c *deploymentResourcePoolRESTClient) ListDeploymentResourcePools(ctx conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeploymentResourcePools") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1147,21 +1120,10 @@ func (c *deploymentResourcePoolRESTClient) UpdateDeploymentResourcePool(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeploymentResourcePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1211,21 +1173,10 @@ func (c *deploymentResourcePoolRESTClient) DeleteDeploymentResourcePool(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeploymentResourcePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1288,21 +1239,10 @@ func (c *deploymentResourcePoolRESTClient) QueryDeployedModels(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryDeployedModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1365,17 +1305,7 @@ func (c *deploymentResourcePoolRESTClient) GetLocation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1440,21 +1370,10 @@ func (c *deploymentResourcePoolRESTClient) ListLocations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1524,17 +1443,7 @@ func (c *deploymentResourcePoolRESTClient) GetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1594,17 +1503,7 @@ func (c *deploymentResourcePoolRESTClient) SetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1666,17 +1565,7 @@ func (c *deploymentResourcePoolRESTClient) TestIamPermissions(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1723,15 +1612,8 @@ func (c *deploymentResourcePoolRESTClient) CancelOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1765,15 +1647,8 @@ func (c *deploymentResourcePoolRESTClient) DeleteOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1810,17 +1685,7 @@ func (c *deploymentResourcePoolRESTClient) GetOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1885,21 +1750,10 @@ func (c *deploymentResourcePoolRESTClient) ListOperations(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1969,17 +1823,7 @@ func (c *deploymentResourcePoolRESTClient) WaitOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/deployment_resource_pool_client_example_go123_test.go b/aiplatform/apiv1beta1/deployment_resource_pool_client_example_go123_test.go index 5401786a1b54..1bc05522a63b 100644 --- a/aiplatform/apiv1beta1/deployment_resource_pool_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/deployment_resource_pool_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDeploymentResourcePoolClient_ListDeploymentResourcePools_all() { } for resp, err := range c.ListDeploymentResourcePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDeploymentResourcePoolClient_QueryDeployedModels_all() { } for resp, err := range c.QueryDeployedModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDeploymentResourcePoolClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDeploymentResourcePoolClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/endpoint_client.go b/aiplatform/apiv1beta1/endpoint_client.go index c82083d8f003..8a86ddf4a549 100755 --- a/aiplatform/apiv1beta1/endpoint_client.go +++ b/aiplatform/apiv1beta1/endpoint_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -404,6 +403,8 @@ type endpointGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEndpointClient creates a new endpoint service client based on gRPC. @@ -430,6 +431,7 @@ func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*Endpo connPool: connPool, endpointClient: aiplatformpb.NewEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -495,6 +497,8 @@ type endpointRESTClient struct { // Points back to the CallOptions field of the containing EndpointClient CallOptions **EndpointCallOptions + + logger *slog.Logger } // NewEndpointRESTClient creates a new endpoint service rest client. @@ -512,6 +516,7 @@ func NewEndpointRESTClient(ctx context.Context, opts ...option.ClientOption) (*E endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -574,7 +579,7 @@ func (c *endpointGRPCClient) CreateEndpoint(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.CreateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.CreateEndpoint, req, settings.GRPC, c.logger, "CreateEndpoint") return err }, opts...) if err != nil { @@ -594,7 +599,7 @@ func (c *endpointGRPCClient) GetEndpoint(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.GetEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.GetEndpoint, req, settings.GRPC, c.logger, "GetEndpoint") return err }, opts...) if err != nil { @@ -623,7 +628,7 @@ func (c *endpointGRPCClient) ListEndpoints(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.ListEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.ListEndpoints, req, settings.GRPC, c.logger, "ListEndpoints") return err }, opts...) if err != nil { @@ -658,7 +663,7 @@ func (c *endpointGRPCClient) UpdateEndpoint(ctx context.Context, req *aiplatform var resp *aiplatformpb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UpdateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UpdateEndpoint, req, settings.GRPC, c.logger, "UpdateEndpoint") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *endpointGRPCClient) UpdateEndpointLongRunning(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UpdateEndpointLongRunning(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UpdateEndpointLongRunning, req, settings.GRPC, c.logger, "UpdateEndpointLongRunning") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *endpointGRPCClient) DeleteEndpoint(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.DeleteEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.DeleteEndpoint, req, settings.GRPC, c.logger, "DeleteEndpoint") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *endpointGRPCClient) DeployModel(ctx context.Context, req *aiplatformpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.DeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.DeployModel, req, settings.GRPC, c.logger, "DeployModel") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *endpointGRPCClient) UndeployModel(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.UndeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.UndeployModel, req, settings.GRPC, c.logger, "UndeployModel") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *endpointGRPCClient) MutateDeployedModel(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.endpointClient.MutateDeployedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.endpointClient.MutateDeployedModel, req, settings.GRPC, c.logger, "MutateDeployedModel") return err }, opts...) if err != nil { @@ -776,7 +781,7 @@ func (c *endpointGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -805,7 +810,7 @@ func (c *endpointGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -840,7 +845,7 @@ func (c *endpointGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *endpointGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *endpointGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -893,7 +898,7 @@ func (c *endpointGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -907,7 +912,7 @@ func (c *endpointGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -922,7 +927,7 @@ func (c *endpointGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *endpointGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *endpointGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1037,21 +1042,10 @@ func (c *endpointRESTClient) CreateEndpoint(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1102,17 +1096,7 @@ func (c *endpointRESTClient) GetEndpoint(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEndpoint") if err != nil { return err } @@ -1184,21 +1168,10 @@ func (c *endpointRESTClient) ListEndpoints(ctx context.Context, req *aiplatformp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEndpoints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1275,17 +1248,7 @@ func (c *endpointRESTClient) UpdateEndpoint(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEndpoint") if err != nil { return err } @@ -1340,21 +1303,10 @@ func (c *endpointRESTClient) UpdateEndpointLongRunning(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEndpointLongRunning") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1404,21 +1356,10 @@ func (c *endpointRESTClient) DeleteEndpoint(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1474,21 +1415,10 @@ func (c *endpointRESTClient) DeployModel(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1545,21 +1475,10 @@ func (c *endpointRESTClient) UndeployModel(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1618,21 +1537,10 @@ func (c *endpointRESTClient) MutateDeployedModel(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MutateDeployedModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1683,17 +1591,7 @@ func (c *endpointRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1758,21 +1656,10 @@ func (c *endpointRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1842,17 +1729,7 @@ func (c *endpointRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1912,17 +1789,7 @@ func (c *endpointRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1984,17 +1851,7 @@ func (c *endpointRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2041,15 +1898,8 @@ func (c *endpointRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2083,15 +1933,8 @@ func (c *endpointRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2128,17 +1971,7 @@ func (c *endpointRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2203,21 +2036,10 @@ func (c *endpointRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2287,17 +2109,7 @@ func (c *endpointRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/endpoint_client_example_go123_test.go b/aiplatform/apiv1beta1/endpoint_client_example_go123_test.go index 6bf9a71ed82e..419e63596ba2 100644 --- a/aiplatform/apiv1beta1/endpoint_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/endpoint_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEndpointClient_ListEndpoints_all() { } for resp, err := range c.ListEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEndpointClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEndpointClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/evaluation_client.go b/aiplatform/apiv1beta1/evaluation_client.go index 7ab408a79dbf..b89a2186a63d 100755 --- a/aiplatform/apiv1beta1/evaluation_client.go +++ b/aiplatform/apiv1beta1/evaluation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -250,6 +249,8 @@ type evaluationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEvaluationClient creates a new evaluation service client based on gRPC. @@ -276,6 +277,7 @@ func NewEvaluationClient(ctx context.Context, opts ...option.ClientOption) (*Eva connPool: connPool, evaluationClient: aiplatformpb.NewEvaluationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -325,6 +327,8 @@ type evaluationRESTClient struct { // Points back to the CallOptions field of the containing EvaluationClient CallOptions **EvaluationCallOptions + + logger *slog.Logger } // NewEvaluationRESTClient creates a new evaluation service rest client. @@ -342,6 +346,7 @@ func NewEvaluationRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -394,7 +399,7 @@ func (c *evaluationGRPCClient) EvaluateInstances(ctx context.Context, req *aipla var resp *aiplatformpb.EvaluateInstancesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.EvaluateInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.EvaluateInstances, req, settings.GRPC, c.logger, "EvaluateInstances") return err }, opts...) if err != nil { @@ -412,7 +417,7 @@ func (c *evaluationGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -441,7 +446,7 @@ func (c *evaluationGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -476,7 +481,7 @@ func (c *evaluationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *evaluationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *evaluationGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -529,7 +534,7 @@ func (c *evaluationGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -543,7 +548,7 @@ func (c *evaluationGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -558,7 +563,7 @@ func (c *evaluationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *evaluationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *evaluationGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -670,17 +675,7 @@ func (c *evaluationRESTClient) EvaluateInstances(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EvaluateInstances") if err != nil { return err } @@ -730,17 +725,7 @@ func (c *evaluationRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -805,21 +790,10 @@ func (c *evaluationRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -889,17 +863,7 @@ func (c *evaluationRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -959,17 +923,7 @@ func (c *evaluationRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1031,17 +985,7 @@ func (c *evaluationRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1088,15 +1032,8 @@ func (c *evaluationRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1130,15 +1067,8 @@ func (c *evaluationRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1175,17 +1105,7 @@ func (c *evaluationRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1250,21 +1170,10 @@ func (c *evaluationRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1334,17 +1243,7 @@ func (c *evaluationRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/evaluation_client_example_go123_test.go b/aiplatform/apiv1beta1/evaluation_client_example_go123_test.go index be4b23e8f398..1a996236f364 100644 --- a/aiplatform/apiv1beta1/evaluation_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/evaluation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEvaluationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEvaluationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/extension_execution_client.go b/aiplatform/apiv1beta1/extension_execution_client.go index 7495edc5e268..dbca5169c748 100755 --- a/aiplatform/apiv1beta1/extension_execution_client.go +++ b/aiplatform/apiv1beta1/extension_execution_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -254,6 +253,8 @@ type extensionExecutionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExtensionExecutionClient creates a new extension execution service client based on gRPC. @@ -280,6 +281,7 @@ func NewExtensionExecutionClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, extensionExecutionClient: aiplatformpb.NewExtensionExecutionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -329,6 +331,8 @@ type extensionExecutionRESTClient struct { // Points back to the CallOptions field of the containing ExtensionExecutionClient CallOptions **ExtensionExecutionCallOptions + + logger *slog.Logger } // NewExtensionExecutionRESTClient creates a new extension execution service rest client. @@ -346,6 +350,7 @@ func NewExtensionExecutionRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,7 +403,7 @@ func (c *extensionExecutionGRPCClient) ExecuteExtension(ctx context.Context, req var resp *aiplatformpb.ExecuteExtensionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionExecutionClient.ExecuteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionExecutionClient.ExecuteExtension, req, settings.GRPC, c.logger, "ExecuteExtension") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *extensionExecutionGRPCClient) QueryExtension(ctx context.Context, req * var resp *aiplatformpb.QueryExtensionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionExecutionClient.QueryExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionExecutionClient.QueryExtension, req, settings.GRPC, c.logger, "QueryExtension") return err }, opts...) if err != nil { @@ -434,7 +439,7 @@ func (c *extensionExecutionGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *extensionExecutionGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -498,7 +503,7 @@ func (c *extensionExecutionGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -516,7 +521,7 @@ func (c *extensionExecutionGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -534,7 +539,7 @@ func (c *extensionExecutionGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *extensionExecutionGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -565,7 +570,7 @@ func (c *extensionExecutionGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -580,7 +585,7 @@ func (c *extensionExecutionGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -609,7 +614,7 @@ func (c *extensionExecutionGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *extensionExecutionGRPCClient) WaitOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -692,17 +697,7 @@ func (c *extensionExecutionRESTClient) ExecuteExtension(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteExtension") if err != nil { return err } @@ -758,17 +753,7 @@ func (c *extensionExecutionRESTClient) QueryExtension(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryExtension") if err != nil { return err } @@ -818,17 +803,7 @@ func (c *extensionExecutionRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -893,21 +868,10 @@ func (c *extensionExecutionRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -977,17 +941,7 @@ func (c *extensionExecutionRESTClient) GetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1047,17 +1001,7 @@ func (c *extensionExecutionRESTClient) SetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1119,17 +1063,7 @@ func (c *extensionExecutionRESTClient) TestIamPermissions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1176,15 +1110,8 @@ func (c *extensionExecutionRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1218,15 +1145,8 @@ func (c *extensionExecutionRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1263,17 +1183,7 @@ func (c *extensionExecutionRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1338,21 +1248,10 @@ func (c *extensionExecutionRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1422,17 +1321,7 @@ func (c *extensionExecutionRESTClient) WaitOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/extension_execution_client_example_go123_test.go b/aiplatform/apiv1beta1/extension_execution_client_example_go123_test.go index 6b7c97c3e309..8432522390c9 100644 --- a/aiplatform/apiv1beta1/extension_execution_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/extension_execution_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleExtensionExecutionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleExtensionExecutionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/extension_registry_client.go b/aiplatform/apiv1beta1/extension_registry_client.go index 258aa4d94781..5cb421a75ee4 100755 --- a/aiplatform/apiv1beta1/extension_registry_client.go +++ b/aiplatform/apiv1beta1/extension_registry_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -307,6 +306,8 @@ type extensionRegistryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExtensionRegistryClient creates a new extension registry service client based on gRPC. @@ -333,6 +334,7 @@ func NewExtensionRegistryClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, extensionRegistryClient: aiplatformpb.NewExtensionRegistryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -398,6 +400,8 @@ type extensionRegistryRESTClient struct { // Points back to the CallOptions field of the containing ExtensionRegistryClient CallOptions **ExtensionRegistryCallOptions + + logger *slog.Logger } // NewExtensionRegistryRESTClient creates a new extension registry service rest client. @@ -415,6 +419,7 @@ func NewExtensionRegistryRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -477,7 +482,7 @@ func (c *extensionRegistryGRPCClient) ImportExtension(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionRegistryClient.ImportExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionRegistryClient.ImportExtension, req, settings.GRPC, c.logger, "ImportExtension") return err }, opts...) if err != nil { @@ -497,7 +502,7 @@ func (c *extensionRegistryGRPCClient) GetExtension(ctx context.Context, req *aip var resp *aiplatformpb.Extension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionRegistryClient.GetExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionRegistryClient.GetExtension, req, settings.GRPC, c.logger, "GetExtension") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *extensionRegistryGRPCClient) ListExtensions(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionRegistryClient.ListExtensions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionRegistryClient.ListExtensions, req, settings.GRPC, c.logger, "ListExtensions") return err }, opts...) if err != nil { @@ -561,7 +566,7 @@ func (c *extensionRegistryGRPCClient) UpdateExtension(ctx context.Context, req * var resp *aiplatformpb.Extension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionRegistryClient.UpdateExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionRegistryClient.UpdateExtension, req, settings.GRPC, c.logger, "UpdateExtension") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *extensionRegistryGRPCClient) DeleteExtension(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.extensionRegistryClient.DeleteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.extensionRegistryClient.DeleteExtension, req, settings.GRPC, c.logger, "DeleteExtension") return err }, opts...) if err != nil { @@ -599,7 +604,7 @@ func (c *extensionRegistryGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -628,7 +633,7 @@ func (c *extensionRegistryGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -663,7 +668,7 @@ func (c *extensionRegistryGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *extensionRegistryGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -699,7 +704,7 @@ func (c *extensionRegistryGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *extensionRegistryGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -730,7 +735,7 @@ func (c *extensionRegistryGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -745,7 +750,7 @@ func (c *extensionRegistryGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -774,7 +779,7 @@ func (c *extensionRegistryGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *extensionRegistryGRPCClient) WaitOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -857,21 +862,10 @@ func (c *extensionRegistryRESTClient) ImportExtension(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -922,17 +916,7 @@ func (c *extensionRegistryRESTClient) GetExtension(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExtension") if err != nil { return err } @@ -1000,21 +984,10 @@ func (c *extensionRegistryRESTClient) ListExtensions(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExtensions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1091,17 +1064,7 @@ func (c *extensionRegistryRESTClient) UpdateExtension(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExtension") if err != nil { return err } @@ -1150,21 +1113,10 @@ func (c *extensionRegistryRESTClient) DeleteExtension(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1215,17 +1167,7 @@ func (c *extensionRegistryRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1290,21 +1232,10 @@ func (c *extensionRegistryRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1374,17 +1305,7 @@ func (c *extensionRegistryRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1444,17 +1365,7 @@ func (c *extensionRegistryRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1516,17 +1427,7 @@ func (c *extensionRegistryRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1573,15 +1474,8 @@ func (c *extensionRegistryRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1615,15 +1509,8 @@ func (c *extensionRegistryRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1660,17 +1547,7 @@ func (c *extensionRegistryRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1735,21 +1612,10 @@ func (c *extensionRegistryRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1819,17 +1685,7 @@ func (c *extensionRegistryRESTClient) WaitOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/extension_registry_client_example_go123_test.go b/aiplatform/apiv1beta1/extension_registry_client_example_go123_test.go index ac3a224412dd..8e80ac01f917 100644 --- a/aiplatform/apiv1beta1/extension_registry_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/extension_registry_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleExtensionRegistryClient_ListExtensions_all() { } for resp, err := range c.ListExtensions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleExtensionRegistryClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleExtensionRegistryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/feature_online_store_admin_client.go b/aiplatform/apiv1beta1/feature_online_store_admin_client.go index dd655250fe27..b84ea05e9d6f 100755 --- a/aiplatform/apiv1beta1/feature_online_store_admin_client.go +++ b/aiplatform/apiv1beta1/feature_online_store_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -450,6 +449,8 @@ type featureOnlineStoreAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureOnlineStoreAdminClient creates a new feature online store admin service client based on gRPC. @@ -477,6 +478,7 @@ func NewFeatureOnlineStoreAdminClient(ctx context.Context, opts ...option.Client connPool: connPool, featureOnlineStoreAdminClient: aiplatformpb.NewFeatureOnlineStoreAdminServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -542,6 +544,8 @@ type featureOnlineStoreAdminRESTClient struct { // Points back to the CallOptions field of the containing FeatureOnlineStoreAdminClient CallOptions **FeatureOnlineStoreAdminCallOptions + + logger *slog.Logger } // NewFeatureOnlineStoreAdminRESTClient creates a new feature online store admin service rest client. @@ -560,6 +564,7 @@ func NewFeatureOnlineStoreAdminRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -622,7 +627,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CreateFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.CreateFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.CreateFeatureOnlineStore, req, settings.GRPC, c.logger, "CreateFeatureOnlineStore") return err }, opts...) if err != nil { @@ -642,7 +647,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureOnlineStore(ctx context.Co var resp *aiplatformpb.FeatureOnlineStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureOnlineStore, req, settings.GRPC, c.logger, "GetFeatureOnlineStore") return err }, opts...) if err != nil { @@ -671,7 +676,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureOnlineStores(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureOnlineStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureOnlineStores, req, settings.GRPC, c.logger, "ListFeatureOnlineStores") return err }, opts...) if err != nil { @@ -706,7 +711,7 @@ func (c *featureOnlineStoreAdminGRPCClient) UpdateFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.UpdateFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.UpdateFeatureOnlineStore, req, settings.GRPC, c.logger, "UpdateFeatureOnlineStore") return err }, opts...) if err != nil { @@ -726,7 +731,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteFeatureOnlineStore(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.DeleteFeatureOnlineStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.DeleteFeatureOnlineStore, req, settings.GRPC, c.logger, "DeleteFeatureOnlineStore") return err }, opts...) if err != nil { @@ -746,7 +751,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CreateFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.CreateFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.CreateFeatureView, req, settings.GRPC, c.logger, "CreateFeatureView") return err }, opts...) if err != nil { @@ -766,7 +771,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureView(ctx context.Context, var resp *aiplatformpb.FeatureView err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureView, req, settings.GRPC, c.logger, "GetFeatureView") return err }, opts...) if err != nil { @@ -795,7 +800,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureViews(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureViews(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureViews, req, settings.GRPC, c.logger, "ListFeatureViews") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *featureOnlineStoreAdminGRPCClient) UpdateFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.UpdateFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.UpdateFeatureView, req, settings.GRPC, c.logger, "UpdateFeatureView") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteFeatureView(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.DeleteFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.DeleteFeatureView, req, settings.GRPC, c.logger, "DeleteFeatureView") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *featureOnlineStoreAdminGRPCClient) SyncFeatureView(ctx context.Context, var resp *aiplatformpb.SyncFeatureViewResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.SyncFeatureView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.SyncFeatureView, req, settings.GRPC, c.logger, "SyncFeatureView") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetFeatureViewSync(ctx context.Conte var resp *aiplatformpb.FeatureViewSync err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.GetFeatureViewSync(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.GetFeatureViewSync, req, settings.GRPC, c.logger, "GetFeatureViewSync") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListFeatureViewSyncs(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreAdminClient.ListFeatureViewSyncs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreAdminClient.ListFeatureViewSyncs, req, settings.GRPC, c.logger, "ListFeatureViewSyncs") return err }, opts...) if err != nil { @@ -952,7 +957,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetLocation(ctx context.Context, req var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -981,7 +986,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListLocations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1016,7 +1021,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1034,7 +1039,7 @@ func (c *featureOnlineStoreAdminGRPCClient) SetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1052,7 +1057,7 @@ func (c *featureOnlineStoreAdminGRPCClient) TestIamPermissions(ctx context.Conte var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1069,7 +1074,7 @@ func (c *featureOnlineStoreAdminGRPCClient) CancelOperation(ctx context.Context, opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1083,7 +1088,7 @@ func (c *featureOnlineStoreAdminGRPCClient) DeleteOperation(ctx context.Context, opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1098,7 +1103,7 @@ func (c *featureOnlineStoreAdminGRPCClient) GetOperation(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1127,7 +1132,7 @@ func (c *featureOnlineStoreAdminGRPCClient) ListOperations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1162,7 +1167,7 @@ func (c *featureOnlineStoreAdminGRPCClient) WaitOperation(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1211,21 +1216,10 @@ func (c *featureOnlineStoreAdminRESTClient) CreateFeatureOnlineStore(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeatureOnlineStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1276,17 +1270,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetFeatureOnlineStore(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureOnlineStore") if err != nil { return err } @@ -1354,21 +1338,10 @@ func (c *featureOnlineStoreAdminRESTClient) ListFeatureOnlineStores(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureOnlineStores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1444,21 +1417,10 @@ func (c *featureOnlineStoreAdminRESTClient) UpdateFeatureOnlineStore(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeatureOnlineStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1512,21 +1474,10 @@ func (c *featureOnlineStoreAdminRESTClient) DeleteFeatureOnlineStore(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeatureOnlineStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1587,21 +1538,10 @@ func (c *featureOnlineStoreAdminRESTClient) CreateFeatureView(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeatureView") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1652,17 +1592,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetFeatureView(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureView") if err != nil { return err } @@ -1730,21 +1660,10 @@ func (c *featureOnlineStoreAdminRESTClient) ListFeatureViews(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureViews") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1820,21 +1739,10 @@ func (c *featureOnlineStoreAdminRESTClient) UpdateFeatureView(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeatureView") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1884,21 +1792,10 @@ func (c *featureOnlineStoreAdminRESTClient) DeleteFeatureView(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeatureView") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1955,17 +1852,7 @@ func (c *featureOnlineStoreAdminRESTClient) SyncFeatureView(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SyncFeatureView") if err != nil { return err } @@ -2015,17 +1902,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetFeatureViewSync(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureViewSync") if err != nil { return err } @@ -2093,21 +1970,10 @@ func (c *featureOnlineStoreAdminRESTClient) ListFeatureViewSyncs(ctx context.Con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureViewSyncs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2170,17 +2036,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetLocation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2245,21 +2101,10 @@ func (c *featureOnlineStoreAdminRESTClient) ListLocations(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2329,17 +2174,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2399,17 +2234,7 @@ func (c *featureOnlineStoreAdminRESTClient) SetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2471,17 +2296,7 @@ func (c *featureOnlineStoreAdminRESTClient) TestIamPermissions(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2528,15 +2343,8 @@ func (c *featureOnlineStoreAdminRESTClient) CancelOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2570,15 +2378,8 @@ func (c *featureOnlineStoreAdminRESTClient) DeleteOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2615,17 +2416,7 @@ func (c *featureOnlineStoreAdminRESTClient) GetOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2690,21 +2481,10 @@ func (c *featureOnlineStoreAdminRESTClient) ListOperations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2774,17 +2554,7 @@ func (c *featureOnlineStoreAdminRESTClient) WaitOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/feature_online_store_admin_client_example_go123_test.go b/aiplatform/apiv1beta1/feature_online_store_admin_client_example_go123_test.go index f9cabbb4add9..b66d3b6086e0 100644 --- a/aiplatform/apiv1beta1/feature_online_store_admin_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/feature_online_store_admin_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureOnlineStores_all() { } for resp, err := range c.ListFeatureOnlineStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureViewSyncs_all() { } for resp, err := range c.ListFeatureViewSyncs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListFeatureViews_all() { } for resp, err := range c.ListFeatureViews(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleFeatureOnlineStoreAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/feature_online_store_client.go b/aiplatform/apiv1beta1/feature_online_store_client.go index 017757f40773..69dc85fcb138 100755 --- a/aiplatform/apiv1beta1/feature_online_store_client.go +++ b/aiplatform/apiv1beta1/feature_online_store_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -270,6 +269,8 @@ type featureOnlineStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureOnlineStoreClient creates a new feature online store service client based on gRPC. @@ -296,6 +297,7 @@ func NewFeatureOnlineStoreClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, featureOnlineStoreClient: aiplatformpb.NewFeatureOnlineStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -345,6 +347,8 @@ type featureOnlineStoreRESTClient struct { // Points back to the CallOptions field of the containing FeatureOnlineStoreClient CallOptions **FeatureOnlineStoreCallOptions + + logger *slog.Logger } // NewFeatureOnlineStoreRESTClient creates a new feature online store service rest client. @@ -362,6 +366,7 @@ func NewFeatureOnlineStoreRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -414,7 +419,7 @@ func (c *featureOnlineStoreGRPCClient) FetchFeatureValues(ctx context.Context, r var resp *aiplatformpb.FetchFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreClient.FetchFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreClient.FetchFeatureValues, req, settings.GRPC, c.logger, "FetchFeatureValues") return err }, opts...) if err != nil { @@ -429,7 +434,9 @@ func (c *featureOnlineStoreGRPCClient) StreamingFetchFeatureValues(ctx context.C opts = append((*c.CallOptions).StreamingFetchFeatureValues[0:len((*c.CallOptions).StreamingFetchFeatureValues):len((*c.CallOptions).StreamingFetchFeatureValues)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingFetchFeatureValues") resp, err = c.featureOnlineStoreClient.StreamingFetchFeatureValues(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingFetchFeatureValues") return err }, opts...) if err != nil { @@ -447,7 +454,7 @@ func (c *featureOnlineStoreGRPCClient) SearchNearestEntities(ctx context.Context var resp *aiplatformpb.SearchNearestEntitiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureOnlineStoreClient.SearchNearestEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureOnlineStoreClient.SearchNearestEntities, req, settings.GRPC, c.logger, "SearchNearestEntities") return err }, opts...) if err != nil { @@ -465,7 +472,7 @@ func (c *featureOnlineStoreGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -494,7 +501,7 @@ func (c *featureOnlineStoreGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -529,7 +536,7 @@ func (c *featureOnlineStoreGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -547,7 +554,7 @@ func (c *featureOnlineStoreGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -565,7 +572,7 @@ func (c *featureOnlineStoreGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -582,7 +589,7 @@ func (c *featureOnlineStoreGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -596,7 +603,7 @@ func (c *featureOnlineStoreGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -611,7 +618,7 @@ func (c *featureOnlineStoreGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -640,7 +647,7 @@ func (c *featureOnlineStoreGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -675,7 +682,7 @@ func (c *featureOnlineStoreGRPCClient) WaitOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -723,17 +730,7 @@ func (c *featureOnlineStoreRESTClient) FetchFeatureValues(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchFeatureValues") if err != nil { return err } @@ -800,17 +797,7 @@ func (c *featureOnlineStoreRESTClient) SearchNearestEntities(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchNearestEntities") if err != nil { return err } @@ -860,17 +847,7 @@ func (c *featureOnlineStoreRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -935,21 +912,10 @@ func (c *featureOnlineStoreRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1019,17 +985,7 @@ func (c *featureOnlineStoreRESTClient) GetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1089,17 +1045,7 @@ func (c *featureOnlineStoreRESTClient) SetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1161,17 +1107,7 @@ func (c *featureOnlineStoreRESTClient) TestIamPermissions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1218,15 +1154,8 @@ func (c *featureOnlineStoreRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1260,15 +1189,8 @@ func (c *featureOnlineStoreRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1305,17 +1227,7 @@ func (c *featureOnlineStoreRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1380,21 +1292,10 @@ func (c *featureOnlineStoreRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1464,17 +1365,7 @@ func (c *featureOnlineStoreRESTClient) WaitOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/feature_online_store_client_example_go123_test.go b/aiplatform/apiv1beta1/feature_online_store_client_example_go123_test.go index 6e242a8a1de3..d659633726ab 100644 --- a/aiplatform/apiv1beta1/feature_online_store_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/feature_online_store_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFeatureOnlineStoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFeatureOnlineStoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/feature_registry_client.go b/aiplatform/apiv1beta1/feature_registry_client.go index 138639b26003..f525d41512db 100755 --- a/aiplatform/apiv1beta1/feature_registry_client.go +++ b/aiplatform/apiv1beta1/feature_registry_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -474,6 +473,8 @@ type featureRegistryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeatureRegistryClient creates a new feature registry service client based on gRPC. @@ -501,6 +502,7 @@ func NewFeatureRegistryClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, featureRegistryClient: aiplatformpb.NewFeatureRegistryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -566,6 +568,8 @@ type featureRegistryRESTClient struct { // Points back to the CallOptions field of the containing FeatureRegistryClient CallOptions **FeatureRegistryCallOptions + + logger *slog.Logger } // NewFeatureRegistryRESTClient creates a new feature registry service rest client. @@ -584,6 +588,7 @@ func NewFeatureRegistryRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -646,7 +651,7 @@ func (c *featureRegistryGRPCClient) CreateFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeatureGroup, req, settings.GRPC, c.logger, "CreateFeatureGroup") return err }, opts...) if err != nil { @@ -666,7 +671,7 @@ func (c *featureRegistryGRPCClient) GetFeatureGroup(ctx context.Context, req *ai var resp *aiplatformpb.FeatureGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeatureGroup, req, settings.GRPC, c.logger, "GetFeatureGroup") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *featureRegistryGRPCClient) ListFeatureGroups(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatureGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatureGroups, req, settings.GRPC, c.logger, "ListFeatureGroups") return err }, opts...) if err != nil { @@ -730,7 +735,7 @@ func (c *featureRegistryGRPCClient) UpdateFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.UpdateFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.UpdateFeatureGroup, req, settings.GRPC, c.logger, "UpdateFeatureGroup") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *featureRegistryGRPCClient) DeleteFeatureGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.DeleteFeatureGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.DeleteFeatureGroup, req, settings.GRPC, c.logger, "DeleteFeatureGroup") return err }, opts...) if err != nil { @@ -770,7 +775,7 @@ func (c *featureRegistryGRPCClient) CreateFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeature, req, settings.GRPC, c.logger, "CreateFeature") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *featureRegistryGRPCClient) BatchCreateFeatures(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.BatchCreateFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.BatchCreateFeatures, req, settings.GRPC, c.logger, "BatchCreateFeatures") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *featureRegistryGRPCClient) GetFeature(ctx context.Context, req *aiplatf var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeature, req, settings.GRPC, c.logger, "GetFeature") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *featureRegistryGRPCClient) ListFeatures(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatures, req, settings.GRPC, c.logger, "ListFeatures") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *featureRegistryGRPCClient) UpdateFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.UpdateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.UpdateFeature, req, settings.GRPC, c.logger, "UpdateFeature") return err }, opts...) if err != nil { @@ -894,7 +899,7 @@ func (c *featureRegistryGRPCClient) DeleteFeature(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.DeleteFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.DeleteFeature, req, settings.GRPC, c.logger, "DeleteFeature") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *featureRegistryGRPCClient) CreateFeatureMonitor(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeatureMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeatureMonitor, req, settings.GRPC, c.logger, "CreateFeatureMonitor") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *featureRegistryGRPCClient) GetFeatureMonitor(ctx context.Context, req * var resp *aiplatformpb.FeatureMonitor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeatureMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeatureMonitor, req, settings.GRPC, c.logger, "GetFeatureMonitor") return err }, opts...) if err != nil { @@ -963,7 +968,7 @@ func (c *featureRegistryGRPCClient) ListFeatureMonitors(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatureMonitors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatureMonitors, req, settings.GRPC, c.logger, "ListFeatureMonitors") return err }, opts...) if err != nil { @@ -998,7 +1003,7 @@ func (c *featureRegistryGRPCClient) DeleteFeatureMonitor(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.DeleteFeatureMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.DeleteFeatureMonitor, req, settings.GRPC, c.logger, "DeleteFeatureMonitor") return err }, opts...) if err != nil { @@ -1018,7 +1023,7 @@ func (c *featureRegistryGRPCClient) CreateFeatureMonitorJob(ctx context.Context, var resp *aiplatformpb.FeatureMonitorJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.CreateFeatureMonitorJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.CreateFeatureMonitorJob, req, settings.GRPC, c.logger, "CreateFeatureMonitorJob") return err }, opts...) if err != nil { @@ -1036,7 +1041,7 @@ func (c *featureRegistryGRPCClient) GetFeatureMonitorJob(ctx context.Context, re var resp *aiplatformpb.FeatureMonitorJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.GetFeatureMonitorJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.GetFeatureMonitorJob, req, settings.GRPC, c.logger, "GetFeatureMonitorJob") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *featureRegistryGRPCClient) ListFeatureMonitorJobs(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featureRegistryClient.ListFeatureMonitorJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featureRegistryClient.ListFeatureMonitorJobs, req, settings.GRPC, c.logger, "ListFeatureMonitorJobs") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *featureRegistryGRPCClient) GetLocation(ctx context.Context, req *locati var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *featureRegistryGRPCClient) ListLocations(ctx context.Context, req *loca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1164,7 +1169,7 @@ func (c *featureRegistryGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1182,7 +1187,7 @@ func (c *featureRegistryGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1200,7 +1205,7 @@ func (c *featureRegistryGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1217,7 +1222,7 @@ func (c *featureRegistryGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1231,7 +1236,7 @@ func (c *featureRegistryGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1246,7 +1251,7 @@ func (c *featureRegistryGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1275,7 +1280,7 @@ func (c *featureRegistryGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1310,7 +1315,7 @@ func (c *featureRegistryGRPCClient) WaitOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1359,21 +1364,10 @@ func (c *featureRegistryRESTClient) CreateFeatureGroup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeatureGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1424,17 +1418,7 @@ func (c *featureRegistryRESTClient) GetFeatureGroup(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureGroup") if err != nil { return err } @@ -1502,21 +1486,10 @@ func (c *featureRegistryRESTClient) ListFeatureGroups(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1592,21 +1565,10 @@ func (c *featureRegistryRESTClient) UpdateFeatureGroup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeatureGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1659,21 +1621,10 @@ func (c *featureRegistryRESTClient) DeleteFeatureGroup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeatureGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1731,21 +1682,10 @@ func (c *featureRegistryRESTClient) CreateFeature(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeature") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1801,21 +1741,10 @@ func (c *featureRegistryRESTClient) BatchCreateFeatures(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateFeatures") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1883,17 +1812,7 @@ func (c *featureRegistryRESTClient) GetFeature(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeature") if err != nil { return err } @@ -1971,21 +1890,10 @@ func (c *featureRegistryRESTClient) ListFeatures(ctx context.Context, req *aipla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatures") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2061,21 +1969,10 @@ func (c *featureRegistryRESTClient) UpdateFeature(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeature") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2125,21 +2022,10 @@ func (c *featureRegistryRESTClient) DeleteFeature(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeature") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2197,21 +2083,10 @@ func (c *featureRegistryRESTClient) CreateFeatureMonitor(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeatureMonitor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2262,17 +2137,7 @@ func (c *featureRegistryRESTClient) GetFeatureMonitor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureMonitor") if err != nil { return err } @@ -2340,21 +2205,10 @@ func (c *featureRegistryRESTClient) ListFeatureMonitors(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureMonitors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2416,21 +2270,10 @@ func (c *featureRegistryRESTClient) DeleteFeatureMonitor(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeatureMonitor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2491,17 +2334,7 @@ func (c *featureRegistryRESTClient) CreateFeatureMonitorJob(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeatureMonitorJob") if err != nil { return err } @@ -2551,17 +2384,7 @@ func (c *featureRegistryRESTClient) GetFeatureMonitorJob(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeatureMonitorJob") if err != nil { return err } @@ -2629,21 +2452,10 @@ func (c *featureRegistryRESTClient) ListFeatureMonitorJobs(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatureMonitorJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2706,17 +2518,7 @@ func (c *featureRegistryRESTClient) GetLocation(ctx context.Context, req *locati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2781,21 +2583,10 @@ func (c *featureRegistryRESTClient) ListLocations(ctx context.Context, req *loca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2865,17 +2656,7 @@ func (c *featureRegistryRESTClient) GetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2935,17 +2716,7 @@ func (c *featureRegistryRESTClient) SetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3007,17 +2778,7 @@ func (c *featureRegistryRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3064,15 +2825,8 @@ func (c *featureRegistryRESTClient) CancelOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3106,15 +2860,8 @@ func (c *featureRegistryRESTClient) DeleteOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3151,17 +2898,7 @@ func (c *featureRegistryRESTClient) GetOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3226,21 +2963,10 @@ func (c *featureRegistryRESTClient) ListOperations(ctx context.Context, req *lon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3310,17 +3036,7 @@ func (c *featureRegistryRESTClient) WaitOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/feature_registry_client_example_go123_test.go b/aiplatform/apiv1beta1/feature_registry_client_example_go123_test.go index d214bc639951..2a96c9669e4a 100644 --- a/aiplatform/apiv1beta1/feature_registry_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/feature_registry_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeatureRegistryClient_ListFeatureGroups_all() { } for resp, err := range c.ListFeatureGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeatureRegistryClient_ListFeatureMonitorJobs_all() { } for resp, err := range c.ListFeatureMonitorJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeatureRegistryClient_ListFeatureMonitors_all() { } for resp, err := range c.ListFeatureMonitors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeatureRegistryClient_ListFeatures_all() { } for resp, err := range c.ListFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleFeatureRegistryClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleFeatureRegistryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/featurestore_client.go b/aiplatform/apiv1beta1/featurestore_client.go index d4a34b076b76..1373c1d398d7 100755 --- a/aiplatform/apiv1beta1/featurestore_client.go +++ b/aiplatform/apiv1beta1/featurestore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -635,6 +634,8 @@ type featurestoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeaturestoreClient creates a new featurestore service client based on gRPC. @@ -661,6 +662,7 @@ func NewFeaturestoreClient(ctx context.Context, opts ...option.ClientOption) (*F connPool: connPool, featurestoreClient: aiplatformpb.NewFeaturestoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -726,6 +728,8 @@ type featurestoreRESTClient struct { // Points back to the CallOptions field of the containing FeaturestoreClient CallOptions **FeaturestoreCallOptions + + logger *slog.Logger } // NewFeaturestoreRESTClient creates a new featurestore service rest client. @@ -743,6 +747,7 @@ func NewFeaturestoreRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -805,7 +810,7 @@ func (c *featurestoreGRPCClient) CreateFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateFeaturestore, req, settings.GRPC, c.logger, "CreateFeaturestore") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *featurestoreGRPCClient) GetFeaturestore(ctx context.Context, req *aipla var resp *aiplatformpb.Featurestore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetFeaturestore, req, settings.GRPC, c.logger, "GetFeaturestore") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *featurestoreGRPCClient) ListFeaturestores(ctx context.Context, req *aip } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListFeaturestores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListFeaturestores, req, settings.GRPC, c.logger, "ListFeaturestores") return err }, opts...) if err != nil { @@ -889,7 +894,7 @@ func (c *featurestoreGRPCClient) UpdateFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateFeaturestore, req, settings.GRPC, c.logger, "UpdateFeaturestore") return err }, opts...) if err != nil { @@ -909,7 +914,7 @@ func (c *featurestoreGRPCClient) DeleteFeaturestore(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeaturestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeaturestore, req, settings.GRPC, c.logger, "DeleteFeaturestore") return err }, opts...) if err != nil { @@ -929,7 +934,7 @@ func (c *featurestoreGRPCClient) CreateEntityType(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *featurestoreGRPCClient) GetEntityType(ctx context.Context, req *aiplatf var resp *aiplatformpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -978,7 +983,7 @@ func (c *featurestoreGRPCClient) ListEntityTypes(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -1013,7 +1018,7 @@ func (c *featurestoreGRPCClient) UpdateEntityType(ctx context.Context, req *aipl var resp *aiplatformpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -1031,7 +1036,7 @@ func (c *featurestoreGRPCClient) DeleteEntityType(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) if err != nil { @@ -1051,7 +1056,7 @@ func (c *featurestoreGRPCClient) CreateFeature(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.CreateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.CreateFeature, req, settings.GRPC, c.logger, "CreateFeature") return err }, opts...) if err != nil { @@ -1071,7 +1076,7 @@ func (c *featurestoreGRPCClient) BatchCreateFeatures(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.BatchCreateFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.BatchCreateFeatures, req, settings.GRPC, c.logger, "BatchCreateFeatures") return err }, opts...) if err != nil { @@ -1091,7 +1096,7 @@ func (c *featurestoreGRPCClient) GetFeature(ctx context.Context, req *aiplatform var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.GetFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.GetFeature, req, settings.GRPC, c.logger, "GetFeature") return err }, opts...) if err != nil { @@ -1120,7 +1125,7 @@ func (c *featurestoreGRPCClient) ListFeatures(ctx context.Context, req *aiplatfo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ListFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ListFeatures, req, settings.GRPC, c.logger, "ListFeatures") return err }, opts...) if err != nil { @@ -1155,7 +1160,7 @@ func (c *featurestoreGRPCClient) UpdateFeature(ctx context.Context, req *aiplatf var resp *aiplatformpb.Feature err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.UpdateFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.UpdateFeature, req, settings.GRPC, c.logger, "UpdateFeature") return err }, opts...) if err != nil { @@ -1173,7 +1178,7 @@ func (c *featurestoreGRPCClient) DeleteFeature(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeature(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeature, req, settings.GRPC, c.logger, "DeleteFeature") return err }, opts...) if err != nil { @@ -1193,7 +1198,7 @@ func (c *featurestoreGRPCClient) ImportFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ImportFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ImportFeatureValues, req, settings.GRPC, c.logger, "ImportFeatureValues") return err }, opts...) if err != nil { @@ -1213,7 +1218,7 @@ func (c *featurestoreGRPCClient) BatchReadFeatureValues(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.BatchReadFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.BatchReadFeatureValues, req, settings.GRPC, c.logger, "BatchReadFeatureValues") return err }, opts...) if err != nil { @@ -1233,7 +1238,7 @@ func (c *featurestoreGRPCClient) ExportFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.ExportFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.ExportFeatureValues, req, settings.GRPC, c.logger, "ExportFeatureValues") return err }, opts...) if err != nil { @@ -1253,7 +1258,7 @@ func (c *featurestoreGRPCClient) DeleteFeatureValues(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.DeleteFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.DeleteFeatureValues, req, settings.GRPC, c.logger, "DeleteFeatureValues") return err }, opts...) if err != nil { @@ -1284,7 +1289,7 @@ func (c *featurestoreGRPCClient) SearchFeatures(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreClient.SearchFeatures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreClient.SearchFeatures, req, settings.GRPC, c.logger, "SearchFeatures") return err }, opts...) if err != nil { @@ -1319,7 +1324,7 @@ func (c *featurestoreGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1348,7 +1353,7 @@ func (c *featurestoreGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1383,7 +1388,7 @@ func (c *featurestoreGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1401,7 +1406,7 @@ func (c *featurestoreGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1419,7 +1424,7 @@ func (c *featurestoreGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1436,7 +1441,7 @@ func (c *featurestoreGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1450,7 +1455,7 @@ func (c *featurestoreGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1465,7 +1470,7 @@ func (c *featurestoreGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1494,7 +1499,7 @@ func (c *featurestoreGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1529,7 +1534,7 @@ func (c *featurestoreGRPCClient) WaitOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1578,21 +1583,10 @@ func (c *featurestoreRESTClient) CreateFeaturestore(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeaturestore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1643,17 +1637,7 @@ func (c *featurestoreRESTClient) GetFeaturestore(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeaturestore") if err != nil { return err } @@ -1728,21 +1712,10 @@ func (c *featurestoreRESTClient) ListFeaturestores(ctx context.Context, req *aip } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeaturestores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1818,21 +1791,10 @@ func (c *featurestoreRESTClient) UpdateFeaturestore(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeaturestore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1886,21 +1848,10 @@ func (c *featurestoreRESTClient) DeleteFeaturestore(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeaturestore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1958,21 +1909,10 @@ func (c *featurestoreRESTClient) CreateEntityType(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntityType") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2023,17 +1963,7 @@ func (c *featurestoreRESTClient) GetEntityType(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntityType") if err != nil { return err } @@ -2108,21 +2038,10 @@ func (c *featurestoreRESTClient) ListEntityTypes(ctx context.Context, req *aipla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntityTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2199,17 +2118,7 @@ func (c *featurestoreRESTClient) UpdateEntityType(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntityType") if err != nil { return err } @@ -2262,21 +2171,10 @@ func (c *featurestoreRESTClient) DeleteEntityType(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntityType") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2334,21 +2232,10 @@ func (c *featurestoreRESTClient) CreateFeature(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeature") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2404,21 +2291,10 @@ func (c *featurestoreRESTClient) BatchCreateFeatures(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateFeatures") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2486,17 +2362,7 @@ func (c *featurestoreRESTClient) GetFeature(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeature") if err != nil { return err } @@ -2574,21 +2440,10 @@ func (c *featurestoreRESTClient) ListFeatures(ctx context.Context, req *aiplatfo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeatures") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2665,17 +2520,7 @@ func (c *featurestoreRESTClient) UpdateFeature(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeature") if err != nil { return err } @@ -2724,21 +2569,10 @@ func (c *featurestoreRESTClient) DeleteFeature(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeature") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2815,21 +2649,10 @@ func (c *featurestoreRESTClient) ImportFeatureValues(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportFeatureValues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2890,21 +2713,10 @@ func (c *featurestoreRESTClient) BatchReadFeatureValues(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchReadFeatureValues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2960,21 +2772,10 @@ func (c *featurestoreRESTClient) ExportFeatureValues(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportFeatureValues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3039,21 +2840,10 @@ func (c *featurestoreRESTClient) DeleteFeatureValues(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteFeatureValues") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3119,21 +2909,10 @@ func (c *featurestoreRESTClient) SearchFeatures(ctx context.Context, req *aiplat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchFeatures") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3196,17 +2975,7 @@ func (c *featurestoreRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3271,21 +3040,10 @@ func (c *featurestoreRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3355,17 +3113,7 @@ func (c *featurestoreRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -3425,17 +3173,7 @@ func (c *featurestoreRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3497,17 +3235,7 @@ func (c *featurestoreRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3554,15 +3282,8 @@ func (c *featurestoreRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3596,15 +3317,8 @@ func (c *featurestoreRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3641,17 +3355,7 @@ func (c *featurestoreRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3716,21 +3420,10 @@ func (c *featurestoreRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3800,17 +3493,7 @@ func (c *featurestoreRESTClient) WaitOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/featurestore_client_example_go123_test.go b/aiplatform/apiv1beta1/featurestore_client_example_go123_test.go index bb33dca8f06a..9198e6a547c4 100644 --- a/aiplatform/apiv1beta1/featurestore_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/featurestore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFeaturestoreClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFeaturestoreClient_ListFeatures_all() { } for resp, err := range c.ListFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFeaturestoreClient_ListFeaturestores_all() { } for resp, err := range c.ListFeaturestores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleFeaturestoreClient_SearchFeatures_all() { } for resp, err := range c.SearchFeatures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleFeaturestoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleFeaturestoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client.go b/aiplatform/apiv1beta1/featurestore_online_serving_client.go index 3de69fd1ddc8..5a1ef39aa7c4 100755 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -280,6 +279,8 @@ type featurestoreOnlineServingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFeaturestoreOnlineServingClient creates a new featurestore online serving service client based on gRPC. @@ -306,6 +307,7 @@ func NewFeaturestoreOnlineServingClient(ctx context.Context, opts ...option.Clie connPool: connPool, featurestoreOnlineServingClient: aiplatformpb.NewFeaturestoreOnlineServingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -355,6 +357,8 @@ type featurestoreOnlineServingRESTClient struct { // Points back to the CallOptions field of the containing FeaturestoreOnlineServingClient CallOptions **FeaturestoreOnlineServingCallOptions + + logger *slog.Logger } // NewFeaturestoreOnlineServingRESTClient creates a new featurestore online serving service rest client. @@ -372,6 +376,7 @@ func NewFeaturestoreOnlineServingRESTClient(ctx context.Context, opts ...option. endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -424,7 +429,7 @@ func (c *featurestoreOnlineServingGRPCClient) ReadFeatureValues(ctx context.Cont var resp *aiplatformpb.ReadFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreOnlineServingClient.ReadFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreOnlineServingClient.ReadFeatureValues, req, settings.GRPC, c.logger, "ReadFeatureValues") return err }, opts...) if err != nil { @@ -442,7 +447,9 @@ func (c *featurestoreOnlineServingGRPCClient) StreamingReadFeatureValues(ctx con var resp aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingReadFeatureValues") resp, err = c.featurestoreOnlineServingClient.StreamingReadFeatureValues(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingReadFeatureValues") return err }, opts...) if err != nil { @@ -460,7 +467,7 @@ func (c *featurestoreOnlineServingGRPCClient) WriteFeatureValues(ctx context.Con var resp *aiplatformpb.WriteFeatureValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.featurestoreOnlineServingClient.WriteFeatureValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.featurestoreOnlineServingClient.WriteFeatureValues, req, settings.GRPC, c.logger, "WriteFeatureValues") return err }, opts...) if err != nil { @@ -478,7 +485,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetLocation(ctx context.Context, r var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -507,7 +514,7 @@ func (c *featurestoreOnlineServingGRPCClient) ListLocations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -542,7 +549,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -560,7 +567,7 @@ func (c *featurestoreOnlineServingGRPCClient) SetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -578,7 +585,7 @@ func (c *featurestoreOnlineServingGRPCClient) TestIamPermissions(ctx context.Con var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -595,7 +602,7 @@ func (c *featurestoreOnlineServingGRPCClient) CancelOperation(ctx context.Contex opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -609,7 +616,7 @@ func (c *featurestoreOnlineServingGRPCClient) DeleteOperation(ctx context.Contex opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -624,7 +631,7 @@ func (c *featurestoreOnlineServingGRPCClient) GetOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -653,7 +660,7 @@ func (c *featurestoreOnlineServingGRPCClient) ListOperations(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -688,7 +695,7 @@ func (c *featurestoreOnlineServingGRPCClient) WaitOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -738,17 +745,7 @@ func (c *featurestoreOnlineServingRESTClient) ReadFeatureValues(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReadFeatureValues") if err != nil { return err } @@ -804,15 +801,11 @@ func (c *featurestoreOnlineServingRESTClient) StreamingReadFeatureValues(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamingReadFeatureValues") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamingReadFeatureValuesRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -916,17 +909,7 @@ func (c *featurestoreOnlineServingRESTClient) WriteFeatureValues(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteFeatureValues") if err != nil { return err } @@ -976,17 +959,7 @@ func (c *featurestoreOnlineServingRESTClient) GetLocation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1051,21 +1024,10 @@ func (c *featurestoreOnlineServingRESTClient) ListLocations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1135,17 +1097,7 @@ func (c *featurestoreOnlineServingRESTClient) GetIamPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1205,17 +1157,7 @@ func (c *featurestoreOnlineServingRESTClient) SetIamPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1277,17 +1219,7 @@ func (c *featurestoreOnlineServingRESTClient) TestIamPermissions(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1334,15 +1266,8 @@ func (c *featurestoreOnlineServingRESTClient) CancelOperation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1376,15 +1301,8 @@ func (c *featurestoreOnlineServingRESTClient) DeleteOperation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1421,17 +1339,7 @@ func (c *featurestoreOnlineServingRESTClient) GetOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1496,21 +1404,10 @@ func (c *featurestoreOnlineServingRESTClient) ListOperations(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1580,17 +1477,7 @@ func (c *featurestoreOnlineServingRESTClient) WaitOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_go123_test.go b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_go123_test.go index df2e6663877f..9221b79a1cad 100644 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFeaturestoreOnlineServingClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFeaturestoreOnlineServingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/gen_ai_cache_client.go b/aiplatform/apiv1beta1/gen_ai_cache_client.go index 2dc4ad5317d4..46802f9fbe58 100755 --- a/aiplatform/apiv1beta1/gen_ai_cache_client.go +++ b/aiplatform/apiv1beta1/gen_ai_cache_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -282,6 +281,8 @@ type genAiCacheGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenAiCacheClient creates a new gen ai cache service client based on gRPC. @@ -308,6 +309,7 @@ func NewGenAiCacheClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, genAiCacheClient: aiplatformpb.NewGenAiCacheServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -357,6 +359,8 @@ type genAiCacheRESTClient struct { // Points back to the CallOptions field of the containing GenAiCacheClient CallOptions **GenAiCacheCallOptions + + logger *slog.Logger } // NewGenAiCacheRESTClient creates a new gen ai cache service rest client. @@ -374,6 +378,7 @@ func NewGenAiCacheRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -426,7 +431,7 @@ func (c *genAiCacheGRPCClient) CreateCachedContent(ctx context.Context, req *aip var resp *aiplatformpb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiCacheClient.CreateCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiCacheClient.CreateCachedContent, req, settings.GRPC, c.logger, "CreateCachedContent") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *genAiCacheGRPCClient) GetCachedContent(ctx context.Context, req *aiplat var resp *aiplatformpb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiCacheClient.GetCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiCacheClient.GetCachedContent, req, settings.GRPC, c.logger, "GetCachedContent") return err }, opts...) if err != nil { @@ -462,7 +467,7 @@ func (c *genAiCacheGRPCClient) UpdateCachedContent(ctx context.Context, req *aip var resp *aiplatformpb.CachedContent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiCacheClient.UpdateCachedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiCacheClient.UpdateCachedContent, req, settings.GRPC, c.logger, "UpdateCachedContent") return err }, opts...) if err != nil { @@ -479,7 +484,7 @@ func (c *genAiCacheGRPCClient) DeleteCachedContent(ctx context.Context, req *aip opts = append((*c.CallOptions).DeleteCachedContent[0:len((*c.CallOptions).DeleteCachedContent):len((*c.CallOptions).DeleteCachedContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.genAiCacheClient.DeleteCachedContent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.genAiCacheClient.DeleteCachedContent, req, settings.GRPC, c.logger, "DeleteCachedContent") return err }, opts...) return err @@ -505,7 +510,7 @@ func (c *genAiCacheGRPCClient) ListCachedContents(ctx context.Context, req *aipl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiCacheClient.ListCachedContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiCacheClient.ListCachedContents, req, settings.GRPC, c.logger, "ListCachedContents") return err }, opts...) if err != nil { @@ -540,7 +545,7 @@ func (c *genAiCacheGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *genAiCacheGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *genAiCacheGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *genAiCacheGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -640,7 +645,7 @@ func (c *genAiCacheGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *genAiCacheGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -671,7 +676,7 @@ func (c *genAiCacheGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -686,7 +691,7 @@ func (c *genAiCacheGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *genAiCacheGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *genAiCacheGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -800,17 +805,7 @@ func (c *genAiCacheRESTClient) CreateCachedContent(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCachedContent") if err != nil { return err } @@ -860,17 +855,7 @@ func (c *genAiCacheRESTClient) GetCachedContent(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCachedContent") if err != nil { return err } @@ -934,17 +919,7 @@ func (c *genAiCacheRESTClient) UpdateCachedContent(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCachedContent") if err != nil { return err } @@ -991,15 +966,8 @@ func (c *genAiCacheRESTClient) DeleteCachedContent(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCachedContent") + return err }, opts...) } @@ -1048,21 +1016,10 @@ func (c *genAiCacheRESTClient) ListCachedContents(ctx context.Context, req *aipl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCachedContents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1125,17 +1082,7 @@ func (c *genAiCacheRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1200,21 +1147,10 @@ func (c *genAiCacheRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1284,17 +1220,7 @@ func (c *genAiCacheRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1354,17 +1280,7 @@ func (c *genAiCacheRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1426,17 +1342,7 @@ func (c *genAiCacheRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1483,15 +1389,8 @@ func (c *genAiCacheRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1525,15 +1424,8 @@ func (c *genAiCacheRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1570,17 +1462,7 @@ func (c *genAiCacheRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1645,21 +1527,10 @@ func (c *genAiCacheRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1729,17 +1600,7 @@ func (c *genAiCacheRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/gen_ai_cache_client_example_go123_test.go b/aiplatform/apiv1beta1/gen_ai_cache_client_example_go123_test.go index dee8dea5c0ed..b1204be180ce 100644 --- a/aiplatform/apiv1beta1/gen_ai_cache_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/gen_ai_cache_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGenAiCacheClient_ListCachedContents_all() { } for resp, err := range c.ListCachedContents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGenAiCacheClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGenAiCacheClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/gen_ai_tuning_client.go b/aiplatform/apiv1beta1/gen_ai_tuning_client.go index 5f0bb90d56bb..4423a7ca17d9 100755 --- a/aiplatform/apiv1beta1/gen_ai_tuning_client.go +++ b/aiplatform/apiv1beta1/gen_ai_tuning_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -314,6 +313,8 @@ type genAiTuningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenAiTuningClient creates a new gen ai tuning service client based on gRPC. @@ -340,6 +341,7 @@ func NewGenAiTuningClient(ctx context.Context, opts ...option.ClientOption) (*Ge connPool: connPool, genAiTuningClient: aiplatformpb.NewGenAiTuningServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -405,6 +407,8 @@ type genAiTuningRESTClient struct { // Points back to the CallOptions field of the containing GenAiTuningClient CallOptions **GenAiTuningCallOptions + + logger *slog.Logger } // NewGenAiTuningRESTClient creates a new gen ai tuning service rest client. @@ -422,6 +426,7 @@ func NewGenAiTuningRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,7 +489,7 @@ func (c *genAiTuningGRPCClient) CreateTuningJob(ctx context.Context, req *aiplat var resp *aiplatformpb.TuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.CreateTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.CreateTuningJob, req, settings.GRPC, c.logger, "CreateTuningJob") return err }, opts...) if err != nil { @@ -502,7 +507,7 @@ func (c *genAiTuningGRPCClient) GetTuningJob(ctx context.Context, req *aiplatfor var resp *aiplatformpb.TuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.GetTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.GetTuningJob, req, settings.GRPC, c.logger, "GetTuningJob") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *genAiTuningGRPCClient) ListTuningJobs(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.ListTuningJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.ListTuningJobs, req, settings.GRPC, c.logger, "ListTuningJobs") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *genAiTuningGRPCClient) CancelTuningJob(ctx context.Context, req *aiplat opts = append((*c.CallOptions).CancelTuningJob[0:len((*c.CallOptions).CancelTuningJob):len((*c.CallOptions).CancelTuningJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.genAiTuningClient.CancelTuningJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.genAiTuningClient.CancelTuningJob, req, settings.GRPC, c.logger, "CancelTuningJob") return err }, opts...) return err @@ -580,7 +585,7 @@ func (c *genAiTuningGRPCClient) RebaseTunedModel(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.genAiTuningClient.RebaseTunedModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.genAiTuningClient.RebaseTunedModel, req, settings.GRPC, c.logger, "RebaseTunedModel") return err }, opts...) if err != nil { @@ -600,7 +605,7 @@ func (c *genAiTuningGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *genAiTuningGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -664,7 +669,7 @@ func (c *genAiTuningGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -682,7 +687,7 @@ func (c *genAiTuningGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -700,7 +705,7 @@ func (c *genAiTuningGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -717,7 +722,7 @@ func (c *genAiTuningGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -731,7 +736,7 @@ func (c *genAiTuningGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -746,7 +751,7 @@ func (c *genAiTuningGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *genAiTuningGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *genAiTuningGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -860,17 +865,7 @@ func (c *genAiTuningRESTClient) CreateTuningJob(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTuningJob") if err != nil { return err } @@ -920,17 +915,7 @@ func (c *genAiTuningRESTClient) GetTuningJob(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTuningJob") if err != nil { return err } @@ -995,21 +980,10 @@ func (c *genAiTuningRESTClient) ListTuningJobs(ctx context.Context, req *aiplatf } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTuningJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1086,15 +1060,8 @@ func (c *genAiTuningRESTClient) CancelTuningJob(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelTuningJob") + return err }, opts...) } @@ -1138,21 +1105,10 @@ func (c *genAiTuningRESTClient) RebaseTunedModel(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RebaseTunedModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1203,17 +1159,7 @@ func (c *genAiTuningRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1278,21 +1224,10 @@ func (c *genAiTuningRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1362,17 +1297,7 @@ func (c *genAiTuningRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1432,17 +1357,7 @@ func (c *genAiTuningRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Set httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1504,17 +1419,7 @@ func (c *genAiTuningRESTClient) TestIamPermissions(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1561,15 +1466,8 @@ func (c *genAiTuningRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1603,15 +1501,8 @@ func (c *genAiTuningRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1648,17 +1539,7 @@ func (c *genAiTuningRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1723,21 +1604,10 @@ func (c *genAiTuningRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1807,17 +1677,7 @@ func (c *genAiTuningRESTClient) WaitOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/gen_ai_tuning_client_example_go123_test.go b/aiplatform/apiv1beta1/gen_ai_tuning_client_example_go123_test.go index baddac22f828..ee96b7fa8376 100644 --- a/aiplatform/apiv1beta1/gen_ai_tuning_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/gen_ai_tuning_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGenAiTuningClient_ListTuningJobs_all() { } for resp, err := range c.ListTuningJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGenAiTuningClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGenAiTuningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/helpers.go b/aiplatform/apiv1beta1/helpers.go index 842a9555bdb0..b6618b503385 100755 --- a/aiplatform/apiv1beta1/helpers.go +++ b/aiplatform/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package aiplatform import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "aiplatform.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/aiplatform/apiv1beta1/index_client.go b/aiplatform/apiv1beta1/index_client.go index 9ad1685a1600..581ffd28a321 100755 --- a/aiplatform/apiv1beta1/index_client.go +++ b/aiplatform/apiv1beta1/index_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -356,6 +355,8 @@ type indexGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIndexClient creates a new index service client based on gRPC. @@ -382,6 +383,7 @@ func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexCli connPool: connPool, indexClient: aiplatformpb.NewIndexServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -447,6 +449,8 @@ type indexRESTClient struct { // Points back to the CallOptions field of the containing IndexClient CallOptions **IndexCallOptions + + logger *slog.Logger } // NewIndexRESTClient creates a new index service rest client. @@ -464,6 +468,7 @@ func NewIndexRESTClient(ctx context.Context, opts ...option.ClientOption) (*Inde endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -526,7 +531,7 @@ func (c *indexGRPCClient) CreateIndex(ctx context.Context, req *aiplatformpb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.CreateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") return err }, opts...) if err != nil { @@ -546,7 +551,7 @@ func (c *indexGRPCClient) GetIndex(ctx context.Context, req *aiplatformpb.GetInd var resp *aiplatformpb.Index err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.GetIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.GetIndex, req, settings.GRPC, c.logger, "GetIndex") return err }, opts...) if err != nil { @@ -575,7 +580,7 @@ func (c *indexGRPCClient) ListIndexes(ctx context.Context, req *aiplatformpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.ListIndexes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") return err }, opts...) if err != nil { @@ -610,7 +615,7 @@ func (c *indexGRPCClient) UpdateIndex(ctx context.Context, req *aiplatformpb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.UpdateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.UpdateIndex, req, settings.GRPC, c.logger, "UpdateIndex") return err }, opts...) if err != nil { @@ -630,7 +635,7 @@ func (c *indexGRPCClient) DeleteIndex(ctx context.Context, req *aiplatformpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.DeleteIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") return err }, opts...) if err != nil { @@ -650,7 +655,7 @@ func (c *indexGRPCClient) UpsertDatapoints(ctx context.Context, req *aiplatformp var resp *aiplatformpb.UpsertDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.UpsertDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.UpsertDatapoints, req, settings.GRPC, c.logger, "UpsertDatapoints") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *indexGRPCClient) RemoveDatapoints(ctx context.Context, req *aiplatformp var resp *aiplatformpb.RemoveDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexClient.RemoveDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexClient.RemoveDatapoints, req, settings.GRPC, c.logger, "RemoveDatapoints") return err }, opts...) if err != nil { @@ -686,7 +691,7 @@ func (c *indexGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *indexGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *indexGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *indexGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -786,7 +791,7 @@ func (c *indexGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -803,7 +808,7 @@ func (c *indexGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -817,7 +822,7 @@ func (c *indexGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -832,7 +837,7 @@ func (c *indexGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -861,7 +866,7 @@ func (c *indexGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *indexGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -944,21 +949,10 @@ func (c *indexRESTClient) CreateIndex(ctx context.Context, req *aiplatformpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1009,17 +1003,7 @@ func (c *indexRESTClient) GetIndex(ctx context.Context, req *aiplatformpb.GetInd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndex") if err != nil { return err } @@ -1091,21 +1075,10 @@ func (c *indexRESTClient) ListIndexes(ctx context.Context, req *aiplatformpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1181,21 +1154,10 @@ func (c *indexRESTClient) UpdateIndex(ctx context.Context, req *aiplatformpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1248,21 +1210,10 @@ func (c *indexRESTClient) DeleteIndex(ctx context.Context, req *aiplatformpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1319,17 +1270,7 @@ func (c *indexRESTClient) UpsertDatapoints(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpsertDatapoints") if err != nil { return err } @@ -1385,17 +1326,7 @@ func (c *indexRESTClient) RemoveDatapoints(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveDatapoints") if err != nil { return err } @@ -1445,17 +1376,7 @@ func (c *indexRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1520,21 +1441,10 @@ func (c *indexRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1604,17 +1514,7 @@ func (c *indexRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1674,17 +1574,7 @@ func (c *indexRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1746,17 +1636,7 @@ func (c *indexRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Tes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1803,15 +1683,8 @@ func (c *indexRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1845,15 +1718,8 @@ func (c *indexRESTClient) DeleteOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1890,17 +1756,7 @@ func (c *indexRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1965,21 +1821,10 @@ func (c *indexRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2049,17 +1894,7 @@ func (c *indexRESTClient) WaitOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/index_client_example_go123_test.go b/aiplatform/apiv1beta1/index_client_example_go123_test.go index a6245a649319..b1a169896450 100644 --- a/aiplatform/apiv1beta1/index_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/index_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIndexClient_ListIndexes_all() { } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIndexClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIndexClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/index_endpoint_client.go b/aiplatform/apiv1beta1/index_endpoint_client.go index 697cea2edffe..b92123f5ee7b 100755 --- a/aiplatform/apiv1beta1/index_endpoint_client.go +++ b/aiplatform/apiv1beta1/index_endpoint_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -387,6 +386,8 @@ type indexEndpointGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIndexEndpointClient creates a new index endpoint service client based on gRPC. @@ -413,6 +414,7 @@ func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, indexEndpointClient: aiplatformpb.NewIndexEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -478,6 +480,8 @@ type indexEndpointRESTClient struct { // Points back to the CallOptions field of the containing IndexEndpointClient CallOptions **IndexEndpointCallOptions + + logger *slog.Logger } // NewIndexEndpointRESTClient creates a new index endpoint service rest client. @@ -495,6 +499,7 @@ func NewIndexEndpointRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -557,7 +562,7 @@ func (c *indexEndpointGRPCClient) CreateIndexEndpoint(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.CreateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.CreateIndexEndpoint, req, settings.GRPC, c.logger, "CreateIndexEndpoint") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *indexEndpointGRPCClient) GetIndexEndpoint(ctx context.Context, req *aip var resp *aiplatformpb.IndexEndpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.GetIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.GetIndexEndpoint, req, settings.GRPC, c.logger, "GetIndexEndpoint") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *indexEndpointGRPCClient) ListIndexEndpoints(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.ListIndexEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.ListIndexEndpoints, req, settings.GRPC, c.logger, "ListIndexEndpoints") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *indexEndpointGRPCClient) UpdateIndexEndpoint(ctx context.Context, req * var resp *aiplatformpb.IndexEndpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.UpdateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.UpdateIndexEndpoint, req, settings.GRPC, c.logger, "UpdateIndexEndpoint") return err }, opts...) if err != nil { @@ -659,7 +664,7 @@ func (c *indexEndpointGRPCClient) DeleteIndexEndpoint(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.DeleteIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.DeleteIndexEndpoint, req, settings.GRPC, c.logger, "DeleteIndexEndpoint") return err }, opts...) if err != nil { @@ -679,7 +684,7 @@ func (c *indexEndpointGRPCClient) DeployIndex(ctx context.Context, req *aiplatfo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.DeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.DeployIndex, req, settings.GRPC, c.logger, "DeployIndex") return err }, opts...) if err != nil { @@ -699,7 +704,7 @@ func (c *indexEndpointGRPCClient) UndeployIndex(ctx context.Context, req *aiplat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.UndeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.UndeployIndex, req, settings.GRPC, c.logger, "UndeployIndex") return err }, opts...) if err != nil { @@ -719,7 +724,7 @@ func (c *indexEndpointGRPCClient) MutateDeployedIndex(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.indexEndpointClient.MutateDeployedIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.indexEndpointClient.MutateDeployedIndex, req, settings.GRPC, c.logger, "MutateDeployedIndex") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *indexEndpointGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *indexEndpointGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -803,7 +808,7 @@ func (c *indexEndpointGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -821,7 +826,7 @@ func (c *indexEndpointGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *indexEndpointGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -856,7 +861,7 @@ func (c *indexEndpointGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -870,7 +875,7 @@ func (c *indexEndpointGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -885,7 +890,7 @@ func (c *indexEndpointGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *indexEndpointGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *indexEndpointGRPCClient) WaitOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -997,21 +1002,10 @@ func (c *indexEndpointRESTClient) CreateIndexEndpoint(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndexEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1062,17 +1056,7 @@ func (c *indexEndpointRESTClient) GetIndexEndpoint(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndexEndpoint") if err != nil { return err } @@ -1144,21 +1128,10 @@ func (c *indexEndpointRESTClient) ListIndexEndpoints(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexEndpoints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1235,17 +1208,7 @@ func (c *indexEndpointRESTClient) UpdateIndexEndpoint(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIndexEndpoint") if err != nil { return err } @@ -1294,21 +1257,10 @@ func (c *indexEndpointRESTClient) DeleteIndexEndpoint(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndexEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1366,21 +1318,10 @@ func (c *indexEndpointRESTClient) DeployIndex(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1437,21 +1378,10 @@ func (c *indexEndpointRESTClient) UndeployIndex(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1508,21 +1438,10 @@ func (c *indexEndpointRESTClient) MutateDeployedIndex(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MutateDeployedIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1573,17 +1492,7 @@ func (c *indexEndpointRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1648,21 +1557,10 @@ func (c *indexEndpointRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1732,17 +1630,7 @@ func (c *indexEndpointRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1802,17 +1690,7 @@ func (c *indexEndpointRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1874,17 +1752,7 @@ func (c *indexEndpointRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1931,15 +1799,8 @@ func (c *indexEndpointRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1973,15 +1834,8 @@ func (c *indexEndpointRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2018,17 +1872,7 @@ func (c *indexEndpointRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2093,21 +1937,10 @@ func (c *indexEndpointRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2177,17 +2010,7 @@ func (c *indexEndpointRESTClient) WaitOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/index_endpoint_client_example_go123_test.go b/aiplatform/apiv1beta1/index_endpoint_client_example_go123_test.go index 434459d7b03c..df77b0d80c0f 100644 --- a/aiplatform/apiv1beta1/index_endpoint_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/index_endpoint_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIndexEndpointClient_ListIndexEndpoints_all() { } for resp, err := range c.ListIndexEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIndexEndpointClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIndexEndpointClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/job_client.go b/aiplatform/apiv1beta1/job_client.go index 4f21ecb35020..4dfac38d7ae9 100755 --- a/aiplatform/apiv1beta1/job_client.go +++ b/aiplatform/apiv1beta1/job_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -782,6 +781,8 @@ type jobGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobClient creates a new job service client based on gRPC. @@ -808,6 +809,7 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, connPool: connPool, jobClient: aiplatformpb.NewJobServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -873,6 +875,8 @@ type jobRESTClient struct { // Points back to the CallOptions field of the containing JobClient CallOptions **JobCallOptions + + logger *slog.Logger } // NewJobRESTClient creates a new job service rest client. @@ -890,6 +894,7 @@ func NewJobRESTClient(ctx context.Context, opts ...option.ClientOption) (*JobCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -952,7 +957,7 @@ func (c *jobGRPCClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.C var resp *aiplatformpb.CustomJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateCustomJob, req, settings.GRPC, c.logger, "CreateCustomJob") return err }, opts...) if err != nil { @@ -970,7 +975,7 @@ func (c *jobGRPCClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetC var resp *aiplatformpb.CustomJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetCustomJob, req, settings.GRPC, c.logger, "GetCustomJob") return err }, opts...) if err != nil { @@ -999,7 +1004,7 @@ func (c *jobGRPCClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListCustomJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListCustomJobs, req, settings.GRPC, c.logger, "ListCustomJobs") return err }, opts...) if err != nil { @@ -1034,7 +1039,7 @@ func (c *jobGRPCClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteCustomJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteCustomJob, req, settings.GRPC, c.logger, "DeleteCustomJob") return err }, opts...) if err != nil { @@ -1053,7 +1058,7 @@ func (c *jobGRPCClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.C opts = append((*c.CallOptions).CancelCustomJob[0:len((*c.CallOptions).CancelCustomJob):len((*c.CallOptions).CancelCustomJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelCustomJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelCustomJob, req, settings.GRPC, c.logger, "CancelCustomJob") return err }, opts...) return err @@ -1068,7 +1073,7 @@ func (c *jobGRPCClient) CreateDataLabelingJob(ctx context.Context, req *aiplatfo var resp *aiplatformpb.DataLabelingJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateDataLabelingJob, req, settings.GRPC, c.logger, "CreateDataLabelingJob") return err }, opts...) if err != nil { @@ -1086,7 +1091,7 @@ func (c *jobGRPCClient) GetDataLabelingJob(ctx context.Context, req *aiplatformp var resp *aiplatformpb.DataLabelingJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetDataLabelingJob, req, settings.GRPC, c.logger, "GetDataLabelingJob") return err }, opts...) if err != nil { @@ -1115,7 +1120,7 @@ func (c *jobGRPCClient) ListDataLabelingJobs(ctx context.Context, req *aiplatfor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListDataLabelingJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListDataLabelingJobs, req, settings.GRPC, c.logger, "ListDataLabelingJobs") return err }, opts...) if err != nil { @@ -1150,7 +1155,7 @@ func (c *jobGRPCClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatfo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteDataLabelingJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteDataLabelingJob, req, settings.GRPC, c.logger, "DeleteDataLabelingJob") return err }, opts...) if err != nil { @@ -1169,7 +1174,7 @@ func (c *jobGRPCClient) CancelDataLabelingJob(ctx context.Context, req *aiplatfo opts = append((*c.CallOptions).CancelDataLabelingJob[0:len((*c.CallOptions).CancelDataLabelingJob):len((*c.CallOptions).CancelDataLabelingJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelDataLabelingJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelDataLabelingJob, req, settings.GRPC, c.logger, "CancelDataLabelingJob") return err }, opts...) return err @@ -1184,7 +1189,7 @@ func (c *jobGRPCClient) CreateHyperparameterTuningJob(ctx context.Context, req * var resp *aiplatformpb.HyperparameterTuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateHyperparameterTuningJob, req, settings.GRPC, c.logger, "CreateHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -1202,7 +1207,7 @@ func (c *jobGRPCClient) GetHyperparameterTuningJob(ctx context.Context, req *aip var resp *aiplatformpb.HyperparameterTuningJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetHyperparameterTuningJob, req, settings.GRPC, c.logger, "GetHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -1231,7 +1236,7 @@ func (c *jobGRPCClient) ListHyperparameterTuningJobs(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListHyperparameterTuningJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListHyperparameterTuningJobs, req, settings.GRPC, c.logger, "ListHyperparameterTuningJobs") return err }, opts...) if err != nil { @@ -1266,7 +1271,7 @@ func (c *jobGRPCClient) DeleteHyperparameterTuningJob(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteHyperparameterTuningJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteHyperparameterTuningJob, req, settings.GRPC, c.logger, "DeleteHyperparameterTuningJob") return err }, opts...) if err != nil { @@ -1285,7 +1290,7 @@ func (c *jobGRPCClient) CancelHyperparameterTuningJob(ctx context.Context, req * opts = append((*c.CallOptions).CancelHyperparameterTuningJob[0:len((*c.CallOptions).CancelHyperparameterTuningJob):len((*c.CallOptions).CancelHyperparameterTuningJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelHyperparameterTuningJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelHyperparameterTuningJob, req, settings.GRPC, c.logger, "CancelHyperparameterTuningJob") return err }, opts...) return err @@ -1300,7 +1305,7 @@ func (c *jobGRPCClient) CreateNasJob(ctx context.Context, req *aiplatformpb.Crea var resp *aiplatformpb.NasJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateNasJob, req, settings.GRPC, c.logger, "CreateNasJob") return err }, opts...) if err != nil { @@ -1318,7 +1323,7 @@ func (c *jobGRPCClient) GetNasJob(ctx context.Context, req *aiplatformpb.GetNasJ var resp *aiplatformpb.NasJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetNasJob, req, settings.GRPC, c.logger, "GetNasJob") return err }, opts...) if err != nil { @@ -1347,7 +1352,7 @@ func (c *jobGRPCClient) ListNasJobs(ctx context.Context, req *aiplatformpb.ListN } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListNasJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListNasJobs, req, settings.GRPC, c.logger, "ListNasJobs") return err }, opts...) if err != nil { @@ -1382,7 +1387,7 @@ func (c *jobGRPCClient) DeleteNasJob(ctx context.Context, req *aiplatformpb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteNasJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteNasJob, req, settings.GRPC, c.logger, "DeleteNasJob") return err }, opts...) if err != nil { @@ -1401,7 +1406,7 @@ func (c *jobGRPCClient) CancelNasJob(ctx context.Context, req *aiplatformpb.Canc opts = append((*c.CallOptions).CancelNasJob[0:len((*c.CallOptions).CancelNasJob):len((*c.CallOptions).CancelNasJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelNasJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelNasJob, req, settings.GRPC, c.logger, "CancelNasJob") return err }, opts...) return err @@ -1416,7 +1421,7 @@ func (c *jobGRPCClient) GetNasTrialDetail(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.NasTrialDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetNasTrialDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetNasTrialDetail, req, settings.GRPC, c.logger, "GetNasTrialDetail") return err }, opts...) if err != nil { @@ -1445,7 +1450,7 @@ func (c *jobGRPCClient) ListNasTrialDetails(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListNasTrialDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListNasTrialDetails, req, settings.GRPC, c.logger, "ListNasTrialDetails") return err }, opts...) if err != nil { @@ -1480,7 +1485,7 @@ func (c *jobGRPCClient) CreateBatchPredictionJob(ctx context.Context, req *aipla var resp *aiplatformpb.BatchPredictionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateBatchPredictionJob, req, settings.GRPC, c.logger, "CreateBatchPredictionJob") return err }, opts...) if err != nil { @@ -1498,7 +1503,7 @@ func (c *jobGRPCClient) GetBatchPredictionJob(ctx context.Context, req *aiplatfo var resp *aiplatformpb.BatchPredictionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetBatchPredictionJob, req, settings.GRPC, c.logger, "GetBatchPredictionJob") return err }, opts...) if err != nil { @@ -1527,7 +1532,7 @@ func (c *jobGRPCClient) ListBatchPredictionJobs(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListBatchPredictionJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListBatchPredictionJobs, req, settings.GRPC, c.logger, "ListBatchPredictionJobs") return err }, opts...) if err != nil { @@ -1562,7 +1567,7 @@ func (c *jobGRPCClient) DeleteBatchPredictionJob(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteBatchPredictionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteBatchPredictionJob, req, settings.GRPC, c.logger, "DeleteBatchPredictionJob") return err }, opts...) if err != nil { @@ -1581,7 +1586,7 @@ func (c *jobGRPCClient) CancelBatchPredictionJob(ctx context.Context, req *aipla opts = append((*c.CallOptions).CancelBatchPredictionJob[0:len((*c.CallOptions).CancelBatchPredictionJob):len((*c.CallOptions).CancelBatchPredictionJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.CancelBatchPredictionJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.CancelBatchPredictionJob, req, settings.GRPC, c.logger, "CancelBatchPredictionJob") return err }, opts...) return err @@ -1596,7 +1601,7 @@ func (c *jobGRPCClient) CreateModelDeploymentMonitoringJob(ctx context.Context, var resp *aiplatformpb.ModelDeploymentMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "CreateModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1625,7 +1630,7 @@ func (c *jobGRPCClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchModelDeploymentMonitoringStatsAnomalies, req, settings.GRPC, c.logger, "SearchModelDeploymentMonitoringStatsAnomalies") return err }, opts...) if err != nil { @@ -1660,7 +1665,7 @@ func (c *jobGRPCClient) GetModelDeploymentMonitoringJob(ctx context.Context, req var resp *aiplatformpb.ModelDeploymentMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "GetModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1689,7 +1694,7 @@ func (c *jobGRPCClient) ListModelDeploymentMonitoringJobs(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListModelDeploymentMonitoringJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListModelDeploymentMonitoringJobs, req, settings.GRPC, c.logger, "ListModelDeploymentMonitoringJobs") return err }, opts...) if err != nil { @@ -1724,7 +1729,7 @@ func (c *jobGRPCClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.UpdateModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.UpdateModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "UpdateModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1744,7 +1749,7 @@ func (c *jobGRPCClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.DeleteModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.DeleteModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "DeleteModelDeploymentMonitoringJob") return err }, opts...) if err != nil { @@ -1763,7 +1768,7 @@ func (c *jobGRPCClient) PauseModelDeploymentMonitoringJob(ctx context.Context, r opts = append((*c.CallOptions).PauseModelDeploymentMonitoringJob[0:len((*c.CallOptions).PauseModelDeploymentMonitoringJob):len((*c.CallOptions).PauseModelDeploymentMonitoringJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.PauseModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.PauseModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "PauseModelDeploymentMonitoringJob") return err }, opts...) return err @@ -1777,7 +1782,7 @@ func (c *jobGRPCClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, opts = append((*c.CallOptions).ResumeModelDeploymentMonitoringJob[0:len((*c.CallOptions).ResumeModelDeploymentMonitoringJob):len((*c.CallOptions).ResumeModelDeploymentMonitoringJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.ResumeModelDeploymentMonitoringJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.ResumeModelDeploymentMonitoringJob, req, settings.GRPC, c.logger, "ResumeModelDeploymentMonitoringJob") return err }, opts...) return err @@ -1792,7 +1797,7 @@ func (c *jobGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLoca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1821,7 +1826,7 @@ func (c *jobGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1856,7 +1861,7 @@ func (c *jobGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1874,7 +1879,7 @@ func (c *jobGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1892,7 +1897,7 @@ func (c *jobGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestI var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1909,7 +1914,7 @@ func (c *jobGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1923,7 +1928,7 @@ func (c *jobGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1938,7 +1943,7 @@ func (c *jobGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1967,7 +1972,7 @@ func (c *jobGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2002,7 +2007,7 @@ func (c *jobGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.Wa var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -2052,17 +2057,7 @@ func (c *jobRESTClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomJob") if err != nil { return err } @@ -2112,17 +2107,7 @@ func (c *jobRESTClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomJob") if err != nil { return err } @@ -2194,21 +2179,10 @@ func (c *jobRESTClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2270,21 +2244,10 @@ func (c *jobRESTClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2350,15 +2313,8 @@ func (c *jobRESTClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelCustomJob") + return err }, opts...) } @@ -2402,17 +2358,7 @@ func (c *jobRESTClient) CreateDataLabelingJob(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataLabelingJob") if err != nil { return err } @@ -2462,17 +2408,7 @@ func (c *jobRESTClient) GetDataLabelingJob(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataLabelingJob") if err != nil { return err } @@ -2547,21 +2483,10 @@ func (c *jobRESTClient) ListDataLabelingJobs(ctx context.Context, req *aiplatfor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataLabelingJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2623,21 +2548,10 @@ func (c *jobRESTClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataLabelingJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2691,15 +2605,8 @@ func (c *jobRESTClient) CancelDataLabelingJob(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelDataLabelingJob") + return err }, opts...) } @@ -2743,17 +2650,7 @@ func (c *jobRESTClient) CreateHyperparameterTuningJob(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateHyperparameterTuningJob") if err != nil { return err } @@ -2803,17 +2700,7 @@ func (c *jobRESTClient) GetHyperparameterTuningJob(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHyperparameterTuningJob") if err != nil { return err } @@ -2885,21 +2772,10 @@ func (c *jobRESTClient) ListHyperparameterTuningJobs(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHyperparameterTuningJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2961,21 +2837,10 @@ func (c *jobRESTClient) DeleteHyperparameterTuningJob(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteHyperparameterTuningJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3042,15 +2907,8 @@ func (c *jobRESTClient) CancelHyperparameterTuningJob(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelHyperparameterTuningJob") + return err }, opts...) } @@ -3094,17 +2952,7 @@ func (c *jobRESTClient) CreateNasJob(ctx context.Context, req *aiplatformpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNasJob") if err != nil { return err } @@ -3154,17 +3002,7 @@ func (c *jobRESTClient) GetNasJob(ctx context.Context, req *aiplatformpb.GetNasJ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNasJob") if err != nil { return err } @@ -3236,21 +3074,10 @@ func (c *jobRESTClient) ListNasJobs(ctx context.Context, req *aiplatformpb.ListN } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNasJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3312,21 +3139,10 @@ func (c *jobRESTClient) DeleteNasJob(ctx context.Context, req *aiplatformpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNasJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3392,15 +3208,8 @@ func (c *jobRESTClient) CancelNasJob(ctx context.Context, req *aiplatformpb.Canc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelNasJob") + return err }, opts...) } @@ -3437,17 +3246,7 @@ func (c *jobRESTClient) GetNasTrialDetail(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNasTrialDetail") if err != nil { return err } @@ -3509,21 +3308,10 @@ func (c *jobRESTClient) ListNasTrialDetails(ctx context.Context, req *aiplatform } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNasTrialDetails") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3594,17 +3382,7 @@ func (c *jobRESTClient) CreateBatchPredictionJob(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBatchPredictionJob") if err != nil { return err } @@ -3654,17 +3432,7 @@ func (c *jobRESTClient) GetBatchPredictionJob(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBatchPredictionJob") if err != nil { return err } @@ -3736,21 +3504,10 @@ func (c *jobRESTClient) ListBatchPredictionJobs(ctx context.Context, req *aiplat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBatchPredictionJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3813,21 +3570,10 @@ func (c *jobRESTClient) DeleteBatchPredictionJob(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBatchPredictionJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3892,15 +3638,8 @@ func (c *jobRESTClient) CancelBatchPredictionJob(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelBatchPredictionJob") + return err }, opts...) } @@ -3945,17 +3684,7 @@ func (c *jobRESTClient) CreateModelDeploymentMonitoringJob(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModelDeploymentMonitoringJob") if err != nil { return err } @@ -4017,21 +3746,10 @@ func (c *jobRESTClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchModelDeploymentMonitoringStatsAnomalies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4094,17 +3812,7 @@ func (c *jobRESTClient) GetModelDeploymentMonitoringJob(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelDeploymentMonitoringJob") if err != nil { return err } @@ -4176,21 +3884,10 @@ func (c *jobRESTClient) ListModelDeploymentMonitoringJobs(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelDeploymentMonitoringJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4266,21 +3963,10 @@ func (c *jobRESTClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModelDeploymentMonitoringJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4330,21 +4016,10 @@ func (c *jobRESTClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModelDeploymentMonitoringJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4401,15 +4076,8 @@ func (c *jobRESTClient) PauseModelDeploymentMonitoringJob(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseModelDeploymentMonitoringJob") + return err }, opts...) } @@ -4451,15 +4119,8 @@ func (c *jobRESTClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeModelDeploymentMonitoringJob") + return err }, opts...) } @@ -4496,17 +4157,7 @@ func (c *jobRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLoca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4571,21 +4222,10 @@ func (c *jobRESTClient) ListLocations(ctx context.Context, req *locationpb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4655,17 +4295,7 @@ func (c *jobRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -4725,17 +4355,7 @@ func (c *jobRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4797,17 +4417,7 @@ func (c *jobRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4854,15 +4464,8 @@ func (c *jobRESTClient) CancelOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -4896,15 +4499,8 @@ func (c *jobRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4941,17 +4537,7 @@ func (c *jobRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5016,21 +4602,10 @@ func (c *jobRESTClient) ListOperations(ctx context.Context, req *longrunningpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5100,17 +4675,7 @@ func (c *jobRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.Wa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/job_client_example_go123_test.go b/aiplatform/apiv1beta1/job_client_example_go123_test.go index ff9c45bac91b..9f59cbd6d792 100644 --- a/aiplatform/apiv1beta1/job_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/job_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleJobClient_ListBatchPredictionJobs_all() { } for resp, err := range c.ListBatchPredictionJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleJobClient_ListCustomJobs_all() { } for resp, err := range c.ListCustomJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleJobClient_ListDataLabelingJobs_all() { } for resp, err := range c.ListDataLabelingJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleJobClient_ListHyperparameterTuningJobs_all() { } for resp, err := range c.ListHyperparameterTuningJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleJobClient_ListModelDeploymentMonitoringJobs_all() { } for resp, err := range c.ListModelDeploymentMonitoringJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleJobClient_ListNasJobs_all() { } for resp, err := range c.ListNasJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleJobClient_ListNasTrialDetails_all() { } for resp, err := range c.ListNasTrialDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies_all() { } for resp, err := range c.SearchModelDeploymentMonitoringStatsAnomalies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleJobClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleJobClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/llm_utility_client.go b/aiplatform/apiv1beta1/llm_utility_client.go index 388210f75b3b..666b2333f96d 100755 --- a/aiplatform/apiv1beta1/llm_utility_client.go +++ b/aiplatform/apiv1beta1/llm_utility_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -245,6 +244,8 @@ type llmUtilityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLlmUtilityClient creates a new llm utility service client based on gRPC. @@ -271,6 +272,7 @@ func NewLlmUtilityClient(ctx context.Context, opts ...option.ClientOption) (*Llm connPool: connPool, llmUtilityClient: aiplatformpb.NewLlmUtilityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -320,6 +322,8 @@ type llmUtilityRESTClient struct { // Points back to the CallOptions field of the containing LlmUtilityClient CallOptions **LlmUtilityCallOptions + + logger *slog.Logger } // NewLlmUtilityRESTClient creates a new llm utility service rest client. @@ -337,6 +341,7 @@ func NewLlmUtilityRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -389,7 +394,7 @@ func (c *llmUtilityGRPCClient) ComputeTokens(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ComputeTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.llmUtilityClient.ComputeTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.llmUtilityClient.ComputeTokens, req, settings.GRPC, c.logger, "ComputeTokens") return err }, opts...) if err != nil { @@ -407,7 +412,7 @@ func (c *llmUtilityGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -436,7 +441,7 @@ func (c *llmUtilityGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -471,7 +476,7 @@ func (c *llmUtilityGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *llmUtilityGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *llmUtilityGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *llmUtilityGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -538,7 +543,7 @@ func (c *llmUtilityGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -553,7 +558,7 @@ func (c *llmUtilityGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *llmUtilityGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -617,7 +622,7 @@ func (c *llmUtilityGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -665,17 +670,7 @@ func (c *llmUtilityRESTClient) ComputeTokens(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ComputeTokens") if err != nil { return err } @@ -725,17 +720,7 @@ func (c *llmUtilityRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -800,21 +785,10 @@ func (c *llmUtilityRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -884,17 +858,7 @@ func (c *llmUtilityRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -954,17 +918,7 @@ func (c *llmUtilityRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1026,17 +980,7 @@ func (c *llmUtilityRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1083,15 +1027,8 @@ func (c *llmUtilityRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1125,15 +1062,8 @@ func (c *llmUtilityRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1170,17 +1100,7 @@ func (c *llmUtilityRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1245,21 +1165,10 @@ func (c *llmUtilityRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1329,17 +1238,7 @@ func (c *llmUtilityRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/llm_utility_client_example_go123_test.go b/aiplatform/apiv1beta1/llm_utility_client_example_go123_test.go index f0910c4b7992..e0af70cb9b94 100644 --- a/aiplatform/apiv1beta1/llm_utility_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/llm_utility_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleLlmUtilityClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleLlmUtilityClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/match_client.go b/aiplatform/apiv1beta1/match_client.go index a76d4085e7e2..ee94bb139593 100755 --- a/aiplatform/apiv1beta1/match_client.go +++ b/aiplatform/apiv1beta1/match_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -256,6 +255,8 @@ type matchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMatchClient creates a new match service client based on gRPC. @@ -283,6 +284,7 @@ func NewMatchClient(ctx context.Context, opts ...option.ClientOption) (*MatchCli connPool: connPool, matchClient: aiplatformpb.NewMatchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -332,6 +334,8 @@ type matchRESTClient struct { // Points back to the CallOptions field of the containing MatchClient CallOptions **MatchCallOptions + + logger *slog.Logger } // NewMatchRESTClient creates a new match service rest client. @@ -350,6 +354,7 @@ func NewMatchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Matc endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -402,7 +407,7 @@ func (c *matchGRPCClient) FindNeighbors(ctx context.Context, req *aiplatformpb.F var resp *aiplatformpb.FindNeighborsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.matchClient.FindNeighbors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.matchClient.FindNeighbors, req, settings.GRPC, c.logger, "FindNeighbors") return err }, opts...) if err != nil { @@ -420,7 +425,7 @@ func (c *matchGRPCClient) ReadIndexDatapoints(ctx context.Context, req *aiplatfo var resp *aiplatformpb.ReadIndexDatapointsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.matchClient.ReadIndexDatapoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.matchClient.ReadIndexDatapoints, req, settings.GRPC, c.logger, "ReadIndexDatapoints") return err }, opts...) if err != nil { @@ -438,7 +443,7 @@ func (c *matchGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *matchGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -502,7 +507,7 @@ func (c *matchGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -520,7 +525,7 @@ func (c *matchGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -538,7 +543,7 @@ func (c *matchGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -555,7 +560,7 @@ func (c *matchGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -569,7 +574,7 @@ func (c *matchGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -584,7 +589,7 @@ func (c *matchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *matchGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *matchGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -696,17 +701,7 @@ func (c *matchRESTClient) FindNeighbors(ctx context.Context, req *aiplatformpb.F httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FindNeighbors") if err != nil { return err } @@ -763,17 +758,7 @@ func (c *matchRESTClient) ReadIndexDatapoints(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReadIndexDatapoints") if err != nil { return err } @@ -823,17 +808,7 @@ func (c *matchRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -898,21 +873,10 @@ func (c *matchRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -982,17 +946,7 @@ func (c *matchRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1052,17 +1006,7 @@ func (c *matchRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1124,17 +1068,7 @@ func (c *matchRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Tes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1181,15 +1115,8 @@ func (c *matchRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1223,15 +1150,8 @@ func (c *matchRESTClient) DeleteOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1268,17 +1188,7 @@ func (c *matchRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1343,21 +1253,10 @@ func (c *matchRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1427,17 +1326,7 @@ func (c *matchRESTClient) WaitOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/match_client_example_go123_test.go b/aiplatform/apiv1beta1/match_client_example_go123_test.go index 3b7c7d804d45..f7e99420e1e4 100644 --- a/aiplatform/apiv1beta1/match_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/match_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleMatchClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleMatchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/metadata_client.go b/aiplatform/apiv1beta1/metadata_client.go index c17c4fdc3d7f..8cea233c2fc5 100755 --- a/aiplatform/apiv1beta1/metadata_client.go +++ b/aiplatform/apiv1beta1/metadata_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -709,6 +708,8 @@ type metadataGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetadataClient creates a new metadata service client based on gRPC. @@ -735,6 +736,7 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad connPool: connPool, metadataClient: aiplatformpb.NewMetadataServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -800,6 +802,8 @@ type metadataRESTClient struct { // Points back to the CallOptions field of the containing MetadataClient CallOptions **MetadataCallOptions + + logger *slog.Logger } // NewMetadataRESTClient creates a new metadata service rest client. @@ -817,6 +821,7 @@ func NewMetadataRESTClient(ctx context.Context, opts ...option.ClientOption) (*M endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -879,7 +884,7 @@ func (c *metadataGRPCClient) CreateMetadataStore(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateMetadataStore, req, settings.GRPC, c.logger, "CreateMetadataStore") return err }, opts...) if err != nil { @@ -899,7 +904,7 @@ func (c *metadataGRPCClient) GetMetadataStore(ctx context.Context, req *aiplatfo var resp *aiplatformpb.MetadataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetMetadataStore, req, settings.GRPC, c.logger, "GetMetadataStore") return err }, opts...) if err != nil { @@ -928,7 +933,7 @@ func (c *metadataGRPCClient) ListMetadataStores(ctx context.Context, req *aiplat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListMetadataStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListMetadataStores, req, settings.GRPC, c.logger, "ListMetadataStores") return err }, opts...) if err != nil { @@ -963,7 +968,7 @@ func (c *metadataGRPCClient) DeleteMetadataStore(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteMetadataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteMetadataStore, req, settings.GRPC, c.logger, "DeleteMetadataStore") return err }, opts...) if err != nil { @@ -983,7 +988,7 @@ func (c *metadataGRPCClient) CreateArtifact(ctx context.Context, req *aiplatform var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateArtifact, req, settings.GRPC, c.logger, "CreateArtifact") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *metadataGRPCClient) GetArtifact(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetArtifact, req, settings.GRPC, c.logger, "GetArtifact") return err }, opts...) if err != nil { @@ -1030,7 +1035,7 @@ func (c *metadataGRPCClient) ListArtifacts(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListArtifacts, req, settings.GRPC, c.logger, "ListArtifacts") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *metadataGRPCClient) UpdateArtifact(ctx context.Context, req *aiplatform var resp *aiplatformpb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateArtifact, req, settings.GRPC, c.logger, "UpdateArtifact") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *metadataGRPCClient) DeleteArtifact(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteArtifact, req, settings.GRPC, c.logger, "DeleteArtifact") return err }, opts...) if err != nil { @@ -1103,7 +1108,7 @@ func (c *metadataGRPCClient) PurgeArtifacts(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeArtifacts, req, settings.GRPC, c.logger, "PurgeArtifacts") return err }, opts...) if err != nil { @@ -1123,7 +1128,7 @@ func (c *metadataGRPCClient) CreateContext(ctx context.Context, req *aiplatformp var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateContext, req, settings.GRPC, c.logger, "CreateContext") return err }, opts...) if err != nil { @@ -1141,7 +1146,7 @@ func (c *metadataGRPCClient) GetContext(ctx context.Context, req *aiplatformpb.G var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetContext, req, settings.GRPC, c.logger, "GetContext") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *metadataGRPCClient) ListContexts(ctx context.Context, req *aiplatformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListContexts, req, settings.GRPC, c.logger, "ListContexts") return err }, opts...) if err != nil { @@ -1205,7 +1210,7 @@ func (c *metadataGRPCClient) UpdateContext(ctx context.Context, req *aiplatformp var resp *aiplatformpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateContext, req, settings.GRPC, c.logger, "UpdateContext") return err }, opts...) if err != nil { @@ -1223,7 +1228,7 @@ func (c *metadataGRPCClient) DeleteContext(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteContext, req, settings.GRPC, c.logger, "DeleteContext") return err }, opts...) if err != nil { @@ -1243,7 +1248,7 @@ func (c *metadataGRPCClient) PurgeContexts(ctx context.Context, req *aiplatformp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeContexts, req, settings.GRPC, c.logger, "PurgeContexts") return err }, opts...) if err != nil { @@ -1263,7 +1268,7 @@ func (c *metadataGRPCClient) AddContextArtifactsAndExecutions(ctx context.Contex var resp *aiplatformpb.AddContextArtifactsAndExecutionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddContextArtifactsAndExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddContextArtifactsAndExecutions, req, settings.GRPC, c.logger, "AddContextArtifactsAndExecutions") return err }, opts...) if err != nil { @@ -1281,7 +1286,7 @@ func (c *metadataGRPCClient) AddContextChildren(ctx context.Context, req *aiplat var resp *aiplatformpb.AddContextChildrenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddContextChildren(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddContextChildren, req, settings.GRPC, c.logger, "AddContextChildren") return err }, opts...) if err != nil { @@ -1299,7 +1304,7 @@ func (c *metadataGRPCClient) RemoveContextChildren(ctx context.Context, req *aip var resp *aiplatformpb.RemoveContextChildrenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.RemoveContextChildren(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.RemoveContextChildren, req, settings.GRPC, c.logger, "RemoveContextChildren") return err }, opts...) if err != nil { @@ -1317,7 +1322,7 @@ func (c *metadataGRPCClient) QueryContextLineageSubgraph(ctx context.Context, re var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryContextLineageSubgraph(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryContextLineageSubgraph, req, settings.GRPC, c.logger, "QueryContextLineageSubgraph") return err }, opts...) if err != nil { @@ -1335,7 +1340,7 @@ func (c *metadataGRPCClient) CreateExecution(ctx context.Context, req *aiplatfor var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateExecution, req, settings.GRPC, c.logger, "CreateExecution") return err }, opts...) if err != nil { @@ -1353,7 +1358,7 @@ func (c *metadataGRPCClient) GetExecution(ctx context.Context, req *aiplatformpb var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -1382,7 +1387,7 @@ func (c *metadataGRPCClient) ListExecutions(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -1417,7 +1422,7 @@ func (c *metadataGRPCClient) UpdateExecution(ctx context.Context, req *aiplatfor var resp *aiplatformpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateExecution, req, settings.GRPC, c.logger, "UpdateExecution") return err }, opts...) if err != nil { @@ -1435,7 +1440,7 @@ func (c *metadataGRPCClient) DeleteExecution(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.DeleteExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.DeleteExecution, req, settings.GRPC, c.logger, "DeleteExecution") return err }, opts...) if err != nil { @@ -1455,7 +1460,7 @@ func (c *metadataGRPCClient) PurgeExecutions(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.PurgeExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.PurgeExecutions, req, settings.GRPC, c.logger, "PurgeExecutions") return err }, opts...) if err != nil { @@ -1475,7 +1480,7 @@ func (c *metadataGRPCClient) AddExecutionEvents(ctx context.Context, req *aiplat var resp *aiplatformpb.AddExecutionEventsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.AddExecutionEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.AddExecutionEvents, req, settings.GRPC, c.logger, "AddExecutionEvents") return err }, opts...) if err != nil { @@ -1493,7 +1498,7 @@ func (c *metadataGRPCClient) QueryExecutionInputsAndOutputs(ctx context.Context, var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryExecutionInputsAndOutputs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryExecutionInputsAndOutputs, req, settings.GRPC, c.logger, "QueryExecutionInputsAndOutputs") return err }, opts...) if err != nil { @@ -1511,7 +1516,7 @@ func (c *metadataGRPCClient) CreateMetadataSchema(ctx context.Context, req *aipl var resp *aiplatformpb.MetadataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateMetadataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateMetadataSchema, req, settings.GRPC, c.logger, "CreateMetadataSchema") return err }, opts...) if err != nil { @@ -1529,7 +1534,7 @@ func (c *metadataGRPCClient) GetMetadataSchema(ctx context.Context, req *aiplatf var resp *aiplatformpb.MetadataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetMetadataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetMetadataSchema, req, settings.GRPC, c.logger, "GetMetadataSchema") return err }, opts...) if err != nil { @@ -1558,7 +1563,7 @@ func (c *metadataGRPCClient) ListMetadataSchemas(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListMetadataSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListMetadataSchemas, req, settings.GRPC, c.logger, "ListMetadataSchemas") return err }, opts...) if err != nil { @@ -1593,7 +1598,7 @@ func (c *metadataGRPCClient) QueryArtifactLineageSubgraph(ctx context.Context, r var resp *aiplatformpb.LineageSubgraph err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.QueryArtifactLineageSubgraph(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.QueryArtifactLineageSubgraph, req, settings.GRPC, c.logger, "QueryArtifactLineageSubgraph") return err }, opts...) if err != nil { @@ -1611,7 +1616,7 @@ func (c *metadataGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1640,7 +1645,7 @@ func (c *metadataGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1675,7 +1680,7 @@ func (c *metadataGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1693,7 +1698,7 @@ func (c *metadataGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1711,7 +1716,7 @@ func (c *metadataGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1728,7 +1733,7 @@ func (c *metadataGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1742,7 +1747,7 @@ func (c *metadataGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1757,7 +1762,7 @@ func (c *metadataGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1786,7 +1791,7 @@ func (c *metadataGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1821,7 +1826,7 @@ func (c *metadataGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1872,21 +1877,10 @@ func (c *metadataRESTClient) CreateMetadataStore(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMetadataStore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1937,17 +1931,7 @@ func (c *metadataRESTClient) GetMetadataStore(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMetadataStore") if err != nil { return err } @@ -2009,21 +1993,10 @@ func (c *metadataRESTClient) ListMetadataStores(ctx context.Context, req *aiplat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMetadataStores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2089,21 +2062,10 @@ func (c *metadataRESTClient) DeleteMetadataStore(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMetadataStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2164,17 +2126,7 @@ func (c *metadataRESTClient) CreateArtifact(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateArtifact") if err != nil { return err } @@ -2224,17 +2176,7 @@ func (c *metadataRESTClient) GetArtifact(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetArtifact") if err != nil { return err } @@ -2302,21 +2244,10 @@ func (c *metadataRESTClient) ListArtifacts(ctx context.Context, req *aiplatformp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListArtifacts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2396,17 +2327,7 @@ func (c *metadataRESTClient) UpdateArtifact(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateArtifact") if err != nil { return err } @@ -2458,21 +2379,10 @@ func (c *metadataRESTClient) DeleteArtifact(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteArtifact") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2528,21 +2438,10 @@ func (c *metadataRESTClient) PurgeArtifacts(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeArtifacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2603,17 +2502,7 @@ func (c *metadataRESTClient) CreateContext(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateContext") if err != nil { return err } @@ -2663,17 +2552,7 @@ func (c *metadataRESTClient) GetContext(ctx context.Context, req *aiplatformpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetContext") if err != nil { return err } @@ -2741,21 +2620,10 @@ func (c *metadataRESTClient) ListContexts(ctx context.Context, req *aiplatformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContexts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2835,17 +2703,7 @@ func (c *metadataRESTClient) UpdateContext(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateContext") if err != nil { return err } @@ -2900,21 +2758,10 @@ func (c *metadataRESTClient) DeleteContext(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteContext") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2970,21 +2817,10 @@ func (c *metadataRESTClient) PurgeContexts(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeContexts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3043,17 +2879,7 @@ func (c *metadataRESTClient) AddContextArtifactsAndExecutions(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddContextArtifactsAndExecutions") if err != nil { return err } @@ -3113,17 +2939,7 @@ func (c *metadataRESTClient) AddContextChildren(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddContextChildren") if err != nil { return err } @@ -3181,17 +2997,7 @@ func (c *metadataRESTClient) RemoveContextChildren(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveContextChildren") if err != nil { return err } @@ -3242,17 +3048,7 @@ func (c *metadataRESTClient) QueryContextLineageSubgraph(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryContextLineageSubgraph") if err != nil { return err } @@ -3312,17 +3108,7 @@ func (c *metadataRESTClient) CreateExecution(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExecution") if err != nil { return err } @@ -3372,17 +3158,7 @@ func (c *metadataRESTClient) GetExecution(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExecution") if err != nil { return err } @@ -3450,21 +3226,10 @@ func (c *metadataRESTClient) ListExecutions(ctx context.Context, req *aiplatform } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExecutions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3544,17 +3309,7 @@ func (c *metadataRESTClient) UpdateExecution(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExecution") if err != nil { return err } @@ -3606,21 +3361,10 @@ func (c *metadataRESTClient) DeleteExecution(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExecution") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3676,21 +3420,10 @@ func (c *metadataRESTClient) PurgeExecutions(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeExecutions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3750,17 +3483,7 @@ func (c *metadataRESTClient) AddExecutionEvents(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddExecutionEvents") if err != nil { return err } @@ -3812,17 +3535,7 @@ func (c *metadataRESTClient) QueryExecutionInputsAndOutputs(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryExecutionInputsAndOutputs") if err != nil { return err } @@ -3882,17 +3595,7 @@ func (c *metadataRESTClient) CreateMetadataSchema(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMetadataSchema") if err != nil { return err } @@ -3942,17 +3645,7 @@ func (c *metadataRESTClient) GetMetadataSchema(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMetadataSchema") if err != nil { return err } @@ -4017,21 +3710,10 @@ func (c *metadataRESTClient) ListMetadataSchemas(ctx context.Context, req *aipla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMetadataSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4101,17 +3783,7 @@ func (c *metadataRESTClient) QueryArtifactLineageSubgraph(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryArtifactLineageSubgraph") if err != nil { return err } @@ -4161,17 +3833,7 @@ func (c *metadataRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4236,21 +3898,10 @@ func (c *metadataRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4320,17 +3971,7 @@ func (c *metadataRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -4390,17 +4031,7 @@ func (c *metadataRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4462,17 +4093,7 @@ func (c *metadataRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4519,15 +4140,8 @@ func (c *metadataRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -4561,15 +4175,8 @@ func (c *metadataRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4606,17 +4213,7 @@ func (c *metadataRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4681,21 +4278,10 @@ func (c *metadataRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4765,17 +4351,7 @@ func (c *metadataRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/metadata_client_example_go123_test.go b/aiplatform/apiv1beta1/metadata_client_example_go123_test.go index a9944227bcd0..ea3dfadcef37 100644 --- a/aiplatform/apiv1beta1/metadata_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/metadata_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleMetadataClient_ListArtifacts_all() { } for resp, err := range c.ListArtifacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleMetadataClient_ListContexts_all() { } for resp, err := range c.ListContexts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleMetadataClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleMetadataClient_ListMetadataSchemas_all() { } for resp, err := range c.ListMetadataSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleMetadataClient_ListMetadataStores_all() { } for resp, err := range c.ListMetadataStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleMetadataClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleMetadataClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/migration_client.go b/aiplatform/apiv1beta1/migration_client.go index 4f0c007fa168..a8f115e1d9bd 100755 --- a/aiplatform/apiv1beta1/migration_client.go +++ b/aiplatform/apiv1beta1/migration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -277,6 +276,8 @@ type migrationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMigrationClient creates a new migration service client based on gRPC. @@ -304,6 +305,7 @@ func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*Migr connPool: connPool, migrationClient: aiplatformpb.NewMigrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -369,6 +371,8 @@ type migrationRESTClient struct { // Points back to the CallOptions field of the containing MigrationClient CallOptions **MigrationCallOptions + + logger *slog.Logger } // NewMigrationRESTClient creates a new migration service rest client. @@ -387,6 +391,7 @@ func NewMigrationRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -460,7 +465,7 @@ func (c *migrationGRPCClient) SearchMigratableResources(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.migrationClient.SearchMigratableResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.migrationClient.SearchMigratableResources, req, settings.GRPC, c.logger, "SearchMigratableResources") return err }, opts...) if err != nil { @@ -495,7 +500,7 @@ func (c *migrationGRPCClient) BatchMigrateResources(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.migrationClient.BatchMigrateResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.migrationClient.BatchMigrateResources, req, settings.GRPC, c.logger, "BatchMigrateResources") return err }, opts...) if err != nil { @@ -515,7 +520,7 @@ func (c *migrationGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *migrationGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *migrationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -597,7 +602,7 @@ func (c *migrationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *migrationGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -632,7 +637,7 @@ func (c *migrationGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -646,7 +651,7 @@ func (c *migrationGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -661,7 +666,7 @@ func (c *migrationGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *migrationGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *migrationGRPCClient) WaitOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -781,21 +786,10 @@ func (c *migrationRESTClient) SearchMigratableResources(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchMigratableResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -864,21 +858,10 @@ func (c *migrationRESTClient) BatchMigrateResources(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchMigrateResources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -929,17 +912,7 @@ func (c *migrationRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1004,21 +977,10 @@ func (c *migrationRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1088,17 +1050,7 @@ func (c *migrationRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1158,17 +1110,7 @@ func (c *migrationRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1230,17 +1172,7 @@ func (c *migrationRESTClient) TestIamPermissions(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1287,15 +1219,8 @@ func (c *migrationRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1329,15 +1254,8 @@ func (c *migrationRESTClient) DeleteOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1374,17 +1292,7 @@ func (c *migrationRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1449,21 +1357,10 @@ func (c *migrationRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1533,17 +1430,7 @@ func (c *migrationRESTClient) WaitOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/migration_client_example_go123_test.go b/aiplatform/apiv1beta1/migration_client_example_go123_test.go index 9bcbe229f29a..3b02aa2aee97 100644 --- a/aiplatform/apiv1beta1/migration_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/migration_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleMigrationClient_SearchMigratableResources_all() { } for resp, err := range c.SearchMigratableResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleMigrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleMigrationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/model_client.go b/aiplatform/apiv1beta1/model_client.go index 3d45d0b415fb..a55d46478ee7 100755 --- a/aiplatform/apiv1beta1/model_client.go +++ b/aiplatform/apiv1beta1/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -518,6 +517,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -544,6 +545,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: aiplatformpb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -609,6 +611,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -626,6 +630,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -688,7 +693,7 @@ func (c *modelGRPCClient) UploadModel(ctx context.Context, req *aiplatformpb.Upl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UploadModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UploadModel, req, settings.GRPC, c.logger, "UploadModel") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *aiplatformpb.GetMod var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -737,7 +742,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *aiplatformpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -783,7 +788,7 @@ func (c *modelGRPCClient) ListModelVersions(ctx context.Context, req *aiplatform } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelVersions, req, settings.GRPC, c.logger, "ListModelVersions") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *modelGRPCClient) UpdateModel(ctx context.Context, req *aiplatformpb.Upd var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *modelGRPCClient) UpdateExplanationDataset(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateExplanationDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateExplanationDataset, req, settings.GRPC, c.logger, "UpdateExplanationDataset") return err }, opts...) if err != nil { @@ -856,7 +861,7 @@ func (c *modelGRPCClient) DeleteModel(ctx context.Context, req *aiplatformpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.DeleteModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *modelGRPCClient) DeleteModelVersion(ctx context.Context, req *aiplatfor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.DeleteModelVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.DeleteModelVersion, req, settings.GRPC, c.logger, "DeleteModelVersion") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *modelGRPCClient) MergeVersionAliases(ctx context.Context, req *aiplatfo var resp *aiplatformpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.MergeVersionAliases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.MergeVersionAliases, req, settings.GRPC, c.logger, "MergeVersionAliases") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *modelGRPCClient) ExportModel(ctx context.Context, req *aiplatformpb.Exp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ExportModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ExportModel, req, settings.GRPC, c.logger, "ExportModel") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *modelGRPCClient) CopyModel(ctx context.Context, req *aiplatformpb.CopyM var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CopyModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CopyModel, req, settings.GRPC, c.logger, "CopyModel") return err }, opts...) if err != nil { @@ -954,7 +959,7 @@ func (c *modelGRPCClient) ImportModelEvaluation(ctx context.Context, req *aiplat var resp *aiplatformpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ImportModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ImportModelEvaluation, req, settings.GRPC, c.logger, "ImportModelEvaluation") return err }, opts...) if err != nil { @@ -972,7 +977,7 @@ func (c *modelGRPCClient) BatchImportModelEvaluationSlices(ctx context.Context, var resp *aiplatformpb.BatchImportModelEvaluationSlicesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.BatchImportModelEvaluationSlices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.BatchImportModelEvaluationSlices, req, settings.GRPC, c.logger, "BatchImportModelEvaluationSlices") return err }, opts...) if err != nil { @@ -990,7 +995,7 @@ func (c *modelGRPCClient) BatchImportEvaluatedAnnotations(ctx context.Context, r var resp *aiplatformpb.BatchImportEvaluatedAnnotationsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.BatchImportEvaluatedAnnotations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.BatchImportEvaluatedAnnotations, req, settings.GRPC, c.logger, "BatchImportEvaluatedAnnotations") return err }, opts...) if err != nil { @@ -1008,7 +1013,7 @@ func (c *modelGRPCClient) GetModelEvaluation(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModelEvaluation, req, settings.GRPC, c.logger, "GetModelEvaluation") return err }, opts...) if err != nil { @@ -1037,7 +1042,7 @@ func (c *modelGRPCClient) ListModelEvaluations(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelEvaluations, req, settings.GRPC, c.logger, "ListModelEvaluations") return err }, opts...) if err != nil { @@ -1072,7 +1077,7 @@ func (c *modelGRPCClient) GetModelEvaluationSlice(ctx context.Context, req *aipl var resp *aiplatformpb.ModelEvaluationSlice err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModelEvaluationSlice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModelEvaluationSlice, req, settings.GRPC, c.logger, "GetModelEvaluationSlice") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *modelGRPCClient) ListModelEvaluationSlices(ctx context.Context, req *ai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModelEvaluationSlices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModelEvaluationSlices, req, settings.GRPC, c.logger, "ListModelEvaluationSlices") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *modelGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *modelGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1200,7 +1205,7 @@ func (c *modelGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1218,7 +1223,7 @@ func (c *modelGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1236,7 +1241,7 @@ func (c *modelGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Tes var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1253,7 +1258,7 @@ func (c *modelGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1267,7 +1272,7 @@ func (c *modelGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1282,7 +1287,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1311,7 +1316,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1346,7 +1351,7 @@ func (c *modelGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1393,21 +1398,10 @@ func (c *modelRESTClient) UploadModel(ctx context.Context, req *aiplatformpb.Upl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UploadModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1458,17 +1452,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *aiplatformpb.GetMod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -1540,21 +1524,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *aiplatformpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1642,21 +1615,10 @@ func (c *modelRESTClient) ListModelVersions(ctx context.Context, req *aiplatform } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1733,17 +1695,7 @@ func (c *modelRESTClient) UpdateModel(ctx context.Context, req *aiplatformpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModel") if err != nil { return err } @@ -1798,21 +1750,10 @@ func (c *modelRESTClient) UpdateExplanationDataset(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExplanationDataset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1869,21 +1810,10 @@ func (c *modelRESTClient) DeleteModel(ctx context.Context, req *aiplatformpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1939,21 +1869,10 @@ func (c *modelRESTClient) DeleteModelVersion(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModelVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2010,17 +1929,7 @@ func (c *modelRESTClient) MergeVersionAliases(ctx context.Context, req *aiplatfo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MergeVersionAliases") if err != nil { return err } @@ -2078,21 +1987,10 @@ func (c *modelRESTClient) ExportModel(ctx context.Context, req *aiplatformpb.Exp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2153,21 +2051,10 @@ func (c *modelRESTClient) CopyModel(ctx context.Context, req *aiplatformpb.CopyM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CopyModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2224,17 +2111,7 @@ func (c *modelRESTClient) ImportModelEvaluation(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportModelEvaluation") if err != nil { return err } @@ -2290,17 +2167,7 @@ func (c *modelRESTClient) BatchImportModelEvaluationSlices(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchImportModelEvaluationSlices") if err != nil { return err } @@ -2356,17 +2223,7 @@ func (c *modelRESTClient) BatchImportEvaluatedAnnotations(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchImportEvaluatedAnnotations") if err != nil { return err } @@ -2416,17 +2273,7 @@ func (c *modelRESTClient) GetModelEvaluation(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelEvaluation") if err != nil { return err } @@ -2498,21 +2345,10 @@ func (c *modelRESTClient) ListModelEvaluations(ctx context.Context, req *aiplatf } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelEvaluations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2575,17 +2411,7 @@ func (c *modelRESTClient) GetModelEvaluationSlice(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelEvaluationSlice") if err != nil { return err } @@ -2657,21 +2483,10 @@ func (c *modelRESTClient) ListModelEvaluationSlices(ctx context.Context, req *ai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelEvaluationSlices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2734,17 +2549,7 @@ func (c *modelRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2809,21 +2614,10 @@ func (c *modelRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2893,17 +2687,7 @@ func (c *modelRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2963,17 +2747,7 @@ func (c *modelRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3035,17 +2809,7 @@ func (c *modelRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Tes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3092,15 +2856,8 @@ func (c *modelRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3134,15 +2891,8 @@ func (c *modelRESTClient) DeleteOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3179,17 +2929,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3254,21 +2994,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3338,17 +3067,7 @@ func (c *modelRESTClient) WaitOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/model_client_example_go123_test.go b/aiplatform/apiv1beta1/model_client_example_go123_test.go index 99b4e7d8dd6d..11395244ed48 100644 --- a/aiplatform/apiv1beta1/model_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/model_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleModelClient_ListModelEvaluationSlices_all() { } for resp, err := range c.ListModelEvaluationSlices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleModelClient_ListModelEvaluations_all() { } for resp, err := range c.ListModelEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleModelClient_ListModelVersions_all() { } for resp, err := range c.ListModelVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleModelClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/model_garden_client.go b/aiplatform/apiv1beta1/model_garden_client.go index d9149bda06e2..761a7e2d57af 100755 --- a/aiplatform/apiv1beta1/model_garden_client.go +++ b/aiplatform/apiv1beta1/model_garden_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -254,6 +253,8 @@ type modelGardenGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelGardenClient creates a new model garden service client based on gRPC. @@ -280,6 +281,7 @@ func NewModelGardenClient(ctx context.Context, opts ...option.ClientOption) (*Mo connPool: connPool, modelGardenClient: aiplatformpb.NewModelGardenServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -329,6 +331,8 @@ type modelGardenRESTClient struct { // Points back to the CallOptions field of the containing ModelGardenClient CallOptions **ModelGardenCallOptions + + logger *slog.Logger } // NewModelGardenRESTClient creates a new model garden service rest client. @@ -346,6 +350,7 @@ func NewModelGardenRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,7 +403,7 @@ func (c *modelGardenGRPCClient) GetPublisherModel(ctx context.Context, req *aipl var resp *aiplatformpb.PublisherModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelGardenClient.GetPublisherModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelGardenClient.GetPublisherModel, req, settings.GRPC, c.logger, "GetPublisherModel") return err }, opts...) if err != nil { @@ -427,7 +432,7 @@ func (c *modelGardenGRPCClient) ListPublisherModels(ctx context.Context, req *ai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelGardenClient.ListPublisherModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelGardenClient.ListPublisherModels, req, settings.GRPC, c.logger, "ListPublisherModels") return err }, opts...) if err != nil { @@ -462,7 +467,7 @@ func (c *modelGardenGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -491,7 +496,7 @@ func (c *modelGardenGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *modelGardenGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *modelGardenGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *modelGardenGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *modelGardenGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -593,7 +598,7 @@ func (c *modelGardenGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -608,7 +613,7 @@ func (c *modelGardenGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -637,7 +642,7 @@ func (c *modelGardenGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *modelGardenGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -726,17 +731,7 @@ func (c *modelGardenRESTClient) GetPublisherModel(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPublisherModel") if err != nil { return err } @@ -813,21 +808,10 @@ func (c *modelGardenRESTClient) ListPublisherModels(ctx context.Context, req *ai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPublisherModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -890,17 +874,7 @@ func (c *modelGardenRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -965,21 +939,10 @@ func (c *modelGardenRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1049,17 +1012,7 @@ func (c *modelGardenRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1119,17 +1072,7 @@ func (c *modelGardenRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Set httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1191,17 +1134,7 @@ func (c *modelGardenRESTClient) TestIamPermissions(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1248,15 +1181,8 @@ func (c *modelGardenRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1290,15 +1216,8 @@ func (c *modelGardenRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1335,17 +1254,7 @@ func (c *modelGardenRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1410,21 +1319,10 @@ func (c *modelGardenRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1494,17 +1392,7 @@ func (c *modelGardenRESTClient) WaitOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/model_garden_client_example_go123_test.go b/aiplatform/apiv1beta1/model_garden_client_example_go123_test.go index 6424d8d90628..17be37e20c4d 100644 --- a/aiplatform/apiv1beta1/model_garden_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/model_garden_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleModelGardenClient_ListPublisherModels_all() { } for resp, err := range c.ListPublisherModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleModelGardenClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleModelGardenClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/model_monitoring_client.go b/aiplatform/apiv1beta1/model_monitoring_client.go index 748e9b52be09..c7342b4de5d1 100755 --- a/aiplatform/apiv1beta1/model_monitoring_client.go +++ b/aiplatform/apiv1beta1/model_monitoring_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -381,6 +380,8 @@ type modelMonitoringGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelMonitoringClient creates a new model monitoring service client based on gRPC. @@ -408,6 +409,7 @@ func NewModelMonitoringClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, modelMonitoringClient: aiplatformpb.NewModelMonitoringServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -473,6 +475,8 @@ type modelMonitoringRESTClient struct { // Points back to the CallOptions field of the containing ModelMonitoringClient CallOptions **ModelMonitoringCallOptions + + logger *slog.Logger } // NewModelMonitoringRESTClient creates a new model monitoring service rest client. @@ -491,6 +495,7 @@ func NewModelMonitoringRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -553,7 +558,7 @@ func (c *modelMonitoringGRPCClient) CreateModelMonitor(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.CreateModelMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.CreateModelMonitor, req, settings.GRPC, c.logger, "CreateModelMonitor") return err }, opts...) if err != nil { @@ -573,7 +578,7 @@ func (c *modelMonitoringGRPCClient) UpdateModelMonitor(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.UpdateModelMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.UpdateModelMonitor, req, settings.GRPC, c.logger, "UpdateModelMonitor") return err }, opts...) if err != nil { @@ -593,7 +598,7 @@ func (c *modelMonitoringGRPCClient) GetModelMonitor(ctx context.Context, req *ai var resp *aiplatformpb.ModelMonitor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.GetModelMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.GetModelMonitor, req, settings.GRPC, c.logger, "GetModelMonitor") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *modelMonitoringGRPCClient) ListModelMonitors(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.ListModelMonitors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.ListModelMonitors, req, settings.GRPC, c.logger, "ListModelMonitors") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *modelMonitoringGRPCClient) DeleteModelMonitor(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.DeleteModelMonitor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.DeleteModelMonitor, req, settings.GRPC, c.logger, "DeleteModelMonitor") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *modelMonitoringGRPCClient) CreateModelMonitoringJob(ctx context.Context var resp *aiplatformpb.ModelMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.CreateModelMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.CreateModelMonitoringJob, req, settings.GRPC, c.logger, "CreateModelMonitoringJob") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *modelMonitoringGRPCClient) GetModelMonitoringJob(ctx context.Context, r var resp *aiplatformpb.ModelMonitoringJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.GetModelMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.GetModelMonitoringJob, req, settings.GRPC, c.logger, "GetModelMonitoringJob") return err }, opts...) if err != nil { @@ -724,7 +729,7 @@ func (c *modelMonitoringGRPCClient) ListModelMonitoringJobs(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.ListModelMonitoringJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.ListModelMonitoringJobs, req, settings.GRPC, c.logger, "ListModelMonitoringJobs") return err }, opts...) if err != nil { @@ -759,7 +764,7 @@ func (c *modelMonitoringGRPCClient) DeleteModelMonitoringJob(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.DeleteModelMonitoringJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.DeleteModelMonitoringJob, req, settings.GRPC, c.logger, "DeleteModelMonitoringJob") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *modelMonitoringGRPCClient) SearchModelMonitoringStats(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.SearchModelMonitoringStats(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.SearchModelMonitoringStats, req, settings.GRPC, c.logger, "SearchModelMonitoringStats") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *modelMonitoringGRPCClient) SearchModelMonitoringAlerts(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelMonitoringClient.SearchModelMonitoringAlerts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelMonitoringClient.SearchModelMonitoringAlerts, req, settings.GRPC, c.logger, "SearchModelMonitoringAlerts") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *modelMonitoringGRPCClient) GetLocation(ctx context.Context, req *locati var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *modelMonitoringGRPCClient) ListLocations(ctx context.Context, req *loca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *modelMonitoringGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -953,7 +958,7 @@ func (c *modelMonitoringGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *modelMonitoringGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -988,7 +993,7 @@ func (c *modelMonitoringGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1002,7 +1007,7 @@ func (c *modelMonitoringGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1017,7 +1022,7 @@ func (c *modelMonitoringGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1046,7 +1051,7 @@ func (c *modelMonitoringGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1081,7 +1086,7 @@ func (c *modelMonitoringGRPCClient) WaitOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1132,21 +1137,10 @@ func (c *modelMonitoringRESTClient) CreateModelMonitor(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModelMonitor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1210,21 +1204,10 @@ func (c *modelMonitoringRESTClient) UpdateModelMonitor(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModelMonitor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1275,17 +1258,7 @@ func (c *modelMonitoringRESTClient) GetModelMonitor(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelMonitor") if err != nil { return err } @@ -1357,21 +1330,10 @@ func (c *modelMonitoringRESTClient) ListModelMonitors(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelMonitors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1436,21 +1398,10 @@ func (c *modelMonitoringRESTClient) DeleteModelMonitor(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModelMonitor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1511,17 +1462,7 @@ func (c *modelMonitoringRESTClient) CreateModelMonitoringJob(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModelMonitoringJob") if err != nil { return err } @@ -1571,17 +1512,7 @@ func (c *modelMonitoringRESTClient) GetModelMonitoringJob(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelMonitoringJob") if err != nil { return err } @@ -1658,21 +1589,10 @@ func (c *modelMonitoringRESTClient) ListModelMonitoringJobs(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelMonitoringJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1734,21 +1654,10 @@ func (c *modelMonitoringRESTClient) DeleteModelMonitoringJob(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModelMonitoringJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1811,21 +1720,10 @@ func (c *modelMonitoringRESTClient) SearchModelMonitoringStats(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchModelMonitoringStats") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1900,21 +1798,10 @@ func (c *modelMonitoringRESTClient) SearchModelMonitoringAlerts(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchModelMonitoringAlerts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1977,17 +1864,7 @@ func (c *modelMonitoringRESTClient) GetLocation(ctx context.Context, req *locati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2052,21 +1929,10 @@ func (c *modelMonitoringRESTClient) ListLocations(ctx context.Context, req *loca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2136,17 +2002,7 @@ func (c *modelMonitoringRESTClient) GetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2206,17 +2062,7 @@ func (c *modelMonitoringRESTClient) SetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2278,17 +2124,7 @@ func (c *modelMonitoringRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2335,15 +2171,8 @@ func (c *modelMonitoringRESTClient) CancelOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2377,15 +2206,8 @@ func (c *modelMonitoringRESTClient) DeleteOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2422,17 +2244,7 @@ func (c *modelMonitoringRESTClient) GetOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2497,21 +2309,10 @@ func (c *modelMonitoringRESTClient) ListOperations(ctx context.Context, req *lon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2581,17 +2382,7 @@ func (c *modelMonitoringRESTClient) WaitOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/model_monitoring_client_example_go123_test.go b/aiplatform/apiv1beta1/model_monitoring_client_example_go123_test.go index fd05c42d9008..d74f5b5d1f33 100644 --- a/aiplatform/apiv1beta1/model_monitoring_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/model_monitoring_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleModelMonitoringClient_ListModelMonitoringJobs_all() { } for resp, err := range c.ListModelMonitoringJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleModelMonitoringClient_ListModelMonitors_all() { } for resp, err := range c.ListModelMonitors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleModelMonitoringClient_SearchModelMonitoringAlerts_all() { } for resp, err := range c.SearchModelMonitoringAlerts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleModelMonitoringClient_SearchModelMonitoringStats_all() { } for resp, err := range c.SearchModelMonitoringStats(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleModelMonitoringClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleModelMonitoringClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/notebook_client.go b/aiplatform/apiv1beta1/notebook_client.go index f1411f007528..aed896318a43 100755 --- a/aiplatform/apiv1beta1/notebook_client.go +++ b/aiplatform/apiv1beta1/notebook_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -456,6 +455,8 @@ type notebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotebookClient creates a new notebook service client based on gRPC. @@ -482,6 +483,7 @@ func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*Noteb connPool: connPool, notebookClient: aiplatformpb.NewNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -547,6 +549,8 @@ type notebookRESTClient struct { // Points back to the CallOptions field of the containing NotebookClient CallOptions **NotebookCallOptions + + logger *slog.Logger } // NewNotebookRESTClient creates a new notebook service rest client. @@ -564,6 +568,7 @@ func NewNotebookRESTClient(ctx context.Context, opts ...option.ClientOption) (*N endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -626,7 +631,7 @@ func (c *notebookGRPCClient) CreateNotebookRuntimeTemplate(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "CreateNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *notebookGRPCClient) GetNotebookRuntimeTemplate(ctx context.Context, req var resp *aiplatformpb.NotebookRuntimeTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "GetNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *notebookGRPCClient) ListNotebookRuntimeTemplates(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookRuntimeTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookRuntimeTemplates, req, settings.GRPC, c.logger, "ListNotebookRuntimeTemplates") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *notebookGRPCClient) DeleteNotebookRuntimeTemplate(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "DeleteNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -730,7 +735,7 @@ func (c *notebookGRPCClient) UpdateNotebookRuntimeTemplate(ctx context.Context, var resp *aiplatformpb.NotebookRuntimeTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateNotebookRuntimeTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateNotebookRuntimeTemplate, req, settings.GRPC, c.logger, "UpdateNotebookRuntimeTemplate") return err }, opts...) if err != nil { @@ -748,7 +753,7 @@ func (c *notebookGRPCClient) AssignNotebookRuntime(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.AssignNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.AssignNotebookRuntime, req, settings.GRPC, c.logger, "AssignNotebookRuntime") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *notebookGRPCClient) GetNotebookRuntime(ctx context.Context, req *aiplat var resp *aiplatformpb.NotebookRuntime err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookRuntime, req, settings.GRPC, c.logger, "GetNotebookRuntime") return err }, opts...) if err != nil { @@ -797,7 +802,7 @@ func (c *notebookGRPCClient) ListNotebookRuntimes(ctx context.Context, req *aipl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookRuntimes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookRuntimes, req, settings.GRPC, c.logger, "ListNotebookRuntimes") return err }, opts...) if err != nil { @@ -832,7 +837,7 @@ func (c *notebookGRPCClient) DeleteNotebookRuntime(ctx context.Context, req *aip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookRuntime, req, settings.GRPC, c.logger, "DeleteNotebookRuntime") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *notebookGRPCClient) UpgradeNotebookRuntime(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeNotebookRuntime, req, settings.GRPC, c.logger, "UpgradeNotebookRuntime") return err }, opts...) if err != nil { @@ -872,7 +877,7 @@ func (c *notebookGRPCClient) StartNotebookRuntime(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StartNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StartNotebookRuntime, req, settings.GRPC, c.logger, "StartNotebookRuntime") return err }, opts...) if err != nil { @@ -892,7 +897,7 @@ func (c *notebookGRPCClient) StopNotebookRuntime(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StopNotebookRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StopNotebookRuntime, req, settings.GRPC, c.logger, "StopNotebookRuntime") return err }, opts...) if err != nil { @@ -912,7 +917,7 @@ func (c *notebookGRPCClient) CreateNotebookExecutionJob(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateNotebookExecutionJob, req, settings.GRPC, c.logger, "CreateNotebookExecutionJob") return err }, opts...) if err != nil { @@ -932,7 +937,7 @@ func (c *notebookGRPCClient) GetNotebookExecutionJob(ctx context.Context, req *a var resp *aiplatformpb.NotebookExecutionJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetNotebookExecutionJob, req, settings.GRPC, c.logger, "GetNotebookExecutionJob") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *notebookGRPCClient) ListNotebookExecutionJobs(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListNotebookExecutionJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListNotebookExecutionJobs, req, settings.GRPC, c.logger, "ListNotebookExecutionJobs") return err }, opts...) if err != nil { @@ -996,7 +1001,7 @@ func (c *notebookGRPCClient) DeleteNotebookExecutionJob(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteNotebookExecutionJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteNotebookExecutionJob, req, settings.GRPC, c.logger, "DeleteNotebookExecutionJob") return err }, opts...) if err != nil { @@ -1016,7 +1021,7 @@ func (c *notebookGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *notebookGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1080,7 +1085,7 @@ func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1098,7 +1103,7 @@ func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1116,7 +1121,7 @@ func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1133,7 +1138,7 @@ func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1147,7 +1152,7 @@ func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1162,7 +1167,7 @@ func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1191,7 +1196,7 @@ func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1226,7 +1231,7 @@ func (c *notebookGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1277,21 +1282,10 @@ func (c *notebookRESTClient) CreateNotebookRuntimeTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotebookRuntimeTemplate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1342,17 +1336,7 @@ func (c *notebookRESTClient) GetNotebookRuntimeTemplate(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotebookRuntimeTemplate") if err != nil { return err } @@ -1427,21 +1411,10 @@ func (c *notebookRESTClient) ListNotebookRuntimeTemplates(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotebookRuntimeTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1503,21 +1476,10 @@ func (c *notebookRESTClient) DeleteNotebookRuntimeTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotebookRuntimeTemplate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1582,17 +1544,7 @@ func (c *notebookRESTClient) UpdateNotebookRuntimeTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNotebookRuntimeTemplate") if err != nil { return err } @@ -1648,21 +1600,10 @@ func (c *notebookRESTClient) AssignNotebookRuntime(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AssignNotebookRuntime") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1713,17 +1654,7 @@ func (c *notebookRESTClient) GetNotebookRuntime(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotebookRuntime") if err != nil { return err } @@ -1798,21 +1729,10 @@ func (c *notebookRESTClient) ListNotebookRuntimes(ctx context.Context, req *aipl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotebookRuntimes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1874,21 +1794,10 @@ func (c *notebookRESTClient) DeleteNotebookRuntime(ctx context.Context, req *aip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotebookRuntime") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1944,21 +1853,10 @@ func (c *notebookRESTClient) UpgradeNotebookRuntime(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeNotebookRuntime") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2014,21 +1912,10 @@ func (c *notebookRESTClient) StartNotebookRuntime(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartNotebookRuntime") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2084,21 +1971,10 @@ func (c *notebookRESTClient) StopNotebookRuntime(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopNotebookRuntime") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2158,21 +2034,10 @@ func (c *notebookRESTClient) CreateNotebookExecutionJob(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotebookExecutionJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2226,17 +2091,7 @@ func (c *notebookRESTClient) GetNotebookExecutionJob(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotebookExecutionJob") if err != nil { return err } @@ -2307,21 +2162,10 @@ func (c *notebookRESTClient) ListNotebookExecutionJobs(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotebookExecutionJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2383,21 +2227,10 @@ func (c *notebookRESTClient) DeleteNotebookExecutionJob(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotebookExecutionJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2448,17 +2281,7 @@ func (c *notebookRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2523,21 +2346,10 @@ func (c *notebookRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2607,17 +2419,7 @@ func (c *notebookRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2677,17 +2479,7 @@ func (c *notebookRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2749,17 +2541,7 @@ func (c *notebookRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2806,15 +2588,8 @@ func (c *notebookRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2848,15 +2623,8 @@ func (c *notebookRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2893,17 +2661,7 @@ func (c *notebookRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2968,21 +2726,10 @@ func (c *notebookRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3052,17 +2799,7 @@ func (c *notebookRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/notebook_client_example_go123_test.go b/aiplatform/apiv1beta1/notebook_client_example_go123_test.go index 6477f391ad01..267d6a4b1359 100644 --- a/aiplatform/apiv1beta1/notebook_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleNotebookClient_ListNotebookExecutionJobs_all() { } for resp, err := range c.ListNotebookExecutionJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleNotebookClient_ListNotebookRuntimeTemplates_all() { } for resp, err := range c.ListNotebookRuntimeTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleNotebookClient_ListNotebookRuntimes_all() { } for resp, err := range c.ListNotebookRuntimes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/persistent_resource_client.go b/aiplatform/apiv1beta1/persistent_resource_client.go index bcb99407df86..7db74cb51696 100755 --- a/aiplatform/apiv1beta1/persistent_resource_client.go +++ b/aiplatform/apiv1beta1/persistent_resource_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -330,6 +329,8 @@ type persistentResourceGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPersistentResourceClient creates a new persistent resource service client based on gRPC. @@ -356,6 +357,7 @@ func NewPersistentResourceClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, persistentResourceClient: aiplatformpb.NewPersistentResourceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -421,6 +423,8 @@ type persistentResourceRESTClient struct { // Points back to the CallOptions field of the containing PersistentResourceClient CallOptions **PersistentResourceCallOptions + + logger *slog.Logger } // NewPersistentResourceRESTClient creates a new persistent resource service rest client. @@ -438,6 +442,7 @@ func NewPersistentResourceRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -500,7 +505,7 @@ func (c *persistentResourceGRPCClient) CreatePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.CreatePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.CreatePersistentResource, req, settings.GRPC, c.logger, "CreatePersistentResource") return err }, opts...) if err != nil { @@ -520,7 +525,7 @@ func (c *persistentResourceGRPCClient) GetPersistentResource(ctx context.Context var resp *aiplatformpb.PersistentResource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.GetPersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.GetPersistentResource, req, settings.GRPC, c.logger, "GetPersistentResource") return err }, opts...) if err != nil { @@ -549,7 +554,7 @@ func (c *persistentResourceGRPCClient) ListPersistentResources(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.ListPersistentResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.ListPersistentResources, req, settings.GRPC, c.logger, "ListPersistentResources") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *persistentResourceGRPCClient) DeletePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.DeletePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.DeletePersistentResource, req, settings.GRPC, c.logger, "DeletePersistentResource") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *persistentResourceGRPCClient) UpdatePersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.UpdatePersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.UpdatePersistentResource, req, settings.GRPC, c.logger, "UpdatePersistentResource") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *persistentResourceGRPCClient) RebootPersistentResource(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.persistentResourceClient.RebootPersistentResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.persistentResourceClient.RebootPersistentResource, req, settings.GRPC, c.logger, "RebootPersistentResource") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *persistentResourceGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *persistentResourceGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *persistentResourceGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -726,7 +731,7 @@ func (c *persistentResourceGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -744,7 +749,7 @@ func (c *persistentResourceGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *persistentResourceGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -775,7 +780,7 @@ func (c *persistentResourceGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -790,7 +795,7 @@ func (c *persistentResourceGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *persistentResourceGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *persistentResourceGRPCClient) WaitOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -903,21 +908,10 @@ func (c *persistentResourceRESTClient) CreatePersistentResource(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePersistentResource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -968,17 +962,7 @@ func (c *persistentResourceRESTClient) GetPersistentResource(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPersistentResource") if err != nil { return err } @@ -1040,21 +1024,10 @@ func (c *persistentResourceRESTClient) ListPersistentResources(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPersistentResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1116,21 +1089,10 @@ func (c *persistentResourceRESTClient) DeletePersistentResource(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePersistentResource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1194,21 +1156,10 @@ func (c *persistentResourceRESTClient) UpdatePersistentResource(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePersistentResource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1264,21 +1215,10 @@ func (c *persistentResourceRESTClient) RebootPersistentResource(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RebootPersistentResource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1329,17 +1269,7 @@ func (c *persistentResourceRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1404,21 +1334,10 @@ func (c *persistentResourceRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1488,17 +1407,7 @@ func (c *persistentResourceRESTClient) GetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1558,17 +1467,7 @@ func (c *persistentResourceRESTClient) SetIamPolicy(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1630,17 +1529,7 @@ func (c *persistentResourceRESTClient) TestIamPermissions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1687,15 +1576,8 @@ func (c *persistentResourceRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1729,15 +1611,8 @@ func (c *persistentResourceRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1774,17 +1649,7 @@ func (c *persistentResourceRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1849,21 +1714,10 @@ func (c *persistentResourceRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1933,17 +1787,7 @@ func (c *persistentResourceRESTClient) WaitOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/persistent_resource_client_example_go123_test.go b/aiplatform/apiv1beta1/persistent_resource_client_example_go123_test.go index 39a357de1fef..51194fe482a2 100644 --- a/aiplatform/apiv1beta1/persistent_resource_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/persistent_resource_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePersistentResourceClient_ListPersistentResources_all() { } for resp, err := range c.ListPersistentResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePersistentResourceClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePersistentResourceClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/pipeline_client.go b/aiplatform/apiv1beta1/pipeline_client.go index ccbc9d3d8ef3..2626d39c747f 100755 --- a/aiplatform/apiv1beta1/pipeline_client.go +++ b/aiplatform/apiv1beta1/pipeline_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -441,6 +440,8 @@ type pipelineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPipelineClient creates a new pipeline service client based on gRPC. @@ -469,6 +470,7 @@ func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*Pipel connPool: connPool, pipelineClient: aiplatformpb.NewPipelineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -534,6 +536,8 @@ type pipelineRESTClient struct { // Points back to the CallOptions field of the containing PipelineClient CallOptions **PipelineCallOptions + + logger *slog.Logger } // NewPipelineRESTClient creates a new pipeline service rest client. @@ -553,6 +557,7 @@ func NewPipelineRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -615,7 +620,7 @@ func (c *pipelineGRPCClient) CreateTrainingPipeline(ctx context.Context, req *ai var resp *aiplatformpb.TrainingPipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.CreateTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.CreateTrainingPipeline, req, settings.GRPC, c.logger, "CreateTrainingPipeline") return err }, opts...) if err != nil { @@ -633,7 +638,7 @@ func (c *pipelineGRPCClient) GetTrainingPipeline(ctx context.Context, req *aipla var resp *aiplatformpb.TrainingPipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.GetTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.GetTrainingPipeline, req, settings.GRPC, c.logger, "GetTrainingPipeline") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *pipelineGRPCClient) ListTrainingPipelines(ctx context.Context, req *aip } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.ListTrainingPipelines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.ListTrainingPipelines, req, settings.GRPC, c.logger, "ListTrainingPipelines") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *pipelineGRPCClient) DeleteTrainingPipeline(ctx context.Context, req *ai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.DeleteTrainingPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.DeleteTrainingPipeline, req, settings.GRPC, c.logger, "DeleteTrainingPipeline") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *pipelineGRPCClient) CancelTrainingPipeline(ctx context.Context, req *ai opts = append((*c.CallOptions).CancelTrainingPipeline[0:len((*c.CallOptions).CancelTrainingPipeline):len((*c.CallOptions).CancelTrainingPipeline)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pipelineClient.CancelTrainingPipeline(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pipelineClient.CancelTrainingPipeline, req, settings.GRPC, c.logger, "CancelTrainingPipeline") return err }, opts...) return err @@ -731,7 +736,7 @@ func (c *pipelineGRPCClient) CreatePipelineJob(ctx context.Context, req *aiplatf var resp *aiplatformpb.PipelineJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.CreatePipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.CreatePipelineJob, req, settings.GRPC, c.logger, "CreatePipelineJob") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *pipelineGRPCClient) GetPipelineJob(ctx context.Context, req *aiplatform var resp *aiplatformpb.PipelineJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.GetPipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.GetPipelineJob, req, settings.GRPC, c.logger, "GetPipelineJob") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *pipelineGRPCClient) ListPipelineJobs(ctx context.Context, req *aiplatfo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.ListPipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.ListPipelineJobs, req, settings.GRPC, c.logger, "ListPipelineJobs") return err }, opts...) if err != nil { @@ -813,7 +818,7 @@ func (c *pipelineGRPCClient) DeletePipelineJob(ctx context.Context, req *aiplatf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.DeletePipelineJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.DeletePipelineJob, req, settings.GRPC, c.logger, "DeletePipelineJob") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *pipelineGRPCClient) BatchDeletePipelineJobs(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.BatchDeletePipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.BatchDeletePipelineJobs, req, settings.GRPC, c.logger, "BatchDeletePipelineJobs") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *pipelineGRPCClient) CancelPipelineJob(ctx context.Context, req *aiplatf opts = append((*c.CallOptions).CancelPipelineJob[0:len((*c.CallOptions).CancelPipelineJob):len((*c.CallOptions).CancelPipelineJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pipelineClient.CancelPipelineJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pipelineClient.CancelPipelineJob, req, settings.GRPC, c.logger, "CancelPipelineJob") return err }, opts...) return err @@ -867,7 +872,7 @@ func (c *pipelineGRPCClient) BatchCancelPipelineJobs(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pipelineClient.BatchCancelPipelineJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pipelineClient.BatchCancelPipelineJobs, req, settings.GRPC, c.logger, "BatchCancelPipelineJobs") return err }, opts...) if err != nil { @@ -887,7 +892,7 @@ func (c *pipelineGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -916,7 +921,7 @@ func (c *pipelineGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *pipelineGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *pipelineGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -987,7 +992,7 @@ func (c *pipelineGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1004,7 +1009,7 @@ func (c *pipelineGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1018,7 +1023,7 @@ func (c *pipelineGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1033,7 +1038,7 @@ func (c *pipelineGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1062,7 +1067,7 @@ func (c *pipelineGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1097,7 +1102,7 @@ func (c *pipelineGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1147,17 +1152,7 @@ func (c *pipelineRESTClient) CreateTrainingPipeline(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTrainingPipeline") if err != nil { return err } @@ -1207,17 +1202,7 @@ func (c *pipelineRESTClient) GetTrainingPipeline(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTrainingPipeline") if err != nil { return err } @@ -1289,21 +1274,10 @@ func (c *pipelineRESTClient) ListTrainingPipelines(ctx context.Context, req *aip } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTrainingPipelines") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1365,21 +1339,10 @@ func (c *pipelineRESTClient) DeleteTrainingPipeline(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTrainingPipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1446,15 +1409,8 @@ func (c *pipelineRESTClient) CancelTrainingPipeline(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelTrainingPipeline") + return err }, opts...) } @@ -1501,17 +1457,7 @@ func (c *pipelineRESTClient) CreatePipelineJob(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePipelineJob") if err != nil { return err } @@ -1561,17 +1507,7 @@ func (c *pipelineRESTClient) GetPipelineJob(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPipelineJob") if err != nil { return err } @@ -1646,21 +1582,10 @@ func (c *pipelineRESTClient) ListPipelineJobs(ctx context.Context, req *aiplatfo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPipelineJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1722,21 +1647,10 @@ func (c *pipelineRESTClient) DeletePipelineJob(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePipelineJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1794,21 +1708,10 @@ func (c *pipelineRESTClient) BatchDeletePipelineJobs(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeletePipelineJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1874,15 +1777,8 @@ func (c *pipelineRESTClient) CancelPipelineJob(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelPipelineJob") + return err }, opts...) } @@ -1930,21 +1826,10 @@ func (c *pipelineRESTClient) BatchCancelPipelineJobs(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCancelPipelineJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1995,17 +1880,7 @@ func (c *pipelineRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2070,21 +1945,10 @@ func (c *pipelineRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2154,17 +2018,7 @@ func (c *pipelineRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2224,17 +2078,7 @@ func (c *pipelineRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2296,17 +2140,7 @@ func (c *pipelineRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2353,15 +2187,8 @@ func (c *pipelineRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2395,15 +2222,8 @@ func (c *pipelineRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2440,17 +2260,7 @@ func (c *pipelineRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2515,21 +2325,10 @@ func (c *pipelineRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2599,17 +2398,7 @@ func (c *pipelineRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/pipeline_client_example_go123_test.go b/aiplatform/apiv1beta1/pipeline_client_example_go123_test.go index 3fca08efb02b..c292db95de35 100644 --- a/aiplatform/apiv1beta1/pipeline_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/pipeline_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePipelineClient_ListPipelineJobs_all() { } for resp, err := range c.ListPipelineJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePipelineClient_ListTrainingPipelines_all() { } for resp, err := range c.ListTrainingPipelines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePipelineClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExamplePipelineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/prediction_client.go b/aiplatform/apiv1beta1/prediction_client.go index a5a67d210876..e63c1f4a0091 100755 --- a/aiplatform/apiv1beta1/prediction_client.go +++ b/aiplatform/apiv1beta1/prediction_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -417,6 +416,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -443,6 +444,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: aiplatformpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -492,6 +494,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -509,6 +513,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -561,7 +566,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *aiplatformpb.Pr var resp *aiplatformpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *predictionGRPCClient) RawPredict(ctx context.Context, req *aiplatformpb var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.RawPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.RawPredict, req, settings.GRPC, c.logger, "RawPredict") return err }, opts...) if err != nil { @@ -597,7 +602,9 @@ func (c *predictionGRPCClient) StreamRawPredict(ctx context.Context, req *aiplat var resp aiplatformpb.PredictionService_StreamRawPredictClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamRawPredict") resp, err = c.predictionClient.StreamRawPredict(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamRawPredict") return err }, opts...) if err != nil { @@ -615,7 +622,7 @@ func (c *predictionGRPCClient) DirectPredict(ctx context.Context, req *aiplatfor var resp *aiplatformpb.DirectPredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.DirectPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.DirectPredict, req, settings.GRPC, c.logger, "DirectPredict") return err }, opts...) if err != nil { @@ -633,7 +640,7 @@ func (c *predictionGRPCClient) DirectRawPredict(ctx context.Context, req *aiplat var resp *aiplatformpb.DirectRawPredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.DirectRawPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.DirectRawPredict, req, settings.GRPC, c.logger, "DirectRawPredict") return err }, opts...) if err != nil { @@ -648,7 +655,9 @@ func (c *predictionGRPCClient) StreamDirectPredict(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamDirectPredict[0:len((*c.CallOptions).StreamDirectPredict):len((*c.CallOptions).StreamDirectPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamDirectPredict") resp, err = c.predictionClient.StreamDirectPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamDirectPredict") return err }, opts...) if err != nil { @@ -663,7 +672,9 @@ func (c *predictionGRPCClient) StreamDirectRawPredict(ctx context.Context, opts opts = append((*c.CallOptions).StreamDirectRawPredict[0:len((*c.CallOptions).StreamDirectRawPredict):len((*c.CallOptions).StreamDirectRawPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamDirectRawPredict") resp, err = c.predictionClient.StreamDirectRawPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamDirectRawPredict") return err }, opts...) if err != nil { @@ -678,7 +689,9 @@ func (c *predictionGRPCClient) StreamingPredict(ctx context.Context, opts ...gax opts = append((*c.CallOptions).StreamingPredict[0:len((*c.CallOptions).StreamingPredict):len((*c.CallOptions).StreamingPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingPredict") resp, err = c.predictionClient.StreamingPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingPredict") return err }, opts...) if err != nil { @@ -696,7 +709,9 @@ func (c *predictionGRPCClient) ServerStreamingPredict(ctx context.Context, req * var resp aiplatformpb.PredictionService_ServerStreamingPredictClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ServerStreamingPredict") resp, err = c.predictionClient.ServerStreamingPredict(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ServerStreamingPredict") return err }, opts...) if err != nil { @@ -711,7 +726,9 @@ func (c *predictionGRPCClient) StreamingRawPredict(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingRawPredict[0:len((*c.CallOptions).StreamingRawPredict):len((*c.CallOptions).StreamingRawPredict)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRawPredict") resp, err = c.predictionClient.StreamingRawPredict(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRawPredict") return err }, opts...) if err != nil { @@ -729,7 +746,7 @@ func (c *predictionGRPCClient) Explain(ctx context.Context, req *aiplatformpb.Ex var resp *aiplatformpb.ExplainResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Explain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Explain, req, settings.GRPC, c.logger, "Explain") return err }, opts...) if err != nil { @@ -747,7 +764,7 @@ func (c *predictionGRPCClient) CountTokens(ctx context.Context, req *aiplatformp var resp *aiplatformpb.CountTokensResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.CountTokens(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.CountTokens, req, settings.GRPC, c.logger, "CountTokens") return err }, opts...) if err != nil { @@ -765,7 +782,7 @@ func (c *predictionGRPCClient) GenerateContent(ctx context.Context, req *aiplatf var resp *aiplatformpb.GenerateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.GenerateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.GenerateContent, req, settings.GRPC, c.logger, "GenerateContent") return err }, opts...) if err != nil { @@ -783,7 +800,9 @@ func (c *predictionGRPCClient) StreamGenerateContent(ctx context.Context, req *a var resp aiplatformpb.PredictionService_StreamGenerateContentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateContent") resp, err = c.predictionClient.StreamGenerateContent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateContent") return err }, opts...) if err != nil { @@ -801,7 +820,9 @@ func (c *predictionGRPCClient) ChatCompletions(ctx context.Context, req *aiplatf var resp aiplatformpb.PredictionService_ChatCompletionsClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ChatCompletions") resp, err = c.predictionClient.ChatCompletions(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ChatCompletions") return err }, opts...) if err != nil { @@ -819,7 +840,7 @@ func (c *predictionGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -848,7 +869,7 @@ func (c *predictionGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -883,7 +904,7 @@ func (c *predictionGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -901,7 +922,7 @@ func (c *predictionGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -919,7 +940,7 @@ func (c *predictionGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -936,7 +957,7 @@ func (c *predictionGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -950,7 +971,7 @@ func (c *predictionGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -965,7 +986,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -994,7 +1015,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1029,7 +1050,7 @@ func (c *predictionGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1077,17 +1098,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *aiplatformpb.Pr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -1152,17 +1163,7 @@ func (c *predictionRESTClient) RawPredict(ctx context.Context, req *aiplatformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RawPredict") if err != nil { return err } @@ -1217,15 +1218,11 @@ func (c *predictionRESTClient) StreamRawPredict(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamRawPredict") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamRawPredictRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -1326,17 +1323,7 @@ func (c *predictionRESTClient) DirectPredict(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DirectPredict") if err != nil { return err } @@ -1393,17 +1380,7 @@ func (c *predictionRESTClient) DirectRawPredict(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DirectRawPredict") if err != nil { return err } @@ -1482,15 +1459,11 @@ func (c *predictionRESTClient) ServerStreamingPredict(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ServerStreamingPredict") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &serverStreamingPredictRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -1607,17 +1580,7 @@ func (c *predictionRESTClient) Explain(ctx context.Context, req *aiplatformpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Explain") if err != nil { return err } @@ -1673,17 +1636,7 @@ func (c *predictionRESTClient) CountTokens(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CountTokens") if err != nil { return err } @@ -1739,17 +1692,7 @@ func (c *predictionRESTClient) GenerateContent(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateContent") if err != nil { return err } @@ -1803,15 +1746,11 @@ func (c *predictionRESTClient) StreamGenerateContent(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamGenerateContent") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamGenerateContentRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -1910,15 +1849,11 @@ func (c *predictionRESTClient) ChatCompletions(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ChatCompletions") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &chatCompletionsRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -2012,17 +1947,7 @@ func (c *predictionRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2087,21 +2012,10 @@ func (c *predictionRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2171,17 +2085,7 @@ func (c *predictionRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2241,17 +2145,7 @@ func (c *predictionRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2313,17 +2207,7 @@ func (c *predictionRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2370,15 +2254,8 @@ func (c *predictionRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2412,15 +2289,8 @@ func (c *predictionRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2457,17 +2327,7 @@ func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2532,21 +2392,10 @@ func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2616,17 +2465,7 @@ func (c *predictionRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/prediction_client_example_go123_test.go b/aiplatform/apiv1beta1/prediction_client_example_go123_test.go index 511ccf783332..effc0d389302 100644 --- a/aiplatform/apiv1beta1/prediction_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/prediction_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExamplePredictionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/reasoning_engine_client.go b/aiplatform/apiv1beta1/reasoning_engine_client.go index f941bbba60fc..6590d189902f 100755 --- a/aiplatform/apiv1beta1/reasoning_engine_client.go +++ b/aiplatform/apiv1beta1/reasoning_engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -314,6 +313,8 @@ type reasoningEngineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewReasoningEngineClient creates a new reasoning engine service client based on gRPC. @@ -340,6 +341,7 @@ func NewReasoningEngineClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, reasoningEngineClient: aiplatformpb.NewReasoningEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -405,6 +407,8 @@ type reasoningEngineRESTClient struct { // Points back to the CallOptions field of the containing ReasoningEngineClient CallOptions **ReasoningEngineCallOptions + + logger *slog.Logger } // NewReasoningEngineRESTClient creates a new reasoning engine service rest client. @@ -422,6 +426,7 @@ func NewReasoningEngineRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,7 +489,7 @@ func (c *reasoningEngineGRPCClient) CreateReasoningEngine(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineClient.CreateReasoningEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineClient.CreateReasoningEngine, req, settings.GRPC, c.logger, "CreateReasoningEngine") return err }, opts...) if err != nil { @@ -504,7 +509,7 @@ func (c *reasoningEngineGRPCClient) GetReasoningEngine(ctx context.Context, req var resp *aiplatformpb.ReasoningEngine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineClient.GetReasoningEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineClient.GetReasoningEngine, req, settings.GRPC, c.logger, "GetReasoningEngine") return err }, opts...) if err != nil { @@ -533,7 +538,7 @@ func (c *reasoningEngineGRPCClient) ListReasoningEngines(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineClient.ListReasoningEngines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineClient.ListReasoningEngines, req, settings.GRPC, c.logger, "ListReasoningEngines") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *reasoningEngineGRPCClient) UpdateReasoningEngine(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineClient.UpdateReasoningEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineClient.UpdateReasoningEngine, req, settings.GRPC, c.logger, "UpdateReasoningEngine") return err }, opts...) if err != nil { @@ -588,7 +593,7 @@ func (c *reasoningEngineGRPCClient) DeleteReasoningEngine(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineClient.DeleteReasoningEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineClient.DeleteReasoningEngine, req, settings.GRPC, c.logger, "DeleteReasoningEngine") return err }, opts...) if err != nil { @@ -608,7 +613,7 @@ func (c *reasoningEngineGRPCClient) GetLocation(ctx context.Context, req *locati var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -637,7 +642,7 @@ func (c *reasoningEngineGRPCClient) ListLocations(ctx context.Context, req *loca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *reasoningEngineGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *reasoningEngineGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *reasoningEngineGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *reasoningEngineGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -739,7 +744,7 @@ func (c *reasoningEngineGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -754,7 +759,7 @@ func (c *reasoningEngineGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -783,7 +788,7 @@ func (c *reasoningEngineGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *reasoningEngineGRPCClient) WaitOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -866,21 +871,10 @@ func (c *reasoningEngineRESTClient) CreateReasoningEngine(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReasoningEngine") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -931,17 +925,7 @@ func (c *reasoningEngineRESTClient) GetReasoningEngine(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReasoningEngine") if err != nil { return err } @@ -1006,21 +990,10 @@ func (c *reasoningEngineRESTClient) ListReasoningEngines(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReasoningEngines") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1096,21 +1069,10 @@ func (c *reasoningEngineRESTClient) UpdateReasoningEngine(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateReasoningEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,21 +1122,10 @@ func (c *reasoningEngineRESTClient) DeleteReasoningEngine(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReasoningEngine") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1225,17 +1176,7 @@ func (c *reasoningEngineRESTClient) GetLocation(ctx context.Context, req *locati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1300,21 +1241,10 @@ func (c *reasoningEngineRESTClient) ListLocations(ctx context.Context, req *loca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1384,17 +1314,7 @@ func (c *reasoningEngineRESTClient) GetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1454,17 +1374,7 @@ func (c *reasoningEngineRESTClient) SetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1526,17 +1436,7 @@ func (c *reasoningEngineRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1583,15 +1483,8 @@ func (c *reasoningEngineRESTClient) CancelOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1625,15 +1518,8 @@ func (c *reasoningEngineRESTClient) DeleteOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1670,17 +1556,7 @@ func (c *reasoningEngineRESTClient) GetOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1745,21 +1621,10 @@ func (c *reasoningEngineRESTClient) ListOperations(ctx context.Context, req *lon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1829,17 +1694,7 @@ func (c *reasoningEngineRESTClient) WaitOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/reasoning_engine_client_example_go123_test.go b/aiplatform/apiv1beta1/reasoning_engine_client_example_go123_test.go index db13dbe81475..07c0a4a159e6 100644 --- a/aiplatform/apiv1beta1/reasoning_engine_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/reasoning_engine_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleReasoningEngineClient_ListReasoningEngines_all() { } for resp, err := range c.ListReasoningEngines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleReasoningEngineClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleReasoningEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/reasoning_engine_execution_client.go b/aiplatform/apiv1beta1/reasoning_engine_execution_client.go index 04473248ab7b..d4ea7ba5185d 100755 --- a/aiplatform/apiv1beta1/reasoning_engine_execution_client.go +++ b/aiplatform/apiv1beta1/reasoning_engine_execution_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -257,6 +256,8 @@ type reasoningEngineExecutionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewReasoningEngineExecutionClient creates a new reasoning engine execution service client based on gRPC. @@ -283,6 +284,7 @@ func NewReasoningEngineExecutionClient(ctx context.Context, opts ...option.Clien connPool: connPool, reasoningEngineExecutionClient: aiplatformpb.NewReasoningEngineExecutionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -332,6 +334,8 @@ type reasoningEngineExecutionRESTClient struct { // Points back to the CallOptions field of the containing ReasoningEngineExecutionClient CallOptions **ReasoningEngineExecutionCallOptions + + logger *slog.Logger } // NewReasoningEngineExecutionRESTClient creates a new reasoning engine execution service rest client. @@ -349,6 +353,7 @@ func NewReasoningEngineExecutionRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -401,7 +406,7 @@ func (c *reasoningEngineExecutionGRPCClient) QueryReasoningEngine(ctx context.Co var resp *aiplatformpb.QueryReasoningEngineResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reasoningEngineExecutionClient.QueryReasoningEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reasoningEngineExecutionClient.QueryReasoningEngine, req, settings.GRPC, c.logger, "QueryReasoningEngine") return err }, opts...) if err != nil { @@ -419,7 +424,9 @@ func (c *reasoningEngineExecutionGRPCClient) StreamQueryReasoningEngine(ctx cont var resp aiplatformpb.ReasoningEngineExecutionService_StreamQueryReasoningEngineClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamQueryReasoningEngine") resp, err = c.reasoningEngineExecutionClient.StreamQueryReasoningEngine(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamQueryReasoningEngine") return err }, opts...) if err != nil { @@ -437,7 +444,7 @@ func (c *reasoningEngineExecutionGRPCClient) GetLocation(ctx context.Context, re var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -466,7 +473,7 @@ func (c *reasoningEngineExecutionGRPCClient) ListLocations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -501,7 +508,7 @@ func (c *reasoningEngineExecutionGRPCClient) GetIamPolicy(ctx context.Context, r var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -519,7 +526,7 @@ func (c *reasoningEngineExecutionGRPCClient) SetIamPolicy(ctx context.Context, r var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -537,7 +544,7 @@ func (c *reasoningEngineExecutionGRPCClient) TestIamPermissions(ctx context.Cont var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -554,7 +561,7 @@ func (c *reasoningEngineExecutionGRPCClient) CancelOperation(ctx context.Context opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -568,7 +575,7 @@ func (c *reasoningEngineExecutionGRPCClient) DeleteOperation(ctx context.Context opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -583,7 +590,7 @@ func (c *reasoningEngineExecutionGRPCClient) GetOperation(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -612,7 +619,7 @@ func (c *reasoningEngineExecutionGRPCClient) ListOperations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -647,7 +654,7 @@ func (c *reasoningEngineExecutionGRPCClient) WaitOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -695,17 +702,7 @@ func (c *reasoningEngineExecutionRESTClient) QueryReasoningEngine(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryReasoningEngine") if err != nil { return err } @@ -759,15 +756,11 @@ func (c *reasoningEngineExecutionRESTClient) StreamQueryReasoningEngine(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamQueryReasoningEngine") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamQueryReasoningEngineRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -861,17 +854,7 @@ func (c *reasoningEngineExecutionRESTClient) GetLocation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -936,21 +919,10 @@ func (c *reasoningEngineExecutionRESTClient) ListLocations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1020,17 +992,7 @@ func (c *reasoningEngineExecutionRESTClient) GetIamPolicy(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1090,17 +1052,7 @@ func (c *reasoningEngineExecutionRESTClient) SetIamPolicy(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1162,17 +1114,7 @@ func (c *reasoningEngineExecutionRESTClient) TestIamPermissions(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1219,15 +1161,8 @@ func (c *reasoningEngineExecutionRESTClient) CancelOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1261,15 +1196,8 @@ func (c *reasoningEngineExecutionRESTClient) DeleteOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1306,17 +1234,7 @@ func (c *reasoningEngineExecutionRESTClient) GetOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1381,21 +1299,10 @@ func (c *reasoningEngineExecutionRESTClient) ListOperations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1465,17 +1372,7 @@ func (c *reasoningEngineExecutionRESTClient) WaitOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_go123_test.go b/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_go123_test.go index b2a92d77f5ff..ebd4a110f44f 100644 --- a/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleReasoningEngineExecutionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleReasoningEngineExecutionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/schedule_client.go b/aiplatform/apiv1beta1/schedule_client.go index a92ab04e35d2..3a55159de9e0 100755 --- a/aiplatform/apiv1beta1/schedule_client.go +++ b/aiplatform/apiv1beta1/schedule_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -335,6 +334,8 @@ type scheduleGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewScheduleClient creates a new schedule service client based on gRPC. @@ -362,6 +363,7 @@ func NewScheduleClient(ctx context.Context, opts ...option.ClientOption) (*Sched connPool: connPool, scheduleClient: aiplatformpb.NewScheduleServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -427,6 +429,8 @@ type scheduleRESTClient struct { // Points back to the CallOptions field of the containing ScheduleClient CallOptions **ScheduleCallOptions + + logger *slog.Logger } // NewScheduleRESTClient creates a new schedule service rest client. @@ -445,6 +449,7 @@ func NewScheduleRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -507,7 +512,7 @@ func (c *scheduleGRPCClient) CreateSchedule(ctx context.Context, req *aiplatform var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.CreateSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.CreateSchedule, req, settings.GRPC, c.logger, "CreateSchedule") return err }, opts...) if err != nil { @@ -525,7 +530,7 @@ func (c *scheduleGRPCClient) DeleteSchedule(ctx context.Context, req *aiplatform var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.DeleteSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.DeleteSchedule, req, settings.GRPC, c.logger, "DeleteSchedule") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *scheduleGRPCClient) GetSchedule(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.GetSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.GetSchedule, req, settings.GRPC, c.logger, "GetSchedule") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *scheduleGRPCClient) ListSchedules(ctx context.Context, req *aiplatformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.ListSchedules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.ListSchedules, req, settings.GRPC, c.logger, "ListSchedules") return err }, opts...) if err != nil { @@ -608,7 +613,7 @@ func (c *scheduleGRPCClient) PauseSchedule(ctx context.Context, req *aiplatformp opts = append((*c.CallOptions).PauseSchedule[0:len((*c.CallOptions).PauseSchedule):len((*c.CallOptions).PauseSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.scheduleClient.PauseSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.scheduleClient.PauseSchedule, req, settings.GRPC, c.logger, "PauseSchedule") return err }, opts...) return err @@ -622,7 +627,7 @@ func (c *scheduleGRPCClient) ResumeSchedule(ctx context.Context, req *aiplatform opts = append((*c.CallOptions).ResumeSchedule[0:len((*c.CallOptions).ResumeSchedule):len((*c.CallOptions).ResumeSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.scheduleClient.ResumeSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.scheduleClient.ResumeSchedule, req, settings.GRPC, c.logger, "ResumeSchedule") return err }, opts...) return err @@ -637,7 +642,7 @@ func (c *scheduleGRPCClient) UpdateSchedule(ctx context.Context, req *aiplatform var resp *aiplatformpb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.scheduleClient.UpdateSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.scheduleClient.UpdateSchedule, req, settings.GRPC, c.logger, "UpdateSchedule") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *scheduleGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -684,7 +689,7 @@ func (c *scheduleGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -719,7 +724,7 @@ func (c *scheduleGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -737,7 +742,7 @@ func (c *scheduleGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -755,7 +760,7 @@ func (c *scheduleGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -772,7 +777,7 @@ func (c *scheduleGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -786,7 +791,7 @@ func (c *scheduleGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -801,7 +806,7 @@ func (c *scheduleGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *scheduleGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -865,7 +870,7 @@ func (c *scheduleGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -914,17 +919,7 @@ func (c *scheduleRESTClient) CreateSchedule(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSchedule") if err != nil { return err } @@ -973,21 +968,10 @@ func (c *scheduleRESTClient) DeleteSchedule(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchedule") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1038,17 +1022,7 @@ func (c *scheduleRESTClient) GetSchedule(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSchedule") if err != nil { return err } @@ -1116,21 +1090,10 @@ func (c *scheduleRESTClient) ListSchedules(ctx context.Context, req *aiplatformp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchedules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1199,15 +1162,8 @@ func (c *scheduleRESTClient) PauseSchedule(ctx context.Context, req *aiplatformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseSchedule") + return err }, opts...) } @@ -1254,15 +1210,8 @@ func (c *scheduleRESTClient) ResumeSchedule(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeSchedule") + return err }, opts...) } @@ -1319,17 +1268,7 @@ func (c *scheduleRESTClient) UpdateSchedule(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSchedule") if err != nil { return err } @@ -1379,17 +1318,7 @@ func (c *scheduleRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1454,21 +1383,10 @@ func (c *scheduleRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1538,17 +1456,7 @@ func (c *scheduleRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1608,17 +1516,7 @@ func (c *scheduleRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1680,17 +1578,7 @@ func (c *scheduleRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1737,15 +1625,8 @@ func (c *scheduleRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1779,15 +1660,8 @@ func (c *scheduleRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1824,17 +1698,7 @@ func (c *scheduleRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1899,21 +1763,10 @@ func (c *scheduleRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1983,17 +1836,7 @@ func (c *scheduleRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/schedule_client_example_go123_test.go b/aiplatform/apiv1beta1/schedule_client_example_go123_test.go index 15a50c4ff8c6..61d793dc9a1c 100644 --- a/aiplatform/apiv1beta1/schedule_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/schedule_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleScheduleClient_ListSchedules_all() { } for resp, err := range c.ListSchedules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleScheduleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleScheduleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/specialist_pool_client.go b/aiplatform/apiv1beta1/specialist_pool_client.go index e95c5b88d454..a6562f1f2d1a 100755 --- a/aiplatform/apiv1beta1/specialist_pool_client.go +++ b/aiplatform/apiv1beta1/specialist_pool_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -340,6 +339,8 @@ type specialistPoolGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpecialistPoolClient creates a new specialist pool service client based on gRPC. @@ -371,6 +372,7 @@ func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, specialistPoolClient: aiplatformpb.NewSpecialistPoolServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -436,6 +438,8 @@ type specialistPoolRESTClient struct { // Points back to the CallOptions field of the containing SpecialistPoolClient CallOptions **SpecialistPoolCallOptions + + logger *slog.Logger } // NewSpecialistPoolRESTClient creates a new specialist pool service rest client. @@ -458,6 +462,7 @@ func NewSpecialistPoolRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -520,7 +525,7 @@ func (c *specialistPoolGRPCClient) CreateSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.CreateSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.CreateSpecialistPool, req, settings.GRPC, c.logger, "CreateSpecialistPool") return err }, opts...) if err != nil { @@ -540,7 +545,7 @@ func (c *specialistPoolGRPCClient) GetSpecialistPool(ctx context.Context, req *a var resp *aiplatformpb.SpecialistPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.GetSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.GetSpecialistPool, req, settings.GRPC, c.logger, "GetSpecialistPool") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *specialistPoolGRPCClient) ListSpecialistPools(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.ListSpecialistPools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.ListSpecialistPools, req, settings.GRPC, c.logger, "ListSpecialistPools") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *specialistPoolGRPCClient) DeleteSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.DeleteSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.DeleteSpecialistPool, req, settings.GRPC, c.logger, "DeleteSpecialistPool") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *specialistPoolGRPCClient) UpdateSpecialistPool(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.specialistPoolClient.UpdateSpecialistPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.specialistPoolClient.UpdateSpecialistPool, req, settings.GRPC, c.logger, "UpdateSpecialistPool") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *specialistPoolGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *specialistPoolGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *specialistPoolGRPCClient) GetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -726,7 +731,7 @@ func (c *specialistPoolGRPCClient) SetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -744,7 +749,7 @@ func (c *specialistPoolGRPCClient) TestIamPermissions(ctx context.Context, req * var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *specialistPoolGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -775,7 +780,7 @@ func (c *specialistPoolGRPCClient) DeleteOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -790,7 +795,7 @@ func (c *specialistPoolGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *specialistPoolGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *specialistPoolGRPCClient) WaitOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -902,21 +907,10 @@ func (c *specialistPoolRESTClient) CreateSpecialistPool(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpecialistPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -967,17 +961,7 @@ func (c *specialistPoolRESTClient) GetSpecialistPool(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpecialistPool") if err != nil { return err } @@ -1046,21 +1030,10 @@ func (c *specialistPoolRESTClient) ListSpecialistPools(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSpecialistPools") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1125,21 +1098,10 @@ func (c *specialistPoolRESTClient) DeleteSpecialistPool(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSpecialistPool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1203,21 +1165,10 @@ func (c *specialistPoolRESTClient) UpdateSpecialistPool(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpecialistPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1268,17 +1219,7 @@ func (c *specialistPoolRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1343,21 +1284,10 @@ func (c *specialistPoolRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1427,17 +1357,7 @@ func (c *specialistPoolRESTClient) GetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1497,17 +1417,7 @@ func (c *specialistPoolRESTClient) SetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1569,17 +1479,7 @@ func (c *specialistPoolRESTClient) TestIamPermissions(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1626,15 +1526,8 @@ func (c *specialistPoolRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1668,15 +1561,8 @@ func (c *specialistPoolRESTClient) DeleteOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1713,17 +1599,7 @@ func (c *specialistPoolRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1788,21 +1664,10 @@ func (c *specialistPoolRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1872,17 +1737,7 @@ func (c *specialistPoolRESTClient) WaitOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/specialist_pool_client_example_go123_test.go b/aiplatform/apiv1beta1/specialist_pool_client_example_go123_test.go index 616f028125df..03b0d4a115e0 100644 --- a/aiplatform/apiv1beta1/specialist_pool_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/specialist_pool_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSpecialistPoolClient_ListSpecialistPools_all() { } for resp, err := range c.ListSpecialistPools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSpecialistPoolClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSpecialistPoolClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/tensorboard_client.go b/aiplatform/apiv1beta1/tensorboard_client.go index 0f56502dfef6..f06b54906485 100755 --- a/aiplatform/apiv1beta1/tensorboard_client.go +++ b/aiplatform/apiv1beta1/tensorboard_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -576,6 +575,8 @@ type tensorboardGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTensorboardClient creates a new tensorboard service client based on gRPC. @@ -602,6 +603,7 @@ func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*Te connPool: connPool, tensorboardClient: aiplatformpb.NewTensorboardServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -667,6 +669,8 @@ type tensorboardRESTClient struct { // Points back to the CallOptions field of the containing TensorboardClient CallOptions **TensorboardCallOptions + + logger *slog.Logger } // NewTensorboardRESTClient creates a new tensorboard service rest client. @@ -684,6 +688,7 @@ func NewTensorboardRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -746,7 +751,7 @@ func (c *tensorboardGRPCClient) CreateTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboard, req, settings.GRPC, c.logger, "CreateTensorboard") return err }, opts...) if err != nil { @@ -766,7 +771,7 @@ func (c *tensorboardGRPCClient) GetTensorboard(ctx context.Context, req *aiplatf var resp *aiplatformpb.Tensorboard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboard, req, settings.GRPC, c.logger, "GetTensorboard") return err }, opts...) if err != nil { @@ -784,7 +789,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboard, req, settings.GRPC, c.logger, "UpdateTensorboard") return err }, opts...) if err != nil { @@ -815,7 +820,7 @@ func (c *tensorboardGRPCClient) ListTensorboards(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboards(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboards, req, settings.GRPC, c.logger, "ListTensorboards") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboard(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboard, req, settings.GRPC, c.logger, "DeleteTensorboard") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardUsage(ctx context.Context, req *a var resp *aiplatformpb.ReadTensorboardUsageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardUsage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardUsage, req, settings.GRPC, c.logger, "ReadTensorboardUsage") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardSize(ctx context.Context, req *ai var resp *aiplatformpb.ReadTensorboardSizeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardSize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardSize, req, settings.GRPC, c.logger, "ReadTensorboardSize") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardExperiment(ctx context.Context, var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardExperiment, req, settings.GRPC, c.logger, "CreateTensorboardExperiment") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *tensorboardGRPCClient) GetTensorboardExperiment(ctx context.Context, re var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardExperiment, req, settings.GRPC, c.logger, "GetTensorboardExperiment") return err }, opts...) if err != nil { @@ -942,7 +947,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardExperiment(ctx context.Context, var resp *aiplatformpb.TensorboardExperiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardExperiment, req, settings.GRPC, c.logger, "UpdateTensorboardExperiment") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *tensorboardGRPCClient) ListTensorboardExperiments(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardExperiments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardExperiments, req, settings.GRPC, c.logger, "ListTensorboardExperiments") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardExperiment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardExperiment, req, settings.GRPC, c.logger, "DeleteTensorboardExperiment") return err }, opts...) if err != nil { @@ -1026,7 +1031,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardRun(ctx context.Context, req *a var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardRun, req, settings.GRPC, c.logger, "CreateTensorboardRun") return err }, opts...) if err != nil { @@ -1044,7 +1049,7 @@ func (c *tensorboardGRPCClient) BatchCreateTensorboardRuns(ctx context.Context, var resp *aiplatformpb.BatchCreateTensorboardRunsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchCreateTensorboardRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchCreateTensorboardRuns, req, settings.GRPC, c.logger, "BatchCreateTensorboardRuns") return err }, opts...) if err != nil { @@ -1062,7 +1067,7 @@ func (c *tensorboardGRPCClient) GetTensorboardRun(ctx context.Context, req *aipl var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardRun, req, settings.GRPC, c.logger, "GetTensorboardRun") return err }, opts...) if err != nil { @@ -1080,7 +1085,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardRun(ctx context.Context, req *a var resp *aiplatformpb.TensorboardRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardRun, req, settings.GRPC, c.logger, "UpdateTensorboardRun") return err }, opts...) if err != nil { @@ -1109,7 +1114,7 @@ func (c *tensorboardGRPCClient) ListTensorboardRuns(ctx context.Context, req *ai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardRuns, req, settings.GRPC, c.logger, "ListTensorboardRuns") return err }, opts...) if err != nil { @@ -1144,7 +1149,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardRun(ctx context.Context, req *a var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardRun, req, settings.GRPC, c.logger, "DeleteTensorboardRun") return err }, opts...) if err != nil { @@ -1164,7 +1169,7 @@ func (c *tensorboardGRPCClient) BatchCreateTensorboardTimeSeries(ctx context.Con var resp *aiplatformpb.BatchCreateTensorboardTimeSeriesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchCreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchCreateTensorboardTimeSeries, req, settings.GRPC, c.logger, "BatchCreateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1182,7 +1187,7 @@ func (c *tensorboardGRPCClient) CreateTensorboardTimeSeries(ctx context.Context, var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.CreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.CreateTensorboardTimeSeries, req, settings.GRPC, c.logger, "CreateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1200,7 +1205,7 @@ func (c *tensorboardGRPCClient) GetTensorboardTimeSeries(ctx context.Context, re var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.GetTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.GetTensorboardTimeSeries, req, settings.GRPC, c.logger, "GetTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1218,7 +1223,7 @@ func (c *tensorboardGRPCClient) UpdateTensorboardTimeSeries(ctx context.Context, var resp *aiplatformpb.TensorboardTimeSeries err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.UpdateTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.UpdateTensorboardTimeSeries, req, settings.GRPC, c.logger, "UpdateTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1247,7 +1252,7 @@ func (c *tensorboardGRPCClient) ListTensorboardTimeSeries(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ListTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ListTensorboardTimeSeries, req, settings.GRPC, c.logger, "ListTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1282,7 +1287,7 @@ func (c *tensorboardGRPCClient) DeleteTensorboardTimeSeries(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.DeleteTensorboardTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.DeleteTensorboardTimeSeries, req, settings.GRPC, c.logger, "DeleteTensorboardTimeSeries") return err }, opts...) if err != nil { @@ -1302,7 +1307,7 @@ func (c *tensorboardGRPCClient) BatchReadTensorboardTimeSeriesData(ctx context.C var resp *aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.BatchReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.BatchReadTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "BatchReadTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1320,7 +1325,7 @@ func (c *tensorboardGRPCClient) ReadTensorboardTimeSeriesData(ctx context.Contex var resp *aiplatformpb.ReadTensorboardTimeSeriesDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ReadTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "ReadTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1338,7 +1343,9 @@ func (c *tensorboardGRPCClient) ReadTensorboardBlobData(ctx context.Context, req var resp aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadTensorboardBlobData") resp, err = c.tensorboardClient.ReadTensorboardBlobData(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadTensorboardBlobData") return err }, opts...) if err != nil { @@ -1356,7 +1363,7 @@ func (c *tensorboardGRPCClient) WriteTensorboardExperimentData(ctx context.Conte var resp *aiplatformpb.WriteTensorboardExperimentDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.WriteTensorboardExperimentData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.WriteTensorboardExperimentData, req, settings.GRPC, c.logger, "WriteTensorboardExperimentData") return err }, opts...) if err != nil { @@ -1374,7 +1381,7 @@ func (c *tensorboardGRPCClient) WriteTensorboardRunData(ctx context.Context, req var resp *aiplatformpb.WriteTensorboardRunDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.WriteTensorboardRunData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.WriteTensorboardRunData, req, settings.GRPC, c.logger, "WriteTensorboardRunData") return err }, opts...) if err != nil { @@ -1403,7 +1410,7 @@ func (c *tensorboardGRPCClient) ExportTensorboardTimeSeriesData(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tensorboardClient.ExportTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tensorboardClient.ExportTensorboardTimeSeriesData, req, settings.GRPC, c.logger, "ExportTensorboardTimeSeriesData") return err }, opts...) if err != nil { @@ -1438,7 +1445,7 @@ func (c *tensorboardGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1467,7 +1474,7 @@ func (c *tensorboardGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1502,7 +1509,7 @@ func (c *tensorboardGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1520,7 +1527,7 @@ func (c *tensorboardGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1538,7 +1545,7 @@ func (c *tensorboardGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1555,7 +1562,7 @@ func (c *tensorboardGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1569,7 +1576,7 @@ func (c *tensorboardGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1584,7 +1591,7 @@ func (c *tensorboardGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1613,7 +1620,7 @@ func (c *tensorboardGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1648,7 +1655,7 @@ func (c *tensorboardGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1696,21 +1703,10 @@ func (c *tensorboardRESTClient) CreateTensorboard(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTensorboard") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1761,17 +1757,7 @@ func (c *tensorboardRESTClient) GetTensorboard(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTensorboard") if err != nil { return err } @@ -1834,21 +1820,10 @@ func (c *tensorboardRESTClient) UpdateTensorboard(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTensorboard") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1924,21 +1899,10 @@ func (c *tensorboardRESTClient) ListTensorboards(ctx context.Context, req *aipla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTensorboards") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2000,21 +1964,10 @@ func (c *tensorboardRESTClient) DeleteTensorboard(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTensorboard") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2065,17 +2018,7 @@ func (c *tensorboardRESTClient) ReadTensorboardUsage(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadTensorboardUsage") if err != nil { return err } @@ -2125,17 +2068,7 @@ func (c *tensorboardRESTClient) ReadTensorboardSize(ctx context.Context, req *ai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadTensorboardSize") if err != nil { return err } @@ -2193,17 +2126,7 @@ func (c *tensorboardRESTClient) CreateTensorboardExperiment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTensorboardExperiment") if err != nil { return err } @@ -2253,17 +2176,7 @@ func (c *tensorboardRESTClient) GetTensorboardExperiment(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTensorboardExperiment") if err != nil { return err } @@ -2327,17 +2240,7 @@ func (c *tensorboardRESTClient) UpdateTensorboardExperiment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTensorboardExperiment") if err != nil { return err } @@ -2412,21 +2315,10 @@ func (c *tensorboardRESTClient) ListTensorboardExperiments(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTensorboardExperiments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2488,21 +2380,10 @@ func (c *tensorboardRESTClient) DeleteTensorboardExperiment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTensorboardExperiment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2561,17 +2442,7 @@ func (c *tensorboardRESTClient) CreateTensorboardRun(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTensorboardRun") if err != nil { return err } @@ -2627,17 +2498,7 @@ func (c *tensorboardRESTClient) BatchCreateTensorboardRuns(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTensorboardRuns") if err != nil { return err } @@ -2687,17 +2548,7 @@ func (c *tensorboardRESTClient) GetTensorboardRun(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTensorboardRun") if err != nil { return err } @@ -2761,17 +2612,7 @@ func (c *tensorboardRESTClient) UpdateTensorboardRun(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTensorboardRun") if err != nil { return err } @@ -2846,21 +2687,10 @@ func (c *tensorboardRESTClient) ListTensorboardRuns(ctx context.Context, req *ai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTensorboardRuns") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2922,21 +2752,10 @@ func (c *tensorboardRESTClient) DeleteTensorboardRun(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTensorboardRun") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2993,17 +2812,7 @@ func (c *tensorboardRESTClient) BatchCreateTensorboardTimeSeries(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTensorboardTimeSeries") if err != nil { return err } @@ -3063,17 +2872,7 @@ func (c *tensorboardRESTClient) CreateTensorboardTimeSeries(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTensorboardTimeSeries") if err != nil { return err } @@ -3123,17 +2922,7 @@ func (c *tensorboardRESTClient) GetTensorboardTimeSeries(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTensorboardTimeSeries") if err != nil { return err } @@ -3197,17 +2986,7 @@ func (c *tensorboardRESTClient) UpdateTensorboardTimeSeries(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTensorboardTimeSeries") if err != nil { return err } @@ -3282,21 +3061,10 @@ func (c *tensorboardRESTClient) ListTensorboardTimeSeries(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTensorboardTimeSeries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3358,21 +3126,10 @@ func (c *tensorboardRESTClient) DeleteTensorboardTimeSeries(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTensorboardTimeSeries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3432,17 +3189,7 @@ func (c *tensorboardRESTClient) BatchReadTensorboardTimeSeriesData(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchReadTensorboardTimeSeriesData") if err != nil { return err } @@ -3502,17 +3249,7 @@ func (c *tensorboardRESTClient) ReadTensorboardTimeSeriesData(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadTensorboardTimeSeriesData") if err != nil { return err } @@ -3568,15 +3305,11 @@ func (c *tensorboardRESTClient) ReadTensorboardBlobData(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadTensorboardBlobData") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &readTensorboardBlobDataRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -3677,17 +3410,7 @@ func (c *tensorboardRESTClient) WriteTensorboardExperimentData(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteTensorboardExperimentData") if err != nil { return err } @@ -3744,17 +3467,7 @@ func (c *tensorboardRESTClient) WriteTensorboardRunData(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteTensorboardRunData") if err != nil { return err } @@ -3817,21 +3530,10 @@ func (c *tensorboardRESTClient) ExportTensorboardTimeSeriesData(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportTensorboardTimeSeriesData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3894,17 +3596,7 @@ func (c *tensorboardRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3969,21 +3661,10 @@ func (c *tensorboardRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4053,17 +3734,7 @@ func (c *tensorboardRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -4123,17 +3794,7 @@ func (c *tensorboardRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Set httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4195,17 +3856,7 @@ func (c *tensorboardRESTClient) TestIamPermissions(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4252,15 +3903,8 @@ func (c *tensorboardRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -4294,15 +3938,8 @@ func (c *tensorboardRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4339,17 +3976,7 @@ func (c *tensorboardRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4414,21 +4041,10 @@ func (c *tensorboardRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4498,17 +4114,7 @@ func (c *tensorboardRESTClient) WaitOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/tensorboard_client_example_go123_test.go b/aiplatform/apiv1beta1/tensorboard_client_example_go123_test.go index 0c3d9f89cafd..b85494bfe62b 100644 --- a/aiplatform/apiv1beta1/tensorboard_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/tensorboard_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTensorboardClient_ExportTensorboardTimeSeriesData_all() { } for resp, err := range c.ExportTensorboardTimeSeriesData(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTensorboardClient_ListTensorboardExperiments_all() { } for resp, err := range c.ListTensorboardExperiments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTensorboardClient_ListTensorboardRuns_all() { } for resp, err := range c.ListTensorboardRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleTensorboardClient_ListTensorboardTimeSeries_all() { } for resp, err := range c.ListTensorboardTimeSeries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleTensorboardClient_ListTensorboards_all() { } for resp, err := range c.ListTensorboards(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleTensorboardClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleTensorboardClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/vertex_rag_client.go b/aiplatform/apiv1beta1/vertex_rag_client.go index 66d67f62d1ec..1c948e9bd343 100755 --- a/aiplatform/apiv1beta1/vertex_rag_client.go +++ b/aiplatform/apiv1beta1/vertex_rag_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -266,6 +265,8 @@ type vertexRagGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVertexRagClient creates a new vertex rag service client based on gRPC. @@ -292,6 +293,7 @@ func NewVertexRagClient(ctx context.Context, opts ...option.ClientOption) (*Vert connPool: connPool, vertexRagClient: aiplatformpb.NewVertexRagServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -341,6 +343,8 @@ type vertexRagRESTClient struct { // Points back to the CallOptions field of the containing VertexRagClient CallOptions **VertexRagCallOptions + + logger *slog.Logger } // NewVertexRagRESTClient creates a new vertex rag service rest client. @@ -358,6 +362,7 @@ func NewVertexRagRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -410,7 +415,7 @@ func (c *vertexRagGRPCClient) RetrieveContexts(ctx context.Context, req *aiplatf var resp *aiplatformpb.RetrieveContextsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.RetrieveContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.RetrieveContexts, req, settings.GRPC, c.logger, "RetrieveContexts") return err }, opts...) if err != nil { @@ -428,7 +433,7 @@ func (c *vertexRagGRPCClient) AugmentPrompt(ctx context.Context, req *aiplatform var resp *aiplatformpb.AugmentPromptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.AugmentPrompt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.AugmentPrompt, req, settings.GRPC, c.logger, "AugmentPrompt") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *vertexRagGRPCClient) CorroborateContent(ctx context.Context, req *aipla var resp *aiplatformpb.CorroborateContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagClient.CorroborateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagClient.CorroborateContent, req, settings.GRPC, c.logger, "CorroborateContent") return err }, opts...) if err != nil { @@ -464,7 +469,7 @@ func (c *vertexRagGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -493,7 +498,7 @@ func (c *vertexRagGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -528,7 +533,7 @@ func (c *vertexRagGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -546,7 +551,7 @@ func (c *vertexRagGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *vertexRagGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -581,7 +586,7 @@ func (c *vertexRagGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -595,7 +600,7 @@ func (c *vertexRagGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -610,7 +615,7 @@ func (c *vertexRagGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *vertexRagGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -674,7 +679,7 @@ func (c *vertexRagGRPCClient) WaitOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -722,17 +727,7 @@ func (c *vertexRagRESTClient) RetrieveContexts(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RetrieveContexts") if err != nil { return err } @@ -789,17 +784,7 @@ func (c *vertexRagRESTClient) AugmentPrompt(ctx context.Context, req *aiplatform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AugmentPrompt") if err != nil { return err } @@ -857,17 +842,7 @@ func (c *vertexRagRESTClient) CorroborateContent(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CorroborateContent") if err != nil { return err } @@ -917,17 +892,7 @@ func (c *vertexRagRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -992,21 +957,10 @@ func (c *vertexRagRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1076,17 +1030,7 @@ func (c *vertexRagRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1146,17 +1090,7 @@ func (c *vertexRagRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1218,17 +1152,7 @@ func (c *vertexRagRESTClient) TestIamPermissions(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1275,15 +1199,8 @@ func (c *vertexRagRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1317,15 +1234,8 @@ func (c *vertexRagRESTClient) DeleteOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1362,17 +1272,7 @@ func (c *vertexRagRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1437,21 +1337,10 @@ func (c *vertexRagRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1521,17 +1410,7 @@ func (c *vertexRagRESTClient) WaitOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/vertex_rag_client_example_go123_test.go b/aiplatform/apiv1beta1/vertex_rag_client_example_go123_test.go index d243d452fef8..89bba1a8e6b5 100644 --- a/aiplatform/apiv1beta1/vertex_rag_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/vertex_rag_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleVertexRagClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleVertexRagClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/vertex_rag_data_client.go b/aiplatform/apiv1beta1/vertex_rag_data_client.go index b3a2d1471ff4..401cd0b06b18 100755 --- a/aiplatform/apiv1beta1/vertex_rag_data_client.go +++ b/aiplatform/apiv1beta1/vertex_rag_data_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -373,6 +372,8 @@ type vertexRagDataGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVertexRagDataClient creates a new vertex rag data service client based on gRPC. @@ -399,6 +400,7 @@ func NewVertexRagDataClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, vertexRagDataClient: aiplatformpb.NewVertexRagDataServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -464,6 +466,8 @@ type vertexRagDataRESTClient struct { // Points back to the CallOptions field of the containing VertexRagDataClient CallOptions **VertexRagDataCallOptions + + logger *slog.Logger } // NewVertexRagDataRESTClient creates a new vertex rag data service rest client. @@ -481,6 +485,7 @@ func NewVertexRagDataRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -543,7 +548,7 @@ func (c *vertexRagDataGRPCClient) CreateRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.CreateRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.CreateRagCorpus, req, settings.GRPC, c.logger, "CreateRagCorpus") return err }, opts...) if err != nil { @@ -563,7 +568,7 @@ func (c *vertexRagDataGRPCClient) UpdateRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.UpdateRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.UpdateRagCorpus, req, settings.GRPC, c.logger, "UpdateRagCorpus") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *vertexRagDataGRPCClient) GetRagCorpus(ctx context.Context, req *aiplatf var resp *aiplatformpb.RagCorpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.GetRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.GetRagCorpus, req, settings.GRPC, c.logger, "GetRagCorpus") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *vertexRagDataGRPCClient) ListRagCorpora(ctx context.Context, req *aipla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ListRagCorpora(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ListRagCorpora, req, settings.GRPC, c.logger, "ListRagCorpora") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *vertexRagDataGRPCClient) DeleteRagCorpus(ctx context.Context, req *aipl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.DeleteRagCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.DeleteRagCorpus, req, settings.GRPC, c.logger, "DeleteRagCorpus") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *vertexRagDataGRPCClient) UploadRagFile(ctx context.Context, req *aiplat var resp *aiplatformpb.UploadRagFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.UploadRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.UploadRagFile, req, settings.GRPC, c.logger, "UploadRagFile") return err }, opts...) if err != nil { @@ -685,7 +690,7 @@ func (c *vertexRagDataGRPCClient) ImportRagFiles(ctx context.Context, req *aipla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ImportRagFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ImportRagFiles, req, settings.GRPC, c.logger, "ImportRagFiles") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *vertexRagDataGRPCClient) GetRagFile(ctx context.Context, req *aiplatfor var resp *aiplatformpb.RagFile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.GetRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.GetRagFile, req, settings.GRPC, c.logger, "GetRagFile") return err }, opts...) if err != nil { @@ -734,7 +739,7 @@ func (c *vertexRagDataGRPCClient) ListRagFiles(ctx context.Context, req *aiplatf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.ListRagFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.ListRagFiles, req, settings.GRPC, c.logger, "ListRagFiles") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *vertexRagDataGRPCClient) DeleteRagFile(ctx context.Context, req *aiplat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vertexRagDataClient.DeleteRagFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vertexRagDataClient.DeleteRagFile, req, settings.GRPC, c.logger, "DeleteRagFile") return err }, opts...) if err != nil { @@ -789,7 +794,7 @@ func (c *vertexRagDataGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *vertexRagDataGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -853,7 +858,7 @@ func (c *vertexRagDataGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *vertexRagDataGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -889,7 +894,7 @@ func (c *vertexRagDataGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *vertexRagDataGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -920,7 +925,7 @@ func (c *vertexRagDataGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -935,7 +940,7 @@ func (c *vertexRagDataGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -964,7 +969,7 @@ func (c *vertexRagDataGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -999,7 +1004,7 @@ func (c *vertexRagDataGRPCClient) WaitOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1047,21 +1052,10 @@ func (c *vertexRagDataRESTClient) CreateRagCorpus(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRagCorpus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1118,21 +1112,10 @@ func (c *vertexRagDataRESTClient) UpdateRagCorpus(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRagCorpus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1183,17 +1166,7 @@ func (c *vertexRagDataRESTClient) GetRagCorpus(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRagCorpus") if err != nil { return err } @@ -1255,21 +1228,10 @@ func (c *vertexRagDataRESTClient) ListRagCorpora(ctx context.Context, req *aipla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRagCorpora") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1334,21 +1296,10 @@ func (c *vertexRagDataRESTClient) DeleteRagCorpus(ctx context.Context, req *aipl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRagCorpus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1405,17 +1356,7 @@ func (c *vertexRagDataRESTClient) UploadRagFile(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UploadRagFile") if err != nil { return err } @@ -1470,21 +1411,10 @@ func (c *vertexRagDataRESTClient) ImportRagFiles(ctx context.Context, req *aipla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportRagFiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1535,17 +1465,7 @@ func (c *vertexRagDataRESTClient) GetRagFile(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRagFile") if err != nil { return err } @@ -1607,21 +1527,10 @@ func (c *vertexRagDataRESTClient) ListRagFiles(ctx context.Context, req *aiplatf } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRagFiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1683,21 +1592,10 @@ func (c *vertexRagDataRESTClient) DeleteRagFile(ctx context.Context, req *aiplat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRagFile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1748,17 +1646,7 @@ func (c *vertexRagDataRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1823,21 +1711,10 @@ func (c *vertexRagDataRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1907,17 +1784,7 @@ func (c *vertexRagDataRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1977,17 +1844,7 @@ func (c *vertexRagDataRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2049,17 +1906,7 @@ func (c *vertexRagDataRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2106,15 +1953,8 @@ func (c *vertexRagDataRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2148,15 +1988,8 @@ func (c *vertexRagDataRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2193,17 +2026,7 @@ func (c *vertexRagDataRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2268,21 +2091,10 @@ func (c *vertexRagDataRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2352,17 +2164,7 @@ func (c *vertexRagDataRESTClient) WaitOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/vertex_rag_data_client_example_go123_test.go b/aiplatform/apiv1beta1/vertex_rag_data_client_example_go123_test.go index 609f0b48ea47..5c3c98b2e686 100644 --- a/aiplatform/apiv1beta1/vertex_rag_data_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/vertex_rag_data_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVertexRagDataClient_ListRagCorpora_all() { } for resp, err := range c.ListRagCorpora(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVertexRagDataClient_ListRagFiles_all() { } for resp, err := range c.ListRagFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVertexRagDataClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleVertexRagDataClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/aiplatform/apiv1beta1/vizier_client.go b/aiplatform/apiv1beta1/vizier_client.go index 58aa6f036f03..80744e39b6ca 100755 --- a/aiplatform/apiv1beta1/vizier_client.go +++ b/aiplatform/apiv1beta1/vizier_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -476,6 +475,8 @@ type vizierGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVizierClient creates a new vizier service client based on gRPC. @@ -506,6 +507,7 @@ func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierC connPool: connPool, vizierClient: aiplatformpb.NewVizierServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -571,6 +573,8 @@ type vizierRESTClient struct { // Points back to the CallOptions field of the containing VizierClient CallOptions **VizierCallOptions + + logger *slog.Logger } // NewVizierRESTClient creates a new vizier service rest client. @@ -592,6 +596,7 @@ func NewVizierRESTClient(ctx context.Context, opts ...option.ClientOption) (*Viz endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -654,7 +659,7 @@ func (c *vizierGRPCClient) CreateStudy(ctx context.Context, req *aiplatformpb.Cr var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CreateStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CreateStudy, req, settings.GRPC, c.logger, "CreateStudy") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *vizierGRPCClient) GetStudy(ctx context.Context, req *aiplatformpb.GetSt var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.GetStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.GetStudy, req, settings.GRPC, c.logger, "GetStudy") return err }, opts...) if err != nil { @@ -701,7 +706,7 @@ func (c *vizierGRPCClient) ListStudies(ctx context.Context, req *aiplatformpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListStudies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListStudies, req, settings.GRPC, c.logger, "ListStudies") return err }, opts...) if err != nil { @@ -735,7 +740,7 @@ func (c *vizierGRPCClient) DeleteStudy(ctx context.Context, req *aiplatformpb.De opts = append((*c.CallOptions).DeleteStudy[0:len((*c.CallOptions).DeleteStudy):len((*c.CallOptions).DeleteStudy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.vizierClient.DeleteStudy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.vizierClient.DeleteStudy, req, settings.GRPC, c.logger, "DeleteStudy") return err }, opts...) return err @@ -750,7 +755,7 @@ func (c *vizierGRPCClient) LookupStudy(ctx context.Context, req *aiplatformpb.Lo var resp *aiplatformpb.Study err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.LookupStudy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.LookupStudy, req, settings.GRPC, c.logger, "LookupStudy") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *vizierGRPCClient) SuggestTrials(ctx context.Context, req *aiplatformpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.SuggestTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.SuggestTrials, req, settings.GRPC, c.logger, "SuggestTrials") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *vizierGRPCClient) CreateTrial(ctx context.Context, req *aiplatformpb.Cr var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CreateTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CreateTrial, req, settings.GRPC, c.logger, "CreateTrial") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *vizierGRPCClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTr var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.GetTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.GetTrial, req, settings.GRPC, c.logger, "GetTrial") return err }, opts...) if err != nil { @@ -835,7 +840,7 @@ func (c *vizierGRPCClient) ListTrials(ctx context.Context, req *aiplatformpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListTrials, req, settings.GRPC, c.logger, "ListTrials") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *vizierGRPCClient) AddTrialMeasurement(ctx context.Context, req *aiplatf var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.AddTrialMeasurement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.AddTrialMeasurement, req, settings.GRPC, c.logger, "AddTrialMeasurement") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *vizierGRPCClient) CompleteTrial(ctx context.Context, req *aiplatformpb. var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CompleteTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CompleteTrial, req, settings.GRPC, c.logger, "CompleteTrial") return err }, opts...) if err != nil { @@ -905,7 +910,7 @@ func (c *vizierGRPCClient) DeleteTrial(ctx context.Context, req *aiplatformpb.De opts = append((*c.CallOptions).DeleteTrial[0:len((*c.CallOptions).DeleteTrial):len((*c.CallOptions).DeleteTrial)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.vizierClient.DeleteTrial(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.vizierClient.DeleteTrial, req, settings.GRPC, c.logger, "DeleteTrial") return err }, opts...) return err @@ -920,7 +925,7 @@ func (c *vizierGRPCClient) CheckTrialEarlyStoppingState(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.CheckTrialEarlyStoppingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.CheckTrialEarlyStoppingState, req, settings.GRPC, c.logger, "CheckTrialEarlyStoppingState") return err }, opts...) if err != nil { @@ -940,7 +945,7 @@ func (c *vizierGRPCClient) StopTrial(ctx context.Context, req *aiplatformpb.Stop var resp *aiplatformpb.Trial err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.StopTrial(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.StopTrial, req, settings.GRPC, c.logger, "StopTrial") return err }, opts...) if err != nil { @@ -958,7 +963,7 @@ func (c *vizierGRPCClient) ListOptimalTrials(ctx context.Context, req *aiplatfor var resp *aiplatformpb.ListOptimalTrialsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vizierClient.ListOptimalTrials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vizierClient.ListOptimalTrials, req, settings.GRPC, c.logger, "ListOptimalTrials") return err }, opts...) if err != nil { @@ -976,7 +981,7 @@ func (c *vizierGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1005,7 +1010,7 @@ func (c *vizierGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1040,7 +1045,7 @@ func (c *vizierGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1058,7 +1063,7 @@ func (c *vizierGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1076,7 +1081,7 @@ func (c *vizierGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Te var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1093,7 +1098,7 @@ func (c *vizierGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1107,7 +1112,7 @@ func (c *vizierGRPCClient) DeleteOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1122,7 +1127,7 @@ func (c *vizierGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1151,7 +1156,7 @@ func (c *vizierGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1186,7 +1191,7 @@ func (c *vizierGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -1236,17 +1241,7 @@ func (c *vizierRESTClient) CreateStudy(ctx context.Context, req *aiplatformpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStudy") if err != nil { return err } @@ -1296,17 +1291,7 @@ func (c *vizierRESTClient) GetStudy(ctx context.Context, req *aiplatformpb.GetSt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStudy") if err != nil { return err } @@ -1368,21 +1353,10 @@ func (c *vizierRESTClient) ListStudies(ctx context.Context, req *aiplatformpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStudies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1442,15 +1416,8 @@ func (c *vizierRESTClient) DeleteStudy(ctx context.Context, req *aiplatformpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStudy") + return err }, opts...) } @@ -1494,17 +1461,7 @@ func (c *vizierRESTClient) LookupStudy(ctx context.Context, req *aiplatformpb.Lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LookupStudy") if err != nil { return err } @@ -1564,21 +1521,10 @@ func (c *vizierRESTClient) SuggestTrials(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestTrials") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1636,17 +1582,7 @@ func (c *vizierRESTClient) CreateTrial(ctx context.Context, req *aiplatformpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTrial") if err != nil { return err } @@ -1696,17 +1632,7 @@ func (c *vizierRESTClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTrial") if err != nil { return err } @@ -1768,21 +1694,10 @@ func (c *vizierRESTClient) ListTrials(ctx context.Context, req *aiplatformpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTrials") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1852,17 +1767,7 @@ func (c *vizierRESTClient) AddTrialMeasurement(ctx context.Context, req *aiplatf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddTrialMeasurement") if err != nil { return err } @@ -1918,17 +1823,7 @@ func (c *vizierRESTClient) CompleteTrial(ctx context.Context, req *aiplatformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteTrial") if err != nil { return err } @@ -1975,15 +1870,8 @@ func (c *vizierRESTClient) DeleteTrial(ctx context.Context, req *aiplatformpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTrial") + return err }, opts...) } @@ -2028,21 +1916,10 @@ func (c *vizierRESTClient) CheckTrialEarlyStoppingState(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckTrialEarlyStoppingState") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2099,17 +1976,7 @@ func (c *vizierRESTClient) StopTrial(ctx context.Context, req *aiplatformpb.Stop httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopTrial") if err != nil { return err } @@ -2168,17 +2035,7 @@ func (c *vizierRESTClient) ListOptimalTrials(ctx context.Context, req *aiplatfor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListOptimalTrials") if err != nil { return err } @@ -2228,17 +2085,7 @@ func (c *vizierRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2303,21 +2150,10 @@ func (c *vizierRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2387,17 +2223,7 @@ func (c *vizierRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2457,17 +2283,7 @@ func (c *vizierRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2529,17 +2345,7 @@ func (c *vizierRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Te httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2586,15 +2392,8 @@ func (c *vizierRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2628,15 +2427,8 @@ func (c *vizierRESTClient) DeleteOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2673,17 +2465,7 @@ func (c *vizierRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2748,21 +2530,10 @@ func (c *vizierRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2832,17 +2603,7 @@ func (c *vizierRESTClient) WaitOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/aiplatform/apiv1beta1/vizier_client_example_go123_test.go b/aiplatform/apiv1beta1/vizier_client_example_go123_test.go index 3cce3a0e5bb8..0e60c28c9abf 100644 --- a/aiplatform/apiv1beta1/vizier_client_example_go123_test.go +++ b/aiplatform/apiv1beta1/vizier_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVizierClient_ListStudies_all() { } for resp, err := range c.ListStudies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVizierClient_ListTrials_all() { } for resp, err := range c.ListTrials(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVizierClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleVizierClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/alloydb/apiv1/alloydb_admin_client.go b/alloydb/apiv1/alloydb_admin_client.go index d38e9535525f..7f15d1104271 100755 --- a/alloydb/apiv1/alloydb_admin_client.go +++ b/alloydb/apiv1/alloydb_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -946,6 +945,8 @@ type alloyDBAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAlloyDBAdminClient creates a new alloydb admin client based on gRPC. @@ -972,6 +973,7 @@ func NewAlloyDBAdminClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, alloyDBAdminClient: alloydbpb.NewAlloyDBAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1036,6 +1038,8 @@ type alloyDBAdminRESTClient struct { // Points back to the CallOptions field of the containing AlloyDBAdminClient CallOptions **AlloyDBAdminCallOptions + + logger *slog.Logger } // NewAlloyDBAdminRESTClient creates a new alloydb admin rest client. @@ -1053,6 +1057,7 @@ func NewAlloyDBAdminRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1126,7 +1131,7 @@ func (c *alloyDBAdminGRPCClient) ListClusters(ctx context.Context, req *alloydbp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *alloyDBAdminGRPCClient) GetCluster(ctx context.Context, req *alloydbpb. var resp *alloydbpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -1179,7 +1184,7 @@ func (c *alloyDBAdminGRPCClient) CreateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *alloyDBAdminGRPCClient) UpdateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -1219,7 +1224,7 @@ func (c *alloyDBAdminGRPCClient) DeleteCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -1239,7 +1244,7 @@ func (c *alloyDBAdminGRPCClient) PromoteCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.PromoteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.PromoteCluster, req, settings.GRPC, c.logger, "PromoteCluster") return err }, opts...) if err != nil { @@ -1259,7 +1264,7 @@ func (c *alloyDBAdminGRPCClient) SwitchoverCluster(ctx context.Context, req *all var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.SwitchoverCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.SwitchoverCluster, req, settings.GRPC, c.logger, "SwitchoverCluster") return err }, opts...) if err != nil { @@ -1279,7 +1284,7 @@ func (c *alloyDBAdminGRPCClient) RestoreCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestoreCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestoreCluster, req, settings.GRPC, c.logger, "RestoreCluster") return err }, opts...) if err != nil { @@ -1299,7 +1304,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryCluster(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryCluster, req, settings.GRPC, c.logger, "CreateSecondaryCluster") return err }, opts...) if err != nil { @@ -1330,7 +1335,7 @@ func (c *alloyDBAdminGRPCClient) ListInstances(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -1365,7 +1370,7 @@ func (c *alloyDBAdminGRPCClient) GetInstance(ctx context.Context, req *alloydbpb var resp *alloydbpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1383,7 +1388,7 @@ func (c *alloyDBAdminGRPCClient) CreateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -1403,7 +1408,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryInstance, req, settings.GRPC, c.logger, "CreateSecondaryInstance") return err }, opts...) if err != nil { @@ -1423,7 +1428,7 @@ func (c *alloyDBAdminGRPCClient) BatchCreateInstances(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.BatchCreateInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.BatchCreateInstances, req, settings.GRPC, c.logger, "BatchCreateInstances") return err }, opts...) if err != nil { @@ -1443,7 +1448,7 @@ func (c *alloyDBAdminGRPCClient) UpdateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -1463,7 +1468,7 @@ func (c *alloyDBAdminGRPCClient) DeleteInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -1483,7 +1488,7 @@ func (c *alloyDBAdminGRPCClient) FailoverInstance(ctx context.Context, req *allo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.FailoverInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.FailoverInstance, req, settings.GRPC, c.logger, "FailoverInstance") return err }, opts...) if err != nil { @@ -1503,7 +1508,7 @@ func (c *alloyDBAdminGRPCClient) InjectFault(ctx context.Context, req *alloydbpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.InjectFault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.InjectFault, req, settings.GRPC, c.logger, "InjectFault") return err }, opts...) if err != nil { @@ -1523,7 +1528,7 @@ func (c *alloyDBAdminGRPCClient) RestartInstance(ctx context.Context, req *alloy var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestartInstance, req, settings.GRPC, c.logger, "RestartInstance") return err }, opts...) if err != nil { @@ -1543,7 +1548,7 @@ func (c *alloyDBAdminGRPCClient) ExecuteSql(ctx context.Context, req *alloydbpb. var resp *alloydbpb.ExecuteSqlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ExecuteSql(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ExecuteSql, req, settings.GRPC, c.logger, "ExecuteSql") return err }, opts...) if err != nil { @@ -1572,7 +1577,7 @@ func (c *alloyDBAdminGRPCClient) ListBackups(ctx context.Context, req *alloydbpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1607,7 +1612,7 @@ func (c *alloyDBAdminGRPCClient) GetBackup(ctx context.Context, req *alloydbpb.G var resp *alloydbpb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1625,7 +1630,7 @@ func (c *alloyDBAdminGRPCClient) CreateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1645,7 +1650,7 @@ func (c *alloyDBAdminGRPCClient) UpdateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1665,7 +1670,7 @@ func (c *alloyDBAdminGRPCClient) DeleteBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1696,7 +1701,7 @@ func (c *alloyDBAdminGRPCClient) ListSupportedDatabaseFlags(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListSupportedDatabaseFlags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListSupportedDatabaseFlags, req, settings.GRPC, c.logger, "ListSupportedDatabaseFlags") return err }, opts...) if err != nil { @@ -1731,7 +1736,7 @@ func (c *alloyDBAdminGRPCClient) GenerateClientCertificate(ctx context.Context, var resp *alloydbpb.GenerateClientCertificateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GenerateClientCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GenerateClientCertificate, req, settings.GRPC, c.logger, "GenerateClientCertificate") return err }, opts...) if err != nil { @@ -1749,7 +1754,7 @@ func (c *alloyDBAdminGRPCClient) GetConnectionInfo(ctx context.Context, req *all var resp *alloydbpb.ConnectionInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetConnectionInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetConnectionInfo, req, settings.GRPC, c.logger, "GetConnectionInfo") return err }, opts...) if err != nil { @@ -1778,7 +1783,7 @@ func (c *alloyDBAdminGRPCClient) ListUsers(ctx context.Context, req *alloydbpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListUsers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListUsers, req, settings.GRPC, c.logger, "ListUsers") return err }, opts...) if err != nil { @@ -1813,7 +1818,7 @@ func (c *alloyDBAdminGRPCClient) GetUser(ctx context.Context, req *alloydbpb.Get var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetUser, req, settings.GRPC, c.logger, "GetUser") return err }, opts...) if err != nil { @@ -1831,7 +1836,7 @@ func (c *alloyDBAdminGRPCClient) CreateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateUser, req, settings.GRPC, c.logger, "CreateUser") return err }, opts...) if err != nil { @@ -1849,7 +1854,7 @@ func (c *alloyDBAdminGRPCClient) UpdateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateUser, req, settings.GRPC, c.logger, "UpdateUser") return err }, opts...) if err != nil { @@ -1866,7 +1871,7 @@ func (c *alloyDBAdminGRPCClient) DeleteUser(ctx context.Context, req *alloydbpb. opts = append((*c.CallOptions).DeleteUser[0:len((*c.CallOptions).DeleteUser):len((*c.CallOptions).DeleteUser)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.alloyDBAdminClient.DeleteUser(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteUser, req, settings.GRPC, c.logger, "DeleteUser") return err }, opts...) return err @@ -1892,7 +1897,7 @@ func (c *alloyDBAdminGRPCClient) ListDatabases(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -1927,7 +1932,7 @@ func (c *alloyDBAdminGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1956,7 +1961,7 @@ func (c *alloyDBAdminGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1990,7 +1995,7 @@ func (c *alloyDBAdminGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2004,7 +2009,7 @@ func (c *alloyDBAdminGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2019,7 +2024,7 @@ func (c *alloyDBAdminGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2048,7 +2053,7 @@ func (c *alloyDBAdminGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2125,21 +2130,10 @@ func (c *alloyDBAdminRESTClient) ListClusters(ctx context.Context, req *alloydbp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2205,17 +2199,7 @@ func (c *alloyDBAdminRESTClient) GetCluster(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -2278,21 +2262,10 @@ func (c *alloyDBAdminRESTClient) CreateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2365,21 +2338,10 @@ func (c *alloyDBAdminRESTClient) UpdateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2441,21 +2403,10 @@ func (c *alloyDBAdminRESTClient) DeleteCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2514,21 +2465,10 @@ func (c *alloyDBAdminRESTClient) PromoteCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PromoteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2586,21 +2526,10 @@ func (c *alloyDBAdminRESTClient) SwitchoverCluster(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SwitchoverCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2658,21 +2587,10 @@ func (c *alloyDBAdminRESTClient) RestoreCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2737,21 +2655,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryCluster(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2820,21 +2727,10 @@ func (c *alloyDBAdminRESTClient) ListInstances(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2900,17 +2796,7 @@ func (c *alloyDBAdminRESTClient) GetInstance(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -2973,21 +2859,10 @@ func (c *alloyDBAdminRESTClient) CreateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3051,21 +2926,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3134,21 +2998,10 @@ func (c *alloyDBAdminRESTClient) BatchCreateInstances(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3221,21 +3074,10 @@ func (c *alloyDBAdminRESTClient) UpdateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3294,21 +3136,10 @@ func (c *alloyDBAdminRESTClient) DeleteInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3366,21 +3197,10 @@ func (c *alloyDBAdminRESTClient) FailoverInstance(ctx context.Context, req *allo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3437,21 +3257,10 @@ func (c *alloyDBAdminRESTClient) InjectFault(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InjectFault") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3508,21 +3317,10 @@ func (c *alloyDBAdminRESTClient) RestartInstance(ctx context.Context, req *alloy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestartInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3579,17 +3377,7 @@ func (c *alloyDBAdminRESTClient) ExecuteSql(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteSql") if err != nil { return err } @@ -3657,21 +3445,10 @@ func (c *alloyDBAdminRESTClient) ListBackups(ctx context.Context, req *alloydbpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3734,17 +3511,7 @@ func (c *alloyDBAdminRESTClient) GetBackup(ctx context.Context, req *alloydbpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -3807,21 +3574,10 @@ func (c *alloyDBAdminRESTClient) CreateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3894,21 +3650,10 @@ func (c *alloyDBAdminRESTClient) UpdateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3967,21 +3712,10 @@ func (c *alloyDBAdminRESTClient) DeleteBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4044,21 +3778,10 @@ func (c *alloyDBAdminRESTClient) ListSupportedDatabaseFlags(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSupportedDatabaseFlags") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4131,17 +3854,7 @@ func (c *alloyDBAdminRESTClient) GenerateClientCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateClientCertificate") if err != nil { return err } @@ -4194,17 +3907,7 @@ func (c *alloyDBAdminRESTClient) GetConnectionInfo(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectionInfo") if err != nil { return err } @@ -4272,21 +3975,10 @@ func (c *alloyDBAdminRESTClient) ListUsers(ctx context.Context, req *alloydbpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4349,17 +4041,7 @@ func (c *alloyDBAdminRESTClient) GetUser(ctx context.Context, req *alloydbpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUser") if err != nil { return err } @@ -4423,17 +4105,7 @@ func (c *alloyDBAdminRESTClient) CreateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUser") if err != nil { return err } @@ -4506,17 +4178,7 @@ func (c *alloyDBAdminRESTClient) UpdateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUser") if err != nil { return err } @@ -4569,15 +4231,8 @@ func (c *alloyDBAdminRESTClient) DeleteUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUser") + return err }, opts...) } @@ -4629,21 +4284,10 @@ func (c *alloyDBAdminRESTClient) ListDatabases(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4706,17 +4350,7 @@ func (c *alloyDBAdminRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4781,21 +4415,10 @@ func (c *alloyDBAdminRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4861,15 +4484,8 @@ func (c *alloyDBAdminRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4903,15 +4519,8 @@ func (c *alloyDBAdminRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4948,17 +4557,7 @@ func (c *alloyDBAdminRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5023,21 +4622,10 @@ func (c *alloyDBAdminRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/alloydb/apiv1/alloydb_admin_client_example_go123_test.go b/alloydb/apiv1/alloydb_admin_client_example_go123_test.go index 4f3f88a9dd21..88c4770522d7 100644 --- a/alloydb/apiv1/alloydb_admin_client_example_go123_test.go +++ b/alloydb/apiv1/alloydb_admin_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAlloyDBAdminClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAlloyDBAdminClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAlloyDBAdminClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleAlloyDBAdminClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleAlloyDBAdminClient_ListSupportedDatabaseFlags_all() { } for resp, err := range c.ListSupportedDatabaseFlags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleAlloyDBAdminClient_ListUsers_all() { } for resp, err := range c.ListUsers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleAlloyDBAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleAlloyDBAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/alloydb/apiv1/alloydbpb/data_model.pb.go b/alloydb/apiv1/alloydbpb/data_model.pb.go index 061fe54bee05..372ae530b518 100755 --- a/alloydb/apiv1/alloydbpb/data_model.pb.go +++ b/alloydb/apiv1/alloydbpb/data_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1/data_model.proto @@ -50,11 +50,9 @@ type SqlResult struct { func (x *SqlResult) Reset() { *x = SqlResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResult) String() string { @@ -65,7 +63,7 @@ func (*SqlResult) ProtoMessage() {} func (x *SqlResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type SqlResultColumn struct { func (x *SqlResultColumn) Reset() { *x = SqlResultColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultColumn) String() string { @@ -125,7 +121,7 @@ func (*SqlResultColumn) ProtoMessage() {} func (x *SqlResultColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +162,9 @@ type SqlResultRow struct { func (x *SqlResultRow) Reset() { *x = SqlResultRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultRow) String() string { @@ -181,7 +175,7 @@ func (*SqlResultRow) ProtoMessage() {} func (x *SqlResultRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +212,9 @@ type SqlResultValue struct { func (x *SqlResultValue) Reset() { *x = SqlResultValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultValue) String() string { @@ -233,7 +225,7 @@ func (*SqlResultValue) ProtoMessage() {} func (x *SqlResultValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_data_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -343,56 +335,6 @@ func file_google_cloud_alloydb_v1_data_model_proto_init() { if File_google_cloud_alloydb_v1_data_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1_data_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SqlResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_data_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_data_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_data_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1_data_model_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/alloydb/apiv1/alloydbpb/resources.pb.go b/alloydb/apiv1/alloydbpb/resources.pb.go index 31298be042ed..53f21458cd71 100755 --- a/alloydb/apiv1/alloydbpb/resources.pb.go +++ b/alloydb/apiv1/alloydbpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1/resources.proto @@ -1103,11 +1103,9 @@ type UserPassword struct { func (x *UserPassword) Reset() { *x = UserPassword{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserPassword) String() string { @@ -1118,7 +1116,7 @@ func (*UserPassword) ProtoMessage() {} func (x *UserPassword) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1166,11 +1164,9 @@ type MigrationSource struct { func (x *MigrationSource) Reset() { *x = MigrationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationSource) String() string { @@ -1181,7 +1177,7 @@ func (*MigrationSource) ProtoMessage() {} func (x *MigrationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1228,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1247,7 +1241,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1284,11 +1278,9 @@ type EncryptionInfo struct { func (x *EncryptionInfo) Reset() { *x = EncryptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionInfo) String() string { @@ -1299,7 +1291,7 @@ func (*EncryptionInfo) ProtoMessage() {} func (x *EncryptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1343,11 +1335,9 @@ type SslConfig struct { func (x *SslConfig) Reset() { *x = SslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslConfig) String() string { @@ -1358,7 +1348,7 @@ func (*SslConfig) ProtoMessage() {} func (x *SslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1449,11 +1439,9 @@ type AutomatedBackupPolicy struct { func (x *AutomatedBackupPolicy) Reset() { *x = AutomatedBackupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy) String() string { @@ -1464,7 +1452,7 @@ func (*AutomatedBackupPolicy) ProtoMessage() {} func (x *AutomatedBackupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1600,11 +1588,9 @@ type ContinuousBackupConfig struct { func (x *ContinuousBackupConfig) Reset() { *x = ContinuousBackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupConfig) String() string { @@ -1615,7 +1601,7 @@ func (*ContinuousBackupConfig) ProtoMessage() {} func (x *ContinuousBackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1660,9 @@ type ContinuousBackupInfo struct { func (x *ContinuousBackupInfo) Reset() { *x = ContinuousBackupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupInfo) String() string { @@ -1689,7 +1673,7 @@ func (*ContinuousBackupInfo) ProtoMessage() {} func (x *ContinuousBackupInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1749,11 +1733,9 @@ type BackupSource struct { func (x *BackupSource) Reset() { *x = BackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupSource) String() string { @@ -1764,7 +1746,7 @@ func (*BackupSource) ProtoMessage() {} func (x *BackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1809,11 +1791,9 @@ type ContinuousBackupSource struct { func (x *ContinuousBackupSource) Reset() { *x = ContinuousBackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupSource) String() string { @@ -1824,7 +1804,7 @@ func (*ContinuousBackupSource) ProtoMessage() {} func (x *ContinuousBackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1865,11 +1845,9 @@ type MaintenanceUpdatePolicy struct { func (x *MaintenanceUpdatePolicy) Reset() { *x = MaintenanceUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy) String() string { @@ -1880,7 +1858,7 @@ func (*MaintenanceUpdatePolicy) ProtoMessage() {} func (x *MaintenanceUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1896,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -1933,7 +1909,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,11 +2058,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -2097,7 +2071,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2481,11 +2455,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -2496,7 +2468,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2725,11 +2697,9 @@ type ConnectionInfo struct { func (x *ConnectionInfo) Reset() { *x = ConnectionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionInfo) String() string { @@ -2740,7 +2710,7 @@ func (*ConnectionInfo) ProtoMessage() {} func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2870,11 +2840,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -2885,7 +2853,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3101,11 +3069,9 @@ type SupportedDatabaseFlag struct { func (x *SupportedDatabaseFlag) Reset() { *x = SupportedDatabaseFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag) String() string { @@ -3116,7 +3082,7 @@ func (*SupportedDatabaseFlag) ProtoMessage() {} func (x *SupportedDatabaseFlag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3235,11 +3201,9 @@ type User struct { func (x *User) Reset() { *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *User) String() string { @@ -3250,7 +3214,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3321,11 +3285,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -3336,7 +3298,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3399,11 +3361,9 @@ type AutomatedBackupPolicy_WeeklySchedule struct { func (x *AutomatedBackupPolicy_WeeklySchedule) Reset() { *x = AutomatedBackupPolicy_WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_WeeklySchedule) String() string { @@ -3414,7 +3374,7 @@ func (*AutomatedBackupPolicy_WeeklySchedule) ProtoMessage() {} func (x *AutomatedBackupPolicy_WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3456,11 +3416,9 @@ type AutomatedBackupPolicy_TimeBasedRetention struct { func (x *AutomatedBackupPolicy_TimeBasedRetention) Reset() { *x = AutomatedBackupPolicy_TimeBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_TimeBasedRetention) String() string { @@ -3471,7 +3429,7 @@ func (*AutomatedBackupPolicy_TimeBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_TimeBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3506,11 +3464,9 @@ type AutomatedBackupPolicy_QuantityBasedRetention struct { func (x *AutomatedBackupPolicy_QuantityBasedRetention) Reset() { *x = AutomatedBackupPolicy_QuantityBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_QuantityBasedRetention) String() string { @@ -3521,7 +3477,7 @@ func (*AutomatedBackupPolicy_QuantityBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_QuantityBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3558,11 +3514,9 @@ type MaintenanceUpdatePolicy_MaintenanceWindow struct { func (x *MaintenanceUpdatePolicy_MaintenanceWindow) Reset() { *x = MaintenanceUpdatePolicy_MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy_MaintenanceWindow) String() string { @@ -3573,7 +3527,7 @@ func (*MaintenanceUpdatePolicy_MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceUpdatePolicy_MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3627,11 +3581,9 @@ type Cluster_NetworkConfig struct { func (x *Cluster_NetworkConfig) Reset() { *x = Cluster_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_NetworkConfig) String() string { @@ -3642,7 +3594,7 @@ func (*Cluster_NetworkConfig) ProtoMessage() {} func (x *Cluster_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3685,11 +3637,9 @@ type Cluster_SecondaryConfig struct { func (x *Cluster_SecondaryConfig) Reset() { *x = Cluster_SecondaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SecondaryConfig) String() string { @@ -3700,7 +3650,7 @@ func (*Cluster_SecondaryConfig) ProtoMessage() {} func (x *Cluster_SecondaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3737,11 +3687,9 @@ type Cluster_PrimaryConfig struct { func (x *Cluster_PrimaryConfig) Reset() { *x = Cluster_PrimaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PrimaryConfig) String() string { @@ -3752,7 +3700,7 @@ func (*Cluster_PrimaryConfig) ProtoMessage() {} func (x *Cluster_PrimaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3787,11 +3735,9 @@ type Cluster_PscConfig struct { func (x *Cluster_PscConfig) Reset() { *x = Cluster_PscConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PscConfig) String() string { @@ -3802,7 +3748,7 @@ func (*Cluster_PscConfig) ProtoMessage() {} func (x *Cluster_PscConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3842,11 +3788,9 @@ type Cluster_TrialMetadata struct { func (x *Cluster_TrialMetadata) Reset() { *x = Cluster_TrialMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_TrialMetadata) String() string { @@ -3857,7 +3801,7 @@ func (*Cluster_TrialMetadata) ProtoMessage() {} func (x *Cluster_TrialMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3912,11 +3856,9 @@ type Instance_MachineConfig struct { func (x *Instance_MachineConfig) Reset() { *x = Instance_MachineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_MachineConfig) String() string { @@ -3927,7 +3869,7 @@ func (*Instance_MachineConfig) ProtoMessage() {} func (x *Instance_MachineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3972,11 +3914,9 @@ type Instance_Node struct { func (x *Instance_Node) Reset() { *x = Instance_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Node) String() string { @@ -3987,7 +3927,7 @@ func (*Instance_Node) ProtoMessage() {} func (x *Instance_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4053,11 +3993,9 @@ type Instance_QueryInsightsInstanceConfig struct { func (x *Instance_QueryInsightsInstanceConfig) Reset() { *x = Instance_QueryInsightsInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_QueryInsightsInstanceConfig) String() string { @@ -4068,7 +4006,7 @@ func (*Instance_QueryInsightsInstanceConfig) ProtoMessage() {} func (x *Instance_QueryInsightsInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4123,11 +4061,9 @@ type Instance_ReadPoolConfig struct { func (x *Instance_ReadPoolConfig) Reset() { *x = Instance_ReadPoolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ReadPoolConfig) String() string { @@ -4138,7 +4074,7 @@ func (*Instance_ReadPoolConfig) ProtoMessage() {} func (x *Instance_ReadPoolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4175,11 +4111,9 @@ type Instance_ClientConnectionConfig struct { func (x *Instance_ClientConnectionConfig) Reset() { *x = Instance_ClientConnectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ClientConnectionConfig) String() string { @@ -4190,7 +4124,7 @@ func (*Instance_ClientConnectionConfig) ProtoMessage() {} func (x *Instance_ClientConnectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4241,11 +4175,9 @@ type Instance_PscInstanceConfig struct { func (x *Instance_PscInstanceConfig) Reset() { *x = Instance_PscInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_PscInstanceConfig) String() string { @@ -4256,7 +4188,7 @@ func (*Instance_PscInstanceConfig) ProtoMessage() {} func (x *Instance_PscInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4309,11 +4241,9 @@ type Instance_InstanceNetworkConfig struct { func (x *Instance_InstanceNetworkConfig) Reset() { *x = Instance_InstanceNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig) String() string { @@ -4324,7 +4254,7 @@ func (*Instance_InstanceNetworkConfig) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4372,11 +4302,9 @@ type Instance_InstanceNetworkConfig_AuthorizedNetwork struct { func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) Reset() { *x = Instance_InstanceNetworkConfig_AuthorizedNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) String() string { @@ -4387,7 +4315,7 @@ func (*Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4437,11 +4365,9 @@ type Backup_QuantityBasedExpiry struct { func (x *Backup_QuantityBasedExpiry) Reset() { *x = Backup_QuantityBasedExpiry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_QuantityBasedExpiry) String() string { @@ -4452,7 +4378,7 @@ func (*Backup_QuantityBasedExpiry) ProtoMessage() {} func (x *Backup_QuantityBasedExpiry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4494,11 +4420,9 @@ type SupportedDatabaseFlag_StringRestrictions struct { func (x *SupportedDatabaseFlag_StringRestrictions) Reset() { *x = SupportedDatabaseFlag_StringRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_StringRestrictions) String() string { @@ -4509,7 +4433,7 @@ func (*SupportedDatabaseFlag_StringRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_StringRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4545,11 +4469,9 @@ type SupportedDatabaseFlag_IntegerRestrictions struct { func (x *SupportedDatabaseFlag_IntegerRestrictions) Reset() { *x = SupportedDatabaseFlag_IntegerRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_IntegerRestrictions) String() string { @@ -4560,7 +4482,7 @@ func (*SupportedDatabaseFlag_IntegerRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_IntegerRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_resources_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5777,476 +5699,6 @@ func file_google_cloud_alloydb_v1_resources_proto_init() { if File_google_cloud_alloydb_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserPassword); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_TimeBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_QuantityBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy_MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SecondaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PrimaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PscConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_TrialMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Instance_MachineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Instance_QueryInsightsInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ReadPoolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ClientConnectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Instance_PscInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig_AuthorizedNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Backup_QuantityBasedExpiry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_StringRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_resources_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_IntegerRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1_resources_proto_msgTypes[5].OneofWrappers = []any{ (*AutomatedBackupPolicy_WeeklySchedule_)(nil), (*AutomatedBackupPolicy_TimeBasedRetention_)(nil), diff --git a/alloydb/apiv1/alloydbpb/service.pb.go b/alloydb/apiv1/alloydbpb/service.pb.go index 5863ac192da7..c98df8c0fd6b 100755 --- a/alloydb/apiv1/alloydbpb/service.pb.go +++ b/alloydb/apiv1/alloydbpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1/service.proto @@ -259,11 +259,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -274,7 +272,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +338,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -355,7 +351,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +403,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -422,7 +416,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +479,9 @@ type CreateSecondaryClusterRequest struct { func (x *CreateSecondaryClusterRequest) Reset() { *x = CreateSecondaryClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryClusterRequest) String() string { @@ -500,7 +492,7 @@ func (*CreateSecondaryClusterRequest) ProtoMessage() {} func (x *CreateSecondaryClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +577,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -600,7 +590,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +679,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -704,7 +692,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +779,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -806,7 +792,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +873,9 @@ type SwitchoverClusterRequest struct { func (x *SwitchoverClusterRequest) Reset() { *x = SwitchoverClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchoverClusterRequest) String() string { @@ -902,7 +886,7 @@ func (*SwitchoverClusterRequest) ProtoMessage() {} func (x *SwitchoverClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -973,11 +957,9 @@ type PromoteClusterRequest struct { func (x *PromoteClusterRequest) Reset() { *x = PromoteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteClusterRequest) String() string { @@ -988,7 +970,7 @@ func (*PromoteClusterRequest) ProtoMessage() {} func (x *PromoteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1057,9 @@ type RestoreClusterRequest struct { func (x *RestoreClusterRequest) Reset() { *x = RestoreClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreClusterRequest) String() string { @@ -1090,7 +1070,7 @@ func (*RestoreClusterRequest) ProtoMessage() {} func (x *RestoreClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1186,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1221,7 +1199,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1265,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1302,7 +1278,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1329,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1368,7 +1342,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1432,11 +1406,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1447,7 +1419,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1532,11 +1504,9 @@ type CreateSecondaryInstanceRequest struct { func (x *CreateSecondaryInstanceRequest) Reset() { *x = CreateSecondaryInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryInstanceRequest) String() string { @@ -1547,7 +1517,7 @@ func (*CreateSecondaryInstanceRequest) ProtoMessage() {} func (x *CreateSecondaryInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1580,9 @@ type CreateInstanceRequests struct { func (x *CreateInstanceRequests) Reset() { *x = CreateInstanceRequests{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequests) String() string { @@ -1625,7 +1593,7 @@ func (*CreateInstanceRequests) ProtoMessage() {} func (x *CreateInstanceRequests) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,11 +1643,9 @@ type BatchCreateInstancesRequest struct { func (x *BatchCreateInstancesRequest) Reset() { *x = BatchCreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesRequest) String() string { @@ -1690,7 +1656,7 @@ func (*BatchCreateInstancesRequest) ProtoMessage() {} func (x *BatchCreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1738,11 +1704,9 @@ type BatchCreateInstancesResponse struct { func (x *BatchCreateInstancesResponse) Reset() { *x = BatchCreateInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesResponse) String() string { @@ -1753,7 +1717,7 @@ func (*BatchCreateInstancesResponse) ProtoMessage() {} func (x *BatchCreateInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1798,11 +1762,9 @@ type BatchCreateInstancesMetadata struct { func (x *BatchCreateInstancesMetadata) Reset() { *x = BatchCreateInstancesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesMetadata) String() string { @@ -1813,7 +1775,7 @@ func (*BatchCreateInstancesMetadata) ProtoMessage() {} func (x *BatchCreateInstancesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1844,9 @@ type BatchCreateInstanceStatus struct { func (x *BatchCreateInstanceStatus) Reset() { *x = BatchCreateInstanceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstanceStatus) String() string { @@ -1897,7 +1857,7 @@ func (*BatchCreateInstanceStatus) ProtoMessage() {} func (x *BatchCreateInstanceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,11 +1939,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1994,7 +1952,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2079,11 +2037,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -2094,7 +2050,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2168,11 +2124,9 @@ type FailoverInstanceRequest struct { func (x *FailoverInstanceRequest) Reset() { *x = FailoverInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverInstanceRequest) String() string { @@ -2183,7 +2137,7 @@ func (*FailoverInstanceRequest) ProtoMessage() {} func (x *FailoverInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2252,11 +2206,9 @@ type InjectFaultRequest struct { func (x *InjectFaultRequest) Reset() { *x = InjectFaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectFaultRequest) String() string { @@ -2267,7 +2219,7 @@ func (*InjectFaultRequest) ProtoMessage() {} func (x *InjectFaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2343,11 +2295,9 @@ type RestartInstanceRequest struct { func (x *RestartInstanceRequest) Reset() { *x = RestartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestartInstanceRequest) String() string { @@ -2358,7 +2308,7 @@ func (*RestartInstanceRequest) ProtoMessage() {} func (x *RestartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2432,11 +2382,9 @@ type ExecuteSqlRequest struct { func (x *ExecuteSqlRequest) Reset() { *x = ExecuteSqlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlRequest) String() string { @@ -2447,7 +2395,7 @@ func (*ExecuteSqlRequest) ProtoMessage() {} func (x *ExecuteSqlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2530,11 +2478,9 @@ type ExecuteSqlResponse struct { func (x *ExecuteSqlResponse) Reset() { *x = ExecuteSqlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlResponse) String() string { @@ -2545,7 +2491,7 @@ func (*ExecuteSqlResponse) ProtoMessage() {} func (x *ExecuteSqlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2596,11 +2542,9 @@ type ExecuteSqlMetadata struct { func (x *ExecuteSqlMetadata) Reset() { *x = ExecuteSqlMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlMetadata) String() string { @@ -2611,7 +2555,7 @@ func (*ExecuteSqlMetadata) ProtoMessage() {} func (x *ExecuteSqlMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2675,11 +2619,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -2690,7 +2632,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2756,11 +2698,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -2771,7 +2711,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2819,11 +2759,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -2834,7 +2772,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,11 +2827,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -2904,7 +2840,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2992,11 +2928,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -3007,7 +2941,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3091,11 +3025,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3106,7 +3038,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3172,11 +3104,9 @@ type ListSupportedDatabaseFlagsRequest struct { func (x *ListSupportedDatabaseFlagsRequest) Reset() { *x = ListSupportedDatabaseFlagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsRequest) String() string { @@ -3187,7 +3117,7 @@ func (*ListSupportedDatabaseFlagsRequest) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3237,11 +3167,9 @@ type ListSupportedDatabaseFlagsResponse struct { func (x *ListSupportedDatabaseFlagsResponse) Reset() { *x = ListSupportedDatabaseFlagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsResponse) String() string { @@ -3252,7 +3180,7 @@ func (*ListSupportedDatabaseFlagsResponse) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3321,11 +3249,9 @@ type GenerateClientCertificateRequest struct { func (x *GenerateClientCertificateRequest) Reset() { *x = GenerateClientCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateRequest) String() string { @@ -3336,7 +3262,7 @@ func (*GenerateClientCertificateRequest) ProtoMessage() {} func (x *GenerateClientCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3401,11 +3327,9 @@ type GenerateClientCertificateResponse struct { func (x *GenerateClientCertificateResponse) Reset() { *x = GenerateClientCertificateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateResponse) String() string { @@ -3416,7 +3340,7 @@ func (*GenerateClientCertificateResponse) ProtoMessage() {} func (x *GenerateClientCertificateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3472,11 +3396,9 @@ type GetConnectionInfoRequest struct { func (x *GetConnectionInfoRequest) Reset() { *x = GetConnectionInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionInfoRequest) String() string { @@ -3487,7 +3409,7 @@ func (*GetConnectionInfoRequest) ProtoMessage() {} func (x *GetConnectionInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3550,11 +3472,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3565,7 +3485,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3675,11 +3595,9 @@ type ListUsersRequest struct { func (x *ListUsersRequest) Reset() { *x = ListUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersRequest) String() string { @@ -3690,7 +3608,7 @@ func (*ListUsersRequest) ProtoMessage() {} func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3756,11 +3674,9 @@ type ListUsersResponse struct { func (x *ListUsersResponse) Reset() { *x = ListUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersResponse) String() string { @@ -3771,7 +3687,7 @@ func (*ListUsersResponse) ProtoMessage() {} func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3820,11 +3736,9 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserRequest) String() string { @@ -3835,7 +3749,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3890,11 +3804,9 @@ type CreateUserRequest struct { func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserRequest) String() string { @@ -3905,7 +3817,7 @@ func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3992,11 +3904,9 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserRequest) String() string { @@ -4007,7 +3917,7 @@ func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4087,11 +3997,9 @@ type DeleteUserRequest struct { func (x *DeleteUserRequest) Reset() { *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserRequest) String() string { @@ -4102,7 +4010,7 @@ func (*DeleteUserRequest) ProtoMessage() {} func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4162,11 +4070,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -4177,7 +4083,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4235,11 +4141,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -4250,7 +4154,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5632,584 +5536,6 @@ func file_google_cloud_alloydb_v1_service_proto_init() { } file_google_cloud_alloydb_v1_data_model_proto_init() file_google_cloud_alloydb_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SwitchoverClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PromoteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RestoreClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstanceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FailoverInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*InjectFaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RestartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*GetUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1_service_proto_msgTypes[9].OneofWrappers = []any{ (*RestoreClusterRequest_BackupSource)(nil), (*RestoreClusterRequest_ContinuousBackupSource)(nil), diff --git a/alloydb/apiv1/helpers.go b/alloydb/apiv1/helpers.go index 6e25182530d7..df94a97ef621 100755 --- a/alloydb/apiv1/helpers.go +++ b/alloydb/apiv1/helpers.go @@ -18,10 +18,20 @@ package alloydb import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "alloydb.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/alloydb/apiv1alpha/alloydb_admin_client.go b/alloydb/apiv1alpha/alloydb_admin_client.go index 68ca7e6d00b1..e476f0b1adfc 100755 --- a/alloydb/apiv1alpha/alloydb_admin_client.go +++ b/alloydb/apiv1alpha/alloydb_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1001,6 +1000,8 @@ type alloyDBAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAlloyDBAdminClient creates a new alloydb admin client based on gRPC. @@ -1027,6 +1028,7 @@ func NewAlloyDBAdminClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, alloyDBAdminClient: alloydbpb.NewAlloyDBAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1091,6 +1093,8 @@ type alloyDBAdminRESTClient struct { // Points back to the CallOptions field of the containing AlloyDBAdminClient CallOptions **AlloyDBAdminCallOptions + + logger *slog.Logger } // NewAlloyDBAdminRESTClient creates a new alloydb admin rest client. @@ -1108,6 +1112,7 @@ func NewAlloyDBAdminRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1181,7 +1186,7 @@ func (c *alloyDBAdminGRPCClient) ListClusters(ctx context.Context, req *alloydbp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -1216,7 +1221,7 @@ func (c *alloyDBAdminGRPCClient) GetCluster(ctx context.Context, req *alloydbpb. var resp *alloydbpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *alloyDBAdminGRPCClient) CreateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -1254,7 +1259,7 @@ func (c *alloyDBAdminGRPCClient) UpdateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -1274,7 +1279,7 @@ func (c *alloyDBAdminGRPCClient) UpgradeCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpgradeCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpgradeCluster, req, settings.GRPC, c.logger, "UpgradeCluster") return err }, opts...) if err != nil { @@ -1294,7 +1299,7 @@ func (c *alloyDBAdminGRPCClient) DeleteCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -1314,7 +1319,7 @@ func (c *alloyDBAdminGRPCClient) PromoteCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.PromoteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.PromoteCluster, req, settings.GRPC, c.logger, "PromoteCluster") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *alloyDBAdminGRPCClient) SwitchoverCluster(ctx context.Context, req *all var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.SwitchoverCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.SwitchoverCluster, req, settings.GRPC, c.logger, "SwitchoverCluster") return err }, opts...) if err != nil { @@ -1354,7 +1359,7 @@ func (c *alloyDBAdminGRPCClient) RestoreCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestoreCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestoreCluster, req, settings.GRPC, c.logger, "RestoreCluster") return err }, opts...) if err != nil { @@ -1374,7 +1379,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryCluster(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryCluster, req, settings.GRPC, c.logger, "CreateSecondaryCluster") return err }, opts...) if err != nil { @@ -1405,7 +1410,7 @@ func (c *alloyDBAdminGRPCClient) ListInstances(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -1440,7 +1445,7 @@ func (c *alloyDBAdminGRPCClient) GetInstance(ctx context.Context, req *alloydbpb var resp *alloydbpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1458,7 +1463,7 @@ func (c *alloyDBAdminGRPCClient) CreateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -1478,7 +1483,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryInstance, req, settings.GRPC, c.logger, "CreateSecondaryInstance") return err }, opts...) if err != nil { @@ -1498,7 +1503,7 @@ func (c *alloyDBAdminGRPCClient) BatchCreateInstances(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.BatchCreateInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.BatchCreateInstances, req, settings.GRPC, c.logger, "BatchCreateInstances") return err }, opts...) if err != nil { @@ -1518,7 +1523,7 @@ func (c *alloyDBAdminGRPCClient) UpdateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -1538,7 +1543,7 @@ func (c *alloyDBAdminGRPCClient) DeleteInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -1558,7 +1563,7 @@ func (c *alloyDBAdminGRPCClient) FailoverInstance(ctx context.Context, req *allo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.FailoverInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.FailoverInstance, req, settings.GRPC, c.logger, "FailoverInstance") return err }, opts...) if err != nil { @@ -1578,7 +1583,7 @@ func (c *alloyDBAdminGRPCClient) InjectFault(ctx context.Context, req *alloydbpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.InjectFault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.InjectFault, req, settings.GRPC, c.logger, "InjectFault") return err }, opts...) if err != nil { @@ -1598,7 +1603,7 @@ func (c *alloyDBAdminGRPCClient) RestartInstance(ctx context.Context, req *alloy var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestartInstance, req, settings.GRPC, c.logger, "RestartInstance") return err }, opts...) if err != nil { @@ -1618,7 +1623,7 @@ func (c *alloyDBAdminGRPCClient) ExecuteSql(ctx context.Context, req *alloydbpb. var resp *alloydbpb.ExecuteSqlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ExecuteSql(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ExecuteSql, req, settings.GRPC, c.logger, "ExecuteSql") return err }, opts...) if err != nil { @@ -1647,7 +1652,7 @@ func (c *alloyDBAdminGRPCClient) ListBackups(ctx context.Context, req *alloydbpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1682,7 +1687,7 @@ func (c *alloyDBAdminGRPCClient) GetBackup(ctx context.Context, req *alloydbpb.G var resp *alloydbpb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1700,7 +1705,7 @@ func (c *alloyDBAdminGRPCClient) CreateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1720,7 +1725,7 @@ func (c *alloyDBAdminGRPCClient) UpdateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1740,7 +1745,7 @@ func (c *alloyDBAdminGRPCClient) DeleteBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1771,7 +1776,7 @@ func (c *alloyDBAdminGRPCClient) ListSupportedDatabaseFlags(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListSupportedDatabaseFlags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListSupportedDatabaseFlags, req, settings.GRPC, c.logger, "ListSupportedDatabaseFlags") return err }, opts...) if err != nil { @@ -1806,7 +1811,7 @@ func (c *alloyDBAdminGRPCClient) GenerateClientCertificate(ctx context.Context, var resp *alloydbpb.GenerateClientCertificateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GenerateClientCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GenerateClientCertificate, req, settings.GRPC, c.logger, "GenerateClientCertificate") return err }, opts...) if err != nil { @@ -1824,7 +1829,7 @@ func (c *alloyDBAdminGRPCClient) GetConnectionInfo(ctx context.Context, req *all var resp *alloydbpb.ConnectionInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetConnectionInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetConnectionInfo, req, settings.GRPC, c.logger, "GetConnectionInfo") return err }, opts...) if err != nil { @@ -1853,7 +1858,7 @@ func (c *alloyDBAdminGRPCClient) ListUsers(ctx context.Context, req *alloydbpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListUsers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListUsers, req, settings.GRPC, c.logger, "ListUsers") return err }, opts...) if err != nil { @@ -1888,7 +1893,7 @@ func (c *alloyDBAdminGRPCClient) GetUser(ctx context.Context, req *alloydbpb.Get var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetUser, req, settings.GRPC, c.logger, "GetUser") return err }, opts...) if err != nil { @@ -1906,7 +1911,7 @@ func (c *alloyDBAdminGRPCClient) CreateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateUser, req, settings.GRPC, c.logger, "CreateUser") return err }, opts...) if err != nil { @@ -1924,7 +1929,7 @@ func (c *alloyDBAdminGRPCClient) UpdateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateUser, req, settings.GRPC, c.logger, "UpdateUser") return err }, opts...) if err != nil { @@ -1941,7 +1946,7 @@ func (c *alloyDBAdminGRPCClient) DeleteUser(ctx context.Context, req *alloydbpb. opts = append((*c.CallOptions).DeleteUser[0:len((*c.CallOptions).DeleteUser):len((*c.CallOptions).DeleteUser)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.alloyDBAdminClient.DeleteUser(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteUser, req, settings.GRPC, c.logger, "DeleteUser") return err }, opts...) return err @@ -1967,7 +1972,7 @@ func (c *alloyDBAdminGRPCClient) ListDatabases(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -2002,7 +2007,7 @@ func (c *alloyDBAdminGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2031,7 +2036,7 @@ func (c *alloyDBAdminGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2065,7 +2070,7 @@ func (c *alloyDBAdminGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2079,7 +2084,7 @@ func (c *alloyDBAdminGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2094,7 +2099,7 @@ func (c *alloyDBAdminGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2123,7 +2128,7 @@ func (c *alloyDBAdminGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2200,21 +2205,10 @@ func (c *alloyDBAdminRESTClient) ListClusters(ctx context.Context, req *alloydbp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2280,17 +2274,7 @@ func (c *alloyDBAdminRESTClient) GetCluster(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -2353,21 +2337,10 @@ func (c *alloyDBAdminRESTClient) CreateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2440,21 +2413,10 @@ func (c *alloyDBAdminRESTClient) UpdateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2511,21 +2473,10 @@ func (c *alloyDBAdminRESTClient) UpgradeCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2587,21 +2538,10 @@ func (c *alloyDBAdminRESTClient) DeleteCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2660,21 +2600,10 @@ func (c *alloyDBAdminRESTClient) PromoteCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PromoteCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2732,21 +2661,10 @@ func (c *alloyDBAdminRESTClient) SwitchoverCluster(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SwitchoverCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2804,21 +2722,10 @@ func (c *alloyDBAdminRESTClient) RestoreCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2883,21 +2790,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryCluster(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2966,21 +2862,10 @@ func (c *alloyDBAdminRESTClient) ListInstances(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3046,17 +2931,7 @@ func (c *alloyDBAdminRESTClient) GetInstance(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -3119,21 +2994,10 @@ func (c *alloyDBAdminRESTClient) CreateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3197,21 +3061,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3280,21 +3133,10 @@ func (c *alloyDBAdminRESTClient) BatchCreateInstances(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3367,21 +3209,10 @@ func (c *alloyDBAdminRESTClient) UpdateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3440,21 +3271,10 @@ func (c *alloyDBAdminRESTClient) DeleteInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3512,21 +3332,10 @@ func (c *alloyDBAdminRESTClient) FailoverInstance(ctx context.Context, req *allo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3583,21 +3392,10 @@ func (c *alloyDBAdminRESTClient) InjectFault(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InjectFault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3654,21 +3452,10 @@ func (c *alloyDBAdminRESTClient) RestartInstance(ctx context.Context, req *alloy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestartInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3725,17 +3512,7 @@ func (c *alloyDBAdminRESTClient) ExecuteSql(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteSql") if err != nil { return err } @@ -3803,21 +3580,10 @@ func (c *alloyDBAdminRESTClient) ListBackups(ctx context.Context, req *alloydbpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3880,17 +3646,7 @@ func (c *alloyDBAdminRESTClient) GetBackup(ctx context.Context, req *alloydbpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -3953,21 +3709,10 @@ func (c *alloyDBAdminRESTClient) CreateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4040,21 +3785,10 @@ func (c *alloyDBAdminRESTClient) UpdateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4113,21 +3847,10 @@ func (c *alloyDBAdminRESTClient) DeleteBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4190,21 +3913,10 @@ func (c *alloyDBAdminRESTClient) ListSupportedDatabaseFlags(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSupportedDatabaseFlags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4277,17 +3989,7 @@ func (c *alloyDBAdminRESTClient) GenerateClientCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateClientCertificate") if err != nil { return err } @@ -4340,17 +4042,7 @@ func (c *alloyDBAdminRESTClient) GetConnectionInfo(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectionInfo") if err != nil { return err } @@ -4418,21 +4110,10 @@ func (c *alloyDBAdminRESTClient) ListUsers(ctx context.Context, req *alloydbpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4495,17 +4176,7 @@ func (c *alloyDBAdminRESTClient) GetUser(ctx context.Context, req *alloydbpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUser") if err != nil { return err } @@ -4569,17 +4240,7 @@ func (c *alloyDBAdminRESTClient) CreateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUser") if err != nil { return err } @@ -4652,17 +4313,7 @@ func (c *alloyDBAdminRESTClient) UpdateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUser") if err != nil { return err } @@ -4715,15 +4366,8 @@ func (c *alloyDBAdminRESTClient) DeleteUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUser") + return err }, opts...) } @@ -4775,21 +4419,10 @@ func (c *alloyDBAdminRESTClient) ListDatabases(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4852,17 +4485,7 @@ func (c *alloyDBAdminRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4927,21 +4550,10 @@ func (c *alloyDBAdminRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5007,15 +4619,8 @@ func (c *alloyDBAdminRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -5049,15 +4654,8 @@ func (c *alloyDBAdminRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -5094,17 +4692,7 @@ func (c *alloyDBAdminRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5169,21 +4757,10 @@ func (c *alloyDBAdminRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/alloydb/apiv1alpha/alloydb_admin_client_example_go123_test.go b/alloydb/apiv1alpha/alloydb_admin_client_example_go123_test.go index 3b4adee352d3..b94044e9466a 100644 --- a/alloydb/apiv1alpha/alloydb_admin_client_example_go123_test.go +++ b/alloydb/apiv1alpha/alloydb_admin_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAlloyDBAdminClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAlloyDBAdminClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAlloyDBAdminClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleAlloyDBAdminClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleAlloyDBAdminClient_ListSupportedDatabaseFlags_all() { } for resp, err := range c.ListSupportedDatabaseFlags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleAlloyDBAdminClient_ListUsers_all() { } for resp, err := range c.ListUsers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleAlloyDBAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleAlloyDBAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/alloydb/apiv1alpha/alloydbpb/csql_resources.pb.go b/alloydb/apiv1alpha/alloydbpb/csql_resources.pb.go index f986a80b96ba..1517d2252843 100755 --- a/alloydb/apiv1alpha/alloydbpb/csql_resources.pb.go +++ b/alloydb/apiv1alpha/alloydbpb/csql_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1alpha/csql_resources.proto @@ -53,11 +53,9 @@ type CloudSQLBackupRunSource struct { func (x *CloudSQLBackupRunSource) Reset() { *x = CloudSQLBackupRunSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_csql_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_csql_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSQLBackupRunSource) String() string { @@ -68,7 +66,7 @@ func (*CloudSQLBackupRunSource) ProtoMessage() {} func (x *CloudSQLBackupRunSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_csql_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,20 +166,6 @@ func file_google_cloud_alloydb_v1alpha_csql_resources_proto_init() { if File_google_cloud_alloydb_v1alpha_csql_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1alpha_csql_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudSQLBackupRunSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/apiv1alpha/alloydbpb/data_model.pb.go b/alloydb/apiv1alpha/alloydbpb/data_model.pb.go index c585ed8bf4cb..24650bedf4f3 100755 --- a/alloydb/apiv1alpha/alloydbpb/data_model.pb.go +++ b/alloydb/apiv1alpha/alloydbpb/data_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1alpha/data_model.proto @@ -50,11 +50,9 @@ type SqlResult struct { func (x *SqlResult) Reset() { *x = SqlResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResult) String() string { @@ -65,7 +63,7 @@ func (*SqlResult) ProtoMessage() {} func (x *SqlResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type SqlResultColumn struct { func (x *SqlResultColumn) Reset() { *x = SqlResultColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultColumn) String() string { @@ -125,7 +121,7 @@ func (*SqlResultColumn) ProtoMessage() {} func (x *SqlResultColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +162,9 @@ type SqlResultRow struct { func (x *SqlResultRow) Reset() { *x = SqlResultRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultRow) String() string { @@ -181,7 +175,7 @@ func (*SqlResultRow) ProtoMessage() {} func (x *SqlResultRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +212,9 @@ type SqlResultValue struct { func (x *SqlResultValue) Reset() { *x = SqlResultValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultValue) String() string { @@ -233,7 +225,7 @@ func (*SqlResultValue) ProtoMessage() {} func (x *SqlResultValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,56 +338,6 @@ func file_google_cloud_alloydb_v1alpha_data_model_proto_init() { if File_google_cloud_alloydb_v1alpha_data_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SqlResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1alpha_data_model_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/alloydb/apiv1alpha/alloydbpb/gemini.pb.go b/alloydb/apiv1alpha/alloydbpb/gemini.pb.go index 16dbd3b92925..0dde77635157 100755 --- a/alloydb/apiv1alpha/alloydbpb/gemini.pb.go +++ b/alloydb/apiv1alpha/alloydbpb/gemini.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1alpha/gemini.proto @@ -52,11 +52,9 @@ type GeminiClusterConfig struct { func (x *GeminiClusterConfig) Reset() { *x = GeminiClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeminiClusterConfig) String() string { @@ -67,7 +65,7 @@ func (*GeminiClusterConfig) ProtoMessage() {} func (x *GeminiClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type GeminiInstanceConfig struct { func (x *GeminiInstanceConfig) Reset() { *x = GeminiInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeminiInstanceConfig) String() string { @@ -120,7 +116,7 @@ func (*GeminiInstanceConfig) ProtoMessage() {} func (x *GeminiInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,32 +201,6 @@ func file_google_cloud_alloydb_v1alpha_gemini_proto_init() { if File_google_cloud_alloydb_v1alpha_gemini_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GeminiClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_gemini_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GeminiInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/apiv1alpha/alloydbpb/resources.pb.go b/alloydb/apiv1alpha/alloydbpb/resources.pb.go index 3d58500ac03a..5c48df38aa8b 100755 --- a/alloydb/apiv1alpha/alloydbpb/resources.pb.go +++ b/alloydb/apiv1alpha/alloydbpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1alpha/resources.proto @@ -1157,11 +1157,9 @@ type UserPassword struct { func (x *UserPassword) Reset() { *x = UserPassword{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserPassword) String() string { @@ -1172,7 +1170,7 @@ func (*UserPassword) ProtoMessage() {} func (x *UserPassword) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1220,11 +1218,9 @@ type MigrationSource struct { func (x *MigrationSource) Reset() { *x = MigrationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationSource) String() string { @@ -1235,7 +1231,7 @@ func (*MigrationSource) ProtoMessage() {} func (x *MigrationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1282,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1301,7 +1295,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1332,9 @@ type EncryptionInfo struct { func (x *EncryptionInfo) Reset() { *x = EncryptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionInfo) String() string { @@ -1353,7 +1345,7 @@ func (*EncryptionInfo) ProtoMessage() {} func (x *EncryptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1389,9 @@ type SslConfig struct { func (x *SslConfig) Reset() { *x = SslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslConfig) String() string { @@ -1412,7 +1402,7 @@ func (*SslConfig) ProtoMessage() {} func (x *SslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1493,9 @@ type AutomatedBackupPolicy struct { func (x *AutomatedBackupPolicy) Reset() { *x = AutomatedBackupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy) String() string { @@ -1518,7 +1506,7 @@ func (*AutomatedBackupPolicy) ProtoMessage() {} func (x *AutomatedBackupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1654,11 +1642,9 @@ type ContinuousBackupConfig struct { func (x *ContinuousBackupConfig) Reset() { *x = ContinuousBackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupConfig) String() string { @@ -1669,7 +1655,7 @@ func (*ContinuousBackupConfig) ProtoMessage() {} func (x *ContinuousBackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,11 +1714,9 @@ type ContinuousBackupInfo struct { func (x *ContinuousBackupInfo) Reset() { *x = ContinuousBackupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupInfo) String() string { @@ -1743,7 +1727,7 @@ func (*ContinuousBackupInfo) ProtoMessage() {} func (x *ContinuousBackupInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1803,11 +1787,9 @@ type BackupSource struct { func (x *BackupSource) Reset() { *x = BackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupSource) String() string { @@ -1818,7 +1800,7 @@ func (*BackupSource) ProtoMessage() {} func (x *BackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1845,9 @@ type ContinuousBackupSource struct { func (x *ContinuousBackupSource) Reset() { *x = ContinuousBackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupSource) String() string { @@ -1878,7 +1858,7 @@ func (*ContinuousBackupSource) ProtoMessage() {} func (x *ContinuousBackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1899,9 @@ type MaintenanceUpdatePolicy struct { func (x *MaintenanceUpdatePolicy) Reset() { *x = MaintenanceUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy) String() string { @@ -1934,7 +1912,7 @@ func (*MaintenanceUpdatePolicy) ProtoMessage() {} func (x *MaintenanceUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,11 +1950,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -1987,7 +1963,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2142,11 +2118,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -2157,7 +2131,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2581,11 +2555,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -2596,7 +2568,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2860,11 +2832,9 @@ type ConnectionInfo struct { func (x *ConnectionInfo) Reset() { *x = ConnectionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionInfo) String() string { @@ -2875,7 +2845,7 @@ func (*ConnectionInfo) ProtoMessage() {} func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3022,11 +2992,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -3037,7 +3005,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3260,11 +3228,9 @@ type SupportedDatabaseFlag struct { func (x *SupportedDatabaseFlag) Reset() { *x = SupportedDatabaseFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag) String() string { @@ -3275,7 +3241,7 @@ func (*SupportedDatabaseFlag) ProtoMessage() {} func (x *SupportedDatabaseFlag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3394,11 +3360,9 @@ type User struct { func (x *User) Reset() { *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *User) String() string { @@ -3409,7 +3373,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3480,11 +3444,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -3495,7 +3457,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3558,11 +3520,9 @@ type AutomatedBackupPolicy_WeeklySchedule struct { func (x *AutomatedBackupPolicy_WeeklySchedule) Reset() { *x = AutomatedBackupPolicy_WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_WeeklySchedule) String() string { @@ -3573,7 +3533,7 @@ func (*AutomatedBackupPolicy_WeeklySchedule) ProtoMessage() {} func (x *AutomatedBackupPolicy_WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3615,11 +3575,9 @@ type AutomatedBackupPolicy_TimeBasedRetention struct { func (x *AutomatedBackupPolicy_TimeBasedRetention) Reset() { *x = AutomatedBackupPolicy_TimeBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_TimeBasedRetention) String() string { @@ -3630,7 +3588,7 @@ func (*AutomatedBackupPolicy_TimeBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_TimeBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3665,11 +3623,9 @@ type AutomatedBackupPolicy_QuantityBasedRetention struct { func (x *AutomatedBackupPolicy_QuantityBasedRetention) Reset() { *x = AutomatedBackupPolicy_QuantityBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_QuantityBasedRetention) String() string { @@ -3680,7 +3636,7 @@ func (*AutomatedBackupPolicy_QuantityBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_QuantityBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3717,11 +3673,9 @@ type MaintenanceUpdatePolicy_MaintenanceWindow struct { func (x *MaintenanceUpdatePolicy_MaintenanceWindow) Reset() { *x = MaintenanceUpdatePolicy_MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy_MaintenanceWindow) String() string { @@ -3732,7 +3686,7 @@ func (*MaintenanceUpdatePolicy_MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceUpdatePolicy_MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3786,11 +3740,9 @@ type Cluster_NetworkConfig struct { func (x *Cluster_NetworkConfig) Reset() { *x = Cluster_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_NetworkConfig) String() string { @@ -3801,7 +3753,7 @@ func (*Cluster_NetworkConfig) ProtoMessage() {} func (x *Cluster_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3844,11 +3796,9 @@ type Cluster_SecondaryConfig struct { func (x *Cluster_SecondaryConfig) Reset() { *x = Cluster_SecondaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SecondaryConfig) String() string { @@ -3859,7 +3809,7 @@ func (*Cluster_SecondaryConfig) ProtoMessage() {} func (x *Cluster_SecondaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3896,11 +3846,9 @@ type Cluster_PrimaryConfig struct { func (x *Cluster_PrimaryConfig) Reset() { *x = Cluster_PrimaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PrimaryConfig) String() string { @@ -3911,7 +3859,7 @@ func (*Cluster_PrimaryConfig) ProtoMessage() {} func (x *Cluster_PrimaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3949,11 +3897,9 @@ type Cluster_PscConfig struct { func (x *Cluster_PscConfig) Reset() { *x = Cluster_PscConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PscConfig) String() string { @@ -3964,7 +3910,7 @@ func (*Cluster_PscConfig) ProtoMessage() {} func (x *Cluster_PscConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4011,11 +3957,9 @@ type Cluster_TrialMetadata struct { func (x *Cluster_TrialMetadata) Reset() { *x = Cluster_TrialMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_TrialMetadata) String() string { @@ -4026,7 +3970,7 @@ func (*Cluster_TrialMetadata) ProtoMessage() {} func (x *Cluster_TrialMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4081,11 +4025,9 @@ type Instance_MachineConfig struct { func (x *Instance_MachineConfig) Reset() { *x = Instance_MachineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_MachineConfig) String() string { @@ -4096,7 +4038,7 @@ func (*Instance_MachineConfig) ProtoMessage() {} func (x *Instance_MachineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4141,11 +4083,9 @@ type Instance_Node struct { func (x *Instance_Node) Reset() { *x = Instance_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Node) String() string { @@ -4156,7 +4096,7 @@ func (*Instance_Node) ProtoMessage() {} func (x *Instance_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4222,11 +4162,9 @@ type Instance_QueryInsightsInstanceConfig struct { func (x *Instance_QueryInsightsInstanceConfig) Reset() { *x = Instance_QueryInsightsInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_QueryInsightsInstanceConfig) String() string { @@ -4237,7 +4175,7 @@ func (*Instance_QueryInsightsInstanceConfig) ProtoMessage() {} func (x *Instance_QueryInsightsInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4320,11 +4258,9 @@ type Instance_ObservabilityInstanceConfig struct { func (x *Instance_ObservabilityInstanceConfig) Reset() { *x = Instance_ObservabilityInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ObservabilityInstanceConfig) String() string { @@ -4335,7 +4271,7 @@ func (*Instance_ObservabilityInstanceConfig) ProtoMessage() {} func (x *Instance_ObservabilityInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4425,11 +4361,9 @@ type Instance_ReadPoolConfig struct { func (x *Instance_ReadPoolConfig) Reset() { *x = Instance_ReadPoolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ReadPoolConfig) String() string { @@ -4440,7 +4374,7 @@ func (*Instance_ReadPoolConfig) ProtoMessage() {} func (x *Instance_ReadPoolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4474,11 +4408,9 @@ type Instance_UpdatePolicy struct { func (x *Instance_UpdatePolicy) Reset() { *x = Instance_UpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_UpdatePolicy) String() string { @@ -4489,7 +4421,7 @@ func (*Instance_UpdatePolicy) ProtoMessage() {} func (x *Instance_UpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4526,11 +4458,9 @@ type Instance_ClientConnectionConfig struct { func (x *Instance_ClientConnectionConfig) Reset() { *x = Instance_ClientConnectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ClientConnectionConfig) String() string { @@ -4541,7 +4471,7 @@ func (*Instance_ClientConnectionConfig) ProtoMessage() {} func (x *Instance_ClientConnectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4586,11 +4516,9 @@ type Instance_PscInterfaceConfig struct { func (x *Instance_PscInterfaceConfig) Reset() { *x = Instance_PscInterfaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_PscInterfaceConfig) String() string { @@ -4601,7 +4529,7 @@ func (*Instance_PscInterfaceConfig) ProtoMessage() {} func (x *Instance_PscInterfaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4650,11 +4578,9 @@ type Instance_PscInstanceConfig struct { func (x *Instance_PscInstanceConfig) Reset() { *x = Instance_PscInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_PscInstanceConfig) String() string { @@ -4665,7 +4591,7 @@ func (*Instance_PscInstanceConfig) ProtoMessage() {} func (x *Instance_PscInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4725,11 +4651,9 @@ type Instance_InstanceNetworkConfig struct { func (x *Instance_InstanceNetworkConfig) Reset() { *x = Instance_InstanceNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig) String() string { @@ -4740,7 +4664,7 @@ func (*Instance_InstanceNetworkConfig) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4788,11 +4712,9 @@ type Instance_InstanceNetworkConfig_AuthorizedNetwork struct { func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) Reset() { *x = Instance_InstanceNetworkConfig_AuthorizedNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) String() string { @@ -4803,7 +4725,7 @@ func (*Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4853,11 +4775,9 @@ type Backup_QuantityBasedExpiry struct { func (x *Backup_QuantityBasedExpiry) Reset() { *x = Backup_QuantityBasedExpiry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_QuantityBasedExpiry) String() string { @@ -4868,7 +4788,7 @@ func (*Backup_QuantityBasedExpiry) ProtoMessage() {} func (x *Backup_QuantityBasedExpiry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4910,11 +4830,9 @@ type SupportedDatabaseFlag_StringRestrictions struct { func (x *SupportedDatabaseFlag_StringRestrictions) Reset() { *x = SupportedDatabaseFlag_StringRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_StringRestrictions) String() string { @@ -4925,7 +4843,7 @@ func (*SupportedDatabaseFlag_StringRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_StringRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4961,11 +4879,9 @@ type SupportedDatabaseFlag_IntegerRestrictions struct { func (x *SupportedDatabaseFlag_IntegerRestrictions) Reset() { *x = SupportedDatabaseFlag_IntegerRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_IntegerRestrictions) String() string { @@ -4976,7 +4892,7 @@ func (*SupportedDatabaseFlag_IntegerRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_IntegerRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6356,512 +6272,6 @@ func file_google_cloud_alloydb_v1alpha_resources_proto_init() { } file_google_cloud_alloydb_v1alpha_csql_resources_proto_init() file_google_cloud_alloydb_v1alpha_gemini_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserPassword); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_TimeBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_QuantityBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy_MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SecondaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PrimaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PscConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_TrialMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Instance_MachineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Instance_QueryInsightsInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ObservabilityInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ReadPoolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Instance_UpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ClientConnectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Instance_PscInterfaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Instance_PscInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig_AuthorizedNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Backup_QuantityBasedExpiry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_StringRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_IntegerRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1alpha_resources_proto_msgTypes[5].OneofWrappers = []any{ (*AutomatedBackupPolicy_WeeklySchedule_)(nil), (*AutomatedBackupPolicy_TimeBasedRetention_)(nil), diff --git a/alloydb/apiv1alpha/alloydbpb/service.pb.go b/alloydb/apiv1alpha/alloydbpb/service.pb.go index 4b99f04c246a..fb4a9db4a1de 100755 --- a/alloydb/apiv1alpha/alloydbpb/service.pb.go +++ b/alloydb/apiv1alpha/alloydbpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1alpha/service.proto @@ -465,11 +465,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -480,7 +478,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +544,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -561,7 +557,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +609,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -628,7 +622,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +685,9 @@ type CreateSecondaryClusterRequest struct { func (x *CreateSecondaryClusterRequest) Reset() { *x = CreateSecondaryClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryClusterRequest) String() string { @@ -706,7 +698,7 @@ func (*CreateSecondaryClusterRequest) ProtoMessage() {} func (x *CreateSecondaryClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +783,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -806,7 +796,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +885,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -910,7 +898,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +984,9 @@ type UpgradeClusterRequest struct { func (x *UpgradeClusterRequest) Reset() { *x = UpgradeClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterRequest) String() string { @@ -1011,7 +997,7 @@ func (*UpgradeClusterRequest) ProtoMessage() {} func (x *UpgradeClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1065,9 @@ type UpgradeClusterResponse struct { func (x *UpgradeClusterResponse) Reset() { *x = UpgradeClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse) String() string { @@ -1094,7 +1078,7 @@ func (*UpgradeClusterResponse) ProtoMessage() {} func (x *UpgradeClusterResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1151,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -1182,7 +1164,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1245,9 @@ type SwitchoverClusterRequest struct { func (x *SwitchoverClusterRequest) Reset() { *x = SwitchoverClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchoverClusterRequest) String() string { @@ -1278,7 +1258,7 @@ func (*SwitchoverClusterRequest) ProtoMessage() {} func (x *SwitchoverClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1329,9 @@ type PromoteClusterRequest struct { func (x *PromoteClusterRequest) Reset() { *x = PromoteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteClusterRequest) String() string { @@ -1364,7 +1342,7 @@ func (*PromoteClusterRequest) ProtoMessage() {} func (x *PromoteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1429,9 @@ type RestoreClusterRequest struct { func (x *RestoreClusterRequest) Reset() { *x = RestoreClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreClusterRequest) String() string { @@ -1466,7 +1442,7 @@ func (*RestoreClusterRequest) ProtoMessage() {} func (x *RestoreClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1558,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1597,7 +1571,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1637,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1678,7 +1650,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1729,11 +1701,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1744,7 +1714,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1778,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1823,7 +1791,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1876,9 @@ type CreateSecondaryInstanceRequest struct { func (x *CreateSecondaryInstanceRequest) Reset() { *x = CreateSecondaryInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryInstanceRequest) String() string { @@ -1923,7 +1889,7 @@ func (*CreateSecondaryInstanceRequest) ProtoMessage() {} func (x *CreateSecondaryInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1952,9 @@ type CreateInstanceRequests struct { func (x *CreateInstanceRequests) Reset() { *x = CreateInstanceRequests{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequests) String() string { @@ -2001,7 +1965,7 @@ func (*CreateInstanceRequests) ProtoMessage() {} func (x *CreateInstanceRequests) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2051,11 +2015,9 @@ type BatchCreateInstancesRequest struct { func (x *BatchCreateInstancesRequest) Reset() { *x = BatchCreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesRequest) String() string { @@ -2066,7 +2028,7 @@ func (*BatchCreateInstancesRequest) ProtoMessage() {} func (x *BatchCreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2114,11 +2076,9 @@ type BatchCreateInstancesResponse struct { func (x *BatchCreateInstancesResponse) Reset() { *x = BatchCreateInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesResponse) String() string { @@ -2129,7 +2089,7 @@ func (*BatchCreateInstancesResponse) ProtoMessage() {} func (x *BatchCreateInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2174,11 +2134,9 @@ type BatchCreateInstancesMetadata struct { func (x *BatchCreateInstancesMetadata) Reset() { *x = BatchCreateInstancesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesMetadata) String() string { @@ -2189,7 +2147,7 @@ func (*BatchCreateInstancesMetadata) ProtoMessage() {} func (x *BatchCreateInstancesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2258,11 +2216,9 @@ type BatchCreateInstanceStatus struct { func (x *BatchCreateInstanceStatus) Reset() { *x = BatchCreateInstanceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstanceStatus) String() string { @@ -2273,7 +2229,7 @@ func (*BatchCreateInstanceStatus) ProtoMessage() {} func (x *BatchCreateInstanceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2355,11 +2311,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -2370,7 +2324,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2409,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -2470,7 +2422,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2544,11 +2496,9 @@ type FailoverInstanceRequest struct { func (x *FailoverInstanceRequest) Reset() { *x = FailoverInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverInstanceRequest) String() string { @@ -2559,7 +2509,7 @@ func (*FailoverInstanceRequest) ProtoMessage() {} func (x *FailoverInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2628,11 +2578,9 @@ type InjectFaultRequest struct { func (x *InjectFaultRequest) Reset() { *x = InjectFaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectFaultRequest) String() string { @@ -2643,7 +2591,7 @@ func (*InjectFaultRequest) ProtoMessage() {} func (x *InjectFaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2719,11 +2667,9 @@ type RestartInstanceRequest struct { func (x *RestartInstanceRequest) Reset() { *x = RestartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestartInstanceRequest) String() string { @@ -2734,7 +2680,7 @@ func (*RestartInstanceRequest) ProtoMessage() {} func (x *RestartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,11 +2754,9 @@ type ExecuteSqlRequest struct { func (x *ExecuteSqlRequest) Reset() { *x = ExecuteSqlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlRequest) String() string { @@ -2823,7 +2767,7 @@ func (*ExecuteSqlRequest) ProtoMessage() {} func (x *ExecuteSqlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2906,11 +2850,9 @@ type ExecuteSqlResponse struct { func (x *ExecuteSqlResponse) Reset() { *x = ExecuteSqlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlResponse) String() string { @@ -2921,7 +2863,7 @@ func (*ExecuteSqlResponse) ProtoMessage() {} func (x *ExecuteSqlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2972,11 +2914,9 @@ type ExecuteSqlMetadata struct { func (x *ExecuteSqlMetadata) Reset() { *x = ExecuteSqlMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlMetadata) String() string { @@ -2987,7 +2927,7 @@ func (*ExecuteSqlMetadata) ProtoMessage() {} func (x *ExecuteSqlMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3051,11 +2991,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3066,7 +3004,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3132,11 +3070,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3147,7 +3083,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3195,11 +3131,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3210,7 +3144,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3265,11 +3199,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -3280,7 +3212,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3368,11 +3300,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -3383,7 +3313,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3467,11 +3397,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3482,7 +3410,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3548,11 +3476,9 @@ type ListSupportedDatabaseFlagsRequest struct { func (x *ListSupportedDatabaseFlagsRequest) Reset() { *x = ListSupportedDatabaseFlagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsRequest) String() string { @@ -3563,7 +3489,7 @@ func (*ListSupportedDatabaseFlagsRequest) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3613,11 +3539,9 @@ type ListSupportedDatabaseFlagsResponse struct { func (x *ListSupportedDatabaseFlagsResponse) Reset() { *x = ListSupportedDatabaseFlagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsResponse) String() string { @@ -3628,7 +3552,7 @@ func (*ListSupportedDatabaseFlagsResponse) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3702,11 +3626,9 @@ type GenerateClientCertificateRequest struct { func (x *GenerateClientCertificateRequest) Reset() { *x = GenerateClientCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateRequest) String() string { @@ -3717,7 +3639,7 @@ func (*GenerateClientCertificateRequest) ProtoMessage() {} func (x *GenerateClientCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3794,11 +3716,9 @@ type GenerateClientCertificateResponse struct { func (x *GenerateClientCertificateResponse) Reset() { *x = GenerateClientCertificateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateResponse) String() string { @@ -3809,7 +3729,7 @@ func (*GenerateClientCertificateResponse) ProtoMessage() {} func (x *GenerateClientCertificateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3873,11 +3793,9 @@ type GetConnectionInfoRequest struct { func (x *GetConnectionInfoRequest) Reset() { *x = GetConnectionInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionInfoRequest) String() string { @@ -3888,7 +3806,7 @@ func (*GetConnectionInfoRequest) ProtoMessage() {} func (x *GetConnectionInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3953,11 +3871,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3968,7 +3884,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4105,11 +4021,9 @@ type PromoteClusterStatus struct { func (x *PromoteClusterStatus) Reset() { *x = PromoteClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteClusterStatus) String() string { @@ -4120,7 +4034,7 @@ func (*PromoteClusterStatus) ProtoMessage() {} func (x *PromoteClusterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4162,11 +4076,9 @@ type UpgradeClusterStatus struct { func (x *UpgradeClusterStatus) Reset() { *x = UpgradeClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus) String() string { @@ -4177,7 +4089,7 @@ func (*UpgradeClusterStatus) ProtoMessage() {} func (x *UpgradeClusterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4248,11 +4160,9 @@ type ListUsersRequest struct { func (x *ListUsersRequest) Reset() { *x = ListUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersRequest) String() string { @@ -4263,7 +4173,7 @@ func (*ListUsersRequest) ProtoMessage() {} func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4329,11 +4239,9 @@ type ListUsersResponse struct { func (x *ListUsersResponse) Reset() { *x = ListUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersResponse) String() string { @@ -4344,7 +4252,7 @@ func (*ListUsersResponse) ProtoMessage() {} func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4393,11 +4301,9 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserRequest) String() string { @@ -4408,7 +4314,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4463,11 +4369,9 @@ type CreateUserRequest struct { func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserRequest) String() string { @@ -4478,7 +4382,7 @@ func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4565,11 +4469,9 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserRequest) String() string { @@ -4580,7 +4482,7 @@ func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4660,11 +4562,9 @@ type DeleteUserRequest struct { func (x *DeleteUserRequest) Reset() { *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserRequest) String() string { @@ -4675,7 +4575,7 @@ func (*DeleteUserRequest) ProtoMessage() {} func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4735,11 +4635,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -4750,7 +4648,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4808,11 +4706,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -4823,7 +4719,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4870,11 +4766,9 @@ type UpgradeClusterResponse_StageInfo struct { func (x *UpgradeClusterResponse_StageInfo) Reset() { *x = UpgradeClusterResponse_StageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_StageInfo) String() string { @@ -4885,7 +4779,7 @@ func (*UpgradeClusterResponse_StageInfo) ProtoMessage() {} func (x *UpgradeClusterResponse_StageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4937,11 +4831,9 @@ type UpgradeClusterResponse_InstanceUpgradeDetails struct { func (x *UpgradeClusterResponse_InstanceUpgradeDetails) Reset() { *x = UpgradeClusterResponse_InstanceUpgradeDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_InstanceUpgradeDetails) String() string { @@ -4952,7 +4844,7 @@ func (*UpgradeClusterResponse_InstanceUpgradeDetails) ProtoMessage() {} func (x *UpgradeClusterResponse_InstanceUpgradeDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5012,11 +4904,9 @@ type UpgradeClusterResponse_ClusterUpgradeDetails struct { func (x *UpgradeClusterResponse_ClusterUpgradeDetails) Reset() { *x = UpgradeClusterResponse_ClusterUpgradeDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_ClusterUpgradeDetails) String() string { @@ -5027,7 +4917,7 @@ func (*UpgradeClusterResponse_ClusterUpgradeDetails) ProtoMessage() {} func (x *UpgradeClusterResponse_ClusterUpgradeDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5104,11 +4994,9 @@ type UpgradeClusterStatus_StageStatus struct { func (x *UpgradeClusterStatus_StageStatus) Reset() { *x = UpgradeClusterStatus_StageStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_StageStatus) String() string { @@ -5119,7 +5007,7 @@ func (*UpgradeClusterStatus_StageStatus) ProtoMessage() {} func (x *UpgradeClusterStatus_StageStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5186,11 +5074,9 @@ type UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus struct { func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) Reset() { *x = UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) String() string { @@ -5201,7 +5087,7 @@ func (*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) ProtoMessage() func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5241,11 +5127,9 @@ type UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats struct { func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) Reset() { *x = UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) String() string { @@ -5256,7 +5140,7 @@ func (*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) ProtoMess func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6965,704 +6849,6 @@ func file_google_cloud_alloydb_v1alpha_service_proto_init() { } file_google_cloud_alloydb_v1alpha_data_model_proto_init() file_google_cloud_alloydb_v1alpha_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SwitchoverClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PromoteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RestoreClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstanceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FailoverInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*InjectFaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RestartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*PromoteClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*GetUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_StageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_InstanceUpgradeDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_ClusterUpgradeDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_StageStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1alpha_service_proto_msgTypes[11].OneofWrappers = []any{ (*RestoreClusterRequest_BackupSource)(nil), (*RestoreClusterRequest_ContinuousBackupSource)(nil), diff --git a/alloydb/apiv1alpha/helpers.go b/alloydb/apiv1alpha/helpers.go index 6e25182530d7..df94a97ef621 100755 --- a/alloydb/apiv1alpha/helpers.go +++ b/alloydb/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package alloydb import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "alloydb.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/alloydb/apiv1beta/alloydb_admin_client.go b/alloydb/apiv1beta/alloydb_admin_client.go index 088f3acde256..5dde041bf957 100755 --- a/alloydb/apiv1beta/alloydb_admin_client.go +++ b/alloydb/apiv1beta/alloydb_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1018,6 +1017,8 @@ type alloyDBAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAlloyDBAdminClient creates a new alloydb admin client based on gRPC. @@ -1044,6 +1045,7 @@ func NewAlloyDBAdminClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, alloyDBAdminClient: alloydbpb.NewAlloyDBAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1108,6 +1110,8 @@ type alloyDBAdminRESTClient struct { // Points back to the CallOptions field of the containing AlloyDBAdminClient CallOptions **AlloyDBAdminCallOptions + + logger *slog.Logger } // NewAlloyDBAdminRESTClient creates a new alloydb admin rest client. @@ -1125,6 +1129,7 @@ func NewAlloyDBAdminRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1198,7 +1203,7 @@ func (c *alloyDBAdminGRPCClient) ListClusters(ctx context.Context, req *alloydbp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -1233,7 +1238,7 @@ func (c *alloyDBAdminGRPCClient) GetCluster(ctx context.Context, req *alloydbpb. var resp *alloydbpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *alloyDBAdminGRPCClient) CreateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -1271,7 +1276,7 @@ func (c *alloyDBAdminGRPCClient) UpdateCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -1291,7 +1296,7 @@ func (c *alloyDBAdminGRPCClient) UpgradeCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpgradeCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpgradeCluster, req, settings.GRPC, c.logger, "UpgradeCluster") return err }, opts...) if err != nil { @@ -1311,7 +1316,7 @@ func (c *alloyDBAdminGRPCClient) DeleteCluster(ctx context.Context, req *alloydb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -1331,7 +1336,7 @@ func (c *alloyDBAdminGRPCClient) PromoteCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.PromoteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.PromoteCluster, req, settings.GRPC, c.logger, "PromoteCluster") return err }, opts...) if err != nil { @@ -1351,7 +1356,7 @@ func (c *alloyDBAdminGRPCClient) SwitchoverCluster(ctx context.Context, req *all var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.SwitchoverCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.SwitchoverCluster, req, settings.GRPC, c.logger, "SwitchoverCluster") return err }, opts...) if err != nil { @@ -1371,7 +1376,7 @@ func (c *alloyDBAdminGRPCClient) RestoreCluster(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestoreCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestoreCluster, req, settings.GRPC, c.logger, "RestoreCluster") return err }, opts...) if err != nil { @@ -1391,7 +1396,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryCluster(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryCluster, req, settings.GRPC, c.logger, "CreateSecondaryCluster") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *alloyDBAdminGRPCClient) ListInstances(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *alloyDBAdminGRPCClient) GetInstance(ctx context.Context, req *alloydbpb var resp *alloydbpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1475,7 +1480,7 @@ func (c *alloyDBAdminGRPCClient) CreateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -1495,7 +1500,7 @@ func (c *alloyDBAdminGRPCClient) CreateSecondaryInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateSecondaryInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateSecondaryInstance, req, settings.GRPC, c.logger, "CreateSecondaryInstance") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *alloyDBAdminGRPCClient) BatchCreateInstances(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.BatchCreateInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.BatchCreateInstances, req, settings.GRPC, c.logger, "BatchCreateInstances") return err }, opts...) if err != nil { @@ -1535,7 +1540,7 @@ func (c *alloyDBAdminGRPCClient) UpdateInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -1555,7 +1560,7 @@ func (c *alloyDBAdminGRPCClient) DeleteInstance(ctx context.Context, req *alloyd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -1575,7 +1580,7 @@ func (c *alloyDBAdminGRPCClient) FailoverInstance(ctx context.Context, req *allo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.FailoverInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.FailoverInstance, req, settings.GRPC, c.logger, "FailoverInstance") return err }, opts...) if err != nil { @@ -1595,7 +1600,7 @@ func (c *alloyDBAdminGRPCClient) InjectFault(ctx context.Context, req *alloydbpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.InjectFault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.InjectFault, req, settings.GRPC, c.logger, "InjectFault") return err }, opts...) if err != nil { @@ -1615,7 +1620,7 @@ func (c *alloyDBAdminGRPCClient) RestartInstance(ctx context.Context, req *alloy var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.RestartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.RestartInstance, req, settings.GRPC, c.logger, "RestartInstance") return err }, opts...) if err != nil { @@ -1635,7 +1640,7 @@ func (c *alloyDBAdminGRPCClient) ExecuteSql(ctx context.Context, req *alloydbpb. var resp *alloydbpb.ExecuteSqlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ExecuteSql(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ExecuteSql, req, settings.GRPC, c.logger, "ExecuteSql") return err }, opts...) if err != nil { @@ -1664,7 +1669,7 @@ func (c *alloyDBAdminGRPCClient) ListBackups(ctx context.Context, req *alloydbpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1699,7 +1704,7 @@ func (c *alloyDBAdminGRPCClient) GetBackup(ctx context.Context, req *alloydbpb.G var resp *alloydbpb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1717,7 +1722,7 @@ func (c *alloyDBAdminGRPCClient) CreateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1737,7 +1742,7 @@ func (c *alloyDBAdminGRPCClient) UpdateBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1757,7 +1762,7 @@ func (c *alloyDBAdminGRPCClient) DeleteBackup(ctx context.Context, req *alloydbp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1788,7 +1793,7 @@ func (c *alloyDBAdminGRPCClient) ListSupportedDatabaseFlags(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListSupportedDatabaseFlags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListSupportedDatabaseFlags, req, settings.GRPC, c.logger, "ListSupportedDatabaseFlags") return err }, opts...) if err != nil { @@ -1823,7 +1828,7 @@ func (c *alloyDBAdminGRPCClient) GenerateClientCertificate(ctx context.Context, var resp *alloydbpb.GenerateClientCertificateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GenerateClientCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GenerateClientCertificate, req, settings.GRPC, c.logger, "GenerateClientCertificate") return err }, opts...) if err != nil { @@ -1841,7 +1846,7 @@ func (c *alloyDBAdminGRPCClient) GetConnectionInfo(ctx context.Context, req *all var resp *alloydbpb.ConnectionInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetConnectionInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetConnectionInfo, req, settings.GRPC, c.logger, "GetConnectionInfo") return err }, opts...) if err != nil { @@ -1870,7 +1875,7 @@ func (c *alloyDBAdminGRPCClient) ListUsers(ctx context.Context, req *alloydbpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListUsers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListUsers, req, settings.GRPC, c.logger, "ListUsers") return err }, opts...) if err != nil { @@ -1905,7 +1910,7 @@ func (c *alloyDBAdminGRPCClient) GetUser(ctx context.Context, req *alloydbpb.Get var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.GetUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.GetUser, req, settings.GRPC, c.logger, "GetUser") return err }, opts...) if err != nil { @@ -1923,7 +1928,7 @@ func (c *alloyDBAdminGRPCClient) CreateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.CreateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.CreateUser, req, settings.GRPC, c.logger, "CreateUser") return err }, opts...) if err != nil { @@ -1941,7 +1946,7 @@ func (c *alloyDBAdminGRPCClient) UpdateUser(ctx context.Context, req *alloydbpb. var resp *alloydbpb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.UpdateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.UpdateUser, req, settings.GRPC, c.logger, "UpdateUser") return err }, opts...) if err != nil { @@ -1958,7 +1963,7 @@ func (c *alloyDBAdminGRPCClient) DeleteUser(ctx context.Context, req *alloydbpb. opts = append((*c.CallOptions).DeleteUser[0:len((*c.CallOptions).DeleteUser):len((*c.CallOptions).DeleteUser)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.alloyDBAdminClient.DeleteUser(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.alloyDBAdminClient.DeleteUser, req, settings.GRPC, c.logger, "DeleteUser") return err }, opts...) return err @@ -1984,7 +1989,7 @@ func (c *alloyDBAdminGRPCClient) ListDatabases(ctx context.Context, req *alloydb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alloyDBAdminClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alloyDBAdminClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -2019,7 +2024,7 @@ func (c *alloyDBAdminGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2048,7 +2053,7 @@ func (c *alloyDBAdminGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2082,7 +2087,7 @@ func (c *alloyDBAdminGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2096,7 +2101,7 @@ func (c *alloyDBAdminGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2111,7 +2116,7 @@ func (c *alloyDBAdminGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2140,7 +2145,7 @@ func (c *alloyDBAdminGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2217,21 +2222,10 @@ func (c *alloyDBAdminRESTClient) ListClusters(ctx context.Context, req *alloydbp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2297,17 +2291,7 @@ func (c *alloyDBAdminRESTClient) GetCluster(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -2370,21 +2354,10 @@ func (c *alloyDBAdminRESTClient) CreateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2457,21 +2430,10 @@ func (c *alloyDBAdminRESTClient) UpdateCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2528,21 +2490,10 @@ func (c *alloyDBAdminRESTClient) UpgradeCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2604,21 +2555,10 @@ func (c *alloyDBAdminRESTClient) DeleteCluster(ctx context.Context, req *alloydb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2677,21 +2617,10 @@ func (c *alloyDBAdminRESTClient) PromoteCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PromoteCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2749,21 +2678,10 @@ func (c *alloyDBAdminRESTClient) SwitchoverCluster(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SwitchoverCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2821,21 +2739,10 @@ func (c *alloyDBAdminRESTClient) RestoreCluster(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2900,21 +2807,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryCluster(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2983,21 +2879,10 @@ func (c *alloyDBAdminRESTClient) ListInstances(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3063,17 +2948,7 @@ func (c *alloyDBAdminRESTClient) GetInstance(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -3136,21 +3011,10 @@ func (c *alloyDBAdminRESTClient) CreateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3214,21 +3078,10 @@ func (c *alloyDBAdminRESTClient) CreateSecondaryInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecondaryInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3297,21 +3150,10 @@ func (c *alloyDBAdminRESTClient) BatchCreateInstances(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3384,21 +3226,10 @@ func (c *alloyDBAdminRESTClient) UpdateInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3457,21 +3288,10 @@ func (c *alloyDBAdminRESTClient) DeleteInstance(ctx context.Context, req *alloyd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3529,21 +3349,10 @@ func (c *alloyDBAdminRESTClient) FailoverInstance(ctx context.Context, req *allo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3600,21 +3409,10 @@ func (c *alloyDBAdminRESTClient) InjectFault(ctx context.Context, req *alloydbpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InjectFault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3671,21 +3469,10 @@ func (c *alloyDBAdminRESTClient) RestartInstance(ctx context.Context, req *alloy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestartInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3742,17 +3529,7 @@ func (c *alloyDBAdminRESTClient) ExecuteSql(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteSql") if err != nil { return err } @@ -3820,21 +3597,10 @@ func (c *alloyDBAdminRESTClient) ListBackups(ctx context.Context, req *alloydbpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3897,17 +3663,7 @@ func (c *alloyDBAdminRESTClient) GetBackup(ctx context.Context, req *alloydbpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -3970,21 +3726,10 @@ func (c *alloyDBAdminRESTClient) CreateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4057,21 +3802,10 @@ func (c *alloyDBAdminRESTClient) UpdateBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4130,21 +3864,10 @@ func (c *alloyDBAdminRESTClient) DeleteBackup(ctx context.Context, req *alloydbp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4207,21 +3930,10 @@ func (c *alloyDBAdminRESTClient) ListSupportedDatabaseFlags(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSupportedDatabaseFlags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4294,17 +4006,7 @@ func (c *alloyDBAdminRESTClient) GenerateClientCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateClientCertificate") if err != nil { return err } @@ -4357,17 +4059,7 @@ func (c *alloyDBAdminRESTClient) GetConnectionInfo(ctx context.Context, req *all httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectionInfo") if err != nil { return err } @@ -4435,21 +4127,10 @@ func (c *alloyDBAdminRESTClient) ListUsers(ctx context.Context, req *alloydbpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4512,17 +4193,7 @@ func (c *alloyDBAdminRESTClient) GetUser(ctx context.Context, req *alloydbpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUser") if err != nil { return err } @@ -4586,17 +4257,7 @@ func (c *alloyDBAdminRESTClient) CreateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUser") if err != nil { return err } @@ -4669,17 +4330,7 @@ func (c *alloyDBAdminRESTClient) UpdateUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUser") if err != nil { return err } @@ -4732,15 +4383,8 @@ func (c *alloyDBAdminRESTClient) DeleteUser(ctx context.Context, req *alloydbpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUser") + return err }, opts...) } @@ -4792,21 +4436,10 @@ func (c *alloyDBAdminRESTClient) ListDatabases(ctx context.Context, req *alloydb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4869,17 +4502,7 @@ func (c *alloyDBAdminRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4944,21 +4567,10 @@ func (c *alloyDBAdminRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5018,15 +4630,8 @@ func (c *alloyDBAdminRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -5060,15 +4665,8 @@ func (c *alloyDBAdminRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -5105,17 +4703,7 @@ func (c *alloyDBAdminRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5180,21 +4768,10 @@ func (c *alloyDBAdminRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/alloydb/apiv1beta/alloydb_admin_client_example_go123_test.go b/alloydb/apiv1beta/alloydb_admin_client_example_go123_test.go index 82fc10519992..a7f3250a78d0 100644 --- a/alloydb/apiv1beta/alloydb_admin_client_example_go123_test.go +++ b/alloydb/apiv1beta/alloydb_admin_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAlloyDBAdminClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAlloyDBAdminClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAlloyDBAdminClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleAlloyDBAdminClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleAlloyDBAdminClient_ListSupportedDatabaseFlags_all() { } for resp, err := range c.ListSupportedDatabaseFlags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleAlloyDBAdminClient_ListUsers_all() { } for resp, err := range c.ListUsers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleAlloyDBAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleAlloyDBAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/alloydb/apiv1beta/alloydbpb/csql_resources.pb.go b/alloydb/apiv1beta/alloydbpb/csql_resources.pb.go index 95393c48e163..78fa983d8ea4 100755 --- a/alloydb/apiv1beta/alloydbpb/csql_resources.pb.go +++ b/alloydb/apiv1beta/alloydbpb/csql_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1beta/csql_resources.proto @@ -53,11 +53,9 @@ type CloudSQLBackupRunSource struct { func (x *CloudSQLBackupRunSource) Reset() { *x = CloudSQLBackupRunSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_csql_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_csql_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSQLBackupRunSource) String() string { @@ -68,7 +66,7 @@ func (*CloudSQLBackupRunSource) ProtoMessage() {} func (x *CloudSQLBackupRunSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_csql_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,20 +165,6 @@ func file_google_cloud_alloydb_v1beta_csql_resources_proto_init() { if File_google_cloud_alloydb_v1beta_csql_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1beta_csql_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudSQLBackupRunSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/apiv1beta/alloydbpb/data_model.pb.go b/alloydb/apiv1beta/alloydbpb/data_model.pb.go index 29fe1f444407..0785f9f08ea7 100755 --- a/alloydb/apiv1beta/alloydbpb/data_model.pb.go +++ b/alloydb/apiv1beta/alloydbpb/data_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1beta/data_model.proto @@ -50,11 +50,9 @@ type SqlResult struct { func (x *SqlResult) Reset() { *x = SqlResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResult) String() string { @@ -65,7 +63,7 @@ func (*SqlResult) ProtoMessage() {} func (x *SqlResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type SqlResultColumn struct { func (x *SqlResultColumn) Reset() { *x = SqlResultColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultColumn) String() string { @@ -125,7 +121,7 @@ func (*SqlResultColumn) ProtoMessage() {} func (x *SqlResultColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +162,9 @@ type SqlResultRow struct { func (x *SqlResultRow) Reset() { *x = SqlResultRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultRow) String() string { @@ -181,7 +175,7 @@ func (*SqlResultRow) ProtoMessage() {} func (x *SqlResultRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +212,9 @@ type SqlResultValue struct { func (x *SqlResultValue) Reset() { *x = SqlResultValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlResultValue) String() string { @@ -233,7 +225,7 @@ func (*SqlResultValue) ProtoMessage() {} func (x *SqlResultValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,56 +337,6 @@ func file_google_cloud_alloydb_v1beta_data_model_proto_init() { if File_google_cloud_alloydb_v1beta_data_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SqlResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SqlResultValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1beta_data_model_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/alloydb/apiv1beta/alloydbpb/gemini.pb.go b/alloydb/apiv1beta/alloydbpb/gemini.pb.go index e4741e290226..fcfb6335a170 100755 --- a/alloydb/apiv1beta/alloydbpb/gemini.pb.go +++ b/alloydb/apiv1beta/alloydbpb/gemini.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1beta/gemini.proto @@ -52,11 +52,9 @@ type GeminiClusterConfig struct { func (x *GeminiClusterConfig) Reset() { *x = GeminiClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeminiClusterConfig) String() string { @@ -67,7 +65,7 @@ func (*GeminiClusterConfig) ProtoMessage() {} func (x *GeminiClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type GeminiInstanceConfig struct { func (x *GeminiInstanceConfig) Reset() { *x = GeminiInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeminiInstanceConfig) String() string { @@ -120,7 +116,7 @@ func (*GeminiInstanceConfig) ProtoMessage() {} func (x *GeminiInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,32 +200,6 @@ func file_google_cloud_alloydb_v1beta_gemini_proto_init() { if File_google_cloud_alloydb_v1beta_gemini_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GeminiClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_gemini_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GeminiInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/apiv1beta/alloydbpb/resources.pb.go b/alloydb/apiv1beta/alloydbpb/resources.pb.go index a48109dc13c1..9d24724f8983 100755 --- a/alloydb/apiv1beta/alloydbpb/resources.pb.go +++ b/alloydb/apiv1beta/alloydbpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1beta/resources.proto @@ -1157,11 +1157,9 @@ type UserPassword struct { func (x *UserPassword) Reset() { *x = UserPassword{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserPassword) String() string { @@ -1172,7 +1170,7 @@ func (*UserPassword) ProtoMessage() {} func (x *UserPassword) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1220,11 +1218,9 @@ type MigrationSource struct { func (x *MigrationSource) Reset() { *x = MigrationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationSource) String() string { @@ -1235,7 +1231,7 @@ func (*MigrationSource) ProtoMessage() {} func (x *MigrationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1282,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1301,7 +1295,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1332,9 @@ type EncryptionInfo struct { func (x *EncryptionInfo) Reset() { *x = EncryptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionInfo) String() string { @@ -1353,7 +1345,7 @@ func (*EncryptionInfo) ProtoMessage() {} func (x *EncryptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1389,9 @@ type SslConfig struct { func (x *SslConfig) Reset() { *x = SslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslConfig) String() string { @@ -1412,7 +1402,7 @@ func (*SslConfig) ProtoMessage() {} func (x *SslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1493,9 @@ type AutomatedBackupPolicy struct { func (x *AutomatedBackupPolicy) Reset() { *x = AutomatedBackupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy) String() string { @@ -1518,7 +1506,7 @@ func (*AutomatedBackupPolicy) ProtoMessage() {} func (x *AutomatedBackupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1654,11 +1642,9 @@ type ContinuousBackupConfig struct { func (x *ContinuousBackupConfig) Reset() { *x = ContinuousBackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupConfig) String() string { @@ -1669,7 +1655,7 @@ func (*ContinuousBackupConfig) ProtoMessage() {} func (x *ContinuousBackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,11 +1714,9 @@ type ContinuousBackupInfo struct { func (x *ContinuousBackupInfo) Reset() { *x = ContinuousBackupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupInfo) String() string { @@ -1743,7 +1727,7 @@ func (*ContinuousBackupInfo) ProtoMessage() {} func (x *ContinuousBackupInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1803,11 +1787,9 @@ type BackupSource struct { func (x *BackupSource) Reset() { *x = BackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupSource) String() string { @@ -1818,7 +1800,7 @@ func (*BackupSource) ProtoMessage() {} func (x *BackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1845,9 @@ type ContinuousBackupSource struct { func (x *ContinuousBackupSource) Reset() { *x = ContinuousBackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousBackupSource) String() string { @@ -1878,7 +1858,7 @@ func (*ContinuousBackupSource) ProtoMessage() {} func (x *ContinuousBackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1899,9 @@ type MaintenanceUpdatePolicy struct { func (x *MaintenanceUpdatePolicy) Reset() { *x = MaintenanceUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy) String() string { @@ -1934,7 +1912,7 @@ func (*MaintenanceUpdatePolicy) ProtoMessage() {} func (x *MaintenanceUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,11 +1950,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -1987,7 +1963,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2140,11 +2116,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -2155,7 +2129,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2570,11 +2544,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -2585,7 +2557,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2842,11 +2814,9 @@ type ConnectionInfo struct { func (x *ConnectionInfo) Reset() { *x = ConnectionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionInfo) String() string { @@ -2857,7 +2827,7 @@ func (*ConnectionInfo) ProtoMessage() {} func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3002,11 +2972,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -3017,7 +2985,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3233,11 +3201,9 @@ type SupportedDatabaseFlag struct { func (x *SupportedDatabaseFlag) Reset() { *x = SupportedDatabaseFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag) String() string { @@ -3248,7 +3214,7 @@ func (*SupportedDatabaseFlag) ProtoMessage() {} func (x *SupportedDatabaseFlag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3367,11 +3333,9 @@ type User struct { func (x *User) Reset() { *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *User) String() string { @@ -3382,7 +3346,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3453,11 +3417,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -3468,7 +3430,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3531,11 +3493,9 @@ type AutomatedBackupPolicy_WeeklySchedule struct { func (x *AutomatedBackupPolicy_WeeklySchedule) Reset() { *x = AutomatedBackupPolicy_WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_WeeklySchedule) String() string { @@ -3546,7 +3506,7 @@ func (*AutomatedBackupPolicy_WeeklySchedule) ProtoMessage() {} func (x *AutomatedBackupPolicy_WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3588,11 +3548,9 @@ type AutomatedBackupPolicy_TimeBasedRetention struct { func (x *AutomatedBackupPolicy_TimeBasedRetention) Reset() { *x = AutomatedBackupPolicy_TimeBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_TimeBasedRetention) String() string { @@ -3603,7 +3561,7 @@ func (*AutomatedBackupPolicy_TimeBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_TimeBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3638,11 +3596,9 @@ type AutomatedBackupPolicy_QuantityBasedRetention struct { func (x *AutomatedBackupPolicy_QuantityBasedRetention) Reset() { *x = AutomatedBackupPolicy_QuantityBasedRetention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedBackupPolicy_QuantityBasedRetention) String() string { @@ -3653,7 +3609,7 @@ func (*AutomatedBackupPolicy_QuantityBasedRetention) ProtoMessage() {} func (x *AutomatedBackupPolicy_QuantityBasedRetention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3690,11 +3646,9 @@ type MaintenanceUpdatePolicy_MaintenanceWindow struct { func (x *MaintenanceUpdatePolicy_MaintenanceWindow) Reset() { *x = MaintenanceUpdatePolicy_MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceUpdatePolicy_MaintenanceWindow) String() string { @@ -3705,7 +3659,7 @@ func (*MaintenanceUpdatePolicy_MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceUpdatePolicy_MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3759,11 +3713,9 @@ type Cluster_NetworkConfig struct { func (x *Cluster_NetworkConfig) Reset() { *x = Cluster_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_NetworkConfig) String() string { @@ -3774,7 +3726,7 @@ func (*Cluster_NetworkConfig) ProtoMessage() {} func (x *Cluster_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3817,11 +3769,9 @@ type Cluster_SecondaryConfig struct { func (x *Cluster_SecondaryConfig) Reset() { *x = Cluster_SecondaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SecondaryConfig) String() string { @@ -3832,7 +3782,7 @@ func (*Cluster_SecondaryConfig) ProtoMessage() {} func (x *Cluster_SecondaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3869,11 +3819,9 @@ type Cluster_PrimaryConfig struct { func (x *Cluster_PrimaryConfig) Reset() { *x = Cluster_PrimaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PrimaryConfig) String() string { @@ -3884,7 +3832,7 @@ func (*Cluster_PrimaryConfig) ProtoMessage() {} func (x *Cluster_PrimaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3919,11 +3867,9 @@ type Cluster_PscConfig struct { func (x *Cluster_PscConfig) Reset() { *x = Cluster_PscConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_PscConfig) String() string { @@ -3934,7 +3880,7 @@ func (*Cluster_PscConfig) ProtoMessage() {} func (x *Cluster_PscConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3974,11 +3920,9 @@ type Cluster_TrialMetadata struct { func (x *Cluster_TrialMetadata) Reset() { *x = Cluster_TrialMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_TrialMetadata) String() string { @@ -3989,7 +3933,7 @@ func (*Cluster_TrialMetadata) ProtoMessage() {} func (x *Cluster_TrialMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4044,11 +3988,9 @@ type Instance_MachineConfig struct { func (x *Instance_MachineConfig) Reset() { *x = Instance_MachineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_MachineConfig) String() string { @@ -4059,7 +4001,7 @@ func (*Instance_MachineConfig) ProtoMessage() {} func (x *Instance_MachineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4104,11 +4046,9 @@ type Instance_Node struct { func (x *Instance_Node) Reset() { *x = Instance_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Node) String() string { @@ -4119,7 +4059,7 @@ func (*Instance_Node) ProtoMessage() {} func (x *Instance_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4185,11 +4125,9 @@ type Instance_QueryInsightsInstanceConfig struct { func (x *Instance_QueryInsightsInstanceConfig) Reset() { *x = Instance_QueryInsightsInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_QueryInsightsInstanceConfig) String() string { @@ -4200,7 +4138,7 @@ func (*Instance_QueryInsightsInstanceConfig) ProtoMessage() {} func (x *Instance_QueryInsightsInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4283,11 +4221,9 @@ type Instance_ObservabilityInstanceConfig struct { func (x *Instance_ObservabilityInstanceConfig) Reset() { *x = Instance_ObservabilityInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ObservabilityInstanceConfig) String() string { @@ -4298,7 +4234,7 @@ func (*Instance_ObservabilityInstanceConfig) ProtoMessage() {} func (x *Instance_ObservabilityInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4388,11 +4324,9 @@ type Instance_ReadPoolConfig struct { func (x *Instance_ReadPoolConfig) Reset() { *x = Instance_ReadPoolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ReadPoolConfig) String() string { @@ -4403,7 +4337,7 @@ func (*Instance_ReadPoolConfig) ProtoMessage() {} func (x *Instance_ReadPoolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4437,11 +4371,9 @@ type Instance_UpdatePolicy struct { func (x *Instance_UpdatePolicy) Reset() { *x = Instance_UpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_UpdatePolicy) String() string { @@ -4452,7 +4384,7 @@ func (*Instance_UpdatePolicy) ProtoMessage() {} func (x *Instance_UpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4489,11 +4421,9 @@ type Instance_ClientConnectionConfig struct { func (x *Instance_ClientConnectionConfig) Reset() { *x = Instance_ClientConnectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ClientConnectionConfig) String() string { @@ -4504,7 +4434,7 @@ func (*Instance_ClientConnectionConfig) ProtoMessage() {} func (x *Instance_ClientConnectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4555,11 +4485,9 @@ type Instance_PscInstanceConfig struct { func (x *Instance_PscInstanceConfig) Reset() { *x = Instance_PscInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_PscInstanceConfig) String() string { @@ -4570,7 +4498,7 @@ func (*Instance_PscInstanceConfig) ProtoMessage() {} func (x *Instance_PscInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4623,11 +4551,9 @@ type Instance_InstanceNetworkConfig struct { func (x *Instance_InstanceNetworkConfig) Reset() { *x = Instance_InstanceNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig) String() string { @@ -4638,7 +4564,7 @@ func (*Instance_InstanceNetworkConfig) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4686,11 +4612,9 @@ type Instance_InstanceNetworkConfig_AuthorizedNetwork struct { func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) Reset() { *x = Instance_InstanceNetworkConfig_AuthorizedNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) String() string { @@ -4701,7 +4625,7 @@ func (*Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoMessage() {} func (x *Instance_InstanceNetworkConfig_AuthorizedNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4751,11 +4675,9 @@ type Backup_QuantityBasedExpiry struct { func (x *Backup_QuantityBasedExpiry) Reset() { *x = Backup_QuantityBasedExpiry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_QuantityBasedExpiry) String() string { @@ -4766,7 +4688,7 @@ func (*Backup_QuantityBasedExpiry) ProtoMessage() {} func (x *Backup_QuantityBasedExpiry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4808,11 +4730,9 @@ type SupportedDatabaseFlag_StringRestrictions struct { func (x *SupportedDatabaseFlag_StringRestrictions) Reset() { *x = SupportedDatabaseFlag_StringRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_StringRestrictions) String() string { @@ -4823,7 +4743,7 @@ func (*SupportedDatabaseFlag_StringRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_StringRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4859,11 +4779,9 @@ type SupportedDatabaseFlag_IntegerRestrictions struct { func (x *SupportedDatabaseFlag_IntegerRestrictions) Reset() { *x = SupportedDatabaseFlag_IntegerRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedDatabaseFlag_IntegerRestrictions) String() string { @@ -4874,7 +4792,7 @@ func (*SupportedDatabaseFlag_IntegerRestrictions) ProtoMessage() {} func (x *SupportedDatabaseFlag_IntegerRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6222,500 +6140,6 @@ func file_google_cloud_alloydb_v1beta_resources_proto_init() { } file_google_cloud_alloydb_v1beta_csql_resources_proto_init() file_google_cloud_alloydb_v1beta_gemini_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserPassword); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousBackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_TimeBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedBackupPolicy_QuantityBasedRetention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceUpdatePolicy_MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SecondaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PrimaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_PscConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_TrialMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Instance_MachineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Instance_QueryInsightsInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ObservabilityInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ReadPoolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Instance_UpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ClientConnectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Instance_PscInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceNetworkConfig_AuthorizedNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Backup_QuantityBasedExpiry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_StringRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SupportedDatabaseFlag_IntegerRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1beta_resources_proto_msgTypes[5].OneofWrappers = []any{ (*AutomatedBackupPolicy_WeeklySchedule_)(nil), (*AutomatedBackupPolicy_TimeBasedRetention_)(nil), diff --git a/alloydb/apiv1beta/alloydbpb/service.pb.go b/alloydb/apiv1beta/alloydbpb/service.pb.go index 81239939fc3e..7751a160bfd6 100755 --- a/alloydb/apiv1beta/alloydbpb/service.pb.go +++ b/alloydb/apiv1beta/alloydbpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/v1beta/service.proto @@ -465,11 +465,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -480,7 +478,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +544,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -561,7 +557,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +609,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -628,7 +622,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +685,9 @@ type CreateSecondaryClusterRequest struct { func (x *CreateSecondaryClusterRequest) Reset() { *x = CreateSecondaryClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryClusterRequest) String() string { @@ -706,7 +698,7 @@ func (*CreateSecondaryClusterRequest) ProtoMessage() {} func (x *CreateSecondaryClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +783,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -806,7 +796,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +885,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -910,7 +898,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +984,9 @@ type UpgradeClusterRequest struct { func (x *UpgradeClusterRequest) Reset() { *x = UpgradeClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterRequest) String() string { @@ -1011,7 +997,7 @@ func (*UpgradeClusterRequest) ProtoMessage() {} func (x *UpgradeClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1065,9 @@ type UpgradeClusterResponse struct { func (x *UpgradeClusterResponse) Reset() { *x = UpgradeClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse) String() string { @@ -1094,7 +1078,7 @@ func (*UpgradeClusterResponse) ProtoMessage() {} func (x *UpgradeClusterResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1151,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -1182,7 +1164,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1245,9 @@ type SwitchoverClusterRequest struct { func (x *SwitchoverClusterRequest) Reset() { *x = SwitchoverClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchoverClusterRequest) String() string { @@ -1278,7 +1258,7 @@ func (*SwitchoverClusterRequest) ProtoMessage() {} func (x *SwitchoverClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1329,9 @@ type PromoteClusterRequest struct { func (x *PromoteClusterRequest) Reset() { *x = PromoteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteClusterRequest) String() string { @@ -1364,7 +1342,7 @@ func (*PromoteClusterRequest) ProtoMessage() {} func (x *PromoteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1429,9 @@ type RestoreClusterRequest struct { func (x *RestoreClusterRequest) Reset() { *x = RestoreClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreClusterRequest) String() string { @@ -1466,7 +1442,7 @@ func (*RestoreClusterRequest) ProtoMessage() {} func (x *RestoreClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1558,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1597,7 +1571,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1637,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1678,7 +1650,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1729,11 +1701,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1744,7 +1714,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1778,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1823,7 +1791,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1876,9 @@ type CreateSecondaryInstanceRequest struct { func (x *CreateSecondaryInstanceRequest) Reset() { *x = CreateSecondaryInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecondaryInstanceRequest) String() string { @@ -1923,7 +1889,7 @@ func (*CreateSecondaryInstanceRequest) ProtoMessage() {} func (x *CreateSecondaryInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1952,9 @@ type CreateInstanceRequests struct { func (x *CreateInstanceRequests) Reset() { *x = CreateInstanceRequests{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequests) String() string { @@ -2001,7 +1965,7 @@ func (*CreateInstanceRequests) ProtoMessage() {} func (x *CreateInstanceRequests) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2051,11 +2015,9 @@ type BatchCreateInstancesRequest struct { func (x *BatchCreateInstancesRequest) Reset() { *x = BatchCreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesRequest) String() string { @@ -2066,7 +2028,7 @@ func (*BatchCreateInstancesRequest) ProtoMessage() {} func (x *BatchCreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2114,11 +2076,9 @@ type BatchCreateInstancesResponse struct { func (x *BatchCreateInstancesResponse) Reset() { *x = BatchCreateInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesResponse) String() string { @@ -2129,7 +2089,7 @@ func (*BatchCreateInstancesResponse) ProtoMessage() {} func (x *BatchCreateInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2174,11 +2134,9 @@ type BatchCreateInstancesMetadata struct { func (x *BatchCreateInstancesMetadata) Reset() { *x = BatchCreateInstancesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstancesMetadata) String() string { @@ -2189,7 +2147,7 @@ func (*BatchCreateInstancesMetadata) ProtoMessage() {} func (x *BatchCreateInstancesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2258,11 +2216,9 @@ type BatchCreateInstanceStatus struct { func (x *BatchCreateInstanceStatus) Reset() { *x = BatchCreateInstanceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateInstanceStatus) String() string { @@ -2273,7 +2229,7 @@ func (*BatchCreateInstanceStatus) ProtoMessage() {} func (x *BatchCreateInstanceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2355,11 +2311,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -2370,7 +2324,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2409,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -2470,7 +2422,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2544,11 +2496,9 @@ type FailoverInstanceRequest struct { func (x *FailoverInstanceRequest) Reset() { *x = FailoverInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverInstanceRequest) String() string { @@ -2559,7 +2509,7 @@ func (*FailoverInstanceRequest) ProtoMessage() {} func (x *FailoverInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2628,11 +2578,9 @@ type InjectFaultRequest struct { func (x *InjectFaultRequest) Reset() { *x = InjectFaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectFaultRequest) String() string { @@ -2643,7 +2591,7 @@ func (*InjectFaultRequest) ProtoMessage() {} func (x *InjectFaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2719,11 +2667,9 @@ type RestartInstanceRequest struct { func (x *RestartInstanceRequest) Reset() { *x = RestartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestartInstanceRequest) String() string { @@ -2734,7 +2680,7 @@ func (*RestartInstanceRequest) ProtoMessage() {} func (x *RestartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,11 +2754,9 @@ type ExecuteSqlRequest struct { func (x *ExecuteSqlRequest) Reset() { *x = ExecuteSqlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlRequest) String() string { @@ -2823,7 +2767,7 @@ func (*ExecuteSqlRequest) ProtoMessage() {} func (x *ExecuteSqlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2906,11 +2850,9 @@ type ExecuteSqlResponse struct { func (x *ExecuteSqlResponse) Reset() { *x = ExecuteSqlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlResponse) String() string { @@ -2921,7 +2863,7 @@ func (*ExecuteSqlResponse) ProtoMessage() {} func (x *ExecuteSqlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2972,11 +2914,9 @@ type ExecuteSqlMetadata struct { func (x *ExecuteSqlMetadata) Reset() { *x = ExecuteSqlMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlMetadata) String() string { @@ -2987,7 +2927,7 @@ func (*ExecuteSqlMetadata) ProtoMessage() {} func (x *ExecuteSqlMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3051,11 +2991,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3066,7 +3004,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3132,11 +3070,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3147,7 +3083,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3195,11 +3131,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3210,7 +3144,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3265,11 +3199,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -3280,7 +3212,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3368,11 +3300,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -3383,7 +3313,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3467,11 +3397,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3482,7 +3410,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3548,11 +3476,9 @@ type ListSupportedDatabaseFlagsRequest struct { func (x *ListSupportedDatabaseFlagsRequest) Reset() { *x = ListSupportedDatabaseFlagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsRequest) String() string { @@ -3563,7 +3489,7 @@ func (*ListSupportedDatabaseFlagsRequest) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3613,11 +3539,9 @@ type ListSupportedDatabaseFlagsResponse struct { func (x *ListSupportedDatabaseFlagsResponse) Reset() { *x = ListSupportedDatabaseFlagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSupportedDatabaseFlagsResponse) String() string { @@ -3628,7 +3552,7 @@ func (*ListSupportedDatabaseFlagsResponse) ProtoMessage() {} func (x *ListSupportedDatabaseFlagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3702,11 +3626,9 @@ type GenerateClientCertificateRequest struct { func (x *GenerateClientCertificateRequest) Reset() { *x = GenerateClientCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateRequest) String() string { @@ -3717,7 +3639,7 @@ func (*GenerateClientCertificateRequest) ProtoMessage() {} func (x *GenerateClientCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3794,11 +3716,9 @@ type GenerateClientCertificateResponse struct { func (x *GenerateClientCertificateResponse) Reset() { *x = GenerateClientCertificateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateClientCertificateResponse) String() string { @@ -3809,7 +3729,7 @@ func (*GenerateClientCertificateResponse) ProtoMessage() {} func (x *GenerateClientCertificateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3873,11 +3793,9 @@ type GetConnectionInfoRequest struct { func (x *GetConnectionInfoRequest) Reset() { *x = GetConnectionInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionInfoRequest) String() string { @@ -3888,7 +3806,7 @@ func (*GetConnectionInfoRequest) ProtoMessage() {} func (x *GetConnectionInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3953,11 +3871,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3968,7 +3884,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4105,11 +4021,9 @@ type PromoteClusterStatus struct { func (x *PromoteClusterStatus) Reset() { *x = PromoteClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteClusterStatus) String() string { @@ -4120,7 +4034,7 @@ func (*PromoteClusterStatus) ProtoMessage() {} func (x *PromoteClusterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4162,11 +4076,9 @@ type UpgradeClusterStatus struct { func (x *UpgradeClusterStatus) Reset() { *x = UpgradeClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus) String() string { @@ -4177,7 +4089,7 @@ func (*UpgradeClusterStatus) ProtoMessage() {} func (x *UpgradeClusterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4248,11 +4160,9 @@ type ListUsersRequest struct { func (x *ListUsersRequest) Reset() { *x = ListUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersRequest) String() string { @@ -4263,7 +4173,7 @@ func (*ListUsersRequest) ProtoMessage() {} func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4329,11 +4239,9 @@ type ListUsersResponse struct { func (x *ListUsersResponse) Reset() { *x = ListUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersResponse) String() string { @@ -4344,7 +4252,7 @@ func (*ListUsersResponse) ProtoMessage() {} func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4393,11 +4301,9 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserRequest) String() string { @@ -4408,7 +4314,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4463,11 +4369,9 @@ type CreateUserRequest struct { func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserRequest) String() string { @@ -4478,7 +4382,7 @@ func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4565,11 +4469,9 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserRequest) String() string { @@ -4580,7 +4482,7 @@ func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4660,11 +4562,9 @@ type DeleteUserRequest struct { func (x *DeleteUserRequest) Reset() { *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserRequest) String() string { @@ -4675,7 +4575,7 @@ func (*DeleteUserRequest) ProtoMessage() {} func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4735,11 +4635,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -4750,7 +4648,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4808,11 +4706,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -4823,7 +4719,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4870,11 +4766,9 @@ type UpgradeClusterResponse_StageInfo struct { func (x *UpgradeClusterResponse_StageInfo) Reset() { *x = UpgradeClusterResponse_StageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_StageInfo) String() string { @@ -4885,7 +4779,7 @@ func (*UpgradeClusterResponse_StageInfo) ProtoMessage() {} func (x *UpgradeClusterResponse_StageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4937,11 +4831,9 @@ type UpgradeClusterResponse_InstanceUpgradeDetails struct { func (x *UpgradeClusterResponse_InstanceUpgradeDetails) Reset() { *x = UpgradeClusterResponse_InstanceUpgradeDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_InstanceUpgradeDetails) String() string { @@ -4952,7 +4844,7 @@ func (*UpgradeClusterResponse_InstanceUpgradeDetails) ProtoMessage() {} func (x *UpgradeClusterResponse_InstanceUpgradeDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5012,11 +4904,9 @@ type UpgradeClusterResponse_ClusterUpgradeDetails struct { func (x *UpgradeClusterResponse_ClusterUpgradeDetails) Reset() { *x = UpgradeClusterResponse_ClusterUpgradeDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterResponse_ClusterUpgradeDetails) String() string { @@ -5027,7 +4917,7 @@ func (*UpgradeClusterResponse_ClusterUpgradeDetails) ProtoMessage() {} func (x *UpgradeClusterResponse_ClusterUpgradeDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5104,11 +4994,9 @@ type UpgradeClusterStatus_StageStatus struct { func (x *UpgradeClusterStatus_StageStatus) Reset() { *x = UpgradeClusterStatus_StageStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_StageStatus) String() string { @@ -5119,7 +5007,7 @@ func (*UpgradeClusterStatus_StageStatus) ProtoMessage() {} func (x *UpgradeClusterStatus_StageStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5186,11 +5074,9 @@ type UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus struct { func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) Reset() { *x = UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) String() string { @@ -5201,7 +5087,7 @@ func (*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) ProtoMessage() func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5241,11 +5127,9 @@ type UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats struct { func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) Reset() { *x = UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) String() string { @@ -5256,7 +5140,7 @@ func (*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) ProtoMess func (x *UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_v1beta_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6956,704 +6840,6 @@ func file_google_cloud_alloydb_v1beta_service_proto_init() { } file_google_cloud_alloydb_v1beta_data_model_proto_init() file_google_cloud_alloydb_v1beta_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SwitchoverClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PromoteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RestoreClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecondaryInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstancesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateInstanceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FailoverInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*InjectFaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RestartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListSupportedDatabaseFlagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClientCertificateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*PromoteClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*GetUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_StageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_InstanceUpgradeDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterResponse_ClusterUpgradeDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_StageStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_v1beta_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterStatus_ReadPoolInstancesUpgradeStageStatus_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_alloydb_v1beta_service_proto_msgTypes[11].OneofWrappers = []any{ (*RestoreClusterRequest_BackupSource)(nil), (*RestoreClusterRequest_ContinuousBackupSource)(nil), diff --git a/alloydb/apiv1beta/helpers.go b/alloydb/apiv1beta/helpers.go index 6e25182530d7..df94a97ef621 100755 --- a/alloydb/apiv1beta/helpers.go +++ b/alloydb/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package alloydb import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "alloydb.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/alloydb/connectors/apiv1/connectorspb/resources.pb.go b/alloydb/connectors/apiv1/connectorspb/resources.pb.go index 0c5654927ca2..5dfc3cbb32fa 100755 --- a/alloydb/connectors/apiv1/connectorspb/resources.pb.go +++ b/alloydb/connectors/apiv1/connectorspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/connectors/v1/resources.proto @@ -164,11 +164,9 @@ type MetadataExchangeRequest struct { func (x *MetadataExchangeRequest) Reset() { *x = MetadataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeRequest) String() string { @@ -179,7 +177,7 @@ func (*MetadataExchangeRequest) ProtoMessage() {} func (x *MetadataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type MetadataExchangeResponse struct { func (x *MetadataExchangeResponse) Reset() { *x = MetadataExchangeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeResponse) String() string { @@ -246,7 +242,7 @@ func (*MetadataExchangeResponse) ProtoMessage() {} func (x *MetadataExchangeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,32 +366,6 @@ func file_google_cloud_alloydb_connectors_v1_resources_proto_init() { if File_google_cloud_alloydb_connectors_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_connectors_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/connectors/apiv1alpha/connectorspb/resources.pb.go b/alloydb/connectors/apiv1alpha/connectorspb/resources.pb.go index c28c68c3fced..b796aacc197c 100755 --- a/alloydb/connectors/apiv1alpha/connectorspb/resources.pb.go +++ b/alloydb/connectors/apiv1alpha/connectorspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/connectors/v1alpha/resources.proto @@ -164,11 +164,9 @@ type MetadataExchangeRequest struct { func (x *MetadataExchangeRequest) Reset() { *x = MetadataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeRequest) String() string { @@ -179,7 +177,7 @@ func (*MetadataExchangeRequest) ProtoMessage() {} func (x *MetadataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type MetadataExchangeResponse struct { func (x *MetadataExchangeResponse) Reset() { *x = MetadataExchangeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeResponse) String() string { @@ -246,7 +242,7 @@ func (*MetadataExchangeResponse) ProtoMessage() {} func (x *MetadataExchangeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,32 +369,6 @@ func file_google_cloud_alloydb_connectors_v1alpha_resources_proto_init() { if File_google_cloud_alloydb_connectors_v1alpha_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_connectors_v1alpha_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/alloydb/connectors/apiv1beta/connectorspb/resources.pb.go b/alloydb/connectors/apiv1beta/connectorspb/resources.pb.go index cc4f5a5d51a8..414dd1403dfb 100755 --- a/alloydb/connectors/apiv1beta/connectorspb/resources.pb.go +++ b/alloydb/connectors/apiv1beta/connectorspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/alloydb/connectors/v1beta/resources.proto @@ -164,11 +164,9 @@ type MetadataExchangeRequest struct { func (x *MetadataExchangeRequest) Reset() { *x = MetadataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeRequest) String() string { @@ -179,7 +177,7 @@ func (*MetadataExchangeRequest) ProtoMessage() {} func (x *MetadataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type MetadataExchangeResponse struct { func (x *MetadataExchangeResponse) Reset() { *x = MetadataExchangeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExchangeResponse) String() string { @@ -246,7 +242,7 @@ func (*MetadataExchangeResponse) ProtoMessage() {} func (x *MetadataExchangeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,32 +369,6 @@ func file_google_cloud_alloydb_connectors_v1beta_resources_proto_init() { if File_google_cloud_alloydb_connectors_v1beta_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_alloydb_connectors_v1beta_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExchangeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/analytics/admin/apiv1alpha/adminpb/access_report.pb.go b/analytics/admin/apiv1alpha/adminpb/access_report.pb.go index 34f41932970e..508c24f58b88 100755 --- a/analytics/admin/apiv1alpha/adminpb/access_report.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/access_report.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/access_report.proto @@ -249,11 +249,9 @@ type AccessDimension struct { func (x *AccessDimension) Reset() { *x = AccessDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessDimension) String() string { @@ -264,7 +262,7 @@ func (*AccessDimension) ProtoMessage() {} func (x *AccessDimension) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +301,9 @@ type AccessMetric struct { func (x *AccessMetric) Reset() { *x = AccessMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessMetric) String() string { @@ -318,7 +314,7 @@ func (*AccessMetric) ProtoMessage() {} func (x *AccessMetric) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +356,9 @@ type AccessDateRange struct { func (x *AccessDateRange) Reset() { *x = AccessDateRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessDateRange) String() string { @@ -375,7 +369,7 @@ func (*AccessDateRange) ProtoMessage() {} func (x *AccessDateRange) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +418,9 @@ type AccessFilterExpression struct { func (x *AccessFilterExpression) Reset() { *x = AccessFilterExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessFilterExpression) String() string { @@ -439,7 +431,7 @@ func (*AccessFilterExpression) ProtoMessage() {} func (x *AccessFilterExpression) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +526,9 @@ type AccessFilterExpressionList struct { func (x *AccessFilterExpressionList) Reset() { *x = AccessFilterExpressionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessFilterExpressionList) String() string { @@ -549,7 +539,7 @@ func (*AccessFilterExpressionList) ProtoMessage() {} func (x *AccessFilterExpressionList) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +582,9 @@ type AccessFilter struct { func (x *AccessFilter) Reset() { *x = AccessFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessFilter) String() string { @@ -607,7 +595,7 @@ func (*AccessFilter) ProtoMessage() {} func (x *AccessFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +700,9 @@ type AccessStringFilter struct { func (x *AccessStringFilter) Reset() { *x = AccessStringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessStringFilter) String() string { @@ -727,7 +713,7 @@ func (*AccessStringFilter) ProtoMessage() {} func (x *AccessStringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +763,9 @@ type AccessInListFilter struct { func (x *AccessInListFilter) Reset() { *x = AccessInListFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessInListFilter) String() string { @@ -792,7 +776,7 @@ func (*AccessInListFilter) ProtoMessage() {} func (x *AccessInListFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +819,9 @@ type AccessNumericFilter struct { func (x *AccessNumericFilter) Reset() { *x = AccessNumericFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessNumericFilter) String() string { @@ -850,7 +832,7 @@ func (*AccessNumericFilter) ProtoMessage() {} func (x *AccessNumericFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +875,9 @@ type AccessBetweenFilter struct { func (x *AccessBetweenFilter) Reset() { *x = AccessBetweenFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessBetweenFilter) String() string { @@ -908,7 +888,7 @@ func (*AccessBetweenFilter) ProtoMessage() {} func (x *AccessBetweenFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +934,9 @@ type NumericValue struct { func (x *NumericValue) Reset() { *x = NumericValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NumericValue) String() string { @@ -969,7 +947,7 @@ func (*NumericValue) ProtoMessage() {} func (x *NumericValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1023,9 @@ type AccessOrderBy struct { func (x *AccessOrderBy) Reset() { *x = AccessOrderBy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessOrderBy) String() string { @@ -1060,7 +1036,7 @@ func (*AccessOrderBy) ProtoMessage() {} func (x *AccessOrderBy) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1112,9 @@ type AccessDimensionHeader struct { func (x *AccessDimensionHeader) Reset() { *x = AccessDimensionHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessDimensionHeader) String() string { @@ -1151,7 +1125,7 @@ func (*AccessDimensionHeader) ProtoMessage() {} func (x *AccessDimensionHeader) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1162,9 @@ type AccessMetricHeader struct { func (x *AccessMetricHeader) Reset() { *x = AccessMetricHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessMetricHeader) String() string { @@ -1203,7 +1175,7 @@ func (*AccessMetricHeader) ProtoMessage() {} func (x *AccessMetricHeader) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1213,9 @@ type AccessRow struct { func (x *AccessRow) Reset() { *x = AccessRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessRow) String() string { @@ -1256,7 +1226,7 @@ func (*AccessRow) ProtoMessage() {} func (x *AccessRow) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,11 +1268,9 @@ type AccessDimensionValue struct { func (x *AccessDimensionValue) Reset() { *x = AccessDimensionValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessDimensionValue) String() string { @@ -1313,7 +1281,7 @@ func (*AccessDimensionValue) ProtoMessage() {} func (x *AccessDimensionValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1315,9 @@ type AccessMetricValue struct { func (x *AccessMetricValue) Reset() { *x = AccessMetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessMetricValue) String() string { @@ -1362,7 +1328,7 @@ func (*AccessMetricValue) ProtoMessage() {} func (x *AccessMetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1379,9 @@ type AccessQuota struct { func (x *AccessQuota) Reset() { *x = AccessQuota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessQuota) String() string { @@ -1428,7 +1392,7 @@ func (*AccessQuota) ProtoMessage() {} func (x *AccessQuota) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1456,9 @@ type AccessQuotaStatus struct { func (x *AccessQuotaStatus) Reset() { *x = AccessQuotaStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessQuotaStatus) String() string { @@ -1507,7 +1469,7 @@ func (*AccessQuotaStatus) ProtoMessage() {} func (x *AccessQuotaStatus) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1548,11 +1510,9 @@ type AccessOrderBy_MetricOrderBy struct { func (x *AccessOrderBy_MetricOrderBy) Reset() { *x = AccessOrderBy_MetricOrderBy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessOrderBy_MetricOrderBy) String() string { @@ -1563,7 +1523,7 @@ func (*AccessOrderBy_MetricOrderBy) ProtoMessage() {} func (x *AccessOrderBy_MetricOrderBy) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1599,11 +1559,9 @@ type AccessOrderBy_DimensionOrderBy struct { func (x *AccessOrderBy_DimensionOrderBy) Reset() { *x = AccessOrderBy_DimensionOrderBy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessOrderBy_DimensionOrderBy) String() string { @@ -1614,7 +1572,7 @@ func (*AccessOrderBy_DimensionOrderBy) ProtoMessage() {} func (x *AccessOrderBy_DimensionOrderBy) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1971,260 +1929,6 @@ func file_google_analytics_admin_v1alpha_access_report_proto_init() { if File_google_analytics_admin_v1alpha_access_report_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AccessMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AccessDateRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AccessFilterExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AccessFilterExpressionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AccessFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AccessStringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AccessInListFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AccessNumericFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessBetweenFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NumericValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AccessOrderBy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AccessDimensionHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AccessMetricHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AccessRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AccessDimensionValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AccessMetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AccessQuota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AccessQuotaStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AccessOrderBy_MetricOrderBy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AccessOrderBy_DimensionOrderBy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3].OneofWrappers = []any{ (*AccessFilterExpression_AndGroup)(nil), (*AccessFilterExpression_OrGroup)(nil), diff --git a/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go b/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go index 7381d8835a5c..1d9925891afa 100755 --- a/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/analytics_admin.proto @@ -130,11 +130,9 @@ type RunAccessReportRequest struct { func (x *RunAccessReportRequest) Reset() { *x = RunAccessReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAccessReportRequest) String() string { @@ -145,7 +143,7 @@ func (*RunAccessReportRequest) ProtoMessage() {} func (x *RunAccessReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +281,9 @@ type RunAccessReportResponse struct { func (x *RunAccessReportResponse) Reset() { *x = RunAccessReportResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAccessReportResponse) String() string { @@ -298,7 +294,7 @@ func (*RunAccessReportResponse) ProtoMessage() {} func (x *RunAccessReportResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +358,9 @@ type GetAccountRequest struct { func (x *GetAccountRequest) Reset() { *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountRequest) String() string { @@ -377,7 +371,7 @@ func (*GetAccountRequest) ProtoMessage() {} func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +417,9 @@ type ListAccountsRequest struct { func (x *ListAccountsRequest) Reset() { *x = ListAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountsRequest) String() string { @@ -438,7 +430,7 @@ func (*ListAccountsRequest) ProtoMessage() {} func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +481,9 @@ type ListAccountsResponse struct { func (x *ListAccountsResponse) Reset() { *x = ListAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountsResponse) String() string { @@ -504,7 +494,7 @@ func (*ListAccountsResponse) ProtoMessage() {} func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +537,9 @@ type DeleteAccountRequest struct { func (x *DeleteAccountRequest) Reset() { *x = DeleteAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccountRequest) String() string { @@ -562,7 +550,7 @@ func (*DeleteAccountRequest) ProtoMessage() {} func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +590,9 @@ type UpdateAccountRequest struct { func (x *UpdateAccountRequest) Reset() { *x = UpdateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccountRequest) String() string { @@ -617,7 +603,7 @@ func (*UpdateAccountRequest) ProtoMessage() {} func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +647,9 @@ type ProvisionAccountTicketRequest struct { func (x *ProvisionAccountTicketRequest) Reset() { *x = ProvisionAccountTicketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionAccountTicketRequest) String() string { @@ -676,7 +660,7 @@ func (*ProvisionAccountTicketRequest) ProtoMessage() {} func (x *ProvisionAccountTicketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,11 +701,9 @@ type ProvisionAccountTicketResponse struct { func (x *ProvisionAccountTicketResponse) Reset() { *x = ProvisionAccountTicketResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionAccountTicketResponse) String() string { @@ -732,7 +714,7 @@ func (*ProvisionAccountTicketResponse) ProtoMessage() {} func (x *ProvisionAccountTicketResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +750,9 @@ type GetPropertyRequest struct { func (x *GetPropertyRequest) Reset() { *x = GetPropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPropertyRequest) String() string { @@ -783,7 +763,7 @@ func (*GetPropertyRequest) ProtoMessage() {} func (x *GetPropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +826,9 @@ type ListPropertiesRequest struct { func (x *ListPropertiesRequest) Reset() { *x = ListPropertiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPropertiesRequest) String() string { @@ -861,7 +839,7 @@ func (*ListPropertiesRequest) ProtoMessage() {} func (x *ListPropertiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +897,9 @@ type ListPropertiesResponse struct { func (x *ListPropertiesResponse) Reset() { *x = ListPropertiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPropertiesResponse) String() string { @@ -934,7 +910,7 @@ func (*ListPropertiesResponse) ProtoMessage() {} func (x *ListPropertiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +958,9 @@ type UpdatePropertyRequest struct { func (x *UpdatePropertyRequest) Reset() { *x = UpdatePropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePropertyRequest) String() string { @@ -997,7 +971,7 @@ func (*UpdatePropertyRequest) ProtoMessage() {} func (x *UpdatePropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1039,11 +1013,9 @@ type CreatePropertyRequest struct { func (x *CreatePropertyRequest) Reset() { *x = CreatePropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePropertyRequest) String() string { @@ -1054,7 +1026,7 @@ func (*CreatePropertyRequest) ProtoMessage() {} func (x *CreatePropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1062,9 @@ type DeletePropertyRequest struct { func (x *DeletePropertyRequest) Reset() { *x = DeletePropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePropertyRequest) String() string { @@ -1105,7 +1075,7 @@ func (*DeletePropertyRequest) ProtoMessage() {} func (x *DeletePropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1113,9 @@ type CreateFirebaseLinkRequest struct { func (x *CreateFirebaseLinkRequest) Reset() { *x = CreateFirebaseLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFirebaseLinkRequest) String() string { @@ -1158,7 +1126,7 @@ func (*CreateFirebaseLinkRequest) ProtoMessage() {} func (x *CreateFirebaseLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1169,9 @@ type DeleteFirebaseLinkRequest struct { func (x *DeleteFirebaseLinkRequest) Reset() { *x = DeleteFirebaseLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFirebaseLinkRequest) String() string { @@ -1216,7 +1182,7 @@ func (*DeleteFirebaseLinkRequest) ProtoMessage() {} func (x *DeleteFirebaseLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,11 +1228,9 @@ type ListFirebaseLinksRequest struct { func (x *ListFirebaseLinksRequest) Reset() { *x = ListFirebaseLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirebaseLinksRequest) String() string { @@ -1277,7 +1241,7 @@ func (*ListFirebaseLinksRequest) ProtoMessage() {} func (x *ListFirebaseLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1294,9 @@ type ListFirebaseLinksResponse struct { func (x *ListFirebaseLinksResponse) Reset() { *x = ListFirebaseLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirebaseLinksResponse) String() string { @@ -1345,7 +1307,7 @@ func (*ListFirebaseLinksResponse) ProtoMessage() {} func (x *ListFirebaseLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1390,11 +1352,9 @@ type GetGlobalSiteTagRequest struct { func (x *GetGlobalSiteTagRequest) Reset() { *x = GetGlobalSiteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalSiteTagRequest) String() string { @@ -1405,7 +1365,7 @@ func (*GetGlobalSiteTagRequest) ProtoMessage() {} func (x *GetGlobalSiteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1401,9 @@ type CreateGoogleAdsLinkRequest struct { func (x *CreateGoogleAdsLinkRequest) Reset() { *x = CreateGoogleAdsLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGoogleAdsLinkRequest) String() string { @@ -1456,7 +1414,7 @@ func (*CreateGoogleAdsLinkRequest) ProtoMessage() {} func (x *CreateGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1460,9 @@ type UpdateGoogleAdsLinkRequest struct { func (x *UpdateGoogleAdsLinkRequest) Reset() { *x = UpdateGoogleAdsLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGoogleAdsLinkRequest) String() string { @@ -1517,7 +1473,7 @@ func (*UpdateGoogleAdsLinkRequest) ProtoMessage() {} func (x *UpdateGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1514,9 @@ type DeleteGoogleAdsLinkRequest struct { func (x *DeleteGoogleAdsLinkRequest) Reset() { *x = DeleteGoogleAdsLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGoogleAdsLinkRequest) String() string { @@ -1573,7 +1527,7 @@ func (*DeleteGoogleAdsLinkRequest) ProtoMessage() {} func (x *DeleteGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1617,11 +1571,9 @@ type ListGoogleAdsLinksRequest struct { func (x *ListGoogleAdsLinksRequest) Reset() { *x = ListGoogleAdsLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGoogleAdsLinksRequest) String() string { @@ -1632,7 +1584,7 @@ func (*ListGoogleAdsLinksRequest) ProtoMessage() {} func (x *ListGoogleAdsLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1683,11 +1635,9 @@ type ListGoogleAdsLinksResponse struct { func (x *ListGoogleAdsLinksResponse) Reset() { *x = ListGoogleAdsLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGoogleAdsLinksResponse) String() string { @@ -1698,7 +1648,7 @@ func (*ListGoogleAdsLinksResponse) ProtoMessage() {} func (x *ListGoogleAdsLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1692,9 @@ type GetDataSharingSettingsRequest struct { func (x *GetDataSharingSettingsRequest) Reset() { *x = GetDataSharingSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataSharingSettingsRequest) String() string { @@ -1757,7 +1705,7 @@ func (*GetDataSharingSettingsRequest) ProtoMessage() {} func (x *GetDataSharingSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1799,11 +1747,9 @@ type ListAccountSummariesRequest struct { func (x *ListAccountSummariesRequest) Reset() { *x = ListAccountSummariesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountSummariesRequest) String() string { @@ -1814,7 +1760,7 @@ func (*ListAccountSummariesRequest) ProtoMessage() {} func (x *ListAccountSummariesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1858,11 +1804,9 @@ type ListAccountSummariesResponse struct { func (x *ListAccountSummariesResponse) Reset() { *x = ListAccountSummariesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountSummariesResponse) String() string { @@ -1873,7 +1817,7 @@ func (*ListAccountSummariesResponse) ProtoMessage() {} func (x *ListAccountSummariesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1923,11 +1867,9 @@ type AcknowledgeUserDataCollectionRequest struct { func (x *AcknowledgeUserDataCollectionRequest) Reset() { *x = AcknowledgeUserDataCollectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeUserDataCollectionRequest) String() string { @@ -1938,7 +1880,7 @@ func (*AcknowledgeUserDataCollectionRequest) ProtoMessage() {} func (x *AcknowledgeUserDataCollectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1976,11 +1918,9 @@ type AcknowledgeUserDataCollectionResponse struct { func (x *AcknowledgeUserDataCollectionResponse) Reset() { *x = AcknowledgeUserDataCollectionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeUserDataCollectionResponse) String() string { @@ -1991,7 +1931,7 @@ func (*AcknowledgeUserDataCollectionResponse) ProtoMessage() {} func (x *AcknowledgeUserDataCollectionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2051,11 +1991,9 @@ type SearchChangeHistoryEventsRequest struct { func (x *SearchChangeHistoryEventsRequest) Reset() { *x = SearchChangeHistoryEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchChangeHistoryEventsRequest) String() string { @@ -2066,7 +2004,7 @@ func (*SearchChangeHistoryEventsRequest) ProtoMessage() {} func (x *SearchChangeHistoryEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2159,11 +2097,9 @@ type SearchChangeHistoryEventsResponse struct { func (x *SearchChangeHistoryEventsResponse) Reset() { *x = SearchChangeHistoryEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchChangeHistoryEventsResponse) String() string { @@ -2174,7 +2110,7 @@ func (*SearchChangeHistoryEventsResponse) ProtoMessage() {} func (x *SearchChangeHistoryEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2217,11 +2153,9 @@ type GetMeasurementProtocolSecretRequest struct { func (x *GetMeasurementProtocolSecretRequest) Reset() { *x = GetMeasurementProtocolSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMeasurementProtocolSecretRequest) String() string { @@ -2232,7 +2166,7 @@ func (*GetMeasurementProtocolSecretRequest) ProtoMessage() {} func (x *GetMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2269,11 +2203,9 @@ type CreateMeasurementProtocolSecretRequest struct { func (x *CreateMeasurementProtocolSecretRequest) Reset() { *x = CreateMeasurementProtocolSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMeasurementProtocolSecretRequest) String() string { @@ -2284,7 +2216,7 @@ func (*CreateMeasurementProtocolSecretRequest) ProtoMessage() {} func (x *CreateMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2327,11 +2259,9 @@ type DeleteMeasurementProtocolSecretRequest struct { func (x *DeleteMeasurementProtocolSecretRequest) Reset() { *x = DeleteMeasurementProtocolSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMeasurementProtocolSecretRequest) String() string { @@ -2342,7 +2272,7 @@ func (*DeleteMeasurementProtocolSecretRequest) ProtoMessage() {} func (x *DeleteMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2379,11 +2309,9 @@ type UpdateMeasurementProtocolSecretRequest struct { func (x *UpdateMeasurementProtocolSecretRequest) Reset() { *x = UpdateMeasurementProtocolSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMeasurementProtocolSecretRequest) String() string { @@ -2394,7 +2322,7 @@ func (*UpdateMeasurementProtocolSecretRequest) ProtoMessage() {} func (x *UpdateMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2446,11 +2374,9 @@ type ListMeasurementProtocolSecretsRequest struct { func (x *ListMeasurementProtocolSecretsRequest) Reset() { *x = ListMeasurementProtocolSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMeasurementProtocolSecretsRequest) String() string { @@ -2461,7 +2387,7 @@ func (*ListMeasurementProtocolSecretsRequest) ProtoMessage() {} func (x *ListMeasurementProtocolSecretsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2512,11 +2438,9 @@ type ListMeasurementProtocolSecretsResponse struct { func (x *ListMeasurementProtocolSecretsResponse) Reset() { *x = ListMeasurementProtocolSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMeasurementProtocolSecretsResponse) String() string { @@ -2527,7 +2451,7 @@ func (*ListMeasurementProtocolSecretsResponse) ProtoMessage() {} func (x *ListMeasurementProtocolSecretsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2570,11 +2494,9 @@ type GetSKAdNetworkConversionValueSchemaRequest struct { func (x *GetSKAdNetworkConversionValueSchemaRequest) Reset() { *x = GetSKAdNetworkConversionValueSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSKAdNetworkConversionValueSchemaRequest) String() string { @@ -2585,7 +2507,7 @@ func (*GetSKAdNetworkConversionValueSchemaRequest) ProtoMessage() {} func (x *GetSKAdNetworkConversionValueSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,11 +2544,9 @@ type CreateSKAdNetworkConversionValueSchemaRequest struct { func (x *CreateSKAdNetworkConversionValueSchemaRequest) Reset() { *x = CreateSKAdNetworkConversionValueSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSKAdNetworkConversionValueSchemaRequest) String() string { @@ -2637,7 +2557,7 @@ func (*CreateSKAdNetworkConversionValueSchemaRequest) ProtoMessage() {} func (x *CreateSKAdNetworkConversionValueSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2680,11 +2600,9 @@ type DeleteSKAdNetworkConversionValueSchemaRequest struct { func (x *DeleteSKAdNetworkConversionValueSchemaRequest) Reset() { *x = DeleteSKAdNetworkConversionValueSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSKAdNetworkConversionValueSchemaRequest) String() string { @@ -2695,7 +2613,7 @@ func (*DeleteSKAdNetworkConversionValueSchemaRequest) ProtoMessage() {} func (x *DeleteSKAdNetworkConversionValueSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2732,11 +2650,9 @@ type UpdateSKAdNetworkConversionValueSchemaRequest struct { func (x *UpdateSKAdNetworkConversionValueSchemaRequest) Reset() { *x = UpdateSKAdNetworkConversionValueSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSKAdNetworkConversionValueSchemaRequest) String() string { @@ -2747,7 +2663,7 @@ func (*UpdateSKAdNetworkConversionValueSchemaRequest) ProtoMessage() {} func (x *UpdateSKAdNetworkConversionValueSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2802,11 +2718,9 @@ type ListSKAdNetworkConversionValueSchemasRequest struct { func (x *ListSKAdNetworkConversionValueSchemasRequest) Reset() { *x = ListSKAdNetworkConversionValueSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSKAdNetworkConversionValueSchemasRequest) String() string { @@ -2817,7 +2731,7 @@ func (*ListSKAdNetworkConversionValueSchemasRequest) ProtoMessage() {} func (x *ListSKAdNetworkConversionValueSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2872,11 +2786,9 @@ type ListSKAdNetworkConversionValueSchemasResponse struct { func (x *ListSKAdNetworkConversionValueSchemasResponse) Reset() { *x = ListSKAdNetworkConversionValueSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSKAdNetworkConversionValueSchemasResponse) String() string { @@ -2887,7 +2799,7 @@ func (*ListSKAdNetworkConversionValueSchemasResponse) ProtoMessage() {} func (x *ListSKAdNetworkConversionValueSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2929,11 +2841,9 @@ type GetGoogleSignalsSettingsRequest struct { func (x *GetGoogleSignalsSettingsRequest) Reset() { *x = GetGoogleSignalsSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGoogleSignalsSettingsRequest) String() string { @@ -2944,7 +2854,7 @@ func (*GetGoogleSignalsSettingsRequest) ProtoMessage() {} func (x *GetGoogleSignalsSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2984,11 +2894,9 @@ type UpdateGoogleSignalsSettingsRequest struct { func (x *UpdateGoogleSignalsSettingsRequest) Reset() { *x = UpdateGoogleSignalsSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGoogleSignalsSettingsRequest) String() string { @@ -2999,7 +2907,7 @@ func (*UpdateGoogleSignalsSettingsRequest) ProtoMessage() {} func (x *UpdateGoogleSignalsSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3043,11 +2951,9 @@ type CreateConversionEventRequest struct { func (x *CreateConversionEventRequest) Reset() { *x = CreateConversionEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversionEventRequest) String() string { @@ -3058,7 +2964,7 @@ func (*CreateConversionEventRequest) ProtoMessage() {} func (x *CreateConversionEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3105,11 +3011,9 @@ type UpdateConversionEventRequest struct { func (x *UpdateConversionEventRequest) Reset() { *x = UpdateConversionEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversionEventRequest) String() string { @@ -3120,7 +3024,7 @@ func (*UpdateConversionEventRequest) ProtoMessage() {} func (x *UpdateConversionEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3163,11 +3067,9 @@ type GetConversionEventRequest struct { func (x *GetConversionEventRequest) Reset() { *x = GetConversionEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversionEventRequest) String() string { @@ -3178,7 +3080,7 @@ func (*GetConversionEventRequest) ProtoMessage() {} func (x *GetConversionEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3214,11 +3116,9 @@ type DeleteConversionEventRequest struct { func (x *DeleteConversionEventRequest) Reset() { *x = DeleteConversionEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversionEventRequest) String() string { @@ -3229,7 +3129,7 @@ func (*DeleteConversionEventRequest) ProtoMessage() {} func (x *DeleteConversionEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3273,11 +3173,9 @@ type ListConversionEventsRequest struct { func (x *ListConversionEventsRequest) Reset() { *x = ListConversionEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionEventsRequest) String() string { @@ -3288,7 +3186,7 @@ func (*ListConversionEventsRequest) ProtoMessage() {} func (x *ListConversionEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3339,11 +3237,9 @@ type ListConversionEventsResponse struct { func (x *ListConversionEventsResponse) Reset() { *x = ListConversionEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionEventsResponse) String() string { @@ -3354,7 +3250,7 @@ func (*ListConversionEventsResponse) ProtoMessage() {} func (x *ListConversionEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3398,11 +3294,9 @@ type CreateKeyEventRequest struct { func (x *CreateKeyEventRequest) Reset() { *x = CreateKeyEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyEventRequest) String() string { @@ -3413,7 +3307,7 @@ func (*CreateKeyEventRequest) ProtoMessage() {} func (x *CreateKeyEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3460,11 +3354,9 @@ type UpdateKeyEventRequest struct { func (x *UpdateKeyEventRequest) Reset() { *x = UpdateKeyEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKeyEventRequest) String() string { @@ -3475,7 +3367,7 @@ func (*UpdateKeyEventRequest) ProtoMessage() {} func (x *UpdateKeyEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3518,11 +3410,9 @@ type GetKeyEventRequest struct { func (x *GetKeyEventRequest) Reset() { *x = GetKeyEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyEventRequest) String() string { @@ -3533,7 +3423,7 @@ func (*GetKeyEventRequest) ProtoMessage() {} func (x *GetKeyEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3569,11 +3459,9 @@ type DeleteKeyEventRequest struct { func (x *DeleteKeyEventRequest) Reset() { *x = DeleteKeyEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKeyEventRequest) String() string { @@ -3584,7 +3472,7 @@ func (*DeleteKeyEventRequest) ProtoMessage() {} func (x *DeleteKeyEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3628,11 +3516,9 @@ type ListKeyEventsRequest struct { func (x *ListKeyEventsRequest) Reset() { *x = ListKeyEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyEventsRequest) String() string { @@ -3643,7 +3529,7 @@ func (*ListKeyEventsRequest) ProtoMessage() {} func (x *ListKeyEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3694,11 +3580,9 @@ type ListKeyEventsResponse struct { func (x *ListKeyEventsResponse) Reset() { *x = ListKeyEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyEventsResponse) String() string { @@ -3709,7 +3593,7 @@ func (*ListKeyEventsResponse) ProtoMessage() {} func (x *ListKeyEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3751,11 +3635,9 @@ type GetDisplayVideo360AdvertiserLinkRequest struct { func (x *GetDisplayVideo360AdvertiserLinkRequest) Reset() { *x = GetDisplayVideo360AdvertiserLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDisplayVideo360AdvertiserLinkRequest) String() string { @@ -3766,7 +3648,7 @@ func (*GetDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} func (x *GetDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3811,11 +3693,9 @@ type ListDisplayVideo360AdvertiserLinksRequest struct { func (x *ListDisplayVideo360AdvertiserLinksRequest) Reset() { *x = ListDisplayVideo360AdvertiserLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisplayVideo360AdvertiserLinksRequest) String() string { @@ -3826,7 +3706,7 @@ func (*ListDisplayVideo360AdvertiserLinksRequest) ProtoMessage() {} func (x *ListDisplayVideo360AdvertiserLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3877,11 +3757,9 @@ type ListDisplayVideo360AdvertiserLinksResponse struct { func (x *ListDisplayVideo360AdvertiserLinksResponse) Reset() { *x = ListDisplayVideo360AdvertiserLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisplayVideo360AdvertiserLinksResponse) String() string { @@ -3892,7 +3770,7 @@ func (*ListDisplayVideo360AdvertiserLinksResponse) ProtoMessage() {} func (x *ListDisplayVideo360AdvertiserLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3935,11 +3813,9 @@ type CreateDisplayVideo360AdvertiserLinkRequest struct { func (x *CreateDisplayVideo360AdvertiserLinkRequest) Reset() { *x = CreateDisplayVideo360AdvertiserLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDisplayVideo360AdvertiserLinkRequest) String() string { @@ -3950,7 +3826,7 @@ func (*CreateDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} func (x *CreateDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3992,11 +3868,9 @@ type DeleteDisplayVideo360AdvertiserLinkRequest struct { func (x *DeleteDisplayVideo360AdvertiserLinkRequest) Reset() { *x = DeleteDisplayVideo360AdvertiserLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDisplayVideo360AdvertiserLinkRequest) String() string { @@ -4007,7 +3881,7 @@ func (*DeleteDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} func (x *DeleteDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4045,11 +3919,9 @@ type UpdateDisplayVideo360AdvertiserLinkRequest struct { func (x *UpdateDisplayVideo360AdvertiserLinkRequest) Reset() { *x = UpdateDisplayVideo360AdvertiserLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDisplayVideo360AdvertiserLinkRequest) String() string { @@ -4060,7 +3932,7 @@ func (*UpdateDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} func (x *UpdateDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4102,11 +3974,9 @@ type GetDisplayVideo360AdvertiserLinkProposalRequest struct { func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) Reset() { *x = GetDisplayVideo360AdvertiserLinkProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) String() string { @@ -4117,7 +3987,7 @@ func (*GetDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4163,11 +4033,9 @@ type ListDisplayVideo360AdvertiserLinkProposalsRequest struct { func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) Reset() { *x = ListDisplayVideo360AdvertiserLinkProposalsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) String() string { @@ -4178,7 +4046,7 @@ func (*ListDisplayVideo360AdvertiserLinkProposalsRequest) ProtoMessage() {} func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4229,11 +4097,9 @@ type ListDisplayVideo360AdvertiserLinkProposalsResponse struct { func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) Reset() { *x = ListDisplayVideo360AdvertiserLinkProposalsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) String() string { @@ -4244,7 +4110,7 @@ func (*ListDisplayVideo360AdvertiserLinkProposalsResponse) ProtoMessage() {} func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4287,11 +4153,9 @@ type CreateDisplayVideo360AdvertiserLinkProposalRequest struct { func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) Reset() { *x = CreateDisplayVideo360AdvertiserLinkProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) String() string { @@ -4302,7 +4166,7 @@ func (*CreateDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4344,11 +4208,9 @@ type DeleteDisplayVideo360AdvertiserLinkProposalRequest struct { func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) Reset() { *x = DeleteDisplayVideo360AdvertiserLinkProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) String() string { @@ -4359,7 +4221,7 @@ func (*DeleteDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4394,11 +4256,9 @@ type ApproveDisplayVideo360AdvertiserLinkProposalRequest struct { func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) Reset() { *x = ApproveDisplayVideo360AdvertiserLinkProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) String() string { @@ -4409,7 +4269,7 @@ func (*ApproveDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4444,11 +4304,9 @@ type ApproveDisplayVideo360AdvertiserLinkProposalResponse struct { func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) Reset() { *x = ApproveDisplayVideo360AdvertiserLinkProposalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) String() string { @@ -4459,7 +4317,7 @@ func (*ApproveDisplayVideo360AdvertiserLinkProposalResponse) ProtoMessage() {} func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4494,11 +4352,9 @@ type CancelDisplayVideo360AdvertiserLinkProposalRequest struct { func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) Reset() { *x = CancelDisplayVideo360AdvertiserLinkProposalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) String() string { @@ -4509,7 +4365,7 @@ func (*CancelDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4544,11 +4400,9 @@ type GetSearchAds360LinkRequest struct { func (x *GetSearchAds360LinkRequest) Reset() { *x = GetSearchAds360LinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSearchAds360LinkRequest) String() string { @@ -4559,7 +4413,7 @@ func (*GetSearchAds360LinkRequest) ProtoMessage() {} func (x *GetSearchAds360LinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4604,11 +4458,9 @@ type ListSearchAds360LinksRequest struct { func (x *ListSearchAds360LinksRequest) Reset() { *x = ListSearchAds360LinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchAds360LinksRequest) String() string { @@ -4619,7 +4471,7 @@ func (*ListSearchAds360LinksRequest) ProtoMessage() {} func (x *ListSearchAds360LinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4670,11 +4522,9 @@ type ListSearchAds360LinksResponse struct { func (x *ListSearchAds360LinksResponse) Reset() { *x = ListSearchAds360LinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchAds360LinksResponse) String() string { @@ -4685,7 +4535,7 @@ func (*ListSearchAds360LinksResponse) ProtoMessage() {} func (x *ListSearchAds360LinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4728,11 +4578,9 @@ type CreateSearchAds360LinkRequest struct { func (x *CreateSearchAds360LinkRequest) Reset() { *x = CreateSearchAds360LinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSearchAds360LinkRequest) String() string { @@ -4743,7 +4591,7 @@ func (*CreateSearchAds360LinkRequest) ProtoMessage() {} func (x *CreateSearchAds360LinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4785,11 +4633,9 @@ type DeleteSearchAds360LinkRequest struct { func (x *DeleteSearchAds360LinkRequest) Reset() { *x = DeleteSearchAds360LinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSearchAds360LinkRequest) String() string { @@ -4800,7 +4646,7 @@ func (*DeleteSearchAds360LinkRequest) ProtoMessage() {} func (x *DeleteSearchAds360LinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4838,11 +4684,9 @@ type UpdateSearchAds360LinkRequest struct { func (x *UpdateSearchAds360LinkRequest) Reset() { *x = UpdateSearchAds360LinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSearchAds360LinkRequest) String() string { @@ -4853,7 +4697,7 @@ func (*UpdateSearchAds360LinkRequest) ProtoMessage() {} func (x *UpdateSearchAds360LinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4896,11 +4740,9 @@ type CreateCustomDimensionRequest struct { func (x *CreateCustomDimensionRequest) Reset() { *x = CreateCustomDimensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomDimensionRequest) String() string { @@ -4911,7 +4753,7 @@ func (*CreateCustomDimensionRequest) ProtoMessage() {} func (x *CreateCustomDimensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4956,11 +4798,9 @@ type UpdateCustomDimensionRequest struct { func (x *UpdateCustomDimensionRequest) Reset() { *x = UpdateCustomDimensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomDimensionRequest) String() string { @@ -4971,7 +4811,7 @@ func (*UpdateCustomDimensionRequest) ProtoMessage() {} func (x *UpdateCustomDimensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5022,11 +4862,9 @@ type ListCustomDimensionsRequest struct { func (x *ListCustomDimensionsRequest) Reset() { *x = ListCustomDimensionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomDimensionsRequest) String() string { @@ -5037,7 +4875,7 @@ func (*ListCustomDimensionsRequest) ProtoMessage() {} func (x *ListCustomDimensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5088,11 +4926,9 @@ type ListCustomDimensionsResponse struct { func (x *ListCustomDimensionsResponse) Reset() { *x = ListCustomDimensionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomDimensionsResponse) String() string { @@ -5103,7 +4939,7 @@ func (*ListCustomDimensionsResponse) ProtoMessage() {} func (x *ListCustomDimensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5145,11 +4981,9 @@ type ArchiveCustomDimensionRequest struct { func (x *ArchiveCustomDimensionRequest) Reset() { *x = ArchiveCustomDimensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveCustomDimensionRequest) String() string { @@ -5160,7 +4994,7 @@ func (*ArchiveCustomDimensionRequest) ProtoMessage() {} func (x *ArchiveCustomDimensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5195,11 +5029,9 @@ type GetCustomDimensionRequest struct { func (x *GetCustomDimensionRequest) Reset() { *x = GetCustomDimensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomDimensionRequest) String() string { @@ -5210,7 +5042,7 @@ func (*GetCustomDimensionRequest) ProtoMessage() {} func (x *GetCustomDimensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5246,11 +5078,9 @@ type CreateCustomMetricRequest struct { func (x *CreateCustomMetricRequest) Reset() { *x = CreateCustomMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomMetricRequest) String() string { @@ -5261,7 +5091,7 @@ func (*CreateCustomMetricRequest) ProtoMessage() {} func (x *CreateCustomMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5306,11 +5136,9 @@ type UpdateCustomMetricRequest struct { func (x *UpdateCustomMetricRequest) Reset() { *x = UpdateCustomMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomMetricRequest) String() string { @@ -5321,7 +5149,7 @@ func (*UpdateCustomMetricRequest) ProtoMessage() {} func (x *UpdateCustomMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5372,11 +5200,9 @@ type ListCustomMetricsRequest struct { func (x *ListCustomMetricsRequest) Reset() { *x = ListCustomMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomMetricsRequest) String() string { @@ -5387,7 +5213,7 @@ func (*ListCustomMetricsRequest) ProtoMessage() {} func (x *ListCustomMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5438,11 +5264,9 @@ type ListCustomMetricsResponse struct { func (x *ListCustomMetricsResponse) Reset() { *x = ListCustomMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomMetricsResponse) String() string { @@ -5453,7 +5277,7 @@ func (*ListCustomMetricsResponse) ProtoMessage() {} func (x *ListCustomMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5495,11 +5319,9 @@ type ArchiveCustomMetricRequest struct { func (x *ArchiveCustomMetricRequest) Reset() { *x = ArchiveCustomMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveCustomMetricRequest) String() string { @@ -5510,7 +5332,7 @@ func (*ArchiveCustomMetricRequest) ProtoMessage() {} func (x *ArchiveCustomMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5545,11 +5367,9 @@ type GetCustomMetricRequest struct { func (x *GetCustomMetricRequest) Reset() { *x = GetCustomMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomMetricRequest) String() string { @@ -5560,7 +5380,7 @@ func (*GetCustomMetricRequest) ProtoMessage() {} func (x *GetCustomMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5606,11 +5426,9 @@ type CreateCalculatedMetricRequest struct { func (x *CreateCalculatedMetricRequest) Reset() { *x = CreateCalculatedMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCalculatedMetricRequest) String() string { @@ -5621,7 +5439,7 @@ func (*CreateCalculatedMetricRequest) ProtoMessage() {} func (x *CreateCalculatedMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5673,11 +5491,9 @@ type UpdateCalculatedMetricRequest struct { func (x *UpdateCalculatedMetricRequest) Reset() { *x = UpdateCalculatedMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCalculatedMetricRequest) String() string { @@ -5688,7 +5504,7 @@ func (*UpdateCalculatedMetricRequest) ProtoMessage() {} func (x *UpdateCalculatedMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5731,11 +5547,9 @@ type DeleteCalculatedMetricRequest struct { func (x *DeleteCalculatedMetricRequest) Reset() { *x = DeleteCalculatedMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCalculatedMetricRequest) String() string { @@ -5746,7 +5560,7 @@ func (*DeleteCalculatedMetricRequest) ProtoMessage() {} func (x *DeleteCalculatedMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5790,11 +5604,9 @@ type ListCalculatedMetricsRequest struct { func (x *ListCalculatedMetricsRequest) Reset() { *x = ListCalculatedMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCalculatedMetricsRequest) String() string { @@ -5805,7 +5617,7 @@ func (*ListCalculatedMetricsRequest) ProtoMessage() {} func (x *ListCalculatedMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5856,11 +5668,9 @@ type ListCalculatedMetricsResponse struct { func (x *ListCalculatedMetricsResponse) Reset() { *x = ListCalculatedMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCalculatedMetricsResponse) String() string { @@ -5871,7 +5681,7 @@ func (*ListCalculatedMetricsResponse) ProtoMessage() {} func (x *ListCalculatedMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5914,11 +5724,9 @@ type GetCalculatedMetricRequest struct { func (x *GetCalculatedMetricRequest) Reset() { *x = GetCalculatedMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCalculatedMetricRequest) String() string { @@ -5929,7 +5737,7 @@ func (*GetCalculatedMetricRequest) ProtoMessage() {} func (x *GetCalculatedMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5966,11 +5774,9 @@ type GetDataRetentionSettingsRequest struct { func (x *GetDataRetentionSettingsRequest) Reset() { *x = GetDataRetentionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataRetentionSettingsRequest) String() string { @@ -5981,7 +5787,7 @@ func (*GetDataRetentionSettingsRequest) ProtoMessage() {} func (x *GetDataRetentionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6021,11 +5827,9 @@ type UpdateDataRetentionSettingsRequest struct { func (x *UpdateDataRetentionSettingsRequest) Reset() { *x = UpdateDataRetentionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataRetentionSettingsRequest) String() string { @@ -6036,7 +5840,7 @@ func (*UpdateDataRetentionSettingsRequest) ProtoMessage() {} func (x *UpdateDataRetentionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6079,11 +5883,9 @@ type CreateDataStreamRequest struct { func (x *CreateDataStreamRequest) Reset() { *x = CreateDataStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStreamRequest) String() string { @@ -6094,7 +5896,7 @@ func (*CreateDataStreamRequest) ProtoMessage() {} func (x *CreateDataStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6136,11 +5938,9 @@ type DeleteDataStreamRequest struct { func (x *DeleteDataStreamRequest) Reset() { *x = DeleteDataStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStreamRequest) String() string { @@ -6151,7 +5951,7 @@ func (*DeleteDataStreamRequest) ProtoMessage() {} func (x *DeleteDataStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6189,11 +5989,9 @@ type UpdateDataStreamRequest struct { func (x *UpdateDataStreamRequest) Reset() { *x = UpdateDataStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataStreamRequest) String() string { @@ -6204,7 +6002,7 @@ func (*UpdateDataStreamRequest) ProtoMessage() {} func (x *UpdateDataStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6255,11 +6053,9 @@ type ListDataStreamsRequest struct { func (x *ListDataStreamsRequest) Reset() { *x = ListDataStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStreamsRequest) String() string { @@ -6270,7 +6066,7 @@ func (*ListDataStreamsRequest) ProtoMessage() {} func (x *ListDataStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6321,11 +6117,9 @@ type ListDataStreamsResponse struct { func (x *ListDataStreamsResponse) Reset() { *x = ListDataStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStreamsResponse) String() string { @@ -6336,7 +6130,7 @@ func (*ListDataStreamsResponse) ProtoMessage() {} func (x *ListDataStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6378,11 +6172,9 @@ type GetDataStreamRequest struct { func (x *GetDataStreamRequest) Reset() { *x = GetDataStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataStreamRequest) String() string { @@ -6393,7 +6185,7 @@ func (*GetDataStreamRequest) ProtoMessage() {} func (x *GetDataStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6428,11 +6220,9 @@ type GetAudienceRequest struct { func (x *GetAudienceRequest) Reset() { *x = GetAudienceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAudienceRequest) String() string { @@ -6443,7 +6233,7 @@ func (*GetAudienceRequest) ProtoMessage() {} func (x *GetAudienceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6487,11 +6277,9 @@ type ListAudiencesRequest struct { func (x *ListAudiencesRequest) Reset() { *x = ListAudiencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAudiencesRequest) String() string { @@ -6502,7 +6290,7 @@ func (*ListAudiencesRequest) ProtoMessage() {} func (x *ListAudiencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6553,11 +6341,9 @@ type ListAudiencesResponse struct { func (x *ListAudiencesResponse) Reset() { *x = ListAudiencesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAudiencesResponse) String() string { @@ -6568,7 +6354,7 @@ func (*ListAudiencesResponse) ProtoMessage() {} func (x *ListAudiencesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6611,11 +6397,9 @@ type CreateAudienceRequest struct { func (x *CreateAudienceRequest) Reset() { *x = CreateAudienceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAudienceRequest) String() string { @@ -6626,7 +6410,7 @@ func (*CreateAudienceRequest) ProtoMessage() {} func (x *CreateAudienceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6673,11 +6457,9 @@ type UpdateAudienceRequest struct { func (x *UpdateAudienceRequest) Reset() { *x = UpdateAudienceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAudienceRequest) String() string { @@ -6688,7 +6470,7 @@ func (*UpdateAudienceRequest) ProtoMessage() {} func (x *UpdateAudienceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6729,11 +6511,9 @@ type ArchiveAudienceRequest struct { func (x *ArchiveAudienceRequest) Reset() { *x = ArchiveAudienceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveAudienceRequest) String() string { @@ -6744,7 +6524,7 @@ func (*ArchiveAudienceRequest) ProtoMessage() {} func (x *ArchiveAudienceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6779,11 +6559,9 @@ type GetAttributionSettingsRequest struct { func (x *GetAttributionSettingsRequest) Reset() { *x = GetAttributionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttributionSettingsRequest) String() string { @@ -6794,7 +6572,7 @@ func (*GetAttributionSettingsRequest) ProtoMessage() {} func (x *GetAttributionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6834,11 +6612,9 @@ type UpdateAttributionSettingsRequest struct { func (x *UpdateAttributionSettingsRequest) Reset() { *x = UpdateAttributionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttributionSettingsRequest) String() string { @@ -6849,7 +6625,7 @@ func (*UpdateAttributionSettingsRequest) ProtoMessage() {} func (x *UpdateAttributionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6893,11 +6669,9 @@ type GetAccessBindingRequest struct { func (x *GetAccessBindingRequest) Reset() { *x = GetAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccessBindingRequest) String() string { @@ -6908,7 +6682,7 @@ func (*GetAccessBindingRequest) ProtoMessage() {} func (x *GetAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6952,11 +6726,9 @@ type BatchGetAccessBindingsRequest struct { func (x *BatchGetAccessBindingsRequest) Reset() { *x = BatchGetAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetAccessBindingsRequest) String() string { @@ -6967,7 +6739,7 @@ func (*BatchGetAccessBindingsRequest) ProtoMessage() {} func (x *BatchGetAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7008,11 +6780,9 @@ type BatchGetAccessBindingsResponse struct { func (x *BatchGetAccessBindingsResponse) Reset() { *x = BatchGetAccessBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetAccessBindingsResponse) String() string { @@ -7023,7 +6793,7 @@ func (*BatchGetAccessBindingsResponse) ProtoMessage() {} func (x *BatchGetAccessBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7069,11 +6839,9 @@ type ListAccessBindingsRequest struct { func (x *ListAccessBindingsRequest) Reset() { *x = ListAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessBindingsRequest) String() string { @@ -7084,7 +6852,7 @@ func (*ListAccessBindingsRequest) ProtoMessage() {} func (x *ListAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7136,11 +6904,9 @@ type ListAccessBindingsResponse struct { func (x *ListAccessBindingsResponse) Reset() { *x = ListAccessBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessBindingsResponse) String() string { @@ -7151,7 +6917,7 @@ func (*ListAccessBindingsResponse) ProtoMessage() {} func (x *ListAccessBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7196,11 +6962,9 @@ type CreateAccessBindingRequest struct { func (x *CreateAccessBindingRequest) Reset() { *x = CreateAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAccessBindingRequest) String() string { @@ -7211,7 +6975,7 @@ func (*CreateAccessBindingRequest) ProtoMessage() {} func (x *CreateAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7259,11 +7023,9 @@ type BatchCreateAccessBindingsRequest struct { func (x *BatchCreateAccessBindingsRequest) Reset() { *x = BatchCreateAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateAccessBindingsRequest) String() string { @@ -7274,7 +7036,7 @@ func (*BatchCreateAccessBindingsRequest) ProtoMessage() {} func (x *BatchCreateAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7315,11 +7077,9 @@ type BatchCreateAccessBindingsResponse struct { func (x *BatchCreateAccessBindingsResponse) Reset() { *x = BatchCreateAccessBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateAccessBindingsResponse) String() string { @@ -7330,7 +7090,7 @@ func (*BatchCreateAccessBindingsResponse) ProtoMessage() {} func (x *BatchCreateAccessBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7364,11 +7124,9 @@ type UpdateAccessBindingRequest struct { func (x *UpdateAccessBindingRequest) Reset() { *x = UpdateAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccessBindingRequest) String() string { @@ -7379,7 +7137,7 @@ func (*UpdateAccessBindingRequest) ProtoMessage() {} func (x *UpdateAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7421,11 +7179,9 @@ type BatchUpdateAccessBindingsRequest struct { func (x *BatchUpdateAccessBindingsRequest) Reset() { *x = BatchUpdateAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateAccessBindingsRequest) String() string { @@ -7436,7 +7192,7 @@ func (*BatchUpdateAccessBindingsRequest) ProtoMessage() {} func (x *BatchUpdateAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7477,11 +7233,9 @@ type BatchUpdateAccessBindingsResponse struct { func (x *BatchUpdateAccessBindingsResponse) Reset() { *x = BatchUpdateAccessBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateAccessBindingsResponse) String() string { @@ -7492,7 +7246,7 @@ func (*BatchUpdateAccessBindingsResponse) ProtoMessage() {} func (x *BatchUpdateAccessBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7528,11 +7282,9 @@ type DeleteAccessBindingRequest struct { func (x *DeleteAccessBindingRequest) Reset() { *x = DeleteAccessBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccessBindingRequest) String() string { @@ -7543,7 +7295,7 @@ func (*DeleteAccessBindingRequest) ProtoMessage() {} func (x *DeleteAccessBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7584,11 +7336,9 @@ type BatchDeleteAccessBindingsRequest struct { func (x *BatchDeleteAccessBindingsRequest) Reset() { *x = BatchDeleteAccessBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteAccessBindingsRequest) String() string { @@ -7599,7 +7349,7 @@ func (*BatchDeleteAccessBindingsRequest) ProtoMessage() {} func (x *BatchDeleteAccessBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7642,11 +7392,9 @@ type CreateExpandedDataSetRequest struct { func (x *CreateExpandedDataSetRequest) Reset() { *x = CreateExpandedDataSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExpandedDataSetRequest) String() string { @@ -7657,7 +7405,7 @@ func (*CreateExpandedDataSetRequest) ProtoMessage() {} func (x *CreateExpandedDataSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7705,11 +7453,9 @@ type UpdateExpandedDataSetRequest struct { func (x *UpdateExpandedDataSetRequest) Reset() { *x = UpdateExpandedDataSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExpandedDataSetRequest) String() string { @@ -7720,7 +7466,7 @@ func (*UpdateExpandedDataSetRequest) ProtoMessage() {} func (x *UpdateExpandedDataSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7761,11 +7507,9 @@ type DeleteExpandedDataSetRequest struct { func (x *DeleteExpandedDataSetRequest) Reset() { *x = DeleteExpandedDataSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExpandedDataSetRequest) String() string { @@ -7776,7 +7520,7 @@ func (*DeleteExpandedDataSetRequest) ProtoMessage() {} func (x *DeleteExpandedDataSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7811,11 +7555,9 @@ type GetExpandedDataSetRequest struct { func (x *GetExpandedDataSetRequest) Reset() { *x = GetExpandedDataSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExpandedDataSetRequest) String() string { @@ -7826,7 +7568,7 @@ func (*GetExpandedDataSetRequest) ProtoMessage() {} func (x *GetExpandedDataSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7870,11 +7612,9 @@ type ListExpandedDataSetsRequest struct { func (x *ListExpandedDataSetsRequest) Reset() { *x = ListExpandedDataSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExpandedDataSetsRequest) String() string { @@ -7885,7 +7625,7 @@ func (*ListExpandedDataSetsRequest) ProtoMessage() {} func (x *ListExpandedDataSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7937,11 +7677,9 @@ type ListExpandedDataSetsResponse struct { func (x *ListExpandedDataSetsResponse) Reset() { *x = ListExpandedDataSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExpandedDataSetsResponse) String() string { @@ -7952,7 +7690,7 @@ func (*ListExpandedDataSetsResponse) ProtoMessage() {} func (x *ListExpandedDataSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7996,11 +7734,9 @@ type CreateChannelGroupRequest struct { func (x *CreateChannelGroupRequest) Reset() { *x = CreateChannelGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelGroupRequest) String() string { @@ -8011,7 +7747,7 @@ func (*CreateChannelGroupRequest) ProtoMessage() {} func (x *CreateChannelGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8059,11 +7795,9 @@ type UpdateChannelGroupRequest struct { func (x *UpdateChannelGroupRequest) Reset() { *x = UpdateChannelGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChannelGroupRequest) String() string { @@ -8074,7 +7808,7 @@ func (*UpdateChannelGroupRequest) ProtoMessage() {} func (x *UpdateChannelGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8116,11 +7850,9 @@ type DeleteChannelGroupRequest struct { func (x *DeleteChannelGroupRequest) Reset() { *x = DeleteChannelGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChannelGroupRequest) String() string { @@ -8131,7 +7863,7 @@ func (*DeleteChannelGroupRequest) ProtoMessage() {} func (x *DeleteChannelGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8166,11 +7898,9 @@ type GetChannelGroupRequest struct { func (x *GetChannelGroupRequest) Reset() { *x = GetChannelGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelGroupRequest) String() string { @@ -8181,7 +7911,7 @@ func (*GetChannelGroupRequest) ProtoMessage() {} func (x *GetChannelGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8226,11 +7956,9 @@ type ListChannelGroupsRequest struct { func (x *ListChannelGroupsRequest) Reset() { *x = ListChannelGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelGroupsRequest) String() string { @@ -8241,7 +7969,7 @@ func (*ListChannelGroupsRequest) ProtoMessage() {} func (x *ListChannelGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8293,11 +8021,9 @@ type ListChannelGroupsResponse struct { func (x *ListChannelGroupsResponse) Reset() { *x = ListChannelGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelGroupsResponse) String() string { @@ -8308,7 +8034,7 @@ func (*ListChannelGroupsResponse) ProtoMessage() {} func (x *ListChannelGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8354,11 +8080,9 @@ type SetAutomatedGa4ConfigurationOptOutRequest struct { func (x *SetAutomatedGa4ConfigurationOptOutRequest) Reset() { *x = SetAutomatedGa4ConfigurationOptOutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetAutomatedGa4ConfigurationOptOutRequest) String() string { @@ -8369,7 +8093,7 @@ func (*SetAutomatedGa4ConfigurationOptOutRequest) ProtoMessage() {} func (x *SetAutomatedGa4ConfigurationOptOutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8408,11 +8132,9 @@ type SetAutomatedGa4ConfigurationOptOutResponse struct { func (x *SetAutomatedGa4ConfigurationOptOutResponse) Reset() { *x = SetAutomatedGa4ConfigurationOptOutResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetAutomatedGa4ConfigurationOptOutResponse) String() string { @@ -8423,7 +8145,7 @@ func (*SetAutomatedGa4ConfigurationOptOutResponse) ProtoMessage() {} func (x *SetAutomatedGa4ConfigurationOptOutResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8453,11 +8175,9 @@ type FetchAutomatedGa4ConfigurationOptOutRequest struct { func (x *FetchAutomatedGa4ConfigurationOptOutRequest) Reset() { *x = FetchAutomatedGa4ConfigurationOptOutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchAutomatedGa4ConfigurationOptOutRequest) String() string { @@ -8468,7 +8188,7 @@ func (*FetchAutomatedGa4ConfigurationOptOutRequest) ProtoMessage() {} func (x *FetchAutomatedGa4ConfigurationOptOutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8503,11 +8223,9 @@ type FetchAutomatedGa4ConfigurationOptOutResponse struct { func (x *FetchAutomatedGa4ConfigurationOptOutResponse) Reset() { *x = FetchAutomatedGa4ConfigurationOptOutResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchAutomatedGa4ConfigurationOptOutResponse) String() string { @@ -8518,7 +8236,7 @@ func (*FetchAutomatedGa4ConfigurationOptOutResponse) ProtoMessage() {} func (x *FetchAutomatedGa4ConfigurationOptOutResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8554,11 +8272,9 @@ type CreateBigQueryLinkRequest struct { func (x *CreateBigQueryLinkRequest) Reset() { *x = CreateBigQueryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBigQueryLinkRequest) String() string { @@ -8569,7 +8285,7 @@ func (*CreateBigQueryLinkRequest) ProtoMessage() {} func (x *CreateBigQueryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8612,11 +8328,9 @@ type GetBigQueryLinkRequest struct { func (x *GetBigQueryLinkRequest) Reset() { *x = GetBigQueryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBigQueryLinkRequest) String() string { @@ -8627,7 +8341,7 @@ func (*GetBigQueryLinkRequest) ProtoMessage() {} func (x *GetBigQueryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8673,11 +8387,9 @@ type ListBigQueryLinksRequest struct { func (x *ListBigQueryLinksRequest) Reset() { *x = ListBigQueryLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryLinksRequest) String() string { @@ -8688,7 +8400,7 @@ func (*ListBigQueryLinksRequest) ProtoMessage() {} func (x *ListBigQueryLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8739,11 +8451,9 @@ type ListBigQueryLinksResponse struct { func (x *ListBigQueryLinksResponse) Reset() { *x = ListBigQueryLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryLinksResponse) String() string { @@ -8754,7 +8464,7 @@ func (*ListBigQueryLinksResponse) ProtoMessage() {} func (x *ListBigQueryLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8801,11 +8511,9 @@ type UpdateBigQueryLinkRequest struct { func (x *UpdateBigQueryLinkRequest) Reset() { *x = UpdateBigQueryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBigQueryLinkRequest) String() string { @@ -8816,7 +8524,7 @@ func (*UpdateBigQueryLinkRequest) ProtoMessage() {} func (x *UpdateBigQueryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8858,11 +8566,9 @@ type DeleteBigQueryLinkRequest struct { func (x *DeleteBigQueryLinkRequest) Reset() { *x = DeleteBigQueryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBigQueryLinkRequest) String() string { @@ -8873,7 +8579,7 @@ func (*DeleteBigQueryLinkRequest) ProtoMessage() {} func (x *DeleteBigQueryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8910,11 +8616,9 @@ type GetEnhancedMeasurementSettingsRequest struct { func (x *GetEnhancedMeasurementSettingsRequest) Reset() { *x = GetEnhancedMeasurementSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnhancedMeasurementSettingsRequest) String() string { @@ -8925,7 +8629,7 @@ func (*GetEnhancedMeasurementSettingsRequest) ProtoMessage() {} func (x *GetEnhancedMeasurementSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8965,11 +8669,9 @@ type UpdateEnhancedMeasurementSettingsRequest struct { func (x *UpdateEnhancedMeasurementSettingsRequest) Reset() { *x = UpdateEnhancedMeasurementSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnhancedMeasurementSettingsRequest) String() string { @@ -8980,7 +8682,7 @@ func (*UpdateEnhancedMeasurementSettingsRequest) ProtoMessage() {} func (x *UpdateEnhancedMeasurementSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9024,11 +8726,9 @@ type GetDataRedactionSettingsRequest struct { func (x *GetDataRedactionSettingsRequest) Reset() { *x = GetDataRedactionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataRedactionSettingsRequest) String() string { @@ -9039,7 +8739,7 @@ func (*GetDataRedactionSettingsRequest) ProtoMessage() {} func (x *GetDataRedactionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9079,11 +8779,9 @@ type UpdateDataRedactionSettingsRequest struct { func (x *UpdateDataRedactionSettingsRequest) Reset() { *x = UpdateDataRedactionSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataRedactionSettingsRequest) String() string { @@ -9094,7 +8792,7 @@ func (*UpdateDataRedactionSettingsRequest) ProtoMessage() {} func (x *UpdateDataRedactionSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9140,11 +8838,9 @@ type CreateConnectedSiteTagRequest struct { func (x *CreateConnectedSiteTagRequest) Reset() { *x = CreateConnectedSiteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectedSiteTagRequest) String() string { @@ -9155,7 +8851,7 @@ func (*CreateConnectedSiteTagRequest) ProtoMessage() {} func (x *CreateConnectedSiteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9193,11 +8889,9 @@ type CreateConnectedSiteTagResponse struct { func (x *CreateConnectedSiteTagResponse) Reset() { *x = CreateConnectedSiteTagResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectedSiteTagResponse) String() string { @@ -9208,7 +8902,7 @@ func (*CreateConnectedSiteTagResponse) ProtoMessage() {} func (x *CreateConnectedSiteTagResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9241,11 +8935,9 @@ type DeleteConnectedSiteTagRequest struct { func (x *DeleteConnectedSiteTagRequest) Reset() { *x = DeleteConnectedSiteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectedSiteTagRequest) String() string { @@ -9256,7 +8948,7 @@ func (*DeleteConnectedSiteTagRequest) ProtoMessage() {} func (x *DeleteConnectedSiteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9300,11 +8992,9 @@ type ListConnectedSiteTagsRequest struct { func (x *ListConnectedSiteTagsRequest) Reset() { *x = ListConnectedSiteTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectedSiteTagsRequest) String() string { @@ -9315,7 +9005,7 @@ func (*ListConnectedSiteTagsRequest) ProtoMessage() {} func (x *ListConnectedSiteTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9350,11 +9040,9 @@ type ListConnectedSiteTagsResponse struct { func (x *ListConnectedSiteTagsResponse) Reset() { *x = ListConnectedSiteTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectedSiteTagsResponse) String() string { @@ -9365,7 +9053,7 @@ func (*ListConnectedSiteTagsResponse) ProtoMessage() {} func (x *ListConnectedSiteTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9403,11 +9091,9 @@ type CreateAdSenseLinkRequest struct { func (x *CreateAdSenseLinkRequest) Reset() { *x = CreateAdSenseLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAdSenseLinkRequest) String() string { @@ -9418,7 +9104,7 @@ func (*CreateAdSenseLinkRequest) ProtoMessage() {} func (x *CreateAdSenseLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9461,11 +9147,9 @@ type GetAdSenseLinkRequest struct { func (x *GetAdSenseLinkRequest) Reset() { *x = GetAdSenseLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAdSenseLinkRequest) String() string { @@ -9476,7 +9160,7 @@ func (*GetAdSenseLinkRequest) ProtoMessage() {} func (x *GetAdSenseLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9512,11 +9196,9 @@ type DeleteAdSenseLinkRequest struct { func (x *DeleteAdSenseLinkRequest) Reset() { *x = DeleteAdSenseLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAdSenseLinkRequest) String() string { @@ -9527,7 +9209,7 @@ func (*DeleteAdSenseLinkRequest) ProtoMessage() {} func (x *DeleteAdSenseLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9573,11 +9255,9 @@ type ListAdSenseLinksRequest struct { func (x *ListAdSenseLinksRequest) Reset() { *x = ListAdSenseLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdSenseLinksRequest) String() string { @@ -9588,7 +9268,7 @@ func (*ListAdSenseLinksRequest) ProtoMessage() {} func (x *ListAdSenseLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9639,11 +9319,9 @@ type ListAdSenseLinksResponse struct { func (x *ListAdSenseLinksResponse) Reset() { *x = ListAdSenseLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdSenseLinksResponse) String() string { @@ -9654,7 +9332,7 @@ func (*ListAdSenseLinksResponse) ProtoMessage() {} func (x *ListAdSenseLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9699,11 +9377,9 @@ type FetchConnectedGa4PropertyRequest struct { func (x *FetchConnectedGa4PropertyRequest) Reset() { *x = FetchConnectedGa4PropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchConnectedGa4PropertyRequest) String() string { @@ -9714,7 +9390,7 @@ func (*FetchConnectedGa4PropertyRequest) ProtoMessage() {} func (x *FetchConnectedGa4PropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9751,11 +9427,9 @@ type FetchConnectedGa4PropertyResponse struct { func (x *FetchConnectedGa4PropertyResponse) Reset() { *x = FetchConnectedGa4PropertyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchConnectedGa4PropertyResponse) String() string { @@ -9766,7 +9440,7 @@ func (*FetchConnectedGa4PropertyResponse) ProtoMessage() {} func (x *FetchConnectedGa4PropertyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9802,11 +9476,9 @@ type CreateEventCreateRuleRequest struct { func (x *CreateEventCreateRuleRequest) Reset() { *x = CreateEventCreateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventCreateRuleRequest) String() string { @@ -9817,7 +9489,7 @@ func (*CreateEventCreateRuleRequest) ProtoMessage() {} func (x *CreateEventCreateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9865,11 +9537,9 @@ type UpdateEventCreateRuleRequest struct { func (x *UpdateEventCreateRuleRequest) Reset() { *x = UpdateEventCreateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventCreateRuleRequest) String() string { @@ -9880,7 +9550,7 @@ func (*UpdateEventCreateRuleRequest) ProtoMessage() {} func (x *UpdateEventCreateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9922,11 +9592,9 @@ type DeleteEventCreateRuleRequest struct { func (x *DeleteEventCreateRuleRequest) Reset() { *x = DeleteEventCreateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventCreateRuleRequest) String() string { @@ -9937,7 +9605,7 @@ func (*DeleteEventCreateRuleRequest) ProtoMessage() {} func (x *DeleteEventCreateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9972,11 +9640,9 @@ type GetEventCreateRuleRequest struct { func (x *GetEventCreateRuleRequest) Reset() { *x = GetEventCreateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventCreateRuleRequest) String() string { @@ -9987,7 +9653,7 @@ func (*GetEventCreateRuleRequest) ProtoMessage() {} func (x *GetEventCreateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10031,11 +9697,9 @@ type ListEventCreateRulesRequest struct { func (x *ListEventCreateRulesRequest) Reset() { *x = ListEventCreateRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventCreateRulesRequest) String() string { @@ -10046,7 +9710,7 @@ func (*ListEventCreateRulesRequest) ProtoMessage() {} func (x *ListEventCreateRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10098,11 +9762,9 @@ type ListEventCreateRulesResponse struct { func (x *ListEventCreateRulesResponse) Reset() { *x = ListEventCreateRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventCreateRulesResponse) String() string { @@ -10113,7 +9775,7 @@ func (*ListEventCreateRulesResponse) ProtoMessage() {} func (x *ListEventCreateRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10156,11 +9818,9 @@ type CreateEventEditRuleRequest struct { func (x *CreateEventEditRuleRequest) Reset() { *x = CreateEventEditRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventEditRuleRequest) String() string { @@ -10171,7 +9831,7 @@ func (*CreateEventEditRuleRequest) ProtoMessage() {} func (x *CreateEventEditRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10219,11 +9879,9 @@ type UpdateEventEditRuleRequest struct { func (x *UpdateEventEditRuleRequest) Reset() { *x = UpdateEventEditRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventEditRuleRequest) String() string { @@ -10234,7 +9892,7 @@ func (*UpdateEventEditRuleRequest) ProtoMessage() {} func (x *UpdateEventEditRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10275,11 +9933,9 @@ type DeleteEventEditRuleRequest struct { func (x *DeleteEventEditRuleRequest) Reset() { *x = DeleteEventEditRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventEditRuleRequest) String() string { @@ -10290,7 +9946,7 @@ func (*DeleteEventEditRuleRequest) ProtoMessage() {} func (x *DeleteEventEditRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10325,11 +9981,9 @@ type GetEventEditRuleRequest struct { func (x *GetEventEditRuleRequest) Reset() { *x = GetEventEditRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventEditRuleRequest) String() string { @@ -10340,7 +9994,7 @@ func (*GetEventEditRuleRequest) ProtoMessage() {} func (x *GetEventEditRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10384,11 +10038,9 @@ type ListEventEditRulesRequest struct { func (x *ListEventEditRulesRequest) Reset() { *x = ListEventEditRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventEditRulesRequest) String() string { @@ -10399,7 +10051,7 @@ func (*ListEventEditRulesRequest) ProtoMessage() {} func (x *ListEventEditRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10451,11 +10103,9 @@ type ListEventEditRulesResponse struct { func (x *ListEventEditRulesResponse) Reset() { *x = ListEventEditRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventEditRulesResponse) String() string { @@ -10466,7 +10116,7 @@ func (*ListEventEditRulesResponse) ProtoMessage() {} func (x *ListEventEditRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10511,11 +10161,9 @@ type ReorderEventEditRulesRequest struct { func (x *ReorderEventEditRulesRequest) Reset() { *x = ReorderEventEditRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReorderEventEditRulesRequest) String() string { @@ -10526,7 +10174,7 @@ func (*ReorderEventEditRulesRequest) ProtoMessage() {} func (x *ReorderEventEditRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10570,11 +10218,9 @@ type CreateRollupPropertyRequest struct { func (x *CreateRollupPropertyRequest) Reset() { *x = CreateRollupPropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRollupPropertyRequest) String() string { @@ -10585,7 +10231,7 @@ func (*CreateRollupPropertyRequest) ProtoMessage() {} func (x *CreateRollupPropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10628,11 +10274,9 @@ type CreateRollupPropertyResponse struct { func (x *CreateRollupPropertyResponse) Reset() { *x = CreateRollupPropertyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRollupPropertyResponse) String() string { @@ -10643,7 +10287,7 @@ func (*CreateRollupPropertyResponse) ProtoMessage() {} func (x *CreateRollupPropertyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10687,11 +10331,9 @@ type GetRollupPropertySourceLinkRequest struct { func (x *GetRollupPropertySourceLinkRequest) Reset() { *x = GetRollupPropertySourceLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRollupPropertySourceLinkRequest) String() string { @@ -10702,7 +10344,7 @@ func (*GetRollupPropertySourceLinkRequest) ProtoMessage() {} func (x *GetRollupPropertySourceLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10748,11 +10390,9 @@ type ListRollupPropertySourceLinksRequest struct { func (x *ListRollupPropertySourceLinksRequest) Reset() { *x = ListRollupPropertySourceLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRollupPropertySourceLinksRequest) String() string { @@ -10763,7 +10403,7 @@ func (*ListRollupPropertySourceLinksRequest) ProtoMessage() {} func (x *ListRollupPropertySourceLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10814,11 +10454,9 @@ type ListRollupPropertySourceLinksResponse struct { func (x *ListRollupPropertySourceLinksResponse) Reset() { *x = ListRollupPropertySourceLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRollupPropertySourceLinksResponse) String() string { @@ -10829,7 +10467,7 @@ func (*ListRollupPropertySourceLinksResponse) ProtoMessage() {} func (x *ListRollupPropertySourceLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10873,11 +10511,9 @@ type CreateRollupPropertySourceLinkRequest struct { func (x *CreateRollupPropertySourceLinkRequest) Reset() { *x = CreateRollupPropertySourceLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRollupPropertySourceLinkRequest) String() string { @@ -10888,7 +10524,7 @@ func (*CreateRollupPropertySourceLinkRequest) ProtoMessage() {} func (x *CreateRollupPropertySourceLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10931,11 +10567,9 @@ type DeleteRollupPropertySourceLinkRequest struct { func (x *DeleteRollupPropertySourceLinkRequest) Reset() { *x = DeleteRollupPropertySourceLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRollupPropertySourceLinkRequest) String() string { @@ -10946,7 +10580,7 @@ func (*DeleteRollupPropertySourceLinkRequest) ProtoMessage() {} func (x *DeleteRollupPropertySourceLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10982,11 +10616,9 @@ type ProvisionSubpropertyRequest struct { func (x *ProvisionSubpropertyRequest) Reset() { *x = ProvisionSubpropertyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionSubpropertyRequest) String() string { @@ -10997,7 +10629,7 @@ func (*ProvisionSubpropertyRequest) ProtoMessage() {} func (x *ProvisionSubpropertyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11040,11 +10672,9 @@ type ProvisionSubpropertyResponse struct { func (x *ProvisionSubpropertyResponse) Reset() { *x = ProvisionSubpropertyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionSubpropertyResponse) String() string { @@ -11055,7 +10685,7 @@ func (*ProvisionSubpropertyResponse) ProtoMessage() {} func (x *ProvisionSubpropertyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11099,11 +10729,9 @@ type CreateSubpropertyEventFilterRequest struct { func (x *CreateSubpropertyEventFilterRequest) Reset() { *x = CreateSubpropertyEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubpropertyEventFilterRequest) String() string { @@ -11114,7 +10742,7 @@ func (*CreateSubpropertyEventFilterRequest) ProtoMessage() {} func (x *CreateSubpropertyEventFilterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11158,11 +10786,9 @@ type GetSubpropertyEventFilterRequest struct { func (x *GetSubpropertyEventFilterRequest) Reset() { *x = GetSubpropertyEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[186] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubpropertyEventFilterRequest) String() string { @@ -11173,7 +10799,7 @@ func (*GetSubpropertyEventFilterRequest) ProtoMessage() {} func (x *GetSubpropertyEventFilterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[186] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11220,11 +10846,9 @@ type ListSubpropertyEventFiltersRequest struct { func (x *ListSubpropertyEventFiltersRequest) Reset() { *x = ListSubpropertyEventFiltersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubpropertyEventFiltersRequest) String() string { @@ -11235,7 +10859,7 @@ func (*ListSubpropertyEventFiltersRequest) ProtoMessage() {} func (x *ListSubpropertyEventFiltersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11286,11 +10910,9 @@ type ListSubpropertyEventFiltersResponse struct { func (x *ListSubpropertyEventFiltersResponse) Reset() { *x = ListSubpropertyEventFiltersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubpropertyEventFiltersResponse) String() string { @@ -11301,7 +10923,7 @@ func (*ListSubpropertyEventFiltersResponse) ProtoMessage() {} func (x *ListSubpropertyEventFiltersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11347,11 +10969,9 @@ type UpdateSubpropertyEventFilterRequest struct { func (x *UpdateSubpropertyEventFilterRequest) Reset() { *x = UpdateSubpropertyEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubpropertyEventFilterRequest) String() string { @@ -11362,7 +10982,7 @@ func (*UpdateSubpropertyEventFilterRequest) ProtoMessage() {} func (x *UpdateSubpropertyEventFilterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11406,11 +11026,9 @@ type DeleteSubpropertyEventFilterRequest struct { func (x *DeleteSubpropertyEventFilterRequest) Reset() { *x = DeleteSubpropertyEventFilterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubpropertyEventFilterRequest) String() string { @@ -11421,7 +11039,7 @@ func (*DeleteSubpropertyEventFilterRequest) ProtoMessage() {} func (x *DeleteSubpropertyEventFilterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16323,2300 +15941,6 @@ func file_google_analytics_admin_v1alpha_analytics_admin_proto_init() { file_google_analytics_admin_v1alpha_expanded_data_set_proto_init() file_google_analytics_admin_v1alpha_resources_proto_init() file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunAccessReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RunAccessReportResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionAccountTicketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionAccountTicketResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetPropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListPropertiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListPropertiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreatePropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeletePropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateFirebaseLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFirebaseLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListFirebaseLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListFirebaseLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalSiteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateGoogleAdsLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGoogleAdsLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGoogleAdsLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListGoogleAdsLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListGoogleAdsLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetDataSharingSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountSummariesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountSummariesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeUserDataCollectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeUserDataCollectionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchChangeHistoryEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchChangeHistoryEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetMeasurementProtocolSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateMeasurementProtocolSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMeasurementProtocolSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMeasurementProtocolSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListMeasurementProtocolSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListMeasurementProtocolSecretsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetSKAdNetworkConversionValueSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreateSKAdNetworkConversionValueSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSKAdNetworkConversionValueSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSKAdNetworkConversionValueSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListSKAdNetworkConversionValueSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListSKAdNetworkConversionValueSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*GetGoogleSignalsSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGoogleSignalsSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversionEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversionEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*GetConversionEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversionEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKeyEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKeyEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*GetDisplayVideo360AdvertiserLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*ListDisplayVideo360AdvertiserLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ListDisplayVideo360AdvertiserLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*CreateDisplayVideo360AdvertiserLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDisplayVideo360AdvertiserLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDisplayVideo360AdvertiserLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*GetDisplayVideo360AdvertiserLinkProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*ListDisplayVideo360AdvertiserLinkProposalsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*ListDisplayVideo360AdvertiserLinkProposalsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*CreateDisplayVideo360AdvertiserLinkProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDisplayVideo360AdvertiserLinkProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*ApproveDisplayVideo360AdvertiserLinkProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*ApproveDisplayVideo360AdvertiserLinkProposalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*CancelDisplayVideo360AdvertiserLinkProposalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*GetSearchAds360LinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchAds360LinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchAds360LinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*CreateSearchAds360LinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSearchAds360LinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSearchAds360LinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomDimensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomDimensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomDimensionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomDimensionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ArchiveCustomDimensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomDimensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ArchiveCustomMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*CreateCalculatedMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCalculatedMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCalculatedMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*ListCalculatedMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*ListCalculatedMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*GetCalculatedMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*GetDataRetentionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataRetentionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*GetDataStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*GetAudienceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*ListAudiencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*ListAudiencesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*CreateAudienceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAudienceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*ArchiveAudienceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*GetAttributionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttributionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*GetAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetAccessBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*CreateAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateAccessBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateAccessBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccessBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteAccessBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*CreateExpandedDataSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExpandedDataSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExpandedDataSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*GetExpandedDataSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*ListExpandedDataSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*ListExpandedDataSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChannelGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChannelGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*SetAutomatedGa4ConfigurationOptOutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*SetAutomatedGa4ConfigurationOptOutResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*FetchAutomatedGa4ConfigurationOptOutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*FetchAutomatedGa4ConfigurationOptOutResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*CreateBigQueryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*GetBigQueryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBigQueryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBigQueryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*GetEnhancedMeasurementSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnhancedMeasurementSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*GetDataRedactionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataRedactionSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectedSiteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectedSiteTagResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectedSiteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectedSiteTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectedSiteTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*CreateAdSenseLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*GetAdSenseLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAdSenseLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*ListAdSenseLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[160].Exporter = func(v any, i int) any { - switch v := v.(*ListAdSenseLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*FetchConnectedGa4PropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[162].Exporter = func(v any, i int) any { - switch v := v.(*FetchConnectedGa4PropertyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[163].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventCreateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEventCreateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventCreateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*GetEventCreateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*ListEventCreateRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*ListEventCreateRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[169].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventEditRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[170].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEventEditRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventEditRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*GetEventEditRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*ListEventEditRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*ListEventEditRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*ReorderEventEditRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[176].Exporter = func(v any, i int) any { - switch v := v.(*CreateRollupPropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[177].Exporter = func(v any, i int) any { - switch v := v.(*CreateRollupPropertyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[178].Exporter = func(v any, i int) any { - switch v := v.(*GetRollupPropertySourceLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[179].Exporter = func(v any, i int) any { - switch v := v.(*ListRollupPropertySourceLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[180].Exporter = func(v any, i int) any { - switch v := v.(*ListRollupPropertySourceLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*CreateRollupPropertySourceLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRollupPropertySourceLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[183].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionSubpropertyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[184].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionSubpropertyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[185].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubpropertyEventFilterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[186].Exporter = func(v any, i int) any { - switch v := v.(*GetSubpropertyEventFilterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[187].Exporter = func(v any, i int) any { - switch v := v.(*ListSubpropertyEventFiltersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[188].Exporter = func(v any, i int) any { - switch v := v.(*ListSubpropertyEventFiltersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[189].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubpropertyEventFilterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[190].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubpropertyEventFilterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/analytics/admin/apiv1alpha/adminpb/audience.pb.go b/analytics/admin/apiv1alpha/adminpb/audience.pb.go index 5e9825f2f5a6..1d8286f0a957 100755 --- a/analytics/admin/apiv1alpha/adminpb/audience.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/audience.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/audience.proto @@ -427,11 +427,9 @@ type AudienceDimensionOrMetricFilter struct { func (x *AudienceDimensionOrMetricFilter) Reset() { *x = AudienceDimensionOrMetricFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter) String() string { @@ -442,7 +440,7 @@ func (*AudienceDimensionOrMetricFilter) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +569,9 @@ type AudienceEventFilter struct { func (x *AudienceEventFilter) Reset() { *x = AudienceEventFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceEventFilter) String() string { @@ -586,7 +582,7 @@ func (*AudienceEventFilter) ProtoMessage() {} func (x *AudienceEventFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +631,9 @@ type AudienceFilterExpression struct { func (x *AudienceFilterExpression) Reset() { *x = AudienceFilterExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceFilterExpression) String() string { @@ -650,7 +644,7 @@ func (*AudienceFilterExpression) ProtoMessage() {} func (x *AudienceFilterExpression) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +759,9 @@ type AudienceFilterExpressionList struct { func (x *AudienceFilterExpressionList) Reset() { *x = AudienceFilterExpressionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceFilterExpressionList) String() string { @@ -780,7 +772,7 @@ func (*AudienceFilterExpressionList) ProtoMessage() {} func (x *AudienceFilterExpressionList) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +810,9 @@ type AudienceSimpleFilter struct { func (x *AudienceSimpleFilter) Reset() { *x = AudienceSimpleFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceSimpleFilter) String() string { @@ -833,7 +823,7 @@ func (*AudienceSimpleFilter) ProtoMessage() {} func (x *AudienceSimpleFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,11 +870,9 @@ type AudienceSequenceFilter struct { func (x *AudienceSequenceFilter) Reset() { *x = AudienceSequenceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceSequenceFilter) String() string { @@ -895,7 +883,7 @@ func (*AudienceSequenceFilter) ProtoMessage() {} func (x *AudienceSequenceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +939,9 @@ type AudienceFilterClause struct { func (x *AudienceFilterClause) Reset() { *x = AudienceFilterClause{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceFilterClause) String() string { @@ -966,7 +952,7 @@ func (*AudienceFilterClause) ProtoMessage() {} func (x *AudienceFilterClause) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1042,11 +1028,9 @@ type AudienceEventTrigger struct { func (x *AudienceEventTrigger) Reset() { *x = AudienceEventTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceEventTrigger) String() string { @@ -1057,7 +1041,7 @@ func (*AudienceEventTrigger) ProtoMessage() {} func (x *AudienceEventTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1105,9 @@ type Audience struct { func (x *Audience) Reset() { *x = Audience{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Audience) String() string { @@ -1136,7 +1118,7 @@ func (*Audience) ProtoMessage() {} func (x *Audience) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1213,9 @@ type AudienceDimensionOrMetricFilter_StringFilter struct { func (x *AudienceDimensionOrMetricFilter_StringFilter) Reset() { *x = AudienceDimensionOrMetricFilter_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter_StringFilter) String() string { @@ -1246,7 +1226,7 @@ func (*AudienceDimensionOrMetricFilter_StringFilter) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,11 +1278,9 @@ type AudienceDimensionOrMetricFilter_InListFilter struct { func (x *AudienceDimensionOrMetricFilter_InListFilter) Reset() { *x = AudienceDimensionOrMetricFilter_InListFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter_InListFilter) String() string { @@ -1313,7 +1291,7 @@ func (*AudienceDimensionOrMetricFilter_InListFilter) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter_InListFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1359,11 +1337,9 @@ type AudienceDimensionOrMetricFilter_NumericValue struct { func (x *AudienceDimensionOrMetricFilter_NumericValue) Reset() { *x = AudienceDimensionOrMetricFilter_NumericValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter_NumericValue) String() string { @@ -1374,7 +1350,7 @@ func (*AudienceDimensionOrMetricFilter_NumericValue) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter_NumericValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1444,11 +1420,9 @@ type AudienceDimensionOrMetricFilter_NumericFilter struct { func (x *AudienceDimensionOrMetricFilter_NumericFilter) Reset() { *x = AudienceDimensionOrMetricFilter_NumericFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter_NumericFilter) String() string { @@ -1459,7 +1433,7 @@ func (*AudienceDimensionOrMetricFilter_NumericFilter) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter_NumericFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1477,9 @@ type AudienceDimensionOrMetricFilter_BetweenFilter struct { func (x *AudienceDimensionOrMetricFilter_BetweenFilter) Reset() { *x = AudienceDimensionOrMetricFilter_BetweenFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceDimensionOrMetricFilter_BetweenFilter) String() string { @@ -1518,7 +1490,7 @@ func (*AudienceDimensionOrMetricFilter_BetweenFilter) ProtoMessage() {} func (x *AudienceDimensionOrMetricFilter_BetweenFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1574,11 +1546,9 @@ type AudienceSequenceFilter_AudienceSequenceStep struct { func (x *AudienceSequenceFilter_AudienceSequenceStep) Reset() { *x = AudienceSequenceFilter_AudienceSequenceStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudienceSequenceFilter_AudienceSequenceStep) String() string { @@ -1589,7 +1559,7 @@ func (*AudienceSequenceFilter_AudienceSequenceStep) ProtoMessage() {} func (x *AudienceSequenceFilter_AudienceSequenceStep) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2074,188 +2044,6 @@ func file_google_analytics_admin_v1alpha_audience_proto_init() { if File_google_analytics_admin_v1alpha_audience_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AudienceEventFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AudienceFilterExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AudienceFilterExpressionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AudienceSimpleFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AudienceSequenceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AudienceFilterClause); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AudienceEventTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Audience); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter_InListFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter_NumericValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter_NumericFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AudienceDimensionOrMetricFilter_BetweenFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AudienceSequenceFilter_AudienceSequenceStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0].OneofWrappers = []any{ (*AudienceDimensionOrMetricFilter_StringFilter_)(nil), (*AudienceDimensionOrMetricFilter_InListFilter_)(nil), diff --git a/analytics/admin/apiv1alpha/adminpb/channel_group.pb.go b/analytics/admin/apiv1alpha/adminpb/channel_group.pb.go index f023d262f57b..a4789c3d1dc3 100755 --- a/analytics/admin/apiv1alpha/adminpb/channel_group.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/channel_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/channel_group.proto @@ -124,11 +124,9 @@ type ChannelGroupFilter struct { func (x *ChannelGroupFilter) Reset() { *x = ChannelGroupFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroupFilter) String() string { @@ -139,7 +137,7 @@ func (*ChannelGroupFilter) ProtoMessage() {} func (x *ChannelGroupFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +218,9 @@ type ChannelGroupFilterExpression struct { func (x *ChannelGroupFilterExpression) Reset() { *x = ChannelGroupFilterExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroupFilterExpression) String() string { @@ -235,7 +231,7 @@ func (*ChannelGroupFilterExpression) ProtoMessage() {} func (x *ChannelGroupFilterExpression) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +331,9 @@ type ChannelGroupFilterExpressionList struct { func (x *ChannelGroupFilterExpressionList) Reset() { *x = ChannelGroupFilterExpressionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroupFilterExpressionList) String() string { @@ -350,7 +344,7 @@ func (*ChannelGroupFilterExpressionList) ProtoMessage() {} func (x *ChannelGroupFilterExpressionList) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +380,9 @@ type GroupingRule struct { func (x *GroupingRule) Reset() { *x = GroupingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupingRule) String() string { @@ -401,7 +393,7 @@ func (*GroupingRule) ProtoMessage() {} func (x *GroupingRule) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type ChannelGroup struct { func (x *ChannelGroup) Reset() { *x = ChannelGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroup) String() string { @@ -476,7 +466,7 @@ func (*ChannelGroup) ProtoMessage() {} func (x *ChannelGroup) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +537,9 @@ type ChannelGroupFilter_StringFilter struct { func (x *ChannelGroupFilter_StringFilter) Reset() { *x = ChannelGroupFilter_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroupFilter_StringFilter) String() string { @@ -562,7 +550,7 @@ func (*ChannelGroupFilter_StringFilter) ProtoMessage() {} func (x *ChannelGroupFilter_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +593,9 @@ type ChannelGroupFilter_InListFilter struct { func (x *ChannelGroupFilter_InListFilter) Reset() { *x = ChannelGroupFilter_InListFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelGroupFilter_InListFilter) String() string { @@ -620,7 +606,7 @@ func (*ChannelGroupFilter_InListFilter) ProtoMessage() {} func (x *ChannelGroupFilter_InListFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,92 +805,6 @@ func file_google_analytics_admin_v1alpha_channel_group_proto_init() { if File_google_analytics_admin_v1alpha_channel_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroupFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroupFilterExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroupFilterExpressionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GroupingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroupFilter_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ChannelGroupFilter_InListFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_channel_group_proto_msgTypes[0].OneofWrappers = []any{ (*ChannelGroupFilter_StringFilter_)(nil), (*ChannelGroupFilter_InListFilter_)(nil), diff --git a/analytics/admin/apiv1alpha/adminpb/event_create_and_edit.pb.go b/analytics/admin/apiv1alpha/adminpb/event_create_and_edit.pb.go index 247400fc08f2..004767188591 100755 --- a/analytics/admin/apiv1alpha/adminpb/event_create_and_edit.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/event_create_and_edit.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/event_create_and_edit.proto @@ -162,11 +162,9 @@ type ParameterMutation struct { func (x *ParameterMutation) Reset() { *x = ParameterMutation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterMutation) String() string { @@ -177,7 +175,7 @@ func (*ParameterMutation) ProtoMessage() {} func (x *ParameterMutation) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type EventCreateRule struct { func (x *EventCreateRule) Reset() { *x = EventCreateRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventCreateRule) String() string { @@ -262,7 +258,7 @@ func (*EventCreateRule) ProtoMessage() {} func (x *EventCreateRule) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type EventEditRule struct { func (x *EventEditRule) Reset() { *x = EventEditRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventEditRule) String() string { @@ -365,7 +359,7 @@ func (*EventEditRule) ProtoMessage() {} func (x *EventEditRule) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +437,9 @@ type MatchingCondition struct { func (x *MatchingCondition) Reset() { *x = MatchingCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchingCondition) String() string { @@ -458,7 +450,7 @@ func (*MatchingCondition) ProtoMessage() {} func (x *MatchingCondition) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,56 +660,6 @@ func file_google_analytics_admin_v1alpha_event_create_and_edit_proto_init() { if File_google_analytics_admin_v1alpha_event_create_and_edit_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ParameterMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EventCreateRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventEditRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_event_create_and_edit_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MatchingCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/analytics/admin/apiv1alpha/adminpb/expanded_data_set.pb.go b/analytics/admin/apiv1alpha/adminpb/expanded_data_set.pb.go index f1e2a6a9b6d5..a5f47031fd54 100755 --- a/analytics/admin/apiv1alpha/adminpb/expanded_data_set.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/expanded_data_set.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/expanded_data_set.proto @@ -109,11 +109,9 @@ type ExpandedDataSetFilter struct { func (x *ExpandedDataSetFilter) Reset() { *x = ExpandedDataSetFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSetFilter) String() string { @@ -124,7 +122,7 @@ func (*ExpandedDataSetFilter) ProtoMessage() {} func (x *ExpandedDataSetFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +202,9 @@ type ExpandedDataSetFilterExpression struct { func (x *ExpandedDataSetFilterExpression) Reset() { *x = ExpandedDataSetFilterExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSetFilterExpression) String() string { @@ -219,7 +215,7 @@ func (*ExpandedDataSetFilterExpression) ProtoMessage() {} func (x *ExpandedDataSetFilterExpression) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type ExpandedDataSetFilterExpressionList struct { func (x *ExpandedDataSetFilterExpressionList) Reset() { *x = ExpandedDataSetFilterExpressionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSetFilterExpressionList) String() string { @@ -320,7 +314,7 @@ func (*ExpandedDataSetFilterExpressionList) ProtoMessage() {} func (x *ExpandedDataSetFilterExpressionList) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +372,9 @@ type ExpandedDataSet struct { func (x *ExpandedDataSet) Reset() { *x = ExpandedDataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSet) String() string { @@ -393,7 +385,7 @@ func (*ExpandedDataSet) ProtoMessage() {} func (x *ExpandedDataSet) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +468,9 @@ type ExpandedDataSetFilter_StringFilter struct { func (x *ExpandedDataSetFilter_StringFilter) Reset() { *x = ExpandedDataSetFilter_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSetFilter_StringFilter) String() string { @@ -491,7 +481,7 @@ func (*ExpandedDataSetFilter_StringFilter) ProtoMessage() {} func (x *ExpandedDataSetFilter_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +534,9 @@ type ExpandedDataSetFilter_InListFilter struct { func (x *ExpandedDataSetFilter_InListFilter) Reset() { *x = ExpandedDataSetFilter_InListFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandedDataSetFilter_InListFilter) String() string { @@ -559,7 +547,7 @@ func (*ExpandedDataSetFilter_InListFilter) ProtoMessage() {} func (x *ExpandedDataSetFilter_InListFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,80 +752,6 @@ func file_google_analytics_admin_v1alpha_expanded_data_set_proto_init() { if File_google_analytics_admin_v1alpha_expanded_data_set_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSetFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSetFilterExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSetFilterExpressionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSetFilter_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExpandedDataSetFilter_InListFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_expanded_data_set_proto_msgTypes[0].OneofWrappers = []any{ (*ExpandedDataSetFilter_StringFilter_)(nil), (*ExpandedDataSetFilter_InListFilter_)(nil), diff --git a/analytics/admin/apiv1alpha/adminpb/resources.pb.go b/analytics/admin/apiv1alpha/adminpb/resources.pb.go index cb26fd8fdf43..c50770f9511e 100755 --- a/analytics/admin/apiv1alpha/adminpb/resources.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/resources.proto @@ -1751,11 +1751,9 @@ type Account struct { func (x *Account) Reset() { *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Account) String() string { @@ -1766,7 +1764,7 @@ func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1894,11 +1892,9 @@ type Property struct { func (x *Property) Reset() { *x = Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Property) String() string { @@ -1909,7 +1905,7 @@ func (*Property) ProtoMessage() {} func (x *Property) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2050,11 +2046,9 @@ type DataStream struct { func (x *DataStream) Reset() { *x = DataStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStream) String() string { @@ -2065,7 +2059,7 @@ func (*DataStream) ProtoMessage() {} func (x *DataStream) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2193,11 +2187,9 @@ type FirebaseLink struct { func (x *FirebaseLink) Reset() { *x = FirebaseLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirebaseLink) String() string { @@ -2208,7 +2200,7 @@ func (*FirebaseLink) ProtoMessage() {} func (x *FirebaseLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2262,11 +2254,9 @@ type GlobalSiteTag struct { func (x *GlobalSiteTag) Reset() { *x = GlobalSiteTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalSiteTag) String() string { @@ -2277,7 +2267,7 @@ func (*GlobalSiteTag) ProtoMessage() {} func (x *GlobalSiteTag) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2337,11 +2327,9 @@ type GoogleAdsLink struct { func (x *GoogleAdsLink) Reset() { *x = GoogleAdsLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleAdsLink) String() string { @@ -2352,7 +2340,7 @@ func (*GoogleAdsLink) ProtoMessage() {} func (x *GoogleAdsLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2445,11 +2433,9 @@ type DataSharingSettings struct { func (x *DataSharingSettings) Reset() { *x = DataSharingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSharingSettings) String() string { @@ -2460,7 +2446,7 @@ func (*DataSharingSettings) ProtoMessage() {} func (x *DataSharingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2540,11 +2526,9 @@ type AccountSummary struct { func (x *AccountSummary) Reset() { *x = AccountSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountSummary) String() string { @@ -2555,7 +2539,7 @@ func (*AccountSummary) ProtoMessage() {} func (x *AccountSummary) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,11 +2606,9 @@ type PropertySummary struct { func (x *PropertySummary) Reset() { *x = PropertySummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertySummary) String() string { @@ -2637,7 +2619,7 @@ func (*PropertySummary) ProtoMessage() {} func (x *PropertySummary) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,11 +2682,9 @@ type MeasurementProtocolSecret struct { func (x *MeasurementProtocolSecret) Reset() { *x = MeasurementProtocolSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MeasurementProtocolSecret) String() string { @@ -2715,7 +2695,7 @@ func (*MeasurementProtocolSecret) ProtoMessage() {} func (x *MeasurementProtocolSecret) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2794,11 +2774,9 @@ type SKAdNetworkConversionValueSchema struct { func (x *SKAdNetworkConversionValueSchema) Reset() { *x = SKAdNetworkConversionValueSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SKAdNetworkConversionValueSchema) String() string { @@ -2809,7 +2787,7 @@ func (*SKAdNetworkConversionValueSchema) ProtoMessage() {} func (x *SKAdNetworkConversionValueSchema) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2882,11 +2860,9 @@ type PostbackWindow struct { func (x *PostbackWindow) Reset() { *x = PostbackWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostbackWindow) String() string { @@ -2897,7 +2873,7 @@ func (*PostbackWindow) ProtoMessage() {} func (x *PostbackWindow) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2959,11 +2935,9 @@ type ConversionValues struct { func (x *ConversionValues) Reset() { *x = ConversionValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionValues) String() string { @@ -2974,7 +2948,7 @@ func (*ConversionValues) ProtoMessage() {} func (x *ConversionValues) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3053,11 +3027,9 @@ type EventMapping struct { func (x *EventMapping) Reset() { *x = EventMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventMapping) String() string { @@ -3068,7 +3040,7 @@ func (*EventMapping) ProtoMessage() {} func (x *EventMapping) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3147,11 +3119,9 @@ type ChangeHistoryEvent struct { func (x *ChangeHistoryEvent) Reset() { *x = ChangeHistoryEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeHistoryEvent) String() string { @@ -3162,7 +3132,7 @@ func (*ChangeHistoryEvent) ProtoMessage() {} func (x *ChangeHistoryEvent) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3239,11 +3209,9 @@ type ChangeHistoryChange struct { func (x *ChangeHistoryChange) Reset() { *x = ChangeHistoryChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeHistoryChange) String() string { @@ -3254,7 +3222,7 @@ func (*ChangeHistoryChange) ProtoMessage() {} func (x *ChangeHistoryChange) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3331,11 +3299,9 @@ type DisplayVideo360AdvertiserLink struct { func (x *DisplayVideo360AdvertiserLink) Reset() { *x = DisplayVideo360AdvertiserLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayVideo360AdvertiserLink) String() string { @@ -3346,7 +3312,7 @@ func (*DisplayVideo360AdvertiserLink) ProtoMessage() {} func (x *DisplayVideo360AdvertiserLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3448,11 +3414,9 @@ type DisplayVideo360AdvertiserLinkProposal struct { func (x *DisplayVideo360AdvertiserLinkProposal) Reset() { *x = DisplayVideo360AdvertiserLinkProposal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayVideo360AdvertiserLinkProposal) String() string { @@ -3463,7 +3427,7 @@ func (*DisplayVideo360AdvertiserLinkProposal) ProtoMessage() {} func (x *DisplayVideo360AdvertiserLinkProposal) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3572,11 +3536,9 @@ type SearchAds360Link struct { func (x *SearchAds360Link) Reset() { *x = SearchAds360Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAds360Link) String() string { @@ -3587,7 +3549,7 @@ func (*SearchAds360Link) ProtoMessage() {} func (x *SearchAds360Link) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3667,11 +3629,9 @@ type LinkProposalStatusDetails struct { func (x *LinkProposalStatusDetails) Reset() { *x = LinkProposalStatusDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkProposalStatusDetails) String() string { @@ -3682,7 +3642,7 @@ func (*LinkProposalStatusDetails) ProtoMessage() {} func (x *LinkProposalStatusDetails) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3752,11 +3712,9 @@ type ConversionEvent struct { func (x *ConversionEvent) Reset() { *x = ConversionEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionEvent) String() string { @@ -3767,7 +3725,7 @@ func (*ConversionEvent) ProtoMessage() {} func (x *ConversionEvent) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3863,11 +3821,9 @@ type KeyEvent struct { func (x *KeyEvent) Reset() { *x = KeyEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyEvent) String() string { @@ -3878,7 +3834,7 @@ func (*KeyEvent) ProtoMessage() {} func (x *KeyEvent) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3960,11 +3916,9 @@ type GoogleSignalsSettings struct { func (x *GoogleSignalsSettings) Reset() { *x = GoogleSignalsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleSignalsSettings) String() string { @@ -3975,7 +3929,7 @@ func (*GoogleSignalsSettings) ProtoMessage() {} func (x *GoogleSignalsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4053,11 +4007,9 @@ type CustomDimension struct { func (x *CustomDimension) Reset() { *x = CustomDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomDimension) String() string { @@ -4068,7 +4020,7 @@ func (*CustomDimension) ProtoMessage() {} func (x *CustomDimension) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4163,11 +4115,9 @@ type CustomMetric struct { func (x *CustomMetric) Reset() { *x = CustomMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomMetric) String() string { @@ -4178,7 +4128,7 @@ func (*CustomMetric) ProtoMessage() {} func (x *CustomMetric) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4284,11 +4234,9 @@ type CalculatedMetric struct { func (x *CalculatedMetric) Reset() { *x = CalculatedMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculatedMetric) String() string { @@ -4299,7 +4247,7 @@ func (*CalculatedMetric) ProtoMessage() {} func (x *CalculatedMetric) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4388,11 +4336,9 @@ type DataRetentionSettings struct { func (x *DataRetentionSettings) Reset() { *x = DataRetentionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataRetentionSettings) String() string { @@ -4403,7 +4349,7 @@ func (*DataRetentionSettings) ProtoMessage() {} func (x *DataRetentionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4470,11 +4416,9 @@ type AttributionSettings struct { func (x *AttributionSettings) Reset() { *x = AttributionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSettings) String() string { @@ -4485,7 +4429,7 @@ func (*AttributionSettings) ProtoMessage() {} func (x *AttributionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4572,11 +4516,9 @@ type AccessBinding struct { func (x *AccessBinding) Reset() { *x = AccessBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessBinding) String() string { @@ -4587,7 +4529,7 @@ func (*AccessBinding) ProtoMessage() {} func (x *AccessBinding) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4685,11 +4627,9 @@ type BigQueryLink struct { func (x *BigQueryLink) Reset() { *x = BigQueryLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryLink) String() string { @@ -4700,7 +4640,7 @@ func (*BigQueryLink) ProtoMessage() {} func (x *BigQueryLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4835,11 +4775,9 @@ type EnhancedMeasurementSettings struct { func (x *EnhancedMeasurementSettings) Reset() { *x = EnhancedMeasurementSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnhancedMeasurementSettings) String() string { @@ -4850,7 +4788,7 @@ func (*EnhancedMeasurementSettings) ProtoMessage() {} func (x *EnhancedMeasurementSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4958,11 +4896,9 @@ type ConnectedSiteTag struct { func (x *ConnectedSiteTag) Reset() { *x = ConnectedSiteTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectedSiteTag) String() string { @@ -4973,7 +4909,7 @@ func (*ConnectedSiteTag) ProtoMessage() {} func (x *ConnectedSiteTag) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5033,11 +4969,9 @@ type DataRedactionSettings struct { func (x *DataRedactionSettings) Reset() { *x = DataRedactionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataRedactionSettings) String() string { @@ -5048,7 +4982,7 @@ func (*DataRedactionSettings) ProtoMessage() {} func (x *DataRedactionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5108,11 +5042,9 @@ type AdSenseLink struct { func (x *AdSenseLink) Reset() { *x = AdSenseLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdSenseLink) String() string { @@ -5123,7 +5055,7 @@ func (*AdSenseLink) ProtoMessage() {} func (x *AdSenseLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5171,11 +5103,9 @@ type RollupPropertySourceLink struct { func (x *RollupPropertySourceLink) Reset() { *x = RollupPropertySourceLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollupPropertySourceLink) String() string { @@ -5186,7 +5116,7 @@ func (*RollupPropertySourceLink) ProtoMessage() {} func (x *RollupPropertySourceLink) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5235,11 +5165,9 @@ type DataStream_WebStreamData struct { func (x *DataStream_WebStreamData) Reset() { *x = DataStream_WebStreamData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStream_WebStreamData) String() string { @@ -5250,7 +5178,7 @@ func (*DataStream_WebStreamData) ProtoMessage() {} func (x *DataStream_WebStreamData) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5302,11 +5230,9 @@ type DataStream_AndroidAppStreamData struct { func (x *DataStream_AndroidAppStreamData) Reset() { *x = DataStream_AndroidAppStreamData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStream_AndroidAppStreamData) String() string { @@ -5317,7 +5243,7 @@ func (*DataStream_AndroidAppStreamData) ProtoMessage() {} func (x *DataStream_AndroidAppStreamData) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5362,11 +5288,9 @@ type DataStream_IosAppStreamData struct { func (x *DataStream_IosAppStreamData) Reset() { *x = DataStream_IosAppStreamData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStream_IosAppStreamData) String() string { @@ -5377,7 +5301,7 @@ func (*DataStream_IosAppStreamData) ProtoMessage() {} func (x *DataStream_IosAppStreamData) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5445,11 +5369,9 @@ type ChangeHistoryChange_ChangeHistoryResource struct { func (x *ChangeHistoryChange_ChangeHistoryResource) Reset() { *x = ChangeHistoryChange_ChangeHistoryResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeHistoryChange_ChangeHistoryResource) String() string { @@ -5460,7 +5382,7 @@ func (*ChangeHistoryChange_ChangeHistoryResource) ProtoMessage() {} func (x *ChangeHistoryChange_ChangeHistoryResource) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5883,11 +5805,9 @@ type ConversionEvent_DefaultConversionValue struct { func (x *ConversionEvent_DefaultConversionValue) Reset() { *x = ConversionEvent_DefaultConversionValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionEvent_DefaultConversionValue) String() string { @@ -5898,7 +5818,7 @@ func (*ConversionEvent_DefaultConversionValue) ProtoMessage() {} func (x *ConversionEvent_DefaultConversionValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5947,11 +5867,9 @@ type KeyEvent_DefaultValue struct { func (x *KeyEvent_DefaultValue) Reset() { *x = KeyEvent_DefaultValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyEvent_DefaultValue) String() string { @@ -5962,7 +5880,7 @@ func (*KeyEvent_DefaultValue) ProtoMessage() {} func (x *KeyEvent_DefaultValue) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7685,500 +7603,6 @@ func file_google_analytics_admin_v1alpha_resources_proto_init() { file_google_analytics_admin_v1alpha_channel_group_proto_init() file_google_analytics_admin_v1alpha_event_create_and_edit_proto_init() file_google_analytics_admin_v1alpha_expanded_data_set_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FirebaseLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GlobalSiteTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GoogleAdsLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataSharingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AccountSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PropertySummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MeasurementProtocolSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SKAdNetworkConversionValueSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PostbackWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ConversionValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EventMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ChangeHistoryEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ChangeHistoryChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DisplayVideo360AdvertiserLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DisplayVideo360AdvertiserLinkProposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchAds360Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*LinkProposalStatusDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ConversionEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*KeyEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GoogleSignalsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CustomDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CustomMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CalculatedMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DataRetentionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AccessBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*EnhancedMeasurementSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ConnectedSiteTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DataRedactionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AdSenseLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*RollupPropertySourceLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DataStream_WebStreamData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*DataStream_AndroidAppStreamData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DataStream_IosAppStreamData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ChangeHistoryChange_ChangeHistoryResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ConversionEvent_DefaultConversionValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*KeyEvent_DefaultValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2].OneofWrappers = []any{ (*DataStream_WebStreamData_)(nil), (*DataStream_AndroidAppStreamData_)(nil), diff --git a/analytics/admin/apiv1alpha/adminpb/subproperty_event_filter.pb.go b/analytics/admin/apiv1alpha/adminpb/subproperty_event_filter.pb.go index d31d82aef3af..fe545789a0a8 100755 --- a/analytics/admin/apiv1alpha/adminpb/subproperty_event_filter.pb.go +++ b/analytics/admin/apiv1alpha/adminpb/subproperty_event_filter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/analytics/admin/v1alpha/subproperty_event_filter.proto @@ -176,11 +176,9 @@ type SubpropertyEventFilterCondition struct { func (x *SubpropertyEventFilterCondition) Reset() { *x = SubpropertyEventFilterCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilterCondition) String() string { @@ -191,7 +189,7 @@ func (*SubpropertyEventFilterCondition) ProtoMessage() {} func (x *SubpropertyEventFilterCondition) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +268,9 @@ type SubpropertyEventFilterExpression struct { func (x *SubpropertyEventFilterExpression) Reset() { *x = SubpropertyEventFilterExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilterExpression) String() string { @@ -285,7 +281,7 @@ func (*SubpropertyEventFilterExpression) ProtoMessage() {} func (x *SubpropertyEventFilterExpression) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type SubpropertyEventFilterExpressionList struct { func (x *SubpropertyEventFilterExpressionList) Reset() { *x = SubpropertyEventFilterExpressionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilterExpressionList) String() string { @@ -384,7 +378,7 @@ func (*SubpropertyEventFilterExpressionList) ProtoMessage() {} func (x *SubpropertyEventFilterExpressionList) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +418,9 @@ type SubpropertyEventFilterClause struct { func (x *SubpropertyEventFilterClause) Reset() { *x = SubpropertyEventFilterClause{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilterClause) String() string { @@ -439,7 +431,7 @@ func (*SubpropertyEventFilterClause) ProtoMessage() {} func (x *SubpropertyEventFilterClause) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +480,9 @@ type SubpropertyEventFilter struct { func (x *SubpropertyEventFilter) Reset() { *x = SubpropertyEventFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilter) String() string { @@ -503,7 +493,7 @@ func (*SubpropertyEventFilter) ProtoMessage() {} func (x *SubpropertyEventFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +546,9 @@ type SubpropertyEventFilterCondition_StringFilter struct { func (x *SubpropertyEventFilterCondition_StringFilter) Reset() { *x = SubpropertyEventFilterCondition_StringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubpropertyEventFilterCondition_StringFilter) String() string { @@ -571,7 +559,7 @@ func (*SubpropertyEventFilterCondition_StringFilter) ProtoMessage() {} func (x *SubpropertyEventFilterCondition_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,80 +783,6 @@ func file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_init() { if File_google_analytics_admin_v1alpha_subproperty_event_filter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilterCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilterExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilterExpressionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilterClause); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SubpropertyEventFilterCondition_StringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_analytics_admin_v1alpha_subproperty_event_filter_proto_msgTypes[0].OneofWrappers = []any{ (*SubpropertyEventFilterCondition_NullFilter)(nil), (*SubpropertyEventFilterCondition_StringFilter_)(nil), diff --git a/analytics/admin/apiv1alpha/analytics_admin_client.go b/analytics/admin/apiv1alpha/analytics_admin_client.go index 416cdb2db8b5..d3f1358f97f8 100755 --- a/analytics/admin/apiv1alpha/analytics_admin_client.go +++ b/analytics/admin/apiv1alpha/analytics_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( adminpb "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -4666,6 +4665,8 @@ type analyticsAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnalyticsAdminClient creates a new analytics admin service client based on gRPC. @@ -4692,6 +4693,7 @@ func NewAnalyticsAdminClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, analyticsAdminClient: adminpb.NewAnalyticsAdminServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -4738,6 +4740,8 @@ type analyticsAdminRESTClient struct { // Points back to the CallOptions field of the containing AnalyticsAdminClient CallOptions **AnalyticsAdminCallOptions + + logger *slog.Logger } // NewAnalyticsAdminRESTClient creates a new analytics admin service rest client. @@ -4755,6 +4759,7 @@ func NewAnalyticsAdminRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -4807,7 +4812,7 @@ func (c *analyticsAdminGRPCClient) GetAccount(ctx context.Context, req *adminpb. var resp *adminpb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetAccount, req, settings.GRPC, c.logger, "GetAccount") return err }, opts...) if err != nil { @@ -4833,7 +4838,7 @@ func (c *analyticsAdminGRPCClient) ListAccounts(ctx context.Context, req *adminp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListAccounts, req, settings.GRPC, c.logger, "ListAccounts") return err }, opts...) if err != nil { @@ -4867,7 +4872,7 @@ func (c *analyticsAdminGRPCClient) DeleteAccount(ctx context.Context, req *admin opts = append((*c.CallOptions).DeleteAccount[0:len((*c.CallOptions).DeleteAccount):len((*c.CallOptions).DeleteAccount)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteAccount(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteAccount, req, settings.GRPC, c.logger, "DeleteAccount") return err }, opts...) return err @@ -4882,7 +4887,7 @@ func (c *analyticsAdminGRPCClient) UpdateAccount(ctx context.Context, req *admin var resp *adminpb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateAccount, req, settings.GRPC, c.logger, "UpdateAccount") return err }, opts...) if err != nil { @@ -4897,7 +4902,7 @@ func (c *analyticsAdminGRPCClient) ProvisionAccountTicket(ctx context.Context, r var resp *adminpb.ProvisionAccountTicketResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ProvisionAccountTicket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ProvisionAccountTicket, req, settings.GRPC, c.logger, "ProvisionAccountTicket") return err }, opts...) if err != nil { @@ -4923,7 +4928,7 @@ func (c *analyticsAdminGRPCClient) ListAccountSummaries(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListAccountSummaries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListAccountSummaries, req, settings.GRPC, c.logger, "ListAccountSummaries") return err }, opts...) if err != nil { @@ -4958,7 +4963,7 @@ func (c *analyticsAdminGRPCClient) GetProperty(ctx context.Context, req *adminpb var resp *adminpb.Property err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetProperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetProperty, req, settings.GRPC, c.logger, "GetProperty") return err }, opts...) if err != nil { @@ -4984,7 +4989,7 @@ func (c *analyticsAdminGRPCClient) ListProperties(ctx context.Context, req *admi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListProperties(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListProperties, req, settings.GRPC, c.logger, "ListProperties") return err }, opts...) if err != nil { @@ -5016,7 +5021,7 @@ func (c *analyticsAdminGRPCClient) CreateProperty(ctx context.Context, req *admi var resp *adminpb.Property err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateProperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateProperty, req, settings.GRPC, c.logger, "CreateProperty") return err }, opts...) if err != nil { @@ -5034,7 +5039,7 @@ func (c *analyticsAdminGRPCClient) DeleteProperty(ctx context.Context, req *admi var resp *adminpb.Property err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.DeleteProperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.DeleteProperty, req, settings.GRPC, c.logger, "DeleteProperty") return err }, opts...) if err != nil { @@ -5052,7 +5057,7 @@ func (c *analyticsAdminGRPCClient) UpdateProperty(ctx context.Context, req *admi var resp *adminpb.Property err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateProperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateProperty, req, settings.GRPC, c.logger, "UpdateProperty") return err }, opts...) if err != nil { @@ -5070,7 +5075,7 @@ func (c *analyticsAdminGRPCClient) CreateFirebaseLink(ctx context.Context, req * var resp *adminpb.FirebaseLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateFirebaseLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateFirebaseLink, req, settings.GRPC, c.logger, "CreateFirebaseLink") return err }, opts...) if err != nil { @@ -5087,7 +5092,7 @@ func (c *analyticsAdminGRPCClient) DeleteFirebaseLink(ctx context.Context, req * opts = append((*c.CallOptions).DeleteFirebaseLink[0:len((*c.CallOptions).DeleteFirebaseLink):len((*c.CallOptions).DeleteFirebaseLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteFirebaseLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteFirebaseLink, req, settings.GRPC, c.logger, "DeleteFirebaseLink") return err }, opts...) return err @@ -5113,7 +5118,7 @@ func (c *analyticsAdminGRPCClient) ListFirebaseLinks(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListFirebaseLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListFirebaseLinks, req, settings.GRPC, c.logger, "ListFirebaseLinks") return err }, opts...) if err != nil { @@ -5148,7 +5153,7 @@ func (c *analyticsAdminGRPCClient) GetGlobalSiteTag(ctx context.Context, req *ad var resp *adminpb.GlobalSiteTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetGlobalSiteTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetGlobalSiteTag, req, settings.GRPC, c.logger, "GetGlobalSiteTag") return err }, opts...) if err != nil { @@ -5166,7 +5171,7 @@ func (c *analyticsAdminGRPCClient) CreateGoogleAdsLink(ctx context.Context, req var resp *adminpb.GoogleAdsLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateGoogleAdsLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateGoogleAdsLink, req, settings.GRPC, c.logger, "CreateGoogleAdsLink") return err }, opts...) if err != nil { @@ -5184,7 +5189,7 @@ func (c *analyticsAdminGRPCClient) UpdateGoogleAdsLink(ctx context.Context, req var resp *adminpb.GoogleAdsLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateGoogleAdsLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateGoogleAdsLink, req, settings.GRPC, c.logger, "UpdateGoogleAdsLink") return err }, opts...) if err != nil { @@ -5201,7 +5206,7 @@ func (c *analyticsAdminGRPCClient) DeleteGoogleAdsLink(ctx context.Context, req opts = append((*c.CallOptions).DeleteGoogleAdsLink[0:len((*c.CallOptions).DeleteGoogleAdsLink):len((*c.CallOptions).DeleteGoogleAdsLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteGoogleAdsLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteGoogleAdsLink, req, settings.GRPC, c.logger, "DeleteGoogleAdsLink") return err }, opts...) return err @@ -5227,7 +5232,7 @@ func (c *analyticsAdminGRPCClient) ListGoogleAdsLinks(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListGoogleAdsLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListGoogleAdsLinks, req, settings.GRPC, c.logger, "ListGoogleAdsLinks") return err }, opts...) if err != nil { @@ -5262,7 +5267,7 @@ func (c *analyticsAdminGRPCClient) GetDataSharingSettings(ctx context.Context, r var resp *adminpb.DataSharingSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDataSharingSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDataSharingSettings, req, settings.GRPC, c.logger, "GetDataSharingSettings") return err }, opts...) if err != nil { @@ -5280,7 +5285,7 @@ func (c *analyticsAdminGRPCClient) GetMeasurementProtocolSecret(ctx context.Cont var resp *adminpb.MeasurementProtocolSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetMeasurementProtocolSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetMeasurementProtocolSecret, req, settings.GRPC, c.logger, "GetMeasurementProtocolSecret") return err }, opts...) if err != nil { @@ -5309,7 +5314,7 @@ func (c *analyticsAdminGRPCClient) ListMeasurementProtocolSecrets(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListMeasurementProtocolSecrets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListMeasurementProtocolSecrets, req, settings.GRPC, c.logger, "ListMeasurementProtocolSecrets") return err }, opts...) if err != nil { @@ -5344,7 +5349,7 @@ func (c *analyticsAdminGRPCClient) CreateMeasurementProtocolSecret(ctx context.C var resp *adminpb.MeasurementProtocolSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateMeasurementProtocolSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateMeasurementProtocolSecret, req, settings.GRPC, c.logger, "CreateMeasurementProtocolSecret") return err }, opts...) if err != nil { @@ -5361,7 +5366,7 @@ func (c *analyticsAdminGRPCClient) DeleteMeasurementProtocolSecret(ctx context.C opts = append((*c.CallOptions).DeleteMeasurementProtocolSecret[0:len((*c.CallOptions).DeleteMeasurementProtocolSecret):len((*c.CallOptions).DeleteMeasurementProtocolSecret)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteMeasurementProtocolSecret(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteMeasurementProtocolSecret, req, settings.GRPC, c.logger, "DeleteMeasurementProtocolSecret") return err }, opts...) return err @@ -5376,7 +5381,7 @@ func (c *analyticsAdminGRPCClient) UpdateMeasurementProtocolSecret(ctx context.C var resp *adminpb.MeasurementProtocolSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateMeasurementProtocolSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateMeasurementProtocolSecret, req, settings.GRPC, c.logger, "UpdateMeasurementProtocolSecret") return err }, opts...) if err != nil { @@ -5394,7 +5399,7 @@ func (c *analyticsAdminGRPCClient) AcknowledgeUserDataCollection(ctx context.Con var resp *adminpb.AcknowledgeUserDataCollectionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.AcknowledgeUserDataCollection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.AcknowledgeUserDataCollection, req, settings.GRPC, c.logger, "AcknowledgeUserDataCollection") return err }, opts...) if err != nil { @@ -5412,7 +5417,7 @@ func (c *analyticsAdminGRPCClient) GetSKAdNetworkConversionValueSchema(ctx conte var resp *adminpb.SKAdNetworkConversionValueSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetSKAdNetworkConversionValueSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetSKAdNetworkConversionValueSchema, req, settings.GRPC, c.logger, "GetSKAdNetworkConversionValueSchema") return err }, opts...) if err != nil { @@ -5430,7 +5435,7 @@ func (c *analyticsAdminGRPCClient) CreateSKAdNetworkConversionValueSchema(ctx co var resp *adminpb.SKAdNetworkConversionValueSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateSKAdNetworkConversionValueSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateSKAdNetworkConversionValueSchema, req, settings.GRPC, c.logger, "CreateSKAdNetworkConversionValueSchema") return err }, opts...) if err != nil { @@ -5447,7 +5452,7 @@ func (c *analyticsAdminGRPCClient) DeleteSKAdNetworkConversionValueSchema(ctx co opts = append((*c.CallOptions).DeleteSKAdNetworkConversionValueSchema[0:len((*c.CallOptions).DeleteSKAdNetworkConversionValueSchema):len((*c.CallOptions).DeleteSKAdNetworkConversionValueSchema)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteSKAdNetworkConversionValueSchema(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteSKAdNetworkConversionValueSchema, req, settings.GRPC, c.logger, "DeleteSKAdNetworkConversionValueSchema") return err }, opts...) return err @@ -5462,7 +5467,7 @@ func (c *analyticsAdminGRPCClient) UpdateSKAdNetworkConversionValueSchema(ctx co var resp *adminpb.SKAdNetworkConversionValueSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateSKAdNetworkConversionValueSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateSKAdNetworkConversionValueSchema, req, settings.GRPC, c.logger, "UpdateSKAdNetworkConversionValueSchema") return err }, opts...) if err != nil { @@ -5491,7 +5496,7 @@ func (c *analyticsAdminGRPCClient) ListSKAdNetworkConversionValueSchemas(ctx con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListSKAdNetworkConversionValueSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListSKAdNetworkConversionValueSchemas, req, settings.GRPC, c.logger, "ListSKAdNetworkConversionValueSchemas") return err }, opts...) if err != nil { @@ -5537,7 +5542,7 @@ func (c *analyticsAdminGRPCClient) SearchChangeHistoryEvents(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.SearchChangeHistoryEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.SearchChangeHistoryEvents, req, settings.GRPC, c.logger, "SearchChangeHistoryEvents") return err }, opts...) if err != nil { @@ -5572,7 +5577,7 @@ func (c *analyticsAdminGRPCClient) GetGoogleSignalsSettings(ctx context.Context, var resp *adminpb.GoogleSignalsSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetGoogleSignalsSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetGoogleSignalsSettings, req, settings.GRPC, c.logger, "GetGoogleSignalsSettings") return err }, opts...) if err != nil { @@ -5590,7 +5595,7 @@ func (c *analyticsAdminGRPCClient) UpdateGoogleSignalsSettings(ctx context.Conte var resp *adminpb.GoogleSignalsSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateGoogleSignalsSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateGoogleSignalsSettings, req, settings.GRPC, c.logger, "UpdateGoogleSignalsSettings") return err }, opts...) if err != nil { @@ -5608,7 +5613,7 @@ func (c *analyticsAdminGRPCClient) CreateConversionEvent(ctx context.Context, re var resp *adminpb.ConversionEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateConversionEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateConversionEvent, req, settings.GRPC, c.logger, "CreateConversionEvent") return err }, opts...) if err != nil { @@ -5626,7 +5631,7 @@ func (c *analyticsAdminGRPCClient) UpdateConversionEvent(ctx context.Context, re var resp *adminpb.ConversionEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateConversionEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateConversionEvent, req, settings.GRPC, c.logger, "UpdateConversionEvent") return err }, opts...) if err != nil { @@ -5644,7 +5649,7 @@ func (c *analyticsAdminGRPCClient) GetConversionEvent(ctx context.Context, req * var resp *adminpb.ConversionEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetConversionEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetConversionEvent, req, settings.GRPC, c.logger, "GetConversionEvent") return err }, opts...) if err != nil { @@ -5661,7 +5666,7 @@ func (c *analyticsAdminGRPCClient) DeleteConversionEvent(ctx context.Context, re opts = append((*c.CallOptions).DeleteConversionEvent[0:len((*c.CallOptions).DeleteConversionEvent):len((*c.CallOptions).DeleteConversionEvent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteConversionEvent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteConversionEvent, req, settings.GRPC, c.logger, "DeleteConversionEvent") return err }, opts...) return err @@ -5687,7 +5692,7 @@ func (c *analyticsAdminGRPCClient) ListConversionEvents(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListConversionEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListConversionEvents, req, settings.GRPC, c.logger, "ListConversionEvents") return err }, opts...) if err != nil { @@ -5722,7 +5727,7 @@ func (c *analyticsAdminGRPCClient) CreateKeyEvent(ctx context.Context, req *admi var resp *adminpb.KeyEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateKeyEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateKeyEvent, req, settings.GRPC, c.logger, "CreateKeyEvent") return err }, opts...) if err != nil { @@ -5740,7 +5745,7 @@ func (c *analyticsAdminGRPCClient) UpdateKeyEvent(ctx context.Context, req *admi var resp *adminpb.KeyEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateKeyEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateKeyEvent, req, settings.GRPC, c.logger, "UpdateKeyEvent") return err }, opts...) if err != nil { @@ -5758,7 +5763,7 @@ func (c *analyticsAdminGRPCClient) GetKeyEvent(ctx context.Context, req *adminpb var resp *adminpb.KeyEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetKeyEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetKeyEvent, req, settings.GRPC, c.logger, "GetKeyEvent") return err }, opts...) if err != nil { @@ -5775,7 +5780,7 @@ func (c *analyticsAdminGRPCClient) DeleteKeyEvent(ctx context.Context, req *admi opts = append((*c.CallOptions).DeleteKeyEvent[0:len((*c.CallOptions).DeleteKeyEvent):len((*c.CallOptions).DeleteKeyEvent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteKeyEvent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteKeyEvent, req, settings.GRPC, c.logger, "DeleteKeyEvent") return err }, opts...) return err @@ -5801,7 +5806,7 @@ func (c *analyticsAdminGRPCClient) ListKeyEvents(ctx context.Context, req *admin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListKeyEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListKeyEvents, req, settings.GRPC, c.logger, "ListKeyEvents") return err }, opts...) if err != nil { @@ -5836,7 +5841,7 @@ func (c *analyticsAdminGRPCClient) GetDisplayVideo360AdvertiserLink(ctx context. var resp *adminpb.DisplayVideo360AdvertiserLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDisplayVideo360AdvertiserLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDisplayVideo360AdvertiserLink, req, settings.GRPC, c.logger, "GetDisplayVideo360AdvertiserLink") return err }, opts...) if err != nil { @@ -5865,7 +5870,7 @@ func (c *analyticsAdminGRPCClient) ListDisplayVideo360AdvertiserLinks(ctx contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListDisplayVideo360AdvertiserLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListDisplayVideo360AdvertiserLinks, req, settings.GRPC, c.logger, "ListDisplayVideo360AdvertiserLinks") return err }, opts...) if err != nil { @@ -5900,7 +5905,7 @@ func (c *analyticsAdminGRPCClient) CreateDisplayVideo360AdvertiserLink(ctx conte var resp *adminpb.DisplayVideo360AdvertiserLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateDisplayVideo360AdvertiserLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateDisplayVideo360AdvertiserLink, req, settings.GRPC, c.logger, "CreateDisplayVideo360AdvertiserLink") return err }, opts...) if err != nil { @@ -5917,7 +5922,7 @@ func (c *analyticsAdminGRPCClient) DeleteDisplayVideo360AdvertiserLink(ctx conte opts = append((*c.CallOptions).DeleteDisplayVideo360AdvertiserLink[0:len((*c.CallOptions).DeleteDisplayVideo360AdvertiserLink):len((*c.CallOptions).DeleteDisplayVideo360AdvertiserLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteDisplayVideo360AdvertiserLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteDisplayVideo360AdvertiserLink, req, settings.GRPC, c.logger, "DeleteDisplayVideo360AdvertiserLink") return err }, opts...) return err @@ -5932,7 +5937,7 @@ func (c *analyticsAdminGRPCClient) UpdateDisplayVideo360AdvertiserLink(ctx conte var resp *adminpb.DisplayVideo360AdvertiserLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateDisplayVideo360AdvertiserLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateDisplayVideo360AdvertiserLink, req, settings.GRPC, c.logger, "UpdateDisplayVideo360AdvertiserLink") return err }, opts...) if err != nil { @@ -5950,7 +5955,7 @@ func (c *analyticsAdminGRPCClient) GetDisplayVideo360AdvertiserLinkProposal(ctx var resp *adminpb.DisplayVideo360AdvertiserLinkProposal err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDisplayVideo360AdvertiserLinkProposal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDisplayVideo360AdvertiserLinkProposal, req, settings.GRPC, c.logger, "GetDisplayVideo360AdvertiserLinkProposal") return err }, opts...) if err != nil { @@ -5979,7 +5984,7 @@ func (c *analyticsAdminGRPCClient) ListDisplayVideo360AdvertiserLinkProposals(ct } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListDisplayVideo360AdvertiserLinkProposals(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListDisplayVideo360AdvertiserLinkProposals, req, settings.GRPC, c.logger, "ListDisplayVideo360AdvertiserLinkProposals") return err }, opts...) if err != nil { @@ -6014,7 +6019,7 @@ func (c *analyticsAdminGRPCClient) CreateDisplayVideo360AdvertiserLinkProposal(c var resp *adminpb.DisplayVideo360AdvertiserLinkProposal err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateDisplayVideo360AdvertiserLinkProposal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateDisplayVideo360AdvertiserLinkProposal, req, settings.GRPC, c.logger, "CreateDisplayVideo360AdvertiserLinkProposal") return err }, opts...) if err != nil { @@ -6031,7 +6036,7 @@ func (c *analyticsAdminGRPCClient) DeleteDisplayVideo360AdvertiserLinkProposal(c opts = append((*c.CallOptions).DeleteDisplayVideo360AdvertiserLinkProposal[0:len((*c.CallOptions).DeleteDisplayVideo360AdvertiserLinkProposal):len((*c.CallOptions).DeleteDisplayVideo360AdvertiserLinkProposal)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteDisplayVideo360AdvertiserLinkProposal(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteDisplayVideo360AdvertiserLinkProposal, req, settings.GRPC, c.logger, "DeleteDisplayVideo360AdvertiserLinkProposal") return err }, opts...) return err @@ -6046,7 +6051,7 @@ func (c *analyticsAdminGRPCClient) ApproveDisplayVideo360AdvertiserLinkProposal( var resp *adminpb.ApproveDisplayVideo360AdvertiserLinkProposalResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ApproveDisplayVideo360AdvertiserLinkProposal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ApproveDisplayVideo360AdvertiserLinkProposal, req, settings.GRPC, c.logger, "ApproveDisplayVideo360AdvertiserLinkProposal") return err }, opts...) if err != nil { @@ -6064,7 +6069,7 @@ func (c *analyticsAdminGRPCClient) CancelDisplayVideo360AdvertiserLinkProposal(c var resp *adminpb.DisplayVideo360AdvertiserLinkProposal err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CancelDisplayVideo360AdvertiserLinkProposal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CancelDisplayVideo360AdvertiserLinkProposal, req, settings.GRPC, c.logger, "CancelDisplayVideo360AdvertiserLinkProposal") return err }, opts...) if err != nil { @@ -6082,7 +6087,7 @@ func (c *analyticsAdminGRPCClient) CreateCustomDimension(ctx context.Context, re var resp *adminpb.CustomDimension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateCustomDimension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateCustomDimension, req, settings.GRPC, c.logger, "CreateCustomDimension") return err }, opts...) if err != nil { @@ -6100,7 +6105,7 @@ func (c *analyticsAdminGRPCClient) UpdateCustomDimension(ctx context.Context, re var resp *adminpb.CustomDimension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateCustomDimension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateCustomDimension, req, settings.GRPC, c.logger, "UpdateCustomDimension") return err }, opts...) if err != nil { @@ -6129,7 +6134,7 @@ func (c *analyticsAdminGRPCClient) ListCustomDimensions(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListCustomDimensions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListCustomDimensions, req, settings.GRPC, c.logger, "ListCustomDimensions") return err }, opts...) if err != nil { @@ -6163,7 +6168,7 @@ func (c *analyticsAdminGRPCClient) ArchiveCustomDimension(ctx context.Context, r opts = append((*c.CallOptions).ArchiveCustomDimension[0:len((*c.CallOptions).ArchiveCustomDimension):len((*c.CallOptions).ArchiveCustomDimension)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.ArchiveCustomDimension(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.ArchiveCustomDimension, req, settings.GRPC, c.logger, "ArchiveCustomDimension") return err }, opts...) return err @@ -6178,7 +6183,7 @@ func (c *analyticsAdminGRPCClient) GetCustomDimension(ctx context.Context, req * var resp *adminpb.CustomDimension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetCustomDimension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetCustomDimension, req, settings.GRPC, c.logger, "GetCustomDimension") return err }, opts...) if err != nil { @@ -6196,7 +6201,7 @@ func (c *analyticsAdminGRPCClient) CreateCustomMetric(ctx context.Context, req * var resp *adminpb.CustomMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateCustomMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateCustomMetric, req, settings.GRPC, c.logger, "CreateCustomMetric") return err }, opts...) if err != nil { @@ -6214,7 +6219,7 @@ func (c *analyticsAdminGRPCClient) UpdateCustomMetric(ctx context.Context, req * var resp *adminpb.CustomMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateCustomMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateCustomMetric, req, settings.GRPC, c.logger, "UpdateCustomMetric") return err }, opts...) if err != nil { @@ -6243,7 +6248,7 @@ func (c *analyticsAdminGRPCClient) ListCustomMetrics(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListCustomMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListCustomMetrics, req, settings.GRPC, c.logger, "ListCustomMetrics") return err }, opts...) if err != nil { @@ -6277,7 +6282,7 @@ func (c *analyticsAdminGRPCClient) ArchiveCustomMetric(ctx context.Context, req opts = append((*c.CallOptions).ArchiveCustomMetric[0:len((*c.CallOptions).ArchiveCustomMetric):len((*c.CallOptions).ArchiveCustomMetric)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.ArchiveCustomMetric(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.ArchiveCustomMetric, req, settings.GRPC, c.logger, "ArchiveCustomMetric") return err }, opts...) return err @@ -6292,7 +6297,7 @@ func (c *analyticsAdminGRPCClient) GetCustomMetric(ctx context.Context, req *adm var resp *adminpb.CustomMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetCustomMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetCustomMetric, req, settings.GRPC, c.logger, "GetCustomMetric") return err }, opts...) if err != nil { @@ -6310,7 +6315,7 @@ func (c *analyticsAdminGRPCClient) GetDataRetentionSettings(ctx context.Context, var resp *adminpb.DataRetentionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDataRetentionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDataRetentionSettings, req, settings.GRPC, c.logger, "GetDataRetentionSettings") return err }, opts...) if err != nil { @@ -6328,7 +6333,7 @@ func (c *analyticsAdminGRPCClient) UpdateDataRetentionSettings(ctx context.Conte var resp *adminpb.DataRetentionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateDataRetentionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateDataRetentionSettings, req, settings.GRPC, c.logger, "UpdateDataRetentionSettings") return err }, opts...) if err != nil { @@ -6346,7 +6351,7 @@ func (c *analyticsAdminGRPCClient) CreateDataStream(ctx context.Context, req *ad var resp *adminpb.DataStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateDataStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateDataStream, req, settings.GRPC, c.logger, "CreateDataStream") return err }, opts...) if err != nil { @@ -6363,7 +6368,7 @@ func (c *analyticsAdminGRPCClient) DeleteDataStream(ctx context.Context, req *ad opts = append((*c.CallOptions).DeleteDataStream[0:len((*c.CallOptions).DeleteDataStream):len((*c.CallOptions).DeleteDataStream)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteDataStream(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteDataStream, req, settings.GRPC, c.logger, "DeleteDataStream") return err }, opts...) return err @@ -6378,7 +6383,7 @@ func (c *analyticsAdminGRPCClient) UpdateDataStream(ctx context.Context, req *ad var resp *adminpb.DataStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateDataStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateDataStream, req, settings.GRPC, c.logger, "UpdateDataStream") return err }, opts...) if err != nil { @@ -6407,7 +6412,7 @@ func (c *analyticsAdminGRPCClient) ListDataStreams(ctx context.Context, req *adm } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListDataStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListDataStreams, req, settings.GRPC, c.logger, "ListDataStreams") return err }, opts...) if err != nil { @@ -6442,7 +6447,7 @@ func (c *analyticsAdminGRPCClient) GetDataStream(ctx context.Context, req *admin var resp *adminpb.DataStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDataStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDataStream, req, settings.GRPC, c.logger, "GetDataStream") return err }, opts...) if err != nil { @@ -6460,7 +6465,7 @@ func (c *analyticsAdminGRPCClient) GetAudience(ctx context.Context, req *adminpb var resp *adminpb.Audience err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetAudience(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetAudience, req, settings.GRPC, c.logger, "GetAudience") return err }, opts...) if err != nil { @@ -6489,7 +6494,7 @@ func (c *analyticsAdminGRPCClient) ListAudiences(ctx context.Context, req *admin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListAudiences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListAudiences, req, settings.GRPC, c.logger, "ListAudiences") return err }, opts...) if err != nil { @@ -6524,7 +6529,7 @@ func (c *analyticsAdminGRPCClient) CreateAudience(ctx context.Context, req *admi var resp *adminpb.Audience err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateAudience(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateAudience, req, settings.GRPC, c.logger, "CreateAudience") return err }, opts...) if err != nil { @@ -6542,7 +6547,7 @@ func (c *analyticsAdminGRPCClient) UpdateAudience(ctx context.Context, req *admi var resp *adminpb.Audience err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateAudience(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateAudience, req, settings.GRPC, c.logger, "UpdateAudience") return err }, opts...) if err != nil { @@ -6559,7 +6564,7 @@ func (c *analyticsAdminGRPCClient) ArchiveAudience(ctx context.Context, req *adm opts = append((*c.CallOptions).ArchiveAudience[0:len((*c.CallOptions).ArchiveAudience):len((*c.CallOptions).ArchiveAudience)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.ArchiveAudience(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.ArchiveAudience, req, settings.GRPC, c.logger, "ArchiveAudience") return err }, opts...) return err @@ -6574,7 +6579,7 @@ func (c *analyticsAdminGRPCClient) GetSearchAds360Link(ctx context.Context, req var resp *adminpb.SearchAds360Link err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetSearchAds360Link(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetSearchAds360Link, req, settings.GRPC, c.logger, "GetSearchAds360Link") return err }, opts...) if err != nil { @@ -6603,7 +6608,7 @@ func (c *analyticsAdminGRPCClient) ListSearchAds360Links(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListSearchAds360Links(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListSearchAds360Links, req, settings.GRPC, c.logger, "ListSearchAds360Links") return err }, opts...) if err != nil { @@ -6638,7 +6643,7 @@ func (c *analyticsAdminGRPCClient) CreateSearchAds360Link(ctx context.Context, r var resp *adminpb.SearchAds360Link err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateSearchAds360Link(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateSearchAds360Link, req, settings.GRPC, c.logger, "CreateSearchAds360Link") return err }, opts...) if err != nil { @@ -6655,7 +6660,7 @@ func (c *analyticsAdminGRPCClient) DeleteSearchAds360Link(ctx context.Context, r opts = append((*c.CallOptions).DeleteSearchAds360Link[0:len((*c.CallOptions).DeleteSearchAds360Link):len((*c.CallOptions).DeleteSearchAds360Link)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteSearchAds360Link(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteSearchAds360Link, req, settings.GRPC, c.logger, "DeleteSearchAds360Link") return err }, opts...) return err @@ -6670,7 +6675,7 @@ func (c *analyticsAdminGRPCClient) UpdateSearchAds360Link(ctx context.Context, r var resp *adminpb.SearchAds360Link err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateSearchAds360Link(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateSearchAds360Link, req, settings.GRPC, c.logger, "UpdateSearchAds360Link") return err }, opts...) if err != nil { @@ -6688,7 +6693,7 @@ func (c *analyticsAdminGRPCClient) GetAttributionSettings(ctx context.Context, r var resp *adminpb.AttributionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetAttributionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetAttributionSettings, req, settings.GRPC, c.logger, "GetAttributionSettings") return err }, opts...) if err != nil { @@ -6706,7 +6711,7 @@ func (c *analyticsAdminGRPCClient) UpdateAttributionSettings(ctx context.Context var resp *adminpb.AttributionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateAttributionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateAttributionSettings, req, settings.GRPC, c.logger, "UpdateAttributionSettings") return err }, opts...) if err != nil { @@ -6724,7 +6729,7 @@ func (c *analyticsAdminGRPCClient) RunAccessReport(ctx context.Context, req *adm var resp *adminpb.RunAccessReportResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.RunAccessReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.RunAccessReport, req, settings.GRPC, c.logger, "RunAccessReport") return err }, opts...) if err != nil { @@ -6742,7 +6747,7 @@ func (c *analyticsAdminGRPCClient) CreateAccessBinding(ctx context.Context, req var resp *adminpb.AccessBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateAccessBinding, req, settings.GRPC, c.logger, "CreateAccessBinding") return err }, opts...) if err != nil { @@ -6760,7 +6765,7 @@ func (c *analyticsAdminGRPCClient) GetAccessBinding(ctx context.Context, req *ad var resp *adminpb.AccessBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetAccessBinding, req, settings.GRPC, c.logger, "GetAccessBinding") return err }, opts...) if err != nil { @@ -6778,7 +6783,7 @@ func (c *analyticsAdminGRPCClient) UpdateAccessBinding(ctx context.Context, req var resp *adminpb.AccessBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateAccessBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateAccessBinding, req, settings.GRPC, c.logger, "UpdateAccessBinding") return err }, opts...) if err != nil { @@ -6795,7 +6800,7 @@ func (c *analyticsAdminGRPCClient) DeleteAccessBinding(ctx context.Context, req opts = append((*c.CallOptions).DeleteAccessBinding[0:len((*c.CallOptions).DeleteAccessBinding):len((*c.CallOptions).DeleteAccessBinding)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteAccessBinding(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteAccessBinding, req, settings.GRPC, c.logger, "DeleteAccessBinding") return err }, opts...) return err @@ -6821,7 +6826,7 @@ func (c *analyticsAdminGRPCClient) ListAccessBindings(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListAccessBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListAccessBindings, req, settings.GRPC, c.logger, "ListAccessBindings") return err }, opts...) if err != nil { @@ -6856,7 +6861,7 @@ func (c *analyticsAdminGRPCClient) BatchCreateAccessBindings(ctx context.Context var resp *adminpb.BatchCreateAccessBindingsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.BatchCreateAccessBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.BatchCreateAccessBindings, req, settings.GRPC, c.logger, "BatchCreateAccessBindings") return err }, opts...) if err != nil { @@ -6874,7 +6879,7 @@ func (c *analyticsAdminGRPCClient) BatchGetAccessBindings(ctx context.Context, r var resp *adminpb.BatchGetAccessBindingsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.BatchGetAccessBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.BatchGetAccessBindings, req, settings.GRPC, c.logger, "BatchGetAccessBindings") return err }, opts...) if err != nil { @@ -6892,7 +6897,7 @@ func (c *analyticsAdminGRPCClient) BatchUpdateAccessBindings(ctx context.Context var resp *adminpb.BatchUpdateAccessBindingsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.BatchUpdateAccessBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.BatchUpdateAccessBindings, req, settings.GRPC, c.logger, "BatchUpdateAccessBindings") return err }, opts...) if err != nil { @@ -6909,7 +6914,7 @@ func (c *analyticsAdminGRPCClient) BatchDeleteAccessBindings(ctx context.Context opts = append((*c.CallOptions).BatchDeleteAccessBindings[0:len((*c.CallOptions).BatchDeleteAccessBindings):len((*c.CallOptions).BatchDeleteAccessBindings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.BatchDeleteAccessBindings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.BatchDeleteAccessBindings, req, settings.GRPC, c.logger, "BatchDeleteAccessBindings") return err }, opts...) return err @@ -6924,7 +6929,7 @@ func (c *analyticsAdminGRPCClient) GetExpandedDataSet(ctx context.Context, req * var resp *adminpb.ExpandedDataSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetExpandedDataSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetExpandedDataSet, req, settings.GRPC, c.logger, "GetExpandedDataSet") return err }, opts...) if err != nil { @@ -6953,7 +6958,7 @@ func (c *analyticsAdminGRPCClient) ListExpandedDataSets(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListExpandedDataSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListExpandedDataSets, req, settings.GRPC, c.logger, "ListExpandedDataSets") return err }, opts...) if err != nil { @@ -6988,7 +6993,7 @@ func (c *analyticsAdminGRPCClient) CreateExpandedDataSet(ctx context.Context, re var resp *adminpb.ExpandedDataSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateExpandedDataSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateExpandedDataSet, req, settings.GRPC, c.logger, "CreateExpandedDataSet") return err }, opts...) if err != nil { @@ -7006,7 +7011,7 @@ func (c *analyticsAdminGRPCClient) UpdateExpandedDataSet(ctx context.Context, re var resp *adminpb.ExpandedDataSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateExpandedDataSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateExpandedDataSet, req, settings.GRPC, c.logger, "UpdateExpandedDataSet") return err }, opts...) if err != nil { @@ -7023,7 +7028,7 @@ func (c *analyticsAdminGRPCClient) DeleteExpandedDataSet(ctx context.Context, re opts = append((*c.CallOptions).DeleteExpandedDataSet[0:len((*c.CallOptions).DeleteExpandedDataSet):len((*c.CallOptions).DeleteExpandedDataSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteExpandedDataSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteExpandedDataSet, req, settings.GRPC, c.logger, "DeleteExpandedDataSet") return err }, opts...) return err @@ -7038,7 +7043,7 @@ func (c *analyticsAdminGRPCClient) GetChannelGroup(ctx context.Context, req *adm var resp *adminpb.ChannelGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetChannelGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetChannelGroup, req, settings.GRPC, c.logger, "GetChannelGroup") return err }, opts...) if err != nil { @@ -7067,7 +7072,7 @@ func (c *analyticsAdminGRPCClient) ListChannelGroups(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListChannelGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListChannelGroups, req, settings.GRPC, c.logger, "ListChannelGroups") return err }, opts...) if err != nil { @@ -7102,7 +7107,7 @@ func (c *analyticsAdminGRPCClient) CreateChannelGroup(ctx context.Context, req * var resp *adminpb.ChannelGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateChannelGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateChannelGroup, req, settings.GRPC, c.logger, "CreateChannelGroup") return err }, opts...) if err != nil { @@ -7120,7 +7125,7 @@ func (c *analyticsAdminGRPCClient) UpdateChannelGroup(ctx context.Context, req * var resp *adminpb.ChannelGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateChannelGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateChannelGroup, req, settings.GRPC, c.logger, "UpdateChannelGroup") return err }, opts...) if err != nil { @@ -7137,7 +7142,7 @@ func (c *analyticsAdminGRPCClient) DeleteChannelGroup(ctx context.Context, req * opts = append((*c.CallOptions).DeleteChannelGroup[0:len((*c.CallOptions).DeleteChannelGroup):len((*c.CallOptions).DeleteChannelGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteChannelGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteChannelGroup, req, settings.GRPC, c.logger, "DeleteChannelGroup") return err }, opts...) return err @@ -7149,7 +7154,7 @@ func (c *analyticsAdminGRPCClient) SetAutomatedGa4ConfigurationOptOut(ctx contex var resp *adminpb.SetAutomatedGa4ConfigurationOptOutResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.SetAutomatedGa4ConfigurationOptOut(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.SetAutomatedGa4ConfigurationOptOut, req, settings.GRPC, c.logger, "SetAutomatedGa4ConfigurationOptOut") return err }, opts...) if err != nil { @@ -7164,7 +7169,7 @@ func (c *analyticsAdminGRPCClient) FetchAutomatedGa4ConfigurationOptOut(ctx cont var resp *adminpb.FetchAutomatedGa4ConfigurationOptOutResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.FetchAutomatedGa4ConfigurationOptOut(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.FetchAutomatedGa4ConfigurationOptOut, req, settings.GRPC, c.logger, "FetchAutomatedGa4ConfigurationOptOut") return err }, opts...) if err != nil { @@ -7182,7 +7187,7 @@ func (c *analyticsAdminGRPCClient) CreateBigQueryLink(ctx context.Context, req * var resp *adminpb.BigQueryLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateBigQueryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateBigQueryLink, req, settings.GRPC, c.logger, "CreateBigQueryLink") return err }, opts...) if err != nil { @@ -7200,7 +7205,7 @@ func (c *analyticsAdminGRPCClient) GetBigQueryLink(ctx context.Context, req *adm var resp *adminpb.BigQueryLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetBigQueryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetBigQueryLink, req, settings.GRPC, c.logger, "GetBigQueryLink") return err }, opts...) if err != nil { @@ -7229,7 +7234,7 @@ func (c *analyticsAdminGRPCClient) ListBigQueryLinks(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListBigQueryLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListBigQueryLinks, req, settings.GRPC, c.logger, "ListBigQueryLinks") return err }, opts...) if err != nil { @@ -7263,7 +7268,7 @@ func (c *analyticsAdminGRPCClient) DeleteBigQueryLink(ctx context.Context, req * opts = append((*c.CallOptions).DeleteBigQueryLink[0:len((*c.CallOptions).DeleteBigQueryLink):len((*c.CallOptions).DeleteBigQueryLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteBigQueryLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteBigQueryLink, req, settings.GRPC, c.logger, "DeleteBigQueryLink") return err }, opts...) return err @@ -7278,7 +7283,7 @@ func (c *analyticsAdminGRPCClient) UpdateBigQueryLink(ctx context.Context, req * var resp *adminpb.BigQueryLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateBigQueryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateBigQueryLink, req, settings.GRPC, c.logger, "UpdateBigQueryLink") return err }, opts...) if err != nil { @@ -7296,7 +7301,7 @@ func (c *analyticsAdminGRPCClient) GetEnhancedMeasurementSettings(ctx context.Co var resp *adminpb.EnhancedMeasurementSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetEnhancedMeasurementSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetEnhancedMeasurementSettings, req, settings.GRPC, c.logger, "GetEnhancedMeasurementSettings") return err }, opts...) if err != nil { @@ -7314,7 +7319,7 @@ func (c *analyticsAdminGRPCClient) UpdateEnhancedMeasurementSettings(ctx context var resp *adminpb.EnhancedMeasurementSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateEnhancedMeasurementSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateEnhancedMeasurementSettings, req, settings.GRPC, c.logger, "UpdateEnhancedMeasurementSettings") return err }, opts...) if err != nil { @@ -7329,7 +7334,7 @@ func (c *analyticsAdminGRPCClient) CreateConnectedSiteTag(ctx context.Context, r var resp *adminpb.CreateConnectedSiteTagResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateConnectedSiteTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateConnectedSiteTag, req, settings.GRPC, c.logger, "CreateConnectedSiteTag") return err }, opts...) if err != nil { @@ -7343,7 +7348,7 @@ func (c *analyticsAdminGRPCClient) DeleteConnectedSiteTag(ctx context.Context, r opts = append((*c.CallOptions).DeleteConnectedSiteTag[0:len((*c.CallOptions).DeleteConnectedSiteTag):len((*c.CallOptions).DeleteConnectedSiteTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteConnectedSiteTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteConnectedSiteTag, req, settings.GRPC, c.logger, "DeleteConnectedSiteTag") return err }, opts...) return err @@ -7355,7 +7360,7 @@ func (c *analyticsAdminGRPCClient) ListConnectedSiteTags(ctx context.Context, re var resp *adminpb.ListConnectedSiteTagsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListConnectedSiteTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListConnectedSiteTags, req, settings.GRPC, c.logger, "ListConnectedSiteTags") return err }, opts...) if err != nil { @@ -7370,7 +7375,7 @@ func (c *analyticsAdminGRPCClient) FetchConnectedGa4Property(ctx context.Context var resp *adminpb.FetchConnectedGa4PropertyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.FetchConnectedGa4Property(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.FetchConnectedGa4Property, req, settings.GRPC, c.logger, "FetchConnectedGa4Property") return err }, opts...) if err != nil { @@ -7388,7 +7393,7 @@ func (c *analyticsAdminGRPCClient) GetAdSenseLink(ctx context.Context, req *admi var resp *adminpb.AdSenseLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetAdSenseLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetAdSenseLink, req, settings.GRPC, c.logger, "GetAdSenseLink") return err }, opts...) if err != nil { @@ -7406,7 +7411,7 @@ func (c *analyticsAdminGRPCClient) CreateAdSenseLink(ctx context.Context, req *a var resp *adminpb.AdSenseLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateAdSenseLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateAdSenseLink, req, settings.GRPC, c.logger, "CreateAdSenseLink") return err }, opts...) if err != nil { @@ -7423,7 +7428,7 @@ func (c *analyticsAdminGRPCClient) DeleteAdSenseLink(ctx context.Context, req *a opts = append((*c.CallOptions).DeleteAdSenseLink[0:len((*c.CallOptions).DeleteAdSenseLink):len((*c.CallOptions).DeleteAdSenseLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteAdSenseLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteAdSenseLink, req, settings.GRPC, c.logger, "DeleteAdSenseLink") return err }, opts...) return err @@ -7449,7 +7454,7 @@ func (c *analyticsAdminGRPCClient) ListAdSenseLinks(ctx context.Context, req *ad } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListAdSenseLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListAdSenseLinks, req, settings.GRPC, c.logger, "ListAdSenseLinks") return err }, opts...) if err != nil { @@ -7484,7 +7489,7 @@ func (c *analyticsAdminGRPCClient) GetEventCreateRule(ctx context.Context, req * var resp *adminpb.EventCreateRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetEventCreateRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetEventCreateRule, req, settings.GRPC, c.logger, "GetEventCreateRule") return err }, opts...) if err != nil { @@ -7513,7 +7518,7 @@ func (c *analyticsAdminGRPCClient) ListEventCreateRules(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListEventCreateRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListEventCreateRules, req, settings.GRPC, c.logger, "ListEventCreateRules") return err }, opts...) if err != nil { @@ -7548,7 +7553,7 @@ func (c *analyticsAdminGRPCClient) CreateEventCreateRule(ctx context.Context, re var resp *adminpb.EventCreateRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateEventCreateRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateEventCreateRule, req, settings.GRPC, c.logger, "CreateEventCreateRule") return err }, opts...) if err != nil { @@ -7566,7 +7571,7 @@ func (c *analyticsAdminGRPCClient) UpdateEventCreateRule(ctx context.Context, re var resp *adminpb.EventCreateRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateEventCreateRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateEventCreateRule, req, settings.GRPC, c.logger, "UpdateEventCreateRule") return err }, opts...) if err != nil { @@ -7583,7 +7588,7 @@ func (c *analyticsAdminGRPCClient) DeleteEventCreateRule(ctx context.Context, re opts = append((*c.CallOptions).DeleteEventCreateRule[0:len((*c.CallOptions).DeleteEventCreateRule):len((*c.CallOptions).DeleteEventCreateRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteEventCreateRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteEventCreateRule, req, settings.GRPC, c.logger, "DeleteEventCreateRule") return err }, opts...) return err @@ -7598,7 +7603,7 @@ func (c *analyticsAdminGRPCClient) GetEventEditRule(ctx context.Context, req *ad var resp *adminpb.EventEditRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetEventEditRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetEventEditRule, req, settings.GRPC, c.logger, "GetEventEditRule") return err }, opts...) if err != nil { @@ -7627,7 +7632,7 @@ func (c *analyticsAdminGRPCClient) ListEventEditRules(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListEventEditRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListEventEditRules, req, settings.GRPC, c.logger, "ListEventEditRules") return err }, opts...) if err != nil { @@ -7662,7 +7667,7 @@ func (c *analyticsAdminGRPCClient) CreateEventEditRule(ctx context.Context, req var resp *adminpb.EventEditRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateEventEditRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateEventEditRule, req, settings.GRPC, c.logger, "CreateEventEditRule") return err }, opts...) if err != nil { @@ -7680,7 +7685,7 @@ func (c *analyticsAdminGRPCClient) UpdateEventEditRule(ctx context.Context, req var resp *adminpb.EventEditRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateEventEditRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateEventEditRule, req, settings.GRPC, c.logger, "UpdateEventEditRule") return err }, opts...) if err != nil { @@ -7697,7 +7702,7 @@ func (c *analyticsAdminGRPCClient) DeleteEventEditRule(ctx context.Context, req opts = append((*c.CallOptions).DeleteEventEditRule[0:len((*c.CallOptions).DeleteEventEditRule):len((*c.CallOptions).DeleteEventEditRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteEventEditRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteEventEditRule, req, settings.GRPC, c.logger, "DeleteEventEditRule") return err }, opts...) return err @@ -7711,7 +7716,7 @@ func (c *analyticsAdminGRPCClient) ReorderEventEditRules(ctx context.Context, re opts = append((*c.CallOptions).ReorderEventEditRules[0:len((*c.CallOptions).ReorderEventEditRules):len((*c.CallOptions).ReorderEventEditRules)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.ReorderEventEditRules(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.ReorderEventEditRules, req, settings.GRPC, c.logger, "ReorderEventEditRules") return err }, opts...) return err @@ -7726,7 +7731,7 @@ func (c *analyticsAdminGRPCClient) UpdateDataRedactionSettings(ctx context.Conte var resp *adminpb.DataRedactionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateDataRedactionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateDataRedactionSettings, req, settings.GRPC, c.logger, "UpdateDataRedactionSettings") return err }, opts...) if err != nil { @@ -7744,7 +7749,7 @@ func (c *analyticsAdminGRPCClient) GetDataRedactionSettings(ctx context.Context, var resp *adminpb.DataRedactionSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetDataRedactionSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetDataRedactionSettings, req, settings.GRPC, c.logger, "GetDataRedactionSettings") return err }, opts...) if err != nil { @@ -7762,7 +7767,7 @@ func (c *analyticsAdminGRPCClient) GetCalculatedMetric(ctx context.Context, req var resp *adminpb.CalculatedMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetCalculatedMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetCalculatedMetric, req, settings.GRPC, c.logger, "GetCalculatedMetric") return err }, opts...) if err != nil { @@ -7780,7 +7785,7 @@ func (c *analyticsAdminGRPCClient) CreateCalculatedMetric(ctx context.Context, r var resp *adminpb.CalculatedMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateCalculatedMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateCalculatedMetric, req, settings.GRPC, c.logger, "CreateCalculatedMetric") return err }, opts...) if err != nil { @@ -7809,7 +7814,7 @@ func (c *analyticsAdminGRPCClient) ListCalculatedMetrics(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListCalculatedMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListCalculatedMetrics, req, settings.GRPC, c.logger, "ListCalculatedMetrics") return err }, opts...) if err != nil { @@ -7844,7 +7849,7 @@ func (c *analyticsAdminGRPCClient) UpdateCalculatedMetric(ctx context.Context, r var resp *adminpb.CalculatedMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateCalculatedMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateCalculatedMetric, req, settings.GRPC, c.logger, "UpdateCalculatedMetric") return err }, opts...) if err != nil { @@ -7861,7 +7866,7 @@ func (c *analyticsAdminGRPCClient) DeleteCalculatedMetric(ctx context.Context, r opts = append((*c.CallOptions).DeleteCalculatedMetric[0:len((*c.CallOptions).DeleteCalculatedMetric):len((*c.CallOptions).DeleteCalculatedMetric)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteCalculatedMetric(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteCalculatedMetric, req, settings.GRPC, c.logger, "DeleteCalculatedMetric") return err }, opts...) return err @@ -7873,7 +7878,7 @@ func (c *analyticsAdminGRPCClient) CreateRollupProperty(ctx context.Context, req var resp *adminpb.CreateRollupPropertyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateRollupProperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateRollupProperty, req, settings.GRPC, c.logger, "CreateRollupProperty") return err }, opts...) if err != nil { @@ -7891,7 +7896,7 @@ func (c *analyticsAdminGRPCClient) GetRollupPropertySourceLink(ctx context.Conte var resp *adminpb.RollupPropertySourceLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetRollupPropertySourceLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetRollupPropertySourceLink, req, settings.GRPC, c.logger, "GetRollupPropertySourceLink") return err }, opts...) if err != nil { @@ -7920,7 +7925,7 @@ func (c *analyticsAdminGRPCClient) ListRollupPropertySourceLinks(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListRollupPropertySourceLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListRollupPropertySourceLinks, req, settings.GRPC, c.logger, "ListRollupPropertySourceLinks") return err }, opts...) if err != nil { @@ -7955,7 +7960,7 @@ func (c *analyticsAdminGRPCClient) CreateRollupPropertySourceLink(ctx context.Co var resp *adminpb.RollupPropertySourceLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateRollupPropertySourceLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateRollupPropertySourceLink, req, settings.GRPC, c.logger, "CreateRollupPropertySourceLink") return err }, opts...) if err != nil { @@ -7972,7 +7977,7 @@ func (c *analyticsAdminGRPCClient) DeleteRollupPropertySourceLink(ctx context.Co opts = append((*c.CallOptions).DeleteRollupPropertySourceLink[0:len((*c.CallOptions).DeleteRollupPropertySourceLink):len((*c.CallOptions).DeleteRollupPropertySourceLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteRollupPropertySourceLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteRollupPropertySourceLink, req, settings.GRPC, c.logger, "DeleteRollupPropertySourceLink") return err }, opts...) return err @@ -7984,7 +7989,7 @@ func (c *analyticsAdminGRPCClient) ProvisionSubproperty(ctx context.Context, req var resp *adminpb.ProvisionSubpropertyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ProvisionSubproperty(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ProvisionSubproperty, req, settings.GRPC, c.logger, "ProvisionSubproperty") return err }, opts...) if err != nil { @@ -8002,7 +8007,7 @@ func (c *analyticsAdminGRPCClient) CreateSubpropertyEventFilter(ctx context.Cont var resp *adminpb.SubpropertyEventFilter err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.CreateSubpropertyEventFilter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.CreateSubpropertyEventFilter, req, settings.GRPC, c.logger, "CreateSubpropertyEventFilter") return err }, opts...) if err != nil { @@ -8020,7 +8025,7 @@ func (c *analyticsAdminGRPCClient) GetSubpropertyEventFilter(ctx context.Context var resp *adminpb.SubpropertyEventFilter err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.GetSubpropertyEventFilter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.GetSubpropertyEventFilter, req, settings.GRPC, c.logger, "GetSubpropertyEventFilter") return err }, opts...) if err != nil { @@ -8049,7 +8054,7 @@ func (c *analyticsAdminGRPCClient) ListSubpropertyEventFilters(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.ListSubpropertyEventFilters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.ListSubpropertyEventFilters, req, settings.GRPC, c.logger, "ListSubpropertyEventFilters") return err }, opts...) if err != nil { @@ -8084,7 +8089,7 @@ func (c *analyticsAdminGRPCClient) UpdateSubpropertyEventFilter(ctx context.Cont var resp *adminpb.SubpropertyEventFilter err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsAdminClient.UpdateSubpropertyEventFilter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsAdminClient.UpdateSubpropertyEventFilter, req, settings.GRPC, c.logger, "UpdateSubpropertyEventFilter") return err }, opts...) if err != nil { @@ -8101,7 +8106,7 @@ func (c *analyticsAdminGRPCClient) DeleteSubpropertyEventFilter(ctx context.Cont opts = append((*c.CallOptions).DeleteSubpropertyEventFilter[0:len((*c.CallOptions).DeleteSubpropertyEventFilter):len((*c.CallOptions).DeleteSubpropertyEventFilter)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsAdminClient.DeleteSubpropertyEventFilter(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsAdminClient.DeleteSubpropertyEventFilter, req, settings.GRPC, c.logger, "DeleteSubpropertyEventFilter") return err }, opts...) return err @@ -8140,17 +8145,7 @@ func (c *analyticsAdminRESTClient) GetAccount(ctx context.Context, req *adminpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccount") if err != nil { return err } @@ -8219,21 +8214,10 @@ func (c *analyticsAdminRESTClient) ListAccounts(ctx context.Context, req *adminp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccounts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8303,15 +8287,8 @@ func (c *analyticsAdminRESTClient) DeleteAccount(ctx context.Context, req *admin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccount") + return err }, opts...) } @@ -8362,17 +8339,7 @@ func (c *analyticsAdminRESTClient) UpdateAccount(ctx context.Context, req *admin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccount") if err != nil { return err } @@ -8425,17 +8392,7 @@ func (c *analyticsAdminRESTClient) ProvisionAccountTicket(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionAccountTicket") if err != nil { return err } @@ -8497,21 +8454,10 @@ func (c *analyticsAdminRESTClient) ListAccountSummaries(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccountSummaries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8574,17 +8520,7 @@ func (c *analyticsAdminRESTClient) GetProperty(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProperty") if err != nil { return err } @@ -8655,21 +8591,10 @@ func (c *analyticsAdminRESTClient) ListProperties(ctx context.Context, req *admi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProperties") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8736,17 +8661,7 @@ func (c *analyticsAdminRESTClient) CreateProperty(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProperty") if err != nil { return err } @@ -8806,17 +8721,7 @@ func (c *analyticsAdminRESTClient) DeleteProperty(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProperty") if err != nil { return err } @@ -8880,17 +8785,7 @@ func (c *analyticsAdminRESTClient) UpdateProperty(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProperty") if err != nil { return err } @@ -8949,17 +8844,7 @@ func (c *analyticsAdminRESTClient) CreateFirebaseLink(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFirebaseLink") if err != nil { return err } @@ -9006,15 +8891,8 @@ func (c *analyticsAdminRESTClient) DeleteFirebaseLink(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFirebaseLink") + return err }, opts...) } @@ -9064,21 +8942,10 @@ func (c *analyticsAdminRESTClient) ListFirebaseLinks(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFirebaseLinks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9142,17 +9009,7 @@ func (c *analyticsAdminRESTClient) GetGlobalSiteTag(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGlobalSiteTag") if err != nil { return err } @@ -9209,17 +9066,7 @@ func (c *analyticsAdminRESTClient) CreateGoogleAdsLink(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGoogleAdsLink") if err != nil { return err } @@ -9283,17 +9130,7 @@ func (c *analyticsAdminRESTClient) UpdateGoogleAdsLink(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGoogleAdsLink") if err != nil { return err } @@ -9340,15 +9177,8 @@ func (c *analyticsAdminRESTClient) DeleteGoogleAdsLink(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGoogleAdsLink") + return err }, opts...) } @@ -9397,21 +9227,10 @@ func (c *analyticsAdminRESTClient) ListGoogleAdsLinks(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGoogleAdsLinks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9475,17 +9294,7 @@ func (c *analyticsAdminRESTClient) GetDataSharingSettings(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataSharingSettings") if err != nil { return err } @@ -9535,17 +9344,7 @@ func (c *analyticsAdminRESTClient) GetMeasurementProtocolSecret(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMeasurementProtocolSecret") if err != nil { return err } @@ -9608,21 +9407,10 @@ func (c *analyticsAdminRESTClient) ListMeasurementProtocolSecrets(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMeasurementProtocolSecrets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9692,17 +9480,7 @@ func (c *analyticsAdminRESTClient) CreateMeasurementProtocolSecret(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMeasurementProtocolSecret") if err != nil { return err } @@ -9749,15 +9527,8 @@ func (c *analyticsAdminRESTClient) DeleteMeasurementProtocolSecret(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMeasurementProtocolSecret") + return err }, opts...) } @@ -9808,17 +9579,7 @@ func (c *analyticsAdminRESTClient) UpdateMeasurementProtocolSecret(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMeasurementProtocolSecret") if err != nil { return err } @@ -9878,17 +9639,7 @@ func (c *analyticsAdminRESTClient) AcknowledgeUserDataCollection(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AcknowledgeUserDataCollection") if err != nil { return err } @@ -9938,17 +9689,7 @@ func (c *analyticsAdminRESTClient) GetSKAdNetworkConversionValueSchema(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSKAdNetworkConversionValueSchema") if err != nil { return err } @@ -10005,17 +9746,7 @@ func (c *analyticsAdminRESTClient) CreateSKAdNetworkConversionValueSchema(ctx co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSKAdNetworkConversionValueSchema") if err != nil { return err } @@ -10062,15 +9793,8 @@ func (c *analyticsAdminRESTClient) DeleteSKAdNetworkConversionValueSchema(ctx co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSKAdNetworkConversionValueSchema") + return err }, opts...) } @@ -10121,17 +9845,7 @@ func (c *analyticsAdminRESTClient) UpdateSKAdNetworkConversionValueSchema(ctx co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSKAdNetworkConversionValueSchema") if err != nil { return err } @@ -10194,21 +9908,10 @@ func (c *analyticsAdminRESTClient) ListSKAdNetworkConversionValueSchemas(ctx con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSKAdNetworkConversionValueSchemas") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10284,21 +9987,10 @@ func (c *analyticsAdminRESTClient) SearchChangeHistoryEvents(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchChangeHistoryEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10361,17 +10053,7 @@ func (c *analyticsAdminRESTClient) GetGoogleSignalsSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGoogleSignalsSettings") if err != nil { return err } @@ -10435,17 +10117,7 @@ func (c *analyticsAdminRESTClient) UpdateGoogleSignalsSettings(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGoogleSignalsSettings") if err != nil { return err } @@ -10505,17 +10177,7 @@ func (c *analyticsAdminRESTClient) CreateConversionEvent(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversionEvent") if err != nil { return err } @@ -10582,17 +10244,7 @@ func (c *analyticsAdminRESTClient) UpdateConversionEvent(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversionEvent") if err != nil { return err } @@ -10645,22 +10297,12 @@ func (c *analyticsAdminRESTClient) GetConversionEvent(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversionEvent") if err != nil { return err } - defer httpRsp.Body.Close() - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { + if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10705,15 +10347,8 @@ func (c *analyticsAdminRESTClient) DeleteConversionEvent(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversionEvent") + return err }, opts...) } @@ -10767,21 +10402,10 @@ func (c *analyticsAdminRESTClient) ListConversionEvents(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversionEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10851,17 +10475,7 @@ func (c *analyticsAdminRESTClient) CreateKeyEvent(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKeyEvent") if err != nil { return err } @@ -10925,17 +10539,7 @@ func (c *analyticsAdminRESTClient) UpdateKeyEvent(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateKeyEvent") if err != nil { return err } @@ -10985,17 +10589,7 @@ func (c *analyticsAdminRESTClient) GetKeyEvent(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKeyEvent") if err != nil { return err } @@ -11042,15 +10636,8 @@ func (c *analyticsAdminRESTClient) DeleteKeyEvent(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteKeyEvent") + return err }, opts...) } @@ -11100,21 +10687,10 @@ func (c *analyticsAdminRESTClient) ListKeyEvents(ctx context.Context, req *admin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKeyEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -11177,17 +10753,7 @@ func (c *analyticsAdminRESTClient) GetDisplayVideo360AdvertiserLink(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDisplayVideo360AdvertiserLink") if err != nil { return err } @@ -11249,21 +10815,10 @@ func (c *analyticsAdminRESTClient) ListDisplayVideo360AdvertiserLinks(ctx contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDisplayVideo360AdvertiserLinks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -11337,17 +10892,7 @@ func (c *analyticsAdminRESTClient) CreateDisplayVideo360AdvertiserLink(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDisplayVideo360AdvertiserLink") if err != nil { return err } @@ -11394,15 +10939,8 @@ func (c *analyticsAdminRESTClient) DeleteDisplayVideo360AdvertiserLink(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDisplayVideo360AdvertiserLink") + return err }, opts...) } @@ -11453,17 +10991,7 @@ func (c *analyticsAdminRESTClient) UpdateDisplayVideo360AdvertiserLink(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDisplayVideo360AdvertiserLink") if err != nil { return err } @@ -11513,17 +11041,7 @@ func (c *analyticsAdminRESTClient) GetDisplayVideo360AdvertiserLinkProposal(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDisplayVideo360AdvertiserLinkProposal") if err != nil { return err } @@ -11585,21 +11103,10 @@ func (c *analyticsAdminRESTClient) ListDisplayVideo360AdvertiserLinkProposals(ct } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDisplayVideo360AdvertiserLinkProposals") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -11669,17 +11176,7 @@ func (c *analyticsAdminRESTClient) CreateDisplayVideo360AdvertiserLinkProposal(c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDisplayVideo360AdvertiserLinkProposal") if err != nil { return err } @@ -11727,15 +11224,8 @@ func (c *analyticsAdminRESTClient) DeleteDisplayVideo360AdvertiserLinkProposal(c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDisplayVideo360AdvertiserLinkProposal") + return err }, opts...) } @@ -11780,17 +11270,7 @@ func (c *analyticsAdminRESTClient) ApproveDisplayVideo360AdvertiserLinkProposal( httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveDisplayVideo360AdvertiserLinkProposal") if err != nil { return err } @@ -11852,17 +11332,7 @@ func (c *analyticsAdminRESTClient) CancelDisplayVideo360AdvertiserLinkProposal(c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelDisplayVideo360AdvertiserLinkProposal") if err != nil { return err } @@ -11919,17 +11389,7 @@ func (c *analyticsAdminRESTClient) CreateCustomDimension(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomDimension") if err != nil { return err } @@ -11993,17 +11453,7 @@ func (c *analyticsAdminRESTClient) UpdateCustomDimension(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomDimension") if err != nil { return err } @@ -12065,21 +11515,10 @@ func (c *analyticsAdminRESTClient) ListCustomDimensions(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomDimensions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -12145,15 +11584,8 @@ func (c *analyticsAdminRESTClient) ArchiveCustomDimension(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ArchiveCustomDimension") + return err }, opts...) } @@ -12190,17 +11622,7 @@ func (c *analyticsAdminRESTClient) GetCustomDimension(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomDimension") if err != nil { return err } @@ -12257,17 +11679,7 @@ func (c *analyticsAdminRESTClient) CreateCustomMetric(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomMetric") if err != nil { return err } @@ -12331,17 +11743,7 @@ func (c *analyticsAdminRESTClient) UpdateCustomMetric(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomMetric") if err != nil { return err } @@ -12403,21 +11805,10 @@ func (c *analyticsAdminRESTClient) ListCustomMetrics(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomMetrics") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -12483,15 +11874,8 @@ func (c *analyticsAdminRESTClient) ArchiveCustomMetric(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ArchiveCustomMetric") + return err }, opts...) } @@ -12528,17 +11912,7 @@ func (c *analyticsAdminRESTClient) GetCustomMetric(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomMetric") if err != nil { return err } @@ -12588,17 +11962,7 @@ func (c *analyticsAdminRESTClient) GetDataRetentionSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataRetentionSettings") if err != nil { return err } @@ -12662,17 +12026,7 @@ func (c *analyticsAdminRESTClient) UpdateDataRetentionSettings(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataRetentionSettings") if err != nil { return err } @@ -12729,17 +12083,7 @@ func (c *analyticsAdminRESTClient) CreateDataStream(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataStream") if err != nil { return err } @@ -12786,15 +12130,8 @@ func (c *analyticsAdminRESTClient) DeleteDataStream(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataStream") + return err }, opts...) } @@ -12845,17 +12182,7 @@ func (c *analyticsAdminRESTClient) UpdateDataStream(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataStream") if err != nil { return err } @@ -12917,21 +12244,10 @@ func (c *analyticsAdminRESTClient) ListDataStreams(ctx context.Context, req *adm } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataStreams") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -12994,17 +12310,7 @@ func (c *analyticsAdminRESTClient) GetDataStream(ctx context.Context, req *admin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataStream") if err != nil { return err } @@ -13056,17 +12362,7 @@ func (c *analyticsAdminRESTClient) GetAudience(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAudience") if err != nil { return err } @@ -13130,22 +12426,11 @@ func (c *analyticsAdminRESTClient) ListAudiences(ctx context.Context, req *admin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAudiences") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { + if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -13214,17 +12499,7 @@ func (c *analyticsAdminRESTClient) CreateAudience(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAudience") if err != nil { return err } @@ -13288,17 +12563,7 @@ func (c *analyticsAdminRESTClient) UpdateAudience(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAudience") if err != nil { return err } @@ -13351,15 +12616,8 @@ func (c *analyticsAdminRESTClient) ArchiveAudience(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ArchiveAudience") + return err }, opts...) } @@ -13396,17 +12654,7 @@ func (c *analyticsAdminRESTClient) GetSearchAds360Link(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSearchAds360Link") if err != nil { return err } @@ -13468,21 +12716,10 @@ func (c *analyticsAdminRESTClient) ListSearchAds360Links(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSearchAds360Links") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -13552,17 +12789,7 @@ func (c *analyticsAdminRESTClient) CreateSearchAds360Link(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSearchAds360Link") if err != nil { return err } @@ -13609,15 +12836,8 @@ func (c *analyticsAdminRESTClient) DeleteSearchAds360Link(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSearchAds360Link") + return err }, opts...) } @@ -13668,17 +12888,7 @@ func (c *analyticsAdminRESTClient) UpdateSearchAds360Link(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSearchAds360Link") if err != nil { return err } @@ -13728,17 +12938,7 @@ func (c *analyticsAdminRESTClient) GetAttributionSettings(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttributionSettings") if err != nil { return err } @@ -13802,17 +13002,7 @@ func (c *analyticsAdminRESTClient) UpdateAttributionSettings(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttributionSettings") if err != nil { return err } @@ -13882,17 +13072,7 @@ func (c *analyticsAdminRESTClient) RunAccessReport(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunAccessReport") if err != nil { return err } @@ -13949,17 +13129,7 @@ func (c *analyticsAdminRESTClient) CreateAccessBinding(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAccessBinding") if err != nil { return err } @@ -14009,17 +13179,7 @@ func (c *analyticsAdminRESTClient) GetAccessBinding(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccessBinding") if err != nil { return err } @@ -14076,17 +13236,7 @@ func (c *analyticsAdminRESTClient) UpdateAccessBinding(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccessBinding") if err != nil { return err } @@ -14133,15 +13283,8 @@ func (c *analyticsAdminRESTClient) DeleteAccessBinding(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccessBinding") + return err }, opts...) } @@ -14190,21 +13333,10 @@ func (c *analyticsAdminRESTClient) ListAccessBindings(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccessBindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -14277,17 +13409,7 @@ func (c *analyticsAdminRESTClient) BatchCreateAccessBindings(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateAccessBindings") if err != nil { return err } @@ -14342,17 +13464,7 @@ func (c *analyticsAdminRESTClient) BatchGetAccessBindings(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetAccessBindings") if err != nil { return err } @@ -14409,17 +13521,7 @@ func (c *analyticsAdminRESTClient) BatchUpdateAccessBindings(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateAccessBindings") if err != nil { return err } @@ -14472,15 +13574,8 @@ func (c *analyticsAdminRESTClient) BatchDeleteAccessBindings(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteAccessBindings") + return err }, opts...) } @@ -14517,17 +13612,7 @@ func (c *analyticsAdminRESTClient) GetExpandedDataSet(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExpandedDataSet") if err != nil { return err } @@ -14589,21 +13674,10 @@ func (c *analyticsAdminRESTClient) ListExpandedDataSets(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExpandedDataSets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -14673,17 +13747,7 @@ func (c *analyticsAdminRESTClient) CreateExpandedDataSet(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExpandedDataSet") if err != nil { return err } @@ -14747,17 +13811,7 @@ func (c *analyticsAdminRESTClient) UpdateExpandedDataSet(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExpandedDataSet") if err != nil { return err } @@ -14804,15 +13858,8 @@ func (c *analyticsAdminRESTClient) DeleteExpandedDataSet(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExpandedDataSet") + return err }, opts...) } @@ -14849,17 +13896,7 @@ func (c *analyticsAdminRESTClient) GetChannelGroup(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannelGroup") if err != nil { return err } @@ -14921,21 +13958,10 @@ func (c *analyticsAdminRESTClient) ListChannelGroups(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannelGroups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -15005,17 +14031,7 @@ func (c *analyticsAdminRESTClient) CreateChannelGroup(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannelGroup") if err != nil { return err } @@ -15079,17 +14095,7 @@ func (c *analyticsAdminRESTClient) UpdateChannelGroup(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChannelGroup") if err != nil { return err } @@ -15136,15 +14142,8 @@ func (c *analyticsAdminRESTClient) DeleteChannelGroup(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChannelGroup") + return err }, opts...) } @@ -15186,17 +14185,7 @@ func (c *analyticsAdminRESTClient) SetAutomatedGa4ConfigurationOptOut(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetAutomatedGa4ConfigurationOptOut") if err != nil { return err } @@ -15251,17 +14240,7 @@ func (c *analyticsAdminRESTClient) FetchAutomatedGa4ConfigurationOptOut(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchAutomatedGa4ConfigurationOptOut") if err != nil { return err } @@ -15318,17 +14297,7 @@ func (c *analyticsAdminRESTClient) CreateBigQueryLink(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBigQueryLink") if err != nil { return err } @@ -15378,17 +14347,7 @@ func (c *analyticsAdminRESTClient) GetBigQueryLink(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBigQueryLink") if err != nil { return err } @@ -15450,21 +14409,10 @@ func (c *analyticsAdminRESTClient) ListBigQueryLinks(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBigQueryLinks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -15524,15 +14472,8 @@ func (c *analyticsAdminRESTClient) DeleteBigQueryLink(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBigQueryLink") + return err }, opts...) } @@ -15583,17 +14524,7 @@ func (c *analyticsAdminRESTClient) UpdateBigQueryLink(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBigQueryLink") if err != nil { return err } @@ -15645,22 +14576,12 @@ func (c *analyticsAdminRESTClient) GetEnhancedMeasurementSettings(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnhancedMeasurementSettings") if err != nil { return err } - defer httpRsp.Body.Close() - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { + if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -15721,17 +14642,7 @@ func (c *analyticsAdminRESTClient) UpdateEnhancedMeasurementSettings(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnhancedMeasurementSettings") if err != nil { return err } @@ -15786,17 +14697,7 @@ func (c *analyticsAdminRESTClient) CreateConnectedSiteTag(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnectedSiteTag") if err != nil { return err } @@ -15847,15 +14748,8 @@ func (c *analyticsAdminRESTClient) DeleteConnectedSiteTag(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteConnectedSiteTag") + return err }, opts...) } @@ -15897,17 +14791,7 @@ func (c *analyticsAdminRESTClient) ListConnectedSiteTags(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListConnectedSiteTags") if err != nil { return err } @@ -15956,17 +14840,7 @@ func (c *analyticsAdminRESTClient) FetchConnectedGa4Property(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchConnectedGa4Property") if err != nil { return err } @@ -16016,17 +14890,7 @@ func (c *analyticsAdminRESTClient) GetAdSenseLink(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAdSenseLink") if err != nil { return err } @@ -16083,17 +14947,7 @@ func (c *analyticsAdminRESTClient) CreateAdSenseLink(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAdSenseLink") if err != nil { return err } @@ -16140,15 +14994,8 @@ func (c *analyticsAdminRESTClient) DeleteAdSenseLink(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAdSenseLink") + return err }, opts...) } @@ -16197,21 +15044,10 @@ func (c *analyticsAdminRESTClient) ListAdSenseLinks(ctx context.Context, req *ad } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAdSenseLinks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -16274,17 +15110,7 @@ func (c *analyticsAdminRESTClient) GetEventCreateRule(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEventCreateRule") if err != nil { return err } @@ -16346,21 +15172,10 @@ func (c *analyticsAdminRESTClient) ListEventCreateRules(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEventCreateRules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -16430,17 +15245,7 @@ func (c *analyticsAdminRESTClient) CreateEventCreateRule(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEventCreateRule") if err != nil { return err } @@ -16504,17 +15309,7 @@ func (c *analyticsAdminRESTClient) UpdateEventCreateRule(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEventCreateRule") if err != nil { return err } @@ -16561,15 +15356,8 @@ func (c *analyticsAdminRESTClient) DeleteEventCreateRule(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEventCreateRule") + return err }, opts...) } @@ -16606,17 +15394,7 @@ func (c *analyticsAdminRESTClient) GetEventEditRule(ctx context.Context, req *ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEventEditRule") if err != nil { return err } @@ -16678,21 +15456,10 @@ func (c *analyticsAdminRESTClient) ListEventEditRules(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEventEditRules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -16762,17 +15529,7 @@ func (c *analyticsAdminRESTClient) CreateEventEditRule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEventEditRule") if err != nil { return err } @@ -16836,17 +15593,7 @@ func (c *analyticsAdminRESTClient) UpdateEventEditRule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEventEditRule") if err != nil { return err } @@ -16893,15 +15640,8 @@ func (c *analyticsAdminRESTClient) DeleteEventEditRule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEventEditRule") + return err }, opts...) } @@ -16941,15 +15681,8 @@ func (c *analyticsAdminRESTClient) ReorderEventEditRules(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReorderEventEditRules") + return err }, opts...) } @@ -17000,17 +15733,7 @@ func (c *analyticsAdminRESTClient) UpdateDataRedactionSettings(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataRedactionSettings") if err != nil { return err } @@ -17060,17 +15783,7 @@ func (c *analyticsAdminRESTClient) GetDataRedactionSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataRedactionSettings") if err != nil { return err } @@ -17120,17 +15833,7 @@ func (c *analyticsAdminRESTClient) GetCalculatedMetric(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCalculatedMetric") if err != nil { return err } @@ -17188,17 +15891,7 @@ func (c *analyticsAdminRESTClient) CreateCalculatedMetric(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCalculatedMetric") if err != nil { return err } @@ -17260,21 +15953,10 @@ func (c *analyticsAdminRESTClient) ListCalculatedMetrics(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCalculatedMetrics") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -17351,17 +16033,7 @@ func (c *analyticsAdminRESTClient) UpdateCalculatedMetric(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCalculatedMetric") if err != nil { return err } @@ -17408,15 +16080,8 @@ func (c *analyticsAdminRESTClient) DeleteCalculatedMetric(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCalculatedMetric") + return err }, opts...) } @@ -17456,17 +16121,7 @@ func (c *analyticsAdminRESTClient) CreateRollupProperty(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRollupProperty") if err != nil { return err } @@ -17518,17 +16173,7 @@ func (c *analyticsAdminRESTClient) GetRollupPropertySourceLink(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRollupPropertySourceLink") if err != nil { return err } @@ -17592,21 +16237,10 @@ func (c *analyticsAdminRESTClient) ListRollupPropertySourceLinks(ctx context.Con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRollupPropertySourceLinks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -17678,17 +16312,7 @@ func (c *analyticsAdminRESTClient) CreateRollupPropertySourceLink(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRollupPropertySourceLink") if err != nil { return err } @@ -17737,15 +16361,8 @@ func (c *analyticsAdminRESTClient) DeleteRollupPropertySourceLink(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRollupPropertySourceLink") + return err }, opts...) } @@ -17786,17 +16403,7 @@ func (c *analyticsAdminRESTClient) ProvisionSubproperty(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionSubproperty") if err != nil { return err } @@ -17853,17 +16460,7 @@ func (c *analyticsAdminRESTClient) CreateSubpropertyEventFilter(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSubpropertyEventFilter") if err != nil { return err } @@ -17913,17 +16510,7 @@ func (c *analyticsAdminRESTClient) GetSubpropertyEventFilter(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubpropertyEventFilter") if err != nil { return err } @@ -17985,21 +16572,10 @@ func (c *analyticsAdminRESTClient) ListSubpropertyEventFilters(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubpropertyEventFilters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -18076,17 +16652,7 @@ func (c *analyticsAdminRESTClient) UpdateSubpropertyEventFilter(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSubpropertyEventFilter") if err != nil { return err } @@ -18133,14 +16699,7 @@ func (c *analyticsAdminRESTClient) DeleteSubpropertyEventFilter(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSubpropertyEventFilter") + return err }, opts...) } diff --git a/analytics/admin/apiv1alpha/analytics_admin_client_example_go123_test.go b/analytics/admin/apiv1alpha/analytics_admin_client_example_go123_test.go index 845242190cbf..9a403d66058e 100644 --- a/analytics/admin/apiv1alpha/analytics_admin_client_example_go123_test.go +++ b/analytics/admin/apiv1alpha/analytics_admin_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAnalyticsAdminClient_ListAccessBindings_all() { } for resp, err := range c.ListAccessBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleAnalyticsAdminClient_ListAccountSummaries_all() { } for resp, err := range c.ListAccountSummaries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleAnalyticsAdminClient_ListAccounts_all() { } for resp, err := range c.ListAccounts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleAnalyticsAdminClient_ListAdSenseLinks_all() { } for resp, err := range c.ListAdSenseLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleAnalyticsAdminClient_ListAudiences_all() { } for resp, err := range c.ListAudiences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleAnalyticsAdminClient_ListBigQueryLinks_all() { } for resp, err := range c.ListBigQueryLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -200,7 +200,7 @@ func ExampleAnalyticsAdminClient_ListCalculatedMetrics_all() { } for resp, err := range c.ListCalculatedMetrics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -226,7 +226,7 @@ func ExampleAnalyticsAdminClient_ListChannelGroups_all() { } for resp, err := range c.ListChannelGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -252,7 +252,7 @@ func ExampleAnalyticsAdminClient_ListConversionEvents_all() { } for resp, err := range c.ListConversionEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -278,7 +278,7 @@ func ExampleAnalyticsAdminClient_ListCustomDimensions_all() { } for resp, err := range c.ListCustomDimensions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -304,7 +304,7 @@ func ExampleAnalyticsAdminClient_ListCustomMetrics_all() { } for resp, err := range c.ListCustomMetrics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -330,7 +330,7 @@ func ExampleAnalyticsAdminClient_ListDataStreams_all() { } for resp, err := range c.ListDataStreams(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -356,7 +356,7 @@ func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinkProposals_all( } for resp, err := range c.ListDisplayVideo360AdvertiserLinkProposals(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -382,7 +382,7 @@ func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinks_all() { } for resp, err := range c.ListDisplayVideo360AdvertiserLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -408,7 +408,7 @@ func ExampleAnalyticsAdminClient_ListEventCreateRules_all() { } for resp, err := range c.ListEventCreateRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -434,7 +434,7 @@ func ExampleAnalyticsAdminClient_ListEventEditRules_all() { } for resp, err := range c.ListEventEditRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -460,7 +460,7 @@ func ExampleAnalyticsAdminClient_ListExpandedDataSets_all() { } for resp, err := range c.ListExpandedDataSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -486,7 +486,7 @@ func ExampleAnalyticsAdminClient_ListFirebaseLinks_all() { } for resp, err := range c.ListFirebaseLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -512,7 +512,7 @@ func ExampleAnalyticsAdminClient_ListGoogleAdsLinks_all() { } for resp, err := range c.ListGoogleAdsLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -538,7 +538,7 @@ func ExampleAnalyticsAdminClient_ListKeyEvents_all() { } for resp, err := range c.ListKeyEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -564,7 +564,7 @@ func ExampleAnalyticsAdminClient_ListMeasurementProtocolSecrets_all() { } for resp, err := range c.ListMeasurementProtocolSecrets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -590,7 +590,7 @@ func ExampleAnalyticsAdminClient_ListProperties_all() { } for resp, err := range c.ListProperties(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -616,7 +616,7 @@ func ExampleAnalyticsAdminClient_ListRollupPropertySourceLinks_all() { } for resp, err := range c.ListRollupPropertySourceLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -642,7 +642,7 @@ func ExampleAnalyticsAdminClient_ListSKAdNetworkConversionValueSchemas_all() { } for resp, err := range c.ListSKAdNetworkConversionValueSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -668,7 +668,7 @@ func ExampleAnalyticsAdminClient_ListSearchAds360Links_all() { } for resp, err := range c.ListSearchAds360Links(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -694,7 +694,7 @@ func ExampleAnalyticsAdminClient_ListSubpropertyEventFilters_all() { } for resp, err := range c.ListSubpropertyEventFilters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -720,7 +720,7 @@ func ExampleAnalyticsAdminClient_SearchChangeHistoryEvents_all() { } for resp, err := range c.SearchChangeHistoryEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/analytics/admin/apiv1alpha/helpers.go b/analytics/admin/apiv1alpha/helpers.go index 00d2c8f096cb..6b43620a5ac0 100755 --- a/analytics/admin/apiv1alpha/helpers.go +++ b/analytics/admin/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package admin import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "analyticsadmin.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/analytics.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apigateway/apiv1/api_gateway_client.go b/apigateway/apiv1/api_gateway_client.go index 8bfaab3b4f1a..aa73315fb9ee 100755 --- a/apigateway/apiv1/api_gateway_client.go +++ b/apigateway/apiv1/api_gateway_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -546,6 +545,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new api gateway service client based on gRPC. @@ -572,6 +573,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: apigatewaypb.NewApiGatewayServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -634,6 +636,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new api gateway service rest client. @@ -651,6 +655,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -724,7 +729,7 @@ func (c *gRPCClient) ListGateways(ctx context.Context, req *apigatewaypb.ListGat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGateways(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGateways, req, settings.GRPC, c.logger, "ListGateways") return err }, opts...) if err != nil { @@ -759,7 +764,7 @@ func (c *gRPCClient) GetGateway(ctx context.Context, req *apigatewaypb.GetGatewa var resp *apigatewaypb.Gateway err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGateway, req, settings.GRPC, c.logger, "GetGateway") return err }, opts...) if err != nil { @@ -777,7 +782,7 @@ func (c *gRPCClient) CreateGateway(ctx context.Context, req *apigatewaypb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGateway, req, settings.GRPC, c.logger, "CreateGateway") return err }, opts...) if err != nil { @@ -797,7 +802,7 @@ func (c *gRPCClient) UpdateGateway(ctx context.Context, req *apigatewaypb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGateway, req, settings.GRPC, c.logger, "UpdateGateway") return err }, opts...) if err != nil { @@ -817,7 +822,7 @@ func (c *gRPCClient) DeleteGateway(ctx context.Context, req *apigatewaypb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGateway, req, settings.GRPC, c.logger, "DeleteGateway") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *gRPCClient) ListApis(ctx context.Context, req *apigatewaypb.ListApisReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListApis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListApis, req, settings.GRPC, c.logger, "ListApis") return err }, opts...) if err != nil { @@ -883,7 +888,7 @@ func (c *gRPCClient) GetApi(ctx context.Context, req *apigatewaypb.GetApiRequest var resp *apigatewaypb.Api err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetApi, req, settings.GRPC, c.logger, "GetApi") return err }, opts...) if err != nil { @@ -901,7 +906,7 @@ func (c *gRPCClient) CreateApi(ctx context.Context, req *apigatewaypb.CreateApiR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateApi, req, settings.GRPC, c.logger, "CreateApi") return err }, opts...) if err != nil { @@ -921,7 +926,7 @@ func (c *gRPCClient) UpdateApi(ctx context.Context, req *apigatewaypb.UpdateApiR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateApi, req, settings.GRPC, c.logger, "UpdateApi") return err }, opts...) if err != nil { @@ -941,7 +946,7 @@ func (c *gRPCClient) DeleteApi(ctx context.Context, req *apigatewaypb.DeleteApiR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteApi, req, settings.GRPC, c.logger, "DeleteApi") return err }, opts...) if err != nil { @@ -972,7 +977,7 @@ func (c *gRPCClient) ListApiConfigs(ctx context.Context, req *apigatewaypb.ListA } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListApiConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListApiConfigs, req, settings.GRPC, c.logger, "ListApiConfigs") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *gRPCClient) GetApiConfig(ctx context.Context, req *apigatewaypb.GetApiC var resp *apigatewaypb.ApiConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetApiConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetApiConfig, req, settings.GRPC, c.logger, "GetApiConfig") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *gRPCClient) CreateApiConfig(ctx context.Context, req *apigatewaypb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateApiConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateApiConfig, req, settings.GRPC, c.logger, "CreateApiConfig") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *gRPCClient) UpdateApiConfig(ctx context.Context, req *apigatewaypb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateApiConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateApiConfig, req, settings.GRPC, c.logger, "UpdateApiConfig") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *gRPCClient) DeleteApiConfig(ctx context.Context, req *apigatewaypb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteApiConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteApiConfig, req, settings.GRPC, c.logger, "DeleteApiConfig") return err }, opts...) if err != nil { @@ -1127,21 +1132,10 @@ func (c *restClient) ListGateways(ctx context.Context, req *apigatewaypb.ListGat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGateways") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1204,17 +1198,7 @@ func (c *restClient) GetGateway(ctx context.Context, req *apigatewaypb.GetGatewa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGateway") if err != nil { return err } @@ -1271,21 +1255,10 @@ func (c *restClient) CreateGateway(ctx context.Context, req *apigatewaypb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGateway") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1349,21 +1322,10 @@ func (c *restClient) UpdateGateway(ctx context.Context, req *apigatewaypb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGateway") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1413,21 +1375,10 @@ func (c *restClient) DeleteGateway(ctx context.Context, req *apigatewaypb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGateway") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1496,21 +1447,10 @@ func (c *restClient) ListApis(ctx context.Context, req *apigatewaypb.ListApisReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApis") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1573,17 +1513,7 @@ func (c *restClient) GetApi(ctx context.Context, req *apigatewaypb.GetApiRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApi") if err != nil { return err } @@ -1640,21 +1570,10 @@ func (c *restClient) CreateApi(ctx context.Context, req *apigatewaypb.CreateApiR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApi") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1718,21 +1637,10 @@ func (c *restClient) UpdateApi(ctx context.Context, req *apigatewaypb.UpdateApiR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApi") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1782,21 +1690,10 @@ func (c *restClient) DeleteApi(ctx context.Context, req *apigatewaypb.DeleteApiR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteApi") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1865,21 +1762,10 @@ func (c *restClient) ListApiConfigs(ctx context.Context, req *apigatewaypb.ListA } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApiConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1945,17 +1831,7 @@ func (c *restClient) GetApiConfig(ctx context.Context, req *apigatewaypb.GetApiC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApiConfig") if err != nil { return err } @@ -2012,21 +1888,10 @@ func (c *restClient) CreateApiConfig(ctx context.Context, req *apigatewaypb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApiConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2090,21 +1955,10 @@ func (c *restClient) UpdateApiConfig(ctx context.Context, req *apigatewaypb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApiConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2154,21 +2008,10 @@ func (c *restClient) DeleteApiConfig(ctx context.Context, req *apigatewaypb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteApiConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apigateway/apiv1/api_gateway_client_example_go123_test.go b/apigateway/apiv1/api_gateway_client_example_go123_test.go index 3a82e3cc37e2..7c8f48edbf8c 100644 --- a/apigateway/apiv1/api_gateway_client_example_go123_test.go +++ b/apigateway/apiv1/api_gateway_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListApiConfigs_all() { } for resp, err := range c.ListApiConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListApis_all() { } for resp, err := range c.ListApis(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListGateways_all() { } for resp, err := range c.ListGateways(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apigateway/apiv1/apigatewaypb/apigateway.pb.go b/apigateway/apiv1/apigatewaypb/apigateway.pb.go index fd9f53a1d062..47e5172b4e32 100755 --- a/apigateway/apiv1/apigatewaypb/apigateway.pb.go +++ b/apigateway/apiv1/apigatewaypb/apigateway.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigateway/v1/apigateway.proto @@ -320,11 +320,9 @@ type Api struct { func (x *Api) Reset() { *x = Api{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Api) String() string { @@ -335,7 +333,7 @@ func (*Api) ProtoMessage() {} func (x *Api) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +453,9 @@ type ApiConfig struct { func (x *ApiConfig) Reset() { *x = ApiConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiConfig) String() string { @@ -470,7 +466,7 @@ func (*ApiConfig) ProtoMessage() {} func (x *ApiConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +591,9 @@ type Gateway struct { func (x *Gateway) Reset() { *x = Gateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Gateway) String() string { @@ -610,7 +604,7 @@ func (*Gateway) ProtoMessage() {} func (x *Gateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -702,11 +696,9 @@ type ListGatewaysRequest struct { func (x *ListGatewaysRequest) Reset() { *x = ListGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGatewaysRequest) String() string { @@ -717,7 +709,7 @@ func (*ListGatewaysRequest) ProtoMessage() {} func (x *ListGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +775,9 @@ type ListGatewaysResponse struct { func (x *ListGatewaysResponse) Reset() { *x = ListGatewaysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGatewaysResponse) String() string { @@ -798,7 +788,7 @@ func (*ListGatewaysResponse) ProtoMessage() {} func (x *ListGatewaysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +837,9 @@ type GetGatewayRequest struct { func (x *GetGatewayRequest) Reset() { *x = GetGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGatewayRequest) String() string { @@ -862,7 +850,7 @@ func (*GetGatewayRequest) ProtoMessage() {} func (x *GetGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +890,9 @@ type CreateGatewayRequest struct { func (x *CreateGatewayRequest) Reset() { *x = CreateGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGatewayRequest) String() string { @@ -917,7 +903,7 @@ func (*CreateGatewayRequest) ProtoMessage() {} func (x *CreateGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,11 +957,9 @@ type UpdateGatewayRequest struct { func (x *UpdateGatewayRequest) Reset() { *x = UpdateGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGatewayRequest) String() string { @@ -986,7 +970,7 @@ func (*UpdateGatewayRequest) ProtoMessage() {} func (x *UpdateGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1012,9 @@ type DeleteGatewayRequest struct { func (x *DeleteGatewayRequest) Reset() { *x = DeleteGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGatewayRequest) String() string { @@ -1043,7 +1025,7 @@ func (*DeleteGatewayRequest) ProtoMessage() {} func (x *DeleteGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1068,9 @@ type ListApisRequest struct { func (x *ListApisRequest) Reset() { *x = ListApisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisRequest) String() string { @@ -1101,7 +1081,7 @@ func (*ListApisRequest) ProtoMessage() {} func (x *ListApisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1147,9 @@ type ListApisResponse struct { func (x *ListApisResponse) Reset() { *x = ListApisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisResponse) String() string { @@ -1182,7 +1160,7 @@ func (*ListApisResponse) ProtoMessage() {} func (x *ListApisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1209,9 @@ type GetApiRequest struct { func (x *GetApiRequest) Reset() { *x = GetApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiRequest) String() string { @@ -1246,7 +1222,7 @@ func (*GetApiRequest) ProtoMessage() {} func (x *GetApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1262,9 @@ type CreateApiRequest struct { func (x *CreateApiRequest) Reset() { *x = CreateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiRequest) String() string { @@ -1301,7 +1275,7 @@ func (*CreateApiRequest) ProtoMessage() {} func (x *CreateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1329,9 @@ type UpdateApiRequest struct { func (x *UpdateApiRequest) Reset() { *x = UpdateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiRequest) String() string { @@ -1370,7 +1342,7 @@ func (*UpdateApiRequest) ProtoMessage() {} func (x *UpdateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1384,9 @@ type DeleteApiRequest struct { func (x *DeleteApiRequest) Reset() { *x = DeleteApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiRequest) String() string { @@ -1427,7 +1397,7 @@ func (*DeleteApiRequest) ProtoMessage() {} func (x *DeleteApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1440,9 @@ type ListApiConfigsRequest struct { func (x *ListApiConfigsRequest) Reset() { *x = ListApiConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiConfigsRequest) String() string { @@ -1485,7 +1453,7 @@ func (*ListApiConfigsRequest) ProtoMessage() {} func (x *ListApiConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1519,9 @@ type ListApiConfigsResponse struct { func (x *ListApiConfigsResponse) Reset() { *x = ListApiConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiConfigsResponse) String() string { @@ -1566,7 +1532,7 @@ func (*ListApiConfigsResponse) ProtoMessage() {} func (x *ListApiConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1618,11 +1584,9 @@ type GetApiConfigRequest struct { func (x *GetApiConfigRequest) Reset() { *x = GetApiConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiConfigRequest) String() string { @@ -1633,7 +1597,7 @@ func (*GetApiConfigRequest) ProtoMessage() {} func (x *GetApiConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1644,9 @@ type CreateApiConfigRequest struct { func (x *CreateApiConfigRequest) Reset() { *x = CreateApiConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiConfigRequest) String() string { @@ -1695,7 +1657,7 @@ func (*CreateApiConfigRequest) ProtoMessage() {} func (x *CreateApiConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1749,11 +1711,9 @@ type UpdateApiConfigRequest struct { func (x *UpdateApiConfigRequest) Reset() { *x = UpdateApiConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiConfigRequest) String() string { @@ -1764,7 +1724,7 @@ func (*UpdateApiConfigRequest) ProtoMessage() {} func (x *UpdateApiConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1766,9 @@ type DeleteApiConfigRequest struct { func (x *DeleteApiConfigRequest) Reset() { *x = DeleteApiConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiConfigRequest) String() string { @@ -1821,7 +1779,7 @@ func (*DeleteApiConfigRequest) ProtoMessage() {} func (x *DeleteApiConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,11 +1830,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1887,7 +1843,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1973,11 +1929,9 @@ type ApiConfig_File struct { func (x *ApiConfig_File) Reset() { *x = ApiConfig_File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiConfig_File) String() string { @@ -1988,7 +1942,7 @@ func (*ApiConfig_File) ProtoMessage() {} func (x *ApiConfig_File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1983,9 @@ type ApiConfig_OpenApiDocument struct { func (x *ApiConfig_OpenApiDocument) Reset() { *x = ApiConfig_OpenApiDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiConfig_OpenApiDocument) String() string { @@ -2044,7 +1996,7 @@ func (*ApiConfig_OpenApiDocument) ProtoMessage() {} func (x *ApiConfig_OpenApiDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,11 +2041,9 @@ type ApiConfig_GrpcServiceDefinition struct { func (x *ApiConfig_GrpcServiceDefinition) Reset() { *x = ApiConfig_GrpcServiceDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiConfig_GrpcServiceDefinition) String() string { @@ -2104,7 +2054,7 @@ func (*ApiConfig_GrpcServiceDefinition) ProtoMessage() {} func (x *ApiConfig_GrpcServiceDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2147,11 +2097,9 @@ type OperationMetadata_Diagnostic struct { func (x *OperationMetadata_Diagnostic) Reset() { *x = OperationMetadata_Diagnostic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata_Diagnostic) String() string { @@ -2162,7 +2110,7 @@ func (*OperationMetadata_Diagnostic) ProtoMessage() {} func (x *OperationMetadata_Diagnostic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2725,320 +2673,6 @@ func file_google_cloud_apigateway_v1_apigateway_proto_init() { if File_google_cloud_apigateway_v1_apigateway_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Api); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApiConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Gateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListGatewaysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListApisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListApisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListApiConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListApiConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetApiConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ApiConfig_File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ApiConfig_OpenApiDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ApiConfig_GrpcServiceDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigateway_v1_apigateway_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata_Diagnostic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apigateway/apiv1/apigatewaypb/apigateway_service.pb.go b/apigateway/apiv1/apigatewaypb/apigateway_service.pb.go index 515628882e63..29b27e21d789 100755 --- a/apigateway/apiv1/apigatewaypb/apigateway_service.pb.go +++ b/apigateway/apiv1/apigatewaypb/apigateway_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigateway/v1/apigateway_service.proto diff --git a/apigateway/apiv1/helpers.go b/apigateway/apiv1/helpers.go index 0f8d77f29d6e..331568e0b11e 100755 --- a/apigateway/apiv1/helpers.go +++ b/apigateway/apiv1/helpers.go @@ -18,10 +18,20 @@ package apigateway import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "apigateway.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apigeeconnect/apiv1/apigeeconnectpb/connection.pb.go b/apigeeconnect/apiv1/apigeeconnectpb/connection.pb.go index 5df7aef4e07a..8c276849db5a 100755 --- a/apigeeconnect/apiv1/apigeeconnectpb/connection.pb.go +++ b/apigeeconnect/apiv1/apigeeconnectpb/connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigeeconnect/v1/connection.proto @@ -64,11 +64,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -79,7 +77,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -146,7 +142,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -206,7 +200,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +249,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -270,7 +262,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,56 +415,6 @@ func file_google_cloud_apigeeconnect_v1_connection_proto_init() { if File_google_cloud_apigeeconnect_v1_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apigeeconnect/apiv1/apigeeconnectpb/tether.pb.go b/apigeeconnect/apiv1/apigeeconnectpb/tether.pb.go index b36d481e4a16..3e294baf0ae6 100755 --- a/apigeeconnect/apiv1/apigeeconnectpb/tether.pb.go +++ b/apigeeconnect/apiv1/apigeeconnectpb/tether.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigeeconnect/v1/tether.proto @@ -220,11 +220,9 @@ type EgressRequest struct { func (x *EgressRequest) Reset() { *x = EgressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EgressRequest) String() string { @@ -235,7 +233,7 @@ func (*EgressRequest) ProtoMessage() {} func (x *EgressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +308,9 @@ type Payload struct { func (x *Payload) Reset() { *x = Payload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Payload) String() string { @@ -325,7 +321,7 @@ func (*Payload) ProtoMessage() {} func (x *Payload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +401,9 @@ type StreamInfo struct { func (x *StreamInfo) Reset() { *x = StreamInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamInfo) String() string { @@ -420,7 +414,7 @@ func (*StreamInfo) ProtoMessage() {} func (x *StreamInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +463,9 @@ type EgressResponse struct { func (x *EgressResponse) Reset() { *x = EgressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EgressResponse) String() string { @@ -484,7 +476,7 @@ func (*EgressResponse) ProtoMessage() {} func (x *EgressResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +561,9 @@ type HttpRequest struct { func (x *HttpRequest) Reset() { *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRequest) String() string { @@ -584,7 +574,7 @@ func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +643,9 @@ type Url struct { func (x *Url) Reset() { *x = Url{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Url) String() string { @@ -668,7 +656,7 @@ func (*Url) ProtoMessage() {} func (x *Url) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +704,9 @@ type Header struct { func (x *Header) Reset() { *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Header) String() string { @@ -731,7 +717,7 @@ func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +771,9 @@ type HttpResponse struct { func (x *HttpResponse) Reset() { *x = HttpResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpResponse) String() string { @@ -800,7 +784,7 @@ func (*HttpResponse) ProtoMessage() {} func (x *HttpResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,104 +1043,6 @@ func file_google_cloud_apigeeconnect_v1_tether_proto_init() { if File_google_cloud_apigeeconnect_v1_tether_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EgressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Payload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StreamInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EgressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Url); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*HttpResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_apigeeconnect_v1_tether_proto_msgTypes[1].OneofWrappers = []any{ (*Payload_HttpRequest)(nil), (*Payload_StreamInfo)(nil), diff --git a/apigeeconnect/apiv1/connection_client.go b/apigeeconnect/apiv1/connection_client.go index f5ee600bc70d..82914efd59bb 100755 --- a/apigeeconnect/apiv1/connection_client.go +++ b/apigeeconnect/apiv1/connection_client.go @@ -19,6 +19,7 @@ package apigeeconnect import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -138,6 +139,8 @@ type connectionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConnectionClient creates a new connection service client based on gRPC. @@ -164,6 +167,7 @@ func NewConnectionClient(ctx context.Context, opts ...option.ClientOption) (*Con connPool: connPool, connectionClient: apigeeconnectpb.NewConnectionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -217,7 +221,7 @@ func (c *connectionGRPCClient) ListConnections(ctx context.Context, req *apigeec } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.connectionClient.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.connectionClient.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { diff --git a/apigeeconnect/apiv1/connection_client_example_go123_test.go b/apigeeconnect/apiv1/connection_client_example_go123_test.go index 2820c9d1be4f..a4bba47fd3f6 100644 --- a/apigeeconnect/apiv1/connection_client_example_go123_test.go +++ b/apigeeconnect/apiv1/connection_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleConnectionClient_ListConnections_all() { } for resp, err := range c.ListConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apigeeconnect/apiv1/helpers.go b/apigeeconnect/apiv1/helpers.go index e0850d3ca497..e20e8a97c76e 100755 --- a/apigeeconnect/apiv1/helpers.go +++ b/apigeeconnect/apiv1/helpers.go @@ -18,10 +18,16 @@ package apigeeconnect import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "apigeeconnect.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apigeeconnect/apiv1/tether_client.go b/apigeeconnect/apiv1/tether_client.go index ecca6754b537..58be3fa1d476 100755 --- a/apigeeconnect/apiv1/tether_client.go +++ b/apigeeconnect/apiv1/tether_client.go @@ -18,6 +18,7 @@ package apigeeconnect import ( "context" + "log/slog" "math" apigeeconnectpb "cloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb" @@ -127,6 +128,8 @@ type tetherGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTetherClient creates a new tether client based on gRPC. @@ -155,6 +158,7 @@ func NewTetherClient(ctx context.Context, opts ...option.ClientOption) (*TetherC connPool: connPool, tetherClient: apigeeconnectpb.NewTetherClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -194,7 +198,9 @@ func (c *tetherGRPCClient) Egress(ctx context.Context, opts ...gax.CallOption) ( opts = append((*c.CallOptions).Egress[0:len((*c.CallOptions).Egress):len((*c.CallOptions).Egress)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "Egress") resp, err = c.tetherClient.Egress(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "Egress") return err }, opts...) if err != nil { diff --git a/apigeeregistry/apiv1/apigeeregistrypb/provisioning_service.pb.go b/apigeeregistry/apiv1/apigeeregistrypb/provisioning_service.pb.go index 01007e76a9ca..c56cbf662b71 100755 --- a/apigeeregistry/apiv1/apigeeregistrypb/provisioning_service.pb.go +++ b/apigeeregistry/apiv1/apigeeregistrypb/provisioning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigeeregistry/v1/provisioning_service.proto @@ -128,11 +128,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -143,7 +141,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -207,7 +203,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +238,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -257,7 +251,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -321,7 +313,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,11 +401,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -424,7 +414,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +488,9 @@ type Instance_Config struct { func (x *Instance_Config) Reset() { *x = Instance_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Config) String() string { @@ -513,7 +501,7 @@ func (*Instance_Config) ProtoMessage() {} func (x *Instance_Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,80 +749,6 @@ func file_google_cloud_apigeeregistry_v1_provisioning_service_proto_init() { if File_google_cloud_apigeeregistry_v1_provisioning_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_provisioning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apigeeregistry/apiv1/apigeeregistrypb/registry_models.pb.go b/apigeeregistry/apiv1/apigeeregistrypb/registry_models.pb.go index e8d6db365df0..039f9d8c5c20 100755 --- a/apigeeregistry/apiv1/apigeeregistrypb/registry_models.pb.go +++ b/apigeeregistry/apiv1/apigeeregistrypb/registry_models.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigeeregistry/v1/registry_models.proto @@ -87,11 +87,9 @@ type Api struct { func (x *Api) Reset() { *x = Api{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Api) String() string { @@ -102,7 +100,7 @@ func (*Api) ProtoMessage() {} func (x *Api) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +230,9 @@ type ApiVersion struct { func (x *ApiVersion) Reset() { *x = ApiVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiVersion) String() string { @@ -247,7 +243,7 @@ func (*ApiVersion) ProtoMessage() {} func (x *ApiVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +390,9 @@ type ApiSpec struct { func (x *ApiSpec) Reset() { *x = ApiSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiSpec) String() string { @@ -409,7 +403,7 @@ func (*ApiSpec) ProtoMessage() {} func (x *ApiSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +581,9 @@ type ApiDeployment struct { func (x *ApiDeployment) Reset() { *x = ApiDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiDeployment) String() string { @@ -602,7 +594,7 @@ func (*ApiDeployment) ProtoMessage() {} func (x *ApiDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +747,9 @@ type Artifact struct { func (x *Artifact) Reset() { *x = Artifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifact) String() string { @@ -770,7 +760,7 @@ func (*Artifact) ProtoMessage() {} func (x *Artifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1196,68 +1186,6 @@ func file_google_cloud_apigeeregistry_v1_registry_models_proto_init() { if File_google_cloud_apigeeregistry_v1_registry_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Api); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApiVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ApiSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ApiDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_models_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Artifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apigeeregistry/apiv1/apigeeregistrypb/registry_service.pb.go b/apigeeregistry/apiv1/apigeeregistrypb/registry_service.pb.go index 1007e52318d5..cf303a879b45 100755 --- a/apigeeregistry/apiv1/apigeeregistrypb/registry_service.pb.go +++ b/apigeeregistry/apiv1/apigeeregistrypb/registry_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apigeeregistry/v1/registry_service.proto @@ -70,11 +70,9 @@ type ListApisRequest struct { func (x *ListApisRequest) Reset() { *x = ListApisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisRequest) String() string { @@ -85,7 +83,7 @@ func (*ListApisRequest) ProtoMessage() {} func (x *ListApisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +141,9 @@ type ListApisResponse struct { func (x *ListApisResponse) Reset() { *x = ListApisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisResponse) String() string { @@ -158,7 +154,7 @@ func (*ListApisResponse) ProtoMessage() {} func (x *ListApisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +196,9 @@ type GetApiRequest struct { func (x *GetApiRequest) Reset() { *x = GetApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiRequest) String() string { @@ -215,7 +209,7 @@ func (*GetApiRequest) ProtoMessage() {} func (x *GetApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +254,9 @@ type CreateApiRequest struct { func (x *CreateApiRequest) Reset() { *x = CreateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiRequest) String() string { @@ -275,7 +267,7 @@ func (*CreateApiRequest) ProtoMessage() {} func (x *CreateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type UpdateApiRequest struct { func (x *UpdateApiRequest) Reset() { *x = UpdateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiRequest) String() string { @@ -349,7 +339,7 @@ func (*UpdateApiRequest) ProtoMessage() {} func (x *UpdateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +391,9 @@ type DeleteApiRequest struct { func (x *DeleteApiRequest) Reset() { *x = DeleteApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiRequest) String() string { @@ -416,7 +404,7 @@ func (*DeleteApiRequest) ProtoMessage() {} func (x *DeleteApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +460,9 @@ type ListApiVersionsRequest struct { func (x *ListApiVersionsRequest) Reset() { *x = ListApiVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiVersionsRequest) String() string { @@ -487,7 +473,7 @@ func (*ListApiVersionsRequest) ProtoMessage() {} func (x *ListApiVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +531,9 @@ type ListApiVersionsResponse struct { func (x *ListApiVersionsResponse) Reset() { *x = ListApiVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiVersionsResponse) String() string { @@ -560,7 +544,7 @@ func (*ListApiVersionsResponse) ProtoMessage() {} func (x *ListApiVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +586,9 @@ type GetApiVersionRequest struct { func (x *GetApiVersionRequest) Reset() { *x = GetApiVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiVersionRequest) String() string { @@ -617,7 +599,7 @@ func (*GetApiVersionRequest) ProtoMessage() {} func (x *GetApiVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +644,9 @@ type CreateApiVersionRequest struct { func (x *CreateApiVersionRequest) Reset() { *x = CreateApiVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiVersionRequest) String() string { @@ -677,7 +657,7 @@ func (*CreateApiVersionRequest) ProtoMessage() {} func (x *CreateApiVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +716,9 @@ type UpdateApiVersionRequest struct { func (x *UpdateApiVersionRequest) Reset() { *x = UpdateApiVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiVersionRequest) String() string { @@ -751,7 +729,7 @@ func (*UpdateApiVersionRequest) ProtoMessage() {} func (x *UpdateApiVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +781,9 @@ type DeleteApiVersionRequest struct { func (x *DeleteApiVersionRequest) Reset() { *x = DeleteApiVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiVersionRequest) String() string { @@ -818,7 +794,7 @@ func (*DeleteApiVersionRequest) ProtoMessage() {} func (x *DeleteApiVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +850,9 @@ type ListApiSpecsRequest struct { func (x *ListApiSpecsRequest) Reset() { *x = ListApiSpecsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiSpecsRequest) String() string { @@ -889,7 +863,7 @@ func (*ListApiSpecsRequest) ProtoMessage() {} func (x *ListApiSpecsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +921,9 @@ type ListApiSpecsResponse struct { func (x *ListApiSpecsResponse) Reset() { *x = ListApiSpecsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiSpecsResponse) String() string { @@ -962,7 +934,7 @@ func (*ListApiSpecsResponse) ProtoMessage() {} func (x *ListApiSpecsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +976,9 @@ type GetApiSpecRequest struct { func (x *GetApiSpecRequest) Reset() { *x = GetApiSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiSpecRequest) String() string { @@ -1019,7 +989,7 @@ func (*GetApiSpecRequest) ProtoMessage() {} func (x *GetApiSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1024,9 @@ type GetApiSpecContentsRequest struct { func (x *GetApiSpecContentsRequest) Reset() { *x = GetApiSpecContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiSpecContentsRequest) String() string { @@ -1069,7 +1037,7 @@ func (*GetApiSpecContentsRequest) ProtoMessage() {} func (x *GetApiSpecContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1114,11 +1082,9 @@ type CreateApiSpecRequest struct { func (x *CreateApiSpecRequest) Reset() { *x = CreateApiSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiSpecRequest) String() string { @@ -1129,7 +1095,7 @@ func (*CreateApiSpecRequest) ProtoMessage() {} func (x *CreateApiSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1154,9 @@ type UpdateApiSpecRequest struct { func (x *UpdateApiSpecRequest) Reset() { *x = UpdateApiSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiSpecRequest) String() string { @@ -1203,7 +1167,7 @@ func (*UpdateApiSpecRequest) ProtoMessage() {} func (x *UpdateApiSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1219,9 @@ type DeleteApiSpecRequest struct { func (x *DeleteApiSpecRequest) Reset() { *x = DeleteApiSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiSpecRequest) String() string { @@ -1270,7 +1232,7 @@ func (*DeleteApiSpecRequest) ProtoMessage() {} func (x *DeleteApiSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,11 +1276,9 @@ type TagApiSpecRevisionRequest struct { func (x *TagApiSpecRevisionRequest) Reset() { *x = TagApiSpecRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagApiSpecRevisionRequest) String() string { @@ -1329,7 +1289,7 @@ func (*TagApiSpecRevisionRequest) ProtoMessage() {} func (x *TagApiSpecRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1375,11 +1335,9 @@ type ListApiSpecRevisionsRequest struct { func (x *ListApiSpecRevisionsRequest) Reset() { *x = ListApiSpecRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiSpecRevisionsRequest) String() string { @@ -1390,7 +1348,7 @@ func (*ListApiSpecRevisionsRequest) ProtoMessage() {} func (x *ListApiSpecRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1399,9 @@ type ListApiSpecRevisionsResponse struct { func (x *ListApiSpecRevisionsResponse) Reset() { *x = ListApiSpecRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiSpecRevisionsResponse) String() string { @@ -1456,7 +1412,7 @@ func (*ListApiSpecRevisionsResponse) ProtoMessage() {} func (x *ListApiSpecRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1458,9 @@ type RollbackApiSpecRequest struct { func (x *RollbackApiSpecRequest) Reset() { *x = RollbackApiSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackApiSpecRequest) String() string { @@ -1517,7 +1471,7 @@ func (*RollbackApiSpecRequest) ProtoMessage() {} func (x *RollbackApiSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1562,11 +1516,9 @@ type DeleteApiSpecRevisionRequest struct { func (x *DeleteApiSpecRevisionRequest) Reset() { *x = DeleteApiSpecRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiSpecRevisionRequest) String() string { @@ -1577,7 +1529,7 @@ func (*DeleteApiSpecRevisionRequest) ProtoMessage() {} func (x *DeleteApiSpecRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1578,9 @@ type ListApiDeploymentsRequest struct { func (x *ListApiDeploymentsRequest) Reset() { *x = ListApiDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiDeploymentsRequest) String() string { @@ -1641,7 +1591,7 @@ func (*ListApiDeploymentsRequest) ProtoMessage() {} func (x *ListApiDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1699,11 +1649,9 @@ type ListApiDeploymentsResponse struct { func (x *ListApiDeploymentsResponse) Reset() { *x = ListApiDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiDeploymentsResponse) String() string { @@ -1714,7 +1662,7 @@ func (*ListApiDeploymentsResponse) ProtoMessage() {} func (x *ListApiDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,11 +1704,9 @@ type GetApiDeploymentRequest struct { func (x *GetApiDeploymentRequest) Reset() { *x = GetApiDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiDeploymentRequest) String() string { @@ -1771,7 +1717,7 @@ func (*GetApiDeploymentRequest) ProtoMessage() {} func (x *GetApiDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1762,9 @@ type CreateApiDeploymentRequest struct { func (x *CreateApiDeploymentRequest) Reset() { *x = CreateApiDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiDeploymentRequest) String() string { @@ -1831,7 +1775,7 @@ func (*CreateApiDeploymentRequest) ProtoMessage() {} func (x *CreateApiDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1890,11 +1834,9 @@ type UpdateApiDeploymentRequest struct { func (x *UpdateApiDeploymentRequest) Reset() { *x = UpdateApiDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiDeploymentRequest) String() string { @@ -1905,7 +1847,7 @@ func (*UpdateApiDeploymentRequest) ProtoMessage() {} func (x *UpdateApiDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1957,11 +1899,9 @@ type DeleteApiDeploymentRequest struct { func (x *DeleteApiDeploymentRequest) Reset() { *x = DeleteApiDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiDeploymentRequest) String() string { @@ -1972,7 +1912,7 @@ func (*DeleteApiDeploymentRequest) ProtoMessage() {} func (x *DeleteApiDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2016,11 +1956,9 @@ type TagApiDeploymentRevisionRequest struct { func (x *TagApiDeploymentRevisionRequest) Reset() { *x = TagApiDeploymentRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagApiDeploymentRevisionRequest) String() string { @@ -2031,7 +1969,7 @@ func (*TagApiDeploymentRevisionRequest) ProtoMessage() {} func (x *TagApiDeploymentRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2077,11 +2015,9 @@ type ListApiDeploymentRevisionsRequest struct { func (x *ListApiDeploymentRevisionsRequest) Reset() { *x = ListApiDeploymentRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiDeploymentRevisionsRequest) String() string { @@ -2092,7 +2028,7 @@ func (*ListApiDeploymentRevisionsRequest) ProtoMessage() {} func (x *ListApiDeploymentRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2143,11 +2079,9 @@ type ListApiDeploymentRevisionsResponse struct { func (x *ListApiDeploymentRevisionsResponse) Reset() { *x = ListApiDeploymentRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiDeploymentRevisionsResponse) String() string { @@ -2158,7 +2092,7 @@ func (*ListApiDeploymentRevisionsResponse) ProtoMessage() {} func (x *ListApiDeploymentRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2204,11 +2138,9 @@ type RollbackApiDeploymentRequest struct { func (x *RollbackApiDeploymentRequest) Reset() { *x = RollbackApiDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackApiDeploymentRequest) String() string { @@ -2219,7 +2151,7 @@ func (*RollbackApiDeploymentRequest) ProtoMessage() {} func (x *RollbackApiDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2196,9 @@ type DeleteApiDeploymentRevisionRequest struct { func (x *DeleteApiDeploymentRevisionRequest) Reset() { *x = DeleteApiDeploymentRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiDeploymentRevisionRequest) String() string { @@ -2279,7 +2209,7 @@ func (*DeleteApiDeploymentRevisionRequest) ProtoMessage() {} func (x *DeleteApiDeploymentRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2258,9 @@ type ListArtifactsRequest struct { func (x *ListArtifactsRequest) Reset() { *x = ListArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsRequest) String() string { @@ -2343,7 +2271,7 @@ func (*ListArtifactsRequest) ProtoMessage() {} func (x *ListArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2401,11 +2329,9 @@ type ListArtifactsResponse struct { func (x *ListArtifactsResponse) Reset() { *x = ListArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListArtifactsResponse) String() string { @@ -2416,7 +2342,7 @@ func (*ListArtifactsResponse) ProtoMessage() {} func (x *ListArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2458,11 +2384,9 @@ type GetArtifactRequest struct { func (x *GetArtifactRequest) Reset() { *x = GetArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetArtifactRequest) String() string { @@ -2473,7 +2397,7 @@ func (*GetArtifactRequest) ProtoMessage() {} func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2508,11 +2432,9 @@ type GetArtifactContentsRequest struct { func (x *GetArtifactContentsRequest) Reset() { *x = GetArtifactContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetArtifactContentsRequest) String() string { @@ -2523,7 +2445,7 @@ func (*GetArtifactContentsRequest) ProtoMessage() {} func (x *GetArtifactContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2568,11 +2490,9 @@ type CreateArtifactRequest struct { func (x *CreateArtifactRequest) Reset() { *x = CreateArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateArtifactRequest) String() string { @@ -2583,7 +2503,7 @@ func (*CreateArtifactRequest) ProtoMessage() {} func (x *CreateArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2634,11 +2554,9 @@ type ReplaceArtifactRequest struct { func (x *ReplaceArtifactRequest) Reset() { *x = ReplaceArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceArtifactRequest) String() string { @@ -2649,7 +2567,7 @@ func (*ReplaceArtifactRequest) ProtoMessage() {} func (x *ReplaceArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2684,11 +2602,9 @@ type DeleteArtifactRequest struct { func (x *DeleteArtifactRequest) Reset() { *x = DeleteArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteArtifactRequest) String() string { @@ -2699,7 +2615,7 @@ func (*DeleteArtifactRequest) ProtoMessage() {} func (x *DeleteArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3874,512 +3790,6 @@ func file_google_cloud_apigeeregistry_v1_registry_service_proto_init() { return } file_google_cloud_apigeeregistry_v1_registry_models_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListApisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListApisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListApiVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListApiVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetApiVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListApiSpecsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListApiSpecsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetApiSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetApiSpecContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TagApiSpecRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListApiSpecRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListApiSpecRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RollbackApiSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiSpecRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListApiDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListApiDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetApiDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*TagApiDeploymentRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListApiDeploymentRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListApiDeploymentRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*RollbackApiDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiDeploymentRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GetArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetArtifactContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreateArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apigeeregistry_v1_registry_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*DeleteArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apigeeregistry/apiv1/helpers.go b/apigeeregistry/apiv1/helpers.go index 7b40257e676f..0e0cb33c6499 100755 --- a/apigeeregistry/apiv1/helpers.go +++ b/apigeeregistry/apiv1/helpers.go @@ -18,10 +18,16 @@ package apigeeregistry import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "apigeeregistry.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apigeeregistry/apiv1/provisioning_client.go b/apigeeregistry/apiv1/provisioning_client.go index 8ba40c51efa3..3771c8337abe 100755 --- a/apigeeregistry/apiv1/provisioning_client.go +++ b/apigeeregistry/apiv1/provisioning_client.go @@ -19,6 +19,7 @@ package apigeeregistry import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -258,6 +259,8 @@ type provisioningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProvisioningClient creates a new provisioning client based on gRPC. @@ -285,6 +288,7 @@ func NewProvisioningClient(ctx context.Context, opts ...option.ClientOption) (*P connPool: connPool, provisioningClient: apigeeregistrypb.NewProvisioningClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -341,7 +345,7 @@ func (c *provisioningGRPCClient) CreateInstance(ctx context.Context, req *apigee var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.provisioningClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.provisioningClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -361,7 +365,7 @@ func (c *provisioningGRPCClient) DeleteInstance(ctx context.Context, req *apigee var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.provisioningClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.provisioningClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -381,7 +385,7 @@ func (c *provisioningGRPCClient) GetInstance(ctx context.Context, req *apigeereg var resp *apigeeregistrypb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.provisioningClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.provisioningClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -399,7 +403,7 @@ func (c *provisioningGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -428,7 +432,7 @@ func (c *provisioningGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -463,7 +467,7 @@ func (c *provisioningGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -481,7 +485,7 @@ func (c *provisioningGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -499,7 +503,7 @@ func (c *provisioningGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -516,7 +520,7 @@ func (c *provisioningGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -530,7 +534,7 @@ func (c *provisioningGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -545,7 +549,7 @@ func (c *provisioningGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -574,7 +578,7 @@ func (c *provisioningGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/apigeeregistry/apiv1/provisioning_client_example_go123_test.go b/apigeeregistry/apiv1/provisioning_client_example_go123_test.go index 4cf5c59e1fe2..2414a4e1e589 100644 --- a/apigeeregistry/apiv1/provisioning_client_example_go123_test.go +++ b/apigeeregistry/apiv1/provisioning_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleProvisioningClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleProvisioningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apigeeregistry/apiv1/registry_client.go b/apigeeregistry/apiv1/registry_client.go index b0f750659edd..8287b11c7ca1 100755 --- a/apigeeregistry/apiv1/registry_client.go +++ b/apigeeregistry/apiv1/registry_client.go @@ -19,6 +19,7 @@ package apigeeregistry import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -971,6 +972,8 @@ type registryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRegistryClient creates a new registry client based on gRPC. @@ -997,6 +1000,7 @@ func NewRegistryClient(ctx context.Context, opts ...option.ClientOption) (*Regis connPool: connPool, registryClient: apigeeregistrypb.NewRegistryClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1053,7 +1057,7 @@ func (c *registryGRPCClient) ListApis(ctx context.Context, req *apigeeregistrypb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApis, req, settings.GRPC, c.logger, "ListApis") return err }, opts...) if err != nil { @@ -1088,7 +1092,7 @@ func (c *registryGRPCClient) GetApi(ctx context.Context, req *apigeeregistrypb.G var resp *apigeeregistrypb.Api err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetApi, req, settings.GRPC, c.logger, "GetApi") return err }, opts...) if err != nil { @@ -1106,7 +1110,7 @@ func (c *registryGRPCClient) CreateApi(ctx context.Context, req *apigeeregistryp var resp *apigeeregistrypb.Api err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.CreateApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.CreateApi, req, settings.GRPC, c.logger, "CreateApi") return err }, opts...) if err != nil { @@ -1124,7 +1128,7 @@ func (c *registryGRPCClient) UpdateApi(ctx context.Context, req *apigeeregistryp var resp *apigeeregistrypb.Api err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.UpdateApi(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.UpdateApi, req, settings.GRPC, c.logger, "UpdateApi") return err }, opts...) if err != nil { @@ -1141,7 +1145,7 @@ func (c *registryGRPCClient) DeleteApi(ctx context.Context, req *apigeeregistryp opts = append((*c.CallOptions).DeleteApi[0:len((*c.CallOptions).DeleteApi):len((*c.CallOptions).DeleteApi)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registryClient.DeleteApi(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registryClient.DeleteApi, req, settings.GRPC, c.logger, "DeleteApi") return err }, opts...) return err @@ -1167,7 +1171,7 @@ func (c *registryGRPCClient) ListApiVersions(ctx context.Context, req *apigeereg } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApiVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApiVersions, req, settings.GRPC, c.logger, "ListApiVersions") return err }, opts...) if err != nil { @@ -1202,7 +1206,7 @@ func (c *registryGRPCClient) GetApiVersion(ctx context.Context, req *apigeeregis var resp *apigeeregistrypb.ApiVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetApiVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetApiVersion, req, settings.GRPC, c.logger, "GetApiVersion") return err }, opts...) if err != nil { @@ -1220,7 +1224,7 @@ func (c *registryGRPCClient) CreateApiVersion(ctx context.Context, req *apigeere var resp *apigeeregistrypb.ApiVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.CreateApiVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.CreateApiVersion, req, settings.GRPC, c.logger, "CreateApiVersion") return err }, opts...) if err != nil { @@ -1238,7 +1242,7 @@ func (c *registryGRPCClient) UpdateApiVersion(ctx context.Context, req *apigeere var resp *apigeeregistrypb.ApiVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.UpdateApiVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.UpdateApiVersion, req, settings.GRPC, c.logger, "UpdateApiVersion") return err }, opts...) if err != nil { @@ -1255,7 +1259,7 @@ func (c *registryGRPCClient) DeleteApiVersion(ctx context.Context, req *apigeere opts = append((*c.CallOptions).DeleteApiVersion[0:len((*c.CallOptions).DeleteApiVersion):len((*c.CallOptions).DeleteApiVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registryClient.DeleteApiVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registryClient.DeleteApiVersion, req, settings.GRPC, c.logger, "DeleteApiVersion") return err }, opts...) return err @@ -1281,7 +1285,7 @@ func (c *registryGRPCClient) ListApiSpecs(ctx context.Context, req *apigeeregist } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApiSpecs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApiSpecs, req, settings.GRPC, c.logger, "ListApiSpecs") return err }, opts...) if err != nil { @@ -1316,7 +1320,7 @@ func (c *registryGRPCClient) GetApiSpec(ctx context.Context, req *apigeeregistry var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetApiSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetApiSpec, req, settings.GRPC, c.logger, "GetApiSpec") return err }, opts...) if err != nil { @@ -1334,7 +1338,7 @@ func (c *registryGRPCClient) GetApiSpecContents(ctx context.Context, req *apigee var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetApiSpecContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetApiSpecContents, req, settings.GRPC, c.logger, "GetApiSpecContents") return err }, opts...) if err != nil { @@ -1352,7 +1356,7 @@ func (c *registryGRPCClient) CreateApiSpec(ctx context.Context, req *apigeeregis var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.CreateApiSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.CreateApiSpec, req, settings.GRPC, c.logger, "CreateApiSpec") return err }, opts...) if err != nil { @@ -1370,7 +1374,7 @@ func (c *registryGRPCClient) UpdateApiSpec(ctx context.Context, req *apigeeregis var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.UpdateApiSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.UpdateApiSpec, req, settings.GRPC, c.logger, "UpdateApiSpec") return err }, opts...) if err != nil { @@ -1387,7 +1391,7 @@ func (c *registryGRPCClient) DeleteApiSpec(ctx context.Context, req *apigeeregis opts = append((*c.CallOptions).DeleteApiSpec[0:len((*c.CallOptions).DeleteApiSpec):len((*c.CallOptions).DeleteApiSpec)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registryClient.DeleteApiSpec(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registryClient.DeleteApiSpec, req, settings.GRPC, c.logger, "DeleteApiSpec") return err }, opts...) return err @@ -1402,7 +1406,7 @@ func (c *registryGRPCClient) TagApiSpecRevision(ctx context.Context, req *apigee var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.TagApiSpecRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.TagApiSpecRevision, req, settings.GRPC, c.logger, "TagApiSpecRevision") return err }, opts...) if err != nil { @@ -1431,7 +1435,7 @@ func (c *registryGRPCClient) ListApiSpecRevisions(ctx context.Context, req *apig } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApiSpecRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApiSpecRevisions, req, settings.GRPC, c.logger, "ListApiSpecRevisions") return err }, opts...) if err != nil { @@ -1466,7 +1470,7 @@ func (c *registryGRPCClient) RollbackApiSpec(ctx context.Context, req *apigeereg var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.RollbackApiSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.RollbackApiSpec, req, settings.GRPC, c.logger, "RollbackApiSpec") return err }, opts...) if err != nil { @@ -1484,7 +1488,7 @@ func (c *registryGRPCClient) DeleteApiSpecRevision(ctx context.Context, req *api var resp *apigeeregistrypb.ApiSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.DeleteApiSpecRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.DeleteApiSpecRevision, req, settings.GRPC, c.logger, "DeleteApiSpecRevision") return err }, opts...) if err != nil { @@ -1513,7 +1517,7 @@ func (c *registryGRPCClient) ListApiDeployments(ctx context.Context, req *apigee } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApiDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApiDeployments, req, settings.GRPC, c.logger, "ListApiDeployments") return err }, opts...) if err != nil { @@ -1548,7 +1552,7 @@ func (c *registryGRPCClient) GetApiDeployment(ctx context.Context, req *apigeere var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetApiDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetApiDeployment, req, settings.GRPC, c.logger, "GetApiDeployment") return err }, opts...) if err != nil { @@ -1566,7 +1570,7 @@ func (c *registryGRPCClient) CreateApiDeployment(ctx context.Context, req *apige var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.CreateApiDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.CreateApiDeployment, req, settings.GRPC, c.logger, "CreateApiDeployment") return err }, opts...) if err != nil { @@ -1584,7 +1588,7 @@ func (c *registryGRPCClient) UpdateApiDeployment(ctx context.Context, req *apige var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.UpdateApiDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.UpdateApiDeployment, req, settings.GRPC, c.logger, "UpdateApiDeployment") return err }, opts...) if err != nil { @@ -1601,7 +1605,7 @@ func (c *registryGRPCClient) DeleteApiDeployment(ctx context.Context, req *apige opts = append((*c.CallOptions).DeleteApiDeployment[0:len((*c.CallOptions).DeleteApiDeployment):len((*c.CallOptions).DeleteApiDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registryClient.DeleteApiDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registryClient.DeleteApiDeployment, req, settings.GRPC, c.logger, "DeleteApiDeployment") return err }, opts...) return err @@ -1616,7 +1620,7 @@ func (c *registryGRPCClient) TagApiDeploymentRevision(ctx context.Context, req * var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.TagApiDeploymentRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.TagApiDeploymentRevision, req, settings.GRPC, c.logger, "TagApiDeploymentRevision") return err }, opts...) if err != nil { @@ -1645,7 +1649,7 @@ func (c *registryGRPCClient) ListApiDeploymentRevisions(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListApiDeploymentRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListApiDeploymentRevisions, req, settings.GRPC, c.logger, "ListApiDeploymentRevisions") return err }, opts...) if err != nil { @@ -1680,7 +1684,7 @@ func (c *registryGRPCClient) RollbackApiDeployment(ctx context.Context, req *api var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.RollbackApiDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.RollbackApiDeployment, req, settings.GRPC, c.logger, "RollbackApiDeployment") return err }, opts...) if err != nil { @@ -1698,7 +1702,7 @@ func (c *registryGRPCClient) DeleteApiDeploymentRevision(ctx context.Context, re var resp *apigeeregistrypb.ApiDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.DeleteApiDeploymentRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.DeleteApiDeploymentRevision, req, settings.GRPC, c.logger, "DeleteApiDeploymentRevision") return err }, opts...) if err != nil { @@ -1727,7 +1731,7 @@ func (c *registryGRPCClient) ListArtifacts(ctx context.Context, req *apigeeregis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ListArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ListArtifacts, req, settings.GRPC, c.logger, "ListArtifacts") return err }, opts...) if err != nil { @@ -1762,7 +1766,7 @@ func (c *registryGRPCClient) GetArtifact(ctx context.Context, req *apigeeregistr var resp *apigeeregistrypb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetArtifact, req, settings.GRPC, c.logger, "GetArtifact") return err }, opts...) if err != nil { @@ -1780,7 +1784,7 @@ func (c *registryGRPCClient) GetArtifactContents(ctx context.Context, req *apige var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.GetArtifactContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.GetArtifactContents, req, settings.GRPC, c.logger, "GetArtifactContents") return err }, opts...) if err != nil { @@ -1798,7 +1802,7 @@ func (c *registryGRPCClient) CreateArtifact(ctx context.Context, req *apigeeregi var resp *apigeeregistrypb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.CreateArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.CreateArtifact, req, settings.GRPC, c.logger, "CreateArtifact") return err }, opts...) if err != nil { @@ -1816,7 +1820,7 @@ func (c *registryGRPCClient) ReplaceArtifact(ctx context.Context, req *apigeereg var resp *apigeeregistrypb.Artifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registryClient.ReplaceArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registryClient.ReplaceArtifact, req, settings.GRPC, c.logger, "ReplaceArtifact") return err }, opts...) if err != nil { @@ -1833,7 +1837,7 @@ func (c *registryGRPCClient) DeleteArtifact(ctx context.Context, req *apigeeregi opts = append((*c.CallOptions).DeleteArtifact[0:len((*c.CallOptions).DeleteArtifact):len((*c.CallOptions).DeleteArtifact)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registryClient.DeleteArtifact(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registryClient.DeleteArtifact, req, settings.GRPC, c.logger, "DeleteArtifact") return err }, opts...) return err @@ -1848,7 +1852,7 @@ func (c *registryGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1877,7 +1881,7 @@ func (c *registryGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1912,7 +1916,7 @@ func (c *registryGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1930,7 +1934,7 @@ func (c *registryGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1948,7 +1952,7 @@ func (c *registryGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1965,7 +1969,7 @@ func (c *registryGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1979,7 +1983,7 @@ func (c *registryGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1994,7 +1998,7 @@ func (c *registryGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2023,7 +2027,7 @@ func (c *registryGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/apigeeregistry/apiv1/registry_client_example_go123_test.go b/apigeeregistry/apiv1/registry_client_example_go123_test.go index 90de8a3efb0c..a9e8921a091f 100644 --- a/apigeeregistry/apiv1/registry_client_example_go123_test.go +++ b/apigeeregistry/apiv1/registry_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleRegistryClient_ListApiDeploymentRevisions_all() { } for resp, err := range c.ListApiDeploymentRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleRegistryClient_ListApiDeployments_all() { } for resp, err := range c.ListApiDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleRegistryClient_ListApiSpecRevisions_all() { } for resp, err := range c.ListApiSpecRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleRegistryClient_ListApiSpecs_all() { } for resp, err := range c.ListApiSpecs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleRegistryClient_ListApiVersions_all() { } for resp, err := range c.ListApiVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleRegistryClient_ListApis_all() { } for resp, err := range c.ListApis(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleRegistryClient_ListArtifacts_all() { } for resp, err := range c.ListArtifacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleRegistryClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleRegistryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/api_hub_client.go b/apihub/apiv1/api_hub_client.go index eec1fa1c98d0..87978de755a3 100755 --- a/apihub/apiv1/api_hub_client.go +++ b/apihub/apiv1/api_hub_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -822,6 +821,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new api hub rest client. @@ -839,6 +840,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -927,17 +929,7 @@ func (c *restClient) CreateApi(ctx context.Context, req *apihubpb.CreateApiReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApi") if err != nil { return err } @@ -987,17 +979,7 @@ func (c *restClient) GetApi(ctx context.Context, req *apihubpb.GetApiRequest, op httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApi") if err != nil { return err } @@ -1062,21 +1044,10 @@ func (c *restClient) ListApis(ctx context.Context, req *apihubpb.ListApisRequest } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApis") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1179,17 +1150,7 @@ func (c *restClient) UpdateApi(ctx context.Context, req *apihubpb.UpdateApiReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApi") if err != nil { return err } @@ -1240,15 +1201,8 @@ func (c *restClient) DeleteApi(ctx context.Context, req *apihubpb.DeleteApiReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteApi") + return err }, opts...) } @@ -1295,17 +1249,7 @@ func (c *restClient) CreateVersion(ctx context.Context, req *apihubpb.CreateVers httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } @@ -1357,17 +1301,7 @@ func (c *restClient) GetVersion(ctx context.Context, req *apihubpb.GetVersionReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -1432,21 +1366,10 @@ func (c *restClient) ListVersions(ctx context.Context, req *apihubpb.ListVersion } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1544,17 +1467,7 @@ func (c *restClient) UpdateVersion(ctx context.Context, req *apihubpb.UpdateVers httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -1605,15 +1518,8 @@ func (c *restClient) DeleteVersion(ctx context.Context, req *apihubpb.DeleteVers httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") + return err }, opts...) } @@ -1680,17 +1586,7 @@ func (c *restClient) CreateSpec(ctx context.Context, req *apihubpb.CreateSpecReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpec") if err != nil { return err } @@ -1743,17 +1639,7 @@ func (c *restClient) GetSpec(ctx context.Context, req *apihubpb.GetSpecRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpec") if err != nil { return err } @@ -1803,17 +1689,7 @@ func (c *restClient) GetSpecContents(ctx context.Context, req *apihubpb.GetSpecC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpecContents") if err != nil { return err } @@ -1878,21 +1754,10 @@ func (c *restClient) ListSpecs(ctx context.Context, req *apihubpb.ListSpecsReque } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSpecs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1998,17 +1863,7 @@ func (c *restClient) UpdateSpec(ctx context.Context, req *apihubpb.UpdateSpecReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpec") if err != nil { return err } @@ -2057,15 +1912,8 @@ func (c *restClient) DeleteSpec(ctx context.Context, req *apihubpb.DeleteSpecReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSpec") + return err }, opts...) } @@ -2102,17 +1950,7 @@ func (c *restClient) GetApiOperation(ctx context.Context, req *apihubpb.GetApiOp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApiOperation") if err != nil { return err } @@ -2177,21 +2015,10 @@ func (c *restClient) ListApiOperations(ctx context.Context, req *apihubpb.ListAp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApiOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2254,17 +2081,7 @@ func (c *restClient) GetDefinition(ctx context.Context, req *apihubpb.GetDefinit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDefinition") if err != nil { return err } @@ -2326,17 +2143,7 @@ func (c *restClient) CreateDeployment(ctx context.Context, req *apihubpb.CreateD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeployment") if err != nil { return err } @@ -2386,17 +2193,7 @@ func (c *restClient) GetDeployment(ctx context.Context, req *apihubpb.GetDeploym httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -2461,21 +2258,10 @@ func (c *restClient) ListDeployments(ctx context.Context, req *apihubpb.ListDepl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2576,17 +2362,7 @@ func (c *restClient) UpdateDeployment(ctx context.Context, req *apihubpb.UpdateD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeployment") if err != nil { return err } @@ -2633,15 +2409,8 @@ func (c *restClient) DeleteDeployment(ctx context.Context, req *apihubpb.DeleteD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeployment") + return err }, opts...) } @@ -2694,17 +2463,7 @@ func (c *restClient) CreateAttribute(ctx context.Context, req *apihubpb.CreateAt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAttribute") if err != nil { return err } @@ -2754,17 +2513,7 @@ func (c *restClient) GetAttribute(ctx context.Context, req *apihubpb.GetAttribut httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttribute") if err != nil { return err } @@ -2853,17 +2602,7 @@ func (c *restClient) UpdateAttribute(ctx context.Context, req *apihubpb.UpdateAt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttribute") if err != nil { return err } @@ -2914,15 +2653,8 @@ func (c *restClient) DeleteAttribute(ctx context.Context, req *apihubpb.DeleteAt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAttribute") + return err }, opts...) } @@ -2974,21 +2706,10 @@ func (c *restClient) ListAttributes(ctx context.Context, req *apihubpb.ListAttri } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttributes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3063,21 +2784,10 @@ func (c *restClient) SearchResources(ctx context.Context, req *apihubpb.SearchRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3150,17 +2860,7 @@ func (c *restClient) CreateExternalApi(ctx context.Context, req *apihubpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExternalApi") if err != nil { return err } @@ -3210,17 +2910,7 @@ func (c *restClient) GetExternalApi(ctx context.Context, req *apihubpb.GetExtern httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExternalApi") if err != nil { return err } @@ -3299,17 +2989,7 @@ func (c *restClient) UpdateExternalApi(ctx context.Context, req *apihubpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExternalApi") if err != nil { return err } @@ -3356,15 +3036,8 @@ func (c *restClient) DeleteExternalApi(ctx context.Context, req *apihubpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExternalApi") + return err }, opts...) } @@ -3413,21 +3086,10 @@ func (c *restClient) ListExternalApis(ctx context.Context, req *apihubpb.ListExt } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExternalApis") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3490,17 +3152,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3565,21 +3217,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3645,15 +3286,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3687,15 +3321,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3732,17 +3359,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3807,21 +3424,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/api_hub_client_example_go123_test.go b/apihub/apiv1/api_hub_client_example_go123_test.go index 46cbf2d4e465..0beacd278966 100644 --- a/apihub/apiv1/api_hub_client_example_go123_test.go +++ b/apihub/apiv1/api_hub_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListApiOperations_all() { } for resp, err := range c.ListApiOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListApis_all() { } for resp, err := range c.ListApis(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListAttributes_all() { } for resp, err := range c.ListAttributes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListExternalApis_all() { } for resp, err := range c.ListExternalApis(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListSpecs_all() { } for resp, err := range c.ListSpecs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_SearchResources_all() { } for resp, err := range c.SearchResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/api_hub_dependencies_client.go b/apihub/apiv1/api_hub_dependencies_client.go index 3f241a875f70..a58a0cc27c83 100755 --- a/apihub/apiv1/api_hub_dependencies_client.go +++ b/apihub/apiv1/api_hub_dependencies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -228,6 +227,8 @@ type apiHubDependenciesRESTClient struct { // Points back to the CallOptions field of the containing ApiHubDependenciesClient CallOptions **ApiHubDependenciesCallOptions + + logger *slog.Logger } // NewApiHubDependenciesRESTClient creates a new api hub dependencies rest client. @@ -246,6 +247,7 @@ func NewApiHubDependenciesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -333,17 +335,7 @@ func (c *apiHubDependenciesRESTClient) CreateDependency(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDependency") if err != nil { return err } @@ -393,17 +385,7 @@ func (c *apiHubDependenciesRESTClient) GetDependency(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDependency") if err != nil { return err } @@ -474,17 +456,7 @@ func (c *apiHubDependenciesRESTClient) UpdateDependency(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDependency") if err != nil { return err } @@ -531,15 +503,8 @@ func (c *apiHubDependenciesRESTClient) DeleteDependency(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDependency") + return err }, opts...) } @@ -591,21 +556,10 @@ func (c *apiHubDependenciesRESTClient) ListDependencies(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDependencies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -668,17 +622,7 @@ func (c *apiHubDependenciesRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -743,21 +687,10 @@ func (c *apiHubDependenciesRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -823,15 +756,8 @@ func (c *apiHubDependenciesRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -865,15 +791,8 @@ func (c *apiHubDependenciesRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -910,17 +829,7 @@ func (c *apiHubDependenciesRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -985,21 +894,10 @@ func (c *apiHubDependenciesRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/api_hub_dependencies_client_example_go123_test.go b/apihub/apiv1/api_hub_dependencies_client_example_go123_test.go index bb65ee41bdf2..206ab2def495 100644 --- a/apihub/apiv1/api_hub_dependencies_client_example_go123_test.go +++ b/apihub/apiv1/api_hub_dependencies_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleApiHubDependenciesClient_ListDependencies_all() { } for resp, err := range c.ListDependencies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleApiHubDependenciesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleApiHubDependenciesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/api_hub_plugin_client.go b/apihub/apiv1/api_hub_plugin_client.go index 1cbc85a3c1be..39c6205c23ea 100755 --- a/apihub/apiv1/api_hub_plugin_client.go +++ b/apihub/apiv1/api_hub_plugin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -194,6 +193,8 @@ type apiHubPluginRESTClient struct { // Points back to the CallOptions field of the containing ApiHubPluginClient CallOptions **ApiHubPluginCallOptions + + logger *slog.Logger } // NewApiHubPluginRESTClient creates a new api hub plugin rest client. @@ -211,6 +212,7 @@ func NewApiHubPluginRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -288,17 +290,7 @@ func (c *apiHubPluginRESTClient) GetPlugin(ctx context.Context, req *apihubpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPlugin") if err != nil { return err } @@ -355,17 +347,7 @@ func (c *apiHubPluginRESTClient) EnablePlugin(ctx context.Context, req *apihubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnablePlugin") if err != nil { return err } @@ -422,17 +404,7 @@ func (c *apiHubPluginRESTClient) DisablePlugin(ctx context.Context, req *apihubp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisablePlugin") if err != nil { return err } @@ -482,17 +454,7 @@ func (c *apiHubPluginRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -557,21 +519,10 @@ func (c *apiHubPluginRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -637,15 +588,8 @@ func (c *apiHubPluginRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -679,15 +623,8 @@ func (c *apiHubPluginRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -724,17 +661,7 @@ func (c *apiHubPluginRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -799,21 +726,10 @@ func (c *apiHubPluginRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/api_hub_plugin_client_example_go123_test.go b/apihub/apiv1/api_hub_plugin_client_example_go123_test.go index 466364dc3c06..e588eb8cce14 100644 --- a/apihub/apiv1/api_hub_plugin_client_example_go123_test.go +++ b/apihub/apiv1/api_hub_plugin_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleApiHubPluginClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleApiHubPluginClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/apihubpb/apihub_service.pb.go b/apihub/apiv1/apihubpb/apihub_service.pb.go index 1414ca0670d5..0b54987fc815 100755 --- a/apihub/apiv1/apihubpb/apihub_service.pb.go +++ b/apihub/apiv1/apihubpb/apihub_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/apihub_service.proto @@ -67,11 +67,9 @@ type CreateApiRequest struct { func (x *CreateApiRequest) Reset() { *x = CreateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiRequest) String() string { @@ -82,7 +80,7 @@ func (*CreateApiRequest) ProtoMessage() {} func (x *CreateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type GetApiRequest struct { func (x *GetApiRequest) Reset() { *x = GetApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiRequest) String() string { @@ -146,7 +142,7 @@ func (*GetApiRequest) ProtoMessage() {} func (x *GetApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +182,9 @@ type UpdateApiRequest struct { func (x *UpdateApiRequest) Reset() { *x = UpdateApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApiRequest) String() string { @@ -201,7 +195,7 @@ func (*UpdateApiRequest) ProtoMessage() {} func (x *UpdateApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +240,9 @@ type DeleteApiRequest struct { func (x *DeleteApiRequest) Reset() { *x = DeleteApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApiRequest) String() string { @@ -261,7 +253,7 @@ func (*DeleteApiRequest) ProtoMessage() {} func (x *DeleteApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type ListApisRequest struct { func (x *ListApisRequest) Reset() { *x = ListApisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisRequest) String() string { @@ -401,7 +391,7 @@ func (*ListApisRequest) ProtoMessage() {} func (x *ListApisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +449,9 @@ type ListApisResponse struct { func (x *ListApisResponse) Reset() { *x = ListApisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApisResponse) String() string { @@ -474,7 +462,7 @@ func (*ListApisResponse) ProtoMessage() {} func (x *ListApisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +517,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -544,7 +530,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -609,7 +593,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +634,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -665,7 +647,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +694,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -727,7 +707,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +821,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -856,7 +834,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +893,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -930,7 +906,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +962,9 @@ type CreateSpecRequest struct { func (x *CreateSpecRequest) Reset() { *x = CreateSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpecRequest) String() string { @@ -1001,7 +975,7 @@ func (*CreateSpecRequest) ProtoMessage() {} func (x *CreateSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1025,9 @@ type GetSpecRequest struct { func (x *GetSpecRequest) Reset() { *x = GetSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpecRequest) String() string { @@ -1066,7 +1038,7 @@ func (*GetSpecRequest) ProtoMessage() {} func (x *GetSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,11 +1078,9 @@ type UpdateSpecRequest struct { func (x *UpdateSpecRequest) Reset() { *x = UpdateSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpecRequest) String() string { @@ -1121,7 +1091,7 @@ func (*UpdateSpecRequest) ProtoMessage() {} func (x *UpdateSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1134,9 @@ type DeleteSpecRequest struct { func (x *DeleteSpecRequest) Reset() { *x = DeleteSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpecRequest) String() string { @@ -1179,7 +1147,7 @@ func (*DeleteSpecRequest) ProtoMessage() {} func (x *DeleteSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1278,11 +1246,9 @@ type ListSpecsRequest struct { func (x *ListSpecsRequest) Reset() { *x = ListSpecsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecsRequest) String() string { @@ -1293,7 +1259,7 @@ func (*ListSpecsRequest) ProtoMessage() {} func (x *ListSpecsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1351,11 +1317,9 @@ type ListSpecsResponse struct { func (x *ListSpecsResponse) Reset() { *x = ListSpecsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpecsResponse) String() string { @@ -1366,7 +1330,7 @@ func (*ListSpecsResponse) ProtoMessage() {} func (x *ListSpecsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1374,9 @@ type GetSpecContentsRequest struct { func (x *GetSpecContentsRequest) Reset() { *x = GetSpecContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpecContentsRequest) String() string { @@ -1425,7 +1387,7 @@ func (*GetSpecContentsRequest) ProtoMessage() {} func (x *GetSpecContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1424,9 @@ type GetApiOperationRequest struct { func (x *GetApiOperationRequest) Reset() { *x = GetApiOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiOperationRequest) String() string { @@ -1477,7 +1437,7 @@ func (*GetApiOperationRequest) ProtoMessage() {} func (x *GetApiOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1566,11 +1526,9 @@ type ListApiOperationsRequest struct { func (x *ListApiOperationsRequest) Reset() { *x = ListApiOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiOperationsRequest) String() string { @@ -1581,7 +1539,7 @@ func (*ListApiOperationsRequest) ProtoMessage() {} func (x *ListApiOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1643,11 +1601,9 @@ type ListApiOperationsResponse struct { func (x *ListApiOperationsResponse) Reset() { *x = ListApiOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApiOperationsResponse) String() string { @@ -1658,7 +1614,7 @@ func (*ListApiOperationsResponse) ProtoMessage() {} func (x *ListApiOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1702,11 +1658,9 @@ type GetDefinitionRequest struct { func (x *GetDefinitionRequest) Reset() { *x = GetDefinitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefinitionRequest) String() string { @@ -1717,7 +1671,7 @@ func (*GetDefinitionRequest) ProtoMessage() {} func (x *GetDefinitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1766,11 +1720,9 @@ type CreateDeploymentRequest struct { func (x *CreateDeploymentRequest) Reset() { *x = CreateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentRequest) String() string { @@ -1781,7 +1733,7 @@ func (*CreateDeploymentRequest) ProtoMessage() {} func (x *CreateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,11 +1783,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -1846,7 +1796,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,11 +1837,9 @@ type UpdateDeploymentRequest struct { func (x *UpdateDeploymentRequest) Reset() { *x = UpdateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentRequest) String() string { @@ -1902,7 +1850,7 @@ func (*UpdateDeploymentRequest) ProtoMessage() {} func (x *UpdateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1945,11 +1893,9 @@ type DeleteDeploymentRequest struct { func (x *DeleteDeploymentRequest) Reset() { *x = DeleteDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeploymentRequest) String() string { @@ -1960,7 +1906,7 @@ func (*DeleteDeploymentRequest) ProtoMessage() {} func (x *DeleteDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2066,11 +2012,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -2081,7 +2025,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2140,11 +2084,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -2155,7 +2097,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2211,11 +2153,9 @@ type CreateAttributeRequest struct { func (x *CreateAttributeRequest) Reset() { *x = CreateAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAttributeRequest) String() string { @@ -2226,7 +2166,7 @@ func (*CreateAttributeRequest) ProtoMessage() {} func (x *CreateAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2277,11 +2217,9 @@ type GetAttributeRequest struct { func (x *GetAttributeRequest) Reset() { *x = GetAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttributeRequest) String() string { @@ -2292,7 +2230,7 @@ func (*GetAttributeRequest) ProtoMessage() {} func (x *GetAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2333,11 +2271,9 @@ type UpdateAttributeRequest struct { func (x *UpdateAttributeRequest) Reset() { *x = UpdateAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttributeRequest) String() string { @@ -2348,7 +2284,7 @@ func (*UpdateAttributeRequest) ProtoMessage() {} func (x *UpdateAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2392,11 +2328,9 @@ type DeleteAttributeRequest struct { func (x *DeleteAttributeRequest) Reset() { *x = DeleteAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAttributeRequest) String() string { @@ -2407,7 +2341,7 @@ func (*DeleteAttributeRequest) ProtoMessage() {} func (x *DeleteAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2498,11 +2432,9 @@ type ListAttributesRequest struct { func (x *ListAttributesRequest) Reset() { *x = ListAttributesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttributesRequest) String() string { @@ -2513,7 +2445,7 @@ func (*ListAttributesRequest) ProtoMessage() {} func (x *ListAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2572,11 +2504,9 @@ type ListAttributesResponse struct { func (x *ListAttributesResponse) Reset() { *x = ListAttributesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttributesResponse) String() string { @@ -2587,7 +2517,7 @@ func (*ListAttributesResponse) ProtoMessage() {} func (x *ListAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2670,11 +2600,9 @@ type SearchResourcesRequest struct { func (x *SearchResourcesRequest) Reset() { *x = SearchResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResourcesRequest) String() string { @@ -2685,7 +2613,7 @@ func (*SearchResourcesRequest) ProtoMessage() {} func (x *SearchResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,11 +2683,9 @@ type ApiHubResource struct { func (x *ApiHubResource) Reset() { *x = ApiHubResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiHubResource) String() string { @@ -2770,7 +2696,7 @@ func (*ApiHubResource) ProtoMessage() {} func (x *ApiHubResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2899,11 +2825,9 @@ type SearchResult struct { func (x *SearchResult) Reset() { *x = SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResult) String() string { @@ -2914,7 +2838,7 @@ func (*SearchResult) ProtoMessage() {} func (x *SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2955,11 +2879,9 @@ type SearchResourcesResponse struct { func (x *SearchResourcesResponse) Reset() { *x = SearchResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResourcesResponse) String() string { @@ -2970,7 +2892,7 @@ func (*SearchResourcesResponse) ProtoMessage() {} func (x *SearchResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,11 +2947,9 @@ type CreateDependencyRequest struct { func (x *CreateDependencyRequest) Reset() { *x = CreateDependencyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDependencyRequest) String() string { @@ -3040,7 +2960,7 @@ func (*CreateDependencyRequest) ProtoMessage() {} func (x *CreateDependencyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3090,11 +3010,9 @@ type GetDependencyRequest struct { func (x *GetDependencyRequest) Reset() { *x = GetDependencyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDependencyRequest) String() string { @@ -3105,7 +3023,7 @@ func (*GetDependencyRequest) ProtoMessage() {} func (x *GetDependencyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3146,11 +3064,9 @@ type UpdateDependencyRequest struct { func (x *UpdateDependencyRequest) Reset() { *x = UpdateDependencyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDependencyRequest) String() string { @@ -3161,7 +3077,7 @@ func (*UpdateDependencyRequest) ProtoMessage() {} func (x *UpdateDependencyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3205,11 +3121,9 @@ type DeleteDependencyRequest struct { func (x *DeleteDependencyRequest) Reset() { *x = DeleteDependencyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDependencyRequest) String() string { @@ -3220,7 +3134,7 @@ func (*DeleteDependencyRequest) ProtoMessage() {} func (x *DeleteDependencyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3303,11 +3217,9 @@ type ListDependenciesRequest struct { func (x *ListDependenciesRequest) Reset() { *x = ListDependenciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDependenciesRequest) String() string { @@ -3318,7 +3230,7 @@ func (*ListDependenciesRequest) ProtoMessage() {} func (x *ListDependenciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3379,11 +3291,9 @@ type ListDependenciesResponse struct { func (x *ListDependenciesResponse) Reset() { *x = ListDependenciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDependenciesResponse) String() string { @@ -3394,7 +3304,7 @@ func (*ListDependenciesResponse) ProtoMessage() {} func (x *ListDependenciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3451,11 +3361,9 @@ type CreateExternalApiRequest struct { func (x *CreateExternalApiRequest) Reset() { *x = CreateExternalApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExternalApiRequest) String() string { @@ -3466,7 +3374,7 @@ func (*CreateExternalApiRequest) ProtoMessage() {} func (x *CreateExternalApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3517,11 +3425,9 @@ type GetExternalApiRequest struct { func (x *GetExternalApiRequest) Reset() { *x = GetExternalApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExternalApiRequest) String() string { @@ -3532,7 +3438,7 @@ func (*GetExternalApiRequest) ProtoMessage() {} func (x *GetExternalApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3573,11 +3479,9 @@ type UpdateExternalApiRequest struct { func (x *UpdateExternalApiRequest) Reset() { *x = UpdateExternalApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExternalApiRequest) String() string { @@ -3588,7 +3492,7 @@ func (*UpdateExternalApiRequest) ProtoMessage() {} func (x *UpdateExternalApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3632,11 +3536,9 @@ type DeleteExternalApiRequest struct { func (x *DeleteExternalApiRequest) Reset() { *x = DeleteExternalApiRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExternalApiRequest) String() string { @@ -3647,7 +3549,7 @@ func (*DeleteExternalApiRequest) ProtoMessage() {} func (x *DeleteExternalApiRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3694,11 +3596,9 @@ type ListExternalApisRequest struct { func (x *ListExternalApisRequest) Reset() { *x = ListExternalApisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalApisRequest) String() string { @@ -3709,7 +3609,7 @@ func (*ListExternalApisRequest) ProtoMessage() {} func (x *ListExternalApisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3763,11 +3663,9 @@ type ListExternalApisResponse struct { func (x *ListExternalApisResponse) Reset() { *x = ListExternalApisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalApisResponse) String() string { @@ -3778,7 +3676,7 @@ func (*ListExternalApisResponse) ProtoMessage() {} func (x *ListExternalApisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4969,620 +4867,6 @@ func file_google_cloud_apihub_v1_apihub_service_proto_init() { return } file_google_cloud_apihub_v1_common_fields_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListApisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListApisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListSpecsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetSpecContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetApiOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListApiOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListApiOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetDefinitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListAttributesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListAttributesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SearchResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ApiHubResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SearchResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreateDependencyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*GetDependencyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDependencyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDependencyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListDependenciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListDependenciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CreateExternalApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*GetExternalApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExternalApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExternalApiRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalApisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalApisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_apihub_v1_apihub_service_proto_msgTypes[36].OneofWrappers = []any{ (*ApiHubResource_Api)(nil), (*ApiHubResource_Operation)(nil), diff --git a/apihub/apiv1/apihubpb/common_fields.pb.go b/apihub/apiv1/apihubpb/common_fields.pb.go index 155beb80e79d..d33b73370979 100755 --- a/apihub/apiv1/apihubpb/common_fields.pb.go +++ b/apihub/apiv1/apihubpb/common_fields.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/common_fields.proto @@ -954,11 +954,9 @@ type Api struct { func (x *Api) Reset() { *x = Api{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Api) String() string { @@ -969,7 +967,7 @@ func (*Api) ProtoMessage() {} func (x *Api) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1172,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -1189,7 +1185,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1364,11 +1360,9 @@ type Spec struct { func (x *Spec) Reset() { *x = Spec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Spec) String() string { @@ -1379,7 +1373,7 @@ func (*Spec) ProtoMessage() {} func (x *Spec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1550,11 +1544,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -1565,7 +1557,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1705,11 +1697,9 @@ type ApiOperation struct { func (x *ApiOperation) Reset() { *x = ApiOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiOperation) String() string { @@ -1720,7 +1710,7 @@ func (*ApiOperation) ProtoMessage() {} func (x *ApiOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1817,11 +1807,9 @@ type Definition struct { func (x *Definition) Reset() { *x = Definition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Definition) String() string { @@ -1832,7 +1820,7 @@ func (*Definition) ProtoMessage() {} func (x *Definition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1961,11 +1949,9 @@ type Attribute struct { func (x *Attribute) Reset() { *x = Attribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attribute) String() string { @@ -1976,7 +1962,7 @@ func (*Attribute) ProtoMessage() {} func (x *Attribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2083,11 +2069,9 @@ type SpecContents struct { func (x *SpecContents) Reset() { *x = SpecContents{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpecContents) String() string { @@ -2098,7 +2082,7 @@ func (*SpecContents) ProtoMessage() {} func (x *SpecContents) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2144,11 +2128,9 @@ type SpecDetails struct { func (x *SpecDetails) Reset() { *x = SpecDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpecDetails) String() string { @@ -2159,7 +2141,7 @@ func (*SpecDetails) ProtoMessage() {} func (x *SpecDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2230,11 +2212,9 @@ type OpenApiSpecDetails struct { func (x *OpenApiSpecDetails) Reset() { *x = OpenApiSpecDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenApiSpecDetails) String() string { @@ -2245,7 +2225,7 @@ func (*OpenApiSpecDetails) ProtoMessage() {} func (x *OpenApiSpecDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2305,11 +2285,9 @@ type OperationDetails struct { func (x *OperationDetails) Reset() { *x = OperationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationDetails) String() string { @@ -2320,7 +2298,7 @@ func (*OperationDetails) ProtoMessage() {} func (x *OperationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2395,11 +2373,9 @@ type HttpOperation struct { func (x *HttpOperation) Reset() { *x = HttpOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpOperation) String() string { @@ -2410,7 +2386,7 @@ func (*HttpOperation) ProtoMessage() {} func (x *HttpOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2453,11 +2429,9 @@ type Path struct { func (x *Path) Reset() { *x = Path{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Path) String() string { @@ -2468,7 +2442,7 @@ func (*Path) ProtoMessage() {} func (x *Path) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2517,11 +2491,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -2532,7 +2504,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2575,11 +2547,9 @@ type Owner struct { func (x *Owner) Reset() { *x = Owner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Owner) String() string { @@ -2590,7 +2560,7 @@ func (*Owner) ProtoMessage() {} func (x *Owner) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2631,11 +2601,9 @@ type Documentation struct { func (x *Documentation) Reset() { *x = Documentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Documentation) String() string { @@ -2646,7 +2614,7 @@ func (*Documentation) ProtoMessage() {} func (x *Documentation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2689,11 +2657,9 @@ type AttributeValues struct { func (x *AttributeValues) Reset() { *x = AttributeValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValues) String() string { @@ -2704,7 +2670,7 @@ func (*AttributeValues) ProtoMessage() {} func (x *AttributeValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2822,11 +2788,9 @@ type Dependency struct { func (x *Dependency) Reset() { *x = Dependency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dependency) String() string { @@ -2837,7 +2801,7 @@ func (*Dependency) ProtoMessage() {} func (x *Dependency) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2941,11 +2905,9 @@ type DependencyEntityReference struct { func (x *DependencyEntityReference) Reset() { *x = DependencyEntityReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DependencyEntityReference) String() string { @@ -2956,7 +2918,7 @@ func (*DependencyEntityReference) ProtoMessage() {} func (x *DependencyEntityReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3037,11 +2999,9 @@ type DependencyErrorDetail struct { func (x *DependencyErrorDetail) Reset() { *x = DependencyErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DependencyErrorDetail) String() string { @@ -3052,7 +3012,7 @@ func (*DependencyErrorDetail) ProtoMessage() {} func (x *DependencyErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3103,11 +3063,9 @@ type LintResponse struct { func (x *LintResponse) Reset() { *x = LintResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LintResponse) String() string { @@ -3118,7 +3076,7 @@ func (*LintResponse) ProtoMessage() {} func (x *LintResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3196,11 +3154,9 @@ type Issue struct { func (x *Issue) Reset() { *x = Issue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Issue) String() string { @@ -3211,7 +3167,7 @@ func (*Issue) ProtoMessage() {} func (x *Issue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3275,11 +3231,9 @@ type Range struct { func (x *Range) Reset() { *x = Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Range) String() string { @@ -3290,7 +3244,7 @@ func (*Range) ProtoMessage() {} func (x *Range) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3333,11 +3287,9 @@ type Point struct { func (x *Point) Reset() { *x = Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Point) String() string { @@ -3348,7 +3300,7 @@ func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3405,11 +3357,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3420,7 +3370,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3515,11 +3465,9 @@ type ApiHubInstance struct { func (x *ApiHubInstance) Reset() { *x = ApiHubInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiHubInstance) String() string { @@ -3530,7 +3478,7 @@ func (*ApiHubInstance) ProtoMessage() {} func (x *ApiHubInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3636,11 +3584,9 @@ type ExternalApi struct { func (x *ExternalApi) Reset() { *x = ExternalApi{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalApi) String() string { @@ -3651,7 +3597,7 @@ func (*ExternalApi) ProtoMessage() {} func (x *ExternalApi) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3758,11 +3704,9 @@ type Attribute_AllowedValue struct { func (x *Attribute_AllowedValue) Reset() { *x = Attribute_AllowedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attribute_AllowedValue) String() string { @@ -3773,7 +3717,7 @@ func (*Attribute_AllowedValue) ProtoMessage() {} func (x *Attribute_AllowedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3828,11 +3772,9 @@ type AttributeValues_EnumAttributeValues struct { func (x *AttributeValues_EnumAttributeValues) Reset() { *x = AttributeValues_EnumAttributeValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValues_EnumAttributeValues) String() string { @@ -3843,7 +3785,7 @@ func (*AttributeValues_EnumAttributeValues) ProtoMessage() {} func (x *AttributeValues_EnumAttributeValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3878,11 +3820,9 @@ type AttributeValues_StringAttributeValues struct { func (x *AttributeValues_StringAttributeValues) Reset() { *x = AttributeValues_StringAttributeValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValues_StringAttributeValues) String() string { @@ -3893,7 +3833,7 @@ func (*AttributeValues_StringAttributeValues) ProtoMessage() {} func (x *AttributeValues_StringAttributeValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3929,11 +3869,9 @@ type LintResponse_SummaryEntry struct { func (x *LintResponse_SummaryEntry) Reset() { *x = LintResponse_SummaryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LintResponse_SummaryEntry) String() string { @@ -3944,7 +3882,7 @@ func (*LintResponse_SummaryEntry) ProtoMessage() {} func (x *LintResponse_SummaryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3988,11 +3926,9 @@ type ApiHubInstance_Config struct { func (x *ApiHubInstance_Config) Reset() { *x = ApiHubInstance_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiHubInstance_Config) String() string { @@ -4003,7 +3939,7 @@ func (*ApiHubInstance_Config) ProtoMessage() {} func (x *ApiHubInstance_Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_common_fields_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5105,392 +5041,6 @@ func file_google_cloud_apihub_v1_common_fields_proto_init() { if File_google_cloud_apihub_v1_common_fields_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Api); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Spec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ApiOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Definition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Attribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SpecContents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SpecDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OpenApiSpecDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OperationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*HttpOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Path); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Owner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Documentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Dependency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DependencyEntityReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DependencyErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*LintResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Issue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ApiHubInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ExternalApi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Attribute_AllowedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValues_EnumAttributeValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValues_StringAttributeValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*LintResponse_SummaryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_common_fields_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ApiHubInstance_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_apihub_v1_common_fields_proto_msgTypes[5].OneofWrappers = []any{ (*Definition_Schema)(nil), } diff --git a/apihub/apiv1/apihubpb/host_project_registration_service.pb.go b/apihub/apiv1/apihubpb/host_project_registration_service.pb.go index e1ad66d1935d..9d5e206bc7b5 100755 --- a/apihub/apiv1/apihubpb/host_project_registration_service.pb.go +++ b/apihub/apiv1/apihubpb/host_project_registration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/host_project_registration_service.proto @@ -63,11 +63,9 @@ type CreateHostProjectRegistrationRequest struct { func (x *CreateHostProjectRegistrationRequest) Reset() { *x = CreateHostProjectRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHostProjectRegistrationRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateHostProjectRegistrationRequest) ProtoMessage() {} func (x *CreateHostProjectRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type GetHostProjectRegistrationRequest struct { func (x *GetHostProjectRegistrationRequest) Reset() { *x = GetHostProjectRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHostProjectRegistrationRequest) String() string { @@ -144,7 +140,7 @@ func (*GetHostProjectRegistrationRequest) ProtoMessage() {} func (x *GetHostProjectRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type ListHostProjectRegistrationsRequest struct { func (x *ListHostProjectRegistrationsRequest) Reset() { *x = ListHostProjectRegistrationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHostProjectRegistrationsRequest) String() string { @@ -228,7 +222,7 @@ func (*ListHostProjectRegistrationsRequest) ProtoMessage() {} func (x *ListHostProjectRegistrationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +289,9 @@ type ListHostProjectRegistrationsResponse struct { func (x *ListHostProjectRegistrationsResponse) Reset() { *x = ListHostProjectRegistrationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHostProjectRegistrationsResponse) String() string { @@ -310,7 +302,7 @@ func (*ListHostProjectRegistrationsResponse) ProtoMessage() {} func (x *ListHostProjectRegistrationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +356,9 @@ type HostProjectRegistration struct { func (x *HostProjectRegistration) Reset() { *x = HostProjectRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostProjectRegistration) String() string { @@ -379,7 +369,7 @@ func (*HostProjectRegistration) ProtoMessage() {} func (x *HostProjectRegistration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,68 +615,6 @@ func file_google_cloud_apihub_v1_host_project_registration_service_proto_init() if File_google_cloud_apihub_v1_host_project_registration_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateHostProjectRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetHostProjectRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListHostProjectRegistrationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListHostProjectRegistrationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_host_project_registration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*HostProjectRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apihub/apiv1/apihubpb/linting_service.pb.go b/apihub/apiv1/apihubpb/linting_service.pb.go index fc5cf591950b..6c403c4f91ac 100755 --- a/apihub/apiv1/apihubpb/linting_service.pb.go +++ b/apihub/apiv1/apihubpb/linting_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/linting_service.proto @@ -56,11 +56,9 @@ type GetStyleGuideRequest struct { func (x *GetStyleGuideRequest) Reset() { *x = GetStyleGuideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStyleGuideRequest) String() string { @@ -71,7 +69,7 @@ func (*GetStyleGuideRequest) ProtoMessage() {} func (x *GetStyleGuideRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,11 +105,9 @@ type UpdateStyleGuideRequest struct { func (x *UpdateStyleGuideRequest) Reset() { *x = UpdateStyleGuideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStyleGuideRequest) String() string { @@ -122,7 +118,7 @@ func (*UpdateStyleGuideRequest) ProtoMessage() {} func (x *UpdateStyleGuideRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +162,9 @@ type GetStyleGuideContentsRequest struct { func (x *GetStyleGuideContentsRequest) Reset() { *x = GetStyleGuideContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStyleGuideContentsRequest) String() string { @@ -181,7 +175,7 @@ func (*GetStyleGuideContentsRequest) ProtoMessage() {} func (x *GetStyleGuideContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +211,9 @@ type LintSpecRequest struct { func (x *LintSpecRequest) Reset() { *x = LintSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LintSpecRequest) String() string { @@ -232,7 +224,7 @@ func (*LintSpecRequest) ProtoMessage() {} func (x *LintSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +260,9 @@ type StyleGuideContents struct { func (x *StyleGuideContents) Reset() { *x = StyleGuideContents{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StyleGuideContents) String() string { @@ -283,7 +273,7 @@ func (*StyleGuideContents) ProtoMessage() {} func (x *StyleGuideContents) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +322,9 @@ type StyleGuide struct { func (x *StyleGuide) Reset() { *x = StyleGuide{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StyleGuide) String() string { @@ -347,7 +335,7 @@ func (*StyleGuide) ProtoMessage() {} func (x *StyleGuide) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_linting_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,80 +561,6 @@ func file_google_cloud_apihub_v1_linting_service_proto_init() { return } file_google_cloud_apihub_v1_common_fields_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetStyleGuideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStyleGuideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetStyleGuideContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LintSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StyleGuideContents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_linting_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StyleGuide); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apihub/apiv1/apihubpb/plugin_service.pb.go b/apihub/apiv1/apihubpb/plugin_service.pb.go index 7290e0c8f50f..c4ed6d0af5dd 100755 --- a/apihub/apiv1/apihubpb/plugin_service.pb.go +++ b/apihub/apiv1/apihubpb/plugin_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/plugin_service.proto @@ -125,11 +125,9 @@ type Plugin struct { func (x *Plugin) Reset() { *x = Plugin{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Plugin) String() string { @@ -140,7 +138,7 @@ func (*Plugin) ProtoMessage() {} func (x *Plugin) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +202,9 @@ type GetPluginRequest struct { func (x *GetPluginRequest) Reset() { *x = GetPluginRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPluginRequest) String() string { @@ -219,7 +215,7 @@ func (*GetPluginRequest) ProtoMessage() {} func (x *GetPluginRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +251,9 @@ type EnablePluginRequest struct { func (x *EnablePluginRequest) Reset() { *x = EnablePluginRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnablePluginRequest) String() string { @@ -270,7 +264,7 @@ func (*EnablePluginRequest) ProtoMessage() {} func (x *EnablePluginRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type DisablePluginRequest struct { func (x *DisablePluginRequest) Reset() { *x = DisablePluginRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisablePluginRequest) String() string { @@ -321,7 +313,7 @@ func (*DisablePluginRequest) ProtoMessage() {} func (x *DisablePluginRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,56 +487,6 @@ func file_google_cloud_apihub_v1_plugin_service_proto_init() { return } file_google_cloud_apihub_v1_common_fields_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Plugin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPluginRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EnablePluginRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_plugin_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DisablePluginRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apihub/apiv1/apihubpb/provisioning_service.pb.go b/apihub/apiv1/apihubpb/provisioning_service.pb.go index 65905bfaf40a..68828e05e987 100755 --- a/apihub/apiv1/apihubpb/provisioning_service.pb.go +++ b/apihub/apiv1/apihubpb/provisioning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/provisioning_service.proto @@ -65,11 +65,9 @@ type CreateApiHubInstanceRequest struct { func (x *CreateApiHubInstanceRequest) Reset() { *x = CreateApiHubInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApiHubInstanceRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateApiHubInstanceRequest) ProtoMessage() {} func (x *CreateApiHubInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetApiHubInstanceRequest struct { func (x *GetApiHubInstanceRequest) Reset() { *x = GetApiHubInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApiHubInstanceRequest) String() string { @@ -147,7 +143,7 @@ func (*GetApiHubInstanceRequest) ProtoMessage() {} func (x *GetApiHubInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +182,9 @@ type LookupApiHubInstanceRequest struct { func (x *LookupApiHubInstanceRequest) Reset() { *x = LookupApiHubInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupApiHubInstanceRequest) String() string { @@ -201,7 +195,7 @@ func (*LookupApiHubInstanceRequest) ProtoMessage() {} func (x *LookupApiHubInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type LookupApiHubInstanceResponse struct { func (x *LookupApiHubInstanceResponse) Reset() { *x = LookupApiHubInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupApiHubInstanceResponse) String() string { @@ -252,7 +244,7 @@ func (*LookupApiHubInstanceResponse) ProtoMessage() {} func (x *LookupApiHubInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,56 +425,6 @@ func file_google_cloud_apihub_v1_provisioning_service_proto_init() { return } file_google_cloud_apihub_v1_common_fields_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateApiHubInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetApiHubInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LookupApiHubInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_provisioning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LookupApiHubInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apihub/apiv1/apihubpb/runtime_project_attachment_service.pb.go b/apihub/apiv1/apihubpb/runtime_project_attachment_service.pb.go index 82251981ebc9..230a882fedf5 100755 --- a/apihub/apiv1/apihubpb/runtime_project_attachment_service.pb.go +++ b/apihub/apiv1/apihubpb/runtime_project_attachment_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apihub/v1/runtime_project_attachment_service.proto @@ -64,11 +64,9 @@ type CreateRuntimeProjectAttachmentRequest struct { func (x *CreateRuntimeProjectAttachmentRequest) Reset() { *x = CreateRuntimeProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRuntimeProjectAttachmentRequest) String() string { @@ -79,7 +77,7 @@ func (*CreateRuntimeProjectAttachmentRequest) ProtoMessage() {} func (x *CreateRuntimeProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type GetRuntimeProjectAttachmentRequest struct { func (x *GetRuntimeProjectAttachmentRequest) Reset() { *x = GetRuntimeProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuntimeProjectAttachmentRequest) String() string { @@ -146,7 +142,7 @@ func (*GetRuntimeProjectAttachmentRequest) ProtoMessage() {} func (x *GetRuntimeProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type ListRuntimeProjectAttachmentsRequest struct { func (x *ListRuntimeProjectAttachmentsRequest) Reset() { *x = ListRuntimeProjectAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimeProjectAttachmentsRequest) String() string { @@ -230,7 +224,7 @@ func (*ListRuntimeProjectAttachmentsRequest) ProtoMessage() {} func (x *ListRuntimeProjectAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type ListRuntimeProjectAttachmentsResponse struct { func (x *ListRuntimeProjectAttachmentsResponse) Reset() { *x = ListRuntimeProjectAttachmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimeProjectAttachmentsResponse) String() string { @@ -312,7 +304,7 @@ func (*ListRuntimeProjectAttachmentsResponse) ProtoMessage() {} func (x *ListRuntimeProjectAttachmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type DeleteRuntimeProjectAttachmentRequest struct { func (x *DeleteRuntimeProjectAttachmentRequest) Reset() { *x = DeleteRuntimeProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRuntimeProjectAttachmentRequest) String() string { @@ -372,7 +362,7 @@ func (*DeleteRuntimeProjectAttachmentRequest) ProtoMessage() {} func (x *DeleteRuntimeProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +400,9 @@ type LookupRuntimeProjectAttachmentRequest struct { func (x *LookupRuntimeProjectAttachmentRequest) Reset() { *x = LookupRuntimeProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupRuntimeProjectAttachmentRequest) String() string { @@ -425,7 +413,7 @@ func (*LookupRuntimeProjectAttachmentRequest) ProtoMessage() {} func (x *LookupRuntimeProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +449,9 @@ type LookupRuntimeProjectAttachmentResponse struct { func (x *LookupRuntimeProjectAttachmentResponse) Reset() { *x = LookupRuntimeProjectAttachmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupRuntimeProjectAttachmentResponse) String() string { @@ -476,7 +462,7 @@ func (*LookupRuntimeProjectAttachmentResponse) ProtoMessage() {} func (x *LookupRuntimeProjectAttachmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +507,9 @@ type RuntimeProjectAttachment struct { func (x *RuntimeProjectAttachment) Reset() { *x = RuntimeProjectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeProjectAttachment) String() string { @@ -536,7 +520,7 @@ func (*RuntimeProjectAttachment) ProtoMessage() {} func (x *RuntimeProjectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,104 +830,6 @@ func file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_init() if File_google_cloud_apihub_v1_runtime_project_attachment_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateRuntimeProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetRuntimeProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimeProjectAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimeProjectAttachmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRuntimeProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LookupRuntimeProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*LookupRuntimeProjectAttachmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apihub_v1_runtime_project_attachment_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeProjectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apihub/apiv1/helpers.go b/apihub/apiv1/helpers.go index b26073d3c2e7..6b090c3ca5f8 100755 --- a/apihub/apiv1/helpers.go +++ b/apihub/apiv1/helpers.go @@ -18,10 +18,17 @@ package apihub import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" ) +const serviceName = "apihub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +49,39 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} diff --git a/apihub/apiv1/host_project_registration_client.go b/apihub/apiv1/host_project_registration_client.go index 105ade0fa2c3..b003d1ab38d8 100755 --- a/apihub/apiv1/host_project_registration_client.go +++ b/apihub/apiv1/host_project_registration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type hostProjectRegistrationRESTClient struct { // Points back to the CallOptions field of the containing HostProjectRegistrationClient CallOptions **HostProjectRegistrationCallOptions + + logger *slog.Logger } // NewHostProjectRegistrationRESTClient creates a new host project registration service rest client. @@ -221,6 +222,7 @@ func NewHostProjectRegistrationRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -310,17 +312,7 @@ func (c *hostProjectRegistrationRESTClient) CreateHostProjectRegistration(ctx co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateHostProjectRegistration") if err != nil { return err } @@ -370,17 +362,7 @@ func (c *hostProjectRegistrationRESTClient) GetHostProjectRegistration(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHostProjectRegistration") if err != nil { return err } @@ -448,21 +430,10 @@ func (c *hostProjectRegistrationRESTClient) ListHostProjectRegistrations(ctx con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHostProjectRegistrations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -525,17 +496,7 @@ func (c *hostProjectRegistrationRESTClient) GetLocation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -600,21 +561,10 @@ func (c *hostProjectRegistrationRESTClient) ListLocations(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -680,15 +630,8 @@ func (c *hostProjectRegistrationRESTClient) CancelOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -722,15 +665,8 @@ func (c *hostProjectRegistrationRESTClient) DeleteOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -767,17 +703,7 @@ func (c *hostProjectRegistrationRESTClient) GetOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -842,21 +768,10 @@ func (c *hostProjectRegistrationRESTClient) ListOperations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/host_project_registration_client_example_go123_test.go b/apihub/apiv1/host_project_registration_client_example_go123_test.go index 0e1528150399..b978b3123d4d 100644 --- a/apihub/apiv1/host_project_registration_client_example_go123_test.go +++ b/apihub/apiv1/host_project_registration_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleHostProjectRegistrationClient_ListHostProjectRegistrations_all() { } for resp, err := range c.ListHostProjectRegistrations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleHostProjectRegistrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleHostProjectRegistrationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/linting_client.go b/apihub/apiv1/linting_client.go index 379cca0d4722..f69aaef4dec6 100755 --- a/apihub/apiv1/linting_client.go +++ b/apihub/apiv1/linting_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -212,6 +211,8 @@ type lintingRESTClient struct { // Points back to the CallOptions field of the containing LintingClient CallOptions **LintingCallOptions + + logger *slog.Logger } // NewLintingRESTClient creates a new linting service rest client. @@ -229,6 +230,7 @@ func NewLintingRESTClient(ctx context.Context, opts ...option.ClientOption) (*Li endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -306,17 +308,7 @@ func (c *lintingRESTClient) GetStyleGuide(ctx context.Context, req *apihubpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStyleGuide") if err != nil { return err } @@ -380,17 +372,7 @@ func (c *lintingRESTClient) UpdateStyleGuide(ctx context.Context, req *apihubpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStyleGuide") if err != nil { return err } @@ -440,17 +422,7 @@ func (c *lintingRESTClient) GetStyleGuideContents(ctx context.Context, req *apih httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStyleGuideContents") if err != nil { return err } @@ -505,15 +477,8 @@ func (c *lintingRESTClient) LintSpec(ctx context.Context, req *apihubpb.LintSpec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LintSpec") + return err }, opts...) } @@ -550,17 +515,7 @@ func (c *lintingRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -625,21 +580,10 @@ func (c *lintingRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -705,15 +649,8 @@ func (c *lintingRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -747,15 +684,8 @@ func (c *lintingRESTClient) DeleteOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -792,17 +722,7 @@ func (c *lintingRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -867,21 +787,10 @@ func (c *lintingRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/linting_client_example_go123_test.go b/apihub/apiv1/linting_client_example_go123_test.go index 32227c5ed66f..9bc99525e0a4 100644 --- a/apihub/apiv1/linting_client_example_go123_test.go +++ b/apihub/apiv1/linting_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleLintingClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleLintingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/provisioning_client.go b/apihub/apiv1/provisioning_client.go index a168a5fa9faa..6ce24985456b 100755 --- a/apihub/apiv1/provisioning_client.go +++ b/apihub/apiv1/provisioning_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -220,6 +219,8 @@ type provisioningRESTClient struct { // Points back to the CallOptions field of the containing ProvisioningClient CallOptions **ProvisioningCallOptions + + logger *slog.Logger } // NewProvisioningRESTClient creates a new provisioning rest client. @@ -237,6 +238,7 @@ func NewProvisioningRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -333,21 +335,10 @@ func (c *provisioningRESTClient) CreateApiHubInstance(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApiHubInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -398,17 +389,7 @@ func (c *provisioningRESTClient) GetApiHubInstance(ctx context.Context, req *api httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApiHubInstance") if err != nil { return err } @@ -459,17 +440,7 @@ func (c *provisioningRESTClient) LookupApiHubInstance(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupApiHubInstance") if err != nil { return err } @@ -519,17 +490,7 @@ func (c *provisioningRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -594,21 +555,10 @@ func (c *provisioningRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -674,15 +624,8 @@ func (c *provisioningRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -716,15 +659,8 @@ func (c *provisioningRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -761,17 +697,7 @@ func (c *provisioningRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -836,21 +762,10 @@ func (c *provisioningRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/provisioning_client_example_go123_test.go b/apihub/apiv1/provisioning_client_example_go123_test.go index 4f59ddae23ff..5b7df4c16e30 100644 --- a/apihub/apiv1/provisioning_client_example_go123_test.go +++ b/apihub/apiv1/provisioning_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleProvisioningClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleProvisioningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apihub/apiv1/runtime_project_attachment_client.go b/apihub/apiv1/runtime_project_attachment_client.go index 84ff401ab2ae..3d6f5f784854 100755 --- a/apihub/apiv1/runtime_project_attachment_client.go +++ b/apihub/apiv1/runtime_project_attachment_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( apihubpb "cloud.google.com/go/apihub/apiv1/apihubpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -230,6 +229,8 @@ type runtimeProjectAttachmentRESTClient struct { // Points back to the CallOptions field of the containing RuntimeProjectAttachmentClient CallOptions **RuntimeProjectAttachmentCallOptions + + logger *slog.Logger } // NewRuntimeProjectAttachmentRESTClient creates a new runtime project attachment service rest client. @@ -247,6 +248,7 @@ func NewRuntimeProjectAttachmentRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -332,17 +334,7 @@ func (c *runtimeProjectAttachmentRESTClient) CreateRuntimeProjectAttachment(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRuntimeProjectAttachment") if err != nil { return err } @@ -392,17 +384,7 @@ func (c *runtimeProjectAttachmentRESTClient) GetRuntimeProjectAttachment(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRuntimeProjectAttachment") if err != nil { return err } @@ -470,21 +452,10 @@ func (c *runtimeProjectAttachmentRESTClient) ListRuntimeProjectAttachments(ctx c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRuntimeProjectAttachments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -545,15 +516,8 @@ func (c *runtimeProjectAttachmentRESTClient) DeleteRuntimeProjectAttachment(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRuntimeProjectAttachment") + return err }, opts...) } @@ -591,17 +555,7 @@ func (c *runtimeProjectAttachmentRESTClient) LookupRuntimeProjectAttachment(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupRuntimeProjectAttachment") if err != nil { return err } @@ -651,17 +605,7 @@ func (c *runtimeProjectAttachmentRESTClient) GetLocation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -726,21 +670,10 @@ func (c *runtimeProjectAttachmentRESTClient) ListLocations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -806,15 +739,8 @@ func (c *runtimeProjectAttachmentRESTClient) CancelOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -848,15 +774,8 @@ func (c *runtimeProjectAttachmentRESTClient) DeleteOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -893,17 +812,7 @@ func (c *runtimeProjectAttachmentRESTClient) GetOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -968,21 +877,10 @@ func (c *runtimeProjectAttachmentRESTClient) ListOperations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apihub/apiv1/runtime_project_attachment_client_example_go123_test.go b/apihub/apiv1/runtime_project_attachment_client_example_go123_test.go index 0055d2ab32b5..72d536ed59ed 100644 --- a/apihub/apiv1/runtime_project_attachment_client_example_go123_test.go +++ b/apihub/apiv1/runtime_project_attachment_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleRuntimeProjectAttachmentClient_ListRuntimeProjectAttachments_all() { } for resp, err := range c.ListRuntimeProjectAttachments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleRuntimeProjectAttachmentClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleRuntimeProjectAttachmentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apikeys/apiv2/api_keys_client.go b/apikeys/apiv2/api_keys_client.go index c3bdedb69a92..76915831441f 100755 --- a/apikeys/apiv2/api_keys_client.go +++ b/apikeys/apiv2/api_keys_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -312,6 +311,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new api keys client based on gRPC. @@ -338,6 +339,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: apikeyspb.NewApiKeysClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -401,6 +403,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new api keys rest client. @@ -418,6 +422,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -480,7 +485,7 @@ func (c *gRPCClient) CreateKey(ctx context.Context, req *apikeyspb.CreateKeyRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateKey, req, settings.GRPC, c.logger, "CreateKey") return err }, opts...) if err != nil { @@ -511,7 +516,7 @@ func (c *gRPCClient) ListKeys(ctx context.Context, req *apikeyspb.ListKeysReques } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListKeys, req, settings.GRPC, c.logger, "ListKeys") return err }, opts...) if err != nil { @@ -546,7 +551,7 @@ func (c *gRPCClient) GetKey(ctx context.Context, req *apikeyspb.GetKeyRequest, o var resp *apikeyspb.Key err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetKey, req, settings.GRPC, c.logger, "GetKey") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) GetKeyString(ctx context.Context, req *apikeyspb.GetKeyStri var resp *apikeyspb.GetKeyStringResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetKeyString(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetKeyString, req, settings.GRPC, c.logger, "GetKeyString") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *gRPCClient) UpdateKey(ctx context.Context, req *apikeyspb.UpdateKeyRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateKey, req, settings.GRPC, c.logger, "UpdateKey") return err }, opts...) if err != nil { @@ -602,7 +607,7 @@ func (c *gRPCClient) DeleteKey(ctx context.Context, req *apikeyspb.DeleteKeyRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteKey, req, settings.GRPC, c.logger, "DeleteKey") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *gRPCClient) UndeleteKey(ctx context.Context, req *apikeyspb.UndeleteKey var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeleteKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeleteKey, req, settings.GRPC, c.logger, "UndeleteKey") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *gRPCClient) LookupKey(ctx context.Context, req *apikeyspb.LookupKeyRequ var resp *apikeyspb.LookupKeyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupKey, req, settings.GRPC, c.logger, "LookupKey") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -711,21 +716,10 @@ func (c *restClient) CreateKey(ctx context.Context, req *apikeyspb.CreateKeyRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -795,21 +789,10 @@ func (c *restClient) ListKeys(ctx context.Context, req *apikeyspb.ListKeysReques } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKeys") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -876,17 +859,7 @@ func (c *restClient) GetKey(ctx context.Context, req *apikeyspb.GetKeyRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKey") if err != nil { return err } @@ -939,17 +912,7 @@ func (c *restClient) GetKeyString(ctx context.Context, req *apikeyspb.GetKeyStri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKeyString") if err != nil { return err } @@ -1016,21 +979,10 @@ func (c *restClient) UpdateKey(ctx context.Context, req *apikeyspb.UpdateKeyRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1087,21 +1039,10 @@ func (c *restClient) DeleteKey(ctx context.Context, req *apikeyspb.DeleteKeyRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,21 +1101,10 @@ func (c *restClient) UndeleteKey(ctx context.Context, req *apikeyspb.UndeleteKey httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteKey") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1227,17 +1157,7 @@ func (c *restClient) LookupKey(ctx context.Context, req *apikeyspb.LookupKeyRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupKey") if err != nil { return err } @@ -1287,17 +1207,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/apikeys/apiv2/api_keys_client_example_go123_test.go b/apikeys/apiv2/api_keys_client_example_go123_test.go index 72577300cfba..b4bb6387d102 100644 --- a/apikeys/apiv2/api_keys_client_example_go123_test.go +++ b/apikeys/apiv2/api_keys_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListKeys_all() { } for resp, err := range c.ListKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apikeys/apiv2/apikeyspb/apikeys.pb.go b/apikeys/apiv2/apikeyspb/apikeys.pb.go index 38efaf38ef67..08bdeae5c2e8 100755 --- a/apikeys/apiv2/apikeyspb/apikeys.pb.go +++ b/apikeys/apiv2/apikeyspb/apikeys.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/apikeys/v2/apikeys.proto @@ -69,11 +69,9 @@ type CreateKeyRequest struct { func (x *CreateKeyRequest) Reset() { *x = CreateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyRequest) String() string { @@ -84,7 +82,7 @@ func (*CreateKeyRequest) ProtoMessage() {} func (x *CreateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,11 +137,9 @@ type ListKeysRequest struct { func (x *ListKeysRequest) Reset() { *x = ListKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeysRequest) String() string { @@ -154,7 +150,7 @@ func (*ListKeysRequest) ProtoMessage() {} func (x *ListKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +207,9 @@ type ListKeysResponse struct { func (x *ListKeysResponse) Reset() { *x = ListKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeysResponse) String() string { @@ -226,7 +220,7 @@ func (*ListKeysResponse) ProtoMessage() {} func (x *ListKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type GetKeyRequest struct { func (x *GetKeyRequest) Reset() { *x = GetKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyRequest) String() string { @@ -282,7 +274,7 @@ func (*GetKeyRequest) ProtoMessage() {} func (x *GetKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +308,9 @@ type GetKeyStringRequest struct { func (x *GetKeyStringRequest) Reset() { *x = GetKeyStringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyStringRequest) String() string { @@ -331,7 +321,7 @@ func (*GetKeyStringRequest) ProtoMessage() {} func (x *GetKeyStringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type GetKeyStringResponse struct { func (x *GetKeyStringResponse) Reset() { *x = GetKeyStringResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyStringResponse) String() string { @@ -380,7 +368,7 @@ func (*GetKeyStringResponse) ProtoMessage() {} func (x *GetKeyStringResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +412,9 @@ type UpdateKeyRequest struct { func (x *UpdateKeyRequest) Reset() { *x = UpdateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKeyRequest) String() string { @@ -439,7 +425,7 @@ func (*UpdateKeyRequest) ProtoMessage() {} func (x *UpdateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type DeleteKeyRequest struct { func (x *DeleteKeyRequest) Reset() { *x = DeleteKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKeyRequest) String() string { @@ -498,7 +482,7 @@ func (*DeleteKeyRequest) ProtoMessage() {} func (x *DeleteKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +523,9 @@ type UndeleteKeyRequest struct { func (x *UndeleteKeyRequest) Reset() { *x = UndeleteKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteKeyRequest) String() string { @@ -554,7 +536,7 @@ func (*UndeleteKeyRequest) ProtoMessage() {} func (x *UndeleteKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +570,9 @@ type LookupKeyRequest struct { func (x *LookupKeyRequest) Reset() { *x = LookupKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupKeyRequest) String() string { @@ -603,7 +583,7 @@ func (*LookupKeyRequest) ProtoMessage() {} func (x *LookupKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +620,9 @@ type LookupKeyResponse struct { func (x *LookupKeyResponse) Reset() { *x = LookupKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupKeyResponse) String() string { @@ -655,7 +633,7 @@ func (*LookupKeyResponse) ProtoMessage() {} func (x *LookupKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_apikeys_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -944,140 +922,6 @@ func file_google_api_apikeys_v2_apikeys_proto_init() { return } file_google_api_apikeys_v2_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_apikeys_v2_apikeys_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyStringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyStringResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LookupKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_apikeys_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LookupKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apikeys/apiv2/apikeyspb/resources.pb.go b/apikeys/apiv2/apikeyspb/resources.pb.go index a9d5be443480..7a813c6ad160 100755 --- a/apikeys/apiv2/apikeyspb/resources.pb.go +++ b/apikeys/apiv2/apikeyspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/apikeys/v2/resources.proto @@ -84,11 +84,9 @@ type Key struct { func (x *Key) Reset() { *x = Key{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key) String() string { @@ -99,7 +97,7 @@ func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +208,9 @@ type Restrictions struct { func (x *Restrictions) Reset() { *x = Restrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restrictions) String() string { @@ -225,7 +221,7 @@ func (*Restrictions) ProtoMessage() {} func (x *Restrictions) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +323,9 @@ type BrowserKeyRestrictions struct { func (x *BrowserKeyRestrictions) Reset() { *x = BrowserKeyRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BrowserKeyRestrictions) String() string { @@ -342,7 +336,7 @@ func (*BrowserKeyRestrictions) ProtoMessage() {} func (x *BrowserKeyRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +371,9 @@ type ServerKeyRestrictions struct { func (x *ServerKeyRestrictions) Reset() { *x = ServerKeyRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerKeyRestrictions) String() string { @@ -392,7 +384,7 @@ func (*ServerKeyRestrictions) ProtoMessage() {} func (x *ServerKeyRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +419,9 @@ type AndroidKeyRestrictions struct { func (x *AndroidKeyRestrictions) Reset() { *x = AndroidKeyRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AndroidKeyRestrictions) String() string { @@ -442,7 +432,7 @@ func (*AndroidKeyRestrictions) ProtoMessage() {} func (x *AndroidKeyRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +471,9 @@ type AndroidApplication struct { func (x *AndroidApplication) Reset() { *x = AndroidApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AndroidApplication) String() string { @@ -496,7 +484,7 @@ func (*AndroidApplication) ProtoMessage() {} func (x *AndroidApplication) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +525,9 @@ type IosKeyRestrictions struct { func (x *IosKeyRestrictions) Reset() { *x = IosKeyRestrictions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IosKeyRestrictions) String() string { @@ -552,7 +538,7 @@ func (*IosKeyRestrictions) ProtoMessage() {} func (x *IosKeyRestrictions) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +586,9 @@ type ApiTarget struct { func (x *ApiTarget) Reset() { *x = ApiTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiTarget) String() string { @@ -615,7 +599,7 @@ func (*ApiTarget) ProtoMessage() {} func (x *ApiTarget) ProtoReflect() protoreflect.Message { mi := &file_google_api_apikeys_v2_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,104 +809,6 @@ func file_google_api_apikeys_v2_resources_proto_init() { if File_google_api_apikeys_v2_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_apikeys_v2_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Restrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BrowserKeyRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ServerKeyRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AndroidKeyRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AndroidApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*IosKeyRestrictions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_apikeys_v2_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ApiTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_api_apikeys_v2_resources_proto_msgTypes[1].OneofWrappers = []any{ (*Restrictions_BrowserKeyRestrictions)(nil), (*Restrictions_ServerKeyRestrictions)(nil), diff --git a/apikeys/apiv2/helpers.go b/apikeys/apiv2/helpers.go index 46c2dc752721..62fcc3871c97 100755 --- a/apikeys/apiv2/helpers.go +++ b/apikeys/apiv2/helpers.go @@ -18,10 +18,20 @@ package apikeys import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "apikeys.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/appengine/apiv1/appenginepb/app_yaml.pb.go b/appengine/apiv1/appenginepb/app_yaml.pb.go index c5dd8755a1b6..7e748f0a0fcb 100755 --- a/appengine/apiv1/appenginepb/app_yaml.pb.go +++ b/appengine/apiv1/appenginepb/app_yaml.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/app_yaml.proto @@ -367,11 +367,9 @@ type ApiConfigHandler struct { func (x *ApiConfigHandler) Reset() { *x = ApiConfigHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiConfigHandler) String() string { @@ -382,7 +380,7 @@ func (*ApiConfigHandler) ProtoMessage() {} func (x *ApiConfigHandler) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +446,9 @@ type ErrorHandler struct { func (x *ErrorHandler) Reset() { *x = ErrorHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorHandler) String() string { @@ -463,7 +459,7 @@ func (*ErrorHandler) ProtoMessage() {} func (x *ErrorHandler) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +531,9 @@ type UrlMap struct { func (x *UrlMap) Reset() { *x = UrlMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMap) String() string { @@ -550,7 +544,7 @@ func (*UrlMap) ProtoMessage() {} func (x *UrlMap) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +688,9 @@ type StaticFilesHandler struct { func (x *StaticFilesHandler) Reset() { *x = StaticFilesHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticFilesHandler) String() string { @@ -709,7 +701,7 @@ func (*StaticFilesHandler) ProtoMessage() {} func (x *StaticFilesHandler) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +777,9 @@ type ScriptHandler struct { func (x *ScriptHandler) Reset() { *x = ScriptHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScriptHandler) String() string { @@ -800,7 +790,7 @@ func (*ScriptHandler) ProtoMessage() {} func (x *ScriptHandler) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -834,11 +824,9 @@ type ApiEndpointHandler struct { func (x *ApiEndpointHandler) Reset() { *x = ApiEndpointHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApiEndpointHandler) String() string { @@ -849,7 +837,7 @@ func (*ApiEndpointHandler) ProtoMessage() {} func (x *ApiEndpointHandler) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +889,9 @@ type HealthCheck struct { func (x *HealthCheck) Reset() { *x = HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheck) String() string { @@ -916,7 +902,7 @@ func (*HealthCheck) ProtoMessage() {} func (x *HealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +996,9 @@ type ReadinessCheck struct { func (x *ReadinessCheck) Reset() { *x = ReadinessCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadinessCheck) String() string { @@ -1025,7 +1009,7 @@ func (*ReadinessCheck) ProtoMessage() {} func (x *ReadinessCheck) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1117,11 +1101,9 @@ type LivenessCheck struct { func (x *LivenessCheck) Reset() { *x = LivenessCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LivenessCheck) String() string { @@ -1132,7 +1114,7 @@ func (*LivenessCheck) ProtoMessage() {} func (x *LivenessCheck) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,11 +1192,9 @@ type Library struct { func (x *Library) Reset() { *x = Library{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Library) String() string { @@ -1225,7 +1205,7 @@ func (*Library) ProtoMessage() {} func (x *Library) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_app_yaml_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1555,128 +1535,6 @@ func file_google_appengine_v1_app_yaml_proto_init() { if File_google_appengine_v1_app_yaml_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_app_yaml_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ApiConfigHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ErrorHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UrlMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StaticFilesHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ScriptHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ApiEndpointHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReadinessCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LivenessCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_app_yaml_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Library); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_appengine_v1_app_yaml_proto_msgTypes[2].OneofWrappers = []any{ (*UrlMap_StaticFiles)(nil), (*UrlMap_Script)(nil), diff --git a/appengine/apiv1/appenginepb/appengine.pb.go b/appengine/apiv1/appenginepb/appengine.pb.go index e25d38a2b451..c536046e25a8 100755 --- a/appengine/apiv1/appenginepb/appengine.pb.go +++ b/appengine/apiv1/appenginepb/appengine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/appengine.proto @@ -218,11 +218,9 @@ type GetApplicationRequest struct { func (x *GetApplicationRequest) Reset() { *x = GetApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApplicationRequest) String() string { @@ -233,7 +231,7 @@ func (*GetApplicationRequest) ProtoMessage() {} func (x *GetApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +265,9 @@ type CreateApplicationRequest struct { func (x *CreateApplicationRequest) Reset() { *x = CreateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApplicationRequest) String() string { @@ -282,7 +278,7 @@ func (*CreateApplicationRequest) ProtoMessage() {} func (x *CreateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +316,9 @@ type UpdateApplicationRequest struct { func (x *UpdateApplicationRequest) Reset() { *x = UpdateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationRequest) String() string { @@ -335,7 +329,7 @@ func (*UpdateApplicationRequest) ProtoMessage() {} func (x *UpdateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +377,9 @@ type RepairApplicationRequest struct { func (x *RepairApplicationRequest) Reset() { *x = RepairApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairApplicationRequest) String() string { @@ -398,7 +390,7 @@ func (*RepairApplicationRequest) ProtoMessage() {} func (x *RepairApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +428,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -451,7 +441,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,11 +491,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -516,7 +504,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +545,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -572,7 +558,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +610,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -639,7 +623,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +678,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -709,7 +691,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +732,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -765,7 +745,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +802,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -837,7 +815,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +859,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -896,7 +872,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +916,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -955,7 +929,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +976,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -1017,7 +989,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1066,11 +1038,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -1081,7 +1051,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1120,11 +1090,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1135,7 +1103,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1153,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1200,7 +1166,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1208,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1257,7 +1221,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1292,11 +1256,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1307,7 +1269,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,11 +1312,9 @@ type DebugInstanceRequest struct { func (x *DebugInstanceRequest) Reset() { *x = DebugInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DebugInstanceRequest) String() string { @@ -1365,7 +1325,7 @@ func (*DebugInstanceRequest) ProtoMessage() {} func (x *DebugInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1415,11 +1375,9 @@ type ListIngressRulesRequest struct { func (x *ListIngressRulesRequest) Reset() { *x = ListIngressRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIngressRulesRequest) String() string { @@ -1430,7 +1388,7 @@ func (*ListIngressRulesRequest) ProtoMessage() {} func (x *ListIngressRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1445,9 @@ type ListIngressRulesResponse struct { func (x *ListIngressRulesResponse) Reset() { *x = ListIngressRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIngressRulesResponse) String() string { @@ -1502,7 +1458,7 @@ func (*ListIngressRulesResponse) ProtoMessage() {} func (x *ListIngressRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1546,11 +1502,9 @@ type BatchUpdateIngressRulesRequest struct { func (x *BatchUpdateIngressRulesRequest) Reset() { *x = BatchUpdateIngressRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIngressRulesRequest) String() string { @@ -1561,7 +1515,7 @@ func (*BatchUpdateIngressRulesRequest) ProtoMessage() {} func (x *BatchUpdateIngressRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1602,11 +1556,9 @@ type BatchUpdateIngressRulesResponse struct { func (x *BatchUpdateIngressRulesResponse) Reset() { *x = BatchUpdateIngressRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIngressRulesResponse) String() string { @@ -1617,7 +1569,7 @@ func (*BatchUpdateIngressRulesResponse) ProtoMessage() {} func (x *BatchUpdateIngressRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1615,9 @@ type CreateIngressRuleRequest struct { func (x *CreateIngressRuleRequest) Reset() { *x = CreateIngressRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIngressRuleRequest) String() string { @@ -1678,7 +1628,7 @@ func (*CreateIngressRuleRequest) ProtoMessage() {} func (x *CreateIngressRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1720,11 +1670,9 @@ type GetIngressRuleRequest struct { func (x *GetIngressRuleRequest) Reset() { *x = GetIngressRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIngressRuleRequest) String() string { @@ -1735,7 +1683,7 @@ func (*GetIngressRuleRequest) ProtoMessage() {} func (x *GetIngressRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1774,11 +1722,9 @@ type UpdateIngressRuleRequest struct { func (x *UpdateIngressRuleRequest) Reset() { *x = UpdateIngressRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIngressRuleRequest) String() string { @@ -1789,7 +1735,7 @@ func (*UpdateIngressRuleRequest) ProtoMessage() {} func (x *UpdateIngressRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1784,9 @@ type DeleteIngressRuleRequest struct { func (x *DeleteIngressRuleRequest) Reset() { *x = DeleteIngressRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIngressRuleRequest) String() string { @@ -1853,7 +1797,7 @@ func (*DeleteIngressRuleRequest) ProtoMessage() {} func (x *DeleteIngressRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1891,11 +1835,9 @@ type ListAuthorizedDomainsRequest struct { func (x *ListAuthorizedDomainsRequest) Reset() { *x = ListAuthorizedDomainsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedDomainsRequest) String() string { @@ -1906,7 +1848,7 @@ func (*ListAuthorizedDomainsRequest) ProtoMessage() {} func (x *ListAuthorizedDomainsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1898,9 @@ type ListAuthorizedDomainsResponse struct { func (x *ListAuthorizedDomainsResponse) Reset() { *x = ListAuthorizedDomainsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedDomainsResponse) String() string { @@ -1971,7 +1911,7 @@ func (*ListAuthorizedDomainsResponse) ProtoMessage() {} func (x *ListAuthorizedDomainsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2018,11 +1958,9 @@ type ListAuthorizedCertificatesRequest struct { func (x *ListAuthorizedCertificatesRequest) Reset() { *x = ListAuthorizedCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedCertificatesRequest) String() string { @@ -2033,7 +1971,7 @@ func (*ListAuthorizedCertificatesRequest) ProtoMessage() {} func (x *ListAuthorizedCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2090,11 +2028,9 @@ type ListAuthorizedCertificatesResponse struct { func (x *ListAuthorizedCertificatesResponse) Reset() { *x = ListAuthorizedCertificatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedCertificatesResponse) String() string { @@ -2105,7 +2041,7 @@ func (*ListAuthorizedCertificatesResponse) ProtoMessage() {} func (x *ListAuthorizedCertificatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2149,11 +2085,9 @@ type GetAuthorizedCertificateRequest struct { func (x *GetAuthorizedCertificateRequest) Reset() { *x = GetAuthorizedCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuthorizedCertificateRequest) String() string { @@ -2164,7 +2098,7 @@ func (*GetAuthorizedCertificateRequest) ProtoMessage() {} func (x *GetAuthorizedCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2207,11 +2141,9 @@ type CreateAuthorizedCertificateRequest struct { func (x *CreateAuthorizedCertificateRequest) Reset() { *x = CreateAuthorizedCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAuthorizedCertificateRequest) String() string { @@ -2222,7 +2154,7 @@ func (*CreateAuthorizedCertificateRequest) ProtoMessage() {} func (x *CreateAuthorizedCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2270,11 +2202,9 @@ type UpdateAuthorizedCertificateRequest struct { func (x *UpdateAuthorizedCertificateRequest) Reset() { *x = UpdateAuthorizedCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAuthorizedCertificateRequest) String() string { @@ -2285,7 +2215,7 @@ func (*UpdateAuthorizedCertificateRequest) ProtoMessage() {} func (x *UpdateAuthorizedCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2334,11 +2264,9 @@ type DeleteAuthorizedCertificateRequest struct { func (x *DeleteAuthorizedCertificateRequest) Reset() { *x = DeleteAuthorizedCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAuthorizedCertificateRequest) String() string { @@ -2349,7 +2277,7 @@ func (*DeleteAuthorizedCertificateRequest) ProtoMessage() {} func (x *DeleteAuthorizedCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2387,11 +2315,9 @@ type ListDomainMappingsRequest struct { func (x *ListDomainMappingsRequest) Reset() { *x = ListDomainMappingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDomainMappingsRequest) String() string { @@ -2402,7 +2328,7 @@ func (*ListDomainMappingsRequest) ProtoMessage() {} func (x *ListDomainMappingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2452,11 +2378,9 @@ type ListDomainMappingsResponse struct { func (x *ListDomainMappingsResponse) Reset() { *x = ListDomainMappingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDomainMappingsResponse) String() string { @@ -2467,7 +2391,7 @@ func (*ListDomainMappingsResponse) ProtoMessage() {} func (x *ListDomainMappingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2509,11 +2433,9 @@ type GetDomainMappingRequest struct { func (x *GetDomainMappingRequest) Reset() { *x = GetDomainMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDomainMappingRequest) String() string { @@ -2524,7 +2446,7 @@ func (*GetDomainMappingRequest) ProtoMessage() {} func (x *GetDomainMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2563,11 +2485,9 @@ type CreateDomainMappingRequest struct { func (x *CreateDomainMappingRequest) Reset() { *x = CreateDomainMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDomainMappingRequest) String() string { @@ -2578,7 +2498,7 @@ func (*CreateDomainMappingRequest) ProtoMessage() {} func (x *CreateDomainMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2632,11 +2552,9 @@ type UpdateDomainMappingRequest struct { func (x *UpdateDomainMappingRequest) Reset() { *x = UpdateDomainMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDomainMappingRequest) String() string { @@ -2647,7 +2565,7 @@ func (*UpdateDomainMappingRequest) ProtoMessage() {} func (x *UpdateDomainMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2696,11 +2614,9 @@ type DeleteDomainMappingRequest struct { func (x *DeleteDomainMappingRequest) Reset() { *x = DeleteDomainMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_appengine_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_appengine_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDomainMappingRequest) String() string { @@ -2711,7 +2627,7 @@ func (*DeleteDomainMappingRequest) ProtoMessage() {} func (x *DeleteDomainMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_appengine_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3749,512 +3665,6 @@ func file_google_appengine_v1_appengine_proto_init() { file_google_appengine_v1_instance_proto_init() file_google_appengine_v1_service_proto_init() file_google_appengine_v1_version_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_appengine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RepairApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DebugInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListIngressRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListIngressRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIngressRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIngressRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateIngressRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetIngressRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIngressRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIngressRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedDomainsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedDomainsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedCertificatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetAuthorizedCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateAuthorizedCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAuthorizedCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAuthorizedCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListDomainMappingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListDomainMappingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetDomainMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreateDomainMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDomainMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_appengine_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDomainMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/application.pb.go b/appengine/apiv1/appenginepb/application.pb.go index 14a23fde99f5..a01e08c9602c 100755 --- a/appengine/apiv1/appenginepb/application.pb.go +++ b/appengine/apiv1/appenginepb/application.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/application.proto @@ -219,11 +219,9 @@ type Application struct { func (x *Application) Reset() { *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_application_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_application_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application) String() string { @@ -234,7 +232,7 @@ func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_application_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +377,9 @@ type UrlDispatchRule struct { func (x *UrlDispatchRule) Reset() { *x = UrlDispatchRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_application_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_application_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlDispatchRule) String() string { @@ -394,7 +390,7 @@ func (*UrlDispatchRule) ProtoMessage() {} func (x *UrlDispatchRule) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_application_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +456,9 @@ type Application_IdentityAwareProxy struct { func (x *Application_IdentityAwareProxy) Reset() { *x = Application_IdentityAwareProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_application_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_application_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application_IdentityAwareProxy) String() string { @@ -475,7 +469,7 @@ func (*Application_IdentityAwareProxy) ProtoMessage() {} func (x *Application_IdentityAwareProxy) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_application_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +533,9 @@ type Application_FeatureSettings struct { func (x *Application_FeatureSettings) Reset() { *x = Application_FeatureSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_application_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_application_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application_FeatureSettings) String() string { @@ -554,7 +546,7 @@ func (*Application_FeatureSettings) ProtoMessage() {} func (x *Application_FeatureSettings) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_application_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,56 +731,6 @@ func file_google_appengine_v1_application_proto_init() { if File_google_appengine_v1_application_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_application_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_application_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UrlDispatchRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_application_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Application_IdentityAwareProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_application_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Application_FeatureSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/audit_data.pb.go b/appengine/apiv1/appenginepb/audit_data.pb.go index 89386ca6c911..70bce3e23c1b 100755 --- a/appengine/apiv1/appenginepb/audit_data.pb.go +++ b/appengine/apiv1/appenginepb/audit_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/audit_data.proto @@ -55,11 +55,9 @@ type AuditData struct { func (x *AuditData) Reset() { *x = AuditData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_audit_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_audit_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditData) String() string { @@ -70,7 +68,7 @@ func (*AuditData) ProtoMessage() {} func (x *AuditData) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_audit_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,11 +134,9 @@ type UpdateServiceMethod struct { func (x *UpdateServiceMethod) Reset() { *x = UpdateServiceMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_audit_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_audit_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceMethod) String() string { @@ -151,7 +147,7 @@ func (*UpdateServiceMethod) ProtoMessage() {} func (x *UpdateServiceMethod) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_audit_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +181,9 @@ type CreateVersionMethod struct { func (x *CreateVersionMethod) Reset() { *x = CreateVersionMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_audit_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_audit_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionMethod) String() string { @@ -200,7 +194,7 @@ func (*CreateVersionMethod) ProtoMessage() {} func (x *CreateVersionMethod) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_audit_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,44 +301,6 @@ func file_google_appengine_v1_audit_data_proto_init() { return } file_google_appengine_v1_appengine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_audit_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuditData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_audit_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_audit_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_appengine_v1_audit_data_proto_msgTypes[0].OneofWrappers = []any{ (*AuditData_UpdateService)(nil), (*AuditData_CreateVersion)(nil), diff --git a/appengine/apiv1/appenginepb/certificate.pb.go b/appengine/apiv1/appenginepb/certificate.pb.go index 8a40dc6052a0..4bb5a95094a2 100755 --- a/appengine/apiv1/appenginepb/certificate.pb.go +++ b/appengine/apiv1/appenginepb/certificate.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/certificate.proto @@ -185,11 +185,9 @@ type AuthorizedCertificate struct { func (x *AuthorizedCertificate) Reset() { *x = AuthorizedCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_certificate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_certificate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizedCertificate) String() string { @@ -200,7 +198,7 @@ func (*AuthorizedCertificate) ProtoMessage() {} func (x *AuthorizedCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_certificate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +304,9 @@ type CertificateRawData struct { func (x *CertificateRawData) Reset() { *x = CertificateRawData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_certificate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_certificate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateRawData) String() string { @@ -321,7 +317,7 @@ func (*CertificateRawData) ProtoMessage() {} func (x *CertificateRawData) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_certificate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +367,9 @@ type ManagedCertificate struct { func (x *ManagedCertificate) Reset() { *x = ManagedCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_certificate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_certificate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedCertificate) String() string { @@ -386,7 +380,7 @@ func (*ManagedCertificate) ProtoMessage() {} func (x *ManagedCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_certificate_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,44 +531,6 @@ func file_google_appengine_v1_certificate_proto_init() { if File_google_appengine_v1_certificate_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_certificate_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizedCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_certificate_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CertificateRawData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_certificate_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ManagedCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/deploy.pb.go b/appengine/apiv1/appenginepb/deploy.pb.go index f7e2403c79be..d0710858ff79 100755 --- a/appengine/apiv1/appenginepb/deploy.pb.go +++ b/appengine/apiv1/appenginepb/deploy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/deploy.proto @@ -61,11 +61,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_deploy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_deploy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -76,7 +74,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_deploy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type FileInfo struct { func (x *FileInfo) Reset() { *x = FileInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_deploy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_deploy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileInfo) String() string { @@ -155,7 +151,7 @@ func (*FileInfo) ProtoMessage() {} func (x *FileInfo) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_deploy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type ContainerInfo struct { func (x *ContainerInfo) Reset() { *x = ContainerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_deploy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_deploy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerInfo) String() string { @@ -222,7 +216,7 @@ func (*ContainerInfo) ProtoMessage() {} func (x *ContainerInfo) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_deploy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type CloudBuildOptions struct { func (x *CloudBuildOptions) Reset() { *x = CloudBuildOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_deploy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_deploy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudBuildOptions) String() string { @@ -282,7 +274,7 @@ func (*CloudBuildOptions) ProtoMessage() {} func (x *CloudBuildOptions) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_deploy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +321,9 @@ type ZipInfo struct { func (x *ZipInfo) Reset() { *x = ZipInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_deploy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_deploy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZipInfo) String() string { @@ -344,7 +334,7 @@ func (*ZipInfo) ProtoMessage() {} func (x *ZipInfo) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_deploy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,68 +472,6 @@ func file_google_appengine_v1_deploy_proto_init() { if File_google_appengine_v1_deploy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_deploy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_deploy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FileInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_deploy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContainerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_deploy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CloudBuildOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_deploy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ZipInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/deployed_files.pb.go b/appengine/apiv1/appenginepb/deployed_files.pb.go index b9d2b3190883..54c9446b23d6 100755 --- a/appengine/apiv1/appenginepb/deployed_files.pb.go +++ b/appengine/apiv1/appenginepb/deployed_files.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/deployed_files.proto diff --git a/appengine/apiv1/appenginepb/domain.pb.go b/appengine/apiv1/appenginepb/domain.pb.go index 48af7b7980a8..d3f1c84afb05 100755 --- a/appengine/apiv1/appenginepb/domain.pb.go +++ b/appengine/apiv1/appenginepb/domain.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/domain.proto @@ -55,11 +55,9 @@ type AuthorizedDomain struct { func (x *AuthorizedDomain) Reset() { *x = AuthorizedDomain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_domain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_domain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizedDomain) String() string { @@ -70,7 +68,7 @@ func (*AuthorizedDomain) ProtoMessage() {} func (x *AuthorizedDomain) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_domain_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,20 +151,6 @@ func file_google_appengine_v1_domain_proto_init() { if File_google_appengine_v1_domain_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_domain_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizedDomain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/domain_mapping.pb.go b/appengine/apiv1/appenginepb/domain_mapping.pb.go index e4bd43c63d6e..15e897dfaabf 100755 --- a/appengine/apiv1/appenginepb/domain_mapping.pb.go +++ b/appengine/apiv1/appenginepb/domain_mapping.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/domain_mapping.proto @@ -175,11 +175,9 @@ type DomainMapping struct { func (x *DomainMapping) Reset() { *x = DomainMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DomainMapping) String() string { @@ -190,7 +188,7 @@ func (*DomainMapping) ProtoMessage() {} func (x *DomainMapping) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +265,9 @@ type SslSettings struct { func (x *SslSettings) Reset() { *x = SslSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslSettings) String() string { @@ -282,7 +278,7 @@ func (*SslSettings) ProtoMessage() {} func (x *SslSettings) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +332,9 @@ type ResourceRecord struct { func (x *ResourceRecord) Reset() { *x = ResourceRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRecord) String() string { @@ -351,7 +345,7 @@ func (*ResourceRecord) ProtoMessage() {} func (x *ResourceRecord) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_domain_mapping_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,44 +486,6 @@ func file_google_appengine_v1_domain_mapping_proto_init() { if File_google_appengine_v1_domain_mapping_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_domain_mapping_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DomainMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_domain_mapping_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SslSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_domain_mapping_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/firewall.pb.go b/appengine/apiv1/appenginepb/firewall.pb.go index f37c827823f7..f116a433905b 100755 --- a/appengine/apiv1/appenginepb/firewall.pb.go +++ b/appengine/apiv1/appenginepb/firewall.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/firewall.proto @@ -122,11 +122,9 @@ type FirewallRule struct { func (x *FirewallRule) Reset() { *x = FirewallRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_firewall_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_firewall_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallRule) String() string { @@ -137,7 +135,7 @@ func (*FirewallRule) ProtoMessage() {} func (x *FirewallRule) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_firewall_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,20 +247,6 @@ func file_google_appengine_v1_firewall_proto_init() { if File_google_appengine_v1_firewall_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_firewall_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FirewallRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/instance.pb.go b/appengine/apiv1/appenginepb/instance.pb.go index c8d2dec723dd..4da802c42c67 100755 --- a/appengine/apiv1/appenginepb/instance.pb.go +++ b/appengine/apiv1/appenginepb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/instance.proto @@ -216,11 +216,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -231,7 +229,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +372,9 @@ type Instance_Liveness struct { func (x *Instance_Liveness) Reset() { *x = Instance_Liveness{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Liveness) String() string { @@ -389,7 +385,7 @@ func (*Instance_Liveness) ProtoMessage() {} func (x *Instance_Liveness) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,32 +528,6 @@ func file_google_appengine_v1_instance_proto_init() { if File_google_appengine_v1_instance_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Liveness); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/location.pb.go b/appengine/apiv1/appenginepb/location.pb.go index d067118cfa84..f62ca371a0cf 100755 --- a/appengine/apiv1/appenginepb/location.pb.go +++ b/appengine/apiv1/appenginepb/location.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/location.proto @@ -57,11 +57,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_location_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_location_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -72,7 +70,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_location_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,20 +172,6 @@ func file_google_appengine_v1_location_proto_init() { if File_google_appengine_v1_location_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_location_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/network_settings.pb.go b/appengine/apiv1/appenginepb/network_settings.pb.go index 7508b2bfae24..52455487ef21 100755 --- a/appengine/apiv1/appenginepb/network_settings.pb.go +++ b/appengine/apiv1/appenginepb/network_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/network_settings.proto @@ -105,11 +105,9 @@ type NetworkSettings struct { func (x *NetworkSettings) Reset() { *x = NetworkSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_network_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_network_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkSettings) String() string { @@ -120,7 +118,7 @@ func (*NetworkSettings) ProtoMessage() {} func (x *NetworkSettings) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_network_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,20 +215,6 @@ func file_google_appengine_v1_network_settings_proto_init() { if File_google_appengine_v1_network_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_network_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/operation.pb.go b/appengine/apiv1/appenginepb/operation.pb.go index d591cb75c922..22346b124e1b 100755 --- a/appengine/apiv1/appenginepb/operation.pb.go +++ b/appengine/apiv1/appenginepb/operation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/operation.proto @@ -81,11 +81,9 @@ type OperationMetadataV1 struct { func (x *OperationMetadataV1) Reset() { *x = OperationMetadataV1{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadataV1) String() string { @@ -96,7 +94,7 @@ func (*OperationMetadataV1) ProtoMessage() {} func (x *OperationMetadataV1) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_operation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +196,9 @@ type CreateVersionMetadataV1 struct { func (x *CreateVersionMetadataV1) Reset() { *x = CreateVersionMetadataV1{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_operation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionMetadataV1) String() string { @@ -213,7 +209,7 @@ func (*CreateVersionMetadataV1) ProtoMessage() {} func (x *CreateVersionMetadataV1) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_operation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,32 +318,6 @@ func file_google_appengine_v1_operation_proto_init() { if File_google_appengine_v1_operation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadataV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionMetadataV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_appengine_v1_operation_proto_msgTypes[0].OneofWrappers = []any{ (*OperationMetadataV1_CreateVersionMetadata)(nil), } diff --git a/appengine/apiv1/appenginepb/service.pb.go b/appengine/apiv1/appenginepb/service.pb.go index 7427b54b14d0..0528c0fab16f 100755 --- a/appengine/apiv1/appenginepb/service.pb.go +++ b/appengine/apiv1/appenginepb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/service.proto @@ -139,11 +139,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -154,7 +152,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type TrafficSplit struct { func (x *TrafficSplit) Reset() { *x = TrafficSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficSplit) String() string { @@ -243,7 +239,7 @@ func (*TrafficSplit) ProtoMessage() {} func (x *TrafficSplit) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,32 +371,6 @@ func file_google_appengine_v1_service_proto_init() { return } file_google_appengine_v1_network_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TrafficSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/appengine/apiv1/appenginepb/version.pb.go b/appengine/apiv1/appenginepb/version.pb.go index e5b4bece932c..a161a26c81e0 100755 --- a/appengine/apiv1/appenginepb/version.pb.go +++ b/appengine/apiv1/appenginepb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/appengine/v1/version.proto @@ -451,11 +451,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -466,7 +464,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +836,9 @@ type EndpointsApiService struct { func (x *EndpointsApiService) Reset() { *x = EndpointsApiService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointsApiService) String() string { @@ -853,7 +849,7 @@ func (*EndpointsApiService) ProtoMessage() {} func (x *EndpointsApiService) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +943,9 @@ type AutomaticScaling struct { func (x *AutomaticScaling) Reset() { *x = AutomaticScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomaticScaling) String() string { @@ -962,7 +956,7 @@ func (*AutomaticScaling) ProtoMessage() {} func (x *AutomaticScaling) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1080,9 @@ type BasicScaling struct { func (x *BasicScaling) Reset() { *x = BasicScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicScaling) String() string { @@ -1101,7 +1093,7 @@ func (*BasicScaling) ProtoMessage() {} func (x *BasicScaling) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1138,9 @@ type ManualScaling struct { func (x *ManualScaling) Reset() { *x = ManualScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualScaling) String() string { @@ -1161,7 +1151,7 @@ func (*ManualScaling) ProtoMessage() {} func (x *ManualScaling) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1198,11 +1188,9 @@ type CpuUtilization struct { func (x *CpuUtilization) Reset() { *x = CpuUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CpuUtilization) String() string { @@ -1213,7 +1201,7 @@ func (*CpuUtilization) ProtoMessage() {} func (x *CpuUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1245,9 @@ type RequestUtilization struct { func (x *RequestUtilization) Reset() { *x = RequestUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestUtilization) String() string { @@ -1272,7 +1258,7 @@ func (*RequestUtilization) ProtoMessage() {} func (x *RequestUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1320,11 +1306,9 @@ type DiskUtilization struct { func (x *DiskUtilization) Reset() { *x = DiskUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskUtilization) String() string { @@ -1335,7 +1319,7 @@ func (*DiskUtilization) ProtoMessage() {} func (x *DiskUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1381,9 @@ type NetworkUtilization struct { func (x *NetworkUtilization) Reset() { *x = NetworkUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkUtilization) String() string { @@ -1412,7 +1394,7 @@ func (*NetworkUtilization) ProtoMessage() {} func (x *NetworkUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1475,11 +1457,9 @@ type StandardSchedulerSettings struct { func (x *StandardSchedulerSettings) Reset() { *x = StandardSchedulerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StandardSchedulerSettings) String() string { @@ -1490,7 +1470,7 @@ func (*StandardSchedulerSettings) ProtoMessage() {} func (x *StandardSchedulerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1558,9 @@ type Network struct { func (x *Network) Reset() { *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Network) String() string { @@ -1593,7 +1571,7 @@ func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1660,11 +1638,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -1675,7 +1651,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,11 +1708,9 @@ type Resources struct { func (x *Resources) Reset() { *x = Resources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resources) String() string { @@ -1747,7 +1721,7 @@ func (*Resources) ProtoMessage() {} func (x *Resources) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1813,11 +1787,9 @@ type VpcAccessConnector struct { func (x *VpcAccessConnector) Reset() { *x = VpcAccessConnector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcAccessConnector) String() string { @@ -1828,7 +1800,7 @@ func (*VpcAccessConnector) ProtoMessage() {} func (x *VpcAccessConnector) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1873,11 +1845,9 @@ type Entrypoint struct { func (x *Entrypoint) Reset() { *x = Entrypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_appengine_v1_version_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_appengine_v1_version_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entrypoint) String() string { @@ -1888,7 +1858,7 @@ func (*Entrypoint) ProtoMessage() {} func (x *Entrypoint) ProtoReflect() protoreflect.Message { mi := &file_google_appengine_v1_version_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2442,188 +2412,6 @@ func file_google_appengine_v1_version_proto_init() { } file_google_appengine_v1_app_yaml_proto_init() file_google_appengine_v1_deploy_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_appengine_v1_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EndpointsApiService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutomaticScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BasicScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ManualScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CpuUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RequestUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DiskUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NetworkUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StandardSchedulerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Resources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*VpcAccessConnector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_appengine_v1_version_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Entrypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_appengine_v1_version_proto_msgTypes[0].OneofWrappers = []any{ (*Version_AutomaticScaling)(nil), (*Version_BasicScaling)(nil), diff --git a/appengine/apiv1/applications_client.go b/appengine/apiv1/applications_client.go index 14878fc21fc4..0da4f178b58f 100755 --- a/appengine/apiv1/applications_client.go +++ b/appengine/apiv1/applications_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -234,6 +233,8 @@ type applicationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewApplicationsClient creates a new applications client based on gRPC. @@ -260,6 +261,7 @@ func NewApplicationsClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, applicationsClient: appenginepb.NewApplicationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -322,6 +324,8 @@ type applicationsRESTClient struct { // Points back to the CallOptions field of the containing ApplicationsClient CallOptions **ApplicationsCallOptions + + logger *slog.Logger } // NewApplicationsRESTClient creates a new applications rest client. @@ -339,6 +343,7 @@ func NewApplicationsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -401,7 +406,7 @@ func (c *applicationsGRPCClient) GetApplication(ctx context.Context, req *appeng var resp *appenginepb.Application err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.applicationsClient.GetApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.applicationsClient.GetApplication, req, settings.GRPC, c.logger, "GetApplication") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *applicationsGRPCClient) CreateApplication(ctx context.Context, req *app var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.applicationsClient.CreateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.applicationsClient.CreateApplication, req, settings.GRPC, c.logger, "CreateApplication") return err }, opts...) if err != nil { @@ -436,7 +441,7 @@ func (c *applicationsGRPCClient) UpdateApplication(ctx context.Context, req *app var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.applicationsClient.UpdateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.applicationsClient.UpdateApplication, req, settings.GRPC, c.logger, "UpdateApplication") return err }, opts...) if err != nil { @@ -456,7 +461,7 @@ func (c *applicationsGRPCClient) RepairApplication(ctx context.Context, req *app var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.applicationsClient.RepairApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.applicationsClient.RepairApplication, req, settings.GRPC, c.logger, "RepairApplication") return err }, opts...) if err != nil { @@ -500,17 +505,7 @@ func (c *applicationsRESTClient) GetApplication(ctx context.Context, req *appeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApplication") if err != nil { return err } @@ -570,21 +565,10 @@ func (c *applicationsRESTClient) CreateApplication(ctx context.Context, req *app httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -655,21 +639,10 @@ func (c *applicationsRESTClient) UpdateApplication(ctx context.Context, req *app httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -734,21 +707,10 @@ func (c *applicationsRESTClient) RepairApplication(ctx context.Context, req *app httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RepairApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/authorized_certificates_client.go b/appengine/apiv1/authorized_certificates_client.go index ef8be3929a36..41d8404363f0 100755 --- a/appengine/apiv1/authorized_certificates_client.go +++ b/appengine/apiv1/authorized_certificates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( appenginepb "cloud.google.com/go/appengine/apiv1/appenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -197,6 +196,8 @@ type authorizedCertificatesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAuthorizedCertificatesClient creates a new authorized certificates client based on gRPC. @@ -224,6 +225,7 @@ func NewAuthorizedCertificatesClient(ctx context.Context, opts ...option.ClientO connPool: connPool, authorizedCertificatesClient: appenginepb.NewAuthorizedCertificatesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -270,6 +272,8 @@ type authorizedCertificatesRESTClient struct { // Points back to the CallOptions field of the containing AuthorizedCertificatesClient CallOptions **AuthorizedCertificatesCallOptions + + logger *slog.Logger } // NewAuthorizedCertificatesRESTClient creates a new authorized certificates rest client. @@ -288,6 +292,7 @@ func NewAuthorizedCertificatesRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -351,7 +356,7 @@ func (c *authorizedCertificatesGRPCClient) ListAuthorizedCertificates(ctx contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authorizedCertificatesClient.ListAuthorizedCertificates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authorizedCertificatesClient.ListAuthorizedCertificates, req, settings.GRPC, c.logger, "ListAuthorizedCertificates") return err }, opts...) if err != nil { @@ -386,7 +391,7 @@ func (c *authorizedCertificatesGRPCClient) GetAuthorizedCertificate(ctx context. var resp *appenginepb.AuthorizedCertificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authorizedCertificatesClient.GetAuthorizedCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authorizedCertificatesClient.GetAuthorizedCertificate, req, settings.GRPC, c.logger, "GetAuthorizedCertificate") return err }, opts...) if err != nil { @@ -404,7 +409,7 @@ func (c *authorizedCertificatesGRPCClient) CreateAuthorizedCertificate(ctx conte var resp *appenginepb.AuthorizedCertificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authorizedCertificatesClient.CreateAuthorizedCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authorizedCertificatesClient.CreateAuthorizedCertificate, req, settings.GRPC, c.logger, "CreateAuthorizedCertificate") return err }, opts...) if err != nil { @@ -422,7 +427,7 @@ func (c *authorizedCertificatesGRPCClient) UpdateAuthorizedCertificate(ctx conte var resp *appenginepb.AuthorizedCertificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authorizedCertificatesClient.UpdateAuthorizedCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authorizedCertificatesClient.UpdateAuthorizedCertificate, req, settings.GRPC, c.logger, "UpdateAuthorizedCertificate") return err }, opts...) if err != nil { @@ -439,7 +444,7 @@ func (c *authorizedCertificatesGRPCClient) DeleteAuthorizedCertificate(ctx conte opts = append((*c.CallOptions).DeleteAuthorizedCertificate[0:len((*c.CallOptions).DeleteAuthorizedCertificate):len((*c.CallOptions).DeleteAuthorizedCertificate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.authorizedCertificatesClient.DeleteAuthorizedCertificate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.authorizedCertificatesClient.DeleteAuthorizedCertificate, req, settings.GRPC, c.logger, "DeleteAuthorizedCertificate") return err }, opts...) return err @@ -493,21 +498,10 @@ func (c *authorizedCertificatesRESTClient) ListAuthorizedCertificates(ctx contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAuthorizedCertificates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -573,17 +567,7 @@ func (c *authorizedCertificatesRESTClient) GetAuthorizedCertificate(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAuthorizedCertificate") if err != nil { return err } @@ -640,17 +624,7 @@ func (c *authorizedCertificatesRESTClient) CreateAuthorizedCertificate(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAuthorizedCertificate") if err != nil { return err } @@ -718,17 +692,7 @@ func (c *authorizedCertificatesRESTClient) UpdateAuthorizedCertificate(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAuthorizedCertificate") if err != nil { return err } @@ -775,14 +739,7 @@ func (c *authorizedCertificatesRESTClient) DeleteAuthorizedCertificate(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAuthorizedCertificate") + return err }, opts...) } diff --git a/appengine/apiv1/authorized_certificates_client_example_go123_test.go b/appengine/apiv1/authorized_certificates_client_example_go123_test.go index a6fdac9b0e73..663a32bfccdc 100644 --- a/appengine/apiv1/authorized_certificates_client_example_go123_test.go +++ b/appengine/apiv1/authorized_certificates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAuthorizedCertificatesClient_ListAuthorizedCertificates_all() { } for resp, err := range c.ListAuthorizedCertificates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/authorized_domains_client.go b/appengine/apiv1/authorized_domains_client.go index a18b32a8a166..1a1e37594ef0 100755 --- a/appengine/apiv1/authorized_domains_client.go +++ b/appengine/apiv1/authorized_domains_client.go @@ -19,7 +19,7 @@ package appengine import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( appenginepb "cloud.google.com/go/appengine/apiv1/appenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type authorizedDomainsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAuthorizedDomainsClient creates a new authorized domains client based on gRPC. @@ -169,6 +170,7 @@ func NewAuthorizedDomainsClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, authorizedDomainsClient: appenginepb.NewAuthorizedDomainsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -215,6 +217,8 @@ type authorizedDomainsRESTClient struct { // Points back to the CallOptions field of the containing AuthorizedDomainsClient CallOptions **AuthorizedDomainsCallOptions + + logger *slog.Logger } // NewAuthorizedDomainsRESTClient creates a new authorized domains rest client. @@ -234,6 +238,7 @@ func NewAuthorizedDomainsRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -297,7 +302,7 @@ func (c *authorizedDomainsGRPCClient) ListAuthorizedDomains(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authorizedDomainsClient.ListAuthorizedDomains(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authorizedDomainsClient.ListAuthorizedDomains, req, settings.GRPC, c.logger, "ListAuthorizedDomains") return err }, opts...) if err != nil { @@ -368,21 +373,10 @@ func (c *authorizedDomainsRESTClient) ListAuthorizedDomains(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAuthorizedDomains") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/authorized_domains_client_example_go123_test.go b/appengine/apiv1/authorized_domains_client_example_go123_test.go index f2096b76fcb5..e12812234510 100644 --- a/appengine/apiv1/authorized_domains_client_example_go123_test.go +++ b/appengine/apiv1/authorized_domains_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAuthorizedDomainsClient_ListAuthorizedDomains_all() { } for resp, err := range c.ListAuthorizedDomains(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/domain_mappings_client.go b/appengine/apiv1/domain_mappings_client.go index 35991072def8..658682d99487 100755 --- a/appengine/apiv1/domain_mappings_client.go +++ b/appengine/apiv1/domain_mappings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -233,6 +232,8 @@ type domainMappingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDomainMappingsClient creates a new domain mappings client based on gRPC. @@ -259,6 +260,7 @@ func NewDomainMappingsClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, domainMappingsClient: appenginepb.NewDomainMappingsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -321,6 +323,8 @@ type domainMappingsRESTClient struct { // Points back to the CallOptions field of the containing DomainMappingsClient CallOptions **DomainMappingsCallOptions + + logger *slog.Logger } // NewDomainMappingsRESTClient creates a new domain mappings rest client. @@ -338,6 +342,7 @@ func NewDomainMappingsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -411,7 +416,7 @@ func (c *domainMappingsGRPCClient) ListDomainMappings(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.domainMappingsClient.ListDomainMappings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.domainMappingsClient.ListDomainMappings, req, settings.GRPC, c.logger, "ListDomainMappings") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *domainMappingsGRPCClient) GetDomainMapping(ctx context.Context, req *ap var resp *appenginepb.DomainMapping err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.domainMappingsClient.GetDomainMapping(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.domainMappingsClient.GetDomainMapping, req, settings.GRPC, c.logger, "GetDomainMapping") return err }, opts...) if err != nil { @@ -464,7 +469,7 @@ func (c *domainMappingsGRPCClient) CreateDomainMapping(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.domainMappingsClient.CreateDomainMapping(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.domainMappingsClient.CreateDomainMapping, req, settings.GRPC, c.logger, "CreateDomainMapping") return err }, opts...) if err != nil { @@ -484,7 +489,7 @@ func (c *domainMappingsGRPCClient) UpdateDomainMapping(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.domainMappingsClient.UpdateDomainMapping(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.domainMappingsClient.UpdateDomainMapping, req, settings.GRPC, c.logger, "UpdateDomainMapping") return err }, opts...) if err != nil { @@ -504,7 +509,7 @@ func (c *domainMappingsGRPCClient) DeleteDomainMapping(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.domainMappingsClient.DeleteDomainMapping(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.domainMappingsClient.DeleteDomainMapping, req, settings.GRPC, c.logger, "DeleteDomainMapping") return err }, opts...) if err != nil { @@ -560,21 +565,10 @@ func (c *domainMappingsRESTClient) ListDomainMappings(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDomainMappings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -637,17 +631,7 @@ func (c *domainMappingsRESTClient) GetDomainMapping(ctx context.Context, req *ap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDomainMapping") if err != nil { return err } @@ -708,21 +692,10 @@ func (c *domainMappingsRESTClient) CreateDomainMapping(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDomainMapping") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -789,21 +762,10 @@ func (c *domainMappingsRESTClient) UpdateDomainMapping(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDomainMapping") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -855,21 +817,10 @@ func (c *domainMappingsRESTClient) DeleteDomainMapping(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDomainMapping") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/domain_mappings_client_example_go123_test.go b/appengine/apiv1/domain_mappings_client_example_go123_test.go index f7e6f3b8f466..9840894be461 100644 --- a/appengine/apiv1/domain_mappings_client_example_go123_test.go +++ b/appengine/apiv1/domain_mappings_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDomainMappingsClient_ListDomainMappings_all() { } for resp, err := range c.ListDomainMappings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/firewall_client.go b/appengine/apiv1/firewall_client.go index f705dd3bdb16..7d426fac2a85 100755 --- a/appengine/apiv1/firewall_client.go +++ b/appengine/apiv1/firewall_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( appenginepb "cloud.google.com/go/appengine/apiv1/appenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -218,6 +217,8 @@ type firewallGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFirewallClient creates a new firewall client based on gRPC. @@ -253,6 +254,7 @@ func NewFirewallClient(ctx context.Context, opts ...option.ClientOption) (*Firew connPool: connPool, firewallClient: appenginepb.NewFirewallClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -299,6 +301,8 @@ type firewallRESTClient struct { // Points back to the CallOptions field of the containing FirewallClient CallOptions **FirewallCallOptions + + logger *slog.Logger } // NewFirewallRESTClient creates a new firewall rest client. @@ -325,6 +329,7 @@ func NewFirewallRESTClient(ctx context.Context, opts ...option.ClientOption) (*F endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -388,7 +393,7 @@ func (c *firewallGRPCClient) ListIngressRules(ctx context.Context, req *appengin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firewallClient.ListIngressRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firewallClient.ListIngressRules, req, settings.GRPC, c.logger, "ListIngressRules") return err }, opts...) if err != nil { @@ -423,7 +428,7 @@ func (c *firewallGRPCClient) BatchUpdateIngressRules(ctx context.Context, req *a var resp *appenginepb.BatchUpdateIngressRulesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firewallClient.BatchUpdateIngressRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firewallClient.BatchUpdateIngressRules, req, settings.GRPC, c.logger, "BatchUpdateIngressRules") return err }, opts...) if err != nil { @@ -441,7 +446,7 @@ func (c *firewallGRPCClient) CreateIngressRule(ctx context.Context, req *appengi var resp *appenginepb.FirewallRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firewallClient.CreateIngressRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firewallClient.CreateIngressRule, req, settings.GRPC, c.logger, "CreateIngressRule") return err }, opts...) if err != nil { @@ -459,7 +464,7 @@ func (c *firewallGRPCClient) GetIngressRule(ctx context.Context, req *appenginep var resp *appenginepb.FirewallRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firewallClient.GetIngressRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firewallClient.GetIngressRule, req, settings.GRPC, c.logger, "GetIngressRule") return err }, opts...) if err != nil { @@ -477,7 +482,7 @@ func (c *firewallGRPCClient) UpdateIngressRule(ctx context.Context, req *appengi var resp *appenginepb.FirewallRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firewallClient.UpdateIngressRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firewallClient.UpdateIngressRule, req, settings.GRPC, c.logger, "UpdateIngressRule") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *firewallGRPCClient) DeleteIngressRule(ctx context.Context, req *appengi opts = append((*c.CallOptions).DeleteIngressRule[0:len((*c.CallOptions).DeleteIngressRule):len((*c.CallOptions).DeleteIngressRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.firewallClient.DeleteIngressRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.firewallClient.DeleteIngressRule, req, settings.GRPC, c.logger, "DeleteIngressRule") return err }, opts...) return err @@ -548,21 +553,10 @@ func (c *firewallRESTClient) ListIngressRules(ctx context.Context, req *appengin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIngressRules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -635,17 +629,7 @@ func (c *firewallRESTClient) BatchUpdateIngressRules(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateIngressRules") if err != nil { return err } @@ -702,17 +686,7 @@ func (c *firewallRESTClient) CreateIngressRule(ctx context.Context, req *appengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIngressRule") if err != nil { return err } @@ -762,17 +736,7 @@ func (c *firewallRESTClient) GetIngressRule(ctx context.Context, req *appenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIngressRule") if err != nil { return err } @@ -836,17 +800,7 @@ func (c *firewallRESTClient) UpdateIngressRule(ctx context.Context, req *appengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIngressRule") if err != nil { return err } @@ -893,14 +847,7 @@ func (c *firewallRESTClient) DeleteIngressRule(ctx context.Context, req *appengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIngressRule") + return err }, opts...) } diff --git a/appengine/apiv1/firewall_client_example_go123_test.go b/appengine/apiv1/firewall_client_example_go123_test.go index abc8eb690b46..a9330ebfaffb 100644 --- a/appengine/apiv1/firewall_client_example_go123_test.go +++ b/appengine/apiv1/firewall_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleFirewallClient_ListIngressRules_all() { } for resp, err := range c.ListIngressRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/helpers.go b/appengine/apiv1/helpers.go index 7273dc2607bd..8a15933d458b 100755 --- a/appengine/apiv1/helpers.go +++ b/appengine/apiv1/helpers.go @@ -18,10 +18,20 @@ package appengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "appengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/appengine/apiv1/instances_client.go b/appengine/apiv1/instances_client.go index 3efe7238af24..61687c7793f1 100755 --- a/appengine/apiv1/instances_client.go +++ b/appengine/apiv1/instances_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -227,6 +226,8 @@ type instancesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewInstancesClient creates a new instances client based on gRPC. @@ -253,6 +254,7 @@ func NewInstancesClient(ctx context.Context, opts ...option.ClientOption) (*Inst connPool: connPool, instancesClient: appenginepb.NewInstancesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -315,6 +317,8 @@ type instancesRESTClient struct { // Points back to the CallOptions field of the containing InstancesClient CallOptions **InstancesCallOptions + + logger *slog.Logger } // NewInstancesRESTClient creates a new instances rest client. @@ -332,6 +336,7 @@ func NewInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -405,7 +410,7 @@ func (c *instancesGRPCClient) ListInstances(ctx context.Context, req *appenginep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instancesClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instancesClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -440,7 +445,7 @@ func (c *instancesGRPCClient) GetInstance(ctx context.Context, req *appenginepb. var resp *appenginepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instancesClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instancesClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -458,7 +463,7 @@ func (c *instancesGRPCClient) DeleteInstance(ctx context.Context, req *appengine var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instancesClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instancesClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -478,7 +483,7 @@ func (c *instancesGRPCClient) DebugInstance(ctx context.Context, req *appenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instancesClient.DebugInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instancesClient.DebugInstance, req, settings.GRPC, c.logger, "DebugInstance") return err }, opts...) if err != nil { @@ -537,21 +542,10 @@ func (c *instancesRESTClient) ListInstances(ctx context.Context, req *appenginep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -614,17 +608,7 @@ func (c *instancesRESTClient) GetInstance(ctx context.Context, req *appenginepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -684,21 +668,10 @@ func (c *instancesRESTClient) DeleteInstance(ctx context.Context, req *appengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -761,21 +734,10 @@ func (c *instancesRESTClient) DebugInstance(ctx context.Context, req *appenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DebugInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/instances_client_example_go123_test.go b/appengine/apiv1/instances_client_example_go123_test.go index 894ecafb04b9..1fbfc5fbde10 100644 --- a/appengine/apiv1/instances_client_example_go123_test.go +++ b/appengine/apiv1/instances_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstancesClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/services_client.go b/appengine/apiv1/services_client.go index 760def2c9869..5e38dfda849b 100755 --- a/appengine/apiv1/services_client.go +++ b/appengine/apiv1/services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -206,6 +205,8 @@ type servicesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServicesClient creates a new services client based on gRPC. @@ -232,6 +233,7 @@ func NewServicesClient(ctx context.Context, opts ...option.ClientOption) (*Servi connPool: connPool, servicesClient: appenginepb.NewServicesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,6 +296,8 @@ type servicesRESTClient struct { // Points back to the CallOptions field of the containing ServicesClient CallOptions **ServicesCallOptions + + logger *slog.Logger } // NewServicesRESTClient creates a new services rest client. @@ -311,6 +315,7 @@ func NewServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -384,7 +389,7 @@ func (c *servicesGRPCClient) ListServices(ctx context.Context, req *appenginepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -419,7 +424,7 @@ func (c *servicesGRPCClient) GetService(ctx context.Context, req *appenginepb.Ge var resp *appenginepb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -437,7 +442,7 @@ func (c *servicesGRPCClient) UpdateService(ctx context.Context, req *appenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *servicesGRPCClient) DeleteService(ctx context.Context, req *appenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -513,21 +518,10 @@ func (c *servicesRESTClient) ListServices(ctx context.Context, req *appenginepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -590,17 +584,7 @@ func (c *servicesRESTClient) GetService(ctx context.Context, req *appenginepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -666,21 +650,10 @@ func (c *servicesRESTClient) UpdateService(ctx context.Context, req *appenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -730,21 +703,10 @@ func (c *servicesRESTClient) DeleteService(ctx context.Context, req *appenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/services_client_example_go123_test.go b/appengine/apiv1/services_client_example_go123_test.go index 026850dc3674..245341b021b3 100644 --- a/appengine/apiv1/services_client_example_go123_test.go +++ b/appengine/apiv1/services_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleServicesClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/appengine/apiv1/versions_client.go b/appengine/apiv1/versions_client.go index 5ac69aad58d7..a3e03274a57a 100755 --- a/appengine/apiv1/versions_client.go +++ b/appengine/apiv1/versions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -272,6 +271,8 @@ type versionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVersionsClient creates a new versions client based on gRPC. @@ -298,6 +299,7 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi connPool: connPool, versionsClient: appenginepb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -360,6 +362,8 @@ type versionsRESTClient struct { // Points back to the CallOptions field of the containing VersionsClient CallOptions **VersionsCallOptions + + logger *slog.Logger } // NewVersionsRESTClient creates a new versions rest client. @@ -377,6 +381,7 @@ func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*V endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -450,7 +455,7 @@ func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *appenginepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *appenginepb.Ge var resp *appenginepb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *appenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CreateVersion, req, settings.GRPC, c.logger, "CreateVersion") return err }, opts...) if err != nil { @@ -523,7 +528,7 @@ func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *appenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -543,7 +548,7 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *appenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) if err != nil { @@ -602,21 +607,10 @@ func (c *versionsRESTClient) ListVersions(ctx context.Context, req *appenginepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -684,17 +678,7 @@ func (c *versionsRESTClient) GetVersion(ctx context.Context, req *appenginepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -750,21 +734,10 @@ func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *appenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -872,21 +845,10 @@ func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *appenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -936,21 +898,10 @@ func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *appenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/appengine/apiv1/versions_client_example_go123_test.go b/appengine/apiv1/versions_client_example_go123_test.go index 19045c21c9b0..2af0c30f5b95 100644 --- a/appengine/apiv1/versions_client_example_go123_test.go +++ b/appengine/apiv1/versions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleVersionsClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apphub/apiv1/app_hub_client.go b/apphub/apiv1/app_hub_client.go index ed02653a0c3a..dfcd9094ef70 100755 --- a/apphub/apiv1/app_hub_client.go +++ b/apphub/apiv1/app_hub_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -931,6 +930,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new app hub client based on gRPC. @@ -957,6 +958,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: apphubpb.NewAppHubClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1022,6 +1024,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new app hub rest client. @@ -1039,6 +1043,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1101,7 +1106,7 @@ func (c *gRPCClient) LookupServiceProjectAttachment(ctx context.Context, req *ap var resp *apphubpb.LookupServiceProjectAttachmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupServiceProjectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupServiceProjectAttachment, req, settings.GRPC, c.logger, "LookupServiceProjectAttachment") return err }, opts...) if err != nil { @@ -1130,7 +1135,7 @@ func (c *gRPCClient) ListServiceProjectAttachments(ctx context.Context, req *app } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServiceProjectAttachments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServiceProjectAttachments, req, settings.GRPC, c.logger, "ListServiceProjectAttachments") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *gRPCClient) CreateServiceProjectAttachment(ctx context.Context, req *ap var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateServiceProjectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateServiceProjectAttachment, req, settings.GRPC, c.logger, "CreateServiceProjectAttachment") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *gRPCClient) GetServiceProjectAttachment(ctx context.Context, req *apphu var resp *apphubpb.ServiceProjectAttachment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetServiceProjectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetServiceProjectAttachment, req, settings.GRPC, c.logger, "GetServiceProjectAttachment") return err }, opts...) if err != nil { @@ -1203,7 +1208,7 @@ func (c *gRPCClient) DeleteServiceProjectAttachment(ctx context.Context, req *ap var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteServiceProjectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteServiceProjectAttachment, req, settings.GRPC, c.logger, "DeleteServiceProjectAttachment") return err }, opts...) if err != nil { @@ -1223,7 +1228,7 @@ func (c *gRPCClient) DetachServiceProjectAttachment(ctx context.Context, req *ap var resp *apphubpb.DetachServiceProjectAttachmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DetachServiceProjectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DetachServiceProjectAttachment, req, settings.GRPC, c.logger, "DetachServiceProjectAttachment") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) ListDiscoveredServices(ctx context.Context, req *apphubpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDiscoveredServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDiscoveredServices, req, settings.GRPC, c.logger, "ListDiscoveredServices") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *gRPCClient) GetDiscoveredService(ctx context.Context, req *apphubpb.Get var resp *apphubpb.DiscoveredService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDiscoveredService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDiscoveredService, req, settings.GRPC, c.logger, "GetDiscoveredService") return err }, opts...) if err != nil { @@ -1305,7 +1310,7 @@ func (c *gRPCClient) LookupDiscoveredService(ctx context.Context, req *apphubpb. var resp *apphubpb.LookupDiscoveredServiceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupDiscoveredService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupDiscoveredService, req, settings.GRPC, c.logger, "LookupDiscoveredService") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *gRPCClient) ListServices(ctx context.Context, req *apphubpb.ListService } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -1369,7 +1374,7 @@ func (c *gRPCClient) CreateService(ctx context.Context, req *apphubpb.CreateServ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1389,7 +1394,7 @@ func (c *gRPCClient) GetService(ctx context.Context, req *apphubpb.GetServiceReq var resp *apphubpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1407,7 +1412,7 @@ func (c *gRPCClient) UpdateService(ctx context.Context, req *apphubpb.UpdateServ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1427,7 +1432,7 @@ func (c *gRPCClient) DeleteService(ctx context.Context, req *apphubpb.DeleteServ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -1458,7 +1463,7 @@ func (c *gRPCClient) ListDiscoveredWorkloads(ctx context.Context, req *apphubpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDiscoveredWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDiscoveredWorkloads, req, settings.GRPC, c.logger, "ListDiscoveredWorkloads") return err }, opts...) if err != nil { @@ -1493,7 +1498,7 @@ func (c *gRPCClient) GetDiscoveredWorkload(ctx context.Context, req *apphubpb.Ge var resp *apphubpb.DiscoveredWorkload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDiscoveredWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDiscoveredWorkload, req, settings.GRPC, c.logger, "GetDiscoveredWorkload") return err }, opts...) if err != nil { @@ -1511,7 +1516,7 @@ func (c *gRPCClient) LookupDiscoveredWorkload(ctx context.Context, req *apphubpb var resp *apphubpb.LookupDiscoveredWorkloadResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupDiscoveredWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupDiscoveredWorkload, req, settings.GRPC, c.logger, "LookupDiscoveredWorkload") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *gRPCClient) ListWorkloads(ctx context.Context, req *apphubpb.ListWorklo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -1575,7 +1580,7 @@ func (c *gRPCClient) CreateWorkload(ctx context.Context, req *apphubpb.CreateWor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkload, req, settings.GRPC, c.logger, "CreateWorkload") return err }, opts...) if err != nil { @@ -1595,7 +1600,7 @@ func (c *gRPCClient) GetWorkload(ctx context.Context, req *apphubpb.GetWorkloadR var resp *apphubpb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkload, req, settings.GRPC, c.logger, "GetWorkload") return err }, opts...) if err != nil { @@ -1613,7 +1618,7 @@ func (c *gRPCClient) UpdateWorkload(ctx context.Context, req *apphubpb.UpdateWor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkload, req, settings.GRPC, c.logger, "UpdateWorkload") return err }, opts...) if err != nil { @@ -1633,7 +1638,7 @@ func (c *gRPCClient) DeleteWorkload(ctx context.Context, req *apphubpb.DeleteWor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkload, req, settings.GRPC, c.logger, "DeleteWorkload") return err }, opts...) if err != nil { @@ -1664,7 +1669,7 @@ func (c *gRPCClient) ListApplications(ctx context.Context, req *apphubpb.ListApp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListApplications(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListApplications, req, settings.GRPC, c.logger, "ListApplications") return err }, opts...) if err != nil { @@ -1699,7 +1704,7 @@ func (c *gRPCClient) CreateApplication(ctx context.Context, req *apphubpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateApplication, req, settings.GRPC, c.logger, "CreateApplication") return err }, opts...) if err != nil { @@ -1719,7 +1724,7 @@ func (c *gRPCClient) GetApplication(ctx context.Context, req *apphubpb.GetApplic var resp *apphubpb.Application err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetApplication, req, settings.GRPC, c.logger, "GetApplication") return err }, opts...) if err != nil { @@ -1737,7 +1742,7 @@ func (c *gRPCClient) UpdateApplication(ctx context.Context, req *apphubpb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateApplication, req, settings.GRPC, c.logger, "UpdateApplication") return err }, opts...) if err != nil { @@ -1757,7 +1762,7 @@ func (c *gRPCClient) DeleteApplication(ctx context.Context, req *apphubpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteApplication, req, settings.GRPC, c.logger, "DeleteApplication") return err }, opts...) if err != nil { @@ -1777,7 +1782,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1806,7 +1811,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1841,7 +1846,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1859,7 +1864,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1877,7 +1882,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1894,7 +1899,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1908,7 +1913,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1923,7 +1928,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1952,7 +1957,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2012,17 +2017,7 @@ func (c *restClient) LookupServiceProjectAttachment(ctx context.Context, req *ap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupServiceProjectAttachment") if err != nil { return err } @@ -2090,21 +2085,10 @@ func (c *restClient) ListServiceProjectAttachments(ctx context.Context, req *app } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServiceProjectAttachments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2177,21 +2161,10 @@ func (c *restClient) CreateServiceProjectAttachment(ctx context.Context, req *ap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServiceProjectAttachment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2242,17 +2215,7 @@ func (c *restClient) GetServiceProjectAttachment(ctx context.Context, req *apphu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServiceProjectAttachment") if err != nil { return err } @@ -2304,21 +2267,10 @@ func (c *restClient) DeleteServiceProjectAttachment(ctx context.Context, req *ap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServiceProjectAttachment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2377,17 +2329,7 @@ func (c *restClient) DetachServiceProjectAttachment(ctx context.Context, req *ap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetachServiceProjectAttachment") if err != nil { return err } @@ -2456,21 +2398,10 @@ func (c *restClient) ListDiscoveredServices(ctx context.Context, req *apphubpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDiscoveredServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2533,17 +2464,7 @@ func (c *restClient) GetDiscoveredService(ctx context.Context, req *apphubpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDiscoveredService") if err != nil { return err } @@ -2595,17 +2516,7 @@ func (c *restClient) LookupDiscoveredService(ctx context.Context, req *apphubpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupDiscoveredService") if err != nil { return err } @@ -2673,21 +2584,10 @@ func (c *restClient) ListServices(ctx context.Context, req *apphubpb.ListService } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2760,21 +2660,10 @@ func (c *restClient) CreateService(ctx context.Context, req *apphubpb.CreateServ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2825,17 +2714,7 @@ func (c *restClient) GetService(ctx context.Context, req *apphubpb.GetServiceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -2901,21 +2780,10 @@ func (c *restClient) UpdateService(ctx context.Context, req *apphubpb.UpdateServ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2968,21 +2836,10 @@ func (c *restClient) DeleteService(ctx context.Context, req *apphubpb.DeleteServ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3052,21 +2909,10 @@ func (c *restClient) ListDiscoveredWorkloads(ctx context.Context, req *apphubpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDiscoveredWorkloads") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3129,17 +2975,7 @@ func (c *restClient) GetDiscoveredWorkload(ctx context.Context, req *apphubpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDiscoveredWorkload") if err != nil { return err } @@ -3191,17 +3027,7 @@ func (c *restClient) LookupDiscoveredWorkload(ctx context.Context, req *apphubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupDiscoveredWorkload") if err != nil { return err } @@ -3269,21 +3095,10 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *apphubpb.ListWorklo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3356,21 +3171,10 @@ func (c *restClient) CreateWorkload(ctx context.Context, req *apphubpb.CreateWor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkload") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3421,17 +3225,7 @@ func (c *restClient) GetWorkload(ctx context.Context, req *apphubpb.GetWorkloadR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkload") if err != nil { return err } @@ -3497,21 +3291,10 @@ func (c *restClient) UpdateWorkload(ctx context.Context, req *apphubpb.UpdateWor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkload") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3564,21 +3347,10 @@ func (c *restClient) DeleteWorkload(ctx context.Context, req *apphubpb.DeleteWor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkload") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3647,21 +3419,10 @@ func (c *restClient) ListApplications(ctx context.Context, req *apphubpb.ListApp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApplications") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3734,21 +3495,10 @@ func (c *restClient) CreateApplication(ctx context.Context, req *apphubpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3799,17 +3549,7 @@ func (c *restClient) GetApplication(ctx context.Context, req *apphubpb.GetApplic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApplication") if err != nil { return err } @@ -3875,21 +3615,10 @@ func (c *restClient) UpdateApplication(ctx context.Context, req *apphubpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3942,21 +3671,10 @@ func (c *restClient) DeleteApplication(ctx context.Context, req *apphubpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteApplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4007,17 +3725,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4082,21 +3790,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4163,17 +3860,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4233,17 +3920,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4305,17 +3982,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4368,15 +4035,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4410,15 +4070,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4455,17 +4108,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4530,21 +4173,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apphub/apiv1/app_hub_client_example_go123_test.go b/apphub/apiv1/app_hub_client_example_go123_test.go index af898a533bde..b4005ccd80db 100644 --- a/apphub/apiv1/app_hub_client_example_go123_test.go +++ b/apphub/apiv1/app_hub_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListApplications_all() { } for resp, err := range c.ListApplications(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListDiscoveredServices_all() { } for resp, err := range c.ListDiscoveredServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListDiscoveredWorkloads_all() { } for resp, err := range c.ListDiscoveredWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListServiceProjectAttachments_all() { } for resp, err := range c.ListServiceProjectAttachments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apphub/apiv1/apphubpb/apphub_service.pb.go b/apphub/apiv1/apphubpb/apphub_service.pb.go index 7d947045d5e3..d27c7be16a04 100755 --- a/apphub/apiv1/apphubpb/apphub_service.pb.go +++ b/apphub/apiv1/apphubpb/apphub_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/apphub_service.proto @@ -58,11 +58,9 @@ type LookupServiceProjectAttachmentRequest struct { func (x *LookupServiceProjectAttachmentRequest) Reset() { *x = LookupServiceProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupServiceProjectAttachmentRequest) String() string { @@ -73,7 +71,7 @@ func (*LookupServiceProjectAttachmentRequest) ProtoMessage() {} func (x *LookupServiceProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,11 +105,9 @@ type LookupServiceProjectAttachmentResponse struct { func (x *LookupServiceProjectAttachmentResponse) Reset() { *x = LookupServiceProjectAttachmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupServiceProjectAttachmentResponse) String() string { @@ -122,7 +118,7 @@ func (*LookupServiceProjectAttachmentResponse) ProtoMessage() {} func (x *LookupServiceProjectAttachmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type ListServiceProjectAttachmentsRequest struct { func (x *ListServiceProjectAttachmentsRequest) Reset() { *x = ListServiceProjectAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceProjectAttachmentsRequest) String() string { @@ -182,7 +176,7 @@ func (*ListServiceProjectAttachmentsRequest) ProtoMessage() {} func (x *ListServiceProjectAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +242,9 @@ type ListServiceProjectAttachmentsResponse struct { func (x *ListServiceProjectAttachmentsResponse) Reset() { *x = ListServiceProjectAttachmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceProjectAttachmentsResponse) String() string { @@ -263,7 +255,7 @@ func (*ListServiceProjectAttachmentsResponse) ProtoMessage() {} func (x *ListServiceProjectAttachmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +325,9 @@ type CreateServiceProjectAttachmentRequest struct { func (x *CreateServiceProjectAttachmentRequest) Reset() { *x = CreateServiceProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceProjectAttachmentRequest) String() string { @@ -348,7 +338,7 @@ func (*CreateServiceProjectAttachmentRequest) ProtoMessage() {} func (x *CreateServiceProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +395,9 @@ type GetServiceProjectAttachmentRequest struct { func (x *GetServiceProjectAttachmentRequest) Reset() { *x = GetServiceProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceProjectAttachmentRequest) String() string { @@ -420,7 +408,7 @@ func (*GetServiceProjectAttachmentRequest) ProtoMessage() {} func (x *GetServiceProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +458,9 @@ type DeleteServiceProjectAttachmentRequest struct { func (x *DeleteServiceProjectAttachmentRequest) Reset() { *x = DeleteServiceProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceProjectAttachmentRequest) String() string { @@ -485,7 +471,7 @@ func (*DeleteServiceProjectAttachmentRequest) ProtoMessage() {} func (x *DeleteServiceProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +514,9 @@ type DetachServiceProjectAttachmentRequest struct { func (x *DetachServiceProjectAttachmentRequest) Reset() { *x = DetachServiceProjectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachServiceProjectAttachmentRequest) String() string { @@ -543,7 +527,7 @@ func (*DetachServiceProjectAttachmentRequest) ProtoMessage() {} func (x *DetachServiceProjectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +558,9 @@ type DetachServiceProjectAttachmentResponse struct { func (x *DetachServiceProjectAttachmentResponse) Reset() { *x = DetachServiceProjectAttachmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachServiceProjectAttachmentResponse) String() string { @@ -589,7 +571,7 @@ func (*DetachServiceProjectAttachmentResponse) ProtoMessage() {} func (x *DetachServiceProjectAttachmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -627,11 +609,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -642,7 +622,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +688,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -723,7 +701,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +759,9 @@ type ListDiscoveredServicesRequest struct { func (x *ListDiscoveredServicesRequest) Reset() { *x = ListDiscoveredServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveredServicesRequest) String() string { @@ -796,7 +772,7 @@ func (*ListDiscoveredServicesRequest) ProtoMessage() {} func (x *ListDiscoveredServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +838,9 @@ type ListDiscoveredServicesResponse struct { func (x *ListDiscoveredServicesResponse) Reset() { *x = ListDiscoveredServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveredServicesResponse) String() string { @@ -877,7 +851,7 @@ func (*ListDiscoveredServicesResponse) ProtoMessage() {} func (x *ListDiscoveredServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +922,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -963,7 +935,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +992,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -1035,7 +1005,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1041,9 @@ type GetDiscoveredServiceRequest struct { func (x *GetDiscoveredServiceRequest) Reset() { *x = GetDiscoveredServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiscoveredServiceRequest) String() string { @@ -1086,7 +1054,7 @@ func (*GetDiscoveredServiceRequest) ProtoMessage() {} func (x *GetDiscoveredServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1093,9 @@ type LookupDiscoveredServiceRequest struct { func (x *LookupDiscoveredServiceRequest) Reset() { *x = LookupDiscoveredServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupDiscoveredServiceRequest) String() string { @@ -1140,7 +1106,7 @@ func (*LookupDiscoveredServiceRequest) ProtoMessage() {} func (x *LookupDiscoveredServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1181,11 +1147,9 @@ type LookupDiscoveredServiceResponse struct { func (x *LookupDiscoveredServiceResponse) Reset() { *x = LookupDiscoveredServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupDiscoveredServiceResponse) String() string { @@ -1196,7 +1160,7 @@ func (*LookupDiscoveredServiceResponse) ProtoMessage() {} func (x *LookupDiscoveredServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1218,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -1269,7 +1231,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1333,11 +1295,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -1348,7 +1308,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1399,11 +1359,9 @@ type ListApplicationsRequest struct { func (x *ListApplicationsRequest) Reset() { *x = ListApplicationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApplicationsRequest) String() string { @@ -1414,7 +1372,7 @@ func (*ListApplicationsRequest) ProtoMessage() {} func (x *ListApplicationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1438,9 @@ type ListApplicationsResponse struct { func (x *ListApplicationsResponse) Reset() { *x = ListApplicationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApplicationsResponse) String() string { @@ -1495,7 +1451,7 @@ func (*ListApplicationsResponse) ProtoMessage() {} func (x *ListApplicationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1521,9 @@ type CreateApplicationRequest struct { func (x *CreateApplicationRequest) Reset() { *x = CreateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApplicationRequest) String() string { @@ -1580,7 +1534,7 @@ func (*CreateApplicationRequest) ProtoMessage() {} func (x *CreateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1637,11 +1591,9 @@ type GetApplicationRequest struct { func (x *GetApplicationRequest) Reset() { *x = GetApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApplicationRequest) String() string { @@ -1652,7 +1604,7 @@ func (*GetApplicationRequest) ProtoMessage() {} func (x *GetApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1710,11 +1662,9 @@ type UpdateApplicationRequest struct { func (x *UpdateApplicationRequest) Reset() { *x = UpdateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationRequest) String() string { @@ -1725,7 +1675,7 @@ func (*UpdateApplicationRequest) ProtoMessage() {} func (x *UpdateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1739,9 @@ type DeleteApplicationRequest struct { func (x *DeleteApplicationRequest) Reset() { *x = DeleteApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApplicationRequest) String() string { @@ -1804,7 +1752,7 @@ func (*DeleteApplicationRequest) ProtoMessage() {} func (x *DeleteApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,11 +1804,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -1871,7 +1817,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1937,11 +1883,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -1952,7 +1896,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2010,11 +1954,9 @@ type ListDiscoveredWorkloadsRequest struct { func (x *ListDiscoveredWorkloadsRequest) Reset() { *x = ListDiscoveredWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveredWorkloadsRequest) String() string { @@ -2025,7 +1967,7 @@ func (*ListDiscoveredWorkloadsRequest) ProtoMessage() {} func (x *ListDiscoveredWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2091,11 +2033,9 @@ type ListDiscoveredWorkloadsResponse struct { func (x *ListDiscoveredWorkloadsResponse) Reset() { *x = ListDiscoveredWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveredWorkloadsResponse) String() string { @@ -2106,7 +2046,7 @@ func (*ListDiscoveredWorkloadsResponse) ProtoMessage() {} func (x *ListDiscoveredWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2177,11 +2117,9 @@ type CreateWorkloadRequest struct { func (x *CreateWorkloadRequest) Reset() { *x = CreateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkloadRequest) String() string { @@ -2192,7 +2130,7 @@ func (*CreateWorkloadRequest) ProtoMessage() {} func (x *CreateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2249,11 +2187,9 @@ type GetWorkloadRequest struct { func (x *GetWorkloadRequest) Reset() { *x = GetWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkloadRequest) String() string { @@ -2264,7 +2200,7 @@ func (*GetWorkloadRequest) ProtoMessage() {} func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2300,11 +2236,9 @@ type GetDiscoveredWorkloadRequest struct { func (x *GetDiscoveredWorkloadRequest) Reset() { *x = GetDiscoveredWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiscoveredWorkloadRequest) String() string { @@ -2315,7 +2249,7 @@ func (*GetDiscoveredWorkloadRequest) ProtoMessage() {} func (x *GetDiscoveredWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2354,11 +2288,9 @@ type LookupDiscoveredWorkloadRequest struct { func (x *LookupDiscoveredWorkloadRequest) Reset() { *x = LookupDiscoveredWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupDiscoveredWorkloadRequest) String() string { @@ -2369,7 +2301,7 @@ func (*LookupDiscoveredWorkloadRequest) ProtoMessage() {} func (x *LookupDiscoveredWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2410,11 +2342,9 @@ type LookupDiscoveredWorkloadResponse struct { func (x *LookupDiscoveredWorkloadResponse) Reset() { *x = LookupDiscoveredWorkloadResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupDiscoveredWorkloadResponse) String() string { @@ -2425,7 +2355,7 @@ func (*LookupDiscoveredWorkloadResponse) ProtoMessage() {} func (x *LookupDiscoveredWorkloadResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2483,11 +2413,9 @@ type UpdateWorkloadRequest struct { func (x *UpdateWorkloadRequest) Reset() { *x = UpdateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkloadRequest) String() string { @@ -2498,7 +2426,7 @@ func (*UpdateWorkloadRequest) ProtoMessage() {} func (x *UpdateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2562,11 +2490,9 @@ type DeleteWorkloadRequest struct { func (x *DeleteWorkloadRequest) Reset() { *x = DeleteWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkloadRequest) String() string { @@ -2577,7 +2503,7 @@ func (*DeleteWorkloadRequest) ProtoMessage() {} func (x *DeleteWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2634,11 +2560,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2649,7 +2573,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3702,464 +3626,6 @@ func file_google_cloud_apphub_v1_apphub_service_proto_init() { file_google_cloud_apphub_v1_service_proto_init() file_google_cloud_apphub_v1_service_project_attachment_proto_init() file_google_cloud_apphub_v1_workload_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LookupServiceProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LookupServiceProjectAttachmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceProjectAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceProjectAttachmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DetachServiceProjectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DetachServiceProjectAttachmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveredServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveredServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetDiscoveredServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LookupDiscoveredServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*LookupDiscoveredServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListApplicationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListApplicationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveredWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveredWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetDiscoveredWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*LookupDiscoveredWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*LookupDiscoveredWorkloadResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_apphub_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/apphubpb/application.pb.go b/apphub/apiv1/apphubpb/application.pb.go index 8cadf015e77d..098859aa24ad 100755 --- a/apphub/apiv1/apphubpb/application.pb.go +++ b/apphub/apiv1/apphubpb/application.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/application.proto @@ -179,11 +179,9 @@ type Application struct { func (x *Application) Reset() { *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application) String() string { @@ -194,7 +192,7 @@ func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +282,9 @@ type Scope struct { func (x *Scope) Reset() { *x = Scope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scope) String() string { @@ -299,7 +295,7 @@ func (*Scope) ProtoMessage() {} func (x *Scope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_application_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,32 +441,6 @@ func file_google_cloud_apphub_v1_application_proto_init() { return } file_google_cloud_apphub_v1_attributes_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_application_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_application_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Scope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/apphubpb/attributes.pb.go b/apphub/apiv1/apphubpb/attributes.pb.go index 41b29b8df83a..aa7982e621e2 100755 --- a/apphub/apiv1/apphubpb/attributes.pb.go +++ b/apphub/apiv1/apphubpb/attributes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/attributes.proto @@ -179,11 +179,9 @@ type Attributes struct { func (x *Attributes) Reset() { *x = Attributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attributes) String() string { @@ -194,7 +192,7 @@ func (*Attributes) ProtoMessage() {} func (x *Attributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +254,9 @@ type Criticality struct { func (x *Criticality) Reset() { *x = Criticality{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Criticality) String() string { @@ -271,7 +267,7 @@ func (*Criticality) ProtoMessage() {} func (x *Criticality) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -320,7 +314,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +351,9 @@ type ContactInfo struct { func (x *ContactInfo) Reset() { *x = ContactInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactInfo) String() string { @@ -372,7 +364,7 @@ func (*ContactInfo) ProtoMessage() {} func (x *ContactInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_attributes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,56 +511,6 @@ func file_google_cloud_apphub_v1_attributes_proto_init() { if File_google_cloud_apphub_v1_attributes_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_attributes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_attributes_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Criticality); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_attributes_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_attributes_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContactInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/apphubpb/service.pb.go b/apphub/apiv1/apphubpb/service.pb.go index 446c78729734..788a352fee13 100755 --- a/apphub/apiv1/apphubpb/service.pb.go +++ b/apphub/apiv1/apphubpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/service.proto @@ -138,11 +138,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -153,7 +151,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +256,9 @@ type ServiceReference struct { func (x *ServiceReference) Reset() { *x = ServiceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceReference) String() string { @@ -273,7 +269,7 @@ func (*ServiceReference) ProtoMessage() {} func (x *ServiceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +310,9 @@ type ServiceProperties struct { func (x *ServiceProperties) Reset() { *x = ServiceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceProperties) String() string { @@ -329,7 +323,7 @@ func (*ServiceProperties) ProtoMessage() {} func (x *ServiceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +380,9 @@ type DiscoveredService struct { func (x *DiscoveredService) Reset() { *x = DiscoveredService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveredService) String() string { @@ -401,7 +393,7 @@ func (*DiscoveredService) ProtoMessage() {} func (x *DiscoveredService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,56 +599,6 @@ func file_google_cloud_apphub_v1_service_proto_init() { return } file_google_cloud_apphub_v1_attributes_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServiceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveredService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/apphubpb/service_project_attachment.pb.go b/apphub/apiv1/apphubpb/service_project_attachment.pb.go index 91dc361f6a61..c11071b3076d 100755 --- a/apphub/apiv1/apphubpb/service_project_attachment.pb.go +++ b/apphub/apiv1/apphubpb/service_project_attachment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/service_project_attachment.proto @@ -124,11 +124,9 @@ type ServiceProjectAttachment struct { func (x *ServiceProjectAttachment) Reset() { *x = ServiceProjectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_service_project_attachment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_service_project_attachment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceProjectAttachment) String() string { @@ -139,7 +137,7 @@ func (*ServiceProjectAttachment) ProtoMessage() {} func (x *ServiceProjectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_service_project_attachment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,20 +290,6 @@ func file_google_cloud_apphub_v1_service_project_attachment_proto_init() { if File_google_cloud_apphub_v1_service_project_attachment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_service_project_attachment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServiceProjectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/apphubpb/workload.pb.go b/apphub/apiv1/apphubpb/workload.pb.go index 133f992ee08a..42c952d24869 100755 --- a/apphub/apiv1/apphubpb/workload.pb.go +++ b/apphub/apiv1/apphubpb/workload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/apphub/v1/workload.proto @@ -139,11 +139,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -154,7 +152,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +256,9 @@ type WorkloadReference struct { func (x *WorkloadReference) Reset() { *x = WorkloadReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadReference) String() string { @@ -273,7 +269,7 @@ func (*WorkloadReference) ProtoMessage() {} func (x *WorkloadReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +310,9 @@ type WorkloadProperties struct { func (x *WorkloadProperties) Reset() { *x = WorkloadProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadProperties) String() string { @@ -329,7 +323,7 @@ func (*WorkloadProperties) ProtoMessage() {} func (x *WorkloadProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +381,9 @@ type DiscoveredWorkload struct { func (x *DiscoveredWorkload) Reset() { *x = DiscoveredWorkload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveredWorkload) String() string { @@ -402,7 +394,7 @@ func (*DiscoveredWorkload) ProtoMessage() {} func (x *DiscoveredWorkload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_apphub_v1_workload_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,56 +602,6 @@ func file_google_cloud_apphub_v1_workload_proto_init() { return } file_google_cloud_apphub_v1_attributes_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_apphub_v1_workload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_workload_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_workload_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_apphub_v1_workload_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveredWorkload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apphub/apiv1/helpers.go b/apphub/apiv1/helpers.go index 204227107fbc..8c8258f996b1 100755 --- a/apphub/apiv1/helpers.go +++ b/apphub/apiv1/helpers.go @@ -18,10 +18,20 @@ package apphub import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "apphub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apps/events/subscriptions/apiv1/helpers.go b/apps/events/subscriptions/apiv1/helpers.go index a59f050c51f2..9e723e668639 100755 --- a/apps/events/subscriptions/apiv1/helpers.go +++ b/apps/events/subscriptions/apiv1/helpers.go @@ -18,10 +18,20 @@ package subscriptions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workspaceevents.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -52,3 +62,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/meetings.space.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apps/events/subscriptions/apiv1/subscriptions_client.go b/apps/events/subscriptions/apiv1/subscriptions_client.go index 2694e24eda39..38aab59de58f 100755 --- a/apps/events/subscriptions/apiv1/subscriptions_client.go +++ b/apps/events/subscriptions/apiv1/subscriptions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new subscriptions service client based on gRPC. @@ -355,6 +356,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: subscriptionspb.NewSubscriptionsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -418,6 +420,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new subscriptions service rest client. @@ -435,6 +439,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -494,7 +499,7 @@ func (c *gRPCClient) CreateSubscription(ctx context.Context, req *subscriptionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSubscription, req, settings.GRPC, c.logger, "CreateSubscription") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *gRPCClient) DeleteSubscription(ctx context.Context, req *subscriptionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSubscription, req, settings.GRPC, c.logger, "DeleteSubscription") return err }, opts...) if err != nil { @@ -534,7 +539,7 @@ func (c *gRPCClient) GetSubscription(ctx context.Context, req *subscriptionspb.G var resp *subscriptionspb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSubscription, req, settings.GRPC, c.logger, "GetSubscription") return err }, opts...) if err != nil { @@ -560,7 +565,7 @@ func (c *gRPCClient) ListSubscriptions(ctx context.Context, req *subscriptionspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSubscriptions, req, settings.GRPC, c.logger, "ListSubscriptions") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *gRPCClient) UpdateSubscription(ctx context.Context, req *subscriptionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSubscription, req, settings.GRPC, c.logger, "UpdateSubscription") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *gRPCClient) ReactivateSubscription(ctx context.Context, req *subscripti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReactivateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReactivateSubscription, req, settings.GRPC, c.logger, "ReactivateSubscription") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -685,21 +690,10 @@ func (c *restClient) CreateSubscription(ctx context.Context, req *subscriptionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -760,21 +754,10 @@ func (c *restClient) DeleteSubscription(ctx context.Context, req *subscriptionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -827,17 +810,7 @@ func (c *restClient) GetSubscription(ctx context.Context, req *subscriptionspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubscription") if err != nil { return err } @@ -902,21 +875,10 @@ func (c *restClient) ListSubscriptions(ctx context.Context, req *subscriptionspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubscriptions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -997,21 +959,10 @@ func (c *restClient) UpdateSubscription(ctx context.Context, req *subscriptionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1073,21 +1024,10 @@ func (c *restClient) ReactivateSubscription(ctx context.Context, req *subscripti httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReactivateSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1138,17 +1078,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/apps/events/subscriptions/apiv1/subscriptions_client_example_go123_test.go b/apps/events/subscriptions/apiv1/subscriptions_client_example_go123_test.go index 2890852ec07f..f84d9156cf77 100644 --- a/apps/events/subscriptions/apiv1/subscriptions_client_example_go123_test.go +++ b/apps/events/subscriptions/apiv1/subscriptions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListSubscriptions_all() { } for resp, err := range c.ListSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apps/events/subscriptions/apiv1/subscriptionspb/subscription_resource.pb.go b/apps/events/subscriptions/apiv1/subscriptionspb/subscription_resource.pb.go index 7f41e0af2e62..884ffd5b034a 100755 --- a/apps/events/subscriptions/apiv1/subscriptionspb/subscription_resource.pb.go +++ b/apps/events/subscriptions/apiv1/subscriptionspb/subscription_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/events/subscriptions/v1/subscription_resource.proto @@ -291,11 +291,9 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription) String() string { @@ -306,7 +304,7 @@ func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +478,9 @@ type PayloadOptions struct { func (x *PayloadOptions) Reset() { *x = PayloadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PayloadOptions) String() string { @@ -495,7 +491,7 @@ func (*PayloadOptions) ProtoMessage() {} func (x *PayloadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +534,9 @@ type NotificationEndpoint struct { func (x *NotificationEndpoint) Reset() { *x = NotificationEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationEndpoint) String() string { @@ -553,7 +547,7 @@ func (*NotificationEndpoint) ProtoMessage() {} func (x *NotificationEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,44 +792,6 @@ func file_google_apps_events_subscriptions_v1_subscription_resource_proto_init() if File_google_apps_events_subscriptions_v1_subscription_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PayloadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NotificationEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_apps_events_subscriptions_v1_subscription_resource_proto_msgTypes[0].OneofWrappers = []any{ (*Subscription_ExpireTime)(nil), (*Subscription_Ttl)(nil), diff --git a/apps/events/subscriptions/apiv1/subscriptionspb/subscriptions_service.pb.go b/apps/events/subscriptions/apiv1/subscriptionspb/subscriptions_service.pb.go index 6e4cc614678b..1a4c6a823832 100755 --- a/apps/events/subscriptions/apiv1/subscriptionspb/subscriptions_service.pb.go +++ b/apps/events/subscriptions/apiv1/subscriptionspb/subscriptions_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/events/subscriptions/v1/subscriptions_service.proto @@ -59,11 +59,9 @@ type CreateSubscriptionRequest struct { func (x *CreateSubscriptionRequest) Reset() { *x = CreateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubscriptionRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateSubscriptionRequest) ProtoMessage() {} func (x *CreateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type DeleteSubscriptionRequest struct { func (x *DeleteSubscriptionRequest) Reset() { *x = DeleteSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubscriptionRequest) String() string { @@ -144,7 +140,7 @@ func (*DeleteSubscriptionRequest) ProtoMessage() {} func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type GetSubscriptionRequest struct { func (x *GetSubscriptionRequest) Reset() { *x = GetSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubscriptionRequest) String() string { @@ -217,7 +211,7 @@ func (*GetSubscriptionRequest) ProtoMessage() {} func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +264,9 @@ type UpdateSubscriptionRequest struct { func (x *UpdateSubscriptionRequest) Reset() { *x = UpdateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubscriptionRequest) String() string { @@ -285,7 +277,7 @@ func (*UpdateSubscriptionRequest) ProtoMessage() {} func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +328,9 @@ type ReactivateSubscriptionRequest struct { func (x *ReactivateSubscriptionRequest) Reset() { *x = ReactivateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactivateSubscriptionRequest) String() string { @@ -351,7 +341,7 @@ func (*ReactivateSubscriptionRequest) ProtoMessage() {} func (x *ReactivateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +421,9 @@ type ListSubscriptionsRequest struct { func (x *ListSubscriptionsRequest) Reset() { *x = ListSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsRequest) String() string { @@ -446,7 +434,7 @@ func (*ListSubscriptionsRequest) ProtoMessage() {} func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +486,9 @@ type ListSubscriptionsResponse struct { func (x *ListSubscriptionsResponse) Reset() { *x = ListSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsResponse) String() string { @@ -513,7 +499,7 @@ func (*ListSubscriptionsResponse) ProtoMessage() {} func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +537,9 @@ type UpdateSubscriptionMetadata struct { func (x *UpdateSubscriptionMetadata) Reset() { *x = UpdateSubscriptionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubscriptionMetadata) String() string { @@ -566,7 +550,7 @@ func (*UpdateSubscriptionMetadata) ProtoMessage() {} func (x *UpdateSubscriptionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +574,9 @@ type CreateSubscriptionMetadata struct { func (x *CreateSubscriptionMetadata) Reset() { *x = CreateSubscriptionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubscriptionMetadata) String() string { @@ -605,7 +587,7 @@ func (*CreateSubscriptionMetadata) ProtoMessage() {} func (x *CreateSubscriptionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +611,9 @@ type DeleteSubscriptionMetadata struct { func (x *DeleteSubscriptionMetadata) Reset() { *x = DeleteSubscriptionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubscriptionMetadata) String() string { @@ -644,7 +624,7 @@ func (*DeleteSubscriptionMetadata) ProtoMessage() {} func (x *DeleteSubscriptionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +648,9 @@ type ReactivateSubscriptionMetadata struct { func (x *ReactivateSubscriptionMetadata) Reset() { *x = ReactivateSubscriptionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactivateSubscriptionMetadata) String() string { @@ -683,7 +661,7 @@ func (*ReactivateSubscriptionMetadata) ProtoMessage() {} func (x *ReactivateSubscriptionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1001,140 +979,6 @@ func file_google_apps_events_subscriptions_v1_subscriptions_service_proto_init() return } file_google_apps_events_subscriptions_v1_subscription_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReactivateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubscriptionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubscriptionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubscriptionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_events_subscriptions_v1_subscriptions_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ReactivateSubscriptionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apps/meet/apiv2/conference_records_client.go b/apps/meet/apiv2/conference_records_client.go index 09d2ea343436..a02042bbe9d6 100755 --- a/apps/meet/apiv2/conference_records_client.go +++ b/apps/meet/apiv2/conference_records_client.go @@ -19,7 +19,7 @@ package meet import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( meetpb "cloud.google.com/go/apps/meet/apiv2/meetpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -506,6 +505,8 @@ type conferenceRecordsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConferenceRecordsClient creates a new conference records service client based on gRPC. @@ -532,6 +533,7 @@ func NewConferenceRecordsClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, conferenceRecordsClient: meetpb.NewConferenceRecordsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -578,6 +580,8 @@ type conferenceRecordsRESTClient struct { // Points back to the CallOptions field of the containing ConferenceRecordsClient CallOptions **ConferenceRecordsCallOptions + + logger *slog.Logger } // NewConferenceRecordsRESTClient creates a new conference records service rest client. @@ -595,6 +599,7 @@ func NewConferenceRecordsRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -647,7 +652,7 @@ func (c *conferenceRecordsGRPCClient) GetConferenceRecord(ctx context.Context, r var resp *meetpb.ConferenceRecord err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetConferenceRecord(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetConferenceRecord, req, settings.GRPC, c.logger, "GetConferenceRecord") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *conferenceRecordsGRPCClient) ListConferenceRecords(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListConferenceRecords(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListConferenceRecords, req, settings.GRPC, c.logger, "ListConferenceRecords") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *conferenceRecordsGRPCClient) GetParticipant(ctx context.Context, req *m var resp *meetpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetParticipant, req, settings.GRPC, c.logger, "GetParticipant") return err }, opts...) if err != nil { @@ -737,7 +742,7 @@ func (c *conferenceRecordsGRPCClient) ListParticipants(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListParticipants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListParticipants, req, settings.GRPC, c.logger, "ListParticipants") return err }, opts...) if err != nil { @@ -772,7 +777,7 @@ func (c *conferenceRecordsGRPCClient) GetParticipantSession(ctx context.Context, var resp *meetpb.ParticipantSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetParticipantSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetParticipantSession, req, settings.GRPC, c.logger, "GetParticipantSession") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *conferenceRecordsGRPCClient) ListParticipantSessions(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListParticipantSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListParticipantSessions, req, settings.GRPC, c.logger, "ListParticipantSessions") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *conferenceRecordsGRPCClient) GetRecording(ctx context.Context, req *mee var resp *meetpb.Recording err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetRecording(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetRecording, req, settings.GRPC, c.logger, "GetRecording") return err }, opts...) if err != nil { @@ -865,7 +870,7 @@ func (c *conferenceRecordsGRPCClient) ListRecordings(ctx context.Context, req *m } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListRecordings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListRecordings, req, settings.GRPC, c.logger, "ListRecordings") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *conferenceRecordsGRPCClient) GetTranscript(ctx context.Context, req *me var resp *meetpb.Transcript err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetTranscript(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetTranscript, req, settings.GRPC, c.logger, "GetTranscript") return err }, opts...) if err != nil { @@ -929,7 +934,7 @@ func (c *conferenceRecordsGRPCClient) ListTranscripts(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListTranscripts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListTranscripts, req, settings.GRPC, c.logger, "ListTranscripts") return err }, opts...) if err != nil { @@ -964,7 +969,7 @@ func (c *conferenceRecordsGRPCClient) GetTranscriptEntry(ctx context.Context, re var resp *meetpb.TranscriptEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetTranscriptEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetTranscriptEntry, req, settings.GRPC, c.logger, "GetTranscriptEntry") return err }, opts...) if err != nil { @@ -993,7 +998,7 @@ func (c *conferenceRecordsGRPCClient) ListTranscriptEntries(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListTranscriptEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListTranscriptEntries, req, settings.GRPC, c.logger, "ListTranscriptEntries") return err }, opts...) if err != nil { @@ -1052,17 +1057,7 @@ func (c *conferenceRecordsRESTClient) GetConferenceRecord(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConferenceRecord") if err != nil { return err } @@ -1128,21 +1123,10 @@ func (c *conferenceRecordsRESTClient) ListConferenceRecords(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConferenceRecords") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1205,17 +1189,7 @@ func (c *conferenceRecordsRESTClient) GetParticipant(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipant") if err != nil { return err } @@ -1283,21 +1257,10 @@ func (c *conferenceRecordsRESTClient) ListParticipants(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipants") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1360,17 +1323,7 @@ func (c *conferenceRecordsRESTClient) GetParticipantSession(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipantSession") if err != nil { return err } @@ -1439,21 +1392,10 @@ func (c *conferenceRecordsRESTClient) ListParticipantSessions(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipantSessions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1516,17 +1458,7 @@ func (c *conferenceRecordsRESTClient) GetRecording(ctx context.Context, req *mee httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecording") if err != nil { return err } @@ -1589,21 +1521,10 @@ func (c *conferenceRecordsRESTClient) ListRecordings(ctx context.Context, req *m } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecordings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1666,17 +1587,7 @@ func (c *conferenceRecordsRESTClient) GetTranscript(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTranscript") if err != nil { return err } @@ -1739,21 +1650,10 @@ func (c *conferenceRecordsRESTClient) ListTranscripts(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTranscripts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1820,17 +1720,7 @@ func (c *conferenceRecordsRESTClient) GetTranscriptEntry(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTranscriptEntry") if err != nil { return err } @@ -1897,21 +1787,10 @@ func (c *conferenceRecordsRESTClient) ListTranscriptEntries(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTranscriptEntries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apps/meet/apiv2/conference_records_client_example_go123_test.go b/apps/meet/apiv2/conference_records_client_example_go123_test.go index b640943aadf8..53c38877bd34 100644 --- a/apps/meet/apiv2/conference_records_client_example_go123_test.go +++ b/apps/meet/apiv2/conference_records_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleConferenceRecordsClient_ListConferenceRecords_all() { } for resp, err := range c.ListConferenceRecords(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleConferenceRecordsClient_ListParticipantSessions_all() { } for resp, err := range c.ListParticipantSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleConferenceRecordsClient_ListParticipants_all() { } for resp, err := range c.ListParticipants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleConferenceRecordsClient_ListRecordings_all() { } for resp, err := range c.ListRecordings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleConferenceRecordsClient_ListTranscriptEntries_all() { } for resp, err := range c.ListTranscriptEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleConferenceRecordsClient_ListTranscripts_all() { } for resp, err := range c.ListTranscripts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apps/meet/apiv2/helpers.go b/apps/meet/apiv2/helpers.go index 435a7b34ce10..86e836d61a37 100755 --- a/apps/meet/apiv2/helpers.go +++ b/apps/meet/apiv2/helpers.go @@ -18,10 +18,20 @@ package meet import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "meet.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/meetings.space.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apps/meet/apiv2/meetpb/resource.pb.go b/apps/meet/apiv2/meetpb/resource.pb.go index 5b4f5f41028b..1423d9f58394 100755 --- a/apps/meet/apiv2/meetpb/resource.pb.go +++ b/apps/meet/apiv2/meetpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/meet/v2/resource.proto @@ -295,11 +295,9 @@ type Space struct { func (x *Space) Reset() { *x = Space{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space) String() string { @@ -310,7 +308,7 @@ func (*Space) ProtoMessage() {} func (x *Space) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +372,9 @@ type ActiveConference struct { func (x *ActiveConference) Reset() { *x = ActiveConference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActiveConference) String() string { @@ -389,7 +385,7 @@ func (*ActiveConference) ProtoMessage() {} func (x *ActiveConference) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +425,9 @@ type SpaceConfig struct { func (x *SpaceConfig) Reset() { *x = SpaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceConfig) String() string { @@ -444,7 +438,7 @@ func (*SpaceConfig) ProtoMessage() {} func (x *SpaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +492,9 @@ type ConferenceRecord struct { func (x *ConferenceRecord) Reset() { *x = ConferenceRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConferenceRecord) String() string { @@ -513,7 +505,7 @@ func (*ConferenceRecord) ProtoMessage() {} func (x *ConferenceRecord) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +579,9 @@ type Participant struct { func (x *Participant) Reset() { *x = Participant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Participant) String() string { @@ -602,7 +592,7 @@ func (*Participant) ProtoMessage() {} func (x *Participant) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +702,9 @@ type ParticipantSession struct { func (x *ParticipantSession) Reset() { *x = ParticipantSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParticipantSession) String() string { @@ -727,7 +715,7 @@ func (*ParticipantSession) ProtoMessage() {} func (x *ParticipantSession) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +771,9 @@ type SignedinUser struct { func (x *SignedinUser) Reset() { *x = SignedinUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedinUser) String() string { @@ -798,7 +784,7 @@ func (*SignedinUser) ProtoMessage() {} func (x *SignedinUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +825,9 @@ type AnonymousUser struct { func (x *AnonymousUser) Reset() { *x = AnonymousUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnonymousUser) String() string { @@ -854,7 +838,7 @@ func (*AnonymousUser) ProtoMessage() {} func (x *AnonymousUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +873,9 @@ type PhoneUser struct { func (x *PhoneUser) Reset() { *x = PhoneUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhoneUser) String() string { @@ -904,7 +886,7 @@ func (*PhoneUser) ProtoMessage() {} func (x *PhoneUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +933,9 @@ type Recording struct { func (x *Recording) Reset() { *x = Recording{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recording) String() string { @@ -966,7 +946,7 @@ func (*Recording) ProtoMessage() {} func (x *Recording) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1055,11 +1035,9 @@ type DriveDestination struct { func (x *DriveDestination) Reset() { *x = DriveDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DriveDestination) String() string { @@ -1070,7 +1048,7 @@ func (*DriveDestination) ProtoMessage() {} func (x *DriveDestination) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1103,9 @@ type Transcript struct { func (x *Transcript) Reset() { *x = Transcript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transcript) String() string { @@ -1140,7 +1116,7 @@ func (*Transcript) ProtoMessage() {} func (x *Transcript) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,11 +1204,9 @@ type DocsDestination struct { func (x *DocsDestination) Reset() { *x = DocsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocsDestination) String() string { @@ -1243,7 +1217,7 @@ func (*DocsDestination) ProtoMessage() {} func (x *DocsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1271,9 @@ type TranscriptEntry struct { func (x *TranscriptEntry) Reset() { *x = TranscriptEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_resource_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_resource_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptEntry) String() string { @@ -1312,7 +1284,7 @@ func (*TranscriptEntry) ProtoMessage() {} func (x *TranscriptEntry) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_resource_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,176 +1689,6 @@ func file_google_apps_meet_v2_resource_proto_init() { if File_google_apps_meet_v2_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_apps_meet_v2_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Space); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ActiveConference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConferenceRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Participant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ParticipantSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SignedinUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AnonymousUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PhoneUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Recording); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DriveDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Transcript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DocsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_resource_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_apps_meet_v2_resource_proto_msgTypes[4].OneofWrappers = []any{ (*Participant_SignedinUser)(nil), (*Participant_AnonymousUser)(nil), diff --git a/apps/meet/apiv2/meetpb/service.pb.go b/apps/meet/apiv2/meetpb/service.pb.go index 4feb0eecc3cf..7439a5df9b96 100755 --- a/apps/meet/apiv2/meetpb/service.pb.go +++ b/apps/meet/apiv2/meetpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/meet/v2/service.proto @@ -55,11 +55,9 @@ type CreateSpaceRequest struct { func (x *CreateSpaceRequest) Reset() { *x = CreateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpaceRequest) String() string { @@ -70,7 +68,7 @@ func (*CreateSpaceRequest) ProtoMessage() {} func (x *CreateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104,11 +102,9 @@ type GetSpaceRequest struct { func (x *GetSpaceRequest) Reset() { *x = GetSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpaceRequest) String() string { @@ -119,7 +115,7 @@ func (*GetSpaceRequest) ProtoMessage() {} func (x *GetSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,11 +154,9 @@ type UpdateSpaceRequest struct { func (x *UpdateSpaceRequest) Reset() { *x = UpdateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpaceRequest) String() string { @@ -173,7 +167,7 @@ func (*UpdateSpaceRequest) ProtoMessage() {} func (x *UpdateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +208,9 @@ type EndActiveConferenceRequest struct { func (x *EndActiveConferenceRequest) Reset() { *x = EndActiveConferenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndActiveConferenceRequest) String() string { @@ -229,7 +221,7 @@ func (*EndActiveConferenceRequest) ProtoMessage() {} func (x *EndActiveConferenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +255,9 @@ type GetConferenceRecordRequest struct { func (x *GetConferenceRecordRequest) Reset() { *x = GetConferenceRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConferenceRecordRequest) String() string { @@ -278,7 +268,7 @@ func (*GetConferenceRecordRequest) ProtoMessage() {} func (x *GetConferenceRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +318,9 @@ type ListConferenceRecordsRequest struct { func (x *ListConferenceRecordsRequest) Reset() { *x = ListConferenceRecordsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConferenceRecordsRequest) String() string { @@ -343,7 +331,7 @@ func (*ListConferenceRecordsRequest) ProtoMessage() {} func (x *ListConferenceRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +382,9 @@ type ListConferenceRecordsResponse struct { func (x *ListConferenceRecordsResponse) Reset() { *x = ListConferenceRecordsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConferenceRecordsResponse) String() string { @@ -409,7 +395,7 @@ func (*ListConferenceRecordsResponse) ProtoMessage() {} func (x *ListConferenceRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +436,9 @@ type GetParticipantRequest struct { func (x *GetParticipantRequest) Reset() { *x = GetParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantRequest) String() string { @@ -465,7 +449,7 @@ func (*GetParticipantRequest) ProtoMessage() {} func (x *GetParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +501,9 @@ type ListParticipantsRequest struct { func (x *ListParticipantsRequest) Reset() { *x = ListParticipantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsRequest) String() string { @@ -532,7 +514,7 @@ func (*ListParticipantsRequest) ProtoMessage() {} func (x *ListParticipantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +577,9 @@ type ListParticipantsResponse struct { func (x *ListParticipantsResponse) Reset() { *x = ListParticipantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsResponse) String() string { @@ -610,7 +590,7 @@ func (*ListParticipantsResponse) ProtoMessage() {} func (x *ListParticipantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +638,9 @@ type GetParticipantSessionRequest struct { func (x *GetParticipantSessionRequest) Reset() { *x = GetParticipantSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantSessionRequest) String() string { @@ -673,7 +651,7 @@ func (*GetParticipantSessionRequest) ProtoMessage() {} func (x *GetParticipantSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +704,9 @@ type ListParticipantSessionsRequest struct { func (x *ListParticipantSessionsRequest) Reset() { *x = ListParticipantSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantSessionsRequest) String() string { @@ -741,7 +717,7 @@ func (*ListParticipantSessionsRequest) ProtoMessage() {} func (x *ListParticipantSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +775,9 @@ type ListParticipantSessionsResponse struct { func (x *ListParticipantSessionsResponse) Reset() { *x = ListParticipantSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantSessionsResponse) String() string { @@ -814,7 +788,7 @@ func (*ListParticipantSessionsResponse) ProtoMessage() {} func (x *ListParticipantSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -855,11 +829,9 @@ type GetRecordingRequest struct { func (x *GetRecordingRequest) Reset() { *x = GetRecordingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecordingRequest) String() string { @@ -870,7 +842,7 @@ func (*GetRecordingRequest) ProtoMessage() {} func (x *GetRecordingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,11 +884,9 @@ type ListRecordingsRequest struct { func (x *ListRecordingsRequest) Reset() { *x = ListRecordingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecordingsRequest) String() string { @@ -927,7 +897,7 @@ func (*ListRecordingsRequest) ProtoMessage() {} func (x *ListRecordingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +948,9 @@ type ListRecordingsResponse struct { func (x *ListRecordingsResponse) Reset() { *x = ListRecordingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecordingsResponse) String() string { @@ -993,7 +961,7 @@ func (*ListRecordingsResponse) ProtoMessage() {} func (x *ListRecordingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1034,11 +1002,9 @@ type GetTranscriptRequest struct { func (x *GetTranscriptRequest) Reset() { *x = GetTranscriptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTranscriptRequest) String() string { @@ -1049,7 +1015,7 @@ func (*GetTranscriptRequest) ProtoMessage() {} func (x *GetTranscriptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1057,9 @@ type ListTranscriptsRequest struct { func (x *ListTranscriptsRequest) Reset() { *x = ListTranscriptsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptsRequest) String() string { @@ -1106,7 +1070,7 @@ func (*ListTranscriptsRequest) ProtoMessage() {} func (x *ListTranscriptsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1121,9 @@ type ListTranscriptsResponse struct { func (x *ListTranscriptsResponse) Reset() { *x = ListTranscriptsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptsResponse) String() string { @@ -1172,7 +1134,7 @@ func (*ListTranscriptsResponse) ProtoMessage() {} func (x *ListTranscriptsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1175,9 @@ type GetTranscriptEntryRequest struct { func (x *GetTranscriptEntryRequest) Reset() { *x = GetTranscriptEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTranscriptEntryRequest) String() string { @@ -1228,7 +1188,7 @@ func (*GetTranscriptEntryRequest) ProtoMessage() {} func (x *GetTranscriptEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1271,11 +1231,9 @@ type ListTranscriptEntriesRequest struct { func (x *ListTranscriptEntriesRequest) Reset() { *x = ListTranscriptEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptEntriesRequest) String() string { @@ -1286,7 +1244,7 @@ func (*ListTranscriptEntriesRequest) ProtoMessage() {} func (x *ListTranscriptEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1337,11 +1295,9 @@ type ListTranscriptEntriesResponse struct { func (x *ListTranscriptEntriesResponse) Reset() { *x = ListTranscriptEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptEntriesResponse) String() string { @@ -1352,7 +1308,7 @@ func (*ListTranscriptEntriesResponse) ProtoMessage() {} func (x *ListTranscriptEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1877,272 +1833,6 @@ func file_google_apps_meet_v2_service_proto_init() { return } file_google_apps_meet_v2_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_apps_meet_v2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EndActiveConferenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetConferenceRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListConferenceRecordsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConferenceRecordsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetRecordingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListRecordingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListRecordingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetTranscriptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTranscriptEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apps/meet/apiv2/spaces_client.go b/apps/meet/apiv2/spaces_client.go index 64a92dc1f6db..71e7861aed54 100755 --- a/apps/meet/apiv2/spaces_client.go +++ b/apps/meet/apiv2/spaces_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( meetpb "cloud.google.com/go/apps/meet/apiv2/meetpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -195,6 +194,8 @@ type spacesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpacesClient creates a new spaces service client based on gRPC. @@ -221,6 +222,7 @@ func NewSpacesClient(ctx context.Context, opts ...option.ClientOption) (*SpacesC connPool: connPool, spacesClient: meetpb.NewSpacesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -267,6 +269,8 @@ type spacesRESTClient struct { // Points back to the CallOptions field of the containing SpacesClient CallOptions **SpacesCallOptions + + logger *slog.Logger } // NewSpacesRESTClient creates a new spaces service rest client. @@ -284,6 +288,7 @@ func NewSpacesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Spa endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -333,7 +338,7 @@ func (c *spacesGRPCClient) CreateSpace(ctx context.Context, req *meetpb.CreateSp var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.CreateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.CreateSpace, req, settings.GRPC, c.logger, "CreateSpace") return err }, opts...) if err != nil { @@ -351,7 +356,7 @@ func (c *spacesGRPCClient) GetSpace(ctx context.Context, req *meetpb.GetSpaceReq var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.GetSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.GetSpace, req, settings.GRPC, c.logger, "GetSpace") return err }, opts...) if err != nil { @@ -369,7 +374,7 @@ func (c *spacesGRPCClient) UpdateSpace(ctx context.Context, req *meetpb.UpdateSp var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.UpdateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.UpdateSpace, req, settings.GRPC, c.logger, "UpdateSpace") return err }, opts...) if err != nil { @@ -386,7 +391,7 @@ func (c *spacesGRPCClient) EndActiveConference(ctx context.Context, req *meetpb. opts = append((*c.CallOptions).EndActiveConference[0:len((*c.CallOptions).EndActiveConference):len((*c.CallOptions).EndActiveConference)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.spacesClient.EndActiveConference(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.spacesClient.EndActiveConference, req, settings.GRPC, c.logger, "EndActiveConference") return err }, opts...) return err @@ -429,17 +434,7 @@ func (c *spacesRESTClient) CreateSpace(ctx context.Context, req *meetpb.CreateSp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpace") if err != nil { return err } @@ -489,17 +484,7 @@ func (c *spacesRESTClient) GetSpace(ctx context.Context, req *meetpb.GetSpaceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpace") if err != nil { return err } @@ -563,17 +548,7 @@ func (c *spacesRESTClient) UpdateSpace(ctx context.Context, req *meetpb.UpdateSp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpace") if err != nil { return err } @@ -626,14 +601,7 @@ func (c *spacesRESTClient) EndActiveConference(ctx context.Context, req *meetpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EndActiveConference") + return err }, opts...) } diff --git a/apps/meet/apiv2beta/conference_records_client.go b/apps/meet/apiv2beta/conference_records_client.go index a571a51b832a..a387ddb1aa80 100755 --- a/apps/meet/apiv2beta/conference_records_client.go +++ b/apps/meet/apiv2beta/conference_records_client.go @@ -19,7 +19,7 @@ package meet import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( meetpb "cloud.google.com/go/apps/meet/apiv2beta/meetpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -515,6 +514,8 @@ type conferenceRecordsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConferenceRecordsClient creates a new conference records service client based on gRPC. @@ -541,6 +542,7 @@ func NewConferenceRecordsClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, conferenceRecordsClient: meetpb.NewConferenceRecordsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -587,6 +589,8 @@ type conferenceRecordsRESTClient struct { // Points back to the CallOptions field of the containing ConferenceRecordsClient CallOptions **ConferenceRecordsCallOptions + + logger *slog.Logger } // NewConferenceRecordsRESTClient creates a new conference records service rest client. @@ -604,6 +608,7 @@ func NewConferenceRecordsRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -656,7 +661,7 @@ func (c *conferenceRecordsGRPCClient) GetConferenceRecord(ctx context.Context, r var resp *meetpb.ConferenceRecord err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetConferenceRecord(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetConferenceRecord, req, settings.GRPC, c.logger, "GetConferenceRecord") return err }, opts...) if err != nil { @@ -682,7 +687,7 @@ func (c *conferenceRecordsGRPCClient) ListConferenceRecords(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListConferenceRecords(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListConferenceRecords, req, settings.GRPC, c.logger, "ListConferenceRecords") return err }, opts...) if err != nil { @@ -717,7 +722,7 @@ func (c *conferenceRecordsGRPCClient) GetParticipant(ctx context.Context, req *m var resp *meetpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetParticipant, req, settings.GRPC, c.logger, "GetParticipant") return err }, opts...) if err != nil { @@ -746,7 +751,7 @@ func (c *conferenceRecordsGRPCClient) ListParticipants(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListParticipants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListParticipants, req, settings.GRPC, c.logger, "ListParticipants") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *conferenceRecordsGRPCClient) GetParticipantSession(ctx context.Context, var resp *meetpb.ParticipantSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetParticipantSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetParticipantSession, req, settings.GRPC, c.logger, "GetParticipantSession") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *conferenceRecordsGRPCClient) ListParticipantSessions(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListParticipantSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListParticipantSessions, req, settings.GRPC, c.logger, "ListParticipantSessions") return err }, opts...) if err != nil { @@ -845,7 +850,7 @@ func (c *conferenceRecordsGRPCClient) GetRecording(ctx context.Context, req *mee var resp *meetpb.Recording err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetRecording(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetRecording, req, settings.GRPC, c.logger, "GetRecording") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *conferenceRecordsGRPCClient) ListRecordings(ctx context.Context, req *m } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListRecordings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListRecordings, req, settings.GRPC, c.logger, "ListRecordings") return err }, opts...) if err != nil { @@ -909,7 +914,7 @@ func (c *conferenceRecordsGRPCClient) GetTranscript(ctx context.Context, req *me var resp *meetpb.Transcript err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetTranscript(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetTranscript, req, settings.GRPC, c.logger, "GetTranscript") return err }, opts...) if err != nil { @@ -938,7 +943,7 @@ func (c *conferenceRecordsGRPCClient) ListTranscripts(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListTranscripts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListTranscripts, req, settings.GRPC, c.logger, "ListTranscripts") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *conferenceRecordsGRPCClient) GetTranscriptEntry(ctx context.Context, re var resp *meetpb.TranscriptEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.GetTranscriptEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.GetTranscriptEntry, req, settings.GRPC, c.logger, "GetTranscriptEntry") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *conferenceRecordsGRPCClient) ListTranscriptEntries(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conferenceRecordsClient.ListTranscriptEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conferenceRecordsClient.ListTranscriptEntries, req, settings.GRPC, c.logger, "ListTranscriptEntries") return err }, opts...) if err != nil { @@ -1062,17 +1067,7 @@ func (c *conferenceRecordsRESTClient) GetConferenceRecord(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConferenceRecord") if err != nil { return err } @@ -1138,21 +1133,10 @@ func (c *conferenceRecordsRESTClient) ListConferenceRecords(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConferenceRecords") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1216,17 +1200,7 @@ func (c *conferenceRecordsRESTClient) GetParticipant(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipant") if err != nil { return err } @@ -1295,21 +1269,10 @@ func (c *conferenceRecordsRESTClient) ListParticipants(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipants") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1373,17 +1336,7 @@ func (c *conferenceRecordsRESTClient) GetParticipantSession(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipantSession") if err != nil { return err } @@ -1453,21 +1406,10 @@ func (c *conferenceRecordsRESTClient) ListParticipantSessions(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipantSessions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1531,17 +1473,7 @@ func (c *conferenceRecordsRESTClient) GetRecording(ctx context.Context, req *mee httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecording") if err != nil { return err } @@ -1604,21 +1536,10 @@ func (c *conferenceRecordsRESTClient) ListRecordings(ctx context.Context, req *m } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecordings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1682,17 +1603,7 @@ func (c *conferenceRecordsRESTClient) GetTranscript(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTranscript") if err != nil { return err } @@ -1755,21 +1666,10 @@ func (c *conferenceRecordsRESTClient) ListTranscripts(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTranscripts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1837,17 +1737,7 @@ func (c *conferenceRecordsRESTClient) GetTranscriptEntry(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTranscriptEntry") if err != nil { return err } @@ -1915,21 +1805,10 @@ func (c *conferenceRecordsRESTClient) ListTranscriptEntries(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTranscriptEntries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/apps/meet/apiv2beta/conference_records_client_example_go123_test.go b/apps/meet/apiv2beta/conference_records_client_example_go123_test.go index 607a8cba1981..35413ade3d4a 100644 --- a/apps/meet/apiv2beta/conference_records_client_example_go123_test.go +++ b/apps/meet/apiv2beta/conference_records_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleConferenceRecordsClient_ListConferenceRecords_all() { } for resp, err := range c.ListConferenceRecords(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleConferenceRecordsClient_ListParticipantSessions_all() { } for resp, err := range c.ListParticipantSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleConferenceRecordsClient_ListParticipants_all() { } for resp, err := range c.ListParticipants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleConferenceRecordsClient_ListRecordings_all() { } for resp, err := range c.ListRecordings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleConferenceRecordsClient_ListTranscriptEntries_all() { } for resp, err := range c.ListTranscriptEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleConferenceRecordsClient_ListTranscripts_all() { } for resp, err := range c.ListTranscripts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/apps/meet/apiv2beta/helpers.go b/apps/meet/apiv2beta/helpers.go index ec93c54ab2fb..2c170dee662a 100755 --- a/apps/meet/apiv2beta/helpers.go +++ b/apps/meet/apiv2beta/helpers.go @@ -18,10 +18,20 @@ package meet import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "meet.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apps/meet/apiv2beta/meetpb/resource.pb.go b/apps/meet/apiv2beta/meetpb/resource.pb.go index 9b23aaf07f53..e4331ac670a3 100755 --- a/apps/meet/apiv2beta/meetpb/resource.pb.go +++ b/apps/meet/apiv2beta/meetpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/meet/v2beta/resource.proto @@ -296,11 +296,9 @@ type Space struct { func (x *Space) Reset() { *x = Space{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space) String() string { @@ -311,7 +309,7 @@ func (*Space) ProtoMessage() {} func (x *Space) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +373,9 @@ type ActiveConference struct { func (x *ActiveConference) Reset() { *x = ActiveConference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActiveConference) String() string { @@ -390,7 +386,7 @@ func (*ActiveConference) ProtoMessage() {} func (x *ActiveConference) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +426,9 @@ type SpaceConfig struct { func (x *SpaceConfig) Reset() { *x = SpaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceConfig) String() string { @@ -445,7 +439,7 @@ func (*SpaceConfig) ProtoMessage() {} func (x *SpaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,11 +494,9 @@ type ConferenceRecord struct { func (x *ConferenceRecord) Reset() { *x = ConferenceRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConferenceRecord) String() string { @@ -515,7 +507,7 @@ func (*ConferenceRecord) ProtoMessage() {} func (x *ConferenceRecord) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +583,9 @@ type Participant struct { func (x *Participant) Reset() { *x = Participant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Participant) String() string { @@ -606,7 +596,7 @@ func (*Participant) ProtoMessage() {} func (x *Participant) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,11 +707,9 @@ type ParticipantSession struct { func (x *ParticipantSession) Reset() { *x = ParticipantSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParticipantSession) String() string { @@ -732,7 +720,7 @@ func (*ParticipantSession) ProtoMessage() {} func (x *ParticipantSession) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,11 +776,9 @@ type SignedinUser struct { func (x *SignedinUser) Reset() { *x = SignedinUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedinUser) String() string { @@ -803,7 +789,7 @@ func (*SignedinUser) ProtoMessage() {} func (x *SignedinUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +830,9 @@ type AnonymousUser struct { func (x *AnonymousUser) Reset() { *x = AnonymousUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnonymousUser) String() string { @@ -859,7 +843,7 @@ func (*AnonymousUser) ProtoMessage() {} func (x *AnonymousUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +878,9 @@ type PhoneUser struct { func (x *PhoneUser) Reset() { *x = PhoneUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhoneUser) String() string { @@ -909,7 +891,7 @@ func (*PhoneUser) ProtoMessage() {} func (x *PhoneUser) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +939,9 @@ type Recording struct { func (x *Recording) Reset() { *x = Recording{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recording) String() string { @@ -972,7 +952,7 @@ func (*Recording) ProtoMessage() {} func (x *Recording) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1041,9 @@ type DriveDestination struct { func (x *DriveDestination) Reset() { *x = DriveDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DriveDestination) String() string { @@ -1076,7 +1054,7 @@ func (*DriveDestination) ProtoMessage() {} func (x *DriveDestination) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1110,9 @@ type Transcript struct { func (x *Transcript) Reset() { *x = Transcript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transcript) String() string { @@ -1147,7 +1123,7 @@ func (*Transcript) ProtoMessage() {} func (x *Transcript) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1235,11 +1211,9 @@ type DocsDestination struct { func (x *DocsDestination) Reset() { *x = DocsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocsDestination) String() string { @@ -1250,7 +1224,7 @@ func (*DocsDestination) ProtoMessage() {} func (x *DocsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1305,11 +1279,9 @@ type TranscriptEntry struct { func (x *TranscriptEntry) Reset() { *x = TranscriptEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptEntry) String() string { @@ -1320,7 +1292,7 @@ func (*TranscriptEntry) ProtoMessage() {} func (x *TranscriptEntry) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_resource_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1729,176 +1701,6 @@ func file_google_apps_meet_v2beta_resource_proto_init() { if File_google_apps_meet_v2beta_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_apps_meet_v2beta_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Space); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ActiveConference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConferenceRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Participant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ParticipantSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SignedinUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AnonymousUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PhoneUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Recording); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DriveDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Transcript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DocsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_resource_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_apps_meet_v2beta_resource_proto_msgTypes[4].OneofWrappers = []any{ (*Participant_SignedinUser)(nil), (*Participant_AnonymousUser)(nil), diff --git a/apps/meet/apiv2beta/meetpb/service.pb.go b/apps/meet/apiv2beta/meetpb/service.pb.go index 294770a67220..a2cf2709611a 100755 --- a/apps/meet/apiv2beta/meetpb/service.pb.go +++ b/apps/meet/apiv2beta/meetpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/apps/meet/v2beta/service.proto @@ -55,11 +55,9 @@ type CreateSpaceRequest struct { func (x *CreateSpaceRequest) Reset() { *x = CreateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpaceRequest) String() string { @@ -70,7 +68,7 @@ func (*CreateSpaceRequest) ProtoMessage() {} func (x *CreateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104,11 +102,9 @@ type GetSpaceRequest struct { func (x *GetSpaceRequest) Reset() { *x = GetSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpaceRequest) String() string { @@ -119,7 +115,7 @@ func (*GetSpaceRequest) ProtoMessage() {} func (x *GetSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,11 +154,9 @@ type UpdateSpaceRequest struct { func (x *UpdateSpaceRequest) Reset() { *x = UpdateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpaceRequest) String() string { @@ -173,7 +167,7 @@ func (*UpdateSpaceRequest) ProtoMessage() {} func (x *UpdateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +208,9 @@ type EndActiveConferenceRequest struct { func (x *EndActiveConferenceRequest) Reset() { *x = EndActiveConferenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndActiveConferenceRequest) String() string { @@ -229,7 +221,7 @@ func (*EndActiveConferenceRequest) ProtoMessage() {} func (x *EndActiveConferenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +255,9 @@ type GetConferenceRecordRequest struct { func (x *GetConferenceRecordRequest) Reset() { *x = GetConferenceRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConferenceRecordRequest) String() string { @@ -278,7 +268,7 @@ func (*GetConferenceRecordRequest) ProtoMessage() {} func (x *GetConferenceRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +317,9 @@ type ListConferenceRecordsRequest struct { func (x *ListConferenceRecordsRequest) Reset() { *x = ListConferenceRecordsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConferenceRecordsRequest) String() string { @@ -342,7 +330,7 @@ func (*ListConferenceRecordsRequest) ProtoMessage() {} func (x *ListConferenceRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +381,9 @@ type ListConferenceRecordsResponse struct { func (x *ListConferenceRecordsResponse) Reset() { *x = ListConferenceRecordsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConferenceRecordsResponse) String() string { @@ -408,7 +394,7 @@ func (*ListConferenceRecordsResponse) ProtoMessage() {} func (x *ListConferenceRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +435,9 @@ type GetParticipantRequest struct { func (x *GetParticipantRequest) Reset() { *x = GetParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantRequest) String() string { @@ -464,7 +448,7 @@ func (*GetParticipantRequest) ProtoMessage() {} func (x *GetParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +499,9 @@ type ListParticipantsRequest struct { func (x *ListParticipantsRequest) Reset() { *x = ListParticipantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsRequest) String() string { @@ -530,7 +512,7 @@ func (*ListParticipantsRequest) ProtoMessage() {} func (x *ListParticipantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +575,9 @@ type ListParticipantsResponse struct { func (x *ListParticipantsResponse) Reset() { *x = ListParticipantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsResponse) String() string { @@ -608,7 +588,7 @@ func (*ListParticipantsResponse) ProtoMessage() {} func (x *ListParticipantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +636,9 @@ type GetParticipantSessionRequest struct { func (x *GetParticipantSessionRequest) Reset() { *x = GetParticipantSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantSessionRequest) String() string { @@ -671,7 +649,7 @@ func (*GetParticipantSessionRequest) ProtoMessage() {} func (x *GetParticipantSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +701,9 @@ type ListParticipantSessionsRequest struct { func (x *ListParticipantSessionsRequest) Reset() { *x = ListParticipantSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantSessionsRequest) String() string { @@ -738,7 +714,7 @@ func (*ListParticipantSessionsRequest) ProtoMessage() {} func (x *ListParticipantSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +772,9 @@ type ListParticipantSessionsResponse struct { func (x *ListParticipantSessionsResponse) Reset() { *x = ListParticipantSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantSessionsResponse) String() string { @@ -811,7 +785,7 @@ func (*ListParticipantSessionsResponse) ProtoMessage() {} func (x *ListParticipantSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +826,9 @@ type GetRecordingRequest struct { func (x *GetRecordingRequest) Reset() { *x = GetRecordingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecordingRequest) String() string { @@ -867,7 +839,7 @@ func (*GetRecordingRequest) ProtoMessage() {} func (x *GetRecordingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +881,9 @@ type ListRecordingsRequest struct { func (x *ListRecordingsRequest) Reset() { *x = ListRecordingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecordingsRequest) String() string { @@ -924,7 +894,7 @@ func (*ListRecordingsRequest) ProtoMessage() {} func (x *ListRecordingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +945,9 @@ type ListRecordingsResponse struct { func (x *ListRecordingsResponse) Reset() { *x = ListRecordingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecordingsResponse) String() string { @@ -990,7 +958,7 @@ func (*ListRecordingsResponse) ProtoMessage() {} func (x *ListRecordingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,11 +999,9 @@ type GetTranscriptRequest struct { func (x *GetTranscriptRequest) Reset() { *x = GetTranscriptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTranscriptRequest) String() string { @@ -1046,7 +1012,7 @@ func (*GetTranscriptRequest) ProtoMessage() {} func (x *GetTranscriptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1054,9 @@ type ListTranscriptsRequest struct { func (x *ListTranscriptsRequest) Reset() { *x = ListTranscriptsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptsRequest) String() string { @@ -1103,7 +1067,7 @@ func (*ListTranscriptsRequest) ProtoMessage() {} func (x *ListTranscriptsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1118,9 @@ type ListTranscriptsResponse struct { func (x *ListTranscriptsResponse) Reset() { *x = ListTranscriptsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptsResponse) String() string { @@ -1169,7 +1131,7 @@ func (*ListTranscriptsResponse) ProtoMessage() {} func (x *ListTranscriptsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,11 +1172,9 @@ type GetTranscriptEntryRequest struct { func (x *GetTranscriptEntryRequest) Reset() { *x = GetTranscriptEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTranscriptEntryRequest) String() string { @@ -1225,7 +1185,7 @@ func (*GetTranscriptEntryRequest) ProtoMessage() {} func (x *GetTranscriptEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1268,11 +1228,9 @@ type ListTranscriptEntriesRequest struct { func (x *ListTranscriptEntriesRequest) Reset() { *x = ListTranscriptEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptEntriesRequest) String() string { @@ -1283,7 +1241,7 @@ func (*ListTranscriptEntriesRequest) ProtoMessage() {} func (x *ListTranscriptEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1334,11 +1292,9 @@ type ListTranscriptEntriesResponse struct { func (x *ListTranscriptEntriesResponse) Reset() { *x = ListTranscriptEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTranscriptEntriesResponse) String() string { @@ -1349,7 +1305,7 @@ func (*ListTranscriptEntriesResponse) ProtoMessage() {} func (x *ListTranscriptEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_apps_meet_v2beta_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1876,272 +1832,6 @@ func file_google_apps_meet_v2beta_service_proto_init() { return } file_google_apps_meet_v2beta_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_apps_meet_v2beta_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EndActiveConferenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetConferenceRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListConferenceRecordsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConferenceRecordsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetRecordingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListRecordingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListRecordingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetTranscriptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTranscriptEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_apps_meet_v2beta_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListTranscriptEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/apps/meet/apiv2beta/spaces_client.go b/apps/meet/apiv2beta/spaces_client.go index 045fd61e7b03..c8824771b1f4 100755 --- a/apps/meet/apiv2beta/spaces_client.go +++ b/apps/meet/apiv2beta/spaces_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( meetpb "cloud.google.com/go/apps/meet/apiv2beta/meetpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -199,6 +198,8 @@ type spacesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpacesClient creates a new spaces service client based on gRPC. @@ -225,6 +226,7 @@ func NewSpacesClient(ctx context.Context, opts ...option.ClientOption) (*SpacesC connPool: connPool, spacesClient: meetpb.NewSpacesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -271,6 +273,8 @@ type spacesRESTClient struct { // Points back to the CallOptions field of the containing SpacesClient CallOptions **SpacesCallOptions + + logger *slog.Logger } // NewSpacesRESTClient creates a new spaces service rest client. @@ -288,6 +292,7 @@ func NewSpacesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Spa endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -337,7 +342,7 @@ func (c *spacesGRPCClient) CreateSpace(ctx context.Context, req *meetpb.CreateSp var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.CreateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.CreateSpace, req, settings.GRPC, c.logger, "CreateSpace") return err }, opts...) if err != nil { @@ -355,7 +360,7 @@ func (c *spacesGRPCClient) GetSpace(ctx context.Context, req *meetpb.GetSpaceReq var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.GetSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.GetSpace, req, settings.GRPC, c.logger, "GetSpace") return err }, opts...) if err != nil { @@ -373,7 +378,7 @@ func (c *spacesGRPCClient) UpdateSpace(ctx context.Context, req *meetpb.UpdateSp var resp *meetpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.spacesClient.UpdateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.spacesClient.UpdateSpace, req, settings.GRPC, c.logger, "UpdateSpace") return err }, opts...) if err != nil { @@ -390,7 +395,7 @@ func (c *spacesGRPCClient) EndActiveConference(ctx context.Context, req *meetpb. opts = append((*c.CallOptions).EndActiveConference[0:len((*c.CallOptions).EndActiveConference):len((*c.CallOptions).EndActiveConference)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.spacesClient.EndActiveConference(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.spacesClient.EndActiveConference, req, settings.GRPC, c.logger, "EndActiveConference") return err }, opts...) return err @@ -434,17 +439,7 @@ func (c *spacesRESTClient) CreateSpace(ctx context.Context, req *meetpb.CreateSp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpace") if err != nil { return err } @@ -495,17 +490,7 @@ func (c *spacesRESTClient) GetSpace(ctx context.Context, req *meetpb.GetSpaceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpace") if err != nil { return err } @@ -570,17 +555,7 @@ func (c *spacesRESTClient) UpdateSpace(ctx context.Context, req *meetpb.UpdateSp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpace") if err != nil { return err } @@ -634,14 +609,7 @@ func (c *spacesRESTClient) EndActiveConference(ctx context.Context, req *meetpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EndActiveConference") + return err }, opts...) } diff --git a/area120/tables/apiv1alpha1/helpers.go b/area120/tables/apiv1alpha1/helpers.go index 8179433eb1c9..c6696070bd99 100755 --- a/area120/tables/apiv1alpha1/helpers.go +++ b/area120/tables/apiv1alpha1/helpers.go @@ -18,10 +18,20 @@ package tables import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "area120tables.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -47,3 +57,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/tables", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/area120/tables/apiv1alpha1/tables_client.go b/area120/tables/apiv1alpha1/tables_client.go index 4aae90e214d8..fae6143f8ab2 100755 --- a/area120/tables/apiv1alpha1/tables_client.go +++ b/area120/tables/apiv1alpha1/tables_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( tablespb "cloud.google.com/go/area120/tables/apiv1alpha1/tablespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -294,6 +293,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new tables service client based on gRPC. @@ -331,6 +332,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: tablespb.NewTablesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -377,6 +379,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new tables service rest client. @@ -405,6 +409,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -457,7 +462,7 @@ func (c *gRPCClient) GetTable(ctx context.Context, req *tablespb.GetTableRequest var resp *tablespb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTable, req, settings.GRPC, c.logger, "GetTable") return err }, opts...) if err != nil { @@ -483,7 +488,7 @@ func (c *gRPCClient) ListTables(ctx context.Context, req *tablespb.ListTablesReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTables(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTables, req, settings.GRPC, c.logger, "ListTables") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *gRPCClient) GetWorkspace(ctx context.Context, req *tablespb.GetWorkspac var resp *tablespb.Workspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkspace, req, settings.GRPC, c.logger, "GetWorkspace") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *gRPCClient) ListWorkspaces(ctx context.Context, req *tablespb.ListWorks } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkspaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkspaces, req, settings.GRPC, c.logger, "ListWorkspaces") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *gRPCClient) GetRow(ctx context.Context, req *tablespb.GetRowRequest, op var resp *tablespb.Row err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRow, req, settings.GRPC, c.logger, "GetRow") return err }, opts...) if err != nil { @@ -608,7 +613,7 @@ func (c *gRPCClient) ListRows(ctx context.Context, req *tablespb.ListRowsRequest } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRows, req, settings.GRPC, c.logger, "ListRows") return err }, opts...) if err != nil { @@ -643,7 +648,7 @@ func (c *gRPCClient) CreateRow(ctx context.Context, req *tablespb.CreateRowReque var resp *tablespb.Row err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRow, req, settings.GRPC, c.logger, "CreateRow") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *gRPCClient) BatchCreateRows(ctx context.Context, req *tablespb.BatchCre var resp *tablespb.BatchCreateRowsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchCreateRows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchCreateRows, req, settings.GRPC, c.logger, "BatchCreateRows") return err }, opts...) if err != nil { @@ -679,7 +684,7 @@ func (c *gRPCClient) UpdateRow(ctx context.Context, req *tablespb.UpdateRowReque var resp *tablespb.Row err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRow, req, settings.GRPC, c.logger, "UpdateRow") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *gRPCClient) BatchUpdateRows(ctx context.Context, req *tablespb.BatchUpd var resp *tablespb.BatchUpdateRowsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchUpdateRows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchUpdateRows, req, settings.GRPC, c.logger, "BatchUpdateRows") return err }, opts...) if err != nil { @@ -714,7 +719,7 @@ func (c *gRPCClient) DeleteRow(ctx context.Context, req *tablespb.DeleteRowReque opts = append((*c.CallOptions).DeleteRow[0:len((*c.CallOptions).DeleteRow):len((*c.CallOptions).DeleteRow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteRow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteRow, req, settings.GRPC, c.logger, "DeleteRow") return err }, opts...) return err @@ -728,7 +733,7 @@ func (c *gRPCClient) BatchDeleteRows(ctx context.Context, req *tablespb.BatchDel opts = append((*c.CallOptions).BatchDeleteRows[0:len((*c.CallOptions).BatchDeleteRows):len((*c.CallOptions).BatchDeleteRows)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.BatchDeleteRows(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.BatchDeleteRows, req, settings.GRPC, c.logger, "BatchDeleteRows") return err }, opts...) return err @@ -767,17 +772,7 @@ func (c *restClient) GetTable(ctx context.Context, req *tablespb.GetTableRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTable") if err != nil { return err } @@ -839,21 +834,10 @@ func (c *restClient) ListTables(ctx context.Context, req *tablespb.ListTablesReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTables") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -916,17 +900,7 @@ func (c *restClient) GetWorkspace(ctx context.Context, req *tablespb.GetWorkspac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkspace") if err != nil { return err } @@ -988,21 +962,10 @@ func (c *restClient) ListWorkspaces(ctx context.Context, req *tablespb.ListWorks } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkspaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1068,17 +1031,7 @@ func (c *restClient) GetRow(ctx context.Context, req *tablespb.GetRowRequest, op httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRow") if err != nil { return err } @@ -1146,21 +1099,10 @@ func (c *restClient) ListRows(ctx context.Context, req *tablespb.ListRowsRequest } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRows") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1233,17 +1175,7 @@ func (c *restClient) CreateRow(ctx context.Context, req *tablespb.CreateRowReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRow") if err != nil { return err } @@ -1299,17 +1231,7 @@ func (c *restClient) BatchCreateRows(ctx context.Context, req *tablespb.BatchCre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateRows") if err != nil { return err } @@ -1376,17 +1298,7 @@ func (c *restClient) UpdateRow(ctx context.Context, req *tablespb.UpdateRowReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRow") if err != nil { return err } @@ -1442,17 +1354,7 @@ func (c *restClient) BatchUpdateRows(ctx context.Context, req *tablespb.BatchUpd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateRows") if err != nil { return err } @@ -1499,15 +1401,8 @@ func (c *restClient) DeleteRow(ctx context.Context, req *tablespb.DeleteRowReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRow") + return err }, opts...) } @@ -1547,14 +1442,7 @@ func (c *restClient) BatchDeleteRows(ctx context.Context, req *tablespb.BatchDel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteRows") + return err }, opts...) } diff --git a/area120/tables/apiv1alpha1/tables_client_example_go123_test.go b/area120/tables/apiv1alpha1/tables_client_example_go123_test.go index 63d348d3dc15..90484b036068 100644 --- a/area120/tables/apiv1alpha1/tables_client_example_go123_test.go +++ b/area120/tables/apiv1alpha1/tables_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListRows_all() { } for resp, err := range c.ListRows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListTables_all() { } for resp, err := range c.ListTables(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListWorkspaces_all() { } for resp, err := range c.ListWorkspaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/area120/tables/apiv1alpha1/tablespb/tables.pb.go b/area120/tables/apiv1alpha1/tablespb/tables.pb.go index 13536e0b5dfb..5746295e0620 100755 --- a/area120/tables/apiv1alpha1/tablespb/tables.pb.go +++ b/area120/tables/apiv1alpha1/tablespb/tables.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/area120/tables/v1alpha1/tables.proto @@ -105,11 +105,9 @@ type GetTableRequest struct { func (x *GetTableRequest) Reset() { *x = GetTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableRequest) String() string { @@ -120,7 +118,7 @@ func (*GetTableRequest) ProtoMessage() {} func (x *GetTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +162,9 @@ type ListTablesRequest struct { func (x *ListTablesRequest) Reset() { *x = ListTablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesRequest) String() string { @@ -179,7 +175,7 @@ func (*ListTablesRequest) ProtoMessage() {} func (x *ListTablesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,11 +219,9 @@ type ListTablesResponse struct { func (x *ListTablesResponse) Reset() { *x = ListTablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesResponse) String() string { @@ -238,7 +232,7 @@ func (*ListTablesResponse) ProtoMessage() {} func (x *ListTablesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +274,9 @@ type GetWorkspaceRequest struct { func (x *GetWorkspaceRequest) Reset() { *x = GetWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkspaceRequest) String() string { @@ -295,7 +287,7 @@ func (*GetWorkspaceRequest) ProtoMessage() {} func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +331,9 @@ type ListWorkspacesRequest struct { func (x *ListWorkspacesRequest) Reset() { *x = ListWorkspacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesRequest) String() string { @@ -354,7 +344,7 @@ func (*ListWorkspacesRequest) ProtoMessage() {} func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +388,9 @@ type ListWorkspacesResponse struct { func (x *ListWorkspacesResponse) Reset() { *x = ListWorkspacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesResponse) String() string { @@ -413,7 +401,7 @@ func (*ListWorkspacesResponse) ProtoMessage() {} func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +446,9 @@ type GetRowRequest struct { func (x *GetRowRequest) Reset() { *x = GetRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRowRequest) String() string { @@ -473,7 +459,7 @@ func (*GetRowRequest) ProtoMessage() {} func (x *GetRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +520,9 @@ type ListRowsRequest struct { func (x *ListRowsRequest) Reset() { *x = ListRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRowsRequest) String() string { @@ -549,7 +533,7 @@ func (*ListRowsRequest) ProtoMessage() {} func (x *ListRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +598,9 @@ type ListRowsResponse struct { func (x *ListRowsResponse) Reset() { *x = ListRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRowsResponse) String() string { @@ -629,7 +611,7 @@ func (*ListRowsResponse) ProtoMessage() {} func (x *ListRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +658,9 @@ type CreateRowRequest struct { func (x *CreateRowRequest) Reset() { *x = CreateRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRowRequest) String() string { @@ -691,7 +671,7 @@ func (*CreateRowRequest) ProtoMessage() {} func (x *CreateRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +724,9 @@ type BatchCreateRowsRequest struct { func (x *BatchCreateRowsRequest) Reset() { *x = BatchCreateRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateRowsRequest) String() string { @@ -759,7 +737,7 @@ func (*BatchCreateRowsRequest) ProtoMessage() {} func (x *BatchCreateRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +778,9 @@ type BatchCreateRowsResponse struct { func (x *BatchCreateRowsResponse) Reset() { *x = BatchCreateRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateRowsResponse) String() string { @@ -815,7 +791,7 @@ func (*BatchCreateRowsResponse) ProtoMessage() {} func (x *BatchCreateRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +830,9 @@ type UpdateRowRequest struct { func (x *UpdateRowRequest) Reset() { *x = UpdateRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRowRequest) String() string { @@ -869,7 +843,7 @@ func (*UpdateRowRequest) ProtoMessage() {} func (x *UpdateRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -922,11 +896,9 @@ type BatchUpdateRowsRequest struct { func (x *BatchUpdateRowsRequest) Reset() { *x = BatchUpdateRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateRowsRequest) String() string { @@ -937,7 +909,7 @@ func (*BatchUpdateRowsRequest) ProtoMessage() {} func (x *BatchUpdateRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +950,9 @@ type BatchUpdateRowsResponse struct { func (x *BatchUpdateRowsResponse) Reset() { *x = BatchUpdateRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateRowsResponse) String() string { @@ -993,7 +963,7 @@ func (*BatchUpdateRowsResponse) ProtoMessage() {} func (x *BatchUpdateRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +998,9 @@ type DeleteRowRequest struct { func (x *DeleteRowRequest) Reset() { *x = DeleteRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRowRequest) String() string { @@ -1043,7 +1011,7 @@ func (*DeleteRowRequest) ProtoMessage() {} func (x *DeleteRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1051,9 @@ type BatchDeleteRowsRequest struct { func (x *BatchDeleteRowsRequest) Reset() { *x = BatchDeleteRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteRowsRequest) String() string { @@ -1098,7 +1064,7 @@ func (*BatchDeleteRowsRequest) ProtoMessage() {} func (x *BatchDeleteRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1111,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -1160,7 +1124,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1195,9 @@ type ColumnDescription struct { func (x *ColumnDescription) Reset() { *x = ColumnDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnDescription) String() string { @@ -1246,7 +1208,7 @@ func (*ColumnDescription) ProtoMessage() {} func (x *ColumnDescription) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1279,9 @@ type LabeledItem struct { func (x *LabeledItem) Reset() { *x = LabeledItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabeledItem) String() string { @@ -1332,7 +1292,7 @@ func (*LabeledItem) ProtoMessage() {} func (x *LabeledItem) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1373,11 +1333,9 @@ type RelationshipDetails struct { func (x *RelationshipDetails) Reset() { *x = RelationshipDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationshipDetails) String() string { @@ -1388,7 +1346,7 @@ func (*RelationshipDetails) ProtoMessage() {} func (x *RelationshipDetails) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,11 +1383,9 @@ type LookupDetails struct { func (x *LookupDetails) Reset() { *x = LookupDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupDetails) String() string { @@ -1440,7 +1396,7 @@ func (*LookupDetails) ProtoMessage() {} func (x *LookupDetails) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1443,9 @@ type Row struct { func (x *Row) Reset() { *x = Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Row) String() string { @@ -1502,7 +1456,7 @@ func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1548,11 +1502,9 @@ type Workspace struct { func (x *Workspace) Reset() { *x = Workspace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workspace) String() string { @@ -1563,7 +1515,7 @@ func (*Workspace) ProtoMessage() {} func (x *Workspace) ProtoReflect() protoreflect.Message { mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2087,296 +2039,6 @@ func file_google_area120_tables_v1alpha1_tables_proto_init() { if File_google_area120_tables_v1alpha1_tables_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ColumnDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*LabeledItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RelationshipDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*LookupDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Workspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifact_registry_client.go b/artifactregistry/apiv1/artifact_registry_client.go index 2da5f85307d2..8e6e6192f027 100755 --- a/artifactregistry/apiv1/artifact_registry_client.go +++ b/artifactregistry/apiv1/artifact_registry_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -913,6 +912,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new artifact registry client based on gRPC. @@ -955,6 +956,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: artifactregistrypb.NewArtifactRegistryClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1019,6 +1021,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new artifact registry rest client. @@ -1052,6 +1056,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1125,7 +1130,7 @@ func (c *gRPCClient) ListDockerImages(ctx context.Context, req *artifactregistry } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDockerImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDockerImages, req, settings.GRPC, c.logger, "ListDockerImages") return err }, opts...) if err != nil { @@ -1160,7 +1165,7 @@ func (c *gRPCClient) GetDockerImage(ctx context.Context, req *artifactregistrypb var resp *artifactregistrypb.DockerImage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDockerImage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDockerImage, req, settings.GRPC, c.logger, "GetDockerImage") return err }, opts...) if err != nil { @@ -1189,7 +1194,7 @@ func (c *gRPCClient) ListMavenArtifacts(ctx context.Context, req *artifactregist } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMavenArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMavenArtifacts, req, settings.GRPC, c.logger, "ListMavenArtifacts") return err }, opts...) if err != nil { @@ -1224,7 +1229,7 @@ func (c *gRPCClient) GetMavenArtifact(ctx context.Context, req *artifactregistry var resp *artifactregistrypb.MavenArtifact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMavenArtifact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMavenArtifact, req, settings.GRPC, c.logger, "GetMavenArtifact") return err }, opts...) if err != nil { @@ -1253,7 +1258,7 @@ func (c *gRPCClient) ListNpmPackages(ctx context.Context, req *artifactregistryp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNpmPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNpmPackages, req, settings.GRPC, c.logger, "ListNpmPackages") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *gRPCClient) GetNpmPackage(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.NpmPackage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNpmPackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNpmPackage, req, settings.GRPC, c.logger, "GetNpmPackage") return err }, opts...) if err != nil { @@ -1317,7 +1322,7 @@ func (c *gRPCClient) ListPythonPackages(ctx context.Context, req *artifactregist } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPythonPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPythonPackages, req, settings.GRPC, c.logger, "ListPythonPackages") return err }, opts...) if err != nil { @@ -1352,7 +1357,7 @@ func (c *gRPCClient) GetPythonPackage(ctx context.Context, req *artifactregistry var resp *artifactregistrypb.PythonPackage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPythonPackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPythonPackage, req, settings.GRPC, c.logger, "GetPythonPackage") return err }, opts...) if err != nil { @@ -1370,7 +1375,7 @@ func (c *gRPCClient) ImportAptArtifacts(ctx context.Context, req *artifactregist var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportAptArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportAptArtifacts, req, settings.GRPC, c.logger, "ImportAptArtifacts") return err }, opts...) if err != nil { @@ -1390,7 +1395,7 @@ func (c *gRPCClient) ImportYumArtifacts(ctx context.Context, req *artifactregist var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportYumArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportYumArtifacts, req, settings.GRPC, c.logger, "ImportYumArtifacts") return err }, opts...) if err != nil { @@ -1421,7 +1426,7 @@ func (c *gRPCClient) ListRepositories(ctx context.Context, req *artifactregistry } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -1456,7 +1461,7 @@ func (c *gRPCClient) GetRepository(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -1474,7 +1479,7 @@ func (c *gRPCClient) CreateRepository(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -1494,7 +1499,7 @@ func (c *gRPCClient) UpdateRepository(ctx context.Context, req *artifactregistry var resp *artifactregistrypb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRepository, req, settings.GRPC, c.logger, "UpdateRepository") return err }, opts...) if err != nil { @@ -1512,7 +1517,7 @@ func (c *gRPCClient) DeleteRepository(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) if err != nil { @@ -1543,7 +1548,7 @@ func (c *gRPCClient) ListPackages(ctx context.Context, req *artifactregistrypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPackages, req, settings.GRPC, c.logger, "ListPackages") return err }, opts...) if err != nil { @@ -1578,7 +1583,7 @@ func (c *gRPCClient) GetPackage(ctx context.Context, req *artifactregistrypb.Get var resp *artifactregistrypb.Package err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPackage, req, settings.GRPC, c.logger, "GetPackage") return err }, opts...) if err != nil { @@ -1596,7 +1601,7 @@ func (c *gRPCClient) DeletePackage(ctx context.Context, req *artifactregistrypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePackage, req, settings.GRPC, c.logger, "DeletePackage") return err }, opts...) if err != nil { @@ -1627,7 +1632,7 @@ func (c *gRPCClient) ListVersions(ctx context.Context, req *artifactregistrypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -1662,7 +1667,7 @@ func (c *gRPCClient) GetVersion(ctx context.Context, req *artifactregistrypb.Get var resp *artifactregistrypb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -1680,7 +1685,7 @@ func (c *gRPCClient) DeleteVersion(ctx context.Context, req *artifactregistrypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) if err != nil { @@ -1700,7 +1705,7 @@ func (c *gRPCClient) BatchDeleteVersions(ctx context.Context, req *artifactregis var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchDeleteVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchDeleteVersions, req, settings.GRPC, c.logger, "BatchDeleteVersions") return err }, opts...) if err != nil { @@ -1720,7 +1725,7 @@ func (c *gRPCClient) UpdateVersion(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -1749,7 +1754,7 @@ func (c *gRPCClient) ListFiles(ctx context.Context, req *artifactregistrypb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFiles, req, settings.GRPC, c.logger, "ListFiles") return err }, opts...) if err != nil { @@ -1784,7 +1789,7 @@ func (c *gRPCClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFil var resp *artifactregistrypb.File err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFile, req, settings.GRPC, c.logger, "GetFile") return err }, opts...) if err != nil { @@ -1802,7 +1807,7 @@ func (c *gRPCClient) DeleteFile(ctx context.Context, req *artifactregistrypb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteFile, req, settings.GRPC, c.logger, "DeleteFile") return err }, opts...) if err != nil { @@ -1822,7 +1827,7 @@ func (c *gRPCClient) UpdateFile(ctx context.Context, req *artifactregistrypb.Upd var resp *artifactregistrypb.File err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFile, req, settings.GRPC, c.logger, "UpdateFile") return err }, opts...) if err != nil { @@ -1851,7 +1856,7 @@ func (c *gRPCClient) ListTags(ctx context.Context, req *artifactregistrypb.ListT } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTags, req, settings.GRPC, c.logger, "ListTags") return err }, opts...) if err != nil { @@ -1886,7 +1891,7 @@ func (c *gRPCClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagR var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTag, req, settings.GRPC, c.logger, "GetTag") return err }, opts...) if err != nil { @@ -1904,7 +1909,7 @@ func (c *gRPCClient) CreateTag(ctx context.Context, req *artifactregistrypb.Crea var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTag, req, settings.GRPC, c.logger, "CreateTag") return err }, opts...) if err != nil { @@ -1922,7 +1927,7 @@ func (c *gRPCClient) UpdateTag(ctx context.Context, req *artifactregistrypb.Upda var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTag, req, settings.GRPC, c.logger, "UpdateTag") return err }, opts...) if err != nil { @@ -1939,7 +1944,7 @@ func (c *gRPCClient) DeleteTag(ctx context.Context, req *artifactregistrypb.Dele opts = append((*c.CallOptions).DeleteTag[0:len((*c.CallOptions).DeleteTag):len((*c.CallOptions).DeleteTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTag, req, settings.GRPC, c.logger, "DeleteTag") return err }, opts...) return err @@ -1954,7 +1959,7 @@ func (c *gRPCClient) CreateRule(ctx context.Context, req *artifactregistrypb.Cre var resp *artifactregistrypb.Rule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRule, req, settings.GRPC, c.logger, "CreateRule") return err }, opts...) if err != nil { @@ -1983,7 +1988,7 @@ func (c *gRPCClient) ListRules(ctx context.Context, req *artifactregistrypb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRules, req, settings.GRPC, c.logger, "ListRules") return err }, opts...) if err != nil { @@ -2018,7 +2023,7 @@ func (c *gRPCClient) GetRule(ctx context.Context, req *artifactregistrypb.GetRul var resp *artifactregistrypb.Rule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRule, req, settings.GRPC, c.logger, "GetRule") return err }, opts...) if err != nil { @@ -2036,7 +2041,7 @@ func (c *gRPCClient) UpdateRule(ctx context.Context, req *artifactregistrypb.Upd var resp *artifactregistrypb.Rule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRule, req, settings.GRPC, c.logger, "UpdateRule") return err }, opts...) if err != nil { @@ -2053,7 +2058,7 @@ func (c *gRPCClient) DeleteRule(ctx context.Context, req *artifactregistrypb.Del opts = append((*c.CallOptions).DeleteRule[0:len((*c.CallOptions).DeleteRule):len((*c.CallOptions).DeleteRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteRule, req, settings.GRPC, c.logger, "DeleteRule") return err }, opts...) return err @@ -2068,7 +2073,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2086,7 +2091,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2104,7 +2109,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2122,7 +2127,7 @@ func (c *gRPCClient) GetProjectSettings(ctx context.Context, req *artifactregist var resp *artifactregistrypb.ProjectSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProjectSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProjectSettings, req, settings.GRPC, c.logger, "GetProjectSettings") return err }, opts...) if err != nil { @@ -2140,7 +2145,7 @@ func (c *gRPCClient) UpdateProjectSettings(ctx context.Context, req *artifactreg var resp *artifactregistrypb.ProjectSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateProjectSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateProjectSettings, req, settings.GRPC, c.logger, "UpdateProjectSettings") return err }, opts...) if err != nil { @@ -2158,7 +2163,7 @@ func (c *gRPCClient) GetVPCSCConfig(ctx context.Context, req *artifactregistrypb var resp *artifactregistrypb.VPCSCConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVPCSCConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVPCSCConfig, req, settings.GRPC, c.logger, "GetVPCSCConfig") return err }, opts...) if err != nil { @@ -2176,7 +2181,7 @@ func (c *gRPCClient) UpdateVPCSCConfig(ctx context.Context, req *artifactregistr var resp *artifactregistrypb.VPCSCConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateVPCSCConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateVPCSCConfig, req, settings.GRPC, c.logger, "UpdateVPCSCConfig") return err }, opts...) if err != nil { @@ -2194,7 +2199,7 @@ func (c *gRPCClient) UpdatePackage(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.Package err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePackage, req, settings.GRPC, c.logger, "UpdatePackage") return err }, opts...) if err != nil { @@ -2223,7 +2228,7 @@ func (c *gRPCClient) ListAttachments(ctx context.Context, req *artifactregistryp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAttachments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAttachments, req, settings.GRPC, c.logger, "ListAttachments") return err }, opts...) if err != nil { @@ -2258,7 +2263,7 @@ func (c *gRPCClient) GetAttachment(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.Attachment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAttachment, req, settings.GRPC, c.logger, "GetAttachment") return err }, opts...) if err != nil { @@ -2276,7 +2281,7 @@ func (c *gRPCClient) CreateAttachment(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAttachment, req, settings.GRPC, c.logger, "CreateAttachment") return err }, opts...) if err != nil { @@ -2296,7 +2301,7 @@ func (c *gRPCClient) DeleteAttachment(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAttachment, req, settings.GRPC, c.logger, "DeleteAttachment") return err }, opts...) if err != nil { @@ -2316,7 +2321,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2345,7 +2350,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2380,7 +2385,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2437,21 +2442,10 @@ func (c *restClient) ListDockerImages(ctx context.Context, req *artifactregistry } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDockerImages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2514,17 +2508,7 @@ func (c *restClient) GetDockerImage(ctx context.Context, req *artifactregistrypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDockerImage") if err != nil { return err } @@ -2586,21 +2570,10 @@ func (c *restClient) ListMavenArtifacts(ctx context.Context, req *artifactregist } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMavenArtifacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2663,17 +2636,7 @@ func (c *restClient) GetMavenArtifact(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMavenArtifact") if err != nil { return err } @@ -2735,21 +2698,10 @@ func (c *restClient) ListNpmPackages(ctx context.Context, req *artifactregistryp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNpmPackages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2812,17 +2764,7 @@ func (c *restClient) GetNpmPackage(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNpmPackage") if err != nil { return err } @@ -2884,21 +2826,10 @@ func (c *restClient) ListPythonPackages(ctx context.Context, req *artifactregist } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPythonPackages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2961,17 +2892,7 @@ func (c *restClient) GetPythonPackage(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPythonPackage") if err != nil { return err } @@ -3029,21 +2950,10 @@ func (c *restClient) ImportAptArtifacts(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAptArtifacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3102,21 +3012,10 @@ func (c *restClient) ImportYumArtifacts(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportYumArtifacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3185,21 +3084,10 @@ func (c *restClient) ListRepositories(ctx context.Context, req *artifactregistry } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3262,17 +3150,7 @@ func (c *restClient) GetRepository(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -3330,21 +3208,10 @@ func (c *restClient) CreateRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3409,17 +3276,7 @@ func (c *restClient) UpdateRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRepository") if err != nil { return err } @@ -3470,21 +3327,10 @@ func (c *restClient) DeleteRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3553,21 +3399,10 @@ func (c *restClient) ListPackages(ctx context.Context, req *artifactregistrypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPackages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3630,17 +3465,7 @@ func (c *restClient) GetPackage(ctx context.Context, req *artifactregistrypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPackage") if err != nil { return err } @@ -3690,21 +3515,10 @@ func (c *restClient) DeletePackage(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePackage") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3776,21 +3590,10 @@ func (c *restClient) ListVersions(ctx context.Context, req *artifactregistrypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3856,17 +3659,7 @@ func (c *restClient) GetVersion(ctx context.Context, req *artifactregistrypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -3919,21 +3712,10 @@ func (c *restClient) DeleteVersion(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3990,21 +3772,10 @@ func (c *restClient) BatchDeleteVersions(ctx context.Context, req *artifactregis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4069,17 +3840,7 @@ func (c *restClient) UpdateVersion(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -4147,21 +3908,10 @@ func (c *restClient) ListFiles(ctx context.Context, req *artifactregistrypb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4224,17 +3974,7 @@ func (c *restClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFile") if err != nil { return err } @@ -4285,21 +4025,10 @@ func (c *restClient) DeleteFile(ctx context.Context, req *artifactregistrypb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4364,17 +4093,7 @@ func (c *restClient) UpdateFile(ctx context.Context, req *artifactregistrypb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFile") if err != nil { return err } @@ -4439,21 +4158,10 @@ func (c *restClient) ListTags(ctx context.Context, req *artifactregistrypb.ListT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4516,17 +4224,7 @@ func (c *restClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTag") if err != nil { return err } @@ -4586,17 +4284,7 @@ func (c *restClient) CreateTag(ctx context.Context, req *artifactregistrypb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTag") if err != nil { return err } @@ -4660,17 +4348,7 @@ func (c *restClient) UpdateTag(ctx context.Context, req *artifactregistrypb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTag") if err != nil { return err } @@ -4717,15 +4395,8 @@ func (c *restClient) DeleteTag(ctx context.Context, req *artifactregistrypb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTag") + return err }, opts...) } @@ -4772,17 +4443,7 @@ func (c *restClient) CreateRule(ctx context.Context, req *artifactregistrypb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRule") if err != nil { return err } @@ -4844,21 +4505,10 @@ func (c *restClient) ListRules(ctx context.Context, req *artifactregistrypb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4921,17 +4571,7 @@ func (c *restClient) GetRule(ctx context.Context, req *artifactregistrypb.GetRul httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -4995,17 +4635,7 @@ func (c *restClient) UpdateRule(ctx context.Context, req *artifactregistrypb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRule") if err != nil { return err } @@ -5052,15 +4682,8 @@ func (c *restClient) DeleteRule(ctx context.Context, req *artifactregistrypb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRule") + return err }, opts...) } @@ -5103,17 +4726,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -5166,17 +4779,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -5232,17 +4835,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5292,17 +4885,7 @@ func (c *restClient) GetProjectSettings(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProjectSettings") if err != nil { return err } @@ -5366,17 +4949,7 @@ func (c *restClient) UpdateProjectSettings(ctx context.Context, req *artifactreg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProjectSettings") if err != nil { return err } @@ -5426,17 +4999,7 @@ func (c *restClient) GetVPCSCConfig(ctx context.Context, req *artifactregistrypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVPCSCConfig") if err != nil { return err } @@ -5500,17 +5063,7 @@ func (c *restClient) UpdateVPCSCConfig(ctx context.Context, req *artifactregistr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVPCSCConfig") if err != nil { return err } @@ -5574,17 +5127,7 @@ func (c *restClient) UpdatePackage(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePackage") if err != nil { return err } @@ -5649,21 +5192,10 @@ func (c *restClient) ListAttachments(ctx context.Context, req *artifactregistryp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttachments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5726,17 +5258,7 @@ func (c *restClient) GetAttachment(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttachment") if err != nil { return err } @@ -5794,21 +5316,10 @@ func (c *restClient) CreateAttachment(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAttachment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5860,21 +5371,10 @@ func (c *restClient) DeleteAttachment(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAttachment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5925,17 +5425,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -6000,21 +5490,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6077,17 +5556,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/artifactregistry/apiv1/artifact_registry_client_example_go123_test.go b/artifactregistry/apiv1/artifact_registry_client_example_go123_test.go index 38472f6c87d9..075cb8393ac7 100644 --- a/artifactregistry/apiv1/artifact_registry_client_example_go123_test.go +++ b/artifactregistry/apiv1/artifact_registry_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListAttachments_all() { } for resp, err := range c.ListAttachments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListDockerImages_all() { } for resp, err := range c.ListDockerImages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListFiles_all() { } for resp, err := range c.ListFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListMavenArtifacts_all() { } for resp, err := range c.ListMavenArtifacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListNpmPackages_all() { } for resp, err := range c.ListNpmPackages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListPackages_all() { } for resp, err := range c.ListPackages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListPythonPackages_all() { } for resp, err := range c.ListPythonPackages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_ListRules_all() { } for resp, err := range c.ListRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_ListTags_all() { } for resp, err := range c.ListTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -331,7 +331,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/artifactregistry/apiv1/artifactregistrypb/apt_artifact.pb.go b/artifactregistry/apiv1/artifactregistrypb/apt_artifact.pb.go index d97b6122d699..bd94ccef4f10 100755 --- a/artifactregistry/apiv1/artifactregistrypb/apt_artifact.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/apt_artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/apt_artifact.proto @@ -114,11 +114,9 @@ type AptArtifact struct { func (x *AptArtifact) Reset() { *x = AptArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptArtifact) String() string { @@ -129,7 +127,7 @@ func (*AptArtifact) ProtoMessage() {} func (x *AptArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type ImportAptArtifactsGcsSource struct { func (x *ImportAptArtifactsGcsSource) Reset() { *x = ImportAptArtifactsGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsGcsSource) String() string { @@ -215,7 +211,7 @@ func (*ImportAptArtifactsGcsSource) ProtoMessage() {} func (x *ImportAptArtifactsGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +258,9 @@ type ImportAptArtifactsRequest struct { func (x *ImportAptArtifactsRequest) Reset() { *x = ImportAptArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsRequest) String() string { @@ -277,7 +271,7 @@ func (*ImportAptArtifactsRequest) ProtoMessage() {} func (x *ImportAptArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +336,9 @@ type ImportAptArtifactsErrorInfo struct { func (x *ImportAptArtifactsErrorInfo) Reset() { *x = ImportAptArtifactsErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsErrorInfo) String() string { @@ -357,7 +349,7 @@ func (*ImportAptArtifactsErrorInfo) ProtoMessage() {} func (x *ImportAptArtifactsErrorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type ImportAptArtifactsResponse struct { func (x *ImportAptArtifactsResponse) Reset() { *x = ImportAptArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsResponse) String() string { @@ -433,7 +423,7 @@ func (*ImportAptArtifactsResponse) ProtoMessage() {} func (x *ImportAptArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +461,9 @@ type ImportAptArtifactsMetadata struct { func (x *ImportAptArtifactsMetadata) Reset() { *x = ImportAptArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsMetadata) String() string { @@ -486,7 +474,7 @@ func (*ImportAptArtifactsMetadata) ProtoMessage() {} func (x *ImportAptArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,80 +639,6 @@ func file_google_devtools_artifactregistry_v1_apt_artifact_proto_init() { if File_google_devtools_artifactregistry_v1_apt_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AptArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1_apt_artifact_proto_msgTypes[2].OneofWrappers = []any{ (*ImportAptArtifactsRequest_GcsSource)(nil), } diff --git a/artifactregistry/apiv1/artifactregistrypb/artifact.pb.go b/artifactregistry/apiv1/artifactregistrypb/artifact.pb.go index 88bd9cb68eb4..f641936f6ff2 100755 --- a/artifactregistry/apiv1/artifactregistrypb/artifact.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/artifact.proto @@ -88,11 +88,9 @@ type DockerImage struct { func (x *DockerImage) Reset() { *x = DockerImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DockerImage) String() string { @@ -103,7 +101,7 @@ func (*DockerImage) ProtoMessage() {} func (x *DockerImage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,11 +191,9 @@ type ListDockerImagesRequest struct { func (x *ListDockerImagesRequest) Reset() { *x = ListDockerImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDockerImagesRequest) String() string { @@ -208,7 +204,7 @@ func (*ListDockerImagesRequest) ProtoMessage() {} func (x *ListDockerImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +262,9 @@ type ListDockerImagesResponse struct { func (x *ListDockerImagesResponse) Reset() { *x = ListDockerImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDockerImagesResponse) String() string { @@ -281,7 +275,7 @@ func (*ListDockerImagesResponse) ProtoMessage() {} func (x *ListDockerImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +316,9 @@ type GetDockerImageRequest struct { func (x *GetDockerImageRequest) Reset() { *x = GetDockerImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDockerImageRequest) String() string { @@ -337,7 +329,7 @@ func (*GetDockerImageRequest) ProtoMessage() {} func (x *GetDockerImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +386,9 @@ type MavenArtifact struct { func (x *MavenArtifact) Reset() { *x = MavenArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MavenArtifact) String() string { @@ -409,7 +399,7 @@ func (*MavenArtifact) ProtoMessage() {} func (x *MavenArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +480,9 @@ type ListMavenArtifactsRequest struct { func (x *ListMavenArtifactsRequest) Reset() { *x = ListMavenArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMavenArtifactsRequest) String() string { @@ -505,7 +493,7 @@ func (*ListMavenArtifactsRequest) ProtoMessage() {} func (x *ListMavenArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +544,9 @@ type ListMavenArtifactsResponse struct { func (x *ListMavenArtifactsResponse) Reset() { *x = ListMavenArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMavenArtifactsResponse) String() string { @@ -571,7 +557,7 @@ func (*ListMavenArtifactsResponse) ProtoMessage() {} func (x *ListMavenArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +598,9 @@ type GetMavenArtifactRequest struct { func (x *GetMavenArtifactRequest) Reset() { *x = GetMavenArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMavenArtifactRequest) String() string { @@ -627,7 +611,7 @@ func (*GetMavenArtifactRequest) ProtoMessage() {} func (x *GetMavenArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +661,9 @@ type NpmPackage struct { func (x *NpmPackage) Reset() { *x = NpmPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NpmPackage) String() string { @@ -692,7 +674,7 @@ func (*NpmPackage) ProtoMessage() {} func (x *NpmPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,11 +748,9 @@ type ListNpmPackagesRequest struct { func (x *ListNpmPackagesRequest) Reset() { *x = ListNpmPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNpmPackagesRequest) String() string { @@ -781,7 +761,7 @@ func (*ListNpmPackagesRequest) ProtoMessage() {} func (x *ListNpmPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +812,9 @@ type ListNpmPackagesResponse struct { func (x *ListNpmPackagesResponse) Reset() { *x = ListNpmPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNpmPackagesResponse) String() string { @@ -847,7 +825,7 @@ func (*ListNpmPackagesResponse) ProtoMessage() {} func (x *ListNpmPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +866,9 @@ type GetNpmPackageRequest struct { func (x *GetNpmPackageRequest) Reset() { *x = GetNpmPackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNpmPackageRequest) String() string { @@ -903,7 +879,7 @@ func (*GetNpmPackageRequest) ProtoMessage() {} func (x *GetNpmPackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +933,9 @@ type PythonPackage struct { func (x *PythonPackage) Reset() { *x = PythonPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PythonPackage) String() string { @@ -972,7 +946,7 @@ func (*PythonPackage) ProtoMessage() {} func (x *PythonPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,11 +1020,9 @@ type ListPythonPackagesRequest struct { func (x *ListPythonPackagesRequest) Reset() { *x = ListPythonPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPythonPackagesRequest) String() string { @@ -1061,7 +1033,7 @@ func (*ListPythonPackagesRequest) ProtoMessage() {} func (x *ListPythonPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1112,11 +1084,9 @@ type ListPythonPackagesResponse struct { func (x *ListPythonPackagesResponse) Reset() { *x = ListPythonPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPythonPackagesResponse) String() string { @@ -1127,7 +1097,7 @@ func (*ListPythonPackagesResponse) ProtoMessage() {} func (x *ListPythonPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1168,11 +1138,9 @@ type GetPythonPackageRequest struct { func (x *GetPythonPackageRequest) Reset() { *x = GetPythonPackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPythonPackageRequest) String() string { @@ -1183,7 +1151,7 @@ func (*GetPythonPackageRequest) ProtoMessage() {} func (x *GetPythonPackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,200 +1478,6 @@ func file_google_devtools_artifactregistry_v1_artifact_proto_init() { if File_google_devtools_artifactregistry_v1_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DockerImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDockerImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDockerImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDockerImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MavenArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListMavenArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListMavenArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetMavenArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NpmPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListNpmPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListNpmPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetNpmPackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PythonPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListPythonPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListPythonPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_artifact_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetPythonPackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/attachment.pb.go b/artifactregistry/apiv1/artifactregistrypb/attachment.pb.go index 51a9395e908a..018a73e73a85 100755 --- a/artifactregistry/apiv1/artifactregistrypb/attachment.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/attachment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/attachment.proto @@ -79,11 +79,9 @@ type Attachment struct { func (x *Attachment) Reset() { *x = Attachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attachment) String() string { @@ -94,7 +92,7 @@ func (*Attachment) ProtoMessage() {} func (x *Attachment) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,11 +193,9 @@ type ListAttachmentsRequest struct { func (x *ListAttachmentsRequest) Reset() { *x = ListAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachmentsRequest) String() string { @@ -210,7 +206,7 @@ func (*ListAttachmentsRequest) ProtoMessage() {} func (x *ListAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +264,9 @@ type ListAttachmentsResponse struct { func (x *ListAttachmentsResponse) Reset() { *x = ListAttachmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachmentsResponse) String() string { @@ -283,7 +277,7 @@ func (*ListAttachmentsResponse) ProtoMessage() {} func (x *ListAttachmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +318,9 @@ type GetAttachmentRequest struct { func (x *GetAttachmentRequest) Reset() { *x = GetAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttachmentRequest) String() string { @@ -339,7 +331,7 @@ func (*GetAttachmentRequest) ProtoMessage() {} func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +370,9 @@ type CreateAttachmentRequest struct { func (x *CreateAttachmentRequest) Reset() { *x = CreateAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAttachmentRequest) String() string { @@ -393,7 +383,7 @@ func (*CreateAttachmentRequest) ProtoMessage() {} func (x *CreateAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +431,9 @@ type DeleteAttachmentRequest struct { func (x *DeleteAttachmentRequest) Reset() { *x = DeleteAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAttachmentRequest) String() string { @@ -456,7 +444,7 @@ func (*DeleteAttachmentRequest) ProtoMessage() {} func (x *DeleteAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,80 +632,6 @@ func file_google_devtools_artifactregistry_v1_attachment_proto_init() { if File_google_devtools_artifactregistry_v1_attachment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_attachment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/file.pb.go b/artifactregistry/apiv1/artifactregistrypb/file.pb.go index d866ffbff6a6..7dee872ce475 100755 --- a/artifactregistry/apiv1/artifactregistrypb/file.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/file.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/file.proto @@ -105,11 +105,9 @@ type Hash struct { func (x *Hash) Reset() { *x = Hash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hash) String() string { @@ -120,7 +118,7 @@ func (*Hash) ProtoMessage() {} func (x *Hash) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -193,7 +189,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +330,9 @@ type ListFilesRequest struct { func (x *ListFilesRequest) Reset() { *x = ListFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesRequest) String() string { @@ -349,7 +343,7 @@ func (*ListFilesRequest) ProtoMessage() {} func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +408,9 @@ type ListFilesResponse struct { func (x *ListFilesResponse) Reset() { *x = ListFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesResponse) String() string { @@ -429,7 +421,7 @@ func (*ListFilesResponse) ProtoMessage() {} func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +462,9 @@ type GetFileRequest struct { func (x *GetFileRequest) Reset() { *x = GetFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFileRequest) String() string { @@ -485,7 +475,7 @@ func (*GetFileRequest) ProtoMessage() {} func (x *GetFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,11 +509,9 @@ type DeleteFileRequest struct { func (x *DeleteFileRequest) Reset() { *x = DeleteFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFileRequest) String() string { @@ -534,7 +522,7 @@ func (*DeleteFileRequest) ProtoMessage() {} func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +560,9 @@ type UpdateFileRequest struct { func (x *UpdateFileRequest) Reset() { *x = UpdateFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFileRequest) String() string { @@ -587,7 +573,7 @@ func (*UpdateFileRequest) ProtoMessage() {} func (x *UpdateFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_file_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,92 +776,6 @@ func file_google_devtools_artifactregistry_v1_file_proto_init() { if File_google_devtools_artifactregistry_v1_file_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Hash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_file_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/generic.pb.go b/artifactregistry/apiv1/artifactregistrypb/generic.pb.go index 2b047e11abf3..fa2f43f180a2 100755 --- a/artifactregistry/apiv1/artifactregistrypb/generic.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/generic.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/generic.proto @@ -59,11 +59,9 @@ type GenericArtifact struct { func (x *GenericArtifact) Reset() { *x = GenericArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_generic_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_generic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericArtifact) String() string { @@ -74,7 +72,7 @@ func (*GenericArtifact) ProtoMessage() {} func (x *GenericArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_generic_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,20 +202,6 @@ func file_google_devtools_artifactregistry_v1_generic_proto_init() { if File_google_devtools_artifactregistry_v1_generic_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_generic_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenericArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/package.pb.go b/artifactregistry/apiv1/artifactregistrypb/package.pb.go index 5caac3a0399a..93b289183777 100755 --- a/artifactregistry/apiv1/artifactregistrypb/package.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/package.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/package.proto @@ -61,11 +61,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -76,7 +74,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type ListPackagesRequest struct { func (x *ListPackagesRequest) Reset() { *x = ListPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPackagesRequest) String() string { @@ -205,7 +201,7 @@ func (*ListPackagesRequest) ProtoMessage() {} func (x *ListPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +266,9 @@ type ListPackagesResponse struct { func (x *ListPackagesResponse) Reset() { *x = ListPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPackagesResponse) String() string { @@ -285,7 +279,7 @@ func (*ListPackagesResponse) ProtoMessage() {} func (x *ListPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +320,9 @@ type GetPackageRequest struct { func (x *GetPackageRequest) Reset() { *x = GetPackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPackageRequest) String() string { @@ -341,7 +333,7 @@ func (*GetPackageRequest) ProtoMessage() {} func (x *GetPackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +367,9 @@ type DeletePackageRequest struct { func (x *DeletePackageRequest) Reset() { *x = DeletePackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePackageRequest) String() string { @@ -390,7 +380,7 @@ func (*DeletePackageRequest) ProtoMessage() {} func (x *DeletePackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +418,9 @@ type UpdatePackageRequest struct { func (x *UpdatePackageRequest) Reset() { *x = UpdatePackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePackageRequest) String() string { @@ -443,7 +431,7 @@ func (*UpdatePackageRequest) ProtoMessage() {} func (x *UpdatePackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_package_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,80 +612,6 @@ func file_google_devtools_artifactregistry_v1_package_proto_init() { if File_google_devtools_artifactregistry_v1_package_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetPackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeletePackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_package_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/repository.pb.go b/artifactregistry/apiv1/artifactregistrypb/repository.pb.go index aea61e30223f..7cbea29efcf7 100755 --- a/artifactregistry/apiv1/artifactregistrypb/repository.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/repository.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/repository.proto @@ -796,11 +796,9 @@ type UpstreamPolicy struct { func (x *UpstreamPolicy) Reset() { *x = UpstreamPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpstreamPolicy) String() string { @@ -811,7 +809,7 @@ func (*UpstreamPolicy) ProtoMessage() {} func (x *UpstreamPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +869,9 @@ type CleanupPolicyCondition struct { func (x *CleanupPolicyCondition) Reset() { *x = CleanupPolicyCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CleanupPolicyCondition) String() string { @@ -886,7 +882,7 @@ func (*CleanupPolicyCondition) ProtoMessage() {} func (x *CleanupPolicyCondition) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -958,11 +954,9 @@ type CleanupPolicyMostRecentVersions struct { func (x *CleanupPolicyMostRecentVersions) Reset() { *x = CleanupPolicyMostRecentVersions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CleanupPolicyMostRecentVersions) String() string { @@ -973,7 +967,7 @@ func (*CleanupPolicyMostRecentVersions) ProtoMessage() {} func (x *CleanupPolicyMostRecentVersions) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1015,9 @@ type CleanupPolicy struct { func (x *CleanupPolicy) Reset() { *x = CleanupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CleanupPolicy) String() string { @@ -1036,7 +1028,7 @@ func (*CleanupPolicy) ProtoMessage() {} func (x *CleanupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1118,11 +1110,9 @@ type VirtualRepositoryConfig struct { func (x *VirtualRepositoryConfig) Reset() { *x = VirtualRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualRepositoryConfig) String() string { @@ -1133,7 +1123,7 @@ func (*VirtualRepositoryConfig) ProtoMessage() {} func (x *VirtualRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1174,9 @@ type RemoteRepositoryConfig struct { func (x *RemoteRepositoryConfig) Reset() { *x = RemoteRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig) String() string { @@ -1199,7 +1187,7 @@ func (*RemoteRepositoryConfig) ProtoMessage() {} func (x *RemoteRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1418,11 +1406,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -1433,7 +1419,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1660,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -1689,7 +1673,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1738,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -1769,7 +1751,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1810,11 +1792,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -1825,7 +1805,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1864,11 +1844,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -1879,7 +1857,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1931,11 +1909,9 @@ type UpdateRepositoryRequest struct { func (x *UpdateRepositoryRequest) Reset() { *x = UpdateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRepositoryRequest) String() string { @@ -1946,7 +1922,7 @@ func (*UpdateRepositoryRequest) ProtoMessage() {} func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1987,11 +1963,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -2002,7 +1976,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2038,11 +2012,9 @@ type RemoteRepositoryConfig_UpstreamCredentials struct { func (x *RemoteRepositoryConfig_UpstreamCredentials) Reset() { *x = RemoteRepositoryConfig_UpstreamCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_UpstreamCredentials) String() string { @@ -2053,7 +2025,7 @@ func (*RemoteRepositoryConfig_UpstreamCredentials) ProtoMessage() {} func (x *RemoteRepositoryConfig_UpstreamCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2111,11 +2083,9 @@ type RemoteRepositoryConfig_DockerRepository struct { func (x *RemoteRepositoryConfig_DockerRepository) Reset() { *x = RemoteRepositoryConfig_DockerRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_DockerRepository) String() string { @@ -2126,7 +2096,7 @@ func (*RemoteRepositoryConfig_DockerRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_DockerRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2200,11 +2170,9 @@ type RemoteRepositoryConfig_MavenRepository struct { func (x *RemoteRepositoryConfig_MavenRepository) Reset() { *x = RemoteRepositoryConfig_MavenRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_MavenRepository) String() string { @@ -2215,7 +2183,7 @@ func (*RemoteRepositoryConfig_MavenRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_MavenRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2257,9 @@ type RemoteRepositoryConfig_NpmRepository struct { func (x *RemoteRepositoryConfig_NpmRepository) Reset() { *x = RemoteRepositoryConfig_NpmRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_NpmRepository) String() string { @@ -2304,7 +2270,7 @@ func (*RemoteRepositoryConfig_NpmRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_NpmRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2344,9 @@ type RemoteRepositoryConfig_PythonRepository struct { func (x *RemoteRepositoryConfig_PythonRepository) Reset() { *x = RemoteRepositoryConfig_PythonRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_PythonRepository) String() string { @@ -2393,7 +2357,7 @@ func (*RemoteRepositoryConfig_PythonRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_PythonRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2467,11 +2431,9 @@ type RemoteRepositoryConfig_AptRepository struct { func (x *RemoteRepositoryConfig_AptRepository) Reset() { *x = RemoteRepositoryConfig_AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_AptRepository) String() string { @@ -2482,7 +2444,7 @@ func (*RemoteRepositoryConfig_AptRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2556,11 +2518,9 @@ type RemoteRepositoryConfig_YumRepository struct { func (x *RemoteRepositoryConfig_YumRepository) Reset() { *x = RemoteRepositoryConfig_YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_YumRepository) String() string { @@ -2571,7 +2531,7 @@ func (*RemoteRepositoryConfig_YumRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2640,11 +2600,9 @@ type RemoteRepositoryConfig_CommonRemoteRepository struct { func (x *RemoteRepositoryConfig_CommonRemoteRepository) Reset() { *x = RemoteRepositoryConfig_CommonRemoteRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_CommonRemoteRepository) String() string { @@ -2655,7 +2613,7 @@ func (*RemoteRepositoryConfig_CommonRemoteRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_CommonRemoteRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2693,11 +2651,9 @@ type RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials stru func (x *RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials) Reset() { *x = RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials) String() string { @@ -2708,7 +2664,7 @@ func (*RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials) P func (x *RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2750,11 +2706,9 @@ type RemoteRepositoryConfig_DockerRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_DockerRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_DockerRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_DockerRepository_CustomRepository) String() string { @@ -2765,7 +2719,7 @@ func (*RemoteRepositoryConfig_DockerRepository_CustomRepository) ProtoMessage() func (x *RemoteRepositoryConfig_DockerRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2800,11 +2754,9 @@ type RemoteRepositoryConfig_MavenRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_MavenRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_MavenRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_MavenRepository_CustomRepository) String() string { @@ -2815,7 +2767,7 @@ func (*RemoteRepositoryConfig_MavenRepository_CustomRepository) ProtoMessage() { func (x *RemoteRepositoryConfig_MavenRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2802,9 @@ type RemoteRepositoryConfig_NpmRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_NpmRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_NpmRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_NpmRepository_CustomRepository) String() string { @@ -2865,7 +2815,7 @@ func (*RemoteRepositoryConfig_NpmRepository_CustomRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_NpmRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2900,11 +2850,9 @@ type RemoteRepositoryConfig_PythonRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_PythonRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_PythonRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_PythonRepository_CustomRepository) String() string { @@ -2915,7 +2863,7 @@ func (*RemoteRepositoryConfig_PythonRepository_CustomRepository) ProtoMessage() func (x *RemoteRepositoryConfig_PythonRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2952,11 +2900,9 @@ type RemoteRepositoryConfig_AptRepository_PublicRepository struct { func (x *RemoteRepositoryConfig_AptRepository_PublicRepository) Reset() { *x = RemoteRepositoryConfig_AptRepository_PublicRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_AptRepository_PublicRepository) String() string { @@ -2967,7 +2913,7 @@ func (*RemoteRepositoryConfig_AptRepository_PublicRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_AptRepository_PublicRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3009,11 +2955,9 @@ type RemoteRepositoryConfig_AptRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_AptRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_AptRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_AptRepository_CustomRepository) String() string { @@ -3024,7 +2968,7 @@ func (*RemoteRepositoryConfig_AptRepository_CustomRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_AptRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3061,11 +3005,9 @@ type RemoteRepositoryConfig_YumRepository_PublicRepository struct { func (x *RemoteRepositoryConfig_YumRepository_PublicRepository) Reset() { *x = RemoteRepositoryConfig_YumRepository_PublicRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_YumRepository_PublicRepository) String() string { @@ -3076,7 +3018,7 @@ func (*RemoteRepositoryConfig_YumRepository_PublicRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_YumRepository_PublicRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3118,11 +3060,9 @@ type RemoteRepositoryConfig_YumRepository_CustomRepository struct { func (x *RemoteRepositoryConfig_YumRepository_CustomRepository) Reset() { *x = RemoteRepositoryConfig_YumRepository_CustomRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoteRepositoryConfig_YumRepository_CustomRepository) String() string { @@ -3133,7 +3073,7 @@ func (*RemoteRepositoryConfig_YumRepository_CustomRepository) ProtoMessage() {} func (x *RemoteRepositoryConfig_YumRepository_CustomRepository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3172,11 +3112,9 @@ type Repository_MavenRepositoryConfig struct { func (x *Repository_MavenRepositoryConfig) Reset() { *x = Repository_MavenRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_MavenRepositoryConfig) String() string { @@ -3187,7 +3125,7 @@ func (*Repository_MavenRepositoryConfig) ProtoMessage() {} func (x *Repository_MavenRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3232,11 +3170,9 @@ type Repository_DockerRepositoryConfig struct { func (x *Repository_DockerRepositoryConfig) Reset() { *x = Repository_DockerRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_DockerRepositoryConfig) String() string { @@ -3247,7 +3183,7 @@ func (*Repository_DockerRepositoryConfig) ProtoMessage() {} func (x *Repository_DockerRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3290,11 +3226,9 @@ type Repository_VulnerabilityScanningConfig struct { func (x *Repository_VulnerabilityScanningConfig) Reset() { *x = Repository_VulnerabilityScanningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_VulnerabilityScanningConfig) String() string { @@ -3305,7 +3239,7 @@ func (*Repository_VulnerabilityScanningConfig) ProtoMessage() {} func (x *Repository_VulnerabilityScanningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4152,404 +4086,6 @@ func file_google_devtools_artifactregistry_v1_repository_proto_init() { if File_google_devtools_artifactregistry_v1_repository_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpstreamPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CleanupPolicyCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CleanupPolicyMostRecentVersions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CleanupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VirtualRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_UpstreamCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_DockerRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_MavenRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_NpmRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_PythonRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_CommonRemoteRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_DockerRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_MavenRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_NpmRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_PythonRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_AptRepository_PublicRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_AptRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_YumRepository_PublicRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RemoteRepositoryConfig_YumRepository_CustomRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Repository_MavenRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Repository_DockerRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Repository_VulnerabilityScanningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[1].OneofWrappers = []any{} file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[2].OneofWrappers = []any{} file_google_devtools_artifactregistry_v1_repository_proto_msgTypes[3].OneofWrappers = []any{ diff --git a/artifactregistry/apiv1/artifactregistrypb/rule.pb.go b/artifactregistry/apiv1/artifactregistrypb/rule.pb.go index fe65e34c1302..9369191fcdfd 100755 --- a/artifactregistry/apiv1/artifactregistrypb/rule.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/rule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/rule.proto @@ -164,11 +164,9 @@ type Rule struct { func (x *Rule) Reset() { *x = Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule) String() string { @@ -179,7 +177,7 @@ func (*Rule) ProtoMessage() {} func (x *Rule) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type ListRulesRequest struct { func (x *ListRulesRequest) Reset() { *x = ListRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRulesRequest) String() string { @@ -262,7 +258,7 @@ func (*ListRulesRequest) ProtoMessage() {} func (x *ListRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +309,9 @@ type ListRulesResponse struct { func (x *ListRulesResponse) Reset() { *x = ListRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRulesResponse) String() string { @@ -328,7 +322,7 @@ func (*ListRulesResponse) ProtoMessage() {} func (x *ListRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +363,9 @@ type GetRuleRequest struct { func (x *GetRuleRequest) Reset() { *x = GetRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleRequest) String() string { @@ -384,7 +376,7 @@ func (*GetRuleRequest) ProtoMessage() {} func (x *GetRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +414,9 @@ type CreateRuleRequest struct { func (x *CreateRuleRequest) Reset() { *x = CreateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRuleRequest) String() string { @@ -437,7 +427,7 @@ func (*CreateRuleRequest) ProtoMessage() {} func (x *CreateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +479,9 @@ type UpdateRuleRequest struct { func (x *UpdateRuleRequest) Reset() { *x = UpdateRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRuleRequest) String() string { @@ -504,7 +492,7 @@ func (*UpdateRuleRequest) ProtoMessage() {} func (x *UpdateRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +533,9 @@ type DeleteRuleRequest struct { func (x *DeleteRuleRequest) Reset() { *x = DeleteRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRuleRequest) String() string { @@ -560,7 +546,7 @@ func (*DeleteRuleRequest) ProtoMessage() {} func (x *DeleteRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,92 +729,6 @@ func file_google_devtools_artifactregistry_v1_rule_proto_init() { if File_google_devtools_artifactregistry_v1_rule_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_rule_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/service.pb.go b/artifactregistry/apiv1/artifactregistrypb/service.pb.go index 8c6bc33940db..5eff550f4a1c 100755 --- a/artifactregistry/apiv1/artifactregistrypb/service.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/service.proto @@ -52,11 +52,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -67,7 +65,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,20 +1078,6 @@ func file_google_devtools_artifactregistry_v1_service_proto_init() { file_google_devtools_artifactregistry_v1_version_proto_init() file_google_devtools_artifactregistry_v1_vpcsc_config_proto_init() file_google_devtools_artifactregistry_v1_yum_artifact_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/settings.pb.go b/artifactregistry/apiv1/artifactregistrypb/settings.pb.go index 407e600fcfa8..bb9c22b84f2f 100755 --- a/artifactregistry/apiv1/artifactregistrypb/settings.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/settings.proto @@ -127,11 +127,9 @@ type ProjectSettings struct { func (x *ProjectSettings) Reset() { *x = ProjectSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectSettings) String() string { @@ -142,7 +140,7 @@ func (*ProjectSettings) ProtoMessage() {} func (x *ProjectSettings) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type GetProjectSettingsRequest struct { func (x *GetProjectSettingsRequest) Reset() { *x = GetProjectSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectSettingsRequest) String() string { @@ -205,7 +201,7 @@ func (*GetProjectSettingsRequest) ProtoMessage() {} func (x *GetProjectSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +237,9 @@ type UpdateProjectSettingsRequest struct { func (x *UpdateProjectSettingsRequest) Reset() { *x = UpdateProjectSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProjectSettingsRequest) String() string { @@ -256,7 +250,7 @@ func (*UpdateProjectSettingsRequest) ProtoMessage() {} func (x *UpdateProjectSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,44 +403,6 @@ func file_google_devtools_artifactregistry_v1_settings_proto_init() { if File_google_devtools_artifactregistry_v1_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProjectSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProjectSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/tag.pb.go b/artifactregistry/apiv1/artifactregistrypb/tag.pb.go index 90997ff57ac9..2a622654fd82 100755 --- a/artifactregistry/apiv1/artifactregistrypb/tag.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/tag.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/tag.proto @@ -59,11 +59,9 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tag) String() string { @@ -74,7 +72,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListTagsRequest struct { func (x *ListTagsRequest) Reset() { *x = ListTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsRequest) String() string { @@ -167,7 +163,7 @@ func (*ListTagsRequest) ProtoMessage() {} func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +221,9 @@ type ListTagsResponse struct { func (x *ListTagsResponse) Reset() { *x = ListTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsResponse) String() string { @@ -240,7 +234,7 @@ func (*ListTagsResponse) ProtoMessage() {} func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type GetTagRequest struct { func (x *GetTagRequest) Reset() { *x = GetTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagRequest) String() string { @@ -296,7 +288,7 @@ func (*GetTagRequest) ProtoMessage() {} func (x *GetTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type CreateTagRequest struct { func (x *CreateTagRequest) Reset() { *x = CreateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagRequest) String() string { @@ -349,7 +339,7 @@ func (*CreateTagRequest) ProtoMessage() {} func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +391,9 @@ type UpdateTagRequest struct { func (x *UpdateTagRequest) Reset() { *x = UpdateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagRequest) String() string { @@ -416,7 +404,7 @@ func (*UpdateTagRequest) ProtoMessage() {} func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +445,9 @@ type DeleteTagRequest struct { func (x *DeleteTagRequest) Reset() { *x = DeleteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagRequest) String() string { @@ -472,7 +458,7 @@ func (*DeleteTagRequest) ProtoMessage() {} func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,92 +600,6 @@ func file_google_devtools_artifactregistry_v1_tag_proto_init() { if File_google_devtools_artifactregistry_v1_tag_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_tag_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/version.pb.go b/artifactregistry/apiv1/artifactregistrypb/version.pb.go index f73e78d2b11a..b85dd1008b22 100755 --- a/artifactregistry/apiv1/artifactregistrypb/version.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/version.proto @@ -128,11 +128,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -143,7 +141,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +274,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -291,7 +287,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +359,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -378,7 +372,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +415,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -436,7 +428,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +472,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -495,7 +485,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +531,9 @@ type BatchDeleteVersionsRequest struct { func (x *BatchDeleteVersionsRequest) Reset() { *x = BatchDeleteVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteVersionsRequest) String() string { @@ -556,7 +544,7 @@ func (*BatchDeleteVersionsRequest) ProtoMessage() {} func (x *BatchDeleteVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +592,9 @@ type BatchDeleteVersionsMetadata struct { func (x *BatchDeleteVersionsMetadata) Reset() { *x = BatchDeleteVersionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteVersionsMetadata) String() string { @@ -619,7 +605,7 @@ func (*BatchDeleteVersionsMetadata) ProtoMessage() {} func (x *BatchDeleteVersionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +643,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -672,7 +656,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_version_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,104 +886,6 @@ func file_google_devtools_artifactregistry_v1_version_proto_init() { return } file_google_devtools_artifactregistry_v1_tag_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteVersionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_version_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/vpcsc_config.pb.go b/artifactregistry/apiv1/artifactregistrypb/vpcsc_config.pb.go index 42bf1745dad0..354d56bc8209 100755 --- a/artifactregistry/apiv1/artifactregistrypb/vpcsc_config.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/vpcsc_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/vpcsc_config.proto @@ -115,11 +115,9 @@ type VPCSCConfig struct { func (x *VPCSCConfig) Reset() { *x = VPCSCConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VPCSCConfig) String() string { @@ -130,7 +128,7 @@ func (*VPCSCConfig) ProtoMessage() {} func (x *VPCSCConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +169,9 @@ type GetVPCSCConfigRequest struct { func (x *GetVPCSCConfigRequest) Reset() { *x = GetVPCSCConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVPCSCConfigRequest) String() string { @@ -186,7 +182,7 @@ func (*GetVPCSCConfigRequest) ProtoMessage() {} func (x *GetVPCSCConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +218,9 @@ type UpdateVPCSCConfigRequest struct { func (x *UpdateVPCSCConfigRequest) Reset() { *x = UpdateVPCSCConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVPCSCConfigRequest) String() string { @@ -237,7 +231,7 @@ func (*UpdateVPCSCConfigRequest) ProtoMessage() {} func (x *UpdateVPCSCConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,44 +366,6 @@ func file_google_devtools_artifactregistry_v1_vpcsc_config_proto_init() { if File_google_devtools_artifactregistry_v1_vpcsc_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VPCSCConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVPCSCConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_vpcsc_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVPCSCConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1/artifactregistrypb/yum_artifact.pb.go b/artifactregistry/apiv1/artifactregistrypb/yum_artifact.pb.go index 8feee12e5073..03ce96de1dcb 100755 --- a/artifactregistry/apiv1/artifactregistrypb/yum_artifact.pb.go +++ b/artifactregistry/apiv1/artifactregistrypb/yum_artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1/yum_artifact.proto @@ -108,11 +108,9 @@ type YumArtifact struct { func (x *YumArtifact) Reset() { *x = YumArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumArtifact) String() string { @@ -123,7 +121,7 @@ func (*YumArtifact) ProtoMessage() {} func (x *YumArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type ImportYumArtifactsGcsSource struct { func (x *ImportYumArtifactsGcsSource) Reset() { *x = ImportYumArtifactsGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsGcsSource) String() string { @@ -195,7 +191,7 @@ func (*ImportYumArtifactsGcsSource) ProtoMessage() {} func (x *ImportYumArtifactsGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +238,9 @@ type ImportYumArtifactsRequest struct { func (x *ImportYumArtifactsRequest) Reset() { *x = ImportYumArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsRequest) String() string { @@ -257,7 +251,7 @@ func (*ImportYumArtifactsRequest) ProtoMessage() {} func (x *ImportYumArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +316,9 @@ type ImportYumArtifactsErrorInfo struct { func (x *ImportYumArtifactsErrorInfo) Reset() { *x = ImportYumArtifactsErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsErrorInfo) String() string { @@ -337,7 +329,7 @@ func (*ImportYumArtifactsErrorInfo) ProtoMessage() {} func (x *ImportYumArtifactsErrorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +390,9 @@ type ImportYumArtifactsResponse struct { func (x *ImportYumArtifactsResponse) Reset() { *x = ImportYumArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsResponse) String() string { @@ -413,7 +403,7 @@ func (*ImportYumArtifactsResponse) ProtoMessage() {} func (x *ImportYumArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +441,9 @@ type ImportYumArtifactsMetadata struct { func (x *ImportYumArtifactsMetadata) Reset() { *x = ImportYumArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsMetadata) String() string { @@ -466,7 +454,7 @@ func (*ImportYumArtifactsMetadata) ProtoMessage() {} func (x *ImportYumArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,80 +614,6 @@ func file_google_devtools_artifactregistry_v1_yum_artifact_proto_init() { if File_google_devtools_artifactregistry_v1_yum_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*YumArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1_yum_artifact_proto_msgTypes[2].OneofWrappers = []any{ (*ImportYumArtifactsRequest_GcsSource)(nil), } diff --git a/artifactregistry/apiv1/helpers.go b/artifactregistry/apiv1/helpers.go index f1d447372b08..5c2b5bfb7b4e 100755 --- a/artifactregistry/apiv1/helpers.go +++ b/artifactregistry/apiv1/helpers.go @@ -18,10 +18,20 @@ package artifactregistry import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "artifactregistry.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/artifactregistry/apiv1beta2/artifact_registry_client.go b/artifactregistry/apiv1beta2/artifact_registry_client.go index 3f57169cca65..6b2a14637b69 100755 --- a/artifactregistry/apiv1beta2/artifact_registry_client.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -792,6 +791,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new artifact registry client based on gRPC. @@ -834,6 +835,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: artifactregistrypb.NewArtifactRegistryClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -897,6 +899,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new artifact registry rest client. @@ -930,6 +934,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -992,7 +997,7 @@ func (c *gRPCClient) ImportAptArtifacts(ctx context.Context, req *artifactregist var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportAptArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportAptArtifacts, req, settings.GRPC, c.logger, "ImportAptArtifacts") return err }, opts...) if err != nil { @@ -1012,7 +1017,7 @@ func (c *gRPCClient) ImportYumArtifacts(ctx context.Context, req *artifactregist var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportYumArtifacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportYumArtifacts, req, settings.GRPC, c.logger, "ImportYumArtifacts") return err }, opts...) if err != nil { @@ -1043,7 +1048,7 @@ func (c *gRPCClient) ListRepositories(ctx context.Context, req *artifactregistry } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *gRPCClient) GetRepository(ctx context.Context, req *artifactregistrypb. var resp *artifactregistrypb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -1096,7 +1101,7 @@ func (c *gRPCClient) CreateRepository(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -1116,7 +1121,7 @@ func (c *gRPCClient) UpdateRepository(ctx context.Context, req *artifactregistry var resp *artifactregistrypb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRepository, req, settings.GRPC, c.logger, "UpdateRepository") return err }, opts...) if err != nil { @@ -1134,7 +1139,7 @@ func (c *gRPCClient) DeleteRepository(ctx context.Context, req *artifactregistry var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *gRPCClient) ListPackages(ctx context.Context, req *artifactregistrypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPackages, req, settings.GRPC, c.logger, "ListPackages") return err }, opts...) if err != nil { @@ -1200,7 +1205,7 @@ func (c *gRPCClient) GetPackage(ctx context.Context, req *artifactregistrypb.Get var resp *artifactregistrypb.Package err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPackage, req, settings.GRPC, c.logger, "GetPackage") return err }, opts...) if err != nil { @@ -1218,7 +1223,7 @@ func (c *gRPCClient) DeletePackage(ctx context.Context, req *artifactregistrypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePackage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePackage, req, settings.GRPC, c.logger, "DeletePackage") return err }, opts...) if err != nil { @@ -1249,7 +1254,7 @@ func (c *gRPCClient) ListVersions(ctx context.Context, req *artifactregistrypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -1284,7 +1289,7 @@ func (c *gRPCClient) GetVersion(ctx context.Context, req *artifactregistrypb.Get var resp *artifactregistrypb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -1302,7 +1307,7 @@ func (c *gRPCClient) DeleteVersion(ctx context.Context, req *artifactregistrypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) if err != nil { @@ -1333,7 +1338,7 @@ func (c *gRPCClient) ListFiles(ctx context.Context, req *artifactregistrypb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFiles, req, settings.GRPC, c.logger, "ListFiles") return err }, opts...) if err != nil { @@ -1368,7 +1373,7 @@ func (c *gRPCClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFil var resp *artifactregistrypb.File err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFile, req, settings.GRPC, c.logger, "GetFile") return err }, opts...) if err != nil { @@ -1397,7 +1402,7 @@ func (c *gRPCClient) ListTags(ctx context.Context, req *artifactregistrypb.ListT } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTags, req, settings.GRPC, c.logger, "ListTags") return err }, opts...) if err != nil { @@ -1432,7 +1437,7 @@ func (c *gRPCClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagR var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTag, req, settings.GRPC, c.logger, "GetTag") return err }, opts...) if err != nil { @@ -1450,7 +1455,7 @@ func (c *gRPCClient) CreateTag(ctx context.Context, req *artifactregistrypb.Crea var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTag, req, settings.GRPC, c.logger, "CreateTag") return err }, opts...) if err != nil { @@ -1468,7 +1473,7 @@ func (c *gRPCClient) UpdateTag(ctx context.Context, req *artifactregistrypb.Upda var resp *artifactregistrypb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTag, req, settings.GRPC, c.logger, "UpdateTag") return err }, opts...) if err != nil { @@ -1485,7 +1490,7 @@ func (c *gRPCClient) DeleteTag(ctx context.Context, req *artifactregistrypb.Dele opts = append((*c.CallOptions).DeleteTag[0:len((*c.CallOptions).DeleteTag):len((*c.CallOptions).DeleteTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTag, req, settings.GRPC, c.logger, "DeleteTag") return err }, opts...) return err @@ -1500,7 +1505,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1518,7 +1523,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1536,7 +1541,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1554,7 +1559,7 @@ func (c *gRPCClient) GetProjectSettings(ctx context.Context, req *artifactregist var resp *artifactregistrypb.ProjectSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProjectSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProjectSettings, req, settings.GRPC, c.logger, "GetProjectSettings") return err }, opts...) if err != nil { @@ -1572,7 +1577,7 @@ func (c *gRPCClient) UpdateProjectSettings(ctx context.Context, req *artifactreg var resp *artifactregistrypb.ProjectSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateProjectSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateProjectSettings, req, settings.GRPC, c.logger, "UpdateProjectSettings") return err }, opts...) if err != nil { @@ -1590,7 +1595,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1619,7 +1624,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1686,21 +1691,10 @@ func (c *restClient) ImportAptArtifacts(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAptArtifacts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1759,21 +1753,10 @@ func (c *restClient) ImportYumArtifacts(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportYumArtifacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1836,21 +1819,10 @@ func (c *restClient) ListRepositories(ctx context.Context, req *artifactregistry } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1913,17 +1885,7 @@ func (c *restClient) GetRepository(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -1983,21 +1945,10 @@ func (c *restClient) CreateRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2062,17 +2013,7 @@ func (c *restClient) UpdateRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRepository") if err != nil { return err } @@ -2123,21 +2064,10 @@ func (c *restClient) DeleteRepository(ctx context.Context, req *artifactregistry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2200,21 +2130,10 @@ func (c *restClient) ListPackages(ctx context.Context, req *artifactregistrypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPackages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2277,17 +2196,7 @@ func (c *restClient) GetPackage(ctx context.Context, req *artifactregistrypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPackage") if err != nil { return err } @@ -2337,21 +2246,10 @@ func (c *restClient) DeletePackage(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePackage") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2420,21 +2318,10 @@ func (c *restClient) ListVersions(ctx context.Context, req *artifactregistrypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2500,17 +2387,7 @@ func (c *restClient) GetVersion(ctx context.Context, req *artifactregistrypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -2563,21 +2440,10 @@ func (c *restClient) DeleteVersion(ctx context.Context, req *artifactregistrypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2643,21 +2509,10 @@ func (c *restClient) ListFiles(ctx context.Context, req *artifactregistrypb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2720,17 +2575,7 @@ func (c *restClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFile") if err != nil { return err } @@ -2795,21 +2640,10 @@ func (c *restClient) ListTags(ctx context.Context, req *artifactregistrypb.ListT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2872,17 +2706,7 @@ func (c *restClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTag") if err != nil { return err } @@ -2942,17 +2766,7 @@ func (c *restClient) CreateTag(ctx context.Context, req *artifactregistrypb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTag") if err != nil { return err } @@ -3016,17 +2830,7 @@ func (c *restClient) UpdateTag(ctx context.Context, req *artifactregistrypb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTag") if err != nil { return err } @@ -3073,15 +2877,8 @@ func (c *restClient) DeleteTag(ctx context.Context, req *artifactregistrypb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTag") + return err }, opts...) } @@ -3124,17 +2921,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3187,17 +2974,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3253,17 +3030,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3313,17 +3080,7 @@ func (c *restClient) GetProjectSettings(ctx context.Context, req *artifactregist httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProjectSettings") if err != nil { return err } @@ -3387,17 +3144,7 @@ func (c *restClient) UpdateProjectSettings(ctx context.Context, req *artifactreg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProjectSettings") if err != nil { return err } @@ -3447,17 +3194,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3522,21 +3259,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/artifactregistry/apiv1beta2/artifact_registry_client_example_go123_test.go b/artifactregistry/apiv1beta2/artifact_registry_client_example_go123_test.go index af0249c7c81d..8074f6816bba 100644 --- a/artifactregistry/apiv1beta2/artifact_registry_client_example_go123_test.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListFiles_all() { } for resp, err := range c.ListFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListPackages_all() { } for resp, err := range c.ListPackages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListTags_all() { } for resp, err := range c.ListTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go index 79223a65886f..5322e2515952 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto @@ -114,11 +114,9 @@ type AptArtifact struct { func (x *AptArtifact) Reset() { *x = AptArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptArtifact) String() string { @@ -129,7 +127,7 @@ func (*AptArtifact) ProtoMessage() {} func (x *AptArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type ImportAptArtifactsGcsSource struct { func (x *ImportAptArtifactsGcsSource) Reset() { *x = ImportAptArtifactsGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsGcsSource) String() string { @@ -215,7 +211,7 @@ func (*ImportAptArtifactsGcsSource) ProtoMessage() {} func (x *ImportAptArtifactsGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +258,9 @@ type ImportAptArtifactsRequest struct { func (x *ImportAptArtifactsRequest) Reset() { *x = ImportAptArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsRequest) String() string { @@ -277,7 +271,7 @@ func (*ImportAptArtifactsRequest) ProtoMessage() {} func (x *ImportAptArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +336,9 @@ type ImportAptArtifactsErrorInfo struct { func (x *ImportAptArtifactsErrorInfo) Reset() { *x = ImportAptArtifactsErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsErrorInfo) String() string { @@ -357,7 +349,7 @@ func (*ImportAptArtifactsErrorInfo) ProtoMessage() {} func (x *ImportAptArtifactsErrorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type ImportAptArtifactsResponse struct { func (x *ImportAptArtifactsResponse) Reset() { *x = ImportAptArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsResponse) String() string { @@ -433,7 +423,7 @@ func (*ImportAptArtifactsResponse) ProtoMessage() {} func (x *ImportAptArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +461,9 @@ type ImportAptArtifactsMetadata struct { func (x *ImportAptArtifactsMetadata) Reset() { *x = ImportAptArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAptArtifactsMetadata) String() string { @@ -486,7 +474,7 @@ func (*ImportAptArtifactsMetadata) ProtoMessage() {} func (x *ImportAptArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,80 +643,6 @@ func file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_init() { if File_google_devtools_artifactregistry_v1beta2_apt_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AptArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportAptArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2].OneofWrappers = []any{ (*ImportAptArtifactsRequest_GcsSource)(nil), } diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go index e0068228b94e..02888086300d 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/file.proto @@ -104,11 +104,9 @@ type Hash struct { func (x *Hash) Reset() { *x = Hash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hash) String() string { @@ -119,7 +117,7 @@ func (*Hash) ProtoMessage() {} func (x *Hash) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,11 +170,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -187,7 +183,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type ListFilesRequest struct { func (x *ListFilesRequest) Reset() { *x = ListFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesRequest) String() string { @@ -291,7 +285,7 @@ func (*ListFilesRequest) ProtoMessage() {} func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +343,9 @@ type ListFilesResponse struct { func (x *ListFilesResponse) Reset() { *x = ListFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFilesResponse) String() string { @@ -364,7 +356,7 @@ func (*ListFilesResponse) ProtoMessage() {} func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +397,9 @@ type GetFileRequest struct { func (x *GetFileRequest) Reset() { *x = GetFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFileRequest) String() string { @@ -420,7 +410,7 @@ func (*GetFileRequest) ProtoMessage() {} func (x *GetFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,68 +560,6 @@ func file_google_devtools_artifactregistry_v1beta2_file_proto_init() { if File_google_devtools_artifactregistry_v1beta2_file_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Hash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go index 54ee60de0c6b..685b0f92d87e 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/package.proto @@ -56,11 +56,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -71,7 +69,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type ListPackagesRequest struct { func (x *ListPackagesRequest) Reset() { *x = ListPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPackagesRequest) String() string { @@ -146,7 +142,7 @@ func (*ListPackagesRequest) ProtoMessage() {} func (x *ListPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type ListPackagesResponse struct { func (x *ListPackagesResponse) Reset() { *x = ListPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPackagesResponse) String() string { @@ -212,7 +206,7 @@ func (*ListPackagesResponse) ProtoMessage() {} func (x *ListPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +247,9 @@ type GetPackageRequest struct { func (x *GetPackageRequest) Reset() { *x = GetPackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPackageRequest) String() string { @@ -268,7 +260,7 @@ func (*GetPackageRequest) ProtoMessage() {} func (x *GetPackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +294,9 @@ type DeletePackageRequest struct { func (x *DeletePackageRequest) Reset() { *x = DeletePackageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePackageRequest) String() string { @@ -317,7 +307,7 @@ func (*DeletePackageRequest) ProtoMessage() {} func (x *DeletePackageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,68 +430,6 @@ func file_google_devtools_artifactregistry_v1beta2_package_proto_init() { if File_google_devtools_artifactregistry_v1beta2_package_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetPackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeletePackageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go index b1d61966541d..71d393e7ed8f 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/repository.proto @@ -200,11 +200,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -215,7 +213,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +319,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -336,7 +332,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +383,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -402,7 +396,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +437,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -458,7 +450,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +488,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -511,7 +501,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +553,9 @@ type UpdateRepositoryRequest struct { func (x *UpdateRepositoryRequest) Reset() { *x = UpdateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRepositoryRequest) String() string { @@ -578,7 +566,7 @@ func (*UpdateRepositoryRequest) ProtoMessage() {} func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +607,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -634,7 +620,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +659,9 @@ type Repository_MavenRepositoryConfig struct { func (x *Repository_MavenRepositoryConfig) Reset() { *x = Repository_MavenRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_MavenRepositoryConfig) String() string { @@ -688,7 +672,7 @@ func (*Repository_MavenRepositoryConfig) ProtoMessage() {} func (x *Repository_MavenRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,104 +916,6 @@ func file_google_devtools_artifactregistry_v1beta2_repository_proto_init() { if File_google_devtools_artifactregistry_v1beta2_repository_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Repository_MavenRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0].OneofWrappers = []any{ (*Repository_MavenConfig)(nil), } diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go index 8acd25d431b2..38309363758d 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/service.proto @@ -52,11 +52,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -67,7 +65,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,20 +660,6 @@ func file_google_devtools_artifactregistry_v1beta2_service_proto_init() { file_google_devtools_artifactregistry_v1beta2_tag_proto_init() file_google_devtools_artifactregistry_v1beta2_version_proto_init() file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go index 80e19b93fc56..2213702d57e4 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/settings.proto @@ -114,11 +114,9 @@ type ProjectSettings struct { func (x *ProjectSettings) Reset() { *x = ProjectSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectSettings) String() string { @@ -129,7 +127,7 @@ func (*ProjectSettings) ProtoMessage() {} func (x *ProjectSettings) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type GetProjectSettingsRequest struct { func (x *GetProjectSettingsRequest) Reset() { *x = GetProjectSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectSettingsRequest) String() string { @@ -185,7 +181,7 @@ func (*GetProjectSettingsRequest) ProtoMessage() {} func (x *GetProjectSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type UpdateProjectSettingsRequest struct { func (x *UpdateProjectSettingsRequest) Reset() { *x = UpdateProjectSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProjectSettingsRequest) String() string { @@ -236,7 +230,7 @@ func (*UpdateProjectSettingsRequest) ProtoMessage() {} func (x *UpdateProjectSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,44 +377,6 @@ func file_google_devtools_artifactregistry_v1beta2_settings_proto_init() { if File_google_devtools_artifactregistry_v1beta2_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProjectSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProjectSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go index 3902974815ef..832cd1cccdc5 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/tag.proto @@ -59,11 +59,9 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tag) String() string { @@ -74,7 +72,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type ListTagsRequest struct { func (x *ListTagsRequest) Reset() { *x = ListTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsRequest) String() string { @@ -144,7 +140,7 @@ func (*ListTagsRequest) ProtoMessage() {} func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type ListTagsResponse struct { func (x *ListTagsResponse) Reset() { *x = ListTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsResponse) String() string { @@ -217,7 +211,7 @@ func (*ListTagsResponse) ProtoMessage() {} func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +252,9 @@ type GetTagRequest struct { func (x *GetTagRequest) Reset() { *x = GetTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagRequest) String() string { @@ -273,7 +265,7 @@ func (*GetTagRequest) ProtoMessage() {} func (x *GetTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +303,9 @@ type CreateTagRequest struct { func (x *CreateTagRequest) Reset() { *x = CreateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagRequest) String() string { @@ -326,7 +316,7 @@ func (*CreateTagRequest) ProtoMessage() {} func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +368,9 @@ type UpdateTagRequest struct { func (x *UpdateTagRequest) Reset() { *x = UpdateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagRequest) String() string { @@ -393,7 +381,7 @@ func (*UpdateTagRequest) ProtoMessage() {} func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +422,9 @@ type DeleteTagRequest struct { func (x *DeleteTagRequest) Reset() { *x = DeleteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagRequest) String() string { @@ -449,7 +435,7 @@ func (*DeleteTagRequest) ProtoMessage() {} func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,92 +580,6 @@ func file_google_devtools_artifactregistry_v1beta2_tag_proto_init() { if File_google_devtools_artifactregistry_v1beta2_tag_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go index 1bbba6d00477..c0bf6babef9b 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/version.proto @@ -124,11 +124,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -139,7 +137,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +214,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -231,7 +227,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +292,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -311,7 +305,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +348,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -369,7 +361,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +405,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -428,7 +418,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,68 +601,6 @@ func file_google_devtools_artifactregistry_v1beta2_version_proto_init() { return } file_google_devtools_artifactregistry_v1beta2_tag_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go index 9fb6d9468de4..a45975f37948 100755 --- a/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go +++ b/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto @@ -108,11 +108,9 @@ type YumArtifact struct { func (x *YumArtifact) Reset() { *x = YumArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumArtifact) String() string { @@ -123,7 +121,7 @@ func (*YumArtifact) ProtoMessage() {} func (x *YumArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type ImportYumArtifactsGcsSource struct { func (x *ImportYumArtifactsGcsSource) Reset() { *x = ImportYumArtifactsGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsGcsSource) String() string { @@ -195,7 +191,7 @@ func (*ImportYumArtifactsGcsSource) ProtoMessage() {} func (x *ImportYumArtifactsGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +238,9 @@ type ImportYumArtifactsRequest struct { func (x *ImportYumArtifactsRequest) Reset() { *x = ImportYumArtifactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsRequest) String() string { @@ -257,7 +251,7 @@ func (*ImportYumArtifactsRequest) ProtoMessage() {} func (x *ImportYumArtifactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +316,9 @@ type ImportYumArtifactsErrorInfo struct { func (x *ImportYumArtifactsErrorInfo) Reset() { *x = ImportYumArtifactsErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsErrorInfo) String() string { @@ -337,7 +329,7 @@ func (*ImportYumArtifactsErrorInfo) ProtoMessage() {} func (x *ImportYumArtifactsErrorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +390,9 @@ type ImportYumArtifactsResponse struct { func (x *ImportYumArtifactsResponse) Reset() { *x = ImportYumArtifactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsResponse) String() string { @@ -413,7 +403,7 @@ func (*ImportYumArtifactsResponse) ProtoMessage() {} func (x *ImportYumArtifactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +441,9 @@ type ImportYumArtifactsMetadata struct { func (x *ImportYumArtifactsMetadata) Reset() { *x = ImportYumArtifactsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportYumArtifactsMetadata) String() string { @@ -466,7 +454,7 @@ func (*ImportYumArtifactsMetadata) ProtoMessage() {} func (x *ImportYumArtifactsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,80 +618,6 @@ func file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_init() { if File_google_devtools_artifactregistry_v1beta2_yum_artifact_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*YumArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportYumArtifactsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2].OneofWrappers = []any{ (*ImportYumArtifactsRequest_GcsSource)(nil), } diff --git a/artifactregistry/apiv1beta2/helpers.go b/artifactregistry/apiv1beta2/helpers.go index f1d447372b08..5c2b5bfb7b4e 100755 --- a/artifactregistry/apiv1beta2/helpers.go +++ b/artifactregistry/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package artifactregistry import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "artifactregistry.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/asset/apiv1/asset_client.go b/asset/apiv1/asset_client.go index 3a9257ee57ec..5d5b63ed78ef 100755 --- a/asset/apiv1/asset_client.go +++ b/asset/apiv1/asset_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -893,6 +892,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new asset service client based on gRPC. @@ -919,6 +920,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: assetpb.NewAssetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -982,6 +984,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new asset service rest client. @@ -999,6 +1003,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1061,7 +1066,7 @@ func (c *gRPCClient) ExportAssets(ctx context.Context, req *assetpb.ExportAssets var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportAssets, req, settings.GRPC, c.logger, "ExportAssets") return err }, opts...) if err != nil { @@ -1092,7 +1097,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *assetpb.ListAssetsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1127,7 +1132,7 @@ func (c *gRPCClient) BatchGetAssetsHistory(ctx context.Context, req *assetpb.Bat var resp *assetpb.BatchGetAssetsHistoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchGetAssetsHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchGetAssetsHistory, req, settings.GRPC, c.logger, "BatchGetAssetsHistory") return err }, opts...) if err != nil { @@ -1145,7 +1150,7 @@ func (c *gRPCClient) CreateFeed(ctx context.Context, req *assetpb.CreateFeedRequ var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFeed, req, settings.GRPC, c.logger, "CreateFeed") return err }, opts...) if err != nil { @@ -1163,7 +1168,7 @@ func (c *gRPCClient) GetFeed(ctx context.Context, req *assetpb.GetFeedRequest, o var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFeed, req, settings.GRPC, c.logger, "GetFeed") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *gRPCClient) ListFeeds(ctx context.Context, req *assetpb.ListFeedsReques var resp *assetpb.ListFeedsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFeeds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFeeds, req, settings.GRPC, c.logger, "ListFeeds") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *gRPCClient) UpdateFeed(ctx context.Context, req *assetpb.UpdateFeedRequ var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFeed, req, settings.GRPC, c.logger, "UpdateFeed") return err }, opts...) if err != nil { @@ -1216,7 +1221,7 @@ func (c *gRPCClient) DeleteFeed(ctx context.Context, req *assetpb.DeleteFeedRequ opts = append((*c.CallOptions).DeleteFeed[0:len((*c.CallOptions).DeleteFeed):len((*c.CallOptions).DeleteFeed)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteFeed(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteFeed, req, settings.GRPC, c.logger, "DeleteFeed") return err }, opts...) return err @@ -1242,7 +1247,7 @@ func (c *gRPCClient) SearchAllResources(ctx context.Context, req *assetpb.Search } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchAllResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchAllResources, req, settings.GRPC, c.logger, "SearchAllResources") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *gRPCClient) SearchAllIamPolicies(ctx context.Context, req *assetpb.Sear } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchAllIamPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchAllIamPolicies, req, settings.GRPC, c.logger, "SearchAllIamPolicies") return err }, opts...) if err != nil { @@ -1323,7 +1328,7 @@ func (c *gRPCClient) AnalyzeIamPolicy(ctx context.Context, req *assetpb.AnalyzeI var resp *assetpb.AnalyzeIamPolicyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeIamPolicy, req, settings.GRPC, c.logger, "AnalyzeIamPolicy") return err }, opts...) if err != nil { @@ -1341,7 +1346,7 @@ func (c *gRPCClient) AnalyzeIamPolicyLongrunning(ctx context.Context, req *asset var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeIamPolicyLongrunning(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeIamPolicyLongrunning, req, settings.GRPC, c.logger, "AnalyzeIamPolicyLongrunning") return err }, opts...) if err != nil { @@ -1361,7 +1366,7 @@ func (c *gRPCClient) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveRe var resp *assetpb.AnalyzeMoveResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeMove(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeMove, req, settings.GRPC, c.logger, "AnalyzeMove") return err }, opts...) if err != nil { @@ -1379,7 +1384,7 @@ func (c *gRPCClient) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRe var resp *assetpb.QueryAssetsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryAssets, req, settings.GRPC, c.logger, "QueryAssets") return err }, opts...) if err != nil { @@ -1397,7 +1402,7 @@ func (c *gRPCClient) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSa var resp *assetpb.SavedQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSavedQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSavedQuery, req, settings.GRPC, c.logger, "CreateSavedQuery") return err }, opts...) if err != nil { @@ -1415,7 +1420,7 @@ func (c *gRPCClient) GetSavedQuery(ctx context.Context, req *assetpb.GetSavedQue var resp *assetpb.SavedQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSavedQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSavedQuery, req, settings.GRPC, c.logger, "GetSavedQuery") return err }, opts...) if err != nil { @@ -1444,7 +1449,7 @@ func (c *gRPCClient) ListSavedQueries(ctx context.Context, req *assetpb.ListSave } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSavedQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSavedQueries, req, settings.GRPC, c.logger, "ListSavedQueries") return err }, opts...) if err != nil { @@ -1479,7 +1484,7 @@ func (c *gRPCClient) UpdateSavedQuery(ctx context.Context, req *assetpb.UpdateSa var resp *assetpb.SavedQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSavedQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSavedQuery, req, settings.GRPC, c.logger, "UpdateSavedQuery") return err }, opts...) if err != nil { @@ -1496,7 +1501,7 @@ func (c *gRPCClient) DeleteSavedQuery(ctx context.Context, req *assetpb.DeleteSa opts = append((*c.CallOptions).DeleteSavedQuery[0:len((*c.CallOptions).DeleteSavedQuery):len((*c.CallOptions).DeleteSavedQuery)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSavedQuery(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSavedQuery, req, settings.GRPC, c.logger, "DeleteSavedQuery") return err }, opts...) return err @@ -1511,7 +1516,7 @@ func (c *gRPCClient) BatchGetEffectiveIamPolicies(ctx context.Context, req *asse var resp *assetpb.BatchGetEffectiveIamPoliciesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchGetEffectiveIamPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchGetEffectiveIamPolicies, req, settings.GRPC, c.logger, "BatchGetEffectiveIamPolicies") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *gRPCClient) AnalyzeOrgPolicies(ctx context.Context, req *assetpb.Analyz } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeOrgPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeOrgPolicies, req, settings.GRPC, c.logger, "AnalyzeOrgPolicies") return err }, opts...) if err != nil { @@ -1586,7 +1591,7 @@ func (c *gRPCClient) AnalyzeOrgPolicyGovernedContainers(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeOrgPolicyGovernedContainers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeOrgPolicyGovernedContainers, req, settings.GRPC, c.logger, "AnalyzeOrgPolicyGovernedContainers") return err }, opts...) if err != nil { @@ -1632,7 +1637,7 @@ func (c *gRPCClient) AnalyzeOrgPolicyGovernedAssets(ctx context.Context, req *as } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeOrgPolicyGovernedAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeOrgPolicyGovernedAssets, req, settings.GRPC, c.logger, "AnalyzeOrgPolicyGovernedAssets") return err }, opts...) if err != nil { @@ -1667,7 +1672,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1724,21 +1729,10 @@ func (c *restClient) ExportAssets(ctx context.Context, req *assetpb.ExportAssets httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1822,21 +1816,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *assetpb.ListAssetsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1932,17 +1915,7 @@ func (c *restClient) BatchGetAssetsHistory(ctx context.Context, req *assetpb.Bat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetAssetsHistory") if err != nil { return err } @@ -1999,17 +1972,7 @@ func (c *restClient) CreateFeed(ctx context.Context, req *assetpb.CreateFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeed") if err != nil { return err } @@ -2059,17 +2022,7 @@ func (c *restClient) GetFeed(ctx context.Context, req *assetpb.GetFeedRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeed") if err != nil { return err } @@ -2119,17 +2072,7 @@ func (c *restClient) ListFeeds(ctx context.Context, req *assetpb.ListFeedsReques httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeeds") if err != nil { return err } @@ -2185,17 +2128,7 @@ func (c *restClient) UpdateFeed(ctx context.Context, req *assetpb.UpdateFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeed") if err != nil { return err } @@ -2242,15 +2175,8 @@ func (c *restClient) DeleteFeed(ctx context.Context, req *assetpb.DeleteFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeed") + return err }, opts...) } @@ -2320,21 +2246,10 @@ func (c *restClient) SearchAllResources(ctx context.Context, req *assetpb.Search } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAllResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2423,21 +2338,10 @@ func (c *restClient) SearchAllIamPolicies(ctx context.Context, req *assetpb.Sear } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAllIamPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2548,17 +2452,7 @@ func (c *restClient) AnalyzeIamPolicy(ctx context.Context, req *assetpb.AnalyzeI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeIamPolicy") if err != nil { return err } @@ -2622,21 +2516,10 @@ func (c *restClient) AnalyzeIamPolicyLongrunning(ctx context.Context, req *asset httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeIamPolicyLongrunning") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2695,17 +2578,7 @@ func (c *restClient) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeMove") if err != nil { return err } @@ -2772,17 +2645,7 @@ func (c *restClient) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryAssets") if err != nil { return err } @@ -2840,17 +2703,7 @@ func (c *restClient) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSavedQuery") if err != nil { return err } @@ -2900,17 +2753,7 @@ func (c *restClient) GetSavedQuery(ctx context.Context, req *assetpb.GetSavedQue httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSavedQuery") if err != nil { return err } @@ -2975,21 +2818,10 @@ func (c *restClient) ListSavedQueries(ctx context.Context, req *assetpb.ListSave } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSavedQueries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3066,17 +2898,7 @@ func (c *restClient) UpdateSavedQuery(ctx context.Context, req *assetpb.UpdateSa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSavedQuery") if err != nil { return err } @@ -3123,15 +2945,8 @@ func (c *restClient) DeleteSavedQuery(ctx context.Context, req *assetpb.DeleteSa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSavedQuery") + return err }, opts...) } @@ -3173,17 +2988,7 @@ func (c *restClient) BatchGetEffectiveIamPolicies(ctx context.Context, req *asse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetEffectiveIamPolicies") if err != nil { return err } @@ -3249,21 +3054,10 @@ func (c *restClient) AnalyzeOrgPolicies(ctx context.Context, req *assetpb.Analyz } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeOrgPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3343,21 +3137,10 @@ func (c *restClient) AnalyzeOrgPolicyGovernedContainers(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeOrgPolicyGovernedContainers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3524,21 +3307,10 @@ func (c *restClient) AnalyzeOrgPolicyGovernedAssets(ctx context.Context, req *as } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeOrgPolicyGovernedAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3601,17 +3373,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/asset/apiv1/asset_client_example_go123_test.go b/asset/apiv1/asset_client_example_go123_test.go index a4f7fa2f39bb..c2c389a377c3 100644 --- a/asset/apiv1/asset_client_example_go123_test.go +++ b/asset/apiv1/asset_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_AnalyzeOrgPolicies_all() { } for resp, err := range c.AnalyzeOrgPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_AnalyzeOrgPolicyGovernedAssets_all() { } for resp, err := range c.AnalyzeOrgPolicyGovernedAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_AnalyzeOrgPolicyGovernedContainers_all() { } for resp, err := range c.AnalyzeOrgPolicyGovernedContainers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListSavedQueries_all() { } for resp, err := range c.ListSavedQueries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_SearchAllIamPolicies_all() { } for resp, err := range c.SearchAllIamPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -200,7 +200,7 @@ func ExampleClient_SearchAllResources_all() { } for resp, err := range c.SearchAllResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/asset/apiv1/assetpb/asset_service.pb.go b/asset/apiv1/assetpb/asset_service.pb.go index 24407c792bfe..d72c7729a6d2 100755 --- a/asset/apiv1/assetpb/asset_service.pb.go +++ b/asset/apiv1/assetpb/asset_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1/asset_service.proto @@ -476,11 +476,9 @@ type AnalyzeIamPolicyLongrunningMetadata struct { func (x *AnalyzeIamPolicyLongrunningMetadata) Reset() { *x = AnalyzeIamPolicyLongrunningMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyLongrunningMetadata) String() string { @@ -491,7 +489,7 @@ func (*AnalyzeIamPolicyLongrunningMetadata) ProtoMessage() {} func (x *AnalyzeIamPolicyLongrunningMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +573,9 @@ type ExportAssetsRequest struct { func (x *ExportAssetsRequest) Reset() { *x = ExportAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAssetsRequest) String() string { @@ -590,7 +586,7 @@ func (*ExportAssetsRequest) ProtoMessage() {} func (x *ExportAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +667,9 @@ type ExportAssetsResponse struct { func (x *ExportAssetsResponse) Reset() { *x = ExportAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAssetsResponse) String() string { @@ -686,7 +680,7 @@ func (*ExportAssetsResponse) ProtoMessage() {} func (x *ExportAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +783,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -804,7 +796,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +878,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -901,7 +891,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +976,9 @@ type BatchGetAssetsHistoryRequest struct { func (x *BatchGetAssetsHistoryRequest) Reset() { *x = BatchGetAssetsHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetAssetsHistoryRequest) String() string { @@ -1001,7 +989,7 @@ func (*BatchGetAssetsHistoryRequest) ProtoMessage() {} func (x *BatchGetAssetsHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1051,9 @@ type BatchGetAssetsHistoryResponse struct { func (x *BatchGetAssetsHistoryResponse) Reset() { *x = BatchGetAssetsHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetAssetsHistoryResponse) String() string { @@ -1078,7 +1064,7 @@ func (*BatchGetAssetsHistoryResponse) ProtoMessage() {} func (x *BatchGetAssetsHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1110,9 @@ type CreateFeedRequest struct { func (x *CreateFeedRequest) Reset() { *x = CreateFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedRequest) String() string { @@ -1139,7 +1123,7 @@ func (*CreateFeedRequest) ProtoMessage() {} func (x *CreateFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1190,11 +1174,9 @@ type GetFeedRequest struct { func (x *GetFeedRequest) Reset() { *x = GetFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeedRequest) String() string { @@ -1205,7 +1187,7 @@ func (*GetFeedRequest) ProtoMessage() {} func (x *GetFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1223,9 @@ type ListFeedsRequest struct { func (x *ListFeedsRequest) Reset() { *x = ListFeedsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedsRequest) String() string { @@ -1256,7 +1236,7 @@ func (*ListFeedsRequest) ProtoMessage() {} func (x *ListFeedsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1269,9 @@ type ListFeedsResponse struct { func (x *ListFeedsResponse) Reset() { *x = ListFeedsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedsResponse) String() string { @@ -1304,7 +1282,7 @@ func (*ListFeedsResponse) ProtoMessage() {} func (x *ListFeedsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1324,9 @@ type UpdateFeedRequest struct { func (x *UpdateFeedRequest) Reset() { *x = UpdateFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeedRequest) String() string { @@ -1361,7 +1337,7 @@ func (*UpdateFeedRequest) ProtoMessage() {} func (x *UpdateFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1380,9 @@ type DeleteFeedRequest struct { func (x *DeleteFeedRequest) Reset() { *x = DeleteFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeedRequest) String() string { @@ -1419,7 +1393,7 @@ func (*DeleteFeedRequest) ProtoMessage() {} func (x *DeleteFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1458,11 +1432,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -1473,7 +1445,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1544,11 +1516,9 @@ type OutputResult struct { func (x *OutputResult) Reset() { *x = OutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputResult) String() string { @@ -1559,7 +1529,7 @@ func (*OutputResult) ProtoMessage() {} func (x *OutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,11 +1582,9 @@ type GcsOutputResult struct { func (x *GcsOutputResult) Reset() { *x = GcsOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputResult) String() string { @@ -1627,7 +1595,7 @@ func (*GcsOutputResult) ProtoMessage() {} func (x *GcsOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,11 +1634,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -1681,7 +1647,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1825,11 +1791,9 @@ type BigQueryDestination struct { func (x *BigQueryDestination) Reset() { *x = BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestination) String() string { @@ -1840,7 +1804,7 @@ func (*BigQueryDestination) ProtoMessage() {} func (x *BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1866,9 @@ type PartitionSpec struct { func (x *PartitionSpec) Reset() { *x = PartitionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionSpec) String() string { @@ -1917,7 +1879,7 @@ func (*PartitionSpec) ProtoMessage() {} func (x *PartitionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1952,11 +1914,9 @@ type PubsubDestination struct { func (x *PubsubDestination) Reset() { *x = PubsubDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubDestination) String() string { @@ -1967,7 +1927,7 @@ func (*PubsubDestination) ProtoMessage() {} func (x *PubsubDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2005,11 +1965,9 @@ type FeedOutputConfig struct { func (x *FeedOutputConfig) Reset() { *x = FeedOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeedOutputConfig) String() string { @@ -2020,7 +1978,7 @@ func (*FeedOutputConfig) ProtoMessage() {} func (x *FeedOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2134,11 +2092,9 @@ type Feed struct { func (x *Feed) Reset() { *x = Feed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feed) String() string { @@ -2149,7 +2105,7 @@ func (*Feed) ProtoMessage() {} func (x *Feed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2393,11 +2349,9 @@ type SearchAllResourcesRequest struct { func (x *SearchAllResourcesRequest) Reset() { *x = SearchAllResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllResourcesRequest) String() string { @@ -2408,7 +2362,7 @@ func (*SearchAllResourcesRequest) ProtoMessage() {} func (x *SearchAllResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2443,9 @@ type SearchAllResourcesResponse struct { func (x *SearchAllResourcesResponse) Reset() { *x = SearchAllResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllResourcesResponse) String() string { @@ -2504,7 +2456,7 @@ func (*SearchAllResourcesResponse) ProtoMessage() {} func (x *SearchAllResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2640,11 +2592,9 @@ type SearchAllIamPoliciesRequest struct { func (x *SearchAllIamPoliciesRequest) Reset() { *x = SearchAllIamPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllIamPoliciesRequest) String() string { @@ -2655,7 +2605,7 @@ func (*SearchAllIamPoliciesRequest) ProtoMessage() {} func (x *SearchAllIamPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2729,11 +2679,9 @@ type SearchAllIamPoliciesResponse struct { func (x *SearchAllIamPoliciesResponse) Reset() { *x = SearchAllIamPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllIamPoliciesResponse) String() string { @@ -2744,7 +2692,7 @@ func (*SearchAllIamPoliciesResponse) ProtoMessage() {} func (x *SearchAllIamPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2806,11 +2754,9 @@ type IamPolicyAnalysisQuery struct { func (x *IamPolicyAnalysisQuery) Reset() { *x = IamPolicyAnalysisQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery) String() string { @@ -2821,7 +2767,7 @@ func (*IamPolicyAnalysisQuery) ProtoMessage() {} func (x *IamPolicyAnalysisQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2920,11 +2866,9 @@ type AnalyzeIamPolicyRequest struct { func (x *AnalyzeIamPolicyRequest) Reset() { *x = AnalyzeIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyRequest) String() string { @@ -2935,7 +2879,7 @@ func (*AnalyzeIamPolicyRequest) ProtoMessage() {} func (x *AnalyzeIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2994,11 +2938,9 @@ type AnalyzeIamPolicyResponse struct { func (x *AnalyzeIamPolicyResponse) Reset() { *x = AnalyzeIamPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyResponse) String() string { @@ -3009,7 +2951,7 @@ func (*AnalyzeIamPolicyResponse) ProtoMessage() {} func (x *AnalyzeIamPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3062,11 +3004,9 @@ type IamPolicyAnalysisOutputConfig struct { func (x *IamPolicyAnalysisOutputConfig) Reset() { *x = IamPolicyAnalysisOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisOutputConfig) String() string { @@ -3077,7 +3017,7 @@ func (*IamPolicyAnalysisOutputConfig) ProtoMessage() {} func (x *IamPolicyAnalysisOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3165,11 +3105,9 @@ type AnalyzeIamPolicyLongrunningRequest struct { func (x *AnalyzeIamPolicyLongrunningRequest) Reset() { *x = AnalyzeIamPolicyLongrunningRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyLongrunningRequest) String() string { @@ -3180,7 +3118,7 @@ func (*AnalyzeIamPolicyLongrunningRequest) ProtoMessage() {} func (x *AnalyzeIamPolicyLongrunningRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3226,11 +3164,9 @@ type AnalyzeIamPolicyLongrunningResponse struct { func (x *AnalyzeIamPolicyLongrunningResponse) Reset() { *x = AnalyzeIamPolicyLongrunningResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyLongrunningResponse) String() string { @@ -3241,7 +3177,7 @@ func (*AnalyzeIamPolicyLongrunningResponse) ProtoMessage() {} func (x *AnalyzeIamPolicyLongrunningResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3290,11 +3226,9 @@ type SavedQuery struct { func (x *SavedQuery) Reset() { *x = SavedQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedQuery) String() string { @@ -3305,7 +3239,7 @@ func (*SavedQuery) ProtoMessage() {} func (x *SavedQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3405,11 +3339,9 @@ type CreateSavedQueryRequest struct { func (x *CreateSavedQueryRequest) Reset() { *x = CreateSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSavedQueryRequest) String() string { @@ -3420,7 +3352,7 @@ func (*CreateSavedQueryRequest) ProtoMessage() {} func (x *CreateSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3472,11 +3404,9 @@ type GetSavedQueryRequest struct { func (x *GetSavedQueryRequest) Reset() { *x = GetSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSavedQueryRequest) String() string { @@ -3487,7 +3417,7 @@ func (*GetSavedQueryRequest) ProtoMessage() {} func (x *GetSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3542,11 +3472,9 @@ type ListSavedQueriesRequest struct { func (x *ListSavedQueriesRequest) Reset() { *x = ListSavedQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesRequest) String() string { @@ -3557,7 +3485,7 @@ func (*ListSavedQueriesRequest) ProtoMessage() {} func (x *ListSavedQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3615,11 +3543,9 @@ type ListSavedQueriesResponse struct { func (x *ListSavedQueriesResponse) Reset() { *x = ListSavedQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSavedQueriesResponse) String() string { @@ -3630,7 +3556,7 @@ func (*ListSavedQueriesResponse) ProtoMessage() {} func (x *ListSavedQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3680,11 +3606,9 @@ type UpdateSavedQueryRequest struct { func (x *UpdateSavedQueryRequest) Reset() { *x = UpdateSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSavedQueryRequest) String() string { @@ -3695,7 +3619,7 @@ func (*UpdateSavedQueryRequest) ProtoMessage() {} func (x *UpdateSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3741,11 +3665,9 @@ type DeleteSavedQueryRequest struct { func (x *DeleteSavedQueryRequest) Reset() { *x = DeleteSavedQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSavedQueryRequest) String() string { @@ -3756,7 +3678,7 @@ func (*DeleteSavedQueryRequest) ProtoMessage() {} func (x *DeleteSavedQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3802,11 +3724,9 @@ type AnalyzeMoveRequest struct { func (x *AnalyzeMoveRequest) Reset() { *x = AnalyzeMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeMoveRequest) String() string { @@ -3817,7 +3737,7 @@ func (*AnalyzeMoveRequest) ProtoMessage() {} func (x *AnalyzeMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3866,11 +3786,9 @@ type AnalyzeMoveResponse struct { func (x *AnalyzeMoveResponse) Reset() { *x = AnalyzeMoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeMoveResponse) String() string { @@ -3881,7 +3799,7 @@ func (*AnalyzeMoveResponse) ProtoMessage() {} func (x *AnalyzeMoveResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3921,11 +3839,9 @@ type MoveAnalysis struct { func (x *MoveAnalysis) Reset() { *x = MoveAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveAnalysis) String() string { @@ -3936,7 +3852,7 @@ func (*MoveAnalysis) ProtoMessage() {} func (x *MoveAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4014,11 +3930,9 @@ type MoveAnalysisResult struct { func (x *MoveAnalysisResult) Reset() { *x = MoveAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveAnalysisResult) String() string { @@ -4029,7 +3943,7 @@ func (*MoveAnalysisResult) ProtoMessage() {} func (x *MoveAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4070,11 +3984,9 @@ type MoveImpact struct { func (x *MoveImpact) Reset() { *x = MoveImpact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveImpact) String() string { @@ -4085,7 +3997,7 @@ func (*MoveImpact) ProtoMessage() {} func (x *MoveImpact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4119,11 +4031,9 @@ type QueryAssetsOutputConfig struct { func (x *QueryAssetsOutputConfig) Reset() { *x = QueryAssetsOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAssetsOutputConfig) String() string { @@ -4134,7 +4044,7 @@ func (*QueryAssetsOutputConfig) ProtoMessage() {} func (x *QueryAssetsOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4227,11 +4137,9 @@ type QueryAssetsRequest struct { func (x *QueryAssetsRequest) Reset() { *x = QueryAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAssetsRequest) String() string { @@ -4242,7 +4150,7 @@ func (*QueryAssetsRequest) ProtoMessage() {} func (x *QueryAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4402,11 +4310,9 @@ type QueryAssetsResponse struct { func (x *QueryAssetsResponse) Reset() { *x = QueryAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAssetsResponse) String() string { @@ -4417,7 +4323,7 @@ func (*QueryAssetsResponse) ProtoMessage() {} func (x *QueryAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4523,11 +4429,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -4538,7 +4442,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4593,11 +4497,9 @@ type TableSchema struct { func (x *TableSchema) Reset() { *x = TableSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSchema) String() string { @@ -4608,7 +4510,7 @@ func (*TableSchema) ProtoMessage() {} func (x *TableSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4666,11 +4568,9 @@ type TableFieldSchema struct { func (x *TableFieldSchema) Reset() { *x = TableFieldSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableFieldSchema) String() string { @@ -4681,7 +4581,7 @@ func (*TableFieldSchema) ProtoMessage() {} func (x *TableFieldSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4753,11 +4653,9 @@ type BatchGetEffectiveIamPoliciesRequest struct { func (x *BatchGetEffectiveIamPoliciesRequest) Reset() { *x = BatchGetEffectiveIamPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetEffectiveIamPoliciesRequest) String() string { @@ -4768,7 +4666,7 @@ func (*BatchGetEffectiveIamPoliciesRequest) ProtoMessage() {} func (x *BatchGetEffectiveIamPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4815,11 +4713,9 @@ type BatchGetEffectiveIamPoliciesResponse struct { func (x *BatchGetEffectiveIamPoliciesResponse) Reset() { *x = BatchGetEffectiveIamPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetEffectiveIamPoliciesResponse) String() string { @@ -4830,7 +4726,7 @@ func (*BatchGetEffectiveIamPoliciesResponse) ProtoMessage() {} func (x *BatchGetEffectiveIamPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4895,11 +4791,9 @@ type AnalyzerOrgPolicy struct { func (x *AnalyzerOrgPolicy) Reset() { *x = AnalyzerOrgPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicy) String() string { @@ -4910,7 +4804,7 @@ func (*AnalyzerOrgPolicy) ProtoMessage() {} func (x *AnalyzerOrgPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4975,11 +4869,9 @@ type AnalyzerOrgPolicyConstraint struct { func (x *AnalyzerOrgPolicyConstraint) Reset() { *x = AnalyzerOrgPolicyConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicyConstraint) String() string { @@ -4990,7 +4882,7 @@ func (*AnalyzerOrgPolicyConstraint) ProtoMessage() {} func (x *AnalyzerOrgPolicyConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5084,11 +4976,9 @@ type AnalyzeOrgPoliciesRequest struct { func (x *AnalyzeOrgPoliciesRequest) Reset() { *x = AnalyzeOrgPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPoliciesRequest) String() string { @@ -5099,7 +4989,7 @@ func (*AnalyzeOrgPoliciesRequest) ProtoMessage() {} func (x *AnalyzeOrgPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5170,11 +5060,9 @@ type AnalyzeOrgPoliciesResponse struct { func (x *AnalyzeOrgPoliciesResponse) Reset() { *x = AnalyzeOrgPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPoliciesResponse) String() string { @@ -5185,7 +5073,7 @@ func (*AnalyzeOrgPoliciesResponse) ProtoMessage() {} func (x *AnalyzeOrgPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5261,11 +5149,9 @@ type AnalyzeOrgPolicyGovernedContainersRequest struct { func (x *AnalyzeOrgPolicyGovernedContainersRequest) Reset() { *x = AnalyzeOrgPolicyGovernedContainersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedContainersRequest) String() string { @@ -5276,7 +5162,7 @@ func (*AnalyzeOrgPolicyGovernedContainersRequest) ProtoMessage() {} func (x *AnalyzeOrgPolicyGovernedContainersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5344,11 +5230,9 @@ type AnalyzeOrgPolicyGovernedContainersResponse struct { func (x *AnalyzeOrgPolicyGovernedContainersResponse) Reset() { *x = AnalyzeOrgPolicyGovernedContainersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedContainersResponse) String() string { @@ -5359,7 +5243,7 @@ func (*AnalyzeOrgPolicyGovernedContainersResponse) ProtoMessage() {} func (x *AnalyzeOrgPolicyGovernedContainersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5451,11 +5335,9 @@ type AnalyzeOrgPolicyGovernedAssetsRequest struct { func (x *AnalyzeOrgPolicyGovernedAssetsRequest) Reset() { *x = AnalyzeOrgPolicyGovernedAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedAssetsRequest) String() string { @@ -5466,7 +5348,7 @@ func (*AnalyzeOrgPolicyGovernedAssetsRequest) ProtoMessage() {} func (x *AnalyzeOrgPolicyGovernedAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5534,11 +5416,9 @@ type AnalyzeOrgPolicyGovernedAssetsResponse struct { func (x *AnalyzeOrgPolicyGovernedAssetsResponse) Reset() { *x = AnalyzeOrgPolicyGovernedAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedAssetsResponse) String() string { @@ -5549,7 +5429,7 @@ func (*AnalyzeOrgPolicyGovernedAssetsResponse) ProtoMessage() {} func (x *AnalyzeOrgPolicyGovernedAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5602,11 +5482,9 @@ type IamPolicyAnalysisQuery_ResourceSelector struct { func (x *IamPolicyAnalysisQuery_ResourceSelector) Reset() { *x = IamPolicyAnalysisQuery_ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery_ResourceSelector) String() string { @@ -5617,7 +5495,7 @@ func (*IamPolicyAnalysisQuery_ResourceSelector) ProtoMessage() {} func (x *IamPolicyAnalysisQuery_ResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5664,11 +5542,9 @@ type IamPolicyAnalysisQuery_IdentitySelector struct { func (x *IamPolicyAnalysisQuery_IdentitySelector) Reset() { *x = IamPolicyAnalysisQuery_IdentitySelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery_IdentitySelector) String() string { @@ -5679,7 +5555,7 @@ func (*IamPolicyAnalysisQuery_IdentitySelector) ProtoMessage() {} func (x *IamPolicyAnalysisQuery_IdentitySelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5719,11 +5595,9 @@ type IamPolicyAnalysisQuery_AccessSelector struct { func (x *IamPolicyAnalysisQuery_AccessSelector) Reset() { *x = IamPolicyAnalysisQuery_AccessSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery_AccessSelector) String() string { @@ -5734,7 +5608,7 @@ func (*IamPolicyAnalysisQuery_AccessSelector) ProtoMessage() {} func (x *IamPolicyAnalysisQuery_AccessSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5867,11 +5741,9 @@ type IamPolicyAnalysisQuery_Options struct { func (x *IamPolicyAnalysisQuery_Options) Reset() { *x = IamPolicyAnalysisQuery_Options{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery_Options) String() string { @@ -5882,7 +5754,7 @@ func (*IamPolicyAnalysisQuery_Options) ProtoMessage() {} func (x *IamPolicyAnalysisQuery_Options) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5955,11 +5827,9 @@ type IamPolicyAnalysisQuery_ConditionContext struct { func (x *IamPolicyAnalysisQuery_ConditionContext) Reset() { *x = IamPolicyAnalysisQuery_ConditionContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisQuery_ConditionContext) String() string { @@ -5970,7 +5840,7 @@ func (*IamPolicyAnalysisQuery_ConditionContext) ProtoMessage() {} func (x *IamPolicyAnalysisQuery_ConditionContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6035,11 +5905,9 @@ type AnalyzeIamPolicyResponse_IamPolicyAnalysis struct { func (x *AnalyzeIamPolicyResponse_IamPolicyAnalysis) Reset() { *x = AnalyzeIamPolicyResponse_IamPolicyAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeIamPolicyResponse_IamPolicyAnalysis) String() string { @@ -6050,7 +5918,7 @@ func (*AnalyzeIamPolicyResponse_IamPolicyAnalysis) ProtoMessage() {} func (x *AnalyzeIamPolicyResponse_IamPolicyAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6113,11 +5981,9 @@ type IamPolicyAnalysisOutputConfig_GcsDestination struct { func (x *IamPolicyAnalysisOutputConfig_GcsDestination) Reset() { *x = IamPolicyAnalysisOutputConfig_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisOutputConfig_GcsDestination) String() string { @@ -6128,7 +5994,7 @@ func (*IamPolicyAnalysisOutputConfig_GcsDestination) ProtoMessage() {} func (x *IamPolicyAnalysisOutputConfig_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6191,11 +6057,9 @@ type IamPolicyAnalysisOutputConfig_BigQueryDestination struct { func (x *IamPolicyAnalysisOutputConfig_BigQueryDestination) Reset() { *x = IamPolicyAnalysisOutputConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisOutputConfig_BigQueryDestination) String() string { @@ -6206,7 +6070,7 @@ func (*IamPolicyAnalysisOutputConfig_BigQueryDestination) ProtoMessage() {} func (x *IamPolicyAnalysisOutputConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6263,11 +6127,9 @@ type SavedQuery_QueryContent struct { func (x *SavedQuery_QueryContent) Reset() { *x = SavedQuery_QueryContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedQuery_QueryContent) String() string { @@ -6278,7 +6140,7 @@ func (*SavedQuery_QueryContent) ProtoMessage() {} func (x *SavedQuery_QueryContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6352,11 +6214,9 @@ type QueryAssetsOutputConfig_BigQueryDestination struct { func (x *QueryAssetsOutputConfig_BigQueryDestination) Reset() { *x = QueryAssetsOutputConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAssetsOutputConfig_BigQueryDestination) String() string { @@ -6367,7 +6227,7 @@ func (*QueryAssetsOutputConfig_BigQueryDestination) ProtoMessage() {} func (x *QueryAssetsOutputConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6442,11 +6302,9 @@ type BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy struct { func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy) Reset() { *x = BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy) String() string { @@ -6457,7 +6315,7 @@ func (*BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy) ProtoMessage() { func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6503,11 +6361,9 @@ type BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo struct { func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo) Reset() { *x = BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo) String() string { @@ -6518,7 +6374,7 @@ func (*BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo) Proto func (x *BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6584,11 +6440,9 @@ type AnalyzerOrgPolicy_Rule struct { func (x *AnalyzerOrgPolicy_Rule) Reset() { *x = AnalyzerOrgPolicy_Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicy_Rule) String() string { @@ -6599,7 +6453,7 @@ func (*AnalyzerOrgPolicy_Rule) ProtoMessage() {} func (x *AnalyzerOrgPolicy_Rule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6714,11 +6568,9 @@ type AnalyzerOrgPolicy_Rule_StringValues struct { func (x *AnalyzerOrgPolicy_Rule_StringValues) Reset() { *x = AnalyzerOrgPolicy_Rule_StringValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicy_Rule_StringValues) String() string { @@ -6729,7 +6581,7 @@ func (*AnalyzerOrgPolicy_Rule_StringValues) ProtoMessage() {} func (x *AnalyzerOrgPolicy_Rule_StringValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6789,11 +6641,9 @@ type AnalyzerOrgPolicyConstraint_Constraint struct { func (x *AnalyzerOrgPolicyConstraint_Constraint) Reset() { *x = AnalyzerOrgPolicyConstraint_Constraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicyConstraint_Constraint) String() string { @@ -6804,7 +6654,7 @@ func (*AnalyzerOrgPolicyConstraint_Constraint) ProtoMessage() {} func (x *AnalyzerOrgPolicyConstraint_Constraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6921,11 +6771,9 @@ type AnalyzerOrgPolicyConstraint_CustomConstraint struct { func (x *AnalyzerOrgPolicyConstraint_CustomConstraint) Reset() { *x = AnalyzerOrgPolicyConstraint_CustomConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicyConstraint_CustomConstraint) String() string { @@ -6936,7 +6784,7 @@ func (*AnalyzerOrgPolicyConstraint_CustomConstraint) ProtoMessage() {} func (x *AnalyzerOrgPolicyConstraint_CustomConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7020,11 +6868,9 @@ type AnalyzerOrgPolicyConstraint_Constraint_ListConstraint struct { func (x *AnalyzerOrgPolicyConstraint_Constraint_ListConstraint) Reset() { *x = AnalyzerOrgPolicyConstraint_Constraint_ListConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicyConstraint_Constraint_ListConstraint) String() string { @@ -7035,7 +6881,7 @@ func (*AnalyzerOrgPolicyConstraint_Constraint_ListConstraint) ProtoMessage() {} func (x *AnalyzerOrgPolicyConstraint_Constraint_ListConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7077,11 +6923,9 @@ type AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint struct { func (x *AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint) Reset() { *x = AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint) String() string { @@ -7092,7 +6936,7 @@ func (*AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint) ProtoMessage() func (x *AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7142,11 +6986,9 @@ type AnalyzeOrgPoliciesResponse_OrgPolicyResult struct { func (x *AnalyzeOrgPoliciesResponse_OrgPolicyResult) Reset() { *x = AnalyzeOrgPoliciesResponse_OrgPolicyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPoliciesResponse_OrgPolicyResult) String() string { @@ -7157,7 +6999,7 @@ func (*AnalyzeOrgPoliciesResponse_OrgPolicyResult) ProtoMessage() {} func (x *AnalyzeOrgPoliciesResponse_OrgPolicyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7255,11 +7097,9 @@ type AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer struct { func (x *AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer) Reset() { *x = AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer) String() string { @@ -7270,7 +7110,7 @@ func (*AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer) ProtoMessag func (x *AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7383,11 +7223,9 @@ type AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource struct { func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource) Reset() { *x = AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource) String() string { @@ -7398,7 +7236,7 @@ func (*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource) ProtoMessage() { func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7502,11 +7340,9 @@ type AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy struct { func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy) Reset() { *x = AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy) String() string { @@ -7517,7 +7353,7 @@ func (*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy) ProtoMessage() func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7604,11 +7440,9 @@ type AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset struct { func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset) Reset() { *x = AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset) String() string { @@ -7619,7 +7453,7 @@ func (*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset) ProtoMessage() {} func (x *AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9406,1004 +9240,6 @@ func file_google_cloud_asset_v1_asset_service_proto_init() { return } file_google_cloud_asset_v1_assets_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1_asset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyLongrunningMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetAssetsHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetAssetsHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PartitionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PubsubDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*FeedOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Feed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllIamPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllIamPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyLongrunningRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyLongrunningResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SavedQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GetSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSavedQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSavedQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeMoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*MoveAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*MoveAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*MoveImpact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*QueryAssetsOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*QueryAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*QueryAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*TableSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*TableFieldSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetEffectiveIamPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetEffectiveIamPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicyConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedContainersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedContainersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery_ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery_IdentitySelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery_AccessSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery_Options); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisQuery_ConditionContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeIamPolicyResponse_IamPolicyAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisOutputConfig_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisOutputConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*SavedQuery_QueryContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*QueryAssetsOutputConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicy_Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicy_Rule_StringValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicyConstraint_Constraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicyConstraint_CustomConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicyConstraint_Constraint_ListConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerOrgPolicyConstraint_Constraint_BooleanConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPoliciesResponse_OrgPolicyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedContainersResponse_GovernedContainer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedIamPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_asset_service_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeOrgPolicyGovernedAssetsResponse_GovernedAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_asset_v1_asset_service_proto_msgTypes[13].OneofWrappers = []any{ (*OutputConfig_GcsDestination)(nil), (*OutputConfig_BigqueryDestination)(nil), diff --git a/asset/apiv1/assetpb/assets.pb.go b/asset/apiv1/assetpb/assets.pb.go index 2e76016131a3..7a4d5fbbeb23 100755 --- a/asset/apiv1/assetpb/assets.pb.go +++ b/asset/apiv1/assetpb/assets.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1/assets.proto @@ -185,11 +185,9 @@ type TemporalAsset struct { func (x *TemporalAsset) Reset() { *x = TemporalAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TemporalAsset) String() string { @@ -200,7 +198,7 @@ func (*TemporalAsset) ProtoMessage() {} func (x *TemporalAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +263,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -280,7 +276,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +388,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -407,7 +401,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +591,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -612,7 +604,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +687,9 @@ type RelatedAssets struct { func (x *RelatedAssets) Reset() { *x = RelatedAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedAssets) String() string { @@ -710,7 +700,7 @@ func (*RelatedAssets) ProtoMessage() {} func (x *RelatedAssets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +754,9 @@ type RelationshipAttributes struct { func (x *RelationshipAttributes) Reset() { *x = RelationshipAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationshipAttributes) String() string { @@ -779,7 +767,7 @@ func (*RelationshipAttributes) ProtoMessage() {} func (x *RelationshipAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +850,9 @@ type RelatedAsset struct { func (x *RelatedAsset) Reset() { *x = RelatedAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedAsset) String() string { @@ -877,7 +863,7 @@ func (*RelatedAsset) ProtoMessage() {} func (x *RelatedAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +926,9 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tag) String() string { @@ -955,7 +939,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +1007,9 @@ type EffectiveTagDetails struct { func (x *EffectiveTagDetails) Reset() { *x = EffectiveTagDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveTagDetails) String() string { @@ -1038,7 +1020,7 @@ func (*EffectiveTagDetails) ProtoMessage() {} func (x *EffectiveTagDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1408,11 +1390,9 @@ type ResourceSearchResult struct { func (x *ResourceSearchResult) Reset() { *x = ResourceSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceSearchResult) String() string { @@ -1423,7 +1403,7 @@ func (*ResourceSearchResult) ProtoMessage() {} func (x *ResourceSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1662,11 +1642,9 @@ type VersionedResource struct { func (x *VersionedResource) Reset() { *x = VersionedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionedResource) String() string { @@ -1677,7 +1655,7 @@ func (*VersionedResource) ProtoMessage() {} func (x *VersionedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1729,11 +1707,9 @@ type AttachedResource struct { func (x *AttachedResource) Reset() { *x = AttachedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedResource) String() string { @@ -1744,7 +1720,7 @@ func (*AttachedResource) ProtoMessage() {} func (x *AttachedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1785,11 +1761,9 @@ type RelatedResources struct { func (x *RelatedResources) Reset() { *x = RelatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedResources) String() string { @@ -1800,7 +1774,7 @@ func (*RelatedResources) ProtoMessage() {} func (x *RelatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1811,9 @@ type RelatedResource struct { func (x *RelatedResource) Reset() { *x = RelatedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedResource) String() string { @@ -1852,7 +1824,7 @@ func (*RelatedResource) ProtoMessage() {} func (x *RelatedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1957,11 +1929,9 @@ type IamPolicySearchResult struct { func (x *IamPolicySearchResult) Reset() { *x = IamPolicySearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicySearchResult) String() string { @@ -1972,7 +1942,7 @@ func (*IamPolicySearchResult) ProtoMessage() {} func (x *IamPolicySearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2056,11 +2026,9 @@ type IamPolicyAnalysisState struct { func (x *IamPolicyAnalysisState) Reset() { *x = IamPolicyAnalysisState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisState) String() string { @@ -2071,7 +2039,7 @@ func (*IamPolicyAnalysisState) ProtoMessage() {} func (x *IamPolicyAnalysisState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2112,11 +2080,9 @@ type ConditionEvaluation struct { func (x *ConditionEvaluation) Reset() { *x = ConditionEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionEvaluation) String() string { @@ -2127,7 +2093,7 @@ func (*ConditionEvaluation) ProtoMessage() {} func (x *ConditionEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2181,11 +2147,9 @@ type IamPolicyAnalysisResult struct { func (x *IamPolicyAnalysisResult) Reset() { *x = IamPolicyAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult) String() string { @@ -2196,7 +2160,7 @@ func (*IamPolicyAnalysisResult) ProtoMessage() {} func (x *IamPolicyAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2228,9 @@ type IamPolicySearchResult_Explanation struct { func (x *IamPolicySearchResult_Explanation) Reset() { *x = IamPolicySearchResult_Explanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicySearchResult_Explanation) String() string { @@ -2279,7 +2241,7 @@ func (*IamPolicySearchResult_Explanation) ProtoMessage() {} func (x *IamPolicySearchResult_Explanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2313,11 +2275,9 @@ type IamPolicySearchResult_Explanation_Permissions struct { func (x *IamPolicySearchResult_Explanation_Permissions) Reset() { *x = IamPolicySearchResult_Explanation_Permissions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicySearchResult_Explanation_Permissions) String() string { @@ -2328,7 +2288,7 @@ func (*IamPolicySearchResult_Explanation_Permissions) ProtoMessage() {} func (x *IamPolicySearchResult_Explanation_Permissions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2365,11 +2325,9 @@ type IamPolicyAnalysisResult_Resource struct { func (x *IamPolicyAnalysisResult_Resource) Reset() { *x = IamPolicyAnalysisResult_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_Resource) String() string { @@ -2380,7 +2338,7 @@ func (*IamPolicyAnalysisResult_Resource) ProtoMessage() {} func (x *IamPolicyAnalysisResult_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2426,11 +2384,9 @@ type IamPolicyAnalysisResult_Access struct { func (x *IamPolicyAnalysisResult_Access) Reset() { *x = IamPolicyAnalysisResult_Access{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_Access) String() string { @@ -2441,7 +2397,7 @@ func (*IamPolicyAnalysisResult_Access) ProtoMessage() {} func (x *IamPolicyAnalysisResult_Access) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2482,9 @@ type IamPolicyAnalysisResult_Identity struct { func (x *IamPolicyAnalysisResult_Identity) Reset() { *x = IamPolicyAnalysisResult_Identity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_Identity) String() string { @@ -2541,7 +2495,7 @@ func (*IamPolicyAnalysisResult_Identity) ProtoMessage() {} func (x *IamPolicyAnalysisResult_Identity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2586,11 +2540,9 @@ type IamPolicyAnalysisResult_Edge struct { func (x *IamPolicyAnalysisResult_Edge) Reset() { *x = IamPolicyAnalysisResult_Edge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_Edge) String() string { @@ -2601,7 +2553,7 @@ func (*IamPolicyAnalysisResult_Edge) ProtoMessage() {} func (x *IamPolicyAnalysisResult_Edge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2673,11 +2625,9 @@ type IamPolicyAnalysisResult_AccessControlList struct { func (x *IamPolicyAnalysisResult_AccessControlList) Reset() { *x = IamPolicyAnalysisResult_AccessControlList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_AccessControlList) String() string { @@ -2688,7 +2638,7 @@ func (*IamPolicyAnalysisResult_AccessControlList) ProtoMessage() {} func (x *IamPolicyAnalysisResult_AccessControlList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2757,11 +2707,9 @@ type IamPolicyAnalysisResult_IdentityList struct { func (x *IamPolicyAnalysisResult_IdentityList) Reset() { *x = IamPolicyAnalysisResult_IdentityList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamPolicyAnalysisResult_IdentityList) String() string { @@ -2772,7 +2720,7 @@ func (*IamPolicyAnalysisResult_IdentityList) ProtoMessage() {} func (x *IamPolicyAnalysisResult_IdentityList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3415,320 +3363,6 @@ func file_google_cloud_asset_v1_assets_proto_init() { if File_google_cloud_asset_v1_assets_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1_assets_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TemporalAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RelatedAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RelationshipAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RelatedAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveTagDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResourceSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VersionedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AttachedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RelatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RelatedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicySearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ConditionEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicySearchResult_Explanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicySearchResult_Explanation_Permissions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_Access); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_Identity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_Edge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_AccessControlList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1_assets_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*IamPolicyAnalysisResult_IdentityList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_asset_v1_assets_proto_msgTypes[2].OneofWrappers = []any{ (*Asset_AccessPolicy)(nil), (*Asset_AccessLevel)(nil), diff --git a/asset/apiv1/helpers.go b/asset/apiv1/helpers.go index b12360308f54..9f9f777c82d2 100755 --- a/asset/apiv1/helpers.go +++ b/asset/apiv1/helpers.go @@ -18,10 +18,20 @@ package asset import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudasset.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/asset/apiv1p2beta1/asset_client.go b/asset/apiv1p2beta1/asset_client.go index f5c138c11b8b..8a316967c0b1 100755 --- a/asset/apiv1p2beta1/asset_client.go +++ b/asset/apiv1p2beta1/asset_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( assetpb "cloud.google.com/go/asset/apiv1p2beta1/assetpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -261,6 +260,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new asset service client based on gRPC. @@ -287,6 +288,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: assetpb.NewAssetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -334,6 +336,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new asset service rest client. @@ -351,6 +355,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -403,7 +408,7 @@ func (c *gRPCClient) CreateFeed(ctx context.Context, req *assetpb.CreateFeedRequ var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFeed, req, settings.GRPC, c.logger, "CreateFeed") return err }, opts...) if err != nil { @@ -421,7 +426,7 @@ func (c *gRPCClient) GetFeed(ctx context.Context, req *assetpb.GetFeedRequest, o var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFeed, req, settings.GRPC, c.logger, "GetFeed") return err }, opts...) if err != nil { @@ -439,7 +444,7 @@ func (c *gRPCClient) ListFeeds(ctx context.Context, req *assetpb.ListFeedsReques var resp *assetpb.ListFeedsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFeeds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFeeds, req, settings.GRPC, c.logger, "ListFeeds") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *gRPCClient) UpdateFeed(ctx context.Context, req *assetpb.UpdateFeedRequ var resp *assetpb.Feed err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFeed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFeed, req, settings.GRPC, c.logger, "UpdateFeed") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *gRPCClient) DeleteFeed(ctx context.Context, req *assetpb.DeleteFeedRequ opts = append((*c.CallOptions).DeleteFeed[0:len((*c.CallOptions).DeleteFeed):len((*c.CallOptions).DeleteFeed)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteFeed(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteFeed, req, settings.GRPC, c.logger, "DeleteFeed") return err }, opts...) return err @@ -489,7 +494,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -538,17 +543,7 @@ func (c *restClient) CreateFeed(ctx context.Context, req *assetpb.CreateFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeed") if err != nil { return err } @@ -598,17 +593,7 @@ func (c *restClient) GetFeed(ctx context.Context, req *assetpb.GetFeedRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeed") if err != nil { return err } @@ -658,17 +643,7 @@ func (c *restClient) ListFeeds(ctx context.Context, req *assetpb.ListFeedsReques httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeeds") if err != nil { return err } @@ -724,17 +699,7 @@ func (c *restClient) UpdateFeed(ctx context.Context, req *assetpb.UpdateFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeed") if err != nil { return err } @@ -781,15 +746,8 @@ func (c *restClient) DeleteFeed(ctx context.Context, req *assetpb.DeleteFeedRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeed") + return err }, opts...) } @@ -826,17 +784,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/asset/apiv1p2beta1/assetpb/asset_service.pb.go b/asset/apiv1p2beta1/assetpb/asset_service.pb.go index c77d49fc8976..c7203ace8fbd 100755 --- a/asset/apiv1p2beta1/assetpb/asset_service.pb.go +++ b/asset/apiv1p2beta1/assetpb/asset_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1p2beta1/asset_service.proto @@ -114,11 +114,9 @@ type ExportAssetsResponse struct { func (x *ExportAssetsResponse) Reset() { *x = ExportAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAssetsResponse) String() string { @@ -129,7 +127,7 @@ func (*ExportAssetsResponse) ProtoMessage() {} func (x *ExportAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type BatchGetAssetsHistoryResponse struct { func (x *BatchGetAssetsHistoryResponse) Reset() { *x = BatchGetAssetsHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetAssetsHistoryResponse) String() string { @@ -185,7 +181,7 @@ func (*BatchGetAssetsHistoryResponse) ProtoMessage() {} func (x *BatchGetAssetsHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type CreateFeedRequest struct { func (x *CreateFeedRequest) Reset() { *x = CreateFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedRequest) String() string { @@ -246,7 +240,7 @@ func (*CreateFeedRequest) ProtoMessage() {} func (x *CreateFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type GetFeedRequest struct { func (x *GetFeedRequest) Reset() { *x = GetFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeedRequest) String() string { @@ -312,7 +304,7 @@ func (*GetFeedRequest) ProtoMessage() {} func (x *GetFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +340,9 @@ type ListFeedsRequest struct { func (x *ListFeedsRequest) Reset() { *x = ListFeedsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedsRequest) String() string { @@ -363,7 +353,7 @@ func (*ListFeedsRequest) ProtoMessage() {} func (x *ListFeedsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +386,9 @@ type ListFeedsResponse struct { func (x *ListFeedsResponse) Reset() { *x = ListFeedsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedsResponse) String() string { @@ -411,7 +399,7 @@ func (*ListFeedsResponse) ProtoMessage() {} func (x *ListFeedsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +441,9 @@ type UpdateFeedRequest struct { func (x *UpdateFeedRequest) Reset() { *x = UpdateFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeedRequest) String() string { @@ -468,7 +454,7 @@ func (*UpdateFeedRequest) ProtoMessage() {} func (x *UpdateFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,11 +497,9 @@ type DeleteFeedRequest struct { func (x *DeleteFeedRequest) Reset() { *x = DeleteFeedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeedRequest) String() string { @@ -526,7 +510,7 @@ func (*DeleteFeedRequest) ProtoMessage() {} func (x *DeleteFeedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +548,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -579,7 +561,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +617,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -650,7 +630,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +687,9 @@ type PubsubDestination struct { func (x *PubsubDestination) Reset() { *x = PubsubDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubDestination) String() string { @@ -722,7 +700,7 @@ func (*PubsubDestination) ProtoMessage() {} func (x *PubsubDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,11 +738,9 @@ type FeedOutputConfig struct { func (x *FeedOutputConfig) Reset() { *x = FeedOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeedOutputConfig) String() string { @@ -775,7 +751,7 @@ func (*FeedOutputConfig) ProtoMessage() {} func (x *FeedOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +836,9 @@ type Feed struct { func (x *Feed) Reset() { *x = Feed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feed) String() string { @@ -875,7 +849,7 @@ func (*Feed) ProtoMessage() {} func (x *Feed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1190,164 +1164,6 @@ func file_google_cloud_asset_v1p2beta1_asset_service_proto_init() { return } file_google_cloud_asset_v1p2beta1_assets_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExportAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetAssetsHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PubsubDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FeedOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Feed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8].OneofWrappers = []any{ (*OutputConfig_GcsDestination)(nil), } diff --git a/asset/apiv1p2beta1/assetpb/assets.pb.go b/asset/apiv1p2beta1/assetpb/assets.pb.go index 0ce74bc2e517..db2c57a203ba 100755 --- a/asset/apiv1p2beta1/assetpb/assets.pb.go +++ b/asset/apiv1p2beta1/assetpb/assets.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1p2beta1/assets.proto @@ -58,11 +58,9 @@ type TemporalAsset struct { func (x *TemporalAsset) Reset() { *x = TemporalAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TemporalAsset) String() string { @@ -73,7 +71,7 @@ func (*TemporalAsset) ProtoMessage() {} func (x *TemporalAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -139,7 +135,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -248,7 +242,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +402,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -423,7 +415,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,56 +638,6 @@ func file_google_cloud_asset_v1p2beta1_assets_proto_init() { if File_google_cloud_asset_v1p2beta1_assets_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TemporalAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2].OneofWrappers = []any{ (*Asset_AccessPolicy)(nil), (*Asset_AccessLevel)(nil), diff --git a/asset/apiv1p2beta1/helpers.go b/asset/apiv1p2beta1/helpers.go index b12360308f54..9f9f777c82d2 100755 --- a/asset/apiv1p2beta1/helpers.go +++ b/asset/apiv1p2beta1/helpers.go @@ -18,10 +18,20 @@ package asset import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudasset.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/asset/apiv1p5beta1/asset_client.go b/asset/apiv1p5beta1/asset_client.go index ea67bfce1b6b..2bd4d4e91655 100755 --- a/asset/apiv1p5beta1/asset_client.go +++ b/asset/apiv1p5beta1/asset_client.go @@ -19,7 +19,7 @@ package asset import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( assetpb "cloud.google.com/go/asset/apiv1p5beta1/assetpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -160,6 +159,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new asset service client based on gRPC. @@ -186,6 +187,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: assetpb.NewAssetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -232,6 +234,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new asset service rest client. @@ -249,6 +253,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -312,7 +317,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *assetpb.ListAssetsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -399,21 +404,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *assetpb.ListAssetsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/asset/apiv1p5beta1/asset_client_example_go123_test.go b/asset/apiv1p5beta1/asset_client_example_go123_test.go index 7323fdb22424..0cc7fb6d0bb3 100644 --- a/asset/apiv1p5beta1/asset_client_example_go123_test.go +++ b/asset/apiv1p5beta1/asset_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/asset/apiv1p5beta1/assetpb/asset_service.pb.go b/asset/apiv1p5beta1/assetpb/asset_service.pb.go index f3abe3c92d7e..9e2159cb03cf 100755 --- a/asset/apiv1p5beta1/assetpb/asset_service.pb.go +++ b/asset/apiv1p5beta1/assetpb/asset_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1p5beta1/asset_service.proto @@ -152,11 +152,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -167,7 +165,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +240,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -257,7 +253,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,32 +418,6 @@ func file_google_cloud_asset_v1p5beta1_asset_service_proto_init() { return } file_google_cloud_asset_v1p5beta1_assets_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/asset/apiv1p5beta1/assetpb/assets.pb.go b/asset/apiv1p5beta1/assetpb/assets.pb.go index f58dc66297fb..bf96e28f55a8 100755 --- a/asset/apiv1p5beta1/assetpb/assets.pb.go +++ b/asset/apiv1p5beta1/assetpb/assets.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/asset/v1p5beta1/assets.proto @@ -105,11 +105,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -120,7 +118,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +278,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -295,7 +291,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,32 +486,6 @@ func file_google_cloud_asset_v1p5beta1_assets_proto_init() { if File_google_cloud_asset_v1p5beta1_assets_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0].OneofWrappers = []any{ (*Asset_AccessPolicy)(nil), (*Asset_AccessLevel)(nil), diff --git a/asset/apiv1p5beta1/helpers.go b/asset/apiv1p5beta1/helpers.go index b12360308f54..9f9f777c82d2 100755 --- a/asset/apiv1p5beta1/helpers.go +++ b/asset/apiv1p5beta1/helpers.go @@ -18,10 +18,20 @@ package asset import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudasset.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/assuredworkloads/apiv1/assured_workloads_client.go b/assuredworkloads/apiv1/assured_workloads_client.go index b62f068ea515..4234ff0eff13 100755 --- a/assuredworkloads/apiv1/assured_workloads_client.go +++ b/assuredworkloads/apiv1/assured_workloads_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -301,6 +300,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new assured workloads service client based on gRPC. @@ -327,6 +328,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: assuredworkloadspb.NewAssuredWorkloadsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -390,6 +392,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new assured workloads service rest client. @@ -407,6 +411,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -469,7 +474,7 @@ func (c *gRPCClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkload, req, settings.GRPC, c.logger, "CreateWorkload") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *gRPCClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkload, req, settings.GRPC, c.logger, "UpdateWorkload") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *gRPCClient) RestrictAllowedResources(ctx context.Context, req *assuredw var resp *assuredworkloadspb.RestrictAllowedResourcesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestrictAllowedResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestrictAllowedResources, req, settings.GRPC, c.logger, "RestrictAllowedResources") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *gRPCClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb opts = append((*c.CallOptions).DeleteWorkload[0:len((*c.CallOptions).DeleteWorkload):len((*c.CallOptions).DeleteWorkload)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkload(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkload, req, settings.GRPC, c.logger, "DeleteWorkload") return err }, opts...) return err @@ -539,7 +544,7 @@ func (c *gRPCClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkload, req, settings.GRPC, c.logger, "GetWorkload") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *gRPCClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -611,7 +616,7 @@ func (c *gRPCClient) ListViolations(ctx context.Context, req *assuredworkloadspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListViolations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListViolations, req, settings.GRPC, c.logger, "ListViolations") return err }, opts...) if err != nil { @@ -643,7 +648,7 @@ func (c *gRPCClient) GetViolation(ctx context.Context, req *assuredworkloadspb.G var resp *assuredworkloadspb.Violation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetViolation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetViolation, req, settings.GRPC, c.logger, "GetViolation") return err }, opts...) if err != nil { @@ -658,7 +663,7 @@ func (c *gRPCClient) AcknowledgeViolation(ctx context.Context, req *assuredworkl var resp *assuredworkloadspb.AcknowledgeViolationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AcknowledgeViolation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AcknowledgeViolation, req, settings.GRPC, c.logger, "AcknowledgeViolation") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -773,21 +778,10 @@ func (c *restClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkload") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -855,17 +849,7 @@ func (c *restClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkload") if err != nil { return err } @@ -926,17 +910,7 @@ func (c *restClient) RestrictAllowedResources(ctx context.Context, req *assuredw httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestrictAllowedResources") if err != nil { return err } @@ -988,15 +962,8 @@ func (c *restClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkload") + return err }, opts...) } @@ -1033,17 +1000,7 @@ func (c *restClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkload") if err != nil { return err } @@ -1108,21 +1065,10 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1219,21 +1165,10 @@ func (c *restClient) ListViolations(ctx context.Context, req *assuredworkloadspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListViolations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1294,17 +1229,7 @@ func (c *restClient) GetViolation(ctx context.Context, req *assuredworkloadspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetViolation") if err != nil { return err } @@ -1359,17 +1284,7 @@ func (c *restClient) AcknowledgeViolation(ctx context.Context, req *assuredworkl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AcknowledgeViolation") if err != nil { return err } @@ -1419,17 +1334,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1494,21 +1399,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/assuredworkloads/apiv1/assured_workloads_client_example_go123_test.go b/assuredworkloads/apiv1/assured_workloads_client_example_go123_test.go index b833d2e422db..c351a0dc0df3 100644 --- a/assuredworkloads/apiv1/assured_workloads_client_example_go123_test.go +++ b/assuredworkloads/apiv1/assured_workloads_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListViolations_all() { } for resp, err := range c.ListViolations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/assuredworkloads/apiv1/assuredworkloadspb/assuredworkloads.pb.go b/assuredworkloads/apiv1/assuredworkloadspb/assuredworkloads.pb.go index 9868296a546f..e3e4ed4282d1 100755 --- a/assuredworkloads/apiv1/assuredworkloadspb/assuredworkloads.pb.go +++ b/assuredworkloads/apiv1/assuredworkloadspb/assuredworkloads.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto @@ -626,11 +626,9 @@ type CreateWorkloadRequest struct { func (x *CreateWorkloadRequest) Reset() { *x = CreateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkloadRequest) String() string { @@ -641,7 +639,7 @@ func (*CreateWorkloadRequest) ProtoMessage() {} func (x *CreateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +692,9 @@ type UpdateWorkloadRequest struct { func (x *UpdateWorkloadRequest) Reset() { *x = UpdateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkloadRequest) String() string { @@ -709,7 +705,7 @@ func (*UpdateWorkloadRequest) ProtoMessage() {} func (x *UpdateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +751,9 @@ type DeleteWorkloadRequest struct { func (x *DeleteWorkloadRequest) Reset() { *x = DeleteWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkloadRequest) String() string { @@ -770,7 +764,7 @@ func (*DeleteWorkloadRequest) ProtoMessage() {} func (x *DeleteWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +809,9 @@ type GetWorkloadRequest struct { func (x *GetWorkloadRequest) Reset() { *x = GetWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkloadRequest) String() string { @@ -830,7 +822,7 @@ func (*GetWorkloadRequest) ProtoMessage() {} func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +866,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -889,7 +879,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +936,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -961,7 +949,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,11 +1060,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -1087,7 +1073,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,11 +1220,9 @@ type CreateWorkloadOperationMetadata struct { func (x *CreateWorkloadOperationMetadata) Reset() { *x = CreateWorkloadOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkloadOperationMetadata) String() string { @@ -1249,7 +1233,7 @@ func (*CreateWorkloadOperationMetadata) ProtoMessage() {} func (x *CreateWorkloadOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1310,11 +1294,9 @@ type RestrictAllowedResourcesRequest struct { func (x *RestrictAllowedResourcesRequest) Reset() { *x = RestrictAllowedResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestrictAllowedResourcesRequest) String() string { @@ -1325,7 +1307,7 @@ func (*RestrictAllowedResourcesRequest) ProtoMessage() {} func (x *RestrictAllowedResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1363,11 +1345,9 @@ type RestrictAllowedResourcesResponse struct { func (x *RestrictAllowedResourcesResponse) Reset() { *x = RestrictAllowedResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestrictAllowedResourcesResponse) String() string { @@ -1378,7 +1358,7 @@ func (*RestrictAllowedResourcesResponse) ProtoMessage() {} func (x *RestrictAllowedResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,11 +1400,9 @@ type AcknowledgeViolationRequest struct { func (x *AcknowledgeViolationRequest) Reset() { *x = AcknowledgeViolationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeViolationRequest) String() string { @@ -1435,7 +1413,7 @@ func (*AcknowledgeViolationRequest) ProtoMessage() {} func (x *AcknowledgeViolationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1459,9 @@ type AcknowledgeViolationResponse struct { func (x *AcknowledgeViolationResponse) Reset() { *x = AcknowledgeViolationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeViolationResponse) String() string { @@ -1496,7 +1472,7 @@ func (*AcknowledgeViolationResponse) ProtoMessage() {} func (x *AcknowledgeViolationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1525,11 +1501,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -1540,7 +1514,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1592,11 +1566,9 @@ type ListViolationsRequest struct { func (x *ListViolationsRequest) Reset() { *x = ListViolationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsRequest) String() string { @@ -1607,7 +1579,7 @@ func (*ListViolationsRequest) ProtoMessage() {} func (x *ListViolationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,11 +1643,9 @@ type ListViolationsResponse struct { func (x *ListViolationsResponse) Reset() { *x = ListViolationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsResponse) String() string { @@ -1686,7 +1656,7 @@ func (*ListViolationsResponse) ProtoMessage() {} func (x *ListViolationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1729,11 +1699,9 @@ type GetViolationRequest struct { func (x *GetViolationRequest) Reset() { *x = GetViolationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetViolationRequest) String() string { @@ -1744,7 +1712,7 @@ func (*GetViolationRequest) ProtoMessage() {} func (x *GetViolationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1789,9 @@ type Violation struct { func (x *Violation) Reset() { *x = Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation) String() string { @@ -1836,7 +1802,7 @@ func (*Violation) ProtoMessage() {} func (x *Violation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1964,11 +1930,9 @@ type Workload_ResourceInfo struct { func (x *Workload_ResourceInfo) Reset() { *x = Workload_ResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_ResourceInfo) String() string { @@ -1979,7 +1943,7 @@ func (*Workload_ResourceInfo) ProtoMessage() {} func (x *Workload_ResourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2030,11 +1994,9 @@ type Workload_KMSSettings struct { func (x *Workload_KMSSettings) Reset() { *x = Workload_KMSSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_KMSSettings) String() string { @@ -2045,7 +2007,7 @@ func (*Workload_KMSSettings) ProtoMessage() {} func (x *Workload_KMSSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,11 +2060,9 @@ type Workload_ResourceSettings struct { func (x *Workload_ResourceSettings) Reset() { *x = Workload_ResourceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_ResourceSettings) String() string { @@ -2113,7 +2073,7 @@ func (*Workload_ResourceSettings) ProtoMessage() {} func (x *Workload_ResourceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2163,11 +2123,9 @@ type Workload_SaaEnrollmentResponse struct { func (x *Workload_SaaEnrollmentResponse) Reset() { *x = Workload_SaaEnrollmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_SaaEnrollmentResponse) String() string { @@ -2178,7 +2136,7 @@ func (*Workload_SaaEnrollmentResponse) ProtoMessage() {} func (x *Workload_SaaEnrollmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2226,11 +2184,9 @@ type Violation_Remediation struct { func (x *Violation_Remediation) Reset() { *x = Violation_Remediation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation) String() string { @@ -2241,7 +2197,7 @@ func (*Violation_Remediation) ProtoMessage() {} func (x *Violation_Remediation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2291,11 +2247,9 @@ type Violation_Remediation_Instructions struct { func (x *Violation_Remediation_Instructions) Reset() { *x = Violation_Remediation_Instructions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions) String() string { @@ -2306,7 +2260,7 @@ func (*Violation_Remediation_Instructions) ProtoMessage() {} func (x *Violation_Remediation_Instructions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2351,11 +2305,9 @@ type Violation_Remediation_Instructions_Gcloud struct { func (x *Violation_Remediation_Instructions_Gcloud) Reset() { *x = Violation_Remediation_Instructions_Gcloud{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Gcloud) String() string { @@ -2366,7 +2318,7 @@ func (*Violation_Remediation_Instructions_Gcloud) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Gcloud) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2418,11 +2370,9 @@ type Violation_Remediation_Instructions_Console struct { func (x *Violation_Remediation_Instructions_Console) Reset() { *x = Violation_Remediation_Instructions_Console{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Console) String() string { @@ -2433,7 +2383,7 @@ func (*Violation_Remediation_Instructions_Console) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Console) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3236,308 +3186,6 @@ func file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_init() { if File_google_cloud_assuredworkloads_v1_assuredworkloads_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkloadOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RestrictAllowedResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RestrictAllowedResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeViolationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeViolationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetViolationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Workload_ResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Workload_KMSSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Workload_ResourceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Workload_SaaEnrollmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Gcloud); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Console); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[16].OneofWrappers = []any{} file_google_cloud_assuredworkloads_v1_assuredworkloads_proto_msgTypes[20].OneofWrappers = []any{} type x struct{} diff --git a/assuredworkloads/apiv1/helpers.go b/assuredworkloads/apiv1/helpers.go index 22aca378d0b7..ff6270ea9989 100755 --- a/assuredworkloads/apiv1/helpers.go +++ b/assuredworkloads/apiv1/helpers.go @@ -18,10 +18,20 @@ package assuredworkloads import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "assuredworkloads.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/assuredworkloads/apiv1beta1/assured_workloads_client.go b/assuredworkloads/apiv1beta1/assured_workloads_client.go index 6d12bad097b0..32a19df790ba 100755 --- a/assuredworkloads/apiv1beta1/assured_workloads_client.go +++ b/assuredworkloads/apiv1beta1/assured_workloads_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -379,6 +378,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new assured workloads service client based on gRPC. @@ -405,6 +406,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: assuredworkloadspb.NewAssuredWorkloadsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -468,6 +470,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new assured workloads service rest client. @@ -485,6 +489,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -547,7 +552,7 @@ func (c *gRPCClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkload, req, settings.GRPC, c.logger, "CreateWorkload") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkload, req, settings.GRPC, c.logger, "UpdateWorkload") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *gRPCClient) RestrictAllowedResources(ctx context.Context, req *assuredw var resp *assuredworkloadspb.RestrictAllowedResourcesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestrictAllowedResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestrictAllowedResources, req, settings.GRPC, c.logger, "RestrictAllowedResources") return err }, opts...) if err != nil { @@ -599,7 +604,7 @@ func (c *gRPCClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb opts = append((*c.CallOptions).DeleteWorkload[0:len((*c.CallOptions).DeleteWorkload):len((*c.CallOptions).DeleteWorkload)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkload(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkload, req, settings.GRPC, c.logger, "DeleteWorkload") return err }, opts...) return err @@ -611,7 +616,7 @@ func (c *gRPCClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkload, req, settings.GRPC, c.logger, "GetWorkload") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *gRPCClient) AnalyzeWorkloadMove(ctx context.Context, req *assuredworklo var resp *assuredworkloadspb.AnalyzeWorkloadMoveResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeWorkloadMove(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeWorkloadMove, req, settings.GRPC, c.logger, "AnalyzeWorkloadMove") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *gRPCClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -784,21 +789,10 @@ func (c *restClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkload") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -966,17 +960,7 @@ func (c *restClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "UpdateWorkload") if err != nil { return err } @@ -1037,17 +1021,7 @@ func (c *restClient) RestrictAllowedResources(ctx context.Context, req *assuredw httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestrictAllowedResources") if err != nil { return err } @@ -1102,15 +1076,8 @@ func (c *restClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkload") + return err }, opts...) } @@ -1145,17 +1112,7 @@ func (c *restClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkload") if err != nil { return err } @@ -1210,17 +1167,7 @@ func (c *restClient) AnalyzeWorkloadMove(ctx context.Context, req *assuredworklo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AnalyzeWorkloadMove") if err != nil { return err } @@ -1286,21 +1233,10 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1363,17 +1299,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1438,21 +1364,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/assuredworkloads/apiv1beta1/assured_workloads_client_example_go123_test.go b/assuredworkloads/apiv1beta1/assured_workloads_client_example_go123_test.go index 0e20b5f05e2f..4b2a6c974305 100644 --- a/assuredworkloads/apiv1beta1/assured_workloads_client_example_go123_test.go +++ b/assuredworkloads/apiv1beta1/assured_workloads_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go index f90ebd7c706b..aacf98139d27 100755 --- a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go +++ b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto @@ -439,11 +439,9 @@ type CreateWorkloadRequest struct { func (x *CreateWorkloadRequest) Reset() { *x = CreateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkloadRequest) String() string { @@ -454,7 +452,7 @@ func (*CreateWorkloadRequest) ProtoMessage() {} func (x *CreateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +505,9 @@ type UpdateWorkloadRequest struct { func (x *UpdateWorkloadRequest) Reset() { *x = UpdateWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkloadRequest) String() string { @@ -522,7 +518,7 @@ func (*UpdateWorkloadRequest) ProtoMessage() {} func (x *UpdateWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +565,9 @@ type RestrictAllowedResourcesRequest struct { func (x *RestrictAllowedResourcesRequest) Reset() { *x = RestrictAllowedResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestrictAllowedResourcesRequest) String() string { @@ -584,7 +578,7 @@ func (*RestrictAllowedResourcesRequest) ProtoMessage() {} func (x *RestrictAllowedResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +616,9 @@ type RestrictAllowedResourcesResponse struct { func (x *RestrictAllowedResourcesResponse) Reset() { *x = RestrictAllowedResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestrictAllowedResourcesResponse) String() string { @@ -637,7 +629,7 @@ func (*RestrictAllowedResourcesResponse) ProtoMessage() {} func (x *RestrictAllowedResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +661,9 @@ type DeleteWorkloadRequest struct { func (x *DeleteWorkloadRequest) Reset() { *x = DeleteWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkloadRequest) String() string { @@ -684,7 +674,7 @@ func (*DeleteWorkloadRequest) ProtoMessage() {} func (x *DeleteWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +719,9 @@ type GetWorkloadRequest struct { func (x *GetWorkloadRequest) Reset() { *x = GetWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkloadRequest) String() string { @@ -744,7 +732,7 @@ func (*GetWorkloadRequest) ProtoMessage() {} func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +780,9 @@ type AnalyzeWorkloadMoveRequest struct { func (x *AnalyzeWorkloadMoveRequest) Reset() { *x = AnalyzeWorkloadMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeWorkloadMoveRequest) String() string { @@ -807,7 +793,7 @@ func (*AnalyzeWorkloadMoveRequest) ProtoMessage() {} func (x *AnalyzeWorkloadMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +876,9 @@ type AnalyzeWorkloadMoveResponse struct { func (x *AnalyzeWorkloadMoveResponse) Reset() { *x = AnalyzeWorkloadMoveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeWorkloadMoveResponse) String() string { @@ -905,7 +889,7 @@ func (*AnalyzeWorkloadMoveResponse) ProtoMessage() {} func (x *AnalyzeWorkloadMoveResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -964,7 +946,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1003,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -1036,7 +1016,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1134,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -1169,7 +1147,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1369,9 @@ type CreateWorkloadOperationMetadata struct { func (x *CreateWorkloadOperationMetadata) Reset() { *x = CreateWorkloadOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkloadOperationMetadata) String() string { @@ -1406,7 +1382,7 @@ func (*CreateWorkloadOperationMetadata) ProtoMessage() {} func (x *CreateWorkloadOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1471,11 +1447,9 @@ type Workload_ResourceInfo struct { func (x *Workload_ResourceInfo) Reset() { *x = Workload_ResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_ResourceInfo) String() string { @@ -1486,7 +1460,7 @@ func (*Workload_ResourceInfo) ProtoMessage() {} func (x *Workload_ResourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1508,9 @@ type Workload_KMSSettings struct { func (x *Workload_KMSSettings) Reset() { *x = Workload_KMSSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_KMSSettings) String() string { @@ -1549,7 +1521,7 @@ func (*Workload_KMSSettings) ProtoMessage() {} func (x *Workload_KMSSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1592,11 +1564,9 @@ type Workload_IL4Settings struct { func (x *Workload_IL4Settings) Reset() { *x = Workload_IL4Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_IL4Settings) String() string { @@ -1607,7 +1577,7 @@ func (*Workload_IL4Settings) ProtoMessage() {} func (x *Workload_IL4Settings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1643,11 +1613,9 @@ type Workload_CJISSettings struct { func (x *Workload_CJISSettings) Reset() { *x = Workload_CJISSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_CJISSettings) String() string { @@ -1658,7 +1626,7 @@ func (*Workload_CJISSettings) ProtoMessage() {} func (x *Workload_CJISSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1694,11 +1662,9 @@ type Workload_FedrampHighSettings struct { func (x *Workload_FedrampHighSettings) Reset() { *x = Workload_FedrampHighSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_FedrampHighSettings) String() string { @@ -1709,7 +1675,7 @@ func (*Workload_FedrampHighSettings) ProtoMessage() {} func (x *Workload_FedrampHighSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1745,11 +1711,9 @@ type Workload_FedrampModerateSettings struct { func (x *Workload_FedrampModerateSettings) Reset() { *x = Workload_FedrampModerateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_FedrampModerateSettings) String() string { @@ -1760,7 +1724,7 @@ func (*Workload_FedrampModerateSettings) ProtoMessage() {} func (x *Workload_FedrampModerateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1770,9 @@ type Workload_ResourceSettings struct { func (x *Workload_ResourceSettings) Reset() { *x = Workload_ResourceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_ResourceSettings) String() string { @@ -1821,7 +1783,7 @@ func (*Workload_ResourceSettings) ProtoMessage() {} func (x *Workload_ResourceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1871,11 +1833,9 @@ type Workload_SaaEnrollmentResponse struct { func (x *Workload_SaaEnrollmentResponse) Reset() { *x = Workload_SaaEnrollmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload_SaaEnrollmentResponse) String() string { @@ -1886,7 +1846,7 @@ func (*Workload_SaaEnrollmentResponse) ProtoMessage() {} func (x *Workload_SaaEnrollmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2421,248 +2381,6 @@ func file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_init() { if File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RestrictAllowedResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RestrictAllowedResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeWorkloadMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeWorkloadMoveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkloadOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Workload_ResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Workload_KMSSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Workload_IL4Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Workload_CJISSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Workload_FedrampHighSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Workload_FedrampModerateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Workload_ResourceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Workload_SaaEnrollmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6].OneofWrappers = []any{ (*AnalyzeWorkloadMoveRequest_Source)(nil), (*AnalyzeWorkloadMoveRequest_Project)(nil), diff --git a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go index 33bec16c8d9f..a20ed6c421c6 100755 --- a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go +++ b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto diff --git a/assuredworkloads/apiv1beta1/helpers.go b/assuredworkloads/apiv1beta1/helpers.go index 22aca378d0b7..ff6270ea9989 100755 --- a/assuredworkloads/apiv1beta1/helpers.go +++ b/assuredworkloads/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package assuredworkloads import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "assuredworkloads.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/automl/apiv1/auto_ml_client.go b/automl/apiv1/auto_ml_client.go index adde3a8b44c6..21b8b1214799 100755 --- a/automl/apiv1/auto_ml_client.go +++ b/automl/apiv1/auto_ml_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -667,6 +666,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new auto ml client based on gRPC. @@ -706,6 +707,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: automlpb.NewAutoMlClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -768,6 +770,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new auto ml rest client. @@ -798,6 +802,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -860,7 +865,7 @@ func (c *gRPCClient) CreateDataset(ctx context.Context, req *automlpb.CreateData var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -880,7 +885,7 @@ func (c *gRPCClient) GetDataset(ctx context.Context, req *automlpb.GetDatasetReq var resp *automlpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -909,7 +914,7 @@ func (c *gRPCClient) ListDatasets(ctx context.Context, req *automlpb.ListDataset } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *gRPCClient) UpdateDataset(ctx context.Context, req *automlpb.UpdateData var resp *automlpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDataset, req, settings.GRPC, c.logger, "UpdateDataset") return err }, opts...) if err != nil { @@ -962,7 +967,7 @@ func (c *gRPCClient) DeleteDataset(ctx context.Context, req *automlpb.DeleteData var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) if err != nil { @@ -982,7 +987,7 @@ func (c *gRPCClient) ImportData(ctx context.Context, req *automlpb.ImportDataReq var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *gRPCClient) ExportData(ctx context.Context, req *automlpb.ExportDataReq var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -1022,7 +1027,7 @@ func (c *gRPCClient) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnn var resp *automlpb.AnnotationSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnnotationSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnnotationSpec, req, settings.GRPC, c.logger, "GetAnnotationSpec") return err }, opts...) if err != nil { @@ -1040,7 +1045,7 @@ func (c *gRPCClient) CreateModel(ctx context.Context, req *automlpb.CreateModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -1060,7 +1065,7 @@ func (c *gRPCClient) GetModel(ctx context.Context, req *automlpb.GetModelRequest var resp *automlpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -1089,7 +1094,7 @@ func (c *gRPCClient) ListModels(ctx context.Context, req *automlpb.ListModelsReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -1124,7 +1129,7 @@ func (c *gRPCClient) DeleteModel(ctx context.Context, req *automlpb.DeleteModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) if err != nil { @@ -1144,7 +1149,7 @@ func (c *gRPCClient) UpdateModel(ctx context.Context, req *automlpb.UpdateModelR var resp *automlpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -1162,7 +1167,7 @@ func (c *gRPCClient) DeployModel(ctx context.Context, req *automlpb.DeployModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeployModel, req, settings.GRPC, c.logger, "DeployModel") return err }, opts...) if err != nil { @@ -1182,7 +1187,7 @@ func (c *gRPCClient) UndeployModel(ctx context.Context, req *automlpb.UndeployMo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeployModel, req, settings.GRPC, c.logger, "UndeployModel") return err }, opts...) if err != nil { @@ -1202,7 +1207,7 @@ func (c *gRPCClient) ExportModel(ctx context.Context, req *automlpb.ExportModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportModel, req, settings.GRPC, c.logger, "ExportModel") return err }, opts...) if err != nil { @@ -1222,7 +1227,7 @@ func (c *gRPCClient) GetModelEvaluation(ctx context.Context, req *automlpb.GetMo var resp *automlpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetModelEvaluation, req, settings.GRPC, c.logger, "GetModelEvaluation") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *gRPCClient) ListModelEvaluations(ctx context.Context, req *automlpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListModelEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListModelEvaluations, req, settings.GRPC, c.logger, "ListModelEvaluations") return err }, opts...) if err != nil { @@ -1316,21 +1321,10 @@ func (c *restClient) CreateDataset(ctx context.Context, req *automlpb.CreateData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1381,17 +1375,7 @@ func (c *restClient) GetDataset(ctx context.Context, req *automlpb.GetDatasetReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataset") if err != nil { return err } @@ -1456,21 +1440,10 @@ func (c *restClient) ListDatasets(ctx context.Context, req *automlpb.ListDataset } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1547,17 +1520,7 @@ func (c *restClient) UpdateDataset(ctx context.Context, req *automlpb.UpdateData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataset") if err != nil { return err } @@ -1610,21 +1573,10 @@ func (c *restClient) DeleteDataset(ctx context.Context, req *automlpb.DeleteData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1689,21 +1641,10 @@ func (c *restClient) ImportData(ctx context.Context, req *automlpb.ImportDataReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1761,21 +1702,10 @@ func (c *restClient) ExportData(ctx context.Context, req *automlpb.ExportDataReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1826,17 +1756,7 @@ func (c *restClient) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotationSpec") if err != nil { return err } @@ -1896,21 +1816,10 @@ func (c *restClient) CreateModel(ctx context.Context, req *automlpb.CreateModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1961,17 +1870,7 @@ func (c *restClient) GetModel(ctx context.Context, req *automlpb.GetModelRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -2036,21 +1935,10 @@ func (c *restClient) ListModels(ctx context.Context, req *automlpb.ListModelsReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2116,21 +2004,10 @@ func (c *restClient) DeleteModel(ctx context.Context, req *automlpb.DeleteModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2195,17 +2072,7 @@ func (c *restClient) UpdateModel(ctx context.Context, req *automlpb.UpdateModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModel") if err != nil { return err } @@ -2270,21 +2137,10 @@ func (c *restClient) DeployModel(ctx context.Context, req *automlpb.DeployModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2346,21 +2202,10 @@ func (c *restClient) UndeployModel(ctx context.Context, req *automlpb.UndeployMo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2422,21 +2267,10 @@ func (c *restClient) ExportModel(ctx context.Context, req *automlpb.ExportModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2487,17 +2321,7 @@ func (c *restClient) GetModelEvaluation(ctx context.Context, req *automlpb.GetMo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelEvaluation") if err != nil { return err } @@ -2560,21 +2384,10 @@ func (c *restClient) ListModelEvaluations(ctx context.Context, req *automlpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelEvaluations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/automl/apiv1/auto_ml_client_example_go123_test.go b/automl/apiv1/auto_ml_client_example_go123_test.go index 6438065d1b83..111ba1c4b6e0 100644 --- a/automl/apiv1/auto_ml_client_example_go123_test.go +++ b/automl/apiv1/auto_ml_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListModelEvaluations_all() { } for resp, err := range c.ListModelEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/automl/apiv1/automlpb/annotation_payload.pb.go b/automl/apiv1/automlpb/annotation_payload.pb.go index cd180598b301..4eb1161e1d65 100755 --- a/automl/apiv1/automlpb/annotation_payload.pb.go +++ b/automl/apiv1/automlpb/annotation_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/annotation_payload.proto @@ -67,11 +67,9 @@ type AnnotationPayload struct { func (x *AnnotationPayload) Reset() { *x = AnnotationPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_annotation_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_annotation_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationPayload) String() string { @@ -82,7 +80,7 @@ func (*AnnotationPayload) ProtoMessage() {} func (x *AnnotationPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_annotation_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,20 +305,6 @@ func file_google_cloud_automl_v1_annotation_payload_proto_init() { file_google_cloud_automl_v1_text_extraction_proto_init() file_google_cloud_automl_v1_text_sentiment_proto_init() file_google_cloud_automl_v1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_annotation_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_annotation_payload_proto_msgTypes[0].OneofWrappers = []any{ (*AnnotationPayload_Translation)(nil), (*AnnotationPayload_Classification)(nil), diff --git a/automl/apiv1/automlpb/annotation_spec.pb.go b/automl/apiv1/automlpb/annotation_spec.pb.go index f08b105c05f5..7aefcb7ba2e0 100755 --- a/automl/apiv1/automlpb/annotation_spec.pb.go +++ b/automl/apiv1/automlpb/annotation_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/annotation_spec.proto @@ -56,11 +56,9 @@ type AnnotationSpec struct { func (x *AnnotationSpec) Reset() { *x = AnnotationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_annotation_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_annotation_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpec) String() string { @@ -71,7 +69,7 @@ func (*AnnotationSpec) ProtoMessage() {} func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_annotation_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,20 +172,6 @@ func file_google_cloud_automl_v1_annotation_spec_proto_init() { if File_google_cloud_automl_v1_annotation_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_annotation_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/classification.pb.go b/automl/apiv1/automlpb/classification.pb.go index a5214a3051f3..d7d73c5b8eea 100755 --- a/automl/apiv1/automlpb/classification.pb.go +++ b/automl/apiv1/automlpb/classification.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/classification.proto @@ -104,11 +104,9 @@ type ClassificationAnnotation struct { func (x *ClassificationAnnotation) Reset() { *x = ClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationAnnotation) String() string { @@ -119,7 +117,7 @@ func (*ClassificationAnnotation) ProtoMessage() {} func (x *ClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +174,9 @@ type ClassificationEvaluationMetrics struct { func (x *ClassificationEvaluationMetrics) Reset() { *x = ClassificationEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics) String() string { @@ -191,7 +187,7 @@ func (*ClassificationEvaluationMetrics) ProtoMessage() {} func (x *ClassificationEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +296,9 @@ type ClassificationEvaluationMetrics_ConfidenceMetricsEntry struct { func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Reset() { *x = ClassificationEvaluationMetrics_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) String() string { @@ -315,7 +309,7 @@ func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +450,9 @@ type ClassificationEvaluationMetrics_ConfusionMatrix struct { func (x *ClassificationEvaluationMetrics_ConfusionMatrix) Reset() { *x = ClassificationEvaluationMetrics_ConfusionMatrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfusionMatrix) String() string { @@ -471,7 +463,7 @@ func (*ClassificationEvaluationMetrics_ConfusionMatrix) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfusionMatrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +514,9 @@ type ClassificationEvaluationMetrics_ConfusionMatrix_Row struct { func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) Reset() { *x = ClassificationEvaluationMetrics_ConfusionMatrix_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) String() string { @@ -537,7 +527,7 @@ func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_classification_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,68 +696,6 @@ func file_google_cloud_automl_v1_classification_proto_init() { if File_google_cloud_automl_v1_classification_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_classification_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_classification_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_classification_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_classification_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_classification_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/data_items.pb.go b/automl/apiv1/automlpb/data_items.pb.go index 6279389d9d27..59426d69e35a 100755 --- a/automl/apiv1/automlpb/data_items.pb.go +++ b/automl/apiv1/automlpb/data_items.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/data_items.proto @@ -203,11 +203,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -218,7 +216,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +284,9 @@ type TextSnippet struct { func (x *TextSnippet) Reset() { *x = TextSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSnippet) String() string { @@ -301,7 +297,7 @@ func (*TextSnippet) ProtoMessage() {} func (x *TextSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +349,9 @@ type DocumentDimensions struct { func (x *DocumentDimensions) Reset() { *x = DocumentDimensions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentDimensions) String() string { @@ -368,7 +362,7 @@ func (*DocumentDimensions) ProtoMessage() {} func (x *DocumentDimensions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +419,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -440,7 +432,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +500,9 @@ type ExamplePayload struct { func (x *ExamplePayload) Reset() { *x = ExamplePayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplePayload) String() string { @@ -523,7 +513,7 @@ func (*ExamplePayload) ProtoMessage() {} func (x *ExamplePayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +608,9 @@ type Document_Layout struct { func (x *Document_Layout) Reset() { *x = Document_Layout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Layout) String() string { @@ -633,7 +621,7 @@ func (*Document_Layout) ProtoMessage() {} func (x *Document_Layout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_data_items_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,80 +841,6 @@ func file_google_cloud_automl_v1_data_items_proto_init() { file_google_cloud_automl_v1_geometry_proto_init() file_google_cloud_automl_v1_io_proto_init() file_google_cloud_automl_v1_text_segment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_data_items_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_data_items_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_data_items_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentDimensions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_data_items_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_data_items_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExamplePayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_data_items_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Document_Layout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_data_items_proto_msgTypes[0].OneofWrappers = []any{ (*Image_ImageBytes)(nil), } diff --git a/automl/apiv1/automlpb/dataset.pb.go b/automl/apiv1/automlpb/dataset.pb.go index 2acc26fb821b..e7e037075af9 100755 --- a/automl/apiv1/automlpb/dataset.pb.go +++ b/automl/apiv1/automlpb/dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/dataset.proto @@ -87,11 +87,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -102,7 +100,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,20 +418,6 @@ func file_google_cloud_automl_v1_dataset_proto_init() { file_google_cloud_automl_v1_image_proto_init() file_google_cloud_automl_v1_text_proto_init() file_google_cloud_automl_v1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_dataset_proto_msgTypes[0].OneofWrappers = []any{ (*Dataset_TranslationDatasetMetadata)(nil), (*Dataset_ImageClassificationDatasetMetadata)(nil), diff --git a/automl/apiv1/automlpb/detection.pb.go b/automl/apiv1/automlpb/detection.pb.go index b69ebd59d6ed..dbf2158ba632 100755 --- a/automl/apiv1/automlpb/detection.pb.go +++ b/automl/apiv1/automlpb/detection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/detection.proto @@ -50,11 +50,9 @@ type ImageObjectDetectionAnnotation struct { func (x *ImageObjectDetectionAnnotation) Reset() { *x = ImageObjectDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionAnnotation) String() string { @@ -65,7 +63,7 @@ func (*ImageObjectDetectionAnnotation) ProtoMessage() {} func (x *ImageObjectDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type BoundingBoxMetricsEntry struct { func (x *BoundingBoxMetricsEntry) Reset() { *x = BoundingBoxMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBoxMetricsEntry) String() string { @@ -129,7 +125,7 @@ func (*BoundingBoxMetricsEntry) ProtoMessage() {} func (x *BoundingBoxMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +183,9 @@ type ImageObjectDetectionEvaluationMetrics struct { func (x *ImageObjectDetectionEvaluationMetrics) Reset() { *x = ImageObjectDetectionEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionEvaluationMetrics) String() string { @@ -202,7 +196,7 @@ func (*ImageObjectDetectionEvaluationMetrics) ProtoMessage() {} func (x *ImageObjectDetectionEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +250,9 @@ type BoundingBoxMetricsEntry_ConfidenceMetricsEntry struct { func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) Reset() { *x = BoundingBoxMetricsEntry_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) String() string { @@ -271,7 +263,7 @@ func (*BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoMessage() {} func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_detection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,56 +418,6 @@ func file_google_cloud_automl_v1_detection_proto_init() { return } file_google_cloud_automl_v1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_detection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_detection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBoxMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_detection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_detection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBoxMetricsEntry_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/geometry.pb.go b/automl/apiv1/automlpb/geometry.pb.go index 47fd02ebe0ac..88dc798a89bf 100755 --- a/automl/apiv1/automlpb/geometry.pb.go +++ b/automl/apiv1/automlpb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/geometry.proto @@ -53,11 +53,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -68,7 +66,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -126,7 +122,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,32 +205,6 @@ func file_google_cloud_automl_v1_geometry_proto_init() { if File_google_cloud_automl_v1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/image.pb.go b/automl/apiv1/automlpb/image.pb.go index 56660b233e1a..3d0d0b888ec7 100755 --- a/automl/apiv1/automlpb/image.pb.go +++ b/automl/apiv1/automlpb/image.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/image.proto @@ -48,11 +48,9 @@ type ImageClassificationDatasetMetadata struct { func (x *ImageClassificationDatasetMetadata) Reset() { *x = ImageClassificationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationDatasetMetadata) String() string { @@ -63,7 +61,7 @@ func (*ImageClassificationDatasetMetadata) ProtoMessage() {} func (x *ImageClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94,11 +92,9 @@ type ImageObjectDetectionDatasetMetadata struct { func (x *ImageObjectDetectionDatasetMetadata) Reset() { *x = ImageObjectDetectionDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionDatasetMetadata) String() string { @@ -109,7 +105,7 @@ func (*ImageObjectDetectionDatasetMetadata) ProtoMessage() {} func (x *ImageObjectDetectionDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type ImageClassificationModelMetadata struct { func (x *ImageClassificationModelMetadata) Reset() { *x = ImageClassificationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationModelMetadata) String() string { @@ -218,7 +212,7 @@ func (*ImageClassificationModelMetadata) ProtoMessage() {} func (x *ImageClassificationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +340,9 @@ type ImageObjectDetectionModelMetadata struct { func (x *ImageObjectDetectionModelMetadata) Reset() { *x = ImageObjectDetectionModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionModelMetadata) String() string { @@ -361,7 +353,7 @@ func (*ImageObjectDetectionModelMetadata) ProtoMessage() {} func (x *ImageObjectDetectionModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +426,9 @@ type ImageClassificationModelDeploymentMetadata struct { func (x *ImageClassificationModelDeploymentMetadata) Reset() { *x = ImageClassificationModelDeploymentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationModelDeploymentMetadata) String() string { @@ -449,7 +439,7 @@ func (*ImageClassificationModelDeploymentMetadata) ProtoMessage() {} func (x *ImageClassificationModelDeploymentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +477,9 @@ type ImageObjectDetectionModelDeploymentMetadata struct { func (x *ImageObjectDetectionModelDeploymentMetadata) Reset() { *x = ImageObjectDetectionModelDeploymentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_image_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_image_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionModelDeploymentMetadata) String() string { @@ -502,7 +490,7 @@ func (*ImageObjectDetectionModelDeploymentMetadata) ProtoMessage() {} func (x *ImageObjectDetectionModelDeploymentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_image_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,80 +638,6 @@ func file_google_cloud_automl_v1_image_proto_init() { return } file_google_cloud_automl_v1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_image_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_image_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_image_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_image_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_image_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationModelDeploymentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_image_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionModelDeploymentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/io.pb.go b/automl/apiv1/automlpb/io.pb.go index 2d3a5c846fc2..30a8d7c273fc 100755 --- a/automl/apiv1/automlpb/io.pb.go +++ b/automl/apiv1/automlpb/io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/io.proto @@ -670,11 +670,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -685,7 +683,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +1016,9 @@ type BatchPredictInputConfig struct { func (x *BatchPredictInputConfig) Reset() { *x = BatchPredictInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictInputConfig) String() string { @@ -1033,7 +1029,7 @@ func (*BatchPredictInputConfig) ProtoMessage() {} func (x *BatchPredictInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1086,9 @@ type DocumentInputConfig struct { func (x *DocumentInputConfig) Reset() { *x = DocumentInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInputConfig) String() string { @@ -1105,7 +1099,7 @@ func (*DocumentInputConfig) ProtoMessage() {} func (x *DocumentInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1164,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -1185,7 +1177,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1497,11 +1489,9 @@ type BatchPredictOutputConfig struct { func (x *BatchPredictOutputConfig) Reset() { *x = BatchPredictOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOutputConfig) String() string { @@ -1512,7 +1502,7 @@ func (*BatchPredictOutputConfig) ProtoMessage() {} func (x *BatchPredictOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1600,9 @@ type ModelExportOutputConfig struct { func (x *ModelExportOutputConfig) Reset() { *x = ModelExportOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelExportOutputConfig) String() string { @@ -1625,7 +1613,7 @@ func (*ModelExportOutputConfig) ProtoMessage() {} func (x *ModelExportOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1691,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -1718,7 +1704,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1757,11 +1743,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -1772,7 +1756,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1931,104 +1915,6 @@ func file_google_cloud_automl_v1_io_proto_init() { if File_google_cloud_automl_v1_io_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelExportOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_io_proto_msgTypes[0].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), } diff --git a/automl/apiv1/automlpb/model.pb.go b/automl/apiv1/automlpb/model.pb.go index 6933cc8dc399..6449f368e4c5 100755 --- a/automl/apiv1/automlpb/model.pb.go +++ b/automl/apiv1/automlpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/model.proto @@ -143,11 +143,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -158,7 +156,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,20 +494,6 @@ func file_google_cloud_automl_v1_model_proto_init() { file_google_cloud_automl_v1_image_proto_init() file_google_cloud_automl_v1_text_proto_init() file_google_cloud_automl_v1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_model_proto_msgTypes[0].OneofWrappers = []any{ (*Model_TranslationModelMetadata)(nil), (*Model_ImageClassificationModelMetadata)(nil), diff --git a/automl/apiv1/automlpb/model_evaluation.pb.go b/automl/apiv1/automlpb/model_evaluation.pb.go index deba22542189..d677f0a7083d 100755 --- a/automl/apiv1/automlpb/model_evaluation.pb.go +++ b/automl/apiv1/automlpb/model_evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/model_evaluation.proto @@ -92,11 +92,9 @@ type ModelEvaluation struct { func (x *ModelEvaluation) Reset() { *x = ModelEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_model_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_model_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation) String() string { @@ -107,7 +105,7 @@ func (*ModelEvaluation) ProtoMessage() {} func (x *ModelEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_model_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,20 +390,6 @@ func file_google_cloud_automl_v1_model_evaluation_proto_init() { file_google_cloud_automl_v1_text_extraction_proto_init() file_google_cloud_automl_v1_text_sentiment_proto_init() file_google_cloud_automl_v1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_model_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_model_evaluation_proto_msgTypes[0].OneofWrappers = []any{ (*ModelEvaluation_ClassificationEvaluationMetrics)(nil), (*ModelEvaluation_TranslationEvaluationMetrics)(nil), diff --git a/automl/apiv1/automlpb/operations.pb.go b/automl/apiv1/automlpb/operations.pb.go index eae42e0edca0..66eaba8628ff 100755 --- a/automl/apiv1/automlpb/operations.pb.go +++ b/automl/apiv1/automlpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/operations.proto @@ -74,11 +74,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -89,7 +87,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +276,9 @@ type DeleteOperationMetadata struct { func (x *DeleteOperationMetadata) Reset() { *x = DeleteOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationMetadata) String() string { @@ -293,7 +289,7 @@ func (*DeleteOperationMetadata) ProtoMessage() {} func (x *DeleteOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type DeployModelOperationMetadata struct { func (x *DeployModelOperationMetadata) Reset() { *x = DeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelOperationMetadata) String() string { @@ -332,7 +326,7 @@ func (*DeployModelOperationMetadata) ProtoMessage() {} func (x *DeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +350,9 @@ type UndeployModelOperationMetadata struct { func (x *UndeployModelOperationMetadata) Reset() { *x = UndeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelOperationMetadata) String() string { @@ -371,7 +363,7 @@ func (*UndeployModelOperationMetadata) ProtoMessage() {} func (x *UndeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +387,9 @@ type CreateDatasetOperationMetadata struct { func (x *CreateDatasetOperationMetadata) Reset() { *x = CreateDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetOperationMetadata) String() string { @@ -410,7 +400,7 @@ func (*CreateDatasetOperationMetadata) ProtoMessage() {} func (x *CreateDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type CreateModelOperationMetadata struct { func (x *CreateModelOperationMetadata) Reset() { *x = CreateModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelOperationMetadata) String() string { @@ -449,7 +437,7 @@ func (*CreateModelOperationMetadata) ProtoMessage() {} func (x *CreateModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +461,9 @@ type ImportDataOperationMetadata struct { func (x *ImportDataOperationMetadata) Reset() { *x = ImportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationMetadata) String() string { @@ -488,7 +474,7 @@ func (*ImportDataOperationMetadata) ProtoMessage() {} func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +501,9 @@ type ExportDataOperationMetadata struct { func (x *ExportDataOperationMetadata) Reset() { *x = ExportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata) String() string { @@ -530,7 +514,7 @@ func (*ExportDataOperationMetadata) ProtoMessage() {} func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +551,9 @@ type BatchPredictOperationMetadata struct { func (x *BatchPredictOperationMetadata) Reset() { *x = BatchPredictOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOperationMetadata) String() string { @@ -582,7 +564,7 @@ func (*BatchPredictOperationMetadata) ProtoMessage() {} func (x *BatchPredictOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +606,9 @@ type ExportModelOperationMetadata struct { func (x *ExportModelOperationMetadata) Reset() { *x = ExportModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata) String() string { @@ -639,7 +619,7 @@ func (*ExportModelOperationMetadata) ProtoMessage() {} func (x *ExportModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +659,9 @@ type ExportDataOperationMetadata_ExportDataOutputInfo struct { func (x *ExportDataOperationMetadata_ExportDataOutputInfo) Reset() { *x = ExportDataOperationMetadata_ExportDataOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata_ExportDataOutputInfo) String() string { @@ -694,7 +672,7 @@ func (*ExportDataOperationMetadata_ExportDataOutputInfo) ProtoMessage() {} func (x *ExportDataOperationMetadata_ExportDataOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +732,9 @@ type BatchPredictOperationMetadata_BatchPredictOutputInfo struct { func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) Reset() { *x = BatchPredictOperationMetadata_BatchPredictOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) String() string { @@ -769,7 +745,7 @@ func (*BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoMessage() {} func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +802,9 @@ type ExportModelOperationMetadata_ExportModelOutputInfo struct { func (x *ExportModelOperationMetadata_ExportModelOutputInfo) Reset() { *x = ExportModelOperationMetadata_ExportModelOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata_ExportModelOutputInfo) String() string { @@ -841,7 +815,7 @@ func (*ExportModelOperationMetadata_ExportModelOutputInfo) ProtoMessage() {} func (x *ExportModelOperationMetadata_ExportModelOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_operations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,164 +1060,6 @@ func file_google_cloud_automl_v1_operations_proto_init() { return } file_google_cloud_automl_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata_ExportDataOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOperationMetadata_BatchPredictOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_operations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata_ExportModelOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_operations_proto_msgTypes[0].OneofWrappers = []any{ (*OperationMetadata_DeleteDetails)(nil), (*OperationMetadata_DeployModelDetails)(nil), diff --git a/automl/apiv1/automlpb/prediction_service.pb.go b/automl/apiv1/automlpb/prediction_service.pb.go index 79ce99ae2947..3f88b59bd713 100755 --- a/automl/apiv1/automlpb/prediction_service.pb.go +++ b/automl/apiv1/automlpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/prediction_service.proto @@ -91,11 +91,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -106,7 +104,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -200,7 +196,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +344,9 @@ type BatchPredictRequest struct { func (x *BatchPredictRequest) Reset() { *x = BatchPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictRequest) String() string { @@ -363,7 +357,7 @@ func (*BatchPredictRequest) ProtoMessage() {} func (x *BatchPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +424,9 @@ type BatchPredictResult struct { func (x *BatchPredictResult) Reset() { *x = BatchPredictResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictResult) String() string { @@ -445,7 +437,7 @@ func (*BatchPredictResult) ProtoMessage() {} func (x *BatchPredictResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_prediction_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,56 +661,6 @@ func file_google_cloud_automl_v1_prediction_service_proto_init() { file_google_cloud_automl_v1_annotation_payload_proto_init() file_google_cloud_automl_v1_data_items_proto_init() file_google_cloud_automl_v1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_prediction_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_prediction_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/service.pb.go b/automl/apiv1/automlpb/service.pb.go index 3345f1226382..dbec8f3201ab 100755 --- a/automl/apiv1/automlpb/service.pb.go +++ b/automl/apiv1/automlpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/service.proto @@ -56,11 +56,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -71,7 +69,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -127,7 +123,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -192,7 +186,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +244,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -265,7 +257,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +300,9 @@ type UpdateDatasetRequest struct { func (x *UpdateDatasetRequest) Reset() { *x = UpdateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetRequest) String() string { @@ -323,7 +313,7 @@ func (*UpdateDatasetRequest) ProtoMessage() {} func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +354,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -379,7 +367,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +405,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -432,7 +418,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +461,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -490,7 +474,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +515,9 @@ type GetAnnotationSpecRequest struct { func (x *GetAnnotationSpecRequest) Reset() { *x = GetAnnotationSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationSpecRequest) String() string { @@ -546,7 +528,7 @@ func (*GetAnnotationSpecRequest) ProtoMessage() {} func (x *GetAnnotationSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +564,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -597,7 +577,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +618,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -653,7 +631,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +684,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -721,7 +697,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +755,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -794,7 +768,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +809,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -850,7 +822,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +858,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -901,7 +871,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +919,9 @@ type DeployModelRequest struct { func (x *DeployModelRequest) Reset() { *x = DeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelRequest) String() string { @@ -964,7 +932,7 @@ func (*DeployModelRequest) ProtoMessage() {} func (x *DeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1039,11 +1007,9 @@ type UndeployModelRequest struct { func (x *UndeployModelRequest) Reset() { *x = UndeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelRequest) String() string { @@ -1054,7 +1020,7 @@ func (*UndeployModelRequest) ProtoMessage() {} func (x *UndeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,11 +1058,9 @@ type ExportModelRequest struct { func (x *ExportModelRequest) Reset() { *x = ExportModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest) String() string { @@ -1107,7 +1071,7 @@ func (*ExportModelRequest) ProtoMessage() {} func (x *ExportModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1112,9 @@ type GetModelEvaluationRequest struct { func (x *GetModelEvaluationRequest) Reset() { *x = GetModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationRequest) String() string { @@ -1163,7 +1125,7 @@ func (*GetModelEvaluationRequest) ProtoMessage() {} func (x *GetModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,11 +1180,9 @@ type ListModelEvaluationsRequest struct { func (x *ListModelEvaluationsRequest) Reset() { *x = ListModelEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsRequest) String() string { @@ -1233,7 +1193,7 @@ func (*ListModelEvaluationsRequest) ProtoMessage() {} func (x *ListModelEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1292,11 +1252,9 @@ type ListModelEvaluationsResponse struct { func (x *ListModelEvaluationsResponse) Reset() { *x = ListModelEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsResponse) String() string { @@ -1307,7 +1265,7 @@ func (*ListModelEvaluationsResponse) ProtoMessage() {} func (x *ListModelEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,260 +1876,6 @@ func file_google_cloud_automl_v1_service_proto_init() { file_google_cloud_automl_v1_io_proto_init() file_google_cloud_automl_v1_model_proto_init() file_google_cloud_automl_v1_model_evaluation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_service_proto_msgTypes[15].OneofWrappers = []any{ (*DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata)(nil), (*DeployModelRequest_ImageClassificationModelDeploymentMetadata)(nil), diff --git a/automl/apiv1/automlpb/text.pb.go b/automl/apiv1/automlpb/text.pb.go index f8dbc7c5a5a9..d33588256779 100755 --- a/automl/apiv1/automlpb/text.pb.go +++ b/automl/apiv1/automlpb/text.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/text.proto @@ -47,11 +47,9 @@ type TextClassificationDatasetMetadata struct { func (x *TextClassificationDatasetMetadata) Reset() { *x = TextClassificationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationDatasetMetadata) String() string { @@ -62,7 +60,7 @@ func (*TextClassificationDatasetMetadata) ProtoMessage() {} func (x *TextClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96,11 +94,9 @@ type TextClassificationModelMetadata struct { func (x *TextClassificationModelMetadata) Reset() { *x = TextClassificationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationModelMetadata) String() string { @@ -111,7 +107,7 @@ func (*TextClassificationModelMetadata) ProtoMessage() {} func (x *TextClassificationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +138,9 @@ type TextExtractionDatasetMetadata struct { func (x *TextExtractionDatasetMetadata) Reset() { *x = TextExtractionDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionDatasetMetadata) String() string { @@ -157,7 +151,7 @@ func (*TextExtractionDatasetMetadata) ProtoMessage() {} func (x *TextExtractionDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +175,9 @@ type TextExtractionModelMetadata struct { func (x *TextExtractionModelMetadata) Reset() { *x = TextExtractionModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionModelMetadata) String() string { @@ -196,7 +188,7 @@ func (*TextExtractionModelMetadata) ProtoMessage() {} func (x *TextExtractionModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +220,9 @@ type TextSentimentDatasetMetadata struct { func (x *TextSentimentDatasetMetadata) Reset() { *x = TextSentimentDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentDatasetMetadata) String() string { @@ -243,7 +233,7 @@ func (*TextSentimentDatasetMetadata) ProtoMessage() {} func (x *TextSentimentDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -274,11 +264,9 @@ type TextSentimentModelMetadata struct { func (x *TextSentimentModelMetadata) Reset() { *x = TextSentimentModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentModelMetadata) String() string { @@ -289,7 +277,7 @@ func (*TextSentimentModelMetadata) ProtoMessage() {} func (x *TextSentimentModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,80 +380,6 @@ func file_google_cloud_automl_v1_text_proto_init() { return } file_google_cloud_automl_v1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_text_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/text_extraction.pb.go b/automl/apiv1/automlpb/text_extraction.pb.go index d0ec770c00e0..ff2892aca99a 100755 --- a/automl/apiv1/automlpb/text_extraction.pb.go +++ b/automl/apiv1/automlpb/text_extraction.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/text_extraction.proto @@ -55,11 +55,9 @@ type TextExtractionAnnotation struct { func (x *TextExtractionAnnotation) Reset() { *x = TextExtractionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionAnnotation) String() string { @@ -70,7 +68,7 @@ func (*TextExtractionAnnotation) ProtoMessage() {} func (x *TextExtractionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type TextExtractionEvaluationMetrics struct { func (x *TextExtractionEvaluationMetrics) Reset() { *x = TextExtractionEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionEvaluationMetrics) String() string { @@ -148,7 +144,7 @@ func (*TextExtractionEvaluationMetrics) ProtoMessage() {} func (x *TextExtractionEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type TextExtractionEvaluationMetrics_ConfidenceMetricsEntry struct { func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) Reset() { *x = TextExtractionEvaluationMetrics_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) String() string { @@ -212,7 +206,7 @@ func (*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_extraction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,44 +338,6 @@ func file_google_cloud_automl_v1_text_extraction_proto_init() { return } file_google_cloud_automl_v1_text_segment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_text_extraction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_extraction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_extraction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1_text_extraction_proto_msgTypes[0].OneofWrappers = []any{ (*TextExtractionAnnotation_TextSegment)(nil), } diff --git a/automl/apiv1/automlpb/text_segment.pb.go b/automl/apiv1/automlpb/text_segment.pb.go index c347360b9bbd..43d7796fb872 100755 --- a/automl/apiv1/automlpb/text_segment.pb.go +++ b/automl/apiv1/automlpb/text_segment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/text_segment.proto @@ -54,11 +54,9 @@ type TextSegment struct { func (x *TextSegment) Reset() { *x = TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_segment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_segment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSegment) String() string { @@ -69,7 +67,7 @@ func (*TextSegment) ProtoMessage() {} func (x *TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_segment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,20 +160,6 @@ func file_google_cloud_automl_v1_text_segment_proto_init() { if File_google_cloud_automl_v1_text_segment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_text_segment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/text_sentiment.pb.go b/automl/apiv1/automlpb/text_sentiment.pb.go index f4782d3b5a9f..287a3b6e2107 100755 --- a/automl/apiv1/automlpb/text_sentiment.pb.go +++ b/automl/apiv1/automlpb/text_sentiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/text_sentiment.proto @@ -60,11 +60,9 @@ type TextSentimentAnnotation struct { func (x *TextSentimentAnnotation) Reset() { *x = TextSentimentAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentAnnotation) String() string { @@ -75,7 +73,7 @@ func (*TextSentimentAnnotation) ProtoMessage() {} func (x *TextSentimentAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type TextSentimentEvaluationMetrics struct { func (x *TextSentimentEvaluationMetrics) Reset() { *x = TextSentimentEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentEvaluationMetrics) String() string { @@ -144,7 +140,7 @@ func (*TextSentimentEvaluationMetrics) ProtoMessage() {} func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,32 +297,6 @@ func file_google_cloud_automl_v1_text_sentiment_proto_init() { return } file_google_cloud_automl_v1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/automlpb/translation.pb.go b/automl/apiv1/automlpb/translation.pb.go index a957f5805b0c..8f88aaa4b839 100755 --- a/automl/apiv1/automlpb/translation.pb.go +++ b/automl/apiv1/automlpb/translation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1/translation.proto @@ -50,11 +50,9 @@ type TranslationDatasetMetadata struct { func (x *TranslationDatasetMetadata) Reset() { *x = TranslationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationDatasetMetadata) String() string { @@ -65,7 +63,7 @@ func (*TranslationDatasetMetadata) ProtoMessage() {} func (x *TranslationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type TranslationEvaluationMetrics struct { func (x *TranslationEvaluationMetrics) Reset() { *x = TranslationEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationEvaluationMetrics) String() string { @@ -123,7 +119,7 @@ func (*TranslationEvaluationMetrics) ProtoMessage() {} func (x *TranslationEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +169,9 @@ type TranslationModelMetadata struct { func (x *TranslationModelMetadata) Reset() { *x = TranslationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationModelMetadata) String() string { @@ -188,7 +182,7 @@ func (*TranslationModelMetadata) ProtoMessage() {} func (x *TranslationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +230,9 @@ type TranslationAnnotation struct { func (x *TranslationAnnotation) Reset() { *x = TranslationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationAnnotation) String() string { @@ -251,7 +243,7 @@ func (*TranslationAnnotation) ProtoMessage() {} func (x *TranslationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1_translation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,56 +358,6 @@ func file_google_cloud_automl_v1_translation_proto_init() { return } file_google_cloud_automl_v1_data_items_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1_translation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_translation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TranslationEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_translation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TranslationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1_translation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TranslationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1/helpers.go b/automl/apiv1/helpers.go index 2cccb97328e9..9cf9b51f6502 100755 --- a/automl/apiv1/helpers.go +++ b/automl/apiv1/helpers.go @@ -18,10 +18,20 @@ package automl import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "automl.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/automl/apiv1/prediction_client.go b/automl/apiv1/prediction_client.go index 898a8efe41ab..48651736afc7 100755 --- a/automl/apiv1/prediction_client.go +++ b/automl/apiv1/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -229,6 +228,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -258,6 +259,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: automlpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -320,6 +322,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -340,6 +344,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -402,7 +407,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *automlpb.Predic var resp *automlpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -420,7 +425,7 @@ func (c *predictionGRPCClient) BatchPredict(ctx context.Context, req *automlpb.B var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.BatchPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.BatchPredict, req, settings.GRPC, c.logger, "BatchPredict") return err }, opts...) if err != nil { @@ -505,17 +510,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *automlpb.Predic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -590,21 +585,10 @@ func (c *predictionRESTClient) BatchPredict(ctx context.Context, req *automlpb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchPredict") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/automl/apiv1beta1/auto_ml_client.go b/automl/apiv1beta1/auto_ml_client.go index 684e5da0d242..3da753b36dc7 100755 --- a/automl/apiv1beta1/auto_ml_client.go +++ b/automl/apiv1beta1/auto_ml_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -817,6 +816,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new auto ml client based on gRPC. @@ -856,6 +857,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: automlpb.NewAutoMlClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -918,6 +920,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new auto ml rest client. @@ -948,6 +952,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1010,7 +1015,7 @@ func (c *gRPCClient) CreateDataset(ctx context.Context, req *automlpb.CreateData var resp *automlpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -1028,7 +1033,7 @@ func (c *gRPCClient) GetDataset(ctx context.Context, req *automlpb.GetDatasetReq var resp *automlpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *gRPCClient) ListDatasets(ctx context.Context, req *automlpb.ListDataset } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -1092,7 +1097,7 @@ func (c *gRPCClient) UpdateDataset(ctx context.Context, req *automlpb.UpdateData var resp *automlpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDataset, req, settings.GRPC, c.logger, "UpdateDataset") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *gRPCClient) DeleteDataset(ctx context.Context, req *automlpb.DeleteData var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) if err != nil { @@ -1130,7 +1135,7 @@ func (c *gRPCClient) ImportData(ctx context.Context, req *automlpb.ImportDataReq var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -1150,7 +1155,7 @@ func (c *gRPCClient) ExportData(ctx context.Context, req *automlpb.ExportDataReq var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *gRPCClient) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnn var resp *automlpb.AnnotationSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnnotationSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnnotationSpec, req, settings.GRPC, c.logger, "GetAnnotationSpec") return err }, opts...) if err != nil { @@ -1188,7 +1193,7 @@ func (c *gRPCClient) GetTableSpec(ctx context.Context, req *automlpb.GetTableSpe var resp *automlpb.TableSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTableSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTableSpec, req, settings.GRPC, c.logger, "GetTableSpec") return err }, opts...) if err != nil { @@ -1217,7 +1222,7 @@ func (c *gRPCClient) ListTableSpecs(ctx context.Context, req *automlpb.ListTable } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTableSpecs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTableSpecs, req, settings.GRPC, c.logger, "ListTableSpecs") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) UpdateTableSpec(ctx context.Context, req *automlpb.UpdateTa var resp *automlpb.TableSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTableSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTableSpec, req, settings.GRPC, c.logger, "UpdateTableSpec") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *gRPCClient) GetColumnSpec(ctx context.Context, req *automlpb.GetColumnS var resp *automlpb.ColumnSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetColumnSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetColumnSpec, req, settings.GRPC, c.logger, "GetColumnSpec") return err }, opts...) if err != nil { @@ -1299,7 +1304,7 @@ func (c *gRPCClient) ListColumnSpecs(ctx context.Context, req *automlpb.ListColu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListColumnSpecs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListColumnSpecs, req, settings.GRPC, c.logger, "ListColumnSpecs") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *gRPCClient) UpdateColumnSpec(ctx context.Context, req *automlpb.UpdateC var resp *automlpb.ColumnSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateColumnSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateColumnSpec, req, settings.GRPC, c.logger, "UpdateColumnSpec") return err }, opts...) if err != nil { @@ -1352,7 +1357,7 @@ func (c *gRPCClient) CreateModel(ctx context.Context, req *automlpb.CreateModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *gRPCClient) GetModel(ctx context.Context, req *automlpb.GetModelRequest var resp *automlpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -1401,7 +1406,7 @@ func (c *gRPCClient) ListModels(ctx context.Context, req *automlpb.ListModelsReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -1436,7 +1441,7 @@ func (c *gRPCClient) DeleteModel(ctx context.Context, req *automlpb.DeleteModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) if err != nil { @@ -1456,7 +1461,7 @@ func (c *gRPCClient) DeployModel(ctx context.Context, req *automlpb.DeployModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeployModel, req, settings.GRPC, c.logger, "DeployModel") return err }, opts...) if err != nil { @@ -1476,7 +1481,7 @@ func (c *gRPCClient) UndeployModel(ctx context.Context, req *automlpb.UndeployMo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeployModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeployModel, req, settings.GRPC, c.logger, "UndeployModel") return err }, opts...) if err != nil { @@ -1496,7 +1501,7 @@ func (c *gRPCClient) ExportModel(ctx context.Context, req *automlpb.ExportModelR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportModel, req, settings.GRPC, c.logger, "ExportModel") return err }, opts...) if err != nil { @@ -1516,7 +1521,7 @@ func (c *gRPCClient) ExportEvaluatedExamples(ctx context.Context, req *automlpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportEvaluatedExamples(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportEvaluatedExamples, req, settings.GRPC, c.logger, "ExportEvaluatedExamples") return err }, opts...) if err != nil { @@ -1536,7 +1541,7 @@ func (c *gRPCClient) GetModelEvaluation(ctx context.Context, req *automlpb.GetMo var resp *automlpb.ModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetModelEvaluation, req, settings.GRPC, c.logger, "GetModelEvaluation") return err }, opts...) if err != nil { @@ -1565,7 +1570,7 @@ func (c *gRPCClient) ListModelEvaluations(ctx context.Context, req *automlpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListModelEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListModelEvaluations, req, settings.GRPC, c.logger, "ListModelEvaluations") return err }, opts...) if err != nil { @@ -1631,17 +1636,7 @@ func (c *restClient) CreateDataset(ctx context.Context, req *automlpb.CreateData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataset") if err != nil { return err } @@ -1691,17 +1686,7 @@ func (c *restClient) GetDataset(ctx context.Context, req *automlpb.GetDatasetReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataset") if err != nil { return err } @@ -1766,21 +1751,10 @@ func (c *restClient) ListDatasets(ctx context.Context, req *automlpb.ListDataset } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1857,17 +1831,7 @@ func (c *restClient) UpdateDataset(ctx context.Context, req *automlpb.UpdateData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataset") if err != nil { return err } @@ -1920,21 +1884,10 @@ func (c *restClient) DeleteDataset(ctx context.Context, req *automlpb.DeleteData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1999,21 +1952,10 @@ func (c *restClient) ImportData(ctx context.Context, req *automlpb.ImportDataReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2071,21 +2013,10 @@ func (c *restClient) ExportData(ctx context.Context, req *automlpb.ExportDataReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2136,17 +2067,7 @@ func (c *restClient) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotationSpec") if err != nil { return err } @@ -2203,17 +2124,7 @@ func (c *restClient) GetTableSpec(ctx context.Context, req *automlpb.GetTableSpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTableSpec") if err != nil { return err } @@ -2285,21 +2196,10 @@ func (c *restClient) ListTableSpecs(ctx context.Context, req *automlpb.ListTable } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTableSpecs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2376,17 +2276,7 @@ func (c *restClient) UpdateTableSpec(ctx context.Context, req *automlpb.UpdateTa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTableSpec") if err != nil { return err } @@ -2443,17 +2333,7 @@ func (c *restClient) GetColumnSpec(ctx context.Context, req *automlpb.GetColumnS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetColumnSpec") if err != nil { return err } @@ -2525,21 +2405,10 @@ func (c *restClient) ListColumnSpecs(ctx context.Context, req *automlpb.ListColu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListColumnSpecs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2616,17 +2485,7 @@ func (c *restClient) UpdateColumnSpec(ctx context.Context, req *automlpb.UpdateC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateColumnSpec") if err != nil { return err } @@ -2686,21 +2545,10 @@ func (c *restClient) CreateModel(ctx context.Context, req *automlpb.CreateModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2751,17 +2599,7 @@ func (c *restClient) GetModel(ctx context.Context, req *automlpb.GetModelRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -2826,21 +2664,10 @@ func (c *restClient) ListModels(ctx context.Context, req *automlpb.ListModelsReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2906,21 +2733,10 @@ func (c *restClient) DeleteModel(ctx context.Context, req *automlpb.DeleteModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2987,21 +2803,10 @@ func (c *restClient) DeployModel(ctx context.Context, req *automlpb.DeployModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3063,21 +2868,10 @@ func (c *restClient) UndeployModel(ctx context.Context, req *automlpb.UndeployMo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3140,21 +2934,10 @@ func (c *restClient) ExportModel(ctx context.Context, req *automlpb.ExportModelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3223,21 +3006,10 @@ func (c *restClient) ExportEvaluatedExamples(ctx context.Context, req *automlpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportEvaluatedExamples") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3288,17 +3060,7 @@ func (c *restClient) GetModelEvaluation(ctx context.Context, req *automlpb.GetMo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModelEvaluation") if err != nil { return err } @@ -3363,21 +3125,10 @@ func (c *restClient) ListModelEvaluations(ctx context.Context, req *automlpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModelEvaluations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/automl/apiv1beta1/auto_ml_client_example_go123_test.go b/automl/apiv1beta1/auto_ml_client_example_go123_test.go index cfe7e7383b70..c3b595f4e94c 100644 --- a/automl/apiv1beta1/auto_ml_client_example_go123_test.go +++ b/automl/apiv1beta1/auto_ml_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListColumnSpecs_all() { } for resp, err := range c.ListColumnSpecs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListModelEvaluations_all() { } for resp, err := range c.ListModelEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListTableSpecs_all() { } for resp, err := range c.ListTableSpecs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/automl/apiv1beta1/automlpb/annotation_payload.pb.go b/automl/apiv1beta1/automlpb/annotation_payload.pb.go index 70dc26456e17..84c48a2f3ada 100755 --- a/automl/apiv1beta1/automlpb/annotation_payload.pb.go +++ b/automl/apiv1beta1/automlpb/annotation_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/annotation_payload.proto @@ -70,11 +70,9 @@ type AnnotationPayload struct { func (x *AnnotationPayload) Reset() { *x = AnnotationPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationPayload) String() string { @@ -85,7 +83,7 @@ func (*AnnotationPayload) ProtoMessage() {} func (x *AnnotationPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,20 +383,6 @@ func file_google_cloud_automl_v1beta1_annotation_payload_proto_init() { file_google_cloud_automl_v1beta1_text_extraction_proto_init() file_google_cloud_automl_v1beta1_text_sentiment_proto_init() file_google_cloud_automl_v1beta1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0].OneofWrappers = []any{ (*AnnotationPayload_Translation)(nil), (*AnnotationPayload_Classification)(nil), diff --git a/automl/apiv1beta1/automlpb/annotation_spec.pb.go b/automl/apiv1beta1/automlpb/annotation_spec.pb.go index 4dc01f2edae6..502cbbbf8230 100755 --- a/automl/apiv1beta1/automlpb/annotation_spec.pb.go +++ b/automl/apiv1beta1/automlpb/annotation_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/annotation_spec.proto @@ -57,11 +57,9 @@ type AnnotationSpec struct { func (x *AnnotationSpec) Reset() { *x = AnnotationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpec) String() string { @@ -72,7 +70,7 @@ func (*AnnotationSpec) ProtoMessage() {} func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_google_cloud_automl_v1beta1_annotation_spec_proto_init() { if File_google_cloud_automl_v1beta1_annotation_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/classification.pb.go b/automl/apiv1beta1/automlpb/classification.pb.go index 726def816dfe..ae505073f9e3 100755 --- a/automl/apiv1beta1/automlpb/classification.pb.go +++ b/automl/apiv1beta1/automlpb/classification.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/classification.proto @@ -104,11 +104,9 @@ type ClassificationAnnotation struct { func (x *ClassificationAnnotation) Reset() { *x = ClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationAnnotation) String() string { @@ -119,7 +117,7 @@ func (*ClassificationAnnotation) ProtoMessage() {} func (x *ClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type VideoClassificationAnnotation struct { func (x *VideoClassificationAnnotation) Reset() { *x = VideoClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationAnnotation) String() string { @@ -195,7 +191,7 @@ func (*VideoClassificationAnnotation) ProtoMessage() {} func (x *VideoClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +268,9 @@ type ClassificationEvaluationMetrics struct { func (x *ClassificationEvaluationMetrics) Reset() { *x = ClassificationEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics) String() string { @@ -287,7 +281,7 @@ func (*ClassificationEvaluationMetrics) ProtoMessage() {} func (x *ClassificationEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +398,9 @@ type ClassificationEvaluationMetrics_ConfidenceMetricsEntry struct { func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Reset() { *x = ClassificationEvaluationMetrics_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) String() string { @@ -419,7 +411,7 @@ func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,11 +554,9 @@ type ClassificationEvaluationMetrics_ConfusionMatrix struct { func (x *ClassificationEvaluationMetrics_ConfusionMatrix) Reset() { *x = ClassificationEvaluationMetrics_ConfusionMatrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfusionMatrix) String() string { @@ -577,7 +567,7 @@ func (*ClassificationEvaluationMetrics_ConfusionMatrix) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfusionMatrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +618,9 @@ type ClassificationEvaluationMetrics_ConfusionMatrix_Row struct { func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) Reset() { *x = ClassificationEvaluationMetrics_ConfusionMatrix_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) String() string { @@ -643,7 +631,7 @@ func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoMessage() {} func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,80 +827,6 @@ func file_google_cloud_automl_v1beta1_classification_proto_init() { return } file_google_cloud_automl_v1beta1_temporal_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/column_spec.pb.go b/automl/apiv1beta1/automlpb/column_spec.pb.go index ed75c165468b..52a31d935069 100755 --- a/automl/apiv1beta1/automlpb/column_spec.pb.go +++ b/automl/apiv1beta1/automlpb/column_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/column_spec.proto @@ -71,11 +71,9 @@ type ColumnSpec struct { func (x *ColumnSpec) Reset() { *x = ColumnSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSpec) String() string { @@ -86,7 +84,7 @@ func (*ColumnSpec) ProtoMessage() {} func (x *ColumnSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type ColumnSpec_CorrelatedColumn struct { func (x *ColumnSpec_CorrelatedColumn) Reset() { *x = ColumnSpec_CorrelatedColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSpec_CorrelatedColumn) String() string { @@ -174,7 +170,7 @@ func (*ColumnSpec_CorrelatedColumn) ProtoMessage() {} func (x *ColumnSpec_CorrelatedColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,32 +306,6 @@ func file_google_cloud_automl_v1beta1_column_spec_proto_init() { } file_google_cloud_automl_v1beta1_data_stats_proto_init() file_google_cloud_automl_v1beta1_data_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSpec_CorrelatedColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/data_items.pb.go b/automl/apiv1beta1/automlpb/data_items.pb.go index e45f6a566f63..7cb9b06dd5da 100755 --- a/automl/apiv1beta1/automlpb/data_items.pb.go +++ b/automl/apiv1beta1/automlpb/data_items.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/data_items.proto @@ -207,11 +207,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -222,7 +220,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +302,9 @@ type TextSnippet struct { func (x *TextSnippet) Reset() { *x = TextSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSnippet) String() string { @@ -319,7 +315,7 @@ func (*TextSnippet) ProtoMessage() {} func (x *TextSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +367,9 @@ type DocumentDimensions struct { func (x *DocumentDimensions) Reset() { *x = DocumentDimensions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentDimensions) String() string { @@ -386,7 +380,7 @@ func (*DocumentDimensions) ProtoMessage() {} func (x *DocumentDimensions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +437,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -458,7 +450,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +526,9 @@ type Row struct { func (x *Row) Reset() { *x = Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Row) String() string { @@ -549,7 +539,7 @@ func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +587,9 @@ type ExamplePayload struct { func (x *ExamplePayload) Reset() { *x = ExamplePayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExamplePayload) String() string { @@ -612,7 +600,7 @@ func (*ExamplePayload) ProtoMessage() {} func (x *ExamplePayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +710,9 @@ type Document_Layout struct { func (x *Document_Layout) Reset() { *x = Document_Layout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Layout) String() string { @@ -737,7 +723,7 @@ func (*Document_Layout) ProtoMessage() {} func (x *Document_Layout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,92 +973,6 @@ func file_google_cloud_automl_v1beta1_data_items_proto_init() { file_google_cloud_automl_v1beta1_io_proto_init() file_google_cloud_automl_v1beta1_temporal_proto_init() file_google_cloud_automl_v1beta1_text_segment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentDimensions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExamplePayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Document_Layout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0].OneofWrappers = []any{ (*Image_ImageBytes)(nil), (*Image_InputConfig)(nil), diff --git a/automl/apiv1beta1/automlpb/data_stats.pb.go b/automl/apiv1beta1/automlpb/data_stats.pb.go index ce54cdcad064..b52b5fde96c8 100755 --- a/automl/apiv1beta1/automlpb/data_stats.pb.go +++ b/automl/apiv1beta1/automlpb/data_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/data_stats.proto @@ -62,11 +62,9 @@ type DataStats struct { func (x *DataStats) Reset() { *x = DataStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStats) String() string { @@ -77,7 +75,7 @@ func (*DataStats) ProtoMessage() {} func (x *DataStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +231,9 @@ type Float64Stats struct { func (x *Float64Stats) Reset() { *x = Float64Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Float64Stats) String() string { @@ -248,7 +244,7 @@ func (*Float64Stats) ProtoMessage() {} func (x *Float64Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +300,9 @@ type StringStats struct { func (x *StringStats) Reset() { *x = StringStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringStats) String() string { @@ -319,7 +313,7 @@ func (*StringStats) ProtoMessage() {} func (x *StringStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +351,9 @@ type TimestampStats struct { func (x *TimestampStats) Reset() { *x = TimestampStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampStats) String() string { @@ -372,7 +364,7 @@ func (*TimestampStats) ProtoMessage() {} func (x *TimestampStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +399,9 @@ type ArrayStats struct { func (x *ArrayStats) Reset() { *x = ArrayStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrayStats) String() string { @@ -422,7 +412,7 @@ func (*ArrayStats) ProtoMessage() {} func (x *ArrayStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +447,9 @@ type StructStats struct { func (x *StructStats) Reset() { *x = StructStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructStats) String() string { @@ -472,7 +460,7 @@ func (*StructStats) ProtoMessage() {} func (x *StructStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +496,9 @@ type CategoryStats struct { func (x *CategoryStats) Reset() { *x = CategoryStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CategoryStats) String() string { @@ -523,7 +509,7 @@ func (*CategoryStats) ProtoMessage() {} func (x *CategoryStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type CorrelationStats struct { func (x *CorrelationStats) Reset() { *x = CorrelationStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorrelationStats) String() string { @@ -574,7 +558,7 @@ func (*CorrelationStats) ProtoMessage() {} func (x *CorrelationStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +598,9 @@ type Float64Stats_HistogramBucket struct { func (x *Float64Stats_HistogramBucket) Reset() { *x = Float64Stats_HistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Float64Stats_HistogramBucket) String() string { @@ -629,7 +611,7 @@ func (*Float64Stats_HistogramBucket) ProtoMessage() {} func (x *Float64Stats_HistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +661,9 @@ type StringStats_UnigramStats struct { func (x *StringStats_UnigramStats) Reset() { *x = StringStats_UnigramStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringStats_UnigramStats) String() string { @@ -694,7 +674,7 @@ func (*StringStats_UnigramStats) ProtoMessage() {} func (x *StringStats_UnigramStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +716,9 @@ type TimestampStats_GranularStats struct { func (x *TimestampStats_GranularStats) Reset() { *x = TimestampStats_GranularStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampStats_GranularStats) String() string { @@ -751,7 +729,7 @@ func (*TimestampStats_GranularStats) ProtoMessage() {} func (x *TimestampStats_GranularStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +765,9 @@ type CategoryStats_SingleCategoryStats struct { func (x *CategoryStats_SingleCategoryStats) Reset() { *x = CategoryStats_SingleCategoryStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CategoryStats_SingleCategoryStats) String() string { @@ -802,7 +778,7 @@ func (*CategoryStats_SingleCategoryStats) ProtoMessage() {} func (x *CategoryStats_SingleCategoryStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,152 +1016,6 @@ func file_google_cloud_automl_v1beta1_data_stats_proto_init() { if File_google_cloud_automl_v1beta1_data_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Float64Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StringStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TimestampStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ArrayStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StructStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CategoryStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CorrelationStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Float64Stats_HistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StringStats_UnigramStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TimestampStats_GranularStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CategoryStats_SingleCategoryStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0].OneofWrappers = []any{ (*DataStats_Float64Stats)(nil), (*DataStats_StringStats)(nil), diff --git a/automl/apiv1beta1/automlpb/data_types.pb.go b/automl/apiv1beta1/automlpb/data_types.pb.go index d54d7a97e3a6..f8a33e835aff 100755 --- a/automl/apiv1beta1/automlpb/data_types.pb.go +++ b/automl/apiv1beta1/automlpb/data_types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/data_types.proto @@ -141,11 +141,9 @@ type DataType struct { func (x *DataType) Reset() { *x = DataType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataType) String() string { @@ -156,7 +154,7 @@ func (*DataType) ProtoMessage() {} func (x *DataType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type StructType struct { func (x *StructType) Reset() { *x = StructType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructType) String() string { @@ -279,7 +275,7 @@ func (*StructType) ProtoMessage() {} func (x *StructType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,32 +394,6 @@ func file_google_cloud_automl_v1beta1_data_types_proto_init() { if File_google_cloud_automl_v1beta1_data_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StructType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0].OneofWrappers = []any{ (*DataType_ListElementType)(nil), (*DataType_StructType)(nil), diff --git a/automl/apiv1beta1/automlpb/dataset.pb.go b/automl/apiv1beta1/automlpb/dataset.pb.go index bcd222b56f7f..a654d4d510df 100755 --- a/automl/apiv1beta1/automlpb/dataset.pb.go +++ b/automl/apiv1beta1/automlpb/dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/dataset.proto @@ -81,11 +81,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -96,7 +94,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,20 +479,6 @@ func file_google_cloud_automl_v1beta1_dataset_proto_init() { file_google_cloud_automl_v1beta1_text_proto_init() file_google_cloud_automl_v1beta1_translation_proto_init() file_google_cloud_automl_v1beta1_video_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0].OneofWrappers = []any{ (*Dataset_TranslationDatasetMetadata)(nil), (*Dataset_ImageClassificationDatasetMetadata)(nil), diff --git a/automl/apiv1beta1/automlpb/detection.pb.go b/automl/apiv1beta1/automlpb/detection.pb.go index 1f084d76de8e..cc43444c88ed 100755 --- a/automl/apiv1beta1/automlpb/detection.pb.go +++ b/automl/apiv1beta1/automlpb/detection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/detection.proto @@ -51,11 +51,9 @@ type ImageObjectDetectionAnnotation struct { func (x *ImageObjectDetectionAnnotation) Reset() { *x = ImageObjectDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionAnnotation) String() string { @@ -66,7 +64,7 @@ func (*ImageObjectDetectionAnnotation) ProtoMessage() {} func (x *ImageObjectDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +123,9 @@ type VideoObjectTrackingAnnotation struct { func (x *VideoObjectTrackingAnnotation) Reset() { *x = VideoObjectTrackingAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingAnnotation) String() string { @@ -140,7 +136,7 @@ func (*VideoObjectTrackingAnnotation) ProtoMessage() {} func (x *VideoObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type BoundingBoxMetricsEntry struct { func (x *BoundingBoxMetricsEntry) Reset() { *x = BoundingBoxMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBoxMetricsEntry) String() string { @@ -218,7 +212,7 @@ func (*BoundingBoxMetricsEntry) ProtoMessage() {} func (x *BoundingBoxMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +270,9 @@ type ImageObjectDetectionEvaluationMetrics struct { func (x *ImageObjectDetectionEvaluationMetrics) Reset() { *x = ImageObjectDetectionEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionEvaluationMetrics) String() string { @@ -291,7 +283,7 @@ func (*ImageObjectDetectionEvaluationMetrics) ProtoMessage() {} func (x *ImageObjectDetectionEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +344,9 @@ type VideoObjectTrackingEvaluationMetrics struct { func (x *VideoObjectTrackingEvaluationMetrics) Reset() { *x = VideoObjectTrackingEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingEvaluationMetrics) String() string { @@ -367,7 +357,7 @@ func (*VideoObjectTrackingEvaluationMetrics) ProtoMessage() {} func (x *VideoObjectTrackingEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +418,9 @@ type BoundingBoxMetricsEntry_ConfidenceMetricsEntry struct { func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) Reset() { *x = BoundingBoxMetricsEntry_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) String() string { @@ -443,7 +431,7 @@ func (*BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoMessage() {} func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,80 +632,6 @@ func file_google_cloud_automl_v1beta1_detection_proto_init() { return } file_google_cloud_automl_v1beta1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBoxMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBoxMetricsEntry_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/geometry.pb.go b/automl/apiv1beta1/automlpb/geometry.pb.go index f13968c1499e..a4126788025f 100755 --- a/automl/apiv1beta1/automlpb/geometry.pb.go +++ b/automl/apiv1beta1/automlpb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/geometry.proto @@ -53,11 +53,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -68,7 +66,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -126,7 +122,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,32 +205,6 @@ func file_google_cloud_automl_v1beta1_geometry_proto_init() { if File_google_cloud_automl_v1beta1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/image.pb.go b/automl/apiv1beta1/automlpb/image.pb.go index ed9f86fce3ba..e1af81a34301 100755 --- a/automl/apiv1beta1/automlpb/image.pb.go +++ b/automl/apiv1beta1/automlpb/image.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/image.proto @@ -47,11 +47,9 @@ type ImageClassificationDatasetMetadata struct { func (x *ImageClassificationDatasetMetadata) Reset() { *x = ImageClassificationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationDatasetMetadata) String() string { @@ -62,7 +60,7 @@ func (*ImageClassificationDatasetMetadata) ProtoMessage() {} func (x *ImageClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93,11 +91,9 @@ type ImageObjectDetectionDatasetMetadata struct { func (x *ImageObjectDetectionDatasetMetadata) Reset() { *x = ImageObjectDetectionDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionDatasetMetadata) String() string { @@ -108,7 +104,7 @@ func (*ImageObjectDetectionDatasetMetadata) ProtoMessage() {} func (x *ImageObjectDetectionDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type ImageClassificationModelMetadata struct { func (x *ImageClassificationModelMetadata) Reset() { *x = ImageClassificationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationModelMetadata) String() string { @@ -205,7 +199,7 @@ func (*ImageClassificationModelMetadata) ProtoMessage() {} func (x *ImageClassificationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type ImageObjectDetectionModelMetadata struct { func (x *ImageObjectDetectionModelMetadata) Reset() { *x = ImageObjectDetectionModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionModelMetadata) String() string { @@ -348,7 +340,7 @@ func (*ImageObjectDetectionModelMetadata) ProtoMessage() {} func (x *ImageObjectDetectionModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +414,9 @@ type ImageClassificationModelDeploymentMetadata struct { func (x *ImageClassificationModelDeploymentMetadata) Reset() { *x = ImageClassificationModelDeploymentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationModelDeploymentMetadata) String() string { @@ -437,7 +427,7 @@ func (*ImageClassificationModelDeploymentMetadata) ProtoMessage() {} func (x *ImageClassificationModelDeploymentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +466,9 @@ type ImageObjectDetectionModelDeploymentMetadata struct { func (x *ImageObjectDetectionModelDeploymentMetadata) Reset() { *x = ImageObjectDetectionModelDeploymentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionModelDeploymentMetadata) String() string { @@ -491,7 +479,7 @@ func (*ImageObjectDetectionModelDeploymentMetadata) ProtoMessage() {} func (x *ImageObjectDetectionModelDeploymentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,80 +621,6 @@ func file_google_cloud_automl_v1beta1_image_proto_init() { } file_google_cloud_automl_v1beta1_annotation_spec_proto_init() file_google_cloud_automl_v1beta1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_image_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_image_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_image_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_image_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_image_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationModelDeploymentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_image_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionModelDeploymentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/io.pb.go b/automl/apiv1beta1/automlpb/io.pb.go index b37d24e3dde9..f4e526c6d7c9 100755 --- a/automl/apiv1beta1/automlpb/io.pb.go +++ b/automl/apiv1beta1/automlpb/io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/io.proto @@ -422,11 +422,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -437,7 +435,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +736,9 @@ type BatchPredictInputConfig struct { func (x *BatchPredictInputConfig) Reset() { *x = BatchPredictInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictInputConfig) String() string { @@ -753,7 +749,7 @@ func (*BatchPredictInputConfig) ProtoMessage() {} func (x *BatchPredictInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +818,9 @@ type DocumentInputConfig struct { func (x *DocumentInputConfig) Reset() { *x = DocumentInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInputConfig) String() string { @@ -837,7 +831,7 @@ func (*DocumentInputConfig) ProtoMessage() {} func (x *DocumentInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +903,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -924,7 +916,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1302,11 +1294,9 @@ type BatchPredictOutputConfig struct { func (x *BatchPredictOutputConfig) Reset() { *x = BatchPredictOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOutputConfig) String() string { @@ -1317,7 +1307,7 @@ func (*BatchPredictOutputConfig) ProtoMessage() {} func (x *BatchPredictOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1453,11 +1443,9 @@ type ModelExportOutputConfig struct { func (x *ModelExportOutputConfig) Reset() { *x = ModelExportOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelExportOutputConfig) String() string { @@ -1468,7 +1456,7 @@ func (*ModelExportOutputConfig) ProtoMessage() {} func (x *ModelExportOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1597,11 +1585,9 @@ type ExportEvaluatedExamplesOutputConfig struct { func (x *ExportEvaluatedExamplesOutputConfig) Reset() { *x = ExportEvaluatedExamplesOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEvaluatedExamplesOutputConfig) String() string { @@ -1612,7 +1598,7 @@ func (*ExportEvaluatedExamplesOutputConfig) ProtoMessage() {} func (x *ExportEvaluatedExamplesOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1667,11 +1653,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -1682,7 +1666,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1718,11 +1702,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -1733,7 +1715,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1754,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -1787,7 +1767,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1823,11 +1803,9 @@ type BigQueryDestination struct { func (x *BigQueryDestination) Reset() { *x = BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestination) String() string { @@ -1838,7 +1816,7 @@ func (*BigQueryDestination) ProtoMessage() {} func (x *BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1860,9 @@ type GcrDestination struct { func (x *GcrDestination) Reset() { *x = GcrDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcrDestination) String() string { @@ -1897,7 +1873,7 @@ func (*GcrDestination) ProtoMessage() {} func (x *GcrDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2113,152 +2089,6 @@ func file_google_cloud_automl_v1beta1_io_proto_init() { if File_google_cloud_automl_v1beta1_io_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModelExportOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportEvaluatedExamplesOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_io_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GcrDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_io_proto_msgTypes[0].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), (*InputConfig_BigquerySource)(nil), diff --git a/automl/apiv1beta1/automlpb/model.pb.go b/automl/apiv1beta1/automlpb/model.pb.go index 7bb9bccd082d..12492b24172c 100755 --- a/automl/apiv1beta1/automlpb/model.pb.go +++ b/automl/apiv1beta1/automlpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/model.proto @@ -134,11 +134,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -149,7 +147,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,20 +543,6 @@ func file_google_cloud_automl_v1beta1_model_proto_init() { file_google_cloud_automl_v1beta1_text_proto_init() file_google_cloud_automl_v1beta1_translation_proto_init() file_google_cloud_automl_v1beta1_video_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_model_proto_msgTypes[0].OneofWrappers = []any{ (*Model_TranslationModelMetadata)(nil), (*Model_ImageClassificationModelMetadata)(nil), diff --git a/automl/apiv1beta1/automlpb/model_evaluation.pb.go b/automl/apiv1beta1/automlpb/model_evaluation.pb.go index 071e6ea9737d..8e4882c14651 100755 --- a/automl/apiv1beta1/automlpb/model_evaluation.pb.go +++ b/automl/apiv1beta1/automlpb/model_evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/model_evaluation.proto @@ -99,11 +99,9 @@ type ModelEvaluation struct { func (x *ModelEvaluation) Reset() { *x = ModelEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelEvaluation) String() string { @@ -114,7 +112,7 @@ func (*ModelEvaluation) ProtoMessage() {} func (x *ModelEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,20 +460,6 @@ func file_google_cloud_automl_v1beta1_model_evaluation_proto_init() { file_google_cloud_automl_v1beta1_text_extraction_proto_init() file_google_cloud_automl_v1beta1_text_sentiment_proto_init() file_google_cloud_automl_v1beta1_translation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0].OneofWrappers = []any{ (*ModelEvaluation_ClassificationEvaluationMetrics)(nil), (*ModelEvaluation_RegressionEvaluationMetrics)(nil), diff --git a/automl/apiv1beta1/automlpb/operations.pb.go b/automl/apiv1beta1/automlpb/operations.pb.go index fcd02630156d..f46e730562f7 100755 --- a/automl/apiv1beta1/automlpb/operations.pb.go +++ b/automl/apiv1beta1/automlpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/operations.proto @@ -74,11 +74,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -89,7 +87,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +276,9 @@ type DeleteOperationMetadata struct { func (x *DeleteOperationMetadata) Reset() { *x = DeleteOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationMetadata) String() string { @@ -293,7 +289,7 @@ func (*DeleteOperationMetadata) ProtoMessage() {} func (x *DeleteOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type DeployModelOperationMetadata struct { func (x *DeployModelOperationMetadata) Reset() { *x = DeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelOperationMetadata) String() string { @@ -332,7 +326,7 @@ func (*DeployModelOperationMetadata) ProtoMessage() {} func (x *DeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +350,9 @@ type UndeployModelOperationMetadata struct { func (x *UndeployModelOperationMetadata) Reset() { *x = UndeployModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelOperationMetadata) String() string { @@ -371,7 +363,7 @@ func (*UndeployModelOperationMetadata) ProtoMessage() {} func (x *UndeployModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +387,9 @@ type CreateModelOperationMetadata struct { func (x *CreateModelOperationMetadata) Reset() { *x = CreateModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelOperationMetadata) String() string { @@ -410,7 +400,7 @@ func (*CreateModelOperationMetadata) ProtoMessage() {} func (x *CreateModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type ImportDataOperationMetadata struct { func (x *ImportDataOperationMetadata) Reset() { *x = ImportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationMetadata) String() string { @@ -449,7 +437,7 @@ func (*ImportDataOperationMetadata) ProtoMessage() {} func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +464,9 @@ type ExportDataOperationMetadata struct { func (x *ExportDataOperationMetadata) Reset() { *x = ExportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata) String() string { @@ -491,7 +477,7 @@ func (*ExportDataOperationMetadata) ProtoMessage() {} func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +514,9 @@ type BatchPredictOperationMetadata struct { func (x *BatchPredictOperationMetadata) Reset() { *x = BatchPredictOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOperationMetadata) String() string { @@ -543,7 +527,7 @@ func (*BatchPredictOperationMetadata) ProtoMessage() {} func (x *BatchPredictOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +569,9 @@ type ExportModelOperationMetadata struct { func (x *ExportModelOperationMetadata) Reset() { *x = ExportModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata) String() string { @@ -600,7 +582,7 @@ func (*ExportModelOperationMetadata) ProtoMessage() {} func (x *ExportModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +617,9 @@ type ExportEvaluatedExamplesOperationMetadata struct { func (x *ExportEvaluatedExamplesOperationMetadata) Reset() { *x = ExportEvaluatedExamplesOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEvaluatedExamplesOperationMetadata) String() string { @@ -650,7 +630,7 @@ func (*ExportEvaluatedExamplesOperationMetadata) ProtoMessage() {} func (x *ExportEvaluatedExamplesOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +671,9 @@ type ExportDataOperationMetadata_ExportDataOutputInfo struct { func (x *ExportDataOperationMetadata_ExportDataOutputInfo) Reset() { *x = ExportDataOperationMetadata_ExportDataOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata_ExportDataOutputInfo) String() string { @@ -706,7 +684,7 @@ func (*ExportDataOperationMetadata_ExportDataOutputInfo) ProtoMessage() {} func (x *ExportDataOperationMetadata_ExportDataOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +762,9 @@ type BatchPredictOperationMetadata_BatchPredictOutputInfo struct { func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) Reset() { *x = BatchPredictOperationMetadata_BatchPredictOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) String() string { @@ -799,7 +775,7 @@ func (*BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoMessage() {} func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +849,9 @@ type ExportModelOperationMetadata_ExportModelOutputInfo struct { func (x *ExportModelOperationMetadata_ExportModelOutputInfo) Reset() { *x = ExportModelOperationMetadata_ExportModelOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelOperationMetadata_ExportModelOutputInfo) String() string { @@ -888,7 +862,7 @@ func (*ExportModelOperationMetadata_ExportModelOutputInfo) ProtoMessage() {} func (x *ExportModelOperationMetadata_ExportModelOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -926,11 +900,9 @@ type ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) Reset() { *x = ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) String() string { @@ -941,7 +913,7 @@ func (*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInf func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,176 +1197,6 @@ func file_google_cloud_automl_v1beta1_operations_proto_init() { file_google_cloud_automl_v1beta1_io_proto_init() file_google_cloud_automl_v1beta1_model_proto_init() file_google_cloud_automl_v1beta1_model_evaluation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportEvaluatedExamplesOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata_ExportDataOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictOperationMetadata_BatchPredictOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelOperationMetadata_ExportModelOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0].OneofWrappers = []any{ (*OperationMetadata_DeleteDetails)(nil), (*OperationMetadata_DeployModelDetails)(nil), diff --git a/automl/apiv1beta1/automlpb/prediction_service.pb.go b/automl/apiv1beta1/automlpb/prediction_service.pb.go index c059eeb8acc3..1271853af177 100755 --- a/automl/apiv1beta1/automlpb/prediction_service.pb.go +++ b/automl/apiv1beta1/automlpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/prediction_service.proto @@ -77,11 +77,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -92,7 +90,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,11 +161,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -178,7 +174,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +298,9 @@ type BatchPredictRequest struct { func (x *BatchPredictRequest) Reset() { *x = BatchPredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictRequest) String() string { @@ -317,7 +311,7 @@ func (*BatchPredictRequest) ProtoMessage() {} func (x *BatchPredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +376,9 @@ type BatchPredictResult struct { func (x *BatchPredictResult) Reset() { *x = BatchPredictResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPredictResult) String() string { @@ -397,7 +389,7 @@ func (*BatchPredictResult) ProtoMessage() {} func (x *BatchPredictResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,56 +623,6 @@ func file_google_cloud_automl_v1beta1_prediction_service_proto_init() { file_google_cloud_automl_v1beta1_data_items_proto_init() file_google_cloud_automl_v1beta1_io_proto_init() file_google_cloud_automl_v1beta1_operations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchPredictResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/ranges.pb.go b/automl/apiv1beta1/automlpb/ranges.pb.go index 3d20fafe7de4..b4108e12b9af 100755 --- a/automl/apiv1beta1/automlpb/ranges.pb.go +++ b/automl/apiv1beta1/automlpb/ranges.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/ranges.proto @@ -49,11 +49,9 @@ type DoubleRange struct { func (x *DoubleRange) Reset() { *x = DoubleRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleRange) String() string { @@ -64,7 +62,7 @@ func (*DoubleRange) ProtoMessage() {} func (x *DoubleRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,20 +145,6 @@ func file_google_cloud_automl_v1beta1_ranges_proto_init() { if File_google_cloud_automl_v1beta1_ranges_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DoubleRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/regression.pb.go b/automl/apiv1beta1/automlpb/regression.pb.go index 62e353f14599..7895ff194c5d 100755 --- a/automl/apiv1beta1/automlpb/regression.pb.go +++ b/automl/apiv1beta1/automlpb/regression.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/regression.proto @@ -56,11 +56,9 @@ type RegressionEvaluationMetrics struct { func (x *RegressionEvaluationMetrics) Reset() { *x = RegressionEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegressionEvaluationMetrics) String() string { @@ -71,7 +69,7 @@ func (*RegressionEvaluationMetrics) ProtoMessage() {} func (x *RegressionEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,20 +188,6 @@ func file_google_cloud_automl_v1beta1_regression_proto_init() { if File_google_cloud_automl_v1beta1_regression_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RegressionEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/service.pb.go b/automl/apiv1beta1/automlpb/service.pb.go index 9f31be5ab853..fc43888f71d2 100755 --- a/automl/apiv1beta1/automlpb/service.pb.go +++ b/automl/apiv1beta1/automlpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/service.proto @@ -56,11 +56,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -71,7 +69,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -127,7 +123,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -193,7 +187,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -266,7 +258,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +301,9 @@ type UpdateDatasetRequest struct { func (x *UpdateDatasetRequest) Reset() { *x = UpdateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetRequest) String() string { @@ -324,7 +314,7 @@ func (*UpdateDatasetRequest) ProtoMessage() {} func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -380,7 +368,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +406,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -433,7 +419,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +462,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -491,7 +475,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +516,9 @@ type GetAnnotationSpecRequest struct { func (x *GetAnnotationSpecRequest) Reset() { *x = GetAnnotationSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationSpecRequest) String() string { @@ -547,7 +529,7 @@ func (*GetAnnotationSpecRequest) ProtoMessage() {} func (x *GetAnnotationSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +565,9 @@ type GetTableSpecRequest struct { func (x *GetTableSpecRequest) Reset() { *x = GetTableSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableSpecRequest) String() string { @@ -598,7 +578,7 @@ func (*GetTableSpecRequest) ProtoMessage() {} func (x *GetTableSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +631,9 @@ type ListTableSpecsRequest struct { func (x *ListTableSpecsRequest) Reset() { *x = ListTableSpecsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTableSpecsRequest) String() string { @@ -666,7 +644,7 @@ func (*ListTableSpecsRequest) ProtoMessage() {} func (x *ListTableSpecsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +709,9 @@ type ListTableSpecsResponse struct { func (x *ListTableSpecsResponse) Reset() { *x = ListTableSpecsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTableSpecsResponse) String() string { @@ -746,7 +722,7 @@ func (*ListTableSpecsResponse) ProtoMessage() {} func (x *ListTableSpecsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +765,9 @@ type UpdateTableSpecRequest struct { func (x *UpdateTableSpecRequest) Reset() { *x = UpdateTableSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTableSpecRequest) String() string { @@ -804,7 +778,7 @@ func (*UpdateTableSpecRequest) ProtoMessage() {} func (x *UpdateTableSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +821,9 @@ type GetColumnSpecRequest struct { func (x *GetColumnSpecRequest) Reset() { *x = GetColumnSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetColumnSpecRequest) String() string { @@ -862,7 +834,7 @@ func (*GetColumnSpecRequest) ProtoMessage() {} func (x *GetColumnSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +887,9 @@ type ListColumnSpecsRequest struct { func (x *ListColumnSpecsRequest) Reset() { *x = ListColumnSpecsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListColumnSpecsRequest) String() string { @@ -930,7 +900,7 @@ func (*ListColumnSpecsRequest) ProtoMessage() {} func (x *ListColumnSpecsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +965,9 @@ type ListColumnSpecsResponse struct { func (x *ListColumnSpecsResponse) Reset() { *x = ListColumnSpecsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListColumnSpecsResponse) String() string { @@ -1010,7 +978,7 @@ func (*ListColumnSpecsResponse) ProtoMessage() {} func (x *ListColumnSpecsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1021,9 @@ type UpdateColumnSpecRequest struct { func (x *UpdateColumnSpecRequest) Reset() { *x = UpdateColumnSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateColumnSpecRequest) String() string { @@ -1068,7 +1034,7 @@ func (*UpdateColumnSpecRequest) ProtoMessage() {} func (x *UpdateColumnSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1077,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -1126,7 +1090,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1131,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -1182,7 +1144,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1235,11 +1197,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -1250,7 +1210,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1308,11 +1268,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -1323,7 +1281,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1364,11 +1322,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -1379,7 +1335,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,11 +1376,9 @@ type DeployModelRequest struct { func (x *DeployModelRequest) Reset() { *x = DeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployModelRequest) String() string { @@ -1435,7 +1389,7 @@ func (*DeployModelRequest) ProtoMessage() {} func (x *DeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,11 +1464,9 @@ type UndeployModelRequest struct { func (x *UndeployModelRequest) Reset() { *x = UndeployModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployModelRequest) String() string { @@ -1525,7 +1477,7 @@ func (*UndeployModelRequest) ProtoMessage() {} func (x *UndeployModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,11 +1515,9 @@ type ExportModelRequest struct { func (x *ExportModelRequest) Reset() { *x = ExportModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportModelRequest) String() string { @@ -1578,7 +1528,7 @@ func (*ExportModelRequest) ProtoMessage() {} func (x *ExportModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1572,9 @@ type ExportEvaluatedExamplesRequest struct { func (x *ExportEvaluatedExamplesRequest) Reset() { *x = ExportEvaluatedExamplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEvaluatedExamplesRequest) String() string { @@ -1637,7 +1585,7 @@ func (*ExportEvaluatedExamplesRequest) ProtoMessage() {} func (x *ExportEvaluatedExamplesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1678,11 +1626,9 @@ type GetModelEvaluationRequest struct { func (x *GetModelEvaluationRequest) Reset() { *x = GetModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelEvaluationRequest) String() string { @@ -1693,7 +1639,7 @@ func (*GetModelEvaluationRequest) ProtoMessage() {} func (x *GetModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1748,11 +1694,9 @@ type ListModelEvaluationsRequest struct { func (x *ListModelEvaluationsRequest) Reset() { *x = ListModelEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsRequest) String() string { @@ -1763,7 +1707,7 @@ func (*ListModelEvaluationsRequest) ProtoMessage() {} func (x *ListModelEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1766,9 @@ type ListModelEvaluationsResponse struct { func (x *ListModelEvaluationsResponse) Reset() { *x = ListModelEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelEvaluationsResponse) String() string { @@ -1837,7 +1779,7 @@ func (*ListModelEvaluationsResponse) ProtoMessage() {} func (x *ListModelEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,356 +2624,6 @@ func file_google_cloud_automl_v1beta1_service_proto_init() { file_google_cloud_automl_v1beta1_model_evaluation_proto_init() file_google_cloud_automl_v1beta1_operations_proto_init() file_google_cloud_automl_v1beta1_table_spec_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetTableSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTableSpecsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTableSpecsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTableSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetColumnSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListColumnSpecsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListColumnSpecsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateColumnSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UndeployModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ExportModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ExportEvaluatedExamplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListModelEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_service_proto_msgTypes[22].OneofWrappers = []any{ (*DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata)(nil), (*DeployModelRequest_ImageClassificationModelDeploymentMetadata)(nil), diff --git a/automl/apiv1beta1/automlpb/table_spec.pb.go b/automl/apiv1beta1/automlpb/table_spec.pb.go index 004ef9d06d77..6b95d66e0734 100755 --- a/automl/apiv1beta1/automlpb/table_spec.pb.go +++ b/automl/apiv1beta1/automlpb/table_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/table_spec.proto @@ -82,11 +82,9 @@ type TableSpec struct { func (x *TableSpec) Reset() { *x = TableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSpec) String() string { @@ -97,7 +95,7 @@ func (*TableSpec) ProtoMessage() {} func (x *TableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,20 +241,6 @@ func file_google_cloud_automl_v1beta1_table_spec_proto_init() { return } file_google_cloud_automl_v1beta1_io_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/tables.pb.go b/automl/apiv1beta1/automlpb/tables.pb.go index 3766b0acbfbb..edc1e8c2438e 100755 --- a/automl/apiv1beta1/automlpb/tables.pb.go +++ b/automl/apiv1beta1/automlpb/tables.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/tables.proto @@ -108,11 +108,9 @@ type TablesDatasetMetadata struct { func (x *TablesDatasetMetadata) Reset() { *x = TablesDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TablesDatasetMetadata) String() string { @@ -123,7 +121,7 @@ func (*TablesDatasetMetadata) ProtoMessage() {} func (x *TablesDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +286,9 @@ type TablesModelMetadata struct { func (x *TablesModelMetadata) Reset() { *x = TablesModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TablesModelMetadata) String() string { @@ -303,7 +299,7 @@ func (*TablesModelMetadata) ProtoMessage() {} func (x *TablesModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +459,9 @@ type TablesAnnotation struct { func (x *TablesAnnotation) Reset() { *x = TablesAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TablesAnnotation) String() string { @@ -478,7 +472,7 @@ func (*TablesAnnotation) ProtoMessage() {} func (x *TablesAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +557,9 @@ type TablesModelColumnInfo struct { func (x *TablesModelColumnInfo) Reset() { *x = TablesModelColumnInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TablesModelColumnInfo) String() string { @@ -578,7 +570,7 @@ func (*TablesModelColumnInfo) ProtoMessage() {} func (x *TablesModelColumnInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,56 +819,6 @@ func file_google_cloud_automl_v1beta1_tables_proto_init() { file_google_cloud_automl_v1beta1_ranges_proto_init() file_google_cloud_automl_v1beta1_regression_proto_init() file_google_cloud_automl_v1beta1_temporal_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TablesDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TablesModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TablesAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TablesModelColumnInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1].OneofWrappers = []any{ (*TablesModelMetadata_OptimizationObjectiveRecallValue)(nil), (*TablesModelMetadata_OptimizationObjectivePrecisionValue)(nil), diff --git a/automl/apiv1beta1/automlpb/temporal.pb.go b/automl/apiv1beta1/automlpb/temporal.pb.go index dfe9b32e9ce2..4fdc5740fad3 100755 --- a/automl/apiv1beta1/automlpb/temporal.pb.go +++ b/automl/apiv1beta1/automlpb/temporal.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/temporal.proto @@ -52,11 +52,9 @@ type TimeSegment struct { func (x *TimeSegment) Reset() { *x = TimeSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSegment) String() string { @@ -67,7 +65,7 @@ func (*TimeSegment) ProtoMessage() {} func (x *TimeSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,20 +158,6 @@ func file_google_cloud_automl_v1beta1_temporal_proto_init() { if File_google_cloud_automl_v1beta1_temporal_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/text.pb.go b/automl/apiv1beta1/automlpb/text.pb.go index 555a754608e2..c9555e871da8 100755 --- a/automl/apiv1beta1/automlpb/text.pb.go +++ b/automl/apiv1beta1/automlpb/text.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/text.proto @@ -47,11 +47,9 @@ type TextClassificationDatasetMetadata struct { func (x *TextClassificationDatasetMetadata) Reset() { *x = TextClassificationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationDatasetMetadata) String() string { @@ -62,7 +60,7 @@ func (*TextClassificationDatasetMetadata) ProtoMessage() {} func (x *TextClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96,11 +94,9 @@ type TextClassificationModelMetadata struct { func (x *TextClassificationModelMetadata) Reset() { *x = TextClassificationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationModelMetadata) String() string { @@ -111,7 +107,7 @@ func (*TextClassificationModelMetadata) ProtoMessage() {} func (x *TextClassificationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +138,9 @@ type TextExtractionDatasetMetadata struct { func (x *TextExtractionDatasetMetadata) Reset() { *x = TextExtractionDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionDatasetMetadata) String() string { @@ -157,7 +151,7 @@ func (*TextExtractionDatasetMetadata) ProtoMessage() {} func (x *TextExtractionDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +183,9 @@ type TextExtractionModelMetadata struct { func (x *TextExtractionModelMetadata) Reset() { *x = TextExtractionModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionModelMetadata) String() string { @@ -204,7 +196,7 @@ func (*TextExtractionModelMetadata) ProtoMessage() {} func (x *TextExtractionModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +235,9 @@ type TextSentimentDatasetMetadata struct { func (x *TextSentimentDatasetMetadata) Reset() { *x = TextSentimentDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentDatasetMetadata) String() string { @@ -258,7 +248,7 @@ func (*TextSentimentDatasetMetadata) ProtoMessage() {} func (x *TextSentimentDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +279,9 @@ type TextSentimentModelMetadata struct { func (x *TextSentimentModelMetadata) Reset() { *x = TextSentimentModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentModelMetadata) String() string { @@ -304,7 +292,7 @@ func (*TextSentimentModelMetadata) ProtoMessage() {} func (x *TextSentimentModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,80 +398,6 @@ func file_google_cloud_automl_v1beta1_text_proto_init() { return } file_google_cloud_automl_v1beta1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_text_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/text_extraction.pb.go b/automl/apiv1beta1/automlpb/text_extraction.pb.go index b4bfa30df098..18c58c04c620 100755 --- a/automl/apiv1beta1/automlpb/text_extraction.pb.go +++ b/automl/apiv1beta1/automlpb/text_extraction.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/text_extraction.proto @@ -55,11 +55,9 @@ type TextExtractionAnnotation struct { func (x *TextExtractionAnnotation) Reset() { *x = TextExtractionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionAnnotation) String() string { @@ -70,7 +68,7 @@ func (*TextExtractionAnnotation) ProtoMessage() {} func (x *TextExtractionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type TextExtractionEvaluationMetrics struct { func (x *TextExtractionEvaluationMetrics) Reset() { *x = TextExtractionEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionEvaluationMetrics) String() string { @@ -148,7 +144,7 @@ func (*TextExtractionEvaluationMetrics) ProtoMessage() {} func (x *TextExtractionEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type TextExtractionEvaluationMetrics_ConfidenceMetricsEntry struct { func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) Reset() { *x = TextExtractionEvaluationMetrics_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) String() string { @@ -212,7 +206,7 @@ func (*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,44 +340,6 @@ func file_google_cloud_automl_v1beta1_text_extraction_proto_init() { return } file_google_cloud_automl_v1beta1_text_segment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0].OneofWrappers = []any{ (*TextExtractionAnnotation_TextSegment)(nil), } diff --git a/automl/apiv1beta1/automlpb/text_segment.pb.go b/automl/apiv1beta1/automlpb/text_segment.pb.go index f53fd5f02225..1e08c8e45f98 100755 --- a/automl/apiv1beta1/automlpb/text_segment.pb.go +++ b/automl/apiv1beta1/automlpb/text_segment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/text_segment.proto @@ -54,11 +54,9 @@ type TextSegment struct { func (x *TextSegment) Reset() { *x = TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSegment) String() string { @@ -69,7 +67,7 @@ func (*TextSegment) ProtoMessage() {} func (x *TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,20 +160,6 @@ func file_google_cloud_automl_v1beta1_text_segment_proto_init() { if File_google_cloud_automl_v1beta1_text_segment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/text_sentiment.pb.go b/automl/apiv1beta1/automlpb/text_sentiment.pb.go index 2a8ac3db3c5a..e7ff1a33193e 100755 --- a/automl/apiv1beta1/automlpb/text_sentiment.pb.go +++ b/automl/apiv1beta1/automlpb/text_sentiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/text_sentiment.proto @@ -60,11 +60,9 @@ type TextSentimentAnnotation struct { func (x *TextSentimentAnnotation) Reset() { *x = TextSentimentAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentAnnotation) String() string { @@ -75,7 +73,7 @@ func (*TextSentimentAnnotation) ProtoMessage() {} func (x *TextSentimentAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type TextSentimentEvaluationMetrics struct { func (x *TextSentimentEvaluationMetrics) Reset() { *x = TextSentimentEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSentimentEvaluationMetrics) String() string { @@ -149,7 +145,7 @@ func (*TextSentimentEvaluationMetrics) ProtoMessage() {} func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,32 +314,6 @@ func file_google_cloud_automl_v1beta1_text_sentiment_proto_init() { return } file_google_cloud_automl_v1beta1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextSentimentEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/translation.pb.go b/automl/apiv1beta1/automlpb/translation.pb.go index 4b851976ca0d..0bfa6e5292e1 100755 --- a/automl/apiv1beta1/automlpb/translation.pb.go +++ b/automl/apiv1beta1/automlpb/translation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/translation.proto @@ -50,11 +50,9 @@ type TranslationDatasetMetadata struct { func (x *TranslationDatasetMetadata) Reset() { *x = TranslationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationDatasetMetadata) String() string { @@ -65,7 +63,7 @@ func (*TranslationDatasetMetadata) ProtoMessage() {} func (x *TranslationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type TranslationEvaluationMetrics struct { func (x *TranslationEvaluationMetrics) Reset() { *x = TranslationEvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationEvaluationMetrics) String() string { @@ -123,7 +119,7 @@ func (*TranslationEvaluationMetrics) ProtoMessage() {} func (x *TranslationEvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +169,9 @@ type TranslationModelMetadata struct { func (x *TranslationModelMetadata) Reset() { *x = TranslationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationModelMetadata) String() string { @@ -188,7 +182,7 @@ func (*TranslationModelMetadata) ProtoMessage() {} func (x *TranslationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +230,9 @@ type TranslationAnnotation struct { func (x *TranslationAnnotation) Reset() { *x = TranslationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationAnnotation) String() string { @@ -251,7 +243,7 @@ func (*TranslationAnnotation) ProtoMessage() {} func (x *TranslationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,56 +359,6 @@ func file_google_cloud_automl_v1beta1_translation_proto_init() { return } file_google_cloud_automl_v1beta1_data_items_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TranslationEvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TranslationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TranslationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/automlpb/video.pb.go b/automl/apiv1beta1/automlpb/video.pb.go index a007982dc541..82e6126bb1b9 100755 --- a/automl/apiv1beta1/automlpb/video.pb.go +++ b/automl/apiv1beta1/automlpb/video.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/automl/v1beta1/video.proto @@ -45,11 +45,9 @@ type VideoClassificationDatasetMetadata struct { func (x *VideoClassificationDatasetMetadata) Reset() { *x = VideoClassificationDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationDatasetMetadata) String() string { @@ -60,7 +58,7 @@ func (*VideoClassificationDatasetMetadata) ProtoMessage() {} func (x *VideoClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84,11 +82,9 @@ type VideoObjectTrackingDatasetMetadata struct { func (x *VideoObjectTrackingDatasetMetadata) Reset() { *x = VideoObjectTrackingDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingDatasetMetadata) String() string { @@ -99,7 +95,7 @@ func (*VideoObjectTrackingDatasetMetadata) ProtoMessage() {} func (x *VideoObjectTrackingDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +119,9 @@ type VideoClassificationModelMetadata struct { func (x *VideoClassificationModelMetadata) Reset() { *x = VideoClassificationModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationModelMetadata) String() string { @@ -138,7 +132,7 @@ func (*VideoClassificationModelMetadata) ProtoMessage() {} func (x *VideoClassificationModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,11 +156,9 @@ type VideoObjectTrackingModelMetadata struct { func (x *VideoObjectTrackingModelMetadata) Reset() { *x = VideoObjectTrackingModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingModelMetadata) String() string { @@ -177,7 +169,7 @@ func (*VideoObjectTrackingModelMetadata) ProtoMessage() {} func (x *VideoObjectTrackingModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,56 +250,6 @@ func file_google_cloud_automl_v1beta1_video_proto_init() { return } file_google_cloud_automl_v1beta1_classification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_automl_v1beta1_video_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_video_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_video_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_automl_v1beta1_video_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/automl/apiv1beta1/helpers.go b/automl/apiv1beta1/helpers.go index 2cccb97328e9..9cf9b51f6502 100755 --- a/automl/apiv1beta1/helpers.go +++ b/automl/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package automl import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "automl.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/automl/apiv1beta1/prediction_client.go b/automl/apiv1beta1/prediction_client.go index f18bd81f4d0d..a9b17d7a33b0 100755 --- a/automl/apiv1beta1/prediction_client.go +++ b/automl/apiv1beta1/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -215,6 +214,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -244,6 +245,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: automlpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -306,6 +308,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -326,6 +330,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -388,7 +393,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *automlpb.Predic var resp *automlpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -406,7 +411,7 @@ func (c *predictionGRPCClient) BatchPredict(ctx context.Context, req *automlpb.B var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.BatchPredict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.BatchPredict, req, settings.GRPC, c.logger, "BatchPredict") return err }, opts...) if err != nil { @@ -481,17 +486,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *automlpb.Predic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -562,21 +557,10 @@ func (c *predictionRESTClient) BatchPredict(ctx context.Context, req *automlpb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchPredict") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/backupdr/apiv1/backupdr_client.go b/backupdr/apiv1/backupdr_client.go index 1e2f46da1612..dad9a5bb98c8 100755 --- a/backupdr/apiv1/backupdr_client.go +++ b/backupdr/apiv1/backupdr_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -839,6 +838,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new backupdr client based on gRPC. @@ -865,6 +866,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: backupdrpb.NewBackupDRClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -930,6 +932,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new backupdr rest client. @@ -947,6 +951,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1020,7 +1025,7 @@ func (c *gRPCClient) ListManagementServers(ctx context.Context, req *backupdrpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListManagementServers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListManagementServers, req, settings.GRPC, c.logger, "ListManagementServers") return err }, opts...) if err != nil { @@ -1055,7 +1060,7 @@ func (c *gRPCClient) GetManagementServer(ctx context.Context, req *backupdrpb.Ge var resp *backupdrpb.ManagementServer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetManagementServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetManagementServer, req, settings.GRPC, c.logger, "GetManagementServer") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *gRPCClient) CreateManagementServer(ctx context.Context, req *backupdrpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateManagementServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateManagementServer, req, settings.GRPC, c.logger, "CreateManagementServer") return err }, opts...) if err != nil { @@ -1093,7 +1098,7 @@ func (c *gRPCClient) DeleteManagementServer(ctx context.Context, req *backupdrpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteManagementServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteManagementServer, req, settings.GRPC, c.logger, "DeleteManagementServer") return err }, opts...) if err != nil { @@ -1113,7 +1118,7 @@ func (c *gRPCClient) CreateBackupVault(ctx context.Context, req *backupdrpb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackupVault, req, settings.GRPC, c.logger, "CreateBackupVault") return err }, opts...) if err != nil { @@ -1144,7 +1149,7 @@ func (c *gRPCClient) ListBackupVaults(ctx context.Context, req *backupdrpb.ListB } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackupVaults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackupVaults, req, settings.GRPC, c.logger, "ListBackupVaults") return err }, opts...) if err != nil { @@ -1190,7 +1195,7 @@ func (c *gRPCClient) FetchUsableBackupVaults(ctx context.Context, req *backupdrp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchUsableBackupVaults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchUsableBackupVaults, req, settings.GRPC, c.logger, "FetchUsableBackupVaults") return err }, opts...) if err != nil { @@ -1225,7 +1230,7 @@ func (c *gRPCClient) GetBackupVault(ctx context.Context, req *backupdrpb.GetBack var resp *backupdrpb.BackupVault err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackupVault, req, settings.GRPC, c.logger, "GetBackupVault") return err }, opts...) if err != nil { @@ -1243,7 +1248,7 @@ func (c *gRPCClient) UpdateBackupVault(ctx context.Context, req *backupdrpb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBackupVault, req, settings.GRPC, c.logger, "UpdateBackupVault") return err }, opts...) if err != nil { @@ -1263,7 +1268,7 @@ func (c *gRPCClient) DeleteBackupVault(ctx context.Context, req *backupdrpb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackupVault, req, settings.GRPC, c.logger, "DeleteBackupVault") return err }, opts...) if err != nil { @@ -1294,7 +1299,7 @@ func (c *gRPCClient) ListDataSources(ctx context.Context, req *backupdrpb.ListDa } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDataSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDataSources, req, settings.GRPC, c.logger, "ListDataSources") return err }, opts...) if err != nil { @@ -1329,7 +1334,7 @@ func (c *gRPCClient) GetDataSource(ctx context.Context, req *backupdrpb.GetDataS var resp *backupdrpb.DataSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataSource, req, settings.GRPC, c.logger, "GetDataSource") return err }, opts...) if err != nil { @@ -1347,7 +1352,7 @@ func (c *gRPCClient) UpdateDataSource(ctx context.Context, req *backupdrpb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDataSource, req, settings.GRPC, c.logger, "UpdateDataSource") return err }, opts...) if err != nil { @@ -1378,7 +1383,7 @@ func (c *gRPCClient) ListBackups(ctx context.Context, req *backupdrpb.ListBackup } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1413,7 +1418,7 @@ func (c *gRPCClient) GetBackup(ctx context.Context, req *backupdrpb.GetBackupReq var resp *backupdrpb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1431,7 +1436,7 @@ func (c *gRPCClient) UpdateBackup(ctx context.Context, req *backupdrpb.UpdateBac var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1451,7 +1456,7 @@ func (c *gRPCClient) DeleteBackup(ctx context.Context, req *backupdrpb.DeleteBac var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1471,7 +1476,7 @@ func (c *gRPCClient) RestoreBackup(ctx context.Context, req *backupdrpb.RestoreB var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestoreBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestoreBackup, req, settings.GRPC, c.logger, "RestoreBackup") return err }, opts...) if err != nil { @@ -1491,7 +1496,7 @@ func (c *gRPCClient) CreateBackupPlan(ctx context.Context, req *backupdrpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackupPlan, req, settings.GRPC, c.logger, "CreateBackupPlan") return err }, opts...) if err != nil { @@ -1511,7 +1516,7 @@ func (c *gRPCClient) GetBackupPlan(ctx context.Context, req *backupdrpb.GetBacku var resp *backupdrpb.BackupPlan err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackupPlan, req, settings.GRPC, c.logger, "GetBackupPlan") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *gRPCClient) ListBackupPlans(ctx context.Context, req *backupdrpb.ListBa } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackupPlans(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackupPlans, req, settings.GRPC, c.logger, "ListBackupPlans") return err }, opts...) if err != nil { @@ -1575,7 +1580,7 @@ func (c *gRPCClient) DeleteBackupPlan(ctx context.Context, req *backupdrpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackupPlan, req, settings.GRPC, c.logger, "DeleteBackupPlan") return err }, opts...) if err != nil { @@ -1595,7 +1600,7 @@ func (c *gRPCClient) CreateBackupPlanAssociation(ctx context.Context, req *backu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackupPlanAssociation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackupPlanAssociation, req, settings.GRPC, c.logger, "CreateBackupPlanAssociation") return err }, opts...) if err != nil { @@ -1615,7 +1620,7 @@ func (c *gRPCClient) GetBackupPlanAssociation(ctx context.Context, req *backupdr var resp *backupdrpb.BackupPlanAssociation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackupPlanAssociation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackupPlanAssociation, req, settings.GRPC, c.logger, "GetBackupPlanAssociation") return err }, opts...) if err != nil { @@ -1644,7 +1649,7 @@ func (c *gRPCClient) ListBackupPlanAssociations(ctx context.Context, req *backup } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackupPlanAssociations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackupPlanAssociations, req, settings.GRPC, c.logger, "ListBackupPlanAssociations") return err }, opts...) if err != nil { @@ -1679,7 +1684,7 @@ func (c *gRPCClient) DeleteBackupPlanAssociation(ctx context.Context, req *backu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackupPlanAssociation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackupPlanAssociation, req, settings.GRPC, c.logger, "DeleteBackupPlanAssociation") return err }, opts...) if err != nil { @@ -1699,7 +1704,7 @@ func (c *gRPCClient) TriggerBackup(ctx context.Context, req *backupdrpb.TriggerB var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TriggerBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TriggerBackup, req, settings.GRPC, c.logger, "TriggerBackup") return err }, opts...) if err != nil { @@ -1719,7 +1724,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1748,7 +1753,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1783,7 +1788,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1801,7 +1806,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1819,7 +1824,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1836,7 +1841,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1850,7 +1855,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1865,7 +1870,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1894,7 +1899,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1971,21 +1976,10 @@ func (c *restClient) ListManagementServers(ctx context.Context, req *backupdrpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListManagementServers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2048,17 +2042,7 @@ func (c *restClient) GetManagementServer(ctx context.Context, req *backupdrpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetManagementServer") if err != nil { return err } @@ -2118,21 +2102,10 @@ func (c *restClient) CreateManagementServer(ctx context.Context, req *backupdrpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateManagementServer") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2185,21 +2158,10 @@ func (c *restClient) DeleteManagementServer(ctx context.Context, req *backupdrpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteManagementServer") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2263,21 +2225,10 @@ func (c *restClient) CreateBackupVault(ctx context.Context, req *backupdrpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupVault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2349,21 +2300,10 @@ func (c *restClient) ListBackupVaults(ctx context.Context, req *backupdrpb.ListB } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupVaults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2446,21 +2386,10 @@ func (c *restClient) FetchUsableBackupVaults(ctx context.Context, req *backupdrp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchUsableBackupVaults") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2526,17 +2455,7 @@ func (c *restClient) GetBackupVault(ctx context.Context, req *backupdrpb.GetBack httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupVault") if err != nil { return err } @@ -2608,21 +2527,10 @@ func (c *restClient) UpdateBackupVault(ctx context.Context, req *backupdrpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupVault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2687,21 +2595,10 @@ func (c *restClient) DeleteBackupVault(ctx context.Context, req *backupdrpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupVault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2770,21 +2667,10 @@ func (c *restClient) ListDataSources(ctx context.Context, req *backupdrpb.ListDa } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2847,17 +2733,7 @@ func (c *restClient) GetDataSource(ctx context.Context, req *backupdrpb.GetDataS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataSource") if err != nil { return err } @@ -2926,21 +2802,10 @@ func (c *restClient) UpdateDataSource(ctx context.Context, req *backupdrpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3012,21 +2877,10 @@ func (c *restClient) ListBackups(ctx context.Context, req *backupdrpb.ListBackup } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3092,17 +2946,7 @@ func (c *restClient) GetBackup(ctx context.Context, req *backupdrpb.GetBackupReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -3168,21 +3012,10 @@ func (c *restClient) UpdateBackup(ctx context.Context, req *backupdrpb.UpdateBac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3235,21 +3068,10 @@ func (c *restClient) DeleteBackup(ctx context.Context, req *backupdrpb.DeleteBac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3305,21 +3127,10 @@ func (c *restClient) RestoreBackup(ctx context.Context, req *backupdrpb.RestoreB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3380,21 +3191,10 @@ func (c *restClient) CreateBackupPlan(ctx context.Context, req *backupdrpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupPlan") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3445,17 +3245,7 @@ func (c *restClient) GetBackupPlan(ctx context.Context, req *backupdrpb.GetBacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupPlan") if err != nil { return err } @@ -3523,21 +3313,10 @@ func (c *restClient) ListBackupPlans(ctx context.Context, req *backupdrpb.ListBa } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupPlans") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3602,21 +3381,10 @@ func (c *restClient) DeleteBackupPlan(ctx context.Context, req *backupdrpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupPlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3677,21 +3445,10 @@ func (c *restClient) CreateBackupPlanAssociation(ctx context.Context, req *backu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupPlanAssociation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3742,17 +3499,7 @@ func (c *restClient) GetBackupPlanAssociation(ctx context.Context, req *backupdr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupPlanAssociation") if err != nil { return err } @@ -3817,21 +3564,10 @@ func (c *restClient) ListBackupPlanAssociations(ctx context.Context, req *backup } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupPlanAssociations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3896,21 +3632,10 @@ func (c *restClient) DeleteBackupPlanAssociation(ctx context.Context, req *backu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupPlanAssociation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3966,21 +3691,10 @@ func (c *restClient) TriggerBackup(ctx context.Context, req *backupdrpb.TriggerB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TriggerBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4031,17 +3745,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4106,21 +3810,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4187,17 +3880,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4257,17 +3940,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4329,17 +4002,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4392,15 +4055,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4434,15 +4090,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4479,17 +4128,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4554,21 +4193,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/backupdr/apiv1/backupdr_client_example_go123_test.go b/backupdr/apiv1/backupdr_client_example_go123_test.go index 3de3ed78597d..45048969f77e 100644 --- a/backupdr/apiv1/backupdr_client_example_go123_test.go +++ b/backupdr/apiv1/backupdr_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_FetchUsableBackupVaults_all() { } for resp, err := range c.FetchUsableBackupVaults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListBackupPlanAssociations_all() { } for resp, err := range c.ListBackupPlanAssociations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListBackupPlans_all() { } for resp, err := range c.ListBackupPlans(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListBackupVaults_all() { } for resp, err := range c.ListBackupVaults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListDataSources_all() { } for resp, err := range c.ListDataSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListManagementServers_all() { } for resp, err := range c.ListManagementServers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/backupdr/apiv1/backupdrpb/backupdr.pb.go b/backupdr/apiv1/backupdrpb/backupdr.pb.go index 7014a6e8ac3a..b4e75d148f74 100755 --- a/backupdr/apiv1/backupdrpb/backupdr.pb.go +++ b/backupdr/apiv1/backupdrpb/backupdr.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupdr.proto @@ -236,11 +236,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -251,7 +249,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +292,9 @@ type ManagementURI struct { func (x *ManagementURI) Reset() { *x = ManagementURI{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagementURI) String() string { @@ -309,7 +305,7 @@ func (*ManagementURI) ProtoMessage() {} func (x *ManagementURI) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type WorkforceIdentityBasedManagementURI struct { func (x *WorkforceIdentityBasedManagementURI) Reset() { *x = WorkforceIdentityBasedManagementURI{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkforceIdentityBasedManagementURI) String() string { @@ -367,7 +361,7 @@ func (*WorkforceIdentityBasedManagementURI) ProtoMessage() {} func (x *WorkforceIdentityBasedManagementURI) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +404,9 @@ type WorkforceIdentityBasedOAuth2ClientID struct { func (x *WorkforceIdentityBasedOAuth2ClientID) Reset() { *x = WorkforceIdentityBasedOAuth2ClientID{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkforceIdentityBasedOAuth2ClientID) String() string { @@ -425,7 +417,7 @@ func (*WorkforceIdentityBasedOAuth2ClientID) ProtoMessage() {} func (x *WorkforceIdentityBasedOAuth2ClientID) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +501,9 @@ type ManagementServer struct { func (x *ManagementServer) Reset() { *x = ManagementServer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagementServer) String() string { @@ -524,7 +514,7 @@ func (*ManagementServer) ProtoMessage() {} func (x *ManagementServer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +667,9 @@ type ListManagementServersRequest struct { func (x *ListManagementServersRequest) Reset() { *x = ListManagementServersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagementServersRequest) String() string { @@ -692,7 +680,7 @@ func (*ListManagementServersRequest) ProtoMessage() {} func (x *ListManagementServersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +753,9 @@ type ListManagementServersResponse struct { func (x *ListManagementServersResponse) Reset() { *x = ListManagementServersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagementServersResponse) String() string { @@ -780,7 +766,7 @@ func (*ListManagementServersResponse) ProtoMessage() {} func (x *ListManagementServersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +815,9 @@ type GetManagementServerRequest struct { func (x *GetManagementServerRequest) Reset() { *x = GetManagementServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetManagementServerRequest) String() string { @@ -844,7 +828,7 @@ func (*GetManagementServerRequest) ProtoMessage() {} func (x *GetManagementServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +884,9 @@ type CreateManagementServerRequest struct { func (x *CreateManagementServerRequest) Reset() { *x = CreateManagementServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateManagementServerRequest) String() string { @@ -915,7 +897,7 @@ func (*CreateManagementServerRequest) ProtoMessage() {} func (x *CreateManagementServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +966,9 @@ type DeleteManagementServerRequest struct { func (x *DeleteManagementServerRequest) Reset() { *x = DeleteManagementServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteManagementServerRequest) String() string { @@ -999,7 +979,7 @@ func (*DeleteManagementServerRequest) ProtoMessage() {} func (x *DeleteManagementServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1039,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1074,7 +1052,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1965,140 +1943,6 @@ func file_google_cloud_backupdr_v1_backupdr_proto_init() { file_google_cloud_backupdr_v1_backupplan_proto_init() file_google_cloud_backupdr_v1_backupplanassociation_proto_init() file_google_cloud_backupdr_v1_backupvault_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ManagementURI); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WorkforceIdentityBasedManagementURI); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WorkforceIdentityBasedOAuth2ClientID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ManagementServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListManagementServersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListManagementServersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetManagementServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateManagementServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteManagementServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_backupdr_v1_backupdr_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/backupdr/apiv1/backupdrpb/backupplan.pb.go b/backupdr/apiv1/backupdrpb/backupplan.pb.go index 6a6b4cd88629..e65018041018 100755 --- a/backupdr/apiv1/backupdrpb/backupplan.pb.go +++ b/backupdr/apiv1/backupdrpb/backupplan.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupplan.proto @@ -283,11 +283,9 @@ type BackupPlan struct { func (x *BackupPlan) Reset() { *x = BackupPlan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlan) String() string { @@ -298,7 +296,7 @@ func (*BackupPlan) ProtoMessage() {} func (x *BackupPlan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +416,9 @@ type BackupRule struct { func (x *BackupRule) Reset() { *x = BackupRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupRule) String() string { @@ -433,7 +429,7 @@ func (*BackupRule) ProtoMessage() {} func (x *BackupRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +550,9 @@ type StandardSchedule struct { func (x *StandardSchedule) Reset() { *x = StandardSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StandardSchedule) String() string { @@ -569,7 +563,7 @@ func (*StandardSchedule) ProtoMessage() {} func (x *StandardSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +656,9 @@ type BackupWindow struct { func (x *BackupWindow) Reset() { *x = BackupWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupWindow) String() string { @@ -677,7 +669,7 @@ func (*BackupWindow) ProtoMessage() {} func (x *BackupWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +714,9 @@ type WeekDayOfMonth struct { func (x *WeekDayOfMonth) Reset() { *x = WeekDayOfMonth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeekDayOfMonth) String() string { @@ -737,7 +727,7 @@ func (*WeekDayOfMonth) ProtoMessage() {} func (x *WeekDayOfMonth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +791,9 @@ type CreateBackupPlanRequest struct { func (x *CreateBackupPlanRequest) Reset() { *x = CreateBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupPlanRequest) String() string { @@ -816,7 +804,7 @@ func (*CreateBackupPlanRequest) ProtoMessage() {} func (x *CreateBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +881,9 @@ type ListBackupPlansRequest struct { func (x *ListBackupPlansRequest) Reset() { *x = ListBackupPlansRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlansRequest) String() string { @@ -908,7 +894,7 @@ func (*ListBackupPlansRequest) ProtoMessage() {} func (x *ListBackupPlansRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +972,9 @@ type ListBackupPlansResponse struct { func (x *ListBackupPlansResponse) Reset() { *x = ListBackupPlansResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlansResponse) String() string { @@ -1001,7 +985,7 @@ func (*ListBackupPlansResponse) ProtoMessage() {} func (x *ListBackupPlansResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1035,9 @@ type GetBackupPlanRequest struct { func (x *GetBackupPlanRequest) Reset() { *x = GetBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupPlanRequest) String() string { @@ -1066,7 +1048,7 @@ func (*GetBackupPlanRequest) ProtoMessage() {} func (x *GetBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1098,9 @@ type DeleteBackupPlanRequest struct { func (x *DeleteBackupPlanRequest) Reset() { *x = DeleteBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupPlanRequest) String() string { @@ -1131,7 +1111,7 @@ func (*DeleteBackupPlanRequest) ProtoMessage() {} func (x *DeleteBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,128 +1427,6 @@ func file_google_cloud_backupdr_v1_backupplan_proto_init() { if File_google_cloud_backupdr_v1_backupplan_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BackupRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StandardSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BackupWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WeekDayOfMonth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlansRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlansResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_backupdr_v1_backupplan_proto_msgTypes[1].OneofWrappers = []any{ (*BackupRule_StandardSchedule)(nil), } diff --git a/backupdr/apiv1/backupdrpb/backupplanassociation.pb.go b/backupdr/apiv1/backupdrpb/backupplanassociation.pb.go index a82ba4754df8..17099439bd73 100755 --- a/backupdr/apiv1/backupdrpb/backupplanassociation.pb.go +++ b/backupdr/apiv1/backupdrpb/backupplanassociation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupplanassociation.proto @@ -200,11 +200,9 @@ type BackupPlanAssociation struct { func (x *BackupPlanAssociation) Reset() { *x = BackupPlanAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlanAssociation) String() string { @@ -215,7 +213,7 @@ func (*BackupPlanAssociation) ProtoMessage() {} func (x *BackupPlanAssociation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +314,9 @@ type RuleConfigInfo struct { func (x *RuleConfigInfo) Reset() { *x = RuleConfigInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuleConfigInfo) String() string { @@ -331,7 +327,7 @@ func (*RuleConfigInfo) ProtoMessage() {} func (x *RuleConfigInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +403,9 @@ type CreateBackupPlanAssociationRequest struct { func (x *CreateBackupPlanAssociationRequest) Reset() { *x = CreateBackupPlanAssociationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupPlanAssociationRequest) String() string { @@ -422,7 +416,7 @@ func (*CreateBackupPlanAssociationRequest) ProtoMessage() {} func (x *CreateBackupPlanAssociationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +483,9 @@ type ListBackupPlanAssociationsRequest struct { func (x *ListBackupPlanAssociationsRequest) Reset() { *x = ListBackupPlanAssociationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlanAssociationsRequest) String() string { @@ -504,7 +496,7 @@ func (*ListBackupPlanAssociationsRequest) ProtoMessage() {} func (x *ListBackupPlanAssociationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +562,9 @@ type ListBackupPlanAssociationsResponse struct { func (x *ListBackupPlanAssociationsResponse) Reset() { *x = ListBackupPlanAssociationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlanAssociationsResponse) String() string { @@ -585,7 +575,7 @@ func (*ListBackupPlanAssociationsResponse) ProtoMessage() {} func (x *ListBackupPlanAssociationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +624,9 @@ type GetBackupPlanAssociationRequest struct { func (x *GetBackupPlanAssociationRequest) Reset() { *x = GetBackupPlanAssociationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupPlanAssociationRequest) String() string { @@ -649,7 +637,7 @@ func (*GetBackupPlanAssociationRequest) ProtoMessage() {} func (x *GetBackupPlanAssociationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +686,9 @@ type DeleteBackupPlanAssociationRequest struct { func (x *DeleteBackupPlanAssociationRequest) Reset() { *x = DeleteBackupPlanAssociationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupPlanAssociationRequest) String() string { @@ -713,7 +699,7 @@ func (*DeleteBackupPlanAssociationRequest) ProtoMessage() {} func (x *DeleteBackupPlanAssociationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +757,9 @@ type TriggerBackupRequest struct { func (x *TriggerBackupRequest) Reset() { *x = TriggerBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TriggerBackupRequest) String() string { @@ -786,7 +770,7 @@ func (*TriggerBackupRequest) ProtoMessage() {} func (x *TriggerBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,104 +1046,6 @@ func file_google_cloud_backupdr_v1_backupplanassociation_proto_init() { if File_google_cloud_backupdr_v1_backupplanassociation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlanAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RuleConfigInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupPlanAssociationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlanAssociationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlanAssociationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupPlanAssociationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupPlanAssociationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupplanassociation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TriggerBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/backupdr/apiv1/backupdrpb/backupvault.pb.go b/backupdr/apiv1/backupdrpb/backupvault.pb.go index 866f12dced4e..316fb74b6d76 100755 --- a/backupdr/apiv1/backupdrpb/backupvault.pb.go +++ b/backupdr/apiv1/backupdrpb/backupvault.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupvault.proto @@ -621,11 +621,9 @@ type BackupVault struct { func (x *BackupVault) Reset() { *x = BackupVault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupVault) String() string { @@ -636,7 +634,7 @@ func (*BackupVault) ProtoMessage() {} func (x *BackupVault) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +807,9 @@ type DataSource struct { func (x *DataSource) Reset() { *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSource) String() string { @@ -824,7 +820,7 @@ func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +972,9 @@ type BackupConfigInfo struct { func (x *BackupConfigInfo) Reset() { *x = BackupConfigInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupConfigInfo) String() string { @@ -991,7 +985,7 @@ func (*BackupConfigInfo) ProtoMessage() {} func (x *BackupConfigInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1080,9 @@ type GcpBackupConfig struct { func (x *GcpBackupConfig) Reset() { *x = GcpBackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpBackupConfig) String() string { @@ -1101,7 +1093,7 @@ func (*GcpBackupConfig) ProtoMessage() {} func (x *GcpBackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1161,9 @@ type BackupApplianceBackupConfig struct { func (x *BackupApplianceBackupConfig) Reset() { *x = BackupApplianceBackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupApplianceBackupConfig) String() string { @@ -1184,7 +1174,7 @@ func (*BackupApplianceBackupConfig) ProtoMessage() {} func (x *BackupApplianceBackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1264,9 @@ type DataSourceGcpResource struct { func (x *DataSourceGcpResource) Reset() { *x = DataSourceGcpResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceGcpResource) String() string { @@ -1289,7 +1277,7 @@ func (*DataSourceGcpResource) ProtoMessage() {} func (x *DataSourceGcpResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1365,9 @@ type DataSourceBackupApplianceApplication struct { func (x *DataSourceBackupApplianceApplication) Reset() { *x = DataSourceBackupApplianceApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceBackupApplianceApplication) String() string { @@ -1392,7 +1378,7 @@ func (*DataSourceBackupApplianceApplication) ProtoMessage() {} func (x *DataSourceBackupApplianceApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1456,9 @@ type ServiceLockInfo struct { func (x *ServiceLockInfo) Reset() { *x = ServiceLockInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceLockInfo) String() string { @@ -1485,7 +1469,7 @@ func (*ServiceLockInfo) ProtoMessage() {} func (x *ServiceLockInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1518,9 @@ type BackupApplianceLockInfo struct { func (x *BackupApplianceLockInfo) Reset() { *x = BackupApplianceLockInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupApplianceLockInfo) String() string { @@ -1549,7 +1531,7 @@ func (*BackupApplianceLockInfo) ProtoMessage() {} func (x *BackupApplianceLockInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1659,11 +1641,9 @@ type BackupLock struct { func (x *BackupLock) Reset() { *x = BackupLock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupLock) String() string { @@ -1674,7 +1654,7 @@ func (*BackupLock) ProtoMessage() {} func (x *BackupLock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1776,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -1811,7 +1789,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,11 +2001,9 @@ type CreateBackupVaultRequest struct { func (x *CreateBackupVaultRequest) Reset() { *x = CreateBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupVaultRequest) String() string { @@ -2038,7 +2014,7 @@ func (*CreateBackupVaultRequest) ProtoMessage() {} func (x *CreateBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2117,11 +2093,9 @@ type ListBackupVaultsRequest struct { func (x *ListBackupVaultsRequest) Reset() { *x = ListBackupVaultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupVaultsRequest) String() string { @@ -2132,7 +2106,7 @@ func (*ListBackupVaultsRequest) ProtoMessage() {} func (x *ListBackupVaultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2212,11 +2186,9 @@ type ListBackupVaultsResponse struct { func (x *ListBackupVaultsResponse) Reset() { *x = ListBackupVaultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupVaultsResponse) String() string { @@ -2227,7 +2199,7 @@ func (*ListBackupVaultsResponse) ProtoMessage() {} func (x *ListBackupVaultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2261,9 @@ type FetchUsableBackupVaultsRequest struct { func (x *FetchUsableBackupVaultsRequest) Reset() { *x = FetchUsableBackupVaultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchUsableBackupVaultsRequest) String() string { @@ -2304,7 +2274,7 @@ func (*FetchUsableBackupVaultsRequest) ProtoMessage() {} func (x *FetchUsableBackupVaultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2377,11 +2347,9 @@ type FetchUsableBackupVaultsResponse struct { func (x *FetchUsableBackupVaultsResponse) Reset() { *x = FetchUsableBackupVaultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchUsableBackupVaultsResponse) String() string { @@ -2392,7 +2360,7 @@ func (*FetchUsableBackupVaultsResponse) ProtoMessage() {} func (x *FetchUsableBackupVaultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2444,11 +2412,9 @@ type GetBackupVaultRequest struct { func (x *GetBackupVaultRequest) Reset() { *x = GetBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupVaultRequest) String() string { @@ -2459,7 +2425,7 @@ func (*GetBackupVaultRequest) ProtoMessage() {} func (x *GetBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2492,9 @@ type UpdateBackupVaultRequest struct { func (x *UpdateBackupVaultRequest) Reset() { *x = UpdateBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupVaultRequest) String() string { @@ -2541,7 +2505,7 @@ func (*UpdateBackupVaultRequest) ProtoMessage() {} func (x *UpdateBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2630,11 +2594,9 @@ type DeleteBackupVaultRequest struct { func (x *DeleteBackupVaultRequest) Reset() { *x = DeleteBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupVaultRequest) String() string { @@ -2645,7 +2607,7 @@ func (*DeleteBackupVaultRequest) ProtoMessage() {} func (x *DeleteBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2728,11 +2690,9 @@ type ListDataSourcesRequest struct { func (x *ListDataSourcesRequest) Reset() { *x = ListDataSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesRequest) String() string { @@ -2743,7 +2703,7 @@ func (*ListDataSourcesRequest) ProtoMessage() {} func (x *ListDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2816,11 +2776,9 @@ type ListDataSourcesResponse struct { func (x *ListDataSourcesResponse) Reset() { *x = ListDataSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesResponse) String() string { @@ -2831,7 +2789,7 @@ func (*ListDataSourcesResponse) ProtoMessage() {} func (x *ListDataSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2880,11 +2838,9 @@ type GetDataSourceRequest struct { func (x *GetDataSourceRequest) Reset() { *x = GetDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataSourceRequest) String() string { @@ -2895,7 +2851,7 @@ func (*GetDataSourceRequest) ProtoMessage() {} func (x *GetDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2951,11 +2907,9 @@ type UpdateDataSourceRequest struct { func (x *UpdateDataSourceRequest) Reset() { *x = UpdateDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataSourceRequest) String() string { @@ -2966,7 +2920,7 @@ func (*UpdateDataSourceRequest) ProtoMessage() {} func (x *UpdateDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3038,11 +2992,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3053,7 +3005,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3133,11 +3085,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3148,7 +3098,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3200,11 +3150,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3215,7 +3163,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3276,11 +3224,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -3291,7 +3237,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3353,11 +3299,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3368,7 +3312,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3436,11 +3380,9 @@ type RestoreBackupRequest struct { func (x *RestoreBackupRequest) Reset() { *x = RestoreBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreBackupRequest) String() string { @@ -3451,7 +3393,7 @@ func (*RestoreBackupRequest) ProtoMessage() {} func (x *RestoreBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3544,11 +3486,9 @@ type RestoreBackupResponse struct { func (x *RestoreBackupResponse) Reset() { *x = RestoreBackupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreBackupResponse) String() string { @@ -3559,7 +3499,7 @@ func (*RestoreBackupResponse) ProtoMessage() {} func (x *RestoreBackupResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3597,11 +3537,9 @@ type TargetResource struct { func (x *TargetResource) Reset() { *x = TargetResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetResource) String() string { @@ -3612,7 +3550,7 @@ func (*TargetResource) ProtoMessage() {} func (x *TargetResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3669,11 +3607,9 @@ type GcpResource struct { func (x *GcpResource) Reset() { *x = GcpResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpResource) String() string { @@ -3684,7 +3620,7 @@ func (*GcpResource) ProtoMessage() {} func (x *GcpResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3739,11 +3675,9 @@ type Backup_GCPBackupPlanInfo struct { func (x *Backup_GCPBackupPlanInfo) Reset() { *x = Backup_GCPBackupPlanInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_GCPBackupPlanInfo) String() string { @@ -3754,7 +3688,7 @@ func (*Backup_GCPBackupPlanInfo) ProtoMessage() {} func (x *Backup_GCPBackupPlanInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4724,404 +4658,6 @@ func file_google_cloud_backupdr_v1_backupvault_proto_init() { } file_google_cloud_backupdr_v1_backupvault_ba_proto_init() file_google_cloud_backupdr_v1_backupvault_gce_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupVault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BackupConfigInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcpBackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BackupApplianceBackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceGcpResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceBackupApplianceApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ServiceLockInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BackupApplianceLockInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BackupLock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupVaultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupVaultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FetchUsableBackupVaultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FetchUsableBackupVaultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*RestoreBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RestoreBackupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*TargetResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GcpResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Backup_GCPBackupPlanInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_backupdr_v1_backupvault_proto_msgTypes[1].OneofWrappers = []any{ (*DataSource_DataSourceGcpResource)(nil), diff --git a/backupdr/apiv1/backupdrpb/backupvault_ba.pb.go b/backupdr/apiv1/backupdrpb/backupvault_ba.pb.go index e71745392cad..1a335e99ea37 100755 --- a/backupdr/apiv1/backupdrpb/backupvault_ba.pb.go +++ b/backupdr/apiv1/backupdrpb/backupvault_ba.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupvault_ba.proto @@ -58,11 +58,9 @@ type BackupApplianceBackupProperties struct { func (x *BackupApplianceBackupProperties) Reset() { *x = BackupApplianceBackupProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_ba_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_ba_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupApplianceBackupProperties) String() string { @@ -73,7 +71,7 @@ func (*BackupApplianceBackupProperties) ProtoMessage() {} func (x *BackupApplianceBackupProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_ba_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,20 +202,6 @@ func file_google_cloud_backupdr_v1_backupvault_ba_proto_init() { if File_google_cloud_backupdr_v1_backupvault_ba_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupvault_ba_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupApplianceBackupProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_backupdr_v1_backupvault_ba_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/backupdr/apiv1/backupdrpb/backupvault_gce.pb.go b/backupdr/apiv1/backupdrpb/backupvault_gce.pb.go index 9b1bb2c184b3..f5653e1f248e 100755 --- a/backupdr/apiv1/backupdrpb/backupvault_gce.pb.go +++ b/backupdr/apiv1/backupdrpb/backupvault_gce.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/backupdr/v1/backupvault_gce.proto @@ -1143,11 +1143,9 @@ type ComputeInstanceBackupProperties struct { func (x *ComputeInstanceBackupProperties) Reset() { *x = ComputeInstanceBackupProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInstanceBackupProperties) String() string { @@ -1158,7 +1156,7 @@ func (*ComputeInstanceBackupProperties) ProtoMessage() {} func (x *ComputeInstanceBackupProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1351,11 +1349,9 @@ type ComputeInstanceRestoreProperties struct { func (x *ComputeInstanceRestoreProperties) Reset() { *x = ComputeInstanceRestoreProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInstanceRestoreProperties) String() string { @@ -1366,7 +1362,7 @@ func (*ComputeInstanceRestoreProperties) ProtoMessage() {} func (x *ComputeInstanceRestoreProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1567,9 @@ type ComputeInstanceTargetEnvironment struct { func (x *ComputeInstanceTargetEnvironment) Reset() { *x = ComputeInstanceTargetEnvironment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInstanceTargetEnvironment) String() string { @@ -1586,7 +1580,7 @@ func (*ComputeInstanceTargetEnvironment) ProtoMessage() {} func (x *ComputeInstanceTargetEnvironment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1630,9 @@ type ComputeInstanceDataSourceProperties struct { func (x *ComputeInstanceDataSourceProperties) Reset() { *x = ComputeInstanceDataSourceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInstanceDataSourceProperties) String() string { @@ -1651,7 +1643,7 @@ func (*ComputeInstanceDataSourceProperties) ProtoMessage() {} func (x *ComputeInstanceDataSourceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1727,11 +1719,9 @@ type AdvancedMachineFeatures struct { func (x *AdvancedMachineFeatures) Reset() { *x = AdvancedMachineFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedMachineFeatures) String() string { @@ -1742,7 +1732,7 @@ func (*AdvancedMachineFeatures) ProtoMessage() {} func (x *AdvancedMachineFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1798,11 +1788,9 @@ type ConfidentialInstanceConfig struct { func (x *ConfidentialInstanceConfig) Reset() { *x = ConfidentialInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfidentialInstanceConfig) String() string { @@ -1813,7 +1801,7 @@ func (*ConfidentialInstanceConfig) ProtoMessage() {} func (x *ConfidentialInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1835,9 @@ type DisplayDevice struct { func (x *DisplayDevice) Reset() { *x = DisplayDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayDevice) String() string { @@ -1862,7 +1848,7 @@ func (*DisplayDevice) ProtoMessage() {} func (x *DisplayDevice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,11 +1887,9 @@ type AcceleratorConfig struct { func (x *AcceleratorConfig) Reset() { *x = AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorConfig) String() string { @@ -1916,7 +1900,7 @@ func (*AcceleratorConfig) ProtoMessage() {} func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1967,11 +1951,9 @@ type CustomerEncryptionKey struct { func (x *CustomerEncryptionKey) Reset() { *x = CustomerEncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerEncryptionKey) String() string { @@ -1982,7 +1964,7 @@ func (*CustomerEncryptionKey) ProtoMessage() {} func (x *CustomerEncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2078,11 +2060,9 @@ type Entry struct { func (x *Entry) Reset() { *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entry) String() string { @@ -2093,7 +2073,7 @@ func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2135,11 +2115,9 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -2150,7 +2128,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2231,11 +2209,9 @@ type NetworkInterface struct { func (x *NetworkInterface) Reset() { *x = NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkInterface) String() string { @@ -2246,7 +2222,7 @@ func (*NetworkInterface) ProtoMessage() {} func (x *NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2371,11 +2347,9 @@ type NetworkPerformanceConfig struct { func (x *NetworkPerformanceConfig) Reset() { *x = NetworkPerformanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPerformanceConfig) String() string { @@ -2386,7 +2360,7 @@ func (*NetworkPerformanceConfig) ProtoMessage() {} func (x *NetworkPerformanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2441,11 +2415,9 @@ type AccessConfig struct { func (x *AccessConfig) Reset() { *x = AccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessConfig) String() string { @@ -2456,7 +2428,7 @@ func (*AccessConfig) ProtoMessage() {} func (x *AccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2543,11 +2515,9 @@ type AliasIpRange struct { func (x *AliasIpRange) Reset() { *x = AliasIpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AliasIpRange) String() string { @@ -2558,7 +2528,7 @@ func (*AliasIpRange) ProtoMessage() {} func (x *AliasIpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2599,11 +2569,9 @@ type InstanceParams struct { func (x *InstanceParams) Reset() { *x = InstanceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceParams) String() string { @@ -2614,7 +2582,7 @@ func (*InstanceParams) ProtoMessage() {} func (x *InstanceParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2653,11 +2621,9 @@ type AllocationAffinity struct { func (x *AllocationAffinity) Reset() { *x = AllocationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationAffinity) String() string { @@ -2668,7 +2634,7 @@ func (*AllocationAffinity) ProtoMessage() {} func (x *AllocationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2736,11 +2702,9 @@ type Scheduling struct { func (x *Scheduling) Reset() { *x = Scheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling) String() string { @@ -2751,7 +2715,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2840,11 +2804,9 @@ type SchedulingDuration struct { func (x *SchedulingDuration) Reset() { *x = SchedulingDuration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulingDuration) String() string { @@ -2855,7 +2817,7 @@ func (*SchedulingDuration) ProtoMessage() {} func (x *SchedulingDuration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2898,11 +2860,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -2913,7 +2873,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2955,11 +2915,9 @@ type Tags struct { func (x *Tags) Reset() { *x = Tags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tags) String() string { @@ -2970,7 +2928,7 @@ func (*Tags) ProtoMessage() {} func (x *Tags) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3047,11 +3005,9 @@ type AttachedDisk struct { func (x *AttachedDisk) Reset() { *x = AttachedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedDisk) String() string { @@ -3062,7 +3018,7 @@ func (*AttachedDisk) ProtoMessage() {} func (x *AttachedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3209,11 +3165,9 @@ type GuestOsFeature struct { func (x *GuestOsFeature) Reset() { *x = GuestOsFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestOsFeature) String() string { @@ -3224,7 +3178,7 @@ func (*GuestOsFeature) ProtoMessage() {} func (x *GuestOsFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3263,11 +3217,9 @@ type Scheduling_NodeAffinity struct { func (x *Scheduling_NodeAffinity) Reset() { *x = Scheduling_NodeAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling_NodeAffinity) String() string { @@ -3278,7 +3230,7 @@ func (*Scheduling_NodeAffinity) ProtoMessage() {} func (x *Scheduling_NodeAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3330,11 +3282,9 @@ type AttachedDisk_InitializeParams struct { func (x *AttachedDisk_InitializeParams) Reset() { *x = AttachedDisk_InitializeParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedDisk_InitializeParams) String() string { @@ -3345,7 +3295,7 @@ func (*AttachedDisk_InitializeParams) ProtoMessage() {} func (x *AttachedDisk_InitializeParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4314,308 +4264,6 @@ func file_google_cloud_backupdr_v1_backupvault_gce_proto_init() { if File_google_cloud_backupdr_v1_backupvault_gce_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInstanceBackupProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInstanceRestoreProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInstanceTargetEnvironment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInstanceDataSourceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedMachineFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ConfidentialInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DisplayDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CustomerEncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPerformanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AliasIpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*InstanceParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AllocationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Scheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SchedulingDuration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Tags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AttachedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GuestOsFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Scheduling_NodeAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AttachedDisk_InitializeParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_backupdr_v1_backupvault_gce_proto_msgTypes[4].OneofWrappers = []any{} diff --git a/backupdr/apiv1/helpers.go b/backupdr/apiv1/helpers.go index 04d1c3f789fc..e213197a6635 100755 --- a/backupdr/apiv1/helpers.go +++ b/backupdr/apiv1/helpers.go @@ -18,10 +18,20 @@ package backupdr import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "backupdr.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/baremetalsolution/apiv2/bare_metal_solution_client.go b/baremetalsolution/apiv2/bare_metal_solution_client.go index cd598674788c..7b981e1654b1 100755 --- a/baremetalsolution/apiv2/bare_metal_solution_client.go +++ b/baremetalsolution/apiv2/bare_metal_solution_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -868,6 +867,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new bare metal solution client based on gRPC. @@ -901,6 +902,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: baremetalsolutionpb.NewBareMetalSolutionClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -964,6 +966,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new bare metal solution rest client. @@ -988,6 +992,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1061,7 +1066,7 @@ func (c *gRPCClient) ListInstances(ctx context.Context, req *baremetalsolutionpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -1096,7 +1101,7 @@ func (c *gRPCClient) GetInstance(ctx context.Context, req *baremetalsolutionpb.G var resp *baremetalsolutionpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1114,7 +1119,7 @@ func (c *gRPCClient) UpdateInstance(ctx context.Context, req *baremetalsolutionp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -1134,7 +1139,7 @@ func (c *gRPCClient) RenameInstance(ctx context.Context, req *baremetalsolutionp var resp *baremetalsolutionpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameInstance, req, settings.GRPC, c.logger, "RenameInstance") return err }, opts...) if err != nil { @@ -1152,7 +1157,7 @@ func (c *gRPCClient) ResetInstance(ctx context.Context, req *baremetalsolutionpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResetInstance, req, settings.GRPC, c.logger, "ResetInstance") return err }, opts...) if err != nil { @@ -1172,7 +1177,7 @@ func (c *gRPCClient) StartInstance(ctx context.Context, req *baremetalsolutionpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartInstance, req, settings.GRPC, c.logger, "StartInstance") return err }, opts...) if err != nil { @@ -1192,7 +1197,7 @@ func (c *gRPCClient) StopInstance(ctx context.Context, req *baremetalsolutionpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopInstance, req, settings.GRPC, c.logger, "StopInstance") return err }, opts...) if err != nil { @@ -1212,7 +1217,7 @@ func (c *gRPCClient) EnableInteractiveSerialConsole(ctx context.Context, req *ba var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EnableInteractiveSerialConsole(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EnableInteractiveSerialConsole, req, settings.GRPC, c.logger, "EnableInteractiveSerialConsole") return err }, opts...) if err != nil { @@ -1232,7 +1237,7 @@ func (c *gRPCClient) DisableInteractiveSerialConsole(ctx context.Context, req *b var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DisableInteractiveSerialConsole(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DisableInteractiveSerialConsole, req, settings.GRPC, c.logger, "DisableInteractiveSerialConsole") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) DetachLun(ctx context.Context, req *baremetalsolutionpb.Det var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DetachLun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DetachLun, req, settings.GRPC, c.logger, "DetachLun") return err }, opts...) if err != nil { @@ -1283,7 +1288,7 @@ func (c *gRPCClient) ListSSHKeys(ctx context.Context, req *baremetalsolutionpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSSHKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSSHKeys, req, settings.GRPC, c.logger, "ListSSHKeys") return err }, opts...) if err != nil { @@ -1318,7 +1323,7 @@ func (c *gRPCClient) CreateSSHKey(ctx context.Context, req *baremetalsolutionpb. var resp *baremetalsolutionpb.SSHKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSSHKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSSHKey, req, settings.GRPC, c.logger, "CreateSSHKey") return err }, opts...) if err != nil { @@ -1335,7 +1340,7 @@ func (c *gRPCClient) DeleteSSHKey(ctx context.Context, req *baremetalsolutionpb. opts = append((*c.CallOptions).DeleteSSHKey[0:len((*c.CallOptions).DeleteSSHKey):len((*c.CallOptions).DeleteSSHKey)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSSHKey(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSSHKey, req, settings.GRPC, c.logger, "DeleteSSHKey") return err }, opts...) return err @@ -1361,7 +1366,7 @@ func (c *gRPCClient) ListVolumes(ctx context.Context, req *baremetalsolutionpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVolumes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVolumes, req, settings.GRPC, c.logger, "ListVolumes") return err }, opts...) if err != nil { @@ -1396,7 +1401,7 @@ func (c *gRPCClient) GetVolume(ctx context.Context, req *baremetalsolutionpb.Get var resp *baremetalsolutionpb.Volume err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVolume, req, settings.GRPC, c.logger, "GetVolume") return err }, opts...) if err != nil { @@ -1414,7 +1419,7 @@ func (c *gRPCClient) UpdateVolume(ctx context.Context, req *baremetalsolutionpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateVolume, req, settings.GRPC, c.logger, "UpdateVolume") return err }, opts...) if err != nil { @@ -1434,7 +1439,7 @@ func (c *gRPCClient) RenameVolume(ctx context.Context, req *baremetalsolutionpb. var resp *baremetalsolutionpb.Volume err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameVolume, req, settings.GRPC, c.logger, "RenameVolume") return err }, opts...) if err != nil { @@ -1452,7 +1457,7 @@ func (c *gRPCClient) EvictVolume(ctx context.Context, req *baremetalsolutionpb.E var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EvictVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EvictVolume, req, settings.GRPC, c.logger, "EvictVolume") return err }, opts...) if err != nil { @@ -1472,7 +1477,7 @@ func (c *gRPCClient) ResizeVolume(ctx context.Context, req *baremetalsolutionpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResizeVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResizeVolume, req, settings.GRPC, c.logger, "ResizeVolume") return err }, opts...) if err != nil { @@ -1503,7 +1508,7 @@ func (c *gRPCClient) ListNetworks(ctx context.Context, req *baremetalsolutionpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNetworks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNetworks, req, settings.GRPC, c.logger, "ListNetworks") return err }, opts...) if err != nil { @@ -1538,7 +1543,7 @@ func (c *gRPCClient) ListNetworkUsage(ctx context.Context, req *baremetalsolutio var resp *baremetalsolutionpb.ListNetworkUsageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNetworkUsage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNetworkUsage, req, settings.GRPC, c.logger, "ListNetworkUsage") return err }, opts...) if err != nil { @@ -1556,7 +1561,7 @@ func (c *gRPCClient) GetNetwork(ctx context.Context, req *baremetalsolutionpb.Ge var resp *baremetalsolutionpb.Network err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNetwork, req, settings.GRPC, c.logger, "GetNetwork") return err }, opts...) if err != nil { @@ -1574,7 +1579,7 @@ func (c *gRPCClient) UpdateNetwork(ctx context.Context, req *baremetalsolutionpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNetwork, req, settings.GRPC, c.logger, "UpdateNetwork") return err }, opts...) if err != nil { @@ -1594,7 +1599,7 @@ func (c *gRPCClient) CreateVolumeSnapshot(ctx context.Context, req *baremetalsol var resp *baremetalsolutionpb.VolumeSnapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateVolumeSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateVolumeSnapshot, req, settings.GRPC, c.logger, "CreateVolumeSnapshot") return err }, opts...) if err != nil { @@ -1612,7 +1617,7 @@ func (c *gRPCClient) RestoreVolumeSnapshot(ctx context.Context, req *baremetalso var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestoreVolumeSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestoreVolumeSnapshot, req, settings.GRPC, c.logger, "RestoreVolumeSnapshot") return err }, opts...) if err != nil { @@ -1631,7 +1636,7 @@ func (c *gRPCClient) DeleteVolumeSnapshot(ctx context.Context, req *baremetalsol opts = append((*c.CallOptions).DeleteVolumeSnapshot[0:len((*c.CallOptions).DeleteVolumeSnapshot):len((*c.CallOptions).DeleteVolumeSnapshot)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteVolumeSnapshot(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteVolumeSnapshot, req, settings.GRPC, c.logger, "DeleteVolumeSnapshot") return err }, opts...) return err @@ -1646,7 +1651,7 @@ func (c *gRPCClient) GetVolumeSnapshot(ctx context.Context, req *baremetalsoluti var resp *baremetalsolutionpb.VolumeSnapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVolumeSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVolumeSnapshot, req, settings.GRPC, c.logger, "GetVolumeSnapshot") return err }, opts...) if err != nil { @@ -1675,7 +1680,7 @@ func (c *gRPCClient) ListVolumeSnapshots(ctx context.Context, req *baremetalsolu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVolumeSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVolumeSnapshots, req, settings.GRPC, c.logger, "ListVolumeSnapshots") return err }, opts...) if err != nil { @@ -1710,7 +1715,7 @@ func (c *gRPCClient) GetLun(ctx context.Context, req *baremetalsolutionpb.GetLun var resp *baremetalsolutionpb.Lun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLun, req, settings.GRPC, c.logger, "GetLun") return err }, opts...) if err != nil { @@ -1739,7 +1744,7 @@ func (c *gRPCClient) ListLuns(ctx context.Context, req *baremetalsolutionpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLuns, req, settings.GRPC, c.logger, "ListLuns") return err }, opts...) if err != nil { @@ -1774,7 +1779,7 @@ func (c *gRPCClient) EvictLun(ctx context.Context, req *baremetalsolutionpb.Evic var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EvictLun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EvictLun, req, settings.GRPC, c.logger, "EvictLun") return err }, opts...) if err != nil { @@ -1794,7 +1799,7 @@ func (c *gRPCClient) GetNfsShare(ctx context.Context, req *baremetalsolutionpb.G var resp *baremetalsolutionpb.NfsShare err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNfsShare(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNfsShare, req, settings.GRPC, c.logger, "GetNfsShare") return err }, opts...) if err != nil { @@ -1823,7 +1828,7 @@ func (c *gRPCClient) ListNfsShares(ctx context.Context, req *baremetalsolutionpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNfsShares(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNfsShares, req, settings.GRPC, c.logger, "ListNfsShares") return err }, opts...) if err != nil { @@ -1858,7 +1863,7 @@ func (c *gRPCClient) UpdateNfsShare(ctx context.Context, req *baremetalsolutionp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNfsShare(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNfsShare, req, settings.GRPC, c.logger, "UpdateNfsShare") return err }, opts...) if err != nil { @@ -1878,7 +1883,7 @@ func (c *gRPCClient) CreateNfsShare(ctx context.Context, req *baremetalsolutionp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNfsShare(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNfsShare, req, settings.GRPC, c.logger, "CreateNfsShare") return err }, opts...) if err != nil { @@ -1898,7 +1903,7 @@ func (c *gRPCClient) RenameNfsShare(ctx context.Context, req *baremetalsolutionp var resp *baremetalsolutionpb.NfsShare err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameNfsShare(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameNfsShare, req, settings.GRPC, c.logger, "RenameNfsShare") return err }, opts...) if err != nil { @@ -1916,7 +1921,7 @@ func (c *gRPCClient) DeleteNfsShare(ctx context.Context, req *baremetalsolutionp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNfsShare(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNfsShare, req, settings.GRPC, c.logger, "DeleteNfsShare") return err }, opts...) if err != nil { @@ -1947,7 +1952,7 @@ func (c *gRPCClient) ListProvisioningQuotas(ctx context.Context, req *baremetals } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListProvisioningQuotas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListProvisioningQuotas, req, settings.GRPC, c.logger, "ListProvisioningQuotas") return err }, opts...) if err != nil { @@ -1982,7 +1987,7 @@ func (c *gRPCClient) SubmitProvisioningConfig(ctx context.Context, req *baremeta var resp *baremetalsolutionpb.SubmitProvisioningConfigResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SubmitProvisioningConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SubmitProvisioningConfig, req, settings.GRPC, c.logger, "SubmitProvisioningConfig") return err }, opts...) if err != nil { @@ -2000,7 +2005,7 @@ func (c *gRPCClient) GetProvisioningConfig(ctx context.Context, req *baremetalso var resp *baremetalsolutionpb.ProvisioningConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProvisioningConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProvisioningConfig, req, settings.GRPC, c.logger, "GetProvisioningConfig") return err }, opts...) if err != nil { @@ -2018,7 +2023,7 @@ func (c *gRPCClient) CreateProvisioningConfig(ctx context.Context, req *baremeta var resp *baremetalsolutionpb.ProvisioningConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateProvisioningConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateProvisioningConfig, req, settings.GRPC, c.logger, "CreateProvisioningConfig") return err }, opts...) if err != nil { @@ -2036,7 +2041,7 @@ func (c *gRPCClient) UpdateProvisioningConfig(ctx context.Context, req *baremeta var resp *baremetalsolutionpb.ProvisioningConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateProvisioningConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateProvisioningConfig, req, settings.GRPC, c.logger, "UpdateProvisioningConfig") return err }, opts...) if err != nil { @@ -2054,7 +2059,7 @@ func (c *gRPCClient) RenameNetwork(ctx context.Context, req *baremetalsolutionpb var resp *baremetalsolutionpb.Network err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameNetwork, req, settings.GRPC, c.logger, "RenameNetwork") return err }, opts...) if err != nil { @@ -2083,7 +2088,7 @@ func (c *gRPCClient) ListOSImages(ctx context.Context, req *baremetalsolutionpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListOSImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListOSImages, req, settings.GRPC, c.logger, "ListOSImages") return err }, opts...) if err != nil { @@ -2118,7 +2123,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2147,7 +2152,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2221,21 +2226,10 @@ func (c *restClient) ListInstances(ctx context.Context, req *baremetalsolutionpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2298,17 +2292,7 @@ func (c *restClient) GetInstance(ctx context.Context, req *baremetalsolutionpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -2371,21 +2355,10 @@ func (c *restClient) UpdateInstance(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2443,17 +2416,7 @@ func (c *restClient) RenameInstance(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameInstance") if err != nil { return err } @@ -2509,21 +2472,10 @@ func (c *restClient) ResetInstance(ctx context.Context, req *baremetalsolutionpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2579,21 +2531,10 @@ func (c *restClient) StartInstance(ctx context.Context, req *baremetalsolutionpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2649,21 +2590,10 @@ func (c *restClient) StopInstance(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2719,21 +2649,10 @@ func (c *restClient) EnableInteractiveSerialConsole(ctx context.Context, req *ba httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableInteractiveSerialConsole") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2789,21 +2708,10 @@ func (c *restClient) DisableInteractiveSerialConsole(ctx context.Context, req *b httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableInteractiveSerialConsole") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2859,21 +2767,10 @@ func (c *restClient) DetachLun(ctx context.Context, req *baremetalsolutionpb.Det httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetachLun") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2937,21 +2834,10 @@ func (c *restClient) ListSSHKeys(ctx context.Context, req *baremetalsolutionpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSSHKeys") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3023,17 +2909,7 @@ func (c *restClient) CreateSSHKey(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSSHKey") if err != nil { return err } @@ -3080,15 +2956,8 @@ func (c *restClient) DeleteSSHKey(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSSHKey") + return err }, opts...) } @@ -3140,21 +3009,10 @@ func (c *restClient) ListVolumes(ctx context.Context, req *baremetalsolutionpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVolumes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3217,17 +3075,7 @@ func (c *restClient) GetVolume(ctx context.Context, req *baremetalsolutionpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVolume") if err != nil { return err } @@ -3290,21 +3138,10 @@ func (c *restClient) UpdateVolume(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVolume") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3362,17 +3199,7 @@ func (c *restClient) RenameVolume(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameVolume") if err != nil { return err } @@ -3428,21 +3255,10 @@ func (c *restClient) EvictVolume(ctx context.Context, req *baremetalsolutionpb.E httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EvictVolume") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3498,21 +3314,10 @@ func (c *restClient) ResizeVolume(ctx context.Context, req *baremetalsolutionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResizeVolume") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3578,21 +3383,10 @@ func (c *restClient) ListNetworks(ctx context.Context, req *baremetalsolutionpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3656,17 +3450,7 @@ func (c *restClient) ListNetworkUsage(ctx context.Context, req *baremetalsolutio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworkUsage") if err != nil { return err } @@ -3716,17 +3500,7 @@ func (c *restClient) GetNetwork(ctx context.Context, req *baremetalsolutionpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNetwork") if err != nil { return err } @@ -3789,21 +3563,10 @@ func (c *restClient) UpdateNetwork(ctx context.Context, req *baremetalsolutionpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNetwork") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3862,17 +3625,7 @@ func (c *restClient) CreateVolumeSnapshot(ctx context.Context, req *baremetalsol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVolumeSnapshot") if err != nil { return err } @@ -3928,21 +3681,10 @@ func (c *restClient) RestoreVolumeSnapshot(ctx context.Context, req *baremetalso httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreVolumeSnapshot") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3991,15 +3733,8 @@ func (c *restClient) DeleteVolumeSnapshot(ctx context.Context, req *baremetalsol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVolumeSnapshot") + return err }, opts...) } @@ -4037,17 +3772,7 @@ func (c *restClient) GetVolumeSnapshot(ctx context.Context, req *baremetalsoluti httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVolumeSnapshot") if err != nil { return err } @@ -4111,21 +3836,10 @@ func (c *restClient) ListVolumeSnapshots(ctx context.Context, req *baremetalsolu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVolumeSnapshots") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4188,17 +3902,7 @@ func (c *restClient) GetLun(ctx context.Context, req *baremetalsolutionpb.GetLun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLun") if err != nil { return err } @@ -4260,21 +3964,10 @@ func (c *restClient) ListLuns(ctx context.Context, req *baremetalsolutionpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLuns") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4343,21 +4036,10 @@ func (c *restClient) EvictLun(ctx context.Context, req *baremetalsolutionpb.Evic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EvictLun") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4408,17 +4090,7 @@ func (c *restClient) GetNfsShare(ctx context.Context, req *baremetalsolutionpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNfsShare") if err != nil { return err } @@ -4483,21 +4155,10 @@ func (c *restClient) ListNfsShares(ctx context.Context, req *baremetalsolutionpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNfsShares") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4573,21 +4234,10 @@ func (c *restClient) UpdateNfsShare(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNfsShare") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4644,21 +4294,10 @@ func (c *restClient) CreateNfsShare(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNfsShare") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4716,17 +4355,7 @@ func (c *restClient) RenameNfsShare(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameNfsShare") if err != nil { return err } @@ -4775,21 +4404,10 @@ func (c *restClient) DeleteNfsShare(ctx context.Context, req *baremetalsolutionp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNfsShare") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4852,21 +4470,10 @@ func (c *restClient) ListProvisioningQuotas(ctx context.Context, req *baremetals } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProvisioningQuotas") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4935,17 +4542,7 @@ func (c *restClient) SubmitProvisioningConfig(ctx context.Context, req *baremeta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitProvisioningConfig") if err != nil { return err } @@ -4995,17 +4592,7 @@ func (c *restClient) GetProvisioningConfig(ctx context.Context, req *baremetalso httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProvisioningConfig") if err != nil { return err } @@ -5065,17 +4652,7 @@ func (c *restClient) CreateProvisioningConfig(ctx context.Context, req *baremeta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProvisioningConfig") if err != nil { return err } @@ -5142,17 +4719,7 @@ func (c *restClient) UpdateProvisioningConfig(ctx context.Context, req *baremeta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProvisioningConfig") if err != nil { return err } @@ -5209,17 +4776,7 @@ func (c *restClient) RenameNetwork(ctx context.Context, req *baremetalsolutionpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameNetwork") if err != nil { return err } @@ -5281,21 +4838,10 @@ func (c *restClient) ListOSImages(ctx context.Context, req *baremetalsolutionpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSImages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5358,17 +4904,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -5433,21 +4969,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/baremetalsolution/apiv2/bare_metal_solution_client_example_go123_test.go b/baremetalsolution/apiv2/bare_metal_solution_client_example_go123_test.go index 71465dabb207..56c72f65ea8b 100644 --- a/baremetalsolution/apiv2/bare_metal_solution_client_example_go123_test.go +++ b/baremetalsolution/apiv2/bare_metal_solution_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListLuns_all() { } for resp, err := range c.ListLuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListNetworks_all() { } for resp, err := range c.ListNetworks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListNfsShares_all() { } for resp, err := range c.ListNfsShares(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListOSImages_all() { } for resp, err := range c.ListOSImages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListProvisioningQuotas_all() { } for resp, err := range c.ListProvisioningQuotas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListSSHKeys_all() { } for resp, err := range c.ListSSHKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListVolumeSnapshots_all() { } for resp, err := range c.ListVolumeSnapshots(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_ListVolumes_all() { } for resp, err := range c.ListVolumes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/baremetalsolution.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/baremetalsolution.pb.go index d079c71adefc..671c78793163 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/baremetalsolution.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/baremetalsolution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto @@ -71,11 +71,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -86,7 +84,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type ResetInstanceResponse struct { func (x *ResetInstanceResponse) Reset() { *x = ResetInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceResponse) String() string { @@ -174,7 +170,7 @@ func (*ResetInstanceResponse) ProtoMessage() {} func (x *ResetInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,32 +1075,6 @@ func file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_init() { file_google_cloud_baremetalsolution_v2_ssh_key_proto_init() file_google_cloud_baremetalsolution_v2_volume_proto_init() file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_baremetalsolution_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/common.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/common.pb.go index 8b4f9b3ac812..a55c6535bda1 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/common.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/common.proto diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/instance.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/instance.pb.go index 1746ca7bbe63..403efee9e368 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/instance.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/instance.proto @@ -232,11 +232,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -247,7 +245,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +405,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -422,7 +418,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +459,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -478,7 +472,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +531,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -552,7 +544,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +602,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -625,7 +615,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +659,9 @@ type RenameInstanceRequest struct { func (x *RenameInstanceRequest) Reset() { *x = RenameInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameInstanceRequest) String() string { @@ -684,7 +672,7 @@ func (*RenameInstanceRequest) ProtoMessage() {} func (x *RenameInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +713,9 @@ type ResetInstanceRequest struct { func (x *ResetInstanceRequest) Reset() { *x = ResetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceRequest) String() string { @@ -740,7 +726,7 @@ func (*ResetInstanceRequest) ProtoMessage() {} func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -774,11 +760,9 @@ type StartInstanceRequest struct { func (x *StartInstanceRequest) Reset() { *x = StartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceRequest) String() string { @@ -789,7 +773,7 @@ func (*StartInstanceRequest) ProtoMessage() {} func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +804,9 @@ type StartInstanceResponse struct { func (x *StartInstanceResponse) Reset() { *x = StartInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceResponse) String() string { @@ -835,7 +817,7 @@ func (*StartInstanceResponse) ProtoMessage() {} func (x *StartInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +844,9 @@ type StopInstanceRequest struct { func (x *StopInstanceRequest) Reset() { *x = StopInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceRequest) String() string { @@ -877,7 +857,7 @@ func (*StopInstanceRequest) ProtoMessage() {} func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +888,9 @@ type StopInstanceResponse struct { func (x *StopInstanceResponse) Reset() { *x = StopInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceResponse) String() string { @@ -923,7 +901,7 @@ func (*StopInstanceResponse) ProtoMessage() {} func (x *StopInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +928,9 @@ type EnableInteractiveSerialConsoleRequest struct { func (x *EnableInteractiveSerialConsoleRequest) Reset() { *x = EnableInteractiveSerialConsoleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableInteractiveSerialConsoleRequest) String() string { @@ -965,7 +941,7 @@ func (*EnableInteractiveSerialConsoleRequest) ProtoMessage() {} func (x *EnableInteractiveSerialConsoleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +972,9 @@ type EnableInteractiveSerialConsoleResponse struct { func (x *EnableInteractiveSerialConsoleResponse) Reset() { *x = EnableInteractiveSerialConsoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableInteractiveSerialConsoleResponse) String() string { @@ -1011,7 +985,7 @@ func (*EnableInteractiveSerialConsoleResponse) ProtoMessage() {} func (x *EnableInteractiveSerialConsoleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1012,9 @@ type DisableInteractiveSerialConsoleRequest struct { func (x *DisableInteractiveSerialConsoleRequest) Reset() { *x = DisableInteractiveSerialConsoleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableInteractiveSerialConsoleRequest) String() string { @@ -1053,7 +1025,7 @@ func (*DisableInteractiveSerialConsoleRequest) ProtoMessage() {} func (x *DisableInteractiveSerialConsoleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1056,9 @@ type DisableInteractiveSerialConsoleResponse struct { func (x *DisableInteractiveSerialConsoleResponse) Reset() { *x = DisableInteractiveSerialConsoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableInteractiveSerialConsoleResponse) String() string { @@ -1099,7 +1069,7 @@ func (*DisableInteractiveSerialConsoleResponse) ProtoMessage() {} func (x *DisableInteractiveSerialConsoleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1130,11 +1100,9 @@ type DetachLunRequest struct { func (x *DetachLunRequest) Reset() { *x = DetachLunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachLunRequest) String() string { @@ -1145,7 +1113,7 @@ func (*DetachLunRequest) ProtoMessage() {} func (x *DetachLunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1169,9 @@ type ServerNetworkTemplate struct { func (x *ServerNetworkTemplate) Reset() { *x = ServerNetworkTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerNetworkTemplate) String() string { @@ -1216,7 +1182,7 @@ func (*ServerNetworkTemplate) ProtoMessage() {} func (x *ServerNetworkTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,11 +1238,9 @@ type ServerNetworkTemplate_LogicalInterface struct { func (x *ServerNetworkTemplate_LogicalInterface) Reset() { *x = ServerNetworkTemplate_LogicalInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerNetworkTemplate_LogicalInterface) String() string { @@ -1287,7 +1251,7 @@ func (*ServerNetworkTemplate_LogicalInterface) ProtoMessage() {} func (x *ServerNetworkTemplate_LogicalInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1676,224 +1640,6 @@ func file_google_cloud_baremetalsolution_v2_instance_proto_init() { file_google_cloud_baremetalsolution_v2_lun_proto_init() file_google_cloud_baremetalsolution_v2_network_proto_init() file_google_cloud_baremetalsolution_v2_volume_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RenameInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EnableInteractiveSerialConsoleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*EnableInteractiveSerialConsoleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DisableInteractiveSerialConsoleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DisableInteractiveSerialConsoleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DetachLunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ServerNetworkTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_instance_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ServerNetworkTemplate_LogicalInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/lun.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/lun.pb.go index bd64aaba2988..bee290008f98 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/lun.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/lun.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/lun.proto @@ -240,11 +240,9 @@ type Lun struct { func (x *Lun) Reset() { *x = Lun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lun) String() string { @@ -255,7 +253,7 @@ func (*Lun) ProtoMessage() {} func (x *Lun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +364,9 @@ type GetLunRequest struct { func (x *GetLunRequest) Reset() { *x = GetLunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLunRequest) String() string { @@ -381,7 +377,7 @@ func (*GetLunRequest) ProtoMessage() {} func (x *GetLunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,11 +416,9 @@ type ListLunsRequest struct { func (x *ListLunsRequest) Reset() { *x = ListLunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLunsRequest) String() string { @@ -435,7 +429,7 @@ func (*ListLunsRequest) ProtoMessage() {} func (x *ListLunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +481,9 @@ type ListLunsResponse struct { func (x *ListLunsResponse) Reset() { *x = ListLunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLunsResponse) String() string { @@ -502,7 +494,7 @@ func (*ListLunsResponse) ProtoMessage() {} func (x *ListLunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +542,9 @@ type EvictLunRequest struct { func (x *EvictLunRequest) Reset() { *x = EvictLunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvictLunRequest) String() string { @@ -565,7 +555,7 @@ func (*EvictLunRequest) ProtoMessage() {} func (x *EvictLunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,68 +744,6 @@ func file_google_cloud_baremetalsolution_v2_lun_proto_init() { if File_google_cloud_baremetalsolution_v2_lun_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Lun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetLunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListLunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListLunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_lun_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EvictLunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/network.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/network.pb.go index d36213b21a95..0e84b8a80864 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/network.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/network.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/network.proto @@ -252,11 +252,9 @@ type Network struct { func (x *Network) Reset() { *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Network) String() string { @@ -267,7 +265,7 @@ func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +412,9 @@ type NetworkAddressReservation struct { func (x *NetworkAddressReservation) Reset() { *x = NetworkAddressReservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAddressReservation) String() string { @@ -429,7 +425,7 @@ func (*NetworkAddressReservation) ProtoMessage() {} func (x *NetworkAddressReservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +482,9 @@ type VRF struct { func (x *VRF) Reset() { *x = VRF{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VRF) String() string { @@ -501,7 +495,7 @@ func (*VRF) ProtoMessage() {} func (x *VRF) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +561,9 @@ type LogicalInterface struct { func (x *LogicalInterface) Reset() { *x = LogicalInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogicalInterface) String() string { @@ -582,7 +574,7 @@ func (*LogicalInterface) ProtoMessage() {} func (x *LogicalInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +623,9 @@ type GetNetworkRequest struct { func (x *GetNetworkRequest) Reset() { *x = GetNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkRequest) String() string { @@ -646,7 +636,7 @@ func (*GetNetworkRequest) ProtoMessage() {} func (x *GetNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +677,9 @@ type ListNetworksRequest struct { func (x *ListNetworksRequest) Reset() { *x = ListNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworksRequest) String() string { @@ -702,7 +690,7 @@ func (*ListNetworksRequest) ProtoMessage() {} func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +749,9 @@ type ListNetworksResponse struct { func (x *ListNetworksResponse) Reset() { *x = ListNetworksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworksResponse) String() string { @@ -776,7 +762,7 @@ func (*ListNetworksResponse) ProtoMessage() {} func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +818,9 @@ type UpdateNetworkRequest struct { func (x *UpdateNetworkRequest) Reset() { *x = UpdateNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNetworkRequest) String() string { @@ -847,7 +831,7 @@ func (*UpdateNetworkRequest) ProtoMessage() {} func (x *UpdateNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +874,9 @@ type NetworkUsage struct { func (x *NetworkUsage) Reset() { *x = NetworkUsage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkUsage) String() string { @@ -905,7 +887,7 @@ func (*NetworkUsage) ProtoMessage() {} func (x *NetworkUsage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +928,9 @@ type ListNetworkUsageRequest struct { func (x *ListNetworkUsageRequest) Reset() { *x = ListNetworkUsageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkUsageRequest) String() string { @@ -961,7 +941,7 @@ func (*ListNetworkUsageRequest) ProtoMessage() {} func (x *ListNetworkUsageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +975,9 @@ type ListNetworkUsageResponse struct { func (x *ListNetworkUsageResponse) Reset() { *x = ListNetworkUsageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkUsageResponse) String() string { @@ -1010,7 +988,7 @@ func (*ListNetworkUsageResponse) ProtoMessage() {} func (x *ListNetworkUsageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,11 +1028,9 @@ type NetworkMountPoint struct { func (x *NetworkMountPoint) Reset() { *x = NetworkMountPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkMountPoint) String() string { @@ -1065,7 +1041,7 @@ func (*NetworkMountPoint) ProtoMessage() {} func (x *NetworkMountPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1099,9 @@ type RenameNetworkRequest struct { func (x *RenameNetworkRequest) Reset() { *x = RenameNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameNetworkRequest) String() string { @@ -1138,7 +1112,7 @@ func (*RenameNetworkRequest) ProtoMessage() {} func (x *RenameNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1153,9 @@ type VRF_QosPolicy struct { func (x *VRF_QosPolicy) Reset() { *x = VRF_QosPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VRF_QosPolicy) String() string { @@ -1194,7 +1166,7 @@ func (*VRF_QosPolicy) ProtoMessage() {} func (x *VRF_QosPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1214,9 @@ type VRF_VlanAttachment struct { func (x *VRF_VlanAttachment) Reset() { *x = VRF_VlanAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VRF_VlanAttachment) String() string { @@ -1257,7 +1227,7 @@ func (*VRF_VlanAttachment) ProtoMessage() {} func (x *VRF_VlanAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1312,9 @@ type LogicalInterface_LogicalNetworkInterface struct { func (x *LogicalInterface_LogicalNetworkInterface) Reset() { *x = LogicalInterface_LogicalNetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogicalInterface_LogicalNetworkInterface) String() string { @@ -1357,7 +1325,7 @@ func (*LogicalInterface_LogicalNetworkInterface) ProtoMessage() {} func (x *LogicalInterface_LogicalNetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1746,200 +1714,6 @@ func file_google_cloud_baremetalsolution_v2_network_proto_init() { if File_google_cloud_baremetalsolution_v2_network_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAddressReservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VRF); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LogicalInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NetworkUsage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkUsageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkUsageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NetworkMountPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RenameNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*VRF_QosPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*VRF_VlanAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_network_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LogicalInterface_LogicalNetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/nfs_share.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/nfs_share.pb.go index 22c76e2088e8..15b33f1ab836 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/nfs_share.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/nfs_share.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/nfs_share.proto @@ -235,11 +235,9 @@ type NfsShare struct { func (x *NfsShare) Reset() { *x = NfsShare{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsShare) String() string { @@ -250,7 +248,7 @@ func (*NfsShare) ProtoMessage() {} func (x *NfsShare) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +338,9 @@ type GetNfsShareRequest struct { func (x *GetNfsShareRequest) Reset() { *x = GetNfsShareRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNfsShareRequest) String() string { @@ -355,7 +351,7 @@ func (*GetNfsShareRequest) ProtoMessage() {} func (x *GetNfsShareRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +392,9 @@ type ListNfsSharesRequest struct { func (x *ListNfsSharesRequest) Reset() { *x = ListNfsSharesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNfsSharesRequest) String() string { @@ -411,7 +405,7 @@ func (*ListNfsSharesRequest) ProtoMessage() {} func (x *ListNfsSharesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +464,9 @@ type ListNfsSharesResponse struct { func (x *ListNfsSharesResponse) Reset() { *x = ListNfsSharesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNfsSharesResponse) String() string { @@ -485,7 +477,7 @@ func (*ListNfsSharesResponse) ProtoMessage() {} func (x *ListNfsSharesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,11 +534,9 @@ type UpdateNfsShareRequest struct { func (x *UpdateNfsShareRequest) Reset() { *x = UpdateNfsShareRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNfsShareRequest) String() string { @@ -557,7 +547,7 @@ func (*UpdateNfsShareRequest) ProtoMessage() {} func (x *UpdateNfsShareRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,11 +591,9 @@ type RenameNfsShareRequest struct { func (x *RenameNfsShareRequest) Reset() { *x = RenameNfsShareRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameNfsShareRequest) String() string { @@ -616,7 +604,7 @@ func (*RenameNfsShareRequest) ProtoMessage() {} func (x *RenameNfsShareRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +647,9 @@ type CreateNfsShareRequest struct { func (x *CreateNfsShareRequest) Reset() { *x = CreateNfsShareRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNfsShareRequest) String() string { @@ -674,7 +660,7 @@ func (*CreateNfsShareRequest) ProtoMessage() {} func (x *CreateNfsShareRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +701,9 @@ type DeleteNfsShareRequest struct { func (x *DeleteNfsShareRequest) Reset() { *x = DeleteNfsShareRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNfsShareRequest) String() string { @@ -730,7 +714,7 @@ func (*DeleteNfsShareRequest) ProtoMessage() {} func (x *DeleteNfsShareRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +767,9 @@ type NfsShare_AllowedClient struct { func (x *NfsShare_AllowedClient) Reset() { *x = NfsShare_AllowedClient{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsShare_AllowedClient) String() string { @@ -798,7 +780,7 @@ func (*NfsShare_AllowedClient) ProtoMessage() {} func (x *NfsShare_AllowedClient) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,116 +1087,6 @@ func file_google_cloud_baremetalsolution_v2_nfs_share_proto_init() { if File_google_cloud_baremetalsolution_v2_nfs_share_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NfsShare); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetNfsShareRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListNfsSharesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListNfsSharesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNfsShareRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RenameNfsShareRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateNfsShareRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNfsShareRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_nfs_share_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NfsShare_AllowedClient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/osimage.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/osimage.pb.go index f5f9e4e7505d..3aa2b6d90813 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/osimage.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/osimage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/osimage.proto @@ -58,11 +58,9 @@ type OSImage struct { func (x *OSImage) Reset() { *x = OSImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSImage) String() string { @@ -73,7 +71,7 @@ func (*OSImage) ProtoMessage() {} func (x *OSImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type ListOSImagesRequest struct { func (x *ListOSImagesRequest) Reset() { *x = ListOSImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSImagesRequest) String() string { @@ -157,7 +153,7 @@ func (*ListOSImagesRequest) ProtoMessage() {} func (x *ListOSImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +204,9 @@ type ListOSImagesResponse struct { func (x *ListOSImagesResponse) Reset() { *x = ListOSImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSImagesResponse) String() string { @@ -223,7 +217,7 @@ func (*ListOSImagesResponse) ProtoMessage() {} func (x *ListOSImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,44 +348,6 @@ func file_google_cloud_baremetalsolution_v2_osimage_proto_init() { if File_google_cloud_baremetalsolution_v2_osimage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListOSImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_osimage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOSImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/provisioning.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/provisioning.pb.go index e43b09b9010b..fee024cef7ea 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/provisioning.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/provisioning.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/provisioning.proto @@ -603,11 +603,9 @@ type ProvisioningConfig struct { func (x *ProvisioningConfig) Reset() { *x = ProvisioningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisioningConfig) String() string { @@ -618,7 +616,7 @@ func (*ProvisioningConfig) ProtoMessage() {} func (x *ProvisioningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +748,9 @@ type SubmitProvisioningConfigRequest struct { func (x *SubmitProvisioningConfigRequest) Reset() { *x = SubmitProvisioningConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitProvisioningConfigRequest) String() string { @@ -765,7 +761,7 @@ func (*SubmitProvisioningConfigRequest) ProtoMessage() {} func (x *SubmitProvisioningConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +809,9 @@ type SubmitProvisioningConfigResponse struct { func (x *SubmitProvisioningConfigResponse) Reset() { *x = SubmitProvisioningConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitProvisioningConfigResponse) String() string { @@ -828,7 +822,7 @@ func (*SubmitProvisioningConfigResponse) ProtoMessage() {} func (x *SubmitProvisioningConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +878,9 @@ type ProvisioningQuota struct { func (x *ProvisioningQuota) Reset() { *x = ProvisioningQuota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisioningQuota) String() string { @@ -899,7 +891,7 @@ func (*ProvisioningQuota) ProtoMessage() {} func (x *ProvisioningQuota) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,11 +1038,9 @@ type ListProvisioningQuotasRequest struct { func (x *ListProvisioningQuotasRequest) Reset() { *x = ListProvisioningQuotasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProvisioningQuotasRequest) String() string { @@ -1061,7 +1051,7 @@ func (*ListProvisioningQuotasRequest) ProtoMessage() {} func (x *ListProvisioningQuotasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1112,11 +1102,9 @@ type ListProvisioningQuotasResponse struct { func (x *ListProvisioningQuotasResponse) Reset() { *x = ListProvisioningQuotasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProvisioningQuotasResponse) String() string { @@ -1127,7 +1115,7 @@ func (*ListProvisioningQuotasResponse) ProtoMessage() {} func (x *ListProvisioningQuotasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1194,9 @@ type InstanceConfig struct { func (x *InstanceConfig) Reset() { *x = InstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConfig) String() string { @@ -1221,7 +1207,7 @@ func (*InstanceConfig) ProtoMessage() {} func (x *InstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,11 +1354,9 @@ type VolumeConfig struct { func (x *VolumeConfig) Reset() { *x = VolumeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeConfig) String() string { @@ -1383,7 +1367,7 @@ func (*VolumeConfig) ProtoMessage() {} func (x *VolumeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1502,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -1533,7 +1515,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1649,11 +1631,9 @@ type InstanceQuota struct { func (x *InstanceQuota) Reset() { *x = InstanceQuota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceQuota) String() string { @@ -1664,7 +1644,7 @@ func (*InstanceQuota) ProtoMessage() {} func (x *InstanceQuota) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1727,11 +1707,9 @@ type GetProvisioningConfigRequest struct { func (x *GetProvisioningConfigRequest) Reset() { *x = GetProvisioningConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProvisioningConfigRequest) String() string { @@ -1742,7 +1720,7 @@ func (*GetProvisioningConfigRequest) ProtoMessage() {} func (x *GetProvisioningConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1782,11 +1760,9 @@ type CreateProvisioningConfigRequest struct { func (x *CreateProvisioningConfigRequest) Reset() { *x = CreateProvisioningConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProvisioningConfigRequest) String() string { @@ -1797,7 +1773,7 @@ func (*CreateProvisioningConfigRequest) ProtoMessage() {} func (x *CreateProvisioningConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1826,9 @@ type UpdateProvisioningConfigRequest struct { func (x *UpdateProvisioningConfigRequest) Reset() { *x = UpdateProvisioningConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProvisioningConfigRequest) String() string { @@ -1865,7 +1839,7 @@ func (*UpdateProvisioningConfigRequest) ProtoMessage() {} func (x *UpdateProvisioningConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1917,11 +1891,9 @@ type InstanceConfig_NetworkAddress struct { func (x *InstanceConfig_NetworkAddress) Reset() { *x = InstanceConfig_NetworkAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConfig_NetworkAddress) String() string { @@ -1932,7 +1904,7 @@ func (*InstanceConfig_NetworkAddress) ProtoMessage() {} func (x *InstanceConfig_NetworkAddress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1954,9 @@ type VolumeConfig_LunRange struct { func (x *VolumeConfig_LunRange) Reset() { *x = VolumeConfig_LunRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeConfig_LunRange) String() string { @@ -1997,7 +1967,7 @@ func (*VolumeConfig_LunRange) ProtoMessage() {} func (x *VolumeConfig_LunRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2055,11 +2025,9 @@ type VolumeConfig_NfsExport struct { func (x *VolumeConfig_NfsExport) Reset() { *x = VolumeConfig_NfsExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeConfig_NfsExport) String() string { @@ -2070,7 +2038,7 @@ func (*VolumeConfig_NfsExport) ProtoMessage() {} func (x *VolumeConfig_NfsExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2174,11 +2142,9 @@ type NetworkConfig_IntakeVlanAttachment struct { func (x *NetworkConfig_IntakeVlanAttachment) Reset() { *x = NetworkConfig_IntakeVlanAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig_IntakeVlanAttachment) String() string { @@ -2189,7 +2155,7 @@ func (*NetworkConfig_IntakeVlanAttachment) ProtoMessage() {} func (x *NetworkConfig_IntakeVlanAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2779,212 +2745,6 @@ func file_google_cloud_baremetalsolution_v2_provisioning_proto_init() { } file_google_cloud_baremetalsolution_v2_common_proto_init() file_google_cloud_baremetalsolution_v2_network_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProvisioningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SubmitProvisioningConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SubmitProvisioningConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProvisioningQuota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListProvisioningQuotasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProvisioningQuotasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VolumeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*InstanceQuota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetProvisioningConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateProvisioningConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProvisioningConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConfig_NetworkAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*VolumeConfig_LunRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*VolumeConfig_NfsExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig_IntakeVlanAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_baremetalsolution_v2_provisioning_proto_msgTypes[3].OneofWrappers = []any{ (*ProvisioningQuota_InstanceQuota)(nil), (*ProvisioningQuota_ServerCount)(nil), diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/ssh_key.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/ssh_key.pb.go index 13e96d89530c..2a3044b24a5a 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/ssh_key.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/ssh_key.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/ssh_key.proto @@ -51,11 +51,9 @@ type SSHKey struct { func (x *SSHKey) Reset() { *x = SSHKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SSHKey) String() string { @@ -66,7 +64,7 @@ func (*SSHKey) ProtoMessage() {} func (x *SSHKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type ListSSHKeysRequest struct { func (x *ListSSHKeysRequest) Reset() { *x = ListSSHKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSSHKeysRequest) String() string { @@ -127,7 +123,7 @@ func (*ListSSHKeysRequest) ProtoMessage() {} func (x *ListSSHKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type ListSSHKeysResponse struct { func (x *ListSSHKeysResponse) Reset() { *x = ListSSHKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSSHKeysResponse) String() string { @@ -193,7 +187,7 @@ func (*ListSSHKeysResponse) ProtoMessage() {} func (x *ListSSHKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +237,9 @@ type CreateSSHKeyRequest struct { func (x *CreateSSHKeyRequest) Reset() { *x = CreateSSHKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSSHKeyRequest) String() string { @@ -258,7 +250,7 @@ func (*CreateSSHKeyRequest) ProtoMessage() {} func (x *CreateSSHKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,11 +299,9 @@ type DeleteSSHKeyRequest struct { func (x *DeleteSSHKeyRequest) Reset() { *x = DeleteSSHKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSSHKeyRequest) String() string { @@ -322,7 +312,7 @@ func (*DeleteSSHKeyRequest) ProtoMessage() {} func (x *DeleteSSHKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,68 +446,6 @@ func file_google_cloud_baremetalsolution_v2_ssh_key_proto_init() { if File_google_cloud_baremetalsolution_v2_ssh_key_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SSHKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSSHKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSSHKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSSHKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_ssh_key_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSSHKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/volume.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/volume.pb.go index a02f3ee178e7..65066b1700ef 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/volume.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/volume.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/volume.proto @@ -397,11 +397,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -412,7 +410,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +605,9 @@ type GetVolumeRequest struct { func (x *GetVolumeRequest) Reset() { *x = GetVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVolumeRequest) String() string { @@ -622,7 +618,7 @@ func (*GetVolumeRequest) ProtoMessage() {} func (x *GetVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +659,9 @@ type ListVolumesRequest struct { func (x *ListVolumesRequest) Reset() { *x = ListVolumesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumesRequest) String() string { @@ -678,7 +672,7 @@ func (*ListVolumesRequest) ProtoMessage() {} func (x *ListVolumesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +731,9 @@ type ListVolumesResponse struct { func (x *ListVolumesResponse) Reset() { *x = ListVolumesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumesResponse) String() string { @@ -752,7 +744,7 @@ func (*ListVolumesResponse) ProtoMessage() {} func (x *ListVolumesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +800,9 @@ type UpdateVolumeRequest struct { func (x *UpdateVolumeRequest) Reset() { *x = UpdateVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVolumeRequest) String() string { @@ -823,7 +813,7 @@ func (*UpdateVolumeRequest) ProtoMessage() {} func (x *UpdateVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +857,9 @@ type RenameVolumeRequest struct { func (x *RenameVolumeRequest) Reset() { *x = RenameVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameVolumeRequest) String() string { @@ -882,7 +870,7 @@ func (*RenameVolumeRequest) ProtoMessage() {} func (x *RenameVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +911,9 @@ type EvictVolumeRequest struct { func (x *EvictVolumeRequest) Reset() { *x = EvictVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvictVolumeRequest) String() string { @@ -938,7 +924,7 @@ func (*EvictVolumeRequest) ProtoMessage() {} func (x *EvictVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +960,9 @@ type ResizeVolumeRequest struct { func (x *ResizeVolumeRequest) Reset() { *x = ResizeVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeVolumeRequest) String() string { @@ -989,7 +973,7 @@ func (*ResizeVolumeRequest) ProtoMessage() {} func (x *ResizeVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1028,9 @@ type Volume_SnapshotReservationDetail struct { func (x *Volume_SnapshotReservationDetail) Reset() { *x = Volume_SnapshotReservationDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume_SnapshotReservationDetail) String() string { @@ -1059,7 +1041,7 @@ func (*Volume_SnapshotReservationDetail) ProtoMessage() {} func (x *Volume_SnapshotReservationDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,116 +1387,6 @@ func file_google_cloud_baremetalsolution_v2_volume_proto_init() { return } file_google_cloud_baremetalsolution_v2_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RenameVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EvictVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResizeVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Volume_SnapshotReservationDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/baremetalsolutionpb/volume_snapshot.pb.go b/baremetalsolution/apiv2/baremetalsolutionpb/volume_snapshot.pb.go index ef607bdfa131..20a1bba9f9ed 100755 --- a/baremetalsolution/apiv2/baremetalsolutionpb/volume_snapshot.pb.go +++ b/baremetalsolution/apiv2/baremetalsolutionpb/volume_snapshot.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/baremetalsolution/v2/volume_snapshot.proto @@ -113,11 +113,9 @@ type VolumeSnapshot struct { func (x *VolumeSnapshot) Reset() { *x = VolumeSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeSnapshot) String() string { @@ -128,7 +126,7 @@ func (*VolumeSnapshot) ProtoMessage() {} func (x *VolumeSnapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +195,9 @@ type GetVolumeSnapshotRequest struct { func (x *GetVolumeSnapshotRequest) Reset() { *x = GetVolumeSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVolumeSnapshotRequest) String() string { @@ -212,7 +208,7 @@ func (*GetVolumeSnapshotRequest) ProtoMessage() {} func (x *GetVolumeSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +247,9 @@ type ListVolumeSnapshotsRequest struct { func (x *ListVolumeSnapshotsRequest) Reset() { *x = ListVolumeSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeSnapshotsRequest) String() string { @@ -266,7 +260,7 @@ func (*ListVolumeSnapshotsRequest) ProtoMessage() {} func (x *ListVolumeSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type ListVolumeSnapshotsResponse struct { func (x *ListVolumeSnapshotsResponse) Reset() { *x = ListVolumeSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeSnapshotsResponse) String() string { @@ -333,7 +325,7 @@ func (*ListVolumeSnapshotsResponse) ProtoMessage() {} func (x *ListVolumeSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +373,9 @@ type DeleteVolumeSnapshotRequest struct { func (x *DeleteVolumeSnapshotRequest) Reset() { *x = DeleteVolumeSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVolumeSnapshotRequest) String() string { @@ -396,7 +386,7 @@ func (*DeleteVolumeSnapshotRequest) ProtoMessage() {} func (x *DeleteVolumeSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type CreateVolumeSnapshotRequest struct { func (x *CreateVolumeSnapshotRequest) Reset() { *x = CreateVolumeSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVolumeSnapshotRequest) String() string { @@ -447,7 +435,7 @@ func (*CreateVolumeSnapshotRequest) ProtoMessage() {} func (x *CreateVolumeSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +477,9 @@ type RestoreVolumeSnapshotRequest struct { func (x *RestoreVolumeSnapshotRequest) Reset() { *x = RestoreVolumeSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreVolumeSnapshotRequest) String() string { @@ -504,7 +490,7 @@ func (*RestoreVolumeSnapshotRequest) ProtoMessage() {} func (x *RestoreVolumeSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,92 +679,6 @@ func file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_init() { if File_google_cloud_baremetalsolution_v2_volume_snapshot_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VolumeSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVolumeSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVolumeSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateVolumeSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_baremetalsolution_v2_volume_snapshot_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RestoreVolumeSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/baremetalsolution/apiv2/helpers.go b/baremetalsolution/apiv2/helpers.go index 2e8c5fcc76f1..d07ce9f4ff38 100755 --- a/baremetalsolution/apiv2/helpers.go +++ b/baremetalsolution/apiv2/helpers.go @@ -18,10 +18,20 @@ package baremetalsolution import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "baremetalsolution.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/batch/apiv1/batch_client.go b/batch/apiv1/batch_client.go index 3401daba05f8..67bc12e14fe9 100755 --- a/batch/apiv1/batch_client.go +++ b/batch/apiv1/batch_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -355,6 +354,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new batch service client based on gRPC. @@ -383,6 +384,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: batchpb.NewBatchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -447,6 +449,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new batch service rest client. @@ -466,6 +470,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -528,7 +533,7 @@ func (c *gRPCClient) CreateJob(ctx context.Context, req *batchpb.CreateJobReques var resp *batchpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -546,7 +551,7 @@ func (c *gRPCClient) GetJob(ctx context.Context, req *batchpb.GetJobRequest, opt var resp *batchpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) DeleteJob(ctx context.Context, req *batchpb.DeleteJobReques var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *gRPCClient) ListJobs(ctx context.Context, req *batchpb.ListJobsRequest, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -630,7 +635,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *batchpb.GetTaskRequest, o var resp *batchpb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -659,7 +664,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *batchpb.ListTasksReques } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -694,7 +699,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -757,7 +762,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -771,7 +776,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -786,7 +791,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -815,7 +820,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -887,17 +892,7 @@ func (c *restClient) CreateJob(ctx context.Context, req *batchpb.CreateJobReques httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -947,17 +942,7 @@ func (c *restClient) GetJob(ctx context.Context, req *batchpb.GetJobRequest, opt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -1012,21 +997,10 @@ func (c *restClient) DeleteJob(ctx context.Context, req *batchpb.DeleteJobReques httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1095,21 +1069,10 @@ func (c *restClient) ListJobs(ctx context.Context, req *batchpb.ListJobsRequest, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1172,17 +1135,7 @@ func (c *restClient) GetTask(ctx context.Context, req *batchpb.GetTaskRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -1247,21 +1200,10 @@ func (c *restClient) ListTasks(ctx context.Context, req *batchpb.ListTasksReques } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1324,17 +1266,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1399,21 +1331,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1479,15 +1400,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1521,15 +1435,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1566,17 +1473,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1641,21 +1538,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/batch/apiv1/batch_client_example_go123_test.go b/batch/apiv1/batch_client_example_go123_test.go index 53d923c948de..f2abfa7049a6 100644 --- a/batch/apiv1/batch_client_example_go123_test.go +++ b/batch/apiv1/batch_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/batch/apiv1/batchpb/batch.pb.go b/batch/apiv1/batchpb/batch.pb.go index 5a51dbf5055a..20206a1af555 100755 --- a/batch/apiv1/batchpb/batch.pb.go +++ b/batch/apiv1/batchpb/batch.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/batch/v1/batch.proto @@ -82,11 +82,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -97,7 +95,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -167,7 +163,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -232,7 +226,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +283,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -304,7 +296,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -385,7 +375,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +433,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -458,7 +446,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +505,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -532,7 +518,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +566,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -595,7 +579,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +629,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -660,7 +642,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_batch_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -979,116 +961,6 @@ func file_google_cloud_batch_v1_batch_proto_init() { } file_google_cloud_batch_v1_job_proto_init() file_google_cloud_batch_v1_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_batch_v1_batch_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_batch_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/batch/apiv1/batchpb/job.pb.go b/batch/apiv1/batchpb/job.pb.go index fd1e7fc33ddc..dada69b386c6 100755 --- a/batch/apiv1/batchpb/job.pb.go +++ b/batch/apiv1/batchpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/batch/v1/job.proto @@ -384,11 +384,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -399,7 +397,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +516,9 @@ type LogsPolicy struct { func (x *LogsPolicy) Reset() { *x = LogsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogsPolicy) String() string { @@ -533,7 +529,7 @@ func (*LogsPolicy) ProtoMessage() {} func (x *LogsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +584,9 @@ type JobStatus struct { func (x *JobStatus) Reset() { *x = JobStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobStatus) String() string { @@ -603,7 +597,7 @@ func (*JobStatus) ProtoMessage() {} func (x *JobStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +667,9 @@ type JobNotification struct { func (x *JobNotification) Reset() { *x = JobNotification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobNotification) String() string { @@ -688,7 +680,7 @@ func (*JobNotification) ProtoMessage() {} func (x *JobNotification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +763,9 @@ type AllocationPolicy struct { func (x *AllocationPolicy) Reset() { *x = AllocationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy) String() string { @@ -786,7 +776,7 @@ func (*AllocationPolicy) ProtoMessage() {} func (x *AllocationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,11 +895,9 @@ type TaskGroup struct { func (x *TaskGroup) Reset() { *x = TaskGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskGroup) String() string { @@ -920,7 +908,7 @@ func (*TaskGroup) ProtoMessage() {} func (x *TaskGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,11 +1007,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -1034,7 +1020,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1069,9 @@ type LogsPolicy_CloudLoggingOption struct { func (x *LogsPolicy_CloudLoggingOption) Reset() { *x = LogsPolicy_CloudLoggingOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogsPolicy_CloudLoggingOption) String() string { @@ -1098,7 +1082,7 @@ func (*LogsPolicy_CloudLoggingOption) ProtoMessage() {} func (x *LogsPolicy_CloudLoggingOption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,11 +1122,9 @@ type JobStatus_InstanceStatus struct { func (x *JobStatus_InstanceStatus) Reset() { *x = JobStatus_InstanceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobStatus_InstanceStatus) String() string { @@ -1153,7 +1135,7 @@ func (*JobStatus_InstanceStatus) ProtoMessage() {} func (x *JobStatus_InstanceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1211,11 +1193,9 @@ type JobStatus_TaskGroupStatus struct { func (x *JobStatus_TaskGroupStatus) Reset() { *x = JobStatus_TaskGroupStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobStatus_TaskGroupStatus) String() string { @@ -1226,7 +1206,7 @@ func (*JobStatus_TaskGroupStatus) ProtoMessage() {} func (x *JobStatus_TaskGroupStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1277,11 +1257,9 @@ type JobNotification_Message struct { func (x *JobNotification_Message) Reset() { *x = JobNotification_Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobNotification_Message) String() string { @@ -1292,7 +1270,7 @@ func (*JobNotification_Message) ProtoMessage() {} func (x *JobNotification_Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1330,9 @@ type AllocationPolicy_LocationPolicy struct { func (x *AllocationPolicy_LocationPolicy) Reset() { *x = AllocationPolicy_LocationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_LocationPolicy) String() string { @@ -1367,7 +1343,7 @@ func (*AllocationPolicy_LocationPolicy) ProtoMessage() {} func (x *AllocationPolicy_LocationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1418,9 @@ type AllocationPolicy_Disk struct { func (x *AllocationPolicy_Disk) Reset() { *x = AllocationPolicy_Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_Disk) String() string { @@ -1457,7 +1431,7 @@ func (*AllocationPolicy_Disk) ProtoMessage() {} func (x *AllocationPolicy_Disk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1567,11 +1541,9 @@ type AllocationPolicy_AttachedDisk struct { func (x *AllocationPolicy_AttachedDisk) Reset() { *x = AllocationPolicy_AttachedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_AttachedDisk) String() string { @@ -1582,7 +1554,7 @@ func (*AllocationPolicy_AttachedDisk) ProtoMessage() {} func (x *AllocationPolicy_AttachedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1641,9 @@ type AllocationPolicy_Accelerator struct { func (x *AllocationPolicy_Accelerator) Reset() { *x = AllocationPolicy_Accelerator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_Accelerator) String() string { @@ -1684,7 +1654,7 @@ func (*AllocationPolicy_Accelerator) ProtoMessage() {} func (x *AllocationPolicy_Accelerator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1734,9 @@ type AllocationPolicy_InstancePolicy struct { func (x *AllocationPolicy_InstancePolicy) Reset() { *x = AllocationPolicy_InstancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_InstancePolicy) String() string { @@ -1779,7 +1747,7 @@ func (*AllocationPolicy_InstancePolicy) ProtoMessage() {} func (x *AllocationPolicy_InstancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1893,11 +1861,9 @@ type AllocationPolicy_InstancePolicyOrTemplate struct { func (x *AllocationPolicy_InstancePolicyOrTemplate) Reset() { *x = AllocationPolicy_InstancePolicyOrTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_InstancePolicyOrTemplate) String() string { @@ -1908,7 +1874,7 @@ func (*AllocationPolicy_InstancePolicyOrTemplate) ProtoMessage() {} func (x *AllocationPolicy_InstancePolicyOrTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2027,11 +1993,9 @@ type AllocationPolicy_NetworkInterface struct { func (x *AllocationPolicy_NetworkInterface) Reset() { *x = AllocationPolicy_NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_NetworkInterface) String() string { @@ -2042,7 +2006,7 @@ func (*AllocationPolicy_NetworkInterface) ProtoMessage() {} func (x *AllocationPolicy_NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2090,11 +2054,9 @@ type AllocationPolicy_NetworkPolicy struct { func (x *AllocationPolicy_NetworkPolicy) Reset() { *x = AllocationPolicy_NetworkPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_NetworkPolicy) String() string { @@ -2105,7 +2067,7 @@ func (*AllocationPolicy_NetworkPolicy) ProtoMessage() {} func (x *AllocationPolicy_NetworkPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2149,11 +2111,9 @@ type AllocationPolicy_PlacementPolicy struct { func (x *AllocationPolicy_PlacementPolicy) Reset() { *x = AllocationPolicy_PlacementPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_job_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_job_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationPolicy_PlacementPolicy) String() string { @@ -2164,7 +2124,7 @@ func (*AllocationPolicy_PlacementPolicy) ProtoMessage() {} func (x *AllocationPolicy_PlacementPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_job_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2695,248 +2655,6 @@ func file_google_cloud_batch_v1_job_proto_init() { return } file_google_cloud_batch_v1_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_batch_v1_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LogsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*JobStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*JobNotification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TaskGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LogsPolicy_CloudLoggingOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*JobStatus_InstanceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*JobStatus_TaskGroupStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*JobNotification_Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_LocationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_AttachedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_Accelerator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_InstancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_InstancePolicyOrTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_NetworkPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_job_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AllocationPolicy_PlacementPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_batch_v1_job_proto_msgTypes[15].OneofWrappers = []any{ (*AllocationPolicy_Disk_Image)(nil), (*AllocationPolicy_Disk_Snapshot)(nil), diff --git a/batch/apiv1/batchpb/task.pb.go b/batch/apiv1/batchpb/task.pb.go index 877f200c4ae0..16df523a5b64 100755 --- a/batch/apiv1/batchpb/task.pb.go +++ b/batch/apiv1/batchpb/task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/batch/v1/task.proto @@ -214,11 +214,9 @@ type ComputeResource struct { func (x *ComputeResource) Reset() { *x = ComputeResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeResource) String() string { @@ -229,7 +227,7 @@ func (*ComputeResource) ProtoMessage() {} func (x *ComputeResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +286,9 @@ type StatusEvent struct { func (x *StatusEvent) Reset() { *x = StatusEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatusEvent) String() string { @@ -303,7 +299,7 @@ func (*StatusEvent) ProtoMessage() {} func (x *StatusEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +372,9 @@ type TaskExecution struct { func (x *TaskExecution) Reset() { *x = TaskExecution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskExecution) String() string { @@ -391,7 +385,7 @@ func (*TaskExecution) ProtoMessage() {} func (x *TaskExecution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +421,9 @@ type TaskStatus struct { func (x *TaskStatus) Reset() { *x = TaskStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskStatus) String() string { @@ -442,7 +434,7 @@ func (*TaskStatus) ProtoMessage() {} func (x *TaskStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +521,9 @@ type Runnable struct { func (x *Runnable) Reset() { *x = Runnable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Runnable) String() string { @@ -544,7 +534,7 @@ func (*Runnable) ProtoMessage() {} func (x *Runnable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +705,9 @@ type TaskSpec struct { func (x *TaskSpec) Reset() { *x = TaskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskSpec) String() string { @@ -730,7 +718,7 @@ func (*TaskSpec) ProtoMessage() {} func (x *TaskSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +809,9 @@ type LifecyclePolicy struct { func (x *LifecyclePolicy) Reset() { *x = LifecyclePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LifecyclePolicy) String() string { @@ -836,7 +822,7 @@ func (*LifecyclePolicy) ProtoMessage() {} func (x *LifecyclePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +868,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -897,7 +881,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +930,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -961,7 +943,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1072,9 @@ type Runnable_Container struct { func (x *Runnable_Container) Reset() { *x = Runnable_Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Runnable_Container) String() string { @@ -1105,7 +1085,7 @@ func (*Runnable_Container) ProtoMessage() {} func (x *Runnable_Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1180,9 @@ type Runnable_Script struct { func (x *Runnable_Script) Reset() { *x = Runnable_Script{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Runnable_Script) String() string { @@ -1215,7 +1193,7 @@ func (*Runnable_Script) ProtoMessage() {} func (x *Runnable_Script) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,11 +1277,9 @@ type Runnable_Barrier struct { func (x *Runnable_Barrier) Reset() { *x = Runnable_Barrier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Runnable_Barrier) String() string { @@ -1314,7 +1290,7 @@ func (*Runnable_Barrier) ProtoMessage() {} func (x *Runnable_Barrier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1351,11 +1327,9 @@ type LifecyclePolicy_ActionCondition struct { func (x *LifecyclePolicy_ActionCondition) Reset() { *x = LifecyclePolicy_ActionCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LifecyclePolicy_ActionCondition) String() string { @@ -1366,7 +1340,7 @@ func (*LifecyclePolicy_ActionCondition) ProtoMessage() {} func (x *LifecyclePolicy_ActionCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1375,9 @@ type Environment_KMSEnvMap struct { func (x *Environment_KMSEnvMap) Reset() { *x = Environment_KMSEnvMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_task_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_task_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_KMSEnvMap) String() string { @@ -1416,7 +1388,7 @@ func (*Environment_KMSEnvMap) ProtoMessage() {} func (x *Environment_KMSEnvMap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_task_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,176 +1737,6 @@ func file_google_cloud_batch_v1_task_proto_init() { return } file_google_cloud_batch_v1_volume_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_batch_v1_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StatusEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TaskExecution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TaskStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Runnable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TaskSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*LifecyclePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Runnable_Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Runnable_Script); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Runnable_Barrier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*LifecyclePolicy_ActionCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_task_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Environment_KMSEnvMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_batch_v1_task_proto_msgTypes[4].OneofWrappers = []any{ (*Runnable_Container_)(nil), (*Runnable_Script_)(nil), diff --git a/batch/apiv1/batchpb/volume.pb.go b/batch/apiv1/batchpb/volume.pb.go index 573ef0cd5229..8094aee3b5f7 100755 --- a/batch/apiv1/batchpb/volume.pb.go +++ b/batch/apiv1/batchpb/volume.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/batch/v1/volume.proto @@ -70,11 +70,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -85,7 +83,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type NFS struct { func (x *NFS) Reset() { *x = NFS{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NFS) String() string { @@ -201,7 +197,7 @@ func (*NFS) ProtoMessage() {} func (x *NFS) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +239,9 @@ type GCS struct { func (x *GCS) Reset() { *x = GCS{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCS) String() string { @@ -258,7 +252,7 @@ func (*GCS) ProtoMessage() {} func (x *GCS) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_batch_v1_volume_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,44 +348,6 @@ func file_google_cloud_batch_v1_volume_proto_init() { if File_google_cloud_batch_v1_volume_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_batch_v1_volume_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_volume_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NFS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_batch_v1_volume_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GCS); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_batch_v1_volume_proto_msgTypes[0].OneofWrappers = []any{ (*Volume_Nfs)(nil), (*Volume_Gcs)(nil), diff --git a/batch/apiv1/helpers.go b/batch/apiv1/helpers.go index b297c9d838a2..820bc234c32e 100755 --- a/batch/apiv1/helpers.go +++ b/batch/apiv1/helpers.go @@ -18,10 +18,20 @@ package batch import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "batch.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/beyondcorp/appconnections/apiv1/app_connections_client.go b/beyondcorp/appconnections/apiv1/app_connections_client.go index 58faea66275b..40daa9fa5521 100755 --- a/beyondcorp/appconnections/apiv1/app_connections_client.go +++ b/beyondcorp/appconnections/apiv1/app_connections_client.go @@ -19,6 +19,7 @@ package appconnections import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -303,6 +304,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new app connections service client based on gRPC. @@ -342,6 +345,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: appconnectionspb.NewAppConnectionsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -409,7 +413,7 @@ func (c *gRPCClient) ListAppConnections(ctx context.Context, req *appconnections } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAppConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAppConnections, req, settings.GRPC, c.logger, "ListAppConnections") return err }, opts...) if err != nil { @@ -444,7 +448,7 @@ func (c *gRPCClient) GetAppConnection(ctx context.Context, req *appconnectionspb var resp *appconnectionspb.AppConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAppConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAppConnection, req, settings.GRPC, c.logger, "GetAppConnection") return err }, opts...) if err != nil { @@ -462,7 +466,7 @@ func (c *gRPCClient) CreateAppConnection(ctx context.Context, req *appconnection var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAppConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAppConnection, req, settings.GRPC, c.logger, "CreateAppConnection") return err }, opts...) if err != nil { @@ -482,7 +486,7 @@ func (c *gRPCClient) UpdateAppConnection(ctx context.Context, req *appconnection var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAppConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAppConnection, req, settings.GRPC, c.logger, "UpdateAppConnection") return err }, opts...) if err != nil { @@ -502,7 +506,7 @@ func (c *gRPCClient) DeleteAppConnection(ctx context.Context, req *appconnection var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAppConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAppConnection, req, settings.GRPC, c.logger, "DeleteAppConnection") return err }, opts...) if err != nil { @@ -533,7 +537,7 @@ func (c *gRPCClient) ResolveAppConnections(ctx context.Context, req *appconnecti } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResolveAppConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResolveAppConnections, req, settings.GRPC, c.logger, "ResolveAppConnections") return err }, opts...) if err != nil { @@ -568,7 +572,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -597,7 +601,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -632,7 +636,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -650,7 +654,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -668,7 +672,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -685,7 +689,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -699,7 +703,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -714,7 +718,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -743,7 +747,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/beyondcorp/appconnections/apiv1/app_connections_client_example_go123_test.go b/beyondcorp/appconnections/apiv1/app_connections_client_example_go123_test.go index 7f7187d7d79d..c992ad483914 100644 --- a/beyondcorp/appconnections/apiv1/app_connections_client_example_go123_test.go +++ b/beyondcorp/appconnections/apiv1/app_connections_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAppConnections_all() { } for resp, err := range c.ListAppConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ResolveAppConnections_all() { } for resp, err := range c.ResolveAppConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/beyondcorp/appconnections/apiv1/appconnectionspb/app_connections_service.pb.go b/beyondcorp/appconnections/apiv1/appconnectionspb/app_connections_service.pb.go index 978fb7319523..b26edd0a714d 100755 --- a/beyondcorp/appconnections/apiv1/appconnectionspb/app_connections_service.pb.go +++ b/beyondcorp/appconnections/apiv1/appconnectionspb/app_connections_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto @@ -239,11 +239,9 @@ type ListAppConnectionsRequest struct { func (x *ListAppConnectionsRequest) Reset() { *x = ListAppConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppConnectionsRequest) String() string { @@ -254,7 +252,7 @@ func (*ListAppConnectionsRequest) ProtoMessage() {} func (x *ListAppConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +319,9 @@ type ListAppConnectionsResponse struct { func (x *ListAppConnectionsResponse) Reset() { *x = ListAppConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppConnectionsResponse) String() string { @@ -336,7 +332,7 @@ func (*ListAppConnectionsResponse) ProtoMessage() {} func (x *ListAppConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +381,9 @@ type GetAppConnectionRequest struct { func (x *GetAppConnectionRequest) Reset() { *x = GetAppConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAppConnectionRequest) String() string { @@ -400,7 +394,7 @@ func (*GetAppConnectionRequest) ProtoMessage() {} func (x *GetAppConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +453,9 @@ type CreateAppConnectionRequest struct { func (x *CreateAppConnectionRequest) Reset() { *x = CreateAppConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAppConnectionRequest) String() string { @@ -474,7 +466,7 @@ func (*CreateAppConnectionRequest) ProtoMessage() {} func (x *CreateAppConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +556,9 @@ type UpdateAppConnectionRequest struct { func (x *UpdateAppConnectionRequest) Reset() { *x = UpdateAppConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAppConnectionRequest) String() string { @@ -579,7 +569,7 @@ func (*UpdateAppConnectionRequest) ProtoMessage() {} func (x *UpdateAppConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +649,9 @@ type DeleteAppConnectionRequest struct { func (x *DeleteAppConnectionRequest) Reset() { *x = DeleteAppConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAppConnectionRequest) String() string { @@ -674,7 +662,7 @@ func (*DeleteAppConnectionRequest) ProtoMessage() {} func (x *DeleteAppConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +725,9 @@ type ResolveAppConnectionsRequest struct { func (x *ResolveAppConnectionsRequest) Reset() { *x = ResolveAppConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveAppConnectionsRequest) String() string { @@ -752,7 +738,7 @@ func (*ResolveAppConnectionsRequest) ProtoMessage() {} func (x *ResolveAppConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -812,11 +798,9 @@ type ResolveAppConnectionsResponse struct { func (x *ResolveAppConnectionsResponse) Reset() { *x = ResolveAppConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveAppConnectionsResponse) String() string { @@ -827,7 +811,7 @@ func (*ResolveAppConnectionsResponse) ProtoMessage() {} func (x *ResolveAppConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +887,9 @@ type AppConnection struct { func (x *AppConnection) Reset() { *x = AppConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnection) String() string { @@ -918,7 +900,7 @@ func (*AppConnection) ProtoMessage() {} func (x *AppConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1020,9 @@ type AppConnectionOperationMetadata struct { func (x *AppConnectionOperationMetadata) Reset() { *x = AppConnectionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnectionOperationMetadata) String() string { @@ -1053,7 +1033,7 @@ func (*AppConnectionOperationMetadata) ProtoMessage() {} func (x *AppConnectionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1112,9 @@ type ResolveAppConnectionsResponse_AppConnectionDetails struct { func (x *ResolveAppConnectionsResponse_AppConnectionDetails) Reset() { *x = ResolveAppConnectionsResponse_AppConnectionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveAppConnectionsResponse_AppConnectionDetails) String() string { @@ -1147,7 +1125,7 @@ func (*ResolveAppConnectionsResponse_AppConnectionDetails) ProtoMessage() {} func (x *ResolveAppConnectionsResponse_AppConnectionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1190,11 +1168,9 @@ type AppConnection_ApplicationEndpoint struct { func (x *AppConnection_ApplicationEndpoint) Reset() { *x = AppConnection_ApplicationEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnection_ApplicationEndpoint) String() string { @@ -1205,7 +1181,7 @@ func (*AppConnection_ApplicationEndpoint) ProtoMessage() {} func (x *AppConnection_ApplicationEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1231,9 @@ type AppConnection_Gateway struct { func (x *AppConnection_Gateway) Reset() { *x = AppConnection_Gateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnection_Gateway) String() string { @@ -1270,7 +1244,7 @@ func (*AppConnection_Gateway) ProtoMessage() {} func (x *AppConnection_Gateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1795,164 +1769,6 @@ func file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_prot if File_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAppConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAppConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAppConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateAppConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAppConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAppConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResolveAppConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResolveAppConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AppConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AppConnectionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ResolveAppConnectionsResponse_AppConnectionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AppConnection_ApplicationEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnections_v1_app_connections_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AppConnection_Gateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/beyondcorp/appconnections/apiv1/helpers.go b/beyondcorp/appconnections/apiv1/helpers.go index d1d9d468e5b3..12419d00ffae 100755 --- a/beyondcorp/appconnections/apiv1/helpers.go +++ b/beyondcorp/appconnections/apiv1/helpers.go @@ -18,10 +18,16 @@ package appconnections import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "beyondcorp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/beyondcorp/appconnectors/apiv1/app_connectors_client.go b/beyondcorp/appconnectors/apiv1/app_connectors_client.go index 34c437e9b65a..4582f82b1098 100755 --- a/beyondcorp/appconnectors/apiv1/app_connectors_client.go +++ b/beyondcorp/appconnectors/apiv1/app_connectors_client.go @@ -19,6 +19,7 @@ package appconnectors import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -308,6 +309,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new app connectors service client based on gRPC. @@ -347,6 +350,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: appconnectorspb.NewAppConnectorsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -414,7 +418,7 @@ func (c *gRPCClient) ListAppConnectors(ctx context.Context, req *appconnectorspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAppConnectors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAppConnectors, req, settings.GRPC, c.logger, "ListAppConnectors") return err }, opts...) if err != nil { @@ -449,7 +453,7 @@ func (c *gRPCClient) GetAppConnector(ctx context.Context, req *appconnectorspb.G var resp *appconnectorspb.AppConnector err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAppConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAppConnector, req, settings.GRPC, c.logger, "GetAppConnector") return err }, opts...) if err != nil { @@ -467,7 +471,7 @@ func (c *gRPCClient) CreateAppConnector(ctx context.Context, req *appconnectorsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAppConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAppConnector, req, settings.GRPC, c.logger, "CreateAppConnector") return err }, opts...) if err != nil { @@ -487,7 +491,7 @@ func (c *gRPCClient) UpdateAppConnector(ctx context.Context, req *appconnectorsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAppConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAppConnector, req, settings.GRPC, c.logger, "UpdateAppConnector") return err }, opts...) if err != nil { @@ -507,7 +511,7 @@ func (c *gRPCClient) DeleteAppConnector(ctx context.Context, req *appconnectorsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAppConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAppConnector, req, settings.GRPC, c.logger, "DeleteAppConnector") return err }, opts...) if err != nil { @@ -527,7 +531,7 @@ func (c *gRPCClient) ReportStatus(ctx context.Context, req *appconnectorspb.Repo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportStatus, req, settings.GRPC, c.logger, "ReportStatus") return err }, opts...) if err != nil { @@ -547,7 +551,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -576,7 +580,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -611,7 +615,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -629,7 +633,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -647,7 +651,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -664,7 +668,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -678,7 +682,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -693,7 +697,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -722,7 +726,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/beyondcorp/appconnectors/apiv1/app_connectors_client_example_go123_test.go b/beyondcorp/appconnectors/apiv1/app_connectors_client_example_go123_test.go index d578fa608fb1..5b4ee2d6949c 100644 --- a/beyondcorp/appconnectors/apiv1/app_connectors_client_example_go123_test.go +++ b/beyondcorp/appconnectors/apiv1/app_connectors_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAppConnectors_all() { } for resp, err := range c.ListAppConnectors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connector_instance_config.pb.go b/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connector_instance_config.pb.go index af54c5b654fc..0b084575b83d 100755 --- a/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connector_instance_config.pb.go +++ b/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connector_instance_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.proto @@ -59,11 +59,9 @@ type AppConnectorInstanceConfig struct { func (x *AppConnectorInstanceConfig) Reset() { *x = AppConnectorInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnectorInstanceConfig) String() string { @@ -74,7 +72,7 @@ func (*AppConnectorInstanceConfig) ProtoMessage() {} func (x *AppConnectorInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -146,7 +142,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type ImageConfig struct { func (x *ImageConfig) Reset() { *x = ImageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageConfig) String() string { @@ -217,7 +211,7 @@ func (*ImageConfig) ProtoMessage() {} func (x *ImageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +252,9 @@ type NotificationConfig_CloudPubSubNotificationConfig struct { func (x *NotificationConfig_CloudPubSubNotificationConfig) Reset() { *x = NotificationConfig_CloudPubSubNotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_CloudPubSubNotificationConfig) String() string { @@ -273,7 +265,7 @@ func (*NotificationConfig_CloudPubSubNotificationConfig) ProtoMessage() {} func (x *NotificationConfig_CloudPubSubNotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,56 +403,6 @@ func file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config if File_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AppConnectorInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_CloudPubSubNotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_msgTypes[1].OneofWrappers = []any{ (*NotificationConfig_PubsubNotification)(nil), } diff --git a/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connectors_service.pb.go b/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connectors_service.pb.go index 33464cade22e..1d69ea5f4f39 100755 --- a/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connectors_service.pb.go +++ b/beyondcorp/appconnectors/apiv1/appconnectorspb/app_connectors_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto @@ -139,11 +139,9 @@ type ListAppConnectorsRequest struct { func (x *ListAppConnectorsRequest) Reset() { *x = ListAppConnectorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppConnectorsRequest) String() string { @@ -154,7 +152,7 @@ func (*ListAppConnectorsRequest) ProtoMessage() {} func (x *ListAppConnectorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type ListAppConnectorsResponse struct { func (x *ListAppConnectorsResponse) Reset() { *x = ListAppConnectorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppConnectorsResponse) String() string { @@ -236,7 +232,7 @@ func (*ListAppConnectorsResponse) ProtoMessage() {} func (x *ListAppConnectorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +281,9 @@ type GetAppConnectorRequest struct { func (x *GetAppConnectorRequest) Reset() { *x = GetAppConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAppConnectorRequest) String() string { @@ -300,7 +294,7 @@ func (*GetAppConnectorRequest) ProtoMessage() {} func (x *GetAppConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +354,9 @@ type CreateAppConnectorRequest struct { func (x *CreateAppConnectorRequest) Reset() { *x = CreateAppConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAppConnectorRequest) String() string { @@ -375,7 +367,7 @@ func (*CreateAppConnectorRequest) ProtoMessage() {} func (x *CreateAppConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type UpdateAppConnectorRequest struct { func (x *UpdateAppConnectorRequest) Reset() { *x = UpdateAppConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAppConnectorRequest) String() string { @@ -476,7 +466,7 @@ func (*UpdateAppConnectorRequest) ProtoMessage() {} func (x *UpdateAppConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +539,9 @@ type DeleteAppConnectorRequest struct { func (x *DeleteAppConnectorRequest) Reset() { *x = DeleteAppConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAppConnectorRequest) String() string { @@ -564,7 +552,7 @@ func (*DeleteAppConnectorRequest) ProtoMessage() {} func (x *DeleteAppConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +620,9 @@ type ReportStatusRequest struct { func (x *ReportStatusRequest) Reset() { *x = ReportStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportStatusRequest) String() string { @@ -647,7 +633,7 @@ func (*ReportStatusRequest) ProtoMessage() {} func (x *ReportStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +711,9 @@ type AppConnector struct { func (x *AppConnector) Reset() { *x = AppConnector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnector) String() string { @@ -740,7 +724,7 @@ func (*AppConnector) ProtoMessage() {} func (x *AppConnector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +830,9 @@ type AppConnectorOperationMetadata struct { func (x *AppConnectorOperationMetadata) Reset() { *x = AppConnectorOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnectorOperationMetadata) String() string { @@ -861,7 +843,7 @@ func (*AppConnectorOperationMetadata) ProtoMessage() {} func (x *AppConnectorOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +921,9 @@ type AppConnector_PrincipalInfo struct { func (x *AppConnector_PrincipalInfo) Reset() { *x = AppConnector_PrincipalInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnector_PrincipalInfo) String() string { @@ -954,7 +934,7 @@ func (*AppConnector_PrincipalInfo) ProtoMessage() {} func (x *AppConnector_PrincipalInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +986,9 @@ type AppConnector_PrincipalInfo_ServiceAccount struct { func (x *AppConnector_PrincipalInfo_ServiceAccount) Reset() { *x = AppConnector_PrincipalInfo_ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppConnector_PrincipalInfo_ServiceAccount) String() string { @@ -1021,7 +999,7 @@ func (*AppConnector_PrincipalInfo_ServiceAccount) ProtoMessage() {} func (x *AppConnector_PrincipalInfo_ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1463,140 +1441,6 @@ func file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_ } file_google_cloud_beyondcorp_appconnectors_v1_app_connector_instance_config_proto_init() file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAppConnectorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAppConnectorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAppConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateAppConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAppConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAppConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AppConnector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AppConnectorOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AppConnector_PrincipalInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AppConnector_PrincipalInfo_ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_beyondcorp_appconnectors_v1_app_connectors_service_proto_msgTypes[9].OneofWrappers = []any{ (*AppConnector_PrincipalInfo_ServiceAccount_)(nil), } diff --git a/beyondcorp/appconnectors/apiv1/appconnectorspb/resource_info.pb.go b/beyondcorp/appconnectors/apiv1/appconnectorspb/resource_info.pb.go index 729c76244759..76483a0ff736 100755 --- a/beyondcorp/appconnectors/apiv1/appconnectorspb/resource_info.pb.go +++ b/beyondcorp/appconnectors/apiv1/appconnectorspb/resource_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/appconnectors/v1/resource_info.proto @@ -130,11 +130,9 @@ type ResourceInfo struct { func (x *ResourceInfo) Reset() { *x = ResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceInfo) String() string { @@ -145,7 +143,7 @@ func (*ResourceInfo) ProtoMessage() {} func (x *ResourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,20 +291,6 @@ func file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_init() { if File_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_appconnectors_v1_resource_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/beyondcorp/appconnectors/apiv1/helpers.go b/beyondcorp/appconnectors/apiv1/helpers.go index 411a5e4a45e4..2081f555b1cf 100755 --- a/beyondcorp/appconnectors/apiv1/helpers.go +++ b/beyondcorp/appconnectors/apiv1/helpers.go @@ -18,10 +18,16 @@ package appconnectors import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "beyondcorp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/beyondcorp/appgateways/apiv1/app_gateways_client.go b/beyondcorp/appgateways/apiv1/app_gateways_client.go index 2d9b3ef5906e..51929d678e69 100755 --- a/beyondcorp/appgateways/apiv1/app_gateways_client.go +++ b/beyondcorp/appgateways/apiv1/app_gateways_client.go @@ -19,6 +19,7 @@ package appgateways import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -278,6 +279,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new app gateways service client based on gRPC. @@ -317,6 +320,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: appgatewayspb.NewAppGatewaysServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -384,7 +388,7 @@ func (c *gRPCClient) ListAppGateways(ctx context.Context, req *appgatewayspb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAppGateways(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAppGateways, req, settings.GRPC, c.logger, "ListAppGateways") return err }, opts...) if err != nil { @@ -419,7 +423,7 @@ func (c *gRPCClient) GetAppGateway(ctx context.Context, req *appgatewayspb.GetAp var resp *appgatewayspb.AppGateway err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAppGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAppGateway, req, settings.GRPC, c.logger, "GetAppGateway") return err }, opts...) if err != nil { @@ -437,7 +441,7 @@ func (c *gRPCClient) CreateAppGateway(ctx context.Context, req *appgatewayspb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAppGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAppGateway, req, settings.GRPC, c.logger, "CreateAppGateway") return err }, opts...) if err != nil { @@ -457,7 +461,7 @@ func (c *gRPCClient) DeleteAppGateway(ctx context.Context, req *appgatewayspb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAppGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAppGateway, req, settings.GRPC, c.logger, "DeleteAppGateway") return err }, opts...) if err != nil { @@ -477,7 +481,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -506,7 +510,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -541,7 +545,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -559,7 +563,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -577,7 +581,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -594,7 +598,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -608,7 +612,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -623,7 +627,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -652,7 +656,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/beyondcorp/appgateways/apiv1/app_gateways_client_example_go123_test.go b/beyondcorp/appgateways/apiv1/app_gateways_client_example_go123_test.go index 0738b23965ba..8aad944e31f5 100644 --- a/beyondcorp/appgateways/apiv1/app_gateways_client_example_go123_test.go +++ b/beyondcorp/appgateways/apiv1/app_gateways_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAppGateways_all() { } for resp, err := range c.ListAppGateways(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/beyondcorp/appgateways/apiv1/appgatewayspb/app_gateways_service.pb.go b/beyondcorp/appgateways/apiv1/appgatewayspb/app_gateways_service.pb.go index ae709e7c9a03..4e89c5b42429 100755 --- a/beyondcorp/appgateways/apiv1/appgatewayspb/app_gateways_service.pb.go +++ b/beyondcorp/appgateways/apiv1/appgatewayspb/app_gateways_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto @@ -238,11 +238,9 @@ type ListAppGatewaysRequest struct { func (x *ListAppGatewaysRequest) Reset() { *x = ListAppGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppGatewaysRequest) String() string { @@ -253,7 +251,7 @@ func (*ListAppGatewaysRequest) ProtoMessage() {} func (x *ListAppGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +318,9 @@ type ListAppGatewaysResponse struct { func (x *ListAppGatewaysResponse) Reset() { *x = ListAppGatewaysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppGatewaysResponse) String() string { @@ -335,7 +331,7 @@ func (*ListAppGatewaysResponse) ProtoMessage() {} func (x *ListAppGatewaysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +380,9 @@ type GetAppGatewayRequest struct { func (x *GetAppGatewayRequest) Reset() { *x = GetAppGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAppGatewayRequest) String() string { @@ -399,7 +393,7 @@ func (*GetAppGatewayRequest) ProtoMessage() {} func (x *GetAppGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +452,9 @@ type CreateAppGatewayRequest struct { func (x *CreateAppGatewayRequest) Reset() { *x = CreateAppGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAppGatewayRequest) String() string { @@ -473,7 +465,7 @@ func (*CreateAppGatewayRequest) ProtoMessage() {} func (x *CreateAppGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +545,9 @@ type DeleteAppGatewayRequest struct { func (x *DeleteAppGatewayRequest) Reset() { *x = DeleteAppGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAppGatewayRequest) String() string { @@ -568,7 +558,7 @@ func (*DeleteAppGatewayRequest) ProtoMessage() {} func (x *DeleteAppGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +632,9 @@ type AppGateway struct { func (x *AppGateway) Reset() { *x = AppGateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppGateway) String() string { @@ -657,7 +645,7 @@ func (*AppGateway) ProtoMessage() {} func (x *AppGateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +765,9 @@ type AppGatewayOperationMetadata struct { func (x *AppGatewayOperationMetadata) Reset() { *x = AppGatewayOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppGatewayOperationMetadata) String() string { @@ -792,7 +778,7 @@ func (*AppGatewayOperationMetadata) ProtoMessage() {} func (x *AppGatewayOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +856,9 @@ type AppGateway_AllocatedConnection struct { func (x *AppGateway_AllocatedConnection) Reset() { *x = AppGateway_AllocatedConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppGateway_AllocatedConnection) String() string { @@ -885,7 +869,7 @@ func (*AppGateway_AllocatedConnection) ProtoMessage() {} func (x *AppGateway_AllocatedConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,104 +1225,6 @@ func file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_init if File_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAppGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAppGatewaysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAppGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateAppGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAppGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AppGateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AppGatewayOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_appgateways_v1_app_gateways_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AppGateway_AllocatedConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/beyondcorp/appgateways/apiv1/helpers.go b/beyondcorp/appgateways/apiv1/helpers.go index ea40d24534d2..187a1391bb23 100755 --- a/beyondcorp/appgateways/apiv1/helpers.go +++ b/beyondcorp/appgateways/apiv1/helpers.go @@ -18,10 +18,16 @@ package appgateways import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "beyondcorp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go index 292efd19b21a..cf3881223f4f 100755 --- a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go +++ b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go @@ -19,6 +19,7 @@ package clientconnectorservices import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -290,6 +291,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new client connector services service client based on gRPC. @@ -326,6 +329,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: clientconnectorservicespb.NewClientConnectorServicesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -393,7 +397,7 @@ func (c *gRPCClient) ListClientConnectorServices(ctx context.Context, req *clien } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClientConnectorServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClientConnectorServices, req, settings.GRPC, c.logger, "ListClientConnectorServices") return err }, opts...) if err != nil { @@ -428,7 +432,7 @@ func (c *gRPCClient) GetClientConnectorService(ctx context.Context, req *clientc var resp *clientconnectorservicespb.ClientConnectorService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetClientConnectorService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetClientConnectorService, req, settings.GRPC, c.logger, "GetClientConnectorService") return err }, opts...) if err != nil { @@ -446,7 +450,7 @@ func (c *gRPCClient) CreateClientConnectorService(ctx context.Context, req *clie var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateClientConnectorService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateClientConnectorService, req, settings.GRPC, c.logger, "CreateClientConnectorService") return err }, opts...) if err != nil { @@ -466,7 +470,7 @@ func (c *gRPCClient) UpdateClientConnectorService(ctx context.Context, req *clie var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateClientConnectorService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateClientConnectorService, req, settings.GRPC, c.logger, "UpdateClientConnectorService") return err }, opts...) if err != nil { @@ -486,7 +490,7 @@ func (c *gRPCClient) DeleteClientConnectorService(ctx context.Context, req *clie var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteClientConnectorService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteClientConnectorService, req, settings.GRPC, c.logger, "DeleteClientConnectorService") return err }, opts...) if err != nil { @@ -506,7 +510,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -535,7 +539,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -570,7 +574,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -588,7 +592,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -606,7 +610,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -623,7 +627,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -637,7 +641,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -652,7 +656,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -681,7 +685,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_go123_test.go b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_go123_test.go index 393ee6b10971..5aca283eac0f 100644 --- a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_go123_test.go +++ b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListClientConnectorServices_all() { } for resp, err := range c.ListClientConnectorServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/beyondcorp/clientconnectorservices/apiv1/clientconnectorservicespb/client_connector_services_service.pb.go b/beyondcorp/clientconnectorservices/apiv1/clientconnectorservicespb/client_connector_services_service.pb.go index bbe436fe8a56..a91c29e94616 100755 --- a/beyondcorp/clientconnectorservices/apiv1/clientconnectorservicespb/client_connector_services_service.pb.go +++ b/beyondcorp/clientconnectorservices/apiv1/clientconnectorservicespb/client_connector_services_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto @@ -191,11 +191,9 @@ type ClientConnectorService struct { func (x *ClientConnectorService) Reset() { *x = ClientConnectorService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService) String() string { @@ -206,7 +204,7 @@ func (*ClientConnectorService) ProtoMessage() {} func (x *ClientConnectorService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +289,9 @@ type ListClientConnectorServicesRequest struct { func (x *ListClientConnectorServicesRequest) Reset() { *x = ListClientConnectorServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientConnectorServicesRequest) String() string { @@ -306,7 +302,7 @@ func (*ListClientConnectorServicesRequest) ProtoMessage() {} func (x *ListClientConnectorServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +368,9 @@ type ListClientConnectorServicesResponse struct { func (x *ListClientConnectorServicesResponse) Reset() { *x = ListClientConnectorServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientConnectorServicesResponse) String() string { @@ -387,7 +381,7 @@ func (*ListClientConnectorServicesResponse) ProtoMessage() {} func (x *ListClientConnectorServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +429,9 @@ type GetClientConnectorServiceRequest struct { func (x *GetClientConnectorServiceRequest) Reset() { *x = GetClientConnectorServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClientConnectorServiceRequest) String() string { @@ -450,7 +442,7 @@ func (*GetClientConnectorServiceRequest) ProtoMessage() {} func (x *GetClientConnectorServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,11 +503,9 @@ type CreateClientConnectorServiceRequest struct { func (x *CreateClientConnectorServiceRequest) Reset() { *x = CreateClientConnectorServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClientConnectorServiceRequest) String() string { @@ -526,7 +516,7 @@ func (*CreateClientConnectorServiceRequest) ProtoMessage() {} func (x *CreateClientConnectorServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +605,9 @@ type UpdateClientConnectorServiceRequest struct { func (x *UpdateClientConnectorServiceRequest) Reset() { *x = UpdateClientConnectorServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClientConnectorServiceRequest) String() string { @@ -630,7 +618,7 @@ func (*UpdateClientConnectorServiceRequest) ProtoMessage() {} func (x *UpdateClientConnectorServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +697,9 @@ type DeleteClientConnectorServiceRequest struct { func (x *DeleteClientConnectorServiceRequest) Reset() { *x = DeleteClientConnectorServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClientConnectorServiceRequest) String() string { @@ -724,7 +710,7 @@ func (*DeleteClientConnectorServiceRequest) ProtoMessage() {} func (x *DeleteClientConnectorServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,11 +774,9 @@ type ClientConnectorServiceOperationMetadata struct { func (x *ClientConnectorServiceOperationMetadata) Reset() { *x = ClientConnectorServiceOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorServiceOperationMetadata) String() string { @@ -803,7 +787,7 @@ func (*ClientConnectorServiceOperationMetadata) ProtoMessage() {} func (x *ClientConnectorServiceOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +866,9 @@ type ClientConnectorService_Ingress struct { func (x *ClientConnectorService_Ingress) Reset() { *x = ClientConnectorService_Ingress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService_Ingress) String() string { @@ -897,7 +879,7 @@ func (*ClientConnectorService_Ingress) ProtoMessage() {} func (x *ClientConnectorService_Ingress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +933,9 @@ type ClientConnectorService_Egress struct { func (x *ClientConnectorService_Egress) Reset() { *x = ClientConnectorService_Egress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService_Egress) String() string { @@ -966,7 +946,7 @@ func (*ClientConnectorService_Egress) ProtoMessage() {} func (x *ClientConnectorService_Egress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1001,9 @@ type ClientConnectorService_Ingress_Config struct { func (x *ClientConnectorService_Ingress_Config) Reset() { *x = ClientConnectorService_Ingress_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService_Ingress_Config) String() string { @@ -1036,7 +1014,7 @@ func (*ClientConnectorService_Ingress_Config) ProtoMessage() {} func (x *ClientConnectorService_Ingress_Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1061,9 @@ type ClientConnectorService_Ingress_Config_DestinationRoute struct { func (x *ClientConnectorService_Ingress_Config_DestinationRoute) Reset() { *x = ClientConnectorService_Ingress_Config_DestinationRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService_Ingress_Config_DestinationRoute) String() string { @@ -1098,7 +1074,7 @@ func (*ClientConnectorService_Ingress_Config_DestinationRoute) ProtoMessage() {} func (x *ClientConnectorService_Ingress_Config_DestinationRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1115,9 @@ type ClientConnectorService_Egress_PeeredVpc struct { func (x *ClientConnectorService_Egress_PeeredVpc) Reset() { *x = ClientConnectorService_Egress_PeeredVpc{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientConnectorService_Egress_PeeredVpc) String() string { @@ -1154,7 +1128,7 @@ func (*ClientConnectorService_Egress_PeeredVpc) ProtoMessage() {} func (x *ClientConnectorService_Egress_PeeredVpc) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,164 +1610,6 @@ func file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_se if File_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClientConnectorServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListClientConnectorServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetClientConnectorServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClientConnectorServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClientConnectorServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClientConnectorServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorServiceOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService_Ingress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService_Egress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService_Ingress_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService_Ingress_Config_DestinationRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ClientConnectorService_Egress_PeeredVpc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_beyondcorp_clientconnectorservices_v1_client_connector_services_service_proto_msgTypes[8].OneofWrappers = []any{ (*ClientConnectorService_Ingress_Config_)(nil), } diff --git a/beyondcorp/clientconnectorservices/apiv1/helpers.go b/beyondcorp/clientconnectorservices/apiv1/helpers.go index 2a202e983fef..3dfb4eeb0133 100755 --- a/beyondcorp/clientconnectorservices/apiv1/helpers.go +++ b/beyondcorp/clientconnectorservices/apiv1/helpers.go @@ -18,10 +18,16 @@ package clientconnectorservices import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "beyondcorp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/beyondcorp/clientgateways/apiv1/client_gateways_client.go b/beyondcorp/clientgateways/apiv1/client_gateways_client.go index a6c4bfd1e5d4..ef9e873e51ff 100755 --- a/beyondcorp/clientgateways/apiv1/client_gateways_client.go +++ b/beyondcorp/clientgateways/apiv1/client_gateways_client.go @@ -19,6 +19,7 @@ package clientgateways import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -275,6 +276,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new client gateways service client based on gRPC. @@ -311,6 +314,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: clientgatewayspb.NewClientGatewaysServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -378,7 +382,7 @@ func (c *gRPCClient) ListClientGateways(ctx context.Context, req *clientgateways } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClientGateways(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClientGateways, req, settings.GRPC, c.logger, "ListClientGateways") return err }, opts...) if err != nil { @@ -413,7 +417,7 @@ func (c *gRPCClient) GetClientGateway(ctx context.Context, req *clientgatewayspb var resp *clientgatewayspb.ClientGateway err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetClientGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetClientGateway, req, settings.GRPC, c.logger, "GetClientGateway") return err }, opts...) if err != nil { @@ -431,7 +435,7 @@ func (c *gRPCClient) CreateClientGateway(ctx context.Context, req *clientgateway var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateClientGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateClientGateway, req, settings.GRPC, c.logger, "CreateClientGateway") return err }, opts...) if err != nil { @@ -451,7 +455,7 @@ func (c *gRPCClient) DeleteClientGateway(ctx context.Context, req *clientgateway var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteClientGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteClientGateway, req, settings.GRPC, c.logger, "DeleteClientGateway") return err }, opts...) if err != nil { @@ -471,7 +475,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -500,7 +504,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -535,7 +539,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -553,7 +557,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -571,7 +575,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -588,7 +592,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -602,7 +606,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -617,7 +621,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -646,7 +650,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/beyondcorp/clientgateways/apiv1/client_gateways_client_example_go123_test.go b/beyondcorp/clientgateways/apiv1/client_gateways_client_example_go123_test.go index a9d32d7bcb15..8b605ee73958 100644 --- a/beyondcorp/clientgateways/apiv1/client_gateways_client_example_go123_test.go +++ b/beyondcorp/clientgateways/apiv1/client_gateways_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListClientGateways_all() { } for resp, err := range c.ListClientGateways(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/beyondcorp/clientgateways/apiv1/clientgatewayspb/client_gateways_service.pb.go b/beyondcorp/clientgateways/apiv1/clientgatewayspb/client_gateways_service.pb.go index 50974649a25a..b5c7449627e3 100755 --- a/beyondcorp/clientgateways/apiv1/clientgatewayspb/client_gateways_service.pb.go +++ b/beyondcorp/clientgateways/apiv1/clientgatewayspb/client_gateways_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/beyondcorp/clientgateways/v1/client_gateways_service.proto @@ -137,11 +137,9 @@ type ClientGateway struct { func (x *ClientGateway) Reset() { *x = ClientGateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientGateway) String() string { @@ -152,7 +150,7 @@ func (*ClientGateway) ProtoMessage() {} func (x *ClientGateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +228,9 @@ type ListClientGatewaysRequest struct { func (x *ListClientGatewaysRequest) Reset() { *x = ListClientGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientGatewaysRequest) String() string { @@ -245,7 +241,7 @@ func (*ListClientGatewaysRequest) ProtoMessage() {} func (x *ListClientGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +307,9 @@ type ListClientGatewaysResponse struct { func (x *ListClientGatewaysResponse) Reset() { *x = ListClientGatewaysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientGatewaysResponse) String() string { @@ -326,7 +320,7 @@ func (*ListClientGatewaysResponse) ProtoMessage() {} func (x *ListClientGatewaysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +368,9 @@ type GetClientGatewayRequest struct { func (x *GetClientGatewayRequest) Reset() { *x = GetClientGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClientGatewayRequest) String() string { @@ -389,7 +381,7 @@ func (*GetClientGatewayRequest) ProtoMessage() {} func (x *GetClientGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +439,9 @@ type CreateClientGatewayRequest struct { func (x *CreateClientGatewayRequest) Reset() { *x = CreateClientGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClientGatewayRequest) String() string { @@ -462,7 +452,7 @@ func (*CreateClientGatewayRequest) ProtoMessage() {} func (x *CreateClientGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +531,9 @@ type DeleteClientGatewayRequest struct { func (x *DeleteClientGatewayRequest) Reset() { *x = DeleteClientGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClientGatewayRequest) String() string { @@ -556,7 +544,7 @@ func (*DeleteClientGatewayRequest) ProtoMessage() {} func (x *DeleteClientGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +608,9 @@ type ClientGatewayOperationMetadata struct { func (x *ClientGatewayOperationMetadata) Reset() { *x = ClientGatewayOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientGatewayOperationMetadata) String() string { @@ -635,7 +621,7 @@ func (*ClientGatewayOperationMetadata) ProtoMessage() {} func (x *ClientGatewayOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,92 +975,6 @@ func file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_prot if File_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientGateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClientGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListClientGatewaysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetClientGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClientGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClientGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_beyondcorp_clientgateways_v1_client_gateways_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ClientGatewayOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/beyondcorp/clientgateways/apiv1/helpers.go b/beyondcorp/clientgateways/apiv1/helpers.go index f833448bc494..362dcb546983 100755 --- a/beyondcorp/clientgateways/apiv1/helpers.go +++ b/beyondcorp/clientgateways/apiv1/helpers.go @@ -18,10 +18,16 @@ package clientgateways import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "beyondcorp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/analyticshub/apiv1/analytics_hub_client.go b/bigquery/analyticshub/apiv1/analytics_hub_client.go index 33139b04f708..75505bbddc43 100755 --- a/bigquery/analyticshub/apiv1/analytics_hub_client.go +++ b/bigquery/analyticshub/apiv1/analytics_hub_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -881,6 +880,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new analytics hub service client based on gRPC. @@ -912,6 +913,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: analyticshubpb.NewAnalyticsHubServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -974,6 +976,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new analytics hub service rest client. @@ -996,6 +1000,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1069,7 +1074,7 @@ func (c *gRPCClient) ListDataExchanges(ctx context.Context, req *analyticshubpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDataExchanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDataExchanges, req, settings.GRPC, c.logger, "ListDataExchanges") return err }, opts...) if err != nil { @@ -1115,7 +1120,7 @@ func (c *gRPCClient) ListOrgDataExchanges(ctx context.Context, req *analyticshub } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListOrgDataExchanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListOrgDataExchanges, req, settings.GRPC, c.logger, "ListOrgDataExchanges") return err }, opts...) if err != nil { @@ -1150,7 +1155,7 @@ func (c *gRPCClient) GetDataExchange(ctx context.Context, req *analyticshubpb.Ge var resp *analyticshubpb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataExchange, req, settings.GRPC, c.logger, "GetDataExchange") return err }, opts...) if err != nil { @@ -1168,7 +1173,7 @@ func (c *gRPCClient) CreateDataExchange(ctx context.Context, req *analyticshubpb var resp *analyticshubpb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDataExchange, req, settings.GRPC, c.logger, "CreateDataExchange") return err }, opts...) if err != nil { @@ -1186,7 +1191,7 @@ func (c *gRPCClient) UpdateDataExchange(ctx context.Context, req *analyticshubpb var resp *analyticshubpb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDataExchange, req, settings.GRPC, c.logger, "UpdateDataExchange") return err }, opts...) if err != nil { @@ -1203,7 +1208,7 @@ func (c *gRPCClient) DeleteDataExchange(ctx context.Context, req *analyticshubpb opts = append((*c.CallOptions).DeleteDataExchange[0:len((*c.CallOptions).DeleteDataExchange):len((*c.CallOptions).DeleteDataExchange)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDataExchange(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDataExchange, req, settings.GRPC, c.logger, "DeleteDataExchange") return err }, opts...) return err @@ -1229,7 +1234,7 @@ func (c *gRPCClient) ListListings(ctx context.Context, req *analyticshubpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListListings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListListings, req, settings.GRPC, c.logger, "ListListings") return err }, opts...) if err != nil { @@ -1264,7 +1269,7 @@ func (c *gRPCClient) GetListing(ctx context.Context, req *analyticshubpb.GetList var resp *analyticshubpb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetListing, req, settings.GRPC, c.logger, "GetListing") return err }, opts...) if err != nil { @@ -1282,7 +1287,7 @@ func (c *gRPCClient) CreateListing(ctx context.Context, req *analyticshubpb.Crea var resp *analyticshubpb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateListing, req, settings.GRPC, c.logger, "CreateListing") return err }, opts...) if err != nil { @@ -1300,7 +1305,7 @@ func (c *gRPCClient) UpdateListing(ctx context.Context, req *analyticshubpb.Upda var resp *analyticshubpb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateListing, req, settings.GRPC, c.logger, "UpdateListing") return err }, opts...) if err != nil { @@ -1317,7 +1322,7 @@ func (c *gRPCClient) DeleteListing(ctx context.Context, req *analyticshubpb.Dele opts = append((*c.CallOptions).DeleteListing[0:len((*c.CallOptions).DeleteListing):len((*c.CallOptions).DeleteListing)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteListing(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteListing, req, settings.GRPC, c.logger, "DeleteListing") return err }, opts...) return err @@ -1332,7 +1337,7 @@ func (c *gRPCClient) SubscribeListing(ctx context.Context, req *analyticshubpb.S var resp *analyticshubpb.SubscribeListingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SubscribeListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SubscribeListing, req, settings.GRPC, c.logger, "SubscribeListing") return err }, opts...) if err != nil { @@ -1350,7 +1355,7 @@ func (c *gRPCClient) SubscribeDataExchange(ctx context.Context, req *analyticshu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SubscribeDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SubscribeDataExchange, req, settings.GRPC, c.logger, "SubscribeDataExchange") return err }, opts...) if err != nil { @@ -1370,7 +1375,7 @@ func (c *gRPCClient) RefreshSubscription(ctx context.Context, req *analyticshubp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RefreshSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RefreshSubscription, req, settings.GRPC, c.logger, "RefreshSubscription") return err }, opts...) if err != nil { @@ -1390,7 +1395,7 @@ func (c *gRPCClient) GetSubscription(ctx context.Context, req *analyticshubpb.Ge var resp *analyticshubpb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSubscription, req, settings.GRPC, c.logger, "GetSubscription") return err }, opts...) if err != nil { @@ -1419,7 +1424,7 @@ func (c *gRPCClient) ListSubscriptions(ctx context.Context, req *analyticshubpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSubscriptions, req, settings.GRPC, c.logger, "ListSubscriptions") return err }, opts...) if err != nil { @@ -1465,7 +1470,7 @@ func (c *gRPCClient) ListSharedResourceSubscriptions(ctx context.Context, req *a } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSharedResourceSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSharedResourceSubscriptions, req, settings.GRPC, c.logger, "ListSharedResourceSubscriptions") return err }, opts...) if err != nil { @@ -1500,7 +1505,7 @@ func (c *gRPCClient) RevokeSubscription(ctx context.Context, req *analyticshubpb var resp *analyticshubpb.RevokeSubscriptionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RevokeSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RevokeSubscription, req, settings.GRPC, c.logger, "RevokeSubscription") return err }, opts...) if err != nil { @@ -1518,7 +1523,7 @@ func (c *gRPCClient) DeleteSubscription(ctx context.Context, req *analyticshubpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSubscription, req, settings.GRPC, c.logger, "DeleteSubscription") return err }, opts...) if err != nil { @@ -1538,7 +1543,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1556,7 +1561,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1574,7 +1579,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1627,21 +1632,10 @@ func (c *restClient) ListDataExchanges(ctx context.Context, req *analyticshubpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataExchanges") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1716,21 +1710,10 @@ func (c *restClient) ListOrgDataExchanges(ctx context.Context, req *analyticshub } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrgDataExchanges") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1788,17 +1771,7 @@ func (c *restClient) GetDataExchange(ctx context.Context, req *analyticshubpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataExchange") if err != nil { return err } @@ -1855,17 +1828,7 @@ func (c *restClient) CreateDataExchange(ctx context.Context, req *analyticshubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataExchange") if err != nil { return err } @@ -1928,17 +1891,7 @@ func (c *restClient) UpdateDataExchange(ctx context.Context, req *analyticshubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataExchange") if err != nil { return err } @@ -1980,15 +1933,8 @@ func (c *restClient) DeleteDataExchange(ctx context.Context, req *analyticshubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataExchange") + return err }, opts...) } @@ -2036,21 +1982,10 @@ func (c *restClient) ListListings(ctx context.Context, req *analyticshubpb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListListings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2108,17 +2043,7 @@ func (c *restClient) GetListing(ctx context.Context, req *analyticshubpb.GetList httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetListing") if err != nil { return err } @@ -2175,17 +2100,7 @@ func (c *restClient) CreateListing(ctx context.Context, req *analyticshubpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateListing") if err != nil { return err } @@ -2248,17 +2163,7 @@ func (c *restClient) UpdateListing(ctx context.Context, req *analyticshubpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateListing") if err != nil { return err } @@ -2300,15 +2205,8 @@ func (c *restClient) DeleteListing(ctx context.Context, req *analyticshubpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteListing") + return err }, opts...) } @@ -2351,17 +2249,7 @@ func (c *restClient) SubscribeListing(ctx context.Context, req *analyticshubpb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubscribeListing") if err != nil { return err } @@ -2412,21 +2300,10 @@ func (c *restClient) SubscribeDataExchange(ctx context.Context, req *analyticshu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubscribeDataExchange") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2479,21 +2356,10 @@ func (c *restClient) RefreshSubscription(ctx context.Context, req *analyticshubp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RefreshSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2539,17 +2405,7 @@ func (c *restClient) GetSubscription(ctx context.Context, req *analyticshubpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubscription") if err != nil { return err } @@ -2613,21 +2469,10 @@ func (c *restClient) ListSubscriptions(ctx context.Context, req *analyticshubpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubscriptions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2704,21 +2549,10 @@ func (c *restClient) ListSharedResourceSubscriptions(ctx context.Context, req *a } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSharedResourceSubscriptions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2782,17 +2616,7 @@ func (c *restClient) RevokeSubscription(ctx context.Context, req *analyticshubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevokeSubscription") if err != nil { return err } @@ -2836,21 +2660,10 @@ func (c *restClient) DeleteSubscription(ctx context.Context, req *analyticshubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSubscription") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2902,17 +2715,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2963,17 +2766,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3024,17 +2817,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/bigquery/analyticshub/apiv1/analytics_hub_client_example_go123_test.go b/bigquery/analyticshub/apiv1/analytics_hub_client_example_go123_test.go index 999bbec09b7f..d361827a772a 100644 --- a/bigquery/analyticshub/apiv1/analytics_hub_client_example_go123_test.go +++ b/bigquery/analyticshub/apiv1/analytics_hub_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDataExchanges_all() { } for resp, err := range c.ListDataExchanges(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListListings_all() { } for resp, err := range c.ListListings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListOrgDataExchanges_all() { } for resp, err := range c.ListOrgDataExchanges(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListSharedResourceSubscriptions_all() { } for resp, err := range c.ListSharedResourceSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListSubscriptions_all() { } for resp, err := range c.ListSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/analyticshub/apiv1/analyticshubpb/analyticshub.pb.go b/bigquery/analyticshub/apiv1/analyticshubpb/analyticshub.pb.go index da20378d1358..8ede965f79fe 100755 --- a/bigquery/analyticshub/apiv1/analyticshubpb/analyticshub.pb.go +++ b/bigquery/analyticshub/apiv1/analyticshubpb/analyticshub.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto @@ -358,11 +358,9 @@ type DataExchange struct { func (x *DataExchange) Reset() { *x = DataExchange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataExchange) String() string { @@ -373,7 +371,7 @@ func (*DataExchange) ProtoMessage() {} func (x *DataExchange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +465,9 @@ type SharingEnvironmentConfig struct { func (x *SharingEnvironmentConfig) Reset() { *x = SharingEnvironmentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharingEnvironmentConfig) String() string { @@ -482,7 +478,7 @@ func (*SharingEnvironmentConfig) ProtoMessage() {} func (x *SharingEnvironmentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +547,9 @@ type DataProvider struct { func (x *DataProvider) Reset() { *x = DataProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProvider) String() string { @@ -566,7 +560,7 @@ func (*DataProvider) ProtoMessage() {} func (x *DataProvider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +604,9 @@ type Publisher struct { func (x *Publisher) Reset() { *x = Publisher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Publisher) String() string { @@ -625,7 +617,7 @@ func (*Publisher) ProtoMessage() {} func (x *Publisher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +662,9 @@ type DestinationDatasetReference struct { func (x *DestinationDatasetReference) Reset() { *x = DestinationDatasetReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationDatasetReference) String() string { @@ -685,7 +675,7 @@ func (*DestinationDatasetReference) ProtoMessage() {} func (x *DestinationDatasetReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +730,9 @@ type DestinationDataset struct { func (x *DestinationDataset) Reset() { *x = DestinationDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationDataset) String() string { @@ -755,7 +743,7 @@ func (*DestinationDataset) ProtoMessage() {} func (x *DestinationDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +854,9 @@ type Listing struct { func (x *Listing) Reset() { *x = Listing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing) String() string { @@ -881,7 +867,7 @@ func (*Listing) ProtoMessage() {} func (x *Listing) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1038,9 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription) String() string { @@ -1067,7 +1051,7 @@ func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1198,11 +1182,9 @@ type ListDataExchangesRequest struct { func (x *ListDataExchangesRequest) Reset() { *x = ListDataExchangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataExchangesRequest) String() string { @@ -1213,7 +1195,7 @@ func (*ListDataExchangesRequest) ProtoMessage() {} func (x *ListDataExchangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1245,9 @@ type ListDataExchangesResponse struct { func (x *ListDataExchangesResponse) Reset() { *x = ListDataExchangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataExchangesResponse) String() string { @@ -1278,7 +1258,7 @@ func (*ListDataExchangesResponse) ProtoMessage() {} func (x *ListDataExchangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1327,11 +1307,9 @@ type ListOrgDataExchangesRequest struct { func (x *ListOrgDataExchangesRequest) Reset() { *x = ListOrgDataExchangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrgDataExchangesRequest) String() string { @@ -1342,7 +1320,7 @@ func (*ListOrgDataExchangesRequest) ProtoMessage() {} func (x *ListOrgDataExchangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1371,9 @@ type ListOrgDataExchangesResponse struct { func (x *ListOrgDataExchangesResponse) Reset() { *x = ListOrgDataExchangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrgDataExchangesResponse) String() string { @@ -1408,7 +1384,7 @@ func (*ListOrgDataExchangesResponse) ProtoMessage() {} func (x *ListOrgDataExchangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1450,11 +1426,9 @@ type GetDataExchangeRequest struct { func (x *GetDataExchangeRequest) Reset() { *x = GetDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataExchangeRequest) String() string { @@ -1465,7 +1439,7 @@ func (*GetDataExchangeRequest) ProtoMessage() {} func (x *GetDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1508,11 +1482,9 @@ type CreateDataExchangeRequest struct { func (x *CreateDataExchangeRequest) Reset() { *x = CreateDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataExchangeRequest) String() string { @@ -1523,7 +1495,7 @@ func (*CreateDataExchangeRequest) ProtoMessage() {} func (x *CreateDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1575,11 +1547,9 @@ type UpdateDataExchangeRequest struct { func (x *UpdateDataExchangeRequest) Reset() { *x = UpdateDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataExchangeRequest) String() string { @@ -1590,7 +1560,7 @@ func (*UpdateDataExchangeRequest) ProtoMessage() {} func (x *UpdateDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1632,11 +1602,9 @@ type DeleteDataExchangeRequest struct { func (x *DeleteDataExchangeRequest) Reset() { *x = DeleteDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataExchangeRequest) String() string { @@ -1647,7 +1615,7 @@ func (*DeleteDataExchangeRequest) ProtoMessage() {} func (x *DeleteDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1688,11 +1656,9 @@ type ListListingsRequest struct { func (x *ListListingsRequest) Reset() { *x = ListListingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListListingsRequest) String() string { @@ -1703,7 +1669,7 @@ func (*ListListingsRequest) ProtoMessage() {} func (x *ListListingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1753,11 +1719,9 @@ type ListListingsResponse struct { func (x *ListListingsResponse) Reset() { *x = ListListingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListListingsResponse) String() string { @@ -1768,7 +1732,7 @@ func (*ListListingsResponse) ProtoMessage() {} func (x *ListListingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1810,11 +1774,9 @@ type GetListingRequest struct { func (x *GetListingRequest) Reset() { *x = GetListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetListingRequest) String() string { @@ -1825,7 +1787,7 @@ func (*GetListingRequest) ProtoMessage() {} func (x *GetListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1868,11 +1830,9 @@ type CreateListingRequest struct { func (x *CreateListingRequest) Reset() { *x = CreateListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateListingRequest) String() string { @@ -1883,7 +1843,7 @@ func (*CreateListingRequest) ProtoMessage() {} func (x *CreateListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1935,11 +1895,9 @@ type UpdateListingRequest struct { func (x *UpdateListingRequest) Reset() { *x = UpdateListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateListingRequest) String() string { @@ -1950,7 +1908,7 @@ func (*UpdateListingRequest) ProtoMessage() {} func (x *UpdateListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1992,11 +1950,9 @@ type DeleteListingRequest struct { func (x *DeleteListingRequest) Reset() { *x = DeleteListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteListingRequest) String() string { @@ -2007,7 +1963,7 @@ func (*DeleteListingRequest) ProtoMessage() {} func (x *DeleteListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2048,11 +2004,9 @@ type SubscribeListingRequest struct { func (x *SubscribeListingRequest) Reset() { *x = SubscribeListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeListingRequest) String() string { @@ -2063,7 +2017,7 @@ func (*SubscribeListingRequest) ProtoMessage() {} func (x *SubscribeListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,11 +2076,9 @@ type SubscribeListingResponse struct { func (x *SubscribeListingResponse) Reset() { *x = SubscribeListingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeListingResponse) String() string { @@ -2137,7 +2089,7 @@ func (*SubscribeListingResponse) ProtoMessage() {} func (x *SubscribeListingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2180,11 +2132,9 @@ type SubscribeDataExchangeRequest struct { func (x *SubscribeDataExchangeRequest) Reset() { *x = SubscribeDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeDataExchangeRequest) String() string { @@ -2195,7 +2145,7 @@ func (*SubscribeDataExchangeRequest) ProtoMessage() {} func (x *SubscribeDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2250,11 +2200,9 @@ type SubscribeDataExchangeResponse struct { func (x *SubscribeDataExchangeResponse) Reset() { *x = SubscribeDataExchangeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeDataExchangeResponse) String() string { @@ -2265,7 +2213,7 @@ func (*SubscribeDataExchangeResponse) ProtoMessage() {} func (x *SubscribeDataExchangeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2300,11 +2248,9 @@ type RefreshSubscriptionRequest struct { func (x *RefreshSubscriptionRequest) Reset() { *x = RefreshSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RefreshSubscriptionRequest) String() string { @@ -2315,7 +2261,7 @@ func (*RefreshSubscriptionRequest) ProtoMessage() {} func (x *RefreshSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2349,11 +2295,9 @@ type RefreshSubscriptionResponse struct { func (x *RefreshSubscriptionResponse) Reset() { *x = RefreshSubscriptionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RefreshSubscriptionResponse) String() string { @@ -2364,7 +2308,7 @@ func (*RefreshSubscriptionResponse) ProtoMessage() {} func (x *RefreshSubscriptionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2399,11 +2343,9 @@ type GetSubscriptionRequest struct { func (x *GetSubscriptionRequest) Reset() { *x = GetSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubscriptionRequest) String() string { @@ -2414,7 +2356,7 @@ func (*GetSubscriptionRequest) ProtoMessage() {} func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2469,11 +2411,9 @@ type ListSubscriptionsRequest struct { func (x *ListSubscriptionsRequest) Reset() { *x = ListSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsRequest) String() string { @@ -2484,7 +2424,7 @@ func (*ListSubscriptionsRequest) ProtoMessage() {} func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2541,11 +2481,9 @@ type ListSubscriptionsResponse struct { func (x *ListSubscriptionsResponse) Reset() { *x = ListSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsResponse) String() string { @@ -2556,7 +2494,7 @@ func (*ListSubscriptionsResponse) ProtoMessage() {} func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2607,11 +2545,9 @@ type ListSharedResourceSubscriptionsRequest struct { func (x *ListSharedResourceSubscriptionsRequest) Reset() { *x = ListSharedResourceSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSharedResourceSubscriptionsRequest) String() string { @@ -2622,7 +2558,7 @@ func (*ListSharedResourceSubscriptionsRequest) ProtoMessage() {} func (x *ListSharedResourceSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2679,11 +2615,9 @@ type ListSharedResourceSubscriptionsResponse struct { func (x *ListSharedResourceSubscriptionsResponse) Reset() { *x = ListSharedResourceSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSharedResourceSubscriptionsResponse) String() string { @@ -2694,7 +2628,7 @@ func (*ListSharedResourceSubscriptionsResponse) ProtoMessage() {} func (x *ListSharedResourceSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2736,11 +2670,9 @@ type RevokeSubscriptionRequest struct { func (x *RevokeSubscriptionRequest) Reset() { *x = RevokeSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevokeSubscriptionRequest) String() string { @@ -2751,7 +2683,7 @@ func (*RevokeSubscriptionRequest) ProtoMessage() {} func (x *RevokeSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2782,11 +2714,9 @@ type RevokeSubscriptionResponse struct { func (x *RevokeSubscriptionResponse) Reset() { *x = RevokeSubscriptionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevokeSubscriptionResponse) String() string { @@ -2797,7 +2727,7 @@ func (*RevokeSubscriptionResponse) ProtoMessage() {} func (x *RevokeSubscriptionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2825,11 +2755,9 @@ type DeleteSubscriptionRequest struct { func (x *DeleteSubscriptionRequest) Reset() { *x = DeleteSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubscriptionRequest) String() string { @@ -2840,7 +2768,7 @@ func (*DeleteSubscriptionRequest) ProtoMessage() {} func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2890,11 +2818,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2905,7 +2831,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2978,11 +2904,9 @@ type SharingEnvironmentConfig_DefaultExchangeConfig struct { func (x *SharingEnvironmentConfig_DefaultExchangeConfig) Reset() { *x = SharingEnvironmentConfig_DefaultExchangeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharingEnvironmentConfig_DefaultExchangeConfig) String() string { @@ -2993,7 +2917,7 @@ func (*SharingEnvironmentConfig_DefaultExchangeConfig) ProtoMessage() {} func (x *SharingEnvironmentConfig_DefaultExchangeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3031,11 +2955,9 @@ type SharingEnvironmentConfig_DcrExchangeConfig struct { func (x *SharingEnvironmentConfig_DcrExchangeConfig) Reset() { *x = SharingEnvironmentConfig_DcrExchangeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SharingEnvironmentConfig_DcrExchangeConfig) String() string { @@ -3046,7 +2968,7 @@ func (*SharingEnvironmentConfig_DcrExchangeConfig) ProtoMessage() {} func (x *SharingEnvironmentConfig_DcrExchangeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3101,11 +3023,9 @@ type Listing_BigQueryDatasetSource struct { func (x *Listing_BigQueryDatasetSource) Reset() { *x = Listing_BigQueryDatasetSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing_BigQueryDatasetSource) String() string { @@ -3116,7 +3036,7 @@ func (*Listing_BigQueryDatasetSource) ProtoMessage() {} func (x *Listing_BigQueryDatasetSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3171,11 +3091,9 @@ type Listing_RestrictedExportConfig struct { func (x *Listing_RestrictedExportConfig) Reset() { *x = Listing_RestrictedExportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing_RestrictedExportConfig) String() string { @@ -3186,7 +3104,7 @@ func (*Listing_RestrictedExportConfig) ProtoMessage() {} func (x *Listing_RestrictedExportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3236,11 +3154,9 @@ type Listing_BigQueryDatasetSource_SelectedResource struct { func (x *Listing_BigQueryDatasetSource_SelectedResource) Reset() { *x = Listing_BigQueryDatasetSource_SelectedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing_BigQueryDatasetSource_SelectedResource) String() string { @@ -3251,7 +3167,7 @@ func (*Listing_BigQueryDatasetSource_SelectedResource) ProtoMessage() {} func (x *Listing_BigQueryDatasetSource_SelectedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3314,11 +3230,9 @@ type Listing_BigQueryDatasetSource_RestrictedExportPolicy struct { func (x *Listing_BigQueryDatasetSource_RestrictedExportPolicy) Reset() { *x = Listing_BigQueryDatasetSource_RestrictedExportPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing_BigQueryDatasetSource_RestrictedExportPolicy) String() string { @@ -3329,7 +3243,7 @@ func (*Listing_BigQueryDatasetSource_RestrictedExportPolicy) ProtoMessage() {} func (x *Listing_BigQueryDatasetSource_RestrictedExportPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3379,11 +3293,9 @@ type Subscription_LinkedResource struct { func (x *Subscription_LinkedResource) Reset() { *x = Subscription_LinkedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription_LinkedResource) String() string { @@ -3394,7 +3306,7 @@ func (*Subscription_LinkedResource) ProtoMessage() {} func (x *Subscription_LinkedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4665,536 +4577,6 @@ func file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_init() { if File_google_cloud_bigquery_analyticshub_v1_analyticshub_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataExchange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SharingEnvironmentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Publisher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DestinationDatasetReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DestinationDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Listing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListDataExchangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDataExchangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListOrgDataExchangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListOrgDataExchangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListListingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListListingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeListingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeDataExchangeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RefreshSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*RefreshSubscriptionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListSharedResourceSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListSharedResourceSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*RevokeSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*RevokeSubscriptionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SharingEnvironmentConfig_DefaultExchangeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SharingEnvironmentConfig_DcrExchangeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Listing_BigQueryDatasetSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Listing_RestrictedExportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Listing_BigQueryDatasetSource_SelectedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Listing_BigQueryDatasetSource_RestrictedExportPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Subscription_LinkedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_bigquery_analyticshub_v1_analyticshub_proto_msgTypes[1].OneofWrappers = []any{ (*SharingEnvironmentConfig_DefaultExchangeConfig_)(nil), diff --git a/bigquery/analyticshub/apiv1/helpers.go b/bigquery/analyticshub/apiv1/helpers.go index db8de1a1903a..fa298cf51115 100755 --- a/bigquery/analyticshub/apiv1/helpers.go +++ b/bigquery/analyticshub/apiv1/helpers.go @@ -18,10 +18,20 @@ package analyticshub import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "analyticshub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/biglake/apiv1/biglakepb/metastore.pb.go b/bigquery/biglake/apiv1/biglakepb/metastore.pb.go index d037d727ef16..b3eb54dadc3f 100755 --- a/bigquery/biglake/apiv1/biglakepb/metastore.pb.go +++ b/bigquery/biglake/apiv1/biglakepb/metastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/biglake/v1/metastore.proto @@ -220,11 +220,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -235,7 +233,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +315,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -332,7 +328,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +447,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -466,7 +460,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +568,9 @@ type CreateCatalogRequest struct { func (x *CreateCatalogRequest) Reset() { *x = CreateCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCatalogRequest) String() string { @@ -589,7 +581,7 @@ func (*CreateCatalogRequest) ProtoMessage() {} func (x *CreateCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +631,9 @@ type DeleteCatalogRequest struct { func (x *DeleteCatalogRequest) Reset() { *x = DeleteCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCatalogRequest) String() string { @@ -654,7 +644,7 @@ func (*DeleteCatalogRequest) ProtoMessage() {} func (x *DeleteCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +680,9 @@ type GetCatalogRequest struct { func (x *GetCatalogRequest) Reset() { *x = GetCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCatalogRequest) String() string { @@ -705,7 +693,7 @@ func (*GetCatalogRequest) ProtoMessage() {} func (x *GetCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +739,9 @@ type ListCatalogsRequest struct { func (x *ListCatalogsRequest) Reset() { *x = ListCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsRequest) String() string { @@ -766,7 +752,7 @@ func (*ListCatalogsRequest) ProtoMessage() {} func (x *ListCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -817,11 +803,9 @@ type ListCatalogsResponse struct { func (x *ListCatalogsResponse) Reset() { *x = ListCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsResponse) String() string { @@ -832,7 +816,7 @@ func (*ListCatalogsResponse) ProtoMessage() {} func (x *ListCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +865,9 @@ type CreateDatabaseRequest struct { func (x *CreateDatabaseRequest) Reset() { *x = CreateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseRequest) String() string { @@ -896,7 +878,7 @@ func (*CreateDatabaseRequest) ProtoMessage() {} func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +928,9 @@ type DeleteDatabaseRequest struct { func (x *DeleteDatabaseRequest) Reset() { *x = DeleteDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatabaseRequest) String() string { @@ -961,7 +941,7 @@ func (*DeleteDatabaseRequest) ProtoMessage() {} func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +985,9 @@ type UpdateDatabaseRequest struct { func (x *UpdateDatabaseRequest) Reset() { *x = UpdateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseRequest) String() string { @@ -1020,7 +998,7 @@ func (*UpdateDatabaseRequest) ProtoMessage() {} func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1041,9 @@ type GetDatabaseRequest struct { func (x *GetDatabaseRequest) Reset() { *x = GetDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseRequest) String() string { @@ -1078,7 +1054,7 @@ func (*GetDatabaseRequest) ProtoMessage() {} func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1101,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -1140,7 +1114,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1191,11 +1165,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -1206,7 +1178,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1227,9 @@ type CreateTableRequest struct { func (x *CreateTableRequest) Reset() { *x = CreateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableRequest) String() string { @@ -1270,7 +1240,7 @@ func (*CreateTableRequest) ProtoMessage() {} func (x *CreateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1320,11 +1290,9 @@ type DeleteTableRequest struct { func (x *DeleteTableRequest) Reset() { *x = DeleteTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTableRequest) String() string { @@ -1335,7 +1303,7 @@ func (*DeleteTableRequest) ProtoMessage() {} func (x *DeleteTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1379,11 +1347,9 @@ type UpdateTableRequest struct { func (x *UpdateTableRequest) Reset() { *x = UpdateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTableRequest) String() string { @@ -1394,7 +1360,7 @@ func (*UpdateTableRequest) ProtoMessage() {} func (x *UpdateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1407,9 @@ type RenameTableRequest struct { func (x *RenameTableRequest) Reset() { *x = RenameTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTableRequest) String() string { @@ -1456,7 +1420,7 @@ func (*RenameTableRequest) ProtoMessage() {} func (x *RenameTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,11 +1463,9 @@ type GetTableRequest struct { func (x *GetTableRequest) Reset() { *x = GetTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableRequest) String() string { @@ -1514,7 +1476,7 @@ func (*GetTableRequest) ProtoMessage() {} func (x *GetTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,11 +1525,9 @@ type ListTablesRequest struct { func (x *ListTablesRequest) Reset() { *x = ListTablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesRequest) String() string { @@ -1578,7 +1538,7 @@ func (*ListTablesRequest) ProtoMessage() {} func (x *ListTablesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1596,9 @@ type ListTablesResponse struct { func (x *ListTablesResponse) Reset() { *x = ListTablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesResponse) String() string { @@ -1651,7 +1609,7 @@ func (*ListTablesResponse) ProtoMessage() {} func (x *ListTablesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1695,11 +1653,9 @@ type HiveDatabaseOptions struct { func (x *HiveDatabaseOptions) Reset() { *x = HiveDatabaseOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveDatabaseOptions) String() string { @@ -1710,7 +1666,7 @@ func (*HiveDatabaseOptions) ProtoMessage() {} func (x *HiveDatabaseOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1711,9 @@ type HiveTableOptions struct { func (x *HiveTableOptions) Reset() { *x = HiveTableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions) String() string { @@ -1770,7 +1724,7 @@ func (*HiveTableOptions) ProtoMessage() {} func (x *HiveTableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1772,9 @@ type HiveTableOptions_SerDeInfo struct { func (x *HiveTableOptions_SerDeInfo) Reset() { *x = HiveTableOptions_SerDeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions_SerDeInfo) String() string { @@ -1833,7 +1785,7 @@ func (*HiveTableOptions_SerDeInfo) ProtoMessage() {} func (x *HiveTableOptions_SerDeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1874,11 +1826,9 @@ type HiveTableOptions_StorageDescriptor struct { func (x *HiveTableOptions_StorageDescriptor) Reset() { *x = HiveTableOptions_StorageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions_StorageDescriptor) String() string { @@ -1889,7 +1839,7 @@ func (*HiveTableOptions_StorageDescriptor) ProtoMessage() {} func (x *HiveTableOptions_StorageDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2604,308 +2554,6 @@ func file_google_cloud_bigquery_biglake_v1_metastore_proto_init() { if File_google_cloud_bigquery_biglake_v1_metastore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RenameTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*HiveDatabaseOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions_SerDeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions_StorageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_biglake_v1_metastore_proto_msgTypes[1].OneofWrappers = []any{ (*Database_HiveOptions)(nil), } diff --git a/bigquery/biglake/apiv1/helpers.go b/bigquery/biglake/apiv1/helpers.go index 71411ffb3cdd..38aea732d1c9 100755 --- a/bigquery/biglake/apiv1/helpers.go +++ b/bigquery/biglake/apiv1/helpers.go @@ -18,10 +18,20 @@ package biglake import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "biglake.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/biglake/apiv1/metastore_client.go b/bigquery/biglake/apiv1/metastore_client.go index 1d2a2fa71ae2..0f3cb249f522 100755 --- a/bigquery/biglake/apiv1/metastore_client.go +++ b/bigquery/biglake/apiv1/metastore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( biglakepb "cloud.google.com/go/bigquery/biglake/apiv1/biglakepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -621,6 +620,8 @@ type metastoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetastoreClient creates a new metastore service client based on gRPC. @@ -660,6 +661,7 @@ func NewMetastoreClient(ctx context.Context, opts ...option.ClientOption) (*Meta connPool: connPool, metastoreClient: biglakepb.NewMetastoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -706,6 +708,8 @@ type metastoreRESTClient struct { // Points back to the CallOptions field of the containing MetastoreClient CallOptions **MetastoreCallOptions + + logger *slog.Logger } // NewMetastoreRESTClient creates a new metastore service rest client. @@ -736,6 +740,7 @@ func NewMetastoreRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -788,7 +793,7 @@ func (c *metastoreGRPCClient) CreateCatalog(ctx context.Context, req *biglakepb. var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateCatalog, req, settings.GRPC, c.logger, "CreateCatalog") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *metastoreGRPCClient) DeleteCatalog(ctx context.Context, req *biglakepb. var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteCatalog, req, settings.GRPC, c.logger, "DeleteCatalog") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *metastoreGRPCClient) GetCatalog(ctx context.Context, req *biglakepb.Get var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetCatalog, req, settings.GRPC, c.logger, "GetCatalog") return err }, opts...) if err != nil { @@ -853,7 +858,7 @@ func (c *metastoreGRPCClient) ListCatalogs(ctx context.Context, req *biglakepb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListCatalogs, req, settings.GRPC, c.logger, "ListCatalogs") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *metastoreGRPCClient) CreateDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateDatabase, req, settings.GRPC, c.logger, "CreateDatabase") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *metastoreGRPCClient) DeleteDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteDatabase, req, settings.GRPC, c.logger, "DeleteDatabase") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *metastoreGRPCClient) UpdateDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.UpdateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.UpdateDatabase, req, settings.GRPC, c.logger, "UpdateDatabase") return err }, opts...) if err != nil { @@ -942,7 +947,7 @@ func (c *metastoreGRPCClient) GetDatabase(ctx context.Context, req *biglakepb.Ge var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetDatabase, req, settings.GRPC, c.logger, "GetDatabase") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *metastoreGRPCClient) ListDatabases(ctx context.Context, req *biglakepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *metastoreGRPCClient) CreateTable(ctx context.Context, req *biglakepb.Cr var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateTable, req, settings.GRPC, c.logger, "CreateTable") return err }, opts...) if err != nil { @@ -1024,7 +1029,7 @@ func (c *metastoreGRPCClient) DeleteTable(ctx context.Context, req *biglakepb.De var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteTable, req, settings.GRPC, c.logger, "DeleteTable") return err }, opts...) if err != nil { @@ -1042,7 +1047,7 @@ func (c *metastoreGRPCClient) UpdateTable(ctx context.Context, req *biglakepb.Up var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.UpdateTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.UpdateTable, req, settings.GRPC, c.logger, "UpdateTable") return err }, opts...) if err != nil { @@ -1060,7 +1065,7 @@ func (c *metastoreGRPCClient) RenameTable(ctx context.Context, req *biglakepb.Re var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.RenameTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.RenameTable, req, settings.GRPC, c.logger, "RenameTable") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *metastoreGRPCClient) GetTable(ctx context.Context, req *biglakepb.GetTa var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetTable, req, settings.GRPC, c.logger, "GetTable") return err }, opts...) if err != nil { @@ -1107,7 +1112,7 @@ func (c *metastoreGRPCClient) ListTables(ctx context.Context, req *biglakepb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListTables(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListTables, req, settings.GRPC, c.logger, "ListTables") return err }, opts...) if err != nil { @@ -1174,17 +1179,7 @@ func (c *metastoreRESTClient) CreateCatalog(ctx context.Context, req *biglakepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCatalog") if err != nil { return err } @@ -1234,17 +1229,7 @@ func (c *metastoreRESTClient) DeleteCatalog(ctx context.Context, req *biglakepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCatalog") if err != nil { return err } @@ -1294,17 +1279,7 @@ func (c *metastoreRESTClient) GetCatalog(ctx context.Context, req *biglakepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCatalog") if err != nil { return err } @@ -1366,21 +1341,10 @@ func (c *metastoreRESTClient) ListCatalogs(ctx context.Context, req *biglakepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1451,17 +1415,7 @@ func (c *metastoreRESTClient) CreateDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatabase") if err != nil { return err } @@ -1511,17 +1465,7 @@ func (c *metastoreRESTClient) DeleteDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDatabase") if err != nil { return err } @@ -1585,17 +1529,7 @@ func (c *metastoreRESTClient) UpdateDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatabase") if err != nil { return err } @@ -1645,17 +1579,7 @@ func (c *metastoreRESTClient) GetDatabase(ctx context.Context, req *biglakepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatabase") if err != nil { return err } @@ -1717,21 +1641,10 @@ func (c *metastoreRESTClient) ListDatabases(ctx context.Context, req *biglakepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1802,17 +1715,7 @@ func (c *metastoreRESTClient) CreateTable(ctx context.Context, req *biglakepb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTable") if err != nil { return err } @@ -1862,17 +1765,7 @@ func (c *metastoreRESTClient) DeleteTable(ctx context.Context, req *biglakepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTable") if err != nil { return err } @@ -1936,17 +1829,7 @@ func (c *metastoreRESTClient) UpdateTable(ctx context.Context, req *biglakepb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTable") if err != nil { return err } @@ -2002,17 +1885,7 @@ func (c *metastoreRESTClient) RenameTable(ctx context.Context, req *biglakepb.Re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTable") if err != nil { return err } @@ -2062,17 +1935,7 @@ func (c *metastoreRESTClient) GetTable(ctx context.Context, req *biglakepb.GetTa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTable") if err != nil { return err } @@ -2137,21 +2000,10 @@ func (c *metastoreRESTClient) ListTables(ctx context.Context, req *biglakepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTables") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/bigquery/biglake/apiv1/metastore_client_example_go123_test.go b/bigquery/biglake/apiv1/metastore_client_example_go123_test.go index 7d2ad32f6534..41f7c9c363af 100644 --- a/bigquery/biglake/apiv1/metastore_client_example_go123_test.go +++ b/bigquery/biglake/apiv1/metastore_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMetastoreClient_ListCatalogs_all() { } for resp, err := range c.ListCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleMetastoreClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleMetastoreClient_ListTables_all() { } for resp, err := range c.ListTables(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/biglake/apiv1alpha1/biglakepb/metastore.pb.go b/bigquery/biglake/apiv1alpha1/biglakepb/metastore.pb.go index 6c73df9ba0a7..0127436e20c0 100755 --- a/bigquery/biglake/apiv1alpha1/biglakepb/metastore.pb.go +++ b/bigquery/biglake/apiv1alpha1/biglakepb/metastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/biglake/v1alpha1/metastore.proto @@ -324,11 +324,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -339,7 +337,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +419,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -436,7 +432,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +551,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -570,7 +564,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +679,9 @@ type Lock struct { func (x *Lock) Reset() { *x = Lock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lock) String() string { @@ -700,7 +692,7 @@ func (*Lock) ProtoMessage() {} func (x *Lock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,11 +780,9 @@ type CreateCatalogRequest struct { func (x *CreateCatalogRequest) Reset() { *x = CreateCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCatalogRequest) String() string { @@ -803,7 +793,7 @@ func (*CreateCatalogRequest) ProtoMessage() {} func (x *CreateCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,11 +843,9 @@ type DeleteCatalogRequest struct { func (x *DeleteCatalogRequest) Reset() { *x = DeleteCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCatalogRequest) String() string { @@ -868,7 +856,7 @@ func (*DeleteCatalogRequest) ProtoMessage() {} func (x *DeleteCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +892,9 @@ type GetCatalogRequest struct { func (x *GetCatalogRequest) Reset() { *x = GetCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCatalogRequest) String() string { @@ -919,7 +905,7 @@ func (*GetCatalogRequest) ProtoMessage() {} func (x *GetCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,11 +951,9 @@ type ListCatalogsRequest struct { func (x *ListCatalogsRequest) Reset() { *x = ListCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsRequest) String() string { @@ -980,7 +964,7 @@ func (*ListCatalogsRequest) ProtoMessage() {} func (x *ListCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,11 +1015,9 @@ type ListCatalogsResponse struct { func (x *ListCatalogsResponse) Reset() { *x = ListCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsResponse) String() string { @@ -1046,7 +1028,7 @@ func (*ListCatalogsResponse) ProtoMessage() {} func (x *ListCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1077,9 @@ type CreateDatabaseRequest struct { func (x *CreateDatabaseRequest) Reset() { *x = CreateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseRequest) String() string { @@ -1110,7 +1090,7 @@ func (*CreateDatabaseRequest) ProtoMessage() {} func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,11 +1140,9 @@ type DeleteDatabaseRequest struct { func (x *DeleteDatabaseRequest) Reset() { *x = DeleteDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatabaseRequest) String() string { @@ -1175,7 +1153,7 @@ func (*DeleteDatabaseRequest) ProtoMessage() {} func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,11 +1197,9 @@ type UpdateDatabaseRequest struct { func (x *UpdateDatabaseRequest) Reset() { *x = UpdateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseRequest) String() string { @@ -1234,7 +1210,7 @@ func (*UpdateDatabaseRequest) ProtoMessage() {} func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1277,11 +1253,9 @@ type GetDatabaseRequest struct { func (x *GetDatabaseRequest) Reset() { *x = GetDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseRequest) String() string { @@ -1292,7 +1266,7 @@ func (*GetDatabaseRequest) ProtoMessage() {} func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1339,11 +1313,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -1354,7 +1326,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,11 +1377,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -1420,7 +1390,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1469,11 +1439,9 @@ type CreateTableRequest struct { func (x *CreateTableRequest) Reset() { *x = CreateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableRequest) String() string { @@ -1484,7 +1452,7 @@ func (*CreateTableRequest) ProtoMessage() {} func (x *CreateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1502,9 @@ type DeleteTableRequest struct { func (x *DeleteTableRequest) Reset() { *x = DeleteTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTableRequest) String() string { @@ -1549,7 +1515,7 @@ func (*DeleteTableRequest) ProtoMessage() {} func (x *DeleteTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,11 +1559,9 @@ type UpdateTableRequest struct { func (x *UpdateTableRequest) Reset() { *x = UpdateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTableRequest) String() string { @@ -1608,7 +1572,7 @@ func (*UpdateTableRequest) ProtoMessage() {} func (x *UpdateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1655,11 +1619,9 @@ type RenameTableRequest struct { func (x *RenameTableRequest) Reset() { *x = RenameTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTableRequest) String() string { @@ -1670,7 +1632,7 @@ func (*RenameTableRequest) ProtoMessage() {} func (x *RenameTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,11 +1675,9 @@ type GetTableRequest struct { func (x *GetTableRequest) Reset() { *x = GetTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableRequest) String() string { @@ -1728,7 +1688,7 @@ func (*GetTableRequest) ProtoMessage() {} func (x *GetTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1777,11 +1737,9 @@ type ListTablesRequest struct { func (x *ListTablesRequest) Reset() { *x = ListTablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesRequest) String() string { @@ -1792,7 +1750,7 @@ func (*ListTablesRequest) ProtoMessage() {} func (x *ListTablesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1808,9 @@ type ListTablesResponse struct { func (x *ListTablesResponse) Reset() { *x = ListTablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesResponse) String() string { @@ -1865,7 +1821,7 @@ func (*ListTablesResponse) ProtoMessage() {} func (x *ListTablesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1911,11 +1867,9 @@ type CreateLockRequest struct { func (x *CreateLockRequest) Reset() { *x = CreateLockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLockRequest) String() string { @@ -1926,7 +1880,7 @@ func (*CreateLockRequest) ProtoMessage() {} func (x *CreateLockRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1969,11 +1923,9 @@ type DeleteLockRequest struct { func (x *DeleteLockRequest) Reset() { *x = DeleteLockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLockRequest) String() string { @@ -1984,7 +1936,7 @@ func (*DeleteLockRequest) ProtoMessage() {} func (x *DeleteLockRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1972,9 @@ type CheckLockRequest struct { func (x *CheckLockRequest) Reset() { *x = CheckLockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckLockRequest) String() string { @@ -2035,7 +1985,7 @@ func (*CheckLockRequest) ProtoMessage() {} func (x *CheckLockRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,11 +2032,9 @@ type ListLocksRequest struct { func (x *ListLocksRequest) Reset() { *x = ListLocksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLocksRequest) String() string { @@ -2097,7 +2045,7 @@ func (*ListLocksRequest) ProtoMessage() {} func (x *ListLocksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,11 +2096,9 @@ type ListLocksResponse struct { func (x *ListLocksResponse) Reset() { *x = ListLocksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLocksResponse) String() string { @@ -2163,7 +2109,7 @@ func (*ListLocksResponse) ProtoMessage() {} func (x *ListLocksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2207,11 +2153,9 @@ type HiveDatabaseOptions struct { func (x *HiveDatabaseOptions) Reset() { *x = HiveDatabaseOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveDatabaseOptions) String() string { @@ -2222,7 +2166,7 @@ func (*HiveDatabaseOptions) ProtoMessage() {} func (x *HiveDatabaseOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2267,11 +2211,9 @@ type HiveTableOptions struct { func (x *HiveTableOptions) Reset() { *x = HiveTableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions) String() string { @@ -2282,7 +2224,7 @@ func (*HiveTableOptions) ProtoMessage() {} func (x *HiveTableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2330,11 +2272,9 @@ type HiveTableOptions_SerDeInfo struct { func (x *HiveTableOptions_SerDeInfo) Reset() { *x = HiveTableOptions_SerDeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions_SerDeInfo) String() string { @@ -2345,7 +2285,7 @@ func (*HiveTableOptions_SerDeInfo) ProtoMessage() {} func (x *HiveTableOptions_SerDeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2386,11 +2326,9 @@ type HiveTableOptions_StorageDescriptor struct { func (x *HiveTableOptions_StorageDescriptor) Reset() { *x = HiveTableOptions_StorageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveTableOptions_StorageDescriptor) String() string { @@ -2401,7 +2339,7 @@ func (*HiveTableOptions_StorageDescriptor) ProtoMessage() {} func (x *HiveTableOptions_StorageDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3289,380 +3227,6 @@ func file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_init() { if File_google_cloud_bigquery_biglake_v1alpha1_metastore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Lock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RenameTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateLockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CheckLockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListLocksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListLocksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*HiveDatabaseOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions_SerDeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*HiveTableOptions_StorageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_biglake_v1alpha1_metastore_proto_msgTypes[1].OneofWrappers = []any{ (*Database_HiveOptions)(nil), } diff --git a/bigquery/biglake/apiv1alpha1/helpers.go b/bigquery/biglake/apiv1alpha1/helpers.go index 71411ffb3cdd..38aea732d1c9 100755 --- a/bigquery/biglake/apiv1alpha1/helpers.go +++ b/bigquery/biglake/apiv1alpha1/helpers.go @@ -18,10 +18,20 @@ package biglake import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "biglake.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/biglake/apiv1alpha1/metastore_client.go b/bigquery/biglake/apiv1alpha1/metastore_client.go index 0a51c2cb8323..2b5bc1698949 100755 --- a/bigquery/biglake/apiv1alpha1/metastore_client.go +++ b/bigquery/biglake/apiv1alpha1/metastore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( biglakepb "cloud.google.com/go/bigquery/biglake/apiv1alpha1/biglakepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -749,6 +748,8 @@ type metastoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetastoreClient creates a new metastore service client based on gRPC. @@ -788,6 +789,7 @@ func NewMetastoreClient(ctx context.Context, opts ...option.ClientOption) (*Meta connPool: connPool, metastoreClient: biglakepb.NewMetastoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -834,6 +836,8 @@ type metastoreRESTClient struct { // Points back to the CallOptions field of the containing MetastoreClient CallOptions **MetastoreCallOptions + + logger *slog.Logger } // NewMetastoreRESTClient creates a new metastore service rest client. @@ -864,6 +868,7 @@ func NewMetastoreRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -916,7 +921,7 @@ func (c *metastoreGRPCClient) CreateCatalog(ctx context.Context, req *biglakepb. var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateCatalog, req, settings.GRPC, c.logger, "CreateCatalog") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *metastoreGRPCClient) DeleteCatalog(ctx context.Context, req *biglakepb. var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteCatalog, req, settings.GRPC, c.logger, "DeleteCatalog") return err }, opts...) if err != nil { @@ -952,7 +957,7 @@ func (c *metastoreGRPCClient) GetCatalog(ctx context.Context, req *biglakepb.Get var resp *biglakepb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetCatalog, req, settings.GRPC, c.logger, "GetCatalog") return err }, opts...) if err != nil { @@ -981,7 +986,7 @@ func (c *metastoreGRPCClient) ListCatalogs(ctx context.Context, req *biglakepb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListCatalogs, req, settings.GRPC, c.logger, "ListCatalogs") return err }, opts...) if err != nil { @@ -1016,7 +1021,7 @@ func (c *metastoreGRPCClient) CreateDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateDatabase, req, settings.GRPC, c.logger, "CreateDatabase") return err }, opts...) if err != nil { @@ -1034,7 +1039,7 @@ func (c *metastoreGRPCClient) DeleteDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteDatabase, req, settings.GRPC, c.logger, "DeleteDatabase") return err }, opts...) if err != nil { @@ -1052,7 +1057,7 @@ func (c *metastoreGRPCClient) UpdateDatabase(ctx context.Context, req *biglakepb var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.UpdateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.UpdateDatabase, req, settings.GRPC, c.logger, "UpdateDatabase") return err }, opts...) if err != nil { @@ -1070,7 +1075,7 @@ func (c *metastoreGRPCClient) GetDatabase(ctx context.Context, req *biglakepb.Ge var resp *biglakepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetDatabase, req, settings.GRPC, c.logger, "GetDatabase") return err }, opts...) if err != nil { @@ -1099,7 +1104,7 @@ func (c *metastoreGRPCClient) ListDatabases(ctx context.Context, req *biglakepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -1134,7 +1139,7 @@ func (c *metastoreGRPCClient) CreateTable(ctx context.Context, req *biglakepb.Cr var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateTable, req, settings.GRPC, c.logger, "CreateTable") return err }, opts...) if err != nil { @@ -1152,7 +1157,7 @@ func (c *metastoreGRPCClient) DeleteTable(ctx context.Context, req *biglakepb.De var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.DeleteTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.DeleteTable, req, settings.GRPC, c.logger, "DeleteTable") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *metastoreGRPCClient) UpdateTable(ctx context.Context, req *biglakepb.Up var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.UpdateTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.UpdateTable, req, settings.GRPC, c.logger, "UpdateTable") return err }, opts...) if err != nil { @@ -1188,7 +1193,7 @@ func (c *metastoreGRPCClient) RenameTable(ctx context.Context, req *biglakepb.Re var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.RenameTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.RenameTable, req, settings.GRPC, c.logger, "RenameTable") return err }, opts...) if err != nil { @@ -1206,7 +1211,7 @@ func (c *metastoreGRPCClient) GetTable(ctx context.Context, req *biglakepb.GetTa var resp *biglakepb.Table err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.GetTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.GetTable, req, settings.GRPC, c.logger, "GetTable") return err }, opts...) if err != nil { @@ -1235,7 +1240,7 @@ func (c *metastoreGRPCClient) ListTables(ctx context.Context, req *biglakepb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListTables(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListTables, req, settings.GRPC, c.logger, "ListTables") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *metastoreGRPCClient) CreateLock(ctx context.Context, req *biglakepb.Cre var resp *biglakepb.Lock err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CreateLock(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CreateLock, req, settings.GRPC, c.logger, "CreateLock") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *metastoreGRPCClient) DeleteLock(ctx context.Context, req *biglakepb.Del opts = append((*c.CallOptions).DeleteLock[0:len((*c.CallOptions).DeleteLock):len((*c.CallOptions).DeleteLock)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metastoreClient.DeleteLock(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metastoreClient.DeleteLock, req, settings.GRPC, c.logger, "DeleteLock") return err }, opts...) return err @@ -1302,7 +1307,7 @@ func (c *metastoreGRPCClient) CheckLock(ctx context.Context, req *biglakepb.Chec var resp *biglakepb.Lock err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.CheckLock(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.CheckLock, req, settings.GRPC, c.logger, "CheckLock") return err }, opts...) if err != nil { @@ -1331,7 +1336,7 @@ func (c *metastoreGRPCClient) ListLocks(ctx context.Context, req *biglakepb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastoreClient.ListLocks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastoreClient.ListLocks, req, settings.GRPC, c.logger, "ListLocks") return err }, opts...) if err != nil { @@ -1398,17 +1403,7 @@ func (c *metastoreRESTClient) CreateCatalog(ctx context.Context, req *biglakepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCatalog") if err != nil { return err } @@ -1458,17 +1453,7 @@ func (c *metastoreRESTClient) DeleteCatalog(ctx context.Context, req *biglakepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCatalog") if err != nil { return err } @@ -1518,17 +1503,7 @@ func (c *metastoreRESTClient) GetCatalog(ctx context.Context, req *biglakepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCatalog") if err != nil { return err } @@ -1590,21 +1565,10 @@ func (c *metastoreRESTClient) ListCatalogs(ctx context.Context, req *biglakepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1675,17 +1639,7 @@ func (c *metastoreRESTClient) CreateDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatabase") if err != nil { return err } @@ -1735,17 +1689,7 @@ func (c *metastoreRESTClient) DeleteDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDatabase") if err != nil { return err } @@ -1809,17 +1753,7 @@ func (c *metastoreRESTClient) UpdateDatabase(ctx context.Context, req *biglakepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatabase") if err != nil { return err } @@ -1869,17 +1803,7 @@ func (c *metastoreRESTClient) GetDatabase(ctx context.Context, req *biglakepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatabase") if err != nil { return err } @@ -1941,21 +1865,10 @@ func (c *metastoreRESTClient) ListDatabases(ctx context.Context, req *biglakepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2026,17 +1939,7 @@ func (c *metastoreRESTClient) CreateTable(ctx context.Context, req *biglakepb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTable") if err != nil { return err } @@ -2086,17 +1989,7 @@ func (c *metastoreRESTClient) DeleteTable(ctx context.Context, req *biglakepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTable") if err != nil { return err } @@ -2160,17 +2053,7 @@ func (c *metastoreRESTClient) UpdateTable(ctx context.Context, req *biglakepb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTable") if err != nil { return err } @@ -2226,17 +2109,7 @@ func (c *metastoreRESTClient) RenameTable(ctx context.Context, req *biglakepb.Re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTable") if err != nil { return err } @@ -2286,17 +2159,7 @@ func (c *metastoreRESTClient) GetTable(ctx context.Context, req *biglakepb.GetTa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTable") if err != nil { return err } @@ -2361,21 +2224,10 @@ func (c *metastoreRESTClient) ListTables(ctx context.Context, req *biglakepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTables") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2445,17 +2297,7 @@ func (c *metastoreRESTClient) CreateLock(ctx context.Context, req *biglakepb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateLock") if err != nil { return err } @@ -2502,15 +2344,8 @@ func (c *metastoreRESTClient) DeleteLock(ctx context.Context, req *biglakepb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLock") + return err }, opts...) } @@ -2553,17 +2388,7 @@ func (c *metastoreRESTClient) CheckLock(ctx context.Context, req *biglakepb.Chec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckLock") if err != nil { return err } @@ -2625,21 +2450,10 @@ func (c *metastoreRESTClient) ListLocks(ctx context.Context, req *biglakepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/bigquery/biglake/apiv1alpha1/metastore_client_example_go123_test.go b/bigquery/biglake/apiv1alpha1/metastore_client_example_go123_test.go index b322d744aa1d..41f39293a492 100644 --- a/bigquery/biglake/apiv1alpha1/metastore_client_example_go123_test.go +++ b/bigquery/biglake/apiv1alpha1/metastore_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMetastoreClient_ListCatalogs_all() { } for resp, err := range c.ListCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleMetastoreClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleMetastoreClient_ListLocks_all() { } for resp, err := range c.ListLocks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleMetastoreClient_ListTables_all() { } for resp, err := range c.ListTables(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/connection/apiv1/connection_client.go b/bigquery/connection/apiv1/connection_client.go index a60e6abc2c39..7da069e17ce8 100755 --- a/bigquery/connection/apiv1/connection_client.go +++ b/bigquery/connection/apiv1/connection_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( connectionpb "cloud.google.com/go/bigquery/connection/apiv1/connectionpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -302,6 +301,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new connection service client based on gRPC. @@ -328,6 +329,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: connectionpb.NewConnectionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -374,6 +376,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new connection service rest client. @@ -391,6 +395,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -443,7 +448,7 @@ func (c *gRPCClient) CreateConnection(ctx context.Context, req *connectionpb.Cre var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnection, req, settings.GRPC, c.logger, "CreateConnection") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *gRPCClient) GetConnection(ctx context.Context, req *connectionpb.GetCon var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnection, req, settings.GRPC, c.logger, "GetConnection") return err }, opts...) if err != nil { @@ -490,7 +495,7 @@ func (c *gRPCClient) ListConnections(ctx context.Context, req *connectionpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { @@ -525,7 +530,7 @@ func (c *gRPCClient) UpdateConnection(ctx context.Context, req *connectionpb.Upd var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnection, req, settings.GRPC, c.logger, "UpdateConnection") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *gRPCClient) DeleteConnection(ctx context.Context, req *connectionpb.Del opts = append((*c.CallOptions).DeleteConnection[0:len((*c.CallOptions).DeleteConnection):len((*c.CallOptions).DeleteConnection)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteConnection(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteConnection, req, settings.GRPC, c.logger, "DeleteConnection") return err }, opts...) return err @@ -557,7 +562,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -575,7 +580,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -593,7 +598,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -645,17 +650,7 @@ func (c *restClient) CreateConnection(ctx context.Context, req *connectionpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnection") if err != nil { return err } @@ -705,17 +700,7 @@ func (c *restClient) GetConnection(ctx context.Context, req *connectionpb.GetCon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnection") if err != nil { return err } @@ -775,21 +760,10 @@ func (c *restClient) ListConnections(ctx context.Context, req *connectionpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -867,17 +841,7 @@ func (c *restClient) UpdateConnection(ctx context.Context, req *connectionpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnection") if err != nil { return err } @@ -924,15 +888,8 @@ func (c *restClient) DeleteConnection(ctx context.Context, req *connectionpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnection") + return err }, opts...) } @@ -977,17 +934,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1046,17 +993,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1118,17 +1055,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/bigquery/connection/apiv1/connection_client_example_go123_test.go b/bigquery/connection/apiv1/connection_client_example_go123_test.go index e652f53fbcbc..e230a0668cac 100644 --- a/bigquery/connection/apiv1/connection_client_example_go123_test.go +++ b/bigquery/connection/apiv1/connection_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListConnections_all() { } for resp, err := range c.ListConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/connection/apiv1/connectionpb/connection.pb.go b/bigquery/connection/apiv1/connectionpb/connection.pb.go index a498da39e2a6..86b42a9d4d25 100755 --- a/bigquery/connection/apiv1/connectionpb/connection.pb.go +++ b/bigquery/connection/apiv1/connectionpb/connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/connection/v1/connection.proto @@ -114,11 +114,9 @@ type CreateConnectionRequest struct { func (x *CreateConnectionRequest) Reset() { *x = CreateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionRequest) String() string { @@ -129,7 +127,7 @@ func (*CreateConnectionRequest) ProtoMessage() {} func (x *CreateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type GetConnectionRequest struct { func (x *GetConnectionRequest) Reset() { *x = GetConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionRequest) String() string { @@ -194,7 +190,7 @@ func (*GetConnectionRequest) ProtoMessage() {} func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +230,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -249,7 +243,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +294,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -315,7 +307,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type UpdateConnectionRequest struct { func (x *UpdateConnectionRequest) Reset() { *x = UpdateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionRequest) String() string { @@ -377,7 +367,7 @@ func (*UpdateConnectionRequest) ProtoMessage() {} func (x *UpdateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,11 +416,9 @@ type DeleteConnectionRequest struct { func (x *DeleteConnectionRequest) Reset() { *x = DeleteConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionRequest) String() string { @@ -441,7 +429,7 @@ func (*DeleteConnectionRequest) ProtoMessage() {} func (x *DeleteConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +487,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -514,7 +500,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +693,9 @@ type CloudSqlProperties struct { func (x *CloudSqlProperties) Reset() { *x = CloudSqlProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlProperties) String() string { @@ -722,7 +706,7 @@ func (*CloudSqlProperties) ProtoMessage() {} func (x *CloudSqlProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +770,9 @@ type CloudSqlCredential struct { func (x *CloudSqlCredential) Reset() { *x = CloudSqlCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlCredential) String() string { @@ -801,7 +783,7 @@ func (*CloudSqlCredential) ProtoMessage() {} func (x *CloudSqlCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -875,11 +857,9 @@ type CloudSpannerProperties struct { func (x *CloudSpannerProperties) Reset() { *x = CloudSpannerProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSpannerProperties) String() string { @@ -890,7 +870,7 @@ func (*CloudSpannerProperties) ProtoMessage() {} func (x *CloudSpannerProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +944,9 @@ type AwsProperties struct { func (x *AwsProperties) Reset() { *x = AwsProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsProperties) String() string { @@ -979,7 +957,7 @@ func (*AwsProperties) ProtoMessage() {} func (x *AwsProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1038,9 @@ type AwsCrossAccountRole struct { func (x *AwsCrossAccountRole) Reset() { *x = AwsCrossAccountRole{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsCrossAccountRole) String() string { @@ -1075,7 +1051,7 @@ func (*AwsCrossAccountRole) ProtoMessage() {} func (x *AwsCrossAccountRole) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1128,11 +1104,9 @@ type AwsAccessRole struct { func (x *AwsAccessRole) Reset() { *x = AwsAccessRole{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAccessRole) String() string { @@ -1143,7 +1117,7 @@ func (*AwsAccessRole) ProtoMessage() {} func (x *AwsAccessRole) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1174,9 @@ type AzureProperties struct { func (x *AzureProperties) Reset() { *x = AzureProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureProperties) String() string { @@ -1215,7 +1187,7 @@ func (*AzureProperties) ProtoMessage() {} func (x *AzureProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1275,9 @@ type CloudResourceProperties struct { func (x *CloudResourceProperties) Reset() { *x = CloudResourceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudResourceProperties) String() string { @@ -1318,7 +1288,7 @@ func (*CloudResourceProperties) ProtoMessage() {} func (x *CloudResourceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1356,11 +1326,9 @@ type MetastoreServiceConfig struct { func (x *MetastoreServiceConfig) Reset() { *x = MetastoreServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetastoreServiceConfig) String() string { @@ -1371,7 +1339,7 @@ func (*MetastoreServiceConfig) ProtoMessage() {} func (x *MetastoreServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1378,9 @@ type SparkHistoryServerConfig struct { func (x *SparkHistoryServerConfig) Reset() { *x = SparkHistoryServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkHistoryServerConfig) String() string { @@ -1425,7 +1391,7 @@ func (*SparkHistoryServerConfig) ProtoMessage() {} func (x *SparkHistoryServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1474,11 +1440,9 @@ type SparkProperties struct { func (x *SparkProperties) Reset() { *x = SparkProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkProperties) String() string { @@ -1489,7 +1453,7 @@ func (*SparkProperties) ProtoMessage() {} func (x *SparkProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1543,11 +1507,9 @@ type SalesforceDataCloudProperties struct { func (x *SalesforceDataCloudProperties) Reset() { *x = SalesforceDataCloudProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SalesforceDataCloudProperties) String() string { @@ -1558,7 +1520,7 @@ func (*SalesforceDataCloudProperties) ProtoMessage() {} func (x *SalesforceDataCloudProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,236 +2071,6 @@ func file_google_cloud_bigquery_connection_v1_connection_proto_init() { if File_google_cloud_bigquery_connection_v1_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CloudSpannerProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AwsProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AwsCrossAccountRole); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AwsAccessRole); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AzureProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CloudResourceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MetastoreServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SparkHistoryServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SparkProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SalesforceDataCloudProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_connection_v1_connection_proto_msgTypes[6].OneofWrappers = []any{ (*Connection_CloudSql)(nil), (*Connection_Aws)(nil), diff --git a/bigquery/connection/apiv1/helpers.go b/bigquery/connection/apiv1/helpers.go index 02d756fe947b..b1d38b75e997 100755 --- a/bigquery/connection/apiv1/helpers.go +++ b/bigquery/connection/apiv1/helpers.go @@ -18,10 +18,20 @@ package connection import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigqueryconnection.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/connection/apiv1beta1/connection_client.go b/bigquery/connection/apiv1beta1/connection_client.go index 4357a43cdb13..b700a2b8a8ea 100755 --- a/bigquery/connection/apiv1beta1/connection_client.go +++ b/bigquery/connection/apiv1beta1/connection_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( connectionpb "cloud.google.com/go/bigquery/connection/apiv1beta1/connectionpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -313,6 +312,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new connection service client based on gRPC. @@ -339,6 +340,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: connectionpb.NewConnectionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -385,6 +387,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new connection service rest client. @@ -402,6 +406,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -454,7 +459,7 @@ func (c *gRPCClient) CreateConnection(ctx context.Context, req *connectionpb.Cre var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnection, req, settings.GRPC, c.logger, "CreateConnection") return err }, opts...) if err != nil { @@ -472,7 +477,7 @@ func (c *gRPCClient) GetConnection(ctx context.Context, req *connectionpb.GetCon var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnection, req, settings.GRPC, c.logger, "GetConnection") return err }, opts...) if err != nil { @@ -490,7 +495,7 @@ func (c *gRPCClient) ListConnections(ctx context.Context, req *connectionpb.List var resp *connectionpb.ListConnectionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *gRPCClient) UpdateConnection(ctx context.Context, req *connectionpb.Upd var resp *connectionpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnection, req, settings.GRPC, c.logger, "UpdateConnection") return err }, opts...) if err != nil { @@ -525,7 +530,7 @@ func (c *gRPCClient) UpdateConnectionCredential(ctx context.Context, req *connec opts = append((*c.CallOptions).UpdateConnectionCredential[0:len((*c.CallOptions).UpdateConnectionCredential):len((*c.CallOptions).UpdateConnectionCredential)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.UpdateConnectionCredential(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.UpdateConnectionCredential, req, settings.GRPC, c.logger, "UpdateConnectionCredential") return err }, opts...) return err @@ -539,7 +544,7 @@ func (c *gRPCClient) DeleteConnection(ctx context.Context, req *connectionpb.Del opts = append((*c.CallOptions).DeleteConnection[0:len((*c.CallOptions).DeleteConnection):len((*c.CallOptions).DeleteConnection)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteConnection(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteConnection, req, settings.GRPC, c.logger, "DeleteConnection") return err }, opts...) return err @@ -554,7 +559,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -572,7 +577,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -590,7 +595,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -642,17 +647,7 @@ func (c *restClient) CreateConnection(ctx context.Context, req *connectionpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnection") if err != nil { return err } @@ -702,17 +697,7 @@ func (c *restClient) GetConnection(ctx context.Context, req *connectionpb.GetCon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnection") if err != nil { return err } @@ -772,17 +757,7 @@ func (c *restClient) ListConnections(ctx context.Context, req *connectionpb.List httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnections") if err != nil { return err } @@ -847,17 +822,7 @@ func (c *restClient) UpdateConnection(ctx context.Context, req *connectionpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnection") if err != nil { return err } @@ -911,15 +876,8 @@ func (c *restClient) UpdateConnectionCredential(ctx context.Context, req *connec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnectionCredential") + return err }, opts...) } @@ -953,15 +911,8 @@ func (c *restClient) DeleteConnection(ctx context.Context, req *connectionpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnection") + return err }, opts...) } @@ -1006,17 +957,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1075,17 +1016,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1147,17 +1078,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/bigquery/connection/apiv1beta1/connectionpb/connection.pb.go b/bigquery/connection/apiv1beta1/connectionpb/connection.pb.go index cc4e96bee429..f8e8f58f2e8e 100755 --- a/bigquery/connection/apiv1beta1/connectionpb/connection.pb.go +++ b/bigquery/connection/apiv1beta1/connectionpb/connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/connection/v1beta1/connection.proto @@ -115,11 +115,9 @@ type CreateConnectionRequest struct { func (x *CreateConnectionRequest) Reset() { *x = CreateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionRequest) String() string { @@ -130,7 +128,7 @@ func (*CreateConnectionRequest) ProtoMessage() {} func (x *CreateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type GetConnectionRequest struct { func (x *GetConnectionRequest) Reset() { *x = GetConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionRequest) String() string { @@ -195,7 +191,7 @@ func (*GetConnectionRequest) ProtoMessage() {} func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +231,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -250,7 +244,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +295,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -316,7 +308,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +355,9 @@ type UpdateConnectionRequest struct { func (x *UpdateConnectionRequest) Reset() { *x = UpdateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionRequest) String() string { @@ -378,7 +368,7 @@ func (*UpdateConnectionRequest) ProtoMessage() {} func (x *UpdateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +420,9 @@ type UpdateConnectionCredentialRequest struct { func (x *UpdateConnectionCredentialRequest) Reset() { *x = UpdateConnectionCredentialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionCredentialRequest) String() string { @@ -445,7 +433,7 @@ func (*UpdateConnectionCredentialRequest) ProtoMessage() {} func (x *UpdateConnectionCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +475,9 @@ type DeleteConnectionRequest struct { func (x *DeleteConnectionRequest) Reset() { *x = DeleteConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionRequest) String() string { @@ -502,7 +488,7 @@ func (*DeleteConnectionRequest) ProtoMessage() {} func (x *DeleteConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +540,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -569,7 +553,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +651,9 @@ type ConnectionCredential struct { func (x *ConnectionCredential) Reset() { *x = ConnectionCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionCredential) String() string { @@ -682,7 +664,7 @@ func (*ConnectionCredential) ProtoMessage() {} func (x *ConnectionCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +729,9 @@ type CloudSqlProperties struct { func (x *CloudSqlProperties) Reset() { *x = CloudSqlProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlProperties) String() string { @@ -762,7 +742,7 @@ func (*CloudSqlProperties) ProtoMessage() {} func (x *CloudSqlProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +806,9 @@ type CloudSqlCredential struct { func (x *CloudSqlCredential) Reset() { *x = CloudSqlCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlCredential) String() string { @@ -841,7 +819,7 @@ func (*CloudSqlCredential) ProtoMessage() {} func (x *CloudSqlCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,140 +1241,6 @@ func file_google_cloud_bigquery_connection_v1beta1_connection_proto_init() { if File_google_cloud_bigquery_connection_v1beta1_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionCredentialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_connection_v1beta1_connection_proto_msgTypes[7].OneofWrappers = []any{ (*Connection_CloudSql)(nil), } diff --git a/bigquery/connection/apiv1beta1/helpers.go b/bigquery/connection/apiv1beta1/helpers.go index 02d756fe947b..b1d38b75e997 100755 --- a/bigquery/connection/apiv1beta1/helpers.go +++ b/bigquery/connection/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package connection import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigqueryconnection.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go b/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go index a4347aa57064..47490715d57c 100755 --- a/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go +++ b/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dataexchangepb "cloud.google.com/go/bigquery/dataexchange/apiv1beta1/dataexchangepb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -641,6 +640,8 @@ type analyticsHubGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnalyticsHubClient creates a new analytics hub service client based on gRPC. @@ -672,6 +673,7 @@ func NewAnalyticsHubClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, analyticsHubClient: dataexchangepb.NewAnalyticsHubServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -719,6 +721,8 @@ type analyticsHubRESTClient struct { // Points back to the CallOptions field of the containing AnalyticsHubClient CallOptions **AnalyticsHubCallOptions + + logger *slog.Logger } // NewAnalyticsHubRESTClient creates a new analytics hub service rest client. @@ -741,6 +745,7 @@ func NewAnalyticsHubRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -804,7 +809,7 @@ func (c *analyticsHubGRPCClient) ListDataExchanges(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.ListDataExchanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.ListDataExchanges, req, settings.GRPC, c.logger, "ListDataExchanges") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *analyticsHubGRPCClient) ListOrgDataExchanges(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.ListOrgDataExchanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.ListOrgDataExchanges, req, settings.GRPC, c.logger, "ListOrgDataExchanges") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *analyticsHubGRPCClient) GetDataExchange(ctx context.Context, req *datae var resp *dataexchangepb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.GetDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.GetDataExchange, req, settings.GRPC, c.logger, "GetDataExchange") return err }, opts...) if err != nil { @@ -903,7 +908,7 @@ func (c *analyticsHubGRPCClient) CreateDataExchange(ctx context.Context, req *da var resp *dataexchangepb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.CreateDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.CreateDataExchange, req, settings.GRPC, c.logger, "CreateDataExchange") return err }, opts...) if err != nil { @@ -921,7 +926,7 @@ func (c *analyticsHubGRPCClient) UpdateDataExchange(ctx context.Context, req *da var resp *dataexchangepb.DataExchange err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.UpdateDataExchange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.UpdateDataExchange, req, settings.GRPC, c.logger, "UpdateDataExchange") return err }, opts...) if err != nil { @@ -938,7 +943,7 @@ func (c *analyticsHubGRPCClient) DeleteDataExchange(ctx context.Context, req *da opts = append((*c.CallOptions).DeleteDataExchange[0:len((*c.CallOptions).DeleteDataExchange):len((*c.CallOptions).DeleteDataExchange)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsHubClient.DeleteDataExchange(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsHubClient.DeleteDataExchange, req, settings.GRPC, c.logger, "DeleteDataExchange") return err }, opts...) return err @@ -964,7 +969,7 @@ func (c *analyticsHubGRPCClient) ListListings(ctx context.Context, req *dataexch } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.ListListings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.ListListings, req, settings.GRPC, c.logger, "ListListings") return err }, opts...) if err != nil { @@ -999,7 +1004,7 @@ func (c *analyticsHubGRPCClient) GetListing(ctx context.Context, req *dataexchan var resp *dataexchangepb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.GetListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.GetListing, req, settings.GRPC, c.logger, "GetListing") return err }, opts...) if err != nil { @@ -1017,7 +1022,7 @@ func (c *analyticsHubGRPCClient) CreateListing(ctx context.Context, req *dataexc var resp *dataexchangepb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.CreateListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.CreateListing, req, settings.GRPC, c.logger, "CreateListing") return err }, opts...) if err != nil { @@ -1035,7 +1040,7 @@ func (c *analyticsHubGRPCClient) UpdateListing(ctx context.Context, req *dataexc var resp *dataexchangepb.Listing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.UpdateListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.UpdateListing, req, settings.GRPC, c.logger, "UpdateListing") return err }, opts...) if err != nil { @@ -1052,7 +1057,7 @@ func (c *analyticsHubGRPCClient) DeleteListing(ctx context.Context, req *dataexc opts = append((*c.CallOptions).DeleteListing[0:len((*c.CallOptions).DeleteListing):len((*c.CallOptions).DeleteListing)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.analyticsHubClient.DeleteListing(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.analyticsHubClient.DeleteListing, req, settings.GRPC, c.logger, "DeleteListing") return err }, opts...) return err @@ -1067,7 +1072,7 @@ func (c *analyticsHubGRPCClient) SubscribeListing(ctx context.Context, req *data var resp *dataexchangepb.SubscribeListingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.SubscribeListing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.SubscribeListing, req, settings.GRPC, c.logger, "SubscribeListing") return err }, opts...) if err != nil { @@ -1085,7 +1090,7 @@ func (c *analyticsHubGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1103,7 +1108,7 @@ func (c *analyticsHubGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1121,7 +1126,7 @@ func (c *analyticsHubGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsHubClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsHubClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1139,7 +1144,7 @@ func (c *analyticsHubGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1168,7 +1173,7 @@ func (c *analyticsHubGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1238,21 +1243,10 @@ func (c *analyticsHubRESTClient) ListDataExchanges(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataExchanges") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1327,21 +1321,10 @@ func (c *analyticsHubRESTClient) ListOrgDataExchanges(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrgDataExchanges") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1399,17 +1382,7 @@ func (c *analyticsHubRESTClient) GetDataExchange(ctx context.Context, req *datae httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataExchange") if err != nil { return err } @@ -1466,17 +1439,7 @@ func (c *analyticsHubRESTClient) CreateDataExchange(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataExchange") if err != nil { return err } @@ -1539,17 +1502,7 @@ func (c *analyticsHubRESTClient) UpdateDataExchange(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataExchange") if err != nil { return err } @@ -1591,15 +1544,8 @@ func (c *analyticsHubRESTClient) DeleteDataExchange(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataExchange") + return err }, opts...) } @@ -1647,21 +1593,10 @@ func (c *analyticsHubRESTClient) ListListings(ctx context.Context, req *dataexch } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListListings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1719,17 +1654,7 @@ func (c *analyticsHubRESTClient) GetListing(ctx context.Context, req *dataexchan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetListing") if err != nil { return err } @@ -1786,17 +1711,7 @@ func (c *analyticsHubRESTClient) CreateListing(ctx context.Context, req *dataexc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateListing") if err != nil { return err } @@ -1859,17 +1774,7 @@ func (c *analyticsHubRESTClient) UpdateListing(ctx context.Context, req *dataexc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateListing") if err != nil { return err } @@ -1911,15 +1816,8 @@ func (c *analyticsHubRESTClient) DeleteListing(ctx context.Context, req *dataexc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteListing") + return err }, opts...) } @@ -1962,17 +1860,7 @@ func (c *analyticsHubRESTClient) SubscribeListing(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubscribeListing") if err != nil { return err } @@ -2023,17 +1911,7 @@ func (c *analyticsHubRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2084,17 +1962,7 @@ func (c *analyticsHubRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2145,17 +2013,7 @@ func (c *analyticsHubRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2200,17 +2058,7 @@ func (c *analyticsHubRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2274,21 +2122,10 @@ func (c *analyticsHubRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_go123_test.go b/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_go123_test.go index 11a30923ffa9..a276f71157ba 100644 --- a/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_go123_test.go +++ b/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAnalyticsHubClient_ListDataExchanges_all() { } for resp, err := range c.ListDataExchanges(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAnalyticsHubClient_ListListings_all() { } for resp, err := range c.ListListings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAnalyticsHubClient_ListOrgDataExchanges_all() { } for resp, err := range c.ListOrgDataExchanges(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleAnalyticsHubClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/dataexchange/apiv1beta1/dataexchangepb/dataexchange.pb.go b/bigquery/dataexchange/apiv1beta1/dataexchangepb/dataexchange.pb.go index 5c955c67530d..e0c55ed2b879 100755 --- a/bigquery/dataexchange/apiv1beta1/dataexchangepb/dataexchange.pb.go +++ b/bigquery/dataexchange/apiv1beta1/dataexchangepb/dataexchange.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto @@ -235,11 +235,9 @@ type DataExchange struct { func (x *DataExchange) Reset() { *x = DataExchange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataExchange) String() string { @@ -250,7 +248,7 @@ func (*DataExchange) ProtoMessage() {} func (x *DataExchange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +327,9 @@ type DataProvider struct { func (x *DataProvider) Reset() { *x = DataProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProvider) String() string { @@ -344,7 +340,7 @@ func (*DataProvider) ProtoMessage() {} func (x *DataProvider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,11 +384,9 @@ type Publisher struct { func (x *Publisher) Reset() { *x = Publisher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Publisher) String() string { @@ -403,7 +397,7 @@ func (*Publisher) ProtoMessage() {} func (x *Publisher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +442,9 @@ type DestinationDatasetReference struct { func (x *DestinationDatasetReference) Reset() { *x = DestinationDatasetReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationDatasetReference) String() string { @@ -463,7 +455,7 @@ func (*DestinationDatasetReference) ProtoMessage() {} func (x *DestinationDatasetReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +510,9 @@ type DestinationDataset struct { func (x *DestinationDataset) Reset() { *x = DestinationDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationDataset) String() string { @@ -533,7 +523,7 @@ func (*DestinationDataset) ProtoMessage() {} func (x *DestinationDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +631,9 @@ type Listing struct { func (x *Listing) Reset() { *x = Listing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing) String() string { @@ -656,7 +644,7 @@ func (*Listing) ProtoMessage() {} func (x *Listing) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +780,9 @@ type ListDataExchangesRequest struct { func (x *ListDataExchangesRequest) Reset() { *x = ListDataExchangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataExchangesRequest) String() string { @@ -807,7 +793,7 @@ func (*ListDataExchangesRequest) ProtoMessage() {} func (x *ListDataExchangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,11 +843,9 @@ type ListDataExchangesResponse struct { func (x *ListDataExchangesResponse) Reset() { *x = ListDataExchangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataExchangesResponse) String() string { @@ -872,7 +856,7 @@ func (*ListDataExchangesResponse) ProtoMessage() {} func (x *ListDataExchangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -921,11 +905,9 @@ type ListOrgDataExchangesRequest struct { func (x *ListOrgDataExchangesRequest) Reset() { *x = ListOrgDataExchangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrgDataExchangesRequest) String() string { @@ -936,7 +918,7 @@ func (*ListOrgDataExchangesRequest) ProtoMessage() {} func (x *ListOrgDataExchangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +969,9 @@ type ListOrgDataExchangesResponse struct { func (x *ListOrgDataExchangesResponse) Reset() { *x = ListOrgDataExchangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrgDataExchangesResponse) String() string { @@ -1002,7 +982,7 @@ func (*ListOrgDataExchangesResponse) ProtoMessage() {} func (x *ListOrgDataExchangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1024,9 @@ type GetDataExchangeRequest struct { func (x *GetDataExchangeRequest) Reset() { *x = GetDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataExchangeRequest) String() string { @@ -1059,7 +1037,7 @@ func (*GetDataExchangeRequest) ProtoMessage() {} func (x *GetDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,11 +1080,9 @@ type CreateDataExchangeRequest struct { func (x *CreateDataExchangeRequest) Reset() { *x = CreateDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataExchangeRequest) String() string { @@ -1117,7 +1093,7 @@ func (*CreateDataExchangeRequest) ProtoMessage() {} func (x *CreateDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1145,9 @@ type UpdateDataExchangeRequest struct { func (x *UpdateDataExchangeRequest) Reset() { *x = UpdateDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataExchangeRequest) String() string { @@ -1184,7 +1158,7 @@ func (*UpdateDataExchangeRequest) ProtoMessage() {} func (x *UpdateDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1226,11 +1200,9 @@ type DeleteDataExchangeRequest struct { func (x *DeleteDataExchangeRequest) Reset() { *x = DeleteDataExchangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataExchangeRequest) String() string { @@ -1241,7 +1213,7 @@ func (*DeleteDataExchangeRequest) ProtoMessage() {} func (x *DeleteDataExchangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1282,11 +1254,9 @@ type ListListingsRequest struct { func (x *ListListingsRequest) Reset() { *x = ListListingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListListingsRequest) String() string { @@ -1297,7 +1267,7 @@ func (*ListListingsRequest) ProtoMessage() {} func (x *ListListingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1317,9 @@ type ListListingsResponse struct { func (x *ListListingsResponse) Reset() { *x = ListListingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListListingsResponse) String() string { @@ -1362,7 +1330,7 @@ func (*ListListingsResponse) ProtoMessage() {} func (x *ListListingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1372,9 @@ type GetListingRequest struct { func (x *GetListingRequest) Reset() { *x = GetListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetListingRequest) String() string { @@ -1419,7 +1385,7 @@ func (*GetListingRequest) ProtoMessage() {} func (x *GetListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1428,9 @@ type CreateListingRequest struct { func (x *CreateListingRequest) Reset() { *x = CreateListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateListingRequest) String() string { @@ -1477,7 +1441,7 @@ func (*CreateListingRequest) ProtoMessage() {} func (x *CreateListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1529,11 +1493,9 @@ type UpdateListingRequest struct { func (x *UpdateListingRequest) Reset() { *x = UpdateListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateListingRequest) String() string { @@ -1544,7 +1506,7 @@ func (*UpdateListingRequest) ProtoMessage() {} func (x *UpdateListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1586,11 +1548,9 @@ type DeleteListingRequest struct { func (x *DeleteListingRequest) Reset() { *x = DeleteListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteListingRequest) String() string { @@ -1601,7 +1561,7 @@ func (*DeleteListingRequest) ProtoMessage() {} func (x *DeleteListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1642,11 +1602,9 @@ type SubscribeListingRequest struct { func (x *SubscribeListingRequest) Reset() { *x = SubscribeListingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeListingRequest) String() string { @@ -1657,7 +1615,7 @@ func (*SubscribeListingRequest) ProtoMessage() {} func (x *SubscribeListingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,11 +1671,9 @@ type SubscribeListingResponse struct { func (x *SubscribeListingResponse) Reset() { *x = SubscribeListingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeListingResponse) String() string { @@ -1728,7 +1684,7 @@ func (*SubscribeListingResponse) ProtoMessage() {} func (x *SubscribeListingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1762,11 +1718,9 @@ type Listing_BigQueryDatasetSource struct { func (x *Listing_BigQueryDatasetSource) Reset() { *x = Listing_BigQueryDatasetSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Listing_BigQueryDatasetSource) String() string { @@ -1777,7 +1731,7 @@ func (*Listing_BigQueryDatasetSource) ProtoMessage() {} func (x *Listing_BigQueryDatasetSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2521,284 +2475,6 @@ func file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_init() { if File_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataExchange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Publisher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DestinationDatasetReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DestinationDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Listing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDataExchangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListDataExchangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListOrgDataExchangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListOrgDataExchangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataExchangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListListingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListListingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeListingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeListingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Listing_BigQueryDatasetSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_dataexchange_v1beta1_dataexchange_proto_msgTypes[5].OneofWrappers = []any{ (*Listing_BigqueryDataset)(nil), } diff --git a/bigquery/dataexchange/apiv1beta1/helpers.go b/bigquery/dataexchange/apiv1beta1/helpers.go index 70e610ba7b4e..d920840cb572 100755 --- a/bigquery/dataexchange/apiv1beta1/helpers.go +++ b/bigquery/dataexchange/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package dataexchange import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "analyticshub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/datapolicies/apiv1/data_policy_client.go b/bigquery/datapolicies/apiv1/data_policy_client.go index 9bd89e57dd42..f01cfb271c1d 100755 --- a/bigquery/datapolicies/apiv1/data_policy_client.go +++ b/bigquery/datapolicies/apiv1/data_policy_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( datapoliciespb "cloud.google.com/go/bigquery/datapolicies/apiv1/datapoliciespb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -401,6 +400,8 @@ type dataPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataPolicyClient creates a new data policy service client based on gRPC. @@ -427,6 +428,7 @@ func NewDataPolicyClient(ctx context.Context, opts ...option.ClientOption) (*Dat connPool: connPool, dataPolicyClient: datapoliciespb.NewDataPolicyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -473,6 +475,8 @@ type dataPolicyRESTClient struct { // Points back to the CallOptions field of the containing DataPolicyClient CallOptions **DataPolicyCallOptions + + logger *slog.Logger } // NewDataPolicyRESTClient creates a new data policy service rest client. @@ -490,6 +494,7 @@ func NewDataPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -542,7 +547,7 @@ func (c *dataPolicyGRPCClient) CreateDataPolicy(ctx context.Context, req *datapo var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.CreateDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.CreateDataPolicy, req, settings.GRPC, c.logger, "CreateDataPolicy") return err }, opts...) if err != nil { @@ -560,7 +565,7 @@ func (c *dataPolicyGRPCClient) UpdateDataPolicy(ctx context.Context, req *datapo var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.UpdateDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.UpdateDataPolicy, req, settings.GRPC, c.logger, "UpdateDataPolicy") return err }, opts...) if err != nil { @@ -578,7 +583,7 @@ func (c *dataPolicyGRPCClient) RenameDataPolicy(ctx context.Context, req *datapo var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.RenameDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.RenameDataPolicy, req, settings.GRPC, c.logger, "RenameDataPolicy") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *dataPolicyGRPCClient) DeleteDataPolicy(ctx context.Context, req *datapo opts = append((*c.CallOptions).DeleteDataPolicy[0:len((*c.CallOptions).DeleteDataPolicy):len((*c.CallOptions).DeleteDataPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.dataPolicyClient.DeleteDataPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.dataPolicyClient.DeleteDataPolicy, req, settings.GRPC, c.logger, "DeleteDataPolicy") return err }, opts...) return err @@ -610,7 +615,7 @@ func (c *dataPolicyGRPCClient) GetDataPolicy(ctx context.Context, req *datapolic var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.GetDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.GetDataPolicy, req, settings.GRPC, c.logger, "GetDataPolicy") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *dataPolicyGRPCClient) ListDataPolicies(ctx context.Context, req *datapo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.ListDataPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.ListDataPolicies, req, settings.GRPC, c.logger, "ListDataPolicies") return err }, opts...) if err != nil { @@ -674,7 +679,7 @@ func (c *dataPolicyGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *dataPolicyGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *dataPolicyGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -760,17 +765,7 @@ func (c *dataPolicyRESTClient) CreateDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataPolicy") if err != nil { return err } @@ -835,17 +830,7 @@ func (c *dataPolicyRESTClient) UpdateDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataPolicy") if err != nil { return err } @@ -901,17 +886,7 @@ func (c *dataPolicyRESTClient) RenameDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameDataPolicy") if err != nil { return err } @@ -958,15 +933,8 @@ func (c *dataPolicyRESTClient) DeleteDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataPolicy") + return err }, opts...) } @@ -1003,17 +971,7 @@ func (c *dataPolicyRESTClient) GetDataPolicy(ctx context.Context, req *datapolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataPolicy") if err != nil { return err } @@ -1078,21 +1036,10 @@ func (c *dataPolicyRESTClient) ListDataPolicies(ctx context.Context, req *datapo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1161,17 +1108,7 @@ func (c *dataPolicyRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1227,17 +1164,7 @@ func (c *dataPolicyRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1293,17 +1220,7 @@ func (c *dataPolicyRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/bigquery/datapolicies/apiv1/data_policy_client_example_go123_test.go b/bigquery/datapolicies/apiv1/data_policy_client_example_go123_test.go index 5b13b3ea975e..60affc8883c7 100644 --- a/bigquery/datapolicies/apiv1/data_policy_client_example_go123_test.go +++ b/bigquery/datapolicies/apiv1/data_policy_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDataPolicyClient_ListDataPolicies_all() { } for resp, err := range c.ListDataPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/datapolicies/apiv1/datapoliciespb/datapolicy.pb.go b/bigquery/datapolicies/apiv1/datapoliciespb/datapolicy.pb.go index 22d07fc3a247..af0a0c6a619b 100755 --- a/bigquery/datapolicies/apiv1/datapoliciespb/datapolicy.pb.go +++ b/bigquery/datapolicies/apiv1/datapoliciespb/datapolicy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto @@ -235,11 +235,9 @@ type CreateDataPolicyRequest struct { func (x *CreateDataPolicyRequest) Reset() { *x = CreateDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataPolicyRequest) String() string { @@ -250,7 +248,7 @@ func (*CreateDataPolicyRequest) ProtoMessage() {} func (x *CreateDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +299,9 @@ type UpdateDataPolicyRequest struct { func (x *UpdateDataPolicyRequest) Reset() { *x = UpdateDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataPolicyRequest) String() string { @@ -316,7 +312,7 @@ func (*UpdateDataPolicyRequest) ProtoMessage() {} func (x *UpdateDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +356,9 @@ type RenameDataPolicyRequest struct { func (x *RenameDataPolicyRequest) Reset() { *x = RenameDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameDataPolicyRequest) String() string { @@ -375,7 +369,7 @@ func (*RenameDataPolicyRequest) ProtoMessage() {} func (x *RenameDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +411,9 @@ type DeleteDataPolicyRequest struct { func (x *DeleteDataPolicyRequest) Reset() { *x = DeleteDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataPolicyRequest) String() string { @@ -432,7 +424,7 @@ func (*DeleteDataPolicyRequest) ProtoMessage() {} func (x *DeleteDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +459,9 @@ type GetDataPolicyRequest struct { func (x *GetDataPolicyRequest) Reset() { *x = GetDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataPolicyRequest) String() string { @@ -482,7 +472,7 @@ func (*GetDataPolicyRequest) ProtoMessage() {} func (x *GetDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +523,9 @@ type ListDataPoliciesRequest struct { func (x *ListDataPoliciesRequest) Reset() { *x = ListDataPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataPoliciesRequest) String() string { @@ -548,7 +536,7 @@ func (*ListDataPoliciesRequest) ProtoMessage() {} func (x *ListDataPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +594,9 @@ type ListDataPoliciesResponse struct { func (x *ListDataPoliciesResponse) Reset() { *x = ListDataPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataPoliciesResponse) String() string { @@ -621,7 +607,7 @@ func (*ListDataPoliciesResponse) ProtoMessage() {} func (x *ListDataPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +667,9 @@ type DataPolicy struct { func (x *DataPolicy) Reset() { *x = DataPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataPolicy) String() string { @@ -696,7 +680,7 @@ func (*DataPolicy) ProtoMessage() {} func (x *DataPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type DataMaskingPolicy struct { func (x *DataMaskingPolicy) Reset() { *x = DataMaskingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataMaskingPolicy) String() string { @@ -815,7 +797,7 @@ func (*DataMaskingPolicy) ProtoMessage() {} func (x *DataMaskingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,116 +1216,6 @@ func file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_init() { if File_google_cloud_bigquery_datapolicies_v1_datapolicy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RenameDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDataPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDataPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DataMaskingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_datapolicies_v1_datapolicy_proto_msgTypes[7].OneofWrappers = []any{ (*DataPolicy_PolicyTag)(nil), (*DataPolicy_DataMaskingPolicy)(nil), diff --git a/bigquery/datapolicies/apiv1/helpers.go b/bigquery/datapolicies/apiv1/helpers.go index 4de39997904c..d181ebb73c2b 100755 --- a/bigquery/datapolicies/apiv1/helpers.go +++ b/bigquery/datapolicies/apiv1/helpers.go @@ -18,10 +18,20 @@ package datapolicies import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerydatapolicy.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/datapolicies/apiv1beta1/data_policy_client.go b/bigquery/datapolicies/apiv1beta1/data_policy_client.go index bf19d21231c8..ee52fdf3e808 100755 --- a/bigquery/datapolicies/apiv1beta1/data_policy_client.go +++ b/bigquery/datapolicies/apiv1beta1/data_policy_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( datapoliciespb "cloud.google.com/go/bigquery/datapolicies/apiv1beta1/datapoliciespb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -371,6 +370,8 @@ type dataPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataPolicyClient creates a new data policy service client based on gRPC. @@ -397,6 +398,7 @@ func NewDataPolicyClient(ctx context.Context, opts ...option.ClientOption) (*Dat connPool: connPool, dataPolicyClient: datapoliciespb.NewDataPolicyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -443,6 +445,8 @@ type dataPolicyRESTClient struct { // Points back to the CallOptions field of the containing DataPolicyClient CallOptions **DataPolicyCallOptions + + logger *slog.Logger } // NewDataPolicyRESTClient creates a new data policy service rest client. @@ -460,6 +464,7 @@ func NewDataPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -512,7 +517,7 @@ func (c *dataPolicyGRPCClient) CreateDataPolicy(ctx context.Context, req *datapo var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.CreateDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.CreateDataPolicy, req, settings.GRPC, c.logger, "CreateDataPolicy") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *dataPolicyGRPCClient) UpdateDataPolicy(ctx context.Context, req *datapo var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.UpdateDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.UpdateDataPolicy, req, settings.GRPC, c.logger, "UpdateDataPolicy") return err }, opts...) if err != nil { @@ -547,7 +552,7 @@ func (c *dataPolicyGRPCClient) DeleteDataPolicy(ctx context.Context, req *datapo opts = append((*c.CallOptions).DeleteDataPolicy[0:len((*c.CallOptions).DeleteDataPolicy):len((*c.CallOptions).DeleteDataPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.dataPolicyClient.DeleteDataPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.dataPolicyClient.DeleteDataPolicy, req, settings.GRPC, c.logger, "DeleteDataPolicy") return err }, opts...) return err @@ -562,7 +567,7 @@ func (c *dataPolicyGRPCClient) GetDataPolicy(ctx context.Context, req *datapolic var resp *datapoliciespb.DataPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.GetDataPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.GetDataPolicy, req, settings.GRPC, c.logger, "GetDataPolicy") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *dataPolicyGRPCClient) ListDataPolicies(ctx context.Context, req *datapo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.ListDataPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.ListDataPolicies, req, settings.GRPC, c.logger, "ListDataPolicies") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *dataPolicyGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *dataPolicyGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *dataPolicyGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -707,17 +712,7 @@ func (c *dataPolicyRESTClient) CreateDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataPolicy") if err != nil { return err } @@ -781,17 +776,7 @@ func (c *dataPolicyRESTClient) UpdateDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataPolicy") if err != nil { return err } @@ -833,15 +818,8 @@ func (c *dataPolicyRESTClient) DeleteDataPolicy(ctx context.Context, req *datapo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataPolicy") + return err }, opts...) } @@ -873,17 +851,7 @@ func (c *dataPolicyRESTClient) GetDataPolicy(ctx context.Context, req *datapolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataPolicy") if err != nil { return err } @@ -944,21 +912,10 @@ func (c *dataPolicyRESTClient) ListDataPolicies(ctx context.Context, req *datapo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1022,17 +979,7 @@ func (c *dataPolicyRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1083,17 +1030,7 @@ func (c *dataPolicyRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1144,17 +1081,7 @@ func (c *dataPolicyRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/bigquery/datapolicies/apiv1beta1/data_policy_client_example_go123_test.go b/bigquery/datapolicies/apiv1beta1/data_policy_client_example_go123_test.go index 93718afc8232..f95296281ac6 100644 --- a/bigquery/datapolicies/apiv1beta1/data_policy_client_example_go123_test.go +++ b/bigquery/datapolicies/apiv1beta1/data_policy_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDataPolicyClient_ListDataPolicies_all() { } for resp, err := range c.ListDataPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/datapolicies/apiv1beta1/datapoliciespb/datapolicy.pb.go b/bigquery/datapolicies/apiv1beta1/datapoliciespb/datapolicy.pb.go index 8d5bc51ecdfe..31118e18faac 100755 --- a/bigquery/datapolicies/apiv1beta1/datapoliciespb/datapolicy.pb.go +++ b/bigquery/datapolicies/apiv1beta1/datapoliciespb/datapolicy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/datapolicies/v1beta1/datapolicy.proto @@ -189,11 +189,9 @@ type CreateDataPolicyRequest struct { func (x *CreateDataPolicyRequest) Reset() { *x = CreateDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataPolicyRequest) String() string { @@ -204,7 +202,7 @@ func (*CreateDataPolicyRequest) ProtoMessage() {} func (x *CreateDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +253,9 @@ type UpdateDataPolicyRequest struct { func (x *UpdateDataPolicyRequest) Reset() { *x = UpdateDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataPolicyRequest) String() string { @@ -270,7 +266,7 @@ func (*UpdateDataPolicyRequest) ProtoMessage() {} func (x *UpdateDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +308,9 @@ type DeleteDataPolicyRequest struct { func (x *DeleteDataPolicyRequest) Reset() { *x = DeleteDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataPolicyRequest) String() string { @@ -327,7 +321,7 @@ func (*DeleteDataPolicyRequest) ProtoMessage() {} func (x *DeleteDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +356,9 @@ type GetDataPolicyRequest struct { func (x *GetDataPolicyRequest) Reset() { *x = GetDataPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataPolicyRequest) String() string { @@ -377,7 +369,7 @@ func (*GetDataPolicyRequest) ProtoMessage() {} func (x *GetDataPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +411,9 @@ type ListDataPoliciesRequest struct { func (x *ListDataPoliciesRequest) Reset() { *x = ListDataPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataPoliciesRequest) String() string { @@ -434,7 +424,7 @@ func (*ListDataPoliciesRequest) ProtoMessage() {} func (x *ListDataPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +475,9 @@ type ListDataPoliciesResponse struct { func (x *ListDataPoliciesResponse) Reset() { *x = ListDataPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataPoliciesResponse) String() string { @@ -500,7 +488,7 @@ func (*ListDataPoliciesResponse) ProtoMessage() {} func (x *ListDataPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +548,9 @@ type DataPolicy struct { func (x *DataPolicy) Reset() { *x = DataPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataPolicy) String() string { @@ -575,7 +561,7 @@ func (*DataPolicy) ProtoMessage() {} func (x *DataPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +664,9 @@ type DataMaskingPolicy struct { func (x *DataMaskingPolicy) Reset() { *x = DataMaskingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataMaskingPolicy) String() string { @@ -693,7 +677,7 @@ func (*DataMaskingPolicy) ProtoMessage() {} func (x *DataMaskingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,104 +1057,6 @@ func file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_init() { if File_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDataPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDataPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataMaskingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_datapolicies_v1beta1_datapolicy_proto_msgTypes[6].OneofWrappers = []any{ (*DataPolicy_PolicyTag)(nil), (*DataPolicy_DataMaskingPolicy)(nil), diff --git a/bigquery/datapolicies/apiv1beta1/helpers.go b/bigquery/datapolicies/apiv1beta1/helpers.go index 4de39997904c..d181ebb73c2b 100755 --- a/bigquery/datapolicies/apiv1beta1/helpers.go +++ b/bigquery/datapolicies/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package datapolicies import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerydatapolicy.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/datatransfer/apiv1/data_transfer_client.go b/bigquery/datatransfer/apiv1/data_transfer_client.go index 391fdde4b2a6..b1290eb7b620 100755 --- a/bigquery/datatransfer/apiv1/data_transfer_client.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( datatransferpb "cloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -559,6 +558,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data transfer service client based on gRPC. @@ -585,6 +586,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datatransferpb.NewDataTransferServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -632,6 +634,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data transfer service rest client. @@ -649,6 +653,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -701,7 +706,7 @@ func (c *gRPCClient) GetDataSource(ctx context.Context, req *datatransferpb.GetD var resp *datatransferpb.DataSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataSource, req, settings.GRPC, c.logger, "GetDataSource") return err }, opts...) if err != nil { @@ -730,7 +735,7 @@ func (c *gRPCClient) ListDataSources(ctx context.Context, req *datatransferpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDataSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDataSources, req, settings.GRPC, c.logger, "ListDataSources") return err }, opts...) if err != nil { @@ -765,7 +770,7 @@ func (c *gRPCClient) CreateTransferConfig(ctx context.Context, req *datatransfer var resp *datatransferpb.TransferConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTransferConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTransferConfig, req, settings.GRPC, c.logger, "CreateTransferConfig") return err }, opts...) if err != nil { @@ -783,7 +788,7 @@ func (c *gRPCClient) UpdateTransferConfig(ctx context.Context, req *datatransfer var resp *datatransferpb.TransferConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTransferConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTransferConfig, req, settings.GRPC, c.logger, "UpdateTransferConfig") return err }, opts...) if err != nil { @@ -800,7 +805,7 @@ func (c *gRPCClient) DeleteTransferConfig(ctx context.Context, req *datatransfer opts = append((*c.CallOptions).DeleteTransferConfig[0:len((*c.CallOptions).DeleteTransferConfig):len((*c.CallOptions).DeleteTransferConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTransferConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTransferConfig, req, settings.GRPC, c.logger, "DeleteTransferConfig") return err }, opts...) return err @@ -815,7 +820,7 @@ func (c *gRPCClient) GetTransferConfig(ctx context.Context, req *datatransferpb. var resp *datatransferpb.TransferConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTransferConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTransferConfig, req, settings.GRPC, c.logger, "GetTransferConfig") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *gRPCClient) ListTransferConfigs(ctx context.Context, req *datatransferp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTransferConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTransferConfigs, req, settings.GRPC, c.logger, "ListTransferConfigs") return err }, opts...) if err != nil { @@ -879,7 +884,7 @@ func (c *gRPCClient) ScheduleTransferRuns(ctx context.Context, req *datatransfer var resp *datatransferpb.ScheduleTransferRunsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ScheduleTransferRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ScheduleTransferRuns, req, settings.GRPC, c.logger, "ScheduleTransferRuns") return err }, opts...) if err != nil { @@ -897,7 +902,7 @@ func (c *gRPCClient) StartManualTransferRuns(ctx context.Context, req *datatrans var resp *datatransferpb.StartManualTransferRunsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartManualTransferRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartManualTransferRuns, req, settings.GRPC, c.logger, "StartManualTransferRuns") return err }, opts...) if err != nil { @@ -915,7 +920,7 @@ func (c *gRPCClient) GetTransferRun(ctx context.Context, req *datatransferpb.Get var resp *datatransferpb.TransferRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTransferRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTransferRun, req, settings.GRPC, c.logger, "GetTransferRun") return err }, opts...) if err != nil { @@ -932,7 +937,7 @@ func (c *gRPCClient) DeleteTransferRun(ctx context.Context, req *datatransferpb. opts = append((*c.CallOptions).DeleteTransferRun[0:len((*c.CallOptions).DeleteTransferRun):len((*c.CallOptions).DeleteTransferRun)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTransferRun(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTransferRun, req, settings.GRPC, c.logger, "DeleteTransferRun") return err }, opts...) return err @@ -958,7 +963,7 @@ func (c *gRPCClient) ListTransferRuns(ctx context.Context, req *datatransferpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTransferRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTransferRuns, req, settings.GRPC, c.logger, "ListTransferRuns") return err }, opts...) if err != nil { @@ -1004,7 +1009,7 @@ func (c *gRPCClient) ListTransferLogs(ctx context.Context, req *datatransferpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTransferLogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTransferLogs, req, settings.GRPC, c.logger, "ListTransferLogs") return err }, opts...) if err != nil { @@ -1039,7 +1044,7 @@ func (c *gRPCClient) CheckValidCreds(ctx context.Context, req *datatransferpb.Ch var resp *datatransferpb.CheckValidCredsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CheckValidCreds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CheckValidCreds, req, settings.GRPC, c.logger, "CheckValidCreds") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *gRPCClient) EnrollDataSources(ctx context.Context, req *datatransferpb. opts = append((*c.CallOptions).EnrollDataSources[0:len((*c.CallOptions).EnrollDataSources):len((*c.CallOptions).EnrollDataSources)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.EnrollDataSources(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.EnrollDataSources, req, settings.GRPC, c.logger, "EnrollDataSources") return err }, opts...) return err @@ -1070,7 +1075,7 @@ func (c *gRPCClient) UnenrollDataSources(ctx context.Context, req *datatransferp opts = append((*c.CallOptions).UnenrollDataSources[0:len((*c.CallOptions).UnenrollDataSources):len((*c.CallOptions).UnenrollDataSources)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.UnenrollDataSources(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.UnenrollDataSources, req, settings.GRPC, c.logger, "UnenrollDataSources") return err }, opts...) return err @@ -1085,7 +1090,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1114,7 +1119,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1173,17 +1178,7 @@ func (c *restClient) GetDataSource(ctx context.Context, req *datatransferpb.GetD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataSource") if err != nil { return err } @@ -1245,21 +1240,10 @@ func (c *restClient) ListDataSources(ctx context.Context, req *datatransferpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1338,17 +1322,7 @@ func (c *restClient) CreateTransferConfig(ctx context.Context, req *datatransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTransferConfig") if err != nil { return err } @@ -1422,17 +1396,7 @@ func (c *restClient) UpdateTransferConfig(ctx context.Context, req *datatransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTransferConfig") if err != nil { return err } @@ -1480,15 +1444,8 @@ func (c *restClient) DeleteTransferConfig(ctx context.Context, req *datatransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTransferConfig") + return err }, opts...) } @@ -1525,17 +1482,7 @@ func (c *restClient) GetTransferConfig(ctx context.Context, req *datatransferpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTransferConfig") if err != nil { return err } @@ -1603,21 +1550,10 @@ func (c *restClient) ListTransferConfigs(ctx context.Context, req *datatransferp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransferConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1692,17 +1628,7 @@ func (c *restClient) ScheduleTransferRuns(ctx context.Context, req *datatransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ScheduleTransferRuns") if err != nil { return err } @@ -1761,17 +1687,7 @@ func (c *restClient) StartManualTransferRuns(ctx context.Context, req *datatrans httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartManualTransferRuns") if err != nil { return err } @@ -1821,17 +1737,7 @@ func (c *restClient) GetTransferRun(ctx context.Context, req *datatransferpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTransferRun") if err != nil { return err } @@ -1878,15 +1784,8 @@ func (c *restClient) DeleteTransferRun(ctx context.Context, req *datatransferpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTransferRun") + return err }, opts...) } @@ -1943,21 +1842,10 @@ func (c *restClient) ListTransferRuns(ctx context.Context, req *datatransferpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransferRuns") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2037,21 +1925,10 @@ func (c *restClient) ListTransferLogs(ctx context.Context, req *datatransferpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransferLogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2121,17 +1998,7 @@ func (c *restClient) CheckValidCreds(ctx context.Context, req *datatransferpb.Ch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckValidCreds") if err != nil { return err } @@ -2191,15 +2058,8 @@ func (c *restClient) EnrollDataSources(ctx context.Context, req *datatransferpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnrollDataSources") + return err }, opts...) } @@ -2243,15 +2103,8 @@ func (c *restClient) UnenrollDataSources(ctx context.Context, req *datatransferp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnenrollDataSources") + return err }, opts...) } @@ -2288,17 +2141,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2363,21 +2206,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/bigquery/datatransfer/apiv1/data_transfer_client_example_go123_test.go b/bigquery/datatransfer/apiv1/data_transfer_client_example_go123_test.go index d5fcba3df269..41a681206800 100644 --- a/bigquery/datatransfer/apiv1/data_transfer_client_example_go123_test.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListDataSources_all() { } for resp, err := range c.ListDataSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListTransferConfigs_all() { } for resp, err := range c.ListTransferConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListTransferLogs_all() { } for resp, err := range c.ListTransferLogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListTransferRuns_all() { } for resp, err := range c.ListTransferRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/datatransfer/apiv1/datatransferpb/datatransfer.pb.go b/bigquery/datatransfer/apiv1/datatransferpb/datatransfer.pb.go index 4b402b2c2d47..f5e22cac5a64 100755 --- a/bigquery/datatransfer/apiv1/datatransferpb/datatransfer.pb.go +++ b/bigquery/datatransfer/apiv1/datatransferpb/datatransfer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto @@ -328,11 +328,9 @@ type DataSourceParameter struct { func (x *DataSourceParameter) Reset() { *x = DataSourceParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceParameter) String() string { @@ -343,7 +341,7 @@ func (*DataSourceParameter) ProtoMessage() {} func (x *DataSourceParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +532,9 @@ type DataSource struct { func (x *DataSource) Reset() { *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSource) String() string { @@ -549,7 +545,7 @@ func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +702,9 @@ type GetDataSourceRequest struct { func (x *GetDataSourceRequest) Reset() { *x = GetDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataSourceRequest) String() string { @@ -721,7 +715,7 @@ func (*GetDataSourceRequest) ProtoMessage() {} func (x *GetDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +759,9 @@ type ListDataSourcesRequest struct { func (x *ListDataSourcesRequest) Reset() { *x = ListDataSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesRequest) String() string { @@ -780,7 +772,7 @@ func (*ListDataSourcesRequest) ProtoMessage() {} func (x *ListDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +825,9 @@ type ListDataSourcesResponse struct { func (x *ListDataSourcesResponse) Reset() { *x = ListDataSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesResponse) String() string { @@ -848,7 +838,7 @@ func (*ListDataSourcesResponse) ProtoMessage() {} func (x *ListDataSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +942,9 @@ type CreateTransferConfigRequest struct { func (x *CreateTransferConfigRequest) Reset() { *x = CreateTransferConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTransferConfigRequest) String() string { @@ -967,7 +955,7 @@ func (*CreateTransferConfigRequest) ProtoMessage() {} func (x *CreateTransferConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1073,9 @@ type UpdateTransferConfigRequest struct { func (x *UpdateTransferConfigRequest) Reset() { *x = UpdateTransferConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTransferConfigRequest) String() string { @@ -1100,7 +1086,7 @@ func (*UpdateTransferConfigRequest) ProtoMessage() {} func (x *UpdateTransferConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1165,11 +1151,9 @@ type GetTransferConfigRequest struct { func (x *GetTransferConfigRequest) Reset() { *x = GetTransferConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTransferConfigRequest) String() string { @@ -1180,7 +1164,7 @@ func (*GetTransferConfigRequest) ProtoMessage() {} func (x *GetTransferConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1201,9 @@ type DeleteTransferConfigRequest struct { func (x *DeleteTransferConfigRequest) Reset() { *x = DeleteTransferConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTransferConfigRequest) String() string { @@ -1232,7 +1214,7 @@ func (*DeleteTransferConfigRequest) ProtoMessage() {} func (x *DeleteTransferConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1269,11 +1251,9 @@ type GetTransferRunRequest struct { func (x *GetTransferRunRequest) Reset() { *x = GetTransferRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTransferRunRequest) String() string { @@ -1284,7 +1264,7 @@ func (*GetTransferRunRequest) ProtoMessage() {} func (x *GetTransferRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1321,11 +1301,9 @@ type DeleteTransferRunRequest struct { func (x *DeleteTransferRunRequest) Reset() { *x = DeleteTransferRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTransferRunRequest) String() string { @@ -1336,7 +1314,7 @@ func (*DeleteTransferRunRequest) ProtoMessage() {} func (x *DeleteTransferRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1360,9 @@ type ListTransferConfigsRequest struct { func (x *ListTransferConfigsRequest) Reset() { *x = ListTransferConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferConfigsRequest) String() string { @@ -1397,7 +1373,7 @@ func (*ListTransferConfigsRequest) ProtoMessage() {} func (x *ListTransferConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1457,11 +1433,9 @@ type ListTransferConfigsResponse struct { func (x *ListTransferConfigsResponse) Reset() { *x = ListTransferConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferConfigsResponse) String() string { @@ -1472,7 +1446,7 @@ func (*ListTransferConfigsResponse) ProtoMessage() {} func (x *ListTransferConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1528,11 +1502,9 @@ type ListTransferRunsRequest struct { func (x *ListTransferRunsRequest) Reset() { *x = ListTransferRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferRunsRequest) String() string { @@ -1543,7 +1515,7 @@ func (*ListTransferRunsRequest) ProtoMessage() {} func (x *ListTransferRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1582,9 @@ type ListTransferRunsResponse struct { func (x *ListTransferRunsResponse) Reset() { *x = ListTransferRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferRunsResponse) String() string { @@ -1625,7 +1595,7 @@ func (*ListTransferRunsResponse) ProtoMessage() {} func (x *ListTransferRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1649,9 @@ type ListTransferLogsRequest struct { func (x *ListTransferLogsRequest) Reset() { *x = ListTransferLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferLogsRequest) String() string { @@ -1694,7 +1662,7 @@ func (*ListTransferLogsRequest) ProtoMessage() {} func (x *ListTransferLogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1722,9 @@ type ListTransferLogsResponse struct { func (x *ListTransferLogsResponse) Reset() { *x = ListTransferLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferLogsResponse) String() string { @@ -1769,7 +1735,7 @@ func (*ListTransferLogsResponse) ProtoMessage() {} func (x *ListTransferLogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1817,11 +1783,9 @@ type CheckValidCredsRequest struct { func (x *CheckValidCredsRequest) Reset() { *x = CheckValidCredsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckValidCredsRequest) String() string { @@ -1832,7 +1796,7 @@ func (*CheckValidCredsRequest) ProtoMessage() {} func (x *CheckValidCredsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1866,11 +1830,9 @@ type CheckValidCredsResponse struct { func (x *CheckValidCredsResponse) Reset() { *x = CheckValidCredsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckValidCredsResponse) String() string { @@ -1881,7 +1843,7 @@ func (*CheckValidCredsResponse) ProtoMessage() {} func (x *CheckValidCredsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1923,11 +1885,9 @@ type ScheduleTransferRunsRequest struct { func (x *ScheduleTransferRunsRequest) Reset() { *x = ScheduleTransferRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduleTransferRunsRequest) String() string { @@ -1938,7 +1898,7 @@ func (*ScheduleTransferRunsRequest) ProtoMessage() {} func (x *ScheduleTransferRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1946,9 @@ type ScheduleTransferRunsResponse struct { func (x *ScheduleTransferRunsResponse) Reset() { *x = ScheduleTransferRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduleTransferRunsResponse) String() string { @@ -2001,7 +1959,7 @@ func (*ScheduleTransferRunsResponse) ProtoMessage() {} func (x *ScheduleTransferRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2045,11 +2003,9 @@ type StartManualTransferRunsRequest struct { func (x *StartManualTransferRunsRequest) Reset() { *x = StartManualTransferRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartManualTransferRunsRequest) String() string { @@ -2060,7 +2016,7 @@ func (*StartManualTransferRunsRequest) ProtoMessage() {} func (x *StartManualTransferRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2139,11 +2095,9 @@ type StartManualTransferRunsResponse struct { func (x *StartManualTransferRunsResponse) Reset() { *x = StartManualTransferRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartManualTransferRunsResponse) String() string { @@ -2154,7 +2108,7 @@ func (*StartManualTransferRunsResponse) ProtoMessage() {} func (x *StartManualTransferRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2193,11 +2147,9 @@ type EnrollDataSourcesRequest struct { func (x *EnrollDataSourcesRequest) Reset() { *x = EnrollDataSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnrollDataSourcesRequest) String() string { @@ -2208,7 +2160,7 @@ func (*EnrollDataSourcesRequest) ProtoMessage() {} func (x *EnrollDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2254,11 +2206,9 @@ type UnenrollDataSourcesRequest struct { func (x *UnenrollDataSourcesRequest) Reset() { *x = UnenrollDataSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnenrollDataSourcesRequest) String() string { @@ -2269,7 +2219,7 @@ func (*UnenrollDataSourcesRequest) ProtoMessage() {} func (x *UnenrollDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2319,11 +2269,9 @@ type StartManualTransferRunsRequest_TimeRange struct { func (x *StartManualTransferRunsRequest_TimeRange) Reset() { *x = StartManualTransferRunsRequest_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartManualTransferRunsRequest_TimeRange) String() string { @@ -2334,7 +2282,7 @@ func (*StartManualTransferRunsRequest_TimeRange) ProtoMessage() {} func (x *StartManualTransferRunsRequest_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3229,320 +3177,6 @@ func file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_init() { return } file_google_cloud_bigquery_datatransfer_v1_transfer_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateTransferConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTransferConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetTransferConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTransferConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetTransferRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTransferRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferLogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferLogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CheckValidCredsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CheckValidCredsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ScheduleTransferRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ScheduleTransferRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StartManualTransferRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*StartManualTransferRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*EnrollDataSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UnenrollDataSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*StartManualTransferRunsRequest_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_datatransfer_v1_datatransfer_proto_msgTypes[21].OneofWrappers = []any{ (*StartManualTransferRunsRequest_RequestedTimeRange)(nil), (*StartManualTransferRunsRequest_RequestedRunTime)(nil), diff --git a/bigquery/datatransfer/apiv1/datatransferpb/transfer.pb.go b/bigquery/datatransfer/apiv1/datatransferpb/transfer.pb.go index 6831d6e7146e..ef4503ff8038 100755 --- a/bigquery/datatransfer/apiv1/datatransferpb/transfer.pb.go +++ b/bigquery/datatransfer/apiv1/datatransferpb/transfer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/datatransfer/v1/transfer.proto @@ -232,11 +232,9 @@ type EmailPreferences struct { func (x *EmailPreferences) Reset() { *x = EmailPreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmailPreferences) String() string { @@ -247,7 +245,7 @@ func (*EmailPreferences) ProtoMessage() {} func (x *EmailPreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +293,9 @@ type ScheduleOptions struct { func (x *ScheduleOptions) Reset() { *x = ScheduleOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduleOptions) String() string { @@ -310,7 +306,7 @@ func (*ScheduleOptions) ProtoMessage() {} func (x *ScheduleOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +363,9 @@ type ScheduleOptionsV2 struct { func (x *ScheduleOptionsV2) Reset() { *x = ScheduleOptionsV2{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduleOptionsV2) String() string { @@ -382,7 +376,7 @@ func (*ScheduleOptionsV2) ProtoMessage() {} func (x *ScheduleOptionsV2) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +483,9 @@ type TimeBasedSchedule struct { func (x *TimeBasedSchedule) Reset() { *x = TimeBasedSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeBasedSchedule) String() string { @@ -504,7 +496,7 @@ func (*TimeBasedSchedule) ProtoMessage() {} func (x *TimeBasedSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +541,9 @@ type ManualSchedule struct { func (x *ManualSchedule) Reset() { *x = ManualSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualSchedule) String() string { @@ -564,7 +554,7 @@ func (*ManualSchedule) ProtoMessage() {} func (x *ManualSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +583,9 @@ type EventDrivenSchedule struct { func (x *EventDrivenSchedule) Reset() { *x = EventDrivenSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventDrivenSchedule) String() string { @@ -608,7 +596,7 @@ func (*EventDrivenSchedule) ProtoMessage() {} func (x *EventDrivenSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +630,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -657,7 +643,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +767,9 @@ type TransferConfig struct { func (x *TransferConfig) Reset() { *x = TransferConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferConfig) String() string { @@ -796,7 +780,7 @@ func (*TransferConfig) ProtoMessage() {} func (x *TransferConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -981,11 +965,9 @@ type EncryptionConfiguration struct { func (x *EncryptionConfiguration) Reset() { *x = EncryptionConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfiguration) String() string { @@ -996,7 +978,7 @@ func (*EncryptionConfiguration) ProtoMessage() {} func (x *EncryptionConfiguration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,11 +1064,9 @@ type TransferRun struct { func (x *TransferRun) Reset() { *x = TransferRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferRun) String() string { @@ -1097,7 +1077,7 @@ func (*TransferRun) ProtoMessage() {} func (x *TransferRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1251,11 +1231,9 @@ type TransferMessage struct { func (x *TransferMessage) Reset() { *x = TransferMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferMessage) String() string { @@ -1266,7 +1244,7 @@ func (*TransferMessage) ProtoMessage() {} func (x *TransferMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1672,140 +1650,6 @@ func file_google_cloud_bigquery_datatransfer_v1_transfer_proto_init() { if File_google_cloud_bigquery_datatransfer_v1_transfer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EmailPreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ScheduleOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ScheduleOptionsV2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TimeBasedSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ManualSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EventDrivenSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransferConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TransferRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TransferMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_datatransfer_v1_transfer_proto_msgTypes[2].OneofWrappers = []any{ (*ScheduleOptionsV2_TimeBasedSchedule)(nil), (*ScheduleOptionsV2_ManualSchedule)(nil), diff --git a/bigquery/datatransfer/apiv1/helpers.go b/bigquery/datatransfer/apiv1/helpers.go index 317158cdbcbd..adf15229c849 100755 --- a/bigquery/datatransfer/apiv1/helpers.go +++ b/bigquery/datatransfer/apiv1/helpers.go @@ -18,10 +18,20 @@ package datatransfer import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerydatatransfer.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/migration/apiv2/helpers.go b/bigquery/migration/apiv2/helpers.go index 0834b471dd89..787c991df8a3 100755 --- a/bigquery/migration/apiv2/helpers.go +++ b/bigquery/migration/apiv2/helpers.go @@ -18,10 +18,16 @@ package migration import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerymigration.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/migration/apiv2/migration_client.go b/bigquery/migration/apiv2/migration_client.go index 7f4b7190d0d7..a4b505c296ec 100755 --- a/bigquery/migration/apiv2/migration_client.go +++ b/bigquery/migration/apiv2/migration_client.go @@ -19,6 +19,7 @@ package migration import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -213,6 +214,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new migration service client based on gRPC. @@ -239,6 +242,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: migrationpb.NewMigrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -281,7 +285,7 @@ func (c *gRPCClient) CreateMigrationWorkflow(ctx context.Context, req *migration var resp *migrationpb.MigrationWorkflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMigrationWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMigrationWorkflow, req, settings.GRPC, c.logger, "CreateMigrationWorkflow") return err }, opts...) if err != nil { @@ -299,7 +303,7 @@ func (c *gRPCClient) GetMigrationWorkflow(ctx context.Context, req *migrationpb. var resp *migrationpb.MigrationWorkflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMigrationWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMigrationWorkflow, req, settings.GRPC, c.logger, "GetMigrationWorkflow") return err }, opts...) if err != nil { @@ -328,7 +332,7 @@ func (c *gRPCClient) ListMigrationWorkflows(ctx context.Context, req *migrationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMigrationWorkflows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMigrationWorkflows, req, settings.GRPC, c.logger, "ListMigrationWorkflows") return err }, opts...) if err != nil { @@ -362,7 +366,7 @@ func (c *gRPCClient) DeleteMigrationWorkflow(ctx context.Context, req *migration opts = append((*c.CallOptions).DeleteMigrationWorkflow[0:len((*c.CallOptions).DeleteMigrationWorkflow):len((*c.CallOptions).DeleteMigrationWorkflow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteMigrationWorkflow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteMigrationWorkflow, req, settings.GRPC, c.logger, "DeleteMigrationWorkflow") return err }, opts...) return err @@ -376,7 +380,7 @@ func (c *gRPCClient) StartMigrationWorkflow(ctx context.Context, req *migrationp opts = append((*c.CallOptions).StartMigrationWorkflow[0:len((*c.CallOptions).StartMigrationWorkflow):len((*c.CallOptions).StartMigrationWorkflow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.StartMigrationWorkflow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.StartMigrationWorkflow, req, settings.GRPC, c.logger, "StartMigrationWorkflow") return err }, opts...) return err @@ -391,7 +395,7 @@ func (c *gRPCClient) GetMigrationSubtask(ctx context.Context, req *migrationpb.G var resp *migrationpb.MigrationSubtask err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMigrationSubtask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMigrationSubtask, req, settings.GRPC, c.logger, "GetMigrationSubtask") return err }, opts...) if err != nil { @@ -420,7 +424,7 @@ func (c *gRPCClient) ListMigrationSubtasks(ctx context.Context, req *migrationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMigrationSubtasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMigrationSubtasks, req, settings.GRPC, c.logger, "ListMigrationSubtasks") return err }, opts...) if err != nil { diff --git a/bigquery/migration/apiv2/migration_client_example_go123_test.go b/bigquery/migration/apiv2/migration_client_example_go123_test.go index 9d03d6c9abaa..b04df1685745 100644 --- a/bigquery/migration/apiv2/migration_client_example_go123_test.go +++ b/bigquery/migration/apiv2/migration_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListMigrationSubtasks_all() { } for resp, err := range c.ListMigrationSubtasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListMigrationWorkflows_all() { } for resp, err := range c.ListMigrationWorkflows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/migration/apiv2/migrationpb/migration_entities.pb.go b/bigquery/migration/apiv2/migrationpb/migration_entities.pb.go index b12ca2c47170..06d16b594b20 100755 --- a/bigquery/migration/apiv2/migrationpb/migration_entities.pb.go +++ b/bigquery/migration/apiv2/migrationpb/migration_entities.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/migration_entities.proto @@ -273,11 +273,9 @@ type MigrationWorkflow struct { func (x *MigrationWorkflow) Reset() { *x = MigrationWorkflow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationWorkflow) String() string { @@ -288,7 +286,7 @@ func (*MigrationWorkflow) ProtoMessage() {} func (x *MigrationWorkflow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +398,9 @@ type MigrationTask struct { func (x *MigrationTask) Reset() { *x = MigrationTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationTask) String() string { @@ -415,7 +411,7 @@ func (*MigrationTask) ProtoMessage() {} func (x *MigrationTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +593,9 @@ type MigrationSubtask struct { func (x *MigrationSubtask) Reset() { *x = MigrationSubtask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationSubtask) String() string { @@ -612,7 +606,7 @@ func (*MigrationSubtask) ProtoMessage() {} func (x *MigrationSubtask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +707,9 @@ type MigrationTaskResult struct { func (x *MigrationTaskResult) Reset() { *x = MigrationTaskResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationTaskResult) String() string { @@ -728,7 +720,7 @@ func (*MigrationTaskResult) ProtoMessage() {} func (x *MigrationTaskResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +774,9 @@ type TranslationTaskResult struct { func (x *TranslationTaskResult) Reset() { *x = TranslationTaskResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationTaskResult) String() string { @@ -797,7 +787,7 @@ func (*TranslationTaskResult) ProtoMessage() {} func (x *TranslationTaskResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,68 +1139,6 @@ func file_google_cloud_bigquery_migration_v2_migration_entities_proto_init() { file_google_cloud_bigquery_migration_v2_translation_config_proto_init() file_google_cloud_bigquery_migration_v2_translation_details_proto_init() file_google_cloud_bigquery_migration_v2_translation_usability_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MigrationWorkflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MigrationSubtask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigrationTaskResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TranslationTaskResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2_migration_entities_proto_msgTypes[1].OneofWrappers = []any{ (*MigrationTask_TranslationConfigDetails)(nil), (*MigrationTask_TranslationDetails)(nil), diff --git a/bigquery/migration/apiv2/migrationpb/migration_error_details.pb.go b/bigquery/migration/apiv2/migrationpb/migration_error_details.pb.go index 3798d7ab1f4b..4314be3454c9 100755 --- a/bigquery/migration/apiv2/migrationpb/migration_error_details.pb.go +++ b/bigquery/migration/apiv2/migrationpb/migration_error_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/migration_error_details.proto @@ -55,11 +55,9 @@ type ResourceErrorDetail struct { func (x *ResourceErrorDetail) Reset() { *x = ResourceErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceErrorDetail) String() string { @@ -70,7 +68,7 @@ func (*ResourceErrorDetail) ProtoMessage() {} func (x *ResourceErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,11 +119,9 @@ type ErrorDetail struct { func (x *ErrorDetail) Reset() { *x = ErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetail) String() string { @@ -136,7 +132,7 @@ func (*ErrorDetail) ProtoMessage() {} func (x *ErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +177,9 @@ type ErrorLocation struct { func (x *ErrorLocation) Reset() { *x = ErrorLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorLocation) String() string { @@ -196,7 +190,7 @@ func (*ErrorLocation) ProtoMessage() {} func (x *ErrorLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,44 +314,6 @@ func file_google_cloud_bigquery_migration_v2_migration_error_details_proto_init( if File_google_cloud_bigquery_migration_v2_migration_error_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ErrorLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2/migrationpb/migration_metrics.pb.go b/bigquery/migration/apiv2/migrationpb/migration_metrics.pb.go index df23e5acea69..7c8b5c901988 100755 --- a/bigquery/migration/apiv2/migrationpb/migration_metrics.pb.go +++ b/bigquery/migration/apiv2/migrationpb/migration_metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/migration_metrics.proto @@ -71,11 +71,9 @@ type TimeSeries struct { func (x *TimeSeries) Reset() { *x = TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeries) String() string { @@ -86,7 +84,7 @@ func (*TimeSeries) ProtoMessage() {} func (x *TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type Point struct { func (x *Point) Reset() { *x = Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Point) String() string { @@ -166,7 +162,7 @@ func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type TimeInterval struct { func (x *TimeInterval) Reset() { *x = TimeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeInterval) String() string { @@ -228,7 +222,7 @@ func (*TimeInterval) ProtoMessage() {} func (x *TimeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +271,9 @@ type TypedValue struct { func (x *TypedValue) Reset() { *x = TypedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypedValue) String() string { @@ -292,7 +284,7 @@ func (*TypedValue) ProtoMessage() {} func (x *TypedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,56 +510,6 @@ func file_google_cloud_bigquery_migration_v2_migration_metrics_proto_init() { if File_google_cloud_bigquery_migration_v2_migration_metrics_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TypedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2_migration_metrics_proto_msgTypes[3].OneofWrappers = []any{ (*TypedValue_BoolValue)(nil), (*TypedValue_Int64Value)(nil), diff --git a/bigquery/migration/apiv2/migrationpb/migration_service.pb.go b/bigquery/migration/apiv2/migrationpb/migration_service.pb.go index a595a5d60aff..1bc4b9daf7e1 100755 --- a/bigquery/migration/apiv2/migrationpb/migration_service.pb.go +++ b/bigquery/migration/apiv2/migrationpb/migration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/migration_service.proto @@ -57,11 +57,9 @@ type CreateMigrationWorkflowRequest struct { func (x *CreateMigrationWorkflowRequest) Reset() { *x = CreateMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMigrationWorkflowRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateMigrationWorkflowRequest) ProtoMessage() {} func (x *CreateMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type GetMigrationWorkflowRequest struct { func (x *GetMigrationWorkflowRequest) Reset() { *x = GetMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigrationWorkflowRequest) String() string { @@ -131,7 +127,7 @@ func (*GetMigrationWorkflowRequest) ProtoMessage() {} func (x *GetMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +180,9 @@ type ListMigrationWorkflowsRequest struct { func (x *ListMigrationWorkflowsRequest) Reset() { *x = ListMigrationWorkflowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationWorkflowsRequest) String() string { @@ -199,7 +193,7 @@ func (*ListMigrationWorkflowsRequest) ProtoMessage() {} func (x *ListMigrationWorkflowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +251,9 @@ type ListMigrationWorkflowsResponse struct { func (x *ListMigrationWorkflowsResponse) Reset() { *x = ListMigrationWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationWorkflowsResponse) String() string { @@ -272,7 +264,7 @@ func (*ListMigrationWorkflowsResponse) ProtoMessage() {} func (x *ListMigrationWorkflowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +306,9 @@ type DeleteMigrationWorkflowRequest struct { func (x *DeleteMigrationWorkflowRequest) Reset() { *x = DeleteMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMigrationWorkflowRequest) String() string { @@ -329,7 +319,7 @@ func (*DeleteMigrationWorkflowRequest) ProtoMessage() {} func (x *DeleteMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +354,9 @@ type StartMigrationWorkflowRequest struct { func (x *StartMigrationWorkflowRequest) Reset() { *x = StartMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMigrationWorkflowRequest) String() string { @@ -379,7 +367,7 @@ func (*StartMigrationWorkflowRequest) ProtoMessage() {} func (x *StartMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +404,9 @@ type GetMigrationSubtaskRequest struct { func (x *GetMigrationSubtaskRequest) Reset() { *x = GetMigrationSubtaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigrationSubtaskRequest) String() string { @@ -431,7 +417,7 @@ func (*GetMigrationSubtaskRequest) ProtoMessage() {} func (x *GetMigrationSubtaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +474,9 @@ type ListMigrationSubtasksRequest struct { func (x *ListMigrationSubtasksRequest) Reset() { *x = ListMigrationSubtasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationSubtasksRequest) String() string { @@ -503,7 +487,7 @@ func (*ListMigrationSubtasksRequest) ProtoMessage() {} func (x *ListMigrationSubtasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +552,9 @@ type ListMigrationSubtasksResponse struct { func (x *ListMigrationSubtasksResponse) Reset() { *x = ListMigrationSubtasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationSubtasksResponse) String() string { @@ -583,7 +565,7 @@ func (*ListMigrationSubtasksResponse) ProtoMessage() {} func (x *ListMigrationSubtasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,116 +900,6 @@ func file_google_cloud_bigquery_migration_v2_migration_service_proto_init() { return } file_google_cloud_bigquery_migration_v2_migration_entities_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationWorkflowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationWorkflowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StartMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetMigrationSubtaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationSubtasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_migration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationSubtasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2/migrationpb/translation_config.pb.go b/bigquery/migration/apiv2/migrationpb/translation_config.pb.go index ab014659c838..e0027b67722f 100755 --- a/bigquery/migration/apiv2/migrationpb/translation_config.pb.go +++ b/bigquery/migration/apiv2/migrationpb/translation_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/translation_config.proto @@ -205,11 +205,9 @@ type TranslationConfigDetails struct { func (x *TranslationConfigDetails) Reset() { *x = TranslationConfigDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationConfigDetails) String() string { @@ -220,7 +218,7 @@ func (*TranslationConfigDetails) ProtoMessage() {} func (x *TranslationConfigDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +375,9 @@ type Dialect struct { func (x *Dialect) Reset() { *x = Dialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dialect) String() string { @@ -392,7 +388,7 @@ func (*Dialect) ProtoMessage() {} func (x *Dialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +661,9 @@ type BigQueryDialect struct { func (x *BigQueryDialect) Reset() { *x = BigQueryDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDialect) String() string { @@ -680,7 +674,7 @@ func (*BigQueryDialect) ProtoMessage() {} func (x *BigQueryDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,11 +698,9 @@ type HiveQLDialect struct { func (x *HiveQLDialect) Reset() { *x = HiveQLDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveQLDialect) String() string { @@ -719,7 +711,7 @@ func (*HiveQLDialect) ProtoMessage() {} func (x *HiveQLDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +735,9 @@ type RedshiftDialect struct { func (x *RedshiftDialect) Reset() { *x = RedshiftDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedshiftDialect) String() string { @@ -758,7 +748,7 @@ func (*RedshiftDialect) ProtoMessage() {} func (x *RedshiftDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +775,9 @@ type TeradataDialect struct { func (x *TeradataDialect) Reset() { *x = TeradataDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TeradataDialect) String() string { @@ -800,7 +788,7 @@ func (*TeradataDialect) ProtoMessage() {} func (x *TeradataDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +819,9 @@ type OracleDialect struct { func (x *OracleDialect) Reset() { *x = OracleDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleDialect) String() string { @@ -846,7 +832,7 @@ func (*OracleDialect) ProtoMessage() {} func (x *OracleDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +856,9 @@ type SparkSQLDialect struct { func (x *SparkSQLDialect) Reset() { *x = SparkSQLDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkSQLDialect) String() string { @@ -885,7 +869,7 @@ func (*SparkSQLDialect) ProtoMessage() {} func (x *SparkSQLDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +893,9 @@ type SnowflakeDialect struct { func (x *SnowflakeDialect) Reset() { *x = SnowflakeDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnowflakeDialect) String() string { @@ -924,7 +906,7 @@ func (*SnowflakeDialect) ProtoMessage() {} func (x *SnowflakeDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +930,9 @@ type NetezzaDialect struct { func (x *NetezzaDialect) Reset() { *x = NetezzaDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetezzaDialect) String() string { @@ -963,7 +943,7 @@ func (*NetezzaDialect) ProtoMessage() {} func (x *NetezzaDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +967,9 @@ type AzureSynapseDialect struct { func (x *AzureSynapseDialect) Reset() { *x = AzureSynapseDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureSynapseDialect) String() string { @@ -1002,7 +980,7 @@ func (*AzureSynapseDialect) ProtoMessage() {} func (x *AzureSynapseDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1004,9 @@ type VerticaDialect struct { func (x *VerticaDialect) Reset() { *x = VerticaDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerticaDialect) String() string { @@ -1041,7 +1017,7 @@ func (*VerticaDialect) ProtoMessage() {} func (x *VerticaDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1041,9 @@ type SQLServerDialect struct { func (x *SQLServerDialect) Reset() { *x = SQLServerDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SQLServerDialect) String() string { @@ -1080,7 +1054,7 @@ func (*SQLServerDialect) ProtoMessage() {} func (x *SQLServerDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1078,9 @@ type PostgresqlDialect struct { func (x *PostgresqlDialect) Reset() { *x = PostgresqlDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlDialect) String() string { @@ -1119,7 +1091,7 @@ func (*PostgresqlDialect) ProtoMessage() {} func (x *PostgresqlDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1115,9 @@ type PrestoDialect struct { func (x *PrestoDialect) Reset() { *x = PrestoDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrestoDialect) String() string { @@ -1158,7 +1128,7 @@ func (*PrestoDialect) ProtoMessage() {} func (x *PrestoDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1182,11 +1152,9 @@ type MySQLDialect struct { func (x *MySQLDialect) Reset() { *x = MySQLDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MySQLDialect) String() string { @@ -1197,7 +1165,7 @@ func (*MySQLDialect) ProtoMessage() {} func (x *MySQLDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1189,9 @@ type DB2Dialect struct { func (x *DB2Dialect) Reset() { *x = DB2Dialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DB2Dialect) String() string { @@ -1236,7 +1202,7 @@ func (*DB2Dialect) ProtoMessage() {} func (x *DB2Dialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1226,9 @@ type SQLiteDialect struct { func (x *SQLiteDialect) Reset() { *x = SQLiteDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SQLiteDialect) String() string { @@ -1275,7 +1239,7 @@ func (*SQLiteDialect) ProtoMessage() {} func (x *SQLiteDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,11 +1263,9 @@ type GreenplumDialect struct { func (x *GreenplumDialect) Reset() { *x = GreenplumDialect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GreenplumDialect) String() string { @@ -1314,7 +1276,7 @@ func (*GreenplumDialect) ProtoMessage() {} func (x *GreenplumDialect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1304,9 @@ type ObjectNameMappingList struct { func (x *ObjectNameMappingList) Reset() { *x = ObjectNameMappingList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectNameMappingList) String() string { @@ -1357,7 +1317,7 @@ func (*ObjectNameMappingList) ProtoMessage() {} func (x *ObjectNameMappingList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1394,11 +1354,9 @@ type ObjectNameMapping struct { func (x *ObjectNameMapping) Reset() { *x = ObjectNameMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectNameMapping) String() string { @@ -1409,7 +1367,7 @@ func (*ObjectNameMapping) ProtoMessage() {} func (x *ObjectNameMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1420,9 @@ type NameMappingKey struct { func (x *NameMappingKey) Reset() { *x = NameMappingKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NameMappingKey) String() string { @@ -1477,7 +1433,7 @@ func (*NameMappingKey) ProtoMessage() {} func (x *NameMappingKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1549,11 +1505,9 @@ type NameMappingValue struct { func (x *NameMappingValue) Reset() { *x = NameMappingValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NameMappingValue) String() string { @@ -1564,7 +1518,7 @@ func (*NameMappingValue) ProtoMessage() {} func (x *NameMappingValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1630,11 +1584,9 @@ type SourceEnv struct { func (x *SourceEnv) Reset() { *x = SourceEnv{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceEnv) String() string { @@ -1645,7 +1597,7 @@ func (*SourceEnv) ProtoMessage() {} func (x *SourceEnv) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2017,296 +1969,6 @@ func file_google_cloud_bigquery_migration_v2_translation_config_proto_init() { if File_google_cloud_bigquery_migration_v2_translation_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationConfigDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Dialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*HiveQLDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RedshiftDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TeradataDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OracleDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SparkSQLDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SnowflakeDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NetezzaDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AzureSynapseDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*VerticaDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SQLServerDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PrestoDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MySQLDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DB2Dialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SQLiteDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GreenplumDialect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ObjectNameMappingList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ObjectNameMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*NameMappingKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*NameMappingValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SourceEnv); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2_translation_config_proto_msgTypes[0].OneofWrappers = []any{ (*TranslationConfigDetails_GcsSourcePath)(nil), (*TranslationConfigDetails_GcsTargetPath)(nil), diff --git a/bigquery/migration/apiv2/migrationpb/translation_details.pb.go b/bigquery/migration/apiv2/migrationpb/translation_details.pb.go index 22daa3e7da56..a25d87617fba 100755 --- a/bigquery/migration/apiv2/migrationpb/translation_details.pb.go +++ b/bigquery/migration/apiv2/migrationpb/translation_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/translation_details.proto @@ -62,11 +62,9 @@ type TranslationDetails struct { func (x *TranslationDetails) Reset() { *x = TranslationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationDetails) String() string { @@ -77,7 +75,7 @@ func (*TranslationDetails) ProtoMessage() {} func (x *TranslationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141,11 +139,9 @@ type SourceTargetMapping struct { func (x *SourceTargetMapping) Reset() { *x = SourceTargetMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceTargetMapping) String() string { @@ -156,7 +152,7 @@ func (*SourceTargetMapping) ProtoMessage() {} func (x *SourceTargetMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type SourceSpec struct { func (x *SourceSpec) Reset() { *x = SourceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceSpec) String() string { @@ -219,7 +213,7 @@ func (*SourceSpec) ProtoMessage() {} func (x *SourceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +288,9 @@ type TargetSpec struct { func (x *TargetSpec) Reset() { *x = TargetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSpec) String() string { @@ -309,7 +301,7 @@ func (*TargetSpec) ProtoMessage() {} func (x *TargetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +342,9 @@ type Literal struct { func (x *Literal) Reset() { *x = Literal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Literal) String() string { @@ -365,7 +355,7 @@ func (*Literal) ProtoMessage() {} func (x *Literal) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +439,9 @@ type SourceEnvironment struct { func (x *SourceEnvironment) Reset() { *x = SourceEnvironment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceEnvironment) String() string { @@ -464,7 +452,7 @@ func (*SourceEnvironment) ProtoMessage() {} func (x *SourceEnvironment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,80 +622,6 @@ func file_google_cloud_bigquery_migration_v2_translation_details_proto_init() { if File_google_cloud_bigquery_migration_v2_translation_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SourceTargetMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SourceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TargetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Literal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SourceEnvironment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2_translation_details_proto_msgTypes[2].OneofWrappers = []any{ (*SourceSpec_BaseUri)(nil), (*SourceSpec_Literal)(nil), diff --git a/bigquery/migration/apiv2/migrationpb/translation_suggestion.pb.go b/bigquery/migration/apiv2/migrationpb/translation_suggestion.pb.go index 8daed6048d13..6cd4fcb04004 100755 --- a/bigquery/migration/apiv2/migrationpb/translation_suggestion.pb.go +++ b/bigquery/migration/apiv2/migrationpb/translation_suggestion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/translation_suggestion.proto @@ -116,11 +116,9 @@ type TranslationReportRecord struct { func (x *TranslationReportRecord) Reset() { *x = TranslationReportRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_suggestion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_suggestion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationReportRecord) String() string { @@ -131,7 +129,7 @@ func (*TranslationReportRecord) ProtoMessage() {} func (x *TranslationReportRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_suggestion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,20 +261,6 @@ func file_google_cloud_bigquery_migration_v2_translation_suggestion_proto_init() if File_google_cloud_bigquery_migration_v2_translation_suggestion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_translation_suggestion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationReportRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2/migrationpb/translation_usability.pb.go b/bigquery/migration/apiv2/migrationpb/translation_usability.pb.go index 7e6248674a5e..f0454e8e44fb 100755 --- a/bigquery/migration/apiv2/migrationpb/translation_usability.pb.go +++ b/bigquery/migration/apiv2/migrationpb/translation_usability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2/translation_usability.proto @@ -70,11 +70,9 @@ type GcsReportLogMessage struct { func (x *GcsReportLogMessage) Reset() { *x = GcsReportLogMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2_translation_usability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2_translation_usability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsReportLogMessage) String() string { @@ -85,7 +83,7 @@ func (*GcsReportLogMessage) ProtoMessage() {} func (x *GcsReportLogMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2_translation_usability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,20 +257,6 @@ func file_google_cloud_bigquery_migration_v2_translation_usability_proto_init() if File_google_cloud_bigquery_migration_v2_translation_usability_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2_translation_usability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsReportLogMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2alpha/helpers.go b/bigquery/migration/apiv2alpha/helpers.go index 0834b471dd89..88eb4d93c10c 100755 --- a/bigquery/migration/apiv2alpha/helpers.go +++ b/bigquery/migration/apiv2alpha/helpers.go @@ -18,10 +18,20 @@ package migration import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerymigration.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/migration/apiv2alpha/migration_client.go b/bigquery/migration/apiv2alpha/migration_client.go index aa462ca337b8..868e1dd860c6 100755 --- a/bigquery/migration/apiv2alpha/migration_client.go +++ b/bigquery/migration/apiv2alpha/migration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( migrationpb "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -307,6 +306,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new migration service client based on gRPC. @@ -333,6 +334,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: migrationpb.NewMigrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -379,6 +381,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new migration service rest client. @@ -396,6 +400,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -448,7 +453,7 @@ func (c *gRPCClient) CreateMigrationWorkflow(ctx context.Context, req *migration var resp *migrationpb.MigrationWorkflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMigrationWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMigrationWorkflow, req, settings.GRPC, c.logger, "CreateMigrationWorkflow") return err }, opts...) if err != nil { @@ -466,7 +471,7 @@ func (c *gRPCClient) GetMigrationWorkflow(ctx context.Context, req *migrationpb. var resp *migrationpb.MigrationWorkflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMigrationWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMigrationWorkflow, req, settings.GRPC, c.logger, "GetMigrationWorkflow") return err }, opts...) if err != nil { @@ -495,7 +500,7 @@ func (c *gRPCClient) ListMigrationWorkflows(ctx context.Context, req *migrationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMigrationWorkflows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMigrationWorkflows, req, settings.GRPC, c.logger, "ListMigrationWorkflows") return err }, opts...) if err != nil { @@ -529,7 +534,7 @@ func (c *gRPCClient) DeleteMigrationWorkflow(ctx context.Context, req *migration opts = append((*c.CallOptions).DeleteMigrationWorkflow[0:len((*c.CallOptions).DeleteMigrationWorkflow):len((*c.CallOptions).DeleteMigrationWorkflow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteMigrationWorkflow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteMigrationWorkflow, req, settings.GRPC, c.logger, "DeleteMigrationWorkflow") return err }, opts...) return err @@ -543,7 +548,7 @@ func (c *gRPCClient) StartMigrationWorkflow(ctx context.Context, req *migrationp opts = append((*c.CallOptions).StartMigrationWorkflow[0:len((*c.CallOptions).StartMigrationWorkflow):len((*c.CallOptions).StartMigrationWorkflow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.StartMigrationWorkflow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.StartMigrationWorkflow, req, settings.GRPC, c.logger, "StartMigrationWorkflow") return err }, opts...) return err @@ -558,7 +563,7 @@ func (c *gRPCClient) GetMigrationSubtask(ctx context.Context, req *migrationpb.G var resp *migrationpb.MigrationSubtask err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMigrationSubtask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMigrationSubtask, req, settings.GRPC, c.logger, "GetMigrationSubtask") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *gRPCClient) ListMigrationSubtasks(ctx context.Context, req *migrationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMigrationSubtasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMigrationSubtasks, req, settings.GRPC, c.logger, "ListMigrationSubtasks") return err }, opts...) if err != nil { @@ -648,17 +653,7 @@ func (c *restClient) CreateMigrationWorkflow(ctx context.Context, req *migration httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMigrationWorkflow") if err != nil { return err } @@ -714,17 +709,7 @@ func (c *restClient) GetMigrationWorkflow(ctx context.Context, req *migrationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMigrationWorkflow") if err != nil { return err } @@ -792,21 +777,10 @@ func (c *restClient) ListMigrationWorkflows(ctx context.Context, req *migrationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMigrationWorkflows") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -861,15 +835,8 @@ func (c *restClient) DeleteMigrationWorkflow(ctx context.Context, req *migration httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMigrationWorkflow") + return err }, opts...) } @@ -907,15 +874,8 @@ func (c *restClient) StartMigrationWorkflow(ctx context.Context, req *migrationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartMigrationWorkflow") + return err }, opts...) } @@ -958,17 +918,7 @@ func (c *restClient) GetMigrationSubtask(ctx context.Context, req *migrationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMigrationSubtask") if err != nil { return err } @@ -1039,21 +989,10 @@ func (c *restClient) ListMigrationSubtasks(ctx context.Context, req *migrationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMigrationSubtasks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/bigquery/migration/apiv2alpha/migration_client_example_go123_test.go b/bigquery/migration/apiv2alpha/migration_client_example_go123_test.go index 92e1a988c27d..06da34bfb8f8 100644 --- a/bigquery/migration/apiv2alpha/migration_client_example_go123_test.go +++ b/bigquery/migration/apiv2alpha/migration_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListMigrationSubtasks_all() { } for resp, err := range c.ListMigrationSubtasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListMigrationWorkflows_all() { } for resp, err := range c.ListMigrationWorkflows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/migration/apiv2alpha/migrationpb/assessment_task.pb.go b/bigquery/migration/apiv2alpha/migrationpb/assessment_task.pb.go index 805541d30430..e1c863d89ae0 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/assessment_task.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/assessment_task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/assessment_task.proto @@ -56,11 +56,9 @@ type AssessmentTaskDetails struct { func (x *AssessmentTaskDetails) Reset() { *x = AssessmentTaskDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssessmentTaskDetails) String() string { @@ -71,7 +69,7 @@ func (*AssessmentTaskDetails) ProtoMessage() {} func (x *AssessmentTaskDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type AssessmentOrchestrationResultDetails struct { func (x *AssessmentOrchestrationResultDetails) Reset() { *x = AssessmentOrchestrationResultDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssessmentOrchestrationResultDetails) String() string { @@ -141,7 +137,7 @@ func (*AssessmentOrchestrationResultDetails) ProtoMessage() {} func (x *AssessmentOrchestrationResultDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,32 +237,6 @@ func file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_init() { if File_google_cloud_bigquery_migration_v2alpha_assessment_task_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AssessmentTaskDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_assessment_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AssessmentOrchestrationResultDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2alpha/migrationpb/migration_entities.pb.go b/bigquery/migration/apiv2alpha/migrationpb/migration_entities.pb.go index 72b3d7540fde..3876eb9ecf9a 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/migration_entities.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/migration_entities.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/migration_entities.proto @@ -269,11 +269,9 @@ type MigrationWorkflow struct { func (x *MigrationWorkflow) Reset() { *x = MigrationWorkflow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationWorkflow) String() string { @@ -284,7 +282,7 @@ func (*MigrationWorkflow) ProtoMessage() {} func (x *MigrationWorkflow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +375,9 @@ type MigrationTask struct { func (x *MigrationTask) Reset() { *x = MigrationTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationTask) String() string { @@ -392,7 +388,7 @@ func (*MigrationTask) ProtoMessage() {} func (x *MigrationTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +540,9 @@ type MigrationSubtask struct { func (x *MigrationSubtask) Reset() { *x = MigrationSubtask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationSubtask) String() string { @@ -559,7 +553,7 @@ func (*MigrationSubtask) ProtoMessage() {} func (x *MigrationSubtask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +655,9 @@ type MigrationTaskOrchestrationResult struct { func (x *MigrationTaskOrchestrationResult) Reset() { *x = MigrationTaskOrchestrationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationTaskOrchestrationResult) String() string { @@ -676,7 +668,7 @@ func (*MigrationTaskOrchestrationResult) ProtoMessage() {} func (x *MigrationTaskOrchestrationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,56 +999,6 @@ func file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_init( file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_init() file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_init() file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MigrationWorkflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MigrationSubtask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigrationTaskOrchestrationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_msgTypes[1].OneofWrappers = []any{ (*MigrationTask_AssessmentTaskDetails)(nil), (*MigrationTask_TranslationTaskDetails)(nil), diff --git a/bigquery/migration/apiv2alpha/migrationpb/migration_error_details.pb.go b/bigquery/migration/apiv2alpha/migrationpb/migration_error_details.pb.go index 5b1fc3f9652a..1c7ef91e2e49 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/migration_error_details.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/migration_error_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/migration_error_details.proto @@ -55,11 +55,9 @@ type ResourceErrorDetail struct { func (x *ResourceErrorDetail) Reset() { *x = ResourceErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceErrorDetail) String() string { @@ -70,7 +68,7 @@ func (*ResourceErrorDetail) ProtoMessage() {} func (x *ResourceErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,11 +119,9 @@ type ErrorDetail struct { func (x *ErrorDetail) Reset() { *x = ErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetail) String() string { @@ -136,7 +132,7 @@ func (*ErrorDetail) ProtoMessage() {} func (x *ErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +177,9 @@ type ErrorLocation struct { func (x *ErrorLocation) Reset() { *x = ErrorLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorLocation) String() string { @@ -196,7 +190,7 @@ func (*ErrorLocation) ProtoMessage() {} func (x *ErrorLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,44 +317,6 @@ func file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_ if File_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ErrorLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2alpha/migrationpb/migration_metrics.pb.go b/bigquery/migration/apiv2alpha/migrationpb/migration_metrics.pb.go index 77a620257025..50fcc1175890 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/migration_metrics.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/migration_metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/migration_metrics.proto @@ -71,11 +71,9 @@ type TimeSeries struct { func (x *TimeSeries) Reset() { *x = TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeries) String() string { @@ -86,7 +84,7 @@ func (*TimeSeries) ProtoMessage() {} func (x *TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type Point struct { func (x *Point) Reset() { *x = Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Point) String() string { @@ -166,7 +162,7 @@ func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type TimeInterval struct { func (x *TimeInterval) Reset() { *x = TimeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeInterval) String() string { @@ -228,7 +222,7 @@ func (*TimeInterval) ProtoMessage() {} func (x *TimeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +271,9 @@ type TypedValue struct { func (x *TypedValue) Reset() { *x = TypedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypedValue) String() string { @@ -292,7 +284,7 @@ func (*TypedValue) ProtoMessage() {} func (x *TypedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,56 +512,6 @@ func file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_init() if File_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TypedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_msgTypes[3].OneofWrappers = []any{ (*TypedValue_BoolValue)(nil), (*TypedValue_Int64Value)(nil), diff --git a/bigquery/migration/apiv2alpha/migrationpb/migration_service.pb.go b/bigquery/migration/apiv2alpha/migrationpb/migration_service.pb.go index bfe954a81408..2e227f5aa2e2 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/migration_service.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/migration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/migration_service.proto @@ -57,11 +57,9 @@ type CreateMigrationWorkflowRequest struct { func (x *CreateMigrationWorkflowRequest) Reset() { *x = CreateMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMigrationWorkflowRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateMigrationWorkflowRequest) ProtoMessage() {} func (x *CreateMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type GetMigrationWorkflowRequest struct { func (x *GetMigrationWorkflowRequest) Reset() { *x = GetMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigrationWorkflowRequest) String() string { @@ -131,7 +127,7 @@ func (*GetMigrationWorkflowRequest) ProtoMessage() {} func (x *GetMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +180,9 @@ type ListMigrationWorkflowsRequest struct { func (x *ListMigrationWorkflowsRequest) Reset() { *x = ListMigrationWorkflowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationWorkflowsRequest) String() string { @@ -199,7 +193,7 @@ func (*ListMigrationWorkflowsRequest) ProtoMessage() {} func (x *ListMigrationWorkflowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +251,9 @@ type ListMigrationWorkflowsResponse struct { func (x *ListMigrationWorkflowsResponse) Reset() { *x = ListMigrationWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationWorkflowsResponse) String() string { @@ -272,7 +264,7 @@ func (*ListMigrationWorkflowsResponse) ProtoMessage() {} func (x *ListMigrationWorkflowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +306,9 @@ type DeleteMigrationWorkflowRequest struct { func (x *DeleteMigrationWorkflowRequest) Reset() { *x = DeleteMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMigrationWorkflowRequest) String() string { @@ -329,7 +319,7 @@ func (*DeleteMigrationWorkflowRequest) ProtoMessage() {} func (x *DeleteMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +354,9 @@ type StartMigrationWorkflowRequest struct { func (x *StartMigrationWorkflowRequest) Reset() { *x = StartMigrationWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMigrationWorkflowRequest) String() string { @@ -379,7 +367,7 @@ func (*StartMigrationWorkflowRequest) ProtoMessage() {} func (x *StartMigrationWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +404,9 @@ type GetMigrationSubtaskRequest struct { func (x *GetMigrationSubtaskRequest) Reset() { *x = GetMigrationSubtaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigrationSubtaskRequest) String() string { @@ -431,7 +417,7 @@ func (*GetMigrationSubtaskRequest) ProtoMessage() {} func (x *GetMigrationSubtaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +474,9 @@ type ListMigrationSubtasksRequest struct { func (x *ListMigrationSubtasksRequest) Reset() { *x = ListMigrationSubtasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationSubtasksRequest) String() string { @@ -503,7 +487,7 @@ func (*ListMigrationSubtasksRequest) ProtoMessage() {} func (x *ListMigrationSubtasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +552,9 @@ type ListMigrationSubtasksResponse struct { func (x *ListMigrationSubtasksResponse) Reset() { *x = ListMigrationSubtasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationSubtasksResponse) String() string { @@ -583,7 +565,7 @@ func (*ListMigrationSubtasksResponse) ProtoMessage() {} func (x *ListMigrationSubtasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,116 +919,6 @@ func file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_init() file_google_cloud_bigquery_migration_v2alpha_migration_entities_proto_init() file_google_cloud_bigquery_migration_v2alpha_migration_error_details_proto_init() file_google_cloud_bigquery_migration_v2alpha_migration_metrics_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationWorkflowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationWorkflowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StartMigrationWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetMigrationSubtaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationSubtasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_migration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationSubtasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2alpha/migrationpb/translation_service.pb.go b/bigquery/migration/apiv2alpha/migrationpb/translation_service.pb.go index b8b1d97256f5..61cc7752bf86 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/translation_service.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/translation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/translation_service.proto @@ -160,11 +160,9 @@ type TranslateQueryRequest struct { func (x *TranslateQueryRequest) Reset() { *x = TranslateQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateQueryRequest) String() string { @@ -175,7 +173,7 @@ func (*TranslateQueryRequest) ProtoMessage() {} func (x *TranslateQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type TranslateQueryResponse struct { func (x *TranslateQueryResponse) Reset() { *x = TranslateQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateQueryResponse) String() string { @@ -246,7 +242,7 @@ func (*TranslateQueryResponse) ProtoMessage() {} func (x *TranslateQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +302,9 @@ type SqlTranslationErrorDetail struct { func (x *SqlTranslationErrorDetail) Reset() { *x = SqlTranslationErrorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlTranslationErrorDetail) String() string { @@ -321,7 +315,7 @@ func (*SqlTranslationErrorDetail) ProtoMessage() {} func (x *SqlTranslationErrorDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +366,9 @@ type SqlTranslationError struct { func (x *SqlTranslationError) Reset() { *x = SqlTranslationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlTranslationError) String() string { @@ -387,7 +379,7 @@ func (*SqlTranslationError) ProtoMessage() {} func (x *SqlTranslationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +422,9 @@ type SqlTranslationWarning struct { func (x *SqlTranslationWarning) Reset() { *x = SqlTranslationWarning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlTranslationWarning) String() string { @@ -445,7 +435,7 @@ func (*SqlTranslationWarning) ProtoMessage() {} func (x *SqlTranslationWarning) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,68 +636,6 @@ func file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_init if File_google_cloud_bigquery_migration_v2alpha_translation_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslateQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TranslateQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SqlTranslationErrorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SqlTranslationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SqlTranslationWarning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/migration/apiv2alpha/migrationpb/translation_task.pb.go b/bigquery/migration/apiv2alpha/migrationpb/translation_task.pb.go index dcd6887fbb6f..813cdf70213e 100755 --- a/bigquery/migration/apiv2alpha/migrationpb/translation_task.pb.go +++ b/bigquery/migration/apiv2alpha/migrationpb/translation_task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/migration/v2alpha/translation_task.proto @@ -301,11 +301,9 @@ type TranslationFileMapping struct { func (x *TranslationFileMapping) Reset() { *x = TranslationFileMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationFileMapping) String() string { @@ -316,7 +314,7 @@ func (*TranslationFileMapping) ProtoMessage() {} func (x *TranslationFileMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +388,9 @@ type TranslationTaskDetails struct { func (x *TranslationTaskDetails) Reset() { *x = TranslationTaskDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationTaskDetails) String() string { @@ -405,7 +401,7 @@ func (*TranslationTaskDetails) ProtoMessage() {} func (x *TranslationTaskDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +530,9 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -549,7 +543,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +579,9 @@ type IdentifierSettings struct { func (x *IdentifierSettings) Reset() { *x = IdentifierSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdentifierSettings) String() string { @@ -600,7 +592,7 @@ func (*IdentifierSettings) ProtoMessage() {} func (x *IdentifierSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +630,9 @@ type TeradataOptions struct { func (x *TeradataOptions) Reset() { *x = TeradataOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TeradataOptions) String() string { @@ -653,7 +643,7 @@ func (*TeradataOptions) ProtoMessage() {} func (x *TeradataOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +678,9 @@ type BteqOptions struct { func (x *BteqOptions) Reset() { *x = BteqOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BteqOptions) String() string { @@ -703,7 +691,7 @@ func (*BteqOptions) ProtoMessage() {} func (x *BteqOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +743,9 @@ type DatasetReference struct { func (x *DatasetReference) Reset() { *x = DatasetReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetReference) String() string { @@ -770,7 +756,7 @@ func (*DatasetReference) ProtoMessage() {} func (x *DatasetReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,92 +1017,6 @@ func file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_init() if File_google_cloud_bigquery_migration_v2alpha_translation_task_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslationFileMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TranslationTaskDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*IdentifierSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TeradataOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BteqOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DatasetReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_migration_v2alpha_translation_task_proto_msgTypes[1].OneofWrappers = []any{ (*TranslationTaskDetails_TeradataOptions)(nil), (*TranslationTaskDetails_BteqOptions)(nil), diff --git a/bigquery/migration/apiv2alpha/sql_translation_client.go b/bigquery/migration/apiv2alpha/sql_translation_client.go index ccccda7eef0d..70da010bafe7 100755 --- a/bigquery/migration/apiv2alpha/sql_translation_client.go +++ b/bigquery/migration/apiv2alpha/sql_translation_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" migrationpb "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -133,6 +132,8 @@ type sqlTranslationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSqlTranslationClient creates a new sql translation service client based on gRPC. @@ -159,6 +160,7 @@ func NewSqlTranslationClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, sqlTranslationClient: migrationpb.NewSqlTranslationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -205,6 +207,8 @@ type sqlTranslationRESTClient struct { // Points back to the CallOptions field of the containing SqlTranslationClient CallOptions **SqlTranslationCallOptions + + logger *slog.Logger } // NewSqlTranslationRESTClient creates a new sql translation service rest client. @@ -222,6 +226,7 @@ func NewSqlTranslationRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,7 +279,7 @@ func (c *sqlTranslationGRPCClient) TranslateQuery(ctx context.Context, req *migr var resp *migrationpb.TranslateQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sqlTranslationClient.TranslateQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sqlTranslationClient.TranslateQuery, req, settings.GRPC, c.logger, "TranslateQuery") return err }, opts...) if err != nil { @@ -317,17 +322,7 @@ func (c *sqlTranslationRESTClient) TranslateQuery(ctx context.Context, req *migr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TranslateQuery") if err != nil { return err } diff --git a/bigquery/reservation/apiv1/helpers.go b/bigquery/reservation/apiv1/helpers.go index 11eaacb10edb..73d1c230cf7e 100755 --- a/bigquery/reservation/apiv1/helpers.go +++ b/bigquery/reservation/apiv1/helpers.go @@ -18,10 +18,20 @@ package reservation import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigqueryreservation.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/reservation/apiv1/reservation_client.go b/bigquery/reservation/apiv1/reservation_client.go index beed102e8ce9..5b4e71c7fe36 100755 --- a/bigquery/reservation/apiv1/reservation_client.go +++ b/bigquery/reservation/apiv1/reservation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( reservationpb "cloud.google.com/go/bigquery/reservation/apiv1/reservationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -770,6 +769,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new reservation service client based on gRPC. @@ -810,6 +811,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: reservationpb.NewReservationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -856,6 +858,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new reservation service rest client. @@ -887,6 +891,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -939,7 +944,7 @@ func (c *gRPCClient) CreateReservation(ctx context.Context, req *reservationpb.C var resp *reservationpb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReservation, req, settings.GRPC, c.logger, "CreateReservation") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *gRPCClient) ListReservations(ctx context.Context, req *reservationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReservations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReservations, req, settings.GRPC, c.logger, "ListReservations") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *gRPCClient) GetReservation(ctx context.Context, req *reservationpb.GetR var resp *reservationpb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReservation, req, settings.GRPC, c.logger, "GetReservation") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *gRPCClient) DeleteReservation(ctx context.Context, req *reservationpb.D opts = append((*c.CallOptions).DeleteReservation[0:len((*c.CallOptions).DeleteReservation):len((*c.CallOptions).DeleteReservation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteReservation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteReservation, req, settings.GRPC, c.logger, "DeleteReservation") return err }, opts...) return err @@ -1035,7 +1040,7 @@ func (c *gRPCClient) UpdateReservation(ctx context.Context, req *reservationpb.U var resp *reservationpb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateReservation, req, settings.GRPC, c.logger, "UpdateReservation") return err }, opts...) if err != nil { @@ -1053,7 +1058,7 @@ func (c *gRPCClient) FailoverReservation(ctx context.Context, req *reservationpb var resp *reservationpb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FailoverReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FailoverReservation, req, settings.GRPC, c.logger, "FailoverReservation") return err }, opts...) if err != nil { @@ -1071,7 +1076,7 @@ func (c *gRPCClient) CreateCapacityCommitment(ctx context.Context, req *reservat var resp *reservationpb.CapacityCommitment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCapacityCommitment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCapacityCommitment, req, settings.GRPC, c.logger, "CreateCapacityCommitment") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *gRPCClient) ListCapacityCommitments(ctx context.Context, req *reservati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCapacityCommitments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCapacityCommitments, req, settings.GRPC, c.logger, "ListCapacityCommitments") return err }, opts...) if err != nil { @@ -1135,7 +1140,7 @@ func (c *gRPCClient) GetCapacityCommitment(ctx context.Context, req *reservation var resp *reservationpb.CapacityCommitment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCapacityCommitment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCapacityCommitment, req, settings.GRPC, c.logger, "GetCapacityCommitment") return err }, opts...) if err != nil { @@ -1152,7 +1157,7 @@ func (c *gRPCClient) DeleteCapacityCommitment(ctx context.Context, req *reservat opts = append((*c.CallOptions).DeleteCapacityCommitment[0:len((*c.CallOptions).DeleteCapacityCommitment):len((*c.CallOptions).DeleteCapacityCommitment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteCapacityCommitment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteCapacityCommitment, req, settings.GRPC, c.logger, "DeleteCapacityCommitment") return err }, opts...) return err @@ -1167,7 +1172,7 @@ func (c *gRPCClient) UpdateCapacityCommitment(ctx context.Context, req *reservat var resp *reservationpb.CapacityCommitment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCapacityCommitment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCapacityCommitment, req, settings.GRPC, c.logger, "UpdateCapacityCommitment") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *gRPCClient) SplitCapacityCommitment(ctx context.Context, req *reservati var resp *reservationpb.SplitCapacityCommitmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SplitCapacityCommitment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SplitCapacityCommitment, req, settings.GRPC, c.logger, "SplitCapacityCommitment") return err }, opts...) if err != nil { @@ -1203,7 +1208,7 @@ func (c *gRPCClient) MergeCapacityCommitments(ctx context.Context, req *reservat var resp *reservationpb.CapacityCommitment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MergeCapacityCommitments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MergeCapacityCommitments, req, settings.GRPC, c.logger, "MergeCapacityCommitments") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *gRPCClient) CreateAssignment(ctx context.Context, req *reservationpb.Cr var resp *reservationpb.Assignment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAssignment, req, settings.GRPC, c.logger, "CreateAssignment") return err }, opts...) if err != nil { @@ -1250,7 +1255,7 @@ func (c *gRPCClient) ListAssignments(ctx context.Context, req *reservationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssignments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssignments, req, settings.GRPC, c.logger, "ListAssignments") return err }, opts...) if err != nil { @@ -1284,7 +1289,7 @@ func (c *gRPCClient) DeleteAssignment(ctx context.Context, req *reservationpb.De opts = append((*c.CallOptions).DeleteAssignment[0:len((*c.CallOptions).DeleteAssignment):len((*c.CallOptions).DeleteAssignment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAssignment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAssignment, req, settings.GRPC, c.logger, "DeleteAssignment") return err }, opts...) return err @@ -1310,7 +1315,7 @@ func (c *gRPCClient) SearchAssignments(ctx context.Context, req *reservationpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchAssignments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchAssignments, req, settings.GRPC, c.logger, "SearchAssignments") return err }, opts...) if err != nil { @@ -1356,7 +1361,7 @@ func (c *gRPCClient) SearchAllAssignments(ctx context.Context, req *reservationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchAllAssignments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchAllAssignments, req, settings.GRPC, c.logger, "SearchAllAssignments") return err }, opts...) if err != nil { @@ -1391,7 +1396,7 @@ func (c *gRPCClient) MoveAssignment(ctx context.Context, req *reservationpb.Move var resp *reservationpb.Assignment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MoveAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MoveAssignment, req, settings.GRPC, c.logger, "MoveAssignment") return err }, opts...) if err != nil { @@ -1409,7 +1414,7 @@ func (c *gRPCClient) UpdateAssignment(ctx context.Context, req *reservationpb.Up var resp *reservationpb.Assignment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAssignment, req, settings.GRPC, c.logger, "UpdateAssignment") return err }, opts...) if err != nil { @@ -1427,7 +1432,7 @@ func (c *gRPCClient) GetBiReservation(ctx context.Context, req *reservationpb.Ge var resp *reservationpb.BiReservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBiReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBiReservation, req, settings.GRPC, c.logger, "GetBiReservation") return err }, opts...) if err != nil { @@ -1445,7 +1450,7 @@ func (c *gRPCClient) UpdateBiReservation(ctx context.Context, req *reservationpb var resp *reservationpb.BiReservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBiReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBiReservation, req, settings.GRPC, c.logger, "UpdateBiReservation") return err }, opts...) if err != nil { @@ -1497,17 +1502,7 @@ func (c *restClient) CreateReservation(ctx context.Context, req *reservationpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReservation") if err != nil { return err } @@ -1569,21 +1564,10 @@ func (c *restClient) ListReservations(ctx context.Context, req *reservationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReservations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1646,17 +1630,7 @@ func (c *restClient) GetReservation(ctx context.Context, req *reservationpb.GetR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReservation") if err != nil { return err } @@ -1705,15 +1679,8 @@ func (c *restClient) DeleteReservation(ctx context.Context, req *reservationpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReservation") + return err }, opts...) } @@ -1764,17 +1731,7 @@ func (c *restClient) UpdateReservation(ctx context.Context, req *reservationpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateReservation") if err != nil { return err } @@ -1834,17 +1791,7 @@ func (c *restClient) FailoverReservation(ctx context.Context, req *reservationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverReservation") if err != nil { return err } @@ -1907,17 +1854,7 @@ func (c *restClient) CreateCapacityCommitment(ctx context.Context, req *reservat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCapacityCommitment") if err != nil { return err } @@ -1979,21 +1916,10 @@ func (c *restClient) ListCapacityCommitments(ctx context.Context, req *reservati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCapacityCommitments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2056,17 +1982,7 @@ func (c *restClient) GetCapacityCommitment(ctx context.Context, req *reservation httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCapacityCommitment") if err != nil { return err } @@ -2118,15 +2034,8 @@ func (c *restClient) DeleteCapacityCommitment(ctx context.Context, req *reservat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCapacityCommitment") + return err }, opts...) } @@ -2183,17 +2092,7 @@ func (c *restClient) UpdateCapacityCommitment(ctx context.Context, req *reservat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCapacityCommitment") if err != nil { return err } @@ -2256,17 +2155,7 @@ func (c *restClient) SplitCapacityCommitment(ctx context.Context, req *reservati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SplitCapacityCommitment") if err != nil { return err } @@ -2328,17 +2217,7 @@ func (c *restClient) MergeCapacityCommitments(ctx context.Context, req *reservat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MergeCapacityCommitments") if err != nil { return err } @@ -2433,17 +2312,7 @@ func (c *restClient) CreateAssignment(ctx context.Context, req *reservationpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAssignment") if err != nil { return err } @@ -2527,21 +2396,10 @@ func (c *restClient) ListAssignments(ctx context.Context, req *reservationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssignments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2617,15 +2475,8 @@ func (c *restClient) DeleteAssignment(ctx context.Context, req *reservationpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAssignment") + return err }, opts...) } @@ -2705,21 +2556,10 @@ func (c *restClient) SearchAssignments(ctx context.Context, req *reservationpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAssignments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2820,21 +2660,10 @@ func (c *restClient) SearchAllAssignments(ctx context.Context, req *reservationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAllAssignments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2907,17 +2736,7 @@ func (c *restClient) MoveAssignment(ctx context.Context, req *reservationpb.Move httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveAssignment") if err != nil { return err } @@ -2983,17 +2802,7 @@ func (c *restClient) UpdateAssignment(ctx context.Context, req *reservationpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAssignment") if err != nil { return err } @@ -3043,17 +2852,7 @@ func (c *restClient) GetBiReservation(ctx context.Context, req *reservationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBiReservation") if err != nil { return err } @@ -3124,17 +2923,7 @@ func (c *restClient) UpdateBiReservation(ctx context.Context, req *reservationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBiReservation") if err != nil { return err } diff --git a/bigquery/reservation/apiv1/reservation_client_example_go123_test.go b/bigquery/reservation/apiv1/reservation_client_example_go123_test.go index 2d3a786ce016..f5c4f0c8ffa3 100644 --- a/bigquery/reservation/apiv1/reservation_client_example_go123_test.go +++ b/bigquery/reservation/apiv1/reservation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAssignments_all() { } for resp, err := range c.ListAssignments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListCapacityCommitments_all() { } for resp, err := range c.ListCapacityCommitments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListReservations_all() { } for resp, err := range c.ListReservations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_SearchAllAssignments_all() { } for resp, err := range c.SearchAllAssignments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_SearchAssignments_all() { } for resp, err := range c.SearchAssignments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/bigquery/reservation/apiv1/reservationpb/reservation.pb.go b/bigquery/reservation/apiv1/reservationpb/reservation.pb.go index 7ed75a67abd1..a7e99f11f3b0 100755 --- a/bigquery/reservation/apiv1/reservationpb/reservation.pb.go +++ b/bigquery/reservation/apiv1/reservationpb/reservation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/reservation/v1/reservation.proto @@ -475,11 +475,9 @@ type Reservation struct { func (x *Reservation) Reset() { *x = Reservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reservation) String() string { @@ -490,7 +488,7 @@ func (*Reservation) ProtoMessage() {} func (x *Reservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +650,9 @@ type CapacityCommitment struct { func (x *CapacityCommitment) Reset() { *x = CapacityCommitment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CapacityCommitment) String() string { @@ -667,7 +663,7 @@ func (*CapacityCommitment) ProtoMessage() {} func (x *CapacityCommitment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +775,9 @@ type CreateReservationRequest struct { func (x *CreateReservationRequest) Reset() { *x = CreateReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReservationRequest) String() string { @@ -794,7 +788,7 @@ func (*CreateReservationRequest) ProtoMessage() {} func (x *CreateReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +843,9 @@ type ListReservationsRequest struct { func (x *ListReservationsRequest) Reset() { *x = ListReservationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationsRequest) String() string { @@ -864,7 +856,7 @@ func (*ListReservationsRequest) ProtoMessage() {} func (x *ListReservationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +908,9 @@ type ListReservationsResponse struct { func (x *ListReservationsResponse) Reset() { *x = ListReservationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationsResponse) String() string { @@ -931,7 +921,7 @@ func (*ListReservationsResponse) ProtoMessage() {} func (x *ListReservationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +965,9 @@ type GetReservationRequest struct { func (x *GetReservationRequest) Reset() { *x = GetReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReservationRequest) String() string { @@ -990,7 +978,7 @@ func (*GetReservationRequest) ProtoMessage() {} func (x *GetReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1027,11 +1015,9 @@ type DeleteReservationRequest struct { func (x *DeleteReservationRequest) Reset() { *x = DeleteReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReservationRequest) String() string { @@ -1042,7 +1028,7 @@ func (*DeleteReservationRequest) ProtoMessage() {} func (x *DeleteReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1065,9 @@ type UpdateReservationRequest struct { func (x *UpdateReservationRequest) Reset() { *x = UpdateReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReservationRequest) String() string { @@ -1094,7 +1078,7 @@ func (*UpdateReservationRequest) ProtoMessage() {} func (x *UpdateReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,11 +1121,9 @@ type FailoverReservationRequest struct { func (x *FailoverReservationRequest) Reset() { *x = FailoverReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverReservationRequest) String() string { @@ -1152,7 +1134,7 @@ func (*FailoverReservationRequest) ProtoMessage() {} func (x *FailoverReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1182,9 @@ type CreateCapacityCommitmentRequest struct { func (x *CreateCapacityCommitmentRequest) Reset() { *x = CreateCapacityCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCapacityCommitmentRequest) String() string { @@ -1215,7 +1195,7 @@ func (*CreateCapacityCommitmentRequest) ProtoMessage() {} func (x *CreateCapacityCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1277,11 +1257,9 @@ type ListCapacityCommitmentsRequest struct { func (x *ListCapacityCommitmentsRequest) Reset() { *x = ListCapacityCommitmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCapacityCommitmentsRequest) String() string { @@ -1292,7 +1270,7 @@ func (*ListCapacityCommitmentsRequest) ProtoMessage() {} func (x *ListCapacityCommitmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1322,9 @@ type ListCapacityCommitmentsResponse struct { func (x *ListCapacityCommitmentsResponse) Reset() { *x = ListCapacityCommitmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCapacityCommitmentsResponse) String() string { @@ -1359,7 +1335,7 @@ func (*ListCapacityCommitmentsResponse) ProtoMessage() {} func (x *ListCapacityCommitmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1379,9 @@ type GetCapacityCommitmentRequest struct { func (x *GetCapacityCommitmentRequest) Reset() { *x = GetCapacityCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCapacityCommitmentRequest) String() string { @@ -1418,7 +1392,7 @@ func (*GetCapacityCommitmentRequest) ProtoMessage() {} func (x *GetCapacityCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1459,11 +1433,9 @@ type DeleteCapacityCommitmentRequest struct { func (x *DeleteCapacityCommitmentRequest) Reset() { *x = DeleteCapacityCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCapacityCommitmentRequest) String() string { @@ -1474,7 +1446,7 @@ func (*DeleteCapacityCommitmentRequest) ProtoMessage() {} func (x *DeleteCapacityCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1490,9 @@ type UpdateCapacityCommitmentRequest struct { func (x *UpdateCapacityCommitmentRequest) Reset() { *x = UpdateCapacityCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCapacityCommitmentRequest) String() string { @@ -1533,7 +1503,7 @@ func (*UpdateCapacityCommitmentRequest) ProtoMessage() {} func (x *UpdateCapacityCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1579,11 +1549,9 @@ type SplitCapacityCommitmentRequest struct { func (x *SplitCapacityCommitmentRequest) Reset() { *x = SplitCapacityCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitCapacityCommitmentRequest) String() string { @@ -1594,7 +1562,7 @@ func (*SplitCapacityCommitmentRequest) ProtoMessage() {} func (x *SplitCapacityCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1638,11 +1606,9 @@ type SplitCapacityCommitmentResponse struct { func (x *SplitCapacityCommitmentResponse) Reset() { *x = SplitCapacityCommitmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitCapacityCommitmentResponse) String() string { @@ -1653,7 +1619,7 @@ func (*SplitCapacityCommitmentResponse) ProtoMessage() {} func (x *SplitCapacityCommitmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1669,9 @@ type MergeCapacityCommitmentsRequest struct { func (x *MergeCapacityCommitmentsRequest) Reset() { *x = MergeCapacityCommitmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MergeCapacityCommitmentsRequest) String() string { @@ -1718,7 +1682,7 @@ func (*MergeCapacityCommitmentsRequest) ProtoMessage() {} func (x *MergeCapacityCommitmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,11 +1734,9 @@ type Assignment struct { func (x *Assignment) Reset() { *x = Assignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assignment) String() string { @@ -1785,7 +1747,7 @@ func (*Assignment) ProtoMessage() {} func (x *Assignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1851,11 +1813,9 @@ type CreateAssignmentRequest struct { func (x *CreateAssignmentRequest) Reset() { *x = CreateAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssignmentRequest) String() string { @@ -1866,7 +1826,7 @@ func (*CreateAssignmentRequest) ProtoMessage() {} func (x *CreateAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1925,11 +1885,9 @@ type ListAssignmentsRequest struct { func (x *ListAssignmentsRequest) Reset() { *x = ListAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssignmentsRequest) String() string { @@ -1940,7 +1898,7 @@ func (*ListAssignmentsRequest) ProtoMessage() {} func (x *ListAssignmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1992,11 +1950,9 @@ type ListAssignmentsResponse struct { func (x *ListAssignmentsResponse) Reset() { *x = ListAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssignmentsResponse) String() string { @@ -2007,7 +1963,7 @@ func (*ListAssignmentsResponse) ProtoMessage() {} func (x *ListAssignmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2053,11 +2009,9 @@ type DeleteAssignmentRequest struct { func (x *DeleteAssignmentRequest) Reset() { *x = DeleteAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssignmentRequest) String() string { @@ -2068,7 +2022,7 @@ func (*DeleteAssignmentRequest) ProtoMessage() {} func (x *DeleteAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2120,11 +2074,9 @@ type SearchAssignmentsRequest struct { func (x *SearchAssignmentsRequest) Reset() { *x = SearchAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAssignmentsRequest) String() string { @@ -2135,7 +2087,7 @@ func (*SearchAssignmentsRequest) ProtoMessage() {} func (x *SearchAssignmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2160,9 @@ type SearchAllAssignmentsRequest struct { func (x *SearchAllAssignmentsRequest) Reset() { *x = SearchAllAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllAssignmentsRequest) String() string { @@ -2223,7 +2173,7 @@ func (*SearchAllAssignmentsRequest) ProtoMessage() {} func (x *SearchAllAssignmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2282,11 +2232,9 @@ type SearchAssignmentsResponse struct { func (x *SearchAssignmentsResponse) Reset() { *x = SearchAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAssignmentsResponse) String() string { @@ -2297,7 +2245,7 @@ func (*SearchAssignmentsResponse) ProtoMessage() {} func (x *SearchAssignmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2342,11 +2290,9 @@ type SearchAllAssignmentsResponse struct { func (x *SearchAllAssignmentsResponse) Reset() { *x = SearchAllAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAllAssignmentsResponse) String() string { @@ -2357,7 +2303,7 @@ func (*SearchAllAssignmentsResponse) ProtoMessage() {} func (x *SearchAllAssignmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2418,11 +2364,9 @@ type MoveAssignmentRequest struct { func (x *MoveAssignmentRequest) Reset() { *x = MoveAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveAssignmentRequest) String() string { @@ -2433,7 +2377,7 @@ func (*MoveAssignmentRequest) ProtoMessage() {} func (x *MoveAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2484,11 +2428,9 @@ type UpdateAssignmentRequest struct { func (x *UpdateAssignmentRequest) Reset() { *x = UpdateAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAssignmentRequest) String() string { @@ -2499,7 +2441,7 @@ func (*UpdateAssignmentRequest) ProtoMessage() {} func (x *UpdateAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2545,11 +2487,9 @@ type TableReference struct { func (x *TableReference) Reset() { *x = TableReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableReference) String() string { @@ -2560,7 +2500,7 @@ func (*TableReference) ProtoMessage() {} func (x *TableReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2616,11 +2556,9 @@ type BiReservation struct { func (x *BiReservation) Reset() { *x = BiReservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BiReservation) String() string { @@ -2631,7 +2569,7 @@ func (*BiReservation) ProtoMessage() {} func (x *BiReservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2687,11 +2625,9 @@ type GetBiReservationRequest struct { func (x *GetBiReservationRequest) Reset() { *x = GetBiReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBiReservationRequest) String() string { @@ -2702,7 +2638,7 @@ func (*GetBiReservationRequest) ProtoMessage() {} func (x *GetBiReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2738,11 +2674,9 @@ type UpdateBiReservationRequest struct { func (x *UpdateBiReservationRequest) Reset() { *x = UpdateBiReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBiReservationRequest) String() string { @@ -2753,7 +2687,7 @@ func (*UpdateBiReservationRequest) ProtoMessage() {} func (x *UpdateBiReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2800,11 +2734,9 @@ type Reservation_Autoscale struct { func (x *Reservation_Autoscale) Reset() { *x = Reservation_Autoscale{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reservation_Autoscale) String() string { @@ -2815,7 +2747,7 @@ func (*Reservation_Autoscale) ProtoMessage() {} func (x *Reservation_Autoscale) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3865,416 +3797,6 @@ func file_google_cloud_bigquery_reservation_v1_reservation_proto_init() { if File_google_cloud_bigquery_reservation_v1_reservation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Reservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CapacityCommitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FailoverReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateCapacityCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListCapacityCommitmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListCapacityCommitmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetCapacityCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCapacityCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCapacityCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SplitCapacityCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SplitCapacityCommitmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*MergeCapacityCommitmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Assignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchAllAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*MoveAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*TableReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*BiReservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetBiReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBiReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_reservation_v1_reservation_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Reservation_Autoscale); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1/big_query_read_client.go b/bigquery/storage/apiv1/big_query_read_client.go index 918ae64452a9..e46676a4b52f 100755 --- a/bigquery/storage/apiv1/big_query_read_client.go +++ b/bigquery/storage/apiv1/big_query_read_client.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -210,6 +211,8 @@ type bigQueryReadGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBigQueryReadClient creates a new big query read client based on gRPC. @@ -238,6 +241,7 @@ func NewBigQueryReadClient(ctx context.Context, opts ...option.ClientOption) (*B connPool: connPool, bigQueryReadClient: storagepb.NewBigQueryReadClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -280,7 +284,7 @@ func (c *bigQueryReadGRPCClient) CreateReadSession(ctx context.Context, req *sto var resp *storagepb.ReadSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryReadClient.CreateReadSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryReadClient.CreateReadSession, req, settings.GRPC, c.logger, "CreateReadSession") return err }, opts...) if err != nil { @@ -298,7 +302,9 @@ func (c *bigQueryReadGRPCClient) ReadRows(ctx context.Context, req *storagepb.Re var resp storagepb.BigQueryRead_ReadRowsClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadRows") resp, err = c.bigQueryReadClient.ReadRows(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadRows") return err }, opts...) if err != nil { @@ -316,7 +322,7 @@ func (c *bigQueryReadGRPCClient) SplitReadStream(ctx context.Context, req *stora var resp *storagepb.SplitReadStreamResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryReadClient.SplitReadStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryReadClient.SplitReadStream, req, settings.GRPC, c.logger, "SplitReadStream") return err }, opts...) if err != nil { diff --git a/bigquery/storage/apiv1/big_query_write_client.go b/bigquery/storage/apiv1/big_query_write_client.go index 9d1f45d02208..f5e1db3bb64a 100755 --- a/bigquery/storage/apiv1/big_query_write_client.go +++ b/bigquery/storage/apiv1/big_query_write_client.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -291,6 +292,8 @@ type bigQueryWriteGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBigQueryWriteClient creates a new big query write client based on gRPC. @@ -322,6 +325,7 @@ func NewBigQueryWriteClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, bigQueryWriteClient: storagepb.NewBigQueryWriteClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -364,7 +368,7 @@ func (c *bigQueryWriteGRPCClient) CreateWriteStream(ctx context.Context, req *st var resp *storagepb.WriteStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.CreateWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.CreateWriteStream, req, settings.GRPC, c.logger, "CreateWriteStream") return err }, opts...) if err != nil { @@ -379,7 +383,9 @@ func (c *bigQueryWriteGRPCClient) AppendRows(ctx context.Context, opts ...gax.Ca opts = append((*c.CallOptions).AppendRows[0:len((*c.CallOptions).AppendRows):len((*c.CallOptions).AppendRows)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "AppendRows") resp, err = c.bigQueryWriteClient.AppendRows(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "AppendRows") return err }, opts...) if err != nil { @@ -397,7 +403,7 @@ func (c *bigQueryWriteGRPCClient) GetWriteStream(ctx context.Context, req *stora var resp *storagepb.WriteStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.GetWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.GetWriteStream, req, settings.GRPC, c.logger, "GetWriteStream") return err }, opts...) if err != nil { @@ -415,7 +421,7 @@ func (c *bigQueryWriteGRPCClient) FinalizeWriteStream(ctx context.Context, req * var resp *storagepb.FinalizeWriteStreamResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.FinalizeWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.FinalizeWriteStream, req, settings.GRPC, c.logger, "FinalizeWriteStream") return err }, opts...) if err != nil { @@ -433,7 +439,7 @@ func (c *bigQueryWriteGRPCClient) BatchCommitWriteStreams(ctx context.Context, r var resp *storagepb.BatchCommitWriteStreamsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.BatchCommitWriteStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.BatchCommitWriteStreams, req, settings.GRPC, c.logger, "BatchCommitWriteStreams") return err }, opts...) if err != nil { @@ -451,7 +457,7 @@ func (c *bigQueryWriteGRPCClient) FlushRows(ctx context.Context, req *storagepb. var resp *storagepb.FlushRowsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.FlushRows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.FlushRows, req, settings.GRPC, c.logger, "FlushRows") return err }, opts...) if err != nil { diff --git a/bigquery/storage/apiv1/helpers.go b/bigquery/storage/apiv1/helpers.go index 34aab2edf5e2..6966ca08d948 100755 --- a/bigquery/storage/apiv1/helpers.go +++ b/bigquery/storage/apiv1/helpers.go @@ -18,10 +18,16 @@ package storage import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerystorage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +50,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/storage/apiv1/storagepb/annotations.pb.go b/bigquery/storage/apiv1/storagepb/annotations.pb.go index 0e295f086ed2..3861428bcda5 100755 --- a/bigquery/storage/apiv1/storagepb/annotations.pb.go +++ b/bigquery/storage/apiv1/storagepb/annotations.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/annotations.proto diff --git a/bigquery/storage/apiv1/storagepb/arrow.pb.go b/bigquery/storage/apiv1/storagepb/arrow.pb.go index e9cd4cc7f5c4..b6b0c3693b83 100755 --- a/bigquery/storage/apiv1/storagepb/arrow.pb.go +++ b/bigquery/storage/apiv1/storagepb/arrow.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/arrow.proto @@ -105,11 +105,9 @@ type ArrowSchema struct { func (x *ArrowSchema) Reset() { *x = ArrowSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowSchema) String() string { @@ -120,7 +118,7 @@ func (*ArrowSchema) ProtoMessage() {} func (x *ArrowSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type ArrowRecordBatch struct { func (x *ArrowRecordBatch) Reset() { *x = ArrowRecordBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowRecordBatch) String() string { @@ -174,7 +170,7 @@ func (*ArrowRecordBatch) ProtoMessage() {} func (x *ArrowRecordBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type ArrowSerializationOptions struct { func (x *ArrowSerializationOptions) Reset() { *x = ArrowSerializationOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowSerializationOptions) String() string { @@ -232,7 +226,7 @@ func (*ArrowSerializationOptions) ProtoMessage() {} func (x *ArrowSerializationOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,44 +330,6 @@ func file_google_cloud_bigquery_storage_v1_arrow_proto_init() { if File_google_cloud_bigquery_storage_v1_arrow_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ArrowSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ArrowRecordBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_arrow_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ArrowSerializationOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1/storagepb/avro.pb.go b/bigquery/storage/apiv1/storagepb/avro.pb.go index 3e0c48d91e11..b71e5767535a 100755 --- a/bigquery/storage/apiv1/storagepb/avro.pb.go +++ b/bigquery/storage/apiv1/storagepb/avro.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/avro.proto @@ -48,11 +48,9 @@ type AvroSchema struct { func (x *AvroSchema) Reset() { *x = AvroSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSchema) String() string { @@ -63,7 +61,7 @@ func (*AvroSchema) ProtoMessage() {} func (x *AvroSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type AvroRows struct { func (x *AvroRows) Reset() { *x = AvroRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroRows) String() string { @@ -117,7 +113,7 @@ func (*AvroRows) ProtoMessage() {} func (x *AvroRows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type AvroSerializationOptions struct { func (x *AvroSerializationOptions) Reset() { *x = AvroSerializationOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSerializationOptions) String() string { @@ -183,7 +177,7 @@ func (*AvroSerializationOptions) ProtoMessage() {} func (x *AvroSerializationOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,44 +267,6 @@ func file_google_cloud_bigquery_storage_v1_avro_proto_init() { if File_google_cloud_bigquery_storage_v1_avro_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AvroSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AvroRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_avro_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AvroSerializationOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1/storagepb/protobuf.pb.go b/bigquery/storage/apiv1/storagepb/protobuf.pb.go index 1af704532701..28f98dc8cd8e 100755 --- a/bigquery/storage/apiv1/storagepb/protobuf.pb.go +++ b/bigquery/storage/apiv1/storagepb/protobuf.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/protobuf.proto @@ -56,11 +56,9 @@ type ProtoSchema struct { func (x *ProtoSchema) Reset() { *x = ProtoSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoSchema) String() string { @@ -71,7 +69,7 @@ func (*ProtoSchema) ProtoMessage() {} func (x *ProtoSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,11 +105,9 @@ type ProtoRows struct { func (x *ProtoRows) Reset() { *x = ProtoRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoRows) String() string { @@ -122,7 +118,7 @@ func (*ProtoRows) ProtoMessage() {} func (x *ProtoRows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,32 +206,6 @@ func file_google_cloud_bigquery_storage_v1_protobuf_proto_init() { if File_google_cloud_bigquery_storage_v1_protobuf_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProtoSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_protobuf_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1/storagepb/storage.pb.go b/bigquery/storage/apiv1/storagepb/storage.pb.go index 7ccb3314a64a..f880cd06216b 100755 --- a/bigquery/storage/apiv1/storagepb/storage.pb.go +++ b/bigquery/storage/apiv1/storagepb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/storage.proto @@ -291,11 +291,9 @@ type CreateReadSessionRequest struct { func (x *CreateReadSessionRequest) Reset() { *x = CreateReadSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReadSessionRequest) String() string { @@ -306,7 +304,7 @@ func (*CreateReadSessionRequest) ProtoMessage() {} func (x *CreateReadSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +363,9 @@ type ReadRowsRequest struct { func (x *ReadRowsRequest) Reset() { *x = ReadRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsRequest) String() string { @@ -380,7 +376,7 @@ func (*ReadRowsRequest) ProtoMessage() {} func (x *ReadRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +418,9 @@ type ThrottleState struct { func (x *ThrottleState) Reset() { *x = ThrottleState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThrottleState) String() string { @@ -437,7 +431,7 @@ func (*ThrottleState) ProtoMessage() {} func (x *ThrottleState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +465,9 @@ type StreamStats struct { func (x *StreamStats) Reset() { *x = StreamStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamStats) String() string { @@ -486,7 +478,7 @@ func (*StreamStats) ProtoMessage() {} func (x *StreamStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +551,9 @@ type ReadRowsResponse struct { func (x *ReadRowsResponse) Reset() { *x = ReadRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsResponse) String() string { @@ -574,7 +564,7 @@ func (*ReadRowsResponse) ProtoMessage() {} func (x *ReadRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +705,9 @@ type SplitReadStreamRequest struct { func (x *SplitReadStreamRequest) Reset() { *x = SplitReadStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamRequest) String() string { @@ -730,7 +718,7 @@ func (*SplitReadStreamRequest) ProtoMessage() {} func (x *SplitReadStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +764,9 @@ type SplitReadStreamResponse struct { func (x *SplitReadStreamResponse) Reset() { *x = SplitReadStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamResponse) String() string { @@ -791,7 +777,7 @@ func (*SplitReadStreamResponse) ProtoMessage() {} func (x *SplitReadStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +821,9 @@ type CreateWriteStreamRequest struct { func (x *CreateWriteStreamRequest) Reset() { *x = CreateWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWriteStreamRequest) String() string { @@ -850,7 +834,7 @@ func (*CreateWriteStreamRequest) ProtoMessage() {} func (x *CreateWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +961,9 @@ type AppendRowsRequest struct { func (x *AppendRowsRequest) Reset() { *x = AppendRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsRequest) String() string { @@ -992,7 +974,7 @@ func (*AppendRowsRequest) ProtoMessage() {} func (x *AppendRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1108,11 +1090,9 @@ type AppendRowsResponse struct { func (x *AppendRowsResponse) Reset() { *x = AppendRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsResponse) String() string { @@ -1123,7 +1103,7 @@ func (*AppendRowsResponse) ProtoMessage() {} func (x *AppendRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1213,9 @@ type GetWriteStreamRequest struct { func (x *GetWriteStreamRequest) Reset() { *x = GetWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWriteStreamRequest) String() string { @@ -1248,7 +1226,7 @@ func (*GetWriteStreamRequest) ProtoMessage() {} func (x *GetWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1292,11 +1270,9 @@ type BatchCommitWriteStreamsRequest struct { func (x *BatchCommitWriteStreamsRequest) Reset() { *x = BatchCommitWriteStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCommitWriteStreamsRequest) String() string { @@ -1307,7 +1283,7 @@ func (*BatchCommitWriteStreamsRequest) ProtoMessage() {} func (x *BatchCommitWriteStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1356,11 +1332,9 @@ type BatchCommitWriteStreamsResponse struct { func (x *BatchCommitWriteStreamsResponse) Reset() { *x = BatchCommitWriteStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCommitWriteStreamsResponse) String() string { @@ -1371,7 +1345,7 @@ func (*BatchCommitWriteStreamsResponse) ProtoMessage() {} func (x *BatchCommitWriteStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1387,9 @@ type FinalizeWriteStreamRequest struct { func (x *FinalizeWriteStreamRequest) Reset() { *x = FinalizeWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeWriteStreamRequest) String() string { @@ -1428,7 +1400,7 @@ func (*FinalizeWriteStreamRequest) ProtoMessage() {} func (x *FinalizeWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1434,9 @@ type FinalizeWriteStreamResponse struct { func (x *FinalizeWriteStreamResponse) Reset() { *x = FinalizeWriteStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeWriteStreamResponse) String() string { @@ -1477,7 +1447,7 @@ func (*FinalizeWriteStreamResponse) ProtoMessage() {} func (x *FinalizeWriteStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1514,11 +1484,9 @@ type FlushRowsRequest struct { func (x *FlushRowsRequest) Reset() { *x = FlushRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlushRowsRequest) String() string { @@ -1529,7 +1497,7 @@ func (*FlushRowsRequest) ProtoMessage() {} func (x *FlushRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1570,11 +1538,9 @@ type FlushRowsResponse struct { func (x *FlushRowsResponse) Reset() { *x = FlushRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlushRowsResponse) String() string { @@ -1585,7 +1551,7 @@ func (*FlushRowsResponse) ProtoMessage() {} func (x *FlushRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1592,9 @@ type StorageError struct { func (x *StorageError) Reset() { *x = StorageError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageError) String() string { @@ -1641,7 +1605,7 @@ func (*StorageError) ProtoMessage() {} func (x *StorageError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1657,9 @@ type RowError struct { func (x *RowError) Reset() { *x = RowError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowError) String() string { @@ -1708,7 +1670,7 @@ func (*RowError) ProtoMessage() {} func (x *RowError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1769,11 +1731,9 @@ type StreamStats_Progress struct { func (x *StreamStats_Progress) Reset() { *x = StreamStats_Progress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamStats_Progress) String() string { @@ -1784,7 +1744,7 @@ func (*StreamStats_Progress) ProtoMessage() {} func (x *StreamStats_Progress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1789,9 @@ type AppendRowsRequest_ArrowData struct { func (x *AppendRowsRequest_ArrowData) Reset() { *x = AppendRowsRequest_ArrowData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsRequest_ArrowData) String() string { @@ -1844,7 +1802,7 @@ func (*AppendRowsRequest_ArrowData) ProtoMessage() {} func (x *AppendRowsRequest_ArrowData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1898,11 +1856,9 @@ type AppendRowsRequest_ProtoData struct { func (x *AppendRowsRequest_ProtoData) Reset() { *x = AppendRowsRequest_ProtoData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsRequest_ProtoData) String() string { @@ -1913,7 +1869,7 @@ func (*AppendRowsRequest_ProtoData) ProtoMessage() {} func (x *AppendRowsRequest_ProtoData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1911,9 @@ type AppendRowsResponse_AppendResult struct { func (x *AppendRowsResponse_AppendResult) Reset() { *x = AppendRowsResponse_AppendResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsResponse_AppendResult) String() string { @@ -1970,7 +1924,7 @@ func (*AppendRowsResponse_AppendResult) ProtoMessage() {} func (x *AppendRowsResponse_AppendResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,284 +2597,6 @@ func file_google_cloud_bigquery_storage_v1_storage_proto_init() { file_google_cloud_bigquery_storage_v1_protobuf_proto_init() file_google_cloud_bigquery_storage_v1_stream_proto_init() file_google_cloud_bigquery_storage_v1_table_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateReadSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ThrottleState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCommitWriteStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCommitWriteStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeWriteStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FlushRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*FlushRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StorageError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RowError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StreamStats_Progress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsRequest_ArrowData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsRequest_ProtoData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsResponse_AppendResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4].OneofWrappers = []any{ (*ReadRowsResponse_AvroRows)(nil), (*ReadRowsResponse_ArrowRecordBatch)(nil), diff --git a/bigquery/storage/apiv1/storagepb/stream.pb.go b/bigquery/storage/apiv1/storagepb/stream.pb.go index 5e92d1a0dea2..1dcfb7649044 100755 --- a/bigquery/storage/apiv1/storagepb/stream.pb.go +++ b/bigquery/storage/apiv1/storagepb/stream.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/stream.proto @@ -379,11 +379,9 @@ type ReadSession struct { func (x *ReadSession) Reset() { *x = ReadSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession) String() string { @@ -394,7 +392,7 @@ func (*ReadSession) ProtoMessage() {} func (x *ReadSession) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +538,9 @@ type ReadStream struct { func (x *ReadStream) Reset() { *x = ReadStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadStream) String() string { @@ -555,7 +551,7 @@ func (*ReadStream) ProtoMessage() {} func (x *ReadStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,11 +607,9 @@ type WriteStream struct { func (x *WriteStream) Reset() { *x = WriteStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteStream) String() string { @@ -626,7 +620,7 @@ func (*WriteStream) ProtoMessage() {} func (x *WriteStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -702,11 +696,9 @@ type ReadSession_TableModifiers struct { func (x *ReadSession_TableModifiers) Reset() { *x = ReadSession_TableModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession_TableModifiers) String() string { @@ -717,7 +709,7 @@ func (*ReadSession_TableModifiers) ProtoMessage() {} func (x *ReadSession_TableModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +818,9 @@ type ReadSession_TableReadOptions struct { func (x *ReadSession_TableReadOptions) Reset() { *x = ReadSession_TableReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession_TableReadOptions) String() string { @@ -841,7 +831,7 @@ func (*ReadSession_TableReadOptions) ProtoMessage() {} func (x *ReadSession_TableReadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1211,68 +1201,6 @@ func file_google_cloud_bigquery_storage_v1_stream_proto_init() { file_google_cloud_bigquery_storage_v1_arrow_proto_init() file_google_cloud_bigquery_storage_v1_avro_proto_init() file_google_cloud_bigquery_storage_v1_table_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession_TableModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession_TableReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1_stream_proto_msgTypes[0].OneofWrappers = []any{ (*ReadSession_AvroSchema)(nil), (*ReadSession_ArrowSchema)(nil), diff --git a/bigquery/storage/apiv1/storagepb/table.pb.go b/bigquery/storage/apiv1/storagepb/table.pb.go index f26b6750603f..ab11bbe27517 100755 --- a/bigquery/storage/apiv1/storagepb/table.pb.go +++ b/bigquery/storage/apiv1/storagepb/table.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1/table.proto @@ -211,11 +211,9 @@ type TableSchema struct { func (x *TableSchema) Reset() { *x = TableSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSchema) String() string { @@ -226,7 +224,7 @@ func (*TableSchema) ProtoMessage() {} func (x *TableSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +327,9 @@ type TableFieldSchema struct { func (x *TableFieldSchema) Reset() { *x = TableFieldSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableFieldSchema) String() string { @@ -344,7 +340,7 @@ func (*TableFieldSchema) ProtoMessage() {} func (x *TableFieldSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +437,9 @@ type TableFieldSchema_FieldElementType struct { func (x *TableFieldSchema_FieldElementType) Reset() { *x = TableFieldSchema_FieldElementType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableFieldSchema_FieldElementType) String() string { @@ -456,7 +450,7 @@ func (*TableFieldSchema_FieldElementType) ProtoMessage() {} func (x *TableFieldSchema_FieldElementType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,44 +606,6 @@ func file_google_cloud_bigquery_storage_v1_table_proto_init() { if File_google_cloud_bigquery_storage_v1_table_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TableFieldSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1_table_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TableFieldSchema_FieldElementType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1alpha/helpers.go b/bigquery/storage/apiv1alpha/helpers.go index 5bcfb2b7a391..3cbeba8cc05d 100755 --- a/bigquery/storage/apiv1alpha/helpers.go +++ b/bigquery/storage/apiv1alpha/helpers.go @@ -18,10 +18,16 @@ package storage import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerystorage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +49,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/storage/apiv1alpha/metastore_partition_client.go b/bigquery/storage/apiv1alpha/metastore_partition_client.go index 2e83e560e3ae..fa16f69ac205 100755 --- a/bigquery/storage/apiv1alpha/metastore_partition_client.go +++ b/bigquery/storage/apiv1alpha/metastore_partition_client.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -206,6 +207,8 @@ type metastorePartitionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetastorePartitionClient creates a new metastore partition service client based on gRPC. @@ -234,6 +237,7 @@ func NewMetastorePartitionClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, metastorePartitionClient: storagepb.NewMetastorePartitionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -276,7 +280,7 @@ func (c *metastorePartitionGRPCClient) BatchCreateMetastorePartitions(ctx contex var resp *storagepb.BatchCreateMetastorePartitionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastorePartitionClient.BatchCreateMetastorePartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastorePartitionClient.BatchCreateMetastorePartitions, req, settings.GRPC, c.logger, "BatchCreateMetastorePartitions") return err }, opts...) if err != nil { @@ -293,7 +297,7 @@ func (c *metastorePartitionGRPCClient) BatchDeleteMetastorePartitions(ctx contex opts = append((*c.CallOptions).BatchDeleteMetastorePartitions[0:len((*c.CallOptions).BatchDeleteMetastorePartitions):len((*c.CallOptions).BatchDeleteMetastorePartitions)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metastorePartitionClient.BatchDeleteMetastorePartitions(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metastorePartitionClient.BatchDeleteMetastorePartitions, req, settings.GRPC, c.logger, "BatchDeleteMetastorePartitions") return err }, opts...) return err @@ -308,7 +312,7 @@ func (c *metastorePartitionGRPCClient) BatchUpdateMetastorePartitions(ctx contex var resp *storagepb.BatchUpdateMetastorePartitionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastorePartitionClient.BatchUpdateMetastorePartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastorePartitionClient.BatchUpdateMetastorePartitions, req, settings.GRPC, c.logger, "BatchUpdateMetastorePartitions") return err }, opts...) if err != nil { @@ -326,7 +330,7 @@ func (c *metastorePartitionGRPCClient) ListMetastorePartitions(ctx context.Conte var resp *storagepb.ListMetastorePartitionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metastorePartitionClient.ListMetastorePartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metastorePartitionClient.ListMetastorePartitions, req, settings.GRPC, c.logger, "ListMetastorePartitions") return err }, opts...) if err != nil { @@ -341,7 +345,9 @@ func (c *metastorePartitionGRPCClient) StreamMetastorePartitions(ctx context.Con opts = append((*c.CallOptions).StreamMetastorePartitions[0:len((*c.CallOptions).StreamMetastorePartitions):len((*c.CallOptions).StreamMetastorePartitions)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamMetastorePartitions") resp, err = c.metastorePartitionClient.StreamMetastorePartitions(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamMetastorePartitions") return err }, opts...) if err != nil { diff --git a/bigquery/storage/apiv1alpha/storagepb/metastore_partition.pb.go b/bigquery/storage/apiv1alpha/storagepb/metastore_partition.pb.go index 850fe1d28474..ea19e87de63b 100755 --- a/bigquery/storage/apiv1alpha/storagepb/metastore_partition.pb.go +++ b/bigquery/storage/apiv1alpha/storagepb/metastore_partition.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1alpha/metastore_partition.proto @@ -60,11 +60,9 @@ type CreateMetastorePartitionRequest struct { func (x *CreateMetastorePartitionRequest) Reset() { *x = CreateMetastorePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetastorePartitionRequest) String() string { @@ -75,7 +73,7 @@ func (*CreateMetastorePartitionRequest) ProtoMessage() {} func (x *CreateMetastorePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type BatchCreateMetastorePartitionsRequest struct { func (x *BatchCreateMetastorePartitionsRequest) Reset() { *x = BatchCreateMetastorePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateMetastorePartitionsRequest) String() string { @@ -141,7 +137,7 @@ func (*BatchCreateMetastorePartitionsRequest) ProtoMessage() {} func (x *BatchCreateMetastorePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +185,9 @@ type BatchCreateMetastorePartitionsResponse struct { func (x *BatchCreateMetastorePartitionsResponse) Reset() { *x = BatchCreateMetastorePartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateMetastorePartitionsResponse) String() string { @@ -204,7 +198,7 @@ func (*BatchCreateMetastorePartitionsResponse) ProtoMessage() {} func (x *BatchCreateMetastorePartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +239,9 @@ type BatchDeleteMetastorePartitionsRequest struct { func (x *BatchDeleteMetastorePartitionsRequest) Reset() { *x = BatchDeleteMetastorePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteMetastorePartitionsRequest) String() string { @@ -260,7 +252,7 @@ func (*BatchDeleteMetastorePartitionsRequest) ProtoMessage() {} func (x *BatchDeleteMetastorePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +295,9 @@ type UpdateMetastorePartitionRequest struct { func (x *UpdateMetastorePartitionRequest) Reset() { *x = UpdateMetastorePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMetastorePartitionRequest) String() string { @@ -318,7 +308,7 @@ func (*UpdateMetastorePartitionRequest) ProtoMessage() {} func (x *UpdateMetastorePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +353,9 @@ type BatchUpdateMetastorePartitionsRequest struct { func (x *BatchUpdateMetastorePartitionsRequest) Reset() { *x = BatchUpdateMetastorePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateMetastorePartitionsRequest) String() string { @@ -378,7 +366,7 @@ func (*BatchUpdateMetastorePartitionsRequest) ProtoMessage() {} func (x *BatchUpdateMetastorePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +407,9 @@ type BatchUpdateMetastorePartitionsResponse struct { func (x *BatchUpdateMetastorePartitionsResponse) Reset() { *x = BatchUpdateMetastorePartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateMetastorePartitionsResponse) String() string { @@ -434,7 +420,7 @@ func (*BatchUpdateMetastorePartitionsResponse) ProtoMessage() {} func (x *BatchUpdateMetastorePartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type ListMetastorePartitionsRequest struct { func (x *ListMetastorePartitionsRequest) Reset() { *x = ListMetastorePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetastorePartitionsRequest) String() string { @@ -498,7 +482,7 @@ func (*ListMetastorePartitionsRequest) ProtoMessage() {} func (x *ListMetastorePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +534,9 @@ type ListMetastorePartitionsResponse struct { func (x *ListMetastorePartitionsResponse) Reset() { *x = ListMetastorePartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetastorePartitionsResponse) String() string { @@ -565,7 +547,7 @@ func (*ListMetastorePartitionsResponse) ProtoMessage() {} func (x *ListMetastorePartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +628,9 @@ type StreamMetastorePartitionsRequest struct { func (x *StreamMetastorePartitionsRequest) Reset() { *x = StreamMetastorePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamMetastorePartitionsRequest) String() string { @@ -661,7 +641,7 @@ func (*StreamMetastorePartitionsRequest) ProtoMessage() {} func (x *StreamMetastorePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +698,9 @@ type StreamMetastorePartitionsResponse struct { func (x *StreamMetastorePartitionsResponse) Reset() { *x = StreamMetastorePartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamMetastorePartitionsResponse) String() string { @@ -733,7 +711,7 @@ func (*StreamMetastorePartitionsResponse) ProtoMessage() {} func (x *StreamMetastorePartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +757,9 @@ type BatchSizeTooLargeError struct { func (x *BatchSizeTooLargeError) Reset() { *x = BatchSizeTooLargeError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchSizeTooLargeError) String() string { @@ -794,7 +770,7 @@ func (*BatchSizeTooLargeError) ProtoMessage() {} func (x *BatchSizeTooLargeError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,152 +1147,6 @@ func file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_init() return } file_google_cloud_bigquery_storage_v1alpha_partition_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetastorePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateMetastorePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateMetastorePartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteMetastorePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMetastorePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateMetastorePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateMetastorePartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListMetastorePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListMetastorePartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StreamMetastorePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StreamMetastorePartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchSizeTooLargeError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1alpha_metastore_partition_proto_msgTypes[8].OneofWrappers = []any{ (*ListMetastorePartitionsResponse_Partitions)(nil), (*ListMetastorePartitionsResponse_Streams)(nil), diff --git a/bigquery/storage/apiv1alpha/storagepb/partition.pb.go b/bigquery/storage/apiv1alpha/storagepb/partition.pb.go index 91c222fe6ca4..8ac0d781f3b1 100755 --- a/bigquery/storage/apiv1alpha/storagepb/partition.pb.go +++ b/bigquery/storage/apiv1alpha/storagepb/partition.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1alpha/partition.proto @@ -53,11 +53,9 @@ type FieldSchema struct { func (x *FieldSchema) Reset() { *x = FieldSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldSchema) String() string { @@ -68,7 +66,7 @@ func (*FieldSchema) ProtoMessage() {} func (x *FieldSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type StorageDescriptor struct { func (x *StorageDescriptor) Reset() { *x = StorageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageDescriptor) String() string { @@ -137,7 +133,7 @@ func (*StorageDescriptor) ProtoMessage() {} func (x *StorageDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type SerDeInfo struct { func (x *SerDeInfo) Reset() { *x = SerDeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerDeInfo) String() string { @@ -217,7 +211,7 @@ func (*SerDeInfo) ProtoMessage() {} func (x *SerDeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +271,9 @@ type MetastorePartition struct { func (x *MetastorePartition) Reset() { *x = MetastorePartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetastorePartition) String() string { @@ -292,7 +284,7 @@ func (*MetastorePartition) ProtoMessage() {} func (x *MetastorePartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +346,9 @@ type MetastorePartitionList struct { func (x *MetastorePartitionList) Reset() { *x = MetastorePartitionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetastorePartitionList) String() string { @@ -369,7 +359,7 @@ func (*MetastorePartitionList) ProtoMessage() {} func (x *MetastorePartitionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +394,9 @@ type ReadStream struct { func (x *ReadStream) Reset() { *x = ReadStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadStream) String() string { @@ -419,7 +407,7 @@ func (*ReadStream) ProtoMessage() {} func (x *ReadStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +441,9 @@ type StreamList struct { func (x *StreamList) Reset() { *x = StreamList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamList) String() string { @@ -468,7 +454,7 @@ func (*StreamList) ProtoMessage() {} func (x *StreamList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +489,9 @@ type MetastorePartitionValues struct { func (x *MetastorePartitionValues) Reset() { *x = MetastorePartitionValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetastorePartitionValues) String() string { @@ -518,7 +502,7 @@ func (*MetastorePartitionValues) ProtoMessage() {} func (x *MetastorePartitionValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,104 +697,6 @@ func file_google_cloud_bigquery_storage_v1alpha_partition_proto_init() { if File_google_cloud_bigquery_storage_v1alpha_partition_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FieldSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StorageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SerDeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MetastorePartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MetastorePartitionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ReadStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StreamList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1alpha_partition_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MetastorePartitionValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta1/big_query_storage_client.go b/bigquery/storage/apiv1beta1/big_query_storage_client.go index b9d728990880..7c9aa3e7702c 100755 --- a/bigquery/storage/apiv1beta1/big_query_storage_client.go +++ b/bigquery/storage/apiv1beta1/big_query_storage_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( storagepb "cloud.google.com/go/bigquery/storage/apiv1beta1/storagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -338,6 +337,8 @@ type bigQueryStorageGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBigQueryStorageClient creates a new big query storage client based on gRPC. @@ -371,6 +372,7 @@ func NewBigQueryStorageClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, bigQueryStorageClient: storagepb.NewBigQueryStorageClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -417,6 +419,8 @@ type bigQueryStorageRESTClient struct { // Points back to the CallOptions field of the containing BigQueryStorageClient CallOptions **BigQueryStorageCallOptions + + logger *slog.Logger } // NewBigQueryStorageRESTClient creates a new big query storage rest client. @@ -441,6 +445,7 @@ func NewBigQueryStorageRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -493,7 +498,7 @@ func (c *bigQueryStorageGRPCClient) CreateReadSession(ctx context.Context, req * var resp *storagepb.ReadSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryStorageClient.CreateReadSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryStorageClient.CreateReadSession, req, settings.GRPC, c.logger, "CreateReadSession") return err }, opts...) if err != nil { @@ -511,7 +516,9 @@ func (c *bigQueryStorageGRPCClient) ReadRows(ctx context.Context, req *storagepb var resp storagepb.BigQueryStorage_ReadRowsClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadRows") resp, err = c.bigQueryStorageClient.ReadRows(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadRows") return err }, opts...) if err != nil { @@ -529,7 +536,7 @@ func (c *bigQueryStorageGRPCClient) BatchCreateReadSessionStreams(ctx context.Co var resp *storagepb.BatchCreateReadSessionStreamsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryStorageClient.BatchCreateReadSessionStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryStorageClient.BatchCreateReadSessionStreams, req, settings.GRPC, c.logger, "BatchCreateReadSessionStreams") return err }, opts...) if err != nil { @@ -546,7 +553,7 @@ func (c *bigQueryStorageGRPCClient) FinalizeStream(ctx context.Context, req *sto opts = append((*c.CallOptions).FinalizeStream[0:len((*c.CallOptions).FinalizeStream):len((*c.CallOptions).FinalizeStream)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.bigQueryStorageClient.FinalizeStream(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.bigQueryStorageClient.FinalizeStream, req, settings.GRPC, c.logger, "FinalizeStream") return err }, opts...) return err @@ -561,7 +568,7 @@ func (c *bigQueryStorageGRPCClient) SplitReadStream(ctx context.Context, req *st var resp *storagepb.SplitReadStreamResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryStorageClient.SplitReadStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryStorageClient.SplitReadStream, req, settings.GRPC, c.logger, "SplitReadStream") return err }, opts...) if err != nil { @@ -615,17 +622,7 @@ func (c *bigQueryStorageRESTClient) CreateReadSession(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReadSession") if err != nil { return err } @@ -683,15 +680,11 @@ func (c *bigQueryStorageRESTClient) ReadRows(ctx context.Context, req *storagepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadRows") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &readRowsRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -788,17 +781,7 @@ func (c *bigQueryStorageRESTClient) BatchCreateReadSessionStreams(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateReadSessionStreams") if err != nil { return err } @@ -859,15 +842,8 @@ func (c *bigQueryStorageRESTClient) FinalizeStream(ctx context.Context, req *sto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinalizeStream") + return err }, opts...) } @@ -918,17 +894,7 @@ func (c *bigQueryStorageRESTClient) SplitReadStream(ctx context.Context, req *st httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SplitReadStream") if err != nil { return err } diff --git a/bigquery/storage/apiv1beta1/helpers.go b/bigquery/storage/apiv1beta1/helpers.go index 5bcfb2b7a391..58cb21952be3 100755 --- a/bigquery/storage/apiv1beta1/helpers.go +++ b/bigquery/storage/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package storage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerystorage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/storage/apiv1beta1/storagepb/arrow.pb.go b/bigquery/storage/apiv1beta1/storagepb/arrow.pb.go index 936f13ee349f..e60db141224a 100755 --- a/bigquery/storage/apiv1beta1/storagepb/arrow.pb.go +++ b/bigquery/storage/apiv1beta1/storagepb/arrow.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta1/arrow.proto @@ -47,11 +47,9 @@ type ArrowSchema struct { func (x *ArrowSchema) Reset() { *x = ArrowSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowSchema) String() string { @@ -62,7 +60,7 @@ func (*ArrowSchema) ProtoMessage() {} func (x *ArrowSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98,11 +96,9 @@ type ArrowRecordBatch struct { func (x *ArrowRecordBatch) Reset() { *x = ArrowRecordBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowRecordBatch) String() string { @@ -113,7 +109,7 @@ func (*ArrowRecordBatch) ProtoMessage() {} func (x *ArrowRecordBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,32 +198,6 @@ func file_google_cloud_bigquery_storage_v1beta1_arrow_proto_init() { if File_google_cloud_bigquery_storage_v1beta1_arrow_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ArrowSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_arrow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ArrowRecordBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta1/storagepb/avro.pb.go b/bigquery/storage/apiv1beta1/storagepb/avro.pb.go index 6331a8787da5..210a68c01c24 100755 --- a/bigquery/storage/apiv1beta1/storagepb/avro.pb.go +++ b/bigquery/storage/apiv1beta1/storagepb/avro.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta1/avro.proto @@ -48,11 +48,9 @@ type AvroSchema struct { func (x *AvroSchema) Reset() { *x = AvroSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSchema) String() string { @@ -63,7 +61,7 @@ func (*AvroSchema) ProtoMessage() {} func (x *AvroSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99,11 +97,9 @@ type AvroRows struct { func (x *AvroRows) Reset() { *x = AvroRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroRows) String() string { @@ -114,7 +110,7 @@ func (*AvroRows) ProtoMessage() {} func (x *AvroRows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,32 +197,6 @@ func file_google_cloud_bigquery_storage_v1beta1_avro_proto_init() { if File_google_cloud_bigquery_storage_v1beta1_avro_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AvroSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_avro_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AvroRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta1/storagepb/read_options.pb.go b/bigquery/storage/apiv1beta1/storagepb/read_options.pb.go index 580f93fbbce7..4b1060a0956c 100755 --- a/bigquery/storage/apiv1beta1/storagepb/read_options.pb.go +++ b/bigquery/storage/apiv1beta1/storagepb/read_options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta1/read_options.proto @@ -107,11 +107,9 @@ type TableReadOptions struct { func (x *TableReadOptions) Reset() { *x = TableReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableReadOptions) String() string { @@ -122,7 +120,7 @@ func (*TableReadOptions) ProtoMessage() {} func (x *TableReadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,20 +204,6 @@ func file_google_cloud_bigquery_storage_v1beta1_read_options_proto_init() { if File_google_cloud_bigquery_storage_v1beta1_read_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta1/storagepb/storage.pb.go b/bigquery/storage/apiv1beta1/storagepb/storage.pb.go index 55c24ff90ba4..adbaef394f27 100755 --- a/bigquery/storage/apiv1beta1/storagepb/storage.pb.go +++ b/bigquery/storage/apiv1beta1/storagepb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta1/storage.proto @@ -171,11 +171,9 @@ type Stream struct { func (x *Stream) Reset() { *x = Stream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream) String() string { @@ -186,7 +184,7 @@ func (*Stream) ProtoMessage() {} func (x *Stream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +220,9 @@ type StreamPosition struct { func (x *StreamPosition) Reset() { *x = StreamPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamPosition) String() string { @@ -237,7 +233,7 @@ func (*StreamPosition) ProtoMessage() {} func (x *StreamPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +295,9 @@ type ReadSession struct { func (x *ReadSession) Reset() { *x = ReadSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession) String() string { @@ -314,7 +308,7 @@ func (*ReadSession) ProtoMessage() {} func (x *ReadSession) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +439,9 @@ type CreateReadSessionRequest struct { func (x *CreateReadSessionRequest) Reset() { *x = CreateReadSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReadSessionRequest) String() string { @@ -460,7 +452,7 @@ func (*CreateReadSessionRequest) ProtoMessage() {} func (x *CreateReadSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +530,9 @@ type ReadRowsRequest struct { func (x *ReadRowsRequest) Reset() { *x = ReadRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsRequest) String() string { @@ -553,7 +543,7 @@ func (*ReadRowsRequest) ProtoMessage() {} func (x *ReadRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +595,9 @@ type StreamStatus struct { func (x *StreamStatus) Reset() { *x = StreamStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamStatus) String() string { @@ -620,7 +608,7 @@ func (*StreamStatus) ProtoMessage() {} func (x *StreamStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +675,9 @@ type Progress struct { func (x *Progress) Reset() { *x = Progress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Progress) String() string { @@ -702,7 +688,7 @@ func (*Progress) ProtoMessage() {} func (x *Progress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +730,9 @@ type ThrottleStatus struct { func (x *ThrottleStatus) Reset() { *x = ThrottleStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThrottleStatus) String() string { @@ -759,7 +743,7 @@ func (*ThrottleStatus) ProtoMessage() {} func (x *ThrottleStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +804,9 @@ type ReadRowsResponse struct { func (x *ReadRowsResponse) Reset() { *x = ReadRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsResponse) String() string { @@ -835,7 +817,7 @@ func (*ReadRowsResponse) ProtoMessage() {} func (x *ReadRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -967,11 +949,9 @@ type BatchCreateReadSessionStreamsRequest struct { func (x *BatchCreateReadSessionStreamsRequest) Reset() { *x = BatchCreateReadSessionStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateReadSessionStreamsRequest) String() string { @@ -982,7 +962,7 @@ func (*BatchCreateReadSessionStreamsRequest) ProtoMessage() {} func (x *BatchCreateReadSessionStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +1004,9 @@ type BatchCreateReadSessionStreamsResponse struct { func (x *BatchCreateReadSessionStreamsResponse) Reset() { *x = BatchCreateReadSessionStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateReadSessionStreamsResponse) String() string { @@ -1039,7 +1017,7 @@ func (*BatchCreateReadSessionStreamsResponse) ProtoMessage() {} func (x *BatchCreateReadSessionStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1051,9 @@ type FinalizeStreamRequest struct { func (x *FinalizeStreamRequest) Reset() { *x = FinalizeStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeStreamRequest) String() string { @@ -1088,7 +1064,7 @@ func (*FinalizeStreamRequest) ProtoMessage() {} func (x *FinalizeStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1130,11 +1106,9 @@ type SplitReadStreamRequest struct { func (x *SplitReadStreamRequest) Reset() { *x = SplitReadStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamRequest) String() string { @@ -1145,7 +1119,7 @@ func (*SplitReadStreamRequest) ProtoMessage() {} func (x *SplitReadStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1191,11 +1165,9 @@ type SplitReadStreamResponse struct { func (x *SplitReadStreamResponse) Reset() { *x = SplitReadStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamResponse) String() string { @@ -1206,7 +1178,7 @@ func (*SplitReadStreamResponse) ProtoMessage() {} func (x *SplitReadStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1683,176 +1655,6 @@ func file_google_cloud_bigquery_storage_v1beta1_storage_proto_init() { file_google_cloud_bigquery_storage_v1beta1_avro_proto_init() file_google_cloud_bigquery_storage_v1beta1_read_options_proto_init() file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Stream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StreamPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateReadSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Progress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ThrottleStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateReadSessionStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateReadSessionStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1beta1_storage_proto_msgTypes[2].OneofWrappers = []any{ (*ReadSession_AvroSchema)(nil), (*ReadSession_ArrowSchema)(nil), diff --git a/bigquery/storage/apiv1beta1/storagepb/table_reference.pb.go b/bigquery/storage/apiv1beta1/storagepb/table_reference.pb.go index cc6d9e48f9d6..bebe3a9905f9 100755 --- a/bigquery/storage/apiv1beta1/storagepb/table_reference.pb.go +++ b/bigquery/storage/apiv1beta1/storagepb/table_reference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta1/table_reference.proto @@ -52,11 +52,9 @@ type TableReference struct { func (x *TableReference) Reset() { *x = TableReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableReference) String() string { @@ -67,7 +65,7 @@ func (*TableReference) ProtoMessage() {} func (x *TableReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115,11 +113,9 @@ type TableModifiers struct { func (x *TableModifiers) Reset() { *x = TableModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableModifiers) String() string { @@ -130,7 +126,7 @@ func (*TableModifiers) ProtoMessage() {} func (x *TableModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,32 +215,6 @@ func file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_init() { if File_google_cloud_bigquery_storage_v1beta1_table_reference_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta1_table_reference_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TableModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta2/big_query_read_client.go b/bigquery/storage/apiv1beta2/big_query_read_client.go index 15bf5385f6b1..aa30f4aa9e2c 100755 --- a/bigquery/storage/apiv1beta2/big_query_read_client.go +++ b/bigquery/storage/apiv1beta2/big_query_read_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( storagepb "cloud.google.com/go/bigquery/storage/apiv1beta2/storagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -261,6 +260,8 @@ type bigQueryReadGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBigQueryReadClient creates a new big query read client based on gRPC. @@ -292,6 +293,7 @@ func NewBigQueryReadClient(ctx context.Context, opts ...option.ClientOption) (*B connPool: connPool, bigQueryReadClient: storagepb.NewBigQueryReadClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,6 +340,8 @@ type bigQueryReadRESTClient struct { // Points back to the CallOptions field of the containing BigQueryReadClient CallOptions **BigQueryReadCallOptions + + logger *slog.Logger } // NewBigQueryReadRESTClient creates a new big query read rest client. @@ -360,6 +364,7 @@ func NewBigQueryReadRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -412,7 +417,7 @@ func (c *bigQueryReadGRPCClient) CreateReadSession(ctx context.Context, req *sto var resp *storagepb.ReadSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryReadClient.CreateReadSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryReadClient.CreateReadSession, req, settings.GRPC, c.logger, "CreateReadSession") return err }, opts...) if err != nil { @@ -430,7 +435,9 @@ func (c *bigQueryReadGRPCClient) ReadRows(ctx context.Context, req *storagepb.Re var resp storagepb.BigQueryRead_ReadRowsClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadRows") resp, err = c.bigQueryReadClient.ReadRows(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadRows") return err }, opts...) if err != nil { @@ -448,7 +455,7 @@ func (c *bigQueryReadGRPCClient) SplitReadStream(ctx context.Context, req *stora var resp *storagepb.SplitReadStreamResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryReadClient.SplitReadStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryReadClient.SplitReadStream, req, settings.GRPC, c.logger, "SplitReadStream") return err }, opts...) if err != nil { @@ -509,17 +516,7 @@ func (c *bigQueryReadRESTClient) CreateReadSession(ctx context.Context, req *sto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReadSession") if err != nil { return err } @@ -575,15 +572,11 @@ func (c *bigQueryReadRESTClient) ReadRows(ctx context.Context, req *storagepb.Re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadRows") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &readRowsRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -690,17 +683,7 @@ func (c *bigQueryReadRESTClient) SplitReadStream(ctx context.Context, req *stora httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SplitReadStream") if err != nil { return err } diff --git a/bigquery/storage/apiv1beta2/big_query_write_client.go b/bigquery/storage/apiv1beta2/big_query_write_client.go index 0826c3967069..cb145ce97271 100755 --- a/bigquery/storage/apiv1beta2/big_query_write_client.go +++ b/bigquery/storage/apiv1beta2/big_query_write_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( storagepb "cloud.google.com/go/bigquery/storage/apiv1beta2/storagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -375,6 +374,8 @@ type bigQueryWriteGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBigQueryWriteClient creates a new big query write client based on gRPC. @@ -409,6 +410,7 @@ func NewBigQueryWriteClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, bigQueryWriteClient: storagepb.NewBigQueryWriteClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -455,6 +457,8 @@ type bigQueryWriteRESTClient struct { // Points back to the CallOptions field of the containing BigQueryWriteClient CallOptions **BigQueryWriteCallOptions + + logger *slog.Logger } // NewBigQueryWriteRESTClient creates a new big query write rest client. @@ -480,6 +484,7 @@ func NewBigQueryWriteRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -532,7 +537,7 @@ func (c *bigQueryWriteGRPCClient) CreateWriteStream(ctx context.Context, req *st var resp *storagepb.WriteStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.CreateWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.CreateWriteStream, req, settings.GRPC, c.logger, "CreateWriteStream") return err }, opts...) if err != nil { @@ -547,7 +552,9 @@ func (c *bigQueryWriteGRPCClient) AppendRows(ctx context.Context, opts ...gax.Ca opts = append((*c.CallOptions).AppendRows[0:len((*c.CallOptions).AppendRows):len((*c.CallOptions).AppendRows)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "AppendRows") resp, err = c.bigQueryWriteClient.AppendRows(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "AppendRows") return err }, opts...) if err != nil { @@ -565,7 +572,7 @@ func (c *bigQueryWriteGRPCClient) GetWriteStream(ctx context.Context, req *stora var resp *storagepb.WriteStream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.GetWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.GetWriteStream, req, settings.GRPC, c.logger, "GetWriteStream") return err }, opts...) if err != nil { @@ -583,7 +590,7 @@ func (c *bigQueryWriteGRPCClient) FinalizeWriteStream(ctx context.Context, req * var resp *storagepb.FinalizeWriteStreamResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.FinalizeWriteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.FinalizeWriteStream, req, settings.GRPC, c.logger, "FinalizeWriteStream") return err }, opts...) if err != nil { @@ -601,7 +608,7 @@ func (c *bigQueryWriteGRPCClient) BatchCommitWriteStreams(ctx context.Context, r var resp *storagepb.BatchCommitWriteStreamsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.BatchCommitWriteStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.BatchCommitWriteStreams, req, settings.GRPC, c.logger, "BatchCommitWriteStreams") return err }, opts...) if err != nil { @@ -619,7 +626,7 @@ func (c *bigQueryWriteGRPCClient) FlushRows(ctx context.Context, req *storagepb. var resp *storagepb.FlushRowsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.bigQueryWriteClient.FlushRows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.bigQueryWriteClient.FlushRows, req, settings.GRPC, c.logger, "FlushRows") return err }, opts...) if err != nil { @@ -670,17 +677,7 @@ func (c *bigQueryWriteRESTClient) CreateWriteStream(ctx context.Context, req *st httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWriteStream") if err != nil { return err } @@ -760,17 +757,7 @@ func (c *bigQueryWriteRESTClient) GetWriteStream(ctx context.Context, req *stora httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetWriteStream") if err != nil { return err } @@ -824,17 +811,7 @@ func (c *bigQueryWriteRESTClient) FinalizeWriteStream(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinalizeWriteStream") if err != nil { return err } @@ -894,17 +871,7 @@ func (c *bigQueryWriteRESTClient) BatchCommitWriteStreams(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchCommitWriteStreams") if err != nil { return err } @@ -962,17 +929,7 @@ func (c *bigQueryWriteRESTClient) FlushRows(ctx context.Context, req *storagepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FlushRows") if err != nil { return err } diff --git a/bigquery/storage/apiv1beta2/helpers.go b/bigquery/storage/apiv1beta2/helpers.go index 34aab2edf5e2..9117797ec19c 100755 --- a/bigquery/storage/apiv1beta2/helpers.go +++ b/bigquery/storage/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package storage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "bigquerystorage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/bigquery/storage/apiv1beta2/storagepb/arrow.pb.go b/bigquery/storage/apiv1beta2/storagepb/arrow.pb.go index 687bb3b45bc5..738bcdb62ed0 100755 --- a/bigquery/storage/apiv1beta2/storagepb/arrow.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/arrow.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/arrow.proto @@ -105,11 +105,9 @@ type ArrowSchema struct { func (x *ArrowSchema) Reset() { *x = ArrowSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowSchema) String() string { @@ -120,7 +118,7 @@ func (*ArrowSchema) ProtoMessage() {} func (x *ArrowSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +152,9 @@ type ArrowRecordBatch struct { func (x *ArrowRecordBatch) Reset() { *x = ArrowRecordBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowRecordBatch) String() string { @@ -169,7 +165,7 @@ func (*ArrowRecordBatch) ProtoMessage() {} func (x *ArrowRecordBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type ArrowSerializationOptions struct { func (x *ArrowSerializationOptions) Reset() { *x = ArrowSerializationOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrowSerializationOptions) String() string { @@ -218,7 +212,7 @@ func (*ArrowSerializationOptions) ProtoMessage() {} func (x *ArrowSerializationOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,44 +308,6 @@ func file_google_cloud_bigquery_storage_v1beta2_arrow_proto_init() { if File_google_cloud_bigquery_storage_v1beta2_arrow_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ArrowSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ArrowRecordBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_arrow_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ArrowSerializationOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta2/storagepb/avro.pb.go b/bigquery/storage/apiv1beta2/storagepb/avro.pb.go index bb5d4bef53e8..17cc18b1811d 100755 --- a/bigquery/storage/apiv1beta2/storagepb/avro.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/avro.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/avro.proto @@ -48,11 +48,9 @@ type AvroSchema struct { func (x *AvroSchema) Reset() { *x = AvroSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroSchema) String() string { @@ -63,7 +61,7 @@ func (*AvroSchema) ProtoMessage() {} func (x *AvroSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97,11 +95,9 @@ type AvroRows struct { func (x *AvroRows) Reset() { *x = AvroRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroRows) String() string { @@ -112,7 +108,7 @@ func (*AvroRows) ProtoMessage() {} func (x *AvroRows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,32 +186,6 @@ func file_google_cloud_bigquery_storage_v1beta2_avro_proto_init() { if File_google_cloud_bigquery_storage_v1beta2_avro_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AvroSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_avro_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AvroRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta2/storagepb/protobuf.pb.go b/bigquery/storage/apiv1beta2/storagepb/protobuf.pb.go index 71e8cb1692c7..324f839d04d6 100755 --- a/bigquery/storage/apiv1beta2/storagepb/protobuf.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/protobuf.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/protobuf.proto @@ -50,11 +50,9 @@ type ProtoSchema struct { func (x *ProtoSchema) Reset() { *x = ProtoSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoSchema) String() string { @@ -65,7 +63,7 @@ func (*ProtoSchema) ProtoMessage() {} func (x *ProtoSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101,11 +99,9 @@ type ProtoRows struct { func (x *ProtoRows) Reset() { *x = ProtoRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoRows) String() string { @@ -116,7 +112,7 @@ func (*ProtoRows) ProtoMessage() {} func (x *ProtoRows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,32 +197,6 @@ func file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_init() { if File_google_cloud_bigquery_storage_v1beta2_protobuf_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProtoSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigquery/storage/apiv1beta2/storagepb/storage.pb.go b/bigquery/storage/apiv1beta2/storagepb/storage.pb.go index 91dcd023bbb8..05e612dd877e 100755 --- a/bigquery/storage/apiv1beta2/storagepb/storage.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/storage.proto @@ -139,11 +139,9 @@ type CreateReadSessionRequest struct { func (x *CreateReadSessionRequest) Reset() { *x = CreateReadSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReadSessionRequest) String() string { @@ -154,7 +152,7 @@ func (*CreateReadSessionRequest) ProtoMessage() {} func (x *CreateReadSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,11 +204,9 @@ type ReadRowsRequest struct { func (x *ReadRowsRequest) Reset() { *x = ReadRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsRequest) String() string { @@ -221,7 +217,7 @@ func (*ReadRowsRequest) ProtoMessage() {} func (x *ReadRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +259,9 @@ type ThrottleState struct { func (x *ThrottleState) Reset() { *x = ThrottleState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThrottleState) String() string { @@ -278,7 +272,7 @@ func (*ThrottleState) ProtoMessage() {} func (x *ThrottleState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +306,9 @@ type StreamStats struct { func (x *StreamStats) Reset() { *x = StreamStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamStats) String() string { @@ -327,7 +319,7 @@ func (*StreamStats) ProtoMessage() {} func (x *StreamStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +377,9 @@ type ReadRowsResponse struct { func (x *ReadRowsResponse) Reset() { *x = ReadRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsResponse) String() string { @@ -400,7 +390,7 @@ func (*ReadRowsResponse) ProtoMessage() {} func (x *ReadRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +524,9 @@ type SplitReadStreamRequest struct { func (x *SplitReadStreamRequest) Reset() { *x = SplitReadStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamRequest) String() string { @@ -549,7 +537,7 @@ func (*SplitReadStreamRequest) ProtoMessage() {} func (x *SplitReadStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +582,9 @@ type SplitReadStreamResponse struct { func (x *SplitReadStreamResponse) Reset() { *x = SplitReadStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SplitReadStreamResponse) String() string { @@ -609,7 +595,7 @@ func (*SplitReadStreamResponse) ProtoMessage() {} func (x *SplitReadStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +639,9 @@ type CreateWriteStreamRequest struct { func (x *CreateWriteStreamRequest) Reset() { *x = CreateWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWriteStreamRequest) String() string { @@ -668,7 +652,7 @@ func (*CreateWriteStreamRequest) ProtoMessage() {} func (x *CreateWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +714,9 @@ type AppendRowsRequest struct { func (x *AppendRowsRequest) Reset() { *x = AppendRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsRequest) String() string { @@ -745,7 +727,7 @@ func (*AppendRowsRequest) ProtoMessage() {} func (x *AppendRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,11 +807,9 @@ type AppendRowsResponse struct { func (x *AppendRowsResponse) Reset() { *x = AppendRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsResponse) String() string { @@ -840,7 +820,7 @@ func (*AppendRowsResponse) ProtoMessage() {} func (x *AppendRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +913,9 @@ type GetWriteStreamRequest struct { func (x *GetWriteStreamRequest) Reset() { *x = GetWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWriteStreamRequest) String() string { @@ -948,7 +926,7 @@ func (*GetWriteStreamRequest) ProtoMessage() {} func (x *GetWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,11 +963,9 @@ type BatchCommitWriteStreamsRequest struct { func (x *BatchCommitWriteStreamsRequest) Reset() { *x = BatchCommitWriteStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCommitWriteStreamsRequest) String() string { @@ -1000,7 +976,7 @@ func (*BatchCommitWriteStreamsRequest) ProtoMessage() {} func (x *BatchCommitWriteStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,11 +1025,9 @@ type BatchCommitWriteStreamsResponse struct { func (x *BatchCommitWriteStreamsResponse) Reset() { *x = BatchCommitWriteStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCommitWriteStreamsResponse) String() string { @@ -1064,7 +1038,7 @@ func (*BatchCommitWriteStreamsResponse) ProtoMessage() {} func (x *BatchCommitWriteStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,11 +1080,9 @@ type FinalizeWriteStreamRequest struct { func (x *FinalizeWriteStreamRequest) Reset() { *x = FinalizeWriteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeWriteStreamRequest) String() string { @@ -1121,7 +1093,7 @@ func (*FinalizeWriteStreamRequest) ProtoMessage() {} func (x *FinalizeWriteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1127,9 @@ type FinalizeWriteStreamResponse struct { func (x *FinalizeWriteStreamResponse) Reset() { *x = FinalizeWriteStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeWriteStreamResponse) String() string { @@ -1170,7 +1140,7 @@ func (*FinalizeWriteStreamResponse) ProtoMessage() {} func (x *FinalizeWriteStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1177,9 @@ type FlushRowsRequest struct { func (x *FlushRowsRequest) Reset() { *x = FlushRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlushRowsRequest) String() string { @@ -1222,7 +1190,7 @@ func (*FlushRowsRequest) ProtoMessage() {} func (x *FlushRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1231,9 @@ type FlushRowsResponse struct { func (x *FlushRowsResponse) Reset() { *x = FlushRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlushRowsResponse) String() string { @@ -1278,7 +1244,7 @@ func (*FlushRowsResponse) ProtoMessage() {} func (x *FlushRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1285,9 @@ type StorageError struct { func (x *StorageError) Reset() { *x = StorageError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageError) String() string { @@ -1334,7 +1298,7 @@ func (*StorageError) ProtoMessage() {} func (x *StorageError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1395,11 +1359,9 @@ type StreamStats_Progress struct { func (x *StreamStats_Progress) Reset() { *x = StreamStats_Progress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamStats_Progress) String() string { @@ -1410,7 +1372,7 @@ func (*StreamStats_Progress) ProtoMessage() {} func (x *StreamStats_Progress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1453,11 +1415,9 @@ type AppendRowsRequest_ProtoData struct { func (x *AppendRowsRequest_ProtoData) Reset() { *x = AppendRowsRequest_ProtoData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsRequest_ProtoData) String() string { @@ -1468,7 +1428,7 @@ func (*AppendRowsRequest_ProtoData) ProtoMessage() {} func (x *AppendRowsRequest_ProtoData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,11 +1470,9 @@ type AppendRowsResponse_AppendResult struct { func (x *AppendRowsResponse_AppendResult) Reset() { *x = AppendRowsResponse_AppendResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppendRowsResponse_AppendResult) String() string { @@ -1525,7 +1483,7 @@ func (*AppendRowsResponse_AppendResult) ProtoMessage() {} func (x *AppendRowsResponse_AppendResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2088,260 +2046,6 @@ func file_google_cloud_bigquery_storage_v1beta2_storage_proto_init() { file_google_cloud_bigquery_storage_v1beta2_protobuf_proto_init() file_google_cloud_bigquery_storage_v1beta2_stream_proto_init() file_google_cloud_bigquery_storage_v1beta2_table_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateReadSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ThrottleState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SplitReadStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCommitWriteStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCommitWriteStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeWriteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeWriteStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FlushRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*FlushRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StorageError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StreamStats_Progress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsRequest_ProtoData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AppendRowsResponse_AppendResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1beta2_storage_proto_msgTypes[4].OneofWrappers = []any{ (*ReadRowsResponse_AvroRows)(nil), (*ReadRowsResponse_ArrowRecordBatch)(nil), diff --git a/bigquery/storage/apiv1beta2/storagepb/stream.pb.go b/bigquery/storage/apiv1beta2/storagepb/stream.pb.go index 92ac7d009d72..e4f026199fff 100755 --- a/bigquery/storage/apiv1beta2/storagepb/stream.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/stream.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/stream.proto @@ -191,11 +191,9 @@ type ReadSession struct { func (x *ReadSession) Reset() { *x = ReadSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession) String() string { @@ -206,7 +204,7 @@ func (*ReadSession) ProtoMessage() {} func (x *ReadSession) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +322,9 @@ type ReadStream struct { func (x *ReadStream) Reset() { *x = ReadStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadStream) String() string { @@ -339,7 +335,7 @@ func (*ReadStream) ProtoMessage() {} func (x *ReadStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +385,9 @@ type WriteStream struct { func (x *WriteStream) Reset() { *x = WriteStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteStream) String() string { @@ -404,7 +398,7 @@ func (*WriteStream) ProtoMessage() {} func (x *WriteStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +460,9 @@ type ReadSession_TableModifiers struct { func (x *ReadSession_TableModifiers) Reset() { *x = ReadSession_TableModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession_TableModifiers) String() string { @@ -481,7 +473,7 @@ func (*ReadSession_TableModifiers) ProtoMessage() {} func (x *ReadSession_TableModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +524,9 @@ type ReadSession_TableReadOptions struct { func (x *ReadSession_TableReadOptions) Reset() { *x = ReadSession_TableReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadSession_TableReadOptions) String() string { @@ -547,7 +537,7 @@ func (*ReadSession_TableReadOptions) ProtoMessage() {} func (x *ReadSession_TableReadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,68 +793,6 @@ func file_google_cloud_bigquery_storage_v1beta2_stream_proto_init() { file_google_cloud_bigquery_storage_v1beta2_arrow_proto_init() file_google_cloud_bigquery_storage_v1beta2_avro_proto_init() file_google_cloud_bigquery_storage_v1beta2_table_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession_TableModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadSession_TableReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_bigquery_storage_v1beta2_stream_proto_msgTypes[0].OneofWrappers = []any{ (*ReadSession_AvroSchema)(nil), (*ReadSession_ArrowSchema)(nil), diff --git a/bigquery/storage/apiv1beta2/storagepb/table.pb.go b/bigquery/storage/apiv1beta2/storagepb/table.pb.go index 3afbb4971614..15bbc6a4a613 100755 --- a/bigquery/storage/apiv1beta2/storagepb/table.pb.go +++ b/bigquery/storage/apiv1beta2/storagepb/table.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/bigquery/storage/v1beta2/table.proto @@ -205,11 +205,9 @@ type TableSchema struct { func (x *TableSchema) Reset() { *x = TableSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSchema) String() string { @@ -220,7 +218,7 @@ func (*TableSchema) ProtoMessage() {} func (x *TableSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type TableFieldSchema struct { func (x *TableFieldSchema) Reset() { *x = TableFieldSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableFieldSchema) String() string { @@ -279,7 +275,7 @@ func (*TableFieldSchema) ProtoMessage() {} func (x *TableFieldSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,32 +429,6 @@ func file_google_cloud_bigquery_storage_v1beta2_table_proto_init() { if File_google_cloud_bigquery_storage_v1beta2_table_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_bigquery_storage_v1beta2_table_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TableFieldSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigtable/admin/apiv2/adminpb/bigtable_instance_admin.pb.go b/bigtable/admin/apiv2/adminpb/bigtable_instance_admin.pb.go index ca912acd58f6..c628fd2741ac 100755 --- a/bigtable/admin/apiv2/adminpb/bigtable_instance_admin.pb.go +++ b/bigtable/admin/apiv2/adminpb/bigtable_instance_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -132,11 +132,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -147,7 +145,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +201,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -218,7 +214,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +251,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -270,7 +264,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +314,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -335,7 +327,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type PartialUpdateInstanceRequest struct { func (x *PartialUpdateInstanceRequest) Reset() { *x = PartialUpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialUpdateInstanceRequest) String() string { @@ -401,7 +391,7 @@ func (*PartialUpdateInstanceRequest) ProtoMessage() {} func (x *PartialUpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +433,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -458,7 +446,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,11 +488,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -515,7 +501,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +550,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -579,7 +563,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +603,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -634,7 +616,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +665,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -698,7 +678,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +727,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -762,7 +740,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +778,9 @@ type CreateInstanceMetadata struct { func (x *CreateInstanceMetadata) Reset() { *x = CreateInstanceMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceMetadata) String() string { @@ -815,7 +791,7 @@ func (*CreateInstanceMetadata) ProtoMessage() {} func (x *CreateInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +843,9 @@ type UpdateInstanceMetadata struct { func (x *UpdateInstanceMetadata) Reset() { *x = UpdateInstanceMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceMetadata) String() string { @@ -882,7 +856,7 @@ func (*UpdateInstanceMetadata) ProtoMessage() {} func (x *UpdateInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +917,9 @@ type CreateClusterMetadata struct { func (x *CreateClusterMetadata) Reset() { *x = CreateClusterMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterMetadata) String() string { @@ -958,7 +930,7 @@ func (*CreateClusterMetadata) ProtoMessage() {} func (x *CreateClusterMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +989,9 @@ type UpdateClusterMetadata struct { func (x *UpdateClusterMetadata) Reset() { *x = UpdateClusterMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterMetadata) String() string { @@ -1032,7 +1002,7 @@ func (*UpdateClusterMetadata) ProtoMessage() {} func (x *UpdateClusterMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1054,9 @@ type PartialUpdateClusterMetadata struct { func (x *PartialUpdateClusterMetadata) Reset() { *x = PartialUpdateClusterMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialUpdateClusterMetadata) String() string { @@ -1099,7 +1067,7 @@ func (*PartialUpdateClusterMetadata) ProtoMessage() {} func (x *PartialUpdateClusterMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1118,9 @@ type PartialUpdateClusterRequest struct { func (x *PartialUpdateClusterRequest) Reset() { *x = PartialUpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialUpdateClusterRequest) String() string { @@ -1165,7 +1131,7 @@ func (*PartialUpdateClusterRequest) ProtoMessage() {} func (x *PartialUpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,11 +1182,9 @@ type CreateAppProfileRequest struct { func (x *CreateAppProfileRequest) Reset() { *x = CreateAppProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAppProfileRequest) String() string { @@ -1231,7 +1195,7 @@ func (*CreateAppProfileRequest) ProtoMessage() {} func (x *CreateAppProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1251,9 @@ type GetAppProfileRequest struct { func (x *GetAppProfileRequest) Reset() { *x = GetAppProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAppProfileRequest) String() string { @@ -1302,7 +1264,7 @@ func (*GetAppProfileRequest) ProtoMessage() {} func (x *GetAppProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1314,9 @@ type ListAppProfilesRequest struct { func (x *ListAppProfilesRequest) Reset() { *x = ListAppProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppProfilesRequest) String() string { @@ -1367,7 +1327,7 @@ func (*ListAppProfilesRequest) ProtoMessage() {} func (x *ListAppProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1384,9 @@ type ListAppProfilesResponse struct { func (x *ListAppProfilesResponse) Reset() { *x = ListAppProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAppProfilesResponse) String() string { @@ -1439,7 +1397,7 @@ func (*ListAppProfilesResponse) ProtoMessage() {} func (x *ListAppProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1450,9 @@ type UpdateAppProfileRequest struct { func (x *UpdateAppProfileRequest) Reset() { *x = UpdateAppProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAppProfileRequest) String() string { @@ -1507,7 +1463,7 @@ func (*UpdateAppProfileRequest) ProtoMessage() {} func (x *UpdateAppProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1559,11 +1515,9 @@ type DeleteAppProfileRequest struct { func (x *DeleteAppProfileRequest) Reset() { *x = DeleteAppProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAppProfileRequest) String() string { @@ -1574,7 +1528,7 @@ func (*DeleteAppProfileRequest) ProtoMessage() {} func (x *DeleteAppProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,11 +1566,9 @@ type UpdateAppProfileMetadata struct { func (x *UpdateAppProfileMetadata) Reset() { *x = UpdateAppProfileMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAppProfileMetadata) String() string { @@ -1627,7 +1579,7 @@ func (*UpdateAppProfileMetadata) ProtoMessage() {} func (x *UpdateAppProfileMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1677,11 +1629,9 @@ type ListHotTabletsRequest struct { func (x *ListHotTabletsRequest) Reset() { *x = ListHotTabletsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHotTabletsRequest) String() string { @@ -1692,7 +1642,7 @@ func (*ListHotTabletsRequest) ProtoMessage() {} func (x *ListHotTabletsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1762,11 +1712,9 @@ type ListHotTabletsResponse struct { func (x *ListHotTabletsResponse) Reset() { *x = ListHotTabletsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHotTabletsResponse) String() string { @@ -1777,7 +1725,7 @@ func (*ListHotTabletsResponse) ProtoMessage() {} func (x *ListHotTabletsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1823,11 +1771,9 @@ type CreateClusterMetadata_TableProgress struct { func (x *CreateClusterMetadata_TableProgress) Reset() { *x = CreateClusterMetadata_TableProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterMetadata_TableProgress) String() string { @@ -1838,7 +1784,7 @@ func (*CreateClusterMetadata_TableProgress) ProtoMessage() {} func (x *CreateClusterMetadata_TableProgress) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2659,332 +2605,6 @@ func file_google_bigtable_admin_v2_bigtable_instance_admin_proto_init() { return } file_google_bigtable_admin_v2_instance_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PartialUpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PartialUpdateClusterMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*PartialUpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateAppProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetAppProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListAppProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListAppProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAppProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAppProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAppProfileMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListHotTabletsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListHotTabletsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_instance_admin_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterMetadata_TableProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigtable/admin/apiv2/adminpb/bigtable_table_admin.pb.go b/bigtable/admin/apiv2/adminpb/bigtable_table_admin.pb.go index f765d7acdeed..d7775857b59a 100755 --- a/bigtable/admin/apiv2/adminpb/bigtable_table_admin.pb.go +++ b/bigtable/admin/apiv2/adminpb/bigtable_table_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/bigtable_table_admin.proto @@ -71,11 +71,9 @@ type RestoreTableRequest struct { func (x *RestoreTableRequest) Reset() { *x = RestoreTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreTableRequest) String() string { @@ -86,7 +84,7 @@ func (*RestoreTableRequest) ProtoMessage() {} func (x *RestoreTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type RestoreTableMetadata struct { func (x *RestoreTableMetadata) Reset() { *x = RestoreTableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreTableMetadata) String() string { @@ -193,7 +189,7 @@ func (*RestoreTableMetadata) ProtoMessage() {} func (x *RestoreTableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type OptimizeRestoredTableMetadata struct { func (x *OptimizeRestoredTableMetadata) Reset() { *x = OptimizeRestoredTableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeRestoredTableMetadata) String() string { @@ -292,7 +286,7 @@ func (*OptimizeRestoredTableMetadata) ProtoMessage() {} func (x *OptimizeRestoredTableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +352,9 @@ type CreateTableRequest struct { func (x *CreateTableRequest) Reset() { *x = CreateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableRequest) String() string { @@ -373,7 +365,7 @@ func (*CreateTableRequest) ProtoMessage() {} func (x *CreateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +435,9 @@ type CreateTableFromSnapshotRequest struct { func (x *CreateTableFromSnapshotRequest) Reset() { *x = CreateTableFromSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableFromSnapshotRequest) String() string { @@ -458,7 +448,7 @@ func (*CreateTableFromSnapshotRequest) ProtoMessage() {} func (x *CreateTableFromSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +506,9 @@ type DropRowRangeRequest struct { func (x *DropRowRangeRequest) Reset() { *x = DropRowRangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DropRowRangeRequest) String() string { @@ -531,7 +519,7 @@ func (*DropRowRangeRequest) ProtoMessage() {} func (x *DropRowRangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +610,9 @@ type ListTablesRequest struct { func (x *ListTablesRequest) Reset() { *x = ListTablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesRequest) String() string { @@ -637,7 +623,7 @@ func (*ListTablesRequest) ProtoMessage() {} func (x *ListTablesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -697,11 +683,9 @@ type ListTablesResponse struct { func (x *ListTablesResponse) Reset() { *x = ListTablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTablesResponse) String() string { @@ -712,7 +696,7 @@ func (*ListTablesResponse) ProtoMessage() {} func (x *ListTablesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +743,9 @@ type GetTableRequest struct { func (x *GetTableRequest) Reset() { *x = GetTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableRequest) String() string { @@ -774,7 +756,7 @@ func (*GetTableRequest) ProtoMessage() {} func (x *GetTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,11 +812,9 @@ type UpdateTableRequest struct { func (x *UpdateTableRequest) Reset() { *x = UpdateTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTableRequest) String() string { @@ -845,7 +825,7 @@ func (*UpdateTableRequest) ProtoMessage() {} func (x *UpdateTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +871,9 @@ type UpdateTableMetadata struct { func (x *UpdateTableMetadata) Reset() { *x = UpdateTableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTableMetadata) String() string { @@ -906,7 +884,7 @@ func (*UpdateTableMetadata) ProtoMessage() {} func (x *UpdateTableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +935,9 @@ type DeleteTableRequest struct { func (x *DeleteTableRequest) Reset() { *x = DeleteTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTableRequest) String() string { @@ -972,7 +948,7 @@ func (*DeleteTableRequest) ProtoMessage() {} func (x *DeleteTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +985,9 @@ type UndeleteTableRequest struct { func (x *UndeleteTableRequest) Reset() { *x = UndeleteTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteTableRequest) String() string { @@ -1024,7 +998,7 @@ func (*UndeleteTableRequest) ProtoMessage() {} func (x *UndeleteTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1037,9 @@ type UndeleteTableMetadata struct { func (x *UndeleteTableMetadata) Reset() { *x = UndeleteTableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteTableMetadata) String() string { @@ -1078,7 +1050,7 @@ func (*UndeleteTableMetadata) ProtoMessage() {} func (x *UndeleteTableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1108,9 @@ type ModifyColumnFamiliesRequest struct { func (x *ModifyColumnFamiliesRequest) Reset() { *x = ModifyColumnFamiliesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyColumnFamiliesRequest) String() string { @@ -1151,7 +1121,7 @@ func (*ModifyColumnFamiliesRequest) ProtoMessage() {} func (x *ModifyColumnFamiliesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1172,9 @@ type GenerateConsistencyTokenRequest struct { func (x *GenerateConsistencyTokenRequest) Reset() { *x = GenerateConsistencyTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConsistencyTokenRequest) String() string { @@ -1217,7 +1185,7 @@ func (*GenerateConsistencyTokenRequest) ProtoMessage() {} func (x *GenerateConsistencyTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1220,9 @@ type GenerateConsistencyTokenResponse struct { func (x *GenerateConsistencyTokenResponse) Reset() { *x = GenerateConsistencyTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConsistencyTokenResponse) String() string { @@ -1267,7 +1233,7 @@ func (*GenerateConsistencyTokenResponse) ProtoMessage() {} func (x *GenerateConsistencyTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,11 +1280,9 @@ type CheckConsistencyRequest struct { func (x *CheckConsistencyRequest) Reset() { *x = CheckConsistencyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckConsistencyRequest) String() string { @@ -1329,7 +1293,7 @@ func (*CheckConsistencyRequest) ProtoMessage() {} func (x *CheckConsistencyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,11 +1375,9 @@ type StandardReadRemoteWrites struct { func (x *StandardReadRemoteWrites) Reset() { *x = StandardReadRemoteWrites{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StandardReadRemoteWrites) String() string { @@ -1426,7 +1388,7 @@ func (*StandardReadRemoteWrites) ProtoMessage() {} func (x *StandardReadRemoteWrites) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1413,9 @@ type DataBoostReadLocalWrites struct { func (x *DataBoostReadLocalWrites) Reset() { *x = DataBoostReadLocalWrites{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataBoostReadLocalWrites) String() string { @@ -1466,7 +1426,7 @@ func (*DataBoostReadLocalWrites) ProtoMessage() {} func (x *DataBoostReadLocalWrites) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1495,11 +1455,9 @@ type CheckConsistencyResponse struct { func (x *CheckConsistencyResponse) Reset() { *x = CheckConsistencyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckConsistencyResponse) String() string { @@ -1510,7 +1468,7 @@ func (*CheckConsistencyResponse) ProtoMessage() {} func (x *CheckConsistencyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1526,9 @@ type SnapshotTableRequest struct { func (x *SnapshotTableRequest) Reset() { *x = SnapshotTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotTableRequest) String() string { @@ -1583,7 +1539,7 @@ func (*SnapshotTableRequest) ProtoMessage() {} func (x *SnapshotTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1609,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -1668,7 +1622,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,11 +1671,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -1732,7 +1684,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1790,11 +1742,9 @@ type ListSnapshotsResponse struct { func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { @@ -1805,7 +1755,7 @@ func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1854,11 +1804,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -1869,7 +1817,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1912,11 +1860,9 @@ type SnapshotTableMetadata struct { func (x *SnapshotTableMetadata) Reset() { *x = SnapshotTableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotTableMetadata) String() string { @@ -1927,7 +1873,7 @@ func (*SnapshotTableMetadata) ProtoMessage() {} func (x *SnapshotTableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1985,11 +1931,9 @@ type CreateTableFromSnapshotMetadata struct { func (x *CreateTableFromSnapshotMetadata) Reset() { *x = CreateTableFromSnapshotMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableFromSnapshotMetadata) String() string { @@ -2000,7 +1944,7 @@ func (*CreateTableFromSnapshotMetadata) ProtoMessage() {} func (x *CreateTableFromSnapshotMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +2004,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -2075,7 +2017,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2130,11 +2072,9 @@ type CreateBackupMetadata struct { func (x *CreateBackupMetadata) Reset() { *x = CreateBackupMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupMetadata) String() string { @@ -2145,7 +2085,7 @@ func (*CreateBackupMetadata) ProtoMessage() {} func (x *CreateBackupMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2211,11 +2151,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -2226,7 +2164,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2270,11 +2208,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -2285,7 +2221,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2322,11 +2258,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -2337,7 +2271,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2441,11 +2375,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -2456,7 +2388,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2523,11 +2455,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -2538,7 +2468,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2603,11 +2533,9 @@ type CopyBackupRequest struct { func (x *CopyBackupRequest) Reset() { *x = CopyBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyBackupRequest) String() string { @@ -2618,7 +2546,7 @@ func (*CopyBackupRequest) ProtoMessage() {} func (x *CopyBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,11 +2610,9 @@ type CopyBackupMetadata struct { func (x *CopyBackupMetadata) Reset() { *x = CopyBackupMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyBackupMetadata) String() string { @@ -2697,7 +2623,7 @@ func (*CopyBackupMetadata) ProtoMessage() {} func (x *CopyBackupMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,11 +2681,9 @@ type CreateAuthorizedViewRequest struct { func (x *CreateAuthorizedViewRequest) Reset() { *x = CreateAuthorizedViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAuthorizedViewRequest) String() string { @@ -2770,7 +2694,7 @@ func (*CreateAuthorizedViewRequest) ProtoMessage() {} func (x *CreateAuthorizedViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2822,11 +2746,9 @@ type CreateAuthorizedViewMetadata struct { func (x *CreateAuthorizedViewMetadata) Reset() { *x = CreateAuthorizedViewMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAuthorizedViewMetadata) String() string { @@ -2837,7 +2759,7 @@ func (*CreateAuthorizedViewMetadata) ProtoMessage() {} func (x *CreateAuthorizedViewMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2903,11 +2825,9 @@ type ListAuthorizedViewsRequest struct { func (x *ListAuthorizedViewsRequest) Reset() { *x = ListAuthorizedViewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedViewsRequest) String() string { @@ -2918,7 +2838,7 @@ func (*ListAuthorizedViewsRequest) ProtoMessage() {} func (x *ListAuthorizedViewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2978,11 +2898,9 @@ type ListAuthorizedViewsResponse struct { func (x *ListAuthorizedViewsResponse) Reset() { *x = ListAuthorizedViewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizedViewsResponse) String() string { @@ -2993,7 +2911,7 @@ func (*ListAuthorizedViewsResponse) ProtoMessage() {} func (x *ListAuthorizedViewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3040,11 +2958,9 @@ type GetAuthorizedViewRequest struct { func (x *GetAuthorizedViewRequest) Reset() { *x = GetAuthorizedViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuthorizedViewRequest) String() string { @@ -3055,7 +2971,7 @@ func (*GetAuthorizedViewRequest) ProtoMessage() {} func (x *GetAuthorizedViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3111,11 +3027,9 @@ type UpdateAuthorizedViewRequest struct { func (x *UpdateAuthorizedViewRequest) Reset() { *x = UpdateAuthorizedViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAuthorizedViewRequest) String() string { @@ -3126,7 +3040,7 @@ func (*UpdateAuthorizedViewRequest) ProtoMessage() {} func (x *UpdateAuthorizedViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3180,11 +3094,9 @@ type UpdateAuthorizedViewMetadata struct { func (x *UpdateAuthorizedViewMetadata) Reset() { *x = UpdateAuthorizedViewMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAuthorizedViewMetadata) String() string { @@ -3195,7 +3107,7 @@ func (*UpdateAuthorizedViewMetadata) ProtoMessage() {} func (x *UpdateAuthorizedViewMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3251,11 +3163,9 @@ type DeleteAuthorizedViewRequest struct { func (x *DeleteAuthorizedViewRequest) Reset() { *x = DeleteAuthorizedViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAuthorizedViewRequest) String() string { @@ -3266,7 +3176,7 @@ func (*DeleteAuthorizedViewRequest) ProtoMessage() {} func (x *DeleteAuthorizedViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3307,11 +3217,9 @@ type CreateTableRequest_Split struct { func (x *CreateTableRequest_Split) Reset() { *x = CreateTableRequest_Split{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTableRequest_Split) String() string { @@ -3322,7 +3230,7 @@ func (*CreateTableRequest_Split) ProtoMessage() {} func (x *CreateTableRequest_Split) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3368,11 +3276,9 @@ type ModifyColumnFamiliesRequest_Modification struct { func (x *ModifyColumnFamiliesRequest_Modification) Reset() { *x = ModifyColumnFamiliesRequest_Modification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyColumnFamiliesRequest_Modification) String() string { @@ -3383,7 +3289,7 @@ func (*ModifyColumnFamiliesRequest_Modification) ProtoMessage() {} func (x *ModifyColumnFamiliesRequest_Modification) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4655,572 +4561,6 @@ func file_google_bigtable_admin_v2_bigtable_table_admin_proto_init() { } file_google_bigtable_admin_v2_common_proto_init() file_google_bigtable_admin_v2_table_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RestoreTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RestoreTableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeRestoredTableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableFromSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DropRowRangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListTablesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteTableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ModifyColumnFamiliesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConsistencyTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConsistencyTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CheckConsistencyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StandardReadRemoteWrites); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DataBoostReadLocalWrites); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CheckConsistencyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotTableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableFromSnapshotMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CopyBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CopyBackupMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateAuthorizedViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*CreateAuthorizedViewMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedViewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizedViewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*GetAuthorizedViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAuthorizedViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAuthorizedViewMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAuthorizedViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CreateTableRequest_Split); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ModifyColumnFamiliesRequest_Modification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_admin_v2_bigtable_table_admin_proto_msgTypes[0].OneofWrappers = []any{ (*RestoreTableRequest_Backup)(nil), } diff --git a/bigtable/admin/apiv2/adminpb/common.pb.go b/bigtable/admin/apiv2/adminpb/common.pb.go index caa6e944683a..91422aa52bcc 100755 --- a/bigtable/admin/apiv2/adminpb/common.pb.go +++ b/bigtable/admin/apiv2/adminpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/common.proto @@ -108,11 +108,9 @@ type OperationProgress struct { func (x *OperationProgress) Reset() { *x = OperationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationProgress) String() string { @@ -123,7 +121,7 @@ func (*OperationProgress) ProtoMessage() {} func (x *OperationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,20 +231,6 @@ func file_google_bigtable_admin_v2_common_proto_init() { if File_google_bigtable_admin_v2_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigtable/admin/apiv2/adminpb/instance.pb.go b/bigtable/admin/apiv2/adminpb/instance.pb.go index a02a1866910d..b36695812cbf 100755 --- a/bigtable/admin/apiv2/adminpb/instance.pb.go +++ b/bigtable/admin/apiv2/adminpb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/instance.proto @@ -424,11 +424,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -439,7 +437,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +523,9 @@ type AutoscalingTargets struct { func (x *AutoscalingTargets) Reset() { *x = AutoscalingTargets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingTargets) String() string { @@ -540,7 +536,7 @@ func (*AutoscalingTargets) ProtoMessage() {} func (x *AutoscalingTargets) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +579,9 @@ type AutoscalingLimits struct { func (x *AutoscalingLimits) Reset() { *x = AutoscalingLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingLimits) String() string { @@ -598,7 +592,7 @@ func (*AutoscalingLimits) ProtoMessage() {} func (x *AutoscalingLimits) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +657,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -678,7 +670,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +800,9 @@ type AppProfile struct { func (x *AppProfile) Reset() { *x = AppProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile) String() string { @@ -823,7 +813,7 @@ func (*AppProfile) ProtoMessage() {} func (x *AppProfile) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -992,11 +982,9 @@ type HotTablet struct { func (x *HotTablet) Reset() { *x = HotTablet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HotTablet) String() string { @@ -1007,7 +995,7 @@ func (*HotTablet) ProtoMessage() {} func (x *HotTablet) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1073,9 @@ type Cluster_ClusterAutoscalingConfig struct { func (x *Cluster_ClusterAutoscalingConfig) Reset() { *x = Cluster_ClusterAutoscalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ClusterAutoscalingConfig) String() string { @@ -1100,7 +1086,7 @@ func (*Cluster_ClusterAutoscalingConfig) ProtoMessage() {} func (x *Cluster_ClusterAutoscalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1141,11 +1127,9 @@ type Cluster_ClusterConfig struct { func (x *Cluster_ClusterConfig) Reset() { *x = Cluster_ClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ClusterConfig) String() string { @@ -1156,7 +1140,7 @@ func (*Cluster_ClusterConfig) ProtoMessage() {} func (x *Cluster_ClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1185,9 @@ type Cluster_EncryptionConfig struct { func (x *Cluster_EncryptionConfig) Reset() { *x = Cluster_EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_EncryptionConfig) String() string { @@ -1216,7 +1198,7 @@ func (*Cluster_EncryptionConfig) ProtoMessage() {} func (x *Cluster_EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1268,11 +1250,9 @@ type AppProfile_MultiClusterRoutingUseAny struct { func (x *AppProfile_MultiClusterRoutingUseAny) Reset() { *x = AppProfile_MultiClusterRoutingUseAny{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile_MultiClusterRoutingUseAny) String() string { @@ -1283,7 +1263,7 @@ func (*AppProfile_MultiClusterRoutingUseAny) ProtoMessage() {} func (x *AppProfile_MultiClusterRoutingUseAny) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,11 +1330,9 @@ type AppProfile_SingleClusterRouting struct { func (x *AppProfile_SingleClusterRouting) Reset() { *x = AppProfile_SingleClusterRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile_SingleClusterRouting) String() string { @@ -1365,7 +1343,7 @@ func (*AppProfile_SingleClusterRouting) ProtoMessage() {} func (x *AppProfile_SingleClusterRouting) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,11 +1385,9 @@ type AppProfile_StandardIsolation struct { func (x *AppProfile_StandardIsolation) Reset() { *x = AppProfile_StandardIsolation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile_StandardIsolation) String() string { @@ -1422,7 +1398,7 @@ func (*AppProfile_StandardIsolation) ProtoMessage() {} func (x *AppProfile_StandardIsolation) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1467,11 +1443,9 @@ type AppProfile_DataBoostIsolationReadOnly struct { func (x *AppProfile_DataBoostIsolationReadOnly) Reset() { *x = AppProfile_DataBoostIsolationReadOnly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile_DataBoostIsolationReadOnly) String() string { @@ -1482,7 +1456,7 @@ func (*AppProfile_DataBoostIsolationReadOnly) ProtoMessage() {} func (x *AppProfile_DataBoostIsolationReadOnly) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1521,11 +1495,9 @@ type AppProfile_MultiClusterRoutingUseAny_RowAffinity struct { func (x *AppProfile_MultiClusterRoutingUseAny_RowAffinity) Reset() { *x = AppProfile_MultiClusterRoutingUseAny_RowAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppProfile_MultiClusterRoutingUseAny_RowAffinity) String() string { @@ -1536,7 +1508,7 @@ func (*AppProfile_MultiClusterRoutingUseAny_RowAffinity) ProtoMessage() {} func (x *AppProfile_MultiClusterRoutingUseAny_RowAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_instance_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1937,176 +1909,6 @@ func file_google_bigtable_admin_v2_instance_proto_init() { return } file_google_bigtable_admin_v2_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingTargets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*HotTablet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ClusterAutoscalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile_MultiClusterRoutingUseAny); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile_SingleClusterRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile_StandardIsolation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile_DataBoostIsolationReadOnly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_instance_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AppProfile_MultiClusterRoutingUseAny_RowAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_admin_v2_instance_proto_msgTypes[0].OneofWrappers = []any{} file_google_bigtable_admin_v2_instance_proto_msgTypes[3].OneofWrappers = []any{ (*Cluster_ClusterConfig_)(nil), diff --git a/bigtable/admin/apiv2/adminpb/table.pb.go b/bigtable/admin/apiv2/adminpb/table.pb.go index 9cd3dbe892ce..374b8e930f34 100755 --- a/bigtable/admin/apiv2/adminpb/table.pb.go +++ b/bigtable/admin/apiv2/adminpb/table.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/table.proto @@ -582,11 +582,9 @@ type RestoreInfo struct { func (x *RestoreInfo) Reset() { *x = RestoreInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreInfo) String() string { @@ -597,7 +595,7 @@ func (*RestoreInfo) ProtoMessage() {} func (x *RestoreInfo) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +659,9 @@ type ChangeStreamConfig struct { func (x *ChangeStreamConfig) Reset() { *x = ChangeStreamConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeStreamConfig) String() string { @@ -676,7 +672,7 @@ func (*ChangeStreamConfig) ProtoMessage() {} func (x *ChangeStreamConfig) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +743,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -762,7 +756,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +876,9 @@ type AuthorizedView struct { func (x *AuthorizedView) Reset() { *x = AuthorizedView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizedView) String() string { @@ -897,7 +889,7 @@ func (*AuthorizedView) ProtoMessage() {} func (x *AuthorizedView) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,11 +977,9 @@ type ColumnFamily struct { func (x *ColumnFamily) Reset() { *x = ColumnFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnFamily) String() string { @@ -1000,7 +990,7 @@ func (*ColumnFamily) ProtoMessage() {} func (x *ColumnFamily) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1048,11 +1038,9 @@ type GcRule struct { func (x *GcRule) Reset() { *x = GcRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcRule) String() string { @@ -1063,7 +1051,7 @@ func (*GcRule) ProtoMessage() {} func (x *GcRule) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1157,9 @@ type EncryptionInfo struct { func (x *EncryptionInfo) Reset() { *x = EncryptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionInfo) String() string { @@ -1184,7 +1170,7 @@ func (*EncryptionInfo) ProtoMessage() {} func (x *EncryptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1243,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -1272,7 +1256,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1402,11 +1386,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -1417,7 +1399,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1516,9 @@ type BackupInfo struct { func (x *BackupInfo) Reset() { *x = BackupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupInfo) String() string { @@ -1549,7 +1529,7 @@ func (*BackupInfo) ProtoMessage() {} func (x *BackupInfo) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1617,11 +1597,9 @@ type Table_ClusterState struct { func (x *Table_ClusterState) Reset() { *x = Table_ClusterState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table_ClusterState) String() string { @@ -1632,7 +1610,7 @@ func (*Table_ClusterState) ProtoMessage() {} func (x *Table_ClusterState) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1677,11 +1655,9 @@ type Table_AutomatedBackupPolicy struct { func (x *Table_AutomatedBackupPolicy) Reset() { *x = Table_AutomatedBackupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table_AutomatedBackupPolicy) String() string { @@ -1692,7 +1668,7 @@ func (*Table_AutomatedBackupPolicy) ProtoMessage() {} func (x *Table_AutomatedBackupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1739,11 +1715,9 @@ type AuthorizedView_FamilySubsets struct { func (x *AuthorizedView_FamilySubsets) Reset() { *x = AuthorizedView_FamilySubsets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizedView_FamilySubsets) String() string { @@ -1754,7 +1728,7 @@ func (*AuthorizedView_FamilySubsets) ProtoMessage() {} func (x *AuthorizedView_FamilySubsets) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1799,11 +1773,9 @@ type AuthorizedView_SubsetView struct { func (x *AuthorizedView_SubsetView) Reset() { *x = AuthorizedView_SubsetView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizedView_SubsetView) String() string { @@ -1814,7 +1786,7 @@ func (*AuthorizedView_SubsetView) ProtoMessage() {} func (x *AuthorizedView_SubsetView) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1827,9 @@ type GcRule_Intersection struct { func (x *GcRule_Intersection) Reset() { *x = GcRule_Intersection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcRule_Intersection) String() string { @@ -1870,7 +1840,7 @@ func (*GcRule_Intersection) ProtoMessage() {} func (x *GcRule_Intersection) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1904,11 +1874,9 @@ type GcRule_Union struct { func (x *GcRule_Union) Reset() { *x = GcRule_Union{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcRule_Union) String() string { @@ -1919,7 +1887,7 @@ func (*GcRule_Union) ProtoMessage() {} func (x *GcRule_Union) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_table_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2435,200 +2403,6 @@ func file_google_bigtable_admin_v2_table_proto_init() { return } file_google_bigtable_admin_v2_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_table_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RestoreInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ChangeStreamConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizedView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ColumnFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GcRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BackupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Table_ClusterState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Table_AutomatedBackupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizedView_FamilySubsets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizedView_SubsetView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GcRule_Intersection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_table_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GcRule_Union); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_admin_v2_table_proto_msgTypes[0].OneofWrappers = []any{ (*RestoreInfo_BackupInfo)(nil), } diff --git a/bigtable/admin/apiv2/adminpb/types.pb.go b/bigtable/admin/apiv2/adminpb/types.pb.go index 9997364f1d2c..f23fbecfe1e1 100755 --- a/bigtable/admin/apiv2/adminpb/types.pb.go +++ b/bigtable/admin/apiv2/adminpb/types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/admin/v2/types.proto @@ -86,11 +86,9 @@ type Type struct { func (x *Type) Reset() { *x = Type{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type) String() string { @@ -101,7 +99,7 @@ func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type Type_Bytes struct { func (x *Type_Bytes) Reset() { *x = Type_Bytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes) String() string { @@ -323,7 +319,7 @@ func (*Type_Bytes) ProtoMessage() {} func (x *Type_Bytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +354,9 @@ type Type_String struct { func (x *Type_String) Reset() { *x = Type_String{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String) String() string { @@ -373,7 +367,7 @@ func (*Type_String) ProtoMessage() {} func (x *Type_String) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +402,9 @@ type Type_Int64 struct { func (x *Type_Int64) Reset() { *x = Type_Int64{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64) String() string { @@ -423,7 +415,7 @@ func (*Type_Int64) ProtoMessage() {} func (x *Type_Int64) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +447,9 @@ type Type_Bool struct { func (x *Type_Bool) Reset() { *x = Type_Bool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bool) String() string { @@ -470,7 +460,7 @@ func (*Type_Bool) ProtoMessage() {} func (x *Type_Bool) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +485,9 @@ type Type_Float32 struct { func (x *Type_Float32) Reset() { *x = Type_Float32{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Float32) String() string { @@ -510,7 +498,7 @@ func (*Type_Float32) ProtoMessage() {} func (x *Type_Float32) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +523,9 @@ type Type_Float64 struct { func (x *Type_Float64) Reset() { *x = Type_Float64{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Float64) String() string { @@ -550,7 +536,7 @@ func (*Type_Float64) ProtoMessage() {} func (x *Type_Float64) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +561,9 @@ type Type_Timestamp struct { func (x *Type_Timestamp) Reset() { *x = Type_Timestamp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Timestamp) String() string { @@ -590,7 +574,7 @@ func (*Type_Timestamp) ProtoMessage() {} func (x *Type_Timestamp) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +599,9 @@ type Type_Date struct { func (x *Type_Date) Reset() { *x = Type_Date{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Date) String() string { @@ -630,7 +612,7 @@ func (*Type_Date) ProtoMessage() {} func (x *Type_Date) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -660,11 +642,9 @@ type Type_Struct struct { func (x *Type_Struct) Reset() { *x = Type_Struct{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Struct) String() string { @@ -675,7 +655,7 @@ func (*Type_Struct) ProtoMessage() {} func (x *Type_Struct) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,11 +690,9 @@ type Type_Array struct { func (x *Type_Array) Reset() { *x = Type_Array{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Array) String() string { @@ -725,7 +703,7 @@ func (*Type_Array) ProtoMessage() {} func (x *Type_Array) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +746,9 @@ type Type_Map struct { func (x *Type_Map) Reset() { *x = Type_Map{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Map) String() string { @@ -783,7 +759,7 @@ func (*Type_Map) ProtoMessage() {} func (x *Type_Map) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +819,9 @@ type Type_Aggregate struct { func (x *Type_Aggregate) Reset() { *x = Type_Aggregate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate) String() string { @@ -858,7 +832,7 @@ func (*Type_Aggregate) ProtoMessage() {} func (x *Type_Aggregate) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,11 +944,9 @@ type Type_Bytes_Encoding struct { func (x *Type_Bytes_Encoding) Reset() { *x = Type_Bytes_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes_Encoding) String() string { @@ -985,7 +957,7 @@ func (*Type_Bytes_Encoding) ProtoMessage() {} func (x *Type_Bytes_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1009,9 @@ type Type_Bytes_Encoding_Raw struct { func (x *Type_Bytes_Encoding_Raw) Reset() { *x = Type_Bytes_Encoding_Raw{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes_Encoding_Raw) String() string { @@ -1052,7 +1022,7 @@ func (*Type_Bytes_Encoding_Raw) ProtoMessage() {} func (x *Type_Bytes_Encoding_Raw) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1054,9 @@ type Type_String_Encoding struct { func (x *Type_String_Encoding) Reset() { *x = Type_String_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding) String() string { @@ -1099,7 +1067,7 @@ func (*Type_String_Encoding) ProtoMessage() {} func (x *Type_String_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1135,9 @@ type Type_String_Encoding_Utf8Raw struct { func (x *Type_String_Encoding_Utf8Raw) Reset() { *x = Type_String_Encoding_Utf8Raw{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding_Utf8Raw) String() string { @@ -1182,7 +1148,7 @@ func (*Type_String_Encoding_Utf8Raw) ProtoMessage() {} func (x *Type_String_Encoding_Utf8Raw) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,11 +1178,9 @@ type Type_String_Encoding_Utf8Bytes struct { func (x *Type_String_Encoding_Utf8Bytes) Reset() { *x = Type_String_Encoding_Utf8Bytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding_Utf8Bytes) String() string { @@ -1227,7 +1191,7 @@ func (*Type_String_Encoding_Utf8Bytes) ProtoMessage() {} func (x *Type_String_Encoding_Utf8Bytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1222,9 @@ type Type_Int64_Encoding struct { func (x *Type_Int64_Encoding) Reset() { *x = Type_Int64_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64_Encoding) String() string { @@ -1273,7 +1235,7 @@ func (*Type_Int64_Encoding) ProtoMessage() {} func (x *Type_Int64_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1332,11 +1294,9 @@ type Type_Int64_Encoding_BigEndianBytes struct { func (x *Type_Int64_Encoding_BigEndianBytes) Reset() { *x = Type_Int64_Encoding_BigEndianBytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64_Encoding_BigEndianBytes) String() string { @@ -1347,7 +1307,7 @@ func (*Type_Int64_Encoding_BigEndianBytes) ProtoMessage() {} func (x *Type_Int64_Encoding_BigEndianBytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1384,11 +1344,9 @@ type Type_Struct_Field struct { func (x *Type_Struct_Field) Reset() { *x = Type_Struct_Field{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Struct_Field) String() string { @@ -1399,7 +1357,7 @@ func (*Type_Struct_Field) ProtoMessage() {} func (x *Type_Struct_Field) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,11 +1397,9 @@ type Type_Aggregate_Sum struct { func (x *Type_Aggregate_Sum) Reset() { *x = Type_Aggregate_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Sum) String() string { @@ -1454,7 +1410,7 @@ func (*Type_Aggregate_Sum) ProtoMessage() {} func (x *Type_Aggregate_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1436,9 @@ type Type_Aggregate_Max struct { func (x *Type_Aggregate_Max) Reset() { *x = Type_Aggregate_Max{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Max) String() string { @@ -1495,7 +1449,7 @@ func (*Type_Aggregate_Max) ProtoMessage() {} func (x *Type_Aggregate_Max) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1521,11 +1475,9 @@ type Type_Aggregate_Min struct { func (x *Type_Aggregate_Min) Reset() { *x = Type_Aggregate_Min{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Min) String() string { @@ -1536,7 +1488,7 @@ func (*Type_Aggregate_Min) ProtoMessage() {} func (x *Type_Aggregate_Min) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1566,11 +1518,9 @@ type Type_Aggregate_HyperLogLogPlusPlusUniqueCount struct { func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) Reset() { *x = Type_Aggregate_HyperLogLogPlusPlusUniqueCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) String() string { @@ -1581,7 +1531,7 @@ func (*Type_Aggregate_HyperLogLogPlusPlusUniqueCount) ProtoMessage() {} func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_admin_v2_types_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,308 +1822,6 @@ func file_google_bigtable_admin_v2_types_proto_init() { if File_google_bigtable_admin_v2_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_admin_v2_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Type); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Type_String); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Type_Float32); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Type_Float64); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Type_Timestamp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Type_Date); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Type_Struct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Type_Array); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Type_Map); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes_Encoding_Raw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding_Utf8Raw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding_Utf8Bytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64_Encoding_BigEndianBytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Type_Struct_Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Max); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Min); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_admin_v2_types_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_HyperLogLogPlusPlusUniqueCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_admin_v2_types_proto_msgTypes[0].OneofWrappers = []any{ (*Type_BytesType)(nil), (*Type_StringType)(nil), diff --git a/bigtable/apiv2/bigtablepb/bigtable.pb.go b/bigtable/apiv2/bigtablepb/bigtable.pb.go index e0880f480b6e..670f482dd48d 100755 --- a/bigtable/apiv2/bigtablepb/bigtable.pb.go +++ b/bigtable/apiv2/bigtablepb/bigtable.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/bigtable.proto @@ -206,11 +206,9 @@ type ReadRowsRequest struct { func (x *ReadRowsRequest) Reset() { *x = ReadRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsRequest) String() string { @@ -221,7 +219,7 @@ func (*ReadRowsRequest) ProtoMessage() {} func (x *ReadRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +332,9 @@ type ReadRowsResponse struct { func (x *ReadRowsResponse) Reset() { *x = ReadRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsResponse) String() string { @@ -349,7 +345,7 @@ func (*ReadRowsResponse) ProtoMessage() {} func (x *ReadRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,11 +405,9 @@ type SampleRowKeysRequest struct { func (x *SampleRowKeysRequest) Reset() { *x = SampleRowKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleRowKeysRequest) String() string { @@ -424,7 +418,7 @@ func (*SampleRowKeysRequest) ProtoMessage() {} func (x *SampleRowKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +477,9 @@ type SampleRowKeysResponse struct { func (x *SampleRowKeysResponse) Reset() { *x = SampleRowKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleRowKeysResponse) String() string { @@ -498,7 +490,7 @@ func (*SampleRowKeysResponse) ProtoMessage() {} func (x *SampleRowKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +550,9 @@ type MutateRowRequest struct { func (x *MutateRowRequest) Reset() { *x = MutateRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowRequest) String() string { @@ -573,7 +563,7 @@ func (*MutateRowRequest) ProtoMessage() {} func (x *MutateRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +622,9 @@ type MutateRowResponse struct { func (x *MutateRowResponse) Reset() { *x = MutateRowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowResponse) String() string { @@ -647,7 +635,7 @@ func (*MutateRowResponse) ProtoMessage() {} func (x *MutateRowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +681,9 @@ type MutateRowsRequest struct { func (x *MutateRowsRequest) Reset() { *x = MutateRowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowsRequest) String() string { @@ -708,7 +694,7 @@ func (*MutateRowsRequest) ProtoMessage() {} func (x *MutateRowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +753,9 @@ type MutateRowsResponse struct { func (x *MutateRowsResponse) Reset() { *x = MutateRowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowsResponse) String() string { @@ -782,7 +766,7 @@ func (*MutateRowsResponse) ProtoMessage() {} func (x *MutateRowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +822,9 @@ type RateLimitInfo struct { func (x *RateLimitInfo) Reset() { *x = RateLimitInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RateLimitInfo) String() string { @@ -853,7 +835,7 @@ func (*RateLimitInfo) ProtoMessage() {} func (x *RateLimitInfo) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +909,9 @@ type CheckAndMutateRowRequest struct { func (x *CheckAndMutateRowRequest) Reset() { *x = CheckAndMutateRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckAndMutateRowRequest) String() string { @@ -942,7 +922,7 @@ func (*CheckAndMutateRowRequest) ProtoMessage() {} func (x *CheckAndMutateRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,11 +999,9 @@ type CheckAndMutateRowResponse struct { func (x *CheckAndMutateRowResponse) Reset() { *x = CheckAndMutateRowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckAndMutateRowResponse) String() string { @@ -1034,7 +1012,7 @@ func (*CheckAndMutateRowResponse) ProtoMessage() {} func (x *CheckAndMutateRowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1051,9 @@ type PingAndWarmRequest struct { func (x *PingAndWarmRequest) Reset() { *x = PingAndWarmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PingAndWarmRequest) String() string { @@ -1088,7 +1064,7 @@ func (*PingAndWarmRequest) ProtoMessage() {} func (x *PingAndWarmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1102,9 @@ type PingAndWarmResponse struct { func (x *PingAndWarmResponse) Reset() { *x = PingAndWarmResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PingAndWarmResponse) String() string { @@ -1141,7 +1115,7 @@ func (*PingAndWarmResponse) ProtoMessage() {} func (x *PingAndWarmResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1162,9 @@ type ReadModifyWriteRowRequest struct { func (x *ReadModifyWriteRowRequest) Reset() { *x = ReadModifyWriteRowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadModifyWriteRowRequest) String() string { @@ -1203,7 +1175,7 @@ func (*ReadModifyWriteRowRequest) ProtoMessage() {} func (x *ReadModifyWriteRowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1265,11 +1237,9 @@ type ReadModifyWriteRowResponse struct { func (x *ReadModifyWriteRowResponse) Reset() { *x = ReadModifyWriteRowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadModifyWriteRowResponse) String() string { @@ -1280,7 +1250,7 @@ func (*ReadModifyWriteRowResponse) ProtoMessage() {} func (x *ReadModifyWriteRowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1322,11 +1292,9 @@ type GenerateInitialChangeStreamPartitionsRequest struct { func (x *GenerateInitialChangeStreamPartitionsRequest) Reset() { *x = GenerateInitialChangeStreamPartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateInitialChangeStreamPartitionsRequest) String() string { @@ -1337,7 +1305,7 @@ func (*GenerateInitialChangeStreamPartitionsRequest) ProtoMessage() {} func (x *GenerateInitialChangeStreamPartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1379,11 +1347,9 @@ type GenerateInitialChangeStreamPartitionsResponse struct { func (x *GenerateInitialChangeStreamPartitionsResponse) Reset() { *x = GenerateInitialChangeStreamPartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateInitialChangeStreamPartitionsResponse) String() string { @@ -1394,7 +1360,7 @@ func (*GenerateInitialChangeStreamPartitionsResponse) ProtoMessage() {} func (x *GenerateInitialChangeStreamPartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1452,11 +1418,9 @@ type ReadChangeStreamRequest struct { func (x *ReadChangeStreamRequest) Reset() { *x = ReadChangeStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamRequest) String() string { @@ -1467,7 +1431,7 @@ func (*ReadChangeStreamRequest) ProtoMessage() {} func (x *ReadChangeStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1587,11 +1551,9 @@ type ReadChangeStreamResponse struct { func (x *ReadChangeStreamResponse) Reset() { *x = ReadChangeStreamResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse) String() string { @@ -1602,7 +1564,7 @@ func (*ReadChangeStreamResponse) ProtoMessage() {} func (x *ReadChangeStreamResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1725,11 +1687,9 @@ type ExecuteQueryRequest struct { func (x *ExecuteQueryRequest) Reset() { *x = ExecuteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteQueryRequest) String() string { @@ -1740,7 +1700,7 @@ func (*ExecuteQueryRequest) ProtoMessage() {} func (x *ExecuteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1798,9 @@ type ExecuteQueryResponse struct { func (x *ExecuteQueryResponse) Reset() { *x = ExecuteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteQueryResponse) String() string { @@ -1853,7 +1811,7 @@ func (*ExecuteQueryResponse) ProtoMessage() {} func (x *ExecuteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1970,11 +1928,9 @@ type ReadRowsResponse_CellChunk struct { func (x *ReadRowsResponse_CellChunk) Reset() { *x = ReadRowsResponse_CellChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRowsResponse_CellChunk) String() string { @@ -1985,7 +1941,7 @@ func (*ReadRowsResponse_CellChunk) ProtoMessage() {} func (x *ReadRowsResponse_CellChunk) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2106,11 +2062,9 @@ type MutateRowsRequest_Entry struct { func (x *MutateRowsRequest_Entry) Reset() { *x = MutateRowsRequest_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowsRequest_Entry) String() string { @@ -2121,7 +2075,7 @@ func (*MutateRowsRequest_Entry) ProtoMessage() {} func (x *MutateRowsRequest_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2168,11 +2122,9 @@ type MutateRowsResponse_Entry struct { func (x *MutateRowsResponse_Entry) Reset() { *x = MutateRowsResponse_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutateRowsResponse_Entry) String() string { @@ -2183,7 +2135,7 @@ func (*MutateRowsResponse_Entry) ProtoMessage() {} func (x *MutateRowsResponse_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2229,11 +2181,9 @@ type ReadChangeStreamResponse_MutationChunk struct { func (x *ReadChangeStreamResponse_MutationChunk) Reset() { *x = ReadChangeStreamResponse_MutationChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse_MutationChunk) String() string { @@ -2244,7 +2194,7 @@ func (*ReadChangeStreamResponse_MutationChunk) ProtoMessage() {} func (x *ReadChangeStreamResponse_MutationChunk) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2324,11 +2274,9 @@ type ReadChangeStreamResponse_DataChange struct { func (x *ReadChangeStreamResponse_DataChange) Reset() { *x = ReadChangeStreamResponse_DataChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse_DataChange) String() string { @@ -2339,7 +2287,7 @@ func (*ReadChangeStreamResponse_DataChange) ProtoMessage() {} func (x *ReadChangeStreamResponse_DataChange) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2438,11 +2386,9 @@ type ReadChangeStreamResponse_Heartbeat struct { func (x *ReadChangeStreamResponse_Heartbeat) Reset() { *x = ReadChangeStreamResponse_Heartbeat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse_Heartbeat) String() string { @@ -2453,7 +2399,7 @@ func (*ReadChangeStreamResponse_Heartbeat) ProtoMessage() {} func (x *ReadChangeStreamResponse_Heartbeat) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2524,11 +2470,9 @@ type ReadChangeStreamResponse_CloseStream struct { func (x *ReadChangeStreamResponse_CloseStream) Reset() { *x = ReadChangeStreamResponse_CloseStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse_CloseStream) String() string { @@ -2539,7 +2483,7 @@ func (*ReadChangeStreamResponse_CloseStream) ProtoMessage() {} func (x *ReadChangeStreamResponse_CloseStream) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2594,11 +2538,9 @@ type ReadChangeStreamResponse_MutationChunk_ChunkInfo struct { func (x *ReadChangeStreamResponse_MutationChunk_ChunkInfo) Reset() { *x = ReadChangeStreamResponse_MutationChunk_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadChangeStreamResponse_MutationChunk_ChunkInfo) String() string { @@ -2609,7 +2551,7 @@ func (*ReadChangeStreamResponse_MutationChunk_ChunkInfo) ProtoMessage() {} func (x *ReadChangeStreamResponse_MutationChunk_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_bigtable_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3567,356 +3509,6 @@ func file_google_bigtable_v2_bigtable_proto_init() { } file_google_bigtable_v2_data_proto_init() file_google_bigtable_v2_request_stats_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_bigtable_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SampleRowKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SampleRowKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RateLimitInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CheckAndMutateRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CheckAndMutateRowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PingAndWarmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PingAndWarmResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReadModifyWriteRowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReadModifyWriteRowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateInitialChangeStreamPartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateInitialChangeStreamPartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ReadRowsResponse_CellChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowsRequest_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*MutateRowsResponse_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse_MutationChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse_DataChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse_Heartbeat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse_CloseStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_bigtable_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ReadChangeStreamResponse_MutationChunk_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_v2_bigtable_proto_msgTypes[7].OneofWrappers = []any{} file_google_bigtable_v2_bigtable_proto_msgTypes[17].OneofWrappers = []any{ (*ReadChangeStreamRequest_StartTime)(nil), diff --git a/bigtable/apiv2/bigtablepb/data.pb.go b/bigtable/apiv2/bigtablepb/data.pb.go index 0021c1a61e22..f547165ce576 100755 --- a/bigtable/apiv2/bigtablepb/data.pb.go +++ b/bigtable/apiv2/bigtablepb/data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/data.proto @@ -56,11 +56,9 @@ type Row struct { func (x *Row) Reset() { *x = Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Row) String() string { @@ -71,7 +69,7 @@ func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type Family struct { func (x *Family) Reset() { *x = Family{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Family) String() string { @@ -135,7 +131,7 @@ func (*Family) ProtoMessage() {} func (x *Family) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +179,9 @@ type Column struct { func (x *Column) Reset() { *x = Column{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Column) String() string { @@ -198,7 +192,7 @@ func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +244,9 @@ type Cell struct { func (x *Cell) Reset() { *x = Cell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cell) String() string { @@ -265,7 +257,7 @@ func (*Cell) ProtoMessage() {} func (x *Cell) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +340,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -363,7 +353,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +544,9 @@ type ArrayValue struct { func (x *ArrayValue) Reset() { *x = ArrayValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrayValue) String() string { @@ -569,7 +557,7 @@ func (*ArrayValue) ProtoMessage() {} func (x *ArrayValue) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +605,9 @@ type RowRange struct { func (x *RowRange) Reset() { *x = RowRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowRange) String() string { @@ -632,7 +618,7 @@ func (*RowRange) ProtoMessage() {} func (x *RowRange) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +725,9 @@ type RowSet struct { func (x *RowSet) Reset() { *x = RowSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowSet) String() string { @@ -754,7 +738,7 @@ func (*RowSet) ProtoMessage() {} func (x *RowSet) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -814,11 +798,9 @@ type ColumnRange struct { func (x *ColumnRange) Reset() { *x = ColumnRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnRange) String() string { @@ -829,7 +811,7 @@ func (*ColumnRange) ProtoMessage() {} func (x *ColumnRange) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +925,9 @@ type TimestampRange struct { func (x *TimestampRange) Reset() { *x = TimestampRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampRange) String() string { @@ -958,7 +938,7 @@ func (*TimestampRange) ProtoMessage() {} func (x *TimestampRange) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +993,9 @@ type ValueRange struct { func (x *ValueRange) Reset() { *x = ValueRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueRange) String() string { @@ -1028,7 +1006,7 @@ func (*ValueRange) ProtoMessage() {} func (x *ValueRange) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1166,9 @@ type RowFilter struct { func (x *RowFilter) Reset() { *x = RowFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowFilter) String() string { @@ -1203,7 +1179,7 @@ func (*RowFilter) ProtoMessage() {} func (x *RowFilter) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1621,11 +1597,9 @@ type Mutation struct { func (x *Mutation) Reset() { *x = Mutation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation) String() string { @@ -1636,7 +1610,7 @@ func (*Mutation) ProtoMessage() {} func (x *Mutation) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1746,9 @@ type ReadModifyWriteRule struct { func (x *ReadModifyWriteRule) Reset() { *x = ReadModifyWriteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadModifyWriteRule) String() string { @@ -1787,7 +1759,7 @@ func (*ReadModifyWriteRule) ProtoMessage() {} func (x *ReadModifyWriteRule) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1874,11 +1846,9 @@ type StreamPartition struct { func (x *StreamPartition) Reset() { *x = StreamPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamPartition) String() string { @@ -1889,7 +1859,7 @@ func (*StreamPartition) ProtoMessage() {} func (x *StreamPartition) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1925,11 +1895,9 @@ type StreamContinuationTokens struct { func (x *StreamContinuationTokens) Reset() { *x = StreamContinuationTokens{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamContinuationTokens) String() string { @@ -1940,7 +1908,7 @@ func (*StreamContinuationTokens) ProtoMessage() {} func (x *StreamContinuationTokens) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1946,9 @@ type StreamContinuationToken struct { func (x *StreamContinuationToken) Reset() { *x = StreamContinuationToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamContinuationToken) String() string { @@ -1993,7 +1959,7 @@ func (*StreamContinuationToken) ProtoMessage() {} func (x *StreamContinuationToken) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2032,11 +1998,9 @@ type ProtoFormat struct { func (x *ProtoFormat) Reset() { *x = ProtoFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoFormat) String() string { @@ -2047,7 +2011,7 @@ func (*ProtoFormat) ProtoMessage() {} func (x *ProtoFormat) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2076,11 +2040,9 @@ type ColumnMetadata struct { func (x *ColumnMetadata) Reset() { *x = ColumnMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnMetadata) String() string { @@ -2091,7 +2053,7 @@ func (*ColumnMetadata) ProtoMessage() {} func (x *ColumnMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2132,11 +2094,9 @@ type ProtoSchema struct { func (x *ProtoSchema) Reset() { *x = ProtoSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoSchema) String() string { @@ -2147,7 +2107,7 @@ func (*ProtoSchema) ProtoMessage() {} func (x *ProtoSchema) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,11 +2146,9 @@ type ResultSetMetadata struct { func (x *ResultSetMetadata) Reset() { *x = ResultSetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResultSetMetadata) String() string { @@ -2201,7 +2159,7 @@ func (*ResultSetMetadata) ProtoMessage() {} func (x *ResultSetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2259,11 +2217,9 @@ type ProtoRows struct { func (x *ProtoRows) Reset() { *x = ProtoRows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoRows) String() string { @@ -2274,7 +2230,7 @@ func (*ProtoRows) ProtoMessage() {} func (x *ProtoRows) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2309,11 +2265,9 @@ type ProtoRowsBatch struct { func (x *ProtoRowsBatch) Reset() { *x = ProtoRowsBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtoRowsBatch) String() string { @@ -2324,7 +2278,7 @@ func (*ProtoRowsBatch) ProtoMessage() {} func (x *ProtoRowsBatch) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2396,11 +2350,9 @@ type PartialResultSet struct { func (x *PartialResultSet) Reset() { *x = PartialResultSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialResultSet) String() string { @@ -2411,7 +2363,7 @@ func (*PartialResultSet) ProtoMessage() {} func (x *PartialResultSet) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2479,11 +2431,9 @@ type RowFilter_Chain struct { func (x *RowFilter_Chain) Reset() { *x = RowFilter_Chain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowFilter_Chain) String() string { @@ -2494,7 +2444,7 @@ func (*RowFilter_Chain) ProtoMessage() {} func (x *RowFilter_Chain) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2553,11 +2503,9 @@ type RowFilter_Interleave struct { func (x *RowFilter_Interleave) Reset() { *x = RowFilter_Interleave{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowFilter_Interleave) String() string { @@ -2568,7 +2516,7 @@ func (*RowFilter_Interleave) ProtoMessage() {} func (x *RowFilter_Interleave) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2616,11 +2564,9 @@ type RowFilter_Condition struct { func (x *RowFilter_Condition) Reset() { *x = RowFilter_Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowFilter_Condition) String() string { @@ -2631,7 +2577,7 @@ func (*RowFilter_Condition) ProtoMessage() {} func (x *RowFilter_Condition) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2691,11 +2637,9 @@ type Mutation_SetCell struct { func (x *Mutation_SetCell) Reset() { *x = Mutation_SetCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_SetCell) String() string { @@ -2706,7 +2650,7 @@ func (*Mutation_SetCell) ProtoMessage() {} func (x *Mutation_SetCell) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2772,11 +2716,9 @@ type Mutation_AddToCell struct { func (x *Mutation_AddToCell) Reset() { *x = Mutation_AddToCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_AddToCell) String() string { @@ -2787,7 +2729,7 @@ func (*Mutation_AddToCell) ProtoMessage() {} func (x *Mutation_AddToCell) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2855,11 +2797,9 @@ type Mutation_MergeToCell struct { func (x *Mutation_MergeToCell) Reset() { *x = Mutation_MergeToCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_MergeToCell) String() string { @@ -2870,7 +2810,7 @@ func (*Mutation_MergeToCell) ProtoMessage() {} func (x *Mutation_MergeToCell) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2932,11 +2872,9 @@ type Mutation_DeleteFromColumn struct { func (x *Mutation_DeleteFromColumn) Reset() { *x = Mutation_DeleteFromColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_DeleteFromColumn) String() string { @@ -2947,7 +2885,7 @@ func (*Mutation_DeleteFromColumn) ProtoMessage() {} func (x *Mutation_DeleteFromColumn) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2934,9 @@ type Mutation_DeleteFromFamily struct { func (x *Mutation_DeleteFromFamily) Reset() { *x = Mutation_DeleteFromFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_DeleteFromFamily) String() string { @@ -3011,7 +2947,7 @@ func (*Mutation_DeleteFromFamily) ProtoMessage() {} func (x *Mutation_DeleteFromFamily) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3042,11 +2978,9 @@ type Mutation_DeleteFromRow struct { func (x *Mutation_DeleteFromRow) Reset() { *x = Mutation_DeleteFromRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_data_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_data_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_DeleteFromRow) String() string { @@ -3057,7 +2991,7 @@ func (*Mutation_DeleteFromRow) ProtoMessage() {} func (x *Mutation_DeleteFromRow) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_data_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3570,404 +3504,6 @@ func file_google_bigtable_v2_data_proto_init() { return } file_google_bigtable_v2_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Family); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Column); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ArrayValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RowRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RowSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ColumnRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TimestampRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ValueRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RowFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Mutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReadModifyWriteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StreamContinuationTokens); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StreamContinuationToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ProtoFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ColumnMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ProtoSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ResultSetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRowsBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PartialResultSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RowFilter_Chain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RowFilter_Interleave); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RowFilter_Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_SetCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_AddToCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_MergeToCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_DeleteFromColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_DeleteFromFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_data_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_DeleteFromRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_v2_data_proto_msgTypes[4].OneofWrappers = []any{ (*Value_RawValue)(nil), (*Value_RawTimestampMicros)(nil), diff --git a/bigtable/apiv2/bigtablepb/feature_flags.pb.go b/bigtable/apiv2/bigtablepb/feature_flags.pb.go index 032cc94bcb38..99c5647abd57 100755 --- a/bigtable/apiv2/bigtablepb/feature_flags.pb.go +++ b/bigtable/apiv2/bigtablepb/feature_flags.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/feature_flags.proto @@ -78,11 +78,9 @@ type FeatureFlags struct { func (x *FeatureFlags) Reset() { *x = FeatureFlags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_feature_flags_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_feature_flags_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureFlags) String() string { @@ -93,7 +91,7 @@ func (*FeatureFlags) ProtoMessage() {} func (x *FeatureFlags) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_feature_flags_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,20 +249,6 @@ func file_google_bigtable_v2_feature_flags_proto_init() { if File_google_bigtable_v2_feature_flags_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_feature_flags_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureFlags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/bigtable/apiv2/bigtablepb/request_stats.pb.go b/bigtable/apiv2/bigtablepb/request_stats.pb.go index a3b26670fe4a..4c67043cd201 100755 --- a/bigtable/apiv2/bigtablepb/request_stats.pb.go +++ b/bigtable/apiv2/bigtablepb/request_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/request_stats.proto @@ -58,11 +58,9 @@ type ReadIterationStats struct { func (x *ReadIterationStats) Reset() { *x = ReadIterationStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadIterationStats) String() string { @@ -73,7 +71,7 @@ func (*ReadIterationStats) ProtoMessage() {} func (x *ReadIterationStats) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type RequestLatencyStats struct { func (x *RequestLatencyStats) Reset() { *x = RequestLatencyStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestLatencyStats) String() string { @@ -161,7 +157,7 @@ func (*RequestLatencyStats) ProtoMessage() {} func (x *RequestLatencyStats) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,11 +197,9 @@ type FullReadStatsView struct { func (x *FullReadStatsView) Reset() { *x = FullReadStatsView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FullReadStatsView) String() string { @@ -216,7 +210,7 @@ func (*FullReadStatsView) ProtoMessage() {} func (x *FullReadStatsView) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type RequestStats struct { func (x *RequestStats) Reset() { *x = RequestStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestStats) String() string { @@ -282,7 +274,7 @@ func (*RequestStats) ProtoMessage() {} func (x *RequestStats) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_request_stats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,56 +415,6 @@ func file_google_bigtable_v2_request_stats_proto_init() { if File_google_bigtable_v2_request_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_request_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReadIterationStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_request_stats_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RequestLatencyStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_request_stats_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FullReadStatsView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_request_stats_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RequestStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_v2_request_stats_proto_msgTypes[3].OneofWrappers = []any{ (*RequestStats_FullReadStatsView)(nil), } diff --git a/bigtable/apiv2/bigtablepb/response_params.pb.go b/bigtable/apiv2/bigtablepb/response_params.pb.go index 54caa744faed..f7268397864f 100755 --- a/bigtable/apiv2/bigtablepb/response_params.pb.go +++ b/bigtable/apiv2/bigtablepb/response_params.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/response_params.proto @@ -53,11 +53,9 @@ type ResponseParams struct { func (x *ResponseParams) Reset() { *x = ResponseParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_response_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_response_params_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseParams) String() string { @@ -68,7 +66,7 @@ func (*ResponseParams) ProtoMessage() {} func (x *ResponseParams) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_response_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +153,6 @@ func file_google_bigtable_v2_response_params_proto_init() { if File_google_bigtable_v2_response_params_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_response_params_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResponseParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_v2_response_params_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/bigtable/apiv2/bigtablepb/types.pb.go b/bigtable/apiv2/bigtablepb/types.pb.go index 1090862843a8..03d252d9b97c 100755 --- a/bigtable/apiv2/bigtablepb/types.pb.go +++ b/bigtable/apiv2/bigtablepb/types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/bigtable/v2/types.proto @@ -86,11 +86,9 @@ type Type struct { func (x *Type) Reset() { *x = Type{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type) String() string { @@ -101,7 +99,7 @@ func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type Type_Bytes struct { func (x *Type_Bytes) Reset() { *x = Type_Bytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes) String() string { @@ -323,7 +319,7 @@ func (*Type_Bytes) ProtoMessage() {} func (x *Type_Bytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +354,9 @@ type Type_String struct { func (x *Type_String) Reset() { *x = Type_String{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String) String() string { @@ -373,7 +367,7 @@ func (*Type_String) ProtoMessage() {} func (x *Type_String) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +402,9 @@ type Type_Int64 struct { func (x *Type_Int64) Reset() { *x = Type_Int64{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64) String() string { @@ -423,7 +415,7 @@ func (*Type_Int64) ProtoMessage() {} func (x *Type_Int64) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +447,9 @@ type Type_Bool struct { func (x *Type_Bool) Reset() { *x = Type_Bool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bool) String() string { @@ -470,7 +460,7 @@ func (*Type_Bool) ProtoMessage() {} func (x *Type_Bool) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +485,9 @@ type Type_Float32 struct { func (x *Type_Float32) Reset() { *x = Type_Float32{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Float32) String() string { @@ -510,7 +498,7 @@ func (*Type_Float32) ProtoMessage() {} func (x *Type_Float32) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +523,9 @@ type Type_Float64 struct { func (x *Type_Float64) Reset() { *x = Type_Float64{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Float64) String() string { @@ -550,7 +536,7 @@ func (*Type_Float64) ProtoMessage() {} func (x *Type_Float64) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +561,9 @@ type Type_Timestamp struct { func (x *Type_Timestamp) Reset() { *x = Type_Timestamp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Timestamp) String() string { @@ -590,7 +574,7 @@ func (*Type_Timestamp) ProtoMessage() {} func (x *Type_Timestamp) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +599,9 @@ type Type_Date struct { func (x *Type_Date) Reset() { *x = Type_Date{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Date) String() string { @@ -630,7 +612,7 @@ func (*Type_Date) ProtoMessage() {} func (x *Type_Date) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -660,11 +642,9 @@ type Type_Struct struct { func (x *Type_Struct) Reset() { *x = Type_Struct{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Struct) String() string { @@ -675,7 +655,7 @@ func (*Type_Struct) ProtoMessage() {} func (x *Type_Struct) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,11 +690,9 @@ type Type_Array struct { func (x *Type_Array) Reset() { *x = Type_Array{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Array) String() string { @@ -725,7 +703,7 @@ func (*Type_Array) ProtoMessage() {} func (x *Type_Array) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +746,9 @@ type Type_Map struct { func (x *Type_Map) Reset() { *x = Type_Map{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Map) String() string { @@ -783,7 +759,7 @@ func (*Type_Map) ProtoMessage() {} func (x *Type_Map) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +819,9 @@ type Type_Aggregate struct { func (x *Type_Aggregate) Reset() { *x = Type_Aggregate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate) String() string { @@ -858,7 +832,7 @@ func (*Type_Aggregate) ProtoMessage() {} func (x *Type_Aggregate) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,11 +944,9 @@ type Type_Bytes_Encoding struct { func (x *Type_Bytes_Encoding) Reset() { *x = Type_Bytes_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes_Encoding) String() string { @@ -985,7 +957,7 @@ func (*Type_Bytes_Encoding) ProtoMessage() {} func (x *Type_Bytes_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1009,9 @@ type Type_Bytes_Encoding_Raw struct { func (x *Type_Bytes_Encoding_Raw) Reset() { *x = Type_Bytes_Encoding_Raw{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Bytes_Encoding_Raw) String() string { @@ -1052,7 +1022,7 @@ func (*Type_Bytes_Encoding_Raw) ProtoMessage() {} func (x *Type_Bytes_Encoding_Raw) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1054,9 @@ type Type_String_Encoding struct { func (x *Type_String_Encoding) Reset() { *x = Type_String_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding) String() string { @@ -1099,7 +1067,7 @@ func (*Type_String_Encoding) ProtoMessage() {} func (x *Type_String_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1135,9 @@ type Type_String_Encoding_Utf8Raw struct { func (x *Type_String_Encoding_Utf8Raw) Reset() { *x = Type_String_Encoding_Utf8Raw{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding_Utf8Raw) String() string { @@ -1182,7 +1148,7 @@ func (*Type_String_Encoding_Utf8Raw) ProtoMessage() {} func (x *Type_String_Encoding_Utf8Raw) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,11 +1178,9 @@ type Type_String_Encoding_Utf8Bytes struct { func (x *Type_String_Encoding_Utf8Bytes) Reset() { *x = Type_String_Encoding_Utf8Bytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_String_Encoding_Utf8Bytes) String() string { @@ -1227,7 +1191,7 @@ func (*Type_String_Encoding_Utf8Bytes) ProtoMessage() {} func (x *Type_String_Encoding_Utf8Bytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1222,9 @@ type Type_Int64_Encoding struct { func (x *Type_Int64_Encoding) Reset() { *x = Type_Int64_Encoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64_Encoding) String() string { @@ -1273,7 +1235,7 @@ func (*Type_Int64_Encoding) ProtoMessage() {} func (x *Type_Int64_Encoding) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1332,11 +1294,9 @@ type Type_Int64_Encoding_BigEndianBytes struct { func (x *Type_Int64_Encoding_BigEndianBytes) Reset() { *x = Type_Int64_Encoding_BigEndianBytes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Int64_Encoding_BigEndianBytes) String() string { @@ -1347,7 +1307,7 @@ func (*Type_Int64_Encoding_BigEndianBytes) ProtoMessage() {} func (x *Type_Int64_Encoding_BigEndianBytes) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1384,11 +1344,9 @@ type Type_Struct_Field struct { func (x *Type_Struct_Field) Reset() { *x = Type_Struct_Field{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Struct_Field) String() string { @@ -1399,7 +1357,7 @@ func (*Type_Struct_Field) ProtoMessage() {} func (x *Type_Struct_Field) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,11 +1397,9 @@ type Type_Aggregate_Sum struct { func (x *Type_Aggregate_Sum) Reset() { *x = Type_Aggregate_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Sum) String() string { @@ -1454,7 +1410,7 @@ func (*Type_Aggregate_Sum) ProtoMessage() {} func (x *Type_Aggregate_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1436,9 @@ type Type_Aggregate_Max struct { func (x *Type_Aggregate_Max) Reset() { *x = Type_Aggregate_Max{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Max) String() string { @@ -1495,7 +1449,7 @@ func (*Type_Aggregate_Max) ProtoMessage() {} func (x *Type_Aggregate_Max) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1521,11 +1475,9 @@ type Type_Aggregate_Min struct { func (x *Type_Aggregate_Min) Reset() { *x = Type_Aggregate_Min{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_Min) String() string { @@ -1536,7 +1488,7 @@ func (*Type_Aggregate_Min) ProtoMessage() {} func (x *Type_Aggregate_Min) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1566,11 +1518,9 @@ type Type_Aggregate_HyperLogLogPlusPlusUniqueCount struct { func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) Reset() { *x = Type_Aggregate_HyperLogLogPlusPlusUniqueCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_bigtable_v2_types_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_bigtable_v2_types_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) String() string { @@ -1581,7 +1531,7 @@ func (*Type_Aggregate_HyperLogLogPlusPlusUniqueCount) ProtoMessage() {} func (x *Type_Aggregate_HyperLogLogPlusPlusUniqueCount) ProtoReflect() protoreflect.Message { mi := &file_google_bigtable_v2_types_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1858,308 +1808,6 @@ func file_google_bigtable_v2_types_proto_init() { if File_google_bigtable_v2_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_bigtable_v2_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Type); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Type_String); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Type_Float32); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Type_Float64); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Type_Timestamp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Type_Date); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Type_Struct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Type_Array); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Type_Map); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Type_Bytes_Encoding_Raw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding_Utf8Raw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Type_String_Encoding_Utf8Bytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64_Encoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Type_Int64_Encoding_BigEndianBytes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Type_Struct_Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Max); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_Min); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_bigtable_v2_types_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Type_Aggregate_HyperLogLogPlusPlusUniqueCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_bigtable_v2_types_proto_msgTypes[0].OneofWrappers = []any{ (*Type_BytesType)(nil), (*Type_StringType)(nil), diff --git a/billing/apiv1/billingpb/cloud_billing.pb.go b/billing/apiv1/billingpb/cloud_billing.pb.go index 7b64db3cc15e..590f72b14a9f 100755 --- a/billing/apiv1/billingpb/cloud_billing.pb.go +++ b/billing/apiv1/billingpb/cloud_billing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/v1/cloud_billing.proto @@ -92,11 +92,9 @@ type BillingAccount struct { func (x *BillingAccount) Reset() { *x = BillingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BillingAccount) String() string { @@ -107,7 +105,7 @@ func (*BillingAccount) ProtoMessage() {} func (x *BillingAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,11 +191,9 @@ type ProjectBillingInfo struct { func (x *ProjectBillingInfo) Reset() { *x = ProjectBillingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectBillingInfo) String() string { @@ -208,7 +204,7 @@ func (*ProjectBillingInfo) ProtoMessage() {} func (x *ProjectBillingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +260,9 @@ type GetBillingAccountRequest struct { func (x *GetBillingAccountRequest) Reset() { *x = GetBillingAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBillingAccountRequest) String() string { @@ -279,7 +273,7 @@ func (*GetBillingAccountRequest) ProtoMessage() {} func (x *GetBillingAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type ListBillingAccountsRequest struct { func (x *ListBillingAccountsRequest) Reset() { *x = ListBillingAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBillingAccountsRequest) String() string { @@ -348,7 +340,7 @@ func (*ListBillingAccountsRequest) ProtoMessage() {} func (x *ListBillingAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +399,9 @@ type ListBillingAccountsResponse struct { func (x *ListBillingAccountsResponse) Reset() { *x = ListBillingAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBillingAccountsResponse) String() string { @@ -422,7 +412,7 @@ func (*ListBillingAccountsResponse) ProtoMessage() {} func (x *ListBillingAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +461,9 @@ type CreateBillingAccountRequest struct { func (x *CreateBillingAccountRequest) Reset() { *x = CreateBillingAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBillingAccountRequest) String() string { @@ -486,7 +474,7 @@ func (*CreateBillingAccountRequest) ProtoMessage() {} func (x *CreateBillingAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +521,9 @@ type UpdateBillingAccountRequest struct { func (x *UpdateBillingAccountRequest) Reset() { *x = UpdateBillingAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBillingAccountRequest) String() string { @@ -548,7 +534,7 @@ func (*UpdateBillingAccountRequest) ProtoMessage() {} func (x *UpdateBillingAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +591,9 @@ type ListProjectBillingInfoRequest struct { func (x *ListProjectBillingInfoRequest) Reset() { *x = ListProjectBillingInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectBillingInfoRequest) String() string { @@ -620,7 +604,7 @@ func (*ListProjectBillingInfoRequest) ProtoMessage() {} func (x *ListProjectBillingInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +657,9 @@ type ListProjectBillingInfoResponse struct { func (x *ListProjectBillingInfoResponse) Reset() { *x = ListProjectBillingInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectBillingInfoResponse) String() string { @@ -688,7 +670,7 @@ func (*ListProjectBillingInfoResponse) ProtoMessage() {} func (x *ListProjectBillingInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +712,9 @@ type GetProjectBillingInfoRequest struct { func (x *GetProjectBillingInfoRequest) Reset() { *x = GetProjectBillingInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectBillingInfoRequest) String() string { @@ -745,7 +725,7 @@ func (*GetProjectBillingInfoRequest) ProtoMessage() {} func (x *GetProjectBillingInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +765,9 @@ type UpdateProjectBillingInfoRequest struct { func (x *UpdateProjectBillingInfoRequest) Reset() { *x = UpdateProjectBillingInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProjectBillingInfoRequest) String() string { @@ -800,7 +778,7 @@ func (*UpdateProjectBillingInfoRequest) ProtoMessage() {} func (x *UpdateProjectBillingInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +826,9 @@ type MoveBillingAccountRequest struct { func (x *MoveBillingAccountRequest) Reset() { *x = MoveBillingAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveBillingAccountRequest) String() string { @@ -863,7 +839,7 @@ func (*MoveBillingAccountRequest) ProtoMessage() {} func (x *MoveBillingAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,152 +1280,6 @@ func file_google_cloud_billing_v1_cloud_billing_proto_init() { if File_google_cloud_billing_v1_cloud_billing_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BillingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProjectBillingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetBillingAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBillingAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBillingAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateBillingAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBillingAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectBillingInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectBillingInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectBillingInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProjectBillingInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_billing_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MoveBillingAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/billing/apiv1/billingpb/cloud_catalog.pb.go b/billing/apiv1/billingpb/cloud_catalog.pb.go index 8741f5bb684e..0b7109cee80e 100755 --- a/billing/apiv1/billingpb/cloud_catalog.pb.go +++ b/billing/apiv1/billingpb/cloud_catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/v1/cloud_catalog.proto @@ -226,11 +226,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -241,7 +239,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +314,9 @@ type Sku struct { func (x *Sku) Reset() { *x = Sku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sku) String() string { @@ -331,7 +327,7 @@ func (*Sku) ProtoMessage() {} func (x *Sku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +419,9 @@ type Category struct { func (x *Category) Reset() { *x = Category{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Category) String() string { @@ -438,7 +432,7 @@ func (*Category) ProtoMessage() {} func (x *Category) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +506,9 @@ type PricingInfo struct { func (x *PricingInfo) Reset() { *x = PricingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PricingInfo) String() string { @@ -527,7 +519,7 @@ func (*PricingInfo) ProtoMessage() {} func (x *PricingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +620,9 @@ type PricingExpression struct { func (x *PricingExpression) Reset() { *x = PricingExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PricingExpression) String() string { @@ -643,7 +633,7 @@ func (*PricingExpression) ProtoMessage() {} func (x *PricingExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +713,9 @@ type AggregationInfo struct { func (x *AggregationInfo) Reset() { *x = AggregationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationInfo) String() string { @@ -738,7 +726,7 @@ func (*AggregationInfo) ProtoMessage() {} func (x *AggregationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +777,9 @@ type GeoTaxonomy struct { func (x *GeoTaxonomy) Reset() { *x = GeoTaxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeoTaxonomy) String() string { @@ -804,7 +790,7 @@ func (*GeoTaxonomy) ProtoMessage() {} func (x *GeoTaxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +835,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -864,7 +848,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +893,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -924,7 +906,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +972,9 @@ type ListSkusRequest struct { func (x *ListSkusRequest) Reset() { *x = ListSkusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkusRequest) String() string { @@ -1005,7 +985,7 @@ func (*ListSkusRequest) ProtoMessage() {} func (x *ListSkusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1058,9 @@ type ListSkusResponse struct { func (x *ListSkusResponse) Reset() { *x = ListSkusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkusResponse) String() string { @@ -1093,7 +1071,7 @@ func (*ListSkusResponse) ProtoMessage() {} func (x *ListSkusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1117,9 @@ type PricingExpression_TierRate struct { func (x *PricingExpression_TierRate) Reset() { *x = PricingExpression_TierRate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PricingExpression_TierRate) String() string { @@ -1154,7 +1130,7 @@ func (*PricingExpression_TierRate) ProtoMessage() {} func (x *PricingExpression_TierRate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,152 +1467,6 @@ func file_google_cloud_billing_v1_cloud_catalog_proto_init() { if File_google_cloud_billing_v1_cloud_catalog_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Sku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Category); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PricingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PricingExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AggregationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GeoTaxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListSkusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListSkusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_v1_cloud_catalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PricingExpression_TierRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/billing/apiv1/cloud_billing_client.go b/billing/apiv1/cloud_billing_client.go index 259cdcd47f9d..471cb5719c93 100755 --- a/billing/apiv1/cloud_billing_client.go +++ b/billing/apiv1/cloud_billing_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( billingpb "cloud.google.com/go/billing/apiv1/billingpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -509,6 +508,8 @@ type cloudBillingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudBillingClient creates a new cloud billing client based on gRPC. @@ -536,6 +537,7 @@ func NewCloudBillingClient(ctx context.Context, opts ...option.ClientOption) (*C connPool: connPool, cloudBillingClient: billingpb.NewCloudBillingClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -582,6 +584,8 @@ type cloudBillingRESTClient struct { // Points back to the CallOptions field of the containing CloudBillingClient CallOptions **CloudBillingCallOptions + + logger *slog.Logger } // NewCloudBillingRESTClient creates a new cloud billing rest client. @@ -600,6 +604,7 @@ func NewCloudBillingRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -652,7 +657,7 @@ func (c *cloudBillingGRPCClient) GetBillingAccount(ctx context.Context, req *bil var resp *billingpb.BillingAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.GetBillingAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.GetBillingAccount, req, settings.GRPC, c.logger, "GetBillingAccount") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *cloudBillingGRPCClient) ListBillingAccounts(ctx context.Context, req *b } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.ListBillingAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.ListBillingAccounts, req, settings.GRPC, c.logger, "ListBillingAccounts") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *cloudBillingGRPCClient) UpdateBillingAccount(ctx context.Context, req * var resp *billingpb.BillingAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.UpdateBillingAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.UpdateBillingAccount, req, settings.GRPC, c.logger, "UpdateBillingAccount") return err }, opts...) if err != nil { @@ -734,7 +739,7 @@ func (c *cloudBillingGRPCClient) CreateBillingAccount(ctx context.Context, req * var resp *billingpb.BillingAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.CreateBillingAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.CreateBillingAccount, req, settings.GRPC, c.logger, "CreateBillingAccount") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *cloudBillingGRPCClient) ListProjectBillingInfo(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.ListProjectBillingInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.ListProjectBillingInfo, req, settings.GRPC, c.logger, "ListProjectBillingInfo") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *cloudBillingGRPCClient) GetProjectBillingInfo(ctx context.Context, req var resp *billingpb.ProjectBillingInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.GetProjectBillingInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.GetProjectBillingInfo, req, settings.GRPC, c.logger, "GetProjectBillingInfo") return err }, opts...) if err != nil { @@ -816,7 +821,7 @@ func (c *cloudBillingGRPCClient) UpdateProjectBillingInfo(ctx context.Context, r var resp *billingpb.ProjectBillingInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.UpdateProjectBillingInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.UpdateProjectBillingInfo, req, settings.GRPC, c.logger, "UpdateProjectBillingInfo") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *cloudBillingGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *cloudBillingGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *cloudBillingGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *cloudBillingGRPCClient) MoveBillingAccount(ctx context.Context, req *bi var resp *billingpb.BillingAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudBillingClient.MoveBillingAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudBillingClient.MoveBillingAccount, req, settings.GRPC, c.logger, "MoveBillingAccount") return err }, opts...) if err != nil { @@ -932,17 +937,7 @@ func (c *cloudBillingRESTClient) GetBillingAccount(ctx context.Context, req *bil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBillingAccount") if err != nil { return err } @@ -1012,21 +1007,10 @@ func (c *cloudBillingRESTClient) ListBillingAccounts(ctx context.Context, req *b } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBillingAccounts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1108,17 +1092,7 @@ func (c *cloudBillingRESTClient) UpdateBillingAccount(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBillingAccount") if err != nil { return err } @@ -1192,17 +1166,7 @@ func (c *cloudBillingRESTClient) CreateBillingAccount(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBillingAccount") if err != nil { return err } @@ -1267,21 +1231,10 @@ func (c *cloudBillingRESTClient) ListProjectBillingInfo(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProjectBillingInfo") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1348,17 +1301,7 @@ func (c *cloudBillingRESTClient) GetProjectBillingInfo(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProjectBillingInfo") if err != nil { return err } @@ -1445,17 +1388,7 @@ func (c *cloudBillingRESTClient) UpdateProjectBillingInfo(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProjectBillingInfo") if err != nil { return err } @@ -1511,17 +1444,7 @@ func (c *cloudBillingRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1581,17 +1504,7 @@ func (c *cloudBillingRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1649,17 +1562,7 @@ func (c *cloudBillingRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1715,17 +1618,7 @@ func (c *cloudBillingRESTClient) MoveBillingAccount(ctx context.Context, req *bi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveBillingAccount") if err != nil { return err } diff --git a/billing/apiv1/cloud_billing_client_example_go123_test.go b/billing/apiv1/cloud_billing_client_example_go123_test.go index c3aa6dbf7800..72a0b6d76c58 100644 --- a/billing/apiv1/cloud_billing_client_example_go123_test.go +++ b/billing/apiv1/cloud_billing_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudBillingClient_ListBillingAccounts_all() { } for resp, err := range c.ListBillingAccounts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleCloudBillingClient_ListProjectBillingInfo_all() { } for resp, err := range c.ListProjectBillingInfo(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/billing/apiv1/cloud_catalog_client.go b/billing/apiv1/cloud_catalog_client.go index 8c30f367f166..bb03ca8a4122 100755 --- a/billing/apiv1/cloud_catalog_client.go +++ b/billing/apiv1/cloud_catalog_client.go @@ -19,7 +19,7 @@ package billing import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( billingpb "cloud.google.com/go/billing/apiv1/billingpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -154,6 +153,8 @@ type cloudCatalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudCatalogClient creates a new cloud catalog client based on gRPC. @@ -182,6 +183,7 @@ func NewCloudCatalogClient(ctx context.Context, opts ...option.ClientOption) (*C connPool: connPool, cloudCatalogClient: billingpb.NewCloudCatalogClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -228,6 +230,8 @@ type cloudCatalogRESTClient struct { // Points back to the CallOptions field of the containing CloudCatalogClient CallOptions **CloudCatalogCallOptions + + logger *slog.Logger } // NewCloudCatalogRESTClient creates a new cloud catalog rest client. @@ -247,6 +251,7 @@ func NewCloudCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -307,7 +312,7 @@ func (c *cloudCatalogGRPCClient) ListServices(ctx context.Context, req *billingp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudCatalogClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudCatalogClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -353,7 +358,7 @@ func (c *cloudCatalogGRPCClient) ListSkus(ctx context.Context, req *billingpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudCatalogClient.ListSkus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudCatalogClient.ListSkus, req, settings.GRPC, c.logger, "ListSkus") return err }, opts...) if err != nil { @@ -424,21 +429,10 @@ func (c *cloudCatalogRESTClient) ListServices(ctx context.Context, req *billingp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -530,21 +524,10 @@ func (c *cloudCatalogRESTClient) ListSkus(ctx context.Context, req *billingpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSkus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/billing/apiv1/cloud_catalog_client_example_go123_test.go b/billing/apiv1/cloud_catalog_client_example_go123_test.go index 0c32daf0ed43..a749f86cd412 100644 --- a/billing/apiv1/cloud_catalog_client_example_go123_test.go +++ b/billing/apiv1/cloud_catalog_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudCatalogClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleCloudCatalogClient_ListSkus_all() { } for resp, err := range c.ListSkus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/billing/apiv1/helpers.go b/billing/apiv1/helpers.go index bf84c429afb4..319fd3efdfaf 100755 --- a/billing/apiv1/helpers.go +++ b/billing/apiv1/helpers.go @@ -18,10 +18,20 @@ package billing import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudbilling.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/billing/budgets/apiv1/budget_client.go b/billing/budgets/apiv1/budget_client.go index 4198c90e9474..b50654b8be17 100755 --- a/billing/budgets/apiv1/budget_client.go +++ b/billing/budgets/apiv1/budget_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( budgetspb "cloud.google.com/go/billing/budgets/apiv1/budgetspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -286,6 +285,8 @@ type budgetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBudgetClient creates a new budget service client based on gRPC. @@ -313,6 +314,7 @@ func NewBudgetClient(ctx context.Context, opts ...option.ClientOption) (*BudgetC connPool: connPool, budgetClient: budgetspb.NewBudgetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -359,6 +361,8 @@ type budgetRESTClient struct { // Points back to the CallOptions field of the containing BudgetClient CallOptions **BudgetCallOptions + + logger *slog.Logger } // NewBudgetRESTClient creates a new budget service rest client. @@ -377,6 +381,7 @@ func NewBudgetRESTClient(ctx context.Context, opts ...option.ClientOption) (*Bud endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -429,7 +434,7 @@ func (c *budgetGRPCClient) CreateBudget(ctx context.Context, req *budgetspb.Crea var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.CreateBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.CreateBudget, req, settings.GRPC, c.logger, "CreateBudget") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *budgetGRPCClient) UpdateBudget(ctx context.Context, req *budgetspb.Upda var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.UpdateBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.UpdateBudget, req, settings.GRPC, c.logger, "UpdateBudget") return err }, opts...) if err != nil { @@ -465,7 +470,7 @@ func (c *budgetGRPCClient) GetBudget(ctx context.Context, req *budgetspb.GetBudg var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.GetBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.GetBudget, req, settings.GRPC, c.logger, "GetBudget") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *budgetGRPCClient) ListBudgets(ctx context.Context, req *budgetspb.ListB } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.ListBudgets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.ListBudgets, req, settings.GRPC, c.logger, "ListBudgets") return err }, opts...) if err != nil { @@ -528,7 +533,7 @@ func (c *budgetGRPCClient) DeleteBudget(ctx context.Context, req *budgetspb.Dele opts = append((*c.CallOptions).DeleteBudget[0:len((*c.CallOptions).DeleteBudget):len((*c.CallOptions).DeleteBudget)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.budgetClient.DeleteBudget(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.budgetClient.DeleteBudget, req, settings.GRPC, c.logger, "DeleteBudget") return err }, opts...) return err @@ -576,17 +581,7 @@ func (c *budgetRESTClient) CreateBudget(ctx context.Context, req *budgetspb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBudget") if err != nil { return err } @@ -654,17 +649,7 @@ func (c *budgetRESTClient) UpdateBudget(ctx context.Context, req *budgetspb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBudget") if err != nil { return err } @@ -719,17 +704,7 @@ func (c *budgetRESTClient) GetBudget(ctx context.Context, req *budgetspb.GetBudg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBudget") if err != nil { return err } @@ -799,21 +774,10 @@ func (c *budgetRESTClient) ListBudgets(ctx context.Context, req *budgetspb.ListB } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBudgets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -873,14 +837,7 @@ func (c *budgetRESTClient) DeleteBudget(ctx context.Context, req *budgetspb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBudget") + return err }, opts...) } diff --git a/billing/budgets/apiv1/budget_client_example_go123_test.go b/billing/budgets/apiv1/budget_client_example_go123_test.go index 19a28f0e3d6f..46e10a9d1923 100644 --- a/billing/budgets/apiv1/budget_client_example_go123_test.go +++ b/billing/budgets/apiv1/budget_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBudgetClient_ListBudgets_all() { } for resp, err := range c.ListBudgets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/billing/budgets/apiv1/budgetspb/budget_model.pb.go b/billing/budgets/apiv1/budgetspb/budget_model.pb.go index de2cbbeee2fc..67397e049b18 100755 --- a/billing/budgets/apiv1/budgetspb/budget_model.pb.go +++ b/billing/budgets/apiv1/budgetspb/budget_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/budgets/v1/budget_model.proto @@ -266,11 +266,9 @@ type Budget struct { func (x *Budget) Reset() { *x = Budget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Budget) String() string { @@ -281,7 +279,7 @@ func (*Budget) ProtoMessage() {} func (x *Budget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +360,9 @@ type BudgetAmount struct { func (x *BudgetAmount) Reset() { *x = BudgetAmount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BudgetAmount) String() string { @@ -377,7 +373,7 @@ func (*BudgetAmount) ProtoMessage() {} func (x *BudgetAmount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +450,9 @@ type LastPeriodAmount struct { func (x *LastPeriodAmount) Reset() { *x = LastPeriodAmount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LastPeriodAmount) String() string { @@ -469,7 +463,7 @@ func (*LastPeriodAmount) ProtoMessage() {} func (x *LastPeriodAmount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +516,9 @@ type ThresholdRule struct { func (x *ThresholdRule) Reset() { *x = ThresholdRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThresholdRule) String() string { @@ -537,7 +529,7 @@ func (*ThresholdRule) ProtoMessage() {} func (x *ThresholdRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +639,9 @@ type NotificationsRule struct { func (x *NotificationsRule) Reset() { *x = NotificationsRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationsRule) String() string { @@ -662,7 +652,7 @@ func (*NotificationsRule) ProtoMessage() {} func (x *NotificationsRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +771,9 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -796,7 +784,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -921,11 +909,9 @@ type CustomPeriod struct { func (x *CustomPeriod) Reset() { *x = CustomPeriod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomPeriod) String() string { @@ -936,7 +922,7 @@ func (*CustomPeriod) ProtoMessage() {} func (x *CustomPeriod) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1199,92 +1185,6 @@ func file_google_cloud_billing_budgets_v1_budget_model_proto_init() { if File_google_cloud_billing_budgets_v1_budget_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Budget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BudgetAmount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LastPeriodAmount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ThresholdRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NotificationsRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CustomPeriod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_billing_budgets_v1_budget_model_proto_msgTypes[1].OneofWrappers = []any{ (*BudgetAmount_SpecifiedAmount)(nil), (*BudgetAmount_LastPeriodAmount)(nil), diff --git a/billing/budgets/apiv1/budgetspb/budget_service.pb.go b/billing/budgets/apiv1/budgetspb/budget_service.pb.go index 66b9d157c02c..34ad6bda35e0 100755 --- a/billing/budgets/apiv1/budgetspb/budget_service.pb.go +++ b/billing/budgets/apiv1/budgetspb/budget_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/budgets/v1/budget_service.proto @@ -57,11 +57,9 @@ type CreateBudgetRequest struct { func (x *CreateBudgetRequest) Reset() { *x = CreateBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBudgetRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateBudgetRequest) ProtoMessage() {} func (x *CreateBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,11 +119,9 @@ type UpdateBudgetRequest struct { func (x *UpdateBudgetRequest) Reset() { *x = UpdateBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBudgetRequest) String() string { @@ -136,7 +132,7 @@ func (*UpdateBudgetRequest) ProtoMessage() {} func (x *UpdateBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type GetBudgetRequest struct { func (x *GetBudgetRequest) Reset() { *x = GetBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBudgetRequest) String() string { @@ -193,7 +187,7 @@ func (*GetBudgetRequest) ProtoMessage() {} func (x *GetBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type ListBudgetsRequest struct { func (x *ListBudgetsRequest) Reset() { *x = ListBudgetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBudgetsRequest) String() string { @@ -257,7 +249,7 @@ func (*ListBudgetsRequest) ProtoMessage() {} func (x *ListBudgetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +307,9 @@ type ListBudgetsResponse struct { func (x *ListBudgetsResponse) Reset() { *x = ListBudgetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBudgetsResponse) String() string { @@ -330,7 +320,7 @@ func (*ListBudgetsResponse) ProtoMessage() {} func (x *ListBudgetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +362,9 @@ type DeleteBudgetRequest struct { func (x *DeleteBudgetRequest) Reset() { *x = DeleteBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBudgetRequest) String() string { @@ -387,7 +375,7 @@ func (*DeleteBudgetRequest) ProtoMessage() {} func (x *DeleteBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,80 +597,6 @@ func file_google_cloud_billing_budgets_v1_budget_service_proto_init() { return } file_google_cloud_billing_budgets_v1_budget_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBudgetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBudgetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1_budget_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/billing/budgets/apiv1/helpers.go b/billing/budgets/apiv1/helpers.go index 428de474ec50..3c9e9de49bc3 100755 --- a/billing/budgets/apiv1/helpers.go +++ b/billing/budgets/apiv1/helpers.go @@ -18,10 +18,20 @@ package budgets import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "billingbudgets.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/billing/budgets/apiv1beta1/budget_client.go b/billing/budgets/apiv1beta1/budget_client.go index dd88f2f11edf..61ba8981b5c6 100755 --- a/billing/budgets/apiv1beta1/budget_client.go +++ b/billing/budgets/apiv1beta1/budget_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( budgetspb "cloud.google.com/go/billing/budgets/apiv1beta1/budgetspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -286,6 +285,8 @@ type budgetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBudgetClient creates a new budget service client based on gRPC. @@ -313,6 +314,7 @@ func NewBudgetClient(ctx context.Context, opts ...option.ClientOption) (*BudgetC connPool: connPool, budgetClient: budgetspb.NewBudgetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -359,6 +361,8 @@ type budgetRESTClient struct { // Points back to the CallOptions field of the containing BudgetClient CallOptions **BudgetCallOptions + + logger *slog.Logger } // NewBudgetRESTClient creates a new budget service rest client. @@ -377,6 +381,7 @@ func NewBudgetRESTClient(ctx context.Context, opts ...option.ClientOption) (*Bud endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -429,7 +434,7 @@ func (c *budgetGRPCClient) CreateBudget(ctx context.Context, req *budgetspb.Crea var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.CreateBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.CreateBudget, req, settings.GRPC, c.logger, "CreateBudget") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *budgetGRPCClient) UpdateBudget(ctx context.Context, req *budgetspb.Upda var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.UpdateBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.UpdateBudget, req, settings.GRPC, c.logger, "UpdateBudget") return err }, opts...) if err != nil { @@ -465,7 +470,7 @@ func (c *budgetGRPCClient) GetBudget(ctx context.Context, req *budgetspb.GetBudg var resp *budgetspb.Budget err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.GetBudget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.GetBudget, req, settings.GRPC, c.logger, "GetBudget") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *budgetGRPCClient) ListBudgets(ctx context.Context, req *budgetspb.ListB } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.budgetClient.ListBudgets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.budgetClient.ListBudgets, req, settings.GRPC, c.logger, "ListBudgets") return err }, opts...) if err != nil { @@ -528,7 +533,7 @@ func (c *budgetGRPCClient) DeleteBudget(ctx context.Context, req *budgetspb.Dele opts = append((*c.CallOptions).DeleteBudget[0:len((*c.CallOptions).DeleteBudget):len((*c.CallOptions).DeleteBudget)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.budgetClient.DeleteBudget(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.budgetClient.DeleteBudget, req, settings.GRPC, c.logger, "DeleteBudget") return err }, opts...) return err @@ -575,17 +580,7 @@ func (c *budgetRESTClient) CreateBudget(ctx context.Context, req *budgetspb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBudget") if err != nil { return err } @@ -645,17 +640,7 @@ func (c *budgetRESTClient) UpdateBudget(ctx context.Context, req *budgetspb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBudget") if err != nil { return err } @@ -710,17 +695,7 @@ func (c *budgetRESTClient) GetBudget(ctx context.Context, req *budgetspb.GetBudg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBudget") if err != nil { return err } @@ -790,21 +765,10 @@ func (c *budgetRESTClient) ListBudgets(ctx context.Context, req *budgetspb.ListB } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBudgets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -864,14 +828,7 @@ func (c *budgetRESTClient) DeleteBudget(ctx context.Context, req *budgetspb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBudget") + return err }, opts...) } diff --git a/billing/budgets/apiv1beta1/budget_client_example_go123_test.go b/billing/budgets/apiv1beta1/budget_client_example_go123_test.go index 0a3fae03412a..a3fdeaab5454 100644 --- a/billing/budgets/apiv1beta1/budget_client_example_go123_test.go +++ b/billing/budgets/apiv1beta1/budget_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBudgetClient_ListBudgets_all() { } for resp, err := range c.ListBudgets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go b/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go index 1e546894f1a4..b972f1846b1f 100755 --- a/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go +++ b/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/budgets/v1beta1/budget_model.proto @@ -266,11 +266,9 @@ type Budget struct { func (x *Budget) Reset() { *x = Budget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Budget) String() string { @@ -281,7 +279,7 @@ func (*Budget) ProtoMessage() {} func (x *Budget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +360,9 @@ type BudgetAmount struct { func (x *BudgetAmount) Reset() { *x = BudgetAmount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BudgetAmount) String() string { @@ -377,7 +373,7 @@ func (*BudgetAmount) ProtoMessage() {} func (x *BudgetAmount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +452,9 @@ type LastPeriodAmount struct { func (x *LastPeriodAmount) Reset() { *x = LastPeriodAmount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LastPeriodAmount) String() string { @@ -471,7 +465,7 @@ func (*LastPeriodAmount) ProtoMessage() {} func (x *LastPeriodAmount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +518,9 @@ type ThresholdRule struct { func (x *ThresholdRule) Reset() { *x = ThresholdRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThresholdRule) String() string { @@ -539,7 +531,7 @@ func (*ThresholdRule) ProtoMessage() {} func (x *ThresholdRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +612,9 @@ type AllUpdatesRule struct { func (x *AllUpdatesRule) Reset() { *x = AllUpdatesRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllUpdatesRule) String() string { @@ -635,7 +625,7 @@ func (*AllUpdatesRule) ProtoMessage() {} func (x *AllUpdatesRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +744,9 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -769,7 +757,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +882,9 @@ type CustomPeriod struct { func (x *CustomPeriod) Reset() { *x = CustomPeriod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomPeriod) String() string { @@ -909,7 +895,7 @@ func (*CustomPeriod) ProtoMessage() {} func (x *CustomPeriod) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,92 +1160,6 @@ func file_google_cloud_billing_budgets_v1beta1_budget_model_proto_init() { if File_google_cloud_billing_budgets_v1beta1_budget_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Budget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BudgetAmount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LastPeriodAmount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ThresholdRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AllUpdatesRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CustomPeriod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1].OneofWrappers = []any{ (*BudgetAmount_SpecifiedAmount)(nil), (*BudgetAmount_LastPeriodAmount)(nil), diff --git a/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go b/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go index 1ef2afac60c1..1faa5c435e44 100755 --- a/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go +++ b/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/billing/budgets/v1beta1/budget_service.proto @@ -57,11 +57,9 @@ type CreateBudgetRequest struct { func (x *CreateBudgetRequest) Reset() { *x = CreateBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBudgetRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateBudgetRequest) ProtoMessage() {} func (x *CreateBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,11 +119,9 @@ type UpdateBudgetRequest struct { func (x *UpdateBudgetRequest) Reset() { *x = UpdateBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBudgetRequest) String() string { @@ -136,7 +132,7 @@ func (*UpdateBudgetRequest) ProtoMessage() {} func (x *UpdateBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type GetBudgetRequest struct { func (x *GetBudgetRequest) Reset() { *x = GetBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBudgetRequest) String() string { @@ -193,7 +187,7 @@ func (*GetBudgetRequest) ProtoMessage() {} func (x *GetBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type ListBudgetsRequest struct { func (x *ListBudgetsRequest) Reset() { *x = ListBudgetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBudgetsRequest) String() string { @@ -257,7 +249,7 @@ func (*ListBudgetsRequest) ProtoMessage() {} func (x *ListBudgetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +307,9 @@ type ListBudgetsResponse struct { func (x *ListBudgetsResponse) Reset() { *x = ListBudgetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBudgetsResponse) String() string { @@ -330,7 +320,7 @@ func (*ListBudgetsResponse) ProtoMessage() {} func (x *ListBudgetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +362,9 @@ type DeleteBudgetRequest struct { func (x *DeleteBudgetRequest) Reset() { *x = DeleteBudgetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBudgetRequest) String() string { @@ -387,7 +375,7 @@ func (*DeleteBudgetRequest) ProtoMessage() {} func (x *DeleteBudgetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,80 +599,6 @@ func file_google_cloud_billing_budgets_v1beta1_budget_service_proto_init() { return } file_google_cloud_billing_budgets_v1beta1_budget_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBudgetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBudgetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBudgetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/billing/budgets/apiv1beta1/helpers.go b/billing/budgets/apiv1beta1/helpers.go index 428de474ec50..3c9e9de49bc3 100755 --- a/billing/budgets/apiv1beta1/helpers.go +++ b/billing/budgets/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package budgets import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "billingbudgets.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/binaryauthorization/apiv1/binaryauthorizationpb/resources.pb.go b/binaryauthorization/apiv1/binaryauthorizationpb/resources.pb.go index 2438c68ced90..09205a8f0fcc 100755 --- a/binaryauthorization/apiv1/binaryauthorizationpb/resources.pb.go +++ b/binaryauthorization/apiv1/binaryauthorizationpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/binaryauthorization/v1/resources.proto @@ -357,11 +357,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -372,7 +370,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +471,9 @@ type AdmissionWhitelistPattern struct { func (x *AdmissionWhitelistPattern) Reset() { *x = AdmissionWhitelistPattern{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdmissionWhitelistPattern) String() string { @@ -488,7 +484,7 @@ func (*AdmissionWhitelistPattern) ProtoMessage() {} func (x *AdmissionWhitelistPattern) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +535,9 @@ type AdmissionRule struct { func (x *AdmissionRule) Reset() { *x = AdmissionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdmissionRule) String() string { @@ -554,7 +548,7 @@ func (*AdmissionRule) ProtoMessage() {} func (x *AdmissionRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +608,9 @@ type Attestor struct { func (x *Attestor) Reset() { *x = Attestor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attestor) String() string { @@ -629,7 +621,7 @@ func (*Attestor) ProtoMessage() {} func (x *Attestor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +722,9 @@ type UserOwnedGrafeasNote struct { func (x *UserOwnedGrafeasNote) Reset() { *x = UserOwnedGrafeasNote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserOwnedGrafeasNote) String() string { @@ -745,7 +735,7 @@ func (*UserOwnedGrafeasNote) ProtoMessage() {} func (x *UserOwnedGrafeasNote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +793,9 @@ type PkixPublicKey struct { func (x *PkixPublicKey) Reset() { *x = PkixPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PkixPublicKey) String() string { @@ -818,7 +806,7 @@ func (*PkixPublicKey) ProtoMessage() {} func (x *PkixPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +861,9 @@ type AttestorPublicKey struct { func (x *AttestorPublicKey) Reset() { *x = AttestorPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttestorPublicKey) String() string { @@ -888,7 +874,7 @@ func (*AttestorPublicKey) ProtoMessage() {} func (x *AttestorPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,92 +1303,6 @@ func file_google_cloud_binaryauthorization_v1_resources_proto_init() { if File_google_cloud_binaryauthorization_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AdmissionWhitelistPattern); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdmissionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Attestor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UserOwnedGrafeasNote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PkixPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AttestorPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_binaryauthorization_v1_resources_proto_msgTypes[3].OneofWrappers = []any{ (*Attestor_UserOwnedGrafeasNote)(nil), } diff --git a/binaryauthorization/apiv1/binaryauthorizationpb/service.pb.go b/binaryauthorization/apiv1/binaryauthorizationpb/service.pb.go index cfb325f35b69..324af44baf41 100755 --- a/binaryauthorization/apiv1/binaryauthorizationpb/service.pb.go +++ b/binaryauthorization/apiv1/binaryauthorizationpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/binaryauthorization/v1/service.proto @@ -108,11 +108,9 @@ type GetPolicyRequest struct { func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyRequest) String() string { @@ -123,7 +121,7 @@ func (*GetPolicyRequest) ProtoMessage() {} func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type UpdatePolicyRequest struct { func (x *UpdatePolicyRequest) Reset() { *x = UpdatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyRequest) String() string { @@ -174,7 +170,7 @@ func (*UpdatePolicyRequest) ProtoMessage() {} func (x *UpdatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type CreateAttestorRequest struct { func (x *CreateAttestorRequest) Reset() { *x = CreateAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAttestorRequest) String() string { @@ -229,7 +223,7 @@ func (*CreateAttestorRequest) ProtoMessage() {} func (x *CreateAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +272,9 @@ type GetAttestorRequest struct { func (x *GetAttestorRequest) Reset() { *x = GetAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttestorRequest) String() string { @@ -293,7 +285,7 @@ func (*GetAttestorRequest) ProtoMessage() {} func (x *GetAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +321,9 @@ type UpdateAttestorRequest struct { func (x *UpdateAttestorRequest) Reset() { *x = UpdateAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttestorRequest) String() string { @@ -344,7 +334,7 @@ func (*UpdateAttestorRequest) ProtoMessage() {} func (x *UpdateAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +376,9 @@ type ListAttestorsRequest struct { func (x *ListAttestorsRequest) Reset() { *x = ListAttestorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttestorsRequest) String() string { @@ -401,7 +389,7 @@ func (*ListAttestorsRequest) ProtoMessage() {} func (x *ListAttestorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +441,9 @@ type ListAttestorsResponse struct { func (x *ListAttestorsResponse) Reset() { *x = ListAttestorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttestorsResponse) String() string { @@ -468,7 +454,7 @@ func (*ListAttestorsResponse) ProtoMessage() {} func (x *ListAttestorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +496,9 @@ type DeleteAttestorRequest struct { func (x *DeleteAttestorRequest) Reset() { *x = DeleteAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAttestorRequest) String() string { @@ -525,7 +509,7 @@ func (*DeleteAttestorRequest) ProtoMessage() {} func (x *DeleteAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +544,9 @@ type GetSystemPolicyRequest struct { func (x *GetSystemPolicyRequest) Reset() { *x = GetSystemPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSystemPolicyRequest) String() string { @@ -575,7 +557,7 @@ func (*GetSystemPolicyRequest) ProtoMessage() {} func (x *GetSystemPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +605,9 @@ type ValidateAttestationOccurrenceRequest struct { func (x *ValidateAttestationOccurrenceRequest) Reset() { *x = ValidateAttestationOccurrenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAttestationOccurrenceRequest) String() string { @@ -638,7 +618,7 @@ func (*ValidateAttestationOccurrenceRequest) ProtoMessage() {} func (x *ValidateAttestationOccurrenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +676,9 @@ type ValidateAttestationOccurrenceResponse struct { func (x *ValidateAttestationOccurrenceResponse) Reset() { *x = ValidateAttestationOccurrenceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAttestationOccurrenceResponse) String() string { @@ -711,7 +689,7 @@ func (*ValidateAttestationOccurrenceResponse) ProtoMessage() {} func (x *ValidateAttestationOccurrenceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,140 +1060,6 @@ func file_google_cloud_binaryauthorization_v1_service_proto_init() { return } file_google_cloud_binaryauthorization_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAttestorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAttestorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetSystemPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAttestationOccurrenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAttestationOccurrenceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/binaryauthorization/apiv1/binauthz_management_client.go b/binaryauthorization/apiv1/binauthz_management_client.go index ac34f0bfee99..33c6b35b83cd 100755 --- a/binaryauthorization/apiv1/binauthz_management_client.go +++ b/binaryauthorization/apiv1/binauthz_management_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( binaryauthorizationpb "cloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -357,6 +356,8 @@ type binauthzManagementGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBinauthzManagementClient creates a new binauthz management service v1 client based on gRPC. @@ -390,6 +391,7 @@ func NewBinauthzManagementClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, binauthzManagementClient: binaryauthorizationpb.NewBinauthzManagementServiceV1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -436,6 +438,8 @@ type binauthzManagementRESTClient struct { // Points back to the CallOptions field of the containing BinauthzManagementClient CallOptions **BinauthzManagementCallOptions + + logger *slog.Logger } // NewBinauthzManagementRESTClient creates a new binauthz management service v1 rest client. @@ -460,6 +464,7 @@ func NewBinauthzManagementRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -512,7 +517,7 @@ func (c *binauthzManagementGRPCClient) GetPolicy(ctx context.Context, req *binar var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.GetPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.GetPolicy, req, settings.GRPC, c.logger, "GetPolicy") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *binauthzManagementGRPCClient) UpdatePolicy(ctx context.Context, req *bi var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.UpdatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.UpdatePolicy, req, settings.GRPC, c.logger, "UpdatePolicy") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *binauthzManagementGRPCClient) CreateAttestor(ctx context.Context, req * var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.CreateAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.CreateAttestor, req, settings.GRPC, c.logger, "CreateAttestor") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *binauthzManagementGRPCClient) GetAttestor(ctx context.Context, req *bin var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.GetAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.GetAttestor, req, settings.GRPC, c.logger, "GetAttestor") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *binauthzManagementGRPCClient) UpdateAttestor(ctx context.Context, req * var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.UpdateAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.UpdateAttestor, req, settings.GRPC, c.logger, "UpdateAttestor") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *binauthzManagementGRPCClient) ListAttestors(ctx context.Context, req *b } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementClient.ListAttestors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementClient.ListAttestors, req, settings.GRPC, c.logger, "ListAttestors") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *binauthzManagementGRPCClient) DeleteAttestor(ctx context.Context, req * opts = append((*c.CallOptions).DeleteAttestor[0:len((*c.CallOptions).DeleteAttestor):len((*c.CallOptions).DeleteAttestor)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.binauthzManagementClient.DeleteAttestor(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.binauthzManagementClient.DeleteAttestor, req, settings.GRPC, c.logger, "DeleteAttestor") return err }, opts...) return err @@ -692,17 +697,7 @@ func (c *binauthzManagementRESTClient) GetPolicy(ctx context.Context, req *binar httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicy") if err != nil { return err } @@ -763,17 +758,7 @@ func (c *binauthzManagementRESTClient) UpdatePolicy(ctx context.Context, req *bi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicy") if err != nil { return err } @@ -834,17 +819,7 @@ func (c *binauthzManagementRESTClient) CreateAttestor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAttestor") if err != nil { return err } @@ -895,17 +870,7 @@ func (c *binauthzManagementRESTClient) GetAttestor(ctx context.Context, req *bin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttestor") if err != nil { return err } @@ -963,17 +928,7 @@ func (c *binauthzManagementRESTClient) UpdateAttestor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttestor") if err != nil { return err } @@ -1036,21 +991,10 @@ func (c *binauthzManagementRESTClient) ListAttestors(ctx context.Context, req *b } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttestors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1111,14 +1055,7 @@ func (c *binauthzManagementRESTClient) DeleteAttestor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAttestor") + return err }, opts...) } diff --git a/binaryauthorization/apiv1/binauthz_management_client_example_go123_test.go b/binaryauthorization/apiv1/binauthz_management_client_example_go123_test.go index 6cb7e05c5182..251353863623 100644 --- a/binaryauthorization/apiv1/binauthz_management_client_example_go123_test.go +++ b/binaryauthorization/apiv1/binauthz_management_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBinauthzManagementClient_ListAttestors_all() { } for resp, err := range c.ListAttestors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/binaryauthorization/apiv1/helpers.go b/binaryauthorization/apiv1/helpers.go index 3fd1cf5203a7..7026874ad16f 100755 --- a/binaryauthorization/apiv1/helpers.go +++ b/binaryauthorization/apiv1/helpers.go @@ -18,10 +18,20 @@ package binaryauthorization import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "binaryauthorization.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/binaryauthorization/apiv1/system_policy_client.go b/binaryauthorization/apiv1/system_policy_client.go index 558838394ddf..2e4d6e1e8eb7 100755 --- a/binaryauthorization/apiv1/system_policy_client.go +++ b/binaryauthorization/apiv1/system_policy_client.go @@ -19,14 +19,13 @@ package binaryauthorization import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" binaryauthorizationpb "cloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -132,6 +131,8 @@ type systemPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSystemPolicyClient creates a new system policy v1 client based on gRPC. @@ -158,6 +159,7 @@ func NewSystemPolicyClient(ctx context.Context, opts ...option.ClientOption) (*S connPool: connPool, systemPolicyClient: binaryauthorizationpb.NewSystemPolicyV1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -204,6 +206,8 @@ type systemPolicyRESTClient struct { // Points back to the CallOptions field of the containing SystemPolicyClient CallOptions **SystemPolicyCallOptions + + logger *slog.Logger } // NewSystemPolicyRESTClient creates a new system policy v1 rest client. @@ -221,6 +225,7 @@ func NewSystemPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -273,7 +278,7 @@ func (c *systemPolicyGRPCClient) GetSystemPolicy(ctx context.Context, req *binar var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.systemPolicyClient.GetSystemPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.systemPolicyClient.GetSystemPolicy, req, settings.GRPC, c.logger, "GetSystemPolicy") return err }, opts...) if err != nil { @@ -315,17 +320,7 @@ func (c *systemPolicyRESTClient) GetSystemPolicy(ctx context.Context, req *binar httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSystemPolicy") if err != nil { return err } diff --git a/binaryauthorization/apiv1/validation_helper_client.go b/binaryauthorization/apiv1/validation_helper_client.go index b73e0217e8af..b498978fb281 100755 --- a/binaryauthorization/apiv1/validation_helper_client.go +++ b/binaryauthorization/apiv1/validation_helper_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" binaryauthorizationpb "cloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -134,6 +133,8 @@ type validationHelperGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewValidationHelperClient creates a new validation helper v1 client based on gRPC. @@ -160,6 +161,7 @@ func NewValidationHelperClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, validationHelperClient: binaryauthorizationpb.NewValidationHelperV1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -206,6 +208,8 @@ type validationHelperRESTClient struct { // Points back to the CallOptions field of the containing ValidationHelperClient CallOptions **ValidationHelperCallOptions + + logger *slog.Logger } // NewValidationHelperRESTClient creates a new validation helper v1 rest client. @@ -223,6 +227,7 @@ func NewValidationHelperRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -275,7 +280,7 @@ func (c *validationHelperGRPCClient) ValidateAttestationOccurrence(ctx context.C var resp *binaryauthorizationpb.ValidateAttestationOccurrenceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.validationHelperClient.ValidateAttestationOccurrence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.validationHelperClient.ValidateAttestationOccurrence, req, settings.GRPC, c.logger, "ValidateAttestationOccurrence") return err }, opts...) if err != nil { @@ -324,17 +329,7 @@ func (c *validationHelperRESTClient) ValidateAttestationOccurrence(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateAttestationOccurrence") if err != nil { return err } diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go index a91921214152..5a6b3e612e22 100755 --- a/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto @@ -264,11 +264,9 @@ type ContinuousValidationEvent struct { func (x *ContinuousValidationEvent) Reset() { *x = ContinuousValidationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent) String() string { @@ -279,7 +277,7 @@ func (*ContinuousValidationEvent) ProtoMessage() {} func (x *ContinuousValidationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +355,9 @@ type ContinuousValidationEvent_ContinuousValidationPodEvent struct { func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) Reset() { *x = ContinuousValidationEvent_ContinuousValidationPodEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) String() string { @@ -372,7 +368,7 @@ func (*ContinuousValidationEvent_ContinuousValidationPodEvent) ProtoMessage() {} func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +445,9 @@ type ContinuousValidationEvent_ConfigErrorEvent struct { func (x *ContinuousValidationEvent_ConfigErrorEvent) Reset() { *x = ContinuousValidationEvent_ConfigErrorEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent_ConfigErrorEvent) String() string { @@ -464,7 +458,7 @@ func (*ContinuousValidationEvent_ConfigErrorEvent) ProtoMessage() {} func (x *ContinuousValidationEvent_ConfigErrorEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +502,9 @@ type ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails struct func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) Reset() { *x = ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) String() string { @@ -523,7 +515,7 @@ func (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) Prot func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +597,9 @@ type ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckRe func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult) Reset() { *x = ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult) String() string { @@ -621,7 +611,7 @@ func (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_Check func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +697,9 @@ type ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckRe func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope) Reset() { *x = ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope) String() string { @@ -723,7 +711,7 @@ func (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_Check func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,80 +1016,6 @@ func file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging if File_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent_ConfigErrorEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0].OneofWrappers = []any{ (*ContinuousValidationEvent_PodEvent)(nil), (*ContinuousValidationEvent_ConfigErrorEvent_)(nil), diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go index df57a84cb740..d6c1daff8851 100755 --- a/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/binaryauthorization/v1beta1/resources.proto @@ -358,11 +358,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -373,7 +371,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +475,9 @@ type AdmissionWhitelistPattern struct { func (x *AdmissionWhitelistPattern) Reset() { *x = AdmissionWhitelistPattern{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdmissionWhitelistPattern) String() string { @@ -492,7 +488,7 @@ func (*AdmissionWhitelistPattern) ProtoMessage() {} func (x *AdmissionWhitelistPattern) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +539,9 @@ type AdmissionRule struct { func (x *AdmissionRule) Reset() { *x = AdmissionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdmissionRule) String() string { @@ -558,7 +552,7 @@ func (*AdmissionRule) ProtoMessage() {} func (x *AdmissionRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +618,9 @@ type Attestor struct { func (x *Attestor) Reset() { *x = Attestor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attestor) String() string { @@ -639,7 +631,7 @@ func (*Attestor) ProtoMessage() {} func (x *Attestor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +731,9 @@ type UserOwnedDrydockNote struct { func (x *UserOwnedDrydockNote) Reset() { *x = UserOwnedDrydockNote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserOwnedDrydockNote) String() string { @@ -754,7 +744,7 @@ func (*UserOwnedDrydockNote) ProtoMessage() {} func (x *UserOwnedDrydockNote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -812,11 +802,9 @@ type PkixPublicKey struct { func (x *PkixPublicKey) Reset() { *x = PkixPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PkixPublicKey) String() string { @@ -827,7 +815,7 @@ func (*PkixPublicKey) ProtoMessage() {} func (x *PkixPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +873,9 @@ type AttestorPublicKey struct { func (x *AttestorPublicKey) Reset() { *x = AttestorPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttestorPublicKey) String() string { @@ -900,7 +886,7 @@ func (*AttestorPublicKey) ProtoMessage() {} func (x *AttestorPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,92 +1324,6 @@ func file_google_cloud_binaryauthorization_v1beta1_resources_proto_init() { if File_google_cloud_binaryauthorization_v1beta1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AdmissionWhitelistPattern); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdmissionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Attestor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UserOwnedDrydockNote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PkixPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AttestorPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3].OneofWrappers = []any{ (*Attestor_UserOwnedDrydockNote)(nil), } diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go index 84b13807b054..b4232c36b7b2 100755 --- a/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/binaryauthorization/v1beta1/service.proto @@ -54,11 +54,9 @@ type GetPolicyRequest struct { func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyRequest) String() string { @@ -69,7 +67,7 @@ func (*GetPolicyRequest) ProtoMessage() {} func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type UpdatePolicyRequest struct { func (x *UpdatePolicyRequest) Reset() { *x = UpdatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyRequest) String() string { @@ -120,7 +116,7 @@ func (*UpdatePolicyRequest) ProtoMessage() {} func (x *UpdatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,11 +156,9 @@ type CreateAttestorRequest struct { func (x *CreateAttestorRequest) Reset() { *x = CreateAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAttestorRequest) String() string { @@ -175,7 +169,7 @@ func (*CreateAttestorRequest) ProtoMessage() {} func (x *CreateAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +218,9 @@ type GetAttestorRequest struct { func (x *GetAttestorRequest) Reset() { *x = GetAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttestorRequest) String() string { @@ -239,7 +231,7 @@ func (*GetAttestorRequest) ProtoMessage() {} func (x *GetAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +267,9 @@ type UpdateAttestorRequest struct { func (x *UpdateAttestorRequest) Reset() { *x = UpdateAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttestorRequest) String() string { @@ -290,7 +280,7 @@ func (*UpdateAttestorRequest) ProtoMessage() {} func (x *UpdateAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +322,9 @@ type ListAttestorsRequest struct { func (x *ListAttestorsRequest) Reset() { *x = ListAttestorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttestorsRequest) String() string { @@ -347,7 +335,7 @@ func (*ListAttestorsRequest) ProtoMessage() {} func (x *ListAttestorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +387,9 @@ type ListAttestorsResponse struct { func (x *ListAttestorsResponse) Reset() { *x = ListAttestorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttestorsResponse) String() string { @@ -414,7 +400,7 @@ func (*ListAttestorsResponse) ProtoMessage() {} func (x *ListAttestorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +442,9 @@ type DeleteAttestorRequest struct { func (x *DeleteAttestorRequest) Reset() { *x = DeleteAttestorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAttestorRequest) String() string { @@ -471,7 +455,7 @@ func (*DeleteAttestorRequest) ProtoMessage() {} func (x *DeleteAttestorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +490,9 @@ type GetSystemPolicyRequest struct { func (x *GetSystemPolicyRequest) Reset() { *x = GetSystemPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSystemPolicyRequest) String() string { @@ -521,7 +503,7 @@ func (*GetSystemPolicyRequest) ProtoMessage() {} func (x *GetSystemPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,116 +813,6 @@ func file_google_cloud_binaryauthorization_v1beta1_service_proto_init() { return } file_google_cloud_binaryauthorization_v1beta1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAttestorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAttestorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAttestorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetSystemPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go index 5aa42b8f4c00..bba225e3234f 100755 --- a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go +++ b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( binaryauthorizationpb "cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -357,6 +356,8 @@ type binauthzManagementServiceV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBinauthzManagementServiceV1Beta1Client creates a new binauthz management service v1 beta1 client based on gRPC. @@ -390,6 +391,7 @@ func NewBinauthzManagementServiceV1Beta1Client(ctx context.Context, opts ...opti connPool: connPool, binauthzManagementServiceV1Beta1Client: binaryauthorizationpb.NewBinauthzManagementServiceV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -436,6 +438,8 @@ type binauthzManagementServiceV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing BinauthzManagementServiceV1Beta1Client CallOptions **BinauthzManagementServiceV1Beta1CallOptions + + logger *slog.Logger } // NewBinauthzManagementServiceV1Beta1RESTClient creates a new binauthz management service v1 beta1 rest client. @@ -460,6 +464,7 @@ func NewBinauthzManagementServiceV1Beta1RESTClient(ctx context.Context, opts ... endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -512,7 +517,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) GetPolicy(ctx context.Conte var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.GetPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.GetPolicy, req, settings.GRPC, c.logger, "GetPolicy") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) UpdatePolicy(ctx context.Co var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.UpdatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.UpdatePolicy, req, settings.GRPC, c.logger, "UpdatePolicy") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) CreateAttestor(ctx context. var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.CreateAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.CreateAttestor, req, settings.GRPC, c.logger, "CreateAttestor") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) GetAttestor(ctx context.Con var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.GetAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.GetAttestor, req, settings.GRPC, c.logger, "GetAttestor") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) UpdateAttestor(ctx context. var resp *binaryauthorizationpb.Attestor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.UpdateAttestor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.UpdateAttestor, req, settings.GRPC, c.logger, "UpdateAttestor") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) ListAttestors(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.binauthzManagementServiceV1Beta1Client.ListAttestors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.ListAttestors, req, settings.GRPC, c.logger, "ListAttestors") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *binauthzManagementServiceV1Beta1GRPCClient) DeleteAttestor(ctx context. opts = append((*c.CallOptions).DeleteAttestor[0:len((*c.CallOptions).DeleteAttestor):len((*c.CallOptions).DeleteAttestor)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.binauthzManagementServiceV1Beta1Client.DeleteAttestor(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.binauthzManagementServiceV1Beta1Client.DeleteAttestor, req, settings.GRPC, c.logger, "DeleteAttestor") return err }, opts...) return err @@ -692,17 +697,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) GetPolicy(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicy") if err != nil { return err } @@ -763,17 +758,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) UpdatePolicy(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicy") if err != nil { return err } @@ -834,17 +819,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) CreateAttestor(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAttestor") if err != nil { return err } @@ -895,17 +870,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) GetAttestor(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttestor") if err != nil { return err } @@ -963,17 +928,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) UpdateAttestor(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttestor") if err != nil { return err } @@ -1036,21 +991,10 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) ListAttestors(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttestors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1111,14 +1055,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) DeleteAttestor(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAttestor") + return err }, opts...) } diff --git a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_go123_test.go b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_go123_test.go index 512bc286c602..45026032c536 100644 --- a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_go123_test.go +++ b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBinauthzManagementServiceV1Beta1Client_ListAttestors_all() { } for resp, err := range c.ListAttestors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/binaryauthorization/apiv1beta1/helpers.go b/binaryauthorization/apiv1beta1/helpers.go index 3fd1cf5203a7..7026874ad16f 100755 --- a/binaryauthorization/apiv1beta1/helpers.go +++ b/binaryauthorization/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package binaryauthorization import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "binaryauthorization.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go index d61fdda4eb1b..2e3b90671546 100755 --- a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go +++ b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go @@ -19,14 +19,13 @@ package binaryauthorization import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" binaryauthorizationpb "cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -132,6 +131,8 @@ type systemPolicyV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSystemPolicyV1Beta1Client creates a new system policy v1 beta1 client based on gRPC. @@ -158,6 +159,7 @@ func NewSystemPolicyV1Beta1Client(ctx context.Context, opts ...option.ClientOpti connPool: connPool, systemPolicyV1Beta1Client: binaryauthorizationpb.NewSystemPolicyV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -204,6 +206,8 @@ type systemPolicyV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing SystemPolicyV1Beta1Client CallOptions **SystemPolicyV1Beta1CallOptions + + logger *slog.Logger } // NewSystemPolicyV1Beta1RESTClient creates a new system policy v1 beta1 rest client. @@ -221,6 +225,7 @@ func NewSystemPolicyV1Beta1RESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -273,7 +278,7 @@ func (c *systemPolicyV1Beta1GRPCClient) GetSystemPolicy(ctx context.Context, req var resp *binaryauthorizationpb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.systemPolicyV1Beta1Client.GetSystemPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.systemPolicyV1Beta1Client.GetSystemPolicy, req, settings.GRPC, c.logger, "GetSystemPolicy") return err }, opts...) if err != nil { @@ -315,17 +320,7 @@ func (c *systemPolicyV1Beta1RESTClient) GetSystemPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSystemPolicy") if err != nil { return err } diff --git a/certificatemanager/apiv1/certificate_manager_client.go b/certificatemanager/apiv1/certificate_manager_client.go index 9500e682ed65..e1057780e7e2 100755 --- a/certificatemanager/apiv1/certificate_manager_client.go +++ b/certificatemanager/apiv1/certificate_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1241,6 +1240,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new certificate manager client based on gRPC. @@ -1296,6 +1297,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: certificatemanagerpb.NewCertificateManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1360,6 +1362,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new certificate manager rest client. @@ -1406,6 +1410,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1479,7 +1484,7 @@ func (c *gRPCClient) ListCertificates(ctx context.Context, req *certificatemanag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCertificates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCertificates, req, settings.GRPC, c.logger, "ListCertificates") return err }, opts...) if err != nil { @@ -1514,7 +1519,7 @@ func (c *gRPCClient) GetCertificate(ctx context.Context, req *certificatemanager var resp *certificatemanagerpb.Certificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCertificate, req, settings.GRPC, c.logger, "GetCertificate") return err }, opts...) if err != nil { @@ -1532,7 +1537,7 @@ func (c *gRPCClient) CreateCertificate(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCertificate, req, settings.GRPC, c.logger, "CreateCertificate") return err }, opts...) if err != nil { @@ -1552,7 +1557,7 @@ func (c *gRPCClient) UpdateCertificate(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCertificate, req, settings.GRPC, c.logger, "UpdateCertificate") return err }, opts...) if err != nil { @@ -1572,7 +1577,7 @@ func (c *gRPCClient) DeleteCertificate(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCertificate, req, settings.GRPC, c.logger, "DeleteCertificate") return err }, opts...) if err != nil { @@ -1603,7 +1608,7 @@ func (c *gRPCClient) ListCertificateMaps(ctx context.Context, req *certificatema } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCertificateMaps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCertificateMaps, req, settings.GRPC, c.logger, "ListCertificateMaps") return err }, opts...) if err != nil { @@ -1638,7 +1643,7 @@ func (c *gRPCClient) GetCertificateMap(ctx context.Context, req *certificatemana var resp *certificatemanagerpb.CertificateMap err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCertificateMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCertificateMap, req, settings.GRPC, c.logger, "GetCertificateMap") return err }, opts...) if err != nil { @@ -1656,7 +1661,7 @@ func (c *gRPCClient) CreateCertificateMap(ctx context.Context, req *certificatem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCertificateMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCertificateMap, req, settings.GRPC, c.logger, "CreateCertificateMap") return err }, opts...) if err != nil { @@ -1676,7 +1681,7 @@ func (c *gRPCClient) UpdateCertificateMap(ctx context.Context, req *certificatem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCertificateMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCertificateMap, req, settings.GRPC, c.logger, "UpdateCertificateMap") return err }, opts...) if err != nil { @@ -1696,7 +1701,7 @@ func (c *gRPCClient) DeleteCertificateMap(ctx context.Context, req *certificatem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCertificateMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCertificateMap, req, settings.GRPC, c.logger, "DeleteCertificateMap") return err }, opts...) if err != nil { @@ -1727,7 +1732,7 @@ func (c *gRPCClient) ListCertificateMapEntries(ctx context.Context, req *certifi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCertificateMapEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCertificateMapEntries, req, settings.GRPC, c.logger, "ListCertificateMapEntries") return err }, opts...) if err != nil { @@ -1762,7 +1767,7 @@ func (c *gRPCClient) GetCertificateMapEntry(ctx context.Context, req *certificat var resp *certificatemanagerpb.CertificateMapEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCertificateMapEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCertificateMapEntry, req, settings.GRPC, c.logger, "GetCertificateMapEntry") return err }, opts...) if err != nil { @@ -1780,7 +1785,7 @@ func (c *gRPCClient) CreateCertificateMapEntry(ctx context.Context, req *certifi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCertificateMapEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCertificateMapEntry, req, settings.GRPC, c.logger, "CreateCertificateMapEntry") return err }, opts...) if err != nil { @@ -1800,7 +1805,7 @@ func (c *gRPCClient) UpdateCertificateMapEntry(ctx context.Context, req *certifi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCertificateMapEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCertificateMapEntry, req, settings.GRPC, c.logger, "UpdateCertificateMapEntry") return err }, opts...) if err != nil { @@ -1820,7 +1825,7 @@ func (c *gRPCClient) DeleteCertificateMapEntry(ctx context.Context, req *certifi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCertificateMapEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCertificateMapEntry, req, settings.GRPC, c.logger, "DeleteCertificateMapEntry") return err }, opts...) if err != nil { @@ -1851,7 +1856,7 @@ func (c *gRPCClient) ListDnsAuthorizations(ctx context.Context, req *certificate } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDnsAuthorizations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDnsAuthorizations, req, settings.GRPC, c.logger, "ListDnsAuthorizations") return err }, opts...) if err != nil { @@ -1886,7 +1891,7 @@ func (c *gRPCClient) GetDnsAuthorization(ctx context.Context, req *certificatema var resp *certificatemanagerpb.DnsAuthorization err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDnsAuthorization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDnsAuthorization, req, settings.GRPC, c.logger, "GetDnsAuthorization") return err }, opts...) if err != nil { @@ -1904,7 +1909,7 @@ func (c *gRPCClient) CreateDnsAuthorization(ctx context.Context, req *certificat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDnsAuthorization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDnsAuthorization, req, settings.GRPC, c.logger, "CreateDnsAuthorization") return err }, opts...) if err != nil { @@ -1924,7 +1929,7 @@ func (c *gRPCClient) UpdateDnsAuthorization(ctx context.Context, req *certificat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDnsAuthorization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDnsAuthorization, req, settings.GRPC, c.logger, "UpdateDnsAuthorization") return err }, opts...) if err != nil { @@ -1944,7 +1949,7 @@ func (c *gRPCClient) DeleteDnsAuthorization(ctx context.Context, req *certificat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDnsAuthorization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDnsAuthorization, req, settings.GRPC, c.logger, "DeleteDnsAuthorization") return err }, opts...) if err != nil { @@ -1975,7 +1980,7 @@ func (c *gRPCClient) ListCertificateIssuanceConfigs(ctx context.Context, req *ce } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCertificateIssuanceConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCertificateIssuanceConfigs, req, settings.GRPC, c.logger, "ListCertificateIssuanceConfigs") return err }, opts...) if err != nil { @@ -2010,7 +2015,7 @@ func (c *gRPCClient) GetCertificateIssuanceConfig(ctx context.Context, req *cert var resp *certificatemanagerpb.CertificateIssuanceConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCertificateIssuanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCertificateIssuanceConfig, req, settings.GRPC, c.logger, "GetCertificateIssuanceConfig") return err }, opts...) if err != nil { @@ -2028,7 +2033,7 @@ func (c *gRPCClient) CreateCertificateIssuanceConfig(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCertificateIssuanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCertificateIssuanceConfig, req, settings.GRPC, c.logger, "CreateCertificateIssuanceConfig") return err }, opts...) if err != nil { @@ -2048,7 +2053,7 @@ func (c *gRPCClient) DeleteCertificateIssuanceConfig(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCertificateIssuanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCertificateIssuanceConfig, req, settings.GRPC, c.logger, "DeleteCertificateIssuanceConfig") return err }, opts...) if err != nil { @@ -2079,7 +2084,7 @@ func (c *gRPCClient) ListTrustConfigs(ctx context.Context, req *certificatemanag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTrustConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTrustConfigs, req, settings.GRPC, c.logger, "ListTrustConfigs") return err }, opts...) if err != nil { @@ -2114,7 +2119,7 @@ func (c *gRPCClient) GetTrustConfig(ctx context.Context, req *certificatemanager var resp *certificatemanagerpb.TrustConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTrustConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTrustConfig, req, settings.GRPC, c.logger, "GetTrustConfig") return err }, opts...) if err != nil { @@ -2132,7 +2137,7 @@ func (c *gRPCClient) CreateTrustConfig(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTrustConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTrustConfig, req, settings.GRPC, c.logger, "CreateTrustConfig") return err }, opts...) if err != nil { @@ -2152,7 +2157,7 @@ func (c *gRPCClient) UpdateTrustConfig(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTrustConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTrustConfig, req, settings.GRPC, c.logger, "UpdateTrustConfig") return err }, opts...) if err != nil { @@ -2172,7 +2177,7 @@ func (c *gRPCClient) DeleteTrustConfig(ctx context.Context, req *certificatemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTrustConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTrustConfig, req, settings.GRPC, c.logger, "DeleteTrustConfig") return err }, opts...) if err != nil { @@ -2192,7 +2197,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2221,7 +2226,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2255,7 +2260,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2269,7 +2274,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2284,7 +2289,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2313,7 +2318,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2390,21 +2395,10 @@ func (c *restClient) ListCertificates(ctx context.Context, req *certificatemanag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2467,17 +2461,7 @@ func (c *restClient) GetCertificate(ctx context.Context, req *certificatemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificate") if err != nil { return err } @@ -2534,21 +2518,10 @@ func (c *restClient) CreateCertificate(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2612,21 +2585,10 @@ func (c *restClient) UpdateCertificate(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2676,21 +2638,10 @@ func (c *restClient) DeleteCertificate(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2759,21 +2710,10 @@ func (c *restClient) ListCertificateMaps(ctx context.Context, req *certificatema } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateMaps") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2836,17 +2776,7 @@ func (c *restClient) GetCertificateMap(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateMap") if err != nil { return err } @@ -2903,21 +2833,10 @@ func (c *restClient) CreateCertificateMap(ctx context.Context, req *certificatem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificateMap") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2981,21 +2900,10 @@ func (c *restClient) UpdateCertificateMap(ctx context.Context, req *certificatem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificateMap") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3047,21 +2955,10 @@ func (c *restClient) DeleteCertificateMap(ctx context.Context, req *certificatem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificateMap") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3130,21 +3027,10 @@ func (c *restClient) ListCertificateMapEntries(ctx context.Context, req *certifi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateMapEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3207,17 +3093,7 @@ func (c *restClient) GetCertificateMapEntry(ctx context.Context, req *certificat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateMapEntry") if err != nil { return err } @@ -3274,21 +3150,10 @@ func (c *restClient) CreateCertificateMapEntry(ctx context.Context, req *certifi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificateMapEntry") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3352,21 +3217,10 @@ func (c *restClient) UpdateCertificateMapEntry(ctx context.Context, req *certifi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificateMapEntry") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3416,21 +3270,10 @@ func (c *restClient) DeleteCertificateMapEntry(ctx context.Context, req *certifi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificateMapEntry") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3499,21 +3342,10 @@ func (c *restClient) ListDnsAuthorizations(ctx context.Context, req *certificate } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDnsAuthorizations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3576,17 +3408,7 @@ func (c *restClient) GetDnsAuthorization(ctx context.Context, req *certificatema httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDnsAuthorization") if err != nil { return err } @@ -3643,21 +3465,10 @@ func (c *restClient) CreateDnsAuthorization(ctx context.Context, req *certificat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDnsAuthorization") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3721,21 +3532,10 @@ func (c *restClient) UpdateDnsAuthorization(ctx context.Context, req *certificat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDnsAuthorization") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3785,21 +3585,10 @@ func (c *restClient) DeleteDnsAuthorization(ctx context.Context, req *certificat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDnsAuthorization") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3868,21 +3657,10 @@ func (c *restClient) ListCertificateIssuanceConfigs(ctx context.Context, req *ce } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateIssuanceConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3945,17 +3723,7 @@ func (c *restClient) GetCertificateIssuanceConfig(ctx context.Context, req *cert httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateIssuanceConfig") if err != nil { return err } @@ -4012,21 +3780,10 @@ func (c *restClient) CreateCertificateIssuanceConfig(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificateIssuanceConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4076,21 +3833,10 @@ func (c *restClient) DeleteCertificateIssuanceConfig(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificateIssuanceConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4159,21 +3905,10 @@ func (c *restClient) ListTrustConfigs(ctx context.Context, req *certificatemanag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTrustConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4236,17 +3971,7 @@ func (c *restClient) GetTrustConfig(ctx context.Context, req *certificatemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTrustConfig") if err != nil { return err } @@ -4303,21 +4028,10 @@ func (c *restClient) CreateTrustConfig(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTrustConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4381,21 +4095,10 @@ func (c *restClient) UpdateTrustConfig(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTrustConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4448,21 +4151,10 @@ func (c *restClient) DeleteTrustConfig(ctx context.Context, req *certificatemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTrustConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4513,17 +4205,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4588,21 +4270,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4668,15 +4339,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4710,15 +4374,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4755,17 +4412,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4830,21 +4477,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/certificatemanager/apiv1/certificate_manager_client_example_go123_test.go b/certificatemanager/apiv1/certificate_manager_client_example_go123_test.go index b74e5589dc60..97bc783d0936 100644 --- a/certificatemanager/apiv1/certificate_manager_client_example_go123_test.go +++ b/certificatemanager/apiv1/certificate_manager_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListCertificateIssuanceConfigs_all() { } for resp, err := range c.ListCertificateIssuanceConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListCertificateMapEntries_all() { } for resp, err := range c.ListCertificateMapEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListCertificateMaps_all() { } for resp, err := range c.ListCertificateMaps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListCertificates_all() { } for resp, err := range c.ListCertificates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListDnsAuthorizations_all() { } for resp, err := range c.ListDnsAuthorizations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListTrustConfigs_all() { } for resp, err := range c.ListTrustConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/certificatemanager/apiv1/certificatemanagerpb/certificate_issuance_config.pb.go b/certificatemanager/apiv1/certificatemanagerpb/certificate_issuance_config.pb.go index 141b196f0681..61a0f46470ec 100755 --- a/certificatemanager/apiv1/certificatemanagerpb/certificate_issuance_config.pb.go +++ b/certificatemanager/apiv1/certificatemanagerpb/certificate_issuance_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/certificatemanager/v1/certificate_issuance_config.proto @@ -117,11 +117,9 @@ type ListCertificateIssuanceConfigsRequest struct { func (x *ListCertificateIssuanceConfigsRequest) Reset() { *x = ListCertificateIssuanceConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateIssuanceConfigsRequest) String() string { @@ -132,7 +130,7 @@ func (*ListCertificateIssuanceConfigsRequest) ProtoMessage() {} func (x *ListCertificateIssuanceConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type ListCertificateIssuanceConfigsResponse struct { func (x *ListCertificateIssuanceConfigsResponse) Reset() { *x = ListCertificateIssuanceConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateIssuanceConfigsResponse) String() string { @@ -215,7 +211,7 @@ func (*ListCertificateIssuanceConfigsResponse) ProtoMessage() {} func (x *ListCertificateIssuanceConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +260,9 @@ type GetCertificateIssuanceConfigRequest struct { func (x *GetCertificateIssuanceConfigRequest) Reset() { *x = GetCertificateIssuanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateIssuanceConfigRequest) String() string { @@ -279,7 +273,7 @@ func (*GetCertificateIssuanceConfigRequest) ProtoMessage() {} func (x *GetCertificateIssuanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type CreateCertificateIssuanceConfigRequest struct { func (x *CreateCertificateIssuanceConfigRequest) Reset() { *x = CreateCertificateIssuanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateIssuanceConfigRequest) String() string { @@ -333,7 +325,7 @@ func (*CreateCertificateIssuanceConfigRequest) ProtoMessage() {} func (x *CreateCertificateIssuanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +374,9 @@ type DeleteCertificateIssuanceConfigRequest struct { func (x *DeleteCertificateIssuanceConfigRequest) Reset() { *x = DeleteCertificateIssuanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateIssuanceConfigRequest) String() string { @@ -397,7 +387,7 @@ func (*DeleteCertificateIssuanceConfigRequest) ProtoMessage() {} func (x *DeleteCertificateIssuanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +442,9 @@ type CertificateIssuanceConfig struct { func (x *CertificateIssuanceConfig) Reset() { *x = CertificateIssuanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateIssuanceConfig) String() string { @@ -467,7 +455,7 @@ func (*CertificateIssuanceConfig) ProtoMessage() {} func (x *CertificateIssuanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +548,9 @@ type CertificateIssuanceConfig_CertificateAuthorityConfig struct { func (x *CertificateIssuanceConfig_CertificateAuthorityConfig) Reset() { *x = CertificateIssuanceConfig_CertificateAuthorityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateIssuanceConfig_CertificateAuthorityConfig) String() string { @@ -575,7 +561,7 @@ func (*CertificateIssuanceConfig_CertificateAuthorityConfig) ProtoMessage() {} func (x *CertificateIssuanceConfig_CertificateAuthorityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +616,9 @@ type CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthoritySe func (x *CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig) Reset() { *x = CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig) String() string { @@ -646,7 +630,7 @@ func (*CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthority func (x *CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -913,104 +897,6 @@ func file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_i if File_google_cloud_certificatemanager_v1_certificate_issuance_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateIssuanceConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateIssuanceConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateIssuanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateIssuanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateIssuanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CertificateIssuanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CertificateIssuanceConfig_CertificateAuthorityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_msgTypes[6].OneofWrappers = []any{ (*CertificateIssuanceConfig_CertificateAuthorityConfig_CertificateAuthorityServiceConfig_)(nil), } diff --git a/certificatemanager/apiv1/certificatemanagerpb/certificate_manager.pb.go b/certificatemanager/apiv1/certificatemanagerpb/certificate_manager.pb.go index 3286d63bd231..1e5ebc555495 100755 --- a/certificatemanager/apiv1/certificatemanagerpb/certificate_manager.pb.go +++ b/certificatemanager/apiv1/certificatemanagerpb/certificate_manager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/certificatemanager/v1/certificate_manager.proto @@ -525,11 +525,9 @@ type ListCertificatesRequest struct { func (x *ListCertificatesRequest) Reset() { *x = ListCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificatesRequest) String() string { @@ -540,7 +538,7 @@ func (*ListCertificatesRequest) ProtoMessage() {} func (x *ListCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +606,9 @@ type ListCertificatesResponse struct { func (x *ListCertificatesResponse) Reset() { *x = ListCertificatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificatesResponse) String() string { @@ -623,7 +619,7 @@ func (*ListCertificatesResponse) ProtoMessage() {} func (x *ListCertificatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +668,9 @@ type GetCertificateRequest struct { func (x *GetCertificateRequest) Reset() { *x = GetCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateRequest) String() string { @@ -687,7 +681,7 @@ func (*GetCertificateRequest) ProtoMessage() {} func (x *GetCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +720,9 @@ type CreateCertificateRequest struct { func (x *CreateCertificateRequest) Reset() { *x = CreateCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateRequest) String() string { @@ -741,7 +733,7 @@ func (*CreateCertificateRequest) ProtoMessage() {} func (x *CreateCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +785,9 @@ type UpdateCertificateRequest struct { func (x *UpdateCertificateRequest) Reset() { *x = UpdateCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateRequest) String() string { @@ -808,7 +798,7 @@ func (*UpdateCertificateRequest) ProtoMessage() {} func (x *UpdateCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +840,9 @@ type DeleteCertificateRequest struct { func (x *DeleteCertificateRequest) Reset() { *x = DeleteCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateRequest) String() string { @@ -865,7 +853,7 @@ func (*DeleteCertificateRequest) ProtoMessage() {} func (x *DeleteCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,11 +900,9 @@ type ListCertificateMapsRequest struct { func (x *ListCertificateMapsRequest) Reset() { *x = ListCertificateMapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateMapsRequest) String() string { @@ -927,7 +913,7 @@ func (*ListCertificateMapsRequest) ProtoMessage() {} func (x *ListCertificateMapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +981,9 @@ type ListCertificateMapsResponse struct { func (x *ListCertificateMapsResponse) Reset() { *x = ListCertificateMapsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateMapsResponse) String() string { @@ -1010,7 +994,7 @@ func (*ListCertificateMapsResponse) ProtoMessage() {} func (x *ListCertificateMapsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1043,9 @@ type GetCertificateMapRequest struct { func (x *GetCertificateMapRequest) Reset() { *x = GetCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateMapRequest) String() string { @@ -1074,7 +1056,7 @@ func (*GetCertificateMapRequest) ProtoMessage() {} func (x *GetCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1095,9 @@ type CreateCertificateMapRequest struct { func (x *CreateCertificateMapRequest) Reset() { *x = CreateCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateMapRequest) String() string { @@ -1128,7 +1108,7 @@ func (*CreateCertificateMapRequest) ProtoMessage() {} func (x *CreateCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1160,9 @@ type UpdateCertificateMapRequest struct { func (x *UpdateCertificateMapRequest) Reset() { *x = UpdateCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateMapRequest) String() string { @@ -1195,7 +1173,7 @@ func (*UpdateCertificateMapRequest) ProtoMessage() {} func (x *UpdateCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1237,11 +1215,9 @@ type DeleteCertificateMapRequest struct { func (x *DeleteCertificateMapRequest) Reset() { *x = DeleteCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateMapRequest) String() string { @@ -1252,7 +1228,7 @@ func (*DeleteCertificateMapRequest) ProtoMessage() {} func (x *DeleteCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1280,9 @@ type ListCertificateMapEntriesRequest struct { func (x *ListCertificateMapEntriesRequest) Reset() { *x = ListCertificateMapEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateMapEntriesRequest) String() string { @@ -1319,7 +1293,7 @@ func (*ListCertificateMapEntriesRequest) ProtoMessage() {} func (x *ListCertificateMapEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1387,11 +1361,9 @@ type ListCertificateMapEntriesResponse struct { func (x *ListCertificateMapEntriesResponse) Reset() { *x = ListCertificateMapEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateMapEntriesResponse) String() string { @@ -1402,7 +1374,7 @@ func (*ListCertificateMapEntriesResponse) ProtoMessage() {} func (x *ListCertificateMapEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1423,9 @@ type GetCertificateMapEntryRequest struct { func (x *GetCertificateMapEntryRequest) Reset() { *x = GetCertificateMapEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateMapEntryRequest) String() string { @@ -1466,7 +1436,7 @@ func (*GetCertificateMapEntryRequest) ProtoMessage() {} func (x *GetCertificateMapEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1475,9 @@ type CreateCertificateMapEntryRequest struct { func (x *CreateCertificateMapEntryRequest) Reset() { *x = CreateCertificateMapEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateMapEntryRequest) String() string { @@ -1520,7 +1488,7 @@ func (*CreateCertificateMapEntryRequest) ProtoMessage() {} func (x *CreateCertificateMapEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1572,11 +1540,9 @@ type UpdateCertificateMapEntryRequest struct { func (x *UpdateCertificateMapEntryRequest) Reset() { *x = UpdateCertificateMapEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateMapEntryRequest) String() string { @@ -1587,7 +1553,7 @@ func (*UpdateCertificateMapEntryRequest) ProtoMessage() {} func (x *UpdateCertificateMapEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,11 +1595,9 @@ type DeleteCertificateMapEntryRequest struct { func (x *DeleteCertificateMapEntryRequest) Reset() { *x = DeleteCertificateMapEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateMapEntryRequest) String() string { @@ -1644,7 +1608,7 @@ func (*DeleteCertificateMapEntryRequest) ProtoMessage() {} func (x *DeleteCertificateMapEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1691,11 +1655,9 @@ type ListDnsAuthorizationsRequest struct { func (x *ListDnsAuthorizationsRequest) Reset() { *x = ListDnsAuthorizationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDnsAuthorizationsRequest) String() string { @@ -1706,7 +1668,7 @@ func (*ListDnsAuthorizationsRequest) ProtoMessage() {} func (x *ListDnsAuthorizationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1774,11 +1736,9 @@ type ListDnsAuthorizationsResponse struct { func (x *ListDnsAuthorizationsResponse) Reset() { *x = ListDnsAuthorizationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDnsAuthorizationsResponse) String() string { @@ -1789,7 +1749,7 @@ func (*ListDnsAuthorizationsResponse) ProtoMessage() {} func (x *ListDnsAuthorizationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1798,9 @@ type GetDnsAuthorizationRequest struct { func (x *GetDnsAuthorizationRequest) Reset() { *x = GetDnsAuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDnsAuthorizationRequest) String() string { @@ -1853,7 +1811,7 @@ func (*GetDnsAuthorizationRequest) ProtoMessage() {} func (x *GetDnsAuthorizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1892,11 +1850,9 @@ type CreateDnsAuthorizationRequest struct { func (x *CreateDnsAuthorizationRequest) Reset() { *x = CreateDnsAuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDnsAuthorizationRequest) String() string { @@ -1907,7 +1863,7 @@ func (*CreateDnsAuthorizationRequest) ProtoMessage() {} func (x *CreateDnsAuthorizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1959,11 +1915,9 @@ type UpdateDnsAuthorizationRequest struct { func (x *UpdateDnsAuthorizationRequest) Reset() { *x = UpdateDnsAuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDnsAuthorizationRequest) String() string { @@ -1974,7 +1928,7 @@ func (*UpdateDnsAuthorizationRequest) ProtoMessage() {} func (x *UpdateDnsAuthorizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2016,11 +1970,9 @@ type DeleteDnsAuthorizationRequest struct { func (x *DeleteDnsAuthorizationRequest) Reset() { *x = DeleteDnsAuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDnsAuthorizationRequest) String() string { @@ -2031,7 +1983,7 @@ func (*DeleteDnsAuthorizationRequest) ProtoMessage() {} func (x *DeleteDnsAuthorizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2081,11 +2033,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2096,7 +2046,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2147,9 @@ type Certificate struct { func (x *Certificate) Reset() { *x = Certificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate) String() string { @@ -2212,7 +2160,7 @@ func (*Certificate) ProtoMessage() {} func (x *Certificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2355,11 +2303,9 @@ type CertificateMap struct { func (x *CertificateMap) Reset() { *x = CertificateMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateMap) String() string { @@ -2370,7 +2316,7 @@ func (*CertificateMap) ProtoMessage() {} func (x *CertificateMap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2460,11 +2406,9 @@ type CertificateMapEntry struct { func (x *CertificateMapEntry) Reset() { *x = CertificateMapEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateMapEntry) String() string { @@ -2475,7 +2419,7 @@ func (*CertificateMapEntry) ProtoMessage() {} func (x *CertificateMapEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2615,11 +2559,9 @@ type DnsAuthorization struct { func (x *DnsAuthorization) Reset() { *x = DnsAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsAuthorization) String() string { @@ -2630,7 +2572,7 @@ func (*DnsAuthorization) ProtoMessage() {} func (x *DnsAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2718,11 +2660,9 @@ type Certificate_SelfManagedCertificate struct { func (x *Certificate_SelfManagedCertificate) Reset() { *x = Certificate_SelfManagedCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate_SelfManagedCertificate) String() string { @@ -2733,7 +2673,7 @@ func (*Certificate_SelfManagedCertificate) ProtoMessage() {} func (x *Certificate_SelfManagedCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2797,11 +2737,9 @@ type Certificate_ManagedCertificate struct { func (x *Certificate_ManagedCertificate) Reset() { *x = Certificate_ManagedCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate_ManagedCertificate) String() string { @@ -2812,7 +2750,7 @@ func (*Certificate_ManagedCertificate) ProtoMessage() {} func (x *Certificate_ManagedCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2885,11 +2823,9 @@ type Certificate_ManagedCertificate_ProvisioningIssue struct { func (x *Certificate_ManagedCertificate_ProvisioningIssue) Reset() { *x = Certificate_ManagedCertificate_ProvisioningIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate_ManagedCertificate_ProvisioningIssue) String() string { @@ -2900,7 +2836,7 @@ func (*Certificate_ManagedCertificate_ProvisioningIssue) ProtoMessage() {} func (x *Certificate_ManagedCertificate_ProvisioningIssue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2951,11 +2887,9 @@ type Certificate_ManagedCertificate_AuthorizationAttemptInfo struct { func (x *Certificate_ManagedCertificate_AuthorizationAttemptInfo) Reset() { *x = Certificate_ManagedCertificate_AuthorizationAttemptInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate_ManagedCertificate_AuthorizationAttemptInfo) String() string { @@ -2966,7 +2900,7 @@ func (*Certificate_ManagedCertificate_AuthorizationAttemptInfo) ProtoMessage() { func (x *Certificate_ManagedCertificate_AuthorizationAttemptInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3029,11 +2963,9 @@ type CertificateMap_GclbTarget struct { func (x *CertificateMap_GclbTarget) Reset() { *x = CertificateMap_GclbTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateMap_GclbTarget) String() string { @@ -3044,7 +2976,7 @@ func (*CertificateMap_GclbTarget) ProtoMessage() {} func (x *CertificateMap_GclbTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3123,11 +3055,9 @@ type CertificateMap_GclbTarget_IpConfig struct { func (x *CertificateMap_GclbTarget_IpConfig) Reset() { *x = CertificateMap_GclbTarget_IpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateMap_GclbTarget_IpConfig) String() string { @@ -3138,7 +3068,7 @@ func (*CertificateMap_GclbTarget_IpConfig) ProtoMessage() {} func (x *CertificateMap_GclbTarget_IpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3187,11 +3117,9 @@ type DnsAuthorization_DnsResourceRecord struct { func (x *DnsAuthorization_DnsResourceRecord) Reset() { *x = DnsAuthorization_DnsResourceRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsAuthorization_DnsResourceRecord) String() string { @@ -3202,7 +3130,7 @@ func (*DnsAuthorization_DnsResourceRecord) ProtoMessage() {} func (x *DnsAuthorization_DnsResourceRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4589,440 +4517,6 @@ func file_google_cloud_certificatemanager_v1_certificate_manager_proto_init() { } file_google_cloud_certificatemanager_v1_certificate_issuance_config_proto_init() file_google_cloud_certificatemanager_v1_trust_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateMapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateMapsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateMapEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateMapEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateMapEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateMapEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateMapEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateMapEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDnsAuthorizationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDnsAuthorizationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetDnsAuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateDnsAuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDnsAuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDnsAuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Certificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CertificateMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CertificateMapEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DnsAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Certificate_SelfManagedCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Certificate_ManagedCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Certificate_ManagedCertificate_ProvisioningIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Certificate_ManagedCertificate_AuthorizationAttemptInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*CertificateMap_GclbTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CertificateMap_GclbTarget_IpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*DnsAuthorization_DnsResourceRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_certificatemanager_v1_certificate_manager_proto_msgTypes[25].OneofWrappers = []any{ (*Certificate_SelfManaged)(nil), (*Certificate_Managed)(nil), diff --git a/certificatemanager/apiv1/certificatemanagerpb/trust_config.pb.go b/certificatemanager/apiv1/certificatemanagerpb/trust_config.pb.go index 287fca0bb51c..c94506e90e58 100755 --- a/certificatemanager/apiv1/certificatemanagerpb/trust_config.pb.go +++ b/certificatemanager/apiv1/certificatemanagerpb/trust_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/certificatemanager/v1/trust_config.proto @@ -63,11 +63,9 @@ type ListTrustConfigsRequest struct { func (x *ListTrustConfigsRequest) Reset() { *x = ListTrustConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrustConfigsRequest) String() string { @@ -78,7 +76,7 @@ func (*ListTrustConfigsRequest) ProtoMessage() {} func (x *ListTrustConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type ListTrustConfigsResponse struct { func (x *ListTrustConfigsResponse) Reset() { *x = ListTrustConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTrustConfigsResponse) String() string { @@ -161,7 +157,7 @@ func (*ListTrustConfigsResponse) ProtoMessage() {} func (x *ListTrustConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type GetTrustConfigRequest struct { func (x *GetTrustConfigRequest) Reset() { *x = GetTrustConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTrustConfigRequest) String() string { @@ -225,7 +219,7 @@ func (*GetTrustConfigRequest) ProtoMessage() {} func (x *GetTrustConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +259,9 @@ type CreateTrustConfigRequest struct { func (x *CreateTrustConfigRequest) Reset() { *x = CreateTrustConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTrustConfigRequest) String() string { @@ -280,7 +272,7 @@ func (*CreateTrustConfigRequest) ProtoMessage() {} func (x *CreateTrustConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type UpdateTrustConfigRequest struct { func (x *UpdateTrustConfigRequest) Reset() { *x = UpdateTrustConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTrustConfigRequest) String() string { @@ -347,7 +337,7 @@ func (*UpdateTrustConfigRequest) ProtoMessage() {} func (x *UpdateTrustConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +383,9 @@ type DeleteTrustConfigRequest struct { func (x *DeleteTrustConfigRequest) Reset() { *x = DeleteTrustConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTrustConfigRequest) String() string { @@ -408,7 +396,7 @@ func (*DeleteTrustConfigRequest) ProtoMessage() {} func (x *DeleteTrustConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +458,9 @@ type TrustConfig struct { func (x *TrustConfig) Reset() { *x = TrustConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrustConfig) String() string { @@ -485,7 +471,7 @@ func (*TrustConfig) ProtoMessage() {} func (x *TrustConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +549,9 @@ type TrustConfig_TrustAnchor struct { func (x *TrustConfig_TrustAnchor) Reset() { *x = TrustConfig_TrustAnchor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrustConfig_TrustAnchor) String() string { @@ -578,7 +562,7 @@ func (*TrustConfig_TrustAnchor) ProtoMessage() {} func (x *TrustConfig_TrustAnchor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +618,9 @@ type TrustConfig_IntermediateCA struct { func (x *TrustConfig_IntermediateCA) Reset() { *x = TrustConfig_IntermediateCA{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrustConfig_IntermediateCA) String() string { @@ -649,7 +631,7 @@ func (*TrustConfig_IntermediateCA) ProtoMessage() {} func (x *TrustConfig_IntermediateCA) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +693,9 @@ type TrustConfig_TrustStore struct { func (x *TrustConfig_TrustStore) Reset() { *x = TrustConfig_TrustStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrustConfig_TrustStore) String() string { @@ -726,7 +706,7 @@ func (*TrustConfig_TrustStore) ProtoMessage() {} func (x *TrustConfig_TrustStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,128 +945,6 @@ func file_google_cloud_certificatemanager_v1_trust_config_proto_init() { if File_google_cloud_certificatemanager_v1_trust_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListTrustConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTrustConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetTrustConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateTrustConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTrustConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTrustConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TrustConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TrustConfig_TrustAnchor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TrustConfig_IntermediateCA); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TrustConfig_TrustStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_certificatemanager_v1_trust_config_proto_msgTypes[7].OneofWrappers = []any{ (*TrustConfig_TrustAnchor_PemCertificate)(nil), } diff --git a/certificatemanager/apiv1/helpers.go b/certificatemanager/apiv1/helpers.go index bb67e9454e67..729b51b4cc75 100755 --- a/certificatemanager/apiv1/helpers.go +++ b/certificatemanager/apiv1/helpers.go @@ -18,10 +18,20 @@ package certificatemanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "certificatemanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/channel/apiv1/channelpb/billing_accounts.pb.go b/channel/apiv1/channelpb/billing_accounts.pb.go index 94dd371a7ac9..6f6251e6d836 100755 --- a/channel/apiv1/channelpb/billing_accounts.pb.go +++ b/channel/apiv1/channelpb/billing_accounts.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/billing_accounts.proto @@ -58,11 +58,9 @@ type BillingAccount struct { func (x *BillingAccount) Reset() { *x = BillingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_billing_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_billing_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BillingAccount) String() string { @@ -73,7 +71,7 @@ func (*BillingAccount) ProtoMessage() {} func (x *BillingAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_billing_accounts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,20 +196,6 @@ func file_google_cloud_channel_v1_billing_accounts_proto_init() { if File_google_cloud_channel_v1_billing_accounts_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_billing_accounts_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BillingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/channel_partner_links.pb.go b/channel/apiv1/channelpb/channel_partner_links.pb.go index d27d5dbdc834..19b341f760c9 100755 --- a/channel/apiv1/channelpb/channel_partner_links.pb.go +++ b/channel/apiv1/channelpb/channel_partner_links.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/channel_partner_links.proto @@ -185,11 +185,9 @@ type ChannelPartnerLink struct { func (x *ChannelPartnerLink) Reset() { *x = ChannelPartnerLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_channel_partner_links_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_channel_partner_links_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelPartnerLink) String() string { @@ -200,7 +198,7 @@ func (*ChannelPartnerLink) ProtoMessage() {} func (x *ChannelPartnerLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_channel_partner_links_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,20 +387,6 @@ func file_google_cloud_channel_v1_channel_partner_links_proto_init() { return } file_google_cloud_channel_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_channel_partner_links_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ChannelPartnerLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/common.pb.go b/channel/apiv1/channelpb/common.pb.go index bf6205b44eaf..b4b3318905a9 100755 --- a/channel/apiv1/channelpb/common.pb.go +++ b/channel/apiv1/channelpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/common.proto @@ -232,11 +232,9 @@ type EduData struct { func (x *EduData) Reset() { *x = EduData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EduData) String() string { @@ -247,7 +245,7 @@ func (*EduData) ProtoMessage() {} func (x *EduData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +311,9 @@ type CloudIdentityInfo struct { func (x *CloudIdentityInfo) Reset() { *x = CloudIdentityInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudIdentityInfo) String() string { @@ -328,7 +324,7 @@ func (*CloudIdentityInfo) ProtoMessage() {} func (x *CloudIdentityInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +415,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -434,7 +428,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +540,9 @@ type AdminUser struct { func (x *AdminUser) Reset() { *x = AdminUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdminUser) String() string { @@ -561,7 +553,7 @@ func (*AdminUser) ProtoMessage() {} func (x *AdminUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,56 +732,6 @@ func file_google_cloud_channel_v1_common_proto_init() { if File_google_cloud_channel_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EduData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudIdentityInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdminUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_common_proto_msgTypes[2].OneofWrappers = []any{ (*Value_Int64Value)(nil), (*Value_StringValue)(nil), diff --git a/channel/apiv1/channelpb/customers.pb.go b/channel/apiv1/channelpb/customers.pb.go index 9339a94ca981..f48451624707 100755 --- a/channel/apiv1/channelpb/customers.pb.go +++ b/channel/apiv1/channelpb/customers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/customers.proto @@ -89,11 +89,9 @@ type Customer struct { func (x *Customer) Reset() { *x = Customer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Customer) String() string { @@ -104,7 +102,7 @@ func (*Customer) ProtoMessage() {} func (x *Customer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +233,9 @@ type ContactInfo struct { func (x *ContactInfo) Reset() { *x = ContactInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactInfo) String() string { @@ -250,7 +246,7 @@ func (*ContactInfo) ProtoMessage() {} func (x *ContactInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_customers_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,32 +432,6 @@ func file_google_cloud_channel_v1_customers_proto_init() { return } file_google_cloud_channel_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_customers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Customer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_customers_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContactInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/entitlement_changes.pb.go b/channel/apiv1/channelpb/entitlement_changes.pb.go index e7622ec4165c..2943d1797cb3 100755 --- a/channel/apiv1/channelpb/entitlement_changes.pb.go +++ b/channel/apiv1/channelpb/entitlement_changes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/entitlement_changes.proto @@ -367,11 +367,9 @@ type EntitlementChange struct { func (x *EntitlementChange) Reset() { *x = EntitlementChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlement_changes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlement_changes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementChange) String() string { @@ -382,7 +380,7 @@ func (*EntitlementChange) ProtoMessage() {} func (x *EntitlementChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlement_changes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,20 +702,6 @@ func file_google_cloud_channel_v1_entitlement_changes_proto_init() { return } file_google_cloud_channel_v1_entitlements_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_entitlement_changes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntitlementChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_entitlement_changes_proto_msgTypes[0].OneofWrappers = []any{ (*EntitlementChange_SuspensionReason)(nil), (*EntitlementChange_CancellationReason_)(nil), diff --git a/channel/apiv1/channelpb/entitlements.pb.go b/channel/apiv1/channelpb/entitlements.pb.go index a1a5b187d94d..d74a8c68df34 100755 --- a/channel/apiv1/channelpb/entitlements.pb.go +++ b/channel/apiv1/channelpb/entitlements.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/entitlements.proto @@ -284,11 +284,9 @@ type Entitlement struct { func (x *Entitlement) Reset() { *x = Entitlement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement) String() string { @@ -299,7 +297,7 @@ func (*Entitlement) ProtoMessage() {} func (x *Entitlement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +421,9 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Parameter) String() string { @@ -438,7 +434,7 @@ func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +482,9 @@ type AssociationInfo struct { func (x *AssociationInfo) Reset() { *x = AssociationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssociationInfo) String() string { @@ -501,7 +495,7 @@ func (*AssociationInfo) ProtoMessage() {} func (x *AssociationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +537,9 @@ type ProvisionedService struct { func (x *ProvisionedService) Reset() { *x = ProvisionedService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionedService) String() string { @@ -558,7 +550,7 @@ func (*ProvisionedService) ProtoMessage() {} func (x *ProvisionedService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +602,9 @@ type CommitmentSettings struct { func (x *CommitmentSettings) Reset() { *x = CommitmentSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitmentSettings) String() string { @@ -625,7 +615,7 @@ func (*CommitmentSettings) ProtoMessage() {} func (x *CommitmentSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +671,9 @@ type RenewalSettings struct { func (x *RenewalSettings) Reset() { *x = RenewalSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenewalSettings) String() string { @@ -696,7 +684,7 @@ func (*RenewalSettings) ProtoMessage() {} func (x *RenewalSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +746,9 @@ type TrialSettings struct { func (x *TrialSettings) Reset() { *x = TrialSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrialSettings) String() string { @@ -773,7 +759,7 @@ func (*TrialSettings) ProtoMessage() {} func (x *TrialSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +807,9 @@ type TransferableSku struct { func (x *TransferableSku) Reset() { *x = TransferableSku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferableSku) String() string { @@ -836,7 +820,7 @@ func (*TransferableSku) ProtoMessage() {} func (x *TransferableSku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +872,9 @@ type TransferEligibility struct { func (x *TransferEligibility) Reset() { *x = TransferEligibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferEligibility) String() string { @@ -903,7 +885,7 @@ func (*TransferEligibility) ProtoMessage() {} func (x *TransferEligibility) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_entitlements_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,116 +1198,6 @@ func file_google_cloud_channel_v1_entitlements_proto_init() { file_google_cloud_channel_v1_common_proto_init() file_google_cloud_channel_v1_offers_proto_init() file_google_cloud_channel_v1_products_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_entitlements_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AssociationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionedService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CommitmentSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RenewalSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TrialSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransferableSku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_entitlements_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TransferEligibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/offers.pb.go b/channel/apiv1/channelpb/offers.pb.go index 61825cedf6fd..aec85acb109d 100755 --- a/channel/apiv1/channelpb/offers.pb.go +++ b/channel/apiv1/channelpb/offers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/offers.proto @@ -442,11 +442,9 @@ type Offer struct { func (x *Offer) Reset() { *x = Offer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Offer) String() string { @@ -457,7 +455,7 @@ func (*Offer) ProtoMessage() {} func (x *Offer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +570,9 @@ type ParameterDefinition struct { func (x *ParameterDefinition) Reset() { *x = ParameterDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterDefinition) String() string { @@ -587,7 +583,7 @@ func (*ParameterDefinition) ProtoMessage() {} func (x *ParameterDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +652,9 @@ type Constraints struct { func (x *Constraints) Reset() { *x = Constraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Constraints) String() string { @@ -671,7 +665,7 @@ func (*Constraints) ProtoMessage() {} func (x *Constraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +703,9 @@ type CustomerConstraints struct { func (x *CustomerConstraints) Reset() { *x = CustomerConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerConstraints) String() string { @@ -724,7 +716,7 @@ func (*CustomerConstraints) ProtoMessage() {} func (x *CustomerConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +779,9 @@ type Plan struct { func (x *Plan) Reset() { *x = Plan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Plan) String() string { @@ -802,7 +792,7 @@ func (*Plan) ProtoMessage() {} func (x *Plan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +858,9 @@ type PriceByResource struct { func (x *PriceByResource) Reset() { *x = PriceByResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceByResource) String() string { @@ -883,7 +871,7 @@ func (*PriceByResource) ProtoMessage() {} func (x *PriceByResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +926,9 @@ type Price struct { func (x *Price) Reset() { *x = Price{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Price) String() string { @@ -953,7 +939,7 @@ func (*Price) ProtoMessage() {} func (x *Price) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +1004,9 @@ type PricePhase struct { func (x *PricePhase) Reset() { *x = PricePhase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PricePhase) String() string { @@ -1033,7 +1017,7 @@ func (*PricePhase) ProtoMessage() {} func (x *PricePhase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,11 +1090,9 @@ type PriceTier struct { func (x *PriceTier) Reset() { *x = PriceTier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceTier) String() string { @@ -1121,7 +1103,7 @@ func (*PriceTier) ProtoMessage() {} func (x *PriceTier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,11 +1153,9 @@ type Period struct { func (x *Period) Reset() { *x = Period{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Period) String() string { @@ -1186,7 +1166,7 @@ func (*Period) ProtoMessage() {} func (x *Period) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_offers_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1533,128 +1513,6 @@ func file_google_cloud_channel_v1_offers_proto_init() { } file_google_cloud_channel_v1_common_proto_init() file_google_cloud_channel_v1_products_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_offers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Offer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ParameterDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Constraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomerConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Plan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PriceByResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Price); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PricePhase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PriceTier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_offers_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Period); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/operations.pb.go b/channel/apiv1/channelpb/operations.pb.go index ee9d4747910c..9744564adcb2 100755 --- a/channel/apiv1/channelpb/operations.pb.go +++ b/channel/apiv1/channelpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/operations.proto @@ -137,11 +137,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -152,7 +150,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,20 +249,6 @@ func file_google_cloud_channel_v1_operations_proto_init() { if File_google_cloud_channel_v1_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/products.pb.go b/channel/apiv1/channelpb/products.pb.go index ef5d57ed2ba2..d1d616c9edd3 100755 --- a/channel/apiv1/channelpb/products.pb.go +++ b/channel/apiv1/channelpb/products.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/products.proto @@ -101,11 +101,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_products_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_products_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -116,7 +114,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_products_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,11 +163,9 @@ type Sku struct { func (x *Sku) Reset() { *x = Sku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_products_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_products_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sku) String() string { @@ -180,7 +176,7 @@ func (*Sku) ProtoMessage() {} func (x *Sku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_products_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +228,9 @@ type MarketingInfo struct { func (x *MarketingInfo) Reset() { *x = MarketingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_products_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_products_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarketingInfo) String() string { @@ -247,7 +241,7 @@ func (*MarketingInfo) ProtoMessage() {} func (x *MarketingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_products_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +293,9 @@ type Media struct { func (x *Media) Reset() { *x = Media{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_products_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_products_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Media) String() string { @@ -314,7 +306,7 @@ func (*Media) ProtoMessage() {} func (x *Media) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_products_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,56 +445,6 @@ func file_google_cloud_channel_v1_products_proto_init() { if File_google_cloud_channel_v1_products_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_products_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_products_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Sku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_products_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MarketingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_products_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Media); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/channel/apiv1/channelpb/reports_service.pb.go b/channel/apiv1/channelpb/reports_service.pb.go index fb0ef81478c0..d9b22669cf6c 100755 --- a/channel/apiv1/channelpb/reports_service.pb.go +++ b/channel/apiv1/channelpb/reports_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/reports_service.proto @@ -214,11 +214,9 @@ type RunReportJobRequest struct { func (x *RunReportJobRequest) Reset() { *x = RunReportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunReportJobRequest) String() string { @@ -229,7 +227,7 @@ func (*RunReportJobRequest) ProtoMessage() {} func (x *RunReportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +291,9 @@ type RunReportJobResponse struct { func (x *RunReportJobResponse) Reset() { *x = RunReportJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunReportJobResponse) String() string { @@ -308,7 +304,7 @@ func (*RunReportJobResponse) ProtoMessage() {} func (x *RunReportJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +368,9 @@ type FetchReportResultsRequest struct { func (x *FetchReportResultsRequest) Reset() { *x = FetchReportResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReportResultsRequest) String() string { @@ -387,7 +381,7 @@ func (*FetchReportResultsRequest) ProtoMessage() {} func (x *FetchReportResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +448,9 @@ type FetchReportResultsResponse struct { func (x *FetchReportResultsResponse) Reset() { *x = FetchReportResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReportResultsResponse) String() string { @@ -469,7 +461,7 @@ func (*FetchReportResultsResponse) ProtoMessage() {} func (x *FetchReportResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +529,9 @@ type ListReportsRequest struct { func (x *ListReportsRequest) Reset() { *x = ListReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportsRequest) String() string { @@ -552,7 +542,7 @@ func (*ListReportsRequest) ProtoMessage() {} func (x *ListReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +604,9 @@ type ListReportsResponse struct { func (x *ListReportsResponse) Reset() { *x = ListReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportsResponse) String() string { @@ -629,7 +617,7 @@ func (*ListReportsResponse) ProtoMessage() {} func (x *ListReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +666,9 @@ type ReportJob struct { func (x *ReportJob) Reset() { *x = ReportJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportJob) String() string { @@ -693,7 +679,7 @@ func (*ReportJob) ProtoMessage() {} func (x *ReportJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +736,9 @@ type ReportResultsMetadata struct { func (x *ReportResultsMetadata) Reset() { *x = ReportResultsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportResultsMetadata) String() string { @@ -765,7 +749,7 @@ func (*ReportResultsMetadata) ProtoMessage() {} func (x *ReportResultsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +815,9 @@ type Column struct { func (x *Column) Reset() { *x = Column{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Column) String() string { @@ -846,7 +828,7 @@ func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +900,9 @@ type DateRange struct { func (x *DateRange) Reset() { *x = DateRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateRange) String() string { @@ -933,7 +913,7 @@ func (*DateRange) ProtoMessage() {} func (x *DateRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +973,9 @@ type Row struct { func (x *Row) Reset() { *x = Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Row) String() string { @@ -1008,7 +986,7 @@ func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1038,9 @@ type ReportValue struct { func (x *ReportValue) Reset() { *x = ReportValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportValue) String() string { @@ -1075,7 +1051,7 @@ func (*ReportValue) ProtoMessage() {} func (x *ReportValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1182,9 @@ type ReportStatus struct { func (x *ReportStatus) Reset() { *x = ReportStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportStatus) String() string { @@ -1221,7 +1195,7 @@ func (*ReportStatus) ProtoMessage() {} func (x *ReportStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1260,9 @@ type Report struct { func (x *Report) Reset() { *x = Report{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Report) String() string { @@ -1301,7 +1273,7 @@ func (*Report) ProtoMessage() {} func (x *Report) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_reports_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,176 +1676,6 @@ func file_google_cloud_channel_v1_reports_service_proto_init() { return } file_google_cloud_channel_v1_operations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_reports_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunReportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RunReportJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchReportResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FetchReportResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReportResultsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Column); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DateRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReportValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReportStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_reports_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Report); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_reports_service_proto_msgTypes[11].OneofWrappers = []any{ (*ReportValue_StringValue)(nil), (*ReportValue_IntValue)(nil), diff --git a/channel/apiv1/channelpb/repricing.pb.go b/channel/apiv1/channelpb/repricing.pb.go index 03cff573d6d4..ee7401450e87 100755 --- a/channel/apiv1/channelpb/repricing.pb.go +++ b/channel/apiv1/channelpb/repricing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/repricing.proto @@ -117,11 +117,9 @@ type CustomerRepricingConfig struct { func (x *CustomerRepricingConfig) Reset() { *x = CustomerRepricingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerRepricingConfig) String() string { @@ -132,7 +130,7 @@ func (*CustomerRepricingConfig) ProtoMessage() {} func (x *CustomerRepricingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +189,9 @@ type ChannelPartnerRepricingConfig struct { func (x *ChannelPartnerRepricingConfig) Reset() { *x = ChannelPartnerRepricingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelPartnerRepricingConfig) String() string { @@ -206,7 +202,7 @@ func (*ChannelPartnerRepricingConfig) ProtoMessage() {} func (x *ChannelPartnerRepricingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +268,9 @@ type RepricingConfig struct { func (x *RepricingConfig) Reset() { *x = RepricingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepricingConfig) String() string { @@ -287,7 +281,7 @@ func (*RepricingConfig) ProtoMessage() {} func (x *RepricingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +400,9 @@ type RepricingAdjustment struct { func (x *RepricingAdjustment) Reset() { *x = RepricingAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepricingAdjustment) String() string { @@ -421,7 +413,7 @@ func (*RepricingAdjustment) ProtoMessage() {} func (x *RepricingAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +469,9 @@ type PercentageAdjustment struct { func (x *PercentageAdjustment) Reset() { *x = PercentageAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PercentageAdjustment) String() string { @@ -492,7 +482,7 @@ func (*PercentageAdjustment) ProtoMessage() {} func (x *PercentageAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +522,9 @@ type ConditionalOverride struct { func (x *ConditionalOverride) Reset() { *x = ConditionalOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionalOverride) String() string { @@ -547,7 +535,7 @@ func (*ConditionalOverride) ProtoMessage() {} func (x *ConditionalOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +588,9 @@ type RepricingCondition struct { func (x *RepricingCondition) Reset() { *x = RepricingCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepricingCondition) String() string { @@ -615,7 +601,7 @@ func (*RepricingCondition) ProtoMessage() {} func (x *RepricingCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +658,9 @@ type SkuGroupCondition struct { func (x *SkuGroupCondition) Reset() { *x = SkuGroupCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkuGroupCondition) String() string { @@ -687,7 +671,7 @@ func (*SkuGroupCondition) ProtoMessage() {} func (x *SkuGroupCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +707,9 @@ type RepricingConfig_EntitlementGranularity struct { func (x *RepricingConfig_EntitlementGranularity) Reset() { *x = RepricingConfig_EntitlementGranularity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepricingConfig_EntitlementGranularity) String() string { @@ -738,7 +720,7 @@ func (*RepricingConfig_EntitlementGranularity) ProtoMessage() {} func (x *RepricingConfig_EntitlementGranularity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +758,9 @@ type RepricingConfig_ChannelPartnerGranularity struct { func (x *RepricingConfig_ChannelPartnerGranularity) Reset() { *x = RepricingConfig_ChannelPartnerGranularity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepricingConfig_ChannelPartnerGranularity) String() string { @@ -791,7 +771,7 @@ func (*RepricingConfig_ChannelPartnerGranularity) ProtoMessage() {} func (x *RepricingConfig_ChannelPartnerGranularity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_repricing_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,128 +1017,6 @@ func file_google_cloud_channel_v1_repricing_proto_init() { if File_google_cloud_channel_v1_repricing_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_repricing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomerRepricingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ChannelPartnerRepricingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RepricingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RepricingAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PercentageAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ConditionalOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RepricingCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SkuGroupCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RepricingConfig_EntitlementGranularity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_repricing_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RepricingConfig_ChannelPartnerGranularity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_repricing_proto_msgTypes[2].OneofWrappers = []any{ (*RepricingConfig_EntitlementGranularity_)(nil), (*RepricingConfig_ChannelPartnerGranularity_)(nil), diff --git a/channel/apiv1/channelpb/service.pb.go b/channel/apiv1/channelpb/service.pb.go index b962774bedcf..4bfdefc0a26c 100755 --- a/channel/apiv1/channelpb/service.pb.go +++ b/channel/apiv1/channelpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/service.proto @@ -117,11 +117,9 @@ type CheckCloudIdentityAccountsExistRequest struct { func (x *CheckCloudIdentityAccountsExistRequest) Reset() { *x = CheckCloudIdentityAccountsExistRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckCloudIdentityAccountsExistRequest) String() string { @@ -132,7 +130,7 @@ func (*CheckCloudIdentityAccountsExistRequest) ProtoMessage() {} func (x *CheckCloudIdentityAccountsExistRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +194,9 @@ type CloudIdentityCustomerAccount struct { func (x *CloudIdentityCustomerAccount) Reset() { *x = CloudIdentityCustomerAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudIdentityCustomerAccount) String() string { @@ -211,7 +207,7 @@ func (*CloudIdentityCustomerAccount) ProtoMessage() {} func (x *CloudIdentityCustomerAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +277,9 @@ type CheckCloudIdentityAccountsExistResponse struct { func (x *CheckCloudIdentityAccountsExistResponse) Reset() { *x = CheckCloudIdentityAccountsExistResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckCloudIdentityAccountsExistResponse) String() string { @@ -296,7 +290,7 @@ func (*CheckCloudIdentityAccountsExistResponse) ProtoMessage() {} func (x *CheckCloudIdentityAccountsExistResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +342,9 @@ type ListCustomersRequest struct { func (x *ListCustomersRequest) Reset() { *x = ListCustomersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersRequest) String() string { @@ -363,7 +355,7 @@ func (*ListCustomersRequest) ProtoMessage() {} func (x *ListCustomersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +416,9 @@ type ListCustomersResponse struct { func (x *ListCustomersResponse) Reset() { *x = ListCustomersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersResponse) String() string { @@ -439,7 +429,7 @@ func (*ListCustomersResponse) ProtoMessage() {} func (x *ListCustomersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +472,9 @@ type GetCustomerRequest struct { func (x *GetCustomerRequest) Reset() { *x = GetCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomerRequest) String() string { @@ -497,7 +485,7 @@ func (*GetCustomerRequest) ProtoMessage() {} func (x *GetCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +523,9 @@ type CreateCustomerRequest struct { func (x *CreateCustomerRequest) Reset() { *x = CreateCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomerRequest) String() string { @@ -550,7 +536,7 @@ func (*CreateCustomerRequest) ProtoMessage() {} func (x *CreateCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +581,9 @@ type UpdateCustomerRequest struct { func (x *UpdateCustomerRequest) Reset() { *x = UpdateCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomerRequest) String() string { @@ -610,7 +594,7 @@ func (*UpdateCustomerRequest) ProtoMessage() {} func (x *UpdateCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +636,9 @@ type DeleteCustomerRequest struct { func (x *DeleteCustomerRequest) Reset() { *x = DeleteCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomerRequest) String() string { @@ -667,7 +649,7 @@ func (*DeleteCustomerRequest) ProtoMessage() {} func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,11 +715,9 @@ type ImportCustomerRequest struct { func (x *ImportCustomerRequest) Reset() { *x = ImportCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCustomerRequest) String() string { @@ -748,7 +728,7 @@ func (*ImportCustomerRequest) ProtoMessage() {} func (x *ImportCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +851,9 @@ type ProvisionCloudIdentityRequest struct { func (x *ProvisionCloudIdentityRequest) Reset() { *x = ProvisionCloudIdentityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionCloudIdentityRequest) String() string { @@ -886,7 +864,7 @@ func (*ProvisionCloudIdentityRequest) ProtoMessage() {} func (x *ProvisionCloudIdentityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +933,9 @@ type ListEntitlementsRequest struct { func (x *ListEntitlementsRequest) Reset() { *x = ListEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsRequest) String() string { @@ -970,7 +946,7 @@ func (*ListEntitlementsRequest) ProtoMessage() {} func (x *ListEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +1000,9 @@ type ListEntitlementsResponse struct { func (x *ListEntitlementsResponse) Reset() { *x = ListEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsResponse) String() string { @@ -1039,7 +1013,7 @@ func (*ListEntitlementsResponse) ProtoMessage() {} func (x *ListEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1087,9 @@ type ListTransferableSkusRequest struct { func (x *ListTransferableSkusRequest) Reset() { *x = ListTransferableSkusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferableSkusRequest) String() string { @@ -1128,7 +1100,7 @@ func (*ListTransferableSkusRequest) ProtoMessage() {} func (x *ListTransferableSkusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1240,11 +1212,9 @@ type ListTransferableSkusResponse struct { func (x *ListTransferableSkusResponse) Reset() { *x = ListTransferableSkusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferableSkusResponse) String() string { @@ -1255,7 +1225,7 @@ func (*ListTransferableSkusResponse) ProtoMessage() {} func (x *ListTransferableSkusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1329,11 +1299,9 @@ type ListTransferableOffersRequest struct { func (x *ListTransferableOffersRequest) Reset() { *x = ListTransferableOffersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferableOffersRequest) String() string { @@ -1344,7 +1312,7 @@ func (*ListTransferableOffersRequest) ProtoMessage() {} func (x *ListTransferableOffersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1430,9 @@ type ListTransferableOffersResponse struct { func (x *ListTransferableOffersResponse) Reset() { *x = ListTransferableOffersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferableOffersResponse) String() string { @@ -1477,7 +1443,7 @@ func (*ListTransferableOffersResponse) ProtoMessage() {} func (x *ListTransferableOffersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1485,9 @@ type TransferableOffer struct { func (x *TransferableOffer) Reset() { *x = TransferableOffer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferableOffer) String() string { @@ -1534,7 +1498,7 @@ func (*TransferableOffer) ProtoMessage() {} func (x *TransferableOffer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1535,9 @@ type GetEntitlementRequest struct { func (x *GetEntitlementRequest) Reset() { *x = GetEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntitlementRequest) String() string { @@ -1586,7 +1548,7 @@ func (*GetEntitlementRequest) ProtoMessage() {} func (x *GetEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1635,11 +1597,9 @@ type ListChannelPartnerLinksRequest struct { func (x *ListChannelPartnerLinksRequest) Reset() { *x = ListChannelPartnerLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelPartnerLinksRequest) String() string { @@ -1650,7 +1610,7 @@ func (*ListChannelPartnerLinksRequest) ProtoMessage() {} func (x *ListChannelPartnerLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,11 +1671,9 @@ type ListChannelPartnerLinksResponse struct { func (x *ListChannelPartnerLinksResponse) Reset() { *x = ListChannelPartnerLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelPartnerLinksResponse) String() string { @@ -1726,7 +1684,7 @@ func (*ListChannelPartnerLinksResponse) ProtoMessage() {} func (x *ListChannelPartnerLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1730,9 @@ type GetChannelPartnerLinkRequest struct { func (x *GetChannelPartnerLinkRequest) Reset() { *x = GetChannelPartnerLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelPartnerLinkRequest) String() string { @@ -1787,7 +1743,7 @@ func (*GetChannelPartnerLinkRequest) ProtoMessage() {} func (x *GetChannelPartnerLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1835,11 +1791,9 @@ type CreateChannelPartnerLinkRequest struct { func (x *CreateChannelPartnerLinkRequest) Reset() { *x = CreateChannelPartnerLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelPartnerLinkRequest) String() string { @@ -1850,7 +1804,7 @@ func (*CreateChannelPartnerLinkRequest) ProtoMessage() {} func (x *CreateChannelPartnerLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,11 +1855,9 @@ type UpdateChannelPartnerLinkRequest struct { func (x *UpdateChannelPartnerLinkRequest) Reset() { *x = UpdateChannelPartnerLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChannelPartnerLinkRequest) String() string { @@ -1916,7 +1868,7 @@ func (*UpdateChannelPartnerLinkRequest) ProtoMessage() {} func (x *UpdateChannelPartnerLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1967,11 +1919,9 @@ type GetCustomerRepricingConfigRequest struct { func (x *GetCustomerRepricingConfigRequest) Reset() { *x = GetCustomerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomerRepricingConfigRequest) String() string { @@ -1982,7 +1932,7 @@ func (*GetCustomerRepricingConfigRequest) ProtoMessage() {} func (x *GetCustomerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2039,11 +1989,9 @@ type ListCustomerRepricingConfigsRequest struct { func (x *ListCustomerRepricingConfigsRequest) Reset() { *x = ListCustomerRepricingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomerRepricingConfigsRequest) String() string { @@ -2054,7 +2002,7 @@ func (*ListCustomerRepricingConfigsRequest) ProtoMessage() {} func (x *ListCustomerRepricingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,11 +2063,9 @@ type ListCustomerRepricingConfigsResponse struct { func (x *ListCustomerRepricingConfigsResponse) Reset() { *x = ListCustomerRepricingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomerRepricingConfigsResponse) String() string { @@ -2130,7 +2076,7 @@ func (*ListCustomerRepricingConfigsResponse) ProtoMessage() {} func (x *ListCustomerRepricingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2176,11 +2122,9 @@ type CreateCustomerRepricingConfigRequest struct { func (x *CreateCustomerRepricingConfigRequest) Reset() { *x = CreateCustomerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomerRepricingConfigRequest) String() string { @@ -2191,7 +2135,7 @@ func (*CreateCustomerRepricingConfigRequest) ProtoMessage() {} func (x *CreateCustomerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,11 +2177,9 @@ type UpdateCustomerRepricingConfigRequest struct { func (x *UpdateCustomerRepricingConfigRequest) Reset() { *x = UpdateCustomerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomerRepricingConfigRequest) String() string { @@ -2248,7 +2190,7 @@ func (*UpdateCustomerRepricingConfigRequest) ProtoMessage() {} func (x *UpdateCustomerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2285,11 +2227,9 @@ type DeleteCustomerRepricingConfigRequest struct { func (x *DeleteCustomerRepricingConfigRequest) Reset() { *x = DeleteCustomerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomerRepricingConfigRequest) String() string { @@ -2300,7 +2240,7 @@ func (*DeleteCustomerRepricingConfigRequest) ProtoMessage() {} func (x *DeleteCustomerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2337,11 +2277,9 @@ type GetChannelPartnerRepricingConfigRequest struct { func (x *GetChannelPartnerRepricingConfigRequest) Reset() { *x = GetChannelPartnerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelPartnerRepricingConfigRequest) String() string { @@ -2352,7 +2290,7 @@ func (*GetChannelPartnerRepricingConfigRequest) ProtoMessage() {} func (x *GetChannelPartnerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2413,11 +2351,9 @@ type ListChannelPartnerRepricingConfigsRequest struct { func (x *ListChannelPartnerRepricingConfigsRequest) Reset() { *x = ListChannelPartnerRepricingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelPartnerRepricingConfigsRequest) String() string { @@ -2428,7 +2364,7 @@ func (*ListChannelPartnerRepricingConfigsRequest) ProtoMessage() {} func (x *ListChannelPartnerRepricingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2425,9 @@ type ListChannelPartnerRepricingConfigsResponse struct { func (x *ListChannelPartnerRepricingConfigsResponse) Reset() { *x = ListChannelPartnerRepricingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelPartnerRepricingConfigsResponse) String() string { @@ -2504,7 +2438,7 @@ func (*ListChannelPartnerRepricingConfigsResponse) ProtoMessage() {} func (x *ListChannelPartnerRepricingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2550,11 +2484,9 @@ type CreateChannelPartnerRepricingConfigRequest struct { func (x *CreateChannelPartnerRepricingConfigRequest) Reset() { *x = CreateChannelPartnerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelPartnerRepricingConfigRequest) String() string { @@ -2565,7 +2497,7 @@ func (*CreateChannelPartnerRepricingConfigRequest) ProtoMessage() {} func (x *CreateChannelPartnerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2607,11 +2539,9 @@ type UpdateChannelPartnerRepricingConfigRequest struct { func (x *UpdateChannelPartnerRepricingConfigRequest) Reset() { *x = UpdateChannelPartnerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChannelPartnerRepricingConfigRequest) String() string { @@ -2622,7 +2552,7 @@ func (*UpdateChannelPartnerRepricingConfigRequest) ProtoMessage() {} func (x *UpdateChannelPartnerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2657,11 +2587,9 @@ type DeleteChannelPartnerRepricingConfigRequest struct { func (x *DeleteChannelPartnerRepricingConfigRequest) Reset() { *x = DeleteChannelPartnerRepricingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChannelPartnerRepricingConfigRequest) String() string { @@ -2672,7 +2600,7 @@ func (*DeleteChannelPartnerRepricingConfigRequest) ProtoMessage() {} func (x *DeleteChannelPartnerRepricingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2718,11 +2646,9 @@ type ListSkuGroupsRequest struct { func (x *ListSkuGroupsRequest) Reset() { *x = ListSkuGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkuGroupsRequest) String() string { @@ -2733,7 +2659,7 @@ func (*ListSkuGroupsRequest) ProtoMessage() {} func (x *ListSkuGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2792,11 +2718,9 @@ type ListSkuGroupBillableSkusRequest struct { func (x *ListSkuGroupBillableSkusRequest) Reset() { *x = ListSkuGroupBillableSkusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkuGroupBillableSkusRequest) String() string { @@ -2807,7 +2731,7 @@ func (*ListSkuGroupBillableSkusRequest) ProtoMessage() {} func (x *ListSkuGroupBillableSkusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2859,11 +2783,9 @@ type ListSkuGroupsResponse struct { func (x *ListSkuGroupsResponse) Reset() { *x = ListSkuGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkuGroupsResponse) String() string { @@ -2874,7 +2796,7 @@ func (*ListSkuGroupsResponse) ProtoMessage() {} func (x *ListSkuGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2919,11 +2841,9 @@ type ListSkuGroupBillableSkusResponse struct { func (x *ListSkuGroupBillableSkusResponse) Reset() { *x = ListSkuGroupBillableSkusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkuGroupBillableSkusResponse) String() string { @@ -2934,7 +2854,7 @@ func (*ListSkuGroupBillableSkusResponse) ProtoMessage() {} func (x *ListSkuGroupBillableSkusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2980,11 +2900,9 @@ type SkuGroup struct { func (x *SkuGroup) Reset() { *x = SkuGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkuGroup) String() string { @@ -2995,7 +2913,7 @@ func (*SkuGroup) ProtoMessage() {} func (x *SkuGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3048,11 +2966,9 @@ type BillableSku struct { func (x *BillableSku) Reset() { *x = BillableSku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BillableSku) String() string { @@ -3063,7 +2979,7 @@ func (*BillableSku) ProtoMessage() {} func (x *BillableSku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3136,11 +3052,9 @@ type CreateEntitlementRequest struct { func (x *CreateEntitlementRequest) Reset() { *x = CreateEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntitlementRequest) String() string { @@ -3151,7 +3065,7 @@ func (*CreateEntitlementRequest) ProtoMessage() {} func (x *CreateEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3222,11 +3136,9 @@ type TransferEntitlementsRequest struct { func (x *TransferEntitlementsRequest) Reset() { *x = TransferEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferEntitlementsRequest) String() string { @@ -3237,7 +3149,7 @@ func (*TransferEntitlementsRequest) ProtoMessage() {} func (x *TransferEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3294,11 +3206,9 @@ type TransferEntitlementsResponse struct { func (x *TransferEntitlementsResponse) Reset() { *x = TransferEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferEntitlementsResponse) String() string { @@ -3309,7 +3219,7 @@ func (*TransferEntitlementsResponse) ProtoMessage() {} func (x *TransferEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3361,11 +3271,9 @@ type TransferEntitlementsToGoogleRequest struct { func (x *TransferEntitlementsToGoogleRequest) Reset() { *x = TransferEntitlementsToGoogleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferEntitlementsToGoogleRequest) String() string { @@ -3376,7 +3284,7 @@ func (*TransferEntitlementsToGoogleRequest) ProtoMessage() {} func (x *TransferEntitlementsToGoogleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3448,11 +3356,9 @@ type ChangeParametersRequest struct { func (x *ChangeParametersRequest) Reset() { *x = ChangeParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeParametersRequest) String() string { @@ -3463,7 +3369,7 @@ func (*ChangeParametersRequest) ProtoMessage() {} func (x *ChangeParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3536,11 +3442,9 @@ type ChangeRenewalSettingsRequest struct { func (x *ChangeRenewalSettingsRequest) Reset() { *x = ChangeRenewalSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeRenewalSettingsRequest) String() string { @@ -3551,7 +3455,7 @@ func (*ChangeRenewalSettingsRequest) ProtoMessage() {} func (x *ChangeRenewalSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3631,11 +3535,9 @@ type ChangeOfferRequest struct { func (x *ChangeOfferRequest) Reset() { *x = ChangeOfferRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeOfferRequest) String() string { @@ -3646,7 +3548,7 @@ func (*ChangeOfferRequest) ProtoMessage() {} func (x *ChangeOfferRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3731,11 +3633,9 @@ type StartPaidServiceRequest struct { func (x *StartPaidServiceRequest) Reset() { *x = StartPaidServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartPaidServiceRequest) String() string { @@ -3746,7 +3646,7 @@ func (*StartPaidServiceRequest) ProtoMessage() {} func (x *StartPaidServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3803,11 +3703,9 @@ type CancelEntitlementRequest struct { func (x *CancelEntitlementRequest) Reset() { *x = CancelEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelEntitlementRequest) String() string { @@ -3818,7 +3716,7 @@ func (*CancelEntitlementRequest) ProtoMessage() {} func (x *CancelEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3875,11 +3773,9 @@ type SuspendEntitlementRequest struct { func (x *SuspendEntitlementRequest) Reset() { *x = SuspendEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuspendEntitlementRequest) String() string { @@ -3890,7 +3786,7 @@ func (*SuspendEntitlementRequest) ProtoMessage() {} func (x *SuspendEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3947,11 +3843,9 @@ type ActivateEntitlementRequest struct { func (x *ActivateEntitlementRequest) Reset() { *x = ActivateEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActivateEntitlementRequest) String() string { @@ -3962,7 +3856,7 @@ func (*ActivateEntitlementRequest) ProtoMessage() {} func (x *ActivateEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4005,11 +3899,9 @@ type LookupOfferRequest struct { func (x *LookupOfferRequest) Reset() { *x = LookupOfferRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupOfferRequest) String() string { @@ -4020,7 +3912,7 @@ func (*LookupOfferRequest) ProtoMessage() {} func (x *LookupOfferRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4065,11 +3957,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -4080,7 +3970,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4137,11 +4027,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -4152,7 +4040,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4209,11 +4097,9 @@ type ListSkusRequest struct { func (x *ListSkusRequest) Reset() { *x = ListSkusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkusRequest) String() string { @@ -4224,7 +4110,7 @@ func (*ListSkusRequest) ProtoMessage() {} func (x *ListSkusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4288,11 +4174,9 @@ type ListSkusResponse struct { func (x *ListSkusResponse) Reset() { *x = ListSkusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSkusResponse) String() string { @@ -4303,7 +4187,7 @@ func (*ListSkusResponse) ProtoMessage() {} func (x *ListSkusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4366,11 +4250,9 @@ type ListOffersRequest struct { func (x *ListOffersRequest) Reset() { *x = ListOffersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOffersRequest) String() string { @@ -4381,7 +4263,7 @@ func (*ListOffersRequest) ProtoMessage() {} func (x *ListOffersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4452,11 +4334,9 @@ type ListOffersResponse struct { func (x *ListOffersResponse) Reset() { *x = ListOffersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOffersResponse) String() string { @@ -4467,7 +4347,7 @@ func (*ListOffersResponse) ProtoMessage() {} func (x *ListOffersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4526,11 +4406,9 @@ type ListPurchasableSkusRequest struct { func (x *ListPurchasableSkusRequest) Reset() { *x = ListPurchasableSkusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableSkusRequest) String() string { @@ -4541,7 +4419,7 @@ func (*ListPurchasableSkusRequest) ProtoMessage() {} func (x *ListPurchasableSkusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4639,11 +4517,9 @@ type ListPurchasableSkusResponse struct { func (x *ListPurchasableSkusResponse) Reset() { *x = ListPurchasableSkusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableSkusResponse) String() string { @@ -4654,7 +4530,7 @@ func (*ListPurchasableSkusResponse) ProtoMessage() {} func (x *ListPurchasableSkusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4696,11 +4572,9 @@ type PurchasableSku struct { func (x *PurchasableSku) Reset() { *x = PurchasableSku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchasableSku) String() string { @@ -4711,7 +4585,7 @@ func (*PurchasableSku) ProtoMessage() {} func (x *PurchasableSku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4763,11 +4637,9 @@ type ListPurchasableOffersRequest struct { func (x *ListPurchasableOffersRequest) Reset() { *x = ListPurchasableOffersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableOffersRequest) String() string { @@ -4778,7 +4650,7 @@ func (*ListPurchasableOffersRequest) ProtoMessage() {} func (x *ListPurchasableOffersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4876,11 +4748,9 @@ type ListPurchasableOffersResponse struct { func (x *ListPurchasableOffersResponse) Reset() { *x = ListPurchasableOffersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableOffersResponse) String() string { @@ -4891,7 +4761,7 @@ func (*ListPurchasableOffersResponse) ProtoMessage() {} func (x *ListPurchasableOffersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4933,11 +4803,9 @@ type PurchasableOffer struct { func (x *PurchasableOffer) Reset() { *x = PurchasableOffer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchasableOffer) String() string { @@ -4948,7 +4816,7 @@ func (*PurchasableOffer) ProtoMessage() {} func (x *PurchasableOffer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4986,11 +4854,9 @@ type QueryEligibleBillingAccountsRequest struct { func (x *QueryEligibleBillingAccountsRequest) Reset() { *x = QueryEligibleBillingAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryEligibleBillingAccountsRequest) String() string { @@ -5001,7 +4867,7 @@ func (*QueryEligibleBillingAccountsRequest) ProtoMessage() {} func (x *QueryEligibleBillingAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5045,11 +4911,9 @@ type QueryEligibleBillingAccountsResponse struct { func (x *QueryEligibleBillingAccountsResponse) Reset() { *x = QueryEligibleBillingAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryEligibleBillingAccountsResponse) String() string { @@ -5060,7 +4924,7 @@ func (*QueryEligibleBillingAccountsResponse) ProtoMessage() {} func (x *QueryEligibleBillingAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5098,11 +4962,9 @@ type SkuPurchaseGroup struct { func (x *SkuPurchaseGroup) Reset() { *x = SkuPurchaseGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkuPurchaseGroup) String() string { @@ -5113,7 +4975,7 @@ func (*SkuPurchaseGroup) ProtoMessage() {} func (x *SkuPurchaseGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5154,11 +5016,9 @@ type BillingAccountPurchaseInfo struct { func (x *BillingAccountPurchaseInfo) Reset() { *x = BillingAccountPurchaseInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BillingAccountPurchaseInfo) String() string { @@ -5169,7 +5029,7 @@ func (*BillingAccountPurchaseInfo) ProtoMessage() {} func (x *BillingAccountPurchaseInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5206,11 +5066,9 @@ type RegisterSubscriberRequest struct { func (x *RegisterSubscriberRequest) Reset() { *x = RegisterSubscriberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterSubscriberRequest) String() string { @@ -5221,7 +5079,7 @@ func (*RegisterSubscriberRequest) ProtoMessage() {} func (x *RegisterSubscriberRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5262,11 +5120,9 @@ type RegisterSubscriberResponse struct { func (x *RegisterSubscriberResponse) Reset() { *x = RegisterSubscriberResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterSubscriberResponse) String() string { @@ -5277,7 +5133,7 @@ func (*RegisterSubscriberResponse) ProtoMessage() {} func (x *RegisterSubscriberResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5314,11 +5170,9 @@ type UnregisterSubscriberRequest struct { func (x *UnregisterSubscriberRequest) Reset() { *x = UnregisterSubscriberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnregisterSubscriberRequest) String() string { @@ -5329,7 +5183,7 @@ func (*UnregisterSubscriberRequest) ProtoMessage() {} func (x *UnregisterSubscriberRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5370,11 +5224,9 @@ type UnregisterSubscriberResponse struct { func (x *UnregisterSubscriberResponse) Reset() { *x = UnregisterSubscriberResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnregisterSubscriberResponse) String() string { @@ -5385,7 +5237,7 @@ func (*UnregisterSubscriberResponse) ProtoMessage() {} func (x *UnregisterSubscriberResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5430,11 +5282,9 @@ type ListSubscribersRequest struct { func (x *ListSubscribersRequest) Reset() { *x = ListSubscribersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscribersRequest) String() string { @@ -5445,7 +5295,7 @@ func (*ListSubscribersRequest) ProtoMessage() {} func (x *ListSubscribersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5498,11 +5348,9 @@ type ListSubscribersResponse struct { func (x *ListSubscribersResponse) Reset() { *x = ListSubscribersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscribersResponse) String() string { @@ -5513,7 +5361,7 @@ func (*ListSubscribersResponse) ProtoMessage() {} func (x *ListSubscribersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5582,11 +5430,9 @@ type ListEntitlementChangesRequest struct { func (x *ListEntitlementChangesRequest) Reset() { *x = ListEntitlementChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementChangesRequest) String() string { @@ -5597,7 +5443,7 @@ func (*ListEntitlementChangesRequest) ProtoMessage() {} func (x *ListEntitlementChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5655,11 +5501,9 @@ type ListEntitlementChangesResponse struct { func (x *ListEntitlementChangesResponse) Reset() { *x = ListEntitlementChangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementChangesResponse) String() string { @@ -5670,7 +5514,7 @@ func (*ListEntitlementChangesResponse) ProtoMessage() {} func (x *ListEntitlementChangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5714,11 +5558,9 @@ type ListPurchasableSkusRequest_CreateEntitlementPurchase struct { func (x *ListPurchasableSkusRequest_CreateEntitlementPurchase) Reset() { *x = ListPurchasableSkusRequest_CreateEntitlementPurchase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableSkusRequest_CreateEntitlementPurchase) String() string { @@ -5729,7 +5571,7 @@ func (*ListPurchasableSkusRequest_CreateEntitlementPurchase) ProtoMessage() {} func (x *ListPurchasableSkusRequest_CreateEntitlementPurchase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5769,11 +5611,9 @@ type ListPurchasableSkusRequest_ChangeOfferPurchase struct { func (x *ListPurchasableSkusRequest_ChangeOfferPurchase) Reset() { *x = ListPurchasableSkusRequest_ChangeOfferPurchase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableSkusRequest_ChangeOfferPurchase) String() string { @@ -5784,7 +5624,7 @@ func (*ListPurchasableSkusRequest_ChangeOfferPurchase) ProtoMessage() {} func (x *ListPurchasableSkusRequest_ChangeOfferPurchase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5829,11 +5669,9 @@ type ListPurchasableOffersRequest_CreateEntitlementPurchase struct { func (x *ListPurchasableOffersRequest_CreateEntitlementPurchase) Reset() { *x = ListPurchasableOffersRequest_CreateEntitlementPurchase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableOffersRequest_CreateEntitlementPurchase) String() string { @@ -5844,7 +5682,7 @@ func (*ListPurchasableOffersRequest_CreateEntitlementPurchase) ProtoMessage() {} func (x *ListPurchasableOffersRequest_CreateEntitlementPurchase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5898,11 +5736,9 @@ type ListPurchasableOffersRequest_ChangeOfferPurchase struct { func (x *ListPurchasableOffersRequest_ChangeOfferPurchase) Reset() { *x = ListPurchasableOffersRequest_ChangeOfferPurchase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPurchasableOffersRequest_ChangeOfferPurchase) String() string { @@ -5913,7 +5749,7 @@ func (*ListPurchasableOffersRequest_ChangeOfferPurchase) ProtoMessage() {} func (x *ListPurchasableOffersRequest_ChangeOfferPurchase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7829,992 +7665,6 @@ func file_google_cloud_channel_v1_service_proto_init() { file_google_cloud_channel_v1_operations_proto_init() file_google_cloud_channel_v1_products_proto_init() file_google_cloud_channel_v1_repricing_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckCloudIdentityAccountsExistRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudIdentityCustomerAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CheckCloudIdentityAccountsExistResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionCloudIdentityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferableSkusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferableSkusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferableOffersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferableOffersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TransferableOffer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelPartnerLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelPartnerLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelPartnerLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelPartnerLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChannelPartnerLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomerRepricingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomerRepricingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelPartnerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelPartnerRepricingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelPartnerRepricingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelPartnerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChannelPartnerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChannelPartnerRepricingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSkuGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListSkuGroupBillableSkusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListSkuGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListSkuGroupBillableSkusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SkuGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*BillableSku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*TransferEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*TransferEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*TransferEntitlementsToGoogleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ChangeParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ChangeRenewalSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ChangeOfferRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*StartPaidServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*CancelEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SuspendEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ActivateEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*LookupOfferRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ListSkusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ListSkusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*ListOffersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*ListOffersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableSkusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableSkusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*PurchasableSku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableOffersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableOffersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*PurchasableOffer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*QueryEligibleBillingAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*QueryEligibleBillingAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*SkuPurchaseGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*BillingAccountPurchaseInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*RegisterSubscriberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*RegisterSubscriberResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*UnregisterSubscriberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*UnregisterSubscriberResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscribersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscribersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementChangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableSkusRequest_CreateEntitlementPurchase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableSkusRequest_ChangeOfferPurchase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableOffersRequest_CreateEntitlementPurchase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ListPurchasableOffersRequest_ChangeOfferPurchase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_service_proto_msgTypes[9].OneofWrappers = []any{ (*ImportCustomerRequest_Domain)(nil), (*ImportCustomerRequest_CloudIdentityId)(nil), diff --git a/channel/apiv1/channelpb/subscriber_event.pb.go b/channel/apiv1/channelpb/subscriber_event.pb.go index b5304de60298..3712ac44a6c6 100755 --- a/channel/apiv1/channelpb/subscriber_event.pb.go +++ b/channel/apiv1/channelpb/subscriber_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/channel/v1/subscriber_event.proto @@ -200,11 +200,9 @@ type CustomerEvent struct { func (x *CustomerEvent) Reset() { *x = CustomerEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerEvent) String() string { @@ -215,7 +213,7 @@ func (*CustomerEvent) ProtoMessage() {} func (x *CustomerEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,11 +257,9 @@ type EntitlementEvent struct { func (x *EntitlementEvent) Reset() { *x = EntitlementEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntitlementEvent) String() string { @@ -274,7 +270,7 @@ func (*EntitlementEvent) ProtoMessage() {} func (x *EntitlementEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +318,9 @@ type SubscriberEvent struct { func (x *SubscriberEvent) Reset() { *x = SubscriberEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscriberEvent) String() string { @@ -337,7 +331,7 @@ func (*SubscriberEvent) ProtoMessage() {} func (x *SubscriberEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,44 +499,6 @@ func file_google_cloud_channel_v1_subscriber_event_proto_init() { if File_google_cloud_channel_v1_subscriber_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomerEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EntitlementEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SubscriberEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_channel_v1_subscriber_event_proto_msgTypes[2].OneofWrappers = []any{ (*SubscriberEvent_CustomerEvent)(nil), (*SubscriberEvent_EntitlementEvent)(nil), diff --git a/channel/apiv1/cloud_channel_client.go b/channel/apiv1/cloud_channel_client.go index b524bbb0c911..ccdcdce7c772 100755 --- a/channel/apiv1/cloud_channel_client.go +++ b/channel/apiv1/cloud_channel_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -2668,6 +2667,8 @@ type cloudChannelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudChannelClient creates a new cloud channel service client based on gRPC. @@ -2717,6 +2718,7 @@ func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*C connPool: connPool, cloudChannelClient: channelpb.NewCloudChannelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -2780,6 +2782,8 @@ type cloudChannelRESTClient struct { // Points back to the CallOptions field of the containing CloudChannelClient CallOptions **CloudChannelCallOptions + + logger *slog.Logger } // NewCloudChannelRESTClient creates a new cloud channel service rest client. @@ -2820,6 +2824,7 @@ func NewCloudChannelRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -2893,7 +2898,7 @@ func (c *cloudChannelGRPCClient) ListCustomers(ctx context.Context, req *channel } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListCustomers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListCustomers, req, settings.GRPC, c.logger, "ListCustomers") return err }, opts...) if err != nil { @@ -2928,7 +2933,7 @@ func (c *cloudChannelGRPCClient) GetCustomer(ctx context.Context, req *channelpb var resp *channelpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.GetCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.GetCustomer, req, settings.GRPC, c.logger, "GetCustomer") return err }, opts...) if err != nil { @@ -2946,7 +2951,7 @@ func (c *cloudChannelGRPCClient) CheckCloudIdentityAccountsExist(ctx context.Con var resp *channelpb.CheckCloudIdentityAccountsExistResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CheckCloudIdentityAccountsExist(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CheckCloudIdentityAccountsExist, req, settings.GRPC, c.logger, "CheckCloudIdentityAccountsExist") return err }, opts...) if err != nil { @@ -2964,7 +2969,7 @@ func (c *cloudChannelGRPCClient) CreateCustomer(ctx context.Context, req *channe var resp *channelpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CreateCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CreateCustomer, req, settings.GRPC, c.logger, "CreateCustomer") return err }, opts...) if err != nil { @@ -2982,7 +2987,7 @@ func (c *cloudChannelGRPCClient) UpdateCustomer(ctx context.Context, req *channe var resp *channelpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.UpdateCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.UpdateCustomer, req, settings.GRPC, c.logger, "UpdateCustomer") return err }, opts...) if err != nil { @@ -2999,7 +3004,7 @@ func (c *cloudChannelGRPCClient) DeleteCustomer(ctx context.Context, req *channe opts = append((*c.CallOptions).DeleteCustomer[0:len((*c.CallOptions).DeleteCustomer):len((*c.CallOptions).DeleteCustomer)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cloudChannelClient.DeleteCustomer(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cloudChannelClient.DeleteCustomer, req, settings.GRPC, c.logger, "DeleteCustomer") return err }, opts...) return err @@ -3014,7 +3019,7 @@ func (c *cloudChannelGRPCClient) ImportCustomer(ctx context.Context, req *channe var resp *channelpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ImportCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ImportCustomer, req, settings.GRPC, c.logger, "ImportCustomer") return err }, opts...) if err != nil { @@ -3032,7 +3037,7 @@ func (c *cloudChannelGRPCClient) ProvisionCloudIdentity(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ProvisionCloudIdentity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ProvisionCloudIdentity, req, settings.GRPC, c.logger, "ProvisionCloudIdentity") return err }, opts...) if err != nil { @@ -3063,7 +3068,7 @@ func (c *cloudChannelGRPCClient) ListEntitlements(ctx context.Context, req *chan } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListEntitlements(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListEntitlements, req, settings.GRPC, c.logger, "ListEntitlements") return err }, opts...) if err != nil { @@ -3109,7 +3114,7 @@ func (c *cloudChannelGRPCClient) ListTransferableSkus(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListTransferableSkus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListTransferableSkus, req, settings.GRPC, c.logger, "ListTransferableSkus") return err }, opts...) if err != nil { @@ -3155,7 +3160,7 @@ func (c *cloudChannelGRPCClient) ListTransferableOffers(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListTransferableOffers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListTransferableOffers, req, settings.GRPC, c.logger, "ListTransferableOffers") return err }, opts...) if err != nil { @@ -3190,7 +3195,7 @@ func (c *cloudChannelGRPCClient) GetEntitlement(ctx context.Context, req *channe var resp *channelpb.Entitlement err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.GetEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.GetEntitlement, req, settings.GRPC, c.logger, "GetEntitlement") return err }, opts...) if err != nil { @@ -3208,7 +3213,7 @@ func (c *cloudChannelGRPCClient) CreateEntitlement(ctx context.Context, req *cha var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CreateEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CreateEntitlement, req, settings.GRPC, c.logger, "CreateEntitlement") return err }, opts...) if err != nil { @@ -3228,7 +3233,7 @@ func (c *cloudChannelGRPCClient) ChangeParameters(ctx context.Context, req *chan var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ChangeParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ChangeParameters, req, settings.GRPC, c.logger, "ChangeParameters") return err }, opts...) if err != nil { @@ -3248,7 +3253,7 @@ func (c *cloudChannelGRPCClient) ChangeRenewalSettings(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ChangeRenewalSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ChangeRenewalSettings, req, settings.GRPC, c.logger, "ChangeRenewalSettings") return err }, opts...) if err != nil { @@ -3268,7 +3273,7 @@ func (c *cloudChannelGRPCClient) ChangeOffer(ctx context.Context, req *channelpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ChangeOffer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ChangeOffer, req, settings.GRPC, c.logger, "ChangeOffer") return err }, opts...) if err != nil { @@ -3288,7 +3293,7 @@ func (c *cloudChannelGRPCClient) StartPaidService(ctx context.Context, req *chan var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.StartPaidService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.StartPaidService, req, settings.GRPC, c.logger, "StartPaidService") return err }, opts...) if err != nil { @@ -3308,7 +3313,7 @@ func (c *cloudChannelGRPCClient) SuspendEntitlement(ctx context.Context, req *ch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.SuspendEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.SuspendEntitlement, req, settings.GRPC, c.logger, "SuspendEntitlement") return err }, opts...) if err != nil { @@ -3328,7 +3333,7 @@ func (c *cloudChannelGRPCClient) CancelEntitlement(ctx context.Context, req *cha var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CancelEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CancelEntitlement, req, settings.GRPC, c.logger, "CancelEntitlement") return err }, opts...) if err != nil { @@ -3348,7 +3353,7 @@ func (c *cloudChannelGRPCClient) ActivateEntitlement(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ActivateEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ActivateEntitlement, req, settings.GRPC, c.logger, "ActivateEntitlement") return err }, opts...) if err != nil { @@ -3368,7 +3373,7 @@ func (c *cloudChannelGRPCClient) TransferEntitlements(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.TransferEntitlements(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.TransferEntitlements, req, settings.GRPC, c.logger, "TransferEntitlements") return err }, opts...) if err != nil { @@ -3388,7 +3393,7 @@ func (c *cloudChannelGRPCClient) TransferEntitlementsToGoogle(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.TransferEntitlementsToGoogle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.TransferEntitlementsToGoogle, req, settings.GRPC, c.logger, "TransferEntitlementsToGoogle") return err }, opts...) if err != nil { @@ -3419,7 +3424,7 @@ func (c *cloudChannelGRPCClient) ListChannelPartnerLinks(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListChannelPartnerLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListChannelPartnerLinks, req, settings.GRPC, c.logger, "ListChannelPartnerLinks") return err }, opts...) if err != nil { @@ -3454,7 +3459,7 @@ func (c *cloudChannelGRPCClient) GetChannelPartnerLink(ctx context.Context, req var resp *channelpb.ChannelPartnerLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.GetChannelPartnerLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.GetChannelPartnerLink, req, settings.GRPC, c.logger, "GetChannelPartnerLink") return err }, opts...) if err != nil { @@ -3472,7 +3477,7 @@ func (c *cloudChannelGRPCClient) CreateChannelPartnerLink(ctx context.Context, r var resp *channelpb.ChannelPartnerLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CreateChannelPartnerLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CreateChannelPartnerLink, req, settings.GRPC, c.logger, "CreateChannelPartnerLink") return err }, opts...) if err != nil { @@ -3490,7 +3495,7 @@ func (c *cloudChannelGRPCClient) UpdateChannelPartnerLink(ctx context.Context, r var resp *channelpb.ChannelPartnerLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.UpdateChannelPartnerLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.UpdateChannelPartnerLink, req, settings.GRPC, c.logger, "UpdateChannelPartnerLink") return err }, opts...) if err != nil { @@ -3508,7 +3513,7 @@ func (c *cloudChannelGRPCClient) GetCustomerRepricingConfig(ctx context.Context, var resp *channelpb.CustomerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.GetCustomerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.GetCustomerRepricingConfig, req, settings.GRPC, c.logger, "GetCustomerRepricingConfig") return err }, opts...) if err != nil { @@ -3537,7 +3542,7 @@ func (c *cloudChannelGRPCClient) ListCustomerRepricingConfigs(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListCustomerRepricingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListCustomerRepricingConfigs, req, settings.GRPC, c.logger, "ListCustomerRepricingConfigs") return err }, opts...) if err != nil { @@ -3572,7 +3577,7 @@ func (c *cloudChannelGRPCClient) CreateCustomerRepricingConfig(ctx context.Conte var resp *channelpb.CustomerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CreateCustomerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CreateCustomerRepricingConfig, req, settings.GRPC, c.logger, "CreateCustomerRepricingConfig") return err }, opts...) if err != nil { @@ -3590,7 +3595,7 @@ func (c *cloudChannelGRPCClient) UpdateCustomerRepricingConfig(ctx context.Conte var resp *channelpb.CustomerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.UpdateCustomerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.UpdateCustomerRepricingConfig, req, settings.GRPC, c.logger, "UpdateCustomerRepricingConfig") return err }, opts...) if err != nil { @@ -3607,7 +3612,7 @@ func (c *cloudChannelGRPCClient) DeleteCustomerRepricingConfig(ctx context.Conte opts = append((*c.CallOptions).DeleteCustomerRepricingConfig[0:len((*c.CallOptions).DeleteCustomerRepricingConfig):len((*c.CallOptions).DeleteCustomerRepricingConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cloudChannelClient.DeleteCustomerRepricingConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cloudChannelClient.DeleteCustomerRepricingConfig, req, settings.GRPC, c.logger, "DeleteCustomerRepricingConfig") return err }, opts...) return err @@ -3622,7 +3627,7 @@ func (c *cloudChannelGRPCClient) GetChannelPartnerRepricingConfig(ctx context.Co var resp *channelpb.ChannelPartnerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.GetChannelPartnerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.GetChannelPartnerRepricingConfig, req, settings.GRPC, c.logger, "GetChannelPartnerRepricingConfig") return err }, opts...) if err != nil { @@ -3651,7 +3656,7 @@ func (c *cloudChannelGRPCClient) ListChannelPartnerRepricingConfigs(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListChannelPartnerRepricingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListChannelPartnerRepricingConfigs, req, settings.GRPC, c.logger, "ListChannelPartnerRepricingConfigs") return err }, opts...) if err != nil { @@ -3686,7 +3691,7 @@ func (c *cloudChannelGRPCClient) CreateChannelPartnerRepricingConfig(ctx context var resp *channelpb.ChannelPartnerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.CreateChannelPartnerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.CreateChannelPartnerRepricingConfig, req, settings.GRPC, c.logger, "CreateChannelPartnerRepricingConfig") return err }, opts...) if err != nil { @@ -3704,7 +3709,7 @@ func (c *cloudChannelGRPCClient) UpdateChannelPartnerRepricingConfig(ctx context var resp *channelpb.ChannelPartnerRepricingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.UpdateChannelPartnerRepricingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.UpdateChannelPartnerRepricingConfig, req, settings.GRPC, c.logger, "UpdateChannelPartnerRepricingConfig") return err }, opts...) if err != nil { @@ -3721,7 +3726,7 @@ func (c *cloudChannelGRPCClient) DeleteChannelPartnerRepricingConfig(ctx context opts = append((*c.CallOptions).DeleteChannelPartnerRepricingConfig[0:len((*c.CallOptions).DeleteChannelPartnerRepricingConfig):len((*c.CallOptions).DeleteChannelPartnerRepricingConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cloudChannelClient.DeleteChannelPartnerRepricingConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cloudChannelClient.DeleteChannelPartnerRepricingConfig, req, settings.GRPC, c.logger, "DeleteChannelPartnerRepricingConfig") return err }, opts...) return err @@ -3747,7 +3752,7 @@ func (c *cloudChannelGRPCClient) ListSkuGroups(ctx context.Context, req *channel } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListSkuGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListSkuGroups, req, settings.GRPC, c.logger, "ListSkuGroups") return err }, opts...) if err != nil { @@ -3793,7 +3798,7 @@ func (c *cloudChannelGRPCClient) ListSkuGroupBillableSkus(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListSkuGroupBillableSkus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListSkuGroupBillableSkus, req, settings.GRPC, c.logger, "ListSkuGroupBillableSkus") return err }, opts...) if err != nil { @@ -3828,7 +3833,7 @@ func (c *cloudChannelGRPCClient) LookupOffer(ctx context.Context, req *channelpb var resp *channelpb.Offer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.LookupOffer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.LookupOffer, req, settings.GRPC, c.logger, "LookupOffer") return err }, opts...) if err != nil { @@ -3854,7 +3859,7 @@ func (c *cloudChannelGRPCClient) ListProducts(ctx context.Context, req *channelp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -3900,7 +3905,7 @@ func (c *cloudChannelGRPCClient) ListSkus(ctx context.Context, req *channelpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListSkus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListSkus, req, settings.GRPC, c.logger, "ListSkus") return err }, opts...) if err != nil { @@ -3946,7 +3951,7 @@ func (c *cloudChannelGRPCClient) ListOffers(ctx context.Context, req *channelpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListOffers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListOffers, req, settings.GRPC, c.logger, "ListOffers") return err }, opts...) if err != nil { @@ -3992,7 +3997,7 @@ func (c *cloudChannelGRPCClient) ListPurchasableSkus(ctx context.Context, req *c } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListPurchasableSkus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListPurchasableSkus, req, settings.GRPC, c.logger, "ListPurchasableSkus") return err }, opts...) if err != nil { @@ -4038,7 +4043,7 @@ func (c *cloudChannelGRPCClient) ListPurchasableOffers(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListPurchasableOffers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListPurchasableOffers, req, settings.GRPC, c.logger, "ListPurchasableOffers") return err }, opts...) if err != nil { @@ -4073,7 +4078,7 @@ func (c *cloudChannelGRPCClient) QueryEligibleBillingAccounts(ctx context.Contex var resp *channelpb.QueryEligibleBillingAccountsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.QueryEligibleBillingAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.QueryEligibleBillingAccounts, req, settings.GRPC, c.logger, "QueryEligibleBillingAccounts") return err }, opts...) if err != nil { @@ -4091,7 +4096,7 @@ func (c *cloudChannelGRPCClient) RegisterSubscriber(ctx context.Context, req *ch var resp *channelpb.RegisterSubscriberResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.RegisterSubscriber(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.RegisterSubscriber, req, settings.GRPC, c.logger, "RegisterSubscriber") return err }, opts...) if err != nil { @@ -4109,7 +4114,7 @@ func (c *cloudChannelGRPCClient) UnregisterSubscriber(ctx context.Context, req * var resp *channelpb.UnregisterSubscriberResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.UnregisterSubscriber(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.UnregisterSubscriber, req, settings.GRPC, c.logger, "UnregisterSubscriber") return err }, opts...) if err != nil { @@ -4138,7 +4143,7 @@ func (c *cloudChannelGRPCClient) ListSubscribers(ctx context.Context, req *chann } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListSubscribers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListSubscribers, req, settings.GRPC, c.logger, "ListSubscribers") return err }, opts...) if err != nil { @@ -4184,7 +4189,7 @@ func (c *cloudChannelGRPCClient) ListEntitlementChanges(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelClient.ListEntitlementChanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelClient.ListEntitlementChanges, req, settings.GRPC, c.logger, "ListEntitlementChanges") return err }, opts...) if err != nil { @@ -4218,7 +4223,7 @@ func (c *cloudChannelGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -4232,7 +4237,7 @@ func (c *cloudChannelGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -4247,7 +4252,7 @@ func (c *cloudChannelGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -4276,7 +4281,7 @@ func (c *cloudChannelGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -4361,21 +4366,10 @@ func (c *cloudChannelRESTClient) ListCustomers(ctx context.Context, req *channel } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4452,17 +4446,7 @@ func (c *cloudChannelRESTClient) GetCustomer(ctx context.Context, req *channelpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomer") if err != nil { return err } @@ -4538,17 +4522,7 @@ func (c *cloudChannelRESTClient) CheckCloudIdentityAccountsExist(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckCloudIdentityAccountsExist") if err != nil { return err } @@ -4625,17 +4599,7 @@ func (c *cloudChannelRESTClient) CreateCustomer(ctx context.Context, req *channe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomer") if err != nil { return err } @@ -4713,17 +4677,7 @@ func (c *cloudChannelRESTClient) UpdateCustomer(ctx context.Context, req *channe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomer") if err != nil { return err } @@ -4782,15 +4736,8 @@ func (c *cloudChannelRESTClient) DeleteCustomer(ctx context.Context, req *channe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomer") + return err }, opts...) } @@ -4857,17 +4804,7 @@ func (c *cloudChannelRESTClient) ImportCustomer(ctx context.Context, req *channe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCustomer") if err != nil { return err } @@ -4952,21 +4889,10 @@ func (c *cloudChannelRESTClient) ProvisionCloudIdentity(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionCloudIdentity") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5040,21 +4966,10 @@ func (c *cloudChannelRESTClient) ListEntitlements(ctx context.Context, req *chan } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntitlements") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5151,21 +5066,10 @@ func (c *cloudChannelRESTClient) ListTransferableSkus(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListTransferableSkus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5266,21 +5170,10 @@ func (c *cloudChannelRESTClient) ListTransferableOffers(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListTransferableOffers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5355,17 +5248,7 @@ func (c *cloudChannelRESTClient) GetEntitlement(ctx context.Context, req *channe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntitlement") if err != nil { return err } @@ -5476,21 +5359,10 @@ func (c *cloudChannelRESTClient) CreateEntitlement(ctx context.Context, req *cha httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5572,21 +5444,10 @@ func (c *cloudChannelRESTClient) ChangeParameters(ctx context.Context, req *chan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ChangeParameters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5669,21 +5530,10 @@ func (c *cloudChannelRESTClient) ChangeRenewalSettings(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ChangeRenewalSettings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5763,21 +5613,10 @@ func (c *cloudChannelRESTClient) ChangeOffer(ctx context.Context, req *channelpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ChangeOffer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5861,21 +5700,10 @@ func (c *cloudChannelRESTClient) StartPaidService(ctx context.Context, req *chan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartPaidService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5956,21 +5784,10 @@ func (c *cloudChannelRESTClient) SuspendEntitlement(ctx context.Context, req *ch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuspendEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6057,21 +5874,10 @@ func (c *cloudChannelRESTClient) CancelEntitlement(ctx context.Context, req *cha httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6159,21 +5965,10 @@ func (c *cloudChannelRESTClient) ActivateEntitlement(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ActivateEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6274,21 +6069,10 @@ func (c *cloudChannelRESTClient) TransferEntitlements(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TransferEntitlements") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6383,21 +6167,10 @@ func (c *cloudChannelRESTClient) TransferEntitlementsToGoogle(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TransferEntitlementsToGoogle") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6475,21 +6248,10 @@ func (c *cloudChannelRESTClient) ListChannelPartnerLinks(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannelPartnerLinks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6571,17 +6333,7 @@ func (c *cloudChannelRESTClient) GetChannelPartnerLink(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannelPartnerLink") if err != nil { return err } @@ -6665,17 +6417,7 @@ func (c *cloudChannelRESTClient) CreateChannelPartnerLink(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannelPartnerLink") if err != nil { return err } @@ -6759,17 +6501,7 @@ func (c *cloudChannelRESTClient) UpdateChannelPartnerLink(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChannelPartnerLink") if err != nil { return err } @@ -6837,17 +6569,7 @@ func (c *cloudChannelRESTClient) GetCustomerRepricingConfig(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomerRepricingConfig") if err != nil { return err } @@ -6941,21 +6663,10 @@ func (c *cloudChannelRESTClient) ListCustomerRepricingConfigs(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomerRepricingConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7072,17 +6783,7 @@ func (c *cloudChannelRESTClient) CreateCustomerRepricingConfig(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomerRepricingConfig") if err != nil { return err } @@ -7173,17 +6874,7 @@ func (c *cloudChannelRESTClient) UpdateCustomerRepricingConfig(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomerRepricingConfig") if err != nil { return err } @@ -7249,15 +6940,8 @@ func (c *cloudChannelRESTClient) DeleteCustomerRepricingConfig(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomerRepricingConfig") + return err }, opts...) } @@ -7312,17 +6996,7 @@ func (c *cloudChannelRESTClient) GetChannelPartnerRepricingConfig(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannelPartnerRepricingConfig") if err != nil { return err } @@ -7414,21 +7088,10 @@ func (c *cloudChannelRESTClient) ListChannelPartnerRepricingConfigs(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannelPartnerRepricingConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7546,17 +7209,7 @@ func (c *cloudChannelRESTClient) CreateChannelPartnerRepricingConfig(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannelPartnerRepricingConfig") if err != nil { return err } @@ -7647,17 +7300,7 @@ func (c *cloudChannelRESTClient) UpdateChannelPartnerRepricingConfig(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChannelPartnerRepricingConfig") if err != nil { return err } @@ -7723,15 +7366,8 @@ func (c *cloudChannelRESTClient) DeleteChannelPartnerRepricingConfig(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChannelPartnerRepricingConfig") + return err }, opts...) } @@ -7799,21 +7435,10 @@ func (c *cloudChannelRESTClient) ListSkuGroups(ctx context.Context, req *channel } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSkuGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7907,21 +7532,10 @@ func (c *cloudChannelRESTClient) ListSkuGroupBillableSkus(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSkuGroupBillableSkus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7995,17 +7609,7 @@ func (c *cloudChannelRESTClient) LookupOffer(ctx context.Context, req *channelpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupOffer") if err != nil { return err } @@ -8075,21 +7679,10 @@ func (c *cloudChannelRESTClient) ListProducts(ctx context.Context, req *channelp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8172,21 +7765,10 @@ func (c *cloudChannelRESTClient) ListSkus(ctx context.Context, req *channelpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSkus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8274,21 +7856,10 @@ func (c *cloudChannelRESTClient) ListOffers(ctx context.Context, req *channelpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOffers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8379,21 +7950,10 @@ func (c *cloudChannelRESTClient) ListPurchasableSkus(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPurchasableSkus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8497,21 +8057,10 @@ func (c *cloudChannelRESTClient) ListPurchasableOffers(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPurchasableOffers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8591,17 +8140,7 @@ func (c *cloudChannelRESTClient) QueryEligibleBillingAccounts(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryEligibleBillingAccounts") if err != nil { return err } @@ -8677,17 +8216,7 @@ func (c *cloudChannelRESTClient) RegisterSubscriber(ctx context.Context, req *ch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RegisterSubscriber") if err != nil { return err } @@ -8767,17 +8296,7 @@ func (c *cloudChannelRESTClient) UnregisterSubscriber(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnregisterSubscriber") if err != nil { return err } @@ -8859,21 +8378,10 @@ func (c *cloudChannelRESTClient) ListSubscribers(ctx context.Context, req *chann } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubscribers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8970,21 +8478,10 @@ func (c *cloudChannelRESTClient) ListEntitlementChanges(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntitlementChanges") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9050,15 +8547,8 @@ func (c *cloudChannelRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -9092,15 +8582,8 @@ func (c *cloudChannelRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -9137,17 +8620,7 @@ func (c *cloudChannelRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -9212,21 +8685,10 @@ func (c *cloudChannelRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/channel/apiv1/cloud_channel_client_example_go123_test.go b/channel/apiv1/cloud_channel_client_example_go123_test.go index 17df433ae56e..0893a28dd2d4 100644 --- a/channel/apiv1/cloud_channel_client_example_go123_test.go +++ b/channel/apiv1/cloud_channel_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCloudChannelClient_ListChannelPartnerLinks_all() { } for resp, err := range c.ListChannelPartnerLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCloudChannelClient_ListChannelPartnerRepricingConfigs_all() { } for resp, err := range c.ListChannelPartnerRepricingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleCloudChannelClient_ListCustomerRepricingConfigs_all() { } for resp, err := range c.ListCustomerRepricingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleCloudChannelClient_ListCustomers_all() { } for resp, err := range c.ListCustomers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleCloudChannelClient_ListEntitlementChanges_all() { } for resp, err := range c.ListEntitlementChanges(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleCloudChannelClient_ListEntitlements_all() { } for resp, err := range c.ListEntitlements(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleCloudChannelClient_ListOffers_all() { } for resp, err := range c.ListOffers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleCloudChannelClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleCloudChannelClient_ListPurchasableOffers_all() { } for resp, err := range c.ListPurchasableOffers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleCloudChannelClient_ListPurchasableSkus_all() { } for resp, err := range c.ListPurchasableSkus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleCloudChannelClient_ListSkuGroupBillableSkus_all() { } for resp, err := range c.ListSkuGroupBillableSkus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -331,7 +331,7 @@ func ExampleCloudChannelClient_ListSkuGroups_all() { } for resp, err := range c.ListSkuGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -357,7 +357,7 @@ func ExampleCloudChannelClient_ListSkus_all() { } for resp, err := range c.ListSkus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -383,7 +383,7 @@ func ExampleCloudChannelClient_ListSubscribers_all() { } for resp, err := range c.ListSubscribers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -409,7 +409,7 @@ func ExampleCloudChannelClient_ListTransferableOffers_all() { } for resp, err := range c.ListTransferableOffers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -435,7 +435,7 @@ func ExampleCloudChannelClient_ListTransferableSkus_all() { } for resp, err := range c.ListTransferableSkus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -461,7 +461,7 @@ func ExampleCloudChannelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/channel/apiv1/cloud_channel_reports_client.go b/channel/apiv1/cloud_channel_reports_client.go index 006b89b2b410..df1b4528c4e4 100755 --- a/channel/apiv1/cloud_channel_reports_client.go +++ b/channel/apiv1/cloud_channel_reports_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -268,6 +267,8 @@ type cloudChannelReportsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudChannelReportsClient creates a new cloud channel reports service client based on gRPC. @@ -303,6 +304,7 @@ func NewCloudChannelReportsClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, cloudChannelReportsClient: channelpb.NewCloudChannelReportsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -366,6 +368,8 @@ type cloudChannelReportsRESTClient struct { // Points back to the CallOptions field of the containing CloudChannelReportsClient CallOptions **CloudChannelReportsCallOptions + + logger *slog.Logger } // NewCloudChannelReportsRESTClient creates a new cloud channel reports service rest client. @@ -392,6 +396,7 @@ func NewCloudChannelReportsRESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -454,7 +459,7 @@ func (c *cloudChannelReportsGRPCClient) RunReportJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelReportsClient.RunReportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelReportsClient.RunReportJob, req, settings.GRPC, c.logger, "RunReportJob") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *cloudChannelReportsGRPCClient) FetchReportResults(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelReportsClient.FetchReportResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelReportsClient.FetchReportResults, req, settings.GRPC, c.logger, "FetchReportResults") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *cloudChannelReportsGRPCClient) ListReports(ctx context.Context, req *ch } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudChannelReportsClient.ListReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudChannelReportsClient.ListReports, req, settings.GRPC, c.logger, "ListReports") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *cloudChannelReportsGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -579,7 +584,7 @@ func (c *cloudChannelReportsGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -594,7 +599,7 @@ func (c *cloudChannelReportsGRPCClient) GetOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -623,7 +628,7 @@ func (c *cloudChannelReportsGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -721,21 +726,10 @@ func (c *cloudChannelReportsRESTClient) RunReportJob(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunReportJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -805,21 +799,10 @@ func (c *cloudChannelReportsRESTClient) FetchReportResults(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchReportResults") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -904,21 +887,10 @@ func (c *cloudChannelReportsRESTClient) ListReports(ctx context.Context, req *ch } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -984,15 +956,8 @@ func (c *cloudChannelReportsRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1026,15 +991,8 @@ func (c *cloudChannelReportsRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1071,17 +1029,7 @@ func (c *cloudChannelReportsRESTClient) GetOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1146,21 +1094,10 @@ func (c *cloudChannelReportsRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/channel/apiv1/cloud_channel_reports_client_example_go123_test.go b/channel/apiv1/cloud_channel_reports_client_example_go123_test.go index 3deb3ea1d74e..44ef76ea1320 100644 --- a/channel/apiv1/cloud_channel_reports_client_example_go123_test.go +++ b/channel/apiv1/cloud_channel_reports_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCloudChannelReportsClient_FetchReportResults_all() { } for resp, err := range c.FetchReportResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCloudChannelReportsClient_ListReports_all() { } for resp, err := range c.ListReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleCloudChannelReportsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/channel/apiv1/helpers.go b/channel/apiv1/helpers.go index c41eee6c5616..e9bcade9badd 100755 --- a/channel/apiv1/helpers.go +++ b/channel/apiv1/helpers.go @@ -18,10 +18,20 @@ package channel import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudchannel.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/apps.reports.usage.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/chat/apiv1/chat_client.go b/chat/apiv1/chat_client.go index 987aa093e41f..13beae3da974 100755 --- a/chat/apiv1/chat_client.go +++ b/chat/apiv1/chat_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( chatpb "cloud.google.com/go/chat/apiv1/chatpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1421,6 +1420,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new chat service client based on gRPC. @@ -1448,6 +1449,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: chatpb.NewChatServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1494,6 +1496,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new chat service rest client. @@ -1512,6 +1516,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1564,7 +1569,7 @@ func (c *gRPCClient) CreateMessage(ctx context.Context, req *chatpb.CreateMessag var resp *chatpb.Message err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMessage, req, settings.GRPC, c.logger, "CreateMessage") return err }, opts...) if err != nil { @@ -1593,7 +1598,7 @@ func (c *gRPCClient) ListMessages(ctx context.Context, req *chatpb.ListMessagesR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMessages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMessages, req, settings.GRPC, c.logger, "ListMessages") return err }, opts...) if err != nil { @@ -1639,7 +1644,7 @@ func (c *gRPCClient) ListMemberships(ctx context.Context, req *chatpb.ListMember } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMemberships(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMemberships, req, settings.GRPC, c.logger, "ListMemberships") return err }, opts...) if err != nil { @@ -1674,7 +1679,7 @@ func (c *gRPCClient) GetMembership(ctx context.Context, req *chatpb.GetMembershi var resp *chatpb.Membership err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMembership, req, settings.GRPC, c.logger, "GetMembership") return err }, opts...) if err != nil { @@ -1692,7 +1697,7 @@ func (c *gRPCClient) GetMessage(ctx context.Context, req *chatpb.GetMessageReque var resp *chatpb.Message err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMessage, req, settings.GRPC, c.logger, "GetMessage") return err }, opts...) if err != nil { @@ -1710,7 +1715,7 @@ func (c *gRPCClient) UpdateMessage(ctx context.Context, req *chatpb.UpdateMessag var resp *chatpb.Message err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMessage, req, settings.GRPC, c.logger, "UpdateMessage") return err }, opts...) if err != nil { @@ -1727,7 +1732,7 @@ func (c *gRPCClient) DeleteMessage(ctx context.Context, req *chatpb.DeleteMessag opts = append((*c.CallOptions).DeleteMessage[0:len((*c.CallOptions).DeleteMessage):len((*c.CallOptions).DeleteMessage)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteMessage(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteMessage, req, settings.GRPC, c.logger, "DeleteMessage") return err }, opts...) return err @@ -1742,7 +1747,7 @@ func (c *gRPCClient) GetAttachment(ctx context.Context, req *chatpb.GetAttachmen var resp *chatpb.Attachment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAttachment, req, settings.GRPC, c.logger, "GetAttachment") return err }, opts...) if err != nil { @@ -1760,7 +1765,7 @@ func (c *gRPCClient) UploadAttachment(ctx context.Context, req *chatpb.UploadAtt var resp *chatpb.UploadAttachmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UploadAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UploadAttachment, req, settings.GRPC, c.logger, "UploadAttachment") return err }, opts...) if err != nil { @@ -1786,7 +1791,7 @@ func (c *gRPCClient) ListSpaces(ctx context.Context, req *chatpb.ListSpacesReque } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSpaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSpaces, req, settings.GRPC, c.logger, "ListSpaces") return err }, opts...) if err != nil { @@ -1829,7 +1834,7 @@ func (c *gRPCClient) SearchSpaces(ctx context.Context, req *chatpb.SearchSpacesR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchSpaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchSpaces, req, settings.GRPC, c.logger, "SearchSpaces") return err }, opts...) if err != nil { @@ -1864,7 +1869,7 @@ func (c *gRPCClient) GetSpace(ctx context.Context, req *chatpb.GetSpaceRequest, var resp *chatpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSpace, req, settings.GRPC, c.logger, "GetSpace") return err }, opts...) if err != nil { @@ -1879,7 +1884,7 @@ func (c *gRPCClient) CreateSpace(ctx context.Context, req *chatpb.CreateSpaceReq var resp *chatpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSpace, req, settings.GRPC, c.logger, "CreateSpace") return err }, opts...) if err != nil { @@ -1894,7 +1899,7 @@ func (c *gRPCClient) SetUpSpace(ctx context.Context, req *chatpb.SetUpSpaceReque var resp *chatpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetUpSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetUpSpace, req, settings.GRPC, c.logger, "SetUpSpace") return err }, opts...) if err != nil { @@ -1912,7 +1917,7 @@ func (c *gRPCClient) UpdateSpace(ctx context.Context, req *chatpb.UpdateSpaceReq var resp *chatpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSpace, req, settings.GRPC, c.logger, "UpdateSpace") return err }, opts...) if err != nil { @@ -1929,7 +1934,7 @@ func (c *gRPCClient) DeleteSpace(ctx context.Context, req *chatpb.DeleteSpaceReq opts = append((*c.CallOptions).DeleteSpace[0:len((*c.CallOptions).DeleteSpace):len((*c.CallOptions).DeleteSpace)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSpace(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSpace, req, settings.GRPC, c.logger, "DeleteSpace") return err }, opts...) return err @@ -1944,7 +1949,7 @@ func (c *gRPCClient) CompleteImportSpace(ctx context.Context, req *chatpb.Comple var resp *chatpb.CompleteImportSpaceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CompleteImportSpace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CompleteImportSpace, req, settings.GRPC, c.logger, "CompleteImportSpace") return err }, opts...) if err != nil { @@ -1959,7 +1964,7 @@ func (c *gRPCClient) FindDirectMessage(ctx context.Context, req *chatpb.FindDire var resp *chatpb.Space err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FindDirectMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FindDirectMessage, req, settings.GRPC, c.logger, "FindDirectMessage") return err }, opts...) if err != nil { @@ -1977,7 +1982,7 @@ func (c *gRPCClient) CreateMembership(ctx context.Context, req *chatpb.CreateMem var resp *chatpb.Membership err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMembership, req, settings.GRPC, c.logger, "CreateMembership") return err }, opts...) if err != nil { @@ -1995,7 +2000,7 @@ func (c *gRPCClient) UpdateMembership(ctx context.Context, req *chatpb.UpdateMem var resp *chatpb.Membership err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMembership, req, settings.GRPC, c.logger, "UpdateMembership") return err }, opts...) if err != nil { @@ -2013,7 +2018,7 @@ func (c *gRPCClient) DeleteMembership(ctx context.Context, req *chatpb.DeleteMem var resp *chatpb.Membership err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteMembership, req, settings.GRPC, c.logger, "DeleteMembership") return err }, opts...) if err != nil { @@ -2031,7 +2036,7 @@ func (c *gRPCClient) CreateReaction(ctx context.Context, req *chatpb.CreateReact var resp *chatpb.Reaction err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReaction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReaction, req, settings.GRPC, c.logger, "CreateReaction") return err }, opts...) if err != nil { @@ -2060,7 +2065,7 @@ func (c *gRPCClient) ListReactions(ctx context.Context, req *chatpb.ListReaction } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReactions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReactions, req, settings.GRPC, c.logger, "ListReactions") return err }, opts...) if err != nil { @@ -2094,7 +2099,7 @@ func (c *gRPCClient) DeleteReaction(ctx context.Context, req *chatpb.DeleteReact opts = append((*c.CallOptions).DeleteReaction[0:len((*c.CallOptions).DeleteReaction):len((*c.CallOptions).DeleteReaction)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteReaction(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteReaction, req, settings.GRPC, c.logger, "DeleteReaction") return err }, opts...) return err @@ -2109,7 +2114,7 @@ func (c *gRPCClient) GetSpaceReadState(ctx context.Context, req *chatpb.GetSpace var resp *chatpb.SpaceReadState err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSpaceReadState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSpaceReadState, req, settings.GRPC, c.logger, "GetSpaceReadState") return err }, opts...) if err != nil { @@ -2127,7 +2132,7 @@ func (c *gRPCClient) UpdateSpaceReadState(ctx context.Context, req *chatpb.Updat var resp *chatpb.SpaceReadState err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSpaceReadState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSpaceReadState, req, settings.GRPC, c.logger, "UpdateSpaceReadState") return err }, opts...) if err != nil { @@ -2145,7 +2150,7 @@ func (c *gRPCClient) GetThreadReadState(ctx context.Context, req *chatpb.GetThre var resp *chatpb.ThreadReadState err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetThreadReadState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetThreadReadState, req, settings.GRPC, c.logger, "GetThreadReadState") return err }, opts...) if err != nil { @@ -2163,7 +2168,7 @@ func (c *gRPCClient) GetSpaceEvent(ctx context.Context, req *chatpb.GetSpaceEven var resp *chatpb.SpaceEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSpaceEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSpaceEvent, req, settings.GRPC, c.logger, "GetSpaceEvent") return err }, opts...) if err != nil { @@ -2192,7 +2197,7 @@ func (c *gRPCClient) ListSpaceEvents(ctx context.Context, req *chatpb.ListSpaceE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSpaceEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSpaceEvents, req, settings.GRPC, c.logger, "ListSpaceEvents") return err }, opts...) if err != nil { @@ -2296,17 +2301,7 @@ func (c *restClient) CreateMessage(ctx context.Context, req *chatpb.CreateMessag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMessage") if err != nil { return err } @@ -2386,21 +2381,10 @@ func (c *restClient) ListMessages(ctx context.Context, req *chatpb.ListMessagesR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMessages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2508,21 +2492,10 @@ func (c *restClient) ListMemberships(ctx context.Context, req *chatpb.ListMember } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMemberships") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2601,17 +2574,7 @@ func (c *restClient) GetMembership(ctx context.Context, req *chatpb.GetMembershi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMembership") if err != nil { return err } @@ -2674,17 +2637,7 @@ func (c *restClient) GetMessage(ctx context.Context, req *chatpb.GetMessageReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMessage") if err != nil { return err } @@ -2768,17 +2721,7 @@ func (c *restClient) UpdateMessage(ctx context.Context, req *chatpb.UpdateMessag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMessage") if err != nil { return err } @@ -2842,15 +2785,8 @@ func (c *restClient) DeleteMessage(ctx context.Context, req *chatpb.DeleteMessag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMessage") + return err }, opts...) } @@ -2894,17 +2830,7 @@ func (c *restClient) GetAttachment(ctx context.Context, req *chatpb.GetAttachmen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttachment") if err != nil { return err } @@ -2969,17 +2895,7 @@ func (c *restClient) UploadAttachment(ctx context.Context, req *chatpb.UploadAtt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UploadAttachment") if err != nil { return err } @@ -3060,21 +2976,10 @@ func (c *restClient) ListSpaces(ctx context.Context, req *chatpb.ListSpacesReque } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSpaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3162,21 +3067,10 @@ func (c *restClient) SearchSpaces(ctx context.Context, req *chatpb.SearchSpacesR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchSpaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3255,17 +3149,7 @@ func (c *restClient) GetSpace(ctx context.Context, req *chatpb.GetSpaceRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpace") if err != nil { return err } @@ -3342,17 +3226,7 @@ func (c *restClient) CreateSpace(ctx context.Context, req *chatpb.CreateSpaceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpace") if err != nil { return err } @@ -3456,17 +3330,7 @@ func (c *restClient) SetUpSpace(ctx context.Context, req *chatpb.SetUpSpaceReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUpSpace") if err != nil { return err } @@ -3552,17 +3416,7 @@ func (c *restClient) UpdateSpace(ctx context.Context, req *chatpb.UpdateSpaceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpace") if err != nil { return err } @@ -3629,15 +3483,8 @@ func (c *restClient) DeleteSpace(ctx context.Context, req *chatpb.DeleteSpaceReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSpace") + return err }, opts...) } @@ -3688,17 +3535,7 @@ func (c *restClient) CompleteImportSpace(ctx context.Context, req *chatpb.Comple httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteImportSpace") if err != nil { return err } @@ -3768,17 +3605,7 @@ func (c *restClient) FindDirectMessage(ctx context.Context, req *chatpb.FindDire httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FindDirectMessage") if err != nil { return err } @@ -3867,17 +3694,7 @@ func (c *restClient) CreateMembership(ctx context.Context, req *chatpb.CreateMem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMembership") if err != nil { return err } @@ -3958,17 +3775,7 @@ func (c *restClient) UpdateMembership(ctx context.Context, req *chatpb.UpdateMem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMembership") if err != nil { return err } @@ -4036,17 +3843,7 @@ func (c *restClient) DeleteMembership(ctx context.Context, req *chatpb.DeleteMem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMembership") if err != nil { return err } @@ -4109,17 +3906,7 @@ func (c *restClient) CreateReaction(ctx context.Context, req *chatpb.CreateReact httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReaction") if err != nil { return err } @@ -4189,21 +3976,10 @@ func (c *restClient) ListReactions(ctx context.Context, req *chatpb.ListReaction } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReactions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4269,15 +4045,8 @@ func (c *restClient) DeleteReaction(ctx context.Context, req *chatpb.DeleteReact httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReaction") + return err }, opts...) } @@ -4320,17 +4089,7 @@ func (c *restClient) GetSpaceReadState(ctx context.Context, req *chatpb.GetSpace httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpaceReadState") if err != nil { return err } @@ -4399,17 +4158,7 @@ func (c *restClient) UpdateSpaceReadState(ctx context.Context, req *chatpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpaceReadState") if err != nil { return err } @@ -4465,17 +4214,7 @@ func (c *restClient) GetThreadReadState(ctx context.Context, req *chatpb.GetThre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetThreadReadState") if err != nil { return err } @@ -4541,17 +4280,7 @@ func (c *restClient) GetSpaceEvent(ctx context.Context, req *chatpb.GetSpaceEven httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpaceEvent") if err != nil { return err } @@ -4627,21 +4356,10 @@ func (c *restClient) ListSpaceEvents(ctx context.Context, req *chatpb.ListSpaceE } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSpaceEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/chat/apiv1/chat_client_example_go123_test.go b/chat/apiv1/chat_client_example_go123_test.go index ee7802139fed..756f27a34314 100644 --- a/chat/apiv1/chat_client_example_go123_test.go +++ b/chat/apiv1/chat_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListMemberships_all() { } for resp, err := range c.ListMemberships(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListMessages_all() { } for resp, err := range c.ListMessages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListReactions_all() { } for resp, err := range c.ListReactions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListSpaceEvents_all() { } for resp, err := range c.ListSpaceEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListSpaces_all() { } for resp, err := range c.ListSpaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_SearchSpaces_all() { } for resp, err := range c.SearchSpaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/chat/apiv1/chatpb/action_status.pb.go b/chat/apiv1/chatpb/action_status.pb.go index fd96f8a4bdbd..10d15fbb2257 100755 --- a/chat/apiv1/chatpb/action_status.pb.go +++ b/chat/apiv1/chatpb/action_status.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/action_status.proto @@ -52,11 +52,9 @@ type ActionStatus struct { func (x *ActionStatus) Reset() { *x = ActionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_action_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_action_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionStatus) String() string { @@ -67,7 +65,7 @@ func (*ActionStatus) ProtoMessage() {} func (x *ActionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_action_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,20 +154,6 @@ func file_google_chat_v1_action_status_proto_init() { if File_google_chat_v1_action_status_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_action_status_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ActionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/annotation.pb.go b/chat/apiv1/chatpb/annotation.pb.go index 72f90dc16026..6c4ad5489268 100755 --- a/chat/apiv1/chatpb/annotation.pb.go +++ b/chat/apiv1/chatpb/annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/annotation.proto @@ -304,11 +304,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -319,7 +317,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +420,9 @@ type UserMentionMetadata struct { func (x *UserMentionMetadata) Reset() { *x = UserMentionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserMentionMetadata) String() string { @@ -437,7 +433,7 @@ func (*UserMentionMetadata) ProtoMessage() {} func (x *UserMentionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +482,9 @@ type SlashCommandMetadata struct { func (x *SlashCommandMetadata) Reset() { *x = SlashCommandMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlashCommandMetadata) String() string { @@ -501,7 +495,7 @@ func (*SlashCommandMetadata) ProtoMessage() {} func (x *SlashCommandMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +566,9 @@ type RichLinkMetadata struct { func (x *RichLinkMetadata) Reset() { *x = RichLinkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RichLinkMetadata) String() string { @@ -587,7 +579,7 @@ func (*RichLinkMetadata) ProtoMessage() {} func (x *RichLinkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +663,9 @@ type DriveLinkData struct { func (x *DriveLinkData) Reset() { *x = DriveLinkData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DriveLinkData) String() string { @@ -686,7 +676,7 @@ func (*DriveLinkData) ProtoMessage() {} func (x *DriveLinkData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +727,9 @@ type ChatSpaceLinkData struct { func (x *ChatSpaceLinkData) Reset() { *x = ChatSpaceLinkData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_annotation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_annotation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChatSpaceLinkData) String() string { @@ -752,7 +740,7 @@ func (*ChatSpaceLinkData) ProtoMessage() {} func (x *ChatSpaceLinkData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_annotation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,80 +958,6 @@ func file_google_chat_v1_annotation_proto_init() { } file_google_chat_v1_attachment_proto_init() file_google_chat_v1_user_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UserMentionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SlashCommandMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RichLinkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_annotation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DriveLinkData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_annotation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ChatSpaceLinkData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_annotation_proto_msgTypes[0].OneofWrappers = []any{ (*Annotation_UserMention)(nil), (*Annotation_SlashCommand)(nil), diff --git a/chat/apiv1/chatpb/attachment.pb.go b/chat/apiv1/chatpb/attachment.pb.go index a624210aaa57..6207e9ac48c8 100755 --- a/chat/apiv1/chatpb/attachment.pb.go +++ b/chat/apiv1/chatpb/attachment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/attachment.proto @@ -123,11 +123,9 @@ type Attachment struct { func (x *Attachment) Reset() { *x = Attachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attachment) String() string { @@ -138,7 +136,7 @@ func (*Attachment) ProtoMessage() {} func (x *Attachment) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +247,9 @@ type DriveDataRef struct { func (x *DriveDataRef) Reset() { *x = DriveDataRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DriveDataRef) String() string { @@ -264,7 +260,7 @@ func (*DriveDataRef) ProtoMessage() {} func (x *DriveDataRef) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +299,9 @@ type AttachmentDataRef struct { func (x *AttachmentDataRef) Reset() { *x = AttachmentDataRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachmentDataRef) String() string { @@ -318,7 +312,7 @@ func (*AttachmentDataRef) ProtoMessage() {} func (x *AttachmentDataRef) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +354,9 @@ type GetAttachmentRequest struct { func (x *GetAttachmentRequest) Reset() { *x = GetAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttachmentRequest) String() string { @@ -375,7 +367,7 @@ func (*GetAttachmentRequest) ProtoMessage() {} func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +404,9 @@ type UploadAttachmentRequest struct { func (x *UploadAttachmentRequest) Reset() { *x = UploadAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadAttachmentRequest) String() string { @@ -427,7 +417,7 @@ func (*UploadAttachmentRequest) ProtoMessage() {} func (x *UploadAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -468,11 +458,9 @@ type UploadAttachmentResponse struct { func (x *UploadAttachmentResponse) Reset() { *x = UploadAttachmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_attachment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_attachment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadAttachmentResponse) String() string { @@ -483,7 +471,7 @@ func (*UploadAttachmentResponse) ProtoMessage() {} func (x *UploadAttachmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_attachment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,80 +625,6 @@ func file_google_chat_v1_attachment_proto_init() { if File_google_chat_v1_attachment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_attachment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_attachment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DriveDataRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_attachment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttachmentDataRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_attachment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_attachment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UploadAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_attachment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UploadAttachmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_attachment_proto_msgTypes[0].OneofWrappers = []any{ (*Attachment_AttachmentDataRef)(nil), (*Attachment_DriveDataRef)(nil), diff --git a/chat/apiv1/chatpb/chat_service.pb.go b/chat/apiv1/chatpb/chat_service.pb.go index 48b3e9e6468f..27bec411941e 100755 --- a/chat/apiv1/chatpb/chat_service.pb.go +++ b/chat/apiv1/chatpb/chat_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/chat_service.proto diff --git a/chat/apiv1/chatpb/contextual_addon.pb.go b/chat/apiv1/chatpb/contextual_addon.pb.go index 445b9bdde67b..c12acf05f6a9 100755 --- a/chat/apiv1/chatpb/contextual_addon.pb.go +++ b/chat/apiv1/chatpb/contextual_addon.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/contextual_addon.proto @@ -95,11 +95,9 @@ type ContextualAddOnMarkup struct { func (x *ContextualAddOnMarkup) Reset() { *x = ContextualAddOnMarkup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualAddOnMarkup) String() string { @@ -110,7 +108,7 @@ func (*ContextualAddOnMarkup) ProtoMessage() {} func (x *ContextualAddOnMarkup) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type ContextualAddOnMarkup_Card struct { func (x *ContextualAddOnMarkup_Card) Reset() { *x = ContextualAddOnMarkup_Card{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualAddOnMarkup_Card) String() string { @@ -159,7 +155,7 @@ func (*ContextualAddOnMarkup_Card) ProtoMessage() {} func (x *ContextualAddOnMarkup_Card) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type ContextualAddOnMarkup_Card_CardHeader struct { func (x *ContextualAddOnMarkup_Card_CardHeader) Reset() { *x = ContextualAddOnMarkup_Card_CardHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualAddOnMarkup_Card_CardHeader) String() string { @@ -236,7 +230,7 @@ func (*ContextualAddOnMarkup_Card_CardHeader) ProtoMessage() {} func (x *ContextualAddOnMarkup_Card_CardHeader) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +298,9 @@ type ContextualAddOnMarkup_Card_Section struct { func (x *ContextualAddOnMarkup_Card_Section) Reset() { *x = ContextualAddOnMarkup_Card_Section{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualAddOnMarkup_Card_Section) String() string { @@ -319,7 +311,7 @@ func (*ContextualAddOnMarkup_Card_Section) ProtoMessage() {} func (x *ContextualAddOnMarkup_Card_Section) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +359,9 @@ type ContextualAddOnMarkup_Card_CardAction struct { func (x *ContextualAddOnMarkup_Card_CardAction) Reset() { *x = ContextualAddOnMarkup_Card_CardAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualAddOnMarkup_Card_CardAction) String() string { @@ -382,7 +372,7 @@ func (*ContextualAddOnMarkup_Card_CardAction) ProtoMessage() {} func (x *ContextualAddOnMarkup_Card_CardAction) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_contextual_addon_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,68 +515,6 @@ func file_google_chat_v1_contextual_addon_proto_init() { return } file_google_chat_v1_widgets_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_contextual_addon_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContextualAddOnMarkup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_contextual_addon_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContextualAddOnMarkup_Card); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_contextual_addon_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContextualAddOnMarkup_Card_CardHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_contextual_addon_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContextualAddOnMarkup_Card_Section); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_contextual_addon_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ContextualAddOnMarkup_Card_CardAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/deletion_metadata.pb.go b/chat/apiv1/chatpb/deletion_metadata.pb.go index 90a7263413be..e97cc14a4ab4 100755 --- a/chat/apiv1/chatpb/deletion_metadata.pb.go +++ b/chat/apiv1/chatpb/deletion_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/deletion_metadata.proto @@ -118,11 +118,9 @@ type DeletionMetadata struct { func (x *DeletionMetadata) Reset() { *x = DeletionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_deletion_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_deletion_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletionMetadata) String() string { @@ -133,7 +131,7 @@ func (*DeletionMetadata) ProtoMessage() {} func (x *DeletionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_deletion_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,20 +222,6 @@ func file_google_chat_v1_deletion_metadata_proto_init() { if File_google_chat_v1_deletion_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_deletion_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeletionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/event_payload.pb.go b/chat/apiv1/chatpb/event_payload.pb.go index b04ee398c1fb..d40e66f0baa2 100755 --- a/chat/apiv1/chatpb/event_payload.pb.go +++ b/chat/apiv1/chatpb/event_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/event_payload.proto @@ -50,11 +50,9 @@ type MembershipCreatedEventData struct { func (x *MembershipCreatedEventData) Reset() { *x = MembershipCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipCreatedEventData) String() string { @@ -65,7 +63,7 @@ func (*MembershipCreatedEventData) ProtoMessage() {} func (x *MembershipCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101,11 +99,9 @@ type MembershipDeletedEventData struct { func (x *MembershipDeletedEventData) Reset() { *x = MembershipDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipDeletedEventData) String() string { @@ -116,7 +112,7 @@ func (*MembershipDeletedEventData) ProtoMessage() {} func (x *MembershipDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +148,9 @@ type MembershipUpdatedEventData struct { func (x *MembershipUpdatedEventData) Reset() { *x = MembershipUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipUpdatedEventData) String() string { @@ -167,7 +161,7 @@ func (*MembershipUpdatedEventData) ProtoMessage() {} func (x *MembershipUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +197,9 @@ type MembershipBatchCreatedEventData struct { func (x *MembershipBatchCreatedEventData) Reset() { *x = MembershipBatchCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipBatchCreatedEventData) String() string { @@ -218,7 +210,7 @@ func (*MembershipBatchCreatedEventData) ProtoMessage() {} func (x *MembershipBatchCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +246,9 @@ type MembershipBatchUpdatedEventData struct { func (x *MembershipBatchUpdatedEventData) Reset() { *x = MembershipBatchUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipBatchUpdatedEventData) String() string { @@ -269,7 +259,7 @@ func (*MembershipBatchUpdatedEventData) ProtoMessage() {} func (x *MembershipBatchUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +295,9 @@ type MembershipBatchDeletedEventData struct { func (x *MembershipBatchDeletedEventData) Reset() { *x = MembershipBatchDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipBatchDeletedEventData) String() string { @@ -320,7 +308,7 @@ func (*MembershipBatchDeletedEventData) ProtoMessage() {} func (x *MembershipBatchDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +344,9 @@ type MessageCreatedEventData struct { func (x *MessageCreatedEventData) Reset() { *x = MessageCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageCreatedEventData) String() string { @@ -371,7 +357,7 @@ func (*MessageCreatedEventData) ProtoMessage() {} func (x *MessageCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +393,9 @@ type MessageUpdatedEventData struct { func (x *MessageUpdatedEventData) Reset() { *x = MessageUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageUpdatedEventData) String() string { @@ -422,7 +406,7 @@ func (*MessageUpdatedEventData) ProtoMessage() {} func (x *MessageUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +443,9 @@ type MessageDeletedEventData struct { func (x *MessageDeletedEventData) Reset() { *x = MessageDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageDeletedEventData) String() string { @@ -474,7 +456,7 @@ func (*MessageDeletedEventData) ProtoMessage() {} func (x *MessageDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +492,9 @@ type MessageBatchCreatedEventData struct { func (x *MessageBatchCreatedEventData) Reset() { *x = MessageBatchCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageBatchCreatedEventData) String() string { @@ -525,7 +505,7 @@ func (*MessageBatchCreatedEventData) ProtoMessage() {} func (x *MessageBatchCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +541,9 @@ type MessageBatchUpdatedEventData struct { func (x *MessageBatchUpdatedEventData) Reset() { *x = MessageBatchUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageBatchUpdatedEventData) String() string { @@ -576,7 +554,7 @@ func (*MessageBatchUpdatedEventData) ProtoMessage() {} func (x *MessageBatchUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +590,9 @@ type MessageBatchDeletedEventData struct { func (x *MessageBatchDeletedEventData) Reset() { *x = MessageBatchDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageBatchDeletedEventData) String() string { @@ -627,7 +603,7 @@ func (*MessageBatchDeletedEventData) ProtoMessage() {} func (x *MessageBatchDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +639,9 @@ type SpaceUpdatedEventData struct { func (x *SpaceUpdatedEventData) Reset() { *x = SpaceUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceUpdatedEventData) String() string { @@ -678,7 +652,7 @@ func (*SpaceUpdatedEventData) ProtoMessage() {} func (x *SpaceUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +688,9 @@ type SpaceBatchUpdatedEventData struct { func (x *SpaceBatchUpdatedEventData) Reset() { *x = SpaceBatchUpdatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceBatchUpdatedEventData) String() string { @@ -729,7 +701,7 @@ func (*SpaceBatchUpdatedEventData) ProtoMessage() {} func (x *SpaceBatchUpdatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +737,9 @@ type ReactionCreatedEventData struct { func (x *ReactionCreatedEventData) Reset() { *x = ReactionCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactionCreatedEventData) String() string { @@ -780,7 +750,7 @@ func (*ReactionCreatedEventData) ProtoMessage() {} func (x *ReactionCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +786,9 @@ type ReactionDeletedEventData struct { func (x *ReactionDeletedEventData) Reset() { *x = ReactionDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactionDeletedEventData) String() string { @@ -831,7 +799,7 @@ func (*ReactionDeletedEventData) ProtoMessage() {} func (x *ReactionDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +835,9 @@ type ReactionBatchCreatedEventData struct { func (x *ReactionBatchCreatedEventData) Reset() { *x = ReactionBatchCreatedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactionBatchCreatedEventData) String() string { @@ -882,7 +848,7 @@ func (*ReactionBatchCreatedEventData) ProtoMessage() {} func (x *ReactionBatchCreatedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +884,9 @@ type ReactionBatchDeletedEventData struct { func (x *ReactionBatchDeletedEventData) Reset() { *x = ReactionBatchDeletedEventData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_event_payload_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_event_payload_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReactionBatchDeletedEventData) String() string { @@ -933,7 +897,7 @@ func (*ReactionBatchDeletedEventData) ProtoMessage() {} func (x *ReactionBatchDeletedEventData) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_event_payload_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,224 +1126,6 @@ func file_google_chat_v1_event_payload_proto_init() { file_google_chat_v1_message_proto_init() file_google_chat_v1_reaction_proto_init() file_google_chat_v1_space_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_event_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MembershipCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MembershipDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MembershipUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MembershipBatchCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MembershipBatchUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MembershipBatchDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MessageCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MessageUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MessageDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MessageBatchCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MessageBatchUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MessageBatchDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SpaceUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SpaceBatchUpdatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReactionCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ReactionDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ReactionBatchCreatedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_event_payload_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReactionBatchDeletedEventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/group.pb.go b/chat/apiv1/chatpb/group.pb.go index 7f72bb9297a8..7070161b48f6 100755 --- a/chat/apiv1/chatpb/group.pb.go +++ b/chat/apiv1/chatpb/group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/group.proto @@ -53,11 +53,9 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Group) String() string { @@ -68,7 +66,7 @@ func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,20 +138,6 @@ func file_google_chat_v1_group_proto_init() { if File_google_chat_v1_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/history_state.pb.go b/chat/apiv1/chatpb/history_state.pb.go index feb09544346e..a04362e579a7 100755 --- a/chat/apiv1/chatpb/history_state.pb.go +++ b/chat/apiv1/chatpb/history_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/history_state.proto diff --git a/chat/apiv1/chatpb/matched_url.pb.go b/chat/apiv1/chatpb/matched_url.pb.go index 6e06689d3287..88355b4ca31b 100755 --- a/chat/apiv1/chatpb/matched_url.pb.go +++ b/chat/apiv1/chatpb/matched_url.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/matched_url.proto @@ -50,11 +50,9 @@ type MatchedUrl struct { func (x *MatchedUrl) Reset() { *x = MatchedUrl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_matched_url_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_matched_url_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchedUrl) String() string { @@ -65,7 +63,7 @@ func (*MatchedUrl) ProtoMessage() {} func (x *MatchedUrl) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_matched_url_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,20 +138,6 @@ func file_google_chat_v1_matched_url_proto_init() { if File_google_chat_v1_matched_url_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_matched_url_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MatchedUrl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/membership.pb.go b/chat/apiv1/chatpb/membership.pb.go index 5849b81715bb..c49d32723ddb 100755 --- a/chat/apiv1/chatpb/membership.pb.go +++ b/chat/apiv1/chatpb/membership.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/membership.proto @@ -198,11 +198,9 @@ type Membership struct { func (x *Membership) Reset() { *x = Membership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Membership) String() string { @@ -213,7 +211,7 @@ func (*Membership) ProtoMessage() {} func (x *Membership) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +375,9 @@ type CreateMembershipRequest struct { func (x *CreateMembershipRequest) Reset() { *x = CreateMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMembershipRequest) String() string { @@ -392,7 +388,7 @@ func (*CreateMembershipRequest) ProtoMessage() {} func (x *CreateMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +454,9 @@ type UpdateMembershipRequest struct { func (x *UpdateMembershipRequest) Reset() { *x = UpdateMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMembershipRequest) String() string { @@ -473,7 +467,7 @@ func (*UpdateMembershipRequest) ProtoMessage() {} func (x *UpdateMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +603,9 @@ type ListMembershipsRequest struct { func (x *ListMembershipsRequest) Reset() { *x = ListMembershipsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMembershipsRequest) String() string { @@ -624,7 +616,7 @@ func (*ListMembershipsRequest) ProtoMessage() {} func (x *ListMembershipsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +695,9 @@ type ListMembershipsResponse struct { func (x *ListMembershipsResponse) Reset() { *x = ListMembershipsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMembershipsResponse) String() string { @@ -718,7 +708,7 @@ func (*ListMembershipsResponse) ProtoMessage() {} func (x *ListMembershipsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +772,9 @@ type GetMembershipRequest struct { func (x *GetMembershipRequest) Reset() { *x = GetMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMembershipRequest) String() string { @@ -797,7 +785,7 @@ func (*GetMembershipRequest) ProtoMessage() {} func (x *GetMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +851,9 @@ type DeleteMembershipRequest struct { func (x *DeleteMembershipRequest) Reset() { *x = DeleteMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_membership_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_membership_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMembershipRequest) String() string { @@ -878,7 +864,7 @@ func (*DeleteMembershipRequest) ProtoMessage() {} func (x *DeleteMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_membership_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,92 +1092,6 @@ func file_google_chat_v1_membership_proto_init() { } file_google_chat_v1_group_proto_init() file_google_chat_v1_user_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Membership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMembershipsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListMembershipsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_membership_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_membership_proto_msgTypes[0].OneofWrappers = []any{ (*Membership_Member)(nil), (*Membership_GroupMember)(nil), diff --git a/chat/apiv1/chatpb/message.pb.go b/chat/apiv1/chatpb/message.pb.go index 3418acd94a2b..7079e04b748d 100755 --- a/chat/apiv1/chatpb/message.pb.go +++ b/chat/apiv1/chatpb/message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/message.proto @@ -353,11 +353,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -368,7 +366,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +576,9 @@ type AttachedGif struct { func (x *AttachedGif) Reset() { *x = AttachedGif{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedGif) String() string { @@ -593,7 +589,7 @@ func (*AttachedGif) ProtoMessage() {} func (x *AttachedGif) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +628,9 @@ type QuotedMessageMetadata struct { func (x *QuotedMessageMetadata) Reset() { *x = QuotedMessageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotedMessageMetadata) String() string { @@ -647,7 +641,7 @@ func (*QuotedMessageMetadata) ProtoMessage() {} func (x *QuotedMessageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +699,9 @@ type Thread struct { func (x *Thread) Reset() { *x = Thread{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Thread) String() string { @@ -720,7 +712,7 @@ func (*Thread) ProtoMessage() {} func (x *Thread) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -770,11 +762,9 @@ type ActionResponse struct { func (x *ActionResponse) Reset() { *x = ActionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionResponse) String() string { @@ -785,7 +775,7 @@ func (*ActionResponse) ProtoMessage() {} func (x *ActionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +836,9 @@ type AccessoryWidget struct { func (x *AccessoryWidget) Reset() { *x = AccessoryWidget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessoryWidget) String() string { @@ -861,7 +849,7 @@ func (*AccessoryWidget) ProtoMessage() {} func (x *AccessoryWidget) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +908,9 @@ type GetMessageRequest struct { func (x *GetMessageRequest) Reset() { *x = GetMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMessageRequest) String() string { @@ -935,7 +921,7 @@ func (*GetMessageRequest) ProtoMessage() {} func (x *GetMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +970,9 @@ type DeleteMessageRequest struct { func (x *DeleteMessageRequest) Reset() { *x = DeleteMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMessageRequest) String() string { @@ -999,7 +983,7 @@ func (*DeleteMessageRequest) ProtoMessage() {} func (x *DeleteMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1047,9 @@ type UpdateMessageRequest struct { func (x *UpdateMessageRequest) Reset() { *x = UpdateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMessageRequest) String() string { @@ -1078,7 +1060,7 @@ func (*UpdateMessageRequest) ProtoMessage() {} func (x *UpdateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1152,9 @@ type CreateMessageRequest struct { func (x *CreateMessageRequest) Reset() { *x = CreateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMessageRequest) String() string { @@ -1185,7 +1165,7 @@ func (*CreateMessageRequest) ProtoMessage() {} func (x *CreateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1327,11 +1307,9 @@ type ListMessagesRequest struct { func (x *ListMessagesRequest) Reset() { *x = ListMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesRequest) String() string { @@ -1342,7 +1320,7 @@ func (*ListMessagesRequest) ProtoMessage() {} func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1414,11 +1392,9 @@ type ListMessagesResponse struct { func (x *ListMessagesResponse) Reset() { *x = ListMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesResponse) String() string { @@ -1429,7 +1405,7 @@ func (*ListMessagesResponse) ProtoMessage() {} func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1457,9 @@ type DialogAction struct { func (x *DialogAction) Reset() { *x = DialogAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogAction) String() string { @@ -1496,7 +1470,7 @@ func (*DialogAction) ProtoMessage() {} func (x *DialogAction) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1559,11 +1533,9 @@ type Dialog struct { func (x *Dialog) Reset() { *x = Dialog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dialog) String() string { @@ -1574,7 +1546,7 @@ func (*Dialog) ProtoMessage() {} func (x *Dialog) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1619,11 +1591,9 @@ type CardWithId struct { func (x *CardWithId) Reset() { *x = CardWithId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CardWithId) String() string { @@ -1634,7 +1604,7 @@ func (*CardWithId) ProtoMessage() {} func (x *CardWithId) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,11 +1645,9 @@ type ActionResponse_SelectionItems struct { func (x *ActionResponse_SelectionItems) Reset() { *x = ActionResponse_SelectionItems{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionResponse_SelectionItems) String() string { @@ -1690,7 +1658,7 @@ func (*ActionResponse_SelectionItems) ProtoMessage() {} func (x *ActionResponse_SelectionItems) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,11 +1700,9 @@ type ActionResponse_UpdatedWidget struct { func (x *ActionResponse_UpdatedWidget) Reset() { *x = ActionResponse_UpdatedWidget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_message_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_message_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionResponse_UpdatedWidget) String() string { @@ -1747,7 +1713,7 @@ func (*ActionResponse_UpdatedWidget) ProtoMessage() {} func (x *ActionResponse_UpdatedWidget) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_message_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,212 +2199,6 @@ func file_google_chat_v1_message_proto_init() { file_google_chat_v1_slash_command_proto_init() file_google_chat_v1_space_proto_init() file_google_chat_v1_user_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttachedGif); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QuotedMessageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Thread); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ActionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AccessoryWidget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DialogAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Dialog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CardWithId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ActionResponse_SelectionItems); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_message_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ActionResponse_UpdatedWidget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_message_proto_msgTypes[5].OneofWrappers = []any{ (*AccessoryWidget_ButtonList)(nil), } diff --git a/chat/apiv1/chatpb/reaction.pb.go b/chat/apiv1/chatpb/reaction.pb.go index 711cb13d6b9d..3dcf9feb9872 100755 --- a/chat/apiv1/chatpb/reaction.pb.go +++ b/chat/apiv1/chatpb/reaction.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/reaction.proto @@ -54,11 +54,9 @@ type Reaction struct { func (x *Reaction) Reset() { *x = Reaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reaction) String() string { @@ -69,7 +67,7 @@ func (*Reaction) ProtoMessage() {} func (x *Reaction) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type Emoji struct { func (x *Emoji) Reset() { *x = Emoji{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Emoji) String() string { @@ -137,7 +133,7 @@ func (*Emoji) ProtoMessage() {} func (x *Emoji) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type CustomEmoji struct { func (x *CustomEmoji) Reset() { *x = CustomEmoji{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomEmoji) String() string { @@ -218,7 +212,7 @@ func (*CustomEmoji) ProtoMessage() {} func (x *CustomEmoji) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +248,9 @@ type EmojiReactionSummary struct { func (x *EmojiReactionSummary) Reset() { *x = EmojiReactionSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmojiReactionSummary) String() string { @@ -269,7 +261,7 @@ func (*EmojiReactionSummary) ProtoMessage() {} func (x *EmojiReactionSummary) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +306,9 @@ type CreateReactionRequest struct { func (x *CreateReactionRequest) Reset() { *x = CreateReactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReactionRequest) String() string { @@ -329,7 +319,7 @@ func (*CreateReactionRequest) ProtoMessage() {} func (x *CreateReactionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +419,9 @@ type ListReactionsRequest struct { func (x *ListReactionsRequest) Reset() { *x = ListReactionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReactionsRequest) String() string { @@ -444,7 +432,7 @@ func (*ListReactionsRequest) ProtoMessage() {} func (x *ListReactionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,11 +490,9 @@ type ListReactionsResponse struct { func (x *ListReactionsResponse) Reset() { *x = ListReactionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReactionsResponse) String() string { @@ -517,7 +503,7 @@ func (*ListReactionsResponse) ProtoMessage() {} func (x *ListReactionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +546,9 @@ type DeleteReactionRequest struct { func (x *DeleteReactionRequest) Reset() { *x = DeleteReactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_reaction_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_reaction_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReactionRequest) String() string { @@ -575,7 +559,7 @@ func (*DeleteReactionRequest) ProtoMessage() {} func (x *DeleteReactionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_reaction_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,104 +719,6 @@ func file_google_chat_v1_reaction_proto_init() { return } file_google_chat_v1_user_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_reaction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Reaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Emoji); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CustomEmoji); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EmojiReactionSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateReactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListReactionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListReactionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_reaction_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_reaction_proto_msgTypes[1].OneofWrappers = []any{ (*Emoji_Unicode)(nil), (*Emoji_CustomEmoji)(nil), diff --git a/chat/apiv1/chatpb/slash_command.pb.go b/chat/apiv1/chatpb/slash_command.pb.go index dfec1a3aaaab..09d325661f83 100755 --- a/chat/apiv1/chatpb/slash_command.pb.go +++ b/chat/apiv1/chatpb/slash_command.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/slash_command.proto @@ -49,11 +49,9 @@ type SlashCommand struct { func (x *SlashCommand) Reset() { *x = SlashCommand{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_slash_command_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_slash_command_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SlashCommand) String() string { @@ -64,7 +62,7 @@ func (*SlashCommand) ProtoMessage() {} func (x *SlashCommand) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_slash_command_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,20 +136,6 @@ func file_google_chat_v1_slash_command_proto_init() { if File_google_chat_v1_slash_command_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_slash_command_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SlashCommand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/space.pb.go b/chat/apiv1/chatpb/space.pb.go index c9cff1f839cf..b1fed8317a72 100755 --- a/chat/apiv1/chatpb/space.pb.go +++ b/chat/apiv1/chatpb/space.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/space.proto @@ -453,11 +453,9 @@ type Space struct { func (x *Space) Reset() { *x = Space{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space) String() string { @@ -468,7 +466,7 @@ func (*Space) ProtoMessage() {} func (x *Space) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +681,9 @@ type CreateSpaceRequest struct { func (x *CreateSpaceRequest) Reset() { *x = CreateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpaceRequest) String() string { @@ -698,7 +694,7 @@ func (*CreateSpaceRequest) ProtoMessage() {} func (x *CreateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +769,9 @@ type ListSpacesRequest struct { func (x *ListSpacesRequest) Reset() { *x = ListSpacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpacesRequest) String() string { @@ -788,7 +782,7 @@ func (*ListSpacesRequest) ProtoMessage() {} func (x *ListSpacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +835,9 @@ type ListSpacesResponse struct { func (x *ListSpacesResponse) Reset() { *x = ListSpacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpacesResponse) String() string { @@ -856,7 +848,7 @@ func (*ListSpacesResponse) ProtoMessage() {} func (x *ListSpacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +901,9 @@ type GetSpaceRequest struct { func (x *GetSpaceRequest) Reset() { *x = GetSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpaceRequest) String() string { @@ -924,7 +914,7 @@ func (*GetSpaceRequest) ProtoMessage() {} func (x *GetSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +967,9 @@ type FindDirectMessageRequest struct { func (x *FindDirectMessageRequest) Reset() { *x = FindDirectMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindDirectMessageRequest) String() string { @@ -992,7 +980,7 @@ func (*FindDirectMessageRequest) ProtoMessage() {} func (x *FindDirectMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,11 +1093,9 @@ type UpdateSpaceRequest struct { func (x *UpdateSpaceRequest) Reset() { *x = UpdateSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpaceRequest) String() string { @@ -1120,7 +1106,7 @@ func (*UpdateSpaceRequest) ProtoMessage() {} func (x *UpdateSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1275,9 @@ type SearchSpacesRequest struct { func (x *SearchSpacesRequest) Reset() { *x = SearchSpacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchSpacesRequest) String() string { @@ -1304,7 +1288,7 @@ func (*SearchSpacesRequest) ProtoMessage() {} func (x *SearchSpacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,11 +1356,9 @@ type SearchSpacesResponse struct { func (x *SearchSpacesResponse) Reset() { *x = SearchSpacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchSpacesResponse) String() string { @@ -1387,7 +1369,7 @@ func (*SearchSpacesResponse) ProtoMessage() {} func (x *SearchSpacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,11 +1429,9 @@ type DeleteSpaceRequest struct { func (x *DeleteSpaceRequest) Reset() { *x = DeleteSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpaceRequest) String() string { @@ -1462,7 +1442,7 @@ func (*DeleteSpaceRequest) ProtoMessage() {} func (x *DeleteSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1485,9 @@ type CompleteImportSpaceRequest struct { func (x *CompleteImportSpaceRequest) Reset() { *x = CompleteImportSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteImportSpaceRequest) String() string { @@ -1520,7 +1498,7 @@ func (*CompleteImportSpaceRequest) ProtoMessage() {} func (x *CompleteImportSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1554,11 +1532,9 @@ type CompleteImportSpaceResponse struct { func (x *CompleteImportSpaceResponse) Reset() { *x = CompleteImportSpaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteImportSpaceResponse) String() string { @@ -1569,7 +1545,7 @@ func (*CompleteImportSpaceResponse) ProtoMessage() {} func (x *CompleteImportSpaceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1586,9 @@ type Space_SpaceDetails struct { func (x *Space_SpaceDetails) Reset() { *x = Space_SpaceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space_SpaceDetails) String() string { @@ -1625,7 +1599,7 @@ func (*Space_SpaceDetails) ProtoMessage() {} func (x *Space_SpaceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1643,9 @@ type Space_MembershipCount struct { func (x *Space_MembershipCount) Reset() { *x = Space_MembershipCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space_MembershipCount) String() string { @@ -1684,7 +1656,7 @@ func (*Space_MembershipCount) ProtoMessage() {} func (x *Space_MembershipCount) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1757,11 +1729,9 @@ type Space_AccessSettings struct { func (x *Space_AccessSettings) Reset() { *x = Space_AccessSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space_AccessSettings) String() string { @@ -1772,7 +1742,7 @@ func (*Space_AccessSettings) ProtoMessage() {} func (x *Space_AccessSettings) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1832,11 +1802,9 @@ type Space_PermissionSettings struct { func (x *Space_PermissionSettings) Reset() { *x = Space_PermissionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space_PermissionSettings) String() string { @@ -1847,7 +1815,7 @@ func (*Space_PermissionSettings) ProtoMessage() {} func (x *Space_PermissionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1932,11 +1900,9 @@ type Space_PermissionSetting struct { func (x *Space_PermissionSetting) Reset() { *x = Space_PermissionSetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Space_PermissionSetting) String() string { @@ -1947,7 +1913,7 @@ func (*Space_PermissionSetting) ProtoMessage() {} func (x *Space_PermissionSetting) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,212 +2344,6 @@ func file_google_chat_v1_space_proto_init() { return } file_google_chat_v1_history_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_space_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Space); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSpacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSpacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FindDirectMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchSpacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchSpacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompleteImportSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CompleteImportSpaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Space_SpaceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Space_MembershipCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Space_AccessSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Space_PermissionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Space_PermissionSetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_space_proto_msgTypes[0].OneofWrappers = []any{ (*Space_PredefinedPermissionSettings_)(nil), (*Space_PermissionSettings_)(nil), diff --git a/chat/apiv1/chatpb/space_event.pb.go b/chat/apiv1/chatpb/space_event.pb.go index d926473b0e54..09526d4d210c 100755 --- a/chat/apiv1/chatpb/space_event.pb.go +++ b/chat/apiv1/chatpb/space_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/space_event.proto @@ -123,11 +123,9 @@ type SpaceEvent struct { func (x *SpaceEvent) Reset() { *x = SpaceEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceEvent) String() string { @@ -138,7 +136,7 @@ func (*SpaceEvent) ProtoMessage() {} func (x *SpaceEvent) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +485,9 @@ type GetSpaceEventRequest struct { func (x *GetSpaceEventRequest) Reset() { *x = GetSpaceEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpaceEventRequest) String() string { @@ -502,7 +498,7 @@ func (*GetSpaceEventRequest) ProtoMessage() {} func (x *GetSpaceEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +602,9 @@ type ListSpaceEventsRequest struct { func (x *ListSpaceEventsRequest) Reset() { *x = ListSpaceEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpaceEventsRequest) String() string { @@ -621,7 +615,7 @@ func (*ListSpaceEventsRequest) ProtoMessage() {} func (x *ListSpaceEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +675,9 @@ type ListSpaceEventsResponse struct { func (x *ListSpaceEventsResponse) Reset() { *x = ListSpaceEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpaceEventsResponse) String() string { @@ -696,7 +688,7 @@ func (*ListSpaceEventsResponse) ProtoMessage() {} func (x *ListSpaceEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -992,56 +984,6 @@ func file_google_chat_v1_space_event_proto_init() { return } file_google_chat_v1_event_payload_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_space_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpaceEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetSpaceEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSpaceEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSpaceEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_space_event_proto_msgTypes[0].OneofWrappers = []any{ (*SpaceEvent_MessageCreatedEventData)(nil), (*SpaceEvent_MessageUpdatedEventData)(nil), diff --git a/chat/apiv1/chatpb/space_read_state.pb.go b/chat/apiv1/chatpb/space_read_state.pb.go index 0f81c79eaa8f..8af32dc3bded 100755 --- a/chat/apiv1/chatpb/space_read_state.pb.go +++ b/chat/apiv1/chatpb/space_read_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/space_read_state.proto @@ -57,11 +57,9 @@ type SpaceReadState struct { func (x *SpaceReadState) Reset() { *x = SpaceReadState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_read_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_read_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpaceReadState) String() string { @@ -72,7 +70,7 @@ func (*SpaceReadState) ProtoMessage() {} func (x *SpaceReadState) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_read_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type GetSpaceReadStateRequest struct { func (x *GetSpaceReadStateRequest) Reset() { *x = GetSpaceReadStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_read_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_read_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpaceReadStateRequest) String() string { @@ -142,7 +138,7 @@ func (*GetSpaceReadStateRequest) ProtoMessage() {} func (x *GetSpaceReadStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_read_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type UpdateSpaceReadStateRequest struct { func (x *UpdateSpaceReadStateRequest) Reset() { *x = UpdateSpaceReadStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_read_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_read_state_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpaceReadStateRequest) String() string { @@ -219,7 +213,7 @@ func (*UpdateSpaceReadStateRequest) ProtoMessage() {} func (x *UpdateSpaceReadStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_read_state_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,44 +336,6 @@ func file_google_chat_v1_space_read_state_proto_init() { if File_google_chat_v1_space_read_state_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_space_read_state_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpaceReadState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_read_state_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetSpaceReadStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_space_read_state_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpaceReadStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/space_setup.pb.go b/chat/apiv1/chatpb/space_setup.pb.go index 637a5b0c0702..40ff563f3c8f 100755 --- a/chat/apiv1/chatpb/space_setup.pb.go +++ b/chat/apiv1/chatpb/space_setup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/space_setup.proto @@ -107,11 +107,9 @@ type SetUpSpaceRequest struct { func (x *SetUpSpaceRequest) Reset() { *x = SetUpSpaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_space_setup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_space_setup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUpSpaceRequest) String() string { @@ -122,7 +120,7 @@ func (*SetUpSpaceRequest) ProtoMessage() {} func (x *SetUpSpaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_space_setup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,20 +228,6 @@ func file_google_chat_v1_space_setup_proto_init() { } file_google_chat_v1_membership_proto_init() file_google_chat_v1_space_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_space_setup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SetUpSpaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/thread_read_state.pb.go b/chat/apiv1/chatpb/thread_read_state.pb.go index 3487b79f5daa..219c87824883 100755 --- a/chat/apiv1/chatpb/thread_read_state.pb.go +++ b/chat/apiv1/chatpb/thread_read_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/thread_read_state.proto @@ -55,11 +55,9 @@ type ThreadReadState struct { func (x *ThreadReadState) Reset() { *x = ThreadReadState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreadReadState) String() string { @@ -70,7 +68,7 @@ func (*ThreadReadState) ProtoMessage() {} func (x *ThreadReadState) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type GetThreadReadStateRequest struct { func (x *GetThreadReadStateRequest) Reset() { *x = GetThreadReadStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetThreadReadStateRequest) String() string { @@ -141,7 +137,7 @@ func (*GetThreadReadStateRequest) ProtoMessage() {} func (x *GetThreadReadStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_thread_read_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,32 +237,6 @@ func file_google_chat_v1_thread_read_state_proto_init() { if File_google_chat_v1_thread_read_state_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_thread_read_state_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ThreadReadState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_thread_read_state_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetThreadReadStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/user.pb.go b/chat/apiv1/chatpb/user.pb.go index 54e878a6e347..a4badfefaf56 100755 --- a/chat/apiv1/chatpb/user.pb.go +++ b/chat/apiv1/chatpb/user.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/user.proto @@ -134,11 +134,9 @@ type User struct { func (x *User) Reset() { *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *User) String() string { @@ -149,7 +147,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_user_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,20 +266,6 @@ func file_google_chat_v1_user_proto_init() { if File_google_chat_v1_user_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_user_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/chat/apiv1/chatpb/widgets.pb.go b/chat/apiv1/chatpb/widgets.pb.go index 41f22bbc00e2..4e7e00dbbbe6 100755 --- a/chat/apiv1/chatpb/widgets.pb.go +++ b/chat/apiv1/chatpb/widgets.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/chat/v1/widgets.proto @@ -191,11 +191,9 @@ type WidgetMarkup struct { func (x *WidgetMarkup) Reset() { *x = WidgetMarkup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup) String() string { @@ -206,7 +204,7 @@ func (*WidgetMarkup) ProtoMessage() {} func (x *WidgetMarkup) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +297,9 @@ type WidgetMarkup_TextParagraph struct { func (x *WidgetMarkup_TextParagraph) Reset() { *x = WidgetMarkup_TextParagraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_TextParagraph) String() string { @@ -314,7 +310,7 @@ func (*WidgetMarkup_TextParagraph) ProtoMessage() {} func (x *WidgetMarkup_TextParagraph) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +347,9 @@ type WidgetMarkup_Button struct { func (x *WidgetMarkup_Button) Reset() { *x = WidgetMarkup_Button{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_Button) String() string { @@ -366,7 +360,7 @@ func (*WidgetMarkup_Button) ProtoMessage() {} func (x *WidgetMarkup_Button) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +428,9 @@ type WidgetMarkup_TextButton struct { func (x *WidgetMarkup_TextButton) Reset() { *x = WidgetMarkup_TextButton{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_TextButton) String() string { @@ -449,7 +441,7 @@ func (*WidgetMarkup_TextButton) ProtoMessage() {} func (x *WidgetMarkup_TextButton) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +527,9 @@ type WidgetMarkup_KeyValue struct { func (x *WidgetMarkup_KeyValue) Reset() { *x = WidgetMarkup_KeyValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_KeyValue) String() string { @@ -550,7 +540,7 @@ func (*WidgetMarkup_KeyValue) ProtoMessage() {} func (x *WidgetMarkup_KeyValue) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,11 +674,9 @@ type WidgetMarkup_Image struct { func (x *WidgetMarkup_Image) Reset() { *x = WidgetMarkup_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_Image) String() string { @@ -699,7 +687,7 @@ func (*WidgetMarkup_Image) ProtoMessage() {} func (x *WidgetMarkup_Image) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +745,9 @@ type WidgetMarkup_ImageButton struct { func (x *WidgetMarkup_ImageButton) Reset() { *x = WidgetMarkup_ImageButton{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_ImageButton) String() string { @@ -772,7 +758,7 @@ func (*WidgetMarkup_ImageButton) ProtoMessage() {} func (x *WidgetMarkup_ImageButton) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +842,9 @@ type WidgetMarkup_OnClick struct { func (x *WidgetMarkup_OnClick) Reset() { *x = WidgetMarkup_OnClick{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_OnClick) String() string { @@ -871,7 +855,7 @@ func (*WidgetMarkup_OnClick) ProtoMessage() {} func (x *WidgetMarkup_OnClick) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +921,9 @@ type WidgetMarkup_OpenLink struct { func (x *WidgetMarkup_OpenLink) Reset() { *x = WidgetMarkup_OpenLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_OpenLink) String() string { @@ -952,7 +934,7 @@ func (*WidgetMarkup_OpenLink) ProtoMessage() {} func (x *WidgetMarkup_OpenLink) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -992,11 +974,9 @@ type WidgetMarkup_FormAction struct { func (x *WidgetMarkup_FormAction) Reset() { *x = WidgetMarkup_FormAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_FormAction) String() string { @@ -1007,7 +987,7 @@ func (*WidgetMarkup_FormAction) ProtoMessage() {} func (x *WidgetMarkup_FormAction) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1033,9 @@ type WidgetMarkup_FormAction_ActionParameter struct { func (x *WidgetMarkup_FormAction_ActionParameter) Reset() { *x = WidgetMarkup_FormAction_ActionParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_chat_v1_widgets_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_chat_v1_widgets_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WidgetMarkup_FormAction_ActionParameter) String() string { @@ -1068,7 +1046,7 @@ func (*WidgetMarkup_FormAction_ActionParameter) ProtoMessage() {} func (x *WidgetMarkup_FormAction_ActionParameter) ProtoReflect() protoreflect.Message { mi := &file_google_chat_v1_widgets_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1311,140 +1289,6 @@ func file_google_chat_v1_widgets_proto_init() { if File_google_chat_v1_widgets_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_chat_v1_widgets_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_TextParagraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_Button); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_TextButton); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_KeyValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_ImageButton); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_OnClick); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_OpenLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_FormAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_chat_v1_widgets_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*WidgetMarkup_FormAction_ActionParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_chat_v1_widgets_proto_msgTypes[0].OneofWrappers = []any{ (*WidgetMarkup_TextParagraph_)(nil), (*WidgetMarkup_Image_)(nil), diff --git a/chat/apiv1/helpers.go b/chat/apiv1/helpers.go index 50b860669d34..b9bdb699e519 100755 --- a/chat/apiv1/helpers.go +++ b/chat/apiv1/helpers.go @@ -18,10 +18,20 @@ package chat import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "chat.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -63,3 +73,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/chat.users.readstate.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudbuild/apiv1/v2/cloud_build_client.go b/cloudbuild/apiv1/v2/cloud_build_client.go index 32ab7121da48..75e5109c84ce 100755 --- a/cloudbuild/apiv1/v2/cloud_build_client.go +++ b/cloudbuild/apiv1/v2/cloud_build_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -33,7 +33,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -618,6 +617,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new cloud build client based on gRPC. @@ -651,6 +652,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: cloudbuildpb.NewCloudBuildClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -713,6 +715,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new cloud build rest client. @@ -737,6 +741,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -808,7 +813,7 @@ func (c *gRPCClient) CreateBuild(ctx context.Context, req *cloudbuildpb.CreateBu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBuild, req, settings.GRPC, c.logger, "CreateBuild") return err }, opts...) if err != nil { @@ -837,7 +842,7 @@ func (c *gRPCClient) GetBuild(ctx context.Context, req *cloudbuildpb.GetBuildReq var resp *cloudbuildpb.Build err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBuild, req, settings.GRPC, c.logger, "GetBuild") return err }, opts...) if err != nil { @@ -875,7 +880,7 @@ func (c *gRPCClient) ListBuilds(ctx context.Context, req *cloudbuildpb.ListBuild } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBuilds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBuilds, req, settings.GRPC, c.logger, "ListBuilds") return err }, opts...) if err != nil { @@ -919,7 +924,7 @@ func (c *gRPCClient) CancelBuild(ctx context.Context, req *cloudbuildpb.CancelBu var resp *cloudbuildpb.Build err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelBuild, req, settings.GRPC, c.logger, "CancelBuild") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) RetryBuild(ctx context.Context, req *cloudbuildpb.RetryBuil var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetryBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetryBuild, req, settings.GRPC, c.logger, "RetryBuild") return err }, opts...) if err != nil { @@ -975,7 +980,7 @@ func (c *gRPCClient) ApproveBuild(ctx context.Context, req *cloudbuildpb.Approve var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApproveBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApproveBuild, req, settings.GRPC, c.logger, "ApproveBuild") return err }, opts...) if err != nil { @@ -1004,7 +1009,7 @@ func (c *gRPCClient) CreateBuildTrigger(ctx context.Context, req *cloudbuildpb.C var resp *cloudbuildpb.BuildTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBuildTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBuildTrigger, req, settings.GRPC, c.logger, "CreateBuildTrigger") return err }, opts...) if err != nil { @@ -1031,7 +1036,7 @@ func (c *gRPCClient) GetBuildTrigger(ctx context.Context, req *cloudbuildpb.GetB var resp *cloudbuildpb.BuildTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBuildTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBuildTrigger, req, settings.GRPC, c.logger, "GetBuildTrigger") return err }, opts...) if err != nil { @@ -1069,7 +1074,7 @@ func (c *gRPCClient) ListBuildTriggers(ctx context.Context, req *cloudbuildpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBuildTriggers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBuildTriggers, req, settings.GRPC, c.logger, "ListBuildTriggers") return err }, opts...) if err != nil { @@ -1112,7 +1117,7 @@ func (c *gRPCClient) DeleteBuildTrigger(ctx context.Context, req *cloudbuildpb.D opts = append((*c.CallOptions).DeleteBuildTrigger[0:len((*c.CallOptions).DeleteBuildTrigger):len((*c.CallOptions).DeleteBuildTrigger)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteBuildTrigger(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteBuildTrigger, req, settings.GRPC, c.logger, "DeleteBuildTrigger") return err }, opts...) return err @@ -1136,7 +1141,7 @@ func (c *gRPCClient) UpdateBuildTrigger(ctx context.Context, req *cloudbuildpb.U var resp *cloudbuildpb.BuildTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBuildTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBuildTrigger, req, settings.GRPC, c.logger, "UpdateBuildTrigger") return err }, opts...) if err != nil { @@ -1163,7 +1168,7 @@ func (c *gRPCClient) RunBuildTrigger(ctx context.Context, req *cloudbuildpb.RunB var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunBuildTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunBuildTrigger, req, settings.GRPC, c.logger, "RunBuildTrigger") return err }, opts...) if err != nil { @@ -1183,7 +1188,7 @@ func (c *gRPCClient) ReceiveTriggerWebhook(ctx context.Context, req *cloudbuildp var resp *cloudbuildpb.ReceiveTriggerWebhookResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReceiveTriggerWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReceiveTriggerWebhook, req, settings.GRPC, c.logger, "ReceiveTriggerWebhook") return err }, opts...) if err != nil { @@ -1210,7 +1215,7 @@ func (c *gRPCClient) CreateWorkerPool(ctx context.Context, req *cloudbuildpb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkerPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkerPool, req, settings.GRPC, c.logger, "CreateWorkerPool") return err }, opts...) if err != nil { @@ -1239,7 +1244,7 @@ func (c *gRPCClient) GetWorkerPool(ctx context.Context, req *cloudbuildpb.GetWor var resp *cloudbuildpb.WorkerPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkerPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkerPool, req, settings.GRPC, c.logger, "GetWorkerPool") return err }, opts...) if err != nil { @@ -1266,7 +1271,7 @@ func (c *gRPCClient) DeleteWorkerPool(ctx context.Context, req *cloudbuildpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkerPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkerPool, req, settings.GRPC, c.logger, "DeleteWorkerPool") return err }, opts...) if err != nil { @@ -1295,7 +1300,7 @@ func (c *gRPCClient) UpdateWorkerPool(ctx context.Context, req *cloudbuildpb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkerPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkerPool, req, settings.GRPC, c.logger, "UpdateWorkerPool") return err }, opts...) if err != nil { @@ -1335,7 +1340,7 @@ func (c *gRPCClient) ListWorkerPools(ctx context.Context, req *cloudbuildpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkerPools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkerPools, req, settings.GRPC, c.logger, "ListWorkerPools") return err }, opts...) if err != nil { @@ -1416,21 +1421,10 @@ func (c *restClient) CreateBuild(ctx context.Context, req *cloudbuildpb.CreateBu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBuild") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1496,17 +1490,7 @@ func (c *restClient) GetBuild(ctx context.Context, req *cloudbuildpb.GetBuildReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBuild") if err != nil { return err } @@ -1577,21 +1561,10 @@ func (c *restClient) ListBuilds(ctx context.Context, req *cloudbuildpb.ListBuild } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBuilds") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1669,17 +1642,7 @@ func (c *restClient) CancelBuild(ctx context.Context, req *cloudbuildpb.CancelBu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelBuild") if err != nil { return err } @@ -1771,21 +1734,10 @@ func (c *restClient) RetryBuild(ctx context.Context, req *cloudbuildpb.RetryBuil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RetryBuild") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1855,21 +1807,10 @@ func (c *restClient) ApproveBuild(ctx context.Context, req *cloudbuildpb.Approve httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveBuild") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1941,17 +1882,7 @@ func (c *restClient) CreateBuildTrigger(ctx context.Context, req *cloudbuildpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBuildTrigger") if err != nil { return err } @@ -2015,17 +1946,7 @@ func (c *restClient) GetBuildTrigger(ctx context.Context, req *cloudbuildpb.GetB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBuildTrigger") if err != nil { return err } @@ -2092,21 +2013,10 @@ func (c *restClient) ListBuildTriggers(ctx context.Context, req *cloudbuildpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBuildTriggers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2180,15 +2090,8 @@ func (c *restClient) DeleteBuildTrigger(ctx context.Context, req *cloudbuildpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBuildTrigger") + return err }, opts...) } @@ -2250,17 +2153,7 @@ func (c *restClient) UpdateBuildTrigger(ctx context.Context, req *cloudbuildpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBuildTrigger") if err != nil { return err } @@ -2334,21 +2227,10 @@ func (c *restClient) RunBuildTrigger(ctx context.Context, req *cloudbuildpb.RunB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunBuildTrigger") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2413,17 +2295,7 @@ func (c *restClient) ReceiveTriggerWebhook(ctx context.Context, req *cloudbuildp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReceiveTriggerWebhook") if err != nil { return err } @@ -2492,21 +2364,10 @@ func (c *restClient) CreateWorkerPool(ctx context.Context, req *cloudbuildpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkerPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2566,17 +2427,7 @@ func (c *restClient) GetWorkerPool(ctx context.Context, req *cloudbuildpb.GetWor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkerPool") if err != nil { return err } @@ -2643,21 +2494,10 @@ func (c *restClient) DeleteWorkerPool(ctx context.Context, req *cloudbuildpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkerPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2733,21 +2573,10 @@ func (c *restClient) UpdateWorkerPool(ctx context.Context, req *cloudbuildpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkerPool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2810,21 +2639,10 @@ func (c *restClient) ListWorkerPools(ctx context.Context, req *cloudbuildpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkerPools") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/cloudbuild/apiv1/v2/cloud_build_client_example_go123_test.go b/cloudbuild/apiv1/v2/cloud_build_client_example_go123_test.go index 6020c398822b..f07bd7fd1038 100644 --- a/cloudbuild/apiv1/v2/cloud_build_client_example_go123_test.go +++ b/cloudbuild/apiv1/v2/cloud_build_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListBuildTriggers_all() { } for resp, err := range c.ListBuildTriggers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListBuilds_all() { } for resp, err := range c.ListBuilds(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListWorkerPools_all() { } for resp, err := range c.ListWorkerPools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudbuild/apiv1/v2/cloudbuildpb/cloudbuild.pb.go b/cloudbuild/apiv1/v2/cloudbuildpb/cloudbuild.pb.go index 884b6f5be5e1..629f92931b7b 100755 --- a/cloudbuild/apiv1/v2/cloudbuildpb/cloudbuild.pb.go +++ b/cloudbuild/apiv1/v2/cloudbuildpb/cloudbuild.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1263,11 +1263,9 @@ type RetryBuildRequest struct { func (x *RetryBuildRequest) Reset() { *x = RetryBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryBuildRequest) String() string { @@ -1278,7 +1276,7 @@ func (*RetryBuildRequest) ProtoMessage() {} func (x *RetryBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1334,11 +1332,9 @@ type RunBuildTriggerRequest struct { func (x *RunBuildTriggerRequest) Reset() { *x = RunBuildTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunBuildTriggerRequest) String() string { @@ -1349,7 +1345,7 @@ func (*RunBuildTriggerRequest) ProtoMessage() {} func (x *RunBuildTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1416,11 +1412,9 @@ type StorageSource struct { func (x *StorageSource) Reset() { *x = StorageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageSource) String() string { @@ -1431,7 +1425,7 @@ func (*StorageSource) ProtoMessage() {} func (x *StorageSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1504,11 +1498,9 @@ type GitSource struct { func (x *GitSource) Reset() { *x = GitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitSource) String() string { @@ -1519,7 +1511,7 @@ func (*GitSource) ProtoMessage() {} func (x *GitSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1590,11 +1582,9 @@ type RepoSource struct { func (x *RepoSource) Reset() { *x = RepoSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepoSource) String() string { @@ -1605,7 +1595,7 @@ func (*RepoSource) ProtoMessage() {} func (x *RepoSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1727,9 @@ type StorageSourceManifest struct { func (x *StorageSourceManifest) Reset() { *x = StorageSourceManifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageSourceManifest) String() string { @@ -1752,7 +1740,7 @@ func (*StorageSourceManifest) ProtoMessage() {} func (x *StorageSourceManifest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1807,11 +1795,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -1822,7 +1808,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1924,11 +1910,9 @@ type BuiltImage struct { func (x *BuiltImage) Reset() { *x = BuiltImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuiltImage) String() string { @@ -1939,7 +1923,7 @@ func (*BuiltImage) ProtoMessage() {} func (x *BuiltImage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1975,9 @@ type UploadedPythonPackage struct { func (x *UploadedPythonPackage) Reset() { *x = UploadedPythonPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadedPythonPackage) String() string { @@ -2006,7 +1988,7 @@ func (*UploadedPythonPackage) ProtoMessage() {} func (x *UploadedPythonPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,11 +2040,9 @@ type UploadedMavenArtifact struct { func (x *UploadedMavenArtifact) Reset() { *x = UploadedMavenArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadedMavenArtifact) String() string { @@ -2073,7 +2053,7 @@ func (*UploadedMavenArtifact) ProtoMessage() {} func (x *UploadedMavenArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2126,11 +2106,9 @@ type UploadedNpmPackage struct { func (x *UploadedNpmPackage) Reset() { *x = UploadedNpmPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadedNpmPackage) String() string { @@ -2141,7 +2119,7 @@ func (*UploadedNpmPackage) ProtoMessage() {} func (x *UploadedNpmPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2286,11 +2264,9 @@ type BuildStep struct { func (x *BuildStep) Reset() { *x = BuildStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildStep) String() string { @@ -2301,7 +2277,7 @@ func (*BuildStep) ProtoMessage() {} func (x *BuildStep) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2463,11 +2439,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -2478,7 +2452,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2543,11 +2517,9 @@ type Results struct { func (x *Results) Reset() { *x = Results{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Results) String() string { @@ -2558,7 +2530,7 @@ func (*Results) ProtoMessage() {} func (x *Results) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2653,11 +2625,9 @@ type ArtifactResult struct { func (x *ArtifactResult) Reset() { *x = ArtifactResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactResult) String() string { @@ -2668,7 +2638,7 @@ func (*ArtifactResult) ProtoMessage() {} func (x *ArtifactResult) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2830,11 +2800,9 @@ type Build struct { func (x *Build) Reset() { *x = Build{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Build) String() string { @@ -2845,7 +2813,7 @@ func (*Build) ProtoMessage() {} func (x *Build) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3121,11 +3089,9 @@ type Artifacts struct { func (x *Artifacts) Reset() { *x = Artifacts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifacts) String() string { @@ -3136,7 +3102,7 @@ func (*Artifacts) ProtoMessage() {} func (x *Artifacts) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3200,11 +3166,9 @@ type TimeSpan struct { func (x *TimeSpan) Reset() { *x = TimeSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSpan) String() string { @@ -3215,7 +3179,7 @@ func (*TimeSpan) ProtoMessage() {} func (x *TimeSpan) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3256,11 +3220,9 @@ type BuildOperationMetadata struct { func (x *BuildOperationMetadata) Reset() { *x = BuildOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildOperationMetadata) String() string { @@ -3271,7 +3233,7 @@ func (*BuildOperationMetadata) ProtoMessage() {} func (x *BuildOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3325,11 +3287,9 @@ type SourceProvenance struct { func (x *SourceProvenance) Reset() { *x = SourceProvenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceProvenance) String() string { @@ -3340,7 +3300,7 @@ func (*SourceProvenance) ProtoMessage() {} func (x *SourceProvenance) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3396,11 +3356,9 @@ type FileHashes struct { func (x *FileHashes) Reset() { *x = FileHashes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileHashes) String() string { @@ -3411,7 +3369,7 @@ func (*FileHashes) ProtoMessage() {} func (x *FileHashes) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3447,11 +3405,9 @@ type Hash struct { func (x *Hash) Reset() { *x = Hash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hash) String() string { @@ -3462,7 +3418,7 @@ func (*Hash) ProtoMessage() {} func (x *Hash) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3506,11 +3462,9 @@ type Secrets struct { func (x *Secrets) Reset() { *x = Secrets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secrets) String() string { @@ -3521,7 +3475,7 @@ func (*Secrets) ProtoMessage() {} func (x *Secrets) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3571,11 +3525,9 @@ type InlineSecret struct { func (x *InlineSecret) Reset() { *x = InlineSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineSecret) String() string { @@ -3586,7 +3538,7 @@ func (*InlineSecret) ProtoMessage() {} func (x *InlineSecret) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3632,11 +3584,9 @@ type SecretManagerSecret struct { func (x *SecretManagerSecret) Reset() { *x = SecretManagerSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretManagerSecret) String() string { @@ -3647,7 +3597,7 @@ func (*SecretManagerSecret) ProtoMessage() {} func (x *SecretManagerSecret) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3699,11 +3649,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -3714,7 +3662,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3760,11 +3708,9 @@ type CreateBuildRequest struct { func (x *CreateBuildRequest) Reset() { *x = CreateBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBuildRequest) String() string { @@ -3775,7 +3721,7 @@ func (*CreateBuildRequest) ProtoMessage() {} func (x *CreateBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3828,11 +3774,9 @@ type GetBuildRequest struct { func (x *GetBuildRequest) Reset() { *x = GetBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBuildRequest) String() string { @@ -3843,7 +3787,7 @@ func (*GetBuildRequest) ProtoMessage() {} func (x *GetBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3908,11 +3852,9 @@ type ListBuildsRequest struct { func (x *ListBuildsRequest) Reset() { *x = ListBuildsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBuildsRequest) String() string { @@ -3923,7 +3865,7 @@ func (*ListBuildsRequest) ProtoMessage() {} func (x *ListBuildsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3988,11 +3930,9 @@ type ListBuildsResponse struct { func (x *ListBuildsResponse) Reset() { *x = ListBuildsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBuildsResponse) String() string { @@ -4003,7 +3943,7 @@ func (*ListBuildsResponse) ProtoMessage() {} func (x *ListBuildsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4049,11 +3989,9 @@ type CancelBuildRequest struct { func (x *CancelBuildRequest) Reset() { *x = CancelBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelBuildRequest) String() string { @@ -4064,7 +4002,7 @@ func (*CancelBuildRequest) ProtoMessage() {} func (x *CancelBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4115,11 +4053,9 @@ type ApproveBuildRequest struct { func (x *ApproveBuildRequest) Reset() { *x = ApproveBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveBuildRequest) String() string { @@ -4130,7 +4066,7 @@ func (*ApproveBuildRequest) ProtoMessage() {} func (x *ApproveBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4176,11 +4112,9 @@ type BuildApproval struct { func (x *BuildApproval) Reset() { *x = BuildApproval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildApproval) String() string { @@ -4191,7 +4125,7 @@ func (*BuildApproval) ProtoMessage() {} func (x *BuildApproval) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4241,11 +4175,9 @@ type ApprovalConfig struct { func (x *ApprovalConfig) Reset() { *x = ApprovalConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApprovalConfig) String() string { @@ -4256,7 +4188,7 @@ func (*ApprovalConfig) ProtoMessage() {} func (x *ApprovalConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4303,11 +4235,9 @@ type ApprovalResult struct { func (x *ApprovalResult) Reset() { *x = ApprovalResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApprovalResult) String() string { @@ -4318,7 +4248,7 @@ func (*ApprovalResult) ProtoMessage() {} func (x *ApprovalResult) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4398,11 +4328,9 @@ type GitRepoSource struct { func (x *GitRepoSource) Reset() { *x = GitRepoSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitRepoSource) String() string { @@ -4413,7 +4341,7 @@ func (*GitRepoSource) ProtoMessage() {} func (x *GitRepoSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4543,11 +4471,9 @@ type GitFileSource struct { func (x *GitFileSource) Reset() { *x = GitFileSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitFileSource) String() string { @@ -4558,7 +4484,7 @@ func (*GitFileSource) ProtoMessage() {} func (x *GitFileSource) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4758,11 +4684,9 @@ type BuildTrigger struct { func (x *BuildTrigger) Reset() { *x = BuildTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildTrigger) String() string { @@ -4773,7 +4697,7 @@ func (*BuildTrigger) ProtoMessage() {} func (x *BuildTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5012,11 +4936,9 @@ type RepositoryEventConfig struct { func (x *RepositoryEventConfig) Reset() { *x = RepositoryEventConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepositoryEventConfig) String() string { @@ -5027,7 +4949,7 @@ func (*RepositoryEventConfig) ProtoMessage() {} func (x *RepositoryEventConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5125,11 +5047,9 @@ type GitHubEventsConfig struct { func (x *GitHubEventsConfig) Reset() { *x = GitHubEventsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubEventsConfig) String() string { @@ -5140,7 +5060,7 @@ func (*GitHubEventsConfig) ProtoMessage() {} func (x *GitHubEventsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5238,11 +5158,9 @@ type PubsubConfig struct { func (x *PubsubConfig) Reset() { *x = PubsubConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubConfig) String() string { @@ -5253,7 +5171,7 @@ func (*PubsubConfig) ProtoMessage() {} func (x *PubsubConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5316,11 +5234,9 @@ type WebhookConfig struct { func (x *WebhookConfig) Reset() { *x = WebhookConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookConfig) String() string { @@ -5331,7 +5247,7 @@ func (*WebhookConfig) ProtoMessage() {} func (x *WebhookConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5401,11 +5317,9 @@ type PullRequestFilter struct { func (x *PullRequestFilter) Reset() { *x = PullRequestFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullRequestFilter) String() string { @@ -5416,7 +5330,7 @@ func (*PullRequestFilter) ProtoMessage() {} func (x *PullRequestFilter) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5494,11 +5408,9 @@ type PushFilter struct { func (x *PushFilter) Reset() { *x = PushFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushFilter) String() string { @@ -5509,7 +5421,7 @@ func (*PushFilter) ProtoMessage() {} func (x *PushFilter) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5593,11 +5505,9 @@ type CreateBuildTriggerRequest struct { func (x *CreateBuildTriggerRequest) Reset() { *x = CreateBuildTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBuildTriggerRequest) String() string { @@ -5608,7 +5518,7 @@ func (*CreateBuildTriggerRequest) ProtoMessage() {} func (x *CreateBuildTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5661,11 +5571,9 @@ type GetBuildTriggerRequest struct { func (x *GetBuildTriggerRequest) Reset() { *x = GetBuildTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBuildTriggerRequest) String() string { @@ -5676,7 +5584,7 @@ func (*GetBuildTriggerRequest) ProtoMessage() {} func (x *GetBuildTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5731,11 +5639,9 @@ type ListBuildTriggersRequest struct { func (x *ListBuildTriggersRequest) Reset() { *x = ListBuildTriggersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBuildTriggersRequest) String() string { @@ -5746,7 +5652,7 @@ func (*ListBuildTriggersRequest) ProtoMessage() {} func (x *ListBuildTriggersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5803,11 +5709,9 @@ type ListBuildTriggersResponse struct { func (x *ListBuildTriggersResponse) Reset() { *x = ListBuildTriggersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBuildTriggersResponse) String() string { @@ -5818,7 +5722,7 @@ func (*ListBuildTriggersResponse) ProtoMessage() {} func (x *ListBuildTriggersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5864,11 +5768,9 @@ type DeleteBuildTriggerRequest struct { func (x *DeleteBuildTriggerRequest) Reset() { *x = DeleteBuildTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBuildTriggerRequest) String() string { @@ -5879,7 +5781,7 @@ func (*DeleteBuildTriggerRequest) ProtoMessage() {} func (x *DeleteBuildTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5935,11 +5837,9 @@ type UpdateBuildTriggerRequest struct { func (x *UpdateBuildTriggerRequest) Reset() { *x = UpdateBuildTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBuildTriggerRequest) String() string { @@ -5950,7 +5850,7 @@ func (*UpdateBuildTriggerRequest) ProtoMessage() {} func (x *UpdateBuildTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6071,11 +5971,9 @@ type BuildOptions struct { func (x *BuildOptions) Reset() { *x = BuildOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildOptions) String() string { @@ -6086,7 +5984,7 @@ func (*BuildOptions) ProtoMessage() {} func (x *BuildOptions) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6229,11 +6127,9 @@ type ReceiveTriggerWebhookRequest struct { func (x *ReceiveTriggerWebhookRequest) Reset() { *x = ReceiveTriggerWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTriggerWebhookRequest) String() string { @@ -6244,7 +6140,7 @@ func (*ReceiveTriggerWebhookRequest) ProtoMessage() {} func (x *ReceiveTriggerWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6304,11 +6200,9 @@ type ReceiveTriggerWebhookResponse struct { func (x *ReceiveTriggerWebhookResponse) Reset() { *x = ReceiveTriggerWebhookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTriggerWebhookResponse) String() string { @@ -6319,7 +6213,7 @@ func (*ReceiveTriggerWebhookResponse) ProtoMessage() {} func (x *ReceiveTriggerWebhookResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6374,11 +6268,9 @@ type GitHubEnterpriseConfig struct { func (x *GitHubEnterpriseConfig) Reset() { *x = GitHubEnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubEnterpriseConfig) String() string { @@ -6389,7 +6281,7 @@ func (*GitHubEnterpriseConfig) ProtoMessage() {} func (x *GitHubEnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6487,11 +6379,9 @@ type GitHubEnterpriseSecrets struct { func (x *GitHubEnterpriseSecrets) Reset() { *x = GitHubEnterpriseSecrets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubEnterpriseSecrets) String() string { @@ -6502,7 +6392,7 @@ func (*GitHubEnterpriseSecrets) ProtoMessage() {} func (x *GitHubEnterpriseSecrets) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6602,11 +6492,9 @@ type WorkerPool struct { func (x *WorkerPool) Reset() { *x = WorkerPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerPool) String() string { @@ -6617,7 +6505,7 @@ func (*WorkerPool) ProtoMessage() {} func (x *WorkerPool) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6736,11 +6624,9 @@ type PrivatePoolV1Config struct { func (x *PrivatePoolV1Config) Reset() { *x = PrivatePoolV1Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePoolV1Config) String() string { @@ -6751,7 +6637,7 @@ func (*PrivatePoolV1Config) ProtoMessage() {} func (x *PrivatePoolV1Config) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6811,11 +6697,9 @@ type CreateWorkerPoolRequest struct { func (x *CreateWorkerPoolRequest) Reset() { *x = CreateWorkerPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkerPoolRequest) String() string { @@ -6826,7 +6710,7 @@ func (*CreateWorkerPoolRequest) ProtoMessage() {} func (x *CreateWorkerPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6882,11 +6766,9 @@ type GetWorkerPoolRequest struct { func (x *GetWorkerPoolRequest) Reset() { *x = GetWorkerPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkerPoolRequest) String() string { @@ -6897,7 +6779,7 @@ func (*GetWorkerPoolRequest) ProtoMessage() {} func (x *GetWorkerPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6942,11 +6824,9 @@ type DeleteWorkerPoolRequest struct { func (x *DeleteWorkerPoolRequest) Reset() { *x = DeleteWorkerPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkerPoolRequest) String() string { @@ -6957,7 +6837,7 @@ func (*DeleteWorkerPoolRequest) ProtoMessage() {} func (x *DeleteWorkerPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7020,11 +6900,9 @@ type UpdateWorkerPoolRequest struct { func (x *UpdateWorkerPoolRequest) Reset() { *x = UpdateWorkerPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkerPoolRequest) String() string { @@ -7035,7 +6913,7 @@ func (*UpdateWorkerPoolRequest) ProtoMessage() {} func (x *UpdateWorkerPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7090,11 +6968,9 @@ type ListWorkerPoolsRequest struct { func (x *ListWorkerPoolsRequest) Reset() { *x = ListWorkerPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkerPoolsRequest) String() string { @@ -7105,7 +6981,7 @@ func (*ListWorkerPoolsRequest) ProtoMessage() {} func (x *ListWorkerPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7157,11 +7033,9 @@ type ListWorkerPoolsResponse struct { func (x *ListWorkerPoolsResponse) Reset() { *x = ListWorkerPoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkerPoolsResponse) String() string { @@ -7172,7 +7046,7 @@ func (*ListWorkerPoolsResponse) ProtoMessage() {} func (x *ListWorkerPoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7219,11 +7093,9 @@ type CreateWorkerPoolOperationMetadata struct { func (x *CreateWorkerPoolOperationMetadata) Reset() { *x = CreateWorkerPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkerPoolOperationMetadata) String() string { @@ -7234,7 +7106,7 @@ func (*CreateWorkerPoolOperationMetadata) ProtoMessage() {} func (x *CreateWorkerPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7288,11 +7160,9 @@ type UpdateWorkerPoolOperationMetadata struct { func (x *UpdateWorkerPoolOperationMetadata) Reset() { *x = UpdateWorkerPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkerPoolOperationMetadata) String() string { @@ -7303,7 +7173,7 @@ func (*UpdateWorkerPoolOperationMetadata) ProtoMessage() {} func (x *UpdateWorkerPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7357,11 +7227,9 @@ type DeleteWorkerPoolOperationMetadata struct { func (x *DeleteWorkerPoolOperationMetadata) Reset() { *x = DeleteWorkerPoolOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkerPoolOperationMetadata) String() string { @@ -7372,7 +7240,7 @@ func (*DeleteWorkerPoolOperationMetadata) ProtoMessage() {} func (x *DeleteWorkerPoolOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7422,11 +7290,9 @@ type Build_Warning struct { func (x *Build_Warning) Reset() { *x = Build_Warning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Build_Warning) String() string { @@ -7437,7 +7303,7 @@ func (*Build_Warning) ProtoMessage() {} func (x *Build_Warning) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7480,11 +7346,9 @@ type Build_FailureInfo struct { func (x *Build_FailureInfo) Reset() { *x = Build_FailureInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Build_FailureInfo) String() string { @@ -7495,7 +7359,7 @@ func (*Build_FailureInfo) ProtoMessage() {} func (x *Build_FailureInfo) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7546,11 +7410,9 @@ type Artifacts_ArtifactObjects struct { func (x *Artifacts_ArtifactObjects) Reset() { *x = Artifacts_ArtifactObjects{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifacts_ArtifactObjects) String() string { @@ -7561,7 +7423,7 @@ func (*Artifacts_ArtifactObjects) ProtoMessage() {} func (x *Artifacts_ArtifactObjects) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7630,11 +7492,9 @@ type Artifacts_MavenArtifact struct { func (x *Artifacts_MavenArtifact) Reset() { *x = Artifacts_MavenArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifacts_MavenArtifact) String() string { @@ -7645,7 +7505,7 @@ func (*Artifacts_MavenArtifact) ProtoMessage() {} func (x *Artifacts_MavenArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7717,11 +7577,9 @@ type Artifacts_PythonPackage struct { func (x *Artifacts_PythonPackage) Reset() { *x = Artifacts_PythonPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifacts_PythonPackage) String() string { @@ -7732,7 +7590,7 @@ func (*Artifacts_PythonPackage) ProtoMessage() {} func (x *Artifacts_PythonPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7781,11 +7639,9 @@ type Artifacts_NpmPackage struct { func (x *Artifacts_NpmPackage) Reset() { *x = Artifacts_NpmPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Artifacts_NpmPackage) String() string { @@ -7796,7 +7652,7 @@ func (*Artifacts_NpmPackage) ProtoMessage() {} func (x *Artifacts_NpmPackage) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7845,11 +7701,9 @@ type BuildOptions_PoolOption struct { func (x *BuildOptions_PoolOption) Reset() { *x = BuildOptions_PoolOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildOptions_PoolOption) String() string { @@ -7860,7 +7714,7 @@ func (*BuildOptions_PoolOption) ProtoMessage() {} func (x *BuildOptions_PoolOption) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7904,11 +7758,9 @@ type PrivatePoolV1Config_WorkerConfig struct { func (x *PrivatePoolV1Config_WorkerConfig) Reset() { *x = PrivatePoolV1Config_WorkerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePoolV1Config_WorkerConfig) String() string { @@ -7919,7 +7771,7 @@ func (*PrivatePoolV1Config_WorkerConfig) ProtoMessage() {} func (x *PrivatePoolV1Config_WorkerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7978,11 +7830,9 @@ type PrivatePoolV1Config_NetworkConfig struct { func (x *PrivatePoolV1Config_NetworkConfig) Reset() { *x = PrivatePoolV1Config_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePoolV1Config_NetworkConfig) String() string { @@ -7993,7 +7843,7 @@ func (*PrivatePoolV1Config_NetworkConfig) ProtoMessage() {} func (x *PrivatePoolV1Config_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8063,11 +7913,9 @@ type PrivatePoolV1Config_PrivateServiceConnect struct { func (x *PrivatePoolV1Config_PrivateServiceConnect) Reset() { *x = PrivatePoolV1Config_PrivateServiceConnect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePoolV1Config_PrivateServiceConnect) String() string { @@ -8078,7 +7926,7 @@ func (*PrivatePoolV1Config_PrivateServiceConnect) ProtoMessage() {} func (x *PrivatePoolV1Config_PrivateServiceConnect) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10305,920 +10153,6 @@ func file_google_devtools_cloudbuild_v1_cloudbuild_proto_init() { if File_google_devtools_cloudbuild_v1_cloudbuild_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RetryBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RunBuildTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StorageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RepoSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StorageSourceManifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BuiltImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UploadedPythonPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UploadedMavenArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UploadedNpmPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BuildStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Results); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ArtifactResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Build); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Artifacts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TimeSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BuildOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SourceProvenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*FileHashes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Hash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Secrets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*InlineSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SecretManagerSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListBuildsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListBuildsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CancelBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ApproveBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*BuildApproval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ApprovalConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ApprovalResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*GitRepoSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GitFileSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*BuildTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*RepositoryEventConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GitHubEventsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*PubsubConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*WebhookConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*PullRequestFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*PushFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CreateBuildTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetBuildTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListBuildTriggersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListBuildTriggersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBuildTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBuildTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*BuildOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTriggerWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTriggerWebhookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*GitHubEnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*GitHubEnterpriseSecrets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*WorkerPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePoolV1Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkerPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkerPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkerPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkerPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkerPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkerPoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkerPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkerPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkerPoolOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*Build_Warning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*Build_FailureInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*Artifacts_ArtifactObjects); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*Artifacts_MavenArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*Artifacts_PythonPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*Artifacts_NpmPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*BuildOptions_PoolOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePoolV1Config_WorkerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePoolV1Config_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePoolV1Config_PrivateServiceConnect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_cloudbuild_v1_cloudbuild_proto_msgTypes[4].OneofWrappers = []any{ (*RepoSource_BranchName)(nil), (*RepoSource_TagName)(nil), diff --git a/cloudbuild/apiv1/v2/helpers.go b/cloudbuild/apiv1/v2/helpers.go index 978f13396722..f4827f6e7a18 100755 --- a/cloudbuild/apiv1/v2/helpers.go +++ b/cloudbuild/apiv1/v2/helpers.go @@ -18,10 +18,20 @@ package cloudbuild import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudbuild.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudbuild/apiv2/cloudbuildpb/cloudbuild.pb.go b/cloudbuild/apiv2/cloudbuildpb/cloudbuild.pb.go index 88e130d7eed7..1a636564394a 100755 --- a/cloudbuild/apiv2/cloudbuildpb/cloudbuild.pb.go +++ b/cloudbuild/apiv2/cloudbuildpb/cloudbuild.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudbuild/v2/cloudbuild.proto @@ -65,11 +65,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -80,7 +78,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,11 +170,9 @@ type RunWorkflowCustomOperationMetadata struct { func (x *RunWorkflowCustomOperationMetadata) Reset() { *x = RunWorkflowCustomOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunWorkflowCustomOperationMetadata) String() string { @@ -187,7 +183,7 @@ func (*RunWorkflowCustomOperationMetadata) ProtoMessage() {} func (x *RunWorkflowCustomOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,32 +389,6 @@ func file_google_devtools_cloudbuild_v2_cloudbuild_proto_init() { if File_google_devtools_cloudbuild_v2_cloudbuild_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_cloudbuild_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RunWorkflowCustomOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudbuild/apiv2/cloudbuildpb/repositories.pb.go b/cloudbuild/apiv2/cloudbuildpb/repositories.pb.go index 535edde609ce..56102ea347d6 100755 --- a/cloudbuild/apiv2/cloudbuildpb/repositories.pb.go +++ b/cloudbuild/apiv2/cloudbuildpb/repositories.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudbuild/v2/repositories.proto @@ -203,11 +203,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -218,7 +216,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +389,9 @@ type InstallationState struct { func (x *InstallationState) Reset() { *x = InstallationState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallationState) String() string { @@ -406,7 +402,7 @@ func (*InstallationState) ProtoMessage() {} func (x *InstallationState) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +455,9 @@ type FetchLinkableRepositoriesRequest struct { func (x *FetchLinkableRepositoriesRequest) Reset() { *x = FetchLinkableRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchLinkableRepositoriesRequest) String() string { @@ -474,7 +468,7 @@ func (*FetchLinkableRepositoriesRequest) ProtoMessage() {} func (x *FetchLinkableRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +518,9 @@ type FetchLinkableRepositoriesResponse struct { func (x *FetchLinkableRepositoriesResponse) Reset() { *x = FetchLinkableRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchLinkableRepositoriesResponse) String() string { @@ -539,7 +531,7 @@ func (*FetchLinkableRepositoriesResponse) ProtoMessage() {} func (x *FetchLinkableRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +576,9 @@ type GitHubConfig struct { func (x *GitHubConfig) Reset() { *x = GitHubConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubConfig) String() string { @@ -599,7 +589,7 @@ func (*GitHubConfig) ProtoMessage() {} func (x *GitHubConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +654,9 @@ type GitHubEnterpriseConfig struct { func (x *GitHubEnterpriseConfig) Reset() { *x = GitHubEnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubEnterpriseConfig) String() string { @@ -679,7 +667,7 @@ func (*GitHubEnterpriseConfig) ProtoMessage() {} func (x *GitHubEnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +786,9 @@ type GitLabConfig struct { func (x *GitLabConfig) Reset() { *x = GitLabConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitLabConfig) String() string { @@ -813,7 +799,7 @@ func (*GitLabConfig) ProtoMessage() {} func (x *GitLabConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +895,9 @@ type BitbucketDataCenterConfig struct { func (x *BitbucketDataCenterConfig) Reset() { *x = BitbucketDataCenterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BitbucketDataCenterConfig) String() string { @@ -924,7 +908,7 @@ func (*BitbucketDataCenterConfig) ProtoMessage() {} func (x *BitbucketDataCenterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +997,9 @@ type BitbucketCloudConfig struct { func (x *BitbucketCloudConfig) Reset() { *x = BitbucketCloudConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BitbucketCloudConfig) String() string { @@ -1028,7 +1010,7 @@ func (*BitbucketCloudConfig) ProtoMessage() {} func (x *BitbucketCloudConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1068,9 @@ type ServiceDirectoryConfig struct { func (x *ServiceDirectoryConfig) Reset() { *x = ServiceDirectoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceDirectoryConfig) String() string { @@ -1101,7 +1081,7 @@ func (*ServiceDirectoryConfig) ProtoMessage() {} func (x *ServiceDirectoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1130,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -1165,7 +1143,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1223,9 @@ type OAuthCredential struct { func (x *OAuthCredential) Reset() { *x = OAuthCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthCredential) String() string { @@ -1260,7 +1236,7 @@ func (*OAuthCredential) ProtoMessage() {} func (x *OAuthCredential) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1306,11 +1282,9 @@ type UserCredential struct { func (x *UserCredential) Reset() { *x = UserCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserCredential) String() string { @@ -1321,7 +1295,7 @@ func (*UserCredential) ProtoMessage() {} func (x *UserCredential) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1370,11 +1344,9 @@ type CreateConnectionRequest struct { func (x *CreateConnectionRequest) Reset() { *x = CreateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionRequest) String() string { @@ -1385,7 +1357,7 @@ func (*CreateConnectionRequest) ProtoMessage() {} func (x *CreateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1406,9 @@ type GetConnectionRequest struct { func (x *GetConnectionRequest) Reset() { *x = GetConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionRequest) String() string { @@ -1449,7 +1419,7 @@ func (*GetConnectionRequest) ProtoMessage() {} func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1488,11 +1458,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -1503,7 +1471,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1553,11 +1521,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -1568,7 +1534,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1621,11 +1587,9 @@ type UpdateConnectionRequest struct { func (x *UpdateConnectionRequest) Reset() { *x = UpdateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionRequest) String() string { @@ -1636,7 +1600,7 @@ func (*UpdateConnectionRequest) ProtoMessage() {} func (x *UpdateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1698,11 +1662,9 @@ type DeleteConnectionRequest struct { func (x *DeleteConnectionRequest) Reset() { *x = DeleteConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionRequest) String() string { @@ -1713,7 +1675,7 @@ func (*DeleteConnectionRequest) ProtoMessage() {} func (x *DeleteConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,11 +1732,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -1785,7 +1745,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1838,11 +1798,9 @@ type BatchCreateRepositoriesRequest struct { func (x *BatchCreateRepositoriesRequest) Reset() { *x = BatchCreateRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateRepositoriesRequest) String() string { @@ -1853,7 +1811,7 @@ func (*BatchCreateRepositoriesRequest) ProtoMessage() {} func (x *BatchCreateRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1894,11 +1852,9 @@ type BatchCreateRepositoriesResponse struct { func (x *BatchCreateRepositoriesResponse) Reset() { *x = BatchCreateRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateRepositoriesResponse) String() string { @@ -1909,7 +1865,7 @@ func (*BatchCreateRepositoriesResponse) ProtoMessage() {} func (x *BatchCreateRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1944,11 +1900,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -1959,7 +1913,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2003,11 +1957,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -2018,7 +1970,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2075,11 +2027,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -2090,7 +2040,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2138,11 +2088,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -2153,7 +2101,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2202,11 +2150,9 @@ type FetchReadWriteTokenRequest struct { func (x *FetchReadWriteTokenRequest) Reset() { *x = FetchReadWriteTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadWriteTokenRequest) String() string { @@ -2217,7 +2163,7 @@ func (*FetchReadWriteTokenRequest) ProtoMessage() {} func (x *FetchReadWriteTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2252,11 +2198,9 @@ type FetchReadTokenRequest struct { func (x *FetchReadTokenRequest) Reset() { *x = FetchReadTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadTokenRequest) String() string { @@ -2267,7 +2211,7 @@ func (*FetchReadTokenRequest) ProtoMessage() {} func (x *FetchReadTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2303,11 +2247,9 @@ type FetchReadTokenResponse struct { func (x *FetchReadTokenResponse) Reset() { *x = FetchReadTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadTokenResponse) String() string { @@ -2318,7 +2260,7 @@ func (*FetchReadTokenResponse) ProtoMessage() {} func (x *FetchReadTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2361,11 +2303,9 @@ type FetchReadWriteTokenResponse struct { func (x *FetchReadWriteTokenResponse) Reset() { *x = FetchReadWriteTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadWriteTokenResponse) String() string { @@ -2376,7 +2316,7 @@ func (*FetchReadWriteTokenResponse) ProtoMessage() {} func (x *FetchReadWriteTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2423,11 +2363,9 @@ type ProcessWebhookRequest struct { func (x *ProcessWebhookRequest) Reset() { *x = ProcessWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessWebhookRequest) String() string { @@ -2438,7 +2376,7 @@ func (*ProcessWebhookRequest) ProtoMessage() {} func (x *ProcessWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2427,9 @@ type FetchGitRefsRequest struct { func (x *FetchGitRefsRequest) Reset() { *x = FetchGitRefsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitRefsRequest) String() string { @@ -2504,7 +2440,7 @@ func (*FetchGitRefsRequest) ProtoMessage() {} func (x *FetchGitRefsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2545,11 +2481,9 @@ type FetchGitRefsResponse struct { func (x *FetchGitRefsResponse) Reset() { *x = FetchGitRefsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitRefsResponse) String() string { @@ -2560,7 +2494,7 @@ func (*FetchGitRefsResponse) ProtoMessage() {} func (x *FetchGitRefsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3499,404 +3433,6 @@ func file_google_devtools_cloudbuild_v2_repositories_proto_init() { return } file_google_devtools_cloudbuild_v2_cloudbuild_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InstallationState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchLinkableRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FetchLinkableRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GitHubConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GitHubEnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GitLabConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BitbucketDataCenterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BitbucketCloudConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ServiceDirectoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OAuthCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UserCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadWriteTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadWriteTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ProcessWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitRefsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitRefsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_cloudbuild_v2_repositories_proto_msgTypes[0].OneofWrappers = []any{ (*Connection_GithubConfig)(nil), (*Connection_GithubEnterpriseConfig)(nil), diff --git a/cloudbuild/apiv2/helpers.go b/cloudbuild/apiv2/helpers.go index 978f13396722..f4827f6e7a18 100755 --- a/cloudbuild/apiv2/helpers.go +++ b/cloudbuild/apiv2/helpers.go @@ -18,10 +18,20 @@ package cloudbuild import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudbuild.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudbuild/apiv2/repository_manager_client.go b/cloudbuild/apiv2/repository_manager_client.go index 5dc70053308e..9df3443b6e31 100755 --- a/cloudbuild/apiv2/repository_manager_client.go +++ b/cloudbuild/apiv2/repository_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -538,6 +537,8 @@ type repositoryManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRepositoryManagerClient creates a new repository manager client based on gRPC. @@ -564,6 +565,7 @@ func NewRepositoryManagerClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, repositoryManagerClient: cloudbuildpb.NewRepositoryManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -628,6 +630,8 @@ type repositoryManagerRESTClient struct { // Points back to the CallOptions field of the containing RepositoryManagerClient CallOptions **RepositoryManagerCallOptions + + logger *slog.Logger } // NewRepositoryManagerRESTClient creates a new repository manager rest client. @@ -645,6 +649,7 @@ func NewRepositoryManagerRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -707,7 +712,7 @@ func (c *repositoryManagerGRPCClient) CreateConnection(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.CreateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.CreateConnection, req, settings.GRPC, c.logger, "CreateConnection") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *repositoryManagerGRPCClient) GetConnection(ctx context.Context, req *cl var resp *cloudbuildpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.GetConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.GetConnection, req, settings.GRPC, c.logger, "GetConnection") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *repositoryManagerGRPCClient) ListConnections(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *repositoryManagerGRPCClient) UpdateConnection(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.UpdateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.UpdateConnection, req, settings.GRPC, c.logger, "UpdateConnection") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *repositoryManagerGRPCClient) DeleteConnection(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.DeleteConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.DeleteConnection, req, settings.GRPC, c.logger, "DeleteConnection") return err }, opts...) if err != nil { @@ -831,7 +836,7 @@ func (c *repositoryManagerGRPCClient) CreateRepository(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -851,7 +856,7 @@ func (c *repositoryManagerGRPCClient) BatchCreateRepositories(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.BatchCreateRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.BatchCreateRepositories, req, settings.GRPC, c.logger, "BatchCreateRepositories") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *repositoryManagerGRPCClient) GetRepository(ctx context.Context, req *cl var resp *cloudbuildpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *repositoryManagerGRPCClient) ListRepositories(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *repositoryManagerGRPCClient) DeleteRepository(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.DeleteRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *repositoryManagerGRPCClient) FetchReadWriteToken(ctx context.Context, r var resp *cloudbuildpb.FetchReadWriteTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.FetchReadWriteToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.FetchReadWriteToken, req, settings.GRPC, c.logger, "FetchReadWriteToken") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *repositoryManagerGRPCClient) FetchReadToken(ctx context.Context, req *c var resp *cloudbuildpb.FetchReadTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.FetchReadToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.FetchReadToken, req, settings.GRPC, c.logger, "FetchReadToken") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *repositoryManagerGRPCClient) FetchLinkableRepositories(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.FetchLinkableRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.FetchLinkableRepositories, req, settings.GRPC, c.logger, "FetchLinkableRepositories") return err }, opts...) if err != nil { @@ -1037,7 +1042,7 @@ func (c *repositoryManagerGRPCClient) FetchGitRefs(ctx context.Context, req *clo var resp *cloudbuildpb.FetchGitRefsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.repositoryManagerClient.FetchGitRefs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.repositoryManagerClient.FetchGitRefs, req, settings.GRPC, c.logger, "FetchGitRefs") return err }, opts...) if err != nil { @@ -1055,7 +1060,7 @@ func (c *repositoryManagerGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *repositoryManagerGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1091,7 +1096,7 @@ func (c *repositoryManagerGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *repositoryManagerGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1123,7 +1128,7 @@ func (c *repositoryManagerGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1172,21 +1177,10 @@ func (c *repositoryManagerRESTClient) CreateConnection(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1237,17 +1231,7 @@ func (c *repositoryManagerRESTClient) GetConnection(ctx context.Context, req *cl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnection") if err != nil { return err } @@ -1309,21 +1293,10 @@ func (c *repositoryManagerRESTClient) ListConnections(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1405,21 +1378,10 @@ func (c *repositoryManagerRESTClient) UpdateConnection(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1475,21 +1437,10 @@ func (c *repositoryManagerRESTClient) DeleteConnection(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1547,21 +1498,10 @@ func (c *repositoryManagerRESTClient) CreateRepository(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1617,21 +1557,10 @@ func (c *repositoryManagerRESTClient) BatchCreateRepositories(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateRepositories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1682,17 +1611,7 @@ func (c *repositoryManagerRESTClient) GetRepository(ctx context.Context, req *cl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -1757,21 +1676,10 @@ func (c *repositoryManagerRESTClient) ListRepositories(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1839,21 +1747,10 @@ func (c *repositoryManagerRESTClient) DeleteRepository(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1910,17 +1807,7 @@ func (c *repositoryManagerRESTClient) FetchReadWriteToken(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchReadWriteToken") if err != nil { return err } @@ -1976,17 +1863,7 @@ func (c *repositoryManagerRESTClient) FetchReadToken(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchReadToken") if err != nil { return err } @@ -2049,21 +1926,10 @@ func (c *repositoryManagerRESTClient) FetchLinkableRepositories(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchLinkableRepositories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2129,17 +1995,7 @@ func (c *repositoryManagerRESTClient) FetchGitRefs(ctx context.Context, req *clo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchGitRefs") if err != nil { return err } @@ -2193,17 +2049,7 @@ func (c *repositoryManagerRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2263,17 +2109,7 @@ func (c *repositoryManagerRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2335,17 +2171,7 @@ func (c *repositoryManagerRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2398,15 +2224,8 @@ func (c *repositoryManagerRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2443,17 +2262,7 @@ func (c *repositoryManagerRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/cloudbuild/apiv2/repository_manager_client_example_go123_test.go b/cloudbuild/apiv2/repository_manager_client_example_go123_test.go index adf940217ba5..f88f74588aef 100644 --- a/cloudbuild/apiv2/repository_manager_client_example_go123_test.go +++ b/cloudbuild/apiv2/repository_manager_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRepositoryManagerClient_FetchLinkableRepositories_all() { } for resp, err := range c.FetchLinkableRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRepositoryManagerClient_ListConnections_all() { } for resp, err := range c.ListConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleRepositoryManagerClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client.go b/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client.go index efc2890e3376..f22afba317c9 100755 --- a/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client.go +++ b/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client.go @@ -19,7 +19,7 @@ package cloudcontrolspartner import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( cloudcontrolspartnerpb "cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -349,6 +348,8 @@ type cloudControlsPartnerCoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudControlsPartnerCoreClient creates a new cloud controls partner core client based on gRPC. @@ -375,6 +376,7 @@ func NewCloudControlsPartnerCoreClient(ctx context.Context, opts ...option.Clien connPool: connPool, cloudControlsPartnerCoreClient: cloudcontrolspartnerpb.NewCloudControlsPartnerCoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -421,6 +423,8 @@ type cloudControlsPartnerCoreRESTClient struct { // Points back to the CallOptions field of the containing CloudControlsPartnerCoreClient CallOptions **CloudControlsPartnerCoreCallOptions + + logger *slog.Logger } // NewCloudControlsPartnerCoreRESTClient creates a new cloud controls partner core rest client. @@ -438,6 +442,7 @@ func NewCloudControlsPartnerCoreRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -490,7 +495,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetWorkload(ctx context.Context, re var resp *cloudcontrolspartnerpb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetWorkload, req, settings.GRPC, c.logger, "GetWorkload") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListWorkloads(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetCustomer(ctx context.Context, re var resp *cloudcontrolspartnerpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetCustomer, req, settings.GRPC, c.logger, "GetCustomer") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListCustomers(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListCustomers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListCustomers, req, settings.GRPC, c.logger, "ListCustomers") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetEkmConnections(ctx context.Conte var resp *cloudcontrolspartnerpb.EkmConnections err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetEkmConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetEkmConnections, req, settings.GRPC, c.logger, "GetEkmConnections") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetPartnerPermissions(ctx context.C var resp *cloudcontrolspartnerpb.PartnerPermissions err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetPartnerPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetPartnerPermissions, req, settings.GRPC, c.logger, "GetPartnerPermissions") return err }, opts...) if err != nil { @@ -665,7 +670,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListAccessApprovalRequests(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListAccessApprovalRequests(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListAccessApprovalRequests, req, settings.GRPC, c.logger, "ListAccessApprovalRequests") return err }, opts...) if err != nil { @@ -700,7 +705,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetPartner(ctx context.Context, req var resp *cloudcontrolspartnerpb.Partner err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetPartner(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetPartner, req, settings.GRPC, c.logger, "GetPartner") return err }, opts...) if err != nil { @@ -742,17 +747,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetWorkload(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkload") if err != nil { return err } @@ -820,21 +815,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListWorkloads(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -897,17 +881,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetCustomer(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomer") if err != nil { return err } @@ -975,21 +949,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListCustomers(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1052,17 +1015,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetEkmConnections(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEkmConnections") if err != nil { return err } @@ -1112,17 +1065,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetPartnerPermissions(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPartnerPermissions") if err != nil { return err } @@ -1193,21 +1136,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListAccessApprovalRequests(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccessApprovalRequests") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1270,17 +1202,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetPartner(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPartner") if err != nil { return err } diff --git a/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client_example_go123_test.go b/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client_example_go123_test.go index 4fd99b1acc03..05a3b5bcf8be 100644 --- a/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client_example_go123_test.go +++ b/cloudcontrolspartner/apiv1/cloud_controls_partner_core_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudControlsPartnerCoreClient_ListAccessApprovalRequests_all() { } for resp, err := range c.ListAccessApprovalRequests(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleCloudControlsPartnerCoreClient_ListCustomers_all() { } for resp, err := range c.ListCustomers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleCloudControlsPartnerCoreClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client.go b/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client.go index 0c9010f4fa59..3ce2a888378b 100755 --- a/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client.go +++ b/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client.go @@ -19,7 +19,7 @@ package cloudcontrolspartner import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( cloudcontrolspartnerpb "cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -193,6 +192,8 @@ type cloudControlsPartnerMonitoringGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudControlsPartnerMonitoringClient creates a new cloud controls partner monitoring client based on gRPC. @@ -219,6 +220,7 @@ func NewCloudControlsPartnerMonitoringClient(ctx context.Context, opts ...option connPool: connPool, cloudControlsPartnerMonitoringClient: cloudcontrolspartnerpb.NewCloudControlsPartnerMonitoringClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -265,6 +267,8 @@ type cloudControlsPartnerMonitoringRESTClient struct { // Points back to the CallOptions field of the containing CloudControlsPartnerMonitoringClient CallOptions **CloudControlsPartnerMonitoringCallOptions + + logger *slog.Logger } // NewCloudControlsPartnerMonitoringRESTClient creates a new cloud controls partner monitoring rest client. @@ -282,6 +286,7 @@ func NewCloudControlsPartnerMonitoringRESTClient(ctx context.Context, opts ...op endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +350,7 @@ func (c *cloudControlsPartnerMonitoringGRPCClient) ListViolations(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerMonitoringClient.ListViolations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerMonitoringClient.ListViolations, req, settings.GRPC, c.logger, "ListViolations") return err }, opts...) if err != nil { @@ -380,7 +385,7 @@ func (c *cloudControlsPartnerMonitoringGRPCClient) GetViolation(ctx context.Cont var resp *cloudcontrolspartnerpb.Violation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerMonitoringClient.GetViolation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerMonitoringClient.GetViolation, req, settings.GRPC, c.logger, "GetViolation") return err }, opts...) if err != nil { @@ -460,21 +465,10 @@ func (c *cloudControlsPartnerMonitoringRESTClient) ListViolations(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListViolations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -537,17 +531,7 @@ func (c *cloudControlsPartnerMonitoringRESTClient) GetViolation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetViolation") if err != nil { return err } diff --git a/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client_example_go123_test.go b/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client_example_go123_test.go index e4d36a413dc8..0fcfb60efcf8 100644 --- a/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client_example_go123_test.go +++ b/cloudcontrolspartner/apiv1/cloud_controls_partner_monitoring_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudControlsPartnerMonitoringClient_ListViolations_all() { } for resp, err := range c.ListViolations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/access_approval_requests.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/access_approval_requests.pb.go index db6ffe33be64..9b0456c15fcc 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/access_approval_requests.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/access_approval_requests.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/access_approval_requests.proto @@ -144,11 +144,9 @@ type AccessApprovalRequest struct { func (x *AccessApprovalRequest) Reset() { *x = AccessApprovalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessApprovalRequest) String() string { @@ -159,7 +157,7 @@ func (*AccessApprovalRequest) ProtoMessage() {} func (x *AccessApprovalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type ListAccessApprovalRequestsRequest struct { func (x *ListAccessApprovalRequestsRequest) Reset() { *x = ListAccessApprovalRequestsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessApprovalRequestsRequest) String() string { @@ -243,7 +239,7 @@ func (*ListAccessApprovalRequestsRequest) ProtoMessage() {} func (x *ListAccessApprovalRequestsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +306,9 @@ type ListAccessApprovalRequestsResponse struct { func (x *ListAccessApprovalRequestsResponse) Reset() { *x = ListAccessApprovalRequestsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessApprovalRequestsResponse) String() string { @@ -325,7 +319,7 @@ func (*ListAccessApprovalRequestsResponse) ProtoMessage() {} func (x *ListAccessApprovalRequestsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type AccessReason struct { func (x *AccessReason) Reset() { *x = AccessReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessReason) String() string { @@ -390,7 +382,7 @@ func (*AccessReason) ProtoMessage() {} func (x *AccessReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,56 +574,6 @@ func file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_in if File_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessApprovalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessApprovalRequestsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessApprovalRequestsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_access_approval_requests_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AccessReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/completion_state.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/completion_state.pb.go index 866c04e0e93f..60e0dc98597b 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/completion_state.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/completion_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/completion_state.proto diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/core.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/core.pb.go index 88d369cd3a78..5085800c570c 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/core.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/core.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/core.proto @@ -69,11 +69,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_core_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_core_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -84,7 +82,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_core_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,20 +423,6 @@ func file_google_cloud_cloudcontrolspartner_v1_core_proto_init() { file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_init() file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_init() file_google_cloud_cloudcontrolspartner_v1_partners_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_core_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customer_workloads.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customer_workloads.pb.go index 728220548544..1a1ac0015485 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customer_workloads.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customer_workloads.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/customer_workloads.proto @@ -191,11 +191,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -206,7 +204,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -323,7 +319,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +386,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -405,7 +399,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +448,9 @@ type GetWorkloadRequest struct { func (x *GetWorkloadRequest) Reset() { *x = GetWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkloadRequest) String() string { @@ -469,7 +461,7 @@ func (*GetWorkloadRequest) ProtoMessage() {} func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +495,9 @@ type WorkloadOnboardingState struct { func (x *WorkloadOnboardingState) Reset() { *x = WorkloadOnboardingState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadOnboardingState) String() string { @@ -518,7 +508,7 @@ func (*WorkloadOnboardingState) ProtoMessage() {} func (x *WorkloadOnboardingState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +548,9 @@ type WorkloadOnboardingStep struct { func (x *WorkloadOnboardingStep) Reset() { *x = WorkloadOnboardingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadOnboardingStep) String() string { @@ -573,7 +561,7 @@ func (*WorkloadOnboardingStep) ProtoMessage() {} func (x *WorkloadOnboardingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,80 +819,6 @@ func file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_init() { return } file_google_cloud_cloudcontrolspartner_v1_completion_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadOnboardingState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customer_workloads_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadOnboardingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customers.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customers.pb.go index 6d6ccbf56067..7be19a0f955a 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customers.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/customers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/customers.proto @@ -109,11 +109,9 @@ type Customer struct { func (x *Customer) Reset() { *x = Customer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Customer) String() string { @@ -124,7 +122,7 @@ func (*Customer) ProtoMessage() {} func (x *Customer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type ListCustomersRequest struct { func (x *ListCustomersRequest) Reset() { *x = ListCustomersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersRequest) String() string { @@ -205,7 +201,7 @@ func (*ListCustomersRequest) ProtoMessage() {} func (x *ListCustomersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +268,9 @@ type ListCustomersResponse struct { func (x *ListCustomersResponse) Reset() { *x = ListCustomersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersResponse) String() string { @@ -287,7 +281,7 @@ func (*ListCustomersResponse) ProtoMessage() {} func (x *ListCustomersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +330,9 @@ type GetCustomerRequest struct { func (x *GetCustomerRequest) Reset() { *x = GetCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomerRequest) String() string { @@ -351,7 +343,7 @@ func (*GetCustomerRequest) ProtoMessage() {} func (x *GetCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +377,9 @@ type CustomerOnboardingState struct { func (x *CustomerOnboardingState) Reset() { *x = CustomerOnboardingState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerOnboardingState) String() string { @@ -400,7 +390,7 @@ func (*CustomerOnboardingState) ProtoMessage() {} func (x *CustomerOnboardingState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +430,9 @@ type CustomerOnboardingStep struct { func (x *CustomerOnboardingStep) Reset() { *x = CustomerOnboardingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerOnboardingStep) String() string { @@ -455,7 +443,7 @@ func (*CustomerOnboardingStep) ProtoMessage() {} func (x *CustomerOnboardingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,80 +661,6 @@ func file_google_cloud_cloudcontrolspartner_v1_customers_proto_init() { return } file_google_cloud_cloudcontrolspartner_v1_completion_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Customer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomerOnboardingState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_customers_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomerOnboardingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/ekm_connections.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/ekm_connections.pb.go index 491bff4097c1..2eda70993588 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/ekm_connections.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/ekm_connections.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/ekm_connections.proto @@ -112,11 +112,9 @@ type EkmConnections struct { func (x *EkmConnections) Reset() { *x = EkmConnections{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnections) String() string { @@ -127,7 +125,7 @@ func (*EkmConnections) ProtoMessage() {} func (x *EkmConnections) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +167,9 @@ type GetEkmConnectionsRequest struct { func (x *GetEkmConnectionsRequest) Reset() { *x = GetEkmConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEkmConnectionsRequest) String() string { @@ -184,7 +180,7 @@ func (*GetEkmConnectionsRequest) ProtoMessage() {} func (x *GetEkmConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,11 +219,9 @@ type EkmConnection struct { func (x *EkmConnection) Reset() { *x = EkmConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection) String() string { @@ -238,7 +232,7 @@ func (*EkmConnection) ProtoMessage() {} func (x *EkmConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +283,9 @@ type EkmConnection_ConnectionError struct { func (x *EkmConnection_ConnectionError) Reset() { *x = EkmConnection_ConnectionError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection_ConnectionError) String() string { @@ -304,7 +296,7 @@ func (*EkmConnection_ConnectionError) ProtoMessage() {} func (x *EkmConnection_ConnectionError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,56 +453,6 @@ func file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_init() { if File_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetEkmConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_ekm_connections_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection_ConnectionError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/monitoring.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/monitoring.pb.go index 50192b2ae9e8..da751b19cd5a 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/monitoring.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/monitoring.proto diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partner_permissions.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partner_permissions.pb.go index cb72b9504f8c..ab2db6f58390 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partner_permissions.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partner_permissions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/partner_permissions.proto @@ -115,11 +115,9 @@ type PartnerPermissions struct { func (x *PartnerPermissions) Reset() { *x = PartnerPermissions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartnerPermissions) String() string { @@ -130,7 +128,7 @@ func (*PartnerPermissions) ProtoMessage() {} func (x *PartnerPermissions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,11 +170,9 @@ type GetPartnerPermissionsRequest struct { func (x *GetPartnerPermissionsRequest) Reset() { *x = GetPartnerPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartnerPermissionsRequest) String() string { @@ -187,7 +183,7 @@ func (*GetPartnerPermissionsRequest) ProtoMessage() {} func (x *GetPartnerPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,32 +316,6 @@ func file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_init() if File_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PartnerPermissions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_partner_permissions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPartnerPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partners.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partners.pb.go index d0c8a14fff7a..3dabb6b91883 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partners.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/partners.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/partners.proto @@ -129,11 +129,9 @@ type Partner struct { func (x *Partner) Reset() { *x = Partner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partner) String() string { @@ -144,7 +142,7 @@ func (*Partner) ProtoMessage() {} func (x *Partner) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type GetPartnerRequest struct { func (x *GetPartnerRequest) Reset() { *x = GetPartnerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartnerRequest) String() string { @@ -236,7 +232,7 @@ func (*GetPartnerRequest) ProtoMessage() {} func (x *GetPartnerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type Sku struct { func (x *Sku) Reset() { *x = Sku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sku) String() string { @@ -291,7 +285,7 @@ func (*Sku) ProtoMessage() {} func (x *Sku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +329,9 @@ type EkmMetadata struct { func (x *EkmMetadata) Reset() { *x = EkmMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmMetadata) String() string { @@ -350,7 +342,7 @@ func (*EkmMetadata) ProtoMessage() {} func (x *EkmMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,56 +505,6 @@ func file_google_cloud_cloudcontrolspartner_v1_partners_proto_init() { if File_google_cloud_cloudcontrolspartner_v1_partners_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Partner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPartnerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Sku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_partners_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EkmMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/violations.pb.go b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/violations.pb.go index 9aa2f9bdce96..646ff1f0333c 100755 --- a/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/violations.pb.go +++ b/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb/violations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1/violations.proto @@ -204,11 +204,9 @@ type Violation struct { func (x *Violation) Reset() { *x = Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation) String() string { @@ -219,7 +217,7 @@ func (*Violation) ProtoMessage() {} func (x *Violation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +330,9 @@ type ListViolationsRequest struct { func (x *ListViolationsRequest) Reset() { *x = ListViolationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsRequest) String() string { @@ -347,7 +343,7 @@ func (*ListViolationsRequest) ProtoMessage() {} func (x *ListViolationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +418,9 @@ type ListViolationsResponse struct { func (x *ListViolationsResponse) Reset() { *x = ListViolationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsResponse) String() string { @@ -437,7 +431,7 @@ func (*ListViolationsResponse) ProtoMessage() {} func (x *ListViolationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +480,9 @@ type GetViolationRequest struct { func (x *GetViolationRequest) Reset() { *x = GetViolationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetViolationRequest) String() string { @@ -501,7 +493,7 @@ func (*GetViolationRequest) ProtoMessage() {} func (x *GetViolationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +535,9 @@ type Violation_Remediation struct { func (x *Violation_Remediation) Reset() { *x = Violation_Remediation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation) String() string { @@ -558,7 +548,7 @@ func (*Violation_Remediation) ProtoMessage() {} func (x *Violation_Remediation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +598,9 @@ type Violation_Remediation_Instructions struct { func (x *Violation_Remediation_Instructions) Reset() { *x = Violation_Remediation_Instructions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions) String() string { @@ -623,7 +611,7 @@ func (*Violation_Remediation_Instructions) ProtoMessage() {} func (x *Violation_Remediation_Instructions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +656,9 @@ type Violation_Remediation_Instructions_Gcloud struct { func (x *Violation_Remediation_Instructions_Gcloud) Reset() { *x = Violation_Remediation_Instructions_Gcloud{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Gcloud) String() string { @@ -683,7 +669,7 @@ func (*Violation_Remediation_Instructions_Gcloud) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Gcloud) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +721,9 @@ type Violation_Remediation_Instructions_Console struct { func (x *Violation_Remediation_Instructions_Console) Reset() { *x = Violation_Remediation_Instructions_Console{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Console) String() string { @@ -750,7 +734,7 @@ func (*Violation_Remediation_Instructions_Console) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Console) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,104 +1019,6 @@ func file_google_cloud_cloudcontrolspartner_v1_violations_proto_init() { if File_google_cloud_cloudcontrolspartner_v1_violations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetViolationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Gcloud); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1_violations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Console); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1/helpers.go b/cloudcontrolspartner/apiv1/helpers.go index 44019f89b060..cda7d2706895 100755 --- a/cloudcontrolspartner/apiv1/helpers.go +++ b/cloudcontrolspartner/apiv1/helpers.go @@ -18,10 +18,20 @@ package cloudcontrolspartner import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudcontrolspartner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client.go b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client.go index 27f355e4372b..479169e752a4 100755 --- a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client.go +++ b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client.go @@ -19,7 +19,7 @@ package cloudcontrolspartner import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( cloudcontrolspartnerpb "cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -349,6 +348,8 @@ type cloudControlsPartnerCoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudControlsPartnerCoreClient creates a new cloud controls partner core client based on gRPC. @@ -375,6 +376,7 @@ func NewCloudControlsPartnerCoreClient(ctx context.Context, opts ...option.Clien connPool: connPool, cloudControlsPartnerCoreClient: cloudcontrolspartnerpb.NewCloudControlsPartnerCoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -421,6 +423,8 @@ type cloudControlsPartnerCoreRESTClient struct { // Points back to the CallOptions field of the containing CloudControlsPartnerCoreClient CallOptions **CloudControlsPartnerCoreCallOptions + + logger *slog.Logger } // NewCloudControlsPartnerCoreRESTClient creates a new cloud controls partner core rest client. @@ -438,6 +442,7 @@ func NewCloudControlsPartnerCoreRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -490,7 +495,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetWorkload(ctx context.Context, re var resp *cloudcontrolspartnerpb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetWorkload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetWorkload, req, settings.GRPC, c.logger, "GetWorkload") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListWorkloads(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetCustomer(ctx context.Context, re var resp *cloudcontrolspartnerpb.Customer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetCustomer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetCustomer, req, settings.GRPC, c.logger, "GetCustomer") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListCustomers(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListCustomers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListCustomers, req, settings.GRPC, c.logger, "ListCustomers") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetEkmConnections(ctx context.Conte var resp *cloudcontrolspartnerpb.EkmConnections err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetEkmConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetEkmConnections, req, settings.GRPC, c.logger, "GetEkmConnections") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetPartnerPermissions(ctx context.C var resp *cloudcontrolspartnerpb.PartnerPermissions err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetPartnerPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetPartnerPermissions, req, settings.GRPC, c.logger, "GetPartnerPermissions") return err }, opts...) if err != nil { @@ -665,7 +670,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) ListAccessApprovalRequests(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.ListAccessApprovalRequests(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.ListAccessApprovalRequests, req, settings.GRPC, c.logger, "ListAccessApprovalRequests") return err }, opts...) if err != nil { @@ -700,7 +705,7 @@ func (c *cloudControlsPartnerCoreGRPCClient) GetPartner(ctx context.Context, req var resp *cloudcontrolspartnerpb.Partner err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerCoreClient.GetPartner(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerCoreClient.GetPartner, req, settings.GRPC, c.logger, "GetPartner") return err }, opts...) if err != nil { @@ -742,17 +747,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetWorkload(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkload") if err != nil { return err } @@ -820,21 +815,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListWorkloads(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -897,17 +881,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetCustomer(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomer") if err != nil { return err } @@ -975,21 +949,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListCustomers(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1052,17 +1015,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetEkmConnections(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEkmConnections") if err != nil { return err } @@ -1112,17 +1065,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetPartnerPermissions(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPartnerPermissions") if err != nil { return err } @@ -1193,21 +1136,10 @@ func (c *cloudControlsPartnerCoreRESTClient) ListAccessApprovalRequests(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccessApprovalRequests") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1270,17 +1202,7 @@ func (c *cloudControlsPartnerCoreRESTClient) GetPartner(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPartner") if err != nil { return err } diff --git a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client_example_go123_test.go b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client_example_go123_test.go index eb140cf56567..5ef5316837cb 100644 --- a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client_example_go123_test.go +++ b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_core_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudControlsPartnerCoreClient_ListAccessApprovalRequests_all() { } for resp, err := range c.ListAccessApprovalRequests(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleCloudControlsPartnerCoreClient_ListCustomers_all() { } for resp, err := range c.ListCustomers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleCloudControlsPartnerCoreClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client.go b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client.go index 4d05d86bf239..1bb705e7fb29 100755 --- a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client.go +++ b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client.go @@ -19,7 +19,7 @@ package cloudcontrolspartner import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( cloudcontrolspartnerpb "cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -193,6 +192,8 @@ type cloudControlsPartnerMonitoringGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudControlsPartnerMonitoringClient creates a new cloud controls partner monitoring client based on gRPC. @@ -219,6 +220,7 @@ func NewCloudControlsPartnerMonitoringClient(ctx context.Context, opts ...option connPool: connPool, cloudControlsPartnerMonitoringClient: cloudcontrolspartnerpb.NewCloudControlsPartnerMonitoringClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -265,6 +267,8 @@ type cloudControlsPartnerMonitoringRESTClient struct { // Points back to the CallOptions field of the containing CloudControlsPartnerMonitoringClient CallOptions **CloudControlsPartnerMonitoringCallOptions + + logger *slog.Logger } // NewCloudControlsPartnerMonitoringRESTClient creates a new cloud controls partner monitoring rest client. @@ -282,6 +286,7 @@ func NewCloudControlsPartnerMonitoringRESTClient(ctx context.Context, opts ...op endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +350,7 @@ func (c *cloudControlsPartnerMonitoringGRPCClient) ListViolations(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerMonitoringClient.ListViolations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerMonitoringClient.ListViolations, req, settings.GRPC, c.logger, "ListViolations") return err }, opts...) if err != nil { @@ -380,7 +385,7 @@ func (c *cloudControlsPartnerMonitoringGRPCClient) GetViolation(ctx context.Cont var resp *cloudcontrolspartnerpb.Violation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudControlsPartnerMonitoringClient.GetViolation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudControlsPartnerMonitoringClient.GetViolation, req, settings.GRPC, c.logger, "GetViolation") return err }, opts...) if err != nil { @@ -460,21 +465,10 @@ func (c *cloudControlsPartnerMonitoringRESTClient) ListViolations(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListViolations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -537,17 +531,7 @@ func (c *cloudControlsPartnerMonitoringRESTClient) GetViolation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetViolation") if err != nil { return err } diff --git a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client_example_go123_test.go b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client_example_go123_test.go index 7f5ec86c751b..c750e5d124c0 100644 --- a/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client_example_go123_test.go +++ b/cloudcontrolspartner/apiv1beta/cloud_controls_partner_monitoring_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudControlsPartnerMonitoringClient_ListViolations_all() { } for resp, err := range c.ListViolations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/access_approval_requests.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/access_approval_requests.pb.go index 2df7023d1848..cc6f51294477 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/access_approval_requests.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/access_approval_requests.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto @@ -144,11 +144,9 @@ type AccessApprovalRequest struct { func (x *AccessApprovalRequest) Reset() { *x = AccessApprovalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessApprovalRequest) String() string { @@ -159,7 +157,7 @@ func (*AccessApprovalRequest) ProtoMessage() {} func (x *AccessApprovalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type ListAccessApprovalRequestsRequest struct { func (x *ListAccessApprovalRequestsRequest) Reset() { *x = ListAccessApprovalRequestsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessApprovalRequestsRequest) String() string { @@ -243,7 +239,7 @@ func (*ListAccessApprovalRequestsRequest) ProtoMessage() {} func (x *ListAccessApprovalRequestsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +306,9 @@ type ListAccessApprovalRequestsResponse struct { func (x *ListAccessApprovalRequestsResponse) Reset() { *x = ListAccessApprovalRequestsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccessApprovalRequestsResponse) String() string { @@ -325,7 +319,7 @@ func (*ListAccessApprovalRequestsResponse) ProtoMessage() {} func (x *ListAccessApprovalRequestsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type AccessReason struct { func (x *AccessReason) Reset() { *x = AccessReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessReason) String() string { @@ -390,7 +382,7 @@ func (*AccessReason) ProtoMessage() {} func (x *AccessReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,56 +577,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_prot if File_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessApprovalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessApprovalRequestsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAccessApprovalRequestsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_access_approval_requests_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AccessReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/completion_state.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/completion_state.pb.go index 06a677a67c57..789ad6051a0d 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/completion_state.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/completion_state.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/completion_state.proto diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/core.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/core.pb.go index 1a07bd76ca23..2b45d0856a97 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/core.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/core.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/core.proto @@ -69,11 +69,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_core_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_core_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -84,7 +82,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_core_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,20 +432,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_core_proto_init() { file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_init() file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_init() file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_core_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customer_workloads.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customer_workloads.pb.go index 04675a24b855..2f5122354a2a 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customer_workloads.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customer_workloads.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto @@ -191,11 +191,9 @@ type Workload struct { func (x *Workload) Reset() { *x = Workload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workload) String() string { @@ -206,7 +204,7 @@ func (*Workload) ProtoMessage() {} func (x *Workload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -323,7 +319,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +386,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -405,7 +399,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +448,9 @@ type GetWorkloadRequest struct { func (x *GetWorkloadRequest) Reset() { *x = GetWorkloadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkloadRequest) String() string { @@ -469,7 +461,7 @@ func (*GetWorkloadRequest) ProtoMessage() {} func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +495,9 @@ type WorkloadOnboardingState struct { func (x *WorkloadOnboardingState) Reset() { *x = WorkloadOnboardingState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadOnboardingState) String() string { @@ -518,7 +508,7 @@ func (*WorkloadOnboardingState) ProtoMessage() {} func (x *WorkloadOnboardingState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +548,9 @@ type WorkloadOnboardingStep struct { func (x *WorkloadOnboardingStep) Reset() { *x = WorkloadOnboardingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadOnboardingStep) String() string { @@ -573,7 +561,7 @@ func (*WorkloadOnboardingStep) ProtoMessage() {} func (x *WorkloadOnboardingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -834,80 +822,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_init return } file_google_cloud_cloudcontrolspartner_v1beta_completion_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Workload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkloadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadOnboardingState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customer_workloads_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadOnboardingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customers.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customers.pb.go index 50755d023dee..3a623f946001 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customers.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/customers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/customers.proto @@ -109,11 +109,9 @@ type Customer struct { func (x *Customer) Reset() { *x = Customer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Customer) String() string { @@ -124,7 +122,7 @@ func (*Customer) ProtoMessage() {} func (x *Customer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type ListCustomersRequest struct { func (x *ListCustomersRequest) Reset() { *x = ListCustomersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersRequest) String() string { @@ -205,7 +201,7 @@ func (*ListCustomersRequest) ProtoMessage() {} func (x *ListCustomersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +268,9 @@ type ListCustomersResponse struct { func (x *ListCustomersResponse) Reset() { *x = ListCustomersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomersResponse) String() string { @@ -287,7 +281,7 @@ func (*ListCustomersResponse) ProtoMessage() {} func (x *ListCustomersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +330,9 @@ type GetCustomerRequest struct { func (x *GetCustomerRequest) Reset() { *x = GetCustomerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomerRequest) String() string { @@ -351,7 +343,7 @@ func (*GetCustomerRequest) ProtoMessage() {} func (x *GetCustomerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +377,9 @@ type CustomerOnboardingState struct { func (x *CustomerOnboardingState) Reset() { *x = CustomerOnboardingState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerOnboardingState) String() string { @@ -400,7 +390,7 @@ func (*CustomerOnboardingState) ProtoMessage() {} func (x *CustomerOnboardingState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +430,9 @@ type CustomerOnboardingStep struct { func (x *CustomerOnboardingStep) Reset() { *x = CustomerOnboardingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerOnboardingStep) String() string { @@ -455,7 +443,7 @@ func (*CustomerOnboardingStep) ProtoMessage() {} func (x *CustomerOnboardingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,80 +664,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_init() { return } file_google_cloud_cloudcontrolspartner_v1beta_completion_state_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Customer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomerOnboardingState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_customers_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomerOnboardingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/ekm_connections.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/ekm_connections.pb.go index 1722c7468ad4..b2230d9f1c4b 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/ekm_connections.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/ekm_connections.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto @@ -112,11 +112,9 @@ type EkmConnections struct { func (x *EkmConnections) Reset() { *x = EkmConnections{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnections) String() string { @@ -127,7 +125,7 @@ func (*EkmConnections) ProtoMessage() {} func (x *EkmConnections) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +167,9 @@ type GetEkmConnectionsRequest struct { func (x *GetEkmConnectionsRequest) Reset() { *x = GetEkmConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEkmConnectionsRequest) String() string { @@ -184,7 +180,7 @@ func (*GetEkmConnectionsRequest) ProtoMessage() {} func (x *GetEkmConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,11 +219,9 @@ type EkmConnection struct { func (x *EkmConnection) Reset() { *x = EkmConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection) String() string { @@ -238,7 +232,7 @@ func (*EkmConnection) ProtoMessage() {} func (x *EkmConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +283,9 @@ type EkmConnection_ConnectionError struct { func (x *EkmConnection_ConnectionError) Reset() { *x = EkmConnection_ConnectionError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection_ConnectionError) String() string { @@ -304,7 +296,7 @@ func (*EkmConnection_ConnectionError) ProtoMessage() {} func (x *EkmConnection_ConnectionError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,56 +455,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_init() if File_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetEkmConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_ekm_connections_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection_ConnectionError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/monitoring.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/monitoring.pb.go index e5f81d3dfdab..0b8ee45a20b7 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/monitoring.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/monitoring.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/monitoring.proto diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partner_permissions.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partner_permissions.pb.go index c8ef56c55afe..50244d92da4b 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partner_permissions.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partner_permissions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto @@ -115,11 +115,9 @@ type PartnerPermissions struct { func (x *PartnerPermissions) Reset() { *x = PartnerPermissions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartnerPermissions) String() string { @@ -130,7 +128,7 @@ func (*PartnerPermissions) ProtoMessage() {} func (x *PartnerPermissions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,11 +170,9 @@ type GetPartnerPermissionsRequest struct { func (x *GetPartnerPermissionsRequest) Reset() { *x = GetPartnerPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartnerPermissionsRequest) String() string { @@ -187,7 +183,7 @@ func (*GetPartnerPermissionsRequest) ProtoMessage() {} func (x *GetPartnerPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,32 +318,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_ini if File_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PartnerPermissions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_partner_permissions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPartnerPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partners.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partners.pb.go index 295bd483ed14..19aa39f179d8 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partners.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/partners.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/partners.proto @@ -129,11 +129,9 @@ type Partner struct { func (x *Partner) Reset() { *x = Partner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partner) String() string { @@ -144,7 +142,7 @@ func (*Partner) ProtoMessage() {} func (x *Partner) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type GetPartnerRequest struct { func (x *GetPartnerRequest) Reset() { *x = GetPartnerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartnerRequest) String() string { @@ -236,7 +232,7 @@ func (*GetPartnerRequest) ProtoMessage() {} func (x *GetPartnerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type Sku struct { func (x *Sku) Reset() { *x = Sku{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sku) String() string { @@ -291,7 +285,7 @@ func (*Sku) ProtoMessage() {} func (x *Sku) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +329,9 @@ type EkmMetadata struct { func (x *EkmMetadata) Reset() { *x = EkmMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmMetadata) String() string { @@ -350,7 +342,7 @@ func (*EkmMetadata) ProtoMessage() {} func (x *EkmMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,56 +507,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_init() { if File_google_cloud_cloudcontrolspartner_v1beta_partners_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Partner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPartnerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Sku); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_partners_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EkmMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/violations.pb.go b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/violations.pb.go index fea10fee295c..26b238a16cad 100755 --- a/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/violations.pb.go +++ b/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb/violations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/cloudcontrolspartner/v1beta/violations.proto @@ -204,11 +204,9 @@ type Violation struct { func (x *Violation) Reset() { *x = Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation) String() string { @@ -219,7 +217,7 @@ func (*Violation) ProtoMessage() {} func (x *Violation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +330,9 @@ type ListViolationsRequest struct { func (x *ListViolationsRequest) Reset() { *x = ListViolationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsRequest) String() string { @@ -347,7 +343,7 @@ func (*ListViolationsRequest) ProtoMessage() {} func (x *ListViolationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +418,9 @@ type ListViolationsResponse struct { func (x *ListViolationsResponse) Reset() { *x = ListViolationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViolationsResponse) String() string { @@ -437,7 +431,7 @@ func (*ListViolationsResponse) ProtoMessage() {} func (x *ListViolationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +480,9 @@ type GetViolationRequest struct { func (x *GetViolationRequest) Reset() { *x = GetViolationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetViolationRequest) String() string { @@ -501,7 +493,7 @@ func (*GetViolationRequest) ProtoMessage() {} func (x *GetViolationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +535,9 @@ type Violation_Remediation struct { func (x *Violation_Remediation) Reset() { *x = Violation_Remediation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation) String() string { @@ -558,7 +548,7 @@ func (*Violation_Remediation) ProtoMessage() {} func (x *Violation_Remediation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +598,9 @@ type Violation_Remediation_Instructions struct { func (x *Violation_Remediation_Instructions) Reset() { *x = Violation_Remediation_Instructions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions) String() string { @@ -623,7 +611,7 @@ func (*Violation_Remediation_Instructions) ProtoMessage() {} func (x *Violation_Remediation_Instructions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +656,9 @@ type Violation_Remediation_Instructions_Gcloud struct { func (x *Violation_Remediation_Instructions_Gcloud) Reset() { *x = Violation_Remediation_Instructions_Gcloud{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Gcloud) String() string { @@ -683,7 +669,7 @@ func (*Violation_Remediation_Instructions_Gcloud) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Gcloud) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +721,9 @@ type Violation_Remediation_Instructions_Console struct { func (x *Violation_Remediation_Instructions_Console) Reset() { *x = Violation_Remediation_Instructions_Console{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Violation_Remediation_Instructions_Console) String() string { @@ -750,7 +734,7 @@ func (*Violation_Remediation_Instructions_Console) ProtoMessage() {} func (x *Violation_Remediation_Instructions_Console) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,104 +1022,6 @@ func file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_init() { if File_google_cloud_cloudcontrolspartner_v1beta_violations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListViolationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetViolationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Gcloud); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_cloudcontrolspartner_v1beta_violations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Violation_Remediation_Instructions_Console); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudcontrolspartner/apiv1beta/helpers.go b/cloudcontrolspartner/apiv1beta/helpers.go index 44019f89b060..cda7d2706895 100755 --- a/cloudcontrolspartner/apiv1beta/helpers.go +++ b/cloudcontrolspartner/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package cloudcontrolspartner import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudcontrolspartner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/clouddms/apiv1/clouddmspb/clouddms.pb.go b/clouddms/apiv1/clouddmspb/clouddms.pb.go index c3a365424a78..0699bc983685 100755 --- a/clouddms/apiv1/clouddmspb/clouddms.pb.go +++ b/clouddms/apiv1/clouddmspb/clouddms.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/clouddms/v1/clouddms.proto @@ -198,11 +198,9 @@ type ListMigrationJobsRequest struct { func (x *ListMigrationJobsRequest) Reset() { *x = ListMigrationJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationJobsRequest) String() string { @@ -213,7 +211,7 @@ func (*ListMigrationJobsRequest) ProtoMessage() {} func (x *ListMigrationJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +278,9 @@ type ListMigrationJobsResponse struct { func (x *ListMigrationJobsResponse) Reset() { *x = ListMigrationJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigrationJobsResponse) String() string { @@ -295,7 +291,7 @@ func (*ListMigrationJobsResponse) ProtoMessage() {} func (x *ListMigrationJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -343,11 +339,9 @@ type GetMigrationJobRequest struct { func (x *GetMigrationJobRequest) Reset() { *x = GetMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigrationJobRequest) String() string { @@ -358,7 +352,7 @@ func (*GetMigrationJobRequest) ProtoMessage() {} func (x *GetMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +401,9 @@ type CreateMigrationJobRequest struct { func (x *CreateMigrationJobRequest) Reset() { *x = CreateMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMigrationJobRequest) String() string { @@ -422,7 +414,7 @@ func (*CreateMigrationJobRequest) ProtoMessage() {} func (x *CreateMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +480,9 @@ type UpdateMigrationJobRequest struct { func (x *UpdateMigrationJobRequest) Reset() { *x = UpdateMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMigrationJobRequest) String() string { @@ -503,7 +493,7 @@ func (*UpdateMigrationJobRequest) ProtoMessage() {} func (x *UpdateMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +553,9 @@ type DeleteMigrationJobRequest struct { func (x *DeleteMigrationJobRequest) Reset() { *x = DeleteMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMigrationJobRequest) String() string { @@ -578,7 +566,7 @@ func (*DeleteMigrationJobRequest) ProtoMessage() {} func (x *DeleteMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +617,9 @@ type StartMigrationJobRequest struct { func (x *StartMigrationJobRequest) Reset() { *x = StartMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMigrationJobRequest) String() string { @@ -644,7 +630,7 @@ func (*StartMigrationJobRequest) ProtoMessage() {} func (x *StartMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +671,9 @@ type StopMigrationJobRequest struct { func (x *StopMigrationJobRequest) Reset() { *x = StopMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopMigrationJobRequest) String() string { @@ -700,7 +684,7 @@ func (*StopMigrationJobRequest) ProtoMessage() {} func (x *StopMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +718,9 @@ type ResumeMigrationJobRequest struct { func (x *ResumeMigrationJobRequest) Reset() { *x = ResumeMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeMigrationJobRequest) String() string { @@ -749,7 +731,7 @@ func (*ResumeMigrationJobRequest) ProtoMessage() {} func (x *ResumeMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +765,9 @@ type PromoteMigrationJobRequest struct { func (x *PromoteMigrationJobRequest) Reset() { *x = PromoteMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteMigrationJobRequest) String() string { @@ -798,7 +778,7 @@ func (*PromoteMigrationJobRequest) ProtoMessage() {} func (x *PromoteMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +818,9 @@ type VerifyMigrationJobRequest struct { func (x *VerifyMigrationJobRequest) Reset() { *x = VerifyMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyMigrationJobRequest) String() string { @@ -853,7 +831,7 @@ func (*VerifyMigrationJobRequest) ProtoMessage() {} func (x *VerifyMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +882,9 @@ type RestartMigrationJobRequest struct { func (x *RestartMigrationJobRequest) Reset() { *x = RestartMigrationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestartMigrationJobRequest) String() string { @@ -919,7 +895,7 @@ func (*RestartMigrationJobRequest) ProtoMessage() {} func (x *RestartMigrationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,11 +947,9 @@ type GenerateSshScriptRequest struct { func (x *GenerateSshScriptRequest) Reset() { *x = GenerateSshScriptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateSshScriptRequest) String() string { @@ -986,7 +960,7 @@ func (*GenerateSshScriptRequest) ProtoMessage() {} func (x *GenerateSshScriptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1051,9 @@ type VmCreationConfig struct { func (x *VmCreationConfig) Reset() { *x = VmCreationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmCreationConfig) String() string { @@ -1092,7 +1064,7 @@ func (*VmCreationConfig) ProtoMessage() {} func (x *VmCreationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1140,11 +1112,9 @@ type VmSelectionConfig struct { func (x *VmSelectionConfig) Reset() { *x = VmSelectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmSelectionConfig) String() string { @@ -1155,7 +1125,7 @@ func (*VmSelectionConfig) ProtoMessage() {} func (x *VmSelectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1189,11 +1159,9 @@ type SshScript struct { func (x *SshScript) Reset() { *x = SshScript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SshScript) String() string { @@ -1204,7 +1172,7 @@ func (*SshScript) ProtoMessage() {} func (x *SshScript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1220,9 @@ type GenerateTcpProxyScriptRequest struct { func (x *GenerateTcpProxyScriptRequest) Reset() { *x = GenerateTcpProxyScriptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTcpProxyScriptRequest) String() string { @@ -1267,7 +1233,7 @@ func (*GenerateTcpProxyScriptRequest) ProtoMessage() {} func (x *GenerateTcpProxyScriptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1329,11 +1295,9 @@ type TcpProxyScript struct { func (x *TcpProxyScript) Reset() { *x = TcpProxyScript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpProxyScript) String() string { @@ -1344,7 +1308,7 @@ func (*TcpProxyScript) ProtoMessage() {} func (x *TcpProxyScript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1365,9 @@ type ListConnectionProfilesRequest struct { func (x *ListConnectionProfilesRequest) Reset() { *x = ListConnectionProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesRequest) String() string { @@ -1416,7 +1378,7 @@ func (*ListConnectionProfilesRequest) ProtoMessage() {} func (x *ListConnectionProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1483,11 +1445,9 @@ type ListConnectionProfilesResponse struct { func (x *ListConnectionProfilesResponse) Reset() { *x = ListConnectionProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesResponse) String() string { @@ -1498,7 +1458,7 @@ func (*ListConnectionProfilesResponse) ProtoMessage() {} func (x *ListConnectionProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1546,11 +1506,9 @@ type GetConnectionProfileRequest struct { func (x *GetConnectionProfileRequest) Reset() { *x = GetConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionProfileRequest) String() string { @@ -1561,7 +1519,7 @@ func (*GetConnectionProfileRequest) ProtoMessage() {} func (x *GetConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1615,11 +1573,9 @@ type CreateConnectionProfileRequest struct { func (x *CreateConnectionProfileRequest) Reset() { *x = CreateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionProfileRequest) String() string { @@ -1630,7 +1586,7 @@ func (*CreateConnectionProfileRequest) ProtoMessage() {} func (x *CreateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1718,11 +1674,9 @@ type UpdateConnectionProfileRequest struct { func (x *UpdateConnectionProfileRequest) Reset() { *x = UpdateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionProfileRequest) String() string { @@ -1733,7 +1687,7 @@ func (*UpdateConnectionProfileRequest) ProtoMessage() {} func (x *UpdateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1760,9 @@ type DeleteConnectionProfileRequest struct { func (x *DeleteConnectionProfileRequest) Reset() { *x = DeleteConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionProfileRequest) String() string { @@ -1821,7 +1773,7 @@ func (*DeleteConnectionProfileRequest) ProtoMessage() {} func (x *DeleteConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,11 +1836,9 @@ type CreatePrivateConnectionRequest struct { func (x *CreatePrivateConnectionRequest) Reset() { *x = CreatePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePrivateConnectionRequest) String() string { @@ -1899,7 +1849,7 @@ func (*CreatePrivateConnectionRequest) ProtoMessage() {} func (x *CreatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1932,9 @@ type ListPrivateConnectionsRequest struct { func (x *ListPrivateConnectionsRequest) Reset() { *x = ListPrivateConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsRequest) String() string { @@ -1997,7 +1945,7 @@ func (*ListPrivateConnectionsRequest) ProtoMessage() {} func (x *ListPrivateConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2064,11 +2012,9 @@ type ListPrivateConnectionsResponse struct { func (x *ListPrivateConnectionsResponse) Reset() { *x = ListPrivateConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsResponse) String() string { @@ -2079,7 +2025,7 @@ func (*ListPrivateConnectionsResponse) ProtoMessage() {} func (x *ListPrivateConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2135,11 +2081,9 @@ type DeletePrivateConnectionRequest struct { func (x *DeletePrivateConnectionRequest) Reset() { *x = DeletePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePrivateConnectionRequest) String() string { @@ -2150,7 +2094,7 @@ func (*DeletePrivateConnectionRequest) ProtoMessage() {} func (x *DeletePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2191,11 +2135,9 @@ type GetPrivateConnectionRequest struct { func (x *GetPrivateConnectionRequest) Reset() { *x = GetPrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPrivateConnectionRequest) String() string { @@ -2206,7 +2148,7 @@ func (*GetPrivateConnectionRequest) ProtoMessage() {} func (x *GetPrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2256,11 +2198,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2271,7 +2211,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,11 +2306,9 @@ type ListConversionWorkspacesRequest struct { func (x *ListConversionWorkspacesRequest) Reset() { *x = ListConversionWorkspacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionWorkspacesRequest) String() string { @@ -2381,7 +2319,7 @@ func (*ListConversionWorkspacesRequest) ProtoMessage() {} func (x *ListConversionWorkspacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2441,11 +2379,9 @@ type ListConversionWorkspacesResponse struct { func (x *ListConversionWorkspacesResponse) Reset() { *x = ListConversionWorkspacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionWorkspacesResponse) String() string { @@ -2456,7 +2392,7 @@ func (*ListConversionWorkspacesResponse) ProtoMessage() {} func (x *ListConversionWorkspacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2504,11 +2440,9 @@ type GetConversionWorkspaceRequest struct { func (x *GetConversionWorkspaceRequest) Reset() { *x = GetConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversionWorkspaceRequest) String() string { @@ -2519,7 +2453,7 @@ func (*GetConversionWorkspaceRequest) ProtoMessage() {} func (x *GetConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2566,11 +2500,9 @@ type CreateConversionWorkspaceRequest struct { func (x *CreateConversionWorkspaceRequest) Reset() { *x = CreateConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversionWorkspaceRequest) String() string { @@ -2581,7 +2513,7 @@ func (*CreateConversionWorkspaceRequest) ProtoMessage() {} func (x *CreateConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2647,11 +2579,9 @@ type UpdateConversionWorkspaceRequest struct { func (x *UpdateConversionWorkspaceRequest) Reset() { *x = UpdateConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversionWorkspaceRequest) String() string { @@ -2662,7 +2592,7 @@ func (*UpdateConversionWorkspaceRequest) ProtoMessage() {} func (x *UpdateConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2721,11 +2651,9 @@ type DeleteConversionWorkspaceRequest struct { func (x *DeleteConversionWorkspaceRequest) Reset() { *x = DeleteConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversionWorkspaceRequest) String() string { @@ -2736,7 +2664,7 @@ func (*DeleteConversionWorkspaceRequest) ProtoMessage() {} func (x *DeleteConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2786,11 +2714,9 @@ type CommitConversionWorkspaceRequest struct { func (x *CommitConversionWorkspaceRequest) Reset() { *x = CommitConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitConversionWorkspaceRequest) String() string { @@ -2801,7 +2727,7 @@ func (*CommitConversionWorkspaceRequest) ProtoMessage() {} func (x *CommitConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2842,11 +2768,9 @@ type RollbackConversionWorkspaceRequest struct { func (x *RollbackConversionWorkspaceRequest) Reset() { *x = RollbackConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackConversionWorkspaceRequest) String() string { @@ -2857,7 +2781,7 @@ func (*RollbackConversionWorkspaceRequest) ProtoMessage() {} func (x *RollbackConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2910,11 +2834,9 @@ type ApplyConversionWorkspaceRequest struct { func (x *ApplyConversionWorkspaceRequest) Reset() { *x = ApplyConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConversionWorkspaceRequest) String() string { @@ -2925,7 +2847,7 @@ func (*ApplyConversionWorkspaceRequest) ProtoMessage() {} func (x *ApplyConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3018,11 +2940,9 @@ type ListMappingRulesRequest struct { func (x *ListMappingRulesRequest) Reset() { *x = ListMappingRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMappingRulesRequest) String() string { @@ -3033,7 +2953,7 @@ func (*ListMappingRulesRequest) ProtoMessage() {} func (x *ListMappingRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3084,11 +3004,9 @@ type ListMappingRulesResponse struct { func (x *ListMappingRulesResponse) Reset() { *x = ListMappingRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMappingRulesResponse) String() string { @@ -3099,7 +3017,7 @@ func (*ListMappingRulesResponse) ProtoMessage() {} func (x *ListMappingRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3146,11 +3064,9 @@ type GetMappingRuleRequest struct { func (x *GetMappingRuleRequest) Reset() { *x = GetMappingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMappingRuleRequest) String() string { @@ -3161,7 +3077,7 @@ func (*GetMappingRuleRequest) ProtoMessage() {} func (x *GetMappingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3209,11 +3125,9 @@ type SeedConversionWorkspaceRequest struct { func (x *SeedConversionWorkspaceRequest) Reset() { *x = SeedConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeedConversionWorkspaceRequest) String() string { @@ -3224,7 +3138,7 @@ func (*SeedConversionWorkspaceRequest) ProtoMessage() {} func (x *SeedConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3318,11 +3232,9 @@ type ConvertConversionWorkspaceRequest struct { func (x *ConvertConversionWorkspaceRequest) Reset() { *x = ConvertConversionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConvertConversionWorkspaceRequest) String() string { @@ -3333,7 +3245,7 @@ func (*ConvertConversionWorkspaceRequest) ProtoMessage() {} func (x *ConvertConversionWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3397,11 +3309,9 @@ type ImportMappingRulesRequest struct { func (x *ImportMappingRulesRequest) Reset() { *x = ImportMappingRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMappingRulesRequest) String() string { @@ -3412,7 +3322,7 @@ func (*ImportMappingRulesRequest) ProtoMessage() {} func (x *ImportMappingRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3492,11 +3402,9 @@ type DescribeDatabaseEntitiesRequest struct { func (x *DescribeDatabaseEntitiesRequest) Reset() { *x = DescribeDatabaseEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescribeDatabaseEntitiesRequest) String() string { @@ -3507,7 +3415,7 @@ func (*DescribeDatabaseEntitiesRequest) ProtoMessage() {} func (x *DescribeDatabaseEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3593,11 +3501,9 @@ type DescribeDatabaseEntitiesResponse struct { func (x *DescribeDatabaseEntitiesResponse) Reset() { *x = DescribeDatabaseEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescribeDatabaseEntitiesResponse) String() string { @@ -3608,7 +3514,7 @@ func (*DescribeDatabaseEntitiesResponse) ProtoMessage() {} func (x *DescribeDatabaseEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3661,11 +3567,9 @@ type SearchBackgroundJobsRequest struct { func (x *SearchBackgroundJobsRequest) Reset() { *x = SearchBackgroundJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchBackgroundJobsRequest) String() string { @@ -3676,7 +3580,7 @@ func (*SearchBackgroundJobsRequest) ProtoMessage() {} func (x *SearchBackgroundJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3731,11 +3635,9 @@ type SearchBackgroundJobsResponse struct { func (x *SearchBackgroundJobsResponse) Reset() { *x = SearchBackgroundJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchBackgroundJobsResponse) String() string { @@ -3746,7 +3648,7 @@ func (*SearchBackgroundJobsResponse) ProtoMessage() {} func (x *SearchBackgroundJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3784,11 +3686,9 @@ type DescribeConversionWorkspaceRevisionsRequest struct { func (x *DescribeConversionWorkspaceRevisionsRequest) Reset() { *x = DescribeConversionWorkspaceRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescribeConversionWorkspaceRevisionsRequest) String() string { @@ -3799,7 +3699,7 @@ func (*DescribeConversionWorkspaceRevisionsRequest) ProtoMessage() {} func (x *DescribeConversionWorkspaceRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3840,11 +3740,9 @@ type DescribeConversionWorkspaceRevisionsResponse struct { func (x *DescribeConversionWorkspaceRevisionsResponse) Reset() { *x = DescribeConversionWorkspaceRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescribeConversionWorkspaceRevisionsResponse) String() string { @@ -3855,7 +3753,7 @@ func (*DescribeConversionWorkspaceRevisionsResponse) ProtoMessage() {} func (x *DescribeConversionWorkspaceRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3903,11 +3801,9 @@ type CreateMappingRuleRequest struct { func (x *CreateMappingRuleRequest) Reset() { *x = CreateMappingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMappingRuleRequest) String() string { @@ -3918,7 +3814,7 @@ func (*CreateMappingRuleRequest) ProtoMessage() {} func (x *CreateMappingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3981,11 +3877,9 @@ type DeleteMappingRuleRequest struct { func (x *DeleteMappingRuleRequest) Reset() { *x = DeleteMappingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMappingRuleRequest) String() string { @@ -3996,7 +3890,7 @@ func (*DeleteMappingRuleRequest) ProtoMessage() {} func (x *DeleteMappingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4042,11 +3936,9 @@ type FetchStaticIpsRequest struct { func (x *FetchStaticIpsRequest) Reset() { *x = FetchStaticIpsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsRequest) String() string { @@ -4057,7 +3949,7 @@ func (*FetchStaticIpsRequest) ProtoMessage() {} func (x *FetchStaticIpsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4108,11 +4000,9 @@ type FetchStaticIpsResponse struct { func (x *FetchStaticIpsResponse) Reset() { *x = FetchStaticIpsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsResponse) String() string { @@ -4123,7 +4013,7 @@ func (*FetchStaticIpsResponse) ProtoMessage() {} func (x *FetchStaticIpsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4168,11 +4058,9 @@ type ImportMappingRulesRequest_RulesFile struct { func (x *ImportMappingRulesRequest_RulesFile) Reset() { *x = ImportMappingRulesRequest_RulesFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMappingRulesRequest_RulesFile) String() string { @@ -4183,7 +4071,7 @@ func (*ImportMappingRulesRequest_RulesFile) ProtoMessage() {} func (x *ImportMappingRulesRequest_RulesFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5763,680 +5651,6 @@ func file_google_cloud_clouddms_v1_clouddms_proto_init() { } file_google_cloud_clouddms_v1_clouddms_resources_proto_init() file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListMigrationJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StartMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StopMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PromoteMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VerifyMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RestartMigrationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GenerateSshScriptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*VmCreationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*VmSelectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SshScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateTcpProxyScriptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TcpProxyScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreatePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeletePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetPrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionWorkspacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionWorkspacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CommitConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RollbackConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListMappingRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListMappingRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*GetMappingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SeedConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ConvertConversionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ImportMappingRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*DescribeDatabaseEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*DescribeDatabaseEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SearchBackgroundJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SearchBackgroundJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*DescribeConversionWorkspaceRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*DescribeConversionWorkspaceRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*CreateMappingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMappingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ImportMappingRulesRequest_RulesFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_clouddms_v1_clouddms_proto_msgTypes[12].OneofWrappers = []any{ (*GenerateSshScriptRequest_VmCreationConfig)(nil), (*GenerateSshScriptRequest_VmSelectionConfig)(nil), diff --git a/clouddms/apiv1/clouddmspb/clouddms_resources.pb.go b/clouddms/apiv1/clouddmspb/clouddms_resources.pb.go index 63a20863113f..9c64d5693f16 100755 --- a/clouddms/apiv1/clouddmspb/clouddms_resources.pb.go +++ b/clouddms/apiv1/clouddmspb/clouddms_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/clouddms/v1/clouddms_resources.proto @@ -1166,11 +1166,9 @@ type SslConfig struct { func (x *SslConfig) Reset() { *x = SslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslConfig) String() string { @@ -1181,7 +1179,7 @@ func (*SslConfig) ProtoMessage() {} func (x *SslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1252,9 @@ type MySqlConnectionProfile struct { func (x *MySqlConnectionProfile) Reset() { *x = MySqlConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MySqlConnectionProfile) String() string { @@ -1269,7 +1265,7 @@ func (*MySqlConnectionProfile) ProtoMessage() {} func (x *MySqlConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,11 +1370,9 @@ type PostgreSqlConnectionProfile struct { func (x *PostgreSqlConnectionProfile) Reset() { *x = PostgreSqlConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgreSqlConnectionProfile) String() string { @@ -1389,7 +1383,7 @@ func (*PostgreSqlConnectionProfile) ProtoMessage() {} func (x *PostgreSqlConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1542,11 +1536,9 @@ type OracleConnectionProfile struct { func (x *OracleConnectionProfile) Reset() { *x = OracleConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleConnectionProfile) String() string { @@ -1557,7 +1549,7 @@ func (*OracleConnectionProfile) ProtoMessage() {} func (x *OracleConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1699,11 +1691,9 @@ type CloudSqlConnectionProfile struct { func (x *CloudSqlConnectionProfile) Reset() { *x = CloudSqlConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlConnectionProfile) String() string { @@ -1714,7 +1704,7 @@ func (*CloudSqlConnectionProfile) ProtoMessage() {} func (x *CloudSqlConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1780,11 +1770,9 @@ type AlloyDbConnectionProfile struct { func (x *AlloyDbConnectionProfile) Reset() { *x = AlloyDbConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbConnectionProfile) String() string { @@ -1795,7 +1783,7 @@ func (*AlloyDbConnectionProfile) ProtoMessage() {} func (x *AlloyDbConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1845,11 +1833,9 @@ type SqlAclEntry struct { func (x *SqlAclEntry) Reset() { *x = SqlAclEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlAclEntry) String() string { @@ -1860,7 +1846,7 @@ func (*SqlAclEntry) ProtoMessage() {} func (x *SqlAclEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1961,11 +1947,9 @@ type SqlIpConfig struct { func (x *SqlIpConfig) Reset() { *x = SqlIpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlIpConfig) String() string { @@ -1976,7 +1960,7 @@ func (*SqlIpConfig) ProtoMessage() {} func (x *SqlIpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,11 +2093,9 @@ type CloudSqlSettings struct { func (x *CloudSqlSettings) Reset() { *x = CloudSqlSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlSettings) String() string { @@ -2124,7 +2106,7 @@ func (*CloudSqlSettings) ProtoMessage() {} func (x *CloudSqlSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2301,11 +2283,9 @@ type AlloyDbSettings struct { func (x *AlloyDbSettings) Reset() { *x = AlloyDbSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSettings) String() string { @@ -2316,7 +2296,7 @@ func (*AlloyDbSettings) ProtoMessage() {} func (x *AlloyDbSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2358,9 @@ type StaticIpConnectivity struct { func (x *StaticIpConnectivity) Reset() { *x = StaticIpConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticIpConnectivity) String() string { @@ -2393,7 +2371,7 @@ func (*StaticIpConnectivity) ProtoMessage() {} func (x *StaticIpConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2423,11 +2401,9 @@ type PrivateServiceConnectConnectivity struct { func (x *PrivateServiceConnectConnectivity) Reset() { *x = PrivateServiceConnectConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateServiceConnectConnectivity) String() string { @@ -2438,7 +2414,7 @@ func (*PrivateServiceConnectConnectivity) ProtoMessage() {} func (x *PrivateServiceConnectConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2486,11 +2462,9 @@ type ReverseSshConnectivity struct { func (x *ReverseSshConnectivity) Reset() { *x = ReverseSshConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseSshConnectivity) String() string { @@ -2501,7 +2475,7 @@ func (*ReverseSshConnectivity) ProtoMessage() {} func (x *ReverseSshConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2558,11 +2532,9 @@ type VpcPeeringConnectivity struct { func (x *VpcPeeringConnectivity) Reset() { *x = VpcPeeringConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcPeeringConnectivity) String() string { @@ -2573,7 +2545,7 @@ func (*VpcPeeringConnectivity) ProtoMessage() {} func (x *VpcPeeringConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2616,11 +2588,9 @@ type ForwardSshTunnelConnectivity struct { func (x *ForwardSshTunnelConnectivity) Reset() { *x = ForwardSshTunnelConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardSshTunnelConnectivity) String() string { @@ -2631,7 +2601,7 @@ func (*ForwardSshTunnelConnectivity) ProtoMessage() {} func (x *ForwardSshTunnelConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2716,11 +2686,9 @@ type StaticServiceIpConnectivity struct { func (x *StaticServiceIpConnectivity) Reset() { *x = StaticServiceIpConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticServiceIpConnectivity) String() string { @@ -2731,7 +2699,7 @@ func (*StaticServiceIpConnectivity) ProtoMessage() {} func (x *StaticServiceIpConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2758,11 +2726,9 @@ type PrivateConnectivity struct { func (x *PrivateConnectivity) Reset() { *x = PrivateConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnectivity) String() string { @@ -2773,7 +2739,7 @@ func (*PrivateConnectivity) ProtoMessage() {} func (x *PrivateConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2809,11 +2775,9 @@ type DatabaseType struct { func (x *DatabaseType) Reset() { *x = DatabaseType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseType) String() string { @@ -2824,7 +2788,7 @@ func (*DatabaseType) ProtoMessage() {} func (x *DatabaseType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2943,11 +2907,9 @@ type MigrationJob struct { func (x *MigrationJob) Reset() { *x = MigrationJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationJob) String() string { @@ -2958,7 +2920,7 @@ func (*MigrationJob) ProtoMessage() {} func (x *MigrationJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3188,11 +3150,9 @@ type ConversionWorkspaceInfo struct { func (x *ConversionWorkspaceInfo) Reset() { *x = ConversionWorkspaceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionWorkspaceInfo) String() string { @@ -3203,7 +3163,7 @@ func (*ConversionWorkspaceInfo) ProtoMessage() {} func (x *ConversionWorkspaceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3277,11 +3237,9 @@ type ConnectionProfile struct { func (x *ConnectionProfile) Reset() { *x = ConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionProfile) String() string { @@ -3292,7 +3250,7 @@ func (*ConnectionProfile) ProtoMessage() {} func (x *ConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3461,11 +3419,9 @@ type MigrationJobVerificationError struct { func (x *MigrationJobVerificationError) Reset() { *x = MigrationJobVerificationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationJobVerificationError) String() string { @@ -3476,7 +3432,7 @@ func (*MigrationJobVerificationError) ProtoMessage() {} func (x *MigrationJobVerificationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3545,11 +3501,9 @@ type PrivateConnection struct { func (x *PrivateConnection) Reset() { *x = PrivateConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnection) String() string { @@ -3560,7 +3514,7 @@ func (*PrivateConnection) ProtoMessage() {} func (x *PrivateConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3665,11 +3619,9 @@ type VpcPeeringConfig struct { func (x *VpcPeeringConfig) Reset() { *x = VpcPeeringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcPeeringConfig) String() string { @@ -3680,7 +3632,7 @@ func (*VpcPeeringConfig) ProtoMessage() {} func (x *VpcPeeringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3726,11 +3678,9 @@ type AlloyDbSettings_UserPassword struct { func (x *AlloyDbSettings_UserPassword) Reset() { *x = AlloyDbSettings_UserPassword{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSettings_UserPassword) String() string { @@ -3741,7 +3691,7 @@ func (*AlloyDbSettings_UserPassword) ProtoMessage() {} func (x *AlloyDbSettings_UserPassword) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3803,11 +3753,9 @@ type AlloyDbSettings_PrimaryInstanceSettings struct { func (x *AlloyDbSettings_PrimaryInstanceSettings) Reset() { *x = AlloyDbSettings_PrimaryInstanceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSettings_PrimaryInstanceSettings) String() string { @@ -3818,7 +3766,7 @@ func (*AlloyDbSettings_PrimaryInstanceSettings) ProtoMessage() {} func (x *AlloyDbSettings_PrimaryInstanceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3883,11 +3831,9 @@ type AlloyDbSettings_EncryptionConfig struct { func (x *AlloyDbSettings_EncryptionConfig) Reset() { *x = AlloyDbSettings_EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSettings_EncryptionConfig) String() string { @@ -3898,7 +3844,7 @@ func (*AlloyDbSettings_EncryptionConfig) ProtoMessage() {} func (x *AlloyDbSettings_EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3932,11 +3878,9 @@ type AlloyDbSettings_PrimaryInstanceSettings_MachineConfig struct { func (x *AlloyDbSettings_PrimaryInstanceSettings_MachineConfig) Reset() { *x = AlloyDbSettings_PrimaryInstanceSettings_MachineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSettings_PrimaryInstanceSettings_MachineConfig) String() string { @@ -3947,7 +3891,7 @@ func (*AlloyDbSettings_PrimaryInstanceSettings_MachineConfig) ProtoMessage() {} func (x *AlloyDbSettings_PrimaryInstanceSettings_MachineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3983,11 +3927,9 @@ type MigrationJob_DumpFlag struct { func (x *MigrationJob_DumpFlag) Reset() { *x = MigrationJob_DumpFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationJob_DumpFlag) String() string { @@ -3998,7 +3940,7 @@ func (*MigrationJob_DumpFlag) ProtoMessage() {} func (x *MigrationJob_DumpFlag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4039,11 +3981,9 @@ type MigrationJob_DumpFlags struct { func (x *MigrationJob_DumpFlags) Reset() { *x = MigrationJob_DumpFlags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationJob_DumpFlags) String() string { @@ -4054,7 +3994,7 @@ func (*MigrationJob_DumpFlags) ProtoMessage() {} func (x *MigrationJob_DumpFlags) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4088,11 +4028,9 @@ type MigrationJob_PerformanceConfig struct { func (x *MigrationJob_PerformanceConfig) Reset() { *x = MigrationJob_PerformanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationJob_PerformanceConfig) String() string { @@ -4103,7 +4041,7 @@ func (*MigrationJob_PerformanceConfig) ProtoMessage() {} func (x *MigrationJob_PerformanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5153,380 +5091,6 @@ func file_google_cloud_clouddms_v1_clouddms_resources_proto_init() { if File_google_cloud_clouddms_v1_clouddms_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MySqlConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PostgreSqlConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OracleConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SqlAclEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SqlIpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StaticIpConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PrivateServiceConnectConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReverseSshConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*VpcPeeringConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ForwardSshTunnelConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StaticServiceIpConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*MigrationJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ConversionWorkspaceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*MigrationJobVerificationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*VpcPeeringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSettings_UserPassword); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSettings_PrimaryInstanceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSettings_EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSettings_PrimaryInstanceSettings_MachineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*MigrationJob_DumpFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*MigrationJob_DumpFlags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*MigrationJob_PerformanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_clouddms_v1_clouddms_resources_proto_msgTypes[2].OneofWrappers = []any{ (*PostgreSqlConnectionProfile_StaticIpConnectivity)(nil), (*PostgreSqlConnectionProfile_PrivateServiceConnectConnectivity)(nil), diff --git a/clouddms/apiv1/clouddmspb/conversionworkspace_resources.pb.go b/clouddms/apiv1/clouddmspb/conversionworkspace_resources.pb.go index f5b4d9641456..c8c2980fb84c 100755 --- a/clouddms/apiv1/clouddmspb/conversionworkspace_resources.pb.go +++ b/clouddms/apiv1/clouddmspb/conversionworkspace_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/clouddms/v1/conversionworkspace_resources.proto @@ -792,11 +792,9 @@ type DatabaseEngineInfo struct { func (x *DatabaseEngineInfo) Reset() { *x = DatabaseEngineInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseEngineInfo) String() string { @@ -807,7 +805,7 @@ func (*DatabaseEngineInfo) ProtoMessage() {} func (x *DatabaseEngineInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -872,11 +870,9 @@ type ConversionWorkspace struct { func (x *ConversionWorkspace) Reset() { *x = ConversionWorkspace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionWorkspace) String() string { @@ -887,7 +883,7 @@ func (*ConversionWorkspace) ProtoMessage() {} func (x *ConversionWorkspace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +1002,9 @@ type BackgroundJobLogEntry struct { func (x *BackgroundJobLogEntry) Reset() { *x = BackgroundJobLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackgroundJobLogEntry) String() string { @@ -1021,7 +1015,7 @@ func (*BackgroundJobLogEntry) ProtoMessage() {} func (x *BackgroundJobLogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1177,9 @@ type MappingRuleFilter struct { func (x *MappingRuleFilter) Reset() { *x = MappingRuleFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MappingRuleFilter) String() string { @@ -1198,7 +1190,7 @@ func (*MappingRuleFilter) ProtoMessage() {} func (x *MappingRuleFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,11 +1288,9 @@ type MappingRule struct { func (x *MappingRule) Reset() { *x = MappingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MappingRule) String() string { @@ -1311,7 +1301,7 @@ func (*MappingRule) ProtoMessage() {} func (x *MappingRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,11 +1563,9 @@ type SingleEntityRename struct { func (x *SingleEntityRename) Reset() { *x = SingleEntityRename{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SingleEntityRename) String() string { @@ -1588,7 +1576,7 @@ func (*SingleEntityRename) ProtoMessage() {} func (x *SingleEntityRename) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1637,11 +1625,9 @@ type MultiEntityRename struct { func (x *MultiEntityRename) Reset() { *x = MultiEntityRename{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiEntityRename) String() string { @@ -1652,7 +1638,7 @@ func (*MultiEntityRename) ProtoMessage() {} func (x *MultiEntityRename) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1699,11 +1685,9 @@ type EntityMove struct { func (x *EntityMove) Reset() { *x = EntityMove{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMove) String() string { @@ -1714,7 +1698,7 @@ func (*EntityMove) ProtoMessage() {} func (x *EntityMove) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1786,11 +1770,9 @@ type SingleColumnChange struct { func (x *SingleColumnChange) Reset() { *x = SingleColumnChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SingleColumnChange) String() string { @@ -1801,7 +1783,7 @@ func (*SingleColumnChange) ProtoMessage() {} func (x *SingleColumnChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1969,11 +1951,9 @@ type MultiColumnDatatypeChange struct { func (x *MultiColumnDatatypeChange) Reset() { *x = MultiColumnDatatypeChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiColumnDatatypeChange) String() string { @@ -1984,7 +1964,7 @@ func (*MultiColumnDatatypeChange) ProtoMessage() {} func (x *MultiColumnDatatypeChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2104,11 +2084,9 @@ type SourceTextFilter struct { func (x *SourceTextFilter) Reset() { *x = SourceTextFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceTextFilter) String() string { @@ -2119,7 +2097,7 @@ func (*SourceTextFilter) ProtoMessage() {} func (x *SourceTextFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2173,11 +2151,9 @@ type SourceNumericFilter struct { func (x *SourceNumericFilter) Reset() { *x = SourceNumericFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceNumericFilter) String() string { @@ -2188,7 +2164,7 @@ func (*SourceNumericFilter) ProtoMessage() {} func (x *SourceNumericFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2262,11 +2238,9 @@ type ConditionalColumnSetValue struct { func (x *ConditionalColumnSetValue) Reset() { *x = ConditionalColumnSetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionalColumnSetValue) String() string { @@ -2277,7 +2251,7 @@ func (*ConditionalColumnSetValue) ProtoMessage() {} func (x *ConditionalColumnSetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2374,11 +2348,9 @@ type ValueTransformation struct { func (x *ValueTransformation) Reset() { *x = ValueTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueTransformation) String() string { @@ -2389,7 +2361,7 @@ func (*ValueTransformation) ProtoMessage() {} func (x *ValueTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2593,11 +2565,9 @@ type ConvertRowIdToColumn struct { func (x *ConvertRowIdToColumn) Reset() { *x = ConvertRowIdToColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConvertRowIdToColumn) String() string { @@ -2608,7 +2578,7 @@ func (*ConvertRowIdToColumn) ProtoMessage() {} func (x *ConvertRowIdToColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2650,11 +2620,9 @@ type SetTablePrimaryKey struct { func (x *SetTablePrimaryKey) Reset() { *x = SetTablePrimaryKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTablePrimaryKey) String() string { @@ -2665,7 +2633,7 @@ func (*SetTablePrimaryKey) ProtoMessage() {} func (x *SetTablePrimaryKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2713,11 +2681,9 @@ type SinglePackageChange struct { func (x *SinglePackageChange) Reset() { *x = SinglePackageChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SinglePackageChange) String() string { @@ -2728,7 +2694,7 @@ func (*SinglePackageChange) ProtoMessage() {} func (x *SinglePackageChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2774,11 +2740,9 @@ type SourceSqlChange struct { func (x *SourceSqlChange) Reset() { *x = SourceSqlChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceSqlChange) String() string { @@ -2789,7 +2753,7 @@ func (*SourceSqlChange) ProtoMessage() {} func (x *SourceSqlChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2833,11 +2797,9 @@ type FilterTableColumns struct { func (x *FilterTableColumns) Reset() { *x = FilterTableColumns{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilterTableColumns) String() string { @@ -2848,7 +2810,7 @@ func (*FilterTableColumns) ProtoMessage() {} func (x *FilterTableColumns) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2895,11 +2857,9 @@ type ValueListFilter struct { func (x *ValueListFilter) Reset() { *x = ValueListFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueListFilter) String() string { @@ -2910,7 +2870,7 @@ func (*ValueListFilter) ProtoMessage() {} func (x *ValueListFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2961,11 +2921,9 @@ type IntComparisonFilter struct { func (x *IntComparisonFilter) Reset() { *x = IntComparisonFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntComparisonFilter) String() string { @@ -2976,7 +2934,7 @@ func (*IntComparisonFilter) ProtoMessage() {} func (x *IntComparisonFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3020,11 +2978,9 @@ type DoubleComparisonFilter struct { func (x *DoubleComparisonFilter) Reset() { *x = DoubleComparisonFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleComparisonFilter) String() string { @@ -3035,7 +2991,7 @@ func (*DoubleComparisonFilter) ProtoMessage() {} func (x *DoubleComparisonFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3076,11 +3032,9 @@ type AssignSpecificValue struct { func (x *AssignSpecificValue) Reset() { *x = AssignSpecificValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignSpecificValue) String() string { @@ -3091,7 +3045,7 @@ func (*AssignSpecificValue) ProtoMessage() {} func (x *AssignSpecificValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3127,11 +3081,9 @@ type ApplyHash struct { func (x *ApplyHash) Reset() { *x = ApplyHash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyHash) String() string { @@ -3142,7 +3094,7 @@ func (*ApplyHash) ProtoMessage() {} func (x *ApplyHash) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3196,11 +3148,9 @@ type RoundToScale struct { func (x *RoundToScale) Reset() { *x = RoundToScale{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoundToScale) String() string { @@ -3211,7 +3161,7 @@ func (*RoundToScale) ProtoMessage() {} func (x *RoundToScale) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,11 +3232,9 @@ type DatabaseEntity struct { func (x *DatabaseEntity) Reset() { *x = DatabaseEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseEntity) String() string { @@ -3297,7 +3245,7 @@ func (*DatabaseEntity) ProtoMessage() {} func (x *DatabaseEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3538,11 +3486,9 @@ type DatabaseInstanceEntity struct { func (x *DatabaseInstanceEntity) Reset() { *x = DatabaseInstanceEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseInstanceEntity) String() string { @@ -3553,7 +3499,7 @@ func (*DatabaseInstanceEntity) ProtoMessage() {} func (x *DatabaseInstanceEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3591,11 +3537,9 @@ type SchemaEntity struct { func (x *SchemaEntity) Reset() { *x = SchemaEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaEntity) String() string { @@ -3606,7 +3550,7 @@ func (*SchemaEntity) ProtoMessage() {} func (x *SchemaEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3650,11 +3594,9 @@ type TableEntity struct { func (x *TableEntity) Reset() { *x = TableEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableEntity) String() string { @@ -3665,7 +3607,7 @@ func (*TableEntity) ProtoMessage() {} func (x *TableEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3770,11 +3712,9 @@ type ColumnEntity struct { func (x *ColumnEntity) Reset() { *x = ColumnEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnEntity) String() string { @@ -3785,7 +3725,7 @@ func (*ColumnEntity) ProtoMessage() {} func (x *ColumnEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3960,11 +3900,9 @@ type ConstraintEntity struct { func (x *ConstraintEntity) Reset() { *x = ConstraintEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConstraintEntity) String() string { @@ -3975,7 +3913,7 @@ func (*ConstraintEntity) ProtoMessage() {} func (x *ConstraintEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4061,11 +3999,9 @@ type IndexEntity struct { func (x *IndexEntity) Reset() { *x = IndexEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexEntity) String() string { @@ -4076,7 +4012,7 @@ func (*IndexEntity) ProtoMessage() {} func (x *IndexEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4149,11 +4085,9 @@ type TriggerEntity struct { func (x *TriggerEntity) Reset() { *x = TriggerEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TriggerEntity) String() string { @@ -4164,7 +4098,7 @@ func (*TriggerEntity) ProtoMessage() {} func (x *TriggerEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4230,11 +4164,9 @@ type ViewEntity struct { func (x *ViewEntity) Reset() { *x = ViewEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewEntity) String() string { @@ -4245,7 +4177,7 @@ func (*ViewEntity) ProtoMessage() {} func (x *ViewEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4308,11 +4240,9 @@ type SequenceEntity struct { func (x *SequenceEntity) Reset() { *x = SequenceEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SequenceEntity) String() string { @@ -4323,7 +4253,7 @@ func (*SequenceEntity) ProtoMessage() {} func (x *SequenceEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4401,11 +4331,9 @@ type StoredProcedureEntity struct { func (x *StoredProcedureEntity) Reset() { *x = StoredProcedureEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredProcedureEntity) String() string { @@ -4416,7 +4344,7 @@ func (*StoredProcedureEntity) ProtoMessage() {} func (x *StoredProcedureEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4459,11 +4387,9 @@ type FunctionEntity struct { func (x *FunctionEntity) Reset() { *x = FunctionEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FunctionEntity) String() string { @@ -4474,7 +4400,7 @@ func (*FunctionEntity) ProtoMessage() {} func (x *FunctionEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4517,11 +4443,9 @@ type MaterializedViewEntity struct { func (x *MaterializedViewEntity) Reset() { *x = MaterializedViewEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaterializedViewEntity) String() string { @@ -4532,7 +4456,7 @@ func (*MaterializedViewEntity) ProtoMessage() {} func (x *MaterializedViewEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4578,11 +4502,9 @@ type SynonymEntity struct { func (x *SynonymEntity) Reset() { *x = SynonymEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynonymEntity) String() string { @@ -4593,7 +4515,7 @@ func (*SynonymEntity) ProtoMessage() {} func (x *SynonymEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4646,11 +4568,9 @@ type PackageEntity struct { func (x *PackageEntity) Reset() { *x = PackageEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PackageEntity) String() string { @@ -4661,7 +4581,7 @@ func (*PackageEntity) ProtoMessage() {} func (x *PackageEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4713,11 +4633,9 @@ type UDTEntity struct { func (x *UDTEntity) Reset() { *x = UDTEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UDTEntity) String() string { @@ -4728,7 +4646,7 @@ func (*UDTEntity) ProtoMessage() {} func (x *UDTEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4792,11 +4710,9 @@ type EntityMapping struct { func (x *EntityMapping) Reset() { *x = EntityMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMapping) String() string { @@ -4807,7 +4723,7 @@ func (*EntityMapping) ProtoMessage() {} func (x *EntityMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4873,11 +4789,9 @@ type EntityMappingLogEntry struct { func (x *EntityMappingLogEntry) Reset() { *x = EntityMappingLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMappingLogEntry) String() string { @@ -4888,7 +4802,7 @@ func (*EntityMappingLogEntry) ProtoMessage() {} func (x *EntityMappingLogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4944,11 +4858,9 @@ type EntityDdl struct { func (x *EntityDdl) Reset() { *x = EntityDdl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityDdl) String() string { @@ -4959,7 +4871,7 @@ func (*EntityDdl) ProtoMessage() {} func (x *EntityDdl) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5035,11 +4947,9 @@ type EntityIssue struct { func (x *EntityIssue) Reset() { *x = EntityIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityIssue) String() string { @@ -5050,7 +4960,7 @@ func (*EntityIssue) ProtoMessage() {} func (x *EntityIssue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5133,11 +5043,9 @@ type BackgroundJobLogEntry_SeedJobDetails struct { func (x *BackgroundJobLogEntry_SeedJobDetails) Reset() { *x = BackgroundJobLogEntry_SeedJobDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackgroundJobLogEntry_SeedJobDetails) String() string { @@ -5148,7 +5056,7 @@ func (*BackgroundJobLogEntry_SeedJobDetails) ProtoMessage() {} func (x *BackgroundJobLogEntry_SeedJobDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5184,11 +5092,9 @@ type BackgroundJobLogEntry_ImportRulesJobDetails struct { func (x *BackgroundJobLogEntry_ImportRulesJobDetails) Reset() { *x = BackgroundJobLogEntry_ImportRulesJobDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackgroundJobLogEntry_ImportRulesJobDetails) String() string { @@ -5199,7 +5105,7 @@ func (*BackgroundJobLogEntry_ImportRulesJobDetails) ProtoMessage() {} func (x *BackgroundJobLogEntry_ImportRulesJobDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5240,11 +5146,9 @@ type BackgroundJobLogEntry_ConvertJobDetails struct { func (x *BackgroundJobLogEntry_ConvertJobDetails) Reset() { *x = BackgroundJobLogEntry_ConvertJobDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackgroundJobLogEntry_ConvertJobDetails) String() string { @@ -5255,7 +5159,7 @@ func (*BackgroundJobLogEntry_ConvertJobDetails) ProtoMessage() {} func (x *BackgroundJobLogEntry_ConvertJobDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5291,11 +5195,9 @@ type BackgroundJobLogEntry_ApplyJobDetails struct { func (x *BackgroundJobLogEntry_ApplyJobDetails) Reset() { *x = BackgroundJobLogEntry_ApplyJobDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackgroundJobLogEntry_ApplyJobDetails) String() string { @@ -5306,7 +5208,7 @@ func (*BackgroundJobLogEntry_ApplyJobDetails) ProtoMessage() {} func (x *BackgroundJobLogEntry_ApplyJobDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5353,11 +5255,9 @@ type EntityIssue_Position struct { func (x *EntityIssue_Position) Reset() { *x = EntityIssue_Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityIssue_Position) String() string { @@ -5368,7 +5268,7 @@ func (*EntityIssue_Position) ProtoMessage() {} func (x *EntityIssue_Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6694,608 +6594,6 @@ func file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_init() { return } file_google_cloud_clouddms_v1_clouddms_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseEngineInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConversionWorkspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BackgroundJobLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MappingRuleFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MappingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SingleEntityRename); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MultiEntityRename); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EntityMove); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SingleColumnChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MultiColumnDatatypeChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SourceTextFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SourceNumericFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ConditionalColumnSetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ValueTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ConvertRowIdToColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SetTablePrimaryKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SinglePackageChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SourceSqlChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FilterTableColumns); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ValueListFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*IntComparisonFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DoubleComparisonFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AssignSpecificValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ApplyHash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RoundToScale); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseInstanceEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SchemaEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*TableEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ColumnEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ConstraintEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*IndexEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*TriggerEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ViewEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SequenceEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*StoredProcedureEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*FunctionEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*MaterializedViewEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SynonymEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*PackageEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*UDTEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*EntityMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*EntityMappingLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*EntityDdl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*EntityIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*BackgroundJobLogEntry_SeedJobDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*BackgroundJobLogEntry_ImportRulesJobDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*BackgroundJobLogEntry_ConvertJobDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*BackgroundJobLogEntry_ApplyJobDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*EntityIssue_Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_clouddms_v1_conversionworkspace_resources_proto_msgTypes[2].OneofWrappers = []any{ (*BackgroundJobLogEntry_SeedJobDetails_)(nil), (*BackgroundJobLogEntry_ImportRulesJobDetails_)(nil), diff --git a/clouddms/apiv1/data_migration_client.go b/clouddms/apiv1/data_migration_client.go index e24d60d141b4..6813e35f3edb 100755 --- a/clouddms/apiv1/data_migration_client.go +++ b/clouddms/apiv1/data_migration_client.go @@ -19,6 +19,7 @@ package clouddms import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -861,6 +862,8 @@ type dataMigrationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataMigrationClient creates a new data migration service client based on gRPC. @@ -887,6 +890,7 @@ func NewDataMigrationClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, dataMigrationClient: clouddmspb.NewDataMigrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -954,7 +958,7 @@ func (c *dataMigrationGRPCClient) ListMigrationJobs(ctx context.Context, req *cl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ListMigrationJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ListMigrationJobs, req, settings.GRPC, c.logger, "ListMigrationJobs") return err }, opts...) if err != nil { @@ -989,7 +993,7 @@ func (c *dataMigrationGRPCClient) GetMigrationJob(ctx context.Context, req *clou var resp *clouddmspb.MigrationJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GetMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GetMigrationJob, req, settings.GRPC, c.logger, "GetMigrationJob") return err }, opts...) if err != nil { @@ -1007,7 +1011,7 @@ func (c *dataMigrationGRPCClient) CreateMigrationJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CreateMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CreateMigrationJob, req, settings.GRPC, c.logger, "CreateMigrationJob") return err }, opts...) if err != nil { @@ -1027,7 +1031,7 @@ func (c *dataMigrationGRPCClient) UpdateMigrationJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.UpdateMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.UpdateMigrationJob, req, settings.GRPC, c.logger, "UpdateMigrationJob") return err }, opts...) if err != nil { @@ -1047,7 +1051,7 @@ func (c *dataMigrationGRPCClient) DeleteMigrationJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DeleteMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DeleteMigrationJob, req, settings.GRPC, c.logger, "DeleteMigrationJob") return err }, opts...) if err != nil { @@ -1067,7 +1071,7 @@ func (c *dataMigrationGRPCClient) StartMigrationJob(ctx context.Context, req *cl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.StartMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.StartMigrationJob, req, settings.GRPC, c.logger, "StartMigrationJob") return err }, opts...) if err != nil { @@ -1087,7 +1091,7 @@ func (c *dataMigrationGRPCClient) StopMigrationJob(ctx context.Context, req *clo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.StopMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.StopMigrationJob, req, settings.GRPC, c.logger, "StopMigrationJob") return err }, opts...) if err != nil { @@ -1107,7 +1111,7 @@ func (c *dataMigrationGRPCClient) ResumeMigrationJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ResumeMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ResumeMigrationJob, req, settings.GRPC, c.logger, "ResumeMigrationJob") return err }, opts...) if err != nil { @@ -1127,7 +1131,7 @@ func (c *dataMigrationGRPCClient) PromoteMigrationJob(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.PromoteMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.PromoteMigrationJob, req, settings.GRPC, c.logger, "PromoteMigrationJob") return err }, opts...) if err != nil { @@ -1147,7 +1151,7 @@ func (c *dataMigrationGRPCClient) VerifyMigrationJob(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.VerifyMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.VerifyMigrationJob, req, settings.GRPC, c.logger, "VerifyMigrationJob") return err }, opts...) if err != nil { @@ -1167,7 +1171,7 @@ func (c *dataMigrationGRPCClient) RestartMigrationJob(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.RestartMigrationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.RestartMigrationJob, req, settings.GRPC, c.logger, "RestartMigrationJob") return err }, opts...) if err != nil { @@ -1187,7 +1191,7 @@ func (c *dataMigrationGRPCClient) GenerateSshScript(ctx context.Context, req *cl var resp *clouddmspb.SshScript err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GenerateSshScript(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GenerateSshScript, req, settings.GRPC, c.logger, "GenerateSshScript") return err }, opts...) if err != nil { @@ -1205,7 +1209,7 @@ func (c *dataMigrationGRPCClient) GenerateTcpProxyScript(ctx context.Context, re var resp *clouddmspb.TcpProxyScript err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GenerateTcpProxyScript(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GenerateTcpProxyScript, req, settings.GRPC, c.logger, "GenerateTcpProxyScript") return err }, opts...) if err != nil { @@ -1234,7 +1238,7 @@ func (c *dataMigrationGRPCClient) ListConnectionProfiles(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ListConnectionProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ListConnectionProfiles, req, settings.GRPC, c.logger, "ListConnectionProfiles") return err }, opts...) if err != nil { @@ -1269,7 +1273,7 @@ func (c *dataMigrationGRPCClient) GetConnectionProfile(ctx context.Context, req var resp *clouddmspb.ConnectionProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GetConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GetConnectionProfile, req, settings.GRPC, c.logger, "GetConnectionProfile") return err }, opts...) if err != nil { @@ -1287,7 +1291,7 @@ func (c *dataMigrationGRPCClient) CreateConnectionProfile(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CreateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CreateConnectionProfile, req, settings.GRPC, c.logger, "CreateConnectionProfile") return err }, opts...) if err != nil { @@ -1307,7 +1311,7 @@ func (c *dataMigrationGRPCClient) UpdateConnectionProfile(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.UpdateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.UpdateConnectionProfile, req, settings.GRPC, c.logger, "UpdateConnectionProfile") return err }, opts...) if err != nil { @@ -1327,7 +1331,7 @@ func (c *dataMigrationGRPCClient) DeleteConnectionProfile(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DeleteConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DeleteConnectionProfile, req, settings.GRPC, c.logger, "DeleteConnectionProfile") return err }, opts...) if err != nil { @@ -1347,7 +1351,7 @@ func (c *dataMigrationGRPCClient) CreatePrivateConnection(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CreatePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CreatePrivateConnection, req, settings.GRPC, c.logger, "CreatePrivateConnection") return err }, opts...) if err != nil { @@ -1367,7 +1371,7 @@ func (c *dataMigrationGRPCClient) GetPrivateConnection(ctx context.Context, req var resp *clouddmspb.PrivateConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GetPrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GetPrivateConnection, req, settings.GRPC, c.logger, "GetPrivateConnection") return err }, opts...) if err != nil { @@ -1396,7 +1400,7 @@ func (c *dataMigrationGRPCClient) ListPrivateConnections(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ListPrivateConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ListPrivateConnections, req, settings.GRPC, c.logger, "ListPrivateConnections") return err }, opts...) if err != nil { @@ -1431,7 +1435,7 @@ func (c *dataMigrationGRPCClient) DeletePrivateConnection(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DeletePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DeletePrivateConnection, req, settings.GRPC, c.logger, "DeletePrivateConnection") return err }, opts...) if err != nil { @@ -1451,7 +1455,7 @@ func (c *dataMigrationGRPCClient) GetConversionWorkspace(ctx context.Context, re var resp *clouddmspb.ConversionWorkspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GetConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GetConversionWorkspace, req, settings.GRPC, c.logger, "GetConversionWorkspace") return err }, opts...) if err != nil { @@ -1480,7 +1484,7 @@ func (c *dataMigrationGRPCClient) ListConversionWorkspaces(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ListConversionWorkspaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ListConversionWorkspaces, req, settings.GRPC, c.logger, "ListConversionWorkspaces") return err }, opts...) if err != nil { @@ -1515,7 +1519,7 @@ func (c *dataMigrationGRPCClient) CreateConversionWorkspace(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CreateConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CreateConversionWorkspace, req, settings.GRPC, c.logger, "CreateConversionWorkspace") return err }, opts...) if err != nil { @@ -1535,7 +1539,7 @@ func (c *dataMigrationGRPCClient) UpdateConversionWorkspace(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.UpdateConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.UpdateConversionWorkspace, req, settings.GRPC, c.logger, "UpdateConversionWorkspace") return err }, opts...) if err != nil { @@ -1555,7 +1559,7 @@ func (c *dataMigrationGRPCClient) DeleteConversionWorkspace(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DeleteConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DeleteConversionWorkspace, req, settings.GRPC, c.logger, "DeleteConversionWorkspace") return err }, opts...) if err != nil { @@ -1575,7 +1579,7 @@ func (c *dataMigrationGRPCClient) CreateMappingRule(ctx context.Context, req *cl var resp *clouddmspb.MappingRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CreateMappingRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CreateMappingRule, req, settings.GRPC, c.logger, "CreateMappingRule") return err }, opts...) if err != nil { @@ -1592,7 +1596,7 @@ func (c *dataMigrationGRPCClient) DeleteMappingRule(ctx context.Context, req *cl opts = append((*c.CallOptions).DeleteMappingRule[0:len((*c.CallOptions).DeleteMappingRule):len((*c.CallOptions).DeleteMappingRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.dataMigrationClient.DeleteMappingRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.dataMigrationClient.DeleteMappingRule, req, settings.GRPC, c.logger, "DeleteMappingRule") return err }, opts...) return err @@ -1618,7 +1622,7 @@ func (c *dataMigrationGRPCClient) ListMappingRules(ctx context.Context, req *clo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ListMappingRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ListMappingRules, req, settings.GRPC, c.logger, "ListMappingRules") return err }, opts...) if err != nil { @@ -1653,7 +1657,7 @@ func (c *dataMigrationGRPCClient) GetMappingRule(ctx context.Context, req *cloud var resp *clouddmspb.MappingRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.GetMappingRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.GetMappingRule, req, settings.GRPC, c.logger, "GetMappingRule") return err }, opts...) if err != nil { @@ -1671,7 +1675,7 @@ func (c *dataMigrationGRPCClient) SeedConversionWorkspace(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.SeedConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.SeedConversionWorkspace, req, settings.GRPC, c.logger, "SeedConversionWorkspace") return err }, opts...) if err != nil { @@ -1691,7 +1695,7 @@ func (c *dataMigrationGRPCClient) ImportMappingRules(ctx context.Context, req *c var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ImportMappingRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ImportMappingRules, req, settings.GRPC, c.logger, "ImportMappingRules") return err }, opts...) if err != nil { @@ -1711,7 +1715,7 @@ func (c *dataMigrationGRPCClient) ConvertConversionWorkspace(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ConvertConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ConvertConversionWorkspace, req, settings.GRPC, c.logger, "ConvertConversionWorkspace") return err }, opts...) if err != nil { @@ -1731,7 +1735,7 @@ func (c *dataMigrationGRPCClient) CommitConversionWorkspace(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.CommitConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.CommitConversionWorkspace, req, settings.GRPC, c.logger, "CommitConversionWorkspace") return err }, opts...) if err != nil { @@ -1751,7 +1755,7 @@ func (c *dataMigrationGRPCClient) RollbackConversionWorkspace(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.RollbackConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.RollbackConversionWorkspace, req, settings.GRPC, c.logger, "RollbackConversionWorkspace") return err }, opts...) if err != nil { @@ -1771,7 +1775,7 @@ func (c *dataMigrationGRPCClient) ApplyConversionWorkspace(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.ApplyConversionWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.ApplyConversionWorkspace, req, settings.GRPC, c.logger, "ApplyConversionWorkspace") return err }, opts...) if err != nil { @@ -1802,7 +1806,7 @@ func (c *dataMigrationGRPCClient) DescribeDatabaseEntities(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DescribeDatabaseEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DescribeDatabaseEntities, req, settings.GRPC, c.logger, "DescribeDatabaseEntities") return err }, opts...) if err != nil { @@ -1837,7 +1841,7 @@ func (c *dataMigrationGRPCClient) SearchBackgroundJobs(ctx context.Context, req var resp *clouddmspb.SearchBackgroundJobsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.SearchBackgroundJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.SearchBackgroundJobs, req, settings.GRPC, c.logger, "SearchBackgroundJobs") return err }, opts...) if err != nil { @@ -1855,7 +1859,7 @@ func (c *dataMigrationGRPCClient) DescribeConversionWorkspaceRevisions(ctx conte var resp *clouddmspb.DescribeConversionWorkspaceRevisionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.DescribeConversionWorkspaceRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.DescribeConversionWorkspaceRevisions, req, settings.GRPC, c.logger, "DescribeConversionWorkspaceRevisions") return err }, opts...) if err != nil { @@ -1884,7 +1888,7 @@ func (c *dataMigrationGRPCClient) FetchStaticIps(ctx context.Context, req *cloud } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataMigrationClient.FetchStaticIps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataMigrationClient.FetchStaticIps, req, settings.GRPC, c.logger, "FetchStaticIps") return err }, opts...) if err != nil { @@ -1919,7 +1923,7 @@ func (c *dataMigrationGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1948,7 +1952,7 @@ func (c *dataMigrationGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1983,7 +1987,7 @@ func (c *dataMigrationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2001,7 +2005,7 @@ func (c *dataMigrationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2019,7 +2023,7 @@ func (c *dataMigrationGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2036,7 +2040,7 @@ func (c *dataMigrationGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2050,7 +2054,7 @@ func (c *dataMigrationGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2065,7 +2069,7 @@ func (c *dataMigrationGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2094,7 +2098,7 @@ func (c *dataMigrationGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/clouddms/apiv1/data_migration_client_example_go123_test.go b/clouddms/apiv1/data_migration_client_example_go123_test.go index 3596e449bab8..6cda9fba3f26 100644 --- a/clouddms/apiv1/data_migration_client_example_go123_test.go +++ b/clouddms/apiv1/data_migration_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataMigrationClient_DescribeDatabaseEntities_all() { } for resp, err := range c.DescribeDatabaseEntities(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataMigrationClient_FetchStaticIps_all() { } for resp, err := range c.FetchStaticIps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataMigrationClient_ListConnectionProfiles_all() { } for resp, err := range c.ListConnectionProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataMigrationClient_ListConversionWorkspaces_all() { } for resp, err := range c.ListConversionWorkspaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDataMigrationClient_ListMappingRules_all() { } for resp, err := range c.ListMappingRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleDataMigrationClient_ListMigrationJobs_all() { } for resp, err := range c.ListMigrationJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleDataMigrationClient_ListPrivateConnections_all() { } for resp, err := range c.ListPrivateConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleDataMigrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleDataMigrationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/clouddms/apiv1/helpers.go b/clouddms/apiv1/helpers.go index a50eec74c117..effc06f46704 100755 --- a/clouddms/apiv1/helpers.go +++ b/clouddms/apiv1/helpers.go @@ -18,10 +18,16 @@ package clouddms import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datamigration.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudprofiler/apiv2/cloudprofilerpb/profiler.pb.go b/cloudprofiler/apiv2/cloudprofilerpb/profiler.pb.go index 622246e6880b..0810fd35c9cc 100755 --- a/cloudprofiler/apiv2/cloudprofilerpb/profiler.pb.go +++ b/cloudprofiler/apiv2/cloudprofilerpb/profiler.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudprofiler/v2/profiler.proto @@ -143,11 +143,9 @@ type CreateProfileRequest struct { func (x *CreateProfileRequest) Reset() { *x = CreateProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProfileRequest) String() string { @@ -158,7 +156,7 @@ func (*CreateProfileRequest) ProtoMessage() {} func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +207,9 @@ type CreateOfflineProfileRequest struct { func (x *CreateOfflineProfileRequest) Reset() { *x = CreateOfflineProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOfflineProfileRequest) String() string { @@ -224,7 +220,7 @@ func (*CreateOfflineProfileRequest) ProtoMessage() {} func (x *CreateOfflineProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +266,9 @@ type UpdateProfileRequest struct { func (x *UpdateProfileRequest) Reset() { *x = UpdateProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProfileRequest) String() string { @@ -285,7 +279,7 @@ func (*UpdateProfileRequest) ProtoMessage() {} func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +343,9 @@ type Profile struct { func (x *Profile) Reset() { *x = Profile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Profile) String() string { @@ -364,7 +356,7 @@ func (*Profile) ProtoMessage() {} func (x *Profile) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +454,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -477,7 +467,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +525,9 @@ type ListProfilesRequest struct { func (x *ListProfilesRequest) Reset() { *x = ListProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProfilesRequest) String() string { @@ -550,7 +538,7 @@ func (*ListProfilesRequest) ProtoMessage() {} func (x *ListProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +595,9 @@ type ListProfilesResponse struct { func (x *ListProfilesResponse) Reset() { *x = ListProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProfilesResponse) String() string { @@ -622,7 +608,7 @@ func (*ListProfilesResponse) ProtoMessage() {} func (x *ListProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,92 +931,6 @@ func file_google_devtools_cloudprofiler_v2_profiler_proto_init() { if File_google_devtools_cloudprofiler_v2_profiler_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateOfflineProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Profile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudprofiler_v2_profiler_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudprofiler/apiv2/export_client.go b/cloudprofiler/apiv2/export_client.go index aee3fabb6e9d..a8e82915533e 100755 --- a/cloudprofiler/apiv2/export_client.go +++ b/cloudprofiler/apiv2/export_client.go @@ -19,7 +19,7 @@ package cloudprofiler import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( cloudprofilerpb "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -159,6 +158,8 @@ type exportGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExportClient creates a new export service client based on gRPC. @@ -186,6 +187,7 @@ func NewExportClient(ctx context.Context, opts ...option.ClientOption) (*ExportC connPool: connPool, exportClient: cloudprofilerpb.NewExportServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -232,6 +234,8 @@ type exportRESTClient struct { // Points back to the CallOptions field of the containing ExportClient CallOptions **ExportCallOptions + + logger *slog.Logger } // NewExportRESTClient creates a new export service rest client. @@ -250,6 +254,7 @@ func NewExportRESTClient(ctx context.Context, opts ...option.ClientOption) (*Exp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -313,7 +318,7 @@ func (c *exportGRPCClient) ListProfiles(ctx context.Context, req *cloudprofilerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.exportClient.ListProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.exportClient.ListProfiles, req, settings.GRPC, c.logger, "ListProfiles") return err }, opts...) if err != nil { @@ -385,21 +390,10 @@ func (c *exportRESTClient) ListProfiles(ctx context.Context, req *cloudprofilerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProfiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/cloudprofiler/apiv2/export_client_example_go123_test.go b/cloudprofiler/apiv2/export_client_example_go123_test.go index 289023510392..a01840b747d5 100644 --- a/cloudprofiler/apiv2/export_client_example_go123_test.go +++ b/cloudprofiler/apiv2/export_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleExportClient_ListProfiles_all() { } for resp, err := range c.ListProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudprofiler/apiv2/helpers.go b/cloudprofiler/apiv2/helpers.go index 3d4565a19777..e8cc62778c25 100755 --- a/cloudprofiler/apiv2/helpers.go +++ b/cloudprofiler/apiv2/helpers.go @@ -18,10 +18,20 @@ package cloudprofiler import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudprofiler.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/monitoring.write", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudprofiler/apiv2/profiler_client.go b/cloudprofiler/apiv2/profiler_client.go index 5e13d98daf56..c7d17be35ecb 100755 --- a/cloudprofiler/apiv2/profiler_client.go +++ b/cloudprofiler/apiv2/profiler_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cloudprofilerpb "cloud.google.com/go/cloudprofiler/apiv2/cloudprofilerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -200,6 +199,8 @@ type profilerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProfilerClient creates a new profiler service client based on gRPC. @@ -230,6 +231,7 @@ func NewProfilerClient(ctx context.Context, opts ...option.ClientOption) (*Profi connPool: connPool, profilerClient: cloudprofilerpb.NewProfilerServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -276,6 +278,8 @@ type profilerRESTClient struct { // Points back to the CallOptions field of the containing ProfilerClient CallOptions **ProfilerCallOptions + + logger *slog.Logger } // NewProfilerRESTClient creates a new profiler service rest client. @@ -297,6 +301,7 @@ func NewProfilerRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -349,7 +354,7 @@ func (c *profilerGRPCClient) CreateProfile(ctx context.Context, req *cloudprofil var resp *cloudprofilerpb.Profile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.profilerClient.CreateProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.profilerClient.CreateProfile, req, settings.GRPC, c.logger, "CreateProfile") return err }, opts...) if err != nil { @@ -367,7 +372,7 @@ func (c *profilerGRPCClient) CreateOfflineProfile(ctx context.Context, req *clou var resp *cloudprofilerpb.Profile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.profilerClient.CreateOfflineProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.profilerClient.CreateOfflineProfile, req, settings.GRPC, c.logger, "CreateOfflineProfile") return err }, opts...) if err != nil { @@ -385,7 +390,7 @@ func (c *profilerGRPCClient) UpdateProfile(ctx context.Context, req *cloudprofil var resp *cloudprofilerpb.Profile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.profilerClient.UpdateProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.profilerClient.UpdateProfile, req, settings.GRPC, c.logger, "UpdateProfile") return err }, opts...) if err != nil { @@ -450,17 +455,7 @@ func (c *profilerRESTClient) CreateProfile(ctx context.Context, req *cloudprofil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProfile") if err != nil { return err } @@ -524,17 +519,7 @@ func (c *profilerRESTClient) CreateOfflineProfile(ctx context.Context, req *clou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOfflineProfile") if err != nil { return err } @@ -606,17 +591,7 @@ func (c *profilerRESTClient) UpdateProfile(ctx context.Context, req *cloudprofil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProfile") if err != nil { return err } diff --git a/cloudquotas/apiv1/cloud_quotas_client.go b/cloudquotas/apiv1/cloud_quotas_client.go index 9581cd461548..9dc4a6f82cde 100755 --- a/cloudquotas/apiv1/cloud_quotas_client.go +++ b/cloudquotas/apiv1/cloud_quotas_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cloudquotaspb "cloud.google.com/go/cloudquotas/apiv1/cloudquotaspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -318,6 +317,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new cloud quotas client based on gRPC. @@ -353,6 +354,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: cloudquotaspb.NewCloudQuotasClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -399,6 +401,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new cloud quotas rest client. @@ -425,6 +429,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -488,7 +493,7 @@ func (c *gRPCClient) ListQuotaInfos(ctx context.Context, req *cloudquotaspb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQuotaInfos(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQuotaInfos, req, settings.GRPC, c.logger, "ListQuotaInfos") return err }, opts...) if err != nil { @@ -523,7 +528,7 @@ func (c *gRPCClient) GetQuotaInfo(ctx context.Context, req *cloudquotaspb.GetQuo var resp *cloudquotaspb.QuotaInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQuotaInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQuotaInfo, req, settings.GRPC, c.logger, "GetQuotaInfo") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *gRPCClient) ListQuotaPreferences(ctx context.Context, req *cloudquotasp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQuotaPreferences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQuotaPreferences, req, settings.GRPC, c.logger, "ListQuotaPreferences") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *gRPCClient) GetQuotaPreference(ctx context.Context, req *cloudquotaspb. var resp *cloudquotaspb.QuotaPreference err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQuotaPreference(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQuotaPreference, req, settings.GRPC, c.logger, "GetQuotaPreference") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *gRPCClient) CreateQuotaPreference(ctx context.Context, req *cloudquotas var resp *cloudquotaspb.QuotaPreference err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQuotaPreference(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQuotaPreference, req, settings.GRPC, c.logger, "CreateQuotaPreference") return err }, opts...) if err != nil { @@ -623,7 +628,7 @@ func (c *gRPCClient) UpdateQuotaPreference(ctx context.Context, req *cloudquotas var resp *cloudquotaspb.QuotaPreference err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQuotaPreference(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQuotaPreference, req, settings.GRPC, c.logger, "UpdateQuotaPreference") return err }, opts...) if err != nil { @@ -677,21 +682,10 @@ func (c *restClient) ListQuotaInfos(ctx context.Context, req *cloudquotaspb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQuotaInfos") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -754,17 +748,7 @@ func (c *restClient) GetQuotaInfo(ctx context.Context, req *cloudquotaspb.GetQuo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQuotaInfo") if err != nil { return err } @@ -832,21 +816,10 @@ func (c *restClient) ListQuotaPreferences(ctx context.Context, req *cloudquotasp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQuotaPreferences") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -909,17 +882,7 @@ func (c *restClient) GetQuotaPreference(ctx context.Context, req *cloudquotaspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQuotaPreference") if err != nil { return err } @@ -984,17 +947,7 @@ func (c *restClient) CreateQuotaPreference(ctx context.Context, req *cloudquotas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQuotaPreference") if err != nil { return err } @@ -1070,17 +1023,7 @@ func (c *restClient) UpdateQuotaPreference(ctx context.Context, req *cloudquotas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQuotaPreference") if err != nil { return err } diff --git a/cloudquotas/apiv1/cloud_quotas_client_example_go123_test.go b/cloudquotas/apiv1/cloud_quotas_client_example_go123_test.go index 27b617d8ff0e..0f6858544693 100644 --- a/cloudquotas/apiv1/cloud_quotas_client_example_go123_test.go +++ b/cloudquotas/apiv1/cloud_quotas_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListQuotaInfos_all() { } for resp, err := range c.ListQuotaInfos(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListQuotaPreferences_all() { } for resp, err := range c.ListQuotaPreferences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudquotas/apiv1/cloudquotaspb/cloudquotas.pb.go b/cloudquotas/apiv1/cloudquotaspb/cloudquotas.pb.go index e4e35d953634..948818a2ec16 100755 --- a/cloudquotas/apiv1/cloudquotaspb/cloudquotas.pb.go +++ b/cloudquotas/apiv1/cloudquotaspb/cloudquotas.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/cloudquotas/v1/cloudquotas.proto @@ -65,11 +65,9 @@ type ListQuotaInfosRequest struct { func (x *ListQuotaInfosRequest) Reset() { *x = ListQuotaInfosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaInfosRequest) String() string { @@ -80,7 +78,7 @@ func (*ListQuotaInfosRequest) ProtoMessage() {} func (x *ListQuotaInfosRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type ListQuotaInfosResponse struct { func (x *ListQuotaInfosResponse) Reset() { *x = ListQuotaInfosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaInfosResponse) String() string { @@ -146,7 +142,7 @@ func (*ListQuotaInfosResponse) ProtoMessage() {} func (x *ListQuotaInfosResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type GetQuotaInfoRequest struct { func (x *GetQuotaInfoRequest) Reset() { *x = GetQuotaInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQuotaInfoRequest) String() string { @@ -205,7 +199,7 @@ func (*GetQuotaInfoRequest) ProtoMessage() {} func (x *GetQuotaInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type ListQuotaPreferencesRequest struct { func (x *ListQuotaPreferencesRequest) Reset() { *x = ListQuotaPreferencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaPreferencesRequest) String() string { @@ -282,7 +274,7 @@ func (*ListQuotaPreferencesRequest) ProtoMessage() {} func (x *ListQuotaPreferencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +341,9 @@ type ListQuotaPreferencesResponse struct { func (x *ListQuotaPreferencesResponse) Reset() { *x = ListQuotaPreferencesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaPreferencesResponse) String() string { @@ -364,7 +354,7 @@ func (*ListQuotaPreferencesResponse) ProtoMessage() {} func (x *ListQuotaPreferencesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type GetQuotaPreferenceRequest struct { func (x *GetQuotaPreferenceRequest) Reset() { *x = GetQuotaPreferenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQuotaPreferenceRequest) String() string { @@ -430,7 +418,7 @@ func (*GetQuotaPreferenceRequest) ProtoMessage() {} func (x *GetQuotaPreferenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +462,9 @@ type CreateQuotaPreferenceRequest struct { func (x *CreateQuotaPreferenceRequest) Reset() { *x = CreateQuotaPreferenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQuotaPreferenceRequest) String() string { @@ -489,7 +475,7 @@ func (*CreateQuotaPreferenceRequest) ProtoMessage() {} func (x *CreateQuotaPreferenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type UpdateQuotaPreferenceRequest struct { func (x *UpdateQuotaPreferenceRequest) Reset() { *x = UpdateQuotaPreferenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQuotaPreferenceRequest) String() string { @@ -574,7 +558,7 @@ func (*UpdateQuotaPreferenceRequest) ProtoMessage() {} func (x *UpdateQuotaPreferenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,104 +972,6 @@ func file_google_api_cloudquotas_v1_cloudquotas_proto_init() { return } file_google_api_cloudquotas_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaInfosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaInfosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetQuotaInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaPreferencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaPreferencesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetQuotaPreferenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateQuotaPreferenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_cloudquotas_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQuotaPreferenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudquotas/apiv1/cloudquotaspb/resources.pb.go b/cloudquotas/apiv1/cloudquotaspb/resources.pb.go index 26ee2ff7eebb..b42522b1a4dd 100755 --- a/cloudquotas/apiv1/cloudquotaspb/resources.pb.go +++ b/cloudquotas/apiv1/cloudquotaspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/cloudquotas/v1/resources.proto @@ -323,11 +323,9 @@ type QuotaInfo struct { func (x *QuotaInfo) Reset() { *x = QuotaInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaInfo) String() string { @@ -338,7 +336,7 @@ func (*QuotaInfo) ProtoMessage() {} func (x *QuotaInfo) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +479,9 @@ type QuotaIncreaseEligibility struct { func (x *QuotaIncreaseEligibility) Reset() { *x = QuotaIncreaseEligibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaIncreaseEligibility) String() string { @@ -496,7 +492,7 @@ func (*QuotaIncreaseEligibility) ProtoMessage() {} func (x *QuotaIncreaseEligibility) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +585,9 @@ type QuotaPreference struct { func (x *QuotaPreference) Reset() { *x = QuotaPreference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaPreference) String() string { @@ -604,7 +598,7 @@ func (*QuotaPreference) ProtoMessage() {} func (x *QuotaPreference) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +719,9 @@ type QuotaConfig struct { func (x *QuotaConfig) Reset() { *x = QuotaConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaConfig) String() string { @@ -740,7 +732,7 @@ func (*QuotaConfig) ProtoMessage() {} func (x *QuotaConfig) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +816,9 @@ type DimensionsInfo struct { func (x *DimensionsInfo) Reset() { *x = DimensionsInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DimensionsInfo) String() string { @@ -839,7 +829,7 @@ func (*DimensionsInfo) ProtoMessage() {} func (x *DimensionsInfo) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +881,9 @@ type QuotaDetails struct { func (x *QuotaDetails) Reset() { *x = QuotaDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaDetails) String() string { @@ -906,7 +894,7 @@ func (*QuotaDetails) ProtoMessage() {} func (x *QuotaDetails) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +935,9 @@ type RolloutInfo struct { func (x *RolloutInfo) Reset() { *x = RolloutInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutInfo) String() string { @@ -962,7 +948,7 @@ func (*RolloutInfo) ProtoMessage() {} func (x *RolloutInfo) ProtoReflect() protoreflect.Message { mi := &file_google_api_cloudquotas_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,92 +1280,6 @@ func file_google_api_cloudquotas_v1_resources_proto_init() { if File_google_api_cloudquotas_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_cloudquotas_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*QuotaInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QuotaIncreaseEligibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QuotaPreference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QuotaConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DimensionsInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*QuotaDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_cloudquotas_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RolloutInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudquotas/apiv1/helpers.go b/cloudquotas/apiv1/helpers.go index d5f2e3dcfe4b..a0a313a58f0c 100755 --- a/cloudquotas/apiv1/helpers.go +++ b/cloudquotas/apiv1/helpers.go @@ -18,10 +18,20 @@ package cloudquotas import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudquotas.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudtasks/apiv2/cloud_tasks_client.go b/cloudtasks/apiv2/cloud_tasks_client.go index 264bc29a30ba..3bec7ffd3f5c 100755 --- a/cloudtasks/apiv2/cloud_tasks_client.go +++ b/cloudtasks/apiv2/cloud_tasks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cloudtaskspb "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -641,6 +640,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new cloud tasks client based on gRPC. @@ -668,6 +669,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: cloudtaskspb.NewCloudTasksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -715,6 +717,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new cloud tasks rest client. @@ -733,6 +737,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -796,7 +801,7 @@ func (c *gRPCClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQueues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQueues, req, settings.GRPC, c.logger, "ListQueues") return err }, opts...) if err != nil { @@ -831,7 +836,7 @@ func (c *gRPCClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQueue, req, settings.GRPC, c.logger, "GetQueue") return err }, opts...) if err != nil { @@ -849,7 +854,7 @@ func (c *gRPCClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQueue, req, settings.GRPC, c.logger, "CreateQueue") return err }, opts...) if err != nil { @@ -867,7 +872,7 @@ func (c *gRPCClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQueue, req, settings.GRPC, c.logger, "UpdateQueue") return err }, opts...) if err != nil { @@ -884,7 +889,7 @@ func (c *gRPCClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu opts = append((*c.CallOptions).DeleteQueue[0:len((*c.CallOptions).DeleteQueue):len((*c.CallOptions).DeleteQueue)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQueue(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQueue, req, settings.GRPC, c.logger, "DeleteQueue") return err }, opts...) return err @@ -899,7 +904,7 @@ func (c *gRPCClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PurgeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PurgeQueue, req, settings.GRPC, c.logger, "PurgeQueue") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *gRPCClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PauseQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PauseQueue, req, settings.GRPC, c.logger, "PauseQueue") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *gRPCClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeQueue, req, settings.GRPC, c.logger, "ResumeQueue") return err }, opts...) if err != nil { @@ -953,7 +958,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -989,7 +994,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1018,7 +1023,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -1053,7 +1058,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -1071,7 +1076,7 @@ func (c *gRPCClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTask, req, settings.GRPC, c.logger, "CreateTask") return err }, opts...) if err != nil { @@ -1088,7 +1093,7 @@ func (c *gRPCClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas opts = append((*c.CallOptions).DeleteTask[0:len((*c.CallOptions).DeleteTask):len((*c.CallOptions).DeleteTask)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTask(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTask, req, settings.GRPC, c.logger, "DeleteTask") return err }, opts...) return err @@ -1103,7 +1108,7 @@ func (c *gRPCClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunTask, req, settings.GRPC, c.logger, "RunTask") return err }, opts...) if err != nil { @@ -1121,7 +1126,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1150,7 +1155,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1226,21 +1231,10 @@ func (c *restClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQueues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1303,17 +1297,7 @@ func (c *restClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQueue") if err != nil { return err } @@ -1381,17 +1365,7 @@ func (c *restClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQueue") if err != nil { return err } @@ -1469,17 +1443,7 @@ func (c *restClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQueue") if err != nil { return err } @@ -1538,15 +1502,8 @@ func (c *restClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQueue") + return err }, opts...) } @@ -1594,17 +1551,7 @@ func (c *restClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeQueue") if err != nil { return err } @@ -1667,17 +1614,7 @@ func (c *restClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseQueue") if err != nil { return err } @@ -1746,17 +1683,7 @@ func (c *restClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeQueue") if err != nil { return err } @@ -1820,17 +1747,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1896,17 +1813,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1969,17 +1876,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2052,21 +1949,10 @@ func (c *restClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2132,17 +2018,7 @@ func (c *restClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -2202,17 +2078,7 @@ func (c *restClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTask") if err != nil { return err } @@ -2263,15 +2129,8 @@ func (c *restClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTask") + return err }, opts...) } @@ -2339,17 +2198,7 @@ func (c *restClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTask") if err != nil { return err } @@ -2399,17 +2248,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2474,21 +2313,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/cloudtasks/apiv2/cloud_tasks_client_example_go123_test.go b/cloudtasks/apiv2/cloud_tasks_client_example_go123_test.go index 274f6af94289..330a6ddc15b3 100644 --- a/cloudtasks/apiv2/cloud_tasks_client_example_go123_test.go +++ b/cloudtasks/apiv2/cloud_tasks_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListQueues_all() { } for resp, err := range c.ListQueues(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudtasks/apiv2/cloudtaskspb/cloudtasks.pb.go b/cloudtasks/apiv2/cloudtaskspb/cloudtasks.pb.go index 7217feccbc29..833e417198c8 100755 --- a/cloudtasks/apiv2/cloudtaskspb/cloudtasks.pb.go +++ b/cloudtasks/apiv2/cloudtaskspb/cloudtasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2/cloudtasks.proto @@ -87,11 +87,9 @@ type ListQueuesRequest struct { func (x *ListQueuesRequest) Reset() { *x = ListQueuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesRequest) String() string { @@ -102,7 +100,7 @@ func (*ListQueuesRequest) ProtoMessage() {} func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +166,9 @@ type ListQueuesResponse struct { func (x *ListQueuesResponse) Reset() { *x = ListQueuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesResponse) String() string { @@ -183,7 +179,7 @@ func (*ListQueuesResponse) ProtoMessage() {} func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +221,9 @@ type GetQueueRequest struct { func (x *GetQueueRequest) Reset() { *x = GetQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQueueRequest) String() string { @@ -240,7 +234,7 @@ func (*GetQueueRequest) ProtoMessage() {} func (x *GetQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +279,9 @@ type CreateQueueRequest struct { func (x *CreateQueueRequest) Reset() { *x = CreateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQueueRequest) String() string { @@ -300,7 +292,7 @@ func (*CreateQueueRequest) ProtoMessage() {} func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +344,9 @@ type UpdateQueueRequest struct { func (x *UpdateQueueRequest) Reset() { *x = UpdateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQueueRequest) String() string { @@ -367,7 +357,7 @@ func (*UpdateQueueRequest) ProtoMessage() {} func (x *UpdateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +400,9 @@ type DeleteQueueRequest struct { func (x *DeleteQueueRequest) Reset() { *x = DeleteQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQueueRequest) String() string { @@ -425,7 +413,7 @@ func (*DeleteQueueRequest) ProtoMessage() {} func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +449,9 @@ type PurgeQueueRequest struct { func (x *PurgeQueueRequest) Reset() { *x = PurgeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeQueueRequest) String() string { @@ -476,7 +462,7 @@ func (*PurgeQueueRequest) ProtoMessage() {} func (x *PurgeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +498,9 @@ type PauseQueueRequest struct { func (x *PauseQueueRequest) Reset() { *x = PauseQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseQueueRequest) String() string { @@ -527,7 +511,7 @@ func (*PauseQueueRequest) ProtoMessage() {} func (x *PauseQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +547,9 @@ type ResumeQueueRequest struct { func (x *ResumeQueueRequest) Reset() { *x = ResumeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeQueueRequest) String() string { @@ -578,7 +560,7 @@ func (*ResumeQueueRequest) ProtoMessage() {} func (x *ResumeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +628,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -661,7 +641,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +705,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -740,7 +718,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +774,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -811,7 +787,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +879,9 @@ type CreateTaskRequest struct { func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -918,7 +892,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +942,9 @@ type DeleteTaskRequest struct { func (x *DeleteTaskRequest) Reset() { *x = DeleteTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaskRequest) String() string { @@ -983,7 +955,7 @@ func (*DeleteTaskRequest) ProtoMessage() {} func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1004,9 @@ type RunTaskRequest struct { func (x *RunTaskRequest) Reset() { *x = RunTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTaskRequest) String() string { @@ -1047,7 +1017,7 @@ func (*RunTaskRequest) ProtoMessage() {} func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1495,188 +1465,6 @@ func file_google_cloud_tasks_v2_cloudtasks_proto_init() { } file_google_cloud_tasks_v2_queue_proto_init() file_google_cloud_tasks_v2_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PauseQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_cloudtasks_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RunTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudtasks/apiv2/cloudtaskspb/queue.pb.go b/cloudtasks/apiv2/cloudtaskspb/queue.pb.go index 82a6f8250e6b..32ed8d6f77a1 100755 --- a/cloudtasks/apiv2/cloudtaskspb/queue.pb.go +++ b/cloudtasks/apiv2/cloudtaskspb/queue.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2/queue.proto @@ -232,11 +232,9 @@ type Queue struct { func (x *Queue) Reset() { *x = Queue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Queue) String() string { @@ -247,7 +245,7 @@ func (*Queue) ProtoMessage() {} func (x *Queue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +384,9 @@ type RateLimits struct { func (x *RateLimits) Reset() { *x = RateLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RateLimits) String() string { @@ -401,7 +397,7 @@ func (*RateLimits) ProtoMessage() {} func (x *RateLimits) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +537,9 @@ type RetryConfig struct { func (x *RetryConfig) Reset() { *x = RetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryConfig) String() string { @@ -556,7 +550,7 @@ func (*RetryConfig) ProtoMessage() {} func (x *RetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +616,9 @@ type StackdriverLoggingConfig struct { func (x *StackdriverLoggingConfig) Reset() { *x = StackdriverLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StackdriverLoggingConfig) String() string { @@ -637,7 +629,7 @@ func (*StackdriverLoggingConfig) ProtoMessage() {} func (x *StackdriverLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_queue_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,56 +796,6 @@ func file_google_cloud_tasks_v2_queue_proto_init() { return } file_google_cloud_tasks_v2_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2_queue_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Queue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_queue_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RateLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_queue_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_queue_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StackdriverLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudtasks/apiv2/cloudtaskspb/target.pb.go b/cloudtasks/apiv2/cloudtaskspb/target.pb.go index 3f6db9596cfd..574ce0822521 100755 --- a/cloudtasks/apiv2/cloudtaskspb/target.pb.go +++ b/cloudtasks/apiv2/cloudtaskspb/target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2/target.proto @@ -210,11 +210,9 @@ type HttpRequest struct { func (x *HttpRequest) Reset() { *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRequest) String() string { @@ -225,7 +223,7 @@ func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +464,9 @@ type AppEngineHttpRequest struct { func (x *AppEngineHttpRequest) Reset() { *x = AppEngineHttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpRequest) String() string { @@ -481,7 +477,7 @@ func (*AppEngineHttpRequest) ProtoMessage() {} func (x *AppEngineHttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +620,9 @@ type AppEngineRouting struct { func (x *AppEngineRouting) Reset() { *x = AppEngineRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineRouting) String() string { @@ -639,7 +633,7 @@ func (*AppEngineRouting) ProtoMessage() {} func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +699,9 @@ type OAuthToken struct { func (x *OAuthToken) Reset() { *x = OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthToken) String() string { @@ -720,7 +712,7 @@ func (*OAuthToken) ProtoMessage() {} func (x *OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +765,9 @@ type OidcToken struct { func (x *OidcToken) Reset() { *x = OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OidcToken) String() string { @@ -788,7 +778,7 @@ func (*OidcToken) ProtoMessage() {} func (x *OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_target_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,68 +946,6 @@ func file_google_cloud_tasks_v2_target_proto_init() { if File_google_cloud_tasks_v2_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_target_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_target_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_target_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2_target_proto_msgTypes[0].OneofWrappers = []any{ (*HttpRequest_OauthToken)(nil), (*HttpRequest_OidcToken)(nil), diff --git a/cloudtasks/apiv2/cloudtaskspb/task.pb.go b/cloudtasks/apiv2/cloudtaskspb/task.pb.go index 60fa20d3d84f..8a6cbcaa0499 100755 --- a/cloudtasks/apiv2/cloudtaskspb/task.pb.go +++ b/cloudtasks/apiv2/cloudtaskspb/task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2/task.proto @@ -211,11 +211,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -226,7 +224,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +374,9 @@ type Attempt struct { func (x *Attempt) Reset() { *x = Attempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attempt) String() string { @@ -391,7 +387,7 @@ func (*Attempt) ProtoMessage() {} func (x *Attempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,32 +575,6 @@ func file_google_cloud_tasks_v2_task_proto_init() { return } file_google_cloud_tasks_v2_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Attempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2_task_proto_msgTypes[0].OneofWrappers = []any{ (*Task_AppEngineHttpRequest)(nil), (*Task_HttpRequest)(nil), diff --git a/cloudtasks/apiv2/helpers.go b/cloudtasks/apiv2/helpers.go index c245bd08ac88..f51bb20d6fd1 100755 --- a/cloudtasks/apiv2/helpers.go +++ b/cloudtasks/apiv2/helpers.go @@ -18,10 +18,20 @@ package cloudtasks import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudtasks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudtasks/apiv2beta2/cloud_tasks_client.go b/cloudtasks/apiv2beta2/cloud_tasks_client.go index 079154c3a004..9c330c107614 100755 --- a/cloudtasks/apiv2beta2/cloud_tasks_client.go +++ b/cloudtasks/apiv2beta2/cloud_tasks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cloudtaskspb "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -765,6 +764,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new cloud tasks client based on gRPC. @@ -792,6 +793,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: cloudtaskspb.NewCloudTasksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -839,6 +841,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new cloud tasks rest client. @@ -857,6 +861,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -920,7 +925,7 @@ func (c *gRPCClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQueues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQueues, req, settings.GRPC, c.logger, "ListQueues") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *gRPCClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQueue, req, settings.GRPC, c.logger, "GetQueue") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *gRPCClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQueue, req, settings.GRPC, c.logger, "CreateQueue") return err }, opts...) if err != nil { @@ -991,7 +996,7 @@ func (c *gRPCClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQueue, req, settings.GRPC, c.logger, "UpdateQueue") return err }, opts...) if err != nil { @@ -1008,7 +1013,7 @@ func (c *gRPCClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu opts = append((*c.CallOptions).DeleteQueue[0:len((*c.CallOptions).DeleteQueue):len((*c.CallOptions).DeleteQueue)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQueue(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQueue, req, settings.GRPC, c.logger, "DeleteQueue") return err }, opts...) return err @@ -1023,7 +1028,7 @@ func (c *gRPCClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PurgeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PurgeQueue, req, settings.GRPC, c.logger, "PurgeQueue") return err }, opts...) if err != nil { @@ -1041,7 +1046,7 @@ func (c *gRPCClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PauseQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PauseQueue, req, settings.GRPC, c.logger, "PauseQueue") return err }, opts...) if err != nil { @@ -1059,7 +1064,7 @@ func (c *gRPCClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeQueue, req, settings.GRPC, c.logger, "ResumeQueue") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *gRPCClient) UploadQueueYaml(ctx context.Context, req *cloudtaskspb.Uplo opts = append((*c.CallOptions).UploadQueueYaml[0:len((*c.CallOptions).UploadQueueYaml):len((*c.CallOptions).UploadQueueYaml)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.UploadQueueYaml(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.UploadQueueYaml, req, settings.GRPC, c.logger, "UploadQueueYaml") return err }, opts...) return err @@ -1088,7 +1093,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1106,7 +1111,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1124,7 +1129,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1153,7 +1158,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -1188,7 +1193,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -1206,7 +1211,7 @@ func (c *gRPCClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTask, req, settings.GRPC, c.logger, "CreateTask") return err }, opts...) if err != nil { @@ -1223,7 +1228,7 @@ func (c *gRPCClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas opts = append((*c.CallOptions).DeleteTask[0:len((*c.CallOptions).DeleteTask):len((*c.CallOptions).DeleteTask)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTask(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTask, req, settings.GRPC, c.logger, "DeleteTask") return err }, opts...) return err @@ -1238,7 +1243,7 @@ func (c *gRPCClient) LeaseTasks(ctx context.Context, req *cloudtaskspb.LeaseTask var resp *cloudtaskspb.LeaseTasksResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LeaseTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LeaseTasks, req, settings.GRPC, c.logger, "LeaseTasks") return err }, opts...) if err != nil { @@ -1255,7 +1260,7 @@ func (c *gRPCClient) AcknowledgeTask(ctx context.Context, req *cloudtaskspb.Ackn opts = append((*c.CallOptions).AcknowledgeTask[0:len((*c.CallOptions).AcknowledgeTask):len((*c.CallOptions).AcknowledgeTask)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.AcknowledgeTask(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.AcknowledgeTask, req, settings.GRPC, c.logger, "AcknowledgeTask") return err }, opts...) return err @@ -1270,7 +1275,7 @@ func (c *gRPCClient) RenewLease(ctx context.Context, req *cloudtaskspb.RenewLeas var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenewLease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenewLease, req, settings.GRPC, c.logger, "RenewLease") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *gRPCClient) CancelLease(ctx context.Context, req *cloudtaskspb.CancelLe var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelLease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelLease, req, settings.GRPC, c.logger, "CancelLease") return err }, opts...) if err != nil { @@ -1306,7 +1311,7 @@ func (c *gRPCClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunTask, req, settings.GRPC, c.logger, "RunTask") return err }, opts...) if err != nil { @@ -1324,7 +1329,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1353,7 +1358,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1436,21 +1441,10 @@ func (c *restClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQueues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1520,17 +1514,7 @@ func (c *restClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQueue") if err != nil { return err } @@ -1598,17 +1582,7 @@ func (c *restClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQueue") if err != nil { return err } @@ -1686,17 +1660,7 @@ func (c *restClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQueue") if err != nil { return err } @@ -1755,15 +1719,8 @@ func (c *restClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQueue") + return err }, opts...) } @@ -1811,17 +1768,7 @@ func (c *restClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeQueue") if err != nil { return err } @@ -1884,17 +1831,7 @@ func (c *restClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseQueue") if err != nil { return err } @@ -1964,17 +1901,7 @@ func (c *restClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeQueue") if err != nil { return err } @@ -2029,15 +1956,8 @@ func (c *restClient) UploadQueueYaml(ctx context.Context, req *cloudtaskspb.Uplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "UploadQueueYaml") + return err }, opts...) } @@ -2088,17 +2008,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2164,17 +2074,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2237,17 +2137,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2320,21 +2210,10 @@ func (c *restClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2400,17 +2279,7 @@ func (c *restClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -2475,17 +2344,7 @@ func (c *restClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTask") if err != nil { return err } @@ -2536,15 +2395,8 @@ func (c *restClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTask") + return err }, opts...) } @@ -2609,17 +2461,7 @@ func (c *restClient) LeaseTasks(ctx context.Context, req *cloudtaskspb.LeaseTask httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LeaseTasks") if err != nil { return err } @@ -2685,15 +2527,8 @@ func (c *restClient) AcknowledgeTask(ctx context.Context, req *cloudtaskspb.Ackn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AcknowledgeTask") + return err }, opts...) } @@ -2741,17 +2576,7 @@ func (c *restClient) RenewLease(ctx context.Context, req *cloudtaskspb.RenewLeas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenewLease") if err != nil { return err } @@ -2812,17 +2637,7 @@ func (c *restClient) CancelLease(ctx context.Context, req *cloudtaskspb.CancelLe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelLease") if err != nil { return err } @@ -2907,17 +2722,7 @@ func (c *restClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTask") if err != nil { return err } @@ -2967,17 +2772,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3042,21 +2837,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/cloudtasks/apiv2beta2/cloud_tasks_client_example_go123_test.go b/cloudtasks/apiv2beta2/cloud_tasks_client_example_go123_test.go index bd49db3317da..9deaffe41400 100644 --- a/cloudtasks/apiv2beta2/cloud_tasks_client_example_go123_test.go +++ b/cloudtasks/apiv2beta2/cloud_tasks_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListQueues_all() { } for resp, err := range c.ListQueues(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go index 5153f2d2c019..ea88d5031d1f 100755 --- a/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go +++ b/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta2/cloudtasks.proto @@ -95,11 +95,9 @@ type ListQueuesRequest struct { func (x *ListQueuesRequest) Reset() { *x = ListQueuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesRequest) String() string { @@ -110,7 +108,7 @@ func (*ListQueuesRequest) ProtoMessage() {} func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +182,9 @@ type ListQueuesResponse struct { func (x *ListQueuesResponse) Reset() { *x = ListQueuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesResponse) String() string { @@ -199,7 +195,7 @@ func (*ListQueuesResponse) ProtoMessage() {} func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +243,9 @@ type GetQueueRequest struct { func (x *GetQueueRequest) Reset() { *x = GetQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQueueRequest) String() string { @@ -262,7 +256,7 @@ func (*GetQueueRequest) ProtoMessage() {} func (x *GetQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type CreateQueueRequest struct { func (x *CreateQueueRequest) Reset() { *x = CreateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQueueRequest) String() string { @@ -329,7 +321,7 @@ func (*CreateQueueRequest) ProtoMessage() {} func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +375,9 @@ type UpdateQueueRequest struct { func (x *UpdateQueueRequest) Reset() { *x = UpdateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQueueRequest) String() string { @@ -398,7 +388,7 @@ func (*UpdateQueueRequest) ProtoMessage() {} func (x *UpdateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +431,9 @@ type DeleteQueueRequest struct { func (x *DeleteQueueRequest) Reset() { *x = DeleteQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQueueRequest) String() string { @@ -456,7 +444,7 @@ func (*DeleteQueueRequest) ProtoMessage() {} func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +480,9 @@ type PurgeQueueRequest struct { func (x *PurgeQueueRequest) Reset() { *x = PurgeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeQueueRequest) String() string { @@ -507,7 +493,7 @@ func (*PurgeQueueRequest) ProtoMessage() {} func (x *PurgeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +529,9 @@ type PauseQueueRequest struct { func (x *PauseQueueRequest) Reset() { *x = PauseQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseQueueRequest) String() string { @@ -558,7 +542,7 @@ func (*PauseQueueRequest) ProtoMessage() {} func (x *PauseQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +578,9 @@ type ResumeQueueRequest struct { func (x *ResumeQueueRequest) Reset() { *x = ResumeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeQueueRequest) String() string { @@ -609,7 +591,7 @@ func (*ResumeQueueRequest) ProtoMessage() {} func (x *ResumeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +630,9 @@ type UploadQueueYamlRequest struct { func (x *UploadQueueYamlRequest) Reset() { *x = UploadQueueYamlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadQueueYamlRequest) String() string { @@ -663,7 +643,7 @@ func (*UploadQueueYamlRequest) ProtoMessage() {} func (x *UploadQueueYamlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +719,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -754,7 +732,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +797,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -834,7 +810,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +867,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -906,7 +880,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +973,9 @@ type CreateTaskRequest struct { func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -1014,7 +986,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1036,9 @@ type DeleteTaskRequest struct { func (x *DeleteTaskRequest) Reset() { *x = DeleteTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaskRequest) String() string { @@ -1079,7 +1049,7 @@ func (*DeleteTaskRequest) ProtoMessage() {} func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1195,11 +1165,9 @@ type LeaseTasksRequest struct { func (x *LeaseTasksRequest) Reset() { *x = LeaseTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeaseTasksRequest) String() string { @@ -1210,7 +1178,7 @@ func (*LeaseTasksRequest) ProtoMessage() {} func (x *LeaseTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1241,9 @@ type LeaseTasksResponse struct { func (x *LeaseTasksResponse) Reset() { *x = LeaseTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeaseTasksResponse) String() string { @@ -1288,7 +1254,7 @@ func (*LeaseTasksResponse) ProtoMessage() {} func (x *LeaseTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1296,9 @@ type AcknowledgeTaskRequest struct { func (x *AcknowledgeTaskRequest) Reset() { *x = AcknowledgeTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeTaskRequest) String() string { @@ -1345,7 +1309,7 @@ func (*AcknowledgeTaskRequest) ProtoMessage() {} func (x *AcknowledgeTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1377,9 @@ type RenewLeaseRequest struct { func (x *RenewLeaseRequest) Reset() { *x = RenewLeaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenewLeaseRequest) String() string { @@ -1428,7 +1390,7 @@ func (*RenewLeaseRequest) ProtoMessage() {} func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1467,9 @@ type CancelLeaseRequest struct { func (x *CancelLeaseRequest) Reset() { *x = CancelLeaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelLeaseRequest) String() string { @@ -1520,7 +1480,7 @@ func (*CancelLeaseRequest) ProtoMessage() {} func (x *CancelLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1544,9 @@ type RunTaskRequest struct { func (x *RunTaskRequest) Reset() { *x = RunTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTaskRequest) String() string { @@ -1599,7 +1557,7 @@ func (*RunTaskRequest) ProtoMessage() {} func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2244,260 +2202,6 @@ func file_google_cloud_tasks_v2beta2_cloudtasks_proto_init() { } file_google_cloud_tasks_v2beta2_queue_proto_init() file_google_cloud_tasks_v2beta2_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PauseQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UploadQueueYamlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LeaseTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LeaseTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RenewLeaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CancelLeaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RunTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go index 54123be8db51..0d87d0756138 100755 --- a/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go +++ b/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta2/old_target.proto diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go index cac0dedee497..03b899df5a95 100755 --- a/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go +++ b/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta2/queue.proto @@ -252,11 +252,9 @@ type Queue struct { func (x *Queue) Reset() { *x = Queue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Queue) String() string { @@ -267,7 +265,7 @@ func (*Queue) ProtoMessage() {} func (x *Queue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +486,9 @@ type RateLimits struct { func (x *RateLimits) Reset() { *x = RateLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RateLimits) String() string { @@ -503,7 +499,7 @@ func (*RateLimits) ProtoMessage() {} func (x *RateLimits) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +653,9 @@ type RetryConfig struct { func (x *RetryConfig) Reset() { *x = RetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryConfig) String() string { @@ -672,7 +666,7 @@ func (*RetryConfig) ProtoMessage() {} func (x *RetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,11 +782,9 @@ type QueueStats struct { func (x *QueueStats) Reset() { *x = QueueStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueueStats) String() string { @@ -803,7 +795,7 @@ func (*QueueStats) ProtoMessage() {} func (x *QueueStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1047,56 +1039,6 @@ func file_google_cloud_tasks_v2beta2_queue_proto_init() { return } file_google_cloud_tasks_v2beta2_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Queue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RateLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QueueStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0].OneofWrappers = []any{ (*Queue_AppEngineHttpTarget)(nil), (*Queue_PullTarget)(nil), diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go index 9812440947a1..6cde132df2e3 100755 --- a/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go +++ b/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta2/target.proto @@ -229,11 +229,9 @@ type PullTarget struct { func (x *PullTarget) Reset() { *x = PullTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullTarget) String() string { @@ -244,7 +242,7 @@ func (*PullTarget) ProtoMessage() {} func (x *PullTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +295,9 @@ type PullMessage struct { func (x *PullMessage) Reset() { *x = PullMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullMessage) String() string { @@ -312,7 +308,7 @@ func (*PullMessage) ProtoMessage() {} func (x *PullMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +372,9 @@ type AppEngineHttpTarget struct { func (x *AppEngineHttpTarget) Reset() { *x = AppEngineHttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpTarget) String() string { @@ -391,7 +385,7 @@ func (*AppEngineHttpTarget) ProtoMessage() {} func (x *AppEngineHttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +560,9 @@ type AppEngineHttpRequest struct { func (x *AppEngineHttpRequest) Reset() { *x = AppEngineHttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpRequest) String() string { @@ -581,7 +573,7 @@ func (*AppEngineHttpRequest) ProtoMessage() {} func (x *AppEngineHttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +764,9 @@ type AppEngineRouting struct { func (x *AppEngineRouting) Reset() { *x = AppEngineRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineRouting) String() string { @@ -787,7 +777,7 @@ func (*AppEngineRouting) ProtoMessage() {} func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +898,9 @@ type HttpRequest struct { func (x *HttpRequest) Reset() { *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRequest) String() string { @@ -923,7 +911,7 @@ func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1020,9 @@ type PathOverride struct { func (x *PathOverride) Reset() { *x = PathOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PathOverride) String() string { @@ -1047,7 +1033,7 @@ func (*PathOverride) ProtoMessage() {} func (x *PathOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1070,9 @@ type QueryOverride struct { func (x *QueryOverride) Reset() { *x = QueryOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryOverride) String() string { @@ -1099,7 +1083,7 @@ func (*QueryOverride) ProtoMessage() {} func (x *QueryOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1168,11 +1152,9 @@ type UriOverride struct { func (x *UriOverride) Reset() { *x = UriOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UriOverride) String() string { @@ -1183,7 +1165,7 @@ func (*UriOverride) ProtoMessage() {} func (x *UriOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1309,11 +1291,9 @@ type HttpTarget struct { func (x *HttpTarget) Reset() { *x = HttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget) String() string { @@ -1324,7 +1304,7 @@ func (*HttpTarget) ProtoMessage() {} func (x *HttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1415,9 @@ type OAuthToken struct { func (x *OAuthToken) Reset() { *x = OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthToken) String() string { @@ -1450,7 +1428,7 @@ func (*OAuthToken) ProtoMessage() {} func (x *OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1481,9 @@ type OidcToken struct { func (x *OidcToken) Reset() { *x = OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OidcToken) String() string { @@ -1518,7 +1494,7 @@ func (*OidcToken) ProtoMessage() {} func (x *OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,11 +1537,9 @@ type HttpTarget_Header struct { func (x *HttpTarget_Header) Reset() { *x = HttpTarget_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget_Header) String() string { @@ -1576,7 +1550,7 @@ func (*HttpTarget_Header) ProtoMessage() {} func (x *HttpTarget_Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1617,11 +1591,9 @@ type HttpTarget_HeaderOverride struct { func (x *HttpTarget_HeaderOverride) Reset() { *x = HttpTarget_HeaderOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget_HeaderOverride) String() string { @@ -1632,7 +1604,7 @@ func (*HttpTarget_HeaderOverride) ProtoMessage() {} func (x *HttpTarget_HeaderOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1911,176 +1883,6 @@ func file_google_cloud_tasks_v2beta2_target_proto_init() { if File_google_cloud_tasks_v2beta2_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PullTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PullMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PathOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*QueryOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UriOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_target_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget_HeaderOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta2_target_proto_msgTypes[5].OneofWrappers = []any{ (*HttpRequest_OauthToken)(nil), (*HttpRequest_OidcToken)(nil), diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go index 56573132582c..d96bea092dd7 100755 --- a/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go +++ b/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta2/task.proto @@ -177,11 +177,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -192,7 +190,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +345,9 @@ type TaskStatus struct { func (x *TaskStatus) Reset() { *x = TaskStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskStatus) String() string { @@ -362,7 +358,7 @@ func (*TaskStatus) ProtoMessage() {} func (x *TaskStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +428,9 @@ type AttemptStatus struct { func (x *AttemptStatus) Reset() { *x = AttemptStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttemptStatus) String() string { @@ -447,7 +441,7 @@ func (*AttemptStatus) ProtoMessage() {} func (x *AttemptStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,44 +642,6 @@ func file_google_cloud_tasks_v2beta2_task_proto_init() { return } file_google_cloud_tasks_v2beta2_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TaskStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttemptStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0].OneofWrappers = []any{ (*Task_AppEngineHttpRequest)(nil), (*Task_PullMessage)(nil), diff --git a/cloudtasks/apiv2beta2/helpers.go b/cloudtasks/apiv2beta2/helpers.go index c245bd08ac88..f51bb20d6fd1 100755 --- a/cloudtasks/apiv2beta2/helpers.go +++ b/cloudtasks/apiv2beta2/helpers.go @@ -18,10 +18,20 @@ package cloudtasks import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudtasks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/cloudtasks/apiv2beta3/cloud_tasks_client.go b/cloudtasks/apiv2beta3/cloud_tasks_client.go index 5a5693145ce8..a68d5ccd95ea 100755 --- a/cloudtasks/apiv2beta3/cloud_tasks_client.go +++ b/cloudtasks/apiv2beta3/cloud_tasks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cloudtaskspb "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -643,6 +642,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new cloud tasks client based on gRPC. @@ -670,6 +671,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: cloudtaskspb.NewCloudTasksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -717,6 +719,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new cloud tasks rest client. @@ -735,6 +739,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -798,7 +803,7 @@ func (c *gRPCClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQueues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQueues, req, settings.GRPC, c.logger, "ListQueues") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *gRPCClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQueue, req, settings.GRPC, c.logger, "GetQueue") return err }, opts...) if err != nil { @@ -851,7 +856,7 @@ func (c *gRPCClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQueue, req, settings.GRPC, c.logger, "CreateQueue") return err }, opts...) if err != nil { @@ -869,7 +874,7 @@ func (c *gRPCClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQueue, req, settings.GRPC, c.logger, "UpdateQueue") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *gRPCClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu opts = append((*c.CallOptions).DeleteQueue[0:len((*c.CallOptions).DeleteQueue):len((*c.CallOptions).DeleteQueue)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQueue(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQueue, req, settings.GRPC, c.logger, "DeleteQueue") return err }, opts...) return err @@ -901,7 +906,7 @@ func (c *gRPCClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PurgeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PurgeQueue, req, settings.GRPC, c.logger, "PurgeQueue") return err }, opts...) if err != nil { @@ -919,7 +924,7 @@ func (c *gRPCClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PauseQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PauseQueue, req, settings.GRPC, c.logger, "PauseQueue") return err }, opts...) if err != nil { @@ -937,7 +942,7 @@ func (c *gRPCClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu var resp *cloudtaskspb.Queue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeQueue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeQueue, req, settings.GRPC, c.logger, "ResumeQueue") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -991,7 +996,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -1055,7 +1060,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *gRPCClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTask, req, settings.GRPC, c.logger, "CreateTask") return err }, opts...) if err != nil { @@ -1090,7 +1095,7 @@ func (c *gRPCClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas opts = append((*c.CallOptions).DeleteTask[0:len((*c.CallOptions).DeleteTask):len((*c.CallOptions).DeleteTask)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTask(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTask, req, settings.GRPC, c.logger, "DeleteTask") return err }, opts...) return err @@ -1105,7 +1110,7 @@ func (c *gRPCClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque var resp *cloudtaskspb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunTask, req, settings.GRPC, c.logger, "RunTask") return err }, opts...) if err != nil { @@ -1123,7 +1128,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1152,7 +1157,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1235,21 +1240,10 @@ func (c *restClient) ListQueues(ctx context.Context, req *cloudtaskspb.ListQueue } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQueues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1319,17 +1313,7 @@ func (c *restClient) GetQueue(ctx context.Context, req *cloudtaskspb.GetQueueReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQueue") if err != nil { return err } @@ -1397,17 +1381,7 @@ func (c *restClient) CreateQueue(ctx context.Context, req *cloudtaskspb.CreateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQueue") if err != nil { return err } @@ -1485,17 +1459,7 @@ func (c *restClient) UpdateQueue(ctx context.Context, req *cloudtaskspb.UpdateQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQueue") if err != nil { return err } @@ -1554,15 +1518,8 @@ func (c *restClient) DeleteQueue(ctx context.Context, req *cloudtaskspb.DeleteQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQueue") + return err }, opts...) } @@ -1610,17 +1567,7 @@ func (c *restClient) PurgeQueue(ctx context.Context, req *cloudtaskspb.PurgeQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeQueue") if err != nil { return err } @@ -1683,17 +1630,7 @@ func (c *restClient) PauseQueue(ctx context.Context, req *cloudtaskspb.PauseQueu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseQueue") if err != nil { return err } @@ -1763,17 +1700,7 @@ func (c *restClient) ResumeQueue(ctx context.Context, req *cloudtaskspb.ResumeQu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeQueue") if err != nil { return err } @@ -1837,17 +1764,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1913,17 +1830,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1986,17 +1893,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2069,21 +1966,10 @@ func (c *restClient) ListTasks(ctx context.Context, req *cloudtaskspb.ListTasksR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2149,17 +2035,7 @@ func (c *restClient) GetTask(ctx context.Context, req *cloudtaskspb.GetTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -2219,17 +2095,7 @@ func (c *restClient) CreateTask(ctx context.Context, req *cloudtaskspb.CreateTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTask") if err != nil { return err } @@ -2280,15 +2146,8 @@ func (c *restClient) DeleteTask(ctx context.Context, req *cloudtaskspb.DeleteTas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTask") + return err }, opts...) } @@ -2357,17 +2216,7 @@ func (c *restClient) RunTask(ctx context.Context, req *cloudtaskspb.RunTaskReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTask") if err != nil { return err } @@ -2417,17 +2266,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2492,21 +2331,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/cloudtasks/apiv2beta3/cloud_tasks_client_example_go123_test.go b/cloudtasks/apiv2beta3/cloud_tasks_client_example_go123_test.go index bf064518c7cb..8f1c967cd2b7 100644 --- a/cloudtasks/apiv2beta3/cloud_tasks_client_example_go123_test.go +++ b/cloudtasks/apiv2beta3/cloud_tasks_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListQueues_all() { } for resp, err := range c.ListQueues(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go index f658b6249eef..5ad16c76e3f3 100755 --- a/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go +++ b/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta3/cloudtasks.proto @@ -92,11 +92,9 @@ type ListQueuesRequest struct { func (x *ListQueuesRequest) Reset() { *x = ListQueuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesRequest) String() string { @@ -107,7 +105,7 @@ func (*ListQueuesRequest) ProtoMessage() {} func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +179,9 @@ type ListQueuesResponse struct { func (x *ListQueuesResponse) Reset() { *x = ListQueuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQueuesResponse) String() string { @@ -196,7 +192,7 @@ func (*ListQueuesResponse) ProtoMessage() {} func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type GetQueueRequest struct { func (x *GetQueueRequest) Reset() { *x = GetQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQueueRequest) String() string { @@ -259,7 +253,7 @@ func (*GetQueueRequest) ProtoMessage() {} func (x *GetQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +305,9 @@ type CreateQueueRequest struct { func (x *CreateQueueRequest) Reset() { *x = CreateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQueueRequest) String() string { @@ -326,7 +318,7 @@ func (*CreateQueueRequest) ProtoMessage() {} func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +372,9 @@ type UpdateQueueRequest struct { func (x *UpdateQueueRequest) Reset() { *x = UpdateQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQueueRequest) String() string { @@ -395,7 +385,7 @@ func (*UpdateQueueRequest) ProtoMessage() {} func (x *UpdateQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +428,9 @@ type DeleteQueueRequest struct { func (x *DeleteQueueRequest) Reset() { *x = DeleteQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQueueRequest) String() string { @@ -453,7 +441,7 @@ func (*DeleteQueueRequest) ProtoMessage() {} func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +477,9 @@ type PurgeQueueRequest struct { func (x *PurgeQueueRequest) Reset() { *x = PurgeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeQueueRequest) String() string { @@ -504,7 +490,7 @@ func (*PurgeQueueRequest) ProtoMessage() {} func (x *PurgeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +526,9 @@ type PauseQueueRequest struct { func (x *PauseQueueRequest) Reset() { *x = PauseQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseQueueRequest) String() string { @@ -555,7 +539,7 @@ func (*PauseQueueRequest) ProtoMessage() {} func (x *PauseQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +575,9 @@ type ResumeQueueRequest struct { func (x *ResumeQueueRequest) Reset() { *x = ResumeQueueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeQueueRequest) String() string { @@ -606,7 +588,7 @@ func (*ResumeQueueRequest) ProtoMessage() {} func (x *ResumeQueueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +657,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -690,7 +670,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +735,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -770,7 +748,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +805,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -842,7 +818,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +911,9 @@ type CreateTaskRequest struct { func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -950,7 +924,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +974,9 @@ type DeleteTaskRequest struct { func (x *DeleteTaskRequest) Reset() { *x = DeleteTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaskRequest) String() string { @@ -1015,7 +987,7 @@ func (*DeleteTaskRequest) ProtoMessage() {} func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1037,9 @@ type RunTaskRequest struct { func (x *RunTaskRequest) Reset() { *x = RunTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTaskRequest) String() string { @@ -1080,7 +1050,7 @@ func (*RunTaskRequest) ProtoMessage() {} func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1555,188 +1525,6 @@ func file_google_cloud_tasks_v2beta3_cloudtasks_proto_init() { } file_google_cloud_tasks_v2beta3_queue_proto_init() file_google_cloud_tasks_v2beta3_task_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListQueuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PauseQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeQueueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RunTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go index 395a4e9da549..52a4d165aaac 100755 --- a/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go +++ b/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta3/queue.proto @@ -314,11 +314,9 @@ type Queue struct { func (x *Queue) Reset() { *x = Queue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Queue) String() string { @@ -329,7 +327,7 @@ func (*Queue) ProtoMessage() {} func (x *Queue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +528,9 @@ type RateLimits struct { func (x *RateLimits) Reset() { *x = RateLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RateLimits) String() string { @@ -545,7 +541,7 @@ func (*RateLimits) ProtoMessage() {} func (x *RateLimits) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +684,9 @@ type RetryConfig struct { func (x *RetryConfig) Reset() { *x = RetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryConfig) String() string { @@ -703,7 +697,7 @@ func (*RetryConfig) ProtoMessage() {} func (x *RetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +763,9 @@ type StackdriverLoggingConfig struct { func (x *StackdriverLoggingConfig) Reset() { *x = StackdriverLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StackdriverLoggingConfig) String() string { @@ -784,7 +776,7 @@ func (*StackdriverLoggingConfig) ProtoMessage() {} func (x *StackdriverLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +828,9 @@ type QueueStats struct { func (x *QueueStats) Reset() { *x = QueueStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueueStats) String() string { @@ -851,7 +841,7 @@ func (*QueueStats) ProtoMessage() {} func (x *QueueStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,68 +1096,6 @@ func file_google_cloud_tasks_v2beta3_queue_proto_init() { return } file_google_cloud_tasks_v2beta3_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Queue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RateLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StackdriverLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QueueStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0].OneofWrappers = []any{ (*Queue_AppEngineHttpQueue)(nil), } diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go index f5a72498e6f0..306bdfd8cc8e 100755 --- a/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go +++ b/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta3/target.proto @@ -249,11 +249,9 @@ type PullMessage struct { func (x *PullMessage) Reset() { *x = PullMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullMessage) String() string { @@ -264,7 +262,7 @@ func (*PullMessage) ProtoMessage() {} func (x *PullMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,11 +305,9 @@ type PathOverride struct { func (x *PathOverride) Reset() { *x = PathOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PathOverride) String() string { @@ -322,7 +318,7 @@ func (*PathOverride) ProtoMessage() {} func (x *PathOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +355,9 @@ type QueryOverride struct { func (x *QueryOverride) Reset() { *x = QueryOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryOverride) String() string { @@ -374,7 +368,7 @@ func (*QueryOverride) ProtoMessage() {} func (x *QueryOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +437,9 @@ type UriOverride struct { func (x *UriOverride) Reset() { *x = UriOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UriOverride) String() string { @@ -458,7 +450,7 @@ func (*UriOverride) ProtoMessage() {} func (x *UriOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +575,9 @@ type HttpTarget struct { func (x *HttpTarget) Reset() { *x = HttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget) String() string { @@ -598,7 +588,7 @@ func (*HttpTarget) ProtoMessage() {} func (x *HttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +780,9 @@ type HttpRequest struct { func (x *HttpRequest) Reset() { *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRequest) String() string { @@ -805,7 +793,7 @@ func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +923,9 @@ type AppEngineHttpQueue struct { func (x *AppEngineHttpQueue) Reset() { *x = AppEngineHttpQueue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpQueue) String() string { @@ -950,7 +936,7 @@ func (*AppEngineHttpQueue) ProtoMessage() {} func (x *AppEngineHttpQueue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1107,9 @@ type AppEngineHttpRequest struct { func (x *AppEngineHttpRequest) Reset() { *x = AppEngineHttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpRequest) String() string { @@ -1136,7 +1120,7 @@ func (*AppEngineHttpRequest) ProtoMessage() {} func (x *AppEngineHttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1275,11 +1259,9 @@ type AppEngineRouting struct { func (x *AppEngineRouting) Reset() { *x = AppEngineRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineRouting) String() string { @@ -1290,7 +1272,7 @@ func (*AppEngineRouting) ProtoMessage() {} func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1356,11 +1338,9 @@ type OAuthToken struct { func (x *OAuthToken) Reset() { *x = OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthToken) String() string { @@ -1371,7 +1351,7 @@ func (*OAuthToken) ProtoMessage() {} func (x *OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1404,9 @@ type OidcToken struct { func (x *OidcToken) Reset() { *x = OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OidcToken) String() string { @@ -1439,7 +1417,7 @@ func (*OidcToken) ProtoMessage() {} func (x *OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,11 +1460,9 @@ type HttpTarget_Header struct { func (x *HttpTarget_Header) Reset() { *x = HttpTarget_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget_Header) String() string { @@ -1497,7 +1473,7 @@ func (*HttpTarget_Header) ProtoMessage() {} func (x *HttpTarget_Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1514,9 @@ type HttpTarget_HeaderOverride struct { func (x *HttpTarget_HeaderOverride) Reset() { *x = HttpTarget_HeaderOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget_HeaderOverride) String() string { @@ -1553,7 +1527,7 @@ func (*HttpTarget_HeaderOverride) ProtoMessage() {} func (x *HttpTarget_HeaderOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1827,164 +1801,6 @@ func file_google_cloud_tasks_v2beta3_target_proto_init() { if File_google_cloud_tasks_v2beta3_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PullMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PathOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QueryOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UriOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpQueue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_target_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget_HeaderOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3].OneofWrappers = []any{} file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4].OneofWrappers = []any{ (*HttpTarget_OauthToken)(nil), diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go index a250e8b397b3..74ad66df8159 100755 --- a/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go +++ b/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tasks/v2beta3/task.proto @@ -217,11 +217,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -232,7 +230,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +401,9 @@ type Attempt struct { func (x *Attempt) Reset() { *x = Attempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attempt) String() string { @@ -418,7 +414,7 @@ func (*Attempt) ProtoMessage() {} func (x *Attempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,32 +612,6 @@ func file_google_cloud_tasks_v2beta3_task_proto_init() { return } file_google_cloud_tasks_v2beta3_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Attempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0].OneofWrappers = []any{ (*Task_AppEngineHttpRequest)(nil), (*Task_HttpRequest)(nil), diff --git a/cloudtasks/apiv2beta3/helpers.go b/cloudtasks/apiv2beta3/helpers.go index c245bd08ac88..f51bb20d6fd1 100755 --- a/cloudtasks/apiv2beta3/helpers.go +++ b/cloudtasks/apiv2beta3/helpers.go @@ -18,10 +18,20 @@ package cloudtasks import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudtasks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/commerce/consumer/procurement/apiv1/consumer_procurement_client.go b/commerce/consumer/procurement/apiv1/consumer_procurement_client.go index 678c2e60dae5..5c08edd4969a 100755 --- a/commerce/consumer/procurement/apiv1/consumer_procurement_client.go +++ b/commerce/consumer/procurement/apiv1/consumer_procurement_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -286,6 +285,8 @@ type consumerProcurementGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConsumerProcurementClient creates a new consumer procurement service client based on gRPC. @@ -319,6 +320,7 @@ func NewConsumerProcurementClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, consumerProcurementClient: procurementpb.NewConsumerProcurementServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -382,6 +384,8 @@ type consumerProcurementRESTClient struct { // Points back to the CallOptions field of the containing ConsumerProcurementClient CallOptions **ConsumerProcurementCallOptions + + logger *slog.Logger } // NewConsumerProcurementRESTClient creates a new consumer procurement service rest client. @@ -406,6 +410,7 @@ func NewConsumerProcurementRESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -468,7 +473,7 @@ func (c *consumerProcurementGRPCClient) PlaceOrder(ctx context.Context, req *pro var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.consumerProcurementClient.PlaceOrder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.consumerProcurementClient.PlaceOrder, req, settings.GRPC, c.logger, "PlaceOrder") return err }, opts...) if err != nil { @@ -488,7 +493,7 @@ func (c *consumerProcurementGRPCClient) GetOrder(ctx context.Context, req *procu var resp *procurementpb.Order err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.consumerProcurementClient.GetOrder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.consumerProcurementClient.GetOrder, req, settings.GRPC, c.logger, "GetOrder") return err }, opts...) if err != nil { @@ -517,7 +522,7 @@ func (c *consumerProcurementGRPCClient) ListOrders(ctx context.Context, req *pro } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.consumerProcurementClient.ListOrders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.consumerProcurementClient.ListOrders, req, settings.GRPC, c.logger, "ListOrders") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *consumerProcurementGRPCClient) ModifyOrder(ctx context.Context, req *pr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.consumerProcurementClient.ModifyOrder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.consumerProcurementClient.ModifyOrder, req, settings.GRPC, c.logger, "ModifyOrder") return err }, opts...) if err != nil { @@ -572,7 +577,7 @@ func (c *consumerProcurementGRPCClient) CancelOrder(ctx context.Context, req *pr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.consumerProcurementClient.CancelOrder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.consumerProcurementClient.CancelOrder, req, settings.GRPC, c.logger, "CancelOrder") return err }, opts...) if err != nil { @@ -592,7 +597,7 @@ func (c *consumerProcurementGRPCClient) GetOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -648,21 +653,10 @@ func (c *consumerProcurementRESTClient) PlaceOrder(ctx context.Context, req *pro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PlaceOrder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -714,17 +708,7 @@ func (c *consumerProcurementRESTClient) GetOrder(ctx context.Context, req *procu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrder") if err != nil { return err } @@ -791,21 +775,10 @@ func (c *consumerProcurementRESTClient) ListOrders(ctx context.Context, req *pro } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrders") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -874,21 +847,10 @@ func (c *consumerProcurementRESTClient) ModifyOrder(ctx context.Context, req *pr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyOrder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -946,21 +908,10 @@ func (c *consumerProcurementRESTClient) CancelOrder(ctx context.Context, req *pr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOrder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1011,17 +962,7 @@ func (c *consumerProcurementRESTClient) GetOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/commerce/consumer/procurement/apiv1/consumer_procurement_client_example_go123_test.go b/commerce/consumer/procurement/apiv1/consumer_procurement_client_example_go123_test.go index 70f6724a1837..e3c50715319f 100644 --- a/commerce/consumer/procurement/apiv1/consumer_procurement_client_example_go123_test.go +++ b/commerce/consumer/procurement/apiv1/consumer_procurement_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleConsumerProcurementClient_ListOrders_all() { } for resp, err := range c.ListOrders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/commerce/consumer/procurement/apiv1/helpers.go b/commerce/consumer/procurement/apiv1/helpers.go index d131a7bcfd71..8c0923abc23c 100755 --- a/commerce/consumer/procurement/apiv1/helpers.go +++ b/commerce/consumer/procurement/apiv1/helpers.go @@ -18,10 +18,20 @@ package procurement import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudcommerceconsumerprocurement.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/commerce/consumer/procurement/apiv1/license_management_client.go b/commerce/consumer/procurement/apiv1/license_management_client.go index d0395d644026..16bee239e59e 100755 --- a/commerce/consumer/procurement/apiv1/license_management_client.go +++ b/commerce/consumer/procurement/apiv1/license_management_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( procurementpb "cloud.google.com/go/commerce/consumer/procurement/apiv1/procurementpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -183,6 +182,8 @@ type licenseManagementGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLicenseManagementClient creates a new license management service client based on gRPC. @@ -209,6 +210,7 @@ func NewLicenseManagementClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, licenseManagementClient: procurementpb.NewLicenseManagementServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -256,6 +258,8 @@ type licenseManagementRESTClient struct { // Points back to the CallOptions field of the containing LicenseManagementClient CallOptions **LicenseManagementCallOptions + + logger *slog.Logger } // NewLicenseManagementRESTClient creates a new license management service rest client. @@ -273,6 +277,7 @@ func NewLicenseManagementRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -325,7 +330,7 @@ func (c *licenseManagementGRPCClient) GetLicensePool(ctx context.Context, req *p var resp *procurementpb.LicensePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.licenseManagementClient.GetLicensePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.licenseManagementClient.GetLicensePool, req, settings.GRPC, c.logger, "GetLicensePool") return err }, opts...) if err != nil { @@ -343,7 +348,7 @@ func (c *licenseManagementGRPCClient) UpdateLicensePool(ctx context.Context, req var resp *procurementpb.LicensePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.licenseManagementClient.UpdateLicensePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.licenseManagementClient.UpdateLicensePool, req, settings.GRPC, c.logger, "UpdateLicensePool") return err }, opts...) if err != nil { @@ -361,7 +366,7 @@ func (c *licenseManagementGRPCClient) Assign(ctx context.Context, req *procureme var resp *procurementpb.AssignResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.licenseManagementClient.Assign(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.licenseManagementClient.Assign, req, settings.GRPC, c.logger, "Assign") return err }, opts...) if err != nil { @@ -379,7 +384,7 @@ func (c *licenseManagementGRPCClient) Unassign(ctx context.Context, req *procure var resp *procurementpb.UnassignResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.licenseManagementClient.Unassign(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.licenseManagementClient.Unassign, req, settings.GRPC, c.logger, "Unassign") return err }, opts...) if err != nil { @@ -408,7 +413,7 @@ func (c *licenseManagementGRPCClient) EnumerateLicensedUsers(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.licenseManagementClient.EnumerateLicensedUsers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.licenseManagementClient.EnumerateLicensedUsers, req, settings.GRPC, c.logger, "EnumerateLicensedUsers") return err }, opts...) if err != nil { @@ -443,7 +448,7 @@ func (c *licenseManagementGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -485,17 +490,7 @@ func (c *licenseManagementRESTClient) GetLicensePool(ctx context.Context, req *p httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLicensePool") if err != nil { return err } @@ -559,17 +554,7 @@ func (c *licenseManagementRESTClient) UpdateLicensePool(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLicensePool") if err != nil { return err } @@ -625,17 +610,7 @@ func (c *licenseManagementRESTClient) Assign(ctx context.Context, req *procureme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Assign") if err != nil { return err } @@ -691,17 +666,7 @@ func (c *licenseManagementRESTClient) Unassign(ctx context.Context, req *procure httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Unassign") if err != nil { return err } @@ -763,21 +728,10 @@ func (c *licenseManagementRESTClient) EnumerateLicensedUsers(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "EnumerateLicensedUsers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -840,17 +794,7 @@ func (c *licenseManagementRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/commerce/consumer/procurement/apiv1/license_management_client_example_go123_test.go b/commerce/consumer/procurement/apiv1/license_management_client_example_go123_test.go index 609abdda1b8e..017b283ebae3 100644 --- a/commerce/consumer/procurement/apiv1/license_management_client_example_go123_test.go +++ b/commerce/consumer/procurement/apiv1/license_management_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLicenseManagementClient_EnumerateLicensedUsers_all() { } for resp, err := range c.EnumerateLicensedUsers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/commerce/consumer/procurement/apiv1/procurementpb/license_management_service.pb.go b/commerce/consumer/procurement/apiv1/procurementpb/license_management_service.pb.go index b6d820cbf467..bc1e6ffeadd2 100755 --- a/commerce/consumer/procurement/apiv1/procurementpb/license_management_service.pb.go +++ b/commerce/consumer/procurement/apiv1/procurementpb/license_management_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/commerce/consumer/procurement/v1/license_management_service.proto @@ -60,11 +60,9 @@ type AssignmentProtocol struct { func (x *AssignmentProtocol) Reset() { *x = AssignmentProtocol{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignmentProtocol) String() string { @@ -75,7 +73,7 @@ func (*AssignmentProtocol) ProtoMessage() {} func (x *AssignmentProtocol) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type LicensePool struct { func (x *LicensePool) Reset() { *x = LicensePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicensePool) String() string { @@ -163,7 +159,7 @@ func (*LicensePool) ProtoMessage() {} func (x *LicensePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +215,9 @@ type GetLicensePoolRequest struct { func (x *GetLicensePoolRequest) Reset() { *x = GetLicensePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLicensePoolRequest) String() string { @@ -234,7 +228,7 @@ func (*GetLicensePoolRequest) ProtoMessage() {} func (x *GetLicensePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -274,11 +268,9 @@ type UpdateLicensePoolRequest struct { func (x *UpdateLicensePoolRequest) Reset() { *x = UpdateLicensePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLicensePoolRequest) String() string { @@ -289,7 +281,7 @@ func (*UpdateLicensePoolRequest) ProtoMessage() {} func (x *UpdateLicensePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type AssignRequest struct { func (x *AssignRequest) Reset() { *x = AssignRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignRequest) String() string { @@ -349,7 +339,7 @@ func (*AssignRequest) ProtoMessage() {} func (x *AssignRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,11 +378,9 @@ type AssignResponse struct { func (x *AssignResponse) Reset() { *x = AssignResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignResponse) String() string { @@ -403,7 +391,7 @@ func (*AssignResponse) ProtoMessage() {} func (x *AssignResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +422,9 @@ type UnassignRequest struct { func (x *UnassignRequest) Reset() { *x = UnassignRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnassignRequest) String() string { @@ -449,7 +435,7 @@ func (*UnassignRequest) ProtoMessage() {} func (x *UnassignRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +474,9 @@ type UnassignResponse struct { func (x *UnassignResponse) Reset() { *x = UnassignResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnassignResponse) String() string { @@ -503,7 +487,7 @@ func (*UnassignResponse) ProtoMessage() {} func (x *UnassignResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +521,9 @@ type EnumerateLicensedUsersRequest struct { func (x *EnumerateLicensedUsersRequest) Reset() { *x = EnumerateLicensedUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumerateLicensedUsersRequest) String() string { @@ -552,7 +534,7 @@ func (*EnumerateLicensedUsersRequest) ProtoMessage() {} func (x *EnumerateLicensedUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +589,9 @@ type LicensedUser struct { func (x *LicensedUser) Reset() { *x = LicensedUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicensedUser) String() string { @@ -622,7 +602,7 @@ func (*LicensedUser) ProtoMessage() {} func (x *LicensedUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +654,9 @@ type EnumerateLicensedUsersResponse struct { func (x *EnumerateLicensedUsersResponse) Reset() { *x = EnumerateLicensedUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumerateLicensedUsersResponse) String() string { @@ -689,7 +667,7 @@ func (*EnumerateLicensedUsersResponse) ProtoMessage() {} func (x *EnumerateLicensedUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,11 +705,9 @@ type AssignmentProtocol_ManualAssignmentType struct { func (x *AssignmentProtocol_ManualAssignmentType) Reset() { *x = AssignmentProtocol_ManualAssignmentType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignmentProtocol_ManualAssignmentType) String() string { @@ -742,7 +718,7 @@ func (*AssignmentProtocol_ManualAssignmentType) ProtoMessage() {} func (x *AssignmentProtocol_ManualAssignmentType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +747,9 @@ type AssignmentProtocol_AutoAssignmentType struct { func (x *AssignmentProtocol_AutoAssignmentType) Reset() { *x = AssignmentProtocol_AutoAssignmentType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssignmentProtocol_AutoAssignmentType) String() string { @@ -786,7 +760,7 @@ func (*AssignmentProtocol_AutoAssignmentType) ProtoMessage() {} func (x *AssignmentProtocol_AutoAssignmentType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1120,164 +1094,6 @@ func file_google_cloud_commerce_consumer_procurement_v1_license_management_servi if File_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AssignmentProtocol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LicensePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetLicensePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLicensePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AssignRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AssignResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UnassignRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UnassignResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EnumerateLicensedUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LicensedUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*EnumerateLicensedUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AssignmentProtocol_ManualAssignmentType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AssignmentProtocol_AutoAssignmentType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_commerce_consumer_procurement_v1_license_management_service_proto_msgTypes[0].OneofWrappers = []any{ (*AssignmentProtocol_ManualAssignmentType_)(nil), (*AssignmentProtocol_AutoAssignmentType_)(nil), diff --git a/commerce/consumer/procurement/apiv1/procurementpb/order.pb.go b/commerce/consumer/procurement/apiv1/procurementpb/order.pb.go index 09fdb79d05bd..0aab098ff65e 100755 --- a/commerce/consumer/procurement/apiv1/procurementpb/order.pb.go +++ b/commerce/consumer/procurement/apiv1/procurementpb/order.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/commerce/consumer/procurement/v1/order.proto @@ -270,11 +270,9 @@ type Order struct { func (x *Order) Reset() { *x = Order{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Order) String() string { @@ -285,7 +283,7 @@ func (*Order) ProtoMessage() {} func (x *Order) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +371,9 @@ type LineItem struct { func (x *LineItem) Reset() { *x = LineItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineItem) String() string { @@ -388,7 +384,7 @@ func (*LineItem) ProtoMessage() {} func (x *LineItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +467,9 @@ type LineItemChange struct { func (x *LineItemChange) Reset() { *x = LineItemChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineItemChange) String() string { @@ -486,7 +480,7 @@ func (*LineItemChange) ProtoMessage() {} func (x *LineItemChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +583,9 @@ type LineItemInfo struct { func (x *LineItemInfo) Reset() { *x = LineItemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineItemInfo) String() string { @@ -604,7 +596,7 @@ func (*LineItemInfo) ProtoMessage() {} func (x *LineItemInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,11 +646,9 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Parameter) String() string { @@ -669,7 +659,7 @@ func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +706,9 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription) String() string { @@ -731,7 +719,7 @@ func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +772,9 @@ type Parameter_Value struct { func (x *Parameter_Value) Reset() { *x = Parameter_Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Parameter_Value) String() string { @@ -799,7 +785,7 @@ func (*Parameter_Value) ProtoMessage() {} func (x *Parameter_Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,92 +1163,6 @@ func file_google_cloud_commerce_consumer_procurement_v1_order_proto_init() { if File_google_cloud_commerce_consumer_procurement_v1_order_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Order); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LineItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LineItemChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LineItemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Parameter_Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_commerce_consumer_procurement_v1_order_proto_msgTypes[6].OneofWrappers = []any{ (*Parameter_Value_Int64Value)(nil), (*Parameter_Value_StringValue)(nil), diff --git a/commerce/consumer/procurement/apiv1/procurementpb/procurement_service.pb.go b/commerce/consumer/procurement/apiv1/procurementpb/procurement_service.pb.go index 1b7d827c9a76..cb7cb6c4e30b 100755 --- a/commerce/consumer/procurement/apiv1/procurementpb/procurement_service.pb.go +++ b/commerce/consumer/procurement/apiv1/procurementpb/procurement_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/commerce/consumer/procurement/v1/procurement_service.proto @@ -179,11 +179,9 @@ type PlaceOrderRequest struct { func (x *PlaceOrderRequest) Reset() { *x = PlaceOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaceOrderRequest) String() string { @@ -194,7 +192,7 @@ func (*PlaceOrderRequest) ProtoMessage() {} func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type PlaceOrderMetadata struct { func (x *PlaceOrderMetadata) Reset() { *x = PlaceOrderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaceOrderMetadata) String() string { @@ -262,7 +258,7 @@ func (*PlaceOrderMetadata) ProtoMessage() {} func (x *PlaceOrderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +286,9 @@ type GetOrderRequest struct { func (x *GetOrderRequest) Reset() { *x = GetOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrderRequest) String() string { @@ -305,7 +299,7 @@ func (*GetOrderRequest) ProtoMessage() {} func (x *GetOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +357,9 @@ type ListOrdersRequest struct { func (x *ListOrdersRequest) Reset() { *x = ListOrdersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrdersRequest) String() string { @@ -378,7 +370,7 @@ func (*ListOrdersRequest) ProtoMessage() {} func (x *ListOrdersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +428,9 @@ type ListOrdersResponse struct { func (x *ListOrdersResponse) Reset() { *x = ListOrdersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrdersResponse) String() string { @@ -451,7 +441,7 @@ func (*ListOrdersResponse) ProtoMessage() {} func (x *ListOrdersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +494,9 @@ type ModifyOrderRequest struct { func (x *ModifyOrderRequest) Reset() { *x = ModifyOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyOrderRequest) String() string { @@ -519,7 +507,7 @@ func (*ModifyOrderRequest) ProtoMessage() {} func (x *ModifyOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +560,9 @@ type ModifyOrderMetadata struct { func (x *ModifyOrderMetadata) Reset() { *x = ModifyOrderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyOrderMetadata) String() string { @@ -587,7 +573,7 @@ func (*ModifyOrderMetadata) ProtoMessage() {} func (x *ModifyOrderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,11 +607,9 @@ type CancelOrderRequest struct { func (x *CancelOrderRequest) Reset() { *x = CancelOrderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOrderRequest) String() string { @@ -636,7 +620,7 @@ func (*CancelOrderRequest) ProtoMessage() {} func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +666,9 @@ type CancelOrderMetadata struct { func (x *CancelOrderMetadata) Reset() { *x = CancelOrderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOrderMetadata) String() string { @@ -697,7 +679,7 @@ func (*CancelOrderMetadata) ProtoMessage() {} func (x *CancelOrderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +721,9 @@ type ModifyOrderRequest_Modification struct { func (x *ModifyOrderRequest_Modification) Reset() { *x = ModifyOrderRequest_Modification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyOrderRequest_Modification) String() string { @@ -754,7 +734,7 @@ func (*ModifyOrderRequest_Modification) ProtoMessage() {} func (x *ModifyOrderRequest_Modification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,128 +1067,6 @@ func file_google_cloud_commerce_consumer_procurement_v1_procurement_service_prot return } file_google_cloud_commerce_consumer_procurement_v1_order_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PlaceOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PlaceOrderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListOrdersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListOrdersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ModifyOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ModifyOrderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CancelOrderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CancelOrderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_commerce_consumer_procurement_v1_procurement_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ModifyOrderRequest_Modification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/compute/apiv1/accelerator_types_client.go b/compute/apiv1/accelerator_types_client.go index 238071ca25f9..8c525cadad3b 100755 --- a/compute/apiv1/accelerator_types_client.go +++ b/compute/apiv1/accelerator_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -163,6 +162,8 @@ type acceleratorTypesRESTClient struct { // Points back to the CallOptions field of the containing AcceleratorTypesClient CallOptions **AcceleratorTypesCallOptions + + logger *slog.Logger } // NewAcceleratorTypesRESTClient creates a new accelerator types rest client. @@ -182,6 +183,7 @@ func NewAcceleratorTypesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -285,21 +287,10 @@ func (c *acceleratorTypesRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -364,17 +355,7 @@ func (c *acceleratorTypesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -444,21 +425,10 @@ func (c *acceleratorTypesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/accelerator_types_client_example_go123_test.go b/compute/apiv1/accelerator_types_client_example_go123_test.go index 24a73a77110c..29e2de9bb1fc 100644 --- a/compute/apiv1/accelerator_types_client_example_go123_test.go +++ b/compute/apiv1/accelerator_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAcceleratorTypesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleAcceleratorTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/addresses_client.go b/compute/apiv1/addresses_client.go index e3eedb17735b..eb27efc79d7b 100755 --- a/compute/apiv1/addresses_client.go +++ b/compute/apiv1/addresses_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type addressesRESTClient struct { // Points back to the CallOptions field of the containing AddressesClient CallOptions **AddressesCallOptions + + logger *slog.Logger } // NewAddressesRESTClient creates a new addresses rest client. @@ -222,6 +223,7 @@ func NewAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *addressesRESTClient) AggregatedList(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *addressesRESTClient) Delete(ctx context.Context, req *computepb.DeleteA httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -487,17 +468,7 @@ func (c *addressesRESTClient) Get(ctx context.Context, req *computepb.GetAddress httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -556,17 +527,7 @@ func (c *addressesRESTClient) Insert(ctx context.Context, req *computepb.InsertA httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -644,21 +605,10 @@ func (c *addressesRESTClient) List(ctx context.Context, req *computepb.ListAddre } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -730,17 +680,7 @@ func (c *addressesRESTClient) Move(ctx context.Context, req *computepb.MoveAddre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Move") if err != nil { return err } @@ -807,17 +747,7 @@ func (c *addressesRESTClient) SetLabels(ctx context.Context, req *computepb.SetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/addresses_client_example_go123_test.go b/compute/apiv1/addresses_client_example_go123_test.go index 0c4f8ba6e6d7..e085b26258d3 100644 --- a/compute/apiv1/addresses_client_example_go123_test.go +++ b/compute/apiv1/addresses_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAddressesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleAddressesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/autoscalers_client.go b/compute/apiv1/autoscalers_client.go index 0bd8f894c431..d1fdb4130823 100755 --- a/compute/apiv1/autoscalers_client.go +++ b/compute/apiv1/autoscalers_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type autoscalersRESTClient struct { // Points back to the CallOptions field of the containing AutoscalersClient CallOptions **AutoscalersCallOptions + + logger *slog.Logger } // NewAutoscalersRESTClient creates a new autoscalers rest client. @@ -222,6 +223,7 @@ func NewAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *autoscalersRESTClient) AggregatedList(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *autoscalersRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -487,17 +468,7 @@ func (c *autoscalersRESTClient) Get(ctx context.Context, req *computepb.GetAutos httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -556,17 +527,7 @@ func (c *autoscalersRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -644,21 +605,10 @@ func (c *autoscalersRESTClient) List(ctx context.Context, req *computepb.ListAut } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -733,17 +683,7 @@ func (c *autoscalersRESTClient) Patch(ctx context.Context, req *computepb.PatchA httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -813,17 +753,7 @@ func (c *autoscalersRESTClient) Update(ctx context.Context, req *computepb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/autoscalers_client_example_go123_test.go b/compute/apiv1/autoscalers_client_example_go123_test.go index 1e2e9d7f300e..320b910a37c4 100644 --- a/compute/apiv1/autoscalers_client_example_go123_test.go +++ b/compute/apiv1/autoscalers_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAutoscalersClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleAutoscalersClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/backend_buckets_client.go b/compute/apiv1/backend_buckets_client.go index 0cdb87ae4688..708cd74a6fdf 100755 --- a/compute/apiv1/backend_buckets_client.go +++ b/compute/apiv1/backend_buckets_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -254,6 +253,8 @@ type backendBucketsRESTClient struct { // Points back to the CallOptions field of the containing BackendBucketsClient CallOptions **BackendBucketsCallOptions + + logger *slog.Logger } // NewBackendBucketsRESTClient creates a new backend buckets rest client. @@ -271,6 +272,7 @@ func NewBackendBucketsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -370,17 +372,7 @@ func (c *backendBucketsRESTClient) AddSignedUrlKey(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddSignedUrlKey") if err != nil { return err } @@ -439,17 +431,7 @@ func (c *backendBucketsRESTClient) Delete(ctx context.Context, req *computepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -509,17 +491,7 @@ func (c *backendBucketsRESTClient) DeleteSignedUrlKey(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSignedUrlKey") if err != nil { return err } @@ -571,17 +543,7 @@ func (c *backendBucketsRESTClient) Get(ctx context.Context, req *computepb.GetBa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -633,17 +595,7 @@ func (c *backendBucketsRESTClient) GetIamPolicy(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -702,17 +654,7 @@ func (c *backendBucketsRESTClient) Insert(ctx context.Context, req *computepb.In httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -789,21 +731,10 @@ func (c *backendBucketsRESTClient) List(ctx context.Context, req *computepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -875,17 +806,7 @@ func (c *backendBucketsRESTClient) Patch(ctx context.Context, req *computepb.Pat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -951,17 +872,7 @@ func (c *backendBucketsRESTClient) SetEdgeSecurityPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetEdgeSecurityPolicy") if err != nil { return err } @@ -1020,17 +931,7 @@ func (c *backendBucketsRESTClient) SetIamPolicy(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1082,17 +983,7 @@ func (c *backendBucketsRESTClient) TestIamPermissions(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1151,17 +1042,7 @@ func (c *backendBucketsRESTClient) Update(ctx context.Context, req *computepb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/backend_buckets_client_example_go123_test.go b/compute/apiv1/backend_buckets_client_example_go123_test.go index 0632f4e9261c..de467c9383f1 100644 --- a/compute/apiv1/backend_buckets_client_example_go123_test.go +++ b/compute/apiv1/backend_buckets_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBackendBucketsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/backend_services_client.go b/compute/apiv1/backend_services_client.go index 966b713d2443..b23db8892153 100755 --- a/compute/apiv1/backend_services_client.go +++ b/compute/apiv1/backend_services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -313,6 +312,8 @@ type backendServicesRESTClient struct { // Points back to the CallOptions field of the containing BackendServicesClient CallOptions **BackendServicesCallOptions + + logger *slog.Logger } // NewBackendServicesRESTClient creates a new backend services rest client. @@ -330,6 +331,7 @@ func NewBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -429,17 +431,7 @@ func (c *backendServicesRESTClient) AddSignedUrlKey(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddSignedUrlKey") if err != nil { return err } @@ -522,21 +514,10 @@ func (c *backendServicesRESTClient) AggregatedList(ctx context.Context, req *com } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -608,17 +589,7 @@ func (c *backendServicesRESTClient) Delete(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -678,17 +649,7 @@ func (c *backendServicesRESTClient) DeleteSignedUrlKey(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSignedUrlKey") if err != nil { return err } @@ -740,17 +701,7 @@ func (c *backendServicesRESTClient) Get(ctx context.Context, req *computepb.GetB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -802,17 +753,7 @@ func (c *backendServicesRESTClient) GetHealth(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetHealth") if err != nil { return err } @@ -864,17 +805,7 @@ func (c *backendServicesRESTClient) GetIamPolicy(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -933,17 +864,7 @@ func (c *backendServicesRESTClient) Insert(ctx context.Context, req *computepb.I httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1020,21 +941,10 @@ func (c *backendServicesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1117,21 +1027,10 @@ func (c *backendServicesRESTClient) ListUsable(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsable") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1203,17 +1102,7 @@ func (c *backendServicesRESTClient) Patch(ctx context.Context, req *computepb.Pa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1279,17 +1168,7 @@ func (c *backendServicesRESTClient) SetEdgeSecurityPolicy(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetEdgeSecurityPolicy") if err != nil { return err } @@ -1348,17 +1227,7 @@ func (c *backendServicesRESTClient) SetIamPolicy(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1417,17 +1286,7 @@ func (c *backendServicesRESTClient) SetSecurityPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSecurityPolicy") if err != nil { return err } @@ -1486,17 +1345,7 @@ func (c *backendServicesRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1555,17 +1404,7 @@ func (c *backendServicesRESTClient) Update(ctx context.Context, req *computepb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/backend_services_client_example_go123_test.go b/compute/apiv1/backend_services_client_example_go123_test.go index 6bf8b341aea4..08ac7d008fc4 100644 --- a/compute/apiv1/backend_services_client_example_go123_test.go +++ b/compute/apiv1/backend_services_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBackendServicesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleBackendServicesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleBackendServicesClient_ListUsable_all() { } for resp, err := range c.ListUsable(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/computepb/compute.pb.go b/compute/apiv1/computepb/compute.pb.go index 6368c28a68d6..e0fc9233a714 100755 --- a/compute/apiv1/computepb/compute.pb.go +++ b/compute/apiv1/computepb/compute.pb.go @@ -20,7 +20,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/compute/v1/compute.proto @@ -21018,11 +21018,9 @@ type AWSV4Signature struct { func (x *AWSV4Signature) Reset() { *x = AWSV4Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AWSV4Signature) String() string { @@ -21033,7 +21031,7 @@ func (*AWSV4Signature) ProtoMessage() {} func (x *AWSV4Signature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21096,11 +21094,9 @@ type AbandonInstancesInstanceGroupManagerRequest struct { func (x *AbandonInstancesInstanceGroupManagerRequest) Reset() { *x = AbandonInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AbandonInstancesInstanceGroupManagerRequest) String() string { @@ -21111,7 +21107,7 @@ func (*AbandonInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *AbandonInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21181,11 +21177,9 @@ type AbandonInstancesRegionInstanceGroupManagerRequest struct { func (x *AbandonInstancesRegionInstanceGroupManagerRequest) Reset() { *x = AbandonInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AbandonInstancesRegionInstanceGroupManagerRequest) String() string { @@ -21196,7 +21190,7 @@ func (*AbandonInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *AbandonInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21260,11 +21254,9 @@ type AcceleratorConfig struct { func (x *AcceleratorConfig) Reset() { *x = AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorConfig) String() string { @@ -21275,7 +21267,7 @@ func (*AcceleratorConfig) ProtoMessage() {} func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21332,11 +21324,9 @@ type AcceleratorType struct { func (x *AcceleratorType) Reset() { *x = AcceleratorType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorType) String() string { @@ -21347,7 +21337,7 @@ func (*AcceleratorType) ProtoMessage() {} func (x *AcceleratorType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21448,11 +21438,9 @@ type AcceleratorTypeAggregatedList struct { func (x *AcceleratorTypeAggregatedList) Reset() { *x = AcceleratorTypeAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorTypeAggregatedList) String() string { @@ -21463,7 +21451,7 @@ func (*AcceleratorTypeAggregatedList) ProtoMessage() {} func (x *AcceleratorTypeAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21549,11 +21537,9 @@ type AcceleratorTypeList struct { func (x *AcceleratorTypeList) Reset() { *x = AcceleratorTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorTypeList) String() string { @@ -21564,7 +21550,7 @@ func (*AcceleratorTypeList) ProtoMessage() {} func (x *AcceleratorTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21634,11 +21620,9 @@ type AcceleratorTypesScopedList struct { func (x *AcceleratorTypesScopedList) Reset() { *x = AcceleratorTypesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorTypesScopedList) String() string { @@ -21649,7 +21633,7 @@ func (*AcceleratorTypesScopedList) ProtoMessage() {} func (x *AcceleratorTypesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21691,11 +21675,9 @@ type Accelerators struct { func (x *Accelerators) Reset() { *x = Accelerators{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Accelerators) String() string { @@ -21706,7 +21688,7 @@ func (*Accelerators) ProtoMessage() {} func (x *Accelerators) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21767,11 +21749,9 @@ type AccessConfig struct { func (x *AccessConfig) Reset() { *x = AccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessConfig) String() string { @@ -21782,7 +21762,7 @@ func (*AccessConfig) ProtoMessage() {} func (x *AccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21889,11 +21869,9 @@ type AddAccessConfigInstanceRequest struct { func (x *AddAccessConfigInstanceRequest) Reset() { *x = AddAccessConfigInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddAccessConfigInstanceRequest) String() string { @@ -21904,7 +21882,7 @@ func (*AddAccessConfigInstanceRequest) ProtoMessage() {} func (x *AddAccessConfigInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21979,11 +21957,9 @@ type AddAssociationFirewallPolicyRequest struct { func (x *AddAssociationFirewallPolicyRequest) Reset() { *x = AddAssociationFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddAssociationFirewallPolicyRequest) String() string { @@ -21994,7 +21970,7 @@ func (*AddAssociationFirewallPolicyRequest) ProtoMessage() {} func (x *AddAssociationFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22057,11 +22033,9 @@ type AddAssociationNetworkFirewallPolicyRequest struct { func (x *AddAssociationNetworkFirewallPolicyRequest) Reset() { *x = AddAssociationNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddAssociationNetworkFirewallPolicyRequest) String() string { @@ -22072,7 +22046,7 @@ func (*AddAssociationNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *AddAssociationNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22144,11 +22118,9 @@ type AddAssociationRegionNetworkFirewallPolicyRequest struct { func (x *AddAssociationRegionNetworkFirewallPolicyRequest) Reset() { *x = AddAssociationRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddAssociationRegionNetworkFirewallPolicyRequest) String() string { @@ -22159,7 +22131,7 @@ func (*AddAssociationRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *AddAssociationRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22236,11 +22208,9 @@ type AddHealthCheckTargetPoolRequest struct { func (x *AddHealthCheckTargetPoolRequest) Reset() { *x = AddHealthCheckTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddHealthCheckTargetPoolRequest) String() string { @@ -22251,7 +22221,7 @@ func (*AddHealthCheckTargetPoolRequest) ProtoMessage() {} func (x *AddHealthCheckTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22321,11 +22291,9 @@ type AddInstanceTargetPoolRequest struct { func (x *AddInstanceTargetPoolRequest) Reset() { *x = AddInstanceTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddInstanceTargetPoolRequest) String() string { @@ -22336,7 +22304,7 @@ func (*AddInstanceTargetPoolRequest) ProtoMessage() {} func (x *AddInstanceTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22406,11 +22374,9 @@ type AddInstancesInstanceGroupRequest struct { func (x *AddInstancesInstanceGroupRequest) Reset() { *x = AddInstancesInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddInstancesInstanceGroupRequest) String() string { @@ -22421,7 +22387,7 @@ func (*AddInstancesInstanceGroupRequest) ProtoMessage() {} func (x *AddInstancesInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22491,11 +22457,9 @@ type AddNodesNodeGroupRequest struct { func (x *AddNodesNodeGroupRequest) Reset() { *x = AddNodesNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddNodesNodeGroupRequest) String() string { @@ -22506,7 +22470,7 @@ func (*AddNodesNodeGroupRequest) ProtoMessage() {} func (x *AddNodesNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22574,11 +22538,9 @@ type AddPeeringNetworkRequest struct { func (x *AddPeeringNetworkRequest) Reset() { *x = AddPeeringNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddPeeringNetworkRequest) String() string { @@ -22589,7 +22551,7 @@ func (*AddPeeringNetworkRequest) ProtoMessage() {} func (x *AddPeeringNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22652,11 +22614,9 @@ type AddResourcePoliciesDiskRequest struct { func (x *AddResourcePoliciesDiskRequest) Reset() { *x = AddResourcePoliciesDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddResourcePoliciesDiskRequest) String() string { @@ -22667,7 +22627,7 @@ func (*AddResourcePoliciesDiskRequest) ProtoMessage() {} func (x *AddResourcePoliciesDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22737,11 +22697,9 @@ type AddResourcePoliciesInstanceRequest struct { func (x *AddResourcePoliciesInstanceRequest) Reset() { *x = AddResourcePoliciesInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddResourcePoliciesInstanceRequest) String() string { @@ -22752,7 +22710,7 @@ func (*AddResourcePoliciesInstanceRequest) ProtoMessage() {} func (x *AddResourcePoliciesInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22822,11 +22780,9 @@ type AddResourcePoliciesRegionDiskRequest struct { func (x *AddResourcePoliciesRegionDiskRequest) Reset() { *x = AddResourcePoliciesRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddResourcePoliciesRegionDiskRequest) String() string { @@ -22837,7 +22793,7 @@ func (*AddResourcePoliciesRegionDiskRequest) ProtoMessage() {} func (x *AddResourcePoliciesRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22903,11 +22859,9 @@ type AddRuleFirewallPolicyRequest struct { func (x *AddRuleFirewallPolicyRequest) Reset() { *x = AddRuleFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRuleFirewallPolicyRequest) String() string { @@ -22918,7 +22872,7 @@ func (*AddRuleFirewallPolicyRequest) ProtoMessage() {} func (x *AddRuleFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22976,11 +22930,9 @@ type AddRuleNetworkFirewallPolicyRequest struct { func (x *AddRuleNetworkFirewallPolicyRequest) Reset() { *x = AddRuleNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRuleNetworkFirewallPolicyRequest) String() string { @@ -22991,7 +22943,7 @@ func (*AddRuleNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *AddRuleNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23072,11 +23024,9 @@ type AddRuleRegionNetworkFirewallPolicyRequest struct { func (x *AddRuleRegionNetworkFirewallPolicyRequest) Reset() { *x = AddRuleRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRuleRegionNetworkFirewallPolicyRequest) String() string { @@ -23087,7 +23037,7 @@ func (*AddRuleRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *AddRuleRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23171,11 +23121,9 @@ type AddRuleRegionSecurityPolicyRequest struct { func (x *AddRuleRegionSecurityPolicyRequest) Reset() { *x = AddRuleRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRuleRegionSecurityPolicyRequest) String() string { @@ -23186,7 +23134,7 @@ func (*AddRuleRegionSecurityPolicyRequest) ProtoMessage() {} func (x *AddRuleRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23254,11 +23202,9 @@ type AddRuleSecurityPolicyRequest struct { func (x *AddRuleSecurityPolicyRequest) Reset() { *x = AddRuleSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRuleSecurityPolicyRequest) String() string { @@ -23269,7 +23215,7 @@ func (*AddRuleSecurityPolicyRequest) ProtoMessage() {} func (x *AddRuleSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23330,11 +23276,9 @@ type AddSignedUrlKeyBackendBucketRequest struct { func (x *AddSignedUrlKeyBackendBucketRequest) Reset() { *x = AddSignedUrlKeyBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddSignedUrlKeyBackendBucketRequest) String() string { @@ -23345,7 +23289,7 @@ func (*AddSignedUrlKeyBackendBucketRequest) ProtoMessage() {} func (x *AddSignedUrlKeyBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23406,11 +23350,9 @@ type AddSignedUrlKeyBackendServiceRequest struct { func (x *AddSignedUrlKeyBackendServiceRequest) Reset() { *x = AddSignedUrlKeyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddSignedUrlKeyBackendServiceRequest) String() string { @@ -23421,7 +23363,7 @@ func (*AddSignedUrlKeyBackendServiceRequest) ProtoMessage() {} func (x *AddSignedUrlKeyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23520,11 +23462,9 @@ type Address struct { func (x *Address) Reset() { *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Address) String() string { @@ -23535,7 +23475,7 @@ func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23713,11 +23653,9 @@ type AddressAggregatedList struct { func (x *AddressAggregatedList) Reset() { *x = AddressAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressAggregatedList) String() string { @@ -23728,7 +23666,7 @@ func (*AddressAggregatedList) ProtoMessage() {} func (x *AddressAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23814,11 +23752,9 @@ type AddressList struct { func (x *AddressList) Reset() { *x = AddressList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressList) String() string { @@ -23829,7 +23765,7 @@ func (*AddressList) ProtoMessage() {} func (x *AddressList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23899,11 +23835,9 @@ type AddressesScopedList struct { func (x *AddressesScopedList) Reset() { *x = AddressesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressesScopedList) String() string { @@ -23914,7 +23848,7 @@ func (*AddressesScopedList) ProtoMessage() {} func (x *AddressesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23966,11 +23900,9 @@ type AdvancedMachineFeatures struct { func (x *AdvancedMachineFeatures) Reset() { *x = AdvancedMachineFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedMachineFeatures) String() string { @@ -23981,7 +23913,7 @@ func (*AdvancedMachineFeatures) ProtoMessage() {} func (x *AdvancedMachineFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24064,11 +23996,9 @@ type AggregatedListAcceleratorTypesRequest struct { func (x *AggregatedListAcceleratorTypesRequest) Reset() { *x = AggregatedListAcceleratorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListAcceleratorTypesRequest) String() string { @@ -24079,7 +24009,7 @@ func (*AggregatedListAcceleratorTypesRequest) ProtoMessage() {} func (x *AggregatedListAcceleratorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24176,11 +24106,9 @@ type AggregatedListAddressesRequest struct { func (x *AggregatedListAddressesRequest) Reset() { *x = AggregatedListAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListAddressesRequest) String() string { @@ -24191,7 +24119,7 @@ func (*AggregatedListAddressesRequest) ProtoMessage() {} func (x *AggregatedListAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24288,11 +24216,9 @@ type AggregatedListAutoscalersRequest struct { func (x *AggregatedListAutoscalersRequest) Reset() { *x = AggregatedListAutoscalersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListAutoscalersRequest) String() string { @@ -24303,7 +24229,7 @@ func (*AggregatedListAutoscalersRequest) ProtoMessage() {} func (x *AggregatedListAutoscalersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24400,11 +24326,9 @@ type AggregatedListBackendServicesRequest struct { func (x *AggregatedListBackendServicesRequest) Reset() { *x = AggregatedListBackendServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListBackendServicesRequest) String() string { @@ -24415,7 +24339,7 @@ func (*AggregatedListBackendServicesRequest) ProtoMessage() {} func (x *AggregatedListBackendServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24512,11 +24436,9 @@ type AggregatedListDiskTypesRequest struct { func (x *AggregatedListDiskTypesRequest) Reset() { *x = AggregatedListDiskTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListDiskTypesRequest) String() string { @@ -24527,7 +24449,7 @@ func (*AggregatedListDiskTypesRequest) ProtoMessage() {} func (x *AggregatedListDiskTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24624,11 +24546,9 @@ type AggregatedListDisksRequest struct { func (x *AggregatedListDisksRequest) Reset() { *x = AggregatedListDisksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListDisksRequest) String() string { @@ -24639,7 +24559,7 @@ func (*AggregatedListDisksRequest) ProtoMessage() {} func (x *AggregatedListDisksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24736,11 +24656,9 @@ type AggregatedListForwardingRulesRequest struct { func (x *AggregatedListForwardingRulesRequest) Reset() { *x = AggregatedListForwardingRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListForwardingRulesRequest) String() string { @@ -24751,7 +24669,7 @@ func (*AggregatedListForwardingRulesRequest) ProtoMessage() {} func (x *AggregatedListForwardingRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24848,11 +24766,9 @@ type AggregatedListGlobalOperationsRequest struct { func (x *AggregatedListGlobalOperationsRequest) Reset() { *x = AggregatedListGlobalOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListGlobalOperationsRequest) String() string { @@ -24863,7 +24779,7 @@ func (*AggregatedListGlobalOperationsRequest) ProtoMessage() {} func (x *AggregatedListGlobalOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24960,11 +24876,9 @@ type AggregatedListHealthChecksRequest struct { func (x *AggregatedListHealthChecksRequest) Reset() { *x = AggregatedListHealthChecksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListHealthChecksRequest) String() string { @@ -24975,7 +24889,7 @@ func (*AggregatedListHealthChecksRequest) ProtoMessage() {} func (x *AggregatedListHealthChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25072,11 +24986,9 @@ type AggregatedListInstanceGroupManagersRequest struct { func (x *AggregatedListInstanceGroupManagersRequest) Reset() { *x = AggregatedListInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInstanceGroupManagersRequest) String() string { @@ -25087,7 +24999,7 @@ func (*AggregatedListInstanceGroupManagersRequest) ProtoMessage() {} func (x *AggregatedListInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25184,11 +25096,9 @@ type AggregatedListInstanceGroupsRequest struct { func (x *AggregatedListInstanceGroupsRequest) Reset() { *x = AggregatedListInstanceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInstanceGroupsRequest) String() string { @@ -25199,7 +25109,7 @@ func (*AggregatedListInstanceGroupsRequest) ProtoMessage() {} func (x *AggregatedListInstanceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25296,11 +25206,9 @@ type AggregatedListInstanceTemplatesRequest struct { func (x *AggregatedListInstanceTemplatesRequest) Reset() { *x = AggregatedListInstanceTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInstanceTemplatesRequest) String() string { @@ -25311,7 +25219,7 @@ func (*AggregatedListInstanceTemplatesRequest) ProtoMessage() {} func (x *AggregatedListInstanceTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25408,11 +25316,9 @@ type AggregatedListInstancesRequest struct { func (x *AggregatedListInstancesRequest) Reset() { *x = AggregatedListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInstancesRequest) String() string { @@ -25423,7 +25329,7 @@ func (*AggregatedListInstancesRequest) ProtoMessage() {} func (x *AggregatedListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25520,11 +25426,9 @@ type AggregatedListInstantSnapshotsRequest struct { func (x *AggregatedListInstantSnapshotsRequest) Reset() { *x = AggregatedListInstantSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInstantSnapshotsRequest) String() string { @@ -25535,7 +25439,7 @@ func (*AggregatedListInstantSnapshotsRequest) ProtoMessage() {} func (x *AggregatedListInstantSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25632,11 +25536,9 @@ type AggregatedListInterconnectAttachmentsRequest struct { func (x *AggregatedListInterconnectAttachmentsRequest) Reset() { *x = AggregatedListInterconnectAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListInterconnectAttachmentsRequest) String() string { @@ -25647,7 +25549,7 @@ func (*AggregatedListInterconnectAttachmentsRequest) ProtoMessage() {} func (x *AggregatedListInterconnectAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25744,11 +25646,9 @@ type AggregatedListMachineTypesRequest struct { func (x *AggregatedListMachineTypesRequest) Reset() { *x = AggregatedListMachineTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListMachineTypesRequest) String() string { @@ -25759,7 +25659,7 @@ func (*AggregatedListMachineTypesRequest) ProtoMessage() {} func (x *AggregatedListMachineTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25856,11 +25756,9 @@ type AggregatedListNetworkAttachmentsRequest struct { func (x *AggregatedListNetworkAttachmentsRequest) Reset() { *x = AggregatedListNetworkAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNetworkAttachmentsRequest) String() string { @@ -25871,7 +25769,7 @@ func (*AggregatedListNetworkAttachmentsRequest) ProtoMessage() {} func (x *AggregatedListNetworkAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25968,11 +25866,9 @@ type AggregatedListNetworkEdgeSecurityServicesRequest struct { func (x *AggregatedListNetworkEdgeSecurityServicesRequest) Reset() { *x = AggregatedListNetworkEdgeSecurityServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNetworkEdgeSecurityServicesRequest) String() string { @@ -25983,7 +25879,7 @@ func (*AggregatedListNetworkEdgeSecurityServicesRequest) ProtoMessage() {} func (x *AggregatedListNetworkEdgeSecurityServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26080,11 +25976,9 @@ type AggregatedListNetworkEndpointGroupsRequest struct { func (x *AggregatedListNetworkEndpointGroupsRequest) Reset() { *x = AggregatedListNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNetworkEndpointGroupsRequest) String() string { @@ -26095,7 +25989,7 @@ func (*AggregatedListNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *AggregatedListNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26192,11 +26086,9 @@ type AggregatedListNodeGroupsRequest struct { func (x *AggregatedListNodeGroupsRequest) Reset() { *x = AggregatedListNodeGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNodeGroupsRequest) String() string { @@ -26207,7 +26099,7 @@ func (*AggregatedListNodeGroupsRequest) ProtoMessage() {} func (x *AggregatedListNodeGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26304,11 +26196,9 @@ type AggregatedListNodeTemplatesRequest struct { func (x *AggregatedListNodeTemplatesRequest) Reset() { *x = AggregatedListNodeTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNodeTemplatesRequest) String() string { @@ -26319,7 +26209,7 @@ func (*AggregatedListNodeTemplatesRequest) ProtoMessage() {} func (x *AggregatedListNodeTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26416,11 +26306,9 @@ type AggregatedListNodeTypesRequest struct { func (x *AggregatedListNodeTypesRequest) Reset() { *x = AggregatedListNodeTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListNodeTypesRequest) String() string { @@ -26431,7 +26319,7 @@ func (*AggregatedListNodeTypesRequest) ProtoMessage() {} func (x *AggregatedListNodeTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26528,11 +26416,9 @@ type AggregatedListPacketMirroringsRequest struct { func (x *AggregatedListPacketMirroringsRequest) Reset() { *x = AggregatedListPacketMirroringsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListPacketMirroringsRequest) String() string { @@ -26543,7 +26429,7 @@ func (*AggregatedListPacketMirroringsRequest) ProtoMessage() {} func (x *AggregatedListPacketMirroringsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26640,11 +26526,9 @@ type AggregatedListPublicDelegatedPrefixesRequest struct { func (x *AggregatedListPublicDelegatedPrefixesRequest) Reset() { *x = AggregatedListPublicDelegatedPrefixesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListPublicDelegatedPrefixesRequest) String() string { @@ -26655,7 +26539,7 @@ func (*AggregatedListPublicDelegatedPrefixesRequest) ProtoMessage() {} func (x *AggregatedListPublicDelegatedPrefixesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26752,11 +26636,9 @@ type AggregatedListRegionCommitmentsRequest struct { func (x *AggregatedListRegionCommitmentsRequest) Reset() { *x = AggregatedListRegionCommitmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListRegionCommitmentsRequest) String() string { @@ -26767,7 +26649,7 @@ func (*AggregatedListRegionCommitmentsRequest) ProtoMessage() {} func (x *AggregatedListRegionCommitmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26864,11 +26746,9 @@ type AggregatedListReservationsRequest struct { func (x *AggregatedListReservationsRequest) Reset() { *x = AggregatedListReservationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListReservationsRequest) String() string { @@ -26879,7 +26759,7 @@ func (*AggregatedListReservationsRequest) ProtoMessage() {} func (x *AggregatedListReservationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26976,11 +26856,9 @@ type AggregatedListResourcePoliciesRequest struct { func (x *AggregatedListResourcePoliciesRequest) Reset() { *x = AggregatedListResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListResourcePoliciesRequest) String() string { @@ -26991,7 +26869,7 @@ func (*AggregatedListResourcePoliciesRequest) ProtoMessage() {} func (x *AggregatedListResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27088,11 +26966,9 @@ type AggregatedListRoutersRequest struct { func (x *AggregatedListRoutersRequest) Reset() { *x = AggregatedListRoutersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListRoutersRequest) String() string { @@ -27103,7 +26979,7 @@ func (*AggregatedListRoutersRequest) ProtoMessage() {} func (x *AggregatedListRoutersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27200,11 +27076,9 @@ type AggregatedListSecurityPoliciesRequest struct { func (x *AggregatedListSecurityPoliciesRequest) Reset() { *x = AggregatedListSecurityPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListSecurityPoliciesRequest) String() string { @@ -27215,7 +27089,7 @@ func (*AggregatedListSecurityPoliciesRequest) ProtoMessage() {} func (x *AggregatedListSecurityPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27312,11 +27186,9 @@ type AggregatedListServiceAttachmentsRequest struct { func (x *AggregatedListServiceAttachmentsRequest) Reset() { *x = AggregatedListServiceAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListServiceAttachmentsRequest) String() string { @@ -27327,7 +27199,7 @@ func (*AggregatedListServiceAttachmentsRequest) ProtoMessage() {} func (x *AggregatedListServiceAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27424,11 +27296,9 @@ type AggregatedListSslCertificatesRequest struct { func (x *AggregatedListSslCertificatesRequest) Reset() { *x = AggregatedListSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListSslCertificatesRequest) String() string { @@ -27439,7 +27309,7 @@ func (*AggregatedListSslCertificatesRequest) ProtoMessage() {} func (x *AggregatedListSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27536,11 +27406,9 @@ type AggregatedListSslPoliciesRequest struct { func (x *AggregatedListSslPoliciesRequest) Reset() { *x = AggregatedListSslPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListSslPoliciesRequest) String() string { @@ -27551,7 +27419,7 @@ func (*AggregatedListSslPoliciesRequest) ProtoMessage() {} func (x *AggregatedListSslPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27648,11 +27516,9 @@ type AggregatedListStoragePoolTypesRequest struct { func (x *AggregatedListStoragePoolTypesRequest) Reset() { *x = AggregatedListStoragePoolTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListStoragePoolTypesRequest) String() string { @@ -27663,7 +27529,7 @@ func (*AggregatedListStoragePoolTypesRequest) ProtoMessage() {} func (x *AggregatedListStoragePoolTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27760,11 +27626,9 @@ type AggregatedListStoragePoolsRequest struct { func (x *AggregatedListStoragePoolsRequest) Reset() { *x = AggregatedListStoragePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListStoragePoolsRequest) String() string { @@ -27775,7 +27639,7 @@ func (*AggregatedListStoragePoolsRequest) ProtoMessage() {} func (x *AggregatedListStoragePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27872,11 +27736,9 @@ type AggregatedListSubnetworksRequest struct { func (x *AggregatedListSubnetworksRequest) Reset() { *x = AggregatedListSubnetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListSubnetworksRequest) String() string { @@ -27887,7 +27749,7 @@ func (*AggregatedListSubnetworksRequest) ProtoMessage() {} func (x *AggregatedListSubnetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27984,11 +27846,9 @@ type AggregatedListTargetHttpProxiesRequest struct { func (x *AggregatedListTargetHttpProxiesRequest) Reset() { *x = AggregatedListTargetHttpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetHttpProxiesRequest) String() string { @@ -27999,7 +27859,7 @@ func (*AggregatedListTargetHttpProxiesRequest) ProtoMessage() {} func (x *AggregatedListTargetHttpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28096,11 +27956,9 @@ type AggregatedListTargetHttpsProxiesRequest struct { func (x *AggregatedListTargetHttpsProxiesRequest) Reset() { *x = AggregatedListTargetHttpsProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetHttpsProxiesRequest) String() string { @@ -28111,7 +27969,7 @@ func (*AggregatedListTargetHttpsProxiesRequest) ProtoMessage() {} func (x *AggregatedListTargetHttpsProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28208,11 +28066,9 @@ type AggregatedListTargetInstancesRequest struct { func (x *AggregatedListTargetInstancesRequest) Reset() { *x = AggregatedListTargetInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetInstancesRequest) String() string { @@ -28223,7 +28079,7 @@ func (*AggregatedListTargetInstancesRequest) ProtoMessage() {} func (x *AggregatedListTargetInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28320,11 +28176,9 @@ type AggregatedListTargetPoolsRequest struct { func (x *AggregatedListTargetPoolsRequest) Reset() { *x = AggregatedListTargetPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetPoolsRequest) String() string { @@ -28335,7 +28189,7 @@ func (*AggregatedListTargetPoolsRequest) ProtoMessage() {} func (x *AggregatedListTargetPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28432,11 +28286,9 @@ type AggregatedListTargetTcpProxiesRequest struct { func (x *AggregatedListTargetTcpProxiesRequest) Reset() { *x = AggregatedListTargetTcpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetTcpProxiesRequest) String() string { @@ -28447,7 +28299,7 @@ func (*AggregatedListTargetTcpProxiesRequest) ProtoMessage() {} func (x *AggregatedListTargetTcpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28544,11 +28396,9 @@ type AggregatedListTargetVpnGatewaysRequest struct { func (x *AggregatedListTargetVpnGatewaysRequest) Reset() { *x = AggregatedListTargetVpnGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListTargetVpnGatewaysRequest) String() string { @@ -28559,7 +28409,7 @@ func (*AggregatedListTargetVpnGatewaysRequest) ProtoMessage() {} func (x *AggregatedListTargetVpnGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28656,11 +28506,9 @@ type AggregatedListUrlMapsRequest struct { func (x *AggregatedListUrlMapsRequest) Reset() { *x = AggregatedListUrlMapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListUrlMapsRequest) String() string { @@ -28671,7 +28519,7 @@ func (*AggregatedListUrlMapsRequest) ProtoMessage() {} func (x *AggregatedListUrlMapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28768,11 +28616,9 @@ type AggregatedListVpnGatewaysRequest struct { func (x *AggregatedListVpnGatewaysRequest) Reset() { *x = AggregatedListVpnGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListVpnGatewaysRequest) String() string { @@ -28783,7 +28629,7 @@ func (*AggregatedListVpnGatewaysRequest) ProtoMessage() {} func (x *AggregatedListVpnGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28880,11 +28726,9 @@ type AggregatedListVpnTunnelsRequest struct { func (x *AggregatedListVpnTunnelsRequest) Reset() { *x = AggregatedListVpnTunnelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedListVpnTunnelsRequest) String() string { @@ -28895,7 +28739,7 @@ func (*AggregatedListVpnTunnelsRequest) ProtoMessage() {} func (x *AggregatedListVpnTunnelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28980,11 +28824,9 @@ type AliasIpRange struct { func (x *AliasIpRange) Reset() { *x = AliasIpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AliasIpRange) String() string { @@ -28995,7 +28837,7 @@ func (*AliasIpRange) ProtoMessage() {} func (x *AliasIpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29044,11 +28886,9 @@ type AllocationAggregateReservation struct { func (x *AllocationAggregateReservation) Reset() { *x = AllocationAggregateReservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationAggregateReservation) String() string { @@ -29059,7 +28899,7 @@ func (*AllocationAggregateReservation) ProtoMessage() {} func (x *AllocationAggregateReservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29113,11 +28953,9 @@ type AllocationAggregateReservationReservedResourceInfo struct { func (x *AllocationAggregateReservationReservedResourceInfo) Reset() { *x = AllocationAggregateReservationReservedResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationAggregateReservationReservedResourceInfo) String() string { @@ -29128,7 +28966,7 @@ func (*AllocationAggregateReservationReservedResourceInfo) ProtoMessage() {} func (x *AllocationAggregateReservationReservedResourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29163,11 +29001,9 @@ type AllocationAggregateReservationReservedResourceInfoAccelerator struct { func (x *AllocationAggregateReservationReservedResourceInfoAccelerator) Reset() { *x = AllocationAggregateReservationReservedResourceInfoAccelerator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationAggregateReservationReservedResourceInfoAccelerator) String() string { @@ -29178,7 +29014,7 @@ func (*AllocationAggregateReservationReservedResourceInfoAccelerator) ProtoMessa func (x *AllocationAggregateReservationReservedResourceInfoAccelerator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29219,11 +29055,9 @@ type AllocationResourceStatus struct { func (x *AllocationResourceStatus) Reset() { *x = AllocationResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationResourceStatus) String() string { @@ -29234,7 +29068,7 @@ func (*AllocationResourceStatus) ProtoMessage() {} func (x *AllocationResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29268,11 +29102,9 @@ type AllocationResourceStatusSpecificSKUAllocation struct { func (x *AllocationResourceStatusSpecificSKUAllocation) Reset() { *x = AllocationResourceStatusSpecificSKUAllocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationResourceStatusSpecificSKUAllocation) String() string { @@ -29283,7 +29115,7 @@ func (*AllocationResourceStatusSpecificSKUAllocation) ProtoMessage() {} func (x *AllocationResourceStatusSpecificSKUAllocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29319,11 +29151,9 @@ type AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk stru func (x *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) Reset() { *x = AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) String() string { @@ -29334,7 +29164,7 @@ func (*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) P func (x *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29383,11 +29213,9 @@ type AllocationSpecificSKUAllocationReservedInstanceProperties struct { func (x *AllocationSpecificSKUAllocationReservedInstanceProperties) Reset() { *x = AllocationSpecificSKUAllocationReservedInstanceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationSpecificSKUAllocationReservedInstanceProperties) String() string { @@ -29398,7 +29226,7 @@ func (*AllocationSpecificSKUAllocationReservedInstanceProperties) ProtoMessage() func (x *AllocationSpecificSKUAllocationReservedInstanceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29468,11 +29296,9 @@ type AllocationSpecificSKUReservation struct { func (x *AllocationSpecificSKUReservation) Reset() { *x = AllocationSpecificSKUReservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationSpecificSKUReservation) String() string { @@ -29483,7 +29309,7 @@ func (*AllocationSpecificSKUReservation) ProtoMessage() {} func (x *AllocationSpecificSKUReservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29546,11 +29372,9 @@ type Allowed struct { func (x *Allowed) Reset() { *x = Allowed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Allowed) String() string { @@ -29561,7 +29385,7 @@ func (*Allowed) ProtoMessage() {} func (x *Allowed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29606,11 +29430,9 @@ type AnnouncePublicAdvertisedPrefixeRequest struct { func (x *AnnouncePublicAdvertisedPrefixeRequest) Reset() { *x = AnnouncePublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnouncePublicAdvertisedPrefixeRequest) String() string { @@ -29621,7 +29443,7 @@ func (*AnnouncePublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *AnnouncePublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29675,11 +29497,9 @@ type AnnouncePublicDelegatedPrefixeRequest struct { func (x *AnnouncePublicDelegatedPrefixeRequest) Reset() { *x = AnnouncePublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnouncePublicDelegatedPrefixeRequest) String() string { @@ -29690,7 +29510,7 @@ func (*AnnouncePublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *AnnouncePublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29751,11 +29571,9 @@ type ApplyUpdatesToInstancesInstanceGroupManagerRequest struct { func (x *ApplyUpdatesToInstancesInstanceGroupManagerRequest) Reset() { *x = ApplyUpdatesToInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyUpdatesToInstancesInstanceGroupManagerRequest) String() string { @@ -29766,7 +29584,7 @@ func (*ApplyUpdatesToInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *ApplyUpdatesToInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29827,11 +29645,9 @@ type ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest struct { func (x *ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest) Reset() { *x = ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest) String() string { @@ -29842,7 +29658,7 @@ func (*ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest) ProtoMessage() func (x *ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29907,11 +29723,9 @@ type AttachDiskInstanceRequest struct { func (x *AttachDiskInstanceRequest) Reset() { *x = AttachDiskInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachDiskInstanceRequest) String() string { @@ -29922,7 +29736,7 @@ func (*AttachDiskInstanceRequest) ProtoMessage() {} func (x *AttachDiskInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -29997,11 +29811,9 @@ type AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest struct { func (x *AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest) Reset() { *x = AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest) String() string { @@ -30012,7 +29824,7 @@ func (*AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest) ProtoMessage() { func (x *AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30075,11 +29887,9 @@ type AttachNetworkEndpointsNetworkEndpointGroupRequest struct { func (x *AttachNetworkEndpointsNetworkEndpointGroupRequest) Reset() { *x = AttachNetworkEndpointsNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachNetworkEndpointsNetworkEndpointGroupRequest) String() string { @@ -30090,7 +29900,7 @@ func (*AttachNetworkEndpointsNetworkEndpointGroupRequest) ProtoMessage() {} func (x *AttachNetworkEndpointsNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30160,11 +29970,9 @@ type AttachNetworkEndpointsRegionNetworkEndpointGroupRequest struct { func (x *AttachNetworkEndpointsRegionNetworkEndpointGroupRequest) Reset() { *x = AttachNetworkEndpointsRegionNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachNetworkEndpointsRegionNetworkEndpointGroupRequest) String() string { @@ -30175,7 +29983,7 @@ func (*AttachNetworkEndpointsRegionNetworkEndpointGroupRequest) ProtoMessage() { func (x *AttachNetworkEndpointsRegionNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30276,11 +30084,9 @@ type AttachedDisk struct { func (x *AttachedDisk) Reset() { *x = AttachedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedDisk) String() string { @@ -30291,7 +30097,7 @@ func (*AttachedDisk) ProtoMessage() {} func (x *AttachedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30482,11 +30288,9 @@ type AttachedDiskInitializeParams struct { func (x *AttachedDiskInitializeParams) Reset() { *x = AttachedDiskInitializeParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedDiskInitializeParams) String() string { @@ -30497,7 +30301,7 @@ func (*AttachedDiskInitializeParams) ProtoMessage() {} func (x *AttachedDiskInitializeParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30660,11 +30464,9 @@ type AuditConfig struct { func (x *AuditConfig) Reset() { *x = AuditConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditConfig) String() string { @@ -30675,7 +30477,7 @@ func (*AuditConfig) ProtoMessage() {} func (x *AuditConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30727,11 +30529,9 @@ type AuditLogConfig struct { func (x *AuditLogConfig) Reset() { *x = AuditLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditLogConfig) String() string { @@ -30742,7 +30542,7 @@ func (*AuditLogConfig) ProtoMessage() {} func (x *AuditLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30817,11 +30617,9 @@ type Autoscaler struct { func (x *Autoscaler) Reset() { *x = Autoscaler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Autoscaler) String() string { @@ -30832,7 +30630,7 @@ func (*Autoscaler) ProtoMessage() {} func (x *Autoscaler) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -30968,11 +30766,9 @@ type AutoscalerAggregatedList struct { func (x *AutoscalerAggregatedList) Reset() { *x = AutoscalerAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalerAggregatedList) String() string { @@ -30983,7 +30779,7 @@ func (*AutoscalerAggregatedList) ProtoMessage() {} func (x *AutoscalerAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31069,11 +30865,9 @@ type AutoscalerList struct { func (x *AutoscalerList) Reset() { *x = AutoscalerList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalerList) String() string { @@ -31084,7 +30878,7 @@ func (*AutoscalerList) ProtoMessage() {} func (x *AutoscalerList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31155,11 +30949,9 @@ type AutoscalerStatusDetails struct { func (x *AutoscalerStatusDetails) Reset() { *x = AutoscalerStatusDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalerStatusDetails) String() string { @@ -31170,7 +30962,7 @@ func (*AutoscalerStatusDetails) ProtoMessage() {} func (x *AutoscalerStatusDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31212,11 +31004,9 @@ type AutoscalersScopedList struct { func (x *AutoscalersScopedList) Reset() { *x = AutoscalersScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalersScopedList) String() string { @@ -31227,7 +31017,7 @@ func (*AutoscalersScopedList) ProtoMessage() {} func (x *AutoscalersScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31284,11 +31074,9 @@ type AutoscalingPolicy struct { func (x *AutoscalingPolicy) Reset() { *x = AutoscalingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicy) String() string { @@ -31299,7 +31087,7 @@ func (*AutoscalingPolicy) ProtoMessage() {} func (x *AutoscalingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31392,11 +31180,9 @@ type AutoscalingPolicyCpuUtilization struct { func (x *AutoscalingPolicyCpuUtilization) Reset() { *x = AutoscalingPolicyCpuUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicyCpuUtilization) String() string { @@ -31407,7 +31193,7 @@ func (*AutoscalingPolicyCpuUtilization) ProtoMessage() {} func (x *AutoscalingPolicyCpuUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31457,11 +31243,9 @@ type AutoscalingPolicyCustomMetricUtilization struct { func (x *AutoscalingPolicyCustomMetricUtilization) Reset() { *x = AutoscalingPolicyCustomMetricUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicyCustomMetricUtilization) String() string { @@ -31472,7 +31256,7 @@ func (*AutoscalingPolicyCustomMetricUtilization) ProtoMessage() {} func (x *AutoscalingPolicyCustomMetricUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31534,11 +31318,9 @@ type AutoscalingPolicyLoadBalancingUtilization struct { func (x *AutoscalingPolicyLoadBalancingUtilization) Reset() { *x = AutoscalingPolicyLoadBalancingUtilization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicyLoadBalancingUtilization) String() string { @@ -31549,7 +31331,7 @@ func (*AutoscalingPolicyLoadBalancingUtilization) ProtoMessage() {} func (x *AutoscalingPolicyLoadBalancingUtilization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31585,11 +31367,9 @@ type AutoscalingPolicyScaleInControl struct { func (x *AutoscalingPolicyScaleInControl) Reset() { *x = AutoscalingPolicyScaleInControl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicyScaleInControl) String() string { @@ -31600,7 +31380,7 @@ func (*AutoscalingPolicyScaleInControl) ProtoMessage() {} func (x *AutoscalingPolicyScaleInControl) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31651,11 +31431,9 @@ type AutoscalingPolicyScalingSchedule struct { func (x *AutoscalingPolicyScalingSchedule) Reset() { *x = AutoscalingPolicyScalingSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicyScalingSchedule) String() string { @@ -31666,7 +31444,7 @@ func (*AutoscalingPolicyScalingSchedule) ProtoMessage() {} func (x *AutoscalingPolicyScalingSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31761,11 +31539,9 @@ type Backend struct { func (x *Backend) Reset() { *x = Backend{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backend) String() string { @@ -31776,7 +31552,7 @@ func (*Backend) ProtoMessage() {} func (x *Backend) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -31919,11 +31695,9 @@ type BackendBucket struct { func (x *BackendBucket) Reset() { *x = BackendBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucket) String() string { @@ -31934,7 +31708,7 @@ func (*BackendBucket) ProtoMessage() {} func (x *BackendBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32075,11 +31849,9 @@ type BackendBucketCdnPolicy struct { func (x *BackendBucketCdnPolicy) Reset() { *x = BackendBucketCdnPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketCdnPolicy) String() string { @@ -32090,7 +31862,7 @@ func (*BackendBucketCdnPolicy) ProtoMessage() {} func (x *BackendBucketCdnPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32201,11 +31973,9 @@ type BackendBucketCdnPolicyBypassCacheOnRequestHeader struct { func (x *BackendBucketCdnPolicyBypassCacheOnRequestHeader) Reset() { *x = BackendBucketCdnPolicyBypassCacheOnRequestHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketCdnPolicyBypassCacheOnRequestHeader) String() string { @@ -32216,7 +31986,7 @@ func (*BackendBucketCdnPolicyBypassCacheOnRequestHeader) ProtoMessage() {} func (x *BackendBucketCdnPolicyBypassCacheOnRequestHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32252,11 +32022,9 @@ type BackendBucketCdnPolicyCacheKeyPolicy struct { func (x *BackendBucketCdnPolicyCacheKeyPolicy) Reset() { *x = BackendBucketCdnPolicyCacheKeyPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketCdnPolicyCacheKeyPolicy) String() string { @@ -32267,7 +32035,7 @@ func (*BackendBucketCdnPolicyCacheKeyPolicy) ProtoMessage() {} func (x *BackendBucketCdnPolicyCacheKeyPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32310,11 +32078,9 @@ type BackendBucketCdnPolicyNegativeCachingPolicy struct { func (x *BackendBucketCdnPolicyNegativeCachingPolicy) Reset() { *x = BackendBucketCdnPolicyNegativeCachingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketCdnPolicyNegativeCachingPolicy) String() string { @@ -32325,7 +32091,7 @@ func (*BackendBucketCdnPolicyNegativeCachingPolicy) ProtoMessage() {} func (x *BackendBucketCdnPolicyNegativeCachingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32376,11 +32142,9 @@ type BackendBucketList struct { func (x *BackendBucketList) Reset() { *x = BackendBucketList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketList) String() string { @@ -32391,7 +32155,7 @@ func (*BackendBucketList) ProtoMessage() {} func (x *BackendBucketList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32459,11 +32223,9 @@ type BackendBucketUsedBy struct { func (x *BackendBucketUsedBy) Reset() { *x = BackendBucketUsedBy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendBucketUsedBy) String() string { @@ -32474,7 +32236,7 @@ func (*BackendBucketUsedBy) ProtoMessage() {} func (x *BackendBucketUsedBy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32597,11 +32359,9 @@ type BackendService struct { func (x *BackendService) Reset() { *x = BackendService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendService) String() string { @@ -32612,7 +32372,7 @@ func (*BackendService) ProtoMessage() {} func (x *BackendService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -32959,11 +32719,9 @@ type BackendServiceAggregatedList struct { func (x *BackendServiceAggregatedList) Reset() { *x = BackendServiceAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceAggregatedList) String() string { @@ -32974,7 +32732,7 @@ func (*BackendServiceAggregatedList) ProtoMessage() {} func (x *BackendServiceAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33073,11 +32831,9 @@ type BackendServiceCdnPolicy struct { func (x *BackendServiceCdnPolicy) Reset() { *x = BackendServiceCdnPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceCdnPolicy) String() string { @@ -33088,7 +32844,7 @@ func (*BackendServiceCdnPolicy) ProtoMessage() {} func (x *BackendServiceCdnPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33199,11 +32955,9 @@ type BackendServiceCdnPolicyBypassCacheOnRequestHeader struct { func (x *BackendServiceCdnPolicyBypassCacheOnRequestHeader) Reset() { *x = BackendServiceCdnPolicyBypassCacheOnRequestHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceCdnPolicyBypassCacheOnRequestHeader) String() string { @@ -33214,7 +32968,7 @@ func (*BackendServiceCdnPolicyBypassCacheOnRequestHeader) ProtoMessage() {} func (x *BackendServiceCdnPolicyBypassCacheOnRequestHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33250,11 +33004,9 @@ type BackendServiceCdnPolicyNegativeCachingPolicy struct { func (x *BackendServiceCdnPolicyNegativeCachingPolicy) Reset() { *x = BackendServiceCdnPolicyNegativeCachingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceCdnPolicyNegativeCachingPolicy) String() string { @@ -33265,7 +33017,7 @@ func (*BackendServiceCdnPolicyNegativeCachingPolicy) ProtoMessage() {} func (x *BackendServiceCdnPolicyNegativeCachingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33314,11 +33066,9 @@ type BackendServiceConnectionTrackingPolicy struct { func (x *BackendServiceConnectionTrackingPolicy) Reset() { *x = BackendServiceConnectionTrackingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceConnectionTrackingPolicy) String() string { @@ -33329,7 +33079,7 @@ func (*BackendServiceConnectionTrackingPolicy) ProtoMessage() {} func (x *BackendServiceConnectionTrackingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33388,11 +33138,9 @@ type BackendServiceFailoverPolicy struct { func (x *BackendServiceFailoverPolicy) Reset() { *x = BackendServiceFailoverPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceFailoverPolicy) String() string { @@ -33403,7 +33151,7 @@ func (*BackendServiceFailoverPolicy) ProtoMessage() {} func (x *BackendServiceFailoverPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33454,11 +33202,9 @@ type BackendServiceGroupHealth struct { func (x *BackendServiceGroupHealth) Reset() { *x = BackendServiceGroupHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceGroupHealth) String() string { @@ -33469,7 +33215,7 @@ func (*BackendServiceGroupHealth) ProtoMessage() {} func (x *BackendServiceGroupHealth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33521,11 +33267,9 @@ type BackendServiceHttpCookie struct { func (x *BackendServiceHttpCookie) Reset() { *x = BackendServiceHttpCookie{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceHttpCookie) String() string { @@ -33536,7 +33280,7 @@ func (*BackendServiceHttpCookie) ProtoMessage() {} func (x *BackendServiceHttpCookie) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33590,11 +33334,9 @@ type BackendServiceIAP struct { func (x *BackendServiceIAP) Reset() { *x = BackendServiceIAP{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceIAP) String() string { @@ -33605,7 +33347,7 @@ func (*BackendServiceIAP) ProtoMessage() {} func (x *BackendServiceIAP) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33670,11 +33412,9 @@ type BackendServiceList struct { func (x *BackendServiceList) Reset() { *x = BackendServiceList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceList) String() string { @@ -33685,7 +33425,7 @@ func (*BackendServiceList) ProtoMessage() {} func (x *BackendServiceList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33764,11 +33504,9 @@ type BackendServiceListUsable struct { func (x *BackendServiceListUsable) Reset() { *x = BackendServiceListUsable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceListUsable) String() string { @@ -33779,7 +33517,7 @@ func (*BackendServiceListUsable) ProtoMessage() {} func (x *BackendServiceListUsable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33848,11 +33586,9 @@ type BackendServiceLocalityLoadBalancingPolicyConfig struct { func (x *BackendServiceLocalityLoadBalancingPolicyConfig) Reset() { *x = BackendServiceLocalityLoadBalancingPolicyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceLocalityLoadBalancingPolicyConfig) String() string { @@ -33863,7 +33599,7 @@ func (*BackendServiceLocalityLoadBalancingPolicyConfig) ProtoMessage() {} func (x *BackendServiceLocalityLoadBalancingPolicyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33906,11 +33642,9 @@ type BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy struct { func (x *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) Reset() { *x = BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) String() string { @@ -33921,7 +33655,7 @@ func (*BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) ProtoMessage func (x *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -33963,11 +33697,9 @@ type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { func (x *BackendServiceLocalityLoadBalancingPolicyConfigPolicy) Reset() { *x = BackendServiceLocalityLoadBalancingPolicyConfigPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceLocalityLoadBalancingPolicyConfigPolicy) String() string { @@ -33978,7 +33710,7 @@ func (*BackendServiceLocalityLoadBalancingPolicyConfigPolicy) ProtoMessage() {} func (x *BackendServiceLocalityLoadBalancingPolicyConfigPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34019,11 +33751,9 @@ type BackendServiceLogConfig struct { func (x *BackendServiceLogConfig) Reset() { *x = BackendServiceLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceLogConfig) String() string { @@ -34034,7 +33764,7 @@ func (*BackendServiceLogConfig) ProtoMessage() {} func (x *BackendServiceLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34087,11 +33817,9 @@ type BackendServiceReference struct { func (x *BackendServiceReference) Reset() { *x = BackendServiceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceReference) String() string { @@ -34102,7 +33830,7 @@ func (*BackendServiceReference) ProtoMessage() {} func (x *BackendServiceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34135,11 +33863,9 @@ type BackendServiceUsedBy struct { func (x *BackendServiceUsedBy) Reset() { *x = BackendServiceUsedBy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServiceUsedBy) String() string { @@ -34150,7 +33876,7 @@ func (*BackendServiceUsedBy) ProtoMessage() {} func (x *BackendServiceUsedBy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34185,11 +33911,9 @@ type BackendServicesScopedList struct { func (x *BackendServicesScopedList) Reset() { *x = BackendServicesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendServicesScopedList) String() string { @@ -34200,7 +33924,7 @@ func (*BackendServicesScopedList) ProtoMessage() {} func (x *BackendServicesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34272,11 +33996,9 @@ type BfdPacket struct { func (x *BfdPacket) Reset() { *x = BfdPacket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BfdPacket) String() string { @@ -34287,7 +34009,7 @@ func (*BfdPacket) ProtoMessage() {} func (x *BfdPacket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34447,11 +34169,9 @@ type BfdStatus struct { func (x *BfdStatus) Reset() { *x = BfdStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BfdStatus) String() string { @@ -34462,7 +34182,7 @@ func (*BfdStatus) ProtoMessage() {} func (x *BfdStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34564,11 +34284,9 @@ type BfdStatusPacketCounts struct { func (x *BfdStatusPacketCounts) Reset() { *x = BfdStatusPacketCounts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BfdStatusPacketCounts) String() string { @@ -34579,7 +34297,7 @@ func (*BfdStatusPacketCounts) ProtoMessage() {} func (x *BfdStatusPacketCounts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34639,11 +34357,9 @@ type Binding struct { func (x *Binding) Reset() { *x = Binding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Binding) String() string { @@ -34654,7 +34370,7 @@ func (*Binding) ProtoMessage() {} func (x *Binding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34715,11 +34431,9 @@ type BulkInsertDiskRequest struct { func (x *BulkInsertDiskRequest) Reset() { *x = BulkInsertDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertDiskRequest) String() string { @@ -34730,7 +34444,7 @@ func (*BulkInsertDiskRequest) ProtoMessage() {} func (x *BulkInsertDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34785,11 +34499,9 @@ type BulkInsertDiskResource struct { func (x *BulkInsertDiskResource) Reset() { *x = BulkInsertDiskResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertDiskResource) String() string { @@ -34800,7 +34512,7 @@ func (*BulkInsertDiskResource) ProtoMessage() {} func (x *BulkInsertDiskResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34840,11 +34552,9 @@ type BulkInsertInstanceRequest struct { func (x *BulkInsertInstanceRequest) Reset() { *x = BulkInsertInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertInstanceRequest) String() string { @@ -34855,7 +34565,7 @@ func (*BulkInsertInstanceRequest) ProtoMessage() {} func (x *BulkInsertInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -34922,11 +34632,9 @@ type BulkInsertInstanceResource struct { func (x *BulkInsertInstanceResource) Reset() { *x = BulkInsertInstanceResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertInstanceResource) String() string { @@ -34937,7 +34645,7 @@ func (*BulkInsertInstanceResource) ProtoMessage() {} func (x *BulkInsertInstanceResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35015,11 +34723,9 @@ type BulkInsertInstanceResourcePerInstanceProperties struct { func (x *BulkInsertInstanceResourcePerInstanceProperties) Reset() { *x = BulkInsertInstanceResourcePerInstanceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertInstanceResourcePerInstanceProperties) String() string { @@ -35030,7 +34736,7 @@ func (*BulkInsertInstanceResourcePerInstanceProperties) ProtoMessage() {} func (x *BulkInsertInstanceResourcePerInstanceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35079,11 +34785,9 @@ type BulkInsertOperationStatus struct { func (x *BulkInsertOperationStatus) Reset() { *x = BulkInsertOperationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertOperationStatus) String() string { @@ -35094,7 +34798,7 @@ func (*BulkInsertOperationStatus) ProtoMessage() {} func (x *BulkInsertOperationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35162,11 +34866,9 @@ type BulkInsertRegionDiskRequest struct { func (x *BulkInsertRegionDiskRequest) Reset() { *x = BulkInsertRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertRegionDiskRequest) String() string { @@ -35177,7 +34879,7 @@ func (*BulkInsertRegionDiskRequest) ProtoMessage() {} func (x *BulkInsertRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35238,11 +34940,9 @@ type BulkInsertRegionInstanceRequest struct { func (x *BulkInsertRegionInstanceRequest) Reset() { *x = BulkInsertRegionInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkInsertRegionInstanceRequest) String() string { @@ -35253,7 +34953,7 @@ func (*BulkInsertRegionInstanceRequest) ProtoMessage() {} func (x *BulkInsertRegionInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35308,11 +35008,9 @@ type CacheInvalidationRule struct { func (x *CacheInvalidationRule) Reset() { *x = CacheInvalidationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CacheInvalidationRule) String() string { @@ -35323,7 +35021,7 @@ func (*CacheInvalidationRule) ProtoMessage() {} func (x *CacheInvalidationRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35376,11 +35074,9 @@ type CacheKeyPolicy struct { func (x *CacheKeyPolicy) Reset() { *x = CacheKeyPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CacheKeyPolicy) String() string { @@ -35391,7 +35087,7 @@ func (*CacheKeyPolicy) ProtoMessage() {} func (x *CacheKeyPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35475,11 +35171,9 @@ type CancelInstanceGroupManagerResizeRequestRequest struct { func (x *CancelInstanceGroupManagerResizeRequestRequest) Reset() { *x = CancelInstanceGroupManagerResizeRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelInstanceGroupManagerResizeRequestRequest) String() string { @@ -35490,7 +35184,7 @@ func (*CancelInstanceGroupManagerResizeRequestRequest) ProtoMessage() {} func (x *CancelInstanceGroupManagerResizeRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35560,11 +35254,9 @@ type CircuitBreakers struct { func (x *CircuitBreakers) Reset() { *x = CircuitBreakers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CircuitBreakers) String() string { @@ -35575,7 +35267,7 @@ func (*CircuitBreakers) ProtoMessage() {} func (x *CircuitBreakers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35641,11 +35333,9 @@ type CloneRulesFirewallPolicyRequest struct { func (x *CloneRulesFirewallPolicyRequest) Reset() { *x = CloneRulesFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloneRulesFirewallPolicyRequest) String() string { @@ -35656,7 +35346,7 @@ func (*CloneRulesFirewallPolicyRequest) ProtoMessage() {} func (x *CloneRulesFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35710,11 +35400,9 @@ type CloneRulesNetworkFirewallPolicyRequest struct { func (x *CloneRulesNetworkFirewallPolicyRequest) Reset() { *x = CloneRulesNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloneRulesNetworkFirewallPolicyRequest) String() string { @@ -35725,7 +35413,7 @@ func (*CloneRulesNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *CloneRulesNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35788,11 +35476,9 @@ type CloneRulesRegionNetworkFirewallPolicyRequest struct { func (x *CloneRulesRegionNetworkFirewallPolicyRequest) Reset() { *x = CloneRulesRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloneRulesRegionNetworkFirewallPolicyRequest) String() string { @@ -35803,7 +35489,7 @@ func (*CloneRulesRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *CloneRulesRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35913,11 +35599,9 @@ type Commitment struct { func (x *Commitment) Reset() { *x = Commitment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Commitment) String() string { @@ -35928,7 +35612,7 @@ func (*Commitment) ProtoMessage() {} func (x *Commitment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36127,11 +35811,9 @@ type CommitmentAggregatedList struct { func (x *CommitmentAggregatedList) Reset() { *x = CommitmentAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitmentAggregatedList) String() string { @@ -36142,7 +35824,7 @@ func (*CommitmentAggregatedList) ProtoMessage() {} func (x *CommitmentAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36228,11 +35910,9 @@ type CommitmentList struct { func (x *CommitmentList) Reset() { *x = CommitmentList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitmentList) String() string { @@ -36243,7 +35923,7 @@ func (*CommitmentList) ProtoMessage() {} func (x *CommitmentList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36312,11 +35992,9 @@ type CommitmentResourceStatus struct { func (x *CommitmentResourceStatus) Reset() { *x = CommitmentResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitmentResourceStatus) String() string { @@ -36327,7 +36005,7 @@ func (*CommitmentResourceStatus) ProtoMessage() {} func (x *CommitmentResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36362,11 +36040,9 @@ type CommitmentsScopedList struct { func (x *CommitmentsScopedList) Reset() { *x = CommitmentsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitmentsScopedList) String() string { @@ -36377,7 +36053,7 @@ func (*CommitmentsScopedList) ProtoMessage() {} func (x *CommitmentsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36421,11 +36097,9 @@ type ConfidentialInstanceConfig struct { func (x *ConfidentialInstanceConfig) Reset() { *x = ConfidentialInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfidentialInstanceConfig) String() string { @@ -36436,7 +36110,7 @@ func (*ConfidentialInstanceConfig) ProtoMessage() {} func (x *ConfidentialInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36477,11 +36151,9 @@ type ConnectionDraining struct { func (x *ConnectionDraining) Reset() { *x = ConnectionDraining{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionDraining) String() string { @@ -36492,7 +36164,7 @@ func (*ConnectionDraining) ProtoMessage() {} func (x *ConnectionDraining) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36530,11 +36202,9 @@ type ConsistentHashLoadBalancerSettings struct { func (x *ConsistentHashLoadBalancerSettings) Reset() { *x = ConsistentHashLoadBalancerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsistentHashLoadBalancerSettings) String() string { @@ -36545,7 +36215,7 @@ func (*ConsistentHashLoadBalancerSettings) ProtoMessage() {} func (x *ConsistentHashLoadBalancerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36597,11 +36267,9 @@ type ConsistentHashLoadBalancerSettingsHttpCookie struct { func (x *ConsistentHashLoadBalancerSettingsHttpCookie) Reset() { *x = ConsistentHashLoadBalancerSettingsHttpCookie{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsistentHashLoadBalancerSettingsHttpCookie) String() string { @@ -36612,7 +36280,7 @@ func (*ConsistentHashLoadBalancerSettingsHttpCookie) ProtoMessage() {} func (x *ConsistentHashLoadBalancerSettingsHttpCookie) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36674,11 +36342,9 @@ type CorsPolicy struct { func (x *CorsPolicy) Reset() { *x = CorsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorsPolicy) String() string { @@ -36689,7 +36355,7 @@ func (*CorsPolicy) ProtoMessage() {} func (x *CorsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36780,11 +36446,9 @@ type CreateInstancesInstanceGroupManagerRequest struct { func (x *CreateInstancesInstanceGroupManagerRequest) Reset() { *x = CreateInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstancesInstanceGroupManagerRequest) String() string { @@ -36795,7 +36459,7 @@ func (*CreateInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *CreateInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36865,11 +36529,9 @@ type CreateInstancesRegionInstanceGroupManagerRequest struct { func (x *CreateInstancesRegionInstanceGroupManagerRequest) Reset() { *x = CreateInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstancesRegionInstanceGroupManagerRequest) String() string { @@ -36880,7 +36542,7 @@ func (*CreateInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *CreateInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -36952,11 +36614,9 @@ type CreateSnapshotDiskRequest struct { func (x *CreateSnapshotDiskRequest) Reset() { *x = CreateSnapshotDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnapshotDiskRequest) String() string { @@ -36967,7 +36627,7 @@ func (*CreateSnapshotDiskRequest) ProtoMessage() {} func (x *CreateSnapshotDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37044,11 +36704,9 @@ type CreateSnapshotRegionDiskRequest struct { func (x *CreateSnapshotRegionDiskRequest) Reset() { *x = CreateSnapshotRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnapshotRegionDiskRequest) String() string { @@ -37059,7 +36717,7 @@ func (*CreateSnapshotRegionDiskRequest) ProtoMessage() {} func (x *CreateSnapshotRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37123,11 +36781,9 @@ type CustomErrorResponsePolicy struct { func (x *CustomErrorResponsePolicy) Reset() { *x = CustomErrorResponsePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomErrorResponsePolicy) String() string { @@ -37138,7 +36794,7 @@ func (*CustomErrorResponsePolicy) ProtoMessage() {} func (x *CustomErrorResponsePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37183,11 +36839,9 @@ type CustomErrorResponsePolicyCustomErrorResponseRule struct { func (x *CustomErrorResponsePolicyCustomErrorResponseRule) Reset() { *x = CustomErrorResponsePolicyCustomErrorResponseRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomErrorResponsePolicyCustomErrorResponseRule) String() string { @@ -37198,7 +36852,7 @@ func (*CustomErrorResponsePolicyCustomErrorResponseRule) ProtoMessage() {} func (x *CustomErrorResponsePolicyCustomErrorResponseRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37253,11 +36907,9 @@ type CustomerEncryptionKey struct { func (x *CustomerEncryptionKey) Reset() { *x = CustomerEncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerEncryptionKey) String() string { @@ -37268,7 +36920,7 @@ func (*CustomerEncryptionKey) ProtoMessage() {} func (x *CustomerEncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37331,11 +36983,9 @@ type CustomerEncryptionKeyProtectedDisk struct { func (x *CustomerEncryptionKeyProtectedDisk) Reset() { *x = CustomerEncryptionKeyProtectedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerEncryptionKeyProtectedDisk) String() string { @@ -37346,7 +36996,7 @@ func (*CustomerEncryptionKeyProtectedDisk) ProtoMessage() {} func (x *CustomerEncryptionKeyProtectedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37388,11 +37038,9 @@ type Data struct { func (x *Data) Reset() { *x = Data{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Data) String() string { @@ -37403,7 +37051,7 @@ func (*Data) ProtoMessage() {} func (x *Data) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37454,11 +37102,9 @@ type DeleteAccessConfigInstanceRequest struct { func (x *DeleteAccessConfigInstanceRequest) Reset() { *x = DeleteAccessConfigInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccessConfigInstanceRequest) String() string { @@ -37469,7 +37115,7 @@ func (*DeleteAccessConfigInstanceRequest) ProtoMessage() {} func (x *DeleteAccessConfigInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37544,11 +37190,9 @@ type DeleteAddressRequest struct { func (x *DeleteAddressRequest) Reset() { *x = DeleteAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAddressRequest) String() string { @@ -37559,7 +37203,7 @@ func (*DeleteAddressRequest) ProtoMessage() {} func (x *DeleteAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37620,11 +37264,9 @@ type DeleteAutoscalerRequest struct { func (x *DeleteAutoscalerRequest) Reset() { *x = DeleteAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAutoscalerRequest) String() string { @@ -37635,7 +37277,7 @@ func (*DeleteAutoscalerRequest) ProtoMessage() {} func (x *DeleteAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37694,11 +37336,9 @@ type DeleteBackendBucketRequest struct { func (x *DeleteBackendBucketRequest) Reset() { *x = DeleteBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackendBucketRequest) String() string { @@ -37709,7 +37349,7 @@ func (*DeleteBackendBucketRequest) ProtoMessage() {} func (x *DeleteBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37761,11 +37401,9 @@ type DeleteBackendServiceRequest struct { func (x *DeleteBackendServiceRequest) Reset() { *x = DeleteBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackendServiceRequest) String() string { @@ -37776,7 +37414,7 @@ func (*DeleteBackendServiceRequest) ProtoMessage() {} func (x *DeleteBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37830,11 +37468,9 @@ type DeleteDiskRequest struct { func (x *DeleteDiskRequest) Reset() { *x = DeleteDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDiskRequest) String() string { @@ -37845,7 +37481,7 @@ func (*DeleteDiskRequest) ProtoMessage() {} func (x *DeleteDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37904,11 +37540,9 @@ type DeleteExternalVpnGatewayRequest struct { func (x *DeleteExternalVpnGatewayRequest) Reset() { *x = DeleteExternalVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExternalVpnGatewayRequest) String() string { @@ -37919,7 +37553,7 @@ func (*DeleteExternalVpnGatewayRequest) ProtoMessage() {} func (x *DeleteExternalVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -37969,11 +37603,9 @@ type DeleteFirewallPolicyRequest struct { func (x *DeleteFirewallPolicyRequest) Reset() { *x = DeleteFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFirewallPolicyRequest) String() string { @@ -37984,7 +37616,7 @@ func (*DeleteFirewallPolicyRequest) ProtoMessage() {} func (x *DeleteFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38029,11 +37661,9 @@ type DeleteFirewallRequest struct { func (x *DeleteFirewallRequest) Reset() { *x = DeleteFirewallRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFirewallRequest) String() string { @@ -38044,7 +37674,7 @@ func (*DeleteFirewallRequest) ProtoMessage() {} func (x *DeleteFirewallRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38098,11 +37728,9 @@ type DeleteForwardingRuleRequest struct { func (x *DeleteForwardingRuleRequest) Reset() { *x = DeleteForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteForwardingRuleRequest) String() string { @@ -38113,7 +37741,7 @@ func (*DeleteForwardingRuleRequest) ProtoMessage() {} func (x *DeleteForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38172,11 +37800,9 @@ type DeleteGlobalAddressRequest struct { func (x *DeleteGlobalAddressRequest) Reset() { *x = DeleteGlobalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[186] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalAddressRequest) String() string { @@ -38187,7 +37813,7 @@ func (*DeleteGlobalAddressRequest) ProtoMessage() {} func (x *DeleteGlobalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[186] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38239,11 +37865,9 @@ type DeleteGlobalForwardingRuleRequest struct { func (x *DeleteGlobalForwardingRuleRequest) Reset() { *x = DeleteGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalForwardingRuleRequest) String() string { @@ -38254,7 +37878,7 @@ func (*DeleteGlobalForwardingRuleRequest) ProtoMessage() {} func (x *DeleteGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38306,11 +37930,9 @@ type DeleteGlobalNetworkEndpointGroupRequest struct { func (x *DeleteGlobalNetworkEndpointGroupRequest) Reset() { *x = DeleteGlobalNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalNetworkEndpointGroupRequest) String() string { @@ -38321,7 +37943,7 @@ func (*DeleteGlobalNetworkEndpointGroupRequest) ProtoMessage() {} func (x *DeleteGlobalNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38371,11 +37993,9 @@ type DeleteGlobalOperationRequest struct { func (x *DeleteGlobalOperationRequest) Reset() { *x = DeleteGlobalOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalOperationRequest) String() string { @@ -38386,7 +38006,7 @@ func (*DeleteGlobalOperationRequest) ProtoMessage() {} func (x *DeleteGlobalOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38424,11 +38044,9 @@ type DeleteGlobalOperationResponse struct { func (x *DeleteGlobalOperationResponse) Reset() { *x = DeleteGlobalOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalOperationResponse) String() string { @@ -38439,7 +38057,7 @@ func (*DeleteGlobalOperationResponse) ProtoMessage() {} func (x *DeleteGlobalOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38468,11 +38086,9 @@ type DeleteGlobalOrganizationOperationRequest struct { func (x *DeleteGlobalOrganizationOperationRequest) Reset() { *x = DeleteGlobalOrganizationOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalOrganizationOperationRequest) String() string { @@ -38483,7 +38099,7 @@ func (*DeleteGlobalOrganizationOperationRequest) ProtoMessage() {} func (x *DeleteGlobalOrganizationOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[191] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38521,11 +38137,9 @@ type DeleteGlobalOrganizationOperationResponse struct { func (x *DeleteGlobalOrganizationOperationResponse) Reset() { *x = DeleteGlobalOrganizationOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalOrganizationOperationResponse) String() string { @@ -38536,7 +38150,7 @@ func (*DeleteGlobalOrganizationOperationResponse) ProtoMessage() {} func (x *DeleteGlobalOrganizationOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[192] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38567,11 +38181,9 @@ type DeleteGlobalPublicDelegatedPrefixeRequest struct { func (x *DeleteGlobalPublicDelegatedPrefixeRequest) Reset() { *x = DeleteGlobalPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[193] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlobalPublicDelegatedPrefixeRequest) String() string { @@ -38582,7 +38194,7 @@ func (*DeleteGlobalPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *DeleteGlobalPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[193] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38634,11 +38246,9 @@ type DeleteHealthCheckRequest struct { func (x *DeleteHealthCheckRequest) Reset() { *x = DeleteHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[194] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHealthCheckRequest) String() string { @@ -38649,7 +38259,7 @@ func (*DeleteHealthCheckRequest) ProtoMessage() {} func (x *DeleteHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[194] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38701,11 +38311,9 @@ type DeleteImageRequest struct { func (x *DeleteImageRequest) Reset() { *x = DeleteImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[195] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteImageRequest) String() string { @@ -38716,7 +38324,7 @@ func (*DeleteImageRequest) ProtoMessage() {} func (x *DeleteImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[195] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38770,11 +38378,9 @@ type DeleteInstanceGroupManagerRequest struct { func (x *DeleteInstanceGroupManagerRequest) Reset() { *x = DeleteInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[196] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceGroupManagerRequest) String() string { @@ -38785,7 +38391,7 @@ func (*DeleteInstanceGroupManagerRequest) ProtoMessage() {} func (x *DeleteInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[196] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38848,11 +38454,9 @@ type DeleteInstanceGroupManagerResizeRequestRequest struct { func (x *DeleteInstanceGroupManagerResizeRequestRequest) Reset() { *x = DeleteInstanceGroupManagerResizeRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[197] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceGroupManagerResizeRequestRequest) String() string { @@ -38863,7 +38467,7 @@ func (*DeleteInstanceGroupManagerResizeRequestRequest) ProtoMessage() {} func (x *DeleteInstanceGroupManagerResizeRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[197] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -38931,11 +38535,9 @@ type DeleteInstanceGroupRequest struct { func (x *DeleteInstanceGroupRequest) Reset() { *x = DeleteInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[198] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceGroupRequest) String() string { @@ -38946,7 +38548,7 @@ func (*DeleteInstanceGroupRequest) ProtoMessage() {} func (x *DeleteInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[198] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39007,11 +38609,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -39022,7 +38622,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[199] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39081,11 +38681,9 @@ type DeleteInstanceTemplateRequest struct { func (x *DeleteInstanceTemplateRequest) Reset() { *x = DeleteInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceTemplateRequest) String() string { @@ -39096,7 +38694,7 @@ func (*DeleteInstanceTemplateRequest) ProtoMessage() {} func (x *DeleteInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[200] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39152,11 +38750,9 @@ type DeleteInstancesInstanceGroupManagerRequest struct { func (x *DeleteInstancesInstanceGroupManagerRequest) Reset() { *x = DeleteInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[201] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstancesInstanceGroupManagerRequest) String() string { @@ -39167,7 +38763,7 @@ func (*DeleteInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *DeleteInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[201] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39237,11 +38833,9 @@ type DeleteInstancesRegionInstanceGroupManagerRequest struct { func (x *DeleteInstancesRegionInstanceGroupManagerRequest) Reset() { *x = DeleteInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[202] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstancesRegionInstanceGroupManagerRequest) String() string { @@ -39252,7 +38846,7 @@ func (*DeleteInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *DeleteInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[202] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39320,11 +38914,9 @@ type DeleteInstantSnapshotRequest struct { func (x *DeleteInstantSnapshotRequest) Reset() { *x = DeleteInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[203] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstantSnapshotRequest) String() string { @@ -39335,7 +38927,7 @@ func (*DeleteInstantSnapshotRequest) ProtoMessage() {} func (x *DeleteInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[203] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39396,11 +38988,9 @@ type DeleteInterconnectAttachmentRequest struct { func (x *DeleteInterconnectAttachmentRequest) Reset() { *x = DeleteInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[204] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInterconnectAttachmentRequest) String() string { @@ -39411,7 +39001,7 @@ func (*DeleteInterconnectAttachmentRequest) ProtoMessage() {} func (x *DeleteInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[204] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39470,11 +39060,9 @@ type DeleteInterconnectRequest struct { func (x *DeleteInterconnectRequest) Reset() { *x = DeleteInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[205] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInterconnectRequest) String() string { @@ -39485,7 +39073,7 @@ func (*DeleteInterconnectRequest) ProtoMessage() {} func (x *DeleteInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[205] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39537,11 +39125,9 @@ type DeleteLicenseRequest struct { func (x *DeleteLicenseRequest) Reset() { *x = DeleteLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[206] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLicenseRequest) String() string { @@ -39552,7 +39138,7 @@ func (*DeleteLicenseRequest) ProtoMessage() {} func (x *DeleteLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[206] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39604,11 +39190,9 @@ type DeleteMachineImageRequest struct { func (x *DeleteMachineImageRequest) Reset() { *x = DeleteMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[207] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMachineImageRequest) String() string { @@ -39619,7 +39203,7 @@ func (*DeleteMachineImageRequest) ProtoMessage() {} func (x *DeleteMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[207] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39673,11 +39257,9 @@ type DeleteNetworkAttachmentRequest struct { func (x *DeleteNetworkAttachmentRequest) Reset() { *x = DeleteNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[208] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkAttachmentRequest) String() string { @@ -39688,7 +39270,7 @@ func (*DeleteNetworkAttachmentRequest) ProtoMessage() {} func (x *DeleteNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[208] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39749,11 +39331,9 @@ type DeleteNetworkEdgeSecurityServiceRequest struct { func (x *DeleteNetworkEdgeSecurityServiceRequest) Reset() { *x = DeleteNetworkEdgeSecurityServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[209] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkEdgeSecurityServiceRequest) String() string { @@ -39764,7 +39344,7 @@ func (*DeleteNetworkEdgeSecurityServiceRequest) ProtoMessage() {} func (x *DeleteNetworkEdgeSecurityServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[209] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39825,11 +39405,9 @@ type DeleteNetworkEndpointGroupRequest struct { func (x *DeleteNetworkEndpointGroupRequest) Reset() { *x = DeleteNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[210] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkEndpointGroupRequest) String() string { @@ -39840,7 +39418,7 @@ func (*DeleteNetworkEndpointGroupRequest) ProtoMessage() {} func (x *DeleteNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[210] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39899,11 +39477,9 @@ type DeleteNetworkFirewallPolicyRequest struct { func (x *DeleteNetworkFirewallPolicyRequest) Reset() { *x = DeleteNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[211] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkFirewallPolicyRequest) String() string { @@ -39914,7 +39490,7 @@ func (*DeleteNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *DeleteNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[211] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -39966,11 +39542,9 @@ type DeleteNetworkRequest struct { func (x *DeleteNetworkRequest) Reset() { *x = DeleteNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[212] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkRequest) String() string { @@ -39981,7 +39555,7 @@ func (*DeleteNetworkRequest) ProtoMessage() {} func (x *DeleteNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[212] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40035,11 +39609,9 @@ type DeleteNodeGroupRequest struct { func (x *DeleteNodeGroupRequest) Reset() { *x = DeleteNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[213] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodeGroupRequest) String() string { @@ -40050,7 +39622,7 @@ func (*DeleteNodeGroupRequest) ProtoMessage() {} func (x *DeleteNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[213] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40111,11 +39683,9 @@ type DeleteNodeTemplateRequest struct { func (x *DeleteNodeTemplateRequest) Reset() { *x = DeleteNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[214] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodeTemplateRequest) String() string { @@ -40126,7 +39696,7 @@ func (*DeleteNodeTemplateRequest) ProtoMessage() {} func (x *DeleteNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[214] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40189,11 +39759,9 @@ type DeleteNodesNodeGroupRequest struct { func (x *DeleteNodesNodeGroupRequest) Reset() { *x = DeleteNodesNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[215] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodesNodeGroupRequest) String() string { @@ -40204,7 +39772,7 @@ func (*DeleteNodesNodeGroupRequest) ProtoMessage() {} func (x *DeleteNodesNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[215] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40272,11 +39840,9 @@ type DeletePacketMirroringRequest struct { func (x *DeletePacketMirroringRequest) Reset() { *x = DeletePacketMirroringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[216] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePacketMirroringRequest) String() string { @@ -40287,7 +39853,7 @@ func (*DeletePacketMirroringRequest) ProtoMessage() {} func (x *DeletePacketMirroringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[216] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40348,11 +39914,9 @@ type DeletePerInstanceConfigsInstanceGroupManagerRequest struct { func (x *DeletePerInstanceConfigsInstanceGroupManagerRequest) Reset() { *x = DeletePerInstanceConfigsInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[217] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePerInstanceConfigsInstanceGroupManagerRequest) String() string { @@ -40363,7 +39927,7 @@ func (*DeletePerInstanceConfigsInstanceGroupManagerRequest) ProtoMessage() {} func (x *DeletePerInstanceConfigsInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[217] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40424,11 +39988,9 @@ type DeletePerInstanceConfigsRegionInstanceGroupManagerRequest struct { func (x *DeletePerInstanceConfigsRegionInstanceGroupManagerRequest) Reset() { *x = DeletePerInstanceConfigsRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[218] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePerInstanceConfigsRegionInstanceGroupManagerRequest) String() string { @@ -40439,7 +40001,7 @@ func (*DeletePerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoMessage() func (x *DeletePerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[218] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40498,11 +40060,9 @@ type DeletePublicAdvertisedPrefixeRequest struct { func (x *DeletePublicAdvertisedPrefixeRequest) Reset() { *x = DeletePublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[219] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePublicAdvertisedPrefixeRequest) String() string { @@ -40513,7 +40073,7 @@ func (*DeletePublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *DeletePublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[219] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40567,11 +40127,9 @@ type DeletePublicDelegatedPrefixeRequest struct { func (x *DeletePublicDelegatedPrefixeRequest) Reset() { *x = DeletePublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[220] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePublicDelegatedPrefixeRequest) String() string { @@ -40582,7 +40140,7 @@ func (*DeletePublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *DeletePublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[220] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40643,11 +40201,9 @@ type DeleteRegionAutoscalerRequest struct { func (x *DeleteRegionAutoscalerRequest) Reset() { *x = DeleteRegionAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[221] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionAutoscalerRequest) String() string { @@ -40658,7 +40214,7 @@ func (*DeleteRegionAutoscalerRequest) ProtoMessage() {} func (x *DeleteRegionAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[221] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40719,11 +40275,9 @@ type DeleteRegionBackendServiceRequest struct { func (x *DeleteRegionBackendServiceRequest) Reset() { *x = DeleteRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[222] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[222] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionBackendServiceRequest) String() string { @@ -40734,7 +40288,7 @@ func (*DeleteRegionBackendServiceRequest) ProtoMessage() {} func (x *DeleteRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[222] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40795,11 +40349,9 @@ type DeleteRegionDiskRequest struct { func (x *DeleteRegionDiskRequest) Reset() { *x = DeleteRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[223] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[223] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionDiskRequest) String() string { @@ -40810,7 +40362,7 @@ func (*DeleteRegionDiskRequest) ProtoMessage() {} func (x *DeleteRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[223] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40871,11 +40423,9 @@ type DeleteRegionHealthCheckRequest struct { func (x *DeleteRegionHealthCheckRequest) Reset() { *x = DeleteRegionHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[224] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionHealthCheckRequest) String() string { @@ -40886,7 +40436,7 @@ func (*DeleteRegionHealthCheckRequest) ProtoMessage() {} func (x *DeleteRegionHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[224] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -40947,11 +40497,9 @@ type DeleteRegionHealthCheckServiceRequest struct { func (x *DeleteRegionHealthCheckServiceRequest) Reset() { *x = DeleteRegionHealthCheckServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[225] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[225] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionHealthCheckServiceRequest) String() string { @@ -40962,7 +40510,7 @@ func (*DeleteRegionHealthCheckServiceRequest) ProtoMessage() {} func (x *DeleteRegionHealthCheckServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[225] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41023,11 +40571,9 @@ type DeleteRegionInstanceGroupManagerRequest struct { func (x *DeleteRegionInstanceGroupManagerRequest) Reset() { *x = DeleteRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[226] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[226] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionInstanceGroupManagerRequest) String() string { @@ -41038,7 +40584,7 @@ func (*DeleteRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *DeleteRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[226] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41099,11 +40645,9 @@ type DeleteRegionInstanceTemplateRequest struct { func (x *DeleteRegionInstanceTemplateRequest) Reset() { *x = DeleteRegionInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[227] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[227] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionInstanceTemplateRequest) String() string { @@ -41114,7 +40658,7 @@ func (*DeleteRegionInstanceTemplateRequest) ProtoMessage() {} func (x *DeleteRegionInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[227] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41175,11 +40719,9 @@ type DeleteRegionInstantSnapshotRequest struct { func (x *DeleteRegionInstantSnapshotRequest) Reset() { *x = DeleteRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[228] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[228] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionInstantSnapshotRequest) String() string { @@ -41190,7 +40732,7 @@ func (*DeleteRegionInstantSnapshotRequest) ProtoMessage() {} func (x *DeleteRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[228] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41251,11 +40793,9 @@ type DeleteRegionNetworkEndpointGroupRequest struct { func (x *DeleteRegionNetworkEndpointGroupRequest) Reset() { *x = DeleteRegionNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[229] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[229] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionNetworkEndpointGroupRequest) String() string { @@ -41266,7 +40806,7 @@ func (*DeleteRegionNetworkEndpointGroupRequest) ProtoMessage() {} func (x *DeleteRegionNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[229] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41327,11 +40867,9 @@ type DeleteRegionNetworkFirewallPolicyRequest struct { func (x *DeleteRegionNetworkFirewallPolicyRequest) Reset() { *x = DeleteRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[230] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[230] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionNetworkFirewallPolicyRequest) String() string { @@ -41342,7 +40880,7 @@ func (*DeleteRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *DeleteRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[230] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41403,11 +40941,9 @@ type DeleteRegionNotificationEndpointRequest struct { func (x *DeleteRegionNotificationEndpointRequest) Reset() { *x = DeleteRegionNotificationEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[231] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[231] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionNotificationEndpointRequest) String() string { @@ -41418,7 +40954,7 @@ func (*DeleteRegionNotificationEndpointRequest) ProtoMessage() {} func (x *DeleteRegionNotificationEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[231] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41477,11 +41013,9 @@ type DeleteRegionOperationRequest struct { func (x *DeleteRegionOperationRequest) Reset() { *x = DeleteRegionOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[232] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[232] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionOperationRequest) String() string { @@ -41492,7 +41026,7 @@ func (*DeleteRegionOperationRequest) ProtoMessage() {} func (x *DeleteRegionOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[232] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41537,11 +41071,9 @@ type DeleteRegionOperationResponse struct { func (x *DeleteRegionOperationResponse) Reset() { *x = DeleteRegionOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[233] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[233] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionOperationResponse) String() string { @@ -41552,7 +41084,7 @@ func (*DeleteRegionOperationResponse) ProtoMessage() {} func (x *DeleteRegionOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[233] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41585,11 +41117,9 @@ type DeleteRegionSecurityPolicyRequest struct { func (x *DeleteRegionSecurityPolicyRequest) Reset() { *x = DeleteRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[234] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[234] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionSecurityPolicyRequest) String() string { @@ -41600,7 +41130,7 @@ func (*DeleteRegionSecurityPolicyRequest) ProtoMessage() {} func (x *DeleteRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[234] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41661,11 +41191,9 @@ type DeleteRegionSslCertificateRequest struct { func (x *DeleteRegionSslCertificateRequest) Reset() { *x = DeleteRegionSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[235] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[235] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionSslCertificateRequest) String() string { @@ -41676,7 +41204,7 @@ func (*DeleteRegionSslCertificateRequest) ProtoMessage() {} func (x *DeleteRegionSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[235] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41737,11 +41265,9 @@ type DeleteRegionSslPolicyRequest struct { func (x *DeleteRegionSslPolicyRequest) Reset() { *x = DeleteRegionSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[236] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[236] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionSslPolicyRequest) String() string { @@ -41752,7 +41278,7 @@ func (*DeleteRegionSslPolicyRequest) ProtoMessage() {} func (x *DeleteRegionSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[236] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41813,11 +41339,9 @@ type DeleteRegionTargetHttpProxyRequest struct { func (x *DeleteRegionTargetHttpProxyRequest) Reset() { *x = DeleteRegionTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[237] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[237] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionTargetHttpProxyRequest) String() string { @@ -41828,7 +41352,7 @@ func (*DeleteRegionTargetHttpProxyRequest) ProtoMessage() {} func (x *DeleteRegionTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[237] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41889,11 +41413,9 @@ type DeleteRegionTargetHttpsProxyRequest struct { func (x *DeleteRegionTargetHttpsProxyRequest) Reset() { *x = DeleteRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[238] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[238] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionTargetHttpsProxyRequest) String() string { @@ -41904,7 +41426,7 @@ func (*DeleteRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *DeleteRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[238] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -41965,11 +41487,9 @@ type DeleteRegionTargetTcpProxyRequest struct { func (x *DeleteRegionTargetTcpProxyRequest) Reset() { *x = DeleteRegionTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[239] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionTargetTcpProxyRequest) String() string { @@ -41980,7 +41500,7 @@ func (*DeleteRegionTargetTcpProxyRequest) ProtoMessage() {} func (x *DeleteRegionTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[239] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42041,11 +41561,9 @@ type DeleteRegionUrlMapRequest struct { func (x *DeleteRegionUrlMapRequest) Reset() { *x = DeleteRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[240] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[240] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionUrlMapRequest) String() string { @@ -42056,7 +41574,7 @@ func (*DeleteRegionUrlMapRequest) ProtoMessage() {} func (x *DeleteRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[240] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42117,11 +41635,9 @@ type DeleteReservationRequest struct { func (x *DeleteReservationRequest) Reset() { *x = DeleteReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[241] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[241] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReservationRequest) String() string { @@ -42132,7 +41648,7 @@ func (*DeleteReservationRequest) ProtoMessage() {} func (x *DeleteReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[241] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42193,11 +41709,9 @@ type DeleteResourcePolicyRequest struct { func (x *DeleteResourcePolicyRequest) Reset() { *x = DeleteResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[242] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[242] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteResourcePolicyRequest) String() string { @@ -42208,7 +41722,7 @@ func (*DeleteResourcePolicyRequest) ProtoMessage() {} func (x *DeleteResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[242] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42267,11 +41781,9 @@ type DeleteRouteRequest struct { func (x *DeleteRouteRequest) Reset() { *x = DeleteRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[243] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRouteRequest) String() string { @@ -42282,7 +41794,7 @@ func (*DeleteRouteRequest) ProtoMessage() {} func (x *DeleteRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[243] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42336,11 +41848,9 @@ type DeleteRouterRequest struct { func (x *DeleteRouterRequest) Reset() { *x = DeleteRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[244] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[244] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRouterRequest) String() string { @@ -42351,7 +41861,7 @@ func (*DeleteRouterRequest) ProtoMessage() {} func (x *DeleteRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[244] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42410,11 +41920,9 @@ type DeleteSecurityPolicyRequest struct { func (x *DeleteSecurityPolicyRequest) Reset() { *x = DeleteSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[245] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[245] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecurityPolicyRequest) String() string { @@ -42425,7 +41933,7 @@ func (*DeleteSecurityPolicyRequest) ProtoMessage() {} func (x *DeleteSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[245] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42479,11 +41987,9 @@ type DeleteServiceAttachmentRequest struct { func (x *DeleteServiceAttachmentRequest) Reset() { *x = DeleteServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[246] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceAttachmentRequest) String() string { @@ -42494,7 +42000,7 @@ func (*DeleteServiceAttachmentRequest) ProtoMessage() {} func (x *DeleteServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[246] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42555,11 +42061,9 @@ type DeleteSignedUrlKeyBackendBucketRequest struct { func (x *DeleteSignedUrlKeyBackendBucketRequest) Reset() { *x = DeleteSignedUrlKeyBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[247] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[247] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSignedUrlKeyBackendBucketRequest) String() string { @@ -42570,7 +42074,7 @@ func (*DeleteSignedUrlKeyBackendBucketRequest) ProtoMessage() {} func (x *DeleteSignedUrlKeyBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[247] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42631,11 +42135,9 @@ type DeleteSignedUrlKeyBackendServiceRequest struct { func (x *DeleteSignedUrlKeyBackendServiceRequest) Reset() { *x = DeleteSignedUrlKeyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[248] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[248] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSignedUrlKeyBackendServiceRequest) String() string { @@ -42646,7 +42148,7 @@ func (*DeleteSignedUrlKeyBackendServiceRequest) ProtoMessage() {} func (x *DeleteSignedUrlKeyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[248] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42705,11 +42207,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[249] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[249] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -42720,7 +42220,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[249] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42772,11 +42272,9 @@ type DeleteSslCertificateRequest struct { func (x *DeleteSslCertificateRequest) Reset() { *x = DeleteSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[250] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[250] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSslCertificateRequest) String() string { @@ -42787,7 +42285,7 @@ func (*DeleteSslCertificateRequest) ProtoMessage() {} func (x *DeleteSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[250] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42839,11 +42337,9 @@ type DeleteSslPolicyRequest struct { func (x *DeleteSslPolicyRequest) Reset() { *x = DeleteSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[251] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[251] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSslPolicyRequest) String() string { @@ -42854,7 +42350,7 @@ func (*DeleteSslPolicyRequest) ProtoMessage() {} func (x *DeleteSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[251] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42908,11 +42404,9 @@ type DeleteStoragePoolRequest struct { func (x *DeleteStoragePoolRequest) Reset() { *x = DeleteStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[252] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[252] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStoragePoolRequest) String() string { @@ -42923,7 +42417,7 @@ func (*DeleteStoragePoolRequest) ProtoMessage() {} func (x *DeleteStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[252] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -42984,11 +42478,9 @@ type DeleteSubnetworkRequest struct { func (x *DeleteSubnetworkRequest) Reset() { *x = DeleteSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[253] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[253] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubnetworkRequest) String() string { @@ -42999,7 +42491,7 @@ func (*DeleteSubnetworkRequest) ProtoMessage() {} func (x *DeleteSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[253] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43058,11 +42550,9 @@ type DeleteTargetGrpcProxyRequest struct { func (x *DeleteTargetGrpcProxyRequest) Reset() { *x = DeleteTargetGrpcProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[254] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[254] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetGrpcProxyRequest) String() string { @@ -43073,7 +42563,7 @@ func (*DeleteTargetGrpcProxyRequest) ProtoMessage() {} func (x *DeleteTargetGrpcProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[254] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43125,11 +42615,9 @@ type DeleteTargetHttpProxyRequest struct { func (x *DeleteTargetHttpProxyRequest) Reset() { *x = DeleteTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[255] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[255] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetHttpProxyRequest) String() string { @@ -43140,7 +42628,7 @@ func (*DeleteTargetHttpProxyRequest) ProtoMessage() {} func (x *DeleteTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[255] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43192,11 +42680,9 @@ type DeleteTargetHttpsProxyRequest struct { func (x *DeleteTargetHttpsProxyRequest) Reset() { *x = DeleteTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[256] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[256] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetHttpsProxyRequest) String() string { @@ -43207,7 +42693,7 @@ func (*DeleteTargetHttpsProxyRequest) ProtoMessage() {} func (x *DeleteTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[256] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43261,11 +42747,9 @@ type DeleteTargetInstanceRequest struct { func (x *DeleteTargetInstanceRequest) Reset() { *x = DeleteTargetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[257] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[257] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetInstanceRequest) String() string { @@ -43276,7 +42760,7 @@ func (*DeleteTargetInstanceRequest) ProtoMessage() {} func (x *DeleteTargetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[257] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43337,11 +42821,9 @@ type DeleteTargetPoolRequest struct { func (x *DeleteTargetPoolRequest) Reset() { *x = DeleteTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[258] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[258] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetPoolRequest) String() string { @@ -43352,7 +42834,7 @@ func (*DeleteTargetPoolRequest) ProtoMessage() {} func (x *DeleteTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[258] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43411,11 +42893,9 @@ type DeleteTargetSslProxyRequest struct { func (x *DeleteTargetSslProxyRequest) Reset() { *x = DeleteTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[259] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[259] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSslProxyRequest) String() string { @@ -43426,7 +42906,7 @@ func (*DeleteTargetSslProxyRequest) ProtoMessage() {} func (x *DeleteTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[259] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43478,11 +42958,9 @@ type DeleteTargetTcpProxyRequest struct { func (x *DeleteTargetTcpProxyRequest) Reset() { *x = DeleteTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[260] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[260] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetTcpProxyRequest) String() string { @@ -43493,7 +42971,7 @@ func (*DeleteTargetTcpProxyRequest) ProtoMessage() {} func (x *DeleteTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[260] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43547,11 +43025,9 @@ type DeleteTargetVpnGatewayRequest struct { func (x *DeleteTargetVpnGatewayRequest) Reset() { *x = DeleteTargetVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[261] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[261] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetVpnGatewayRequest) String() string { @@ -43562,7 +43038,7 @@ func (*DeleteTargetVpnGatewayRequest) ProtoMessage() {} func (x *DeleteTargetVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[261] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43621,11 +43097,9 @@ type DeleteUrlMapRequest struct { func (x *DeleteUrlMapRequest) Reset() { *x = DeleteUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[262] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[262] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUrlMapRequest) String() string { @@ -43636,7 +43110,7 @@ func (*DeleteUrlMapRequest) ProtoMessage() {} func (x *DeleteUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[262] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43690,11 +43164,9 @@ type DeleteVpnGatewayRequest struct { func (x *DeleteVpnGatewayRequest) Reset() { *x = DeleteVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[263] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[263] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVpnGatewayRequest) String() string { @@ -43705,7 +43177,7 @@ func (*DeleteVpnGatewayRequest) ProtoMessage() {} func (x *DeleteVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[263] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43766,11 +43238,9 @@ type DeleteVpnTunnelRequest struct { func (x *DeleteVpnTunnelRequest) Reset() { *x = DeleteVpnTunnelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[264] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[264] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVpnTunnelRequest) String() string { @@ -43781,7 +43251,7 @@ func (*DeleteVpnTunnelRequest) ProtoMessage() {} func (x *DeleteVpnTunnelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[264] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43840,11 +43310,9 @@ type DeleteZoneOperationRequest struct { func (x *DeleteZoneOperationRequest) Reset() { *x = DeleteZoneOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[265] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[265] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteZoneOperationRequest) String() string { @@ -43855,7 +43323,7 @@ func (*DeleteZoneOperationRequest) ProtoMessage() {} func (x *DeleteZoneOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[265] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43900,11 +43368,9 @@ type DeleteZoneOperationResponse struct { func (x *DeleteZoneOperationResponse) Reset() { *x = DeleteZoneOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[266] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[266] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteZoneOperationResponse) String() string { @@ -43915,7 +43381,7 @@ func (*DeleteZoneOperationResponse) ProtoMessage() {} func (x *DeleteZoneOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[266] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -43943,11 +43409,9 @@ type Denied struct { func (x *Denied) Reset() { *x = Denied{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[267] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[267] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Denied) String() string { @@ -43958,7 +43422,7 @@ func (*Denied) ProtoMessage() {} func (x *Denied) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[267] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44005,11 +43469,9 @@ type DeprecateImageRequest struct { func (x *DeprecateImageRequest) Reset() { *x = DeprecateImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[268] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[268] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeprecateImageRequest) String() string { @@ -44020,7 +43482,7 @@ func (*DeprecateImageRequest) ProtoMessage() {} func (x *DeprecateImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[268] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44084,11 +43546,9 @@ type DeprecationStatus struct { func (x *DeprecationStatus) Reset() { *x = DeprecationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[269] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[269] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeprecationStatus) String() string { @@ -44099,7 +43559,7 @@ func (*DeprecationStatus) ProtoMessage() {} func (x *DeprecationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[269] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44169,11 +43629,9 @@ type DetachDiskInstanceRequest struct { func (x *DetachDiskInstanceRequest) Reset() { *x = DetachDiskInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[270] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[270] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachDiskInstanceRequest) String() string { @@ -44184,7 +43642,7 @@ func (*DetachDiskInstanceRequest) ProtoMessage() {} func (x *DetachDiskInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[270] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44252,11 +43710,9 @@ type DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest struct { func (x *DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest) Reset() { *x = DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[271] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[271] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest) String() string { @@ -44267,7 +43723,7 @@ func (*DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest) ProtoMessage() { func (x *DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[271] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44330,11 +43786,9 @@ type DetachNetworkEndpointsNetworkEndpointGroupRequest struct { func (x *DetachNetworkEndpointsNetworkEndpointGroupRequest) Reset() { *x = DetachNetworkEndpointsNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[272] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[272] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachNetworkEndpointsNetworkEndpointGroupRequest) String() string { @@ -44345,7 +43799,7 @@ func (*DetachNetworkEndpointsNetworkEndpointGroupRequest) ProtoMessage() {} func (x *DetachNetworkEndpointsNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[272] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44415,11 +43869,9 @@ type DetachNetworkEndpointsRegionNetworkEndpointGroupRequest struct { func (x *DetachNetworkEndpointsRegionNetworkEndpointGroupRequest) Reset() { *x = DetachNetworkEndpointsRegionNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[273] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[273] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachNetworkEndpointsRegionNetworkEndpointGroupRequest) String() string { @@ -44430,7 +43882,7 @@ func (*DetachNetworkEndpointsRegionNetworkEndpointGroupRequest) ProtoMessage() { func (x *DetachNetworkEndpointsRegionNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[273] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44494,11 +43946,9 @@ type DisableXpnHostProjectRequest struct { func (x *DisableXpnHostProjectRequest) Reset() { *x = DisableXpnHostProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[274] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[274] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableXpnHostProjectRequest) String() string { @@ -44509,7 +43959,7 @@ func (*DisableXpnHostProjectRequest) ProtoMessage() {} func (x *DisableXpnHostProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[274] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44554,11 +44004,9 @@ type DisableXpnResourceProjectRequest struct { func (x *DisableXpnResourceProjectRequest) Reset() { *x = DisableXpnResourceProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[275] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[275] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableXpnResourceProjectRequest) String() string { @@ -44569,7 +44017,7 @@ func (*DisableXpnResourceProjectRequest) ProtoMessage() {} func (x *DisableXpnResourceProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[275] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -44718,11 +44166,9 @@ type Disk struct { func (x *Disk) Reset() { *x = Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[276] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[276] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Disk) String() string { @@ -44733,7 +44179,7 @@ func (*Disk) ProtoMessage() {} func (x *Disk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[276] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45121,11 +44567,9 @@ type DiskAggregatedList struct { func (x *DiskAggregatedList) Reset() { *x = DiskAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[277] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[277] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskAggregatedList) String() string { @@ -45136,7 +44580,7 @@ func (*DiskAggregatedList) ProtoMessage() {} func (x *DiskAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[277] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45217,11 +44661,9 @@ type DiskAsyncReplication struct { func (x *DiskAsyncReplication) Reset() { *x = DiskAsyncReplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[278] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[278] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskAsyncReplication) String() string { @@ -45232,7 +44674,7 @@ func (*DiskAsyncReplication) ProtoMessage() {} func (x *DiskAsyncReplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[278] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45285,11 +44727,9 @@ type DiskAsyncReplicationList struct { func (x *DiskAsyncReplicationList) Reset() { *x = DiskAsyncReplicationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[279] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[279] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskAsyncReplicationList) String() string { @@ -45300,7 +44740,7 @@ func (*DiskAsyncReplicationList) ProtoMessage() {} func (x *DiskAsyncReplicationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[279] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45341,11 +44781,9 @@ type DiskInstantiationConfig struct { func (x *DiskInstantiationConfig) Reset() { *x = DiskInstantiationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[280] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[280] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskInstantiationConfig) String() string { @@ -45356,7 +44794,7 @@ func (*DiskInstantiationConfig) ProtoMessage() {} func (x *DiskInstantiationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[280] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45421,11 +44859,9 @@ type DiskList struct { func (x *DiskList) Reset() { *x = DiskList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[281] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[281] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskList) String() string { @@ -45436,7 +44872,7 @@ func (*DiskList) ProtoMessage() {} func (x *DiskList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[281] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45506,11 +44942,9 @@ type DiskMoveRequest struct { func (x *DiskMoveRequest) Reset() { *x = DiskMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[282] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[282] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskMoveRequest) String() string { @@ -45521,7 +44955,7 @@ func (*DiskMoveRequest) ProtoMessage() {} func (x *DiskMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[282] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45562,11 +44996,9 @@ type DiskParams struct { func (x *DiskParams) Reset() { *x = DiskParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[283] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[283] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskParams) String() string { @@ -45577,7 +45009,7 @@ func (*DiskParams) ProtoMessage() {} func (x *DiskParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[283] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45611,11 +45043,9 @@ type DiskResourceStatus struct { func (x *DiskResourceStatus) Reset() { *x = DiskResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[284] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[284] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskResourceStatus) String() string { @@ -45626,7 +45056,7 @@ func (*DiskResourceStatus) ProtoMessage() {} func (x *DiskResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[284] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45666,11 +45096,9 @@ type DiskResourceStatusAsyncReplicationStatus struct { func (x *DiskResourceStatusAsyncReplicationStatus) Reset() { *x = DiskResourceStatusAsyncReplicationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[285] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[285] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskResourceStatusAsyncReplicationStatus) String() string { @@ -45681,7 +45109,7 @@ func (*DiskResourceStatusAsyncReplicationStatus) ProtoMessage() {} func (x *DiskResourceStatusAsyncReplicationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[285] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45735,11 +45163,9 @@ type DiskType struct { func (x *DiskType) Reset() { *x = DiskType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[286] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[286] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskType) String() string { @@ -45750,7 +45176,7 @@ func (*DiskType) ProtoMessage() {} func (x *DiskType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[286] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45865,11 +45291,9 @@ type DiskTypeAggregatedList struct { func (x *DiskTypeAggregatedList) Reset() { *x = DiskTypeAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[287] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[287] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskTypeAggregatedList) String() string { @@ -45880,7 +45304,7 @@ func (*DiskTypeAggregatedList) ProtoMessage() {} func (x *DiskTypeAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[287] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -45966,11 +45390,9 @@ type DiskTypeList struct { func (x *DiskTypeList) Reset() { *x = DiskTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[288] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[288] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskTypeList) String() string { @@ -45981,7 +45403,7 @@ func (*DiskTypeList) ProtoMessage() {} func (x *DiskTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[288] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46051,11 +45473,9 @@ type DiskTypesScopedList struct { func (x *DiskTypesScopedList) Reset() { *x = DiskTypesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[289] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[289] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskTypesScopedList) String() string { @@ -46066,7 +45486,7 @@ func (*DiskTypesScopedList) ProtoMessage() {} func (x *DiskTypesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[289] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46106,11 +45526,9 @@ type DisksAddResourcePoliciesRequest struct { func (x *DisksAddResourcePoliciesRequest) Reset() { *x = DisksAddResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[290] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[290] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksAddResourcePoliciesRequest) String() string { @@ -46121,7 +45539,7 @@ func (*DisksAddResourcePoliciesRequest) ProtoMessage() {} func (x *DisksAddResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[290] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46154,11 +45572,9 @@ type DisksRemoveResourcePoliciesRequest struct { func (x *DisksRemoveResourcePoliciesRequest) Reset() { *x = DisksRemoveResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[291] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[291] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksRemoveResourcePoliciesRequest) String() string { @@ -46169,7 +45585,7 @@ func (*DisksRemoveResourcePoliciesRequest) ProtoMessage() {} func (x *DisksRemoveResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[291] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46202,11 +45618,9 @@ type DisksResizeRequest struct { func (x *DisksResizeRequest) Reset() { *x = DisksResizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[292] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[292] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksResizeRequest) String() string { @@ -46217,7 +45631,7 @@ func (*DisksResizeRequest) ProtoMessage() {} func (x *DisksResizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[292] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46252,11 +45666,9 @@ type DisksScopedList struct { func (x *DisksScopedList) Reset() { *x = DisksScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[293] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[293] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksScopedList) String() string { @@ -46267,7 +45679,7 @@ func (*DisksScopedList) ProtoMessage() {} func (x *DisksScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[293] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46307,11 +45719,9 @@ type DisksStartAsyncReplicationRequest struct { func (x *DisksStartAsyncReplicationRequest) Reset() { *x = DisksStartAsyncReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[294] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[294] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksStartAsyncReplicationRequest) String() string { @@ -46322,7 +45732,7 @@ func (*DisksStartAsyncReplicationRequest) ProtoMessage() {} func (x *DisksStartAsyncReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[294] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46356,11 +45766,9 @@ type DisksStopGroupAsyncReplicationResource struct { func (x *DisksStopGroupAsyncReplicationResource) Reset() { *x = DisksStopGroupAsyncReplicationResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[295] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[295] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisksStopGroupAsyncReplicationResource) String() string { @@ -46371,7 +45779,7 @@ func (*DisksStopGroupAsyncReplicationResource) ProtoMessage() {} func (x *DisksStopGroupAsyncReplicationResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[295] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46405,11 +45813,9 @@ type DisplayDevice struct { func (x *DisplayDevice) Reset() { *x = DisplayDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[296] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[296] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayDevice) String() string { @@ -46420,7 +45826,7 @@ func (*DisplayDevice) ProtoMessage() {} func (x *DisplayDevice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[296] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46456,11 +45862,9 @@ type DistributionPolicy struct { func (x *DistributionPolicy) Reset() { *x = DistributionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[297] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[297] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistributionPolicy) String() string { @@ -46471,7 +45875,7 @@ func (*DistributionPolicy) ProtoMessage() {} func (x *DistributionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[297] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46511,11 +45915,9 @@ type DistributionPolicyZoneConfiguration struct { func (x *DistributionPolicyZoneConfiguration) Reset() { *x = DistributionPolicyZoneConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[298] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[298] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistributionPolicyZoneConfiguration) String() string { @@ -46526,7 +45928,7 @@ func (*DistributionPolicyZoneConfiguration) ProtoMessage() {} func (x *DistributionPolicyZoneConfiguration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[298] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46562,11 +45964,9 @@ type Duration struct { func (x *Duration) Reset() { *x = Duration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[299] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[299] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Duration) String() string { @@ -46577,7 +45977,7 @@ func (*Duration) ProtoMessage() {} func (x *Duration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[299] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46620,11 +46020,9 @@ type EnableXpnHostProjectRequest struct { func (x *EnableXpnHostProjectRequest) Reset() { *x = EnableXpnHostProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[300] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[300] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableXpnHostProjectRequest) String() string { @@ -46635,7 +46033,7 @@ func (*EnableXpnHostProjectRequest) ProtoMessage() {} func (x *EnableXpnHostProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[300] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46680,11 +46078,9 @@ type EnableXpnResourceProjectRequest struct { func (x *EnableXpnResourceProjectRequest) Reset() { *x = EnableXpnResourceProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[301] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[301] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableXpnResourceProjectRequest) String() string { @@ -46695,7 +46091,7 @@ func (*EnableXpnResourceProjectRequest) ProtoMessage() {} func (x *EnableXpnResourceProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[301] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46743,11 +46139,9 @@ type Error struct { func (x *Error) Reset() { *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[302] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[302] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Error) String() string { @@ -46758,7 +46152,7 @@ func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[302] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46793,11 +46187,9 @@ type ErrorDetails struct { func (x *ErrorDetails) Reset() { *x = ErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[303] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[303] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetails) String() string { @@ -46808,7 +46200,7 @@ func (*ErrorDetails) ProtoMessage() {} func (x *ErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[303] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46867,11 +46259,9 @@ type ErrorInfo struct { func (x *ErrorInfo) Reset() { *x = ErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[304] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[304] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorInfo) String() string { @@ -46882,7 +46272,7 @@ func (*ErrorInfo) ProtoMessage() {} func (x *ErrorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[304] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -46935,11 +46325,9 @@ type Errors struct { func (x *Errors) Reset() { *x = Errors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[305] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[305] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Errors) String() string { @@ -46950,7 +46338,7 @@ func (*Errors) ProtoMessage() {} func (x *Errors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[305] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47013,11 +46401,9 @@ type ExchangedPeeringRoute struct { func (x *ExchangedPeeringRoute) Reset() { *x = ExchangedPeeringRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[306] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[306] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExchangedPeeringRoute) String() string { @@ -47028,7 +46414,7 @@ func (*ExchangedPeeringRoute) ProtoMessage() {} func (x *ExchangedPeeringRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[306] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47099,11 +46485,9 @@ type ExchangedPeeringRoutesList struct { func (x *ExchangedPeeringRoutesList) Reset() { *x = ExchangedPeeringRoutesList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[307] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[307] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExchangedPeeringRoutesList) String() string { @@ -47114,7 +46498,7 @@ func (*ExchangedPeeringRoutesList) ProtoMessage() {} func (x *ExchangedPeeringRoutesList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[307] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47191,11 +46575,9 @@ type ExpandIpCidrRangeSubnetworkRequest struct { func (x *ExpandIpCidrRangeSubnetworkRequest) Reset() { *x = ExpandIpCidrRangeSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[308] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[308] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandIpCidrRangeSubnetworkRequest) String() string { @@ -47206,7 +46588,7 @@ func (*ExpandIpCidrRangeSubnetworkRequest) ProtoMessage() {} func (x *ExpandIpCidrRangeSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[308] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47274,11 +46656,9 @@ type Expr struct { func (x *Expr) Reset() { *x = Expr{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[309] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[309] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Expr) String() string { @@ -47289,7 +46669,7 @@ func (*Expr) ProtoMessage() {} func (x *Expr) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[309] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47363,11 +46743,9 @@ type ExternalVpnGateway struct { func (x *ExternalVpnGateway) Reset() { *x = ExternalVpnGateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[310] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[310] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalVpnGateway) String() string { @@ -47378,7 +46756,7 @@ func (*ExternalVpnGateway) ProtoMessage() {} func (x *ExternalVpnGateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[310] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47479,11 +46857,9 @@ type ExternalVpnGatewayInterface struct { func (x *ExternalVpnGatewayInterface) Reset() { *x = ExternalVpnGatewayInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[311] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[311] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalVpnGatewayInterface) String() string { @@ -47494,7 +46870,7 @@ func (*ExternalVpnGatewayInterface) ProtoMessage() {} func (x *ExternalVpnGatewayInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[311] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47553,11 +46929,9 @@ type ExternalVpnGatewayList struct { func (x *ExternalVpnGatewayList) Reset() { *x = ExternalVpnGatewayList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[312] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[312] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalVpnGatewayList) String() string { @@ -47568,7 +46942,7 @@ func (*ExternalVpnGatewayList) ProtoMessage() {} func (x *ExternalVpnGatewayList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[312] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47646,11 +47020,9 @@ type FileContentBuffer struct { func (x *FileContentBuffer) Reset() { *x = FileContentBuffer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[313] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[313] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileContentBuffer) String() string { @@ -47661,7 +47033,7 @@ func (*FileContentBuffer) ProtoMessage() {} func (x *FileContentBuffer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[313] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47739,11 +47111,9 @@ type Firewall struct { func (x *Firewall) Reset() { *x = Firewall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[314] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[314] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Firewall) String() string { @@ -47754,7 +47124,7 @@ func (*Firewall) ProtoMessage() {} func (x *Firewall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[314] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -47924,11 +47294,9 @@ type FirewallList struct { func (x *FirewallList) Reset() { *x = FirewallList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[315] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[315] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallList) String() string { @@ -47939,7 +47307,7 @@ func (*FirewallList) ProtoMessage() {} func (x *FirewallList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[315] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48011,11 +47379,9 @@ type FirewallLogConfig struct { func (x *FirewallLogConfig) Reset() { *x = FirewallLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[316] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[316] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallLogConfig) String() string { @@ -48026,7 +47392,7 @@ func (*FirewallLogConfig) ProtoMessage() {} func (x *FirewallLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[316] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48068,11 +47434,9 @@ type FirewallPoliciesListAssociationsResponse struct { func (x *FirewallPoliciesListAssociationsResponse) Reset() { *x = FirewallPoliciesListAssociationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[317] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[317] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPoliciesListAssociationsResponse) String() string { @@ -48083,7 +47447,7 @@ func (*FirewallPoliciesListAssociationsResponse) ProtoMessage() {} func (x *FirewallPoliciesListAssociationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[317] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48152,11 +47516,9 @@ type FirewallPolicy struct { func (x *FirewallPolicy) Reset() { *x = FirewallPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[318] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[318] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicy) String() string { @@ -48167,7 +47529,7 @@ func (*FirewallPolicy) ProtoMessage() {} func (x *FirewallPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[318] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48306,11 +47668,9 @@ type FirewallPolicyAssociation struct { func (x *FirewallPolicyAssociation) Reset() { *x = FirewallPolicyAssociation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[319] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[319] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyAssociation) String() string { @@ -48321,7 +47681,7 @@ func (*FirewallPolicyAssociation) ProtoMessage() {} func (x *FirewallPolicyAssociation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[319] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48390,11 +47750,9 @@ type FirewallPolicyList struct { func (x *FirewallPolicyList) Reset() { *x = FirewallPolicyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[320] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[320] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyList) String() string { @@ -48405,7 +47763,7 @@ func (*FirewallPolicyList) ProtoMessage() {} func (x *FirewallPolicyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[320] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48496,11 +47854,9 @@ type FirewallPolicyRule struct { func (x *FirewallPolicyRule) Reset() { *x = FirewallPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[321] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[321] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyRule) String() string { @@ -48511,7 +47867,7 @@ func (*FirewallPolicyRule) ProtoMessage() {} func (x *FirewallPolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[321] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48665,11 +48021,9 @@ type FirewallPolicyRuleMatcher struct { func (x *FirewallPolicyRuleMatcher) Reset() { *x = FirewallPolicyRuleMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[322] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[322] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyRuleMatcher) String() string { @@ -48680,7 +48034,7 @@ func (*FirewallPolicyRuleMatcher) ProtoMessage() {} func (x *FirewallPolicyRuleMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[322] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48792,11 +48146,9 @@ type FirewallPolicyRuleMatcherLayer4Config struct { func (x *FirewallPolicyRuleMatcherLayer4Config) Reset() { *x = FirewallPolicyRuleMatcherLayer4Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[323] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[323] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyRuleMatcherLayer4Config) String() string { @@ -48807,7 +48159,7 @@ func (*FirewallPolicyRuleMatcherLayer4Config) ProtoMessage() {} func (x *FirewallPolicyRuleMatcherLayer4Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[323] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48850,11 +48202,9 @@ type FirewallPolicyRuleSecureTag struct { func (x *FirewallPolicyRuleSecureTag) Reset() { *x = FirewallPolicyRuleSecureTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[324] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[324] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyRuleSecureTag) String() string { @@ -48865,7 +48215,7 @@ func (*FirewallPolicyRuleSecureTag) ProtoMessage() {} func (x *FirewallPolicyRuleSecureTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[324] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -48910,11 +48260,9 @@ type FixedOrPercent struct { func (x *FixedOrPercent) Reset() { *x = FixedOrPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[325] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[325] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FixedOrPercent) String() string { @@ -48925,7 +48273,7 @@ func (*FixedOrPercent) ProtoMessage() {} func (x *FixedOrPercent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[325] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49045,11 +48393,9 @@ type ForwardingRule struct { func (x *ForwardingRule) Reset() { *x = ForwardingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[326] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[326] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRule) String() string { @@ -49060,7 +48406,7 @@ func (*ForwardingRule) ProtoMessage() {} func (x *ForwardingRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[326] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49343,11 +48689,9 @@ type ForwardingRuleAggregatedList struct { func (x *ForwardingRuleAggregatedList) Reset() { *x = ForwardingRuleAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[327] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[327] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRuleAggregatedList) String() string { @@ -49358,7 +48702,7 @@ func (*ForwardingRuleAggregatedList) ProtoMessage() {} func (x *ForwardingRuleAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[327] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49444,11 +48788,9 @@ type ForwardingRuleList struct { func (x *ForwardingRuleList) Reset() { *x = ForwardingRuleList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[328] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[328] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRuleList) String() string { @@ -49459,7 +48801,7 @@ func (*ForwardingRuleList) ProtoMessage() {} func (x *ForwardingRuleList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[328] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49526,11 +48868,9 @@ type ForwardingRuleReference struct { func (x *ForwardingRuleReference) Reset() { *x = ForwardingRuleReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[329] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[329] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRuleReference) String() string { @@ -49541,7 +48881,7 @@ func (*ForwardingRuleReference) ProtoMessage() {} func (x *ForwardingRuleReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[329] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49579,11 +48919,9 @@ type ForwardingRuleServiceDirectoryRegistration struct { func (x *ForwardingRuleServiceDirectoryRegistration) Reset() { *x = ForwardingRuleServiceDirectoryRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[330] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[330] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRuleServiceDirectoryRegistration) String() string { @@ -49594,7 +48932,7 @@ func (*ForwardingRuleServiceDirectoryRegistration) ProtoMessage() {} func (x *ForwardingRuleServiceDirectoryRegistration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[330] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49643,11 +48981,9 @@ type ForwardingRulesScopedList struct { func (x *ForwardingRulesScopedList) Reset() { *x = ForwardingRulesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[331] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[331] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRulesScopedList) String() string { @@ -49658,7 +48994,7 @@ func (*ForwardingRulesScopedList) ProtoMessage() {} func (x *ForwardingRulesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[331] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49705,11 +49041,9 @@ type GRPCHealthCheck struct { func (x *GRPCHealthCheck) Reset() { *x = GRPCHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[332] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[332] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GRPCHealthCheck) String() string { @@ -49720,7 +49054,7 @@ func (*GRPCHealthCheck) ProtoMessage() {} func (x *GRPCHealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[332] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49779,11 +49113,9 @@ type GetAcceleratorTypeRequest struct { func (x *GetAcceleratorTypeRequest) Reset() { *x = GetAcceleratorTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[333] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[333] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAcceleratorTypeRequest) String() string { @@ -49794,7 +49126,7 @@ func (*GetAcceleratorTypeRequest) ProtoMessage() {} func (x *GetAcceleratorTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[333] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49846,11 +49178,9 @@ type GetAddressRequest struct { func (x *GetAddressRequest) Reset() { *x = GetAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[334] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[334] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAddressRequest) String() string { @@ -49861,7 +49191,7 @@ func (*GetAddressRequest) ProtoMessage() {} func (x *GetAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[334] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49911,11 +49241,9 @@ type GetAssociationFirewallPolicyRequest struct { func (x *GetAssociationFirewallPolicyRequest) Reset() { *x = GetAssociationFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[335] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[335] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssociationFirewallPolicyRequest) String() string { @@ -49926,7 +49254,7 @@ func (*GetAssociationFirewallPolicyRequest) ProtoMessage() {} func (x *GetAssociationFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[335] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -49971,11 +49299,9 @@ type GetAssociationNetworkFirewallPolicyRequest struct { func (x *GetAssociationNetworkFirewallPolicyRequest) Reset() { *x = GetAssociationNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[336] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[336] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssociationNetworkFirewallPolicyRequest) String() string { @@ -49986,7 +49312,7 @@ func (*GetAssociationNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetAssociationNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[336] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50040,11 +49366,9 @@ type GetAssociationRegionNetworkFirewallPolicyRequest struct { func (x *GetAssociationRegionNetworkFirewallPolicyRequest) Reset() { *x = GetAssociationRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[337] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[337] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssociationRegionNetworkFirewallPolicyRequest) String() string { @@ -50055,7 +49379,7 @@ func (*GetAssociationRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetAssociationRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[337] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50114,11 +49438,9 @@ type GetAutoscalerRequest struct { func (x *GetAutoscalerRequest) Reset() { *x = GetAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[338] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[338] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutoscalerRequest) String() string { @@ -50129,7 +49451,7 @@ func (*GetAutoscalerRequest) ProtoMessage() {} func (x *GetAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[338] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50179,11 +49501,9 @@ type GetBackendBucketRequest struct { func (x *GetBackendBucketRequest) Reset() { *x = GetBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[339] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[339] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackendBucketRequest) String() string { @@ -50194,7 +49514,7 @@ func (*GetBackendBucketRequest) ProtoMessage() {} func (x *GetBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[339] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50237,11 +49557,9 @@ type GetBackendServiceRequest struct { func (x *GetBackendServiceRequest) Reset() { *x = GetBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[340] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[340] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackendServiceRequest) String() string { @@ -50252,7 +49570,7 @@ func (*GetBackendServiceRequest) ProtoMessage() {} func (x *GetBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[340] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50295,11 +49613,9 @@ type GetDiagnosticsInterconnectRequest struct { func (x *GetDiagnosticsInterconnectRequest) Reset() { *x = GetDiagnosticsInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[341] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[341] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiagnosticsInterconnectRequest) String() string { @@ -50310,7 +49626,7 @@ func (*GetDiagnosticsInterconnectRequest) ProtoMessage() {} func (x *GetDiagnosticsInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[341] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50355,11 +49671,9 @@ type GetDiskRequest struct { func (x *GetDiskRequest) Reset() { *x = GetDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[342] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[342] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiskRequest) String() string { @@ -50370,7 +49684,7 @@ func (*GetDiskRequest) ProtoMessage() {} func (x *GetDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[342] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50422,11 +49736,9 @@ type GetDiskTypeRequest struct { func (x *GetDiskTypeRequest) Reset() { *x = GetDiskTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[343] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[343] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiskTypeRequest) String() string { @@ -50437,7 +49749,7 @@ func (*GetDiskTypeRequest) ProtoMessage() {} func (x *GetDiskTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[343] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50491,11 +49803,9 @@ type GetEffectiveFirewallsInstanceRequest struct { func (x *GetEffectiveFirewallsInstanceRequest) Reset() { *x = GetEffectiveFirewallsInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[344] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[344] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveFirewallsInstanceRequest) String() string { @@ -50506,7 +49816,7 @@ func (*GetEffectiveFirewallsInstanceRequest) ProtoMessage() {} func (x *GetEffectiveFirewallsInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[344] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50563,11 +49873,9 @@ type GetEffectiveFirewallsNetworkRequest struct { func (x *GetEffectiveFirewallsNetworkRequest) Reset() { *x = GetEffectiveFirewallsNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[345] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[345] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveFirewallsNetworkRequest) String() string { @@ -50578,7 +49886,7 @@ func (*GetEffectiveFirewallsNetworkRequest) ProtoMessage() {} func (x *GetEffectiveFirewallsNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[345] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50623,11 +49931,9 @@ type GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest struct { func (x *GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest) Reset() { *x = GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[346] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[346] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest) String() string { @@ -50638,7 +49944,7 @@ func (*GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest) ProtoMessage() { func (x *GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[346] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50688,11 +49994,9 @@ type GetExternalVpnGatewayRequest struct { func (x *GetExternalVpnGatewayRequest) Reset() { *x = GetExternalVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[347] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[347] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExternalVpnGatewayRequest) String() string { @@ -50703,7 +50007,7 @@ func (*GetExternalVpnGatewayRequest) ProtoMessage() {} func (x *GetExternalVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[347] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50744,11 +50048,9 @@ type GetFirewallPolicyRequest struct { func (x *GetFirewallPolicyRequest) Reset() { *x = GetFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[348] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[348] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFirewallPolicyRequest) String() string { @@ -50759,7 +50061,7 @@ func (*GetFirewallPolicyRequest) ProtoMessage() {} func (x *GetFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[348] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50795,11 +50097,9 @@ type GetFirewallRequest struct { func (x *GetFirewallRequest) Reset() { *x = GetFirewallRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[349] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[349] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFirewallRequest) String() string { @@ -50810,7 +50110,7 @@ func (*GetFirewallRequest) ProtoMessage() {} func (x *GetFirewallRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[349] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50855,11 +50155,9 @@ type GetForwardingRuleRequest struct { func (x *GetForwardingRuleRequest) Reset() { *x = GetForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[350] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[350] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetForwardingRuleRequest) String() string { @@ -50870,7 +50168,7 @@ func (*GetForwardingRuleRequest) ProtoMessage() {} func (x *GetForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[350] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50920,11 +50218,9 @@ type GetFromFamilyImageRequest struct { func (x *GetFromFamilyImageRequest) Reset() { *x = GetFromFamilyImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[351] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[351] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFromFamilyImageRequest) String() string { @@ -50935,7 +50231,7 @@ func (*GetFromFamilyImageRequest) ProtoMessage() {} func (x *GetFromFamilyImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[351] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -50978,11 +50274,9 @@ type GetGlobalAddressRequest struct { func (x *GetGlobalAddressRequest) Reset() { *x = GetGlobalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[352] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[352] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalAddressRequest) String() string { @@ -50993,7 +50287,7 @@ func (*GetGlobalAddressRequest) ProtoMessage() {} func (x *GetGlobalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[352] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51036,11 +50330,9 @@ type GetGlobalForwardingRuleRequest struct { func (x *GetGlobalForwardingRuleRequest) Reset() { *x = GetGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[353] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[353] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalForwardingRuleRequest) String() string { @@ -51051,7 +50343,7 @@ func (*GetGlobalForwardingRuleRequest) ProtoMessage() {} func (x *GetGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[353] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51094,11 +50386,9 @@ type GetGlobalNetworkEndpointGroupRequest struct { func (x *GetGlobalNetworkEndpointGroupRequest) Reset() { *x = GetGlobalNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[354] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[354] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalNetworkEndpointGroupRequest) String() string { @@ -51109,7 +50399,7 @@ func (*GetGlobalNetworkEndpointGroupRequest) ProtoMessage() {} func (x *GetGlobalNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[354] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51152,11 +50442,9 @@ type GetGlobalOperationRequest struct { func (x *GetGlobalOperationRequest) Reset() { *x = GetGlobalOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[355] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[355] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalOperationRequest) String() string { @@ -51167,7 +50455,7 @@ func (*GetGlobalOperationRequest) ProtoMessage() {} func (x *GetGlobalOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[355] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51210,11 +50498,9 @@ type GetGlobalOrganizationOperationRequest struct { func (x *GetGlobalOrganizationOperationRequest) Reset() { *x = GetGlobalOrganizationOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[356] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[356] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalOrganizationOperationRequest) String() string { @@ -51225,7 +50511,7 @@ func (*GetGlobalOrganizationOperationRequest) ProtoMessage() {} func (x *GetGlobalOrganizationOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[356] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51268,11 +50554,9 @@ type GetGlobalPublicDelegatedPrefixeRequest struct { func (x *GetGlobalPublicDelegatedPrefixeRequest) Reset() { *x = GetGlobalPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[357] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[357] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalPublicDelegatedPrefixeRequest) String() string { @@ -51283,7 +50567,7 @@ func (*GetGlobalPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *GetGlobalPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[357] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51332,11 +50616,9 @@ type GetGuestAttributesInstanceRequest struct { func (x *GetGuestAttributesInstanceRequest) Reset() { *x = GetGuestAttributesInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[358] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[358] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGuestAttributesInstanceRequest) String() string { @@ -51347,7 +50629,7 @@ func (*GetGuestAttributesInstanceRequest) ProtoMessage() {} func (x *GetGuestAttributesInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[358] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51412,11 +50694,9 @@ type GetHealthBackendServiceRequest struct { func (x *GetHealthBackendServiceRequest) Reset() { *x = GetHealthBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[359] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[359] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthBackendServiceRequest) String() string { @@ -51427,7 +50707,7 @@ func (*GetHealthBackendServiceRequest) ProtoMessage() {} func (x *GetHealthBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[359] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51477,11 +50757,9 @@ type GetHealthCheckRequest struct { func (x *GetHealthCheckRequest) Reset() { *x = GetHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[360] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[360] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthCheckRequest) String() string { @@ -51492,7 +50770,7 @@ func (*GetHealthCheckRequest) ProtoMessage() {} func (x *GetHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[360] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51538,11 +50816,9 @@ type GetHealthRegionBackendServiceRequest struct { func (x *GetHealthRegionBackendServiceRequest) Reset() { *x = GetHealthRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[361] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[361] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthRegionBackendServiceRequest) String() string { @@ -51553,7 +50829,7 @@ func (*GetHealthRegionBackendServiceRequest) ProtoMessage() {} func (x *GetHealthRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[361] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51614,11 +50890,9 @@ type GetHealthTargetPoolRequest struct { func (x *GetHealthTargetPoolRequest) Reset() { *x = GetHealthTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[362] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[362] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthTargetPoolRequest) String() string { @@ -51629,7 +50903,7 @@ func (*GetHealthTargetPoolRequest) ProtoMessage() {} func (x *GetHealthTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[362] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51688,11 +50962,9 @@ type GetIamPolicyBackendBucketRequest struct { func (x *GetIamPolicyBackendBucketRequest) Reset() { *x = GetIamPolicyBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[363] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[363] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyBackendBucketRequest) String() string { @@ -51703,7 +50975,7 @@ func (*GetIamPolicyBackendBucketRequest) ProtoMessage() {} func (x *GetIamPolicyBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[363] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51755,11 +51027,9 @@ type GetIamPolicyBackendServiceRequest struct { func (x *GetIamPolicyBackendServiceRequest) Reset() { *x = GetIamPolicyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[364] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[364] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyBackendServiceRequest) String() string { @@ -51770,7 +51040,7 @@ func (*GetIamPolicyBackendServiceRequest) ProtoMessage() {} func (x *GetIamPolicyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[364] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51824,11 +51094,9 @@ type GetIamPolicyDiskRequest struct { func (x *GetIamPolicyDiskRequest) Reset() { *x = GetIamPolicyDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[365] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[365] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyDiskRequest) String() string { @@ -51839,7 +51107,7 @@ func (*GetIamPolicyDiskRequest) ProtoMessage() {} func (x *GetIamPolicyDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[365] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51896,11 +51164,9 @@ type GetIamPolicyFirewallPolicyRequest struct { func (x *GetIamPolicyFirewallPolicyRequest) Reset() { *x = GetIamPolicyFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[366] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[366] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyFirewallPolicyRequest) String() string { @@ -51911,7 +51177,7 @@ func (*GetIamPolicyFirewallPolicyRequest) ProtoMessage() {} func (x *GetIamPolicyFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[366] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -51956,11 +51222,9 @@ type GetIamPolicyImageRequest struct { func (x *GetIamPolicyImageRequest) Reset() { *x = GetIamPolicyImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[367] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[367] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyImageRequest) String() string { @@ -51971,7 +51235,7 @@ func (*GetIamPolicyImageRequest) ProtoMessage() {} func (x *GetIamPolicyImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[367] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52025,11 +51289,9 @@ type GetIamPolicyInstanceRequest struct { func (x *GetIamPolicyInstanceRequest) Reset() { *x = GetIamPolicyInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[368] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[368] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyInstanceRequest) String() string { @@ -52040,7 +51302,7 @@ func (*GetIamPolicyInstanceRequest) ProtoMessage() {} func (x *GetIamPolicyInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[368] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52099,11 +51361,9 @@ type GetIamPolicyInstanceTemplateRequest struct { func (x *GetIamPolicyInstanceTemplateRequest) Reset() { *x = GetIamPolicyInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[369] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[369] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyInstanceTemplateRequest) String() string { @@ -52114,7 +51374,7 @@ func (*GetIamPolicyInstanceTemplateRequest) ProtoMessage() {} func (x *GetIamPolicyInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[369] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52168,11 +51428,9 @@ type GetIamPolicyInstantSnapshotRequest struct { func (x *GetIamPolicyInstantSnapshotRequest) Reset() { *x = GetIamPolicyInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[370] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[370] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyInstantSnapshotRequest) String() string { @@ -52183,7 +51441,7 @@ func (*GetIamPolicyInstantSnapshotRequest) ProtoMessage() {} func (x *GetIamPolicyInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[370] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52242,11 +51500,9 @@ type GetIamPolicyLicenseRequest struct { func (x *GetIamPolicyLicenseRequest) Reset() { *x = GetIamPolicyLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[371] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[371] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyLicenseRequest) String() string { @@ -52257,7 +51513,7 @@ func (*GetIamPolicyLicenseRequest) ProtoMessage() {} func (x *GetIamPolicyLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[371] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52309,11 +51565,9 @@ type GetIamPolicyMachineImageRequest struct { func (x *GetIamPolicyMachineImageRequest) Reset() { *x = GetIamPolicyMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[372] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[372] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyMachineImageRequest) String() string { @@ -52324,7 +51578,7 @@ func (*GetIamPolicyMachineImageRequest) ProtoMessage() {} func (x *GetIamPolicyMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[372] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52378,11 +51632,9 @@ type GetIamPolicyNetworkAttachmentRequest struct { func (x *GetIamPolicyNetworkAttachmentRequest) Reset() { *x = GetIamPolicyNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[373] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[373] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyNetworkAttachmentRequest) String() string { @@ -52393,7 +51645,7 @@ func (*GetIamPolicyNetworkAttachmentRequest) ProtoMessage() {} func (x *GetIamPolicyNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[373] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52452,11 +51704,9 @@ type GetIamPolicyNetworkFirewallPolicyRequest struct { func (x *GetIamPolicyNetworkFirewallPolicyRequest) Reset() { *x = GetIamPolicyNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[374] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[374] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyNetworkFirewallPolicyRequest) String() string { @@ -52467,7 +51717,7 @@ func (*GetIamPolicyNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetIamPolicyNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[374] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52521,11 +51771,9 @@ type GetIamPolicyNodeGroupRequest struct { func (x *GetIamPolicyNodeGroupRequest) Reset() { *x = GetIamPolicyNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[375] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[375] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyNodeGroupRequest) String() string { @@ -52536,7 +51784,7 @@ func (*GetIamPolicyNodeGroupRequest) ProtoMessage() {} func (x *GetIamPolicyNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[375] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52597,11 +51845,9 @@ type GetIamPolicyNodeTemplateRequest struct { func (x *GetIamPolicyNodeTemplateRequest) Reset() { *x = GetIamPolicyNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[376] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[376] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyNodeTemplateRequest) String() string { @@ -52612,7 +51858,7 @@ func (*GetIamPolicyNodeTemplateRequest) ProtoMessage() {} func (x *GetIamPolicyNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[376] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52673,11 +51919,9 @@ type GetIamPolicyRegionBackendServiceRequest struct { func (x *GetIamPolicyRegionBackendServiceRequest) Reset() { *x = GetIamPolicyRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[377] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[377] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRegionBackendServiceRequest) String() string { @@ -52688,7 +51932,7 @@ func (*GetIamPolicyRegionBackendServiceRequest) ProtoMessage() {} func (x *GetIamPolicyRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[377] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52749,11 +51993,9 @@ type GetIamPolicyRegionDiskRequest struct { func (x *GetIamPolicyRegionDiskRequest) Reset() { *x = GetIamPolicyRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[378] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[378] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRegionDiskRequest) String() string { @@ -52764,7 +52006,7 @@ func (*GetIamPolicyRegionDiskRequest) ProtoMessage() {} func (x *GetIamPolicyRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[378] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52825,11 +52067,9 @@ type GetIamPolicyRegionInstantSnapshotRequest struct { func (x *GetIamPolicyRegionInstantSnapshotRequest) Reset() { *x = GetIamPolicyRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[379] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[379] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRegionInstantSnapshotRequest) String() string { @@ -52840,7 +52080,7 @@ func (*GetIamPolicyRegionInstantSnapshotRequest) ProtoMessage() {} func (x *GetIamPolicyRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[379] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52901,11 +52141,9 @@ type GetIamPolicyRegionNetworkFirewallPolicyRequest struct { func (x *GetIamPolicyRegionNetworkFirewallPolicyRequest) Reset() { *x = GetIamPolicyRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[380] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[380] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRegionNetworkFirewallPolicyRequest) String() string { @@ -52916,7 +52154,7 @@ func (*GetIamPolicyRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetIamPolicyRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[380] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -52977,11 +52215,9 @@ type GetIamPolicyReservationRequest struct { func (x *GetIamPolicyReservationRequest) Reset() { *x = GetIamPolicyReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[381] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[381] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyReservationRequest) String() string { @@ -52992,7 +52228,7 @@ func (*GetIamPolicyReservationRequest) ProtoMessage() {} func (x *GetIamPolicyReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[381] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53053,11 +52289,9 @@ type GetIamPolicyResourcePolicyRequest struct { func (x *GetIamPolicyResourcePolicyRequest) Reset() { *x = GetIamPolicyResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[382] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[382] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyResourcePolicyRequest) String() string { @@ -53068,7 +52302,7 @@ func (*GetIamPolicyResourcePolicyRequest) ProtoMessage() {} func (x *GetIamPolicyResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[382] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53129,11 +52363,9 @@ type GetIamPolicyServiceAttachmentRequest struct { func (x *GetIamPolicyServiceAttachmentRequest) Reset() { *x = GetIamPolicyServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[383] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[383] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyServiceAttachmentRequest) String() string { @@ -53144,7 +52376,7 @@ func (*GetIamPolicyServiceAttachmentRequest) ProtoMessage() {} func (x *GetIamPolicyServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[383] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53203,11 +52435,9 @@ type GetIamPolicySnapshotRequest struct { func (x *GetIamPolicySnapshotRequest) Reset() { *x = GetIamPolicySnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[384] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[384] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicySnapshotRequest) String() string { @@ -53218,7 +52448,7 @@ func (*GetIamPolicySnapshotRequest) ProtoMessage() {} func (x *GetIamPolicySnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[384] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53272,11 +52502,9 @@ type GetIamPolicyStoragePoolRequest struct { func (x *GetIamPolicyStoragePoolRequest) Reset() { *x = GetIamPolicyStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[385] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[385] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyStoragePoolRequest) String() string { @@ -53287,7 +52515,7 @@ func (*GetIamPolicyStoragePoolRequest) ProtoMessage() {} func (x *GetIamPolicyStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[385] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53348,11 +52576,9 @@ type GetIamPolicySubnetworkRequest struct { func (x *GetIamPolicySubnetworkRequest) Reset() { *x = GetIamPolicySubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[386] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[386] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicySubnetworkRequest) String() string { @@ -53363,7 +52589,7 @@ func (*GetIamPolicySubnetworkRequest) ProtoMessage() {} func (x *GetIamPolicySubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[386] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53422,11 +52648,9 @@ type GetImageFamilyViewRequest struct { func (x *GetImageFamilyViewRequest) Reset() { *x = GetImageFamilyViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[387] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[387] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetImageFamilyViewRequest) String() string { @@ -53437,7 +52661,7 @@ func (*GetImageFamilyViewRequest) ProtoMessage() {} func (x *GetImageFamilyViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[387] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53487,11 +52711,9 @@ type GetImageRequest struct { func (x *GetImageRequest) Reset() { *x = GetImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[388] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[388] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetImageRequest) String() string { @@ -53502,7 +52724,7 @@ func (*GetImageRequest) ProtoMessage() {} func (x *GetImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[388] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53547,11 +52769,9 @@ type GetInstanceGroupManagerRequest struct { func (x *GetInstanceGroupManagerRequest) Reset() { *x = GetInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[389] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[389] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceGroupManagerRequest) String() string { @@ -53562,7 +52782,7 @@ func (*GetInstanceGroupManagerRequest) ProtoMessage() {} func (x *GetInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[389] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53616,11 +52836,9 @@ type GetInstanceGroupManagerResizeRequestRequest struct { func (x *GetInstanceGroupManagerResizeRequestRequest) Reset() { *x = GetInstanceGroupManagerResizeRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[390] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[390] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceGroupManagerResizeRequestRequest) String() string { @@ -53631,7 +52849,7 @@ func (*GetInstanceGroupManagerResizeRequestRequest) ProtoMessage() {} func (x *GetInstanceGroupManagerResizeRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[390] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53690,11 +52908,9 @@ type GetInstanceGroupRequest struct { func (x *GetInstanceGroupRequest) Reset() { *x = GetInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[391] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[391] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceGroupRequest) String() string { @@ -53705,7 +52921,7 @@ func (*GetInstanceGroupRequest) ProtoMessage() {} func (x *GetInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[391] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53757,11 +52973,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[392] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[392] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -53772,7 +52986,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[392] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53822,11 +53036,9 @@ type GetInstanceSettingRequest struct { func (x *GetInstanceSettingRequest) Reset() { *x = GetInstanceSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[393] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[393] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceSettingRequest) String() string { @@ -53837,7 +53049,7 @@ func (*GetInstanceSettingRequest) ProtoMessage() {} func (x *GetInstanceSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[393] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53880,11 +53092,9 @@ type GetInstanceTemplateRequest struct { func (x *GetInstanceTemplateRequest) Reset() { *x = GetInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[394] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[394] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceTemplateRequest) String() string { @@ -53895,7 +53105,7 @@ func (*GetInstanceTemplateRequest) ProtoMessage() {} func (x *GetInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[394] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -53940,11 +53150,9 @@ type GetInstantSnapshotRequest struct { func (x *GetInstantSnapshotRequest) Reset() { *x = GetInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[395] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[395] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstantSnapshotRequest) String() string { @@ -53955,7 +53163,7 @@ func (*GetInstantSnapshotRequest) ProtoMessage() {} func (x *GetInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[395] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54007,11 +53215,9 @@ type GetInterconnectAttachmentRequest struct { func (x *GetInterconnectAttachmentRequest) Reset() { *x = GetInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[396] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[396] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectAttachmentRequest) String() string { @@ -54022,7 +53228,7 @@ func (*GetInterconnectAttachmentRequest) ProtoMessage() {} func (x *GetInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[396] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54072,11 +53278,9 @@ type GetInterconnectLocationRequest struct { func (x *GetInterconnectLocationRequest) Reset() { *x = GetInterconnectLocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[397] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[397] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectLocationRequest) String() string { @@ -54087,7 +53291,7 @@ func (*GetInterconnectLocationRequest) ProtoMessage() {} func (x *GetInterconnectLocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[397] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54130,11 +53334,9 @@ type GetInterconnectRemoteLocationRequest struct { func (x *GetInterconnectRemoteLocationRequest) Reset() { *x = GetInterconnectRemoteLocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[398] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[398] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectRemoteLocationRequest) String() string { @@ -54145,7 +53347,7 @@ func (*GetInterconnectRemoteLocationRequest) ProtoMessage() {} func (x *GetInterconnectRemoteLocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[398] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54188,11 +53390,9 @@ type GetInterconnectRequest struct { func (x *GetInterconnectRequest) Reset() { *x = GetInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[399] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[399] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectRequest) String() string { @@ -54203,7 +53403,7 @@ func (*GetInterconnectRequest) ProtoMessage() {} func (x *GetInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[399] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54246,11 +53446,9 @@ type GetLicenseCodeRequest struct { func (x *GetLicenseCodeRequest) Reset() { *x = GetLicenseCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[400] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[400] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLicenseCodeRequest) String() string { @@ -54261,7 +53459,7 @@ func (*GetLicenseCodeRequest) ProtoMessage() {} func (x *GetLicenseCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[400] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54304,11 +53502,9 @@ type GetLicenseRequest struct { func (x *GetLicenseRequest) Reset() { *x = GetLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[401] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[401] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLicenseRequest) String() string { @@ -54319,7 +53515,7 @@ func (*GetLicenseRequest) ProtoMessage() {} func (x *GetLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[401] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54362,11 +53558,9 @@ type GetMachineImageRequest struct { func (x *GetMachineImageRequest) Reset() { *x = GetMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[402] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[402] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMachineImageRequest) String() string { @@ -54377,7 +53571,7 @@ func (*GetMachineImageRequest) ProtoMessage() {} func (x *GetMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[402] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54422,11 +53616,9 @@ type GetMachineTypeRequest struct { func (x *GetMachineTypeRequest) Reset() { *x = GetMachineTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[403] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[403] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMachineTypeRequest) String() string { @@ -54437,7 +53629,7 @@ func (*GetMachineTypeRequest) ProtoMessage() {} func (x *GetMachineTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[403] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54487,11 +53679,9 @@ type GetMacsecConfigInterconnectRequest struct { func (x *GetMacsecConfigInterconnectRequest) Reset() { *x = GetMacsecConfigInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[404] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[404] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMacsecConfigInterconnectRequest) String() string { @@ -54502,7 +53692,7 @@ func (*GetMacsecConfigInterconnectRequest) ProtoMessage() {} func (x *GetMacsecConfigInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[404] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54549,11 +53739,9 @@ type GetNatIpInfoRouterRequest struct { func (x *GetNatIpInfoRouterRequest) Reset() { *x = GetNatIpInfoRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[405] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[405] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNatIpInfoRouterRequest) String() string { @@ -54564,7 +53752,7 @@ func (*GetNatIpInfoRouterRequest) ProtoMessage() {} func (x *GetNatIpInfoRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[405] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54635,11 +53823,9 @@ type GetNatMappingInfoRoutersRequest struct { func (x *GetNatMappingInfoRoutersRequest) Reset() { *x = GetNatMappingInfoRoutersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[406] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[406] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNatMappingInfoRoutersRequest) String() string { @@ -54650,7 +53836,7 @@ func (*GetNatMappingInfoRoutersRequest) ProtoMessage() {} func (x *GetNatMappingInfoRoutersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[406] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54744,11 +53930,9 @@ type GetNetworkAttachmentRequest struct { func (x *GetNetworkAttachmentRequest) Reset() { *x = GetNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[407] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[407] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkAttachmentRequest) String() string { @@ -54759,7 +53943,7 @@ func (*GetNetworkAttachmentRequest) ProtoMessage() {} func (x *GetNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[407] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54811,11 +53995,9 @@ type GetNetworkEdgeSecurityServiceRequest struct { func (x *GetNetworkEdgeSecurityServiceRequest) Reset() { *x = GetNetworkEdgeSecurityServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[408] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[408] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkEdgeSecurityServiceRequest) String() string { @@ -54826,7 +54008,7 @@ func (*GetNetworkEdgeSecurityServiceRequest) ProtoMessage() {} func (x *GetNetworkEdgeSecurityServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[408] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54878,11 +54060,9 @@ type GetNetworkEndpointGroupRequest struct { func (x *GetNetworkEndpointGroupRequest) Reset() { *x = GetNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[409] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[409] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkEndpointGroupRequest) String() string { @@ -54893,7 +54073,7 @@ func (*GetNetworkEndpointGroupRequest) ProtoMessage() {} func (x *GetNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[409] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -54943,11 +54123,9 @@ type GetNetworkFirewallPolicyRequest struct { func (x *GetNetworkFirewallPolicyRequest) Reset() { *x = GetNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[410] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[410] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkFirewallPolicyRequest) String() string { @@ -54958,7 +54136,7 @@ func (*GetNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[410] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55001,11 +54179,9 @@ type GetNetworkProfileRequest struct { func (x *GetNetworkProfileRequest) Reset() { *x = GetNetworkProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[411] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[411] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkProfileRequest) String() string { @@ -55016,7 +54192,7 @@ func (*GetNetworkProfileRequest) ProtoMessage() {} func (x *GetNetworkProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[411] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55059,11 +54235,9 @@ type GetNetworkRequest struct { func (x *GetNetworkRequest) Reset() { *x = GetNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[412] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[412] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkRequest) String() string { @@ -55074,7 +54248,7 @@ func (*GetNetworkRequest) ProtoMessage() {} func (x *GetNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[412] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55119,11 +54293,9 @@ type GetNodeGroupRequest struct { func (x *GetNodeGroupRequest) Reset() { *x = GetNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[413] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[413] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeGroupRequest) String() string { @@ -55134,7 +54306,7 @@ func (*GetNodeGroupRequest) ProtoMessage() {} func (x *GetNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[413] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55186,11 +54358,9 @@ type GetNodeTemplateRequest struct { func (x *GetNodeTemplateRequest) Reset() { *x = GetNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[414] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[414] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeTemplateRequest) String() string { @@ -55201,7 +54371,7 @@ func (*GetNodeTemplateRequest) ProtoMessage() {} func (x *GetNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[414] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55253,11 +54423,9 @@ type GetNodeTypeRequest struct { func (x *GetNodeTypeRequest) Reset() { *x = GetNodeTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[415] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[415] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeTypeRequest) String() string { @@ -55268,7 +54436,7 @@ func (*GetNodeTypeRequest) ProtoMessage() {} func (x *GetNodeTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[415] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55320,11 +54488,9 @@ type GetPacketMirroringRequest struct { func (x *GetPacketMirroringRequest) Reset() { *x = GetPacketMirroringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[416] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[416] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPacketMirroringRequest) String() string { @@ -55335,7 +54501,7 @@ func (*GetPacketMirroringRequest) ProtoMessage() {} func (x *GetPacketMirroringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[416] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55383,11 +54549,9 @@ type GetProjectRequest struct { func (x *GetProjectRequest) Reset() { *x = GetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[417] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[417] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectRequest) String() string { @@ -55398,7 +54562,7 @@ func (*GetProjectRequest) ProtoMessage() {} func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[417] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55434,11 +54598,9 @@ type GetPublicAdvertisedPrefixeRequest struct { func (x *GetPublicAdvertisedPrefixeRequest) Reset() { *x = GetPublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[418] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[418] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublicAdvertisedPrefixeRequest) String() string { @@ -55449,7 +54611,7 @@ func (*GetPublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *GetPublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[418] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55494,11 +54656,9 @@ type GetPublicDelegatedPrefixeRequest struct { func (x *GetPublicDelegatedPrefixeRequest) Reset() { *x = GetPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[419] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[419] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublicDelegatedPrefixeRequest) String() string { @@ -55509,7 +54669,7 @@ func (*GetPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *GetPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[419] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55561,11 +54721,9 @@ type GetRegionAutoscalerRequest struct { func (x *GetRegionAutoscalerRequest) Reset() { *x = GetRegionAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[420] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[420] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionAutoscalerRequest) String() string { @@ -55576,7 +54734,7 @@ func (*GetRegionAutoscalerRequest) ProtoMessage() {} func (x *GetRegionAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[420] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55628,11 +54786,9 @@ type GetRegionBackendServiceRequest struct { func (x *GetRegionBackendServiceRequest) Reset() { *x = GetRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[421] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[421] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionBackendServiceRequest) String() string { @@ -55643,7 +54799,7 @@ func (*GetRegionBackendServiceRequest) ProtoMessage() {} func (x *GetRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[421] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55695,11 +54851,9 @@ type GetRegionCommitmentRequest struct { func (x *GetRegionCommitmentRequest) Reset() { *x = GetRegionCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[422] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[422] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionCommitmentRequest) String() string { @@ -55710,7 +54864,7 @@ func (*GetRegionCommitmentRequest) ProtoMessage() {} func (x *GetRegionCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[422] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55762,11 +54916,9 @@ type GetRegionDiskRequest struct { func (x *GetRegionDiskRequest) Reset() { *x = GetRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[423] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[423] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionDiskRequest) String() string { @@ -55777,7 +54929,7 @@ func (*GetRegionDiskRequest) ProtoMessage() {} func (x *GetRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[423] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55829,11 +54981,9 @@ type GetRegionDiskTypeRequest struct { func (x *GetRegionDiskTypeRequest) Reset() { *x = GetRegionDiskTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[424] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[424] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionDiskTypeRequest) String() string { @@ -55844,7 +54994,7 @@ func (*GetRegionDiskTypeRequest) ProtoMessage() {} func (x *GetRegionDiskTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[424] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55896,11 +55046,9 @@ type GetRegionHealthCheckRequest struct { func (x *GetRegionHealthCheckRequest) Reset() { *x = GetRegionHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[425] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[425] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionHealthCheckRequest) String() string { @@ -55911,7 +55059,7 @@ func (*GetRegionHealthCheckRequest) ProtoMessage() {} func (x *GetRegionHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[425] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -55963,11 +55111,9 @@ type GetRegionHealthCheckServiceRequest struct { func (x *GetRegionHealthCheckServiceRequest) Reset() { *x = GetRegionHealthCheckServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[426] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[426] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionHealthCheckServiceRequest) String() string { @@ -55978,7 +55124,7 @@ func (*GetRegionHealthCheckServiceRequest) ProtoMessage() {} func (x *GetRegionHealthCheckServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[426] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56030,11 +55176,9 @@ type GetRegionInstanceGroupManagerRequest struct { func (x *GetRegionInstanceGroupManagerRequest) Reset() { *x = GetRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[427] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[427] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionInstanceGroupManagerRequest) String() string { @@ -56045,7 +55189,7 @@ func (*GetRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *GetRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[427] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56097,11 +55241,9 @@ type GetRegionInstanceGroupRequest struct { func (x *GetRegionInstanceGroupRequest) Reset() { *x = GetRegionInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[428] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[428] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionInstanceGroupRequest) String() string { @@ -56112,7 +55254,7 @@ func (*GetRegionInstanceGroupRequest) ProtoMessage() {} func (x *GetRegionInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[428] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56164,11 +55306,9 @@ type GetRegionInstanceTemplateRequest struct { func (x *GetRegionInstanceTemplateRequest) Reset() { *x = GetRegionInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[429] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[429] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionInstanceTemplateRequest) String() string { @@ -56179,7 +55319,7 @@ func (*GetRegionInstanceTemplateRequest) ProtoMessage() {} func (x *GetRegionInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[429] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56231,11 +55371,9 @@ type GetRegionInstantSnapshotRequest struct { func (x *GetRegionInstantSnapshotRequest) Reset() { *x = GetRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[430] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[430] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionInstantSnapshotRequest) String() string { @@ -56246,7 +55384,7 @@ func (*GetRegionInstantSnapshotRequest) ProtoMessage() {} func (x *GetRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[430] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56298,11 +55436,9 @@ type GetRegionNetworkEndpointGroupRequest struct { func (x *GetRegionNetworkEndpointGroupRequest) Reset() { *x = GetRegionNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[431] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[431] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionNetworkEndpointGroupRequest) String() string { @@ -56313,7 +55449,7 @@ func (*GetRegionNetworkEndpointGroupRequest) ProtoMessage() {} func (x *GetRegionNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[431] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56365,11 +55501,9 @@ type GetRegionNetworkFirewallPolicyRequest struct { func (x *GetRegionNetworkFirewallPolicyRequest) Reset() { *x = GetRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[432] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[432] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionNetworkFirewallPolicyRequest) String() string { @@ -56380,7 +55514,7 @@ func (*GetRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[432] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56432,11 +55566,9 @@ type GetRegionNotificationEndpointRequest struct { func (x *GetRegionNotificationEndpointRequest) Reset() { *x = GetRegionNotificationEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[433] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[433] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionNotificationEndpointRequest) String() string { @@ -56447,7 +55579,7 @@ func (*GetRegionNotificationEndpointRequest) ProtoMessage() {} func (x *GetRegionNotificationEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[433] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56499,11 +55631,9 @@ type GetRegionOperationRequest struct { func (x *GetRegionOperationRequest) Reset() { *x = GetRegionOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[434] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[434] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionOperationRequest) String() string { @@ -56514,7 +55644,7 @@ func (*GetRegionOperationRequest) ProtoMessage() {} func (x *GetRegionOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[434] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56564,11 +55694,9 @@ type GetRegionRequest struct { func (x *GetRegionRequest) Reset() { *x = GetRegionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[435] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[435] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionRequest) String() string { @@ -56579,7 +55707,7 @@ func (*GetRegionRequest) ProtoMessage() {} func (x *GetRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[435] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56624,11 +55752,9 @@ type GetRegionSecurityPolicyRequest struct { func (x *GetRegionSecurityPolicyRequest) Reset() { *x = GetRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[436] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[436] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionSecurityPolicyRequest) String() string { @@ -56639,7 +55765,7 @@ func (*GetRegionSecurityPolicyRequest) ProtoMessage() {} func (x *GetRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[436] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56691,11 +55817,9 @@ type GetRegionSslCertificateRequest struct { func (x *GetRegionSslCertificateRequest) Reset() { *x = GetRegionSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[437] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[437] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionSslCertificateRequest) String() string { @@ -56706,7 +55830,7 @@ func (*GetRegionSslCertificateRequest) ProtoMessage() {} func (x *GetRegionSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[437] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56758,11 +55882,9 @@ type GetRegionSslPolicyRequest struct { func (x *GetRegionSslPolicyRequest) Reset() { *x = GetRegionSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[438] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[438] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionSslPolicyRequest) String() string { @@ -56773,7 +55895,7 @@ func (*GetRegionSslPolicyRequest) ProtoMessage() {} func (x *GetRegionSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[438] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56825,11 +55947,9 @@ type GetRegionTargetHttpProxyRequest struct { func (x *GetRegionTargetHttpProxyRequest) Reset() { *x = GetRegionTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[439] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[439] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionTargetHttpProxyRequest) String() string { @@ -56840,7 +55960,7 @@ func (*GetRegionTargetHttpProxyRequest) ProtoMessage() {} func (x *GetRegionTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[439] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56892,11 +56012,9 @@ type GetRegionTargetHttpsProxyRequest struct { func (x *GetRegionTargetHttpsProxyRequest) Reset() { *x = GetRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[440] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[440] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionTargetHttpsProxyRequest) String() string { @@ -56907,7 +56025,7 @@ func (*GetRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *GetRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[440] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -56959,11 +56077,9 @@ type GetRegionTargetTcpProxyRequest struct { func (x *GetRegionTargetTcpProxyRequest) Reset() { *x = GetRegionTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[441] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[441] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionTargetTcpProxyRequest) String() string { @@ -56974,7 +56090,7 @@ func (*GetRegionTargetTcpProxyRequest) ProtoMessage() {} func (x *GetRegionTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[441] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57026,11 +56142,9 @@ type GetRegionUrlMapRequest struct { func (x *GetRegionUrlMapRequest) Reset() { *x = GetRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[442] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[442] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionUrlMapRequest) String() string { @@ -57041,7 +56155,7 @@ func (*GetRegionUrlMapRequest) ProtoMessage() {} func (x *GetRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[442] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57093,11 +56207,9 @@ type GetReservationRequest struct { func (x *GetReservationRequest) Reset() { *x = GetReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[443] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[443] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReservationRequest) String() string { @@ -57108,7 +56220,7 @@ func (*GetReservationRequest) ProtoMessage() {} func (x *GetReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[443] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57160,11 +56272,9 @@ type GetResourcePolicyRequest struct { func (x *GetResourcePolicyRequest) Reset() { *x = GetResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[444] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[444] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResourcePolicyRequest) String() string { @@ -57175,7 +56285,7 @@ func (*GetResourcePolicyRequest) ProtoMessage() {} func (x *GetResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[444] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57225,11 +56335,9 @@ type GetRouteRequest struct { func (x *GetRouteRequest) Reset() { *x = GetRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[445] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[445] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouteRequest) String() string { @@ -57240,7 +56348,7 @@ func (*GetRouteRequest) ProtoMessage() {} func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[445] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57285,11 +56393,9 @@ type GetRouterRequest struct { func (x *GetRouterRequest) Reset() { *x = GetRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[446] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[446] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouterRequest) String() string { @@ -57300,7 +56406,7 @@ func (*GetRouterRequest) ProtoMessage() {} func (x *GetRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[446] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57352,11 +56458,9 @@ type GetRouterStatusRouterRequest struct { func (x *GetRouterStatusRouterRequest) Reset() { *x = GetRouterStatusRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[447] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[447] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouterStatusRouterRequest) String() string { @@ -57367,7 +56471,7 @@ func (*GetRouterStatusRouterRequest) ProtoMessage() {} func (x *GetRouterStatusRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[447] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57417,11 +56521,9 @@ type GetRuleFirewallPolicyRequest struct { func (x *GetRuleFirewallPolicyRequest) Reset() { *x = GetRuleFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[448] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[448] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleFirewallPolicyRequest) String() string { @@ -57432,7 +56534,7 @@ func (*GetRuleFirewallPolicyRequest) ProtoMessage() {} func (x *GetRuleFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[448] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57477,11 +56579,9 @@ type GetRuleNetworkFirewallPolicyRequest struct { func (x *GetRuleNetworkFirewallPolicyRequest) Reset() { *x = GetRuleNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[449] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[449] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleNetworkFirewallPolicyRequest) String() string { @@ -57492,7 +56592,7 @@ func (*GetRuleNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetRuleNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[449] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57546,11 +56646,9 @@ type GetRuleRegionNetworkFirewallPolicyRequest struct { func (x *GetRuleRegionNetworkFirewallPolicyRequest) Reset() { *x = GetRuleRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[450] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[450] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleRegionNetworkFirewallPolicyRequest) String() string { @@ -57561,7 +56659,7 @@ func (*GetRuleRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *GetRuleRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[450] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57622,11 +56720,9 @@ type GetRuleRegionSecurityPolicyRequest struct { func (x *GetRuleRegionSecurityPolicyRequest) Reset() { *x = GetRuleRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[451] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[451] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleRegionSecurityPolicyRequest) String() string { @@ -57637,7 +56733,7 @@ func (*GetRuleRegionSecurityPolicyRequest) ProtoMessage() {} func (x *GetRuleRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[451] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57696,11 +56792,9 @@ type GetRuleSecurityPolicyRequest struct { func (x *GetRuleSecurityPolicyRequest) Reset() { *x = GetRuleSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[452] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[452] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuleSecurityPolicyRequest) String() string { @@ -57711,7 +56805,7 @@ func (*GetRuleSecurityPolicyRequest) ProtoMessage() {} func (x *GetRuleSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[452] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57763,11 +56857,9 @@ type GetScreenshotInstanceRequest struct { func (x *GetScreenshotInstanceRequest) Reset() { *x = GetScreenshotInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[453] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[453] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScreenshotInstanceRequest) String() string { @@ -57778,7 +56870,7 @@ func (*GetScreenshotInstanceRequest) ProtoMessage() {} func (x *GetScreenshotInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[453] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57828,11 +56920,9 @@ type GetSecurityPolicyRequest struct { func (x *GetSecurityPolicyRequest) Reset() { *x = GetSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[454] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[454] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecurityPolicyRequest) String() string { @@ -57843,7 +56933,7 @@ func (*GetSecurityPolicyRequest) ProtoMessage() {} func (x *GetSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[454] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57892,11 +56982,9 @@ type GetSerialPortOutputInstanceRequest struct { func (x *GetSerialPortOutputInstanceRequest) Reset() { *x = GetSerialPortOutputInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[455] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[455] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSerialPortOutputInstanceRequest) String() string { @@ -57907,7 +56995,7 @@ func (*GetSerialPortOutputInstanceRequest) ProtoMessage() {} func (x *GetSerialPortOutputInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[455] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -57973,11 +57061,9 @@ type GetServiceAttachmentRequest struct { func (x *GetServiceAttachmentRequest) Reset() { *x = GetServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[456] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[456] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceAttachmentRequest) String() string { @@ -57988,7 +57074,7 @@ func (*GetServiceAttachmentRequest) ProtoMessage() {} func (x *GetServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[456] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58040,11 +57126,9 @@ type GetShieldedInstanceIdentityInstanceRequest struct { func (x *GetShieldedInstanceIdentityInstanceRequest) Reset() { *x = GetShieldedInstanceIdentityInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[457] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[457] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetShieldedInstanceIdentityInstanceRequest) String() string { @@ -58055,7 +57139,7 @@ func (*GetShieldedInstanceIdentityInstanceRequest) ProtoMessage() {} func (x *GetShieldedInstanceIdentityInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[457] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58105,11 +57189,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[458] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[458] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -58120,7 +57202,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[458] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58161,11 +57243,9 @@ type GetSnapshotSettingRequest struct { func (x *GetSnapshotSettingRequest) Reset() { *x = GetSnapshotSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[459] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[459] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotSettingRequest) String() string { @@ -58176,7 +57256,7 @@ func (*GetSnapshotSettingRequest) ProtoMessage() {} func (x *GetSnapshotSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[459] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58212,11 +57292,9 @@ type GetSslCertificateRequest struct { func (x *GetSslCertificateRequest) Reset() { *x = GetSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[460] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[460] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSslCertificateRequest) String() string { @@ -58227,7 +57305,7 @@ func (*GetSslCertificateRequest) ProtoMessage() {} func (x *GetSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[460] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58270,11 +57348,9 @@ type GetSslPolicyRequest struct { func (x *GetSslPolicyRequest) Reset() { *x = GetSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[461] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[461] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSslPolicyRequest) String() string { @@ -58285,7 +57361,7 @@ func (*GetSslPolicyRequest) ProtoMessage() {} func (x *GetSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[461] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58330,11 +57406,9 @@ type GetStatusVpnGatewayRequest struct { func (x *GetStatusVpnGatewayRequest) Reset() { *x = GetStatusVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[462] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[462] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStatusVpnGatewayRequest) String() string { @@ -58345,7 +57419,7 @@ func (*GetStatusVpnGatewayRequest) ProtoMessage() {} func (x *GetStatusVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[462] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58397,11 +57471,9 @@ type GetStoragePoolRequest struct { func (x *GetStoragePoolRequest) Reset() { *x = GetStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[463] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[463] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStoragePoolRequest) String() string { @@ -58412,7 +57484,7 @@ func (*GetStoragePoolRequest) ProtoMessage() {} func (x *GetStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[463] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58464,11 +57536,9 @@ type GetStoragePoolTypeRequest struct { func (x *GetStoragePoolTypeRequest) Reset() { *x = GetStoragePoolTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[464] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[464] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStoragePoolTypeRequest) String() string { @@ -58479,7 +57549,7 @@ func (*GetStoragePoolTypeRequest) ProtoMessage() {} func (x *GetStoragePoolTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[464] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58531,11 +57601,9 @@ type GetSubnetworkRequest struct { func (x *GetSubnetworkRequest) Reset() { *x = GetSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[465] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[465] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubnetworkRequest) String() string { @@ -58546,7 +57614,7 @@ func (*GetSubnetworkRequest) ProtoMessage() {} func (x *GetSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[465] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58596,11 +57664,9 @@ type GetTargetGrpcProxyRequest struct { func (x *GetTargetGrpcProxyRequest) Reset() { *x = GetTargetGrpcProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[466] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[466] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetGrpcProxyRequest) String() string { @@ -58611,7 +57677,7 @@ func (*GetTargetGrpcProxyRequest) ProtoMessage() {} func (x *GetTargetGrpcProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[466] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58654,11 +57720,9 @@ type GetTargetHttpProxyRequest struct { func (x *GetTargetHttpProxyRequest) Reset() { *x = GetTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[467] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[467] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetHttpProxyRequest) String() string { @@ -58669,7 +57733,7 @@ func (*GetTargetHttpProxyRequest) ProtoMessage() {} func (x *GetTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[467] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58712,11 +57776,9 @@ type GetTargetHttpsProxyRequest struct { func (x *GetTargetHttpsProxyRequest) Reset() { *x = GetTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[468] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[468] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetHttpsProxyRequest) String() string { @@ -58727,7 +57789,7 @@ func (*GetTargetHttpsProxyRequest) ProtoMessage() {} func (x *GetTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[468] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58772,11 +57834,9 @@ type GetTargetInstanceRequest struct { func (x *GetTargetInstanceRequest) Reset() { *x = GetTargetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[469] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[469] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetInstanceRequest) String() string { @@ -58787,7 +57847,7 @@ func (*GetTargetInstanceRequest) ProtoMessage() {} func (x *GetTargetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[469] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58839,11 +57899,9 @@ type GetTargetPoolRequest struct { func (x *GetTargetPoolRequest) Reset() { *x = GetTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[470] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[470] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetPoolRequest) String() string { @@ -58854,7 +57912,7 @@ func (*GetTargetPoolRequest) ProtoMessage() {} func (x *GetTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[470] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58904,11 +57962,9 @@ type GetTargetSslProxyRequest struct { func (x *GetTargetSslProxyRequest) Reset() { *x = GetTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[471] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[471] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetSslProxyRequest) String() string { @@ -58919,7 +57975,7 @@ func (*GetTargetSslProxyRequest) ProtoMessage() {} func (x *GetTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[471] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -58962,11 +58018,9 @@ type GetTargetTcpProxyRequest struct { func (x *GetTargetTcpProxyRequest) Reset() { *x = GetTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[472] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[472] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetTcpProxyRequest) String() string { @@ -58977,7 +58031,7 @@ func (*GetTargetTcpProxyRequest) ProtoMessage() {} func (x *GetTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[472] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59022,11 +58076,9 @@ type GetTargetVpnGatewayRequest struct { func (x *GetTargetVpnGatewayRequest) Reset() { *x = GetTargetVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[473] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[473] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetVpnGatewayRequest) String() string { @@ -59037,7 +58089,7 @@ func (*GetTargetVpnGatewayRequest) ProtoMessage() {} func (x *GetTargetVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[473] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59087,11 +58139,9 @@ type GetUrlMapRequest struct { func (x *GetUrlMapRequest) Reset() { *x = GetUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[474] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[474] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUrlMapRequest) String() string { @@ -59102,7 +58152,7 @@ func (*GetUrlMapRequest) ProtoMessage() {} func (x *GetUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[474] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59147,11 +58197,9 @@ type GetVpnGatewayRequest struct { func (x *GetVpnGatewayRequest) Reset() { *x = GetVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[475] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[475] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVpnGatewayRequest) String() string { @@ -59162,7 +58210,7 @@ func (*GetVpnGatewayRequest) ProtoMessage() {} func (x *GetVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[475] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59214,11 +58262,9 @@ type GetVpnTunnelRequest struct { func (x *GetVpnTunnelRequest) Reset() { *x = GetVpnTunnelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[476] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[476] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVpnTunnelRequest) String() string { @@ -59229,7 +58275,7 @@ func (*GetVpnTunnelRequest) ProtoMessage() {} func (x *GetVpnTunnelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[476] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59277,11 +58323,9 @@ type GetXpnHostProjectRequest struct { func (x *GetXpnHostProjectRequest) Reset() { *x = GetXpnHostProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[477] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[477] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetXpnHostProjectRequest) String() string { @@ -59292,7 +58336,7 @@ func (*GetXpnHostProjectRequest) ProtoMessage() {} func (x *GetXpnHostProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[477] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59336,11 +58380,9 @@ type GetXpnResourcesProjectsRequest struct { func (x *GetXpnResourcesProjectsRequest) Reset() { *x = GetXpnResourcesProjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[478] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[478] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetXpnResourcesProjectsRequest) String() string { @@ -59351,7 +58393,7 @@ func (*GetXpnResourcesProjectsRequest) ProtoMessage() {} func (x *GetXpnResourcesProjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[478] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59424,11 +58466,9 @@ type GetZoneOperationRequest struct { func (x *GetZoneOperationRequest) Reset() { *x = GetZoneOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[479] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[479] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetZoneOperationRequest) String() string { @@ -59439,7 +58479,7 @@ func (*GetZoneOperationRequest) ProtoMessage() {} func (x *GetZoneOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[479] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59489,11 +58529,9 @@ type GetZoneRequest struct { func (x *GetZoneRequest) Reset() { *x = GetZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[480] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[480] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetZoneRequest) String() string { @@ -59504,7 +58542,7 @@ func (*GetZoneRequest) ProtoMessage() {} func (x *GetZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[480] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59546,11 +58584,9 @@ type GlobalAddressesMoveRequest struct { func (x *GlobalAddressesMoveRequest) Reset() { *x = GlobalAddressesMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[481] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[481] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalAddressesMoveRequest) String() string { @@ -59561,7 +58597,7 @@ func (*GlobalAddressesMoveRequest) ProtoMessage() {} func (x *GlobalAddressesMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[481] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59601,11 +58637,9 @@ type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { func (x *GlobalNetworkEndpointGroupsAttachEndpointsRequest) Reset() { *x = GlobalNetworkEndpointGroupsAttachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[482] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[482] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalNetworkEndpointGroupsAttachEndpointsRequest) String() string { @@ -59616,7 +58650,7 @@ func (*GlobalNetworkEndpointGroupsAttachEndpointsRequest) ProtoMessage() {} func (x *GlobalNetworkEndpointGroupsAttachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[482] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59649,11 +58683,9 @@ type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { func (x *GlobalNetworkEndpointGroupsDetachEndpointsRequest) Reset() { *x = GlobalNetworkEndpointGroupsDetachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[483] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[483] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalNetworkEndpointGroupsDetachEndpointsRequest) String() string { @@ -59664,7 +58696,7 @@ func (*GlobalNetworkEndpointGroupsDetachEndpointsRequest) ProtoMessage() {} func (x *GlobalNetworkEndpointGroupsDetachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[483] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59701,11 +58733,9 @@ type GlobalOrganizationSetPolicyRequest struct { func (x *GlobalOrganizationSetPolicyRequest) Reset() { *x = GlobalOrganizationSetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[484] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[484] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalOrganizationSetPolicyRequest) String() string { @@ -59716,7 +58746,7 @@ func (*GlobalOrganizationSetPolicyRequest) ProtoMessage() {} func (x *GlobalOrganizationSetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[484] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59765,11 +58795,9 @@ type GlobalSetLabelsRequest struct { func (x *GlobalSetLabelsRequest) Reset() { *x = GlobalSetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[485] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[485] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalSetLabelsRequest) String() string { @@ -59780,7 +58808,7 @@ func (*GlobalSetLabelsRequest) ProtoMessage() {} func (x *GlobalSetLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[485] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59824,11 +58852,9 @@ type GlobalSetPolicyRequest struct { func (x *GlobalSetPolicyRequest) Reset() { *x = GlobalSetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[486] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[486] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlobalSetPolicyRequest) String() string { @@ -59839,7 +58865,7 @@ func (*GlobalSetPolicyRequest) ProtoMessage() {} func (x *GlobalSetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[486] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59897,11 +58923,9 @@ type GuestAttributes struct { func (x *GuestAttributes) Reset() { *x = GuestAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[487] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[487] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestAttributes) String() string { @@ -59912,7 +58936,7 @@ func (*GuestAttributes) ProtoMessage() {} func (x *GuestAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[487] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -59985,11 +59009,9 @@ type GuestAttributesEntry struct { func (x *GuestAttributesEntry) Reset() { *x = GuestAttributesEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[488] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[488] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestAttributesEntry) String() string { @@ -60000,7 +59022,7 @@ func (*GuestAttributesEntry) ProtoMessage() {} func (x *GuestAttributesEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[488] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60047,11 +59069,9 @@ type GuestAttributesValue struct { func (x *GuestAttributesValue) Reset() { *x = GuestAttributesValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[489] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[489] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestAttributesValue) String() string { @@ -60062,7 +59082,7 @@ func (*GuestAttributesValue) ProtoMessage() {} func (x *GuestAttributesValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[489] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60097,11 +59117,9 @@ type GuestOsFeature struct { func (x *GuestOsFeature) Reset() { *x = GuestOsFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[490] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[490] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestOsFeature) String() string { @@ -60112,7 +59130,7 @@ func (*GuestOsFeature) ProtoMessage() {} func (x *GuestOsFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[490] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60159,11 +59177,9 @@ type HTTP2HealthCheck struct { func (x *HTTP2HealthCheck) Reset() { *x = HTTP2HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[491] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[491] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HTTP2HealthCheck) String() string { @@ -60174,7 +59190,7 @@ func (*HTTP2HealthCheck) ProtoMessage() {} func (x *HTTP2HealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[491] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60263,11 +59279,9 @@ type HTTPHealthCheck struct { func (x *HTTPHealthCheck) Reset() { *x = HTTPHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[492] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[492] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HTTPHealthCheck) String() string { @@ -60278,7 +59292,7 @@ func (*HTTPHealthCheck) ProtoMessage() {} func (x *HTTPHealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[492] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60367,11 +59381,9 @@ type HTTPSHealthCheck struct { func (x *HTTPSHealthCheck) Reset() { *x = HTTPSHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[493] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[493] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HTTPSHealthCheck) String() string { @@ -60382,7 +59394,7 @@ func (*HTTPSHealthCheck) ProtoMessage() {} func (x *HTTPSHealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[493] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60491,11 +59503,9 @@ type HealthCheck struct { func (x *HealthCheck) Reset() { *x = HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[494] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[494] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheck) String() string { @@ -60506,7 +59516,7 @@ func (*HealthCheck) ProtoMessage() {} func (x *HealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[494] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60683,11 +59693,9 @@ type HealthCheckList struct { func (x *HealthCheckList) Reset() { *x = HealthCheckList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[495] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[495] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckList) String() string { @@ -60698,7 +59706,7 @@ func (*HealthCheckList) ProtoMessage() {} func (x *HealthCheckList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[495] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60767,11 +59775,9 @@ type HealthCheckLogConfig struct { func (x *HealthCheckLogConfig) Reset() { *x = HealthCheckLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[496] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[496] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckLogConfig) String() string { @@ -60782,7 +59788,7 @@ func (*HealthCheckLogConfig) ProtoMessage() {} func (x *HealthCheckLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[496] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60815,11 +59821,9 @@ type HealthCheckReference struct { func (x *HealthCheckReference) Reset() { *x = HealthCheckReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[497] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[497] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckReference) String() string { @@ -60830,7 +59834,7 @@ func (*HealthCheckReference) ProtoMessage() {} func (x *HealthCheckReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[497] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -60887,11 +59891,9 @@ type HealthCheckService struct { func (x *HealthCheckService) Reset() { *x = HealthCheckService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[498] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[498] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckService) String() string { @@ -60902,7 +59904,7 @@ func (*HealthCheckService) ProtoMessage() {} func (x *HealthCheckService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[498] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61012,11 +60014,9 @@ type HealthCheckServiceReference struct { func (x *HealthCheckServiceReference) Reset() { *x = HealthCheckServiceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[499] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[499] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckServiceReference) String() string { @@ -61027,7 +60027,7 @@ func (*HealthCheckServiceReference) ProtoMessage() {} func (x *HealthCheckServiceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[499] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61070,11 +60070,9 @@ type HealthCheckServicesList struct { func (x *HealthCheckServicesList) Reset() { *x = HealthCheckServicesList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[500] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[500] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckServicesList) String() string { @@ -61085,7 +60083,7 @@ func (*HealthCheckServicesList) ProtoMessage() {} func (x *HealthCheckServicesList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[500] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61165,11 +60163,9 @@ type HealthChecksAggregatedList struct { func (x *HealthChecksAggregatedList) Reset() { *x = HealthChecksAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[501] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[501] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthChecksAggregatedList) String() string { @@ -61180,7 +60176,7 @@ func (*HealthChecksAggregatedList) ProtoMessage() {} func (x *HealthChecksAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[501] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61257,11 +60253,9 @@ type HealthChecksScopedList struct { func (x *HealthChecksScopedList) Reset() { *x = HealthChecksScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[502] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[502] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthChecksScopedList) String() string { @@ -61272,7 +60266,7 @@ func (*HealthChecksScopedList) ProtoMessage() {} func (x *HealthChecksScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[502] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61332,11 +60326,9 @@ type HealthStatus struct { func (x *HealthStatus) Reset() { *x = HealthStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[503] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[503] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthStatus) String() string { @@ -61347,7 +60339,7 @@ func (*HealthStatus) ProtoMessage() {} func (x *HealthStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[503] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61462,11 +60454,9 @@ type HealthStatusForNetworkEndpoint struct { func (x *HealthStatusForNetworkEndpoint) Reset() { *x = HealthStatusForNetworkEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[504] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[504] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthStatusForNetworkEndpoint) String() string { @@ -61477,7 +60467,7 @@ func (*HealthStatusForNetworkEndpoint) ProtoMessage() {} func (x *HealthStatusForNetworkEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[504] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61546,11 +60536,9 @@ type Help struct { func (x *Help) Reset() { *x = Help{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[505] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[505] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Help) String() string { @@ -61561,7 +60549,7 @@ func (*Help) ProtoMessage() {} func (x *Help) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[505] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61597,11 +60585,9 @@ type HelpLink struct { func (x *HelpLink) Reset() { *x = HelpLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[506] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[506] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HelpLink) String() string { @@ -61612,7 +60598,7 @@ func (*HelpLink) ProtoMessage() {} func (x *HelpLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[506] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61657,11 +60643,9 @@ type HostRule struct { func (x *HostRule) Reset() { *x = HostRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[507] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[507] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostRule) String() string { @@ -61672,7 +60656,7 @@ func (*HostRule) ProtoMessage() {} func (x *HostRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[507] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61722,11 +60706,9 @@ type HttpFaultAbort struct { func (x *HttpFaultAbort) Reset() { *x = HttpFaultAbort{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[508] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[508] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpFaultAbort) String() string { @@ -61737,7 +60719,7 @@ func (*HttpFaultAbort) ProtoMessage() {} func (x *HttpFaultAbort) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[508] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61780,11 +60762,9 @@ type HttpFaultDelay struct { func (x *HttpFaultDelay) Reset() { *x = HttpFaultDelay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[509] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[509] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpFaultDelay) String() string { @@ -61795,7 +60775,7 @@ func (*HttpFaultDelay) ProtoMessage() {} func (x *HttpFaultDelay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[509] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61838,11 +60818,9 @@ type HttpFaultInjection struct { func (x *HttpFaultInjection) Reset() { *x = HttpFaultInjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[510] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[510] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpFaultInjection) String() string { @@ -61853,7 +60831,7 @@ func (*HttpFaultInjection) ProtoMessage() {} func (x *HttpFaultInjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[510] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61900,11 +60878,9 @@ type HttpHeaderAction struct { func (x *HttpHeaderAction) Reset() { *x = HttpHeaderAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[511] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[511] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpHeaderAction) String() string { @@ -61915,7 +60891,7 @@ func (*HttpHeaderAction) ProtoMessage() {} func (x *HttpHeaderAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[511] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -61984,11 +60960,9 @@ type HttpHeaderMatch struct { func (x *HttpHeaderMatch) Reset() { *x = HttpHeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[512] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[512] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpHeaderMatch) String() string { @@ -61999,7 +60973,7 @@ func (*HttpHeaderMatch) ProtoMessage() {} func (x *HttpHeaderMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[512] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62086,11 +61060,9 @@ type HttpHeaderOption struct { func (x *HttpHeaderOption) Reset() { *x = HttpHeaderOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[513] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[513] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpHeaderOption) String() string { @@ -62101,7 +61073,7 @@ func (*HttpHeaderOption) ProtoMessage() {} func (x *HttpHeaderOption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[513] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62155,11 +61127,9 @@ type HttpQueryParameterMatch struct { func (x *HttpQueryParameterMatch) Reset() { *x = HttpQueryParameterMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[514] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[514] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpQueryParameterMatch) String() string { @@ -62170,7 +61140,7 @@ func (*HttpQueryParameterMatch) ProtoMessage() {} func (x *HttpQueryParameterMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[514] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62236,11 +61206,9 @@ type HttpRedirectAction struct { func (x *HttpRedirectAction) Reset() { *x = HttpRedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[515] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[515] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRedirectAction) String() string { @@ -62251,7 +61219,7 @@ func (*HttpRedirectAction) ProtoMessage() {} func (x *HttpRedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[515] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62324,11 +61292,9 @@ type HttpRetryPolicy struct { func (x *HttpRetryPolicy) Reset() { *x = HttpRetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[516] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[516] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRetryPolicy) String() string { @@ -62339,7 +61305,7 @@ func (*HttpRetryPolicy) ProtoMessage() {} func (x *HttpRetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[516] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62400,11 +61366,9 @@ type HttpRouteAction struct { func (x *HttpRouteAction) Reset() { *x = HttpRouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[517] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[517] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRouteAction) String() string { @@ -62415,7 +61379,7 @@ func (*HttpRouteAction) ProtoMessage() {} func (x *HttpRouteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[517] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62512,11 +61476,9 @@ type HttpRouteRule struct { func (x *HttpRouteRule) Reset() { *x = HttpRouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[518] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[518] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRouteRule) String() string { @@ -62527,7 +61489,7 @@ func (*HttpRouteRule) ProtoMessage() {} func (x *HttpRouteRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[518] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62624,11 +61586,9 @@ type HttpRouteRuleMatch struct { func (x *HttpRouteRuleMatch) Reset() { *x = HttpRouteRuleMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[519] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[519] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRouteRuleMatch) String() string { @@ -62639,7 +61599,7 @@ func (*HttpRouteRuleMatch) ProtoMessage() {} func (x *HttpRouteRuleMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[519] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62791,11 +61751,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[520] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[520] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -62806,7 +61764,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[520] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63070,11 +62028,9 @@ type ImageFamilyView struct { func (x *ImageFamilyView) Reset() { *x = ImageFamilyView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[521] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[521] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageFamilyView) String() string { @@ -63085,7 +62041,7 @@ func (*ImageFamilyView) ProtoMessage() {} func (x *ImageFamilyView) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[521] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63129,11 +62085,9 @@ type ImageList struct { func (x *ImageList) Reset() { *x = ImageList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[522] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[522] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageList) String() string { @@ -63144,7 +62098,7 @@ func (*ImageList) ProtoMessage() {} func (x *ImageList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[522] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63219,11 +62173,9 @@ type InitialStateConfig struct { func (x *InitialStateConfig) Reset() { *x = InitialStateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[523] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[523] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialStateConfig) String() string { @@ -63234,7 +62186,7 @@ func (*InitialStateConfig) ProtoMessage() {} func (x *InitialStateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[523] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63295,11 +62247,9 @@ type InsertAddressRequest struct { func (x *InsertAddressRequest) Reset() { *x = InsertAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[524] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[524] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertAddressRequest) String() string { @@ -63310,7 +62260,7 @@ func (*InsertAddressRequest) ProtoMessage() {} func (x *InsertAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[524] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63371,11 +62321,9 @@ type InsertAutoscalerRequest struct { func (x *InsertAutoscalerRequest) Reset() { *x = InsertAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[525] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[525] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertAutoscalerRequest) String() string { @@ -63386,7 +62334,7 @@ func (*InsertAutoscalerRequest) ProtoMessage() {} func (x *InsertAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[525] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63445,11 +62393,9 @@ type InsertBackendBucketRequest struct { func (x *InsertBackendBucketRequest) Reset() { *x = InsertBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[526] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[526] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertBackendBucketRequest) String() string { @@ -63460,7 +62406,7 @@ func (*InsertBackendBucketRequest) ProtoMessage() {} func (x *InsertBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[526] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63512,11 +62458,9 @@ type InsertBackendServiceRequest struct { func (x *InsertBackendServiceRequest) Reset() { *x = InsertBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[527] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[527] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertBackendServiceRequest) String() string { @@ -63527,7 +62471,7 @@ func (*InsertBackendServiceRequest) ProtoMessage() {} func (x *InsertBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[527] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63583,11 +62527,9 @@ type InsertDiskRequest struct { func (x *InsertDiskRequest) Reset() { *x = InsertDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[528] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[528] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertDiskRequest) String() string { @@ -63598,7 +62540,7 @@ func (*InsertDiskRequest) ProtoMessage() {} func (x *InsertDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[528] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63664,11 +62606,9 @@ type InsertExternalVpnGatewayRequest struct { func (x *InsertExternalVpnGatewayRequest) Reset() { *x = InsertExternalVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[529] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[529] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertExternalVpnGatewayRequest) String() string { @@ -63679,7 +62619,7 @@ func (*InsertExternalVpnGatewayRequest) ProtoMessage() {} func (x *InsertExternalVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[529] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63731,11 +62671,9 @@ type InsertFirewallPolicyRequest struct { func (x *InsertFirewallPolicyRequest) Reset() { *x = InsertFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[530] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[530] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertFirewallPolicyRequest) String() string { @@ -63746,7 +62684,7 @@ func (*InsertFirewallPolicyRequest) ProtoMessage() {} func (x *InsertFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[530] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63798,11 +62736,9 @@ type InsertFirewallRequest struct { func (x *InsertFirewallRequest) Reset() { *x = InsertFirewallRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[531] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[531] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertFirewallRequest) String() string { @@ -63813,7 +62749,7 @@ func (*InsertFirewallRequest) ProtoMessage() {} func (x *InsertFirewallRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[531] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63867,11 +62803,9 @@ type InsertForwardingRuleRequest struct { func (x *InsertForwardingRuleRequest) Reset() { *x = InsertForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[532] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[532] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertForwardingRuleRequest) String() string { @@ -63882,7 +62816,7 @@ func (*InsertForwardingRuleRequest) ProtoMessage() {} func (x *InsertForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[532] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63941,11 +62875,9 @@ type InsertGlobalAddressRequest struct { func (x *InsertGlobalAddressRequest) Reset() { *x = InsertGlobalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[533] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[533] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertGlobalAddressRequest) String() string { @@ -63956,7 +62888,7 @@ func (*InsertGlobalAddressRequest) ProtoMessage() {} func (x *InsertGlobalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[533] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64008,11 +62940,9 @@ type InsertGlobalForwardingRuleRequest struct { func (x *InsertGlobalForwardingRuleRequest) Reset() { *x = InsertGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[534] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[534] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertGlobalForwardingRuleRequest) String() string { @@ -64023,7 +62953,7 @@ func (*InsertGlobalForwardingRuleRequest) ProtoMessage() {} func (x *InsertGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[534] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64075,11 +63005,9 @@ type InsertGlobalNetworkEndpointGroupRequest struct { func (x *InsertGlobalNetworkEndpointGroupRequest) Reset() { *x = InsertGlobalNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[535] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[535] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertGlobalNetworkEndpointGroupRequest) String() string { @@ -64090,7 +63018,7 @@ func (*InsertGlobalNetworkEndpointGroupRequest) ProtoMessage() {} func (x *InsertGlobalNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[535] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64142,11 +63070,9 @@ type InsertGlobalPublicDelegatedPrefixeRequest struct { func (x *InsertGlobalPublicDelegatedPrefixeRequest) Reset() { *x = InsertGlobalPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[536] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[536] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertGlobalPublicDelegatedPrefixeRequest) String() string { @@ -64157,7 +63083,7 @@ func (*InsertGlobalPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *InsertGlobalPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[536] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64209,11 +63135,9 @@ type InsertHealthCheckRequest struct { func (x *InsertHealthCheckRequest) Reset() { *x = InsertHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[537] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[537] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertHealthCheckRequest) String() string { @@ -64224,7 +63148,7 @@ func (*InsertHealthCheckRequest) ProtoMessage() {} func (x *InsertHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[537] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64278,11 +63202,9 @@ type InsertImageRequest struct { func (x *InsertImageRequest) Reset() { *x = InsertImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[538] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[538] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertImageRequest) String() string { @@ -64293,7 +63215,7 @@ func (*InsertImageRequest) ProtoMessage() {} func (x *InsertImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[538] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64354,11 +63276,9 @@ type InsertInstanceGroupManagerRequest struct { func (x *InsertInstanceGroupManagerRequest) Reset() { *x = InsertInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[539] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[539] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstanceGroupManagerRequest) String() string { @@ -64369,7 +63289,7 @@ func (*InsertInstanceGroupManagerRequest) ProtoMessage() {} func (x *InsertInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[539] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64432,11 +63352,9 @@ type InsertInstanceGroupManagerResizeRequestRequest struct { func (x *InsertInstanceGroupManagerResizeRequestRequest) Reset() { *x = InsertInstanceGroupManagerResizeRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[540] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[540] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstanceGroupManagerResizeRequestRequest) String() string { @@ -64447,7 +63365,7 @@ func (*InsertInstanceGroupManagerResizeRequestRequest) ProtoMessage() {} func (x *InsertInstanceGroupManagerResizeRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[540] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64515,11 +63433,9 @@ type InsertInstanceGroupRequest struct { func (x *InsertInstanceGroupRequest) Reset() { *x = InsertInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[541] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[541] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstanceGroupRequest) String() string { @@ -64530,7 +63446,7 @@ func (*InsertInstanceGroupRequest) ProtoMessage() {} func (x *InsertInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[541] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64595,11 +63511,9 @@ type InsertInstanceRequest struct { func (x *InsertInstanceRequest) Reset() { *x = InsertInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[542] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[542] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstanceRequest) String() string { @@ -64610,7 +63524,7 @@ func (*InsertInstanceRequest) ProtoMessage() {} func (x *InsertInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[542] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64683,11 +63597,9 @@ type InsertInstanceTemplateRequest struct { func (x *InsertInstanceTemplateRequest) Reset() { *x = InsertInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[543] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[543] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstanceTemplateRequest) String() string { @@ -64698,7 +63610,7 @@ func (*InsertInstanceTemplateRequest) ProtoMessage() {} func (x *InsertInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[543] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64752,11 +63664,9 @@ type InsertInstantSnapshotRequest struct { func (x *InsertInstantSnapshotRequest) Reset() { *x = InsertInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[544] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[544] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInstantSnapshotRequest) String() string { @@ -64767,7 +63677,7 @@ func (*InsertInstantSnapshotRequest) ProtoMessage() {} func (x *InsertInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[544] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64830,11 +63740,9 @@ type InsertInterconnectAttachmentRequest struct { func (x *InsertInterconnectAttachmentRequest) Reset() { *x = InsertInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[545] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[545] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInterconnectAttachmentRequest) String() string { @@ -64845,7 +63753,7 @@ func (*InsertInterconnectAttachmentRequest) ProtoMessage() {} func (x *InsertInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[545] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64911,11 +63819,9 @@ type InsertInterconnectRequest struct { func (x *InsertInterconnectRequest) Reset() { *x = InsertInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[546] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[546] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertInterconnectRequest) String() string { @@ -64926,7 +63832,7 @@ func (*InsertInterconnectRequest) ProtoMessage() {} func (x *InsertInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[546] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -64978,11 +63884,9 @@ type InsertLicenseRequest struct { func (x *InsertLicenseRequest) Reset() { *x = InsertLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[547] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[547] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertLicenseRequest) String() string { @@ -64993,7 +63897,7 @@ func (*InsertLicenseRequest) ProtoMessage() {} func (x *InsertLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[547] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65047,11 +63951,9 @@ type InsertMachineImageRequest struct { func (x *InsertMachineImageRequest) Reset() { *x = InsertMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[548] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[548] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertMachineImageRequest) String() string { @@ -65062,7 +63964,7 @@ func (*InsertMachineImageRequest) ProtoMessage() {} func (x *InsertMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[548] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65123,11 +64025,9 @@ type InsertNetworkAttachmentRequest struct { func (x *InsertNetworkAttachmentRequest) Reset() { *x = InsertNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[549] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[549] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNetworkAttachmentRequest) String() string { @@ -65138,7 +64038,7 @@ func (*InsertNetworkAttachmentRequest) ProtoMessage() {} func (x *InsertNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[549] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65201,11 +64101,9 @@ type InsertNetworkEdgeSecurityServiceRequest struct { func (x *InsertNetworkEdgeSecurityServiceRequest) Reset() { *x = InsertNetworkEdgeSecurityServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[550] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[550] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNetworkEdgeSecurityServiceRequest) String() string { @@ -65216,7 +64114,7 @@ func (*InsertNetworkEdgeSecurityServiceRequest) ProtoMessage() {} func (x *InsertNetworkEdgeSecurityServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[550] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65284,11 +64182,9 @@ type InsertNetworkEndpointGroupRequest struct { func (x *InsertNetworkEndpointGroupRequest) Reset() { *x = InsertNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[551] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[551] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNetworkEndpointGroupRequest) String() string { @@ -65299,7 +64195,7 @@ func (*InsertNetworkEndpointGroupRequest) ProtoMessage() {} func (x *InsertNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[551] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65358,11 +64254,9 @@ type InsertNetworkFirewallPolicyRequest struct { func (x *InsertNetworkFirewallPolicyRequest) Reset() { *x = InsertNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[552] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[552] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNetworkFirewallPolicyRequest) String() string { @@ -65373,7 +64267,7 @@ func (*InsertNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *InsertNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[552] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65425,11 +64319,9 @@ type InsertNetworkRequest struct { func (x *InsertNetworkRequest) Reset() { *x = InsertNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[553] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[553] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNetworkRequest) String() string { @@ -65440,7 +64332,7 @@ func (*InsertNetworkRequest) ProtoMessage() {} func (x *InsertNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[553] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65496,11 +64388,9 @@ type InsertNodeGroupRequest struct { func (x *InsertNodeGroupRequest) Reset() { *x = InsertNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[554] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[554] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNodeGroupRequest) String() string { @@ -65511,7 +64401,7 @@ func (*InsertNodeGroupRequest) ProtoMessage() {} func (x *InsertNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[554] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65579,11 +64469,9 @@ type InsertNodeTemplateRequest struct { func (x *InsertNodeTemplateRequest) Reset() { *x = InsertNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[555] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[555] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertNodeTemplateRequest) String() string { @@ -65594,7 +64482,7 @@ func (*InsertNodeTemplateRequest) ProtoMessage() {} func (x *InsertNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[555] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65655,11 +64543,9 @@ type InsertPacketMirroringRequest struct { func (x *InsertPacketMirroringRequest) Reset() { *x = InsertPacketMirroringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[556] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[556] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertPacketMirroringRequest) String() string { @@ -65670,7 +64556,7 @@ func (*InsertPacketMirroringRequest) ProtoMessage() {} func (x *InsertPacketMirroringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[556] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65729,11 +64615,9 @@ type InsertPublicAdvertisedPrefixeRequest struct { func (x *InsertPublicAdvertisedPrefixeRequest) Reset() { *x = InsertPublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[557] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[557] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertPublicAdvertisedPrefixeRequest) String() string { @@ -65744,7 +64628,7 @@ func (*InsertPublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *InsertPublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[557] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65798,11 +64682,9 @@ type InsertPublicDelegatedPrefixeRequest struct { func (x *InsertPublicDelegatedPrefixeRequest) Reset() { *x = InsertPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[558] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[558] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertPublicDelegatedPrefixeRequest) String() string { @@ -65813,7 +64695,7 @@ func (*InsertPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *InsertPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[558] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65874,11 +64756,9 @@ type InsertRegionAutoscalerRequest struct { func (x *InsertRegionAutoscalerRequest) Reset() { *x = InsertRegionAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[559] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[559] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionAutoscalerRequest) String() string { @@ -65889,7 +64769,7 @@ func (*InsertRegionAutoscalerRequest) ProtoMessage() {} func (x *InsertRegionAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[559] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -65950,11 +64830,9 @@ type InsertRegionBackendServiceRequest struct { func (x *InsertRegionBackendServiceRequest) Reset() { *x = InsertRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[560] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[560] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionBackendServiceRequest) String() string { @@ -65965,7 +64843,7 @@ func (*InsertRegionBackendServiceRequest) ProtoMessage() {} func (x *InsertRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[560] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66026,11 +64904,9 @@ type InsertRegionCommitmentRequest struct { func (x *InsertRegionCommitmentRequest) Reset() { *x = InsertRegionCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[561] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[561] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionCommitmentRequest) String() string { @@ -66041,7 +64917,7 @@ func (*InsertRegionCommitmentRequest) ProtoMessage() {} func (x *InsertRegionCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[561] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66104,11 +64980,9 @@ type InsertRegionDiskRequest struct { func (x *InsertRegionDiskRequest) Reset() { *x = InsertRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[562] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[562] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionDiskRequest) String() string { @@ -66119,7 +64993,7 @@ func (*InsertRegionDiskRequest) ProtoMessage() {} func (x *InsertRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[562] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66187,11 +65061,9 @@ type InsertRegionHealthCheckRequest struct { func (x *InsertRegionHealthCheckRequest) Reset() { *x = InsertRegionHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[563] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[563] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionHealthCheckRequest) String() string { @@ -66202,7 +65074,7 @@ func (*InsertRegionHealthCheckRequest) ProtoMessage() {} func (x *InsertRegionHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[563] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66263,11 +65135,9 @@ type InsertRegionHealthCheckServiceRequest struct { func (x *InsertRegionHealthCheckServiceRequest) Reset() { *x = InsertRegionHealthCheckServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[564] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[564] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionHealthCheckServiceRequest) String() string { @@ -66278,7 +65148,7 @@ func (*InsertRegionHealthCheckServiceRequest) ProtoMessage() {} func (x *InsertRegionHealthCheckServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[564] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66339,11 +65209,9 @@ type InsertRegionInstanceGroupManagerRequest struct { func (x *InsertRegionInstanceGroupManagerRequest) Reset() { *x = InsertRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[565] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[565] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionInstanceGroupManagerRequest) String() string { @@ -66354,7 +65222,7 @@ func (*InsertRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *InsertRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[565] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66415,11 +65283,9 @@ type InsertRegionInstanceTemplateRequest struct { func (x *InsertRegionInstanceTemplateRequest) Reset() { *x = InsertRegionInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[566] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[566] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionInstanceTemplateRequest) String() string { @@ -66430,7 +65296,7 @@ func (*InsertRegionInstanceTemplateRequest) ProtoMessage() {} func (x *InsertRegionInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[566] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66491,11 +65357,9 @@ type InsertRegionInstantSnapshotRequest struct { func (x *InsertRegionInstantSnapshotRequest) Reset() { *x = InsertRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[567] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[567] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionInstantSnapshotRequest) String() string { @@ -66506,7 +65370,7 @@ func (*InsertRegionInstantSnapshotRequest) ProtoMessage() {} func (x *InsertRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[567] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66567,11 +65431,9 @@ type InsertRegionNetworkEndpointGroupRequest struct { func (x *InsertRegionNetworkEndpointGroupRequest) Reset() { *x = InsertRegionNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[568] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[568] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionNetworkEndpointGroupRequest) String() string { @@ -66582,7 +65444,7 @@ func (*InsertRegionNetworkEndpointGroupRequest) ProtoMessage() {} func (x *InsertRegionNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[568] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66643,11 +65505,9 @@ type InsertRegionNetworkFirewallPolicyRequest struct { func (x *InsertRegionNetworkFirewallPolicyRequest) Reset() { *x = InsertRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[569] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[569] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionNetworkFirewallPolicyRequest) String() string { @@ -66658,7 +65518,7 @@ func (*InsertRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *InsertRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[569] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66719,11 +65579,9 @@ type InsertRegionNotificationEndpointRequest struct { func (x *InsertRegionNotificationEndpointRequest) Reset() { *x = InsertRegionNotificationEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[570] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[570] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionNotificationEndpointRequest) String() string { @@ -66734,7 +65592,7 @@ func (*InsertRegionNotificationEndpointRequest) ProtoMessage() {} func (x *InsertRegionNotificationEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[570] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66797,11 +65655,9 @@ type InsertRegionSecurityPolicyRequest struct { func (x *InsertRegionSecurityPolicyRequest) Reset() { *x = InsertRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[571] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[571] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionSecurityPolicyRequest) String() string { @@ -66812,7 +65668,7 @@ func (*InsertRegionSecurityPolicyRequest) ProtoMessage() {} func (x *InsertRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[571] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66880,11 +65736,9 @@ type InsertRegionSslCertificateRequest struct { func (x *InsertRegionSslCertificateRequest) Reset() { *x = InsertRegionSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[572] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[572] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionSslCertificateRequest) String() string { @@ -66895,7 +65749,7 @@ func (*InsertRegionSslCertificateRequest) ProtoMessage() {} func (x *InsertRegionSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[572] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -66956,11 +65810,9 @@ type InsertRegionSslPolicyRequest struct { func (x *InsertRegionSslPolicyRequest) Reset() { *x = InsertRegionSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[573] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[573] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionSslPolicyRequest) String() string { @@ -66971,7 +65823,7 @@ func (*InsertRegionSslPolicyRequest) ProtoMessage() {} func (x *InsertRegionSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[573] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67032,11 +65884,9 @@ type InsertRegionTargetHttpProxyRequest struct { func (x *InsertRegionTargetHttpProxyRequest) Reset() { *x = InsertRegionTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[574] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[574] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionTargetHttpProxyRequest) String() string { @@ -67047,7 +65897,7 @@ func (*InsertRegionTargetHttpProxyRequest) ProtoMessage() {} func (x *InsertRegionTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[574] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67108,11 +65958,9 @@ type InsertRegionTargetHttpsProxyRequest struct { func (x *InsertRegionTargetHttpsProxyRequest) Reset() { *x = InsertRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[575] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[575] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionTargetHttpsProxyRequest) String() string { @@ -67123,7 +65971,7 @@ func (*InsertRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *InsertRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[575] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67184,11 +66032,9 @@ type InsertRegionTargetTcpProxyRequest struct { func (x *InsertRegionTargetTcpProxyRequest) Reset() { *x = InsertRegionTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[576] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[576] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionTargetTcpProxyRequest) String() string { @@ -67199,7 +66045,7 @@ func (*InsertRegionTargetTcpProxyRequest) ProtoMessage() {} func (x *InsertRegionTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[576] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67260,11 +66106,9 @@ type InsertRegionUrlMapRequest struct { func (x *InsertRegionUrlMapRequest) Reset() { *x = InsertRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[577] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[577] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionUrlMapRequest) String() string { @@ -67275,7 +66119,7 @@ func (*InsertRegionUrlMapRequest) ProtoMessage() {} func (x *InsertRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[577] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67336,11 +66180,9 @@ type InsertReservationRequest struct { func (x *InsertReservationRequest) Reset() { *x = InsertReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[578] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[578] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertReservationRequest) String() string { @@ -67351,7 +66193,7 @@ func (*InsertReservationRequest) ProtoMessage() {} func (x *InsertReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[578] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67412,11 +66254,9 @@ type InsertResourcePolicyRequest struct { func (x *InsertResourcePolicyRequest) Reset() { *x = InsertResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[579] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[579] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertResourcePolicyRequest) String() string { @@ -67427,7 +66267,7 @@ func (*InsertResourcePolicyRequest) ProtoMessage() {} func (x *InsertResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[579] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67486,11 +66326,9 @@ type InsertRouteRequest struct { func (x *InsertRouteRequest) Reset() { *x = InsertRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[580] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[580] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRouteRequest) String() string { @@ -67501,7 +66339,7 @@ func (*InsertRouteRequest) ProtoMessage() {} func (x *InsertRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[580] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67555,11 +66393,9 @@ type InsertRouterRequest struct { func (x *InsertRouterRequest) Reset() { *x = InsertRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[581] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[581] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRouterRequest) String() string { @@ -67570,7 +66406,7 @@ func (*InsertRouterRequest) ProtoMessage() {} func (x *InsertRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[581] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67631,11 +66467,9 @@ type InsertSecurityPolicyRequest struct { func (x *InsertSecurityPolicyRequest) Reset() { *x = InsertSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[582] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[582] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSecurityPolicyRequest) String() string { @@ -67646,7 +66480,7 @@ func (*InsertSecurityPolicyRequest) ProtoMessage() {} func (x *InsertSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[582] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67707,11 +66541,9 @@ type InsertServiceAttachmentRequest struct { func (x *InsertServiceAttachmentRequest) Reset() { *x = InsertServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[583] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[583] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertServiceAttachmentRequest) String() string { @@ -67722,7 +66554,7 @@ func (*InsertServiceAttachmentRequest) ProtoMessage() {} func (x *InsertServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[583] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67781,11 +66613,9 @@ type InsertSnapshotRequest struct { func (x *InsertSnapshotRequest) Reset() { *x = InsertSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[584] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[584] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSnapshotRequest) String() string { @@ -67796,7 +66626,7 @@ func (*InsertSnapshotRequest) ProtoMessage() {} func (x *InsertSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[584] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67848,11 +66678,9 @@ type InsertSslCertificateRequest struct { func (x *InsertSslCertificateRequest) Reset() { *x = InsertSslCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[585] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[585] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSslCertificateRequest) String() string { @@ -67863,7 +66691,7 @@ func (*InsertSslCertificateRequest) ProtoMessage() {} func (x *InsertSslCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[585] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67915,11 +66743,9 @@ type InsertSslPolicyRequest struct { func (x *InsertSslPolicyRequest) Reset() { *x = InsertSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[586] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[586] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSslPolicyRequest) String() string { @@ -67930,7 +66756,7 @@ func (*InsertSslPolicyRequest) ProtoMessage() {} func (x *InsertSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[586] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -67984,11 +66810,9 @@ type InsertStoragePoolRequest struct { func (x *InsertStoragePoolRequest) Reset() { *x = InsertStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[587] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[587] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertStoragePoolRequest) String() string { @@ -67999,7 +66823,7 @@ func (*InsertStoragePoolRequest) ProtoMessage() {} func (x *InsertStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[587] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68060,11 +66884,9 @@ type InsertSubnetworkRequest struct { func (x *InsertSubnetworkRequest) Reset() { *x = InsertSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[588] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[588] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertSubnetworkRequest) String() string { @@ -68075,7 +66897,7 @@ func (*InsertSubnetworkRequest) ProtoMessage() {} func (x *InsertSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[588] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68134,11 +66956,9 @@ type InsertTargetGrpcProxyRequest struct { func (x *InsertTargetGrpcProxyRequest) Reset() { *x = InsertTargetGrpcProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[589] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[589] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetGrpcProxyRequest) String() string { @@ -68149,7 +66969,7 @@ func (*InsertTargetGrpcProxyRequest) ProtoMessage() {} func (x *InsertTargetGrpcProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[589] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68201,11 +67021,9 @@ type InsertTargetHttpProxyRequest struct { func (x *InsertTargetHttpProxyRequest) Reset() { *x = InsertTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[590] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[590] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetHttpProxyRequest) String() string { @@ -68216,7 +67034,7 @@ func (*InsertTargetHttpProxyRequest) ProtoMessage() {} func (x *InsertTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[590] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68268,11 +67086,9 @@ type InsertTargetHttpsProxyRequest struct { func (x *InsertTargetHttpsProxyRequest) Reset() { *x = InsertTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[591] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[591] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetHttpsProxyRequest) String() string { @@ -68283,7 +67099,7 @@ func (*InsertTargetHttpsProxyRequest) ProtoMessage() {} func (x *InsertTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[591] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68337,11 +67153,9 @@ type InsertTargetInstanceRequest struct { func (x *InsertTargetInstanceRequest) Reset() { *x = InsertTargetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[592] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[592] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetInstanceRequest) String() string { @@ -68352,7 +67166,7 @@ func (*InsertTargetInstanceRequest) ProtoMessage() {} func (x *InsertTargetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[592] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68413,11 +67227,9 @@ type InsertTargetPoolRequest struct { func (x *InsertTargetPoolRequest) Reset() { *x = InsertTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[593] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[593] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetPoolRequest) String() string { @@ -68428,7 +67240,7 @@ func (*InsertTargetPoolRequest) ProtoMessage() {} func (x *InsertTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[593] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68487,11 +67299,9 @@ type InsertTargetSslProxyRequest struct { func (x *InsertTargetSslProxyRequest) Reset() { *x = InsertTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[594] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[594] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetSslProxyRequest) String() string { @@ -68502,7 +67312,7 @@ func (*InsertTargetSslProxyRequest) ProtoMessage() {} func (x *InsertTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[594] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68554,11 +67364,9 @@ type InsertTargetTcpProxyRequest struct { func (x *InsertTargetTcpProxyRequest) Reset() { *x = InsertTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[595] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[595] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetTcpProxyRequest) String() string { @@ -68569,7 +67377,7 @@ func (*InsertTargetTcpProxyRequest) ProtoMessage() {} func (x *InsertTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[595] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68623,11 +67431,9 @@ type InsertTargetVpnGatewayRequest struct { func (x *InsertTargetVpnGatewayRequest) Reset() { *x = InsertTargetVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[596] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[596] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertTargetVpnGatewayRequest) String() string { @@ -68638,7 +67444,7 @@ func (*InsertTargetVpnGatewayRequest) ProtoMessage() {} func (x *InsertTargetVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[596] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68697,11 +67503,9 @@ type InsertUrlMapRequest struct { func (x *InsertUrlMapRequest) Reset() { *x = InsertUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[597] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[597] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertUrlMapRequest) String() string { @@ -68712,7 +67516,7 @@ func (*InsertUrlMapRequest) ProtoMessage() {} func (x *InsertUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[597] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68766,11 +67570,9 @@ type InsertVpnGatewayRequest struct { func (x *InsertVpnGatewayRequest) Reset() { *x = InsertVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[598] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[598] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertVpnGatewayRequest) String() string { @@ -68781,7 +67583,7 @@ func (*InsertVpnGatewayRequest) ProtoMessage() {} func (x *InsertVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[598] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -68842,11 +67644,9 @@ type InsertVpnTunnelRequest struct { func (x *InsertVpnTunnelRequest) Reset() { *x = InsertVpnTunnelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[599] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[599] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertVpnTunnelRequest) String() string { @@ -68857,7 +67657,7 @@ func (*InsertVpnTunnelRequest) ProtoMessage() {} func (x *InsertVpnTunnelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[599] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69001,11 +67801,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[600] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[600] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -69016,7 +67814,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[600] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69376,11 +68174,9 @@ type InstanceAggregatedList struct { func (x *InstanceAggregatedList) Reset() { *x = InstanceAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[601] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[601] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceAggregatedList) String() string { @@ -69391,7 +68187,7 @@ func (*InstanceAggregatedList) ProtoMessage() {} func (x *InstanceAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[601] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69468,11 +68264,9 @@ type InstanceConsumptionData struct { func (x *InstanceConsumptionData) Reset() { *x = InstanceConsumptionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[602] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[602] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConsumptionData) String() string { @@ -69483,7 +68277,7 @@ func (*InstanceConsumptionData) ProtoMessage() {} func (x *InstanceConsumptionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[602] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69529,11 +68323,9 @@ type InstanceConsumptionInfo struct { func (x *InstanceConsumptionInfo) Reset() { *x = InstanceConsumptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[603] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[603] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConsumptionInfo) String() string { @@ -69544,7 +68336,7 @@ func (*InstanceConsumptionInfo) ProtoMessage() {} func (x *InstanceConsumptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[603] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69623,11 +68415,9 @@ type InstanceGroup struct { func (x *InstanceGroup) Reset() { *x = InstanceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[604] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[604] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroup) String() string { @@ -69638,7 +68428,7 @@ func (*InstanceGroup) ProtoMessage() {} func (x *InstanceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[604] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69767,11 +68557,9 @@ type InstanceGroupAggregatedList struct { func (x *InstanceGroupAggregatedList) Reset() { *x = InstanceGroupAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[605] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[605] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupAggregatedList) String() string { @@ -69782,7 +68570,7 @@ func (*InstanceGroupAggregatedList) ProtoMessage() {} func (x *InstanceGroupAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[605] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69868,11 +68656,9 @@ type InstanceGroupList struct { func (x *InstanceGroupList) Reset() { *x = InstanceGroupList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[606] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[606] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupList) String() string { @@ -69883,7 +68669,7 @@ func (*InstanceGroupList) ProtoMessage() {} func (x *InstanceGroupList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[606] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70013,11 +68799,9 @@ type InstanceGroupManager struct { func (x *InstanceGroupManager) Reset() { *x = InstanceGroupManager{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[607] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[607] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManager) String() string { @@ -70028,7 +68812,7 @@ func (*InstanceGroupManager) ProtoMessage() {} func (x *InstanceGroupManager) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[607] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70295,11 +69079,9 @@ type InstanceGroupManagerActionsSummary struct { func (x *InstanceGroupManagerActionsSummary) Reset() { *x = InstanceGroupManagerActionsSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[608] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[608] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerActionsSummary) String() string { @@ -70310,7 +69092,7 @@ func (*InstanceGroupManagerActionsSummary) ProtoMessage() {} func (x *InstanceGroupManagerActionsSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[608] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70439,11 +69221,9 @@ type InstanceGroupManagerAggregatedList struct { func (x *InstanceGroupManagerAggregatedList) Reset() { *x = InstanceGroupManagerAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[609] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[609] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerAggregatedList) String() string { @@ -70454,7 +69234,7 @@ func (*InstanceGroupManagerAggregatedList) ProtoMessage() {} func (x *InstanceGroupManagerAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[609] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70529,11 +69309,9 @@ type InstanceGroupManagerAllInstancesConfig struct { func (x *InstanceGroupManagerAllInstancesConfig) Reset() { *x = InstanceGroupManagerAllInstancesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[610] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[610] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerAllInstancesConfig) String() string { @@ -70544,7 +69322,7 @@ func (*InstanceGroupManagerAllInstancesConfig) ProtoMessage() {} func (x *InstanceGroupManagerAllInstancesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[610] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70579,11 +69357,9 @@ type InstanceGroupManagerAutoHealingPolicy struct { func (x *InstanceGroupManagerAutoHealingPolicy) Reset() { *x = InstanceGroupManagerAutoHealingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[611] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[611] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerAutoHealingPolicy) String() string { @@ -70594,7 +69370,7 @@ func (*InstanceGroupManagerAutoHealingPolicy) ProtoMessage() {} func (x *InstanceGroupManagerAutoHealingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[611] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70634,11 +69410,9 @@ type InstanceGroupManagerInstanceFlexibilityPolicy struct { func (x *InstanceGroupManagerInstanceFlexibilityPolicy) Reset() { *x = InstanceGroupManagerInstanceFlexibilityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[612] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[612] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerInstanceFlexibilityPolicy) String() string { @@ -70649,7 +69423,7 @@ func (*InstanceGroupManagerInstanceFlexibilityPolicy) ProtoMessage() {} func (x *InstanceGroupManagerInstanceFlexibilityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[612] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70684,11 +69458,9 @@ type InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection struct { func (x *InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) Reset() { *x = InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[613] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[613] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) String() string { @@ -70699,7 +69471,7 @@ func (*InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) ProtoMess func (x *InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[613] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70743,11 +69515,9 @@ type InstanceGroupManagerInstanceLifecyclePolicy struct { func (x *InstanceGroupManagerInstanceLifecyclePolicy) Reset() { *x = InstanceGroupManagerInstanceLifecyclePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[614] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[614] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerInstanceLifecyclePolicy) String() string { @@ -70758,7 +69528,7 @@ func (*InstanceGroupManagerInstanceLifecyclePolicy) ProtoMessage() {} func (x *InstanceGroupManagerInstanceLifecyclePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[614] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70809,11 +69579,9 @@ type InstanceGroupManagerList struct { func (x *InstanceGroupManagerList) Reset() { *x = InstanceGroupManagerList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[615] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[615] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerList) String() string { @@ -70824,7 +69592,7 @@ func (*InstanceGroupManagerList) ProtoMessage() {} func (x *InstanceGroupManagerList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[615] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70916,11 +69684,9 @@ type InstanceGroupManagerResizeRequest struct { func (x *InstanceGroupManagerResizeRequest) Reset() { *x = InstanceGroupManagerResizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[616] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[616] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerResizeRequest) String() string { @@ -70931,7 +69697,7 @@ func (*InstanceGroupManagerResizeRequest) ProtoMessage() {} func (x *InstanceGroupManagerResizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[616] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71043,11 +69809,9 @@ type InstanceGroupManagerResizeRequestStatus struct { func (x *InstanceGroupManagerResizeRequestStatus) Reset() { *x = InstanceGroupManagerResizeRequestStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[617] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[617] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerResizeRequestStatus) String() string { @@ -71058,7 +69822,7 @@ func (*InstanceGroupManagerResizeRequestStatus) ProtoMessage() {} func (x *InstanceGroupManagerResizeRequestStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[617] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71098,11 +69862,9 @@ type InstanceGroupManagerResizeRequestStatusLastAttempt struct { func (x *InstanceGroupManagerResizeRequestStatusLastAttempt) Reset() { *x = InstanceGroupManagerResizeRequestStatusLastAttempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[618] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[618] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerResizeRequestStatusLastAttempt) String() string { @@ -71113,7 +69875,7 @@ func (*InstanceGroupManagerResizeRequestStatusLastAttempt) ProtoMessage() {} func (x *InstanceGroupManagerResizeRequestStatusLastAttempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[618] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71157,11 +69919,9 @@ type InstanceGroupManagerResizeRequestsListResponse struct { func (x *InstanceGroupManagerResizeRequestsListResponse) Reset() { *x = InstanceGroupManagerResizeRequestsListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[619] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[619] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerResizeRequestsListResponse) String() string { @@ -71172,7 +69932,7 @@ func (*InstanceGroupManagerResizeRequestsListResponse) ProtoMessage() {} func (x *InstanceGroupManagerResizeRequestsListResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[619] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71243,11 +70003,9 @@ type InstanceGroupManagerStandbyPolicy struct { func (x *InstanceGroupManagerStandbyPolicy) Reset() { *x = InstanceGroupManagerStandbyPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[620] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[620] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStandbyPolicy) String() string { @@ -71258,7 +70016,7 @@ func (*InstanceGroupManagerStandbyPolicy) ProtoMessage() {} func (x *InstanceGroupManagerStandbyPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[620] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71306,11 +70064,9 @@ type InstanceGroupManagerStatus struct { func (x *InstanceGroupManagerStatus) Reset() { *x = InstanceGroupManagerStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[621] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[621] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStatus) String() string { @@ -71321,7 +70077,7 @@ func (*InstanceGroupManagerStatus) ProtoMessage() {} func (x *InstanceGroupManagerStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[621] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71384,11 +70140,9 @@ type InstanceGroupManagerStatusAllInstancesConfig struct { func (x *InstanceGroupManagerStatusAllInstancesConfig) Reset() { *x = InstanceGroupManagerStatusAllInstancesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[622] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[622] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStatusAllInstancesConfig) String() string { @@ -71399,7 +70153,7 @@ func (*InstanceGroupManagerStatusAllInstancesConfig) ProtoMessage() {} func (x *InstanceGroupManagerStatusAllInstancesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[622] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71441,11 +70195,9 @@ type InstanceGroupManagerStatusStateful struct { func (x *InstanceGroupManagerStatusStateful) Reset() { *x = InstanceGroupManagerStatusStateful{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[623] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[623] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStatusStateful) String() string { @@ -71456,7 +70208,7 @@ func (*InstanceGroupManagerStatusStateful) ProtoMessage() {} func (x *InstanceGroupManagerStatusStateful) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[623] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71496,11 +70248,9 @@ type InstanceGroupManagerStatusStatefulPerInstanceConfigs struct { func (x *InstanceGroupManagerStatusStatefulPerInstanceConfigs) Reset() { *x = InstanceGroupManagerStatusStatefulPerInstanceConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[624] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[624] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStatusStatefulPerInstanceConfigs) String() string { @@ -71511,7 +70261,7 @@ func (*InstanceGroupManagerStatusStatefulPerInstanceConfigs) ProtoMessage() {} func (x *InstanceGroupManagerStatusStatefulPerInstanceConfigs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[624] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71544,11 +70294,9 @@ type InstanceGroupManagerStatusVersionTarget struct { func (x *InstanceGroupManagerStatusVersionTarget) Reset() { *x = InstanceGroupManagerStatusVersionTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[625] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[625] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerStatusVersionTarget) String() string { @@ -71559,7 +70307,7 @@ func (*InstanceGroupManagerStatusVersionTarget) ProtoMessage() {} func (x *InstanceGroupManagerStatusVersionTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[625] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71609,11 +70357,9 @@ type InstanceGroupManagerUpdatePolicy struct { func (x *InstanceGroupManagerUpdatePolicy) Reset() { *x = InstanceGroupManagerUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[626] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[626] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerUpdatePolicy) String() string { @@ -71624,7 +70370,7 @@ func (*InstanceGroupManagerUpdatePolicy) ProtoMessage() {} func (x *InstanceGroupManagerUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[626] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71703,11 +70449,9 @@ type InstanceGroupManagerVersion struct { func (x *InstanceGroupManagerVersion) Reset() { *x = InstanceGroupManagerVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[627] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[627] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagerVersion) String() string { @@ -71718,7 +70462,7 @@ func (*InstanceGroupManagerVersion) ProtoMessage() {} func (x *InstanceGroupManagerVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[627] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71765,11 +70509,9 @@ type InstanceGroupManagersAbandonInstancesRequest struct { func (x *InstanceGroupManagersAbandonInstancesRequest) Reset() { *x = InstanceGroupManagersAbandonInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[628] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[628] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersAbandonInstancesRequest) String() string { @@ -71780,7 +70522,7 @@ func (*InstanceGroupManagersAbandonInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersAbandonInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[628] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71822,11 +70564,9 @@ type InstanceGroupManagersApplyUpdatesRequest struct { func (x *InstanceGroupManagersApplyUpdatesRequest) Reset() { *x = InstanceGroupManagersApplyUpdatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[629] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[629] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersApplyUpdatesRequest) String() string { @@ -71837,7 +70577,7 @@ func (*InstanceGroupManagersApplyUpdatesRequest) ProtoMessage() {} func (x *InstanceGroupManagersApplyUpdatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[629] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71892,11 +70632,9 @@ type InstanceGroupManagersCreateInstancesRequest struct { func (x *InstanceGroupManagersCreateInstancesRequest) Reset() { *x = InstanceGroupManagersCreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[630] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[630] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersCreateInstancesRequest) String() string { @@ -71907,7 +70645,7 @@ func (*InstanceGroupManagersCreateInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersCreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[630] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71942,11 +70680,9 @@ type InstanceGroupManagersDeleteInstancesRequest struct { func (x *InstanceGroupManagersDeleteInstancesRequest) Reset() { *x = InstanceGroupManagersDeleteInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[631] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[631] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersDeleteInstancesRequest) String() string { @@ -71957,7 +70693,7 @@ func (*InstanceGroupManagersDeleteInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersDeleteInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[631] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -71998,11 +70734,9 @@ type InstanceGroupManagersDeletePerInstanceConfigsReq struct { func (x *InstanceGroupManagersDeletePerInstanceConfigsReq) Reset() { *x = InstanceGroupManagersDeletePerInstanceConfigsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[632] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[632] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersDeletePerInstanceConfigsReq) String() string { @@ -72013,7 +70747,7 @@ func (*InstanceGroupManagersDeletePerInstanceConfigsReq) ProtoMessage() {} func (x *InstanceGroupManagersDeletePerInstanceConfigsReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[632] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72048,11 +70782,9 @@ type InstanceGroupManagersListErrorsResponse struct { func (x *InstanceGroupManagersListErrorsResponse) Reset() { *x = InstanceGroupManagersListErrorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[633] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[633] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersListErrorsResponse) String() string { @@ -72063,7 +70795,7 @@ func (*InstanceGroupManagersListErrorsResponse) ProtoMessage() {} func (x *InstanceGroupManagersListErrorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[633] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72105,11 +70837,9 @@ type InstanceGroupManagersListManagedInstancesResponse struct { func (x *InstanceGroupManagersListManagedInstancesResponse) Reset() { *x = InstanceGroupManagersListManagedInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[634] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[634] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersListManagedInstancesResponse) String() string { @@ -72120,7 +70850,7 @@ func (*InstanceGroupManagersListManagedInstancesResponse) ProtoMessage() {} func (x *InstanceGroupManagersListManagedInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[634] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72164,11 +70894,9 @@ type InstanceGroupManagersListPerInstanceConfigsResp struct { func (x *InstanceGroupManagersListPerInstanceConfigsResp) Reset() { *x = InstanceGroupManagersListPerInstanceConfigsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[635] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[635] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersListPerInstanceConfigsResp) String() string { @@ -72179,7 +70907,7 @@ func (*InstanceGroupManagersListPerInstanceConfigsResp) ProtoMessage() {} func (x *InstanceGroupManagersListPerInstanceConfigsResp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[635] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72227,11 +70955,9 @@ type InstanceGroupManagersPatchPerInstanceConfigsReq struct { func (x *InstanceGroupManagersPatchPerInstanceConfigsReq) Reset() { *x = InstanceGroupManagersPatchPerInstanceConfigsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[636] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[636] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersPatchPerInstanceConfigsReq) String() string { @@ -72242,7 +70968,7 @@ func (*InstanceGroupManagersPatchPerInstanceConfigsReq) ProtoMessage() {} func (x *InstanceGroupManagersPatchPerInstanceConfigsReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[636] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72275,11 +71001,9 @@ type InstanceGroupManagersRecreateInstancesRequest struct { func (x *InstanceGroupManagersRecreateInstancesRequest) Reset() { *x = InstanceGroupManagersRecreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[637] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[637] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersRecreateInstancesRequest) String() string { @@ -72290,7 +71014,7 @@ func (*InstanceGroupManagersRecreateInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersRecreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[637] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72323,11 +71047,9 @@ type InstanceGroupManagersResumeInstancesRequest struct { func (x *InstanceGroupManagersResumeInstancesRequest) Reset() { *x = InstanceGroupManagersResumeInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[638] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[638] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersResumeInstancesRequest) String() string { @@ -72338,7 +71060,7 @@ func (*InstanceGroupManagersResumeInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersResumeInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[638] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72373,11 +71095,9 @@ type InstanceGroupManagersScopedList struct { func (x *InstanceGroupManagersScopedList) Reset() { *x = InstanceGroupManagersScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[639] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[639] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersScopedList) String() string { @@ -72388,7 +71108,7 @@ func (*InstanceGroupManagersScopedList) ProtoMessage() {} func (x *InstanceGroupManagersScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[639] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72428,11 +71148,9 @@ type InstanceGroupManagersSetInstanceTemplateRequest struct { func (x *InstanceGroupManagersSetInstanceTemplateRequest) Reset() { *x = InstanceGroupManagersSetInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[640] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[640] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersSetInstanceTemplateRequest) String() string { @@ -72443,7 +71161,7 @@ func (*InstanceGroupManagersSetInstanceTemplateRequest) ProtoMessage() {} func (x *InstanceGroupManagersSetInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[640] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72478,11 +71196,9 @@ type InstanceGroupManagersSetTargetPoolsRequest struct { func (x *InstanceGroupManagersSetTargetPoolsRequest) Reset() { *x = InstanceGroupManagersSetTargetPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[641] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[641] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersSetTargetPoolsRequest) String() string { @@ -72493,7 +71209,7 @@ func (*InstanceGroupManagersSetTargetPoolsRequest) ProtoMessage() {} func (x *InstanceGroupManagersSetTargetPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[641] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72533,11 +71249,9 @@ type InstanceGroupManagersStartInstancesRequest struct { func (x *InstanceGroupManagersStartInstancesRequest) Reset() { *x = InstanceGroupManagersStartInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[642] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[642] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersStartInstancesRequest) String() string { @@ -72548,7 +71262,7 @@ func (*InstanceGroupManagersStartInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersStartInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[642] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72583,11 +71297,9 @@ type InstanceGroupManagersStopInstancesRequest struct { func (x *InstanceGroupManagersStopInstancesRequest) Reset() { *x = InstanceGroupManagersStopInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[643] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[643] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersStopInstancesRequest) String() string { @@ -72598,7 +71310,7 @@ func (*InstanceGroupManagersStopInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersStopInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[643] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72640,11 +71352,9 @@ type InstanceGroupManagersSuspendInstancesRequest struct { func (x *InstanceGroupManagersSuspendInstancesRequest) Reset() { *x = InstanceGroupManagersSuspendInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[644] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[644] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersSuspendInstancesRequest) String() string { @@ -72655,7 +71365,7 @@ func (*InstanceGroupManagersSuspendInstancesRequest) ProtoMessage() {} func (x *InstanceGroupManagersSuspendInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[644] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72696,11 +71406,9 @@ type InstanceGroupManagersUpdatePerInstanceConfigsReq struct { func (x *InstanceGroupManagersUpdatePerInstanceConfigsReq) Reset() { *x = InstanceGroupManagersUpdatePerInstanceConfigsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[645] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[645] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupManagersUpdatePerInstanceConfigsReq) String() string { @@ -72711,7 +71419,7 @@ func (*InstanceGroupManagersUpdatePerInstanceConfigsReq) ProtoMessage() {} func (x *InstanceGroupManagersUpdatePerInstanceConfigsReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[645] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72744,11 +71452,9 @@ type InstanceGroupsAddInstancesRequest struct { func (x *InstanceGroupsAddInstancesRequest) Reset() { *x = InstanceGroupsAddInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[646] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[646] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsAddInstancesRequest) String() string { @@ -72759,7 +71465,7 @@ func (*InstanceGroupsAddInstancesRequest) ProtoMessage() {} func (x *InstanceGroupsAddInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[646] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72802,11 +71508,9 @@ type InstanceGroupsListInstances struct { func (x *InstanceGroupsListInstances) Reset() { *x = InstanceGroupsListInstances{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[647] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[647] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsListInstances) String() string { @@ -72817,7 +71521,7 @@ func (*InstanceGroupsListInstances) ProtoMessage() {} func (x *InstanceGroupsListInstances) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[647] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72886,11 +71590,9 @@ type InstanceGroupsListInstancesRequest struct { func (x *InstanceGroupsListInstancesRequest) Reset() { *x = InstanceGroupsListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[648] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[648] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsListInstancesRequest) String() string { @@ -72901,7 +71603,7 @@ func (*InstanceGroupsListInstancesRequest) ProtoMessage() {} func (x *InstanceGroupsListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[648] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72934,11 +71636,9 @@ type InstanceGroupsRemoveInstancesRequest struct { func (x *InstanceGroupsRemoveInstancesRequest) Reset() { *x = InstanceGroupsRemoveInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[649] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[649] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsRemoveInstancesRequest) String() string { @@ -72949,7 +71649,7 @@ func (*InstanceGroupsRemoveInstancesRequest) ProtoMessage() {} func (x *InstanceGroupsRemoveInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[649] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -72984,11 +71684,9 @@ type InstanceGroupsScopedList struct { func (x *InstanceGroupsScopedList) Reset() { *x = InstanceGroupsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[650] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[650] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsScopedList) String() string { @@ -72999,7 +71697,7 @@ func (*InstanceGroupsScopedList) ProtoMessage() {} func (x *InstanceGroupsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[650] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73041,11 +71739,9 @@ type InstanceGroupsSetNamedPortsRequest struct { func (x *InstanceGroupsSetNamedPortsRequest) Reset() { *x = InstanceGroupsSetNamedPortsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[651] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[651] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupsSetNamedPortsRequest) String() string { @@ -73056,7 +71752,7 @@ func (*InstanceGroupsSetNamedPortsRequest) ProtoMessage() {} func (x *InstanceGroupsSetNamedPortsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[651] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73107,11 +71803,9 @@ type InstanceList struct { func (x *InstanceList) Reset() { *x = InstanceList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[652] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[652] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceList) String() string { @@ -73122,7 +71816,7 @@ func (*InstanceList) ProtoMessage() {} func (x *InstanceList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[652] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73201,11 +71895,9 @@ type InstanceListReferrers struct { func (x *InstanceListReferrers) Reset() { *x = InstanceListReferrers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[653] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[653] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceListReferrers) String() string { @@ -73216,7 +71908,7 @@ func (*InstanceListReferrers) ProtoMessage() {} func (x *InstanceListReferrers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[653] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73288,11 +71980,9 @@ type InstanceManagedByIgmError struct { func (x *InstanceManagedByIgmError) Reset() { *x = InstanceManagedByIgmError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[654] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[654] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceManagedByIgmError) String() string { @@ -73303,7 +71993,7 @@ func (*InstanceManagedByIgmError) ProtoMessage() {} func (x *InstanceManagedByIgmError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[654] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73355,11 +72045,9 @@ type InstanceManagedByIgmErrorInstanceActionDetails struct { func (x *InstanceManagedByIgmErrorInstanceActionDetails) Reset() { *x = InstanceManagedByIgmErrorInstanceActionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[655] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[655] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceManagedByIgmErrorInstanceActionDetails) String() string { @@ -73370,7 +72058,7 @@ func (*InstanceManagedByIgmErrorInstanceActionDetails) ProtoMessage() {} func (x *InstanceManagedByIgmErrorInstanceActionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[655] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73419,11 +72107,9 @@ type InstanceManagedByIgmErrorManagedInstanceError struct { func (x *InstanceManagedByIgmErrorManagedInstanceError) Reset() { *x = InstanceManagedByIgmErrorManagedInstanceError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[656] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[656] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceManagedByIgmErrorManagedInstanceError) String() string { @@ -73434,7 +72120,7 @@ func (*InstanceManagedByIgmErrorManagedInstanceError) ProtoMessage() {} func (x *InstanceManagedByIgmErrorManagedInstanceError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[656] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73476,11 +72162,9 @@ type InstanceMoveRequest struct { func (x *InstanceMoveRequest) Reset() { *x = InstanceMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[657] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[657] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceMoveRequest) String() string { @@ -73491,7 +72175,7 @@ func (*InstanceMoveRequest) ProtoMessage() {} func (x *InstanceMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[657] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73532,11 +72216,9 @@ type InstanceParams struct { func (x *InstanceParams) Reset() { *x = InstanceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[658] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[658] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceParams) String() string { @@ -73547,7 +72229,7 @@ func (*InstanceParams) ProtoMessage() {} func (x *InstanceParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[658] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73622,11 +72304,9 @@ type InstanceProperties struct { func (x *InstanceProperties) Reset() { *x = InstanceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[659] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[659] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceProperties) String() string { @@ -73637,7 +72317,7 @@ func (*InstanceProperties) ProtoMessage() {} func (x *InstanceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[659] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73813,11 +72493,9 @@ type InstancePropertiesPatch struct { func (x *InstancePropertiesPatch) Reset() { *x = InstancePropertiesPatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[660] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[660] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancePropertiesPatch) String() string { @@ -73828,7 +72506,7 @@ func (*InstancePropertiesPatch) ProtoMessage() {} func (x *InstancePropertiesPatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[660] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73868,11 +72546,9 @@ type InstanceReference struct { func (x *InstanceReference) Reset() { *x = InstanceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[661] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[661] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceReference) String() string { @@ -73883,7 +72559,7 @@ func (*InstanceReference) ProtoMessage() {} func (x *InstanceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[661] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73923,11 +72599,9 @@ type InstanceSettings struct { func (x *InstanceSettings) Reset() { *x = InstanceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[662] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[662] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceSettings) String() string { @@ -73938,7 +72612,7 @@ func (*InstanceSettings) ProtoMessage() {} func (x *InstanceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[662] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73994,11 +72668,9 @@ type InstanceSettingsMetadata struct { func (x *InstanceSettingsMetadata) Reset() { *x = InstanceSettingsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[663] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[663] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceSettingsMetadata) String() string { @@ -74009,7 +72681,7 @@ func (*InstanceSettingsMetadata) ProtoMessage() {} func (x *InstanceSettingsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[663] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74068,11 +72740,9 @@ type InstanceTemplate struct { func (x *InstanceTemplate) Reset() { *x = InstanceTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[664] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[664] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceTemplate) String() string { @@ -74083,7 +72753,7 @@ func (*InstanceTemplate) ProtoMessage() {} func (x *InstanceTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[664] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74190,11 +72860,9 @@ type InstanceTemplateAggregatedList struct { func (x *InstanceTemplateAggregatedList) Reset() { *x = InstanceTemplateAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[665] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[665] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceTemplateAggregatedList) String() string { @@ -74205,7 +72873,7 @@ func (*InstanceTemplateAggregatedList) ProtoMessage() {} func (x *InstanceTemplateAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[665] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74284,11 +72952,9 @@ type InstanceTemplateList struct { func (x *InstanceTemplateList) Reset() { *x = InstanceTemplateList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[666] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[666] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceTemplateList) String() string { @@ -74299,7 +72965,7 @@ func (*InstanceTemplateList) ProtoMessage() {} func (x *InstanceTemplateList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[666] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74369,11 +73035,9 @@ type InstanceTemplatesScopedList struct { func (x *InstanceTemplatesScopedList) Reset() { *x = InstanceTemplatesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[667] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[667] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceTemplatesScopedList) String() string { @@ -74384,7 +73048,7 @@ func (*InstanceTemplatesScopedList) ProtoMessage() {} func (x *InstanceTemplatesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[667] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74429,11 +73093,9 @@ type InstanceWithNamedPorts struct { func (x *InstanceWithNamedPorts) Reset() { *x = InstanceWithNamedPorts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[668] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[668] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceWithNamedPorts) String() string { @@ -74444,7 +73106,7 @@ func (*InstanceWithNamedPorts) ProtoMessage() {} func (x *InstanceWithNamedPorts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[668] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74491,11 +73153,9 @@ type InstancesAddResourcePoliciesRequest struct { func (x *InstancesAddResourcePoliciesRequest) Reset() { *x = InstancesAddResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[669] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[669] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesAddResourcePoliciesRequest) String() string { @@ -74506,7 +73166,7 @@ func (*InstancesAddResourcePoliciesRequest) ProtoMessage() {} func (x *InstancesAddResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[669] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74539,11 +73199,9 @@ type InstancesBulkInsertOperationMetadata struct { func (x *InstancesBulkInsertOperationMetadata) Reset() { *x = InstancesBulkInsertOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[670] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[670] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesBulkInsertOperationMetadata) String() string { @@ -74554,7 +73212,7 @@ func (*InstancesBulkInsertOperationMetadata) ProtoMessage() {} func (x *InstancesBulkInsertOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[670] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74589,11 +73247,9 @@ type InstancesGetEffectiveFirewallsResponse struct { func (x *InstancesGetEffectiveFirewallsResponse) Reset() { *x = InstancesGetEffectiveFirewallsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[671] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[671] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesGetEffectiveFirewallsResponse) String() string { @@ -74604,7 +73260,7 @@ func (*InstancesGetEffectiveFirewallsResponse) ProtoMessage() {} func (x *InstancesGetEffectiveFirewallsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[671] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74655,11 +73311,9 @@ type InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { func (x *InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) Reset() { *x = InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[672] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[672] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) String() string { @@ -74670,7 +73324,7 @@ func (*InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) ProtoMessa func (x *InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[672] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74738,11 +73392,9 @@ type InstancesRemoveResourcePoliciesRequest struct { func (x *InstancesRemoveResourcePoliciesRequest) Reset() { *x = InstancesRemoveResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[673] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[673] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesRemoveResourcePoliciesRequest) String() string { @@ -74753,7 +73405,7 @@ func (*InstancesRemoveResourcePoliciesRequest) ProtoMessage() {} func (x *InstancesRemoveResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[673] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74788,11 +73440,9 @@ type InstancesScopedList struct { func (x *InstancesScopedList) Reset() { *x = InstancesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[674] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[674] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesScopedList) String() string { @@ -74803,7 +73453,7 @@ func (*InstancesScopedList) ProtoMessage() {} func (x *InstancesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[674] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74844,11 +73494,9 @@ type InstancesSetLabelsRequest struct { func (x *InstancesSetLabelsRequest) Reset() { *x = InstancesSetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[675] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[675] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetLabelsRequest) String() string { @@ -74859,7 +73507,7 @@ func (*InstancesSetLabelsRequest) ProtoMessage() {} func (x *InstancesSetLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[675] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74899,11 +73547,9 @@ type InstancesSetMachineResourcesRequest struct { func (x *InstancesSetMachineResourcesRequest) Reset() { *x = InstancesSetMachineResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[676] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[676] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetMachineResourcesRequest) String() string { @@ -74914,7 +73560,7 @@ func (*InstancesSetMachineResourcesRequest) ProtoMessage() {} func (x *InstancesSetMachineResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[676] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74947,11 +73593,9 @@ type InstancesSetMachineTypeRequest struct { func (x *InstancesSetMachineTypeRequest) Reset() { *x = InstancesSetMachineTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[677] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[677] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetMachineTypeRequest) String() string { @@ -74962,7 +73606,7 @@ func (*InstancesSetMachineTypeRequest) ProtoMessage() {} func (x *InstancesSetMachineTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[677] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -74995,11 +73639,9 @@ type InstancesSetMinCpuPlatformRequest struct { func (x *InstancesSetMinCpuPlatformRequest) Reset() { *x = InstancesSetMinCpuPlatformRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[678] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[678] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetMinCpuPlatformRequest) String() string { @@ -75010,7 +73652,7 @@ func (*InstancesSetMinCpuPlatformRequest) ProtoMessage() {} func (x *InstancesSetMinCpuPlatformRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[678] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75045,11 +73687,9 @@ type InstancesSetNameRequest struct { func (x *InstancesSetNameRequest) Reset() { *x = InstancesSetNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[679] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[679] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetNameRequest) String() string { @@ -75060,7 +73700,7 @@ func (*InstancesSetNameRequest) ProtoMessage() {} func (x *InstancesSetNameRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[679] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75102,11 +73742,9 @@ type InstancesSetSecurityPolicyRequest struct { func (x *InstancesSetSecurityPolicyRequest) Reset() { *x = InstancesSetSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[680] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[680] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetSecurityPolicyRequest) String() string { @@ -75117,7 +73755,7 @@ func (*InstancesSetSecurityPolicyRequest) ProtoMessage() {} func (x *InstancesSetSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[680] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75159,11 +73797,9 @@ type InstancesSetServiceAccountRequest struct { func (x *InstancesSetServiceAccountRequest) Reset() { *x = InstancesSetServiceAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[681] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[681] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesSetServiceAccountRequest) String() string { @@ -75174,7 +73810,7 @@ func (*InstancesSetServiceAccountRequest) ProtoMessage() {} func (x *InstancesSetServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[681] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75214,11 +73850,9 @@ type InstancesStartWithEncryptionKeyRequest struct { func (x *InstancesStartWithEncryptionKeyRequest) Reset() { *x = InstancesStartWithEncryptionKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[682] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[682] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancesStartWithEncryptionKeyRequest) String() string { @@ -75229,7 +73863,7 @@ func (*InstancesStartWithEncryptionKeyRequest) ProtoMessage() {} func (x *InstancesStartWithEncryptionKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[682] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75301,11 +73935,9 @@ type InstantSnapshot struct { func (x *InstantSnapshot) Reset() { *x = InstantSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[683] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[683] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantSnapshot) String() string { @@ -75316,7 +73948,7 @@ func (*InstantSnapshot) ProtoMessage() {} func (x *InstantSnapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[683] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75487,11 +74119,9 @@ type InstantSnapshotAggregatedList struct { func (x *InstantSnapshotAggregatedList) Reset() { *x = InstantSnapshotAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[684] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[684] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantSnapshotAggregatedList) String() string { @@ -75502,7 +74132,7 @@ func (*InstantSnapshotAggregatedList) ProtoMessage() {} func (x *InstantSnapshotAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[684] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75588,11 +74218,9 @@ type InstantSnapshotList struct { func (x *InstantSnapshotList) Reset() { *x = InstantSnapshotList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[685] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[685] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantSnapshotList) String() string { @@ -75603,7 +74231,7 @@ func (*InstantSnapshotList) ProtoMessage() {} func (x *InstantSnapshotList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[685] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75671,11 +74299,9 @@ type InstantSnapshotResourceStatus struct { func (x *InstantSnapshotResourceStatus) Reset() { *x = InstantSnapshotResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[686] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[686] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantSnapshotResourceStatus) String() string { @@ -75686,7 +74312,7 @@ func (*InstantSnapshotResourceStatus) ProtoMessage() {} func (x *InstantSnapshotResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[686] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75721,11 +74347,9 @@ type InstantSnapshotsScopedList struct { func (x *InstantSnapshotsScopedList) Reset() { *x = InstantSnapshotsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[687] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[687] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantSnapshotsScopedList) String() string { @@ -75736,7 +74360,7 @@ func (*InstantSnapshotsScopedList) ProtoMessage() {} func (x *InstantSnapshotsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[687] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75779,11 +74403,9 @@ type Int64RangeMatch struct { func (x *Int64RangeMatch) Reset() { *x = Int64RangeMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[688] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[688] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Int64RangeMatch) String() string { @@ -75794,7 +74416,7 @@ func (*Int64RangeMatch) ProtoMessage() {} func (x *Int64RangeMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[688] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75899,11 +74521,9 @@ type Interconnect struct { func (x *Interconnect) Reset() { *x = Interconnect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[689] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[689] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interconnect) String() string { @@ -75914,7 +74534,7 @@ func (*Interconnect) ProtoMessage() {} func (x *Interconnect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[689] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76236,11 +74856,9 @@ type InterconnectAttachment struct { func (x *InterconnectAttachment) Reset() { *x = InterconnectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[690] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[690] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachment) String() string { @@ -76251,7 +74869,7 @@ func (*InterconnectAttachment) ProtoMessage() {} func (x *InterconnectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[690] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76569,11 +75187,9 @@ type InterconnectAttachmentAggregatedList struct { func (x *InterconnectAttachmentAggregatedList) Reset() { *x = InterconnectAttachmentAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[691] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[691] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentAggregatedList) String() string { @@ -76584,7 +75200,7 @@ func (*InterconnectAttachmentAggregatedList) ProtoMessage() {} func (x *InterconnectAttachmentAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[691] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76662,11 +75278,9 @@ type InterconnectAttachmentConfigurationConstraints struct { func (x *InterconnectAttachmentConfigurationConstraints) Reset() { *x = InterconnectAttachmentConfigurationConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[692] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[692] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentConfigurationConstraints) String() string { @@ -76677,7 +75291,7 @@ func (*InterconnectAttachmentConfigurationConstraints) ProtoMessage() {} func (x *InterconnectAttachmentConfigurationConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[692] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76717,11 +75331,9 @@ type InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange struct { func (x *InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) Reset() { *x = InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[693] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[693] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) String() string { @@ -76732,7 +75344,7 @@ func (*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) ProtoMessa func (x *InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[693] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76783,11 +75395,9 @@ type InterconnectAttachmentList struct { func (x *InterconnectAttachmentList) Reset() { *x = InterconnectAttachmentList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[694] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[694] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentList) String() string { @@ -76798,7 +75408,7 @@ func (*InterconnectAttachmentList) ProtoMessage() {} func (x *InterconnectAttachmentList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[694] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76871,11 +75481,9 @@ type InterconnectAttachmentPartnerMetadata struct { func (x *InterconnectAttachmentPartnerMetadata) Reset() { *x = InterconnectAttachmentPartnerMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[695] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[695] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentPartnerMetadata) String() string { @@ -76886,7 +75494,7 @@ func (*InterconnectAttachmentPartnerMetadata) ProtoMessage() {} func (x *InterconnectAttachmentPartnerMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[695] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76934,11 +75542,9 @@ type InterconnectAttachmentPrivateInfo struct { func (x *InterconnectAttachmentPrivateInfo) Reset() { *x = InterconnectAttachmentPrivateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[696] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[696] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentPrivateInfo) String() string { @@ -76949,7 +75555,7 @@ func (*InterconnectAttachmentPrivateInfo) ProtoMessage() {} func (x *InterconnectAttachmentPrivateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[696] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -76984,11 +75590,9 @@ type InterconnectAttachmentsScopedList struct { func (x *InterconnectAttachmentsScopedList) Reset() { *x = InterconnectAttachmentsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[697] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[697] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachmentsScopedList) String() string { @@ -76999,7 +75603,7 @@ func (*InterconnectAttachmentsScopedList) ProtoMessage() {} func (x *InterconnectAttachmentsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[697] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77044,11 +75648,9 @@ type InterconnectCircuitInfo struct { func (x *InterconnectCircuitInfo) Reset() { *x = InterconnectCircuitInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[698] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[698] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectCircuitInfo) String() string { @@ -77059,7 +75661,7 @@ func (*InterconnectCircuitInfo) ProtoMessage() {} func (x *InterconnectCircuitInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[698] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77117,11 +75719,9 @@ type InterconnectDiagnostics struct { func (x *InterconnectDiagnostics) Reset() { *x = InterconnectDiagnostics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[699] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[699] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics) String() string { @@ -77132,7 +75732,7 @@ func (*InterconnectDiagnostics) ProtoMessage() {} func (x *InterconnectDiagnostics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[699] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77196,11 +75796,9 @@ type InterconnectDiagnosticsARPEntry struct { func (x *InterconnectDiagnosticsARPEntry) Reset() { *x = InterconnectDiagnosticsARPEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[700] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[700] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnosticsARPEntry) String() string { @@ -77211,7 +75809,7 @@ func (*InterconnectDiagnosticsARPEntry) ProtoMessage() {} func (x *InterconnectDiagnosticsARPEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[700] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77256,11 +75854,9 @@ type InterconnectDiagnosticsLinkLACPStatus struct { func (x *InterconnectDiagnosticsLinkLACPStatus) Reset() { *x = InterconnectDiagnosticsLinkLACPStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[701] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[701] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnosticsLinkLACPStatus) String() string { @@ -77271,7 +75867,7 @@ func (*InterconnectDiagnosticsLinkLACPStatus) ProtoMessage() {} func (x *InterconnectDiagnosticsLinkLACPStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[701] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77321,11 +75917,9 @@ type InterconnectDiagnosticsLinkOpticalPower struct { func (x *InterconnectDiagnosticsLinkOpticalPower) Reset() { *x = InterconnectDiagnosticsLinkOpticalPower{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[702] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[702] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnosticsLinkOpticalPower) String() string { @@ -77336,7 +75930,7 @@ func (*InterconnectDiagnosticsLinkOpticalPower) ProtoMessage() {} func (x *InterconnectDiagnosticsLinkOpticalPower) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[702] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77390,11 +75984,9 @@ type InterconnectDiagnosticsLinkStatus struct { func (x *InterconnectDiagnosticsLinkStatus) Reset() { *x = InterconnectDiagnosticsLinkStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[703] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[703] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnosticsLinkStatus) String() string { @@ -77405,7 +75997,7 @@ func (*InterconnectDiagnosticsLinkStatus) ProtoMessage() {} func (x *InterconnectDiagnosticsLinkStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[703] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77490,11 +76082,9 @@ type InterconnectDiagnosticsMacsecStatus struct { func (x *InterconnectDiagnosticsMacsecStatus) Reset() { *x = InterconnectDiagnosticsMacsecStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[704] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[704] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnosticsMacsecStatus) String() string { @@ -77505,7 +76095,7 @@ func (*InterconnectDiagnosticsMacsecStatus) ProtoMessage() {} func (x *InterconnectDiagnosticsMacsecStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[704] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77556,11 +76146,9 @@ type InterconnectList struct { func (x *InterconnectList) Reset() { *x = InterconnectList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[705] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[705] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectList) String() string { @@ -77571,7 +76159,7 @@ func (*InterconnectList) ProtoMessage() {} func (x *InterconnectList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[705] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77678,11 +76266,9 @@ type InterconnectLocation struct { func (x *InterconnectLocation) Reset() { *x = InterconnectLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[706] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[706] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectLocation) String() string { @@ -77693,7 +76279,7 @@ func (*InterconnectLocation) ProtoMessage() {} func (x *InterconnectLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[706] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77856,11 +76442,9 @@ type InterconnectLocationList struct { func (x *InterconnectLocationList) Reset() { *x = InterconnectLocationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[707] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[707] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectLocationList) String() string { @@ -77871,7 +76455,7 @@ func (*InterconnectLocationList) ProtoMessage() {} func (x *InterconnectLocationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[707] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -77945,11 +76529,9 @@ type InterconnectLocationRegionInfo struct { func (x *InterconnectLocationRegionInfo) Reset() { *x = InterconnectLocationRegionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[708] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[708] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectLocationRegionInfo) String() string { @@ -77960,7 +76542,7 @@ func (*InterconnectLocationRegionInfo) ProtoMessage() {} func (x *InterconnectLocationRegionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[708] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78010,11 +76592,9 @@ type InterconnectMacsec struct { func (x *InterconnectMacsec) Reset() { *x = InterconnectMacsec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[709] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[709] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectMacsec) String() string { @@ -78025,7 +76605,7 @@ func (*InterconnectMacsec) ProtoMessage() {} func (x *InterconnectMacsec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[709] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78066,11 +76646,9 @@ type InterconnectMacsecConfig struct { func (x *InterconnectMacsecConfig) Reset() { *x = InterconnectMacsecConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[710] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[710] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectMacsecConfig) String() string { @@ -78081,7 +76659,7 @@ func (*InterconnectMacsecConfig) ProtoMessage() {} func (x *InterconnectMacsecConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[710] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78121,11 +76699,9 @@ type InterconnectMacsecConfigPreSharedKey struct { func (x *InterconnectMacsecConfigPreSharedKey) Reset() { *x = InterconnectMacsecConfigPreSharedKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[711] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[711] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectMacsecConfigPreSharedKey) String() string { @@ -78136,7 +76712,7 @@ func (*InterconnectMacsecConfigPreSharedKey) ProtoMessage() {} func (x *InterconnectMacsecConfigPreSharedKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[711] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78193,11 +76769,9 @@ type InterconnectMacsecPreSharedKey struct { func (x *InterconnectMacsecPreSharedKey) Reset() { *x = InterconnectMacsecPreSharedKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[712] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[712] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectMacsecPreSharedKey) String() string { @@ -78208,7 +76782,7 @@ func (*InterconnectMacsecPreSharedKey) ProtoMessage() {} func (x *InterconnectMacsecPreSharedKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[712] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78266,11 +76840,9 @@ type InterconnectOutageNotification struct { func (x *InterconnectOutageNotification) Reset() { *x = InterconnectOutageNotification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[713] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[713] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectOutageNotification) String() string { @@ -78281,7 +76853,7 @@ func (*InterconnectOutageNotification) ProtoMessage() {} func (x *InterconnectOutageNotification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[713] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78405,11 +76977,9 @@ type InterconnectRemoteLocation struct { func (x *InterconnectRemoteLocation) Reset() { *x = InterconnectRemoteLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[714] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[714] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectRemoteLocation) String() string { @@ -78420,7 +76990,7 @@ func (*InterconnectRemoteLocation) ProtoMessage() {} func (x *InterconnectRemoteLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[714] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78592,11 +77162,9 @@ type InterconnectRemoteLocationConstraints struct { func (x *InterconnectRemoteLocationConstraints) Reset() { *x = InterconnectRemoteLocationConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[715] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[715] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectRemoteLocationConstraints) String() string { @@ -78607,7 +77175,7 @@ func (*InterconnectRemoteLocationConstraints) ProtoMessage() {} func (x *InterconnectRemoteLocationConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[715] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78654,11 +77222,9 @@ type InterconnectRemoteLocationConstraintsSubnetLengthRange struct { func (x *InterconnectRemoteLocationConstraintsSubnetLengthRange) Reset() { *x = InterconnectRemoteLocationConstraintsSubnetLengthRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[716] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[716] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectRemoteLocationConstraintsSubnetLengthRange) String() string { @@ -78669,7 +77235,7 @@ func (*InterconnectRemoteLocationConstraintsSubnetLengthRange) ProtoMessage() {} func (x *InterconnectRemoteLocationConstraintsSubnetLengthRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[716] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78720,11 +77286,9 @@ type InterconnectRemoteLocationList struct { func (x *InterconnectRemoteLocationList) Reset() { *x = InterconnectRemoteLocationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[717] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[717] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectRemoteLocationList) String() string { @@ -78735,7 +77299,7 @@ func (*InterconnectRemoteLocationList) ProtoMessage() {} func (x *InterconnectRemoteLocationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[717] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78803,11 +77367,9 @@ type InterconnectRemoteLocationPermittedConnections struct { func (x *InterconnectRemoteLocationPermittedConnections) Reset() { *x = InterconnectRemoteLocationPermittedConnections{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[718] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[718] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectRemoteLocationPermittedConnections) String() string { @@ -78818,7 +77380,7 @@ func (*InterconnectRemoteLocationPermittedConnections) ProtoMessage() {} func (x *InterconnectRemoteLocationPermittedConnections) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[718] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78851,11 +77413,9 @@ type InterconnectsGetDiagnosticsResponse struct { func (x *InterconnectsGetDiagnosticsResponse) Reset() { *x = InterconnectsGetDiagnosticsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[719] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[719] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectsGetDiagnosticsResponse) String() string { @@ -78866,7 +77426,7 @@ func (*InterconnectsGetDiagnosticsResponse) ProtoMessage() {} func (x *InterconnectsGetDiagnosticsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[719] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78901,11 +77461,9 @@ type InterconnectsGetMacsecConfigResponse struct { func (x *InterconnectsGetMacsecConfigResponse) Reset() { *x = InterconnectsGetMacsecConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[720] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[720] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectsGetMacsecConfigResponse) String() string { @@ -78916,7 +77474,7 @@ func (*InterconnectsGetMacsecConfigResponse) ProtoMessage() {} func (x *InterconnectsGetMacsecConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[720] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78963,11 +77521,9 @@ type InvalidateCacheUrlMapRequest struct { func (x *InvalidateCacheUrlMapRequest) Reset() { *x = InvalidateCacheUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[721] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[721] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvalidateCacheUrlMapRequest) String() string { @@ -78978,7 +77534,7 @@ func (*InvalidateCacheUrlMapRequest) ProtoMessage() {} func (x *InvalidateCacheUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[721] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79035,11 +77591,9 @@ type Items struct { func (x *Items) Reset() { *x = Items{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[722] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[722] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Items) String() string { @@ -79050,7 +77604,7 @@ func (*Items) ProtoMessage() {} func (x *Items) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[722] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79109,11 +77663,9 @@ type License struct { func (x *License) Reset() { *x = License{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[723] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[723] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *License) String() string { @@ -79124,7 +77676,7 @@ func (*License) ProtoMessage() {} func (x *License) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[723] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79238,11 +77790,9 @@ type LicenseCode struct { func (x *LicenseCode) Reset() { *x = LicenseCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[724] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[724] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicenseCode) String() string { @@ -79253,7 +77803,7 @@ func (*LicenseCode) ProtoMessage() {} func (x *LicenseCode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[724] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79344,11 +77894,9 @@ type LicenseCodeLicenseAlias struct { func (x *LicenseCodeLicenseAlias) Reset() { *x = LicenseCodeLicenseAlias{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[725] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[725] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicenseCodeLicenseAlias) String() string { @@ -79359,7 +77907,7 @@ func (*LicenseCodeLicenseAlias) ProtoMessage() {} func (x *LicenseCodeLicenseAlias) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[725] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79404,11 +77952,9 @@ type LicenseResourceCommitment struct { func (x *LicenseResourceCommitment) Reset() { *x = LicenseResourceCommitment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[726] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[726] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicenseResourceCommitment) String() string { @@ -79419,7 +77965,7 @@ func (*LicenseResourceCommitment) ProtoMessage() {} func (x *LicenseResourceCommitment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[726] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79468,11 +78014,9 @@ type LicenseResourceRequirements struct { func (x *LicenseResourceRequirements) Reset() { *x = LicenseResourceRequirements{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[727] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[727] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicenseResourceRequirements) String() string { @@ -79483,7 +78027,7 @@ func (*LicenseResourceRequirements) ProtoMessage() {} func (x *LicenseResourceRequirements) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[727] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79531,11 +78075,9 @@ type LicensesListResponse struct { func (x *LicensesListResponse) Reset() { *x = LicensesListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[728] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[728] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicensesListResponse) String() string { @@ -79546,7 +78088,7 @@ func (*LicensesListResponse) ProtoMessage() {} func (x *LicensesListResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[728] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79620,11 +78162,9 @@ type ListAcceleratorTypesRequest struct { func (x *ListAcceleratorTypesRequest) Reset() { *x = ListAcceleratorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[729] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[729] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAcceleratorTypesRequest) String() string { @@ -79635,7 +78175,7 @@ func (*ListAcceleratorTypesRequest) ProtoMessage() {} func (x *ListAcceleratorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[729] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79723,11 +78263,9 @@ type ListAddressesRequest struct { func (x *ListAddressesRequest) Reset() { *x = ListAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[730] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[730] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAddressesRequest) String() string { @@ -79738,7 +78276,7 @@ func (*ListAddressesRequest) ProtoMessage() {} func (x *ListAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[730] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79814,11 +78352,9 @@ type ListAssociationsFirewallPolicyRequest struct { func (x *ListAssociationsFirewallPolicyRequest) Reset() { *x = ListAssociationsFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[731] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[731] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssociationsFirewallPolicyRequest) String() string { @@ -79829,7 +78365,7 @@ func (*ListAssociationsFirewallPolicyRequest) ProtoMessage() {} func (x *ListAssociationsFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[731] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79875,11 +78411,9 @@ type ListAutoscalersRequest struct { func (x *ListAutoscalersRequest) Reset() { *x = ListAutoscalersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[732] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[732] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutoscalersRequest) String() string { @@ -79890,7 +78424,7 @@ func (*ListAutoscalersRequest) ProtoMessage() {} func (x *ListAutoscalersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[732] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79978,11 +78512,9 @@ type ListAvailableFeaturesRegionSslPoliciesRequest struct { func (x *ListAvailableFeaturesRegionSslPoliciesRequest) Reset() { *x = ListAvailableFeaturesRegionSslPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[733] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[733] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableFeaturesRegionSslPoliciesRequest) String() string { @@ -79993,7 +78525,7 @@ func (*ListAvailableFeaturesRegionSslPoliciesRequest) ProtoMessage() {} func (x *ListAvailableFeaturesRegionSslPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[733] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80079,11 +78611,9 @@ type ListAvailableFeaturesSslPoliciesRequest struct { func (x *ListAvailableFeaturesSslPoliciesRequest) Reset() { *x = ListAvailableFeaturesSslPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[734] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[734] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableFeaturesSslPoliciesRequest) String() string { @@ -80094,7 +78624,7 @@ func (*ListAvailableFeaturesSslPoliciesRequest) ProtoMessage() {} func (x *ListAvailableFeaturesSslPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[734] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80173,11 +78703,9 @@ type ListBackendBucketsRequest struct { func (x *ListBackendBucketsRequest) Reset() { *x = ListBackendBucketsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[735] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[735] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackendBucketsRequest) String() string { @@ -80188,7 +78716,7 @@ func (*ListBackendBucketsRequest) ProtoMessage() {} func (x *ListBackendBucketsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[735] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80267,11 +78795,9 @@ type ListBackendServicesRequest struct { func (x *ListBackendServicesRequest) Reset() { *x = ListBackendServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[736] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[736] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackendServicesRequest) String() string { @@ -80282,7 +78808,7 @@ func (*ListBackendServicesRequest) ProtoMessage() {} func (x *ListBackendServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[736] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80363,11 +78889,9 @@ type ListDiskTypesRequest struct { func (x *ListDiskTypesRequest) Reset() { *x = ListDiskTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[737] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[737] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiskTypesRequest) String() string { @@ -80378,7 +78902,7 @@ func (*ListDiskTypesRequest) ProtoMessage() {} func (x *ListDiskTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[737] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80466,11 +78990,9 @@ type ListDisksRequest struct { func (x *ListDisksRequest) Reset() { *x = ListDisksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[738] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[738] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisksRequest) String() string { @@ -80481,7 +79003,7 @@ func (*ListDisksRequest) ProtoMessage() {} func (x *ListDisksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[738] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80571,11 +79093,9 @@ type ListDisksStoragePoolsRequest struct { func (x *ListDisksStoragePoolsRequest) Reset() { *x = ListDisksStoragePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[739] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[739] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDisksStoragePoolsRequest) String() string { @@ -80586,7 +79106,7 @@ func (*ListDisksStoragePoolsRequest) ProtoMessage() {} func (x *ListDisksStoragePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[739] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80683,11 +79203,9 @@ type ListErrorsInstanceGroupManagersRequest struct { func (x *ListErrorsInstanceGroupManagersRequest) Reset() { *x = ListErrorsInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[740] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[740] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListErrorsInstanceGroupManagersRequest) String() string { @@ -80698,7 +79216,7 @@ func (*ListErrorsInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListErrorsInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[740] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80795,11 +79313,9 @@ type ListErrorsRegionInstanceGroupManagersRequest struct { func (x *ListErrorsRegionInstanceGroupManagersRequest) Reset() { *x = ListErrorsRegionInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[741] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[741] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListErrorsRegionInstanceGroupManagersRequest) String() string { @@ -80810,7 +79326,7 @@ func (*ListErrorsRegionInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListErrorsRegionInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[741] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80903,11 +79419,9 @@ type ListExternalVpnGatewaysRequest struct { func (x *ListExternalVpnGatewaysRequest) Reset() { *x = ListExternalVpnGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[742] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[742] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalVpnGatewaysRequest) String() string { @@ -80918,7 +79432,7 @@ func (*ListExternalVpnGatewaysRequest) ProtoMessage() {} func (x *ListExternalVpnGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[742] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -80997,11 +79511,9 @@ type ListFirewallPoliciesRequest struct { func (x *ListFirewallPoliciesRequest) Reset() { *x = ListFirewallPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[743] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[743] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirewallPoliciesRequest) String() string { @@ -81012,7 +79524,7 @@ func (*ListFirewallPoliciesRequest) ProtoMessage() {} func (x *ListFirewallPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[743] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81091,11 +79603,9 @@ type ListFirewallsRequest struct { func (x *ListFirewallsRequest) Reset() { *x = ListFirewallsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[744] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[744] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirewallsRequest) String() string { @@ -81106,7 +79616,7 @@ func (*ListFirewallsRequest) ProtoMessage() {} func (x *ListFirewallsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[744] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81187,11 +79697,9 @@ type ListForwardingRulesRequest struct { func (x *ListForwardingRulesRequest) Reset() { *x = ListForwardingRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[745] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[745] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListForwardingRulesRequest) String() string { @@ -81202,7 +79710,7 @@ func (*ListForwardingRulesRequest) ProtoMessage() {} func (x *ListForwardingRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[745] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81288,11 +79796,9 @@ type ListGlobalAddressesRequest struct { func (x *ListGlobalAddressesRequest) Reset() { *x = ListGlobalAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[746] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[746] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalAddressesRequest) String() string { @@ -81303,7 +79809,7 @@ func (*ListGlobalAddressesRequest) ProtoMessage() {} func (x *ListGlobalAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[746] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81382,11 +79888,9 @@ type ListGlobalForwardingRulesRequest struct { func (x *ListGlobalForwardingRulesRequest) Reset() { *x = ListGlobalForwardingRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[747] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[747] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalForwardingRulesRequest) String() string { @@ -81397,7 +79901,7 @@ func (*ListGlobalForwardingRulesRequest) ProtoMessage() {} func (x *ListGlobalForwardingRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[747] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81476,11 +79980,9 @@ type ListGlobalNetworkEndpointGroupsRequest struct { func (x *ListGlobalNetworkEndpointGroupsRequest) Reset() { *x = ListGlobalNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[748] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[748] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalNetworkEndpointGroupsRequest) String() string { @@ -81491,7 +79993,7 @@ func (*ListGlobalNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListGlobalNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[748] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81570,11 +80072,9 @@ type ListGlobalOperationsRequest struct { func (x *ListGlobalOperationsRequest) Reset() { *x = ListGlobalOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[749] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[749] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalOperationsRequest) String() string { @@ -81585,7 +80085,7 @@ func (*ListGlobalOperationsRequest) ProtoMessage() {} func (x *ListGlobalOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[749] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81664,11 +80164,9 @@ type ListGlobalOrganizationOperationsRequest struct { func (x *ListGlobalOrganizationOperationsRequest) Reset() { *x = ListGlobalOrganizationOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[750] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[750] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalOrganizationOperationsRequest) String() string { @@ -81679,7 +80177,7 @@ func (*ListGlobalOrganizationOperationsRequest) ProtoMessage() {} func (x *ListGlobalOrganizationOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[750] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81758,11 +80256,9 @@ type ListGlobalPublicDelegatedPrefixesRequest struct { func (x *ListGlobalPublicDelegatedPrefixesRequest) Reset() { *x = ListGlobalPublicDelegatedPrefixesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[751] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[751] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlobalPublicDelegatedPrefixesRequest) String() string { @@ -81773,7 +80269,7 @@ func (*ListGlobalPublicDelegatedPrefixesRequest) ProtoMessage() {} func (x *ListGlobalPublicDelegatedPrefixesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[751] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81852,11 +80348,9 @@ type ListHealthChecksRequest struct { func (x *ListHealthChecksRequest) Reset() { *x = ListHealthChecksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[752] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[752] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHealthChecksRequest) String() string { @@ -81867,7 +80361,7 @@ func (*ListHealthChecksRequest) ProtoMessage() {} func (x *ListHealthChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[752] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -81946,11 +80440,9 @@ type ListImagesRequest struct { func (x *ListImagesRequest) Reset() { *x = ListImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[753] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[753] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImagesRequest) String() string { @@ -81961,7 +80453,7 @@ func (*ListImagesRequest) ProtoMessage() {} func (x *ListImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[753] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82044,11 +80536,9 @@ type ListInstanceGroupManagerResizeRequestsRequest struct { func (x *ListInstanceGroupManagerResizeRequestsRequest) Reset() { *x = ListInstanceGroupManagerResizeRequestsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[754] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[754] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceGroupManagerResizeRequestsRequest) String() string { @@ -82059,7 +80549,7 @@ func (*ListInstanceGroupManagerResizeRequestsRequest) ProtoMessage() {} func (x *ListInstanceGroupManagerResizeRequestsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[754] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82154,11 +80644,9 @@ type ListInstanceGroupManagersRequest struct { func (x *ListInstanceGroupManagersRequest) Reset() { *x = ListInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[755] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[755] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceGroupManagersRequest) String() string { @@ -82169,7 +80657,7 @@ func (*ListInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[755] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82257,11 +80745,9 @@ type ListInstanceGroupsRequest struct { func (x *ListInstanceGroupsRequest) Reset() { *x = ListInstanceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[756] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[756] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceGroupsRequest) String() string { @@ -82272,7 +80758,7 @@ func (*ListInstanceGroupsRequest) ProtoMessage() {} func (x *ListInstanceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[756] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82358,11 +80844,9 @@ type ListInstanceTemplatesRequest struct { func (x *ListInstanceTemplatesRequest) Reset() { *x = ListInstanceTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[757] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[757] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceTemplatesRequest) String() string { @@ -82373,7 +80857,7 @@ func (*ListInstanceTemplatesRequest) ProtoMessage() {} func (x *ListInstanceTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[757] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82458,11 +80942,9 @@ type ListInstancesInstanceGroupsRequest struct { func (x *ListInstancesInstanceGroupsRequest) Reset() { *x = ListInstancesInstanceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[758] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[758] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesInstanceGroupsRequest) String() string { @@ -82473,7 +80955,7 @@ func (*ListInstancesInstanceGroupsRequest) ProtoMessage() {} func (x *ListInstancesInstanceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[758] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82579,11 +81061,9 @@ type ListInstancesRegionInstanceGroupsRequest struct { func (x *ListInstancesRegionInstanceGroupsRequest) Reset() { *x = ListInstancesRegionInstanceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[759] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[759] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRegionInstanceGroupsRequest) String() string { @@ -82594,7 +81074,7 @@ func (*ListInstancesRegionInstanceGroupsRequest) ProtoMessage() {} func (x *ListInstancesRegionInstanceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[759] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82696,11 +81176,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[760] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[760] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -82711,7 +81189,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[760] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82799,11 +81277,9 @@ type ListInstantSnapshotsRequest struct { func (x *ListInstantSnapshotsRequest) Reset() { *x = ListInstantSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[761] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[761] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstantSnapshotsRequest) String() string { @@ -82814,7 +81290,7 @@ func (*ListInstantSnapshotsRequest) ProtoMessage() {} func (x *ListInstantSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[761] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82902,11 +81378,9 @@ type ListInterconnectAttachmentsRequest struct { func (x *ListInterconnectAttachmentsRequest) Reset() { *x = ListInterconnectAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[762] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[762] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectAttachmentsRequest) String() string { @@ -82917,7 +81391,7 @@ func (*ListInterconnectAttachmentsRequest) ProtoMessage() {} func (x *ListInterconnectAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[762] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83003,11 +81477,9 @@ type ListInterconnectLocationsRequest struct { func (x *ListInterconnectLocationsRequest) Reset() { *x = ListInterconnectLocationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[763] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[763] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectLocationsRequest) String() string { @@ -83018,7 +81490,7 @@ func (*ListInterconnectLocationsRequest) ProtoMessage() {} func (x *ListInterconnectLocationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[763] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83097,11 +81569,9 @@ type ListInterconnectRemoteLocationsRequest struct { func (x *ListInterconnectRemoteLocationsRequest) Reset() { *x = ListInterconnectRemoteLocationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[764] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[764] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectRemoteLocationsRequest) String() string { @@ -83112,7 +81582,7 @@ func (*ListInterconnectRemoteLocationsRequest) ProtoMessage() {} func (x *ListInterconnectRemoteLocationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[764] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83191,11 +81661,9 @@ type ListInterconnectsRequest struct { func (x *ListInterconnectsRequest) Reset() { *x = ListInterconnectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[765] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[765] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectsRequest) String() string { @@ -83206,7 +81674,7 @@ func (*ListInterconnectsRequest) ProtoMessage() {} func (x *ListInterconnectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[765] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83285,11 +81753,9 @@ type ListLicensesRequest struct { func (x *ListLicensesRequest) Reset() { *x = ListLicensesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[766] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[766] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLicensesRequest) String() string { @@ -83300,7 +81766,7 @@ func (*ListLicensesRequest) ProtoMessage() {} func (x *ListLicensesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[766] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83379,11 +81845,9 @@ type ListMachineImagesRequest struct { func (x *ListMachineImagesRequest) Reset() { *x = ListMachineImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[767] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[767] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMachineImagesRequest) String() string { @@ -83394,7 +81858,7 @@ func (*ListMachineImagesRequest) ProtoMessage() {} func (x *ListMachineImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[767] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83475,11 +81939,9 @@ type ListMachineTypesRequest struct { func (x *ListMachineTypesRequest) Reset() { *x = ListMachineTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[768] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[768] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMachineTypesRequest) String() string { @@ -83490,7 +81952,7 @@ func (*ListMachineTypesRequest) ProtoMessage() {} func (x *ListMachineTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[768] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83580,11 +82042,9 @@ type ListManagedInstancesInstanceGroupManagersRequest struct { func (x *ListManagedInstancesInstanceGroupManagersRequest) Reset() { *x = ListManagedInstancesInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[769] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[769] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagedInstancesInstanceGroupManagersRequest) String() string { @@ -83595,7 +82055,7 @@ func (*ListManagedInstancesInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListManagedInstancesInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[769] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83692,11 +82152,9 @@ type ListManagedInstancesRegionInstanceGroupManagersRequest struct { func (x *ListManagedInstancesRegionInstanceGroupManagersRequest) Reset() { *x = ListManagedInstancesRegionInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[770] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[770] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagedInstancesRegionInstanceGroupManagersRequest) String() string { @@ -83707,7 +82165,7 @@ func (*ListManagedInstancesRegionInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListManagedInstancesRegionInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[770] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83802,11 +82260,9 @@ type ListNetworkAttachmentsRequest struct { func (x *ListNetworkAttachmentsRequest) Reset() { *x = ListNetworkAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[771] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[771] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkAttachmentsRequest) String() string { @@ -83817,7 +82273,7 @@ func (*ListNetworkAttachmentsRequest) ProtoMessage() {} func (x *ListNetworkAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[771] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -83905,11 +82361,9 @@ type ListNetworkEndpointGroupsRequest struct { func (x *ListNetworkEndpointGroupsRequest) Reset() { *x = ListNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[772] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[772] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkEndpointGroupsRequest) String() string { @@ -83920,7 +82374,7 @@ func (*ListNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[772] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84008,11 +82462,9 @@ type ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest struct { func (x *ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest) Reset() { *x = ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[773] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[773] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest) String() string { @@ -84023,7 +82475,7 @@ func (*ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[773] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84115,11 +82567,9 @@ type ListNetworkEndpointsNetworkEndpointGroupsRequest struct { func (x *ListNetworkEndpointsNetworkEndpointGroupsRequest) Reset() { *x = ListNetworkEndpointsNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[774] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[774] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkEndpointsNetworkEndpointGroupsRequest) String() string { @@ -84130,7 +82580,7 @@ func (*ListNetworkEndpointsNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListNetworkEndpointsNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[774] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84234,11 +82684,9 @@ type ListNetworkEndpointsRegionNetworkEndpointGroupsRequest struct { func (x *ListNetworkEndpointsRegionNetworkEndpointGroupsRequest) Reset() { *x = ListNetworkEndpointsRegionNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[775] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[775] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkEndpointsRegionNetworkEndpointGroupsRequest) String() string { @@ -84249,7 +82697,7 @@ func (*ListNetworkEndpointsRegionNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListNetworkEndpointsRegionNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[775] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84342,11 +82790,9 @@ type ListNetworkFirewallPoliciesRequest struct { func (x *ListNetworkFirewallPoliciesRequest) Reset() { *x = ListNetworkFirewallPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[776] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[776] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkFirewallPoliciesRequest) String() string { @@ -84357,7 +82803,7 @@ func (*ListNetworkFirewallPoliciesRequest) ProtoMessage() {} func (x *ListNetworkFirewallPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[776] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84436,11 +82882,9 @@ type ListNetworkProfilesRequest struct { func (x *ListNetworkProfilesRequest) Reset() { *x = ListNetworkProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[777] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[777] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkProfilesRequest) String() string { @@ -84451,7 +82895,7 @@ func (*ListNetworkProfilesRequest) ProtoMessage() {} func (x *ListNetworkProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[777] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84530,11 +82974,9 @@ type ListNetworksRequest struct { func (x *ListNetworksRequest) Reset() { *x = ListNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[778] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[778] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworksRequest) String() string { @@ -84545,7 +82987,7 @@ func (*ListNetworksRequest) ProtoMessage() {} func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[778] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84626,11 +83068,9 @@ type ListNodeGroupsRequest struct { func (x *ListNodeGroupsRequest) Reset() { *x = ListNodeGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[779] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[779] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodeGroupsRequest) String() string { @@ -84641,7 +83081,7 @@ func (*ListNodeGroupsRequest) ProtoMessage() {} func (x *ListNodeGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[779] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84729,11 +83169,9 @@ type ListNodeTemplatesRequest struct { func (x *ListNodeTemplatesRequest) Reset() { *x = ListNodeTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[780] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[780] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodeTemplatesRequest) String() string { @@ -84744,7 +83182,7 @@ func (*ListNodeTemplatesRequest) ProtoMessage() {} func (x *ListNodeTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[780] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84832,11 +83270,9 @@ type ListNodeTypesRequest struct { func (x *ListNodeTypesRequest) Reset() { *x = ListNodeTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[781] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[781] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodeTypesRequest) String() string { @@ -84847,7 +83283,7 @@ func (*ListNodeTypesRequest) ProtoMessage() {} func (x *ListNodeTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[781] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84937,11 +83373,9 @@ type ListNodesNodeGroupsRequest struct { func (x *ListNodesNodeGroupsRequest) Reset() { *x = ListNodesNodeGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[782] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[782] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodesNodeGroupsRequest) String() string { @@ -84952,7 +83386,7 @@ func (*ListNodesNodeGroupsRequest) ProtoMessage() {} func (x *ListNodesNodeGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[782] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85047,11 +83481,9 @@ type ListPacketMirroringsRequest struct { func (x *ListPacketMirroringsRequest) Reset() { *x = ListPacketMirroringsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[783] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[783] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPacketMirroringsRequest) String() string { @@ -85062,7 +83494,7 @@ func (*ListPacketMirroringsRequest) ProtoMessage() {} func (x *ListPacketMirroringsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[783] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85157,11 +83589,9 @@ type ListPeeringRoutesNetworksRequest struct { func (x *ListPeeringRoutesNetworksRequest) Reset() { *x = ListPeeringRoutesNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[784] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[784] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPeeringRoutesNetworksRequest) String() string { @@ -85172,7 +83602,7 @@ func (*ListPeeringRoutesNetworksRequest) ProtoMessage() {} func (x *ListPeeringRoutesNetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[784] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85283,11 +83713,9 @@ type ListPerInstanceConfigsInstanceGroupManagersRequest struct { func (x *ListPerInstanceConfigsInstanceGroupManagersRequest) Reset() { *x = ListPerInstanceConfigsInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[785] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[785] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPerInstanceConfigsInstanceGroupManagersRequest) String() string { @@ -85298,7 +83726,7 @@ func (*ListPerInstanceConfigsInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListPerInstanceConfigsInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[785] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85395,11 +83823,9 @@ type ListPerInstanceConfigsRegionInstanceGroupManagersRequest struct { func (x *ListPerInstanceConfigsRegionInstanceGroupManagersRequest) Reset() { *x = ListPerInstanceConfigsRegionInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[786] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[786] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPerInstanceConfigsRegionInstanceGroupManagersRequest) String() string { @@ -85410,7 +83836,7 @@ func (*ListPerInstanceConfigsRegionInstanceGroupManagersRequest) ProtoMessage() func (x *ListPerInstanceConfigsRegionInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[786] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85503,11 +83929,9 @@ type ListPreconfiguredExpressionSetsSecurityPoliciesRequest struct { func (x *ListPreconfiguredExpressionSetsSecurityPoliciesRequest) Reset() { *x = ListPreconfiguredExpressionSetsSecurityPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[787] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[787] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPreconfiguredExpressionSetsSecurityPoliciesRequest) String() string { @@ -85518,7 +83942,7 @@ func (*ListPreconfiguredExpressionSetsSecurityPoliciesRequest) ProtoMessage() {} func (x *ListPreconfiguredExpressionSetsSecurityPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[787] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85597,11 +84021,9 @@ type ListPublicAdvertisedPrefixesRequest struct { func (x *ListPublicAdvertisedPrefixesRequest) Reset() { *x = ListPublicAdvertisedPrefixesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[788] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[788] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicAdvertisedPrefixesRequest) String() string { @@ -85612,7 +84034,7 @@ func (*ListPublicAdvertisedPrefixesRequest) ProtoMessage() {} func (x *ListPublicAdvertisedPrefixesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[788] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85693,11 +84115,9 @@ type ListPublicDelegatedPrefixesRequest struct { func (x *ListPublicDelegatedPrefixesRequest) Reset() { *x = ListPublicDelegatedPrefixesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[789] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[789] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicDelegatedPrefixesRequest) String() string { @@ -85708,7 +84128,7 @@ func (*ListPublicDelegatedPrefixesRequest) ProtoMessage() {} func (x *ListPublicDelegatedPrefixesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[789] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85798,11 +84218,9 @@ type ListReferrersInstancesRequest struct { func (x *ListReferrersInstancesRequest) Reset() { *x = ListReferrersInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[790] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[790] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReferrersInstancesRequest) String() string { @@ -85813,7 +84231,7 @@ func (*ListReferrersInstancesRequest) ProtoMessage() {} func (x *ListReferrersInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[790] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85908,11 +84326,9 @@ type ListRegionAutoscalersRequest struct { func (x *ListRegionAutoscalersRequest) Reset() { *x = ListRegionAutoscalersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[791] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[791] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionAutoscalersRequest) String() string { @@ -85923,7 +84339,7 @@ func (*ListRegionAutoscalersRequest) ProtoMessage() {} func (x *ListRegionAutoscalersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[791] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86011,11 +84427,9 @@ type ListRegionBackendServicesRequest struct { func (x *ListRegionBackendServicesRequest) Reset() { *x = ListRegionBackendServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[792] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[792] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionBackendServicesRequest) String() string { @@ -86026,7 +84440,7 @@ func (*ListRegionBackendServicesRequest) ProtoMessage() {} func (x *ListRegionBackendServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[792] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86114,11 +84528,9 @@ type ListRegionCommitmentsRequest struct { func (x *ListRegionCommitmentsRequest) Reset() { *x = ListRegionCommitmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[793] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[793] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionCommitmentsRequest) String() string { @@ -86129,7 +84541,7 @@ func (*ListRegionCommitmentsRequest) ProtoMessage() {} func (x *ListRegionCommitmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[793] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86217,11 +84629,9 @@ type ListRegionDiskTypesRequest struct { func (x *ListRegionDiskTypesRequest) Reset() { *x = ListRegionDiskTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[794] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[794] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionDiskTypesRequest) String() string { @@ -86232,7 +84642,7 @@ func (*ListRegionDiskTypesRequest) ProtoMessage() {} func (x *ListRegionDiskTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[794] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86320,11 +84730,9 @@ type ListRegionDisksRequest struct { func (x *ListRegionDisksRequest) Reset() { *x = ListRegionDisksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[795] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[795] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionDisksRequest) String() string { @@ -86335,7 +84743,7 @@ func (*ListRegionDisksRequest) ProtoMessage() {} func (x *ListRegionDisksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[795] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86423,11 +84831,9 @@ type ListRegionHealthCheckServicesRequest struct { func (x *ListRegionHealthCheckServicesRequest) Reset() { *x = ListRegionHealthCheckServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[796] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[796] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionHealthCheckServicesRequest) String() string { @@ -86438,7 +84844,7 @@ func (*ListRegionHealthCheckServicesRequest) ProtoMessage() {} func (x *ListRegionHealthCheckServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[796] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86526,11 +84932,9 @@ type ListRegionHealthChecksRequest struct { func (x *ListRegionHealthChecksRequest) Reset() { *x = ListRegionHealthChecksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[797] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[797] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionHealthChecksRequest) String() string { @@ -86541,7 +84945,7 @@ func (*ListRegionHealthChecksRequest) ProtoMessage() {} func (x *ListRegionHealthChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[797] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86629,11 +85033,9 @@ type ListRegionInstanceGroupManagersRequest struct { func (x *ListRegionInstanceGroupManagersRequest) Reset() { *x = ListRegionInstanceGroupManagersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[798] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[798] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionInstanceGroupManagersRequest) String() string { @@ -86644,7 +85046,7 @@ func (*ListRegionInstanceGroupManagersRequest) ProtoMessage() {} func (x *ListRegionInstanceGroupManagersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[798] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86732,11 +85134,9 @@ type ListRegionInstanceGroupsRequest struct { func (x *ListRegionInstanceGroupsRequest) Reset() { *x = ListRegionInstanceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[799] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[799] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionInstanceGroupsRequest) String() string { @@ -86747,7 +85147,7 @@ func (*ListRegionInstanceGroupsRequest) ProtoMessage() {} func (x *ListRegionInstanceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[799] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86835,11 +85235,9 @@ type ListRegionInstanceTemplatesRequest struct { func (x *ListRegionInstanceTemplatesRequest) Reset() { *x = ListRegionInstanceTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[800] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[800] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionInstanceTemplatesRequest) String() string { @@ -86850,7 +85248,7 @@ func (*ListRegionInstanceTemplatesRequest) ProtoMessage() {} func (x *ListRegionInstanceTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[800] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -86938,11 +85336,9 @@ type ListRegionInstantSnapshotsRequest struct { func (x *ListRegionInstantSnapshotsRequest) Reset() { *x = ListRegionInstantSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[801] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[801] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionInstantSnapshotsRequest) String() string { @@ -86953,7 +85349,7 @@ func (*ListRegionInstantSnapshotsRequest) ProtoMessage() {} func (x *ListRegionInstantSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[801] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87041,11 +85437,9 @@ type ListRegionNetworkEndpointGroupsRequest struct { func (x *ListRegionNetworkEndpointGroupsRequest) Reset() { *x = ListRegionNetworkEndpointGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[802] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[802] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionNetworkEndpointGroupsRequest) String() string { @@ -87056,7 +85450,7 @@ func (*ListRegionNetworkEndpointGroupsRequest) ProtoMessage() {} func (x *ListRegionNetworkEndpointGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[802] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87144,11 +85538,9 @@ type ListRegionNetworkFirewallPoliciesRequest struct { func (x *ListRegionNetworkFirewallPoliciesRequest) Reset() { *x = ListRegionNetworkFirewallPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[803] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[803] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionNetworkFirewallPoliciesRequest) String() string { @@ -87159,7 +85551,7 @@ func (*ListRegionNetworkFirewallPoliciesRequest) ProtoMessage() {} func (x *ListRegionNetworkFirewallPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[803] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87247,11 +85639,9 @@ type ListRegionNotificationEndpointsRequest struct { func (x *ListRegionNotificationEndpointsRequest) Reset() { *x = ListRegionNotificationEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[804] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[804] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionNotificationEndpointsRequest) String() string { @@ -87262,7 +85652,7 @@ func (*ListRegionNotificationEndpointsRequest) ProtoMessage() {} func (x *ListRegionNotificationEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[804] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87350,11 +85740,9 @@ type ListRegionOperationsRequest struct { func (x *ListRegionOperationsRequest) Reset() { *x = ListRegionOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[805] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[805] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionOperationsRequest) String() string { @@ -87365,7 +85753,7 @@ func (*ListRegionOperationsRequest) ProtoMessage() {} func (x *ListRegionOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[805] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87453,11 +85841,9 @@ type ListRegionSecurityPoliciesRequest struct { func (x *ListRegionSecurityPoliciesRequest) Reset() { *x = ListRegionSecurityPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[806] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[806] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionSecurityPoliciesRequest) String() string { @@ -87468,7 +85854,7 @@ func (*ListRegionSecurityPoliciesRequest) ProtoMessage() {} func (x *ListRegionSecurityPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[806] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87556,11 +85942,9 @@ type ListRegionSslCertificatesRequest struct { func (x *ListRegionSslCertificatesRequest) Reset() { *x = ListRegionSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[807] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[807] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionSslCertificatesRequest) String() string { @@ -87571,7 +85955,7 @@ func (*ListRegionSslCertificatesRequest) ProtoMessage() {} func (x *ListRegionSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[807] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87659,11 +86043,9 @@ type ListRegionSslPoliciesRequest struct { func (x *ListRegionSslPoliciesRequest) Reset() { *x = ListRegionSslPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[808] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[808] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionSslPoliciesRequest) String() string { @@ -87674,7 +86056,7 @@ func (*ListRegionSslPoliciesRequest) ProtoMessage() {} func (x *ListRegionSslPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[808] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87762,11 +86144,9 @@ type ListRegionTargetHttpProxiesRequest struct { func (x *ListRegionTargetHttpProxiesRequest) Reset() { *x = ListRegionTargetHttpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[809] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[809] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionTargetHttpProxiesRequest) String() string { @@ -87777,7 +86157,7 @@ func (*ListRegionTargetHttpProxiesRequest) ProtoMessage() {} func (x *ListRegionTargetHttpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[809] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87865,11 +86245,9 @@ type ListRegionTargetHttpsProxiesRequest struct { func (x *ListRegionTargetHttpsProxiesRequest) Reset() { *x = ListRegionTargetHttpsProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[810] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[810] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionTargetHttpsProxiesRequest) String() string { @@ -87880,7 +86258,7 @@ func (*ListRegionTargetHttpsProxiesRequest) ProtoMessage() {} func (x *ListRegionTargetHttpsProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[810] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87968,11 +86346,9 @@ type ListRegionTargetTcpProxiesRequest struct { func (x *ListRegionTargetTcpProxiesRequest) Reset() { *x = ListRegionTargetTcpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[811] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[811] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionTargetTcpProxiesRequest) String() string { @@ -87983,7 +86359,7 @@ func (*ListRegionTargetTcpProxiesRequest) ProtoMessage() {} func (x *ListRegionTargetTcpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[811] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88071,11 +86447,9 @@ type ListRegionUrlMapsRequest struct { func (x *ListRegionUrlMapsRequest) Reset() { *x = ListRegionUrlMapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[812] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[812] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionUrlMapsRequest) String() string { @@ -88086,7 +86460,7 @@ func (*ListRegionUrlMapsRequest) ProtoMessage() {} func (x *ListRegionUrlMapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[812] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88174,11 +86548,9 @@ type ListRegionZonesRequest struct { func (x *ListRegionZonesRequest) Reset() { *x = ListRegionZonesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[813] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[813] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionZonesRequest) String() string { @@ -88189,7 +86561,7 @@ func (*ListRegionZonesRequest) ProtoMessage() {} func (x *ListRegionZonesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[813] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88275,11 +86647,9 @@ type ListRegionsRequest struct { func (x *ListRegionsRequest) Reset() { *x = ListRegionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[814] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[814] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionsRequest) String() string { @@ -88290,7 +86660,7 @@ func (*ListRegionsRequest) ProtoMessage() {} func (x *ListRegionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[814] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88371,11 +86741,9 @@ type ListReservationsRequest struct { func (x *ListReservationsRequest) Reset() { *x = ListReservationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[815] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[815] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationsRequest) String() string { @@ -88386,7 +86754,7 @@ func (*ListReservationsRequest) ProtoMessage() {} func (x *ListReservationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[815] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88474,11 +86842,9 @@ type ListResourcePoliciesRequest struct { func (x *ListResourcePoliciesRequest) Reset() { *x = ListResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[816] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[816] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourcePoliciesRequest) String() string { @@ -88489,7 +86855,7 @@ func (*ListResourcePoliciesRequest) ProtoMessage() {} func (x *ListResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[816] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88577,11 +86943,9 @@ type ListRoutersRequest struct { func (x *ListRoutersRequest) Reset() { *x = ListRoutersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[817] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[817] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutersRequest) String() string { @@ -88592,7 +86956,7 @@ func (*ListRoutersRequest) ProtoMessage() {} func (x *ListRoutersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[817] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88678,11 +87042,9 @@ type ListRoutesRequest struct { func (x *ListRoutesRequest) Reset() { *x = ListRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[818] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[818] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesRequest) String() string { @@ -88693,7 +87055,7 @@ func (*ListRoutesRequest) ProtoMessage() {} func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[818] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88772,11 +87134,9 @@ type ListSecurityPoliciesRequest struct { func (x *ListSecurityPoliciesRequest) Reset() { *x = ListSecurityPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[819] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[819] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityPoliciesRequest) String() string { @@ -88787,7 +87147,7 @@ func (*ListSecurityPoliciesRequest) ProtoMessage() {} func (x *ListSecurityPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[819] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88868,11 +87228,9 @@ type ListServiceAttachmentsRequest struct { func (x *ListServiceAttachmentsRequest) Reset() { *x = ListServiceAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[820] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[820] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceAttachmentsRequest) String() string { @@ -88883,7 +87241,7 @@ func (*ListServiceAttachmentsRequest) ProtoMessage() {} func (x *ListServiceAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[820] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88969,11 +87327,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[821] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[821] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -88984,7 +87340,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[821] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89063,11 +87419,9 @@ type ListSslCertificatesRequest struct { func (x *ListSslCertificatesRequest) Reset() { *x = ListSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[822] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[822] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSslCertificatesRequest) String() string { @@ -89078,7 +87432,7 @@ func (*ListSslCertificatesRequest) ProtoMessage() {} func (x *ListSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[822] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89157,11 +87511,9 @@ type ListSslPoliciesRequest struct { func (x *ListSslPoliciesRequest) Reset() { *x = ListSslPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[823] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[823] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSslPoliciesRequest) String() string { @@ -89172,7 +87524,7 @@ func (*ListSslPoliciesRequest) ProtoMessage() {} func (x *ListSslPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[823] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89253,11 +87605,9 @@ type ListStoragePoolTypesRequest struct { func (x *ListStoragePoolTypesRequest) Reset() { *x = ListStoragePoolTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[824] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[824] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoragePoolTypesRequest) String() string { @@ -89268,7 +87618,7 @@ func (*ListStoragePoolTypesRequest) ProtoMessage() {} func (x *ListStoragePoolTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[824] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89356,11 +87706,9 @@ type ListStoragePoolsRequest struct { func (x *ListStoragePoolsRequest) Reset() { *x = ListStoragePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[825] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[825] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoragePoolsRequest) String() string { @@ -89371,7 +87719,7 @@ func (*ListStoragePoolsRequest) ProtoMessage() {} func (x *ListStoragePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[825] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89459,11 +87807,9 @@ type ListSubnetworksRequest struct { func (x *ListSubnetworksRequest) Reset() { *x = ListSubnetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[826] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[826] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubnetworksRequest) String() string { @@ -89474,7 +87820,7 @@ func (*ListSubnetworksRequest) ProtoMessage() {} func (x *ListSubnetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[826] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89560,11 +87906,9 @@ type ListTargetGrpcProxiesRequest struct { func (x *ListTargetGrpcProxiesRequest) Reset() { *x = ListTargetGrpcProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[827] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[827] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetGrpcProxiesRequest) String() string { @@ -89575,7 +87919,7 @@ func (*ListTargetGrpcProxiesRequest) ProtoMessage() {} func (x *ListTargetGrpcProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[827] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89654,11 +87998,9 @@ type ListTargetHttpProxiesRequest struct { func (x *ListTargetHttpProxiesRequest) Reset() { *x = ListTargetHttpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[828] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[828] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetHttpProxiesRequest) String() string { @@ -89669,7 +88011,7 @@ func (*ListTargetHttpProxiesRequest) ProtoMessage() {} func (x *ListTargetHttpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[828] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89748,11 +88090,9 @@ type ListTargetHttpsProxiesRequest struct { func (x *ListTargetHttpsProxiesRequest) Reset() { *x = ListTargetHttpsProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[829] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[829] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetHttpsProxiesRequest) String() string { @@ -89763,7 +88103,7 @@ func (*ListTargetHttpsProxiesRequest) ProtoMessage() {} func (x *ListTargetHttpsProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[829] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89844,11 +88184,9 @@ type ListTargetInstancesRequest struct { func (x *ListTargetInstancesRequest) Reset() { *x = ListTargetInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[830] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[830] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetInstancesRequest) String() string { @@ -89859,7 +88197,7 @@ func (*ListTargetInstancesRequest) ProtoMessage() {} func (x *ListTargetInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[830] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89947,11 +88285,9 @@ type ListTargetPoolsRequest struct { func (x *ListTargetPoolsRequest) Reset() { *x = ListTargetPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[831] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[831] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetPoolsRequest) String() string { @@ -89962,7 +88298,7 @@ func (*ListTargetPoolsRequest) ProtoMessage() {} func (x *ListTargetPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[831] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90048,11 +88384,9 @@ type ListTargetSslProxiesRequest struct { func (x *ListTargetSslProxiesRequest) Reset() { *x = ListTargetSslProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[832] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[832] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSslProxiesRequest) String() string { @@ -90063,7 +88397,7 @@ func (*ListTargetSslProxiesRequest) ProtoMessage() {} func (x *ListTargetSslProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[832] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90142,11 +88476,9 @@ type ListTargetTcpProxiesRequest struct { func (x *ListTargetTcpProxiesRequest) Reset() { *x = ListTargetTcpProxiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[833] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[833] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetTcpProxiesRequest) String() string { @@ -90157,7 +88489,7 @@ func (*ListTargetTcpProxiesRequest) ProtoMessage() {} func (x *ListTargetTcpProxiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[833] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90238,11 +88570,9 @@ type ListTargetVpnGatewaysRequest struct { func (x *ListTargetVpnGatewaysRequest) Reset() { *x = ListTargetVpnGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[834] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[834] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetVpnGatewaysRequest) String() string { @@ -90253,7 +88583,7 @@ func (*ListTargetVpnGatewaysRequest) ProtoMessage() {} func (x *ListTargetVpnGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[834] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90339,11 +88669,9 @@ type ListUrlMapsRequest struct { func (x *ListUrlMapsRequest) Reset() { *x = ListUrlMapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[835] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[835] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUrlMapsRequest) String() string { @@ -90354,7 +88682,7 @@ func (*ListUrlMapsRequest) ProtoMessage() {} func (x *ListUrlMapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[835] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90433,11 +88761,9 @@ type ListUsableBackendServicesRequest struct { func (x *ListUsableBackendServicesRequest) Reset() { *x = ListUsableBackendServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[836] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[836] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableBackendServicesRequest) String() string { @@ -90448,7 +88774,7 @@ func (*ListUsableBackendServicesRequest) ProtoMessage() {} func (x *ListUsableBackendServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[836] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90529,11 +88855,9 @@ type ListUsableRegionBackendServicesRequest struct { func (x *ListUsableRegionBackendServicesRequest) Reset() { *x = ListUsableRegionBackendServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[837] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[837] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableRegionBackendServicesRequest) String() string { @@ -90544,7 +88868,7 @@ func (*ListUsableRegionBackendServicesRequest) ProtoMessage() {} func (x *ListUsableRegionBackendServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[837] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90630,11 +88954,9 @@ type ListUsableSubnetworksRequest struct { func (x *ListUsableSubnetworksRequest) Reset() { *x = ListUsableSubnetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[838] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[838] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableSubnetworksRequest) String() string { @@ -90645,7 +88967,7 @@ func (*ListUsableSubnetworksRequest) ProtoMessage() {} func (x *ListUsableSubnetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[838] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90726,11 +89048,9 @@ type ListVpnGatewaysRequest struct { func (x *ListVpnGatewaysRequest) Reset() { *x = ListVpnGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[839] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[839] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVpnGatewaysRequest) String() string { @@ -90741,7 +89061,7 @@ func (*ListVpnGatewaysRequest) ProtoMessage() {} func (x *ListVpnGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[839] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90829,11 +89149,9 @@ type ListVpnTunnelsRequest struct { func (x *ListVpnTunnelsRequest) Reset() { *x = ListVpnTunnelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[840] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[840] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVpnTunnelsRequest) String() string { @@ -90844,7 +89162,7 @@ func (*ListVpnTunnelsRequest) ProtoMessage() {} func (x *ListVpnTunnelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[840] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90932,11 +89250,9 @@ type ListXpnHostsProjectsRequest struct { func (x *ListXpnHostsProjectsRequest) Reset() { *x = ListXpnHostsProjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[841] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[841] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListXpnHostsProjectsRequest) String() string { @@ -90947,7 +89263,7 @@ func (*ListXpnHostsProjectsRequest) ProtoMessage() {} func (x *ListXpnHostsProjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[841] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91035,11 +89351,9 @@ type ListZoneOperationsRequest struct { func (x *ListZoneOperationsRequest) Reset() { *x = ListZoneOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[842] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[842] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZoneOperationsRequest) String() string { @@ -91050,7 +89364,7 @@ func (*ListZoneOperationsRequest) ProtoMessage() {} func (x *ListZoneOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[842] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91136,11 +89450,9 @@ type ListZonesRequest struct { func (x *ListZonesRequest) Reset() { *x = ListZonesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[843] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[843] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZonesRequest) String() string { @@ -91151,7 +89463,7 @@ func (*ListZonesRequest) ProtoMessage() {} func (x *ListZonesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[843] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91223,11 +89535,9 @@ type LocalDisk struct { func (x *LocalDisk) Reset() { *x = LocalDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[844] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[844] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalDisk) String() string { @@ -91238,7 +89548,7 @@ func (*LocalDisk) ProtoMessage() {} func (x *LocalDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[844] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91288,11 +89598,9 @@ type LocalizedMessage struct { func (x *LocalizedMessage) Reset() { *x = LocalizedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[845] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[845] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalizedMessage) String() string { @@ -91303,7 +89611,7 @@ func (*LocalizedMessage) ProtoMessage() {} func (x *LocalizedMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[845] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91347,11 +89655,9 @@ type LocationPolicy struct { func (x *LocationPolicy) Reset() { *x = LocationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[846] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[846] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationPolicy) String() string { @@ -91362,7 +89668,7 @@ func (*LocationPolicy) ProtoMessage() {} func (x *LocationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[846] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91405,11 +89711,9 @@ type LocationPolicyLocation struct { func (x *LocationPolicyLocation) Reset() { *x = LocationPolicyLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[847] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[847] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationPolicyLocation) String() string { @@ -91420,7 +89724,7 @@ func (*LocationPolicyLocation) ProtoMessage() {} func (x *LocationPolicyLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[847] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91461,11 +89765,9 @@ type LocationPolicyLocationConstraints struct { func (x *LocationPolicyLocationConstraints) Reset() { *x = LocationPolicyLocationConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[848] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[848] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationPolicyLocationConstraints) String() string { @@ -91476,7 +89778,7 @@ func (*LocationPolicyLocationConstraints) ProtoMessage() {} func (x *LocationPolicyLocationConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[848] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91545,11 +89847,9 @@ type MachineImage struct { func (x *MachineImage) Reset() { *x = MachineImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[849] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[849] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineImage) String() string { @@ -91560,7 +89860,7 @@ func (*MachineImage) ProtoMessage() {} func (x *MachineImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[849] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91723,11 +90023,9 @@ type MachineImageList struct { func (x *MachineImageList) Reset() { *x = MachineImageList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[850] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[850] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineImageList) String() string { @@ -91738,7 +90036,7 @@ func (*MachineImageList) ProtoMessage() {} func (x *MachineImageList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[850] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91840,11 +90138,9 @@ type MachineType struct { func (x *MachineType) Reset() { *x = MachineType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[851] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[851] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineType) String() string { @@ -91855,7 +90151,7 @@ func (*MachineType) ProtoMessage() {} func (x *MachineType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[851] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92012,11 +90308,9 @@ type MachineTypeAggregatedList struct { func (x *MachineTypeAggregatedList) Reset() { *x = MachineTypeAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[852] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[852] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineTypeAggregatedList) String() string { @@ -92027,7 +90321,7 @@ func (*MachineTypeAggregatedList) ProtoMessage() {} func (x *MachineTypeAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[852] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92113,11 +90407,9 @@ type MachineTypeList struct { func (x *MachineTypeList) Reset() { *x = MachineTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[853] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[853] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineTypeList) String() string { @@ -92128,7 +90420,7 @@ func (*MachineTypeList) ProtoMessage() {} func (x *MachineTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[853] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92198,11 +90490,9 @@ type MachineTypesScopedList struct { func (x *MachineTypesScopedList) Reset() { *x = MachineTypesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[854] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[854] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineTypesScopedList) String() string { @@ -92213,7 +90503,7 @@ func (*MachineTypesScopedList) ProtoMessage() {} func (x *MachineTypesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[854] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92276,11 +90566,9 @@ type ManagedInstance struct { func (x *ManagedInstance) Reset() { *x = ManagedInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[855] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[855] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedInstance) String() string { @@ -92291,7 +90579,7 @@ func (*ManagedInstance) ProtoMessage() {} func (x *ManagedInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[855] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92397,11 +90685,9 @@ type ManagedInstanceInstanceHealth struct { func (x *ManagedInstanceInstanceHealth) Reset() { *x = ManagedInstanceInstanceHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[856] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[856] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedInstanceInstanceHealth) String() string { @@ -92412,7 +90698,7 @@ func (*ManagedInstanceInstanceHealth) ProtoMessage() {} func (x *ManagedInstanceInstanceHealth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[856] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92452,11 +90738,9 @@ type ManagedInstanceLastAttempt struct { func (x *ManagedInstanceLastAttempt) Reset() { *x = ManagedInstanceLastAttempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[857] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[857] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedInstanceLastAttempt) String() string { @@ -92467,7 +90751,7 @@ func (*ManagedInstanceLastAttempt) ProtoMessage() {} func (x *ManagedInstanceLastAttempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[857] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92500,11 +90784,9 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { func (x *ManagedInstancePropertiesFromFlexibilityPolicy) Reset() { *x = ManagedInstancePropertiesFromFlexibilityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[858] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[858] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedInstancePropertiesFromFlexibilityPolicy) String() string { @@ -92515,7 +90797,7 @@ func (*ManagedInstancePropertiesFromFlexibilityPolicy) ProtoMessage() {} func (x *ManagedInstancePropertiesFromFlexibilityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[858] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92550,11 +90832,9 @@ type ManagedInstanceVersion struct { func (x *ManagedInstanceVersion) Reset() { *x = ManagedInstanceVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[859] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[859] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedInstanceVersion) String() string { @@ -92565,7 +90845,7 @@ func (*ManagedInstanceVersion) ProtoMessage() {} func (x *ManagedInstanceVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[859] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92610,11 +90890,9 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[860] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[860] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -92625,7 +90903,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[860] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92676,11 +90954,9 @@ type MetadataFilter struct { func (x *MetadataFilter) Reset() { *x = MetadataFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[861] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[861] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataFilter) String() string { @@ -92691,7 +90967,7 @@ func (*MetadataFilter) ProtoMessage() {} func (x *MetadataFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[861] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92734,11 +91010,9 @@ type MetadataFilterLabelMatch struct { func (x *MetadataFilterLabelMatch) Reset() { *x = MetadataFilterLabelMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[862] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[862] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataFilterLabelMatch) String() string { @@ -92749,7 +91023,7 @@ func (*MetadataFilterLabelMatch) ProtoMessage() {} func (x *MetadataFilterLabelMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[862] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92798,11 +91072,9 @@ type MoveAddressRequest struct { func (x *MoveAddressRequest) Reset() { *x = MoveAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[863] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[863] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveAddressRequest) String() string { @@ -92813,7 +91085,7 @@ func (*MoveAddressRequest) ProtoMessage() {} func (x *MoveAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[863] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92879,11 +91151,9 @@ type MoveDiskProjectRequest struct { func (x *MoveDiskProjectRequest) Reset() { *x = MoveDiskProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[864] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[864] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveDiskProjectRequest) String() string { @@ -92894,7 +91164,7 @@ func (*MoveDiskProjectRequest) ProtoMessage() {} func (x *MoveDiskProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[864] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -92946,11 +91216,9 @@ type MoveFirewallPolicyRequest struct { func (x *MoveFirewallPolicyRequest) Reset() { *x = MoveFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[865] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[865] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFirewallPolicyRequest) String() string { @@ -92961,7 +91229,7 @@ func (*MoveFirewallPolicyRequest) ProtoMessage() {} func (x *MoveFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[865] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93015,11 +91283,9 @@ type MoveGlobalAddressRequest struct { func (x *MoveGlobalAddressRequest) Reset() { *x = MoveGlobalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[866] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[866] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveGlobalAddressRequest) String() string { @@ -93030,7 +91296,7 @@ func (*MoveGlobalAddressRequest) ProtoMessage() {} func (x *MoveGlobalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[866] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93089,11 +91355,9 @@ type MoveInstanceProjectRequest struct { func (x *MoveInstanceProjectRequest) Reset() { *x = MoveInstanceProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[867] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[867] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveInstanceProjectRequest) String() string { @@ -93104,7 +91368,7 @@ func (*MoveInstanceProjectRequest) ProtoMessage() {} func (x *MoveInstanceProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[867] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93154,11 +91418,9 @@ type NamedPort struct { func (x *NamedPort) Reset() { *x = NamedPort{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[868] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[868] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NamedPort) String() string { @@ -93169,7 +91431,7 @@ func (*NamedPort) ProtoMessage() {} func (x *NamedPort) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[868] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93212,11 +91474,9 @@ type NatIpInfo struct { func (x *NatIpInfo) Reset() { *x = NatIpInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[869] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[869] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NatIpInfo) String() string { @@ -93227,7 +91487,7 @@ func (*NatIpInfo) ProtoMessage() {} func (x *NatIpInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[869] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93274,11 +91534,9 @@ type NatIpInfoNatIpInfoMapping struct { func (x *NatIpInfoNatIpInfoMapping) Reset() { *x = NatIpInfoNatIpInfoMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[870] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[870] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NatIpInfoNatIpInfoMapping) String() string { @@ -93289,7 +91547,7 @@ func (*NatIpInfoNatIpInfoMapping) ProtoMessage() {} func (x *NatIpInfoNatIpInfoMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[870] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93336,11 +91594,9 @@ type NatIpInfoResponse struct { func (x *NatIpInfoResponse) Reset() { *x = NatIpInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[871] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[871] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NatIpInfoResponse) String() string { @@ -93351,7 +91607,7 @@ func (*NatIpInfoResponse) ProtoMessage() {} func (x *NatIpInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[871] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93422,11 +91678,9 @@ type Network struct { func (x *Network) Reset() { *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[872] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[872] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Network) String() string { @@ -93437,7 +91691,7 @@ func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[872] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93625,11 +91879,9 @@ type NetworkAttachment struct { func (x *NetworkAttachment) Reset() { *x = NetworkAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[873] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[873] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAttachment) String() string { @@ -93640,7 +91892,7 @@ func (*NetworkAttachment) ProtoMessage() {} func (x *NetworkAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[873] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93781,11 +92033,9 @@ type NetworkAttachmentAggregatedList struct { func (x *NetworkAttachmentAggregatedList) Reset() { *x = NetworkAttachmentAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[874] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[874] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAttachmentAggregatedList) String() string { @@ -93796,7 +92046,7 @@ func (*NetworkAttachmentAggregatedList) ProtoMessage() {} func (x *NetworkAttachmentAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[874] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93878,11 +92128,9 @@ type NetworkAttachmentConnectedEndpoint struct { func (x *NetworkAttachmentConnectedEndpoint) Reset() { *x = NetworkAttachmentConnectedEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[875] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[875] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAttachmentConnectedEndpoint) String() string { @@ -93893,7 +92141,7 @@ func (*NetworkAttachmentConnectedEndpoint) ProtoMessage() {} func (x *NetworkAttachmentConnectedEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[875] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -93977,11 +92225,9 @@ type NetworkAttachmentList struct { func (x *NetworkAttachmentList) Reset() { *x = NetworkAttachmentList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[876] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[876] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAttachmentList) String() string { @@ -93992,7 +92238,7 @@ func (*NetworkAttachmentList) ProtoMessage() {} func (x *NetworkAttachmentList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[876] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94062,11 +92308,9 @@ type NetworkAttachmentsScopedList struct { func (x *NetworkAttachmentsScopedList) Reset() { *x = NetworkAttachmentsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[877] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[877] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAttachmentsScopedList) String() string { @@ -94077,7 +92321,7 @@ func (*NetworkAttachmentsScopedList) ProtoMessage() {} func (x *NetworkAttachmentsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[877] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94136,11 +92380,9 @@ type NetworkEdgeSecurityService struct { func (x *NetworkEdgeSecurityService) Reset() { *x = NetworkEdgeSecurityService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[878] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[878] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEdgeSecurityService) String() string { @@ -94151,7 +92393,7 @@ func (*NetworkEdgeSecurityService) ProtoMessage() {} func (x *NetworkEdgeSecurityService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[878] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94260,11 +92502,9 @@ type NetworkEdgeSecurityServiceAggregatedList struct { func (x *NetworkEdgeSecurityServiceAggregatedList) Reset() { *x = NetworkEdgeSecurityServiceAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[879] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[879] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEdgeSecurityServiceAggregatedList) String() string { @@ -94275,7 +92515,7 @@ func (*NetworkEdgeSecurityServiceAggregatedList) ProtoMessage() {} func (x *NetworkEdgeSecurityServiceAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[879] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94359,11 +92599,9 @@ type NetworkEdgeSecurityServicesScopedList struct { func (x *NetworkEdgeSecurityServicesScopedList) Reset() { *x = NetworkEdgeSecurityServicesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[880] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[880] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEdgeSecurityServicesScopedList) String() string { @@ -94374,7 +92612,7 @@ func (*NetworkEdgeSecurityServicesScopedList) ProtoMessage() {} func (x *NetworkEdgeSecurityServicesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[880] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94427,11 +92665,9 @@ type NetworkEndpoint struct { func (x *NetworkEndpoint) Reset() { *x = NetworkEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[881] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[881] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpoint) String() string { @@ -94442,7 +92678,7 @@ func (*NetworkEndpoint) ProtoMessage() {} func (x *NetworkEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[881] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94554,11 +92790,9 @@ type NetworkEndpointGroup struct { func (x *NetworkEndpointGroup) Reset() { *x = NetworkEndpointGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[882] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[882] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroup) String() string { @@ -94569,7 +92803,7 @@ func (*NetworkEndpointGroup) ProtoMessage() {} func (x *NetworkEndpointGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[882] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94740,11 +92974,9 @@ type NetworkEndpointGroupAggregatedList struct { func (x *NetworkEndpointGroupAggregatedList) Reset() { *x = NetworkEndpointGroupAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[883] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[883] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupAggregatedList) String() string { @@ -94755,7 +92987,7 @@ func (*NetworkEndpointGroupAggregatedList) ProtoMessage() {} func (x *NetworkEndpointGroupAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[883] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94835,11 +93067,9 @@ type NetworkEndpointGroupAppEngine struct { func (x *NetworkEndpointGroupAppEngine) Reset() { *x = NetworkEndpointGroupAppEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[884] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[884] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupAppEngine) String() string { @@ -94850,7 +93080,7 @@ func (*NetworkEndpointGroupAppEngine) ProtoMessage() {} func (x *NetworkEndpointGroupAppEngine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[884] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94900,11 +93130,9 @@ type NetworkEndpointGroupCloudFunction struct { func (x *NetworkEndpointGroupCloudFunction) Reset() { *x = NetworkEndpointGroupCloudFunction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[885] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[885] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupCloudFunction) String() string { @@ -94915,7 +93143,7 @@ func (*NetworkEndpointGroupCloudFunction) ProtoMessage() {} func (x *NetworkEndpointGroupCloudFunction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[885] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94960,11 +93188,9 @@ type NetworkEndpointGroupCloudRun struct { func (x *NetworkEndpointGroupCloudRun) Reset() { *x = NetworkEndpointGroupCloudRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[886] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[886] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupCloudRun) String() string { @@ -94975,7 +93201,7 @@ func (*NetworkEndpointGroupCloudRun) ProtoMessage() {} func (x *NetworkEndpointGroupCloudRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[886] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95032,11 +93258,9 @@ type NetworkEndpointGroupList struct { func (x *NetworkEndpointGroupList) Reset() { *x = NetworkEndpointGroupList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[887] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[887] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupList) String() string { @@ -95047,7 +93271,7 @@ func (*NetworkEndpointGroupList) ProtoMessage() {} func (x *NetworkEndpointGroupList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[887] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95123,11 +93347,9 @@ type NetworkEndpointGroupPscData struct { func (x *NetworkEndpointGroupPscData) Reset() { *x = NetworkEndpointGroupPscData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[888] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[888] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupPscData) String() string { @@ -95138,7 +93360,7 @@ func (*NetworkEndpointGroupPscData) ProtoMessage() {} func (x *NetworkEndpointGroupPscData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[888] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95192,11 +93414,9 @@ type NetworkEndpointGroupsAttachEndpointsRequest struct { func (x *NetworkEndpointGroupsAttachEndpointsRequest) Reset() { *x = NetworkEndpointGroupsAttachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[889] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[889] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupsAttachEndpointsRequest) String() string { @@ -95207,7 +93427,7 @@ func (*NetworkEndpointGroupsAttachEndpointsRequest) ProtoMessage() {} func (x *NetworkEndpointGroupsAttachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[889] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95240,11 +93460,9 @@ type NetworkEndpointGroupsDetachEndpointsRequest struct { func (x *NetworkEndpointGroupsDetachEndpointsRequest) Reset() { *x = NetworkEndpointGroupsDetachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[890] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[890] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupsDetachEndpointsRequest) String() string { @@ -95255,7 +93473,7 @@ func (*NetworkEndpointGroupsDetachEndpointsRequest) ProtoMessage() {} func (x *NetworkEndpointGroupsDetachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[890] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95289,11 +93507,9 @@ type NetworkEndpointGroupsListEndpointsRequest struct { func (x *NetworkEndpointGroupsListEndpointsRequest) Reset() { *x = NetworkEndpointGroupsListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[891] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[891] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupsListEndpointsRequest) String() string { @@ -95304,7 +93520,7 @@ func (*NetworkEndpointGroupsListEndpointsRequest) ProtoMessage() {} func (x *NetworkEndpointGroupsListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[891] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95345,11 +93561,9 @@ type NetworkEndpointGroupsListNetworkEndpoints struct { func (x *NetworkEndpointGroupsListNetworkEndpoints) Reset() { *x = NetworkEndpointGroupsListNetworkEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[892] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[892] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupsListNetworkEndpoints) String() string { @@ -95360,7 +93574,7 @@ func (*NetworkEndpointGroupsListNetworkEndpoints) ProtoMessage() {} func (x *NetworkEndpointGroupsListNetworkEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[892] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95423,11 +93637,9 @@ type NetworkEndpointGroupsScopedList struct { func (x *NetworkEndpointGroupsScopedList) Reset() { *x = NetworkEndpointGroupsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[893] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[893] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointGroupsScopedList) String() string { @@ -95438,7 +93650,7 @@ func (*NetworkEndpointGroupsScopedList) ProtoMessage() {} func (x *NetworkEndpointGroupsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[893] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95480,11 +93692,9 @@ type NetworkEndpointWithHealthStatus struct { func (x *NetworkEndpointWithHealthStatus) Reset() { *x = NetworkEndpointWithHealthStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[894] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[894] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpointWithHealthStatus) String() string { @@ -95495,7 +93705,7 @@ func (*NetworkEndpointWithHealthStatus) ProtoMessage() {} func (x *NetworkEndpointWithHealthStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[894] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95569,11 +93779,9 @@ type NetworkInterface struct { func (x *NetworkInterface) Reset() { *x = NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[895] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[895] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkInterface) String() string { @@ -95584,7 +93792,7 @@ func (*NetworkInterface) ProtoMessage() {} func (x *NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[895] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95733,11 +93941,9 @@ type NetworkList struct { func (x *NetworkList) Reset() { *x = NetworkList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[896] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[896] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkList) String() string { @@ -95748,7 +93954,7 @@ func (*NetworkList) ProtoMessage() {} func (x *NetworkList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[896] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95841,11 +94047,9 @@ type NetworkPeering struct { func (x *NetworkPeering) Reset() { *x = NetworkPeering{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[897] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[897] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPeering) String() string { @@ -95856,7 +94060,7 @@ func (*NetworkPeering) ProtoMessage() {} func (x *NetworkPeering) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[897] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -95966,11 +94170,9 @@ type NetworkPerformanceConfig struct { func (x *NetworkPerformanceConfig) Reset() { *x = NetworkPerformanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[898] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[898] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPerformanceConfig) String() string { @@ -95981,7 +94183,7 @@ func (*NetworkPerformanceConfig) ProtoMessage() {} func (x *NetworkPerformanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[898] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96033,11 +94235,9 @@ type NetworkProfile struct { func (x *NetworkProfile) Reset() { *x = NetworkProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[899] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[899] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkProfile) String() string { @@ -96048,7 +94248,7 @@ func (*NetworkProfile) ProtoMessage() {} func (x *NetworkProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[899] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96145,11 +94345,9 @@ type NetworkProfileLocation struct { func (x *NetworkProfileLocation) Reset() { *x = NetworkProfileLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[900] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[900] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkProfileLocation) String() string { @@ -96160,7 +94358,7 @@ func (*NetworkProfileLocation) ProtoMessage() {} func (x *NetworkProfileLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[900] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96264,11 +94462,9 @@ type NetworkProfileNetworkFeatures struct { func (x *NetworkProfileNetworkFeatures) Reset() { *x = NetworkProfileNetworkFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[901] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[901] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkProfileNetworkFeatures) String() string { @@ -96279,7 +94475,7 @@ func (*NetworkProfileNetworkFeatures) ProtoMessage() {} func (x *NetworkProfileNetworkFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[901] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96473,11 +94669,9 @@ type NetworkProfilesListResponse struct { func (x *NetworkProfilesListResponse) Reset() { *x = NetworkProfilesListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[902] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[902] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkProfilesListResponse) String() string { @@ -96488,7 +94682,7 @@ func (*NetworkProfilesListResponse) ProtoMessage() {} func (x *NetworkProfilesListResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[902] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96580,11 +94774,9 @@ type NetworkRoutingConfig struct { func (x *NetworkRoutingConfig) Reset() { *x = NetworkRoutingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[903] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[903] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkRoutingConfig) String() string { @@ -96595,7 +94787,7 @@ func (*NetworkRoutingConfig) ProtoMessage() {} func (x *NetworkRoutingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[903] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96655,11 +94847,9 @@ type NetworksAddPeeringRequest struct { func (x *NetworksAddPeeringRequest) Reset() { *x = NetworksAddPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[904] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[904] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworksAddPeeringRequest) String() string { @@ -96670,7 +94860,7 @@ func (*NetworksAddPeeringRequest) ProtoMessage() {} func (x *NetworksAddPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[904] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96726,11 +94916,9 @@ type NetworksGetEffectiveFirewallsResponse struct { func (x *NetworksGetEffectiveFirewallsResponse) Reset() { *x = NetworksGetEffectiveFirewallsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[905] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[905] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworksGetEffectiveFirewallsResponse) String() string { @@ -96741,7 +94929,7 @@ func (*NetworksGetEffectiveFirewallsResponse) ProtoMessage() {} func (x *NetworksGetEffectiveFirewallsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[905] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96792,11 +94980,9 @@ type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { func (x *NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) Reset() { *x = NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[906] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[906] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) String() string { @@ -96807,7 +94993,7 @@ func (*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) ProtoMessag func (x *NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[906] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96875,11 +95061,9 @@ type NetworksRemovePeeringRequest struct { func (x *NetworksRemovePeeringRequest) Reset() { *x = NetworksRemovePeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[907] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[907] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworksRemovePeeringRequest) String() string { @@ -96890,7 +95074,7 @@ func (*NetworksRemovePeeringRequest) ProtoMessage() {} func (x *NetworksRemovePeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[907] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96922,11 +95106,9 @@ type NetworksUpdatePeeringRequest struct { func (x *NetworksUpdatePeeringRequest) Reset() { *x = NetworksUpdatePeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[908] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[908] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworksUpdatePeeringRequest) String() string { @@ -96937,7 +95119,7 @@ func (*NetworksUpdatePeeringRequest) ProtoMessage() {} func (x *NetworksUpdatePeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[908] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97003,11 +95185,9 @@ type NodeGroup struct { func (x *NodeGroup) Reset() { *x = NodeGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[909] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[909] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroup) String() string { @@ -97018,7 +95198,7 @@ func (*NodeGroup) ProtoMessage() {} func (x *NodeGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[909] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97175,11 +95355,9 @@ type NodeGroupAggregatedList struct { func (x *NodeGroupAggregatedList) Reset() { *x = NodeGroupAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[910] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[910] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupAggregatedList) String() string { @@ -97190,7 +95368,7 @@ func (*NodeGroupAggregatedList) ProtoMessage() {} func (x *NodeGroupAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[910] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97270,11 +95448,9 @@ type NodeGroupAutoscalingPolicy struct { func (x *NodeGroupAutoscalingPolicy) Reset() { *x = NodeGroupAutoscalingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[911] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[911] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupAutoscalingPolicy) String() string { @@ -97285,7 +95461,7 @@ func (*NodeGroupAutoscalingPolicy) ProtoMessage() {} func (x *NodeGroupAutoscalingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[911] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97343,11 +95519,9 @@ type NodeGroupList struct { func (x *NodeGroupList) Reset() { *x = NodeGroupList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[912] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[912] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupList) String() string { @@ -97358,7 +95532,7 @@ func (*NodeGroupList) ProtoMessage() {} func (x *NodeGroupList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[912] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97429,11 +95603,9 @@ type NodeGroupMaintenanceWindow struct { func (x *NodeGroupMaintenanceWindow) Reset() { *x = NodeGroupMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[913] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[913] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupMaintenanceWindow) String() string { @@ -97444,7 +95616,7 @@ func (*NodeGroupMaintenanceWindow) ProtoMessage() {} func (x *NodeGroupMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[913] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97511,11 +95683,9 @@ type NodeGroupNode struct { func (x *NodeGroupNode) Reset() { *x = NodeGroupNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[914] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[914] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupNode) String() string { @@ -97526,7 +95696,7 @@ func (*NodeGroupNode) ProtoMessage() {} func (x *NodeGroupNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[914] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97650,11 +95820,9 @@ type NodeGroupsAddNodesRequest struct { func (x *NodeGroupsAddNodesRequest) Reset() { *x = NodeGroupsAddNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[915] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[915] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsAddNodesRequest) String() string { @@ -97665,7 +95833,7 @@ func (*NodeGroupsAddNodesRequest) ProtoMessage() {} func (x *NodeGroupsAddNodesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[915] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97698,11 +95866,9 @@ type NodeGroupsDeleteNodesRequest struct { func (x *NodeGroupsDeleteNodesRequest) Reset() { *x = NodeGroupsDeleteNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[916] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[916] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsDeleteNodesRequest) String() string { @@ -97713,7 +95879,7 @@ func (*NodeGroupsDeleteNodesRequest) ProtoMessage() {} func (x *NodeGroupsDeleteNodesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[916] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97756,11 +95922,9 @@ type NodeGroupsListNodes struct { func (x *NodeGroupsListNodes) Reset() { *x = NodeGroupsListNodes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[917] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[917] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsListNodes) String() string { @@ -97771,7 +95935,7 @@ func (*NodeGroupsListNodes) ProtoMessage() {} func (x *NodeGroupsListNodes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[917] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97841,11 +96005,9 @@ type NodeGroupsPerformMaintenanceRequest struct { func (x *NodeGroupsPerformMaintenanceRequest) Reset() { *x = NodeGroupsPerformMaintenanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[918] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[918] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsPerformMaintenanceRequest) String() string { @@ -97856,7 +96018,7 @@ func (*NodeGroupsPerformMaintenanceRequest) ProtoMessage() {} func (x *NodeGroupsPerformMaintenanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[918] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97898,11 +96060,9 @@ type NodeGroupsScopedList struct { func (x *NodeGroupsScopedList) Reset() { *x = NodeGroupsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[919] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[919] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsScopedList) String() string { @@ -97913,7 +96073,7 @@ func (*NodeGroupsScopedList) ProtoMessage() {} func (x *NodeGroupsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[919] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97953,11 +96113,9 @@ type NodeGroupsSetNodeTemplateRequest struct { func (x *NodeGroupsSetNodeTemplateRequest) Reset() { *x = NodeGroupsSetNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[920] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[920] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsSetNodeTemplateRequest) String() string { @@ -97968,7 +96126,7 @@ func (*NodeGroupsSetNodeTemplateRequest) ProtoMessage() {} func (x *NodeGroupsSetNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[920] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98001,11 +96159,9 @@ type NodeGroupsSimulateMaintenanceEventRequest struct { func (x *NodeGroupsSimulateMaintenanceEventRequest) Reset() { *x = NodeGroupsSimulateMaintenanceEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[921] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[921] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupsSimulateMaintenanceEventRequest) String() string { @@ -98016,7 +96172,7 @@ func (*NodeGroupsSimulateMaintenanceEventRequest) ProtoMessage() {} func (x *NodeGroupsSimulateMaintenanceEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[921] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98080,11 +96236,9 @@ type NodeTemplate struct { func (x *NodeTemplate) Reset() { *x = NodeTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[922] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[922] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTemplate) String() string { @@ -98095,7 +96249,7 @@ func (*NodeTemplate) ProtoMessage() {} func (x *NodeTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[922] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98245,11 +96399,9 @@ type NodeTemplateAggregatedList struct { func (x *NodeTemplateAggregatedList) Reset() { *x = NodeTemplateAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[923] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[923] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTemplateAggregatedList) String() string { @@ -98260,7 +96412,7 @@ func (*NodeTemplateAggregatedList) ProtoMessage() {} func (x *NodeTemplateAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[923] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98346,11 +96498,9 @@ type NodeTemplateList struct { func (x *NodeTemplateList) Reset() { *x = NodeTemplateList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[924] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[924] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTemplateList) String() string { @@ -98361,7 +96511,7 @@ func (*NodeTemplateList) ProtoMessage() {} func (x *NodeTemplateList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[924] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98430,11 +96580,9 @@ type NodeTemplateNodeTypeFlexibility struct { func (x *NodeTemplateNodeTypeFlexibility) Reset() { *x = NodeTemplateNodeTypeFlexibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[925] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[925] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTemplateNodeTypeFlexibility) String() string { @@ -98445,7 +96593,7 @@ func (*NodeTemplateNodeTypeFlexibility) ProtoMessage() {} func (x *NodeTemplateNodeTypeFlexibility) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[925] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98494,11 +96642,9 @@ type NodeTemplatesScopedList struct { func (x *NodeTemplatesScopedList) Reset() { *x = NodeTemplatesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[926] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[926] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTemplatesScopedList) String() string { @@ -98509,7 +96655,7 @@ func (*NodeTemplatesScopedList) ProtoMessage() {} func (x *NodeTemplatesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[926] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98572,11 +96718,9 @@ type NodeType struct { func (x *NodeType) Reset() { *x = NodeType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[927] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[927] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeType) String() string { @@ -98587,7 +96731,7 @@ func (*NodeType) ProtoMessage() {} func (x *NodeType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[927] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98709,11 +96853,9 @@ type NodeTypeAggregatedList struct { func (x *NodeTypeAggregatedList) Reset() { *x = NodeTypeAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[928] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[928] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTypeAggregatedList) String() string { @@ -98724,7 +96866,7 @@ func (*NodeTypeAggregatedList) ProtoMessage() {} func (x *NodeTypeAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[928] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98810,11 +96952,9 @@ type NodeTypeList struct { func (x *NodeTypeList) Reset() { *x = NodeTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[929] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[929] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTypeList) String() string { @@ -98825,7 +96965,7 @@ func (*NodeTypeList) ProtoMessage() {} func (x *NodeTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[929] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98895,11 +97035,9 @@ type NodeTypesScopedList struct { func (x *NodeTypesScopedList) Reset() { *x = NodeTypesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[930] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[930] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTypesScopedList) String() string { @@ -98910,7 +97048,7 @@ func (*NodeTypesScopedList) ProtoMessage() {} func (x *NodeTypesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[930] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -98965,11 +97103,9 @@ type NotificationEndpoint struct { func (x *NotificationEndpoint) Reset() { *x = NotificationEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[931] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[931] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationEndpoint) String() string { @@ -98980,7 +97116,7 @@ func (*NotificationEndpoint) ProtoMessage() {} func (x *NotificationEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[931] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99071,11 +97207,9 @@ type NotificationEndpointGrpcSettings struct { func (x *NotificationEndpointGrpcSettings) Reset() { *x = NotificationEndpointGrpcSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[932] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[932] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationEndpointGrpcSettings) String() string { @@ -99086,7 +97220,7 @@ func (*NotificationEndpointGrpcSettings) ProtoMessage() {} func (x *NotificationEndpointGrpcSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[932] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99157,11 +97291,9 @@ type NotificationEndpointList struct { func (x *NotificationEndpointList) Reset() { *x = NotificationEndpointList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[933] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[933] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationEndpointList) String() string { @@ -99172,7 +97304,7 @@ func (*NotificationEndpointList) ProtoMessage() {} func (x *NotificationEndpointList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[933] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99290,11 +97422,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[934] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[934] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -99305,7 +97435,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[934] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99525,11 +97655,9 @@ type OperationAggregatedList struct { func (x *OperationAggregatedList) Reset() { *x = OperationAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[935] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[935] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationAggregatedList) String() string { @@ -99540,7 +97668,7 @@ func (*OperationAggregatedList) ProtoMessage() {} func (x *OperationAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[935] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99626,11 +97754,9 @@ type OperationList struct { func (x *OperationList) Reset() { *x = OperationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[936] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[936] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationList) String() string { @@ -99641,7 +97767,7 @@ func (*OperationList) ProtoMessage() {} func (x *OperationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[936] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99711,11 +97837,9 @@ type OperationsScopedList struct { func (x *OperationsScopedList) Reset() { *x = OperationsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[937] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[937] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationsScopedList) String() string { @@ -99726,7 +97850,7 @@ func (*OperationsScopedList) ProtoMessage() {} func (x *OperationsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[937] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99787,11 +97911,9 @@ type OutlierDetection struct { func (x *OutlierDetection) Reset() { *x = OutlierDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[938] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[938] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutlierDetection) String() string { @@ -99802,7 +97924,7 @@ func (*OutlierDetection) ProtoMessage() {} func (x *OutlierDetection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[938] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99918,11 +98040,9 @@ type PacketIntervals struct { func (x *PacketIntervals) Reset() { *x = PacketIntervals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[939] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[939] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketIntervals) String() string { @@ -99933,7 +98053,7 @@ func (*PacketIntervals) ProtoMessage() {} func (x *PacketIntervals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[939] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100027,11 +98147,9 @@ type PacketMirroring struct { func (x *PacketMirroring) Reset() { *x = PacketMirroring{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[940] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[940] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroring) String() string { @@ -100042,7 +98160,7 @@ func (*PacketMirroring) ProtoMessage() {} func (x *PacketMirroring) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[940] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100172,11 +98290,9 @@ type PacketMirroringAggregatedList struct { func (x *PacketMirroringAggregatedList) Reset() { *x = PacketMirroringAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[941] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[941] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringAggregatedList) String() string { @@ -100187,7 +98303,7 @@ func (*PacketMirroringAggregatedList) ProtoMessage() {} func (x *PacketMirroringAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[941] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100267,11 +98383,9 @@ type PacketMirroringFilter struct { func (x *PacketMirroringFilter) Reset() { *x = PacketMirroringFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[942] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[942] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringFilter) String() string { @@ -100282,7 +98396,7 @@ func (*PacketMirroringFilter) ProtoMessage() {} func (x *PacketMirroringFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[942] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100331,11 +98445,9 @@ type PacketMirroringForwardingRuleInfo struct { func (x *PacketMirroringForwardingRuleInfo) Reset() { *x = PacketMirroringForwardingRuleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[943] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[943] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringForwardingRuleInfo) String() string { @@ -100346,7 +98458,7 @@ func (*PacketMirroringForwardingRuleInfo) ProtoMessage() {} func (x *PacketMirroringForwardingRuleInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[943] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100397,11 +98509,9 @@ type PacketMirroringList struct { func (x *PacketMirroringList) Reset() { *x = PacketMirroringList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[944] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[944] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringList) String() string { @@ -100412,7 +98522,7 @@ func (*PacketMirroringList) ProtoMessage() {} func (x *PacketMirroringList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[944] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100484,11 +98594,9 @@ type PacketMirroringMirroredResourceInfo struct { func (x *PacketMirroringMirroredResourceInfo) Reset() { *x = PacketMirroringMirroredResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[945] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[945] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringMirroredResourceInfo) String() string { @@ -100499,7 +98607,7 @@ func (*PacketMirroringMirroredResourceInfo) ProtoMessage() {} func (x *PacketMirroringMirroredResourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[945] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100548,11 +98656,9 @@ type PacketMirroringMirroredResourceInfoInstanceInfo struct { func (x *PacketMirroringMirroredResourceInfoInstanceInfo) Reset() { *x = PacketMirroringMirroredResourceInfoInstanceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[946] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[946] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringMirroredResourceInfoInstanceInfo) String() string { @@ -100563,7 +98669,7 @@ func (*PacketMirroringMirroredResourceInfoInstanceInfo) ProtoMessage() {} func (x *PacketMirroringMirroredResourceInfoInstanceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[946] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100605,11 +98711,9 @@ type PacketMirroringMirroredResourceInfoSubnetInfo struct { func (x *PacketMirroringMirroredResourceInfoSubnetInfo) Reset() { *x = PacketMirroringMirroredResourceInfoSubnetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[947] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[947] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringMirroredResourceInfoSubnetInfo) String() string { @@ -100620,7 +98724,7 @@ func (*PacketMirroringMirroredResourceInfoSubnetInfo) ProtoMessage() {} func (x *PacketMirroringMirroredResourceInfoSubnetInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[947] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100662,11 +98766,9 @@ type PacketMirroringNetworkInfo struct { func (x *PacketMirroringNetworkInfo) Reset() { *x = PacketMirroringNetworkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[948] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[948] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringNetworkInfo) String() string { @@ -100677,7 +98779,7 @@ func (*PacketMirroringNetworkInfo) ProtoMessage() {} func (x *PacketMirroringNetworkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[948] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100719,11 +98821,9 @@ type PacketMirroringsScopedList struct { func (x *PacketMirroringsScopedList) Reset() { *x = PacketMirroringsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[949] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[949] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketMirroringsScopedList) String() string { @@ -100734,7 +98834,7 @@ func (*PacketMirroringsScopedList) ProtoMessage() {} func (x *PacketMirroringsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[949] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100783,11 +98883,9 @@ type PatchAutoscalerRequest struct { func (x *PatchAutoscalerRequest) Reset() { *x = PatchAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[950] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[950] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchAutoscalerRequest) String() string { @@ -100798,7 +98896,7 @@ func (*PatchAutoscalerRequest) ProtoMessage() {} func (x *PatchAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[950] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100866,11 +98964,9 @@ type PatchBackendBucketRequest struct { func (x *PatchBackendBucketRequest) Reset() { *x = PatchBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[951] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[951] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchBackendBucketRequest) String() string { @@ -100881,7 +98977,7 @@ func (*PatchBackendBucketRequest) ProtoMessage() {} func (x *PatchBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[951] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100942,11 +99038,9 @@ type PatchBackendServiceRequest struct { func (x *PatchBackendServiceRequest) Reset() { *x = PatchBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[952] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[952] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchBackendServiceRequest) String() string { @@ -100957,7 +99051,7 @@ func (*PatchBackendServiceRequest) ProtoMessage() {} func (x *PatchBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[952] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101016,11 +99110,9 @@ type PatchFirewallPolicyRequest struct { func (x *PatchFirewallPolicyRequest) Reset() { *x = PatchFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[953] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[953] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchFirewallPolicyRequest) String() string { @@ -101031,7 +99123,7 @@ func (*PatchFirewallPolicyRequest) ProtoMessage() {} func (x *PatchFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[953] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101085,11 +99177,9 @@ type PatchFirewallRequest struct { func (x *PatchFirewallRequest) Reset() { *x = PatchFirewallRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[954] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[954] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchFirewallRequest) String() string { @@ -101100,7 +99190,7 @@ func (*PatchFirewallRequest) ProtoMessage() {} func (x *PatchFirewallRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[954] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101163,11 +99253,9 @@ type PatchForwardingRuleRequest struct { func (x *PatchForwardingRuleRequest) Reset() { *x = PatchForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[955] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[955] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchForwardingRuleRequest) String() string { @@ -101178,7 +99266,7 @@ func (*PatchForwardingRuleRequest) ProtoMessage() {} func (x *PatchForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[955] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101246,11 +99334,9 @@ type PatchGlobalForwardingRuleRequest struct { func (x *PatchGlobalForwardingRuleRequest) Reset() { *x = PatchGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[956] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[956] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchGlobalForwardingRuleRequest) String() string { @@ -101261,7 +99347,7 @@ func (*PatchGlobalForwardingRuleRequest) ProtoMessage() {} func (x *PatchGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[956] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101322,11 +99408,9 @@ type PatchGlobalPublicDelegatedPrefixeRequest struct { func (x *PatchGlobalPublicDelegatedPrefixeRequest) Reset() { *x = PatchGlobalPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[957] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[957] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchGlobalPublicDelegatedPrefixeRequest) String() string { @@ -101337,7 +99421,7 @@ func (*PatchGlobalPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *PatchGlobalPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[957] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101398,11 +99482,9 @@ type PatchHealthCheckRequest struct { func (x *PatchHealthCheckRequest) Reset() { *x = PatchHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[958] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[958] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchHealthCheckRequest) String() string { @@ -101413,7 +99495,7 @@ func (*PatchHealthCheckRequest) ProtoMessage() {} func (x *PatchHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[958] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101474,11 +99556,9 @@ type PatchImageRequest struct { func (x *PatchImageRequest) Reset() { *x = PatchImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[959] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[959] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchImageRequest) String() string { @@ -101489,7 +99569,7 @@ func (*PatchImageRequest) ProtoMessage() {} func (x *PatchImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[959] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101552,11 +99632,9 @@ type PatchInstanceGroupManagerRequest struct { func (x *PatchInstanceGroupManagerRequest) Reset() { *x = PatchInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[960] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[960] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceGroupManagerRequest) String() string { @@ -101567,7 +99645,7 @@ func (*PatchInstanceGroupManagerRequest) ProtoMessage() {} func (x *PatchInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[960] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101637,11 +99715,9 @@ type PatchInstanceSettingRequest struct { func (x *PatchInstanceSettingRequest) Reset() { *x = PatchInstanceSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[961] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[961] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceSettingRequest) String() string { @@ -101652,7 +99728,7 @@ func (*PatchInstanceSettingRequest) ProtoMessage() {} func (x *PatchInstanceSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[961] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101722,11 +99798,9 @@ type PatchInterconnectAttachmentRequest struct { func (x *PatchInterconnectAttachmentRequest) Reset() { *x = PatchInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[962] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[962] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInterconnectAttachmentRequest) String() string { @@ -101737,7 +99811,7 @@ func (*PatchInterconnectAttachmentRequest) ProtoMessage() {} func (x *PatchInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[962] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101805,11 +99879,9 @@ type PatchInterconnectRequest struct { func (x *PatchInterconnectRequest) Reset() { *x = PatchInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[963] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[963] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInterconnectRequest) String() string { @@ -101820,7 +99892,7 @@ func (*PatchInterconnectRequest) ProtoMessage() {} func (x *PatchInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[963] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101883,11 +99955,9 @@ type PatchNetworkAttachmentRequest struct { func (x *PatchNetworkAttachmentRequest) Reset() { *x = PatchNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[964] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[964] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchNetworkAttachmentRequest) String() string { @@ -101898,7 +99968,7 @@ func (*PatchNetworkAttachmentRequest) ProtoMessage() {} func (x *PatchNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[964] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101971,11 +100041,9 @@ type PatchNetworkEdgeSecurityServiceRequest struct { func (x *PatchNetworkEdgeSecurityServiceRequest) Reset() { *x = PatchNetworkEdgeSecurityServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[965] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[965] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchNetworkEdgeSecurityServiceRequest) String() string { @@ -101986,7 +100054,7 @@ func (*PatchNetworkEdgeSecurityServiceRequest) ProtoMessage() {} func (x *PatchNetworkEdgeSecurityServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[965] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102068,11 +100136,9 @@ type PatchNetworkFirewallPolicyRequest struct { func (x *PatchNetworkFirewallPolicyRequest) Reset() { *x = PatchNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[966] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[966] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchNetworkFirewallPolicyRequest) String() string { @@ -102083,7 +100149,7 @@ func (*PatchNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *PatchNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[966] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102144,11 +100210,9 @@ type PatchNetworkRequest struct { func (x *PatchNetworkRequest) Reset() { *x = PatchNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[967] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[967] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchNetworkRequest) String() string { @@ -102159,7 +100223,7 @@ func (*PatchNetworkRequest) ProtoMessage() {} func (x *PatchNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[967] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102222,11 +100286,9 @@ type PatchNodeGroupRequest struct { func (x *PatchNodeGroupRequest) Reset() { *x = PatchNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[968] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[968] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchNodeGroupRequest) String() string { @@ -102237,7 +100299,7 @@ func (*PatchNodeGroupRequest) ProtoMessage() {} func (x *PatchNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[968] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102307,11 +100369,9 @@ type PatchPacketMirroringRequest struct { func (x *PatchPacketMirroringRequest) Reset() { *x = PatchPacketMirroringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[969] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[969] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchPacketMirroringRequest) String() string { @@ -102322,7 +100382,7 @@ func (*PatchPacketMirroringRequest) ProtoMessage() {} func (x *PatchPacketMirroringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[969] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102392,11 +100452,9 @@ type PatchPerInstanceConfigsInstanceGroupManagerRequest struct { func (x *PatchPerInstanceConfigsInstanceGroupManagerRequest) Reset() { *x = PatchPerInstanceConfigsInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[970] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[970] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchPerInstanceConfigsInstanceGroupManagerRequest) String() string { @@ -102407,7 +100465,7 @@ func (*PatchPerInstanceConfigsInstanceGroupManagerRequest) ProtoMessage() {} func (x *PatchPerInstanceConfigsInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[970] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102477,11 +100535,9 @@ type PatchPerInstanceConfigsRegionInstanceGroupManagerRequest struct { func (x *PatchPerInstanceConfigsRegionInstanceGroupManagerRequest) Reset() { *x = PatchPerInstanceConfigsRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[971] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[971] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchPerInstanceConfigsRegionInstanceGroupManagerRequest) String() string { @@ -102492,7 +100548,7 @@ func (*PatchPerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoMessage() func (x *PatchPerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[971] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102560,11 +100616,9 @@ type PatchPublicAdvertisedPrefixeRequest struct { func (x *PatchPublicAdvertisedPrefixeRequest) Reset() { *x = PatchPublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[972] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[972] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchPublicAdvertisedPrefixeRequest) String() string { @@ -102575,7 +100629,7 @@ func (*PatchPublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *PatchPublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[972] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102638,11 +100692,9 @@ type PatchPublicDelegatedPrefixeRequest struct { func (x *PatchPublicDelegatedPrefixeRequest) Reset() { *x = PatchPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[973] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[973] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchPublicDelegatedPrefixeRequest) String() string { @@ -102653,7 +100705,7 @@ func (*PatchPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *PatchPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[973] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102723,11 +100775,9 @@ type PatchRegionAutoscalerRequest struct { func (x *PatchRegionAutoscalerRequest) Reset() { *x = PatchRegionAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[974] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[974] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionAutoscalerRequest) String() string { @@ -102738,7 +100788,7 @@ func (*PatchRegionAutoscalerRequest) ProtoMessage() {} func (x *PatchRegionAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[974] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102808,11 +100858,9 @@ type PatchRegionBackendServiceRequest struct { func (x *PatchRegionBackendServiceRequest) Reset() { *x = PatchRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[975] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[975] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionBackendServiceRequest) String() string { @@ -102823,7 +100871,7 @@ func (*PatchRegionBackendServiceRequest) ProtoMessage() {} func (x *PatchRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[975] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102893,11 +100941,9 @@ type PatchRegionHealthCheckRequest struct { func (x *PatchRegionHealthCheckRequest) Reset() { *x = PatchRegionHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[976] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[976] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionHealthCheckRequest) String() string { @@ -102908,7 +100954,7 @@ func (*PatchRegionHealthCheckRequest) ProtoMessage() {} func (x *PatchRegionHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[976] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102978,11 +101024,9 @@ type PatchRegionHealthCheckServiceRequest struct { func (x *PatchRegionHealthCheckServiceRequest) Reset() { *x = PatchRegionHealthCheckServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[977] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[977] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionHealthCheckServiceRequest) String() string { @@ -102993,7 +101037,7 @@ func (*PatchRegionHealthCheckServiceRequest) ProtoMessage() {} func (x *PatchRegionHealthCheckServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[977] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103063,11 +101107,9 @@ type PatchRegionInstanceGroupManagerRequest struct { func (x *PatchRegionInstanceGroupManagerRequest) Reset() { *x = PatchRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[978] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[978] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionInstanceGroupManagerRequest) String() string { @@ -103078,7 +101120,7 @@ func (*PatchRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *PatchRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[978] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103148,11 +101190,9 @@ type PatchRegionNetworkFirewallPolicyRequest struct { func (x *PatchRegionNetworkFirewallPolicyRequest) Reset() { *x = PatchRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[979] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[979] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionNetworkFirewallPolicyRequest) String() string { @@ -103163,7 +101203,7 @@ func (*PatchRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *PatchRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[979] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103235,11 +101275,9 @@ type PatchRegionSecurityPolicyRequest struct { func (x *PatchRegionSecurityPolicyRequest) Reset() { *x = PatchRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[980] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[980] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionSecurityPolicyRequest) String() string { @@ -103250,7 +101288,7 @@ func (*PatchRegionSecurityPolicyRequest) ProtoMessage() {} func (x *PatchRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[980] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103327,11 +101365,9 @@ type PatchRegionSslPolicyRequest struct { func (x *PatchRegionSslPolicyRequest) Reset() { *x = PatchRegionSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[981] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[981] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionSslPolicyRequest) String() string { @@ -103342,7 +101378,7 @@ func (*PatchRegionSslPolicyRequest) ProtoMessage() {} func (x *PatchRegionSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[981] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103412,11 +101448,9 @@ type PatchRegionTargetHttpsProxyRequest struct { func (x *PatchRegionTargetHttpsProxyRequest) Reset() { *x = PatchRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[982] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[982] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionTargetHttpsProxyRequest) String() string { @@ -103427,7 +101461,7 @@ func (*PatchRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *PatchRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[982] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103497,11 +101531,9 @@ type PatchRegionUrlMapRequest struct { func (x *PatchRegionUrlMapRequest) Reset() { *x = PatchRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[983] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[983] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRegionUrlMapRequest) String() string { @@ -103512,7 +101544,7 @@ func (*PatchRegionUrlMapRequest) ProtoMessage() {} func (x *PatchRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[983] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103584,11 +101616,9 @@ type PatchResourcePolicyRequest struct { func (x *PatchResourcePolicyRequest) Reset() { *x = PatchResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[984] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[984] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchResourcePolicyRequest) String() string { @@ -103599,7 +101629,7 @@ func (*PatchResourcePolicyRequest) ProtoMessage() {} func (x *PatchResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[984] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103676,11 +101706,9 @@ type PatchRouterRequest struct { func (x *PatchRouterRequest) Reset() { *x = PatchRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[985] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[985] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRouterRequest) String() string { @@ -103691,7 +101719,7 @@ func (*PatchRouterRequest) ProtoMessage() {} func (x *PatchRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[985] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103759,11 +101787,9 @@ type PatchRuleFirewallPolicyRequest struct { func (x *PatchRuleFirewallPolicyRequest) Reset() { *x = PatchRuleFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[986] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[986] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRuleFirewallPolicyRequest) String() string { @@ -103774,7 +101800,7 @@ func (*PatchRuleFirewallPolicyRequest) ProtoMessage() {} func (x *PatchRuleFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[986] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103837,11 +101863,9 @@ type PatchRuleNetworkFirewallPolicyRequest struct { func (x *PatchRuleNetworkFirewallPolicyRequest) Reset() { *x = PatchRuleNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[987] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[987] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRuleNetworkFirewallPolicyRequest) String() string { @@ -103852,7 +101876,7 @@ func (*PatchRuleNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *PatchRuleNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[987] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103924,11 +101948,9 @@ type PatchRuleRegionNetworkFirewallPolicyRequest struct { func (x *PatchRuleRegionNetworkFirewallPolicyRequest) Reset() { *x = PatchRuleRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[988] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[988] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRuleRegionNetworkFirewallPolicyRequest) String() string { @@ -103939,7 +101961,7 @@ func (*PatchRuleRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *PatchRuleRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[988] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104020,11 +102042,9 @@ type PatchRuleRegionSecurityPolicyRequest struct { func (x *PatchRuleRegionSecurityPolicyRequest) Reset() { *x = PatchRuleRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[989] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[989] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRuleRegionSecurityPolicyRequest) String() string { @@ -104035,7 +102055,7 @@ func (*PatchRuleRegionSecurityPolicyRequest) ProtoMessage() {} func (x *PatchRuleRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[989] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104121,11 +102141,9 @@ type PatchRuleSecurityPolicyRequest struct { func (x *PatchRuleSecurityPolicyRequest) Reset() { *x = PatchRuleSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[990] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[990] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRuleSecurityPolicyRequest) String() string { @@ -104136,7 +102154,7 @@ func (*PatchRuleSecurityPolicyRequest) ProtoMessage() {} func (x *PatchRuleSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[990] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104213,11 +102231,9 @@ type PatchSecurityPolicyRequest struct { func (x *PatchSecurityPolicyRequest) Reset() { *x = PatchSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[991] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[991] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchSecurityPolicyRequest) String() string { @@ -104228,7 +102244,7 @@ func (*PatchSecurityPolicyRequest) ProtoMessage() {} func (x *PatchSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[991] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104298,11 +102314,9 @@ type PatchServiceAttachmentRequest struct { func (x *PatchServiceAttachmentRequest) Reset() { *x = PatchServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[992] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[992] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchServiceAttachmentRequest) String() string { @@ -104313,7 +102327,7 @@ func (*PatchServiceAttachmentRequest) ProtoMessage() {} func (x *PatchServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[992] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104381,11 +102395,9 @@ type PatchSnapshotSettingRequest struct { func (x *PatchSnapshotSettingRequest) Reset() { *x = PatchSnapshotSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[993] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[993] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchSnapshotSettingRequest) String() string { @@ -104396,7 +102408,7 @@ func (*PatchSnapshotSettingRequest) ProtoMessage() {} func (x *PatchSnapshotSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[993] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104457,11 +102469,9 @@ type PatchSslPolicyRequest struct { func (x *PatchSslPolicyRequest) Reset() { *x = PatchSslPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[994] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[994] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchSslPolicyRequest) String() string { @@ -104472,7 +102482,7 @@ func (*PatchSslPolicyRequest) ProtoMessage() {} func (x *PatchSslPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[994] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104537,11 +102547,9 @@ type PatchSubnetworkRequest struct { func (x *PatchSubnetworkRequest) Reset() { *x = PatchSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[995] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[995] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchSubnetworkRequest) String() string { @@ -104552,7 +102560,7 @@ func (*PatchSubnetworkRequest) ProtoMessage() {} func (x *PatchSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[995] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104627,11 +102635,9 @@ type PatchTargetGrpcProxyRequest struct { func (x *PatchTargetGrpcProxyRequest) Reset() { *x = PatchTargetGrpcProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[996] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[996] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchTargetGrpcProxyRequest) String() string { @@ -104642,7 +102648,7 @@ func (*PatchTargetGrpcProxyRequest) ProtoMessage() {} func (x *PatchTargetGrpcProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[996] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104703,11 +102709,9 @@ type PatchTargetHttpProxyRequest struct { func (x *PatchTargetHttpProxyRequest) Reset() { *x = PatchTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[997] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[997] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchTargetHttpProxyRequest) String() string { @@ -104718,7 +102722,7 @@ func (*PatchTargetHttpProxyRequest) ProtoMessage() {} func (x *PatchTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[997] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104779,11 +102783,9 @@ type PatchTargetHttpsProxyRequest struct { func (x *PatchTargetHttpsProxyRequest) Reset() { *x = PatchTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[998] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[998] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchTargetHttpsProxyRequest) String() string { @@ -104794,7 +102796,7 @@ func (*PatchTargetHttpsProxyRequest) ProtoMessage() {} func (x *PatchTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[998] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104855,11 +102857,9 @@ type PatchUrlMapRequest struct { func (x *PatchUrlMapRequest) Reset() { *x = PatchUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[999] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[999] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchUrlMapRequest) String() string { @@ -104870,7 +102870,7 @@ func (*PatchUrlMapRequest) ProtoMessage() {} func (x *PatchUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[999] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104941,11 +102941,9 @@ type PathMatcher struct { func (x *PathMatcher) Reset() { *x = PathMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1000] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1000] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PathMatcher) String() string { @@ -104956,7 +102954,7 @@ func (*PathMatcher) ProtoMessage() {} func (x *PathMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1000] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105054,11 +103052,9 @@ type PathRule struct { func (x *PathRule) Reset() { *x = PathRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1001] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1001] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PathRule) String() string { @@ -105069,7 +103065,7 @@ func (*PathRule) ProtoMessage() {} func (x *PathRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1001] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105137,11 +103133,9 @@ type PerInstanceConfig struct { func (x *PerInstanceConfig) Reset() { *x = PerInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1002] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1002] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PerInstanceConfig) String() string { @@ -105152,7 +103146,7 @@ func (*PerInstanceConfig) ProtoMessage() {} func (x *PerInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1002] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105213,11 +103207,9 @@ type PerformMaintenanceInstanceRequest struct { func (x *PerformMaintenanceInstanceRequest) Reset() { *x = PerformMaintenanceInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1003] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1003] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PerformMaintenanceInstanceRequest) String() string { @@ -105228,7 +103220,7 @@ func (*PerformMaintenanceInstanceRequest) ProtoMessage() {} func (x *PerformMaintenanceInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1003] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105291,11 +103283,9 @@ type PerformMaintenanceNodeGroupRequest struct { func (x *PerformMaintenanceNodeGroupRequest) Reset() { *x = PerformMaintenanceNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1004] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1004] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PerformMaintenanceNodeGroupRequest) String() string { @@ -105306,7 +103296,7 @@ func (*PerformMaintenanceNodeGroupRequest) ProtoMessage() {} func (x *PerformMaintenanceNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1004] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105375,11 +103365,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1005] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1005] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -105390,7 +103378,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1005] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105451,11 +103439,9 @@ type PreconfiguredWafSet struct { func (x *PreconfiguredWafSet) Reset() { *x = PreconfiguredWafSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1006] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1006] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreconfiguredWafSet) String() string { @@ -105466,7 +103452,7 @@ func (*PreconfiguredWafSet) ProtoMessage() {} func (x *PreconfiguredWafSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1006] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105506,11 +103492,9 @@ type PreservedState struct { func (x *PreservedState) Reset() { *x = PreservedState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1007] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1007] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreservedState) String() string { @@ -105521,7 +103505,7 @@ func (*PreservedState) ProtoMessage() {} func (x *PreservedState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1007] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105581,11 +103565,9 @@ type PreservedStatePreservedDisk struct { func (x *PreservedStatePreservedDisk) Reset() { *x = PreservedStatePreservedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1008] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1008] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreservedStatePreservedDisk) String() string { @@ -105596,7 +103578,7 @@ func (*PreservedStatePreservedDisk) ProtoMessage() {} func (x *PreservedStatePreservedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1008] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105646,11 +103628,9 @@ type PreservedStatePreservedNetworkIp struct { func (x *PreservedStatePreservedNetworkIp) Reset() { *x = PreservedStatePreservedNetworkIp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1009] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1009] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreservedStatePreservedNetworkIp) String() string { @@ -105661,7 +103641,7 @@ func (*PreservedStatePreservedNetworkIp) ProtoMessage() {} func (x *PreservedStatePreservedNetworkIp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1009] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105703,11 +103683,9 @@ type PreservedStatePreservedNetworkIpIpAddress struct { func (x *PreservedStatePreservedNetworkIpIpAddress) Reset() { *x = PreservedStatePreservedNetworkIpIpAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1010] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1010] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreservedStatePreservedNetworkIpIpAddress) String() string { @@ -105718,7 +103696,7 @@ func (*PreservedStatePreservedNetworkIpIpAddress) ProtoMessage() {} func (x *PreservedStatePreservedNetworkIpIpAddress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1010] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105765,11 +103743,9 @@ type PreviewRouterRequest struct { func (x *PreviewRouterRequest) Reset() { *x = PreviewRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1011] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1011] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreviewRouterRequest) String() string { @@ -105780,7 +103756,7 @@ func (*PreviewRouterRequest) ProtoMessage() {} func (x *PreviewRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1011] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105867,11 +103843,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1012] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1012] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -105882,7 +103856,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1012] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106013,11 +103987,9 @@ type ProjectsDisableXpnResourceRequest struct { func (x *ProjectsDisableXpnResourceRequest) Reset() { *x = ProjectsDisableXpnResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1013] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1013] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsDisableXpnResourceRequest) String() string { @@ -106028,7 +104000,7 @@ func (*ProjectsDisableXpnResourceRequest) ProtoMessage() {} func (x *ProjectsDisableXpnResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1013] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106061,11 +104033,9 @@ type ProjectsEnableXpnResourceRequest struct { func (x *ProjectsEnableXpnResourceRequest) Reset() { *x = ProjectsEnableXpnResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1014] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1014] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsEnableXpnResourceRequest) String() string { @@ -106076,7 +104046,7 @@ func (*ProjectsEnableXpnResourceRequest) ProtoMessage() {} func (x *ProjectsEnableXpnResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1014] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106113,11 +104083,9 @@ type ProjectsGetXpnResources struct { func (x *ProjectsGetXpnResources) Reset() { *x = ProjectsGetXpnResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1015] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1015] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsGetXpnResources) String() string { @@ -106128,7 +104096,7 @@ func (*ProjectsGetXpnResources) ProtoMessage() {} func (x *ProjectsGetXpnResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1015] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106175,11 +104143,9 @@ type ProjectsListXpnHostsRequest struct { func (x *ProjectsListXpnHostsRequest) Reset() { *x = ProjectsListXpnHostsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1016] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1016] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsListXpnHostsRequest) String() string { @@ -106190,7 +104156,7 @@ func (*ProjectsListXpnHostsRequest) ProtoMessage() {} func (x *ProjectsListXpnHostsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1016] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106224,11 +104190,9 @@ type ProjectsSetCloudArmorTierRequest struct { func (x *ProjectsSetCloudArmorTierRequest) Reset() { *x = ProjectsSetCloudArmorTierRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1017] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1017] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsSetCloudArmorTierRequest) String() string { @@ -106239,7 +104203,7 @@ func (*ProjectsSetCloudArmorTierRequest) ProtoMessage() {} func (x *ProjectsSetCloudArmorTierRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1017] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106273,11 +104237,9 @@ type ProjectsSetDefaultNetworkTierRequest struct { func (x *ProjectsSetDefaultNetworkTierRequest) Reset() { *x = ProjectsSetDefaultNetworkTierRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1018] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1018] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectsSetDefaultNetworkTierRequest) String() string { @@ -106288,7 +104250,7 @@ func (*ProjectsSetDefaultNetworkTierRequest) ProtoMessage() {} func (x *ProjectsSetDefaultNetworkTierRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1018] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106351,11 +104313,9 @@ type PublicAdvertisedPrefix struct { func (x *PublicAdvertisedPrefix) Reset() { *x = PublicAdvertisedPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1019] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1019] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicAdvertisedPrefix) String() string { @@ -106366,7 +104326,7 @@ func (*PublicAdvertisedPrefix) ProtoMessage() {} func (x *PublicAdvertisedPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1019] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106500,11 +104460,9 @@ type PublicAdvertisedPrefixList struct { func (x *PublicAdvertisedPrefixList) Reset() { *x = PublicAdvertisedPrefixList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1020] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1020] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicAdvertisedPrefixList) String() string { @@ -106515,7 +104473,7 @@ func (*PublicAdvertisedPrefixList) ProtoMessage() {} func (x *PublicAdvertisedPrefixList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1020] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106592,11 +104550,9 @@ type PublicAdvertisedPrefixPublicDelegatedPrefix struct { func (x *PublicAdvertisedPrefixPublicDelegatedPrefix) Reset() { *x = PublicAdvertisedPrefixPublicDelegatedPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1021] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1021] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicAdvertisedPrefixPublicDelegatedPrefix) String() string { @@ -106607,7 +104563,7 @@ func (*PublicAdvertisedPrefixPublicDelegatedPrefix) ProtoMessage() {} func (x *PublicAdvertisedPrefixPublicDelegatedPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1021] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106702,11 +104658,9 @@ type PublicDelegatedPrefix struct { func (x *PublicDelegatedPrefix) Reset() { *x = PublicDelegatedPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1022] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1022] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicDelegatedPrefix) String() string { @@ -106717,7 +104671,7 @@ func (*PublicDelegatedPrefix) ProtoMessage() {} func (x *PublicDelegatedPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1022] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106867,11 +104821,9 @@ type PublicDelegatedPrefixAggregatedList struct { func (x *PublicDelegatedPrefixAggregatedList) Reset() { *x = PublicDelegatedPrefixAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1023] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1023] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicDelegatedPrefixAggregatedList) String() string { @@ -106882,7 +104834,7 @@ func (*PublicDelegatedPrefixAggregatedList) ProtoMessage() {} func (x *PublicDelegatedPrefixAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1023] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106967,11 +104919,9 @@ type PublicDelegatedPrefixList struct { func (x *PublicDelegatedPrefixList) Reset() { *x = PublicDelegatedPrefixList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1024] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1024] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicDelegatedPrefixList) String() string { @@ -106982,7 +104932,7 @@ func (*PublicDelegatedPrefixList) ProtoMessage() {} func (x *PublicDelegatedPrefixList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1024] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107069,11 +105019,9 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { func (x *PublicDelegatedPrefixPublicDelegatedSubPrefix) Reset() { *x = PublicDelegatedPrefixPublicDelegatedSubPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1025] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1025] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicDelegatedPrefixPublicDelegatedSubPrefix) String() string { @@ -107084,7 +105032,7 @@ func (*PublicDelegatedPrefixPublicDelegatedSubPrefix) ProtoMessage() {} func (x *PublicDelegatedPrefixPublicDelegatedSubPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1025] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107175,11 +105123,9 @@ type PublicDelegatedPrefixesScopedList struct { func (x *PublicDelegatedPrefixesScopedList) Reset() { *x = PublicDelegatedPrefixesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1026] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1026] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicDelegatedPrefixesScopedList) String() string { @@ -107190,7 +105136,7 @@ func (*PublicDelegatedPrefixesScopedList) ProtoMessage() {} func (x *PublicDelegatedPrefixesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1026] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107238,11 +105184,9 @@ type Quota struct { func (x *Quota) Reset() { *x = Quota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1027] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1027] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Quota) String() string { @@ -107253,7 +105197,7 @@ func (*Quota) ProtoMessage() {} func (x *Quota) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1027] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107319,11 +105263,9 @@ type QuotaExceededInfo struct { func (x *QuotaExceededInfo) Reset() { *x = QuotaExceededInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1028] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1028] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaExceededInfo) String() string { @@ -107334,7 +105276,7 @@ func (*QuotaExceededInfo) ProtoMessage() {} func (x *QuotaExceededInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1028] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107408,11 +105350,9 @@ type QuotaStatusWarning struct { func (x *QuotaStatusWarning) Reset() { *x = QuotaStatusWarning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1029] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1029] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaStatusWarning) String() string { @@ -107423,7 +105363,7 @@ func (*QuotaStatusWarning) ProtoMessage() {} func (x *QuotaStatusWarning) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1029] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107476,11 +105416,9 @@ type RawDisk struct { func (x *RawDisk) Reset() { *x = RawDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1030] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1030] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawDisk) String() string { @@ -107491,7 +105429,7 @@ func (*RawDisk) ProtoMessage() {} func (x *RawDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1030] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107547,11 +105485,9 @@ type RecreateInstancesInstanceGroupManagerRequest struct { func (x *RecreateInstancesInstanceGroupManagerRequest) Reset() { *x = RecreateInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1031] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1031] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecreateInstancesInstanceGroupManagerRequest) String() string { @@ -107562,7 +105498,7 @@ func (*RecreateInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *RecreateInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1031] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107632,11 +105568,9 @@ type RecreateInstancesRegionInstanceGroupManagerRequest struct { func (x *RecreateInstancesRegionInstanceGroupManagerRequest) Reset() { *x = RecreateInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1032] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1032] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecreateInstancesRegionInstanceGroupManagerRequest) String() string { @@ -107647,7 +105581,7 @@ func (*RecreateInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *RecreateInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1032] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107715,11 +105649,9 @@ type Reference struct { func (x *Reference) Reset() { *x = Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1033] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1033] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reference) String() string { @@ -107730,7 +105662,7 @@ func (*Reference) ProtoMessage() {} func (x *Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1033] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107808,11 +105740,9 @@ type Region struct { func (x *Region) Reset() { *x = Region{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1034] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1034] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Region) String() string { @@ -107823,7 +105753,7 @@ func (*Region) ProtoMessage() {} func (x *Region) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1034] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107935,11 +105865,9 @@ type RegionAddressesMoveRequest struct { func (x *RegionAddressesMoveRequest) Reset() { *x = RegionAddressesMoveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1035] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1035] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionAddressesMoveRequest) String() string { @@ -107950,7 +105878,7 @@ func (*RegionAddressesMoveRequest) ProtoMessage() {} func (x *RegionAddressesMoveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1035] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108001,11 +105929,9 @@ type RegionAutoscalerList struct { func (x *RegionAutoscalerList) Reset() { *x = RegionAutoscalerList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1036] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1036] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionAutoscalerList) String() string { @@ -108016,7 +105942,7 @@ func (*RegionAutoscalerList) ProtoMessage() {} func (x *RegionAutoscalerList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1036] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108094,11 +106020,9 @@ type RegionDiskTypeList struct { func (x *RegionDiskTypeList) Reset() { *x = RegionDiskTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1037] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1037] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionDiskTypeList) String() string { @@ -108109,7 +106033,7 @@ func (*RegionDiskTypeList) ProtoMessage() {} func (x *RegionDiskTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1037] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108177,11 +106101,9 @@ type RegionDisksAddResourcePoliciesRequest struct { func (x *RegionDisksAddResourcePoliciesRequest) Reset() { *x = RegionDisksAddResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1038] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1038] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionDisksAddResourcePoliciesRequest) String() string { @@ -108192,7 +106114,7 @@ func (*RegionDisksAddResourcePoliciesRequest) ProtoMessage() {} func (x *RegionDisksAddResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1038] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108225,11 +106147,9 @@ type RegionDisksRemoveResourcePoliciesRequest struct { func (x *RegionDisksRemoveResourcePoliciesRequest) Reset() { *x = RegionDisksRemoveResourcePoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1039] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1039] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionDisksRemoveResourcePoliciesRequest) String() string { @@ -108240,7 +106160,7 @@ func (*RegionDisksRemoveResourcePoliciesRequest) ProtoMessage() {} func (x *RegionDisksRemoveResourcePoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1039] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108273,11 +106193,9 @@ type RegionDisksResizeRequest struct { func (x *RegionDisksResizeRequest) Reset() { *x = RegionDisksResizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1040] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1040] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionDisksResizeRequest) String() string { @@ -108288,7 +106206,7 @@ func (*RegionDisksResizeRequest) ProtoMessage() {} func (x *RegionDisksResizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1040] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108321,11 +106239,9 @@ type RegionDisksStartAsyncReplicationRequest struct { func (x *RegionDisksStartAsyncReplicationRequest) Reset() { *x = RegionDisksStartAsyncReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1041] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1041] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionDisksStartAsyncReplicationRequest) String() string { @@ -108336,7 +106252,7 @@ func (*RegionDisksStartAsyncReplicationRequest) ProtoMessage() {} func (x *RegionDisksStartAsyncReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1041] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108380,11 +106296,9 @@ type RegionInstanceGroupList struct { func (x *RegionInstanceGroupList) Reset() { *x = RegionInstanceGroupList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1042] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1042] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupList) String() string { @@ -108395,7 +106309,7 @@ func (*RegionInstanceGroupList) ProtoMessage() {} func (x *RegionInstanceGroupList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1042] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108464,11 +106378,9 @@ type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { func (x *RegionInstanceGroupManagerDeleteInstanceConfigReq) Reset() { *x = RegionInstanceGroupManagerDeleteInstanceConfigReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1043] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1043] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagerDeleteInstanceConfigReq) String() string { @@ -108479,7 +106391,7 @@ func (*RegionInstanceGroupManagerDeleteInstanceConfigReq) ProtoMessage() {} func (x *RegionInstanceGroupManagerDeleteInstanceConfigReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1043] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108523,11 +106435,9 @@ type RegionInstanceGroupManagerList struct { func (x *RegionInstanceGroupManagerList) Reset() { *x = RegionInstanceGroupManagerList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1044] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1044] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagerList) String() string { @@ -108538,7 +106448,7 @@ func (*RegionInstanceGroupManagerList) ProtoMessage() {} func (x *RegionInstanceGroupManagerList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1044] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108607,11 +106517,9 @@ type RegionInstanceGroupManagerPatchInstanceConfigReq struct { func (x *RegionInstanceGroupManagerPatchInstanceConfigReq) Reset() { *x = RegionInstanceGroupManagerPatchInstanceConfigReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1045] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1045] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagerPatchInstanceConfigReq) String() string { @@ -108622,7 +106530,7 @@ func (*RegionInstanceGroupManagerPatchInstanceConfigReq) ProtoMessage() {} func (x *RegionInstanceGroupManagerPatchInstanceConfigReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1045] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108656,11 +106564,9 @@ type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { func (x *RegionInstanceGroupManagerUpdateInstanceConfigReq) Reset() { *x = RegionInstanceGroupManagerUpdateInstanceConfigReq{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1046] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1046] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagerUpdateInstanceConfigReq) String() string { @@ -108671,7 +106577,7 @@ func (*RegionInstanceGroupManagerUpdateInstanceConfigReq) ProtoMessage() {} func (x *RegionInstanceGroupManagerUpdateInstanceConfigReq) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1046] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108704,11 +106610,9 @@ type RegionInstanceGroupManagersAbandonInstancesRequest struct { func (x *RegionInstanceGroupManagersAbandonInstancesRequest) Reset() { *x = RegionInstanceGroupManagersAbandonInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1047] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1047] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersAbandonInstancesRequest) String() string { @@ -108719,7 +106623,7 @@ func (*RegionInstanceGroupManagersAbandonInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersAbandonInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1047] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108761,11 +106665,9 @@ type RegionInstanceGroupManagersApplyUpdatesRequest struct { func (x *RegionInstanceGroupManagersApplyUpdatesRequest) Reset() { *x = RegionInstanceGroupManagersApplyUpdatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1048] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1048] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersApplyUpdatesRequest) String() string { @@ -108776,7 +106678,7 @@ func (*RegionInstanceGroupManagersApplyUpdatesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersApplyUpdatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1048] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108831,11 +106733,9 @@ type RegionInstanceGroupManagersCreateInstancesRequest struct { func (x *RegionInstanceGroupManagersCreateInstancesRequest) Reset() { *x = RegionInstanceGroupManagersCreateInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1049] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1049] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersCreateInstancesRequest) String() string { @@ -108846,7 +106746,7 @@ func (*RegionInstanceGroupManagersCreateInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersCreateInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1049] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108881,11 +106781,9 @@ type RegionInstanceGroupManagersDeleteInstancesRequest struct { func (x *RegionInstanceGroupManagersDeleteInstancesRequest) Reset() { *x = RegionInstanceGroupManagersDeleteInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1050] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1050] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersDeleteInstancesRequest) String() string { @@ -108896,7 +106794,7 @@ func (*RegionInstanceGroupManagersDeleteInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersDeleteInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1050] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108938,11 +106836,9 @@ type RegionInstanceGroupManagersListErrorsResponse struct { func (x *RegionInstanceGroupManagersListErrorsResponse) Reset() { *x = RegionInstanceGroupManagersListErrorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1051] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1051] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersListErrorsResponse) String() string { @@ -108953,7 +106849,7 @@ func (*RegionInstanceGroupManagersListErrorsResponse) ProtoMessage() {} func (x *RegionInstanceGroupManagersListErrorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1051] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108997,11 +106893,9 @@ type RegionInstanceGroupManagersListInstanceConfigsResp struct { func (x *RegionInstanceGroupManagersListInstanceConfigsResp) Reset() { *x = RegionInstanceGroupManagersListInstanceConfigsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1052] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1052] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersListInstanceConfigsResp) String() string { @@ -109012,7 +106906,7 @@ func (*RegionInstanceGroupManagersListInstanceConfigsResp) ProtoMessage() {} func (x *RegionInstanceGroupManagersListInstanceConfigsResp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1052] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109061,11 +106955,9 @@ type RegionInstanceGroupManagersListInstancesResponse struct { func (x *RegionInstanceGroupManagersListInstancesResponse) Reset() { *x = RegionInstanceGroupManagersListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1053] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1053] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersListInstancesResponse) String() string { @@ -109076,7 +106968,7 @@ func (*RegionInstanceGroupManagersListInstancesResponse) ProtoMessage() {} func (x *RegionInstanceGroupManagersListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1053] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109116,11 +107008,9 @@ type RegionInstanceGroupManagersRecreateRequest struct { func (x *RegionInstanceGroupManagersRecreateRequest) Reset() { *x = RegionInstanceGroupManagersRecreateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1054] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1054] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersRecreateRequest) String() string { @@ -109131,7 +107021,7 @@ func (*RegionInstanceGroupManagersRecreateRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersRecreateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1054] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109164,11 +107054,9 @@ type RegionInstanceGroupManagersResumeInstancesRequest struct { func (x *RegionInstanceGroupManagersResumeInstancesRequest) Reset() { *x = RegionInstanceGroupManagersResumeInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1055] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1055] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersResumeInstancesRequest) String() string { @@ -109179,7 +107067,7 @@ func (*RegionInstanceGroupManagersResumeInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersResumeInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1055] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109214,11 +107102,9 @@ type RegionInstanceGroupManagersSetTargetPoolsRequest struct { func (x *RegionInstanceGroupManagersSetTargetPoolsRequest) Reset() { *x = RegionInstanceGroupManagersSetTargetPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1056] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1056] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersSetTargetPoolsRequest) String() string { @@ -109229,7 +107115,7 @@ func (*RegionInstanceGroupManagersSetTargetPoolsRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersSetTargetPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1056] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109269,11 +107155,9 @@ type RegionInstanceGroupManagersSetTemplateRequest struct { func (x *RegionInstanceGroupManagersSetTemplateRequest) Reset() { *x = RegionInstanceGroupManagersSetTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1057] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1057] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersSetTemplateRequest) String() string { @@ -109284,7 +107168,7 @@ func (*RegionInstanceGroupManagersSetTemplateRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersSetTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1057] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109317,11 +107201,9 @@ type RegionInstanceGroupManagersStartInstancesRequest struct { func (x *RegionInstanceGroupManagersStartInstancesRequest) Reset() { *x = RegionInstanceGroupManagersStartInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1058] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1058] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersStartInstancesRequest) String() string { @@ -109332,7 +107214,7 @@ func (*RegionInstanceGroupManagersStartInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersStartInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1058] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109367,11 +107249,9 @@ type RegionInstanceGroupManagersStopInstancesRequest struct { func (x *RegionInstanceGroupManagersStopInstancesRequest) Reset() { *x = RegionInstanceGroupManagersStopInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1059] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1059] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersStopInstancesRequest) String() string { @@ -109382,7 +107262,7 @@ func (*RegionInstanceGroupManagersStopInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersStopInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1059] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109424,11 +107304,9 @@ type RegionInstanceGroupManagersSuspendInstancesRequest struct { func (x *RegionInstanceGroupManagersSuspendInstancesRequest) Reset() { *x = RegionInstanceGroupManagersSuspendInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1060] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1060] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupManagersSuspendInstancesRequest) String() string { @@ -109439,7 +107317,7 @@ func (*RegionInstanceGroupManagersSuspendInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupManagersSuspendInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1060] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109489,11 +107367,9 @@ type RegionInstanceGroupsListInstances struct { func (x *RegionInstanceGroupsListInstances) Reset() { *x = RegionInstanceGroupsListInstances{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1061] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1061] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupsListInstances) String() string { @@ -109504,7 +107380,7 @@ func (*RegionInstanceGroupsListInstances) ProtoMessage() {} func (x *RegionInstanceGroupsListInstances) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1061] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109575,11 +107451,9 @@ type RegionInstanceGroupsListInstancesRequest struct { func (x *RegionInstanceGroupsListInstancesRequest) Reset() { *x = RegionInstanceGroupsListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1062] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1062] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupsListInstancesRequest) String() string { @@ -109590,7 +107464,7 @@ func (*RegionInstanceGroupsListInstancesRequest) ProtoMessage() {} func (x *RegionInstanceGroupsListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1062] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109632,11 +107506,9 @@ type RegionInstanceGroupsSetNamedPortsRequest struct { func (x *RegionInstanceGroupsSetNamedPortsRequest) Reset() { *x = RegionInstanceGroupsSetNamedPortsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1063] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1063] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionInstanceGroupsSetNamedPortsRequest) String() string { @@ -109647,7 +107519,7 @@ func (*RegionInstanceGroupsSetNamedPortsRequest) ProtoMessage() {} func (x *RegionInstanceGroupsSetNamedPortsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1063] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109698,11 +107570,9 @@ type RegionList struct { func (x *RegionList) Reset() { *x = RegionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1064] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1064] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionList) String() string { @@ -109713,7 +107583,7 @@ func (*RegionList) ProtoMessage() {} func (x *RegionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1064] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109781,11 +107651,9 @@ type RegionNetworkEndpointGroupsAttachEndpointsRequest struct { func (x *RegionNetworkEndpointGroupsAttachEndpointsRequest) Reset() { *x = RegionNetworkEndpointGroupsAttachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1065] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1065] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionNetworkEndpointGroupsAttachEndpointsRequest) String() string { @@ -109796,7 +107664,7 @@ func (*RegionNetworkEndpointGroupsAttachEndpointsRequest) ProtoMessage() {} func (x *RegionNetworkEndpointGroupsAttachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1065] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109829,11 +107697,9 @@ type RegionNetworkEndpointGroupsDetachEndpointsRequest struct { func (x *RegionNetworkEndpointGroupsDetachEndpointsRequest) Reset() { *x = RegionNetworkEndpointGroupsDetachEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1066] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1066] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionNetworkEndpointGroupsDetachEndpointsRequest) String() string { @@ -109844,7 +107710,7 @@ func (*RegionNetworkEndpointGroupsDetachEndpointsRequest) ProtoMessage() {} func (x *RegionNetworkEndpointGroupsDetachEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1066] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109879,11 +107745,9 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse struct { func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) Reset() { *x = RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1067] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1067] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) String() string { @@ -109894,7 +107758,7 @@ func (*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) ProtoMessage( func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1067] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109941,11 +107805,9 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) Reset() { *x = RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1068] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1068] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) String() string { @@ -109957,7 +107819,7 @@ func (*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewa func (x *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1068] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110013,11 +107875,9 @@ type RegionSetLabelsRequest struct { func (x *RegionSetLabelsRequest) Reset() { *x = RegionSetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1069] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1069] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionSetLabelsRequest) String() string { @@ -110028,7 +107888,7 @@ func (*RegionSetLabelsRequest) ProtoMessage() {} func (x *RegionSetLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1069] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110072,11 +107932,9 @@ type RegionSetPolicyRequest struct { func (x *RegionSetPolicyRequest) Reset() { *x = RegionSetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1070] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1070] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionSetPolicyRequest) String() string { @@ -110087,7 +107945,7 @@ func (*RegionSetPolicyRequest) ProtoMessage() {} func (x *RegionSetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1070] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110134,11 +107992,9 @@ type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { func (x *RegionTargetHttpsProxiesSetSslCertificatesRequest) Reset() { *x = RegionTargetHttpsProxiesSetSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1071] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1071] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionTargetHttpsProxiesSetSslCertificatesRequest) String() string { @@ -110149,7 +108005,7 @@ func (*RegionTargetHttpsProxiesSetSslCertificatesRequest) ProtoMessage() {} func (x *RegionTargetHttpsProxiesSetSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1071] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110182,11 +108038,9 @@ type RegionUrlMapsValidateRequest struct { func (x *RegionUrlMapsValidateRequest) Reset() { *x = RegionUrlMapsValidateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1072] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1072] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionUrlMapsValidateRequest) String() string { @@ -110197,7 +108051,7 @@ func (*RegionUrlMapsValidateRequest) ProtoMessage() {} func (x *RegionUrlMapsValidateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1072] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110235,11 +108089,9 @@ type RemoveAssociationFirewallPolicyRequest struct { func (x *RemoveAssociationFirewallPolicyRequest) Reset() { *x = RemoveAssociationFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1073] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1073] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveAssociationFirewallPolicyRequest) String() string { @@ -110250,7 +108102,7 @@ func (*RemoveAssociationFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveAssociationFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1073] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110304,11 +108156,9 @@ type RemoveAssociationNetworkFirewallPolicyRequest struct { func (x *RemoveAssociationNetworkFirewallPolicyRequest) Reset() { *x = RemoveAssociationNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1074] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1074] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveAssociationNetworkFirewallPolicyRequest) String() string { @@ -110319,7 +108169,7 @@ func (*RemoveAssociationNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveAssociationNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1074] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110382,11 +108232,9 @@ type RemoveAssociationRegionNetworkFirewallPolicyRequest struct { func (x *RemoveAssociationRegionNetworkFirewallPolicyRequest) Reset() { *x = RemoveAssociationRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1075] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1075] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveAssociationRegionNetworkFirewallPolicyRequest) String() string { @@ -110397,7 +108245,7 @@ func (*RemoveAssociationRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveAssociationRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1075] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110467,11 +108315,9 @@ type RemoveHealthCheckTargetPoolRequest struct { func (x *RemoveHealthCheckTargetPoolRequest) Reset() { *x = RemoveHealthCheckTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1076] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1076] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveHealthCheckTargetPoolRequest) String() string { @@ -110482,7 +108328,7 @@ func (*RemoveHealthCheckTargetPoolRequest) ProtoMessage() {} func (x *RemoveHealthCheckTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1076] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110552,11 +108398,9 @@ type RemoveInstanceTargetPoolRequest struct { func (x *RemoveInstanceTargetPoolRequest) Reset() { *x = RemoveInstanceTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1077] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1077] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveInstanceTargetPoolRequest) String() string { @@ -110567,7 +108411,7 @@ func (*RemoveInstanceTargetPoolRequest) ProtoMessage() {} func (x *RemoveInstanceTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1077] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110637,11 +108481,9 @@ type RemoveInstancesInstanceGroupRequest struct { func (x *RemoveInstancesInstanceGroupRequest) Reset() { *x = RemoveInstancesInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1078] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1078] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveInstancesInstanceGroupRequest) String() string { @@ -110652,7 +108494,7 @@ func (*RemoveInstancesInstanceGroupRequest) ProtoMessage() {} func (x *RemoveInstancesInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1078] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110720,11 +108562,9 @@ type RemovePeeringNetworkRequest struct { func (x *RemovePeeringNetworkRequest) Reset() { *x = RemovePeeringNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1079] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1079] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemovePeeringNetworkRequest) String() string { @@ -110735,7 +108575,7 @@ func (*RemovePeeringNetworkRequest) ProtoMessage() {} func (x *RemovePeeringNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1079] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110798,11 +108638,9 @@ type RemoveResourcePoliciesDiskRequest struct { func (x *RemoveResourcePoliciesDiskRequest) Reset() { *x = RemoveResourcePoliciesDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1080] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1080] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveResourcePoliciesDiskRequest) String() string { @@ -110813,7 +108651,7 @@ func (*RemoveResourcePoliciesDiskRequest) ProtoMessage() {} func (x *RemoveResourcePoliciesDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1080] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110883,11 +108721,9 @@ type RemoveResourcePoliciesInstanceRequest struct { func (x *RemoveResourcePoliciesInstanceRequest) Reset() { *x = RemoveResourcePoliciesInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1081] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1081] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveResourcePoliciesInstanceRequest) String() string { @@ -110898,7 +108734,7 @@ func (*RemoveResourcePoliciesInstanceRequest) ProtoMessage() {} func (x *RemoveResourcePoliciesInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1081] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110968,11 +108804,9 @@ type RemoveResourcePoliciesRegionDiskRequest struct { func (x *RemoveResourcePoliciesRegionDiskRequest) Reset() { *x = RemoveResourcePoliciesRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1082] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1082] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveResourcePoliciesRegionDiskRequest) String() string { @@ -110983,7 +108817,7 @@ func (*RemoveResourcePoliciesRegionDiskRequest) ProtoMessage() {} func (x *RemoveResourcePoliciesRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1082] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111049,11 +108883,9 @@ type RemoveRuleFirewallPolicyRequest struct { func (x *RemoveRuleFirewallPolicyRequest) Reset() { *x = RemoveRuleFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1083] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1083] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRuleFirewallPolicyRequest) String() string { @@ -111064,7 +108896,7 @@ func (*RemoveRuleFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveRuleFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1083] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111118,11 +108950,9 @@ type RemoveRuleNetworkFirewallPolicyRequest struct { func (x *RemoveRuleNetworkFirewallPolicyRequest) Reset() { *x = RemoveRuleNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1084] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1084] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRuleNetworkFirewallPolicyRequest) String() string { @@ -111133,7 +108963,7 @@ func (*RemoveRuleNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveRuleNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1084] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111196,11 +109026,9 @@ type RemoveRuleRegionNetworkFirewallPolicyRequest struct { func (x *RemoveRuleRegionNetworkFirewallPolicyRequest) Reset() { *x = RemoveRuleRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1085] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1085] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRuleRegionNetworkFirewallPolicyRequest) String() string { @@ -111211,7 +109039,7 @@ func (*RemoveRuleRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *RemoveRuleRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1085] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111279,11 +109107,9 @@ type RemoveRuleRegionSecurityPolicyRequest struct { func (x *RemoveRuleRegionSecurityPolicyRequest) Reset() { *x = RemoveRuleRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1086] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1086] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRuleRegionSecurityPolicyRequest) String() string { @@ -111294,7 +109120,7 @@ func (*RemoveRuleRegionSecurityPolicyRequest) ProtoMessage() {} func (x *RemoveRuleRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1086] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111353,11 +109179,9 @@ type RemoveRuleSecurityPolicyRequest struct { func (x *RemoveRuleSecurityPolicyRequest) Reset() { *x = RemoveRuleSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1087] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1087] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRuleSecurityPolicyRequest) String() string { @@ -111368,7 +109192,7 @@ func (*RemoveRuleSecurityPolicyRequest) ProtoMessage() {} func (x *RemoveRuleSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1087] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111416,11 +109240,9 @@ type RequestMirrorPolicy struct { func (x *RequestMirrorPolicy) Reset() { *x = RequestMirrorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1088] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1088] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestMirrorPolicy) String() string { @@ -111431,7 +109253,7 @@ func (*RequestMirrorPolicy) ProtoMessage() {} func (x *RequestMirrorPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1088] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111496,11 +109318,9 @@ type Reservation struct { func (x *Reservation) Reset() { *x = Reservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1089] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1089] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reservation) String() string { @@ -111511,7 +109331,7 @@ func (*Reservation) ProtoMessage() {} func (x *Reservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1089] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111655,11 +109475,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1090] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1090] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -111670,7 +109488,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1090] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111730,11 +109548,9 @@ type ReservationAggregatedList struct { func (x *ReservationAggregatedList) Reset() { *x = ReservationAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1091] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1091] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAggregatedList) String() string { @@ -111745,7 +109561,7 @@ func (*ReservationAggregatedList) ProtoMessage() {} func (x *ReservationAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1091] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111830,11 +109646,9 @@ type ReservationList struct { func (x *ReservationList) Reset() { *x = ReservationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1092] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1092] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationList) String() string { @@ -111845,7 +109659,7 @@ func (*ReservationList) ProtoMessage() {} func (x *ReservationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1092] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111913,11 +109727,9 @@ type ReservationsResizeRequest struct { func (x *ReservationsResizeRequest) Reset() { *x = ReservationsResizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1093] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1093] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationsResizeRequest) String() string { @@ -111928,7 +109740,7 @@ func (*ReservationsResizeRequest) ProtoMessage() {} func (x *ReservationsResizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1093] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111963,11 +109775,9 @@ type ReservationsScopedList struct { func (x *ReservationsScopedList) Reset() { *x = ReservationsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1094] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1094] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationsScopedList) String() string { @@ -111978,7 +109788,7 @@ func (*ReservationsScopedList) ProtoMessage() {} func (x *ReservationsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1094] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112025,11 +109835,9 @@ type ResetInstanceRequest struct { func (x *ResetInstanceRequest) Reset() { *x = ResetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1095] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1095] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceRequest) String() string { @@ -112040,7 +109848,7 @@ func (*ResetInstanceRequest) ProtoMessage() {} func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1095] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112103,11 +109911,9 @@ type ResizeDiskRequest struct { func (x *ResizeDiskRequest) Reset() { *x = ResizeDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1096] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1096] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeDiskRequest) String() string { @@ -112118,7 +109924,7 @@ func (*ResizeDiskRequest) ProtoMessage() {} func (x *ResizeDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1096] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112188,11 +109994,9 @@ type ResizeInstanceGroupManagerRequest struct { func (x *ResizeInstanceGroupManagerRequest) Reset() { *x = ResizeInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1097] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1097] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeInstanceGroupManagerRequest) String() string { @@ -112203,7 +110007,7 @@ func (*ResizeInstanceGroupManagerRequest) ProtoMessage() {} func (x *ResizeInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1097] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112273,11 +110077,9 @@ type ResizeRegionDiskRequest struct { func (x *ResizeRegionDiskRequest) Reset() { *x = ResizeRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1098] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1098] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeRegionDiskRequest) String() string { @@ -112288,7 +110090,7 @@ func (*ResizeRegionDiskRequest) ProtoMessage() {} func (x *ResizeRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1098] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112358,11 +110160,9 @@ type ResizeRegionInstanceGroupManagerRequest struct { func (x *ResizeRegionInstanceGroupManagerRequest) Reset() { *x = ResizeRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1099] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1099] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeRegionInstanceGroupManagerRequest) String() string { @@ -112373,7 +110173,7 @@ func (*ResizeRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *ResizeRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1099] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112443,11 +110243,9 @@ type ResizeReservationRequest struct { func (x *ResizeReservationRequest) Reset() { *x = ResizeReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeReservationRequest) String() string { @@ -112458,7 +110256,7 @@ func (*ResizeReservationRequest) ProtoMessage() {} func (x *ResizeReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112525,11 +110323,9 @@ type ResourceCommitment struct { func (x *ResourceCommitment) Reset() { *x = ResourceCommitment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceCommitment) String() string { @@ -112540,7 +110336,7 @@ func (*ResourceCommitment) ProtoMessage() {} func (x *ResourceCommitment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112587,11 +110383,9 @@ type ResourceGroupReference struct { func (x *ResourceGroupReference) Reset() { *x = ResourceGroupReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceGroupReference) String() string { @@ -112602,7 +110396,7 @@ func (*ResourceGroupReference) ProtoMessage() {} func (x *ResourceGroupReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112637,11 +110431,9 @@ type ResourcePoliciesScopedList struct { func (x *ResourcePoliciesScopedList) Reset() { *x = ResourcePoliciesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePoliciesScopedList) String() string { @@ -112652,7 +110444,7 @@ func (*ResourcePoliciesScopedList) ProtoMessage() {} func (x *ResourcePoliciesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112716,11 +110508,9 @@ type ResourcePolicy struct { func (x *ResourcePolicy) Reset() { *x = ResourcePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicy) String() string { @@ -112731,7 +110521,7 @@ func (*ResourcePolicy) ProtoMessage() {} func (x *ResourcePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112862,11 +110652,9 @@ type ResourcePolicyAggregatedList struct { func (x *ResourcePolicyAggregatedList) Reset() { *x = ResourcePolicyAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyAggregatedList) String() string { @@ -112877,7 +110665,7 @@ func (*ResourcePolicyAggregatedList) ProtoMessage() {} func (x *ResourcePolicyAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112964,11 +110752,9 @@ type ResourcePolicyDailyCycle struct { func (x *ResourcePolicyDailyCycle) Reset() { *x = ResourcePolicyDailyCycle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyDailyCycle) String() string { @@ -112979,7 +110765,7 @@ func (*ResourcePolicyDailyCycle) ProtoMessage() {} func (x *ResourcePolicyDailyCycle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113024,11 +110810,9 @@ type ResourcePolicyDiskConsistencyGroupPolicy struct { func (x *ResourcePolicyDiskConsistencyGroupPolicy) Reset() { *x = ResourcePolicyDiskConsistencyGroupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyDiskConsistencyGroupPolicy) String() string { @@ -113039,7 +110823,7 @@ func (*ResourcePolicyDiskConsistencyGroupPolicy) ProtoMessage() {} func (x *ResourcePolicyDiskConsistencyGroupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113071,11 +110855,9 @@ type ResourcePolicyGroupPlacementPolicy struct { func (x *ResourcePolicyGroupPlacementPolicy) Reset() { *x = ResourcePolicyGroupPlacementPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyGroupPlacementPolicy) String() string { @@ -113086,7 +110868,7 @@ func (*ResourcePolicyGroupPlacementPolicy) ProtoMessage() {} func (x *ResourcePolicyGroupPlacementPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113138,11 +110920,9 @@ type ResourcePolicyHourlyCycle struct { func (x *ResourcePolicyHourlyCycle) Reset() { *x = ResourcePolicyHourlyCycle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyHourlyCycle) String() string { @@ -113153,7 +110933,7 @@ func (*ResourcePolicyHourlyCycle) ProtoMessage() {} func (x *ResourcePolicyHourlyCycle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113209,11 +110989,9 @@ type ResourcePolicyInstanceSchedulePolicy struct { func (x *ResourcePolicyInstanceSchedulePolicy) Reset() { *x = ResourcePolicyInstanceSchedulePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyInstanceSchedulePolicy) String() string { @@ -113224,7 +111002,7 @@ func (*ResourcePolicyInstanceSchedulePolicy) ProtoMessage() {} func (x *ResourcePolicyInstanceSchedulePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113286,11 +111064,9 @@ type ResourcePolicyInstanceSchedulePolicySchedule struct { func (x *ResourcePolicyInstanceSchedulePolicySchedule) Reset() { *x = ResourcePolicyInstanceSchedulePolicySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyInstanceSchedulePolicySchedule) String() string { @@ -113301,7 +111077,7 @@ func (*ResourcePolicyInstanceSchedulePolicySchedule) ProtoMessage() {} func (x *ResourcePolicyInstanceSchedulePolicySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113345,11 +111121,9 @@ type ResourcePolicyList struct { func (x *ResourcePolicyList) Reset() { *x = ResourcePolicyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyList) String() string { @@ -113360,7 +111134,7 @@ func (*ResourcePolicyList) ProtoMessage() {} func (x *ResourcePolicyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113436,11 +111210,9 @@ type ResourcePolicyResourceStatus struct { func (x *ResourcePolicyResourceStatus) Reset() { *x = ResourcePolicyResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyResourceStatus) String() string { @@ -113451,7 +111223,7 @@ func (*ResourcePolicyResourceStatus) ProtoMessage() {} func (x *ResourcePolicyResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113486,11 +111258,9 @@ type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { func (x *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) Reset() { *x = ResourcePolicyResourceStatusInstanceSchedulePolicyStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) String() string { @@ -113501,7 +111271,7 @@ func (*ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) ProtoMessage() func (x *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113546,11 +111316,9 @@ type ResourcePolicySnapshotSchedulePolicy struct { func (x *ResourcePolicySnapshotSchedulePolicy) Reset() { *x = ResourcePolicySnapshotSchedulePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicySnapshotSchedulePolicy) String() string { @@ -113561,7 +111329,7 @@ func (*ResourcePolicySnapshotSchedulePolicy) ProtoMessage() {} func (x *ResourcePolicySnapshotSchedulePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113612,11 +111380,9 @@ type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { func (x *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) Reset() { *x = ResourcePolicySnapshotSchedulePolicyRetentionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) String() string { @@ -113627,7 +111393,7 @@ func (*ResourcePolicySnapshotSchedulePolicyRetentionPolicy) ProtoMessage() {} func (x *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113669,11 +111435,9 @@ type ResourcePolicySnapshotSchedulePolicySchedule struct { func (x *ResourcePolicySnapshotSchedulePolicySchedule) Reset() { *x = ResourcePolicySnapshotSchedulePolicySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicySnapshotSchedulePolicySchedule) String() string { @@ -113684,7 +111448,7 @@ func (*ResourcePolicySnapshotSchedulePolicySchedule) ProtoMessage() {} func (x *ResourcePolicySnapshotSchedulePolicySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113738,11 +111502,9 @@ type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { func (x *ResourcePolicySnapshotSchedulePolicySnapshotProperties) Reset() { *x = ResourcePolicySnapshotSchedulePolicySnapshotProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicySnapshotSchedulePolicySnapshotProperties) String() string { @@ -113753,7 +111515,7 @@ func (*ResourcePolicySnapshotSchedulePolicySnapshotProperties) ProtoMessage() {} func (x *ResourcePolicySnapshotSchedulePolicySnapshotProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113808,11 +111570,9 @@ type ResourcePolicyWeeklyCycle struct { func (x *ResourcePolicyWeeklyCycle) Reset() { *x = ResourcePolicyWeeklyCycle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyWeeklyCycle) String() string { @@ -113823,7 +111583,7 @@ func (*ResourcePolicyWeeklyCycle) ProtoMessage() {} func (x *ResourcePolicyWeeklyCycle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113861,11 +111621,9 @@ type ResourcePolicyWeeklyCycleDayOfWeek struct { func (x *ResourcePolicyWeeklyCycleDayOfWeek) Reset() { *x = ResourcePolicyWeeklyCycleDayOfWeek{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyWeeklyCycleDayOfWeek) String() string { @@ -113876,7 +111634,7 @@ func (*ResourcePolicyWeeklyCycleDayOfWeek) ProtoMessage() {} func (x *ResourcePolicyWeeklyCycleDayOfWeek) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113926,11 +111684,9 @@ type ResourceStatus struct { func (x *ResourceStatus) Reset() { *x = ResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceStatus) String() string { @@ -113941,7 +111697,7 @@ func (*ResourceStatus) ProtoMessage() {} func (x *ResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113988,11 +111744,9 @@ type ResourceStatusScheduling struct { func (x *ResourceStatusScheduling) Reset() { *x = ResourceStatusScheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceStatusScheduling) String() string { @@ -114003,7 +111757,7 @@ func (*ResourceStatusScheduling) ProtoMessage() {} func (x *ResourceStatusScheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114043,11 +111797,9 @@ type ResumeInstanceRequest struct { func (x *ResumeInstanceRequest) Reset() { *x = ResumeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeInstanceRequest) String() string { @@ -114058,7 +111810,7 @@ func (*ResumeInstanceRequest) ProtoMessage() {} func (x *ResumeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114121,11 +111873,9 @@ type ResumeInstancesInstanceGroupManagerRequest struct { func (x *ResumeInstancesInstanceGroupManagerRequest) Reset() { *x = ResumeInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeInstancesInstanceGroupManagerRequest) String() string { @@ -114136,7 +111886,7 @@ func (*ResumeInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *ResumeInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114206,11 +111956,9 @@ type ResumeInstancesRegionInstanceGroupManagerRequest struct { func (x *ResumeInstancesRegionInstanceGroupManagerRequest) Reset() { *x = ResumeInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeInstancesRegionInstanceGroupManagerRequest) String() string { @@ -114221,7 +111969,7 @@ func (*ResumeInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *ResumeInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114334,11 +112082,9 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route) String() string { @@ -114349,7 +112095,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114553,11 +112299,9 @@ type RouteAsPath struct { func (x *RouteAsPath) Reset() { *x = RouteAsPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteAsPath) String() string { @@ -114568,7 +112312,7 @@ func (*RouteAsPath) ProtoMessage() {} func (x *RouteAsPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114619,11 +112363,9 @@ type RouteList struct { func (x *RouteList) Reset() { *x = RouteList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteList) String() string { @@ -114634,7 +112376,7 @@ func (*RouteList) ProtoMessage() {} func (x *RouteList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114729,11 +112471,9 @@ type Router struct { func (x *Router) Reset() { *x = Router{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Router) String() string { @@ -114744,7 +112484,7 @@ func (*Router) ProtoMessage() {} func (x *Router) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114871,11 +112611,9 @@ type RouterAdvertisedIpRange struct { func (x *RouterAdvertisedIpRange) Reset() { *x = RouterAdvertisedIpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterAdvertisedIpRange) String() string { @@ -114886,7 +112624,7 @@ func (*RouterAdvertisedIpRange) ProtoMessage() {} func (x *RouterAdvertisedIpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114939,11 +112677,9 @@ type RouterAggregatedList struct { func (x *RouterAggregatedList) Reset() { *x = RouterAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterAggregatedList) String() string { @@ -114954,7 +112690,7 @@ func (*RouterAggregatedList) ProtoMessage() {} func (x *RouterAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115041,11 +112777,9 @@ type RouterBgp struct { func (x *RouterBgp) Reset() { *x = RouterBgp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterBgp) String() string { @@ -115056,7 +112790,7 @@ func (*RouterBgp) ProtoMessage() {} func (x *RouterBgp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115174,11 +112908,9 @@ type RouterBgpPeer struct { func (x *RouterBgpPeer) Reset() { *x = RouterBgpPeer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterBgpPeer) String() string { @@ -115189,7 +112921,7 @@ func (*RouterBgpPeer) ProtoMessage() {} func (x *RouterBgpPeer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115390,11 +113122,9 @@ type RouterBgpPeerBfd struct { func (x *RouterBgpPeerBfd) Reset() { *x = RouterBgpPeerBfd{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterBgpPeerBfd) String() string { @@ -115405,7 +113135,7 @@ func (*RouterBgpPeerBfd) ProtoMessage() {} func (x *RouterBgpPeerBfd) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115459,11 +113189,9 @@ type RouterBgpPeerCustomLearnedIpRange struct { func (x *RouterBgpPeerCustomLearnedIpRange) Reset() { *x = RouterBgpPeerCustomLearnedIpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterBgpPeerCustomLearnedIpRange) String() string { @@ -115474,7 +113202,7 @@ func (*RouterBgpPeerCustomLearnedIpRange) ProtoMessage() {} func (x *RouterBgpPeerCustomLearnedIpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115525,11 +113253,9 @@ type RouterInterface struct { func (x *RouterInterface) Reset() { *x = RouterInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterInterface) String() string { @@ -115540,7 +113266,7 @@ func (*RouterInterface) ProtoMessage() {} func (x *RouterInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115640,11 +113366,9 @@ type RouterList struct { func (x *RouterList) Reset() { *x = RouterList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterList) String() string { @@ -115655,7 +113379,7 @@ func (*RouterList) ProtoMessage() {} func (x *RouterList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115725,11 +113449,9 @@ type RouterMd5AuthenticationKey struct { func (x *RouterMd5AuthenticationKey) Reset() { *x = RouterMd5AuthenticationKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterMd5AuthenticationKey) String() string { @@ -115740,7 +113462,7 @@ func (*RouterMd5AuthenticationKey) ProtoMessage() {} func (x *RouterMd5AuthenticationKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115823,11 +113545,9 @@ type RouterNat struct { func (x *RouterNat) Reset() { *x = RouterNat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterNat) String() string { @@ -115838,7 +113558,7 @@ func (*RouterNat) ProtoMessage() {} func (x *RouterNat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116008,11 +113728,9 @@ type RouterNatLogConfig struct { func (x *RouterNatLogConfig) Reset() { *x = RouterNatLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterNatLogConfig) String() string { @@ -116023,7 +113741,7 @@ func (*RouterNatLogConfig) ProtoMessage() {} func (x *RouterNatLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116069,11 +113787,9 @@ type RouterNatRule struct { func (x *RouterNatRule) Reset() { *x = RouterNatRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterNatRule) String() string { @@ -116084,7 +113800,7 @@ func (*RouterNatRule) ProtoMessage() {} func (x *RouterNatRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116144,11 +113860,9 @@ type RouterNatRuleAction struct { func (x *RouterNatRuleAction) Reset() { *x = RouterNatRuleAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterNatRuleAction) String() string { @@ -116159,7 +113873,7 @@ func (*RouterNatRuleAction) ProtoMessage() {} func (x *RouterNatRuleAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116219,11 +113933,9 @@ type RouterNatSubnetworkToNat struct { func (x *RouterNatSubnetworkToNat) Reset() { *x = RouterNatSubnetworkToNat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterNatSubnetworkToNat) String() string { @@ -116234,7 +113946,7 @@ func (*RouterNatSubnetworkToNat) ProtoMessage() {} func (x *RouterNatSubnetworkToNat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116287,11 +113999,9 @@ type RouterStatus struct { func (x *RouterStatus) Reset() { *x = RouterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatus) String() string { @@ -116302,7 +114012,7 @@ func (*RouterStatus) ProtoMessage() {} func (x *RouterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116402,11 +114112,9 @@ type RouterStatusBgpPeerStatus struct { func (x *RouterStatusBgpPeerStatus) Reset() { *x = RouterStatusBgpPeerStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatusBgpPeerStatus) String() string { @@ -116417,7 +114125,7 @@ func (*RouterStatusBgpPeerStatus) ProtoMessage() {} func (x *RouterStatusBgpPeerStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116600,11 +114308,9 @@ type RouterStatusNatStatus struct { func (x *RouterStatusNatStatus) Reset() { *x = RouterStatusNatStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatusNatStatus) String() string { @@ -116615,7 +114321,7 @@ func (*RouterStatusNatStatus) ProtoMessage() {} func (x *RouterStatusNatStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116713,11 +114419,9 @@ type RouterStatusNatStatusNatRuleStatus struct { func (x *RouterStatusNatStatusNatRuleStatus) Reset() { *x = RouterStatusNatStatusNatRuleStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatusNatStatusNatRuleStatus) String() string { @@ -116728,7 +114432,7 @@ func (*RouterStatusNatStatusNatRuleStatus) ProtoMessage() {} func (x *RouterStatusNatStatusNatRuleStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116790,11 +114494,9 @@ type RouterStatusResponse struct { func (x *RouterStatusResponse) Reset() { *x = RouterStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatusResponse) String() string { @@ -116805,7 +114507,7 @@ func (*RouterStatusResponse) ProtoMessage() {} func (x *RouterStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116845,11 +114547,9 @@ type RoutersPreviewResponse struct { func (x *RoutersPreviewResponse) Reset() { *x = RoutersPreviewResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutersPreviewResponse) String() string { @@ -116860,7 +114560,7 @@ func (*RoutersPreviewResponse) ProtoMessage() {} func (x *RoutersPreviewResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116895,11 +114595,9 @@ type RoutersScopedList struct { func (x *RoutersScopedList) Reset() { *x = RoutersScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutersScopedList) String() string { @@ -116910,7 +114608,7 @@ func (*RoutersScopedList) ProtoMessage() {} func (x *RoutersScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116962,11 +114660,9 @@ type SSLHealthCheck struct { func (x *SSLHealthCheck) Reset() { *x = SSLHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SSLHealthCheck) String() string { @@ -116977,7 +114673,7 @@ func (*SSLHealthCheck) ProtoMessage() {} func (x *SSLHealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117080,11 +114776,9 @@ type SavedAttachedDisk struct { func (x *SavedAttachedDisk) Reset() { *x = SavedAttachedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedAttachedDisk) String() string { @@ -117095,7 +114789,7 @@ func (*SavedAttachedDisk) ProtoMessage() {} func (x *SavedAttachedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117244,11 +114938,9 @@ type SavedDisk struct { func (x *SavedDisk) Reset() { *x = SavedDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavedDisk) String() string { @@ -117259,7 +114951,7 @@ func (*SavedDisk) ProtoMessage() {} func (x *SavedDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117325,11 +115017,9 @@ type ScalingScheduleStatus struct { func (x *ScalingScheduleStatus) Reset() { *x = ScalingScheduleStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScalingScheduleStatus) String() string { @@ -117340,7 +115030,7 @@ func (*ScalingScheduleStatus) ProtoMessage() {} func (x *ScalingScheduleStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117414,11 +115104,9 @@ type Scheduling struct { func (x *Scheduling) Reset() { *x = Scheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scheduling) String() string { @@ -117429,7 +115117,7 @@ func (*Scheduling) ProtoMessage() {} func (x *Scheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117552,11 +115240,9 @@ type SchedulingNodeAffinity struct { func (x *SchedulingNodeAffinity) Reset() { *x = SchedulingNodeAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulingNodeAffinity) String() string { @@ -117567,7 +115253,7 @@ func (*SchedulingNodeAffinity) ProtoMessage() {} func (x *SchedulingNodeAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117615,11 +115301,9 @@ type SchedulingOnInstanceStopAction struct { func (x *SchedulingOnInstanceStopAction) Reset() { *x = SchedulingOnInstanceStopAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulingOnInstanceStopAction) String() string { @@ -117630,7 +115314,7 @@ func (*SchedulingOnInstanceStopAction) ProtoMessage() {} func (x *SchedulingOnInstanceStopAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117663,11 +115347,9 @@ type ScratchDisks struct { func (x *ScratchDisks) Reset() { *x = ScratchDisks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScratchDisks) String() string { @@ -117678,7 +115360,7 @@ func (*ScratchDisks) ProtoMessage() {} func (x *ScratchDisks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117714,11 +115396,9 @@ type Screenshot struct { func (x *Screenshot) Reset() { *x = Screenshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Screenshot) String() string { @@ -117729,7 +115409,7 @@ func (*Screenshot) ProtoMessage() {} func (x *Screenshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117782,11 +115462,9 @@ type SecurityPoliciesAggregatedList struct { func (x *SecurityPoliciesAggregatedList) Reset() { *x = SecurityPoliciesAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPoliciesAggregatedList) String() string { @@ -117797,7 +115475,7 @@ func (*SecurityPoliciesAggregatedList) ProtoMessage() {} func (x *SecurityPoliciesAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117878,11 +115556,9 @@ type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { func (x *SecurityPoliciesListPreconfiguredExpressionSetsResponse) Reset() { *x = SecurityPoliciesListPreconfiguredExpressionSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPoliciesListPreconfiguredExpressionSetsResponse) String() string { @@ -117893,7 +115569,7 @@ func (*SecurityPoliciesListPreconfiguredExpressionSetsResponse) ProtoMessage() { func (x *SecurityPoliciesListPreconfiguredExpressionSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117928,11 +115604,9 @@ type SecurityPoliciesScopedList struct { func (x *SecurityPoliciesScopedList) Reset() { *x = SecurityPoliciesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPoliciesScopedList) String() string { @@ -117943,7 +115617,7 @@ func (*SecurityPoliciesScopedList) ProtoMessage() {} func (x *SecurityPoliciesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117982,11 +115656,9 @@ type SecurityPoliciesWafConfig struct { func (x *SecurityPoliciesWafConfig) Reset() { *x = SecurityPoliciesWafConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPoliciesWafConfig) String() string { @@ -117997,7 +115669,7 @@ func (*SecurityPoliciesWafConfig) ProtoMessage() {} func (x *SecurityPoliciesWafConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118060,11 +115732,9 @@ type SecurityPolicy struct { func (x *SecurityPolicy) Reset() { *x = SecurityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicy) String() string { @@ -118075,7 +115745,7 @@ func (*SecurityPolicy) ProtoMessage() {} func (x *SecurityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118221,11 +115891,9 @@ type SecurityPolicyAdaptiveProtectionConfig struct { func (x *SecurityPolicyAdaptiveProtectionConfig) Reset() { *x = SecurityPolicyAdaptiveProtectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdaptiveProtectionConfig) String() string { @@ -118236,7 +115904,7 @@ func (*SecurityPolicyAdaptiveProtectionConfig) ProtoMessage() {} func (x *SecurityPolicyAdaptiveProtectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118275,11 +115943,9 @@ type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) Reset() { *x = SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) String() string { @@ -118290,7 +115956,7 @@ func (*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) ProtoMessa func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118346,11 +116012,9 @@ type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfi func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) Reset() { *x = SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) String() string { @@ -118361,7 +116025,7 @@ func (*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdCon func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118456,11 +116120,9 @@ type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfi func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig) Reset() { *x = SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig) String() string { @@ -118472,7 +116134,7 @@ func (*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdCon func (x *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118525,11 +116187,9 @@ type SecurityPolicyAdvancedOptionsConfig struct { func (x *SecurityPolicyAdvancedOptionsConfig) Reset() { *x = SecurityPolicyAdvancedOptionsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdvancedOptionsConfig) String() string { @@ -118540,7 +116200,7 @@ func (*SecurityPolicyAdvancedOptionsConfig) ProtoMessage() {} func (x *SecurityPolicyAdvancedOptionsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118594,11 +116254,9 @@ type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { func (x *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) Reset() { *x = SecurityPolicyAdvancedOptionsConfigJsonCustomConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) String() string { @@ -118609,7 +116267,7 @@ func (*SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) ProtoMessage() {} func (x *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118642,11 +116300,9 @@ type SecurityPolicyDdosProtectionConfig struct { func (x *SecurityPolicyDdosProtectionConfig) Reset() { *x = SecurityPolicyDdosProtectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyDdosProtectionConfig) String() string { @@ -118657,7 +116313,7 @@ func (*SecurityPolicyDdosProtectionConfig) ProtoMessage() {} func (x *SecurityPolicyDdosProtectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118698,11 +116354,9 @@ type SecurityPolicyList struct { func (x *SecurityPolicyList) Reset() { *x = SecurityPolicyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyList) String() string { @@ -118713,7 +116367,7 @@ func (*SecurityPolicyList) ProtoMessage() {} func (x *SecurityPolicyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118774,11 +116428,9 @@ type SecurityPolicyRecaptchaOptionsConfig struct { func (x *SecurityPolicyRecaptchaOptionsConfig) Reset() { *x = SecurityPolicyRecaptchaOptionsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRecaptchaOptionsConfig) String() string { @@ -118789,7 +116441,7 @@ func (*SecurityPolicyRecaptchaOptionsConfig) ProtoMessage() {} func (x *SecurityPolicyRecaptchaOptionsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118821,11 +116473,9 @@ type SecurityPolicyReference struct { func (x *SecurityPolicyReference) Reset() { *x = SecurityPolicyReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyReference) String() string { @@ -118836,7 +116486,7 @@ func (*SecurityPolicyReference) ProtoMessage() {} func (x *SecurityPolicyReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118890,11 +116540,9 @@ type SecurityPolicyRule struct { func (x *SecurityPolicyRule) Reset() { *x = SecurityPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRule) String() string { @@ -118905,7 +116553,7 @@ func (*SecurityPolicyRule) ProtoMessage() {} func (x *SecurityPolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119008,11 +116656,9 @@ type SecurityPolicyRuleHttpHeaderAction struct { func (x *SecurityPolicyRuleHttpHeaderAction) Reset() { *x = SecurityPolicyRuleHttpHeaderAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleHttpHeaderAction) String() string { @@ -119023,7 +116669,7 @@ func (*SecurityPolicyRuleHttpHeaderAction) ProtoMessage() {} func (x *SecurityPolicyRuleHttpHeaderAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119058,11 +116704,9 @@ type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { func (x *SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) Reset() { *x = SecurityPolicyRuleHttpHeaderActionHttpHeaderOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) String() string { @@ -119073,7 +116717,7 @@ func (*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) ProtoMessage() {} func (x *SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119121,11 +116765,9 @@ type SecurityPolicyRuleMatcher struct { func (x *SecurityPolicyRuleMatcher) Reset() { *x = SecurityPolicyRuleMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleMatcher) String() string { @@ -119136,7 +116778,7 @@ func (*SecurityPolicyRuleMatcher) ProtoMessage() {} func (x *SecurityPolicyRuleMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119190,11 +116832,9 @@ type SecurityPolicyRuleMatcherConfig struct { func (x *SecurityPolicyRuleMatcherConfig) Reset() { *x = SecurityPolicyRuleMatcherConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleMatcherConfig) String() string { @@ -119205,7 +116845,7 @@ func (*SecurityPolicyRuleMatcherConfig) ProtoMessage() {} func (x *SecurityPolicyRuleMatcherConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119238,11 +116878,9 @@ type SecurityPolicyRuleMatcherExprOptions struct { func (x *SecurityPolicyRuleMatcherExprOptions) Reset() { *x = SecurityPolicyRuleMatcherExprOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleMatcherExprOptions) String() string { @@ -119253,7 +116891,7 @@ func (*SecurityPolicyRuleMatcherExprOptions) ProtoMessage() {} func (x *SecurityPolicyRuleMatcherExprOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119288,11 +116926,9 @@ type SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions struct { func (x *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) Reset() { *x = SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) String() string { @@ -119303,7 +116939,7 @@ func (*SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) ProtoMessage() {} func (x *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119358,11 +116994,9 @@ type SecurityPolicyRuleNetworkMatcher struct { func (x *SecurityPolicyRuleNetworkMatcher) Reset() { *x = SecurityPolicyRuleNetworkMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleNetworkMatcher) String() string { @@ -119373,7 +117007,7 @@ func (*SecurityPolicyRuleNetworkMatcher) ProtoMessage() {} func (x *SecurityPolicyRuleNetworkMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119457,11 +117091,9 @@ type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { func (x *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) Reset() { *x = SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) String() string { @@ -119472,7 +117104,7 @@ func (*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) ProtoMessage() {} func (x *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119512,11 +117144,9 @@ type SecurityPolicyRulePreconfiguredWafConfig struct { func (x *SecurityPolicyRulePreconfiguredWafConfig) Reset() { *x = SecurityPolicyRulePreconfiguredWafConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRulePreconfiguredWafConfig) String() string { @@ -119527,7 +117157,7 @@ func (*SecurityPolicyRulePreconfiguredWafConfig) ProtoMessage() {} func (x *SecurityPolicyRulePreconfiguredWafConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119570,11 +117200,9 @@ type SecurityPolicyRulePreconfiguredWafConfigExclusion struct { func (x *SecurityPolicyRulePreconfiguredWafConfigExclusion) Reset() { *x = SecurityPolicyRulePreconfiguredWafConfigExclusion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRulePreconfiguredWafConfigExclusion) String() string { @@ -119585,7 +117213,7 @@ func (*SecurityPolicyRulePreconfiguredWafConfigExclusion) ProtoMessage() {} func (x *SecurityPolicyRulePreconfiguredWafConfigExclusion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119656,11 +117284,9 @@ type SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams struct { func (x *SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) Reset() { *x = SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1186] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) String() string { @@ -119671,7 +117297,7 @@ func (*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) ProtoMessag func (x *SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1186] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119728,11 +117354,9 @@ type SecurityPolicyRuleRateLimitOptions struct { func (x *SecurityPolicyRuleRateLimitOptions) Reset() { *x = SecurityPolicyRuleRateLimitOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleRateLimitOptions) String() string { @@ -119743,7 +117367,7 @@ func (*SecurityPolicyRuleRateLimitOptions) ProtoMessage() {} func (x *SecurityPolicyRuleRateLimitOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119835,11 +117459,9 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { func (x *SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) Reset() { *x = SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) String() string { @@ -119850,7 +117472,7 @@ func (*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) ProtoMessage() {} func (x *SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119892,11 +117514,9 @@ type SecurityPolicyRuleRateLimitOptionsThreshold struct { func (x *SecurityPolicyRuleRateLimitOptionsThreshold) Reset() { *x = SecurityPolicyRuleRateLimitOptionsThreshold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleRateLimitOptionsThreshold) String() string { @@ -119907,7 +117527,7 @@ func (*SecurityPolicyRuleRateLimitOptionsThreshold) ProtoMessage() {} func (x *SecurityPolicyRuleRateLimitOptionsThreshold) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119950,11 +117570,9 @@ type SecurityPolicyRuleRedirectOptions struct { func (x *SecurityPolicyRuleRedirectOptions) Reset() { *x = SecurityPolicyRuleRedirectOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyRuleRedirectOptions) String() string { @@ -119965,7 +117583,7 @@ func (*SecurityPolicyRuleRedirectOptions) ProtoMessage() {} func (x *SecurityPolicyRuleRedirectOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120014,11 +117632,9 @@ type SecurityPolicyUserDefinedField struct { func (x *SecurityPolicyUserDefinedField) Reset() { *x = SecurityPolicyUserDefinedField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicyUserDefinedField) String() string { @@ -120029,7 +117645,7 @@ func (*SecurityPolicyUserDefinedField) ProtoMessage() {} func (x *SecurityPolicyUserDefinedField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1191] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120095,11 +117711,9 @@ type SecuritySettings struct { func (x *SecuritySettings) Reset() { *x = SecuritySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings) String() string { @@ -120110,7 +117724,7 @@ func (*SecuritySettings) ProtoMessage() {} func (x *SecuritySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1192] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120162,11 +117776,9 @@ type SendDiagnosticInterruptInstanceRequest struct { func (x *SendDiagnosticInterruptInstanceRequest) Reset() { *x = SendDiagnosticInterruptInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1193] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendDiagnosticInterruptInstanceRequest) String() string { @@ -120177,7 +117789,7 @@ func (*SendDiagnosticInterruptInstanceRequest) ProtoMessage() {} func (x *SendDiagnosticInterruptInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1193] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120222,11 +117834,9 @@ type SendDiagnosticInterruptInstanceResponse struct { func (x *SendDiagnosticInterruptInstanceResponse) Reset() { *x = SendDiagnosticInterruptInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1194] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendDiagnosticInterruptInstanceResponse) String() string { @@ -120237,7 +117847,7 @@ func (*SendDiagnosticInterruptInstanceResponse) ProtoMessage() {} func (x *SendDiagnosticInterruptInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1194] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120272,11 +117882,9 @@ type SerialPortOutput struct { func (x *SerialPortOutput) Reset() { *x = SerialPortOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1195] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerialPortOutput) String() string { @@ -120287,7 +117895,7 @@ func (*SerialPortOutput) ProtoMessage() {} func (x *SerialPortOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1195] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120348,11 +117956,9 @@ type ServerBinding struct { func (x *ServerBinding) Reset() { *x = ServerBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1196] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerBinding) String() string { @@ -120363,7 +117969,7 @@ func (*ServerBinding) ProtoMessage() {} func (x *ServerBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1196] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120399,11 +118005,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1197] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -120414,7 +118018,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1197] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120494,11 +118098,9 @@ type ServiceAttachment struct { func (x *ServiceAttachment) Reset() { *x = ServiceAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1198] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachment) String() string { @@ -120509,7 +118111,7 @@ func (*ServiceAttachment) ProtoMessage() {} func (x *ServiceAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1198] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120688,11 +118290,9 @@ type ServiceAttachmentAggregatedList struct { func (x *ServiceAttachmentAggregatedList) Reset() { *x = ServiceAttachmentAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachmentAggregatedList) String() string { @@ -120703,7 +118303,7 @@ func (*ServiceAttachmentAggregatedList) ProtoMessage() {} func (x *ServiceAttachmentAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1199] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120788,11 +118388,9 @@ type ServiceAttachmentConnectedEndpoint struct { func (x *ServiceAttachmentConnectedEndpoint) Reset() { *x = ServiceAttachmentConnectedEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachmentConnectedEndpoint) String() string { @@ -120803,7 +118401,7 @@ func (*ServiceAttachmentConnectedEndpoint) ProtoMessage() {} func (x *ServiceAttachmentConnectedEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1200] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120868,11 +118466,9 @@ type ServiceAttachmentConsumerProjectLimit struct { func (x *ServiceAttachmentConsumerProjectLimit) Reset() { *x = ServiceAttachmentConsumerProjectLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1201] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachmentConsumerProjectLimit) String() string { @@ -120883,7 +118479,7 @@ func (*ServiceAttachmentConsumerProjectLimit) ProtoMessage() {} func (x *ServiceAttachmentConsumerProjectLimit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1201] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120940,11 +118536,9 @@ type ServiceAttachmentList struct { func (x *ServiceAttachmentList) Reset() { *x = ServiceAttachmentList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1202] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachmentList) String() string { @@ -120955,7 +118549,7 @@ func (*ServiceAttachmentList) ProtoMessage() {} func (x *ServiceAttachmentList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1202] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121025,11 +118619,9 @@ type ServiceAttachmentsScopedList struct { func (x *ServiceAttachmentsScopedList) Reset() { *x = ServiceAttachmentsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1203] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAttachmentsScopedList) String() string { @@ -121040,7 +118632,7 @@ func (*ServiceAttachmentsScopedList) ProtoMessage() {} func (x *ServiceAttachmentsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1203] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121087,11 +118679,9 @@ type SetBackendServiceTargetSslProxyRequest struct { func (x *SetBackendServiceTargetSslProxyRequest) Reset() { *x = SetBackendServiceTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1204] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetBackendServiceTargetSslProxyRequest) String() string { @@ -121102,7 +118692,7 @@ func (*SetBackendServiceTargetSslProxyRequest) ProtoMessage() {} func (x *SetBackendServiceTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1204] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121163,11 +118753,9 @@ type SetBackendServiceTargetTcpProxyRequest struct { func (x *SetBackendServiceTargetTcpProxyRequest) Reset() { *x = SetBackendServiceTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1205] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetBackendServiceTargetTcpProxyRequest) String() string { @@ -121178,7 +118766,7 @@ func (*SetBackendServiceTargetTcpProxyRequest) ProtoMessage() {} func (x *SetBackendServiceTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1205] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121243,11 +118831,9 @@ type SetBackupTargetPoolRequest struct { func (x *SetBackupTargetPoolRequest) Reset() { *x = SetBackupTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1206] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetBackupTargetPoolRequest) String() string { @@ -121258,7 +118844,7 @@ func (*SetBackupTargetPoolRequest) ProtoMessage() {} func (x *SetBackupTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1206] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121333,11 +118919,9 @@ type SetCertificateMapTargetHttpsProxyRequest struct { func (x *SetCertificateMapTargetHttpsProxyRequest) Reset() { *x = SetCertificateMapTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1207] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCertificateMapTargetHttpsProxyRequest) String() string { @@ -121348,7 +118932,7 @@ func (*SetCertificateMapTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetCertificateMapTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1207] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121409,11 +118993,9 @@ type SetCertificateMapTargetSslProxyRequest struct { func (x *SetCertificateMapTargetSslProxyRequest) Reset() { *x = SetCertificateMapTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1208] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCertificateMapTargetSslProxyRequest) String() string { @@ -121424,7 +119006,7 @@ func (*SetCertificateMapTargetSslProxyRequest) ProtoMessage() {} func (x *SetCertificateMapTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1208] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121483,11 +119065,9 @@ type SetCloudArmorTierProjectRequest struct { func (x *SetCloudArmorTierProjectRequest) Reset() { *x = SetCloudArmorTierProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1209] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCloudArmorTierProjectRequest) String() string { @@ -121498,7 +119078,7 @@ func (*SetCloudArmorTierProjectRequest) ProtoMessage() {} func (x *SetCloudArmorTierProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1209] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121547,11 +119127,9 @@ type SetCommonInstanceMetadataOperationMetadata struct { func (x *SetCommonInstanceMetadataOperationMetadata) Reset() { *x = SetCommonInstanceMetadataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1210] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCommonInstanceMetadataOperationMetadata) String() string { @@ -121562,7 +119140,7 @@ func (*SetCommonInstanceMetadataOperationMetadata) ProtoMessage() {} func (x *SetCommonInstanceMetadataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1210] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121605,11 +119183,9 @@ type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { func (x *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) Reset() { *x = SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1211] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) String() string { @@ -121620,7 +119196,7 @@ func (*SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) Proto func (x *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1211] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121665,11 +119241,9 @@ type SetCommonInstanceMetadataProjectRequest struct { func (x *SetCommonInstanceMetadataProjectRequest) Reset() { *x = SetCommonInstanceMetadataProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1212] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetCommonInstanceMetadataProjectRequest) String() string { @@ -121680,7 +119254,7 @@ func (*SetCommonInstanceMetadataProjectRequest) ProtoMessage() {} func (x *SetCommonInstanceMetadataProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1212] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121732,11 +119306,9 @@ type SetDefaultNetworkTierProjectRequest struct { func (x *SetDefaultNetworkTierProjectRequest) Reset() { *x = SetDefaultNetworkTierProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1213] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultNetworkTierProjectRequest) String() string { @@ -121747,7 +119319,7 @@ func (*SetDefaultNetworkTierProjectRequest) ProtoMessage() {} func (x *SetDefaultNetworkTierProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1213] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121803,11 +119375,9 @@ type SetDeletionProtectionInstanceRequest struct { func (x *SetDeletionProtectionInstanceRequest) Reset() { *x = SetDeletionProtectionInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1214] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDeletionProtectionInstanceRequest) String() string { @@ -121818,7 +119388,7 @@ func (*SetDeletionProtectionInstanceRequest) ProtoMessage() {} func (x *SetDeletionProtectionInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1214] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121890,11 +119460,9 @@ type SetDiskAutoDeleteInstanceRequest struct { func (x *SetDiskAutoDeleteInstanceRequest) Reset() { *x = SetDiskAutoDeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1215] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDiskAutoDeleteInstanceRequest) String() string { @@ -121905,7 +119473,7 @@ func (*SetDiskAutoDeleteInstanceRequest) ProtoMessage() {} func (x *SetDiskAutoDeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1215] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121980,11 +119548,9 @@ type SetEdgeSecurityPolicyBackendBucketRequest struct { func (x *SetEdgeSecurityPolicyBackendBucketRequest) Reset() { *x = SetEdgeSecurityPolicyBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1216] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetEdgeSecurityPolicyBackendBucketRequest) String() string { @@ -121995,7 +119561,7 @@ func (*SetEdgeSecurityPolicyBackendBucketRequest) ProtoMessage() {} func (x *SetEdgeSecurityPolicyBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1216] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122056,11 +119622,9 @@ type SetEdgeSecurityPolicyBackendServiceRequest struct { func (x *SetEdgeSecurityPolicyBackendServiceRequest) Reset() { *x = SetEdgeSecurityPolicyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1217] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetEdgeSecurityPolicyBackendServiceRequest) String() string { @@ -122071,7 +119635,7 @@ func (*SetEdgeSecurityPolicyBackendServiceRequest) ProtoMessage() {} func (x *SetEdgeSecurityPolicyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1217] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122130,11 +119694,9 @@ type SetIamPolicyBackendBucketRequest struct { func (x *SetIamPolicyBackendBucketRequest) Reset() { *x = SetIamPolicyBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1218] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyBackendBucketRequest) String() string { @@ -122145,7 +119707,7 @@ func (*SetIamPolicyBackendBucketRequest) ProtoMessage() {} func (x *SetIamPolicyBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1218] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122197,11 +119759,9 @@ type SetIamPolicyBackendServiceRequest struct { func (x *SetIamPolicyBackendServiceRequest) Reset() { *x = SetIamPolicyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1219] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyBackendServiceRequest) String() string { @@ -122212,7 +119772,7 @@ func (*SetIamPolicyBackendServiceRequest) ProtoMessage() {} func (x *SetIamPolicyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1219] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122266,11 +119826,9 @@ type SetIamPolicyDiskRequest struct { func (x *SetIamPolicyDiskRequest) Reset() { *x = SetIamPolicyDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1220] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyDiskRequest) String() string { @@ -122281,7 +119839,7 @@ func (*SetIamPolicyDiskRequest) ProtoMessage() {} func (x *SetIamPolicyDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1220] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122338,11 +119896,9 @@ type SetIamPolicyFirewallPolicyRequest struct { func (x *SetIamPolicyFirewallPolicyRequest) Reset() { *x = SetIamPolicyFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1221] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyFirewallPolicyRequest) String() string { @@ -122353,7 +119909,7 @@ func (*SetIamPolicyFirewallPolicyRequest) ProtoMessage() {} func (x *SetIamPolicyFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1221] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122398,11 +119954,9 @@ type SetIamPolicyImageRequest struct { func (x *SetIamPolicyImageRequest) Reset() { *x = SetIamPolicyImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1222] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1222] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyImageRequest) String() string { @@ -122413,7 +119967,7 @@ func (*SetIamPolicyImageRequest) ProtoMessage() {} func (x *SetIamPolicyImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1222] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122467,11 +120021,9 @@ type SetIamPolicyInstanceRequest struct { func (x *SetIamPolicyInstanceRequest) Reset() { *x = SetIamPolicyInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1223] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1223] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyInstanceRequest) String() string { @@ -122482,7 +120034,7 @@ func (*SetIamPolicyInstanceRequest) ProtoMessage() {} func (x *SetIamPolicyInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1223] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122541,11 +120093,9 @@ type SetIamPolicyInstanceTemplateRequest struct { func (x *SetIamPolicyInstanceTemplateRequest) Reset() { *x = SetIamPolicyInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1224] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyInstanceTemplateRequest) String() string { @@ -122556,7 +120106,7 @@ func (*SetIamPolicyInstanceTemplateRequest) ProtoMessage() {} func (x *SetIamPolicyInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1224] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122610,11 +120160,9 @@ type SetIamPolicyInstantSnapshotRequest struct { func (x *SetIamPolicyInstantSnapshotRequest) Reset() { *x = SetIamPolicyInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1225] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1225] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyInstantSnapshotRequest) String() string { @@ -122625,7 +120173,7 @@ func (*SetIamPolicyInstantSnapshotRequest) ProtoMessage() {} func (x *SetIamPolicyInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1225] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122684,11 +120232,9 @@ type SetIamPolicyLicenseRequest struct { func (x *SetIamPolicyLicenseRequest) Reset() { *x = SetIamPolicyLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1226] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1226] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyLicenseRequest) String() string { @@ -122699,7 +120245,7 @@ func (*SetIamPolicyLicenseRequest) ProtoMessage() {} func (x *SetIamPolicyLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1226] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122751,11 +120297,9 @@ type SetIamPolicyMachineImageRequest struct { func (x *SetIamPolicyMachineImageRequest) Reset() { *x = SetIamPolicyMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1227] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1227] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyMachineImageRequest) String() string { @@ -122766,7 +120310,7 @@ func (*SetIamPolicyMachineImageRequest) ProtoMessage() {} func (x *SetIamPolicyMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1227] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122820,11 +120364,9 @@ type SetIamPolicyNetworkAttachmentRequest struct { func (x *SetIamPolicyNetworkAttachmentRequest) Reset() { *x = SetIamPolicyNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1228] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1228] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyNetworkAttachmentRequest) String() string { @@ -122835,7 +120377,7 @@ func (*SetIamPolicyNetworkAttachmentRequest) ProtoMessage() {} func (x *SetIamPolicyNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1228] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122894,11 +120436,9 @@ type SetIamPolicyNetworkFirewallPolicyRequest struct { func (x *SetIamPolicyNetworkFirewallPolicyRequest) Reset() { *x = SetIamPolicyNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1229] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1229] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyNetworkFirewallPolicyRequest) String() string { @@ -122909,7 +120449,7 @@ func (*SetIamPolicyNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *SetIamPolicyNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1229] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122963,11 +120503,9 @@ type SetIamPolicyNodeGroupRequest struct { func (x *SetIamPolicyNodeGroupRequest) Reset() { *x = SetIamPolicyNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1230] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1230] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyNodeGroupRequest) String() string { @@ -122978,7 +120516,7 @@ func (*SetIamPolicyNodeGroupRequest) ProtoMessage() {} func (x *SetIamPolicyNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1230] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123039,11 +120577,9 @@ type SetIamPolicyNodeTemplateRequest struct { func (x *SetIamPolicyNodeTemplateRequest) Reset() { *x = SetIamPolicyNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1231] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1231] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyNodeTemplateRequest) String() string { @@ -123054,7 +120590,7 @@ func (*SetIamPolicyNodeTemplateRequest) ProtoMessage() {} func (x *SetIamPolicyNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1231] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123115,11 +120651,9 @@ type SetIamPolicyRegionBackendServiceRequest struct { func (x *SetIamPolicyRegionBackendServiceRequest) Reset() { *x = SetIamPolicyRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1232] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1232] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRegionBackendServiceRequest) String() string { @@ -123130,7 +120664,7 @@ func (*SetIamPolicyRegionBackendServiceRequest) ProtoMessage() {} func (x *SetIamPolicyRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1232] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123191,11 +120725,9 @@ type SetIamPolicyRegionDiskRequest struct { func (x *SetIamPolicyRegionDiskRequest) Reset() { *x = SetIamPolicyRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1233] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1233] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRegionDiskRequest) String() string { @@ -123206,7 +120738,7 @@ func (*SetIamPolicyRegionDiskRequest) ProtoMessage() {} func (x *SetIamPolicyRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1233] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123267,11 +120799,9 @@ type SetIamPolicyRegionInstantSnapshotRequest struct { func (x *SetIamPolicyRegionInstantSnapshotRequest) Reset() { *x = SetIamPolicyRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1234] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1234] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRegionInstantSnapshotRequest) String() string { @@ -123282,7 +120812,7 @@ func (*SetIamPolicyRegionInstantSnapshotRequest) ProtoMessage() {} func (x *SetIamPolicyRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1234] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123343,11 +120873,9 @@ type SetIamPolicyRegionNetworkFirewallPolicyRequest struct { func (x *SetIamPolicyRegionNetworkFirewallPolicyRequest) Reset() { *x = SetIamPolicyRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1235] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1235] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRegionNetworkFirewallPolicyRequest) String() string { @@ -123358,7 +120886,7 @@ func (*SetIamPolicyRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *SetIamPolicyRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1235] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123419,11 +120947,9 @@ type SetIamPolicyReservationRequest struct { func (x *SetIamPolicyReservationRequest) Reset() { *x = SetIamPolicyReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1236] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1236] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyReservationRequest) String() string { @@ -123434,7 +120960,7 @@ func (*SetIamPolicyReservationRequest) ProtoMessage() {} func (x *SetIamPolicyReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1236] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123495,11 +121021,9 @@ type SetIamPolicyResourcePolicyRequest struct { func (x *SetIamPolicyResourcePolicyRequest) Reset() { *x = SetIamPolicyResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1237] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1237] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyResourcePolicyRequest) String() string { @@ -123510,7 +121034,7 @@ func (*SetIamPolicyResourcePolicyRequest) ProtoMessage() {} func (x *SetIamPolicyResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1237] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123571,11 +121095,9 @@ type SetIamPolicyServiceAttachmentRequest struct { func (x *SetIamPolicyServiceAttachmentRequest) Reset() { *x = SetIamPolicyServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1238] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1238] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyServiceAttachmentRequest) String() string { @@ -123586,7 +121108,7 @@ func (*SetIamPolicyServiceAttachmentRequest) ProtoMessage() {} func (x *SetIamPolicyServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1238] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123645,11 +121167,9 @@ type SetIamPolicySnapshotRequest struct { func (x *SetIamPolicySnapshotRequest) Reset() { *x = SetIamPolicySnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1239] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicySnapshotRequest) String() string { @@ -123660,7 +121180,7 @@ func (*SetIamPolicySnapshotRequest) ProtoMessage() {} func (x *SetIamPolicySnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1239] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123714,11 +121234,9 @@ type SetIamPolicyStoragePoolRequest struct { func (x *SetIamPolicyStoragePoolRequest) Reset() { *x = SetIamPolicyStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1240] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1240] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyStoragePoolRequest) String() string { @@ -123729,7 +121247,7 @@ func (*SetIamPolicyStoragePoolRequest) ProtoMessage() {} func (x *SetIamPolicyStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1240] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123790,11 +121308,9 @@ type SetIamPolicySubnetworkRequest struct { func (x *SetIamPolicySubnetworkRequest) Reset() { *x = SetIamPolicySubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1241] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1241] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicySubnetworkRequest) String() string { @@ -123805,7 +121321,7 @@ func (*SetIamPolicySubnetworkRequest) ProtoMessage() {} func (x *SetIamPolicySubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1241] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123868,11 +121384,9 @@ type SetInstanceTemplateInstanceGroupManagerRequest struct { func (x *SetInstanceTemplateInstanceGroupManagerRequest) Reset() { *x = SetInstanceTemplateInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1242] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1242] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceTemplateInstanceGroupManagerRequest) String() string { @@ -123883,7 +121397,7 @@ func (*SetInstanceTemplateInstanceGroupManagerRequest) ProtoMessage() {} func (x *SetInstanceTemplateInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1242] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123953,11 +121467,9 @@ type SetInstanceTemplateRegionInstanceGroupManagerRequest struct { func (x *SetInstanceTemplateRegionInstanceGroupManagerRequest) Reset() { *x = SetInstanceTemplateRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1243] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceTemplateRegionInstanceGroupManagerRequest) String() string { @@ -123968,7 +121480,7 @@ func (*SetInstanceTemplateRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *SetInstanceTemplateRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1243] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124038,11 +121550,9 @@ type SetLabelsAddressRequest struct { func (x *SetLabelsAddressRequest) Reset() { *x = SetLabelsAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1244] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1244] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsAddressRequest) String() string { @@ -124053,7 +121563,7 @@ func (*SetLabelsAddressRequest) ProtoMessage() {} func (x *SetLabelsAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1244] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124123,11 +121633,9 @@ type SetLabelsDiskRequest struct { func (x *SetLabelsDiskRequest) Reset() { *x = SetLabelsDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1245] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1245] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsDiskRequest) String() string { @@ -124138,7 +121646,7 @@ func (*SetLabelsDiskRequest) ProtoMessage() {} func (x *SetLabelsDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1245] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124204,11 +121712,9 @@ type SetLabelsExternalVpnGatewayRequest struct { func (x *SetLabelsExternalVpnGatewayRequest) Reset() { *x = SetLabelsExternalVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1246] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsExternalVpnGatewayRequest) String() string { @@ -124219,7 +121725,7 @@ func (*SetLabelsExternalVpnGatewayRequest) ProtoMessage() {} func (x *SetLabelsExternalVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1246] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124275,11 +121781,9 @@ type SetLabelsForwardingRuleRequest struct { func (x *SetLabelsForwardingRuleRequest) Reset() { *x = SetLabelsForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1247] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1247] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsForwardingRuleRequest) String() string { @@ -124290,7 +121794,7 @@ func (*SetLabelsForwardingRuleRequest) ProtoMessage() {} func (x *SetLabelsForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1247] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124356,11 +121860,9 @@ type SetLabelsGlobalAddressRequest struct { func (x *SetLabelsGlobalAddressRequest) Reset() { *x = SetLabelsGlobalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1248] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1248] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsGlobalAddressRequest) String() string { @@ -124371,7 +121873,7 @@ func (*SetLabelsGlobalAddressRequest) ProtoMessage() {} func (x *SetLabelsGlobalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1248] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124423,11 +121925,9 @@ type SetLabelsGlobalForwardingRuleRequest struct { func (x *SetLabelsGlobalForwardingRuleRequest) Reset() { *x = SetLabelsGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1249] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1249] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsGlobalForwardingRuleRequest) String() string { @@ -124438,7 +121938,7 @@ func (*SetLabelsGlobalForwardingRuleRequest) ProtoMessage() {} func (x *SetLabelsGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1249] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124490,11 +121990,9 @@ type SetLabelsImageRequest struct { func (x *SetLabelsImageRequest) Reset() { *x = SetLabelsImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1250] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1250] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsImageRequest) String() string { @@ -124505,7 +122003,7 @@ func (*SetLabelsImageRequest) ProtoMessage() {} func (x *SetLabelsImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1250] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124561,11 +122059,9 @@ type SetLabelsInstanceRequest struct { func (x *SetLabelsInstanceRequest) Reset() { *x = SetLabelsInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1251] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1251] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsInstanceRequest) String() string { @@ -124576,7 +122072,7 @@ func (*SetLabelsInstanceRequest) ProtoMessage() {} func (x *SetLabelsInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1251] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124646,11 +122142,9 @@ type SetLabelsInstantSnapshotRequest struct { func (x *SetLabelsInstantSnapshotRequest) Reset() { *x = SetLabelsInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1252] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1252] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsInstantSnapshotRequest) String() string { @@ -124661,7 +122155,7 @@ func (*SetLabelsInstantSnapshotRequest) ProtoMessage() {} func (x *SetLabelsInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1252] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124731,11 +122225,9 @@ type SetLabelsInterconnectAttachmentRequest struct { func (x *SetLabelsInterconnectAttachmentRequest) Reset() { *x = SetLabelsInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1253] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1253] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsInterconnectAttachmentRequest) String() string { @@ -124746,7 +122238,7 @@ func (*SetLabelsInterconnectAttachmentRequest) ProtoMessage() {} func (x *SetLabelsInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1253] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124812,11 +122304,9 @@ type SetLabelsInterconnectRequest struct { func (x *SetLabelsInterconnectRequest) Reset() { *x = SetLabelsInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1254] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1254] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsInterconnectRequest) String() string { @@ -124827,7 +122317,7 @@ func (*SetLabelsInterconnectRequest) ProtoMessage() {} func (x *SetLabelsInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1254] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124883,11 +122373,9 @@ type SetLabelsRegionDiskRequest struct { func (x *SetLabelsRegionDiskRequest) Reset() { *x = SetLabelsRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1255] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1255] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsRegionDiskRequest) String() string { @@ -124898,7 +122386,7 @@ func (*SetLabelsRegionDiskRequest) ProtoMessage() {} func (x *SetLabelsRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1255] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124968,11 +122456,9 @@ type SetLabelsRegionInstantSnapshotRequest struct { func (x *SetLabelsRegionInstantSnapshotRequest) Reset() { *x = SetLabelsRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1256] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1256] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsRegionInstantSnapshotRequest) String() string { @@ -124983,7 +122469,7 @@ func (*SetLabelsRegionInstantSnapshotRequest) ProtoMessage() {} func (x *SetLabelsRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1256] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125053,11 +122539,9 @@ type SetLabelsRegionSecurityPolicyRequest struct { func (x *SetLabelsRegionSecurityPolicyRequest) Reset() { *x = SetLabelsRegionSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1257] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1257] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsRegionSecurityPolicyRequest) String() string { @@ -125068,7 +122552,7 @@ func (*SetLabelsRegionSecurityPolicyRequest) ProtoMessage() {} func (x *SetLabelsRegionSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1257] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125134,11 +122618,9 @@ type SetLabelsSecurityPolicyRequest struct { func (x *SetLabelsSecurityPolicyRequest) Reset() { *x = SetLabelsSecurityPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1258] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1258] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsSecurityPolicyRequest) String() string { @@ -125149,7 +122631,7 @@ func (*SetLabelsSecurityPolicyRequest) ProtoMessage() {} func (x *SetLabelsSecurityPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1258] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125201,11 +122683,9 @@ type SetLabelsSnapshotRequest struct { func (x *SetLabelsSnapshotRequest) Reset() { *x = SetLabelsSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1259] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1259] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsSnapshotRequest) String() string { @@ -125216,7 +122696,7 @@ func (*SetLabelsSnapshotRequest) ProtoMessage() {} func (x *SetLabelsSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1259] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125272,11 +122752,9 @@ type SetLabelsTargetVpnGatewayRequest struct { func (x *SetLabelsTargetVpnGatewayRequest) Reset() { *x = SetLabelsTargetVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1260] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1260] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsTargetVpnGatewayRequest) String() string { @@ -125287,7 +122765,7 @@ func (*SetLabelsTargetVpnGatewayRequest) ProtoMessage() {} func (x *SetLabelsTargetVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1260] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125357,11 +122835,9 @@ type SetLabelsVpnGatewayRequest struct { func (x *SetLabelsVpnGatewayRequest) Reset() { *x = SetLabelsVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1261] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1261] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsVpnGatewayRequest) String() string { @@ -125372,7 +122848,7 @@ func (*SetLabelsVpnGatewayRequest) ProtoMessage() {} func (x *SetLabelsVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1261] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125442,11 +122918,9 @@ type SetLabelsVpnTunnelRequest struct { func (x *SetLabelsVpnTunnelRequest) Reset() { *x = SetLabelsVpnTunnelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1262] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1262] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsVpnTunnelRequest) String() string { @@ -125457,7 +122931,7 @@ func (*SetLabelsVpnTunnelRequest) ProtoMessage() {} func (x *SetLabelsVpnTunnelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1262] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125527,11 +123001,9 @@ type SetMachineResourcesInstanceRequest struct { func (x *SetMachineResourcesInstanceRequest) Reset() { *x = SetMachineResourcesInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1263] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1263] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMachineResourcesInstanceRequest) String() string { @@ -125542,7 +123014,7 @@ func (*SetMachineResourcesInstanceRequest) ProtoMessage() {} func (x *SetMachineResourcesInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1263] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125612,11 +123084,9 @@ type SetMachineTypeInstanceRequest struct { func (x *SetMachineTypeInstanceRequest) Reset() { *x = SetMachineTypeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1264] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1264] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMachineTypeInstanceRequest) String() string { @@ -125627,7 +123097,7 @@ func (*SetMachineTypeInstanceRequest) ProtoMessage() {} func (x *SetMachineTypeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1264] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125697,11 +123167,9 @@ type SetMetadataInstanceRequest struct { func (x *SetMetadataInstanceRequest) Reset() { *x = SetMetadataInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1265] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1265] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMetadataInstanceRequest) String() string { @@ -125712,7 +123180,7 @@ func (*SetMetadataInstanceRequest) ProtoMessage() {} func (x *SetMetadataInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1265] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125782,11 +123250,9 @@ type SetMinCpuPlatformInstanceRequest struct { func (x *SetMinCpuPlatformInstanceRequest) Reset() { *x = SetMinCpuPlatformInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1266] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1266] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMinCpuPlatformInstanceRequest) String() string { @@ -125797,7 +123263,7 @@ func (*SetMinCpuPlatformInstanceRequest) ProtoMessage() {} func (x *SetMinCpuPlatformInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1266] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125867,11 +123333,9 @@ type SetNameInstanceRequest struct { func (x *SetNameInstanceRequest) Reset() { *x = SetNameInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1267] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1267] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNameInstanceRequest) String() string { @@ -125882,7 +123346,7 @@ func (*SetNameInstanceRequest) ProtoMessage() {} func (x *SetNameInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1267] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125952,11 +123416,9 @@ type SetNamedPortsInstanceGroupRequest struct { func (x *SetNamedPortsInstanceGroupRequest) Reset() { *x = SetNamedPortsInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1268] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1268] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNamedPortsInstanceGroupRequest) String() string { @@ -125967,7 +123429,7 @@ func (*SetNamedPortsInstanceGroupRequest) ProtoMessage() {} func (x *SetNamedPortsInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1268] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126037,11 +123499,9 @@ type SetNamedPortsRegionInstanceGroupRequest struct { func (x *SetNamedPortsRegionInstanceGroupRequest) Reset() { *x = SetNamedPortsRegionInstanceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1269] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1269] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNamedPortsRegionInstanceGroupRequest) String() string { @@ -126052,7 +123512,7 @@ func (*SetNamedPortsRegionInstanceGroupRequest) ProtoMessage() {} func (x *SetNamedPortsRegionInstanceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1269] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126122,11 +123582,9 @@ type SetNodeTemplateNodeGroupRequest struct { func (x *SetNodeTemplateNodeGroupRequest) Reset() { *x = SetNodeTemplateNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1270] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1270] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNodeTemplateNodeGroupRequest) String() string { @@ -126137,7 +123595,7 @@ func (*SetNodeTemplateNodeGroupRequest) ProtoMessage() {} func (x *SetNodeTemplateNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1270] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126207,11 +123665,9 @@ type SetPrivateIpGoogleAccessSubnetworkRequest struct { func (x *SetPrivateIpGoogleAccessSubnetworkRequest) Reset() { *x = SetPrivateIpGoogleAccessSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1271] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1271] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetPrivateIpGoogleAccessSubnetworkRequest) String() string { @@ -126222,7 +123678,7 @@ func (*SetPrivateIpGoogleAccessSubnetworkRequest) ProtoMessage() {} func (x *SetPrivateIpGoogleAccessSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1271] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126290,11 +123746,9 @@ type SetProxyHeaderTargetSslProxyRequest struct { func (x *SetProxyHeaderTargetSslProxyRequest) Reset() { *x = SetProxyHeaderTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1272] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1272] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetProxyHeaderTargetSslProxyRequest) String() string { @@ -126305,7 +123759,7 @@ func (*SetProxyHeaderTargetSslProxyRequest) ProtoMessage() {} func (x *SetProxyHeaderTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1272] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126366,11 +123820,9 @@ type SetProxyHeaderTargetTcpProxyRequest struct { func (x *SetProxyHeaderTargetTcpProxyRequest) Reset() { *x = SetProxyHeaderTargetTcpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1273] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1273] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetProxyHeaderTargetTcpProxyRequest) String() string { @@ -126381,7 +123833,7 @@ func (*SetProxyHeaderTargetTcpProxyRequest) ProtoMessage() {} func (x *SetProxyHeaderTargetTcpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1273] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126442,11 +123894,9 @@ type SetQuicOverrideTargetHttpsProxyRequest struct { func (x *SetQuicOverrideTargetHttpsProxyRequest) Reset() { *x = SetQuicOverrideTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1274] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1274] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetQuicOverrideTargetHttpsProxyRequest) String() string { @@ -126457,7 +123907,7 @@ func (*SetQuicOverrideTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetQuicOverrideTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1274] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126520,11 +123970,9 @@ type SetSchedulingInstanceRequest struct { func (x *SetSchedulingInstanceRequest) Reset() { *x = SetSchedulingInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1275] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1275] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSchedulingInstanceRequest) String() string { @@ -126535,7 +123983,7 @@ func (*SetSchedulingInstanceRequest) ProtoMessage() {} func (x *SetSchedulingInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1275] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126603,11 +124051,9 @@ type SetSecurityPolicyBackendServiceRequest struct { func (x *SetSecurityPolicyBackendServiceRequest) Reset() { *x = SetSecurityPolicyBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1276] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1276] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSecurityPolicyBackendServiceRequest) String() string { @@ -126618,7 +124064,7 @@ func (*SetSecurityPolicyBackendServiceRequest) ProtoMessage() {} func (x *SetSecurityPolicyBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1276] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126681,11 +124127,9 @@ type SetSecurityPolicyInstanceRequest struct { func (x *SetSecurityPolicyInstanceRequest) Reset() { *x = SetSecurityPolicyInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1277] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1277] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSecurityPolicyInstanceRequest) String() string { @@ -126696,7 +124140,7 @@ func (*SetSecurityPolicyInstanceRequest) ProtoMessage() {} func (x *SetSecurityPolicyInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1277] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126766,11 +124210,9 @@ type SetSecurityPolicyRegionBackendServiceRequest struct { func (x *SetSecurityPolicyRegionBackendServiceRequest) Reset() { *x = SetSecurityPolicyRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1278] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1278] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSecurityPolicyRegionBackendServiceRequest) String() string { @@ -126781,7 +124223,7 @@ func (*SetSecurityPolicyRegionBackendServiceRequest) ProtoMessage() {} func (x *SetSecurityPolicyRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1278] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126851,11 +124293,9 @@ type SetSecurityPolicyTargetInstanceRequest struct { func (x *SetSecurityPolicyTargetInstanceRequest) Reset() { *x = SetSecurityPolicyTargetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1279] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1279] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSecurityPolicyTargetInstanceRequest) String() string { @@ -126866,7 +124306,7 @@ func (*SetSecurityPolicyTargetInstanceRequest) ProtoMessage() {} func (x *SetSecurityPolicyTargetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1279] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126936,11 +124376,9 @@ type SetSecurityPolicyTargetPoolRequest struct { func (x *SetSecurityPolicyTargetPoolRequest) Reset() { *x = SetSecurityPolicyTargetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1280] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1280] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSecurityPolicyTargetPoolRequest) String() string { @@ -126951,7 +124389,7 @@ func (*SetSecurityPolicyTargetPoolRequest) ProtoMessage() {} func (x *SetSecurityPolicyTargetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1280] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127021,11 +124459,9 @@ type SetServiceAccountInstanceRequest struct { func (x *SetServiceAccountInstanceRequest) Reset() { *x = SetServiceAccountInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1281] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1281] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetServiceAccountInstanceRequest) String() string { @@ -127036,7 +124472,7 @@ func (*SetServiceAccountInstanceRequest) ProtoMessage() {} func (x *SetServiceAccountInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1281] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127106,11 +124542,9 @@ type SetShieldedInstanceIntegrityPolicyInstanceRequest struct { func (x *SetShieldedInstanceIntegrityPolicyInstanceRequest) Reset() { *x = SetShieldedInstanceIntegrityPolicyInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1282] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1282] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetShieldedInstanceIntegrityPolicyInstanceRequest) String() string { @@ -127121,7 +124555,7 @@ func (*SetShieldedInstanceIntegrityPolicyInstanceRequest) ProtoMessage() {} func (x *SetShieldedInstanceIntegrityPolicyInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1282] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127191,11 +124625,9 @@ type SetSslCertificatesRegionTargetHttpsProxyRequest struct { func (x *SetSslCertificatesRegionTargetHttpsProxyRequest) Reset() { *x = SetSslCertificatesRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1283] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1283] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSslCertificatesRegionTargetHttpsProxyRequest) String() string { @@ -127206,7 +124638,7 @@ func (*SetSslCertificatesRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetSslCertificatesRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1283] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127274,11 +124706,9 @@ type SetSslCertificatesTargetHttpsProxyRequest struct { func (x *SetSslCertificatesTargetHttpsProxyRequest) Reset() { *x = SetSslCertificatesTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1284] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1284] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSslCertificatesTargetHttpsProxyRequest) String() string { @@ -127289,7 +124719,7 @@ func (*SetSslCertificatesTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetSslCertificatesTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1284] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127350,11 +124780,9 @@ type SetSslCertificatesTargetSslProxyRequest struct { func (x *SetSslCertificatesTargetSslProxyRequest) Reset() { *x = SetSslCertificatesTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1285] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1285] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSslCertificatesTargetSslProxyRequest) String() string { @@ -127365,7 +124793,7 @@ func (*SetSslCertificatesTargetSslProxyRequest) ProtoMessage() {} func (x *SetSslCertificatesTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1285] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127426,11 +124854,9 @@ type SetSslPolicyTargetHttpsProxyRequest struct { func (x *SetSslPolicyTargetHttpsProxyRequest) Reset() { *x = SetSslPolicyTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1286] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1286] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSslPolicyTargetHttpsProxyRequest) String() string { @@ -127441,7 +124867,7 @@ func (*SetSslPolicyTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetSslPolicyTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1286] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127502,11 +124928,9 @@ type SetSslPolicyTargetSslProxyRequest struct { func (x *SetSslPolicyTargetSslProxyRequest) Reset() { *x = SetSslPolicyTargetSslProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1287] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1287] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSslPolicyTargetSslProxyRequest) String() string { @@ -127517,7 +124941,7 @@ func (*SetSslPolicyTargetSslProxyRequest) ProtoMessage() {} func (x *SetSslPolicyTargetSslProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1287] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127580,11 +125004,9 @@ type SetTagsInstanceRequest struct { func (x *SetTagsInstanceRequest) Reset() { *x = SetTagsInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1288] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1288] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTagsInstanceRequest) String() string { @@ -127595,7 +125017,7 @@ func (*SetTagsInstanceRequest) ProtoMessage() {} func (x *SetTagsInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1288] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127665,11 +125087,9 @@ type SetTargetForwardingRuleRequest struct { func (x *SetTargetForwardingRuleRequest) Reset() { *x = SetTargetForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1289] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1289] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTargetForwardingRuleRequest) String() string { @@ -127680,7 +125100,7 @@ func (*SetTargetForwardingRuleRequest) ProtoMessage() {} func (x *SetTargetForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1289] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127748,11 +125168,9 @@ type SetTargetGlobalForwardingRuleRequest struct { func (x *SetTargetGlobalForwardingRuleRequest) Reset() { *x = SetTargetGlobalForwardingRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1290] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1290] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTargetGlobalForwardingRuleRequest) String() string { @@ -127763,7 +125181,7 @@ func (*SetTargetGlobalForwardingRuleRequest) ProtoMessage() {} func (x *SetTargetGlobalForwardingRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1290] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127826,11 +125244,9 @@ type SetTargetPoolsInstanceGroupManagerRequest struct { func (x *SetTargetPoolsInstanceGroupManagerRequest) Reset() { *x = SetTargetPoolsInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1291] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1291] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTargetPoolsInstanceGroupManagerRequest) String() string { @@ -127841,7 +125257,7 @@ func (*SetTargetPoolsInstanceGroupManagerRequest) ProtoMessage() {} func (x *SetTargetPoolsInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1291] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127911,11 +125327,9 @@ type SetTargetPoolsRegionInstanceGroupManagerRequest struct { func (x *SetTargetPoolsRegionInstanceGroupManagerRequest) Reset() { *x = SetTargetPoolsRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1292] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1292] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetTargetPoolsRegionInstanceGroupManagerRequest) String() string { @@ -127926,7 +125340,7 @@ func (*SetTargetPoolsRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *SetTargetPoolsRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1292] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127996,11 +125410,9 @@ type SetUrlMapRegionTargetHttpProxyRequest struct { func (x *SetUrlMapRegionTargetHttpProxyRequest) Reset() { *x = SetUrlMapRegionTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1293] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1293] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUrlMapRegionTargetHttpProxyRequest) String() string { @@ -128011,7 +125423,7 @@ func (*SetUrlMapRegionTargetHttpProxyRequest) ProtoMessage() {} func (x *SetUrlMapRegionTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1293] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128081,11 +125493,9 @@ type SetUrlMapRegionTargetHttpsProxyRequest struct { func (x *SetUrlMapRegionTargetHttpsProxyRequest) Reset() { *x = SetUrlMapRegionTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1294] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1294] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUrlMapRegionTargetHttpsProxyRequest) String() string { @@ -128096,7 +125506,7 @@ func (*SetUrlMapRegionTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetUrlMapRegionTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1294] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128164,11 +125574,9 @@ type SetUrlMapTargetHttpProxyRequest struct { func (x *SetUrlMapTargetHttpProxyRequest) Reset() { *x = SetUrlMapTargetHttpProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1295] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1295] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUrlMapTargetHttpProxyRequest) String() string { @@ -128179,7 +125587,7 @@ func (*SetUrlMapTargetHttpProxyRequest) ProtoMessage() {} func (x *SetUrlMapTargetHttpProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1295] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128240,11 +125648,9 @@ type SetUrlMapTargetHttpsProxyRequest struct { func (x *SetUrlMapTargetHttpsProxyRequest) Reset() { *x = SetUrlMapTargetHttpsProxyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1296] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1296] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUrlMapTargetHttpsProxyRequest) String() string { @@ -128255,7 +125661,7 @@ func (*SetUrlMapTargetHttpsProxyRequest) ProtoMessage() {} func (x *SetUrlMapTargetHttpsProxyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1296] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128314,11 +125720,9 @@ type SetUsageExportBucketProjectRequest struct { func (x *SetUsageExportBucketProjectRequest) Reset() { *x = SetUsageExportBucketProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1297] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1297] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUsageExportBucketProjectRequest) String() string { @@ -128329,7 +125733,7 @@ func (*SetUsageExportBucketProjectRequest) ProtoMessage() {} func (x *SetUsageExportBucketProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1297] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128380,11 +125784,9 @@ type ShareSettings struct { func (x *ShareSettings) Reset() { *x = ShareSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1298] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1298] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShareSettings) String() string { @@ -128395,7 +125797,7 @@ func (*ShareSettings) ProtoMessage() {} func (x *ShareSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1298] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128436,11 +125838,9 @@ type ShareSettingsProjectConfig struct { func (x *ShareSettingsProjectConfig) Reset() { *x = ShareSettingsProjectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1299] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1299] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShareSettingsProjectConfig) String() string { @@ -128451,7 +125851,7 @@ func (*ShareSettingsProjectConfig) ProtoMessage() {} func (x *ShareSettingsProjectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1299] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128489,11 +125889,9 @@ type ShieldedInstanceConfig struct { func (x *ShieldedInstanceConfig) Reset() { *x = ShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1300] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1300] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceConfig) String() string { @@ -128504,7 +125902,7 @@ func (*ShieldedInstanceConfig) ProtoMessage() {} func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1300] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128556,11 +125954,9 @@ type ShieldedInstanceIdentity struct { func (x *ShieldedInstanceIdentity) Reset() { *x = ShieldedInstanceIdentity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1301] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1301] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceIdentity) String() string { @@ -128571,7 +125967,7 @@ func (*ShieldedInstanceIdentity) ProtoMessage() {} func (x *ShieldedInstanceIdentity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1301] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128621,11 +126017,9 @@ type ShieldedInstanceIdentityEntry struct { func (x *ShieldedInstanceIdentityEntry) Reset() { *x = ShieldedInstanceIdentityEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1302] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1302] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceIdentityEntry) String() string { @@ -128636,7 +126030,7 @@ func (*ShieldedInstanceIdentityEntry) ProtoMessage() {} func (x *ShieldedInstanceIdentityEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1302] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128677,11 +126071,9 @@ type ShieldedInstanceIntegrityPolicy struct { func (x *ShieldedInstanceIntegrityPolicy) Reset() { *x = ShieldedInstanceIntegrityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1303] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1303] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceIntegrityPolicy) String() string { @@ -128692,7 +126084,7 @@ func (*ShieldedInstanceIntegrityPolicy) ProtoMessage() {} func (x *ShieldedInstanceIntegrityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1303] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128728,11 +126120,9 @@ type SignedUrlKey struct { func (x *SignedUrlKey) Reset() { *x = SignedUrlKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1304] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1304] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedUrlKey) String() string { @@ -128743,7 +126133,7 @@ func (*SignedUrlKey) ProtoMessage() {} func (x *SignedUrlKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1304] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128792,11 +126182,9 @@ type SimulateMaintenanceEventInstanceRequest struct { func (x *SimulateMaintenanceEventInstanceRequest) Reset() { *x = SimulateMaintenanceEventInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1305] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1305] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateMaintenanceEventInstanceRequest) String() string { @@ -128807,7 +126195,7 @@ func (*SimulateMaintenanceEventInstanceRequest) ProtoMessage() {} func (x *SimulateMaintenanceEventInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1305] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128877,11 +126265,9 @@ type SimulateMaintenanceEventNodeGroupRequest struct { func (x *SimulateMaintenanceEventNodeGroupRequest) Reset() { *x = SimulateMaintenanceEventNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1306] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1306] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateMaintenanceEventNodeGroupRequest) String() string { @@ -128892,7 +126278,7 @@ func (*SimulateMaintenanceEventNodeGroupRequest) ProtoMessage() {} func (x *SimulateMaintenanceEventNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1306] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129028,11 +126414,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1307] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1307] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -129043,7 +126427,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1307] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129332,11 +126716,9 @@ type SnapshotList struct { func (x *SnapshotList) Reset() { *x = SnapshotList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1308] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1308] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotList) String() string { @@ -129347,7 +126729,7 @@ func (*SnapshotList) ProtoMessage() {} func (x *SnapshotList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1308] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129415,11 +126797,9 @@ type SnapshotSettings struct { func (x *SnapshotSettings) Reset() { *x = SnapshotSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1309] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1309] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotSettings) String() string { @@ -129430,7 +126810,7 @@ func (*SnapshotSettings) ProtoMessage() {} func (x *SnapshotSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1309] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129466,11 +126846,9 @@ type SnapshotSettingsStorageLocationSettings struct { func (x *SnapshotSettingsStorageLocationSettings) Reset() { *x = SnapshotSettingsStorageLocationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1310] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1310] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotSettingsStorageLocationSettings) String() string { @@ -129481,7 +126859,7 @@ func (*SnapshotSettingsStorageLocationSettings) ProtoMessage() {} func (x *SnapshotSettingsStorageLocationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1310] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129522,11 +126900,9 @@ type SnapshotSettingsStorageLocationSettingsStorageLocationPreference struct { func (x *SnapshotSettingsStorageLocationSettingsStorageLocationPreference) Reset() { *x = SnapshotSettingsStorageLocationSettingsStorageLocationPreference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1311] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1311] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotSettingsStorageLocationSettingsStorageLocationPreference) String() string { @@ -129537,7 +126913,7 @@ func (*SnapshotSettingsStorageLocationSettingsStorageLocationPreference) ProtoMe func (x *SnapshotSettingsStorageLocationSettingsStorageLocationPreference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1311] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129572,11 +126948,9 @@ type SourceDiskEncryptionKey struct { func (x *SourceDiskEncryptionKey) Reset() { *x = SourceDiskEncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1312] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1312] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceDiskEncryptionKey) String() string { @@ -129587,7 +126961,7 @@ func (*SourceDiskEncryptionKey) ProtoMessage() {} func (x *SourceDiskEncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1312] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129628,11 +127002,9 @@ type SourceInstanceParams struct { func (x *SourceInstanceParams) Reset() { *x = SourceInstanceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1313] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1313] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceInstanceParams) String() string { @@ -129643,7 +127015,7 @@ func (*SourceInstanceParams) ProtoMessage() {} func (x *SourceInstanceParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1313] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129704,11 +127076,9 @@ type SourceInstanceProperties struct { func (x *SourceInstanceProperties) Reset() { *x = SourceInstanceProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1314] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1314] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceInstanceProperties) String() string { @@ -129719,7 +127089,7 @@ func (*SourceInstanceProperties) ProtoMessage() {} func (x *SourceInstanceProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1314] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129871,11 +127241,9 @@ type SslCertificate struct { func (x *SslCertificate) Reset() { *x = SslCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1315] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1315] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificate) String() string { @@ -129886,7 +127254,7 @@ func (*SslCertificate) ProtoMessage() {} func (x *SslCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1315] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130022,11 +127390,9 @@ type SslCertificateAggregatedList struct { func (x *SslCertificateAggregatedList) Reset() { *x = SslCertificateAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1316] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1316] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificateAggregatedList) String() string { @@ -130037,7 +127403,7 @@ func (*SslCertificateAggregatedList) ProtoMessage() {} func (x *SslCertificateAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1316] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130123,11 +127489,9 @@ type SslCertificateList struct { func (x *SslCertificateList) Reset() { *x = SslCertificateList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1317] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1317] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificateList) String() string { @@ -130138,7 +127502,7 @@ func (*SslCertificateList) ProtoMessage() {} func (x *SslCertificateList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1317] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130212,11 +127576,9 @@ type SslCertificateManagedSslCertificate struct { func (x *SslCertificateManagedSslCertificate) Reset() { *x = SslCertificateManagedSslCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1318] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1318] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificateManagedSslCertificate) String() string { @@ -130227,7 +127589,7 @@ func (*SslCertificateManagedSslCertificate) ProtoMessage() {} func (x *SslCertificateManagedSslCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1318] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130277,11 +127639,9 @@ type SslCertificateSelfManagedSslCertificate struct { func (x *SslCertificateSelfManagedSslCertificate) Reset() { *x = SslCertificateSelfManagedSslCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1319] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1319] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificateSelfManagedSslCertificate) String() string { @@ -130292,7 +127652,7 @@ func (*SslCertificateSelfManagedSslCertificate) ProtoMessage() {} func (x *SslCertificateSelfManagedSslCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1319] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130334,11 +127694,9 @@ type SslCertificatesScopedList struct { func (x *SslCertificatesScopedList) Reset() { *x = SslCertificatesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1320] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1320] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslCertificatesScopedList) String() string { @@ -130349,7 +127707,7 @@ func (*SslCertificatesScopedList) ProtoMessage() {} func (x *SslCertificatesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1320] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130402,11 +127760,9 @@ type SslPoliciesAggregatedList struct { func (x *SslPoliciesAggregatedList) Reset() { *x = SslPoliciesAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1321] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1321] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPoliciesAggregatedList) String() string { @@ -130417,7 +127773,7 @@ func (*SslPoliciesAggregatedList) ProtoMessage() {} func (x *SslPoliciesAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1321] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130509,11 +127865,9 @@ type SslPoliciesList struct { func (x *SslPoliciesList) Reset() { *x = SslPoliciesList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1322] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1322] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPoliciesList) String() string { @@ -130524,7 +127878,7 @@ func (*SslPoliciesList) ProtoMessage() {} func (x *SslPoliciesList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1322] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130591,11 +127945,9 @@ type SslPoliciesListAvailableFeaturesResponse struct { func (x *SslPoliciesListAvailableFeaturesResponse) Reset() { *x = SslPoliciesListAvailableFeaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1323] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1323] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPoliciesListAvailableFeaturesResponse) String() string { @@ -130606,7 +127958,7 @@ func (*SslPoliciesListAvailableFeaturesResponse) ProtoMessage() {} func (x *SslPoliciesListAvailableFeaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1323] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130641,11 +127993,9 @@ type SslPoliciesScopedList struct { func (x *SslPoliciesScopedList) Reset() { *x = SslPoliciesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1324] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1324] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPoliciesScopedList) String() string { @@ -130656,7 +128006,7 @@ func (*SslPoliciesScopedList) ProtoMessage() {} func (x *SslPoliciesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1324] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130723,11 +128073,9 @@ type SslPolicy struct { func (x *SslPolicy) Reset() { *x = SslPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1325] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1325] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPolicy) String() string { @@ -130738,7 +128086,7 @@ func (*SslPolicy) ProtoMessage() {} func (x *SslPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1325] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130855,11 +128203,9 @@ type SslPolicyReference struct { func (x *SslPolicyReference) Reset() { *x = SslPolicyReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1326] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1326] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SslPolicyReference) String() string { @@ -130870,7 +128216,7 @@ func (*SslPolicyReference) ProtoMessage() {} func (x *SslPolicyReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1326] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130912,11 +128258,9 @@ type StartAsyncReplicationDiskRequest struct { func (x *StartAsyncReplicationDiskRequest) Reset() { *x = StartAsyncReplicationDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1327] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1327] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartAsyncReplicationDiskRequest) String() string { @@ -130927,7 +128271,7 @@ func (*StartAsyncReplicationDiskRequest) ProtoMessage() {} func (x *StartAsyncReplicationDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1327] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130997,11 +128341,9 @@ type StartAsyncReplicationRegionDiskRequest struct { func (x *StartAsyncReplicationRegionDiskRequest) Reset() { *x = StartAsyncReplicationRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1328] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1328] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartAsyncReplicationRegionDiskRequest) String() string { @@ -131012,7 +128354,7 @@ func (*StartAsyncReplicationRegionDiskRequest) ProtoMessage() {} func (x *StartAsyncReplicationRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1328] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131080,11 +128422,9 @@ type StartInstanceRequest struct { func (x *StartInstanceRequest) Reset() { *x = StartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1329] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1329] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceRequest) String() string { @@ -131095,7 +128435,7 @@ func (*StartInstanceRequest) ProtoMessage() {} func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1329] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131158,11 +128498,9 @@ type StartInstancesInstanceGroupManagerRequest struct { func (x *StartInstancesInstanceGroupManagerRequest) Reset() { *x = StartInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1330] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1330] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstancesInstanceGroupManagerRequest) String() string { @@ -131173,7 +128511,7 @@ func (*StartInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *StartInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1330] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131243,11 +128581,9 @@ type StartInstancesRegionInstanceGroupManagerRequest struct { func (x *StartInstancesRegionInstanceGroupManagerRequest) Reset() { *x = StartInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1331] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1331] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstancesRegionInstanceGroupManagerRequest) String() string { @@ -131258,7 +128594,7 @@ func (*StartInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *StartInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1331] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131328,11 +128664,9 @@ type StartWithEncryptionKeyInstanceRequest struct { func (x *StartWithEncryptionKeyInstanceRequest) Reset() { *x = StartWithEncryptionKeyInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1332] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1332] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartWithEncryptionKeyInstanceRequest) String() string { @@ -131343,7 +128677,7 @@ func (*StartWithEncryptionKeyInstanceRequest) ProtoMessage() {} func (x *StartWithEncryptionKeyInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1332] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131403,11 +128737,9 @@ type StatefulPolicy struct { func (x *StatefulPolicy) Reset() { *x = StatefulPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1333] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1333] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatefulPolicy) String() string { @@ -131418,7 +128750,7 @@ func (*StatefulPolicy) ProtoMessage() {} func (x *StatefulPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1333] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131456,11 +128788,9 @@ type StatefulPolicyPreservedState struct { func (x *StatefulPolicyPreservedState) Reset() { *x = StatefulPolicyPreservedState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1334] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1334] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatefulPolicyPreservedState) String() string { @@ -131471,7 +128801,7 @@ func (*StatefulPolicyPreservedState) ProtoMessage() {} func (x *StatefulPolicyPreservedState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1334] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131519,11 +128849,9 @@ type StatefulPolicyPreservedStateDiskDevice struct { func (x *StatefulPolicyPreservedStateDiskDevice) Reset() { *x = StatefulPolicyPreservedStateDiskDevice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1335] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1335] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatefulPolicyPreservedStateDiskDevice) String() string { @@ -131534,7 +128862,7 @@ func (*StatefulPolicyPreservedStateDiskDevice) ProtoMessage() {} func (x *StatefulPolicyPreservedStateDiskDevice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1335] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131568,11 +128896,9 @@ type StatefulPolicyPreservedStateNetworkIp struct { func (x *StatefulPolicyPreservedStateNetworkIp) Reset() { *x = StatefulPolicyPreservedStateNetworkIp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1336] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1336] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatefulPolicyPreservedStateNetworkIp) String() string { @@ -131583,7 +128909,7 @@ func (*StatefulPolicyPreservedStateNetworkIp) ProtoMessage() {} func (x *StatefulPolicyPreservedStateNetworkIp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1336] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131621,11 +128947,9 @@ type Status struct { func (x *Status) Reset() { *x = Status{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1337] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1337] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Status) String() string { @@ -131636,7 +128960,7 @@ func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1337] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131690,11 +129014,9 @@ type StopAsyncReplicationDiskRequest struct { func (x *StopAsyncReplicationDiskRequest) Reset() { *x = StopAsyncReplicationDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1338] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1338] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAsyncReplicationDiskRequest) String() string { @@ -131705,7 +129027,7 @@ func (*StopAsyncReplicationDiskRequest) ProtoMessage() {} func (x *StopAsyncReplicationDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1338] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131766,11 +129088,9 @@ type StopAsyncReplicationRegionDiskRequest struct { func (x *StopAsyncReplicationRegionDiskRequest) Reset() { *x = StopAsyncReplicationRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1339] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1339] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAsyncReplicationRegionDiskRequest) String() string { @@ -131781,7 +129101,7 @@ func (*StopAsyncReplicationRegionDiskRequest) ProtoMessage() {} func (x *StopAsyncReplicationRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1339] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131842,11 +129162,9 @@ type StopGroupAsyncReplicationDiskRequest struct { func (x *StopGroupAsyncReplicationDiskRequest) Reset() { *x = StopGroupAsyncReplicationDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1340] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1340] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopGroupAsyncReplicationDiskRequest) String() string { @@ -131857,7 +129175,7 @@ func (*StopGroupAsyncReplicationDiskRequest) ProtoMessage() {} func (x *StopGroupAsyncReplicationDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1340] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131918,11 +129236,9 @@ type StopGroupAsyncReplicationRegionDiskRequest struct { func (x *StopGroupAsyncReplicationRegionDiskRequest) Reset() { *x = StopGroupAsyncReplicationRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1341] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1341] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopGroupAsyncReplicationRegionDiskRequest) String() string { @@ -131933,7 +129249,7 @@ func (*StopGroupAsyncReplicationRegionDiskRequest) ProtoMessage() {} func (x *StopGroupAsyncReplicationRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1341] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131996,11 +129312,9 @@ type StopInstanceRequest struct { func (x *StopInstanceRequest) Reset() { *x = StopInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1342] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1342] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceRequest) String() string { @@ -132011,7 +129325,7 @@ func (*StopInstanceRequest) ProtoMessage() {} func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1342] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132081,11 +129395,9 @@ type StopInstancesInstanceGroupManagerRequest struct { func (x *StopInstancesInstanceGroupManagerRequest) Reset() { *x = StopInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1343] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1343] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstancesInstanceGroupManagerRequest) String() string { @@ -132096,7 +129408,7 @@ func (*StopInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *StopInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1343] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132166,11 +129478,9 @@ type StopInstancesRegionInstanceGroupManagerRequest struct { func (x *StopInstancesRegionInstanceGroupManagerRequest) Reset() { *x = StopInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1344] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1344] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstancesRegionInstanceGroupManagerRequest) String() string { @@ -132181,7 +129491,7 @@ func (*StopInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *StopInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1344] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132282,11 +129592,9 @@ type StoragePool struct { func (x *StoragePool) Reset() { *x = StoragePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1345] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1345] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePool) String() string { @@ -132297,7 +129605,7 @@ func (*StoragePool) ProtoMessage() {} func (x *StoragePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1345] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132469,11 +129777,9 @@ type StoragePoolAggregatedList struct { func (x *StoragePoolAggregatedList) Reset() { *x = StoragePoolAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1346] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1346] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolAggregatedList) String() string { @@ -132484,7 +129790,7 @@ func (*StoragePoolAggregatedList) ProtoMessage() {} func (x *StoragePoolAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1346] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132587,11 +129893,9 @@ type StoragePoolDisk struct { func (x *StoragePoolDisk) Reset() { *x = StoragePoolDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1347] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1347] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolDisk) String() string { @@ -132602,7 +129906,7 @@ func (*StoragePoolDisk) ProtoMessage() {} func (x *StoragePoolDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1347] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132719,11 +130023,9 @@ type StoragePoolList struct { func (x *StoragePoolList) Reset() { *x = StoragePoolList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1348] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1348] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolList) String() string { @@ -132734,7 +130036,7 @@ func (*StoragePoolList) ProtoMessage() {} func (x *StoragePoolList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1348] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132829,11 +130131,9 @@ type StoragePoolListDisks struct { func (x *StoragePoolListDisks) Reset() { *x = StoragePoolListDisks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1349] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1349] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolListDisks) String() string { @@ -132844,7 +130144,7 @@ func (*StoragePoolListDisks) ProtoMessage() {} func (x *StoragePoolListDisks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1349] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132945,11 +130245,9 @@ type StoragePoolResourceStatus struct { func (x *StoragePoolResourceStatus) Reset() { *x = StoragePoolResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1350] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1350] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolResourceStatus) String() string { @@ -132960,7 +130258,7 @@ func (*StoragePoolResourceStatus) ProtoMessage() {} func (x *StoragePoolResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1350] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133088,11 +130386,9 @@ type StoragePoolType struct { func (x *StoragePoolType) Reset() { *x = StoragePoolType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1351] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1351] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolType) String() string { @@ -133103,7 +130399,7 @@ func (*StoragePoolType) ProtoMessage() {} func (x *StoragePoolType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1351] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133258,11 +130554,9 @@ type StoragePoolTypeAggregatedList struct { func (x *StoragePoolTypeAggregatedList) Reset() { *x = StoragePoolTypeAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1352] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1352] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolTypeAggregatedList) String() string { @@ -133273,7 +130567,7 @@ func (*StoragePoolTypeAggregatedList) ProtoMessage() {} func (x *StoragePoolTypeAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1352] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133352,11 +130646,9 @@ type StoragePoolTypeList struct { func (x *StoragePoolTypeList) Reset() { *x = StoragePoolTypeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1353] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1353] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolTypeList) String() string { @@ -133367,7 +130659,7 @@ func (*StoragePoolTypeList) ProtoMessage() {} func (x *StoragePoolTypeList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1353] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133437,11 +130729,9 @@ type StoragePoolTypesScopedList struct { func (x *StoragePoolTypesScopedList) Reset() { *x = StoragePoolTypesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1354] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1354] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolTypesScopedList) String() string { @@ -133452,7 +130742,7 @@ func (*StoragePoolTypesScopedList) ProtoMessage() {} func (x *StoragePoolTypesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1354] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133494,11 +130784,9 @@ type StoragePoolsScopedList struct { func (x *StoragePoolsScopedList) Reset() { *x = StoragePoolsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1355] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1355] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePoolsScopedList) String() string { @@ -133509,7 +130797,7 @@ func (*StoragePoolsScopedList) ProtoMessage() {} func (x *StoragePoolsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1355] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133604,11 +130892,9 @@ type Subnetwork struct { func (x *Subnetwork) Reset() { *x = Subnetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1356] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1356] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subnetwork) String() string { @@ -133619,7 +130905,7 @@ func (*Subnetwork) ProtoMessage() {} func (x *Subnetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1356] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133832,11 +131118,9 @@ type SubnetworkAggregatedList struct { func (x *SubnetworkAggregatedList) Reset() { *x = SubnetworkAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1357] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1357] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworkAggregatedList) String() string { @@ -133847,7 +131131,7 @@ func (*SubnetworkAggregatedList) ProtoMessage() {} func (x *SubnetworkAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1357] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133933,11 +131217,9 @@ type SubnetworkList struct { func (x *SubnetworkList) Reset() { *x = SubnetworkList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1358] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1358] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworkList) String() string { @@ -133948,7 +131230,7 @@ func (*SubnetworkList) ProtoMessage() {} func (x *SubnetworkList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1358] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134029,11 +131311,9 @@ type SubnetworkLogConfig struct { func (x *SubnetworkLogConfig) Reset() { *x = SubnetworkLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1359] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1359] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworkLogConfig) String() string { @@ -134044,7 +131324,7 @@ func (*SubnetworkLogConfig) ProtoMessage() {} func (x *SubnetworkLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1359] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134117,11 +131397,9 @@ type SubnetworkSecondaryRange struct { func (x *SubnetworkSecondaryRange) Reset() { *x = SubnetworkSecondaryRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1360] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1360] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworkSecondaryRange) String() string { @@ -134132,7 +131410,7 @@ func (*SubnetworkSecondaryRange) ProtoMessage() {} func (x *SubnetworkSecondaryRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1360] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134179,11 +131457,9 @@ type SubnetworksExpandIpCidrRangeRequest struct { func (x *SubnetworksExpandIpCidrRangeRequest) Reset() { *x = SubnetworksExpandIpCidrRangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1361] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1361] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworksExpandIpCidrRangeRequest) String() string { @@ -134194,7 +131470,7 @@ func (*SubnetworksExpandIpCidrRangeRequest) ProtoMessage() {} func (x *SubnetworksExpandIpCidrRangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1361] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134229,11 +131505,9 @@ type SubnetworksScopedList struct { func (x *SubnetworksScopedList) Reset() { *x = SubnetworksScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1362] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1362] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworksScopedList) String() string { @@ -134244,7 +131518,7 @@ func (*SubnetworksScopedList) ProtoMessage() {} func (x *SubnetworksScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1362] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134283,11 +131557,9 @@ type SubnetworksSetPrivateIpGoogleAccessRequest struct { func (x *SubnetworksSetPrivateIpGoogleAccessRequest) Reset() { *x = SubnetworksSetPrivateIpGoogleAccessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1363] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1363] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetworksSetPrivateIpGoogleAccessRequest) String() string { @@ -134298,7 +131570,7 @@ func (*SubnetworksSetPrivateIpGoogleAccessRequest) ProtoMessage() {} func (x *SubnetworksSetPrivateIpGoogleAccessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1363] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134332,11 +131604,9 @@ type Subsetting struct { func (x *Subsetting) Reset() { *x = Subsetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1364] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1364] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subsetting) String() string { @@ -134347,7 +131617,7 @@ func (*Subsetting) ProtoMessage() {} func (x *Subsetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1364] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134389,11 +131659,9 @@ type SuspendInstanceRequest struct { func (x *SuspendInstanceRequest) Reset() { *x = SuspendInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1365] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1365] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuspendInstanceRequest) String() string { @@ -134404,7 +131672,7 @@ func (*SuspendInstanceRequest) ProtoMessage() {} func (x *SuspendInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1365] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134474,11 +131742,9 @@ type SuspendInstancesInstanceGroupManagerRequest struct { func (x *SuspendInstancesInstanceGroupManagerRequest) Reset() { *x = SuspendInstancesInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1366] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1366] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuspendInstancesInstanceGroupManagerRequest) String() string { @@ -134489,7 +131755,7 @@ func (*SuspendInstancesInstanceGroupManagerRequest) ProtoMessage() {} func (x *SuspendInstancesInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1366] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134559,11 +131825,9 @@ type SuspendInstancesRegionInstanceGroupManagerRequest struct { func (x *SuspendInstancesRegionInstanceGroupManagerRequest) Reset() { *x = SuspendInstancesRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1367] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1367] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuspendInstancesRegionInstanceGroupManagerRequest) String() string { @@ -134574,7 +131838,7 @@ func (*SuspendInstancesRegionInstanceGroupManagerRequest) ProtoMessage() {} func (x *SuspendInstancesRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1367] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134640,11 +131904,9 @@ type SwitchToCustomModeNetworkRequest struct { func (x *SwitchToCustomModeNetworkRequest) Reset() { *x = SwitchToCustomModeNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1368] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1368] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchToCustomModeNetworkRequest) String() string { @@ -134655,7 +131917,7 @@ func (*SwitchToCustomModeNetworkRequest) ProtoMessage() {} func (x *SwitchToCustomModeNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1368] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134714,11 +131976,9 @@ type TCPHealthCheck struct { func (x *TCPHealthCheck) Reset() { *x = TCPHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1369] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1369] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TCPHealthCheck) String() string { @@ -134729,7 +131989,7 @@ func (*TCPHealthCheck) ProtoMessage() {} func (x *TCPHealthCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1369] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134800,11 +132060,9 @@ type Tags struct { func (x *Tags) Reset() { *x = Tags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1370] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1370] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tags) String() string { @@ -134815,7 +132073,7 @@ func (*Tags) ProtoMessage() {} func (x *Tags) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1370] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134874,11 +132132,9 @@ type TargetGrpcProxy struct { func (x *TargetGrpcProxy) Reset() { *x = TargetGrpcProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1371] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1371] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetGrpcProxy) String() string { @@ -134889,7 +132145,7 @@ func (*TargetGrpcProxy) ProtoMessage() {} func (x *TargetGrpcProxy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1371] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134995,11 +132251,9 @@ type TargetGrpcProxyList struct { func (x *TargetGrpcProxyList) Reset() { *x = TargetGrpcProxyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1372] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1372] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetGrpcProxyList) String() string { @@ -135010,7 +132264,7 @@ func (*TargetGrpcProxyList) ProtoMessage() {} func (x *TargetGrpcProxyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1372] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135080,11 +132334,9 @@ type TargetHttpProxiesScopedList struct { func (x *TargetHttpProxiesScopedList) Reset() { *x = TargetHttpProxiesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1373] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1373] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpProxiesScopedList) String() string { @@ -135095,7 +132347,7 @@ func (*TargetHttpProxiesScopedList) ProtoMessage() {} func (x *TargetHttpProxiesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1373] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135156,11 +132408,9 @@ type TargetHttpProxy struct { func (x *TargetHttpProxy) Reset() { *x = TargetHttpProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1374] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1374] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpProxy) String() string { @@ -135171,7 +132421,7 @@ func (*TargetHttpProxy) ProtoMessage() {} func (x *TargetHttpProxy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1374] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135284,11 +132534,9 @@ type TargetHttpProxyAggregatedList struct { func (x *TargetHttpProxyAggregatedList) Reset() { *x = TargetHttpProxyAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1375] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1375] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpProxyAggregatedList) String() string { @@ -135299,7 +132547,7 @@ func (*TargetHttpProxyAggregatedList) ProtoMessage() {} func (x *TargetHttpProxyAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1375] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135378,11 +132626,9 @@ type TargetHttpProxyList struct { func (x *TargetHttpProxyList) Reset() { *x = TargetHttpProxyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1376] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1376] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpProxyList) String() string { @@ -135393,7 +132639,7 @@ func (*TargetHttpProxyList) ProtoMessage() {} func (x *TargetHttpProxyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1376] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135463,11 +132709,9 @@ type TargetHttpsProxiesScopedList struct { func (x *TargetHttpsProxiesScopedList) Reset() { *x = TargetHttpsProxiesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1377] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1377] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxiesScopedList) String() string { @@ -135478,7 +132722,7 @@ func (*TargetHttpsProxiesScopedList) ProtoMessage() {} func (x *TargetHttpsProxiesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1377] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135518,11 +132762,9 @@ type TargetHttpsProxiesSetCertificateMapRequest struct { func (x *TargetHttpsProxiesSetCertificateMapRequest) Reset() { *x = TargetHttpsProxiesSetCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1378] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1378] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxiesSetCertificateMapRequest) String() string { @@ -135533,7 +132775,7 @@ func (*TargetHttpsProxiesSetCertificateMapRequest) ProtoMessage() {} func (x *TargetHttpsProxiesSetCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1378] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135567,11 +132809,9 @@ type TargetHttpsProxiesSetQuicOverrideRequest struct { func (x *TargetHttpsProxiesSetQuicOverrideRequest) Reset() { *x = TargetHttpsProxiesSetQuicOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1379] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1379] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxiesSetQuicOverrideRequest) String() string { @@ -135582,7 +132822,7 @@ func (*TargetHttpsProxiesSetQuicOverrideRequest) ProtoMessage() {} func (x *TargetHttpsProxiesSetQuicOverrideRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1379] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135615,11 +132855,9 @@ type TargetHttpsProxiesSetSslCertificatesRequest struct { func (x *TargetHttpsProxiesSetSslCertificatesRequest) Reset() { *x = TargetHttpsProxiesSetSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1380] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1380] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxiesSetSslCertificatesRequest) String() string { @@ -135630,7 +132868,7 @@ func (*TargetHttpsProxiesSetSslCertificatesRequest) ProtoMessage() {} func (x *TargetHttpsProxiesSetSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1380] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135701,11 +132939,9 @@ type TargetHttpsProxy struct { func (x *TargetHttpsProxy) Reset() { *x = TargetHttpsProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1381] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1381] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxy) String() string { @@ -135716,7 +132952,7 @@ func (*TargetHttpsProxy) ProtoMessage() {} func (x *TargetHttpsProxy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1381] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135880,11 +133116,9 @@ type TargetHttpsProxyAggregatedList struct { func (x *TargetHttpsProxyAggregatedList) Reset() { *x = TargetHttpsProxyAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1382] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1382] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxyAggregatedList) String() string { @@ -135895,7 +133129,7 @@ func (*TargetHttpsProxyAggregatedList) ProtoMessage() {} func (x *TargetHttpsProxyAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1382] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135981,11 +133215,9 @@ type TargetHttpsProxyList struct { func (x *TargetHttpsProxyList) Reset() { *x = TargetHttpsProxyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1383] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1383] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetHttpsProxyList) String() string { @@ -135996,7 +133228,7 @@ func (*TargetHttpsProxyList) ProtoMessage() {} func (x *TargetHttpsProxyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1383] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136086,11 +133318,9 @@ type TargetInstance struct { func (x *TargetInstance) Reset() { *x = TargetInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1384] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1384] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetInstance) String() string { @@ -136101,7 +133331,7 @@ func (*TargetInstance) ProtoMessage() {} func (x *TargetInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1384] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136216,11 +133446,9 @@ type TargetInstanceAggregatedList struct { func (x *TargetInstanceAggregatedList) Reset() { *x = TargetInstanceAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1385] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1385] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetInstanceAggregatedList) String() string { @@ -136231,7 +133459,7 @@ func (*TargetInstanceAggregatedList) ProtoMessage() {} func (x *TargetInstanceAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1385] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136317,11 +133545,9 @@ type TargetInstanceList struct { func (x *TargetInstanceList) Reset() { *x = TargetInstanceList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1386] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1386] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetInstanceList) String() string { @@ -136332,7 +133558,7 @@ func (*TargetInstanceList) ProtoMessage() {} func (x *TargetInstanceList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1386] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136402,11 +133628,9 @@ type TargetInstancesScopedList struct { func (x *TargetInstancesScopedList) Reset() { *x = TargetInstancesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1387] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1387] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetInstancesScopedList) String() string { @@ -136417,7 +133641,7 @@ func (*TargetInstancesScopedList) ProtoMessage() {} func (x *TargetInstancesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1387] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136483,11 +133707,9 @@ type TargetPool struct { func (x *TargetPool) Reset() { *x = TargetPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1388] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1388] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPool) String() string { @@ -136498,7 +133720,7 @@ func (*TargetPool) ProtoMessage() {} func (x *TargetPool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1388] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136627,11 +133849,9 @@ type TargetPoolAggregatedList struct { func (x *TargetPoolAggregatedList) Reset() { *x = TargetPoolAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1389] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1389] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolAggregatedList) String() string { @@ -136642,7 +133862,7 @@ func (*TargetPoolAggregatedList) ProtoMessage() {} func (x *TargetPoolAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1389] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136718,11 +133938,9 @@ type TargetPoolInstanceHealth struct { func (x *TargetPoolInstanceHealth) Reset() { *x = TargetPoolInstanceHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1390] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1390] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolInstanceHealth) String() string { @@ -136733,7 +133951,7 @@ func (*TargetPoolInstanceHealth) ProtoMessage() {} func (x *TargetPoolInstanceHealth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1390] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136784,11 +134002,9 @@ type TargetPoolList struct { func (x *TargetPoolList) Reset() { *x = TargetPoolList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1391] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1391] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolList) String() string { @@ -136799,7 +134015,7 @@ func (*TargetPoolList) ProtoMessage() {} func (x *TargetPoolList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1391] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136867,11 +134083,9 @@ type TargetPoolsAddHealthCheckRequest struct { func (x *TargetPoolsAddHealthCheckRequest) Reset() { *x = TargetPoolsAddHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1392] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1392] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolsAddHealthCheckRequest) String() string { @@ -136882,7 +134096,7 @@ func (*TargetPoolsAddHealthCheckRequest) ProtoMessage() {} func (x *TargetPoolsAddHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1392] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136915,11 +134129,9 @@ type TargetPoolsAddInstanceRequest struct { func (x *TargetPoolsAddInstanceRequest) Reset() { *x = TargetPoolsAddInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1393] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1393] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolsAddInstanceRequest) String() string { @@ -136930,7 +134142,7 @@ func (*TargetPoolsAddInstanceRequest) ProtoMessage() {} func (x *TargetPoolsAddInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1393] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136963,11 +134175,9 @@ type TargetPoolsRemoveHealthCheckRequest struct { func (x *TargetPoolsRemoveHealthCheckRequest) Reset() { *x = TargetPoolsRemoveHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1394] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1394] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolsRemoveHealthCheckRequest) String() string { @@ -136978,7 +134188,7 @@ func (*TargetPoolsRemoveHealthCheckRequest) ProtoMessage() {} func (x *TargetPoolsRemoveHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1394] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137011,11 +134221,9 @@ type TargetPoolsRemoveInstanceRequest struct { func (x *TargetPoolsRemoveInstanceRequest) Reset() { *x = TargetPoolsRemoveInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1395] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1395] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolsRemoveInstanceRequest) String() string { @@ -137026,7 +134234,7 @@ func (*TargetPoolsRemoveInstanceRequest) ProtoMessage() {} func (x *TargetPoolsRemoveInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1395] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137061,11 +134269,9 @@ type TargetPoolsScopedList struct { func (x *TargetPoolsScopedList) Reset() { *x = TargetPoolsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1396] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1396] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetPoolsScopedList) String() string { @@ -137076,7 +134282,7 @@ func (*TargetPoolsScopedList) ProtoMessage() {} func (x *TargetPoolsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1396] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137115,11 +134321,9 @@ type TargetReference struct { func (x *TargetReference) Reset() { *x = TargetReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1397] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1397] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetReference) String() string { @@ -137130,7 +134334,7 @@ func (*TargetReference) ProtoMessage() {} func (x *TargetReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1397] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137163,11 +134367,9 @@ type TargetSslProxiesSetBackendServiceRequest struct { func (x *TargetSslProxiesSetBackendServiceRequest) Reset() { *x = TargetSslProxiesSetBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1398] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1398] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxiesSetBackendServiceRequest) String() string { @@ -137178,7 +134380,7 @@ func (*TargetSslProxiesSetBackendServiceRequest) ProtoMessage() {} func (x *TargetSslProxiesSetBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1398] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137211,11 +134413,9 @@ type TargetSslProxiesSetCertificateMapRequest struct { func (x *TargetSslProxiesSetCertificateMapRequest) Reset() { *x = TargetSslProxiesSetCertificateMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1399] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1399] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxiesSetCertificateMapRequest) String() string { @@ -137226,7 +134426,7 @@ func (*TargetSslProxiesSetCertificateMapRequest) ProtoMessage() {} func (x *TargetSslProxiesSetCertificateMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1399] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137260,11 +134460,9 @@ type TargetSslProxiesSetProxyHeaderRequest struct { func (x *TargetSslProxiesSetProxyHeaderRequest) Reset() { *x = TargetSslProxiesSetProxyHeaderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1400] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1400] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxiesSetProxyHeaderRequest) String() string { @@ -137275,7 +134473,7 @@ func (*TargetSslProxiesSetProxyHeaderRequest) ProtoMessage() {} func (x *TargetSslProxiesSetProxyHeaderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1400] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137308,11 +134506,9 @@ type TargetSslProxiesSetSslCertificatesRequest struct { func (x *TargetSslProxiesSetSslCertificatesRequest) Reset() { *x = TargetSslProxiesSetSslCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1401] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1401] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxiesSetSslCertificatesRequest) String() string { @@ -137323,7 +134519,7 @@ func (*TargetSslProxiesSetSslCertificatesRequest) ProtoMessage() {} func (x *TargetSslProxiesSetSslCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1401] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137378,11 +134574,9 @@ type TargetSslProxy struct { func (x *TargetSslProxy) Reset() { *x = TargetSslProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1402] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1402] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxy) String() string { @@ -137393,7 +134587,7 @@ func (*TargetSslProxy) ProtoMessage() {} func (x *TargetSslProxy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1402] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137507,11 +134701,9 @@ type TargetSslProxyList struct { func (x *TargetSslProxyList) Reset() { *x = TargetSslProxyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1403] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1403] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSslProxyList) String() string { @@ -137522,7 +134714,7 @@ func (*TargetSslProxyList) ProtoMessage() {} func (x *TargetSslProxyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1403] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137592,11 +134784,9 @@ type TargetTcpProxiesScopedList struct { func (x *TargetTcpProxiesScopedList) Reset() { *x = TargetTcpProxiesScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1404] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1404] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxiesScopedList) String() string { @@ -137607,7 +134797,7 @@ func (*TargetTcpProxiesScopedList) ProtoMessage() {} func (x *TargetTcpProxiesScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1404] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137647,11 +134837,9 @@ type TargetTcpProxiesSetBackendServiceRequest struct { func (x *TargetTcpProxiesSetBackendServiceRequest) Reset() { *x = TargetTcpProxiesSetBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1405] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1405] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxiesSetBackendServiceRequest) String() string { @@ -137662,7 +134850,7 @@ func (*TargetTcpProxiesSetBackendServiceRequest) ProtoMessage() {} func (x *TargetTcpProxiesSetBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1405] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137696,11 +134884,9 @@ type TargetTcpProxiesSetProxyHeaderRequest struct { func (x *TargetTcpProxiesSetProxyHeaderRequest) Reset() { *x = TargetTcpProxiesSetProxyHeaderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1406] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1406] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxiesSetProxyHeaderRequest) String() string { @@ -137711,7 +134897,7 @@ func (*TargetTcpProxiesSetProxyHeaderRequest) ProtoMessage() {} func (x *TargetTcpProxiesSetProxyHeaderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1406] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137764,11 +134950,9 @@ type TargetTcpProxy struct { func (x *TargetTcpProxy) Reset() { *x = TargetTcpProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1407] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1407] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxy) String() string { @@ -137779,7 +134963,7 @@ func (*TargetTcpProxy) ProtoMessage() {} func (x *TargetTcpProxy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1407] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137887,11 +135071,9 @@ type TargetTcpProxyAggregatedList struct { func (x *TargetTcpProxyAggregatedList) Reset() { *x = TargetTcpProxyAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1408] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1408] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxyAggregatedList) String() string { @@ -137902,7 +135084,7 @@ func (*TargetTcpProxyAggregatedList) ProtoMessage() {} func (x *TargetTcpProxyAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1408] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137988,11 +135170,9 @@ type TargetTcpProxyList struct { func (x *TargetTcpProxyList) Reset() { *x = TargetTcpProxyList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1409] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1409] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetTcpProxyList) String() string { @@ -138003,7 +135183,7 @@ func (*TargetTcpProxyList) ProtoMessage() {} func (x *TargetTcpProxyList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1409] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138097,11 +135277,9 @@ type TargetVpnGateway struct { func (x *TargetVpnGateway) Reset() { *x = TargetVpnGateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1410] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1410] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetVpnGateway) String() string { @@ -138112,7 +135290,7 @@ func (*TargetVpnGateway) ProtoMessage() {} func (x *TargetVpnGateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1410] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138241,11 +135419,9 @@ type TargetVpnGatewayAggregatedList struct { func (x *TargetVpnGatewayAggregatedList) Reset() { *x = TargetVpnGatewayAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1411] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1411] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetVpnGatewayAggregatedList) String() string { @@ -138256,7 +135432,7 @@ func (*TargetVpnGatewayAggregatedList) ProtoMessage() {} func (x *TargetVpnGatewayAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1411] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138342,11 +135518,9 @@ type TargetVpnGatewayList struct { func (x *TargetVpnGatewayList) Reset() { *x = TargetVpnGatewayList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1412] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1412] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetVpnGatewayList) String() string { @@ -138357,7 +135531,7 @@ func (*TargetVpnGatewayList) ProtoMessage() {} func (x *TargetVpnGatewayList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1412] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138427,11 +135601,9 @@ type TargetVpnGatewaysScopedList struct { func (x *TargetVpnGatewaysScopedList) Reset() { *x = TargetVpnGatewaysScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1413] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1413] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetVpnGatewaysScopedList) String() string { @@ -138442,7 +135614,7 @@ func (*TargetVpnGatewaysScopedList) ProtoMessage() {} func (x *TargetVpnGatewaysScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1413] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138498,11 +135670,9 @@ type TestFailure struct { func (x *TestFailure) Reset() { *x = TestFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1414] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1414] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestFailure) String() string { @@ -138513,7 +135683,7 @@ func (*TestFailure) ProtoMessage() {} func (x *TestFailure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1414] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138607,11 +135777,9 @@ type TestIamPermissionsBackendBucketRequest struct { func (x *TestIamPermissionsBackendBucketRequest) Reset() { *x = TestIamPermissionsBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1415] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1415] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsBackendBucketRequest) String() string { @@ -138622,7 +135790,7 @@ func (*TestIamPermissionsBackendBucketRequest) ProtoMessage() {} func (x *TestIamPermissionsBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1415] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138674,11 +135842,9 @@ type TestIamPermissionsBackendServiceRequest struct { func (x *TestIamPermissionsBackendServiceRequest) Reset() { *x = TestIamPermissionsBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1416] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1416] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsBackendServiceRequest) String() string { @@ -138689,7 +135855,7 @@ func (*TestIamPermissionsBackendServiceRequest) ProtoMessage() {} func (x *TestIamPermissionsBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1416] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138743,11 +135909,9 @@ type TestIamPermissionsDiskRequest struct { func (x *TestIamPermissionsDiskRequest) Reset() { *x = TestIamPermissionsDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1417] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1417] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsDiskRequest) String() string { @@ -138758,7 +135922,7 @@ func (*TestIamPermissionsDiskRequest) ProtoMessage() {} func (x *TestIamPermissionsDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1417] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138817,11 +135981,9 @@ type TestIamPermissionsExternalVpnGatewayRequest struct { func (x *TestIamPermissionsExternalVpnGatewayRequest) Reset() { *x = TestIamPermissionsExternalVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1418] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1418] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsExternalVpnGatewayRequest) String() string { @@ -138832,7 +135994,7 @@ func (*TestIamPermissionsExternalVpnGatewayRequest) ProtoMessage() {} func (x *TestIamPermissionsExternalVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1418] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138882,11 +136044,9 @@ type TestIamPermissionsFirewallPolicyRequest struct { func (x *TestIamPermissionsFirewallPolicyRequest) Reset() { *x = TestIamPermissionsFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1419] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1419] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsFirewallPolicyRequest) String() string { @@ -138897,7 +136057,7 @@ func (*TestIamPermissionsFirewallPolicyRequest) ProtoMessage() {} func (x *TestIamPermissionsFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1419] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138942,11 +136102,9 @@ type TestIamPermissionsImageRequest struct { func (x *TestIamPermissionsImageRequest) Reset() { *x = TestIamPermissionsImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1420] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1420] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsImageRequest) String() string { @@ -138957,7 +136115,7 @@ func (*TestIamPermissionsImageRequest) ProtoMessage() {} func (x *TestIamPermissionsImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1420] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139011,11 +136169,9 @@ type TestIamPermissionsInstanceRequest struct { func (x *TestIamPermissionsInstanceRequest) Reset() { *x = TestIamPermissionsInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1421] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1421] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsInstanceRequest) String() string { @@ -139026,7 +136182,7 @@ func (*TestIamPermissionsInstanceRequest) ProtoMessage() {} func (x *TestIamPermissionsInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1421] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139085,11 +136241,9 @@ type TestIamPermissionsInstanceTemplateRequest struct { func (x *TestIamPermissionsInstanceTemplateRequest) Reset() { *x = TestIamPermissionsInstanceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1422] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1422] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsInstanceTemplateRequest) String() string { @@ -139100,7 +136254,7 @@ func (*TestIamPermissionsInstanceTemplateRequest) ProtoMessage() {} func (x *TestIamPermissionsInstanceTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1422] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139154,11 +136308,9 @@ type TestIamPermissionsInstantSnapshotRequest struct { func (x *TestIamPermissionsInstantSnapshotRequest) Reset() { *x = TestIamPermissionsInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1423] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1423] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsInstantSnapshotRequest) String() string { @@ -139169,7 +136321,7 @@ func (*TestIamPermissionsInstantSnapshotRequest) ProtoMessage() {} func (x *TestIamPermissionsInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1423] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139228,11 +136380,9 @@ type TestIamPermissionsLicenseCodeRequest struct { func (x *TestIamPermissionsLicenseCodeRequest) Reset() { *x = TestIamPermissionsLicenseCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1424] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1424] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsLicenseCodeRequest) String() string { @@ -139243,7 +136393,7 @@ func (*TestIamPermissionsLicenseCodeRequest) ProtoMessage() {} func (x *TestIamPermissionsLicenseCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1424] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139295,11 +136445,9 @@ type TestIamPermissionsLicenseRequest struct { func (x *TestIamPermissionsLicenseRequest) Reset() { *x = TestIamPermissionsLicenseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1425] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1425] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsLicenseRequest) String() string { @@ -139310,7 +136458,7 @@ func (*TestIamPermissionsLicenseRequest) ProtoMessage() {} func (x *TestIamPermissionsLicenseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1425] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139362,11 +136510,9 @@ type TestIamPermissionsMachineImageRequest struct { func (x *TestIamPermissionsMachineImageRequest) Reset() { *x = TestIamPermissionsMachineImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1426] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1426] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsMachineImageRequest) String() string { @@ -139377,7 +136523,7 @@ func (*TestIamPermissionsMachineImageRequest) ProtoMessage() {} func (x *TestIamPermissionsMachineImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1426] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139431,11 +136577,9 @@ type TestIamPermissionsNetworkAttachmentRequest struct { func (x *TestIamPermissionsNetworkAttachmentRequest) Reset() { *x = TestIamPermissionsNetworkAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1427] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1427] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsNetworkAttachmentRequest) String() string { @@ -139446,7 +136590,7 @@ func (*TestIamPermissionsNetworkAttachmentRequest) ProtoMessage() {} func (x *TestIamPermissionsNetworkAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1427] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139507,11 +136651,9 @@ type TestIamPermissionsNetworkEndpointGroupRequest struct { func (x *TestIamPermissionsNetworkEndpointGroupRequest) Reset() { *x = TestIamPermissionsNetworkEndpointGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1428] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1428] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsNetworkEndpointGroupRequest) String() string { @@ -139522,7 +136664,7 @@ func (*TestIamPermissionsNetworkEndpointGroupRequest) ProtoMessage() {} func (x *TestIamPermissionsNetworkEndpointGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1428] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139581,11 +136723,9 @@ type TestIamPermissionsNetworkFirewallPolicyRequest struct { func (x *TestIamPermissionsNetworkFirewallPolicyRequest) Reset() { *x = TestIamPermissionsNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1429] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1429] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsNetworkFirewallPolicyRequest) String() string { @@ -139596,7 +136736,7 @@ func (*TestIamPermissionsNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *TestIamPermissionsNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1429] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139650,11 +136790,9 @@ type TestIamPermissionsNodeGroupRequest struct { func (x *TestIamPermissionsNodeGroupRequest) Reset() { *x = TestIamPermissionsNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1430] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1430] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsNodeGroupRequest) String() string { @@ -139665,7 +136803,7 @@ func (*TestIamPermissionsNodeGroupRequest) ProtoMessage() {} func (x *TestIamPermissionsNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1430] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139726,11 +136864,9 @@ type TestIamPermissionsNodeTemplateRequest struct { func (x *TestIamPermissionsNodeTemplateRequest) Reset() { *x = TestIamPermissionsNodeTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1431] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1431] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsNodeTemplateRequest) String() string { @@ -139741,7 +136877,7 @@ func (*TestIamPermissionsNodeTemplateRequest) ProtoMessage() {} func (x *TestIamPermissionsNodeTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1431] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139802,11 +136938,9 @@ type TestIamPermissionsPacketMirroringRequest struct { func (x *TestIamPermissionsPacketMirroringRequest) Reset() { *x = TestIamPermissionsPacketMirroringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1432] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1432] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsPacketMirroringRequest) String() string { @@ -139817,7 +136951,7 @@ func (*TestIamPermissionsPacketMirroringRequest) ProtoMessage() {} func (x *TestIamPermissionsPacketMirroringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1432] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139878,11 +137012,9 @@ type TestIamPermissionsRegionBackendServiceRequest struct { func (x *TestIamPermissionsRegionBackendServiceRequest) Reset() { *x = TestIamPermissionsRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1433] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1433] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRegionBackendServiceRequest) String() string { @@ -139893,7 +137025,7 @@ func (*TestIamPermissionsRegionBackendServiceRequest) ProtoMessage() {} func (x *TestIamPermissionsRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1433] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139954,11 +137086,9 @@ type TestIamPermissionsRegionDiskRequest struct { func (x *TestIamPermissionsRegionDiskRequest) Reset() { *x = TestIamPermissionsRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1434] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1434] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRegionDiskRequest) String() string { @@ -139969,7 +137099,7 @@ func (*TestIamPermissionsRegionDiskRequest) ProtoMessage() {} func (x *TestIamPermissionsRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1434] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140030,11 +137160,9 @@ type TestIamPermissionsRegionInstantSnapshotRequest struct { func (x *TestIamPermissionsRegionInstantSnapshotRequest) Reset() { *x = TestIamPermissionsRegionInstantSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1435] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1435] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRegionInstantSnapshotRequest) String() string { @@ -140045,7 +137173,7 @@ func (*TestIamPermissionsRegionInstantSnapshotRequest) ProtoMessage() {} func (x *TestIamPermissionsRegionInstantSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1435] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140106,11 +137234,9 @@ type TestIamPermissionsRegionNetworkFirewallPolicyRequest struct { func (x *TestIamPermissionsRegionNetworkFirewallPolicyRequest) Reset() { *x = TestIamPermissionsRegionNetworkFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1436] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1436] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRegionNetworkFirewallPolicyRequest) String() string { @@ -140121,7 +137247,7 @@ func (*TestIamPermissionsRegionNetworkFirewallPolicyRequest) ProtoMessage() {} func (x *TestIamPermissionsRegionNetworkFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1436] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140182,11 +137308,9 @@ type TestIamPermissionsReservationRequest struct { func (x *TestIamPermissionsReservationRequest) Reset() { *x = TestIamPermissionsReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1437] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1437] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsReservationRequest) String() string { @@ -140197,7 +137321,7 @@ func (*TestIamPermissionsReservationRequest) ProtoMessage() {} func (x *TestIamPermissionsReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1437] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140258,11 +137382,9 @@ type TestIamPermissionsResourcePolicyRequest struct { func (x *TestIamPermissionsResourcePolicyRequest) Reset() { *x = TestIamPermissionsResourcePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1438] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1438] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsResourcePolicyRequest) String() string { @@ -140273,7 +137395,7 @@ func (*TestIamPermissionsResourcePolicyRequest) ProtoMessage() {} func (x *TestIamPermissionsResourcePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1438] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140334,11 +137456,9 @@ type TestIamPermissionsServiceAttachmentRequest struct { func (x *TestIamPermissionsServiceAttachmentRequest) Reset() { *x = TestIamPermissionsServiceAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1439] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1439] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsServiceAttachmentRequest) String() string { @@ -140349,7 +137469,7 @@ func (*TestIamPermissionsServiceAttachmentRequest) ProtoMessage() {} func (x *TestIamPermissionsServiceAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1439] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140408,11 +137528,9 @@ type TestIamPermissionsSnapshotRequest struct { func (x *TestIamPermissionsSnapshotRequest) Reset() { *x = TestIamPermissionsSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1440] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1440] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsSnapshotRequest) String() string { @@ -140423,7 +137541,7 @@ func (*TestIamPermissionsSnapshotRequest) ProtoMessage() {} func (x *TestIamPermissionsSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1440] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140477,11 +137595,9 @@ type TestIamPermissionsStoragePoolRequest struct { func (x *TestIamPermissionsStoragePoolRequest) Reset() { *x = TestIamPermissionsStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1441] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1441] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsStoragePoolRequest) String() string { @@ -140492,7 +137608,7 @@ func (*TestIamPermissionsStoragePoolRequest) ProtoMessage() {} func (x *TestIamPermissionsStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1441] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140553,11 +137669,9 @@ type TestIamPermissionsSubnetworkRequest struct { func (x *TestIamPermissionsSubnetworkRequest) Reset() { *x = TestIamPermissionsSubnetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1442] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1442] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsSubnetworkRequest) String() string { @@ -140568,7 +137682,7 @@ func (*TestIamPermissionsSubnetworkRequest) ProtoMessage() {} func (x *TestIamPermissionsSubnetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1442] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140629,11 +137743,9 @@ type TestIamPermissionsVpnGatewayRequest struct { func (x *TestIamPermissionsVpnGatewayRequest) Reset() { *x = TestIamPermissionsVpnGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1443] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1443] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsVpnGatewayRequest) String() string { @@ -140644,7 +137756,7 @@ func (*TestIamPermissionsVpnGatewayRequest) ProtoMessage() {} func (x *TestIamPermissionsVpnGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1443] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140698,11 +137810,9 @@ type TestPermissionsRequest struct { func (x *TestPermissionsRequest) Reset() { *x = TestPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1444] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1444] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestPermissionsRequest) String() string { @@ -140713,7 +137823,7 @@ func (*TestPermissionsRequest) ProtoMessage() {} func (x *TestPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1444] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140746,11 +137856,9 @@ type TestPermissionsResponse struct { func (x *TestPermissionsResponse) Reset() { *x = TestPermissionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1445] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1445] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestPermissionsResponse) String() string { @@ -140761,7 +137869,7 @@ func (*TestPermissionsResponse) ProtoMessage() {} func (x *TestPermissionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1445] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140794,11 +137902,9 @@ type Uint128 struct { func (x *Uint128) Reset() { *x = Uint128{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1446] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1446] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Uint128) String() string { @@ -140809,7 +137915,7 @@ func (*Uint128) ProtoMessage() {} func (x *Uint128) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1446] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140861,11 +137967,9 @@ type UpcomingMaintenance struct { func (x *UpcomingMaintenance) Reset() { *x = UpcomingMaintenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1447] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1447] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpcomingMaintenance) String() string { @@ -140876,7 +137980,7 @@ func (*UpcomingMaintenance) ProtoMessage() {} func (x *UpcomingMaintenance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1447] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140955,11 +138059,9 @@ type UpdateAccessConfigInstanceRequest struct { func (x *UpdateAccessConfigInstanceRequest) Reset() { *x = UpdateAccessConfigInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1448] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1448] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccessConfigInstanceRequest) String() string { @@ -140970,7 +138072,7 @@ func (*UpdateAccessConfigInstanceRequest) ProtoMessage() {} func (x *UpdateAccessConfigInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1448] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141047,11 +138149,9 @@ type UpdateAutoscalerRequest struct { func (x *UpdateAutoscalerRequest) Reset() { *x = UpdateAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1449] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1449] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAutoscalerRequest) String() string { @@ -141062,7 +138162,7 @@ func (*UpdateAutoscalerRequest) ProtoMessage() {} func (x *UpdateAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1449] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141130,11 +138230,9 @@ type UpdateBackendBucketRequest struct { func (x *UpdateBackendBucketRequest) Reset() { *x = UpdateBackendBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1450] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1450] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackendBucketRequest) String() string { @@ -141145,7 +138243,7 @@ func (*UpdateBackendBucketRequest) ProtoMessage() {} func (x *UpdateBackendBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1450] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141206,11 +138304,9 @@ type UpdateBackendServiceRequest struct { func (x *UpdateBackendServiceRequest) Reset() { *x = UpdateBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1451] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1451] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackendServiceRequest) String() string { @@ -141221,7 +138317,7 @@ func (*UpdateBackendServiceRequest) ProtoMessage() {} func (x *UpdateBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1451] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141287,11 +138383,9 @@ type UpdateDiskRequest struct { func (x *UpdateDiskRequest) Reset() { *x = UpdateDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1452] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1452] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDiskRequest) String() string { @@ -141302,7 +138396,7 @@ func (*UpdateDiskRequest) ProtoMessage() {} func (x *UpdateDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1452] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141386,11 +138480,9 @@ type UpdateDisplayDeviceInstanceRequest struct { func (x *UpdateDisplayDeviceInstanceRequest) Reset() { *x = UpdateDisplayDeviceInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1453] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1453] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDisplayDeviceInstanceRequest) String() string { @@ -141401,7 +138493,7 @@ func (*UpdateDisplayDeviceInstanceRequest) ProtoMessage() {} func (x *UpdateDisplayDeviceInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1453] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141469,11 +138561,9 @@ type UpdateFirewallRequest struct { func (x *UpdateFirewallRequest) Reset() { *x = UpdateFirewallRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1454] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1454] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFirewallRequest) String() string { @@ -141484,7 +138574,7 @@ func (*UpdateFirewallRequest) ProtoMessage() {} func (x *UpdateFirewallRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1454] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141545,11 +138635,9 @@ type UpdateHealthCheckRequest struct { func (x *UpdateHealthCheckRequest) Reset() { *x = UpdateHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1455] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1455] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHealthCheckRequest) String() string { @@ -141560,7 +138648,7 @@ func (*UpdateHealthCheckRequest) ProtoMessage() {} func (x *UpdateHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1455] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141629,11 +138717,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1456] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1456] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -141644,7 +138730,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1456] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141730,11 +138816,9 @@ type UpdateNetworkInterfaceInstanceRequest struct { func (x *UpdateNetworkInterfaceInstanceRequest) Reset() { *x = UpdateNetworkInterfaceInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1457] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1457] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNetworkInterfaceInstanceRequest) String() string { @@ -141745,7 +138829,7 @@ func (*UpdateNetworkInterfaceInstanceRequest) ProtoMessage() {} func (x *UpdateNetworkInterfaceInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1457] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141820,11 +138904,9 @@ type UpdatePeeringNetworkRequest struct { func (x *UpdatePeeringNetworkRequest) Reset() { *x = UpdatePeeringNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1458] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1458] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePeeringNetworkRequest) String() string { @@ -141835,7 +138917,7 @@ func (*UpdatePeeringNetworkRequest) ProtoMessage() {} func (x *UpdatePeeringNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1458] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141898,11 +138980,9 @@ type UpdatePerInstanceConfigsInstanceGroupManagerRequest struct { func (x *UpdatePerInstanceConfigsInstanceGroupManagerRequest) Reset() { *x = UpdatePerInstanceConfigsInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1459] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1459] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePerInstanceConfigsInstanceGroupManagerRequest) String() string { @@ -141913,7 +138993,7 @@ func (*UpdatePerInstanceConfigsInstanceGroupManagerRequest) ProtoMessage() {} func (x *UpdatePerInstanceConfigsInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1459] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141983,11 +139063,9 @@ type UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest struct { func (x *UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest) Reset() { *x = UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1460] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1460] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest) String() string { @@ -141998,7 +139076,7 @@ func (*UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoMessage() func (x *UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1460] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142068,11 +139146,9 @@ type UpdateRegionAutoscalerRequest struct { func (x *UpdateRegionAutoscalerRequest) Reset() { *x = UpdateRegionAutoscalerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1461] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1461] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionAutoscalerRequest) String() string { @@ -142083,7 +139159,7 @@ func (*UpdateRegionAutoscalerRequest) ProtoMessage() {} func (x *UpdateRegionAutoscalerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1461] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142153,11 +139229,9 @@ type UpdateRegionBackendServiceRequest struct { func (x *UpdateRegionBackendServiceRequest) Reset() { *x = UpdateRegionBackendServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1462] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1462] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionBackendServiceRequest) String() string { @@ -142168,7 +139242,7 @@ func (*UpdateRegionBackendServiceRequest) ProtoMessage() {} func (x *UpdateRegionBackendServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1462] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142241,11 +139315,9 @@ type UpdateRegionCommitmentRequest struct { func (x *UpdateRegionCommitmentRequest) Reset() { *x = UpdateRegionCommitmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1463] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1463] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionCommitmentRequest) String() string { @@ -142256,7 +139328,7 @@ func (*UpdateRegionCommitmentRequest) ProtoMessage() {} func (x *UpdateRegionCommitmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1463] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142343,11 +139415,9 @@ type UpdateRegionDiskRequest struct { func (x *UpdateRegionDiskRequest) Reset() { *x = UpdateRegionDiskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1464] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1464] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionDiskRequest) String() string { @@ -142358,7 +139428,7 @@ func (*UpdateRegionDiskRequest) ProtoMessage() {} func (x *UpdateRegionDiskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1464] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142442,11 +139512,9 @@ type UpdateRegionHealthCheckRequest struct { func (x *UpdateRegionHealthCheckRequest) Reset() { *x = UpdateRegionHealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1465] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1465] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionHealthCheckRequest) String() string { @@ -142457,7 +139525,7 @@ func (*UpdateRegionHealthCheckRequest) ProtoMessage() {} func (x *UpdateRegionHealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1465] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142527,11 +139595,9 @@ type UpdateRegionUrlMapRequest struct { func (x *UpdateRegionUrlMapRequest) Reset() { *x = UpdateRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1466] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1466] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionUrlMapRequest) String() string { @@ -142542,7 +139608,7 @@ func (*UpdateRegionUrlMapRequest) ProtoMessage() {} func (x *UpdateRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1466] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142615,11 +139681,9 @@ type UpdateReservationRequest struct { func (x *UpdateReservationRequest) Reset() { *x = UpdateReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1467] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1467] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReservationRequest) String() string { @@ -142630,7 +139694,7 @@ func (*UpdateReservationRequest) ProtoMessage() {} func (x *UpdateReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1467] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142714,11 +139778,9 @@ type UpdateRouterRequest struct { func (x *UpdateRouterRequest) Reset() { *x = UpdateRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1468] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1468] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRouterRequest) String() string { @@ -142729,7 +139791,7 @@ func (*UpdateRouterRequest) ProtoMessage() {} func (x *UpdateRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1468] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142799,11 +139861,9 @@ type UpdateShieldedInstanceConfigInstanceRequest struct { func (x *UpdateShieldedInstanceConfigInstanceRequest) Reset() { *x = UpdateShieldedInstanceConfigInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1469] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1469] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateShieldedInstanceConfigInstanceRequest) String() string { @@ -142814,7 +139874,7 @@ func (*UpdateShieldedInstanceConfigInstanceRequest) ProtoMessage() {} func (x *UpdateShieldedInstanceConfigInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1469] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142886,11 +139946,9 @@ type UpdateStoragePoolRequest struct { func (x *UpdateStoragePoolRequest) Reset() { *x = UpdateStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1470] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1470] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStoragePoolRequest) String() string { @@ -142901,7 +139959,7 @@ func (*UpdateStoragePoolRequest) ProtoMessage() {} func (x *UpdateStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1470] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142976,11 +140034,9 @@ type UpdateUrlMapRequest struct { func (x *UpdateUrlMapRequest) Reset() { *x = UpdateUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1471] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1471] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUrlMapRequest) String() string { @@ -142991,7 +140047,7 @@ func (*UpdateUrlMapRequest) ProtoMessage() {} func (x *UpdateUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1471] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143076,11 +140132,9 @@ type UrlMap struct { func (x *UrlMap) Reset() { *x = UrlMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1472] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1472] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMap) String() string { @@ -143091,7 +140145,7 @@ func (*UrlMap) ProtoMessage() {} func (x *UrlMap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1472] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143240,11 +140294,9 @@ type UrlMapList struct { func (x *UrlMapList) Reset() { *x = UrlMapList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1473] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1473] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapList) String() string { @@ -143255,7 +140307,7 @@ func (*UrlMapList) ProtoMessage() {} func (x *UrlMapList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1473] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143322,11 +140374,9 @@ type UrlMapReference struct { func (x *UrlMapReference) Reset() { *x = UrlMapReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1474] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1474] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapReference) String() string { @@ -143337,7 +140387,7 @@ func (*UrlMapReference) ProtoMessage() {} func (x *UrlMapReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1474] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143383,11 +140433,9 @@ type UrlMapTest struct { func (x *UrlMapTest) Reset() { *x = UrlMapTest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1475] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1475] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapTest) String() string { @@ -143398,7 +140446,7 @@ func (*UrlMapTest) ProtoMessage() {} func (x *UrlMapTest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1475] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143476,11 +140524,9 @@ type UrlMapTestHeader struct { func (x *UrlMapTestHeader) Reset() { *x = UrlMapTestHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1476] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1476] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapTestHeader) String() string { @@ -143491,7 +140537,7 @@ func (*UrlMapTestHeader) ProtoMessage() {} func (x *UrlMapTestHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1476] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143536,11 +140582,9 @@ type UrlMapValidationResult struct { func (x *UrlMapValidationResult) Reset() { *x = UrlMapValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1477] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1477] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapValidationResult) String() string { @@ -143551,7 +140595,7 @@ func (*UrlMapValidationResult) ProtoMessage() {} func (x *UrlMapValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1477] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143617,11 +140661,9 @@ type UrlMapsAggregatedList struct { func (x *UrlMapsAggregatedList) Reset() { *x = UrlMapsAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1478] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1478] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapsAggregatedList) String() string { @@ -143632,7 +140674,7 @@ func (*UrlMapsAggregatedList) ProtoMessage() {} func (x *UrlMapsAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1478] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143709,11 +140751,9 @@ type UrlMapsScopedList struct { func (x *UrlMapsScopedList) Reset() { *x = UrlMapsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1479] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1479] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapsScopedList) String() string { @@ -143724,7 +140764,7 @@ func (*UrlMapsScopedList) ProtoMessage() {} func (x *UrlMapsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1479] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143767,11 +140807,9 @@ type UrlMapsValidateRequest struct { func (x *UrlMapsValidateRequest) Reset() { *x = UrlMapsValidateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1480] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1480] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapsValidateRequest) String() string { @@ -143782,7 +140820,7 @@ func (*UrlMapsValidateRequest) ProtoMessage() {} func (x *UrlMapsValidateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1480] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143821,11 +140859,9 @@ type UrlMapsValidateResponse struct { func (x *UrlMapsValidateResponse) Reset() { *x = UrlMapsValidateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1481] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1481] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlMapsValidateResponse) String() string { @@ -143836,7 +140872,7 @@ func (*UrlMapsValidateResponse) ProtoMessage() {} func (x *UrlMapsValidateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1481] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143874,11 +140910,9 @@ type UrlRewrite struct { func (x *UrlRewrite) Reset() { *x = UrlRewrite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1482] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1482] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UrlRewrite) String() string { @@ -143889,7 +140923,7 @@ func (*UrlRewrite) ProtoMessage() {} func (x *UrlRewrite) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1482] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143959,11 +140993,9 @@ type UsableSubnetwork struct { func (x *UsableSubnetwork) Reset() { *x = UsableSubnetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1483] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1483] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsableSubnetwork) String() string { @@ -143974,7 +141006,7 @@ func (*UsableSubnetwork) ProtoMessage() {} func (x *UsableSubnetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1483] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144073,11 +141105,9 @@ type UsableSubnetworkSecondaryRange struct { func (x *UsableSubnetworkSecondaryRange) Reset() { *x = UsableSubnetworkSecondaryRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1484] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1484] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsableSubnetworkSecondaryRange) String() string { @@ -144088,7 +141118,7 @@ func (*UsableSubnetworkSecondaryRange) ProtoMessage() {} func (x *UsableSubnetworkSecondaryRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1484] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144138,11 +141168,9 @@ type UsableSubnetworksAggregatedList struct { func (x *UsableSubnetworksAggregatedList) Reset() { *x = UsableSubnetworksAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1485] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1485] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsableSubnetworksAggregatedList) String() string { @@ -144153,7 +141181,7 @@ func (*UsableSubnetworksAggregatedList) ProtoMessage() {} func (x *UsableSubnetworksAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1485] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144224,11 +141252,9 @@ type UsageExportLocation struct { func (x *UsageExportLocation) Reset() { *x = UsageExportLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1486] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1486] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageExportLocation) String() string { @@ -144239,7 +141265,7 @@ func (*UsageExportLocation) ProtoMessage() {} func (x *UsageExportLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1486] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144286,11 +141312,9 @@ type ValidateRegionUrlMapRequest struct { func (x *ValidateRegionUrlMapRequest) Reset() { *x = ValidateRegionUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1487] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1487] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateRegionUrlMapRequest) String() string { @@ -144301,7 +141325,7 @@ func (*ValidateRegionUrlMapRequest) ProtoMessage() {} func (x *ValidateRegionUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1487] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144360,11 +141384,9 @@ type ValidateUrlMapRequest struct { func (x *ValidateUrlMapRequest) Reset() { *x = ValidateUrlMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1488] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1488] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateUrlMapRequest) String() string { @@ -144375,7 +141397,7 @@ func (*ValidateUrlMapRequest) ProtoMessage() {} func (x *ValidateUrlMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1488] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144424,11 +141446,9 @@ type VmEndpointNatMappings struct { func (x *VmEndpointNatMappings) Reset() { *x = VmEndpointNatMappings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1489] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1489] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmEndpointNatMappings) String() string { @@ -144439,7 +141459,7 @@ func (*VmEndpointNatMappings) ProtoMessage() {} func (x *VmEndpointNatMappings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1489] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144492,11 +141512,9 @@ type VmEndpointNatMappingsInterfaceNatMappings struct { func (x *VmEndpointNatMappingsInterfaceNatMappings) Reset() { *x = VmEndpointNatMappingsInterfaceNatMappings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1490] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1490] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmEndpointNatMappingsInterfaceNatMappings) String() string { @@ -144507,7 +141525,7 @@ func (*VmEndpointNatMappingsInterfaceNatMappings) ProtoMessage() {} func (x *VmEndpointNatMappingsInterfaceNatMappings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1490] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144591,11 +141609,9 @@ type VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings struct { func (x *VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) Reset() { *x = VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1491] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1491] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) String() string { @@ -144606,7 +141622,7 @@ func (*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) ProtoMessage() func (x *VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1491] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144678,11 +141694,9 @@ type VmEndpointNatMappingsList struct { func (x *VmEndpointNatMappingsList) Reset() { *x = VmEndpointNatMappingsList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1492] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1492] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmEndpointNatMappingsList) String() string { @@ -144693,7 +141707,7 @@ func (*VmEndpointNatMappingsList) ProtoMessage() {} func (x *VmEndpointNatMappingsList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1492] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144788,11 +141802,9 @@ type VpnGateway struct { func (x *VpnGateway) Reset() { *x = VpnGateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1493] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1493] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGateway) String() string { @@ -144803,7 +141815,7 @@ func (*VpnGateway) ProtoMessage() {} func (x *VpnGateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1493] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144932,11 +141944,9 @@ type VpnGatewayAggregatedList struct { func (x *VpnGatewayAggregatedList) Reset() { *x = VpnGatewayAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1494] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1494] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayAggregatedList) String() string { @@ -144947,7 +141957,7 @@ func (*VpnGatewayAggregatedList) ProtoMessage() {} func (x *VpnGatewayAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1494] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145033,11 +142043,9 @@ type VpnGatewayList struct { func (x *VpnGatewayList) Reset() { *x = VpnGatewayList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1495] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1495] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayList) String() string { @@ -145048,7 +142056,7 @@ func (*VpnGatewayList) ProtoMessage() {} func (x *VpnGatewayList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1495] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145116,11 +142124,9 @@ type VpnGatewayStatus struct { func (x *VpnGatewayStatus) Reset() { *x = VpnGatewayStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1496] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1496] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayStatus) String() string { @@ -145131,7 +142137,7 @@ func (*VpnGatewayStatus) ProtoMessage() {} func (x *VpnGatewayStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1496] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145169,11 +142175,9 @@ type VpnGatewayStatusHighAvailabilityRequirementState struct { func (x *VpnGatewayStatusHighAvailabilityRequirementState) Reset() { *x = VpnGatewayStatusHighAvailabilityRequirementState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1497] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1497] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayStatusHighAvailabilityRequirementState) String() string { @@ -145184,7 +142188,7 @@ func (*VpnGatewayStatusHighAvailabilityRequirementState) ProtoMessage() {} func (x *VpnGatewayStatusHighAvailabilityRequirementState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1497] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145229,11 +142233,9 @@ type VpnGatewayStatusTunnel struct { func (x *VpnGatewayStatusTunnel) Reset() { *x = VpnGatewayStatusTunnel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1498] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1498] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayStatusTunnel) String() string { @@ -145244,7 +142246,7 @@ func (*VpnGatewayStatusTunnel) ProtoMessage() {} func (x *VpnGatewayStatusTunnel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1498] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145298,11 +142300,9 @@ type VpnGatewayStatusVpnConnection struct { func (x *VpnGatewayStatusVpnConnection) Reset() { *x = VpnGatewayStatusVpnConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1499] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1499] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayStatusVpnConnection) String() string { @@ -145313,7 +142313,7 @@ func (*VpnGatewayStatusVpnConnection) ProtoMessage() {} func (x *VpnGatewayStatusVpnConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1499] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145374,11 +142374,9 @@ type VpnGatewayVpnGatewayInterface struct { func (x *VpnGatewayVpnGatewayInterface) Reset() { *x = VpnGatewayVpnGatewayInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1500] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1500] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayVpnGatewayInterface) String() string { @@ -145389,7 +142387,7 @@ func (*VpnGatewayVpnGatewayInterface) ProtoMessage() {} func (x *VpnGatewayVpnGatewayInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1500] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145442,11 +142440,9 @@ type VpnGatewaysGetStatusResponse struct { func (x *VpnGatewaysGetStatusResponse) Reset() { *x = VpnGatewaysGetStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1501] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1501] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewaysGetStatusResponse) String() string { @@ -145457,7 +142453,7 @@ func (*VpnGatewaysGetStatusResponse) ProtoMessage() {} func (x *VpnGatewaysGetStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1501] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145492,11 +142488,9 @@ type VpnGatewaysScopedList struct { func (x *VpnGatewaysScopedList) Reset() { *x = VpnGatewaysScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1502] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1502] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewaysScopedList) String() string { @@ -145507,7 +142501,7 @@ func (*VpnGatewaysScopedList) ProtoMessage() {} func (x *VpnGatewaysScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1502] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145595,11 +142589,9 @@ type VpnTunnel struct { func (x *VpnTunnel) Reset() { *x = VpnTunnel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1503] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1503] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnTunnel) String() string { @@ -145610,7 +142602,7 @@ func (*VpnTunnel) ProtoMessage() {} func (x *VpnTunnel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1503] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145816,11 +142808,9 @@ type VpnTunnelAggregatedList struct { func (x *VpnTunnelAggregatedList) Reset() { *x = VpnTunnelAggregatedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1504] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1504] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnTunnelAggregatedList) String() string { @@ -145831,7 +142821,7 @@ func (*VpnTunnelAggregatedList) ProtoMessage() {} func (x *VpnTunnelAggregatedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1504] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145917,11 +142907,9 @@ type VpnTunnelList struct { func (x *VpnTunnelList) Reset() { *x = VpnTunnelList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1505] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1505] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnTunnelList) String() string { @@ -145932,7 +142920,7 @@ func (*VpnTunnelList) ProtoMessage() {} func (x *VpnTunnelList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1505] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146002,11 +142990,9 @@ type VpnTunnelsScopedList struct { func (x *VpnTunnelsScopedList) Reset() { *x = VpnTunnelsScopedList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1506] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1506] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnTunnelsScopedList) String() string { @@ -146017,7 +143003,7 @@ func (*VpnTunnelsScopedList) ProtoMessage() {} func (x *VpnTunnelsScopedList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1506] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146061,11 +143047,9 @@ type WafExpressionSet struct { func (x *WafExpressionSet) Reset() { *x = WafExpressionSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1507] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1507] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WafExpressionSet) String() string { @@ -146076,7 +143060,7 @@ func (*WafExpressionSet) ProtoMessage() {} func (x *WafExpressionSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1507] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146125,11 +143109,9 @@ type WafExpressionSetExpression struct { func (x *WafExpressionSetExpression) Reset() { *x = WafExpressionSetExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1508] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1508] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WafExpressionSetExpression) String() string { @@ -146140,7 +143122,7 @@ func (*WafExpressionSetExpression) ProtoMessage() {} func (x *WafExpressionSetExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1508] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146183,11 +143165,9 @@ type WaitGlobalOperationRequest struct { func (x *WaitGlobalOperationRequest) Reset() { *x = WaitGlobalOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1509] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1509] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WaitGlobalOperationRequest) String() string { @@ -146198,7 +143178,7 @@ func (*WaitGlobalOperationRequest) ProtoMessage() {} func (x *WaitGlobalOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1509] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146243,11 +143223,9 @@ type WaitRegionOperationRequest struct { func (x *WaitRegionOperationRequest) Reset() { *x = WaitRegionOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1510] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1510] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WaitRegionOperationRequest) String() string { @@ -146258,7 +143236,7 @@ func (*WaitRegionOperationRequest) ProtoMessage() {} func (x *WaitRegionOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1510] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146310,11 +143288,9 @@ type WaitZoneOperationRequest struct { func (x *WaitZoneOperationRequest) Reset() { *x = WaitZoneOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1511] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1511] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WaitZoneOperationRequest) String() string { @@ -146325,7 +143301,7 @@ func (*WaitZoneOperationRequest) ProtoMessage() {} func (x *WaitZoneOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1511] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146378,11 +143354,9 @@ type Warning struct { func (x *Warning) Reset() { *x = Warning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1512] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1512] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Warning) String() string { @@ -146393,7 +143367,7 @@ func (*Warning) ProtoMessage() {} func (x *Warning) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1512] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146445,11 +143419,9 @@ type Warnings struct { func (x *Warnings) Reset() { *x = Warnings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1513] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1513] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Warnings) String() string { @@ -146460,7 +143432,7 @@ func (*Warnings) ProtoMessage() {} func (x *Warnings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1513] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146512,11 +143484,9 @@ type WeightedBackendService struct { func (x *WeightedBackendService) Reset() { *x = WeightedBackendService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1514] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1514] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeightedBackendService) String() string { @@ -146527,7 +143497,7 @@ func (*WeightedBackendService) ProtoMessage() {} func (x *WeightedBackendService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1514] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146579,11 +143549,9 @@ type WithdrawPublicAdvertisedPrefixeRequest struct { func (x *WithdrawPublicAdvertisedPrefixeRequest) Reset() { *x = WithdrawPublicAdvertisedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1515] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1515] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawPublicAdvertisedPrefixeRequest) String() string { @@ -146594,7 +143562,7 @@ func (*WithdrawPublicAdvertisedPrefixeRequest) ProtoMessage() {} func (x *WithdrawPublicAdvertisedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1515] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146648,11 +143616,9 @@ type WithdrawPublicDelegatedPrefixeRequest struct { func (x *WithdrawPublicDelegatedPrefixeRequest) Reset() { *x = WithdrawPublicDelegatedPrefixeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1516] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1516] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawPublicDelegatedPrefixeRequest) String() string { @@ -146663,7 +143629,7 @@ func (*WithdrawPublicDelegatedPrefixeRequest) ProtoMessage() {} func (x *WithdrawPublicDelegatedPrefixeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1516] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146727,11 +143693,9 @@ type XpnHostList struct { func (x *XpnHostList) Reset() { *x = XpnHostList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1517] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1517] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XpnHostList) String() string { @@ -146742,7 +143706,7 @@ func (*XpnHostList) ProtoMessage() {} func (x *XpnHostList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1517] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146814,11 +143778,9 @@ type XpnResourceId struct { func (x *XpnResourceId) Reset() { *x = XpnResourceId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1518] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1518] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XpnResourceId) String() string { @@ -146829,7 +143791,7 @@ func (*XpnResourceId) ProtoMessage() {} func (x *XpnResourceId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1518] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146891,11 +143853,9 @@ type Zone struct { func (x *Zone) Reset() { *x = Zone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1519] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1519] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone) String() string { @@ -146906,7 +143866,7 @@ func (*Zone) ProtoMessage() {} func (x *Zone) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1519] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147020,11 +143980,9 @@ type ZoneList struct { func (x *ZoneList) Reset() { *x = ZoneList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1520] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1520] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneList) String() string { @@ -147035,7 +143993,7 @@ func (*ZoneList) ProtoMessage() {} func (x *ZoneList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1520] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147105,11 +144063,9 @@ type ZoneSetLabelsRequest struct { func (x *ZoneSetLabelsRequest) Reset() { *x = ZoneSetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1521] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1521] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneSetLabelsRequest) String() string { @@ -147120,7 +144076,7 @@ func (*ZoneSetLabelsRequest) ProtoMessage() {} func (x *ZoneSetLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1521] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147164,11 +144120,9 @@ type ZoneSetPolicyRequest struct { func (x *ZoneSetPolicyRequest) Reset() { *x = ZoneSetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1522] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1522] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneSetPolicyRequest) String() string { @@ -147179,7 +144133,7 @@ func (*ZoneSetPolicyRequest) ProtoMessage() {} func (x *ZoneSetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_compute_v1_compute_proto_msgTypes[1522] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200858,18284 +197812,6 @@ func file_google_cloud_compute_v1_compute_proto_init() { if File_google_cloud_compute_v1_compute_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_compute_v1_compute_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AWSV4Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AbandonInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AbandonInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorTypeAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorTypesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Accelerators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddAccessConfigInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AddAssociationFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AddAssociationNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddAssociationRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AddHealthCheckTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AddInstanceTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AddInstancesInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AddNodesNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AddPeeringNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AddResourcePoliciesDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AddResourcePoliciesInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AddResourcePoliciesRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AddRuleFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AddRuleNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AddRuleRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AddRuleRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AddRuleSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AddSignedUrlKeyBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AddSignedUrlKeyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AddressAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AddressList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AddressesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedMachineFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListAcceleratorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListAutoscalersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListBackendServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListDiskTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListDisksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListForwardingRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListGlobalOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListHealthChecksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInstanceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInstanceTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInstantSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListInterconnectAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListMachineTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNetworkAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNetworkEdgeSecurityServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNodeGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNodeTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListNodeTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListPacketMirroringsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListPublicDelegatedPrefixesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListRegionCommitmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListReservationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListRoutersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListSecurityPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListServiceAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListSslPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListStoragePoolTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListStoragePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListSubnetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetHttpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetHttpsProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetTcpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListTargetVpnGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListUrlMapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListVpnGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedListVpnTunnelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*AliasIpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*AllocationAggregateReservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*AllocationAggregateReservationReservedResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*AllocationAggregateReservationReservedResourceInfoAccelerator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*AllocationResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*AllocationResourceStatusSpecificSKUAllocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*AllocationSpecificSKUAllocationReservedInstanceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*AllocationSpecificSKUReservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*Allowed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*AnnouncePublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*AnnouncePublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*ApplyUpdatesToInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*AttachDiskInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*AttachNetworkEndpointsNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*AttachNetworkEndpointsRegionNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*AttachedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*AttachedDiskInitializeParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*AuditConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*AuditLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*Autoscaler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalerAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalerList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalerStatusDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalersScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicyCpuUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicyCustomMetricUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicyLoadBalancingUtilization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicyScaleInControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicyScalingSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*Backend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketCdnPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketCdnPolicyBypassCacheOnRequestHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketCdnPolicyCacheKeyPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketCdnPolicyNegativeCachingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*BackendBucketUsedBy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*BackendService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceCdnPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceCdnPolicyBypassCacheOnRequestHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceCdnPolicyNegativeCachingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceConnectionTrackingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceFailoverPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceGroupHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceHttpCookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceIAP); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceListUsable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceLocalityLoadBalancingPolicyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceLocalityLoadBalancingPolicyConfigPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*BackendServiceUsedBy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*BackendServicesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*BfdPacket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*BfdStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*BfdStatusPacketCounts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*Binding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertDiskResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertInstanceResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertInstanceResourcePerInstanceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertOperationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*BulkInsertRegionInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*CacheInvalidationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*CacheKeyPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*CancelInstanceGroupManagerResizeRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*CircuitBreakers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*CloneRulesFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*CloneRulesNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*CloneRulesRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*Commitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*CommitmentAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*CommitmentList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[160].Exporter = func(v any, i int) any { - switch v := v.(*CommitmentResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*CommitmentsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[162].Exporter = func(v any, i int) any { - switch v := v.(*ConfidentialInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[163].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionDraining); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*ConsistentHashLoadBalancerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*ConsistentHashLoadBalancerSettingsHttpCookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*CorsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[169].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnapshotDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[170].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnapshotRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*CustomErrorResponsePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*CustomErrorResponsePolicyCustomErrorResponseRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*CustomerEncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*CustomerEncryptionKeyProtectedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[176].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccessConfigInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[177].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[178].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[179].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[180].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExternalVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[183].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[184].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFirewallRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[185].Exporter = func(v any, i int) any { - switch v := v.(*DeleteForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[186].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[187].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[188].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[189].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[190].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[191].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalOrganizationOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[192].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalOrganizationOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[193].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlobalPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[194].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[195].Exporter = func(v any, i int) any { - switch v := v.(*DeleteImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[196].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[197].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceGroupManagerResizeRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[198].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[199].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[200].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[201].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[202].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[203].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[204].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[205].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[206].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[207].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[208].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[209].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkEdgeSecurityServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[210].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[211].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[212].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[213].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[214].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[215].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodesNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[216].Exporter = func(v any, i int) any { - switch v := v.(*DeletePacketMirroringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[217].Exporter = func(v any, i int) any { - switch v := v.(*DeletePerInstanceConfigsInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[218].Exporter = func(v any, i int) any { - switch v := v.(*DeletePerInstanceConfigsRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[219].Exporter = func(v any, i int) any { - switch v := v.(*DeletePublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[220].Exporter = func(v any, i int) any { - switch v := v.(*DeletePublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[221].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[222].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[223].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[224].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[225].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionHealthCheckServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[226].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[227].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[228].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[229].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[230].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[231].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionNotificationEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[232].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[233].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[234].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[235].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[236].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[237].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[238].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[239].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[240].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[241].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[242].Exporter = func(v any, i int) any { - switch v := v.(*DeleteResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[243].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[244].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[245].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[246].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[247].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSignedUrlKeyBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[248].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSignedUrlKeyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[249].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[250].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[251].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[252].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[253].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[254].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetGrpcProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[255].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[256].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[257].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[258].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[259].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[260].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[261].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[262].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[263].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[264].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVpnTunnelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[265].Exporter = func(v any, i int) any { - switch v := v.(*DeleteZoneOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[266].Exporter = func(v any, i int) any { - switch v := v.(*DeleteZoneOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[267].Exporter = func(v any, i int) any { - switch v := v.(*Denied); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[268].Exporter = func(v any, i int) any { - switch v := v.(*DeprecateImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[269].Exporter = func(v any, i int) any { - switch v := v.(*DeprecationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[270].Exporter = func(v any, i int) any { - switch v := v.(*DetachDiskInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[271].Exporter = func(v any, i int) any { - switch v := v.(*DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[272].Exporter = func(v any, i int) any { - switch v := v.(*DetachNetworkEndpointsNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[273].Exporter = func(v any, i int) any { - switch v := v.(*DetachNetworkEndpointsRegionNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[274].Exporter = func(v any, i int) any { - switch v := v.(*DisableXpnHostProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[275].Exporter = func(v any, i int) any { - switch v := v.(*DisableXpnResourceProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[276].Exporter = func(v any, i int) any { - switch v := v.(*Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[277].Exporter = func(v any, i int) any { - switch v := v.(*DiskAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[278].Exporter = func(v any, i int) any { - switch v := v.(*DiskAsyncReplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[279].Exporter = func(v any, i int) any { - switch v := v.(*DiskAsyncReplicationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[280].Exporter = func(v any, i int) any { - switch v := v.(*DiskInstantiationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[281].Exporter = func(v any, i int) any { - switch v := v.(*DiskList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[282].Exporter = func(v any, i int) any { - switch v := v.(*DiskMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[283].Exporter = func(v any, i int) any { - switch v := v.(*DiskParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[284].Exporter = func(v any, i int) any { - switch v := v.(*DiskResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[285].Exporter = func(v any, i int) any { - switch v := v.(*DiskResourceStatusAsyncReplicationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[286].Exporter = func(v any, i int) any { - switch v := v.(*DiskType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[287].Exporter = func(v any, i int) any { - switch v := v.(*DiskTypeAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[288].Exporter = func(v any, i int) any { - switch v := v.(*DiskTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[289].Exporter = func(v any, i int) any { - switch v := v.(*DiskTypesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[290].Exporter = func(v any, i int) any { - switch v := v.(*DisksAddResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[291].Exporter = func(v any, i int) any { - switch v := v.(*DisksRemoveResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[292].Exporter = func(v any, i int) any { - switch v := v.(*DisksResizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[293].Exporter = func(v any, i int) any { - switch v := v.(*DisksScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[294].Exporter = func(v any, i int) any { - switch v := v.(*DisksStartAsyncReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[295].Exporter = func(v any, i int) any { - switch v := v.(*DisksStopGroupAsyncReplicationResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[296].Exporter = func(v any, i int) any { - switch v := v.(*DisplayDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[297].Exporter = func(v any, i int) any { - switch v := v.(*DistributionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[298].Exporter = func(v any, i int) any { - switch v := v.(*DistributionPolicyZoneConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[299].Exporter = func(v any, i int) any { - switch v := v.(*Duration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[300].Exporter = func(v any, i int) any { - switch v := v.(*EnableXpnHostProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[301].Exporter = func(v any, i int) any { - switch v := v.(*EnableXpnResourceProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[302].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[303].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[304].Exporter = func(v any, i int) any { - switch v := v.(*ErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[305].Exporter = func(v any, i int) any { - switch v := v.(*Errors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[306].Exporter = func(v any, i int) any { - switch v := v.(*ExchangedPeeringRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[307].Exporter = func(v any, i int) any { - switch v := v.(*ExchangedPeeringRoutesList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[308].Exporter = func(v any, i int) any { - switch v := v.(*ExpandIpCidrRangeSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[309].Exporter = func(v any, i int) any { - switch v := v.(*Expr); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[310].Exporter = func(v any, i int) any { - switch v := v.(*ExternalVpnGateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[311].Exporter = func(v any, i int) any { - switch v := v.(*ExternalVpnGatewayInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[312].Exporter = func(v any, i int) any { - switch v := v.(*ExternalVpnGatewayList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[313].Exporter = func(v any, i int) any { - switch v := v.(*FileContentBuffer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[314].Exporter = func(v any, i int) any { - switch v := v.(*Firewall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[315].Exporter = func(v any, i int) any { - switch v := v.(*FirewallList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[316].Exporter = func(v any, i int) any { - switch v := v.(*FirewallLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[317].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPoliciesListAssociationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[318].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[319].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyAssociation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[320].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[321].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[322].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyRuleMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[323].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyRuleMatcherLayer4Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[324].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyRuleSecureTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[325].Exporter = func(v any, i int) any { - switch v := v.(*FixedOrPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[326].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[327].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRuleAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[328].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRuleList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[329].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRuleReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[330].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRuleServiceDirectoryRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[331].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRulesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[332].Exporter = func(v any, i int) any { - switch v := v.(*GRPCHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[333].Exporter = func(v any, i int) any { - switch v := v.(*GetAcceleratorTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[334].Exporter = func(v any, i int) any { - switch v := v.(*GetAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[335].Exporter = func(v any, i int) any { - switch v := v.(*GetAssociationFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[336].Exporter = func(v any, i int) any { - switch v := v.(*GetAssociationNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[337].Exporter = func(v any, i int) any { - switch v := v.(*GetAssociationRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[338].Exporter = func(v any, i int) any { - switch v := v.(*GetAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[339].Exporter = func(v any, i int) any { - switch v := v.(*GetBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[340].Exporter = func(v any, i int) any { - switch v := v.(*GetBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[341].Exporter = func(v any, i int) any { - switch v := v.(*GetDiagnosticsInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[342].Exporter = func(v any, i int) any { - switch v := v.(*GetDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[343].Exporter = func(v any, i int) any { - switch v := v.(*GetDiskTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[344].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveFirewallsInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[345].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveFirewallsNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[346].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[347].Exporter = func(v any, i int) any { - switch v := v.(*GetExternalVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[348].Exporter = func(v any, i int) any { - switch v := v.(*GetFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[349].Exporter = func(v any, i int) any { - switch v := v.(*GetFirewallRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[350].Exporter = func(v any, i int) any { - switch v := v.(*GetForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[351].Exporter = func(v any, i int) any { - switch v := v.(*GetFromFamilyImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[352].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[353].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[354].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[355].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[356].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalOrganizationOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[357].Exporter = func(v any, i int) any { - switch v := v.(*GetGlobalPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[358].Exporter = func(v any, i int) any { - switch v := v.(*GetGuestAttributesInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[359].Exporter = func(v any, i int) any { - switch v := v.(*GetHealthBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[360].Exporter = func(v any, i int) any { - switch v := v.(*GetHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[361].Exporter = func(v any, i int) any { - switch v := v.(*GetHealthRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[362].Exporter = func(v any, i int) any { - switch v := v.(*GetHealthTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[363].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[364].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[365].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[366].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[367].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[368].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[369].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[370].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[371].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[372].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[373].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[374].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[375].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[376].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[377].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[378].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[379].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[380].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[381].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[382].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[383].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[384].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicySnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[385].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[386].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicySubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[387].Exporter = func(v any, i int) any { - switch v := v.(*GetImageFamilyViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[388].Exporter = func(v any, i int) any { - switch v := v.(*GetImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[389].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[390].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceGroupManagerResizeRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[391].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[392].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[393].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[394].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[395].Exporter = func(v any, i int) any { - switch v := v.(*GetInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[396].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[397].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectLocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[398].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectRemoteLocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[399].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[400].Exporter = func(v any, i int) any { - switch v := v.(*GetLicenseCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[401].Exporter = func(v any, i int) any { - switch v := v.(*GetLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[402].Exporter = func(v any, i int) any { - switch v := v.(*GetMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[403].Exporter = func(v any, i int) any { - switch v := v.(*GetMachineTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[404].Exporter = func(v any, i int) any { - switch v := v.(*GetMacsecConfigInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[405].Exporter = func(v any, i int) any { - switch v := v.(*GetNatIpInfoRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[406].Exporter = func(v any, i int) any { - switch v := v.(*GetNatMappingInfoRoutersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[407].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[408].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkEdgeSecurityServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[409].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[410].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[411].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[412].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[413].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[414].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[415].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[416].Exporter = func(v any, i int) any { - switch v := v.(*GetPacketMirroringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[417].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[418].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[419].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[420].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[421].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[422].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[423].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[424].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionDiskTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[425].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[426].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionHealthCheckServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[427].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[428].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[429].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[430].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[431].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[432].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[433].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionNotificationEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[434].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[435].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[436].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[437].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[438].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[439].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[440].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[441].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[442].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[443].Exporter = func(v any, i int) any { - switch v := v.(*GetReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[444].Exporter = func(v any, i int) any { - switch v := v.(*GetResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[445].Exporter = func(v any, i int) any { - switch v := v.(*GetRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[446].Exporter = func(v any, i int) any { - switch v := v.(*GetRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[447].Exporter = func(v any, i int) any { - switch v := v.(*GetRouterStatusRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[448].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[449].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[450].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[451].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[452].Exporter = func(v any, i int) any { - switch v := v.(*GetRuleSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[453].Exporter = func(v any, i int) any { - switch v := v.(*GetScreenshotInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[454].Exporter = func(v any, i int) any { - switch v := v.(*GetSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[455].Exporter = func(v any, i int) any { - switch v := v.(*GetSerialPortOutputInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[456].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[457].Exporter = func(v any, i int) any { - switch v := v.(*GetShieldedInstanceIdentityInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[458].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[459].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[460].Exporter = func(v any, i int) any { - switch v := v.(*GetSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[461].Exporter = func(v any, i int) any { - switch v := v.(*GetSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[462].Exporter = func(v any, i int) any { - switch v := v.(*GetStatusVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[463].Exporter = func(v any, i int) any { - switch v := v.(*GetStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[464].Exporter = func(v any, i int) any { - switch v := v.(*GetStoragePoolTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[465].Exporter = func(v any, i int) any { - switch v := v.(*GetSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[466].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetGrpcProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[467].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[468].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[469].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[470].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[471].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[472].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[473].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[474].Exporter = func(v any, i int) any { - switch v := v.(*GetUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[475].Exporter = func(v any, i int) any { - switch v := v.(*GetVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[476].Exporter = func(v any, i int) any { - switch v := v.(*GetVpnTunnelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[477].Exporter = func(v any, i int) any { - switch v := v.(*GetXpnHostProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[478].Exporter = func(v any, i int) any { - switch v := v.(*GetXpnResourcesProjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[479].Exporter = func(v any, i int) any { - switch v := v.(*GetZoneOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[480].Exporter = func(v any, i int) any { - switch v := v.(*GetZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[481].Exporter = func(v any, i int) any { - switch v := v.(*GlobalAddressesMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[482].Exporter = func(v any, i int) any { - switch v := v.(*GlobalNetworkEndpointGroupsAttachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[483].Exporter = func(v any, i int) any { - switch v := v.(*GlobalNetworkEndpointGroupsDetachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[484].Exporter = func(v any, i int) any { - switch v := v.(*GlobalOrganizationSetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[485].Exporter = func(v any, i int) any { - switch v := v.(*GlobalSetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[486].Exporter = func(v any, i int) any { - switch v := v.(*GlobalSetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[487].Exporter = func(v any, i int) any { - switch v := v.(*GuestAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[488].Exporter = func(v any, i int) any { - switch v := v.(*GuestAttributesEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[489].Exporter = func(v any, i int) any { - switch v := v.(*GuestAttributesValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[490].Exporter = func(v any, i int) any { - switch v := v.(*GuestOsFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[491].Exporter = func(v any, i int) any { - switch v := v.(*HTTP2HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[492].Exporter = func(v any, i int) any { - switch v := v.(*HTTPHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[493].Exporter = func(v any, i int) any { - switch v := v.(*HTTPSHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[494].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[495].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[496].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[497].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[498].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[499].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckServiceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[500].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckServicesList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[501].Exporter = func(v any, i int) any { - switch v := v.(*HealthChecksAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[502].Exporter = func(v any, i int) any { - switch v := v.(*HealthChecksScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[503].Exporter = func(v any, i int) any { - switch v := v.(*HealthStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[504].Exporter = func(v any, i int) any { - switch v := v.(*HealthStatusForNetworkEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[505].Exporter = func(v any, i int) any { - switch v := v.(*Help); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[506].Exporter = func(v any, i int) any { - switch v := v.(*HelpLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[507].Exporter = func(v any, i int) any { - switch v := v.(*HostRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[508].Exporter = func(v any, i int) any { - switch v := v.(*HttpFaultAbort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[509].Exporter = func(v any, i int) any { - switch v := v.(*HttpFaultDelay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[510].Exporter = func(v any, i int) any { - switch v := v.(*HttpFaultInjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[511].Exporter = func(v any, i int) any { - switch v := v.(*HttpHeaderAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[512].Exporter = func(v any, i int) any { - switch v := v.(*HttpHeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[513].Exporter = func(v any, i int) any { - switch v := v.(*HttpHeaderOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[514].Exporter = func(v any, i int) any { - switch v := v.(*HttpQueryParameterMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[515].Exporter = func(v any, i int) any { - switch v := v.(*HttpRedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[516].Exporter = func(v any, i int) any { - switch v := v.(*HttpRetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[517].Exporter = func(v any, i int) any { - switch v := v.(*HttpRouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[518].Exporter = func(v any, i int) any { - switch v := v.(*HttpRouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[519].Exporter = func(v any, i int) any { - switch v := v.(*HttpRouteRuleMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[520].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[521].Exporter = func(v any, i int) any { - switch v := v.(*ImageFamilyView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[522].Exporter = func(v any, i int) any { - switch v := v.(*ImageList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[523].Exporter = func(v any, i int) any { - switch v := v.(*InitialStateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[524].Exporter = func(v any, i int) any { - switch v := v.(*InsertAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[525].Exporter = func(v any, i int) any { - switch v := v.(*InsertAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[526].Exporter = func(v any, i int) any { - switch v := v.(*InsertBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[527].Exporter = func(v any, i int) any { - switch v := v.(*InsertBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[528].Exporter = func(v any, i int) any { - switch v := v.(*InsertDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[529].Exporter = func(v any, i int) any { - switch v := v.(*InsertExternalVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[530].Exporter = func(v any, i int) any { - switch v := v.(*InsertFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[531].Exporter = func(v any, i int) any { - switch v := v.(*InsertFirewallRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[532].Exporter = func(v any, i int) any { - switch v := v.(*InsertForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[533].Exporter = func(v any, i int) any { - switch v := v.(*InsertGlobalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[534].Exporter = func(v any, i int) any { - switch v := v.(*InsertGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[535].Exporter = func(v any, i int) any { - switch v := v.(*InsertGlobalNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[536].Exporter = func(v any, i int) any { - switch v := v.(*InsertGlobalPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[537].Exporter = func(v any, i int) any { - switch v := v.(*InsertHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[538].Exporter = func(v any, i int) any { - switch v := v.(*InsertImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[539].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[540].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstanceGroupManagerResizeRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[541].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[542].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[543].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[544].Exporter = func(v any, i int) any { - switch v := v.(*InsertInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[545].Exporter = func(v any, i int) any { - switch v := v.(*InsertInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[546].Exporter = func(v any, i int) any { - switch v := v.(*InsertInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[547].Exporter = func(v any, i int) any { - switch v := v.(*InsertLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[548].Exporter = func(v any, i int) any { - switch v := v.(*InsertMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[549].Exporter = func(v any, i int) any { - switch v := v.(*InsertNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[550].Exporter = func(v any, i int) any { - switch v := v.(*InsertNetworkEdgeSecurityServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[551].Exporter = func(v any, i int) any { - switch v := v.(*InsertNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[552].Exporter = func(v any, i int) any { - switch v := v.(*InsertNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[553].Exporter = func(v any, i int) any { - switch v := v.(*InsertNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[554].Exporter = func(v any, i int) any { - switch v := v.(*InsertNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[555].Exporter = func(v any, i int) any { - switch v := v.(*InsertNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[556].Exporter = func(v any, i int) any { - switch v := v.(*InsertPacketMirroringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[557].Exporter = func(v any, i int) any { - switch v := v.(*InsertPublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[558].Exporter = func(v any, i int) any { - switch v := v.(*InsertPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[559].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[560].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[561].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[562].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[563].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[564].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionHealthCheckServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[565].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[566].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[567].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[568].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[569].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[570].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionNotificationEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[571].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[572].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[573].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[574].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[575].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[576].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[577].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[578].Exporter = func(v any, i int) any { - switch v := v.(*InsertReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[579].Exporter = func(v any, i int) any { - switch v := v.(*InsertResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[580].Exporter = func(v any, i int) any { - switch v := v.(*InsertRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[581].Exporter = func(v any, i int) any { - switch v := v.(*InsertRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[582].Exporter = func(v any, i int) any { - switch v := v.(*InsertSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[583].Exporter = func(v any, i int) any { - switch v := v.(*InsertServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[584].Exporter = func(v any, i int) any { - switch v := v.(*InsertSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[585].Exporter = func(v any, i int) any { - switch v := v.(*InsertSslCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[586].Exporter = func(v any, i int) any { - switch v := v.(*InsertSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[587].Exporter = func(v any, i int) any { - switch v := v.(*InsertStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[588].Exporter = func(v any, i int) any { - switch v := v.(*InsertSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[589].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetGrpcProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[590].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[591].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[592].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[593].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[594].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[595].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[596].Exporter = func(v any, i int) any { - switch v := v.(*InsertTargetVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[597].Exporter = func(v any, i int) any { - switch v := v.(*InsertUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[598].Exporter = func(v any, i int) any { - switch v := v.(*InsertVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[599].Exporter = func(v any, i int) any { - switch v := v.(*InsertVpnTunnelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[600].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[601].Exporter = func(v any, i int) any { - switch v := v.(*InstanceAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[602].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConsumptionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[603].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConsumptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[604].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[605].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[606].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[607].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManager); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[608].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerActionsSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[609].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[610].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerAllInstancesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[611].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerAutoHealingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[612].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerInstanceFlexibilityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[613].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[614].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerInstanceLifecyclePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[615].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[616].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerResizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[617].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerResizeRequestStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[618].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerResizeRequestStatusLastAttempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[619].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerResizeRequestsListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[620].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStandbyPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[621].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[622].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStatusAllInstancesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[623].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStatusStateful); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[624].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStatusStatefulPerInstanceConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[625].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerStatusVersionTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[626].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[627].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagerVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[628].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersAbandonInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[629].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersApplyUpdatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[630].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersCreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[631].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersDeleteInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[632].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersDeletePerInstanceConfigsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[633].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersListErrorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[634].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersListManagedInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[635].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersListPerInstanceConfigsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[636].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersPatchPerInstanceConfigsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[637].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersRecreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[638].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersResumeInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[639].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[640].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersSetInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[641].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersSetTargetPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[642].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersStartInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[643].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersStopInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[644].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersSuspendInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[645].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupManagersUpdatePerInstanceConfigsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[646].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsAddInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[647].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsListInstances); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[648].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[649].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsRemoveInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[650].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[651].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupsSetNamedPortsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[652].Exporter = func(v any, i int) any { - switch v := v.(*InstanceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[653].Exporter = func(v any, i int) any { - switch v := v.(*InstanceListReferrers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[654].Exporter = func(v any, i int) any { - switch v := v.(*InstanceManagedByIgmError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[655].Exporter = func(v any, i int) any { - switch v := v.(*InstanceManagedByIgmErrorInstanceActionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[656].Exporter = func(v any, i int) any { - switch v := v.(*InstanceManagedByIgmErrorManagedInstanceError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[657].Exporter = func(v any, i int) any { - switch v := v.(*InstanceMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[658].Exporter = func(v any, i int) any { - switch v := v.(*InstanceParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[659].Exporter = func(v any, i int) any { - switch v := v.(*InstanceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[660].Exporter = func(v any, i int) any { - switch v := v.(*InstancePropertiesPatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[661].Exporter = func(v any, i int) any { - switch v := v.(*InstanceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[662].Exporter = func(v any, i int) any { - switch v := v.(*InstanceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[663].Exporter = func(v any, i int) any { - switch v := v.(*InstanceSettingsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[664].Exporter = func(v any, i int) any { - switch v := v.(*InstanceTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[665].Exporter = func(v any, i int) any { - switch v := v.(*InstanceTemplateAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[666].Exporter = func(v any, i int) any { - switch v := v.(*InstanceTemplateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[667].Exporter = func(v any, i int) any { - switch v := v.(*InstanceTemplatesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[668].Exporter = func(v any, i int) any { - switch v := v.(*InstanceWithNamedPorts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[669].Exporter = func(v any, i int) any { - switch v := v.(*InstancesAddResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[670].Exporter = func(v any, i int) any { - switch v := v.(*InstancesBulkInsertOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[671].Exporter = func(v any, i int) any { - switch v := v.(*InstancesGetEffectiveFirewallsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[672].Exporter = func(v any, i int) any { - switch v := v.(*InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[673].Exporter = func(v any, i int) any { - switch v := v.(*InstancesRemoveResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[674].Exporter = func(v any, i int) any { - switch v := v.(*InstancesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[675].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[676].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetMachineResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[677].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetMachineTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[678].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetMinCpuPlatformRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[679].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetNameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[680].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[681].Exporter = func(v any, i int) any { - switch v := v.(*InstancesSetServiceAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[682].Exporter = func(v any, i int) any { - switch v := v.(*InstancesStartWithEncryptionKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[683].Exporter = func(v any, i int) any { - switch v := v.(*InstantSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[684].Exporter = func(v any, i int) any { - switch v := v.(*InstantSnapshotAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[685].Exporter = func(v any, i int) any { - switch v := v.(*InstantSnapshotList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[686].Exporter = func(v any, i int) any { - switch v := v.(*InstantSnapshotResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[687].Exporter = func(v any, i int) any { - switch v := v.(*InstantSnapshotsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[688].Exporter = func(v any, i int) any { - switch v := v.(*Int64RangeMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[689].Exporter = func(v any, i int) any { - switch v := v.(*Interconnect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[690].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[691].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[692].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentConfigurationConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[693].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[694].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[695].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentPartnerMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[696].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentPrivateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[697].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachmentsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[698].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectCircuitInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[699].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[700].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnosticsARPEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[701].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnosticsLinkLACPStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[702].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnosticsLinkOpticalPower); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[703].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnosticsLinkStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[704].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnosticsMacsecStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[705].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[706].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[707].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectLocationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[708].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectLocationRegionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[709].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectMacsec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[710].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectMacsecConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[711].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectMacsecConfigPreSharedKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[712].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectMacsecPreSharedKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[713].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectOutageNotification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[714].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectRemoteLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[715].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectRemoteLocationConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[716].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectRemoteLocationConstraintsSubnetLengthRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[717].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectRemoteLocationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[718].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectRemoteLocationPermittedConnections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[719].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectsGetDiagnosticsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[720].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectsGetMacsecConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[721].Exporter = func(v any, i int) any { - switch v := v.(*InvalidateCacheUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[722].Exporter = func(v any, i int) any { - switch v := v.(*Items); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[723].Exporter = func(v any, i int) any { - switch v := v.(*License); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[724].Exporter = func(v any, i int) any { - switch v := v.(*LicenseCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[725].Exporter = func(v any, i int) any { - switch v := v.(*LicenseCodeLicenseAlias); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[726].Exporter = func(v any, i int) any { - switch v := v.(*LicenseResourceCommitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[727].Exporter = func(v any, i int) any { - switch v := v.(*LicenseResourceRequirements); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[728].Exporter = func(v any, i int) any { - switch v := v.(*LicensesListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[729].Exporter = func(v any, i int) any { - switch v := v.(*ListAcceleratorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[730].Exporter = func(v any, i int) any { - switch v := v.(*ListAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[731].Exporter = func(v any, i int) any { - switch v := v.(*ListAssociationsFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[732].Exporter = func(v any, i int) any { - switch v := v.(*ListAutoscalersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[733].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableFeaturesRegionSslPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[734].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableFeaturesSslPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[735].Exporter = func(v any, i int) any { - switch v := v.(*ListBackendBucketsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[736].Exporter = func(v any, i int) any { - switch v := v.(*ListBackendServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[737].Exporter = func(v any, i int) any { - switch v := v.(*ListDiskTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[738].Exporter = func(v any, i int) any { - switch v := v.(*ListDisksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[739].Exporter = func(v any, i int) any { - switch v := v.(*ListDisksStoragePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[740].Exporter = func(v any, i int) any { - switch v := v.(*ListErrorsInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[741].Exporter = func(v any, i int) any { - switch v := v.(*ListErrorsRegionInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[742].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalVpnGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[743].Exporter = func(v any, i int) any { - switch v := v.(*ListFirewallPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[744].Exporter = func(v any, i int) any { - switch v := v.(*ListFirewallsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[745].Exporter = func(v any, i int) any { - switch v := v.(*ListForwardingRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[746].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[747].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalForwardingRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[748].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[749].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[750].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalOrganizationOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[751].Exporter = func(v any, i int) any { - switch v := v.(*ListGlobalPublicDelegatedPrefixesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[752].Exporter = func(v any, i int) any { - switch v := v.(*ListHealthChecksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[753].Exporter = func(v any, i int) any { - switch v := v.(*ListImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[754].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceGroupManagerResizeRequestsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[755].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[756].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[757].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[758].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesInstanceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[759].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRegionInstanceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[760].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[761].Exporter = func(v any, i int) any { - switch v := v.(*ListInstantSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[762].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[763].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectLocationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[764].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectRemoteLocationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[765].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[766].Exporter = func(v any, i int) any { - switch v := v.(*ListLicensesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[767].Exporter = func(v any, i int) any { - switch v := v.(*ListMachineImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[768].Exporter = func(v any, i int) any { - switch v := v.(*ListMachineTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[769].Exporter = func(v any, i int) any { - switch v := v.(*ListManagedInstancesInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[770].Exporter = func(v any, i int) any { - switch v := v.(*ListManagedInstancesRegionInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[771].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[772].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[773].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[774].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkEndpointsNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[775].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkEndpointsRegionNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[776].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkFirewallPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[777].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[778].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[779].Exporter = func(v any, i int) any { - switch v := v.(*ListNodeGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[780].Exporter = func(v any, i int) any { - switch v := v.(*ListNodeTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[781].Exporter = func(v any, i int) any { - switch v := v.(*ListNodeTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[782].Exporter = func(v any, i int) any { - switch v := v.(*ListNodesNodeGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[783].Exporter = func(v any, i int) any { - switch v := v.(*ListPacketMirroringsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[784].Exporter = func(v any, i int) any { - switch v := v.(*ListPeeringRoutesNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[785].Exporter = func(v any, i int) any { - switch v := v.(*ListPerInstanceConfigsInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[786].Exporter = func(v any, i int) any { - switch v := v.(*ListPerInstanceConfigsRegionInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[787].Exporter = func(v any, i int) any { - switch v := v.(*ListPreconfiguredExpressionSetsSecurityPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[788].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicAdvertisedPrefixesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[789].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicDelegatedPrefixesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[790].Exporter = func(v any, i int) any { - switch v := v.(*ListReferrersInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[791].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionAutoscalersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[792].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionBackendServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[793].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionCommitmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[794].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionDiskTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[795].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionDisksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[796].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionHealthCheckServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[797].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionHealthChecksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[798].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionInstanceGroupManagersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[799].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionInstanceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[800].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionInstanceTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[801].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionInstantSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[802].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionNetworkEndpointGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[803].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionNetworkFirewallPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[804].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionNotificationEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[805].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[806].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionSecurityPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[807].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[808].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionSslPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[809].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionTargetHttpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[810].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionTargetHttpsProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[811].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionTargetTcpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[812].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionUrlMapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[813].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionZonesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[814].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[815].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[816].Exporter = func(v any, i int) any { - switch v := v.(*ListResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[817].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[818].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[819].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[820].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[821].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[822].Exporter = func(v any, i int) any { - switch v := v.(*ListSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[823].Exporter = func(v any, i int) any { - switch v := v.(*ListSslPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[824].Exporter = func(v any, i int) any { - switch v := v.(*ListStoragePoolTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[825].Exporter = func(v any, i int) any { - switch v := v.(*ListStoragePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[826].Exporter = func(v any, i int) any { - switch v := v.(*ListSubnetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[827].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetGrpcProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[828].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetHttpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[829].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetHttpsProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[830].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[831].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[832].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSslProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[833].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetTcpProxiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[834].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetVpnGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[835].Exporter = func(v any, i int) any { - switch v := v.(*ListUrlMapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[836].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableBackendServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[837].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableRegionBackendServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[838].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableSubnetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[839].Exporter = func(v any, i int) any { - switch v := v.(*ListVpnGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[840].Exporter = func(v any, i int) any { - switch v := v.(*ListVpnTunnelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[841].Exporter = func(v any, i int) any { - switch v := v.(*ListXpnHostsProjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[842].Exporter = func(v any, i int) any { - switch v := v.(*ListZoneOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[843].Exporter = func(v any, i int) any { - switch v := v.(*ListZonesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[844].Exporter = func(v any, i int) any { - switch v := v.(*LocalDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[845].Exporter = func(v any, i int) any { - switch v := v.(*LocalizedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[846].Exporter = func(v any, i int) any { - switch v := v.(*LocationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[847].Exporter = func(v any, i int) any { - switch v := v.(*LocationPolicyLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[848].Exporter = func(v any, i int) any { - switch v := v.(*LocationPolicyLocationConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[849].Exporter = func(v any, i int) any { - switch v := v.(*MachineImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[850].Exporter = func(v any, i int) any { - switch v := v.(*MachineImageList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[851].Exporter = func(v any, i int) any { - switch v := v.(*MachineType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[852].Exporter = func(v any, i int) any { - switch v := v.(*MachineTypeAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[853].Exporter = func(v any, i int) any { - switch v := v.(*MachineTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[854].Exporter = func(v any, i int) any { - switch v := v.(*MachineTypesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[855].Exporter = func(v any, i int) any { - switch v := v.(*ManagedInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[856].Exporter = func(v any, i int) any { - switch v := v.(*ManagedInstanceInstanceHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[857].Exporter = func(v any, i int) any { - switch v := v.(*ManagedInstanceLastAttempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[858].Exporter = func(v any, i int) any { - switch v := v.(*ManagedInstancePropertiesFromFlexibilityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[859].Exporter = func(v any, i int) any { - switch v := v.(*ManagedInstanceVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[860].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[861].Exporter = func(v any, i int) any { - switch v := v.(*MetadataFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[862].Exporter = func(v any, i int) any { - switch v := v.(*MetadataFilterLabelMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[863].Exporter = func(v any, i int) any { - switch v := v.(*MoveAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[864].Exporter = func(v any, i int) any { - switch v := v.(*MoveDiskProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[865].Exporter = func(v any, i int) any { - switch v := v.(*MoveFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[866].Exporter = func(v any, i int) any { - switch v := v.(*MoveGlobalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[867].Exporter = func(v any, i int) any { - switch v := v.(*MoveInstanceProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[868].Exporter = func(v any, i int) any { - switch v := v.(*NamedPort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[869].Exporter = func(v any, i int) any { - switch v := v.(*NatIpInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[870].Exporter = func(v any, i int) any { - switch v := v.(*NatIpInfoNatIpInfoMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[871].Exporter = func(v any, i int) any { - switch v := v.(*NatIpInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[872].Exporter = func(v any, i int) any { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[873].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[874].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAttachmentAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[875].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAttachmentConnectedEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[876].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAttachmentList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[877].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAttachmentsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[878].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEdgeSecurityService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[879].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEdgeSecurityServiceAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[880].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEdgeSecurityServicesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[881].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[882].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[883].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[884].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupAppEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[885].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupCloudFunction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[886].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupCloudRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[887].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[888].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupPscData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[889].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupsAttachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[890].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupsDetachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[891].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupsListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[892].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupsListNetworkEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[893].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointGroupsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[894].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpointWithHealthStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[895].Exporter = func(v any, i int) any { - switch v := v.(*NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[896].Exporter = func(v any, i int) any { - switch v := v.(*NetworkList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[897].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPeering); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[898].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPerformanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[899].Exporter = func(v any, i int) any { - switch v := v.(*NetworkProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[900].Exporter = func(v any, i int) any { - switch v := v.(*NetworkProfileLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[901].Exporter = func(v any, i int) any { - switch v := v.(*NetworkProfileNetworkFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[902].Exporter = func(v any, i int) any { - switch v := v.(*NetworkProfilesListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[903].Exporter = func(v any, i int) any { - switch v := v.(*NetworkRoutingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[904].Exporter = func(v any, i int) any { - switch v := v.(*NetworksAddPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[905].Exporter = func(v any, i int) any { - switch v := v.(*NetworksGetEffectiveFirewallsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[906].Exporter = func(v any, i int) any { - switch v := v.(*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[907].Exporter = func(v any, i int) any { - switch v := v.(*NetworksRemovePeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[908].Exporter = func(v any, i int) any { - switch v := v.(*NetworksUpdatePeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[909].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[910].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[911].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupAutoscalingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[912].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[913].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[914].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[915].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsAddNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[916].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsDeleteNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[917].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsListNodes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[918].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsPerformMaintenanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[919].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[920].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsSetNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[921].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupsSimulateMaintenanceEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[922].Exporter = func(v any, i int) any { - switch v := v.(*NodeTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[923].Exporter = func(v any, i int) any { - switch v := v.(*NodeTemplateAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[924].Exporter = func(v any, i int) any { - switch v := v.(*NodeTemplateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[925].Exporter = func(v any, i int) any { - switch v := v.(*NodeTemplateNodeTypeFlexibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[926].Exporter = func(v any, i int) any { - switch v := v.(*NodeTemplatesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[927].Exporter = func(v any, i int) any { - switch v := v.(*NodeType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[928].Exporter = func(v any, i int) any { - switch v := v.(*NodeTypeAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[929].Exporter = func(v any, i int) any { - switch v := v.(*NodeTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[930].Exporter = func(v any, i int) any { - switch v := v.(*NodeTypesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[931].Exporter = func(v any, i int) any { - switch v := v.(*NotificationEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[932].Exporter = func(v any, i int) any { - switch v := v.(*NotificationEndpointGrpcSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[933].Exporter = func(v any, i int) any { - switch v := v.(*NotificationEndpointList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[934].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[935].Exporter = func(v any, i int) any { - switch v := v.(*OperationAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[936].Exporter = func(v any, i int) any { - switch v := v.(*OperationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[937].Exporter = func(v any, i int) any { - switch v := v.(*OperationsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[938].Exporter = func(v any, i int) any { - switch v := v.(*OutlierDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[939].Exporter = func(v any, i int) any { - switch v := v.(*PacketIntervals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[940].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroring); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[941].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[942].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[943].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringForwardingRuleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[944].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[945].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringMirroredResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[946].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringMirroredResourceInfoInstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[947].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringMirroredResourceInfoSubnetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[948].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringNetworkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[949].Exporter = func(v any, i int) any { - switch v := v.(*PacketMirroringsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[950].Exporter = func(v any, i int) any { - switch v := v.(*PatchAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[951].Exporter = func(v any, i int) any { - switch v := v.(*PatchBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[952].Exporter = func(v any, i int) any { - switch v := v.(*PatchBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[953].Exporter = func(v any, i int) any { - switch v := v.(*PatchFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[954].Exporter = func(v any, i int) any { - switch v := v.(*PatchFirewallRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[955].Exporter = func(v any, i int) any { - switch v := v.(*PatchForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[956].Exporter = func(v any, i int) any { - switch v := v.(*PatchGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[957].Exporter = func(v any, i int) any { - switch v := v.(*PatchGlobalPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[958].Exporter = func(v any, i int) any { - switch v := v.(*PatchHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[959].Exporter = func(v any, i int) any { - switch v := v.(*PatchImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[960].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[961].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[962].Exporter = func(v any, i int) any { - switch v := v.(*PatchInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[963].Exporter = func(v any, i int) any { - switch v := v.(*PatchInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[964].Exporter = func(v any, i int) any { - switch v := v.(*PatchNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[965].Exporter = func(v any, i int) any { - switch v := v.(*PatchNetworkEdgeSecurityServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[966].Exporter = func(v any, i int) any { - switch v := v.(*PatchNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[967].Exporter = func(v any, i int) any { - switch v := v.(*PatchNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[968].Exporter = func(v any, i int) any { - switch v := v.(*PatchNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[969].Exporter = func(v any, i int) any { - switch v := v.(*PatchPacketMirroringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[970].Exporter = func(v any, i int) any { - switch v := v.(*PatchPerInstanceConfigsInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[971].Exporter = func(v any, i int) any { - switch v := v.(*PatchPerInstanceConfigsRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[972].Exporter = func(v any, i int) any { - switch v := v.(*PatchPublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[973].Exporter = func(v any, i int) any { - switch v := v.(*PatchPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[974].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[975].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[976].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[977].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionHealthCheckServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[978].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[979].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[980].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[981].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[982].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[983].Exporter = func(v any, i int) any { - switch v := v.(*PatchRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[984].Exporter = func(v any, i int) any { - switch v := v.(*PatchResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[985].Exporter = func(v any, i int) any { - switch v := v.(*PatchRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[986].Exporter = func(v any, i int) any { - switch v := v.(*PatchRuleFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[987].Exporter = func(v any, i int) any { - switch v := v.(*PatchRuleNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[988].Exporter = func(v any, i int) any { - switch v := v.(*PatchRuleRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[989].Exporter = func(v any, i int) any { - switch v := v.(*PatchRuleRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[990].Exporter = func(v any, i int) any { - switch v := v.(*PatchRuleSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[991].Exporter = func(v any, i int) any { - switch v := v.(*PatchSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[992].Exporter = func(v any, i int) any { - switch v := v.(*PatchServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[993].Exporter = func(v any, i int) any { - switch v := v.(*PatchSnapshotSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[994].Exporter = func(v any, i int) any { - switch v := v.(*PatchSslPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[995].Exporter = func(v any, i int) any { - switch v := v.(*PatchSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[996].Exporter = func(v any, i int) any { - switch v := v.(*PatchTargetGrpcProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[997].Exporter = func(v any, i int) any { - switch v := v.(*PatchTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[998].Exporter = func(v any, i int) any { - switch v := v.(*PatchTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[999].Exporter = func(v any, i int) any { - switch v := v.(*PatchUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1000].Exporter = func(v any, i int) any { - switch v := v.(*PathMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1001].Exporter = func(v any, i int) any { - switch v := v.(*PathRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1002].Exporter = func(v any, i int) any { - switch v := v.(*PerInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1003].Exporter = func(v any, i int) any { - switch v := v.(*PerformMaintenanceInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1004].Exporter = func(v any, i int) any { - switch v := v.(*PerformMaintenanceNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1005].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1006].Exporter = func(v any, i int) any { - switch v := v.(*PreconfiguredWafSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1007].Exporter = func(v any, i int) any { - switch v := v.(*PreservedState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1008].Exporter = func(v any, i int) any { - switch v := v.(*PreservedStatePreservedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1009].Exporter = func(v any, i int) any { - switch v := v.(*PreservedStatePreservedNetworkIp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1010].Exporter = func(v any, i int) any { - switch v := v.(*PreservedStatePreservedNetworkIpIpAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1011].Exporter = func(v any, i int) any { - switch v := v.(*PreviewRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1012].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1013].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsDisableXpnResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1014].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsEnableXpnResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1015].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsGetXpnResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1016].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsListXpnHostsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1017].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsSetCloudArmorTierRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1018].Exporter = func(v any, i int) any { - switch v := v.(*ProjectsSetDefaultNetworkTierRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1019].Exporter = func(v any, i int) any { - switch v := v.(*PublicAdvertisedPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1020].Exporter = func(v any, i int) any { - switch v := v.(*PublicAdvertisedPrefixList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1021].Exporter = func(v any, i int) any { - switch v := v.(*PublicAdvertisedPrefixPublicDelegatedPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1022].Exporter = func(v any, i int) any { - switch v := v.(*PublicDelegatedPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1023].Exporter = func(v any, i int) any { - switch v := v.(*PublicDelegatedPrefixAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1024].Exporter = func(v any, i int) any { - switch v := v.(*PublicDelegatedPrefixList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1025].Exporter = func(v any, i int) any { - switch v := v.(*PublicDelegatedPrefixPublicDelegatedSubPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1026].Exporter = func(v any, i int) any { - switch v := v.(*PublicDelegatedPrefixesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1027].Exporter = func(v any, i int) any { - switch v := v.(*Quota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1028].Exporter = func(v any, i int) any { - switch v := v.(*QuotaExceededInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1029].Exporter = func(v any, i int) any { - switch v := v.(*QuotaStatusWarning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1030].Exporter = func(v any, i int) any { - switch v := v.(*RawDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1031].Exporter = func(v any, i int) any { - switch v := v.(*RecreateInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1032].Exporter = func(v any, i int) any { - switch v := v.(*RecreateInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1033].Exporter = func(v any, i int) any { - switch v := v.(*Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1034].Exporter = func(v any, i int) any { - switch v := v.(*Region); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1035].Exporter = func(v any, i int) any { - switch v := v.(*RegionAddressesMoveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1036].Exporter = func(v any, i int) any { - switch v := v.(*RegionAutoscalerList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1037].Exporter = func(v any, i int) any { - switch v := v.(*RegionDiskTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1038].Exporter = func(v any, i int) any { - switch v := v.(*RegionDisksAddResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1039].Exporter = func(v any, i int) any { - switch v := v.(*RegionDisksRemoveResourcePoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1040].Exporter = func(v any, i int) any { - switch v := v.(*RegionDisksResizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1041].Exporter = func(v any, i int) any { - switch v := v.(*RegionDisksStartAsyncReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1042].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1043].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagerDeleteInstanceConfigReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1044].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagerList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1045].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagerPatchInstanceConfigReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1046].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagerUpdateInstanceConfigReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1047].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersAbandonInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1048].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersApplyUpdatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1049].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersCreateInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1050].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersDeleteInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1051].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersListErrorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1052].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersListInstanceConfigsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1053].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1054].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersRecreateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1055].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersResumeInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1056].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersSetTargetPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1057].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersSetTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1058].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersStartInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1059].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersStopInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1060].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupManagersSuspendInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1061].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupsListInstances); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1062].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupsListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1063].Exporter = func(v any, i int) any { - switch v := v.(*RegionInstanceGroupsSetNamedPortsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1064].Exporter = func(v any, i int) any { - switch v := v.(*RegionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1065].Exporter = func(v any, i int) any { - switch v := v.(*RegionNetworkEndpointGroupsAttachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1066].Exporter = func(v any, i int) any { - switch v := v.(*RegionNetworkEndpointGroupsDetachEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1067].Exporter = func(v any, i int) any { - switch v := v.(*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1068].Exporter = func(v any, i int) any { - switch v := v.(*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1069].Exporter = func(v any, i int) any { - switch v := v.(*RegionSetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1070].Exporter = func(v any, i int) any { - switch v := v.(*RegionSetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1071].Exporter = func(v any, i int) any { - switch v := v.(*RegionTargetHttpsProxiesSetSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1072].Exporter = func(v any, i int) any { - switch v := v.(*RegionUrlMapsValidateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1073].Exporter = func(v any, i int) any { - switch v := v.(*RemoveAssociationFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1074].Exporter = func(v any, i int) any { - switch v := v.(*RemoveAssociationNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1075].Exporter = func(v any, i int) any { - switch v := v.(*RemoveAssociationRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1076].Exporter = func(v any, i int) any { - switch v := v.(*RemoveHealthCheckTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1077].Exporter = func(v any, i int) any { - switch v := v.(*RemoveInstanceTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1078].Exporter = func(v any, i int) any { - switch v := v.(*RemoveInstancesInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1079].Exporter = func(v any, i int) any { - switch v := v.(*RemovePeeringNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1080].Exporter = func(v any, i int) any { - switch v := v.(*RemoveResourcePoliciesDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1081].Exporter = func(v any, i int) any { - switch v := v.(*RemoveResourcePoliciesInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1082].Exporter = func(v any, i int) any { - switch v := v.(*RemoveResourcePoliciesRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1083].Exporter = func(v any, i int) any { - switch v := v.(*RemoveRuleFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1084].Exporter = func(v any, i int) any { - switch v := v.(*RemoveRuleNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1085].Exporter = func(v any, i int) any { - switch v := v.(*RemoveRuleRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1086].Exporter = func(v any, i int) any { - switch v := v.(*RemoveRuleRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1087].Exporter = func(v any, i int) any { - switch v := v.(*RemoveRuleSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1088].Exporter = func(v any, i int) any { - switch v := v.(*RequestMirrorPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1089].Exporter = func(v any, i int) any { - switch v := v.(*Reservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1090].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1091].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1092].Exporter = func(v any, i int) any { - switch v := v.(*ReservationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1093].Exporter = func(v any, i int) any { - switch v := v.(*ReservationsResizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1094].Exporter = func(v any, i int) any { - switch v := v.(*ReservationsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1095].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1096].Exporter = func(v any, i int) any { - switch v := v.(*ResizeDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1097].Exporter = func(v any, i int) any { - switch v := v.(*ResizeInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1098].Exporter = func(v any, i int) any { - switch v := v.(*ResizeRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1099].Exporter = func(v any, i int) any { - switch v := v.(*ResizeRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1100].Exporter = func(v any, i int) any { - switch v := v.(*ResizeReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1101].Exporter = func(v any, i int) any { - switch v := v.(*ResourceCommitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1102].Exporter = func(v any, i int) any { - switch v := v.(*ResourceGroupReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1103].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePoliciesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1104].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1105].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1106].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyDailyCycle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1107].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyDiskConsistencyGroupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1108].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyGroupPlacementPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1109].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyHourlyCycle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1110].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyInstanceSchedulePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1111].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyInstanceSchedulePolicySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1112].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1113].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1114].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyResourceStatusInstanceSchedulePolicyStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1115].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicySnapshotSchedulePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1116].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicySnapshotSchedulePolicyRetentionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1117].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicySnapshotSchedulePolicySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1118].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicySnapshotSchedulePolicySnapshotProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1119].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyWeeklyCycle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1120].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyWeeklyCycleDayOfWeek); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1121].Exporter = func(v any, i int) any { - switch v := v.(*ResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1122].Exporter = func(v any, i int) any { - switch v := v.(*ResourceStatusScheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1123].Exporter = func(v any, i int) any { - switch v := v.(*ResumeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1124].Exporter = func(v any, i int) any { - switch v := v.(*ResumeInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1125].Exporter = func(v any, i int) any { - switch v := v.(*ResumeInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1126].Exporter = func(v any, i int) any { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1127].Exporter = func(v any, i int) any { - switch v := v.(*RouteAsPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1128].Exporter = func(v any, i int) any { - switch v := v.(*RouteList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1129].Exporter = func(v any, i int) any { - switch v := v.(*Router); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1130].Exporter = func(v any, i int) any { - switch v := v.(*RouterAdvertisedIpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1131].Exporter = func(v any, i int) any { - switch v := v.(*RouterAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1132].Exporter = func(v any, i int) any { - switch v := v.(*RouterBgp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1133].Exporter = func(v any, i int) any { - switch v := v.(*RouterBgpPeer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1134].Exporter = func(v any, i int) any { - switch v := v.(*RouterBgpPeerBfd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1135].Exporter = func(v any, i int) any { - switch v := v.(*RouterBgpPeerCustomLearnedIpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1136].Exporter = func(v any, i int) any { - switch v := v.(*RouterInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1137].Exporter = func(v any, i int) any { - switch v := v.(*RouterList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1138].Exporter = func(v any, i int) any { - switch v := v.(*RouterMd5AuthenticationKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1139].Exporter = func(v any, i int) any { - switch v := v.(*RouterNat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1140].Exporter = func(v any, i int) any { - switch v := v.(*RouterNatLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1141].Exporter = func(v any, i int) any { - switch v := v.(*RouterNatRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1142].Exporter = func(v any, i int) any { - switch v := v.(*RouterNatRuleAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1143].Exporter = func(v any, i int) any { - switch v := v.(*RouterNatSubnetworkToNat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1144].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1145].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatusBgpPeerStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1146].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatusNatStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1147].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatusNatStatusNatRuleStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1148].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1149].Exporter = func(v any, i int) any { - switch v := v.(*RoutersPreviewResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1150].Exporter = func(v any, i int) any { - switch v := v.(*RoutersScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1151].Exporter = func(v any, i int) any { - switch v := v.(*SSLHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1152].Exporter = func(v any, i int) any { - switch v := v.(*SavedAttachedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1153].Exporter = func(v any, i int) any { - switch v := v.(*SavedDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1154].Exporter = func(v any, i int) any { - switch v := v.(*ScalingScheduleStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1155].Exporter = func(v any, i int) any { - switch v := v.(*Scheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1156].Exporter = func(v any, i int) any { - switch v := v.(*SchedulingNodeAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1157].Exporter = func(v any, i int) any { - switch v := v.(*SchedulingOnInstanceStopAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1158].Exporter = func(v any, i int) any { - switch v := v.(*ScratchDisks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1159].Exporter = func(v any, i int) any { - switch v := v.(*Screenshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1160].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPoliciesAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1161].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPoliciesListPreconfiguredExpressionSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1162].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPoliciesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1163].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPoliciesWafConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1164].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1165].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdaptiveProtectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1166].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1167].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1168].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1169].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdvancedOptionsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1170].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyAdvancedOptionsConfigJsonCustomConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1171].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyDdosProtectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1172].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1173].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRecaptchaOptionsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1174].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1175].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1176].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleHttpHeaderAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1177].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1178].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1179].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleMatcherConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1180].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleMatcherExprOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1181].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1182].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleNetworkMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1183].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1184].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRulePreconfiguredWafConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1185].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRulePreconfiguredWafConfigExclusion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1186].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1187].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleRateLimitOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1188].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1189].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleRateLimitOptionsThreshold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1190].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyRuleRedirectOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1191].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicyUserDefinedField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1192].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1193].Exporter = func(v any, i int) any { - switch v := v.(*SendDiagnosticInterruptInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1194].Exporter = func(v any, i int) any { - switch v := v.(*SendDiagnosticInterruptInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1195].Exporter = func(v any, i int) any { - switch v := v.(*SerialPortOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1196].Exporter = func(v any, i int) any { - switch v := v.(*ServerBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1197].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1198].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1199].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachmentAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1200].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachmentConnectedEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1201].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachmentConsumerProjectLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1202].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachmentList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1203].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAttachmentsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1204].Exporter = func(v any, i int) any { - switch v := v.(*SetBackendServiceTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1205].Exporter = func(v any, i int) any { - switch v := v.(*SetBackendServiceTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1206].Exporter = func(v any, i int) any { - switch v := v.(*SetBackupTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1207].Exporter = func(v any, i int) any { - switch v := v.(*SetCertificateMapTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1208].Exporter = func(v any, i int) any { - switch v := v.(*SetCertificateMapTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1209].Exporter = func(v any, i int) any { - switch v := v.(*SetCloudArmorTierProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1210].Exporter = func(v any, i int) any { - switch v := v.(*SetCommonInstanceMetadataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1211].Exporter = func(v any, i int) any { - switch v := v.(*SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1212].Exporter = func(v any, i int) any { - switch v := v.(*SetCommonInstanceMetadataProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1213].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultNetworkTierProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1214].Exporter = func(v any, i int) any { - switch v := v.(*SetDeletionProtectionInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1215].Exporter = func(v any, i int) any { - switch v := v.(*SetDiskAutoDeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1216].Exporter = func(v any, i int) any { - switch v := v.(*SetEdgeSecurityPolicyBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1217].Exporter = func(v any, i int) any { - switch v := v.(*SetEdgeSecurityPolicyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1218].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1219].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1220].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1221].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1222].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1223].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1224].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1225].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1226].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1227].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1228].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1229].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1230].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1231].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1232].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1233].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1234].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1235].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1236].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1237].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1238].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1239].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicySnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1240].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1241].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicySubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1242].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceTemplateInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1243].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceTemplateRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1244].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1245].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1246].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsExternalVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1247].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1248].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsGlobalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1249].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1250].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1251].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1252].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1253].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1254].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1255].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1256].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1257].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsRegionSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1258].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsSecurityPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1259].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1260].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsTargetVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1261].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1262].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsVpnTunnelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1263].Exporter = func(v any, i int) any { - switch v := v.(*SetMachineResourcesInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1264].Exporter = func(v any, i int) any { - switch v := v.(*SetMachineTypeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1265].Exporter = func(v any, i int) any { - switch v := v.(*SetMetadataInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1266].Exporter = func(v any, i int) any { - switch v := v.(*SetMinCpuPlatformInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1267].Exporter = func(v any, i int) any { - switch v := v.(*SetNameInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1268].Exporter = func(v any, i int) any { - switch v := v.(*SetNamedPortsInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1269].Exporter = func(v any, i int) any { - switch v := v.(*SetNamedPortsRegionInstanceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1270].Exporter = func(v any, i int) any { - switch v := v.(*SetNodeTemplateNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1271].Exporter = func(v any, i int) any { - switch v := v.(*SetPrivateIpGoogleAccessSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1272].Exporter = func(v any, i int) any { - switch v := v.(*SetProxyHeaderTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1273].Exporter = func(v any, i int) any { - switch v := v.(*SetProxyHeaderTargetTcpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1274].Exporter = func(v any, i int) any { - switch v := v.(*SetQuicOverrideTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1275].Exporter = func(v any, i int) any { - switch v := v.(*SetSchedulingInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1276].Exporter = func(v any, i int) any { - switch v := v.(*SetSecurityPolicyBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1277].Exporter = func(v any, i int) any { - switch v := v.(*SetSecurityPolicyInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1278].Exporter = func(v any, i int) any { - switch v := v.(*SetSecurityPolicyRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1279].Exporter = func(v any, i int) any { - switch v := v.(*SetSecurityPolicyTargetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1280].Exporter = func(v any, i int) any { - switch v := v.(*SetSecurityPolicyTargetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1281].Exporter = func(v any, i int) any { - switch v := v.(*SetServiceAccountInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1282].Exporter = func(v any, i int) any { - switch v := v.(*SetShieldedInstanceIntegrityPolicyInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1283].Exporter = func(v any, i int) any { - switch v := v.(*SetSslCertificatesRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1284].Exporter = func(v any, i int) any { - switch v := v.(*SetSslCertificatesTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1285].Exporter = func(v any, i int) any { - switch v := v.(*SetSslCertificatesTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1286].Exporter = func(v any, i int) any { - switch v := v.(*SetSslPolicyTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1287].Exporter = func(v any, i int) any { - switch v := v.(*SetSslPolicyTargetSslProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1288].Exporter = func(v any, i int) any { - switch v := v.(*SetTagsInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1289].Exporter = func(v any, i int) any { - switch v := v.(*SetTargetForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1290].Exporter = func(v any, i int) any { - switch v := v.(*SetTargetGlobalForwardingRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1291].Exporter = func(v any, i int) any { - switch v := v.(*SetTargetPoolsInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1292].Exporter = func(v any, i int) any { - switch v := v.(*SetTargetPoolsRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1293].Exporter = func(v any, i int) any { - switch v := v.(*SetUrlMapRegionTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1294].Exporter = func(v any, i int) any { - switch v := v.(*SetUrlMapRegionTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1295].Exporter = func(v any, i int) any { - switch v := v.(*SetUrlMapTargetHttpProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1296].Exporter = func(v any, i int) any { - switch v := v.(*SetUrlMapTargetHttpsProxyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1297].Exporter = func(v any, i int) any { - switch v := v.(*SetUsageExportBucketProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1298].Exporter = func(v any, i int) any { - switch v := v.(*ShareSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1299].Exporter = func(v any, i int) any { - switch v := v.(*ShareSettingsProjectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1300].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1301].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceIdentity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1302].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceIdentityEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1303].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceIntegrityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1304].Exporter = func(v any, i int) any { - switch v := v.(*SignedUrlKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1305].Exporter = func(v any, i int) any { - switch v := v.(*SimulateMaintenanceEventInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1306].Exporter = func(v any, i int) any { - switch v := v.(*SimulateMaintenanceEventNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1307].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1308].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1309].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1310].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotSettingsStorageLocationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1311].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotSettingsStorageLocationSettingsStorageLocationPreference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1312].Exporter = func(v any, i int) any { - switch v := v.(*SourceDiskEncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1313].Exporter = func(v any, i int) any { - switch v := v.(*SourceInstanceParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1314].Exporter = func(v any, i int) any { - switch v := v.(*SourceInstanceProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1315].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1316].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificateAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1317].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1318].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificateManagedSslCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1319].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificateSelfManagedSslCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1320].Exporter = func(v any, i int) any { - switch v := v.(*SslCertificatesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1321].Exporter = func(v any, i int) any { - switch v := v.(*SslPoliciesAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1322].Exporter = func(v any, i int) any { - switch v := v.(*SslPoliciesList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1323].Exporter = func(v any, i int) any { - switch v := v.(*SslPoliciesListAvailableFeaturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1324].Exporter = func(v any, i int) any { - switch v := v.(*SslPoliciesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1325].Exporter = func(v any, i int) any { - switch v := v.(*SslPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1326].Exporter = func(v any, i int) any { - switch v := v.(*SslPolicyReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1327].Exporter = func(v any, i int) any { - switch v := v.(*StartAsyncReplicationDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1328].Exporter = func(v any, i int) any { - switch v := v.(*StartAsyncReplicationRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1329].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1330].Exporter = func(v any, i int) any { - switch v := v.(*StartInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1331].Exporter = func(v any, i int) any { - switch v := v.(*StartInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1332].Exporter = func(v any, i int) any { - switch v := v.(*StartWithEncryptionKeyInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1333].Exporter = func(v any, i int) any { - switch v := v.(*StatefulPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1334].Exporter = func(v any, i int) any { - switch v := v.(*StatefulPolicyPreservedState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1335].Exporter = func(v any, i int) any { - switch v := v.(*StatefulPolicyPreservedStateDiskDevice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1336].Exporter = func(v any, i int) any { - switch v := v.(*StatefulPolicyPreservedStateNetworkIp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1337].Exporter = func(v any, i int) any { - switch v := v.(*Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1338].Exporter = func(v any, i int) any { - switch v := v.(*StopAsyncReplicationDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1339].Exporter = func(v any, i int) any { - switch v := v.(*StopAsyncReplicationRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1340].Exporter = func(v any, i int) any { - switch v := v.(*StopGroupAsyncReplicationDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1341].Exporter = func(v any, i int) any { - switch v := v.(*StopGroupAsyncReplicationRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1342].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1343].Exporter = func(v any, i int) any { - switch v := v.(*StopInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1344].Exporter = func(v any, i int) any { - switch v := v.(*StopInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1345].Exporter = func(v any, i int) any { - switch v := v.(*StoragePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1346].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1347].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1348].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1349].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolListDisks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1350].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1351].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1352].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolTypeAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1353].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolTypeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1354].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolTypesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1355].Exporter = func(v any, i int) any { - switch v := v.(*StoragePoolsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1356].Exporter = func(v any, i int) any { - switch v := v.(*Subnetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1357].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworkAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1358].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworkList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1359].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworkLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1360].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworkSecondaryRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1361].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworksExpandIpCidrRangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1362].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworksScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1363].Exporter = func(v any, i int) any { - switch v := v.(*SubnetworksSetPrivateIpGoogleAccessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1364].Exporter = func(v any, i int) any { - switch v := v.(*Subsetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1365].Exporter = func(v any, i int) any { - switch v := v.(*SuspendInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1366].Exporter = func(v any, i int) any { - switch v := v.(*SuspendInstancesInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1367].Exporter = func(v any, i int) any { - switch v := v.(*SuspendInstancesRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1368].Exporter = func(v any, i int) any { - switch v := v.(*SwitchToCustomModeNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1369].Exporter = func(v any, i int) any { - switch v := v.(*TCPHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1370].Exporter = func(v any, i int) any { - switch v := v.(*Tags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1371].Exporter = func(v any, i int) any { - switch v := v.(*TargetGrpcProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1372].Exporter = func(v any, i int) any { - switch v := v.(*TargetGrpcProxyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1373].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpProxiesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1374].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1375].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpProxyAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1376].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpProxyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1377].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxiesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1378].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxiesSetCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1379].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxiesSetQuicOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1380].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxiesSetSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1381].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1382].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxyAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1383].Exporter = func(v any, i int) any { - switch v := v.(*TargetHttpsProxyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1384].Exporter = func(v any, i int) any { - switch v := v.(*TargetInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1385].Exporter = func(v any, i int) any { - switch v := v.(*TargetInstanceAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1386].Exporter = func(v any, i int) any { - switch v := v.(*TargetInstanceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1387].Exporter = func(v any, i int) any { - switch v := v.(*TargetInstancesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1388].Exporter = func(v any, i int) any { - switch v := v.(*TargetPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1389].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1390].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolInstanceHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1391].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1392].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolsAddHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1393].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolsAddInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1394].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolsRemoveHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1395].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolsRemoveInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1396].Exporter = func(v any, i int) any { - switch v := v.(*TargetPoolsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1397].Exporter = func(v any, i int) any { - switch v := v.(*TargetReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1398].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxiesSetBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1399].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxiesSetCertificateMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1400].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxiesSetProxyHeaderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1401].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxiesSetSslCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1402].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1403].Exporter = func(v any, i int) any { - switch v := v.(*TargetSslProxyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1404].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxiesScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1405].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxiesSetBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1406].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxiesSetProxyHeaderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1407].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1408].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxyAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1409].Exporter = func(v any, i int) any { - switch v := v.(*TargetTcpProxyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1410].Exporter = func(v any, i int) any { - switch v := v.(*TargetVpnGateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1411].Exporter = func(v any, i int) any { - switch v := v.(*TargetVpnGatewayAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1412].Exporter = func(v any, i int) any { - switch v := v.(*TargetVpnGatewayList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1413].Exporter = func(v any, i int) any { - switch v := v.(*TargetVpnGatewaysScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1414].Exporter = func(v any, i int) any { - switch v := v.(*TestFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1415].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1416].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1417].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1418].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsExternalVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1419].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1420].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1421].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1422].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsInstanceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1423].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1424].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsLicenseCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1425].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsLicenseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1426].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsMachineImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1427].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsNetworkAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1428].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsNetworkEndpointGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1429].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1430].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1431].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsNodeTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1432].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsPacketMirroringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1433].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1434].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1435].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRegionInstantSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1436].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRegionNetworkFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1437].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1438].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsResourcePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1439].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsServiceAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1440].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1441].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1442].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsSubnetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1443].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsVpnGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1444].Exporter = func(v any, i int) any { - switch v := v.(*TestPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1445].Exporter = func(v any, i int) any { - switch v := v.(*TestPermissionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1446].Exporter = func(v any, i int) any { - switch v := v.(*Uint128); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1447].Exporter = func(v any, i int) any { - switch v := v.(*UpcomingMaintenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1448].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccessConfigInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1449].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1450].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackendBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1451].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1452].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1453].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDisplayDeviceInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1454].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFirewallRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1455].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1456].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1457].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNetworkInterfaceInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1458].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePeeringNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1459].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePerInstanceConfigsInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1460].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1461].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionAutoscalerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1462].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionBackendServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1463].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionCommitmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1464].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionDiskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1465].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionHealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1466].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1467].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1468].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1469].Exporter = func(v any, i int) any { - switch v := v.(*UpdateShieldedInstanceConfigInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1470].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1471].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1472].Exporter = func(v any, i int) any { - switch v := v.(*UrlMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1473].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1474].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1475].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapTest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1476].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapTestHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1477].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1478].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapsAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1479].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1480].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapsValidateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1481].Exporter = func(v any, i int) any { - switch v := v.(*UrlMapsValidateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1482].Exporter = func(v any, i int) any { - switch v := v.(*UrlRewrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1483].Exporter = func(v any, i int) any { - switch v := v.(*UsableSubnetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1484].Exporter = func(v any, i int) any { - switch v := v.(*UsableSubnetworkSecondaryRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1485].Exporter = func(v any, i int) any { - switch v := v.(*UsableSubnetworksAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1486].Exporter = func(v any, i int) any { - switch v := v.(*UsageExportLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1487].Exporter = func(v any, i int) any { - switch v := v.(*ValidateRegionUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1488].Exporter = func(v any, i int) any { - switch v := v.(*ValidateUrlMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1489].Exporter = func(v any, i int) any { - switch v := v.(*VmEndpointNatMappings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1490].Exporter = func(v any, i int) any { - switch v := v.(*VmEndpointNatMappingsInterfaceNatMappings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1491].Exporter = func(v any, i int) any { - switch v := v.(*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1492].Exporter = func(v any, i int) any { - switch v := v.(*VmEndpointNatMappingsList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1493].Exporter = func(v any, i int) any { - switch v := v.(*VpnGateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1494].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1495].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1496].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1497].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayStatusHighAvailabilityRequirementState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1498].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayStatusTunnel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1499].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayStatusVpnConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1500].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayVpnGatewayInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1501].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewaysGetStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1502].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewaysScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1503].Exporter = func(v any, i int) any { - switch v := v.(*VpnTunnel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1504].Exporter = func(v any, i int) any { - switch v := v.(*VpnTunnelAggregatedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1505].Exporter = func(v any, i int) any { - switch v := v.(*VpnTunnelList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1506].Exporter = func(v any, i int) any { - switch v := v.(*VpnTunnelsScopedList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1507].Exporter = func(v any, i int) any { - switch v := v.(*WafExpressionSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1508].Exporter = func(v any, i int) any { - switch v := v.(*WafExpressionSetExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1509].Exporter = func(v any, i int) any { - switch v := v.(*WaitGlobalOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1510].Exporter = func(v any, i int) any { - switch v := v.(*WaitRegionOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1511].Exporter = func(v any, i int) any { - switch v := v.(*WaitZoneOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1512].Exporter = func(v any, i int) any { - switch v := v.(*Warning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1513].Exporter = func(v any, i int) any { - switch v := v.(*Warnings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1514].Exporter = func(v any, i int) any { - switch v := v.(*WeightedBackendService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1515].Exporter = func(v any, i int) any { - switch v := v.(*WithdrawPublicAdvertisedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1516].Exporter = func(v any, i int) any { - switch v := v.(*WithdrawPublicDelegatedPrefixeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1517].Exporter = func(v any, i int) any { - switch v := v.(*XpnHostList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1518].Exporter = func(v any, i int) any { - switch v := v.(*XpnResourceId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1519].Exporter = func(v any, i int) any { - switch v := v.(*Zone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1520].Exporter = func(v any, i int) any { - switch v := v.(*ZoneList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1521].Exporter = func(v any, i int) any { - switch v := v.(*ZoneSetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_compute_v1_compute_proto_msgTypes[1522].Exporter = func(v any, i int) any { - switch v := v.(*ZoneSetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_compute_v1_compute_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_compute_v1_compute_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_compute_v1_compute_proto_msgTypes[2].OneofWrappers = []any{} diff --git a/compute/apiv1/disk_types_client.go b/compute/apiv1/disk_types_client.go index ebc62f3f3f96..687c7293ae3a 100755 --- a/compute/apiv1/disk_types_client.go +++ b/compute/apiv1/disk_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type diskTypesRESTClient struct { // Points back to the CallOptions field of the containing DiskTypesClient CallOptions **DiskTypesCallOptions + + logger *slog.Logger } // NewDiskTypesRESTClient creates a new disk types rest client. @@ -178,6 +179,7 @@ func NewDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -281,21 +283,10 @@ func (c *diskTypesRESTClient) AggregatedList(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -360,17 +351,7 @@ func (c *diskTypesRESTClient) Get(ctx context.Context, req *computepb.GetDiskTyp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -440,21 +421,10 @@ func (c *diskTypesRESTClient) List(ctx context.Context, req *computepb.ListDiskT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/disk_types_client_example_go123_test.go b/compute/apiv1/disk_types_client_example_go123_test.go index ca2e8f7b16a3..2bdc096889f4 100644 --- a/compute/apiv1/disk_types_client_example_go123_test.go +++ b/compute/apiv1/disk_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDiskTypesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleDiskTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/disks_client.go b/compute/apiv1/disks_client.go index ff5d7335568f..8d5fd735de54 100755 --- a/compute/apiv1/disks_client.go +++ b/compute/apiv1/disks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -324,6 +323,8 @@ type disksRESTClient struct { // Points back to the CallOptions field of the containing DisksClient CallOptions **DisksCallOptions + + logger *slog.Logger } // NewDisksRESTClient creates a new disks rest client. @@ -341,6 +342,7 @@ func NewDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*Disk endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -440,17 +442,7 @@ func (c *disksRESTClient) AddResourcePolicies(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddResourcePolicies") if err != nil { return err } @@ -534,21 +526,10 @@ func (c *disksRESTClient) AggregatedList(ctx context.Context, req *computepb.Agg } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -627,17 +608,7 @@ func (c *disksRESTClient) BulkInsert(ctx context.Context, req *computepb.BulkIns httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkInsert") if err != nil { return err } @@ -707,17 +678,7 @@ func (c *disksRESTClient) CreateSnapshot(ctx context.Context, req *computepb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSnapshot") if err != nil { return err } @@ -777,17 +738,7 @@ func (c *disksRESTClient) Delete(ctx context.Context, req *computepb.DeleteDiskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -840,17 +791,7 @@ func (c *disksRESTClient) Get(ctx context.Context, req *computepb.GetDiskRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -902,17 +843,7 @@ func (c *disksRESTClient) GetIamPolicy(ctx context.Context, req *computepb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -974,17 +905,7 @@ func (c *disksRESTClient) Insert(ctx context.Context, req *computepb.InsertDiskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1062,21 +983,10 @@ func (c *disksRESTClient) List(ctx context.Context, req *computepb.ListDisksRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1148,17 +1058,7 @@ func (c *disksRESTClient) RemoveResourcePolicies(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveResourcePolicies") if err != nil { return err } @@ -1225,17 +1125,7 @@ func (c *disksRESTClient) Resize(ctx context.Context, req *computepb.ResizeDiskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Resize") if err != nil { return err } @@ -1295,17 +1185,7 @@ func (c *disksRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1364,17 +1244,7 @@ func (c *disksRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -1441,17 +1311,7 @@ func (c *disksRESTClient) StartAsyncReplication(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartAsyncReplication") if err != nil { return err } @@ -1511,17 +1371,7 @@ func (c *disksRESTClient) StopAsyncReplication(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "StopAsyncReplication") if err != nil { return err } @@ -1588,17 +1438,7 @@ func (c *disksRESTClient) StopGroupAsyncReplication(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopGroupAsyncReplication") if err != nil { return err } @@ -1658,17 +1498,7 @@ func (c *disksRESTClient) TestIamPermissions(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1733,17 +1563,7 @@ func (c *disksRESTClient) Update(ctx context.Context, req *computepb.UpdateDiskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/disks_client_example_go123_test.go b/compute/apiv1/disks_client_example_go123_test.go index b5ce853a27ff..d0dfcc54cfa1 100644 --- a/compute/apiv1/disks_client_example_go123_test.go +++ b/compute/apiv1/disks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDisksClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleDisksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/external_vpn_gateways_client.go b/compute/apiv1/external_vpn_gateways_client.go index dd4a59e86079..f0a0ac320912 100755 --- a/compute/apiv1/external_vpn_gateways_client.go +++ b/compute/apiv1/external_vpn_gateways_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type externalVpnGatewaysRESTClient struct { // Points back to the CallOptions field of the containing ExternalVpnGatewaysClient CallOptions **ExternalVpnGatewaysCallOptions + + logger *slog.Logger } // NewExternalVpnGatewaysRESTClient creates a new external vpn gateways rest client. @@ -202,6 +203,7 @@ func NewExternalVpnGatewaysRESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,17 +296,7 @@ func (c *externalVpnGatewaysRESTClient) Delete(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -356,17 +348,7 @@ func (c *externalVpnGatewaysRESTClient) Get(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -425,17 +407,7 @@ func (c *externalVpnGatewaysRESTClient) Insert(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -512,21 +484,10 @@ func (c *externalVpnGatewaysRESTClient) List(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -591,17 +552,7 @@ func (c *externalVpnGatewaysRESTClient) SetLabels(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -660,17 +611,7 @@ func (c *externalVpnGatewaysRESTClient) TestIamPermissions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/external_vpn_gateways_client_example_go123_test.go b/compute/apiv1/external_vpn_gateways_client_example_go123_test.go index bbc8fed1b9c4..4616c955c31d 100644 --- a/compute/apiv1/external_vpn_gateways_client_example_go123_test.go +++ b/compute/apiv1/external_vpn_gateways_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleExternalVpnGatewaysClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/firewall_policies_client.go b/compute/apiv1/firewall_policies_client.go index ab236c258a68..bcaa974d8a24 100755 --- a/compute/apiv1/firewall_policies_client.go +++ b/compute/apiv1/firewall_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -341,6 +340,8 @@ type firewallPoliciesRESTClient struct { // Points back to the CallOptions field of the containing FirewallPoliciesClient CallOptions **FirewallPoliciesCallOptions + + logger *slog.Logger } // NewFirewallPoliciesRESTClient creates a new firewall policies rest client. @@ -358,6 +359,7 @@ func NewFirewallPoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -460,17 +462,7 @@ func (c *firewallPoliciesRESTClient) AddAssociation(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddAssociation") if err != nil { return err } @@ -535,17 +527,7 @@ func (c *firewallPoliciesRESTClient) AddRule(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddRule") if err != nil { return err } @@ -606,17 +588,7 @@ func (c *firewallPoliciesRESTClient) CloneRules(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CloneRules") if err != nil { return err } @@ -674,17 +646,7 @@ func (c *firewallPoliciesRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -735,17 +697,7 @@ func (c *firewallPoliciesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -797,17 +749,7 @@ func (c *firewallPoliciesRESTClient) GetAssociation(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAssociation") if err != nil { return err } @@ -859,17 +801,7 @@ func (c *firewallPoliciesRESTClient) GetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -921,17 +853,7 @@ func (c *firewallPoliciesRESTClient) GetRule(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -988,17 +910,7 @@ func (c *firewallPoliciesRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1077,21 +989,10 @@ func (c *firewallPoliciesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1153,17 +1054,7 @@ func (c *firewallPoliciesRESTClient) ListAssociations(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssociations") if err != nil { return err } @@ -1216,17 +1107,7 @@ func (c *firewallPoliciesRESTClient) Move(ctx context.Context, req *computepb.Mo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Move") if err != nil { return err } @@ -1291,17 +1172,7 @@ func (c *firewallPoliciesRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1369,17 +1240,7 @@ func (c *firewallPoliciesRESTClient) PatchRule(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchRule") if err != nil { return err } @@ -1440,17 +1301,7 @@ func (c *firewallPoliciesRESTClient) RemoveAssociation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveAssociation") if err != nil { return err } @@ -1511,17 +1362,7 @@ func (c *firewallPoliciesRESTClient) RemoveRule(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveRule") if err != nil { return err } @@ -1579,17 +1420,7 @@ func (c *firewallPoliciesRESTClient) SetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1641,17 +1472,7 @@ func (c *firewallPoliciesRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/firewall_policies_client_example_go123_test.go b/compute/apiv1/firewall_policies_client_example_go123_test.go index 5c7b836d9de6..9f5a80cba655 100644 --- a/compute/apiv1/firewall_policies_client_example_go123_test.go +++ b/compute/apiv1/firewall_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleFirewallPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/firewalls_client.go b/compute/apiv1/firewalls_client.go index 5633535da4e5..21f960c9aeb6 100755 --- a/compute/apiv1/firewalls_client.go +++ b/compute/apiv1/firewalls_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type firewallsRESTClient struct { // Points back to the CallOptions field of the containing FirewallsClient CallOptions **FirewallsCallOptions + + logger *slog.Logger } // NewFirewallsRESTClient creates a new firewalls rest client. @@ -202,6 +203,7 @@ func NewFirewallsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,17 +296,7 @@ func (c *firewallsRESTClient) Delete(ctx context.Context, req *computepb.DeleteF httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -356,17 +348,7 @@ func (c *firewallsRESTClient) Get(ctx context.Context, req *computepb.GetFirewal httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -425,17 +407,7 @@ func (c *firewallsRESTClient) Insert(ctx context.Context, req *computepb.InsertF httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -512,21 +484,10 @@ func (c *firewallsRESTClient) List(ctx context.Context, req *computepb.ListFirew } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -598,17 +559,7 @@ func (c *firewallsRESTClient) Patch(ctx context.Context, req *computepb.PatchFir httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -674,17 +625,7 @@ func (c *firewallsRESTClient) Update(ctx context.Context, req *computepb.UpdateF httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/firewalls_client_example_go123_test.go b/compute/apiv1/firewalls_client_example_go123_test.go index 008b8f3fd78b..21a34dca87a7 100644 --- a/compute/apiv1/firewalls_client_example_go123_test.go +++ b/compute/apiv1/firewalls_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleFirewallsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/forwarding_rules_client.go b/compute/apiv1/forwarding_rules_client.go index 68cb4da4f14d..99dd8a52b450 100755 --- a/compute/apiv1/forwarding_rules_client.go +++ b/compute/apiv1/forwarding_rules_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -215,6 +214,8 @@ type forwardingRulesRESTClient struct { // Points back to the CallOptions field of the containing ForwardingRulesClient CallOptions **ForwardingRulesCallOptions + + logger *slog.Logger } // NewForwardingRulesRESTClient creates a new forwarding rules rest client. @@ -232,6 +233,7 @@ func NewForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -348,21 +350,10 @@ func (c *forwardingRulesRESTClient) AggregatedList(ctx context.Context, req *com } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -434,17 +425,7 @@ func (c *forwardingRulesRESTClient) Delete(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -497,17 +478,7 @@ func (c *forwardingRulesRESTClient) Get(ctx context.Context, req *computepb.GetF httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -566,17 +537,7 @@ func (c *forwardingRulesRESTClient) Insert(ctx context.Context, req *computepb.I httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -654,21 +615,10 @@ func (c *forwardingRulesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -740,17 +690,7 @@ func (c *forwardingRulesRESTClient) Patch(ctx context.Context, req *computepb.Pa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -817,17 +757,7 @@ func (c *forwardingRulesRESTClient) SetLabels(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -894,17 +824,7 @@ func (c *forwardingRulesRESTClient) SetTarget(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetTarget") if err != nil { return err } diff --git a/compute/apiv1/forwarding_rules_client_example_go123_test.go b/compute/apiv1/forwarding_rules_client_example_go123_test.go index 831a5db643f6..b0297010b657 100644 --- a/compute/apiv1/forwarding_rules_client_example_go123_test.go +++ b/compute/apiv1/forwarding_rules_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleForwardingRulesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleForwardingRulesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_addresses_client.go b/compute/apiv1/global_addresses_client.go index 8a4b06d122f9..4ed233cde6c2 100755 --- a/compute/apiv1/global_addresses_client.go +++ b/compute/apiv1/global_addresses_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type globalAddressesRESTClient struct { // Points back to the CallOptions field of the containing GlobalAddressesClient CallOptions **GlobalAddressesCallOptions + + logger *slog.Logger } // NewGlobalAddressesRESTClient creates a new global addresses rest client. @@ -202,6 +203,7 @@ func NewGlobalAddressesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,17 +296,7 @@ func (c *globalAddressesRESTClient) Delete(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -356,17 +348,7 @@ func (c *globalAddressesRESTClient) Get(ctx context.Context, req *computepb.GetG httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -425,17 +407,7 @@ func (c *globalAddressesRESTClient) Insert(ctx context.Context, req *computepb.I httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -512,21 +484,10 @@ func (c *globalAddressesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -598,17 +559,7 @@ func (c *globalAddressesRESTClient) Move(ctx context.Context, req *computepb.Mov httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Move") if err != nil { return err } @@ -667,17 +618,7 @@ func (c *globalAddressesRESTClient) SetLabels(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/global_addresses_client_example_go123_test.go b/compute/apiv1/global_addresses_client_example_go123_test.go index 0e56890bf8d4..b98f85a0f44c 100644 --- a/compute/apiv1/global_addresses_client_example_go123_test.go +++ b/compute/apiv1/global_addresses_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalAddressesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_forwarding_rules_client.go b/compute/apiv1/global_forwarding_rules_client.go index 01b0299cb95a..8d042e91a1fa 100755 --- a/compute/apiv1/global_forwarding_rules_client.go +++ b/compute/apiv1/global_forwarding_rules_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type globalForwardingRulesRESTClient struct { // Points back to the CallOptions field of the containing GlobalForwardingRulesClient CallOptions **GlobalForwardingRulesCallOptions + + logger *slog.Logger } // NewGlobalForwardingRulesRESTClient creates a new global forwarding rules rest client. @@ -212,6 +213,7 @@ func NewGlobalForwardingRulesRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,17 +306,7 @@ func (c *globalForwardingRulesRESTClient) Delete(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -366,17 +358,7 @@ func (c *globalForwardingRulesRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -435,17 +417,7 @@ func (c *globalForwardingRulesRESTClient) Insert(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -522,21 +494,10 @@ func (c *globalForwardingRulesRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -608,17 +569,7 @@ func (c *globalForwardingRulesRESTClient) Patch(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -677,17 +628,7 @@ func (c *globalForwardingRulesRESTClient) SetLabels(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -753,17 +694,7 @@ func (c *globalForwardingRulesRESTClient) SetTarget(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetTarget") if err != nil { return err } diff --git a/compute/apiv1/global_forwarding_rules_client_example_go123_test.go b/compute/apiv1/global_forwarding_rules_client_example_go123_test.go index 5cee5cd9bdb4..b3613c252c44 100644 --- a/compute/apiv1/global_forwarding_rules_client_example_go123_test.go +++ b/compute/apiv1/global_forwarding_rules_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalForwardingRulesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_network_endpoint_groups_client.go b/compute/apiv1/global_network_endpoint_groups_client.go index 0bba2dec8951..f827e0b1d978 100755 --- a/compute/apiv1/global_network_endpoint_groups_client.go +++ b/compute/apiv1/global_network_endpoint_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type globalNetworkEndpointGroupsRESTClient struct { // Points back to the CallOptions field of the containing GlobalNetworkEndpointGroupsClient CallOptions **GlobalNetworkEndpointGroupsCallOptions + + logger *slog.Logger } // NewGlobalNetworkEndpointGroupsRESTClient creates a new global network endpoint groups rest client. @@ -212,6 +213,7 @@ func NewGlobalNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -311,17 +313,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) AttachNetworkEndpoints(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AttachNetworkEndpoints") if err != nil { return err } @@ -380,17 +372,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -456,17 +438,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) DetachNetworkEndpoints(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetachNetworkEndpoints") if err != nil { return err } @@ -518,17 +490,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -587,17 +549,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) Insert(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -674,21 +626,10 @@ func (c *globalNetworkEndpointGroupsRESTClient) List(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -771,21 +712,10 @@ func (c *globalNetworkEndpointGroupsRESTClient) ListNetworkEndpoints(ctx context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworkEndpoints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/global_network_endpoint_groups_client_example_go123_test.go b/compute/apiv1/global_network_endpoint_groups_client_example_go123_test.go index a9617c81c9fa..9c1408d8c7ba 100644 --- a/compute/apiv1/global_network_endpoint_groups_client_example_go123_test.go +++ b/compute/apiv1/global_network_endpoint_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalNetworkEndpointGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleGlobalNetworkEndpointGroupsClient_ListNetworkEndpoints_all() { } for resp, err := range c.ListNetworkEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_operations_client.go b/compute/apiv1/global_operations_client.go index 37e70d55edfb..983b6df78654 100755 --- a/compute/apiv1/global_operations_client.go +++ b/compute/apiv1/global_operations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -181,6 +180,8 @@ type globalOperationsRESTClient struct { // Points back to the CallOptions field of the containing GlobalOperationsClient CallOptions **GlobalOperationsCallOptions + + logger *slog.Logger } // NewGlobalOperationsRESTClient creates a new global operations rest client. @@ -198,6 +199,7 @@ func NewGlobalOperationsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -301,21 +303,10 @@ func (c *globalOperationsRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -380,17 +371,7 @@ func (c *globalOperationsRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -435,17 +416,7 @@ func (c *globalOperationsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -515,21 +486,10 @@ func (c *globalOperationsRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -587,17 +547,7 @@ func (c *globalOperationsRESTClient) Wait(ctx context.Context, req *computepb.Wa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Wait") if err != nil { return err } diff --git a/compute/apiv1/global_operations_client_example_go123_test.go b/compute/apiv1/global_operations_client_example_go123_test.go index d30d20d546c1..d32ca01360cb 100644 --- a/compute/apiv1/global_operations_client_example_go123_test.go +++ b/compute/apiv1/global_operations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalOperationsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleGlobalOperationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_organization_operations_client.go b/compute/apiv1/global_organization_operations_client.go index 2c5a3f9d7734..aa66de24a116 100755 --- a/compute/apiv1/global_organization_operations_client.go +++ b/compute/apiv1/global_organization_operations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -151,6 +150,8 @@ type globalOrganizationOperationsRESTClient struct { // Points back to the CallOptions field of the containing GlobalOrganizationOperationsClient CallOptions **GlobalOrganizationOperationsCallOptions + + logger *slog.Logger } // NewGlobalOrganizationOperationsRESTClient creates a new global organization operations rest client. @@ -168,6 +169,7 @@ func NewGlobalOrganizationOperationsRESTClient(ctx context.Context, opts ...opti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -247,17 +249,7 @@ func (c *globalOrganizationOperationsRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -309,17 +301,7 @@ func (c *globalOrganizationOperationsRESTClient) Get(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -392,21 +374,10 @@ func (c *globalOrganizationOperationsRESTClient) List(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/global_organization_operations_client_example_go123_test.go b/compute/apiv1/global_organization_operations_client_example_go123_test.go index ef5472e15be4..ed2591e53aa9 100644 --- a/compute/apiv1/global_organization_operations_client_example_go123_test.go +++ b/compute/apiv1/global_organization_operations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalOrganizationOperationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/global_public_delegated_prefixes_client.go b/compute/apiv1/global_public_delegated_prefixes_client.go index 65a90dbaeb2d..72e3f4758cdb 100755 --- a/compute/apiv1/global_public_delegated_prefixes_client.go +++ b/compute/apiv1/global_public_delegated_prefixes_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type globalPublicDelegatedPrefixesRESTClient struct { // Points back to the CallOptions field of the containing GlobalPublicDelegatedPrefixesClient CallOptions **GlobalPublicDelegatedPrefixesCallOptions + + logger *slog.Logger } // NewGlobalPublicDelegatedPrefixesRESTClient creates a new global public delegated prefixes rest client. @@ -192,6 +193,7 @@ func NewGlobalPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...opt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,17 +286,7 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Delete(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -346,17 +338,7 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Get(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -415,17 +397,7 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Insert(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -502,21 +474,10 @@ func (c *globalPublicDelegatedPrefixesRESTClient) List(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -588,17 +549,7 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Patch(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/global_public_delegated_prefixes_client_example_go123_test.go b/compute/apiv1/global_public_delegated_prefixes_client_example_go123_test.go index ddf65e0defab..57ffa5e23f28 100644 --- a/compute/apiv1/global_public_delegated_prefixes_client_example_go123_test.go +++ b/compute/apiv1/global_public_delegated_prefixes_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGlobalPublicDelegatedPrefixesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/health_checks_client.go b/compute/apiv1/health_checks_client.go index b53dd9b3004a..973f577ab50f 100755 --- a/compute/apiv1/health_checks_client.go +++ b/compute/apiv1/health_checks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type healthChecksRESTClient struct { // Points back to the CallOptions field of the containing HealthChecksClient CallOptions **HealthChecksCallOptions + + logger *slog.Logger } // NewHealthChecksRESTClient creates a new health checks rest client. @@ -222,6 +223,7 @@ func NewHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *healthChecksRESTClient) AggregatedList(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *healthChecksRESTClient) Delete(ctx context.Context, req *computepb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -486,17 +467,7 @@ func (c *healthChecksRESTClient) Get(ctx context.Context, req *computepb.GetHeal httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -555,17 +526,7 @@ func (c *healthChecksRESTClient) Insert(ctx context.Context, req *computepb.Inse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -642,21 +603,10 @@ func (c *healthChecksRESTClient) List(ctx context.Context, req *computepb.ListHe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -728,17 +678,7 @@ func (c *healthChecksRESTClient) Patch(ctx context.Context, req *computepb.Patch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -804,17 +744,7 @@ func (c *healthChecksRESTClient) Update(ctx context.Context, req *computepb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/health_checks_client_example_go123_test.go b/compute/apiv1/health_checks_client_example_go123_test.go index a201d22d675f..c3aff2da4b60 100644 --- a/compute/apiv1/health_checks_client_example_go123_test.go +++ b/compute/apiv1/health_checks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleHealthChecksClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleHealthChecksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/helpers.go b/compute/apiv1/helpers.go index ee6ca2d6cd03..a40fbd73831e 100755 --- a/compute/apiv1/helpers.go +++ b/compute/apiv1/helpers.go @@ -18,10 +18,17 @@ package compute import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" ) +const serviceName = "compute.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +51,39 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/compute.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} diff --git a/compute/apiv1/image_family_views_client.go b/compute/apiv1/image_family_views_client.go index 6709ed3376f9..519f858225e8 100755 --- a/compute/apiv1/image_family_views_client.go +++ b/compute/apiv1/image_family_views_client.go @@ -19,14 +19,13 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -119,6 +118,8 @@ type imageFamilyViewsRESTClient struct { // Points back to the CallOptions field of the containing ImageFamilyViewsClient CallOptions **ImageFamilyViewsCallOptions + + logger *slog.Logger } // NewImageFamilyViewsRESTClient creates a new image family views rest client. @@ -136,6 +137,7 @@ func NewImageFamilyViewsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -208,17 +210,7 @@ func (c *imageFamilyViewsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } diff --git a/compute/apiv1/images_client.go b/compute/apiv1/images_client.go index 890b79ba67ad..8ca4b27ab150 100755 --- a/compute/apiv1/images_client.go +++ b/compute/apiv1/images_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type imagesRESTClient struct { // Points back to the CallOptions field of the containing ImagesClient CallOptions **ImagesCallOptions + + logger *slog.Logger } // NewImagesRESTClient creates a new images rest client. @@ -270,6 +271,7 @@ func NewImagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ima endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -362,17 +364,7 @@ func (c *imagesRESTClient) Delete(ctx context.Context, req *computepb.DeleteImag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -438,17 +430,7 @@ func (c *imagesRESTClient) Deprecate(ctx context.Context, req *computepb.Depreca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Deprecate") if err != nil { return err } @@ -500,17 +482,7 @@ func (c *imagesRESTClient) Get(ctx context.Context, req *computepb.GetImageReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -555,17 +527,7 @@ func (c *imagesRESTClient) GetFromFamily(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFromFamily") if err != nil { return err } @@ -617,17 +579,7 @@ func (c *imagesRESTClient) GetIamPolicy(ctx context.Context, req *computepb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -689,17 +641,7 @@ func (c *imagesRESTClient) Insert(ctx context.Context, req *computepb.InsertImag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -776,21 +718,10 @@ func (c *imagesRESTClient) List(ctx context.Context, req *computepb.ListImagesRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -862,17 +793,7 @@ func (c *imagesRESTClient) Patch(ctx context.Context, req *computepb.PatchImageR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -931,17 +852,7 @@ func (c *imagesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -993,17 +904,7 @@ func (c *imagesRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -1062,17 +963,7 @@ func (c *imagesRESTClient) TestIamPermissions(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/images_client_example_go123_test.go b/compute/apiv1/images_client_example_go123_test.go index b2f032e2702c..5aea0b0bec1c 100644 --- a/compute/apiv1/images_client_example_go123_test.go +++ b/compute/apiv1/images_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleImagesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instance_group_manager_resize_requests_client.go b/compute/apiv1/instance_group_manager_resize_requests_client.go index ec234646119c..56b157776e3a 100755 --- a/compute/apiv1/instance_group_manager_resize_requests_client.go +++ b/compute/apiv1/instance_group_manager_resize_requests_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type instanceGroupManagerResizeRequestsRESTClient struct { // Points back to the CallOptions field of the containing InstanceGroupManagerResizeRequestsClient CallOptions **InstanceGroupManagerResizeRequestsCallOptions + + logger *slog.Logger } // NewInstanceGroupManagerResizeRequestsRESTClient creates a new instance group manager resize requests rest client. @@ -192,6 +193,7 @@ func NewInstanceGroupManagerResizeRequestsRESTClient(ctx context.Context, opts . endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,17 +286,7 @@ func (c *instanceGroupManagerResizeRequestsRESTClient) Cancel(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Cancel") if err != nil { return err } @@ -354,17 +346,7 @@ func (c *instanceGroupManagerResizeRequestsRESTClient) Delete(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -417,17 +399,7 @@ func (c *instanceGroupManagerResizeRequestsRESTClient) Get(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -486,17 +458,7 @@ func (c *instanceGroupManagerResizeRequestsRESTClient) Insert(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -574,21 +536,10 @@ func (c *instanceGroupManagerResizeRequestsRESTClient) List(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/instance_group_manager_resize_requests_client_example_go123_test.go b/compute/apiv1/instance_group_manager_resize_requests_client_example_go123_test.go index d8042f37c4ff..94291cdb7813 100644 --- a/compute/apiv1/instance_group_manager_resize_requests_client_example_go123_test.go +++ b/compute/apiv1/instance_group_manager_resize_requests_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstanceGroupManagerResizeRequestsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instance_group_managers_client.go b/compute/apiv1/instance_group_managers_client.go index 68583f7ae7b9..815bdd7ffb78 100755 --- a/compute/apiv1/instance_group_managers_client.go +++ b/compute/apiv1/instance_group_managers_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -384,6 +383,8 @@ type instanceGroupManagersRESTClient struct { // Points back to the CallOptions field of the containing InstanceGroupManagersClient CallOptions **InstanceGroupManagersCallOptions + + logger *slog.Logger } // NewInstanceGroupManagersRESTClient creates a new instance group managers rest client. @@ -401,6 +402,7 @@ func NewInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -500,17 +502,7 @@ func (c *instanceGroupManagersRESTClient) AbandonInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AbandonInstances") if err != nil { return err } @@ -594,21 +586,10 @@ func (c *instanceGroupManagersRESTClient) AggregatedList(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -680,17 +661,7 @@ func (c *instanceGroupManagersRESTClient) ApplyUpdatesToInstances(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyUpdatesToInstances") if err != nil { return err } @@ -757,17 +728,7 @@ func (c *instanceGroupManagersRESTClient) CreateInstances(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstances") if err != nil { return err } @@ -827,17 +788,7 @@ func (c *instanceGroupManagersRESTClient) Delete(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -904,17 +855,7 @@ func (c *instanceGroupManagersRESTClient) DeleteInstances(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteInstances") if err != nil { return err } @@ -974,17 +915,7 @@ func (c *instanceGroupManagersRESTClient) DeletePerInstanceConfigs(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeletePerInstanceConfigs") if err != nil { return err } @@ -1037,17 +968,7 @@ func (c *instanceGroupManagersRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -1106,17 +1027,7 @@ func (c *instanceGroupManagersRESTClient) Insert(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1194,21 +1105,10 @@ func (c *instanceGroupManagersRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1291,21 +1191,10 @@ func (c *instanceGroupManagersRESTClient) ListErrors(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListErrors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1388,21 +1277,10 @@ func (c *instanceGroupManagersRESTClient) ListManagedInstances(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListManagedInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1485,21 +1363,10 @@ func (c *instanceGroupManagersRESTClient) ListPerInstanceConfigs(ctx context.Con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPerInstanceConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1571,17 +1438,7 @@ func (c *instanceGroupManagersRESTClient) Patch(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1648,17 +1505,7 @@ func (c *instanceGroupManagersRESTClient) PatchPerInstanceConfigs(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchPerInstanceConfigs") if err != nil { return err } @@ -1725,17 +1572,7 @@ func (c *instanceGroupManagersRESTClient) RecreateInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RecreateInstances") if err != nil { return err } @@ -1796,17 +1633,7 @@ func (c *instanceGroupManagersRESTClient) Resize(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Resize") if err != nil { return err } @@ -1873,17 +1700,7 @@ func (c *instanceGroupManagersRESTClient) ResumeInstances(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeInstances") if err != nil { return err } @@ -1950,17 +1767,7 @@ func (c *instanceGroupManagersRESTClient) SetInstanceTemplate(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInstanceTemplate") if err != nil { return err } @@ -2027,17 +1834,7 @@ func (c *instanceGroupManagersRESTClient) SetTargetPools(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetTargetPools") if err != nil { return err } @@ -2104,17 +1901,7 @@ func (c *instanceGroupManagersRESTClient) StartInstances(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartInstances") if err != nil { return err } @@ -2181,17 +1968,7 @@ func (c *instanceGroupManagersRESTClient) StopInstances(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopInstances") if err != nil { return err } @@ -2258,17 +2035,7 @@ func (c *instanceGroupManagersRESTClient) SuspendInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuspendInstances") if err != nil { return err } @@ -2335,17 +2102,7 @@ func (c *instanceGroupManagersRESTClient) UpdatePerInstanceConfigs(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePerInstanceConfigs") if err != nil { return err } diff --git a/compute/apiv1/instance_group_managers_client_example_go123_test.go b/compute/apiv1/instance_group_managers_client_example_go123_test.go index 43e03d6662ef..c14da9746839 100644 --- a/compute/apiv1/instance_group_managers_client_example_go123_test.go +++ b/compute/apiv1/instance_group_managers_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstanceGroupManagersClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstanceGroupManagersClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleInstanceGroupManagersClient_ListErrors_all() { } for resp, err := range c.ListErrors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleInstanceGroupManagersClient_ListManagedInstances_all() { } for resp, err := range c.ListManagedInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleInstanceGroupManagersClient_ListPerInstanceConfigs_all() { } for resp, err := range c.ListPerInstanceConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instance_groups_client.go b/compute/apiv1/instance_groups_client.go index ad4fc6d05726..2df0f523bc0f 100755 --- a/compute/apiv1/instance_groups_client.go +++ b/compute/apiv1/instance_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -225,6 +224,8 @@ type instanceGroupsRESTClient struct { // Points back to the CallOptions field of the containing InstanceGroupsClient CallOptions **InstanceGroupsCallOptions + + logger *slog.Logger } // NewInstanceGroupsRESTClient creates a new instance groups rest client. @@ -242,6 +243,7 @@ func NewInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -341,17 +343,7 @@ func (c *instanceGroupsRESTClient) AddInstances(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddInstances") if err != nil { return err } @@ -435,21 +427,10 @@ func (c *instanceGroupsRESTClient) AggregatedList(ctx context.Context, req *comp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -521,17 +502,7 @@ func (c *instanceGroupsRESTClient) Delete(ctx context.Context, req *computepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -584,17 +555,7 @@ func (c *instanceGroupsRESTClient) Get(ctx context.Context, req *computepb.GetIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -653,17 +614,7 @@ func (c *instanceGroupsRESTClient) Insert(ctx context.Context, req *computepb.In httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -741,21 +692,10 @@ func (c *instanceGroupsRESTClient) List(ctx context.Context, req *computepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -844,21 +784,10 @@ func (c *instanceGroupsRESTClient) ListInstances(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -930,17 +859,7 @@ func (c *instanceGroupsRESTClient) RemoveInstances(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveInstances") if err != nil { return err } @@ -1007,17 +926,7 @@ func (c *instanceGroupsRESTClient) SetNamedPorts(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNamedPorts") if err != nil { return err } diff --git a/compute/apiv1/instance_groups_client_example_go123_test.go b/compute/apiv1/instance_groups_client_example_go123_test.go index 7f9ae5eaa258..1404b69c8bb7 100644 --- a/compute/apiv1/instance_groups_client_example_go123_test.go +++ b/compute/apiv1/instance_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstanceGroupsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstanceGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleInstanceGroupsClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instance_settings_client.go b/compute/apiv1/instance_settings_client.go index ac72d6decf39..24082080abf0 100755 --- a/compute/apiv1/instance_settings_client.go +++ b/compute/apiv1/instance_settings_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -133,6 +132,8 @@ type instanceSettingsRESTClient struct { // Points back to the CallOptions field of the containing InstanceSettingsClient CallOptions **InstanceSettingsCallOptions + + logger *slog.Logger } // NewInstanceSettingsRESTClient creates a new instance settings service rest client. @@ -150,6 +151,7 @@ func NewInstanceSettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -235,17 +237,7 @@ func (c *instanceSettingsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -307,17 +299,7 @@ func (c *instanceSettingsRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/instance_templates_client.go b/compute/apiv1/instance_templates_client.go index 1c00b68598ed..bc867448c4dc 100755 --- a/compute/apiv1/instance_templates_client.go +++ b/compute/apiv1/instance_templates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -224,6 +223,8 @@ type instanceTemplatesRESTClient struct { // Points back to the CallOptions field of the containing InstanceTemplatesClient CallOptions **InstanceTemplatesCallOptions + + logger *slog.Logger } // NewInstanceTemplatesRESTClient creates a new instance templates rest client. @@ -241,6 +242,7 @@ func NewInstanceTemplatesRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -357,21 +359,10 @@ func (c *instanceTemplatesRESTClient) AggregatedList(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -443,17 +434,7 @@ func (c *instanceTemplatesRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -505,17 +486,7 @@ func (c *instanceTemplatesRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -567,17 +538,7 @@ func (c *instanceTemplatesRESTClient) GetIamPolicy(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -636,17 +597,7 @@ func (c *instanceTemplatesRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -723,21 +674,10 @@ func (c *instanceTemplatesRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -802,17 +742,7 @@ func (c *instanceTemplatesRESTClient) SetIamPolicy(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -864,17 +794,7 @@ func (c *instanceTemplatesRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/instance_templates_client_example_go123_test.go b/compute/apiv1/instance_templates_client_example_go123_test.go index fe9092dbd5f7..52af4ff150e7 100644 --- a/compute/apiv1/instance_templates_client_example_go123_test.go +++ b/compute/apiv1/instance_templates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstanceTemplatesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstanceTemplatesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instances_client.go b/compute/apiv1/instances_client.go index f885e3cd6bf8..39571fa17fb8 100755 --- a/compute/apiv1/instances_client.go +++ b/compute/apiv1/instances_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -678,6 +677,8 @@ type instancesRESTClient struct { // Points back to the CallOptions field of the containing InstancesClient CallOptions **InstancesCallOptions + + logger *slog.Logger } // NewInstancesRESTClient creates a new instances rest client. @@ -695,6 +696,7 @@ func NewInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -795,17 +797,7 @@ func (c *instancesRESTClient) AddAccessConfig(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddAccessConfig") if err != nil { return err } @@ -872,17 +864,7 @@ func (c *instancesRESTClient) AddResourcePolicies(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddResourcePolicies") if err != nil { return err } @@ -966,21 +948,10 @@ func (c *instancesRESTClient) AggregatedList(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1062,17 +1033,7 @@ func (c *instancesRESTClient) AttachDisk(ctx context.Context, req *computepb.Att httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AttachDisk") if err != nil { return err } @@ -1139,17 +1100,7 @@ func (c *instancesRESTClient) BulkInsert(ctx context.Context, req *computepb.Bul httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkInsert") if err != nil { return err } @@ -1209,17 +1160,7 @@ func (c *instancesRESTClient) Delete(ctx context.Context, req *computepb.DeleteI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -1281,17 +1222,7 @@ func (c *instancesRESTClient) DeleteAccessConfig(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccessConfig") if err != nil { return err } @@ -1352,17 +1283,7 @@ func (c *instancesRESTClient) DetachDisk(ctx context.Context, req *computepb.Det httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DetachDisk") if err != nil { return err } @@ -1415,17 +1336,7 @@ func (c *instancesRESTClient) Get(ctx context.Context, req *computepb.GetInstanc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -1475,17 +1386,7 @@ func (c *instancesRESTClient) GetEffectiveFirewalls(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveFirewalls") if err != nil { return err } @@ -1540,17 +1441,7 @@ func (c *instancesRESTClient) GetGuestAttributes(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGuestAttributes") if err != nil { return err } @@ -1602,17 +1493,7 @@ func (c *instancesRESTClient) GetIamPolicy(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1657,17 +1538,7 @@ func (c *instancesRESTClient) GetScreenshot(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetScreenshot") if err != nil { return err } @@ -1722,17 +1593,7 @@ func (c *instancesRESTClient) GetSerialPortOutput(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSerialPortOutput") if err != nil { return err } @@ -1777,17 +1638,7 @@ func (c *instancesRESTClient) GetShieldedInstanceIdentity(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetShieldedInstanceIdentity") if err != nil { return err } @@ -1852,17 +1703,7 @@ func (c *instancesRESTClient) Insert(ctx context.Context, req *computepb.InsertI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1940,21 +1781,10 @@ func (c *instancesRESTClient) List(ctx context.Context, req *computepb.ListInsta } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2037,21 +1867,10 @@ func (c *instancesRESTClient) ListReferrers(ctx context.Context, req *computepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReferrers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2116,17 +1935,7 @@ func (c *instancesRESTClient) PerformMaintenance(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "PerformMaintenance") if err != nil { return err } @@ -2193,17 +2002,7 @@ func (c *instancesRESTClient) RemoveResourcePolicies(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveResourcePolicies") if err != nil { return err } @@ -2263,17 +2062,7 @@ func (c *instancesRESTClient) Reset(ctx context.Context, req *computepb.ResetIns httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Reset") if err != nil { return err } @@ -2333,17 +2122,7 @@ func (c *instancesRESTClient) Resume(ctx context.Context, req *computepb.ResumeI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Resume") if err != nil { return err } @@ -2396,17 +2175,7 @@ func (c *instancesRESTClient) SendDiagnosticInterrupt(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SendDiagnosticInterrupt") if err != nil { return err } @@ -2461,17 +2230,7 @@ func (c *instancesRESTClient) SetDeletionProtection(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SetDeletionProtection") if err != nil { return err } @@ -2533,17 +2292,7 @@ func (c *instancesRESTClient) SetDiskAutoDelete(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SetDiskAutoDelete") if err != nil { return err } @@ -2603,17 +2352,7 @@ func (c *instancesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2672,17 +2411,7 @@ func (c *instancesRESTClient) SetLabels(ctx context.Context, req *computepb.SetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -2749,17 +2478,7 @@ func (c *instancesRESTClient) SetMachineResources(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMachineResources") if err != nil { return err } @@ -2826,17 +2545,7 @@ func (c *instancesRESTClient) SetMachineType(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMachineType") if err != nil { return err } @@ -2903,17 +2612,7 @@ func (c *instancesRESTClient) SetMetadata(ctx context.Context, req *computepb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMetadata") if err != nil { return err } @@ -2980,17 +2679,7 @@ func (c *instancesRESTClient) SetMinCpuPlatform(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMinCpuPlatform") if err != nil { return err } @@ -3057,17 +2746,7 @@ func (c *instancesRESTClient) SetName(ctx context.Context, req *computepb.SetNam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetName") if err != nil { return err } @@ -3134,17 +2813,7 @@ func (c *instancesRESTClient) SetScheduling(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetScheduling") if err != nil { return err } @@ -3211,17 +2880,7 @@ func (c *instancesRESTClient) SetSecurityPolicy(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSecurityPolicy") if err != nil { return err } @@ -3288,17 +2947,7 @@ func (c *instancesRESTClient) SetServiceAccount(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetServiceAccount") if err != nil { return err } @@ -3365,17 +3014,7 @@ func (c *instancesRESTClient) SetShieldedInstanceIntegrityPolicy(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetShieldedInstanceIntegrityPolicy") if err != nil { return err } @@ -3442,17 +3081,7 @@ func (c *instancesRESTClient) SetTags(ctx context.Context, req *computepb.SetTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetTags") if err != nil { return err } @@ -3515,17 +3144,7 @@ func (c *instancesRESTClient) SimulateMaintenanceEvent(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SimulateMaintenanceEvent") if err != nil { return err } @@ -3585,17 +3204,7 @@ func (c *instancesRESTClient) Start(ctx context.Context, req *computepb.StartIns httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Start") if err != nil { return err } @@ -3662,17 +3271,7 @@ func (c *instancesRESTClient) StartWithEncryptionKey(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartWithEncryptionKey") if err != nil { return err } @@ -3735,17 +3334,7 @@ func (c *instancesRESTClient) Stop(ctx context.Context, req *computepb.StopInsta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Stop") if err != nil { return err } @@ -3808,17 +3397,7 @@ func (c *instancesRESTClient) Suspend(ctx context.Context, req *computepb.Suspen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Suspend") if err != nil { return err } @@ -3878,17 +3457,7 @@ func (c *instancesRESTClient) TestIamPermissions(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3953,17 +3522,7 @@ func (c *instancesRESTClient) Update(ctx context.Context, req *computepb.UpdateI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } @@ -4031,17 +3590,7 @@ func (c *instancesRESTClient) UpdateAccessConfig(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccessConfig") if err != nil { return err } @@ -4108,17 +3657,7 @@ func (c *instancesRESTClient) UpdateDisplayDevice(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDisplayDevice") if err != nil { return err } @@ -4186,17 +3725,7 @@ func (c *instancesRESTClient) UpdateNetworkInterface(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNetworkInterface") if err != nil { return err } @@ -4263,17 +3792,7 @@ func (c *instancesRESTClient) UpdateShieldedInstanceConfig(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateShieldedInstanceConfig") if err != nil { return err } diff --git a/compute/apiv1/instances_client_example_go123_test.go b/compute/apiv1/instances_client_example_go123_test.go index c90825926c8a..f587cf2435f7 100644 --- a/compute/apiv1/instances_client_example_go123_test.go +++ b/compute/apiv1/instances_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstancesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstancesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleInstancesClient_ListReferrers_all() { } for resp, err := range c.ListReferrers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/instant_snapshots_client.go b/compute/apiv1/instant_snapshots_client.go index 9c274871db89..97d683755abd 100755 --- a/compute/apiv1/instant_snapshots_client.go +++ b/compute/apiv1/instant_snapshots_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type instantSnapshotsRESTClient struct { // Points back to the CallOptions field of the containing InstantSnapshotsClient CallOptions **InstantSnapshotsCallOptions + + logger *slog.Logger } // NewInstantSnapshotsRESTClient creates a new instant snapshots rest client. @@ -251,6 +252,7 @@ func NewInstantSnapshotsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,21 +369,10 @@ func (c *instantSnapshotsRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -453,17 +444,7 @@ func (c *instantSnapshotsRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -516,17 +497,7 @@ func (c *instantSnapshotsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -578,17 +549,7 @@ func (c *instantSnapshotsRESTClient) GetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -647,17 +608,7 @@ func (c *instantSnapshotsRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -735,21 +686,10 @@ func (c *instantSnapshotsRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -814,17 +754,7 @@ func (c *instantSnapshotsRESTClient) SetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -883,17 +813,7 @@ func (c *instantSnapshotsRESTClient) SetLabels(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -953,17 +873,7 @@ func (c *instantSnapshotsRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/instant_snapshots_client_example_go123_test.go b/compute/apiv1/instant_snapshots_client_example_go123_test.go index cf779b9d2df1..8cbe33780a88 100644 --- a/compute/apiv1/instant_snapshots_client_example_go123_test.go +++ b/compute/apiv1/instant_snapshots_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstantSnapshotsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstantSnapshotsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/interconnect_attachments_client.go b/compute/apiv1/interconnect_attachments_client.go index 82809cbaabd4..4e93cc7c2494 100755 --- a/compute/apiv1/interconnect_attachments_client.go +++ b/compute/apiv1/interconnect_attachments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type interconnectAttachmentsRESTClient struct { // Points back to the CallOptions field of the containing InterconnectAttachmentsClient CallOptions **InterconnectAttachmentsCallOptions + + logger *slog.Logger } // NewInterconnectAttachmentsRESTClient creates a new interconnect attachments rest client. @@ -222,6 +223,7 @@ func NewInterconnectAttachmentsRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *interconnectAttachmentsRESTClient) AggregatedList(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *interconnectAttachmentsRESTClient) Delete(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -487,17 +468,7 @@ func (c *interconnectAttachmentsRESTClient) Get(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -559,17 +530,7 @@ func (c *interconnectAttachmentsRESTClient) Insert(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -647,21 +608,10 @@ func (c *interconnectAttachmentsRESTClient) List(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -733,17 +683,7 @@ func (c *interconnectAttachmentsRESTClient) Patch(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -810,17 +750,7 @@ func (c *interconnectAttachmentsRESTClient) SetLabels(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/interconnect_attachments_client_example_go123_test.go b/compute/apiv1/interconnect_attachments_client_example_go123_test.go index 8fc148745ebd..9edb5c536a55 100644 --- a/compute/apiv1/interconnect_attachments_client_example_go123_test.go +++ b/compute/apiv1/interconnect_attachments_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInterconnectAttachmentsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInterconnectAttachmentsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/interconnect_locations_client.go b/compute/apiv1/interconnect_locations_client.go index b9c37ce85725..729bec46fae7 100755 --- a/compute/apiv1/interconnect_locations_client.go +++ b/compute/apiv1/interconnect_locations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type interconnectLocationsRESTClient struct { // Points back to the CallOptions field of the containing InterconnectLocationsClient CallOptions **InterconnectLocationsCallOptions + + logger *slog.Logger } // NewInterconnectLocationsRESTClient creates a new interconnect locations rest client. @@ -158,6 +159,7 @@ func NewInterconnectLocationsRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *interconnectLocationsRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *interconnectLocationsRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/interconnect_locations_client_example_go123_test.go b/compute/apiv1/interconnect_locations_client_example_go123_test.go index f0a91d2d8399..d2d1900ba006 100644 --- a/compute/apiv1/interconnect_locations_client_example_go123_test.go +++ b/compute/apiv1/interconnect_locations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInterconnectLocationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/interconnect_remote_locations_client.go b/compute/apiv1/interconnect_remote_locations_client.go index 08e359f85a17..3b1feb485533 100755 --- a/compute/apiv1/interconnect_remote_locations_client.go +++ b/compute/apiv1/interconnect_remote_locations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type interconnectRemoteLocationsRESTClient struct { // Points back to the CallOptions field of the containing InterconnectRemoteLocationsClient CallOptions **InterconnectRemoteLocationsCallOptions + + logger *slog.Logger } // NewInterconnectRemoteLocationsRESTClient creates a new interconnect remote locations rest client. @@ -158,6 +159,7 @@ func NewInterconnectRemoteLocationsRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *interconnectRemoteLocationsRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *interconnectRemoteLocationsRESTClient) List(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/interconnect_remote_locations_client_example_go123_test.go b/compute/apiv1/interconnect_remote_locations_client_example_go123_test.go index cd16b628ceb2..44591370233b 100644 --- a/compute/apiv1/interconnect_remote_locations_client_example_go123_test.go +++ b/compute/apiv1/interconnect_remote_locations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInterconnectRemoteLocationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/interconnects_client.go b/compute/apiv1/interconnects_client.go index f58bc06d294a..0789efc9a266 100755 --- a/compute/apiv1/interconnects_client.go +++ b/compute/apiv1/interconnects_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -223,6 +222,8 @@ type interconnectsRESTClient struct { // Points back to the CallOptions field of the containing InterconnectsClient CallOptions **InterconnectsCallOptions + + logger *slog.Logger } // NewInterconnectsRESTClient creates a new interconnects rest client. @@ -240,6 +241,7 @@ func NewInterconnectsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -332,17 +334,7 @@ func (c *interconnectsRESTClient) Delete(ctx context.Context, req *computepb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -394,17 +386,7 @@ func (c *interconnectsRESTClient) Get(ctx context.Context, req *computepb.GetInt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -449,17 +431,7 @@ func (c *interconnectsRESTClient) GetDiagnostics(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDiagnostics") if err != nil { return err } @@ -504,17 +476,7 @@ func (c *interconnectsRESTClient) GetMacsecConfig(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMacsecConfig") if err != nil { return err } @@ -573,17 +535,7 @@ func (c *interconnectsRESTClient) Insert(ctx context.Context, req *computepb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -660,21 +612,10 @@ func (c *interconnectsRESTClient) List(ctx context.Context, req *computepb.ListI } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -746,17 +687,7 @@ func (c *interconnectsRESTClient) Patch(ctx context.Context, req *computepb.Patc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -815,17 +746,7 @@ func (c *interconnectsRESTClient) SetLabels(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/interconnects_client_example_go123_test.go b/compute/apiv1/interconnects_client_example_go123_test.go index 12baf6eb48bb..dfdbb7e800f5 100644 --- a/compute/apiv1/interconnects_client_example_go123_test.go +++ b/compute/apiv1/interconnects_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInterconnectsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/license_codes_client.go b/compute/apiv1/license_codes_client.go index cbc598b65a1c..c686e470005c 100755 --- a/compute/apiv1/license_codes_client.go +++ b/compute/apiv1/license_codes_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -130,6 +129,8 @@ type licenseCodesRESTClient struct { // Points back to the CallOptions field of the containing LicenseCodesClient CallOptions **LicenseCodesCallOptions + + logger *slog.Logger } // NewLicenseCodesRESTClient creates a new license codes rest client. @@ -147,6 +148,7 @@ func NewLicenseCodesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -219,17 +221,7 @@ func (c *licenseCodesRESTClient) Get(ctx context.Context, req *computepb.GetLice httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -281,17 +273,7 @@ func (c *licenseCodesRESTClient) TestIamPermissions(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/licenses_client.go b/compute/apiv1/licenses_client.go index bdb37a18e107..c5a41b21c7b1 100755 --- a/compute/apiv1/licenses_client.go +++ b/compute/apiv1/licenses_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type licensesRESTClient struct { // Points back to the CallOptions field of the containing LicensesClient CallOptions **LicensesCallOptions + + logger *slog.Logger } // NewLicensesRESTClient creates a new licenses rest client. @@ -221,6 +222,7 @@ func NewLicensesRESTClient(ctx context.Context, opts ...option.ClientOption) (*L endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -313,17 +315,7 @@ func (c *licensesRESTClient) Delete(ctx context.Context, req *computepb.DeleteLi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -375,17 +367,7 @@ func (c *licensesRESTClient) Get(ctx context.Context, req *computepb.GetLicenseR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -437,17 +419,7 @@ func (c *licensesRESTClient) GetIamPolicy(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -506,17 +478,7 @@ func (c *licensesRESTClient) Insert(ctx context.Context, req *computepb.InsertLi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -593,21 +555,10 @@ func (c *licensesRESTClient) List(ctx context.Context, req *computepb.ListLicens } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -672,17 +623,7 @@ func (c *licensesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -734,17 +675,7 @@ func (c *licensesRESTClient) TestIamPermissions(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/licenses_client_example_go123_test.go b/compute/apiv1/licenses_client_example_go123_test.go index e9d450c31a98..80429f517f25 100644 --- a/compute/apiv1/licenses_client_example_go123_test.go +++ b/compute/apiv1/licenses_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLicensesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/machine_images_client.go b/compute/apiv1/machine_images_client.go index 663b020c07c1..efcfb18ea57f 100755 --- a/compute/apiv1/machine_images_client.go +++ b/compute/apiv1/machine_images_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type machineImagesRESTClient struct { // Points back to the CallOptions field of the containing MachineImagesClient CallOptions **MachineImagesCallOptions + + logger *slog.Logger } // NewMachineImagesRESTClient creates a new machine images rest client. @@ -221,6 +222,7 @@ func NewMachineImagesRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -313,17 +315,7 @@ func (c *machineImagesRESTClient) Delete(ctx context.Context, req *computepb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -375,17 +367,7 @@ func (c *machineImagesRESTClient) Get(ctx context.Context, req *computepb.GetMac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -437,17 +419,7 @@ func (c *machineImagesRESTClient) GetIamPolicy(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -509,17 +481,7 @@ func (c *machineImagesRESTClient) Insert(ctx context.Context, req *computepb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -596,21 +558,10 @@ func (c *machineImagesRESTClient) List(ctx context.Context, req *computepb.ListM } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -675,17 +626,7 @@ func (c *machineImagesRESTClient) SetIamPolicy(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -737,17 +678,7 @@ func (c *machineImagesRESTClient) TestIamPermissions(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/machine_images_client_example_go123_test.go b/compute/apiv1/machine_images_client_example_go123_test.go index 2ea9942a3f48..0bcc09d09edd 100644 --- a/compute/apiv1/machine_images_client_example_go123_test.go +++ b/compute/apiv1/machine_images_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMachineImagesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/machine_types_client.go b/compute/apiv1/machine_types_client.go index 6ba0462be413..66f53576612b 100755 --- a/compute/apiv1/machine_types_client.go +++ b/compute/apiv1/machine_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type machineTypesRESTClient struct { // Points back to the CallOptions field of the containing MachineTypesClient CallOptions **MachineTypesCallOptions + + logger *slog.Logger } // NewMachineTypesRESTClient creates a new machine types rest client. @@ -178,6 +179,7 @@ func NewMachineTypesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -281,21 +283,10 @@ func (c *machineTypesRESTClient) AggregatedList(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -360,17 +351,7 @@ func (c *machineTypesRESTClient) Get(ctx context.Context, req *computepb.GetMach httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -440,21 +421,10 @@ func (c *machineTypesRESTClient) List(ctx context.Context, req *computepb.ListMa } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/machine_types_client_example_go123_test.go b/compute/apiv1/machine_types_client_example_go123_test.go index c56627e7b571..b99fa49b2131 100644 --- a/compute/apiv1/machine_types_client_example_go123_test.go +++ b/compute/apiv1/machine_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMachineTypesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleMachineTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/network_attachments_client.go b/compute/apiv1/network_attachments_client.go index c7b715ee8a4c..aa86c6475a8f 100755 --- a/compute/apiv1/network_attachments_client.go +++ b/compute/apiv1/network_attachments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type networkAttachmentsRESTClient struct { // Points back to the CallOptions field of the containing NetworkAttachmentsClient CallOptions **NetworkAttachmentsCallOptions + + logger *slog.Logger } // NewNetworkAttachmentsRESTClient creates a new network attachments rest client. @@ -251,6 +252,7 @@ func NewNetworkAttachmentsRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,21 +369,10 @@ func (c *networkAttachmentsRESTClient) AggregatedList(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -453,17 +444,7 @@ func (c *networkAttachmentsRESTClient) Delete(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -516,17 +497,7 @@ func (c *networkAttachmentsRESTClient) Get(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -578,17 +549,7 @@ func (c *networkAttachmentsRESTClient) GetIamPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -647,17 +608,7 @@ func (c *networkAttachmentsRESTClient) Insert(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -735,21 +686,10 @@ func (c *networkAttachmentsRESTClient) List(ctx context.Context, req *computepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -821,17 +761,7 @@ func (c *networkAttachmentsRESTClient) Patch(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -891,17 +821,7 @@ func (c *networkAttachmentsRESTClient) SetIamPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -953,17 +873,7 @@ func (c *networkAttachmentsRESTClient) TestIamPermissions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/network_attachments_client_example_go123_test.go b/compute/apiv1/network_attachments_client_example_go123_test.go index 0ec1375ea938..2b01dcb460d4 100644 --- a/compute/apiv1/network_attachments_client_example_go123_test.go +++ b/compute/apiv1/network_attachments_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworkAttachmentsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNetworkAttachmentsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/network_edge_security_services_client.go b/compute/apiv1/network_edge_security_services_client.go index 98e4f38d1e6a..753f72ec524c 100755 --- a/compute/apiv1/network_edge_security_services_client.go +++ b/compute/apiv1/network_edge_security_services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -176,6 +175,8 @@ type networkEdgeSecurityServicesRESTClient struct { // Points back to the CallOptions field of the containing NetworkEdgeSecurityServicesClient CallOptions **NetworkEdgeSecurityServicesCallOptions + + logger *slog.Logger } // NewNetworkEdgeSecurityServicesRESTClient creates a new network edge security services rest client. @@ -193,6 +194,7 @@ func NewNetworkEdgeSecurityServicesRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -309,21 +311,10 @@ func (c *networkEdgeSecurityServicesRESTClient) AggregatedList(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -395,17 +386,7 @@ func (c *networkEdgeSecurityServicesRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -458,17 +439,7 @@ func (c *networkEdgeSecurityServicesRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -530,17 +501,7 @@ func (c *networkEdgeSecurityServicesRESTClient) Insert(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -613,17 +574,7 @@ func (c *networkEdgeSecurityServicesRESTClient) Patch(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/network_edge_security_services_client_example_go123_test.go b/compute/apiv1/network_edge_security_services_client_example_go123_test.go index 2559a57866eb..e26d7eada32e 100644 --- a/compute/apiv1/network_edge_security_services_client_example_go123_test.go +++ b/compute/apiv1/network_edge_security_services_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworkEdgeSecurityServicesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/network_endpoint_groups_client.go b/compute/apiv1/network_endpoint_groups_client.go index 41fcb69035e1..7516c319b296 100755 --- a/compute/apiv1/network_endpoint_groups_client.go +++ b/compute/apiv1/network_endpoint_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -225,6 +224,8 @@ type networkEndpointGroupsRESTClient struct { // Points back to the CallOptions field of the containing NetworkEndpointGroupsClient CallOptions **NetworkEndpointGroupsCallOptions + + logger *slog.Logger } // NewNetworkEndpointGroupsRESTClient creates a new network endpoint groups rest client. @@ -242,6 +243,7 @@ func NewNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -358,21 +360,10 @@ func (c *networkEndpointGroupsRESTClient) AggregatedList(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -451,17 +442,7 @@ func (c *networkEndpointGroupsRESTClient) AttachNetworkEndpoints(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AttachNetworkEndpoints") if err != nil { return err } @@ -521,17 +502,7 @@ func (c *networkEndpointGroupsRESTClient) Delete(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -598,17 +569,7 @@ func (c *networkEndpointGroupsRESTClient) DetachNetworkEndpoints(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetachNetworkEndpoints") if err != nil { return err } @@ -661,17 +622,7 @@ func (c *networkEndpointGroupsRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -730,17 +681,7 @@ func (c *networkEndpointGroupsRESTClient) Insert(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -818,21 +759,10 @@ func (c *networkEndpointGroupsRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -921,21 +851,10 @@ func (c *networkEndpointGroupsRESTClient) ListNetworkEndpoints(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListNetworkEndpoints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1000,17 +919,7 @@ func (c *networkEndpointGroupsRESTClient) TestIamPermissions(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/network_endpoint_groups_client_example_go123_test.go b/compute/apiv1/network_endpoint_groups_client_example_go123_test.go index 006129fa1180..3c5990f5d3a2 100644 --- a/compute/apiv1/network_endpoint_groups_client_example_go123_test.go +++ b/compute/apiv1/network_endpoint_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworkEndpointGroupsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNetworkEndpointGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleNetworkEndpointGroupsClient_ListNetworkEndpoints_all() { } for resp, err := range c.ListNetworkEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/network_firewall_policies_client.go b/compute/apiv1/network_firewall_policies_client.go index f58af07adf58..2a1792bd8fd4 100755 --- a/compute/apiv1/network_firewall_policies_client.go +++ b/compute/apiv1/network_firewall_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -312,6 +311,8 @@ type networkFirewallPoliciesRESTClient struct { // Points back to the CallOptions field of the containing NetworkFirewallPoliciesClient CallOptions **NetworkFirewallPoliciesCallOptions + + logger *slog.Logger } // NewNetworkFirewallPoliciesRESTClient creates a new network firewall policies rest client. @@ -329,6 +330,7 @@ func NewNetworkFirewallPoliciesRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -431,17 +433,7 @@ func (c *networkFirewallPoliciesRESTClient) AddAssociation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddAssociation") if err != nil { return err } @@ -513,17 +505,7 @@ func (c *networkFirewallPoliciesRESTClient) AddRule(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddRule") if err != nil { return err } @@ -585,17 +567,7 @@ func (c *networkFirewallPoliciesRESTClient) CloneRules(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CloneRules") if err != nil { return err } @@ -654,17 +626,7 @@ func (c *networkFirewallPoliciesRESTClient) Delete(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -716,17 +678,7 @@ func (c *networkFirewallPoliciesRESTClient) Get(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -778,17 +730,7 @@ func (c *networkFirewallPoliciesRESTClient) GetAssociation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAssociation") if err != nil { return err } @@ -840,17 +782,7 @@ func (c *networkFirewallPoliciesRESTClient) GetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -902,17 +834,7 @@ func (c *networkFirewallPoliciesRESTClient) GetRule(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -971,17 +893,7 @@ func (c *networkFirewallPoliciesRESTClient) Insert(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1058,21 +970,10 @@ func (c *networkFirewallPoliciesRESTClient) List(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1144,17 +1045,7 @@ func (c *networkFirewallPoliciesRESTClient) Patch(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1223,17 +1114,7 @@ func (c *networkFirewallPoliciesRESTClient) PatchRule(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchRule") if err != nil { return err } @@ -1295,17 +1176,7 @@ func (c *networkFirewallPoliciesRESTClient) RemoveAssociation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveAssociation") if err != nil { return err } @@ -1367,17 +1238,7 @@ func (c *networkFirewallPoliciesRESTClient) RemoveRule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveRule") if err != nil { return err } @@ -1436,17 +1297,7 @@ func (c *networkFirewallPoliciesRESTClient) SetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1498,17 +1349,7 @@ func (c *networkFirewallPoliciesRESTClient) TestIamPermissions(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/network_firewall_policies_client_example_go123_test.go b/compute/apiv1/network_firewall_policies_client_example_go123_test.go index a887ba2591da..a2c5353d7dd6 100644 --- a/compute/apiv1/network_firewall_policies_client_example_go123_test.go +++ b/compute/apiv1/network_firewall_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworkFirewallPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/network_profiles_client.go b/compute/apiv1/network_profiles_client.go index e37c87a16f2d..aea4edfc1ccd 100755 --- a/compute/apiv1/network_profiles_client.go +++ b/compute/apiv1/network_profiles_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type networkProfilesRESTClient struct { // Points back to the CallOptions field of the containing NetworkProfilesClient CallOptions **NetworkProfilesCallOptions + + logger *slog.Logger } // NewNetworkProfilesRESTClient creates a new network profiles rest client. @@ -158,6 +159,7 @@ func NewNetworkProfilesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *networkProfilesRESTClient) Get(ctx context.Context, req *computepb.GetN httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *networkProfilesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/network_profiles_client_example_go123_test.go b/compute/apiv1/network_profiles_client_example_go123_test.go index 24f88b6a99d7..1838f14a6c4f 100644 --- a/compute/apiv1/network_profiles_client_example_go123_test.go +++ b/compute/apiv1/network_profiles_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworkProfilesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/networks_client.go b/compute/apiv1/networks_client.go index af74500998eb..bfabe87d4395 100755 --- a/compute/apiv1/networks_client.go +++ b/compute/apiv1/networks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type networksRESTClient struct { // Points back to the CallOptions field of the containing NetworksClient CallOptions **NetworksCallOptions + + logger *slog.Logger } // NewNetworksRESTClient creates a new networks rest client. @@ -270,6 +271,7 @@ func NewNetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*N endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -369,17 +371,7 @@ func (c *networksRESTClient) AddPeering(ctx context.Context, req *computepb.AddP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddPeering") if err != nil { return err } @@ -438,17 +430,7 @@ func (c *networksRESTClient) Delete(ctx context.Context, req *computepb.DeleteNe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -500,17 +482,7 @@ func (c *networksRESTClient) Get(ctx context.Context, req *computepb.GetNetworkR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -555,17 +527,7 @@ func (c *networksRESTClient) GetEffectiveFirewalls(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveFirewalls") if err != nil { return err } @@ -624,17 +586,7 @@ func (c *networksRESTClient) Insert(ctx context.Context, req *computepb.InsertNe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -711,21 +663,10 @@ func (c *networksRESTClient) List(ctx context.Context, req *computepb.ListNetwor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -817,21 +758,10 @@ func (c *networksRESTClient) ListPeeringRoutes(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPeeringRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -903,17 +833,7 @@ func (c *networksRESTClient) Patch(ctx context.Context, req *computepb.PatchNetw httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -979,17 +899,7 @@ func (c *networksRESTClient) RemovePeering(ctx context.Context, req *computepb.R httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemovePeering") if err != nil { return err } @@ -1048,17 +958,7 @@ func (c *networksRESTClient) SwitchToCustomMode(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SwitchToCustomMode") if err != nil { return err } @@ -1124,17 +1024,7 @@ func (c *networksRESTClient) UpdatePeering(ctx context.Context, req *computepb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePeering") if err != nil { return err } diff --git a/compute/apiv1/networks_client_example_go123_test.go b/compute/apiv1/networks_client_example_go123_test.go index 2453cba5a899..78991fcc53b1 100644 --- a/compute/apiv1/networks_client_example_go123_test.go +++ b/compute/apiv1/networks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNetworksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNetworksClient_ListPeeringRoutes_all() { } for resp, err := range c.ListPeeringRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/node_groups_client.go b/compute/apiv1/node_groups_client.go index 1f30b495860e..7eeb7f2fc700 100755 --- a/compute/apiv1/node_groups_client.go +++ b/compute/apiv1/node_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -294,6 +293,8 @@ type nodeGroupsRESTClient struct { // Points back to the CallOptions field of the containing NodeGroupsClient CallOptions **NodeGroupsCallOptions + + logger *slog.Logger } // NewNodeGroupsRESTClient creates a new node groups rest client. @@ -311,6 +312,7 @@ func NewNodeGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -410,17 +412,7 @@ func (c *nodeGroupsRESTClient) AddNodes(ctx context.Context, req *computepb.AddN httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddNodes") if err != nil { return err } @@ -504,21 +496,10 @@ func (c *nodeGroupsRESTClient) AggregatedList(ctx context.Context, req *computep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -590,17 +571,7 @@ func (c *nodeGroupsRESTClient) Delete(ctx context.Context, req *computepb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -667,17 +638,7 @@ func (c *nodeGroupsRESTClient) DeleteNodes(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteNodes") if err != nil { return err } @@ -730,17 +691,7 @@ func (c *nodeGroupsRESTClient) Get(ctx context.Context, req *computepb.GetNodeGr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -792,17 +743,7 @@ func (c *nodeGroupsRESTClient) GetIamPolicy(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -862,17 +803,7 @@ func (c *nodeGroupsRESTClient) Insert(ctx context.Context, req *computepb.Insert httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -950,21 +881,10 @@ func (c *nodeGroupsRESTClient) List(ctx context.Context, req *computepb.ListNode } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1047,21 +967,10 @@ func (c *nodeGroupsRESTClient) ListNodes(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1133,17 +1042,7 @@ func (c *nodeGroupsRESTClient) Patch(ctx context.Context, req *computepb.PatchNo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1210,17 +1109,7 @@ func (c *nodeGroupsRESTClient) PerformMaintenance(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PerformMaintenance") if err != nil { return err } @@ -1280,17 +1169,7 @@ func (c *nodeGroupsRESTClient) SetIamPolicy(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1349,17 +1228,7 @@ func (c *nodeGroupsRESTClient) SetNodeTemplate(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodeTemplate") if err != nil { return err } @@ -1426,17 +1295,7 @@ func (c *nodeGroupsRESTClient) SimulateMaintenanceEvent(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SimulateMaintenanceEvent") if err != nil { return err } @@ -1496,17 +1355,7 @@ func (c *nodeGroupsRESTClient) TestIamPermissions(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/node_groups_client_example_go123_test.go b/compute/apiv1/node_groups_client_example_go123_test.go index 823887bd9469..a43fcc4e0627 100644 --- a/compute/apiv1/node_groups_client_example_go123_test.go +++ b/compute/apiv1/node_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNodeGroupsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNodeGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleNodeGroupsClient_ListNodes_all() { } for resp, err := range c.ListNodes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/node_templates_client.go b/compute/apiv1/node_templates_client.go index 454b9dfac41e..c540556493ec 100755 --- a/compute/apiv1/node_templates_client.go +++ b/compute/apiv1/node_templates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -224,6 +223,8 @@ type nodeTemplatesRESTClient struct { // Points back to the CallOptions field of the containing NodeTemplatesClient CallOptions **NodeTemplatesCallOptions + + logger *slog.Logger } // NewNodeTemplatesRESTClient creates a new node templates rest client. @@ -241,6 +242,7 @@ func NewNodeTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -357,21 +359,10 @@ func (c *nodeTemplatesRESTClient) AggregatedList(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -443,17 +434,7 @@ func (c *nodeTemplatesRESTClient) Delete(ctx context.Context, req *computepb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -506,17 +487,7 @@ func (c *nodeTemplatesRESTClient) Get(ctx context.Context, req *computepb.GetNod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -568,17 +539,7 @@ func (c *nodeTemplatesRESTClient) GetIamPolicy(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -637,17 +598,7 @@ func (c *nodeTemplatesRESTClient) Insert(ctx context.Context, req *computepb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -725,21 +676,10 @@ func (c *nodeTemplatesRESTClient) List(ctx context.Context, req *computepb.ListN } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -804,17 +744,7 @@ func (c *nodeTemplatesRESTClient) SetIamPolicy(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -866,17 +796,7 @@ func (c *nodeTemplatesRESTClient) TestIamPermissions(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/node_templates_client_example_go123_test.go b/compute/apiv1/node_templates_client_example_go123_test.go index b54482985f87..faa29339ca60 100644 --- a/compute/apiv1/node_templates_client_example_go123_test.go +++ b/compute/apiv1/node_templates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNodeTemplatesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNodeTemplatesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/node_types_client.go b/compute/apiv1/node_types_client.go index 02d157dc3ff6..8041e0a7fb30 100755 --- a/compute/apiv1/node_types_client.go +++ b/compute/apiv1/node_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type nodeTypesRESTClient struct { // Points back to the CallOptions field of the containing NodeTypesClient CallOptions **NodeTypesCallOptions + + logger *slog.Logger } // NewNodeTypesRESTClient creates a new node types rest client. @@ -178,6 +179,7 @@ func NewNodeTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -281,21 +283,10 @@ func (c *nodeTypesRESTClient) AggregatedList(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -360,17 +351,7 @@ func (c *nodeTypesRESTClient) Get(ctx context.Context, req *computepb.GetNodeTyp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -440,21 +421,10 @@ func (c *nodeTypesRESTClient) List(ctx context.Context, req *computepb.ListNodeT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/node_types_client_example_go123_test.go b/compute/apiv1/node_types_client_example_go123_test.go index 8c8a5f47545a..365420293fb0 100644 --- a/compute/apiv1/node_types_client_example_go123_test.go +++ b/compute/apiv1/node_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNodeTypesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNodeTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/packet_mirrorings_client.go b/compute/apiv1/packet_mirrorings_client.go index 1b80e401c203..cb2e144f736c 100755 --- a/compute/apiv1/packet_mirrorings_client.go +++ b/compute/apiv1/packet_mirrorings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type packetMirroringsRESTClient struct { // Points back to the CallOptions field of the containing PacketMirroringsClient CallOptions **PacketMirroringsCallOptions + + logger *slog.Logger } // NewPacketMirroringsRESTClient creates a new packet mirrorings rest client. @@ -222,6 +223,7 @@ func NewPacketMirroringsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *packetMirroringsRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *packetMirroringsRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -487,17 +468,7 @@ func (c *packetMirroringsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -556,17 +527,7 @@ func (c *packetMirroringsRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -644,21 +605,10 @@ func (c *packetMirroringsRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -730,17 +680,7 @@ func (c *packetMirroringsRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -800,17 +740,7 @@ func (c *packetMirroringsRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/packet_mirrorings_client_example_go123_test.go b/compute/apiv1/packet_mirrorings_client_example_go123_test.go index c5d4d497343a..1fc85c14b1ce 100644 --- a/compute/apiv1/packet_mirrorings_client_example_go123_test.go +++ b/compute/apiv1/packet_mirrorings_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePacketMirroringsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExamplePacketMirroringsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/projects_client.go b/compute/apiv1/projects_client.go index 0b5499bd0cac..abf9ebacbce3 100755 --- a/compute/apiv1/projects_client.go +++ b/compute/apiv1/projects_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -274,6 +273,8 @@ type projectsRESTClient struct { // Points back to the CallOptions field of the containing ProjectsClient CallOptions **ProjectsCallOptions + + logger *slog.Logger } // NewProjectsRESTClient creates a new projects rest client. @@ -291,6 +292,7 @@ func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -383,17 +385,7 @@ func (c *projectsRESTClient) DisableXpnHost(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DisableXpnHost") if err != nil { return err } @@ -459,17 +451,7 @@ func (c *projectsRESTClient) DisableXpnResource(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableXpnResource") if err != nil { return err } @@ -528,17 +510,7 @@ func (c *projectsRESTClient) EnableXpnHost(ctx context.Context, req *computepb.E httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "EnableXpnHost") if err != nil { return err } @@ -604,17 +576,7 @@ func (c *projectsRESTClient) EnableXpnResource(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableXpnResource") if err != nil { return err } @@ -666,17 +628,7 @@ func (c *projectsRESTClient) Get(ctx context.Context, req *computepb.GetProjectR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -721,17 +673,7 @@ func (c *projectsRESTClient) GetXpnHost(ctx context.Context, req *computepb.GetX httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetXpnHost") if err != nil { return err } @@ -801,21 +743,10 @@ func (c *projectsRESTClient) GetXpnResources(ctx context.Context, req *computepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetXpnResources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -904,21 +835,10 @@ func (c *projectsRESTClient) ListXpnHosts(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListXpnHosts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -990,17 +910,7 @@ func (c *projectsRESTClient) MoveDisk(ctx context.Context, req *computepb.MoveDi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveDisk") if err != nil { return err } @@ -1066,17 +976,7 @@ func (c *projectsRESTClient) MoveInstance(ctx context.Context, req *computepb.Mo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveInstance") if err != nil { return err } @@ -1142,17 +1042,7 @@ func (c *projectsRESTClient) SetCloudArmorTier(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetCloudArmorTier") if err != nil { return err } @@ -1218,17 +1108,7 @@ func (c *projectsRESTClient) SetCommonInstanceMetadata(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetCommonInstanceMetadata") if err != nil { return err } @@ -1294,17 +1174,7 @@ func (c *projectsRESTClient) SetDefaultNetworkTier(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultNetworkTier") if err != nil { return err } @@ -1370,17 +1240,7 @@ func (c *projectsRESTClient) SetUsageExportBucket(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUsageExportBucket") if err != nil { return err } diff --git a/compute/apiv1/projects_client_example_go123_test.go b/compute/apiv1/projects_client_example_go123_test.go index 8f3f66c7dbf4..578b79f1fb6a 100644 --- a/compute/apiv1/projects_client_example_go123_test.go +++ b/compute/apiv1/projects_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectsClient_GetXpnResources_all() { } for resp, err := range c.GetXpnResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleProjectsClient_ListXpnHosts_all() { } for resp, err := range c.ListXpnHosts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/public_advertised_prefixes_client.go b/compute/apiv1/public_advertised_prefixes_client.go index b4e341ae5af6..3fc3a0d5da04 100755 --- a/compute/apiv1/public_advertised_prefixes_client.go +++ b/compute/apiv1/public_advertised_prefixes_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type publicAdvertisedPrefixesRESTClient struct { // Points back to the CallOptions field of the containing PublicAdvertisedPrefixesClient CallOptions **PublicAdvertisedPrefixesCallOptions + + logger *slog.Logger } // NewPublicAdvertisedPrefixesRESTClient creates a new public advertised prefixes rest client. @@ -212,6 +213,7 @@ func NewPublicAdvertisedPrefixesRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,17 +306,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Announce(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Announce") if err != nil { return err } @@ -373,17 +365,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Delete(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -435,17 +417,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Get(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -504,17 +476,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Insert(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -591,21 +553,10 @@ func (c *publicAdvertisedPrefixesRESTClient) List(ctx context.Context, req *comp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -677,17 +628,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Patch(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -746,17 +687,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Withdraw(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Withdraw") if err != nil { return err } diff --git a/compute/apiv1/public_advertised_prefixes_client_example_go123_test.go b/compute/apiv1/public_advertised_prefixes_client_example_go123_test.go index d881d2cac0bc..9e8427051b27 100644 --- a/compute/apiv1/public_advertised_prefixes_client_example_go123_test.go +++ b/compute/apiv1/public_advertised_prefixes_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePublicAdvertisedPrefixesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/public_delegated_prefixes_client.go b/compute/apiv1/public_delegated_prefixes_client.go index b9460a009e56..5d017912713a 100755 --- a/compute/apiv1/public_delegated_prefixes_client.go +++ b/compute/apiv1/public_delegated_prefixes_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -215,6 +214,8 @@ type publicDelegatedPrefixesRESTClient struct { // Points back to the CallOptions field of the containing PublicDelegatedPrefixesClient CallOptions **PublicDelegatedPrefixesCallOptions + + logger *slog.Logger } // NewPublicDelegatedPrefixesRESTClient creates a new public delegated prefixes rest client. @@ -232,6 +233,7 @@ func NewPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -348,21 +350,10 @@ func (c *publicDelegatedPrefixesRESTClient) AggregatedList(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -434,17 +425,7 @@ func (c *publicDelegatedPrefixesRESTClient) Announce(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Announce") if err != nil { return err } @@ -504,17 +485,7 @@ func (c *publicDelegatedPrefixesRESTClient) Delete(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -567,17 +538,7 @@ func (c *publicDelegatedPrefixesRESTClient) Get(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -636,17 +597,7 @@ func (c *publicDelegatedPrefixesRESTClient) Insert(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -724,21 +675,10 @@ func (c *publicDelegatedPrefixesRESTClient) List(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -810,17 +750,7 @@ func (c *publicDelegatedPrefixesRESTClient) Patch(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -880,17 +810,7 @@ func (c *publicDelegatedPrefixesRESTClient) Withdraw(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Withdraw") if err != nil { return err } diff --git a/compute/apiv1/public_delegated_prefixes_client_example_go123_test.go b/compute/apiv1/public_delegated_prefixes_client_example_go123_test.go index 40fb4a0df948..dbd4de9b1225 100644 --- a/compute/apiv1/public_delegated_prefixes_client_example_go123_test.go +++ b/compute/apiv1/public_delegated_prefixes_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePublicDelegatedPrefixesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExamplePublicDelegatedPrefixesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_autoscalers_client.go b/compute/apiv1/region_autoscalers_client.go index ede2a5f3320e..d04a7d3171cd 100755 --- a/compute/apiv1/region_autoscalers_client.go +++ b/compute/apiv1/region_autoscalers_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type regionAutoscalersRESTClient struct { // Points back to the CallOptions field of the containing RegionAutoscalersClient CallOptions **RegionAutoscalersCallOptions + + logger *slog.Logger } // NewRegionAutoscalersRESTClient creates a new region autoscalers rest client. @@ -202,6 +203,7 @@ func NewRegionAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,17 +296,7 @@ func (c *regionAutoscalersRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -357,17 +349,7 @@ func (c *regionAutoscalersRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -426,17 +408,7 @@ func (c *regionAutoscalersRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -514,21 +486,10 @@ func (c *regionAutoscalersRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -603,17 +564,7 @@ func (c *regionAutoscalersRESTClient) Patch(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -683,17 +634,7 @@ func (c *regionAutoscalersRESTClient) Update(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/region_autoscalers_client_example_go123_test.go b/compute/apiv1/region_autoscalers_client_example_go123_test.go index fd92930404d2..e3aa1bbed754 100644 --- a/compute/apiv1/region_autoscalers_client_example_go123_test.go +++ b/compute/apiv1/region_autoscalers_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionAutoscalersClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_backend_services_client.go b/compute/apiv1/region_backend_services_client.go index 719dd2026319..1d0632050bde 100755 --- a/compute/apiv1/region_backend_services_client.go +++ b/compute/apiv1/region_backend_services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -263,6 +262,8 @@ type regionBackendServicesRESTClient struct { // Points back to the CallOptions field of the containing RegionBackendServicesClient CallOptions **RegionBackendServicesCallOptions + + logger *slog.Logger } // NewRegionBackendServicesRESTClient creates a new region backend services rest client. @@ -280,6 +281,7 @@ func NewRegionBackendServicesRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -372,17 +374,7 @@ func (c *regionBackendServicesRESTClient) Delete(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -435,17 +427,7 @@ func (c *regionBackendServicesRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -497,17 +479,7 @@ func (c *regionBackendServicesRESTClient) GetHealth(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetHealth") if err != nil { return err } @@ -559,17 +531,7 @@ func (c *regionBackendServicesRESTClient) GetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -628,17 +590,7 @@ func (c *regionBackendServicesRESTClient) Insert(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -716,21 +668,10 @@ func (c *regionBackendServicesRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -813,21 +754,10 @@ func (c *regionBackendServicesRESTClient) ListUsable(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsable") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -899,17 +829,7 @@ func (c *regionBackendServicesRESTClient) Patch(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -969,17 +889,7 @@ func (c *regionBackendServicesRESTClient) SetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1038,17 +948,7 @@ func (c *regionBackendServicesRESTClient) SetSecurityPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSecurityPolicy") if err != nil { return err } @@ -1108,17 +1008,7 @@ func (c *regionBackendServicesRESTClient) TestIamPermissions(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1177,17 +1067,7 @@ func (c *regionBackendServicesRESTClient) Update(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/region_backend_services_client_example_go123_test.go b/compute/apiv1/region_backend_services_client_example_go123_test.go index 0441932ad8c4..fd149a321d31 100644 --- a/compute/apiv1/region_backend_services_client_example_go123_test.go +++ b/compute/apiv1/region_backend_services_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionBackendServicesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRegionBackendServicesClient_ListUsable_all() { } for resp, err := range c.ListUsable(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_commitments_client.go b/compute/apiv1/region_commitments_client.go index 63303fb1cf63..5aa96ce5cd34 100755 --- a/compute/apiv1/region_commitments_client.go +++ b/compute/apiv1/region_commitments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type regionCommitmentsRESTClient struct { // Points back to the CallOptions field of the containing RegionCommitmentsClient CallOptions **RegionCommitmentsCallOptions + + logger *slog.Logger } // NewRegionCommitmentsRESTClient creates a new region commitments rest client. @@ -202,6 +203,7 @@ func NewRegionCommitmentsRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -318,21 +320,10 @@ func (c *regionCommitmentsRESTClient) AggregatedList(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -397,17 +388,7 @@ func (c *regionCommitmentsRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -466,17 +447,7 @@ func (c *regionCommitmentsRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -554,21 +525,10 @@ func (c *regionCommitmentsRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -646,17 +606,7 @@ func (c *regionCommitmentsRESTClient) Update(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/region_commitments_client_example_go123_test.go b/compute/apiv1/region_commitments_client_example_go123_test.go index 9b8c98a3edd8..bbf118822b83 100644 --- a/compute/apiv1/region_commitments_client_example_go123_test.go +++ b/compute/apiv1/region_commitments_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionCommitmentsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRegionCommitmentsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_disk_types_client.go b/compute/apiv1/region_disk_types_client.go index 1f9b69c8fccb..b715dd92cb26 100755 --- a/compute/apiv1/region_disk_types_client.go +++ b/compute/apiv1/region_disk_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type regionDiskTypesRESTClient struct { // Points back to the CallOptions field of the containing RegionDiskTypesClient CallOptions **RegionDiskTypesCallOptions + + logger *slog.Logger } // NewRegionDiskTypesRESTClient creates a new region disk types rest client. @@ -158,6 +159,7 @@ func NewRegionDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *regionDiskTypesRESTClient) Get(ctx context.Context, req *computepb.GetR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *regionDiskTypesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_disk_types_client_example_go123_test.go b/compute/apiv1/region_disk_types_client_example_go123_test.go index 7ae54b9d60c8..c19afca48515 100644 --- a/compute/apiv1/region_disk_types_client_example_go123_test.go +++ b/compute/apiv1/region_disk_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionDiskTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_disks_client.go b/compute/apiv1/region_disks_client.go index 7c6d218fa89c..c0accc2b6c92 100755 --- a/compute/apiv1/region_disks_client.go +++ b/compute/apiv1/region_disks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -304,6 +303,8 @@ type regionDisksRESTClient struct { // Points back to the CallOptions field of the containing RegionDisksClient CallOptions **RegionDisksCallOptions + + logger *slog.Logger } // NewRegionDisksRESTClient creates a new region disks rest client. @@ -321,6 +322,7 @@ func NewRegionDisksRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -420,17 +422,7 @@ func (c *regionDisksRESTClient) AddResourcePolicies(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddResourcePolicies") if err != nil { return err } @@ -497,17 +489,7 @@ func (c *regionDisksRESTClient) BulkInsert(ctx context.Context, req *computepb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkInsert") if err != nil { return err } @@ -574,17 +556,7 @@ func (c *regionDisksRESTClient) CreateSnapshot(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSnapshot") if err != nil { return err } @@ -644,17 +616,7 @@ func (c *regionDisksRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -707,17 +669,7 @@ func (c *regionDisksRESTClient) Get(ctx context.Context, req *computepb.GetRegio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -769,17 +721,7 @@ func (c *regionDisksRESTClient) GetIamPolicy(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -841,17 +783,7 @@ func (c *regionDisksRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -929,21 +861,10 @@ func (c *regionDisksRESTClient) List(ctx context.Context, req *computepb.ListReg } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1015,17 +936,7 @@ func (c *regionDisksRESTClient) RemoveResourcePolicies(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveResourcePolicies") if err != nil { return err } @@ -1092,17 +1003,7 @@ func (c *regionDisksRESTClient) Resize(ctx context.Context, req *computepb.Resiz httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Resize") if err != nil { return err } @@ -1162,17 +1063,7 @@ func (c *regionDisksRESTClient) SetIamPolicy(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1231,17 +1122,7 @@ func (c *regionDisksRESTClient) SetLabels(ctx context.Context, req *computepb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -1308,17 +1189,7 @@ func (c *regionDisksRESTClient) StartAsyncReplication(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartAsyncReplication") if err != nil { return err } @@ -1378,17 +1249,7 @@ func (c *regionDisksRESTClient) StopAsyncReplication(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "StopAsyncReplication") if err != nil { return err } @@ -1455,17 +1316,7 @@ func (c *regionDisksRESTClient) StopGroupAsyncReplication(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopGroupAsyncReplication") if err != nil { return err } @@ -1525,17 +1376,7 @@ func (c *regionDisksRESTClient) TestIamPermissions(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1600,17 +1441,7 @@ func (c *regionDisksRESTClient) Update(ctx context.Context, req *computepb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/region_disks_client_example_go123_test.go b/compute/apiv1/region_disks_client_example_go123_test.go index acd07be2de92..b6526ed1e3a4 100644 --- a/compute/apiv1/region_disks_client_example_go123_test.go +++ b/compute/apiv1/region_disks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionDisksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_health_check_services_client.go b/compute/apiv1/region_health_check_services_client.go index d6dc4f11cdf0..4c817913034c 100755 --- a/compute/apiv1/region_health_check_services_client.go +++ b/compute/apiv1/region_health_check_services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type regionHealthCheckServicesRESTClient struct { // Points back to the CallOptions field of the containing RegionHealthCheckServicesClient CallOptions **RegionHealthCheckServicesCallOptions + + logger *slog.Logger } // NewRegionHealthCheckServicesRESTClient creates a new region health check services rest client. @@ -192,6 +193,7 @@ func NewRegionHealthCheckServicesRESTClient(ctx context.Context, opts ...option. endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,17 +286,7 @@ func (c *regionHealthCheckServicesRESTClient) Delete(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -347,17 +339,7 @@ func (c *regionHealthCheckServicesRESTClient) Get(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -416,17 +398,7 @@ func (c *regionHealthCheckServicesRESTClient) Insert(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -504,21 +476,10 @@ func (c *regionHealthCheckServicesRESTClient) List(ctx context.Context, req *com } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -590,17 +551,7 @@ func (c *regionHealthCheckServicesRESTClient) Patch(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/region_health_check_services_client_example_go123_test.go b/compute/apiv1/region_health_check_services_client_example_go123_test.go index 52aab59066cd..c381ea9c59ce 100644 --- a/compute/apiv1/region_health_check_services_client_example_go123_test.go +++ b/compute/apiv1/region_health_check_services_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionHealthCheckServicesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_health_checks_client.go b/compute/apiv1/region_health_checks_client.go index 1f1704982ba5..e68becd29244 100755 --- a/compute/apiv1/region_health_checks_client.go +++ b/compute/apiv1/region_health_checks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type regionHealthChecksRESTClient struct { // Points back to the CallOptions field of the containing RegionHealthChecksClient CallOptions **RegionHealthChecksCallOptions + + logger *slog.Logger } // NewRegionHealthChecksRESTClient creates a new region health checks rest client. @@ -202,6 +203,7 @@ func NewRegionHealthChecksRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,17 +296,7 @@ func (c *regionHealthChecksRESTClient) Delete(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -357,17 +349,7 @@ func (c *regionHealthChecksRESTClient) Get(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -426,17 +408,7 @@ func (c *regionHealthChecksRESTClient) Insert(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -514,21 +486,10 @@ func (c *regionHealthChecksRESTClient) List(ctx context.Context, req *computepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -600,17 +561,7 @@ func (c *regionHealthChecksRESTClient) Patch(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -677,17 +628,7 @@ func (c *regionHealthChecksRESTClient) Update(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/region_health_checks_client_example_go123_test.go b/compute/apiv1/region_health_checks_client_example_go123_test.go index 32ca1bfd21ab..c91b846c4bc5 100644 --- a/compute/apiv1/region_health_checks_client_example_go123_test.go +++ b/compute/apiv1/region_health_checks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionHealthChecksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_instance_group_managers_client.go b/compute/apiv1/region_instance_group_managers_client.go index c9fad10f3a1e..36949e05ea2f 100755 --- a/compute/apiv1/region_instance_group_managers_client.go +++ b/compute/apiv1/region_instance_group_managers_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -364,6 +363,8 @@ type regionInstanceGroupManagersRESTClient struct { // Points back to the CallOptions field of the containing RegionInstanceGroupManagersClient CallOptions **RegionInstanceGroupManagersCallOptions + + logger *slog.Logger } // NewRegionInstanceGroupManagersRESTClient creates a new region instance group managers rest client. @@ -381,6 +382,7 @@ func NewRegionInstanceGroupManagersRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -480,17 +482,7 @@ func (c *regionInstanceGroupManagersRESTClient) AbandonInstances(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AbandonInstances") if err != nil { return err } @@ -550,17 +542,7 @@ func (c *regionInstanceGroupManagersRESTClient) ApplyUpdatesToInstances(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyUpdatesToInstances") if err != nil { return err } @@ -627,17 +609,7 @@ func (c *regionInstanceGroupManagersRESTClient) CreateInstances(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstances") if err != nil { return err } @@ -697,17 +669,7 @@ func (c *regionInstanceGroupManagersRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -774,17 +736,7 @@ func (c *regionInstanceGroupManagersRESTClient) DeleteInstances(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteInstances") if err != nil { return err } @@ -844,17 +796,7 @@ func (c *regionInstanceGroupManagersRESTClient) DeletePerInstanceConfigs(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeletePerInstanceConfigs") if err != nil { return err } @@ -907,17 +849,7 @@ func (c *regionInstanceGroupManagersRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -976,17 +908,7 @@ func (c *regionInstanceGroupManagersRESTClient) Insert(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1064,21 +986,10 @@ func (c *regionInstanceGroupManagersRESTClient) List(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1161,21 +1072,10 @@ func (c *regionInstanceGroupManagersRESTClient) ListErrors(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListErrors") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1258,21 +1158,10 @@ func (c *regionInstanceGroupManagersRESTClient) ListManagedInstances(ctx context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListManagedInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1355,21 +1244,10 @@ func (c *regionInstanceGroupManagersRESTClient) ListPerInstanceConfigs(ctx conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPerInstanceConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1441,17 +1319,7 @@ func (c *regionInstanceGroupManagersRESTClient) Patch(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1518,17 +1386,7 @@ func (c *regionInstanceGroupManagersRESTClient) PatchPerInstanceConfigs(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchPerInstanceConfigs") if err != nil { return err } @@ -1595,17 +1453,7 @@ func (c *regionInstanceGroupManagersRESTClient) RecreateInstances(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RecreateInstances") if err != nil { return err } @@ -1666,17 +1514,7 @@ func (c *regionInstanceGroupManagersRESTClient) Resize(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Resize") if err != nil { return err } @@ -1743,17 +1581,7 @@ func (c *regionInstanceGroupManagersRESTClient) ResumeInstances(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeInstances") if err != nil { return err } @@ -1820,17 +1648,7 @@ func (c *regionInstanceGroupManagersRESTClient) SetInstanceTemplate(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInstanceTemplate") if err != nil { return err } @@ -1897,17 +1715,7 @@ func (c *regionInstanceGroupManagersRESTClient) SetTargetPools(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetTargetPools") if err != nil { return err } @@ -1974,17 +1782,7 @@ func (c *regionInstanceGroupManagersRESTClient) StartInstances(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartInstances") if err != nil { return err } @@ -2051,17 +1849,7 @@ func (c *regionInstanceGroupManagersRESTClient) StopInstances(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopInstances") if err != nil { return err } @@ -2128,17 +1916,7 @@ func (c *regionInstanceGroupManagersRESTClient) SuspendInstances(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuspendInstances") if err != nil { return err } @@ -2205,17 +1983,7 @@ func (c *regionInstanceGroupManagersRESTClient) UpdatePerInstanceConfigs(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePerInstanceConfigs") if err != nil { return err } diff --git a/compute/apiv1/region_instance_group_managers_client_example_go123_test.go b/compute/apiv1/region_instance_group_managers_client_example_go123_test.go index c751d2cf4b5f..35e6902fc93b 100644 --- a/compute/apiv1/region_instance_group_managers_client_example_go123_test.go +++ b/compute/apiv1/region_instance_group_managers_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionInstanceGroupManagersClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRegionInstanceGroupManagersClient_ListErrors_all() { } for resp, err := range c.ListErrors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleRegionInstanceGroupManagersClient_ListManagedInstances_all() { } for resp, err := range c.ListManagedInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleRegionInstanceGroupManagersClient_ListPerInstanceConfigs_all() { } for resp, err := range c.ListPerInstanceConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_instance_groups_client.go b/compute/apiv1/region_instance_groups_client.go index 99d3ede4da09..0f5bf57f62b2 100755 --- a/compute/apiv1/region_instance_groups_client.go +++ b/compute/apiv1/region_instance_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type regionInstanceGroupsRESTClient struct { // Points back to the CallOptions field of the containing RegionInstanceGroupsClient CallOptions **RegionInstanceGroupsCallOptions + + logger *slog.Logger } // NewRegionInstanceGroupsRESTClient creates a new region instance groups rest client. @@ -182,6 +183,7 @@ func NewRegionInstanceGroupsRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -267,17 +269,7 @@ func (c *regionInstanceGroupsRESTClient) Get(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -347,21 +339,10 @@ func (c *regionInstanceGroupsRESTClient) List(ctx context.Context, req *computep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -450,21 +431,10 @@ func (c *regionInstanceGroupsRESTClient) ListInstances(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -536,17 +506,7 @@ func (c *regionInstanceGroupsRESTClient) SetNamedPorts(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNamedPorts") if err != nil { return err } diff --git a/compute/apiv1/region_instance_groups_client_example_go123_test.go b/compute/apiv1/region_instance_groups_client_example_go123_test.go index a66c1d74e1d1..1078d52df100 100644 --- a/compute/apiv1/region_instance_groups_client_example_go123_test.go +++ b/compute/apiv1/region_instance_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionInstanceGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRegionInstanceGroupsClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_instance_templates_client.go b/compute/apiv1/region_instance_templates_client.go index e89df448fd24..9e1792029684 100755 --- a/compute/apiv1/region_instance_templates_client.go +++ b/compute/apiv1/region_instance_templates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type regionInstanceTemplatesRESTClient struct { // Points back to the CallOptions field of the containing RegionInstanceTemplatesClient CallOptions **RegionInstanceTemplatesCallOptions + + logger *slog.Logger } // NewRegionInstanceTemplatesRESTClient creates a new region instance templates rest client. @@ -182,6 +183,7 @@ func NewRegionInstanceTemplatesRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,17 +276,7 @@ func (c *regionInstanceTemplatesRESTClient) Delete(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -337,17 +329,7 @@ func (c *regionInstanceTemplatesRESTClient) Get(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -406,17 +388,7 @@ func (c *regionInstanceTemplatesRESTClient) Insert(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -494,21 +466,10 @@ func (c *regionInstanceTemplatesRESTClient) List(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_instance_templates_client_example_go123_test.go b/compute/apiv1/region_instance_templates_client_example_go123_test.go index 12638a6b0f0a..bcc0b54dc370 100644 --- a/compute/apiv1/region_instance_templates_client_example_go123_test.go +++ b/compute/apiv1/region_instance_templates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionInstanceTemplatesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_instances_client.go b/compute/apiv1/region_instances_client.go index 089279ffe068..5729c502f2e6 100755 --- a/compute/apiv1/region_instances_client.go +++ b/compute/apiv1/region_instances_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -114,6 +113,8 @@ type regionInstancesRESTClient struct { // Points back to the CallOptions field of the containing RegionInstancesClient CallOptions **RegionInstancesCallOptions + + logger *slog.Logger } // NewRegionInstancesRESTClient creates a new region instances rest client. @@ -131,6 +132,7 @@ func NewRegionInstancesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *regionInstancesRESTClient) BulkInsert(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkInsert") if err != nil { return err } diff --git a/compute/apiv1/region_instant_snapshots_client.go b/compute/apiv1/region_instant_snapshots_client.go index 75daf51f6772..10a81629ae6b 100755 --- a/compute/apiv1/region_instant_snapshots_client.go +++ b/compute/apiv1/region_instant_snapshots_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -214,6 +213,8 @@ type regionInstantSnapshotsRESTClient struct { // Points back to the CallOptions field of the containing RegionInstantSnapshotsClient CallOptions **RegionInstantSnapshotsCallOptions + + logger *slog.Logger } // NewRegionInstantSnapshotsRESTClient creates a new region instant snapshots rest client. @@ -231,6 +232,7 @@ func NewRegionInstantSnapshotsRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -323,17 +325,7 @@ func (c *regionInstantSnapshotsRESTClient) Delete(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -386,17 +378,7 @@ func (c *regionInstantSnapshotsRESTClient) Get(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -448,17 +430,7 @@ func (c *regionInstantSnapshotsRESTClient) GetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -517,17 +489,7 @@ func (c *regionInstantSnapshotsRESTClient) Insert(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -605,21 +567,10 @@ func (c *regionInstantSnapshotsRESTClient) List(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -684,17 +635,7 @@ func (c *regionInstantSnapshotsRESTClient) SetIamPolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -753,17 +694,7 @@ func (c *regionInstantSnapshotsRESTClient) SetLabels(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -823,17 +754,7 @@ func (c *regionInstantSnapshotsRESTClient) TestIamPermissions(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/region_instant_snapshots_client_example_go123_test.go b/compute/apiv1/region_instant_snapshots_client_example_go123_test.go index de17de9d2727..f55ce4fde7ee 100644 --- a/compute/apiv1/region_instant_snapshots_client_example_go123_test.go +++ b/compute/apiv1/region_instant_snapshots_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionInstantSnapshotsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_network_endpoint_groups_client.go b/compute/apiv1/region_network_endpoint_groups_client.go index 7673c753556f..484fbf14dc91 100755 --- a/compute/apiv1/region_network_endpoint_groups_client.go +++ b/compute/apiv1/region_network_endpoint_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type regionNetworkEndpointGroupsRESTClient struct { // Points back to the CallOptions field of the containing RegionNetworkEndpointGroupsClient CallOptions **RegionNetworkEndpointGroupsCallOptions + + logger *slog.Logger } // NewRegionNetworkEndpointGroupsRESTClient creates a new region network endpoint groups rest client. @@ -212,6 +213,7 @@ func NewRegionNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -311,17 +313,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) AttachNetworkEndpoints(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AttachNetworkEndpoints") if err != nil { return err } @@ -381,17 +373,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -458,17 +440,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) DetachNetworkEndpoints(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetachNetworkEndpoints") if err != nil { return err } @@ -521,17 +493,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -590,17 +552,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) Insert(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -678,21 +630,10 @@ func (c *regionNetworkEndpointGroupsRESTClient) List(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -775,21 +716,10 @@ func (c *regionNetworkEndpointGroupsRESTClient) ListNetworkEndpoints(ctx context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworkEndpoints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_network_endpoint_groups_client_example_go123_test.go b/compute/apiv1/region_network_endpoint_groups_client_example_go123_test.go index 9205d266c4cc..aab7f6cc25cb 100644 --- a/compute/apiv1/region_network_endpoint_groups_client_example_go123_test.go +++ b/compute/apiv1/region_network_endpoint_groups_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionNetworkEndpointGroupsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRegionNetworkEndpointGroupsClient_ListNetworkEndpoints_all() { } for resp, err := range c.ListNetworkEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_network_firewall_policies_client.go b/compute/apiv1/region_network_firewall_policies_client.go index 8f1ea07a27ff..fbe37c7f7cf9 100755 --- a/compute/apiv1/region_network_firewall_policies_client.go +++ b/compute/apiv1/region_network_firewall_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -331,6 +330,8 @@ type regionNetworkFirewallPoliciesRESTClient struct { // Points back to the CallOptions field of the containing RegionNetworkFirewallPoliciesClient CallOptions **RegionNetworkFirewallPoliciesCallOptions + + logger *slog.Logger } // NewRegionNetworkFirewallPoliciesRESTClient creates a new region network firewall policies rest client. @@ -348,6 +349,7 @@ func NewRegionNetworkFirewallPoliciesRESTClient(ctx context.Context, opts ...opt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -450,17 +452,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) AddAssociation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddAssociation") if err != nil { return err } @@ -533,17 +525,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) AddRule(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddRule") if err != nil { return err } @@ -606,17 +588,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) CloneRules(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CloneRules") if err != nil { return err } @@ -676,17 +648,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) Delete(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -739,17 +701,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) Get(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -801,17 +753,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) GetAssociation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAssociation") if err != nil { return err } @@ -861,17 +803,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) GetEffectiveFirewalls(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveFirewalls") if err != nil { return err } @@ -923,17 +855,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) GetIamPolicy(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -985,17 +907,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) GetRule(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -1054,17 +966,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) Insert(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -1142,21 +1044,10 @@ func (c *regionNetworkFirewallPoliciesRESTClient) List(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1228,17 +1119,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) Patch(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1308,17 +1189,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) PatchRule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchRule") if err != nil { return err } @@ -1381,17 +1252,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) RemoveAssociation(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveAssociation") if err != nil { return err } @@ -1454,17 +1315,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) RemoveRule(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveRule") if err != nil { return err } @@ -1524,17 +1375,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) SetIamPolicy(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1586,17 +1427,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) TestIamPermissions(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/region_network_firewall_policies_client_example_go123_test.go b/compute/apiv1/region_network_firewall_policies_client_example_go123_test.go index ed3775bd394d..44392161d697 100644 --- a/compute/apiv1/region_network_firewall_policies_client_example_go123_test.go +++ b/compute/apiv1/region_network_firewall_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionNetworkFirewallPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_notification_endpoints_client.go b/compute/apiv1/region_notification_endpoints_client.go index 5812b7c436f9..bc578f0c2dd3 100755 --- a/compute/apiv1/region_notification_endpoints_client.go +++ b/compute/apiv1/region_notification_endpoints_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type regionNotificationEndpointsRESTClient struct { // Points back to the CallOptions field of the containing RegionNotificationEndpointsClient CallOptions **RegionNotificationEndpointsCallOptions + + logger *slog.Logger } // NewRegionNotificationEndpointsRESTClient creates a new region notification endpoints rest client. @@ -182,6 +183,7 @@ func NewRegionNotificationEndpointsRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,17 +276,7 @@ func (c *regionNotificationEndpointsRESTClient) Delete(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -337,17 +329,7 @@ func (c *regionNotificationEndpointsRESTClient) Get(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -406,17 +388,7 @@ func (c *regionNotificationEndpointsRESTClient) Insert(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -494,21 +466,10 @@ func (c *regionNotificationEndpointsRESTClient) List(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_notification_endpoints_client_example_go123_test.go b/compute/apiv1/region_notification_endpoints_client_example_go123_test.go index 0aef266b6cd4..c0f67a436a81 100644 --- a/compute/apiv1/region_notification_endpoints_client_example_go123_test.go +++ b/compute/apiv1/region_notification_endpoints_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionNotificationEndpointsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_operations_client.go b/compute/apiv1/region_operations_client.go index 481330b55677..c8b29b3ff1e5 100755 --- a/compute/apiv1/region_operations_client.go +++ b/compute/apiv1/region_operations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type regionOperationsRESTClient struct { // Points back to the CallOptions field of the containing RegionOperationsClient CallOptions **RegionOperationsCallOptions + + logger *slog.Logger } // NewRegionOperationsRESTClient creates a new region operations rest client. @@ -178,6 +179,7 @@ func NewRegionOperationsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -250,17 +252,7 @@ func (c *regionOperationsRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -305,17 +297,7 @@ func (c *regionOperationsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -385,21 +367,10 @@ func (c *regionOperationsRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -457,17 +428,7 @@ func (c *regionOperationsRESTClient) Wait(ctx context.Context, req *computepb.Wa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Wait") if err != nil { return err } diff --git a/compute/apiv1/region_operations_client_example_go123_test.go b/compute/apiv1/region_operations_client_example_go123_test.go index 9916b7fea331..d1a54cf82ab8 100644 --- a/compute/apiv1/region_operations_client_example_go123_test.go +++ b/compute/apiv1/region_operations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionOperationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_security_policies_client.go b/compute/apiv1/region_security_policies_client.go index 73e0d7b938f0..9e4bd9f5bfd9 100755 --- a/compute/apiv1/region_security_policies_client.go +++ b/compute/apiv1/region_security_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type regionSecurityPoliciesRESTClient struct { // Points back to the CallOptions field of the containing RegionSecurityPoliciesClient CallOptions **RegionSecurityPoliciesCallOptions + + logger *slog.Logger } // NewRegionSecurityPoliciesRESTClient creates a new region security policies rest client. @@ -251,6 +252,7 @@ func NewRegionSecurityPoliciesRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -350,17 +352,7 @@ func (c *regionSecurityPoliciesRESTClient) AddRule(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddRule") if err != nil { return err } @@ -420,17 +412,7 @@ func (c *regionSecurityPoliciesRESTClient) Delete(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -483,17 +465,7 @@ func (c *regionSecurityPoliciesRESTClient) Get(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -545,17 +517,7 @@ func (c *regionSecurityPoliciesRESTClient) GetRule(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -617,17 +579,7 @@ func (c *regionSecurityPoliciesRESTClient) Insert(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -705,21 +657,10 @@ func (c *regionSecurityPoliciesRESTClient) List(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -794,17 +735,7 @@ func (c *regionSecurityPoliciesRESTClient) Patch(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -877,17 +808,7 @@ func (c *regionSecurityPoliciesRESTClient) PatchRule(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchRule") if err != nil { return err } @@ -947,17 +868,7 @@ func (c *regionSecurityPoliciesRESTClient) RemoveRule(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveRule") if err != nil { return err } @@ -1024,17 +935,7 @@ func (c *regionSecurityPoliciesRESTClient) SetLabels(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/region_security_policies_client_example_go123_test.go b/compute/apiv1/region_security_policies_client_example_go123_test.go index 3ea5082540cf..f2c5eb6cdc57 100644 --- a/compute/apiv1/region_security_policies_client_example_go123_test.go +++ b/compute/apiv1/region_security_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionSecurityPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_ssl_certificates_client.go b/compute/apiv1/region_ssl_certificates_client.go index 94b0e9323991..22fd51bfa03c 100755 --- a/compute/apiv1/region_ssl_certificates_client.go +++ b/compute/apiv1/region_ssl_certificates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type regionSslCertificatesRESTClient struct { // Points back to the CallOptions field of the containing RegionSslCertificatesClient CallOptions **RegionSslCertificatesCallOptions + + logger *slog.Logger } // NewRegionSslCertificatesRESTClient creates a new region ssl certificates rest client. @@ -182,6 +183,7 @@ func NewRegionSslCertificatesRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,17 +276,7 @@ func (c *regionSslCertificatesRESTClient) Delete(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -337,17 +329,7 @@ func (c *regionSslCertificatesRESTClient) Get(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -406,17 +388,7 @@ func (c *regionSslCertificatesRESTClient) Insert(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -494,21 +466,10 @@ func (c *regionSslCertificatesRESTClient) List(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_ssl_certificates_client_example_go123_test.go b/compute/apiv1/region_ssl_certificates_client_example_go123_test.go index 048ebed9e55e..119fcd093945 100644 --- a/compute/apiv1/region_ssl_certificates_client_example_go123_test.go +++ b/compute/apiv1/region_ssl_certificates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionSslCertificatesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_ssl_policies_client.go b/compute/apiv1/region_ssl_policies_client.go index 99a39827c29f..dd0fb17c2a12 100755 --- a/compute/apiv1/region_ssl_policies_client.go +++ b/compute/apiv1/region_ssl_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -194,6 +193,8 @@ type regionSslPoliciesRESTClient struct { // Points back to the CallOptions field of the containing RegionSslPoliciesClient CallOptions **RegionSslPoliciesCallOptions + + logger *slog.Logger } // NewRegionSslPoliciesRESTClient creates a new region ssl policies rest client. @@ -211,6 +212,7 @@ func NewRegionSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -303,17 +305,7 @@ func (c *regionSslPoliciesRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -366,17 +358,7 @@ func (c *regionSslPoliciesRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -435,17 +417,7 @@ func (c *regionSslPoliciesRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -523,21 +495,10 @@ func (c *regionSslPoliciesRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -614,17 +575,7 @@ func (c *regionSslPoliciesRESTClient) ListAvailableFeatures(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAvailableFeatures") if err != nil { return err } @@ -683,17 +634,7 @@ func (c *regionSslPoliciesRESTClient) Patch(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/region_ssl_policies_client_example_go123_test.go b/compute/apiv1/region_ssl_policies_client_example_go123_test.go index 29326cfb2d99..b7be24496813 100644 --- a/compute/apiv1/region_ssl_policies_client_example_go123_test.go +++ b/compute/apiv1/region_ssl_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionSslPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_target_http_proxies_client.go b/compute/apiv1/region_target_http_proxies_client.go index b6f2ced9be36..04ed0e174ee3 100755 --- a/compute/apiv1/region_target_http_proxies_client.go +++ b/compute/apiv1/region_target_http_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type regionTargetHttpProxiesRESTClient struct { // Points back to the CallOptions field of the containing RegionTargetHttpProxiesClient CallOptions **RegionTargetHttpProxiesCallOptions + + logger *slog.Logger } // NewRegionTargetHttpProxiesRESTClient creates a new region target http proxies rest client. @@ -192,6 +193,7 @@ func NewRegionTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,17 +286,7 @@ func (c *regionTargetHttpProxiesRESTClient) Delete(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -347,17 +339,7 @@ func (c *regionTargetHttpProxiesRESTClient) Get(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -416,17 +398,7 @@ func (c *regionTargetHttpProxiesRESTClient) Insert(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -504,21 +476,10 @@ func (c *regionTargetHttpProxiesRESTClient) List(ctx context.Context, req *compu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -590,17 +551,7 @@ func (c *regionTargetHttpProxiesRESTClient) SetUrlMap(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUrlMap") if err != nil { return err } diff --git a/compute/apiv1/region_target_http_proxies_client_example_go123_test.go b/compute/apiv1/region_target_http_proxies_client_example_go123_test.go index 8f17ce1b402d..20ce18fc8570 100644 --- a/compute/apiv1/region_target_http_proxies_client_example_go123_test.go +++ b/compute/apiv1/region_target_http_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionTargetHttpProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_target_https_proxies_client.go b/compute/apiv1/region_target_https_proxies_client.go index d0ed41cd106d..d3b03c744c8b 100755 --- a/compute/apiv1/region_target_https_proxies_client.go +++ b/compute/apiv1/region_target_https_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type regionTargetHttpsProxiesRESTClient struct { // Points back to the CallOptions field of the containing RegionTargetHttpsProxiesClient CallOptions **RegionTargetHttpsProxiesCallOptions + + logger *slog.Logger } // NewRegionTargetHttpsProxiesRESTClient creates a new region target https proxies rest client. @@ -212,6 +213,7 @@ func NewRegionTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,17 +306,7 @@ func (c *regionTargetHttpsProxiesRESTClient) Delete(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -367,17 +359,7 @@ func (c *regionTargetHttpsProxiesRESTClient) Get(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -436,17 +418,7 @@ func (c *regionTargetHttpsProxiesRESTClient) Insert(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -524,21 +496,10 @@ func (c *regionTargetHttpsProxiesRESTClient) List(ctx context.Context, req *comp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -610,17 +571,7 @@ func (c *regionTargetHttpsProxiesRESTClient) Patch(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -687,17 +638,7 @@ func (c *regionTargetHttpsProxiesRESTClient) SetSslCertificates(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSslCertificates") if err != nil { return err } @@ -764,17 +705,7 @@ func (c *regionTargetHttpsProxiesRESTClient) SetUrlMap(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUrlMap") if err != nil { return err } diff --git a/compute/apiv1/region_target_https_proxies_client_example_go123_test.go b/compute/apiv1/region_target_https_proxies_client_example_go123_test.go index aeea540d04eb..470c0cc90dca 100644 --- a/compute/apiv1/region_target_https_proxies_client_example_go123_test.go +++ b/compute/apiv1/region_target_https_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionTargetHttpsProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_target_tcp_proxies_client.go b/compute/apiv1/region_target_tcp_proxies_client.go index 819b4fc767a1..196d62dd20df 100755 --- a/compute/apiv1/region_target_tcp_proxies_client.go +++ b/compute/apiv1/region_target_tcp_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type regionTargetTcpProxiesRESTClient struct { // Points back to the CallOptions field of the containing RegionTargetTcpProxiesClient CallOptions **RegionTargetTcpProxiesCallOptions + + logger *slog.Logger } // NewRegionTargetTcpProxiesRESTClient creates a new region target tcp proxies rest client. @@ -182,6 +183,7 @@ func NewRegionTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,17 +276,7 @@ func (c *regionTargetTcpProxiesRESTClient) Delete(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -337,17 +329,7 @@ func (c *regionTargetTcpProxiesRESTClient) Get(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -406,17 +388,7 @@ func (c *regionTargetTcpProxiesRESTClient) Insert(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -494,21 +466,10 @@ func (c *regionTargetTcpProxiesRESTClient) List(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_target_tcp_proxies_client_example_go123_test.go b/compute/apiv1/region_target_tcp_proxies_client_example_go123_test.go index 59ab07dcde95..4c01105ae8d0 100644 --- a/compute/apiv1/region_target_tcp_proxies_client_example_go123_test.go +++ b/compute/apiv1/region_target_tcp_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionTargetTcpProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_url_maps_client.go b/compute/apiv1/region_url_maps_client.go index eb98353d617c..fc2f5094c778 100755 --- a/compute/apiv1/region_url_maps_client.go +++ b/compute/apiv1/region_url_maps_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type regionUrlMapsRESTClient struct { // Points back to the CallOptions field of the containing RegionUrlMapsClient CallOptions **RegionUrlMapsCallOptions + + logger *slog.Logger } // NewRegionUrlMapsRESTClient creates a new region url maps rest client. @@ -212,6 +213,7 @@ func NewRegionUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,17 +306,7 @@ func (c *regionUrlMapsRESTClient) Delete(ctx context.Context, req *computepb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -367,17 +359,7 @@ func (c *regionUrlMapsRESTClient) Get(ctx context.Context, req *computepb.GetReg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -436,17 +418,7 @@ func (c *regionUrlMapsRESTClient) Insert(ctx context.Context, req *computepb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -524,21 +496,10 @@ func (c *regionUrlMapsRESTClient) List(ctx context.Context, req *computepb.ListR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -610,17 +571,7 @@ func (c *regionUrlMapsRESTClient) Patch(ctx context.Context, req *computepb.Patc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -687,17 +638,7 @@ func (c *regionUrlMapsRESTClient) Update(ctx context.Context, req *computepb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } @@ -757,17 +698,7 @@ func (c *regionUrlMapsRESTClient) Validate(ctx context.Context, req *computepb.V httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Validate") if err != nil { return err } diff --git a/compute/apiv1/region_url_maps_client_example_go123_test.go b/compute/apiv1/region_url_maps_client_example_go123_test.go index 5956deb1c2db..636f6f32b302 100644 --- a/compute/apiv1/region_url_maps_client_example_go123_test.go +++ b/compute/apiv1/region_url_maps_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionUrlMapsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/region_zones_client.go b/compute/apiv1/region_zones_client.go index fa57c33ad8f3..90da85a21e44 100755 --- a/compute/apiv1/region_zones_client.go +++ b/compute/apiv1/region_zones_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -122,6 +121,8 @@ type regionZonesRESTClient struct { // Points back to the CallOptions field of the containing RegionZonesClient CallOptions **RegionZonesCallOptions + + logger *slog.Logger } // NewRegionZonesRESTClient creates a new region zones rest client. @@ -139,6 +140,7 @@ func NewRegionZonesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -236,21 +238,10 @@ func (c *regionZonesRESTClient) List(ctx context.Context, req *computepb.ListReg } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/region_zones_client_example_go123_test.go b/compute/apiv1/region_zones_client_example_go123_test.go index 3d3e6bc0fc6f..f3df29d6bd6f 100644 --- a/compute/apiv1/region_zones_client_example_go123_test.go +++ b/compute/apiv1/region_zones_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionZonesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/regions_client.go b/compute/apiv1/regions_client.go index 307d74c21255..357f2a54aef0 100755 --- a/compute/apiv1/regions_client.go +++ b/compute/apiv1/regions_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type regionsRESTClient struct { // Points back to the CallOptions field of the containing RegionsClient CallOptions **RegionsCallOptions + + logger *slog.Logger } // NewRegionsRESTClient creates a new regions rest client. @@ -158,6 +159,7 @@ func NewRegionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Re endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *regionsRESTClient) Get(ctx context.Context, req *computepb.GetRegionReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *regionsRESTClient) List(ctx context.Context, req *computepb.ListRegions } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/regions_client_example_go123_test.go b/compute/apiv1/regions_client_example_go123_test.go index e00b8a314442..7289bab6a6c8 100644 --- a/compute/apiv1/regions_client_example_go123_test.go +++ b/compute/apiv1/regions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/reservations_client.go b/compute/apiv1/reservations_client.go index a41939eb1423..5ffd814f5c45 100755 --- a/compute/apiv1/reservations_client.go +++ b/compute/apiv1/reservations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -244,6 +243,8 @@ type reservationsRESTClient struct { // Points back to the CallOptions field of the containing ReservationsClient CallOptions **ReservationsCallOptions + + logger *slog.Logger } // NewReservationsRESTClient creates a new reservations rest client. @@ -261,6 +262,7 @@ func NewReservationsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -377,21 +379,10 @@ func (c *reservationsRESTClient) AggregatedList(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -463,17 +454,7 @@ func (c *reservationsRESTClient) Delete(ctx context.Context, req *computepb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -526,17 +507,7 @@ func (c *reservationsRESTClient) Get(ctx context.Context, req *computepb.GetRese httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -588,17 +559,7 @@ func (c *reservationsRESTClient) GetIamPolicy(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -657,17 +618,7 @@ func (c *reservationsRESTClient) Insert(ctx context.Context, req *computepb.Inse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -745,21 +696,10 @@ func (c *reservationsRESTClient) List(ctx context.Context, req *computepb.ListRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -831,17 +771,7 @@ func (c *reservationsRESTClient) Resize(ctx context.Context, req *computepb.Resi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Resize") if err != nil { return err } @@ -901,17 +831,7 @@ func (c *reservationsRESTClient) SetIamPolicy(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -963,17 +883,7 @@ func (c *reservationsRESTClient) TestIamPermissions(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1038,17 +948,7 @@ func (c *reservationsRESTClient) Update(ctx context.Context, req *computepb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/reservations_client_example_go123_test.go b/compute/apiv1/reservations_client_example_go123_test.go index 2d57550f8d82..0aad59071260 100644 --- a/compute/apiv1/reservations_client_example_go123_test.go +++ b/compute/apiv1/reservations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleReservationsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleReservationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/resource_policies_client.go b/compute/apiv1/resource_policies_client.go index ba47694a034e..ec433615918e 100755 --- a/compute/apiv1/resource_policies_client.go +++ b/compute/apiv1/resource_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type resourcePoliciesRESTClient struct { // Points back to the CallOptions field of the containing ResourcePoliciesClient CallOptions **ResourcePoliciesCallOptions + + logger *slog.Logger } // NewResourcePoliciesRESTClient creates a new resource policies rest client. @@ -251,6 +252,7 @@ func NewResourcePoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,21 +369,10 @@ func (c *resourcePoliciesRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -453,17 +444,7 @@ func (c *resourcePoliciesRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -516,17 +497,7 @@ func (c *resourcePoliciesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -578,17 +549,7 @@ func (c *resourcePoliciesRESTClient) GetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -647,17 +608,7 @@ func (c *resourcePoliciesRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -735,21 +686,10 @@ func (c *resourcePoliciesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -824,17 +764,7 @@ func (c *resourcePoliciesRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -894,17 +824,7 @@ func (c *resourcePoliciesRESTClient) SetIamPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -956,17 +876,7 @@ func (c *resourcePoliciesRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/resource_policies_client_example_go123_test.go b/compute/apiv1/resource_policies_client_example_go123_test.go index 58a314c3b3c6..bc849db1838a 100644 --- a/compute/apiv1/resource_policies_client_example_go123_test.go +++ b/compute/apiv1/resource_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleResourcePoliciesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleResourcePoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/routers_client.go b/compute/apiv1/routers_client.go index 72153bd73ce3..5b1cd750c56d 100755 --- a/compute/apiv1/routers_client.go +++ b/compute/apiv1/routers_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -272,6 +271,8 @@ type routersRESTClient struct { // Points back to the CallOptions field of the containing RoutersClient CallOptions **RoutersCallOptions + + logger *slog.Logger } // NewRoutersRESTClient creates a new routers rest client. @@ -289,6 +290,7 @@ func NewRoutersRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ro endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -405,21 +407,10 @@ func (c *routersRESTClient) AggregatedList(ctx context.Context, req *computepb.A } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -491,17 +482,7 @@ func (c *routersRESTClient) Delete(ctx context.Context, req *computepb.DeleteRou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -554,17 +535,7 @@ func (c *routersRESTClient) Get(ctx context.Context, req *computepb.GetRouterReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -616,17 +587,7 @@ func (c *routersRESTClient) GetNatIpInfo(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNatIpInfo") if err != nil { return err } @@ -699,21 +660,10 @@ func (c *routersRESTClient) GetNatMappingInfo(ctx context.Context, req *computep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNatMappingInfo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -771,17 +721,7 @@ func (c *routersRESTClient) GetRouterStatus(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRouterStatus") if err != nil { return err } @@ -840,17 +780,7 @@ func (c *routersRESTClient) Insert(ctx context.Context, req *computepb.InsertRou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -928,21 +858,10 @@ func (c *routersRESTClient) List(ctx context.Context, req *computepb.ListRouters } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1014,17 +933,7 @@ func (c *routersRESTClient) Patch(ctx context.Context, req *computepb.PatchRoute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1084,17 +993,7 @@ func (c *routersRESTClient) Preview(ctx context.Context, req *computepb.PreviewR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Preview") if err != nil { return err } @@ -1153,17 +1052,7 @@ func (c *routersRESTClient) Update(ctx context.Context, req *computepb.UpdateRou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/routers_client_example_go123_test.go b/compute/apiv1/routers_client_example_go123_test.go index 877761ba1876..fd8169cc73b6 100644 --- a/compute/apiv1/routers_client_example_go123_test.go +++ b/compute/apiv1/routers_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRoutersClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleRoutersClient_GetNatMappingInfo_all() { } for resp, err := range c.GetNatMappingInfo(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleRoutersClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/routes_client.go b/compute/apiv1/routes_client.go index afe26fecd011..4605b8de593a 100755 --- a/compute/apiv1/routes_client.go +++ b/compute/apiv1/routes_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -165,6 +164,8 @@ type routesRESTClient struct { // Points back to the CallOptions field of the containing RoutesClient CallOptions **RoutesCallOptions + + logger *slog.Logger } // NewRoutesRESTClient creates a new routes rest client. @@ -182,6 +183,7 @@ func NewRoutesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Rou endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,17 +276,7 @@ func (c *routesRESTClient) Delete(ctx context.Context, req *computepb.DeleteRout httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -336,17 +328,7 @@ func (c *routesRESTClient) Get(ctx context.Context, req *computepb.GetRouteReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -405,17 +387,7 @@ func (c *routesRESTClient) Insert(ctx context.Context, req *computepb.InsertRout httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -492,21 +464,10 @@ func (c *routesRESTClient) List(ctx context.Context, req *computepb.ListRoutesRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/routes_client_example_go123_test.go b/compute/apiv1/routes_client_example_go123_test.go index 9342b90e8b55..34ba5087414b 100644 --- a/compute/apiv1/routes_client_example_go123_test.go +++ b/compute/apiv1/routes_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRoutesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/security_policies_client.go b/compute/apiv1/security_policies_client.go index f092c8a9e8c4..1f2ef494ada4 100755 --- a/compute/apiv1/security_policies_client.go +++ b/compute/apiv1/security_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -273,6 +272,8 @@ type securityPoliciesRESTClient struct { // Points back to the CallOptions field of the containing SecurityPoliciesClient CallOptions **SecurityPoliciesCallOptions + + logger *slog.Logger } // NewSecurityPoliciesRESTClient creates a new security policies rest client. @@ -290,6 +291,7 @@ func NewSecurityPoliciesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -389,17 +391,7 @@ func (c *securityPoliciesRESTClient) AddRule(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddRule") if err != nil { return err } @@ -482,21 +474,10 @@ func (c *securityPoliciesRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -568,17 +549,7 @@ func (c *securityPoliciesRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -630,17 +601,7 @@ func (c *securityPoliciesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -692,17 +653,7 @@ func (c *securityPoliciesRESTClient) GetRule(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRule") if err != nil { return err } @@ -764,17 +715,7 @@ func (c *securityPoliciesRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -851,21 +792,10 @@ func (c *securityPoliciesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -942,17 +872,7 @@ func (c *securityPoliciesRESTClient) ListPreconfiguredExpressionSets(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPreconfiguredExpressionSets") if err != nil { return err } @@ -1014,17 +934,7 @@ func (c *securityPoliciesRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1096,17 +1006,7 @@ func (c *securityPoliciesRESTClient) PatchRule(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchRule") if err != nil { return err } @@ -1165,17 +1065,7 @@ func (c *securityPoliciesRESTClient) RemoveRule(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RemoveRule") if err != nil { return err } @@ -1234,17 +1124,7 @@ func (c *securityPoliciesRESTClient) SetLabels(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/security_policies_client_example_go123_test.go b/compute/apiv1/security_policies_client_example_go123_test.go index f88143926849..76076b33cd73 100644 --- a/compute/apiv1/security_policies_client_example_go123_test.go +++ b/compute/apiv1/security_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSecurityPoliciesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSecurityPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/service_attachments_client.go b/compute/apiv1/service_attachments_client.go index 57174b75dd87..9191bd04578c 100755 --- a/compute/apiv1/service_attachments_client.go +++ b/compute/apiv1/service_attachments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type serviceAttachmentsRESTClient struct { // Points back to the CallOptions field of the containing ServiceAttachmentsClient CallOptions **ServiceAttachmentsCallOptions + + logger *slog.Logger } // NewServiceAttachmentsRESTClient creates a new service attachments rest client. @@ -251,6 +252,7 @@ func NewServiceAttachmentsRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,21 +369,10 @@ func (c *serviceAttachmentsRESTClient) AggregatedList(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -453,17 +444,7 @@ func (c *serviceAttachmentsRESTClient) Delete(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -516,17 +497,7 @@ func (c *serviceAttachmentsRESTClient) Get(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -578,17 +549,7 @@ func (c *serviceAttachmentsRESTClient) GetIamPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -647,17 +608,7 @@ func (c *serviceAttachmentsRESTClient) Insert(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -735,21 +686,10 @@ func (c *serviceAttachmentsRESTClient) List(ctx context.Context, req *computepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -821,17 +761,7 @@ func (c *serviceAttachmentsRESTClient) Patch(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -891,17 +821,7 @@ func (c *serviceAttachmentsRESTClient) SetIamPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -953,17 +873,7 @@ func (c *serviceAttachmentsRESTClient) TestIamPermissions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/service_attachments_client_example_go123_test.go b/compute/apiv1/service_attachments_client_example_go123_test.go index 7e655c8c5040..e0976079c53b 100644 --- a/compute/apiv1/service_attachments_client_example_go123_test.go +++ b/compute/apiv1/service_attachments_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleServiceAttachmentsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleServiceAttachmentsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/snapshot_settings_client.go b/compute/apiv1/snapshot_settings_client.go index 06544ce37e42..581646c8e26d 100755 --- a/compute/apiv1/snapshot_settings_client.go +++ b/compute/apiv1/snapshot_settings_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -133,6 +132,8 @@ type snapshotSettingsRESTClient struct { // Points back to the CallOptions field of the containing SnapshotSettingsClient CallOptions **SnapshotSettingsCallOptions + + logger *slog.Logger } // NewSnapshotSettingsRESTClient creates a new snapshot settings service rest client. @@ -150,6 +151,7 @@ func NewSnapshotSettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -235,17 +237,7 @@ func (c *snapshotSettingsRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -307,17 +299,7 @@ func (c *snapshotSettingsRESTClient) Patch(ctx context.Context, req *computepb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/snapshots_client.go b/compute/apiv1/snapshots_client.go index 6118ada6bb27..06eccadc92ab 100755 --- a/compute/apiv1/snapshots_client.go +++ b/compute/apiv1/snapshots_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -214,6 +213,8 @@ type snapshotsRESTClient struct { // Points back to the CallOptions field of the containing SnapshotsClient CallOptions **SnapshotsCallOptions + + logger *slog.Logger } // NewSnapshotsRESTClient creates a new snapshots rest client. @@ -231,6 +232,7 @@ func NewSnapshotsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -323,17 +325,7 @@ func (c *snapshotsRESTClient) Delete(ctx context.Context, req *computepb.DeleteS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -385,17 +377,7 @@ func (c *snapshotsRESTClient) Get(ctx context.Context, req *computepb.GetSnapsho httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -447,17 +429,7 @@ func (c *snapshotsRESTClient) GetIamPolicy(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -516,17 +488,7 @@ func (c *snapshotsRESTClient) Insert(ctx context.Context, req *computepb.InsertS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -603,21 +565,10 @@ func (c *snapshotsRESTClient) List(ctx context.Context, req *computepb.ListSnaps } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -682,17 +633,7 @@ func (c *snapshotsRESTClient) SetIamPolicy(ctx context.Context, req *computepb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -744,17 +685,7 @@ func (c *snapshotsRESTClient) SetLabels(ctx context.Context, req *computepb.SetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -813,17 +744,7 @@ func (c *snapshotsRESTClient) TestIamPermissions(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/snapshots_client_example_go123_test.go b/compute/apiv1/snapshots_client_example_go123_test.go index 3de9dd7a09c0..501d2f6d2cbf 100644 --- a/compute/apiv1/snapshots_client_example_go123_test.go +++ b/compute/apiv1/snapshots_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSnapshotsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/ssl_certificates_client.go b/compute/apiv1/ssl_certificates_client.go index bbb6740ff1e2..0761c4689907 100755 --- a/compute/apiv1/ssl_certificates_client.go +++ b/compute/apiv1/ssl_certificates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -185,6 +184,8 @@ type sslCertificatesRESTClient struct { // Points back to the CallOptions field of the containing SslCertificatesClient CallOptions **SslCertificatesCallOptions + + logger *slog.Logger } // NewSslCertificatesRESTClient creates a new ssl certificates rest client. @@ -202,6 +203,7 @@ func NewSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -318,21 +320,10 @@ func (c *sslCertificatesRESTClient) AggregatedList(ctx context.Context, req *com } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -404,17 +395,7 @@ func (c *sslCertificatesRESTClient) Delete(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -466,17 +447,7 @@ func (c *sslCertificatesRESTClient) Get(ctx context.Context, req *computepb.GetS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -535,17 +506,7 @@ func (c *sslCertificatesRESTClient) Insert(ctx context.Context, req *computepb.I httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -622,21 +583,10 @@ func (c *sslCertificatesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/ssl_certificates_client_example_go123_test.go b/compute/apiv1/ssl_certificates_client_example_go123_test.go index 1d0304f8ff0a..fc853a76436a 100644 --- a/compute/apiv1/ssl_certificates_client_example_go123_test.go +++ b/compute/apiv1/ssl_certificates_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSslCertificatesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSslCertificatesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/ssl_policies_client.go b/compute/apiv1/ssl_policies_client.go index 6617096a29be..08e4fcfb2046 100755 --- a/compute/apiv1/ssl_policies_client.go +++ b/compute/apiv1/ssl_policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -214,6 +213,8 @@ type sslPoliciesRESTClient struct { // Points back to the CallOptions field of the containing SslPoliciesClient CallOptions **SslPoliciesCallOptions + + logger *slog.Logger } // NewSslPoliciesRESTClient creates a new ssl policies rest client. @@ -231,6 +232,7 @@ func NewSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -347,21 +349,10 @@ func (c *sslPoliciesRESTClient) AggregatedList(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -433,17 +424,7 @@ func (c *sslPoliciesRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -495,17 +476,7 @@ func (c *sslPoliciesRESTClient) Get(ctx context.Context, req *computepb.GetSslPo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -564,17 +535,7 @@ func (c *sslPoliciesRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -651,21 +612,10 @@ func (c *sslPoliciesRESTClient) List(ctx context.Context, req *computepb.ListSsl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -742,17 +692,7 @@ func (c *sslPoliciesRESTClient) ListAvailableFeatures(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAvailableFeatures") if err != nil { return err } @@ -811,17 +751,7 @@ func (c *sslPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/ssl_policies_client_example_go123_test.go b/compute/apiv1/ssl_policies_client_example_go123_test.go index 596754198be7..bcfc54ba6825 100644 --- a/compute/apiv1/ssl_policies_client_example_go123_test.go +++ b/compute/apiv1/ssl_policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSslPoliciesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSslPoliciesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/storage_pool_types_client.go b/compute/apiv1/storage_pool_types_client.go index 6bf07ce214fc..9fc043448eae 100755 --- a/compute/apiv1/storage_pool_types_client.go +++ b/compute/apiv1/storage_pool_types_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type storagePoolTypesRESTClient struct { // Points back to the CallOptions field of the containing StoragePoolTypesClient CallOptions **StoragePoolTypesCallOptions + + logger *slog.Logger } // NewStoragePoolTypesRESTClient creates a new storage pool types rest client. @@ -178,6 +179,7 @@ func NewStoragePoolTypesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -281,21 +283,10 @@ func (c *storagePoolTypesRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -360,17 +351,7 @@ func (c *storagePoolTypesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -440,21 +421,10 @@ func (c *storagePoolTypesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/storage_pool_types_client_example_go123_test.go b/compute/apiv1/storage_pool_types_client_example_go123_test.go index 0cbf09481987..226dfca5b3e9 100644 --- a/compute/apiv1/storage_pool_types_client_example_go123_test.go +++ b/compute/apiv1/storage_pool_types_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleStoragePoolTypesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleStoragePoolTypesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/storage_pools_client.go b/compute/apiv1/storage_pools_client.go index 3ebdc1867bbd..54db0ca1fd4c 100755 --- a/compute/apiv1/storage_pools_client.go +++ b/compute/apiv1/storage_pools_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type storagePoolsRESTClient struct { // Points back to the CallOptions field of the containing StoragePoolsClient CallOptions **StoragePoolsCallOptions + + logger *slog.Logger } // NewStoragePoolsRESTClient creates a new storage pools rest client. @@ -270,6 +271,7 @@ func NewStoragePoolsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -386,21 +388,10 @@ func (c *storagePoolsRESTClient) AggregatedList(ctx context.Context, req *comput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -472,17 +463,7 @@ func (c *storagePoolsRESTClient) Delete(ctx context.Context, req *computepb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -535,17 +516,7 @@ func (c *storagePoolsRESTClient) Get(ctx context.Context, req *computepb.GetStor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -597,17 +568,7 @@ func (c *storagePoolsRESTClient) GetIamPolicy(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -666,17 +627,7 @@ func (c *storagePoolsRESTClient) Insert(ctx context.Context, req *computepb.Inse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -754,21 +705,10 @@ func (c *storagePoolsRESTClient) List(ctx context.Context, req *computepb.ListSt } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -851,21 +791,10 @@ func (c *storagePoolsRESTClient) ListDisks(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDisks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -930,17 +859,7 @@ func (c *storagePoolsRESTClient) SetIamPolicy(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -992,17 +911,7 @@ func (c *storagePoolsRESTClient) TestIamPermissions(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1064,17 +973,7 @@ func (c *storagePoolsRESTClient) Update(ctx context.Context, req *computepb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } diff --git a/compute/apiv1/storage_pools_client_example_go123_test.go b/compute/apiv1/storage_pools_client_example_go123_test.go index 57d9478c179b..0f1389c266ea 100644 --- a/compute/apiv1/storage_pools_client_example_go123_test.go +++ b/compute/apiv1/storage_pools_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleStoragePoolsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleStoragePoolsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleStoragePoolsClient_ListDisks_all() { } for resp, err := range c.ListDisks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/subnetworks_client.go b/compute/apiv1/subnetworks_client.go index e731366dfc43..740f09e21ee6 100755 --- a/compute/apiv1/subnetworks_client.go +++ b/compute/apiv1/subnetworks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -273,6 +272,8 @@ type subnetworksRESTClient struct { // Points back to the CallOptions field of the containing SubnetworksClient CallOptions **SubnetworksCallOptions + + logger *slog.Logger } // NewSubnetworksRESTClient creates a new subnetworks rest client. @@ -290,6 +291,7 @@ func NewSubnetworksRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -406,21 +408,10 @@ func (c *subnetworksRESTClient) AggregatedList(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -492,17 +483,7 @@ func (c *subnetworksRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -569,17 +550,7 @@ func (c *subnetworksRESTClient) ExpandIpCidrRange(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExpandIpCidrRange") if err != nil { return err } @@ -632,17 +603,7 @@ func (c *subnetworksRESTClient) Get(ctx context.Context, req *computepb.GetSubne httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -694,17 +655,7 @@ func (c *subnetworksRESTClient) GetIamPolicy(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -763,17 +714,7 @@ func (c *subnetworksRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -851,21 +792,10 @@ func (c *subnetworksRESTClient) List(ctx context.Context, req *computepb.ListSub } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -948,21 +878,10 @@ func (c *subnetworksRESTClient) ListUsable(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsable") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1037,17 +956,7 @@ func (c *subnetworksRESTClient) Patch(ctx context.Context, req *computepb.PatchS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -1107,17 +1016,7 @@ func (c *subnetworksRESTClient) SetIamPolicy(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1176,17 +1075,7 @@ func (c *subnetworksRESTClient) SetPrivateIpGoogleAccess(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetPrivateIpGoogleAccess") if err != nil { return err } @@ -1246,17 +1135,7 @@ func (c *subnetworksRESTClient) TestIamPermissions(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/subnetworks_client_example_go123_test.go b/compute/apiv1/subnetworks_client_example_go123_test.go index e52e0eae4c7b..286bf1883fba 100644 --- a/compute/apiv1/subnetworks_client_example_go123_test.go +++ b/compute/apiv1/subnetworks_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSubnetworksClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSubnetworksClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleSubnetworksClient_ListUsable_all() { } for resp, err := range c.ListUsable(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_grpc_proxies_client.go b/compute/apiv1/target_grpc_proxies_client.go index 73ed04666349..6bade4e88373 100755 --- a/compute/apiv1/target_grpc_proxies_client.go +++ b/compute/apiv1/target_grpc_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type targetGrpcProxiesRESTClient struct { // Points back to the CallOptions field of the containing TargetGrpcProxiesClient CallOptions **TargetGrpcProxiesCallOptions + + logger *slog.Logger } // NewTargetGrpcProxiesRESTClient creates a new target grpc proxies rest client. @@ -192,6 +193,7 @@ func NewTargetGrpcProxiesRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,17 +286,7 @@ func (c *targetGrpcProxiesRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -346,17 +338,7 @@ func (c *targetGrpcProxiesRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -415,17 +397,7 @@ func (c *targetGrpcProxiesRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -502,21 +474,10 @@ func (c *targetGrpcProxiesRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -588,17 +549,7 @@ func (c *targetGrpcProxiesRESTClient) Patch(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } diff --git a/compute/apiv1/target_grpc_proxies_client_example_go123_test.go b/compute/apiv1/target_grpc_proxies_client_example_go123_test.go index 4fb5a69e00ab..93d8d0904064 100644 --- a/compute/apiv1/target_grpc_proxies_client_example_go123_test.go +++ b/compute/apiv1/target_grpc_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetGrpcProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_http_proxies_client.go b/compute/apiv1/target_http_proxies_client.go index 6e6509b36afb..3759a06d5712 100755 --- a/compute/apiv1/target_http_proxies_client.go +++ b/compute/apiv1/target_http_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type targetHttpProxiesRESTClient struct { // Points back to the CallOptions field of the containing TargetHttpProxiesClient CallOptions **TargetHttpProxiesCallOptions + + logger *slog.Logger } // NewTargetHttpProxiesRESTClient creates a new target http proxies rest client. @@ -222,6 +223,7 @@ func NewTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *targetHttpProxiesRESTClient) AggregatedList(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *targetHttpProxiesRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -486,17 +467,7 @@ func (c *targetHttpProxiesRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -555,17 +526,7 @@ func (c *targetHttpProxiesRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -642,21 +603,10 @@ func (c *targetHttpProxiesRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -728,17 +678,7 @@ func (c *targetHttpProxiesRESTClient) Patch(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -804,17 +744,7 @@ func (c *targetHttpProxiesRESTClient) SetUrlMap(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUrlMap") if err != nil { return err } diff --git a/compute/apiv1/target_http_proxies_client_example_go123_test.go b/compute/apiv1/target_http_proxies_client_example_go123_test.go index ea81f2a900bd..09a099906e6c 100644 --- a/compute/apiv1/target_http_proxies_client_example_go123_test.go +++ b/compute/apiv1/target_http_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetHttpProxiesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetHttpProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_https_proxies_client.go b/compute/apiv1/target_https_proxies_client.go index aca1278fb2da..dbb0e9665dc8 100755 --- a/compute/apiv1/target_https_proxies_client.go +++ b/compute/apiv1/target_https_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -245,6 +244,8 @@ type targetHttpsProxiesRESTClient struct { // Points back to the CallOptions field of the containing TargetHttpsProxiesClient CallOptions **TargetHttpsProxiesCallOptions + + logger *slog.Logger } // NewTargetHttpsProxiesRESTClient creates a new target https proxies rest client. @@ -262,6 +263,7 @@ func NewTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -378,21 +380,10 @@ func (c *targetHttpsProxiesRESTClient) AggregatedList(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -464,17 +455,7 @@ func (c *targetHttpsProxiesRESTClient) Delete(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -526,17 +507,7 @@ func (c *targetHttpsProxiesRESTClient) Get(ctx context.Context, req *computepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -595,17 +566,7 @@ func (c *targetHttpsProxiesRESTClient) Insert(ctx context.Context, req *computep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -682,21 +643,10 @@ func (c *targetHttpsProxiesRESTClient) List(ctx context.Context, req *computepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -768,17 +718,7 @@ func (c *targetHttpsProxiesRESTClient) Patch(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -844,17 +784,7 @@ func (c *targetHttpsProxiesRESTClient) SetCertificateMap(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetCertificateMap") if err != nil { return err } @@ -920,17 +850,7 @@ func (c *targetHttpsProxiesRESTClient) SetQuicOverride(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetQuicOverride") if err != nil { return err } @@ -996,17 +916,7 @@ func (c *targetHttpsProxiesRESTClient) SetSslCertificates(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSslCertificates") if err != nil { return err } @@ -1072,17 +982,7 @@ func (c *targetHttpsProxiesRESTClient) SetSslPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSslPolicy") if err != nil { return err } @@ -1148,17 +1048,7 @@ func (c *targetHttpsProxiesRESTClient) SetUrlMap(ctx context.Context, req *compu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUrlMap") if err != nil { return err } diff --git a/compute/apiv1/target_https_proxies_client_example_go123_test.go b/compute/apiv1/target_https_proxies_client_example_go123_test.go index b4d9c89abaa9..104b7504333c 100644 --- a/compute/apiv1/target_https_proxies_client_example_go123_test.go +++ b/compute/apiv1/target_https_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetHttpsProxiesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetHttpsProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_instances_client.go b/compute/apiv1/target_instances_client.go index 03b36b673ef4..ebaf3d1a23a4 100755 --- a/compute/apiv1/target_instances_client.go +++ b/compute/apiv1/target_instances_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type targetInstancesRESTClient struct { // Points back to the CallOptions field of the containing TargetInstancesClient CallOptions **TargetInstancesCallOptions + + logger *slog.Logger } // NewTargetInstancesRESTClient creates a new target instances rest client. @@ -212,6 +213,7 @@ func NewTargetInstancesRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,21 +330,10 @@ func (c *targetInstancesRESTClient) AggregatedList(ctx context.Context, req *com } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -414,17 +405,7 @@ func (c *targetInstancesRESTClient) Delete(ctx context.Context, req *computepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -477,17 +458,7 @@ func (c *targetInstancesRESTClient) Get(ctx context.Context, req *computepb.GetT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -546,17 +517,7 @@ func (c *targetInstancesRESTClient) Insert(ctx context.Context, req *computepb.I httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -634,21 +595,10 @@ func (c *targetInstancesRESTClient) List(ctx context.Context, req *computepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -720,17 +670,7 @@ func (c *targetInstancesRESTClient) SetSecurityPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSecurityPolicy") if err != nil { return err } diff --git a/compute/apiv1/target_instances_client_example_go123_test.go b/compute/apiv1/target_instances_client_example_go123_test.go index a0a15d8a6a6e..1fc761dd12c9 100644 --- a/compute/apiv1/target_instances_client_example_go123_test.go +++ b/compute/apiv1/target_instances_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetInstancesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetInstancesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_pools_client.go b/compute/apiv1/target_pools_client.go index a7eb080f76df..3b62387f335f 100755 --- a/compute/apiv1/target_pools_client.go +++ b/compute/apiv1/target_pools_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -255,6 +254,8 @@ type targetPoolsRESTClient struct { // Points back to the CallOptions field of the containing TargetPoolsClient CallOptions **TargetPoolsCallOptions + + logger *slog.Logger } // NewTargetPoolsRESTClient creates a new target pools rest client. @@ -272,6 +273,7 @@ func NewTargetPoolsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -371,17 +373,7 @@ func (c *targetPoolsRESTClient) AddHealthCheck(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddHealthCheck") if err != nil { return err } @@ -448,17 +440,7 @@ func (c *targetPoolsRESTClient) AddInstance(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddInstance") if err != nil { return err } @@ -542,21 +524,10 @@ func (c *targetPoolsRESTClient) AggregatedList(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -628,17 +599,7 @@ func (c *targetPoolsRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -691,17 +652,7 @@ func (c *targetPoolsRESTClient) Get(ctx context.Context, req *computepb.GetTarge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -753,17 +704,7 @@ func (c *targetPoolsRESTClient) GetHealth(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetHealth") if err != nil { return err } @@ -822,17 +763,7 @@ func (c *targetPoolsRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -910,21 +841,10 @@ func (c *targetPoolsRESTClient) List(ctx context.Context, req *computepb.ListTar } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -996,17 +916,7 @@ func (c *targetPoolsRESTClient) RemoveHealthCheck(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveHealthCheck") if err != nil { return err } @@ -1073,17 +983,7 @@ func (c *targetPoolsRESTClient) RemoveInstance(ctx context.Context, req *compute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveInstance") if err != nil { return err } @@ -1153,17 +1053,7 @@ func (c *targetPoolsRESTClient) SetBackup(ctx context.Context, req *computepb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetBackup") if err != nil { return err } @@ -1230,17 +1120,7 @@ func (c *targetPoolsRESTClient) SetSecurityPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSecurityPolicy") if err != nil { return err } diff --git a/compute/apiv1/target_pools_client_example_go123_test.go b/compute/apiv1/target_pools_client_example_go123_test.go index 8f2aac72ef98..ce0cb147ae35 100644 --- a/compute/apiv1/target_pools_client_example_go123_test.go +++ b/compute/apiv1/target_pools_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetPoolsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetPoolsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_ssl_proxies_client.go b/compute/apiv1/target_ssl_proxies_client.go index 1b16d37e978c..7ca4d78f79b8 100755 --- a/compute/apiv1/target_ssl_proxies_client.go +++ b/compute/apiv1/target_ssl_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -215,6 +214,8 @@ type targetSslProxiesRESTClient struct { // Points back to the CallOptions field of the containing TargetSslProxiesClient CallOptions **TargetSslProxiesCallOptions + + logger *slog.Logger } // NewTargetSslProxiesRESTClient creates a new target ssl proxies rest client. @@ -232,6 +233,7 @@ func NewTargetSslProxiesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -324,17 +326,7 @@ func (c *targetSslProxiesRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -386,17 +378,7 @@ func (c *targetSslProxiesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -455,17 +437,7 @@ func (c *targetSslProxiesRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -542,21 +514,10 @@ func (c *targetSslProxiesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -628,17 +589,7 @@ func (c *targetSslProxiesRESTClient) SetBackendService(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetBackendService") if err != nil { return err } @@ -704,17 +655,7 @@ func (c *targetSslProxiesRESTClient) SetCertificateMap(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetCertificateMap") if err != nil { return err } @@ -780,17 +721,7 @@ func (c *targetSslProxiesRESTClient) SetProxyHeader(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetProxyHeader") if err != nil { return err } @@ -856,17 +787,7 @@ func (c *targetSslProxiesRESTClient) SetSslCertificates(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSslCertificates") if err != nil { return err } @@ -932,17 +853,7 @@ func (c *targetSslProxiesRESTClient) SetSslPolicy(ctx context.Context, req *comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSslPolicy") if err != nil { return err } diff --git a/compute/apiv1/target_ssl_proxies_client_example_go123_test.go b/compute/apiv1/target_ssl_proxies_client_example_go123_test.go index 2d9bb2a8afa4..8804f7e58279 100644 --- a/compute/apiv1/target_ssl_proxies_client_example_go123_test.go +++ b/compute/apiv1/target_ssl_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetSslProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_tcp_proxies_client.go b/compute/apiv1/target_tcp_proxies_client.go index ee5657270107..e533bcd8982f 100755 --- a/compute/apiv1/target_tcp_proxies_client.go +++ b/compute/apiv1/target_tcp_proxies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -205,6 +204,8 @@ type targetTcpProxiesRESTClient struct { // Points back to the CallOptions field of the containing TargetTcpProxiesClient CallOptions **TargetTcpProxiesCallOptions + + logger *slog.Logger } // NewTargetTcpProxiesRESTClient creates a new target tcp proxies rest client. @@ -222,6 +223,7 @@ func NewTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,21 +340,10 @@ func (c *targetTcpProxiesRESTClient) AggregatedList(ctx context.Context, req *co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -424,17 +415,7 @@ func (c *targetTcpProxiesRESTClient) Delete(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -486,17 +467,7 @@ func (c *targetTcpProxiesRESTClient) Get(ctx context.Context, req *computepb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -555,17 +526,7 @@ func (c *targetTcpProxiesRESTClient) Insert(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -642,21 +603,10 @@ func (c *targetTcpProxiesRESTClient) List(ctx context.Context, req *computepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -728,17 +678,7 @@ func (c *targetTcpProxiesRESTClient) SetBackendService(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetBackendService") if err != nil { return err } @@ -804,17 +744,7 @@ func (c *targetTcpProxiesRESTClient) SetProxyHeader(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetProxyHeader") if err != nil { return err } diff --git a/compute/apiv1/target_tcp_proxies_client_example_go123_test.go b/compute/apiv1/target_tcp_proxies_client_example_go123_test.go index 64284d340f26..9392f30f41d1 100644 --- a/compute/apiv1/target_tcp_proxies_client_example_go123_test.go +++ b/compute/apiv1/target_tcp_proxies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetTcpProxiesClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetTcpProxiesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/target_vpn_gateways_client.go b/compute/apiv1/target_vpn_gateways_client.go index 94dd39c30431..59124ed7d075 100755 --- a/compute/apiv1/target_vpn_gateways_client.go +++ b/compute/apiv1/target_vpn_gateways_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type targetVpnGatewaysRESTClient struct { // Points back to the CallOptions field of the containing TargetVpnGatewaysClient CallOptions **TargetVpnGatewaysCallOptions + + logger *slog.Logger } // NewTargetVpnGatewaysRESTClient creates a new target vpn gateways rest client. @@ -212,6 +213,7 @@ func NewTargetVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,21 +330,10 @@ func (c *targetVpnGatewaysRESTClient) AggregatedList(ctx context.Context, req *c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -414,17 +405,7 @@ func (c *targetVpnGatewaysRESTClient) Delete(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -477,17 +458,7 @@ func (c *targetVpnGatewaysRESTClient) Get(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -546,17 +517,7 @@ func (c *targetVpnGatewaysRESTClient) Insert(ctx context.Context, req *computepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -634,21 +595,10 @@ func (c *targetVpnGatewaysRESTClient) List(ctx context.Context, req *computepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -720,17 +670,7 @@ func (c *targetVpnGatewaysRESTClient) SetLabels(ctx context.Context, req *comput httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/target_vpn_gateways_client_example_go123_test.go b/compute/apiv1/target_vpn_gateways_client_example_go123_test.go index ed1edcfffb5d..6dde60b492c6 100644 --- a/compute/apiv1/target_vpn_gateways_client_example_go123_test.go +++ b/compute/apiv1/target_vpn_gateways_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTargetVpnGatewaysClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTargetVpnGatewaysClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/url_maps_client.go b/compute/apiv1/url_maps_client.go index 7883daeae692..bde745d07a02 100755 --- a/compute/apiv1/url_maps_client.go +++ b/compute/apiv1/url_maps_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -225,6 +224,8 @@ type urlMapsRESTClient struct { // Points back to the CallOptions field of the containing UrlMapsClient CallOptions **UrlMapsCallOptions + + logger *slog.Logger } // NewUrlMapsRESTClient creates a new url maps rest client. @@ -242,6 +243,7 @@ func NewUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ur endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -358,21 +360,10 @@ func (c *urlMapsRESTClient) AggregatedList(ctx context.Context, req *computepb.A } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -444,17 +435,7 @@ func (c *urlMapsRESTClient) Delete(ctx context.Context, req *computepb.DeleteUrl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -506,17 +487,7 @@ func (c *urlMapsRESTClient) Get(ctx context.Context, req *computepb.GetUrlMapReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -575,17 +546,7 @@ func (c *urlMapsRESTClient) Insert(ctx context.Context, req *computepb.InsertUrl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -651,17 +612,7 @@ func (c *urlMapsRESTClient) InvalidateCache(ctx context.Context, req *computepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InvalidateCache") if err != nil { return err } @@ -738,21 +689,10 @@ func (c *urlMapsRESTClient) List(ctx context.Context, req *computepb.ListUrlMaps } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -824,17 +764,7 @@ func (c *urlMapsRESTClient) Patch(ctx context.Context, req *computepb.PatchUrlMa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Patch") if err != nil { return err } @@ -900,17 +830,7 @@ func (c *urlMapsRESTClient) Update(ctx context.Context, req *computepb.UpdateUrl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Update") if err != nil { return err } @@ -969,17 +889,7 @@ func (c *urlMapsRESTClient) Validate(ctx context.Context, req *computepb.Validat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Validate") if err != nil { return err } diff --git a/compute/apiv1/url_maps_client_example_go123_test.go b/compute/apiv1/url_maps_client_example_go123_test.go index 0aa13ce450c0..517a1ca2ffa6 100644 --- a/compute/apiv1/url_maps_client_example_go123_test.go +++ b/compute/apiv1/url_maps_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUrlMapsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleUrlMapsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/vpn_gateways_client.go b/compute/apiv1/vpn_gateways_client.go index 629d5c950ec6..e49ae3bbed17 100755 --- a/compute/apiv1/vpn_gateways_client.go +++ b/compute/apiv1/vpn_gateways_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -224,6 +223,8 @@ type vpnGatewaysRESTClient struct { // Points back to the CallOptions field of the containing VpnGatewaysClient CallOptions **VpnGatewaysCallOptions + + logger *slog.Logger } // NewVpnGatewaysRESTClient creates a new vpn gateways rest client. @@ -241,6 +242,7 @@ func NewVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -357,21 +359,10 @@ func (c *vpnGatewaysRESTClient) AggregatedList(ctx context.Context, req *compute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -443,17 +434,7 @@ func (c *vpnGatewaysRESTClient) Delete(ctx context.Context, req *computepb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -506,17 +487,7 @@ func (c *vpnGatewaysRESTClient) Get(ctx context.Context, req *computepb.GetVpnGa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -561,17 +532,7 @@ func (c *vpnGatewaysRESTClient) GetStatus(ctx context.Context, req *computepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStatus") if err != nil { return err } @@ -630,17 +591,7 @@ func (c *vpnGatewaysRESTClient) Insert(ctx context.Context, req *computepb.Inser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -718,21 +669,10 @@ func (c *vpnGatewaysRESTClient) List(ctx context.Context, req *computepb.ListVpn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -804,17 +744,7 @@ func (c *vpnGatewaysRESTClient) SetLabels(ctx context.Context, req *computepb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -874,17 +804,7 @@ func (c *vpnGatewaysRESTClient) TestIamPermissions(ctx context.Context, req *com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/compute/apiv1/vpn_gateways_client_example_go123_test.go b/compute/apiv1/vpn_gateways_client_example_go123_test.go index db5ccbab1822..85937a698940 100644 --- a/compute/apiv1/vpn_gateways_client_example_go123_test.go +++ b/compute/apiv1/vpn_gateways_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleVpnGatewaysClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleVpnGatewaysClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/vpn_tunnels_client.go b/compute/apiv1/vpn_tunnels_client.go index 033dc01f6e17..8750a1d3c578 100755 --- a/compute/apiv1/vpn_tunnels_client.go +++ b/compute/apiv1/vpn_tunnels_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -195,6 +194,8 @@ type vpnTunnelsRESTClient struct { // Points back to the CallOptions field of the containing VpnTunnelsClient CallOptions **VpnTunnelsCallOptions + + logger *slog.Logger } // NewVpnTunnelsRESTClient creates a new vpn tunnels rest client. @@ -212,6 +213,7 @@ func NewVpnTunnelsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,21 +330,10 @@ func (c *vpnTunnelsRESTClient) AggregatedList(ctx context.Context, req *computep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedList") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -414,17 +405,7 @@ func (c *vpnTunnelsRESTClient) Delete(ctx context.Context, req *computepb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -477,17 +458,7 @@ func (c *vpnTunnelsRESTClient) Get(ctx context.Context, req *computepb.GetVpnTun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -546,17 +517,7 @@ func (c *vpnTunnelsRESTClient) Insert(ctx context.Context, req *computepb.Insert httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Insert") if err != nil { return err } @@ -634,21 +595,10 @@ func (c *vpnTunnelsRESTClient) List(ctx context.Context, req *computepb.ListVpnT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -720,17 +670,7 @@ func (c *vpnTunnelsRESTClient) SetLabels(ctx context.Context, req *computepb.Set httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } diff --git a/compute/apiv1/vpn_tunnels_client_example_go123_test.go b/compute/apiv1/vpn_tunnels_client_example_go123_test.go index 368fb9c422a2..fa05a16d93a7 100644 --- a/compute/apiv1/vpn_tunnels_client_example_go123_test.go +++ b/compute/apiv1/vpn_tunnels_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleVpnTunnelsClient_AggregatedList_all() { } for resp, err := range c.AggregatedList(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleVpnTunnelsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/zone_operations_client.go b/compute/apiv1/zone_operations_client.go index 598b56d635a1..61c65903de74 100755 --- a/compute/apiv1/zone_operations_client.go +++ b/compute/apiv1/zone_operations_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type zoneOperationsRESTClient struct { // Points back to the CallOptions field of the containing ZoneOperationsClient CallOptions **ZoneOperationsCallOptions + + logger *slog.Logger } // NewZoneOperationsRESTClient creates a new zone operations rest client. @@ -178,6 +179,7 @@ func NewZoneOperationsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -250,17 +252,7 @@ func (c *zoneOperationsRESTClient) Delete(ctx context.Context, req *computepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Delete") if err != nil { return err } @@ -305,17 +297,7 @@ func (c *zoneOperationsRESTClient) Get(ctx context.Context, req *computepb.GetZo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -385,21 +367,10 @@ func (c *zoneOperationsRESTClient) List(ctx context.Context, req *computepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -457,17 +428,7 @@ func (c *zoneOperationsRESTClient) Wait(ctx context.Context, req *computepb.Wait httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Wait") if err != nil { return err } diff --git a/compute/apiv1/zone_operations_client_example_go123_test.go b/compute/apiv1/zone_operations_client_example_go123_test.go index 4b17dd7e591e..7b5a9670f8b4 100644 --- a/compute/apiv1/zone_operations_client_example_go123_test.go +++ b/compute/apiv1/zone_operations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleZoneOperationsClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/compute/apiv1/zones_client.go b/compute/apiv1/zones_client.go index 0e760371ada8..ba703884de90 100755 --- a/compute/apiv1/zones_client.go +++ b/compute/apiv1/zones_client.go @@ -19,7 +19,7 @@ package compute import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( computepb "cloud.google.com/go/compute/apiv1/computepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -141,6 +140,8 @@ type zonesRESTClient struct { // Points back to the CallOptions field of the containing ZonesClient CallOptions **ZonesCallOptions + + logger *slog.Logger } // NewZonesRESTClient creates a new zones rest client. @@ -158,6 +159,7 @@ func NewZonesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Zone endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,17 +232,7 @@ func (c *zonesRESTClient) Get(ctx context.Context, req *computepb.GetZoneRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "Get") if err != nil { return err } @@ -310,21 +302,10 @@ func (c *zonesRESTClient) List(ctx context.Context, req *computepb.ListZonesRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "List") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/compute/apiv1/zones_client_example_go123_test.go b/compute/apiv1/zones_client_example_go123_test.go index 559603cfcf16..6d3fb22f56dc 100644 --- a/compute/apiv1/zones_client_example_go123_test.go +++ b/compute/apiv1/zones_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleZonesClient_List_all() { } for resp, err := range c.List(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/confidentialcomputing/apiv1/confidential_computing_client.go b/confidentialcomputing/apiv1/confidential_computing_client.go index 109e924fa2e9..a2716507c78e 100755 --- a/confidentialcomputing/apiv1/confidential_computing_client.go +++ b/confidentialcomputing/apiv1/confidential_computing_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( confidentialcomputingpb "cloud.google.com/go/confidentialcomputing/apiv1/confidentialcomputingpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -209,6 +208,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new confidential computing client based on gRPC. @@ -235,6 +236,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: confidentialcomputingpb.NewConfidentialComputingClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -282,6 +284,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new confidential computing rest client. @@ -299,6 +303,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -351,7 +356,7 @@ func (c *gRPCClient) CreateChallenge(ctx context.Context, req *confidentialcompu var resp *confidentialcomputingpb.Challenge err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateChallenge(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateChallenge, req, settings.GRPC, c.logger, "CreateChallenge") return err }, opts...) if err != nil { @@ -369,7 +374,7 @@ func (c *gRPCClient) VerifyAttestation(ctx context.Context, req *confidentialcom var resp *confidentialcomputingpb.VerifyAttestationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.VerifyAttestation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.VerifyAttestation, req, settings.GRPC, c.logger, "VerifyAttestation") return err }, opts...) if err != nil { @@ -387,7 +392,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -482,17 +487,7 @@ func (c *restClient) CreateChallenge(ctx context.Context, req *confidentialcompu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChallenge") if err != nil { return err } @@ -548,17 +543,7 @@ func (c *restClient) VerifyAttestation(ctx context.Context, req *confidentialcom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "VerifyAttestation") if err != nil { return err } @@ -608,17 +593,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -683,21 +658,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/confidentialcomputing/apiv1/confidential_computing_client_example_go123_test.go b/confidentialcomputing/apiv1/confidential_computing_client_example_go123_test.go index 291d06effd44..655a3d0599d4 100644 --- a/confidentialcomputing/apiv1/confidential_computing_client_example_go123_test.go +++ b/confidentialcomputing/apiv1/confidential_computing_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/confidentialcomputing/apiv1/confidentialcomputingpb/service.pb.go b/confidentialcomputing/apiv1/confidentialcomputingpb/service.pb.go index 983db1b399b9..68c1147fd6ed 100755 --- a/confidentialcomputing/apiv1/confidentialcomputingpb/service.pb.go +++ b/confidentialcomputing/apiv1/confidentialcomputingpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/confidentialcomputing/v1/service.proto @@ -183,11 +183,9 @@ type Challenge struct { func (x *Challenge) Reset() { *x = Challenge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Challenge) String() string { @@ -198,7 +196,7 @@ func (*Challenge) ProtoMessage() {} func (x *Challenge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type CreateChallengeRequest struct { func (x *CreateChallengeRequest) Reset() { *x = CreateChallengeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChallengeRequest) String() string { @@ -279,7 +275,7 @@ func (*CreateChallengeRequest) ProtoMessage() {} func (x *CreateChallengeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +338,9 @@ type VerifyAttestationRequest struct { func (x *VerifyAttestationRequest) Reset() { *x = VerifyAttestationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyAttestationRequest) String() string { @@ -357,7 +351,7 @@ func (*VerifyAttestationRequest) ProtoMessage() {} func (x *VerifyAttestationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +461,9 @@ type TdxCcelAttestation struct { func (x *TdxCcelAttestation) Reset() { *x = TdxCcelAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TdxCcelAttestation) String() string { @@ -482,7 +474,7 @@ func (*TdxCcelAttestation) ProtoMessage() {} func (x *TdxCcelAttestation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +539,9 @@ type SevSnpAttestation struct { func (x *SevSnpAttestation) Reset() { *x = SevSnpAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SevSnpAttestation) String() string { @@ -562,7 +552,7 @@ func (*SevSnpAttestation) ProtoMessage() {} func (x *SevSnpAttestation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +597,9 @@ type VerifyAttestationResponse struct { func (x *VerifyAttestationResponse) Reset() { *x = VerifyAttestationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyAttestationResponse) String() string { @@ -622,7 +610,7 @@ func (*VerifyAttestationResponse) ProtoMessage() {} func (x *VerifyAttestationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +652,9 @@ type GcpCredentials struct { func (x *GcpCredentials) Reset() { *x = GcpCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpCredentials) String() string { @@ -679,7 +665,7 @@ func (*GcpCredentials) ProtoMessage() {} func (x *GcpCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +712,9 @@ type TokenOptions struct { func (x *TokenOptions) Reset() { *x = TokenOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenOptions) String() string { @@ -741,7 +725,7 @@ func (*TokenOptions) ProtoMessage() {} func (x *TokenOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +813,9 @@ type TpmAttestation struct { func (x *TpmAttestation) Reset() { *x = TpmAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TpmAttestation) String() string { @@ -844,7 +826,7 @@ func (*TpmAttestation) ProtoMessage() {} func (x *TpmAttestation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +890,9 @@ type ConfidentialSpaceInfo struct { func (x *ConfidentialSpaceInfo) Reset() { *x = ConfidentialSpaceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfidentialSpaceInfo) String() string { @@ -923,7 +903,7 @@ func (*ConfidentialSpaceInfo) ProtoMessage() {} func (x *ConfidentialSpaceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +939,9 @@ type SignedEntity struct { func (x *SignedEntity) Reset() { *x = SignedEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignedEntity) String() string { @@ -974,7 +952,7 @@ func (*SignedEntity) ProtoMessage() {} func (x *SignedEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +1001,9 @@ type ContainerImageSignature struct { func (x *ContainerImageSignature) Reset() { *x = ContainerImageSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerImageSignature) String() string { @@ -1038,7 +1014,7 @@ func (*ContainerImageSignature) ProtoMessage() {} func (x *ContainerImageSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1093,11 +1069,9 @@ type TokenOptions_AwsPrincipalTagsOptions struct { func (x *TokenOptions_AwsPrincipalTagsOptions) Reset() { *x = TokenOptions_AwsPrincipalTagsOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenOptions_AwsPrincipalTagsOptions) String() string { @@ -1108,7 +1082,7 @@ func (*TokenOptions_AwsPrincipalTagsOptions) ProtoMessage() {} func (x *TokenOptions_AwsPrincipalTagsOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1117,9 @@ type TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags struct { func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags) Reset() { *x = TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags) String() string { @@ -1158,7 +1130,7 @@ func (*TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags) ProtoMessage() func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1195,11 +1167,9 @@ type TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSig func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSignatures) Reset() { *x = TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSignatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSignatures) String() string { @@ -1211,7 +1181,7 @@ func (*TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageS func (x *TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSignatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1222,9 @@ type TpmAttestation_Quote struct { func (x *TpmAttestation_Quote) Reset() { *x = TpmAttestation_Quote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TpmAttestation_Quote) String() string { @@ -1267,7 +1235,7 @@ func (*TpmAttestation_Quote) ProtoMessage() {} func (x *TpmAttestation_Quote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1699,200 +1667,6 @@ func file_google_cloud_confidentialcomputing_v1_service_proto_init() { if File_google_cloud_confidentialcomputing_v1_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Challenge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateChallengeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VerifyAttestationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TdxCcelAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SevSnpAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VerifyAttestationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GcpCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TokenOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TpmAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ConfidentialSpaceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SignedEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ContainerImageSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TokenOptions_AwsPrincipalTagsOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TokenOptions_AwsPrincipalTagsOptions_AllowedPrincipalTags_ContainerImageSignatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*TpmAttestation_Quote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_confidentialcomputing_v1_service_proto_msgTypes[2].OneofWrappers = []any{ (*VerifyAttestationRequest_TdCcel)(nil), (*VerifyAttestationRequest_SevSnpAttestation)(nil), diff --git a/confidentialcomputing/apiv1/helpers.go b/confidentialcomputing/apiv1/helpers.go index 58a23d18e70e..c6838d3a4f63 100755 --- a/confidentialcomputing/apiv1/helpers.go +++ b/confidentialcomputing/apiv1/helpers.go @@ -18,10 +18,20 @@ package confidentialcomputing import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "confidentialcomputing.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/confidentialcomputing/apiv1alpha1/confidential_computing_client.go b/confidentialcomputing/apiv1alpha1/confidential_computing_client.go index 9e489c323a39..fc59dee75d85 100755 --- a/confidentialcomputing/apiv1alpha1/confidential_computing_client.go +++ b/confidentialcomputing/apiv1alpha1/confidential_computing_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( confidentialcomputingpb "cloud.google.com/go/confidentialcomputing/apiv1alpha1/confidentialcomputingpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -209,6 +208,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new confidential computing client based on gRPC. @@ -235,6 +236,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: confidentialcomputingpb.NewConfidentialComputingClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -282,6 +284,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new confidential computing rest client. @@ -299,6 +303,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -351,7 +356,7 @@ func (c *gRPCClient) CreateChallenge(ctx context.Context, req *confidentialcompu var resp *confidentialcomputingpb.Challenge err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateChallenge(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateChallenge, req, settings.GRPC, c.logger, "CreateChallenge") return err }, opts...) if err != nil { @@ -369,7 +374,7 @@ func (c *gRPCClient) VerifyAttestation(ctx context.Context, req *confidentialcom var resp *confidentialcomputingpb.VerifyAttestationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.VerifyAttestation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.VerifyAttestation, req, settings.GRPC, c.logger, "VerifyAttestation") return err }, opts...) if err != nil { @@ -387,7 +392,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -482,17 +487,7 @@ func (c *restClient) CreateChallenge(ctx context.Context, req *confidentialcompu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChallenge") if err != nil { return err } @@ -548,17 +543,7 @@ func (c *restClient) VerifyAttestation(ctx context.Context, req *confidentialcom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "VerifyAttestation") if err != nil { return err } @@ -608,17 +593,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -683,21 +658,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/confidentialcomputing/apiv1alpha1/confidential_computing_client_example_go123_test.go b/confidentialcomputing/apiv1alpha1/confidential_computing_client_example_go123_test.go index b8a39611ffb3..4b9bae5a2e0a 100644 --- a/confidentialcomputing/apiv1alpha1/confidential_computing_client_example_go123_test.go +++ b/confidentialcomputing/apiv1alpha1/confidential_computing_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/confidentialcomputing/apiv1alpha1/confidentialcomputingpb/service.pb.go b/confidentialcomputing/apiv1alpha1/confidentialcomputingpb/service.pb.go index 56bfa2f69b79..0bc469034991 100755 --- a/confidentialcomputing/apiv1alpha1/confidentialcomputingpb/service.pb.go +++ b/confidentialcomputing/apiv1alpha1/confidentialcomputingpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/confidentialcomputing/v1alpha1/service.proto @@ -64,11 +64,9 @@ type Challenge struct { func (x *Challenge) Reset() { *x = Challenge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Challenge) String() string { @@ -79,7 +77,7 @@ func (*Challenge) ProtoMessage() {} func (x *Challenge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +143,9 @@ type CreateChallengeRequest struct { func (x *CreateChallengeRequest) Reset() { *x = CreateChallengeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChallengeRequest) String() string { @@ -160,7 +156,7 @@ func (*CreateChallengeRequest) ProtoMessage() {} func (x *CreateChallengeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type VerifyAttestationRequest struct { func (x *VerifyAttestationRequest) Reset() { *x = VerifyAttestationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyAttestationRequest) String() string { @@ -225,7 +219,7 @@ func (*VerifyAttestationRequest) ProtoMessage() {} func (x *VerifyAttestationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +270,9 @@ type VerifyAttestationResponse struct { func (x *VerifyAttestationResponse) Reset() { *x = VerifyAttestationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyAttestationResponse) String() string { @@ -291,7 +283,7 @@ func (*VerifyAttestationResponse) ProtoMessage() {} func (x *VerifyAttestationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +323,9 @@ type GcpCredentials struct { func (x *GcpCredentials) Reset() { *x = GcpCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpCredentials) String() string { @@ -346,7 +336,7 @@ func (*GcpCredentials) ProtoMessage() {} func (x *GcpCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +385,9 @@ type TpmAttestation struct { func (x *TpmAttestation) Reset() { *x = TpmAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TpmAttestation) String() string { @@ -410,7 +398,7 @@ func (*TpmAttestation) ProtoMessage() {} func (x *TpmAttestation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type TpmAttestation_Quote struct { func (x *TpmAttestation_Quote) Reset() { *x = TpmAttestation_Quote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TpmAttestation_Quote) String() string { @@ -494,7 +480,7 @@ func (*TpmAttestation_Quote) ProtoMessage() {} func (x *TpmAttestation_Quote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,92 +744,6 @@ func file_google_cloud_confidentialcomputing_v1alpha1_service_proto_init() { if File_google_cloud_confidentialcomputing_v1alpha1_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Challenge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateChallengeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VerifyAttestationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VerifyAttestationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GcpCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TpmAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_confidentialcomputing_v1alpha1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TpmAttestation_Quote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/confidentialcomputing/apiv1alpha1/helpers.go b/confidentialcomputing/apiv1alpha1/helpers.go index 58a23d18e70e..c6838d3a4f63 100755 --- a/confidentialcomputing/apiv1alpha1/helpers.go +++ b/confidentialcomputing/apiv1alpha1/helpers.go @@ -18,10 +18,20 @@ package confidentialcomputing import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "confidentialcomputing.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/config/apiv1/config_client.go b/config/apiv1/config_client.go index 366e7cd547e6..dbd94d29113e 100755 --- a/config/apiv1/config_client.go +++ b/config/apiv1/config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -502,6 +501,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new config client based on gRPC. @@ -529,6 +530,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: configpb.NewConfigClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -594,6 +596,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new config rest client. @@ -612,6 +616,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -685,7 +690,7 @@ func (c *gRPCClient) ListDeployments(ctx context.Context, req *configpb.ListDepl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeployments, req, settings.GRPC, c.logger, "ListDeployments") return err }, opts...) if err != nil { @@ -720,7 +725,7 @@ func (c *gRPCClient) GetDeployment(ctx context.Context, req *configpb.GetDeploym var resp *configpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDeployment, req, settings.GRPC, c.logger, "GetDeployment") return err }, opts...) if err != nil { @@ -738,7 +743,7 @@ func (c *gRPCClient) CreateDeployment(ctx context.Context, req *configpb.CreateD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDeployment, req, settings.GRPC, c.logger, "CreateDeployment") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *gRPCClient) UpdateDeployment(ctx context.Context, req *configpb.UpdateD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDeployment, req, settings.GRPC, c.logger, "UpdateDeployment") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *gRPCClient) DeleteDeployment(ctx context.Context, req *configpb.DeleteD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDeployment, req, settings.GRPC, c.logger, "DeleteDeployment") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *gRPCClient) ListRevisions(ctx context.Context, req *configpb.ListRevisi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRevisions, req, settings.GRPC, c.logger, "ListRevisions") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *gRPCClient) GetRevision(ctx context.Context, req *configpb.GetRevisionR var resp *configpb.Revision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRevision, req, settings.GRPC, c.logger, "GetRevision") return err }, opts...) if err != nil { @@ -862,7 +867,7 @@ func (c *gRPCClient) GetResource(ctx context.Context, req *configpb.GetResourceR var resp *configpb.Resource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetResource, req, settings.GRPC, c.logger, "GetResource") return err }, opts...) if err != nil { @@ -891,7 +896,7 @@ func (c *gRPCClient) ListResources(ctx context.Context, req *configpb.ListResour } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListResources, req, settings.GRPC, c.logger, "ListResources") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *gRPCClient) ExportDeploymentStatefile(ctx context.Context, req *configp var resp *configpb.Statefile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportDeploymentStatefile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportDeploymentStatefile, req, settings.GRPC, c.logger, "ExportDeploymentStatefile") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *gRPCClient) ExportRevisionStatefile(ctx context.Context, req *configpb. var resp *configpb.Statefile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportRevisionStatefile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportRevisionStatefile, req, settings.GRPC, c.logger, "ExportRevisionStatefile") return err }, opts...) if err != nil { @@ -962,7 +967,7 @@ func (c *gRPCClient) ImportStatefile(ctx context.Context, req *configpb.ImportSt var resp *configpb.Statefile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportStatefile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportStatefile, req, settings.GRPC, c.logger, "ImportStatefile") return err }, opts...) if err != nil { @@ -979,7 +984,7 @@ func (c *gRPCClient) DeleteStatefile(ctx context.Context, req *configpb.DeleteSt opts = append((*c.CallOptions).DeleteStatefile[0:len((*c.CallOptions).DeleteStatefile):len((*c.CallOptions).DeleteStatefile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteStatefile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteStatefile, req, settings.GRPC, c.logger, "DeleteStatefile") return err }, opts...) return err @@ -994,7 +999,7 @@ func (c *gRPCClient) LockDeployment(ctx context.Context, req *configpb.LockDeplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LockDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LockDeployment, req, settings.GRPC, c.logger, "LockDeployment") return err }, opts...) if err != nil { @@ -1014,7 +1019,7 @@ func (c *gRPCClient) UnlockDeployment(ctx context.Context, req *configpb.UnlockD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UnlockDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UnlockDeployment, req, settings.GRPC, c.logger, "UnlockDeployment") return err }, opts...) if err != nil { @@ -1034,7 +1039,7 @@ func (c *gRPCClient) ExportLockInfo(ctx context.Context, req *configpb.ExportLoc var resp *configpb.LockInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportLockInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportLockInfo, req, settings.GRPC, c.logger, "ExportLockInfo") return err }, opts...) if err != nil { @@ -1052,7 +1057,7 @@ func (c *gRPCClient) CreatePreview(ctx context.Context, req *configpb.CreatePrev var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePreview(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePreview, req, settings.GRPC, c.logger, "CreatePreview") return err }, opts...) if err != nil { @@ -1072,7 +1077,7 @@ func (c *gRPCClient) GetPreview(ctx context.Context, req *configpb.GetPreviewReq var resp *configpb.Preview err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPreview(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPreview, req, settings.GRPC, c.logger, "GetPreview") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *gRPCClient) ListPreviews(ctx context.Context, req *configpb.ListPreview } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPreviews(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPreviews, req, settings.GRPC, c.logger, "ListPreviews") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *gRPCClient) DeletePreview(ctx context.Context, req *configpb.DeletePrev var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePreview(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePreview, req, settings.GRPC, c.logger, "DeletePreview") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *gRPCClient) ExportPreviewResult(ctx context.Context, req *configpb.Expo var resp *configpb.ExportPreviewResultResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportPreviewResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportPreviewResult, req, settings.GRPC, c.logger, "ExportPreviewResult") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *gRPCClient) ListTerraformVersions(ctx context.Context, req *configpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTerraformVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTerraformVersions, req, settings.GRPC, c.logger, "ListTerraformVersions") return err }, opts...) if err != nil { @@ -1220,7 +1225,7 @@ func (c *gRPCClient) GetTerraformVersion(ctx context.Context, req *configpb.GetT var resp *configpb.TerraformVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTerraformVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTerraformVersion, req, settings.GRPC, c.logger, "GetTerraformVersion") return err }, opts...) if err != nil { @@ -1238,7 +1243,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1267,7 +1272,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1302,7 +1307,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1320,7 +1325,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1338,7 +1343,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1355,7 +1360,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1369,7 +1374,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1384,7 +1389,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1413,7 +1418,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1491,21 +1496,10 @@ func (c *restClient) ListDeployments(ctx context.Context, req *configpb.ListDepl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1568,17 +1562,7 @@ func (c *restClient) GetDeployment(ctx context.Context, req *configpb.GetDeploym httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -1638,21 +1622,10 @@ func (c *restClient) CreateDeployment(ctx context.Context, req *configpb.CreateD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1719,21 +1692,10 @@ func (c *restClient) UpdateDeployment(ctx context.Context, req *configpb.UpdateD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1792,21 +1754,10 @@ func (c *restClient) DeleteDeployment(ctx context.Context, req *configpb.DeleteD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1875,21 +1826,10 @@ func (c *restClient) ListRevisions(ctx context.Context, req *configpb.ListRevisi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1952,17 +1892,7 @@ func (c *restClient) GetRevision(ctx context.Context, req *configpb.GetRevisionR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRevision") if err != nil { return err } @@ -2013,17 +1943,7 @@ func (c *restClient) GetResource(ctx context.Context, req *configpb.GetResourceR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetResource") if err != nil { return err } @@ -2091,21 +2011,10 @@ func (c *restClient) ListResources(ctx context.Context, req *configpb.ListResour } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2174,17 +2083,7 @@ func (c *restClient) ExportDeploymentStatefile(ctx context.Context, req *configp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportDeploymentStatefile") if err != nil { return err } @@ -2240,17 +2139,7 @@ func (c *restClient) ExportRevisionStatefile(ctx context.Context, req *configpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportRevisionStatefile") if err != nil { return err } @@ -2307,17 +2196,7 @@ func (c *restClient) ImportStatefile(ctx context.Context, req *configpb.ImportSt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportStatefile") if err != nil { return err } @@ -2370,15 +2249,8 @@ func (c *restClient) DeleteStatefile(ctx context.Context, req *configpb.DeleteSt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteStatefile") + return err }, opts...) } @@ -2420,21 +2292,10 @@ func (c *restClient) LockDeployment(ctx context.Context, req *configpb.LockDeplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LockDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2490,21 +2351,10 @@ func (c *restClient) UnlockDeployment(ctx context.Context, req *configpb.UnlockD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnlockDeployment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2555,17 +2405,7 @@ func (c *restClient) ExportLockInfo(ctx context.Context, req *configpb.ExportLoc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ExportLockInfo") if err != nil { return err } @@ -2627,21 +2467,10 @@ func (c *restClient) CreatePreview(ctx context.Context, req *configpb.CreatePrev httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePreview") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2692,17 +2521,7 @@ func (c *restClient) GetPreview(ctx context.Context, req *configpb.GetPreviewReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPreview") if err != nil { return err } @@ -2771,21 +2590,10 @@ func (c *restClient) ListPreviews(ctx context.Context, req *configpb.ListPreview } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPreviews") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2850,21 +2658,10 @@ func (c *restClient) DeletePreview(ctx context.Context, req *configpb.DeletePrev httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePreview") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2921,17 +2718,7 @@ func (c *restClient) ExportPreviewResult(ctx context.Context, req *configpb.Expo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportPreviewResult") if err != nil { return err } @@ -3000,21 +2787,10 @@ func (c *restClient) ListTerraformVersions(ctx context.Context, req *configpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTerraformVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3078,17 +2854,7 @@ func (c *restClient) GetTerraformVersion(ctx context.Context, req *configpb.GetT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTerraformVersion") if err != nil { return err } @@ -3138,17 +2904,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3213,21 +2969,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3294,17 +3039,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3364,17 +3099,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3436,17 +3161,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3499,15 +3214,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3541,15 +3249,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3586,17 +3287,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3661,21 +3352,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/config/apiv1/config_client_example_go123_test.go b/config/apiv1/config_client_example_go123_test.go index ca6902ec1c94..b24747221793 100644 --- a/config/apiv1/config_client_example_go123_test.go +++ b/config/apiv1/config_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListPreviews_all() { } for resp, err := range c.ListPreviews(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListResources_all() { } for resp, err := range c.ListResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListRevisions_all() { } for resp, err := range c.ListRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListTerraformVersions_all() { } for resp, err := range c.ListTerraformVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/config/apiv1/configpb/config.pb.go b/config/apiv1/configpb/config.pb.go index f15554a4a3ab..557cae149f3f 100755 --- a/config/apiv1/configpb/config.pb.go +++ b/config/apiv1/configpb/config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/config/v1/config.proto @@ -1206,11 +1206,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -1221,7 +1219,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1434,9 @@ type TerraformBlueprint struct { func (x *TerraformBlueprint) Reset() { *x = TerraformBlueprint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerraformBlueprint) String() string { @@ -1451,7 +1447,7 @@ func (*TerraformBlueprint) ProtoMessage() {} func (x *TerraformBlueprint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1528,11 +1524,9 @@ type TerraformVariable struct { func (x *TerraformVariable) Reset() { *x = TerraformVariable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerraformVariable) String() string { @@ -1543,7 +1537,7 @@ func (*TerraformVariable) ProtoMessage() {} func (x *TerraformVariable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1583,11 +1577,9 @@ type ApplyResults struct { func (x *ApplyResults) Reset() { *x = ApplyResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyResults) String() string { @@ -1598,7 +1590,7 @@ func (*ApplyResults) ProtoMessage() {} func (x *ApplyResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1649,11 +1641,9 @@ type TerraformOutput struct { func (x *TerraformOutput) Reset() { *x = TerraformOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerraformOutput) String() string { @@ -1664,7 +1654,7 @@ func (*TerraformOutput) ProtoMessage() {} func (x *TerraformOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1727,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -1752,7 +1740,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1806,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -1833,7 +1819,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1881,11 +1867,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -1896,7 +1880,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1963,11 +1947,9 @@ type ListRevisionsRequest struct { func (x *ListRevisionsRequest) Reset() { *x = ListRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRevisionsRequest) String() string { @@ -1978,7 +1960,7 @@ func (*ListRevisionsRequest) ProtoMessage() {} func (x *ListRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2046,11 +2028,9 @@ type ListRevisionsResponse struct { func (x *ListRevisionsResponse) Reset() { *x = ListRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRevisionsResponse) String() string { @@ -2061,7 +2041,7 @@ func (*ListRevisionsResponse) ProtoMessage() {} func (x *ListRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2110,11 +2090,9 @@ type GetRevisionRequest struct { func (x *GetRevisionRequest) Reset() { *x = GetRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRevisionRequest) String() string { @@ -2125,7 +2103,7 @@ func (*GetRevisionRequest) ProtoMessage() {} func (x *GetRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2178,11 +2156,9 @@ type CreateDeploymentRequest struct { func (x *CreateDeploymentRequest) Reset() { *x = CreateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentRequest) String() string { @@ -2193,7 +2169,7 @@ func (*CreateDeploymentRequest) ProtoMessage() {} func (x *CreateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2272,11 +2248,9 @@ type UpdateDeploymentRequest struct { func (x *UpdateDeploymentRequest) Reset() { *x = UpdateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentRequest) String() string { @@ -2287,7 +2261,7 @@ func (*UpdateDeploymentRequest) ProtoMessage() {} func (x *UpdateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2357,11 +2331,9 @@ type DeleteDeploymentRequest struct { func (x *DeleteDeploymentRequest) Reset() { *x = DeleteDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeploymentRequest) String() string { @@ -2372,7 +2344,7 @@ func (*DeleteDeploymentRequest) ProtoMessage() {} func (x *DeleteDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2451,11 +2423,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2466,7 +2436,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2649,11 +2619,9 @@ type Revision struct { func (x *Revision) Reset() { *x = Revision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Revision) String() string { @@ -2664,7 +2632,7 @@ func (*Revision) ProtoMessage() {} func (x *Revision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2859,11 +2827,9 @@ type TerraformError struct { func (x *TerraformError) Reset() { *x = TerraformError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerraformError) String() string { @@ -2874,7 +2840,7 @@ func (*TerraformError) ProtoMessage() {} func (x *TerraformError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2935,11 +2901,9 @@ type GitSource struct { func (x *GitSource) Reset() { *x = GitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitSource) String() string { @@ -2950,7 +2914,7 @@ func (*GitSource) ProtoMessage() {} func (x *GitSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3005,11 +2969,9 @@ type DeploymentOperationMetadata struct { func (x *DeploymentOperationMetadata) Reset() { *x = DeploymentOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeploymentOperationMetadata) String() string { @@ -3020,7 +2982,7 @@ func (*DeploymentOperationMetadata) ProtoMessage() {} func (x *DeploymentOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3089,11 +3051,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -3104,7 +3064,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3171,11 +3131,9 @@ type ResourceTerraformInfo struct { func (x *ResourceTerraformInfo) Reset() { *x = ResourceTerraformInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceTerraformInfo) String() string { @@ -3186,7 +3144,7 @@ func (*ResourceTerraformInfo) ProtoMessage() {} func (x *ResourceTerraformInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3235,11 +3193,9 @@ type ResourceCAIInfo struct { func (x *ResourceCAIInfo) Reset() { *x = ResourceCAIInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceCAIInfo) String() string { @@ -3250,7 +3206,7 @@ func (*ResourceCAIInfo) ProtoMessage() {} func (x *ResourceCAIInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3285,11 +3241,9 @@ type GetResourceRequest struct { func (x *GetResourceRequest) Reset() { *x = GetResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResourceRequest) String() string { @@ -3300,7 +3254,7 @@ func (*GetResourceRequest) ProtoMessage() {} func (x *GetResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3359,11 +3313,9 @@ type ListResourcesRequest struct { func (x *ListResourcesRequest) Reset() { *x = ListResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourcesRequest) String() string { @@ -3374,7 +3326,7 @@ func (*ListResourcesRequest) ProtoMessage() {} func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3442,11 +3394,9 @@ type ListResourcesResponse struct { func (x *ListResourcesResponse) Reset() { *x = ListResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourcesResponse) String() string { @@ -3457,7 +3407,7 @@ func (*ListResourcesResponse) ProtoMessage() {} func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3506,11 +3456,9 @@ type Statefile struct { func (x *Statefile) Reset() { *x = Statefile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Statefile) String() string { @@ -3521,7 +3469,7 @@ func (*Statefile) ProtoMessage() {} func (x *Statefile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3562,11 +3510,9 @@ type ExportDeploymentStatefileRequest struct { func (x *ExportDeploymentStatefileRequest) Reset() { *x = ExportDeploymentStatefileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDeploymentStatefileRequest) String() string { @@ -3577,7 +3523,7 @@ func (*ExportDeploymentStatefileRequest) ProtoMessage() {} func (x *ExportDeploymentStatefileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3621,11 +3567,9 @@ type ExportRevisionStatefileRequest struct { func (x *ExportRevisionStatefileRequest) Reset() { *x = ExportRevisionStatefileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportRevisionStatefileRequest) String() string { @@ -3636,7 +3580,7 @@ func (*ExportRevisionStatefileRequest) ProtoMessage() {} func (x *ExportRevisionStatefileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3677,11 +3621,9 @@ type ImportStatefileRequest struct { func (x *ImportStatefileRequest) Reset() { *x = ImportStatefileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportStatefileRequest) String() string { @@ -3692,7 +3634,7 @@ func (*ImportStatefileRequest) ProtoMessage() {} func (x *ImportStatefileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3744,11 +3686,9 @@ type DeleteStatefileRequest struct { func (x *DeleteStatefileRequest) Reset() { *x = DeleteStatefileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStatefileRequest) String() string { @@ -3759,7 +3699,7 @@ func (*DeleteStatefileRequest) ProtoMessage() {} func (x *DeleteStatefileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3801,11 +3741,9 @@ type LockDeploymentRequest struct { func (x *LockDeploymentRequest) Reset() { *x = LockDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LockDeploymentRequest) String() string { @@ -3816,7 +3754,7 @@ func (*LockDeploymentRequest) ProtoMessage() {} func (x *LockDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3853,11 +3791,9 @@ type UnlockDeploymentRequest struct { func (x *UnlockDeploymentRequest) Reset() { *x = UnlockDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnlockDeploymentRequest) String() string { @@ -3868,7 +3804,7 @@ func (*UnlockDeploymentRequest) ProtoMessage() {} func (x *UnlockDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3910,11 +3846,9 @@ type ExportLockInfoRequest struct { func (x *ExportLockInfoRequest) Reset() { *x = ExportLockInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportLockInfoRequest) String() string { @@ -3925,7 +3859,7 @@ func (*ExportLockInfoRequest) ProtoMessage() {} func (x *ExportLockInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3969,11 +3903,9 @@ type LockInfo struct { func (x *LockInfo) Reset() { *x = LockInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LockInfo) String() string { @@ -3984,7 +3916,7 @@ func (*LockInfo) ProtoMessage() {} func (x *LockInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4121,11 +4053,9 @@ type Preview struct { func (x *Preview) Reset() { *x = Preview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Preview) String() string { @@ -4136,7 +4066,7 @@ func (*Preview) ProtoMessage() {} func (x *Preview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4320,11 +4250,9 @@ type PreviewOperationMetadata struct { func (x *PreviewOperationMetadata) Reset() { *x = PreviewOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreviewOperationMetadata) String() string { @@ -4335,7 +4263,7 @@ func (*PreviewOperationMetadata) ProtoMessage() {} func (x *PreviewOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4394,11 +4322,9 @@ type PreviewArtifacts struct { func (x *PreviewArtifacts) Reset() { *x = PreviewArtifacts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreviewArtifacts) String() string { @@ -4409,7 +4335,7 @@ func (*PreviewArtifacts) ProtoMessage() {} func (x *PreviewArtifacts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4469,11 +4395,9 @@ type CreatePreviewRequest struct { func (x *CreatePreviewRequest) Reset() { *x = CreatePreviewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePreviewRequest) String() string { @@ -4484,7 +4408,7 @@ func (*CreatePreviewRequest) ProtoMessage() {} func (x *CreatePreviewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4540,11 +4464,9 @@ type GetPreviewRequest struct { func (x *GetPreviewRequest) Reset() { *x = GetPreviewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPreviewRequest) String() string { @@ -4555,7 +4477,7 @@ func (*GetPreviewRequest) ProtoMessage() {} func (x *GetPreviewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4622,11 +4544,9 @@ type ListPreviewsRequest struct { func (x *ListPreviewsRequest) Reset() { *x = ListPreviewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPreviewsRequest) String() string { @@ -4637,7 +4557,7 @@ func (*ListPreviewsRequest) ProtoMessage() {} func (x *ListPreviewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4704,11 +4624,9 @@ type ListPreviewsResponse struct { func (x *ListPreviewsResponse) Reset() { *x = ListPreviewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPreviewsResponse) String() string { @@ -4719,7 +4637,7 @@ func (*ListPreviewsResponse) ProtoMessage() {} func (x *ListPreviewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4782,11 +4700,9 @@ type DeletePreviewRequest struct { func (x *DeletePreviewRequest) Reset() { *x = DeletePreviewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePreviewRequest) String() string { @@ -4797,7 +4713,7 @@ func (*DeletePreviewRequest) ProtoMessage() {} func (x *DeletePreviewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4840,11 +4756,9 @@ type ExportPreviewResultRequest struct { func (x *ExportPreviewResultRequest) Reset() { *x = ExportPreviewResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportPreviewResultRequest) String() string { @@ -4855,7 +4769,7 @@ func (*ExportPreviewResultRequest) ProtoMessage() {} func (x *ExportPreviewResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4889,11 +4803,9 @@ type ExportPreviewResultResponse struct { func (x *ExportPreviewResultResponse) Reset() { *x = ExportPreviewResultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportPreviewResultResponse) String() string { @@ -4904,7 +4816,7 @@ func (*ExportPreviewResultResponse) ProtoMessage() {} func (x *ExportPreviewResultResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4940,11 +4852,9 @@ type PreviewResult struct { func (x *PreviewResult) Reset() { *x = PreviewResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreviewResult) String() string { @@ -4955,7 +4865,7 @@ func (*PreviewResult) ProtoMessage() {} func (x *PreviewResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4997,11 +4907,9 @@ type GetTerraformVersionRequest struct { func (x *GetTerraformVersionRequest) Reset() { *x = GetTerraformVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTerraformVersionRequest) String() string { @@ -5012,7 +4920,7 @@ func (*GetTerraformVersionRequest) ProtoMessage() {} func (x *GetTerraformVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5067,11 +4975,9 @@ type ListTerraformVersionsRequest struct { func (x *ListTerraformVersionsRequest) Reset() { *x = ListTerraformVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTerraformVersionsRequest) String() string { @@ -5082,7 +4988,7 @@ func (*ListTerraformVersionsRequest) ProtoMessage() {} func (x *ListTerraformVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5149,11 +5055,9 @@ type ListTerraformVersionsResponse struct { func (x *ListTerraformVersionsResponse) Reset() { *x = ListTerraformVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTerraformVersionsResponse) String() string { @@ -5164,7 +5068,7 @@ func (*ListTerraformVersionsResponse) ProtoMessage() {} func (x *ListTerraformVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5222,11 +5126,9 @@ type TerraformVersion struct { func (x *TerraformVersion) Reset() { *x = TerraformVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_config_v1_config_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_config_v1_config_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerraformVersion) String() string { @@ -5237,7 +5139,7 @@ func (*TerraformVersion) ProtoMessage() {} func (x *TerraformVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_config_v1_config_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6796,596 +6698,6 @@ func file_google_cloud_config_v1_config_proto_init() { if File_google_cloud_config_v1_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_config_v1_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TerraformBlueprint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TerraformVariable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ApplyResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TerraformOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Revision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TerraformError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeploymentOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ResourceTerraformInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ResourceCAIInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Statefile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ExportDeploymentStatefileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExportRevisionStatefileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ImportStatefileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStatefileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*LockDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UnlockDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ExportLockInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*LockInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Preview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*PreviewOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*PreviewArtifacts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreatePreviewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetPreviewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListPreviewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListPreviewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*DeletePreviewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ExportPreviewResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ExportPreviewResultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*PreviewResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetTerraformVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListTerraformVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListTerraformVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_config_v1_config_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*TerraformVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_config_v1_config_proto_msgTypes[0].OneofWrappers = []any{ (*Deployment_TerraformBlueprint)(nil), } diff --git a/config/apiv1/helpers.go b/config/apiv1/helpers.go index 1c342c9b1a1e..26097e000775 100755 --- a/config/apiv1/helpers.go +++ b/config/apiv1/helpers.go @@ -18,10 +18,20 @@ package config import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "config.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/contactcenterinsights/apiv1/contact_center_insights_client.go b/contactcenterinsights/apiv1/contact_center_insights_client.go index ce4e3b19f8ab..e75b87048d27 100755 --- a/contactcenterinsights/apiv1/contact_center_insights_client.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -2584,6 +2583,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new contact center insights client based on gRPC. @@ -2610,6 +2611,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: contactcenterinsightspb.NewContactCenterInsightsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -2673,6 +2675,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new contact center insights rest client. @@ -2690,6 +2694,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -2752,7 +2757,7 @@ func (c *gRPCClient) CreateConversation(ctx context.Context, req *contactcenteri var resp *contactcenterinsightspb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -2770,7 +2775,7 @@ func (c *gRPCClient) UploadConversation(ctx context.Context, req *contactcenteri var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UploadConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UploadConversation, req, settings.GRPC, c.logger, "UploadConversation") return err }, opts...) if err != nil { @@ -2790,7 +2795,7 @@ func (c *gRPCClient) UpdateConversation(ctx context.Context, req *contactcenteri var resp *contactcenterinsightspb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConversation, req, settings.GRPC, c.logger, "UpdateConversation") return err }, opts...) if err != nil { @@ -2808,7 +2813,7 @@ func (c *gRPCClient) GetConversation(ctx context.Context, req *contactcenterinsi var resp *contactcenterinsightspb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -2837,7 +2842,7 @@ func (c *gRPCClient) ListConversations(ctx context.Context, req *contactcenterin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -2871,7 +2876,7 @@ func (c *gRPCClient) DeleteConversation(ctx context.Context, req *contactcenteri opts = append((*c.CallOptions).DeleteConversation[0:len((*c.CallOptions).DeleteConversation):len((*c.CallOptions).DeleteConversation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteConversation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteConversation, req, settings.GRPC, c.logger, "DeleteConversation") return err }, opts...) return err @@ -2886,7 +2891,7 @@ func (c *gRPCClient) CreateAnalysis(ctx context.Context, req *contactcenterinsig var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAnalysis, req, settings.GRPC, c.logger, "CreateAnalysis") return err }, opts...) if err != nil { @@ -2906,7 +2911,7 @@ func (c *gRPCClient) GetAnalysis(ctx context.Context, req *contactcenterinsights var resp *contactcenterinsightspb.Analysis err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnalysis, req, settings.GRPC, c.logger, "GetAnalysis") return err }, opts...) if err != nil { @@ -2935,7 +2940,7 @@ func (c *gRPCClient) ListAnalyses(ctx context.Context, req *contactcenterinsight } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAnalyses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAnalyses, req, settings.GRPC, c.logger, "ListAnalyses") return err }, opts...) if err != nil { @@ -2969,7 +2974,7 @@ func (c *gRPCClient) DeleteAnalysis(ctx context.Context, req *contactcenterinsig opts = append((*c.CallOptions).DeleteAnalysis[0:len((*c.CallOptions).DeleteAnalysis):len((*c.CallOptions).DeleteAnalysis)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAnalysis(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAnalysis, req, settings.GRPC, c.logger, "DeleteAnalysis") return err }, opts...) return err @@ -2984,7 +2989,7 @@ func (c *gRPCClient) BulkAnalyzeConversations(ctx context.Context, req *contactc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkAnalyzeConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkAnalyzeConversations, req, settings.GRPC, c.logger, "BulkAnalyzeConversations") return err }, opts...) if err != nil { @@ -3004,7 +3009,7 @@ func (c *gRPCClient) BulkDeleteConversations(ctx context.Context, req *contactce var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkDeleteConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkDeleteConversations, req, settings.GRPC, c.logger, "BulkDeleteConversations") return err }, opts...) if err != nil { @@ -3024,7 +3029,7 @@ func (c *gRPCClient) IngestConversations(ctx context.Context, req *contactcenter var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.IngestConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.IngestConversations, req, settings.GRPC, c.logger, "IngestConversations") return err }, opts...) if err != nil { @@ -3044,7 +3049,7 @@ func (c *gRPCClient) ExportInsightsData(ctx context.Context, req *contactcenteri var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportInsightsData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportInsightsData, req, settings.GRPC, c.logger, "ExportInsightsData") return err }, opts...) if err != nil { @@ -3064,7 +3069,7 @@ func (c *gRPCClient) CreateIssueModel(ctx context.Context, req *contactcenterins var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateIssueModel, req, settings.GRPC, c.logger, "CreateIssueModel") return err }, opts...) if err != nil { @@ -3084,7 +3089,7 @@ func (c *gRPCClient) UpdateIssueModel(ctx context.Context, req *contactcenterins var resp *contactcenterinsightspb.IssueModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateIssueModel, req, settings.GRPC, c.logger, "UpdateIssueModel") return err }, opts...) if err != nil { @@ -3102,7 +3107,7 @@ func (c *gRPCClient) GetIssueModel(ctx context.Context, req *contactcenterinsigh var resp *contactcenterinsightspb.IssueModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIssueModel, req, settings.GRPC, c.logger, "GetIssueModel") return err }, opts...) if err != nil { @@ -3120,7 +3125,7 @@ func (c *gRPCClient) ListIssueModels(ctx context.Context, req *contactcenterinsi var resp *contactcenterinsightspb.ListIssueModelsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListIssueModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListIssueModels, req, settings.GRPC, c.logger, "ListIssueModels") return err }, opts...) if err != nil { @@ -3138,7 +3143,7 @@ func (c *gRPCClient) DeleteIssueModel(ctx context.Context, req *contactcenterins var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteIssueModel, req, settings.GRPC, c.logger, "DeleteIssueModel") return err }, opts...) if err != nil { @@ -3158,7 +3163,7 @@ func (c *gRPCClient) DeployIssueModel(ctx context.Context, req *contactcenterins var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeployIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeployIssueModel, req, settings.GRPC, c.logger, "DeployIssueModel") return err }, opts...) if err != nil { @@ -3178,7 +3183,7 @@ func (c *gRPCClient) UndeployIssueModel(ctx context.Context, req *contactcenteri var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeployIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeployIssueModel, req, settings.GRPC, c.logger, "UndeployIssueModel") return err }, opts...) if err != nil { @@ -3198,7 +3203,7 @@ func (c *gRPCClient) ExportIssueModel(ctx context.Context, req *contactcenterins var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportIssueModel, req, settings.GRPC, c.logger, "ExportIssueModel") return err }, opts...) if err != nil { @@ -3218,7 +3223,7 @@ func (c *gRPCClient) ImportIssueModel(ctx context.Context, req *contactcenterins var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportIssueModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportIssueModel, req, settings.GRPC, c.logger, "ImportIssueModel") return err }, opts...) if err != nil { @@ -3238,7 +3243,7 @@ func (c *gRPCClient) GetIssue(ctx context.Context, req *contactcenterinsightspb. var resp *contactcenterinsightspb.Issue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIssue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIssue, req, settings.GRPC, c.logger, "GetIssue") return err }, opts...) if err != nil { @@ -3256,7 +3261,7 @@ func (c *gRPCClient) ListIssues(ctx context.Context, req *contactcenterinsightsp var resp *contactcenterinsightspb.ListIssuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListIssues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListIssues, req, settings.GRPC, c.logger, "ListIssues") return err }, opts...) if err != nil { @@ -3274,7 +3279,7 @@ func (c *gRPCClient) UpdateIssue(ctx context.Context, req *contactcenterinsights var resp *contactcenterinsightspb.Issue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateIssue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateIssue, req, settings.GRPC, c.logger, "UpdateIssue") return err }, opts...) if err != nil { @@ -3291,7 +3296,7 @@ func (c *gRPCClient) DeleteIssue(ctx context.Context, req *contactcenterinsights opts = append((*c.CallOptions).DeleteIssue[0:len((*c.CallOptions).DeleteIssue):len((*c.CallOptions).DeleteIssue)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteIssue(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteIssue, req, settings.GRPC, c.logger, "DeleteIssue") return err }, opts...) return err @@ -3306,7 +3311,7 @@ func (c *gRPCClient) CalculateIssueModelStats(ctx context.Context, req *contactc var resp *contactcenterinsightspb.CalculateIssueModelStatsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CalculateIssueModelStats(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CalculateIssueModelStats, req, settings.GRPC, c.logger, "CalculateIssueModelStats") return err }, opts...) if err != nil { @@ -3324,7 +3329,7 @@ func (c *gRPCClient) CreatePhraseMatcher(ctx context.Context, req *contactcenter var resp *contactcenterinsightspb.PhraseMatcher err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePhraseMatcher(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePhraseMatcher, req, settings.GRPC, c.logger, "CreatePhraseMatcher") return err }, opts...) if err != nil { @@ -3342,7 +3347,7 @@ func (c *gRPCClient) GetPhraseMatcher(ctx context.Context, req *contactcenterins var resp *contactcenterinsightspb.PhraseMatcher err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPhraseMatcher(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPhraseMatcher, req, settings.GRPC, c.logger, "GetPhraseMatcher") return err }, opts...) if err != nil { @@ -3371,7 +3376,7 @@ func (c *gRPCClient) ListPhraseMatchers(ctx context.Context, req *contactcenteri } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPhraseMatchers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPhraseMatchers, req, settings.GRPC, c.logger, "ListPhraseMatchers") return err }, opts...) if err != nil { @@ -3405,7 +3410,7 @@ func (c *gRPCClient) DeletePhraseMatcher(ctx context.Context, req *contactcenter opts = append((*c.CallOptions).DeletePhraseMatcher[0:len((*c.CallOptions).DeletePhraseMatcher):len((*c.CallOptions).DeletePhraseMatcher)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePhraseMatcher(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePhraseMatcher, req, settings.GRPC, c.logger, "DeletePhraseMatcher") return err }, opts...) return err @@ -3420,7 +3425,7 @@ func (c *gRPCClient) UpdatePhraseMatcher(ctx context.Context, req *contactcenter var resp *contactcenterinsightspb.PhraseMatcher err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePhraseMatcher(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePhraseMatcher, req, settings.GRPC, c.logger, "UpdatePhraseMatcher") return err }, opts...) if err != nil { @@ -3438,7 +3443,7 @@ func (c *gRPCClient) CalculateStats(ctx context.Context, req *contactcenterinsig var resp *contactcenterinsightspb.CalculateStatsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CalculateStats(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CalculateStats, req, settings.GRPC, c.logger, "CalculateStats") return err }, opts...) if err != nil { @@ -3456,7 +3461,7 @@ func (c *gRPCClient) GetSettings(ctx context.Context, req *contactcenterinsights var resp *contactcenterinsightspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSettings, req, settings.GRPC, c.logger, "GetSettings") return err }, opts...) if err != nil { @@ -3474,7 +3479,7 @@ func (c *gRPCClient) UpdateSettings(ctx context.Context, req *contactcenterinsig var resp *contactcenterinsightspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSettings, req, settings.GRPC, c.logger, "UpdateSettings") return err }, opts...) if err != nil { @@ -3492,7 +3497,7 @@ func (c *gRPCClient) CreateAnalysisRule(ctx context.Context, req *contactcenteri var resp *contactcenterinsightspb.AnalysisRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAnalysisRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAnalysisRule, req, settings.GRPC, c.logger, "CreateAnalysisRule") return err }, opts...) if err != nil { @@ -3510,7 +3515,7 @@ func (c *gRPCClient) GetAnalysisRule(ctx context.Context, req *contactcenterinsi var resp *contactcenterinsightspb.AnalysisRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnalysisRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnalysisRule, req, settings.GRPC, c.logger, "GetAnalysisRule") return err }, opts...) if err != nil { @@ -3539,7 +3544,7 @@ func (c *gRPCClient) ListAnalysisRules(ctx context.Context, req *contactcenterin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAnalysisRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAnalysisRules, req, settings.GRPC, c.logger, "ListAnalysisRules") return err }, opts...) if err != nil { @@ -3574,7 +3579,7 @@ func (c *gRPCClient) UpdateAnalysisRule(ctx context.Context, req *contactcenteri var resp *contactcenterinsightspb.AnalysisRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAnalysisRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAnalysisRule, req, settings.GRPC, c.logger, "UpdateAnalysisRule") return err }, opts...) if err != nil { @@ -3591,7 +3596,7 @@ func (c *gRPCClient) DeleteAnalysisRule(ctx context.Context, req *contactcenteri opts = append((*c.CallOptions).DeleteAnalysisRule[0:len((*c.CallOptions).DeleteAnalysisRule):len((*c.CallOptions).DeleteAnalysisRule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAnalysisRule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAnalysisRule, req, settings.GRPC, c.logger, "DeleteAnalysisRule") return err }, opts...) return err @@ -3606,7 +3611,7 @@ func (c *gRPCClient) GetEncryptionSpec(ctx context.Context, req *contactcenterin var resp *contactcenterinsightspb.EncryptionSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEncryptionSpec, req, settings.GRPC, c.logger, "GetEncryptionSpec") return err }, opts...) if err != nil { @@ -3624,7 +3629,7 @@ func (c *gRPCClient) InitializeEncryptionSpec(ctx context.Context, req *contactc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InitializeEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InitializeEncryptionSpec, req, settings.GRPC, c.logger, "InitializeEncryptionSpec") return err }, opts...) if err != nil { @@ -3644,7 +3649,7 @@ func (c *gRPCClient) CreateView(ctx context.Context, req *contactcenterinsightsp var resp *contactcenterinsightspb.View err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateView, req, settings.GRPC, c.logger, "CreateView") return err }, opts...) if err != nil { @@ -3662,7 +3667,7 @@ func (c *gRPCClient) GetView(ctx context.Context, req *contactcenterinsightspb.G var resp *contactcenterinsightspb.View err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetView, req, settings.GRPC, c.logger, "GetView") return err }, opts...) if err != nil { @@ -3691,7 +3696,7 @@ func (c *gRPCClient) ListViews(ctx context.Context, req *contactcenterinsightspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListViews(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListViews, req, settings.GRPC, c.logger, "ListViews") return err }, opts...) if err != nil { @@ -3726,7 +3731,7 @@ func (c *gRPCClient) UpdateView(ctx context.Context, req *contactcenterinsightsp var resp *contactcenterinsightspb.View err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateView, req, settings.GRPC, c.logger, "UpdateView") return err }, opts...) if err != nil { @@ -3743,7 +3748,7 @@ func (c *gRPCClient) DeleteView(ctx context.Context, req *contactcenterinsightsp opts = append((*c.CallOptions).DeleteView[0:len((*c.CallOptions).DeleteView):len((*c.CallOptions).DeleteView)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteView(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteView, req, settings.GRPC, c.logger, "DeleteView") return err }, opts...) return err @@ -3758,7 +3763,7 @@ func (c *gRPCClient) QueryMetrics(ctx context.Context, req *contactcenterinsight var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryMetrics, req, settings.GRPC, c.logger, "QueryMetrics") return err }, opts...) if err != nil { @@ -3778,7 +3783,7 @@ func (c *gRPCClient) CreateQaQuestion(ctx context.Context, req *contactcenterins var resp *contactcenterinsightspb.QaQuestion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQaQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQaQuestion, req, settings.GRPC, c.logger, "CreateQaQuestion") return err }, opts...) if err != nil { @@ -3796,7 +3801,7 @@ func (c *gRPCClient) GetQaQuestion(ctx context.Context, req *contactcenterinsigh var resp *contactcenterinsightspb.QaQuestion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQaQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQaQuestion, req, settings.GRPC, c.logger, "GetQaQuestion") return err }, opts...) if err != nil { @@ -3814,7 +3819,7 @@ func (c *gRPCClient) UpdateQaQuestion(ctx context.Context, req *contactcenterins var resp *contactcenterinsightspb.QaQuestion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQaQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQaQuestion, req, settings.GRPC, c.logger, "UpdateQaQuestion") return err }, opts...) if err != nil { @@ -3831,7 +3836,7 @@ func (c *gRPCClient) DeleteQaQuestion(ctx context.Context, req *contactcenterins opts = append((*c.CallOptions).DeleteQaQuestion[0:len((*c.CallOptions).DeleteQaQuestion):len((*c.CallOptions).DeleteQaQuestion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQaQuestion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQaQuestion, req, settings.GRPC, c.logger, "DeleteQaQuestion") return err }, opts...) return err @@ -3857,7 +3862,7 @@ func (c *gRPCClient) ListQaQuestions(ctx context.Context, req *contactcenterinsi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQaQuestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQaQuestions, req, settings.GRPC, c.logger, "ListQaQuestions") return err }, opts...) if err != nil { @@ -3892,7 +3897,7 @@ func (c *gRPCClient) CreateQaScorecard(ctx context.Context, req *contactcenterin var resp *contactcenterinsightspb.QaScorecard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQaScorecard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQaScorecard, req, settings.GRPC, c.logger, "CreateQaScorecard") return err }, opts...) if err != nil { @@ -3910,7 +3915,7 @@ func (c *gRPCClient) GetQaScorecard(ctx context.Context, req *contactcenterinsig var resp *contactcenterinsightspb.QaScorecard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQaScorecard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQaScorecard, req, settings.GRPC, c.logger, "GetQaScorecard") return err }, opts...) if err != nil { @@ -3928,7 +3933,7 @@ func (c *gRPCClient) UpdateQaScorecard(ctx context.Context, req *contactcenterin var resp *contactcenterinsightspb.QaScorecard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateQaScorecard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateQaScorecard, req, settings.GRPC, c.logger, "UpdateQaScorecard") return err }, opts...) if err != nil { @@ -3945,7 +3950,7 @@ func (c *gRPCClient) DeleteQaScorecard(ctx context.Context, req *contactcenterin opts = append((*c.CallOptions).DeleteQaScorecard[0:len((*c.CallOptions).DeleteQaScorecard):len((*c.CallOptions).DeleteQaScorecard)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQaScorecard(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQaScorecard, req, settings.GRPC, c.logger, "DeleteQaScorecard") return err }, opts...) return err @@ -3971,7 +3976,7 @@ func (c *gRPCClient) ListQaScorecards(ctx context.Context, req *contactcenterins } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQaScorecards(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQaScorecards, req, settings.GRPC, c.logger, "ListQaScorecards") return err }, opts...) if err != nil { @@ -4006,7 +4011,7 @@ func (c *gRPCClient) CreateQaScorecardRevision(ctx context.Context, req *contact var resp *contactcenterinsightspb.QaScorecardRevision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateQaScorecardRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateQaScorecardRevision, req, settings.GRPC, c.logger, "CreateQaScorecardRevision") return err }, opts...) if err != nil { @@ -4024,7 +4029,7 @@ func (c *gRPCClient) GetQaScorecardRevision(ctx context.Context, req *contactcen var resp *contactcenterinsightspb.QaScorecardRevision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetQaScorecardRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetQaScorecardRevision, req, settings.GRPC, c.logger, "GetQaScorecardRevision") return err }, opts...) if err != nil { @@ -4042,7 +4047,7 @@ func (c *gRPCClient) TuneQaScorecardRevision(ctx context.Context, req *contactce var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TuneQaScorecardRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TuneQaScorecardRevision, req, settings.GRPC, c.logger, "TuneQaScorecardRevision") return err }, opts...) if err != nil { @@ -4062,7 +4067,7 @@ func (c *gRPCClient) DeployQaScorecardRevision(ctx context.Context, req *contact var resp *contactcenterinsightspb.QaScorecardRevision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeployQaScorecardRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeployQaScorecardRevision, req, settings.GRPC, c.logger, "DeployQaScorecardRevision") return err }, opts...) if err != nil { @@ -4080,7 +4085,7 @@ func (c *gRPCClient) UndeployQaScorecardRevision(ctx context.Context, req *conta var resp *contactcenterinsightspb.QaScorecardRevision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeployQaScorecardRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeployQaScorecardRevision, req, settings.GRPC, c.logger, "UndeployQaScorecardRevision") return err }, opts...) if err != nil { @@ -4097,7 +4102,7 @@ func (c *gRPCClient) DeleteQaScorecardRevision(ctx context.Context, req *contact opts = append((*c.CallOptions).DeleteQaScorecardRevision[0:len((*c.CallOptions).DeleteQaScorecardRevision):len((*c.CallOptions).DeleteQaScorecardRevision)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteQaScorecardRevision(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteQaScorecardRevision, req, settings.GRPC, c.logger, "DeleteQaScorecardRevision") return err }, opts...) return err @@ -4123,7 +4128,7 @@ func (c *gRPCClient) ListQaScorecardRevisions(ctx context.Context, req *contactc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQaScorecardRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQaScorecardRevisions, req, settings.GRPC, c.logger, "ListQaScorecardRevisions") return err }, opts...) if err != nil { @@ -4158,7 +4163,7 @@ func (c *gRPCClient) CreateFeedbackLabel(ctx context.Context, req *contactcenter var resp *contactcenterinsightspb.FeedbackLabel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFeedbackLabel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFeedbackLabel, req, settings.GRPC, c.logger, "CreateFeedbackLabel") return err }, opts...) if err != nil { @@ -4187,7 +4192,7 @@ func (c *gRPCClient) ListFeedbackLabels(ctx context.Context, req *contactcenteri } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFeedbackLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFeedbackLabels, req, settings.GRPC, c.logger, "ListFeedbackLabels") return err }, opts...) if err != nil { @@ -4222,7 +4227,7 @@ func (c *gRPCClient) GetFeedbackLabel(ctx context.Context, req *contactcenterins var resp *contactcenterinsightspb.FeedbackLabel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFeedbackLabel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFeedbackLabel, req, settings.GRPC, c.logger, "GetFeedbackLabel") return err }, opts...) if err != nil { @@ -4240,7 +4245,7 @@ func (c *gRPCClient) UpdateFeedbackLabel(ctx context.Context, req *contactcenter var resp *contactcenterinsightspb.FeedbackLabel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFeedbackLabel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFeedbackLabel, req, settings.GRPC, c.logger, "UpdateFeedbackLabel") return err }, opts...) if err != nil { @@ -4257,7 +4262,7 @@ func (c *gRPCClient) DeleteFeedbackLabel(ctx context.Context, req *contactcenter opts = append((*c.CallOptions).DeleteFeedbackLabel[0:len((*c.CallOptions).DeleteFeedbackLabel):len((*c.CallOptions).DeleteFeedbackLabel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteFeedbackLabel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteFeedbackLabel, req, settings.GRPC, c.logger, "DeleteFeedbackLabel") return err }, opts...) return err @@ -4283,7 +4288,7 @@ func (c *gRPCClient) ListAllFeedbackLabels(ctx context.Context, req *contactcent } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAllFeedbackLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAllFeedbackLabels, req, settings.GRPC, c.logger, "ListAllFeedbackLabels") return err }, opts...) if err != nil { @@ -4318,7 +4323,7 @@ func (c *gRPCClient) BulkUploadFeedbackLabels(ctx context.Context, req *contactc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkUploadFeedbackLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkUploadFeedbackLabels, req, settings.GRPC, c.logger, "BulkUploadFeedbackLabels") return err }, opts...) if err != nil { @@ -4338,7 +4343,7 @@ func (c *gRPCClient) BulkDownloadFeedbackLabels(ctx context.Context, req *contac var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkDownloadFeedbackLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkDownloadFeedbackLabels, req, settings.GRPC, c.logger, "BulkDownloadFeedbackLabels") return err }, opts...) if err != nil { @@ -4357,7 +4362,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -4372,7 +4377,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -4401,7 +4406,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -4472,17 +4477,7 @@ func (c *restClient) CreateConversation(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -4539,21 +4534,10 @@ func (c *restClient) UploadConversation(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UploadConversation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4618,17 +4602,7 @@ func (c *restClient) UpdateConversation(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversation") if err != nil { return err } @@ -4681,17 +4655,7 @@ func (c *restClient) GetConversation(ctx context.Context, req *contactcenterinsi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -4762,21 +4726,10 @@ func (c *restClient) ListConversations(ctx context.Context, req *contactcenterin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4839,15 +4792,8 @@ func (c *restClient) DeleteConversation(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversation") + return err }, opts...) } @@ -4891,21 +4837,10 @@ func (c *restClient) CreateAnalysis(ctx context.Context, req *contactcenterinsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnalysis") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4956,17 +4891,7 @@ func (c *restClient) GetAnalysis(ctx context.Context, req *contactcenterinsights httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnalysis") if err != nil { return err } @@ -5031,21 +4956,10 @@ func (c *restClient) ListAnalyses(ctx context.Context, req *contactcenterinsight } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnalyses") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5105,15 +5019,8 @@ func (c *restClient) DeleteAnalysis(ctx context.Context, req *contactcenterinsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnalysis") + return err }, opts...) } @@ -5155,21 +5062,10 @@ func (c *restClient) BulkAnalyzeConversations(ctx context.Context, req *contactc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkAnalyzeConversations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5225,21 +5121,10 @@ func (c *restClient) BulkDeleteConversations(ctx context.Context, req *contactce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkDeleteConversations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5296,21 +5181,10 @@ func (c *restClient) IngestConversations(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "IngestConversations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5366,21 +5240,10 @@ func (c *restClient) ExportInsightsData(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportInsightsData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5437,21 +5300,10 @@ func (c *restClient) CreateIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIssueModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5516,17 +5368,7 @@ func (c *restClient) UpdateIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIssueModel") if err != nil { return err } @@ -5576,17 +5418,7 @@ func (c *restClient) GetIssueModel(ctx context.Context, req *contactcenterinsigh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIssueModel") if err != nil { return err } @@ -5636,17 +5468,7 @@ func (c *restClient) ListIssueModels(ctx context.Context, req *contactcenterinsi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIssueModels") if err != nil { return err } @@ -5695,21 +5517,10 @@ func (c *restClient) DeleteIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIssueModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5766,21 +5577,10 @@ func (c *restClient) DeployIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployIssueModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5837,21 +5637,10 @@ func (c *restClient) UndeployIssueModel(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployIssueModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5907,21 +5696,10 @@ func (c *restClient) ExportIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportIssueModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5977,21 +5755,10 @@ func (c *restClient) ImportIssueModel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportIssueModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6042,17 +5809,7 @@ func (c *restClient) GetIssue(ctx context.Context, req *contactcenterinsightspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIssue") if err != nil { return err } @@ -6102,17 +5859,7 @@ func (c *restClient) ListIssues(ctx context.Context, req *contactcenterinsightsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIssues") if err != nil { return err } @@ -6176,17 +5923,7 @@ func (c *restClient) UpdateIssue(ctx context.Context, req *contactcenterinsights httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIssue") if err != nil { return err } @@ -6233,15 +5970,8 @@ func (c *restClient) DeleteIssue(ctx context.Context, req *contactcenterinsights httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIssue") + return err }, opts...) } @@ -6278,17 +6008,7 @@ func (c *restClient) CalculateIssueModelStats(ctx context.Context, req *contactc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateIssueModelStats") if err != nil { return err } @@ -6345,17 +6065,7 @@ func (c *restClient) CreatePhraseMatcher(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhraseMatcher") if err != nil { return err } @@ -6405,17 +6115,7 @@ func (c *restClient) GetPhraseMatcher(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhraseMatcher") if err != nil { return err } @@ -6480,21 +6180,10 @@ func (c *restClient) ListPhraseMatchers(ctx context.Context, req *contactcenteri } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhraseMatchers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6554,15 +6243,8 @@ func (c *restClient) DeletePhraseMatcher(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhraseMatcher") + return err }, opts...) } @@ -6613,17 +6295,7 @@ func (c *restClient) UpdatePhraseMatcher(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePhraseMatcher") if err != nil { return err } @@ -6676,17 +6348,7 @@ func (c *restClient) CalculateStats(ctx context.Context, req *contactcenterinsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateStats") if err != nil { return err } @@ -6736,17 +6398,7 @@ func (c *restClient) GetSettings(ctx context.Context, req *contactcenterinsights httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSettings") if err != nil { return err } @@ -6810,22 +6462,12 @@ func (c *restClient) UpdateSettings(ctx context.Context, req *contactcenterinsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSettings") if err != nil { return err } - defer httpRsp.Body.Close() - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { + if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6877,17 +6519,7 @@ func (c *restClient) CreateAnalysisRule(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnalysisRule") if err != nil { return err } @@ -6937,17 +6569,7 @@ func (c *restClient) GetAnalysisRule(ctx context.Context, req *contactcenterinsi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnalysisRule") if err != nil { return err } @@ -7009,21 +6631,10 @@ func (c *restClient) ListAnalysisRules(ctx context.Context, req *contactcenterin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnalysisRules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7100,17 +6711,7 @@ func (c *restClient) UpdateAnalysisRule(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAnalysisRule") if err != nil { return err } @@ -7157,15 +6758,8 @@ func (c *restClient) DeleteAnalysisRule(ctx context.Context, req *contactcenteri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnalysisRule") + return err }, opts...) } @@ -7202,17 +6796,7 @@ func (c *restClient) GetEncryptionSpec(ctx context.Context, req *contactcenterin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEncryptionSpec") if err != nil { return err } @@ -7271,21 +6855,10 @@ func (c *restClient) InitializeEncryptionSpec(ctx context.Context, req *contactc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InitializeEncryptionSpec") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7343,17 +6916,7 @@ func (c *restClient) CreateView(ctx context.Context, req *contactcenterinsightsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateView") if err != nil { return err } @@ -7403,17 +6966,7 @@ func (c *restClient) GetView(ctx context.Context, req *contactcenterinsightspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetView") if err != nil { return err } @@ -7475,21 +7028,10 @@ func (c *restClient) ListViews(ctx context.Context, req *contactcenterinsightspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListViews") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7566,17 +7108,7 @@ func (c *restClient) UpdateView(ctx context.Context, req *contactcenterinsightsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateView") if err != nil { return err } @@ -7623,15 +7155,8 @@ func (c *restClient) DeleteView(ctx context.Context, req *contactcenterinsightsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteView") + return err }, opts...) } @@ -7673,21 +7198,10 @@ func (c *restClient) QueryMetrics(ctx context.Context, req *contactcenterinsight httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryMetrics") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7748,17 +7262,7 @@ func (c *restClient) CreateQaQuestion(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQaQuestion") if err != nil { return err } @@ -7808,17 +7312,7 @@ func (c *restClient) GetQaQuestion(ctx context.Context, req *contactcenterinsigh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQaQuestion") if err != nil { return err } @@ -7882,17 +7376,7 @@ func (c *restClient) UpdateQaQuestion(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQaQuestion") if err != nil { return err } @@ -7939,15 +7423,8 @@ func (c *restClient) DeleteQaQuestion(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQaQuestion") + return err }, opts...) } @@ -7996,21 +7473,10 @@ func (c *restClient) ListQaQuestions(ctx context.Context, req *contactcenterinsi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQaQuestions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8083,17 +7549,7 @@ func (c *restClient) CreateQaScorecard(ctx context.Context, req *contactcenterin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQaScorecard") if err != nil { return err } @@ -8143,17 +7599,7 @@ func (c *restClient) GetQaScorecard(ctx context.Context, req *contactcenterinsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQaScorecard") if err != nil { return err } @@ -8217,17 +7663,7 @@ func (c *restClient) UpdateQaScorecard(ctx context.Context, req *contactcenterin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateQaScorecard") if err != nil { return err } @@ -8277,15 +7713,8 @@ func (c *restClient) DeleteQaScorecard(ctx context.Context, req *contactcenterin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQaScorecard") + return err }, opts...) } @@ -8334,21 +7763,10 @@ func (c *restClient) ListQaScorecards(ctx context.Context, req *contactcenterins } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQaScorecards") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8421,17 +7839,7 @@ func (c *restClient) CreateQaScorecardRevision(ctx context.Context, req *contact httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQaScorecardRevision") if err != nil { return err } @@ -8481,17 +7889,7 @@ func (c *restClient) GetQaScorecardRevision(ctx context.Context, req *contactcen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQaScorecardRevision") if err != nil { return err } @@ -8546,21 +7944,10 @@ func (c *restClient) TuneQaScorecardRevision(ctx context.Context, req *contactce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneQaScorecardRevision") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8617,17 +8004,7 @@ func (c *restClient) DeployQaScorecardRevision(ctx context.Context, req *contact httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployQaScorecardRevision") if err != nil { return err } @@ -8683,17 +8060,7 @@ func (c *restClient) UndeployQaScorecardRevision(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployQaScorecardRevision") if err != nil { return err } @@ -8743,15 +8110,8 @@ func (c *restClient) DeleteQaScorecardRevision(ctx context.Context, req *contact httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteQaScorecardRevision") + return err }, opts...) } @@ -8803,21 +8163,10 @@ func (c *restClient) ListQaScorecardRevisions(ctx context.Context, req *contactc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQaScorecardRevisions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8890,17 +8239,7 @@ func (c *restClient) CreateFeedbackLabel(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFeedbackLabel") if err != nil { return err } @@ -8965,21 +8304,10 @@ func (c *restClient) ListFeedbackLabels(ctx context.Context, req *contactcenteri } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFeedbackLabels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9042,17 +8370,7 @@ func (c *restClient) GetFeedbackLabel(ctx context.Context, req *contactcenterins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFeedbackLabel") if err != nil { return err } @@ -9116,17 +8434,7 @@ func (c *restClient) UpdateFeedbackLabel(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFeedbackLabel") if err != nil { return err } @@ -9173,15 +8481,8 @@ func (c *restClient) DeleteFeedbackLabel(ctx context.Context, req *contactcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFeedbackLabel") + return err }, opts...) } @@ -9233,21 +8534,10 @@ func (c *restClient) ListAllFeedbackLabels(ctx context.Context, req *contactcent } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAllFeedbackLabels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9315,21 +8605,10 @@ func (c *restClient) BulkUploadFeedbackLabels(ctx context.Context, req *contactc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkUploadFeedbackLabels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9385,21 +8664,10 @@ func (c *restClient) BulkDownloadFeedbackLabels(ctx context.Context, req *contac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkDownloadFeedbackLabels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9447,15 +8715,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -9492,17 +8753,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -9567,21 +8818,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/contactcenterinsights/apiv1/contact_center_insights_client_example_go123_test.go b/contactcenterinsights/apiv1/contact_center_insights_client_example_go123_test.go index 2110abefdce9..118dbbee3cf0 100644 --- a/contactcenterinsights/apiv1/contact_center_insights_client_example_go123_test.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListAllFeedbackLabels_all() { } for resp, err := range c.ListAllFeedbackLabels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListAnalyses_all() { } for resp, err := range c.ListAnalyses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListAnalysisRules_all() { } for resp, err := range c.ListAnalysisRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListFeedbackLabels_all() { } for resp, err := range c.ListFeedbackLabels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListPhraseMatchers_all() { } for resp, err := range c.ListPhraseMatchers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListQaQuestions_all() { } for resp, err := range c.ListQaQuestions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListQaScorecardRevisions_all() { } for resp, err := range c.ListQaScorecardRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_ListQaScorecards_all() { } for resp, err := range c.ListQaScorecards(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_ListViews_all() { } for resp, err := range c.ListViews(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/contactcenterinsights/apiv1/contactcenterinsightspb/contact_center_insights.pb.go b/contactcenterinsights/apiv1/contactcenterinsightspb/contact_center_insights.pb.go index bbd4be5c3276..6fc86d37a787 100755 --- a/contactcenterinsights/apiv1/contactcenterinsightspb/contact_center_insights.pb.go +++ b/contactcenterinsights/apiv1/contactcenterinsightspb/contact_center_insights.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -541,11 +541,9 @@ type CalculateStatsRequest struct { func (x *CalculateStatsRequest) Reset() { *x = CalculateStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateStatsRequest) String() string { @@ -556,7 +554,7 @@ func (*CalculateStatsRequest) ProtoMessage() {} func (x *CalculateStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +620,9 @@ type CalculateStatsResponse struct { func (x *CalculateStatsResponse) Reset() { *x = CalculateStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateStatsResponse) String() string { @@ -637,7 +633,7 @@ func (*CalculateStatsResponse) ProtoMessage() {} func (x *CalculateStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,11 +723,9 @@ type CreateAnalysisOperationMetadata struct { func (x *CreateAnalysisOperationMetadata) Reset() { *x = CreateAnalysisOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnalysisOperationMetadata) String() string { @@ -742,7 +736,7 @@ func (*CreateAnalysisOperationMetadata) ProtoMessage() {} func (x *CreateAnalysisOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,11 +800,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -821,7 +813,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +876,9 @@ type UploadConversationRequest struct { func (x *UploadConversationRequest) Reset() { *x = UploadConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadConversationRequest) String() string { @@ -899,7 +889,7 @@ func (*UploadConversationRequest) ProtoMessage() {} func (x *UploadConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,11 +960,9 @@ type UploadConversationMetadata struct { func (x *UploadConversationMetadata) Reset() { *x = UploadConversationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadConversationMetadata) String() string { @@ -985,7 +973,7 @@ func (*UploadConversationMetadata) ProtoMessage() {} func (x *UploadConversationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1065,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -1092,7 +1078,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1165,11 +1151,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -1180,7 +1164,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1207,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -1238,7 +1220,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,11 +1276,9 @@ type UpdateConversationRequest struct { func (x *UpdateConversationRequest) Reset() { *x = UpdateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationRequest) String() string { @@ -1309,7 +1289,7 @@ func (*UpdateConversationRequest) ProtoMessage() {} func (x *UpdateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1334,9 @@ type DeleteConversationRequest struct { func (x *DeleteConversationRequest) Reset() { *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationRequest) String() string { @@ -1369,7 +1347,7 @@ func (*DeleteConversationRequest) ProtoMessage() {} func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1414,9 @@ type IngestConversationsRequest struct { func (x *IngestConversationsRequest) Reset() { *x = IngestConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsRequest) String() string { @@ -1451,7 +1427,7 @@ func (*IngestConversationsRequest) ProtoMessage() {} func (x *IngestConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1574,11 +1550,9 @@ type IngestConversationsMetadata struct { func (x *IngestConversationsMetadata) Reset() { *x = IngestConversationsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsMetadata) String() string { @@ -1589,7 +1563,7 @@ func (*IngestConversationsMetadata) ProtoMessage() {} func (x *IngestConversationsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1648,11 +1622,9 @@ type IngestConversationsResponse struct { func (x *IngestConversationsResponse) Reset() { *x = IngestConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsResponse) String() string { @@ -1663,7 +1635,7 @@ func (*IngestConversationsResponse) ProtoMessage() {} func (x *IngestConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1692,11 +1664,9 @@ type CreateAnalysisRequest struct { func (x *CreateAnalysisRequest) Reset() { *x = CreateAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnalysisRequest) String() string { @@ -1707,7 +1677,7 @@ func (*CreateAnalysisRequest) ProtoMessage() {} func (x *CreateAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1760,11 +1730,9 @@ type ListAnalysesRequest struct { func (x *ListAnalysesRequest) Reset() { *x = ListAnalysesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysesRequest) String() string { @@ -1775,7 +1743,7 @@ func (*ListAnalysesRequest) ProtoMessage() {} func (x *ListAnalysesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1833,11 +1801,9 @@ type ListAnalysesResponse struct { func (x *ListAnalysesResponse) Reset() { *x = ListAnalysesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysesResponse) String() string { @@ -1848,7 +1814,7 @@ func (*ListAnalysesResponse) ProtoMessage() {} func (x *ListAnalysesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1889,11 +1855,9 @@ type GetAnalysisRequest struct { func (x *GetAnalysisRequest) Reset() { *x = GetAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnalysisRequest) String() string { @@ -1904,7 +1868,7 @@ func (*GetAnalysisRequest) ProtoMessage() {} func (x *GetAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1938,11 +1902,9 @@ type DeleteAnalysisRequest struct { func (x *DeleteAnalysisRequest) Reset() { *x = DeleteAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnalysisRequest) String() string { @@ -1953,7 +1915,7 @@ func (*DeleteAnalysisRequest) ProtoMessage() {} func (x *DeleteAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1995,11 +1957,9 @@ type BulkAnalyzeConversationsRequest struct { func (x *BulkAnalyzeConversationsRequest) Reset() { *x = BulkAnalyzeConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkAnalyzeConversationsRequest) String() string { @@ -2010,7 +1970,7 @@ func (*BulkAnalyzeConversationsRequest) ProtoMessage() {} func (x *BulkAnalyzeConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2079,11 +2039,9 @@ type BulkAnalyzeConversationsMetadata struct { func (x *BulkAnalyzeConversationsMetadata) Reset() { *x = BulkAnalyzeConversationsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkAnalyzeConversationsMetadata) String() string { @@ -2094,7 +2052,7 @@ func (*BulkAnalyzeConversationsMetadata) ProtoMessage() {} func (x *BulkAnalyzeConversationsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2172,11 +2130,9 @@ type BulkAnalyzeConversationsResponse struct { func (x *BulkAnalyzeConversationsResponse) Reset() { *x = BulkAnalyzeConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkAnalyzeConversationsResponse) String() string { @@ -2187,7 +2143,7 @@ func (*BulkAnalyzeConversationsResponse) ProtoMessage() {} func (x *BulkAnalyzeConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2238,11 +2194,9 @@ type BulkDeleteConversationsRequest struct { func (x *BulkDeleteConversationsRequest) Reset() { *x = BulkDeleteConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteConversationsRequest) String() string { @@ -2253,7 +2207,7 @@ func (*BulkDeleteConversationsRequest) ProtoMessage() {} func (x *BulkDeleteConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2315,11 +2269,9 @@ type BulkDeleteConversationsMetadata struct { func (x *BulkDeleteConversationsMetadata) Reset() { *x = BulkDeleteConversationsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteConversationsMetadata) String() string { @@ -2330,7 +2282,7 @@ func (*BulkDeleteConversationsMetadata) ProtoMessage() {} func (x *BulkDeleteConversationsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2382,11 +2334,9 @@ type BulkDeleteConversationsResponse struct { func (x *BulkDeleteConversationsResponse) Reset() { *x = BulkDeleteConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteConversationsResponse) String() string { @@ -2397,7 +2347,7 @@ func (*BulkDeleteConversationsResponse) ProtoMessage() {} func (x *BulkDeleteConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2439,11 +2389,9 @@ type ExportInsightsDataRequest struct { func (x *ExportInsightsDataRequest) Reset() { *x = ExportInsightsDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInsightsDataRequest) String() string { @@ -2454,7 +2402,7 @@ func (*ExportInsightsDataRequest) ProtoMessage() {} func (x *ExportInsightsDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2541,11 +2489,9 @@ type ExportInsightsDataMetadata struct { func (x *ExportInsightsDataMetadata) Reset() { *x = ExportInsightsDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInsightsDataMetadata) String() string { @@ -2556,7 +2502,7 @@ func (*ExportInsightsDataMetadata) ProtoMessage() {} func (x *ExportInsightsDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2608,11 +2554,9 @@ type ExportInsightsDataResponse struct { func (x *ExportInsightsDataResponse) Reset() { *x = ExportInsightsDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInsightsDataResponse) String() string { @@ -2623,7 +2567,7 @@ func (*ExportInsightsDataResponse) ProtoMessage() {} func (x *ExportInsightsDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2652,11 +2596,9 @@ type CreateIssueModelRequest struct { func (x *CreateIssueModelRequest) Reset() { *x = CreateIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIssueModelRequest) String() string { @@ -2667,7 +2609,7 @@ func (*CreateIssueModelRequest) ProtoMessage() {} func (x *CreateIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2712,11 +2654,9 @@ type CreateIssueModelMetadata struct { func (x *CreateIssueModelMetadata) Reset() { *x = CreateIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIssueModelMetadata) String() string { @@ -2727,7 +2667,7 @@ func (*CreateIssueModelMetadata) ProtoMessage() {} func (x *CreateIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2777,11 +2717,9 @@ type UpdateIssueModelRequest struct { func (x *UpdateIssueModelRequest) Reset() { *x = UpdateIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIssueModelRequest) String() string { @@ -2792,7 +2730,7 @@ func (*UpdateIssueModelRequest) ProtoMessage() {} func (x *UpdateIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2833,11 +2771,9 @@ type ListIssueModelsRequest struct { func (x *ListIssueModelsRequest) Reset() { *x = ListIssueModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIssueModelsRequest) String() string { @@ -2848,7 +2784,7 @@ func (*ListIssueModelsRequest) ProtoMessage() {} func (x *ListIssueModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2882,11 +2818,9 @@ type ListIssueModelsResponse struct { func (x *ListIssueModelsResponse) Reset() { *x = ListIssueModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIssueModelsResponse) String() string { @@ -2897,7 +2831,7 @@ func (*ListIssueModelsResponse) ProtoMessage() {} func (x *ListIssueModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2931,11 +2865,9 @@ type GetIssueModelRequest struct { func (x *GetIssueModelRequest) Reset() { *x = GetIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIssueModelRequest) String() string { @@ -2946,7 +2878,7 @@ func (*GetIssueModelRequest) ProtoMessage() {} func (x *GetIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2980,11 +2912,9 @@ type DeleteIssueModelRequest struct { func (x *DeleteIssueModelRequest) Reset() { *x = DeleteIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIssueModelRequest) String() string { @@ -2995,7 +2925,7 @@ func (*DeleteIssueModelRequest) ProtoMessage() {} func (x *DeleteIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3033,11 +2963,9 @@ type DeleteIssueModelMetadata struct { func (x *DeleteIssueModelMetadata) Reset() { *x = DeleteIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIssueModelMetadata) String() string { @@ -3048,7 +2976,7 @@ func (*DeleteIssueModelMetadata) ProtoMessage() {} func (x *DeleteIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3096,11 +3024,9 @@ type DeployIssueModelRequest struct { func (x *DeployIssueModelRequest) Reset() { *x = DeployIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIssueModelRequest) String() string { @@ -3111,7 +3037,7 @@ func (*DeployIssueModelRequest) ProtoMessage() {} func (x *DeployIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3142,11 +3068,9 @@ type DeployIssueModelResponse struct { func (x *DeployIssueModelResponse) Reset() { *x = DeployIssueModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIssueModelResponse) String() string { @@ -3157,7 +3081,7 @@ func (*DeployIssueModelResponse) ProtoMessage() {} func (x *DeployIssueModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3188,11 +3112,9 @@ type DeployIssueModelMetadata struct { func (x *DeployIssueModelMetadata) Reset() { *x = DeployIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIssueModelMetadata) String() string { @@ -3203,7 +3125,7 @@ func (*DeployIssueModelMetadata) ProtoMessage() {} func (x *DeployIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3251,11 +3173,9 @@ type UndeployIssueModelRequest struct { func (x *UndeployIssueModelRequest) Reset() { *x = UndeployIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIssueModelRequest) String() string { @@ -3266,7 +3186,7 @@ func (*UndeployIssueModelRequest) ProtoMessage() {} func (x *UndeployIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3297,11 +3217,9 @@ type UndeployIssueModelResponse struct { func (x *UndeployIssueModelResponse) Reset() { *x = UndeployIssueModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIssueModelResponse) String() string { @@ -3312,7 +3230,7 @@ func (*UndeployIssueModelResponse) ProtoMessage() {} func (x *UndeployIssueModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3343,11 +3261,9 @@ type UndeployIssueModelMetadata struct { func (x *UndeployIssueModelMetadata) Reset() { *x = UndeployIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIssueModelMetadata) String() string { @@ -3358,7 +3274,7 @@ func (*UndeployIssueModelMetadata) ProtoMessage() {} func (x *UndeployIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3410,11 +3326,9 @@ type ExportIssueModelRequest struct { func (x *ExportIssueModelRequest) Reset() { *x = ExportIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIssueModelRequest) String() string { @@ -3425,7 +3339,7 @@ func (*ExportIssueModelRequest) ProtoMessage() {} func (x *ExportIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3481,11 +3395,9 @@ type ExportIssueModelResponse struct { func (x *ExportIssueModelResponse) Reset() { *x = ExportIssueModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIssueModelResponse) String() string { @@ -3496,7 +3408,7 @@ func (*ExportIssueModelResponse) ProtoMessage() {} func (x *ExportIssueModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3527,11 +3439,9 @@ type ExportIssueModelMetadata struct { func (x *ExportIssueModelMetadata) Reset() { *x = ExportIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIssueModelMetadata) String() string { @@ -3542,7 +3452,7 @@ func (*ExportIssueModelMetadata) ProtoMessage() {} func (x *ExportIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3598,11 +3508,9 @@ type ImportIssueModelRequest struct { func (x *ImportIssueModelRequest) Reset() { *x = ImportIssueModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIssueModelRequest) String() string { @@ -3613,7 +3521,7 @@ func (*ImportIssueModelRequest) ProtoMessage() {} func (x *ImportIssueModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3676,11 +3584,9 @@ type ImportIssueModelResponse struct { func (x *ImportIssueModelResponse) Reset() { *x = ImportIssueModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIssueModelResponse) String() string { @@ -3691,7 +3597,7 @@ func (*ImportIssueModelResponse) ProtoMessage() {} func (x *ImportIssueModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3722,11 +3628,9 @@ type ImportIssueModelMetadata struct { func (x *ImportIssueModelMetadata) Reset() { *x = ImportIssueModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIssueModelMetadata) String() string { @@ -3737,7 +3641,7 @@ func (*ImportIssueModelMetadata) ProtoMessage() {} func (x *ImportIssueModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3785,11 +3689,9 @@ type GetIssueRequest struct { func (x *GetIssueRequest) Reset() { *x = GetIssueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIssueRequest) String() string { @@ -3800,7 +3702,7 @@ func (*GetIssueRequest) ProtoMessage() {} func (x *GetIssueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3834,11 +3736,9 @@ type ListIssuesRequest struct { func (x *ListIssuesRequest) Reset() { *x = ListIssuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIssuesRequest) String() string { @@ -3849,7 +3749,7 @@ func (*ListIssuesRequest) ProtoMessage() {} func (x *ListIssuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3883,11 +3783,9 @@ type ListIssuesResponse struct { func (x *ListIssuesResponse) Reset() { *x = ListIssuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIssuesResponse) String() string { @@ -3898,7 +3796,7 @@ func (*ListIssuesResponse) ProtoMessage() {} func (x *ListIssuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3934,11 +3832,9 @@ type UpdateIssueRequest struct { func (x *UpdateIssueRequest) Reset() { *x = UpdateIssueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIssueRequest) String() string { @@ -3949,7 +3845,7 @@ func (*UpdateIssueRequest) ProtoMessage() {} func (x *UpdateIssueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3990,11 +3886,9 @@ type DeleteIssueRequest struct { func (x *DeleteIssueRequest) Reset() { *x = DeleteIssueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIssueRequest) String() string { @@ -4005,7 +3899,7 @@ func (*DeleteIssueRequest) ProtoMessage() {} func (x *DeleteIssueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4039,11 +3933,9 @@ type CalculateIssueModelStatsRequest struct { func (x *CalculateIssueModelStatsRequest) Reset() { *x = CalculateIssueModelStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateIssueModelStatsRequest) String() string { @@ -4054,7 +3946,7 @@ func (*CalculateIssueModelStatsRequest) ProtoMessage() {} func (x *CalculateIssueModelStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4089,11 +3981,9 @@ type CalculateIssueModelStatsResponse struct { func (x *CalculateIssueModelStatsResponse) Reset() { *x = CalculateIssueModelStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateIssueModelStatsResponse) String() string { @@ -4104,7 +3994,7 @@ func (*CalculateIssueModelStatsResponse) ProtoMessage() {} func (x *CalculateIssueModelStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4143,11 +4033,9 @@ type CreatePhraseMatcherRequest struct { func (x *CreatePhraseMatcherRequest) Reset() { *x = CreatePhraseMatcherRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhraseMatcherRequest) String() string { @@ -4158,7 +4046,7 @@ func (*CreatePhraseMatcherRequest) ProtoMessage() {} func (x *CreatePhraseMatcherRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4211,11 +4099,9 @@ type ListPhraseMatchersRequest struct { func (x *ListPhraseMatchersRequest) Reset() { *x = ListPhraseMatchersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseMatchersRequest) String() string { @@ -4226,7 +4112,7 @@ func (*ListPhraseMatchersRequest) ProtoMessage() {} func (x *ListPhraseMatchersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4284,11 +4170,9 @@ type ListPhraseMatchersResponse struct { func (x *ListPhraseMatchersResponse) Reset() { *x = ListPhraseMatchersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseMatchersResponse) String() string { @@ -4299,7 +4183,7 @@ func (*ListPhraseMatchersResponse) ProtoMessage() {} func (x *ListPhraseMatchersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4340,11 +4224,9 @@ type GetPhraseMatcherRequest struct { func (x *GetPhraseMatcherRequest) Reset() { *x = GetPhraseMatcherRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhraseMatcherRequest) String() string { @@ -4355,7 +4237,7 @@ func (*GetPhraseMatcherRequest) ProtoMessage() {} func (x *GetPhraseMatcherRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4389,11 +4271,9 @@ type DeletePhraseMatcherRequest struct { func (x *DeletePhraseMatcherRequest) Reset() { *x = DeletePhraseMatcherRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhraseMatcherRequest) String() string { @@ -4404,7 +4284,7 @@ func (*DeletePhraseMatcherRequest) ProtoMessage() {} func (x *DeletePhraseMatcherRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4440,11 +4320,9 @@ type UpdatePhraseMatcherRequest struct { func (x *UpdatePhraseMatcherRequest) Reset() { *x = UpdatePhraseMatcherRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePhraseMatcherRequest) String() string { @@ -4455,7 +4333,7 @@ func (*UpdatePhraseMatcherRequest) ProtoMessage() {} func (x *UpdatePhraseMatcherRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4496,11 +4374,9 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingsRequest) String() string { @@ -4511,7 +4387,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4547,11 +4423,9 @@ type UpdateSettingsRequest struct { func (x *UpdateSettingsRequest) Reset() { *x = UpdateSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingsRequest) String() string { @@ -4562,7 +4436,7 @@ func (*UpdateSettingsRequest) ProtoMessage() {} func (x *UpdateSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4609,11 +4483,9 @@ type CreateAnalysisRuleRequest struct { func (x *CreateAnalysisRuleRequest) Reset() { *x = CreateAnalysisRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnalysisRuleRequest) String() string { @@ -4624,7 +4496,7 @@ func (*CreateAnalysisRuleRequest) ProtoMessage() {} func (x *CreateAnalysisRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4665,11 +4537,9 @@ type GetAnalysisRuleRequest struct { func (x *GetAnalysisRuleRequest) Reset() { *x = GetAnalysisRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnalysisRuleRequest) String() string { @@ -4680,7 +4550,7 @@ func (*GetAnalysisRuleRequest) ProtoMessage() {} func (x *GetAnalysisRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4718,11 +4588,9 @@ type UpdateAnalysisRuleRequest struct { func (x *UpdateAnalysisRuleRequest) Reset() { *x = UpdateAnalysisRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAnalysisRuleRequest) String() string { @@ -4733,7 +4601,7 @@ func (*UpdateAnalysisRuleRequest) ProtoMessage() {} func (x *UpdateAnalysisRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4774,11 +4642,9 @@ type DeleteAnalysisRuleRequest struct { func (x *DeleteAnalysisRuleRequest) Reset() { *x = DeleteAnalysisRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnalysisRuleRequest) String() string { @@ -4789,7 +4655,7 @@ func (*DeleteAnalysisRuleRequest) ProtoMessage() {} func (x *DeleteAnalysisRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4832,11 +4698,9 @@ type ListAnalysisRulesRequest struct { func (x *ListAnalysisRulesRequest) Reset() { *x = ListAnalysisRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysisRulesRequest) String() string { @@ -4847,7 +4711,7 @@ func (*ListAnalysisRulesRequest) ProtoMessage() {} func (x *ListAnalysisRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4898,11 +4762,9 @@ type ListAnalysisRulesResponse struct { func (x *ListAnalysisRulesResponse) Reset() { *x = ListAnalysisRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysisRulesResponse) String() string { @@ -4913,7 +4775,7 @@ func (*ListAnalysisRulesResponse) ProtoMessage() {} func (x *ListAnalysisRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4954,11 +4816,9 @@ type GetEncryptionSpecRequest struct { func (x *GetEncryptionSpecRequest) Reset() { *x = GetEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEncryptionSpecRequest) String() string { @@ -4969,7 +4829,7 @@ func (*GetEncryptionSpecRequest) ProtoMessage() {} func (x *GetEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5006,11 +4866,9 @@ type InitializeEncryptionSpecRequest struct { func (x *InitializeEncryptionSpecRequest) Reset() { *x = InitializeEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecRequest) String() string { @@ -5021,7 +4879,7 @@ func (*InitializeEncryptionSpecRequest) ProtoMessage() {} func (x *InitializeEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5052,11 +4910,9 @@ type InitializeEncryptionSpecResponse struct { func (x *InitializeEncryptionSpecResponse) Reset() { *x = InitializeEncryptionSpecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecResponse) String() string { @@ -5067,7 +4923,7 @@ func (*InitializeEncryptionSpecResponse) ProtoMessage() {} func (x *InitializeEncryptionSpecResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5101,11 +4957,9 @@ type InitializeEncryptionSpecMetadata struct { func (x *InitializeEncryptionSpecMetadata) Reset() { *x = InitializeEncryptionSpecMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecMetadata) String() string { @@ -5116,7 +4970,7 @@ func (*InitializeEncryptionSpecMetadata) ProtoMessage() {} func (x *InitializeEncryptionSpecMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5176,11 +5030,9 @@ type CreateViewRequest struct { func (x *CreateViewRequest) Reset() { *x = CreateViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateViewRequest) String() string { @@ -5191,7 +5043,7 @@ func (*CreateViewRequest) ProtoMessage() {} func (x *CreateViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5232,11 +5084,9 @@ type GetViewRequest struct { func (x *GetViewRequest) Reset() { *x = GetViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetViewRequest) String() string { @@ -5247,7 +5097,7 @@ func (*GetViewRequest) ProtoMessage() {} func (x *GetViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5290,11 +5140,9 @@ type ListViewsRequest struct { func (x *ListViewsRequest) Reset() { *x = ListViewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViewsRequest) String() string { @@ -5305,7 +5153,7 @@ func (*ListViewsRequest) ProtoMessage() {} func (x *ListViewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5356,11 +5204,9 @@ type ListViewsResponse struct { func (x *ListViewsResponse) Reset() { *x = ListViewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViewsResponse) String() string { @@ -5371,7 +5217,7 @@ func (*ListViewsResponse) ProtoMessage() {} func (x *ListViewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5414,11 +5260,9 @@ type UpdateViewRequest struct { func (x *UpdateViewRequest) Reset() { *x = UpdateViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateViewRequest) String() string { @@ -5429,7 +5273,7 @@ func (*UpdateViewRequest) ProtoMessage() {} func (x *UpdateViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5470,11 +5314,9 @@ type DeleteViewRequest struct { func (x *DeleteViewRequest) Reset() { *x = DeleteViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteViewRequest) String() string { @@ -5485,7 +5327,7 @@ func (*DeleteViewRequest) ProtoMessage() {} func (x *DeleteViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5529,11 +5371,9 @@ type Dimension struct { func (x *Dimension) Reset() { *x = Dimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dimension) String() string { @@ -5544,7 +5384,7 @@ func (*Dimension) ProtoMessage() {} func (x *Dimension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5668,11 +5508,9 @@ type QueryMetricsRequest struct { func (x *QueryMetricsRequest) Reset() { *x = QueryMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsRequest) String() string { @@ -5683,7 +5521,7 @@ func (*QueryMetricsRequest) ProtoMessage() {} func (x *QueryMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5757,11 +5595,9 @@ type QueryMetricsResponse struct { func (x *QueryMetricsResponse) Reset() { *x = QueryMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse) String() string { @@ -5772,7 +5608,7 @@ func (*QueryMetricsResponse) ProtoMessage() {} func (x *QueryMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5824,11 +5660,9 @@ type QueryMetricsMetadata struct { func (x *QueryMetricsMetadata) Reset() { *x = QueryMetricsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsMetadata) String() string { @@ -5839,7 +5673,7 @@ func (*QueryMetricsMetadata) ProtoMessage() {} func (x *QueryMetricsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5875,11 +5709,9 @@ type CreateQaQuestionRequest struct { func (x *CreateQaQuestionRequest) Reset() { *x = CreateQaQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQaQuestionRequest) String() string { @@ -5890,7 +5722,7 @@ func (*CreateQaQuestionRequest) ProtoMessage() {} func (x *CreateQaQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5938,11 +5770,9 @@ type GetQaQuestionRequest struct { func (x *GetQaQuestionRequest) Reset() { *x = GetQaQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQaQuestionRequest) String() string { @@ -5953,7 +5783,7 @@ func (*GetQaQuestionRequest) ProtoMessage() {} func (x *GetQaQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5996,11 +5826,9 @@ type ListQaQuestionsRequest struct { func (x *ListQaQuestionsRequest) Reset() { *x = ListQaQuestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaQuestionsRequest) String() string { @@ -6011,7 +5839,7 @@ func (*ListQaQuestionsRequest) ProtoMessage() {} func (x *ListQaQuestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6062,11 +5890,9 @@ type ListQaQuestionsResponse struct { func (x *ListQaQuestionsResponse) Reset() { *x = ListQaQuestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaQuestionsResponse) String() string { @@ -6077,7 +5903,7 @@ func (*ListQaQuestionsResponse) ProtoMessage() {} func (x *ListQaQuestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6129,11 +5955,9 @@ type UpdateQaQuestionRequest struct { func (x *UpdateQaQuestionRequest) Reset() { *x = UpdateQaQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQaQuestionRequest) String() string { @@ -6144,7 +5968,7 @@ func (*UpdateQaQuestionRequest) ProtoMessage() {} func (x *UpdateQaQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6185,11 +6009,9 @@ type DeleteQaQuestionRequest struct { func (x *DeleteQaQuestionRequest) Reset() { *x = DeleteQaQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQaQuestionRequest) String() string { @@ -6200,7 +6022,7 @@ func (*DeleteQaQuestionRequest) ProtoMessage() {} func (x *DeleteQaQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6243,11 +6065,9 @@ type CreateQaScorecardRequest struct { func (x *CreateQaScorecardRequest) Reset() { *x = CreateQaScorecardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQaScorecardRequest) String() string { @@ -6258,7 +6078,7 @@ func (*CreateQaScorecardRequest) ProtoMessage() {} func (x *CreateQaScorecardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6306,11 +6126,9 @@ type GetQaScorecardRequest struct { func (x *GetQaScorecardRequest) Reset() { *x = GetQaScorecardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQaScorecardRequest) String() string { @@ -6321,7 +6139,7 @@ func (*GetQaScorecardRequest) ProtoMessage() {} func (x *GetQaScorecardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6362,11 +6180,9 @@ type UpdateQaScorecardRequest struct { func (x *UpdateQaScorecardRequest) Reset() { *x = UpdateQaScorecardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateQaScorecardRequest) String() string { @@ -6377,7 +6193,7 @@ func (*UpdateQaScorecardRequest) ProtoMessage() {} func (x *UpdateQaScorecardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6421,11 +6237,9 @@ type DeleteQaScorecardRequest struct { func (x *DeleteQaScorecardRequest) Reset() { *x = DeleteQaScorecardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQaScorecardRequest) String() string { @@ -6436,7 +6250,7 @@ func (*DeleteQaScorecardRequest) ProtoMessage() {} func (x *DeleteQaScorecardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6486,11 +6300,9 @@ type CreateQaScorecardRevisionRequest struct { func (x *CreateQaScorecardRevisionRequest) Reset() { *x = CreateQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQaScorecardRevisionRequest) String() string { @@ -6501,7 +6313,7 @@ func (*CreateQaScorecardRevisionRequest) ProtoMessage() {} func (x *CreateQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6549,11 +6361,9 @@ type GetQaScorecardRevisionRequest struct { func (x *GetQaScorecardRevisionRequest) Reset() { *x = GetQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQaScorecardRevisionRequest) String() string { @@ -6564,7 +6374,7 @@ func (*GetQaScorecardRevisionRequest) ProtoMessage() {} func (x *GetQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6609,11 +6419,9 @@ type TuneQaScorecardRevisionRequest struct { func (x *TuneQaScorecardRevisionRequest) Reset() { *x = TuneQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionRequest) String() string { @@ -6624,7 +6432,7 @@ func (*TuneQaScorecardRevisionRequest) ProtoMessage() {} func (x *TuneQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6669,11 +6477,9 @@ type TuneQaScorecardRevisionResponse struct { func (x *TuneQaScorecardRevisionResponse) Reset() { *x = TuneQaScorecardRevisionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionResponse) String() string { @@ -6684,7 +6490,7 @@ func (*TuneQaScorecardRevisionResponse) ProtoMessage() {} func (x *TuneQaScorecardRevisionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6724,11 +6530,9 @@ type TuneQaScorecardRevisionMetadata struct { func (x *TuneQaScorecardRevisionMetadata) Reset() { *x = TuneQaScorecardRevisionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionMetadata) String() string { @@ -6739,7 +6543,7 @@ func (*TuneQaScorecardRevisionMetadata) ProtoMessage() {} func (x *TuneQaScorecardRevisionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6808,11 +6612,9 @@ type DeployQaScorecardRevisionRequest struct { func (x *DeployQaScorecardRevisionRequest) Reset() { *x = DeployQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployQaScorecardRevisionRequest) String() string { @@ -6823,7 +6625,7 @@ func (*DeployQaScorecardRevisionRequest) ProtoMessage() {} func (x *DeployQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6857,11 +6659,9 @@ type UndeployQaScorecardRevisionRequest struct { func (x *UndeployQaScorecardRevisionRequest) Reset() { *x = UndeployQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployQaScorecardRevisionRequest) String() string { @@ -6872,7 +6672,7 @@ func (*UndeployQaScorecardRevisionRequest) ProtoMessage() {} func (x *UndeployQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6910,11 +6710,9 @@ type DeleteQaScorecardRevisionRequest struct { func (x *DeleteQaScorecardRevisionRequest) Reset() { *x = DeleteQaScorecardRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteQaScorecardRevisionRequest) String() string { @@ -6925,7 +6723,7 @@ func (*DeleteQaScorecardRevisionRequest) ProtoMessage() {} func (x *DeleteQaScorecardRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6975,11 +6773,9 @@ type ListQaScorecardsRequest struct { func (x *ListQaScorecardsRequest) Reset() { *x = ListQaScorecardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaScorecardsRequest) String() string { @@ -6990,7 +6786,7 @@ func (*ListQaScorecardsRequest) ProtoMessage() {} func (x *ListQaScorecardsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7041,11 +6837,9 @@ type ListQaScorecardsResponse struct { func (x *ListQaScorecardsResponse) Reset() { *x = ListQaScorecardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaScorecardsResponse) String() string { @@ -7056,7 +6850,7 @@ func (*ListQaScorecardsResponse) ProtoMessage() {} func (x *ListQaScorecardsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7112,11 +6906,9 @@ type ListQaScorecardRevisionsRequest struct { func (x *ListQaScorecardRevisionsRequest) Reset() { *x = ListQaScorecardRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaScorecardRevisionsRequest) String() string { @@ -7127,7 +6919,7 @@ func (*ListQaScorecardRevisionsRequest) ProtoMessage() {} func (x *ListQaScorecardRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7185,11 +6977,9 @@ type ListQaScorecardRevisionsResponse struct { func (x *ListQaScorecardRevisionsResponse) Reset() { *x = ListQaScorecardRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQaScorecardRevisionsResponse) String() string { @@ -7200,7 +6990,7 @@ func (*ListQaScorecardRevisionsResponse) ProtoMessage() {} func (x *ListQaScorecardRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7246,11 +7036,9 @@ type CreateFeedbackLabelRequest struct { func (x *CreateFeedbackLabelRequest) Reset() { *x = CreateFeedbackLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFeedbackLabelRequest) String() string { @@ -7261,7 +7049,7 @@ func (*CreateFeedbackLabelRequest) ProtoMessage() {} func (x *CreateFeedbackLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7334,11 +7122,9 @@ type ListFeedbackLabelsRequest struct { func (x *ListFeedbackLabelsRequest) Reset() { *x = ListFeedbackLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedbackLabelsRequest) String() string { @@ -7349,7 +7135,7 @@ func (*ListFeedbackLabelsRequest) ProtoMessage() {} func (x *ListFeedbackLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7406,11 +7192,9 @@ type ListFeedbackLabelsResponse struct { func (x *ListFeedbackLabelsResponse) Reset() { *x = ListFeedbackLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFeedbackLabelsResponse) String() string { @@ -7421,7 +7205,7 @@ func (*ListFeedbackLabelsResponse) ProtoMessage() {} func (x *ListFeedbackLabelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7462,11 +7246,9 @@ type GetFeedbackLabelRequest struct { func (x *GetFeedbackLabelRequest) Reset() { *x = GetFeedbackLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFeedbackLabelRequest) String() string { @@ -7477,7 +7259,7 @@ func (*GetFeedbackLabelRequest) ProtoMessage() {} func (x *GetFeedbackLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7513,11 +7295,9 @@ type UpdateFeedbackLabelRequest struct { func (x *UpdateFeedbackLabelRequest) Reset() { *x = UpdateFeedbackLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFeedbackLabelRequest) String() string { @@ -7528,7 +7308,7 @@ func (*UpdateFeedbackLabelRequest) ProtoMessage() {} func (x *UpdateFeedbackLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7569,11 +7349,9 @@ type DeleteFeedbackLabelRequest struct { func (x *DeleteFeedbackLabelRequest) Reset() { *x = DeleteFeedbackLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFeedbackLabelRequest) String() string { @@ -7584,7 +7362,7 @@ func (*DeleteFeedbackLabelRequest) ProtoMessage() {} func (x *DeleteFeedbackLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7641,11 +7419,9 @@ type ListAllFeedbackLabelsRequest struct { func (x *ListAllFeedbackLabelsRequest) Reset() { *x = ListAllFeedbackLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAllFeedbackLabelsRequest) String() string { @@ -7656,7 +7432,7 @@ func (*ListAllFeedbackLabelsRequest) ProtoMessage() {} func (x *ListAllFeedbackLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7714,11 +7490,9 @@ type ListAllFeedbackLabelsResponse struct { func (x *ListAllFeedbackLabelsResponse) Reset() { *x = ListAllFeedbackLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAllFeedbackLabelsResponse) String() string { @@ -7729,7 +7503,7 @@ func (*ListAllFeedbackLabelsResponse) ProtoMessage() {} func (x *ListAllFeedbackLabelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7781,11 +7555,9 @@ type BulkUploadFeedbackLabelsRequest struct { func (x *BulkUploadFeedbackLabelsRequest) Reset() { *x = BulkUploadFeedbackLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkUploadFeedbackLabelsRequest) String() string { @@ -7796,7 +7568,7 @@ func (*BulkUploadFeedbackLabelsRequest) ProtoMessage() {} func (x *BulkUploadFeedbackLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7859,11 +7631,9 @@ type BulkUploadFeedbackLabelsResponse struct { func (x *BulkUploadFeedbackLabelsResponse) Reset() { *x = BulkUploadFeedbackLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkUploadFeedbackLabelsResponse) String() string { @@ -7874,7 +7644,7 @@ func (*BulkUploadFeedbackLabelsResponse) ProtoMessage() {} func (x *BulkUploadFeedbackLabelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7910,11 +7680,9 @@ type BulkUploadFeedbackLabelsMetadata struct { func (x *BulkUploadFeedbackLabelsMetadata) Reset() { *x = BulkUploadFeedbackLabelsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkUploadFeedbackLabelsMetadata) String() string { @@ -7925,7 +7693,7 @@ func (*BulkUploadFeedbackLabelsMetadata) ProtoMessage() {} func (x *BulkUploadFeedbackLabelsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8022,12 +7790,10 @@ type BulkDownloadFeedbackLabelsRequest struct { } func (x *BulkDownloadFeedbackLabelsRequest) Reset() { - *x = BulkDownloadFeedbackLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + *x = BulkDownloadFeedbackLabelsRequest{} + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDownloadFeedbackLabelsRequest) String() string { @@ -8038,7 +7804,7 @@ func (*BulkDownloadFeedbackLabelsRequest) ProtoMessage() {} func (x *BulkDownloadFeedbackLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8130,11 +7896,9 @@ type BulkDownloadFeedbackLabelsResponse struct { func (x *BulkDownloadFeedbackLabelsResponse) Reset() { *x = BulkDownloadFeedbackLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDownloadFeedbackLabelsResponse) String() string { @@ -8145,7 +7909,7 @@ func (*BulkDownloadFeedbackLabelsResponse) ProtoMessage() {} func (x *BulkDownloadFeedbackLabelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8181,11 +7945,9 @@ type BulkDownloadFeedbackLabelsMetadata struct { func (x *BulkDownloadFeedbackLabelsMetadata) Reset() { *x = BulkDownloadFeedbackLabelsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDownloadFeedbackLabelsMetadata) String() string { @@ -8196,7 +7958,7 @@ func (*BulkDownloadFeedbackLabelsMetadata) ProtoMessage() {} func (x *BulkDownloadFeedbackLabelsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8262,11 +8024,9 @@ type CalculateStatsResponse_TimeSeries struct { func (x *CalculateStatsResponse_TimeSeries) Reset() { *x = CalculateStatsResponse_TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateStatsResponse_TimeSeries) String() string { @@ -8277,7 +8037,7 @@ func (*CalculateStatsResponse_TimeSeries) ProtoMessage() {} func (x *CalculateStatsResponse_TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8320,11 +8080,9 @@ type CalculateStatsResponse_TimeSeries_Interval struct { func (x *CalculateStatsResponse_TimeSeries_Interval) Reset() { *x = CalculateStatsResponse_TimeSeries_Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateStatsResponse_TimeSeries_Interval) String() string { @@ -8335,7 +8093,7 @@ func (*CalculateStatsResponse_TimeSeries_Interval) ProtoMessage() {} func (x *CalculateStatsResponse_TimeSeries_Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8394,11 +8152,9 @@ type IngestConversationsRequest_GcsSource struct { func (x *IngestConversationsRequest_GcsSource) Reset() { *x = IngestConversationsRequest_GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsRequest_GcsSource) String() string { @@ -8409,7 +8165,7 @@ func (*IngestConversationsRequest_GcsSource) ProtoMessage() {} func (x *IngestConversationsRequest_GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8464,11 +8220,9 @@ type IngestConversationsRequest_TranscriptObjectConfig struct { func (x *IngestConversationsRequest_TranscriptObjectConfig) Reset() { *x = IngestConversationsRequest_TranscriptObjectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsRequest_TranscriptObjectConfig) String() string { @@ -8479,7 +8233,7 @@ func (*IngestConversationsRequest_TranscriptObjectConfig) ProtoMessage() {} func (x *IngestConversationsRequest_TranscriptObjectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8524,11 +8278,9 @@ type IngestConversationsRequest_ConversationConfig struct { func (x *IngestConversationsRequest_ConversationConfig) Reset() { *x = IngestConversationsRequest_ConversationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsRequest_ConversationConfig) String() string { @@ -8539,7 +8291,7 @@ func (*IngestConversationsRequest_ConversationConfig) ProtoMessage() {} func (x *IngestConversationsRequest_ConversationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8596,11 +8348,9 @@ type IngestConversationsMetadata_IngestConversationsStats struct { func (x *IngestConversationsMetadata_IngestConversationsStats) Reset() { *x = IngestConversationsMetadata_IngestConversationsStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestConversationsMetadata_IngestConversationsStats) String() string { @@ -8611,7 +8361,7 @@ func (*IngestConversationsMetadata_IngestConversationsStats) ProtoMessage() {} func (x *IngestConversationsMetadata_IngestConversationsStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8676,11 +8426,9 @@ type ExportInsightsDataRequest_BigQueryDestination struct { func (x *ExportInsightsDataRequest_BigQueryDestination) Reset() { *x = ExportInsightsDataRequest_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInsightsDataRequest_BigQueryDestination) String() string { @@ -8691,7 +8439,7 @@ func (*ExportInsightsDataRequest_BigQueryDestination) ProtoMessage() {} func (x *ExportInsightsDataRequest_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8739,11 +8487,9 @@ type ExportIssueModelRequest_GcsDestination struct { func (x *ExportIssueModelRequest_GcsDestination) Reset() { *x = ExportIssueModelRequest_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIssueModelRequest_GcsDestination) String() string { @@ -8754,7 +8500,7 @@ func (*ExportIssueModelRequest_GcsDestination) ProtoMessage() {} func (x *ExportIssueModelRequest_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8788,11 +8534,9 @@ type ImportIssueModelRequest_GcsSource struct { func (x *ImportIssueModelRequest_GcsSource) Reset() { *x = ImportIssueModelRequest_GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIssueModelRequest_GcsSource) String() string { @@ -8803,7 +8547,7 @@ func (*ImportIssueModelRequest_GcsSource) ProtoMessage() {} func (x *ImportIssueModelRequest_GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8841,11 +8585,9 @@ type Dimension_IssueDimensionMetadata struct { func (x *Dimension_IssueDimensionMetadata) Reset() { *x = Dimension_IssueDimensionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dimension_IssueDimensionMetadata) String() string { @@ -8856,7 +8598,7 @@ func (*Dimension_IssueDimensionMetadata) ProtoMessage() {} func (x *Dimension_IssueDimensionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8908,11 +8650,9 @@ type Dimension_AgentDimensionMetadata struct { func (x *Dimension_AgentDimensionMetadata) Reset() { *x = Dimension_AgentDimensionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dimension_AgentDimensionMetadata) String() string { @@ -8923,7 +8663,7 @@ func (*Dimension_AgentDimensionMetadata) ProtoMessage() {} func (x *Dimension_AgentDimensionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8975,11 +8715,9 @@ type Dimension_QaQuestionDimensionMetadata struct { func (x *Dimension_QaQuestionDimensionMetadata) Reset() { *x = Dimension_QaQuestionDimensionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dimension_QaQuestionDimensionMetadata) String() string { @@ -8990,7 +8728,7 @@ func (*Dimension_QaQuestionDimensionMetadata) ProtoMessage() {} func (x *Dimension_QaQuestionDimensionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9046,11 +8784,9 @@ type Dimension_QaQuestionAnswerDimensionMetadata struct { func (x *Dimension_QaQuestionAnswerDimensionMetadata) Reset() { *x = Dimension_QaQuestionAnswerDimensionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dimension_QaQuestionAnswerDimensionMetadata) String() string { @@ -9061,7 +8797,7 @@ func (*Dimension_QaQuestionAnswerDimensionMetadata) ProtoMessage() {} func (x *Dimension_QaQuestionAnswerDimensionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9131,11 +8867,9 @@ type QueryMetricsResponse_Slice struct { func (x *QueryMetricsResponse_Slice) Reset() { *x = QueryMetricsResponse_Slice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse_Slice) String() string { @@ -9146,7 +8880,7 @@ func (*QueryMetricsResponse_Slice) ProtoMessage() {} func (x *QueryMetricsResponse_Slice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9205,11 +8939,9 @@ type QueryMetricsResponse_Slice_DataPoint struct { func (x *QueryMetricsResponse_Slice_DataPoint) Reset() { *x = QueryMetricsResponse_Slice_DataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse_Slice_DataPoint) String() string { @@ -9220,7 +8952,7 @@ func (*QueryMetricsResponse_Slice_DataPoint) ProtoMessage() {} func (x *QueryMetricsResponse_Slice_DataPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9280,11 +9012,9 @@ type QueryMetricsResponse_Slice_TimeSeries struct { func (x *QueryMetricsResponse_Slice_TimeSeries) Reset() { *x = QueryMetricsResponse_Slice_TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse_Slice_TimeSeries) String() string { @@ -9295,7 +9025,7 @@ func (*QueryMetricsResponse_Slice_TimeSeries) ProtoMessage() {} func (x *QueryMetricsResponse_Slice_TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9351,11 +9081,9 @@ type QueryMetricsResponse_Slice_DataPoint_ConversationMeasure struct { func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure) Reset() { *x = QueryMetricsResponse_Slice_DataPoint_ConversationMeasure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure) String() string { @@ -9366,7 +9094,7 @@ func (*QueryMetricsResponse_Slice_DataPoint_ConversationMeasure) ProtoMessage() func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9465,11 +9193,9 @@ type QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore struct func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore) Reset() { *x = QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore) String() string { @@ -9480,7 +9206,7 @@ func (*QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore) Prot func (x *QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9527,11 +9253,9 @@ type TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult struct { func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult) Reset() { *x = TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult) String() string { @@ -9542,7 +9266,7 @@ func (*TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult) ProtoM func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9594,11 +9318,9 @@ type TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics struct { func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics) Reset() { *x = TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics) String() string { @@ -9609,7 +9331,7 @@ func (*TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics) ProtoMess func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9651,11 +9373,9 @@ type TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics stru func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics) Reset() { *x = TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics) String() string { @@ -9666,7 +9386,7 @@ func (*TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics) P func (x *TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9703,11 +9423,9 @@ type BulkUploadFeedbackLabelsRequest_GcsSource struct { func (x *BulkUploadFeedbackLabelsRequest_GcsSource) Reset() { *x = BulkUploadFeedbackLabelsRequest_GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkUploadFeedbackLabelsRequest_GcsSource) String() string { @@ -9718,7 +9436,7 @@ func (*BulkUploadFeedbackLabelsRequest_GcsSource) ProtoMessage() {} func (x *BulkUploadFeedbackLabelsRequest_GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9763,11 +9481,9 @@ type BulkUploadFeedbackLabelsMetadata_UploadStats struct { func (x *BulkUploadFeedbackLabelsMetadata_UploadStats) Reset() { *x = BulkUploadFeedbackLabelsMetadata_UploadStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkUploadFeedbackLabelsMetadata_UploadStats) String() string { @@ -9778,7 +9494,7 @@ func (*BulkUploadFeedbackLabelsMetadata_UploadStats) ProtoMessage() {} func (x *BulkUploadFeedbackLabelsMetadata_UploadStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9843,11 +9559,9 @@ type BulkDownloadFeedbackLabelsRequest_GcsDestination struct { func (x *BulkDownloadFeedbackLabelsRequest_GcsDestination) Reset() { *x = BulkDownloadFeedbackLabelsRequest_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDownloadFeedbackLabelsRequest_GcsDestination) String() string { @@ -9858,7 +9572,7 @@ func (*BulkDownloadFeedbackLabelsRequest_GcsDestination) ProtoMessage() {} func (x *BulkDownloadFeedbackLabelsRequest_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9928,11 +9642,9 @@ type BulkDownloadFeedbackLabelsMetadata_DownloadStats struct { func (x *BulkDownloadFeedbackLabelsMetadata_DownloadStats) Reset() { *x = BulkDownloadFeedbackLabelsMetadata_DownloadStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDownloadFeedbackLabelsMetadata_DownloadStats) String() string { @@ -9943,7 +9655,7 @@ func (*BulkDownloadFeedbackLabelsMetadata_DownloadStats) ProtoMessage() {} func (x *BulkDownloadFeedbackLabelsMetadata_DownloadStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13553,1736 +13265,6 @@ func file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_in return } file_google_cloud_contactcenterinsights_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CalculateStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CalculateStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnalysisOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UploadConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UploadConversationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BulkAnalyzeConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BulkAnalyzeConversationsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BulkAnalyzeConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteConversationsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ExportInsightsDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ExportInsightsDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExportInsightsDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListIssueModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListIssueModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*DeployIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeployIssueModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*DeployIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIssueModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ExportIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ExportIssueModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ExportIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ImportIssueModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ImportIssueModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ImportIssueModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*GetIssueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListIssuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListIssuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIssueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIssueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*CalculateIssueModelStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*CalculateIssueModelStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhraseMatcherRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseMatchersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseMatchersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*GetPhraseMatcherRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhraseMatcherRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePhraseMatcherRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnalysisRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*GetAnalysisRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAnalysisRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnalysisRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysisRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysisRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*GetEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*CreateViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*GetViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListViewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*ListViewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*UpdateViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*DeleteViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*Dimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*CreateQaQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*GetQaQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*ListQaQuestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ListQaQuestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQaQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQaQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*CreateQaScorecardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*GetQaScorecardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*UpdateQaScorecardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQaScorecardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*CreateQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*GetQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*DeployQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*UndeployQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*DeleteQaScorecardRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*ListQaScorecardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ListQaScorecardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*ListQaScorecardRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*ListQaScorecardRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*CreateFeedbackLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedbackLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*ListFeedbackLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*GetFeedbackLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFeedbackLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFeedbackLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*ListAllFeedbackLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*ListAllFeedbackLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*BulkUploadFeedbackLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*BulkUploadFeedbackLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*BulkUploadFeedbackLabelsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*BulkDownloadFeedbackLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*BulkDownloadFeedbackLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*BulkDownloadFeedbackLabelsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*CalculateStatsResponse_TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*CalculateStatsResponse_TimeSeries_Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsRequest_GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsRequest_TranscriptObjectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsRequest_ConversationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*IngestConversationsMetadata_IngestConversationsStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*ExportInsightsDataRequest_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*ExportIssueModelRequest_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*ImportIssueModelRequest_GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*Dimension_IssueDimensionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*Dimension_AgentDimensionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*Dimension_QaQuestionDimensionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*Dimension_QaQuestionAnswerDimensionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse_Slice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse_Slice_DataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse_Slice_TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse_Slice_DataPoint_ConversationMeasure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetricsResponse_Slice_DataPoint_ConversationMeasure_QaTagScore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionMetadata_QaQuestionDatasetValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*TuneQaScorecardRevisionMetadata_QaQuestionDatasetTuningMetrics_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*BulkUploadFeedbackLabelsRequest_GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*BulkUploadFeedbackLabelsMetadata_UploadStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*BulkDownloadFeedbackLabelsRequest_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*BulkDownloadFeedbackLabelsMetadata_DownloadStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_contactcenterinsights_v1_contact_center_insights_proto_msgTypes[11].OneofWrappers = []any{ (*IngestConversationsRequest_GcsSource_)(nil), (*IngestConversationsRequest_TranscriptObjectConfig_)(nil), diff --git a/contactcenterinsights/apiv1/contactcenterinsightspb/resources.pb.go b/contactcenterinsights/apiv1/contactcenterinsightspb/resources.pb.go index c0faecba315e..2518091163ac 100755 --- a/contactcenterinsights/apiv1/contactcenterinsightspb/resources.pb.go +++ b/contactcenterinsights/apiv1/contactcenterinsightspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/contactcenterinsights/v1/resources.proto @@ -1041,11 +1041,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -1056,7 +1054,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,11 +1293,9 @@ type Analysis struct { func (x *Analysis) Reset() { *x = Analysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Analysis) String() string { @@ -1310,7 +1306,7 @@ func (*Analysis) ProtoMessage() {} func (x *Analysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1373,9 @@ type ConversationDataSource struct { func (x *ConversationDataSource) Reset() { *x = ConversationDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationDataSource) String() string { @@ -1392,7 +1386,7 @@ func (*ConversationDataSource) ProtoMessage() {} func (x *ConversationDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1456,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -1477,7 +1469,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1523,11 +1515,9 @@ type DialogflowSource struct { func (x *DialogflowSource) Reset() { *x = DialogflowSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogflowSource) String() string { @@ -1538,7 +1528,7 @@ func (*DialogflowSource) ProtoMessage() {} func (x *DialogflowSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1585,11 +1575,9 @@ type AnalysisResult struct { func (x *AnalysisResult) Reset() { *x = AnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalysisResult) String() string { @@ -1600,7 +1588,7 @@ func (*AnalysisResult) ProtoMessage() {} func (x *AnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1662,11 +1650,9 @@ type IssueModelResult struct { func (x *IssueModelResult) Reset() { *x = IssueModelResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueModelResult) String() string { @@ -1677,7 +1663,7 @@ func (*IssueModelResult) ProtoMessage() {} func (x *IssueModelResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1733,11 +1719,9 @@ type FeedbackLabel struct { func (x *FeedbackLabel) Reset() { *x = FeedbackLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeedbackLabel) String() string { @@ -1748,7 +1732,7 @@ func (*FeedbackLabel) ProtoMessage() {} func (x *FeedbackLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1844,11 +1828,9 @@ type ConversationLevelSentiment struct { func (x *ConversationLevelSentiment) Reset() { *x = ConversationLevelSentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationLevelSentiment) String() string { @@ -1859,7 +1841,7 @@ func (*ConversationLevelSentiment) ProtoMessage() {} func (x *ConversationLevelSentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1884,9 @@ type ConversationLevelSilence struct { func (x *ConversationLevelSilence) Reset() { *x = ConversationLevelSilence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationLevelSilence) String() string { @@ -1917,7 +1897,7 @@ func (*ConversationLevelSilence) ProtoMessage() {} func (x *ConversationLevelSilence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1964,11 +1944,9 @@ type IssueAssignment struct { func (x *IssueAssignment) Reset() { *x = IssueAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueAssignment) String() string { @@ -1979,7 +1957,7 @@ func (*IssueAssignment) ProtoMessage() {} func (x *IssueAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2045,11 +2023,9 @@ type CallAnnotation struct { func (x *CallAnnotation) Reset() { *x = CallAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CallAnnotation) String() string { @@ -2060,7 +2036,7 @@ func (*CallAnnotation) ProtoMessage() {} func (x *CallAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2238,11 +2214,9 @@ type AnnotationBoundary struct { func (x *AnnotationBoundary) Reset() { *x = AnnotationBoundary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationBoundary) String() string { @@ -2253,7 +2227,7 @@ func (*AnnotationBoundary) ProtoMessage() {} func (x *AnnotationBoundary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2332,11 +2306,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -2347,7 +2319,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2412,11 +2384,9 @@ type Intent struct { func (x *Intent) Reset() { *x = Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent) String() string { @@ -2427,7 +2397,7 @@ func (*Intent) ProtoMessage() {} func (x *Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2471,11 +2441,9 @@ type PhraseMatchData struct { func (x *PhraseMatchData) Reset() { *x = PhraseMatchData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseMatchData) String() string { @@ -2486,7 +2454,7 @@ func (*PhraseMatchData) ProtoMessage() {} func (x *PhraseMatchData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2528,11 +2496,9 @@ type DialogflowIntent struct { func (x *DialogflowIntent) Reset() { *x = DialogflowIntent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogflowIntent) String() string { @@ -2543,7 +2509,7 @@ func (*DialogflowIntent) ProtoMessage() {} func (x *DialogflowIntent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2574,11 +2540,9 @@ type InterruptionData struct { func (x *InterruptionData) Reset() { *x = InterruptionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterruptionData) String() string { @@ -2589,7 +2553,7 @@ func (*InterruptionData) ProtoMessage() {} func (x *InterruptionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2613,11 +2577,9 @@ type SilenceData struct { func (x *SilenceData) Reset() { *x = SilenceData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SilenceData) String() string { @@ -2628,7 +2590,7 @@ func (*SilenceData) ProtoMessage() {} func (x *SilenceData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2652,11 +2614,9 @@ type HoldData struct { func (x *HoldData) Reset() { *x = HoldData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HoldData) String() string { @@ -2667,7 +2627,7 @@ func (*HoldData) ProtoMessage() {} func (x *HoldData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,11 +2660,9 @@ type EntityMentionData struct { func (x *EntityMentionData) Reset() { *x = EntityMentionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMentionData) String() string { @@ -2715,7 +2673,7 @@ func (*EntityMentionData) ProtoMessage() {} func (x *EntityMentionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2767,11 +2725,9 @@ type IntentMatchData struct { func (x *IntentMatchData) Reset() { *x = IntentMatchData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentMatchData) String() string { @@ -2782,7 +2738,7 @@ func (*IntentMatchData) ProtoMessage() {} func (x *IntentMatchData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2819,11 +2775,9 @@ type SentimentData struct { func (x *SentimentData) Reset() { *x = SentimentData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentData) String() string { @@ -2834,7 +2788,7 @@ func (*SentimentData) ProtoMessage() {} func (x *SentimentData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2875,11 +2829,9 @@ type IssueMatchData struct { func (x *IssueMatchData) Reset() { *x = IssueMatchData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueMatchData) String() string { @@ -2890,7 +2842,7 @@ func (*IssueMatchData) ProtoMessage() {} func (x *IssueMatchData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2945,11 +2897,9 @@ type IssueModel struct { func (x *IssueModel) Reset() { *x = IssueModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueModel) String() string { @@ -2960,7 +2910,7 @@ func (*IssueModel) ProtoMessage() {} func (x *IssueModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3070,11 +3020,9 @@ type Issue struct { func (x *Issue) Reset() { *x = Issue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Issue) String() string { @@ -3085,7 +3033,7 @@ func (*Issue) ProtoMessage() {} func (x *Issue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3159,11 +3107,9 @@ type IssueModelLabelStats struct { func (x *IssueModelLabelStats) Reset() { *x = IssueModelLabelStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueModelLabelStats) String() string { @@ -3174,7 +3120,7 @@ func (*IssueModelLabelStats) ProtoMessage() {} func (x *IssueModelLabelStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3252,11 +3198,9 @@ type PhraseMatcher struct { func (x *PhraseMatcher) Reset() { *x = PhraseMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseMatcher) String() string { @@ -3267,7 +3211,7 @@ func (*PhraseMatcher) ProtoMessage() {} func (x *PhraseMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3373,11 +3317,9 @@ type PhraseMatchRuleGroup struct { func (x *PhraseMatchRuleGroup) Reset() { *x = PhraseMatchRuleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseMatchRuleGroup) String() string { @@ -3388,7 +3330,7 @@ func (*PhraseMatchRuleGroup) ProtoMessage() {} func (x *PhraseMatchRuleGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3435,11 +3377,9 @@ type PhraseMatchRule struct { func (x *PhraseMatchRule) Reset() { *x = PhraseMatchRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseMatchRule) String() string { @@ -3450,7 +3390,7 @@ func (*PhraseMatchRule) ProtoMessage() {} func (x *PhraseMatchRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3502,11 +3442,9 @@ type PhraseMatchRuleConfig struct { func (x *PhraseMatchRuleConfig) Reset() { *x = PhraseMatchRuleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseMatchRuleConfig) String() string { @@ -3517,7 +3455,7 @@ func (*PhraseMatchRuleConfig) ProtoMessage() {} func (x *PhraseMatchRuleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3569,11 +3507,9 @@ type ExactMatchConfig struct { func (x *ExactMatchConfig) Reset() { *x = ExactMatchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExactMatchConfig) String() string { @@ -3584,7 +3520,7 @@ func (*ExactMatchConfig) ProtoMessage() {} func (x *ExactMatchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3670,11 +3606,9 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings) String() string { @@ -3685,7 +3619,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3803,11 +3737,9 @@ type AnalysisRule struct { func (x *AnalysisRule) Reset() { *x = AnalysisRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalysisRule) String() string { @@ -3818,7 +3750,7 @@ func (*AnalysisRule) ProtoMessage() {} func (x *AnalysisRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3910,11 +3842,9 @@ type EncryptionSpec struct { func (x *EncryptionSpec) Reset() { *x = EncryptionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionSpec) String() string { @@ -3925,7 +3855,7 @@ func (*EncryptionSpec) ProtoMessage() {} func (x *EncryptionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3978,11 +3908,9 @@ type RedactionConfig struct { func (x *RedactionConfig) Reset() { *x = RedactionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedactionConfig) String() string { @@ -3993,7 +3921,7 @@ func (*RedactionConfig) ProtoMessage() {} func (x *RedactionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4040,11 +3968,9 @@ type SpeechConfig struct { func (x *SpeechConfig) Reset() { *x = SpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechConfig) String() string { @@ -4055,7 +3981,7 @@ func (*SpeechConfig) ProtoMessage() {} func (x *SpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4112,11 +4038,9 @@ type RuntimeAnnotation struct { func (x *RuntimeAnnotation) Reset() { *x = RuntimeAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeAnnotation) String() string { @@ -4127,7 +4051,7 @@ func (*RuntimeAnnotation) ProtoMessage() {} func (x *RuntimeAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4297,11 +4221,9 @@ type AnswerFeedback struct { func (x *AnswerFeedback) Reset() { *x = AnswerFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback) String() string { @@ -4312,7 +4234,7 @@ func (*AnswerFeedback) ProtoMessage() {} func (x *AnswerFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4377,11 +4299,9 @@ type ArticleSuggestionData struct { func (x *ArticleSuggestionData) Reset() { *x = ArticleSuggestionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArticleSuggestionData) String() string { @@ -4392,7 +4312,7 @@ func (*ArticleSuggestionData) ProtoMessage() {} func (x *ArticleSuggestionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4478,11 +4398,9 @@ type FaqAnswerData struct { func (x *FaqAnswerData) Reset() { *x = FaqAnswerData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaqAnswerData) String() string { @@ -4493,7 +4411,7 @@ func (*FaqAnswerData) ProtoMessage() {} func (x *FaqAnswerData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4573,11 +4491,9 @@ type SmartReplyData struct { func (x *SmartReplyData) Reset() { *x = SmartReplyData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyData) String() string { @@ -4588,7 +4504,7 @@ func (*SmartReplyData) ProtoMessage() {} func (x *SmartReplyData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4654,11 +4570,9 @@ type SmartComposeSuggestionData struct { func (x *SmartComposeSuggestionData) Reset() { *x = SmartComposeSuggestionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartComposeSuggestionData) String() string { @@ -4669,7 +4583,7 @@ func (*SmartComposeSuggestionData) ProtoMessage() {} func (x *SmartComposeSuggestionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4728,11 +4642,9 @@ type DialogflowInteractionData struct { func (x *DialogflowInteractionData) Reset() { *x = DialogflowInteractionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogflowInteractionData) String() string { @@ -4743,7 +4655,7 @@ func (*DialogflowInteractionData) ProtoMessage() {} func (x *DialogflowInteractionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4801,11 +4713,9 @@ type ConversationSummarizationSuggestionData struct { func (x *ConversationSummarizationSuggestionData) Reset() { *x = ConversationSummarizationSuggestionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationSummarizationSuggestionData) String() string { @@ -4816,7 +4726,7 @@ func (*ConversationSummarizationSuggestionData) ProtoMessage() {} func (x *ConversationSummarizationSuggestionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4898,11 +4808,9 @@ type ConversationParticipant struct { func (x *ConversationParticipant) Reset() { *x = ConversationParticipant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationParticipant) String() string { @@ -4913,7 +4821,7 @@ func (*ConversationParticipant) ProtoMessage() {} func (x *ConversationParticipant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5012,11 +4920,9 @@ type View struct { func (x *View) Reset() { *x = View{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *View) String() string { @@ -5027,7 +4933,7 @@ func (*View) ProtoMessage() {} func (x *View) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5122,11 +5028,9 @@ type AnnotatorSelector struct { func (x *AnnotatorSelector) Reset() { *x = AnnotatorSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatorSelector) String() string { @@ -5137,7 +5041,7 @@ func (*AnnotatorSelector) ProtoMessage() {} func (x *AnnotatorSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5284,11 +5188,9 @@ type QaQuestion struct { func (x *QaQuestion) Reset() { *x = QaQuestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaQuestion) String() string { @@ -5299,7 +5201,7 @@ func (*QaQuestion) ProtoMessage() {} func (x *QaQuestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5414,11 +5316,9 @@ type QaScorecard struct { func (x *QaScorecard) Reset() { *x = QaScorecard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaScorecard) String() string { @@ -5429,7 +5329,7 @@ func (*QaScorecard) ProtoMessage() {} func (x *QaScorecard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5508,11 +5408,9 @@ type QaScorecardRevision struct { func (x *QaScorecardRevision) Reset() { *x = QaScorecardRevision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaScorecardRevision) String() string { @@ -5523,7 +5421,7 @@ func (*QaScorecardRevision) ProtoMessage() {} func (x *QaScorecardRevision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5597,11 +5495,9 @@ type QaAnswer struct { func (x *QaAnswer) Reset() { *x = QaAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaAnswer) String() string { @@ -5612,7 +5508,7 @@ func (*QaAnswer) ProtoMessage() {} func (x *QaAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5707,11 +5603,9 @@ type QaScorecardResult struct { func (x *QaScorecardResult) Reset() { *x = QaScorecardResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaScorecardResult) String() string { @@ -5722,7 +5616,7 @@ func (*QaScorecardResult) ProtoMessage() {} func (x *QaScorecardResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5828,11 +5722,9 @@ type Conversation_CallMetadata struct { func (x *Conversation_CallMetadata) Reset() { *x = Conversation_CallMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_CallMetadata) String() string { @@ -5843,7 +5735,7 @@ func (*Conversation_CallMetadata) ProtoMessage() {} func (x *Conversation_CallMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5890,11 +5782,9 @@ type Conversation_QualityMetadata struct { func (x *Conversation_QualityMetadata) Reset() { *x = Conversation_QualityMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_QualityMetadata) String() string { @@ -5905,7 +5795,7 @@ func (*Conversation_QualityMetadata) ProtoMessage() {} func (x *Conversation_QualityMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5960,11 +5850,9 @@ type Conversation_Transcript struct { func (x *Conversation_Transcript) Reset() { *x = Conversation_Transcript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Transcript) String() string { @@ -5975,7 +5863,7 @@ func (*Conversation_Transcript) ProtoMessage() {} func (x *Conversation_Transcript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6016,11 +5904,9 @@ type Conversation_QualityMetadata_AgentInfo struct { func (x *Conversation_QualityMetadata_AgentInfo) Reset() { *x = Conversation_QualityMetadata_AgentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_QualityMetadata_AgentInfo) String() string { @@ -6031,7 +5917,7 @@ func (*Conversation_QualityMetadata_AgentInfo) ProtoMessage() {} func (x *Conversation_QualityMetadata_AgentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6108,11 +5994,9 @@ type Conversation_Transcript_TranscriptSegment struct { func (x *Conversation_Transcript_TranscriptSegment) Reset() { *x = Conversation_Transcript_TranscriptSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Transcript_TranscriptSegment) String() string { @@ -6123,7 +6007,7 @@ func (*Conversation_Transcript_TranscriptSegment) ProtoMessage() {} func (x *Conversation_Transcript_TranscriptSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6222,11 +6106,9 @@ type Conversation_Transcript_TranscriptSegment_WordInfo struct { func (x *Conversation_Transcript_TranscriptSegment_WordInfo) Reset() { *x = Conversation_Transcript_TranscriptSegment_WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Transcript_TranscriptSegment_WordInfo) String() string { @@ -6237,7 +6119,7 @@ func (*Conversation_Transcript_TranscriptSegment_WordInfo) ProtoMessage() {} func (x *Conversation_Transcript_TranscriptSegment_WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6293,11 +6175,9 @@ type Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata struct func (x *Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata) Reset() { *x = Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata) String() string { @@ -6308,7 +6188,7 @@ func (*Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata) Prot func (x *Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6356,11 +6236,9 @@ type AnalysisResult_CallAnalysisMetadata struct { func (x *AnalysisResult_CallAnalysisMetadata) Reset() { *x = AnalysisResult_CallAnalysisMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalysisResult_CallAnalysisMetadata) String() string { @@ -6371,7 +6249,7 @@ func (*AnalysisResult_CallAnalysisMetadata) ProtoMessage() {} func (x *AnalysisResult_CallAnalysisMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6463,11 +6341,9 @@ type IssueModel_InputDataConfig struct { func (x *IssueModel_InputDataConfig) Reset() { *x = IssueModel_InputDataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueModel_InputDataConfig) String() string { @@ -6478,7 +6354,7 @@ func (*IssueModel_InputDataConfig) ProtoMessage() {} func (x *IssueModel_InputDataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6533,11 +6409,9 @@ type IssueModelLabelStats_IssueStats struct { func (x *IssueModelLabelStats_IssueStats) Reset() { *x = IssueModelLabelStats_IssueStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IssueModelLabelStats_IssueStats) String() string { @@ -6548,7 +6422,7 @@ func (*IssueModelLabelStats_IssueStats) ProtoMessage() {} func (x *IssueModelLabelStats_IssueStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6603,11 +6477,9 @@ type Settings_AnalysisConfig struct { func (x *Settings_AnalysisConfig) Reset() { *x = Settings_AnalysisConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings_AnalysisConfig) String() string { @@ -6618,7 +6490,7 @@ func (*Settings_AnalysisConfig) ProtoMessage() {} func (x *Settings_AnalysisConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6672,11 +6544,9 @@ type RuntimeAnnotation_UserInput struct { func (x *RuntimeAnnotation_UserInput) Reset() { *x = RuntimeAnnotation_UserInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeAnnotation_UserInput) String() string { @@ -6687,7 +6557,7 @@ func (*RuntimeAnnotation_UserInput) ProtoMessage() {} func (x *RuntimeAnnotation_UserInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6741,11 +6611,9 @@ type AnnotatorSelector_SummarizationConfig struct { func (x *AnnotatorSelector_SummarizationConfig) Reset() { *x = AnnotatorSelector_SummarizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatorSelector_SummarizationConfig) String() string { @@ -6756,7 +6624,7 @@ func (*AnnotatorSelector_SummarizationConfig) ProtoMessage() {} func (x *AnnotatorSelector_SummarizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6830,11 +6698,9 @@ type AnnotatorSelector_QaConfig struct { func (x *AnnotatorSelector_QaConfig) Reset() { *x = AnnotatorSelector_QaConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatorSelector_QaConfig) String() string { @@ -6845,7 +6711,7 @@ func (*AnnotatorSelector_QaConfig) ProtoMessage() {} func (x *AnnotatorSelector_QaConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6897,11 +6763,9 @@ type AnnotatorSelector_QaConfig_ScorecardList struct { func (x *AnnotatorSelector_QaConfig_ScorecardList) Reset() { *x = AnnotatorSelector_QaConfig_ScorecardList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatorSelector_QaConfig_ScorecardList) String() string { @@ -6912,7 +6776,7 @@ func (*AnnotatorSelector_QaConfig_ScorecardList) ProtoMessage() {} func (x *AnnotatorSelector_QaConfig_ScorecardList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6958,11 +6822,9 @@ type QaQuestion_AnswerChoice struct { func (x *QaQuestion_AnswerChoice) Reset() { *x = QaQuestion_AnswerChoice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaQuestion_AnswerChoice) String() string { @@ -6973,7 +6835,7 @@ func (*QaQuestion_AnswerChoice) ProtoMessage() {} func (x *QaQuestion_AnswerChoice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7085,11 +6947,9 @@ type QaQuestion_Metrics struct { func (x *QaQuestion_Metrics) Reset() { *x = QaQuestion_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaQuestion_Metrics) String() string { @@ -7100,7 +6960,7 @@ func (*QaQuestion_Metrics) ProtoMessage() {} func (x *QaQuestion_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7142,11 +7002,9 @@ type QaQuestion_TuningMetadata struct { func (x *QaQuestion_TuningMetadata) Reset() { *x = QaQuestion_TuningMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaQuestion_TuningMetadata) String() string { @@ -7157,7 +7015,7 @@ func (*QaQuestion_TuningMetadata) ProtoMessage() {} func (x *QaQuestion_TuningMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7225,11 +7083,9 @@ type QaAnswer_AnswerValue struct { func (x *QaAnswer_AnswerValue) Reset() { *x = QaAnswer_AnswerValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaAnswer_AnswerValue) String() string { @@ -7240,7 +7096,7 @@ func (*QaAnswer_AnswerValue) ProtoMessage() {} func (x *QaAnswer_AnswerValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7366,11 +7222,9 @@ type QaAnswer_AnswerSource struct { func (x *QaAnswer_AnswerSource) Reset() { *x = QaAnswer_AnswerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaAnswer_AnswerSource) String() string { @@ -7381,7 +7235,7 @@ func (*QaAnswer_AnswerSource) ProtoMessage() {} func (x *QaAnswer_AnswerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7428,11 +7282,9 @@ type QaScorecardResult_QaTagResult struct { func (x *QaScorecardResult_QaTagResult) Reset() { *x = QaScorecardResult_QaTagResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaScorecardResult_QaTagResult) String() string { @@ -7443,7 +7295,7 @@ func (*QaScorecardResult_QaTagResult) ProtoMessage() {} func (x *QaScorecardResult_QaTagResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7509,11 +7361,9 @@ type QaScorecardResult_ScoreSource struct { func (x *QaScorecardResult_ScoreSource) Reset() { *x = QaScorecardResult_ScoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QaScorecardResult_ScoreSource) String() string { @@ -7524,7 +7374,7 @@ func (*QaScorecardResult_ScoreSource) ProtoMessage() {} func (x *QaScorecardResult_ScoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9636,908 +9486,6 @@ func file_google_cloud_contactcenterinsights_v1_resources_proto_init() { if File_google_cloud_contactcenterinsights_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Analysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ConversationDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DialogflowSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*IssueModelResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FeedbackLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ConversationLevelSentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ConversationLevelSilence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*IssueAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CallAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationBoundary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PhraseMatchData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DialogflowIntent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*InterruptionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SilenceData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*HoldData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*EntityMentionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*IntentMatchData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SentimentData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*IssueMatchData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*IssueModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Issue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*IssueModelLabelStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*PhraseMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*PhraseMatchRuleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*PhraseMatchRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*PhraseMatchRuleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ExactMatchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AnalysisRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*RedactionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*SpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ArticleSuggestionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*FaqAnswerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SmartComposeSuggestionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*DialogflowInteractionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ConversationSummarizationSuggestionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ConversationParticipant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*View); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatorSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*QaQuestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*QaScorecard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*QaScorecardRevision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*QaAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*QaScorecardResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_CallMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_QualityMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Transcript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_QualityMetadata_AgentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Transcript_TranscriptSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Transcript_TranscriptSegment_WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Transcript_TranscriptSegment_DialogflowSegmentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*AnalysisResult_CallAnalysisMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*IssueModel_InputDataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*IssueModelLabelStats_IssueStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*Settings_AnalysisConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeAnnotation_UserInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatorSelector_SummarizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatorSelector_QaConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatorSelector_QaConfig_ScorecardList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*QaQuestion_AnswerChoice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*QaQuestion_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*QaQuestion_TuningMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*QaAnswer_AnswerValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*QaAnswer_AnswerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*QaScorecardResult_QaTagResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*QaScorecardResult_ScoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_contactcenterinsights_v1_resources_proto_msgTypes[0].OneofWrappers = []any{ (*Conversation_CallMetadata_)(nil), (*Conversation_ExpireTime)(nil), diff --git a/contactcenterinsights/apiv1/helpers.go b/contactcenterinsights/apiv1/helpers.go index ba6e89280ae4..cf0fedc3e3d6 100755 --- a/contactcenterinsights/apiv1/helpers.go +++ b/contactcenterinsights/apiv1/helpers.go @@ -18,10 +18,20 @@ package contactcenterinsights import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "contactcenterinsights.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/container/apiv1/cluster_manager_client.go b/container/apiv1/cluster_manager_client.go index 1443b546138c..e40a44328638 100755 --- a/container/apiv1/cluster_manager_client.go +++ b/container/apiv1/cluster_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( containerpb "cloud.google.com/go/container/apiv1/containerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -760,6 +759,8 @@ type clusterManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClusterManagerClient creates a new cluster manager client based on gRPC. @@ -786,6 +787,7 @@ func NewClusterManagerClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, clusterManagerClient: containerpb.NewClusterManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -832,6 +834,8 @@ type clusterManagerRESTClient struct { // Points back to the CallOptions field of the containing ClusterManagerClient CallOptions **ClusterManagerCallOptions + + logger *slog.Logger } // NewClusterManagerRESTClient creates a new cluster manager rest client. @@ -849,6 +853,7 @@ func NewClusterManagerRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -901,7 +906,7 @@ func (c *clusterManagerGRPCClient) ListClusters(ctx context.Context, req *contai var resp *containerpb.ListClustersResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -919,7 +924,7 @@ func (c *clusterManagerGRPCClient) GetCluster(ctx context.Context, req *containe var resp *containerpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -937,7 +942,7 @@ func (c *clusterManagerGRPCClient) CreateCluster(ctx context.Context, req *conta var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *clusterManagerGRPCClient) UpdateCluster(ctx context.Context, req *conta var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *clusterManagerGRPCClient) UpdateNodePool(ctx context.Context, req *cont var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.UpdateNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateNodePool, req, settings.GRPC, c.logger, "UpdateNodePool") return err }, opts...) if err != nil { @@ -991,7 +996,7 @@ func (c *clusterManagerGRPCClient) SetNodePoolAutoscaling(ctx context.Context, r var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetNodePoolAutoscaling(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolAutoscaling, req, settings.GRPC, c.logger, "SetNodePoolAutoscaling") return err }, opts...) if err != nil { @@ -1009,7 +1014,7 @@ func (c *clusterManagerGRPCClient) SetLoggingService(ctx context.Context, req *c var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetLoggingService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetLoggingService, req, settings.GRPC, c.logger, "SetLoggingService") return err }, opts...) if err != nil { @@ -1027,7 +1032,7 @@ func (c *clusterManagerGRPCClient) SetMonitoringService(ctx context.Context, req var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetMonitoringService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetMonitoringService, req, settings.GRPC, c.logger, "SetMonitoringService") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *clusterManagerGRPCClient) SetAddonsConfig(ctx context.Context, req *con var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetAddonsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetAddonsConfig, req, settings.GRPC, c.logger, "SetAddonsConfig") return err }, opts...) if err != nil { @@ -1063,7 +1068,7 @@ func (c *clusterManagerGRPCClient) SetLocations(ctx context.Context, req *contai var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetLocations, req, settings.GRPC, c.logger, "SetLocations") return err }, opts...) if err != nil { @@ -1081,7 +1086,7 @@ func (c *clusterManagerGRPCClient) UpdateMaster(ctx context.Context, req *contai var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.UpdateMaster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.UpdateMaster, req, settings.GRPC, c.logger, "UpdateMaster") return err }, opts...) if err != nil { @@ -1099,7 +1104,7 @@ func (c *clusterManagerGRPCClient) SetMasterAuth(ctx context.Context, req *conta var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetMasterAuth(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetMasterAuth, req, settings.GRPC, c.logger, "SetMasterAuth") return err }, opts...) if err != nil { @@ -1117,7 +1122,7 @@ func (c *clusterManagerGRPCClient) DeleteCluster(ctx context.Context, req *conta var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -1135,7 +1140,7 @@ func (c *clusterManagerGRPCClient) ListOperations(ctx context.Context, req *cont var resp *containerpb.ListOperationsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1153,7 +1158,7 @@ func (c *clusterManagerGRPCClient) GetOperation(ctx context.Context, req *contai var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *clusterManagerGRPCClient) CancelOperation(ctx context.Context, req *con opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.clusterManagerClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.clusterManagerClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1185,7 +1190,7 @@ func (c *clusterManagerGRPCClient) GetServerConfig(ctx context.Context, req *con var resp *containerpb.ServerConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.GetServerConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.GetServerConfig, req, settings.GRPC, c.logger, "GetServerConfig") return err }, opts...) if err != nil { @@ -1203,7 +1208,7 @@ func (c *clusterManagerGRPCClient) GetJSONWebKeys(ctx context.Context, req *cont var resp *containerpb.GetJSONWebKeysResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.GetJSONWebKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.GetJSONWebKeys, req, settings.GRPC, c.logger, "GetJSONWebKeys") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *clusterManagerGRPCClient) ListNodePools(ctx context.Context, req *conta var resp *containerpb.ListNodePoolsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.ListNodePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.ListNodePools, req, settings.GRPC, c.logger, "ListNodePools") return err }, opts...) if err != nil { @@ -1239,7 +1244,7 @@ func (c *clusterManagerGRPCClient) GetNodePool(ctx context.Context, req *contain var resp *containerpb.NodePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.GetNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.GetNodePool, req, settings.GRPC, c.logger, "GetNodePool") return err }, opts...) if err != nil { @@ -1257,7 +1262,7 @@ func (c *clusterManagerGRPCClient) CreateNodePool(ctx context.Context, req *cont var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.CreateNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.CreateNodePool, req, settings.GRPC, c.logger, "CreateNodePool") return err }, opts...) if err != nil { @@ -1275,7 +1280,7 @@ func (c *clusterManagerGRPCClient) DeleteNodePool(ctx context.Context, req *cont var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.DeleteNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.DeleteNodePool, req, settings.GRPC, c.logger, "DeleteNodePool") return err }, opts...) if err != nil { @@ -1292,7 +1297,7 @@ func (c *clusterManagerGRPCClient) CompleteNodePoolUpgrade(ctx context.Context, opts = append((*c.CallOptions).CompleteNodePoolUpgrade[0:len((*c.CallOptions).CompleteNodePoolUpgrade):len((*c.CallOptions).CompleteNodePoolUpgrade)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.clusterManagerClient.CompleteNodePoolUpgrade(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.clusterManagerClient.CompleteNodePoolUpgrade, req, settings.GRPC, c.logger, "CompleteNodePoolUpgrade") return err }, opts...) return err @@ -1307,7 +1312,7 @@ func (c *clusterManagerGRPCClient) RollbackNodePoolUpgrade(ctx context.Context, var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.RollbackNodePoolUpgrade(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.RollbackNodePoolUpgrade, req, settings.GRPC, c.logger, "RollbackNodePoolUpgrade") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *clusterManagerGRPCClient) SetNodePoolManagement(ctx context.Context, re var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetNodePoolManagement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolManagement, req, settings.GRPC, c.logger, "SetNodePoolManagement") return err }, opts...) if err != nil { @@ -1343,7 +1348,7 @@ func (c *clusterManagerGRPCClient) SetLabels(ctx context.Context, req *container var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetLabels, req, settings.GRPC, c.logger, "SetLabels") return err }, opts...) if err != nil { @@ -1361,7 +1366,7 @@ func (c *clusterManagerGRPCClient) SetLegacyAbac(ctx context.Context, req *conta var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetLegacyAbac(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetLegacyAbac, req, settings.GRPC, c.logger, "SetLegacyAbac") return err }, opts...) if err != nil { @@ -1379,7 +1384,7 @@ func (c *clusterManagerGRPCClient) StartIPRotation(ctx context.Context, req *con var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.StartIPRotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.StartIPRotation, req, settings.GRPC, c.logger, "StartIPRotation") return err }, opts...) if err != nil { @@ -1397,7 +1402,7 @@ func (c *clusterManagerGRPCClient) CompleteIPRotation(ctx context.Context, req * var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.CompleteIPRotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.CompleteIPRotation, req, settings.GRPC, c.logger, "CompleteIPRotation") return err }, opts...) if err != nil { @@ -1415,7 +1420,7 @@ func (c *clusterManagerGRPCClient) SetNodePoolSize(ctx context.Context, req *con var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetNodePoolSize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetNodePoolSize, req, settings.GRPC, c.logger, "SetNodePoolSize") return err }, opts...) if err != nil { @@ -1433,7 +1438,7 @@ func (c *clusterManagerGRPCClient) SetNetworkPolicy(ctx context.Context, req *co var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetNetworkPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetNetworkPolicy, req, settings.GRPC, c.logger, "SetNetworkPolicy") return err }, opts...) if err != nil { @@ -1451,7 +1456,7 @@ func (c *clusterManagerGRPCClient) SetMaintenancePolicy(ctx context.Context, req var resp *containerpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.SetMaintenancePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.SetMaintenancePolicy, req, settings.GRPC, c.logger, "SetMaintenancePolicy") return err }, opts...) if err != nil { @@ -1480,7 +1485,7 @@ func (c *clusterManagerGRPCClient) ListUsableSubnetworks(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.ListUsableSubnetworks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.ListUsableSubnetworks, req, settings.GRPC, c.logger, "ListUsableSubnetworks") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *clusterManagerGRPCClient) CheckAutopilotCompatibility(ctx context.Conte var resp *containerpb.CheckAutopilotCompatibilityResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterManagerClient.CheckAutopilotCompatibility(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterManagerClient.CheckAutopilotCompatibility, req, settings.GRPC, c.logger, "CheckAutopilotCompatibility") return err }, opts...) if err != nil { @@ -1564,17 +1569,7 @@ func (c *clusterManagerRESTClient) ListClusters(ctx context.Context, req *contai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } @@ -1633,17 +1628,7 @@ func (c *clusterManagerRESTClient) GetCluster(ctx context.Context, req *containe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1712,17 +1697,7 @@ func (c *clusterManagerRESTClient) CreateCluster(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } @@ -1778,17 +1753,7 @@ func (c *clusterManagerRESTClient) UpdateCluster(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } @@ -1844,17 +1809,7 @@ func (c *clusterManagerRESTClient) UpdateNodePool(ctx context.Context, req *cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNodePool") if err != nil { return err } @@ -1910,17 +1865,7 @@ func (c *clusterManagerRESTClient) SetNodePoolAutoscaling(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolAutoscaling") if err != nil { return err } @@ -1976,17 +1921,7 @@ func (c *clusterManagerRESTClient) SetLoggingService(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLoggingService") if err != nil { return err } @@ -2042,17 +1977,7 @@ func (c *clusterManagerRESTClient) SetMonitoringService(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMonitoringService") if err != nil { return err } @@ -2108,17 +2033,7 @@ func (c *clusterManagerRESTClient) SetAddonsConfig(ctx context.Context, req *con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetAddonsConfig") if err != nil { return err } @@ -2179,17 +2094,7 @@ func (c *clusterManagerRESTClient) SetLocations(ctx context.Context, req *contai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLocations") if err != nil { return err } @@ -2245,17 +2150,7 @@ func (c *clusterManagerRESTClient) UpdateMaster(ctx context.Context, req *contai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMaster") if err != nil { return err } @@ -2313,17 +2208,7 @@ func (c *clusterManagerRESTClient) SetMasterAuth(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMasterAuth") if err != nil { return err } @@ -2390,17 +2275,7 @@ func (c *clusterManagerRESTClient) DeleteCluster(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } @@ -2456,17 +2331,7 @@ func (c *clusterManagerRESTClient) ListOperations(ctx context.Context, req *cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } @@ -2525,17 +2390,7 @@ func (c *clusterManagerRESTClient) GetOperation(ctx context.Context, req *contai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2588,15 +2443,8 @@ func (c *clusterManagerRESTClient) CancelOperation(ctx context.Context, req *con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2639,17 +2487,7 @@ func (c *clusterManagerRESTClient) GetServerConfig(ctx context.Context, req *con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServerConfig") if err != nil { return err } @@ -2700,17 +2538,7 @@ func (c *clusterManagerRESTClient) GetJSONWebKeys(ctx context.Context, req *cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJSONWebKeys") if err != nil { return err } @@ -2769,17 +2597,7 @@ func (c *clusterManagerRESTClient) ListNodePools(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodePools") if err != nil { return err } @@ -2841,17 +2659,7 @@ func (c *clusterManagerRESTClient) GetNodePool(ctx context.Context, req *contain httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNodePool") if err != nil { return err } @@ -2907,17 +2715,7 @@ func (c *clusterManagerRESTClient) CreateNodePool(ctx context.Context, req *cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNodePool") if err != nil { return err } @@ -2979,17 +2777,7 @@ func (c *clusterManagerRESTClient) DeleteNodePool(ctx context.Context, req *cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNodePool") if err != nil { return err } @@ -3043,15 +2831,8 @@ func (c *clusterManagerRESTClient) CompleteNodePoolUpgrade(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteNodePoolUpgrade") + return err }, opts...) } @@ -3095,17 +2876,7 @@ func (c *clusterManagerRESTClient) RollbackNodePoolUpgrade(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackNodePoolUpgrade") if err != nil { return err } @@ -3161,17 +2932,7 @@ func (c *clusterManagerRESTClient) SetNodePoolManagement(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolManagement") if err != nil { return err } @@ -3227,17 +2988,7 @@ func (c *clusterManagerRESTClient) SetLabels(ctx context.Context, req *container httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLabels") if err != nil { return err } @@ -3293,17 +3044,7 @@ func (c *clusterManagerRESTClient) SetLegacyAbac(ctx context.Context, req *conta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetLegacyAbac") if err != nil { return err } @@ -3359,17 +3100,7 @@ func (c *clusterManagerRESTClient) StartIPRotation(ctx context.Context, req *con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartIPRotation") if err != nil { return err } @@ -3425,17 +3156,7 @@ func (c *clusterManagerRESTClient) CompleteIPRotation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteIPRotation") if err != nil { return err } @@ -3493,17 +3214,7 @@ func (c *clusterManagerRESTClient) SetNodePoolSize(ctx context.Context, req *con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNodePoolSize") if err != nil { return err } @@ -3559,17 +3270,7 @@ func (c *clusterManagerRESTClient) SetNetworkPolicy(ctx context.Context, req *co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetNetworkPolicy") if err != nil { return err } @@ -3625,17 +3326,7 @@ func (c *clusterManagerRESTClient) SetMaintenancePolicy(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMaintenancePolicy") if err != nil { return err } @@ -3700,21 +3391,10 @@ func (c *clusterManagerRESTClient) ListUsableSubnetworks(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableSubnetworks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3778,17 +3458,7 @@ func (c *clusterManagerRESTClient) CheckAutopilotCompatibility(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CheckAutopilotCompatibility") if err != nil { return err } diff --git a/container/apiv1/cluster_manager_client_example_go123_test.go b/container/apiv1/cluster_manager_client_example_go123_test.go index 4123eff826d3..6f20a39474e4 100644 --- a/container/apiv1/cluster_manager_client_example_go123_test.go +++ b/container/apiv1/cluster_manager_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClusterManagerClient_ListUsableSubnetworks_all() { } for resp, err := range c.ListUsableSubnetworks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/container/apiv1/containerpb/cluster_service.pb.go b/container/apiv1/containerpb/cluster_service.pb.go index e1cfe1b9dd0d..a1304591b5ee 100755 --- a/container/apiv1/containerpb/cluster_service.pb.go +++ b/container/apiv1/containerpb/cluster_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/container/v1/cluster_service.proto @@ -3321,11 +3321,9 @@ type LinuxNodeConfig struct { func (x *LinuxNodeConfig) Reset() { *x = LinuxNodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinuxNodeConfig) String() string { @@ -3336,7 +3334,7 @@ func (*LinuxNodeConfig) ProtoMessage() {} func (x *LinuxNodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3386,11 +3384,9 @@ type WindowsNodeConfig struct { func (x *WindowsNodeConfig) Reset() { *x = WindowsNodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsNodeConfig) String() string { @@ -3401,7 +3397,7 @@ func (*WindowsNodeConfig) ProtoMessage() {} func (x *WindowsNodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3470,11 +3466,9 @@ type NodeKubeletConfig struct { func (x *NodeKubeletConfig) Reset() { *x = NodeKubeletConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeKubeletConfig) String() string { @@ -3485,7 +3479,7 @@ func (*NodeKubeletConfig) ProtoMessage() {} func (x *NodeKubeletConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3740,11 +3734,9 @@ type NodeConfig struct { func (x *NodeConfig) Reset() { *x = NodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeConfig) String() string { @@ -3755,7 +3747,7 @@ func (*NodeConfig) ProtoMessage() {} func (x *NodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4080,11 +4072,9 @@ type AdvancedMachineFeatures struct { func (x *AdvancedMachineFeatures) Reset() { *x = AdvancedMachineFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedMachineFeatures) String() string { @@ -4095,7 +4085,7 @@ func (*AdvancedMachineFeatures) ProtoMessage() {} func (x *AdvancedMachineFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4201,11 +4191,9 @@ type NodeNetworkConfig struct { func (x *NodeNetworkConfig) Reset() { *x = NodeNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeNetworkConfig) String() string { @@ -4216,7 +4204,7 @@ func (*NodeNetworkConfig) ProtoMessage() {} func (x *NodeNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4309,11 +4297,9 @@ type AdditionalNodeNetworkConfig struct { func (x *AdditionalNodeNetworkConfig) Reset() { *x = AdditionalNodeNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdditionalNodeNetworkConfig) String() string { @@ -4324,7 +4310,7 @@ func (*AdditionalNodeNetworkConfig) ProtoMessage() {} func (x *AdditionalNodeNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4371,11 +4357,9 @@ type AdditionalPodNetworkConfig struct { func (x *AdditionalPodNetworkConfig) Reset() { *x = AdditionalPodNetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdditionalPodNetworkConfig) String() string { @@ -4386,7 +4370,7 @@ func (*AdditionalPodNetworkConfig) ProtoMessage() {} func (x *AdditionalPodNetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4445,11 +4429,9 @@ type ShieldedInstanceConfig struct { func (x *ShieldedInstanceConfig) Reset() { *x = ShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceConfig) String() string { @@ -4460,7 +4442,7 @@ func (*ShieldedInstanceConfig) ProtoMessage() {} func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4501,11 +4483,9 @@ type SandboxConfig struct { func (x *SandboxConfig) Reset() { *x = SandboxConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SandboxConfig) String() string { @@ -4516,7 +4496,7 @@ func (*SandboxConfig) ProtoMessage() {} func (x *SandboxConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4551,11 +4531,9 @@ type GcfsConfig struct { func (x *GcfsConfig) Reset() { *x = GcfsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcfsConfig) String() string { @@ -4566,7 +4544,7 @@ func (*GcfsConfig) ProtoMessage() {} func (x *GcfsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4609,11 +4587,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -4624,7 +4600,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4673,11 +4649,9 @@ type SoleTenantConfig struct { func (x *SoleTenantConfig) Reset() { *x = SoleTenantConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoleTenantConfig) String() string { @@ -4688,7 +4662,7 @@ func (*SoleTenantConfig) ProtoMessage() {} func (x *SoleTenantConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4723,11 +4697,9 @@ type ContainerdConfig struct { func (x *ContainerdConfig) Reset() { *x = ContainerdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerdConfig) String() string { @@ -4738,7 +4710,7 @@ func (*ContainerdConfig) ProtoMessage() {} func (x *ContainerdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4781,11 +4753,9 @@ type NodeTaint struct { func (x *NodeTaint) Reset() { *x = NodeTaint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTaint) String() string { @@ -4796,7 +4766,7 @@ func (*NodeTaint) ProtoMessage() {} func (x *NodeTaint) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4845,11 +4815,9 @@ type NodeTaints struct { func (x *NodeTaints) Reset() { *x = NodeTaints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTaints) String() string { @@ -4860,7 +4828,7 @@ func (*NodeTaints) ProtoMessage() {} func (x *NodeTaints) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4895,11 +4863,9 @@ type NodeLabels struct { func (x *NodeLabels) Reset() { *x = NodeLabels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeLabels) String() string { @@ -4910,7 +4876,7 @@ func (*NodeLabels) ProtoMessage() {} func (x *NodeLabels) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4945,11 +4911,9 @@ type ResourceLabels struct { func (x *ResourceLabels) Reset() { *x = ResourceLabels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceLabels) String() string { @@ -4960,7 +4924,7 @@ func (*ResourceLabels) ProtoMessage() {} func (x *ResourceLabels) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4995,11 +4959,9 @@ type NetworkTags struct { func (x *NetworkTags) Reset() { *x = NetworkTags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkTags) String() string { @@ -5010,7 +4972,7 @@ func (*NetworkTags) ProtoMessage() {} func (x *NetworkTags) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5081,11 +5043,9 @@ type MasterAuth struct { func (x *MasterAuth) Reset() { *x = MasterAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuth) String() string { @@ -5096,7 +5056,7 @@ func (*MasterAuth) ProtoMessage() {} func (x *MasterAuth) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5167,11 +5127,9 @@ type ClientCertificateConfig struct { func (x *ClientCertificateConfig) Reset() { *x = ClientCertificateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientCertificateConfig) String() string { @@ -5182,7 +5140,7 @@ func (*ClientCertificateConfig) ProtoMessage() {} func (x *ClientCertificateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5256,11 +5214,9 @@ type AddonsConfig struct { func (x *AddonsConfig) Reset() { *x = AddonsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddonsConfig) String() string { @@ -5271,7 +5227,7 @@ func (*AddonsConfig) ProtoMessage() {} func (x *AddonsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5400,11 +5356,9 @@ type HttpLoadBalancing struct { func (x *HttpLoadBalancing) Reset() { *x = HttpLoadBalancing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpLoadBalancing) String() string { @@ -5415,7 +5369,7 @@ func (*HttpLoadBalancing) ProtoMessage() {} func (x *HttpLoadBalancing) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5453,11 +5407,9 @@ type HorizontalPodAutoscaling struct { func (x *HorizontalPodAutoscaling) Reset() { *x = HorizontalPodAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HorizontalPodAutoscaling) String() string { @@ -5468,7 +5420,7 @@ func (*HorizontalPodAutoscaling) ProtoMessage() {} func (x *HorizontalPodAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5502,11 +5454,9 @@ type KubernetesDashboard struct { func (x *KubernetesDashboard) Reset() { *x = KubernetesDashboard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesDashboard) String() string { @@ -5517,7 +5467,7 @@ func (*KubernetesDashboard) ProtoMessage() {} func (x *KubernetesDashboard) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5553,11 +5503,9 @@ type NetworkPolicyConfig struct { func (x *NetworkPolicyConfig) Reset() { *x = NetworkPolicyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPolicyConfig) String() string { @@ -5568,7 +5516,7 @@ func (*NetworkPolicyConfig) ProtoMessage() {} func (x *NetworkPolicyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5602,11 +5550,9 @@ type DnsCacheConfig struct { func (x *DnsCacheConfig) Reset() { *x = DnsCacheConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsCacheConfig) String() string { @@ -5617,7 +5563,7 @@ func (*DnsCacheConfig) ProtoMessage() {} func (x *DnsCacheConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5651,11 +5597,9 @@ type PrivateClusterMasterGlobalAccessConfig struct { func (x *PrivateClusterMasterGlobalAccessConfig) Reset() { *x = PrivateClusterMasterGlobalAccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateClusterMasterGlobalAccessConfig) String() string { @@ -5666,7 +5610,7 @@ func (*PrivateClusterMasterGlobalAccessConfig) ProtoMessage() {} func (x *PrivateClusterMasterGlobalAccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5757,11 +5701,9 @@ type PrivateClusterConfig struct { func (x *PrivateClusterConfig) Reset() { *x = PrivateClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateClusterConfig) String() string { @@ -5772,7 +5714,7 @@ func (*PrivateClusterConfig) ProtoMessage() {} func (x *PrivateClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5865,11 +5807,9 @@ type AuthenticatorGroupsConfig struct { func (x *AuthenticatorGroupsConfig) Reset() { *x = AuthenticatorGroupsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthenticatorGroupsConfig) String() string { @@ -5880,7 +5820,7 @@ func (*AuthenticatorGroupsConfig) ProtoMessage() {} func (x *AuthenticatorGroupsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5923,11 +5863,9 @@ type CloudRunConfig struct { func (x *CloudRunConfig) Reset() { *x = CloudRunConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunConfig) String() string { @@ -5938,7 +5876,7 @@ func (*CloudRunConfig) ProtoMessage() {} func (x *CloudRunConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5979,11 +5917,9 @@ type ConfigConnectorConfig struct { func (x *ConfigConnectorConfig) Reset() { *x = ConfigConnectorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigConnectorConfig) String() string { @@ -5994,7 +5930,7 @@ func (*ConfigConnectorConfig) ProtoMessage() {} func (x *ConfigConnectorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6028,11 +5964,9 @@ type GcePersistentDiskCsiDriverConfig struct { func (x *GcePersistentDiskCsiDriverConfig) Reset() { *x = GcePersistentDiskCsiDriverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcePersistentDiskCsiDriverConfig) String() string { @@ -6043,7 +5977,7 @@ func (*GcePersistentDiskCsiDriverConfig) ProtoMessage() {} func (x *GcePersistentDiskCsiDriverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6077,11 +6011,9 @@ type GcpFilestoreCsiDriverConfig struct { func (x *GcpFilestoreCsiDriverConfig) Reset() { *x = GcpFilestoreCsiDriverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpFilestoreCsiDriverConfig) String() string { @@ -6092,7 +6024,7 @@ func (*GcpFilestoreCsiDriverConfig) ProtoMessage() {} func (x *GcpFilestoreCsiDriverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6126,11 +6058,9 @@ type GcsFuseCsiDriverConfig struct { func (x *GcsFuseCsiDriverConfig) Reset() { *x = GcsFuseCsiDriverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFuseCsiDriverConfig) String() string { @@ -6141,7 +6071,7 @@ func (*GcsFuseCsiDriverConfig) ProtoMessage() {} func (x *GcsFuseCsiDriverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6176,11 +6106,9 @@ type ParallelstoreCsiDriverConfig struct { func (x *ParallelstoreCsiDriverConfig) Reset() { *x = ParallelstoreCsiDriverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParallelstoreCsiDriverConfig) String() string { @@ -6191,7 +6119,7 @@ func (*ParallelstoreCsiDriverConfig) ProtoMessage() {} func (x *ParallelstoreCsiDriverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6229,11 +6157,9 @@ type RayOperatorConfig struct { func (x *RayOperatorConfig) Reset() { *x = RayOperatorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayOperatorConfig) String() string { @@ -6244,7 +6170,7 @@ func (*RayOperatorConfig) ProtoMessage() {} func (x *RayOperatorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6292,11 +6218,9 @@ type GkeBackupAgentConfig struct { func (x *GkeBackupAgentConfig) Reset() { *x = GkeBackupAgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeBackupAgentConfig) String() string { @@ -6307,7 +6231,7 @@ func (*GkeBackupAgentConfig) ProtoMessage() {} func (x *GkeBackupAgentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6341,11 +6265,9 @@ type StatefulHAConfig struct { func (x *StatefulHAConfig) Reset() { *x = StatefulHAConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatefulHAConfig) String() string { @@ -6356,7 +6278,7 @@ func (*StatefulHAConfig) ProtoMessage() {} func (x *StatefulHAConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6400,11 +6322,9 @@ type MasterAuthorizedNetworksConfig struct { func (x *MasterAuthorizedNetworksConfig) Reset() { *x = MasterAuthorizedNetworksConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig) String() string { @@ -6415,7 +6335,7 @@ func (*MasterAuthorizedNetworksConfig) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6474,11 +6394,9 @@ type LegacyAbac struct { func (x *LegacyAbac) Reset() { *x = LegacyAbac{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LegacyAbac) String() string { @@ -6489,7 +6407,7 @@ func (*LegacyAbac) ProtoMessage() {} func (x *LegacyAbac) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6526,11 +6444,9 @@ type NetworkPolicy struct { func (x *NetworkPolicy) Reset() { *x = NetworkPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPolicy) String() string { @@ -6541,7 +6457,7 @@ func (*NetworkPolicy) ProtoMessage() {} func (x *NetworkPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6589,11 +6505,9 @@ type BinaryAuthorization struct { func (x *BinaryAuthorization) Reset() { *x = BinaryAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BinaryAuthorization) String() string { @@ -6604,7 +6518,7 @@ func (*BinaryAuthorization) ProtoMessage() {} func (x *BinaryAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6648,11 +6562,9 @@ type PodCIDROverprovisionConfig struct { func (x *PodCIDROverprovisionConfig) Reset() { *x = PodCIDROverprovisionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PodCIDROverprovisionConfig) String() string { @@ -6663,7 +6575,7 @@ func (*PodCIDROverprovisionConfig) ProtoMessage() {} func (x *PodCIDROverprovisionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6834,11 +6746,9 @@ type IPAllocationPolicy struct { func (x *IPAllocationPolicy) Reset() { *x = IPAllocationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IPAllocationPolicy) String() string { @@ -6849,7 +6759,7 @@ func (*IPAllocationPolicy) ProtoMessage() {} func (x *IPAllocationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7317,11 +7227,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -7332,7 +7240,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7890,11 +7798,9 @@ type RBACBindingConfig struct { func (x *RBACBindingConfig) Reset() { *x = RBACBindingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RBACBindingConfig) String() string { @@ -7905,7 +7811,7 @@ func (*RBACBindingConfig) ProtoMessage() {} func (x *RBACBindingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7975,11 +7881,9 @@ type UserManagedKeysConfig struct { func (x *UserManagedKeysConfig) Reset() { *x = UserManagedKeysConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserManagedKeysConfig) String() string { @@ -7990,7 +7894,7 @@ func (*UserManagedKeysConfig) ProtoMessage() {} func (x *UserManagedKeysConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8076,11 +7980,9 @@ type CompliancePostureConfig struct { func (x *CompliancePostureConfig) Reset() { *x = CompliancePostureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompliancePostureConfig) String() string { @@ -8091,7 +7993,7 @@ func (*CompliancePostureConfig) ProtoMessage() {} func (x *CompliancePostureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8132,11 +8034,9 @@ type K8SBetaAPIConfig struct { func (x *K8SBetaAPIConfig) Reset() { *x = K8SBetaAPIConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *K8SBetaAPIConfig) String() string { @@ -8147,7 +8047,7 @@ func (*K8SBetaAPIConfig) ProtoMessage() {} func (x *K8SBetaAPIConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8184,11 +8084,9 @@ type SecurityPostureConfig struct { func (x *SecurityPostureConfig) Reset() { *x = SecurityPostureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPostureConfig) String() string { @@ -8199,7 +8097,7 @@ func (*SecurityPostureConfig) ProtoMessage() {} func (x *SecurityPostureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8253,11 +8151,9 @@ type NodePoolAutoConfig struct { func (x *NodePoolAutoConfig) Reset() { *x = NodePoolAutoConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePoolAutoConfig) String() string { @@ -8268,7 +8164,7 @@ func (*NodePoolAutoConfig) ProtoMessage() {} func (x *NodePoolAutoConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8323,11 +8219,9 @@ type NodePoolDefaults struct { func (x *NodePoolDefaults) Reset() { *x = NodePoolDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePoolDefaults) String() string { @@ -8338,7 +8232,7 @@ func (*NodePoolDefaults) ProtoMessage() {} func (x *NodePoolDefaults) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8380,11 +8274,9 @@ type NodeConfigDefaults struct { func (x *NodeConfigDefaults) Reset() { *x = NodeConfigDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeConfigDefaults) String() string { @@ -8395,7 +8287,7 @@ func (*NodeConfigDefaults) ProtoMessage() {} func (x *NodeConfigDefaults) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8675,11 +8567,9 @@ type ClusterUpdate struct { func (x *ClusterUpdate) Reset() { *x = ClusterUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterUpdate) String() string { @@ -8690,7 +8580,7 @@ func (*ClusterUpdate) ProtoMessage() {} func (x *ClusterUpdate) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9171,11 +9061,9 @@ type AdditionalPodRangesConfig struct { func (x *AdditionalPodRangesConfig) Reset() { *x = AdditionalPodRangesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdditionalPodRangesConfig) String() string { @@ -9186,7 +9074,7 @@ func (*AdditionalPodRangesConfig) ProtoMessage() {} func (x *AdditionalPodRangesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9229,11 +9117,9 @@ type RangeInfo struct { func (x *RangeInfo) Reset() { *x = RangeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RangeInfo) String() string { @@ -9244,7 +9130,7 @@ func (*RangeInfo) ProtoMessage() {} func (x *RangeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9285,11 +9171,9 @@ type DesiredEnterpriseConfig struct { func (x *DesiredEnterpriseConfig) Reset() { *x = DesiredEnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DesiredEnterpriseConfig) String() string { @@ -9300,7 +9184,7 @@ func (*DesiredEnterpriseConfig) ProtoMessage() {} func (x *DesiredEnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9397,11 +9281,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -9412,7 +9294,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9564,11 +9446,9 @@ type OperationProgress struct { func (x *OperationProgress) Reset() { *x = OperationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationProgress) String() string { @@ -9579,7 +9459,7 @@ func (*OperationProgress) ProtoMessage() {} func (x *OperationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9651,11 +9531,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -9666,7 +9544,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9742,11 +9620,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -9757,7 +9633,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9836,11 +9712,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -9851,7 +9725,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10037,11 +9911,9 @@ type UpdateNodePoolRequest struct { func (x *UpdateNodePoolRequest) Reset() { *x = UpdateNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNodePoolRequest) String() string { @@ -10052,7 +9924,7 @@ func (*UpdateNodePoolRequest) ProtoMessage() {} func (x *UpdateNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10334,11 +10206,9 @@ type SetNodePoolAutoscalingRequest struct { func (x *SetNodePoolAutoscalingRequest) Reset() { *x = SetNodePoolAutoscalingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNodePoolAutoscalingRequest) String() string { @@ -10349,7 +10219,7 @@ func (*SetNodePoolAutoscalingRequest) ProtoMessage() {} func (x *SetNodePoolAutoscalingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10453,11 +10323,9 @@ type SetLoggingServiceRequest struct { func (x *SetLoggingServiceRequest) Reset() { *x = SetLoggingServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLoggingServiceRequest) String() string { @@ -10468,7 +10336,7 @@ func (*SetLoggingServiceRequest) ProtoMessage() {} func (x *SetLoggingServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10564,11 +10432,9 @@ type SetMonitoringServiceRequest struct { func (x *SetMonitoringServiceRequest) Reset() { *x = SetMonitoringServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMonitoringServiceRequest) String() string { @@ -10579,7 +10445,7 @@ func (*SetMonitoringServiceRequest) ProtoMessage() {} func (x *SetMonitoringServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10666,11 +10532,9 @@ type SetAddonsConfigRequest struct { func (x *SetAddonsConfigRequest) Reset() { *x = SetAddonsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetAddonsConfigRequest) String() string { @@ -10681,7 +10545,7 @@ func (*SetAddonsConfigRequest) ProtoMessage() {} func (x *SetAddonsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10773,11 +10637,9 @@ type SetLocationsRequest struct { func (x *SetLocationsRequest) Reset() { *x = SetLocationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLocationsRequest) String() string { @@ -10788,7 +10650,7 @@ func (*SetLocationsRequest) ProtoMessage() {} func (x *SetLocationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10883,11 +10745,9 @@ type UpdateMasterRequest struct { func (x *UpdateMasterRequest) Reset() { *x = UpdateMasterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMasterRequest) String() string { @@ -10898,7 +10758,7 @@ func (*UpdateMasterRequest) ProtoMessage() {} func (x *UpdateMasterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10986,11 +10846,9 @@ type SetMasterAuthRequest struct { func (x *SetMasterAuthRequest) Reset() { *x = SetMasterAuthRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMasterAuthRequest) String() string { @@ -11001,7 +10859,7 @@ func (*SetMasterAuthRequest) ProtoMessage() {} func (x *SetMasterAuthRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11092,11 +10950,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -11107,7 +10963,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11180,11 +11036,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -11195,7 +11049,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11249,11 +11103,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -11264,7 +11116,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11324,11 +11176,9 @@ type GetOperationRequest struct { func (x *GetOperationRequest) Reset() { *x = GetOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOperationRequest) String() string { @@ -11339,7 +11189,7 @@ func (*GetOperationRequest) ProtoMessage() {} func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11412,11 +11262,9 @@ type ListOperationsRequest struct { func (x *ListOperationsRequest) Reset() { *x = ListOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsRequest) String() string { @@ -11427,7 +11275,7 @@ func (*ListOperationsRequest) ProtoMessage() {} func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11496,11 +11344,9 @@ type CancelOperationRequest struct { func (x *CancelOperationRequest) Reset() { *x = CancelOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOperationRequest) String() string { @@ -11511,7 +11357,7 @@ func (*CancelOperationRequest) ProtoMessage() {} func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11572,11 +11418,9 @@ type ListOperationsResponse struct { func (x *ListOperationsResponse) Reset() { *x = ListOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsResponse) String() string { @@ -11587,7 +11431,7 @@ func (*ListOperationsResponse) ProtoMessage() {} func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11642,11 +11486,9 @@ type GetServerConfigRequest struct { func (x *GetServerConfigRequest) Reset() { *x = GetServerConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServerConfigRequest) String() string { @@ -11657,7 +11499,7 @@ func (*GetServerConfigRequest) ProtoMessage() {} func (x *GetServerConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11717,11 +11559,9 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerConfig) String() string { @@ -11732,7 +11572,7 @@ func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11823,11 +11663,9 @@ type CreateNodePoolRequest struct { func (x *CreateNodePoolRequest) Reset() { *x = CreateNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNodePoolRequest) String() string { @@ -11838,7 +11676,7 @@ func (*CreateNodePoolRequest) ProtoMessage() {} func (x *CreateNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11928,11 +11766,9 @@ type DeleteNodePoolRequest struct { func (x *DeleteNodePoolRequest) Reset() { *x = DeleteNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodePoolRequest) String() string { @@ -11943,7 +11779,7 @@ func (*DeleteNodePoolRequest) ProtoMessage() {} func (x *DeleteNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12028,11 +11864,9 @@ type ListNodePoolsRequest struct { func (x *ListNodePoolsRequest) Reset() { *x = ListNodePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodePoolsRequest) String() string { @@ -12043,7 +11877,7 @@ func (*ListNodePoolsRequest) ProtoMessage() {} func (x *ListNodePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12126,11 +11960,9 @@ type GetNodePoolRequest struct { func (x *GetNodePoolRequest) Reset() { *x = GetNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodePoolRequest) String() string { @@ -12141,7 +11973,7 @@ func (*GetNodePoolRequest) ProtoMessage() {} func (x *GetNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12214,11 +12046,9 @@ type BlueGreenSettings struct { func (x *BlueGreenSettings) Reset() { *x = BlueGreenSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlueGreenSettings) String() string { @@ -12229,7 +12059,7 @@ func (*BlueGreenSettings) ProtoMessage() {} func (x *BlueGreenSettings) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12361,11 +12191,9 @@ type NodePool struct { func (x *NodePool) Reset() { *x = NodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool) String() string { @@ -12376,7 +12204,7 @@ func (*NodePool) ProtoMessage() {} func (x *NodePool) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12561,11 +12389,9 @@ type NodeManagement struct { func (x *NodeManagement) Reset() { *x = NodeManagement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeManagement) String() string { @@ -12576,7 +12402,7 @@ func (*NodeManagement) ProtoMessage() {} func (x *NodeManagement) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12630,11 +12456,9 @@ type BestEffortProvisioning struct { func (x *BestEffortProvisioning) Reset() { *x = BestEffortProvisioning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BestEffortProvisioning) String() string { @@ -12645,7 +12469,7 @@ func (*BestEffortProvisioning) ProtoMessage() {} func (x *BestEffortProvisioning) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12692,11 +12516,9 @@ type AutoUpgradeOptions struct { func (x *AutoUpgradeOptions) Reset() { *x = AutoUpgradeOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoUpgradeOptions) String() string { @@ -12707,7 +12529,7 @@ func (*AutoUpgradeOptions) ProtoMessage() {} func (x *AutoUpgradeOptions) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12754,11 +12576,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -12769,7 +12589,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12816,11 +12636,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -12831,7 +12649,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12913,11 +12731,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -12928,7 +12744,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12996,11 +12812,9 @@ type MaintenanceExclusionOptions struct { func (x *MaintenanceExclusionOptions) Reset() { *x = MaintenanceExclusionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceExclusionOptions) String() string { @@ -13011,7 +12825,7 @@ func (*MaintenanceExclusionOptions) ProtoMessage() {} func (x *MaintenanceExclusionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13078,11 +12892,9 @@ type RecurringTimeWindow struct { func (x *RecurringTimeWindow) Reset() { *x = RecurringTimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecurringTimeWindow) String() string { @@ -13093,7 +12905,7 @@ func (*RecurringTimeWindow) ProtoMessage() {} func (x *RecurringTimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13141,11 +12953,9 @@ type DailyMaintenanceWindow struct { func (x *DailyMaintenanceWindow) Reset() { *x = DailyMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyMaintenanceWindow) String() string { @@ -13156,7 +12966,7 @@ func (*DailyMaintenanceWindow) ProtoMessage() {} func (x *DailyMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13225,11 +13035,9 @@ type SetNodePoolManagementRequest struct { func (x *SetNodePoolManagementRequest) Reset() { *x = SetNodePoolManagementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNodePoolManagementRequest) String() string { @@ -13240,7 +13048,7 @@ func (*SetNodePoolManagementRequest) ProtoMessage() {} func (x *SetNodePoolManagementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13340,11 +13148,9 @@ type SetNodePoolSizeRequest struct { func (x *SetNodePoolSizeRequest) Reset() { *x = SetNodePoolSizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNodePoolSizeRequest) String() string { @@ -13355,7 +13161,7 @@ func (*SetNodePoolSizeRequest) ProtoMessage() {} func (x *SetNodePoolSizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13431,11 +13237,9 @@ type CompleteNodePoolUpgradeRequest struct { func (x *CompleteNodePoolUpgradeRequest) Reset() { *x = CompleteNodePoolUpgradeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteNodePoolUpgradeRequest) String() string { @@ -13446,7 +13250,7 @@ func (*CompleteNodePoolUpgradeRequest) ProtoMessage() {} func (x *CompleteNodePoolUpgradeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13510,11 +13314,9 @@ type RollbackNodePoolUpgradeRequest struct { func (x *RollbackNodePoolUpgradeRequest) Reset() { *x = RollbackNodePoolUpgradeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackNodePoolUpgradeRequest) String() string { @@ -13525,7 +13327,7 @@ func (*RollbackNodePoolUpgradeRequest) ProtoMessage() {} func (x *RollbackNodePoolUpgradeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13598,11 +13400,9 @@ type ListNodePoolsResponse struct { func (x *ListNodePoolsResponse) Reset() { *x = ListNodePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodePoolsResponse) String() string { @@ -13613,7 +13413,7 @@ func (*ListNodePoolsResponse) ProtoMessage() {} func (x *ListNodePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13662,11 +13462,9 @@ type ClusterAutoscaling struct { func (x *ClusterAutoscaling) Reset() { *x = ClusterAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterAutoscaling) String() string { @@ -13677,7 +13475,7 @@ func (*ClusterAutoscaling) ProtoMessage() {} func (x *ClusterAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13785,11 +13583,9 @@ type AutoprovisioningNodePoolDefaults struct { func (x *AutoprovisioningNodePoolDefaults) Reset() { *x = AutoprovisioningNodePoolDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoprovisioningNodePoolDefaults) String() string { @@ -13800,7 +13596,7 @@ func (*AutoprovisioningNodePoolDefaults) ProtoMessage() {} func (x *AutoprovisioningNodePoolDefaults) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13910,11 +13706,9 @@ type ResourceLimit struct { func (x *ResourceLimit) Reset() { *x = ResourceLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceLimit) String() string { @@ -13925,7 +13719,7 @@ func (*ResourceLimit) ProtoMessage() {} func (x *ResourceLimit) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13994,11 +13788,9 @@ type NodePoolAutoscaling struct { func (x *NodePoolAutoscaling) Reset() { *x = NodePoolAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePoolAutoscaling) String() string { @@ -14009,7 +13801,7 @@ func (*NodePoolAutoscaling) ProtoMessage() {} func (x *NodePoolAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14115,11 +13907,9 @@ type SetLabelsRequest struct { func (x *SetLabelsRequest) Reset() { *x = SetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLabelsRequest) String() string { @@ -14130,7 +13920,7 @@ func (*SetLabelsRequest) ProtoMessage() {} func (x *SetLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14224,11 +14014,9 @@ type SetLegacyAbacRequest struct { func (x *SetLegacyAbacRequest) Reset() { *x = SetLegacyAbacRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetLegacyAbacRequest) String() string { @@ -14239,7 +14027,7 @@ func (*SetLegacyAbacRequest) ProtoMessage() {} func (x *SetLegacyAbacRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14326,11 +14114,9 @@ type StartIPRotationRequest struct { func (x *StartIPRotationRequest) Reset() { *x = StartIPRotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartIPRotationRequest) String() string { @@ -14341,7 +14127,7 @@ func (*StartIPRotationRequest) ProtoMessage() {} func (x *StartIPRotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14425,11 +14211,9 @@ type CompleteIPRotationRequest struct { func (x *CompleteIPRotationRequest) Reset() { *x = CompleteIPRotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteIPRotationRequest) String() string { @@ -14440,7 +14224,7 @@ func (*CompleteIPRotationRequest) ProtoMessage() {} func (x *CompleteIPRotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14509,11 +14293,9 @@ type AcceleratorConfig struct { func (x *AcceleratorConfig) Reset() { *x = AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorConfig) String() string { @@ -14524,7 +14306,7 @@ func (*AcceleratorConfig) ProtoMessage() {} func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14589,11 +14371,9 @@ type GPUSharingConfig struct { func (x *GPUSharingConfig) Reset() { *x = GPUSharingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GPUSharingConfig) String() string { @@ -14604,7 +14384,7 @@ func (*GPUSharingConfig) ProtoMessage() {} func (x *GPUSharingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14646,11 +14426,9 @@ type GPUDriverInstallationConfig struct { func (x *GPUDriverInstallationConfig) Reset() { *x = GPUDriverInstallationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GPUDriverInstallationConfig) String() string { @@ -14661,7 +14439,7 @@ func (*GPUDriverInstallationConfig) ProtoMessage() {} func (x *GPUDriverInstallationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14697,11 +14475,9 @@ type WorkloadMetadataConfig struct { func (x *WorkloadMetadataConfig) Reset() { *x = WorkloadMetadataConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadMetadataConfig) String() string { @@ -14712,7 +14488,7 @@ func (*WorkloadMetadataConfig) ProtoMessage() {} func (x *WorkloadMetadataConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14767,11 +14543,9 @@ type SetNetworkPolicyRequest struct { func (x *SetNetworkPolicyRequest) Reset() { *x = SetNetworkPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetNetworkPolicyRequest) String() string { @@ -14782,7 +14556,7 @@ func (*SetNetworkPolicyRequest) ProtoMessage() {} func (x *SetNetworkPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14861,11 +14635,9 @@ type SetMaintenancePolicyRequest struct { func (x *SetMaintenancePolicyRequest) Reset() { *x = SetMaintenancePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMaintenancePolicyRequest) String() string { @@ -14876,7 +14648,7 @@ func (*SetMaintenancePolicyRequest) ProtoMessage() {} func (x *SetMaintenancePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14946,11 +14718,9 @@ type StatusCondition struct { func (x *StatusCondition) Reset() { *x = StatusCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatusCondition) String() string { @@ -14961,7 +14731,7 @@ func (*StatusCondition) ProtoMessage() {} func (x *StatusCondition) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15060,11 +14830,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -15075,7 +14843,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15214,11 +14982,9 @@ type GatewayAPIConfig struct { func (x *GatewayAPIConfig) Reset() { *x = GatewayAPIConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GatewayAPIConfig) String() string { @@ -15229,7 +14995,7 @@ func (*GatewayAPIConfig) ProtoMessage() {} func (x *GatewayAPIConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15263,11 +15029,9 @@ type ServiceExternalIPsConfig struct { func (x *ServiceExternalIPsConfig) Reset() { *x = ServiceExternalIPsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceExternalIPsConfig) String() string { @@ -15278,7 +15042,7 @@ func (*ServiceExternalIPsConfig) ProtoMessage() {} func (x *ServiceExternalIPsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15314,11 +15078,9 @@ type GetOpenIDConfigRequest struct { func (x *GetOpenIDConfigRequest) Reset() { *x = GetOpenIDConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOpenIDConfigRequest) String() string { @@ -15329,7 +15091,7 @@ func (*GetOpenIDConfigRequest) ProtoMessage() {} func (x *GetOpenIDConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15376,11 +15138,9 @@ type GetOpenIDConfigResponse struct { func (x *GetOpenIDConfigResponse) Reset() { *x = GetOpenIDConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOpenIDConfigResponse) String() string { @@ -15391,7 +15151,7 @@ func (*GetOpenIDConfigResponse) ProtoMessage() {} func (x *GetOpenIDConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15471,11 +15231,9 @@ type GetJSONWebKeysRequest struct { func (x *GetJSONWebKeysRequest) Reset() { *x = GetJSONWebKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJSONWebKeysRequest) String() string { @@ -15486,7 +15244,7 @@ func (*GetJSONWebKeysRequest) ProtoMessage() {} func (x *GetJSONWebKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15536,11 +15294,9 @@ type Jwk struct { func (x *Jwk) Reset() { *x = Jwk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Jwk) String() string { @@ -15551,7 +15307,7 @@ func (*Jwk) ProtoMessage() {} func (x *Jwk) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15642,11 +15398,9 @@ type GetJSONWebKeysResponse struct { func (x *GetJSONWebKeysResponse) Reset() { *x = GetJSONWebKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJSONWebKeysResponse) String() string { @@ -15657,7 +15411,7 @@ func (*GetJSONWebKeysResponse) ProtoMessage() {} func (x *GetJSONWebKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15693,11 +15447,9 @@ type CheckAutopilotCompatibilityRequest struct { func (x *CheckAutopilotCompatibilityRequest) Reset() { *x = CheckAutopilotCompatibilityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckAutopilotCompatibilityRequest) String() string { @@ -15708,7 +15460,7 @@ func (*CheckAutopilotCompatibilityRequest) ProtoMessage() {} func (x *CheckAutopilotCompatibilityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15753,11 +15505,9 @@ type AutopilotCompatibilityIssue struct { func (x *AutopilotCompatibilityIssue) Reset() { *x = AutopilotCompatibilityIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutopilotCompatibilityIssue) String() string { @@ -15768,7 +15518,7 @@ func (*AutopilotCompatibilityIssue) ProtoMessage() {} func (x *AutopilotCompatibilityIssue) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15839,11 +15589,9 @@ type CheckAutopilotCompatibilityResponse struct { func (x *CheckAutopilotCompatibilityResponse) Reset() { *x = CheckAutopilotCompatibilityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckAutopilotCompatibilityResponse) String() string { @@ -15854,7 +15602,7 @@ func (*CheckAutopilotCompatibilityResponse) ProtoMessage() {} func (x *CheckAutopilotCompatibilityResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15900,11 +15648,9 @@ type ReleaseChannel struct { func (x *ReleaseChannel) Reset() { *x = ReleaseChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseChannel) String() string { @@ -15915,7 +15661,7 @@ func (*ReleaseChannel) ProtoMessage() {} func (x *ReleaseChannel) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15949,11 +15695,9 @@ type CostManagementConfig struct { func (x *CostManagementConfig) Reset() { *x = CostManagementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CostManagementConfig) String() string { @@ -15964,7 +15708,7 @@ func (*CostManagementConfig) ProtoMessage() {} func (x *CostManagementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15999,11 +15743,9 @@ type IntraNodeVisibilityConfig struct { func (x *IntraNodeVisibilityConfig) Reset() { *x = IntraNodeVisibilityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntraNodeVisibilityConfig) String() string { @@ -16014,7 +15756,7 @@ func (*IntraNodeVisibilityConfig) ProtoMessage() {} func (x *IntraNodeVisibilityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16049,11 +15791,9 @@ type ILBSubsettingConfig struct { func (x *ILBSubsettingConfig) Reset() { *x = ILBSubsettingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ILBSubsettingConfig) String() string { @@ -16064,7 +15804,7 @@ func (*ILBSubsettingConfig) ProtoMessage() {} func (x *ILBSubsettingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16104,11 +15844,9 @@ type DNSConfig struct { func (x *DNSConfig) Reset() { *x = DNSConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DNSConfig) String() string { @@ -16119,7 +15857,7 @@ func (*DNSConfig) ProtoMessage() {} func (x *DNSConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16174,11 +15912,9 @@ type MaxPodsConstraint struct { func (x *MaxPodsConstraint) Reset() { *x = MaxPodsConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaxPodsConstraint) String() string { @@ -16189,7 +15925,7 @@ func (*MaxPodsConstraint) ProtoMessage() {} func (x *MaxPodsConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16224,11 +15960,9 @@ type WorkloadIdentityConfig struct { func (x *WorkloadIdentityConfig) Reset() { *x = WorkloadIdentityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadIdentityConfig) String() string { @@ -16239,7 +15973,7 @@ func (*WorkloadIdentityConfig) ProtoMessage() {} func (x *WorkloadIdentityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16274,11 +16008,9 @@ type IdentityServiceConfig struct { func (x *IdentityServiceConfig) Reset() { *x = IdentityServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdentityServiceConfig) String() string { @@ -16289,7 +16021,7 @@ func (*IdentityServiceConfig) ProtoMessage() {} func (x *IdentityServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16331,11 +16063,9 @@ type MeshCertificates struct { func (x *MeshCertificates) Reset() { *x = MeshCertificates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MeshCertificates) String() string { @@ -16346,7 +16076,7 @@ func (*MeshCertificates) ProtoMessage() {} func (x *MeshCertificates) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16393,11 +16123,9 @@ type DatabaseEncryption struct { func (x *DatabaseEncryption) Reset() { *x = DatabaseEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseEncryption) String() string { @@ -16408,7 +16136,7 @@ func (*DatabaseEncryption) ProtoMessage() {} func (x *DatabaseEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16485,11 +16213,9 @@ type ListUsableSubnetworksRequest struct { func (x *ListUsableSubnetworksRequest) Reset() { *x = ListUsableSubnetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableSubnetworksRequest) String() string { @@ -16500,7 +16226,7 @@ func (*ListUsableSubnetworksRequest) ProtoMessage() {} func (x *ListUsableSubnetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16561,11 +16287,9 @@ type ListUsableSubnetworksResponse struct { func (x *ListUsableSubnetworksResponse) Reset() { *x = ListUsableSubnetworksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableSubnetworksResponse) String() string { @@ -16576,7 +16300,7 @@ func (*ListUsableSubnetworksResponse) ProtoMessage() {} func (x *ListUsableSubnetworksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16622,11 +16346,9 @@ type UsableSubnetworkSecondaryRange struct { func (x *UsableSubnetworkSecondaryRange) Reset() { *x = UsableSubnetworkSecondaryRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsableSubnetworkSecondaryRange) String() string { @@ -16637,7 +16359,7 @@ func (*UsableSubnetworkSecondaryRange) ProtoMessage() {} func (x *UsableSubnetworkSecondaryRange) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16699,11 +16421,9 @@ type UsableSubnetwork struct { func (x *UsableSubnetwork) Reset() { *x = UsableSubnetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsableSubnetwork) String() string { @@ -16714,7 +16434,7 @@ func (*UsableSubnetwork) ProtoMessage() {} func (x *UsableSubnetwork) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16781,11 +16501,9 @@ type ResourceUsageExportConfig struct { func (x *ResourceUsageExportConfig) Reset() { *x = ResourceUsageExportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceUsageExportConfig) String() string { @@ -16796,7 +16514,7 @@ func (*ResourceUsageExportConfig) ProtoMessage() {} func (x *ResourceUsageExportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16846,11 +16564,9 @@ type VerticalPodAutoscaling struct { func (x *VerticalPodAutoscaling) Reset() { *x = VerticalPodAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerticalPodAutoscaling) String() string { @@ -16861,7 +16577,7 @@ func (*VerticalPodAutoscaling) ProtoMessage() {} func (x *VerticalPodAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16896,11 +16612,9 @@ type DefaultSnatStatus struct { func (x *DefaultSnatStatus) Reset() { *x = DefaultSnatStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DefaultSnatStatus) String() string { @@ -16911,7 +16625,7 @@ func (*DefaultSnatStatus) ProtoMessage() {} func (x *DefaultSnatStatus) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16945,11 +16659,9 @@ type ShieldedNodes struct { func (x *ShieldedNodes) Reset() { *x = ShieldedNodes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedNodes) String() string { @@ -16960,7 +16672,7 @@ func (*ShieldedNodes) ProtoMessage() {} func (x *ShieldedNodes) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16994,11 +16706,9 @@ type VirtualNIC struct { func (x *VirtualNIC) Reset() { *x = VirtualNIC{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualNIC) String() string { @@ -17009,7 +16719,7 @@ func (*VirtualNIC) ProtoMessage() {} func (x *VirtualNIC) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17043,11 +16753,9 @@ type FastSocket struct { func (x *FastSocket) Reset() { *x = FastSocket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FastSocket) String() string { @@ -17058,7 +16766,7 @@ func (*FastSocket) ProtoMessage() {} func (x *FastSocket) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17092,11 +16800,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -17107,7 +16813,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17142,11 +16848,9 @@ type ConfidentialNodes struct { func (x *ConfidentialNodes) Reset() { *x = ConfidentialNodes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfidentialNodes) String() string { @@ -17157,7 +16861,7 @@ func (*ConfidentialNodes) ProtoMessage() {} func (x *ConfidentialNodes) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17203,11 +16907,9 @@ type UpgradeEvent struct { func (x *UpgradeEvent) Reset() { *x = UpgradeEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeEvent) String() string { @@ -17218,7 +16920,7 @@ func (*UpgradeEvent) ProtoMessage() {} func (x *UpgradeEvent) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17305,11 +17007,9 @@ type UpgradeInfoEvent struct { func (x *UpgradeInfoEvent) Reset() { *x = UpgradeInfoEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInfoEvent) String() string { @@ -17320,7 +17020,7 @@ func (*UpgradeInfoEvent) ProtoMessage() {} func (x *UpgradeInfoEvent) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17419,11 +17119,9 @@ type UpgradeAvailableEvent struct { func (x *UpgradeAvailableEvent) Reset() { *x = UpgradeAvailableEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeAvailableEvent) String() string { @@ -17434,7 +17132,7 @@ func (*UpgradeAvailableEvent) ProtoMessage() {} func (x *UpgradeAvailableEvent) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17516,11 +17214,9 @@ type SecurityBulletinEvent struct { func (x *SecurityBulletinEvent) Reset() { *x = SecurityBulletinEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityBulletinEvent) String() string { @@ -17531,7 +17227,7 @@ func (*SecurityBulletinEvent) ProtoMessage() {} func (x *SecurityBulletinEvent) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17630,11 +17326,9 @@ type Autopilot struct { func (x *Autopilot) Reset() { *x = Autopilot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Autopilot) String() string { @@ -17645,7 +17339,7 @@ func (*Autopilot) ProtoMessage() {} func (x *Autopilot) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17687,11 +17381,9 @@ type WorkloadPolicyConfig struct { func (x *WorkloadPolicyConfig) Reset() { *x = WorkloadPolicyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadPolicyConfig) String() string { @@ -17702,7 +17394,7 @@ func (*WorkloadPolicyConfig) ProtoMessage() {} func (x *WorkloadPolicyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17736,11 +17428,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -17751,7 +17441,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17785,11 +17475,9 @@ type LoggingComponentConfig struct { func (x *LoggingComponentConfig) Reset() { *x = LoggingComponentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingComponentConfig) String() string { @@ -17800,7 +17488,7 @@ func (*LoggingComponentConfig) ProtoMessage() {} func (x *LoggingComponentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17834,11 +17522,9 @@ type RayClusterLoggingConfig struct { func (x *RayClusterLoggingConfig) Reset() { *x = RayClusterLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayClusterLoggingConfig) String() string { @@ -17849,7 +17535,7 @@ func (*RayClusterLoggingConfig) ProtoMessage() {} func (x *RayClusterLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17888,11 +17574,9 @@ type MonitoringConfig struct { func (x *MonitoringConfig) Reset() { *x = MonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonitoringConfig) String() string { @@ -17903,7 +17587,7 @@ func (*MonitoringConfig) ProtoMessage() {} func (x *MonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17956,11 +17640,9 @@ type AdvancedDatapathObservabilityConfig struct { func (x *AdvancedDatapathObservabilityConfig) Reset() { *x = AdvancedDatapathObservabilityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedDatapathObservabilityConfig) String() string { @@ -17971,7 +17653,7 @@ func (*AdvancedDatapathObservabilityConfig) ProtoMessage() {} func (x *AdvancedDatapathObservabilityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18020,11 +17702,9 @@ type RayClusterMonitoringConfig struct { func (x *RayClusterMonitoringConfig) Reset() { *x = RayClusterMonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RayClusterMonitoringConfig) String() string { @@ -18035,7 +17715,7 @@ func (*RayClusterMonitoringConfig) ProtoMessage() {} func (x *RayClusterMonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18069,11 +17749,9 @@ type NodePoolLoggingConfig struct { func (x *NodePoolLoggingConfig) Reset() { *x = NodePoolLoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePoolLoggingConfig) String() string { @@ -18084,7 +17762,7 @@ func (*NodePoolLoggingConfig) ProtoMessage() {} func (x *NodePoolLoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18118,11 +17796,9 @@ type LoggingVariantConfig struct { func (x *LoggingVariantConfig) Reset() { *x = LoggingVariantConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingVariantConfig) String() string { @@ -18133,7 +17809,7 @@ func (*LoggingVariantConfig) ProtoMessage() {} func (x *LoggingVariantConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18168,11 +17844,9 @@ type MonitoringComponentConfig struct { func (x *MonitoringComponentConfig) Reset() { *x = MonitoringComponentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonitoringComponentConfig) String() string { @@ -18183,7 +17857,7 @@ func (*MonitoringComponentConfig) ProtoMessage() {} func (x *MonitoringComponentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18218,11 +17892,9 @@ type ManagedPrometheusConfig struct { func (x *ManagedPrometheusConfig) Reset() { *x = ManagedPrometheusConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedPrometheusConfig) String() string { @@ -18233,7 +17905,7 @@ func (*ManagedPrometheusConfig) ProtoMessage() {} func (x *ManagedPrometheusConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18276,11 +17948,9 @@ type Fleet struct { func (x *Fleet) Reset() { *x = Fleet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fleet) String() string { @@ -18291,7 +17961,7 @@ func (*Fleet) ProtoMessage() {} func (x *Fleet) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18341,11 +18011,9 @@ type ControlPlaneEndpointsConfig struct { func (x *ControlPlaneEndpointsConfig) Reset() { *x = ControlPlaneEndpointsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ControlPlaneEndpointsConfig) String() string { @@ -18356,7 +18024,7 @@ func (*ControlPlaneEndpointsConfig) ProtoMessage() {} func (x *ControlPlaneEndpointsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18413,11 +18081,9 @@ type LocalNvmeSsdBlockConfig struct { func (x *LocalNvmeSsdBlockConfig) Reset() { *x = LocalNvmeSsdBlockConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalNvmeSsdBlockConfig) String() string { @@ -18428,7 +18094,7 @@ func (*LocalNvmeSsdBlockConfig) ProtoMessage() {} func (x *LocalNvmeSsdBlockConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18480,11 +18146,9 @@ type EphemeralStorageLocalSsdConfig struct { func (x *EphemeralStorageLocalSsdConfig) Reset() { *x = EphemeralStorageLocalSsdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EphemeralStorageLocalSsdConfig) String() string { @@ -18495,7 +18159,7 @@ func (*EphemeralStorageLocalSsdConfig) ProtoMessage() {} func (x *EphemeralStorageLocalSsdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18537,11 +18201,9 @@ type ResourceManagerTags struct { func (x *ResourceManagerTags) Reset() { *x = ResourceManagerTags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceManagerTags) String() string { @@ -18552,7 +18214,7 @@ func (*ResourceManagerTags) ProtoMessage() {} func (x *ResourceManagerTags) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18588,11 +18250,9 @@ type EnterpriseConfig struct { func (x *EnterpriseConfig) Reset() { *x = EnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnterpriseConfig) String() string { @@ -18603,7 +18263,7 @@ func (*EnterpriseConfig) ProtoMessage() {} func (x *EnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18644,11 +18304,9 @@ type SecretManagerConfig struct { func (x *SecretManagerConfig) Reset() { *x = SecretManagerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretManagerConfig) String() string { @@ -18659,7 +18317,7 @@ func (*SecretManagerConfig) ProtoMessage() {} func (x *SecretManagerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18696,11 +18354,9 @@ type SecondaryBootDisk struct { func (x *SecondaryBootDisk) Reset() { *x = SecondaryBootDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecondaryBootDisk) String() string { @@ -18711,7 +18367,7 @@ func (*SecondaryBootDisk) ProtoMessage() {} func (x *SecondaryBootDisk) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18750,11 +18406,9 @@ type SecondaryBootDiskUpdateStrategy struct { func (x *SecondaryBootDiskUpdateStrategy) Reset() { *x = SecondaryBootDiskUpdateStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecondaryBootDiskUpdateStrategy) String() string { @@ -18765,7 +18419,7 @@ func (*SecondaryBootDiskUpdateStrategy) ProtoMessage() {} func (x *SecondaryBootDiskUpdateStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18794,11 +18448,9 @@ type LinuxNodeConfig_HugepagesConfig struct { func (x *LinuxNodeConfig_HugepagesConfig) Reset() { *x = LinuxNodeConfig_HugepagesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinuxNodeConfig_HugepagesConfig) String() string { @@ -18809,7 +18461,7 @@ func (*LinuxNodeConfig_HugepagesConfig) ProtoMessage() {} func (x *LinuxNodeConfig_HugepagesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18850,11 +18502,9 @@ type NodeNetworkConfig_NetworkPerformanceConfig struct { func (x *NodeNetworkConfig_NetworkPerformanceConfig) Reset() { *x = NodeNetworkConfig_NetworkPerformanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeNetworkConfig_NetworkPerformanceConfig) String() string { @@ -18865,7 +18515,7 @@ func (*NodeNetworkConfig_NetworkPerformanceConfig) ProtoMessage() {} func (x *NodeNetworkConfig_NetworkPerformanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18905,11 +18555,9 @@ type SoleTenantConfig_NodeAffinity struct { func (x *SoleTenantConfig_NodeAffinity) Reset() { *x = SoleTenantConfig_NodeAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoleTenantConfig_NodeAffinity) String() string { @@ -18920,7 +18568,7 @@ func (*SoleTenantConfig_NodeAffinity) ProtoMessage() {} func (x *SoleTenantConfig_NodeAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18971,11 +18619,9 @@ type ContainerdConfig_PrivateRegistryAccessConfig struct { func (x *ContainerdConfig_PrivateRegistryAccessConfig) Reset() { *x = ContainerdConfig_PrivateRegistryAccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerdConfig_PrivateRegistryAccessConfig) String() string { @@ -18986,7 +18632,7 @@ func (*ContainerdConfig_PrivateRegistryAccessConfig) ProtoMessage() {} func (x *ContainerdConfig_PrivateRegistryAccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19040,11 +18686,9 @@ type ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConf func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) Reset() { *x = ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) String() string { @@ -19056,7 +18700,7 @@ func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainCo func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19119,11 +18763,9 @@ type ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConf func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) Reset() { *x = ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) String() string { @@ -19135,7 +18777,7 @@ func (*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainCo func (x *ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19171,11 +18813,9 @@ type MasterAuthorizedNetworksConfig_CidrBlock struct { func (x *MasterAuthorizedNetworksConfig_CidrBlock) Reset() { *x = MasterAuthorizedNetworksConfig_CidrBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig_CidrBlock) String() string { @@ -19186,7 +18826,7 @@ func (*MasterAuthorizedNetworksConfig_CidrBlock) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig_CidrBlock) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19227,11 +18867,9 @@ type CompliancePostureConfig_ComplianceStandard struct { func (x *CompliancePostureConfig_ComplianceStandard) Reset() { *x = CompliancePostureConfig_ComplianceStandard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompliancePostureConfig_ComplianceStandard) String() string { @@ -19242,7 +18880,7 @@ func (*CompliancePostureConfig_ComplianceStandard) ProtoMessage() {} func (x *CompliancePostureConfig_ComplianceStandard) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19284,11 +18922,9 @@ type OperationProgress_Metric struct { func (x *OperationProgress_Metric) Reset() { *x = OperationProgress_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationProgress_Metric) String() string { @@ -19299,7 +18935,7 @@ func (*OperationProgress_Metric) ProtoMessage() {} func (x *OperationProgress_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19392,11 +19028,9 @@ type ServerConfig_ReleaseChannelConfig struct { func (x *ServerConfig_ReleaseChannelConfig) Reset() { *x = ServerConfig_ReleaseChannelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerConfig_ReleaseChannelConfig) String() string { @@ -19407,7 +19041,7 @@ func (*ServerConfig_ReleaseChannelConfig) ProtoMessage() {} func (x *ServerConfig_ReleaseChannelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19469,11 +19103,9 @@ type BlueGreenSettings_StandardRolloutPolicy struct { func (x *BlueGreenSettings_StandardRolloutPolicy) Reset() { *x = BlueGreenSettings_StandardRolloutPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlueGreenSettings_StandardRolloutPolicy) String() string { @@ -19484,7 +19116,7 @@ func (*BlueGreenSettings_StandardRolloutPolicy) ProtoMessage() {} func (x *BlueGreenSettings_StandardRolloutPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19614,11 +19246,9 @@ type NodePool_UpgradeSettings struct { func (x *NodePool_UpgradeSettings) Reset() { *x = NodePool_UpgradeSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_UpgradeSettings) String() string { @@ -19629,7 +19259,7 @@ func (*NodePool_UpgradeSettings) ProtoMessage() {} func (x *NodePool_UpgradeSettings) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[191] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19685,11 +19315,9 @@ type NodePool_UpdateInfo struct { func (x *NodePool_UpdateInfo) Reset() { *x = NodePool_UpdateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_UpdateInfo) String() string { @@ -19700,7 +19328,7 @@ func (*NodePool_UpdateInfo) ProtoMessage() {} func (x *NodePool_UpdateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[192] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19741,11 +19369,9 @@ type NodePool_PlacementPolicy struct { func (x *NodePool_PlacementPolicy) Reset() { *x = NodePool_PlacementPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[193] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_PlacementPolicy) String() string { @@ -19756,7 +19382,7 @@ func (*NodePool_PlacementPolicy) ProtoMessage() {} func (x *NodePool_PlacementPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[193] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19806,11 +19432,9 @@ type NodePool_QueuedProvisioning struct { func (x *NodePool_QueuedProvisioning) Reset() { *x = NodePool_QueuedProvisioning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[194] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_QueuedProvisioning) String() string { @@ -19821,7 +19445,7 @@ func (*NodePool_QueuedProvisioning) ProtoMessage() {} func (x *NodePool_QueuedProvisioning) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[194] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19868,11 +19492,9 @@ type NodePool_UpdateInfo_BlueGreenInfo struct { func (x *NodePool_UpdateInfo_BlueGreenInfo) Reset() { *x = NodePool_UpdateInfo_BlueGreenInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[195] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_UpdateInfo_BlueGreenInfo) String() string { @@ -19883,7 +19505,7 @@ func (*NodePool_UpdateInfo_BlueGreenInfo) ProtoMessage() {} func (x *NodePool_UpdateInfo_BlueGreenInfo) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[195] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19945,11 +19567,9 @@ type NetworkConfig_ClusterNetworkPerformanceConfig struct { func (x *NetworkConfig_ClusterNetworkPerformanceConfig) Reset() { *x = NetworkConfig_ClusterNetworkPerformanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[198] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig_ClusterNetworkPerformanceConfig) String() string { @@ -19960,7 +19580,7 @@ func (*NetworkConfig_ClusterNetworkPerformanceConfig) ProtoMessage() {} func (x *NetworkConfig_ClusterNetworkPerformanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[198] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19999,11 +19619,9 @@ type DatabaseEncryption_OperationError struct { func (x *DatabaseEncryption_OperationError) Reset() { *x = DatabaseEncryption_OperationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseEncryption_OperationError) String() string { @@ -20014,7 +19632,7 @@ func (*DatabaseEncryption_OperationError) ProtoMessage() {} func (x *DatabaseEncryption_OperationError) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[199] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20062,11 +19680,9 @@ type ResourceUsageExportConfig_BigQueryDestination struct { func (x *ResourceUsageExportConfig_BigQueryDestination) Reset() { *x = ResourceUsageExportConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceUsageExportConfig_BigQueryDestination) String() string { @@ -20077,7 +19693,7 @@ func (*ResourceUsageExportConfig_BigQueryDestination) ProtoMessage() {} func (x *ResourceUsageExportConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[200] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20113,11 +19729,9 @@ type ResourceUsageExportConfig_ConsumptionMeteringConfig struct { func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) Reset() { *x = ResourceUsageExportConfig_ConsumptionMeteringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[201] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) String() string { @@ -20128,7 +19742,7 @@ func (*ResourceUsageExportConfig_ConsumptionMeteringConfig) ProtoMessage() {} func (x *ResourceUsageExportConfig_ConsumptionMeteringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[201] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20169,11 +19783,9 @@ type NotificationConfig_PubSub struct { func (x *NotificationConfig_PubSub) Reset() { *x = NotificationConfig_PubSub{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[202] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_PubSub) String() string { @@ -20184,7 +19796,7 @@ func (*NotificationConfig_PubSub) ProtoMessage() {} func (x *NotificationConfig_PubSub) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[202] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20235,11 +19847,9 @@ type NotificationConfig_Filter struct { func (x *NotificationConfig_Filter) Reset() { *x = NotificationConfig_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[203] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_Filter) String() string { @@ -20250,7 +19860,7 @@ func (*NotificationConfig_Filter) ProtoMessage() {} func (x *NotificationConfig_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[203] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20291,11 +19901,9 @@ type ControlPlaneEndpointsConfig_DNSEndpointConfig struct { func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) Reset() { *x = ControlPlaneEndpointsConfig_DNSEndpointConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[204] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) String() string { @@ -20306,7 +19914,7 @@ func (*ControlPlaneEndpointsConfig_DNSEndpointConfig) ProtoMessage() {} func (x *ControlPlaneEndpointsConfig_DNSEndpointConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[204] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20376,11 +19984,9 @@ type ControlPlaneEndpointsConfig_IPEndpointsConfig struct { func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) Reset() { *x = ControlPlaneEndpointsConfig_IPEndpointsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_container_v1_cluster_service_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_container_v1_cluster_service_proto_msgTypes[205] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) String() string { @@ -20391,7 +19997,7 @@ func (*ControlPlaneEndpointsConfig_IPEndpointsConfig) ProtoMessage() {} func (x *ControlPlaneEndpointsConfig_IPEndpointsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_container_v1_cluster_service_proto_msgTypes[205] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25639,2372 +25245,6 @@ func file_google_container_v1_cluster_service_proto_init() { if File_google_container_v1_cluster_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_container_v1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LinuxNodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WindowsNodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NodeKubeletConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedMachineFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NodeNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AdditionalNodeNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AdditionalPodNetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SandboxConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GcfsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SoleTenantConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ContainerdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NodeTaint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*NodeTaints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*NodeLabels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ResourceLabels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*NetworkTags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ClientCertificateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AddonsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*HttpLoadBalancing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*HorizontalPodAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesDashboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPolicyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DnsCacheConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*PrivateClusterMasterGlobalAccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*PrivateClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AuthenticatorGroupsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ConfigConnectorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GcePersistentDiskCsiDriverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GcpFilestoreCsiDriverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GcsFuseCsiDriverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ParallelstoreCsiDriverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*RayOperatorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GkeBackupAgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*StatefulHAConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*LegacyAbac); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*BinaryAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*PodCIDROverprovisionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*IPAllocationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*RBACBindingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*UserManagedKeysConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*CompliancePostureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*K8SBetaAPIConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPostureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*NodePoolAutoConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*NodePoolDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*NodeConfigDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ClusterUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*AdditionalPodRangesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*RangeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*DesiredEnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*OperationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*SetNodePoolAutoscalingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*SetLoggingServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*SetMonitoringServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*SetAddonsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*SetLocationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMasterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*SetMasterAuthRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*GetOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*CancelOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*GetServerConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*ServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*CreateNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ListNodePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*GetNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*BlueGreenSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*NodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*NodeManagement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*BestEffortProvisioning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*AutoUpgradeOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceExclusionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*RecurringTimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*DailyMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*SetNodePoolManagementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*SetNodePoolSizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*CompleteNodePoolUpgradeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*RollbackNodePoolUpgradeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ListNodePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*ClusterAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*AutoprovisioningNodePoolDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ResourceLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*NodePoolAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*SetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*SetLegacyAbacRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*StartIPRotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*CompleteIPRotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*GPUSharingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*GPUDriverInstallationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadMetadataConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*SetNetworkPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*SetMaintenancePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*StatusCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*GatewayAPIConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*ServiceExternalIPsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*GetOpenIDConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*GetOpenIDConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*GetJSONWebKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*Jwk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*GetJSONWebKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*CheckAutopilotCompatibilityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*AutopilotCompatibilityIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*CheckAutopilotCompatibilityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*CostManagementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*IntraNodeVisibilityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*ILBSubsettingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*DNSConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*MaxPodsConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadIdentityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*IdentityServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*MeshCertificates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableSubnetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableSubnetworksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*UsableSubnetworkSecondaryRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*UsableSubnetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*ResourceUsageExportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*VerticalPodAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*DefaultSnatStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedNodes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*VirtualNIC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*FastSocket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*ConfidentialNodes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInfoEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeAvailableEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*SecurityBulletinEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*Autopilot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadPolicyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*LoggingComponentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*RayClusterLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*MonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedDatapathObservabilityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*RayClusterMonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[160].Exporter = func(v any, i int) any { - switch v := v.(*NodePoolLoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*LoggingVariantConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[162].Exporter = func(v any, i int) any { - switch v := v.(*MonitoringComponentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[163].Exporter = func(v any, i int) any { - switch v := v.(*ManagedPrometheusConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*Fleet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*ControlPlaneEndpointsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*LocalNvmeSsdBlockConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*EphemeralStorageLocalSsdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*ResourceManagerTags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[169].Exporter = func(v any, i int) any { - switch v := v.(*EnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[170].Exporter = func(v any, i int) any { - switch v := v.(*SecretManagerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*SecondaryBootDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*SecondaryBootDiskUpdateStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*LinuxNodeConfig_HugepagesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[178].Exporter = func(v any, i int) any { - switch v := v.(*NodeNetworkConfig_NetworkPerformanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[179].Exporter = func(v any, i int) any { - switch v := v.(*SoleTenantConfig_NodeAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[180].Exporter = func(v any, i int) any { - switch v := v.(*ContainerdConfig_PrivateRegistryAccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*ContainerdConfig_PrivateRegistryAccessConfig_CertificateAuthorityDomainConfig_GCPSecretManagerCertificateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[185].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig_CidrBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[187].Exporter = func(v any, i int) any { - switch v := v.(*CompliancePostureConfig_ComplianceStandard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[188].Exporter = func(v any, i int) any { - switch v := v.(*OperationProgress_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[189].Exporter = func(v any, i int) any { - switch v := v.(*ServerConfig_ReleaseChannelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[190].Exporter = func(v any, i int) any { - switch v := v.(*BlueGreenSettings_StandardRolloutPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[191].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_UpgradeSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[192].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_UpdateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[193].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_PlacementPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[194].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_QueuedProvisioning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[195].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_UpdateInfo_BlueGreenInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[198].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig_ClusterNetworkPerformanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[199].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseEncryption_OperationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[200].Exporter = func(v any, i int) any { - switch v := v.(*ResourceUsageExportConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[201].Exporter = func(v any, i int) any { - switch v := v.(*ResourceUsageExportConfig_ConsumptionMeteringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[202].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_PubSub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[203].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[204].Exporter = func(v any, i int) any { - switch v := v.(*ControlPlaneEndpointsConfig_DNSEndpointConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_container_v1_cluster_service_proto_msgTypes[205].Exporter = func(v any, i int) any { - switch v := v.(*ControlPlaneEndpointsConfig_IPEndpointsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_container_v1_cluster_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_container_v1_cluster_service_proto_msgTypes[2].OneofWrappers = []any{} file_google_container_v1_cluster_service_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/container/apiv1/helpers.go b/container/apiv1/helpers.go index 40db651291f3..8292dc8e58bf 100755 --- a/container/apiv1/helpers.go +++ b/container/apiv1/helpers.go @@ -18,10 +18,20 @@ package container import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "container.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go index 09877ba2900b..ae469f3a1fc1 100755 --- a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go +++ b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( containeranalysispb "cloud.google.com/go/containeranalysis/apiv1beta1/containeranalysispb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -215,6 +214,8 @@ type containerAnalysisV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewContainerAnalysisV1Beta1Client creates a new container analysis v1 beta1 client based on gRPC. @@ -253,6 +254,7 @@ func NewContainerAnalysisV1Beta1Client(ctx context.Context, opts ...option.Clien connPool: connPool, containerAnalysisV1Beta1Client: containeranalysispb.NewContainerAnalysisV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -299,6 +301,8 @@ type containerAnalysisV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing ContainerAnalysisV1Beta1Client CallOptions **ContainerAnalysisV1Beta1CallOptions + + logger *slog.Logger } // NewContainerAnalysisV1Beta1RESTClient creates a new container analysis v1 beta1 rest client. @@ -328,6 +332,7 @@ func NewContainerAnalysisV1Beta1RESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -380,7 +385,7 @@ func (c *containerAnalysisV1Beta1GRPCClient) SetIamPolicy(ctx context.Context, r var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.containerAnalysisV1Beta1Client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.containerAnalysisV1Beta1Client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -398,7 +403,7 @@ func (c *containerAnalysisV1Beta1GRPCClient) GetIamPolicy(ctx context.Context, r var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.containerAnalysisV1Beta1Client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.containerAnalysisV1Beta1Client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *containerAnalysisV1Beta1GRPCClient) TestIamPermissions(ctx context.Cont var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.containerAnalysisV1Beta1Client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.containerAnalysisV1Beta1Client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -434,7 +439,7 @@ func (c *containerAnalysisV1Beta1GRPCClient) GeneratePackagesSummary(ctx context var resp *containeranalysispb.PackagesSummaryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.containerAnalysisV1Beta1Client.GeneratePackagesSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.containerAnalysisV1Beta1Client.GeneratePackagesSummary, req, settings.GRPC, c.logger, "GeneratePackagesSummary") return err }, opts...) if err != nil { @@ -452,7 +457,7 @@ func (c *containerAnalysisV1Beta1GRPCClient) ExportSBOM(ctx context.Context, req var resp *containeranalysispb.ExportSBOMResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.containerAnalysisV1Beta1Client.ExportSBOM(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.containerAnalysisV1Beta1Client.ExportSBOM, req, settings.GRPC, c.logger, "ExportSBOM") return err }, opts...) if err != nil { @@ -507,17 +512,7 @@ func (c *containerAnalysisV1Beta1RESTClient) SetIamPolicy(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -580,17 +575,7 @@ func (c *containerAnalysisV1Beta1RESTClient) GetIamPolicy(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -652,17 +637,7 @@ func (c *containerAnalysisV1Beta1RESTClient) TestIamPermissions(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -718,17 +693,7 @@ func (c *containerAnalysisV1Beta1RESTClient) GeneratePackagesSummary(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GeneratePackagesSummary") if err != nil { return err } @@ -784,17 +749,7 @@ func (c *containerAnalysisV1Beta1RESTClient) ExportSBOM(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportSBOM") if err != nil { return err } diff --git a/containeranalysis/apiv1beta1/containeranalysispb/containeranalysis.pb.go b/containeranalysis/apiv1beta1/containeranalysispb/containeranalysis.pb.go index 3141b15cfecd..f6dff17f8197 100755 --- a/containeranalysis/apiv1beta1/containeranalysispb/containeranalysis.pb.go +++ b/containeranalysis/apiv1beta1/containeranalysispb/containeranalysis.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/containeranalysis/v1beta1/containeranalysis.proto @@ -56,11 +56,9 @@ type GeneratePackagesSummaryRequest struct { func (x *GeneratePackagesSummaryRequest) Reset() { *x = GeneratePackagesSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneratePackagesSummaryRequest) String() string { @@ -71,7 +69,7 @@ func (*GeneratePackagesSummaryRequest) ProtoMessage() {} func (x *GeneratePackagesSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type PackagesSummaryResponse struct { func (x *PackagesSummaryResponse) Reset() { *x = PackagesSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PackagesSummaryResponse) String() string { @@ -123,7 +119,7 @@ func (*PackagesSummaryResponse) ProtoMessage() {} func (x *PackagesSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,11 +161,9 @@ type ExportSBOMRequest struct { func (x *ExportSBOMRequest) Reset() { *x = ExportSBOMRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportSBOMRequest) String() string { @@ -180,7 +174,7 @@ func (*ExportSBOMRequest) ProtoMessage() {} func (x *ExportSBOMRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +210,9 @@ type ExportSBOMResponse struct { func (x *ExportSBOMResponse) Reset() { *x = ExportSBOMResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportSBOMResponse) String() string { @@ -231,7 +223,7 @@ func (*ExportSBOMResponse) ProtoMessage() {} func (x *ExportSBOMResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +261,9 @@ type PackagesSummaryResponse_LicensesSummary struct { func (x *PackagesSummaryResponse_LicensesSummary) Reset() { *x = PackagesSummaryResponse_LicensesSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PackagesSummaryResponse_LicensesSummary) String() string { @@ -284,7 +274,7 @@ func (*PackagesSummaryResponse_LicensesSummary) ProtoMessage() {} func (x *PackagesSummaryResponse_LicensesSummary) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,68 +490,6 @@ func file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_init if File_google_devtools_containeranalysis_v1beta1_containeranalysis_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GeneratePackagesSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PackagesSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportSBOMRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportSBOMResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_containeranalysis_v1beta1_containeranalysis_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PackagesSummaryResponse_LicensesSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go index 93d135180c4b..42073c0d158f 100755 --- a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go +++ b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -512,6 +511,8 @@ type grafeasV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGrafeasV1Beta1Client creates a new grafeas v1 beta1 client based on gRPC. @@ -551,6 +552,7 @@ func NewGrafeasV1Beta1Client(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, grafeasV1Beta1Client: grafeaspb.NewGrafeasV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -597,6 +599,8 @@ type grafeasV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing GrafeasV1Beta1Client CallOptions **GrafeasV1Beta1CallOptions + + logger *slog.Logger } // NewGrafeasV1Beta1RESTClient creates a new grafeas v1 beta1 rest client. @@ -627,6 +631,7 @@ func NewGrafeasV1Beta1RESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -679,7 +684,7 @@ func (c *grafeasV1Beta1GRPCClient) GetOccurrence(ctx context.Context, req *grafe var resp *grafeaspb.Occurrence err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.GetOccurrence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.GetOccurrence, req, settings.GRPC, c.logger, "GetOccurrence") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *grafeasV1Beta1GRPCClient) ListOccurrences(ctx context.Context, req *gra } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.ListOccurrences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.ListOccurrences, req, settings.GRPC, c.logger, "ListOccurrences") return err }, opts...) if err != nil { @@ -742,7 +747,7 @@ func (c *grafeasV1Beta1GRPCClient) DeleteOccurrence(ctx context.Context, req *gr opts = append((*c.CallOptions).DeleteOccurrence[0:len((*c.CallOptions).DeleteOccurrence):len((*c.CallOptions).DeleteOccurrence)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.grafeasV1Beta1Client.DeleteOccurrence(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.grafeasV1Beta1Client.DeleteOccurrence, req, settings.GRPC, c.logger, "DeleteOccurrence") return err }, opts...) return err @@ -757,7 +762,7 @@ func (c *grafeasV1Beta1GRPCClient) CreateOccurrence(ctx context.Context, req *gr var resp *grafeaspb.Occurrence err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.CreateOccurrence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.CreateOccurrence, req, settings.GRPC, c.logger, "CreateOccurrence") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *grafeasV1Beta1GRPCClient) BatchCreateOccurrences(ctx context.Context, r var resp *grafeaspb.BatchCreateOccurrencesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.BatchCreateOccurrences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.BatchCreateOccurrences, req, settings.GRPC, c.logger, "BatchCreateOccurrences") return err }, opts...) if err != nil { @@ -793,7 +798,7 @@ func (c *grafeasV1Beta1GRPCClient) UpdateOccurrence(ctx context.Context, req *gr var resp *grafeaspb.Occurrence err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.UpdateOccurrence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.UpdateOccurrence, req, settings.GRPC, c.logger, "UpdateOccurrence") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *grafeasV1Beta1GRPCClient) GetOccurrenceNote(ctx context.Context, req *g var resp *grafeaspb.Note err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.GetOccurrenceNote(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.GetOccurrenceNote, req, settings.GRPC, c.logger, "GetOccurrenceNote") return err }, opts...) if err != nil { @@ -829,7 +834,7 @@ func (c *grafeasV1Beta1GRPCClient) GetNote(ctx context.Context, req *grafeaspb.G var resp *grafeaspb.Note err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.GetNote(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.GetNote, req, settings.GRPC, c.logger, "GetNote") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *grafeasV1Beta1GRPCClient) ListNotes(ctx context.Context, req *grafeaspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.ListNotes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.ListNotes, req, settings.GRPC, c.logger, "ListNotes") return err }, opts...) if err != nil { @@ -892,7 +897,7 @@ func (c *grafeasV1Beta1GRPCClient) DeleteNote(ctx context.Context, req *grafeasp opts = append((*c.CallOptions).DeleteNote[0:len((*c.CallOptions).DeleteNote):len((*c.CallOptions).DeleteNote)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.grafeasV1Beta1Client.DeleteNote(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.grafeasV1Beta1Client.DeleteNote, req, settings.GRPC, c.logger, "DeleteNote") return err }, opts...) return err @@ -907,7 +912,7 @@ func (c *grafeasV1Beta1GRPCClient) CreateNote(ctx context.Context, req *grafeasp var resp *grafeaspb.Note err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.CreateNote(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.CreateNote, req, settings.GRPC, c.logger, "CreateNote") return err }, opts...) if err != nil { @@ -925,7 +930,7 @@ func (c *grafeasV1Beta1GRPCClient) BatchCreateNotes(ctx context.Context, req *gr var resp *grafeaspb.BatchCreateNotesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.BatchCreateNotes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.BatchCreateNotes, req, settings.GRPC, c.logger, "BatchCreateNotes") return err }, opts...) if err != nil { @@ -943,7 +948,7 @@ func (c *grafeasV1Beta1GRPCClient) UpdateNote(ctx context.Context, req *grafeasp var resp *grafeaspb.Note err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.UpdateNote(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.UpdateNote, req, settings.GRPC, c.logger, "UpdateNote") return err }, opts...) if err != nil { @@ -972,7 +977,7 @@ func (c *grafeasV1Beta1GRPCClient) ListNoteOccurrences(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.ListNoteOccurrences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.ListNoteOccurrences, req, settings.GRPC, c.logger, "ListNoteOccurrences") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *grafeasV1Beta1GRPCClient) GetVulnerabilityOccurrencesSummary(ctx contex var resp *grafeaspb.VulnerabilityOccurrencesSummary err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.grafeasV1Beta1Client.GetVulnerabilityOccurrencesSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.grafeasV1Beta1Client.GetVulnerabilityOccurrencesSummary, req, settings.GRPC, c.logger, "GetVulnerabilityOccurrencesSummary") return err }, opts...) if err != nil { @@ -1049,17 +1054,7 @@ func (c *grafeasV1Beta1RESTClient) GetOccurrence(ctx context.Context, req *grafe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOccurrence") if err != nil { return err } @@ -1124,21 +1119,10 @@ func (c *grafeasV1Beta1RESTClient) ListOccurrences(ctx context.Context, req *gra } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOccurrences") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1200,15 +1184,8 @@ func (c *grafeasV1Beta1RESTClient) DeleteOccurrence(ctx context.Context, req *gr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOccurrence") + return err }, opts...) } @@ -1252,17 +1229,7 @@ func (c *grafeasV1Beta1RESTClient) CreateOccurrence(ctx context.Context, req *gr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOccurrence") if err != nil { return err } @@ -1318,17 +1285,7 @@ func (c *grafeasV1Beta1RESTClient) BatchCreateOccurrences(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateOccurrences") if err != nil { return err } @@ -1392,17 +1349,7 @@ func (c *grafeasV1Beta1RESTClient) UpdateOccurrence(ctx context.Context, req *gr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOccurrence") if err != nil { return err } @@ -1453,17 +1400,7 @@ func (c *grafeasV1Beta1RESTClient) GetOccurrenceNote(ctx context.Context, req *g httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOccurrenceNote") if err != nil { return err } @@ -1513,17 +1450,7 @@ func (c *grafeasV1Beta1RESTClient) GetNote(ctx context.Context, req *grafeaspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNote") if err != nil { return err } @@ -1588,21 +1515,10 @@ func (c *grafeasV1Beta1RESTClient) ListNotes(ctx context.Context, req *grafeaspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1662,15 +1578,8 @@ func (c *grafeasV1Beta1RESTClient) DeleteNote(ctx context.Context, req *grafeasp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNote") + return err }, opts...) } @@ -1717,17 +1626,7 @@ func (c *grafeasV1Beta1RESTClient) CreateNote(ctx context.Context, req *grafeasp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNote") if err != nil { return err } @@ -1783,17 +1682,7 @@ func (c *grafeasV1Beta1RESTClient) BatchCreateNotes(ctx context.Context, req *gr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateNotes") if err != nil { return err } @@ -1857,17 +1746,7 @@ func (c *grafeasV1Beta1RESTClient) UpdateNote(ctx context.Context, req *grafeasp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNote") if err != nil { return err } @@ -1934,21 +1813,10 @@ func (c *grafeasV1Beta1RESTClient) ListNoteOccurrences(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNoteOccurrences") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2014,17 +1882,7 @@ func (c *grafeasV1Beta1RESTClient) GetVulnerabilityOccurrencesSummary(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVulnerabilityOccurrencesSummary") if err != nil { return err } diff --git a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_go123_test.go b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_go123_test.go index 956c22f40adb..a551fb3c377d 100644 --- a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_go123_test.go +++ b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGrafeasV1Beta1Client_ListNoteOccurrences_all() { } for resp, err := range c.ListNoteOccurrences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleGrafeasV1Beta1Client_ListNotes_all() { } for resp, err := range c.ListNotes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleGrafeasV1Beta1Client_ListOccurrences_all() { } for resp, err := range c.ListOccurrences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/containeranalysis/apiv1beta1/helpers.go b/containeranalysis/apiv1beta1/helpers.go index e40d187f5ecb..90d56de2a3f5 100755 --- a/containeranalysis/apiv1beta1/helpers.go +++ b/containeranalysis/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package containeranalysis import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "containeranalysis.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datacatalog/apiv1/data_catalog_client.go b/datacatalog/apiv1/data_catalog_client.go index 093db7190b5d..6e4b78ecb305 100755 --- a/datacatalog/apiv1/data_catalog_client.go +++ b/datacatalog/apiv1/data_catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1689,6 +1688,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data catalog client based on gRPC. @@ -1716,6 +1717,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datacatalogpb.NewDataCatalogClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -1779,6 +1781,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data catalog rest client. @@ -1797,6 +1801,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1867,7 +1872,7 @@ func (c *gRPCClient) SearchCatalog(ctx context.Context, req *datacatalogpb.Searc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchCatalog, req, settings.GRPC, c.logger, "SearchCatalog") return err }, opts...) if err != nil { @@ -1902,7 +1907,7 @@ func (c *gRPCClient) CreateEntryGroup(ctx context.Context, req *datacatalogpb.Cr var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEntryGroup, req, settings.GRPC, c.logger, "CreateEntryGroup") return err }, opts...) if err != nil { @@ -1920,7 +1925,7 @@ func (c *gRPCClient) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEn var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEntryGroup, req, settings.GRPC, c.logger, "GetEntryGroup") return err }, opts...) if err != nil { @@ -1938,7 +1943,7 @@ func (c *gRPCClient) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.Up var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEntryGroup, req, settings.GRPC, c.logger, "UpdateEntryGroup") return err }, opts...) if err != nil { @@ -1955,7 +1960,7 @@ func (c *gRPCClient) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.De opts = append((*c.CallOptions).DeleteEntryGroup[0:len((*c.CallOptions).DeleteEntryGroup):len((*c.CallOptions).DeleteEntryGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEntryGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEntryGroup, req, settings.GRPC, c.logger, "DeleteEntryGroup") return err }, opts...) return err @@ -1981,7 +1986,7 @@ func (c *gRPCClient) ListEntryGroups(ctx context.Context, req *datacatalogpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEntryGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEntryGroups, req, settings.GRPC, c.logger, "ListEntryGroups") return err }, opts...) if err != nil { @@ -2016,7 +2021,7 @@ func (c *gRPCClient) CreateEntry(ctx context.Context, req *datacatalogpb.CreateE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEntry, req, settings.GRPC, c.logger, "CreateEntry") return err }, opts...) if err != nil { @@ -2034,7 +2039,7 @@ func (c *gRPCClient) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEntry, req, settings.GRPC, c.logger, "UpdateEntry") return err }, opts...) if err != nil { @@ -2051,7 +2056,7 @@ func (c *gRPCClient) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteE opts = append((*c.CallOptions).DeleteEntry[0:len((*c.CallOptions).DeleteEntry):len((*c.CallOptions).DeleteEntry)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEntry(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEntry, req, settings.GRPC, c.logger, "DeleteEntry") return err }, opts...) return err @@ -2066,7 +2071,7 @@ func (c *gRPCClient) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRe var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEntry, req, settings.GRPC, c.logger, "GetEntry") return err }, opts...) if err != nil { @@ -2081,7 +2086,7 @@ func (c *gRPCClient) LookupEntry(ctx context.Context, req *datacatalogpb.LookupE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupEntry, req, settings.GRPC, c.logger, "LookupEntry") return err }, opts...) if err != nil { @@ -2110,7 +2115,7 @@ func (c *gRPCClient) ListEntries(ctx context.Context, req *datacatalogpb.ListEnt } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEntries, req, settings.GRPC, c.logger, "ListEntries") return err }, opts...) if err != nil { @@ -2145,7 +2150,7 @@ func (c *gRPCClient) ModifyEntryOverview(ctx context.Context, req *datacatalogpb var resp *datacatalogpb.EntryOverview err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ModifyEntryOverview(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ModifyEntryOverview, req, settings.GRPC, c.logger, "ModifyEntryOverview") return err }, opts...) if err != nil { @@ -2163,7 +2168,7 @@ func (c *gRPCClient) ModifyEntryContacts(ctx context.Context, req *datacatalogpb var resp *datacatalogpb.Contacts err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ModifyEntryContacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ModifyEntryContacts, req, settings.GRPC, c.logger, "ModifyEntryContacts") return err }, opts...) if err != nil { @@ -2181,7 +2186,7 @@ func (c *gRPCClient) CreateTagTemplate(ctx context.Context, req *datacatalogpb.C var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTagTemplate, req, settings.GRPC, c.logger, "CreateTagTemplate") return err }, opts...) if err != nil { @@ -2199,7 +2204,7 @@ func (c *gRPCClient) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetT var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTagTemplate, req, settings.GRPC, c.logger, "GetTagTemplate") return err }, opts...) if err != nil { @@ -2217,7 +2222,7 @@ func (c *gRPCClient) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.U var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTagTemplate, req, settings.GRPC, c.logger, "UpdateTagTemplate") return err }, opts...) if err != nil { @@ -2234,7 +2239,7 @@ func (c *gRPCClient) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.D opts = append((*c.CallOptions).DeleteTagTemplate[0:len((*c.CallOptions).DeleteTagTemplate):len((*c.CallOptions).DeleteTagTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTagTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTagTemplate, req, settings.GRPC, c.logger, "DeleteTagTemplate") return err }, opts...) return err @@ -2249,7 +2254,7 @@ func (c *gRPCClient) CreateTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTagTemplateField, req, settings.GRPC, c.logger, "CreateTagTemplateField") return err }, opts...) if err != nil { @@ -2267,7 +2272,7 @@ func (c *gRPCClient) UpdateTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTagTemplateField, req, settings.GRPC, c.logger, "UpdateTagTemplateField") return err }, opts...) if err != nil { @@ -2285,7 +2290,7 @@ func (c *gRPCClient) RenameTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameTagTemplateField, req, settings.GRPC, c.logger, "RenameTagTemplateField") return err }, opts...) if err != nil { @@ -2303,7 +2308,7 @@ func (c *gRPCClient) RenameTagTemplateFieldEnumValue(ctx context.Context, req *d var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameTagTemplateFieldEnumValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameTagTemplateFieldEnumValue, req, settings.GRPC, c.logger, "RenameTagTemplateFieldEnumValue") return err }, opts...) if err != nil { @@ -2320,7 +2325,7 @@ func (c *gRPCClient) DeleteTagTemplateField(ctx context.Context, req *datacatalo opts = append((*c.CallOptions).DeleteTagTemplateField[0:len((*c.CallOptions).DeleteTagTemplateField):len((*c.CallOptions).DeleteTagTemplateField)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTagTemplateField(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTagTemplateField, req, settings.GRPC, c.logger, "DeleteTagTemplateField") return err }, opts...) return err @@ -2335,7 +2340,7 @@ func (c *gRPCClient) CreateTag(ctx context.Context, req *datacatalogpb.CreateTag var resp *datacatalogpb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTag, req, settings.GRPC, c.logger, "CreateTag") return err }, opts...) if err != nil { @@ -2353,7 +2358,7 @@ func (c *gRPCClient) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTag var resp *datacatalogpb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTag, req, settings.GRPC, c.logger, "UpdateTag") return err }, opts...) if err != nil { @@ -2370,7 +2375,7 @@ func (c *gRPCClient) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTag opts = append((*c.CallOptions).DeleteTag[0:len((*c.CallOptions).DeleteTag):len((*c.CallOptions).DeleteTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTag, req, settings.GRPC, c.logger, "DeleteTag") return err }, opts...) return err @@ -2396,7 +2401,7 @@ func (c *gRPCClient) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTags, req, settings.GRPC, c.logger, "ListTags") return err }, opts...) if err != nil { @@ -2431,7 +2436,7 @@ func (c *gRPCClient) ReconcileTags(ctx context.Context, req *datacatalogpb.Recon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReconcileTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReconcileTags, req, settings.GRPC, c.logger, "ReconcileTags") return err }, opts...) if err != nil { @@ -2451,7 +2456,7 @@ func (c *gRPCClient) StarEntry(ctx context.Context, req *datacatalogpb.StarEntry var resp *datacatalogpb.StarEntryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StarEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StarEntry, req, settings.GRPC, c.logger, "StarEntry") return err }, opts...) if err != nil { @@ -2469,7 +2474,7 @@ func (c *gRPCClient) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarE var resp *datacatalogpb.UnstarEntryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UnstarEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UnstarEntry, req, settings.GRPC, c.logger, "UnstarEntry") return err }, opts...) if err != nil { @@ -2487,7 +2492,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2505,7 +2510,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2523,7 +2528,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2541,7 +2546,7 @@ func (c *gRPCClient) ImportEntries(ctx context.Context, req *datacatalogpb.Impor var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportEntries, req, settings.GRPC, c.logger, "ImportEntries") return err }, opts...) if err != nil { @@ -2561,7 +2566,7 @@ func (c *gRPCClient) SetConfig(ctx context.Context, req *datacatalogpb.SetConfig var resp *datacatalogpb.MigrationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetConfig, req, settings.GRPC, c.logger, "SetConfig") return err }, opts...) if err != nil { @@ -2579,7 +2584,7 @@ func (c *gRPCClient) RetrieveConfig(ctx context.Context, req *datacatalogpb.Retr var resp *datacatalogpb.OrganizationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveConfig, req, settings.GRPC, c.logger, "RetrieveConfig") return err }, opts...) if err != nil { @@ -2597,7 +2602,7 @@ func (c *gRPCClient) RetrieveEffectiveConfig(ctx context.Context, req *datacatal var resp *datacatalogpb.MigrationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveEffectiveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveEffectiveConfig, req, settings.GRPC, c.logger, "RetrieveEffectiveConfig") return err }, opts...) if err != nil { @@ -2614,7 +2619,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2628,7 +2633,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2643,7 +2648,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2672,7 +2677,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2752,21 +2757,10 @@ func (c *restClient) SearchCatalog(ctx context.Context, req *datacatalogpb.Searc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchCatalog") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2864,17 +2858,7 @@ func (c *restClient) CreateEntryGroup(ctx context.Context, req *datacatalogpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntryGroup") if err != nil { return err } @@ -2930,17 +2914,7 @@ func (c *restClient) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntryGroup") if err != nil { return err } @@ -3008,17 +2982,7 @@ func (c *restClient) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntryGroup") if err != nil { return err } @@ -3072,15 +3036,8 @@ func (c *restClient) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntryGroup") + return err }, opts...) } @@ -3128,21 +3085,10 @@ func (c *restClient) ListEntryGroups(ctx context.Context, req *datacatalogpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntryGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3222,17 +3168,7 @@ func (c *restClient) CreateEntry(ctx context.Context, req *datacatalogpb.CreateE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntry") if err != nil { return err } @@ -3300,17 +3236,7 @@ func (c *restClient) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntry") if err != nil { return err } @@ -3361,15 +3287,8 @@ func (c *restClient) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntry") + return err }, opts...) } @@ -3401,17 +3320,7 @@ func (c *restClient) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntry") if err != nil { return err } @@ -3474,17 +3383,7 @@ func (c *restClient) LookupEntry(ctx context.Context, req *datacatalogpb.LookupE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupEntry") if err != nil { return err } @@ -3556,21 +3455,10 @@ func (c *restClient) ListEntries(ctx context.Context, req *datacatalogpb.ListEnt } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3638,17 +3526,7 @@ func (c *restClient) ModifyEntryOverview(ctx context.Context, req *datacatalogpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyEntryOverview") if err != nil { return err } @@ -3703,17 +3581,7 @@ func (c *restClient) ModifyEntryContacts(ctx context.Context, req *datacatalogpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyEntryContacts") if err != nil { return err } @@ -3775,17 +3643,7 @@ func (c *restClient) CreateTagTemplate(ctx context.Context, req *datacatalogpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagTemplate") if err != nil { return err } @@ -3830,17 +3688,7 @@ func (c *restClient) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagTemplate") if err != nil { return err } @@ -3911,17 +3759,7 @@ func (c *restClient) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagTemplate") if err != nil { return err } @@ -3972,15 +3810,8 @@ func (c *restClient) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagTemplate") + return err }, opts...) } @@ -4028,17 +3859,7 @@ func (c *restClient) CreateTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagTemplateField") if err != nil { return err } @@ -4108,17 +3929,7 @@ func (c *restClient) UpdateTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagTemplateField") if err != nil { return err } @@ -4173,17 +3984,7 @@ func (c *restClient) RenameTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTagTemplateField") if err != nil { return err } @@ -4236,17 +4037,7 @@ func (c *restClient) RenameTagTemplateFieldEnumValue(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTagTemplateFieldEnumValue") if err != nil { return err } @@ -4298,15 +4089,8 @@ func (c *restClient) DeleteTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagTemplateField") + return err }, opts...) } @@ -4357,17 +4141,7 @@ func (c *restClient) CreateTag(ctx context.Context, req *datacatalogpb.CreateTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTag") if err != nil { return err } @@ -4430,17 +4204,7 @@ func (c *restClient) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTag") if err != nil { return err } @@ -4482,15 +4246,8 @@ func (c *restClient) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTag") + return err }, opts...) } @@ -4540,21 +4297,10 @@ func (c *restClient) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTags") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4629,21 +4375,10 @@ func (c *restClient) ReconcileTags(ctx context.Context, req *datacatalogpb.Recon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReconcileTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4696,17 +4431,7 @@ func (c *restClient) StarEntry(ctx context.Context, req *datacatalogpb.StarEntry httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StarEntry") if err != nil { return err } @@ -4758,17 +4483,7 @@ func (c *restClient) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnstarEntry") if err != nil { return err } @@ -4837,17 +4552,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4921,17 +4626,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -4996,17 +4691,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5073,21 +4758,10 @@ func (c *restClient) ImportEntries(ctx context.Context, req *datacatalogpb.Impor httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportEntries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5140,17 +4814,7 @@ func (c *restClient) SetConfig(ctx context.Context, req *datacatalogpb.SetConfig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetConfig") if err != nil { return err } @@ -5197,17 +4861,7 @@ func (c *restClient) RetrieveConfig(ctx context.Context, req *datacatalogpb.Retr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveConfig") if err != nil { return err } @@ -5256,17 +4910,7 @@ func (c *restClient) RetrieveEffectiveConfig(ctx context.Context, req *datacatal httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveEffectiveConfig") if err != nil { return err } @@ -5308,15 +4952,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -5345,15 +4982,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -5385,17 +5015,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5459,21 +5079,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datacatalog/apiv1/data_catalog_client_example_go123_test.go b/datacatalog/apiv1/data_catalog_client_example_go123_test.go index 56faac912af2..534111957a7b 100644 --- a/datacatalog/apiv1/data_catalog_client_example_go123_test.go +++ b/datacatalog/apiv1/data_catalog_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListEntries_all() { } for resp, err := range c.ListEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListEntryGroups_all() { } for resp, err := range c.ListEntryGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListTags_all() { } for resp, err := range c.ListTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_SearchCatalog_all() { } for resp, err := range c.SearchCatalog(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/apiv1/datacatalogpb/bigquery.pb.go b/datacatalog/apiv1/datacatalogpb/bigquery.pb.go index 2dbc3eea16da..ab8cbfefd76e 100755 --- a/datacatalog/apiv1/datacatalogpb/bigquery.pb.go +++ b/datacatalog/apiv1/datacatalogpb/bigquery.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/bigquery.proto @@ -157,11 +157,9 @@ type BigQueryConnectionSpec struct { func (x *BigQueryConnectionSpec) Reset() { *x = BigQueryConnectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryConnectionSpec) String() string { @@ -172,7 +170,7 @@ func (*BigQueryConnectionSpec) ProtoMessage() {} func (x *BigQueryConnectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +240,9 @@ type CloudSqlBigQueryConnectionSpec struct { func (x *CloudSqlBigQueryConnectionSpec) Reset() { *x = CloudSqlBigQueryConnectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlBigQueryConnectionSpec) String() string { @@ -257,7 +253,7 @@ func (*CloudSqlBigQueryConnectionSpec) ProtoMessage() {} func (x *CloudSqlBigQueryConnectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type BigQueryRoutineSpec struct { func (x *BigQueryRoutineSpec) Reset() { *x = BigQueryRoutineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryRoutineSpec) String() string { @@ -320,7 +314,7 @@ func (*BigQueryRoutineSpec) ProtoMessage() {} func (x *BigQueryRoutineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,44 +442,6 @@ func file_google_cloud_datacatalog_v1_bigquery_proto_init() { if File_google_cloud_datacatalog_v1_bigquery_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryConnectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlBigQueryConnectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryRoutineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_bigquery_proto_msgTypes[0].OneofWrappers = []any{ (*BigQueryConnectionSpec_CloudSql)(nil), } diff --git a/datacatalog/apiv1/datacatalogpb/common.pb.go b/datacatalog/apiv1/datacatalogpb/common.pb.go index 3887845a0823..e0e5f7bf1d01 100755 --- a/datacatalog/apiv1/datacatalogpb/common.pb.go +++ b/datacatalog/apiv1/datacatalogpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/common.proto @@ -185,11 +185,9 @@ type PersonalDetails struct { func (x *PersonalDetails) Reset() { *x = PersonalDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalDetails) String() string { @@ -200,7 +198,7 @@ func (*PersonalDetails) ProtoMessage() {} func (x *PersonalDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,20 +312,6 @@ func file_google_cloud_datacatalog_v1_common_proto_init() { if File_google_cloud_datacatalog_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PersonalDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1/datacatalogpb/data_source.pb.go b/datacatalog/apiv1/datacatalogpb/data_source.pb.go index 9aaa5b848544..e8042f6e8441 100755 --- a/datacatalog/apiv1/datacatalogpb/data_source.pb.go +++ b/datacatalog/apiv1/datacatalogpb/data_source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/data_source.proto @@ -111,11 +111,9 @@ type DataSource struct { func (x *DataSource) Reset() { *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSource) String() string { @@ -126,7 +124,7 @@ func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +218,9 @@ type StorageProperties struct { func (x *StorageProperties) Reset() { *x = StorageProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageProperties) String() string { @@ -235,7 +231,7 @@ func (*StorageProperties) ProtoMessage() {} func (x *StorageProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,32 +347,6 @@ func file_google_cloud_datacatalog_v1_data_source_proto_init() { if File_google_cloud_datacatalog_v1_data_source_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StorageProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_data_source_proto_msgTypes[0].OneofWrappers = []any{ (*DataSource_StorageProperties)(nil), } diff --git a/datacatalog/apiv1/datacatalogpb/datacatalog.pb.go b/datacatalog/apiv1/datacatalogpb/datacatalog.pb.go index cc13d72f4e27..07f92e1c6c12 100755 --- a/datacatalog/apiv1/datacatalogpb/datacatalog.pb.go +++ b/datacatalog/apiv1/datacatalogpb/datacatalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/datacatalog.proto @@ -918,11 +918,9 @@ type SearchCatalogRequest struct { func (x *SearchCatalogRequest) Reset() { *x = SearchCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogRequest) String() string { @@ -933,7 +931,7 @@ func (*SearchCatalogRequest) ProtoMessage() {} func (x *SearchCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1015,11 +1013,9 @@ type SearchCatalogResponse struct { func (x *SearchCatalogResponse) Reset() { *x = SearchCatalogResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogResponse) String() string { @@ -1030,7 +1026,7 @@ func (*SearchCatalogResponse) ProtoMessage() {} func (x *SearchCatalogResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,11 +1094,9 @@ type CreateEntryGroupRequest struct { func (x *CreateEntryGroupRequest) Reset() { *x = CreateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryGroupRequest) String() string { @@ -1113,7 +1107,7 @@ func (*CreateEntryGroupRequest) ProtoMessage() {} func (x *CreateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1168,11 +1162,9 @@ type UpdateEntryGroupRequest struct { func (x *UpdateEntryGroupRequest) Reset() { *x = UpdateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryGroupRequest) String() string { @@ -1183,7 +1175,7 @@ func (*UpdateEntryGroupRequest) ProtoMessage() {} func (x *UpdateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1227,11 +1219,9 @@ type GetEntryGroupRequest struct { func (x *GetEntryGroupRequest) Reset() { *x = GetEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryGroupRequest) String() string { @@ -1242,7 +1232,7 @@ func (*GetEntryGroupRequest) ProtoMessage() {} func (x *GetEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1276,9 @@ type DeleteEntryGroupRequest struct { func (x *DeleteEntryGroupRequest) Reset() { *x = DeleteEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryGroupRequest) String() string { @@ -1301,7 +1289,7 @@ func (*DeleteEntryGroupRequest) ProtoMessage() {} func (x *DeleteEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1341,9 @@ type ListEntryGroupsRequest struct { func (x *ListEntryGroupsRequest) Reset() { *x = ListEntryGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsRequest) String() string { @@ -1368,7 +1354,7 @@ func (*ListEntryGroupsRequest) ProtoMessage() {} func (x *ListEntryGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,11 +1406,9 @@ type ListEntryGroupsResponse struct { func (x *ListEntryGroupsResponse) Reset() { *x = ListEntryGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsResponse) String() string { @@ -1435,7 +1419,7 @@ func (*ListEntryGroupsResponse) ProtoMessage() {} func (x *ListEntryGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1488,11 +1472,9 @@ type CreateEntryRequest struct { func (x *CreateEntryRequest) Reset() { *x = CreateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryRequest) String() string { @@ -1503,7 +1485,7 @@ func (*CreateEntryRequest) ProtoMessage() {} func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1564,9 @@ type UpdateEntryRequest struct { func (x *UpdateEntryRequest) Reset() { *x = UpdateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryRequest) String() string { @@ -1597,7 +1577,7 @@ func (*UpdateEntryRequest) ProtoMessage() {} func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1639,11 +1619,9 @@ type DeleteEntryRequest struct { func (x *DeleteEntryRequest) Reset() { *x = DeleteEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryRequest) String() string { @@ -1654,7 +1632,7 @@ func (*DeleteEntryRequest) ProtoMessage() {} func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,11 +1667,9 @@ type GetEntryRequest struct { func (x *GetEntryRequest) Reset() { *x = GetEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryRequest) String() string { @@ -1704,7 +1680,7 @@ func (*GetEntryRequest) ProtoMessage() {} func (x *GetEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1730,9 @@ type LookupEntryRequest struct { func (x *LookupEntryRequest) Reset() { *x = LookupEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEntryRequest) String() string { @@ -1769,7 +1743,7 @@ func (*LookupEntryRequest) ProtoMessage() {} func (x *LookupEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,11 +1997,9 @@ type Entry struct { func (x *Entry) Reset() { *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entry) String() string { @@ -2038,7 +2010,7 @@ func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2499,11 +2471,9 @@ type DatabaseTableSpec struct { func (x *DatabaseTableSpec) Reset() { *x = DatabaseTableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseTableSpec) String() string { @@ -2514,7 +2484,7 @@ func (*DatabaseTableSpec) ProtoMessage() {} func (x *DatabaseTableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2564,11 +2534,9 @@ type FilesetSpec struct { func (x *FilesetSpec) Reset() { *x = FilesetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilesetSpec) String() string { @@ -2579,7 +2547,7 @@ func (*FilesetSpec) ProtoMessage() {} func (x *FilesetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2616,11 +2584,9 @@ type DataSourceConnectionSpec struct { func (x *DataSourceConnectionSpec) Reset() { *x = DataSourceConnectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceConnectionSpec) String() string { @@ -2631,7 +2597,7 @@ func (*DataSourceConnectionSpec) ProtoMessage() {} func (x *DataSourceConnectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2685,11 +2651,9 @@ type RoutineSpec struct { func (x *RoutineSpec) Reset() { *x = RoutineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutineSpec) String() string { @@ -2700,7 +2664,7 @@ func (*RoutineSpec) ProtoMessage() {} func (x *RoutineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2792,11 +2756,9 @@ type DatasetSpec struct { func (x *DatasetSpec) Reset() { *x = DatasetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetSpec) String() string { @@ -2807,7 +2769,7 @@ func (*DatasetSpec) ProtoMessage() {} func (x *DatasetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2884,11 +2846,9 @@ type SqlDatabaseSystemSpec struct { func (x *SqlDatabaseSystemSpec) Reset() { *x = SqlDatabaseSystemSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlDatabaseSystemSpec) String() string { @@ -2899,7 +2859,7 @@ func (*SqlDatabaseSystemSpec) ProtoMessage() {} func (x *SqlDatabaseSystemSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2960,11 +2920,9 @@ type LookerSystemSpec struct { func (x *LookerSystemSpec) Reset() { *x = LookerSystemSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookerSystemSpec) String() string { @@ -2975,7 +2933,7 @@ func (*LookerSystemSpec) ProtoMessage() {} func (x *LookerSystemSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3047,11 +3005,9 @@ type CloudBigtableSystemSpec struct { func (x *CloudBigtableSystemSpec) Reset() { *x = CloudBigtableSystemSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudBigtableSystemSpec) String() string { @@ -3062,7 +3018,7 @@ func (*CloudBigtableSystemSpec) ProtoMessage() {} func (x *CloudBigtableSystemSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3098,11 +3054,9 @@ type CloudBigtableInstanceSpec struct { func (x *CloudBigtableInstanceSpec) Reset() { *x = CloudBigtableInstanceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudBigtableInstanceSpec) String() string { @@ -3113,7 +3067,7 @@ func (*CloudBigtableInstanceSpec) ProtoMessage() {} func (x *CloudBigtableInstanceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3152,11 +3106,9 @@ type ServiceSpec struct { func (x *ServiceSpec) Reset() { *x = ServiceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceSpec) String() string { @@ -3167,7 +3119,7 @@ func (*ServiceSpec) ProtoMessage() {} func (x *ServiceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3224,11 +3176,9 @@ type VertexModelSourceInfo struct { func (x *VertexModelSourceInfo) Reset() { *x = VertexModelSourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexModelSourceInfo) String() string { @@ -3239,7 +3189,7 @@ func (*VertexModelSourceInfo) ProtoMessage() {} func (x *VertexModelSourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3290,11 +3240,9 @@ type VertexModelSpec struct { func (x *VertexModelSpec) Reset() { *x = VertexModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexModelSpec) String() string { @@ -3305,7 +3253,7 @@ func (*VertexModelSpec) ProtoMessage() {} func (x *VertexModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3370,11 +3318,9 @@ type VertexDatasetSpec struct { func (x *VertexDatasetSpec) Reset() { *x = VertexDatasetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexDatasetSpec) String() string { @@ -3385,7 +3331,7 @@ func (*VertexDatasetSpec) ProtoMessage() {} func (x *VertexDatasetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3431,11 +3377,9 @@ type ModelSpec struct { func (x *ModelSpec) Reset() { *x = ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelSpec) String() string { @@ -3446,7 +3390,7 @@ func (*ModelSpec) ProtoMessage() {} func (x *ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3499,11 +3443,9 @@ type FeatureOnlineStoreSpec struct { func (x *FeatureOnlineStoreSpec) Reset() { *x = FeatureOnlineStoreSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureOnlineStoreSpec) String() string { @@ -3514,7 +3456,7 @@ func (*FeatureOnlineStoreSpec) ProtoMessage() {} func (x *FeatureOnlineStoreSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3550,11 +3492,9 @@ type BusinessContext struct { func (x *BusinessContext) Reset() { *x = BusinessContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BusinessContext) String() string { @@ -3565,7 +3505,7 @@ func (*BusinessContext) ProtoMessage() {} func (x *BusinessContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3612,11 +3552,9 @@ type EntryOverview struct { func (x *EntryOverview) Reset() { *x = EntryOverview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryOverview) String() string { @@ -3627,7 +3565,7 @@ func (*EntryOverview) ProtoMessage() {} func (x *EntryOverview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3661,11 +3599,9 @@ type Contacts struct { func (x *Contacts) Reset() { *x = Contacts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Contacts) String() string { @@ -3676,7 +3612,7 @@ func (*Contacts) ProtoMessage() {} func (x *Contacts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3731,11 +3667,9 @@ type EntryGroup struct { func (x *EntryGroup) Reset() { *x = EntryGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryGroup) String() string { @@ -3746,7 +3680,7 @@ func (*EntryGroup) ProtoMessage() {} func (x *EntryGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3818,11 +3752,9 @@ type CreateTagTemplateRequest struct { func (x *CreateTagTemplateRequest) Reset() { *x = CreateTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagTemplateRequest) String() string { @@ -3833,7 +3765,7 @@ func (*CreateTagTemplateRequest) ProtoMessage() {} func (x *CreateTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3882,11 +3814,9 @@ type GetTagTemplateRequest struct { func (x *GetTagTemplateRequest) Reset() { *x = GetTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagTemplateRequest) String() string { @@ -3897,7 +3827,7 @@ func (*GetTagTemplateRequest) ProtoMessage() {} func (x *GetTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3942,11 +3872,9 @@ type UpdateTagTemplateRequest struct { func (x *UpdateTagTemplateRequest) Reset() { *x = UpdateTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagTemplateRequest) String() string { @@ -3957,7 +3885,7 @@ func (*UpdateTagTemplateRequest) ProtoMessage() {} func (x *UpdateTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4003,11 +3931,9 @@ type DeleteTagTemplateRequest struct { func (x *DeleteTagTemplateRequest) Reset() { *x = DeleteTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagTemplateRequest) String() string { @@ -4018,7 +3944,7 @@ func (*DeleteTagTemplateRequest) ProtoMessage() {} func (x *DeleteTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4068,11 +3994,9 @@ type CreateTagRequest struct { func (x *CreateTagRequest) Reset() { *x = CreateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagRequest) String() string { @@ -4083,7 +4007,7 @@ func (*CreateTagRequest) ProtoMessage() {} func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4132,11 +4056,9 @@ type UpdateTagRequest struct { func (x *UpdateTagRequest) Reset() { *x = UpdateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagRequest) String() string { @@ -4147,7 +4069,7 @@ func (*UpdateTagRequest) ProtoMessage() {} func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4189,11 +4111,9 @@ type DeleteTagRequest struct { func (x *DeleteTagRequest) Reset() { *x = DeleteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagRequest) String() string { @@ -4204,7 +4124,7 @@ func (*DeleteTagRequest) ProtoMessage() {} func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4251,11 +4171,9 @@ type CreateTagTemplateFieldRequest struct { func (x *CreateTagTemplateFieldRequest) Reset() { *x = CreateTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagTemplateFieldRequest) String() string { @@ -4266,7 +4184,7 @@ func (*CreateTagTemplateFieldRequest) ProtoMessage() {} func (x *CreateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4334,11 +4252,9 @@ type UpdateTagTemplateFieldRequest struct { func (x *UpdateTagTemplateFieldRequest) Reset() { *x = UpdateTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagTemplateFieldRequest) String() string { @@ -4349,7 +4265,7 @@ func (*UpdateTagTemplateFieldRequest) ProtoMessage() {} func (x *UpdateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4401,11 +4317,9 @@ type RenameTagTemplateFieldRequest struct { func (x *RenameTagTemplateFieldRequest) Reset() { *x = RenameTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTagTemplateFieldRequest) String() string { @@ -4416,7 +4330,7 @@ func (*RenameTagTemplateFieldRequest) ProtoMessage() {} func (x *RenameTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4461,11 +4375,9 @@ type RenameTagTemplateFieldEnumValueRequest struct { func (x *RenameTagTemplateFieldEnumValueRequest) Reset() { *x = RenameTagTemplateFieldEnumValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTagTemplateFieldEnumValueRequest) String() string { @@ -4476,7 +4388,7 @@ func (*RenameTagTemplateFieldEnumValueRequest) ProtoMessage() {} func (x *RenameTagTemplateFieldEnumValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4522,11 +4434,9 @@ type DeleteTagTemplateFieldRequest struct { func (x *DeleteTagTemplateFieldRequest) Reset() { *x = DeleteTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagTemplateFieldRequest) String() string { @@ -4537,7 +4447,7 @@ func (*DeleteTagTemplateFieldRequest) ProtoMessage() {} func (x *DeleteTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4588,11 +4498,9 @@ type ListTagsRequest struct { func (x *ListTagsRequest) Reset() { *x = ListTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsRequest) String() string { @@ -4603,7 +4511,7 @@ func (*ListTagsRequest) ProtoMessage() {} func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4655,11 +4563,9 @@ type ListTagsResponse struct { func (x *ListTagsResponse) Reset() { *x = ListTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsResponse) String() string { @@ -4670,7 +4576,7 @@ func (*ListTagsResponse) ProtoMessage() {} func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4723,11 +4629,9 @@ type ReconcileTagsRequest struct { func (x *ReconcileTagsRequest) Reset() { *x = ReconcileTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReconcileTagsRequest) String() string { @@ -4738,7 +4642,7 @@ func (*ReconcileTagsRequest) ProtoMessage() {} func (x *ReconcileTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4799,11 +4703,9 @@ type ReconcileTagsResponse struct { func (x *ReconcileTagsResponse) Reset() { *x = ReconcileTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReconcileTagsResponse) String() string { @@ -4814,7 +4716,7 @@ func (*ReconcileTagsResponse) ProtoMessage() {} func (x *ReconcileTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4867,11 +4769,9 @@ type ReconcileTagsMetadata struct { func (x *ReconcileTagsMetadata) Reset() { *x = ReconcileTagsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReconcileTagsMetadata) String() string { @@ -4882,7 +4782,7 @@ func (*ReconcileTagsMetadata) ProtoMessage() {} func (x *ReconcileTagsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4938,11 +4838,9 @@ type ListEntriesRequest struct { func (x *ListEntriesRequest) Reset() { *x = ListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesRequest) String() string { @@ -4953,7 +4851,7 @@ func (*ListEntriesRequest) ProtoMessage() {} func (x *ListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5012,11 +4910,9 @@ type ListEntriesResponse struct { func (x *ListEntriesResponse) Reset() { *x = ListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesResponse) String() string { @@ -5027,7 +4923,7 @@ func (*ListEntriesResponse) ProtoMessage() {} func (x *ListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5069,11 +4965,9 @@ type StarEntryRequest struct { func (x *StarEntryRequest) Reset() { *x = StarEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StarEntryRequest) String() string { @@ -5084,7 +4978,7 @@ func (*StarEntryRequest) ProtoMessage() {} func (x *StarEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5117,11 +5011,9 @@ type StarEntryResponse struct { func (x *StarEntryResponse) Reset() { *x = StarEntryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StarEntryResponse) String() string { @@ -5132,7 +5024,7 @@ func (*StarEntryResponse) ProtoMessage() {} func (x *StarEntryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5160,11 +5052,9 @@ type UnstarEntryRequest struct { func (x *UnstarEntryRequest) Reset() { *x = UnstarEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnstarEntryRequest) String() string { @@ -5175,7 +5065,7 @@ func (*UnstarEntryRequest) ProtoMessage() {} func (x *UnstarEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5208,11 +5098,9 @@ type UnstarEntryResponse struct { func (x *UnstarEntryResponse) Reset() { *x = UnstarEntryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnstarEntryResponse) String() string { @@ -5223,7 +5111,7 @@ func (*UnstarEntryResponse) ProtoMessage() {} func (x *UnstarEntryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5261,11 +5149,9 @@ type ImportEntriesRequest struct { func (x *ImportEntriesRequest) Reset() { *x = ImportEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntriesRequest) String() string { @@ -5276,7 +5162,7 @@ func (*ImportEntriesRequest) ProtoMessage() {} func (x *ImportEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5347,11 +5233,9 @@ type ImportEntriesResponse struct { func (x *ImportEntriesResponse) Reset() { *x = ImportEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntriesResponse) String() string { @@ -5362,7 +5246,7 @@ func (*ImportEntriesResponse) ProtoMessage() {} func (x *ImportEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5410,11 +5294,9 @@ type ImportEntriesMetadata struct { func (x *ImportEntriesMetadata) Reset() { *x = ImportEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntriesMetadata) String() string { @@ -5425,7 +5307,7 @@ func (*ImportEntriesMetadata) ProtoMessage() {} func (x *ImportEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5469,11 +5351,9 @@ type ModifyEntryOverviewRequest struct { func (x *ModifyEntryOverviewRequest) Reset() { *x = ModifyEntryOverviewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyEntryOverviewRequest) String() string { @@ -5484,7 +5364,7 @@ func (*ModifyEntryOverviewRequest) ProtoMessage() {} func (x *ModifyEntryOverviewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5528,11 +5408,9 @@ type ModifyEntryContactsRequest struct { func (x *ModifyEntryContactsRequest) Reset() { *x = ModifyEntryContactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyEntryContactsRequest) String() string { @@ -5543,7 +5421,7 @@ func (*ModifyEntryContactsRequest) ProtoMessage() {} func (x *ModifyEntryContactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5592,11 +5470,9 @@ type SetConfigRequest struct { func (x *SetConfigRequest) Reset() { *x = SetConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetConfigRequest) String() string { @@ -5607,7 +5483,7 @@ func (*SetConfigRequest) ProtoMessage() {} func (x *SetConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5681,11 +5557,9 @@ type RetrieveConfigRequest struct { func (x *RetrieveConfigRequest) Reset() { *x = RetrieveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveConfigRequest) String() string { @@ -5696,7 +5570,7 @@ func (*RetrieveConfigRequest) ProtoMessage() {} func (x *RetrieveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5731,11 +5605,9 @@ type RetrieveEffectiveConfigRequest struct { func (x *RetrieveEffectiveConfigRequest) Reset() { *x = RetrieveEffectiveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveEffectiveConfigRequest) String() string { @@ -5746,7 +5618,7 @@ func (*RetrieveEffectiveConfigRequest) ProtoMessage() {} func (x *RetrieveEffectiveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5785,11 +5657,9 @@ type OrganizationConfig struct { func (x *OrganizationConfig) Reset() { *x = OrganizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationConfig) String() string { @@ -5800,7 +5670,7 @@ func (*OrganizationConfig) ProtoMessage() {} func (x *OrganizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5840,11 +5710,9 @@ type MigrationConfig struct { func (x *MigrationConfig) Reset() { *x = MigrationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationConfig) String() string { @@ -5855,7 +5723,7 @@ func (*MigrationConfig) ProtoMessage() {} func (x *MigrationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5931,11 +5799,9 @@ type SearchCatalogRequest_Scope struct { func (x *SearchCatalogRequest_Scope) Reset() { *x = SearchCatalogRequest_Scope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogRequest_Scope) String() string { @@ -5946,7 +5812,7 @@ func (*SearchCatalogRequest_Scope) ProtoMessage() {} func (x *SearchCatalogRequest_Scope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6023,11 +5889,9 @@ type DatabaseTableSpec_DatabaseViewSpec struct { func (x *DatabaseTableSpec_DatabaseViewSpec) Reset() { *x = DatabaseTableSpec_DatabaseViewSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseTableSpec_DatabaseViewSpec) String() string { @@ -6038,7 +5902,7 @@ func (*DatabaseTableSpec_DatabaseViewSpec) ProtoMessage() {} func (x *DatabaseTableSpec_DatabaseViewSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6119,11 +5983,9 @@ type RoutineSpec_Argument struct { func (x *RoutineSpec_Argument) Reset() { *x = RoutineSpec_Argument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutineSpec_Argument) String() string { @@ -6134,7 +5996,7 @@ func (*RoutineSpec_Argument) ProtoMessage() {} func (x *RoutineSpec_Argument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6188,11 +6050,9 @@ type CloudBigtableInstanceSpec_CloudBigtableClusterSpec struct { func (x *CloudBigtableInstanceSpec_CloudBigtableClusterSpec) Reset() { *x = CloudBigtableInstanceSpec_CloudBigtableClusterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudBigtableInstanceSpec_CloudBigtableClusterSpec) String() string { @@ -6203,7 +6063,7 @@ func (*CloudBigtableInstanceSpec_CloudBigtableClusterSpec) ProtoMessage() {} func (x *CloudBigtableInstanceSpec_CloudBigtableClusterSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6261,11 +6121,9 @@ type Contacts_Person struct { func (x *Contacts_Person) Reset() { *x = Contacts_Person{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Contacts_Person) String() string { @@ -6276,7 +6134,7 @@ func (*Contacts_Person) ProtoMessage() {} func (x *Contacts_Person) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8220,860 +8078,6 @@ func file_google_cloud_datacatalog_v1_datacatalog_proto_init() { file_google_cloud_datacatalog_v1_tags_proto_init() file_google_cloud_datacatalog_v1_timestamps_proto_init() file_google_cloud_datacatalog_v1_usage_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LookupEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseTableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FilesetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceConnectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RoutineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DatasetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SqlDatabaseSystemSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*LookerSystemSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CloudBigtableSystemSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CloudBigtableInstanceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ServiceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*VertexModelSourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*VertexModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*VertexDatasetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*FeatureOnlineStoreSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BusinessContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*EntryOverview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Contacts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*EntryGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GetTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RenameTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*RenameTagTemplateFieldEnumValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ReconcileTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ReconcileTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ReconcileTagsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*StarEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*StarEntryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*UnstarEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*UnstarEntryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*ModifyEntryOverviewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ModifyEntryContactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*SetConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveEffectiveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*MigrationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogRequest_Scope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseTableSpec_DatabaseViewSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*RoutineSpec_Argument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*CloudBigtableInstanceSpec_CloudBigtableClusterSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*Contacts_Person); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_datacatalog_proto_msgTypes[12].OneofWrappers = []any{ (*LookupEntryRequest_LinkedResource)(nil), (*LookupEntryRequest_SqlResource)(nil), diff --git a/datacatalog/apiv1/datacatalogpb/dataplex_spec.pb.go b/datacatalog/apiv1/datacatalogpb/dataplex_spec.pb.go index 09d42cb2a4fc..9748e0848182 100755 --- a/datacatalog/apiv1/datacatalogpb/dataplex_spec.pb.go +++ b/datacatalog/apiv1/datacatalogpb/dataplex_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/dataplex_spec.proto @@ -57,11 +57,9 @@ type DataplexSpec struct { func (x *DataplexSpec) Reset() { *x = DataplexSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexSpec) String() string { @@ -72,7 +70,7 @@ func (*DataplexSpec) ProtoMessage() {} func (x *DataplexSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type DataplexFilesetSpec struct { func (x *DataplexFilesetSpec) Reset() { *x = DataplexFilesetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexFilesetSpec) String() string { @@ -142,7 +138,7 @@ func (*DataplexFilesetSpec) ProtoMessage() {} func (x *DataplexFilesetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +179,9 @@ type DataplexTableSpec struct { func (x *DataplexTableSpec) Reset() { *x = DataplexTableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexTableSpec) String() string { @@ -198,7 +192,7 @@ func (*DataplexTableSpec) ProtoMessage() {} func (x *DataplexTableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +252,9 @@ type DataplexExternalTable struct { func (x *DataplexExternalTable) Reset() { *x = DataplexExternalTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexExternalTable) String() string { @@ -273,7 +265,7 @@ func (*DataplexExternalTable) ProtoMessage() {} func (x *DataplexExternalTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,56 +428,6 @@ func file_google_cloud_datacatalog_v1_dataplex_spec_proto_init() { } file_google_cloud_datacatalog_v1_common_proto_init() file_google_cloud_datacatalog_v1_physical_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataplexSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataplexFilesetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataplexTableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_dataplex_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataplexExternalTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1/datacatalogpb/dump_content.pb.go b/datacatalog/apiv1/datacatalogpb/dump_content.pb.go index 98f84f83cf9e..18d9f49c9a90 100755 --- a/datacatalog/apiv1/datacatalogpb/dump_content.pb.go +++ b/datacatalog/apiv1/datacatalogpb/dump_content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/dump_content.proto @@ -59,11 +59,9 @@ type TaggedEntry struct { func (x *TaggedEntry) Reset() { *x = TaggedEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaggedEntry) String() string { @@ -74,7 +72,7 @@ func (*TaggedEntry) ProtoMessage() {} func (x *TaggedEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type DumpItem struct { func (x *DumpItem) Reset() { *x = DumpItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DumpItem) String() string { @@ -157,7 +153,7 @@ func (*DumpItem) ProtoMessage() {} func (x *DumpItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,32 +284,6 @@ func file_google_cloud_datacatalog_v1_dump_content_proto_init() { } file_google_cloud_datacatalog_v1_datacatalog_proto_init() file_google_cloud_datacatalog_v1_tags_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TaggedEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DumpItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_dump_content_proto_msgTypes[0].OneofWrappers = []any{ (*TaggedEntry_V1Entry)(nil), } diff --git a/datacatalog/apiv1/datacatalogpb/gcs_fileset_spec.pb.go b/datacatalog/apiv1/datacatalogpb/gcs_fileset_spec.pb.go index 2978347a1953..28d3e2425905 100755 --- a/datacatalog/apiv1/datacatalogpb/gcs_fileset_spec.pb.go +++ b/datacatalog/apiv1/datacatalogpb/gcs_fileset_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/gcs_fileset_spec.proto @@ -79,11 +79,9 @@ type GcsFilesetSpec struct { func (x *GcsFilesetSpec) Reset() { *x = GcsFilesetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFilesetSpec) String() string { @@ -94,7 +92,7 @@ func (*GcsFilesetSpec) ProtoMessage() {} func (x *GcsFilesetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type GcsFileSpec struct { func (x *GcsFileSpec) Reset() { *x = GcsFileSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFileSpec) String() string { @@ -155,7 +151,7 @@ func (*GcsFileSpec) ProtoMessage() {} func (x *GcsFileSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -274,32 +270,6 @@ func file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_init() { return } file_google_cloud_datacatalog_v1_timestamps_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsFilesetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_gcs_fileset_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsFileSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1/datacatalogpb/physical_schema.pb.go b/datacatalog/apiv1/datacatalogpb/physical_schema.pb.go index 0fb0211ecb7b..51dd3496c8a0 100755 --- a/datacatalog/apiv1/datacatalogpb/physical_schema.pb.go +++ b/datacatalog/apiv1/datacatalogpb/physical_schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/physical_schema.proto @@ -55,11 +55,9 @@ type PhysicalSchema struct { func (x *PhysicalSchema) Reset() { *x = PhysicalSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema) String() string { @@ -70,7 +68,7 @@ func (*PhysicalSchema) ProtoMessage() {} func (x *PhysicalSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type PhysicalSchema_AvroSchema struct { func (x *PhysicalSchema_AvroSchema) Reset() { *x = PhysicalSchema_AvroSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_AvroSchema) String() string { @@ -207,7 +203,7 @@ func (*PhysicalSchema_AvroSchema) ProtoMessage() {} func (x *PhysicalSchema_AvroSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +237,9 @@ type PhysicalSchema_ThriftSchema struct { func (x *PhysicalSchema_ThriftSchema) Reset() { *x = PhysicalSchema_ThriftSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_ThriftSchema) String() string { @@ -256,7 +250,7 @@ func (*PhysicalSchema_ThriftSchema) ProtoMessage() {} func (x *PhysicalSchema_ThriftSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type PhysicalSchema_ProtobufSchema struct { func (x *PhysicalSchema_ProtobufSchema) Reset() { *x = PhysicalSchema_ProtobufSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_ProtobufSchema) String() string { @@ -305,7 +297,7 @@ func (*PhysicalSchema_ProtobufSchema) ProtoMessage() {} func (x *PhysicalSchema_ProtobufSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +328,9 @@ type PhysicalSchema_ParquetSchema struct { func (x *PhysicalSchema_ParquetSchema) Reset() { *x = PhysicalSchema_ParquetSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_ParquetSchema) String() string { @@ -351,7 +341,7 @@ func (*PhysicalSchema_ParquetSchema) ProtoMessage() {} func (x *PhysicalSchema_ParquetSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +365,9 @@ type PhysicalSchema_OrcSchema struct { func (x *PhysicalSchema_OrcSchema) Reset() { *x = PhysicalSchema_OrcSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_OrcSchema) String() string { @@ -390,7 +378,7 @@ func (*PhysicalSchema_OrcSchema) ProtoMessage() {} func (x *PhysicalSchema_OrcSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +402,9 @@ type PhysicalSchema_CsvSchema struct { func (x *PhysicalSchema_CsvSchema) Reset() { *x = PhysicalSchema_CsvSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalSchema_CsvSchema) String() string { @@ -429,7 +415,7 @@ func (*PhysicalSchema_CsvSchema) ProtoMessage() {} func (x *PhysicalSchema_CsvSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,92 +537,6 @@ func file_google_cloud_datacatalog_v1_physical_schema_proto_init() { if File_google_cloud_datacatalog_v1_physical_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_AvroSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_ThriftSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_ProtobufSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_ParquetSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_OrcSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalSchema_CsvSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_physical_schema_proto_msgTypes[0].OneofWrappers = []any{ (*PhysicalSchema_Avro)(nil), (*PhysicalSchema_Thrift)(nil), diff --git a/datacatalog/apiv1/datacatalogpb/policytagmanager.pb.go b/datacatalog/apiv1/datacatalogpb/policytagmanager.pb.go index a0a2cb00d3dd..b2fe683c0c83 100755 --- a/datacatalog/apiv1/datacatalogpb/policytagmanager.pb.go +++ b/datacatalog/apiv1/datacatalogpb/policytagmanager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/policytagmanager.proto @@ -157,11 +157,9 @@ type Taxonomy struct { func (x *Taxonomy) Reset() { *x = Taxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Taxonomy) String() string { @@ -172,7 +170,7 @@ func (*Taxonomy) ProtoMessage() {} func (x *Taxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +281,9 @@ type PolicyTag struct { func (x *PolicyTag) Reset() { *x = PolicyTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyTag) String() string { @@ -298,7 +294,7 @@ func (*PolicyTag) ProtoMessage() {} func (x *PolicyTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +359,9 @@ type CreateTaxonomyRequest struct { func (x *CreateTaxonomyRequest) Reset() { *x = CreateTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaxonomyRequest) String() string { @@ -378,7 +372,7 @@ func (*CreateTaxonomyRequest) ProtoMessage() {} func (x *CreateTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +416,9 @@ type DeleteTaxonomyRequest struct { func (x *DeleteTaxonomyRequest) Reset() { *x = DeleteTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaxonomyRequest) String() string { @@ -437,7 +429,7 @@ func (*DeleteTaxonomyRequest) ProtoMessage() {} func (x *DeleteTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +471,9 @@ type UpdateTaxonomyRequest struct { func (x *UpdateTaxonomyRequest) Reset() { *x = UpdateTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTaxonomyRequest) String() string { @@ -494,7 +484,7 @@ func (*UpdateTaxonomyRequest) ProtoMessage() {} func (x *UpdateTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +537,9 @@ type ListTaxonomiesRequest struct { func (x *ListTaxonomiesRequest) Reset() { *x = ListTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTaxonomiesRequest) String() string { @@ -562,7 +550,7 @@ func (*ListTaxonomiesRequest) ProtoMessage() {} func (x *ListTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,11 +609,9 @@ type ListTaxonomiesResponse struct { func (x *ListTaxonomiesResponse) Reset() { *x = ListTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTaxonomiesResponse) String() string { @@ -636,7 +622,7 @@ func (*ListTaxonomiesResponse) ProtoMessage() {} func (x *ListTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +664,9 @@ type GetTaxonomyRequest struct { func (x *GetTaxonomyRequest) Reset() { *x = GetTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaxonomyRequest) String() string { @@ -693,7 +677,7 @@ func (*GetTaxonomyRequest) ProtoMessage() {} func (x *GetTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +714,9 @@ type CreatePolicyTagRequest struct { func (x *CreatePolicyTagRequest) Reset() { *x = CreatePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePolicyTagRequest) String() string { @@ -745,7 +727,7 @@ func (*CreatePolicyTagRequest) ProtoMessage() {} func (x *CreatePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +771,9 @@ type DeletePolicyTagRequest struct { func (x *DeletePolicyTagRequest) Reset() { *x = DeletePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePolicyTagRequest) String() string { @@ -804,7 +784,7 @@ func (*DeletePolicyTagRequest) ProtoMessage() {} func (x *DeletePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +827,9 @@ type UpdatePolicyTagRequest struct { func (x *UpdatePolicyTagRequest) Reset() { *x = UpdatePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyTagRequest) String() string { @@ -862,7 +840,7 @@ func (*UpdatePolicyTagRequest) ProtoMessage() {} func (x *UpdatePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -913,11 +891,9 @@ type ListPolicyTagsRequest struct { func (x *ListPolicyTagsRequest) Reset() { *x = ListPolicyTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyTagsRequest) String() string { @@ -928,7 +904,7 @@ func (*ListPolicyTagsRequest) ProtoMessage() {} func (x *ListPolicyTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,11 +956,9 @@ type ListPolicyTagsResponse struct { func (x *ListPolicyTagsResponse) Reset() { *x = ListPolicyTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyTagsResponse) String() string { @@ -995,7 +969,7 @@ func (*ListPolicyTagsResponse) ProtoMessage() {} func (x *ListPolicyTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1011,9 @@ type GetPolicyTagRequest struct { func (x *GetPolicyTagRequest) Reset() { *x = GetPolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyTagRequest) String() string { @@ -1052,7 +1024,7 @@ func (*GetPolicyTagRequest) ProtoMessage() {} func (x *GetPolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1060,9 @@ type Taxonomy_Service struct { func (x *Taxonomy_Service) Reset() { *x = Taxonomy_Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Taxonomy_Service) String() string { @@ -1103,7 +1073,7 @@ func (*Taxonomy_Service) ProtoMessage() {} func (x *Taxonomy_Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1611,188 +1581,6 @@ func file_google_cloud_datacatalog_v1_policytagmanager_proto_init() { } file_google_cloud_datacatalog_v1_common_proto_init() file_google_cloud_datacatalog_v1_timestamps_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Taxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PolicyTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreatePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeletePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Taxonomy_Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1/datacatalogpb/policytagmanagerserialization.pb.go b/datacatalog/apiv1/datacatalogpb/policytagmanagerserialization.pb.go index d5e08f65ea4f..5a624d86afe1 100755 --- a/datacatalog/apiv1/datacatalogpb/policytagmanagerserialization.pb.go +++ b/datacatalog/apiv1/datacatalogpb/policytagmanagerserialization.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto @@ -62,11 +62,9 @@ type SerializedTaxonomy struct { func (x *SerializedTaxonomy) Reset() { *x = SerializedTaxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerializedTaxonomy) String() string { @@ -77,7 +75,7 @@ func (*SerializedTaxonomy) ProtoMessage() {} func (x *SerializedTaxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type SerializedPolicyTag struct { func (x *SerializedPolicyTag) Reset() { *x = SerializedPolicyTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerializedPolicyTag) String() string { @@ -159,7 +155,7 @@ func (*SerializedPolicyTag) ProtoMessage() {} func (x *SerializedPolicyTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type ReplaceTaxonomyRequest struct { func (x *ReplaceTaxonomyRequest) Reset() { *x = ReplaceTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceTaxonomyRequest) String() string { @@ -232,7 +226,7 @@ func (*ReplaceTaxonomyRequest) ProtoMessage() {} func (x *ReplaceTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +276,9 @@ type ImportTaxonomiesRequest struct { func (x *ImportTaxonomiesRequest) Reset() { *x = ImportTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTaxonomiesRequest) String() string { @@ -297,7 +289,7 @@ func (*ImportTaxonomiesRequest) ProtoMessage() {} func (x *ImportTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type InlineSource struct { func (x *InlineSource) Reset() { *x = InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineSource) String() string { @@ -385,7 +375,7 @@ func (*InlineSource) ProtoMessage() {} func (x *InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,11 +410,9 @@ type CrossRegionalSource struct { func (x *CrossRegionalSource) Reset() { *x = CrossRegionalSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CrossRegionalSource) String() string { @@ -435,7 +423,7 @@ func (*CrossRegionalSource) ProtoMessage() {} func (x *CrossRegionalSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +458,9 @@ type ImportTaxonomiesResponse struct { func (x *ImportTaxonomiesResponse) Reset() { *x = ImportTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTaxonomiesResponse) String() string { @@ -485,7 +471,7 @@ func (*ImportTaxonomiesResponse) ProtoMessage() {} func (x *ImportTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +515,9 @@ type ExportTaxonomiesRequest struct { func (x *ExportTaxonomiesRequest) Reset() { *x = ExportTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTaxonomiesRequest) String() string { @@ -544,7 +528,7 @@ func (*ExportTaxonomiesRequest) ProtoMessage() {} func (x *ExportTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +596,9 @@ type ExportTaxonomiesResponse struct { func (x *ExportTaxonomiesResponse) Reset() { *x = ExportTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTaxonomiesResponse) String() string { @@ -627,7 +609,7 @@ func (*ExportTaxonomiesResponse) ProtoMessage() {} func (x *ExportTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,116 +868,6 @@ func file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_init() return } file_google_cloud_datacatalog_v1_policytagmanager_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SerializedTaxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SerializedPolicyTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CrossRegionalSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_policytagmanagerserialization_proto_msgTypes[3].OneofWrappers = []any{ (*ImportTaxonomiesRequest_InlineSource)(nil), (*ImportTaxonomiesRequest_CrossRegionalSource)(nil), diff --git a/datacatalog/apiv1/datacatalogpb/schema.pb.go b/datacatalog/apiv1/datacatalogpb/schema.pb.go index 8d14c92f75d7..1960ad1216cb 100755 --- a/datacatalog/apiv1/datacatalogpb/schema.pb.go +++ b/datacatalog/apiv1/datacatalogpb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/schema.proto @@ -177,11 +177,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -192,7 +190,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +268,9 @@ type ColumnSchema struct { func (x *ColumnSchema) Reset() { *x = ColumnSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSchema) String() string { @@ -285,7 +281,7 @@ func (*ColumnSchema) ProtoMessage() {} func (x *ColumnSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +403,9 @@ type ColumnSchema_LookerColumnSpec struct { func (x *ColumnSchema_LookerColumnSpec) Reset() { *x = ColumnSchema_LookerColumnSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSchema_LookerColumnSpec) String() string { @@ -422,7 +416,7 @@ func (*ColumnSchema_LookerColumnSpec) ProtoMessage() {} func (x *ColumnSchema_LookerColumnSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +451,9 @@ type ColumnSchema_FieldElementType struct { func (x *ColumnSchema_FieldElementType) Reset() { *x = ColumnSchema_FieldElementType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSchema_FieldElementType) String() string { @@ -472,7 +464,7 @@ func (*ColumnSchema_FieldElementType) ProtoMessage() {} func (x *ColumnSchema_FieldElementType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_schema_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,56 +628,6 @@ func file_google_cloud_datacatalog_v1_schema_proto_init() { if File_google_cloud_datacatalog_v1_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_schema_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSchema_LookerColumnSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_schema_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSchema_FieldElementType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_schema_proto_msgTypes[1].OneofWrappers = []any{ (*ColumnSchema_LookerColumnSpec_)(nil), } diff --git a/datacatalog/apiv1/datacatalogpb/search.pb.go b/datacatalog/apiv1/datacatalogpb/search.pb.go index 3ca7ad5787aa..606f9f1b7aec 100755 --- a/datacatalog/apiv1/datacatalogpb/search.pb.go +++ b/datacatalog/apiv1/datacatalogpb/search.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/search.proto @@ -165,11 +165,9 @@ type SearchCatalogResult struct { func (x *SearchCatalogResult) Reset() { *x = SearchCatalogResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_search_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_search_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogResult) String() string { @@ -180,7 +178,7 @@ func (*SearchCatalogResult) ProtoMessage() {} func (x *SearchCatalogResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_search_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,20 +400,6 @@ func file_google_cloud_datacatalog_v1_search_proto_init() { return } file_google_cloud_datacatalog_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_search_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_search_proto_msgTypes[0].OneofWrappers = []any{ (*SearchCatalogResult_IntegratedSystem)(nil), (*SearchCatalogResult_UserSpecifiedSystem)(nil), diff --git a/datacatalog/apiv1/datacatalogpb/table_spec.pb.go b/datacatalog/apiv1/datacatalogpb/table_spec.pb.go index 564d382f6a4b..de4afaad22a4 100755 --- a/datacatalog/apiv1/datacatalogpb/table_spec.pb.go +++ b/datacatalog/apiv1/datacatalogpb/table_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/table_spec.proto @@ -112,11 +112,9 @@ type BigQueryTableSpec struct { func (x *BigQueryTableSpec) Reset() { *x = BigQueryTableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryTableSpec) String() string { @@ -127,7 +125,7 @@ func (*BigQueryTableSpec) ProtoMessage() {} func (x *BigQueryTableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type ViewSpec struct { func (x *ViewSpec) Reset() { *x = ViewSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewSpec) String() string { @@ -217,7 +213,7 @@ func (*ViewSpec) ProtoMessage() {} func (x *ViewSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +253,9 @@ type TableSpec struct { func (x *TableSpec) Reset() { *x = TableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSpec) String() string { @@ -272,7 +266,7 @@ func (*TableSpec) ProtoMessage() {} func (x *TableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +317,9 @@ type BigQueryDateShardedSpec struct { func (x *BigQueryDateShardedSpec) Reset() { *x = BigQueryDateShardedSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDateShardedSpec) String() string { @@ -338,7 +330,7 @@ func (*BigQueryDateShardedSpec) ProtoMessage() {} func (x *BigQueryDateShardedSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,56 +485,6 @@ func file_google_cloud_datacatalog_v1_table_spec_proto_init() { if File_google_cloud_datacatalog_v1_table_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryTableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ViewSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDateShardedSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_table_spec_proto_msgTypes[0].OneofWrappers = []any{ (*BigQueryTableSpec_ViewSpec)(nil), (*BigQueryTableSpec_TableSpec)(nil), diff --git a/datacatalog/apiv1/datacatalogpb/tags.pb.go b/datacatalog/apiv1/datacatalogpb/tags.pb.go index 2e4cfe444566..6e81e1973038 100755 --- a/datacatalog/apiv1/datacatalogpb/tags.pb.go +++ b/datacatalog/apiv1/datacatalogpb/tags.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/tags.proto @@ -210,11 +210,9 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tag) String() string { @@ -225,7 +223,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +334,9 @@ type TagField struct { func (x *TagField) Reset() { *x = TagField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagField) String() string { @@ -351,7 +347,7 @@ func (*TagField) ProtoMessage() {} func (x *TagField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +531,9 @@ type TagTemplate struct { func (x *TagTemplate) Reset() { *x = TagTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagTemplate) String() string { @@ -550,7 +544,7 @@ func (*TagTemplate) ProtoMessage() {} func (x *TagTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +635,9 @@ type TagTemplateField struct { func (x *TagTemplateField) Reset() { *x = TagTemplateField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagTemplateField) String() string { @@ -656,7 +648,7 @@ func (*TagTemplateField) ProtoMessage() {} func (x *TagTemplateField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +721,9 @@ type FieldType struct { func (x *FieldType) Reset() { *x = FieldType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType) String() string { @@ -744,7 +734,7 @@ func (*FieldType) ProtoMessage() {} func (x *FieldType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +800,9 @@ type TagField_EnumValue struct { func (x *TagField_EnumValue) Reset() { *x = TagField_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagField_EnumValue) String() string { @@ -825,7 +813,7 @@ func (*TagField_EnumValue) ProtoMessage() {} func (x *TagField_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +854,9 @@ type FieldType_EnumType struct { func (x *FieldType_EnumType) Reset() { *x = FieldType_EnumType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType_EnumType) String() string { @@ -881,7 +867,7 @@ func (*FieldType_EnumType) ProtoMessage() {} func (x *FieldType_EnumType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +905,9 @@ type FieldType_EnumType_EnumValue struct { func (x *FieldType_EnumType_EnumValue) Reset() { *x = FieldType_EnumType_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType_EnumType_EnumValue) String() string { @@ -934,7 +918,7 @@ func (*FieldType_EnumType_EnumValue) ProtoMessage() {} func (x *FieldType_EnumType_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_tags_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1197,104 +1181,6 @@ func file_google_cloud_datacatalog_v1_tags_proto_init() { if File_google_cloud_datacatalog_v1_tags_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TagField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TagTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TagTemplateField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FieldType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TagField_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FieldType_EnumType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_tags_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FieldType_EnumType_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_tags_proto_msgTypes[0].OneofWrappers = []any{ (*Tag_Column)(nil), } diff --git a/datacatalog/apiv1/datacatalogpb/timestamps.pb.go b/datacatalog/apiv1/datacatalogpb/timestamps.pb.go index 268f6b0f01f4..4c3fc08209a2 100755 --- a/datacatalog/apiv1/datacatalogpb/timestamps.pb.go +++ b/datacatalog/apiv1/datacatalogpb/timestamps.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/timestamps.proto @@ -61,11 +61,9 @@ type SystemTimestamps struct { func (x *SystemTimestamps) Reset() { *x = SystemTimestamps{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_timestamps_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_timestamps_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SystemTimestamps) String() string { @@ -76,7 +74,7 @@ func (*SystemTimestamps) ProtoMessage() {} func (x *SystemTimestamps) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_timestamps_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,20 +183,6 @@ func file_google_cloud_datacatalog_v1_timestamps_proto_init() { if File_google_cloud_datacatalog_v1_timestamps_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_timestamps_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SystemTimestamps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1/datacatalogpb/usage.pb.go b/datacatalog/apiv1/datacatalogpb/usage.pb.go index 21cf5b76abf8..6304abc3d34e 100755 --- a/datacatalog/apiv1/datacatalogpb/usage.pb.go +++ b/datacatalog/apiv1/datacatalogpb/usage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1/usage.proto @@ -64,11 +64,9 @@ type UsageStats struct { func (x *UsageStats) Reset() { *x = UsageStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageStats) String() string { @@ -79,7 +77,7 @@ func (*UsageStats) ProtoMessage() {} func (x *UsageStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,11 +134,9 @@ type CommonUsageStats struct { func (x *CommonUsageStats) Reset() { *x = CommonUsageStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonUsageStats) String() string { @@ -151,7 +147,7 @@ func (*CommonUsageStats) ProtoMessage() {} func (x *CommonUsageStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +195,9 @@ type UsageSignal struct { func (x *UsageSignal) Reset() { *x = UsageSignal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageSignal) String() string { @@ -214,7 +208,7 @@ func (*UsageSignal) ProtoMessage() {} func (x *UsageSignal) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1_usage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,44 +377,6 @@ func file_google_cloud_datacatalog_v1_usage_proto_init() { if File_google_cloud_datacatalog_v1_usage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1_usage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UsageStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_usage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CommonUsageStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1_usage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UsageSignal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1_usage_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_datacatalog_v1_usage_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} diff --git a/datacatalog/apiv1/helpers.go b/datacatalog/apiv1/helpers.go index 1e9ff12bae53..449380aa5a7d 100755 --- a/datacatalog/apiv1/helpers.go +++ b/datacatalog/apiv1/helpers.go @@ -18,10 +18,20 @@ package datacatalog import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datacatalog.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datacatalog/apiv1/policy_tag_manager_client.go b/datacatalog/apiv1/policy_tag_manager_client.go index 6d5a74e68536..e1003f8f7780 100755 --- a/datacatalog/apiv1/policy_tag_manager_client.go +++ b/datacatalog/apiv1/policy_tag_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -356,6 +355,8 @@ type policyTagManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyTagManagerClient creates a new policy tag manager client based on gRPC. @@ -387,6 +388,7 @@ func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, policyTagManagerClient: datacatalogpb.NewPolicyTagManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -434,6 +436,8 @@ type policyTagManagerRESTClient struct { // Points back to the CallOptions field of the containing PolicyTagManagerClient CallOptions **PolicyTagManagerCallOptions + + logger *slog.Logger } // NewPolicyTagManagerRESTClient creates a new policy tag manager rest client. @@ -456,6 +460,7 @@ func NewPolicyTagManagerRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -508,7 +513,7 @@ func (c *policyTagManagerGRPCClient) CreateTaxonomy(ctx context.Context, req *da var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.CreateTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.CreateTaxonomy, req, settings.GRPC, c.logger, "CreateTaxonomy") return err }, opts...) if err != nil { @@ -525,7 +530,7 @@ func (c *policyTagManagerGRPCClient) DeleteTaxonomy(ctx context.Context, req *da opts = append((*c.CallOptions).DeleteTaxonomy[0:len((*c.CallOptions).DeleteTaxonomy):len((*c.CallOptions).DeleteTaxonomy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.policyTagManagerClient.DeleteTaxonomy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.policyTagManagerClient.DeleteTaxonomy, req, settings.GRPC, c.logger, "DeleteTaxonomy") return err }, opts...) return err @@ -540,7 +545,7 @@ func (c *policyTagManagerGRPCClient) UpdateTaxonomy(ctx context.Context, req *da var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.UpdateTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.UpdateTaxonomy, req, settings.GRPC, c.logger, "UpdateTaxonomy") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *policyTagManagerGRPCClient) ListTaxonomies(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.ListTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.ListTaxonomies, req, settings.GRPC, c.logger, "ListTaxonomies") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *policyTagManagerGRPCClient) GetTaxonomy(ctx context.Context, req *datac var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetTaxonomy, req, settings.GRPC, c.logger, "GetTaxonomy") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *policyTagManagerGRPCClient) CreatePolicyTag(ctx context.Context, req *d var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.CreatePolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.CreatePolicyTag, req, settings.GRPC, c.logger, "CreatePolicyTag") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *policyTagManagerGRPCClient) DeletePolicyTag(ctx context.Context, req *d opts = append((*c.CallOptions).DeletePolicyTag[0:len((*c.CallOptions).DeletePolicyTag):len((*c.CallOptions).DeletePolicyTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.policyTagManagerClient.DeletePolicyTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.policyTagManagerClient.DeletePolicyTag, req, settings.GRPC, c.logger, "DeletePolicyTag") return err }, opts...) return err @@ -654,7 +659,7 @@ func (c *policyTagManagerGRPCClient) UpdatePolicyTag(ctx context.Context, req *d var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.UpdatePolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.UpdatePolicyTag, req, settings.GRPC, c.logger, "UpdatePolicyTag") return err }, opts...) if err != nil { @@ -683,7 +688,7 @@ func (c *policyTagManagerGRPCClient) ListPolicyTags(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.ListPolicyTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.ListPolicyTags, req, settings.GRPC, c.logger, "ListPolicyTags") return err }, opts...) if err != nil { @@ -718,7 +723,7 @@ func (c *policyTagManagerGRPCClient) GetPolicyTag(ctx context.Context, req *data var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetPolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetPolicyTag, req, settings.GRPC, c.logger, "GetPolicyTag") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *policyTagManagerGRPCClient) GetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -754,7 +759,7 @@ func (c *policyTagManagerGRPCClient) SetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -772,7 +777,7 @@ func (c *policyTagManagerGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -789,7 +794,7 @@ func (c *policyTagManagerGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -803,7 +808,7 @@ func (c *policyTagManagerGRPCClient) DeleteOperation(ctx context.Context, req *l opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -818,7 +823,7 @@ func (c *policyTagManagerGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *policyTagManagerGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -910,17 +915,7 @@ func (c *policyTagManagerRESTClient) CreateTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTaxonomy") if err != nil { return err } @@ -964,15 +959,8 @@ func (c *policyTagManagerRESTClient) DeleteTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTaxonomy") + return err }, opts...) } @@ -1023,17 +1011,7 @@ func (c *policyTagManagerRESTClient) UpdateTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTaxonomy") if err != nil { return err } @@ -1098,21 +1076,10 @@ func (c *policyTagManagerRESTClient) ListTaxonomies(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTaxonomies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1170,17 +1137,7 @@ func (c *policyTagManagerRESTClient) GetTaxonomy(ctx context.Context, req *datac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTaxonomy") if err != nil { return err } @@ -1232,17 +1189,7 @@ func (c *policyTagManagerRESTClient) CreatePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePolicyTag") if err != nil { return err } @@ -1291,15 +1238,8 @@ func (c *policyTagManagerRESTClient) DeletePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePolicyTag") + return err }, opts...) } @@ -1350,17 +1290,7 @@ func (c *policyTagManagerRESTClient) UpdatePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicyTag") if err != nil { return err } @@ -1421,21 +1351,10 @@ func (c *policyTagManagerRESTClient) ListPolicyTags(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPolicyTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1493,17 +1412,7 @@ func (c *policyTagManagerRESTClient) GetPolicyTag(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicyTag") if err != nil { return err } @@ -1554,17 +1463,7 @@ func (c *policyTagManagerRESTClient) GetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1615,17 +1514,7 @@ func (c *policyTagManagerRESTClient) SetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1677,17 +1566,7 @@ func (c *policyTagManagerRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1729,15 +1608,8 @@ func (c *policyTagManagerRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1766,15 +1638,8 @@ func (c *policyTagManagerRESTClient) DeleteOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1806,17 +1671,7 @@ func (c *policyTagManagerRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1880,21 +1735,10 @@ func (c *policyTagManagerRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datacatalog/apiv1/policy_tag_manager_client_example_go123_test.go b/datacatalog/apiv1/policy_tag_manager_client_example_go123_test.go index 56cfdf4782e6..34615624b7d4 100644 --- a/datacatalog/apiv1/policy_tag_manager_client_example_go123_test.go +++ b/datacatalog/apiv1/policy_tag_manager_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExamplePolicyTagManagerClient_ListPolicyTags_all() { } for resp, err := range c.ListPolicyTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExamplePolicyTagManagerClient_ListTaxonomies_all() { } for resp, err := range c.ListTaxonomies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExamplePolicyTagManagerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/apiv1/policy_tag_manager_serialization_client.go b/datacatalog/apiv1/policy_tag_manager_serialization_client.go index 962c96b7357f..9b24c39399fb 100755 --- a/datacatalog/apiv1/policy_tag_manager_serialization_client.go +++ b/datacatalog/apiv1/policy_tag_manager_serialization_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( datacatalogpb "cloud.google.com/go/datacatalog/apiv1/datacatalogpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -234,6 +233,8 @@ type policyTagManagerSerializationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyTagManagerSerializationClient creates a new policy tag manager serialization client based on gRPC. @@ -263,6 +264,7 @@ func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option. connPool: connPool, policyTagManagerSerializationClient: datacatalogpb.NewPolicyTagManagerSerializationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -310,6 +312,8 @@ type policyTagManagerSerializationRESTClient struct { // Points back to the CallOptions field of the containing PolicyTagManagerSerializationClient CallOptions **PolicyTagManagerSerializationCallOptions + + logger *slog.Logger } // NewPolicyTagManagerSerializationRESTClient creates a new policy tag manager serialization rest client. @@ -330,6 +334,7 @@ func NewPolicyTagManagerSerializationRESTClient(ctx context.Context, opts ...opt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -382,7 +387,7 @@ func (c *policyTagManagerSerializationGRPCClient) ReplaceTaxonomy(ctx context.Co var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerSerializationClient.ReplaceTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerSerializationClient.ReplaceTaxonomy, req, settings.GRPC, c.logger, "ReplaceTaxonomy") return err }, opts...) if err != nil { @@ -400,7 +405,7 @@ func (c *policyTagManagerSerializationGRPCClient) ImportTaxonomies(ctx context.C var resp *datacatalogpb.ImportTaxonomiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerSerializationClient.ImportTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerSerializationClient.ImportTaxonomies, req, settings.GRPC, c.logger, "ImportTaxonomies") return err }, opts...) if err != nil { @@ -418,7 +423,7 @@ func (c *policyTagManagerSerializationGRPCClient) ExportTaxonomies(ctx context.C var resp *datacatalogpb.ExportTaxonomiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerSerializationClient.ExportTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerSerializationClient.ExportTaxonomies, req, settings.GRPC, c.logger, "ExportTaxonomies") return err }, opts...) if err != nil { @@ -435,7 +440,7 @@ func (c *policyTagManagerSerializationGRPCClient) CancelOperation(ctx context.Co opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -449,7 +454,7 @@ func (c *policyTagManagerSerializationGRPCClient) DeleteOperation(ctx context.Co opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -464,7 +469,7 @@ func (c *policyTagManagerSerializationGRPCClient) GetOperation(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -493,7 +498,7 @@ func (c *policyTagManagerSerializationGRPCClient) ListOperations(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -567,17 +572,7 @@ func (c *policyTagManagerSerializationRESTClient) ReplaceTaxonomy(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceTaxonomy") if err != nil { return err } @@ -635,17 +630,7 @@ func (c *policyTagManagerSerializationRESTClient) ImportTaxonomies(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportTaxonomies") if err != nil { return err } @@ -707,17 +692,7 @@ func (c *policyTagManagerSerializationRESTClient) ExportTaxonomies(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ExportTaxonomies") if err != nil { return err } @@ -759,15 +734,8 @@ func (c *policyTagManagerSerializationRESTClient) CancelOperation(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -796,15 +764,8 @@ func (c *policyTagManagerSerializationRESTClient) DeleteOperation(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -836,17 +797,7 @@ func (c *policyTagManagerSerializationRESTClient) GetOperation(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -910,21 +861,10 @@ func (c *policyTagManagerSerializationRESTClient) ListOperations(ctx context.Con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datacatalog/apiv1/policy_tag_manager_serialization_client_example_go123_test.go b/datacatalog/apiv1/policy_tag_manager_serialization_client_example_go123_test.go index 44ae35d48091..a08dc03dc763 100644 --- a/datacatalog/apiv1/policy_tag_manager_serialization_client_example_go123_test.go +++ b/datacatalog/apiv1/policy_tag_manager_serialization_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePolicyTagManagerSerializationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/apiv1beta1/data_catalog_client.go b/datacatalog/apiv1beta1/data_catalog_client.go index 03970e6aa6aa..f0fb166d2a03 100755 --- a/datacatalog/apiv1beta1/data_catalog_client.go +++ b/datacatalog/apiv1beta1/data_catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( datacatalogpb "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1226,6 +1225,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data catalog client based on gRPC. @@ -1253,6 +1254,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datacatalogpb.NewDataCatalogClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1299,6 +1301,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data catalog rest client. @@ -1317,6 +1321,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1377,7 +1382,7 @@ func (c *gRPCClient) SearchCatalog(ctx context.Context, req *datacatalogpb.Searc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchCatalog, req, settings.GRPC, c.logger, "SearchCatalog") return err }, opts...) if err != nil { @@ -1412,7 +1417,7 @@ func (c *gRPCClient) CreateEntryGroup(ctx context.Context, req *datacatalogpb.Cr var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEntryGroup, req, settings.GRPC, c.logger, "CreateEntryGroup") return err }, opts...) if err != nil { @@ -1430,7 +1435,7 @@ func (c *gRPCClient) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.Up var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEntryGroup, req, settings.GRPC, c.logger, "UpdateEntryGroup") return err }, opts...) if err != nil { @@ -1448,7 +1453,7 @@ func (c *gRPCClient) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEn var resp *datacatalogpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEntryGroup, req, settings.GRPC, c.logger, "GetEntryGroup") return err }, opts...) if err != nil { @@ -1465,7 +1470,7 @@ func (c *gRPCClient) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.De opts = append((*c.CallOptions).DeleteEntryGroup[0:len((*c.CallOptions).DeleteEntryGroup):len((*c.CallOptions).DeleteEntryGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEntryGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEntryGroup, req, settings.GRPC, c.logger, "DeleteEntryGroup") return err }, opts...) return err @@ -1491,7 +1496,7 @@ func (c *gRPCClient) ListEntryGroups(ctx context.Context, req *datacatalogpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEntryGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEntryGroups, req, settings.GRPC, c.logger, "ListEntryGroups") return err }, opts...) if err != nil { @@ -1526,7 +1531,7 @@ func (c *gRPCClient) CreateEntry(ctx context.Context, req *datacatalogpb.CreateE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEntry, req, settings.GRPC, c.logger, "CreateEntry") return err }, opts...) if err != nil { @@ -1544,7 +1549,7 @@ func (c *gRPCClient) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEntry, req, settings.GRPC, c.logger, "UpdateEntry") return err }, opts...) if err != nil { @@ -1561,7 +1566,7 @@ func (c *gRPCClient) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteE opts = append((*c.CallOptions).DeleteEntry[0:len((*c.CallOptions).DeleteEntry):len((*c.CallOptions).DeleteEntry)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEntry(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEntry, req, settings.GRPC, c.logger, "DeleteEntry") return err }, opts...) return err @@ -1576,7 +1581,7 @@ func (c *gRPCClient) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRe var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEntry, req, settings.GRPC, c.logger, "GetEntry") return err }, opts...) if err != nil { @@ -1591,7 +1596,7 @@ func (c *gRPCClient) LookupEntry(ctx context.Context, req *datacatalogpb.LookupE var resp *datacatalogpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupEntry, req, settings.GRPC, c.logger, "LookupEntry") return err }, opts...) if err != nil { @@ -1620,7 +1625,7 @@ func (c *gRPCClient) ListEntries(ctx context.Context, req *datacatalogpb.ListEnt } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEntries, req, settings.GRPC, c.logger, "ListEntries") return err }, opts...) if err != nil { @@ -1655,7 +1660,7 @@ func (c *gRPCClient) CreateTagTemplate(ctx context.Context, req *datacatalogpb.C var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTagTemplate, req, settings.GRPC, c.logger, "CreateTagTemplate") return err }, opts...) if err != nil { @@ -1673,7 +1678,7 @@ func (c *gRPCClient) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetT var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTagTemplate, req, settings.GRPC, c.logger, "GetTagTemplate") return err }, opts...) if err != nil { @@ -1691,7 +1696,7 @@ func (c *gRPCClient) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.U var resp *datacatalogpb.TagTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTagTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTagTemplate, req, settings.GRPC, c.logger, "UpdateTagTemplate") return err }, opts...) if err != nil { @@ -1708,7 +1713,7 @@ func (c *gRPCClient) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.D opts = append((*c.CallOptions).DeleteTagTemplate[0:len((*c.CallOptions).DeleteTagTemplate):len((*c.CallOptions).DeleteTagTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTagTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTagTemplate, req, settings.GRPC, c.logger, "DeleteTagTemplate") return err }, opts...) return err @@ -1723,7 +1728,7 @@ func (c *gRPCClient) CreateTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTagTemplateField, req, settings.GRPC, c.logger, "CreateTagTemplateField") return err }, opts...) if err != nil { @@ -1741,7 +1746,7 @@ func (c *gRPCClient) UpdateTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTagTemplateField, req, settings.GRPC, c.logger, "UpdateTagTemplateField") return err }, opts...) if err != nil { @@ -1759,7 +1764,7 @@ func (c *gRPCClient) RenameTagTemplateField(ctx context.Context, req *datacatalo var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameTagTemplateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameTagTemplateField, req, settings.GRPC, c.logger, "RenameTagTemplateField") return err }, opts...) if err != nil { @@ -1777,7 +1782,7 @@ func (c *gRPCClient) RenameTagTemplateFieldEnumValue(ctx context.Context, req *d var resp *datacatalogpb.TagTemplateField err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RenameTagTemplateFieldEnumValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RenameTagTemplateFieldEnumValue, req, settings.GRPC, c.logger, "RenameTagTemplateFieldEnumValue") return err }, opts...) if err != nil { @@ -1794,7 +1799,7 @@ func (c *gRPCClient) DeleteTagTemplateField(ctx context.Context, req *datacatalo opts = append((*c.CallOptions).DeleteTagTemplateField[0:len((*c.CallOptions).DeleteTagTemplateField):len((*c.CallOptions).DeleteTagTemplateField)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTagTemplateField(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTagTemplateField, req, settings.GRPC, c.logger, "DeleteTagTemplateField") return err }, opts...) return err @@ -1809,7 +1814,7 @@ func (c *gRPCClient) CreateTag(ctx context.Context, req *datacatalogpb.CreateTag var resp *datacatalogpb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTag, req, settings.GRPC, c.logger, "CreateTag") return err }, opts...) if err != nil { @@ -1827,7 +1832,7 @@ func (c *gRPCClient) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTag var resp *datacatalogpb.Tag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTag, req, settings.GRPC, c.logger, "UpdateTag") return err }, opts...) if err != nil { @@ -1844,7 +1849,7 @@ func (c *gRPCClient) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTag opts = append((*c.CallOptions).DeleteTag[0:len((*c.CallOptions).DeleteTag):len((*c.CallOptions).DeleteTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTag, req, settings.GRPC, c.logger, "DeleteTag") return err }, opts...) return err @@ -1870,7 +1875,7 @@ func (c *gRPCClient) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTags, req, settings.GRPC, c.logger, "ListTags") return err }, opts...) if err != nil { @@ -1905,7 +1910,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1923,7 +1928,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1941,7 +1946,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2005,21 +2010,10 @@ func (c *restClient) SearchCatalog(ctx context.Context, req *datacatalogpb.Searc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchCatalog") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2095,17 +2089,7 @@ func (c *restClient) CreateEntryGroup(ctx context.Context, req *datacatalogpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntryGroup") if err != nil { return err } @@ -2172,17 +2156,7 @@ func (c *restClient) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntryGroup") if err != nil { return err } @@ -2238,17 +2212,7 @@ func (c *restClient) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntryGroup") if err != nil { return err } @@ -2301,15 +2265,8 @@ func (c *restClient) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntryGroup") + return err }, opts...) } @@ -2357,21 +2314,10 @@ func (c *restClient) ListEntryGroups(ctx context.Context, req *datacatalogpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntryGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2449,17 +2395,7 @@ func (c *restClient) CreateEntry(ctx context.Context, req *datacatalogpb.CreateE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntry") if err != nil { return err } @@ -2526,17 +2462,7 @@ func (c *restClient) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntry") if err != nil { return err } @@ -2584,15 +2510,8 @@ func (c *restClient) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntry") + return err }, opts...) } @@ -2624,17 +2543,7 @@ func (c *restClient) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntry") if err != nil { return err } @@ -2688,17 +2597,7 @@ func (c *restClient) LookupEntry(ctx context.Context, req *datacatalogpb.LookupE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupEntry") if err != nil { return err } @@ -2766,21 +2665,10 @@ func (c *restClient) ListEntries(ctx context.Context, req *datacatalogpb.ListEnt } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2854,17 +2742,7 @@ func (c *restClient) CreateTagTemplate(ctx context.Context, req *datacatalogpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagTemplate") if err != nil { return err } @@ -2909,17 +2787,7 @@ func (c *restClient) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagTemplate") if err != nil { return err } @@ -2988,17 +2856,7 @@ func (c *restClient) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagTemplate") if err != nil { return err } @@ -3049,15 +2907,8 @@ func (c *restClient) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagTemplate") + return err }, opts...) } @@ -3105,17 +2956,7 @@ func (c *restClient) CreateTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagTemplateField") if err != nil { return err } @@ -3182,17 +3023,7 @@ func (c *restClient) UpdateTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagTemplateField") if err != nil { return err } @@ -3247,17 +3078,7 @@ func (c *restClient) RenameTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTagTemplateField") if err != nil { return err } @@ -3310,17 +3131,7 @@ func (c *restClient) RenameTagTemplateFieldEnumValue(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenameTagTemplateFieldEnumValue") if err != nil { return err } @@ -3371,15 +3182,8 @@ func (c *restClient) DeleteTagTemplateField(ctx context.Context, req *datacatalo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagTemplateField") + return err }, opts...) } @@ -3424,17 +3228,7 @@ func (c *restClient) CreateTag(ctx context.Context, req *datacatalogpb.CreateTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTag") if err != nil { return err } @@ -3497,17 +3291,7 @@ func (c *restClient) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTag") if err != nil { return err } @@ -3549,15 +3333,8 @@ func (c *restClient) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTag") + return err }, opts...) } @@ -3607,21 +3384,10 @@ func (c *restClient) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3704,17 +3470,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3786,17 +3542,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -3862,17 +3608,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/datacatalog/apiv1beta1/data_catalog_client_example_go123_test.go b/datacatalog/apiv1beta1/data_catalog_client_example_go123_test.go index 33eeb7fc84e6..6279a3ebce8d 100644 --- a/datacatalog/apiv1beta1/data_catalog_client_example_go123_test.go +++ b/datacatalog/apiv1beta1/data_catalog_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListEntries_all() { } for resp, err := range c.ListEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListEntryGroups_all() { } for resp, err := range c.ListEntryGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListTags_all() { } for resp, err := range c.ListTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_SearchCatalog_all() { } for resp, err := range c.SearchCatalog(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/apiv1beta1/datacatalogpb/common.pb.go b/datacatalog/apiv1beta1/datacatalogpb/common.pb.go index 74695f364b14..610d5dc60934 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/common.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/common.proto diff --git a/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go b/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go index 2456752cebeb..7bf9014ee512 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/datacatalog.proto @@ -159,11 +159,9 @@ type SearchCatalogRequest struct { func (x *SearchCatalogRequest) Reset() { *x = SearchCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogRequest) String() string { @@ -174,7 +172,7 @@ func (*SearchCatalogRequest) ProtoMessage() {} func (x *SearchCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +244,9 @@ type SearchCatalogResponse struct { func (x *SearchCatalogResponse) Reset() { *x = SearchCatalogResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogResponse) String() string { @@ -261,7 +257,7 @@ func (*SearchCatalogResponse) ProtoMessage() {} func (x *SearchCatalogResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +324,9 @@ type CreateEntryGroupRequest struct { func (x *CreateEntryGroupRequest) Reset() { *x = CreateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryGroupRequest) String() string { @@ -343,7 +337,7 @@ func (*CreateEntryGroupRequest) ProtoMessage() {} func (x *CreateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +392,9 @@ type UpdateEntryGroupRequest struct { func (x *UpdateEntryGroupRequest) Reset() { *x = UpdateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryGroupRequest) String() string { @@ -413,7 +405,7 @@ func (*UpdateEntryGroupRequest) ProtoMessage() {} func (x *UpdateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +450,9 @@ type GetEntryGroupRequest struct { func (x *GetEntryGroupRequest) Reset() { *x = GetEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryGroupRequest) String() string { @@ -473,7 +463,7 @@ func (*GetEntryGroupRequest) ProtoMessage() {} func (x *GetEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +508,9 @@ type DeleteEntryGroupRequest struct { func (x *DeleteEntryGroupRequest) Reset() { *x = DeleteEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryGroupRequest) String() string { @@ -533,7 +521,7 @@ func (*DeleteEntryGroupRequest) ProtoMessage() {} func (x *DeleteEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +572,9 @@ type ListEntryGroupsRequest struct { func (x *ListEntryGroupsRequest) Reset() { *x = ListEntryGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsRequest) String() string { @@ -599,7 +585,7 @@ func (*ListEntryGroupsRequest) ProtoMessage() {} func (x *ListEntryGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +637,9 @@ type ListEntryGroupsResponse struct { func (x *ListEntryGroupsResponse) Reset() { *x = ListEntryGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsResponse) String() string { @@ -666,7 +650,7 @@ func (*ListEntryGroupsResponse) ProtoMessage() {} func (x *ListEntryGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,11 +701,9 @@ type CreateEntryRequest struct { func (x *CreateEntryRequest) Reset() { *x = CreateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryRequest) String() string { @@ -732,7 +714,7 @@ func (*CreateEntryRequest) ProtoMessage() {} func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +790,9 @@ type UpdateEntryRequest struct { func (x *UpdateEntryRequest) Reset() { *x = UpdateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryRequest) String() string { @@ -823,7 +803,7 @@ func (*UpdateEntryRequest) ProtoMessage() {} func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +847,9 @@ type DeleteEntryRequest struct { func (x *DeleteEntryRequest) Reset() { *x = DeleteEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryRequest) String() string { @@ -882,7 +860,7 @@ func (*DeleteEntryRequest) ProtoMessage() {} func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +897,9 @@ type GetEntryRequest struct { func (x *GetEntryRequest) Reset() { *x = GetEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryRequest) String() string { @@ -934,7 +910,7 @@ func (*GetEntryRequest) ProtoMessage() {} func (x *GetEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +951,9 @@ type LookupEntryRequest struct { func (x *LookupEntryRequest) Reset() { *x = LookupEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEntryRequest) String() string { @@ -990,7 +964,7 @@ func (*LookupEntryRequest) ProtoMessage() {} func (x *LookupEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1141,11 +1115,9 @@ type Entry struct { func (x *Entry) Reset() { *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entry) String() string { @@ -1156,7 +1128,7 @@ func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1399,11 +1371,9 @@ type EntryGroup struct { func (x *EntryGroup) Reset() { *x = EntryGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryGroup) String() string { @@ -1414,7 +1384,7 @@ func (*EntryGroup) ProtoMessage() {} func (x *EntryGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1479,11 +1449,9 @@ type CreateTagTemplateRequest struct { func (x *CreateTagTemplateRequest) Reset() { *x = CreateTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagTemplateRequest) String() string { @@ -1494,7 +1462,7 @@ func (*CreateTagTemplateRequest) ProtoMessage() {} func (x *CreateTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1545,11 +1513,9 @@ type GetTagTemplateRequest struct { func (x *GetTagTemplateRequest) Reset() { *x = GetTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagTemplateRequest) String() string { @@ -1560,7 +1526,7 @@ func (*GetTagTemplateRequest) ProtoMessage() {} func (x *GetTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1602,11 +1568,9 @@ type UpdateTagTemplateRequest struct { func (x *UpdateTagTemplateRequest) Reset() { *x = UpdateTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagTemplateRequest) String() string { @@ -1617,7 +1581,7 @@ func (*UpdateTagTemplateRequest) ProtoMessage() {} func (x *UpdateTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1665,11 +1629,9 @@ type DeleteTagTemplateRequest struct { func (x *DeleteTagTemplateRequest) Reset() { *x = DeleteTagTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagTemplateRequest) String() string { @@ -1680,7 +1642,7 @@ func (*DeleteTagTemplateRequest) ProtoMessage() {} func (x *DeleteTagTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1730,11 +1692,9 @@ type CreateTagRequest struct { func (x *CreateTagRequest) Reset() { *x = CreateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagRequest) String() string { @@ -1745,7 +1705,7 @@ func (*CreateTagRequest) ProtoMessage() {} func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1756,9 @@ type UpdateTagRequest struct { func (x *UpdateTagRequest) Reset() { *x = UpdateTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagRequest) String() string { @@ -1811,7 +1769,7 @@ func (*UpdateTagRequest) ProtoMessage() {} func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1813,9 @@ type DeleteTagRequest struct { func (x *DeleteTagRequest) Reset() { *x = DeleteTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagRequest) String() string { @@ -1870,7 +1826,7 @@ func (*DeleteTagRequest) ProtoMessage() {} func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1874,9 @@ type CreateTagTemplateFieldRequest struct { func (x *CreateTagTemplateFieldRequest) Reset() { *x = CreateTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagTemplateFieldRequest) String() string { @@ -1933,7 +1887,7 @@ func (*CreateTagTemplateFieldRequest) ProtoMessage() {} func (x *CreateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2003,11 +1957,9 @@ type UpdateTagTemplateFieldRequest struct { func (x *UpdateTagTemplateFieldRequest) Reset() { *x = UpdateTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagTemplateFieldRequest) String() string { @@ -2018,7 +1970,7 @@ func (*UpdateTagTemplateFieldRequest) ProtoMessage() {} func (x *UpdateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2072,11 +2024,9 @@ type RenameTagTemplateFieldRequest struct { func (x *RenameTagTemplateFieldRequest) Reset() { *x = RenameTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTagTemplateFieldRequest) String() string { @@ -2087,7 +2037,7 @@ func (*RenameTagTemplateFieldRequest) ProtoMessage() {} func (x *RenameTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2134,11 +2084,9 @@ type RenameTagTemplateFieldEnumValueRequest struct { func (x *RenameTagTemplateFieldEnumValueRequest) Reset() { *x = RenameTagTemplateFieldEnumValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameTagTemplateFieldEnumValueRequest) String() string { @@ -2149,7 +2097,7 @@ func (*RenameTagTemplateFieldEnumValueRequest) ProtoMessage() {} func (x *RenameTagTemplateFieldEnumValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2145,9 @@ type DeleteTagTemplateFieldRequest struct { func (x *DeleteTagTemplateFieldRequest) Reset() { *x = DeleteTagTemplateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagTemplateFieldRequest) String() string { @@ -2212,7 +2158,7 @@ func (*DeleteTagTemplateFieldRequest) ProtoMessage() {} func (x *DeleteTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2266,11 +2212,9 @@ type ListTagsRequest struct { func (x *ListTagsRequest) Reset() { *x = ListTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsRequest) String() string { @@ -2281,7 +2225,7 @@ func (*ListTagsRequest) ProtoMessage() {} func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2333,11 +2277,9 @@ type ListTagsResponse struct { func (x *ListTagsResponse) Reset() { *x = ListTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagsResponse) String() string { @@ -2348,7 +2290,7 @@ func (*ListTagsResponse) ProtoMessage() {} func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,11 +2346,9 @@ type ListEntriesRequest struct { func (x *ListEntriesRequest) Reset() { *x = ListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesRequest) String() string { @@ -2419,7 +2359,7 @@ func (*ListEntriesRequest) ProtoMessage() {} func (x *ListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2478,11 +2418,9 @@ type ListEntriesResponse struct { func (x *ListEntriesResponse) Reset() { *x = ListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesResponse) String() string { @@ -2493,7 +2431,7 @@ func (*ListEntriesResponse) ProtoMessage() {} func (x *ListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2581,11 +2519,9 @@ type SearchCatalogRequest_Scope struct { func (x *SearchCatalogRequest_Scope) Reset() { *x = SearchCatalogRequest_Scope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogRequest_Scope) String() string { @@ -2596,7 +2532,7 @@ func (*SearchCatalogRequest_Scope) ProtoMessage() {} func (x *SearchCatalogRequest_Scope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3722,392 +3658,6 @@ func file_google_cloud_datacatalog_v1beta1_datacatalog_proto_init() { file_google_cloud_datacatalog_v1beta1_tags_proto_init() file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() file_google_cloud_datacatalog_v1beta1_usage_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LookupEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EntryGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RenameTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RenameTagTemplateFieldEnumValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagTemplateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogRequest_Scope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12].OneofWrappers = []any{ (*LookupEntryRequest_LinkedResource)(nil), (*LookupEntryRequest_SqlResource)(nil), diff --git a/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go b/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go index 067bc48f236b..bc7073286768 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto @@ -78,11 +78,9 @@ type GcsFilesetSpec struct { func (x *GcsFilesetSpec) Reset() { *x = GcsFilesetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFilesetSpec) String() string { @@ -93,7 +91,7 @@ func (*GcsFilesetSpec) ProtoMessage() {} func (x *GcsFilesetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,11 +136,9 @@ type GcsFileSpec struct { func (x *GcsFileSpec) Reset() { *x = GcsFileSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFileSpec) String() string { @@ -153,7 +149,7 @@ func (*GcsFileSpec) ProtoMessage() {} func (x *GcsFileSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,32 +271,6 @@ func file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_init() { return } file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsFilesetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsFileSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go b/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go index 52cd71908b9e..47b5c6174e59 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/policytagmanager.proto @@ -133,11 +133,9 @@ type Taxonomy struct { func (x *Taxonomy) Reset() { *x = Taxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Taxonomy) String() string { @@ -148,7 +146,7 @@ func (*Taxonomy) ProtoMessage() {} func (x *Taxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type PolicyTag struct { func (x *PolicyTag) Reset() { *x = PolicyTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyTag) String() string { @@ -262,7 +258,7 @@ func (*PolicyTag) ProtoMessage() {} func (x *PolicyTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +323,9 @@ type CreateTaxonomyRequest struct { func (x *CreateTaxonomyRequest) Reset() { *x = CreateTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaxonomyRequest) String() string { @@ -342,7 +336,7 @@ func (*CreateTaxonomyRequest) ProtoMessage() {} func (x *CreateTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +379,9 @@ type DeleteTaxonomyRequest struct { func (x *DeleteTaxonomyRequest) Reset() { *x = DeleteTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaxonomyRequest) String() string { @@ -400,7 +392,7 @@ func (*DeleteTaxonomyRequest) ProtoMessage() {} func (x *DeleteTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +433,9 @@ type UpdateTaxonomyRequest struct { func (x *UpdateTaxonomyRequest) Reset() { *x = UpdateTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTaxonomyRequest) String() string { @@ -456,7 +446,7 @@ func (*UpdateTaxonomyRequest) ProtoMessage() {} func (x *UpdateTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +497,9 @@ type ListTaxonomiesRequest struct { func (x *ListTaxonomiesRequest) Reset() { *x = ListTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTaxonomiesRequest) String() string { @@ -522,7 +510,7 @@ func (*ListTaxonomiesRequest) ProtoMessage() {} func (x *ListTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +569,9 @@ type ListTaxonomiesResponse struct { func (x *ListTaxonomiesResponse) Reset() { *x = ListTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTaxonomiesResponse) String() string { @@ -596,7 +582,7 @@ func (*ListTaxonomiesResponse) ProtoMessage() {} func (x *ListTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +624,9 @@ type GetTaxonomyRequest struct { func (x *GetTaxonomyRequest) Reset() { *x = GetTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaxonomyRequest) String() string { @@ -653,7 +637,7 @@ func (*GetTaxonomyRequest) ProtoMessage() {} func (x *GetTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +674,9 @@ type CreatePolicyTagRequest struct { func (x *CreatePolicyTagRequest) Reset() { *x = CreatePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePolicyTagRequest) String() string { @@ -705,7 +687,7 @@ func (*CreatePolicyTagRequest) ProtoMessage() {} func (x *CreatePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +730,9 @@ type DeletePolicyTagRequest struct { func (x *DeletePolicyTagRequest) Reset() { *x = DeletePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePolicyTagRequest) String() string { @@ -763,7 +743,7 @@ func (*DeletePolicyTagRequest) ProtoMessage() {} func (x *DeletePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +787,9 @@ type UpdatePolicyTagRequest struct { func (x *UpdatePolicyTagRequest) Reset() { *x = UpdatePolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyTagRequest) String() string { @@ -822,7 +800,7 @@ func (*UpdatePolicyTagRequest) ProtoMessage() {} func (x *UpdatePolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +848,9 @@ type ListPolicyTagsRequest struct { func (x *ListPolicyTagsRequest) Reset() { *x = ListPolicyTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyTagsRequest) String() string { @@ -885,7 +861,7 @@ func (*ListPolicyTagsRequest) ProtoMessage() {} func (x *ListPolicyTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +913,9 @@ type ListPolicyTagsResponse struct { func (x *ListPolicyTagsResponse) Reset() { *x = ListPolicyTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyTagsResponse) String() string { @@ -952,7 +926,7 @@ func (*ListPolicyTagsResponse) ProtoMessage() {} func (x *ListPolicyTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +968,9 @@ type GetPolicyTagRequest struct { func (x *GetPolicyTagRequest) Reset() { *x = GetPolicyTagRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyTagRequest) String() string { @@ -1009,7 +981,7 @@ func (*GetPolicyTagRequest) ProtoMessage() {} func (x *GetPolicyTagRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1017,9 @@ type Taxonomy_Service struct { func (x *Taxonomy_Service) Reset() { *x = Taxonomy_Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Taxonomy_Service) String() string { @@ -1060,7 +1030,7 @@ func (*Taxonomy_Service) ProtoMessage() {} func (x *Taxonomy_Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1585,188 +1555,6 @@ func file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_init() { } file_google_cloud_datacatalog_v1beta1_common_proto_init() file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Taxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PolicyTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreatePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeletePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyTagRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Taxonomy_Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go b/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go index f887e486be2d..885b7f33eaf0 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto @@ -62,11 +62,9 @@ type SerializedTaxonomy struct { func (x *SerializedTaxonomy) Reset() { *x = SerializedTaxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerializedTaxonomy) String() string { @@ -77,7 +75,7 @@ func (*SerializedTaxonomy) ProtoMessage() {} func (x *SerializedTaxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +141,9 @@ type SerializedPolicyTag struct { func (x *SerializedPolicyTag) Reset() { *x = SerializedPolicyTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerializedPolicyTag) String() string { @@ -158,7 +154,7 @@ func (*SerializedPolicyTag) ProtoMessage() {} func (x *SerializedPolicyTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type ImportTaxonomiesRequest struct { func (x *ImportTaxonomiesRequest) Reset() { *x = ImportTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTaxonomiesRequest) String() string { @@ -236,7 +230,7 @@ func (*ImportTaxonomiesRequest) ProtoMessage() {} func (x *ImportTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +289,9 @@ type InlineSource struct { func (x *InlineSource) Reset() { *x = InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineSource) String() string { @@ -310,7 +302,7 @@ func (*InlineSource) ProtoMessage() {} func (x *InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +337,9 @@ type ImportTaxonomiesResponse struct { func (x *ImportTaxonomiesResponse) Reset() { *x = ImportTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTaxonomiesResponse) String() string { @@ -360,7 +350,7 @@ func (*ImportTaxonomiesResponse) ProtoMessage() {} func (x *ImportTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +394,9 @@ type ExportTaxonomiesRequest struct { func (x *ExportTaxonomiesRequest) Reset() { *x = ExportTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTaxonomiesRequest) String() string { @@ -419,7 +407,7 @@ func (*ExportTaxonomiesRequest) ProtoMessage() {} func (x *ExportTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type ExportTaxonomiesResponse struct { func (x *ExportTaxonomiesResponse) Reset() { *x = ExportTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTaxonomiesResponse) String() string { @@ -501,7 +487,7 @@ func (*ExportTaxonomiesResponse) ProtoMessage() {} func (x *ExportTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,92 +711,6 @@ func file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_i return } file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SerializedTaxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SerializedPolicyTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2].OneofWrappers = []any{ (*ImportTaxonomiesRequest_InlineSource)(nil), } diff --git a/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go b/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go index 5953907653be..4381b7940238 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/schema.proto @@ -49,11 +49,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -64,7 +62,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type ColumnSchema struct { func (x *ColumnSchema) Reset() { *x = ColumnSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnSchema) String() string { @@ -125,7 +121,7 @@ func (*ColumnSchema) ProtoMessage() {} func (x *ColumnSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,32 +250,6 @@ func file_google_cloud_datacatalog_v1beta1_schema_proto_init() { if File_google_cloud_datacatalog_v1beta1_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ColumnSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/datacatalogpb/search.pb.go b/datacatalog/apiv1beta1/datacatalogpb/search.pb.go index 30de752a06a2..db37a115cb9d 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/search.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/search.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/search.proto @@ -127,11 +127,9 @@ type SearchCatalogResult struct { func (x *SearchCatalogResult) Reset() { *x = SearchCatalogResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogResult) String() string { @@ -142,7 +140,7 @@ func (*SearchCatalogResult) ProtoMessage() {} func (x *SearchCatalogResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,20 +280,6 @@ func file_google_cloud_datacatalog_v1beta1_search_proto_init() { if File_google_cloud_datacatalog_v1beta1_search_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go b/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go index 206df881ca79..495057b0dabf 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/table_spec.proto @@ -112,11 +112,9 @@ type BigQueryTableSpec struct { func (x *BigQueryTableSpec) Reset() { *x = BigQueryTableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryTableSpec) String() string { @@ -127,7 +125,7 @@ func (*BigQueryTableSpec) ProtoMessage() {} func (x *BigQueryTableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type ViewSpec struct { func (x *ViewSpec) Reset() { *x = ViewSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewSpec) String() string { @@ -217,7 +213,7 @@ func (*ViewSpec) ProtoMessage() {} func (x *ViewSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +251,9 @@ type TableSpec struct { func (x *TableSpec) Reset() { *x = TableSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableSpec) String() string { @@ -270,7 +264,7 @@ func (*TableSpec) ProtoMessage() {} func (x *TableSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +309,9 @@ type BigQueryDateShardedSpec struct { func (x *BigQueryDateShardedSpec) Reset() { *x = BigQueryDateShardedSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDateShardedSpec) String() string { @@ -330,7 +322,7 @@ func (*BigQueryDateShardedSpec) ProtoMessage() {} func (x *BigQueryDateShardedSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,56 +470,6 @@ func file_google_cloud_datacatalog_v1beta1_table_spec_proto_init() { if File_google_cloud_datacatalog_v1beta1_table_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryTableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ViewSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TableSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDateShardedSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0].OneofWrappers = []any{ (*BigQueryTableSpec_ViewSpec)(nil), (*BigQueryTableSpec_TableSpec)(nil), diff --git a/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go b/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go index 0e3bf1d5d699..b70172cf11fe 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/tags.proto @@ -196,11 +196,9 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tag) String() string { @@ -211,7 +209,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +313,9 @@ type TagField struct { func (x *TagField) Reset() { *x = TagField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagField) String() string { @@ -330,7 +326,7 @@ func (*TagField) ProtoMessage() {} func (x *TagField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +474,9 @@ type TagTemplate struct { func (x *TagTemplate) Reset() { *x = TagTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagTemplate) String() string { @@ -493,7 +487,7 @@ func (*TagTemplate) ProtoMessage() {} func (x *TagTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +561,9 @@ type TagTemplateField struct { func (x *TagTemplateField) Reset() { *x = TagTemplateField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagTemplateField) String() string { @@ -582,7 +574,7 @@ func (*TagTemplateField) ProtoMessage() {} func (x *TagTemplateField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,11 +647,9 @@ type FieldType struct { func (x *FieldType) Reset() { *x = FieldType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType) String() string { @@ -670,7 +660,7 @@ func (*FieldType) ProtoMessage() {} func (x *FieldType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +726,9 @@ type TagField_EnumValue struct { func (x *TagField_EnumValue) Reset() { *x = TagField_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagField_EnumValue) String() string { @@ -751,7 +739,7 @@ func (*TagField_EnumValue) ProtoMessage() {} func (x *TagField_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +771,9 @@ type FieldType_EnumType struct { func (x *FieldType_EnumType) Reset() { *x = FieldType_EnumType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType_EnumType) String() string { @@ -798,7 +784,7 @@ func (*FieldType_EnumType) ProtoMessage() {} func (x *FieldType_EnumType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +818,9 @@ type FieldType_EnumType_EnumValue struct { func (x *FieldType_EnumType_EnumValue) Reset() { *x = FieldType_EnumType_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldType_EnumType_EnumValue) String() string { @@ -847,7 +831,7 @@ func (*FieldType_EnumType_EnumValue) ProtoMessage() {} func (x *FieldType_EnumType_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,104 +1083,6 @@ func file_google_cloud_datacatalog_v1beta1_tags_proto_init() { if File_google_cloud_datacatalog_v1beta1_tags_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TagField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TagTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TagTemplateField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FieldType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TagField_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FieldType_EnumType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FieldType_EnumType_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0].OneofWrappers = []any{ (*Tag_Column)(nil), } diff --git a/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go b/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go index 5da6f43cf26d..5f10a6856156 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/timestamps.proto @@ -54,11 +54,9 @@ type SystemTimestamps struct { func (x *SystemTimestamps) Reset() { *x = SystemTimestamps{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SystemTimestamps) String() string { @@ -69,7 +67,7 @@ func (*SystemTimestamps) ProtoMessage() {} func (x *SystemTimestamps) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,20 +178,6 @@ func file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() { if File_google_cloud_datacatalog_v1beta1_timestamps_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SystemTimestamps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/datacatalogpb/usage.pb.go b/datacatalog/apiv1beta1/datacatalogpb/usage.pb.go index 3c44347853c3..1627c0e08266 100755 --- a/datacatalog/apiv1beta1/datacatalogpb/usage.pb.go +++ b/datacatalog/apiv1beta1/datacatalogpb/usage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/v1beta1/usage.proto @@ -62,11 +62,9 @@ type UsageStats struct { func (x *UsageStats) Reset() { *x = UsageStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageStats) String() string { @@ -77,7 +75,7 @@ func (*UsageStats) ProtoMessage() {} func (x *UsageStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,11 +133,9 @@ type UsageSignal struct { func (x *UsageSignal) Reset() { *x = UsageSignal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageSignal) String() string { @@ -150,7 +146,7 @@ func (*UsageSignal) ProtoMessage() {} func (x *UsageSignal) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,32 +272,6 @@ func file_google_cloud_datacatalog_v1beta1_usage_proto_init() { if File_google_cloud_datacatalog_v1beta1_usage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UsageStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_v1beta1_usage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UsageSignal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datacatalog/apiv1beta1/helpers.go b/datacatalog/apiv1beta1/helpers.go index 1e9ff12bae53..449380aa5a7d 100755 --- a/datacatalog/apiv1beta1/helpers.go +++ b/datacatalog/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package datacatalog import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datacatalog.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datacatalog/apiv1beta1/policy_tag_manager_client.go b/datacatalog/apiv1beta1/policy_tag_manager_client.go index 81301973f30c..7c5ca09c6986 100755 --- a/datacatalog/apiv1beta1/policy_tag_manager_client.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( datacatalogpb "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -301,6 +300,8 @@ type policyTagManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyTagManagerClient creates a new policy tag manager client based on gRPC. @@ -328,6 +329,7 @@ func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, policyTagManagerClient: datacatalogpb.NewPolicyTagManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -374,6 +376,8 @@ type policyTagManagerRESTClient struct { // Points back to the CallOptions field of the containing PolicyTagManagerClient CallOptions **PolicyTagManagerCallOptions + + logger *slog.Logger } // NewPolicyTagManagerRESTClient creates a new policy tag manager rest client. @@ -392,6 +396,7 @@ func NewPolicyTagManagerRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -444,7 +449,7 @@ func (c *policyTagManagerGRPCClient) CreateTaxonomy(ctx context.Context, req *da var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.CreateTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.CreateTaxonomy, req, settings.GRPC, c.logger, "CreateTaxonomy") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *policyTagManagerGRPCClient) DeleteTaxonomy(ctx context.Context, req *da opts = append((*c.CallOptions).DeleteTaxonomy[0:len((*c.CallOptions).DeleteTaxonomy):len((*c.CallOptions).DeleteTaxonomy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.policyTagManagerClient.DeleteTaxonomy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.policyTagManagerClient.DeleteTaxonomy, req, settings.GRPC, c.logger, "DeleteTaxonomy") return err }, opts...) return err @@ -476,7 +481,7 @@ func (c *policyTagManagerGRPCClient) UpdateTaxonomy(ctx context.Context, req *da var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.UpdateTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.UpdateTaxonomy, req, settings.GRPC, c.logger, "UpdateTaxonomy") return err }, opts...) if err != nil { @@ -505,7 +510,7 @@ func (c *policyTagManagerGRPCClient) ListTaxonomies(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.ListTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.ListTaxonomies, req, settings.GRPC, c.logger, "ListTaxonomies") return err }, opts...) if err != nil { @@ -540,7 +545,7 @@ func (c *policyTagManagerGRPCClient) GetTaxonomy(ctx context.Context, req *datac var resp *datacatalogpb.Taxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetTaxonomy, req, settings.GRPC, c.logger, "GetTaxonomy") return err }, opts...) if err != nil { @@ -558,7 +563,7 @@ func (c *policyTagManagerGRPCClient) CreatePolicyTag(ctx context.Context, req *d var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.CreatePolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.CreatePolicyTag, req, settings.GRPC, c.logger, "CreatePolicyTag") return err }, opts...) if err != nil { @@ -575,7 +580,7 @@ func (c *policyTagManagerGRPCClient) DeletePolicyTag(ctx context.Context, req *d opts = append((*c.CallOptions).DeletePolicyTag[0:len((*c.CallOptions).DeletePolicyTag):len((*c.CallOptions).DeletePolicyTag)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.policyTagManagerClient.DeletePolicyTag(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.policyTagManagerClient.DeletePolicyTag, req, settings.GRPC, c.logger, "DeletePolicyTag") return err }, opts...) return err @@ -590,7 +595,7 @@ func (c *policyTagManagerGRPCClient) UpdatePolicyTag(ctx context.Context, req *d var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.UpdatePolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.UpdatePolicyTag, req, settings.GRPC, c.logger, "UpdatePolicyTag") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *policyTagManagerGRPCClient) ListPolicyTags(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.ListPolicyTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.ListPolicyTags, req, settings.GRPC, c.logger, "ListPolicyTags") return err }, opts...) if err != nil { @@ -654,7 +659,7 @@ func (c *policyTagManagerGRPCClient) GetPolicyTag(ctx context.Context, req *data var resp *datacatalogpb.PolicyTag err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetPolicyTag(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetPolicyTag, req, settings.GRPC, c.logger, "GetPolicyTag") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *policyTagManagerGRPCClient) GetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *policyTagManagerGRPCClient) SetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *policyTagManagerGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -752,17 +757,7 @@ func (c *policyTagManagerRESTClient) CreateTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTaxonomy") if err != nil { return err } @@ -805,15 +800,8 @@ func (c *policyTagManagerRESTClient) DeleteTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTaxonomy") + return err }, opts...) } @@ -863,17 +851,7 @@ func (c *policyTagManagerRESTClient) UpdateTaxonomy(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTaxonomy") if err != nil { return err } @@ -938,21 +916,10 @@ func (c *policyTagManagerRESTClient) ListTaxonomies(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTaxonomies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1010,17 +977,7 @@ func (c *policyTagManagerRESTClient) GetTaxonomy(ctx context.Context, req *datac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTaxonomy") if err != nil { return err } @@ -1072,17 +1029,7 @@ func (c *policyTagManagerRESTClient) CreatePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePolicyTag") if err != nil { return err } @@ -1124,15 +1071,8 @@ func (c *policyTagManagerRESTClient) DeletePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePolicyTag") + return err }, opts...) } @@ -1182,17 +1122,7 @@ func (c *policyTagManagerRESTClient) UpdatePolicyTag(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicyTag") if err != nil { return err } @@ -1253,21 +1183,10 @@ func (c *policyTagManagerRESTClient) ListPolicyTags(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPolicyTags") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1325,17 +1244,7 @@ func (c *policyTagManagerRESTClient) GetPolicyTag(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicyTag") if err != nil { return err } @@ -1386,17 +1295,7 @@ func (c *policyTagManagerRESTClient) GetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1447,17 +1346,7 @@ func (c *policyTagManagerRESTClient) SetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1509,17 +1398,7 @@ func (c *policyTagManagerRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/datacatalog/apiv1beta1/policy_tag_manager_client_example_go123_test.go b/datacatalog/apiv1beta1/policy_tag_manager_client_example_go123_test.go index 1d90fa4bc8f2..36d1c489ead9 100644 --- a/datacatalog/apiv1beta1/policy_tag_manager_client_example_go123_test.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePolicyTagManagerClient_ListPolicyTags_all() { } for resp, err := range c.ListPolicyTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExamplePolicyTagManagerClient_ListTaxonomies_all() { } for resp, err := range c.ListTaxonomies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go index ac872bba6036..cf3313880fbb 100755 --- a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( datacatalogpb "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -159,6 +158,8 @@ type policyTagManagerSerializationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyTagManagerSerializationClient creates a new policy tag manager serialization client based on gRPC. @@ -186,6 +187,7 @@ func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option. connPool: connPool, policyTagManagerSerializationClient: datacatalogpb.NewPolicyTagManagerSerializationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -232,6 +234,8 @@ type policyTagManagerSerializationRESTClient struct { // Points back to the CallOptions field of the containing PolicyTagManagerSerializationClient CallOptions **PolicyTagManagerSerializationCallOptions + + logger *slog.Logger } // NewPolicyTagManagerSerializationRESTClient creates a new policy tag manager serialization rest client. @@ -250,6 +254,7 @@ func NewPolicyTagManagerSerializationRESTClient(ctx context.Context, opts ...opt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -302,7 +307,7 @@ func (c *policyTagManagerSerializationGRPCClient) ImportTaxonomies(ctx context.C var resp *datacatalogpb.ImportTaxonomiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerSerializationClient.ImportTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerSerializationClient.ImportTaxonomies, req, settings.GRPC, c.logger, "ImportTaxonomies") return err }, opts...) if err != nil { @@ -320,7 +325,7 @@ func (c *policyTagManagerSerializationGRPCClient) ExportTaxonomies(ctx context.C var resp *datacatalogpb.ExportTaxonomiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTagManagerSerializationClient.ExportTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTagManagerSerializationClient.ExportTaxonomies, req, settings.GRPC, c.logger, "ExportTaxonomies") return err }, opts...) if err != nil { @@ -367,17 +372,7 @@ func (c *policyTagManagerSerializationRESTClient) ImportTaxonomies(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportTaxonomies") if err != nil { return err } @@ -437,17 +432,7 @@ func (c *policyTagManagerSerializationRESTClient) ExportTaxonomies(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ExportTaxonomies") if err != nil { return err } diff --git a/datacatalog/lineage/apiv1/helpers.go b/datacatalog/lineage/apiv1/helpers.go index 603da9019948..dbba3b598208 100755 --- a/datacatalog/lineage/apiv1/helpers.go +++ b/datacatalog/lineage/apiv1/helpers.go @@ -18,10 +18,20 @@ package lineage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datalineage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datacatalog/lineage/apiv1/lineage_client.go b/datacatalog/lineage/apiv1/lineage_client.go index 98d40202294c..30ae49d6fd79 100755 --- a/datacatalog/lineage/apiv1/lineage_client.go +++ b/datacatalog/lineage/apiv1/lineage_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -733,6 +732,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new lineage client based on gRPC. @@ -762,6 +763,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: lineagepb.NewLineageClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -825,6 +827,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new lineage rest client. @@ -845,6 +849,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -907,7 +912,7 @@ func (c *gRPCClient) ProcessOpenLineageRunEvent(ctx context.Context, req *lineag var resp *lineagepb.ProcessOpenLineageRunEventResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ProcessOpenLineageRunEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ProcessOpenLineageRunEvent, req, settings.GRPC, c.logger, "ProcessOpenLineageRunEvent") return err }, opts...) if err != nil { @@ -925,7 +930,7 @@ func (c *gRPCClient) CreateProcess(ctx context.Context, req *lineagepb.CreatePro var resp *lineagepb.Process err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateProcess, req, settings.GRPC, c.logger, "CreateProcess") return err }, opts...) if err != nil { @@ -943,7 +948,7 @@ func (c *gRPCClient) UpdateProcess(ctx context.Context, req *lineagepb.UpdatePro var resp *lineagepb.Process err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateProcess, req, settings.GRPC, c.logger, "UpdateProcess") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *gRPCClient) GetProcess(ctx context.Context, req *lineagepb.GetProcessRe var resp *lineagepb.Process err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProcess, req, settings.GRPC, c.logger, "GetProcess") return err }, opts...) if err != nil { @@ -990,7 +995,7 @@ func (c *gRPCClient) ListProcesses(ctx context.Context, req *lineagepb.ListProce } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListProcesses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListProcesses, req, settings.GRPC, c.logger, "ListProcesses") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *gRPCClient) DeleteProcess(ctx context.Context, req *lineagepb.DeletePro var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteProcess, req, settings.GRPC, c.logger, "DeleteProcess") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *gRPCClient) CreateRun(ctx context.Context, req *lineagepb.CreateRunRequ var resp *lineagepb.Run err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRun, req, settings.GRPC, c.logger, "CreateRun") return err }, opts...) if err != nil { @@ -1063,7 +1068,7 @@ func (c *gRPCClient) UpdateRun(ctx context.Context, req *lineagepb.UpdateRunRequ var resp *lineagepb.Run err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRun, req, settings.GRPC, c.logger, "UpdateRun") return err }, opts...) if err != nil { @@ -1081,7 +1086,7 @@ func (c *gRPCClient) GetRun(ctx context.Context, req *lineagepb.GetRunRequest, o var resp *lineagepb.Run err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRun, req, settings.GRPC, c.logger, "GetRun") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *gRPCClient) ListRuns(ctx context.Context, req *lineagepb.ListRunsReques } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRuns, req, settings.GRPC, c.logger, "ListRuns") return err }, opts...) if err != nil { @@ -1145,7 +1150,7 @@ func (c *gRPCClient) DeleteRun(ctx context.Context, req *lineagepb.DeleteRunRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRun, req, settings.GRPC, c.logger, "DeleteRun") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *gRPCClient) CreateLineageEvent(ctx context.Context, req *lineagepb.Crea var resp *lineagepb.LineageEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateLineageEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateLineageEvent, req, settings.GRPC, c.logger, "CreateLineageEvent") return err }, opts...) if err != nil { @@ -1183,7 +1188,7 @@ func (c *gRPCClient) GetLineageEvent(ctx context.Context, req *lineagepb.GetLine var resp *lineagepb.LineageEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLineageEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLineageEvent, req, settings.GRPC, c.logger, "GetLineageEvent") return err }, opts...) if err != nil { @@ -1212,7 +1217,7 @@ func (c *gRPCClient) ListLineageEvents(ctx context.Context, req *lineagepb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLineageEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLineageEvents, req, settings.GRPC, c.logger, "ListLineageEvents") return err }, opts...) if err != nil { @@ -1246,7 +1251,7 @@ func (c *gRPCClient) DeleteLineageEvent(ctx context.Context, req *lineagepb.Dele opts = append((*c.CallOptions).DeleteLineageEvent[0:len((*c.CallOptions).DeleteLineageEvent):len((*c.CallOptions).DeleteLineageEvent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteLineageEvent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteLineageEvent, req, settings.GRPC, c.logger, "DeleteLineageEvent") return err }, opts...) return err @@ -1272,7 +1277,7 @@ func (c *gRPCClient) SearchLinks(ctx context.Context, req *lineagepb.SearchLinks } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchLinks, req, settings.GRPC, c.logger, "SearchLinks") return err }, opts...) if err != nil { @@ -1318,7 +1323,7 @@ func (c *gRPCClient) BatchSearchLinkProcesses(ctx context.Context, req *lineagep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchSearchLinkProcesses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchSearchLinkProcesses, req, settings.GRPC, c.logger, "BatchSearchLinkProcesses") return err }, opts...) if err != nil { @@ -1352,7 +1357,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1366,7 +1371,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1381,7 +1386,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1410,7 +1415,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1482,17 +1487,7 @@ func (c *restClient) ProcessOpenLineageRunEvent(ctx context.Context, req *lineag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProcessOpenLineageRunEvent") if err != nil { return err } @@ -1552,17 +1547,7 @@ func (c *restClient) CreateProcess(ctx context.Context, req *lineagepb.CreatePro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProcess") if err != nil { return err } @@ -1629,17 +1614,7 @@ func (c *restClient) UpdateProcess(ctx context.Context, req *lineagepb.UpdatePro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProcess") if err != nil { return err } @@ -1689,17 +1664,7 @@ func (c *restClient) GetProcess(ctx context.Context, req *lineagepb.GetProcessRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcess") if err != nil { return err } @@ -1762,21 +1727,10 @@ func (c *restClient) ListProcesses(ctx context.Context, req *lineagepb.ListProce } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcesses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1841,21 +1795,10 @@ func (c *restClient) DeleteProcess(ctx context.Context, req *lineagepb.DeletePro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcess") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1916,17 +1859,7 @@ func (c *restClient) CreateRun(ctx context.Context, req *lineagepb.CreateRunRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRun") if err != nil { return err } @@ -1993,17 +1926,7 @@ func (c *restClient) UpdateRun(ctx context.Context, req *lineagepb.UpdateRunRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRun") if err != nil { return err } @@ -2053,17 +1976,7 @@ func (c *restClient) GetRun(ctx context.Context, req *lineagepb.GetRunRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRun") if err != nil { return err } @@ -2126,21 +2039,10 @@ func (c *restClient) ListRuns(ctx context.Context, req *lineagepb.ListRunsReques } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRuns") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2205,21 +2107,10 @@ func (c *restClient) DeleteRun(ctx context.Context, req *lineagepb.DeleteRunRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRun") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2280,17 +2171,7 @@ func (c *restClient) CreateLineageEvent(ctx context.Context, req *lineagepb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateLineageEvent") if err != nil { return err } @@ -2340,17 +2221,7 @@ func (c *restClient) GetLineageEvent(ctx context.Context, req *lineagepb.GetLine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLineageEvent") if err != nil { return err } @@ -2413,21 +2284,10 @@ func (c *restClient) ListLineageEvents(ctx context.Context, req *lineagepb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLineageEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2490,15 +2350,8 @@ func (c *restClient) DeleteLineageEvent(ctx context.Context, req *lineagepb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLineageEvent") + return err }, opts...) } @@ -2555,21 +2408,10 @@ func (c *restClient) SearchLinks(ctx context.Context, req *lineagepb.SearchLinks } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchLinks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2657,21 +2499,10 @@ func (c *restClient) BatchSearchLinkProcesses(ctx context.Context, req *lineagep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchSearchLinkProcesses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2737,15 +2568,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2779,15 +2603,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2824,17 +2641,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2899,21 +2706,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datacatalog/lineage/apiv1/lineage_client_example_go123_test.go b/datacatalog/lineage/apiv1/lineage_client_example_go123_test.go index bdcd4460f82b..ba652e31037f 100644 --- a/datacatalog/lineage/apiv1/lineage_client_example_go123_test.go +++ b/datacatalog/lineage/apiv1/lineage_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_BatchSearchLinkProcesses_all() { } for resp, err := range c.BatchSearchLinkProcesses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListLineageEvents_all() { } for resp, err := range c.ListLineageEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListProcesses_all() { } for resp, err := range c.ListProcesses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListRuns_all() { } for resp, err := range c.ListRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_SearchLinks_all() { } for resp, err := range c.SearchLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datacatalog/lineage/apiv1/lineagepb/lineage.pb.go b/datacatalog/lineage/apiv1/lineagepb/lineage.pb.go index 9bb7568d71d7..ddca28245a9e 100755 --- a/datacatalog/lineage/apiv1/lineagepb/lineage.pb.go +++ b/datacatalog/lineage/apiv1/lineagepb/lineage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datacatalog/lineage/v1/lineage.proto @@ -318,11 +318,9 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Process) String() string { @@ -333,7 +331,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +406,9 @@ type Run struct { func (x *Run) Reset() { *x = Run{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Run) String() string { @@ -423,7 +419,7 @@ func (*Run) ProtoMessage() {} func (x *Run) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +504,9 @@ type LineageEvent struct { func (x *LineageEvent) Reset() { *x = LineageEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LineageEvent) String() string { @@ -523,7 +517,7 @@ func (*LineageEvent) ProtoMessage() {} func (x *LineageEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +574,9 @@ type EventLink struct { func (x *EventLink) Reset() { *x = EventLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventLink) String() string { @@ -595,7 +587,7 @@ func (*EventLink) ProtoMessage() {} func (x *EventLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +630,9 @@ type EntityReference struct { func (x *EntityReference) Reset() { *x = EntityReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityReference) String() string { @@ -653,7 +643,7 @@ func (*EntityReference) ProtoMessage() {} func (x *EntityReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,11 +690,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -715,7 +703,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +781,9 @@ type ProcessOpenLineageRunEventRequest struct { func (x *ProcessOpenLineageRunEventRequest) Reset() { *x = ProcessOpenLineageRunEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOpenLineageRunEventRequest) String() string { @@ -808,7 +794,7 @@ func (*ProcessOpenLineageRunEventRequest) ProtoMessage() {} func (x *ProcessOpenLineageRunEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +852,9 @@ type ProcessOpenLineageRunEventResponse struct { func (x *ProcessOpenLineageRunEventResponse) Reset() { *x = ProcessOpenLineageRunEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOpenLineageRunEventResponse) String() string { @@ -881,7 +865,7 @@ func (*ProcessOpenLineageRunEventResponse) ProtoMessage() {} func (x *ProcessOpenLineageRunEventResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +921,9 @@ type CreateProcessRequest struct { func (x *CreateProcessRequest) Reset() { *x = CreateProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProcessRequest) String() string { @@ -952,7 +934,7 @@ func (*CreateProcessRequest) ProtoMessage() {} func (x *CreateProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +990,9 @@ type UpdateProcessRequest struct { func (x *UpdateProcessRequest) Reset() { *x = UpdateProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProcessRequest) String() string { @@ -1023,7 +1003,7 @@ func (*UpdateProcessRequest) ProtoMessage() {} func (x *UpdateProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,11 +1052,9 @@ type GetProcessRequest struct { func (x *GetProcessRequest) Reset() { *x = GetProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessRequest) String() string { @@ -1087,7 +1065,7 @@ func (*GetProcessRequest) ProtoMessage() {} func (x *GetProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1112,9 @@ type ListProcessesRequest struct { func (x *ListProcessesRequest) Reset() { *x = ListProcessesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessesRequest) String() string { @@ -1149,7 +1125,7 @@ func (*ListProcessesRequest) ProtoMessage() {} func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1177,9 @@ type ListProcessesResponse struct { func (x *ListProcessesResponse) Reset() { *x = ListProcessesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessesResponse) String() string { @@ -1216,7 +1190,7 @@ func (*ListProcessesResponse) ProtoMessage() {} func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,11 +1235,9 @@ type DeleteProcessRequest struct { func (x *DeleteProcessRequest) Reset() { *x = DeleteProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessRequest) String() string { @@ -1276,7 +1248,7 @@ func (*DeleteProcessRequest) ProtoMessage() {} func (x *DeleteProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1324,11 +1296,9 @@ type CreateRunRequest struct { func (x *CreateRunRequest) Reset() { *x = CreateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRunRequest) String() string { @@ -1339,7 +1309,7 @@ func (*CreateRunRequest) ProtoMessage() {} func (x *CreateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,11 +1368,9 @@ type UpdateRunRequest struct { func (x *UpdateRunRequest) Reset() { *x = UpdateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRunRequest) String() string { @@ -1413,7 +1381,7 @@ func (*UpdateRunRequest) ProtoMessage() {} func (x *UpdateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1430,9 @@ type GetRunRequest struct { func (x *GetRunRequest) Reset() { *x = GetRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRunRequest) String() string { @@ -1477,7 +1443,7 @@ func (*GetRunRequest) ProtoMessage() {} func (x *GetRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1523,11 +1489,9 @@ type ListRunsRequest struct { func (x *ListRunsRequest) Reset() { *x = ListRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsRequest) String() string { @@ -1538,7 +1502,7 @@ func (*ListRunsRequest) ProtoMessage() {} func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1590,11 +1554,9 @@ type ListRunsResponse struct { func (x *ListRunsResponse) Reset() { *x = ListRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsResponse) String() string { @@ -1605,7 +1567,7 @@ func (*ListRunsResponse) ProtoMessage() {} func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1650,11 +1612,9 @@ type DeleteRunRequest struct { func (x *DeleteRunRequest) Reset() { *x = DeleteRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRunRequest) String() string { @@ -1665,7 +1625,7 @@ func (*DeleteRunRequest) ProtoMessage() {} func (x *DeleteRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,11 +1673,9 @@ type CreateLineageEventRequest struct { func (x *CreateLineageEventRequest) Reset() { *x = CreateLineageEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLineageEventRequest) String() string { @@ -1728,7 +1686,7 @@ func (*CreateLineageEventRequest) ProtoMessage() {} func (x *CreateLineageEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1777,11 +1735,9 @@ type GetLineageEventRequest struct { func (x *GetLineageEventRequest) Reset() { *x = GetLineageEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLineageEventRequest) String() string { @@ -1792,7 +1748,7 @@ func (*GetLineageEventRequest) ProtoMessage() {} func (x *GetLineageEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1840,11 +1796,9 @@ type ListLineageEventsRequest struct { func (x *ListLineageEventsRequest) Reset() { *x = ListLineageEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLineageEventsRequest) String() string { @@ -1855,7 +1809,7 @@ func (*ListLineageEventsRequest) ProtoMessage() {} func (x *ListLineageEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1907,11 +1861,9 @@ type ListLineageEventsResponse struct { func (x *ListLineageEventsResponse) Reset() { *x = ListLineageEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLineageEventsResponse) String() string { @@ -1922,7 +1874,7 @@ func (*ListLineageEventsResponse) ProtoMessage() {} func (x *ListLineageEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1967,11 +1919,9 @@ type DeleteLineageEventRequest struct { func (x *DeleteLineageEventRequest) Reset() { *x = DeleteLineageEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLineageEventRequest) String() string { @@ -1982,7 +1932,7 @@ func (*DeleteLineageEventRequest) ProtoMessage() {} func (x *DeleteLineageEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +1994,9 @@ type SearchLinksRequest struct { func (x *SearchLinksRequest) Reset() { *x = SearchLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchLinksRequest) String() string { @@ -2059,7 +2007,7 @@ func (*SearchLinksRequest) ProtoMessage() {} func (x *SearchLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2153,11 +2101,9 @@ type SearchLinksResponse struct { func (x *SearchLinksResponse) Reset() { *x = SearchLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchLinksResponse) String() string { @@ -2168,7 +2114,7 @@ func (*SearchLinksResponse) ProtoMessage() {} func (x *SearchLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2222,11 +2168,9 @@ type Link struct { func (x *Link) Reset() { *x = Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Link) String() string { @@ -2237,7 +2181,7 @@ func (*Link) ProtoMessage() {} func (x *Link) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2318,11 +2262,9 @@ type BatchSearchLinkProcessesRequest struct { func (x *BatchSearchLinkProcessesRequest) Reset() { *x = BatchSearchLinkProcessesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchSearchLinkProcessesRequest) String() string { @@ -2333,7 +2275,7 @@ func (*BatchSearchLinkProcessesRequest) ProtoMessage() {} func (x *BatchSearchLinkProcessesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2392,11 +2334,9 @@ type BatchSearchLinkProcessesResponse struct { func (x *BatchSearchLinkProcessesResponse) Reset() { *x = BatchSearchLinkProcessesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchSearchLinkProcessesResponse) String() string { @@ -2407,7 +2347,7 @@ func (*BatchSearchLinkProcessesResponse) ProtoMessage() {} func (x *BatchSearchLinkProcessesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2456,11 +2396,9 @@ type ProcessLinks struct { func (x *ProcessLinks) Reset() { *x = ProcessLinks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessLinks) String() string { @@ -2471,7 +2409,7 @@ func (*ProcessLinks) ProtoMessage() {} func (x *ProcessLinks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2517,11 +2455,9 @@ type ProcessLinkInfo struct { func (x *ProcessLinkInfo) Reset() { *x = ProcessLinkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessLinkInfo) String() string { @@ -2532,7 +2468,7 @@ func (*ProcessLinkInfo) ProtoMessage() {} func (x *ProcessLinkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2594,11 +2530,9 @@ type Origin struct { func (x *Origin) Reset() { *x = Origin{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Origin) String() string { @@ -2609,7 +2543,7 @@ func (*Origin) ProtoMessage() {} func (x *Origin) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3497,404 +3431,6 @@ func file_google_cloud_datacatalog_lineage_v1_lineage_proto_init() { if File_google_cloud_datacatalog_lineage_v1_lineage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Process); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Run); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LineageEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EventLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EntityReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOpenLineageRunEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOpenLineageRunEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateLineageEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetLineageEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListLineageEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListLineageEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLineageEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*BatchSearchLinkProcessesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BatchSearchLinkProcessesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ProcessLinks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ProcessLinkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Origin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datacatalog_lineage_v1_lineage_proto_msgTypes[25].OneofWrappers = []any{ (*SearchLinksRequest_Source)(nil), (*SearchLinksRequest_Target)(nil), diff --git a/dataflow/apiv1beta3/dataflowpb/environment.pb.go b/dataflow/apiv1beta3/dataflowpb/environment.pb.go index 8a5e41bde468..8c7e151ec1ba 100755 --- a/dataflow/apiv1beta3/dataflowpb/environment.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/environment.proto @@ -520,11 +520,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -535,7 +533,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +694,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -711,7 +707,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -774,11 +770,9 @@ type Disk struct { func (x *Disk) Reset() { *x = Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Disk) String() string { @@ -789,7 +783,7 @@ func (*Disk) ProtoMessage() {} func (x *Disk) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -865,11 +859,9 @@ type WorkerSettings struct { func (x *WorkerSettings) Reset() { *x = WorkerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerSettings) String() string { @@ -880,7 +872,7 @@ func (*WorkerSettings) ProtoMessage() {} func (x *WorkerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +1005,9 @@ type TaskRunnerSettings struct { func (x *TaskRunnerSettings) Reset() { *x = TaskRunnerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskRunnerSettings) String() string { @@ -1028,7 +1018,7 @@ func (*TaskRunnerSettings) ProtoMessage() {} func (x *TaskRunnerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1190,11 +1180,9 @@ type AutoscalingSettings struct { func (x *AutoscalingSettings) Reset() { *x = AutoscalingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingSettings) String() string { @@ -1205,7 +1193,7 @@ func (*AutoscalingSettings) ProtoMessage() {} func (x *AutoscalingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1246,9 @@ type SdkHarnessContainerImage struct { func (x *SdkHarnessContainerImage) Reset() { *x = SdkHarnessContainerImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SdkHarnessContainerImage) String() string { @@ -1273,7 +1259,7 @@ func (*SdkHarnessContainerImage) ProtoMessage() {} func (x *SdkHarnessContainerImage) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,11 +1397,9 @@ type WorkerPool struct { func (x *WorkerPool) Reset() { *x = WorkerPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerPool) String() string { @@ -1426,7 +1410,7 @@ func (*WorkerPool) ProtoMessage() {} func (x *WorkerPool) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1608,11 +1592,9 @@ type DebugOptions struct { func (x *DebugOptions) Reset() { *x = DebugOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DebugOptions) String() string { @@ -1623,7 +1605,7 @@ func (*DebugOptions) ProtoMessage() {} func (x *DebugOptions) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2042,116 +2024,6 @@ func file_google_dataflow_v1beta3_environment_proto_init() { if File_google_dataflow_v1beta3_environment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WorkerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TaskRunnerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SdkHarnessContainerImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*WorkerPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_environment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DebugOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataflow/apiv1beta3/dataflowpb/jobs.pb.go b/dataflow/apiv1beta3/dataflowpb/jobs.pb.go index fadecc7714c5..1c9405ca7d47 100755 --- a/dataflow/apiv1beta3/dataflowpb/jobs.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/jobs.proto @@ -570,11 +570,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -585,7 +583,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +787,9 @@ type DatastoreIODetails struct { func (x *DatastoreIODetails) Reset() { *x = DatastoreIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatastoreIODetails) String() string { @@ -804,7 +800,7 @@ func (*DatastoreIODetails) ProtoMessage() {} func (x *DatastoreIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +843,9 @@ type PubSubIODetails struct { func (x *PubSubIODetails) Reset() { *x = PubSubIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubSubIODetails) String() string { @@ -862,7 +856,7 @@ func (*PubSubIODetails) ProtoMessage() {} func (x *PubSubIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +897,9 @@ type FileIODetails struct { func (x *FileIODetails) Reset() { *x = FileIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileIODetails) String() string { @@ -918,7 +910,7 @@ func (*FileIODetails) ProtoMessage() {} func (x *FileIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +948,9 @@ type BigTableIODetails struct { func (x *BigTableIODetails) Reset() { *x = BigTableIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigTableIODetails) String() string { @@ -971,7 +961,7 @@ func (*BigTableIODetails) ProtoMessage() {} func (x *BigTableIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1015,9 @@ type BigQueryIODetails struct { func (x *BigQueryIODetails) Reset() { *x = BigQueryIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryIODetails) String() string { @@ -1040,7 +1028,7 @@ func (*BigQueryIODetails) ProtoMessage() {} func (x *BigQueryIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1087,9 @@ type SpannerIODetails struct { func (x *SpannerIODetails) Reset() { *x = SpannerIODetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerIODetails) String() string { @@ -1114,7 +1100,7 @@ func (*SpannerIODetails) ProtoMessage() {} func (x *SpannerIODetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1166,11 +1152,9 @@ type SdkVersion struct { func (x *SdkVersion) Reset() { *x = SdkVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SdkVersion) String() string { @@ -1181,7 +1165,7 @@ func (*SdkVersion) ProtoMessage() {} func (x *SdkVersion) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1226,9 @@ type JobMetadata struct { func (x *JobMetadata) Reset() { *x = JobMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobMetadata) String() string { @@ -1257,7 +1239,7 @@ func (*JobMetadata) ProtoMessage() {} func (x *JobMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1337,11 +1319,9 @@ type ExecutionStageState struct { func (x *ExecutionStageState) Reset() { *x = ExecutionStageState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStageState) String() string { @@ -1352,7 +1332,7 @@ func (*ExecutionStageState) ProtoMessage() {} func (x *ExecutionStageState) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1406,11 +1386,9 @@ type PipelineDescription struct { func (x *PipelineDescription) Reset() { *x = PipelineDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDescription) String() string { @@ -1421,7 +1399,7 @@ func (*PipelineDescription) ProtoMessage() {} func (x *PipelineDescription) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1479,11 +1457,9 @@ type TransformSummary struct { func (x *TransformSummary) Reset() { *x = TransformSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformSummary) String() string { @@ -1494,7 +1470,7 @@ func (*TransformSummary) ProtoMessage() {} func (x *TransformSummary) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1579,11 +1555,9 @@ type ExecutionStageSummary struct { func (x *ExecutionStageSummary) Reset() { *x = ExecutionStageSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStageSummary) String() string { @@ -1594,7 +1568,7 @@ func (*ExecutionStageSummary) ProtoMessage() {} func (x *ExecutionStageSummary) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1708,11 +1682,9 @@ type DisplayData struct { func (x *DisplayData) Reset() { *x = DisplayData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisplayData) String() string { @@ -1723,7 +1695,7 @@ func (*DisplayData) ProtoMessage() {} func (x *DisplayData) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1925,11 +1897,9 @@ type Step struct { func (x *Step) Reset() { *x = Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Step) String() string { @@ -1940,7 +1910,7 @@ func (*Step) ProtoMessage() {} func (x *Step) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1989,11 +1959,9 @@ type JobExecutionInfo struct { func (x *JobExecutionInfo) Reset() { *x = JobExecutionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobExecutionInfo) String() string { @@ -2004,7 +1972,7 @@ func (*JobExecutionInfo) ProtoMessage() {} func (x *JobExecutionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2009,9 @@ type JobExecutionStageInfo struct { func (x *JobExecutionStageInfo) Reset() { *x = JobExecutionStageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobExecutionStageInfo) String() string { @@ -2056,7 +2022,7 @@ func (*JobExecutionStageInfo) ProtoMessage() {} func (x *JobExecutionStageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,11 +2066,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -2115,7 +2079,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2185,11 +2149,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -2200,7 +2162,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2226,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -2279,7 +2239,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2352,11 +2312,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -2367,7 +2325,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2441,11 +2399,9 @@ type FailedLocation struct { func (x *FailedLocation) Reset() { *x = FailedLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedLocation) String() string { @@ -2456,7 +2412,7 @@ func (*FailedLocation) ProtoMessage() {} func (x *FailedLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2500,11 +2456,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -2515,7 +2469,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2573,11 +2527,9 @@ type SnapshotJobRequest struct { func (x *SnapshotJobRequest) Reset() { *x = SnapshotJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotJobRequest) String() string { @@ -2588,7 +2540,7 @@ func (*SnapshotJobRequest) ProtoMessage() {} func (x *SnapshotJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2657,11 +2609,9 @@ type CheckActiveJobsRequest struct { func (x *CheckActiveJobsRequest) Reset() { *x = CheckActiveJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckActiveJobsRequest) String() string { @@ -2672,7 +2622,7 @@ func (*CheckActiveJobsRequest) ProtoMessage() {} func (x *CheckActiveJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2706,11 +2656,9 @@ type CheckActiveJobsResponse struct { func (x *CheckActiveJobsResponse) Reset() { *x = CheckActiveJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckActiveJobsResponse) String() string { @@ -2721,7 +2669,7 @@ func (*CheckActiveJobsResponse) ProtoMessage() {} func (x *CheckActiveJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2762,11 +2710,9 @@ type ExecutionStageSummary_StageSource struct { func (x *ExecutionStageSummary_StageSource) Reset() { *x = ExecutionStageSummary_StageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStageSummary_StageSource) String() string { @@ -2777,7 +2723,7 @@ func (*ExecutionStageSummary_StageSource) ProtoMessage() {} func (x *ExecutionStageSummary_StageSource) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2837,11 +2783,9 @@ type ExecutionStageSummary_ComponentTransform struct { func (x *ExecutionStageSummary_ComponentTransform) Reset() { *x = ExecutionStageSummary_ComponentTransform{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStageSummary_ComponentTransform) String() string { @@ -2852,7 +2796,7 @@ func (*ExecutionStageSummary_ComponentTransform) ProtoMessage() {} func (x *ExecutionStageSummary_ComponentTransform) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2906,11 +2850,9 @@ type ExecutionStageSummary_ComponentSource struct { func (x *ExecutionStageSummary_ComponentSource) Reset() { *x = ExecutionStageSummary_ComponentSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStageSummary_ComponentSource) String() string { @@ -2921,7 +2863,7 @@ func (*ExecutionStageSummary_ComponentSource) ProtoMessage() {} func (x *ExecutionStageSummary_ComponentSource) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3710,356 +3652,6 @@ func file_google_dataflow_v1beta3_jobs_proto_init() { } file_google_dataflow_v1beta3_environment_proto_init() file_google_dataflow_v1beta3_snapshots_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DatastoreIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PubSubIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FileIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigTableIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpannerIODetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SdkVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*JobMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStageState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PipelineDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TransformSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStageSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DisplayData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*JobExecutionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*JobExecutionStageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FailedLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CheckActiveJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CheckActiveJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStageSummary_StageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStageSummary_ComponentTransform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_jobs_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStageSummary_ComponentSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_dataflow_v1beta3_jobs_proto_msgTypes[13].OneofWrappers = []any{ (*DisplayData_StrValue)(nil), (*DisplayData_Int64Value)(nil), diff --git a/dataflow/apiv1beta3/dataflowpb/messages.pb.go b/dataflow/apiv1beta3/dataflowpb/messages.pb.go index 8b85f8c5374b..f367caabfdc8 100755 --- a/dataflow/apiv1beta3/dataflowpb/messages.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/messages.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/messages.proto @@ -214,11 +214,9 @@ type JobMessage struct { func (x *JobMessage) Reset() { *x = JobMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobMessage) String() string { @@ -229,7 +227,7 @@ func (*JobMessage) ProtoMessage() {} func (x *JobMessage) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +289,9 @@ type StructuredMessage struct { func (x *StructuredMessage) Reset() { *x = StructuredMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredMessage) String() string { @@ -306,7 +302,7 @@ func (*StructuredMessage) ProtoMessage() {} func (x *StructuredMessage) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +364,9 @@ type AutoscalingEvent struct { func (x *AutoscalingEvent) Reset() { *x = AutoscalingEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingEvent) String() string { @@ -383,7 +377,7 @@ func (*AutoscalingEvent) ProtoMessage() {} func (x *AutoscalingEvent) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +471,9 @@ type ListJobMessagesRequest struct { func (x *ListJobMessagesRequest) Reset() { *x = ListJobMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobMessagesRequest) String() string { @@ -492,7 +484,7 @@ func (*ListJobMessagesRequest) ProtoMessage() {} func (x *ListJobMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +571,9 @@ type ListJobMessagesResponse struct { func (x *ListJobMessagesResponse) Reset() { *x = ListJobMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobMessagesResponse) String() string { @@ -594,7 +584,7 @@ func (*ListJobMessagesResponse) ProtoMessage() {} func (x *ListJobMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +634,9 @@ type StructuredMessage_Parameter struct { func (x *StructuredMessage_Parameter) Reset() { *x = StructuredMessage_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredMessage_Parameter) String() string { @@ -659,7 +647,7 @@ func (*StructuredMessage_Parameter) ProtoMessage() {} func (x *StructuredMessage_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,80 +900,6 @@ func file_google_dataflow_v1beta3_messages_proto_init() { if File_google_dataflow_v1beta3_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_messages_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*JobMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_messages_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StructuredMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_messages_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_messages_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListJobMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_messages_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListJobMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_messages_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StructuredMessage_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataflow/apiv1beta3/dataflowpb/metrics.pb.go b/dataflow/apiv1beta3/dataflowpb/metrics.pb.go index 5358a02c9bfa..1d14da239c93 100755 --- a/dataflow/apiv1beta3/dataflowpb/metrics.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/metrics.proto @@ -130,11 +130,9 @@ type MetricStructuredName struct { func (x *MetricStructuredName) Reset() { *x = MetricStructuredName{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricStructuredName) String() string { @@ -145,7 +143,7 @@ func (*MetricStructuredName) ProtoMessage() {} func (x *MetricStructuredName) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +234,9 @@ type MetricUpdate struct { func (x *MetricUpdate) Reset() { *x = MetricUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricUpdate) String() string { @@ -251,7 +247,7 @@ func (*MetricUpdate) ProtoMessage() {} func (x *MetricUpdate) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +360,9 @@ type GetJobMetricsRequest struct { func (x *GetJobMetricsRequest) Reset() { *x = GetJobMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobMetricsRequest) String() string { @@ -379,7 +373,7 @@ func (*GetJobMetricsRequest) ProtoMessage() {} func (x *GetJobMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,11 +436,9 @@ type JobMetrics struct { func (x *JobMetrics) Reset() { *x = JobMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobMetrics) String() string { @@ -457,7 +449,7 @@ func (*JobMetrics) ProtoMessage() {} func (x *JobMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +504,9 @@ type GetJobExecutionDetailsRequest struct { func (x *GetJobExecutionDetailsRequest) Reset() { *x = GetJobExecutionDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobExecutionDetailsRequest) String() string { @@ -527,7 +517,7 @@ func (*GetJobExecutionDetailsRequest) ProtoMessage() {} func (x *GetJobExecutionDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +583,9 @@ type ProgressTimeseries struct { func (x *ProgressTimeseries) Reset() { *x = ProgressTimeseries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProgressTimeseries) String() string { @@ -608,7 +596,7 @@ func (*ProgressTimeseries) ProtoMessage() {} func (x *ProgressTimeseries) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +651,9 @@ type StageSummary struct { func (x *StageSummary) Reset() { *x = StageSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StageSummary) String() string { @@ -678,7 +664,7 @@ func (*StageSummary) ProtoMessage() {} func (x *StageSummary) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +737,9 @@ type JobExecutionDetails struct { func (x *JobExecutionDetails) Reset() { *x = JobExecutionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobExecutionDetails) String() string { @@ -766,7 +750,7 @@ func (*JobExecutionDetails) ProtoMessage() {} func (x *JobExecutionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +812,9 @@ type GetStageExecutionDetailsRequest struct { func (x *GetStageExecutionDetailsRequest) Reset() { *x = GetStageExecutionDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStageExecutionDetailsRequest) String() string { @@ -843,7 +825,7 @@ func (*GetStageExecutionDetailsRequest) ProtoMessage() {} func (x *GetStageExecutionDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +923,9 @@ type WorkItemDetails struct { func (x *WorkItemDetails) Reset() { *x = WorkItemDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkItemDetails) String() string { @@ -956,7 +936,7 @@ func (*WorkItemDetails) ProtoMessage() {} func (x *WorkItemDetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1034,11 +1014,9 @@ type WorkerDetails struct { func (x *WorkerDetails) Reset() { *x = WorkerDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerDetails) String() string { @@ -1049,7 +1027,7 @@ func (*WorkerDetails) ProtoMessage() {} func (x *WorkerDetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1072,9 @@ type StageExecutionDetails struct { func (x *StageExecutionDetails) Reset() { *x = StageExecutionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StageExecutionDetails) String() string { @@ -1109,7 +1085,7 @@ func (*StageExecutionDetails) ProtoMessage() {} func (x *StageExecutionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1152,11 +1128,9 @@ type ProgressTimeseries_Point struct { func (x *ProgressTimeseries_Point) Reset() { *x = ProgressTimeseries_Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProgressTimeseries_Point) String() string { @@ -1167,7 +1141,7 @@ func (*ProgressTimeseries_Point) ProtoMessage() {} func (x *ProgressTimeseries_Point) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1562,164 +1536,6 @@ func file_google_dataflow_v1beta3_metrics_proto_init() { if File_google_dataflow_v1beta3_metrics_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetricStructuredName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetricUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetJobMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*JobMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetJobExecutionDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProgressTimeseries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StageSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*JobExecutionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetStageExecutionDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*WorkItemDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*WorkerDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StageExecutionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_metrics_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ProgressTimeseries_Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go b/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go index b606d028db25..d7ddb5b7c10c 100755 --- a/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/snapshots.proto @@ -124,11 +124,9 @@ type PubsubSnapshotMetadata struct { func (x *PubsubSnapshotMetadata) Reset() { *x = PubsubSnapshotMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubSnapshotMetadata) String() string { @@ -139,7 +137,7 @@ func (*PubsubSnapshotMetadata) ProtoMessage() {} func (x *PubsubSnapshotMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,11 +204,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -221,7 +217,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +318,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -337,7 +331,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +383,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -404,7 +396,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +441,9 @@ type DeleteSnapshotResponse struct { func (x *DeleteSnapshotResponse) Reset() { *x = DeleteSnapshotResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotResponse) String() string { @@ -464,7 +454,7 @@ func (*DeleteSnapshotResponse) ProtoMessage() {} func (x *DeleteSnapshotResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +485,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -510,7 +498,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +546,9 @@ type ListSnapshotsResponse struct { func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { @@ -573,7 +559,7 @@ func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,92 +799,6 @@ func file_google_dataflow_v1beta3_snapshots_proto_init() { if File_google_dataflow_v1beta3_snapshots_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PubsubSnapshotMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataflow/apiv1beta3/dataflowpb/streaming.pb.go b/dataflow/apiv1beta3/dataflowpb/streaming.pb.go index 177cf66dda07..3bea4381d728 100755 --- a/dataflow/apiv1beta3/dataflowpb/streaming.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/streaming.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/streaming.proto @@ -56,11 +56,9 @@ type TopologyConfig struct { func (x *TopologyConfig) Reset() { *x = TopologyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TopologyConfig) String() string { @@ -71,7 +69,7 @@ func (*TopologyConfig) ProtoMessage() {} func (x *TopologyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type PubsubLocation struct { func (x *PubsubLocation) Reset() { *x = PubsubLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubLocation) String() string { @@ -166,7 +162,7 @@ func (*PubsubLocation) ProtoMessage() {} func (x *PubsubLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type StreamingStageLocation struct { func (x *StreamingStageLocation) Reset() { *x = StreamingStageLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingStageLocation) String() string { @@ -259,7 +253,7 @@ func (*StreamingStageLocation) ProtoMessage() {} func (x *StreamingStageLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +289,9 @@ type StreamingSideInputLocation struct { func (x *StreamingSideInputLocation) Reset() { *x = StreamingSideInputLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingSideInputLocation) String() string { @@ -310,7 +302,7 @@ func (*StreamingSideInputLocation) ProtoMessage() {} func (x *StreamingSideInputLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +343,9 @@ type CustomSourceLocation struct { func (x *CustomSourceLocation) Reset() { *x = CustomSourceLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomSourceLocation) String() string { @@ -366,7 +356,7 @@ func (*CustomSourceLocation) ProtoMessage() {} func (x *CustomSourceLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +398,9 @@ type StreamLocation struct { func (x *StreamLocation) Reset() { *x = StreamLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamLocation) String() string { @@ -423,7 +411,7 @@ func (*StreamLocation) ProtoMessage() {} func (x *StreamLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +508,9 @@ type StateFamilyConfig struct { func (x *StateFamilyConfig) Reset() { *x = StateFamilyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StateFamilyConfig) String() string { @@ -535,7 +521,7 @@ func (*StateFamilyConfig) ProtoMessage() {} func (x *StateFamilyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +572,9 @@ type ComputationTopology struct { func (x *ComputationTopology) Reset() { *x = ComputationTopology{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputationTopology) String() string { @@ -601,7 +585,7 @@ func (*ComputationTopology) ProtoMessage() {} func (x *ComputationTopology) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +671,9 @@ type KeyRangeLocation struct { func (x *KeyRangeLocation) Reset() { *x = KeyRangeLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyRangeLocation) String() string { @@ -702,7 +684,7 @@ func (*KeyRangeLocation) ProtoMessage() {} func (x *KeyRangeLocation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +750,9 @@ type MountedDataDisk struct { func (x *MountedDataDisk) Reset() { *x = MountedDataDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MountedDataDisk) String() string { @@ -783,7 +763,7 @@ func (*MountedDataDisk) ProtoMessage() {} func (x *MountedDataDisk) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +803,9 @@ type DataDiskAssignment struct { func (x *DataDiskAssignment) Reset() { *x = DataDiskAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiskAssignment) String() string { @@ -838,7 +816,7 @@ func (*DataDiskAssignment) ProtoMessage() {} func (x *DataDiskAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +867,9 @@ type KeyRangeDataDiskAssignment struct { func (x *KeyRangeDataDiskAssignment) Reset() { *x = KeyRangeDataDiskAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyRangeDataDiskAssignment) String() string { @@ -904,7 +880,7 @@ func (*KeyRangeDataDiskAssignment) ProtoMessage() {} func (x *KeyRangeDataDiskAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +931,9 @@ type StreamingComputationRanges struct { func (x *StreamingComputationRanges) Reset() { *x = StreamingComputationRanges{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingComputationRanges) String() string { @@ -970,7 +944,7 @@ func (*StreamingComputationRanges) ProtoMessage() {} func (x *StreamingComputationRanges) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +987,9 @@ type StreamingApplianceSnapshotConfig struct { func (x *StreamingApplianceSnapshotConfig) Reset() { *x = StreamingApplianceSnapshotConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingApplianceSnapshotConfig) String() string { @@ -1028,7 +1000,7 @@ func (*StreamingApplianceSnapshotConfig) ProtoMessage() {} func (x *StreamingApplianceSnapshotConfig) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1301,176 +1273,6 @@ func file_google_dataflow_v1beta3_streaming_proto_init() { if File_google_dataflow_v1beta3_streaming_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_streaming_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TopologyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PubsubLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StreamingStageLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamingSideInputLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomSourceLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StateFamilyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ComputationTopology); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*KeyRangeLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MountedDataDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DataDiskAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*KeyRangeDataDiskAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StreamingComputationRanges); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_streaming_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StreamingApplianceSnapshotConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_dataflow_v1beta3_streaming_proto_msgTypes[5].OneofWrappers = []any{ (*StreamLocation_StreamingStageLocation)(nil), (*StreamLocation_PubsubLocation)(nil), diff --git a/dataflow/apiv1beta3/dataflowpb/templates.pb.go b/dataflow/apiv1beta3/dataflowpb/templates.pb.go index 396f600f57e5..3f1fc7dc1042 100755 --- a/dataflow/apiv1beta3/dataflowpb/templates.pb.go +++ b/dataflow/apiv1beta3/dataflowpb/templates.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/dataflow/v1beta3/templates.proto @@ -287,11 +287,9 @@ type LaunchFlexTemplateResponse struct { func (x *LaunchFlexTemplateResponse) Reset() { *x = LaunchFlexTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchFlexTemplateResponse) String() string { @@ -302,7 +300,7 @@ func (*LaunchFlexTemplateResponse) ProtoMessage() {} func (x *LaunchFlexTemplateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +340,9 @@ type ContainerSpec struct { func (x *ContainerSpec) Reset() { *x = ContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerSpec) String() string { @@ -357,7 +353,7 @@ func (*ContainerSpec) ProtoMessage() {} func (x *ContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +432,9 @@ type LaunchFlexTemplateParameter struct { func (x *LaunchFlexTemplateParameter) Reset() { *x = LaunchFlexTemplateParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchFlexTemplateParameter) String() string { @@ -451,7 +445,7 @@ func (*LaunchFlexTemplateParameter) ProtoMessage() {} func (x *LaunchFlexTemplateParameter) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +636,9 @@ type FlexTemplateRuntimeEnvironment struct { func (x *FlexTemplateRuntimeEnvironment) Reset() { *x = FlexTemplateRuntimeEnvironment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlexTemplateRuntimeEnvironment) String() string { @@ -657,7 +649,7 @@ func (*FlexTemplateRuntimeEnvironment) ProtoMessage() {} func (x *FlexTemplateRuntimeEnvironment) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +846,9 @@ type LaunchFlexTemplateRequest struct { func (x *LaunchFlexTemplateRequest) Reset() { *x = LaunchFlexTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchFlexTemplateRequest) String() string { @@ -869,7 +859,7 @@ func (*LaunchFlexTemplateRequest) ProtoMessage() {} func (x *LaunchFlexTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +974,9 @@ type RuntimeEnvironment struct { func (x *RuntimeEnvironment) Reset() { *x = RuntimeEnvironment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeEnvironment) String() string { @@ -999,7 +987,7 @@ func (*RuntimeEnvironment) ProtoMessage() {} func (x *RuntimeEnvironment) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,11 +1139,9 @@ type ParameterMetadata struct { func (x *ParameterMetadata) Reset() { *x = ParameterMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterMetadata) String() string { @@ -1166,7 +1152,7 @@ func (*ParameterMetadata) ProtoMessage() {} func (x *ParameterMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1246,11 +1232,9 @@ type TemplateMetadata struct { func (x *TemplateMetadata) Reset() { *x = TemplateMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TemplateMetadata) String() string { @@ -1261,7 +1245,7 @@ func (*TemplateMetadata) ProtoMessage() {} func (x *TemplateMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1311,11 +1295,9 @@ type SDKInfo struct { func (x *SDKInfo) Reset() { *x = SDKInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SDKInfo) String() string { @@ -1326,7 +1308,7 @@ func (*SDKInfo) ProtoMessage() {} func (x *SDKInfo) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1351,9 @@ type RuntimeMetadata struct { func (x *RuntimeMetadata) Reset() { *x = RuntimeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeMetadata) String() string { @@ -1384,7 +1364,7 @@ func (*RuntimeMetadata) ProtoMessage() {} func (x *RuntimeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1421,9 @@ type CreateJobFromTemplateRequest struct { func (x *CreateJobFromTemplateRequest) Reset() { *x = CreateJobFromTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobFromTemplateRequest) String() string { @@ -1456,7 +1434,7 @@ func (*CreateJobFromTemplateRequest) ProtoMessage() {} func (x *CreateJobFromTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1557,11 +1535,9 @@ type GetTemplateRequest struct { func (x *GetTemplateRequest) Reset() { *x = GetTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTemplateRequest) String() string { @@ -1572,7 +1548,7 @@ func (*GetTemplateRequest) ProtoMessage() {} func (x *GetTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1655,11 +1631,9 @@ type GetTemplateResponse struct { func (x *GetTemplateResponse) Reset() { *x = GetTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTemplateResponse) String() string { @@ -1670,7 +1644,7 @@ func (*GetTemplateResponse) ProtoMessage() {} func (x *GetTemplateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1709,9 @@ type LaunchTemplateParameters struct { func (x *LaunchTemplateParameters) Reset() { *x = LaunchTemplateParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchTemplateParameters) String() string { @@ -1750,7 +1722,7 @@ func (*LaunchTemplateParameters) ProtoMessage() {} func (x *LaunchTemplateParameters) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1801,9 @@ type LaunchTemplateRequest struct { func (x *LaunchTemplateRequest) Reset() { *x = LaunchTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchTemplateRequest) String() string { @@ -1844,7 +1814,7 @@ func (*LaunchTemplateRequest) ProtoMessage() {} func (x *LaunchTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1941,11 +1911,9 @@ type LaunchTemplateResponse struct { func (x *LaunchTemplateResponse) Reset() { *x = LaunchTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LaunchTemplateResponse) String() string { @@ -1956,7 +1924,7 @@ func (*LaunchTemplateResponse) ProtoMessage() {} func (x *LaunchTemplateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1959,9 @@ type InvalidTemplateParameters struct { func (x *InvalidTemplateParameters) Reset() { *x = InvalidTemplateParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvalidTemplateParameters) String() string { @@ -2006,7 +1972,7 @@ func (*InvalidTemplateParameters) ProtoMessage() {} func (x *InvalidTemplateParameters) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +2010,9 @@ type DynamicTemplateLaunchParams struct { func (x *DynamicTemplateLaunchParams) Reset() { *x = DynamicTemplateLaunchParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DynamicTemplateLaunchParams) String() string { @@ -2059,7 +2023,7 @@ func (*DynamicTemplateLaunchParams) ProtoMessage() {} func (x *DynamicTemplateLaunchParams) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2102,11 +2066,9 @@ type InvalidTemplateParameters_ParameterViolation struct { func (x *InvalidTemplateParameters_ParameterViolation) Reset() { *x = InvalidTemplateParameters_ParameterViolation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvalidTemplateParameters_ParameterViolation) String() string { @@ -2117,7 +2079,7 @@ func (*InvalidTemplateParameters_ParameterViolation) ProtoMessage() {} func (x *InvalidTemplateParameters_ParameterViolation) ProtoReflect() protoreflect.Message { mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2817,236 +2779,6 @@ func file_google_dataflow_v1beta3_templates_proto_init() { } file_google_dataflow_v1beta3_environment_proto_init() file_google_dataflow_v1beta3_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_dataflow_v1beta3_templates_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LaunchFlexTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LaunchFlexTemplateParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FlexTemplateRuntimeEnvironment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LaunchFlexTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeEnvironment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ParameterMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TemplateMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SDKInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobFromTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*LaunchTemplateParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*LaunchTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LaunchTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*InvalidTemplateParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DynamicTemplateLaunchParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_dataflow_v1beta3_templates_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*InvalidTemplateParameters_ParameterViolation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_dataflow_v1beta3_templates_proto_msgTypes[2].OneofWrappers = []any{ (*LaunchFlexTemplateParameter_ContainerSpec)(nil), (*LaunchFlexTemplateParameter_ContainerSpecGcsPath)(nil), diff --git a/dataflow/apiv1beta3/flex_templates_client.go b/dataflow/apiv1beta3/flex_templates_client.go index 119fa3fefde4..aa30d4e987fd 100755 --- a/dataflow/apiv1beta3/flex_templates_client.go +++ b/dataflow/apiv1beta3/flex_templates_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -133,6 +132,8 @@ type flexTemplatesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFlexTemplatesClient creates a new flex templates service client based on gRPC. @@ -159,6 +160,7 @@ func NewFlexTemplatesClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, flexTemplatesClient: dataflowpb.NewFlexTemplatesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -205,6 +207,8 @@ type flexTemplatesRESTClient struct { // Points back to the CallOptions field of the containing FlexTemplatesClient CallOptions **FlexTemplatesCallOptions + + logger *slog.Logger } // NewFlexTemplatesRESTClient creates a new flex templates service rest client. @@ -222,6 +226,7 @@ func NewFlexTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,7 +279,7 @@ func (c *flexTemplatesGRPCClient) LaunchFlexTemplate(ctx context.Context, req *d var resp *dataflowpb.LaunchFlexTemplateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flexTemplatesClient.LaunchFlexTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flexTemplatesClient.LaunchFlexTemplate, req, settings.GRPC, c.logger, "LaunchFlexTemplate") return err }, opts...) if err != nil { @@ -322,17 +327,7 @@ func (c *flexTemplatesRESTClient) LaunchFlexTemplate(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LaunchFlexTemplate") if err != nil { return err } diff --git a/dataflow/apiv1beta3/helpers.go b/dataflow/apiv1beta3/helpers.go index 26947210a29b..88661c96bcda 100755 --- a/dataflow/apiv1beta3/helpers.go +++ b/dataflow/apiv1beta3/helpers.go @@ -18,10 +18,20 @@ package dataflow import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataflow.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/userinfo.email", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataflow/apiv1beta3/jobs_v1_beta3_client.go b/dataflow/apiv1beta3/jobs_v1_beta3_client.go index f571a353d34b..2dc825fbcf54 100755 --- a/dataflow/apiv1beta3/jobs_v1_beta3_client.go +++ b/dataflow/apiv1beta3/jobs_v1_beta3_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -244,6 +243,8 @@ type jobsV1Beta3GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobsV1Beta3Client creates a new jobs v1 beta3 client based on gRPC. @@ -271,6 +272,7 @@ func NewJobsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) (*Jo connPool: connPool, jobsV1Beta3Client: dataflowpb.NewJobsV1Beta3Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -317,6 +319,8 @@ type jobsV1Beta3RESTClient struct { // Points back to the CallOptions field of the containing JobsV1Beta3Client CallOptions **JobsV1Beta3CallOptions + + logger *slog.Logger } // NewJobsV1Beta3RESTClient creates a new jobs v1 beta3 rest client. @@ -335,6 +339,7 @@ func NewJobsV1Beta3RESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -387,7 +392,7 @@ func (c *jobsV1Beta3GRPCClient) CreateJob(ctx context.Context, req *dataflowpb.C var resp *dataflowpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -405,7 +410,7 @@ func (c *jobsV1Beta3GRPCClient) GetJob(ctx context.Context, req *dataflowpb.GetJ var resp *dataflowpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -423,7 +428,7 @@ func (c *jobsV1Beta3GRPCClient) UpdateJob(ctx context.Context, req *dataflowpb.U var resp *dataflowpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -452,7 +457,7 @@ func (c *jobsV1Beta3GRPCClient) ListJobs(ctx context.Context, req *dataflowpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -498,7 +503,7 @@ func (c *jobsV1Beta3GRPCClient) AggregatedListJobs(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.AggregatedListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.AggregatedListJobs, req, settings.GRPC, c.logger, "AggregatedListJobs") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *jobsV1Beta3GRPCClient) CheckActiveJobs(ctx context.Context, req *datafl var resp *dataflowpb.CheckActiveJobsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.CheckActiveJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.CheckActiveJobs, req, settings.GRPC, c.logger, "CheckActiveJobs") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *jobsV1Beta3GRPCClient) SnapshotJob(ctx context.Context, req *dataflowpb var resp *dataflowpb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsV1Beta3Client.SnapshotJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsV1Beta3Client.SnapshotJob, req, settings.GRPC, c.logger, "SnapshotJob") return err }, opts...) if err != nil { @@ -609,17 +614,7 @@ func (c *jobsV1Beta3RESTClient) CreateJob(ctx context.Context, req *dataflowpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -678,17 +673,7 @@ func (c *jobsV1Beta3RESTClient) GetJob(ctx context.Context, req *dataflowpb.GetJ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -751,17 +736,7 @@ func (c *jobsV1Beta3RESTClient) UpdateJob(ctx context.Context, req *dataflowpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -836,21 +811,10 @@ func (c *jobsV1Beta3RESTClient) ListJobs(ctx context.Context, req *dataflowpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -934,21 +898,10 @@ func (c *jobsV1Beta3RESTClient) AggregatedListJobs(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AggregatedListJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1011,17 +964,7 @@ func (c *jobsV1Beta3RESTClient) CheckActiveJobs(ctx context.Context, req *datafl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CheckActiveJobs") if err != nil { return err } @@ -1077,17 +1020,7 @@ func (c *jobsV1Beta3RESTClient) SnapshotJob(ctx context.Context, req *dataflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SnapshotJob") if err != nil { return err } diff --git a/dataflow/apiv1beta3/jobs_v1_beta3_client_example_go123_test.go b/dataflow/apiv1beta3/jobs_v1_beta3_client_example_go123_test.go index c0db49360be0..64d1b50eb0f3 100644 --- a/dataflow/apiv1beta3/jobs_v1_beta3_client_example_go123_test.go +++ b/dataflow/apiv1beta3/jobs_v1_beta3_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleJobsV1Beta3Client_AggregatedListJobs_all() { } for resp, err := range c.AggregatedListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleJobsV1Beta3Client_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataflow/apiv1beta3/messages_v1_beta3_client.go b/dataflow/apiv1beta3/messages_v1_beta3_client.go index 4bfb10560abd..aacefd093e67 100755 --- a/dataflow/apiv1beta3/messages_v1_beta3_client.go +++ b/dataflow/apiv1beta3/messages_v1_beta3_client.go @@ -19,7 +19,7 @@ package dataflow import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -146,6 +145,8 @@ type messagesV1Beta3GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMessagesV1Beta3Client creates a new messages v1 beta3 client based on gRPC. @@ -173,6 +174,7 @@ func NewMessagesV1Beta3Client(ctx context.Context, opts ...option.ClientOption) connPool: connPool, messagesV1Beta3Client: dataflowpb.NewMessagesV1Beta3Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -219,6 +221,8 @@ type messagesV1Beta3RESTClient struct { // Points back to the CallOptions field of the containing MessagesV1Beta3Client CallOptions **MessagesV1Beta3CallOptions + + logger *slog.Logger } // NewMessagesV1Beta3RESTClient creates a new messages v1 beta3 rest client. @@ -237,6 +241,7 @@ func NewMessagesV1Beta3RESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -300,7 +305,7 @@ func (c *messagesV1Beta3GRPCClient) ListJobMessages(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.messagesV1Beta3Client.ListJobMessages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.messagesV1Beta3Client.ListJobMessages, req, settings.GRPC, c.logger, "ListJobMessages") return err }, opts...) if err != nil { @@ -394,21 +399,10 @@ func (c *messagesV1Beta3RESTClient) ListJobMessages(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobMessages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataflow/apiv1beta3/messages_v1_beta3_client_example_go123_test.go b/dataflow/apiv1beta3/messages_v1_beta3_client_example_go123_test.go index abb2c4666484..661f1db81801 100644 --- a/dataflow/apiv1beta3/messages_v1_beta3_client_example_go123_test.go +++ b/dataflow/apiv1beta3/messages_v1_beta3_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMessagesV1Beta3Client_ListJobMessages_all() { } for resp, err := range c.ListJobMessages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataflow/apiv1beta3/metrics_v1_beta3_client.go b/dataflow/apiv1beta3/metrics_v1_beta3_client.go index 9a389bb1841d..f65650e8d6e1 100755 --- a/dataflow/apiv1beta3/metrics_v1_beta3_client.go +++ b/dataflow/apiv1beta3/metrics_v1_beta3_client.go @@ -19,7 +19,7 @@ package dataflow import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -177,6 +176,8 @@ type metricsV1Beta3GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetricsV1Beta3Client creates a new metrics v1 beta3 client based on gRPC. @@ -204,6 +205,7 @@ func NewMetricsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, metricsV1Beta3Client: dataflowpb.NewMetricsV1Beta3Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -250,6 +252,8 @@ type metricsV1Beta3RESTClient struct { // Points back to the CallOptions field of the containing MetricsV1Beta3Client CallOptions **MetricsV1Beta3CallOptions + + logger *slog.Logger } // NewMetricsV1Beta3RESTClient creates a new metrics v1 beta3 rest client. @@ -268,6 +272,7 @@ func NewMetricsV1Beta3RESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -320,7 +325,7 @@ func (c *metricsV1Beta3GRPCClient) GetJobMetrics(ctx context.Context, req *dataf var resp *dataflowpb.JobMetrics err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsV1Beta3Client.GetJobMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsV1Beta3Client.GetJobMetrics, req, settings.GRPC, c.logger, "GetJobMetrics") return err }, opts...) if err != nil { @@ -349,7 +354,7 @@ func (c *metricsV1Beta3GRPCClient) GetJobExecutionDetails(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsV1Beta3Client.GetJobExecutionDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsV1Beta3Client.GetJobExecutionDetails, req, settings.GRPC, c.logger, "GetJobExecutionDetails") return err }, opts...) if err != nil { @@ -395,7 +400,7 @@ func (c *metricsV1Beta3GRPCClient) GetStageExecutionDetails(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsV1Beta3Client.GetStageExecutionDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsV1Beta3Client.GetStageExecutionDetails, req, settings.GRPC, c.logger, "GetStageExecutionDetails") return err }, opts...) if err != nil { @@ -467,17 +472,7 @@ func (c *metricsV1Beta3RESTClient) GetJobMetrics(ctx context.Context, req *dataf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJobMetrics") if err != nil { return err } @@ -541,21 +536,10 @@ func (c *metricsV1Beta3RESTClient) GetJobExecutionDetails(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJobExecutionDetails") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -647,21 +631,10 @@ func (c *metricsV1Beta3RESTClient) GetStageExecutionDetails(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStageExecutionDetails") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataflow/apiv1beta3/metrics_v1_beta3_client_example_go123_test.go b/dataflow/apiv1beta3/metrics_v1_beta3_client_example_go123_test.go index 9fc201c6a26d..dbe7fa95357e 100644 --- a/dataflow/apiv1beta3/metrics_v1_beta3_client_example_go123_test.go +++ b/dataflow/apiv1beta3/metrics_v1_beta3_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMetricsV1Beta3Client_GetJobExecutionDetails_all() { } for resp, err := range c.GetJobExecutionDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleMetricsV1Beta3Client_GetStageExecutionDetails_all() { } for resp, err := range c.GetStageExecutionDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataflow/apiv1beta3/snapshots_v1_beta3_client.go b/dataflow/apiv1beta3/snapshots_v1_beta3_client.go index 5dc0943fcc77..5bb83f9ef8a5 100755 --- a/dataflow/apiv1beta3/snapshots_v1_beta3_client.go +++ b/dataflow/apiv1beta3/snapshots_v1_beta3_client.go @@ -19,7 +19,7 @@ package dataflow import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -163,6 +162,8 @@ type snapshotsV1Beta3GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSnapshotsV1Beta3Client creates a new snapshots v1 beta3 client based on gRPC. @@ -189,6 +190,7 @@ func NewSnapshotsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) connPool: connPool, snapshotsV1Beta3Client: dataflowpb.NewSnapshotsV1Beta3Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -235,6 +237,8 @@ type snapshotsV1Beta3RESTClient struct { // Points back to the CallOptions field of the containing SnapshotsV1Beta3Client CallOptions **SnapshotsV1Beta3CallOptions + + logger *slog.Logger } // NewSnapshotsV1Beta3RESTClient creates a new snapshots v1 beta3 rest client. @@ -252,6 +256,7 @@ func NewSnapshotsV1Beta3RESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,7 +309,7 @@ func (c *snapshotsV1Beta3GRPCClient) GetSnapshot(ctx context.Context, req *dataf var resp *dataflowpb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snapshotsV1Beta3Client.GetSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snapshotsV1Beta3Client.GetSnapshot, req, settings.GRPC, c.logger, "GetSnapshot") return err }, opts...) if err != nil { @@ -322,7 +327,7 @@ func (c *snapshotsV1Beta3GRPCClient) DeleteSnapshot(ctx context.Context, req *da var resp *dataflowpb.DeleteSnapshotResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snapshotsV1Beta3Client.DeleteSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snapshotsV1Beta3Client.DeleteSnapshot, req, settings.GRPC, c.logger, "DeleteSnapshot") return err }, opts...) if err != nil { @@ -340,7 +345,7 @@ func (c *snapshotsV1Beta3GRPCClient) ListSnapshots(ctx context.Context, req *dat var resp *dataflowpb.ListSnapshotsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snapshotsV1Beta3Client.ListSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snapshotsV1Beta3Client.ListSnapshots, req, settings.GRPC, c.logger, "ListSnapshots") return err }, opts...) if err != nil { @@ -382,17 +387,7 @@ func (c *snapshotsV1Beta3RESTClient) GetSnapshot(ctx context.Context, req *dataf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSnapshot") if err != nil { return err } @@ -442,17 +437,7 @@ func (c *snapshotsV1Beta3RESTClient) DeleteSnapshot(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSnapshot") if err != nil { return err } @@ -502,17 +487,7 @@ func (c *snapshotsV1Beta3RESTClient) ListSnapshots(ctx context.Context, req *dat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSnapshots") if err != nil { return err } diff --git a/dataflow/apiv1beta3/templates_client.go b/dataflow/apiv1beta3/templates_client.go index 759183f5a9e9..20152ac6604e 100755 --- a/dataflow/apiv1beta3/templates_client.go +++ b/dataflow/apiv1beta3/templates_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataflowpb "cloud.google.com/go/dataflow/apiv1beta3/dataflowpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -164,6 +163,8 @@ type templatesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTemplatesClient creates a new templates service client based on gRPC. @@ -190,6 +191,7 @@ func NewTemplatesClient(ctx context.Context, opts ...option.ClientOption) (*Temp connPool: connPool, templatesClient: dataflowpb.NewTemplatesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -236,6 +238,8 @@ type templatesRESTClient struct { // Points back to the CallOptions field of the containing TemplatesClient CallOptions **TemplatesCallOptions + + logger *slog.Logger } // NewTemplatesRESTClient creates a new templates service rest client. @@ -253,6 +257,7 @@ func NewTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -305,7 +310,7 @@ func (c *templatesGRPCClient) CreateJobFromTemplate(ctx context.Context, req *da var resp *dataflowpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.templatesClient.CreateJobFromTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.templatesClient.CreateJobFromTemplate, req, settings.GRPC, c.logger, "CreateJobFromTemplate") return err }, opts...) if err != nil { @@ -323,7 +328,7 @@ func (c *templatesGRPCClient) LaunchTemplate(ctx context.Context, req *dataflowp var resp *dataflowpb.LaunchTemplateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.templatesClient.LaunchTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.templatesClient.LaunchTemplate, req, settings.GRPC, c.logger, "LaunchTemplate") return err }, opts...) if err != nil { @@ -341,7 +346,7 @@ func (c *templatesGRPCClient) GetTemplate(ctx context.Context, req *dataflowpb.G var resp *dataflowpb.GetTemplateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.templatesClient.GetTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.templatesClient.GetTemplate, req, settings.GRPC, c.logger, "GetTemplate") return err }, opts...) if err != nil { @@ -389,17 +394,7 @@ func (c *templatesRESTClient) CreateJobFromTemplate(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJobFromTemplate") if err != nil { return err } @@ -468,17 +463,7 @@ func (c *templatesRESTClient) LaunchTemplate(ctx context.Context, req *dataflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LaunchTemplate") if err != nil { return err } @@ -534,17 +519,7 @@ func (c *templatesRESTClient) GetTemplate(ctx context.Context, req *dataflowpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTemplate") if err != nil { return err } diff --git a/dataform/apiv1alpha2/dataform_client.go b/dataform/apiv1alpha2/dataform_client.go index 673bf10780fb..524dbfa38119 100755 --- a/dataform/apiv1alpha2/dataform_client.go +++ b/dataform/apiv1alpha2/dataform_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataformpb "cloud.google.com/go/dataform/apiv1alpha2/dataformpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -514,6 +513,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new dataform client based on gRPC. @@ -541,6 +542,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: dataformpb.NewDataformClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -589,6 +591,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new dataform rest client. @@ -607,6 +611,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -670,7 +675,7 @@ func (c *gRPCClient) ListRepositories(ctx context.Context, req *dataformpb.ListR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *gRPCClient) GetRepository(ctx context.Context, req *dataformpb.GetRepos var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *gRPCClient) CreateRepository(ctx context.Context, req *dataformpb.Creat var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *gRPCClient) UpdateRepository(ctx context.Context, req *dataformpb.Updat var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRepository, req, settings.GRPC, c.logger, "UpdateRepository") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *gRPCClient) DeleteRepository(ctx context.Context, req *dataformpb.Delet opts = append((*c.CallOptions).DeleteRepository[0:len((*c.CallOptions).DeleteRepository):len((*c.CallOptions).DeleteRepository)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) return err @@ -773,7 +778,7 @@ func (c *gRPCClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.Fe var resp *dataformpb.FetchRemoteBranchesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchRemoteBranches(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchRemoteBranches, req, settings.GRPC, c.logger, "FetchRemoteBranches") return err }, opts...) if err != nil { @@ -802,7 +807,7 @@ func (c *gRPCClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkspaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkspaces, req, settings.GRPC, c.logger, "ListWorkspaces") return err }, opts...) if err != nil { @@ -837,7 +842,7 @@ func (c *gRPCClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorksp var resp *dataformpb.Workspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkspace, req, settings.GRPC, c.logger, "GetWorkspace") return err }, opts...) if err != nil { @@ -855,7 +860,7 @@ func (c *gRPCClient) CreateWorkspace(ctx context.Context, req *dataformpb.Create var resp *dataformpb.Workspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkspace, req, settings.GRPC, c.logger, "CreateWorkspace") return err }, opts...) if err != nil { @@ -872,7 +877,7 @@ func (c *gRPCClient) DeleteWorkspace(ctx context.Context, req *dataformpb.Delete opts = append((*c.CallOptions).DeleteWorkspace[0:len((*c.CallOptions).DeleteWorkspace):len((*c.CallOptions).DeleteWorkspace)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkspace(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkspace, req, settings.GRPC, c.logger, "DeleteWorkspace") return err }, opts...) return err @@ -887,7 +892,7 @@ func (c *gRPCClient) InstallNpmPackages(ctx context.Context, req *dataformpb.Ins var resp *dataformpb.InstallNpmPackagesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InstallNpmPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InstallNpmPackages, req, settings.GRPC, c.logger, "InstallNpmPackages") return err }, opts...) if err != nil { @@ -904,7 +909,7 @@ func (c *gRPCClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGit opts = append((*c.CallOptions).PullGitCommits[0:len((*c.CallOptions).PullGitCommits):len((*c.CallOptions).PullGitCommits)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PullGitCommits(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PullGitCommits, req, settings.GRPC, c.logger, "PullGitCommits") return err }, opts...) return err @@ -918,7 +923,7 @@ func (c *gRPCClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGit opts = append((*c.CallOptions).PushGitCommits[0:len((*c.CallOptions).PushGitCommits):len((*c.CallOptions).PushGitCommits)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PushGitCommits(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PushGitCommits, req, settings.GRPC, c.logger, "PushGitCommits") return err }, opts...) return err @@ -933,7 +938,7 @@ func (c *gRPCClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.F var resp *dataformpb.FetchFileGitStatusesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchFileGitStatuses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchFileGitStatuses, req, settings.GRPC, c.logger, "FetchFileGitStatuses") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *gRPCClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.Fe var resp *dataformpb.FetchGitAheadBehindResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchGitAheadBehind(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchGitAheadBehind, req, settings.GRPC, c.logger, "FetchGitAheadBehind") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *gRPCClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb opts = append((*c.CallOptions).CommitWorkspaceChanges[0:len((*c.CallOptions).CommitWorkspaceChanges):len((*c.CallOptions).CommitWorkspaceChanges)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CommitWorkspaceChanges(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CommitWorkspaceChanges, req, settings.GRPC, c.logger, "CommitWorkspaceChanges") return err }, opts...) return err @@ -982,7 +987,7 @@ func (c *gRPCClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb. opts = append((*c.CallOptions).ResetWorkspaceChanges[0:len((*c.CallOptions).ResetWorkspaceChanges):len((*c.CallOptions).ResetWorkspaceChanges)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.ResetWorkspaceChanges(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.ResetWorkspaceChanges, req, settings.GRPC, c.logger, "ResetWorkspaceChanges") return err }, opts...) return err @@ -997,7 +1002,7 @@ func (c *gRPCClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFil var resp *dataformpb.FetchFileDiffResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchFileDiff(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchFileDiff, req, settings.GRPC, c.logger, "FetchFileDiff") return err }, opts...) if err != nil { @@ -1026,7 +1031,7 @@ func (c *gRPCClient) QueryDirectoryContents(ctx context.Context, req *dataformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryDirectoryContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryDirectoryContents, req, settings.GRPC, c.logger, "QueryDirectoryContents") return err }, opts...) if err != nil { @@ -1061,7 +1066,7 @@ func (c *gRPCClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDire var resp *dataformpb.MakeDirectoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MakeDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MakeDirectory, req, settings.GRPC, c.logger, "MakeDirectory") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *gRPCClient) RemoveDirectory(ctx context.Context, req *dataformpb.Remove opts = append((*c.CallOptions).RemoveDirectory[0:len((*c.CallOptions).RemoveDirectory):len((*c.CallOptions).RemoveDirectory)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.RemoveDirectory(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.RemoveDirectory, req, settings.GRPC, c.logger, "RemoveDirectory") return err }, opts...) return err @@ -1093,7 +1098,7 @@ func (c *gRPCClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDire var resp *dataformpb.MoveDirectoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MoveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MoveDirectory, req, settings.GRPC, c.logger, "MoveDirectory") return err }, opts...) if err != nil { @@ -1111,7 +1116,7 @@ func (c *gRPCClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileReque var resp *dataformpb.ReadFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReadFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReadFile, req, settings.GRPC, c.logger, "ReadFile") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *gRPCClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileR opts = append((*c.CallOptions).RemoveFile[0:len((*c.CallOptions).RemoveFile):len((*c.CallOptions).RemoveFile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.RemoveFile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.RemoveFile, req, settings.GRPC, c.logger, "RemoveFile") return err }, opts...) return err @@ -1143,7 +1148,7 @@ func (c *gRPCClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileReque var resp *dataformpb.MoveFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MoveFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MoveFile, req, settings.GRPC, c.logger, "MoveFile") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *gRPCClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileReq var resp *dataformpb.WriteFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.WriteFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.WriteFile, req, settings.GRPC, c.logger, "WriteFile") return err }, opts...) if err != nil { @@ -1190,7 +1195,7 @@ func (c *gRPCClient) ListCompilationResults(ctx context.Context, req *dataformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCompilationResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCompilationResults, req, settings.GRPC, c.logger, "ListCompilationResults") return err }, opts...) if err != nil { @@ -1225,7 +1230,7 @@ func (c *gRPCClient) GetCompilationResult(ctx context.Context, req *dataformpb.G var resp *dataformpb.CompilationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCompilationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCompilationResult, req, settings.GRPC, c.logger, "GetCompilationResult") return err }, opts...) if err != nil { @@ -1243,7 +1248,7 @@ func (c *gRPCClient) CreateCompilationResult(ctx context.Context, req *dataformp var resp *dataformpb.CompilationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCompilationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCompilationResult, req, settings.GRPC, c.logger, "CreateCompilationResult") return err }, opts...) if err != nil { @@ -1272,7 +1277,7 @@ func (c *gRPCClient) QueryCompilationResultActions(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryCompilationResultActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryCompilationResultActions, req, settings.GRPC, c.logger, "QueryCompilationResultActions") return err }, opts...) if err != nil { @@ -1318,7 +1323,7 @@ func (c *gRPCClient) ListWorkflowInvocations(ctx context.Context, req *dataformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkflowInvocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkflowInvocations, req, settings.GRPC, c.logger, "ListWorkflowInvocations") return err }, opts...) if err != nil { @@ -1353,7 +1358,7 @@ func (c *gRPCClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb. var resp *dataformpb.WorkflowInvocation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkflowInvocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkflowInvocation, req, settings.GRPC, c.logger, "GetWorkflowInvocation") return err }, opts...) if err != nil { @@ -1371,7 +1376,7 @@ func (c *gRPCClient) CreateWorkflowInvocation(ctx context.Context, req *dataform var resp *dataformpb.WorkflowInvocation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkflowInvocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkflowInvocation, req, settings.GRPC, c.logger, "CreateWorkflowInvocation") return err }, opts...) if err != nil { @@ -1388,7 +1393,7 @@ func (c *gRPCClient) DeleteWorkflowInvocation(ctx context.Context, req *dataform opts = append((*c.CallOptions).DeleteWorkflowInvocation[0:len((*c.CallOptions).DeleteWorkflowInvocation):len((*c.CallOptions).DeleteWorkflowInvocation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkflowInvocation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkflowInvocation, req, settings.GRPC, c.logger, "DeleteWorkflowInvocation") return err }, opts...) return err @@ -1402,7 +1407,7 @@ func (c *gRPCClient) CancelWorkflowInvocation(ctx context.Context, req *dataform opts = append((*c.CallOptions).CancelWorkflowInvocation[0:len((*c.CallOptions).CancelWorkflowInvocation):len((*c.CallOptions).CancelWorkflowInvocation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CancelWorkflowInvocation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CancelWorkflowInvocation, req, settings.GRPC, c.logger, "CancelWorkflowInvocation") return err }, opts...) return err @@ -1428,7 +1433,7 @@ func (c *gRPCClient) QueryWorkflowInvocationActions(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryWorkflowInvocationActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryWorkflowInvocationActions, req, settings.GRPC, c.logger, "QueryWorkflowInvocationActions") return err }, opts...) if err != nil { @@ -1463,7 +1468,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1492,7 +1497,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1527,7 +1532,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1545,7 +1550,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1563,7 +1568,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1623,21 +1628,10 @@ func (c *restClient) ListRepositories(ctx context.Context, req *dataformpb.ListR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1700,17 +1694,7 @@ func (c *restClient) GetRepository(ctx context.Context, req *dataformpb.GetRepos httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -1768,17 +1752,7 @@ func (c *restClient) CreateRepository(ctx context.Context, req *dataformpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } @@ -1842,17 +1816,7 @@ func (c *restClient) UpdateRepository(ctx context.Context, req *dataformpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRepository") if err != nil { return err } @@ -1902,15 +1866,8 @@ func (c *restClient) DeleteRepository(ctx context.Context, req *dataformpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") + return err }, opts...) } @@ -1947,17 +1904,7 @@ func (c *restClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.Fe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchRemoteBranches") if err != nil { return err } @@ -2025,21 +1972,10 @@ func (c *restClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkspaces") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2102,17 +2038,7 @@ func (c *restClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkspace") if err != nil { return err } @@ -2170,17 +2096,7 @@ func (c *restClient) CreateWorkspace(ctx context.Context, req *dataformpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkspace") if err != nil { return err } @@ -2227,15 +2143,8 @@ func (c *restClient) DeleteWorkspace(ctx context.Context, req *dataformpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkspace") + return err }, opts...) } @@ -2278,17 +2187,7 @@ func (c *restClient) InstallNpmPackages(ctx context.Context, req *dataformpb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InstallNpmPackages") if err != nil { return err } @@ -2341,15 +2240,8 @@ func (c *restClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PullGitCommits") + return err }, opts...) } @@ -2389,15 +2281,8 @@ func (c *restClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PushGitCommits") + return err }, opts...) } @@ -2434,17 +2319,7 @@ func (c *restClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.F httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchFileGitStatuses") if err != nil { return err } @@ -2497,17 +2372,7 @@ func (c *restClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.Fe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchGitAheadBehind") if err != nil { return err } @@ -2560,15 +2425,8 @@ func (c *restClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CommitWorkspaceChanges") + return err }, opts...) } @@ -2608,15 +2466,8 @@ func (c *restClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetWorkspaceChanges") + return err }, opts...) } @@ -2654,17 +2505,7 @@ func (c *restClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchFileDiff") if err != nil { return err } @@ -2729,21 +2570,10 @@ func (c *restClient) QueryDirectoryContents(ctx context.Context, req *dataformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryDirectoryContents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2812,17 +2642,7 @@ func (c *restClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDire httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MakeDirectory") if err != nil { return err } @@ -2875,15 +2695,8 @@ func (c *restClient) RemoveDirectory(ctx context.Context, req *dataformpb.Remove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveDirectory") + return err }, opts...) } @@ -2927,17 +2740,7 @@ func (c *restClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDire httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveDirectory") if err != nil { return err } @@ -2988,17 +2791,7 @@ func (c *restClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadFile") if err != nil { return err } @@ -3051,15 +2844,8 @@ func (c *restClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveFile") + return err }, opts...) } @@ -3102,17 +2888,7 @@ func (c *restClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveFile") if err != nil { return err } @@ -3168,17 +2944,7 @@ func (c *restClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteFile") if err != nil { return err } @@ -3240,21 +3006,10 @@ func (c *restClient) ListCompilationResults(ctx context.Context, req *dataformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCompilationResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3317,17 +3072,7 @@ func (c *restClient) GetCompilationResult(ctx context.Context, req *dataformpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompilationResult") if err != nil { return err } @@ -3384,17 +3129,7 @@ func (c *restClient) CreateCompilationResult(ctx context.Context, req *dataformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCompilationResult") if err != nil { return err } @@ -3459,21 +3194,10 @@ func (c *restClient) QueryCompilationResultActions(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryCompilationResultActions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3548,21 +3272,10 @@ func (c *restClient) ListWorkflowInvocations(ctx context.Context, req *dataformp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflowInvocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3625,17 +3338,7 @@ func (c *restClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflowInvocation") if err != nil { return err } @@ -3692,17 +3395,7 @@ func (c *restClient) CreateWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflowInvocation") if err != nil { return err } @@ -3749,15 +3442,8 @@ func (c *restClient) DeleteWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflowInvocation") + return err }, opts...) } @@ -3797,15 +3483,8 @@ func (c *restClient) CancelWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelWorkflowInvocation") + return err }, opts...) } @@ -3854,21 +3533,10 @@ func (c *restClient) QueryWorkflowInvocationActions(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryWorkflowInvocationActions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3931,17 +3599,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4006,21 +3664,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4087,17 +3734,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4157,17 +3794,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4229,17 +3856,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/dataform/apiv1alpha2/dataform_client_example_go123_test.go b/dataform/apiv1alpha2/dataform_client_example_go123_test.go index 88d24939f85c..4351714e9135 100644 --- a/dataform/apiv1alpha2/dataform_client_example_go123_test.go +++ b/dataform/apiv1alpha2/dataform_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListCompilationResults_all() { } for resp, err := range c.ListCompilationResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListWorkflowInvocations_all() { } for resp, err := range c.ListWorkflowInvocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListWorkspaces_all() { } for resp, err := range c.ListWorkspaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_QueryCompilationResultActions_all() { } for resp, err := range c.QueryCompilationResultActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_QueryDirectoryContents_all() { } for resp, err := range c.QueryDirectoryContents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_QueryWorkflowInvocationActions_all() { } for resp, err := range c.QueryWorkflowInvocationActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataform/apiv1alpha2/dataformpb/dataform.pb.go b/dataform/apiv1alpha2/dataformpb/dataform.pb.go index c0f3de4cd736..99962196efad 100755 --- a/dataform/apiv1alpha2/dataformpb/dataform.pb.go +++ b/dataform/apiv1alpha2/dataformpb/dataform.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataform/v1alpha2/dataform.proto @@ -374,11 +374,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -389,7 +387,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +445,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -462,7 +458,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +525,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -544,7 +538,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +586,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -607,7 +599,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +639,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -662,7 +652,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +703,9 @@ type UpdateRepositoryRequest struct { func (x *UpdateRepositoryRequest) Reset() { *x = UpdateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRepositoryRequest) String() string { @@ -728,7 +716,7 @@ func (*UpdateRepositoryRequest) ProtoMessage() {} func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +761,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -788,7 +774,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +815,9 @@ type FetchRemoteBranchesRequest struct { func (x *FetchRemoteBranchesRequest) Reset() { *x = FetchRemoteBranchesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRemoteBranchesRequest) String() string { @@ -844,7 +828,7 @@ func (*FetchRemoteBranchesRequest) ProtoMessage() {} func (x *FetchRemoteBranchesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -878,11 +862,9 @@ type FetchRemoteBranchesResponse struct { func (x *FetchRemoteBranchesResponse) Reset() { *x = FetchRemoteBranchesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRemoteBranchesResponse) String() string { @@ -893,7 +875,7 @@ func (*FetchRemoteBranchesResponse) ProtoMessage() {} func (x *FetchRemoteBranchesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +909,9 @@ type Workspace struct { func (x *Workspace) Reset() { *x = Workspace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workspace) String() string { @@ -942,7 +922,7 @@ func (*Workspace) ProtoMessage() {} func (x *Workspace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +973,9 @@ type ListWorkspacesRequest struct { func (x *ListWorkspacesRequest) Reset() { *x = ListWorkspacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesRequest) String() string { @@ -1008,7 +986,7 @@ func (*ListWorkspacesRequest) ProtoMessage() {} func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1053,9 @@ type ListWorkspacesResponse struct { func (x *ListWorkspacesResponse) Reset() { *x = ListWorkspacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesResponse) String() string { @@ -1090,7 +1066,7 @@ func (*ListWorkspacesResponse) ProtoMessage() {} func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,11 +1114,9 @@ type GetWorkspaceRequest struct { func (x *GetWorkspaceRequest) Reset() { *x = GetWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkspaceRequest) String() string { @@ -1153,7 +1127,7 @@ func (*GetWorkspaceRequest) ProtoMessage() {} func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1167,9 @@ type CreateWorkspaceRequest struct { func (x *CreateWorkspaceRequest) Reset() { *x = CreateWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkspaceRequest) String() string { @@ -1208,7 +1180,7 @@ func (*CreateWorkspaceRequest) ProtoMessage() {} func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1256,11 +1228,9 @@ type DeleteWorkspaceRequest struct { func (x *DeleteWorkspaceRequest) Reset() { *x = DeleteWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkspaceRequest) String() string { @@ -1271,7 +1241,7 @@ func (*DeleteWorkspaceRequest) ProtoMessage() {} func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1277,9 @@ type CommitAuthor struct { func (x *CommitAuthor) Reset() { *x = CommitAuthor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitAuthor) String() string { @@ -1322,7 +1290,7 @@ func (*CommitAuthor) ProtoMessage() {} func (x *CommitAuthor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1337,9 @@ type PullGitCommitsRequest struct { func (x *PullGitCommitsRequest) Reset() { *x = PullGitCommitsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullGitCommitsRequest) String() string { @@ -1384,7 +1350,7 @@ func (*PullGitCommitsRequest) ProtoMessage() {} func (x *PullGitCommitsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1401,9 @@ type PushGitCommitsRequest struct { func (x *PushGitCommitsRequest) Reset() { *x = PushGitCommitsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushGitCommitsRequest) String() string { @@ -1450,7 +1414,7 @@ func (*PushGitCommitsRequest) ProtoMessage() {} func (x *PushGitCommitsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1455,9 @@ type FetchFileGitStatusesRequest struct { func (x *FetchFileGitStatusesRequest) Reset() { *x = FetchFileGitStatusesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesRequest) String() string { @@ -1506,7 +1468,7 @@ func (*FetchFileGitStatusesRequest) ProtoMessage() {} func (x *FetchFileGitStatusesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1541,11 +1503,9 @@ type FetchFileGitStatusesResponse struct { func (x *FetchFileGitStatusesResponse) Reset() { *x = FetchFileGitStatusesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesResponse) String() string { @@ -1556,7 +1516,7 @@ func (*FetchFileGitStatusesResponse) ProtoMessage() {} func (x *FetchFileGitStatusesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,11 +1554,9 @@ type FetchGitAheadBehindRequest struct { func (x *FetchGitAheadBehindRequest) Reset() { *x = FetchGitAheadBehindRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitAheadBehindRequest) String() string { @@ -1609,7 +1567,7 @@ func (*FetchGitAheadBehindRequest) ProtoMessage() {} func (x *FetchGitAheadBehindRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,11 +1610,9 @@ type FetchGitAheadBehindResponse struct { func (x *FetchGitAheadBehindResponse) Reset() { *x = FetchGitAheadBehindResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitAheadBehindResponse) String() string { @@ -1667,7 +1623,7 @@ func (*FetchGitAheadBehindResponse) ProtoMessage() {} func (x *FetchGitAheadBehindResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1671,9 @@ type CommitWorkspaceChangesRequest struct { func (x *CommitWorkspaceChangesRequest) Reset() { *x = CommitWorkspaceChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitWorkspaceChangesRequest) String() string { @@ -1730,7 +1684,7 @@ func (*CommitWorkspaceChangesRequest) ProtoMessage() {} func (x *CommitWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1790,11 +1744,9 @@ type ResetWorkspaceChangesRequest struct { func (x *ResetWorkspaceChangesRequest) Reset() { *x = ResetWorkspaceChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetWorkspaceChangesRequest) String() string { @@ -1805,7 +1757,7 @@ func (*ResetWorkspaceChangesRequest) ProtoMessage() {} func (x *ResetWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1807,9 @@ type FetchFileDiffRequest struct { func (x *FetchFileDiffRequest) Reset() { *x = FetchFileDiffRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileDiffRequest) String() string { @@ -1870,7 +1820,7 @@ func (*FetchFileDiffRequest) ProtoMessage() {} func (x *FetchFileDiffRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1911,11 +1861,9 @@ type FetchFileDiffResponse struct { func (x *FetchFileDiffResponse) Reset() { *x = FetchFileDiffResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileDiffResponse) String() string { @@ -1926,7 +1874,7 @@ func (*FetchFileDiffResponse) ProtoMessage() {} func (x *FetchFileDiffResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1974,11 +1922,9 @@ type QueryDirectoryContentsRequest struct { func (x *QueryDirectoryContentsRequest) Reset() { *x = QueryDirectoryContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDirectoryContentsRequest) String() string { @@ -1989,7 +1935,7 @@ func (*QueryDirectoryContentsRequest) ProtoMessage() {} func (x *QueryDirectoryContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2047,11 +1993,9 @@ type QueryDirectoryContentsResponse struct { func (x *QueryDirectoryContentsResponse) Reset() { *x = QueryDirectoryContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDirectoryContentsResponse) String() string { @@ -2062,7 +2006,7 @@ func (*QueryDirectoryContentsResponse) ProtoMessage() {} func (x *QueryDirectoryContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2106,11 +2050,9 @@ type MakeDirectoryRequest struct { func (x *MakeDirectoryRequest) Reset() { *x = MakeDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MakeDirectoryRequest) String() string { @@ -2121,7 +2063,7 @@ func (*MakeDirectoryRequest) ProtoMessage() {} func (x *MakeDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2159,11 +2101,9 @@ type MakeDirectoryResponse struct { func (x *MakeDirectoryResponse) Reset() { *x = MakeDirectoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MakeDirectoryResponse) String() string { @@ -2174,7 +2114,7 @@ func (*MakeDirectoryResponse) ProtoMessage() {} func (x *MakeDirectoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2204,11 +2144,9 @@ type RemoveDirectoryRequest struct { func (x *RemoveDirectoryRequest) Reset() { *x = RemoveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDirectoryRequest) String() string { @@ -2219,7 +2157,7 @@ func (*RemoveDirectoryRequest) ProtoMessage() {} func (x *RemoveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2266,11 +2204,9 @@ type MoveDirectoryRequest struct { func (x *MoveDirectoryRequest) Reset() { *x = MoveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveDirectoryRequest) String() string { @@ -2281,7 +2217,7 @@ func (*MoveDirectoryRequest) ProtoMessage() {} func (x *MoveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2326,11 +2262,9 @@ type MoveDirectoryResponse struct { func (x *MoveDirectoryResponse) Reset() { *x = MoveDirectoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveDirectoryResponse) String() string { @@ -2341,7 +2275,7 @@ func (*MoveDirectoryResponse) ProtoMessage() {} func (x *MoveDirectoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2370,11 +2304,9 @@ type ReadFileRequest struct { func (x *ReadFileRequest) Reset() { *x = ReadFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFileRequest) String() string { @@ -2385,7 +2317,7 @@ func (*ReadFileRequest) ProtoMessage() {} func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2426,11 +2358,9 @@ type ReadFileResponse struct { func (x *ReadFileResponse) Reset() { *x = ReadFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFileResponse) String() string { @@ -2441,7 +2371,7 @@ func (*ReadFileResponse) ProtoMessage() {} func (x *ReadFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2477,11 +2407,9 @@ type RemoveFileRequest struct { func (x *RemoveFileRequest) Reset() { *x = RemoveFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFileRequest) String() string { @@ -2492,7 +2420,7 @@ func (*RemoveFileRequest) ProtoMessage() {} func (x *RemoveFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2537,11 +2465,9 @@ type MoveFileRequest struct { func (x *MoveFileRequest) Reset() { *x = MoveFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFileRequest) String() string { @@ -2552,7 +2478,7 @@ func (*MoveFileRequest) ProtoMessage() {} func (x *MoveFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2597,11 +2523,9 @@ type MoveFileResponse struct { func (x *MoveFileResponse) Reset() { *x = MoveFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFileResponse) String() string { @@ -2612,7 +2536,7 @@ func (*MoveFileResponse) ProtoMessage() {} func (x *MoveFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,11 +2567,9 @@ type WriteFileRequest struct { func (x *WriteFileRequest) Reset() { *x = WriteFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFileRequest) String() string { @@ -2658,7 +2580,7 @@ func (*WriteFileRequest) ProtoMessage() {} func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2703,11 +2625,9 @@ type WriteFileResponse struct { func (x *WriteFileResponse) Reset() { *x = WriteFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFileResponse) String() string { @@ -2718,7 +2638,7 @@ func (*WriteFileResponse) ProtoMessage() {} func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2745,11 +2665,9 @@ type InstallNpmPackagesRequest struct { func (x *InstallNpmPackagesRequest) Reset() { *x = InstallNpmPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallNpmPackagesRequest) String() string { @@ -2760,7 +2678,7 @@ func (*InstallNpmPackagesRequest) ProtoMessage() {} func (x *InstallNpmPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2791,11 +2709,9 @@ type InstallNpmPackagesResponse struct { func (x *InstallNpmPackagesResponse) Reset() { *x = InstallNpmPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallNpmPackagesResponse) String() string { @@ -2806,7 +2722,7 @@ func (*InstallNpmPackagesResponse) ProtoMessage() {} func (x *InstallNpmPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2845,11 +2761,9 @@ type CompilationResult struct { func (x *CompilationResult) Reset() { *x = CompilationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResult) String() string { @@ -2860,7 +2774,7 @@ func (*CompilationResult) ProtoMessage() {} func (x *CompilationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2971,11 +2885,9 @@ type ListCompilationResultsRequest struct { func (x *ListCompilationResultsRequest) Reset() { *x = ListCompilationResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompilationResultsRequest) String() string { @@ -2986,7 +2898,7 @@ func (*ListCompilationResultsRequest) ProtoMessage() {} func (x *ListCompilationResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3039,11 +2951,9 @@ type ListCompilationResultsResponse struct { func (x *ListCompilationResultsResponse) Reset() { *x = ListCompilationResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompilationResultsResponse) String() string { @@ -3054,7 +2964,7 @@ func (*ListCompilationResultsResponse) ProtoMessage() {} func (x *ListCompilationResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3102,11 +3012,9 @@ type GetCompilationResultRequest struct { func (x *GetCompilationResultRequest) Reset() { *x = GetCompilationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompilationResultRequest) String() string { @@ -3117,7 +3025,7 @@ func (*GetCompilationResultRequest) ProtoMessage() {} func (x *GetCompilationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3154,11 +3062,9 @@ type CreateCompilationResultRequest struct { func (x *CreateCompilationResultRequest) Reset() { *x = CreateCompilationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCompilationResultRequest) String() string { @@ -3169,7 +3075,7 @@ func (*CreateCompilationResultRequest) ProtoMessage() {} func (x *CreateCompilationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3215,11 +3121,9 @@ type Target struct { func (x *Target) Reset() { *x = Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target) String() string { @@ -3230,7 +3134,7 @@ func (*Target) ProtoMessage() {} func (x *Target) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,11 +3186,9 @@ type RelationDescriptor struct { func (x *RelationDescriptor) Reset() { *x = RelationDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationDescriptor) String() string { @@ -3297,7 +3199,7 @@ func (*RelationDescriptor) ProtoMessage() {} func (x *RelationDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3358,11 +3260,9 @@ type CompilationResultAction struct { func (x *CompilationResultAction) Reset() { *x = CompilationResultAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction) String() string { @@ -3373,7 +3273,7 @@ func (*CompilationResultAction) ProtoMessage() {} func (x *CompilationResultAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3502,11 +3402,9 @@ type QueryCompilationResultActionsRequest struct { func (x *QueryCompilationResultActionsRequest) Reset() { *x = QueryCompilationResultActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCompilationResultActionsRequest) String() string { @@ -3517,7 +3415,7 @@ func (*QueryCompilationResultActionsRequest) ProtoMessage() {} func (x *QueryCompilationResultActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3575,11 +3473,9 @@ type QueryCompilationResultActionsResponse struct { func (x *QueryCompilationResultActionsResponse) Reset() { *x = QueryCompilationResultActionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCompilationResultActionsResponse) String() string { @@ -3590,7 +3486,7 @@ func (*QueryCompilationResultActionsResponse) ProtoMessage() {} func (x *QueryCompilationResultActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3640,11 +3536,9 @@ type WorkflowInvocation struct { func (x *WorkflowInvocation) Reset() { *x = WorkflowInvocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocation) String() string { @@ -3655,7 +3549,7 @@ func (*WorkflowInvocation) ProtoMessage() {} func (x *WorkflowInvocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3728,11 +3622,9 @@ type ListWorkflowInvocationsRequest struct { func (x *ListWorkflowInvocationsRequest) Reset() { *x = ListWorkflowInvocationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowInvocationsRequest) String() string { @@ -3743,7 +3635,7 @@ func (*ListWorkflowInvocationsRequest) ProtoMessage() {} func (x *ListWorkflowInvocationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3796,11 +3688,9 @@ type ListWorkflowInvocationsResponse struct { func (x *ListWorkflowInvocationsResponse) Reset() { *x = ListWorkflowInvocationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowInvocationsResponse) String() string { @@ -3811,7 +3701,7 @@ func (*ListWorkflowInvocationsResponse) ProtoMessage() {} func (x *ListWorkflowInvocationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3859,11 +3749,9 @@ type GetWorkflowInvocationRequest struct { func (x *GetWorkflowInvocationRequest) Reset() { *x = GetWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowInvocationRequest) String() string { @@ -3874,7 +3762,7 @@ func (*GetWorkflowInvocationRequest) ProtoMessage() {} func (x *GetWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3910,11 +3798,9 @@ type CreateWorkflowInvocationRequest struct { func (x *CreateWorkflowInvocationRequest) Reset() { *x = CreateWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowInvocationRequest) String() string { @@ -3925,7 +3811,7 @@ func (*CreateWorkflowInvocationRequest) ProtoMessage() {} func (x *CreateWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3966,11 +3852,9 @@ type DeleteWorkflowInvocationRequest struct { func (x *DeleteWorkflowInvocationRequest) Reset() { *x = DeleteWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowInvocationRequest) String() string { @@ -3981,7 +3865,7 @@ func (*DeleteWorkflowInvocationRequest) ProtoMessage() {} func (x *DeleteWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4015,11 +3899,9 @@ type CancelWorkflowInvocationRequest struct { func (x *CancelWorkflowInvocationRequest) Reset() { *x = CancelWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelWorkflowInvocationRequest) String() string { @@ -4030,7 +3912,7 @@ func (*CancelWorkflowInvocationRequest) ProtoMessage() {} func (x *CancelWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4079,11 +3961,9 @@ type WorkflowInvocationAction struct { func (x *WorkflowInvocationAction) Reset() { *x = WorkflowInvocationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocationAction) String() string { @@ -4094,7 +3974,7 @@ func (*WorkflowInvocationAction) ProtoMessage() {} func (x *WorkflowInvocationAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4174,11 +4054,9 @@ type QueryWorkflowInvocationActionsRequest struct { func (x *QueryWorkflowInvocationActionsRequest) Reset() { *x = QueryWorkflowInvocationActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWorkflowInvocationActionsRequest) String() string { @@ -4189,7 +4067,7 @@ func (*QueryWorkflowInvocationActionsRequest) ProtoMessage() {} func (x *QueryWorkflowInvocationActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4240,11 +4118,9 @@ type QueryWorkflowInvocationActionsResponse struct { func (x *QueryWorkflowInvocationActionsResponse) Reset() { *x = QueryWorkflowInvocationActionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWorkflowInvocationActionsResponse) String() string { @@ -4255,7 +4131,7 @@ func (*QueryWorkflowInvocationActionsResponse) ProtoMessage() {} func (x *QueryWorkflowInvocationActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4304,11 +4180,9 @@ type Repository_GitRemoteSettings struct { func (x *Repository_GitRemoteSettings) Reset() { *x = Repository_GitRemoteSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_GitRemoteSettings) String() string { @@ -4319,7 +4193,7 @@ func (*Repository_GitRemoteSettings) ProtoMessage() {} func (x *Repository_GitRemoteSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4376,11 +4250,9 @@ type FetchFileGitStatusesResponse_UncommittedFileChange struct { func (x *FetchFileGitStatusesResponse_UncommittedFileChange) Reset() { *x = FetchFileGitStatusesResponse_UncommittedFileChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesResponse_UncommittedFileChange) String() string { @@ -4391,7 +4263,7 @@ func (*FetchFileGitStatusesResponse_UncommittedFileChange) ProtoMessage() {} func (x *FetchFileGitStatusesResponse_UncommittedFileChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4435,11 +4307,9 @@ type QueryDirectoryContentsResponse_DirectoryEntry struct { func (x *QueryDirectoryContentsResponse_DirectoryEntry) Reset() { *x = QueryDirectoryContentsResponse_DirectoryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDirectoryContentsResponse_DirectoryEntry) String() string { @@ -4450,7 +4320,7 @@ func (*QueryDirectoryContentsResponse_DirectoryEntry) ProtoMessage() {} func (x *QueryDirectoryContentsResponse_DirectoryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4537,11 +4407,9 @@ type CompilationResult_CodeCompilationConfig struct { func (x *CompilationResult_CodeCompilationConfig) Reset() { *x = CompilationResult_CodeCompilationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResult_CodeCompilationConfig) String() string { @@ -4552,7 +4420,7 @@ func (*CompilationResult_CodeCompilationConfig) ProtoMessage() {} func (x *CompilationResult_CodeCompilationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4642,11 +4510,9 @@ type CompilationResult_CompilationError struct { func (x *CompilationResult_CompilationError) Reset() { *x = CompilationResult_CompilationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResult_CompilationError) String() string { @@ -4657,7 +4523,7 @@ func (*CompilationResult_CompilationError) ProtoMessage() {} func (x *CompilationResult_CompilationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4717,11 +4583,9 @@ type RelationDescriptor_ColumnDescriptor struct { func (x *RelationDescriptor_ColumnDescriptor) Reset() { *x = RelationDescriptor_ColumnDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationDescriptor_ColumnDescriptor) String() string { @@ -4732,7 +4596,7 @@ func (*RelationDescriptor_ColumnDescriptor) ProtoMessage() {} func (x *RelationDescriptor_ColumnDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4811,11 +4675,9 @@ type CompilationResultAction_Relation struct { func (x *CompilationResultAction_Relation) Reset() { *x = CompilationResultAction_Relation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Relation) String() string { @@ -4826,7 +4688,7 @@ func (*CompilationResultAction_Relation) ProtoMessage() {} func (x *CompilationResultAction_Relation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4963,11 +4825,9 @@ type CompilationResultAction_Operations struct { func (x *CompilationResultAction_Operations) Reset() { *x = CompilationResultAction_Operations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Operations) String() string { @@ -4978,7 +4838,7 @@ func (*CompilationResultAction_Operations) ProtoMessage() {} func (x *CompilationResultAction_Operations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5061,11 +4921,9 @@ type CompilationResultAction_Assertion struct { func (x *CompilationResultAction_Assertion) Reset() { *x = CompilationResultAction_Assertion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Assertion) String() string { @@ -5076,7 +4934,7 @@ func (*CompilationResultAction_Assertion) ProtoMessage() {} func (x *CompilationResultAction_Assertion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5147,11 +5005,9 @@ type CompilationResultAction_Declaration struct { func (x *CompilationResultAction_Declaration) Reset() { *x = CompilationResultAction_Declaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Declaration) String() string { @@ -5162,7 +5018,7 @@ func (*CompilationResultAction_Declaration) ProtoMessage() {} func (x *CompilationResultAction_Declaration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5214,11 +5070,9 @@ type CompilationResultAction_Relation_IncrementalTableConfig struct { func (x *CompilationResultAction_Relation_IncrementalTableConfig) Reset() { *x = CompilationResultAction_Relation_IncrementalTableConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Relation_IncrementalTableConfig) String() string { @@ -5229,7 +5083,7 @@ func (*CompilationResultAction_Relation_IncrementalTableConfig) ProtoMessage() { func (x *CompilationResultAction_Relation_IncrementalTableConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5310,11 +5164,9 @@ type WorkflowInvocation_InvocationConfig struct { func (x *WorkflowInvocation_InvocationConfig) Reset() { *x = WorkflowInvocation_InvocationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocation_InvocationConfig) String() string { @@ -5325,7 +5177,7 @@ func (*WorkflowInvocation_InvocationConfig) ProtoMessage() {} func (x *WorkflowInvocation_InvocationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5387,11 +5239,9 @@ type WorkflowInvocationAction_BigQueryAction struct { func (x *WorkflowInvocationAction_BigQueryAction) Reset() { *x = WorkflowInvocationAction_BigQueryAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocationAction_BigQueryAction) String() string { @@ -5402,7 +5252,7 @@ func (*WorkflowInvocationAction_BigQueryAction) ProtoMessage() {} func (x *WorkflowInvocationAction_BigQueryAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7164,908 +7014,6 @@ func file_google_cloud_dataform_v1alpha2_dataform_proto_init() { if File_google_cloud_dataform_v1alpha2_dataform_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FetchRemoteBranchesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FetchRemoteBranchesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Workspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CommitAuthor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*PullGitCommitsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PushGitCommitsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitAheadBehindRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitAheadBehindResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CommitWorkspaceChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ResetWorkspaceChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileDiffRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileDiffResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*QueryDirectoryContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*QueryDirectoryContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*MakeDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*MakeDirectoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*MoveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*MoveDirectoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ReadFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ReadFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*MoveFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*MoveFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*WriteFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*WriteFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*InstallNpmPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*InstallNpmPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListCompilationResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListCompilationResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetCompilationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*CreateCompilationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*RelationDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*QueryCompilationResultActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*QueryCompilationResultActionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowInvocationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowInvocationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*CancelWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*QueryWorkflowInvocationActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*QueryWorkflowInvocationActionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*Repository_GitRemoteSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesResponse_UncommittedFileChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*QueryDirectoryContentsResponse_DirectoryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResult_CodeCompilationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResult_CompilationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*RelationDescriptor_ColumnDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Relation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Operations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Assertion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Declaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Relation_IncrementalTableConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocation_InvocationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocationAction_BigQueryAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42].OneofWrappers = []any{ (*CompilationResult_GitCommitish)(nil), (*CompilationResult_Workspace)(nil), diff --git a/dataform/apiv1alpha2/helpers.go b/dataform/apiv1alpha2/helpers.go index 377a0624d268..7a5a24336743 100755 --- a/dataform/apiv1alpha2/helpers.go +++ b/dataform/apiv1alpha2/helpers.go @@ -18,10 +18,20 @@ package dataform import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataform.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataform/apiv1beta1/dataform_client.go b/dataform/apiv1beta1/dataform_client.go index 326247ee60b2..f8a08bed68d6 100755 --- a/dataform/apiv1beta1/dataform_client.go +++ b/dataform/apiv1beta1/dataform_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataformpb "cloud.google.com/go/dataform/apiv1beta1/dataformpb" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -653,6 +652,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new dataform client based on gRPC. @@ -680,6 +681,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: dataformpb.NewDataformClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -728,6 +730,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new dataform rest client. @@ -746,6 +750,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -809,7 +814,7 @@ func (c *gRPCClient) ListRepositories(ctx context.Context, req *dataformpb.ListR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *gRPCClient) GetRepository(ctx context.Context, req *dataformpb.GetRepos var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -862,7 +867,7 @@ func (c *gRPCClient) CreateRepository(ctx context.Context, req *dataformpb.Creat var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -880,7 +885,7 @@ func (c *gRPCClient) UpdateRepository(ctx context.Context, req *dataformpb.Updat var resp *dataformpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRepository, req, settings.GRPC, c.logger, "UpdateRepository") return err }, opts...) if err != nil { @@ -897,7 +902,7 @@ func (c *gRPCClient) DeleteRepository(ctx context.Context, req *dataformpb.Delet opts = append((*c.CallOptions).DeleteRepository[0:len((*c.CallOptions).DeleteRepository):len((*c.CallOptions).DeleteRepository)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) return err @@ -911,7 +916,7 @@ func (c *gRPCClient) CommitRepositoryChanges(ctx context.Context, req *dataformp opts = append((*c.CallOptions).CommitRepositoryChanges[0:len((*c.CallOptions).CommitRepositoryChanges):len((*c.CallOptions).CommitRepositoryChanges)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CommitRepositoryChanges(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CommitRepositoryChanges, req, settings.GRPC, c.logger, "CommitRepositoryChanges") return err }, opts...) return err @@ -926,7 +931,7 @@ func (c *gRPCClient) ReadRepositoryFile(ctx context.Context, req *dataformpb.Rea var resp *dataformpb.ReadRepositoryFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReadRepositoryFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReadRepositoryFile, req, settings.GRPC, c.logger, "ReadRepositoryFile") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *gRPCClient) QueryRepositoryDirectoryContents(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryRepositoryDirectoryContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryRepositoryDirectoryContents, req, settings.GRPC, c.logger, "QueryRepositoryDirectoryContents") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *gRPCClient) FetchRepositoryHistory(ctx context.Context, req *dataformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchRepositoryHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchRepositoryHistory, req, settings.GRPC, c.logger, "FetchRepositoryHistory") return err }, opts...) if err != nil { @@ -1036,7 +1041,7 @@ func (c *gRPCClient) ComputeRepositoryAccessTokenStatus(ctx context.Context, req var resp *dataformpb.ComputeRepositoryAccessTokenStatusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComputeRepositoryAccessTokenStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComputeRepositoryAccessTokenStatus, req, settings.GRPC, c.logger, "ComputeRepositoryAccessTokenStatus") return err }, opts...) if err != nil { @@ -1054,7 +1059,7 @@ func (c *gRPCClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.Fe var resp *dataformpb.FetchRemoteBranchesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchRemoteBranches(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchRemoteBranches, req, settings.GRPC, c.logger, "FetchRemoteBranches") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *gRPCClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkspaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkspaces, req, settings.GRPC, c.logger, "ListWorkspaces") return err }, opts...) if err != nil { @@ -1118,7 +1123,7 @@ func (c *gRPCClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorksp var resp *dataformpb.Workspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkspace, req, settings.GRPC, c.logger, "GetWorkspace") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *gRPCClient) CreateWorkspace(ctx context.Context, req *dataformpb.Create var resp *dataformpb.Workspace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkspace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkspace, req, settings.GRPC, c.logger, "CreateWorkspace") return err }, opts...) if err != nil { @@ -1153,7 +1158,7 @@ func (c *gRPCClient) DeleteWorkspace(ctx context.Context, req *dataformpb.Delete opts = append((*c.CallOptions).DeleteWorkspace[0:len((*c.CallOptions).DeleteWorkspace):len((*c.CallOptions).DeleteWorkspace)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkspace(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkspace, req, settings.GRPC, c.logger, "DeleteWorkspace") return err }, opts...) return err @@ -1168,7 +1173,7 @@ func (c *gRPCClient) InstallNpmPackages(ctx context.Context, req *dataformpb.Ins var resp *dataformpb.InstallNpmPackagesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InstallNpmPackages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InstallNpmPackages, req, settings.GRPC, c.logger, "InstallNpmPackages") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *gRPCClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGit opts = append((*c.CallOptions).PullGitCommits[0:len((*c.CallOptions).PullGitCommits):len((*c.CallOptions).PullGitCommits)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PullGitCommits(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PullGitCommits, req, settings.GRPC, c.logger, "PullGitCommits") return err }, opts...) return err @@ -1199,7 +1204,7 @@ func (c *gRPCClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGit opts = append((*c.CallOptions).PushGitCommits[0:len((*c.CallOptions).PushGitCommits):len((*c.CallOptions).PushGitCommits)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PushGitCommits(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PushGitCommits, req, settings.GRPC, c.logger, "PushGitCommits") return err }, opts...) return err @@ -1214,7 +1219,7 @@ func (c *gRPCClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.F var resp *dataformpb.FetchFileGitStatusesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchFileGitStatuses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchFileGitStatuses, req, settings.GRPC, c.logger, "FetchFileGitStatuses") return err }, opts...) if err != nil { @@ -1232,7 +1237,7 @@ func (c *gRPCClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.Fe var resp *dataformpb.FetchGitAheadBehindResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchGitAheadBehind(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchGitAheadBehind, req, settings.GRPC, c.logger, "FetchGitAheadBehind") return err }, opts...) if err != nil { @@ -1249,7 +1254,7 @@ func (c *gRPCClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb opts = append((*c.CallOptions).CommitWorkspaceChanges[0:len((*c.CallOptions).CommitWorkspaceChanges):len((*c.CallOptions).CommitWorkspaceChanges)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CommitWorkspaceChanges(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CommitWorkspaceChanges, req, settings.GRPC, c.logger, "CommitWorkspaceChanges") return err }, opts...) return err @@ -1263,7 +1268,7 @@ func (c *gRPCClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb. opts = append((*c.CallOptions).ResetWorkspaceChanges[0:len((*c.CallOptions).ResetWorkspaceChanges):len((*c.CallOptions).ResetWorkspaceChanges)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.ResetWorkspaceChanges(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.ResetWorkspaceChanges, req, settings.GRPC, c.logger, "ResetWorkspaceChanges") return err }, opts...) return err @@ -1278,7 +1283,7 @@ func (c *gRPCClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFil var resp *dataformpb.FetchFileDiffResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchFileDiff(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchFileDiff, req, settings.GRPC, c.logger, "FetchFileDiff") return err }, opts...) if err != nil { @@ -1307,7 +1312,7 @@ func (c *gRPCClient) QueryDirectoryContents(ctx context.Context, req *dataformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryDirectoryContents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryDirectoryContents, req, settings.GRPC, c.logger, "QueryDirectoryContents") return err }, opts...) if err != nil { @@ -1342,7 +1347,7 @@ func (c *gRPCClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDire var resp *dataformpb.MakeDirectoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MakeDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MakeDirectory, req, settings.GRPC, c.logger, "MakeDirectory") return err }, opts...) if err != nil { @@ -1359,7 +1364,7 @@ func (c *gRPCClient) RemoveDirectory(ctx context.Context, req *dataformpb.Remove opts = append((*c.CallOptions).RemoveDirectory[0:len((*c.CallOptions).RemoveDirectory):len((*c.CallOptions).RemoveDirectory)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.RemoveDirectory(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.RemoveDirectory, req, settings.GRPC, c.logger, "RemoveDirectory") return err }, opts...) return err @@ -1374,7 +1379,7 @@ func (c *gRPCClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDire var resp *dataformpb.MoveDirectoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MoveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MoveDirectory, req, settings.GRPC, c.logger, "MoveDirectory") return err }, opts...) if err != nil { @@ -1392,7 +1397,7 @@ func (c *gRPCClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileReque var resp *dataformpb.ReadFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReadFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReadFile, req, settings.GRPC, c.logger, "ReadFile") return err }, opts...) if err != nil { @@ -1409,7 +1414,7 @@ func (c *gRPCClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileR opts = append((*c.CallOptions).RemoveFile[0:len((*c.CallOptions).RemoveFile):len((*c.CallOptions).RemoveFile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.RemoveFile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.RemoveFile, req, settings.GRPC, c.logger, "RemoveFile") return err }, opts...) return err @@ -1424,7 +1429,7 @@ func (c *gRPCClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileReque var resp *dataformpb.MoveFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MoveFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MoveFile, req, settings.GRPC, c.logger, "MoveFile") return err }, opts...) if err != nil { @@ -1442,7 +1447,7 @@ func (c *gRPCClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileReq var resp *dataformpb.WriteFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.WriteFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.WriteFile, req, settings.GRPC, c.logger, "WriteFile") return err }, opts...) if err != nil { @@ -1471,7 +1476,7 @@ func (c *gRPCClient) ListReleaseConfigs(ctx context.Context, req *dataformpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReleaseConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReleaseConfigs, req, settings.GRPC, c.logger, "ListReleaseConfigs") return err }, opts...) if err != nil { @@ -1506,7 +1511,7 @@ func (c *gRPCClient) GetReleaseConfig(ctx context.Context, req *dataformpb.GetRe var resp *dataformpb.ReleaseConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReleaseConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReleaseConfig, req, settings.GRPC, c.logger, "GetReleaseConfig") return err }, opts...) if err != nil { @@ -1524,7 +1529,7 @@ func (c *gRPCClient) CreateReleaseConfig(ctx context.Context, req *dataformpb.Cr var resp *dataformpb.ReleaseConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReleaseConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReleaseConfig, req, settings.GRPC, c.logger, "CreateReleaseConfig") return err }, opts...) if err != nil { @@ -1542,7 +1547,7 @@ func (c *gRPCClient) UpdateReleaseConfig(ctx context.Context, req *dataformpb.Up var resp *dataformpb.ReleaseConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateReleaseConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateReleaseConfig, req, settings.GRPC, c.logger, "UpdateReleaseConfig") return err }, opts...) if err != nil { @@ -1559,7 +1564,7 @@ func (c *gRPCClient) DeleteReleaseConfig(ctx context.Context, req *dataformpb.De opts = append((*c.CallOptions).DeleteReleaseConfig[0:len((*c.CallOptions).DeleteReleaseConfig):len((*c.CallOptions).DeleteReleaseConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteReleaseConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteReleaseConfig, req, settings.GRPC, c.logger, "DeleteReleaseConfig") return err }, opts...) return err @@ -1585,7 +1590,7 @@ func (c *gRPCClient) ListCompilationResults(ctx context.Context, req *dataformpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCompilationResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCompilationResults, req, settings.GRPC, c.logger, "ListCompilationResults") return err }, opts...) if err != nil { @@ -1620,7 +1625,7 @@ func (c *gRPCClient) GetCompilationResult(ctx context.Context, req *dataformpb.G var resp *dataformpb.CompilationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCompilationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCompilationResult, req, settings.GRPC, c.logger, "GetCompilationResult") return err }, opts...) if err != nil { @@ -1638,7 +1643,7 @@ func (c *gRPCClient) CreateCompilationResult(ctx context.Context, req *dataformp var resp *dataformpb.CompilationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCompilationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCompilationResult, req, settings.GRPC, c.logger, "CreateCompilationResult") return err }, opts...) if err != nil { @@ -1667,7 +1672,7 @@ func (c *gRPCClient) QueryCompilationResultActions(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryCompilationResultActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryCompilationResultActions, req, settings.GRPC, c.logger, "QueryCompilationResultActions") return err }, opts...) if err != nil { @@ -1713,7 +1718,7 @@ func (c *gRPCClient) ListWorkflowConfigs(ctx context.Context, req *dataformpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkflowConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkflowConfigs, req, settings.GRPC, c.logger, "ListWorkflowConfigs") return err }, opts...) if err != nil { @@ -1748,7 +1753,7 @@ func (c *gRPCClient) GetWorkflowConfig(ctx context.Context, req *dataformpb.GetW var resp *dataformpb.WorkflowConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkflowConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkflowConfig, req, settings.GRPC, c.logger, "GetWorkflowConfig") return err }, opts...) if err != nil { @@ -1766,7 +1771,7 @@ func (c *gRPCClient) CreateWorkflowConfig(ctx context.Context, req *dataformpb.C var resp *dataformpb.WorkflowConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkflowConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkflowConfig, req, settings.GRPC, c.logger, "CreateWorkflowConfig") return err }, opts...) if err != nil { @@ -1784,7 +1789,7 @@ func (c *gRPCClient) UpdateWorkflowConfig(ctx context.Context, req *dataformpb.U var resp *dataformpb.WorkflowConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkflowConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkflowConfig, req, settings.GRPC, c.logger, "UpdateWorkflowConfig") return err }, opts...) if err != nil { @@ -1801,7 +1806,7 @@ func (c *gRPCClient) DeleteWorkflowConfig(ctx context.Context, req *dataformpb.D opts = append((*c.CallOptions).DeleteWorkflowConfig[0:len((*c.CallOptions).DeleteWorkflowConfig):len((*c.CallOptions).DeleteWorkflowConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkflowConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkflowConfig, req, settings.GRPC, c.logger, "DeleteWorkflowConfig") return err }, opts...) return err @@ -1827,7 +1832,7 @@ func (c *gRPCClient) ListWorkflowInvocations(ctx context.Context, req *dataformp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkflowInvocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkflowInvocations, req, settings.GRPC, c.logger, "ListWorkflowInvocations") return err }, opts...) if err != nil { @@ -1862,7 +1867,7 @@ func (c *gRPCClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb. var resp *dataformpb.WorkflowInvocation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkflowInvocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkflowInvocation, req, settings.GRPC, c.logger, "GetWorkflowInvocation") return err }, opts...) if err != nil { @@ -1880,7 +1885,7 @@ func (c *gRPCClient) CreateWorkflowInvocation(ctx context.Context, req *dataform var resp *dataformpb.WorkflowInvocation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkflowInvocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkflowInvocation, req, settings.GRPC, c.logger, "CreateWorkflowInvocation") return err }, opts...) if err != nil { @@ -1897,7 +1902,7 @@ func (c *gRPCClient) DeleteWorkflowInvocation(ctx context.Context, req *dataform opts = append((*c.CallOptions).DeleteWorkflowInvocation[0:len((*c.CallOptions).DeleteWorkflowInvocation):len((*c.CallOptions).DeleteWorkflowInvocation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteWorkflowInvocation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteWorkflowInvocation, req, settings.GRPC, c.logger, "DeleteWorkflowInvocation") return err }, opts...) return err @@ -1911,7 +1916,7 @@ func (c *gRPCClient) CancelWorkflowInvocation(ctx context.Context, req *dataform opts = append((*c.CallOptions).CancelWorkflowInvocation[0:len((*c.CallOptions).CancelWorkflowInvocation):len((*c.CallOptions).CancelWorkflowInvocation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CancelWorkflowInvocation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CancelWorkflowInvocation, req, settings.GRPC, c.logger, "CancelWorkflowInvocation") return err }, opts...) return err @@ -1937,7 +1942,7 @@ func (c *gRPCClient) QueryWorkflowInvocationActions(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryWorkflowInvocationActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryWorkflowInvocationActions, req, settings.GRPC, c.logger, "QueryWorkflowInvocationActions") return err }, opts...) if err != nil { @@ -1972,7 +1977,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2001,7 +2006,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2036,7 +2041,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2054,7 +2059,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2072,7 +2077,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2132,21 +2137,10 @@ func (c *restClient) ListRepositories(ctx context.Context, req *dataformpb.ListR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2209,17 +2203,7 @@ func (c *restClient) GetRepository(ctx context.Context, req *dataformpb.GetRepos httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -2277,17 +2261,7 @@ func (c *restClient) CreateRepository(ctx context.Context, req *dataformpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } @@ -2351,17 +2325,7 @@ func (c *restClient) UpdateRepository(ctx context.Context, req *dataformpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRepository") if err != nil { return err } @@ -2411,15 +2375,8 @@ func (c *restClient) DeleteRepository(ctx context.Context, req *dataformpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") + return err }, opts...) } @@ -2460,15 +2417,8 @@ func (c *restClient) CommitRepositoryChanges(ctx context.Context, req *dataformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CommitRepositoryChanges") + return err }, opts...) } @@ -2510,17 +2460,7 @@ func (c *restClient) ReadRepositoryFile(ctx context.Context, req *dataformpb.Rea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadRepositoryFile") if err != nil { return err } @@ -2589,21 +2529,10 @@ func (c *restClient) QueryRepositoryDirectoryContents(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryRepositoryDirectoryContents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2679,21 +2608,10 @@ func (c *restClient) FetchRepositoryHistory(ctx context.Context, req *dataformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchRepositoryHistory") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2756,17 +2674,7 @@ func (c *restClient) ComputeRepositoryAccessTokenStatus(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ComputeRepositoryAccessTokenStatus") if err != nil { return err } @@ -2816,17 +2724,7 @@ func (c *restClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.Fe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchRemoteBranches") if err != nil { return err } @@ -2894,21 +2792,10 @@ func (c *restClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkspaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2971,17 +2858,7 @@ func (c *restClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkspace") if err != nil { return err } @@ -3039,17 +2916,7 @@ func (c *restClient) CreateWorkspace(ctx context.Context, req *dataformpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkspace") if err != nil { return err } @@ -3096,15 +2963,8 @@ func (c *restClient) DeleteWorkspace(ctx context.Context, req *dataformpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkspace") + return err }, opts...) } @@ -3147,17 +3007,7 @@ func (c *restClient) InstallNpmPackages(ctx context.Context, req *dataformpb.Ins httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InstallNpmPackages") if err != nil { return err } @@ -3210,15 +3060,8 @@ func (c *restClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PullGitCommits") + return err }, opts...) } @@ -3258,15 +3101,8 @@ func (c *restClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PushGitCommits") + return err }, opts...) } @@ -3303,17 +3139,7 @@ func (c *restClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.F httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchFileGitStatuses") if err != nil { return err } @@ -3366,17 +3192,7 @@ func (c *restClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.Fe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchGitAheadBehind") if err != nil { return err } @@ -3429,15 +3245,8 @@ func (c *restClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CommitWorkspaceChanges") + return err }, opts...) } @@ -3477,15 +3286,8 @@ func (c *restClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetWorkspaceChanges") + return err }, opts...) } @@ -3523,17 +3325,7 @@ func (c *restClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchFileDiff") if err != nil { return err } @@ -3598,21 +3390,10 @@ func (c *restClient) QueryDirectoryContents(ctx context.Context, req *dataformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryDirectoryContents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3681,17 +3462,7 @@ func (c *restClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDire httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MakeDirectory") if err != nil { return err } @@ -3744,15 +3515,8 @@ func (c *restClient) RemoveDirectory(ctx context.Context, req *dataformpb.Remove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveDirectory") + return err }, opts...) } @@ -3796,17 +3560,7 @@ func (c *restClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDire httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveDirectory") if err != nil { return err } @@ -3857,17 +3611,7 @@ func (c *restClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ReadFile") if err != nil { return err } @@ -3920,15 +3664,8 @@ func (c *restClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveFile") + return err }, opts...) } @@ -3971,17 +3708,7 @@ func (c *restClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveFile") if err != nil { return err } @@ -4037,17 +3764,7 @@ func (c *restClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteFile") if err != nil { return err } @@ -4109,21 +3826,10 @@ func (c *restClient) ListReleaseConfigs(ctx context.Context, req *dataformpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReleaseConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4186,17 +3892,7 @@ func (c *restClient) GetReleaseConfig(ctx context.Context, req *dataformpb.GetRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReleaseConfig") if err != nil { return err } @@ -4254,17 +3950,7 @@ func (c *restClient) CreateReleaseConfig(ctx context.Context, req *dataformpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReleaseConfig") if err != nil { return err } @@ -4328,17 +4014,7 @@ func (c *restClient) UpdateReleaseConfig(ctx context.Context, req *dataformpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateReleaseConfig") if err != nil { return err } @@ -4385,15 +4061,8 @@ func (c *restClient) DeleteReleaseConfig(ctx context.Context, req *dataformpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReleaseConfig") + return err }, opts...) } @@ -4442,21 +4111,10 @@ func (c *restClient) ListCompilationResults(ctx context.Context, req *dataformpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCompilationResults") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4519,17 +4177,7 @@ func (c *restClient) GetCompilationResult(ctx context.Context, req *dataformpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompilationResult") if err != nil { return err } @@ -4586,17 +4234,7 @@ func (c *restClient) CreateCompilationResult(ctx context.Context, req *dataformp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCompilationResult") if err != nil { return err } @@ -4661,21 +4299,10 @@ func (c *restClient) QueryCompilationResultActions(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryCompilationResultActions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4750,21 +4377,10 @@ func (c *restClient) ListWorkflowConfigs(ctx context.Context, req *dataformpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflowConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4827,17 +4443,7 @@ func (c *restClient) GetWorkflowConfig(ctx context.Context, req *dataformpb.GetW httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflowConfig") if err != nil { return err } @@ -4895,17 +4501,7 @@ func (c *restClient) CreateWorkflowConfig(ctx context.Context, req *dataformpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflowConfig") if err != nil { return err } @@ -4969,17 +4565,7 @@ func (c *restClient) UpdateWorkflowConfig(ctx context.Context, req *dataformpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkflowConfig") if err != nil { return err } @@ -5026,15 +4612,8 @@ func (c *restClient) DeleteWorkflowConfig(ctx context.Context, req *dataformpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflowConfig") + return err }, opts...) } @@ -5089,21 +4668,10 @@ func (c *restClient) ListWorkflowInvocations(ctx context.Context, req *dataformp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflowInvocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5166,17 +4734,7 @@ func (c *restClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflowInvocation") if err != nil { return err } @@ -5233,17 +4791,7 @@ func (c *restClient) CreateWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflowInvocation") if err != nil { return err } @@ -5290,15 +4838,8 @@ func (c *restClient) DeleteWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflowInvocation") + return err }, opts...) } @@ -5338,15 +4879,8 @@ func (c *restClient) CancelWorkflowInvocation(ctx context.Context, req *dataform httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelWorkflowInvocation") + return err }, opts...) } @@ -5395,21 +4929,10 @@ func (c *restClient) QueryWorkflowInvocationActions(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "QueryWorkflowInvocationActions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5472,17 +4995,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -5547,21 +5060,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5628,17 +5130,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -5698,17 +5190,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -5770,17 +5252,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/dataform/apiv1beta1/dataform_client_example_go123_test.go b/dataform/apiv1beta1/dataform_client_example_go123_test.go index 4bbf5b303e36..847f5c0d8496 100644 --- a/dataform/apiv1beta1/dataform_client_example_go123_test.go +++ b/dataform/apiv1beta1/dataform_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_FetchRepositoryHistory_all() { } for resp, err := range c.FetchRepositoryHistory(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListCompilationResults_all() { } for resp, err := range c.ListCompilationResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListReleaseConfigs_all() { } for resp, err := range c.ListReleaseConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListWorkflowConfigs_all() { } for resp, err := range c.ListWorkflowConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListWorkflowInvocations_all() { } for resp, err := range c.ListWorkflowInvocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListWorkspaces_all() { } for resp, err := range c.ListWorkspaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_QueryCompilationResultActions_all() { } for resp, err := range c.QueryCompilationResultActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_QueryDirectoryContents_all() { } for resp, err := range c.QueryDirectoryContents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_QueryRepositoryDirectoryContents_all() { } for resp, err := range c.QueryRepositoryDirectoryContents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleClient_QueryWorkflowInvocationActions_all() { } for resp, err := range c.QueryWorkflowInvocationActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -331,7 +331,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataform/apiv1beta1/dataformpb/dataform.pb.go b/dataform/apiv1beta1/dataformpb/dataform.pb.go index 269a87091910..8a63a584dff2 100755 --- a/dataform/apiv1beta1/dataformpb/dataform.pb.go +++ b/dataform/apiv1beta1/dataformpb/dataform.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataform/v1beta1/dataform.proto @@ -454,11 +454,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -469,7 +467,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +567,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -584,7 +580,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +647,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -666,7 +660,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +708,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -729,7 +721,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +761,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -784,7 +774,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +825,9 @@ type UpdateRepositoryRequest struct { func (x *UpdateRepositoryRequest) Reset() { *x = UpdateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRepositoryRequest) String() string { @@ -850,7 +838,7 @@ func (*UpdateRepositoryRequest) ProtoMessage() {} func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +883,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -910,7 +896,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +946,9 @@ type CommitRepositoryChangesRequest struct { func (x *CommitRepositoryChangesRequest) Reset() { *x = CommitRepositoryChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRepositoryChangesRequest) String() string { @@ -975,7 +959,7 @@ func (*CommitRepositoryChangesRequest) ProtoMessage() {} func (x *CommitRepositoryChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1019,9 @@ type ReadRepositoryFileRequest struct { func (x *ReadRepositoryFileRequest) Reset() { *x = ReadRepositoryFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRepositoryFileRequest) String() string { @@ -1050,7 +1032,7 @@ func (*ReadRepositoryFileRequest) ProtoMessage() {} func (x *ReadRepositoryFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,11 +1080,9 @@ type ReadRepositoryFileResponse struct { func (x *ReadRepositoryFileResponse) Reset() { *x = ReadRepositoryFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRepositoryFileResponse) String() string { @@ -1113,7 +1093,7 @@ func (*ReadRepositoryFileResponse) ProtoMessage() {} func (x *ReadRepositoryFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1165,11 +1145,9 @@ type QueryRepositoryDirectoryContentsRequest struct { func (x *QueryRepositoryDirectoryContentsRequest) Reset() { *x = QueryRepositoryDirectoryContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryRepositoryDirectoryContentsRequest) String() string { @@ -1180,7 +1158,7 @@ func (*QueryRepositoryDirectoryContentsRequest) ProtoMessage() {} func (x *QueryRepositoryDirectoryContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1223,9 @@ type QueryRepositoryDirectoryContentsResponse struct { func (x *QueryRepositoryDirectoryContentsResponse) Reset() { *x = QueryRepositoryDirectoryContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryRepositoryDirectoryContentsResponse) String() string { @@ -1260,7 +1236,7 @@ func (*QueryRepositoryDirectoryContentsResponse) ProtoMessage() {} func (x *QueryRepositoryDirectoryContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1311,11 +1287,9 @@ type FetchRepositoryHistoryRequest struct { func (x *FetchRepositoryHistoryRequest) Reset() { *x = FetchRepositoryHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRepositoryHistoryRequest) String() string { @@ -1326,7 +1300,7 @@ func (*FetchRepositoryHistoryRequest) ProtoMessage() {} func (x *FetchRepositoryHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1351,9 @@ type FetchRepositoryHistoryResponse struct { func (x *FetchRepositoryHistoryResponse) Reset() { *x = FetchRepositoryHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRepositoryHistoryResponse) String() string { @@ -1392,7 +1364,7 @@ func (*FetchRepositoryHistoryResponse) ProtoMessage() {} func (x *FetchRepositoryHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,11 +1411,9 @@ type CommitLogEntry struct { func (x *CommitLogEntry) Reset() { *x = CommitLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitLogEntry) String() string { @@ -1454,7 +1424,7 @@ func (*CommitLogEntry) ProtoMessage() {} func (x *CommitLogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1511,11 +1481,9 @@ type CommitMetadata struct { func (x *CommitMetadata) Reset() { *x = CommitMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitMetadata) String() string { @@ -1526,7 +1494,7 @@ func (*CommitMetadata) ProtoMessage() {} func (x *CommitMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1567,11 +1535,9 @@ type ComputeRepositoryAccessTokenStatusRequest struct { func (x *ComputeRepositoryAccessTokenStatusRequest) Reset() { *x = ComputeRepositoryAccessTokenStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeRepositoryAccessTokenStatusRequest) String() string { @@ -1582,7 +1548,7 @@ func (*ComputeRepositoryAccessTokenStatusRequest) ProtoMessage() {} func (x *ComputeRepositoryAccessTokenStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1582,9 @@ type ComputeRepositoryAccessTokenStatusResponse struct { func (x *ComputeRepositoryAccessTokenStatusResponse) Reset() { *x = ComputeRepositoryAccessTokenStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeRepositoryAccessTokenStatusResponse) String() string { @@ -1631,7 +1595,7 @@ func (*ComputeRepositoryAccessTokenStatusResponse) ProtoMessage() {} func (x *ComputeRepositoryAccessTokenStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1665,11 +1629,9 @@ type FetchRemoteBranchesRequest struct { func (x *FetchRemoteBranchesRequest) Reset() { *x = FetchRemoteBranchesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRemoteBranchesRequest) String() string { @@ -1680,7 +1642,7 @@ func (*FetchRemoteBranchesRequest) ProtoMessage() {} func (x *FetchRemoteBranchesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1714,11 +1676,9 @@ type FetchRemoteBranchesResponse struct { func (x *FetchRemoteBranchesResponse) Reset() { *x = FetchRemoteBranchesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchRemoteBranchesResponse) String() string { @@ -1729,7 +1689,7 @@ func (*FetchRemoteBranchesResponse) ProtoMessage() {} func (x *FetchRemoteBranchesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1763,11 +1723,9 @@ type Workspace struct { func (x *Workspace) Reset() { *x = Workspace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workspace) String() string { @@ -1778,7 +1736,7 @@ func (*Workspace) ProtoMessage() {} func (x *Workspace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1787,9 @@ type ListWorkspacesRequest struct { func (x *ListWorkspacesRequest) Reset() { *x = ListWorkspacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesRequest) String() string { @@ -1844,7 +1800,7 @@ func (*ListWorkspacesRequest) ProtoMessage() {} func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1911,11 +1867,9 @@ type ListWorkspacesResponse struct { func (x *ListWorkspacesResponse) Reset() { *x = ListWorkspacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkspacesResponse) String() string { @@ -1926,7 +1880,7 @@ func (*ListWorkspacesResponse) ProtoMessage() {} func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1974,11 +1928,9 @@ type GetWorkspaceRequest struct { func (x *GetWorkspaceRequest) Reset() { *x = GetWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkspaceRequest) String() string { @@ -1989,7 +1941,7 @@ func (*GetWorkspaceRequest) ProtoMessage() {} func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1981,9 @@ type CreateWorkspaceRequest struct { func (x *CreateWorkspaceRequest) Reset() { *x = CreateWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkspaceRequest) String() string { @@ -2044,7 +1994,7 @@ func (*CreateWorkspaceRequest) ProtoMessage() {} func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,11 +2042,9 @@ type DeleteWorkspaceRequest struct { func (x *DeleteWorkspaceRequest) Reset() { *x = DeleteWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkspaceRequest) String() string { @@ -2107,7 +2055,7 @@ func (*DeleteWorkspaceRequest) ProtoMessage() {} func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2143,11 +2091,9 @@ type CommitAuthor struct { func (x *CommitAuthor) Reset() { *x = CommitAuthor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitAuthor) String() string { @@ -2158,7 +2104,7 @@ func (*CommitAuthor) ProtoMessage() {} func (x *CommitAuthor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2205,11 +2151,9 @@ type PullGitCommitsRequest struct { func (x *PullGitCommitsRequest) Reset() { *x = PullGitCommitsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullGitCommitsRequest) String() string { @@ -2220,7 +2164,7 @@ func (*PullGitCommitsRequest) ProtoMessage() {} func (x *PullGitCommitsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2272,11 +2216,9 @@ type PushGitCommitsRequest struct { func (x *PushGitCommitsRequest) Reset() { *x = PushGitCommitsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushGitCommitsRequest) String() string { @@ -2287,7 +2229,7 @@ func (*PushGitCommitsRequest) ProtoMessage() {} func (x *PushGitCommitsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2270,9 @@ type FetchFileGitStatusesRequest struct { func (x *FetchFileGitStatusesRequest) Reset() { *x = FetchFileGitStatusesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesRequest) String() string { @@ -2343,7 +2283,7 @@ func (*FetchFileGitStatusesRequest) ProtoMessage() {} func (x *FetchFileGitStatusesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2318,9 @@ type FetchFileGitStatusesResponse struct { func (x *FetchFileGitStatusesResponse) Reset() { *x = FetchFileGitStatusesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesResponse) String() string { @@ -2393,7 +2331,7 @@ func (*FetchFileGitStatusesResponse) ProtoMessage() {} func (x *FetchFileGitStatusesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2431,11 +2369,9 @@ type FetchGitAheadBehindRequest struct { func (x *FetchGitAheadBehindRequest) Reset() { *x = FetchGitAheadBehindRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitAheadBehindRequest) String() string { @@ -2446,7 +2382,7 @@ func (*FetchGitAheadBehindRequest) ProtoMessage() {} func (x *FetchGitAheadBehindRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2425,9 @@ type FetchGitAheadBehindResponse struct { func (x *FetchGitAheadBehindResponse) Reset() { *x = FetchGitAheadBehindResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitAheadBehindResponse) String() string { @@ -2504,7 +2438,7 @@ func (*FetchGitAheadBehindResponse) ProtoMessage() {} func (x *FetchGitAheadBehindResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2552,11 +2486,9 @@ type CommitWorkspaceChangesRequest struct { func (x *CommitWorkspaceChangesRequest) Reset() { *x = CommitWorkspaceChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitWorkspaceChangesRequest) String() string { @@ -2567,7 +2499,7 @@ func (*CommitWorkspaceChangesRequest) ProtoMessage() {} func (x *CommitWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2627,11 +2559,9 @@ type ResetWorkspaceChangesRequest struct { func (x *ResetWorkspaceChangesRequest) Reset() { *x = ResetWorkspaceChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetWorkspaceChangesRequest) String() string { @@ -2642,7 +2572,7 @@ func (*ResetWorkspaceChangesRequest) ProtoMessage() {} func (x *ResetWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2693,11 +2623,9 @@ type FetchFileDiffRequest struct { func (x *FetchFileDiffRequest) Reset() { *x = FetchFileDiffRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileDiffRequest) String() string { @@ -2708,7 +2636,7 @@ func (*FetchFileDiffRequest) ProtoMessage() {} func (x *FetchFileDiffRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2749,11 +2677,9 @@ type FetchFileDiffResponse struct { func (x *FetchFileDiffResponse) Reset() { *x = FetchFileDiffResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileDiffResponse) String() string { @@ -2764,7 +2690,7 @@ func (*FetchFileDiffResponse) ProtoMessage() {} func (x *FetchFileDiffResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2812,11 +2738,9 @@ type QueryDirectoryContentsRequest struct { func (x *QueryDirectoryContentsRequest) Reset() { *x = QueryDirectoryContentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDirectoryContentsRequest) String() string { @@ -2827,7 +2751,7 @@ func (*QueryDirectoryContentsRequest) ProtoMessage() {} func (x *QueryDirectoryContentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2885,11 +2809,9 @@ type QueryDirectoryContentsResponse struct { func (x *QueryDirectoryContentsResponse) Reset() { *x = QueryDirectoryContentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryDirectoryContentsResponse) String() string { @@ -2900,7 +2822,7 @@ func (*QueryDirectoryContentsResponse) ProtoMessage() {} func (x *QueryDirectoryContentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2944,11 +2866,9 @@ type DirectoryEntry struct { func (x *DirectoryEntry) Reset() { *x = DirectoryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectoryEntry) String() string { @@ -2959,7 +2879,7 @@ func (*DirectoryEntry) ProtoMessage() {} func (x *DirectoryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3028,11 +2948,9 @@ type MakeDirectoryRequest struct { func (x *MakeDirectoryRequest) Reset() { *x = MakeDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MakeDirectoryRequest) String() string { @@ -3043,7 +2961,7 @@ func (*MakeDirectoryRequest) ProtoMessage() {} func (x *MakeDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3081,11 +2999,9 @@ type MakeDirectoryResponse struct { func (x *MakeDirectoryResponse) Reset() { *x = MakeDirectoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MakeDirectoryResponse) String() string { @@ -3096,7 +3012,7 @@ func (*MakeDirectoryResponse) ProtoMessage() {} func (x *MakeDirectoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3126,11 +3042,9 @@ type RemoveDirectoryRequest struct { func (x *RemoveDirectoryRequest) Reset() { *x = RemoveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDirectoryRequest) String() string { @@ -3141,7 +3055,7 @@ func (*RemoveDirectoryRequest) ProtoMessage() {} func (x *RemoveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3188,11 +3102,9 @@ type MoveDirectoryRequest struct { func (x *MoveDirectoryRequest) Reset() { *x = MoveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveDirectoryRequest) String() string { @@ -3203,7 +3115,7 @@ func (*MoveDirectoryRequest) ProtoMessage() {} func (x *MoveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3248,11 +3160,9 @@ type MoveDirectoryResponse struct { func (x *MoveDirectoryResponse) Reset() { *x = MoveDirectoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveDirectoryResponse) String() string { @@ -3263,7 +3173,7 @@ func (*MoveDirectoryResponse) ProtoMessage() {} func (x *MoveDirectoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3293,11 +3203,9 @@ type ReadFileRequest struct { func (x *ReadFileRequest) Reset() { *x = ReadFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFileRequest) String() string { @@ -3308,7 +3216,7 @@ func (*ReadFileRequest) ProtoMessage() {} func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3349,11 +3257,9 @@ type ReadFileResponse struct { func (x *ReadFileResponse) Reset() { *x = ReadFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadFileResponse) String() string { @@ -3364,7 +3270,7 @@ func (*ReadFileResponse) ProtoMessage() {} func (x *ReadFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3401,11 +3307,9 @@ type RemoveFileRequest struct { func (x *RemoveFileRequest) Reset() { *x = RemoveFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFileRequest) String() string { @@ -3416,7 +3320,7 @@ func (*RemoveFileRequest) ProtoMessage() {} func (x *RemoveFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3463,11 +3367,9 @@ type MoveFileRequest struct { func (x *MoveFileRequest) Reset() { *x = MoveFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFileRequest) String() string { @@ -3478,7 +3380,7 @@ func (*MoveFileRequest) ProtoMessage() {} func (x *MoveFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3523,11 +3425,9 @@ type MoveFileResponse struct { func (x *MoveFileResponse) Reset() { *x = MoveFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFileResponse) String() string { @@ -3538,7 +3438,7 @@ func (*MoveFileResponse) ProtoMessage() {} func (x *MoveFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3569,11 +3469,9 @@ type WriteFileRequest struct { func (x *WriteFileRequest) Reset() { *x = WriteFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFileRequest) String() string { @@ -3584,7 +3482,7 @@ func (*WriteFileRequest) ProtoMessage() {} func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3629,11 +3527,9 @@ type WriteFileResponse struct { func (x *WriteFileResponse) Reset() { *x = WriteFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteFileResponse) String() string { @@ -3644,7 +3540,7 @@ func (*WriteFileResponse) ProtoMessage() {} func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3671,11 +3567,9 @@ type InstallNpmPackagesRequest struct { func (x *InstallNpmPackagesRequest) Reset() { *x = InstallNpmPackagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallNpmPackagesRequest) String() string { @@ -3686,7 +3580,7 @@ func (*InstallNpmPackagesRequest) ProtoMessage() {} func (x *InstallNpmPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3717,11 +3611,9 @@ type InstallNpmPackagesResponse struct { func (x *InstallNpmPackagesResponse) Reset() { *x = InstallNpmPackagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallNpmPackagesResponse) String() string { @@ -3732,7 +3624,7 @@ func (*InstallNpmPackagesResponse) ProtoMessage() {} func (x *InstallNpmPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3787,11 +3679,9 @@ type ReleaseConfig struct { func (x *ReleaseConfig) Reset() { *x = ReleaseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseConfig) String() string { @@ -3802,7 +3692,7 @@ func (*ReleaseConfig) ProtoMessage() {} func (x *ReleaseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3889,11 +3779,9 @@ type ListReleaseConfigsRequest struct { func (x *ListReleaseConfigsRequest) Reset() { *x = ListReleaseConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReleaseConfigsRequest) String() string { @@ -3904,7 +3792,7 @@ func (*ListReleaseConfigsRequest) ProtoMessage() {} func (x *ListReleaseConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3957,11 +3845,9 @@ type ListReleaseConfigsResponse struct { func (x *ListReleaseConfigsResponse) Reset() { *x = ListReleaseConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReleaseConfigsResponse) String() string { @@ -3972,7 +3858,7 @@ func (*ListReleaseConfigsResponse) ProtoMessage() {} func (x *ListReleaseConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4020,11 +3906,9 @@ type GetReleaseConfigRequest struct { func (x *GetReleaseConfigRequest) Reset() { *x = GetReleaseConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReleaseConfigRequest) String() string { @@ -4035,7 +3919,7 @@ func (*GetReleaseConfigRequest) ProtoMessage() {} func (x *GetReleaseConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4075,11 +3959,9 @@ type CreateReleaseConfigRequest struct { func (x *CreateReleaseConfigRequest) Reset() { *x = CreateReleaseConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReleaseConfigRequest) String() string { @@ -4090,7 +3972,7 @@ func (*CreateReleaseConfigRequest) ProtoMessage() {} func (x *CreateReleaseConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4141,11 +4023,9 @@ type UpdateReleaseConfigRequest struct { func (x *UpdateReleaseConfigRequest) Reset() { *x = UpdateReleaseConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReleaseConfigRequest) String() string { @@ -4156,7 +4036,7 @@ func (*UpdateReleaseConfigRequest) ProtoMessage() {} func (x *UpdateReleaseConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4197,11 +4077,9 @@ type DeleteReleaseConfigRequest struct { func (x *DeleteReleaseConfigRequest) Reset() { *x = DeleteReleaseConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReleaseConfigRequest) String() string { @@ -4212,7 +4090,7 @@ func (*DeleteReleaseConfigRequest) ProtoMessage() {} func (x *DeleteReleaseConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4262,11 +4140,9 @@ type CompilationResult struct { func (x *CompilationResult) Reset() { *x = CompilationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResult) String() string { @@ -4277,7 +4153,7 @@ func (*CompilationResult) ProtoMessage() {} func (x *CompilationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4419,11 +4295,9 @@ type CodeCompilationConfig struct { func (x *CodeCompilationConfig) Reset() { *x = CodeCompilationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CodeCompilationConfig) String() string { @@ -4434,7 +4308,7 @@ func (*CodeCompilationConfig) ProtoMessage() {} func (x *CodeCompilationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4528,11 +4402,9 @@ type ListCompilationResultsRequest struct { func (x *ListCompilationResultsRequest) Reset() { *x = ListCompilationResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompilationResultsRequest) String() string { @@ -4543,7 +4415,7 @@ func (*ListCompilationResultsRequest) ProtoMessage() {} func (x *ListCompilationResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,11 +4468,9 @@ type ListCompilationResultsResponse struct { func (x *ListCompilationResultsResponse) Reset() { *x = ListCompilationResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompilationResultsResponse) String() string { @@ -4611,7 +4481,7 @@ func (*ListCompilationResultsResponse) ProtoMessage() {} func (x *ListCompilationResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4659,11 +4529,9 @@ type GetCompilationResultRequest struct { func (x *GetCompilationResultRequest) Reset() { *x = GetCompilationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompilationResultRequest) String() string { @@ -4674,7 +4542,7 @@ func (*GetCompilationResultRequest) ProtoMessage() {} func (x *GetCompilationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4711,11 +4579,9 @@ type CreateCompilationResultRequest struct { func (x *CreateCompilationResultRequest) Reset() { *x = CreateCompilationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCompilationResultRequest) String() string { @@ -4726,7 +4592,7 @@ func (*CreateCompilationResultRequest) ProtoMessage() {} func (x *CreateCompilationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4772,11 +4638,9 @@ type Target struct { func (x *Target) Reset() { *x = Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target) String() string { @@ -4787,7 +4651,7 @@ func (*Target) ProtoMessage() {} func (x *Target) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4839,11 +4703,9 @@ type RelationDescriptor struct { func (x *RelationDescriptor) Reset() { *x = RelationDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationDescriptor) String() string { @@ -4854,7 +4716,7 @@ func (*RelationDescriptor) ProtoMessage() {} func (x *RelationDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4915,11 +4777,9 @@ type CompilationResultAction struct { func (x *CompilationResultAction) Reset() { *x = CompilationResultAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction) String() string { @@ -4930,7 +4790,7 @@ func (*CompilationResultAction) ProtoMessage() {} func (x *CompilationResultAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5060,11 +4920,9 @@ type QueryCompilationResultActionsRequest struct { func (x *QueryCompilationResultActionsRequest) Reset() { *x = QueryCompilationResultActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCompilationResultActionsRequest) String() string { @@ -5075,7 +4933,7 @@ func (*QueryCompilationResultActionsRequest) ProtoMessage() {} func (x *QueryCompilationResultActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5133,11 +4991,9 @@ type QueryCompilationResultActionsResponse struct { func (x *QueryCompilationResultActionsResponse) Reset() { *x = QueryCompilationResultActionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCompilationResultActionsResponse) String() string { @@ -5148,7 +5004,7 @@ func (*QueryCompilationResultActionsResponse) ProtoMessage() {} func (x *QueryCompilationResultActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5207,11 +5063,9 @@ type WorkflowConfig struct { func (x *WorkflowConfig) Reset() { *x = WorkflowConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowConfig) String() string { @@ -5222,7 +5076,7 @@ func (*WorkflowConfig) ProtoMessage() {} func (x *WorkflowConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5305,11 +5159,9 @@ type InvocationConfig struct { func (x *InvocationConfig) Reset() { *x = InvocationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvocationConfig) String() string { @@ -5320,7 +5172,7 @@ func (*InvocationConfig) ProtoMessage() {} func (x *InvocationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5400,11 +5252,9 @@ type ListWorkflowConfigsRequest struct { func (x *ListWorkflowConfigsRequest) Reset() { *x = ListWorkflowConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowConfigsRequest) String() string { @@ -5415,7 +5265,7 @@ func (*ListWorkflowConfigsRequest) ProtoMessage() {} func (x *ListWorkflowConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5468,11 +5318,9 @@ type ListWorkflowConfigsResponse struct { func (x *ListWorkflowConfigsResponse) Reset() { *x = ListWorkflowConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowConfigsResponse) String() string { @@ -5483,7 +5331,7 @@ func (*ListWorkflowConfigsResponse) ProtoMessage() {} func (x *ListWorkflowConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5531,11 +5379,9 @@ type GetWorkflowConfigRequest struct { func (x *GetWorkflowConfigRequest) Reset() { *x = GetWorkflowConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowConfigRequest) String() string { @@ -5546,7 +5392,7 @@ func (*GetWorkflowConfigRequest) ProtoMessage() {} func (x *GetWorkflowConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5586,11 +5432,9 @@ type CreateWorkflowConfigRequest struct { func (x *CreateWorkflowConfigRequest) Reset() { *x = CreateWorkflowConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowConfigRequest) String() string { @@ -5601,7 +5445,7 @@ func (*CreateWorkflowConfigRequest) ProtoMessage() {} func (x *CreateWorkflowConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5652,11 +5496,9 @@ type UpdateWorkflowConfigRequest struct { func (x *UpdateWorkflowConfigRequest) Reset() { *x = UpdateWorkflowConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkflowConfigRequest) String() string { @@ -5667,7 +5509,7 @@ func (*UpdateWorkflowConfigRequest) ProtoMessage() {} func (x *UpdateWorkflowConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5708,11 +5550,9 @@ type DeleteWorkflowConfigRequest struct { func (x *DeleteWorkflowConfigRequest) Reset() { *x = DeleteWorkflowConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowConfigRequest) String() string { @@ -5723,7 +5563,7 @@ func (*DeleteWorkflowConfigRequest) ProtoMessage() {} func (x *DeleteWorkflowConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5768,11 +5608,9 @@ type WorkflowInvocation struct { func (x *WorkflowInvocation) Reset() { *x = WorkflowInvocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocation) String() string { @@ -5783,7 +5621,7 @@ func (*WorkflowInvocation) ProtoMessage() {} func (x *WorkflowInvocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5897,11 +5735,9 @@ type ListWorkflowInvocationsRequest struct { func (x *ListWorkflowInvocationsRequest) Reset() { *x = ListWorkflowInvocationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowInvocationsRequest) String() string { @@ -5912,7 +5748,7 @@ func (*ListWorkflowInvocationsRequest) ProtoMessage() {} func (x *ListWorkflowInvocationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5979,11 +5815,9 @@ type ListWorkflowInvocationsResponse struct { func (x *ListWorkflowInvocationsResponse) Reset() { *x = ListWorkflowInvocationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowInvocationsResponse) String() string { @@ -5994,7 +5828,7 @@ func (*ListWorkflowInvocationsResponse) ProtoMessage() {} func (x *ListWorkflowInvocationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6042,11 +5876,9 @@ type GetWorkflowInvocationRequest struct { func (x *GetWorkflowInvocationRequest) Reset() { *x = GetWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowInvocationRequest) String() string { @@ -6057,7 +5889,7 @@ func (*GetWorkflowInvocationRequest) ProtoMessage() {} func (x *GetWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6094,11 +5926,9 @@ type CreateWorkflowInvocationRequest struct { func (x *CreateWorkflowInvocationRequest) Reset() { *x = CreateWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowInvocationRequest) String() string { @@ -6109,7 +5939,7 @@ func (*CreateWorkflowInvocationRequest) ProtoMessage() {} func (x *CreateWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6150,11 +5980,9 @@ type DeleteWorkflowInvocationRequest struct { func (x *DeleteWorkflowInvocationRequest) Reset() { *x = DeleteWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowInvocationRequest) String() string { @@ -6165,7 +5993,7 @@ func (*DeleteWorkflowInvocationRequest) ProtoMessage() {} func (x *DeleteWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6199,11 +6027,9 @@ type CancelWorkflowInvocationRequest struct { func (x *CancelWorkflowInvocationRequest) Reset() { *x = CancelWorkflowInvocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelWorkflowInvocationRequest) String() string { @@ -6214,7 +6040,7 @@ func (*CancelWorkflowInvocationRequest) ProtoMessage() {} func (x *CancelWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6265,11 +6091,9 @@ type WorkflowInvocationAction struct { func (x *WorkflowInvocationAction) Reset() { *x = WorkflowInvocationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocationAction) String() string { @@ -6280,7 +6104,7 @@ func (*WorkflowInvocationAction) ProtoMessage() {} func (x *WorkflowInvocationAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6361,11 +6185,9 @@ type QueryWorkflowInvocationActionsRequest struct { func (x *QueryWorkflowInvocationActionsRequest) Reset() { *x = QueryWorkflowInvocationActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWorkflowInvocationActionsRequest) String() string { @@ -6376,7 +6198,7 @@ func (*QueryWorkflowInvocationActionsRequest) ProtoMessage() {} func (x *QueryWorkflowInvocationActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6427,11 +6249,9 @@ type QueryWorkflowInvocationActionsResponse struct { func (x *QueryWorkflowInvocationActionsResponse) Reset() { *x = QueryWorkflowInvocationActionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWorkflowInvocationActionsResponse) String() string { @@ -6442,7 +6262,7 @@ func (*QueryWorkflowInvocationActionsResponse) ProtoMessage() {} func (x *QueryWorkflowInvocationActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6497,11 +6317,9 @@ type Repository_GitRemoteSettings struct { func (x *Repository_GitRemoteSettings) Reset() { *x = Repository_GitRemoteSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_GitRemoteSettings) String() string { @@ -6512,7 +6330,7 @@ func (*Repository_GitRemoteSettings) ProtoMessage() {} func (x *Repository_GitRemoteSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6588,11 +6406,9 @@ type Repository_WorkspaceCompilationOverrides struct { func (x *Repository_WorkspaceCompilationOverrides) Reset() { *x = Repository_WorkspaceCompilationOverrides{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_WorkspaceCompilationOverrides) String() string { @@ -6603,7 +6419,7 @@ func (*Repository_WorkspaceCompilationOverrides) ProtoMessage() {} func (x *Repository_WorkspaceCompilationOverrides) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6656,11 +6472,9 @@ type Repository_GitRemoteSettings_SshAuthenticationConfig struct { func (x *Repository_GitRemoteSettings_SshAuthenticationConfig) Reset() { *x = Repository_GitRemoteSettings_SshAuthenticationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_GitRemoteSettings_SshAuthenticationConfig) String() string { @@ -6671,7 +6485,7 @@ func (*Repository_GitRemoteSettings_SshAuthenticationConfig) ProtoMessage() {} func (x *Repository_GitRemoteSettings_SshAuthenticationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6715,11 +6529,9 @@ type CommitRepositoryChangesRequest_FileOperation struct { func (x *CommitRepositoryChangesRequest_FileOperation) Reset() { *x = CommitRepositoryChangesRequest_FileOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRepositoryChangesRequest_FileOperation) String() string { @@ -6730,7 +6542,7 @@ func (*CommitRepositoryChangesRequest_FileOperation) ProtoMessage() {} func (x *CommitRepositoryChangesRequest_FileOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6798,11 +6610,9 @@ type CommitRepositoryChangesRequest_FileOperation_WriteFile struct { func (x *CommitRepositoryChangesRequest_FileOperation_WriteFile) Reset() { *x = CommitRepositoryChangesRequest_FileOperation_WriteFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRepositoryChangesRequest_FileOperation_WriteFile) String() string { @@ -6813,7 +6623,7 @@ func (*CommitRepositoryChangesRequest_FileOperation_WriteFile) ProtoMessage() {} func (x *CommitRepositoryChangesRequest_FileOperation_WriteFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6844,11 +6654,9 @@ type CommitRepositoryChangesRequest_FileOperation_DeleteFile struct { func (x *CommitRepositoryChangesRequest_FileOperation_DeleteFile) Reset() { *x = CommitRepositoryChangesRequest_FileOperation_DeleteFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRepositoryChangesRequest_FileOperation_DeleteFile) String() string { @@ -6859,7 +6667,7 @@ func (*CommitRepositoryChangesRequest_FileOperation_DeleteFile) ProtoMessage() { func (x *CommitRepositoryChangesRequest_FileOperation_DeleteFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6888,11 +6696,9 @@ type FetchFileGitStatusesResponse_UncommittedFileChange struct { func (x *FetchFileGitStatusesResponse_UncommittedFileChange) Reset() { *x = FetchFileGitStatusesResponse_UncommittedFileChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchFileGitStatusesResponse_UncommittedFileChange) String() string { @@ -6903,7 +6709,7 @@ func (*FetchFileGitStatusesResponse_UncommittedFileChange) ProtoMessage() {} func (x *FetchFileGitStatusesResponse_UncommittedFileChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6950,11 +6756,9 @@ type ReleaseConfig_ScheduledReleaseRecord struct { func (x *ReleaseConfig_ScheduledReleaseRecord) Reset() { *x = ReleaseConfig_ScheduledReleaseRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseConfig_ScheduledReleaseRecord) String() string { @@ -6965,7 +6769,7 @@ func (*ReleaseConfig_ScheduledReleaseRecord) ProtoMessage() {} func (x *ReleaseConfig_ScheduledReleaseRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7051,11 +6855,9 @@ type CompilationResult_CompilationError struct { func (x *CompilationResult_CompilationError) Reset() { *x = CompilationResult_CompilationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResult_CompilationError) String() string { @@ -7066,7 +6868,7 @@ func (*CompilationResult_CompilationError) ProtoMessage() {} func (x *CompilationResult_CompilationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7126,11 +6928,9 @@ type RelationDescriptor_ColumnDescriptor struct { func (x *RelationDescriptor_ColumnDescriptor) Reset() { *x = RelationDescriptor_ColumnDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationDescriptor_ColumnDescriptor) String() string { @@ -7141,7 +6941,7 @@ func (*RelationDescriptor_ColumnDescriptor) ProtoMessage() {} func (x *RelationDescriptor_ColumnDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7220,11 +7020,9 @@ type CompilationResultAction_Relation struct { func (x *CompilationResultAction_Relation) Reset() { *x = CompilationResultAction_Relation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Relation) String() string { @@ -7235,7 +7033,7 @@ func (*CompilationResultAction_Relation) ProtoMessage() {} func (x *CompilationResultAction_Relation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7372,11 +7170,9 @@ type CompilationResultAction_Operations struct { func (x *CompilationResultAction_Operations) Reset() { *x = CompilationResultAction_Operations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Operations) String() string { @@ -7387,7 +7183,7 @@ func (*CompilationResultAction_Operations) ProtoMessage() {} func (x *CompilationResultAction_Operations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7470,11 +7266,9 @@ type CompilationResultAction_Assertion struct { func (x *CompilationResultAction_Assertion) Reset() { *x = CompilationResultAction_Assertion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Assertion) String() string { @@ -7485,7 +7279,7 @@ func (*CompilationResultAction_Assertion) ProtoMessage() {} func (x *CompilationResultAction_Assertion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7556,11 +7350,9 @@ type CompilationResultAction_Declaration struct { func (x *CompilationResultAction_Declaration) Reset() { *x = CompilationResultAction_Declaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Declaration) String() string { @@ -7571,7 +7363,7 @@ func (*CompilationResultAction_Declaration) ProtoMessage() {} func (x *CompilationResultAction_Declaration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7623,11 +7415,9 @@ type CompilationResultAction_Relation_IncrementalTableConfig struct { func (x *CompilationResultAction_Relation_IncrementalTableConfig) Reset() { *x = CompilationResultAction_Relation_IncrementalTableConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompilationResultAction_Relation_IncrementalTableConfig) String() string { @@ -7638,7 +7428,7 @@ func (*CompilationResultAction_Relation_IncrementalTableConfig) ProtoMessage() { func (x *CompilationResultAction_Relation_IncrementalTableConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7713,11 +7503,9 @@ type WorkflowConfig_ScheduledExecutionRecord struct { func (x *WorkflowConfig_ScheduledExecutionRecord) Reset() { *x = WorkflowConfig_ScheduledExecutionRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowConfig_ScheduledExecutionRecord) String() string { @@ -7728,7 +7516,7 @@ func (*WorkflowConfig_ScheduledExecutionRecord) ProtoMessage() {} func (x *WorkflowConfig_ScheduledExecutionRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7806,11 +7594,9 @@ type WorkflowInvocationAction_BigQueryAction struct { func (x *WorkflowInvocationAction_BigQueryAction) Reset() { *x = WorkflowInvocationAction_BigQueryAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowInvocationAction_BigQueryAction) String() string { @@ -7821,7 +7607,7 @@ func (*WorkflowInvocationAction_BigQueryAction) ProtoMessage() {} func (x *WorkflowInvocationAction_BigQueryAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10376,1292 +10162,6 @@ func file_google_cloud_dataform_v1beta1_dataform_proto_init() { if File_google_cloud_dataform_v1beta1_dataform_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CommitRepositoryChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReadRepositoryFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ReadRepositoryFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*QueryRepositoryDirectoryContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*QueryRepositoryDirectoryContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FetchRepositoryHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FetchRepositoryHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CommitLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CommitMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ComputeRepositoryAccessTokenStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ComputeRepositoryAccessTokenStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FetchRemoteBranchesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FetchRemoteBranchesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Workspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkspacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CommitAuthor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*PullGitCommitsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*PushGitCommitsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitAheadBehindRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitAheadBehindResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CommitWorkspaceChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ResetWorkspaceChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileDiffRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileDiffResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*QueryDirectoryContentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*QueryDirectoryContentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DirectoryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*MakeDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*MakeDirectoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*MoveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*MoveDirectoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ReadFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ReadFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*MoveFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*MoveFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*WriteFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*WriteFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*InstallNpmPackagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*InstallNpmPackagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ListReleaseConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ListReleaseConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*GetReleaseConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*CreateReleaseConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReleaseConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReleaseConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*CodeCompilationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*ListCompilationResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ListCompilationResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*GetCompilationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*CreateCompilationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*RelationDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*QueryCompilationResultActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*QueryCompilationResultActionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*InvocationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkflowConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowInvocationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowInvocationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*CancelWorkflowInvocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*QueryWorkflowInvocationActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*QueryWorkflowInvocationActionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*Repository_GitRemoteSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*Repository_WorkspaceCompilationOverrides); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*Repository_GitRemoteSettings_SshAuthenticationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*CommitRepositoryChangesRequest_FileOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*CommitRepositoryChangesRequest_FileOperation_WriteFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*CommitRepositoryChangesRequest_FileOperation_DeleteFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*FetchFileGitStatusesResponse_UncommittedFileChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseConfig_ScheduledReleaseRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResult_CompilationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*RelationDescriptor_ColumnDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Relation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Operations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Assertion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Declaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*CompilationResultAction_Relation_IncrementalTableConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowConfig_ScheduledExecutionRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowInvocationAction_BigQueryAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataform_v1beta1_dataform_proto_msgTypes[39].OneofWrappers = []any{ (*DirectoryEntry_File)(nil), (*DirectoryEntry_Directory)(nil), diff --git a/dataform/apiv1beta1/helpers.go b/dataform/apiv1beta1/helpers.go index 377a0624d268..7a5a24336743 100755 --- a/dataform/apiv1beta1/helpers.go +++ b/dataform/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package dataform import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataform.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datafusion/apiv1/data_fusion_client.go b/datafusion/apiv1/data_fusion_client.go index fb1015ab1239..a3a668fd2fa7 100755 --- a/datafusion/apiv1/data_fusion_client.go +++ b/datafusion/apiv1/data_fusion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -263,6 +262,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data fusion client based on gRPC. @@ -291,6 +292,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datafusionpb.NewDataFusionClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -353,6 +355,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data fusion rest client. @@ -372,6 +376,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -445,7 +450,7 @@ func (c *gRPCClient) ListAvailableVersions(ctx context.Context, req *datafusionp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAvailableVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAvailableVersions, req, settings.GRPC, c.logger, "ListAvailableVersions") return err }, opts...) if err != nil { @@ -491,7 +496,7 @@ func (c *gRPCClient) ListInstances(ctx context.Context, req *datafusionpb.ListIn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *gRPCClient) GetInstance(ctx context.Context, req *datafusionpb.GetInsta var resp *datafusionpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *gRPCClient) CreateInstance(ctx context.Context, req *datafusionpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) DeleteInstance(ctx context.Context, req *datafusionpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *gRPCClient) UpdateInstance(ctx context.Context, req *datafusionpb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *gRPCClient) RestartInstance(ctx context.Context, req *datafusionpb.Rest var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestartInstance, req, settings.GRPC, c.logger, "RestartInstance") return err }, opts...) if err != nil { @@ -664,21 +669,10 @@ func (c *restClient) ListAvailableVersions(ctx context.Context, req *datafusionp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAvailableVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -759,21 +753,10 @@ func (c *restClient) ListInstances(ctx context.Context, req *datafusionpb.ListIn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -836,17 +819,7 @@ func (c *restClient) GetInstance(ctx context.Context, req *datafusionpb.GetInsta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -903,21 +876,10 @@ func (c *restClient) CreateInstance(ctx context.Context, req *datafusionpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -967,21 +929,10 @@ func (c *restClient) DeleteInstance(ctx context.Context, req *datafusionpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1045,21 +996,10 @@ func (c *restClient) UpdateInstance(ctx context.Context, req *datafusionpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1116,21 +1056,10 @@ func (c *restClient) RestartInstance(ctx context.Context, req *datafusionpb.Rest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestartInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datafusion/apiv1/data_fusion_client_example_go123_test.go b/datafusion/apiv1/data_fusion_client_example_go123_test.go index fc96e6f8a63b..7ba449d1692c 100644 --- a/datafusion/apiv1/data_fusion_client_example_go123_test.go +++ b/datafusion/apiv1/data_fusion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAvailableVersions_all() { } for resp, err := range c.ListAvailableVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datafusion/apiv1/datafusionpb/datafusion.pb.go b/datafusion/apiv1/datafusionpb/datafusion.pb.go index 771be6d1d0c8..e21d63ac4183 100755 --- a/datafusion/apiv1/datafusionpb/datafusion.pb.go +++ b/datafusion/apiv1/datafusionpb/datafusion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datafusion/v1/datafusion.proto @@ -440,11 +440,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -455,7 +453,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +501,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -518,7 +514,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +571,9 @@ type Accelerator struct { func (x *Accelerator) Reset() { *x = Accelerator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Accelerator) String() string { @@ -590,7 +584,7 @@ func (*Accelerator) ProtoMessage() {} func (x *Accelerator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +628,9 @@ type CryptoKeyConfig struct { func (x *CryptoKeyConfig) Reset() { *x = CryptoKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKeyConfig) String() string { @@ -649,7 +641,7 @@ func (*CryptoKeyConfig) ProtoMessage() {} func (x *CryptoKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +746,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -769,7 +759,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +995,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1020,7 +1008,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,11 +1075,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1102,7 +1088,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,11 +1146,9 @@ type ListAvailableVersionsRequest struct { func (x *ListAvailableVersionsRequest) Reset() { *x = ListAvailableVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableVersionsRequest) String() string { @@ -1175,7 +1159,7 @@ func (*ListAvailableVersionsRequest) ProtoMessage() {} func (x *ListAvailableVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1217,9 @@ type ListAvailableVersionsResponse struct { func (x *ListAvailableVersionsResponse) Reset() { *x = ListAvailableVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAvailableVersionsResponse) String() string { @@ -1248,7 +1230,7 @@ func (*ListAvailableVersionsResponse) ProtoMessage() {} func (x *ListAvailableVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1272,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1305,7 +1285,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1324,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1359,7 +1337,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1408,11 +1386,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1423,7 +1399,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1468,11 +1444,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1483,7 +1457,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1525,11 +1499,9 @@ type RestartInstanceRequest struct { func (x *RestartInstanceRequest) Reset() { *x = RestartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestartInstanceRequest) String() string { @@ -1540,7 +1512,7 @@ func (*RestartInstanceRequest) ProtoMessage() {} func (x *RestartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,11 +1566,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1609,7 +1579,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2211,188 +2181,6 @@ func file_google_cloud_datafusion_v1_datafusion_proto_init() { if File_google_cloud_datafusion_v1_datafusion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Accelerator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListAvailableVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RestartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datafusion_v1_datafusion_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datafusion/apiv1/helpers.go b/datafusion/apiv1/helpers.go index c1758e34e009..023111294992 100755 --- a/datafusion/apiv1/helpers.go +++ b/datafusion/apiv1/helpers.go @@ -18,10 +18,20 @@ package datafusion import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datafusion.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datalabeling/apiv1beta1/data_labeling_client.go b/datalabeling/apiv1beta1/data_labeling_client.go index f91e98f44f2d..a6d2ad8429b4 100755 --- a/datalabeling/apiv1beta1/data_labeling_client.go +++ b/datalabeling/apiv1beta1/data_labeling_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1040,6 +1039,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data labeling service client based on gRPC. @@ -1066,6 +1067,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datalabelingpb.NewDataLabelingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1128,6 +1130,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data labeling service rest client. @@ -1145,6 +1149,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1207,7 +1212,7 @@ func (c *gRPCClient) CreateDataset(ctx context.Context, req *datalabelingpb.Crea var resp *datalabelingpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -1225,7 +1230,7 @@ func (c *gRPCClient) GetDataset(ctx context.Context, req *datalabelingpb.GetData var resp *datalabelingpb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -1254,7 +1259,7 @@ func (c *gRPCClient) ListDatasets(ctx context.Context, req *datalabelingpb.ListD } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *gRPCClient) DeleteDataset(ctx context.Context, req *datalabelingpb.Dele opts = append((*c.CallOptions).DeleteDataset[0:len((*c.CallOptions).DeleteDataset):len((*c.CallOptions).DeleteDataset)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDataset(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) return err @@ -1303,7 +1308,7 @@ func (c *gRPCClient) ImportData(ctx context.Context, req *datalabelingpb.ImportD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -1323,7 +1328,7 @@ func (c *gRPCClient) ExportData(ctx context.Context, req *datalabelingpb.ExportD var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -1343,7 +1348,7 @@ func (c *gRPCClient) GetDataItem(ctx context.Context, req *datalabelingpb.GetDat var resp *datalabelingpb.DataItem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataItem, req, settings.GRPC, c.logger, "GetDataItem") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *gRPCClient) ListDataItems(ctx context.Context, req *datalabelingpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDataItems, req, settings.GRPC, c.logger, "ListDataItems") return err }, opts...) if err != nil { @@ -1407,7 +1412,7 @@ func (c *gRPCClient) GetAnnotatedDataset(ctx context.Context, req *datalabelingp var resp *datalabelingpb.AnnotatedDataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnnotatedDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnnotatedDataset, req, settings.GRPC, c.logger, "GetAnnotatedDataset") return err }, opts...) if err != nil { @@ -1436,7 +1441,7 @@ func (c *gRPCClient) ListAnnotatedDatasets(ctx context.Context, req *datalabelin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAnnotatedDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAnnotatedDatasets, req, settings.GRPC, c.logger, "ListAnnotatedDatasets") return err }, opts...) if err != nil { @@ -1470,7 +1475,7 @@ func (c *gRPCClient) DeleteAnnotatedDataset(ctx context.Context, req *datalabeli opts = append((*c.CallOptions).DeleteAnnotatedDataset[0:len((*c.CallOptions).DeleteAnnotatedDataset):len((*c.CallOptions).DeleteAnnotatedDataset)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAnnotatedDataset(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAnnotatedDataset, req, settings.GRPC, c.logger, "DeleteAnnotatedDataset") return err }, opts...) return err @@ -1485,7 +1490,7 @@ func (c *gRPCClient) LabelImage(ctx context.Context, req *datalabelingpb.LabelIm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LabelImage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LabelImage, req, settings.GRPC, c.logger, "LabelImage") return err }, opts...) if err != nil { @@ -1505,7 +1510,7 @@ func (c *gRPCClient) LabelVideo(ctx context.Context, req *datalabelingpb.LabelVi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LabelVideo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LabelVideo, req, settings.GRPC, c.logger, "LabelVideo") return err }, opts...) if err != nil { @@ -1525,7 +1530,7 @@ func (c *gRPCClient) LabelText(ctx context.Context, req *datalabelingpb.LabelTex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LabelText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LabelText, req, settings.GRPC, c.logger, "LabelText") return err }, opts...) if err != nil { @@ -1545,7 +1550,7 @@ func (c *gRPCClient) GetExample(ctx context.Context, req *datalabelingpb.GetExam var resp *datalabelingpb.Example err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetExample(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetExample, req, settings.GRPC, c.logger, "GetExample") return err }, opts...) if err != nil { @@ -1574,7 +1579,7 @@ func (c *gRPCClient) ListExamples(ctx context.Context, req *datalabelingpb.ListE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListExamples(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListExamples, req, settings.GRPC, c.logger, "ListExamples") return err }, opts...) if err != nil { @@ -1609,7 +1614,7 @@ func (c *gRPCClient) CreateAnnotationSpecSet(ctx context.Context, req *datalabel var resp *datalabelingpb.AnnotationSpecSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAnnotationSpecSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAnnotationSpecSet, req, settings.GRPC, c.logger, "CreateAnnotationSpecSet") return err }, opts...) if err != nil { @@ -1627,7 +1632,7 @@ func (c *gRPCClient) GetAnnotationSpecSet(ctx context.Context, req *datalabeling var resp *datalabelingpb.AnnotationSpecSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnnotationSpecSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnnotationSpecSet, req, settings.GRPC, c.logger, "GetAnnotationSpecSet") return err }, opts...) if err != nil { @@ -1656,7 +1661,7 @@ func (c *gRPCClient) ListAnnotationSpecSets(ctx context.Context, req *datalabeli } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAnnotationSpecSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAnnotationSpecSets, req, settings.GRPC, c.logger, "ListAnnotationSpecSets") return err }, opts...) if err != nil { @@ -1690,7 +1695,7 @@ func (c *gRPCClient) DeleteAnnotationSpecSet(ctx context.Context, req *datalabel opts = append((*c.CallOptions).DeleteAnnotationSpecSet[0:len((*c.CallOptions).DeleteAnnotationSpecSet):len((*c.CallOptions).DeleteAnnotationSpecSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAnnotationSpecSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAnnotationSpecSet, req, settings.GRPC, c.logger, "DeleteAnnotationSpecSet") return err }, opts...) return err @@ -1705,7 +1710,7 @@ func (c *gRPCClient) CreateInstruction(ctx context.Context, req *datalabelingpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInstruction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInstruction, req, settings.GRPC, c.logger, "CreateInstruction") return err }, opts...) if err != nil { @@ -1725,7 +1730,7 @@ func (c *gRPCClient) GetInstruction(ctx context.Context, req *datalabelingpb.Get var resp *datalabelingpb.Instruction err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstruction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstruction, req, settings.GRPC, c.logger, "GetInstruction") return err }, opts...) if err != nil { @@ -1754,7 +1759,7 @@ func (c *gRPCClient) ListInstructions(ctx context.Context, req *datalabelingpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstructions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstructions, req, settings.GRPC, c.logger, "ListInstructions") return err }, opts...) if err != nil { @@ -1788,7 +1793,7 @@ func (c *gRPCClient) DeleteInstruction(ctx context.Context, req *datalabelingpb. opts = append((*c.CallOptions).DeleteInstruction[0:len((*c.CallOptions).DeleteInstruction):len((*c.CallOptions).DeleteInstruction)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteInstruction(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteInstruction, req, settings.GRPC, c.logger, "DeleteInstruction") return err }, opts...) return err @@ -1803,7 +1808,7 @@ func (c *gRPCClient) GetEvaluation(ctx context.Context, req *datalabelingpb.GetE var resp *datalabelingpb.Evaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEvaluation, req, settings.GRPC, c.logger, "GetEvaluation") return err }, opts...) if err != nil { @@ -1832,7 +1837,7 @@ func (c *gRPCClient) SearchEvaluations(ctx context.Context, req *datalabelingpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchEvaluations, req, settings.GRPC, c.logger, "SearchEvaluations") return err }, opts...) if err != nil { @@ -1878,7 +1883,7 @@ func (c *gRPCClient) SearchExampleComparisons(ctx context.Context, req *datalabe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchExampleComparisons(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchExampleComparisons, req, settings.GRPC, c.logger, "SearchExampleComparisons") return err }, opts...) if err != nil { @@ -1913,7 +1918,7 @@ func (c *gRPCClient) CreateEvaluationJob(ctx context.Context, req *datalabelingp var resp *datalabelingpb.EvaluationJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEvaluationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEvaluationJob, req, settings.GRPC, c.logger, "CreateEvaluationJob") return err }, opts...) if err != nil { @@ -1931,7 +1936,7 @@ func (c *gRPCClient) UpdateEvaluationJob(ctx context.Context, req *datalabelingp var resp *datalabelingpb.EvaluationJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEvaluationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEvaluationJob, req, settings.GRPC, c.logger, "UpdateEvaluationJob") return err }, opts...) if err != nil { @@ -1949,7 +1954,7 @@ func (c *gRPCClient) GetEvaluationJob(ctx context.Context, req *datalabelingpb.G var resp *datalabelingpb.EvaluationJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEvaluationJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEvaluationJob, req, settings.GRPC, c.logger, "GetEvaluationJob") return err }, opts...) if err != nil { @@ -1966,7 +1971,7 @@ func (c *gRPCClient) PauseEvaluationJob(ctx context.Context, req *datalabelingpb opts = append((*c.CallOptions).PauseEvaluationJob[0:len((*c.CallOptions).PauseEvaluationJob):len((*c.CallOptions).PauseEvaluationJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PauseEvaluationJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PauseEvaluationJob, req, settings.GRPC, c.logger, "PauseEvaluationJob") return err }, opts...) return err @@ -1980,7 +1985,7 @@ func (c *gRPCClient) ResumeEvaluationJob(ctx context.Context, req *datalabelingp opts = append((*c.CallOptions).ResumeEvaluationJob[0:len((*c.CallOptions).ResumeEvaluationJob):len((*c.CallOptions).ResumeEvaluationJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.ResumeEvaluationJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.ResumeEvaluationJob, req, settings.GRPC, c.logger, "ResumeEvaluationJob") return err }, opts...) return err @@ -1994,7 +1999,7 @@ func (c *gRPCClient) DeleteEvaluationJob(ctx context.Context, req *datalabelingp opts = append((*c.CallOptions).DeleteEvaluationJob[0:len((*c.CallOptions).DeleteEvaluationJob):len((*c.CallOptions).DeleteEvaluationJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEvaluationJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEvaluationJob, req, settings.GRPC, c.logger, "DeleteEvaluationJob") return err }, opts...) return err @@ -2020,7 +2025,7 @@ func (c *gRPCClient) ListEvaluationJobs(ctx context.Context, req *datalabelingpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEvaluationJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEvaluationJobs, req, settings.GRPC, c.logger, "ListEvaluationJobs") return err }, opts...) if err != nil { @@ -2085,17 +2090,7 @@ func (c *restClient) CreateDataset(ctx context.Context, req *datalabelingpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataset") if err != nil { return err } @@ -2145,17 +2140,7 @@ func (c *restClient) GetDataset(ctx context.Context, req *datalabelingpb.GetData httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataset") if err != nil { return err } @@ -2220,21 +2205,10 @@ func (c *restClient) ListDatasets(ctx context.Context, req *datalabelingpb.ListD } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2294,15 +2268,8 @@ func (c *restClient) DeleteDataset(ctx context.Context, req *datalabelingpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataset") + return err }, opts...) } @@ -2348,21 +2315,10 @@ func (c *restClient) ImportData(ctx context.Context, req *datalabelingpb.ImportD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2418,21 +2374,10 @@ func (c *restClient) ExportData(ctx context.Context, req *datalabelingpb.ExportD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2484,17 +2429,7 @@ func (c *restClient) GetDataItem(ctx context.Context, req *datalabelingpb.GetDat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataItem") if err != nil { return err } @@ -2560,21 +2495,10 @@ func (c *restClient) ListDataItems(ctx context.Context, req *datalabelingpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataItems") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2637,17 +2561,7 @@ func (c *restClient) GetAnnotatedDataset(ctx context.Context, req *datalabelingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotatedDataset") if err != nil { return err } @@ -2712,21 +2626,10 @@ func (c *restClient) ListAnnotatedDatasets(ctx context.Context, req *datalabelin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnnotatedDatasets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2786,15 +2689,8 @@ func (c *restClient) DeleteAnnotatedDataset(ctx context.Context, req *datalabeli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnnotatedDataset") + return err }, opts...) } @@ -2837,21 +2733,10 @@ func (c *restClient) LabelImage(ctx context.Context, req *datalabelingpb.LabelIm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LabelImage") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2908,21 +2793,10 @@ func (c *restClient) LabelVideo(ctx context.Context, req *datalabelingpb.LabelVi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LabelVideo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2979,21 +2853,10 @@ func (c *restClient) LabelText(ctx context.Context, req *datalabelingpb.LabelTex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LabelText") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3047,17 +2910,7 @@ func (c *restClient) GetExample(ctx context.Context, req *datalabelingpb.GetExam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExample") if err != nil { return err } @@ -3122,21 +2975,10 @@ func (c *restClient) ListExamples(ctx context.Context, req *datalabelingpb.ListE } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExamples") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3205,17 +3047,7 @@ func (c *restClient) CreateAnnotationSpecSet(ctx context.Context, req *datalabel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnnotationSpecSet") if err != nil { return err } @@ -3265,17 +3097,7 @@ func (c *restClient) GetAnnotationSpecSet(ctx context.Context, req *datalabeling httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotationSpecSet") if err != nil { return err } @@ -3340,21 +3162,10 @@ func (c *restClient) ListAnnotationSpecSets(ctx context.Context, req *datalabeli } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnnotationSpecSets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3414,15 +3225,8 @@ func (c *restClient) DeleteAnnotationSpecSet(ctx context.Context, req *datalabel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnnotationSpecSet") + return err }, opts...) } @@ -3464,21 +3268,10 @@ func (c *restClient) CreateInstruction(ctx context.Context, req *datalabelingpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstruction") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3529,17 +3322,7 @@ func (c *restClient) GetInstruction(ctx context.Context, req *datalabelingpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstruction") if err != nil { return err } @@ -3604,21 +3387,10 @@ func (c *restClient) ListInstructions(ctx context.Context, req *datalabelingpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstructions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3678,15 +3450,8 @@ func (c *restClient) DeleteInstruction(ctx context.Context, req *datalabelingpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstruction") + return err }, opts...) } @@ -3724,17 +3489,7 @@ func (c *restClient) GetEvaluation(ctx context.Context, req *datalabelingpb.GetE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluation") if err != nil { return err } @@ -3799,21 +3554,10 @@ func (c *restClient) SearchEvaluations(ctx context.Context, req *datalabelingpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchEvaluations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3890,21 +3634,10 @@ func (c *restClient) SearchExampleComparisons(ctx context.Context, req *datalabe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchExampleComparisons") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3973,17 +3706,7 @@ func (c *restClient) CreateEvaluationJob(ctx context.Context, req *datalabelingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEvaluationJob") if err != nil { return err } @@ -4052,17 +3775,7 @@ func (c *restClient) UpdateEvaluationJob(ctx context.Context, req *datalabelingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEvaluationJob") if err != nil { return err } @@ -4112,17 +3825,7 @@ func (c *restClient) GetEvaluationJob(ctx context.Context, req *datalabelingpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluationJob") if err != nil { return err } @@ -4176,15 +3879,8 @@ func (c *restClient) PauseEvaluationJob(ctx context.Context, req *datalabelingpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseEvaluationJob") + return err }, opts...) } @@ -4225,15 +3921,8 @@ func (c *restClient) ResumeEvaluationJob(ctx context.Context, req *datalabelingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeEvaluationJob") + return err }, opts...) } @@ -4267,15 +3956,8 @@ func (c *restClient) DeleteEvaluationJob(ctx context.Context, req *datalabelingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEvaluationJob") + return err }, opts...) } @@ -4328,21 +4010,10 @@ func (c *restClient) ListEvaluationJobs(ctx context.Context, req *datalabelingpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluationJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datalabeling/apiv1beta1/data_labeling_client_example_go123_test.go b/datalabeling/apiv1beta1/data_labeling_client_example_go123_test.go index a97fa8ddb8c3..c6df2c388426 100644 --- a/datalabeling/apiv1beta1/data_labeling_client_example_go123_test.go +++ b/datalabeling/apiv1beta1/data_labeling_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAnnotatedDatasets_all() { } for resp, err := range c.ListAnnotatedDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListAnnotationSpecSets_all() { } for resp, err := range c.ListAnnotationSpecSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListDataItems_all() { } for resp, err := range c.ListDataItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListEvaluationJobs_all() { } for resp, err := range c.ListEvaluationJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_ListExamples_all() { } for resp, err := range c.ListExamples(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -200,7 +200,7 @@ func ExampleClient_ListInstructions_all() { } for resp, err := range c.ListInstructions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -226,7 +226,7 @@ func ExampleClient_SearchEvaluations_all() { } for resp, err := range c.SearchEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -252,7 +252,7 @@ func ExampleClient_SearchExampleComparisons_all() { } for resp, err := range c.SearchExampleComparisons(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go b/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go index 45e25e2ce4e0..6bb8a92bbf6c 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/annotation.proto @@ -260,11 +260,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -275,7 +273,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +345,9 @@ type AnnotationValue struct { func (x *AnnotationValue) Reset() { *x = AnnotationValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationValue) String() string { @@ -362,7 +358,7 @@ func (*AnnotationValue) ProtoMessage() {} func (x *AnnotationValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +526,9 @@ type ImageClassificationAnnotation struct { func (x *ImageClassificationAnnotation) Reset() { *x = ImageClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationAnnotation) String() string { @@ -545,7 +539,7 @@ func (*ImageClassificationAnnotation) ProtoMessage() {} func (x *ImageClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +576,9 @@ type Vertex struct { func (x *Vertex) Reset() { *x = Vertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vertex) String() string { @@ -597,7 +589,7 @@ func (*Vertex) ProtoMessage() {} func (x *Vertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +634,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -657,7 +647,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +688,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -713,7 +701,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +735,9 @@ type NormalizedBoundingPoly struct { func (x *NormalizedBoundingPoly) Reset() { *x = NormalizedBoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingPoly) String() string { @@ -762,7 +748,7 @@ func (*NormalizedBoundingPoly) ProtoMessage() {} func (x *NormalizedBoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +791,9 @@ type ImageBoundingPolyAnnotation struct { func (x *ImageBoundingPolyAnnotation) Reset() { *x = ImageBoundingPolyAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageBoundingPolyAnnotation) String() string { @@ -820,7 +804,7 @@ func (*ImageBoundingPolyAnnotation) ProtoMessage() {} func (x *ImageBoundingPolyAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +876,9 @@ type Polyline struct { func (x *Polyline) Reset() { *x = Polyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Polyline) String() string { @@ -907,7 +889,7 @@ func (*Polyline) ProtoMessage() {} func (x *Polyline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +923,9 @@ type NormalizedPolyline struct { func (x *NormalizedPolyline) Reset() { *x = NormalizedPolyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedPolyline) String() string { @@ -956,7 +936,7 @@ func (*NormalizedPolyline) ProtoMessage() {} func (x *NormalizedPolyline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +975,9 @@ type ImagePolylineAnnotation struct { func (x *ImagePolylineAnnotation) Reset() { *x = ImagePolylineAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImagePolylineAnnotation) String() string { @@ -1010,7 +988,7 @@ func (*ImagePolylineAnnotation) ProtoMessage() {} func (x *ImagePolylineAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,11 +1065,9 @@ type ImageSegmentationAnnotation struct { func (x *ImageSegmentationAnnotation) Reset() { *x = ImageSegmentationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageSegmentationAnnotation) String() string { @@ -1102,7 +1078,7 @@ func (*ImageSegmentationAnnotation) ProtoMessage() {} func (x *ImageSegmentationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1126,9 @@ type TextClassificationAnnotation struct { func (x *TextClassificationAnnotation) Reset() { *x = TextClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationAnnotation) String() string { @@ -1165,7 +1139,7 @@ func (*TextClassificationAnnotation) ProtoMessage() {} func (x *TextClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1175,9 @@ type TextEntityExtractionAnnotation struct { func (x *TextEntityExtractionAnnotation) Reset() { *x = TextEntityExtractionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextEntityExtractionAnnotation) String() string { @@ -1216,7 +1188,7 @@ func (*TextEntityExtractionAnnotation) ProtoMessage() {} func (x *TextEntityExtractionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1231,9 @@ type SequentialSegment struct { func (x *SequentialSegment) Reset() { *x = SequentialSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SequentialSegment) String() string { @@ -1274,7 +1244,7 @@ func (*SequentialSegment) ProtoMessage() {} func (x *SequentialSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1289,9 @@ type TimeSegment struct { func (x *TimeSegment) Reset() { *x = TimeSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSegment) String() string { @@ -1334,7 +1302,7 @@ func (*TimeSegment) ProtoMessage() {} func (x *TimeSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1345,9 @@ type VideoClassificationAnnotation struct { func (x *VideoClassificationAnnotation) Reset() { *x = VideoClassificationAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationAnnotation) String() string { @@ -1392,7 +1358,7 @@ func (*VideoClassificationAnnotation) ProtoMessage() {} func (x *VideoClassificationAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1440,11 +1406,9 @@ type ObjectTrackingFrame struct { func (x *ObjectTrackingFrame) Reset() { *x = ObjectTrackingFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingFrame) String() string { @@ -1455,7 +1419,7 @@ func (*ObjectTrackingFrame) ProtoMessage() {} func (x *ObjectTrackingFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1530,11 +1494,9 @@ type VideoObjectTrackingAnnotation struct { func (x *VideoObjectTrackingAnnotation) Reset() { *x = VideoObjectTrackingAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingAnnotation) String() string { @@ -1545,7 +1507,7 @@ func (*VideoObjectTrackingAnnotation) ProtoMessage() {} func (x *VideoObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1595,11 +1557,9 @@ type VideoEventAnnotation struct { func (x *VideoEventAnnotation) Reset() { *x = VideoEventAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoEventAnnotation) String() string { @@ -1610,7 +1570,7 @@ func (*VideoEventAnnotation) ProtoMessage() {} func (x *VideoEventAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1651,11 +1611,9 @@ type AnnotationMetadata struct { func (x *AnnotationMetadata) Reset() { *x = AnnotationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationMetadata) String() string { @@ -1666,7 +1624,7 @@ func (*AnnotationMetadata) ProtoMessage() {} func (x *AnnotationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1708,11 +1666,9 @@ type OperatorMetadata struct { func (x *OperatorMetadata) Reset() { *x = OperatorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperatorMetadata) String() string { @@ -1723,7 +1679,7 @@ func (*OperatorMetadata) ProtoMessage() {} func (x *OperatorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,272 +2220,6 @@ func file_google_cloud_datalabeling_v1beta1_annotation_proto_init() { return } file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Vertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImageBoundingPolyAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Polyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedPolyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImagePolylineAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImageSegmentationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TextEntityExtractionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SequentialSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*TimeSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*VideoEventAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OperatorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1].OneofWrappers = []any{ (*AnnotationValue_ImageClassificationAnnotation)(nil), (*AnnotationValue_ImageBoundingPolyAnnotation)(nil), diff --git a/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go b/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go index 1663486a6fb0..7794a415296d 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto @@ -65,11 +65,9 @@ type AnnotationSpecSet struct { func (x *AnnotationSpecSet) Reset() { *x = AnnotationSpecSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpecSet) String() string { @@ -80,7 +78,7 @@ func (*AnnotationSpecSet) ProtoMessage() {} func (x *AnnotationSpecSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type AnnotationSpec struct { func (x *AnnotationSpec) Reset() { *x = AnnotationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationSpec) String() string { @@ -163,7 +159,7 @@ func (*AnnotationSpec) ProtoMessage() {} func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,32 +275,6 @@ func file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() { if File_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpecSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go b/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go index 810ce6cd1e04..bbb4be01e281 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto @@ -243,11 +243,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -258,7 +256,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +298,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -315,7 +311,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +357,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -376,7 +370,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +427,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -448,7 +440,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +482,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -505,7 +495,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +535,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -560,7 +548,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +610,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -637,7 +623,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,11 +686,9 @@ type GetDataItemRequest struct { func (x *GetDataItemRequest) Reset() { *x = GetDataItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataItemRequest) String() string { @@ -715,7 +699,7 @@ func (*GetDataItemRequest) ProtoMessage() {} func (x *GetDataItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +745,9 @@ type ListDataItemsRequest struct { func (x *ListDataItemsRequest) Reset() { *x = ListDataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsRequest) String() string { @@ -776,7 +758,7 @@ func (*ListDataItemsRequest) ProtoMessage() {} func (x *ListDataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +815,9 @@ type ListDataItemsResponse struct { func (x *ListDataItemsResponse) Reset() { *x = ListDataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataItemsResponse) String() string { @@ -848,7 +828,7 @@ func (*ListDataItemsResponse) ProtoMessage() {} func (x *ListDataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +871,9 @@ type GetAnnotatedDatasetRequest struct { func (x *GetAnnotatedDatasetRequest) Reset() { *x = GetAnnotatedDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotatedDatasetRequest) String() string { @@ -906,7 +884,7 @@ func (*GetAnnotatedDatasetRequest) ProtoMessage() {} func (x *GetAnnotatedDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +930,9 @@ type ListAnnotatedDatasetsRequest struct { func (x *ListAnnotatedDatasetsRequest) Reset() { *x = ListAnnotatedDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotatedDatasetsRequest) String() string { @@ -967,7 +943,7 @@ func (*ListAnnotatedDatasetsRequest) ProtoMessage() {} func (x *ListAnnotatedDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +1000,9 @@ type ListAnnotatedDatasetsResponse struct { func (x *ListAnnotatedDatasetsResponse) Reset() { *x = ListAnnotatedDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotatedDatasetsResponse) String() string { @@ -1039,7 +1013,7 @@ func (*ListAnnotatedDatasetsResponse) ProtoMessage() {} func (x *ListAnnotatedDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,11 +1056,9 @@ type DeleteAnnotatedDatasetRequest struct { func (x *DeleteAnnotatedDatasetRequest) Reset() { *x = DeleteAnnotatedDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnnotatedDatasetRequest) String() string { @@ -1097,7 +1069,7 @@ func (*DeleteAnnotatedDatasetRequest) ProtoMessage() {} func (x *DeleteAnnotatedDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1118,9 @@ type LabelImageRequest struct { func (x *LabelImageRequest) Reset() { *x = LabelImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageRequest) String() string { @@ -1161,7 +1131,7 @@ func (*LabelImageRequest) ProtoMessage() {} func (x *LabelImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,11 +1269,9 @@ type LabelVideoRequest struct { func (x *LabelVideoRequest) Reset() { *x = LabelVideoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelVideoRequest) String() string { @@ -1314,7 +1282,7 @@ func (*LabelVideoRequest) ProtoMessage() {} func (x *LabelVideoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1450,11 +1418,9 @@ type LabelTextRequest struct { func (x *LabelTextRequest) Reset() { *x = LabelTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelTextRequest) String() string { @@ -1465,7 +1431,7 @@ func (*LabelTextRequest) ProtoMessage() {} func (x *LabelTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1562,11 +1528,9 @@ type GetExampleRequest struct { func (x *GetExampleRequest) Reset() { *x = GetExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExampleRequest) String() string { @@ -1577,7 +1541,7 @@ func (*GetExampleRequest) ProtoMessage() {} func (x *GetExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1632,11 +1596,9 @@ type ListExamplesRequest struct { func (x *ListExamplesRequest) Reset() { *x = ListExamplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesRequest) String() string { @@ -1647,7 +1609,7 @@ func (*ListExamplesRequest) ProtoMessage() {} func (x *ListExamplesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,11 +1666,9 @@ type ListExamplesResponse struct { func (x *ListExamplesResponse) Reset() { *x = ListExamplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesResponse) String() string { @@ -1719,7 +1679,7 @@ func (*ListExamplesResponse) ProtoMessage() {} func (x *ListExamplesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,11 +1725,9 @@ type CreateAnnotationSpecSetRequest struct { func (x *CreateAnnotationSpecSetRequest) Reset() { *x = CreateAnnotationSpecSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnnotationSpecSetRequest) String() string { @@ -1780,7 +1738,7 @@ func (*CreateAnnotationSpecSetRequest) ProtoMessage() {} func (x *CreateAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1780,9 @@ type GetAnnotationSpecSetRequest struct { func (x *GetAnnotationSpecSetRequest) Reset() { *x = GetAnnotationSpecSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationSpecSetRequest) String() string { @@ -1837,7 +1793,7 @@ func (*GetAnnotationSpecSetRequest) ProtoMessage() {} func (x *GetAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1883,11 +1839,9 @@ type ListAnnotationSpecSetsRequest struct { func (x *ListAnnotationSpecSetsRequest) Reset() { *x = ListAnnotationSpecSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationSpecSetsRequest) String() string { @@ -1898,7 +1852,7 @@ func (*ListAnnotationSpecSetsRequest) ProtoMessage() {} func (x *ListAnnotationSpecSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1909,9 @@ type ListAnnotationSpecSetsResponse struct { func (x *ListAnnotationSpecSetsResponse) Reset() { *x = ListAnnotationSpecSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationSpecSetsResponse) String() string { @@ -1970,7 +1922,7 @@ func (*ListAnnotationSpecSetsResponse) ProtoMessage() {} func (x *ListAnnotationSpecSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2012,11 +1964,9 @@ type DeleteAnnotationSpecSetRequest struct { func (x *DeleteAnnotationSpecSetRequest) Reset() { *x = DeleteAnnotationSpecSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnnotationSpecSetRequest) String() string { @@ -2027,7 +1977,7 @@ func (*DeleteAnnotationSpecSetRequest) ProtoMessage() {} func (x *DeleteAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2064,11 +2014,9 @@ type CreateInstructionRequest struct { func (x *CreateInstructionRequest) Reset() { *x = CreateInstructionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstructionRequest) String() string { @@ -2079,7 +2027,7 @@ func (*CreateInstructionRequest) ProtoMessage() {} func (x *CreateInstructionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2121,11 +2069,9 @@ type GetInstructionRequest struct { func (x *GetInstructionRequest) Reset() { *x = GetInstructionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstructionRequest) String() string { @@ -2136,7 +2082,7 @@ func (*GetInstructionRequest) ProtoMessage() {} func (x *GetInstructionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2171,11 +2117,9 @@ type DeleteInstructionRequest struct { func (x *DeleteInstructionRequest) Reset() { *x = DeleteInstructionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstructionRequest) String() string { @@ -2186,7 +2130,7 @@ func (*DeleteInstructionRequest) ProtoMessage() {} func (x *DeleteInstructionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2232,11 +2176,9 @@ type ListInstructionsRequest struct { func (x *ListInstructionsRequest) Reset() { *x = ListInstructionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstructionsRequest) String() string { @@ -2247,7 +2189,7 @@ func (*ListInstructionsRequest) ProtoMessage() {} func (x *ListInstructionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2304,11 +2246,9 @@ type ListInstructionsResponse struct { func (x *ListInstructionsResponse) Reset() { *x = ListInstructionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstructionsResponse) String() string { @@ -2319,7 +2259,7 @@ func (*ListInstructionsResponse) ProtoMessage() {} func (x *ListInstructionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2362,11 +2302,9 @@ type GetEvaluationRequest struct { func (x *GetEvaluationRequest) Reset() { *x = GetEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationRequest) String() string { @@ -2377,7 +2315,7 @@ func (*GetEvaluationRequest) ProtoMessage() {} func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2393,9 @@ type SearchEvaluationsRequest struct { func (x *SearchEvaluationsRequest) Reset() { *x = SearchEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEvaluationsRequest) String() string { @@ -2470,7 +2406,7 @@ func (*SearchEvaluationsRequest) ProtoMessage() {} func (x *SearchEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2527,11 +2463,9 @@ type SearchEvaluationsResponse struct { func (x *SearchEvaluationsResponse) Reset() { *x = SearchEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEvaluationsResponse) String() string { @@ -2542,7 +2476,7 @@ func (*SearchEvaluationsResponse) ProtoMessage() {} func (x *SearchEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2597,11 +2531,9 @@ type SearchExampleComparisonsRequest struct { func (x *SearchExampleComparisonsRequest) Reset() { *x = SearchExampleComparisonsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchExampleComparisonsRequest) String() string { @@ -2612,7 +2544,7 @@ func (*SearchExampleComparisonsRequest) ProtoMessage() {} func (x *SearchExampleComparisonsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2662,11 +2594,9 @@ type SearchExampleComparisonsResponse struct { func (x *SearchExampleComparisonsResponse) Reset() { *x = SearchExampleComparisonsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchExampleComparisonsResponse) String() string { @@ -2677,7 +2607,7 @@ func (*SearchExampleComparisonsResponse) ProtoMessage() {} func (x *SearchExampleComparisonsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2721,11 +2651,9 @@ type CreateEvaluationJobRequest struct { func (x *CreateEvaluationJobRequest) Reset() { *x = CreateEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEvaluationJobRequest) String() string { @@ -2736,7 +2664,7 @@ func (*CreateEvaluationJobRequest) ProtoMessage() {} func (x *CreateEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2787,11 +2715,9 @@ type UpdateEvaluationJobRequest struct { func (x *UpdateEvaluationJobRequest) Reset() { *x = UpdateEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEvaluationJobRequest) String() string { @@ -2802,7 +2728,7 @@ func (*UpdateEvaluationJobRequest) ProtoMessage() {} func (x *UpdateEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2845,11 +2771,9 @@ type GetEvaluationJobRequest struct { func (x *GetEvaluationJobRequest) Reset() { *x = GetEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationJobRequest) String() string { @@ -2860,7 +2784,7 @@ func (*GetEvaluationJobRequest) ProtoMessage() {} func (x *GetEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2896,11 +2820,9 @@ type PauseEvaluationJobRequest struct { func (x *PauseEvaluationJobRequest) Reset() { *x = PauseEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseEvaluationJobRequest) String() string { @@ -2911,7 +2833,7 @@ func (*PauseEvaluationJobRequest) ProtoMessage() {} func (x *PauseEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2947,11 +2869,9 @@ type ResumeEvaluationJobRequest struct { func (x *ResumeEvaluationJobRequest) Reset() { *x = ResumeEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeEvaluationJobRequest) String() string { @@ -2962,7 +2882,7 @@ func (*ResumeEvaluationJobRequest) ProtoMessage() {} func (x *ResumeEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2998,11 +2918,9 @@ type DeleteEvaluationJobRequest struct { func (x *DeleteEvaluationJobRequest) Reset() { *x = DeleteEvaluationJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEvaluationJobRequest) String() string { @@ -3013,7 +2931,7 @@ func (*DeleteEvaluationJobRequest) ProtoMessage() {} func (x *DeleteEvaluationJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3066,11 +2984,9 @@ type ListEvaluationJobsRequest struct { func (x *ListEvaluationJobsRequest) Reset() { *x = ListEvaluationJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationJobsRequest) String() string { @@ -3081,7 +2997,7 @@ func (*ListEvaluationJobsRequest) ProtoMessage() {} func (x *ListEvaluationJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3138,11 +3054,9 @@ type ListEvaluationJobsResponse struct { func (x *ListEvaluationJobsResponse) Reset() { *x = ListEvaluationJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationJobsResponse) String() string { @@ -3153,7 +3067,7 @@ func (*ListEvaluationJobsResponse) ProtoMessage() {} func (x *ListEvaluationJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3197,11 +3111,9 @@ type SearchExampleComparisonsResponse_ExampleComparison struct { func (x *SearchExampleComparisonsResponse_ExampleComparison) Reset() { *x = SearchExampleComparisonsResponse_ExampleComparison{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchExampleComparisonsResponse_ExampleComparison) String() string { @@ -3212,7 +3124,7 @@ func (*SearchExampleComparisonsResponse_ExampleComparison) ProtoMessage() {} func (x *SearchExampleComparisonsResponse_ExampleComparison) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4515,536 +4427,6 @@ func file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_init() { file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_init() file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() file_google_cloud_datalabeling_v1beta1_instruction_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetDataItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotatedDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotatedDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotatedDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnnotatedDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LabelVideoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LabelTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnnotationSpecSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationSpecSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationSpecSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationSpecSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnnotationSpecSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstructionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetInstructionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstructionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListInstructionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListInstructionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchExampleComparisonsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchExampleComparisonsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CreateEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*PauseEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ResumeEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEvaluationJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*SearchExampleComparisonsResponse_ExampleComparison); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14].OneofWrappers = []any{ (*LabelImageRequest_ImageClassificationConfig)(nil), (*LabelImageRequest_BoundingPolyConfig)(nil), diff --git a/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go b/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go index 28c910a85ac0..d0cc9730021e 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/data_payloads.proto @@ -55,11 +55,9 @@ type ImagePayload struct { func (x *ImagePayload) Reset() { *x = ImagePayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImagePayload) String() string { @@ -70,7 +68,7 @@ func (*ImagePayload) ProtoMessage() {} func (x *ImagePayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +123,9 @@ type TextPayload struct { func (x *TextPayload) Reset() { *x = TextPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextPayload) String() string { @@ -140,7 +136,7 @@ func (*TextPayload) ProtoMessage() {} func (x *TextPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type VideoThumbnail struct { func (x *VideoThumbnail) Reset() { *x = VideoThumbnail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoThumbnail) String() string { @@ -192,7 +186,7 @@ func (*VideoThumbnail) ProtoMessage() {} func (x *VideoThumbnail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type VideoPayload struct { func (x *VideoPayload) Reset() { *x = VideoPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoPayload) String() string { @@ -256,7 +248,7 @@ func (*VideoPayload) ProtoMessage() {} func (x *VideoPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,56 +394,6 @@ func file_google_cloud_datalabeling_v1beta1_data_payloads_proto_init() { if File_google_cloud_datalabeling_v1beta1_data_payloads_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImagePayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VideoThumbnail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VideoPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go b/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go index 412870be90b2..d25737ce97c1 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/dataset.proto @@ -126,11 +126,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -141,7 +139,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +236,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -253,7 +249,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +364,9 @@ type TextMetadata struct { func (x *TextMetadata) Reset() { *x = TextMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextMetadata) String() string { @@ -383,7 +377,7 @@ func (*TextMetadata) ProtoMessage() {} func (x *TextMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +411,9 @@ type ClassificationMetadata struct { func (x *ClassificationMetadata) Reset() { *x = ClassificationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationMetadata) String() string { @@ -432,7 +424,7 @@ func (*ClassificationMetadata) ProtoMessage() {} func (x *ClassificationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +461,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -484,7 +474,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +530,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -555,7 +543,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +582,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -609,7 +595,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +668,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -697,7 +681,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +722,9 @@ type GcsFolderDestination struct { func (x *GcsFolderDestination) Reset() { *x = GcsFolderDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsFolderDestination) String() string { @@ -753,7 +735,7 @@ func (*GcsFolderDestination) ProtoMessage() {} func (x *GcsFolderDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +778,9 @@ type DataItem struct { func (x *DataItem) Reset() { *x = DataItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataItem) String() string { @@ -811,7 +791,7 @@ func (*DataItem) ProtoMessage() {} func (x *DataItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,11 +909,9 @@ type AnnotatedDataset struct { func (x *AnnotatedDataset) Reset() { *x = AnnotatedDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedDataset) String() string { @@ -944,7 +922,7 @@ func (*AnnotatedDataset) ProtoMessage() {} func (x *AnnotatedDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1030,9 @@ type LabelStats struct { func (x *LabelStats) Reset() { *x = LabelStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelStats) String() string { @@ -1067,7 +1043,7 @@ func (*LabelStats) ProtoMessage() {} func (x *LabelStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1117,11 +1093,9 @@ type AnnotatedDatasetMetadata struct { func (x *AnnotatedDatasetMetadata) Reset() { *x = AnnotatedDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedDatasetMetadata) String() string { @@ -1132,7 +1106,7 @@ func (*AnnotatedDatasetMetadata) ProtoMessage() {} func (x *AnnotatedDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1314,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -1355,7 +1327,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1890,176 +1862,6 @@ func file_google_cloud_datalabeling_v1beta1_dataset_proto_init() { file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() file_google_cloud_datalabeling_v1beta1_data_payloads_proto_init() file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TextMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GcsFolderDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DataItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LabelStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1].OneofWrappers = []any{ (*InputConfig_TextMetadata)(nil), (*InputConfig_GcsSource)(nil), diff --git a/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go b/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go index bb513e2e2ad1..6bda3608f9ac 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/evaluation.proto @@ -74,11 +74,9 @@ type Evaluation struct { func (x *Evaluation) Reset() { *x = Evaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation) String() string { @@ -89,7 +87,7 @@ func (*Evaluation) ProtoMessage() {} func (x *Evaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type EvaluationConfig struct { func (x *EvaluationConfig) Reset() { *x = EvaluationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationConfig) String() string { @@ -185,7 +181,7 @@ func (*EvaluationConfig) ProtoMessage() {} func (x *EvaluationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type BoundingBoxEvaluationOptions struct { func (x *BoundingBoxEvaluationOptions) Reset() { *x = BoundingBoxEvaluationOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBoxEvaluationOptions) String() string { @@ -259,7 +253,7 @@ func (*BoundingBoxEvaluationOptions) ProtoMessage() {} func (x *BoundingBoxEvaluationOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type EvaluationMetrics struct { func (x *EvaluationMetrics) Reset() { *x = EvaluationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationMetrics) String() string { @@ -312,7 +304,7 @@ func (*EvaluationMetrics) ProtoMessage() {} func (x *EvaluationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +371,9 @@ type ClassificationMetrics struct { func (x *ClassificationMetrics) Reset() { *x = ClassificationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationMetrics) String() string { @@ -394,7 +384,7 @@ func (*ClassificationMetrics) ProtoMessage() {} func (x *ClassificationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +425,9 @@ type ObjectDetectionMetrics struct { func (x *ObjectDetectionMetrics) Reset() { *x = ObjectDetectionMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionMetrics) String() string { @@ -450,7 +438,7 @@ func (*ObjectDetectionMetrics) ProtoMessage() {} func (x *ObjectDetectionMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +481,9 @@ type PrCurve struct { func (x *PrCurve) Reset() { *x = PrCurve{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrCurve) String() string { @@ -508,7 +494,7 @@ func (*PrCurve) ProtoMessage() {} func (x *PrCurve) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +550,9 @@ type ConfusionMatrix struct { func (x *ConfusionMatrix) Reset() { *x = ConfusionMatrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfusionMatrix) String() string { @@ -579,7 +563,7 @@ func (*ConfusionMatrix) ProtoMessage() {} func (x *ConfusionMatrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +625,9 @@ type PrCurve_ConfidenceMetricsEntry struct { func (x *PrCurve_ConfidenceMetricsEntry) Reset() { *x = PrCurve_ConfidenceMetricsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrCurve_ConfidenceMetricsEntry) String() string { @@ -656,7 +638,7 @@ func (*PrCurve_ConfidenceMetricsEntry) ProtoMessage() {} func (x *PrCurve_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +737,9 @@ type ConfusionMatrix_ConfusionMatrixEntry struct { func (x *ConfusionMatrix_ConfusionMatrixEntry) Reset() { *x = ConfusionMatrix_ConfusionMatrixEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfusionMatrix_ConfusionMatrixEntry) String() string { @@ -770,7 +750,7 @@ func (*ConfusionMatrix_ConfusionMatrixEntry) ProtoMessage() {} func (x *ConfusionMatrix_ConfusionMatrixEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +795,9 @@ type ConfusionMatrix_Row struct { func (x *ConfusionMatrix_Row) Reset() { *x = ConfusionMatrix_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfusionMatrix_Row) String() string { @@ -830,7 +808,7 @@ func (*ConfusionMatrix_Row) ProtoMessage() {} func (x *ConfusionMatrix_Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,140 +1094,6 @@ func file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() { } file_google_cloud_datalabeling_v1beta1_annotation_proto_init() file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBoxEvaluationOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PrCurve); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ConfusionMatrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PrCurve_ConfidenceMetricsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ConfusionMatrix_ConfusionMatrixEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ConfusionMatrix_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1].OneofWrappers = []any{ (*EvaluationConfig_BoundingBoxEvaluationOptions)(nil), } diff --git a/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go b/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go index 871addf1a106..64d6e2bdce2a 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/evaluation_job.proto @@ -195,11 +195,9 @@ type EvaluationJob struct { func (x *EvaluationJob) Reset() { *x = EvaluationJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationJob) String() string { @@ -210,7 +208,7 @@ func (*EvaluationJob) ProtoMessage() {} func (x *EvaluationJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +373,9 @@ type EvaluationJobConfig struct { func (x *EvaluationJobConfig) Reset() { *x = EvaluationJobConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationJobConfig) String() string { @@ -390,7 +386,7 @@ func (*EvaluationJobConfig) ProtoMessage() {} func (x *EvaluationJobConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +539,9 @@ type EvaluationJobAlertConfig struct { func (x *EvaluationJobAlertConfig) Reset() { *x = EvaluationJobAlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationJobAlertConfig) String() string { @@ -558,7 +552,7 @@ func (*EvaluationJobAlertConfig) ProtoMessage() {} func (x *EvaluationJobAlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +594,9 @@ type Attempt struct { func (x *Attempt) Reset() { *x = Attempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attempt) String() string { @@ -615,7 +607,7 @@ func (*Attempt) ProtoMessage() {} func (x *Attempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,56 +873,6 @@ func file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_init() { file_google_cloud_datalabeling_v1beta1_dataset_proto_init() file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationJobConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationJobAlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Attempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1].OneofWrappers = []any{ (*EvaluationJobConfig_ImageClassificationConfig)(nil), (*EvaluationJobConfig_BoundingPolyConfig)(nil), diff --git a/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go b/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go index 7fab0e6e6c1d..4d451f122448 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto @@ -138,11 +138,9 @@ type HumanAnnotationConfig struct { func (x *HumanAnnotationConfig) Reset() { *x = HumanAnnotationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAnnotationConfig) String() string { @@ -153,7 +151,7 @@ func (*HumanAnnotationConfig) ProtoMessage() {} func (x *HumanAnnotationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +246,9 @@ type ImageClassificationConfig struct { func (x *ImageClassificationConfig) Reset() { *x = ImageClassificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageClassificationConfig) String() string { @@ -263,7 +259,7 @@ func (*ImageClassificationConfig) ProtoMessage() {} func (x *ImageClassificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +309,9 @@ type BoundingPolyConfig struct { func (x *BoundingPolyConfig) Reset() { *x = BoundingPolyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPolyConfig) String() string { @@ -328,7 +322,7 @@ func (*BoundingPolyConfig) ProtoMessage() {} func (x *BoundingPolyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +365,9 @@ type PolylineConfig struct { func (x *PolylineConfig) Reset() { *x = PolylineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolylineConfig) String() string { @@ -386,7 +378,7 @@ func (*PolylineConfig) ProtoMessage() {} func (x *PolylineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +422,9 @@ type SegmentationConfig struct { func (x *SegmentationConfig) Reset() { *x = SegmentationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SegmentationConfig) String() string { @@ -445,7 +435,7 @@ func (*SegmentationConfig) ProtoMessage() {} func (x *SegmentationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -497,11 +487,9 @@ type VideoClassificationConfig struct { func (x *VideoClassificationConfig) Reset() { *x = VideoClassificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationConfig) String() string { @@ -512,7 +500,7 @@ func (*VideoClassificationConfig) ProtoMessage() {} func (x *VideoClassificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +547,9 @@ type ObjectDetectionConfig struct { func (x *ObjectDetectionConfig) Reset() { *x = ObjectDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionConfig) String() string { @@ -574,7 +560,7 @@ func (*ObjectDetectionConfig) ProtoMessage() {} func (x *ObjectDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +601,9 @@ type ObjectTrackingConfig struct { func (x *ObjectTrackingConfig) Reset() { *x = ObjectTrackingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingConfig) String() string { @@ -630,7 +614,7 @@ func (*ObjectTrackingConfig) ProtoMessage() {} func (x *ObjectTrackingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +650,9 @@ type EventConfig struct { func (x *EventConfig) Reset() { *x = EventConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventConfig) String() string { @@ -681,7 +663,7 @@ func (*EventConfig) ProtoMessage() {} func (x *EventConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +702,9 @@ type TextClassificationConfig struct { func (x *TextClassificationConfig) Reset() { *x = TextClassificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextClassificationConfig) String() string { @@ -735,7 +715,7 @@ func (*TextClassificationConfig) ProtoMessage() {} func (x *TextClassificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +765,9 @@ type SentimentConfig struct { func (x *SentimentConfig) Reset() { *x = SentimentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentConfig) String() string { @@ -800,7 +778,7 @@ func (*SentimentConfig) ProtoMessage() {} func (x *SentimentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -834,11 +812,9 @@ type TextEntityExtractionConfig struct { func (x *TextEntityExtractionConfig) Reset() { *x = TextEntityExtractionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextEntityExtractionConfig) String() string { @@ -849,7 +825,7 @@ func (*TextEntityExtractionConfig) ProtoMessage() {} func (x *TextEntityExtractionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +862,9 @@ type VideoClassificationConfig_AnnotationSpecSetConfig struct { func (x *VideoClassificationConfig_AnnotationSpecSetConfig) Reset() { *x = VideoClassificationConfig_AnnotationSpecSetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationConfig_AnnotationSpecSetConfig) String() string { @@ -901,7 +875,7 @@ func (*VideoClassificationConfig_AnnotationSpecSetConfig) ProtoMessage() {} func (x *VideoClassificationConfig_AnnotationSpecSetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,164 +1128,6 @@ func file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() if File_google_cloud_datalabeling_v1beta1_human_annotation_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HumanAnnotationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImageClassificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPolyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PolylineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SegmentationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EventConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TextClassificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SentimentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TextEntityExtractionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationConfig_AnnotationSpecSetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go b/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go index ca78e09ffc0d..dc10d5f5607e 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/instruction.proto @@ -78,11 +78,9 @@ type Instruction struct { func (x *Instruction) Reset() { *x = Instruction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instruction) String() string { @@ -93,7 +91,7 @@ func (*Instruction) ProtoMessage() {} func (x *Instruction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type CsvInstruction struct { func (x *CsvInstruction) Reset() { *x = CsvInstruction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsvInstruction) String() string { @@ -200,7 +196,7 @@ func (*CsvInstruction) ProtoMessage() {} func (x *CsvInstruction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +230,9 @@ type PdfInstruction struct { func (x *PdfInstruction) Reset() { *x = PdfInstruction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PdfInstruction) String() string { @@ -249,7 +243,7 @@ func (*PdfInstruction) ProtoMessage() {} func (x *PdfInstruction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,44 +382,6 @@ func file_google_cloud_datalabeling_v1beta1_instruction_proto_init() { return } file_google_cloud_datalabeling_v1beta1_dataset_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instruction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CsvInstruction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PdfInstruction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go b/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go index 193941a3ab02..4326ed875e48 100755 --- a/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go +++ b/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datalabeling/v1beta1/operations.proto @@ -54,11 +54,9 @@ type ImportDataOperationResponse struct { func (x *ImportDataOperationResponse) Reset() { *x = ImportDataOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationResponse) String() string { @@ -69,7 +67,7 @@ func (*ImportDataOperationResponse) ProtoMessage() {} func (x *ImportDataOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type ExportDataOperationResponse struct { func (x *ExportDataOperationResponse) Reset() { *x = ExportDataOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationResponse) String() string { @@ -141,7 +137,7 @@ func (*ExportDataOperationResponse) ProtoMessage() {} func (x *ExportDataOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type ImportDataOperationMetadata struct { func (x *ImportDataOperationMetadata) Reset() { *x = ImportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataOperationMetadata) String() string { @@ -225,7 +219,7 @@ func (*ImportDataOperationMetadata) ProtoMessage() {} func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +274,9 @@ type ExportDataOperationMetadata struct { func (x *ExportDataOperationMetadata) Reset() { *x = ExportDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataOperationMetadata) String() string { @@ -295,7 +287,7 @@ func (*ExportDataOperationMetadata) ProtoMessage() {} func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +359,9 @@ type LabelOperationMetadata struct { func (x *LabelOperationMetadata) Reset() { *x = LabelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelOperationMetadata) String() string { @@ -382,7 +372,7 @@ func (*LabelOperationMetadata) ProtoMessage() {} func (x *LabelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +599,9 @@ type LabelImageClassificationOperationMetadata struct { func (x *LabelImageClassificationOperationMetadata) Reset() { *x = LabelImageClassificationOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageClassificationOperationMetadata) String() string { @@ -624,7 +612,7 @@ func (*LabelImageClassificationOperationMetadata) ProtoMessage() {} func (x *LabelImageClassificationOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +646,9 @@ type LabelImageBoundingBoxOperationMetadata struct { func (x *LabelImageBoundingBoxOperationMetadata) Reset() { *x = LabelImageBoundingBoxOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageBoundingBoxOperationMetadata) String() string { @@ -673,7 +659,7 @@ func (*LabelImageBoundingBoxOperationMetadata) ProtoMessage() {} func (x *LabelImageBoundingBoxOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +693,9 @@ type LabelImageOrientedBoundingBoxOperationMetadata struct { func (x *LabelImageOrientedBoundingBoxOperationMetadata) Reset() { *x = LabelImageOrientedBoundingBoxOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageOrientedBoundingBoxOperationMetadata) String() string { @@ -722,7 +706,7 @@ func (*LabelImageOrientedBoundingBoxOperationMetadata) ProtoMessage() {} func (x *LabelImageOrientedBoundingBoxOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +740,9 @@ type LabelImageBoundingPolyOperationMetadata struct { func (x *LabelImageBoundingPolyOperationMetadata) Reset() { *x = LabelImageBoundingPolyOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageBoundingPolyOperationMetadata) String() string { @@ -771,7 +753,7 @@ func (*LabelImageBoundingPolyOperationMetadata) ProtoMessage() {} func (x *LabelImageBoundingPolyOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +787,9 @@ type LabelImagePolylineOperationMetadata struct { func (x *LabelImagePolylineOperationMetadata) Reset() { *x = LabelImagePolylineOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImagePolylineOperationMetadata) String() string { @@ -820,7 +800,7 @@ func (*LabelImagePolylineOperationMetadata) ProtoMessage() {} func (x *LabelImagePolylineOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +834,9 @@ type LabelImageSegmentationOperationMetadata struct { func (x *LabelImageSegmentationOperationMetadata) Reset() { *x = LabelImageSegmentationOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelImageSegmentationOperationMetadata) String() string { @@ -869,7 +847,7 @@ func (*LabelImageSegmentationOperationMetadata) ProtoMessage() {} func (x *LabelImageSegmentationOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +881,9 @@ type LabelVideoClassificationOperationMetadata struct { func (x *LabelVideoClassificationOperationMetadata) Reset() { *x = LabelVideoClassificationOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelVideoClassificationOperationMetadata) String() string { @@ -918,7 +894,7 @@ func (*LabelVideoClassificationOperationMetadata) ProtoMessage() {} func (x *LabelVideoClassificationOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +928,9 @@ type LabelVideoObjectDetectionOperationMetadata struct { func (x *LabelVideoObjectDetectionOperationMetadata) Reset() { *x = LabelVideoObjectDetectionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelVideoObjectDetectionOperationMetadata) String() string { @@ -967,7 +941,7 @@ func (*LabelVideoObjectDetectionOperationMetadata) ProtoMessage() {} func (x *LabelVideoObjectDetectionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1001,11 +975,9 @@ type LabelVideoObjectTrackingOperationMetadata struct { func (x *LabelVideoObjectTrackingOperationMetadata) Reset() { *x = LabelVideoObjectTrackingOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelVideoObjectTrackingOperationMetadata) String() string { @@ -1016,7 +988,7 @@ func (*LabelVideoObjectTrackingOperationMetadata) ProtoMessage() {} func (x *LabelVideoObjectTrackingOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,11 +1022,9 @@ type LabelVideoEventOperationMetadata struct { func (x *LabelVideoEventOperationMetadata) Reset() { *x = LabelVideoEventOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelVideoEventOperationMetadata) String() string { @@ -1065,7 +1035,7 @@ func (*LabelVideoEventOperationMetadata) ProtoMessage() {} func (x *LabelVideoEventOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1069,9 @@ type LabelTextClassificationOperationMetadata struct { func (x *LabelTextClassificationOperationMetadata) Reset() { *x = LabelTextClassificationOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelTextClassificationOperationMetadata) String() string { @@ -1114,7 +1082,7 @@ func (*LabelTextClassificationOperationMetadata) ProtoMessage() {} func (x *LabelTextClassificationOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1116,9 @@ type LabelTextEntityExtractionOperationMetadata struct { func (x *LabelTextEntityExtractionOperationMetadata) Reset() { *x = LabelTextEntityExtractionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelTextEntityExtractionOperationMetadata) String() string { @@ -1163,7 +1129,7 @@ func (*LabelTextEntityExtractionOperationMetadata) ProtoMessage() {} func (x *LabelTextEntityExtractionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,11 +1170,9 @@ type CreateInstructionMetadata struct { func (x *CreateInstructionMetadata) Reset() { *x = CreateInstructionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstructionMetadata) String() string { @@ -1219,7 +1183,7 @@ func (*CreateInstructionMetadata) ProtoMessage() {} func (x *CreateInstructionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,224 +1627,6 @@ func file_google_cloud_datalabeling_v1beta1_operations_proto_init() { } file_google_cloud_datalabeling_v1beta1_dataset_proto_init() file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LabelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageClassificationOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageBoundingBoxOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageOrientedBoundingBoxOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageBoundingPolyOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LabelImagePolylineOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LabelImageSegmentationOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LabelVideoClassificationOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LabelVideoObjectDetectionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*LabelVideoObjectTrackingOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*LabelVideoEventOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LabelTextClassificationOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LabelTextEntityExtractionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstructionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4].OneofWrappers = []any{ (*LabelOperationMetadata_ImageClassificationDetails)(nil), (*LabelOperationMetadata_ImageBoundingBoxDetails)(nil), diff --git a/datalabeling/apiv1beta1/helpers.go b/datalabeling/apiv1beta1/helpers.go index 8151a939f40b..278b050ea962 100755 --- a/datalabeling/apiv1beta1/helpers.go +++ b/datalabeling/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package datalabeling import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datalabeling.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataplex/apiv1/catalog_client.go b/dataplex/apiv1/catalog_client.go index c4cba46c880a..1d0715d6b93b 100755 --- a/dataplex/apiv1/catalog_client.go +++ b/dataplex/apiv1/catalog_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -635,6 +636,8 @@ type catalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCatalogClient creates a new catalog service client based on gRPC. @@ -665,6 +668,7 @@ func NewCatalogClient(ctx context.Context, opts ...option.ClientOption) (*Catalo connPool: connPool, catalogClient: dataplexpb.NewCatalogServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -720,7 +724,7 @@ func (c *catalogGRPCClient) CreateEntryType(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateEntryType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateEntryType, req, settings.GRPC, c.logger, "CreateEntryType") return err }, opts...) if err != nil { @@ -740,7 +744,7 @@ func (c *catalogGRPCClient) UpdateEntryType(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateEntryType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateEntryType, req, settings.GRPC, c.logger, "UpdateEntryType") return err }, opts...) if err != nil { @@ -760,7 +764,7 @@ func (c *catalogGRPCClient) DeleteEntryType(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.DeleteEntryType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.DeleteEntryType, req, settings.GRPC, c.logger, "DeleteEntryType") return err }, opts...) if err != nil { @@ -791,7 +795,7 @@ func (c *catalogGRPCClient) ListEntryTypes(ctx context.Context, req *dataplexpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListEntryTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListEntryTypes, req, settings.GRPC, c.logger, "ListEntryTypes") return err }, opts...) if err != nil { @@ -826,7 +830,7 @@ func (c *catalogGRPCClient) GetEntryType(ctx context.Context, req *dataplexpb.Ge var resp *dataplexpb.EntryType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetEntryType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetEntryType, req, settings.GRPC, c.logger, "GetEntryType") return err }, opts...) if err != nil { @@ -844,7 +848,7 @@ func (c *catalogGRPCClient) CreateAspectType(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateAspectType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateAspectType, req, settings.GRPC, c.logger, "CreateAspectType") return err }, opts...) if err != nil { @@ -864,7 +868,7 @@ func (c *catalogGRPCClient) UpdateAspectType(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateAspectType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateAspectType, req, settings.GRPC, c.logger, "UpdateAspectType") return err }, opts...) if err != nil { @@ -884,7 +888,7 @@ func (c *catalogGRPCClient) DeleteAspectType(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.DeleteAspectType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.DeleteAspectType, req, settings.GRPC, c.logger, "DeleteAspectType") return err }, opts...) if err != nil { @@ -915,7 +919,7 @@ func (c *catalogGRPCClient) ListAspectTypes(ctx context.Context, req *dataplexpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListAspectTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListAspectTypes, req, settings.GRPC, c.logger, "ListAspectTypes") return err }, opts...) if err != nil { @@ -950,7 +954,7 @@ func (c *catalogGRPCClient) GetAspectType(ctx context.Context, req *dataplexpb.G var resp *dataplexpb.AspectType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetAspectType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetAspectType, req, settings.GRPC, c.logger, "GetAspectType") return err }, opts...) if err != nil { @@ -968,7 +972,7 @@ func (c *catalogGRPCClient) CreateEntryGroup(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateEntryGroup, req, settings.GRPC, c.logger, "CreateEntryGroup") return err }, opts...) if err != nil { @@ -988,7 +992,7 @@ func (c *catalogGRPCClient) UpdateEntryGroup(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateEntryGroup, req, settings.GRPC, c.logger, "UpdateEntryGroup") return err }, opts...) if err != nil { @@ -1008,7 +1012,7 @@ func (c *catalogGRPCClient) DeleteEntryGroup(ctx context.Context, req *dataplexp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.DeleteEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.DeleteEntryGroup, req, settings.GRPC, c.logger, "DeleteEntryGroup") return err }, opts...) if err != nil { @@ -1039,7 +1043,7 @@ func (c *catalogGRPCClient) ListEntryGroups(ctx context.Context, req *dataplexpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListEntryGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListEntryGroups, req, settings.GRPC, c.logger, "ListEntryGroups") return err }, opts...) if err != nil { @@ -1074,7 +1078,7 @@ func (c *catalogGRPCClient) GetEntryGroup(ctx context.Context, req *dataplexpb.G var resp *dataplexpb.EntryGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetEntryGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetEntryGroup, req, settings.GRPC, c.logger, "GetEntryGroup") return err }, opts...) if err != nil { @@ -1092,7 +1096,7 @@ func (c *catalogGRPCClient) CreateEntry(ctx context.Context, req *dataplexpb.Cre var resp *dataplexpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateEntry, req, settings.GRPC, c.logger, "CreateEntry") return err }, opts...) if err != nil { @@ -1110,7 +1114,7 @@ func (c *catalogGRPCClient) UpdateEntry(ctx context.Context, req *dataplexpb.Upd var resp *dataplexpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateEntry, req, settings.GRPC, c.logger, "UpdateEntry") return err }, opts...) if err != nil { @@ -1128,7 +1132,7 @@ func (c *catalogGRPCClient) DeleteEntry(ctx context.Context, req *dataplexpb.Del var resp *dataplexpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.DeleteEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.DeleteEntry, req, settings.GRPC, c.logger, "DeleteEntry") return err }, opts...) if err != nil { @@ -1157,7 +1161,7 @@ func (c *catalogGRPCClient) ListEntries(ctx context.Context, req *dataplexpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListEntries, req, settings.GRPC, c.logger, "ListEntries") return err }, opts...) if err != nil { @@ -1192,7 +1196,7 @@ func (c *catalogGRPCClient) GetEntry(ctx context.Context, req *dataplexpb.GetEnt var resp *dataplexpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetEntry, req, settings.GRPC, c.logger, "GetEntry") return err }, opts...) if err != nil { @@ -1210,7 +1214,7 @@ func (c *catalogGRPCClient) LookupEntry(ctx context.Context, req *dataplexpb.Loo var resp *dataplexpb.Entry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.LookupEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.LookupEntry, req, settings.GRPC, c.logger, "LookupEntry") return err }, opts...) if err != nil { @@ -1239,7 +1243,7 @@ func (c *catalogGRPCClient) SearchEntries(ctx context.Context, req *dataplexpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.SearchEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.SearchEntries, req, settings.GRPC, c.logger, "SearchEntries") return err }, opts...) if err != nil { @@ -1274,7 +1278,7 @@ func (c *catalogGRPCClient) CreateMetadataJob(ctx context.Context, req *dataplex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateMetadataJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateMetadataJob, req, settings.GRPC, c.logger, "CreateMetadataJob") return err }, opts...) if err != nil { @@ -1294,7 +1298,7 @@ func (c *catalogGRPCClient) GetMetadataJob(ctx context.Context, req *dataplexpb. var resp *dataplexpb.MetadataJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetMetadataJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetMetadataJob, req, settings.GRPC, c.logger, "GetMetadataJob") return err }, opts...) if err != nil { @@ -1323,7 +1327,7 @@ func (c *catalogGRPCClient) ListMetadataJobs(ctx context.Context, req *dataplexp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListMetadataJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListMetadataJobs, req, settings.GRPC, c.logger, "ListMetadataJobs") return err }, opts...) if err != nil { @@ -1357,7 +1361,7 @@ func (c *catalogGRPCClient) CancelMetadataJob(ctx context.Context, req *dataplex opts = append((*c.CallOptions).CancelMetadataJob[0:len((*c.CallOptions).CancelMetadataJob):len((*c.CallOptions).CancelMetadataJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.catalogClient.CancelMetadataJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.catalogClient.CancelMetadataJob, req, settings.GRPC, c.logger, "CancelMetadataJob") return err }, opts...) return err @@ -1372,7 +1376,7 @@ func (c *catalogGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1401,7 +1405,7 @@ func (c *catalogGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1435,7 +1439,7 @@ func (c *catalogGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1449,7 +1453,7 @@ func (c *catalogGRPCClient) DeleteOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1464,7 +1468,7 @@ func (c *catalogGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1493,7 +1497,7 @@ func (c *catalogGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/catalog_client_example_go123_test.go b/dataplex/apiv1/catalog_client_example_go123_test.go index 2808a89d0121..eed1522f63ce 100644 --- a/dataplex/apiv1/catalog_client_example_go123_test.go +++ b/dataplex/apiv1/catalog_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCatalogClient_ListAspectTypes_all() { } for resp, err := range c.ListAspectTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCatalogClient_ListEntries_all() { } for resp, err := range c.ListEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCatalogClient_ListEntryGroups_all() { } for resp, err := range c.ListEntryGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleCatalogClient_ListEntryTypes_all() { } for resp, err := range c.ListEntryTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleCatalogClient_ListMetadataJobs_all() { } for resp, err := range c.ListMetadataJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleCatalogClient_SearchEntries_all() { } for resp, err := range c.SearchEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleCatalogClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleCatalogClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataplex/apiv1/content_client.go b/dataplex/apiv1/content_client.go index 432aefe71114..9b756c2ad3db 100755 --- a/dataplex/apiv1/content_client.go +++ b/dataplex/apiv1/content_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -306,6 +307,8 @@ type contentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewContentClient creates a new content service client based on gRPC. @@ -332,6 +335,7 @@ func NewContentClient(ctx context.Context, opts ...option.ClientOption) (*Conten connPool: connPool, contentClient: dataplexpb.NewContentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -376,7 +380,7 @@ func (c *contentGRPCClient) CreateContent(ctx context.Context, req *dataplexpb.C var resp *dataplexpb.Content err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.CreateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.CreateContent, req, settings.GRPC, c.logger, "CreateContent") return err }, opts...) if err != nil { @@ -394,7 +398,7 @@ func (c *contentGRPCClient) UpdateContent(ctx context.Context, req *dataplexpb.U var resp *dataplexpb.Content err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.UpdateContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.UpdateContent, req, settings.GRPC, c.logger, "UpdateContent") return err }, opts...) if err != nil { @@ -411,7 +415,7 @@ func (c *contentGRPCClient) DeleteContent(ctx context.Context, req *dataplexpb.D opts = append((*c.CallOptions).DeleteContent[0:len((*c.CallOptions).DeleteContent):len((*c.CallOptions).DeleteContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.contentClient.DeleteContent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.contentClient.DeleteContent, req, settings.GRPC, c.logger, "DeleteContent") return err }, opts...) return err @@ -426,7 +430,7 @@ func (c *contentGRPCClient) GetContent(ctx context.Context, req *dataplexpb.GetC var resp *dataplexpb.Content err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.GetContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.GetContent, req, settings.GRPC, c.logger, "GetContent") return err }, opts...) if err != nil { @@ -444,7 +448,7 @@ func (c *contentGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -462,7 +466,7 @@ func (c *contentGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -480,7 +484,7 @@ func (c *contentGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -509,7 +513,7 @@ func (c *contentGRPCClient) ListContent(ctx context.Context, req *dataplexpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contentClient.ListContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contentClient.ListContent, req, settings.GRPC, c.logger, "ListContent") return err }, opts...) if err != nil { @@ -544,7 +548,7 @@ func (c *contentGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -573,7 +577,7 @@ func (c *contentGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -607,7 +611,7 @@ func (c *contentGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -621,7 +625,7 @@ func (c *contentGRPCClient) DeleteOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -636,7 +640,7 @@ func (c *contentGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -665,7 +669,7 @@ func (c *contentGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/content_client_example_go123_test.go b/dataplex/apiv1/content_client_example_go123_test.go index a17332e8f514..221c31e11538 100644 --- a/dataplex/apiv1/content_client_example_go123_test.go +++ b/dataplex/apiv1/content_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleContentClient_ListContent_all() { } for resp, err := range c.ListContent(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleContentClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleContentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataplex/apiv1/data_scan_client.go b/dataplex/apiv1/data_scan_client.go index 436b55b97b8a..2d13a192f3c7 100755 --- a/dataplex/apiv1/data_scan_client.go +++ b/dataplex/apiv1/data_scan_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -279,6 +280,8 @@ type dataScanGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataScanClient creates a new data scan service client based on gRPC. @@ -307,6 +310,7 @@ func NewDataScanClient(ctx context.Context, opts ...option.ClientOption) (*DataS connPool: connPool, dataScanClient: dataplexpb.NewDataScanServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -362,7 +366,7 @@ func (c *dataScanGRPCClient) CreateDataScan(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.CreateDataScan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.CreateDataScan, req, settings.GRPC, c.logger, "CreateDataScan") return err }, opts...) if err != nil { @@ -382,7 +386,7 @@ func (c *dataScanGRPCClient) UpdateDataScan(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.UpdateDataScan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.UpdateDataScan, req, settings.GRPC, c.logger, "UpdateDataScan") return err }, opts...) if err != nil { @@ -402,7 +406,7 @@ func (c *dataScanGRPCClient) DeleteDataScan(ctx context.Context, req *dataplexpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.DeleteDataScan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.DeleteDataScan, req, settings.GRPC, c.logger, "DeleteDataScan") return err }, opts...) if err != nil { @@ -422,7 +426,7 @@ func (c *dataScanGRPCClient) GetDataScan(ctx context.Context, req *dataplexpb.Ge var resp *dataplexpb.DataScan err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.GetDataScan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.GetDataScan, req, settings.GRPC, c.logger, "GetDataScan") return err }, opts...) if err != nil { @@ -451,7 +455,7 @@ func (c *dataScanGRPCClient) ListDataScans(ctx context.Context, req *dataplexpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.ListDataScans(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.ListDataScans, req, settings.GRPC, c.logger, "ListDataScans") return err }, opts...) if err != nil { @@ -486,7 +490,7 @@ func (c *dataScanGRPCClient) RunDataScan(ctx context.Context, req *dataplexpb.Ru var resp *dataplexpb.RunDataScanResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.RunDataScan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.RunDataScan, req, settings.GRPC, c.logger, "RunDataScan") return err }, opts...) if err != nil { @@ -504,7 +508,7 @@ func (c *dataScanGRPCClient) GetDataScanJob(ctx context.Context, req *dataplexpb var resp *dataplexpb.DataScanJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.GetDataScanJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.GetDataScanJob, req, settings.GRPC, c.logger, "GetDataScanJob") return err }, opts...) if err != nil { @@ -533,7 +537,7 @@ func (c *dataScanGRPCClient) ListDataScanJobs(ctx context.Context, req *dataplex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.ListDataScanJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.ListDataScanJobs, req, settings.GRPC, c.logger, "ListDataScanJobs") return err }, opts...) if err != nil { @@ -568,7 +572,7 @@ func (c *dataScanGRPCClient) GenerateDataQualityRules(ctx context.Context, req * var resp *dataplexpb.GenerateDataQualityRulesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataScanClient.GenerateDataQualityRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataScanClient.GenerateDataQualityRules, req, settings.GRPC, c.logger, "GenerateDataQualityRules") return err }, opts...) if err != nil { @@ -586,7 +590,7 @@ func (c *dataScanGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +619,7 @@ func (c *dataScanGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +653,7 @@ func (c *dataScanGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +667,7 @@ func (c *dataScanGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -678,7 +682,7 @@ func (c *dataScanGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -707,7 +711,7 @@ func (c *dataScanGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/data_scan_client_example_go123_test.go b/dataplex/apiv1/data_scan_client_example_go123_test.go index 0971a96296c8..9c7202518949 100644 --- a/dataplex/apiv1/data_scan_client_example_go123_test.go +++ b/dataplex/apiv1/data_scan_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataScanClient_ListDataScanJobs_all() { } for resp, err := range c.ListDataScanJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataScanClient_ListDataScans_all() { } for resp, err := range c.ListDataScans(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataScanClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataScanClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataplex/apiv1/data_taxonomy_client.go b/dataplex/apiv1/data_taxonomy_client.go index 913bc98949de..16d9dd71504e 100755 --- a/dataplex/apiv1/data_taxonomy_client.go +++ b/dataplex/apiv1/data_taxonomy_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -368,6 +369,8 @@ type dataTaxonomyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataTaxonomyClient creates a new data taxonomy service client based on gRPC. @@ -395,6 +398,7 @@ func NewDataTaxonomyClient(ctx context.Context, opts ...option.ClientOption) (*D connPool: connPool, dataTaxonomyClient: dataplexpb.NewDataTaxonomyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -450,7 +454,7 @@ func (c *dataTaxonomyGRPCClient) CreateDataTaxonomy(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.CreateDataTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.CreateDataTaxonomy, req, settings.GRPC, c.logger, "CreateDataTaxonomy") return err }, opts...) if err != nil { @@ -470,7 +474,7 @@ func (c *dataTaxonomyGRPCClient) UpdateDataTaxonomy(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.UpdateDataTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.UpdateDataTaxonomy, req, settings.GRPC, c.logger, "UpdateDataTaxonomy") return err }, opts...) if err != nil { @@ -490,7 +494,7 @@ func (c *dataTaxonomyGRPCClient) DeleteDataTaxonomy(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.DeleteDataTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.DeleteDataTaxonomy, req, settings.GRPC, c.logger, "DeleteDataTaxonomy") return err }, opts...) if err != nil { @@ -521,7 +525,7 @@ func (c *dataTaxonomyGRPCClient) ListDataTaxonomies(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.ListDataTaxonomies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.ListDataTaxonomies, req, settings.GRPC, c.logger, "ListDataTaxonomies") return err }, opts...) if err != nil { @@ -556,7 +560,7 @@ func (c *dataTaxonomyGRPCClient) GetDataTaxonomy(ctx context.Context, req *datap var resp *dataplexpb.DataTaxonomy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.GetDataTaxonomy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.GetDataTaxonomy, req, settings.GRPC, c.logger, "GetDataTaxonomy") return err }, opts...) if err != nil { @@ -574,7 +578,7 @@ func (c *dataTaxonomyGRPCClient) CreateDataAttributeBinding(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.CreateDataAttributeBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.CreateDataAttributeBinding, req, settings.GRPC, c.logger, "CreateDataAttributeBinding") return err }, opts...) if err != nil { @@ -594,7 +598,7 @@ func (c *dataTaxonomyGRPCClient) UpdateDataAttributeBinding(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.UpdateDataAttributeBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.UpdateDataAttributeBinding, req, settings.GRPC, c.logger, "UpdateDataAttributeBinding") return err }, opts...) if err != nil { @@ -614,7 +618,7 @@ func (c *dataTaxonomyGRPCClient) DeleteDataAttributeBinding(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.DeleteDataAttributeBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.DeleteDataAttributeBinding, req, settings.GRPC, c.logger, "DeleteDataAttributeBinding") return err }, opts...) if err != nil { @@ -645,7 +649,7 @@ func (c *dataTaxonomyGRPCClient) ListDataAttributeBindings(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.ListDataAttributeBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.ListDataAttributeBindings, req, settings.GRPC, c.logger, "ListDataAttributeBindings") return err }, opts...) if err != nil { @@ -680,7 +684,7 @@ func (c *dataTaxonomyGRPCClient) GetDataAttributeBinding(ctx context.Context, re var resp *dataplexpb.DataAttributeBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.GetDataAttributeBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.GetDataAttributeBinding, req, settings.GRPC, c.logger, "GetDataAttributeBinding") return err }, opts...) if err != nil { @@ -698,7 +702,7 @@ func (c *dataTaxonomyGRPCClient) CreateDataAttribute(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.CreateDataAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.CreateDataAttribute, req, settings.GRPC, c.logger, "CreateDataAttribute") return err }, opts...) if err != nil { @@ -718,7 +722,7 @@ func (c *dataTaxonomyGRPCClient) UpdateDataAttribute(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.UpdateDataAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.UpdateDataAttribute, req, settings.GRPC, c.logger, "UpdateDataAttribute") return err }, opts...) if err != nil { @@ -738,7 +742,7 @@ func (c *dataTaxonomyGRPCClient) DeleteDataAttribute(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.DeleteDataAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.DeleteDataAttribute, req, settings.GRPC, c.logger, "DeleteDataAttribute") return err }, opts...) if err != nil { @@ -769,7 +773,7 @@ func (c *dataTaxonomyGRPCClient) ListDataAttributes(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.ListDataAttributes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.ListDataAttributes, req, settings.GRPC, c.logger, "ListDataAttributes") return err }, opts...) if err != nil { @@ -804,7 +808,7 @@ func (c *dataTaxonomyGRPCClient) GetDataAttribute(ctx context.Context, req *data var resp *dataplexpb.DataAttribute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataTaxonomyClient.GetDataAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataTaxonomyClient.GetDataAttribute, req, settings.GRPC, c.logger, "GetDataAttribute") return err }, opts...) if err != nil { @@ -822,7 +826,7 @@ func (c *dataTaxonomyGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -851,7 +855,7 @@ func (c *dataTaxonomyGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -885,7 +889,7 @@ func (c *dataTaxonomyGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -899,7 +903,7 @@ func (c *dataTaxonomyGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -914,7 +918,7 @@ func (c *dataTaxonomyGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -943,7 +947,7 @@ func (c *dataTaxonomyGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/data_taxonomy_client_example_go123_test.go b/dataplex/apiv1/data_taxonomy_client_example_go123_test.go index 2a586a73bd8a..419c4c554001 100644 --- a/dataplex/apiv1/data_taxonomy_client_example_go123_test.go +++ b/dataplex/apiv1/data_taxonomy_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataTaxonomyClient_ListDataAttributeBindings_all() { } for resp, err := range c.ListDataAttributeBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataTaxonomyClient_ListDataAttributes_all() { } for resp, err := range c.ListDataAttributes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataTaxonomyClient_ListDataTaxonomies_all() { } for resp, err := range c.ListDataTaxonomies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataTaxonomyClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDataTaxonomyClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataplex/apiv1/dataplex_client.go b/dataplex/apiv1/dataplex_client.go index 4108ad1c90fe..463de24ca32a 100755 --- a/dataplex/apiv1/dataplex_client.go +++ b/dataplex/apiv1/dataplex_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -757,6 +758,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new dataplex service client based on gRPC. @@ -787,6 +790,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: dataplexpb.NewDataplexServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -842,7 +846,7 @@ func (c *gRPCClient) CreateLake(ctx context.Context, req *dataplexpb.CreateLakeR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateLake(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateLake, req, settings.GRPC, c.logger, "CreateLake") return err }, opts...) if err != nil { @@ -862,7 +866,7 @@ func (c *gRPCClient) UpdateLake(ctx context.Context, req *dataplexpb.UpdateLakeR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateLake(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateLake, req, settings.GRPC, c.logger, "UpdateLake") return err }, opts...) if err != nil { @@ -882,7 +886,7 @@ func (c *gRPCClient) DeleteLake(ctx context.Context, req *dataplexpb.DeleteLakeR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteLake(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteLake, req, settings.GRPC, c.logger, "DeleteLake") return err }, opts...) if err != nil { @@ -913,7 +917,7 @@ func (c *gRPCClient) ListLakes(ctx context.Context, req *dataplexpb.ListLakesReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLakes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLakes, req, settings.GRPC, c.logger, "ListLakes") return err }, opts...) if err != nil { @@ -948,7 +952,7 @@ func (c *gRPCClient) GetLake(ctx context.Context, req *dataplexpb.GetLakeRequest var resp *dataplexpb.Lake err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLake(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLake, req, settings.GRPC, c.logger, "GetLake") return err }, opts...) if err != nil { @@ -977,7 +981,7 @@ func (c *gRPCClient) ListLakeActions(ctx context.Context, req *dataplexpb.ListLa } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLakeActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLakeActions, req, settings.GRPC, c.logger, "ListLakeActions") return err }, opts...) if err != nil { @@ -1012,7 +1016,7 @@ func (c *gRPCClient) CreateZone(ctx context.Context, req *dataplexpb.CreateZoneR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateZone, req, settings.GRPC, c.logger, "CreateZone") return err }, opts...) if err != nil { @@ -1032,7 +1036,7 @@ func (c *gRPCClient) UpdateZone(ctx context.Context, req *dataplexpb.UpdateZoneR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateZone, req, settings.GRPC, c.logger, "UpdateZone") return err }, opts...) if err != nil { @@ -1052,7 +1056,7 @@ func (c *gRPCClient) DeleteZone(ctx context.Context, req *dataplexpb.DeleteZoneR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteZone, req, settings.GRPC, c.logger, "DeleteZone") return err }, opts...) if err != nil { @@ -1083,7 +1087,7 @@ func (c *gRPCClient) ListZones(ctx context.Context, req *dataplexpb.ListZonesReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListZones(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListZones, req, settings.GRPC, c.logger, "ListZones") return err }, opts...) if err != nil { @@ -1118,7 +1122,7 @@ func (c *gRPCClient) GetZone(ctx context.Context, req *dataplexpb.GetZoneRequest var resp *dataplexpb.Zone err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetZone, req, settings.GRPC, c.logger, "GetZone") return err }, opts...) if err != nil { @@ -1147,7 +1151,7 @@ func (c *gRPCClient) ListZoneActions(ctx context.Context, req *dataplexpb.ListZo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListZoneActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListZoneActions, req, settings.GRPC, c.logger, "ListZoneActions") return err }, opts...) if err != nil { @@ -1182,7 +1186,7 @@ func (c *gRPCClient) CreateAsset(ctx context.Context, req *dataplexpb.CreateAsse var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAsset, req, settings.GRPC, c.logger, "CreateAsset") return err }, opts...) if err != nil { @@ -1202,7 +1206,7 @@ func (c *gRPCClient) UpdateAsset(ctx context.Context, req *dataplexpb.UpdateAsse var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAsset, req, settings.GRPC, c.logger, "UpdateAsset") return err }, opts...) if err != nil { @@ -1222,7 +1226,7 @@ func (c *gRPCClient) DeleteAsset(ctx context.Context, req *dataplexpb.DeleteAsse var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAsset, req, settings.GRPC, c.logger, "DeleteAsset") return err }, opts...) if err != nil { @@ -1253,7 +1257,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *dataplexpb.ListAssetsR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1288,7 +1292,7 @@ func (c *gRPCClient) GetAsset(ctx context.Context, req *dataplexpb.GetAssetReque var resp *dataplexpb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAsset, req, settings.GRPC, c.logger, "GetAsset") return err }, opts...) if err != nil { @@ -1317,7 +1321,7 @@ func (c *gRPCClient) ListAssetActions(ctx context.Context, req *dataplexpb.ListA } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssetActions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssetActions, req, settings.GRPC, c.logger, "ListAssetActions") return err }, opts...) if err != nil { @@ -1352,7 +1356,7 @@ func (c *gRPCClient) CreateTask(ctx context.Context, req *dataplexpb.CreateTaskR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTask, req, settings.GRPC, c.logger, "CreateTask") return err }, opts...) if err != nil { @@ -1372,7 +1376,7 @@ func (c *gRPCClient) UpdateTask(ctx context.Context, req *dataplexpb.UpdateTaskR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTask, req, settings.GRPC, c.logger, "UpdateTask") return err }, opts...) if err != nil { @@ -1392,7 +1396,7 @@ func (c *gRPCClient) DeleteTask(ctx context.Context, req *dataplexpb.DeleteTaskR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTask, req, settings.GRPC, c.logger, "DeleteTask") return err }, opts...) if err != nil { @@ -1423,7 +1427,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *dataplexpb.ListTasksReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -1458,7 +1462,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *dataplexpb.GetTaskRequest var resp *dataplexpb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -1487,7 +1491,7 @@ func (c *gRPCClient) ListJobs(ctx context.Context, req *dataplexpb.ListJobsReque } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -1522,7 +1526,7 @@ func (c *gRPCClient) RunTask(ctx context.Context, req *dataplexpb.RunTaskRequest var resp *dataplexpb.RunTaskResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunTask, req, settings.GRPC, c.logger, "RunTask") return err }, opts...) if err != nil { @@ -1540,7 +1544,7 @@ func (c *gRPCClient) GetJob(ctx context.Context, req *dataplexpb.GetJobRequest, var resp *dataplexpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -1557,7 +1561,7 @@ func (c *gRPCClient) CancelJob(ctx context.Context, req *dataplexpb.CancelJobReq opts = append((*c.CallOptions).CancelJob[0:len((*c.CallOptions).CancelJob):len((*c.CallOptions).CancelJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CancelJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CancelJob, req, settings.GRPC, c.logger, "CancelJob") return err }, opts...) return err @@ -1572,7 +1576,7 @@ func (c *gRPCClient) CreateEnvironment(ctx context.Context, req *dataplexpb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -1592,7 +1596,7 @@ func (c *gRPCClient) UpdateEnvironment(ctx context.Context, req *dataplexpb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -1612,7 +1616,7 @@ func (c *gRPCClient) DeleteEnvironment(ctx context.Context, req *dataplexpb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) if err != nil { @@ -1643,7 +1647,7 @@ func (c *gRPCClient) ListEnvironments(ctx context.Context, req *dataplexpb.ListE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -1678,7 +1682,7 @@ func (c *gRPCClient) GetEnvironment(ctx context.Context, req *dataplexpb.GetEnvi var resp *dataplexpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -1707,7 +1711,7 @@ func (c *gRPCClient) ListSessions(ctx context.Context, req *dataplexpb.ListSessi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -1742,7 +1746,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1771,7 +1775,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1805,7 +1809,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1819,7 +1823,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1834,7 +1838,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1863,7 +1867,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/dataplex_client_example_go123_test.go b/dataplex/apiv1/dataplex_client_example_go123_test.go index 9e99d0226fd3..864bf98604cf 100644 --- a/dataplex/apiv1/dataplex_client_example_go123_test.go +++ b/dataplex/apiv1/dataplex_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAssetActions_all() { } for resp, err := range c.ListAssetActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListLakeActions_all() { } for resp, err := range c.ListLakeActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListLakes_all() { } for resp, err := range c.ListLakes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListZoneActions_all() { } for resp, err := range c.ListZoneActions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListZones_all() { } for resp, err := range c.ListZones(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -332,7 +332,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataplex/apiv1/dataplexpb/analyze.pb.go b/dataplex/apiv1/dataplexpb/analyze.pb.go index d0f2b5b80af0..11e6d50fca4b 100755 --- a/dataplex/apiv1/dataplexpb/analyze.pb.go +++ b/dataplex/apiv1/dataplexpb/analyze.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/analyze.proto @@ -175,11 +175,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -190,7 +188,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +329,9 @@ type Content struct { func (x *Content) Reset() { *x = Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content) String() string { @@ -346,7 +342,7 @@ func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +489,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -508,7 +502,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +567,9 @@ type Environment_InfrastructureSpec struct { func (x *Environment_InfrastructureSpec) Reset() { *x = Environment_InfrastructureSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_InfrastructureSpec) String() string { @@ -588,7 +580,7 @@ func (*Environment_InfrastructureSpec) ProtoMessage() {} func (x *Environment_InfrastructureSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +665,9 @@ type Environment_SessionSpec struct { func (x *Environment_SessionSpec) Reset() { *x = Environment_SessionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_SessionSpec) String() string { @@ -688,7 +678,7 @@ func (*Environment_SessionSpec) ProtoMessage() {} func (x *Environment_SessionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +720,9 @@ type Environment_SessionStatus struct { func (x *Environment_SessionStatus) Reset() { *x = Environment_SessionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_SessionStatus) String() string { @@ -745,7 +733,7 @@ func (*Environment_SessionStatus) ProtoMessage() {} func (x *Environment_SessionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +769,9 @@ type Environment_Endpoints struct { func (x *Environment_Endpoints) Reset() { *x = Environment_Endpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_Endpoints) String() string { @@ -796,7 +782,7 @@ func (*Environment_Endpoints) ProtoMessage() {} func (x *Environment_Endpoints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +829,9 @@ type Environment_InfrastructureSpec_ComputeResources struct { func (x *Environment_InfrastructureSpec_ComputeResources) Reset() { *x = Environment_InfrastructureSpec_ComputeResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_InfrastructureSpec_ComputeResources) String() string { @@ -858,7 +842,7 @@ func (*Environment_InfrastructureSpec_ComputeResources) ProtoMessage() {} func (x *Environment_InfrastructureSpec_ComputeResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +903,9 @@ type Environment_InfrastructureSpec_OsImageRuntime struct { func (x *Environment_InfrastructureSpec_OsImageRuntime) Reset() { *x = Environment_InfrastructureSpec_OsImageRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_InfrastructureSpec_OsImageRuntime) String() string { @@ -934,7 +916,7 @@ func (*Environment_InfrastructureSpec_OsImageRuntime) ProtoMessage() {} func (x *Environment_InfrastructureSpec_OsImageRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +971,9 @@ type Content_SqlScript struct { func (x *Content_SqlScript) Reset() { *x = Content_SqlScript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content_SqlScript) String() string { @@ -1004,7 +984,7 @@ func (*Content_SqlScript) ProtoMessage() {} func (x *Content_SqlScript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1018,9 @@ type Content_Notebook struct { func (x *Content_Notebook) Reset() { *x = Content_Notebook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Content_Notebook) String() string { @@ -1053,7 +1031,7 @@ func (*Content_Notebook) ProtoMessage() {} func (x *Content_Notebook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_analyze_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1388,140 +1366,6 @@ func file_google_cloud_dataplex_v1_analyze_proto_init() { return } file_google_cloud_dataplex_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Environment_InfrastructureSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Environment_SessionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Environment_SessionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Environment_Endpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Environment_InfrastructureSpec_ComputeResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Environment_InfrastructureSpec_OsImageRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Content_SqlScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_analyze_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Content_Notebook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_analyze_proto_msgTypes[1].OneofWrappers = []any{ (*Content_DataText)(nil), (*Content_SqlScript_)(nil), diff --git a/dataplex/apiv1/dataplexpb/catalog.pb.go b/dataplex/apiv1/dataplexpb/catalog.pb.go index f66db48c0aca..415135fc3543 100755 --- a/dataplex/apiv1/dataplexpb/catalog.pb.go +++ b/dataplex/apiv1/dataplexpb/catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/catalog.proto @@ -449,11 +449,9 @@ type AspectType struct { func (x *AspectType) Reset() { *x = AspectType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType) String() string { @@ -464,7 +462,7 @@ func (*AspectType) ProtoMessage() {} func (x *AspectType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +588,9 @@ type EntryGroup struct { func (x *EntryGroup) Reset() { *x = EntryGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryGroup) String() string { @@ -605,7 +601,7 @@ func (*EntryGroup) ProtoMessage() {} func (x *EntryGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +722,9 @@ type EntryType struct { func (x *EntryType) Reset() { *x = EntryType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryType) String() string { @@ -741,7 +735,7 @@ func (*EntryType) ProtoMessage() {} func (x *EntryType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +864,9 @@ type Aspect struct { func (x *Aspect) Reset() { *x = Aspect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aspect) String() string { @@ -885,7 +877,7 @@ func (*Aspect) ProtoMessage() {} func (x *Aspect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +952,9 @@ type AspectSource struct { func (x *AspectSource) Reset() { *x = AspectSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectSource) String() string { @@ -975,7 +965,7 @@ func (*AspectSource) ProtoMessage() {} func (x *AspectSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1042,9 @@ type Entry struct { func (x *Entry) Reset() { *x = Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entry) String() string { @@ -1067,7 +1055,7 @@ func (*Entry) ProtoMessage() {} func (x *Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1182,11 +1170,9 @@ type EntrySource struct { func (x *EntrySource) Reset() { *x = EntrySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntrySource) String() string { @@ -1197,7 +1183,7 @@ func (*EntrySource) ProtoMessage() {} func (x *EntrySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1289,9 @@ type CreateEntryGroupRequest struct { func (x *CreateEntryGroupRequest) Reset() { *x = CreateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryGroupRequest) String() string { @@ -1318,7 +1302,7 @@ func (*CreateEntryGroupRequest) ProtoMessage() {} func (x *CreateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1378,11 +1362,9 @@ type UpdateEntryGroupRequest struct { func (x *UpdateEntryGroupRequest) Reset() { *x = UpdateEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryGroupRequest) String() string { @@ -1393,7 +1375,7 @@ func (*UpdateEntryGroupRequest) ProtoMessage() {} func (x *UpdateEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,11 +1428,9 @@ type DeleteEntryGroupRequest struct { func (x *DeleteEntryGroupRequest) Reset() { *x = DeleteEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryGroupRequest) String() string { @@ -1461,7 +1441,7 @@ func (*DeleteEntryGroupRequest) ProtoMessage() {} func (x *DeleteEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1498,9 @@ type ListEntryGroupsRequest struct { func (x *ListEntryGroupsRequest) Reset() { *x = ListEntryGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsRequest) String() string { @@ -1533,7 +1511,7 @@ func (*ListEntryGroupsRequest) ProtoMessage() {} func (x *ListEntryGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1600,11 +1578,9 @@ type ListEntryGroupsResponse struct { func (x *ListEntryGroupsResponse) Reset() { *x = ListEntryGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryGroupsResponse) String() string { @@ -1615,7 +1591,7 @@ func (*ListEntryGroupsResponse) ProtoMessage() {} func (x *ListEntryGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1664,11 +1640,9 @@ type GetEntryGroupRequest struct { func (x *GetEntryGroupRequest) Reset() { *x = GetEntryGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryGroupRequest) String() string { @@ -1679,7 +1653,7 @@ func (*GetEntryGroupRequest) ProtoMessage() {} func (x *GetEntryGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1722,11 +1696,9 @@ type CreateEntryTypeRequest struct { func (x *CreateEntryTypeRequest) Reset() { *x = CreateEntryTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryTypeRequest) String() string { @@ -1737,7 +1709,7 @@ func (*CreateEntryTypeRequest) ProtoMessage() {} func (x *CreateEntryTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1797,11 +1769,9 @@ type UpdateEntryTypeRequest struct { func (x *UpdateEntryTypeRequest) Reset() { *x = UpdateEntryTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryTypeRequest) String() string { @@ -1812,7 +1782,7 @@ func (*UpdateEntryTypeRequest) ProtoMessage() {} func (x *UpdateEntryTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1864,11 +1834,9 @@ type DeleteEntryTypeRequest struct { func (x *DeleteEntryTypeRequest) Reset() { *x = DeleteEntryTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryTypeRequest) String() string { @@ -1879,7 +1847,7 @@ func (*DeleteEntryTypeRequest) ProtoMessage() {} func (x *DeleteEntryTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1944,11 +1912,9 @@ type ListEntryTypesRequest struct { func (x *ListEntryTypesRequest) Reset() { *x = ListEntryTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryTypesRequest) String() string { @@ -1959,7 +1925,7 @@ func (*ListEntryTypesRequest) ProtoMessage() {} func (x *ListEntryTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2026,11 +1992,9 @@ type ListEntryTypesResponse struct { func (x *ListEntryTypesResponse) Reset() { *x = ListEntryTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntryTypesResponse) String() string { @@ -2041,7 +2005,7 @@ func (*ListEntryTypesResponse) ProtoMessage() {} func (x *ListEntryTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2090,11 +2054,9 @@ type GetEntryTypeRequest struct { func (x *GetEntryTypeRequest) Reset() { *x = GetEntryTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryTypeRequest) String() string { @@ -2105,7 +2067,7 @@ func (*GetEntryTypeRequest) ProtoMessage() {} func (x *GetEntryTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,11 +2110,9 @@ type CreateAspectTypeRequest struct { func (x *CreateAspectTypeRequest) Reset() { *x = CreateAspectTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAspectTypeRequest) String() string { @@ -2163,7 +2123,7 @@ func (*CreateAspectTypeRequest) ProtoMessage() {} func (x *CreateAspectTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,11 +2183,9 @@ type UpdateAspectTypeRequest struct { func (x *UpdateAspectTypeRequest) Reset() { *x = UpdateAspectTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAspectTypeRequest) String() string { @@ -2238,7 +2196,7 @@ func (*UpdateAspectTypeRequest) ProtoMessage() {} func (x *UpdateAspectTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2291,11 +2249,9 @@ type DeleteAspectTypeRequest struct { func (x *DeleteAspectTypeRequest) Reset() { *x = DeleteAspectTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAspectTypeRequest) String() string { @@ -2306,7 +2262,7 @@ func (*DeleteAspectTypeRequest) ProtoMessage() {} func (x *DeleteAspectTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2371,11 +2327,9 @@ type ListAspectTypesRequest struct { func (x *ListAspectTypesRequest) Reset() { *x = ListAspectTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAspectTypesRequest) String() string { @@ -2386,7 +2340,7 @@ func (*ListAspectTypesRequest) ProtoMessage() {} func (x *ListAspectTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2453,11 +2407,9 @@ type ListAspectTypesResponse struct { func (x *ListAspectTypesResponse) Reset() { *x = ListAspectTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAspectTypesResponse) String() string { @@ -2468,7 +2420,7 @@ func (*ListAspectTypesResponse) ProtoMessage() {} func (x *ListAspectTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2517,11 +2469,9 @@ type GetAspectTypeRequest struct { func (x *GetAspectTypeRequest) Reset() { *x = GetAspectTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAspectTypeRequest) String() string { @@ -2532,7 +2482,7 @@ func (*GetAspectTypeRequest) ProtoMessage() {} func (x *GetAspectTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2590,11 +2540,9 @@ type CreateEntryRequest struct { func (x *CreateEntryRequest) Reset() { *x = CreateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryRequest) String() string { @@ -2605,7 +2553,7 @@ func (*CreateEntryRequest) ProtoMessage() {} func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2685,11 +2633,9 @@ type UpdateEntryRequest struct { func (x *UpdateEntryRequest) Reset() { *x = UpdateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntryRequest) String() string { @@ -2700,7 +2646,7 @@ func (*UpdateEntryRequest) ProtoMessage() {} func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2763,11 +2709,9 @@ type DeleteEntryRequest struct { func (x *DeleteEntryRequest) Reset() { *x = DeleteEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryRequest) String() string { @@ -2778,7 +2722,7 @@ func (*DeleteEntryRequest) ProtoMessage() {} func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2843,11 +2787,9 @@ type ListEntriesRequest struct { func (x *ListEntriesRequest) Reset() { *x = ListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesRequest) String() string { @@ -2858,7 +2800,7 @@ func (*ListEntriesRequest) ProtoMessage() {} func (x *ListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2916,11 +2858,9 @@ type ListEntriesResponse struct { func (x *ListEntriesResponse) Reset() { *x = ListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntriesResponse) String() string { @@ -2931,7 +2871,7 @@ func (*ListEntriesResponse) ProtoMessage() {} func (x *ListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2982,11 +2922,9 @@ type GetEntryRequest struct { func (x *GetEntryRequest) Reset() { *x = GetEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryRequest) String() string { @@ -2997,7 +2935,7 @@ func (*GetEntryRequest) ProtoMessage() {} func (x *GetEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3065,11 +3003,9 @@ type LookupEntryRequest struct { func (x *LookupEntryRequest) Reset() { *x = LookupEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEntryRequest) String() string { @@ -3080,7 +3016,7 @@ func (*LookupEntryRequest) ProtoMessage() {} func (x *LookupEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3158,11 +3094,9 @@ type SearchEntriesRequest struct { func (x *SearchEntriesRequest) Reset() { *x = SearchEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntriesRequest) String() string { @@ -3173,7 +3107,7 @@ func (*SearchEntriesRequest) ProtoMessage() {} func (x *SearchEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3249,11 +3183,9 @@ type SearchEntriesResult struct { func (x *SearchEntriesResult) Reset() { *x = SearchEntriesResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntriesResult) String() string { @@ -3264,7 +3196,7 @@ func (*SearchEntriesResult) ProtoMessage() {} func (x *SearchEntriesResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3322,11 +3254,9 @@ type SearchEntriesResponse struct { func (x *SearchEntriesResponse) Reset() { *x = SearchEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntriesResponse) String() string { @@ -3337,7 +3267,7 @@ func (*SearchEntriesResponse) ProtoMessage() {} func (x *SearchEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3436,11 +3366,9 @@ type ImportItem struct { func (x *ImportItem) Reset() { *x = ImportItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportItem) String() string { @@ -3451,7 +3379,7 @@ func (*ImportItem) ProtoMessage() {} func (x *ImportItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3508,11 +3436,9 @@ type CreateMetadataJobRequest struct { func (x *CreateMetadataJobRequest) Reset() { *x = CreateMetadataJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataJobRequest) String() string { @@ -3523,7 +3449,7 @@ func (*CreateMetadataJobRequest) ProtoMessage() {} func (x *CreateMetadataJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3579,11 +3505,9 @@ type GetMetadataJobRequest struct { func (x *GetMetadataJobRequest) Reset() { *x = GetMetadataJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataJobRequest) String() string { @@ -3594,7 +3518,7 @@ func (*GetMetadataJobRequest) ProtoMessage() {} func (x *GetMetadataJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3651,11 +3575,9 @@ type ListMetadataJobsRequest struct { func (x *ListMetadataJobsRequest) Reset() { *x = ListMetadataJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataJobsRequest) String() string { @@ -3666,7 +3588,7 @@ func (*ListMetadataJobsRequest) ProtoMessage() {} func (x *ListMetadataJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3733,11 +3655,9 @@ type ListMetadataJobsResponse struct { func (x *ListMetadataJobsResponse) Reset() { *x = ListMetadataJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataJobsResponse) String() string { @@ -3748,7 +3668,7 @@ func (*ListMetadataJobsResponse) ProtoMessage() {} func (x *ListMetadataJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3797,11 +3717,9 @@ type CancelMetadataJobRequest struct { func (x *CancelMetadataJobRequest) Reset() { *x = CancelMetadataJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelMetadataJobRequest) String() string { @@ -3812,7 +3730,7 @@ func (*CancelMetadataJobRequest) ProtoMessage() {} func (x *CancelMetadataJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3870,11 +3788,9 @@ type MetadataJob struct { func (x *MetadataJob) Reset() { *x = MetadataJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataJob) String() string { @@ -3885,7 +3801,7 @@ func (*MetadataJob) ProtoMessage() {} func (x *MetadataJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4013,11 +3929,9 @@ type AspectType_Authorization struct { func (x *AspectType_Authorization) Reset() { *x = AspectType_Authorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType_Authorization) String() string { @@ -4028,7 +3942,7 @@ func (*AspectType_Authorization) ProtoMessage() {} func (x *AspectType_Authorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4118,11 +4032,9 @@ type AspectType_MetadataTemplate struct { func (x *AspectType_MetadataTemplate) Reset() { *x = AspectType_MetadataTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType_MetadataTemplate) String() string { @@ -4133,7 +4045,7 @@ func (*AspectType_MetadataTemplate) ProtoMessage() {} func (x *AspectType_MetadataTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4243,11 +4155,9 @@ type AspectType_MetadataTemplate_EnumValue struct { func (x *AspectType_MetadataTemplate_EnumValue) Reset() { *x = AspectType_MetadataTemplate_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType_MetadataTemplate_EnumValue) String() string { @@ -4258,7 +4168,7 @@ func (*AspectType_MetadataTemplate_EnumValue) ProtoMessage() {} func (x *AspectType_MetadataTemplate_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4306,11 +4216,9 @@ type AspectType_MetadataTemplate_Constraints struct { func (x *AspectType_MetadataTemplate_Constraints) Reset() { *x = AspectType_MetadataTemplate_Constraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType_MetadataTemplate_Constraints) String() string { @@ -4321,7 +4229,7 @@ func (*AspectType_MetadataTemplate_Constraints) ProtoMessage() {} func (x *AspectType_MetadataTemplate_Constraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4373,11 +4281,9 @@ type AspectType_MetadataTemplate_Annotations struct { func (x *AspectType_MetadataTemplate_Annotations) Reset() { *x = AspectType_MetadataTemplate_Annotations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AspectType_MetadataTemplate_Annotations) String() string { @@ -4388,7 +4294,7 @@ func (*AspectType_MetadataTemplate_Annotations) ProtoMessage() {} func (x *AspectType_MetadataTemplate_Annotations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4456,11 +4362,9 @@ type EntryType_AspectInfo struct { func (x *EntryType_AspectInfo) Reset() { *x = EntryType_AspectInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryType_AspectInfo) String() string { @@ -4471,7 +4375,7 @@ func (*EntryType_AspectInfo) ProtoMessage() {} func (x *EntryType_AspectInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4507,11 +4411,9 @@ type EntryType_Authorization struct { func (x *EntryType_Authorization) Reset() { *x = EntryType_Authorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryType_Authorization) String() string { @@ -4522,7 +4424,7 @@ func (*EntryType_Authorization) ProtoMessage() {} func (x *EntryType_Authorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4559,11 +4461,9 @@ type EntrySource_Ancestor struct { func (x *EntrySource_Ancestor) Reset() { *x = EntrySource_Ancestor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntrySource_Ancestor) String() string { @@ -4574,7 +4474,7 @@ func (*EntrySource_Ancestor) ProtoMessage() {} func (x *EntrySource_Ancestor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4620,11 +4520,9 @@ type SearchEntriesResult_Snippets struct { func (x *SearchEntriesResult_Snippets) Reset() { *x = SearchEntriesResult_Snippets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntriesResult_Snippets) String() string { @@ -4635,7 +4533,7 @@ func (*SearchEntriesResult_Snippets) ProtoMessage() {} func (x *SearchEntriesResult_Snippets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4680,11 +4578,9 @@ type MetadataJob_ImportJobResult struct { func (x *MetadataJob_ImportJobResult) Reset() { *x = MetadataJob_ImportJobResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataJob_ImportJobResult) String() string { @@ -4695,7 +4591,7 @@ func (*MetadataJob_ImportJobResult) ProtoMessage() {} func (x *MetadataJob_ImportJobResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4806,11 +4702,9 @@ type MetadataJob_ImportJobSpec struct { func (x *MetadataJob_ImportJobSpec) Reset() { *x = MetadataJob_ImportJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataJob_ImportJobSpec) String() string { @@ -4821,7 +4715,7 @@ func (*MetadataJob_ImportJobSpec) ProtoMessage() {} func (x *MetadataJob_ImportJobSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4896,11 +4790,9 @@ type MetadataJob_Status struct { func (x *MetadataJob_Status) Reset() { *x = MetadataJob_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataJob_Status) String() string { @@ -4911,7 +4803,7 @@ func (*MetadataJob_Status) ProtoMessage() {} func (x *MetadataJob_Status) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4997,11 +4889,9 @@ type MetadataJob_ImportJobSpec_ImportJobScope struct { func (x *MetadataJob_ImportJobSpec_ImportJobScope) Reset() { *x = MetadataJob_ImportJobSpec_ImportJobScope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataJob_ImportJobSpec_ImportJobScope) String() string { @@ -5012,7 +4902,7 @@ func (*MetadataJob_ImportJobSpec_ImportJobScope) ProtoMessage() {} func (x *MetadataJob_ImportJobSpec_ImportJobScope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_catalog_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6572,668 +6462,6 @@ func file_google_cloud_dataplex_v1_catalog_proto_init() { return } file_google_cloud_dataplex_v1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AspectType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EntryGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EntryType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Aspect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AspectSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EntrySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListEntryTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateAspectTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAspectTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAspectTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAspectTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListAspectTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetAspectTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*LookupEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntriesResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ImportItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CancelMetadataJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*MetadataJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AspectType_Authorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*AspectType_MetadataTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*AspectType_MetadataTemplate_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*AspectType_MetadataTemplate_Constraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*AspectType_MetadataTemplate_Annotations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*EntryType_AspectInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*EntryType_Authorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*EntrySource_Ancestor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntriesResult_Snippets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*MetadataJob_ImportJobResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*MetadataJob_ImportJobSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*MetadataJob_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_catalog_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*MetadataJob_ImportJobSpec_ImportJobScope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_catalog_proto_msgTypes[41].OneofWrappers = []any{ (*MetadataJob_ImportSpec)(nil), (*MetadataJob_ImportResult)(nil), diff --git a/dataplex/apiv1/dataplexpb/content.pb.go b/dataplex/apiv1/dataplexpb/content.pb.go index 5c3f993bd3c5..48c0c93b846a 100755 --- a/dataplex/apiv1/dataplexpb/content.pb.go +++ b/dataplex/apiv1/dataplexpb/content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/content.proto @@ -116,11 +116,9 @@ type CreateContentRequest struct { func (x *CreateContentRequest) Reset() { *x = CreateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContentRequest) String() string { @@ -131,7 +129,7 @@ func (*CreateContentRequest) ProtoMessage() {} func (x *CreateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type UpdateContentRequest struct { func (x *UpdateContentRequest) Reset() { *x = UpdateContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContentRequest) String() string { @@ -200,7 +196,7 @@ func (*UpdateContentRequest) ProtoMessage() {} func (x *UpdateContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +245,9 @@ type DeleteContentRequest struct { func (x *DeleteContentRequest) Reset() { *x = DeleteContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContentRequest) String() string { @@ -264,7 +258,7 @@ func (*DeleteContentRequest) ProtoMessage() {} func (x *DeleteContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type ListContentRequest struct { func (x *ListContentRequest) Reset() { *x = ListContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContentRequest) String() string { @@ -333,7 +325,7 @@ func (*ListContentRequest) ProtoMessage() {} func (x *ListContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +383,9 @@ type ListContentResponse struct { func (x *ListContentResponse) Reset() { *x = ListContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContentResponse) String() string { @@ -406,7 +396,7 @@ func (*ListContentResponse) ProtoMessage() {} func (x *ListContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +440,9 @@ type GetContentRequest struct { func (x *GetContentRequest) Reset() { *x = GetContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContentRequest) String() string { @@ -465,7 +453,7 @@ func (*GetContentRequest) ProtoMessage() {} func (x *GetContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_content_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,80 +777,6 @@ func file_google_cloud_dataplex_v1_content_proto_init() { return } file_google_cloud_dataplex_v1_analyze_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_content_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_content_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_content_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataplex/apiv1/dataplexpb/data_discovery.pb.go b/dataplex/apiv1/dataplexpb/data_discovery.pb.go index 8f2cc540471f..5eebafd0c99d 100755 --- a/dataplex/apiv1/dataplexpb/data_discovery.pb.go +++ b/dataplex/apiv1/dataplexpb/data_discovery.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/data_discovery.proto @@ -111,11 +111,9 @@ type DataDiscoverySpec struct { func (x *DataDiscoverySpec) Reset() { *x = DataDiscoverySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoverySpec) String() string { @@ -126,7 +124,7 @@ func (*DataDiscoverySpec) ProtoMessage() {} func (x *DataDiscoverySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type DataDiscoveryResult struct { func (x *DataDiscoveryResult) Reset() { *x = DataDiscoveryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoveryResult) String() string { @@ -200,7 +196,7 @@ func (*DataDiscoveryResult) ProtoMessage() {} func (x *DataDiscoveryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +235,9 @@ type DataDiscoverySpec_BigQueryPublishingConfig struct { func (x *DataDiscoverySpec_BigQueryPublishingConfig) Reset() { *x = DataDiscoverySpec_BigQueryPublishingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoverySpec_BigQueryPublishingConfig) String() string { @@ -254,7 +248,7 @@ func (*DataDiscoverySpec_BigQueryPublishingConfig) ProtoMessage() {} func (x *DataDiscoverySpec_BigQueryPublishingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +304,9 @@ type DataDiscoverySpec_StorageConfig struct { func (x *DataDiscoverySpec_StorageConfig) Reset() { *x = DataDiscoverySpec_StorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoverySpec_StorageConfig) String() string { @@ -325,7 +317,7 @@ func (*DataDiscoverySpec_StorageConfig) ProtoMessage() {} func (x *DataDiscoverySpec_StorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +385,9 @@ type DataDiscoverySpec_StorageConfig_CsvOptions struct { func (x *DataDiscoverySpec_StorageConfig_CsvOptions) Reset() { *x = DataDiscoverySpec_StorageConfig_CsvOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoverySpec_StorageConfig_CsvOptions) String() string { @@ -408,7 +398,7 @@ func (*DataDiscoverySpec_StorageConfig_CsvOptions) ProtoMessage() {} func (x *DataDiscoverySpec_StorageConfig_CsvOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +464,9 @@ type DataDiscoverySpec_StorageConfig_JsonOptions struct { func (x *DataDiscoverySpec_StorageConfig_JsonOptions) Reset() { *x = DataDiscoverySpec_StorageConfig_JsonOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoverySpec_StorageConfig_JsonOptions) String() string { @@ -489,7 +477,7 @@ func (*DataDiscoverySpec_StorageConfig_JsonOptions) ProtoMessage() {} func (x *DataDiscoverySpec_StorageConfig_JsonOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +520,9 @@ type DataDiscoveryResult_BigQueryPublishing struct { func (x *DataDiscoveryResult_BigQueryPublishing) Reset() { *x = DataDiscoveryResult_BigQueryPublishing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDiscoveryResult_BigQueryPublishing) String() string { @@ -547,7 +533,7 @@ func (*DataDiscoveryResult_BigQueryPublishing) ProtoMessage() {} func (x *DataDiscoveryResult_BigQueryPublishing) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,92 +723,6 @@ func file_google_cloud_dataplex_v1_data_discovery_proto_init() { if File_google_cloud_dataplex_v1_data_discovery_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoverySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoveryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoverySpec_BigQueryPublishingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoverySpec_StorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoverySpec_StorageConfig_CsvOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoverySpec_StorageConfig_JsonOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataDiscoveryResult_BigQueryPublishing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_data_discovery_proto_msgTypes[0].OneofWrappers = []any{ (*DataDiscoverySpec_StorageConfig_)(nil), } diff --git a/dataplex/apiv1/dataplexpb/data_profile.pb.go b/dataplex/apiv1/dataplexpb/data_profile.pb.go index b1de672b3e13..db4a14344e63 100755 --- a/dataplex/apiv1/dataplexpb/data_profile.pb.go +++ b/dataplex/apiv1/dataplexpb/data_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/data_profile.proto @@ -129,11 +129,9 @@ type DataProfileSpec struct { func (x *DataProfileSpec) Reset() { *x = DataProfileSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileSpec) String() string { @@ -144,7 +142,7 @@ func (*DataProfileSpec) ProtoMessage() {} func (x *DataProfileSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +211,9 @@ type DataProfileResult struct { func (x *DataProfileResult) Reset() { *x = DataProfileResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult) String() string { @@ -228,7 +224,7 @@ func (*DataProfileResult) ProtoMessage() {} func (x *DataProfileResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +280,9 @@ type DataProfileSpec_PostScanActions struct { func (x *DataProfileSpec_PostScanActions) Reset() { *x = DataProfileSpec_PostScanActions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileSpec_PostScanActions) String() string { @@ -299,7 +293,7 @@ func (*DataProfileSpec_PostScanActions) ProtoMessage() {} func (x *DataProfileSpec_PostScanActions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +333,9 @@ type DataProfileSpec_SelectedFields struct { func (x *DataProfileSpec_SelectedFields) Reset() { *x = DataProfileSpec_SelectedFields{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileSpec_SelectedFields) String() string { @@ -354,7 +346,7 @@ func (*DataProfileSpec_SelectedFields) ProtoMessage() {} func (x *DataProfileSpec_SelectedFields) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +382,9 @@ type DataProfileSpec_PostScanActions_BigQueryExport struct { func (x *DataProfileSpec_PostScanActions_BigQueryExport) Reset() { *x = DataProfileSpec_PostScanActions_BigQueryExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileSpec_PostScanActions_BigQueryExport) String() string { @@ -405,7 +395,7 @@ func (*DataProfileSpec_PostScanActions_BigQueryExport) ProtoMessage() {} func (x *DataProfileSpec_PostScanActions_BigQueryExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +429,9 @@ type DataProfileResult_Profile struct { func (x *DataProfileResult_Profile) Reset() { *x = DataProfileResult_Profile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile) String() string { @@ -454,7 +442,7 @@ func (*DataProfileResult_Profile) ProtoMessage() {} func (x *DataProfileResult_Profile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +476,9 @@ type DataProfileResult_PostScanActionsResult struct { func (x *DataProfileResult_PostScanActionsResult) Reset() { *x = DataProfileResult_PostScanActionsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_PostScanActionsResult) String() string { @@ -503,7 +489,7 @@ func (*DataProfileResult_PostScanActionsResult) ProtoMessage() {} func (x *DataProfileResult_PostScanActionsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +537,9 @@ type DataProfileResult_Profile_Field struct { func (x *DataProfileResult_Profile_Field) Reset() { *x = DataProfileResult_Profile_Field{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field) String() string { @@ -566,7 +550,7 @@ func (*DataProfileResult_Profile_Field) ProtoMessage() {} func (x *DataProfileResult_Profile_Field) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +624,9 @@ type DataProfileResult_Profile_Field_ProfileInfo struct { func (x *DataProfileResult_Profile_Field_ProfileInfo) Reset() { *x = DataProfileResult_Profile_Field_ProfileInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field_ProfileInfo) String() string { @@ -655,7 +637,7 @@ func (*DataProfileResult_Profile_Field_ProfileInfo) ProtoMessage() {} func (x *DataProfileResult_Profile_Field_ProfileInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +745,9 @@ type DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo struct { func (x *DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo) Reset() { *x = DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo) String() string { @@ -778,7 +758,7 @@ func (*DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo) ProtoMessage func (x *DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +829,9 @@ type DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo struct { func (x *DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo) Reset() { *x = DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo) String() string { @@ -864,7 +842,7 @@ func (*DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo) ProtoMessag func (x *DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +926,9 @@ type DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo struct { func (x *DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo) Reset() { *x = DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo) String() string { @@ -963,7 +939,7 @@ func (*DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo) ProtoMessage func (x *DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1006,9 @@ type DataProfileResult_Profile_Field_ProfileInfo_TopNValue struct { func (x *DataProfileResult_Profile_Field_ProfileInfo_TopNValue) Reset() { *x = DataProfileResult_Profile_Field_ProfileInfo_TopNValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_Profile_Field_ProfileInfo_TopNValue) String() string { @@ -1045,7 +1019,7 @@ func (*DataProfileResult_Profile_Field_ProfileInfo_TopNValue) ProtoMessage() {} func (x *DataProfileResult_Profile_Field_ProfileInfo_TopNValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1069,9 @@ type DataProfileResult_PostScanActionsResult_BigQueryExportResult struct { func (x *DataProfileResult_PostScanActionsResult_BigQueryExportResult) Reset() { *x = DataProfileResult_PostScanActionsResult_BigQueryExportResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileResult_PostScanActionsResult_BigQueryExportResult) String() string { @@ -1110,7 +1082,7 @@ func (*DataProfileResult_PostScanActionsResult_BigQueryExportResult) ProtoMessag func (x *DataProfileResult_PostScanActionsResult_BigQueryExportResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,176 +1370,6 @@ func file_google_cloud_dataplex_v1_data_profile_proto_init() { return } file_google_cloud_dataplex_v1_processing_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileSpec_PostScanActions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileSpec_SelectedFields); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileSpec_PostScanActions_BigQueryExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_PostScanActionsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field_ProfileInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_Profile_Field_ProfileInfo_TopNValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileResult_PostScanActionsResult_BigQueryExportResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_data_profile_proto_msgTypes[8].OneofWrappers = []any{ (*DataProfileResult_Profile_Field_ProfileInfo_StringProfile)(nil), (*DataProfileResult_Profile_Field_ProfileInfo_IntegerProfile)(nil), diff --git a/dataplex/apiv1/dataplexpb/data_quality.pb.go b/dataplex/apiv1/dataplexpb/data_quality.pb.go index 347b6f9440a6..aea732302989 100755 --- a/dataplex/apiv1/dataplexpb/data_quality.pb.go +++ b/dataplex/apiv1/dataplexpb/data_quality.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/data_quality.proto @@ -179,11 +179,9 @@ type DataQualitySpec struct { func (x *DataQualitySpec) Reset() { *x = DataQualitySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec) String() string { @@ -194,7 +192,7 @@ func (*DataQualitySpec) ProtoMessage() {} func (x *DataQualitySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +269,9 @@ type DataQualityResult struct { func (x *DataQualityResult) Reset() { *x = DataQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityResult) String() string { @@ -286,7 +282,7 @@ func (*DataQualityResult) ProtoMessage() {} func (x *DataQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +397,9 @@ type DataQualityRuleResult struct { func (x *DataQualityRuleResult) Reset() { *x = DataQualityRuleResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRuleResult) String() string { @@ -416,7 +410,7 @@ func (*DataQualityRuleResult) ProtoMessage() {} func (x *DataQualityRuleResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +502,9 @@ type DataQualityDimensionResult struct { func (x *DataQualityDimensionResult) Reset() { *x = DataQualityDimensionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityDimensionResult) String() string { @@ -523,7 +515,7 @@ func (*DataQualityDimensionResult) ProtoMessage() {} func (x *DataQualityDimensionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +566,9 @@ type DataQualityDimension struct { func (x *DataQualityDimension) Reset() { *x = DataQualityDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityDimension) String() string { @@ -589,7 +579,7 @@ func (*DataQualityDimension) ProtoMessage() {} func (x *DataQualityDimension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +665,9 @@ type DataQualityRule struct { func (x *DataQualityRule) Reset() { *x = DataQualityRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule) String() string { @@ -690,7 +678,7 @@ func (*DataQualityRule) ProtoMessage() {} func (x *DataQualityRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -917,11 +905,9 @@ type DataQualityColumnResult struct { func (x *DataQualityColumnResult) Reset() { *x = DataQualityColumnResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityColumnResult) String() string { @@ -932,7 +918,7 @@ func (*DataQualityColumnResult) ProtoMessage() {} func (x *DataQualityColumnResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +963,9 @@ type DataQualitySpec_PostScanActions struct { func (x *DataQualitySpec_PostScanActions) Reset() { *x = DataQualitySpec_PostScanActions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions) String() string { @@ -992,7 +976,7 @@ func (*DataQualitySpec_PostScanActions) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1019,9 @@ type DataQualitySpec_PostScanActions_BigQueryExport struct { func (x *DataQualitySpec_PostScanActions_BigQueryExport) Reset() { *x = DataQualitySpec_PostScanActions_BigQueryExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_BigQueryExport) String() string { @@ -1050,7 +1032,7 @@ func (*DataQualitySpec_PostScanActions_BigQueryExport) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_BigQueryExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1068,9 @@ type DataQualitySpec_PostScanActions_Recipients struct { func (x *DataQualitySpec_PostScanActions_Recipients) Reset() { *x = DataQualitySpec_PostScanActions_Recipients{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_Recipients) String() string { @@ -1101,7 +1081,7 @@ func (*DataQualitySpec_PostScanActions_Recipients) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_Recipients) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1116,9 @@ type DataQualitySpec_PostScanActions_ScoreThresholdTrigger struct { func (x *DataQualitySpec_PostScanActions_ScoreThresholdTrigger) Reset() { *x = DataQualitySpec_PostScanActions_ScoreThresholdTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_ScoreThresholdTrigger) String() string { @@ -1151,7 +1129,7 @@ func (*DataQualitySpec_PostScanActions_ScoreThresholdTrigger) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_ScoreThresholdTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1161,9 @@ type DataQualitySpec_PostScanActions_JobFailureTrigger struct { func (x *DataQualitySpec_PostScanActions_JobFailureTrigger) Reset() { *x = DataQualitySpec_PostScanActions_JobFailureTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_JobFailureTrigger) String() string { @@ -1198,7 +1174,7 @@ func (*DataQualitySpec_PostScanActions_JobFailureTrigger) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_JobFailureTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1199,9 @@ type DataQualitySpec_PostScanActions_JobEndTrigger struct { func (x *DataQualitySpec_PostScanActions_JobEndTrigger) Reset() { *x = DataQualitySpec_PostScanActions_JobEndTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_JobEndTrigger) String() string { @@ -1238,7 +1212,7 @@ func (*DataQualitySpec_PostScanActions_JobEndTrigger) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_JobEndTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1271,11 +1245,9 @@ type DataQualitySpec_PostScanActions_NotificationReport struct { func (x *DataQualitySpec_PostScanActions_NotificationReport) Reset() { *x = DataQualitySpec_PostScanActions_NotificationReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualitySpec_PostScanActions_NotificationReport) String() string { @@ -1286,7 +1258,7 @@ func (*DataQualitySpec_PostScanActions_NotificationReport) ProtoMessage() {} func (x *DataQualitySpec_PostScanActions_NotificationReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1341,11 +1313,9 @@ type DataQualityResult_PostScanActionsResult struct { func (x *DataQualityResult_PostScanActionsResult) Reset() { *x = DataQualityResult_PostScanActionsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityResult_PostScanActionsResult) String() string { @@ -1356,7 +1326,7 @@ func (*DataQualityResult_PostScanActionsResult) ProtoMessage() {} func (x *DataQualityResult_PostScanActionsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1392,11 +1362,9 @@ type DataQualityResult_PostScanActionsResult_BigQueryExportResult struct { func (x *DataQualityResult_PostScanActionsResult_BigQueryExportResult) Reset() { *x = DataQualityResult_PostScanActionsResult_BigQueryExportResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityResult_PostScanActionsResult_BigQueryExportResult) String() string { @@ -1407,7 +1375,7 @@ func (*DataQualityResult_PostScanActionsResult_BigQueryExportResult) ProtoMessag func (x *DataQualityResult_PostScanActionsResult_BigQueryExportResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1432,9 @@ type DataQualityRule_RangeExpectation struct { func (x *DataQualityRule_RangeExpectation) Reset() { *x = DataQualityRule_RangeExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_RangeExpectation) String() string { @@ -1479,7 +1445,7 @@ func (*DataQualityRule_RangeExpectation) ProtoMessage() {} func (x *DataQualityRule_RangeExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1531,11 +1497,9 @@ type DataQualityRule_NonNullExpectation struct { func (x *DataQualityRule_NonNullExpectation) Reset() { *x = DataQualityRule_NonNullExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_NonNullExpectation) String() string { @@ -1546,7 +1510,7 @@ func (*DataQualityRule_NonNullExpectation) ProtoMessage() {} func (x *DataQualityRule_NonNullExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,11 +1537,9 @@ type DataQualityRule_SetExpectation struct { func (x *DataQualityRule_SetExpectation) Reset() { *x = DataQualityRule_SetExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_SetExpectation) String() string { @@ -1588,7 +1550,7 @@ func (*DataQualityRule_SetExpectation) ProtoMessage() {} func (x *DataQualityRule_SetExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1584,9 @@ type DataQualityRule_RegexExpectation struct { func (x *DataQualityRule_RegexExpectation) Reset() { *x = DataQualityRule_RegexExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_RegexExpectation) String() string { @@ -1637,7 +1597,7 @@ func (*DataQualityRule_RegexExpectation) ProtoMessage() {} func (x *DataQualityRule_RegexExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,11 +1628,9 @@ type DataQualityRule_UniquenessExpectation struct { func (x *DataQualityRule_UniquenessExpectation) Reset() { *x = DataQualityRule_UniquenessExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_UniquenessExpectation) String() string { @@ -1683,7 +1641,7 @@ func (*DataQualityRule_UniquenessExpectation) ProtoMessage() {} func (x *DataQualityRule_UniquenessExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1689,9 @@ type DataQualityRule_StatisticRangeExpectation struct { func (x *DataQualityRule_StatisticRangeExpectation) Reset() { *x = DataQualityRule_StatisticRangeExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_StatisticRangeExpectation) String() string { @@ -1746,7 +1702,7 @@ func (*DataQualityRule_StatisticRangeExpectation) ProtoMessage() {} func (x *DataQualityRule_StatisticRangeExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1813,11 +1769,9 @@ type DataQualityRule_RowConditionExpectation struct { func (x *DataQualityRule_RowConditionExpectation) Reset() { *x = DataQualityRule_RowConditionExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_RowConditionExpectation) String() string { @@ -1828,7 +1782,7 @@ func (*DataQualityRule_RowConditionExpectation) ProtoMessage() {} func (x *DataQualityRule_RowConditionExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1867,11 +1821,9 @@ type DataQualityRule_TableConditionExpectation struct { func (x *DataQualityRule_TableConditionExpectation) Reset() { *x = DataQualityRule_TableConditionExpectation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_TableConditionExpectation) String() string { @@ -1882,7 +1834,7 @@ func (*DataQualityRule_TableConditionExpectation) ProtoMessage() {} func (x *DataQualityRule_TableConditionExpectation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1928,11 +1880,9 @@ type DataQualityRule_SqlAssertion struct { func (x *DataQualityRule_SqlAssertion) Reset() { *x = DataQualityRule_SqlAssertion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityRule_SqlAssertion) String() string { @@ -1943,7 +1893,7 @@ func (*DataQualityRule_SqlAssertion) ProtoMessage() {} func (x *DataQualityRule_SqlAssertion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,308 +2354,6 @@ func file_google_cloud_dataplex_v1_data_quality_proto_init() { return } file_google_cloud_dataplex_v1_processing_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRuleResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityDimensionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityColumnResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_BigQueryExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_Recipients); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_ScoreThresholdTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_JobFailureTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_JobEndTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DataQualitySpec_PostScanActions_NotificationReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityResult_PostScanActionsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityResult_PostScanActionsResult_BigQueryExportResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_RangeExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_NonNullExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_SetExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_RegexExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_UniquenessExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_StatisticRangeExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_RowConditionExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_TableConditionExpectation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityRule_SqlAssertion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[3].OneofWrappers = []any{} file_google_cloud_dataplex_v1_data_quality_proto_msgTypes[5].OneofWrappers = []any{ diff --git a/dataplex/apiv1/dataplexpb/data_taxonomy.pb.go b/dataplex/apiv1/dataplexpb/data_taxonomy.pb.go index cf8f77c5bb9b..c2074e4e83bc 100755 --- a/dataplex/apiv1/dataplexpb/data_taxonomy.pb.go +++ b/dataplex/apiv1/dataplexpb/data_taxonomy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/data_taxonomy.proto @@ -81,11 +81,9 @@ type DataTaxonomy struct { func (x *DataTaxonomy) Reset() { *x = DataTaxonomy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataTaxonomy) String() string { @@ -96,7 +94,7 @@ func (*DataTaxonomy) ProtoMessage() {} func (x *DataTaxonomy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +234,9 @@ type DataAttribute struct { func (x *DataAttribute) Reset() { *x = DataAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataAttribute) String() string { @@ -251,7 +247,7 @@ func (*DataAttribute) ProtoMessage() {} func (x *DataAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +395,9 @@ type DataAttributeBinding struct { func (x *DataAttributeBinding) Reset() { *x = DataAttributeBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataAttributeBinding) String() string { @@ -414,7 +408,7 @@ func (*DataAttributeBinding) ProtoMessage() {} func (x *DataAttributeBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +548,9 @@ type CreateDataTaxonomyRequest struct { func (x *CreateDataTaxonomyRequest) Reset() { *x = CreateDataTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataTaxonomyRequest) String() string { @@ -569,7 +561,7 @@ func (*CreateDataTaxonomyRequest) ProtoMessage() {} func (x *CreateDataTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +621,9 @@ type UpdateDataTaxonomyRequest struct { func (x *UpdateDataTaxonomyRequest) Reset() { *x = UpdateDataTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataTaxonomyRequest) String() string { @@ -644,7 +634,7 @@ func (*UpdateDataTaxonomyRequest) ProtoMessage() {} func (x *UpdateDataTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +683,9 @@ type GetDataTaxonomyRequest struct { func (x *GetDataTaxonomyRequest) Reset() { *x = GetDataTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataTaxonomyRequest) String() string { @@ -708,7 +696,7 @@ func (*GetDataTaxonomyRequest) ProtoMessage() {} func (x *GetDataTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +746,9 @@ type ListDataTaxonomiesRequest struct { func (x *ListDataTaxonomiesRequest) Reset() { *x = ListDataTaxonomiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataTaxonomiesRequest) String() string { @@ -773,7 +759,7 @@ func (*ListDataTaxonomiesRequest) ProtoMessage() {} func (x *ListDataTaxonomiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,11 +826,9 @@ type ListDataTaxonomiesResponse struct { func (x *ListDataTaxonomiesResponse) Reset() { *x = ListDataTaxonomiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataTaxonomiesResponse) String() string { @@ -855,7 +839,7 @@ func (*ListDataTaxonomiesResponse) ProtoMessage() {} func (x *ListDataTaxonomiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +891,9 @@ type DeleteDataTaxonomyRequest struct { func (x *DeleteDataTaxonomyRequest) Reset() { *x = DeleteDataTaxonomyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataTaxonomyRequest) String() string { @@ -922,7 +904,7 @@ func (*DeleteDataTaxonomyRequest) ProtoMessage() {} func (x *DeleteDataTaxonomyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +958,9 @@ type CreateDataAttributeRequest struct { func (x *CreateDataAttributeRequest) Reset() { *x = CreateDataAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataAttributeRequest) String() string { @@ -991,7 +971,7 @@ func (*CreateDataAttributeRequest) ProtoMessage() {} func (x *CreateDataAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1031,9 @@ type UpdateDataAttributeRequest struct { func (x *UpdateDataAttributeRequest) Reset() { *x = UpdateDataAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataAttributeRequest) String() string { @@ -1066,7 +1044,7 @@ func (*UpdateDataAttributeRequest) ProtoMessage() {} func (x *UpdateDataAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1093,9 @@ type GetDataAttributeRequest struct { func (x *GetDataAttributeRequest) Reset() { *x = GetDataAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataAttributeRequest) String() string { @@ -1130,7 +1106,7 @@ func (*GetDataAttributeRequest) ProtoMessage() {} func (x *GetDataAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1155,9 @@ type ListDataAttributesRequest struct { func (x *ListDataAttributesRequest) Reset() { *x = ListDataAttributesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataAttributesRequest) String() string { @@ -1194,7 +1168,7 @@ func (*ListDataAttributesRequest) ProtoMessage() {} func (x *ListDataAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,11 +1235,9 @@ type ListDataAttributesResponse struct { func (x *ListDataAttributesResponse) Reset() { *x = ListDataAttributesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataAttributesResponse) String() string { @@ -1276,7 +1248,7 @@ func (*ListDataAttributesResponse) ProtoMessage() {} func (x *ListDataAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,11 +1300,9 @@ type DeleteDataAttributeRequest struct { func (x *DeleteDataAttributeRequest) Reset() { *x = DeleteDataAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataAttributeRequest) String() string { @@ -1343,7 +1313,7 @@ func (*DeleteDataAttributeRequest) ProtoMessage() {} func (x *DeleteDataAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1367,9 @@ type CreateDataAttributeBindingRequest struct { func (x *CreateDataAttributeBindingRequest) Reset() { *x = CreateDataAttributeBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataAttributeBindingRequest) String() string { @@ -1412,7 +1380,7 @@ func (*CreateDataAttributeBindingRequest) ProtoMessage() {} func (x *CreateDataAttributeBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1472,11 +1440,9 @@ type UpdateDataAttributeBindingRequest struct { func (x *UpdateDataAttributeBindingRequest) Reset() { *x = UpdateDataAttributeBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataAttributeBindingRequest) String() string { @@ -1487,7 +1453,7 @@ func (*UpdateDataAttributeBindingRequest) ProtoMessage() {} func (x *UpdateDataAttributeBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1502,9 @@ type GetDataAttributeBindingRequest struct { func (x *GetDataAttributeBindingRequest) Reset() { *x = GetDataAttributeBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataAttributeBindingRequest) String() string { @@ -1551,7 +1515,7 @@ func (*GetDataAttributeBindingRequest) ProtoMessage() {} func (x *GetDataAttributeBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1604,11 +1568,9 @@ type ListDataAttributeBindingsRequest struct { func (x *ListDataAttributeBindingsRequest) Reset() { *x = ListDataAttributeBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataAttributeBindingsRequest) String() string { @@ -1619,7 +1581,7 @@ func (*ListDataAttributeBindingsRequest) ProtoMessage() {} func (x *ListDataAttributeBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1686,11 +1648,9 @@ type ListDataAttributeBindingsResponse struct { func (x *ListDataAttributeBindingsResponse) Reset() { *x = ListDataAttributeBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataAttributeBindingsResponse) String() string { @@ -1701,7 +1661,7 @@ func (*ListDataAttributeBindingsResponse) ProtoMessage() {} func (x *ListDataAttributeBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1715,9 @@ type DeleteDataAttributeBindingRequest struct { func (x *DeleteDataAttributeBindingRequest) Reset() { *x = DeleteDataAttributeBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataAttributeBindingRequest) String() string { @@ -1770,7 +1728,7 @@ func (*DeleteDataAttributeBindingRequest) ProtoMessage() {} func (x *DeleteDataAttributeBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1776,9 @@ type DataAttributeBinding_Path struct { func (x *DataAttributeBinding_Path) Reset() { *x = DataAttributeBinding_Path{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataAttributeBinding_Path) String() string { @@ -1833,7 +1789,7 @@ func (*DataAttributeBinding_Path) ProtoMessage() {} func (x *DataAttributeBinding_Path) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2632,272 +2588,6 @@ func file_google_cloud_dataplex_v1_data_taxonomy_proto_init() { } file_google_cloud_dataplex_v1_security_proto_init() file_google_cloud_dataplex_v1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataTaxonomy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataAttributeBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetDataTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDataTaxonomiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListDataTaxonomiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataTaxonomyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetDataAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListDataAttributesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListDataAttributesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataAttributeBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataAttributeBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetDataAttributeBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDataAttributeBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDataAttributeBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataAttributeBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DataAttributeBinding_Path); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_data_taxonomy_proto_msgTypes[2].OneofWrappers = []any{ (*DataAttributeBinding_Resource)(nil), } diff --git a/dataplex/apiv1/dataplexpb/datascans.pb.go b/dataplex/apiv1/dataplexpb/datascans.pb.go index 901ee8ed0462..64c74d15b7af 100755 --- a/dataplex/apiv1/dataplexpb/datascans.pb.go +++ b/dataplex/apiv1/dataplexpb/datascans.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/datascans.proto @@ -304,11 +304,9 @@ type CreateDataScanRequest struct { func (x *CreateDataScanRequest) Reset() { *x = CreateDataScanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataScanRequest) String() string { @@ -319,7 +317,7 @@ func (*CreateDataScanRequest) ProtoMessage() {} func (x *CreateDataScanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +379,9 @@ type UpdateDataScanRequest struct { func (x *UpdateDataScanRequest) Reset() { *x = UpdateDataScanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataScanRequest) String() string { @@ -396,7 +392,7 @@ func (*UpdateDataScanRequest) ProtoMessage() {} func (x *UpdateDataScanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +443,9 @@ type DeleteDataScanRequest struct { func (x *DeleteDataScanRequest) Reset() { *x = DeleteDataScanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataScanRequest) String() string { @@ -462,7 +456,7 @@ func (*DeleteDataScanRequest) ProtoMessage() {} func (x *DeleteDataScanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,11 +495,9 @@ type GetDataScanRequest struct { func (x *GetDataScanRequest) Reset() { *x = GetDataScanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataScanRequest) String() string { @@ -516,7 +508,7 @@ func (*GetDataScanRequest) ProtoMessage() {} func (x *GetDataScanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +566,9 @@ type ListDataScansRequest struct { func (x *ListDataScansRequest) Reset() { *x = ListDataScansRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataScansRequest) String() string { @@ -589,7 +579,7 @@ func (*ListDataScansRequest) ProtoMessage() {} func (x *ListDataScansRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +646,9 @@ type ListDataScansResponse struct { func (x *ListDataScansResponse) Reset() { *x = ListDataScansResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataScansResponse) String() string { @@ -671,7 +659,7 @@ func (*ListDataScansResponse) ProtoMessage() {} func (x *ListDataScansResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +712,9 @@ type RunDataScanRequest struct { func (x *RunDataScanRequest) Reset() { *x = RunDataScanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunDataScanRequest) String() string { @@ -739,7 +725,7 @@ func (*RunDataScanRequest) ProtoMessage() {} func (x *RunDataScanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +759,9 @@ type RunDataScanResponse struct { func (x *RunDataScanResponse) Reset() { *x = RunDataScanResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunDataScanResponse) String() string { @@ -788,7 +772,7 @@ func (*RunDataScanResponse) ProtoMessage() {} func (x *RunDataScanResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +811,9 @@ type GetDataScanJobRequest struct { func (x *GetDataScanJobRequest) Reset() { *x = GetDataScanJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataScanJobRequest) String() string { @@ -842,7 +824,7 @@ func (*GetDataScanJobRequest) ProtoMessage() {} func (x *GetDataScanJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +896,9 @@ type ListDataScanJobsRequest struct { func (x *ListDataScanJobsRequest) Reset() { *x = ListDataScanJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataScanJobsRequest) String() string { @@ -929,7 +909,7 @@ func (*ListDataScanJobsRequest) ProtoMessage() {} func (x *ListDataScanJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +967,9 @@ type ListDataScanJobsResponse struct { func (x *ListDataScanJobsResponse) Reset() { *x = ListDataScanJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataScanJobsResponse) String() string { @@ -1002,7 +980,7 @@ func (*ListDataScanJobsResponse) ProtoMessage() {} func (x *ListDataScanJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1048,11 +1026,9 @@ type GenerateDataQualityRulesRequest struct { func (x *GenerateDataQualityRulesRequest) Reset() { *x = GenerateDataQualityRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDataQualityRulesRequest) String() string { @@ -1063,7 +1039,7 @@ func (*GenerateDataQualityRulesRequest) ProtoMessage() {} func (x *GenerateDataQualityRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,11 +1074,9 @@ type GenerateDataQualityRulesResponse struct { func (x *GenerateDataQualityRulesResponse) Reset() { *x = GenerateDataQualityRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDataQualityRulesResponse) String() string { @@ -1113,7 +1087,7 @@ func (*GenerateDataQualityRulesResponse) ProtoMessage() {} func (x *GenerateDataQualityRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1181,9 @@ type DataScan struct { func (x *DataScan) Reset() { *x = DataScan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScan) String() string { @@ -1222,7 +1194,7 @@ func (*DataScan) ProtoMessage() {} func (x *DataScan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1472,11 +1444,9 @@ type DataScanJob struct { func (x *DataScanJob) Reset() { *x = DataScanJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanJob) String() string { @@ -1487,7 +1457,7 @@ func (*DataScanJob) ProtoMessage() {} func (x *DataScanJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,11 +1659,9 @@ type DataScan_ExecutionSpec struct { func (x *DataScan_ExecutionSpec) Reset() { *x = DataScan_ExecutionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScan_ExecutionSpec) String() string { @@ -1704,7 +1672,7 @@ func (*DataScan_ExecutionSpec) ProtoMessage() {} func (x *DataScan_ExecutionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,11 +1738,9 @@ type DataScan_ExecutionStatus struct { func (x *DataScan_ExecutionStatus) Reset() { *x = DataScan_ExecutionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScan_ExecutionStatus) String() string { @@ -1785,7 +1751,7 @@ func (*DataScan_ExecutionStatus) ProtoMessage() {} func (x *DataScan_ExecutionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_datascans_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2453,212 +2419,6 @@ func file_google_cloud_dataplex_v1_datascans_proto_init() { file_google_cloud_dataplex_v1_processing_proto_init() file_google_cloud_dataplex_v1_resources_proto_init() file_google_cloud_dataplex_v1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataScanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataScanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataScanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDataScanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataScansRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDataScansResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RunDataScanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RunDataScanResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetDataScanJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDataScanJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListDataScanJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDataQualityRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDataQualityRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DataScan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DataScanJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DataScan_ExecutionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_datascans_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DataScan_ExecutionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_datascans_proto_msgTypes[13].OneofWrappers = []any{ (*DataScan_DataQualitySpec)(nil), (*DataScan_DataProfileSpec)(nil), diff --git a/dataplex/apiv1/dataplexpb/logs.pb.go b/dataplex/apiv1/dataplexpb/logs.pb.go index a61ae7bb370d..30baabeb0079 100755 --- a/dataplex/apiv1/dataplexpb/logs.pb.go +++ b/dataplex/apiv1/dataplexpb/logs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/logs.proto @@ -1247,11 +1247,9 @@ type DiscoveryEvent struct { func (x *DiscoveryEvent) Reset() { *x = DiscoveryEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent) String() string { @@ -1262,7 +1260,7 @@ func (*DiscoveryEvent) ProtoMessage() {} func (x *DiscoveryEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1438,11 +1436,9 @@ type JobEvent struct { func (x *JobEvent) Reset() { *x = JobEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobEvent) String() string { @@ -1453,7 +1449,7 @@ func (*JobEvent) ProtoMessage() {} func (x *JobEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1567,9 @@ type SessionEvent struct { func (x *SessionEvent) Reset() { *x = SessionEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEvent) String() string { @@ -1586,7 +1580,7 @@ func (*SessionEvent) ProtoMessage() {} func (x *SessionEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1692,11 +1686,9 @@ type GovernanceEvent struct { func (x *GovernanceEvent) Reset() { *x = GovernanceEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GovernanceEvent) String() string { @@ -1707,7 +1699,7 @@ func (*GovernanceEvent) ProtoMessage() {} func (x *GovernanceEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1784,9 @@ type DataScanEvent struct { func (x *DataScanEvent) Reset() { *x = DataScanEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent) String() string { @@ -1807,7 +1797,7 @@ func (*DataScanEvent) ProtoMessage() {} func (x *DataScanEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2024,11 +2014,9 @@ type DataQualityScanRuleResult struct { func (x *DataQualityScanRuleResult) Reset() { *x = DataQualityScanRuleResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQualityScanRuleResult) String() string { @@ -2039,7 +2027,7 @@ func (*DataQualityScanRuleResult) ProtoMessage() {} func (x *DataQualityScanRuleResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2160,11 +2148,9 @@ type DiscoveryEvent_ConfigDetails struct { func (x *DiscoveryEvent_ConfigDetails) Reset() { *x = DiscoveryEvent_ConfigDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent_ConfigDetails) String() string { @@ -2175,7 +2161,7 @@ func (*DiscoveryEvent_ConfigDetails) ProtoMessage() {} func (x *DiscoveryEvent_ConfigDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2212,11 +2198,9 @@ type DiscoveryEvent_EntityDetails struct { func (x *DiscoveryEvent_EntityDetails) Reset() { *x = DiscoveryEvent_EntityDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent_EntityDetails) String() string { @@ -2227,7 +2211,7 @@ func (*DiscoveryEvent_EntityDetails) ProtoMessage() {} func (x *DiscoveryEvent_EntityDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2270,11 +2254,9 @@ type DiscoveryEvent_TableDetails struct { func (x *DiscoveryEvent_TableDetails) Reset() { *x = DiscoveryEvent_TableDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent_TableDetails) String() string { @@ -2285,7 +2267,7 @@ func (*DiscoveryEvent_TableDetails) ProtoMessage() {} func (x *DiscoveryEvent_TableDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2335,11 +2317,9 @@ type DiscoveryEvent_PartitionDetails struct { func (x *DiscoveryEvent_PartitionDetails) Reset() { *x = DiscoveryEvent_PartitionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent_PartitionDetails) String() string { @@ -2350,7 +2330,7 @@ func (*DiscoveryEvent_PartitionDetails) ProtoMessage() {} func (x *DiscoveryEvent_PartitionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2388,9 @@ type DiscoveryEvent_ActionDetails struct { func (x *DiscoveryEvent_ActionDetails) Reset() { *x = DiscoveryEvent_ActionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEvent_ActionDetails) String() string { @@ -2423,7 +2401,7 @@ func (*DiscoveryEvent_ActionDetails) ProtoMessage() {} func (x *DiscoveryEvent_ActionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2474,11 +2452,9 @@ type SessionEvent_QueryDetail struct { func (x *SessionEvent_QueryDetail) Reset() { *x = SessionEvent_QueryDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEvent_QueryDetail) String() string { @@ -2489,7 +2465,7 @@ func (*SessionEvent_QueryDetail) ProtoMessage() {} func (x *SessionEvent_QueryDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2562,11 +2538,9 @@ type GovernanceEvent_Entity struct { func (x *GovernanceEvent_Entity) Reset() { *x = GovernanceEvent_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GovernanceEvent_Entity) String() string { @@ -2577,7 +2551,7 @@ func (*GovernanceEvent_Entity) ProtoMessage() {} func (x *GovernanceEvent_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2618,11 +2592,9 @@ type DataScanEvent_DataProfileResult struct { func (x *DataScanEvent_DataProfileResult) Reset() { *x = DataScanEvent_DataProfileResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_DataProfileResult) String() string { @@ -2633,7 +2605,7 @@ func (*DataScanEvent_DataProfileResult) ProtoMessage() {} func (x *DataScanEvent_DataProfileResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2693,11 +2665,9 @@ type DataScanEvent_DataQualityResult struct { func (x *DataScanEvent_DataQualityResult) Reset() { *x = DataScanEvent_DataQualityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_DataQualityResult) String() string { @@ -2708,7 +2678,7 @@ func (*DataScanEvent_DataQualityResult) ProtoMessage() {} func (x *DataScanEvent_DataQualityResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2785,11 +2755,9 @@ type DataScanEvent_DataProfileAppliedConfigs struct { func (x *DataScanEvent_DataProfileAppliedConfigs) Reset() { *x = DataScanEvent_DataProfileAppliedConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_DataProfileAppliedConfigs) String() string { @@ -2800,7 +2768,7 @@ func (*DataScanEvent_DataProfileAppliedConfigs) ProtoMessage() {} func (x *DataScanEvent_DataProfileAppliedConfigs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2853,11 +2821,9 @@ type DataScanEvent_DataQualityAppliedConfigs struct { func (x *DataScanEvent_DataQualityAppliedConfigs) Reset() { *x = DataScanEvent_DataQualityAppliedConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_DataQualityAppliedConfigs) String() string { @@ -2868,7 +2834,7 @@ func (*DataScanEvent_DataQualityAppliedConfigs) ProtoMessage() {} func (x *DataScanEvent_DataQualityAppliedConfigs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2909,11 +2875,9 @@ type DataScanEvent_PostScanActionsResult struct { func (x *DataScanEvent_PostScanActionsResult) Reset() { *x = DataScanEvent_PostScanActionsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_PostScanActionsResult) String() string { @@ -2924,7 +2888,7 @@ func (*DataScanEvent_PostScanActionsResult) ProtoMessage() {} func (x *DataScanEvent_PostScanActionsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2960,11 +2924,9 @@ type DataScanEvent_PostScanActionsResult_BigQueryExportResult struct { func (x *DataScanEvent_PostScanActionsResult_BigQueryExportResult) Reset() { *x = DataScanEvent_PostScanActionsResult_BigQueryExportResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataScanEvent_PostScanActionsResult_BigQueryExportResult) String() string { @@ -2975,7 +2937,7 @@ func (*DataScanEvent_PostScanActionsResult_BigQueryExportResult) ProtoMessage() func (x *DataScanEvent_PostScanActionsResult_BigQueryExportResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_logs_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3673,236 +3635,6 @@ func file_google_cloud_dataplex_v1_logs_proto_init() { if File_google_cloud_dataplex_v1_logs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_logs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*JobEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SessionEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GovernanceEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataQualityScanRuleResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent_ConfigDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent_EntityDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent_TableDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent_PartitionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEvent_ActionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SessionEvent_QueryDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GovernanceEvent_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_DataProfileResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_DataQualityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_DataProfileAppliedConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_DataQualityAppliedConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_PostScanActionsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_logs_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DataScanEvent_PostScanActionsResult_BigQueryExportResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_logs_proto_msgTypes[0].OneofWrappers = []any{ (*DiscoveryEvent_Config)(nil), (*DiscoveryEvent_Entity)(nil), diff --git a/dataplex/apiv1/dataplexpb/metadata.pb.go b/dataplex/apiv1/dataplexpb/metadata.pb.go index 7aaf5c08e1ad..64c1b09bb1a1 100755 --- a/dataplex/apiv1/dataplexpb/metadata.pb.go +++ b/dataplex/apiv1/dataplexpb/metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/metadata.proto @@ -690,11 +690,9 @@ type CreateEntityRequest struct { func (x *CreateEntityRequest) Reset() { *x = CreateEntityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityRequest) String() string { @@ -705,7 +703,7 @@ func (*CreateEntityRequest) ProtoMessage() {} func (x *CreateEntityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +757,9 @@ type UpdateEntityRequest struct { func (x *UpdateEntityRequest) Reset() { *x = UpdateEntityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityRequest) String() string { @@ -774,7 +770,7 @@ func (*UpdateEntityRequest) ProtoMessage() {} func (x *UpdateEntityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +815,9 @@ type DeleteEntityRequest struct { func (x *DeleteEntityRequest) Reset() { *x = DeleteEntityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityRequest) String() string { @@ -834,7 +828,7 @@ func (*DeleteEntityRequest) ProtoMessage() {} func (x *DeleteEntityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,11 +891,9 @@ type ListEntitiesRequest struct { func (x *ListEntitiesRequest) Reset() { *x = ListEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitiesRequest) String() string { @@ -912,7 +904,7 @@ func (*ListEntitiesRequest) ProtoMessage() {} func (x *ListEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +969,9 @@ type ListEntitiesResponse struct { func (x *ListEntitiesResponse) Reset() { *x = ListEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitiesResponse) String() string { @@ -992,7 +982,7 @@ func (*ListEntitiesResponse) ProtoMessage() {} func (x *ListEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1027,9 @@ type GetEntityRequest struct { func (x *GetEntityRequest) Reset() { *x = GetEntityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityRequest) String() string { @@ -1052,7 +1040,7 @@ func (*GetEntityRequest) ProtoMessage() {} func (x *GetEntityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1113,9 @@ type ListPartitionsRequest struct { func (x *ListPartitionsRequest) Reset() { *x = ListPartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPartitionsRequest) String() string { @@ -1140,7 +1126,7 @@ func (*ListPartitionsRequest) ProtoMessage() {} func (x *ListPartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1187,9 @@ type CreatePartitionRequest struct { func (x *CreatePartitionRequest) Reset() { *x = CreatePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePartitionRequest) String() string { @@ -1216,7 +1200,7 @@ func (*CreatePartitionRequest) ProtoMessage() {} func (x *CreatePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,11 +1256,9 @@ type DeletePartitionRequest struct { func (x *DeletePartitionRequest) Reset() { *x = DeletePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePartitionRequest) String() string { @@ -1287,7 +1269,7 @@ func (*DeletePartitionRequest) ProtoMessage() {} func (x *DeletePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1332,11 +1314,9 @@ type ListPartitionsResponse struct { func (x *ListPartitionsResponse) Reset() { *x = ListPartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPartitionsResponse) String() string { @@ -1347,7 +1327,7 @@ func (*ListPartitionsResponse) ProtoMessage() {} func (x *ListPartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1371,9 @@ type GetPartitionRequest struct { func (x *GetPartitionRequest) Reset() { *x = GetPartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartitionRequest) String() string { @@ -1406,7 +1384,7 @@ func (*GetPartitionRequest) ProtoMessage() {} func (x *GetPartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1472,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -1509,7 +1485,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1677,11 +1653,9 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition) String() string { @@ -1692,7 +1666,7 @@ func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1769,11 +1743,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -1784,7 +1756,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1869,11 +1841,9 @@ type StorageFormat struct { func (x *StorageFormat) Reset() { *x = StorageFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormat) String() string { @@ -1884,7 +1854,7 @@ func (*StorageFormat) ProtoMessage() {} func (x *StorageFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1956,9 @@ type StorageAccess struct { func (x *StorageAccess) Reset() { *x = StorageAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageAccess) String() string { @@ -2001,7 +1969,7 @@ func (*StorageAccess) ProtoMessage() {} func (x *StorageAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2037,11 +2005,9 @@ type Entity_CompatibilityStatus struct { func (x *Entity_CompatibilityStatus) Reset() { *x = Entity_CompatibilityStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity_CompatibilityStatus) String() string { @@ -2052,7 +2018,7 @@ func (*Entity_CompatibilityStatus) ProtoMessage() {} func (x *Entity_CompatibilityStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2097,11 +2063,9 @@ type Entity_CompatibilityStatus_Compatibility struct { func (x *Entity_CompatibilityStatus_Compatibility) Reset() { *x = Entity_CompatibilityStatus_Compatibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity_CompatibilityStatus_Compatibility) String() string { @@ -2112,7 +2076,7 @@ func (*Entity_CompatibilityStatus_Compatibility) ProtoMessage() {} func (x *Entity_CompatibilityStatus_Compatibility) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2164,11 +2128,9 @@ type Schema_SchemaField struct { func (x *Schema_SchemaField) Reset() { *x = Schema_SchemaField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema_SchemaField) String() string { @@ -2179,7 +2141,7 @@ func (*Schema_SchemaField) ProtoMessage() {} func (x *Schema_SchemaField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2248,11 +2210,9 @@ type Schema_PartitionField struct { func (x *Schema_PartitionField) Reset() { *x = Schema_PartitionField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema_PartitionField) String() string { @@ -2263,7 +2223,7 @@ func (*Schema_PartitionField) ProtoMessage() {} func (x *Schema_PartitionField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2314,11 +2274,9 @@ type StorageFormat_CsvOptions struct { func (x *StorageFormat_CsvOptions) Reset() { *x = StorageFormat_CsvOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormat_CsvOptions) String() string { @@ -2329,7 +2287,7 @@ func (*StorageFormat_CsvOptions) ProtoMessage() {} func (x *StorageFormat_CsvOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2385,11 +2343,9 @@ type StorageFormat_JsonOptions struct { func (x *StorageFormat_JsonOptions) Reset() { *x = StorageFormat_JsonOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormat_JsonOptions) String() string { @@ -2400,7 +2356,7 @@ func (*StorageFormat_JsonOptions) ProtoMessage() {} func (x *StorageFormat_JsonOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2435,11 +2391,9 @@ type StorageFormat_IcebergOptions struct { func (x *StorageFormat_IcebergOptions) Reset() { *x = StorageFormat_IcebergOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageFormat_IcebergOptions) String() string { @@ -2450,7 +2404,7 @@ func (*StorageFormat_IcebergOptions) ProtoMessage() {} func (x *StorageFormat_IcebergOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_metadata_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3096,284 +3050,6 @@ func file_google_cloud_dataplex_v1_metadata_proto_init() { if File_google_cloud_dataplex_v1_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeletePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListPartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetPartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Partition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StorageFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StorageAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Entity_CompatibilityStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Entity_CompatibilityStatus_Compatibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Schema_SchemaField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Schema_PartitionField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StorageFormat_CsvOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StorageFormat_JsonOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_metadata_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*StorageFormat_IcebergOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_metadata_proto_msgTypes[14].OneofWrappers = []any{ (*StorageFormat_Csv)(nil), (*StorageFormat_Json)(nil), diff --git a/dataplex/apiv1/dataplexpb/processing.pb.go b/dataplex/apiv1/dataplexpb/processing.pb.go index 2d51ed2b7c19..7008b4444d9f 100755 --- a/dataplex/apiv1/dataplexpb/processing.pb.go +++ b/dataplex/apiv1/dataplexpb/processing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/processing.proto @@ -55,11 +55,9 @@ type Trigger struct { func (x *Trigger) Reset() { *x = Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger) String() string { @@ -70,7 +68,7 @@ func (*Trigger) ProtoMessage() {} func (x *Trigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type DataSource struct { func (x *DataSource) Reset() { *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSource) String() string { @@ -157,7 +153,7 @@ func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +228,9 @@ type ScannedData struct { func (x *ScannedData) Reset() { *x = ScannedData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScannedData) String() string { @@ -247,7 +241,7 @@ func (*ScannedData) ProtoMessage() {} func (x *ScannedData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type Trigger_OnDemand struct { func (x *Trigger_OnDemand) Reset() { *x = Trigger_OnDemand{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger_OnDemand) String() string { @@ -311,7 +303,7 @@ func (*Trigger_OnDemand) ProtoMessage() {} func (x *Trigger_OnDemand) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +341,9 @@ type Trigger_Schedule struct { func (x *Trigger_Schedule) Reset() { *x = Trigger_Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger_Schedule) String() string { @@ -364,7 +354,7 @@ func (*Trigger_Schedule) ProtoMessage() {} func (x *Trigger_Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +393,9 @@ type ScannedData_IncrementalField struct { func (x *ScannedData_IncrementalField) Reset() { *x = ScannedData_IncrementalField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScannedData_IncrementalField) String() string { @@ -418,7 +406,7 @@ func (*ScannedData_IncrementalField) ProtoMessage() {} func (x *ScannedData_IncrementalField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_processing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,80 +535,6 @@ func file_google_cloud_dataplex_v1_processing_proto_init() { if File_google_cloud_dataplex_v1_processing_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_processing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_processing_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_processing_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ScannedData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_processing_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Trigger_OnDemand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_processing_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Trigger_Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_processing_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ScannedData_IncrementalField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_processing_proto_msgTypes[0].OneofWrappers = []any{ (*Trigger_OnDemand_)(nil), (*Trigger_Schedule_)(nil), diff --git a/dataplex/apiv1/dataplexpb/resources.pb.go b/dataplex/apiv1/dataplexpb/resources.pb.go index 44dc482857f9..0ca6cdb34b8d 100755 --- a/dataplex/apiv1/dataplexpb/resources.pb.go +++ b/dataplex/apiv1/dataplexpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/resources.proto @@ -761,11 +761,9 @@ type Lake struct { func (x *Lake) Reset() { *x = Lake{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lake) String() string { @@ -776,7 +774,7 @@ func (*Lake) ProtoMessage() {} func (x *Lake) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +890,9 @@ type AssetStatus struct { func (x *AssetStatus) Reset() { *x = AssetStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetStatus) String() string { @@ -907,7 +903,7 @@ func (*AssetStatus) ProtoMessage() {} func (x *AssetStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +980,9 @@ type Zone struct { func (x *Zone) Reset() { *x = Zone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone) String() string { @@ -999,7 +993,7 @@ func (*Zone) ProtoMessage() {} func (x *Zone) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,11 +1141,9 @@ type Action struct { func (x *Action) Reset() { *x = Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action) String() string { @@ -1162,7 +1154,7 @@ func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1402,11 +1394,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -1417,7 +1407,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1528,9 @@ type Lake_Metastore struct { func (x *Lake_Metastore) Reset() { *x = Lake_Metastore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lake_Metastore) String() string { @@ -1553,7 +1541,7 @@ func (*Lake_Metastore) ProtoMessage() {} func (x *Lake_Metastore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,11 +1581,9 @@ type Lake_MetastoreStatus struct { func (x *Lake_MetastoreStatus) Reset() { *x = Lake_MetastoreStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lake_MetastoreStatus) String() string { @@ -1608,7 +1594,7 @@ func (*Lake_MetastoreStatus) ProtoMessage() {} func (x *Lake_MetastoreStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1664,11 +1650,9 @@ type Zone_ResourceSpec struct { func (x *Zone_ResourceSpec) Reset() { *x = Zone_ResourceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone_ResourceSpec) String() string { @@ -1679,7 +1663,7 @@ func (*Zone_ResourceSpec) ProtoMessage() {} func (x *Zone_ResourceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1718,9 @@ type Zone_DiscoverySpec struct { func (x *Zone_DiscoverySpec) Reset() { *x = Zone_DiscoverySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone_DiscoverySpec) String() string { @@ -1749,7 +1731,7 @@ func (*Zone_DiscoverySpec) ProtoMessage() {} func (x *Zone_DiscoverySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1852,11 +1834,9 @@ type Zone_DiscoverySpec_CsvOptions struct { func (x *Zone_DiscoverySpec_CsvOptions) Reset() { *x = Zone_DiscoverySpec_CsvOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone_DiscoverySpec_CsvOptions) String() string { @@ -1867,7 +1847,7 @@ func (*Zone_DiscoverySpec_CsvOptions) ProtoMessage() {} func (x *Zone_DiscoverySpec_CsvOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,11 +1906,9 @@ type Zone_DiscoverySpec_JsonOptions struct { func (x *Zone_DiscoverySpec_JsonOptions) Reset() { *x = Zone_DiscoverySpec_JsonOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone_DiscoverySpec_JsonOptions) String() string { @@ -1941,7 +1919,7 @@ func (*Zone_DiscoverySpec_JsonOptions) ProtoMessage() {} func (x *Zone_DiscoverySpec_JsonOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,11 +1957,9 @@ type Action_MissingResource struct { func (x *Action_MissingResource) Reset() { *x = Action_MissingResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_MissingResource) String() string { @@ -1994,7 +1970,7 @@ func (*Action_MissingResource) ProtoMessage() {} func (x *Action_MissingResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1996,9 @@ type Action_UnauthorizedResource struct { func (x *Action_UnauthorizedResource) Reset() { *x = Action_UnauthorizedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_UnauthorizedResource) String() string { @@ -2035,7 +2009,7 @@ func (*Action_UnauthorizedResource) ProtoMessage() {} func (x *Action_UnauthorizedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2066,11 +2040,9 @@ type Action_FailedSecurityPolicyApply struct { func (x *Action_FailedSecurityPolicyApply) Reset() { *x = Action_FailedSecurityPolicyApply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_FailedSecurityPolicyApply) String() string { @@ -2081,7 +2053,7 @@ func (*Action_FailedSecurityPolicyApply) ProtoMessage() {} func (x *Action_FailedSecurityPolicyApply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2120,11 +2092,9 @@ type Action_InvalidDataFormat struct { func (x *Action_InvalidDataFormat) Reset() { *x = Action_InvalidDataFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_InvalidDataFormat) String() string { @@ -2135,7 +2105,7 @@ func (*Action_InvalidDataFormat) ProtoMessage() {} func (x *Action_InvalidDataFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2194,11 +2164,9 @@ type Action_IncompatibleDataSchema struct { func (x *Action_IncompatibleDataSchema) Reset() { *x = Action_IncompatibleDataSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_IncompatibleDataSchema) String() string { @@ -2209,7 +2177,7 @@ func (*Action_IncompatibleDataSchema) ProtoMessage() {} func (x *Action_IncompatibleDataSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2271,11 +2239,9 @@ type Action_InvalidDataPartition struct { func (x *Action_InvalidDataPartition) Reset() { *x = Action_InvalidDataPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_InvalidDataPartition) String() string { @@ -2286,7 +2252,7 @@ func (*Action_InvalidDataPartition) ProtoMessage() {} func (x *Action_InvalidDataPartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2317,11 +2283,9 @@ type Action_MissingData struct { func (x *Action_MissingData) Reset() { *x = Action_MissingData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_MissingData) String() string { @@ -2332,7 +2296,7 @@ func (*Action_MissingData) ProtoMessage() {} func (x *Action_MissingData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2356,11 +2320,9 @@ type Action_InvalidDataOrganization struct { func (x *Action_InvalidDataOrganization) Reset() { *x = Action_InvalidDataOrganization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_InvalidDataOrganization) String() string { @@ -2371,7 +2333,7 @@ func (*Action_InvalidDataOrganization) ProtoMessage() {} func (x *Action_InvalidDataOrganization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,11 +2366,9 @@ type Asset_SecurityStatus struct { func (x *Asset_SecurityStatus) Reset() { *x = Asset_SecurityStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_SecurityStatus) String() string { @@ -2419,7 +2379,7 @@ func (*Asset_SecurityStatus) ProtoMessage() {} func (x *Asset_SecurityStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2488,11 +2448,9 @@ type Asset_DiscoverySpec struct { func (x *Asset_DiscoverySpec) Reset() { *x = Asset_DiscoverySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_DiscoverySpec) String() string { @@ -2503,7 +2461,7 @@ func (*Asset_DiscoverySpec) ProtoMessage() {} func (x *Asset_DiscoverySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2606,11 +2564,9 @@ type Asset_ResourceSpec struct { func (x *Asset_ResourceSpec) Reset() { *x = Asset_ResourceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_ResourceSpec) String() string { @@ -2621,7 +2577,7 @@ func (*Asset_ResourceSpec) ProtoMessage() {} func (x *Asset_ResourceSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2675,11 +2631,9 @@ type Asset_ResourceStatus struct { func (x *Asset_ResourceStatus) Reset() { *x = Asset_ResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_ResourceStatus) String() string { @@ -2690,7 +2644,7 @@ func (*Asset_ResourceStatus) ProtoMessage() {} func (x *Asset_ResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,11 +2709,9 @@ type Asset_DiscoveryStatus struct { func (x *Asset_DiscoveryStatus) Reset() { *x = Asset_DiscoveryStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_DiscoveryStatus) String() string { @@ -2770,7 +2722,7 @@ func (*Asset_DiscoveryStatus) ProtoMessage() {} func (x *Asset_DiscoveryStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2848,11 +2800,9 @@ type Asset_DiscoverySpec_CsvOptions struct { func (x *Asset_DiscoverySpec_CsvOptions) Reset() { *x = Asset_DiscoverySpec_CsvOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_DiscoverySpec_CsvOptions) String() string { @@ -2863,7 +2813,7 @@ func (*Asset_DiscoverySpec_CsvOptions) ProtoMessage() {} func (x *Asset_DiscoverySpec_CsvOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2922,11 +2872,9 @@ type Asset_DiscoverySpec_JsonOptions struct { func (x *Asset_DiscoverySpec_JsonOptions) Reset() { *x = Asset_DiscoverySpec_JsonOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_DiscoverySpec_JsonOptions) String() string { @@ -2937,7 +2885,7 @@ func (*Asset_DiscoverySpec_JsonOptions) ProtoMessage() {} func (x *Asset_DiscoverySpec_JsonOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2984,11 +2932,9 @@ type Asset_DiscoveryStatus_Stats struct { func (x *Asset_DiscoveryStatus_Stats) Reset() { *x = Asset_DiscoveryStatus_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_DiscoveryStatus_Stats) String() string { @@ -2999,7 +2945,7 @@ func (*Asset_DiscoveryStatus_Stats) ProtoMessage() {} func (x *Asset_DiscoveryStatus_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3770,332 +3716,6 @@ func file_google_cloud_dataplex_v1_resources_proto_init() { if File_google_cloud_dataplex_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Lake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AssetStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Zone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Lake_Metastore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Lake_MetastoreStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Zone_ResourceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Zone_DiscoverySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Zone_DiscoverySpec_CsvOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Zone_DiscoverySpec_JsonOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Action_MissingResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Action_UnauthorizedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Action_FailedSecurityPolicyApply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Action_InvalidDataFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Action_IncompatibleDataSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Action_InvalidDataPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Action_MissingData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Action_InvalidDataOrganization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Asset_SecurityStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Asset_DiscoverySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Asset_ResourceSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Asset_ResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Asset_DiscoveryStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Asset_DiscoverySpec_CsvOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Asset_DiscoverySpec_JsonOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Asset_DiscoveryStatus_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_resources_proto_msgTypes[3].OneofWrappers = []any{ (*Action_InvalidDataFormat_)(nil), (*Action_IncompatibleDataSchema_)(nil), diff --git a/dataplex/apiv1/dataplexpb/security.pb.go b/dataplex/apiv1/dataplexpb/security.pb.go index 841bc2d948e5..ff30174a51b9 100755 --- a/dataplex/apiv1/dataplexpb/security.pb.go +++ b/dataplex/apiv1/dataplexpb/security.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/security.proto @@ -56,11 +56,9 @@ type ResourceAccessSpec struct { func (x *ResourceAccessSpec) Reset() { *x = ResourceAccessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceAccessSpec) String() string { @@ -71,7 +69,7 @@ func (*ResourceAccessSpec) ProtoMessage() {} func (x *ResourceAccessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type DataAccessSpec struct { func (x *DataAccessSpec) Reset() { *x = DataAccessSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataAccessSpec) String() string { @@ -141,7 +137,7 @@ func (*DataAccessSpec) ProtoMessage() {} func (x *DataAccessSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_security_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,32 +218,6 @@ func file_google_cloud_dataplex_v1_security_proto_init() { if File_google_cloud_dataplex_v1_security_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_security_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceAccessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_security_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataAccessSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataplex/apiv1/dataplexpb/service.pb.go b/dataplex/apiv1/dataplexpb/service.pb.go index ff896a3a8844..a6409852f437 100755 --- a/dataplex/apiv1/dataplexpb/service.pb.go +++ b/dataplex/apiv1/dataplexpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/service.proto @@ -72,11 +72,9 @@ type CreateLakeRequest struct { func (x *CreateLakeRequest) Reset() { *x = CreateLakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLakeRequest) String() string { @@ -87,7 +85,7 @@ func (*CreateLakeRequest) ProtoMessage() {} func (x *CreateLakeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type UpdateLakeRequest struct { func (x *UpdateLakeRequest) Reset() { *x = UpdateLakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLakeRequest) String() string { @@ -163,7 +159,7 @@ func (*UpdateLakeRequest) ProtoMessage() {} func (x *UpdateLakeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,11 +208,9 @@ type DeleteLakeRequest struct { func (x *DeleteLakeRequest) Reset() { *x = DeleteLakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLakeRequest) String() string { @@ -227,7 +221,7 @@ func (*DeleteLakeRequest) ProtoMessage() {} func (x *DeleteLakeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +269,9 @@ type ListLakesRequest struct { func (x *ListLakesRequest) Reset() { *x = ListLakesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLakesRequest) String() string { @@ -290,7 +282,7 @@ func (*ListLakesRequest) ProtoMessage() {} func (x *ListLakesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type ListLakesResponse struct { func (x *ListLakesResponse) Reset() { *x = ListLakesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLakesResponse) String() string { @@ -372,7 +362,7 @@ func (*ListLakesResponse) ProtoMessage() {} func (x *ListLakesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +420,9 @@ type ListLakeActionsRequest struct { func (x *ListLakeActionsRequest) Reset() { *x = ListLakeActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLakeActionsRequest) String() string { @@ -445,7 +433,7 @@ func (*ListLakeActionsRequest) ProtoMessage() {} func (x *ListLakeActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type ListActionsResponse struct { func (x *ListActionsResponse) Reset() { *x = ListActionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListActionsResponse) String() string { @@ -511,7 +497,7 @@ func (*ListActionsResponse) ProtoMessage() {} func (x *ListActionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +539,9 @@ type GetLakeRequest struct { func (x *GetLakeRequest) Reset() { *x = GetLakeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLakeRequest) String() string { @@ -568,7 +552,7 @@ func (*GetLakeRequest) ProtoMessage() {} func (x *GetLakeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +602,9 @@ type CreateZoneRequest struct { func (x *CreateZoneRequest) Reset() { *x = CreateZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateZoneRequest) String() string { @@ -633,7 +615,7 @@ func (*CreateZoneRequest) ProtoMessage() {} func (x *CreateZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +676,9 @@ type UpdateZoneRequest struct { func (x *UpdateZoneRequest) Reset() { *x = UpdateZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateZoneRequest) String() string { @@ -709,7 +689,7 @@ func (*UpdateZoneRequest) ProtoMessage() {} func (x *UpdateZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +738,9 @@ type DeleteZoneRequest struct { func (x *DeleteZoneRequest) Reset() { *x = DeleteZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteZoneRequest) String() string { @@ -773,7 +751,7 @@ func (*DeleteZoneRequest) ProtoMessage() {} func (x *DeleteZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +798,9 @@ type ListZonesRequest struct { func (x *ListZonesRequest) Reset() { *x = ListZonesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZonesRequest) String() string { @@ -835,7 +811,7 @@ func (*ListZonesRequest) ProtoMessage() {} func (x *ListZonesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +876,9 @@ type ListZonesResponse struct { func (x *ListZonesResponse) Reset() { *x = ListZonesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZonesResponse) String() string { @@ -915,7 +889,7 @@ func (*ListZonesResponse) ProtoMessage() {} func (x *ListZonesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +940,9 @@ type ListZoneActionsRequest struct { func (x *ListZoneActionsRequest) Reset() { *x = ListZoneActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZoneActionsRequest) String() string { @@ -981,7 +953,7 @@ func (*ListZoneActionsRequest) ProtoMessage() {} func (x *ListZoneActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1002,9 @@ type GetZoneRequest struct { func (x *GetZoneRequest) Reset() { *x = GetZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetZoneRequest) String() string { @@ -1045,7 +1015,7 @@ func (*GetZoneRequest) ProtoMessage() {} func (x *GetZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1064,9 @@ type CreateAssetRequest struct { func (x *CreateAssetRequest) Reset() { *x = CreateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssetRequest) String() string { @@ -1109,7 +1077,7 @@ func (*CreateAssetRequest) ProtoMessage() {} func (x *CreateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1138,9 @@ type UpdateAssetRequest struct { func (x *UpdateAssetRequest) Reset() { *x = UpdateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAssetRequest) String() string { @@ -1185,7 +1151,7 @@ func (*UpdateAssetRequest) ProtoMessage() {} func (x *UpdateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,11 +1200,9 @@ type DeleteAssetRequest struct { func (x *DeleteAssetRequest) Reset() { *x = DeleteAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssetRequest) String() string { @@ -1249,7 +1213,7 @@ func (*DeleteAssetRequest) ProtoMessage() {} func (x *DeleteAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1261,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -1312,7 +1274,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1339,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -1392,7 +1352,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1403,9 @@ type ListAssetActionsRequest struct { func (x *ListAssetActionsRequest) Reset() { *x = ListAssetActionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetActionsRequest) String() string { @@ -1458,7 +1416,7 @@ func (*ListAssetActionsRequest) ProtoMessage() {} func (x *ListAssetActionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1507,11 +1465,9 @@ type GetAssetRequest struct { func (x *GetAssetRequest) Reset() { *x = GetAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssetRequest) String() string { @@ -1522,7 +1478,7 @@ func (*GetAssetRequest) ProtoMessage() {} func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1572,11 +1528,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1587,7 +1541,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,11 +1625,9 @@ type CreateTaskRequest struct { func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -1686,7 +1638,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1747,11 +1699,9 @@ type UpdateTaskRequest struct { func (x *UpdateTaskRequest) Reset() { *x = UpdateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTaskRequest) String() string { @@ -1762,7 +1712,7 @@ func (*UpdateTaskRequest) ProtoMessage() {} func (x *UpdateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1811,11 +1761,9 @@ type DeleteTaskRequest struct { func (x *DeleteTaskRequest) Reset() { *x = DeleteTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTaskRequest) String() string { @@ -1826,7 +1774,7 @@ func (*DeleteTaskRequest) ProtoMessage() {} func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1873,11 +1821,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -1888,7 +1834,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1901,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -1970,7 +1914,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2019,11 +1963,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -2034,7 +1976,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2069,11 +2011,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -2084,7 +2024,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2134,11 +2074,9 @@ type RunTaskRequest struct { func (x *RunTaskRequest) Reset() { *x = RunTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTaskRequest) String() string { @@ -2149,7 +2087,7 @@ func (*RunTaskRequest) ProtoMessage() {} func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2196,11 +2134,9 @@ type RunTaskResponse struct { func (x *RunTaskResponse) Reset() { *x = RunTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTaskResponse) String() string { @@ -2211,7 +2147,7 @@ func (*RunTaskResponse) ProtoMessage() {} func (x *RunTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2255,11 +2191,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -2270,7 +2204,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2321,11 +2255,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -2336,7 +2268,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2310,9 @@ type CancelJobRequest struct { func (x *CancelJobRequest) Reset() { *x = CancelJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelJobRequest) String() string { @@ -2393,7 +2323,7 @@ func (*CancelJobRequest) ProtoMessage() {} func (x *CancelJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2440,11 +2370,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -2455,7 +2383,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,11 +2444,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -2531,7 +2457,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2580,11 +2506,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -2595,7 +2519,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2644,11 +2568,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -2659,7 +2581,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2724,11 +2646,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -2739,7 +2659,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2781,11 +2701,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -2796,7 +2714,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2768,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -2865,7 +2781,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2923,11 +2839,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -2938,7 +2852,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4016,524 +3930,6 @@ func file_google_cloud_dataplex_v1_service_proto_init() { file_google_cloud_dataplex_v1_analyze_proto_init() file_google_cloud_dataplex_v1_resources_proto_init() file_google_cloud_dataplex_v1_tasks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateLakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListLakesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListLakesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListLakeActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListActionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetLakeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListZonesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListZonesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListZoneActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetActionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*RunTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*RunTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*CancelJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataplex/apiv1/dataplexpb/tasks.pb.go b/dataplex/apiv1/dataplexpb/tasks.pb.go index a651e041a96b..7fa56ee1a254 100755 --- a/dataplex/apiv1/dataplexpb/tasks.pb.go +++ b/dataplex/apiv1/dataplexpb/tasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataplex/v1/tasks.proto @@ -303,11 +303,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -318,7 +316,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +484,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -501,7 +497,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +624,9 @@ type Task_InfrastructureSpec struct { func (x *Task_InfrastructureSpec) Reset() { *x = Task_InfrastructureSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_InfrastructureSpec) String() string { @@ -643,7 +637,7 @@ func (*Task_InfrastructureSpec) ProtoMessage() {} func (x *Task_InfrastructureSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -762,11 +756,9 @@ type Task_TriggerSpec struct { func (x *Task_TriggerSpec) Reset() { *x = Task_TriggerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_TriggerSpec) String() string { @@ -777,7 +769,7 @@ func (*Task_TriggerSpec) ProtoMessage() {} func (x *Task_TriggerSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,11 +880,9 @@ type Task_ExecutionSpec struct { func (x *Task_ExecutionSpec) Reset() { *x = Task_ExecutionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_ExecutionSpec) String() string { @@ -903,7 +893,7 @@ func (*Task_ExecutionSpec) ProtoMessage() {} func (x *Task_ExecutionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +974,9 @@ type Task_SparkTaskConfig struct { func (x *Task_SparkTaskConfig) Reset() { *x = Task_SparkTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_SparkTaskConfig) String() string { @@ -999,7 +987,7 @@ func (*Task_SparkTaskConfig) ProtoMessage() {} func (x *Task_SparkTaskConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1152,11 +1140,9 @@ type Task_NotebookTaskConfig struct { func (x *Task_NotebookTaskConfig) Reset() { *x = Task_NotebookTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_NotebookTaskConfig) String() string { @@ -1167,7 +1153,7 @@ func (*Task_NotebookTaskConfig) ProtoMessage() {} func (x *Task_NotebookTaskConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1224,11 +1210,9 @@ type Task_ExecutionStatus struct { func (x *Task_ExecutionStatus) Reset() { *x = Task_ExecutionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_ExecutionStatus) String() string { @@ -1239,7 +1223,7 @@ func (*Task_ExecutionStatus) ProtoMessage() {} func (x *Task_ExecutionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1285,11 +1269,9 @@ type Task_InfrastructureSpec_BatchComputeResources struct { func (x *Task_InfrastructureSpec_BatchComputeResources) Reset() { *x = Task_InfrastructureSpec_BatchComputeResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_InfrastructureSpec_BatchComputeResources) String() string { @@ -1300,7 +1282,7 @@ func (*Task_InfrastructureSpec_BatchComputeResources) ProtoMessage() {} func (x *Task_InfrastructureSpec_BatchComputeResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1337,9 @@ type Task_InfrastructureSpec_ContainerImageRuntime struct { func (x *Task_InfrastructureSpec_ContainerImageRuntime) Reset() { *x = Task_InfrastructureSpec_ContainerImageRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_InfrastructureSpec_ContainerImageRuntime) String() string { @@ -1370,7 +1350,7 @@ func (*Task_InfrastructureSpec_ContainerImageRuntime) ProtoMessage() {} func (x *Task_InfrastructureSpec_ContainerImageRuntime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1432,11 +1412,9 @@ type Task_InfrastructureSpec_VpcNetwork struct { func (x *Task_InfrastructureSpec_VpcNetwork) Reset() { *x = Task_InfrastructureSpec_VpcNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_InfrastructureSpec_VpcNetwork) String() string { @@ -1447,7 +1425,7 @@ func (*Task_InfrastructureSpec_VpcNetwork) ProtoMessage() {} func (x *Task_InfrastructureSpec_VpcNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataplex_v1_tasks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1904,140 +1882,6 @@ func file_google_cloud_dataplex_v1_tasks_proto_init() { return } file_google_cloud_dataplex_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Task_InfrastructureSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Task_TriggerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Task_ExecutionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Task_SparkTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Task_NotebookTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Task_ExecutionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Task_InfrastructureSpec_BatchComputeResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Task_InfrastructureSpec_ContainerImageRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataplex_v1_tasks_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Task_InfrastructureSpec_VpcNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataplex_v1_tasks_proto_msgTypes[0].OneofWrappers = []any{ (*Task_Spark)(nil), (*Task_Notebook)(nil), diff --git a/dataplex/apiv1/helpers.go b/dataplex/apiv1/helpers.go index 8b5020a0ceb3..edaccdfabd88 100755 --- a/dataplex/apiv1/helpers.go +++ b/dataplex/apiv1/helpers.go @@ -18,10 +18,16 @@ package dataplex import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataplex.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataplex/apiv1/metadata_client.go b/dataplex/apiv1/metadata_client.go index 008b92e6560b..b2cd3b53d62f 100755 --- a/dataplex/apiv1/metadata_client.go +++ b/dataplex/apiv1/metadata_client.go @@ -19,6 +19,7 @@ package dataplex import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -298,6 +299,8 @@ type metadataGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetadataClient creates a new metadata service client based on gRPC. @@ -325,6 +328,7 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad connPool: connPool, metadataClient: dataplexpb.NewMetadataServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -369,7 +373,7 @@ func (c *metadataGRPCClient) CreateEntity(ctx context.Context, req *dataplexpb.C var resp *dataplexpb.Entity err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreateEntity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreateEntity, req, settings.GRPC, c.logger, "CreateEntity") return err }, opts...) if err != nil { @@ -387,7 +391,7 @@ func (c *metadataGRPCClient) UpdateEntity(ctx context.Context, req *dataplexpb.U var resp *dataplexpb.Entity err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.UpdateEntity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.UpdateEntity, req, settings.GRPC, c.logger, "UpdateEntity") return err }, opts...) if err != nil { @@ -404,7 +408,7 @@ func (c *metadataGRPCClient) DeleteEntity(ctx context.Context, req *dataplexpb.D opts = append((*c.CallOptions).DeleteEntity[0:len((*c.CallOptions).DeleteEntity):len((*c.CallOptions).DeleteEntity)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metadataClient.DeleteEntity(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metadataClient.DeleteEntity, req, settings.GRPC, c.logger, "DeleteEntity") return err }, opts...) return err @@ -419,7 +423,7 @@ func (c *metadataGRPCClient) GetEntity(ctx context.Context, req *dataplexpb.GetE var resp *dataplexpb.Entity err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetEntity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetEntity, req, settings.GRPC, c.logger, "GetEntity") return err }, opts...) if err != nil { @@ -448,7 +452,7 @@ func (c *metadataGRPCClient) ListEntities(ctx context.Context, req *dataplexpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListEntities, req, settings.GRPC, c.logger, "ListEntities") return err }, opts...) if err != nil { @@ -483,7 +487,7 @@ func (c *metadataGRPCClient) CreatePartition(ctx context.Context, req *dataplexp var resp *dataplexpb.Partition err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.CreatePartition(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.CreatePartition, req, settings.GRPC, c.logger, "CreatePartition") return err }, opts...) if err != nil { @@ -500,7 +504,7 @@ func (c *metadataGRPCClient) DeletePartition(ctx context.Context, req *dataplexp opts = append((*c.CallOptions).DeletePartition[0:len((*c.CallOptions).DeletePartition):len((*c.CallOptions).DeletePartition)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metadataClient.DeletePartition(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metadataClient.DeletePartition, req, settings.GRPC, c.logger, "DeletePartition") return err }, opts...) return err @@ -515,7 +519,7 @@ func (c *metadataGRPCClient) GetPartition(ctx context.Context, req *dataplexpb.G var resp *dataplexpb.Partition err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.GetPartition(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.GetPartition, req, settings.GRPC, c.logger, "GetPartition") return err }, opts...) if err != nil { @@ -544,7 +548,7 @@ func (c *metadataGRPCClient) ListPartitions(ctx context.Context, req *dataplexpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metadataClient.ListPartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metadataClient.ListPartitions, req, settings.GRPC, c.logger, "ListPartitions") return err }, opts...) if err != nil { @@ -579,7 +583,7 @@ func (c *metadataGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -608,7 +612,7 @@ func (c *metadataGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -642,7 +646,7 @@ func (c *metadataGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -656,7 +660,7 @@ func (c *metadataGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -671,7 +675,7 @@ func (c *metadataGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -700,7 +704,7 @@ func (c *metadataGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/dataplex/apiv1/metadata_client_example_go123_test.go b/dataplex/apiv1/metadata_client_example_go123_test.go index a1fce36d97a5..b2a54197c319 100644 --- a/dataplex/apiv1/metadata_client_example_go123_test.go +++ b/dataplex/apiv1/metadata_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleMetadataClient_ListEntities_all() { } for resp, err := range c.ListEntities(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleMetadataClient_ListPartitions_all() { } for resp, err := range c.ListPartitions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleMetadataClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleMetadataClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/autoscaling_policy_client.go b/dataproc/apiv1/autoscaling_policy_client.go index ee41473ae0f0..6ddce8c87a68 100755 --- a/dataproc/apiv1/autoscaling_policy_client.go +++ b/dataproc/apiv1/autoscaling_policy_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -335,6 +334,8 @@ type autoscalingPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAutoscalingPolicyClient creates a new autoscaling policy service client based on gRPC. @@ -362,6 +363,7 @@ func NewAutoscalingPolicyClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, autoscalingPolicyClient: dataprocpb.NewAutoscalingPolicyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -410,6 +412,8 @@ type autoscalingPolicyRESTClient struct { // Points back to the CallOptions field of the containing AutoscalingPolicyClient CallOptions **AutoscalingPolicyCallOptions + + logger *slog.Logger } // NewAutoscalingPolicyRESTClient creates a new autoscaling policy service rest client. @@ -428,6 +432,7 @@ func NewAutoscalingPolicyRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -480,7 +485,7 @@ func (c *autoscalingPolicyGRPCClient) CreateAutoscalingPolicy(ctx context.Contex var resp *dataprocpb.AutoscalingPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autoscalingPolicyClient.CreateAutoscalingPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autoscalingPolicyClient.CreateAutoscalingPolicy, req, settings.GRPC, c.logger, "CreateAutoscalingPolicy") return err }, opts...) if err != nil { @@ -498,7 +503,7 @@ func (c *autoscalingPolicyGRPCClient) UpdateAutoscalingPolicy(ctx context.Contex var resp *dataprocpb.AutoscalingPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autoscalingPolicyClient.UpdateAutoscalingPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autoscalingPolicyClient.UpdateAutoscalingPolicy, req, settings.GRPC, c.logger, "UpdateAutoscalingPolicy") return err }, opts...) if err != nil { @@ -516,7 +521,7 @@ func (c *autoscalingPolicyGRPCClient) GetAutoscalingPolicy(ctx context.Context, var resp *dataprocpb.AutoscalingPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autoscalingPolicyClient.GetAutoscalingPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autoscalingPolicyClient.GetAutoscalingPolicy, req, settings.GRPC, c.logger, "GetAutoscalingPolicy") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *autoscalingPolicyGRPCClient) ListAutoscalingPolicies(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autoscalingPolicyClient.ListAutoscalingPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autoscalingPolicyClient.ListAutoscalingPolicies, req, settings.GRPC, c.logger, "ListAutoscalingPolicies") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *autoscalingPolicyGRPCClient) DeleteAutoscalingPolicy(ctx context.Contex opts = append((*c.CallOptions).DeleteAutoscalingPolicy[0:len((*c.CallOptions).DeleteAutoscalingPolicy):len((*c.CallOptions).DeleteAutoscalingPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.autoscalingPolicyClient.DeleteAutoscalingPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.autoscalingPolicyClient.DeleteAutoscalingPolicy, req, settings.GRPC, c.logger, "DeleteAutoscalingPolicy") return err }, opts...) return err @@ -594,7 +599,7 @@ func (c *autoscalingPolicyGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *autoscalingPolicyGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -630,7 +635,7 @@ func (c *autoscalingPolicyGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *autoscalingPolicyGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -661,7 +666,7 @@ func (c *autoscalingPolicyGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -676,7 +681,7 @@ func (c *autoscalingPolicyGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *autoscalingPolicyGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -771,17 +776,7 @@ func (c *autoscalingPolicyRESTClient) CreateAutoscalingPolicy(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAutoscalingPolicy") if err != nil { return err } @@ -841,17 +836,7 @@ func (c *autoscalingPolicyRESTClient) UpdateAutoscalingPolicy(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAutoscalingPolicy") if err != nil { return err } @@ -901,17 +886,7 @@ func (c *autoscalingPolicyRESTClient) GetAutoscalingPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutoscalingPolicy") if err != nil { return err } @@ -973,21 +948,10 @@ func (c *autoscalingPolicyRESTClient) ListAutoscalingPolicies(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutoscalingPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1048,15 +1012,8 @@ func (c *autoscalingPolicyRESTClient) DeleteAutoscalingPolicy(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAutoscalingPolicy") + return err }, opts...) } @@ -1100,17 +1057,7 @@ func (c *autoscalingPolicyRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1170,17 +1117,7 @@ func (c *autoscalingPolicyRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1242,17 +1179,7 @@ func (c *autoscalingPolicyRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1299,15 +1226,8 @@ func (c *autoscalingPolicyRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1341,15 +1261,8 @@ func (c *autoscalingPolicyRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1386,17 +1299,7 @@ func (c *autoscalingPolicyRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1461,21 +1364,10 @@ func (c *autoscalingPolicyRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/autoscaling_policy_client_example_go123_test.go b/dataproc/apiv1/autoscaling_policy_client_example_go123_test.go index 561bbb3783e6..b5e784c59ecb 100644 --- a/dataproc/apiv1/autoscaling_policy_client_example_go123_test.go +++ b/dataproc/apiv1/autoscaling_policy_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAutoscalingPolicyClient_ListAutoscalingPolicies_all() { } for resp, err := range c.ListAutoscalingPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAutoscalingPolicyClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/batch_controller_client.go b/dataproc/apiv1/batch_controller_client.go index 3719abbf4ff8..a8ff88e38e2b 100755 --- a/dataproc/apiv1/batch_controller_client.go +++ b/dataproc/apiv1/batch_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -262,6 +261,8 @@ type batchControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBatchControllerClient creates a new batch controller client based on gRPC. @@ -288,6 +289,7 @@ func NewBatchControllerClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, batchControllerClient: dataprocpb.NewBatchControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -352,6 +354,8 @@ type batchControllerRESTClient struct { // Points back to the CallOptions field of the containing BatchControllerClient CallOptions **BatchControllerCallOptions + + logger *slog.Logger } // NewBatchControllerRESTClient creates a new batch controller rest client. @@ -369,6 +373,7 @@ func NewBatchControllerRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -431,7 +436,7 @@ func (c *batchControllerGRPCClient) CreateBatch(ctx context.Context, req *datapr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.batchControllerClient.CreateBatch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.batchControllerClient.CreateBatch, req, settings.GRPC, c.logger, "CreateBatch") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *batchControllerGRPCClient) GetBatch(ctx context.Context, req *dataprocp var resp *dataprocpb.Batch err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.batchControllerClient.GetBatch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.batchControllerClient.GetBatch, req, settings.GRPC, c.logger, "GetBatch") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *batchControllerGRPCClient) ListBatches(ctx context.Context, req *datapr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.batchControllerClient.ListBatches(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.batchControllerClient.ListBatches, req, settings.GRPC, c.logger, "ListBatches") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *batchControllerGRPCClient) DeleteBatch(ctx context.Context, req *datapr opts = append((*c.CallOptions).DeleteBatch[0:len((*c.CallOptions).DeleteBatch):len((*c.CallOptions).DeleteBatch)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.batchControllerClient.DeleteBatch(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.batchControllerClient.DeleteBatch, req, settings.GRPC, c.logger, "DeleteBatch") return err }, opts...) return err @@ -529,7 +534,7 @@ func (c *batchControllerGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -547,7 +552,7 @@ func (c *batchControllerGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *batchControllerGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *batchControllerGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -596,7 +601,7 @@ func (c *batchControllerGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -611,7 +616,7 @@ func (c *batchControllerGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -640,7 +645,7 @@ func (c *batchControllerGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -711,21 +716,10 @@ func (c *batchControllerRESTClient) CreateBatch(ctx context.Context, req *datapr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBatch") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -776,17 +770,7 @@ func (c *batchControllerRESTClient) GetBatch(ctx context.Context, req *dataprocp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBatch") if err != nil { return err } @@ -854,21 +838,10 @@ func (c *batchControllerRESTClient) ListBatches(ctx context.Context, req *datapr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBatches") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -929,15 +902,8 @@ func (c *batchControllerRESTClient) DeleteBatch(ctx context.Context, req *datapr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBatch") + return err }, opts...) } @@ -981,17 +947,7 @@ func (c *batchControllerRESTClient) GetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1051,17 +1007,7 @@ func (c *batchControllerRESTClient) SetIamPolicy(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1123,17 +1069,7 @@ func (c *batchControllerRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1180,15 +1116,8 @@ func (c *batchControllerRESTClient) CancelOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1222,15 +1151,8 @@ func (c *batchControllerRESTClient) DeleteOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1267,17 +1189,7 @@ func (c *batchControllerRESTClient) GetOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1342,21 +1254,10 @@ func (c *batchControllerRESTClient) ListOperations(ctx context.Context, req *lon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/batch_controller_client_example_go123_test.go b/dataproc/apiv1/batch_controller_client_example_go123_test.go index 6f97f5c65972..a035d562653e 100644 --- a/dataproc/apiv1/batch_controller_client_example_go123_test.go +++ b/dataproc/apiv1/batch_controller_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleBatchControllerClient_ListBatches_all() { } for resp, err := range c.ListBatches(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleBatchControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/cluster_controller_client.go b/dataproc/apiv1/cluster_controller_client.go index 8fe305f34cf1..a6030592d405 100755 --- a/dataproc/apiv1/cluster_controller_client.go +++ b/dataproc/apiv1/cluster_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -484,6 +483,8 @@ type clusterControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClusterControllerClient creates a new cluster controller client based on gRPC. @@ -511,6 +512,7 @@ func NewClusterControllerClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, clusterControllerClient: dataprocpb.NewClusterControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -575,6 +577,8 @@ type clusterControllerRESTClient struct { // Points back to the CallOptions field of the containing ClusterControllerClient CallOptions **ClusterControllerCallOptions + + logger *slog.Logger } // NewClusterControllerRESTClient creates a new cluster controller rest client. @@ -593,6 +597,7 @@ func NewClusterControllerRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -655,7 +660,7 @@ func (c *clusterControllerGRPCClient) CreateCluster(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *clusterControllerGRPCClient) UpdateCluster(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *clusterControllerGRPCClient) StopCluster(ctx context.Context, req *data var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.StopCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.StopCluster, req, settings.GRPC, c.logger, "StopCluster") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *clusterControllerGRPCClient) StartCluster(ctx context.Context, req *dat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.StartCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.StartCluster, req, settings.GRPC, c.logger, "StartCluster") return err }, opts...) if err != nil { @@ -735,7 +740,7 @@ func (c *clusterControllerGRPCClient) DeleteCluster(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -755,7 +760,7 @@ func (c *clusterControllerGRPCClient) GetCluster(ctx context.Context, req *datap var resp *dataprocpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -784,7 +789,7 @@ func (c *clusterControllerGRPCClient) ListClusters(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *clusterControllerGRPCClient) DiagnoseCluster(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.clusterControllerClient.DiagnoseCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.clusterControllerClient.DiagnoseCluster, req, settings.GRPC, c.logger, "DiagnoseCluster") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *clusterControllerGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -857,7 +862,7 @@ func (c *clusterControllerGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -875,7 +880,7 @@ func (c *clusterControllerGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -892,7 +897,7 @@ func (c *clusterControllerGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -906,7 +911,7 @@ func (c *clusterControllerGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -921,7 +926,7 @@ func (c *clusterControllerGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -950,7 +955,7 @@ func (c *clusterControllerGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1023,21 +1028,10 @@ func (c *clusterControllerRESTClient) CreateCluster(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1116,21 +1110,10 @@ func (c *clusterControllerRESTClient) UpdateCluster(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1186,21 +1169,10 @@ func (c *clusterControllerRESTClient) StopCluster(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1256,21 +1228,10 @@ func (c *clusterControllerRESTClient) StartCluster(ctx context.Context, req *dat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1328,21 +1289,10 @@ func (c *clusterControllerRESTClient) DeleteCluster(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1393,17 +1343,7 @@ func (c *clusterControllerRESTClient) GetCluster(ctx context.Context, req *datap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1468,21 +1408,10 @@ func (c *clusterControllerRESTClient) ListClusters(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1556,21 +1485,10 @@ func (c *clusterControllerRESTClient) DiagnoseCluster(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiagnoseCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1628,17 +1546,7 @@ func (c *clusterControllerRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1698,17 +1606,7 @@ func (c *clusterControllerRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1770,17 +1668,7 @@ func (c *clusterControllerRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1827,15 +1715,8 @@ func (c *clusterControllerRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1869,15 +1750,8 @@ func (c *clusterControllerRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1914,17 +1788,7 @@ func (c *clusterControllerRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1989,21 +1853,10 @@ func (c *clusterControllerRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/cluster_controller_client_example_go123_test.go b/dataproc/apiv1/cluster_controller_client_example_go123_test.go index 6000c69d9d23..f68c1e0af367 100644 --- a/dataproc/apiv1/cluster_controller_client_example_go123_test.go +++ b/dataproc/apiv1/cluster_controller_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClusterControllerClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClusterControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/dataprocpb/autoscaling_policies.pb.go b/dataproc/apiv1/dataprocpb/autoscaling_policies.pb.go index b86bd8592f92..d39b779b0e2a 100755 --- a/dataproc/apiv1/dataprocpb/autoscaling_policies.pb.go +++ b/dataproc/apiv1/dataprocpb/autoscaling_policies.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/autoscaling_policies.proto @@ -87,11 +87,9 @@ type AutoscalingPolicy struct { func (x *AutoscalingPolicy) Reset() { *x = AutoscalingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingPolicy) String() string { @@ -102,7 +100,7 @@ func (*AutoscalingPolicy) ProtoMessage() {} func (x *AutoscalingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,11 +193,9 @@ type BasicAutoscalingAlgorithm struct { func (x *BasicAutoscalingAlgorithm) Reset() { *x = BasicAutoscalingAlgorithm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicAutoscalingAlgorithm) String() string { @@ -210,7 +206,7 @@ func (*BasicAutoscalingAlgorithm) ProtoMessage() {} func (x *BasicAutoscalingAlgorithm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +308,9 @@ type BasicYarnAutoscalingConfig struct { func (x *BasicYarnAutoscalingConfig) Reset() { *x = BasicYarnAutoscalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicYarnAutoscalingConfig) String() string { @@ -327,7 +321,7 @@ func (*BasicYarnAutoscalingConfig) ProtoMessage() {} func (x *BasicYarnAutoscalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +413,9 @@ type InstanceGroupAutoscalingPolicyConfig struct { func (x *InstanceGroupAutoscalingPolicyConfig) Reset() { *x = InstanceGroupAutoscalingPolicyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupAutoscalingPolicyConfig) String() string { @@ -434,7 +426,7 @@ func (*InstanceGroupAutoscalingPolicyConfig) ProtoMessage() {} func (x *InstanceGroupAutoscalingPolicyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +485,9 @@ type CreateAutoscalingPolicyRequest struct { func (x *CreateAutoscalingPolicyRequest) Reset() { *x = CreateAutoscalingPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAutoscalingPolicyRequest) String() string { @@ -508,7 +498,7 @@ func (*CreateAutoscalingPolicyRequest) ProtoMessage() {} func (x *CreateAutoscalingPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +548,9 @@ type GetAutoscalingPolicyRequest struct { func (x *GetAutoscalingPolicyRequest) Reset() { *x = GetAutoscalingPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutoscalingPolicyRequest) String() string { @@ -573,7 +561,7 @@ func (*GetAutoscalingPolicyRequest) ProtoMessage() {} func (x *GetAutoscalingPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +595,9 @@ type UpdateAutoscalingPolicyRequest struct { func (x *UpdateAutoscalingPolicyRequest) Reset() { *x = UpdateAutoscalingPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAutoscalingPolicyRequest) String() string { @@ -622,7 +608,7 @@ func (*UpdateAutoscalingPolicyRequest) ProtoMessage() {} func (x *UpdateAutoscalingPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +653,9 @@ type DeleteAutoscalingPolicyRequest struct { func (x *DeleteAutoscalingPolicyRequest) Reset() { *x = DeleteAutoscalingPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAutoscalingPolicyRequest) String() string { @@ -682,7 +666,7 @@ func (*DeleteAutoscalingPolicyRequest) ProtoMessage() {} func (x *DeleteAutoscalingPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +715,9 @@ type ListAutoscalingPoliciesRequest struct { func (x *ListAutoscalingPoliciesRequest) Reset() { *x = ListAutoscalingPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutoscalingPoliciesRequest) String() string { @@ -746,7 +728,7 @@ func (*ListAutoscalingPoliciesRequest) ProtoMessage() {} func (x *ListAutoscalingPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +779,9 @@ type ListAutoscalingPoliciesResponse struct { func (x *ListAutoscalingPoliciesResponse) Reset() { *x = ListAutoscalingPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutoscalingPoliciesResponse) String() string { @@ -812,7 +792,7 @@ func (*ListAutoscalingPoliciesResponse) ProtoMessage() {} func (x *ListAutoscalingPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,128 +1153,6 @@ func file_google_cloud_dataproc_v1_autoscaling_policies_proto_init() { if File_google_cloud_dataproc_v1_autoscaling_policies_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BasicAutoscalingAlgorithm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BasicYarnAutoscalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupAutoscalingPolicyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateAutoscalingPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetAutoscalingPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAutoscalingPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAutoscalingPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListAutoscalingPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListAutoscalingPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_autoscaling_policies_proto_msgTypes[0].OneofWrappers = []any{ (*AutoscalingPolicy_BasicAlgorithm)(nil), } diff --git a/dataproc/apiv1/dataprocpb/batches.pb.go b/dataproc/apiv1/dataprocpb/batches.pb.go index 3105b2eb3706..1de41651861f 100755 --- a/dataproc/apiv1/dataprocpb/batches.pb.go +++ b/dataproc/apiv1/dataprocpb/batches.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/batches.proto @@ -144,11 +144,9 @@ type CreateBatchRequest struct { func (x *CreateBatchRequest) Reset() { *x = CreateBatchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBatchRequest) String() string { @@ -159,7 +157,7 @@ func (*CreateBatchRequest) ProtoMessage() {} func (x *CreateBatchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +214,9 @@ type GetBatchRequest struct { func (x *GetBatchRequest) Reset() { *x = GetBatchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBatchRequest) String() string { @@ -231,7 +227,7 @@ func (*GetBatchRequest) ProtoMessage() {} func (x *GetBatchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +288,9 @@ type ListBatchesRequest struct { func (x *ListBatchesRequest) Reset() { *x = ListBatchesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchesRequest) String() string { @@ -307,7 +301,7 @@ func (*ListBatchesRequest) ProtoMessage() {} func (x *ListBatchesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +370,9 @@ type ListBatchesResponse struct { func (x *ListBatchesResponse) Reset() { *x = ListBatchesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBatchesResponse) String() string { @@ -391,7 +383,7 @@ func (*ListBatchesResponse) ProtoMessage() {} func (x *ListBatchesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +433,9 @@ type DeleteBatchRequest struct { func (x *DeleteBatchRequest) Reset() { *x = DeleteBatchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBatchRequest) String() string { @@ -456,7 +446,7 @@ func (*DeleteBatchRequest) ProtoMessage() {} func (x *DeleteBatchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +521,9 @@ type Batch struct { func (x *Batch) Reset() { *x = Batch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Batch) String() string { @@ -546,7 +534,7 @@ func (*Batch) ProtoMessage() {} func (x *Batch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +740,9 @@ type PySparkBatch struct { func (x *PySparkBatch) Reset() { *x = PySparkBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PySparkBatch) String() string { @@ -767,7 +753,7 @@ func (*PySparkBatch) ProtoMessage() {} func (x *PySparkBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +846,9 @@ type SparkBatch struct { func (x *SparkBatch) Reset() { *x = SparkBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkBatch) String() string { @@ -875,7 +859,7 @@ func (*SparkBatch) ProtoMessage() {} func (x *SparkBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +968,9 @@ type SparkRBatch struct { func (x *SparkRBatch) Reset() { *x = SparkRBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkRBatch) String() string { @@ -999,7 +981,7 @@ func (*SparkRBatch) ProtoMessage() {} func (x *SparkRBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1044,9 @@ type SparkSqlBatch struct { func (x *SparkSqlBatch) Reset() { *x = SparkSqlBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkSqlBatch) String() string { @@ -1077,7 +1057,7 @@ func (*SparkSqlBatch) ProtoMessage() {} func (x *SparkSqlBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,11 +1109,9 @@ type Batch_StateHistory struct { func (x *Batch_StateHistory) Reset() { *x = Batch_StateHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Batch_StateHistory) String() string { @@ -1144,7 +1122,7 @@ func (*Batch_StateHistory) ProtoMessage() {} func (x *Batch_StateHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_batches_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1544,140 +1522,6 @@ func file_google_cloud_dataproc_v1_batches_proto_init() { return } file_google_cloud_dataproc_v1_shared_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_batches_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateBatchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBatchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBatchesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBatchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Batch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PySparkBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SparkBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SparkRBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SparkSqlBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_batches_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Batch_StateHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_batches_proto_msgTypes[5].OneofWrappers = []any{ (*Batch_PysparkBatch)(nil), (*Batch_SparkBatch)(nil), diff --git a/dataproc/apiv1/dataprocpb/clusters.pb.go b/dataproc/apiv1/dataprocpb/clusters.pb.go index 4a7bc1e2aa94..6fc0d6934745 100755 --- a/dataproc/apiv1/dataprocpb/clusters.pb.go +++ b/dataproc/apiv1/dataprocpb/clusters.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/clusters.proto @@ -634,11 +634,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -649,7 +647,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,11 +804,9 @@ type ClusterConfig struct { func (x *ClusterConfig) Reset() { *x = ClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterConfig) String() string { @@ -821,7 +817,7 @@ func (*ClusterConfig) ProtoMessage() {} func (x *ClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +974,9 @@ type VirtualClusterConfig struct { func (x *VirtualClusterConfig) Reset() { *x = VirtualClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualClusterConfig) String() string { @@ -993,7 +987,7 @@ func (*VirtualClusterConfig) ProtoMessage() {} func (x *VirtualClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1056,9 @@ type AuxiliaryServicesConfig struct { func (x *AuxiliaryServicesConfig) Reset() { *x = AuxiliaryServicesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuxiliaryServicesConfig) String() string { @@ -1077,7 +1069,7 @@ func (*AuxiliaryServicesConfig) ProtoMessage() {} func (x *AuxiliaryServicesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1114,9 @@ type EndpointConfig struct { func (x *EndpointConfig) Reset() { *x = EndpointConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointConfig) String() string { @@ -1137,7 +1127,7 @@ func (*EndpointConfig) ProtoMessage() {} func (x *EndpointConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1176,9 @@ type AutoscalingConfig struct { func (x *AutoscalingConfig) Reset() { *x = AutoscalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig) String() string { @@ -1201,7 +1189,7 @@ func (*AutoscalingConfig) ProtoMessage() {} func (x *AutoscalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1266,11 +1254,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1281,7 +1267,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1417,11 +1403,9 @@ type GceClusterConfig struct { func (x *GceClusterConfig) Reset() { *x = GceClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GceClusterConfig) String() string { @@ -1432,7 +1416,7 @@ func (*GceClusterConfig) ProtoMessage() {} func (x *GceClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,11 +1545,9 @@ type NodeGroupAffinity struct { func (x *NodeGroupAffinity) Reset() { *x = NodeGroupAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupAffinity) String() string { @@ -1576,7 +1558,7 @@ func (*NodeGroupAffinity) ProtoMessage() {} func (x *NodeGroupAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1615,11 +1597,9 @@ type ShieldedInstanceConfig struct { func (x *ShieldedInstanceConfig) Reset() { *x = ShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceConfig) String() string { @@ -1630,7 +1610,7 @@ func (*ShieldedInstanceConfig) ProtoMessage() {} func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1660,9 @@ type ConfidentialInstanceConfig struct { func (x *ConfidentialInstanceConfig) Reset() { *x = ConfidentialInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfidentialInstanceConfig) String() string { @@ -1695,7 +1673,7 @@ func (*ConfidentialInstanceConfig) ProtoMessage() {} func (x *ConfidentialInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1796,9 @@ type InstanceGroupConfig struct { func (x *InstanceGroupConfig) Reset() { *x = InstanceGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceGroupConfig) String() string { @@ -1833,7 +1809,7 @@ func (*InstanceGroupConfig) ProtoMessage() {} func (x *InstanceGroupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1964,11 +1940,9 @@ type StartupConfig struct { func (x *StartupConfig) Reset() { *x = StartupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartupConfig) String() string { @@ -1979,7 +1953,7 @@ func (*StartupConfig) ProtoMessage() {} func (x *StartupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2019,11 +1993,9 @@ type InstanceReference struct { func (x *InstanceReference) Reset() { *x = InstanceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceReference) String() string { @@ -2034,7 +2006,7 @@ func (*InstanceReference) ProtoMessage() {} func (x *InstanceReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2095,11 +2067,9 @@ type ManagedGroupConfig struct { func (x *ManagedGroupConfig) Reset() { *x = ManagedGroupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedGroupConfig) String() string { @@ -2110,7 +2080,7 @@ func (*ManagedGroupConfig) ProtoMessage() {} func (x *ManagedGroupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2165,11 +2135,9 @@ type InstanceFlexibilityPolicy struct { func (x *InstanceFlexibilityPolicy) Reset() { *x = InstanceFlexibilityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceFlexibilityPolicy) String() string { @@ -2180,7 +2148,7 @@ func (*InstanceFlexibilityPolicy) ProtoMessage() {} func (x *InstanceFlexibilityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2215,9 @@ type AcceleratorConfig struct { func (x *AcceleratorConfig) Reset() { *x = AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorConfig) String() string { @@ -2262,7 +2228,7 @@ func (*AcceleratorConfig) ProtoMessage() {} func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2334,11 +2300,9 @@ type DiskConfig struct { func (x *DiskConfig) Reset() { *x = DiskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskConfig) String() string { @@ -2349,7 +2313,7 @@ func (*DiskConfig) ProtoMessage() {} func (x *DiskConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2424,11 +2388,9 @@ type AuxiliaryNodeGroup struct { func (x *AuxiliaryNodeGroup) Reset() { *x = AuxiliaryNodeGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuxiliaryNodeGroup) String() string { @@ -2439,7 +2401,7 @@ func (*AuxiliaryNodeGroup) ProtoMessage() {} func (x *AuxiliaryNodeGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2496,11 +2458,9 @@ type NodeGroup struct { func (x *NodeGroup) Reset() { *x = NodeGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroup) String() string { @@ -2511,7 +2471,7 @@ func (*NodeGroup) ProtoMessage() {} func (x *NodeGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2575,11 +2535,9 @@ type NodeInitializationAction struct { func (x *NodeInitializationAction) Reset() { *x = NodeInitializationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInitializationAction) String() string { @@ -2590,7 +2548,7 @@ func (*NodeInitializationAction) ProtoMessage() {} func (x *NodeInitializationAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2639,11 +2597,9 @@ type ClusterStatus struct { func (x *ClusterStatus) Reset() { *x = ClusterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterStatus) String() string { @@ -2654,7 +2610,7 @@ func (*ClusterStatus) ProtoMessage() {} func (x *ClusterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2712,11 +2668,9 @@ type SecurityConfig struct { func (x *SecurityConfig) Reset() { *x = SecurityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityConfig) String() string { @@ -2727,7 +2681,7 @@ func (*SecurityConfig) ProtoMessage() {} func (x *SecurityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2818,11 +2772,9 @@ type KerberosConfig struct { func (x *KerberosConfig) Reset() { *x = KerberosConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KerberosConfig) String() string { @@ -2833,7 +2785,7 @@ func (*KerberosConfig) ProtoMessage() {} func (x *KerberosConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2966,11 +2918,9 @@ type IdentityConfig struct { func (x *IdentityConfig) Reset() { *x = IdentityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdentityConfig) String() string { @@ -2981,7 +2931,7 @@ func (*IdentityConfig) ProtoMessage() {} func (x *IdentityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3042,11 +2992,9 @@ type SoftwareConfig struct { func (x *SoftwareConfig) Reset() { *x = SoftwareConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareConfig) String() string { @@ -3057,7 +3005,7 @@ func (*SoftwareConfig) ProtoMessage() {} func (x *SoftwareConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3122,11 +3070,9 @@ type LifecycleConfig struct { func (x *LifecycleConfig) Reset() { *x = LifecycleConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LifecycleConfig) String() string { @@ -3137,7 +3083,7 @@ func (*LifecycleConfig) ProtoMessage() {} func (x *LifecycleConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3226,11 +3172,9 @@ type MetastoreConfig struct { func (x *MetastoreConfig) Reset() { *x = MetastoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetastoreConfig) String() string { @@ -3241,7 +3185,7 @@ func (*MetastoreConfig) ProtoMessage() {} func (x *MetastoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3280,11 +3224,9 @@ type ClusterMetrics struct { func (x *ClusterMetrics) Reset() { *x = ClusterMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterMetrics) String() string { @@ -3295,7 +3237,7 @@ func (*ClusterMetrics) ProtoMessage() {} func (x *ClusterMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3336,11 +3278,9 @@ type DataprocMetricConfig struct { func (x *DataprocMetricConfig) Reset() { *x = DataprocMetricConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataprocMetricConfig) String() string { @@ -3351,7 +3291,7 @@ func (*DataprocMetricConfig) ProtoMessage() {} func (x *DataprocMetricConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3405,11 +3345,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -3420,7 +3358,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3566,11 +3504,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -3581,7 +3517,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3678,11 +3614,9 @@ type StopClusterRequest struct { func (x *StopClusterRequest) Reset() { *x = StopClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopClusterRequest) String() string { @@ -3693,7 +3627,7 @@ func (*StopClusterRequest) ProtoMessage() {} func (x *StopClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3776,11 +3710,9 @@ type StartClusterRequest struct { func (x *StartClusterRequest) Reset() { *x = StartClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartClusterRequest) String() string { @@ -3791,7 +3723,7 @@ func (*StartClusterRequest) ProtoMessage() {} func (x *StartClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3874,11 +3806,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -3889,7 +3819,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3956,11 +3886,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -3971,7 +3899,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4046,11 +3974,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -4061,7 +3987,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4127,11 +4053,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -4142,7 +4066,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4204,11 +4128,9 @@ type DiagnoseClusterRequest struct { func (x *DiagnoseClusterRequest) Reset() { *x = DiagnoseClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseClusterRequest) String() string { @@ -4219,7 +4141,7 @@ func (*DiagnoseClusterRequest) ProtoMessage() {} func (x *DiagnoseClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4304,11 +4226,9 @@ type DiagnoseClusterResults struct { func (x *DiagnoseClusterResults) Reset() { *x = DiagnoseClusterResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseClusterResults) String() string { @@ -4319,7 +4239,7 @@ func (*DiagnoseClusterResults) ProtoMessage() {} func (x *DiagnoseClusterResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4357,11 +4277,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -4372,7 +4290,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4435,11 +4353,9 @@ type InstanceFlexibilityPolicy_ProvisioningModelMix struct { func (x *InstanceFlexibilityPolicy_ProvisioningModelMix) Reset() { *x = InstanceFlexibilityPolicy_ProvisioningModelMix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceFlexibilityPolicy_ProvisioningModelMix) String() string { @@ -4450,7 +4366,7 @@ func (*InstanceFlexibilityPolicy_ProvisioningModelMix) ProtoMessage() {} func (x *InstanceFlexibilityPolicy_ProvisioningModelMix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4497,11 +4413,9 @@ type InstanceFlexibilityPolicy_InstanceSelection struct { func (x *InstanceFlexibilityPolicy_InstanceSelection) Reset() { *x = InstanceFlexibilityPolicy_InstanceSelection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceFlexibilityPolicy_InstanceSelection) String() string { @@ -4512,7 +4426,7 @@ func (*InstanceFlexibilityPolicy_InstanceSelection) ProtoMessage() {} func (x *InstanceFlexibilityPolicy_InstanceSelection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4556,11 +4470,9 @@ type InstanceFlexibilityPolicy_InstanceSelectionResult struct { func (x *InstanceFlexibilityPolicy_InstanceSelectionResult) Reset() { *x = InstanceFlexibilityPolicy_InstanceSelectionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceFlexibilityPolicy_InstanceSelectionResult) String() string { @@ -4571,7 +4483,7 @@ func (*InstanceFlexibilityPolicy_InstanceSelectionResult) ProtoMessage() {} func (x *InstanceFlexibilityPolicy_InstanceSelectionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4645,11 +4557,9 @@ type DataprocMetricConfig_Metric struct { func (x *DataprocMetricConfig_Metric) Reset() { *x = DataprocMetricConfig_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataprocMetricConfig_Metric) String() string { @@ -4660,7 +4570,7 @@ func (*DataprocMetricConfig_Metric) ProtoMessage() {} func (x *DataprocMetricConfig_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_clusters_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5966,548 +5876,6 @@ func file_google_cloud_dataproc_v1_clusters_proto_init() { } file_google_cloud_dataproc_v1_operations_proto_init() file_google_cloud_dataproc_v1_shared_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VirtualClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AuxiliaryServicesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EndpointConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GceClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ConfidentialInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InstanceGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StartupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*InstanceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ManagedGroupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*InstanceFlexibilityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DiskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AuxiliaryNodeGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*NodeInitializationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ClusterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SecurityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*KerberosConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*IdentityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*LifecycleConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*MetastoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ClusterMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DataprocMetricConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*StopClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*StartClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseClusterResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*InstanceFlexibilityPolicy_ProvisioningModelMix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*InstanceFlexibilityPolicy_InstanceSelection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*InstanceFlexibilityPolicy_InstanceSelectionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_clusters_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DataprocMetricConfig_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_clusters_proto_msgTypes[2].OneofWrappers = []any{ (*VirtualClusterConfig_KubernetesClusterConfig)(nil), } diff --git a/dataproc/apiv1/dataprocpb/jobs.pb.go b/dataproc/apiv1/dataprocpb/jobs.pb.go index 3c35e0536b09..ef1bd888b996 100755 --- a/dataproc/apiv1/dataprocpb/jobs.pb.go +++ b/dataproc/apiv1/dataprocpb/jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/jobs.proto @@ -425,11 +425,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -440,7 +438,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +507,9 @@ type HadoopJob struct { func (x *HadoopJob) Reset() { *x = HadoopJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HadoopJob) String() string { @@ -524,7 +520,7 @@ func (*HadoopJob) ProtoMessage() {} func (x *HadoopJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +666,9 @@ type SparkJob struct { func (x *SparkJob) Reset() { *x = SparkJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkJob) String() string { @@ -685,7 +679,7 @@ func (*SparkJob) ProtoMessage() {} func (x *SparkJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +817,9 @@ type PySparkJob struct { func (x *PySparkJob) Reset() { *x = PySparkJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PySparkJob) String() string { @@ -838,7 +830,7 @@ func (*PySparkJob) ProtoMessage() {} func (x *PySparkJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -934,11 +926,9 @@ type QueryList struct { func (x *QueryList) Reset() { *x = QueryList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryList) String() string { @@ -949,7 +939,7 @@ func (*QueryList) ProtoMessage() {} func (x *QueryList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +996,9 @@ type HiveJob struct { func (x *HiveJob) Reset() { *x = HiveJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveJob) String() string { @@ -1021,7 +1009,7 @@ func (*HiveJob) ProtoMessage() {} func (x *HiveJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1121,9 @@ type SparkSqlJob struct { func (x *SparkSqlJob) Reset() { *x = SparkSqlJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkSqlJob) String() string { @@ -1148,7 +1134,7 @@ func (*SparkSqlJob) ProtoMessage() {} func (x *SparkSqlJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1266,11 +1252,9 @@ type PigJob struct { func (x *PigJob) Reset() { *x = PigJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PigJob) String() string { @@ -1281,7 +1265,7 @@ func (*PigJob) ProtoMessage() {} func (x *PigJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1387,9 @@ type SparkRJob struct { func (x *SparkRJob) Reset() { *x = SparkRJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkRJob) String() string { @@ -1418,7 +1400,7 @@ func (*SparkRJob) ProtoMessage() {} func (x *SparkRJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1512,11 +1494,9 @@ type PrestoJob struct { func (x *PrestoJob) Reset() { *x = PrestoJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrestoJob) String() string { @@ -1527,7 +1507,7 @@ func (*PrestoJob) ProtoMessage() {} func (x *PrestoJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1633,9 @@ type TrinoJob struct { func (x *TrinoJob) Reset() { *x = TrinoJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrinoJob) String() string { @@ -1668,7 +1646,7 @@ func (*TrinoJob) ProtoMessage() {} func (x *TrinoJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1774,9 @@ type FlinkJob struct { func (x *FlinkJob) Reset() { *x = FlinkJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlinkJob) String() string { @@ -1811,7 +1787,7 @@ func (*FlinkJob) ProtoMessage() {} func (x *FlinkJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1920,11 +1896,9 @@ type JobPlacement struct { func (x *JobPlacement) Reset() { *x = JobPlacement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobPlacement) String() string { @@ -1935,7 +1909,7 @@ func (*JobPlacement) ProtoMessage() {} func (x *JobPlacement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1965,9 @@ type JobStatus struct { func (x *JobStatus) Reset() { *x = JobStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobStatus) String() string { @@ -2006,7 +1978,7 @@ func (*JobStatus) ProtoMessage() {} func (x *JobStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2069,11 +2041,9 @@ type JobReference struct { func (x *JobReference) Reset() { *x = JobReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobReference) String() string { @@ -2084,7 +2054,7 @@ func (*JobReference) ProtoMessage() {} func (x *JobReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2138,11 +2108,9 @@ type YarnApplication struct { func (x *YarnApplication) Reset() { *x = YarnApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YarnApplication) String() string { @@ -2153,7 +2121,7 @@ func (*YarnApplication) ProtoMessage() {} func (x *YarnApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2268,11 +2236,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -2283,7 +2249,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2547,11 +2513,9 @@ type DriverSchedulingConfig struct { func (x *DriverSchedulingConfig) Reset() { *x = DriverSchedulingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DriverSchedulingConfig) String() string { @@ -2562,7 +2526,7 @@ func (*DriverSchedulingConfig) ProtoMessage() {} func (x *DriverSchedulingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2625,11 +2589,9 @@ type JobScheduling struct { func (x *JobScheduling) Reset() { *x = JobScheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobScheduling) String() string { @@ -2640,7 +2602,7 @@ func (*JobScheduling) ProtoMessage() {} func (x *JobScheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2699,11 +2661,9 @@ type SubmitJobRequest struct { func (x *SubmitJobRequest) Reset() { *x = SubmitJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitJobRequest) String() string { @@ -2714,7 +2674,7 @@ func (*SubmitJobRequest) ProtoMessage() {} func (x *SubmitJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2775,11 +2735,9 @@ type JobMetadata struct { func (x *JobMetadata) Reset() { *x = JobMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobMetadata) String() string { @@ -2790,7 +2748,7 @@ func (*JobMetadata) ProtoMessage() {} func (x *JobMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2808,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -2865,7 +2821,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2944,11 +2900,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -2959,7 +2913,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3049,11 +3003,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -3064,7 +3016,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3135,11 +3087,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -3150,7 +3100,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3203,11 +3153,9 @@ type CancelJobRequest struct { func (x *CancelJobRequest) Reset() { *x = CancelJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelJobRequest) String() string { @@ -3218,7 +3166,7 @@ func (*CancelJobRequest) ProtoMessage() {} func (x *CancelJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3271,11 +3219,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -3286,7 +3232,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_jobs_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4223,332 +4169,6 @@ func file_google_cloud_dataproc_v1_jobs_proto_init() { if File_google_cloud_dataproc_v1_jobs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*HadoopJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SparkJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PySparkJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QueryList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*HiveJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SparkSqlJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PigJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SparkRJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PrestoJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TrinoJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FlinkJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*JobPlacement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*JobStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*JobReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*YarnApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DriverSchedulingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*JobScheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SubmitJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*JobMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CancelJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_jobs_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_jobs_proto_msgTypes[1].OneofWrappers = []any{ (*HadoopJob_MainJarFileUri)(nil), (*HadoopJob_MainClass)(nil), diff --git a/dataproc/apiv1/dataprocpb/node_groups.pb.go b/dataproc/apiv1/dataprocpb/node_groups.pb.go index f6d9a4059028..f98307fba7b4 100755 --- a/dataproc/apiv1/dataprocpb/node_groups.pb.go +++ b/dataproc/apiv1/dataprocpb/node_groups.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/node_groups.proto @@ -76,11 +76,9 @@ type CreateNodeGroupRequest struct { func (x *CreateNodeGroupRequest) Reset() { *x = CreateNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNodeGroupRequest) String() string { @@ -91,7 +89,7 @@ func (*CreateNodeGroupRequest) ProtoMessage() {} func (x *CreateNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type ResizeNodeGroupRequest struct { func (x *ResizeNodeGroupRequest) Reset() { *x = ResizeNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResizeNodeGroupRequest) String() string { @@ -193,7 +189,7 @@ func (*ResizeNodeGroupRequest) ProtoMessage() {} func (x *ResizeNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +246,9 @@ type GetNodeGroupRequest struct { func (x *GetNodeGroupRequest) Reset() { *x = GetNodeGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeGroupRequest) String() string { @@ -265,7 +259,7 @@ func (*GetNodeGroupRequest) ProtoMessage() {} func (x *GetNodeGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,44 +446,6 @@ func file_google_cloud_dataproc_v1_node_groups_proto_init() { return } file_google_cloud_dataproc_v1_clusters_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResizeNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_node_groups_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataproc/apiv1/dataprocpb/operations.pb.go b/dataproc/apiv1/dataprocpb/operations.pb.go index fcd836b5c9d2..be899be79ebe 100755 --- a/dataproc/apiv1/dataprocpb/operations.pb.go +++ b/dataproc/apiv1/dataprocpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/operations.proto @@ -287,11 +287,9 @@ type BatchOperationMetadata struct { func (x *BatchOperationMetadata) Reset() { *x = BatchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOperationMetadata) String() string { @@ -302,7 +300,7 @@ func (*BatchOperationMetadata) ProtoMessage() {} func (x *BatchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +397,9 @@ type SessionOperationMetadata struct { func (x *SessionOperationMetadata) Reset() { *x = SessionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionOperationMetadata) String() string { @@ -414,7 +410,7 @@ func (*SessionOperationMetadata) ProtoMessage() {} func (x *SessionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +499,9 @@ type ClusterOperationStatus struct { func (x *ClusterOperationStatus) Reset() { *x = ClusterOperationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterOperationStatus) String() string { @@ -518,7 +512,7 @@ func (*ClusterOperationStatus) ProtoMessage() {} func (x *ClusterOperationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +583,9 @@ type ClusterOperationMetadata struct { func (x *ClusterOperationMetadata) Reset() { *x = ClusterOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterOperationMetadata) String() string { @@ -604,7 +596,7 @@ func (*ClusterOperationMetadata) ProtoMessage() {} func (x *ClusterOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +700,9 @@ type NodeGroupOperationMetadata struct { func (x *NodeGroupOperationMetadata) Reset() { *x = NodeGroupOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeGroupOperationMetadata) String() string { @@ -723,7 +713,7 @@ func (*NodeGroupOperationMetadata) ProtoMessage() {} func (x *NodeGroupOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1055,68 +1045,6 @@ func file_google_cloud_dataproc_v1_operations_proto_init() { if File_google_cloud_dataproc_v1_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SessionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ClusterOperationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClusterOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NodeGroupOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataproc/apiv1/dataprocpb/session_templates.pb.go b/dataproc/apiv1/dataprocpb/session_templates.pb.go index ef081a3a2188..f00fe37fc6c6 100755 --- a/dataproc/apiv1/dataprocpb/session_templates.pb.go +++ b/dataproc/apiv1/dataprocpb/session_templates.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/session_templates.proto @@ -56,11 +56,9 @@ type CreateSessionTemplateRequest struct { func (x *CreateSessionTemplateRequest) Reset() { *x = CreateSessionTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionTemplateRequest) String() string { @@ -71,7 +69,7 @@ func (*CreateSessionTemplateRequest) ProtoMessage() {} func (x *CreateSessionTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type UpdateSessionTemplateRequest struct { func (x *UpdateSessionTemplateRequest) Reset() { *x = UpdateSessionTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionTemplateRequest) String() string { @@ -127,7 +123,7 @@ func (*UpdateSessionTemplateRequest) ProtoMessage() {} func (x *UpdateSessionTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +157,9 @@ type GetSessionTemplateRequest struct { func (x *GetSessionTemplateRequest) Reset() { *x = GetSessionTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionTemplateRequest) String() string { @@ -176,7 +170,7 @@ func (*GetSessionTemplateRequest) ProtoMessage() {} func (x *GetSessionTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +215,9 @@ type ListSessionTemplatesRequest struct { func (x *ListSessionTemplatesRequest) Reset() { *x = ListSessionTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionTemplatesRequest) String() string { @@ -236,7 +228,7 @@ func (*ListSessionTemplatesRequest) ProtoMessage() {} func (x *ListSessionTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +286,9 @@ type ListSessionTemplatesResponse struct { func (x *ListSessionTemplatesResponse) Reset() { *x = ListSessionTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionTemplatesResponse) String() string { @@ -309,7 +299,7 @@ func (*ListSessionTemplatesResponse) ProtoMessage() {} func (x *ListSessionTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +340,9 @@ type DeleteSessionTemplateRequest struct { func (x *DeleteSessionTemplateRequest) Reset() { *x = DeleteSessionTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionTemplateRequest) String() string { @@ -365,7 +353,7 @@ func (*DeleteSessionTemplateRequest) ProtoMessage() {} func (x *DeleteSessionTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +417,9 @@ type SessionTemplate struct { func (x *SessionTemplate) Reset() { *x = SessionTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionTemplate) String() string { @@ -444,7 +430,7 @@ func (*SessionTemplate) ProtoMessage() {} func (x *SessionTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,92 +830,6 @@ func file_google_cloud_dataproc_v1_session_templates_proto_init() { } file_google_cloud_dataproc_v1_sessions_proto_init() file_google_cloud_dataproc_v1_shared_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SessionTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_session_templates_proto_msgTypes[6].OneofWrappers = []any{ (*SessionTemplate_JupyterSession)(nil), (*SessionTemplate_SparkConnectSession)(nil), diff --git a/dataproc/apiv1/dataprocpb/sessions.pb.go b/dataproc/apiv1/dataprocpb/sessions.pb.go index 3be27d4b5899..963ae430cb32 100755 --- a/dataproc/apiv1/dataprocpb/sessions.pb.go +++ b/dataproc/apiv1/dataprocpb/sessions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/sessions.proto @@ -193,11 +193,9 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionRequest) String() string { @@ -208,7 +206,7 @@ func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +261,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -278,7 +274,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +330,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -349,7 +343,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +401,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -422,7 +414,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +466,9 @@ type TerminateSessionRequest struct { func (x *TerminateSessionRequest) Reset() { *x = TerminateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminateSessionRequest) String() string { @@ -489,7 +479,7 @@ func (*TerminateSessionRequest) ProtoMessage() {} func (x *TerminateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +531,9 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionRequest) String() string { @@ -556,7 +544,7 @@ func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +635,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -662,7 +648,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +814,9 @@ type JupyterConfig struct { func (x *JupyterConfig) Reset() { *x = JupyterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JupyterConfig) String() string { @@ -843,7 +827,7 @@ func (*JupyterConfig) ProtoMessage() {} func (x *JupyterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +865,9 @@ type SparkConnectConfig struct { func (x *SparkConnectConfig) Reset() { *x = SparkConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkConnectConfig) String() string { @@ -896,7 +878,7 @@ func (*SparkConnectConfig) ProtoMessage() {} func (x *SparkConnectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,11 +911,9 @@ type Session_SessionStateHistory struct { func (x *Session_SessionStateHistory) Reset() { *x = Session_SessionStateHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session_SessionStateHistory) String() string { @@ -944,7 +924,7 @@ func (*Session_SessionStateHistory) ProtoMessage() {} func (x *Session_SessionStateHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_sessions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1321,128 +1301,6 @@ func file_google_cloud_dataproc_v1_sessions_proto_init() { return } file_google_cloud_dataproc_v1_shared_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TerminateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*JupyterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SparkConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_sessions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Session_SessionStateHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_sessions_proto_msgTypes[6].OneofWrappers = []any{ (*Session_JupyterSession)(nil), (*Session_SparkConnectSession)(nil), diff --git a/dataproc/apiv1/dataprocpb/shared.pb.go b/dataproc/apiv1/dataprocpb/shared.pb.go index bad8b42ed6b4..86c786448640 100755 --- a/dataproc/apiv1/dataprocpb/shared.pb.go +++ b/dataproc/apiv1/dataprocpb/shared.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/shared.proto @@ -350,11 +350,9 @@ type RuntimeConfig struct { func (x *RuntimeConfig) Reset() { *x = RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig) String() string { @@ -365,7 +363,7 @@ func (*RuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +434,9 @@ type EnvironmentConfig struct { func (x *EnvironmentConfig) Reset() { *x = EnvironmentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentConfig) String() string { @@ -451,7 +447,7 @@ func (*EnvironmentConfig) ProtoMessage() {} func (x *EnvironmentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +534,9 @@ type ExecutionConfig struct { func (x *ExecutionConfig) Reset() { *x = ExecutionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionConfig) String() string { @@ -553,7 +547,7 @@ func (*ExecutionConfig) ProtoMessage() {} func (x *ExecutionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +660,9 @@ type SparkHistoryServerConfig struct { func (x *SparkHistoryServerConfig) Reset() { *x = SparkHistoryServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SparkHistoryServerConfig) String() string { @@ -681,7 +673,7 @@ func (*SparkHistoryServerConfig) ProtoMessage() {} func (x *SparkHistoryServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +713,9 @@ type PeripheralsConfig struct { func (x *PeripheralsConfig) Reset() { *x = PeripheralsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeripheralsConfig) String() string { @@ -736,7 +726,7 @@ func (*PeripheralsConfig) ProtoMessage() {} func (x *PeripheralsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +787,9 @@ type RuntimeInfo struct { func (x *RuntimeInfo) Reset() { *x = RuntimeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeInfo) String() string { @@ -812,7 +800,7 @@ func (*RuntimeInfo) ProtoMessage() {} func (x *RuntimeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +874,9 @@ type UsageMetrics struct { func (x *UsageMetrics) Reset() { *x = UsageMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageMetrics) String() string { @@ -901,7 +887,7 @@ func (*UsageMetrics) ProtoMessage() {} func (x *UsageMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +963,9 @@ type UsageSnapshot struct { func (x *UsageSnapshot) Reset() { *x = UsageSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UsageSnapshot) String() string { @@ -992,7 +976,7 @@ func (*UsageSnapshot) ProtoMessage() {} func (x *UsageSnapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1062,9 @@ type GkeClusterConfig struct { func (x *GkeClusterConfig) Reset() { *x = GkeClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeClusterConfig) String() string { @@ -1093,7 +1075,7 @@ func (*GkeClusterConfig) ProtoMessage() {} func (x *GkeClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1126,9 @@ type KubernetesClusterConfig struct { func (x *KubernetesClusterConfig) Reset() { *x = KubernetesClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesClusterConfig) String() string { @@ -1159,7 +1139,7 @@ func (*KubernetesClusterConfig) ProtoMessage() {} func (x *KubernetesClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1239,11 +1219,9 @@ type KubernetesSoftwareConfig struct { func (x *KubernetesSoftwareConfig) Reset() { *x = KubernetesSoftwareConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesSoftwareConfig) String() string { @@ -1254,7 +1232,7 @@ func (*KubernetesSoftwareConfig) ProtoMessage() {} func (x *KubernetesSoftwareConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1312,11 +1290,9 @@ type GkeNodePoolTarget struct { func (x *GkeNodePoolTarget) Reset() { *x = GkeNodePoolTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeNodePoolTarget) String() string { @@ -1327,7 +1303,7 @@ func (*GkeNodePoolTarget) ProtoMessage() {} func (x *GkeNodePoolTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1367,9 @@ type GkeNodePoolConfig struct { func (x *GkeNodePoolConfig) Reset() { *x = GkeNodePoolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeNodePoolConfig) String() string { @@ -1406,7 +1380,7 @@ func (*GkeNodePoolConfig) ProtoMessage() {} func (x *GkeNodePoolConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1454,11 +1428,9 @@ type AutotuningConfig struct { func (x *AutotuningConfig) Reset() { *x = AutotuningConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutotuningConfig) String() string { @@ -1469,7 +1441,7 @@ func (*AutotuningConfig) ProtoMessage() {} func (x *AutotuningConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1475,9 @@ type RepositoryConfig struct { func (x *RepositoryConfig) Reset() { *x = RepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepositoryConfig) String() string { @@ -1518,7 +1488,7 @@ func (*RepositoryConfig) ProtoMessage() {} func (x *RepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1552,11 +1522,9 @@ type PyPiRepositoryConfig struct { func (x *PyPiRepositoryConfig) Reset() { *x = PyPiRepositoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PyPiRepositoryConfig) String() string { @@ -1567,7 +1535,7 @@ func (*PyPiRepositoryConfig) ProtoMessage() {} func (x *PyPiRepositoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1644,11 +1612,9 @@ type GkeNodePoolConfig_GkeNodeConfig struct { func (x *GkeNodePoolConfig_GkeNodeConfig) Reset() { *x = GkeNodePoolConfig_GkeNodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeNodePoolConfig_GkeNodeConfig) String() string { @@ -1659,7 +1625,7 @@ func (*GkeNodePoolConfig_GkeNodeConfig) ProtoMessage() {} func (x *GkeNodePoolConfig_GkeNodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1708,9 @@ type GkeNodePoolConfig_GkeNodePoolAcceleratorConfig struct { func (x *GkeNodePoolConfig_GkeNodePoolAcceleratorConfig) Reset() { *x = GkeNodePoolConfig_GkeNodePoolAcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeNodePoolConfig_GkeNodePoolAcceleratorConfig) String() string { @@ -1757,7 +1721,7 @@ func (*GkeNodePoolConfig_GkeNodePoolAcceleratorConfig) ProtoMessage() {} func (x *GkeNodePoolConfig_GkeNodePoolAcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1811,11 +1775,9 @@ type GkeNodePoolConfig_GkeNodePoolAutoscalingConfig struct { func (x *GkeNodePoolConfig_GkeNodePoolAutoscalingConfig) Reset() { *x = GkeNodePoolConfig_GkeNodePoolAutoscalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeNodePoolConfig_GkeNodePoolAutoscalingConfig) String() string { @@ -1826,7 +1788,7 @@ func (*GkeNodePoolConfig_GkeNodePoolAutoscalingConfig) ProtoMessage() {} func (x *GkeNodePoolConfig_GkeNodePoolAutoscalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_shared_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2309,236 +2271,6 @@ func file_google_cloud_dataproc_v1_shared_proto_init() { if File_google_cloud_dataproc_v1_shared_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_shared_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SparkHistoryServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PeripheralsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UsageMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UsageSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GkeClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesSoftwareConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GkeNodePoolTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GkeNodePoolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AutotuningConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PyPiRepositoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GkeNodePoolConfig_GkeNodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GkeNodePoolConfig_GkeNodePoolAcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_shared_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GkeNodePoolConfig_GkeNodePoolAutoscalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_shared_proto_msgTypes[2].OneofWrappers = []any{ (*ExecutionConfig_NetworkUri)(nil), (*ExecutionConfig_SubnetworkUri)(nil), diff --git a/dataproc/apiv1/dataprocpb/workflow_templates.pb.go b/dataproc/apiv1/dataprocpb/workflow_templates.pb.go index f382089e0364..2e7170e1545e 100755 --- a/dataproc/apiv1/dataprocpb/workflow_templates.pb.go +++ b/dataproc/apiv1/dataprocpb/workflow_templates.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataproc/v1/workflow_templates.proto @@ -238,11 +238,9 @@ type WorkflowTemplate struct { func (x *WorkflowTemplate) Reset() { *x = WorkflowTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowTemplate) String() string { @@ -253,7 +251,7 @@ func (*WorkflowTemplate) ProtoMessage() {} func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +363,9 @@ type WorkflowTemplatePlacement struct { func (x *WorkflowTemplatePlacement) Reset() { *x = WorkflowTemplatePlacement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowTemplatePlacement) String() string { @@ -380,7 +376,7 @@ func (*WorkflowTemplatePlacement) ProtoMessage() {} func (x *WorkflowTemplatePlacement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +463,9 @@ type ManagedCluster struct { func (x *ManagedCluster) Reset() { *x = ManagedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedCluster) String() string { @@ -482,7 +476,7 @@ func (*ManagedCluster) ProtoMessage() {} func (x *ManagedCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +531,9 @@ type ClusterSelector struct { func (x *ClusterSelector) Reset() { *x = ClusterSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterSelector) String() string { @@ -552,7 +544,7 @@ func (*ClusterSelector) ProtoMessage() {} func (x *ClusterSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +626,9 @@ type OrderedJob struct { func (x *OrderedJob) Reset() { *x = OrderedJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrderedJob) String() string { @@ -649,7 +639,7 @@ func (*OrderedJob) ProtoMessage() {} func (x *OrderedJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +909,9 @@ type TemplateParameter struct { func (x *TemplateParameter) Reset() { *x = TemplateParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TemplateParameter) String() string { @@ -934,7 +922,7 @@ func (*TemplateParameter) ProtoMessage() {} func (x *TemplateParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +982,9 @@ type ParameterValidation struct { func (x *ParameterValidation) Reset() { *x = ParameterValidation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterValidation) String() string { @@ -1009,7 +995,7 @@ func (*ParameterValidation) ProtoMessage() {} func (x *ParameterValidation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1063,9 @@ type RegexValidation struct { func (x *RegexValidation) Reset() { *x = RegexValidation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegexValidation) String() string { @@ -1092,7 +1076,7 @@ func (*RegexValidation) ProtoMessage() {} func (x *RegexValidation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1110,9 @@ type ValueValidation struct { func (x *ValueValidation) Reset() { *x = ValueValidation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueValidation) String() string { @@ -1141,7 +1123,7 @@ func (*ValueValidation) ProtoMessage() {} func (x *ValueValidation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1199,9 @@ type WorkflowMetadata struct { func (x *WorkflowMetadata) Reset() { *x = WorkflowMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowMetadata) String() string { @@ -1232,7 +1212,7 @@ func (*WorkflowMetadata) ProtoMessage() {} func (x *WorkflowMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,11 +1341,9 @@ type ClusterOperation struct { func (x *ClusterOperation) Reset() { *x = ClusterOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterOperation) String() string { @@ -1376,7 +1354,7 @@ func (*ClusterOperation) ProtoMessage() {} func (x *ClusterOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1402,9 @@ type WorkflowGraph struct { func (x *WorkflowGraph) Reset() { *x = WorkflowGraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowGraph) String() string { @@ -1439,7 +1415,7 @@ func (*WorkflowGraph) ProtoMessage() {} func (x *WorkflowGraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1457,9 @@ type WorkflowNode struct { func (x *WorkflowNode) Reset() { *x = WorkflowNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowNode) String() string { @@ -1496,7 +1470,7 @@ func (*WorkflowNode) ProtoMessage() {} func (x *WorkflowNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,11 +1543,9 @@ type CreateWorkflowTemplateRequest struct { func (x *CreateWorkflowTemplateRequest) Reset() { *x = CreateWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowTemplateRequest) String() string { @@ -1584,7 +1556,7 @@ func (*CreateWorkflowTemplateRequest) ProtoMessage() {} func (x *CreateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1639,11 +1611,9 @@ type GetWorkflowTemplateRequest struct { func (x *GetWorkflowTemplateRequest) Reset() { *x = GetWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowTemplateRequest) String() string { @@ -1654,7 +1624,7 @@ func (*GetWorkflowTemplateRequest) ProtoMessage() {} func (x *GetWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1725,11 +1695,9 @@ type InstantiateWorkflowTemplateRequest struct { func (x *InstantiateWorkflowTemplateRequest) Reset() { *x = InstantiateWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantiateWorkflowTemplateRequest) String() string { @@ -1740,7 +1708,7 @@ func (*InstantiateWorkflowTemplateRequest) ProtoMessage() {} func (x *InstantiateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1784,9 @@ type InstantiateInlineWorkflowTemplateRequest struct { func (x *InstantiateInlineWorkflowTemplateRequest) Reset() { *x = InstantiateInlineWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantiateInlineWorkflowTemplateRequest) String() string { @@ -1831,7 +1797,7 @@ func (*InstantiateInlineWorkflowTemplateRequest) ProtoMessage() {} func (x *InstantiateInlineWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1881,11 +1847,9 @@ type UpdateWorkflowTemplateRequest struct { func (x *UpdateWorkflowTemplateRequest) Reset() { *x = UpdateWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkflowTemplateRequest) String() string { @@ -1896,7 +1860,7 @@ func (*UpdateWorkflowTemplateRequest) ProtoMessage() {} func (x *UpdateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1944,11 +1908,9 @@ type ListWorkflowTemplatesRequest struct { func (x *ListWorkflowTemplatesRequest) Reset() { *x = ListWorkflowTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowTemplatesRequest) String() string { @@ -1959,7 +1921,7 @@ func (*ListWorkflowTemplatesRequest) ProtoMessage() {} func (x *ListWorkflowTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2015,11 +1977,9 @@ type ListWorkflowTemplatesResponse struct { func (x *ListWorkflowTemplatesResponse) Reset() { *x = ListWorkflowTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowTemplatesResponse) String() string { @@ -2030,7 +1990,7 @@ func (*ListWorkflowTemplatesResponse) ProtoMessage() {} func (x *ListWorkflowTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2094,11 +2054,9 @@ type DeleteWorkflowTemplateRequest struct { func (x *DeleteWorkflowTemplateRequest) Reset() { *x = DeleteWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowTemplateRequest) String() string { @@ -2109,7 +2067,7 @@ func (*DeleteWorkflowTemplateRequest) ProtoMessage() {} func (x *DeleteWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2177,11 +2135,9 @@ type WorkflowTemplate_EncryptionConfig struct { func (x *WorkflowTemplate_EncryptionConfig) Reset() { *x = WorkflowTemplate_EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkflowTemplate_EncryptionConfig) String() string { @@ -2192,7 +2148,7 @@ func (*WorkflowTemplate_EncryptionConfig) ProtoMessage() {} func (x *WorkflowTemplate_EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2924,272 +2880,6 @@ func file_google_cloud_dataproc_v1_workflow_templates_proto_init() { } file_google_cloud_dataproc_v1_clusters_proto_init() file_google_cloud_dataproc_v1_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowTemplatePlacement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ManagedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClusterSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OrderedJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TemplateParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ParameterValidation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RegexValidation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ValueValidation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ClusterOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowGraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*InstantiateWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*InstantiateInlineWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*WorkflowTemplate_EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dataproc_v1_workflow_templates_proto_msgTypes[1].OneofWrappers = []any{ (*WorkflowTemplatePlacement_ManagedCluster)(nil), (*WorkflowTemplatePlacement_ClusterSelector)(nil), diff --git a/dataproc/apiv1/helpers.go b/dataproc/apiv1/helpers.go index 0b685a22f211..3a89cbfdcbcd 100755 --- a/dataproc/apiv1/helpers.go +++ b/dataproc/apiv1/helpers.go @@ -18,10 +18,20 @@ package dataproc import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataproc.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataproc/apiv1/job_controller_client.go b/dataproc/apiv1/job_controller_client.go index 2aee19e766e8..2495783b30ca 100755 --- a/dataproc/apiv1/job_controller_client.go +++ b/dataproc/apiv1/job_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -454,6 +453,8 @@ type jobControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobControllerClient creates a new job controller client based on gRPC. @@ -480,6 +481,7 @@ func NewJobControllerClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, jobControllerClient: dataprocpb.NewJobControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -544,6 +546,8 @@ type jobControllerRESTClient struct { // Points back to the CallOptions field of the containing JobControllerClient CallOptions **JobControllerCallOptions + + logger *slog.Logger } // NewJobControllerRESTClient creates a new job controller rest client. @@ -561,6 +565,7 @@ func NewJobControllerRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -623,7 +628,7 @@ func (c *jobControllerGRPCClient) SubmitJob(ctx context.Context, req *dataprocpb var resp *dataprocpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.SubmitJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.SubmitJob, req, settings.GRPC, c.logger, "SubmitJob") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *jobControllerGRPCClient) SubmitJobAsOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.SubmitJobAsOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.SubmitJobAsOperation, req, settings.GRPC, c.logger, "SubmitJobAsOperation") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *jobControllerGRPCClient) GetJob(ctx context.Context, req *dataprocpb.Ge var resp *dataprocpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *jobControllerGRPCClient) ListJobs(ctx context.Context, req *dataprocpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *jobControllerGRPCClient) UpdateJob(ctx context.Context, req *dataprocpb var resp *dataprocpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -743,7 +748,7 @@ func (c *jobControllerGRPCClient) CancelJob(ctx context.Context, req *dataprocpb var resp *dataprocpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobControllerClient.CancelJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobControllerClient.CancelJob, req, settings.GRPC, c.logger, "CancelJob") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *jobControllerGRPCClient) DeleteJob(ctx context.Context, req *dataprocpb opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobControllerClient.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobControllerClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -775,7 +780,7 @@ func (c *jobControllerGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -793,7 +798,7 @@ func (c *jobControllerGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *jobControllerGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *jobControllerGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -842,7 +847,7 @@ func (c *jobControllerGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -857,7 +862,7 @@ func (c *jobControllerGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *jobControllerGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -951,17 +956,7 @@ func (c *jobControllerRESTClient) SubmitJob(ctx context.Context, req *dataprocpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitJob") if err != nil { return err } @@ -1016,21 +1011,10 @@ func (c *jobControllerRESTClient) SubmitJobAsOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitJobAsOperation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1081,17 +1065,7 @@ func (c *jobControllerRESTClient) GetJob(ctx context.Context, req *dataprocpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -1162,21 +1136,10 @@ func (c *jobControllerRESTClient) ListJobs(ctx context.Context, req *dataprocpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1253,17 +1216,7 @@ func (c *jobControllerRESTClient) UpdateJob(ctx context.Context, req *dataprocpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -1323,17 +1276,7 @@ func (c *jobControllerRESTClient) CancelJob(ctx context.Context, req *dataprocpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelJob") if err != nil { return err } @@ -1381,15 +1324,8 @@ func (c *jobControllerRESTClient) DeleteJob(ctx context.Context, req *dataprocpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -1433,17 +1369,7 @@ func (c *jobControllerRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1503,17 +1429,7 @@ func (c *jobControllerRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1575,17 +1491,7 @@ func (c *jobControllerRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1632,15 +1538,8 @@ func (c *jobControllerRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1674,15 +1573,8 @@ func (c *jobControllerRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1719,17 +1611,7 @@ func (c *jobControllerRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1794,21 +1676,10 @@ func (c *jobControllerRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/job_controller_client_example_go123_test.go b/dataproc/apiv1/job_controller_client_example_go123_test.go index 5b08612f3a59..5c19f73fd112 100644 --- a/dataproc/apiv1/job_controller_client_example_go123_test.go +++ b/dataproc/apiv1/job_controller_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleJobControllerClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleJobControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/node_group_controller_client.go b/dataproc/apiv1/node_group_controller_client.go index 3bb8fcd9947c..e53d8efb436e 100755 --- a/dataproc/apiv1/node_group_controller_client.go +++ b/dataproc/apiv1/node_group_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -265,6 +264,8 @@ type nodeGroupControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNodeGroupControllerClient creates a new node group controller client based on gRPC. @@ -292,6 +293,7 @@ func NewNodeGroupControllerClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, nodeGroupControllerClient: dataprocpb.NewNodeGroupControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -356,6 +358,8 @@ type nodeGroupControllerRESTClient struct { // Points back to the CallOptions field of the containing NodeGroupControllerClient CallOptions **NodeGroupControllerCallOptions + + logger *slog.Logger } // NewNodeGroupControllerRESTClient creates a new node group controller rest client. @@ -374,6 +378,7 @@ func NewNodeGroupControllerRESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -436,7 +441,7 @@ func (c *nodeGroupControllerGRPCClient) CreateNodeGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.nodeGroupControllerClient.CreateNodeGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.nodeGroupControllerClient.CreateNodeGroup, req, settings.GRPC, c.logger, "CreateNodeGroup") return err }, opts...) if err != nil { @@ -456,7 +461,7 @@ func (c *nodeGroupControllerGRPCClient) ResizeNodeGroup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.nodeGroupControllerClient.ResizeNodeGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.nodeGroupControllerClient.ResizeNodeGroup, req, settings.GRPC, c.logger, "ResizeNodeGroup") return err }, opts...) if err != nil { @@ -476,7 +481,7 @@ func (c *nodeGroupControllerGRPCClient) GetNodeGroup(ctx context.Context, req *d var resp *dataprocpb.NodeGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.nodeGroupControllerClient.GetNodeGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.nodeGroupControllerClient.GetNodeGroup, req, settings.GRPC, c.logger, "GetNodeGroup") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *nodeGroupControllerGRPCClient) GetIamPolicy(ctx context.Context, req *i var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *nodeGroupControllerGRPCClient) SetIamPolicy(ctx context.Context, req *i var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *nodeGroupControllerGRPCClient) TestIamPermissions(ctx context.Context, var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -547,7 +552,7 @@ func (c *nodeGroupControllerGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -561,7 +566,7 @@ func (c *nodeGroupControllerGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -576,7 +581,7 @@ func (c *nodeGroupControllerGRPCClient) GetOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *nodeGroupControllerGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -678,21 +683,10 @@ func (c *nodeGroupControllerRESTClient) CreateNodeGroup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNodeGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -750,21 +744,10 @@ func (c *nodeGroupControllerRESTClient) ResizeNodeGroup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResizeNodeGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -816,17 +799,7 @@ func (c *nodeGroupControllerRESTClient) GetNodeGroup(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNodeGroup") if err != nil { return err } @@ -883,17 +856,7 @@ func (c *nodeGroupControllerRESTClient) GetIamPolicy(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -953,17 +916,7 @@ func (c *nodeGroupControllerRESTClient) SetIamPolicy(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1025,17 +978,7 @@ func (c *nodeGroupControllerRESTClient) TestIamPermissions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1082,15 +1025,8 @@ func (c *nodeGroupControllerRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1124,15 +1060,8 @@ func (c *nodeGroupControllerRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1169,17 +1098,7 @@ func (c *nodeGroupControllerRESTClient) GetOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1244,21 +1163,10 @@ func (c *nodeGroupControllerRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/node_group_controller_client_example_go123_test.go b/dataproc/apiv1/node_group_controller_client_example_go123_test.go index 61c4cf14934c..8729fa255bf4 100644 --- a/dataproc/apiv1/node_group_controller_client_example_go123_test.go +++ b/dataproc/apiv1/node_group_controller_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNodeGroupControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/session_controller_client.go b/dataproc/apiv1/session_controller_client.go index 37d55c28c6c9..e757c00222d3 100755 --- a/dataproc/apiv1/session_controller_client.go +++ b/dataproc/apiv1/session_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -285,6 +284,8 @@ type sessionControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionControllerClient creates a new session controller client based on gRPC. @@ -311,6 +312,7 @@ func NewSessionControllerClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, sessionControllerClient: dataprocpb.NewSessionControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -375,6 +377,8 @@ type sessionControllerRESTClient struct { // Points back to the CallOptions field of the containing SessionControllerClient CallOptions **SessionControllerCallOptions + + logger *slog.Logger } // NewSessionControllerRESTClient creates a new session controller rest client. @@ -392,6 +396,7 @@ func NewSessionControllerRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -454,7 +459,7 @@ func (c *sessionControllerGRPCClient) CreateSession(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionControllerClient.CreateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionControllerClient.CreateSession, req, settings.GRPC, c.logger, "CreateSession") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *sessionControllerGRPCClient) GetSession(ctx context.Context, req *datap var resp *dataprocpb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionControllerClient.GetSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionControllerClient.GetSession, req, settings.GRPC, c.logger, "GetSession") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *sessionControllerGRPCClient) ListSessions(ctx context.Context, req *dat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionControllerClient.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionControllerClient.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -538,7 +543,7 @@ func (c *sessionControllerGRPCClient) TerminateSession(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionControllerClient.TerminateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionControllerClient.TerminateSession, req, settings.GRPC, c.logger, "TerminateSession") return err }, opts...) if err != nil { @@ -558,7 +563,7 @@ func (c *sessionControllerGRPCClient) DeleteSession(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionControllerClient.DeleteSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionControllerClient.DeleteSession, req, settings.GRPC, c.logger, "DeleteSession") return err }, opts...) if err != nil { @@ -578,7 +583,7 @@ func (c *sessionControllerGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -596,7 +601,7 @@ func (c *sessionControllerGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *sessionControllerGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -631,7 +636,7 @@ func (c *sessionControllerGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -645,7 +650,7 @@ func (c *sessionControllerGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -660,7 +665,7 @@ func (c *sessionControllerGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -689,7 +694,7 @@ func (c *sessionControllerGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -758,21 +763,10 @@ func (c *sessionControllerRESTClient) CreateSession(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSession") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -823,17 +817,7 @@ func (c *sessionControllerRESTClient) GetSession(ctx context.Context, req *datap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSession") if err != nil { return err } @@ -898,21 +882,10 @@ func (c *sessionControllerRESTClient) ListSessions(ctx context.Context, req *dat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -980,21 +953,10 @@ func (c *sessionControllerRESTClient) TerminateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TerminateSession") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1048,21 +1010,10 @@ func (c *sessionControllerRESTClient) DeleteSession(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSession") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1120,17 +1071,7 @@ func (c *sessionControllerRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1190,17 +1131,7 @@ func (c *sessionControllerRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1262,17 +1193,7 @@ func (c *sessionControllerRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1319,15 +1240,8 @@ func (c *sessionControllerRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1361,15 +1275,8 @@ func (c *sessionControllerRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1406,17 +1313,7 @@ func (c *sessionControllerRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1481,21 +1378,10 @@ func (c *sessionControllerRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/session_controller_client_example_go123_test.go b/dataproc/apiv1/session_controller_client_example_go123_test.go index c920c576386b..51d31024da64 100644 --- a/dataproc/apiv1/session_controller_client_example_go123_test.go +++ b/dataproc/apiv1/session_controller_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionControllerClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/session_template_controller_client.go b/dataproc/apiv1/session_template_controller_client.go index ccb904ce430c..5aaf5236cf8b 100755 --- a/dataproc/apiv1/session_template_controller_client.go +++ b/dataproc/apiv1/session_template_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type sessionTemplateControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionTemplateControllerClient creates a new session template controller client based on gRPC. @@ -277,6 +278,7 @@ func NewSessionTemplateControllerClient(ctx context.Context, opts ...option.Clie connPool: connPool, sessionTemplateControllerClient: dataprocpb.NewSessionTemplateControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -325,6 +327,8 @@ type sessionTemplateControllerRESTClient struct { // Points back to the CallOptions field of the containing SessionTemplateControllerClient CallOptions **SessionTemplateControllerCallOptions + + logger *slog.Logger } // NewSessionTemplateControllerRESTClient creates a new session template controller rest client. @@ -342,6 +346,7 @@ func NewSessionTemplateControllerRESTClient(ctx context.Context, opts ...option. endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -394,7 +399,7 @@ func (c *sessionTemplateControllerGRPCClient) CreateSessionTemplate(ctx context. var resp *dataprocpb.SessionTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionTemplateControllerClient.CreateSessionTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionTemplateControllerClient.CreateSessionTemplate, req, settings.GRPC, c.logger, "CreateSessionTemplate") return err }, opts...) if err != nil { @@ -412,7 +417,7 @@ func (c *sessionTemplateControllerGRPCClient) UpdateSessionTemplate(ctx context. var resp *dataprocpb.SessionTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionTemplateControllerClient.UpdateSessionTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionTemplateControllerClient.UpdateSessionTemplate, req, settings.GRPC, c.logger, "UpdateSessionTemplate") return err }, opts...) if err != nil { @@ -430,7 +435,7 @@ func (c *sessionTemplateControllerGRPCClient) GetSessionTemplate(ctx context.Con var resp *dataprocpb.SessionTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionTemplateControllerClient.GetSessionTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionTemplateControllerClient.GetSessionTemplate, req, settings.GRPC, c.logger, "GetSessionTemplate") return err }, opts...) if err != nil { @@ -459,7 +464,7 @@ func (c *sessionTemplateControllerGRPCClient) ListSessionTemplates(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionTemplateControllerClient.ListSessionTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionTemplateControllerClient.ListSessionTemplates, req, settings.GRPC, c.logger, "ListSessionTemplates") return err }, opts...) if err != nil { @@ -493,7 +498,7 @@ func (c *sessionTemplateControllerGRPCClient) DeleteSessionTemplate(ctx context. opts = append((*c.CallOptions).DeleteSessionTemplate[0:len((*c.CallOptions).DeleteSessionTemplate):len((*c.CallOptions).DeleteSessionTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sessionTemplateControllerClient.DeleteSessionTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sessionTemplateControllerClient.DeleteSessionTemplate, req, settings.GRPC, c.logger, "DeleteSessionTemplate") return err }, opts...) return err @@ -508,7 +513,7 @@ func (c *sessionTemplateControllerGRPCClient) GetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *sessionTemplateControllerGRPCClient) SetIamPolicy(ctx context.Context, var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *sessionTemplateControllerGRPCClient) TestIamPermissions(ctx context.Con var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -561,7 +566,7 @@ func (c *sessionTemplateControllerGRPCClient) CancelOperation(ctx context.Contex opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -575,7 +580,7 @@ func (c *sessionTemplateControllerGRPCClient) DeleteOperation(ctx context.Contex opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -590,7 +595,7 @@ func (c *sessionTemplateControllerGRPCClient) GetOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *sessionTemplateControllerGRPCClient) ListOperations(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -685,17 +690,7 @@ func (c *sessionTemplateControllerRESTClient) CreateSessionTemplate(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSessionTemplate") if err != nil { return err } @@ -752,17 +747,7 @@ func (c *sessionTemplateControllerRESTClient) UpdateSessionTemplate(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSessionTemplate") if err != nil { return err } @@ -812,17 +797,7 @@ func (c *sessionTemplateControllerRESTClient) GetSessionTemplate(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSessionTemplate") if err != nil { return err } @@ -887,21 +862,10 @@ func (c *sessionTemplateControllerRESTClient) ListSessionTemplates(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessionTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -961,15 +925,8 @@ func (c *sessionTemplateControllerRESTClient) DeleteSessionTemplate(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSessionTemplate") + return err }, opts...) } @@ -1013,17 +970,7 @@ func (c *sessionTemplateControllerRESTClient) GetIamPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1083,17 +1030,7 @@ func (c *sessionTemplateControllerRESTClient) SetIamPolicy(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1155,17 +1092,7 @@ func (c *sessionTemplateControllerRESTClient) TestIamPermissions(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1212,15 +1139,8 @@ func (c *sessionTemplateControllerRESTClient) CancelOperation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1254,15 +1174,8 @@ func (c *sessionTemplateControllerRESTClient) DeleteOperation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1299,17 +1212,7 @@ func (c *sessionTemplateControllerRESTClient) GetOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1374,21 +1277,10 @@ func (c *sessionTemplateControllerRESTClient) ListOperations(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/session_template_controller_client_example_go123_test.go b/dataproc/apiv1/session_template_controller_client_example_go123_test.go index d94704a68025..a67b5320633c 100644 --- a/dataproc/apiv1/session_template_controller_client_example_go123_test.go +++ b/dataproc/apiv1/session_template_controller_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionTemplateControllerClient_ListSessionTemplates_all() { } for resp, err := range c.ListSessionTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionTemplateControllerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataproc/apiv1/workflow_template_client.go b/dataproc/apiv1/workflow_template_client.go index c9f661954acb..0e0bdd044c19 100755 --- a/dataproc/apiv1/workflow_template_client.go +++ b/dataproc/apiv1/workflow_template_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -500,6 +499,8 @@ type workflowTemplateGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWorkflowTemplateClient creates a new workflow template service client based on gRPC. @@ -527,6 +528,7 @@ func NewWorkflowTemplateClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, workflowTemplateClient: dataprocpb.NewWorkflowTemplateServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -591,6 +593,8 @@ type workflowTemplateRESTClient struct { // Points back to the CallOptions field of the containing WorkflowTemplateClient CallOptions **WorkflowTemplateCallOptions + + logger *slog.Logger } // NewWorkflowTemplateRESTClient creates a new workflow template service rest client. @@ -609,6 +613,7 @@ func NewWorkflowTemplateRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -671,7 +676,7 @@ func (c *workflowTemplateGRPCClient) CreateWorkflowTemplate(ctx context.Context, var resp *dataprocpb.WorkflowTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.CreateWorkflowTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.CreateWorkflowTemplate, req, settings.GRPC, c.logger, "CreateWorkflowTemplate") return err }, opts...) if err != nil { @@ -689,7 +694,7 @@ func (c *workflowTemplateGRPCClient) GetWorkflowTemplate(ctx context.Context, re var resp *dataprocpb.WorkflowTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.GetWorkflowTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.GetWorkflowTemplate, req, settings.GRPC, c.logger, "GetWorkflowTemplate") return err }, opts...) if err != nil { @@ -707,7 +712,7 @@ func (c *workflowTemplateGRPCClient) InstantiateWorkflowTemplate(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.InstantiateWorkflowTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.InstantiateWorkflowTemplate, req, settings.GRPC, c.logger, "InstantiateWorkflowTemplate") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *workflowTemplateGRPCClient) InstantiateInlineWorkflowTemplate(ctx conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.InstantiateInlineWorkflowTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.InstantiateInlineWorkflowTemplate, req, settings.GRPC, c.logger, "InstantiateInlineWorkflowTemplate") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *workflowTemplateGRPCClient) UpdateWorkflowTemplate(ctx context.Context, var resp *dataprocpb.WorkflowTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.UpdateWorkflowTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.UpdateWorkflowTemplate, req, settings.GRPC, c.logger, "UpdateWorkflowTemplate") return err }, opts...) if err != nil { @@ -776,7 +781,7 @@ func (c *workflowTemplateGRPCClient) ListWorkflowTemplates(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowTemplateClient.ListWorkflowTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowTemplateClient.ListWorkflowTemplates, req, settings.GRPC, c.logger, "ListWorkflowTemplates") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *workflowTemplateGRPCClient) DeleteWorkflowTemplate(ctx context.Context, opts = append((*c.CallOptions).DeleteWorkflowTemplate[0:len((*c.CallOptions).DeleteWorkflowTemplate):len((*c.CallOptions).DeleteWorkflowTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.workflowTemplateClient.DeleteWorkflowTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.workflowTemplateClient.DeleteWorkflowTemplate, req, settings.GRPC, c.logger, "DeleteWorkflowTemplate") return err }, opts...) return err @@ -825,7 +830,7 @@ func (c *workflowTemplateGRPCClient) GetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -843,7 +848,7 @@ func (c *workflowTemplateGRPCClient) SetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -861,7 +866,7 @@ func (c *workflowTemplateGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *workflowTemplateGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -892,7 +897,7 @@ func (c *workflowTemplateGRPCClient) DeleteOperation(ctx context.Context, req *l opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -907,7 +912,7 @@ func (c *workflowTemplateGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -936,7 +941,7 @@ func (c *workflowTemplateGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1002,17 +1007,7 @@ func (c *workflowTemplateRESTClient) CreateWorkflowTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflowTemplate") if err != nil { return err } @@ -1068,17 +1063,7 @@ func (c *workflowTemplateRESTClient) GetWorkflowTemplate(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflowTemplate") if err != nil { return err } @@ -1152,21 +1137,10 @@ func (c *workflowTemplateRESTClient) InstantiateWorkflowTemplate(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InstantiateWorkflowTemplate") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1250,21 +1224,10 @@ func (c *workflowTemplateRESTClient) InstantiateInlineWorkflowTemplate(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InstantiateInlineWorkflowTemplate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1323,17 +1286,7 @@ func (c *workflowTemplateRESTClient) UpdateWorkflowTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkflowTemplate") if err != nil { return err } @@ -1395,21 +1348,10 @@ func (c *workflowTemplateRESTClient) ListWorkflowTemplates(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflowTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1472,15 +1414,8 @@ func (c *workflowTemplateRESTClient) DeleteWorkflowTemplate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflowTemplate") + return err }, opts...) } @@ -1524,17 +1459,7 @@ func (c *workflowTemplateRESTClient) GetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1594,17 +1519,7 @@ func (c *workflowTemplateRESTClient) SetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1666,17 +1581,7 @@ func (c *workflowTemplateRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1723,15 +1628,8 @@ func (c *workflowTemplateRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1765,15 +1663,8 @@ func (c *workflowTemplateRESTClient) DeleteOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1810,17 +1701,7 @@ func (c *workflowTemplateRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1885,21 +1766,10 @@ func (c *workflowTemplateRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dataproc/apiv1/workflow_template_client_example_go123_test.go b/dataproc/apiv1/workflow_template_client_example_go123_test.go index 3a83767d7e9d..8feb4293cb54 100644 --- a/dataproc/apiv1/workflow_template_client_example_go123_test.go +++ b/dataproc/apiv1/workflow_template_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleWorkflowTemplateClient_ListWorkflowTemplates_all() { } for resp, err := range c.ListWorkflowTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleWorkflowTemplateClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dataqna/apiv1alpha/auto_suggestion_client.go b/dataqna/apiv1alpha/auto_suggestion_client.go index b522a1c12d0f..0a17fffce4c8 100755 --- a/dataqna/apiv1alpha/auto_suggestion_client.go +++ b/dataqna/apiv1alpha/auto_suggestion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataqnapb "cloud.google.com/go/dataqna/apiv1alpha/dataqnapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -153,6 +152,8 @@ type autoSuggestionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAutoSuggestionClient creates a new auto suggestion service client based on gRPC. @@ -193,6 +194,7 @@ func NewAutoSuggestionClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, autoSuggestionClient: dataqnapb.NewAutoSuggestionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -239,6 +241,8 @@ type autoSuggestionRESTClient struct { // Points back to the CallOptions field of the containing AutoSuggestionClient CallOptions **AutoSuggestionCallOptions + + logger *slog.Logger } // NewAutoSuggestionRESTClient creates a new auto suggestion service rest client. @@ -270,6 +274,7 @@ func NewAutoSuggestionRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -322,7 +327,7 @@ func (c *autoSuggestionGRPCClient) SuggestQueries(ctx context.Context, req *data var resp *dataqnapb.SuggestQueriesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autoSuggestionClient.SuggestQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autoSuggestionClient.SuggestQueries, req, settings.GRPC, c.logger, "SuggestQueries") return err }, opts...) if err != nil { @@ -366,17 +371,7 @@ func (c *autoSuggestionRESTClient) SuggestQueries(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestQueries") if err != nil { return err } diff --git a/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go b/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go index c28ac58eb918..e1f6f5eb4701 100755 --- a/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go +++ b/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataqna/v1alpha/annotated_string.proto @@ -152,11 +152,9 @@ type AnnotatedString struct { func (x *AnnotatedString) Reset() { *x = AnnotatedString{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedString) String() string { @@ -167,7 +165,7 @@ func (*AnnotatedString) ProtoMessage() {} func (x *AnnotatedString) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +218,9 @@ type AnnotatedString_SemanticMarkup struct { func (x *AnnotatedString_SemanticMarkup) Reset() { *x = AnnotatedString_SemanticMarkup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedString_SemanticMarkup) String() string { @@ -235,7 +231,7 @@ func (*AnnotatedString_SemanticMarkup) ProtoMessage() {} func (x *AnnotatedString_SemanticMarkup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,32 +356,6 @@ func file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() { if File_google_cloud_dataqna_v1alpha_annotated_string_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedString_SemanticMarkup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go b/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go index 48a77405385b..b91abf6e62ef 100755 --- a/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go +++ b/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto @@ -121,11 +121,9 @@ type SuggestQueriesRequest struct { func (x *SuggestQueriesRequest) Reset() { *x = SuggestQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestQueriesRequest) String() string { @@ -136,7 +134,7 @@ func (*SuggestQueriesRequest) ProtoMessage() {} func (x *SuggestQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +195,9 @@ type Suggestion struct { func (x *Suggestion) Reset() { *x = Suggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Suggestion) String() string { @@ -212,7 +208,7 @@ func (*Suggestion) ProtoMessage() {} func (x *Suggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +259,9 @@ type SuggestionInfo struct { func (x *SuggestionInfo) Reset() { *x = SuggestionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionInfo) String() string { @@ -278,7 +272,7 @@ func (*SuggestionInfo) ProtoMessage() {} func (x *SuggestionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +313,9 @@ type SuggestQueriesResponse struct { func (x *SuggestQueriesResponse) Reset() { *x = SuggestQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestQueriesResponse) String() string { @@ -334,7 +326,7 @@ func (*SuggestQueriesResponse) ProtoMessage() {} func (x *SuggestQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +387,9 @@ type SuggestionInfo_MatchInfo struct { func (x *SuggestionInfo_MatchInfo) Reset() { *x = SuggestionInfo_MatchInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionInfo_MatchInfo) String() string { @@ -410,7 +400,7 @@ func (*SuggestionInfo_MatchInfo) ProtoMessage() {} func (x *SuggestionInfo_MatchInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,68 +586,6 @@ func file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_init() { return } file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SuggestQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Suggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SuggestQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionInfo_MatchInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataqna/apiv1alpha/dataqnapb/question.pb.go b/dataqna/apiv1alpha/dataqnapb/question.pb.go index 594d5b23ef99..90632421ab23 100755 --- a/dataqna/apiv1alpha/dataqnapb/question.pb.go +++ b/dataqna/apiv1alpha/dataqnapb/question.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataqna/v1alpha/question.proto @@ -371,11 +371,9 @@ type Question struct { func (x *Question) Reset() { *x = Question{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Question) String() string { @@ -386,7 +384,7 @@ func (*Question) ProtoMessage() {} func (x *Question) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +485,9 @@ type InterpretError struct { func (x *InterpretError) Reset() { *x = InterpretError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretError) String() string { @@ -502,7 +498,7 @@ func (*InterpretError) ProtoMessage() {} func (x *InterpretError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +554,9 @@ type ExecutionInfo struct { func (x *ExecutionInfo) Reset() { *x = ExecutionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionInfo) String() string { @@ -573,7 +567,7 @@ func (*ExecutionInfo) ProtoMessage() {} func (x *ExecutionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +628,9 @@ type BigQueryJob struct { func (x *BigQueryJob) Reset() { *x = BigQueryJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryJob) String() string { @@ -649,7 +641,7 @@ func (*BigQueryJob) ProtoMessage() {} func (x *BigQueryJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +707,9 @@ type Interpretation struct { func (x *Interpretation) Reset() { *x = Interpretation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interpretation) String() string { @@ -730,7 +720,7 @@ func (*Interpretation) ProtoMessage() {} func (x *Interpretation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +801,9 @@ type DataQuery struct { func (x *DataQuery) Reset() { *x = DataQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataQuery) String() string { @@ -826,7 +814,7 @@ func (*DataQuery) ProtoMessage() {} func (x *DataQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +850,9 @@ type HumanReadable struct { func (x *HumanReadable) Reset() { *x = HumanReadable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanReadable) String() string { @@ -877,7 +863,7 @@ func (*HumanReadable) ProtoMessage() {} func (x *HumanReadable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +909,9 @@ type InterpretationStructure struct { func (x *InterpretationStructure) Reset() { *x = InterpretationStructure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretationStructure) String() string { @@ -938,7 +922,7 @@ func (*InterpretationStructure) ProtoMessage() {} func (x *InterpretationStructure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +993,9 @@ type DebugFlags struct { func (x *DebugFlags) Reset() { *x = DebugFlags{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DebugFlags) String() string { @@ -1024,7 +1006,7 @@ func (*DebugFlags) ProtoMessage() {} func (x *DebugFlags) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1121,9 @@ type InterpretError_InterpretErrorDetails struct { func (x *InterpretError_InterpretErrorDetails) Reset() { *x = InterpretError_InterpretErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretError_InterpretErrorDetails) String() string { @@ -1154,7 +1134,7 @@ func (*InterpretError_InterpretErrorDetails) ProtoMessage() {} func (x *InterpretError_InterpretErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,11 +1184,9 @@ type InterpretError_InterpretUnsupportedDetails struct { func (x *InterpretError_InterpretUnsupportedDetails) Reset() { *x = InterpretError_InterpretUnsupportedDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretError_InterpretUnsupportedDetails) String() string { @@ -1219,7 +1197,7 @@ func (*InterpretError_InterpretUnsupportedDetails) ProtoMessage() {} func (x *InterpretError_InterpretUnsupportedDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1238,9 @@ type InterpretError_InterpretIncompleteQueryDetails struct { func (x *InterpretError_InterpretIncompleteQueryDetails) Reset() { *x = InterpretError_InterpretIncompleteQueryDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretError_InterpretIncompleteQueryDetails) String() string { @@ -1275,7 +1251,7 @@ func (*InterpretError_InterpretIncompleteQueryDetails) ProtoMessage() {} func (x *InterpretError_InterpretIncompleteQueryDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1283,9 @@ type InterpretError_InterpretAmbiguityDetails struct { func (x *InterpretError_InterpretAmbiguityDetails) Reset() { *x = InterpretError_InterpretAmbiguityDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretError_InterpretAmbiguityDetails) String() string { @@ -1322,7 +1296,7 @@ func (*InterpretError_InterpretAmbiguityDetails) ProtoMessage() {} func (x *InterpretError_InterpretAmbiguityDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1326,9 @@ type InterpretationStructure_ColumnInfo struct { func (x *InterpretationStructure_ColumnInfo) Reset() { *x = InterpretationStructure_ColumnInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterpretationStructure_ColumnInfo) String() string { @@ -1367,7 +1339,7 @@ func (*InterpretationStructure_ColumnInfo) ProtoMessage() {} func (x *InterpretationStructure_ColumnInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1774,176 +1746,6 @@ func file_google_cloud_dataqna_v1alpha_question_proto_init() { return } file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Question); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InterpretError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Interpretation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*HumanReadable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*InterpretationStructure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DebugFlags); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*InterpretError_InterpretErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*InterpretError_InterpretUnsupportedDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InterpretError_InterpretIncompleteQueryDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*InterpretError_InterpretAmbiguityDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*InterpretationStructure_ColumnInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataqna/apiv1alpha/dataqnapb/question_service.pb.go b/dataqna/apiv1alpha/dataqnapb/question_service.pb.go index 3665da153b90..39a8271b49ec 100755 --- a/dataqna/apiv1alpha/dataqnapb/question_service.pb.go +++ b/dataqna/apiv1alpha/dataqnapb/question_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataqna/v1alpha/question_service.proto @@ -56,11 +56,9 @@ type GetQuestionRequest struct { func (x *GetQuestionRequest) Reset() { *x = GetQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetQuestionRequest) String() string { @@ -71,7 +69,7 @@ func (*GetQuestionRequest) ProtoMessage() {} func (x *GetQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115,11 +113,9 @@ type CreateQuestionRequest struct { func (x *CreateQuestionRequest) Reset() { *x = CreateQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateQuestionRequest) String() string { @@ -130,7 +126,7 @@ func (*CreateQuestionRequest) ProtoMessage() {} func (x *CreateQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +170,9 @@ type ExecuteQuestionRequest struct { func (x *ExecuteQuestionRequest) Reset() { *x = ExecuteQuestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteQuestionRequest) String() string { @@ -189,7 +183,7 @@ func (*ExecuteQuestionRequest) ProtoMessage() {} func (x *ExecuteQuestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +226,9 @@ type GetUserFeedbackRequest struct { func (x *GetUserFeedbackRequest) Reset() { *x = GetUserFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserFeedbackRequest) String() string { @@ -247,7 +239,7 @@ func (*GetUserFeedbackRequest) ProtoMessage() {} func (x *GetUserFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +278,9 @@ type UpdateUserFeedbackRequest struct { func (x *UpdateUserFeedbackRequest) Reset() { *x = UpdateUserFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserFeedbackRequest) String() string { @@ -301,7 +291,7 @@ func (*UpdateUserFeedbackRequest) ProtoMessage() {} func (x *UpdateUserFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,68 +526,6 @@ func file_google_cloud_dataqna_v1alpha_question_service_proto_init() { } file_google_cloud_dataqna_v1alpha_question_proto_init() file_google_cloud_dataqna_v1alpha_user_feedback_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteQuestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetUserFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go b/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go index 4cc03b75faef..b3fe1381544f 100755 --- a/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go +++ b/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dataqna/v1alpha/user_feedback.proto @@ -107,11 +107,9 @@ type UserFeedback struct { func (x *UserFeedback) Reset() { *x = UserFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserFeedback) String() string { @@ -122,7 +120,7 @@ func (*UserFeedback) ProtoMessage() {} func (x *UserFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,20 +240,6 @@ func file_google_cloud_dataqna_v1alpha_user_feedback_proto_init() { if File_google_cloud_dataqna_v1alpha_user_feedback_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dataqna/apiv1alpha/helpers.go b/dataqna/apiv1alpha/helpers.go index df13a66b1e2b..c35f2a6ff320 100755 --- a/dataqna/apiv1alpha/helpers.go +++ b/dataqna/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package dataqna import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dataqna.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dataqna/apiv1alpha/question_client.go b/dataqna/apiv1alpha/question_client.go index dcea049a9b0d..7ac182b43693 100755 --- a/dataqna/apiv1alpha/question_client.go +++ b/dataqna/apiv1alpha/question_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dataqnapb "cloud.google.com/go/dataqna/apiv1alpha/dataqnapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -240,6 +239,8 @@ type questionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewQuestionClient creates a new question service client based on gRPC. @@ -280,6 +281,7 @@ func NewQuestionClient(ctx context.Context, opts ...option.ClientOption) (*Quest connPool: connPool, questionClient: dataqnapb.NewQuestionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -326,6 +328,8 @@ type questionRESTClient struct { // Points back to the CallOptions field of the containing QuestionClient CallOptions **QuestionCallOptions + + logger *slog.Logger } // NewQuestionRESTClient creates a new question service rest client. @@ -357,6 +361,7 @@ func NewQuestionRESTClient(ctx context.Context, opts ...option.ClientOption) (*Q endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -409,7 +414,7 @@ func (c *questionGRPCClient) GetQuestion(ctx context.Context, req *dataqnapb.Get var resp *dataqnapb.Question err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.questionClient.GetQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.questionClient.GetQuestion, req, settings.GRPC, c.logger, "GetQuestion") return err }, opts...) if err != nil { @@ -427,7 +432,7 @@ func (c *questionGRPCClient) CreateQuestion(ctx context.Context, req *dataqnapb. var resp *dataqnapb.Question err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.questionClient.CreateQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.questionClient.CreateQuestion, req, settings.GRPC, c.logger, "CreateQuestion") return err }, opts...) if err != nil { @@ -445,7 +450,7 @@ func (c *questionGRPCClient) ExecuteQuestion(ctx context.Context, req *dataqnapb var resp *dataqnapb.Question err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.questionClient.ExecuteQuestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.questionClient.ExecuteQuestion, req, settings.GRPC, c.logger, "ExecuteQuestion") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *questionGRPCClient) GetUserFeedback(ctx context.Context, req *dataqnapb var resp *dataqnapb.UserFeedback err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.questionClient.GetUserFeedback(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.questionClient.GetUserFeedback, req, settings.GRPC, c.logger, "GetUserFeedback") return err }, opts...) if err != nil { @@ -481,7 +486,7 @@ func (c *questionGRPCClient) UpdateUserFeedback(ctx context.Context, req *dataqn var resp *dataqnapb.UserFeedback err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.questionClient.UpdateUserFeedback(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.questionClient.UpdateUserFeedback, req, settings.GRPC, c.logger, "UpdateUserFeedback") return err }, opts...) if err != nil { @@ -529,17 +534,7 @@ func (c *questionRESTClient) GetQuestion(ctx context.Context, req *dataqnapb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetQuestion") if err != nil { return err } @@ -591,17 +586,7 @@ func (c *questionRESTClient) CreateQuestion(ctx context.Context, req *dataqnapb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateQuestion") if err != nil { return err } @@ -652,17 +637,7 @@ func (c *questionRESTClient) ExecuteQuestion(ctx context.Context, req *dataqnapb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteQuestion") if err != nil { return err } @@ -707,17 +682,7 @@ func (c *questionRESTClient) GetUserFeedback(ctx context.Context, req *dataqnapb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUserFeedback") if err != nil { return err } @@ -781,17 +746,7 @@ func (c *questionRESTClient) UpdateUserFeedback(ctx context.Context, req *dataqn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUserFeedback") if err != nil { return err } diff --git a/datastore/admin/apiv1/adminpb/datastore_admin.pb.go b/datastore/admin/apiv1/adminpb/datastore_admin.pb.go index 2757c994f694..1f0103e5ffcd 100755 --- a/datastore/admin/apiv1/adminpb/datastore_admin.pb.go +++ b/datastore/admin/apiv1/adminpb/datastore_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/admin/v1/datastore_admin.proto @@ -200,11 +200,9 @@ type CommonMetadata struct { func (x *CommonMetadata) Reset() { *x = CommonMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonMetadata) String() string { @@ -215,7 +213,7 @@ func (*CommonMetadata) ProtoMessage() {} func (x *CommonMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +279,9 @@ type Progress struct { func (x *Progress) Reset() { *x = Progress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Progress) String() string { @@ -296,7 +292,7 @@ func (*Progress) ProtoMessage() {} func (x *Progress) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +357,9 @@ type ExportEntitiesRequest struct { func (x *ExportEntitiesRequest) Reset() { *x = ExportEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntitiesRequest) String() string { @@ -376,7 +370,7 @@ func (*ExportEntitiesRequest) ProtoMessage() {} func (x *ExportEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +448,9 @@ type ImportEntitiesRequest struct { func (x *ImportEntitiesRequest) Reset() { *x = ImportEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntitiesRequest) String() string { @@ -469,7 +461,7 @@ func (*ImportEntitiesRequest) ProtoMessage() {} func (x *ImportEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +520,9 @@ type ExportEntitiesResponse struct { func (x *ExportEntitiesResponse) Reset() { *x = ExportEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntitiesResponse) String() string { @@ -543,7 +533,7 @@ func (*ExportEntitiesResponse) ProtoMessage() {} func (x *ExportEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +579,9 @@ type ExportEntitiesMetadata struct { func (x *ExportEntitiesMetadata) Reset() { *x = ExportEntitiesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntitiesMetadata) String() string { @@ -604,7 +592,7 @@ func (*ExportEntitiesMetadata) ProtoMessage() {} func (x *ExportEntitiesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +665,9 @@ type ImportEntitiesMetadata struct { func (x *ImportEntitiesMetadata) Reset() { *x = ImportEntitiesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntitiesMetadata) String() string { @@ -692,7 +678,7 @@ func (*ImportEntitiesMetadata) ProtoMessage() {} func (x *ImportEntitiesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +771,9 @@ type EntityFilter struct { func (x *EntityFilter) Reset() { *x = EntityFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityFilter) String() string { @@ -800,7 +784,7 @@ func (*EntityFilter) ProtoMessage() {} func (x *EntityFilter) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +829,9 @@ type CreateIndexRequest struct { func (x *CreateIndexRequest) Reset() { *x = CreateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexRequest) String() string { @@ -860,7 +842,7 @@ func (*CreateIndexRequest) ProtoMessage() {} func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +886,9 @@ type DeleteIndexRequest struct { func (x *DeleteIndexRequest) Reset() { *x = DeleteIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexRequest) String() string { @@ -919,7 +899,7 @@ func (*DeleteIndexRequest) ProtoMessage() {} func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,11 +943,9 @@ type GetIndexRequest struct { func (x *GetIndexRequest) Reset() { *x = GetIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexRequest) String() string { @@ -978,7 +956,7 @@ func (*GetIndexRequest) ProtoMessage() {} func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1004,9 @@ type ListIndexesRequest struct { func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesRequest) String() string { @@ -1041,7 +1017,7 @@ func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1075,9 @@ type ListIndexesResponse struct { func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesResponse) String() string { @@ -1114,7 +1088,7 @@ func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1159,11 +1133,9 @@ type IndexOperationMetadata struct { func (x *IndexOperationMetadata) Reset() { *x = IndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexOperationMetadata) String() string { @@ -1174,7 +1146,7 @@ func (*IndexOperationMetadata) ProtoMessage() {} func (x *IndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1205,9 @@ type DatastoreFirestoreMigrationMetadata struct { func (x *DatastoreFirestoreMigrationMetadata) Reset() { *x = DatastoreFirestoreMigrationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatastoreFirestoreMigrationMetadata) String() string { @@ -1248,7 +1218,7 @@ func (*DatastoreFirestoreMigrationMetadata) ProtoMessage() {} func (x *DatastoreFirestoreMigrationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1690,188 +1660,6 @@ func file_google_datastore_admin_v1_datastore_admin_proto_init() { } file_google_datastore_admin_v1_index_proto_init() file_google_datastore_admin_v1_migration_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CommonMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Progress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntitiesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntitiesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EntityFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*IndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_datastore_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DatastoreFirestoreMigrationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datastore/admin/apiv1/adminpb/index.pb.go b/datastore/admin/apiv1/adminpb/index.pb.go index a51b96bade39..35742c83c120 100755 --- a/datastore/admin/apiv1/adminpb/index.pb.go +++ b/datastore/admin/apiv1/adminpb/index.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/admin/v1/index.proto @@ -246,11 +246,9 @@ type Index struct { func (x *Index) Reset() { *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_index_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_index_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index) String() string { @@ -261,7 +259,7 @@ func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_index_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +331,9 @@ type Index_IndexedProperty struct { func (x *Index_IndexedProperty) Reset() { *x = Index_IndexedProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_index_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_index_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index_IndexedProperty) String() string { @@ -348,7 +344,7 @@ func (*Index_IndexedProperty) ProtoMessage() {} func (x *Index_IndexedProperty) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_index_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,32 +480,6 @@ func file_google_datastore_admin_v1_index_proto_init() { if File_google_datastore_admin_v1_index_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_datastore_admin_v1_index_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_index_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Index_IndexedProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datastore/admin/apiv1/adminpb/migration.pb.go b/datastore/admin/apiv1/adminpb/migration.pb.go index 9dc40ec71228..979fe3924827 100755 --- a/datastore/admin/apiv1/adminpb/migration.pb.go +++ b/datastore/admin/apiv1/adminpb/migration.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/admin/v1/migration.proto @@ -237,11 +237,9 @@ type MigrationStateEvent struct { func (x *MigrationStateEvent) Reset() { *x = MigrationStateEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationStateEvent) String() string { @@ -252,7 +250,7 @@ func (*MigrationStateEvent) ProtoMessage() {} func (x *MigrationStateEvent) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +296,9 @@ type MigrationProgressEvent struct { func (x *MigrationProgressEvent) Reset() { *x = MigrationProgressEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationProgressEvent) String() string { @@ -313,7 +309,7 @@ func (*MigrationProgressEvent) ProtoMessage() {} func (x *MigrationProgressEvent) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +383,9 @@ type MigrationProgressEvent_PrepareStepDetails struct { func (x *MigrationProgressEvent_PrepareStepDetails) Reset() { *x = MigrationProgressEvent_PrepareStepDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationProgressEvent_PrepareStepDetails) String() string { @@ -402,7 +396,7 @@ func (*MigrationProgressEvent_PrepareStepDetails) ProtoMessage() {} func (x *MigrationProgressEvent_PrepareStepDetails) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +430,9 @@ type MigrationProgressEvent_RedirectWritesStepDetails struct { func (x *MigrationProgressEvent_RedirectWritesStepDetails) Reset() { *x = MigrationProgressEvent_RedirectWritesStepDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationProgressEvent_RedirectWritesStepDetails) String() string { @@ -451,7 +443,7 @@ func (*MigrationProgressEvent_RedirectWritesStepDetails) ProtoMessage() {} func (x *MigrationProgressEvent_RedirectWritesStepDetails) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,56 +604,6 @@ func file_google_datastore_admin_v1_migration_proto_init() { if File_google_datastore_admin_v1_migration_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_datastore_admin_v1_migration_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MigrationStateEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_migration_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MigrationProgressEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_migration_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MigrationProgressEvent_PrepareStepDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_admin_v1_migration_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MigrationProgressEvent_RedirectWritesStepDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_datastore_admin_v1_migration_proto_msgTypes[1].OneofWrappers = []any{ (*MigrationProgressEvent_PrepareStepDetails_)(nil), (*MigrationProgressEvent_RedirectWritesStepDetails_)(nil), diff --git a/datastore/admin/apiv1/datastore_admin_client.go b/datastore/admin/apiv1/datastore_admin_client.go index f79403abe608..0f3e73f7e53f 100755 --- a/datastore/admin/apiv1/datastore_admin_client.go +++ b/datastore/admin/apiv1/datastore_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -413,6 +412,8 @@ type datastoreAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDatastoreAdminClient creates a new datastore admin client based on gRPC. @@ -493,6 +494,7 @@ func NewDatastoreAdminClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, datastoreAdminClient: adminpb.NewDatastoreAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -556,6 +558,8 @@ type datastoreAdminRESTClient struct { // Points back to the CallOptions field of the containing DatastoreAdminClient CallOptions **DatastoreAdminCallOptions + + logger *slog.Logger } // NewDatastoreAdminRESTClient creates a new datastore admin rest client. @@ -627,6 +631,7 @@ func NewDatastoreAdminRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -689,7 +694,7 @@ func (c *datastoreAdminGRPCClient) ExportEntities(ctx context.Context, req *admi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.ExportEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.ExportEntities, req, settings.GRPC, c.logger, "ExportEntities") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *datastoreAdminGRPCClient) ImportEntities(ctx context.Context, req *admi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.ImportEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.ImportEntities, req, settings.GRPC, c.logger, "ImportEntities") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *datastoreAdminGRPCClient) CreateIndex(ctx context.Context, req *adminpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.CreateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *datastoreAdminGRPCClient) DeleteIndex(ctx context.Context, req *adminpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.DeleteIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *datastoreAdminGRPCClient) GetIndex(ctx context.Context, req *adminpb.Ge var resp *adminpb.Index err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.GetIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.GetIndex, req, settings.GRPC, c.logger, "GetIndex") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *datastoreAdminGRPCClient) ListIndexes(ctx context.Context, req *adminpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.datastoreAdminClient.ListIndexes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.datastoreAdminClient.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") return err }, opts...) if err != nil { @@ -832,7 +837,7 @@ func (c *datastoreAdminGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -846,7 +851,7 @@ func (c *datastoreAdminGRPCClient) DeleteOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -861,7 +866,7 @@ func (c *datastoreAdminGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -890,7 +895,7 @@ func (c *datastoreAdminGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -961,21 +966,10 @@ func (c *datastoreAdminRESTClient) ExportEntities(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportEntities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1035,21 +1029,10 @@ func (c *datastoreAdminRESTClient) ImportEntities(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportEntities") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1119,21 +1102,10 @@ func (c *datastoreAdminRESTClient) CreateIndex(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1193,21 +1165,10 @@ func (c *datastoreAdminRESTClient) DeleteIndex(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1258,17 +1219,7 @@ func (c *datastoreAdminRESTClient) GetIndex(ctx context.Context, req *adminpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndex") if err != nil { return err } @@ -1335,21 +1286,10 @@ func (c *datastoreAdminRESTClient) ListIndexes(ctx context.Context, req *adminpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1409,15 +1349,8 @@ func (c *datastoreAdminRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1451,15 +1384,8 @@ func (c *datastoreAdminRESTClient) DeleteOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1496,17 +1422,7 @@ func (c *datastoreAdminRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1571,21 +1487,10 @@ func (c *datastoreAdminRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datastore/admin/apiv1/datastore_admin_client_example_go123_test.go b/datastore/admin/apiv1/datastore_admin_client_example_go123_test.go index 080ccad9e0ae..2f35ff764dde 100644 --- a/datastore/admin/apiv1/datastore_admin_client_example_go123_test.go +++ b/datastore/admin/apiv1/datastore_admin_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDatastoreAdminClient_ListIndexes_all() { } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDatastoreAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datastore/admin/apiv1/helpers.go b/datastore/admin/apiv1/helpers.go index 08d510d54923..4e9ca2b41c5e 100755 --- a/datastore/admin/apiv1/helpers.go +++ b/datastore/admin/apiv1/helpers.go @@ -18,10 +18,20 @@ package admin import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datastore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/datastore", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datastore/apiv1/datastorepb/aggregation_result.pb.go b/datastore/apiv1/datastorepb/aggregation_result.pb.go index 1c411eb7a0ea..422df2b1b01e 100755 --- a/datastore/apiv1/datastorepb/aggregation_result.pb.go +++ b/datastore/apiv1/datastorepb/aggregation_result.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/v1/aggregation_result.proto @@ -57,11 +57,9 @@ type AggregationResult struct { func (x *AggregationResult) Reset() { *x = AggregationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult) String() string { @@ -72,7 +70,7 @@ func (*AggregationResult) ProtoMessage() {} func (x *AggregationResult) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type AggregationResultBatch struct { func (x *AggregationResultBatch) Reset() { *x = AggregationResultBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResultBatch) String() string { @@ -131,7 +127,7 @@ func (*AggregationResultBatch) ProtoMessage() {} func (x *AggregationResultBatch) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,32 +264,6 @@ func file_google_datastore_v1_aggregation_result_proto_init() { } file_google_datastore_v1_entity_proto_init() file_google_datastore_v1_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_datastore_v1_aggregation_result_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_aggregation_result_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResultBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datastore/apiv1/datastorepb/datastore.pb.go b/datastore/apiv1/datastorepb/datastore.pb.go index bff72a1b5aac..f8a9d913a0c7 100755 --- a/datastore/apiv1/datastorepb/datastore.pb.go +++ b/datastore/apiv1/datastorepb/datastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/v1/datastore.proto @@ -281,11 +281,9 @@ type LookupRequest struct { func (x *LookupRequest) Reset() { *x = LookupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupRequest) String() string { @@ -296,7 +294,7 @@ func (*LookupRequest) ProtoMessage() {} func (x *LookupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +376,9 @@ type LookupResponse struct { func (x *LookupResponse) Reset() { *x = LookupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupResponse) String() string { @@ -393,7 +389,7 @@ func (*LookupResponse) ProtoMessage() {} func (x *LookupResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +479,9 @@ type RunQueryRequest struct { func (x *RunQueryRequest) Reset() { *x = RunQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunQueryRequest) String() string { @@ -498,7 +492,7 @@ func (*RunQueryRequest) ProtoMessage() {} func (x *RunQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,11 +615,9 @@ type RunQueryResponse struct { func (x *RunQueryResponse) Reset() { *x = RunQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunQueryResponse) String() string { @@ -636,7 +628,7 @@ func (*RunQueryResponse) ProtoMessage() {} func (x *RunQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +706,9 @@ type RunAggregationQueryRequest struct { func (x *RunAggregationQueryRequest) Reset() { *x = RunAggregationQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAggregationQueryRequest) String() string { @@ -729,7 +719,7 @@ func (*RunAggregationQueryRequest) ProtoMessage() {} func (x *RunAggregationQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +835,9 @@ type RunAggregationQueryResponse struct { func (x *RunAggregationQueryResponse) Reset() { *x = RunAggregationQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAggregationQueryResponse) String() string { @@ -860,7 +848,7 @@ func (*RunAggregationQueryResponse) ProtoMessage() {} func (x *RunAggregationQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +911,9 @@ type BeginTransactionRequest struct { func (x *BeginTransactionRequest) Reset() { *x = BeginTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BeginTransactionRequest) String() string { @@ -938,7 +924,7 @@ func (*BeginTransactionRequest) ProtoMessage() {} func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +973,9 @@ type BeginTransactionResponse struct { func (x *BeginTransactionResponse) Reset() { *x = BeginTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BeginTransactionResponse) String() string { @@ -1002,7 +986,7 @@ func (*BeginTransactionResponse) ProtoMessage() {} func (x *BeginTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1028,9 @@ type RollbackRequest struct { func (x *RollbackRequest) Reset() { *x = RollbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackRequest) String() string { @@ -1059,7 +1041,7 @@ func (*RollbackRequest) ProtoMessage() {} func (x *RollbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1106,11 +1088,9 @@ type RollbackResponse struct { func (x *RollbackResponse) Reset() { *x = RollbackResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackResponse) String() string { @@ -1121,7 +1101,7 @@ func (*RollbackResponse) ProtoMessage() {} func (x *RollbackResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,11 +1156,9 @@ type CommitRequest struct { func (x *CommitRequest) Reset() { *x = CommitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRequest) String() string { @@ -1191,7 +1169,7 @@ func (*CommitRequest) ProtoMessage() {} func (x *CommitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,11 +1274,9 @@ type CommitResponse struct { func (x *CommitResponse) Reset() { *x = CommitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitResponse) String() string { @@ -1311,7 +1287,7 @@ func (*CommitResponse) ProtoMessage() {} func (x *CommitResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,11 +1344,9 @@ type AllocateIdsRequest struct { func (x *AllocateIdsRequest) Reset() { *x = AllocateIdsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocateIdsRequest) String() string { @@ -1383,7 +1357,7 @@ func (*AllocateIdsRequest) ProtoMessage() {} func (x *AllocateIdsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1407,9 @@ type AllocateIdsResponse struct { func (x *AllocateIdsResponse) Reset() { *x = AllocateIdsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocateIdsResponse) String() string { @@ -1448,7 +1420,7 @@ func (*AllocateIdsResponse) ProtoMessage() {} func (x *AllocateIdsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1463,9 @@ type ReserveIdsRequest struct { func (x *ReserveIdsRequest) Reset() { *x = ReserveIdsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReserveIdsRequest) String() string { @@ -1506,7 +1476,7 @@ func (*ReserveIdsRequest) ProtoMessage() {} func (x *ReserveIdsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1552,11 +1522,9 @@ type ReserveIdsResponse struct { func (x *ReserveIdsResponse) Reset() { *x = ReserveIdsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReserveIdsResponse) String() string { @@ -1567,7 +1535,7 @@ func (*ReserveIdsResponse) ProtoMessage() {} func (x *ReserveIdsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1604,9 @@ type Mutation struct { func (x *Mutation) Reset() { *x = Mutation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation) String() string { @@ -1651,7 +1617,7 @@ func (*Mutation) ProtoMessage() {} func (x *Mutation) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,11 +1797,9 @@ type PropertyTransform struct { func (x *PropertyTransform) Reset() { *x = PropertyTransform{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyTransform) String() string { @@ -1846,7 +1810,7 @@ func (*PropertyTransform) ProtoMessage() {} func (x *PropertyTransform) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2049,11 +2013,9 @@ type MutationResult struct { func (x *MutationResult) Reset() { *x = MutationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationResult) String() string { @@ -2064,7 +2026,7 @@ func (*MutationResult) ProtoMessage() {} func (x *MutationResult) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2144,11 +2106,9 @@ type PropertyMask struct { func (x *PropertyMask) Reset() { *x = PropertyMask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyMask) String() string { @@ -2159,7 +2119,7 @@ func (*PropertyMask) ProtoMessage() {} func (x *PropertyMask) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2206,11 +2166,9 @@ type ReadOptions struct { func (x *ReadOptions) Reset() { *x = ReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadOptions) String() string { @@ -2221,7 +2179,7 @@ func (*ReadOptions) ProtoMessage() {} func (x *ReadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2340,11 +2298,9 @@ type TransactionOptions struct { func (x *TransactionOptions) Reset() { *x = TransactionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions) String() string { @@ -2355,7 +2311,7 @@ func (*TransactionOptions) ProtoMessage() {} func (x *TransactionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2421,11 +2377,9 @@ type TransactionOptions_ReadWrite struct { func (x *TransactionOptions_ReadWrite) Reset() { *x = TransactionOptions_ReadWrite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadWrite) String() string { @@ -2436,7 +2390,7 @@ func (*TransactionOptions_ReadWrite) ProtoMessage() {} func (x *TransactionOptions_ReadWrite) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2474,11 +2428,9 @@ type TransactionOptions_ReadOnly struct { func (x *TransactionOptions_ReadOnly) Reset() { *x = TransactionOptions_ReadOnly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_datastore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_datastore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadOnly) String() string { @@ -2489,7 +2441,7 @@ func (*TransactionOptions_ReadOnly) ProtoMessage() {} func (x *TransactionOptions_ReadOnly) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_datastore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3178,296 +3130,6 @@ func file_google_datastore_v1_datastore_proto_init() { file_google_datastore_v1_entity_proto_init() file_google_datastore_v1_query_proto_init() file_google_datastore_v1_query_profile_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_datastore_v1_datastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LookupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LookupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RunQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RunQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RunAggregationQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RunAggregationQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BeginTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BeginTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RollbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RollbackResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CommitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CommitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AllocateIdsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AllocateIdsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReserveIdsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ReserveIdsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Mutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PropertyTransform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*MutationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PropertyMask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadWrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_datastore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadOnly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_datastore_v1_datastore_proto_msgTypes[2].OneofWrappers = []any{ (*RunQueryRequest_Query)(nil), (*RunQueryRequest_GqlQuery)(nil), diff --git a/datastore/apiv1/datastorepb/entity.pb.go b/datastore/apiv1/datastorepb/entity.pb.go index 752144840e4c..5521ce134d6b 100755 --- a/datastore/apiv1/datastorepb/entity.pb.go +++ b/datastore/apiv1/datastorepb/entity.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/v1/entity.proto @@ -74,11 +74,9 @@ type PartitionId struct { func (x *PartitionId) Reset() { *x = PartitionId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionId) String() string { @@ -89,7 +87,7 @@ func (*PartitionId) ProtoMessage() {} func (x *PartitionId) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type Key struct { func (x *Key) Reset() { *x = Key{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key) String() string { @@ -174,7 +170,7 @@ func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type ArrayValue struct { func (x *ArrayValue) Reset() { *x = ArrayValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrayValue) String() string { @@ -232,7 +226,7 @@ func (*ArrayValue) ProtoMessage() {} func (x *ArrayValue) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +280,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -301,7 +293,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +527,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -550,7 +540,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +599,9 @@ type Key_PathElement struct { func (x *Key_PathElement) Reset() { *x = Key_PathElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_entity_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_entity_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key_PathElement) String() string { @@ -624,7 +612,7 @@ func (*Key_PathElement) ProtoMessage() {} func (x *Key_PathElement) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_entity_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,80 +842,6 @@ func file_google_datastore_v1_entity_proto_init() { if File_google_datastore_v1_entity_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_datastore_v1_entity_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PartitionId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_entity_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_entity_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ArrayValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_entity_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_entity_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_entity_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Key_PathElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_datastore_v1_entity_proto_msgTypes[3].OneofWrappers = []any{ (*Value_NullValue)(nil), (*Value_BooleanValue)(nil), diff --git a/datastore/apiv1/datastorepb/query.pb.go b/datastore/apiv1/datastorepb/query.pb.go index bfa4c3952df5..6184bd2e5849 100755 --- a/datastore/apiv1/datastorepb/query.pb.go +++ b/datastore/apiv1/datastorepb/query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/v1/query.proto @@ -489,11 +489,9 @@ type EntityResult struct { func (x *EntityResult) Reset() { *x = EntityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityResult) String() string { @@ -504,7 +502,7 @@ func (*EntityResult) ProtoMessage() {} func (x *EntityResult) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +613,9 @@ type Query struct { func (x *Query) Reset() { *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Query) String() string { @@ -630,7 +626,7 @@ func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +735,9 @@ type AggregationQuery struct { func (x *AggregationQuery) Reset() { *x = AggregationQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationQuery) String() string { @@ -754,7 +748,7 @@ func (*AggregationQuery) ProtoMessage() {} func (x *AggregationQuery) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +807,9 @@ type KindExpression struct { func (x *KindExpression) Reset() { *x = KindExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KindExpression) String() string { @@ -828,7 +820,7 @@ func (*KindExpression) ProtoMessage() {} func (x *KindExpression) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +860,9 @@ type PropertyReference struct { func (x *PropertyReference) Reset() { *x = PropertyReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyReference) String() string { @@ -883,7 +873,7 @@ func (*PropertyReference) ProtoMessage() {} func (x *PropertyReference) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -917,11 +907,9 @@ type Projection struct { func (x *Projection) Reset() { *x = Projection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Projection) String() string { @@ -932,7 +920,7 @@ func (*Projection) ProtoMessage() {} func (x *Projection) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +956,9 @@ type PropertyOrder struct { func (x *PropertyOrder) Reset() { *x = PropertyOrder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyOrder) String() string { @@ -983,7 +969,7 @@ func (*PropertyOrder) ProtoMessage() {} func (x *PropertyOrder) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,11 +1015,9 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -1044,7 +1028,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1100,9 @@ type CompositeFilter struct { func (x *CompositeFilter) Reset() { *x = CompositeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompositeFilter) String() string { @@ -1131,7 +1113,7 @@ func (*CompositeFilter) ProtoMessage() {} func (x *CompositeFilter) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,11 +1158,9 @@ type PropertyFilter struct { func (x *PropertyFilter) Reset() { *x = PropertyFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyFilter) String() string { @@ -1191,7 +1171,7 @@ func (*PropertyFilter) ProtoMessage() {} func (x *PropertyFilter) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1244,9 @@ type FindNearest struct { func (x *FindNearest) Reset() { *x = FindNearest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindNearest) String() string { @@ -1279,7 +1257,7 @@ func (*FindNearest) ProtoMessage() {} func (x *FindNearest) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,11 +1345,9 @@ type GqlQuery struct { func (x *GqlQuery) Reset() { *x = GqlQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GqlQuery) String() string { @@ -1382,7 +1358,7 @@ func (*GqlQuery) ProtoMessage() {} func (x *GqlQuery) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1418,9 @@ type GqlQueryParameter struct { func (x *GqlQueryParameter) Reset() { *x = GqlQueryParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GqlQueryParameter) String() string { @@ -1457,7 +1431,7 @@ func (*GqlQueryParameter) ProtoMessage() {} func (x *GqlQueryParameter) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,11 +1530,9 @@ type QueryResultBatch struct { func (x *QueryResultBatch) Reset() { *x = QueryResultBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResultBatch) String() string { @@ -1571,7 +1543,7 @@ func (*QueryResultBatch) ProtoMessage() {} func (x *QueryResultBatch) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,11 +1676,9 @@ type AggregationQuery_Aggregation struct { func (x *AggregationQuery_Aggregation) Reset() { *x = AggregationQuery_Aggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationQuery_Aggregation) String() string { @@ -1719,7 +1689,7 @@ func (*AggregationQuery_Aggregation) ProtoMessage() {} func (x *AggregationQuery_Aggregation) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1828,11 +1798,9 @@ type AggregationQuery_Aggregation_Count struct { func (x *AggregationQuery_Aggregation_Count) Reset() { *x = AggregationQuery_Aggregation_Count{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationQuery_Aggregation_Count) String() string { @@ -1843,7 +1811,7 @@ func (*AggregationQuery_Aggregation_Count) ProtoMessage() {} func (x *AggregationQuery_Aggregation_Count) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1897,11 +1865,9 @@ type AggregationQuery_Aggregation_Sum struct { func (x *AggregationQuery_Aggregation_Sum) Reset() { *x = AggregationQuery_Aggregation_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationQuery_Aggregation_Sum) String() string { @@ -1912,7 +1878,7 @@ func (*AggregationQuery_Aggregation_Sum) ProtoMessage() {} func (x *AggregationQuery_Aggregation_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1922,9 @@ type AggregationQuery_Aggregation_Avg struct { func (x *AggregationQuery_Aggregation_Avg) Reset() { *x = AggregationQuery_Aggregation_Avg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationQuery_Aggregation_Avg) String() string { @@ -1971,7 +1935,7 @@ func (*AggregationQuery_Aggregation_Avg) ProtoMessage() {} func (x *AggregationQuery_Aggregation_Avg) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2400,224 +2364,6 @@ func file_google_datastore_v1_query_proto_init() { return } file_google_datastore_v1_entity_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_datastore_v1_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AggregationQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*KindExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PropertyReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Projection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PropertyOrder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CompositeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PropertyFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FindNearest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GqlQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GqlQueryParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*QueryResultBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AggregationQuery_Aggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AggregationQuery_Aggregation_Count); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AggregationQuery_Aggregation_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AggregationQuery_Aggregation_Avg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_datastore_v1_query_proto_msgTypes[2].OneofWrappers = []any{ (*AggregationQuery_NestedQuery)(nil), } diff --git a/datastore/apiv1/datastorepb/query_profile.pb.go b/datastore/apiv1/datastorepb/query_profile.pb.go index 9651b37db87e..a0a304e1118f 100755 --- a/datastore/apiv1/datastorepb/query_profile.pb.go +++ b/datastore/apiv1/datastorepb/query_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/datastore/v1/query_profile.proto @@ -56,11 +56,9 @@ type ExplainOptions struct { func (x *ExplainOptions) Reset() { *x = ExplainOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainOptions) String() string { @@ -71,7 +69,7 @@ func (*ExplainOptions) ProtoMessage() {} func (x *ExplainOptions) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type ExplainMetrics struct { func (x *ExplainMetrics) Reset() { *x = ExplainMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainMetrics) String() string { @@ -124,7 +120,7 @@ func (*ExplainMetrics) ProtoMessage() {} func (x *ExplainMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_profile_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +166,9 @@ type PlanSummary struct { func (x *PlanSummary) Reset() { *x = PlanSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanSummary) String() string { @@ -185,7 +179,7 @@ func (*PlanSummary) ProtoMessage() {} func (x *PlanSummary) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_profile_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +232,9 @@ type ExecutionStats struct { func (x *ExecutionStats) Reset() { *x = ExecutionStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_datastore_v1_query_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_datastore_v1_query_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStats) String() string { @@ -253,7 +245,7 @@ func (*ExecutionStats) ProtoMessage() {} func (x *ExecutionStats) ProtoReflect() protoreflect.Message { mi := &file_google_datastore_v1_query_profile_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,56 +388,6 @@ func file_google_datastore_v1_query_profile_proto_init() { if File_google_datastore_v1_query_profile_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_datastore_v1_query_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExplainOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplainMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PlanSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_datastore_v1_query_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/datastream/apiv1/datastream_client.go b/datastream/apiv1/datastream_client.go index a96759dd75f1..0ac3884ea463 100755 --- a/datastream/apiv1/datastream_client.go +++ b/datastream/apiv1/datastream_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -896,6 +895,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new datastream client based on gRPC. @@ -922,6 +923,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datastreampb.NewDatastreamClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -986,6 +988,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new datastream rest client. @@ -1003,6 +1007,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1076,7 +1081,7 @@ func (c *gRPCClient) ListConnectionProfiles(ctx context.Context, req *datastream } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnectionProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnectionProfiles, req, settings.GRPC, c.logger, "ListConnectionProfiles") return err }, opts...) if err != nil { @@ -1111,7 +1116,7 @@ func (c *gRPCClient) GetConnectionProfile(ctx context.Context, req *datastreampb var resp *datastreampb.ConnectionProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnectionProfile, req, settings.GRPC, c.logger, "GetConnectionProfile") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *gRPCClient) CreateConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnectionProfile, req, settings.GRPC, c.logger, "CreateConnectionProfile") return err }, opts...) if err != nil { @@ -1149,7 +1154,7 @@ func (c *gRPCClient) UpdateConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnectionProfile, req, settings.GRPC, c.logger, "UpdateConnectionProfile") return err }, opts...) if err != nil { @@ -1169,7 +1174,7 @@ func (c *gRPCClient) DeleteConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteConnectionProfile, req, settings.GRPC, c.logger, "DeleteConnectionProfile") return err }, opts...) if err != nil { @@ -1189,7 +1194,7 @@ func (c *gRPCClient) DiscoverConnectionProfile(ctx context.Context, req *datastr var resp *datastreampb.DiscoverConnectionProfileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiscoverConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiscoverConnectionProfile, req, settings.GRPC, c.logger, "DiscoverConnectionProfile") return err }, opts...) if err != nil { @@ -1218,7 +1223,7 @@ func (c *gRPCClient) ListStreams(ctx context.Context, req *datastreampb.ListStre } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListStreams, req, settings.GRPC, c.logger, "ListStreams") return err }, opts...) if err != nil { @@ -1253,7 +1258,7 @@ func (c *gRPCClient) GetStream(ctx context.Context, req *datastreampb.GetStreamR var resp *datastreampb.Stream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetStream, req, settings.GRPC, c.logger, "GetStream") return err }, opts...) if err != nil { @@ -1271,7 +1276,7 @@ func (c *gRPCClient) CreateStream(ctx context.Context, req *datastreampb.CreateS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateStream, req, settings.GRPC, c.logger, "CreateStream") return err }, opts...) if err != nil { @@ -1291,7 +1296,7 @@ func (c *gRPCClient) UpdateStream(ctx context.Context, req *datastreampb.UpdateS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateStream, req, settings.GRPC, c.logger, "UpdateStream") return err }, opts...) if err != nil { @@ -1311,7 +1316,7 @@ func (c *gRPCClient) DeleteStream(ctx context.Context, req *datastreampb.DeleteS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteStream, req, settings.GRPC, c.logger, "DeleteStream") return err }, opts...) if err != nil { @@ -1331,7 +1336,7 @@ func (c *gRPCClient) RunStream(ctx context.Context, req *datastreampb.RunStreamR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunStream, req, settings.GRPC, c.logger, "RunStream") return err }, opts...) if err != nil { @@ -1351,7 +1356,7 @@ func (c *gRPCClient) GetStreamObject(ctx context.Context, req *datastreampb.GetS var resp *datastreampb.StreamObject err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetStreamObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetStreamObject, req, settings.GRPC, c.logger, "GetStreamObject") return err }, opts...) if err != nil { @@ -1369,7 +1374,7 @@ func (c *gRPCClient) LookupStreamObject(ctx context.Context, req *datastreampb.L var resp *datastreampb.StreamObject err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupStreamObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupStreamObject, req, settings.GRPC, c.logger, "LookupStreamObject") return err }, opts...) if err != nil { @@ -1398,7 +1403,7 @@ func (c *gRPCClient) ListStreamObjects(ctx context.Context, req *datastreampb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListStreamObjects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListStreamObjects, req, settings.GRPC, c.logger, "ListStreamObjects") return err }, opts...) if err != nil { @@ -1433,7 +1438,7 @@ func (c *gRPCClient) StartBackfillJob(ctx context.Context, req *datastreampb.Sta var resp *datastreampb.StartBackfillJobResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartBackfillJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartBackfillJob, req, settings.GRPC, c.logger, "StartBackfillJob") return err }, opts...) if err != nil { @@ -1451,7 +1456,7 @@ func (c *gRPCClient) StopBackfillJob(ctx context.Context, req *datastreampb.Stop var resp *datastreampb.StopBackfillJobResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopBackfillJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopBackfillJob, req, settings.GRPC, c.logger, "StopBackfillJob") return err }, opts...) if err != nil { @@ -1480,7 +1485,7 @@ func (c *gRPCClient) FetchStaticIps(ctx context.Context, req *datastreampb.Fetch } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchStaticIps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchStaticIps, req, settings.GRPC, c.logger, "FetchStaticIps") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *gRPCClient) CreatePrivateConnection(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePrivateConnection, req, settings.GRPC, c.logger, "CreatePrivateConnection") return err }, opts...) if err != nil { @@ -1535,7 +1540,7 @@ func (c *gRPCClient) GetPrivateConnection(ctx context.Context, req *datastreampb var resp *datastreampb.PrivateConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPrivateConnection, req, settings.GRPC, c.logger, "GetPrivateConnection") return err }, opts...) if err != nil { @@ -1564,7 +1569,7 @@ func (c *gRPCClient) ListPrivateConnections(ctx context.Context, req *datastream } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPrivateConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPrivateConnections, req, settings.GRPC, c.logger, "ListPrivateConnections") return err }, opts...) if err != nil { @@ -1599,7 +1604,7 @@ func (c *gRPCClient) DeletePrivateConnection(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePrivateConnection, req, settings.GRPC, c.logger, "DeletePrivateConnection") return err }, opts...) if err != nil { @@ -1619,7 +1624,7 @@ func (c *gRPCClient) CreateRoute(ctx context.Context, req *datastreampb.CreateRo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRoute, req, settings.GRPC, c.logger, "CreateRoute") return err }, opts...) if err != nil { @@ -1639,7 +1644,7 @@ func (c *gRPCClient) GetRoute(ctx context.Context, req *datastreampb.GetRouteReq var resp *datastreampb.Route err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRoute, req, settings.GRPC, c.logger, "GetRoute") return err }, opts...) if err != nil { @@ -1668,7 +1673,7 @@ func (c *gRPCClient) ListRoutes(ctx context.Context, req *datastreampb.ListRoute } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRoutes, req, settings.GRPC, c.logger, "ListRoutes") return err }, opts...) if err != nil { @@ -1703,7 +1708,7 @@ func (c *gRPCClient) DeleteRoute(ctx context.Context, req *datastreampb.DeleteRo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRoute, req, settings.GRPC, c.logger, "DeleteRoute") return err }, opts...) if err != nil { @@ -1723,7 +1728,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1752,7 +1757,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1786,7 +1791,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1800,7 +1805,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1815,7 +1820,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1844,7 +1849,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1922,21 +1927,10 @@ func (c *restClient) ListConnectionProfiles(ctx context.Context, req *datastream } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnectionProfiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1999,17 +1993,7 @@ func (c *restClient) GetConnectionProfile(ctx context.Context, req *datastreampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectionProfile") if err != nil { return err } @@ -2075,21 +2059,10 @@ func (c *restClient) CreateConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnectionProfile") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2162,21 +2135,10 @@ func (c *restClient) UpdateConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnectionProfile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2229,21 +2191,10 @@ func (c *restClient) DeleteConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnectionProfile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2303,17 +2254,7 @@ func (c *restClient) DiscoverConnectionProfile(ctx context.Context, req *datastr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiscoverConnectionProfile") if err != nil { return err } @@ -2381,21 +2322,10 @@ func (c *restClient) ListStreams(ctx context.Context, req *datastreampb.ListStre } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStreams") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2458,17 +2388,7 @@ func (c *restClient) GetStream(ctx context.Context, req *datastreampb.GetStreamR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStream") if err != nil { return err } @@ -2534,21 +2454,10 @@ func (c *restClient) CreateStream(ctx context.Context, req *datastreampb.CreateS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2621,21 +2530,10 @@ func (c *restClient) UpdateStream(ctx context.Context, req *datastreampb.UpdateS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStream") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2688,21 +2586,10 @@ func (c *restClient) DeleteStream(ctx context.Context, req *datastreampb.DeleteS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2759,21 +2646,10 @@ func (c *restClient) RunStream(ctx context.Context, req *datastreampb.RunStreamR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunStream") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2824,17 +2700,7 @@ func (c *restClient) GetStreamObject(ctx context.Context, req *datastreampb.GetS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStreamObject") if err != nil { return err } @@ -2890,17 +2756,7 @@ func (c *restClient) LookupStreamObject(ctx context.Context, req *datastreampb.L httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LookupStreamObject") if err != nil { return err } @@ -2962,21 +2818,10 @@ func (c *restClient) ListStreamObjects(ctx context.Context, req *datastreampb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStreamObjects") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3045,17 +2890,7 @@ func (c *restClient) StartBackfillJob(ctx context.Context, req *datastreampb.Sta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartBackfillJob") if err != nil { return err } @@ -3111,17 +2946,7 @@ func (c *restClient) StopBackfillJob(ctx context.Context, req *datastreampb.Stop httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopBackfillJob") if err != nil { return err } @@ -3184,21 +3009,10 @@ func (c *restClient) FetchStaticIps(ctx context.Context, req *datastreampb.Fetch } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchStaticIps") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3274,21 +3088,10 @@ func (c *restClient) CreatePrivateConnection(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePrivateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3339,17 +3142,7 @@ func (c *restClient) GetPrivateConnection(ctx context.Context, req *datastreampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPrivateConnection") if err != nil { return err } @@ -3418,21 +3211,10 @@ func (c *restClient) ListPrivateConnections(ctx context.Context, req *datastream } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrivateConnections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3500,21 +3282,10 @@ func (c *restClient) DeletePrivateConnection(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePrivateConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3576,21 +3347,10 @@ func (c *restClient) CreateRoute(ctx context.Context, req *datastreampb.CreateRo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3641,17 +3401,7 @@ func (c *restClient) GetRoute(ctx context.Context, req *datastreampb.GetRouteReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRoute") if err != nil { return err } @@ -3720,21 +3470,10 @@ func (c *restClient) ListRoutes(ctx context.Context, req *datastreampb.ListRoute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRoutes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3799,21 +3538,10 @@ func (c *restClient) DeleteRoute(ctx context.Context, req *datastreampb.DeleteRo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3864,17 +3592,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3939,21 +3657,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4019,15 +3726,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4061,15 +3761,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4106,17 +3799,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4181,21 +3864,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datastream/apiv1/datastream_client_example_go123_test.go b/datastream/apiv1/datastream_client_example_go123_test.go index e187fb225b84..bba50dcda543 100644 --- a/datastream/apiv1/datastream_client_example_go123_test.go +++ b/datastream/apiv1/datastream_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_FetchStaticIps_all() { } for resp, err := range c.FetchStaticIps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListConnectionProfiles_all() { } for resp, err := range c.ListConnectionProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListPrivateConnections_all() { } for resp, err := range c.ListPrivateConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListRoutes_all() { } for resp, err := range c.ListRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListStreamObjects_all() { } for resp, err := range c.ListStreamObjects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListStreams_all() { } for resp, err := range c.ListStreams(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datastream/apiv1/datastreampb/datastream.pb.go b/datastream/apiv1/datastreampb/datastream.pb.go index 236b546b9a6d..5dcc68f34dc8 100755 --- a/datastream/apiv1/datastreampb/datastream.pb.go +++ b/datastream/apiv1/datastreampb/datastream.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datastream/v1/datastream.proto @@ -80,11 +80,9 @@ type DiscoverConnectionProfileRequest struct { func (x *DiscoverConnectionProfileRequest) Reset() { *x = DiscoverConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoverConnectionProfileRequest) String() string { @@ -95,7 +93,7 @@ func (*DiscoverConnectionProfileRequest) ProtoMessage() {} func (x *DiscoverConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +287,9 @@ type DiscoverConnectionProfileResponse struct { func (x *DiscoverConnectionProfileResponse) Reset() { *x = DiscoverConnectionProfileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoverConnectionProfileResponse) String() string { @@ -304,7 +300,7 @@ func (*DiscoverConnectionProfileResponse) ProtoMessage() {} func (x *DiscoverConnectionProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +404,9 @@ type FetchStaticIpsRequest struct { func (x *FetchStaticIpsRequest) Reset() { *x = FetchStaticIpsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsRequest) String() string { @@ -423,7 +417,7 @@ func (*FetchStaticIpsRequest) ProtoMessage() {} func (x *FetchStaticIpsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +468,9 @@ type FetchStaticIpsResponse struct { func (x *FetchStaticIpsResponse) Reset() { *x = FetchStaticIpsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsResponse) String() string { @@ -489,7 +481,7 @@ func (*FetchStaticIpsResponse) ProtoMessage() {} func (x *FetchStaticIpsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +536,9 @@ type ListConnectionProfilesRequest struct { func (x *ListConnectionProfilesRequest) Reset() { *x = ListConnectionProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesRequest) String() string { @@ -559,7 +549,7 @@ func (*ListConnectionProfilesRequest) ProtoMessage() {} func (x *ListConnectionProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +616,9 @@ type ListConnectionProfilesResponse struct { func (x *ListConnectionProfilesResponse) Reset() { *x = ListConnectionProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesResponse) String() string { @@ -641,7 +629,7 @@ func (*ListConnectionProfilesResponse) ProtoMessage() {} func (x *ListConnectionProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +677,9 @@ type GetConnectionProfileRequest struct { func (x *GetConnectionProfileRequest) Reset() { *x = GetConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionProfileRequest) String() string { @@ -704,7 +690,7 @@ func (*GetConnectionProfileRequest) ProtoMessage() {} func (x *GetConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +747,9 @@ type CreateConnectionProfileRequest struct { func (x *CreateConnectionProfileRequest) Reset() { *x = CreateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionProfileRequest) String() string { @@ -776,7 +760,7 @@ func (*CreateConnectionProfileRequest) ProtoMessage() {} func (x *CreateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +854,9 @@ type UpdateConnectionProfileRequest struct { func (x *UpdateConnectionProfileRequest) Reset() { *x = UpdateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionProfileRequest) String() string { @@ -885,7 +867,7 @@ func (*UpdateConnectionProfileRequest) ProtoMessage() {} func (x *UpdateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +943,9 @@ type DeleteConnectionProfileRequest struct { func (x *DeleteConnectionProfileRequest) Reset() { *x = DeleteConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionProfileRequest) String() string { @@ -976,7 +956,7 @@ func (*DeleteConnectionProfileRequest) ProtoMessage() {} func (x *DeleteConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,11 +1011,9 @@ type ListStreamsRequest struct { func (x *ListStreamsRequest) Reset() { *x = ListStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsRequest) String() string { @@ -1046,7 +1024,7 @@ func (*ListStreamsRequest) ProtoMessage() {} func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1091,9 @@ type ListStreamsResponse struct { func (x *ListStreamsResponse) Reset() { *x = ListStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsResponse) String() string { @@ -1128,7 +1104,7 @@ func (*ListStreamsResponse) ProtoMessage() {} func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,11 +1152,9 @@ type GetStreamRequest struct { func (x *GetStreamRequest) Reset() { *x = GetStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamRequest) String() string { @@ -1191,7 +1165,7 @@ func (*GetStreamRequest) ProtoMessage() {} func (x *GetStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,11 +1222,9 @@ type CreateStreamRequest struct { func (x *CreateStreamRequest) Reset() { *x = CreateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStreamRequest) String() string { @@ -1263,7 +1235,7 @@ func (*CreateStreamRequest) ProtoMessage() {} func (x *CreateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1357,11 +1329,9 @@ type UpdateStreamRequest struct { func (x *UpdateStreamRequest) Reset() { *x = UpdateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStreamRequest) String() string { @@ -1372,7 +1342,7 @@ func (*UpdateStreamRequest) ProtoMessage() {} func (x *UpdateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1448,11 +1418,9 @@ type DeleteStreamRequest struct { func (x *DeleteStreamRequest) Reset() { *x = DeleteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStreamRequest) String() string { @@ -1463,7 +1431,7 @@ func (*DeleteStreamRequest) ProtoMessage() {} func (x *DeleteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,11 +1478,9 @@ type RunStreamRequest struct { func (x *RunStreamRequest) Reset() { *x = RunStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunStreamRequest) String() string { @@ -1525,7 +1491,7 @@ func (*RunStreamRequest) ProtoMessage() {} func (x *RunStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,11 +1539,9 @@ type GetStreamObjectRequest struct { func (x *GetStreamObjectRequest) Reset() { *x = GetStreamObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamObjectRequest) String() string { @@ -1588,7 +1552,7 @@ func (*GetStreamObjectRequest) ProtoMessage() {} func (x *GetStreamObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1625,11 +1589,9 @@ type LookupStreamObjectRequest struct { func (x *LookupStreamObjectRequest) Reset() { *x = LookupStreamObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupStreamObjectRequest) String() string { @@ -1640,7 +1602,7 @@ func (*LookupStreamObjectRequest) ProtoMessage() {} func (x *LookupStreamObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1682,11 +1644,9 @@ type StartBackfillJobRequest struct { func (x *StartBackfillJobRequest) Reset() { *x = StartBackfillJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartBackfillJobRequest) String() string { @@ -1697,7 +1657,7 @@ func (*StartBackfillJobRequest) ProtoMessage() {} func (x *StartBackfillJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1691,9 @@ type StartBackfillJobResponse struct { func (x *StartBackfillJobResponse) Reset() { *x = StartBackfillJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartBackfillJobResponse) String() string { @@ -1746,7 +1704,7 @@ func (*StartBackfillJobResponse) ProtoMessage() {} func (x *StartBackfillJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1782,11 +1740,9 @@ type StopBackfillJobRequest struct { func (x *StopBackfillJobRequest) Reset() { *x = StopBackfillJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopBackfillJobRequest) String() string { @@ -1797,7 +1753,7 @@ func (*StopBackfillJobRequest) ProtoMessage() {} func (x *StopBackfillJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,11 +1787,9 @@ type StopBackfillJobResponse struct { func (x *StopBackfillJobResponse) Reset() { *x = StopBackfillJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopBackfillJobResponse) String() string { @@ -1846,7 +1800,7 @@ func (*StopBackfillJobResponse) ProtoMessage() {} func (x *StopBackfillJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1890,11 +1844,9 @@ type ListStreamObjectsRequest struct { func (x *ListStreamObjectsRequest) Reset() { *x = ListStreamObjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamObjectsRequest) String() string { @@ -1905,7 +1857,7 @@ func (*ListStreamObjectsRequest) ProtoMessage() {} func (x *ListStreamObjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1907,9 @@ type ListStreamObjectsResponse struct { func (x *ListStreamObjectsResponse) Reset() { *x = ListStreamObjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamObjectsResponse) String() string { @@ -1970,7 +1920,7 @@ func (*ListStreamObjectsResponse) ProtoMessage() {} func (x *ListStreamObjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2030,11 +1980,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2045,7 +1993,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,11 +2096,9 @@ type CreatePrivateConnectionRequest struct { func (x *CreatePrivateConnectionRequest) Reset() { *x = CreatePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePrivateConnectionRequest) String() string { @@ -2163,7 +2109,7 @@ func (*CreatePrivateConnectionRequest) ProtoMessage() {} func (x *CreatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2242,11 +2188,9 @@ type ListPrivateConnectionsRequest struct { func (x *ListPrivateConnectionsRequest) Reset() { *x = ListPrivateConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsRequest) String() string { @@ -2257,7 +2201,7 @@ func (*ListPrivateConnectionsRequest) ProtoMessage() {} func (x *ListPrivateConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2324,11 +2268,9 @@ type ListPrivateConnectionsResponse struct { func (x *ListPrivateConnectionsResponse) Reset() { *x = ListPrivateConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsResponse) String() string { @@ -2339,7 +2281,7 @@ func (*ListPrivateConnectionsResponse) ProtoMessage() {} func (x *ListPrivateConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,11 +2346,9 @@ type DeletePrivateConnectionRequest struct { func (x *DeletePrivateConnectionRequest) Reset() { *x = DeletePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePrivateConnectionRequest) String() string { @@ -2419,7 +2359,7 @@ func (*DeletePrivateConnectionRequest) ProtoMessage() {} func (x *DeletePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2467,11 +2407,9 @@ type GetPrivateConnectionRequest struct { func (x *GetPrivateConnectionRequest) Reset() { *x = GetPrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPrivateConnectionRequest) String() string { @@ -2482,7 +2420,7 @@ func (*GetPrivateConnectionRequest) ProtoMessage() {} func (x *GetPrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2534,11 +2472,9 @@ type CreateRouteRequest struct { func (x *CreateRouteRequest) Reset() { *x = CreateRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRouteRequest) String() string { @@ -2549,7 +2485,7 @@ func (*CreateRouteRequest) ProtoMessage() {} func (x *CreateRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2620,11 +2556,9 @@ type ListRoutesRequest struct { func (x *ListRoutesRequest) Reset() { *x = ListRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesRequest) String() string { @@ -2635,7 +2569,7 @@ func (*ListRoutesRequest) ProtoMessage() {} func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2702,11 +2636,9 @@ type ListRoutesResponse struct { func (x *ListRoutesResponse) Reset() { *x = ListRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesResponse) String() string { @@ -2717,7 +2649,7 @@ func (*ListRoutesResponse) ProtoMessage() {} func (x *ListRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2779,11 +2711,9 @@ type DeleteRouteRequest struct { func (x *DeleteRouteRequest) Reset() { *x = DeleteRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRouteRequest) String() string { @@ -2794,7 +2724,7 @@ func (*DeleteRouteRequest) ProtoMessage() {} func (x *DeleteRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2835,11 +2765,9 @@ type GetRouteRequest struct { func (x *GetRouteRequest) Reset() { *x = GetRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouteRequest) String() string { @@ -2850,7 +2778,7 @@ func (*GetRouteRequest) ProtoMessage() {} func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3884,440 +3812,6 @@ func file_google_cloud_datastream_v1_datastream_proto_init() { return } file_google_cloud_datastream_v1_datastream_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datastream_v1_datastream_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DiscoverConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DiscoverConnectionProfileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RunStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*LookupStreamObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StartBackfillJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*StartBackfillJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*StopBackfillJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*StopBackfillJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamObjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamObjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreatePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeletePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetPrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*GetRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datastream_v1_datastream_proto_msgTypes[0].OneofWrappers = []any{ (*DiscoverConnectionProfileRequest_ConnectionProfile)(nil), (*DiscoverConnectionProfileRequest_ConnectionProfileName)(nil), diff --git a/datastream/apiv1/datastreampb/datastream_resources.pb.go b/datastream/apiv1/datastreampb/datastream_resources.pb.go index 9e5bca7f9702..c84413181068 100755 --- a/datastream/apiv1/datastreampb/datastream_resources.pb.go +++ b/datastream/apiv1/datastreampb/datastream_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datastream/v1/datastream_resources.proto @@ -565,11 +565,9 @@ type OracleProfile struct { func (x *OracleProfile) Reset() { *x = OracleProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleProfile) String() string { @@ -580,7 +578,7 @@ func (*OracleProfile) ProtoMessage() {} func (x *OracleProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +680,9 @@ type OracleAsmConfig struct { func (x *OracleAsmConfig) Reset() { *x = OracleAsmConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleAsmConfig) String() string { @@ -697,7 +693,7 @@ func (*OracleAsmConfig) ProtoMessage() {} func (x *OracleAsmConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +779,9 @@ type MysqlProfile struct { func (x *MysqlProfile) Reset() { *x = MysqlProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlProfile) String() string { @@ -798,7 +792,7 @@ func (*MysqlProfile) ProtoMessage() {} func (x *MysqlProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +863,9 @@ type PostgresqlProfile struct { func (x *PostgresqlProfile) Reset() { *x = PostgresqlProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlProfile) String() string { @@ -884,7 +876,7 @@ func (*PostgresqlProfile) ProtoMessage() {} func (x *PostgresqlProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +948,9 @@ type SqlServerProfile struct { func (x *SqlServerProfile) Reset() { *x = SqlServerProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerProfile) String() string { @@ -971,7 +961,7 @@ func (*SqlServerProfile) ProtoMessage() {} func (x *SqlServerProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1025,9 @@ type GcsProfile struct { func (x *GcsProfile) Reset() { *x = GcsProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsProfile) String() string { @@ -1050,7 +1038,7 @@ func (*GcsProfile) ProtoMessage() {} func (x *GcsProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1076,9 @@ type BigQueryProfile struct { func (x *BigQueryProfile) Reset() { *x = BigQueryProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryProfile) String() string { @@ -1103,7 +1089,7 @@ func (*BigQueryProfile) ProtoMessage() {} func (x *BigQueryProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,11 +1115,9 @@ type StaticServiceIpConnectivity struct { func (x *StaticServiceIpConnectivity) Reset() { *x = StaticServiceIpConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticServiceIpConnectivity) String() string { @@ -1144,7 +1128,7 @@ func (*StaticServiceIpConnectivity) ProtoMessage() {} func (x *StaticServiceIpConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1164,9 @@ type ForwardSshTunnelConnectivity struct { func (x *ForwardSshTunnelConnectivity) Reset() { *x = ForwardSshTunnelConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardSshTunnelConnectivity) String() string { @@ -1195,7 +1177,7 @@ func (*ForwardSshTunnelConnectivity) ProtoMessage() {} func (x *ForwardSshTunnelConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1269,9 @@ type VpcPeeringConfig struct { func (x *VpcPeeringConfig) Reset() { *x = VpcPeeringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcPeeringConfig) String() string { @@ -1302,7 +1282,7 @@ func (*VpcPeeringConfig) ProtoMessage() {} func (x *VpcPeeringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1359,11 +1339,9 @@ type PrivateConnection struct { func (x *PrivateConnection) Reset() { *x = PrivateConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnection) String() string { @@ -1374,7 +1352,7 @@ func (*PrivateConnection) ProtoMessage() {} func (x *PrivateConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1458,11 +1436,9 @@ type PrivateConnectivity struct { func (x *PrivateConnectivity) Reset() { *x = PrivateConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnectivity) String() string { @@ -1473,7 +1449,7 @@ func (*PrivateConnectivity) ProtoMessage() {} func (x *PrivateConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1496,9 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route) String() string { @@ -1535,7 +1509,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1600,9 @@ type MysqlSslConfig struct { func (x *MysqlSslConfig) Reset() { *x = MysqlSslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSslConfig) String() string { @@ -1641,7 +1613,7 @@ func (*MysqlSslConfig) ProtoMessage() {} func (x *MysqlSslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1714,11 +1686,9 @@ type OracleSslConfig struct { func (x *OracleSslConfig) Reset() { *x = OracleSslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSslConfig) String() string { @@ -1729,7 +1699,7 @@ func (*OracleSslConfig) ProtoMessage() {} func (x *OracleSslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1798,11 +1768,9 @@ type ConnectionProfile struct { func (x *ConnectionProfile) Reset() { *x = ConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionProfile) String() string { @@ -1813,7 +1781,7 @@ func (*ConnectionProfile) ProtoMessage() {} func (x *ConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2039,11 +2007,9 @@ type OracleColumn struct { func (x *OracleColumn) Reset() { *x = OracleColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleColumn) String() string { @@ -2054,7 +2020,7 @@ func (*OracleColumn) ProtoMessage() {} func (x *OracleColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2148,11 +2114,9 @@ type OracleTable struct { func (x *OracleTable) Reset() { *x = OracleTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleTable) String() string { @@ -2163,7 +2127,7 @@ func (*OracleTable) ProtoMessage() {} func (x *OracleTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2206,11 +2170,9 @@ type OracleSchema struct { func (x *OracleSchema) Reset() { *x = OracleSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSchema) String() string { @@ -2221,7 +2183,7 @@ func (*OracleSchema) ProtoMessage() {} func (x *OracleSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2262,11 +2224,9 @@ type OracleRdbms struct { func (x *OracleRdbms) Reset() { *x = OracleRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleRdbms) String() string { @@ -2277,7 +2237,7 @@ func (*OracleRdbms) ProtoMessage() {} func (x *OracleRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2333,11 +2293,9 @@ type OracleSourceConfig struct { func (x *OracleSourceConfig) Reset() { *x = OracleSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig) String() string { @@ -2348,7 +2306,7 @@ func (*OracleSourceConfig) ProtoMessage() {} func (x *OracleSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2495,11 +2453,9 @@ type PostgresqlColumn struct { func (x *PostgresqlColumn) Reset() { *x = PostgresqlColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlColumn) String() string { @@ -2510,7 +2466,7 @@ func (*PostgresqlColumn) ProtoMessage() {} func (x *PostgresqlColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2597,11 +2553,9 @@ type PostgresqlTable struct { func (x *PostgresqlTable) Reset() { *x = PostgresqlTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlTable) String() string { @@ -2612,7 +2566,7 @@ func (*PostgresqlTable) ProtoMessage() {} func (x *PostgresqlTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2655,11 +2609,9 @@ type PostgresqlSchema struct { func (x *PostgresqlSchema) Reset() { *x = PostgresqlSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlSchema) String() string { @@ -2670,7 +2622,7 @@ func (*PostgresqlSchema) ProtoMessage() {} func (x *PostgresqlSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2711,11 +2663,9 @@ type PostgresqlRdbms struct { func (x *PostgresqlRdbms) Reset() { *x = PostgresqlRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlRdbms) String() string { @@ -2726,7 +2676,7 @@ func (*PostgresqlRdbms) ProtoMessage() {} func (x *PostgresqlRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2772,11 +2722,9 @@ type PostgresqlSourceConfig struct { func (x *PostgresqlSourceConfig) Reset() { *x = PostgresqlSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostgresqlSourceConfig) String() string { @@ -2787,7 +2735,7 @@ func (*PostgresqlSourceConfig) ProtoMessage() {} func (x *PostgresqlSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2811,9 @@ type SqlServerColumn struct { func (x *SqlServerColumn) Reset() { *x = SqlServerColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerColumn) String() string { @@ -2878,7 +2824,7 @@ func (*SqlServerColumn) ProtoMessage() {} func (x *SqlServerColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2965,11 +2911,9 @@ type SqlServerTable struct { func (x *SqlServerTable) Reset() { *x = SqlServerTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerTable) String() string { @@ -2980,7 +2924,7 @@ func (*SqlServerTable) ProtoMessage() {} func (x *SqlServerTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3023,11 +2967,9 @@ type SqlServerSchema struct { func (x *SqlServerSchema) Reset() { *x = SqlServerSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerSchema) String() string { @@ -3038,7 +2980,7 @@ func (*SqlServerSchema) ProtoMessage() {} func (x *SqlServerSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3079,11 +3021,9 @@ type SqlServerRdbms struct { func (x *SqlServerRdbms) Reset() { *x = SqlServerRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerRdbms) String() string { @@ -3094,7 +3034,7 @@ func (*SqlServerRdbms) ProtoMessage() {} func (x *SqlServerRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3141,11 +3081,9 @@ type SqlServerSourceConfig struct { func (x *SqlServerSourceConfig) Reset() { *x = SqlServerSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerSourceConfig) String() string { @@ -3156,7 +3094,7 @@ func (*SqlServerSourceConfig) ProtoMessage() {} func (x *SqlServerSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3247,11 +3185,9 @@ type SqlServerTransactionLogs struct { func (x *SqlServerTransactionLogs) Reset() { *x = SqlServerTransactionLogs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerTransactionLogs) String() string { @@ -3262,7 +3198,7 @@ func (*SqlServerTransactionLogs) ProtoMessage() {} func (x *SqlServerTransactionLogs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3286,11 +3222,9 @@ type SqlServerChangeTables struct { func (x *SqlServerChangeTables) Reset() { *x = SqlServerChangeTables{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerChangeTables) String() string { @@ -3301,7 +3235,7 @@ func (*SqlServerChangeTables) ProtoMessage() {} func (x *SqlServerChangeTables) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3345,11 +3279,9 @@ type MysqlColumn struct { func (x *MysqlColumn) Reset() { *x = MysqlColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlColumn) String() string { @@ -3360,7 +3292,7 @@ func (*MysqlColumn) ProtoMessage() {} func (x *MysqlColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3454,11 +3386,9 @@ type MysqlTable struct { func (x *MysqlTable) Reset() { *x = MysqlTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlTable) String() string { @@ -3469,7 +3399,7 @@ func (*MysqlTable) ProtoMessage() {} func (x *MysqlTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3512,11 +3442,9 @@ type MysqlDatabase struct { func (x *MysqlDatabase) Reset() { *x = MysqlDatabase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlDatabase) String() string { @@ -3527,7 +3455,7 @@ func (*MysqlDatabase) ProtoMessage() {} func (x *MysqlDatabase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3568,11 +3496,9 @@ type MysqlRdbms struct { func (x *MysqlRdbms) Reset() { *x = MysqlRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlRdbms) String() string { @@ -3583,7 +3509,7 @@ func (*MysqlRdbms) ProtoMessage() {} func (x *MysqlRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3633,11 +3559,9 @@ type MysqlSourceConfig struct { func (x *MysqlSourceConfig) Reset() { *x = MysqlSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSourceConfig) String() string { @@ -3648,7 +3572,7 @@ func (*MysqlSourceConfig) ProtoMessage() {} func (x *MysqlSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3752,11 +3676,9 @@ type SourceConfig struct { func (x *SourceConfig) Reset() { *x = SourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceConfig) String() string { @@ -3767,7 +3689,7 @@ func (*SourceConfig) ProtoMessage() {} func (x *SourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3865,11 +3787,9 @@ type AvroFileFormat struct { func (x *AvroFileFormat) Reset() { *x = AvroFileFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroFileFormat) String() string { @@ -3880,7 +3800,7 @@ func (*AvroFileFormat) ProtoMessage() {} func (x *AvroFileFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3909,11 +3829,9 @@ type JsonFileFormat struct { func (x *JsonFileFormat) Reset() { *x = JsonFileFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JsonFileFormat) String() string { @@ -3924,7 +3842,7 @@ func (*JsonFileFormat) ProtoMessage() {} func (x *JsonFileFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3978,11 +3896,9 @@ type GcsDestinationConfig struct { func (x *GcsDestinationConfig) Reset() { *x = GcsDestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestinationConfig) String() string { @@ -3993,7 +3909,7 @@ func (*GcsDestinationConfig) ProtoMessage() {} func (x *GcsDestinationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4095,11 +4011,9 @@ type BigQueryDestinationConfig struct { func (x *BigQueryDestinationConfig) Reset() { *x = BigQueryDestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig) String() string { @@ -4110,7 +4024,7 @@ func (*BigQueryDestinationConfig) ProtoMessage() {} func (x *BigQueryDestinationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4231,11 +4145,9 @@ type DestinationConfig struct { func (x *DestinationConfig) Reset() { *x = DestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationConfig) String() string { @@ -4246,7 +4158,7 @@ func (*DestinationConfig) ProtoMessage() {} func (x *DestinationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4350,11 +4262,9 @@ type Stream struct { func (x *Stream) Reset() { *x = Stream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream) String() string { @@ -4365,7 +4275,7 @@ func (*Stream) ProtoMessage() {} func (x *Stream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4521,11 +4431,9 @@ type StreamObject struct { func (x *StreamObject) Reset() { *x = StreamObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamObject) String() string { @@ -4536,7 +4444,7 @@ func (*StreamObject) ProtoMessage() {} func (x *StreamObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4619,11 +4527,9 @@ type SourceObjectIdentifier struct { func (x *SourceObjectIdentifier) Reset() { *x = SourceObjectIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceObjectIdentifier) String() string { @@ -4634,7 +4540,7 @@ func (*SourceObjectIdentifier) ProtoMessage() {} func (x *SourceObjectIdentifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4736,11 +4642,9 @@ type BackfillJob struct { func (x *BackfillJob) Reset() { *x = BackfillJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackfillJob) String() string { @@ -4751,7 +4655,7 @@ func (*BackfillJob) ProtoMessage() {} func (x *BackfillJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4822,11 +4726,9 @@ type Error struct { func (x *Error) Reset() { *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Error) String() string { @@ -4837,7 +4739,7 @@ func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4900,11 +4802,9 @@ type ValidationResult struct { func (x *ValidationResult) Reset() { *x = ValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationResult) String() string { @@ -4915,7 +4815,7 @@ func (*ValidationResult) ProtoMessage() {} func (x *ValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4955,11 +4855,9 @@ type Validation struct { func (x *Validation) Reset() { *x = Validation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Validation) String() string { @@ -4970,7 +4868,7 @@ func (*Validation) ProtoMessage() {} func (x *Validation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5031,11 +4929,9 @@ type ValidationMessage struct { func (x *ValidationMessage) Reset() { *x = ValidationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationMessage) String() string { @@ -5046,7 +4942,7 @@ func (*ValidationMessage) ProtoMessage() {} func (x *ValidationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5109,11 +5005,9 @@ type CdcStrategy struct { func (x *CdcStrategy) Reset() { *x = CdcStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CdcStrategy) String() string { @@ -5124,7 +5018,7 @@ func (*CdcStrategy) ProtoMessage() {} func (x *CdcStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5205,11 +5099,9 @@ type SqlServerLsnPosition struct { func (x *SqlServerLsnPosition) Reset() { *x = SqlServerLsnPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SqlServerLsnPosition) String() string { @@ -5220,7 +5112,7 @@ func (*SqlServerLsnPosition) ProtoMessage() {} func (x *SqlServerLsnPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5254,11 +5146,9 @@ type OracleScnPosition struct { func (x *OracleScnPosition) Reset() { *x = OracleScnPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleScnPosition) String() string { @@ -5269,7 +5159,7 @@ func (*OracleScnPosition) ProtoMessage() {} func (x *OracleScnPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5305,11 +5195,9 @@ type MysqlLogPosition struct { func (x *MysqlLogPosition) Reset() { *x = MysqlLogPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlLogPosition) String() string { @@ -5320,7 +5208,7 @@ func (*MysqlLogPosition) ProtoMessage() {} func (x *MysqlLogPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5358,11 +5246,9 @@ type OracleSourceConfig_DropLargeObjects struct { func (x *OracleSourceConfig_DropLargeObjects) Reset() { *x = OracleSourceConfig_DropLargeObjects{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_DropLargeObjects) String() string { @@ -5373,7 +5259,7 @@ func (*OracleSourceConfig_DropLargeObjects) ProtoMessage() {} func (x *OracleSourceConfig_DropLargeObjects) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5397,11 +5283,9 @@ type OracleSourceConfig_StreamLargeObjects struct { func (x *OracleSourceConfig_StreamLargeObjects) Reset() { *x = OracleSourceConfig_StreamLargeObjects{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_StreamLargeObjects) String() string { @@ -5412,7 +5296,7 @@ func (*OracleSourceConfig_StreamLargeObjects) ProtoMessage() {} func (x *OracleSourceConfig_StreamLargeObjects) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5436,11 +5320,9 @@ type OracleSourceConfig_LogMiner struct { func (x *OracleSourceConfig_LogMiner) Reset() { *x = OracleSourceConfig_LogMiner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_LogMiner) String() string { @@ -5451,7 +5333,7 @@ func (*OracleSourceConfig_LogMiner) ProtoMessage() {} func (x *OracleSourceConfig_LogMiner) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5483,11 +5365,9 @@ type OracleSourceConfig_BinaryLogParser struct { func (x *OracleSourceConfig_BinaryLogParser) Reset() { *x = OracleSourceConfig_BinaryLogParser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_BinaryLogParser) String() string { @@ -5498,7 +5378,7 @@ func (*OracleSourceConfig_BinaryLogParser) ProtoMessage() {} func (x *OracleSourceConfig_BinaryLogParser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5563,11 +5443,9 @@ type OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess struct { func (x *OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess) Reset() { *x = OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess) String() string { @@ -5578,7 +5456,7 @@ func (*OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess) ProtoMessage() func (x *OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5607,11 +5485,9 @@ type OracleSourceConfig_BinaryLogParser_LogFileDirectories struct { func (x *OracleSourceConfig_BinaryLogParser_LogFileDirectories) Reset() { *x = OracleSourceConfig_BinaryLogParser_LogFileDirectories{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig_BinaryLogParser_LogFileDirectories) String() string { @@ -5622,7 +5498,7 @@ func (*OracleSourceConfig_BinaryLogParser_LogFileDirectories) ProtoMessage() {} func (x *OracleSourceConfig_BinaryLogParser_LogFileDirectories) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5660,11 +5536,9 @@ type MysqlSourceConfig_BinaryLogPosition struct { func (x *MysqlSourceConfig_BinaryLogPosition) Reset() { *x = MysqlSourceConfig_BinaryLogPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSourceConfig_BinaryLogPosition) String() string { @@ -5675,7 +5549,7 @@ func (*MysqlSourceConfig_BinaryLogPosition) ProtoMessage() {} func (x *MysqlSourceConfig_BinaryLogPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5699,11 +5573,9 @@ type MysqlSourceConfig_Gtid struct { func (x *MysqlSourceConfig_Gtid) Reset() { *x = MysqlSourceConfig_Gtid{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSourceConfig_Gtid) String() string { @@ -5714,7 +5586,7 @@ func (*MysqlSourceConfig_Gtid) ProtoMessage() {} func (x *MysqlSourceConfig_Gtid) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5743,11 +5615,9 @@ type BigQueryDestinationConfig_SingleTargetDataset struct { func (x *BigQueryDestinationConfig_SingleTargetDataset) Reset() { *x = BigQueryDestinationConfig_SingleTargetDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig_SingleTargetDataset) String() string { @@ -5758,7 +5628,7 @@ func (*BigQueryDestinationConfig_SingleTargetDataset) ProtoMessage() {} func (x *BigQueryDestinationConfig_SingleTargetDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5793,11 +5663,9 @@ type BigQueryDestinationConfig_SourceHierarchyDatasets struct { func (x *BigQueryDestinationConfig_SourceHierarchyDatasets) Reset() { *x = BigQueryDestinationConfig_SourceHierarchyDatasets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig_SourceHierarchyDatasets) String() string { @@ -5808,7 +5676,7 @@ func (*BigQueryDestinationConfig_SourceHierarchyDatasets) ProtoMessage() {} func (x *BigQueryDestinationConfig_SourceHierarchyDatasets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5840,11 +5708,9 @@ type BigQueryDestinationConfig_AppendOnly struct { func (x *BigQueryDestinationConfig_AppendOnly) Reset() { *x = BigQueryDestinationConfig_AppendOnly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig_AppendOnly) String() string { @@ -5855,7 +5721,7 @@ func (*BigQueryDestinationConfig_AppendOnly) ProtoMessage() {} func (x *BigQueryDestinationConfig_AppendOnly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5880,11 +5746,9 @@ type BigQueryDestinationConfig_Merge struct { func (x *BigQueryDestinationConfig_Merge) Reset() { *x = BigQueryDestinationConfig_Merge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig_Merge) String() string { @@ -5895,7 +5759,7 @@ func (*BigQueryDestinationConfig_Merge) ProtoMessage() {} func (x *BigQueryDestinationConfig_Merge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5936,11 +5800,9 @@ type BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate struct { func (x *BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate) Reset() { *x = BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate) String() string { @@ -5951,7 +5813,7 @@ func (*BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate) ProtoM func (x *BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6007,11 +5869,9 @@ type Stream_BackfillAllStrategy struct { func (x *Stream_BackfillAllStrategy) Reset() { *x = Stream_BackfillAllStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream_BackfillAllStrategy) String() string { @@ -6022,7 +5882,7 @@ func (*Stream_BackfillAllStrategy) ProtoMessage() {} func (x *Stream_BackfillAllStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6117,11 +5977,9 @@ type Stream_BackfillNoneStrategy struct { func (x *Stream_BackfillNoneStrategy) Reset() { *x = Stream_BackfillNoneStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream_BackfillNoneStrategy) String() string { @@ -6132,7 +5990,7 @@ func (*Stream_BackfillNoneStrategy) ProtoMessage() {} func (x *Stream_BackfillNoneStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6161,11 +6019,9 @@ type SourceObjectIdentifier_OracleObjectIdentifier struct { func (x *SourceObjectIdentifier_OracleObjectIdentifier) Reset() { *x = SourceObjectIdentifier_OracleObjectIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceObjectIdentifier_OracleObjectIdentifier) String() string { @@ -6176,7 +6032,7 @@ func (*SourceObjectIdentifier_OracleObjectIdentifier) ProtoMessage() {} func (x *SourceObjectIdentifier_OracleObjectIdentifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6219,11 +6075,9 @@ type SourceObjectIdentifier_PostgresqlObjectIdentifier struct { func (x *SourceObjectIdentifier_PostgresqlObjectIdentifier) Reset() { *x = SourceObjectIdentifier_PostgresqlObjectIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceObjectIdentifier_PostgresqlObjectIdentifier) String() string { @@ -6234,7 +6088,7 @@ func (*SourceObjectIdentifier_PostgresqlObjectIdentifier) ProtoMessage() {} func (x *SourceObjectIdentifier_PostgresqlObjectIdentifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6277,11 +6131,9 @@ type SourceObjectIdentifier_MysqlObjectIdentifier struct { func (x *SourceObjectIdentifier_MysqlObjectIdentifier) Reset() { *x = SourceObjectIdentifier_MysqlObjectIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceObjectIdentifier_MysqlObjectIdentifier) String() string { @@ -6292,7 +6144,7 @@ func (*SourceObjectIdentifier_MysqlObjectIdentifier) ProtoMessage() {} func (x *SourceObjectIdentifier_MysqlObjectIdentifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6335,11 +6187,9 @@ type SourceObjectIdentifier_SqlServerObjectIdentifier struct { func (x *SourceObjectIdentifier_SqlServerObjectIdentifier) Reset() { *x = SourceObjectIdentifier_SqlServerObjectIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceObjectIdentifier_SqlServerObjectIdentifier) String() string { @@ -6350,7 +6200,7 @@ func (*SourceObjectIdentifier_SqlServerObjectIdentifier) ProtoMessage() {} func (x *SourceObjectIdentifier_SqlServerObjectIdentifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6389,11 +6239,9 @@ type CdcStrategy_MostRecentStartPosition struct { func (x *CdcStrategy_MostRecentStartPosition) Reset() { *x = CdcStrategy_MostRecentStartPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CdcStrategy_MostRecentStartPosition) String() string { @@ -6404,7 +6252,7 @@ func (*CdcStrategy_MostRecentStartPosition) ProtoMessage() {} func (x *CdcStrategy_MostRecentStartPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6429,11 +6277,9 @@ type CdcStrategy_NextAvailableStartPosition struct { func (x *CdcStrategy_NextAvailableStartPosition) Reset() { *x = CdcStrategy_NextAvailableStartPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CdcStrategy_NextAvailableStartPosition) String() string { @@ -6444,7 +6290,7 @@ func (*CdcStrategy_NextAvailableStartPosition) ProtoMessage() {} func (x *CdcStrategy_NextAvailableStartPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6475,11 +6321,9 @@ type CdcStrategy_SpecificStartPosition struct { func (x *CdcStrategy_SpecificStartPosition) Reset() { *x = CdcStrategy_SpecificStartPosition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CdcStrategy_SpecificStartPosition) String() string { @@ -6490,7 +6334,7 @@ func (*CdcStrategy_SpecificStartPosition) ProtoMessage() {} func (x *CdcStrategy_SpecificStartPosition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8044,944 +7888,6 @@ func file_google_cloud_datastream_v1_datastream_resources_proto_init() { if File_google_cloud_datastream_v1_datastream_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OracleProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OracleAsmConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MysqlProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GcsProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StaticServiceIpConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ForwardSshTunnelConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VpcPeeringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OracleSslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OracleColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*OracleTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OracleSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*OracleRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*PostgresqlSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerTransactionLogs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerChangeTables); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*MysqlColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*MysqlTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*MysqlDatabase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*MysqlRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AvroFileFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*JsonFileFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*DestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Stream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*StreamObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*SourceObjectIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*BackfillJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Validation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ValidationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*CdcStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*SqlServerLsnPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*OracleScnPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*MysqlLogPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_DropLargeObjects); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_StreamLargeObjects); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_LogMiner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_BinaryLogParser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig_BinaryLogParser_LogFileDirectories); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSourceConfig_BinaryLogPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSourceConfig_Gtid); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig_SingleTargetDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig_SourceHierarchyDatasets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig_AppendOnly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig_Merge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*Stream_BackfillAllStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*Stream_BackfillNoneStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*SourceObjectIdentifier_OracleObjectIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*SourceObjectIdentifier_PostgresqlObjectIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*SourceObjectIdentifier_MysqlObjectIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*SourceObjectIdentifier_SqlServerObjectIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*CdcStrategy_MostRecentStartPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*CdcStrategy_NextAvailableStartPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*CdcStrategy_SpecificStartPosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datastream_v1_datastream_resources_proto_msgTypes[8].OneofWrappers = []any{ (*ForwardSshTunnelConnectivity_Password)(nil), (*ForwardSshTunnelConnectivity_PrivateKey)(nil), diff --git a/datastream/apiv1/helpers.go b/datastream/apiv1/helpers.go index e55529fbc23c..f7235edafe8e 100755 --- a/datastream/apiv1/helpers.go +++ b/datastream/apiv1/helpers.go @@ -18,10 +18,20 @@ package datastream import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datastream.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/datastream/apiv1alpha1/datastream_client.go b/datastream/apiv1alpha1/datastream_client.go index 547fb02166b3..ec43462d64ad 100755 --- a/datastream/apiv1alpha1/datastream_client.go +++ b/datastream/apiv1alpha1/datastream_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -687,6 +686,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new datastream client based on gRPC. @@ -713,6 +714,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datastreampb.NewDatastreamClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -775,6 +777,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new datastream rest client. @@ -792,6 +796,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -865,7 +870,7 @@ func (c *gRPCClient) ListConnectionProfiles(ctx context.Context, req *datastream } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnectionProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnectionProfiles, req, settings.GRPC, c.logger, "ListConnectionProfiles") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *gRPCClient) GetConnectionProfile(ctx context.Context, req *datastreampb var resp *datastreampb.ConnectionProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnectionProfile, req, settings.GRPC, c.logger, "GetConnectionProfile") return err }, opts...) if err != nil { @@ -918,7 +923,7 @@ func (c *gRPCClient) CreateConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnectionProfile, req, settings.GRPC, c.logger, "CreateConnectionProfile") return err }, opts...) if err != nil { @@ -938,7 +943,7 @@ func (c *gRPCClient) UpdateConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnectionProfile, req, settings.GRPC, c.logger, "UpdateConnectionProfile") return err }, opts...) if err != nil { @@ -958,7 +963,7 @@ func (c *gRPCClient) DeleteConnectionProfile(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteConnectionProfile, req, settings.GRPC, c.logger, "DeleteConnectionProfile") return err }, opts...) if err != nil { @@ -978,7 +983,7 @@ func (c *gRPCClient) DiscoverConnectionProfile(ctx context.Context, req *datastr var resp *datastreampb.DiscoverConnectionProfileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiscoverConnectionProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiscoverConnectionProfile, req, settings.GRPC, c.logger, "DiscoverConnectionProfile") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *gRPCClient) ListStreams(ctx context.Context, req *datastreampb.ListStre } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListStreams, req, settings.GRPC, c.logger, "ListStreams") return err }, opts...) if err != nil { @@ -1042,7 +1047,7 @@ func (c *gRPCClient) GetStream(ctx context.Context, req *datastreampb.GetStreamR var resp *datastreampb.Stream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetStream, req, settings.GRPC, c.logger, "GetStream") return err }, opts...) if err != nil { @@ -1060,7 +1065,7 @@ func (c *gRPCClient) CreateStream(ctx context.Context, req *datastreampb.CreateS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateStream, req, settings.GRPC, c.logger, "CreateStream") return err }, opts...) if err != nil { @@ -1080,7 +1085,7 @@ func (c *gRPCClient) UpdateStream(ctx context.Context, req *datastreampb.UpdateS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateStream, req, settings.GRPC, c.logger, "UpdateStream") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *gRPCClient) DeleteStream(ctx context.Context, req *datastreampb.DeleteS var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteStream, req, settings.GRPC, c.logger, "DeleteStream") return err }, opts...) if err != nil { @@ -1120,7 +1125,7 @@ func (c *gRPCClient) FetchErrors(ctx context.Context, req *datastreampb.FetchErr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchErrors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchErrors, req, settings.GRPC, c.logger, "FetchErrors") return err }, opts...) if err != nil { @@ -1151,7 +1156,7 @@ func (c *gRPCClient) FetchStaticIps(ctx context.Context, req *datastreampb.Fetch } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchStaticIps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchStaticIps, req, settings.GRPC, c.logger, "FetchStaticIps") return err }, opts...) if err != nil { @@ -1186,7 +1191,7 @@ func (c *gRPCClient) CreatePrivateConnection(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePrivateConnection, req, settings.GRPC, c.logger, "CreatePrivateConnection") return err }, opts...) if err != nil { @@ -1206,7 +1211,7 @@ func (c *gRPCClient) GetPrivateConnection(ctx context.Context, req *datastreampb var resp *datastreampb.PrivateConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPrivateConnection, req, settings.GRPC, c.logger, "GetPrivateConnection") return err }, opts...) if err != nil { @@ -1235,7 +1240,7 @@ func (c *gRPCClient) ListPrivateConnections(ctx context.Context, req *datastream } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPrivateConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPrivateConnections, req, settings.GRPC, c.logger, "ListPrivateConnections") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *gRPCClient) DeletePrivateConnection(ctx context.Context, req *datastrea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePrivateConnection, req, settings.GRPC, c.logger, "DeletePrivateConnection") return err }, opts...) if err != nil { @@ -1290,7 +1295,7 @@ func (c *gRPCClient) CreateRoute(ctx context.Context, req *datastreampb.CreateRo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRoute, req, settings.GRPC, c.logger, "CreateRoute") return err }, opts...) if err != nil { @@ -1310,7 +1315,7 @@ func (c *gRPCClient) GetRoute(ctx context.Context, req *datastreampb.GetRouteReq var resp *datastreampb.Route err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRoute, req, settings.GRPC, c.logger, "GetRoute") return err }, opts...) if err != nil { @@ -1339,7 +1344,7 @@ func (c *gRPCClient) ListRoutes(ctx context.Context, req *datastreampb.ListRoute } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRoutes, req, settings.GRPC, c.logger, "ListRoutes") return err }, opts...) if err != nil { @@ -1374,7 +1379,7 @@ func (c *gRPCClient) DeleteRoute(ctx context.Context, req *datastreampb.DeleteRo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRoute, req, settings.GRPC, c.logger, "DeleteRoute") return err }, opts...) if err != nil { @@ -1437,21 +1442,10 @@ func (c *restClient) ListConnectionProfiles(ctx context.Context, req *datastream } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnectionProfiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1514,17 +1508,7 @@ func (c *restClient) GetConnectionProfile(ctx context.Context, req *datastreampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectionProfile") if err != nil { return err } @@ -1584,21 +1568,10 @@ func (c *restClient) CreateConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnectionProfile") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1665,21 +1638,10 @@ func (c *restClient) UpdateConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnectionProfile") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1732,21 +1694,10 @@ func (c *restClient) DeleteConnectionProfile(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnectionProfile") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1806,17 +1757,7 @@ func (c *restClient) DiscoverConnectionProfile(ctx context.Context, req *datastr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiscoverConnectionProfile") if err != nil { return err } @@ -1884,21 +1825,10 @@ func (c *restClient) ListStreams(ctx context.Context, req *datastreampb.ListStre } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStreams") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1961,17 +1891,7 @@ func (c *restClient) GetStream(ctx context.Context, req *datastreampb.GetStreamR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStream") if err != nil { return err } @@ -2037,21 +1957,10 @@ func (c *restClient) CreateStream(ctx context.Context, req *datastreampb.CreateS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2124,21 +2033,10 @@ func (c *restClient) UpdateStream(ctx context.Context, req *datastreampb.UpdateS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStream") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2191,21 +2089,10 @@ func (c *restClient) DeleteStream(ctx context.Context, req *datastreampb.DeleteS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2261,21 +2148,10 @@ func (c *restClient) FetchErrors(ctx context.Context, req *datastreampb.FetchErr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchErrors") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2340,21 +2216,10 @@ func (c *restClient) FetchStaticIps(ctx context.Context, req *datastreampb.Fetch } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchStaticIps") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2427,21 +2292,10 @@ func (c *restClient) CreatePrivateConnection(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePrivateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2492,17 +2346,7 @@ func (c *restClient) GetPrivateConnection(ctx context.Context, req *datastreampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPrivateConnection") if err != nil { return err } @@ -2571,21 +2415,10 @@ func (c *restClient) ListPrivateConnections(ctx context.Context, req *datastream } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrivateConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2653,21 +2486,10 @@ func (c *restClient) DeletePrivateConnection(ctx context.Context, req *datastrea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePrivateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2729,21 +2551,10 @@ func (c *restClient) CreateRoute(ctx context.Context, req *datastreampb.CreateRo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2794,17 +2605,7 @@ func (c *restClient) GetRoute(ctx context.Context, req *datastreampb.GetRouteReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRoute") if err != nil { return err } @@ -2873,21 +2674,10 @@ func (c *restClient) ListRoutes(ctx context.Context, req *datastreampb.ListRoute } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2952,21 +2742,10 @@ func (c *restClient) DeleteRoute(ctx context.Context, req *datastreampb.DeleteRo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/datastream/apiv1alpha1/datastream_client_example_go123_test.go b/datastream/apiv1alpha1/datastream_client_example_go123_test.go index ef753f0071ce..c83d9815c4f0 100644 --- a/datastream/apiv1alpha1/datastream_client_example_go123_test.go +++ b/datastream/apiv1alpha1/datastream_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_FetchStaticIps_all() { } for resp, err := range c.FetchStaticIps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListConnectionProfiles_all() { } for resp, err := range c.ListConnectionProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListPrivateConnections_all() { } for resp, err := range c.ListPrivateConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListRoutes_all() { } for resp, err := range c.ListRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListStreams_all() { } for resp, err := range c.ListStreams(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/datastream/apiv1alpha1/datastreampb/datastream.pb.go b/datastream/apiv1alpha1/datastreampb/datastream.pb.go index 8274f96675f7..93abded66cda 100755 --- a/datastream/apiv1alpha1/datastreampb/datastream.pb.go +++ b/datastream/apiv1alpha1/datastreampb/datastream.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datastream/v1alpha1/datastream.proto @@ -75,11 +75,9 @@ type DiscoverConnectionProfileRequest struct { func (x *DiscoverConnectionProfileRequest) Reset() { *x = DiscoverConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoverConnectionProfileRequest) String() string { @@ -90,7 +88,7 @@ func (*DiscoverConnectionProfileRequest) ProtoMessage() {} func (x *DiscoverConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +247,9 @@ type DiscoverConnectionProfileResponse struct { func (x *DiscoverConnectionProfileResponse) Reset() { *x = DiscoverConnectionProfileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoverConnectionProfileResponse) String() string { @@ -264,7 +260,7 @@ func (*DiscoverConnectionProfileResponse) ProtoMessage() {} func (x *DiscoverConnectionProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +334,9 @@ type FetchStaticIpsRequest struct { func (x *FetchStaticIpsRequest) Reset() { *x = FetchStaticIpsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsRequest) String() string { @@ -353,7 +347,7 @@ func (*FetchStaticIpsRequest) ProtoMessage() {} func (x *FetchStaticIpsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +398,9 @@ type FetchStaticIpsResponse struct { func (x *FetchStaticIpsResponse) Reset() { *x = FetchStaticIpsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchStaticIpsResponse) String() string { @@ -419,7 +411,7 @@ func (*FetchStaticIpsResponse) ProtoMessage() {} func (x *FetchStaticIpsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +452,9 @@ type FetchErrorsRequest struct { func (x *FetchErrorsRequest) Reset() { *x = FetchErrorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchErrorsRequest) String() string { @@ -475,7 +465,7 @@ func (*FetchErrorsRequest) ProtoMessage() {} func (x *FetchErrorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +499,9 @@ type FetchErrorsResponse struct { func (x *FetchErrorsResponse) Reset() { *x = FetchErrorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchErrorsResponse) String() string { @@ -524,7 +512,7 @@ func (*FetchErrorsResponse) ProtoMessage() {} func (x *FetchErrorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +559,9 @@ type ListConnectionProfilesRequest struct { func (x *ListConnectionProfilesRequest) Reset() { *x = ListConnectionProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesRequest) String() string { @@ -586,7 +572,7 @@ func (*ListConnectionProfilesRequest) ProtoMessage() {} func (x *ListConnectionProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +638,9 @@ type ListConnectionProfilesResponse struct { func (x *ListConnectionProfilesResponse) Reset() { *x = ListConnectionProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionProfilesResponse) String() string { @@ -667,7 +651,7 @@ func (*ListConnectionProfilesResponse) ProtoMessage() {} func (x *ListConnectionProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +698,9 @@ type GetConnectionProfileRequest struct { func (x *GetConnectionProfileRequest) Reset() { *x = GetConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionProfileRequest) String() string { @@ -729,7 +711,7 @@ func (*GetConnectionProfileRequest) ProtoMessage() {} func (x *GetConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +762,9 @@ type CreateConnectionProfileRequest struct { func (x *CreateConnectionProfileRequest) Reset() { *x = CreateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionProfileRequest) String() string { @@ -795,7 +775,7 @@ func (*CreateConnectionProfileRequest) ProtoMessage() {} func (x *CreateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +849,9 @@ type UpdateConnectionProfileRequest struct { func (x *UpdateConnectionProfileRequest) Reset() { *x = UpdateConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionProfileRequest) String() string { @@ -884,7 +862,7 @@ func (*UpdateConnectionProfileRequest) ProtoMessage() {} func (x *UpdateConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +923,9 @@ type DeleteConnectionProfileRequest struct { func (x *DeleteConnectionProfileRequest) Reset() { *x = DeleteConnectionProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionProfileRequest) String() string { @@ -960,7 +936,7 @@ func (*DeleteConnectionProfileRequest) ProtoMessage() {} func (x *DeleteConnectionProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1014,11 +990,9 @@ type ListStreamsRequest struct { func (x *ListStreamsRequest) Reset() { *x = ListStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsRequest) String() string { @@ -1029,7 +1003,7 @@ func (*ListStreamsRequest) ProtoMessage() {} func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1069,9 @@ type ListStreamsResponse struct { func (x *ListStreamsResponse) Reset() { *x = ListStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsResponse) String() string { @@ -1110,7 +1082,7 @@ func (*ListStreamsResponse) ProtoMessage() {} func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1129,9 @@ type GetStreamRequest struct { func (x *GetStreamRequest) Reset() { *x = GetStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamRequest) String() string { @@ -1172,7 +1142,7 @@ func (*GetStreamRequest) ProtoMessage() {} func (x *GetStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,11 +1198,9 @@ type CreateStreamRequest struct { func (x *CreateStreamRequest) Reset() { *x = CreateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStreamRequest) String() string { @@ -1243,7 +1211,7 @@ func (*CreateStreamRequest) ProtoMessage() {} func (x *CreateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1336,11 +1304,9 @@ type UpdateStreamRequest struct { func (x *UpdateStreamRequest) Reset() { *x = UpdateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStreamRequest) String() string { @@ -1351,7 +1317,7 @@ func (*UpdateStreamRequest) ProtoMessage() {} func (x *UpdateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1392,9 @@ type DeleteStreamRequest struct { func (x *DeleteStreamRequest) Reset() { *x = DeleteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStreamRequest) String() string { @@ -1441,7 +1405,7 @@ func (*DeleteStreamRequest) ProtoMessage() {} func (x *DeleteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,11 +1463,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1514,7 +1476,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1614,11 +1576,9 @@ type CreatePrivateConnectionRequest struct { func (x *CreatePrivateConnectionRequest) Reset() { *x = CreatePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePrivateConnectionRequest) String() string { @@ -1629,7 +1589,7 @@ func (*CreatePrivateConnectionRequest) ProtoMessage() {} func (x *CreatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1699,11 +1659,9 @@ type ListPrivateConnectionsRequest struct { func (x *ListPrivateConnectionsRequest) Reset() { *x = ListPrivateConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsRequest) String() string { @@ -1714,7 +1672,7 @@ func (*ListPrivateConnectionsRequest) ProtoMessage() {} func (x *ListPrivateConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1780,11 +1738,9 @@ type ListPrivateConnectionsResponse struct { func (x *ListPrivateConnectionsResponse) Reset() { *x = ListPrivateConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsResponse) String() string { @@ -1795,7 +1751,7 @@ func (*ListPrivateConnectionsResponse) ProtoMessage() {} func (x *ListPrivateConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1859,11 +1815,9 @@ type DeletePrivateConnectionRequest struct { func (x *DeletePrivateConnectionRequest) Reset() { *x = DeletePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePrivateConnectionRequest) String() string { @@ -1874,7 +1828,7 @@ func (*DeletePrivateConnectionRequest) ProtoMessage() {} func (x *DeletePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1921,11 +1875,9 @@ type GetPrivateConnectionRequest struct { func (x *GetPrivateConnectionRequest) Reset() { *x = GetPrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPrivateConnectionRequest) String() string { @@ -1936,7 +1888,7 @@ func (*GetPrivateConnectionRequest) ProtoMessage() {} func (x *GetPrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1988,11 +1940,9 @@ type CreateRouteRequest struct { func (x *CreateRouteRequest) Reset() { *x = CreateRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRouteRequest) String() string { @@ -2003,7 +1953,7 @@ func (*CreateRouteRequest) ProtoMessage() {} func (x *CreateRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2074,11 +2024,9 @@ type ListRoutesRequest struct { func (x *ListRoutesRequest) Reset() { *x = ListRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesRequest) String() string { @@ -2089,7 +2037,7 @@ func (*ListRoutesRequest) ProtoMessage() {} func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2156,11 +2104,9 @@ type ListRoutesResponse struct { func (x *ListRoutesResponse) Reset() { *x = ListRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesResponse) String() string { @@ -2171,7 +2117,7 @@ func (*ListRoutesResponse) ProtoMessage() {} func (x *ListRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,11 +2179,9 @@ type DeleteRouteRequest struct { func (x *DeleteRouteRequest) Reset() { *x = DeleteRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRouteRequest) String() string { @@ -2248,7 +2192,7 @@ func (*DeleteRouteRequest) ProtoMessage() {} func (x *DeleteRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2233,9 @@ type GetRouteRequest struct { func (x *GetRouteRequest) Reset() { *x = GetRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouteRequest) String() string { @@ -2304,7 +2246,7 @@ func (*GetRouteRequest) ProtoMessage() {} func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3178,356 +3120,6 @@ func file_google_cloud_datastream_v1alpha1_datastream_proto_init() { return } file_google_cloud_datastream_v1alpha1_datastream_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DiscoverConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DiscoverConnectionProfileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FetchStaticIpsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FetchErrorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FetchErrorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreatePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeletePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetPrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0].OneofWrappers = []any{ (*DiscoverConnectionProfileRequest_ConnectionProfile)(nil), (*DiscoverConnectionProfileRequest_ConnectionProfileName)(nil), diff --git a/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go b/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go index 1f6b8e4049b4..a79fe6325f90 100755 --- a/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go +++ b/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/datastream/v1alpha1/datastream_resources.proto @@ -464,11 +464,9 @@ type OracleProfile struct { func (x *OracleProfile) Reset() { *x = OracleProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleProfile) String() string { @@ -479,7 +477,7 @@ func (*OracleProfile) ProtoMessage() {} func (x *OracleProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +554,9 @@ type MysqlProfile struct { func (x *MysqlProfile) Reset() { *x = MysqlProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlProfile) String() string { @@ -571,7 +567,7 @@ func (*MysqlProfile) ProtoMessage() {} func (x *MysqlProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +632,9 @@ type GcsProfile struct { func (x *GcsProfile) Reset() { *x = GcsProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsProfile) String() string { @@ -651,7 +645,7 @@ func (*GcsProfile) ProtoMessage() {} func (x *GcsProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +683,9 @@ type NoConnectivitySettings struct { func (x *NoConnectivitySettings) Reset() { *x = NoConnectivitySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NoConnectivitySettings) String() string { @@ -704,7 +696,7 @@ func (*NoConnectivitySettings) ProtoMessage() {} func (x *NoConnectivitySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,11 +720,9 @@ type StaticServiceIpConnectivity struct { func (x *StaticServiceIpConnectivity) Reset() { *x = StaticServiceIpConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticServiceIpConnectivity) String() string { @@ -743,7 +733,7 @@ func (*StaticServiceIpConnectivity) ProtoMessage() {} func (x *StaticServiceIpConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +769,9 @@ type ForwardSshTunnelConnectivity struct { func (x *ForwardSshTunnelConnectivity) Reset() { *x = ForwardSshTunnelConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardSshTunnelConnectivity) String() string { @@ -794,7 +782,7 @@ func (*ForwardSshTunnelConnectivity) ProtoMessage() {} func (x *ForwardSshTunnelConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +873,9 @@ type VpcPeeringConfig struct { func (x *VpcPeeringConfig) Reset() { *x = VpcPeeringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcPeeringConfig) String() string { @@ -900,7 +886,7 @@ func (*VpcPeeringConfig) ProtoMessage() {} func (x *VpcPeeringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +942,9 @@ type PrivateConnection struct { func (x *PrivateConnection) Reset() { *x = PrivateConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnection) String() string { @@ -971,7 +955,7 @@ func (*PrivateConnection) ProtoMessage() {} func (x *PrivateConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1037,9 @@ type PrivateConnectivity struct { func (x *PrivateConnectivity) Reset() { *x = PrivateConnectivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnectivity) String() string { @@ -1068,7 +1050,7 @@ func (*PrivateConnectivity) ProtoMessage() {} func (x *PrivateConnectivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1097,9 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route) String() string { @@ -1130,7 +1110,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1201,9 @@ type MysqlSslConfig struct { func (x *MysqlSslConfig) Reset() { *x = MysqlSslConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSslConfig) String() string { @@ -1236,7 +1214,7 @@ func (*MysqlSslConfig) ProtoMessage() {} func (x *MysqlSslConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1329,11 +1307,9 @@ type ConnectionProfile struct { func (x *ConnectionProfile) Reset() { *x = ConnectionProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionProfile) String() string { @@ -1344,7 +1320,7 @@ func (*ConnectionProfile) ProtoMessage() {} func (x *ConnectionProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1542,11 +1518,9 @@ type OracleColumn struct { func (x *OracleColumn) Reset() { *x = OracleColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleColumn) String() string { @@ -1557,7 +1531,7 @@ func (*OracleColumn) ProtoMessage() {} func (x *OracleColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1651,11 +1625,9 @@ type OracleTable struct { func (x *OracleTable) Reset() { *x = OracleTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleTable) String() string { @@ -1666,7 +1638,7 @@ func (*OracleTable) ProtoMessage() {} func (x *OracleTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,11 +1681,9 @@ type OracleSchema struct { func (x *OracleSchema) Reset() { *x = OracleSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSchema) String() string { @@ -1724,7 +1694,7 @@ func (*OracleSchema) ProtoMessage() {} func (x *OracleSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,11 +1735,9 @@ type OracleRdbms struct { func (x *OracleRdbms) Reset() { *x = OracleRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleRdbms) String() string { @@ -1780,7 +1748,7 @@ func (*OracleRdbms) ProtoMessage() {} func (x *OracleRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1784,9 @@ type OracleSourceConfig struct { func (x *OracleSourceConfig) Reset() { *x = OracleSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OracleSourceConfig) String() string { @@ -1831,7 +1797,7 @@ func (*OracleSourceConfig) ProtoMessage() {} func (x *OracleSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1885,11 +1851,9 @@ type MysqlColumn struct { func (x *MysqlColumn) Reset() { *x = MysqlColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlColumn) String() string { @@ -1900,7 +1864,7 @@ func (*MysqlColumn) ProtoMessage() {} func (x *MysqlColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1944,9 @@ type MysqlTable struct { func (x *MysqlTable) Reset() { *x = MysqlTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlTable) String() string { @@ -1995,7 +1957,7 @@ func (*MysqlTable) ProtoMessage() {} func (x *MysqlTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2038,11 +2000,9 @@ type MysqlDatabase struct { func (x *MysqlDatabase) Reset() { *x = MysqlDatabase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlDatabase) String() string { @@ -2053,7 +2013,7 @@ func (*MysqlDatabase) ProtoMessage() {} func (x *MysqlDatabase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2094,11 +2054,9 @@ type MysqlRdbms struct { func (x *MysqlRdbms) Reset() { *x = MysqlRdbms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlRdbms) String() string { @@ -2109,7 +2067,7 @@ func (*MysqlRdbms) ProtoMessage() {} func (x *MysqlRdbms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2145,11 +2103,9 @@ type MysqlSourceConfig struct { func (x *MysqlSourceConfig) Reset() { *x = MysqlSourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MysqlSourceConfig) String() string { @@ -2160,7 +2116,7 @@ func (*MysqlSourceConfig) ProtoMessage() {} func (x *MysqlSourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2164,9 @@ type SourceConfig struct { func (x *SourceConfig) Reset() { *x = SourceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceConfig) String() string { @@ -2223,7 +2177,7 @@ func (*SourceConfig) ProtoMessage() {} func (x *SourceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2293,11 +2247,9 @@ type AvroFileFormat struct { func (x *AvroFileFormat) Reset() { *x = AvroFileFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvroFileFormat) String() string { @@ -2308,7 +2260,7 @@ func (*AvroFileFormat) ProtoMessage() {} func (x *AvroFileFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2337,11 +2289,9 @@ type JsonFileFormat struct { func (x *JsonFileFormat) Reset() { *x = JsonFileFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JsonFileFormat) String() string { @@ -2352,7 +2302,7 @@ func (*JsonFileFormat) ProtoMessage() {} func (x *JsonFileFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2410,11 +2360,9 @@ type GcsDestinationConfig struct { func (x *GcsDestinationConfig) Reset() { *x = GcsDestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestinationConfig) String() string { @@ -2425,7 +2373,7 @@ func (*GcsDestinationConfig) ProtoMessage() {} func (x *GcsDestinationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2474,9 @@ type DestinationConfig struct { func (x *DestinationConfig) Reset() { *x = DestinationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationConfig) String() string { @@ -2541,7 +2487,7 @@ func (*DestinationConfig) ProtoMessage() {} func (x *DestinationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2621,11 +2567,9 @@ type Stream struct { func (x *Stream) Reset() { *x = Stream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream) String() string { @@ -2636,7 +2580,7 @@ func (*Stream) ProtoMessage() {} func (x *Stream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2775,11 +2719,9 @@ type Error struct { func (x *Error) Reset() { *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Error) String() string { @@ -2790,7 +2732,7 @@ func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2853,11 +2795,9 @@ type ValidationResult struct { func (x *ValidationResult) Reset() { *x = ValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationResult) String() string { @@ -2868,7 +2808,7 @@ func (*ValidationResult) ProtoMessage() {} func (x *ValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2907,11 +2847,9 @@ type Validation struct { func (x *Validation) Reset() { *x = Validation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Validation) String() string { @@ -2922,7 +2860,7 @@ func (*Validation) ProtoMessage() {} func (x *Validation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2983,11 +2921,9 @@ type ValidationMessage struct { func (x *ValidationMessage) Reset() { *x = ValidationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationMessage) String() string { @@ -2998,7 +2934,7 @@ func (*ValidationMessage) ProtoMessage() {} func (x *ValidationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3059,11 +2995,9 @@ type Stream_BackfillAllStrategy struct { func (x *Stream_BackfillAllStrategy) Reset() { *x = Stream_BackfillAllStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream_BackfillAllStrategy) String() string { @@ -3074,7 +3008,7 @@ func (*Stream_BackfillAllStrategy) ProtoMessage() {} func (x *Stream_BackfillAllStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3139,11 +3073,9 @@ type Stream_BackfillNoneStrategy struct { func (x *Stream_BackfillNoneStrategy) Reset() { *x = Stream_BackfillNoneStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream_BackfillNoneStrategy) String() string { @@ -3154,7 +3086,7 @@ func (*Stream_BackfillNoneStrategy) ProtoMessage() {} func (x *Stream_BackfillNoneStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3947,416 +3879,6 @@ func file_google_cloud_datastream_v1alpha1_datastream_resources_proto_init() { if File_google_cloud_datastream_v1alpha1_datastream_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OracleProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MysqlProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NoConnectivitySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StaticServiceIpConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ForwardSshTunnelConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VpcPeeringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnectivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSslConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OracleColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OracleTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OracleSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*OracleRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OracleSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*MysqlColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*MysqlTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*MysqlDatabase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*MysqlRdbms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*MysqlSourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SourceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AvroFileFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*JsonFileFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DestinationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Stream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Validation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ValidationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Stream_BackfillAllStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Stream_BackfillNoneStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5].OneofWrappers = []any{ (*ForwardSshTunnelConnectivity_Password)(nil), (*ForwardSshTunnelConnectivity_PrivateKey)(nil), diff --git a/datastream/apiv1alpha1/helpers.go b/datastream/apiv1alpha1/helpers.go index e55529fbc23c..f7235edafe8e 100755 --- a/datastream/apiv1alpha1/helpers.go +++ b/datastream/apiv1alpha1/helpers.go @@ -18,10 +18,20 @@ package datastream import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "datastream.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/deploy/apiv1/cloud_deploy_client.go b/deploy/apiv1/cloud_deploy_client.go index 4294cabd8b9d..b3d1418dc2f5 100755 --- a/deploy/apiv1/cloud_deploy_client.go +++ b/deploy/apiv1/cloud_deploy_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1268,6 +1267,8 @@ type cloudDeployGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudDeployClient creates a new cloud deploy client based on gRPC. @@ -1295,6 +1296,7 @@ func NewCloudDeployClient(ctx context.Context, opts ...option.ClientOption) (*Cl connPool: connPool, cloudDeployClient: deploypb.NewCloudDeployClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1360,6 +1362,8 @@ type cloudDeployRESTClient struct { // Points back to the CallOptions field of the containing CloudDeployClient CallOptions **CloudDeployCallOptions + + logger *slog.Logger } // NewCloudDeployRESTClient creates a new cloud deploy rest client. @@ -1378,6 +1382,7 @@ func NewCloudDeployRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1451,7 +1456,7 @@ func (c *cloudDeployGRPCClient) ListDeliveryPipelines(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListDeliveryPipelines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListDeliveryPipelines, req, settings.GRPC, c.logger, "ListDeliveryPipelines") return err }, opts...) if err != nil { @@ -1486,7 +1491,7 @@ func (c *cloudDeployGRPCClient) GetDeliveryPipeline(ctx context.Context, req *de var resp *deploypb.DeliveryPipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetDeliveryPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetDeliveryPipeline, req, settings.GRPC, c.logger, "GetDeliveryPipeline") return err }, opts...) if err != nil { @@ -1504,7 +1509,7 @@ func (c *cloudDeployGRPCClient) CreateDeliveryPipeline(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateDeliveryPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateDeliveryPipeline, req, settings.GRPC, c.logger, "CreateDeliveryPipeline") return err }, opts...) if err != nil { @@ -1524,7 +1529,7 @@ func (c *cloudDeployGRPCClient) UpdateDeliveryPipeline(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.UpdateDeliveryPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.UpdateDeliveryPipeline, req, settings.GRPC, c.logger, "UpdateDeliveryPipeline") return err }, opts...) if err != nil { @@ -1544,7 +1549,7 @@ func (c *cloudDeployGRPCClient) DeleteDeliveryPipeline(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.DeleteDeliveryPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.DeleteDeliveryPipeline, req, settings.GRPC, c.logger, "DeleteDeliveryPipeline") return err }, opts...) if err != nil { @@ -1575,7 +1580,7 @@ func (c *cloudDeployGRPCClient) ListTargets(ctx context.Context, req *deploypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListTargets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListTargets, req, settings.GRPC, c.logger, "ListTargets") return err }, opts...) if err != nil { @@ -1610,7 +1615,7 @@ func (c *cloudDeployGRPCClient) RollbackTarget(ctx context.Context, req *deployp var resp *deploypb.RollbackTargetResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.RollbackTarget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.RollbackTarget, req, settings.GRPC, c.logger, "RollbackTarget") return err }, opts...) if err != nil { @@ -1628,7 +1633,7 @@ func (c *cloudDeployGRPCClient) GetTarget(ctx context.Context, req *deploypb.Get var resp *deploypb.Target err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetTarget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetTarget, req, settings.GRPC, c.logger, "GetTarget") return err }, opts...) if err != nil { @@ -1646,7 +1651,7 @@ func (c *cloudDeployGRPCClient) CreateTarget(ctx context.Context, req *deploypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateTarget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateTarget, req, settings.GRPC, c.logger, "CreateTarget") return err }, opts...) if err != nil { @@ -1666,7 +1671,7 @@ func (c *cloudDeployGRPCClient) UpdateTarget(ctx context.Context, req *deploypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.UpdateTarget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.UpdateTarget, req, settings.GRPC, c.logger, "UpdateTarget") return err }, opts...) if err != nil { @@ -1686,7 +1691,7 @@ func (c *cloudDeployGRPCClient) DeleteTarget(ctx context.Context, req *deploypb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.DeleteTarget(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.DeleteTarget, req, settings.GRPC, c.logger, "DeleteTarget") return err }, opts...) if err != nil { @@ -1717,7 +1722,7 @@ func (c *cloudDeployGRPCClient) ListCustomTargetTypes(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListCustomTargetTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListCustomTargetTypes, req, settings.GRPC, c.logger, "ListCustomTargetTypes") return err }, opts...) if err != nil { @@ -1752,7 +1757,7 @@ func (c *cloudDeployGRPCClient) GetCustomTargetType(ctx context.Context, req *de var resp *deploypb.CustomTargetType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetCustomTargetType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetCustomTargetType, req, settings.GRPC, c.logger, "GetCustomTargetType") return err }, opts...) if err != nil { @@ -1770,7 +1775,7 @@ func (c *cloudDeployGRPCClient) CreateCustomTargetType(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateCustomTargetType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateCustomTargetType, req, settings.GRPC, c.logger, "CreateCustomTargetType") return err }, opts...) if err != nil { @@ -1790,7 +1795,7 @@ func (c *cloudDeployGRPCClient) UpdateCustomTargetType(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.UpdateCustomTargetType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.UpdateCustomTargetType, req, settings.GRPC, c.logger, "UpdateCustomTargetType") return err }, opts...) if err != nil { @@ -1810,7 +1815,7 @@ func (c *cloudDeployGRPCClient) DeleteCustomTargetType(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.DeleteCustomTargetType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.DeleteCustomTargetType, req, settings.GRPC, c.logger, "DeleteCustomTargetType") return err }, opts...) if err != nil { @@ -1841,7 +1846,7 @@ func (c *cloudDeployGRPCClient) ListReleases(ctx context.Context, req *deploypb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListReleases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListReleases, req, settings.GRPC, c.logger, "ListReleases") return err }, opts...) if err != nil { @@ -1876,7 +1881,7 @@ func (c *cloudDeployGRPCClient) GetRelease(ctx context.Context, req *deploypb.Ge var resp *deploypb.Release err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetRelease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetRelease, req, settings.GRPC, c.logger, "GetRelease") return err }, opts...) if err != nil { @@ -1894,7 +1899,7 @@ func (c *cloudDeployGRPCClient) CreateRelease(ctx context.Context, req *deploypb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateRelease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateRelease, req, settings.GRPC, c.logger, "CreateRelease") return err }, opts...) if err != nil { @@ -1914,7 +1919,7 @@ func (c *cloudDeployGRPCClient) AbandonRelease(ctx context.Context, req *deployp var resp *deploypb.AbandonReleaseResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.AbandonRelease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.AbandonRelease, req, settings.GRPC, c.logger, "AbandonRelease") return err }, opts...) if err != nil { @@ -1932,7 +1937,7 @@ func (c *cloudDeployGRPCClient) CreateDeployPolicy(ctx context.Context, req *dep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateDeployPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateDeployPolicy, req, settings.GRPC, c.logger, "CreateDeployPolicy") return err }, opts...) if err != nil { @@ -1952,7 +1957,7 @@ func (c *cloudDeployGRPCClient) UpdateDeployPolicy(ctx context.Context, req *dep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.UpdateDeployPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.UpdateDeployPolicy, req, settings.GRPC, c.logger, "UpdateDeployPolicy") return err }, opts...) if err != nil { @@ -1972,7 +1977,7 @@ func (c *cloudDeployGRPCClient) DeleteDeployPolicy(ctx context.Context, req *dep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.DeleteDeployPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.DeleteDeployPolicy, req, settings.GRPC, c.logger, "DeleteDeployPolicy") return err }, opts...) if err != nil { @@ -2003,7 +2008,7 @@ func (c *cloudDeployGRPCClient) ListDeployPolicies(ctx context.Context, req *dep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListDeployPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListDeployPolicies, req, settings.GRPC, c.logger, "ListDeployPolicies") return err }, opts...) if err != nil { @@ -2038,7 +2043,7 @@ func (c *cloudDeployGRPCClient) GetDeployPolicy(ctx context.Context, req *deploy var resp *deploypb.DeployPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetDeployPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetDeployPolicy, req, settings.GRPC, c.logger, "GetDeployPolicy") return err }, opts...) if err != nil { @@ -2056,7 +2061,7 @@ func (c *cloudDeployGRPCClient) ApproveRollout(ctx context.Context, req *deployp var resp *deploypb.ApproveRolloutResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ApproveRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ApproveRollout, req, settings.GRPC, c.logger, "ApproveRollout") return err }, opts...) if err != nil { @@ -2074,7 +2079,7 @@ func (c *cloudDeployGRPCClient) AdvanceRollout(ctx context.Context, req *deployp var resp *deploypb.AdvanceRolloutResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.AdvanceRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.AdvanceRollout, req, settings.GRPC, c.logger, "AdvanceRollout") return err }, opts...) if err != nil { @@ -2092,7 +2097,7 @@ func (c *cloudDeployGRPCClient) CancelRollout(ctx context.Context, req *deploypb var resp *deploypb.CancelRolloutResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CancelRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CancelRollout, req, settings.GRPC, c.logger, "CancelRollout") return err }, opts...) if err != nil { @@ -2121,7 +2126,7 @@ func (c *cloudDeployGRPCClient) ListRollouts(ctx context.Context, req *deploypb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListRollouts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListRollouts, req, settings.GRPC, c.logger, "ListRollouts") return err }, opts...) if err != nil { @@ -2156,7 +2161,7 @@ func (c *cloudDeployGRPCClient) GetRollout(ctx context.Context, req *deploypb.Ge var resp *deploypb.Rollout err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetRollout, req, settings.GRPC, c.logger, "GetRollout") return err }, opts...) if err != nil { @@ -2174,7 +2179,7 @@ func (c *cloudDeployGRPCClient) CreateRollout(ctx context.Context, req *deploypb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateRollout, req, settings.GRPC, c.logger, "CreateRollout") return err }, opts...) if err != nil { @@ -2194,7 +2199,7 @@ func (c *cloudDeployGRPCClient) IgnoreJob(ctx context.Context, req *deploypb.Ign var resp *deploypb.IgnoreJobResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.IgnoreJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.IgnoreJob, req, settings.GRPC, c.logger, "IgnoreJob") return err }, opts...) if err != nil { @@ -2212,7 +2217,7 @@ func (c *cloudDeployGRPCClient) RetryJob(ctx context.Context, req *deploypb.Retr var resp *deploypb.RetryJobResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.RetryJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.RetryJob, req, settings.GRPC, c.logger, "RetryJob") return err }, opts...) if err != nil { @@ -2241,7 +2246,7 @@ func (c *cloudDeployGRPCClient) ListJobRuns(ctx context.Context, req *deploypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListJobRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListJobRuns, req, settings.GRPC, c.logger, "ListJobRuns") return err }, opts...) if err != nil { @@ -2276,7 +2281,7 @@ func (c *cloudDeployGRPCClient) GetJobRun(ctx context.Context, req *deploypb.Get var resp *deploypb.JobRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetJobRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetJobRun, req, settings.GRPC, c.logger, "GetJobRun") return err }, opts...) if err != nil { @@ -2294,7 +2299,7 @@ func (c *cloudDeployGRPCClient) TerminateJobRun(ctx context.Context, req *deploy var resp *deploypb.TerminateJobRunResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.TerminateJobRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.TerminateJobRun, req, settings.GRPC, c.logger, "TerminateJobRun") return err }, opts...) if err != nil { @@ -2312,7 +2317,7 @@ func (c *cloudDeployGRPCClient) GetConfig(ctx context.Context, req *deploypb.Get var resp *deploypb.Config err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetConfig, req, settings.GRPC, c.logger, "GetConfig") return err }, opts...) if err != nil { @@ -2330,7 +2335,7 @@ func (c *cloudDeployGRPCClient) CreateAutomation(ctx context.Context, req *deplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CreateAutomation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CreateAutomation, req, settings.GRPC, c.logger, "CreateAutomation") return err }, opts...) if err != nil { @@ -2350,7 +2355,7 @@ func (c *cloudDeployGRPCClient) UpdateAutomation(ctx context.Context, req *deplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.UpdateAutomation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.UpdateAutomation, req, settings.GRPC, c.logger, "UpdateAutomation") return err }, opts...) if err != nil { @@ -2370,7 +2375,7 @@ func (c *cloudDeployGRPCClient) DeleteAutomation(ctx context.Context, req *deplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.DeleteAutomation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.DeleteAutomation, req, settings.GRPC, c.logger, "DeleteAutomation") return err }, opts...) if err != nil { @@ -2390,7 +2395,7 @@ func (c *cloudDeployGRPCClient) GetAutomation(ctx context.Context, req *deploypb var resp *deploypb.Automation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetAutomation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetAutomation, req, settings.GRPC, c.logger, "GetAutomation") return err }, opts...) if err != nil { @@ -2419,7 +2424,7 @@ func (c *cloudDeployGRPCClient) ListAutomations(ctx context.Context, req *deploy } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListAutomations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListAutomations, req, settings.GRPC, c.logger, "ListAutomations") return err }, opts...) if err != nil { @@ -2454,7 +2459,7 @@ func (c *cloudDeployGRPCClient) GetAutomationRun(ctx context.Context, req *deplo var resp *deploypb.AutomationRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.GetAutomationRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.GetAutomationRun, req, settings.GRPC, c.logger, "GetAutomationRun") return err }, opts...) if err != nil { @@ -2483,7 +2488,7 @@ func (c *cloudDeployGRPCClient) ListAutomationRuns(ctx context.Context, req *dep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.ListAutomationRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.ListAutomationRuns, req, settings.GRPC, c.logger, "ListAutomationRuns") return err }, opts...) if err != nil { @@ -2518,7 +2523,7 @@ func (c *cloudDeployGRPCClient) CancelAutomationRun(ctx context.Context, req *de var resp *deploypb.CancelAutomationRunResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudDeployClient.CancelAutomationRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudDeployClient.CancelAutomationRun, req, settings.GRPC, c.logger, "CancelAutomationRun") return err }, opts...) if err != nil { @@ -2536,7 +2541,7 @@ func (c *cloudDeployGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2565,7 +2570,7 @@ func (c *cloudDeployGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2600,7 +2605,7 @@ func (c *cloudDeployGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Get var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2618,7 +2623,7 @@ func (c *cloudDeployGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Set var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2636,7 +2641,7 @@ func (c *cloudDeployGRPCClient) TestIamPermissions(ctx context.Context, req *iam var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2653,7 +2658,7 @@ func (c *cloudDeployGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2667,7 +2672,7 @@ func (c *cloudDeployGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2682,7 +2687,7 @@ func (c *cloudDeployGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2711,7 +2716,7 @@ func (c *cloudDeployGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2788,21 +2793,10 @@ func (c *cloudDeployRESTClient) ListDeliveryPipelines(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeliveryPipelines") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2865,17 +2859,7 @@ func (c *cloudDeployRESTClient) GetDeliveryPipeline(ctx context.Context, req *de httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeliveryPipeline") if err != nil { return err } @@ -2938,21 +2922,10 @@ func (c *cloudDeployRESTClient) CreateDeliveryPipeline(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeliveryPipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3025,21 +2998,10 @@ func (c *cloudDeployRESTClient) UpdateDeliveryPipeline(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeliveryPipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3104,21 +3066,10 @@ func (c *cloudDeployRESTClient) DeleteDeliveryPipeline(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeliveryPipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3187,21 +3138,10 @@ func (c *cloudDeployRESTClient) ListTargets(ctx context.Context, req *deploypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTargets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3270,17 +3210,7 @@ func (c *cloudDeployRESTClient) RollbackTarget(ctx context.Context, req *deployp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackTarget") if err != nil { return err } @@ -3330,17 +3260,7 @@ func (c *cloudDeployRESTClient) GetTarget(ctx context.Context, req *deploypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTarget") if err != nil { return err } @@ -3403,21 +3323,10 @@ func (c *cloudDeployRESTClient) CreateTarget(ctx context.Context, req *deploypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTarget") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3490,21 +3399,10 @@ func (c *cloudDeployRESTClient) UpdateTarget(ctx context.Context, req *deploypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTarget") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3566,21 +3464,10 @@ func (c *cloudDeployRESTClient) DeleteTarget(ctx context.Context, req *deploypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTarget") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3649,21 +3536,10 @@ func (c *cloudDeployRESTClient) ListCustomTargetTypes(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomTargetTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3726,17 +3602,7 @@ func (c *cloudDeployRESTClient) GetCustomTargetType(ctx context.Context, req *de httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomTargetType") if err != nil { return err } @@ -3799,21 +3665,10 @@ func (c *cloudDeployRESTClient) CreateCustomTargetType(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomTargetType") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3886,21 +3741,10 @@ func (c *cloudDeployRESTClient) UpdateCustomTargetType(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomTargetType") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3962,21 +3806,10 @@ func (c *cloudDeployRESTClient) DeleteCustomTargetType(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomTargetType") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4045,21 +3878,10 @@ func (c *cloudDeployRESTClient) ListReleases(ctx context.Context, req *deploypb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReleases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4122,17 +3944,7 @@ func (c *cloudDeployRESTClient) GetRelease(ctx context.Context, req *deploypb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRelease") if err != nil { return err } @@ -4200,21 +4012,10 @@ func (c *cloudDeployRESTClient) CreateRelease(ctx context.Context, req *deploypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRelease") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4271,17 +4072,7 @@ func (c *cloudDeployRESTClient) AbandonRelease(ctx context.Context, req *deployp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AbandonRelease") if err != nil { return err } @@ -4344,21 +4135,10 @@ func (c *cloudDeployRESTClient) CreateDeployPolicy(ctx context.Context, req *dep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeployPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4431,21 +4211,10 @@ func (c *cloudDeployRESTClient) UpdateDeployPolicy(ctx context.Context, req *dep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeployPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4507,21 +4276,10 @@ func (c *cloudDeployRESTClient) DeleteDeployPolicy(ctx context.Context, req *dep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeployPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4590,21 +4348,10 @@ func (c *cloudDeployRESTClient) ListDeployPolicies(ctx context.Context, req *dep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4667,17 +4414,7 @@ func (c *cloudDeployRESTClient) GetDeployPolicy(ctx context.Context, req *deploy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployPolicy") if err != nil { return err } @@ -4733,17 +4470,7 @@ func (c *cloudDeployRESTClient) ApproveRollout(ctx context.Context, req *deployp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveRollout") if err != nil { return err } @@ -4799,17 +4526,7 @@ func (c *cloudDeployRESTClient) AdvanceRollout(ctx context.Context, req *deployp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AdvanceRollout") if err != nil { return err } @@ -4865,17 +4582,7 @@ func (c *cloudDeployRESTClient) CancelRollout(ctx context.Context, req *deploypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelRollout") if err != nil { return err } @@ -4943,21 +4650,10 @@ func (c *cloudDeployRESTClient) ListRollouts(ctx context.Context, req *deploypb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRollouts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5020,17 +4716,7 @@ func (c *cloudDeployRESTClient) GetRollout(ctx context.Context, req *deploypb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRollout") if err != nil { return err } @@ -5101,21 +4787,10 @@ func (c *cloudDeployRESTClient) CreateRollout(ctx context.Context, req *deploypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRollout") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5172,17 +4847,7 @@ func (c *cloudDeployRESTClient) IgnoreJob(ctx context.Context, req *deploypb.Ign httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "IgnoreJob") if err != nil { return err } @@ -5238,17 +4903,7 @@ func (c *cloudDeployRESTClient) RetryJob(ctx context.Context, req *deploypb.Retr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RetryJob") if err != nil { return err } @@ -5316,21 +4971,10 @@ func (c *cloudDeployRESTClient) ListJobRuns(ctx context.Context, req *deploypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobRuns") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5393,17 +5037,7 @@ func (c *cloudDeployRESTClient) GetJobRun(ctx context.Context, req *deploypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJobRun") if err != nil { return err } @@ -5459,17 +5093,7 @@ func (c *cloudDeployRESTClient) TerminateJobRun(ctx context.Context, req *deploy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TerminateJobRun") if err != nil { return err } @@ -5519,17 +5143,7 @@ func (c *cloudDeployRESTClient) GetConfig(ctx context.Context, req *deploypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConfig") if err != nil { return err } @@ -5592,21 +5206,10 @@ func (c *cloudDeployRESTClient) CreateAutomation(ctx context.Context, req *deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAutomation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5679,21 +5282,10 @@ func (c *cloudDeployRESTClient) UpdateAutomation(ctx context.Context, req *deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAutomation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5755,21 +5347,10 @@ func (c *cloudDeployRESTClient) DeleteAutomation(ctx context.Context, req *deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAutomation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5820,17 +5401,7 @@ func (c *cloudDeployRESTClient) GetAutomation(ctx context.Context, req *deploypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutomation") if err != nil { return err } @@ -5898,21 +5469,10 @@ func (c *cloudDeployRESTClient) ListAutomations(ctx context.Context, req *deploy } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutomations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5975,17 +5535,7 @@ func (c *cloudDeployRESTClient) GetAutomationRun(ctx context.Context, req *deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutomationRun") if err != nil { return err } @@ -6053,21 +5603,10 @@ func (c *cloudDeployRESTClient) ListAutomationRuns(ctx context.Context, req *dep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutomationRuns") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6139,17 +5678,7 @@ func (c *cloudDeployRESTClient) CancelAutomationRun(ctx context.Context, req *de httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelAutomationRun") if err != nil { return err } @@ -6199,17 +5728,7 @@ func (c *cloudDeployRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -6274,21 +5793,10 @@ func (c *cloudDeployRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6355,17 +5863,7 @@ func (c *cloudDeployRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -6425,17 +5923,7 @@ func (c *cloudDeployRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Set httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -6497,17 +5985,7 @@ func (c *cloudDeployRESTClient) TestIamPermissions(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -6560,15 +6038,8 @@ func (c *cloudDeployRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -6602,15 +6073,8 @@ func (c *cloudDeployRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -6647,17 +6111,7 @@ func (c *cloudDeployRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -6722,21 +6176,10 @@ func (c *cloudDeployRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/deploy/apiv1/cloud_deploy_client_example_go123_test.go b/deploy/apiv1/cloud_deploy_client_example_go123_test.go index 50b95ab6eb65..4506ab5af551 100644 --- a/deploy/apiv1/cloud_deploy_client_example_go123_test.go +++ b/deploy/apiv1/cloud_deploy_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudDeployClient_ListAutomationRuns_all() { } for resp, err := range c.ListAutomationRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudDeployClient_ListAutomations_all() { } for resp, err := range c.ListAutomations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudDeployClient_ListCustomTargetTypes_all() { } for resp, err := range c.ListCustomTargetTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleCloudDeployClient_ListDeliveryPipelines_all() { } for resp, err := range c.ListDeliveryPipelines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleCloudDeployClient_ListDeployPolicies_all() { } for resp, err := range c.ListDeployPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleCloudDeployClient_ListJobRuns_all() { } for resp, err := range c.ListJobRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleCloudDeployClient_ListReleases_all() { } for resp, err := range c.ListReleases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleCloudDeployClient_ListRollouts_all() { } for resp, err := range c.ListRollouts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleCloudDeployClient_ListTargets_all() { } for resp, err := range c.ListTargets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleCloudDeployClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleCloudDeployClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/deploy/apiv1/deploypb/automation_payload.pb.go b/deploy/apiv1/deploypb/automation_payload.pb.go index cb1b90d75b59..5b39fd248e12 100755 --- a/deploy/apiv1/deploypb/automation_payload.pb.go +++ b/deploy/apiv1/deploypb/automation_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/automation_payload.proto @@ -55,11 +55,9 @@ type AutomationEvent struct { func (x *AutomationEvent) Reset() { *x = AutomationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_automation_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_automation_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationEvent) String() string { @@ -70,7 +68,7 @@ func (*AutomationEvent) ProtoMessage() {} func (x *AutomationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_automation_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_google_cloud_deploy_v1_automation_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_automation_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutomationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/automationrun_payload.pb.go b/deploy/apiv1/deploypb/automationrun_payload.pb.go index b5737fd68497..11aac83eea96 100755 --- a/deploy/apiv1/deploypb/automationrun_payload.pb.go +++ b/deploy/apiv1/deploypb/automationrun_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/automationrun_payload.proto @@ -61,11 +61,9 @@ type AutomationRunEvent struct { func (x *AutomationRunEvent) Reset() { *x = AutomationRunEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_automationrun_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_automationrun_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationRunEvent) String() string { @@ -76,7 +74,7 @@ func (*AutomationRunEvent) ProtoMessage() {} func (x *AutomationRunEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_automationrun_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,20 +208,6 @@ func file_google_cloud_deploy_v1_automationrun_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_automationrun_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutomationRunEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/cloud_deploy.pb.go b/deploy/apiv1/deploypb/cloud_deploy.pb.go index d356371884c5..04cb3a47ee27 100755 --- a/deploy/apiv1/deploypb/cloud_deploy.pb.go +++ b/deploy/apiv1/deploypb/cloud_deploy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/cloud_deploy.proto @@ -1457,11 +1457,9 @@ type DeliveryPipeline struct { func (x *DeliveryPipeline) Reset() { *x = DeliveryPipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryPipeline) String() string { @@ -1472,7 +1470,7 @@ func (*DeliveryPipeline) ProtoMessage() {} func (x *DeliveryPipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,11 +1594,9 @@ type SerialPipeline struct { func (x *SerialPipeline) Reset() { *x = SerialPipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SerialPipeline) String() string { @@ -1611,7 +1607,7 @@ func (*SerialPipeline) ProtoMessage() {} func (x *SerialPipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1657,11 +1653,9 @@ type Stage struct { func (x *Stage) Reset() { *x = Stage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stage) String() string { @@ -1672,7 +1666,7 @@ func (*Stage) ProtoMessage() {} func (x *Stage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1725,9 @@ type DeployParameters struct { func (x *DeployParameters) Reset() { *x = DeployParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployParameters) String() string { @@ -1746,7 +1738,7 @@ func (*DeployParameters) ProtoMessage() {} func (x *DeployParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1784,9 @@ type Strategy struct { func (x *Strategy) Reset() { *x = Strategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Strategy) String() string { @@ -1807,7 +1797,7 @@ func (*Strategy) ProtoMessage() {} func (x *Strategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1876,11 +1866,9 @@ type Predeploy struct { func (x *Predeploy) Reset() { *x = Predeploy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predeploy) String() string { @@ -1891,7 +1879,7 @@ func (*Predeploy) ProtoMessage() {} func (x *Predeploy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,11 +1914,9 @@ type Postdeploy struct { func (x *Postdeploy) Reset() { *x = Postdeploy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Postdeploy) String() string { @@ -1941,7 +1927,7 @@ func (*Postdeploy) ProtoMessage() {} func (x *Postdeploy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1981,11 +1967,9 @@ type Standard struct { func (x *Standard) Reset() { *x = Standard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Standard) String() string { @@ -1996,7 +1980,7 @@ func (*Standard) ProtoMessage() {} func (x *Standard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2053,11 +2037,9 @@ type Canary struct { func (x *Canary) Reset() { *x = Canary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Canary) String() string { @@ -2068,7 +2050,7 @@ func (*Canary) ProtoMessage() {} func (x *Canary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2137,9 @@ type CanaryDeployment struct { func (x *CanaryDeployment) Reset() { *x = CanaryDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CanaryDeployment) String() string { @@ -2170,7 +2150,7 @@ func (*CanaryDeployment) ProtoMessage() {} func (x *CanaryDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2227,11 +2207,9 @@ type CustomCanaryDeployment struct { func (x *CustomCanaryDeployment) Reset() { *x = CustomCanaryDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomCanaryDeployment) String() string { @@ -2242,7 +2220,7 @@ func (*CustomCanaryDeployment) ProtoMessage() {} func (x *CustomCanaryDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2281,11 +2259,9 @@ type KubernetesConfig struct { func (x *KubernetesConfig) Reset() { *x = KubernetesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesConfig) String() string { @@ -2296,7 +2272,7 @@ func (*KubernetesConfig) ProtoMessage() {} func (x *KubernetesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2374,11 +2350,9 @@ type CloudRunConfig struct { func (x *CloudRunConfig) Reset() { *x = CloudRunConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunConfig) String() string { @@ -2389,7 +2363,7 @@ func (*CloudRunConfig) ProtoMessage() {} func (x *CloudRunConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2450,11 +2424,9 @@ type RuntimeConfig struct { func (x *RuntimeConfig) Reset() { *x = RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig) String() string { @@ -2465,7 +2437,7 @@ func (*RuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2537,11 +2509,9 @@ type PipelineReadyCondition struct { func (x *PipelineReadyCondition) Reset() { *x = PipelineReadyCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineReadyCondition) String() string { @@ -2552,7 +2522,7 @@ func (*PipelineReadyCondition) ProtoMessage() {} func (x *PipelineReadyCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2599,11 +2569,9 @@ type TargetsPresentCondition struct { func (x *TargetsPresentCondition) Reset() { *x = TargetsPresentCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetsPresentCondition) String() string { @@ -2614,7 +2582,7 @@ func (*TargetsPresentCondition) ProtoMessage() {} func (x *TargetsPresentCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2667,11 +2635,9 @@ type TargetsTypeCondition struct { func (x *TargetsTypeCondition) Reset() { *x = TargetsTypeCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetsTypeCondition) String() string { @@ -2682,7 +2648,7 @@ func (*TargetsTypeCondition) ProtoMessage() {} func (x *TargetsTypeCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2728,11 +2694,9 @@ type PipelineCondition struct { func (x *PipelineCondition) Reset() { *x = PipelineCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineCondition) String() string { @@ -2743,7 +2707,7 @@ func (*PipelineCondition) ProtoMessage() {} func (x *PipelineCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,11 +2772,9 @@ type ListDeliveryPipelinesRequest struct { func (x *ListDeliveryPipelinesRequest) Reset() { *x = ListDeliveryPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeliveryPipelinesRequest) String() string { @@ -2823,7 +2785,7 @@ func (*ListDeliveryPipelinesRequest) ProtoMessage() {} func (x *ListDeliveryPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2890,11 +2852,9 @@ type ListDeliveryPipelinesResponse struct { func (x *ListDeliveryPipelinesResponse) Reset() { *x = ListDeliveryPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeliveryPipelinesResponse) String() string { @@ -2905,7 +2865,7 @@ func (*ListDeliveryPipelinesResponse) ProtoMessage() {} func (x *ListDeliveryPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2954,11 +2914,9 @@ type GetDeliveryPipelineRequest struct { func (x *GetDeliveryPipelineRequest) Reset() { *x = GetDeliveryPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeliveryPipelineRequest) String() string { @@ -2969,7 +2927,7 @@ func (*GetDeliveryPipelineRequest) ProtoMessage() {} func (x *GetDeliveryPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,11 +2983,9 @@ type CreateDeliveryPipelineRequest struct { func (x *CreateDeliveryPipelineRequest) Reset() { *x = CreateDeliveryPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeliveryPipelineRequest) String() string { @@ -3040,7 +2996,7 @@ func (*CreateDeliveryPipelineRequest) ProtoMessage() {} func (x *CreateDeliveryPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3128,11 +3084,9 @@ type UpdateDeliveryPipelineRequest struct { func (x *UpdateDeliveryPipelineRequest) Reset() { *x = UpdateDeliveryPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeliveryPipelineRequest) String() string { @@ -3143,7 +3097,7 @@ func (*UpdateDeliveryPipelineRequest) ProtoMessage() {} func (x *UpdateDeliveryPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3234,11 +3188,9 @@ type DeleteDeliveryPipelineRequest struct { func (x *DeleteDeliveryPipelineRequest) Reset() { *x = DeleteDeliveryPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeliveryPipelineRequest) String() string { @@ -3249,7 +3201,7 @@ func (*DeleteDeliveryPipelineRequest) ProtoMessage() {} func (x *DeleteDeliveryPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3321,11 +3273,9 @@ type RollbackTargetConfig struct { func (x *RollbackTargetConfig) Reset() { *x = RollbackTargetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackTargetConfig) String() string { @@ -3336,7 +3286,7 @@ func (*RollbackTargetConfig) ProtoMessage() {} func (x *RollbackTargetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3398,11 +3348,9 @@ type RollbackTargetRequest struct { func (x *RollbackTargetRequest) Reset() { *x = RollbackTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackTargetRequest) String() string { @@ -3413,7 +3361,7 @@ func (*RollbackTargetRequest) ProtoMessage() {} func (x *RollbackTargetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3496,11 +3444,9 @@ type RollbackTargetResponse struct { func (x *RollbackTargetResponse) Reset() { *x = RollbackTargetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackTargetResponse) String() string { @@ -3511,7 +3457,7 @@ func (*RollbackTargetResponse) ProtoMessage() {} func (x *RollbackTargetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3613,11 +3559,9 @@ type Target struct { func (x *Target) Reset() { *x = Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target) String() string { @@ -3628,7 +3572,7 @@ func (*Target) ProtoMessage() {} func (x *Target) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3855,11 +3799,9 @@ type ExecutionConfig struct { func (x *ExecutionConfig) Reset() { *x = ExecutionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionConfig) String() string { @@ -3870,7 +3812,7 @@ func (*ExecutionConfig) ProtoMessage() {} func (x *ExecutionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3985,11 +3927,9 @@ type DefaultPool struct { func (x *DefaultPool) Reset() { *x = DefaultPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DefaultPool) String() string { @@ -4000,7 +3940,7 @@ func (*DefaultPool) ProtoMessage() {} func (x *DefaultPool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4051,11 +3991,9 @@ type PrivatePool struct { func (x *PrivatePool) Reset() { *x = PrivatePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePool) String() string { @@ -4066,7 +4004,7 @@ func (*PrivatePool) ProtoMessage() {} func (x *PrivatePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4132,11 +4070,9 @@ type GkeCluster struct { func (x *GkeCluster) Reset() { *x = GkeCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeCluster) String() string { @@ -4147,7 +4083,7 @@ func (*GkeCluster) ProtoMessage() {} func (x *GkeCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4204,11 +4140,9 @@ type AnthosCluster struct { func (x *AnthosCluster) Reset() { *x = AnthosCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnthosCluster) String() string { @@ -4219,7 +4153,7 @@ func (*AnthosCluster) ProtoMessage() {} func (x *AnthosCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4254,11 +4188,9 @@ type CloudRunLocation struct { func (x *CloudRunLocation) Reset() { *x = CloudRunLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunLocation) String() string { @@ -4269,7 +4201,7 @@ func (*CloudRunLocation) ProtoMessage() {} func (x *CloudRunLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4303,11 +4235,9 @@ type MultiTarget struct { func (x *MultiTarget) Reset() { *x = MultiTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiTarget) String() string { @@ -4318,7 +4248,7 @@ func (*MultiTarget) ProtoMessage() {} func (x *MultiTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4353,11 +4283,9 @@ type CustomTarget struct { func (x *CustomTarget) Reset() { *x = CustomTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTarget) String() string { @@ -4368,7 +4296,7 @@ func (*CustomTarget) ProtoMessage() {} func (x *CustomTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4404,11 +4332,9 @@ type AssociatedEntities struct { func (x *AssociatedEntities) Reset() { *x = AssociatedEntities{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssociatedEntities) String() string { @@ -4419,7 +4345,7 @@ func (*AssociatedEntities) ProtoMessage() {} func (x *AssociatedEntities) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4478,11 +4404,9 @@ type ListTargetsRequest struct { func (x *ListTargetsRequest) Reset() { *x = ListTargetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetsRequest) String() string { @@ -4493,7 +4417,7 @@ func (*ListTargetsRequest) ProtoMessage() {} func (x *ListTargetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4560,11 +4484,9 @@ type ListTargetsResponse struct { func (x *ListTargetsResponse) Reset() { *x = ListTargetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetsResponse) String() string { @@ -4575,7 +4497,7 @@ func (*ListTargetsResponse) ProtoMessage() {} func (x *ListTargetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4624,11 +4546,9 @@ type GetTargetRequest struct { func (x *GetTargetRequest) Reset() { *x = GetTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetRequest) String() string { @@ -4639,7 +4559,7 @@ func (*GetTargetRequest) ProtoMessage() {} func (x *GetTargetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4696,11 +4616,9 @@ type CreateTargetRequest struct { func (x *CreateTargetRequest) Reset() { *x = CreateTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetRequest) String() string { @@ -4711,7 +4629,7 @@ func (*CreateTargetRequest) ProtoMessage() {} func (x *CreateTargetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4799,11 +4717,9 @@ type UpdateTargetRequest struct { func (x *UpdateTargetRequest) Reset() { *x = UpdateTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetRequest) String() string { @@ -4814,7 +4730,7 @@ func (*UpdateTargetRequest) ProtoMessage() {} func (x *UpdateTargetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4901,11 +4817,9 @@ type DeleteTargetRequest struct { func (x *DeleteTargetRequest) Reset() { *x = DeleteTargetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetRequest) String() string { @@ -4916,7 +4830,7 @@ func (*DeleteTargetRequest) ProtoMessage() {} func (x *DeleteTargetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5023,11 +4937,9 @@ type CustomTargetType struct { func (x *CustomTargetType) Reset() { *x = CustomTargetType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTargetType) String() string { @@ -5038,7 +4950,7 @@ func (*CustomTargetType) ProtoMessage() {} func (x *CustomTargetType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5162,11 +5074,9 @@ type CustomTargetSkaffoldActions struct { func (x *CustomTargetSkaffoldActions) Reset() { *x = CustomTargetSkaffoldActions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTargetSkaffoldActions) String() string { @@ -5177,7 +5087,7 @@ func (*CustomTargetSkaffoldActions) ProtoMessage() {} func (x *CustomTargetSkaffoldActions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5233,11 +5143,9 @@ type SkaffoldModules struct { func (x *SkaffoldModules) Reset() { *x = SkaffoldModules{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkaffoldModules) String() string { @@ -5248,7 +5156,7 @@ func (*SkaffoldModules) ProtoMessage() {} func (x *SkaffoldModules) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5353,11 +5261,9 @@ type ListCustomTargetTypesRequest struct { func (x *ListCustomTargetTypesRequest) Reset() { *x = ListCustomTargetTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomTargetTypesRequest) String() string { @@ -5368,7 +5274,7 @@ func (*ListCustomTargetTypesRequest) ProtoMessage() {} func (x *ListCustomTargetTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5435,11 +5341,9 @@ type ListCustomTargetTypesResponse struct { func (x *ListCustomTargetTypesResponse) Reset() { *x = ListCustomTargetTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomTargetTypesResponse) String() string { @@ -5450,7 +5354,7 @@ func (*ListCustomTargetTypesResponse) ProtoMessage() {} func (x *ListCustomTargetTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5499,11 +5403,9 @@ type GetCustomTargetTypeRequest struct { func (x *GetCustomTargetTypeRequest) Reset() { *x = GetCustomTargetTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomTargetTypeRequest) String() string { @@ -5514,7 +5416,7 @@ func (*GetCustomTargetTypeRequest) ProtoMessage() {} func (x *GetCustomTargetTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5570,11 +5472,9 @@ type CreateCustomTargetTypeRequest struct { func (x *CreateCustomTargetTypeRequest) Reset() { *x = CreateCustomTargetTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomTargetTypeRequest) String() string { @@ -5585,7 +5485,7 @@ func (*CreateCustomTargetTypeRequest) ProtoMessage() {} func (x *CreateCustomTargetTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5673,11 +5573,9 @@ type UpdateCustomTargetTypeRequest struct { func (x *UpdateCustomTargetTypeRequest) Reset() { *x = UpdateCustomTargetTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomTargetTypeRequest) String() string { @@ -5688,7 +5586,7 @@ func (*UpdateCustomTargetTypeRequest) ProtoMessage() {} func (x *UpdateCustomTargetTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5775,11 +5673,9 @@ type DeleteCustomTargetTypeRequest struct { func (x *DeleteCustomTargetTypeRequest) Reset() { *x = DeleteCustomTargetTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomTargetTypeRequest) String() string { @@ -5790,7 +5686,7 @@ func (*DeleteCustomTargetTypeRequest) ProtoMessage() {} func (x *DeleteCustomTargetTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5910,11 +5806,9 @@ type DeployPolicy struct { func (x *DeployPolicy) Reset() { *x = DeployPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployPolicy) String() string { @@ -5925,7 +5819,7 @@ func (*DeployPolicy) ProtoMessage() {} func (x *DeployPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6035,11 +5929,9 @@ type DeployPolicyResourceSelector struct { func (x *DeployPolicyResourceSelector) Reset() { *x = DeployPolicyResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployPolicyResourceSelector) String() string { @@ -6050,7 +5942,7 @@ func (*DeployPolicyResourceSelector) ProtoMessage() {} func (x *DeployPolicyResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6097,11 +5989,9 @@ type DeliveryPipelineAttribute struct { func (x *DeliveryPipelineAttribute) Reset() { *x = DeliveryPipelineAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryPipelineAttribute) String() string { @@ -6112,7 +6002,7 @@ func (*DeliveryPipelineAttribute) ProtoMessage() {} func (x *DeliveryPipelineAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6160,11 +6050,9 @@ type TargetAttribute struct { func (x *TargetAttribute) Reset() { *x = TargetAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetAttribute) String() string { @@ -6175,7 +6063,7 @@ func (*TargetAttribute) ProtoMessage() {} func (x *TargetAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6218,11 +6106,9 @@ type PolicyRule struct { func (x *PolicyRule) Reset() { *x = PolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyRule) String() string { @@ -6233,7 +6119,7 @@ func (*PolicyRule) ProtoMessage() {} func (x *PolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6294,11 +6180,9 @@ type RolloutRestriction struct { func (x *RolloutRestriction) Reset() { *x = RolloutRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutRestriction) String() string { @@ -6309,7 +6193,7 @@ func (*RolloutRestriction) ProtoMessage() {} func (x *RolloutRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6371,11 +6255,9 @@ type TimeWindows struct { func (x *TimeWindows) Reset() { *x = TimeWindows{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindows) String() string { @@ -6386,7 +6268,7 @@ func (*TimeWindows) ProtoMessage() {} func (x *TimeWindows) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6441,11 +6323,9 @@ type OneTimeWindow struct { func (x *OneTimeWindow) Reset() { *x = OneTimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneTimeWindow) String() string { @@ -6456,7 +6336,7 @@ func (*OneTimeWindow) ProtoMessage() {} func (x *OneTimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6521,11 +6401,9 @@ type WeeklyWindow struct { func (x *WeeklyWindow) Reset() { *x = WeeklyWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyWindow) String() string { @@ -6536,7 +6414,7 @@ func (*WeeklyWindow) ProtoMessage() {} func (x *WeeklyWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6586,11 +6464,9 @@ type PolicyViolation struct { func (x *PolicyViolation) Reset() { *x = PolicyViolation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyViolation) String() string { @@ -6601,7 +6477,7 @@ func (*PolicyViolation) ProtoMessage() {} func (x *PolicyViolation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6642,11 +6518,9 @@ type PolicyViolationDetails struct { func (x *PolicyViolationDetails) Reset() { *x = PolicyViolationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyViolationDetails) String() string { @@ -6657,7 +6531,7 @@ func (*PolicyViolationDetails) ProtoMessage() {} func (x *PolicyViolationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6774,11 +6648,9 @@ type Release struct { func (x *Release) Reset() { *x = Release{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Release) String() string { @@ -6789,7 +6661,7 @@ func (*Release) ProtoMessage() {} func (x *Release) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6992,11 +6864,9 @@ type CreateDeployPolicyRequest struct { func (x *CreateDeployPolicyRequest) Reset() { *x = CreateDeployPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeployPolicyRequest) String() string { @@ -7007,7 +6877,7 @@ func (*CreateDeployPolicyRequest) ProtoMessage() {} func (x *CreateDeployPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7095,11 +6965,9 @@ type UpdateDeployPolicyRequest struct { func (x *UpdateDeployPolicyRequest) Reset() { *x = UpdateDeployPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeployPolicyRequest) String() string { @@ -7110,7 +6978,7 @@ func (*UpdateDeployPolicyRequest) ProtoMessage() {} func (x *UpdateDeployPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7197,11 +7065,9 @@ type DeleteDeployPolicyRequest struct { func (x *DeleteDeployPolicyRequest) Reset() { *x = DeleteDeployPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeployPolicyRequest) String() string { @@ -7212,7 +7078,7 @@ func (*DeleteDeployPolicyRequest) ProtoMessage() {} func (x *DeleteDeployPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7291,11 +7157,9 @@ type ListDeployPoliciesRequest struct { func (x *ListDeployPoliciesRequest) Reset() { *x = ListDeployPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeployPoliciesRequest) String() string { @@ -7306,7 +7170,7 @@ func (*ListDeployPoliciesRequest) ProtoMessage() {} func (x *ListDeployPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7373,11 +7237,9 @@ type ListDeployPoliciesResponse struct { func (x *ListDeployPoliciesResponse) Reset() { *x = ListDeployPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeployPoliciesResponse) String() string { @@ -7388,7 +7250,7 @@ func (*ListDeployPoliciesResponse) ProtoMessage() {} func (x *ListDeployPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7437,11 +7299,9 @@ type GetDeployPolicyRequest struct { func (x *GetDeployPolicyRequest) Reset() { *x = GetDeployPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeployPolicyRequest) String() string { @@ -7452,7 +7312,7 @@ func (*GetDeployPolicyRequest) ProtoMessage() {} func (x *GetDeployPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7490,11 +7350,9 @@ type BuildArtifact struct { func (x *BuildArtifact) Reset() { *x = BuildArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildArtifact) String() string { @@ -7505,7 +7363,7 @@ func (*BuildArtifact) ProtoMessage() {} func (x *BuildArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7555,11 +7413,9 @@ type TargetArtifact struct { func (x *TargetArtifact) Reset() { *x = TargetArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetArtifact) String() string { @@ -7570,7 +7426,7 @@ func (*TargetArtifact) ProtoMessage() {} func (x *TargetArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7649,11 +7505,9 @@ type DeployArtifact struct { func (x *DeployArtifact) Reset() { *x = DeployArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployArtifact) String() string { @@ -7664,7 +7518,7 @@ func (*DeployArtifact) ProtoMessage() {} func (x *DeployArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7707,11 +7561,9 @@ type CloudRunRenderMetadata struct { func (x *CloudRunRenderMetadata) Reset() { *x = CloudRunRenderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunRenderMetadata) String() string { @@ -7722,7 +7574,7 @@ func (*CloudRunRenderMetadata) ProtoMessage() {} func (x *CloudRunRenderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7758,11 +7610,9 @@ type RenderMetadata struct { func (x *RenderMetadata) Reset() { *x = RenderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenderMetadata) String() string { @@ -7773,7 +7623,7 @@ func (*RenderMetadata) ProtoMessage() {} func (x *RenderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7832,11 +7682,9 @@ type ListReleasesRequest struct { func (x *ListReleasesRequest) Reset() { *x = ListReleasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReleasesRequest) String() string { @@ -7847,7 +7695,7 @@ func (*ListReleasesRequest) ProtoMessage() {} func (x *ListReleasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7914,11 +7762,9 @@ type ListReleasesResponse struct { func (x *ListReleasesResponse) Reset() { *x = ListReleasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReleasesResponse) String() string { @@ -7929,7 +7775,7 @@ func (*ListReleasesResponse) ProtoMessage() {} func (x *ListReleasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7978,11 +7824,9 @@ type GetReleaseRequest struct { func (x *GetReleaseRequest) Reset() { *x = GetReleaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReleaseRequest) String() string { @@ -7993,7 +7837,7 @@ func (*GetReleaseRequest) ProtoMessage() {} func (x *GetReleaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8053,11 +7897,9 @@ type CreateReleaseRequest struct { func (x *CreateReleaseRequest) Reset() { *x = CreateReleaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReleaseRequest) String() string { @@ -8068,7 +7910,7 @@ func (*CreateReleaseRequest) ProtoMessage() {} func (x *CreateReleaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8206,11 +8048,9 @@ type Rollout struct { func (x *Rollout) Reset() { *x = Rollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rollout) String() string { @@ -8221,7 +8061,7 @@ func (*Rollout) ProtoMessage() {} func (x *Rollout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8415,11 +8255,9 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -8430,7 +8268,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8484,11 +8322,9 @@ type DeployJobRunMetadata struct { func (x *DeployJobRunMetadata) Reset() { *x = DeployJobRunMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployJobRunMetadata) String() string { @@ -8499,7 +8335,7 @@ func (*DeployJobRunMetadata) ProtoMessage() {} func (x *DeployJobRunMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8558,11 +8394,9 @@ type CloudRunMetadata struct { func (x *CloudRunMetadata) Reset() { *x = CloudRunMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunMetadata) String() string { @@ -8573,7 +8407,7 @@ func (*CloudRunMetadata) ProtoMessage() {} func (x *CloudRunMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8630,11 +8464,9 @@ type CustomTargetDeployMetadata struct { func (x *CustomTargetDeployMetadata) Reset() { *x = CustomTargetDeployMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTargetDeployMetadata) String() string { @@ -8645,7 +8477,7 @@ func (*CustomTargetDeployMetadata) ProtoMessage() {} func (x *CustomTargetDeployMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8687,11 +8519,9 @@ type AutomationRolloutMetadata struct { func (x *AutomationRolloutMetadata) Reset() { *x = AutomationRolloutMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationRolloutMetadata) String() string { @@ -8702,7 +8532,7 @@ func (*AutomationRolloutMetadata) ProtoMessage() {} func (x *AutomationRolloutMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8750,11 +8580,9 @@ type CustomMetadata struct { func (x *CustomMetadata) Reset() { *x = CustomMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomMetadata) String() string { @@ -8765,7 +8593,7 @@ func (*CustomMetadata) ProtoMessage() {} func (x *CustomMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8812,11 +8640,9 @@ type Phase struct { func (x *Phase) Reset() { *x = Phase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Phase) String() string { @@ -8827,7 +8653,7 @@ func (*Phase) ProtoMessage() {} func (x *Phase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8920,11 +8746,9 @@ type DeploymentJobs struct { func (x *DeploymentJobs) Reset() { *x = DeploymentJobs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeploymentJobs) String() string { @@ -8935,7 +8759,7 @@ func (*DeploymentJobs) ProtoMessage() {} func (x *DeploymentJobs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8992,11 +8816,9 @@ type ChildRolloutJobs struct { func (x *ChildRolloutJobs) Reset() { *x = ChildRolloutJobs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChildRolloutJobs) String() string { @@ -9007,7 +8829,7 @@ func (*ChildRolloutJobs) ProtoMessage() {} func (x *ChildRolloutJobs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9067,11 +8889,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -9082,7 +8902,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9229,11 +9049,9 @@ type DeployJob struct { func (x *DeployJob) Reset() { *x = DeployJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployJob) String() string { @@ -9244,7 +9062,7 @@ func (*DeployJob) ProtoMessage() {} func (x *DeployJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9268,11 +9086,9 @@ type VerifyJob struct { func (x *VerifyJob) Reset() { *x = VerifyJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyJob) String() string { @@ -9283,7 +9099,7 @@ func (*VerifyJob) ProtoMessage() {} func (x *VerifyJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9310,11 +9126,9 @@ type PredeployJob struct { func (x *PredeployJob) Reset() { *x = PredeployJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredeployJob) String() string { @@ -9325,7 +9139,7 @@ func (*PredeployJob) ProtoMessage() {} func (x *PredeployJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9359,11 +9173,9 @@ type PostdeployJob struct { func (x *PostdeployJob) Reset() { *x = PostdeployJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostdeployJob) String() string { @@ -9374,7 +9186,7 @@ func (*PostdeployJob) ProtoMessage() {} func (x *PostdeployJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9405,11 +9217,9 @@ type CreateChildRolloutJob struct { func (x *CreateChildRolloutJob) Reset() { *x = CreateChildRolloutJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChildRolloutJob) String() string { @@ -9420,7 +9230,7 @@ func (*CreateChildRolloutJob) ProtoMessage() {} func (x *CreateChildRolloutJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9444,11 +9254,9 @@ type AdvanceChildRolloutJob struct { func (x *AdvanceChildRolloutJob) Reset() { *x = AdvanceChildRolloutJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceChildRolloutJob) String() string { @@ -9459,7 +9267,7 @@ func (*AdvanceChildRolloutJob) ProtoMessage() {} func (x *AdvanceChildRolloutJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9503,11 +9311,9 @@ type ListRolloutsRequest struct { func (x *ListRolloutsRequest) Reset() { *x = ListRolloutsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRolloutsRequest) String() string { @@ -9518,7 +9324,7 @@ func (*ListRolloutsRequest) ProtoMessage() {} func (x *ListRolloutsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9585,11 +9391,9 @@ type ListRolloutsResponse struct { func (x *ListRolloutsResponse) Reset() { *x = ListRolloutsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRolloutsResponse) String() string { @@ -9600,7 +9404,7 @@ func (*ListRolloutsResponse) ProtoMessage() {} func (x *ListRolloutsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9649,11 +9453,9 @@ type GetRolloutRequest struct { func (x *GetRolloutRequest) Reset() { *x = GetRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRolloutRequest) String() string { @@ -9664,7 +9466,7 @@ func (*GetRolloutRequest) ProtoMessage() {} func (x *GetRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9727,11 +9529,9 @@ type CreateRolloutRequest struct { func (x *CreateRolloutRequest) Reset() { *x = CreateRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRolloutRequest) String() string { @@ -9742,7 +9542,7 @@ func (*CreateRolloutRequest) ProtoMessage() {} func (x *CreateRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9835,11 +9635,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -9850,7 +9648,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9932,11 +9730,9 @@ type ApproveRolloutRequest struct { func (x *ApproveRolloutRequest) Reset() { *x = ApproveRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveRolloutRequest) String() string { @@ -9947,7 +9743,7 @@ func (*ApproveRolloutRequest) ProtoMessage() {} func (x *ApproveRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9992,11 +9788,9 @@ type ApproveRolloutResponse struct { func (x *ApproveRolloutResponse) Reset() { *x = ApproveRolloutResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveRolloutResponse) String() string { @@ -10007,7 +9801,7 @@ func (*ApproveRolloutResponse) ProtoMessage() {} func (x *ApproveRolloutResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10040,11 +9834,9 @@ type AdvanceRolloutRequest struct { func (x *AdvanceRolloutRequest) Reset() { *x = AdvanceRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceRolloutRequest) String() string { @@ -10055,7 +9847,7 @@ func (*AdvanceRolloutRequest) ProtoMessage() {} func (x *AdvanceRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10100,11 +9892,9 @@ type AdvanceRolloutResponse struct { func (x *AdvanceRolloutResponse) Reset() { *x = AdvanceRolloutResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceRolloutResponse) String() string { @@ -10115,7 +9905,7 @@ func (*AdvanceRolloutResponse) ProtoMessage() {} func (x *AdvanceRolloutResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10146,11 +9936,9 @@ type CancelRolloutRequest struct { func (x *CancelRolloutRequest) Reset() { *x = CancelRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelRolloutRequest) String() string { @@ -10161,7 +9949,7 @@ func (*CancelRolloutRequest) ProtoMessage() {} func (x *CancelRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10199,11 +9987,9 @@ type CancelRolloutResponse struct { func (x *CancelRolloutResponse) Reset() { *x = CancelRolloutResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelRolloutResponse) String() string { @@ -10214,7 +10000,7 @@ func (*CancelRolloutResponse) ProtoMessage() {} func (x *CancelRolloutResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10249,11 +10035,9 @@ type IgnoreJobRequest struct { func (x *IgnoreJobRequest) Reset() { *x = IgnoreJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IgnoreJobRequest) String() string { @@ -10264,7 +10048,7 @@ func (*IgnoreJobRequest) ProtoMessage() {} func (x *IgnoreJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10316,11 +10100,9 @@ type IgnoreJobResponse struct { func (x *IgnoreJobResponse) Reset() { *x = IgnoreJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IgnoreJobResponse) String() string { @@ -10331,7 +10113,7 @@ func (*IgnoreJobResponse) ProtoMessage() {} func (x *IgnoreJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10366,11 +10148,9 @@ type RetryJobRequest struct { func (x *RetryJobRequest) Reset() { *x = RetryJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryJobRequest) String() string { @@ -10381,7 +10161,7 @@ func (*RetryJobRequest) ProtoMessage() {} func (x *RetryJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10433,11 +10213,9 @@ type RetryJobResponse struct { func (x *RetryJobResponse) Reset() { *x = RetryJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryJobResponse) String() string { @@ -10448,7 +10226,7 @@ func (*RetryJobResponse) ProtoMessage() {} func (x *RetryJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10476,11 +10254,9 @@ type AbandonReleaseRequest struct { func (x *AbandonReleaseRequest) Reset() { *x = AbandonReleaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AbandonReleaseRequest) String() string { @@ -10491,7 +10267,7 @@ func (*AbandonReleaseRequest) ProtoMessage() {} func (x *AbandonReleaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10522,11 +10298,9 @@ type AbandonReleaseResponse struct { func (x *AbandonReleaseResponse) Reset() { *x = AbandonReleaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AbandonReleaseResponse) String() string { @@ -10537,7 +10311,7 @@ func (*AbandonReleaseResponse) ProtoMessage() {} func (x *AbandonReleaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10596,11 +10370,9 @@ type JobRun struct { func (x *JobRun) Reset() { *x = JobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobRun) String() string { @@ -10611,7 +10383,7 @@ func (*JobRun) ProtoMessage() {} func (x *JobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10807,11 +10579,9 @@ type DeployJobRun struct { func (x *DeployJobRun) Reset() { *x = DeployJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployJobRun) String() string { @@ -10822,7 +10592,7 @@ func (*DeployJobRun) ProtoMessage() {} func (x *DeployJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10897,11 +10667,9 @@ type VerifyJobRun struct { func (x *VerifyJobRun) Reset() { *x = VerifyJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyJobRun) String() string { @@ -10912,7 +10680,7 @@ func (*VerifyJobRun) ProtoMessage() {} func (x *VerifyJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10982,11 +10750,9 @@ type PredeployJobRun struct { func (x *PredeployJobRun) Reset() { *x = PredeployJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredeployJobRun) String() string { @@ -10997,7 +10763,7 @@ func (*PredeployJobRun) ProtoMessage() {} func (x *PredeployJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11053,11 +10819,9 @@ type PostdeployJobRun struct { func (x *PostdeployJobRun) Reset() { *x = PostdeployJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostdeployJobRun) String() string { @@ -11068,7 +10832,7 @@ func (*PostdeployJobRun) ProtoMessage() {} func (x *PostdeployJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11120,11 +10884,9 @@ type CreateChildRolloutJobRun struct { func (x *CreateChildRolloutJobRun) Reset() { *x = CreateChildRolloutJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChildRolloutJobRun) String() string { @@ -11135,7 +10897,7 @@ func (*CreateChildRolloutJobRun) ProtoMessage() {} func (x *CreateChildRolloutJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11180,11 +10942,9 @@ type AdvanceChildRolloutJobRun struct { func (x *AdvanceChildRolloutJobRun) Reset() { *x = AdvanceChildRolloutJobRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceChildRolloutJobRun) String() string { @@ -11195,7 +10955,7 @@ func (*AdvanceChildRolloutJobRun) ProtoMessage() {} func (x *AdvanceChildRolloutJobRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11253,11 +11013,9 @@ type ListJobRunsRequest struct { func (x *ListJobRunsRequest) Reset() { *x = ListJobRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobRunsRequest) String() string { @@ -11268,7 +11026,7 @@ func (*ListJobRunsRequest) ProtoMessage() {} func (x *ListJobRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11335,11 +11093,9 @@ type ListJobRunsResponse struct { func (x *ListJobRunsResponse) Reset() { *x = ListJobRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobRunsResponse) String() string { @@ -11350,7 +11106,7 @@ func (*ListJobRunsResponse) ProtoMessage() {} func (x *ListJobRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11399,11 +11155,9 @@ type GetJobRunRequest struct { func (x *GetJobRunRequest) Reset() { *x = GetJobRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRunRequest) String() string { @@ -11414,7 +11168,7 @@ func (*GetJobRunRequest) ProtoMessage() {} func (x *GetJobRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11452,11 +11206,9 @@ type TerminateJobRunRequest struct { func (x *TerminateJobRunRequest) Reset() { *x = TerminateJobRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminateJobRunRequest) String() string { @@ -11467,7 +11219,7 @@ func (*TerminateJobRunRequest) ProtoMessage() {} func (x *TerminateJobRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11505,11 +11257,9 @@ type TerminateJobRunResponse struct { func (x *TerminateJobRunResponse) Reset() { *x = TerminateJobRunResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminateJobRunResponse) String() string { @@ -11520,7 +11270,7 @@ func (*TerminateJobRunResponse) ProtoMessage() {} func (x *TerminateJobRunResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11552,11 +11302,9 @@ type Config struct { func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -11567,7 +11315,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11621,11 +11369,9 @@ type SkaffoldVersion struct { func (x *SkaffoldVersion) Reset() { *x = SkaffoldVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkaffoldVersion) String() string { @@ -11636,7 +11382,7 @@ func (*SkaffoldVersion) ProtoMessage() {} func (x *SkaffoldVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11691,11 +11437,9 @@ type GetConfigRequest struct { func (x *GetConfigRequest) Reset() { *x = GetConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConfigRequest) String() string { @@ -11706,7 +11450,7 @@ func (*GetConfigRequest) ProtoMessage() {} func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11802,11 +11546,9 @@ type Automation struct { func (x *Automation) Reset() { *x = Automation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Automation) String() string { @@ -11817,7 +11559,7 @@ func (*Automation) ProtoMessage() {} func (x *Automation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11929,11 +11671,9 @@ type AutomationResourceSelector struct { func (x *AutomationResourceSelector) Reset() { *x = AutomationResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationResourceSelector) String() string { @@ -11944,7 +11684,7 @@ func (*AutomationResourceSelector) ProtoMessage() {} func (x *AutomationResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11985,11 +11725,9 @@ type AutomationRule struct { func (x *AutomationRule) Reset() { *x = AutomationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationRule) String() string { @@ -12000,7 +11738,7 @@ func (*AutomationRule) ProtoMessage() {} func (x *AutomationRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12120,11 +11858,9 @@ type TimedPromoteReleaseRule struct { func (x *TimedPromoteReleaseRule) Reset() { *x = TimedPromoteReleaseRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimedPromoteReleaseRule) String() string { @@ -12135,7 +11871,7 @@ func (*TimedPromoteReleaseRule) ProtoMessage() {} func (x *TimedPromoteReleaseRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12222,11 +11958,9 @@ type PromoteReleaseRule struct { func (x *PromoteReleaseRule) Reset() { *x = PromoteReleaseRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteReleaseRule) String() string { @@ -12237,7 +11971,7 @@ func (*PromoteReleaseRule) ProtoMessage() {} func (x *PromoteReleaseRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12312,11 +12046,9 @@ type AdvanceRolloutRule struct { func (x *AdvanceRolloutRule) Reset() { *x = AdvanceRolloutRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceRolloutRule) String() string { @@ -12327,7 +12059,7 @@ func (*AdvanceRolloutRule) ProtoMessage() {} func (x *AdvanceRolloutRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12404,11 +12136,9 @@ type RepairRolloutRule struct { func (x *RepairRolloutRule) Reset() { *x = RepairRolloutRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairRolloutRule) String() string { @@ -12419,7 +12149,7 @@ func (*RepairRolloutRule) ProtoMessage() {} func (x *RepairRolloutRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12486,11 +12216,9 @@ type RepairPhaseConfig struct { func (x *RepairPhaseConfig) Reset() { *x = RepairPhaseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairPhaseConfig) String() string { @@ -12501,7 +12229,7 @@ func (*RepairPhaseConfig) ProtoMessage() {} func (x *RepairPhaseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12574,11 +12302,9 @@ type Retry struct { func (x *Retry) Reset() { *x = Retry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Retry) String() string { @@ -12589,7 +12315,7 @@ func (*Retry) ProtoMessage() {} func (x *Retry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12641,11 +12367,9 @@ type Rollback struct { func (x *Rollback) Reset() { *x = Rollback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rollback) String() string { @@ -12656,7 +12380,7 @@ func (*Rollback) ProtoMessage() {} func (x *Rollback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12704,11 +12428,9 @@ type AutomationRuleCondition struct { func (x *AutomationRuleCondition) Reset() { *x = AutomationRuleCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationRuleCondition) String() string { @@ -12719,7 +12441,7 @@ func (*AutomationRuleCondition) ProtoMessage() {} func (x *AutomationRuleCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12783,11 +12505,9 @@ type TimedPromoteReleaseCondition struct { func (x *TimedPromoteReleaseCondition) Reset() { *x = TimedPromoteReleaseCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimedPromoteReleaseCondition) String() string { @@ -12798,7 +12518,7 @@ func (*TimedPromoteReleaseCondition) ProtoMessage() {} func (x *TimedPromoteReleaseCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12862,11 +12582,9 @@ type CreateAutomationRequest struct { func (x *CreateAutomationRequest) Reset() { *x = CreateAutomationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAutomationRequest) String() string { @@ -12877,7 +12595,7 @@ func (*CreateAutomationRequest) ProtoMessage() {} func (x *CreateAutomationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12965,11 +12683,9 @@ type UpdateAutomationRequest struct { func (x *UpdateAutomationRequest) Reset() { *x = UpdateAutomationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAutomationRequest) String() string { @@ -12980,7 +12696,7 @@ func (*UpdateAutomationRequest) ProtoMessage() {} func (x *UpdateAutomationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13068,11 +12784,9 @@ type DeleteAutomationRequest struct { func (x *DeleteAutomationRequest) Reset() { *x = DeleteAutomationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAutomationRequest) String() string { @@ -13083,7 +12797,7 @@ func (*DeleteAutomationRequest) ProtoMessage() {} func (x *DeleteAutomationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13163,11 +12877,9 @@ type ListAutomationsRequest struct { func (x *ListAutomationsRequest) Reset() { *x = ListAutomationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutomationsRequest) String() string { @@ -13178,7 +12890,7 @@ func (*ListAutomationsRequest) ProtoMessage() {} func (x *ListAutomationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13245,11 +12957,9 @@ type ListAutomationsResponse struct { func (x *ListAutomationsResponse) Reset() { *x = ListAutomationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutomationsResponse) String() string { @@ -13260,7 +12970,7 @@ func (*ListAutomationsResponse) ProtoMessage() {} func (x *ListAutomationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13309,11 +13019,9 @@ type GetAutomationRequest struct { func (x *GetAutomationRequest) Reset() { *x = GetAutomationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutomationRequest) String() string { @@ -13324,7 +13032,7 @@ func (*GetAutomationRequest) ProtoMessage() {} func (x *GetAutomationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13408,11 +13116,9 @@ type AutomationRun struct { func (x *AutomationRun) Reset() { *x = AutomationRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomationRun) String() string { @@ -13423,7 +13129,7 @@ func (*AutomationRun) ProtoMessage() {} func (x *AutomationRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13624,11 +13330,9 @@ type PromoteReleaseOperation struct { func (x *PromoteReleaseOperation) Reset() { *x = PromoteReleaseOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromoteReleaseOperation) String() string { @@ -13639,7 +13343,7 @@ func (*PromoteReleaseOperation) ProtoMessage() {} func (x *PromoteReleaseOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13700,11 +13404,9 @@ type AdvanceRolloutOperation struct { func (x *AdvanceRolloutOperation) Reset() { *x = AdvanceRolloutOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvanceRolloutOperation) String() string { @@ -13715,7 +13417,7 @@ func (*AdvanceRolloutOperation) ProtoMessage() {} func (x *AdvanceRolloutOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13780,11 +13482,9 @@ type RepairRolloutOperation struct { func (x *RepairRolloutOperation) Reset() { *x = RepairRolloutOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairRolloutOperation) String() string { @@ -13795,7 +13495,7 @@ func (*RepairRolloutOperation) ProtoMessage() {} func (x *RepairRolloutOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13863,11 +13563,9 @@ type TimedPromoteReleaseOperation struct { func (x *TimedPromoteReleaseOperation) Reset() { *x = TimedPromoteReleaseOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimedPromoteReleaseOperation) String() string { @@ -13878,7 +13576,7 @@ func (*TimedPromoteReleaseOperation) ProtoMessage() {} func (x *TimedPromoteReleaseOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13932,11 +13630,9 @@ type RepairPhase struct { func (x *RepairPhase) Reset() { *x = RepairPhase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairPhase) String() string { @@ -13947,7 +13643,7 @@ func (*RepairPhase) ProtoMessage() {} func (x *RepairPhase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14019,11 +13715,9 @@ type RetryPhase struct { func (x *RetryPhase) Reset() { *x = RetryPhase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryPhase) String() string { @@ -14034,7 +13728,7 @@ func (*RetryPhase) ProtoMessage() {} func (x *RetryPhase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14088,11 +13782,9 @@ type RetryAttempt struct { func (x *RetryAttempt) Reset() { *x = RetryAttempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryAttempt) String() string { @@ -14103,7 +13795,7 @@ func (*RetryAttempt) ProtoMessage() {} func (x *RetryAttempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14166,11 +13858,9 @@ type RollbackAttempt struct { func (x *RollbackAttempt) Reset() { *x = RollbackAttempt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackAttempt) String() string { @@ -14181,7 +13871,7 @@ func (*RollbackAttempt) ProtoMessage() {} func (x *RollbackAttempt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14261,11 +13951,9 @@ type ListAutomationRunsRequest struct { func (x *ListAutomationRunsRequest) Reset() { *x = ListAutomationRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutomationRunsRequest) String() string { @@ -14276,7 +13964,7 @@ func (*ListAutomationRunsRequest) ProtoMessage() {} func (x *ListAutomationRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14343,11 +14031,9 @@ type ListAutomationRunsResponse struct { func (x *ListAutomationRunsResponse) Reset() { *x = ListAutomationRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutomationRunsResponse) String() string { @@ -14358,7 +14044,7 @@ func (*ListAutomationRunsResponse) ProtoMessage() {} func (x *ListAutomationRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14407,11 +14093,9 @@ type GetAutomationRunRequest struct { func (x *GetAutomationRunRequest) Reset() { *x = GetAutomationRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutomationRunRequest) String() string { @@ -14422,7 +14106,7 @@ func (*GetAutomationRunRequest) ProtoMessage() {} func (x *GetAutomationRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14457,11 +14141,9 @@ type CancelAutomationRunRequest struct { func (x *CancelAutomationRunRequest) Reset() { *x = CancelAutomationRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelAutomationRunRequest) String() string { @@ -14472,7 +14154,7 @@ func (*CancelAutomationRunRequest) ProtoMessage() {} func (x *CancelAutomationRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14503,11 +14185,9 @@ type CancelAutomationRunResponse struct { func (x *CancelAutomationRunResponse) Reset() { *x = CancelAutomationRunResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelAutomationRunResponse) String() string { @@ -14518,7 +14198,7 @@ func (*CancelAutomationRunResponse) ProtoMessage() {} func (x *CancelAutomationRunResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14564,11 +14244,9 @@ type CustomCanaryDeployment_PhaseConfig struct { func (x *CustomCanaryDeployment_PhaseConfig) Reset() { *x = CustomCanaryDeployment_PhaseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomCanaryDeployment_PhaseConfig) String() string { @@ -14579,7 +14257,7 @@ func (*CustomCanaryDeployment_PhaseConfig) ProtoMessage() {} func (x *CustomCanaryDeployment_PhaseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14671,11 +14349,9 @@ type KubernetesConfig_GatewayServiceMesh struct { func (x *KubernetesConfig_GatewayServiceMesh) Reset() { *x = KubernetesConfig_GatewayServiceMesh{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesConfig_GatewayServiceMesh) String() string { @@ -14686,7 +14362,7 @@ func (*KubernetesConfig_GatewayServiceMesh) ProtoMessage() {} func (x *KubernetesConfig_GatewayServiceMesh) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14773,11 +14449,9 @@ type KubernetesConfig_ServiceNetworking struct { func (x *KubernetesConfig_ServiceNetworking) Reset() { *x = KubernetesConfig_ServiceNetworking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesConfig_ServiceNetworking) String() string { @@ -14788,7 +14462,7 @@ func (*KubernetesConfig_ServiceNetworking) ProtoMessage() {} func (x *KubernetesConfig_ServiceNetworking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14852,11 +14526,9 @@ type KubernetesConfig_GatewayServiceMesh_RouteDestinations struct { func (x *KubernetesConfig_GatewayServiceMesh_RouteDestinations) Reset() { *x = KubernetesConfig_GatewayServiceMesh_RouteDestinations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesConfig_GatewayServiceMesh_RouteDestinations) String() string { @@ -14867,7 +14539,7 @@ func (*KubernetesConfig_GatewayServiceMesh_RouteDestinations) ProtoMessage() {} func (x *KubernetesConfig_GatewayServiceMesh_RouteDestinations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14912,11 +14584,9 @@ type SkaffoldModules_SkaffoldGitSource struct { func (x *SkaffoldModules_SkaffoldGitSource) Reset() { *x = SkaffoldModules_SkaffoldGitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkaffoldModules_SkaffoldGitSource) String() string { @@ -14927,7 +14597,7 @@ func (*SkaffoldModules_SkaffoldGitSource) ProtoMessage() {} func (x *SkaffoldModules_SkaffoldGitSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14979,11 +14649,9 @@ type SkaffoldModules_SkaffoldGCSSource struct { func (x *SkaffoldModules_SkaffoldGCSSource) Reset() { *x = SkaffoldModules_SkaffoldGCSSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkaffoldModules_SkaffoldGCSSource) String() string { @@ -14994,7 +14662,7 @@ func (*SkaffoldModules_SkaffoldGCSSource) ProtoMessage() {} func (x *SkaffoldModules_SkaffoldGCSSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15042,11 +14710,9 @@ type SkaffoldModules_SkaffoldGCBRepoSource struct { func (x *SkaffoldModules_SkaffoldGCBRepoSource) Reset() { *x = SkaffoldModules_SkaffoldGCBRepoSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkaffoldModules_SkaffoldGCBRepoSource) String() string { @@ -15057,7 +14723,7 @@ func (*SkaffoldModules_SkaffoldGCBRepoSource) ProtoMessage() {} func (x *SkaffoldModules_SkaffoldGCBRepoSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15117,11 +14783,9 @@ type Release_TargetRender struct { func (x *Release_TargetRender) Reset() { *x = Release_TargetRender{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Release_TargetRender) String() string { @@ -15132,7 +14796,7 @@ func (*Release_TargetRender) ProtoMessage() {} func (x *Release_TargetRender) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15199,11 +14863,9 @@ type Release_ReleaseReadyCondition struct { func (x *Release_ReleaseReadyCondition) Reset() { *x = Release_ReleaseReadyCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Release_ReleaseReadyCondition) String() string { @@ -15214,7 +14876,7 @@ func (*Release_ReleaseReadyCondition) ProtoMessage() {} func (x *Release_ReleaseReadyCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15257,11 +14919,9 @@ type Release_SkaffoldSupportedCondition struct { func (x *Release_SkaffoldSupportedCondition) Reset() { *x = Release_SkaffoldSupportedCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Release_SkaffoldSupportedCondition) String() string { @@ -15272,7 +14932,7 @@ func (*Release_SkaffoldSupportedCondition) ProtoMessage() {} func (x *Release_SkaffoldSupportedCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15330,11 +14990,9 @@ type Release_ReleaseCondition struct { func (x *Release_ReleaseCondition) Reset() { *x = Release_ReleaseCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Release_ReleaseCondition) String() string { @@ -15345,7 +15003,7 @@ func (*Release_ReleaseCondition) ProtoMessage() {} func (x *Release_ReleaseCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15392,11 +15050,9 @@ type TargetArtifact_PhaseArtifact struct { func (x *TargetArtifact_PhaseArtifact) Reset() { *x = TargetArtifact_PhaseArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetArtifact_PhaseArtifact) String() string { @@ -15407,7 +15063,7 @@ func (*TargetArtifact_PhaseArtifact) ProtoMessage() {} func (x *TargetArtifact_PhaseArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15457,11 +15113,9 @@ type TimedPromoteReleaseCondition_Targets struct { func (x *TimedPromoteReleaseCondition_Targets) Reset() { *x = TimedPromoteReleaseCondition_Targets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[197] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimedPromoteReleaseCondition_Targets) String() string { @@ -15472,7 +15126,7 @@ func (*TimedPromoteReleaseCondition_Targets) ProtoMessage() {} func (x *TimedPromoteReleaseCondition_Targets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[197] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19722,2084 +19376,6 @@ func file_google_cloud_deploy_v1_cloud_deploy_proto_init() { if File_google_cloud_deploy_v1_cloud_deploy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryPipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SerialPipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Stage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeployParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Strategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Predeploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Postdeploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Standard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Canary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CanaryDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CustomCanaryDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PipelineReadyCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*TargetsPresentCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TargetsTypeCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PipelineCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDeliveryPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDeliveryPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetDeliveryPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeliveryPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeliveryPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeliveryPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RollbackTargetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RollbackTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RollbackTargetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DefaultPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GkeCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AnthosCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*MultiTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CustomTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AssociatedEntities); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*CustomTargetType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CustomTargetSkaffoldActions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*SkaffoldModules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomTargetTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomTargetTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomTargetTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomTargetTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomTargetTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomTargetTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DeployPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*DeployPolicyResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryPipelineAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*TargetAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*PolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*RolloutRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindows); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*OneTimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*PolicyViolation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*PolicyViolationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*Release); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeployPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeployPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeployPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*ListDeployPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ListDeployPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*GetDeployPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*BuildArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*TargetArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*DeployArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunRenderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*RenderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListReleasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*ListReleasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*GetReleaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*CreateReleaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*Rollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*DeployJobRunMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*CustomTargetDeployMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*AutomationRolloutMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*CustomMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*Phase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*DeploymentJobs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ChildRolloutJobs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*DeployJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*VerifyJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*PredeployJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*PostdeployJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*CreateChildRolloutJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceChildRolloutJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*ListRolloutsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*ListRolloutsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*GetRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*CreateRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*ApproveRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ApproveRolloutResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceRolloutResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*CancelRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*CancelRolloutResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*IgnoreJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*IgnoreJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*RetryJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*RetryJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*AbandonReleaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*AbandonReleaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*JobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*DeployJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*VerifyJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*PredeployJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*PostdeployJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*CreateChildRolloutJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceChildRolloutJobRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*ListJobRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*ListJobRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*TerminateJobRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*TerminateJobRunResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*SkaffoldVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*GetConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*Automation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*AutomationResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*AutomationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*TimedPromoteReleaseRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*PromoteReleaseRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceRolloutRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*RepairRolloutRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*RepairPhaseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*Retry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*Rollback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*AutomationRuleCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*TimedPromoteReleaseCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*CreateAutomationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAutomationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAutomationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*ListAutomationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*ListAutomationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*GetAutomationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*AutomationRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*PromoteReleaseOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*AdvanceRolloutOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*RepairRolloutOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*TimedPromoteReleaseOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*RepairPhase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*RetryPhase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*RetryAttempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*RollbackAttempt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*ListAutomationRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*ListAutomationRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*GetAutomationRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*CancelAutomationRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*CancelAutomationRunResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*CustomCanaryDeployment_PhaseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesConfig_GatewayServiceMesh); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesConfig_ServiceNetworking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesConfig_GatewayServiceMesh_RouteDestinations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*SkaffoldModules_SkaffoldGitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*SkaffoldModules_SkaffoldGCSSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[176].Exporter = func(v any, i int) any { - switch v := v.(*SkaffoldModules_SkaffoldGCBRepoSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*Release_TargetRender); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*Release_ReleaseReadyCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[183].Exporter = func(v any, i int) any { - switch v := v.(*Release_SkaffoldSupportedCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[184].Exporter = func(v any, i int) any { - switch v := v.(*Release_ReleaseCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[190].Exporter = func(v any, i int) any { - switch v := v.(*TargetArtifact_PhaseArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[197].Exporter = func(v any, i int) any { - switch v := v.(*TimedPromoteReleaseCondition_Targets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_deploy_v1_cloud_deploy_proto_msgTypes[0].OneofWrappers = []any{ (*DeliveryPipeline_SerialPipeline)(nil), } diff --git a/deploy/apiv1/deploypb/customtargettype_notification_payload.pb.go b/deploy/apiv1/deploypb/customtargettype_notification_payload.pb.go index c73d2d02f373..76c90efb48e3 100755 --- a/deploy/apiv1/deploypb/customtargettype_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/customtargettype_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/customtargettype_notification_payload.proto @@ -55,11 +55,9 @@ type CustomTargetTypeNotificationEvent struct { func (x *CustomTargetTypeNotificationEvent) Reset() { *x = CustomTargetTypeNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_customtargettype_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_customtargettype_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTargetTypeNotificationEvent) String() string { @@ -70,7 +68,7 @@ func (*CustomTargetTypeNotificationEvent) ProtoMessage() {} func (x *CustomTargetTypeNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_customtargettype_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,20 +178,6 @@ func file_google_cloud_deploy_v1_customtargettype_notification_payload_proto_ini return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_customtargettype_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomTargetTypeNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/deliverypipeline_notification_payload.pb.go b/deploy/apiv1/deploypb/deliverypipeline_notification_payload.pb.go index a900367dec9b..cf97d8bedbd2 100755 --- a/deploy/apiv1/deploypb/deliverypipeline_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/deliverypipeline_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/deliverypipeline_notification_payload.proto @@ -55,11 +55,9 @@ type DeliveryPipelineNotificationEvent struct { func (x *DeliveryPipelineNotificationEvent) Reset() { *x = DeliveryPipelineNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_deliverypipeline_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_deliverypipeline_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryPipelineNotificationEvent) String() string { @@ -70,7 +68,7 @@ func (*DeliveryPipelineNotificationEvent) ProtoMessage() {} func (x *DeliveryPipelineNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_deliverypipeline_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,20 +177,6 @@ func file_google_cloud_deploy_v1_deliverypipeline_notification_payload_proto_ini return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_deliverypipeline_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryPipelineNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/deploypolicy_evaluation_payload.pb.go b/deploy/apiv1/deploypb/deploypolicy_evaluation_payload.pb.go index 008d309f21ac..6055ec0eb912 100755 --- a/deploy/apiv1/deploypb/deploypolicy_evaluation_payload.pb.go +++ b/deploy/apiv1/deploypb/deploypolicy_evaluation_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/deploypolicy_evaluation_payload.proto @@ -188,11 +188,9 @@ type DeployPolicyEvaluationEvent struct { func (x *DeployPolicyEvaluationEvent) Reset() { *x = DeployPolicyEvaluationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_deploypolicy_evaluation_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_deploypolicy_evaluation_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployPolicyEvaluationEvent) String() string { @@ -203,7 +201,7 @@ func (*DeployPolicyEvaluationEvent) ProtoMessage() {} func (x *DeployPolicyEvaluationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_deploypolicy_evaluation_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,20 +417,6 @@ func file_google_cloud_deploy_v1_deploypolicy_evaluation_payload_proto_init() { return } file_google_cloud_deploy_v1_cloud_deploy_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_deploypolicy_evaluation_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployPolicyEvaluationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/deploypolicy_notification_payload.pb.go b/deploy/apiv1/deploypb/deploypolicy_notification_payload.pb.go index 811a5388380b..525cb5ea3241 100755 --- a/deploy/apiv1/deploypb/deploypolicy_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/deploypolicy_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/deploypolicy_notification_payload.proto @@ -56,11 +56,9 @@ type DeployPolicyNotificationEvent struct { func (x *DeployPolicyNotificationEvent) Reset() { *x = DeployPolicyNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_deploypolicy_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_deploypolicy_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployPolicyNotificationEvent) String() string { @@ -71,7 +69,7 @@ func (*DeployPolicyNotificationEvent) ProtoMessage() {} func (x *DeployPolicyNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_deploypolicy_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,20 +178,6 @@ func file_google_cloud_deploy_v1_deploypolicy_notification_payload_proto_init() return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_deploypolicy_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeployPolicyNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/jobrun_notification_payload.pb.go b/deploy/apiv1/deploypb/jobrun_notification_payload.pb.go index 5bac4844880f..1c421075af5e 100755 --- a/deploy/apiv1/deploypb/jobrun_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/jobrun_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/jobrun_notification_payload.proto @@ -65,11 +65,9 @@ type JobRunNotificationEvent struct { func (x *JobRunNotificationEvent) Reset() { *x = JobRunNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_jobrun_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_jobrun_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobRunNotificationEvent) String() string { @@ -80,7 +78,7 @@ func (*JobRunNotificationEvent) ProtoMessage() {} func (x *JobRunNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_jobrun_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,20 +228,6 @@ func file_google_cloud_deploy_v1_jobrun_notification_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_jobrun_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*JobRunNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/log_enums.pb.go b/deploy/apiv1/deploypb/log_enums.pb.go index 75db6fe6a940..8536d833a9e9 100755 --- a/deploy/apiv1/deploypb/log_enums.pb.go +++ b/deploy/apiv1/deploypb/log_enums.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/log_enums.proto diff --git a/deploy/apiv1/deploypb/release_notification_payload.pb.go b/deploy/apiv1/deploypb/release_notification_payload.pb.go index 749395c3ff08..6983d5f031ce 100755 --- a/deploy/apiv1/deploypb/release_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/release_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/release_notification_payload.proto @@ -57,11 +57,9 @@ type ReleaseNotificationEvent struct { func (x *ReleaseNotificationEvent) Reset() { *x = ReleaseNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_release_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_release_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseNotificationEvent) String() string { @@ -72,7 +70,7 @@ func (*ReleaseNotificationEvent) ProtoMessage() {} func (x *ReleaseNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_release_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,20 +185,6 @@ func file_google_cloud_deploy_v1_release_notification_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_release_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/release_render_payload.pb.go b/deploy/apiv1/deploypb/release_render_payload.pb.go index a52a71a7d281..a72bdc310cbd 100755 --- a/deploy/apiv1/deploypb/release_render_payload.pb.go +++ b/deploy/apiv1/deploypb/release_render_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/release_render_payload.proto @@ -59,11 +59,9 @@ type ReleaseRenderEvent struct { func (x *ReleaseRenderEvent) Reset() { *x = ReleaseRenderEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_release_render_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_release_render_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseRenderEvent) String() string { @@ -74,7 +72,7 @@ func (*ReleaseRenderEvent) ProtoMessage() {} func (x *ReleaseRenderEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_release_render_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,20 +196,6 @@ func file_google_cloud_deploy_v1_release_render_payload_proto_init() { } file_google_cloud_deploy_v1_cloud_deploy_proto_init() file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_release_render_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseRenderEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/rollout_notification_payload.pb.go b/deploy/apiv1/deploypb/rollout_notification_payload.pb.go index 86df0025f403..44ae2d2caa0b 100755 --- a/deploy/apiv1/deploypb/rollout_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/rollout_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/rollout_notification_payload.proto @@ -63,11 +63,9 @@ type RolloutNotificationEvent struct { func (x *RolloutNotificationEvent) Reset() { *x = RolloutNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_rollout_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_rollout_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutNotificationEvent) String() string { @@ -78,7 +76,7 @@ func (*RolloutNotificationEvent) ProtoMessage() {} func (x *RolloutNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_rollout_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,20 +218,6 @@ func file_google_cloud_deploy_v1_rollout_notification_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_rollout_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RolloutNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/rollout_update_payload.pb.go b/deploy/apiv1/deploypb/rollout_update_payload.pb.go index fa7e04f0122b..6b5e03dada0c 100755 --- a/deploy/apiv1/deploypb/rollout_update_payload.pb.go +++ b/deploy/apiv1/deploypb/rollout_update_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/rollout_update_payload.proto @@ -161,11 +161,9 @@ type RolloutUpdateEvent struct { func (x *RolloutUpdateEvent) Reset() { *x = RolloutUpdateEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_rollout_update_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_rollout_update_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutUpdateEvent) String() string { @@ -176,7 +174,7 @@ func (*RolloutUpdateEvent) ProtoMessage() {} func (x *RolloutUpdateEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_rollout_update_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,20 +339,6 @@ func file_google_cloud_deploy_v1_rollout_update_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_rollout_update_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RolloutUpdateEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/deploypb/target_notification_payload.pb.go b/deploy/apiv1/deploypb/target_notification_payload.pb.go index 5f1c7514a959..b231c0e7e9f4 100755 --- a/deploy/apiv1/deploypb/target_notification_payload.pb.go +++ b/deploy/apiv1/deploypb/target_notification_payload.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/deploy/v1/target_notification_payload.proto @@ -53,11 +53,9 @@ type TargetNotificationEvent struct { func (x *TargetNotificationEvent) Reset() { *x = TargetNotificationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_deploy_v1_target_notification_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_deploy_v1_target_notification_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetNotificationEvent) String() string { @@ -68,7 +66,7 @@ func (*TargetNotificationEvent) ProtoMessage() {} func (x *TargetNotificationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_deploy_v1_target_notification_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,20 +163,6 @@ func file_google_cloud_deploy_v1_target_notification_payload_proto_init() { return } file_google_cloud_deploy_v1_log_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_deploy_v1_target_notification_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TargetNotificationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/deploy/apiv1/helpers.go b/deploy/apiv1/helpers.go index a072315b77f5..fdde2ade433f 100755 --- a/deploy/apiv1/helpers.go +++ b/deploy/apiv1/helpers.go @@ -18,10 +18,20 @@ package deploy import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "clouddeploy.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/developerconnect/apiv1/developer_connect_client.go b/developerconnect/apiv1/developer_connect_client.go index d704dd1d3283..3397478372bb 100755 --- a/developerconnect/apiv1/developer_connect_client.go +++ b/developerconnect/apiv1/developer_connect_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -621,6 +620,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new developer connect client based on gRPC. @@ -647,6 +648,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: developerconnectpb.NewDeveloperConnectClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -711,6 +713,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new developer connect rest client. @@ -728,6 +732,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -801,7 +806,7 @@ func (c *gRPCClient) ListConnections(ctx context.Context, req *developerconnectp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *gRPCClient) GetConnection(ctx context.Context, req *developerconnectpb. var resp *developerconnectpb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnection, req, settings.GRPC, c.logger, "GetConnection") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *gRPCClient) CreateConnection(ctx context.Context, req *developerconnect var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnection, req, settings.GRPC, c.logger, "CreateConnection") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *gRPCClient) UpdateConnection(ctx context.Context, req *developerconnect var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnection, req, settings.GRPC, c.logger, "UpdateConnection") return err }, opts...) if err != nil { @@ -894,7 +899,7 @@ func (c *gRPCClient) DeleteConnection(ctx context.Context, req *developerconnect var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteConnection, req, settings.GRPC, c.logger, "DeleteConnection") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *gRPCClient) CreateGitRepositoryLink(ctx context.Context, req *developer var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGitRepositoryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGitRepositoryLink, req, settings.GRPC, c.logger, "CreateGitRepositoryLink") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *gRPCClient) DeleteGitRepositoryLink(ctx context.Context, req *developer var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGitRepositoryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGitRepositoryLink, req, settings.GRPC, c.logger, "DeleteGitRepositoryLink") return err }, opts...) if err != nil { @@ -965,7 +970,7 @@ func (c *gRPCClient) ListGitRepositoryLinks(ctx context.Context, req *developerc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGitRepositoryLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGitRepositoryLinks, req, settings.GRPC, c.logger, "ListGitRepositoryLinks") return err }, opts...) if err != nil { @@ -1000,7 +1005,7 @@ func (c *gRPCClient) GetGitRepositoryLink(ctx context.Context, req *developercon var resp *developerconnectpb.GitRepositoryLink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGitRepositoryLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGitRepositoryLink, req, settings.GRPC, c.logger, "GetGitRepositoryLink") return err }, opts...) if err != nil { @@ -1018,7 +1023,7 @@ func (c *gRPCClient) FetchReadWriteToken(ctx context.Context, req *developerconn var resp *developerconnectpb.FetchReadWriteTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchReadWriteToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchReadWriteToken, req, settings.GRPC, c.logger, "FetchReadWriteToken") return err }, opts...) if err != nil { @@ -1036,7 +1041,7 @@ func (c *gRPCClient) FetchReadToken(ctx context.Context, req *developerconnectpb var resp *developerconnectpb.FetchReadTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchReadToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchReadToken, req, settings.GRPC, c.logger, "FetchReadToken") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *gRPCClient) FetchLinkableGitRepositories(ctx context.Context, req *deve } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchLinkableGitRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchLinkableGitRepositories, req, settings.GRPC, c.logger, "FetchLinkableGitRepositories") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *gRPCClient) FetchGitHubInstallations(ctx context.Context, req *develope var resp *developerconnectpb.FetchGitHubInstallationsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchGitHubInstallations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchGitHubInstallations, req, settings.GRPC, c.logger, "FetchGitHubInstallations") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *gRPCClient) FetchGitRefs(ctx context.Context, req *developerconnectpb.F } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchGitRefs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchGitRefs, req, settings.GRPC, c.logger, "FetchGitRefs") return err }, opts...) if err != nil { @@ -1164,7 +1169,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1193,7 +1198,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1227,7 +1232,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1241,7 +1246,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1256,7 +1261,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1285,7 +1290,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1362,21 +1367,10 @@ func (c *restClient) ListConnections(ctx context.Context, req *developerconnectp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1439,17 +1433,7 @@ func (c *restClient) GetConnection(ctx context.Context, req *developerconnectpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnection") if err != nil { return err } @@ -1512,21 +1496,10 @@ func (c *restClient) CreateConnection(ctx context.Context, req *developerconnect httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1599,21 +1572,10 @@ func (c *restClient) UpdateConnection(ctx context.Context, req *developerconnect httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1672,21 +1634,10 @@ func (c *restClient) DeleteConnection(ctx context.Context, req *developerconnect httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1754,21 +1705,10 @@ func (c *restClient) CreateGitRepositoryLink(ctx context.Context, req *developer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGitRepositoryLink") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1827,21 +1767,10 @@ func (c *restClient) DeleteGitRepositoryLink(ctx context.Context, req *developer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGitRepositoryLink") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1910,21 +1839,10 @@ func (c *restClient) ListGitRepositoryLinks(ctx context.Context, req *developerc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGitRepositoryLinks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1987,17 +1905,7 @@ func (c *restClient) GetGitRepositoryLink(ctx context.Context, req *developercon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGitRepositoryLink") if err != nil { return err } @@ -2053,17 +1961,7 @@ func (c *restClient) FetchReadWriteToken(ctx context.Context, req *developerconn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchReadWriteToken") if err != nil { return err } @@ -2119,17 +2017,7 @@ func (c *restClient) FetchReadToken(ctx context.Context, req *developerconnectpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchReadToken") if err != nil { return err } @@ -2192,21 +2080,10 @@ func (c *restClient) FetchLinkableGitRepositories(ctx context.Context, req *deve } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchLinkableGitRepositories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2272,17 +2149,7 @@ func (c *restClient) FetchGitHubInstallations(ctx context.Context, req *develope httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchGitHubInstallations") if err != nil { return err } @@ -2345,21 +2212,10 @@ func (c *restClient) FetchGitRefs(ctx context.Context, req *developerconnectpb.F } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchGitRefs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2422,17 +2278,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2497,21 +2343,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2577,15 +2412,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2619,15 +2447,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2664,17 +2485,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2739,21 +2550,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/developerconnect/apiv1/developer_connect_client_example_go123_test.go b/developerconnect/apiv1/developer_connect_client_example_go123_test.go index ae27c2a77975..175ba4de8fef 100644 --- a/developerconnect/apiv1/developer_connect_client_example_go123_test.go +++ b/developerconnect/apiv1/developer_connect_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_FetchGitRefs_all() { } for resp, err := range c.FetchGitRefs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_FetchLinkableGitRepositories_all() { } for resp, err := range c.FetchLinkableGitRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListConnections_all() { } for resp, err := range c.ListConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListGitRepositoryLinks_all() { } for resp, err := range c.ListGitRepositoryLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/developerconnect/apiv1/developerconnectpb/developer_connect.pb.go b/developerconnect/apiv1/developerconnectpb/developer_connect.pb.go index 32c3ed86504b..6e18fff3f45c 100755 --- a/developerconnect/apiv1/developerconnectpb/developer_connect.pb.go +++ b/developerconnect/apiv1/developerconnectpb/developer_connect.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/developerconnect/v1/developer_connect.proto @@ -264,11 +264,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -279,7 +277,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +458,9 @@ type CryptoKeyConfig struct { func (x *CryptoKeyConfig) Reset() { *x = CryptoKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKeyConfig) String() string { @@ -475,7 +471,7 @@ func (*CryptoKeyConfig) ProtoMessage() {} func (x *CryptoKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +513,9 @@ type InstallationState struct { func (x *InstallationState) Reset() { *x = InstallationState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallationState) String() string { @@ -532,7 +526,7 @@ func (*InstallationState) ProtoMessage() {} func (x *InstallationState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +584,9 @@ type GitHubConfig struct { func (x *GitHubConfig) Reset() { *x = GitHubConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubConfig) String() string { @@ -605,7 +597,7 @@ func (*GitHubConfig) ProtoMessage() {} func (x *GitHubConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +677,9 @@ type GitHubEnterpriseConfig struct { func (x *GitHubEnterpriseConfig) Reset() { *x = GitHubEnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitHubEnterpriseConfig) String() string { @@ -700,7 +690,7 @@ func (*GitHubEnterpriseConfig) ProtoMessage() {} func (x *GitHubEnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +790,9 @@ type ServiceDirectoryConfig struct { func (x *ServiceDirectoryConfig) Reset() { *x = ServiceDirectoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceDirectoryConfig) String() string { @@ -815,7 +803,7 @@ func (*ServiceDirectoryConfig) ProtoMessage() {} func (x *ServiceDirectoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,11 +841,9 @@ type OAuthCredential struct { func (x *OAuthCredential) Reset() { *x = OAuthCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthCredential) String() string { @@ -868,7 +854,7 @@ func (*OAuthCredential) ProtoMessage() {} func (x *OAuthCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -921,11 +907,9 @@ type GitLabConfig struct { func (x *GitLabConfig) Reset() { *x = GitLabConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitLabConfig) String() string { @@ -936,7 +920,7 @@ func (*GitLabConfig) ProtoMessage() {} func (x *GitLabConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +973,9 @@ type UserCredential struct { func (x *UserCredential) Reset() { *x = UserCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserCredential) String() string { @@ -1004,7 +986,7 @@ func (*UserCredential) ProtoMessage() {} func (x *UserCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1053,9 @@ type GitLabEnterpriseConfig struct { func (x *GitLabEnterpriseConfig) Reset() { *x = GitLabEnterpriseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitLabEnterpriseConfig) String() string { @@ -1086,7 +1066,7 @@ func (*GitLabEnterpriseConfig) ProtoMessage() {} func (x *GitLabEnterpriseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,11 +1151,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -1186,7 +1164,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1230,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -1267,7 +1243,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1291,9 @@ type GetConnectionRequest struct { func (x *GetConnectionRequest) Reset() { *x = GetConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionRequest) String() string { @@ -1330,7 +1304,7 @@ func (*GetConnectionRequest) ProtoMessage() {} func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1360,9 @@ type CreateConnectionRequest struct { func (x *CreateConnectionRequest) Reset() { *x = CreateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionRequest) String() string { @@ -1401,7 +1373,7 @@ func (*CreateConnectionRequest) ProtoMessage() {} func (x *CreateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1463,9 @@ type UpdateConnectionRequest struct { func (x *UpdateConnectionRequest) Reset() { *x = UpdateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionRequest) String() string { @@ -1506,7 +1476,7 @@ func (*UpdateConnectionRequest) ProtoMessage() {} func (x *UpdateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1588,11 +1558,9 @@ type DeleteConnectionRequest struct { func (x *DeleteConnectionRequest) Reset() { *x = DeleteConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionRequest) String() string { @@ -1603,7 +1571,7 @@ func (*DeleteConnectionRequest) ProtoMessage() {} func (x *DeleteConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,11 +1643,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1690,7 +1656,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1791,11 +1757,9 @@ type GitRepositoryLink struct { func (x *GitRepositoryLink) Reset() { *x = GitRepositoryLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitRepositoryLink) String() string { @@ -1806,7 +1770,7 @@ func (*GitRepositoryLink) ProtoMessage() {} func (x *GitRepositoryLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1933,11 +1897,9 @@ type CreateGitRepositoryLinkRequest struct { func (x *CreateGitRepositoryLinkRequest) Reset() { *x = CreateGitRepositoryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGitRepositoryLinkRequest) String() string { @@ -1948,7 +1910,7 @@ func (*CreateGitRepositoryLinkRequest) ProtoMessage() {} func (x *CreateGitRepositoryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2030,11 +1992,9 @@ type DeleteGitRepositoryLinkRequest struct { func (x *DeleteGitRepositoryLinkRequest) Reset() { *x = DeleteGitRepositoryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGitRepositoryLinkRequest) String() string { @@ -2045,7 +2005,7 @@ func (*DeleteGitRepositoryLinkRequest) ProtoMessage() {} func (x *DeleteGitRepositoryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,11 +2069,9 @@ type ListGitRepositoryLinksRequest struct { func (x *ListGitRepositoryLinksRequest) Reset() { *x = ListGitRepositoryLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGitRepositoryLinksRequest) String() string { @@ -2124,7 +2082,7 @@ func (*ListGitRepositoryLinksRequest) ProtoMessage() {} func (x *ListGitRepositoryLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2190,11 +2148,9 @@ type ListGitRepositoryLinksResponse struct { func (x *ListGitRepositoryLinksResponse) Reset() { *x = ListGitRepositoryLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGitRepositoryLinksResponse) String() string { @@ -2205,7 +2161,7 @@ func (*ListGitRepositoryLinksResponse) ProtoMessage() {} func (x *ListGitRepositoryLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2253,11 +2209,9 @@ type GetGitRepositoryLinkRequest struct { func (x *GetGitRepositoryLinkRequest) Reset() { *x = GetGitRepositoryLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGitRepositoryLinkRequest) String() string { @@ -2268,7 +2222,7 @@ func (*GetGitRepositoryLinkRequest) ProtoMessage() {} func (x *GetGitRepositoryLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2303,11 +2257,9 @@ type FetchReadWriteTokenRequest struct { func (x *FetchReadWriteTokenRequest) Reset() { *x = FetchReadWriteTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadWriteTokenRequest) String() string { @@ -2318,7 +2270,7 @@ func (*FetchReadWriteTokenRequest) ProtoMessage() {} func (x *FetchReadWriteTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2353,11 +2305,9 @@ type FetchReadTokenRequest struct { func (x *FetchReadTokenRequest) Reset() { *x = FetchReadTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadTokenRequest) String() string { @@ -2368,7 +2318,7 @@ func (*FetchReadTokenRequest) ProtoMessage() {} func (x *FetchReadTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2358,9 @@ type FetchReadTokenResponse struct { func (x *FetchReadTokenResponse) Reset() { *x = FetchReadTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadTokenResponse) String() string { @@ -2423,7 +2371,7 @@ func (*FetchReadTokenResponse) ProtoMessage() {} func (x *FetchReadTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2477,11 +2425,9 @@ type FetchReadWriteTokenResponse struct { func (x *FetchReadWriteTokenResponse) Reset() { *x = FetchReadWriteTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchReadWriteTokenResponse) String() string { @@ -2492,7 +2438,7 @@ func (*FetchReadWriteTokenResponse) ProtoMessage() {} func (x *FetchReadWriteTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2545,11 +2491,9 @@ type FetchLinkableGitRepositoriesRequest struct { func (x *FetchLinkableGitRepositoriesRequest) Reset() { *x = FetchLinkableGitRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchLinkableGitRepositoriesRequest) String() string { @@ -2560,7 +2504,7 @@ func (*FetchLinkableGitRepositoriesRequest) ProtoMessage() {} func (x *FetchLinkableGitRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2610,11 +2554,9 @@ type FetchLinkableGitRepositoriesResponse struct { func (x *FetchLinkableGitRepositoriesResponse) Reset() { *x = FetchLinkableGitRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchLinkableGitRepositoriesResponse) String() string { @@ -2625,7 +2567,7 @@ func (*FetchLinkableGitRepositoriesResponse) ProtoMessage() {} func (x *FetchLinkableGitRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2667,11 +2609,9 @@ type LinkableGitRepository struct { func (x *LinkableGitRepository) Reset() { *x = LinkableGitRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkableGitRepository) String() string { @@ -2682,7 +2622,7 @@ func (*LinkableGitRepository) ProtoMessage() {} func (x *LinkableGitRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2717,11 +2657,9 @@ type FetchGitHubInstallationsRequest struct { func (x *FetchGitHubInstallationsRequest) Reset() { *x = FetchGitHubInstallationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitHubInstallationsRequest) String() string { @@ -2732,7 +2670,7 @@ func (*FetchGitHubInstallationsRequest) ProtoMessage() {} func (x *FetchGitHubInstallationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2767,11 +2705,9 @@ type FetchGitHubInstallationsResponse struct { func (x *FetchGitHubInstallationsResponse) Reset() { *x = FetchGitHubInstallationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitHubInstallationsResponse) String() string { @@ -2782,7 +2718,7 @@ func (*FetchGitHubInstallationsResponse) ProtoMessage() {} func (x *FetchGitHubInstallationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2823,11 +2759,9 @@ type FetchGitRefsRequest struct { func (x *FetchGitRefsRequest) Reset() { *x = FetchGitRefsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitRefsRequest) String() string { @@ -2838,7 +2772,7 @@ func (*FetchGitRefsRequest) ProtoMessage() {} func (x *FetchGitRefsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2895,11 +2829,9 @@ type FetchGitRefsResponse struct { func (x *FetchGitRefsResponse) Reset() { *x = FetchGitRefsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitRefsResponse) String() string { @@ -2910,7 +2842,7 @@ func (*FetchGitRefsResponse) ProtoMessage() {} func (x *FetchGitRefsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2955,11 +2887,9 @@ type FetchGitHubInstallationsResponse_Installation struct { func (x *FetchGitHubInstallationsResponse_Installation) Reset() { *x = FetchGitHubInstallationsResponse_Installation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchGitHubInstallationsResponse_Installation) String() string { @@ -2970,7 +2900,7 @@ func (*FetchGitHubInstallationsResponse_Installation) ProtoMessage() {} func (x *FetchGitHubInstallationsResponse_Installation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4063,428 +3993,6 @@ func file_google_cloud_developerconnect_v1_developer_connect_proto_init() { if File_google_cloud_developerconnect_v1_developer_connect_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InstallationState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GitHubConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GitHubEnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ServiceDirectoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OAuthCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GitLabConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UserCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GitLabEnterpriseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GitRepositoryLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateGitRepositoryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGitRepositoryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListGitRepositoryLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListGitRepositoryLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetGitRepositoryLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadWriteTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*FetchReadWriteTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*FetchLinkableGitRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*FetchLinkableGitRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*LinkableGitRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitHubInstallationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitHubInstallationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitRefsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitRefsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*FetchGitHubInstallationsResponse_Installation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_developerconnect_v1_developer_connect_proto_msgTypes[0].OneofWrappers = []any{ (*Connection_GithubConfig)(nil), (*Connection_GithubEnterpriseConfig)(nil), diff --git a/developerconnect/apiv1/helpers.go b/developerconnect/apiv1/helpers.go index 064ae485ef05..bcd8c57c1e75 100755 --- a/developerconnect/apiv1/helpers.go +++ b/developerconnect/apiv1/helpers.go @@ -18,10 +18,20 @@ package developerconnect import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "developerconnect.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dialogflow/apiv2/agents_client.go b/dialogflow/apiv2/agents_client.go index 8eb6e881f574..7068826dab08 100755 --- a/dialogflow/apiv2/agents_client.go +++ b/dialogflow/apiv2/agents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -576,6 +575,8 @@ type agentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAgentsClient creates a new agents client based on gRPC. @@ -602,6 +603,7 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC connPool: connPool, agentsClient: dialogflowpb.NewAgentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -666,6 +668,8 @@ type agentsRESTClient struct { // Points back to the CallOptions field of the containing AgentsClient CallOptions **AgentsCallOptions + + logger *slog.Logger } // NewAgentsRESTClient creates a new agents rest client. @@ -683,6 +687,7 @@ func NewAgentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Age endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -745,7 +750,7 @@ func (c *agentsGRPCClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAg var resp *dialogflowpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgent, req, settings.GRPC, c.logger, "GetAgent") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *agentsGRPCClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAg var resp *dialogflowpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.SetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.SetAgent, req, settings.GRPC, c.logger, "SetAgent") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *agentsGRPCClient) DeleteAgent(ctx context.Context, req *dialogflowpb.De opts = append((*c.CallOptions).DeleteAgent[0:len((*c.CallOptions).DeleteAgent):len((*c.CallOptions).DeleteAgent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.agentsClient.DeleteAgent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.agentsClient.DeleteAgent, req, settings.GRPC, c.logger, "DeleteAgent") return err }, opts...) return err @@ -806,7 +811,7 @@ func (c *agentsGRPCClient) SearchAgents(ctx context.Context, req *dialogflowpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.SearchAgents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.SearchAgents, req, settings.GRPC, c.logger, "SearchAgents") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *agentsGRPCClient) TrainAgent(ctx context.Context, req *dialogflowpb.Tra var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.TrainAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.TrainAgent, req, settings.GRPC, c.logger, "TrainAgent") return err }, opts...) if err != nil { @@ -861,7 +866,7 @@ func (c *agentsGRPCClient) ExportAgent(ctx context.Context, req *dialogflowpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ExportAgent, req, settings.GRPC, c.logger, "ExportAgent") return err }, opts...) if err != nil { @@ -881,7 +886,7 @@ func (c *agentsGRPCClient) ImportAgent(ctx context.Context, req *dialogflowpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ImportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ImportAgent, req, settings.GRPC, c.logger, "ImportAgent") return err }, opts...) if err != nil { @@ -901,7 +906,7 @@ func (c *agentsGRPCClient) RestoreAgent(ctx context.Context, req *dialogflowpb.R var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.RestoreAgent, req, settings.GRPC, c.logger, "RestoreAgent") return err }, opts...) if err != nil { @@ -921,7 +926,7 @@ func (c *agentsGRPCClient) GetValidationResult(ctx context.Context, req *dialogf var resp *dialogflowpb.ValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetValidationResult, req, settings.GRPC, c.logger, "GetValidationResult") return err }, opts...) if err != nil { @@ -939,7 +944,7 @@ func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1017,7 +1022,7 @@ func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1046,7 +1051,7 @@ func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1105,17 +1110,7 @@ func (c *agentsRESTClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgent") if err != nil { return err } @@ -1183,17 +1178,7 @@ func (c *agentsRESTClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetAgent") if err != nil { return err } @@ -1240,15 +1225,8 @@ func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *dialogflowpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAgent") + return err }, opts...) } @@ -1303,21 +1281,10 @@ func (c *agentsRESTClient) SearchAgents(ctx context.Context, req *dialogflowpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAgents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1399,21 +1366,10 @@ func (c *agentsRESTClient) TrainAgent(ctx context.Context, req *dialogflowpb.Tra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1479,21 +1435,10 @@ func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *dialogflowpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAgent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,21 +1521,10 @@ func (c *agentsRESTClient) ImportAgent(ctx context.Context, req *dialogflowpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAgent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1671,21 +1605,10 @@ func (c *agentsRESTClient) RestoreAgent(ctx context.Context, req *dialogflowpb.R httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1740,17 +1663,7 @@ func (c *agentsRESTClient) GetValidationResult(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetValidationResult") if err != nil { return err } @@ -1800,17 +1713,7 @@ func (c *agentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1875,21 +1778,10 @@ func (c *agentsRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1949,15 +1841,8 @@ func (c *agentsRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1994,17 +1879,7 @@ func (c *agentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2069,21 +1944,10 @@ func (c *agentsRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/agents_client_example_go123_test.go b/dialogflow/apiv2/agents_client_example_go123_test.go index f2891b294987..878eabea7030 100644 --- a/dialogflow/apiv2/agents_client_example_go123_test.go +++ b/dialogflow/apiv2/agents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAgentsClient_SearchAgents_all() { } for resp, err := range c.SearchAgents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAgentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAgentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/answer_records_client.go b/dialogflow/apiv2/answer_records_client.go index 9b57f5118361..66edf7b2027a 100755 --- a/dialogflow/apiv2/answer_records_client.go +++ b/dialogflow/apiv2/answer_records_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -241,6 +240,8 @@ type answerRecordsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnswerRecordsClient creates a new answer records client based on gRPC. @@ -268,6 +269,7 @@ func NewAnswerRecordsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, answerRecordsClient: dialogflowpb.NewAnswerRecordsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -316,6 +318,8 @@ type answerRecordsRESTClient struct { // Points back to the CallOptions field of the containing AnswerRecordsClient CallOptions **AnswerRecordsCallOptions + + logger *slog.Logger } // NewAnswerRecordsRESTClient creates a new answer records rest client. @@ -334,6 +338,7 @@ func NewAnswerRecordsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *answerRecordsGRPCClient) ListAnswerRecords(ctx context.Context, req *di } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.answerRecordsClient.ListAnswerRecords(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.answerRecordsClient.ListAnswerRecords, req, settings.GRPC, c.logger, "ListAnswerRecords") return err }, opts...) if err != nil { @@ -432,7 +437,7 @@ func (c *answerRecordsGRPCClient) UpdateAnswerRecord(ctx context.Context, req *d var resp *dialogflowpb.AnswerRecord err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.answerRecordsClient.UpdateAnswerRecord(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.answerRecordsClient.UpdateAnswerRecord, req, settings.GRPC, c.logger, "UpdateAnswerRecord") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *answerRecordsGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -479,7 +484,7 @@ func (c *answerRecordsGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *answerRecordsGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -528,7 +533,7 @@ func (c *answerRecordsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *answerRecordsGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -632,21 +637,10 @@ func (c *answerRecordsRESTClient) ListAnswerRecords(ctx context.Context, req *di } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnswerRecords") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -723,17 +717,7 @@ func (c *answerRecordsRESTClient) UpdateAnswerRecord(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAnswerRecord") if err != nil { return err } @@ -783,17 +767,7 @@ func (c *answerRecordsRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -858,21 +832,10 @@ func (c *answerRecordsRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -932,15 +895,8 @@ func (c *answerRecordsRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -977,17 +933,7 @@ func (c *answerRecordsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1052,21 +998,10 @@ func (c *answerRecordsRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/answer_records_client_example_go123_test.go b/dialogflow/apiv2/answer_records_client_example_go123_test.go index a8b1b8e67107..5cb7c7678462 100644 --- a/dialogflow/apiv2/answer_records_client_example_go123_test.go +++ b/dialogflow/apiv2/answer_records_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAnswerRecordsClient_ListAnswerRecords_all() { } for resp, err := range c.ListAnswerRecords(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAnswerRecordsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAnswerRecordsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/contexts_client.go b/dialogflow/apiv2/contexts_client.go index a87d26538683..c73ec1cde3f3 100755 --- a/dialogflow/apiv2/contexts_client.go +++ b/dialogflow/apiv2/contexts_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -361,6 +360,8 @@ type contextsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewContextsClient creates a new contexts client based on gRPC. @@ -387,6 +388,7 @@ func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*Conte connPool: connPool, contextsClient: dialogflowpb.NewContextsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -435,6 +437,8 @@ type contextsRESTClient struct { // Points back to the CallOptions field of the containing ContextsClient CallOptions **ContextsCallOptions + + logger *slog.Logger } // NewContextsRESTClient creates a new contexts rest client. @@ -452,6 +456,7 @@ func NewContextsRESTClient(ctx context.Context, opts ...option.ClientOption) (*C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -515,7 +520,7 @@ func (c *contextsGRPCClient) ListContexts(ctx context.Context, req *dialogflowpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.ListContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.ListContexts, req, settings.GRPC, c.logger, "ListContexts") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *contextsGRPCClient) GetContext(ctx context.Context, req *dialogflowpb.G var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.GetContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.GetContext, req, settings.GRPC, c.logger, "GetContext") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *contextsGRPCClient) CreateContext(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.CreateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.CreateContext, req, settings.GRPC, c.logger, "CreateContext") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *contextsGRPCClient) UpdateContext(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.UpdateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.UpdateContext, req, settings.GRPC, c.logger, "UpdateContext") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *contextsGRPCClient) DeleteContext(ctx context.Context, req *dialogflowp opts = append((*c.CallOptions).DeleteContext[0:len((*c.CallOptions).DeleteContext):len((*c.CallOptions).DeleteContext)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.contextsClient.DeleteContext(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.contextsClient.DeleteContext, req, settings.GRPC, c.logger, "DeleteContext") return err }, opts...) return err @@ -617,7 +622,7 @@ func (c *contextsGRPCClient) DeleteAllContexts(ctx context.Context, req *dialogf opts = append((*c.CallOptions).DeleteAllContexts[0:len((*c.CallOptions).DeleteAllContexts):len((*c.CallOptions).DeleteAllContexts)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.contextsClient.DeleteAllContexts(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.contextsClient.DeleteAllContexts, req, settings.GRPC, c.logger, "DeleteAllContexts") return err }, opts...) return err @@ -632,7 +637,7 @@ func (c *contextsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *contextsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *contextsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -710,7 +715,7 @@ func (c *contextsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *contextsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -810,21 +815,10 @@ func (c *contextsRESTClient) ListContexts(ctx context.Context, req *dialogflowpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContexts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -887,17 +881,7 @@ func (c *contextsRESTClient) GetContext(ctx context.Context, req *dialogflowpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetContext") if err != nil { return err } @@ -956,17 +940,7 @@ func (c *contextsRESTClient) CreateContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateContext") if err != nil { return err } @@ -1030,17 +1004,7 @@ func (c *contextsRESTClient) UpdateContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateContext") if err != nil { return err } @@ -1087,15 +1051,8 @@ func (c *contextsRESTClient) DeleteContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteContext") + return err }, opts...) } @@ -1129,15 +1086,8 @@ func (c *contextsRESTClient) DeleteAllContexts(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAllContexts") + return err }, opts...) } @@ -1174,17 +1124,7 @@ func (c *contextsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1249,21 +1189,10 @@ func (c *contextsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1323,15 +1252,8 @@ func (c *contextsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1368,17 +1290,7 @@ func (c *contextsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1443,21 +1355,10 @@ func (c *contextsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/contexts_client_example_go123_test.go b/dialogflow/apiv2/contexts_client_example_go123_test.go index 9345f2f37c31..508d83a88d11 100644 --- a/dialogflow/apiv2/contexts_client_example_go123_test.go +++ b/dialogflow/apiv2/contexts_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleContextsClient_ListContexts_all() { } for resp, err := range c.ListContexts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleContextsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleContextsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/conversation_datasets_client.go b/dialogflow/apiv2/conversation_datasets_client.go index a017e5a7fc4c..ef27bdbff482 100755 --- a/dialogflow/apiv2/conversation_datasets_client.go +++ b/dialogflow/apiv2/conversation_datasets_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -398,6 +397,8 @@ type conversationDatasetsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationDatasetsClient creates a new conversation datasets client based on gRPC. @@ -427,6 +428,7 @@ func NewConversationDatasetsClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationDatasetsClient: dialogflowpb.NewConversationDatasetsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -491,6 +493,8 @@ type conversationDatasetsRESTClient struct { // Points back to the CallOptions field of the containing ConversationDatasetsClient CallOptions **ConversationDatasetsCallOptions + + logger *slog.Logger } // NewConversationDatasetsRESTClient creates a new conversation datasets rest client. @@ -511,6 +515,7 @@ func NewConversationDatasetsRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -573,7 +578,7 @@ func (c *conversationDatasetsGRPCClient) CreateConversationDataset(ctx context.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationDatasetsClient.CreateConversationDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationDatasetsClient.CreateConversationDataset, req, settings.GRPC, c.logger, "CreateConversationDataset") return err }, opts...) if err != nil { @@ -593,7 +598,7 @@ func (c *conversationDatasetsGRPCClient) GetConversationDataset(ctx context.Cont var resp *dialogflowpb.ConversationDataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationDatasetsClient.GetConversationDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationDatasetsClient.GetConversationDataset, req, settings.GRPC, c.logger, "GetConversationDataset") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *conversationDatasetsGRPCClient) ListConversationDatasets(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationDatasetsClient.ListConversationDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationDatasetsClient.ListConversationDatasets, req, settings.GRPC, c.logger, "ListConversationDatasets") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *conversationDatasetsGRPCClient) DeleteConversationDataset(ctx context.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationDatasetsClient.DeleteConversationDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationDatasetsClient.DeleteConversationDataset, req, settings.GRPC, c.logger, "DeleteConversationDataset") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *conversationDatasetsGRPCClient) ImportConversationData(ctx context.Cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationDatasetsClient.ImportConversationData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationDatasetsClient.ImportConversationData, req, settings.GRPC, c.logger, "ImportConversationData") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *conversationDatasetsGRPCClient) GetLocation(ctx context.Context, req *l var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -726,7 +731,7 @@ func (c *conversationDatasetsGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *conversationDatasetsGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -775,7 +780,7 @@ func (c *conversationDatasetsGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -804,7 +809,7 @@ func (c *conversationDatasetsGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -879,21 +884,10 @@ func (c *conversationDatasetsRESTClient) CreateConversationDataset(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversationDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -944,17 +938,7 @@ func (c *conversationDatasetsRESTClient) GetConversationDataset(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversationDataset") if err != nil { return err } @@ -1017,21 +1001,10 @@ func (c *conversationDatasetsRESTClient) ListConversationDatasets(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversationDatasets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1103,21 +1076,10 @@ func (c *conversationDatasetsRESTClient) DeleteConversationDataset(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversationDataset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1185,21 +1147,10 @@ func (c *conversationDatasetsRESTClient) ImportConversationData(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportConversationData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1250,17 +1201,7 @@ func (c *conversationDatasetsRESTClient) GetLocation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1325,21 +1266,10 @@ func (c *conversationDatasetsRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1399,15 +1329,8 @@ func (c *conversationDatasetsRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1444,17 +1367,7 @@ func (c *conversationDatasetsRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1519,21 +1432,10 @@ func (c *conversationDatasetsRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/conversation_datasets_client_example_go123_test.go b/dialogflow/apiv2/conversation_datasets_client_example_go123_test.go index a7443a920125..b3e4b909c041 100644 --- a/dialogflow/apiv2/conversation_datasets_client_example_go123_test.go +++ b/dialogflow/apiv2/conversation_datasets_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationDatasetsClient_ListConversationDatasets_all() { } for resp, err := range c.ListConversationDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationDatasetsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationDatasetsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/conversation_models_client.go b/dialogflow/apiv2/conversation_models_client.go index 1014b7ea62da..c3d5930c6ac2 100755 --- a/dialogflow/apiv2/conversation_models_client.go +++ b/dialogflow/apiv2/conversation_models_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -543,6 +542,8 @@ type conversationModelsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationModelsClient creates a new conversation models client based on gRPC. @@ -569,6 +570,7 @@ func NewConversationModelsClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, conversationModelsClient: dialogflowpb.NewConversationModelsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -633,6 +635,8 @@ type conversationModelsRESTClient struct { // Points back to the CallOptions field of the containing ConversationModelsClient CallOptions **ConversationModelsCallOptions + + logger *slog.Logger } // NewConversationModelsRESTClient creates a new conversation models rest client. @@ -650,6 +654,7 @@ func NewConversationModelsRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -712,7 +717,7 @@ func (c *conversationModelsGRPCClient) CreateConversationModel(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.CreateConversationModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.CreateConversationModel, req, settings.GRPC, c.logger, "CreateConversationModel") return err }, opts...) if err != nil { @@ -732,7 +737,7 @@ func (c *conversationModelsGRPCClient) GetConversationModel(ctx context.Context, var resp *dialogflowpb.ConversationModel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.GetConversationModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.GetConversationModel, req, settings.GRPC, c.logger, "GetConversationModel") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *conversationModelsGRPCClient) ListConversationModels(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.ListConversationModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.ListConversationModels, req, settings.GRPC, c.logger, "ListConversationModels") return err }, opts...) if err != nil { @@ -796,7 +801,7 @@ func (c *conversationModelsGRPCClient) DeleteConversationModel(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.DeleteConversationModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.DeleteConversationModel, req, settings.GRPC, c.logger, "DeleteConversationModel") return err }, opts...) if err != nil { @@ -816,7 +821,7 @@ func (c *conversationModelsGRPCClient) DeployConversationModel(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.DeployConversationModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.DeployConversationModel, req, settings.GRPC, c.logger, "DeployConversationModel") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *conversationModelsGRPCClient) UndeployConversationModel(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.UndeployConversationModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.UndeployConversationModel, req, settings.GRPC, c.logger, "UndeployConversationModel") return err }, opts...) if err != nil { @@ -856,7 +861,7 @@ func (c *conversationModelsGRPCClient) GetConversationModelEvaluation(ctx contex var resp *dialogflowpb.ConversationModelEvaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.GetConversationModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.GetConversationModelEvaluation, req, settings.GRPC, c.logger, "GetConversationModelEvaluation") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *conversationModelsGRPCClient) ListConversationModelEvaluations(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.ListConversationModelEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.ListConversationModelEvaluations, req, settings.GRPC, c.logger, "ListConversationModelEvaluations") return err }, opts...) if err != nil { @@ -920,7 +925,7 @@ func (c *conversationModelsGRPCClient) CreateConversationModelEvaluation(ctx con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationModelsClient.CreateConversationModelEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationModelsClient.CreateConversationModelEvaluation, req, settings.GRPC, c.logger, "CreateConversationModelEvaluation") return err }, opts...) if err != nil { @@ -940,7 +945,7 @@ func (c *conversationModelsGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *conversationModelsGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *conversationModelsGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1018,7 +1023,7 @@ func (c *conversationModelsGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1047,7 +1052,7 @@ func (c *conversationModelsGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1122,21 +1127,10 @@ func (c *conversationModelsRESTClient) CreateConversationModel(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversationModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1187,17 +1181,7 @@ func (c *conversationModelsRESTClient) GetConversationModel(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversationModel") if err != nil { return err } @@ -1259,21 +1243,10 @@ func (c *conversationModelsRESTClient) ListConversationModels(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversationModels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1345,21 +1318,10 @@ func (c *conversationModelsRESTClient) DeleteConversationModel(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversationModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1428,21 +1390,10 @@ func (c *conversationModelsRESTClient) DeployConversationModel(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployConversationModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1512,21 +1463,10 @@ func (c *conversationModelsRESTClient) UndeployConversationModel(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployConversationModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1577,17 +1517,7 @@ func (c *conversationModelsRESTClient) GetConversationModelEvaluation(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversationModelEvaluation") if err != nil { return err } @@ -1649,21 +1579,10 @@ func (c *conversationModelsRESTClient) ListConversationModelEvaluations(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversationModelEvaluations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1731,21 +1650,10 @@ func (c *conversationModelsRESTClient) CreateConversationModelEvaluation(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversationModelEvaluation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1796,17 +1704,7 @@ func (c *conversationModelsRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1871,21 +1769,10 @@ func (c *conversationModelsRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1945,15 +1832,8 @@ func (c *conversationModelsRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1990,17 +1870,7 @@ func (c *conversationModelsRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2065,21 +1935,10 @@ func (c *conversationModelsRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/conversation_models_client_example_go123_test.go b/dialogflow/apiv2/conversation_models_client_example_go123_test.go index fa2b8b813baa..cc0a05ddc18b 100644 --- a/dialogflow/apiv2/conversation_models_client_example_go123_test.go +++ b/dialogflow/apiv2/conversation_models_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationModelsClient_ListConversationModelEvaluations_all() { } for resp, err := range c.ListConversationModelEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationModelsClient_ListConversationModels_all() { } for resp, err := range c.ListConversationModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationModelsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleConversationModelsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/conversation_profiles_client.go b/dialogflow/apiv2/conversation_profiles_client.go index e0d7b8a8e62b..b67b15a1beff 100755 --- a/dialogflow/apiv2/conversation_profiles_client.go +++ b/dialogflow/apiv2/conversation_profiles_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -459,6 +458,8 @@ type conversationProfilesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationProfilesClient creates a new conversation profiles client based on gRPC. @@ -486,6 +487,7 @@ func NewConversationProfilesClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationProfilesClient: dialogflowpb.NewConversationProfilesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -550,6 +552,8 @@ type conversationProfilesRESTClient struct { // Points back to the CallOptions field of the containing ConversationProfilesClient CallOptions **ConversationProfilesCallOptions + + logger *slog.Logger } // NewConversationProfilesRESTClient creates a new conversation profiles rest client. @@ -568,6 +572,7 @@ func NewConversationProfilesRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -641,7 +646,7 @@ func (c *conversationProfilesGRPCClient) ListConversationProfiles(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.ListConversationProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.ListConversationProfiles, req, settings.GRPC, c.logger, "ListConversationProfiles") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *conversationProfilesGRPCClient) GetConversationProfile(ctx context.Cont var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.GetConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.GetConversationProfile, req, settings.GRPC, c.logger, "GetConversationProfile") return err }, opts...) if err != nil { @@ -694,7 +699,7 @@ func (c *conversationProfilesGRPCClient) CreateConversationProfile(ctx context.C var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.CreateConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.CreateConversationProfile, req, settings.GRPC, c.logger, "CreateConversationProfile") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *conversationProfilesGRPCClient) UpdateConversationProfile(ctx context.C var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.UpdateConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.UpdateConversationProfile, req, settings.GRPC, c.logger, "UpdateConversationProfile") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *conversationProfilesGRPCClient) DeleteConversationProfile(ctx context.C opts = append((*c.CallOptions).DeleteConversationProfile[0:len((*c.CallOptions).DeleteConversationProfile):len((*c.CallOptions).DeleteConversationProfile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationProfilesClient.DeleteConversationProfile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationProfilesClient.DeleteConversationProfile, req, settings.GRPC, c.logger, "DeleteConversationProfile") return err }, opts...) return err @@ -744,7 +749,7 @@ func (c *conversationProfilesGRPCClient) SetSuggestionFeatureConfig(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.SetSuggestionFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.SetSuggestionFeatureConfig, req, settings.GRPC, c.logger, "SetSuggestionFeatureConfig") return err }, opts...) if err != nil { @@ -764,7 +769,7 @@ func (c *conversationProfilesGRPCClient) ClearSuggestionFeatureConfig(ctx contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.ClearSuggestionFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.ClearSuggestionFeatureConfig, req, settings.GRPC, c.logger, "ClearSuggestionFeatureConfig") return err }, opts...) if err != nil { @@ -784,7 +789,7 @@ func (c *conversationProfilesGRPCClient) GetLocation(ctx context.Context, req *l var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -813,7 +818,7 @@ func (c *conversationProfilesGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *conversationProfilesGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -862,7 +867,7 @@ func (c *conversationProfilesGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -891,7 +896,7 @@ func (c *conversationProfilesGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -962,21 +967,10 @@ func (c *conversationProfilesRESTClient) ListConversationProfiles(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversationProfiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1039,17 +1033,7 @@ func (c *conversationProfilesRESTClient) GetConversationProfile(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversationProfile") if err != nil { return err } @@ -1113,17 +1097,7 @@ func (c *conversationProfilesRESTClient) CreateConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversationProfile") if err != nil { return err } @@ -1194,17 +1168,7 @@ func (c *conversationProfilesRESTClient) UpdateConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversationProfile") if err != nil { return err } @@ -1251,15 +1215,8 @@ func (c *conversationProfilesRESTClient) DeleteConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversationProfile") + return err }, opts...) } @@ -1319,21 +1276,10 @@ func (c *conversationProfilesRESTClient) SetSuggestionFeatureConfig(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSuggestionFeatureConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1400,21 +1346,10 @@ func (c *conversationProfilesRESTClient) ClearSuggestionFeatureConfig(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClearSuggestionFeatureConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1465,17 +1400,7 @@ func (c *conversationProfilesRESTClient) GetLocation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1540,21 +1465,10 @@ func (c *conversationProfilesRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1614,15 +1528,8 @@ func (c *conversationProfilesRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1659,17 +1566,7 @@ func (c *conversationProfilesRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1734,21 +1631,10 @@ func (c *conversationProfilesRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/conversation_profiles_client_example_go123_test.go b/dialogflow/apiv2/conversation_profiles_client_example_go123_test.go index 26dc97bbe07c..2be6f73335f7 100644 --- a/dialogflow/apiv2/conversation_profiles_client_example_go123_test.go +++ b/dialogflow/apiv2/conversation_profiles_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationProfilesClient_ListConversationProfiles_all() { } for resp, err := range c.ListConversationProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationProfilesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationProfilesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/conversations_client.go b/dialogflow/apiv2/conversations_client.go index 7d8ddaf487e9..c7b28a3d03a6 100755 --- a/dialogflow/apiv2/conversations_client.go +++ b/dialogflow/apiv2/conversations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -478,6 +477,8 @@ type conversationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationsClient creates a new conversations client based on gRPC. @@ -505,6 +506,7 @@ func NewConversationsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, conversationsClient: dialogflowpb.NewConversationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -553,6 +555,8 @@ type conversationsRESTClient struct { // Points back to the CallOptions field of the containing ConversationsClient CallOptions **ConversationsCallOptions + + logger *slog.Logger } // NewConversationsRESTClient creates a new conversations rest client. @@ -571,6 +575,7 @@ func NewConversationsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -623,7 +628,7 @@ func (c *conversationsGRPCClient) CreateConversation(ctx context.Context, req *d var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *conversationsGRPCClient) ListConversations(ctx context.Context, req *di } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *conversationsGRPCClient) GetConversation(ctx context.Context, req *dial var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *conversationsGRPCClient) CompleteConversation(ctx context.Context, req var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.CompleteConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.CompleteConversation, req, settings.GRPC, c.logger, "CompleteConversation") return err }, opts...) if err != nil { @@ -734,7 +739,7 @@ func (c *conversationsGRPCClient) ListMessages(ctx context.Context, req *dialogf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.ListMessages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.ListMessages, req, settings.GRPC, c.logger, "ListMessages") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *conversationsGRPCClient) SuggestConversationSummary(ctx context.Context var resp *dialogflowpb.SuggestConversationSummaryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.SuggestConversationSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.SuggestConversationSummary, req, settings.GRPC, c.logger, "SuggestConversationSummary") return err }, opts...) if err != nil { @@ -787,7 +792,7 @@ func (c *conversationsGRPCClient) GenerateStatelessSummary(ctx context.Context, var resp *dialogflowpb.GenerateStatelessSummaryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GenerateStatelessSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GenerateStatelessSummary, req, settings.GRPC, c.logger, "GenerateStatelessSummary") return err }, opts...) if err != nil { @@ -805,7 +810,7 @@ func (c *conversationsGRPCClient) GenerateStatelessSuggestion(ctx context.Contex var resp *dialogflowpb.GenerateStatelessSuggestionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GenerateStatelessSuggestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GenerateStatelessSuggestion, req, settings.GRPC, c.logger, "GenerateStatelessSuggestion") return err }, opts...) if err != nil { @@ -823,7 +828,7 @@ func (c *conversationsGRPCClient) SearchKnowledge(ctx context.Context, req *dial var resp *dialogflowpb.SearchKnowledgeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.SearchKnowledge(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.SearchKnowledge, req, settings.GRPC, c.logger, "SearchKnowledge") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *conversationsGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *conversationsGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -904,7 +909,7 @@ func (c *conversationsGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -919,7 +924,7 @@ func (c *conversationsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -948,7 +953,7 @@ func (c *conversationsGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1037,17 +1042,7 @@ func (c *conversationsRESTClient) CreateConversation(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -1112,21 +1107,10 @@ func (c *conversationsRESTClient) ListConversations(ctx context.Context, req *di } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1189,17 +1173,7 @@ func (c *conversationsRESTClient) GetConversation(ctx context.Context, req *dial httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -1256,17 +1230,7 @@ func (c *conversationsRESTClient) CompleteConversation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteConversation") if err != nil { return err } @@ -1334,21 +1298,10 @@ func (c *conversationsRESTClient) ListMessages(ctx context.Context, req *dialogf } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMessages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1419,17 +1372,7 @@ func (c *conversationsRESTClient) SuggestConversationSummary(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestConversationSummary") if err != nil { return err } @@ -1486,17 +1429,7 @@ func (c *conversationsRESTClient) GenerateStatelessSummary(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateStatelessSummary") if err != nil { return err } @@ -1553,17 +1486,7 @@ func (c *conversationsRESTClient) GenerateStatelessSuggestion(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateStatelessSuggestion") if err != nil { return err } @@ -1619,17 +1542,7 @@ func (c *conversationsRESTClient) SearchKnowledge(ctx context.Context, req *dial httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchKnowledge") if err != nil { return err } @@ -1679,17 +1592,7 @@ func (c *conversationsRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1754,21 +1657,10 @@ func (c *conversationsRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1828,15 +1720,8 @@ func (c *conversationsRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1873,17 +1758,7 @@ func (c *conversationsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1948,21 +1823,10 @@ func (c *conversationsRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/conversations_client_example_go123_test.go b/dialogflow/apiv2/conversations_client_example_go123_test.go index 010a45b96f98..5e6182bd7645 100644 --- a/dialogflow/apiv2/conversations_client_example_go123_test.go +++ b/dialogflow/apiv2/conversations_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationsClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationsClient_ListMessages_all() { } for resp, err := range c.ListMessages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleConversationsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/dialogflowpb/agent.pb.go b/dialogflow/apiv2/dialogflowpb/agent.pb.go index e6a419e30719..56191cd9d33d 100755 --- a/dialogflow/apiv2/dialogflowpb/agent.pb.go +++ b/dialogflow/apiv2/dialogflowpb/agent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/agent.proto @@ -282,11 +282,9 @@ type Agent struct { func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -297,7 +295,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +409,9 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentRequest) String() string { @@ -426,7 +422,7 @@ func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +459,9 @@ type SetAgentRequest struct { func (x *SetAgentRequest) Reset() { *x = SetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetAgentRequest) String() string { @@ -478,7 +472,7 @@ func (*SetAgentRequest) ProtoMessage() {} func (x *SetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +515,9 @@ type DeleteAgentRequest struct { func (x *DeleteAgentRequest) Reset() { *x = DeleteAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAgentRequest) String() string { @@ -536,7 +528,7 @@ func (*DeleteAgentRequest) ProtoMessage() {} func (x *DeleteAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +569,9 @@ type SearchAgentsRequest struct { func (x *SearchAgentsRequest) Reset() { *x = SearchAgentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAgentsRequest) String() string { @@ -592,7 +582,7 @@ func (*SearchAgentsRequest) ProtoMessage() {} func (x *SearchAgentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +635,9 @@ type SearchAgentsResponse struct { func (x *SearchAgentsResponse) Reset() { *x = SearchAgentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAgentsResponse) String() string { @@ -660,7 +648,7 @@ func (*SearchAgentsResponse) ProtoMessage() {} func (x *SearchAgentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +691,9 @@ type TrainAgentRequest struct { func (x *TrainAgentRequest) Reset() { *x = TrainAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainAgentRequest) String() string { @@ -718,7 +704,7 @@ func (*TrainAgentRequest) ProtoMessage() {} func (x *TrainAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +751,9 @@ type ExportAgentRequest struct { func (x *ExportAgentRequest) Reset() { *x = ExportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest) String() string { @@ -780,7 +764,7 @@ func (*ExportAgentRequest) ProtoMessage() {} func (x *ExportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +811,9 @@ type ExportAgentResponse struct { func (x *ExportAgentResponse) Reset() { *x = ExportAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentResponse) String() string { @@ -842,7 +824,7 @@ func (*ExportAgentResponse) ProtoMessage() {} func (x *ExportAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +900,9 @@ type ImportAgentRequest struct { func (x *ImportAgentRequest) Reset() { *x = ImportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAgentRequest) String() string { @@ -933,7 +913,7 @@ func (*ImportAgentRequest) ProtoMessage() {} func (x *ImportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,11 +1002,9 @@ type RestoreAgentRequest struct { func (x *RestoreAgentRequest) Reset() { *x = RestoreAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest) String() string { @@ -1037,7 +1015,7 @@ func (*RestoreAgentRequest) ProtoMessage() {} func (x *RestoreAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1103,9 @@ type GetValidationResultRequest struct { func (x *GetValidationResultRequest) Reset() { *x = GetValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetValidationResultRequest) String() string { @@ -1140,7 +1116,7 @@ func (*GetValidationResultRequest) ProtoMessage() {} func (x *GetValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_agent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1574,152 +1550,6 @@ func file_google_cloud_dialogflow_v2_agent_proto_init() { return } file_google_cloud_dialogflow_v2_validation_result_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchAgentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchAgentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TrainAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_agent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_agent_proto_msgTypes[8].OneofWrappers = []any{ (*ExportAgentResponse_AgentUri)(nil), (*ExportAgentResponse_AgentContent)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/answer_record.pb.go b/dialogflow/apiv2/dialogflowpb/answer_record.pb.go index 6b53467163f4..ef2019041055 100755 --- a/dialogflow/apiv2/dialogflowpb/answer_record.pb.go +++ b/dialogflow/apiv2/dialogflowpb/answer_record.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/answer_record.proto @@ -312,11 +312,9 @@ type AnswerRecord struct { func (x *AnswerRecord) Reset() { *x = AnswerRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerRecord) String() string { @@ -327,7 +325,7 @@ func (*AnswerRecord) ProtoMessage() {} func (x *AnswerRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +412,9 @@ type ListAnswerRecordsRequest struct { func (x *ListAnswerRecordsRequest) Reset() { *x = ListAnswerRecordsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnswerRecordsRequest) String() string { @@ -429,7 +425,7 @@ func (*ListAnswerRecordsRequest) ProtoMessage() {} func (x *ListAnswerRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +489,9 @@ type ListAnswerRecordsResponse struct { func (x *ListAnswerRecordsResponse) Reset() { *x = ListAnswerRecordsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnswerRecordsResponse) String() string { @@ -508,7 +502,7 @@ func (*ListAnswerRecordsResponse) ProtoMessage() {} func (x *ListAnswerRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +546,9 @@ type UpdateAnswerRecordRequest struct { func (x *UpdateAnswerRecordRequest) Reset() { *x = UpdateAnswerRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAnswerRecordRequest) String() string { @@ -567,7 +559,7 @@ func (*UpdateAnswerRecordRequest) ProtoMessage() {} func (x *UpdateAnswerRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -627,11 +619,9 @@ type AnswerFeedback struct { func (x *AnswerFeedback) Reset() { *x = AnswerFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback) String() string { @@ -642,7 +632,7 @@ func (*AnswerFeedback) ProtoMessage() {} func (x *AnswerFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +749,9 @@ type AgentAssistantFeedback struct { func (x *AgentAssistantFeedback) Reset() { *x = AgentAssistantFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback) String() string { @@ -774,7 +762,7 @@ func (*AgentAssistantFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +837,9 @@ type AgentAssistantRecord struct { func (x *AgentAssistantRecord) Reset() { *x = AgentAssistantRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantRecord) String() string { @@ -864,7 +850,7 @@ func (*AgentAssistantRecord) ProtoMessage() {} func (x *AgentAssistantRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +936,9 @@ type AgentAssistantFeedback_SummarizationFeedback struct { func (x *AgentAssistantFeedback_SummarizationFeedback) Reset() { *x = AgentAssistantFeedback_SummarizationFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_SummarizationFeedback) String() string { @@ -965,7 +949,7 @@ func (*AgentAssistantFeedback_SummarizationFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_SummarizationFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,11 +1013,9 @@ type AgentAssistantFeedback_KnowledgeSearchFeedback struct { func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) Reset() { *x = AgentAssistantFeedback_KnowledgeSearchFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) String() string { @@ -1044,7 +1026,7 @@ func (*AgentAssistantFeedback_KnowledgeSearchFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1076,9 @@ type AgentAssistantFeedback_KnowledgeAssistFeedback struct { func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) Reset() { *x = AgentAssistantFeedback_KnowledgeAssistFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) String() string { @@ -1109,7 +1089,7 @@ func (*AgentAssistantFeedback_KnowledgeAssistFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,128 +1490,6 @@ func file_google_cloud_dialogflow_v2_answer_record_proto_init() { return } file_google_cloud_dialogflow_v2_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnswerRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAnswerRecordsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAnswerRecordsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAnswerRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_SummarizationFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_KnowledgeSearchFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_KnowledgeAssistFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_answer_record_proto_msgTypes[0].OneofWrappers = []any{ (*AnswerRecord_AgentAssistantRecord)(nil), } diff --git a/dialogflow/apiv2/dialogflowpb/audio_config.pb.go b/dialogflow/apiv2/dialogflowpb/audio_config.pb.go index c4b79e2e4886..0d40db585132 100755 --- a/dialogflow/apiv2/dialogflowpb/audio_config.pb.go +++ b/dialogflow/apiv2/dialogflowpb/audio_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/audio_config.proto @@ -499,11 +499,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -514,7 +512,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +569,9 @@ type SpeechWordInfo struct { func (x *SpeechWordInfo) Reset() { *x = SpeechWordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechWordInfo) String() string { @@ -586,7 +582,7 @@ func (*SpeechWordInfo) ProtoMessage() {} func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +708,9 @@ type InputAudioConfig struct { func (x *InputAudioConfig) Reset() { *x = InputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAudioConfig) String() string { @@ -727,7 +721,7 @@ func (*InputAudioConfig) ProtoMessage() {} func (x *InputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -855,11 +849,9 @@ type VoiceSelectionParams struct { func (x *VoiceSelectionParams) Reset() { *x = VoiceSelectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceSelectionParams) String() string { @@ -870,7 +862,7 @@ func (*VoiceSelectionParams) ProtoMessage() {} func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +925,9 @@ type SynthesizeSpeechConfig struct { func (x *SynthesizeSpeechConfig) Reset() { *x = SynthesizeSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechConfig) String() string { @@ -948,7 +938,7 @@ func (*SynthesizeSpeechConfig) ProtoMessage() {} func (x *SynthesizeSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +1010,9 @@ type OutputAudioConfig struct { func (x *OutputAudioConfig) Reset() { *x = OutputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudioConfig) String() string { @@ -1035,7 +1023,7 @@ func (*OutputAudioConfig) ProtoMessage() {} func (x *OutputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1071,9 @@ type TelephonyDtmfEvents struct { func (x *TelephonyDtmfEvents) Reset() { *x = TelephonyDtmfEvents{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TelephonyDtmfEvents) String() string { @@ -1098,7 +1084,7 @@ func (*TelephonyDtmfEvents) ProtoMessage() {} func (x *TelephonyDtmfEvents) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1189,11 +1175,9 @@ type SpeechToTextConfig struct { func (x *SpeechToTextConfig) Reset() { *x = SpeechToTextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechToTextConfig) String() string { @@ -1204,7 +1188,7 @@ func (*SpeechToTextConfig) ProtoMessage() {} func (x *SpeechToTextConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1581,104 +1565,6 @@ func file_google_cloud_dialogflow_v2_audio_config_proto_init() { if File_google_cloud_dialogflow_v2_audio_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SpeechWordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VoiceSelectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TelephonyDtmfEvents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_audio_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SpeechToTextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/context.pb.go b/dialogflow/apiv2/dialogflowpb/context.pb.go index 05709f237e77..ac48f23f8fa5 100755 --- a/dialogflow/apiv2/dialogflowpb/context.pb.go +++ b/dialogflow/apiv2/dialogflowpb/context.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/context.proto @@ -105,11 +105,9 @@ type Context struct { func (x *Context) Reset() { *x = Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Context) String() string { @@ -120,7 +118,7 @@ func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type ListContextsRequest struct { func (x *ListContextsRequest) Reset() { *x = ListContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsRequest) String() string { @@ -194,7 +190,7 @@ func (*ListContextsRequest) ProtoMessage() {} func (x *ListContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +243,9 @@ type ListContextsResponse struct { func (x *ListContextsResponse) Reset() { *x = ListContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsResponse) String() string { @@ -262,7 +256,7 @@ func (*ListContextsResponse) ProtoMessage() {} func (x *ListContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type GetContextRequest struct { func (x *GetContextRequest) Reset() { *x = GetContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContextRequest) String() string { @@ -324,7 +316,7 @@ func (*GetContextRequest) ProtoMessage() {} func (x *GetContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +358,9 @@ type CreateContextRequest struct { func (x *CreateContextRequest) Reset() { *x = CreateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContextRequest) String() string { @@ -381,7 +371,7 @@ func (*CreateContextRequest) ProtoMessage() {} func (x *CreateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +415,9 @@ type UpdateContextRequest struct { func (x *UpdateContextRequest) Reset() { *x = UpdateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContextRequest) String() string { @@ -440,7 +428,7 @@ func (*UpdateContextRequest) ProtoMessage() {} func (x *UpdateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +475,9 @@ type DeleteContextRequest struct { func (x *DeleteContextRequest) Reset() { *x = DeleteContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContextRequest) String() string { @@ -502,7 +488,7 @@ func (*DeleteContextRequest) ProtoMessage() {} func (x *DeleteContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,11 +528,9 @@ type DeleteAllContextsRequest struct { func (x *DeleteAllContextsRequest) Reset() { *x = DeleteAllContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAllContextsRequest) String() string { @@ -557,7 +541,7 @@ func (*DeleteAllContextsRequest) ProtoMessage() {} func (x *DeleteAllContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_context_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -924,104 +908,6 @@ func file_google_cloud_dialogflow_v2_context_proto_init() { if File_google_cloud_dialogflow_v2_context_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_context_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAllContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/conversation.pb.go b/dialogflow/apiv2/dialogflowpb/conversation.pb.go index 42a1fe31bb22..3405e8434770 100755 --- a/dialogflow/apiv2/dialogflowpb/conversation.pb.go +++ b/dialogflow/apiv2/dialogflowpb/conversation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/conversation.proto @@ -429,11 +429,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -444,7 +442,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +533,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -550,7 +546,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +610,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -629,7 +623,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +683,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -704,7 +696,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +740,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -763,7 +753,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +790,9 @@ type CompleteConversationRequest struct { func (x *CompleteConversationRequest) Reset() { *x = CompleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteConversationRequest) String() string { @@ -815,7 +803,7 @@ func (*CompleteConversationRequest) ProtoMessage() {} func (x *CompleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +854,9 @@ type ListMessagesRequest struct { func (x *ListMessagesRequest) Reset() { *x = ListMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesRequest) String() string { @@ -881,7 +867,7 @@ func (*ListMessagesRequest) ProtoMessage() {} func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,11 +928,9 @@ type ListMessagesResponse struct { func (x *ListMessagesResponse) Reset() { *x = ListMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesResponse) String() string { @@ -957,7 +941,7 @@ func (*ListMessagesResponse) ProtoMessage() {} func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +983,9 @@ type ConversationPhoneNumber struct { func (x *ConversationPhoneNumber) Reset() { *x = ConversationPhoneNumber{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationPhoneNumber) String() string { @@ -1014,7 +996,7 @@ func (*ConversationPhoneNumber) ProtoMessage() {} func (x *ConversationPhoneNumber) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1047,9 @@ type SuggestConversationSummaryRequest struct { func (x *SuggestConversationSummaryRequest) Reset() { *x = SuggestConversationSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryRequest) String() string { @@ -1080,7 +1060,7 @@ func (*SuggestConversationSummaryRequest) ProtoMessage() {} func (x *SuggestConversationSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,11 +1129,9 @@ type SuggestConversationSummaryResponse struct { func (x *SuggestConversationSummaryResponse) Reset() { *x = SuggestConversationSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryResponse) String() string { @@ -1164,7 +1142,7 @@ func (*SuggestConversationSummaryResponse) ProtoMessage() {} func (x *SuggestConversationSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1227,11 +1205,9 @@ type GenerateStatelessSummaryRequest struct { func (x *GenerateStatelessSummaryRequest) Reset() { *x = GenerateStatelessSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryRequest) String() string { @@ -1242,7 +1218,7 @@ func (*GenerateStatelessSummaryRequest) ProtoMessage() {} func (x *GenerateStatelessSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1309,11 +1285,9 @@ type GenerateStatelessSummaryResponse struct { func (x *GenerateStatelessSummaryResponse) Reset() { *x = GenerateStatelessSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryResponse) String() string { @@ -1324,7 +1298,7 @@ func (*GenerateStatelessSummaryResponse) ProtoMessage() {} func (x *GenerateStatelessSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1360,9 @@ type GenerateStatelessSuggestionRequest struct { func (x *GenerateStatelessSuggestionRequest) Reset() { *x = GenerateStatelessSuggestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSuggestionRequest) String() string { @@ -1401,7 +1373,7 @@ func (*GenerateStatelessSuggestionRequest) ProtoMessage() {} func (x *GenerateStatelessSuggestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1493,11 +1465,9 @@ type GenerateStatelessSuggestionResponse struct { func (x *GenerateStatelessSuggestionResponse) Reset() { *x = GenerateStatelessSuggestionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSuggestionResponse) String() string { @@ -1508,7 +1478,7 @@ func (*GenerateStatelessSuggestionResponse) ProtoMessage() {} func (x *GenerateStatelessSuggestionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,11 +1564,9 @@ type SearchKnowledgeRequest struct { func (x *SearchKnowledgeRequest) Reset() { *x = SearchKnowledgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest) String() string { @@ -1609,7 +1577,7 @@ func (*SearchKnowledgeRequest) ProtoMessage() {} func (x *SearchKnowledgeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1710,11 +1678,9 @@ type SearchKnowledgeResponse struct { func (x *SearchKnowledgeResponse) Reset() { *x = SearchKnowledgeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeResponse) String() string { @@ -1725,7 +1691,7 @@ func (*SearchKnowledgeResponse) ProtoMessage() {} func (x *SearchKnowledgeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1775,11 +1741,9 @@ type SearchKnowledgeAnswer struct { func (x *SearchKnowledgeAnswer) Reset() { *x = SearchKnowledgeAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeAnswer) String() string { @@ -1790,7 +1754,7 @@ func (*SearchKnowledgeAnswer) ProtoMessage() {} func (x *SearchKnowledgeAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1819,9 @@ type SuggestConversationSummaryResponse_Summary struct { func (x *SuggestConversationSummaryResponse_Summary) Reset() { *x = SuggestConversationSummaryResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryResponse_Summary) String() string { @@ -1870,7 +1832,7 @@ func (*SuggestConversationSummaryResponse_Summary) ProtoMessage() {} func (x *SuggestConversationSummaryResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1933,11 +1895,9 @@ type GenerateStatelessSummaryRequest_MinimalConversation struct { func (x *GenerateStatelessSummaryRequest_MinimalConversation) Reset() { *x = GenerateStatelessSummaryRequest_MinimalConversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryRequest_MinimalConversation) String() string { @@ -1948,7 +1908,7 @@ func (*GenerateStatelessSummaryRequest_MinimalConversation) ProtoMessage() {} func (x *GenerateStatelessSummaryRequest_MinimalConversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1996,11 +1956,9 @@ type GenerateStatelessSummaryResponse_Summary struct { func (x *GenerateStatelessSummaryResponse_Summary) Reset() { *x = GenerateStatelessSummaryResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryResponse_Summary) String() string { @@ -2011,7 +1969,7 @@ func (*GenerateStatelessSummaryResponse_Summary) ProtoMessage() {} func (x *GenerateStatelessSummaryResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2061,11 +2019,9 @@ type SearchKnowledgeRequest_SearchConfig struct { func (x *SearchKnowledgeRequest_SearchConfig) Reset() { *x = SearchKnowledgeRequest_SearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig) String() string { @@ -2076,7 +2032,7 @@ func (*SearchKnowledgeRequest_SearchConfig) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,11 +2078,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs struct { func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) String() string { @@ -2137,7 +2091,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2185,11 +2139,9 @@ type SearchKnowledgeRequest_SearchConfig_FilterSpecs struct { func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) Reset() { *x = SearchKnowledgeRequest_SearchConfig_FilterSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) String() string { @@ -2200,7 +2152,7 @@ func (*SearchKnowledgeRequest_SearchConfig_FilterSpecs) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2199,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec struct { func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) String() string { @@ -2262,7 +2212,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) ProtoMessage() func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2326,11 +2276,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) String() string { @@ -2341,7 +2289,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2407,11 +2355,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -2423,7 +2369,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2477,11 +2423,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -2493,7 +2437,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2470,9 @@ type SearchKnowledgeAnswer_AnswerSource struct { func (x *SearchKnowledgeAnswer_AnswerSource) Reset() { *x = SearchKnowledgeAnswer_AnswerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeAnswer_AnswerSource) String() string { @@ -2541,7 +2483,7 @@ func (*SearchKnowledgeAnswer_AnswerSource) ProtoMessage() {} func (x *SearchKnowledgeAnswer_AnswerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3447,356 +3389,6 @@ func file_google_cloud_dialogflow_v2_conversation_proto_init() { file_google_cloud_dialogflow_v2_generator_proto_init() file_google_cloud_dialogflow_v2_participant_proto_init() file_google_cloud_dialogflow_v2_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CompleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ConversationPhoneNumber); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSuggestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSuggestionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryRequest_MinimalConversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_FilterSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeAnswer_AnswerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_conversation_proto_msgTypes[13].OneofWrappers = []any{ (*GenerateStatelessSuggestionRequest_Generator)(nil), (*GenerateStatelessSuggestionRequest_GeneratorName)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/conversation_dataset.pb.go b/dialogflow/apiv2/dialogflowpb/conversation_dataset.pb.go index 3e3d62ead216..f1254e81dfa2 100755 --- a/dialogflow/apiv2/dialogflowpb/conversation_dataset.pb.go +++ b/dialogflow/apiv2/dialogflowpb/conversation_dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/conversation_dataset.proto @@ -58,11 +58,9 @@ type ConversationInfo struct { func (x *ConversationInfo) Reset() { *x = ConversationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationInfo) String() string { @@ -73,7 +71,7 @@ func (*ConversationInfo) ProtoMessage() {} func (x *ConversationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -127,7 +123,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +201,9 @@ type ConversationDataset struct { func (x *ConversationDataset) Reset() { *x = ConversationDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationDataset) String() string { @@ -220,7 +214,7 @@ func (*ConversationDataset) ProtoMessage() {} func (x *ConversationDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type CreateConversationDatasetRequest struct { func (x *CreateConversationDatasetRequest) Reset() { *x = CreateConversationDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationDatasetRequest) String() string { @@ -329,7 +321,7 @@ func (*CreateConversationDatasetRequest) ProtoMessage() {} func (x *CreateConversationDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type GetConversationDatasetRequest struct { func (x *GetConversationDatasetRequest) Reset() { *x = GetConversationDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationDatasetRequest) String() string { @@ -388,7 +378,7 @@ func (*GetConversationDatasetRequest) ProtoMessage() {} func (x *GetConversationDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +419,9 @@ type ListConversationDatasetsRequest struct { func (x *ListConversationDatasetsRequest) Reset() { *x = ListConversationDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationDatasetsRequest) String() string { @@ -444,7 +432,7 @@ func (*ListConversationDatasetsRequest) ProtoMessage() {} func (x *ListConversationDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type ListConversationDatasetsResponse struct { func (x *ListConversationDatasetsResponse) Reset() { *x = ListConversationDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationDatasetsResponse) String() string { @@ -511,7 +497,7 @@ func (*ListConversationDatasetsResponse) ProtoMessage() {} func (x *ListConversationDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +541,9 @@ type DeleteConversationDatasetRequest struct { func (x *DeleteConversationDatasetRequest) Reset() { *x = DeleteConversationDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationDatasetRequest) String() string { @@ -570,7 +554,7 @@ func (*DeleteConversationDatasetRequest) ProtoMessage() {} func (x *DeleteConversationDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +593,9 @@ type ImportConversationDataRequest struct { func (x *ImportConversationDataRequest) Reset() { *x = ImportConversationDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportConversationDataRequest) String() string { @@ -624,7 +606,7 @@ func (*ImportConversationDataRequest) ProtoMessage() {} func (x *ImportConversationDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +657,9 @@ type ImportConversationDataOperationMetadata struct { func (x *ImportConversationDataOperationMetadata) Reset() { *x = ImportConversationDataOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportConversationDataOperationMetadata) String() string { @@ -690,7 +670,7 @@ func (*ImportConversationDataOperationMetadata) ProtoMessage() {} func (x *ImportConversationDataOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +724,9 @@ type ImportConversationDataOperationResponse struct { func (x *ImportConversationDataOperationResponse) Reset() { *x = ImportConversationDataOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportConversationDataOperationResponse) String() string { @@ -759,7 +737,7 @@ func (*ImportConversationDataOperationResponse) ProtoMessage() {} func (x *ImportConversationDataOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +780,9 @@ type CreateConversationDatasetOperationMetadata struct { func (x *CreateConversationDatasetOperationMetadata) Reset() { *x = CreateConversationDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationDatasetOperationMetadata) String() string { @@ -817,7 +793,7 @@ func (*CreateConversationDatasetOperationMetadata) ProtoMessage() {} func (x *CreateConversationDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +824,9 @@ type DeleteConversationDatasetOperationMetadata struct { func (x *DeleteConversationDatasetOperationMetadata) Reset() { *x = DeleteConversationDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationDatasetOperationMetadata) String() string { @@ -863,7 +837,7 @@ func (*DeleteConversationDatasetOperationMetadata) ProtoMessage() {} func (x *DeleteConversationDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1236,164 +1210,6 @@ func file_google_cloud_dialogflow_v2_conversation_dataset_proto_init() { return } file_google_cloud_dialogflow_v2_gcs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ConversationDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportConversationDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportConversationDataOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportConversationDataOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_conversation_dataset_proto_msgTypes[1].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), } diff --git a/dialogflow/apiv2/dialogflowpb/conversation_event.pb.go b/dialogflow/apiv2/dialogflowpb/conversation_event.pb.go index 28cf847bfbe7..9f28bef114a7 100755 --- a/dialogflow/apiv2/dialogflowpb/conversation_event.pb.go +++ b/dialogflow/apiv2/dialogflowpb/conversation_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/conversation_event.proto @@ -141,11 +141,9 @@ type ConversationEvent struct { func (x *ConversationEvent) Reset() { *x = ConversationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationEvent) String() string { @@ -156,7 +154,7 @@ func (*ConversationEvent) ProtoMessage() {} func (x *ConversationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,20 +305,6 @@ func file_google_cloud_dialogflow_v2_conversation_event_proto_init() { return } file_google_cloud_dialogflow_v2_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0].OneofWrappers = []any{ (*ConversationEvent_NewMessagePayload)(nil), } diff --git a/dialogflow/apiv2/dialogflowpb/conversation_model.pb.go b/dialogflow/apiv2/dialogflowpb/conversation_model.pb.go index 00614cf0d7f9..9609255b6d91 100755 --- a/dialogflow/apiv2/dialogflowpb/conversation_model.pb.go +++ b/dialogflow/apiv2/dialogflowpb/conversation_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/conversation_model.proto @@ -354,11 +354,9 @@ type ConversationModel struct { func (x *ConversationModel) Reset() { *x = ConversationModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationModel) String() string { @@ -369,7 +367,7 @@ func (*ConversationModel) ProtoMessage() {} func (x *ConversationModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +519,9 @@ type ConversationModelEvaluation struct { func (x *ConversationModelEvaluation) Reset() { *x = ConversationModelEvaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationModelEvaluation) String() string { @@ -536,7 +532,7 @@ func (*ConversationModelEvaluation) ProtoMessage() {} func (x *ConversationModelEvaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +626,9 @@ type EvaluationConfig struct { func (x *EvaluationConfig) Reset() { *x = EvaluationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationConfig) String() string { @@ -645,7 +639,7 @@ func (*EvaluationConfig) ProtoMessage() {} func (x *EvaluationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +715,9 @@ type InputDataset struct { func (x *InputDataset) Reset() { *x = InputDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputDataset) String() string { @@ -736,7 +728,7 @@ func (*InputDataset) ProtoMessage() {} func (x *InputDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +763,9 @@ type ArticleSuggestionModelMetadata struct { func (x *ArticleSuggestionModelMetadata) Reset() { *x = ArticleSuggestionModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArticleSuggestionModelMetadata) String() string { @@ -786,7 +776,7 @@ func (*ArticleSuggestionModelMetadata) ProtoMessage() {} func (x *ArticleSuggestionModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +811,9 @@ type SmartReplyModelMetadata struct { func (x *SmartReplyModelMetadata) Reset() { *x = SmartReplyModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyModelMetadata) String() string { @@ -836,7 +824,7 @@ func (*SmartReplyModelMetadata) ProtoMessage() {} func (x *SmartReplyModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +864,9 @@ type SmartReplyMetrics struct { func (x *SmartReplyMetrics) Reset() { *x = SmartReplyMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyMetrics) String() string { @@ -891,7 +877,7 @@ func (*SmartReplyMetrics) ProtoMessage() {} func (x *SmartReplyMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +929,9 @@ type CreateConversationModelRequest struct { func (x *CreateConversationModelRequest) Reset() { *x = CreateConversationModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationModelRequest) String() string { @@ -958,7 +942,7 @@ func (*CreateConversationModelRequest) ProtoMessage() {} func (x *CreateConversationModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1001,11 +985,9 @@ type GetConversationModelRequest struct { func (x *GetConversationModelRequest) Reset() { *x = GetConversationModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationModelRequest) String() string { @@ -1016,7 +998,7 @@ func (*GetConversationModelRequest) ProtoMessage() {} func (x *GetConversationModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1057,11 +1039,9 @@ type ListConversationModelsRequest struct { func (x *ListConversationModelsRequest) Reset() { *x = ListConversationModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationModelsRequest) String() string { @@ -1072,7 +1052,7 @@ func (*ListConversationModelsRequest) ProtoMessage() {} func (x *ListConversationModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1104,9 @@ type ListConversationModelsResponse struct { func (x *ListConversationModelsResponse) Reset() { *x = ListConversationModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationModelsResponse) String() string { @@ -1139,7 +1117,7 @@ func (*ListConversationModelsResponse) ProtoMessage() {} func (x *ListConversationModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1182,11 +1160,9 @@ type DeleteConversationModelRequest struct { func (x *DeleteConversationModelRequest) Reset() { *x = DeleteConversationModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationModelRequest) String() string { @@ -1197,7 +1173,7 @@ func (*DeleteConversationModelRequest) ProtoMessage() {} func (x *DeleteConversationModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1209,9 @@ type DeployConversationModelRequest struct { func (x *DeployConversationModelRequest) Reset() { *x = DeployConversationModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployConversationModelRequest) String() string { @@ -1248,7 +1222,7 @@ func (*DeployConversationModelRequest) ProtoMessage() {} func (x *DeployConversationModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1284,11 +1258,9 @@ type UndeployConversationModelRequest struct { func (x *UndeployConversationModelRequest) Reset() { *x = UndeployConversationModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployConversationModelRequest) String() string { @@ -1299,7 +1271,7 @@ func (*UndeployConversationModelRequest) ProtoMessage() {} func (x *UndeployConversationModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1336,11 +1308,9 @@ type GetConversationModelEvaluationRequest struct { func (x *GetConversationModelEvaluationRequest) Reset() { *x = GetConversationModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationModelEvaluationRequest) String() string { @@ -1351,7 +1321,7 @@ func (*GetConversationModelEvaluationRequest) ProtoMessage() {} func (x *GetConversationModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1392,11 +1362,9 @@ type ListConversationModelEvaluationsRequest struct { func (x *ListConversationModelEvaluationsRequest) Reset() { *x = ListConversationModelEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationModelEvaluationsRequest) String() string { @@ -1407,7 +1375,7 @@ func (*ListConversationModelEvaluationsRequest) ProtoMessage() {} func (x *ListConversationModelEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1459,11 +1427,9 @@ type ListConversationModelEvaluationsResponse struct { func (x *ListConversationModelEvaluationsResponse) Reset() { *x = ListConversationModelEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationModelEvaluationsResponse) String() string { @@ -1474,7 +1440,7 @@ func (*ListConversationModelEvaluationsResponse) ProtoMessage() {} func (x *ListConversationModelEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1486,9 @@ type CreateConversationModelEvaluationRequest struct { func (x *CreateConversationModelEvaluationRequest) Reset() { *x = CreateConversationModelEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationModelEvaluationRequest) String() string { @@ -1535,7 +1499,7 @@ func (*CreateConversationModelEvaluationRequest) ProtoMessage() {} func (x *CreateConversationModelEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1548,9 @@ type CreateConversationModelOperationMetadata struct { func (x *CreateConversationModelOperationMetadata) Reset() { *x = CreateConversationModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationModelOperationMetadata) String() string { @@ -1599,7 +1561,7 @@ func (*CreateConversationModelOperationMetadata) ProtoMessage() {} func (x *CreateConversationModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1615,9 @@ type DeployConversationModelOperationMetadata struct { func (x *DeployConversationModelOperationMetadata) Reset() { *x = DeployConversationModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployConversationModelOperationMetadata) String() string { @@ -1668,7 +1628,7 @@ func (*DeployConversationModelOperationMetadata) ProtoMessage() {} func (x *DeployConversationModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1675,9 @@ type UndeployConversationModelOperationMetadata struct { func (x *UndeployConversationModelOperationMetadata) Reset() { *x = UndeployConversationModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployConversationModelOperationMetadata) String() string { @@ -1730,7 +1688,7 @@ func (*UndeployConversationModelOperationMetadata) ProtoMessage() {} func (x *UndeployConversationModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1777,11 +1735,9 @@ type DeleteConversationModelOperationMetadata struct { func (x *DeleteConversationModelOperationMetadata) Reset() { *x = DeleteConversationModelOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationModelOperationMetadata) String() string { @@ -1792,7 +1748,7 @@ func (*DeleteConversationModelOperationMetadata) ProtoMessage() {} func (x *DeleteConversationModelOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,11 +1802,9 @@ type CreateConversationModelEvaluationOperationMetadata struct { func (x *CreateConversationModelEvaluationOperationMetadata) Reset() { *x = CreateConversationModelEvaluationOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationModelEvaluationOperationMetadata) String() string { @@ -1861,7 +1815,7 @@ func (*CreateConversationModelEvaluationOperationMetadata) ProtoMessage() {} func (x *CreateConversationModelEvaluationOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1923,11 +1877,9 @@ type EvaluationConfig_SmartReplyConfig struct { func (x *EvaluationConfig_SmartReplyConfig) Reset() { *x = EvaluationConfig_SmartReplyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationConfig_SmartReplyConfig) String() string { @@ -1938,7 +1890,7 @@ func (*EvaluationConfig_SmartReplyConfig) ProtoMessage() {} func (x *EvaluationConfig_SmartReplyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1938,9 @@ type EvaluationConfig_SmartComposeConfig struct { func (x *EvaluationConfig_SmartComposeConfig) Reset() { *x = EvaluationConfig_SmartComposeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationConfig_SmartComposeConfig) String() string { @@ -2001,7 +1951,7 @@ func (*EvaluationConfig_SmartComposeConfig) ProtoMessage() {} func (x *EvaluationConfig_SmartComposeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2049,11 +1999,9 @@ type SmartReplyMetrics_TopNMetrics struct { func (x *SmartReplyMetrics_TopNMetrics) Reset() { *x = SmartReplyMetrics_TopNMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyMetrics_TopNMetrics) String() string { @@ -2064,7 +2012,7 @@ func (*SmartReplyMetrics_TopNMetrics) ProtoMessage() {} func (x *SmartReplyMetrics_TopNMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2780,320 +2728,6 @@ func file_google_cloud_dialogflow_v2_conversation_model_proto_init() { if File_google_cloud_dialogflow_v2_conversation_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConversationModelEvaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InputDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ArticleSuggestionModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeployConversationModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UndeployConversationModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationModelEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationModelEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationModelEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeployConversationModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UndeployConversationModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationModelOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationModelEvaluationOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationConfig_SmartReplyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationConfig_SmartComposeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyMetrics_TopNMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_conversation_model_proto_msgTypes[0].OneofWrappers = []any{ (*ConversationModel_ArticleSuggestionModelMetadata)(nil), (*ConversationModel_SmartReplyModelMetadata)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/conversation_profile.pb.go b/dialogflow/apiv2/dialogflowpb/conversation_profile.pb.go index fabcb1104c24..b30fc420e3c6 100755 --- a/dialogflow/apiv2/dialogflowpb/conversation_profile.pb.go +++ b/dialogflow/apiv2/dialogflowpb/conversation_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/conversation_profile.proto @@ -300,11 +300,9 @@ type ConversationProfile struct { func (x *ConversationProfile) Reset() { *x = ConversationProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationProfile) String() string { @@ -315,7 +313,7 @@ func (*ConversationProfile) ProtoMessage() {} func (x *ConversationProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +452,9 @@ type ListConversationProfilesRequest struct { func (x *ListConversationProfilesRequest) Reset() { *x = ListConversationProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationProfilesRequest) String() string { @@ -469,7 +465,7 @@ func (*ListConversationProfilesRequest) ProtoMessage() {} func (x *ListConversationProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +518,9 @@ type ListConversationProfilesResponse struct { func (x *ListConversationProfilesResponse) Reset() { *x = ListConversationProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationProfilesResponse) String() string { @@ -537,7 +531,7 @@ func (*ListConversationProfilesResponse) ProtoMessage() {} func (x *ListConversationProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +575,9 @@ type GetConversationProfileRequest struct { func (x *GetConversationProfileRequest) Reset() { *x = GetConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationProfileRequest) String() string { @@ -596,7 +588,7 @@ func (*GetConversationProfileRequest) ProtoMessage() {} func (x *GetConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +626,9 @@ type CreateConversationProfileRequest struct { func (x *CreateConversationProfileRequest) Reset() { *x = CreateConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationProfileRequest) String() string { @@ -649,7 +639,7 @@ func (*CreateConversationProfileRequest) ProtoMessage() {} func (x *CreateConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +683,9 @@ type UpdateConversationProfileRequest struct { func (x *UpdateConversationProfileRequest) Reset() { *x = UpdateConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationProfileRequest) String() string { @@ -708,7 +696,7 @@ func (*UpdateConversationProfileRequest) ProtoMessage() {} func (x *UpdateConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +743,9 @@ type DeleteConversationProfileRequest struct { func (x *DeleteConversationProfileRequest) Reset() { *x = DeleteConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationProfileRequest) String() string { @@ -770,7 +756,7 @@ func (*DeleteConversationProfileRequest) ProtoMessage() {} func (x *DeleteConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,11 +811,9 @@ type AutomatedAgentConfig struct { func (x *AutomatedAgentConfig) Reset() { *x = AutomatedAgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedAgentConfig) String() string { @@ -840,7 +824,7 @@ func (*AutomatedAgentConfig) ProtoMessage() {} func (x *AutomatedAgentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +874,9 @@ type HumanAgentAssistantConfig struct { func (x *HumanAgentAssistantConfig) Reset() { *x = HumanAgentAssistantConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig) String() string { @@ -905,7 +887,7 @@ func (*HumanAgentAssistantConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,11 +951,9 @@ type HumanAgentHandoffConfig struct { func (x *HumanAgentHandoffConfig) Reset() { *x = HumanAgentHandoffConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig) String() string { @@ -984,7 +964,7 @@ func (*HumanAgentHandoffConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1047,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -1082,7 +1060,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1104,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -1141,7 +1117,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,11 +1153,9 @@ type SuggestionFeature struct { func (x *SuggestionFeature) Reset() { *x = SuggestionFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionFeature) String() string { @@ -1192,7 +1166,7 @@ func (*SuggestionFeature) ProtoMessage() {} func (x *SuggestionFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,11 +1208,9 @@ type SetSuggestionFeatureConfigRequest struct { func (x *SetSuggestionFeatureConfigRequest) Reset() { *x = SetSuggestionFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSuggestionFeatureConfigRequest) String() string { @@ -1249,7 +1221,7 @@ func (*SetSuggestionFeatureConfigRequest) ProtoMessage() {} func (x *SetSuggestionFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1305,11 +1277,9 @@ type ClearSuggestionFeatureConfigRequest struct { func (x *ClearSuggestionFeatureConfigRequest) Reset() { *x = ClearSuggestionFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearSuggestionFeatureConfigRequest) String() string { @@ -1320,7 +1290,7 @@ func (*ClearSuggestionFeatureConfigRequest) ProtoMessage() {} func (x *ClearSuggestionFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1379,11 +1349,9 @@ type SetSuggestionFeatureConfigOperationMetadata struct { func (x *SetSuggestionFeatureConfigOperationMetadata) Reset() { *x = SetSuggestionFeatureConfigOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSuggestionFeatureConfigOperationMetadata) String() string { @@ -1394,7 +1362,7 @@ func (*SetSuggestionFeatureConfigOperationMetadata) ProtoMessage() {} func (x *SetSuggestionFeatureConfigOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1460,11 +1428,9 @@ type ClearSuggestionFeatureConfigOperationMetadata struct { func (x *ClearSuggestionFeatureConfigOperationMetadata) Reset() { *x = ClearSuggestionFeatureConfigOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearSuggestionFeatureConfigOperationMetadata) String() string { @@ -1475,7 +1441,7 @@ func (*ClearSuggestionFeatureConfigOperationMetadata) ProtoMessage() {} func (x *ClearSuggestionFeatureConfigOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1533,11 +1499,9 @@ type HumanAgentAssistantConfig_SuggestionTriggerSettings struct { func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) Reset() { *x = HumanAgentAssistantConfig_SuggestionTriggerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) String() string { @@ -1548,7 +1512,7 @@ func (*HumanAgentAssistantConfig_SuggestionTriggerSettings) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1620,11 +1584,9 @@ type HumanAgentAssistantConfig_SuggestionFeatureConfig struct { func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionFeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) String() string { @@ -1635,7 +1597,7 @@ func (*HumanAgentAssistantConfig_SuggestionFeatureConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1717,9 @@ type HumanAgentAssistantConfig_SuggestionConfig struct { func (x *HumanAgentAssistantConfig_SuggestionConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionConfig) String() string { @@ -1770,7 +1730,7 @@ func (*HumanAgentAssistantConfig_SuggestionConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1864,11 +1824,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig struct { func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) String() string { @@ -1879,7 +1837,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2013,11 +1971,9 @@ type HumanAgentAssistantConfig_ConversationModelConfig struct { func (x *HumanAgentAssistantConfig_ConversationModelConfig) Reset() { *x = HumanAgentAssistantConfig_ConversationModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_ConversationModelConfig) String() string { @@ -2028,7 +1984,7 @@ func (*HumanAgentAssistantConfig_ConversationModelConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_ConversationModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2070,11 +2026,9 @@ type HumanAgentAssistantConfig_ConversationProcessConfig struct { func (x *HumanAgentAssistantConfig_ConversationProcessConfig) Reset() { *x = HumanAgentAssistantConfig_ConversationProcessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_ConversationProcessConfig) String() string { @@ -2085,7 +2039,7 @@ func (*HumanAgentAssistantConfig_ConversationProcessConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_ConversationProcessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2145,11 +2099,9 @@ type HumanAgentAssistantConfig_MessageAnalysisConfig struct { func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) Reset() { *x = HumanAgentAssistantConfig_MessageAnalysisConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) String() string { @@ -2160,7 +2112,7 @@ func (*HumanAgentAssistantConfig_MessageAnalysisConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2206,11 +2158,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource st func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) String() string { @@ -2221,7 +2171,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2260,11 +2210,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource struct func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) String() string { @@ -2275,7 +2223,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) Prot func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2316,11 +2264,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource struc func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) String() string { @@ -2331,7 +2277,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) Pr func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2324,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings struc func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) String() string { @@ -2393,7 +2337,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) Pr func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2448,11 +2392,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_Sections struct { func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_Sections{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) String() string { @@ -2463,7 +2405,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) ProtoMessage() func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2500,11 +2442,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_Human func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) String() string { @@ -2516,7 +2456,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_Hum func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2551,11 +2491,9 @@ type HumanAgentHandoffConfig_LivePersonConfig struct { func (x *HumanAgentHandoffConfig_LivePersonConfig) Reset() { *x = HumanAgentHandoffConfig_LivePersonConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig_LivePersonConfig) String() string { @@ -2566,7 +2504,7 @@ func (*HumanAgentHandoffConfig_LivePersonConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig_LivePersonConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2609,11 +2547,9 @@ type HumanAgentHandoffConfig_SalesforceLiveAgentConfig struct { func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) Reset() { *x = HumanAgentHandoffConfig_SalesforceLiveAgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) String() string { @@ -2624,7 +2560,7 @@ func (*HumanAgentHandoffConfig_SalesforceLiveAgentConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3606,392 +3542,6 @@ func file_google_cloud_dialogflow_v2_conversation_profile_proto_init() { } file_google_cloud_dialogflow_v2_audio_config_proto_init() file_google_cloud_dialogflow_v2_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedAgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SetSuggestionFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ClearSuggestionFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SetSuggestionFeatureConfigOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ClearSuggestionFeatureConfigOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionTriggerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionFeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_ConversationModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_ConversationProcessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_MessageAnalysisConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_Sections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig_LivePersonConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig_SalesforceLiveAgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_conversation_profile_proto_msgTypes[9].OneofWrappers = []any{ (*HumanAgentHandoffConfig_LivePersonConfig_)(nil), (*HumanAgentHandoffConfig_SalesforceLiveAgentConfig_)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/document.pb.go b/dialogflow/apiv2/dialogflowpb/document.pb.go index e16deecac279..7ca45b3c7a8f 100755 --- a/dialogflow/apiv2/dialogflowpb/document.pb.go +++ b/dialogflow/apiv2/dialogflowpb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/document.proto @@ -300,11 +300,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -315,7 +313,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +447,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -464,7 +460,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +524,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -543,7 +537,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +596,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -617,7 +609,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +655,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -678,7 +668,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +730,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -755,7 +743,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,11 +828,9 @@ type ImportDocumentTemplate struct { func (x *ImportDocumentTemplate) Reset() { *x = ImportDocumentTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentTemplate) String() string { @@ -855,7 +841,7 @@ func (*ImportDocumentTemplate) ProtoMessage() {} func (x *ImportDocumentTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +890,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -919,7 +903,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +940,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -971,7 +953,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +992,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -1025,7 +1005,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1068,9 @@ type ReloadDocumentRequest struct { func (x *ReloadDocumentRequest) Reset() { *x = ReloadDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReloadDocumentRequest) String() string { @@ -1103,7 +1081,7 @@ func (*ReloadDocumentRequest) ProtoMessage() {} func (x *ReloadDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1195,11 +1173,9 @@ type ExportDocumentRequest struct { func (x *ExportDocumentRequest) Reset() { *x = ExportDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDocumentRequest) String() string { @@ -1210,7 +1186,7 @@ func (*ExportDocumentRequest) ProtoMessage() {} func (x *ExportDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1283,11 +1259,9 @@ type ExportOperationMetadata struct { func (x *ExportOperationMetadata) Reset() { *x = ExportOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportOperationMetadata) String() string { @@ -1298,7 +1272,7 @@ func (*ExportOperationMetadata) ProtoMessage() {} func (x *ExportOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1314,9 @@ type KnowledgeOperationMetadata struct { func (x *KnowledgeOperationMetadata) Reset() { *x = KnowledgeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeOperationMetadata) String() string { @@ -1355,7 +1327,7 @@ func (*KnowledgeOperationMetadata) ProtoMessage() {} func (x *KnowledgeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1398,9 @@ type Document_ReloadStatus struct { func (x *Document_ReloadStatus) Reset() { *x = Document_ReloadStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ReloadStatus) String() string { @@ -1441,7 +1411,7 @@ func (*Document_ReloadStatus) ProtoMessage() {} func (x *Document_ReloadStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_document_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,188 +1990,6 @@ func file_google_cloud_dialogflow_v2_document_proto_init() { return } file_google_cloud_dialogflow_v2_gcs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ReloadDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExportDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_document_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Document_ReloadStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_ContentUri)(nil), (*Document_RawContent)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/encryption_spec.pb.go b/dialogflow/apiv2/dialogflowpb/encryption_spec.pb.go index d3caaf9dcd7e..3efc5a2a9981 100755 --- a/dialogflow/apiv2/dialogflowpb/encryption_spec.pb.go +++ b/dialogflow/apiv2/dialogflowpb/encryption_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/encryption_spec.proto @@ -53,11 +53,9 @@ type GetEncryptionSpecRequest struct { func (x *GetEncryptionSpecRequest) Reset() { *x = GetEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEncryptionSpecRequest) String() string { @@ -68,7 +66,7 @@ func (*GetEncryptionSpecRequest) ProtoMessage() {} func (x *GetEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type EncryptionSpec struct { func (x *EncryptionSpec) Reset() { *x = EncryptionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionSpec) String() string { @@ -126,7 +122,7 @@ func (*EncryptionSpec) ProtoMessage() {} func (x *EncryptionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +166,9 @@ type InitializeEncryptionSpecRequest struct { func (x *InitializeEncryptionSpecRequest) Reset() { *x = InitializeEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecRequest) String() string { @@ -185,7 +179,7 @@ func (*InitializeEncryptionSpecRequest) ProtoMessage() {} func (x *InitializeEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +210,9 @@ type InitializeEncryptionSpecResponse struct { func (x *InitializeEncryptionSpecResponse) Reset() { *x = InitializeEncryptionSpecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecResponse) String() string { @@ -231,7 +223,7 @@ func (*InitializeEncryptionSpecResponse) ProtoMessage() {} func (x *InitializeEncryptionSpecResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +250,9 @@ type InitializeEncryptionSpecMetadata struct { func (x *InitializeEncryptionSpecMetadata) Reset() { *x = InitializeEncryptionSpecMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecMetadata) String() string { @@ -273,7 +263,7 @@ func (*InitializeEncryptionSpecMetadata) ProtoMessage() {} func (x *InitializeEncryptionSpecMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,68 +432,6 @@ func file_google_cloud_dialogflow_v2_encryption_spec_proto_init() { if File_google_cloud_dialogflow_v2_encryption_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_encryption_spec_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/entity_type.pb.go b/dialogflow/apiv2/dialogflowpb/entity_type.pb.go index 9fee33a7b99c..fa19631e899d 100755 --- a/dialogflow/apiv2/dialogflowpb/entity_type.pb.go +++ b/dialogflow/apiv2/dialogflowpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/entity_type.proto @@ -197,11 +197,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -212,7 +210,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +292,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -309,7 +305,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -384,7 +378,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +427,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -448,7 +440,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +491,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -514,7 +504,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +561,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -586,7 +574,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +624,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -651,7 +637,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +693,9 @@ type BatchUpdateEntityTypesRequest struct { func (x *BatchUpdateEntityTypesRequest) Reset() { *x = BatchUpdateEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntityTypesRequest) String() string { @@ -722,7 +706,7 @@ func (*BatchUpdateEntityTypesRequest) ProtoMessage() {} func (x *BatchUpdateEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +799,9 @@ type BatchUpdateEntityTypesResponse struct { func (x *BatchUpdateEntityTypesResponse) Reset() { *x = BatchUpdateEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntityTypesResponse) String() string { @@ -830,7 +812,7 @@ func (*BatchUpdateEntityTypesResponse) ProtoMessage() {} func (x *BatchUpdateEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +851,9 @@ type BatchDeleteEntityTypesRequest struct { func (x *BatchDeleteEntityTypesRequest) Reset() { *x = BatchDeleteEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteEntityTypesRequest) String() string { @@ -884,7 +864,7 @@ func (*BatchDeleteEntityTypesRequest) ProtoMessage() {} func (x *BatchDeleteEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +915,9 @@ type BatchCreateEntitiesRequest struct { func (x *BatchCreateEntitiesRequest) Reset() { *x = BatchCreateEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateEntitiesRequest) String() string { @@ -950,7 +928,7 @@ func (*BatchCreateEntitiesRequest) ProtoMessage() {} func (x *BatchCreateEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +988,9 @@ type BatchUpdateEntitiesRequest struct { func (x *BatchUpdateEntitiesRequest) Reset() { *x = BatchUpdateEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntitiesRequest) String() string { @@ -1025,7 +1001,7 @@ func (*BatchUpdateEntitiesRequest) ProtoMessage() {} func (x *BatchUpdateEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,11 +1068,9 @@ type BatchDeleteEntitiesRequest struct { func (x *BatchDeleteEntitiesRequest) Reset() { *x = BatchDeleteEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteEntitiesRequest) String() string { @@ -1107,7 +1081,7 @@ func (*BatchDeleteEntitiesRequest) ProtoMessage() {} func (x *BatchDeleteEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1129,9 @@ type EntityTypeBatch struct { func (x *EntityTypeBatch) Reset() { *x = EntityTypeBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityTypeBatch) String() string { @@ -1170,7 +1142,7 @@ func (*EntityTypeBatch) ProtoMessage() {} func (x *EntityTypeBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1195,9 @@ type EntityType_Entity struct { func (x *EntityType_Entity) Reset() { *x = EntityType_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_Entity) String() string { @@ -1238,7 +1208,7 @@ func (*EntityType_Entity) ProtoMessage() {} func (x *EntityType_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1795,188 +1765,6 @@ func file_google_cloud_dialogflow_v2_entity_type_proto_init() { if File_google_cloud_dialogflow_v2_entity_type_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EntityTypeBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_entity_type_proto_msgTypes[7].OneofWrappers = []any{ (*BatchUpdateEntityTypesRequest_EntityTypeBatchUri)(nil), (*BatchUpdateEntityTypesRequest_EntityTypeBatchInline)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/environment.pb.go b/dialogflow/apiv2/dialogflowpb/environment.pb.go index 32382d48de4a..c718bf43cdb9 100755 --- a/dialogflow/apiv2/dialogflowpb/environment.pb.go +++ b/dialogflow/apiv2/dialogflowpb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/environment.proto @@ -160,11 +160,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -175,7 +173,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type TextToSpeechSettings struct { func (x *TextToSpeechSettings) Reset() { *x = TextToSpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextToSpeechSettings) String() string { @@ -279,7 +275,7 @@ func (*TextToSpeechSettings) ProtoMessage() {} func (x *TextToSpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +340,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -359,7 +353,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +406,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -427,7 +419,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +468,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -491,7 +481,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +524,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -549,7 +537,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +593,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -620,7 +606,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +662,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -691,7 +675,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +722,9 @@ type GetEnvironmentHistoryRequest struct { func (x *GetEnvironmentHistoryRequest) Reset() { *x = GetEnvironmentHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentHistoryRequest) String() string { @@ -753,7 +735,7 @@ func (*GetEnvironmentHistoryRequest) ProtoMessage() {} func (x *GetEnvironmentHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +797,9 @@ type EnvironmentHistory struct { func (x *EnvironmentHistory) Reset() { *x = EnvironmentHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentHistory) String() string { @@ -830,7 +810,7 @@ func (*EnvironmentHistory) ProtoMessage() {} func (x *EnvironmentHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +862,9 @@ type EnvironmentHistory_Entry struct { func (x *EnvironmentHistory_Entry) Reset() { *x = EnvironmentHistory_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentHistory_Entry) String() string { @@ -897,7 +875,7 @@ func (*EnvironmentHistory_Entry) ProtoMessage() {} func (x *EnvironmentHistory_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_environment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,140 +1297,6 @@ func file_google_cloud_dialogflow_v2_environment_proto_init() { } file_google_cloud_dialogflow_v2_audio_config_proto_init() file_google_cloud_dialogflow_v2_fulfillment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextToSpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_environment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentHistory_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/fulfillment.pb.go b/dialogflow/apiv2/dialogflowpb/fulfillment.pb.go index 5c00a065f0a5..60b4d63249e4 100755 --- a/dialogflow/apiv2/dialogflowpb/fulfillment.pb.go +++ b/dialogflow/apiv2/dialogflowpb/fulfillment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/fulfillment.proto @@ -133,11 +133,9 @@ type Fulfillment struct { func (x *Fulfillment) Reset() { *x = Fulfillment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment) String() string { @@ -148,7 +146,7 @@ func (*Fulfillment) ProtoMessage() {} func (x *Fulfillment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +228,9 @@ type GetFulfillmentRequest struct { func (x *GetFulfillmentRequest) Reset() { *x = GetFulfillmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFulfillmentRequest) String() string { @@ -245,7 +241,7 @@ func (*GetFulfillmentRequest) ProtoMessage() {} func (x *GetFulfillmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +279,9 @@ type UpdateFulfillmentRequest struct { func (x *UpdateFulfillmentRequest) Reset() { *x = UpdateFulfillmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFulfillmentRequest) String() string { @@ -298,7 +292,7 @@ func (*UpdateFulfillmentRequest) ProtoMessage() {} func (x *UpdateFulfillmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +356,9 @@ type Fulfillment_GenericWebService struct { func (x *Fulfillment_GenericWebService) Reset() { *x = Fulfillment_GenericWebService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_GenericWebService) String() string { @@ -377,7 +369,7 @@ func (*Fulfillment_GenericWebService) ProtoMessage() {} func (x *Fulfillment_GenericWebService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +432,9 @@ type Fulfillment_Feature struct { func (x *Fulfillment_Feature) Reset() { *x = Fulfillment_Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_Feature) String() string { @@ -455,7 +445,7 @@ func (*Fulfillment_Feature) ProtoMessage() {} func (x *Fulfillment_Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,68 +661,6 @@ func file_google_cloud_dialogflow_v2_fulfillment_proto_init() { if File_google_cloud_dialogflow_v2_fulfillment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFulfillmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFulfillmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_GenericWebService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_fulfillment_proto_msgTypes[0].OneofWrappers = []any{ (*Fulfillment_GenericWebService_)(nil), } diff --git a/dialogflow/apiv2/dialogflowpb/gcs.pb.go b/dialogflow/apiv2/dialogflowpb/gcs.pb.go index 26db7f950d48..939e53d7e879 100755 --- a/dialogflow/apiv2/dialogflowpb/gcs.pb.go +++ b/dialogflow/apiv2/dialogflowpb/gcs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/gcs.proto @@ -50,11 +50,9 @@ type GcsSources struct { func (x *GcsSources) Reset() { *x = GcsSources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSources) String() string { @@ -65,7 +63,7 @@ func (*GcsSources) ProtoMessage() {} func (x *GcsSources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,11 +101,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -118,7 +114,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,32 +192,6 @@ func file_google_cloud_dialogflow_v2_gcs_proto_init() { if File_google_cloud_dialogflow_v2_gcs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_gcs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/generator.pb.go b/dialogflow/apiv2/dialogflowpb/generator.pb.go index 358daef2994c..f1e13a45b2ec 100755 --- a/dialogflow/apiv2/dialogflowpb/generator.pb.go +++ b/dialogflow/apiv2/dialogflowpb/generator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/generator.proto @@ -265,11 +265,9 @@ type CreateGeneratorRequest struct { func (x *CreateGeneratorRequest) Reset() { *x = CreateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGeneratorRequest) String() string { @@ -280,7 +278,7 @@ func (*CreateGeneratorRequest) ProtoMessage() {} func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +327,9 @@ type GetGeneratorRequest struct { func (x *GetGeneratorRequest) Reset() { *x = GetGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGeneratorRequest) String() string { @@ -344,7 +340,7 @@ func (*GetGeneratorRequest) ProtoMessage() {} func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +380,9 @@ type ListGeneratorsRequest struct { func (x *ListGeneratorsRequest) Reset() { *x = ListGeneratorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsRequest) String() string { @@ -399,7 +393,7 @@ func (*ListGeneratorsRequest) ProtoMessage() {} func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +444,9 @@ type ListGeneratorsResponse struct { func (x *ListGeneratorsResponse) Reset() { *x = ListGeneratorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsResponse) String() string { @@ -465,7 +457,7 @@ func (*ListGeneratorsResponse) ProtoMessage() {} func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +499,9 @@ type DeleteGeneratorRequest struct { func (x *DeleteGeneratorRequest) Reset() { *x = DeleteGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGeneratorRequest) String() string { @@ -522,7 +512,7 @@ func (*DeleteGeneratorRequest) ProtoMessage() {} func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +549,9 @@ type UpdateGeneratorRequest struct { func (x *UpdateGeneratorRequest) Reset() { *x = UpdateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGeneratorRequest) String() string { @@ -574,7 +562,7 @@ func (*UpdateGeneratorRequest) ProtoMessage() {} func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +611,9 @@ type MessageEntry struct { func (x *MessageEntry) Reset() { *x = MessageEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageEntry) String() string { @@ -638,7 +624,7 @@ func (*MessageEntry) ProtoMessage() {} func (x *MessageEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +679,9 @@ type ConversationContext struct { func (x *ConversationContext) Reset() { *x = ConversationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationContext) String() string { @@ -708,7 +692,7 @@ func (*ConversationContext) ProtoMessage() {} func (x *ConversationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +726,9 @@ type SummarizationSectionList struct { func (x *SummarizationSectionList) Reset() { *x = SummarizationSectionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationSectionList) String() string { @@ -757,7 +739,7 @@ func (*SummarizationSectionList) ProtoMessage() {} func (x *SummarizationSectionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +786,9 @@ type FewShotExample struct { func (x *FewShotExample) Reset() { *x = FewShotExample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FewShotExample) String() string { @@ -819,7 +799,7 @@ func (*FewShotExample) ProtoMessage() {} func (x *FewShotExample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +895,9 @@ type InferenceParameter struct { func (x *InferenceParameter) Reset() { *x = InferenceParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InferenceParameter) String() string { @@ -930,7 +908,7 @@ func (*InferenceParameter) ProtoMessage() {} func (x *InferenceParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +968,9 @@ type SummarizationSection struct { func (x *SummarizationSection) Reset() { *x = SummarizationSection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationSection) String() string { @@ -1005,7 +981,7 @@ func (*SummarizationSection) ProtoMessage() {} func (x *SummarizationSection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1039,9 @@ type SummarizationContext struct { func (x *SummarizationContext) Reset() { *x = SummarizationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationContext) String() string { @@ -1078,7 +1052,7 @@ func (*SummarizationContext) ProtoMessage() {} func (x *SummarizationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,11 +1125,9 @@ type Generator struct { func (x *Generator) Reset() { *x = Generator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator) String() string { @@ -1166,7 +1138,7 @@ func (*Generator) ProtoMessage() {} func (x *Generator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1232,9 @@ type SummarySuggestion struct { func (x *SummarySuggestion) Reset() { *x = SummarySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarySuggestion) String() string { @@ -1275,7 +1245,7 @@ func (*SummarySuggestion) ProtoMessage() {} func (x *SummarySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1283,9 @@ type GeneratorSuggestion struct { func (x *GeneratorSuggestion) Reset() { *x = GeneratorSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneratorSuggestion) String() string { @@ -1328,7 +1296,7 @@ func (*GeneratorSuggestion) ProtoMessage() {} func (x *GeneratorSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1350,9 @@ type SummarySuggestion_SummarySection struct { func (x *SummarySuggestion_SummarySection) Reset() { *x = SummarySuggestion_SummarySection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarySuggestion_SummarySection) String() string { @@ -1397,7 +1363,7 @@ func (*SummarySuggestion_SummarySection) ProtoMessage() {} func (x *SummarySuggestion_SummarySection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_generator_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1860,212 +1826,6 @@ func file_google_cloud_dialogflow_v2_generator_proto_init() { if File_google_cloud_dialogflow_v2_generator_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MessageEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ConversationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationSectionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FewShotExample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*InferenceParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationSection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Generator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SummarySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GeneratorSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_generator_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SummarySuggestion_SummarySection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_generator_proto_msgTypes[9].OneofWrappers = []any{ (*FewShotExample_SummarizationSectionList)(nil), } diff --git a/dialogflow/apiv2/dialogflowpb/human_agent_assistant_event.pb.go b/dialogflow/apiv2/dialogflowpb/human_agent_assistant_event.pb.go index caa38a0b2ca9..0bffb4c7896f 100755 --- a/dialogflow/apiv2/dialogflowpb/human_agent_assistant_event.pb.go +++ b/dialogflow/apiv2/dialogflowpb/human_agent_assistant_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/human_agent_assistant_event.proto @@ -55,11 +55,9 @@ type HumanAgentAssistantEvent struct { func (x *HumanAgentAssistantEvent) Reset() { *x = HumanAgentAssistantEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_human_agent_assistant_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_human_agent_assistant_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantEvent) String() string { @@ -70,7 +68,7 @@ func (*HumanAgentAssistantEvent) ProtoMessage() {} func (x *HumanAgentAssistantEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_human_agent_assistant_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_google_cloud_dialogflow_v2_human_agent_assistant_event_proto_init() { return } file_google_cloud_dialogflow_v2_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_human_agent_assistant_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/intent.pb.go b/dialogflow/apiv2/dialogflowpb/intent.pb.go index 383fee8c8247..0dddd925676f 100755 --- a/dialogflow/apiv2/dialogflowpb/intent.pb.go +++ b/dialogflow/apiv2/dialogflowpb/intent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/intent.proto @@ -633,11 +633,9 @@ type Intent struct { func (x *Intent) Reset() { *x = Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent) String() string { @@ -648,7 +646,7 @@ func (*Intent) ProtoMessage() {} func (x *Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +836,9 @@ type ListIntentsRequest struct { func (x *ListIntentsRequest) Reset() { *x = ListIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsRequest) String() string { @@ -853,7 +849,7 @@ func (*ListIntentsRequest) ProtoMessage() {} func (x *ListIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +916,9 @@ type ListIntentsResponse struct { func (x *ListIntentsResponse) Reset() { *x = ListIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsResponse) String() string { @@ -935,7 +929,7 @@ func (*ListIntentsResponse) ProtoMessage() {} func (x *ListIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +980,9 @@ type GetIntentRequest struct { func (x *GetIntentRequest) Reset() { *x = GetIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIntentRequest) String() string { @@ -1001,7 +993,7 @@ func (*GetIntentRequest) ProtoMessage() {} func (x *GetIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1053,9 @@ type CreateIntentRequest struct { func (x *CreateIntentRequest) Reset() { *x = CreateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIntentRequest) String() string { @@ -1076,7 +1066,7 @@ func (*CreateIntentRequest) ProtoMessage() {} func (x *CreateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1142,11 +1132,9 @@ type UpdateIntentRequest struct { func (x *UpdateIntentRequest) Reset() { *x = UpdateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIntentRequest) String() string { @@ -1157,7 +1145,7 @@ func (*UpdateIntentRequest) ProtoMessage() {} func (x *UpdateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1215,11 +1203,9 @@ type DeleteIntentRequest struct { func (x *DeleteIntentRequest) Reset() { *x = DeleteIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIntentRequest) String() string { @@ -1230,7 +1216,7 @@ func (*DeleteIntentRequest) ProtoMessage() {} func (x *DeleteIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1281,11 +1267,9 @@ type BatchUpdateIntentsRequest struct { func (x *BatchUpdateIntentsRequest) Reset() { *x = BatchUpdateIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIntentsRequest) String() string { @@ -1296,7 +1280,7 @@ func (*BatchUpdateIntentsRequest) ProtoMessage() {} func (x *BatchUpdateIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1377,9 @@ type BatchUpdateIntentsResponse struct { func (x *BatchUpdateIntentsResponse) Reset() { *x = BatchUpdateIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIntentsResponse) String() string { @@ -1408,7 +1390,7 @@ func (*BatchUpdateIntentsResponse) ProtoMessage() {} func (x *BatchUpdateIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,11 +1429,9 @@ type BatchDeleteIntentsRequest struct { func (x *BatchDeleteIntentsRequest) Reset() { *x = BatchDeleteIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteIntentsRequest) String() string { @@ -1462,7 +1442,7 @@ func (*BatchDeleteIntentsRequest) ProtoMessage() {} func (x *BatchDeleteIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1483,9 @@ type IntentBatch struct { func (x *IntentBatch) Reset() { *x = IntentBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentBatch) String() string { @@ -1518,7 +1496,7 @@ func (*IntentBatch) ProtoMessage() {} func (x *IntentBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1580,11 +1558,9 @@ type Intent_TrainingPhrase struct { func (x *Intent_TrainingPhrase) Reset() { *x = Intent_TrainingPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase) String() string { @@ -1595,7 +1571,7 @@ func (*Intent_TrainingPhrase) ProtoMessage() {} func (x *Intent_TrainingPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1678,11 +1654,9 @@ type Intent_Parameter struct { func (x *Intent_Parameter) Reset() { *x = Intent_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Parameter) String() string { @@ -1693,7 +1667,7 @@ func (*Intent_Parameter) ProtoMessage() {} func (x *Intent_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1799,11 +1773,9 @@ type Intent_Message struct { func (x *Intent_Message) Reset() { *x = Intent_Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message) String() string { @@ -1814,7 +1786,7 @@ func (*Intent_Message) ProtoMessage() {} func (x *Intent_Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2059,11 +2031,9 @@ type Intent_FollowupIntentInfo struct { func (x *Intent_FollowupIntentInfo) Reset() { *x = Intent_FollowupIntentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_FollowupIntentInfo) String() string { @@ -2074,7 +2044,7 @@ func (*Intent_FollowupIntentInfo) ProtoMessage() {} func (x *Intent_FollowupIntentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2127,11 +2097,9 @@ type Intent_TrainingPhrase_Part struct { func (x *Intent_TrainingPhrase_Part) Reset() { *x = Intent_TrainingPhrase_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase_Part) String() string { @@ -2142,7 +2110,7 @@ func (*Intent_TrainingPhrase_Part) ProtoMessage() {} func (x *Intent_TrainingPhrase_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2165,9 @@ type Intent_Message_Text struct { func (x *Intent_Message_Text) Reset() { *x = Intent_Message_Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Text) String() string { @@ -2212,7 +2178,7 @@ func (*Intent_Message_Text) ProtoMessage() {} func (x *Intent_Message_Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2249,11 +2215,9 @@ type Intent_Message_Image struct { func (x *Intent_Message_Image) Reset() { *x = Intent_Message_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Image) String() string { @@ -2264,7 +2228,7 @@ func (*Intent_Message_Image) ProtoMessage() {} func (x *Intent_Message_Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2307,11 +2271,9 @@ type Intent_Message_QuickReplies struct { func (x *Intent_Message_QuickReplies) Reset() { *x = Intent_Message_QuickReplies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_QuickReplies) String() string { @@ -2322,7 +2284,7 @@ func (*Intent_Message_QuickReplies) ProtoMessage() {} func (x *Intent_Message_QuickReplies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2369,11 +2331,9 @@ type Intent_Message_Card struct { func (x *Intent_Message_Card) Reset() { *x = Intent_Message_Card{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Card) String() string { @@ -2384,7 +2344,7 @@ func (*Intent_Message_Card) ProtoMessage() {} func (x *Intent_Message_Card) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2446,11 +2406,9 @@ type Intent_Message_SimpleResponse struct { func (x *Intent_Message_SimpleResponse) Reset() { *x = Intent_Message_SimpleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SimpleResponse) String() string { @@ -2461,7 +2419,7 @@ func (*Intent_Message_SimpleResponse) ProtoMessage() {} func (x *Intent_Message_SimpleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2512,11 +2470,9 @@ type Intent_Message_SimpleResponses struct { func (x *Intent_Message_SimpleResponses) Reset() { *x = Intent_Message_SimpleResponses{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SimpleResponses) String() string { @@ -2527,7 +2483,7 @@ func (*Intent_Message_SimpleResponses) ProtoMessage() {} func (x *Intent_Message_SimpleResponses) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2569,11 +2525,9 @@ type Intent_Message_BasicCard struct { func (x *Intent_Message_BasicCard) Reset() { *x = Intent_Message_BasicCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard) String() string { @@ -2584,7 +2538,7 @@ func (*Intent_Message_BasicCard) ProtoMessage() {} func (x *Intent_Message_BasicCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2647,11 +2601,9 @@ type Intent_Message_Suggestion struct { func (x *Intent_Message_Suggestion) Reset() { *x = Intent_Message_Suggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Suggestion) String() string { @@ -2662,7 +2614,7 @@ func (*Intent_Message_Suggestion) ProtoMessage() {} func (x *Intent_Message_Suggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2696,11 +2648,9 @@ type Intent_Message_Suggestions struct { func (x *Intent_Message_Suggestions) Reset() { *x = Intent_Message_Suggestions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Suggestions) String() string { @@ -2711,7 +2661,7 @@ func (*Intent_Message_Suggestions) ProtoMessage() {} func (x *Intent_Message_Suggestions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2749,11 +2699,9 @@ type Intent_Message_LinkOutSuggestion struct { func (x *Intent_Message_LinkOutSuggestion) Reset() { *x = Intent_Message_LinkOutSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_LinkOutSuggestion) String() string { @@ -2764,7 +2712,7 @@ func (*Intent_Message_LinkOutSuggestion) ProtoMessage() {} func (x *Intent_Message_LinkOutSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2809,11 +2757,9 @@ type Intent_Message_ListSelect struct { func (x *Intent_Message_ListSelect) Reset() { *x = Intent_Message_ListSelect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ListSelect) String() string { @@ -2824,7 +2770,7 @@ func (*Intent_Message_ListSelect) ProtoMessage() {} func (x *Intent_Message_ListSelect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2872,11 +2818,9 @@ type Intent_Message_CarouselSelect struct { func (x *Intent_Message_CarouselSelect) Reset() { *x = Intent_Message_CarouselSelect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_CarouselSelect) String() string { @@ -2887,7 +2831,7 @@ func (*Intent_Message_CarouselSelect) ProtoMessage() {} func (x *Intent_Message_CarouselSelect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2926,11 +2870,9 @@ type Intent_Message_SelectItemInfo struct { func (x *Intent_Message_SelectItemInfo) Reset() { *x = Intent_Message_SelectItemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SelectItemInfo) String() string { @@ -2941,7 +2883,7 @@ func (*Intent_Message_SelectItemInfo) ProtoMessage() {} func (x *Intent_Message_SelectItemInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2984,11 +2926,9 @@ type Intent_Message_MediaContent struct { func (x *Intent_Message_MediaContent) Reset() { *x = Intent_Message_MediaContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_MediaContent) String() string { @@ -2999,7 +2939,7 @@ func (*Intent_Message_MediaContent) ProtoMessage() {} func (x *Intent_Message_MediaContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3045,11 +2985,9 @@ type Intent_Message_BrowseCarouselCard struct { func (x *Intent_Message_BrowseCarouselCard) Reset() { *x = Intent_Message_BrowseCarouselCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard) String() string { @@ -3060,7 +2998,7 @@ func (*Intent_Message_BrowseCarouselCard) ProtoMessage() {} func (x *Intent_Message_BrowseCarouselCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3111,11 +3049,9 @@ type Intent_Message_TableCard struct { func (x *Intent_Message_TableCard) Reset() { *x = Intent_Message_TableCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCard) String() string { @@ -3126,7 +3062,7 @@ func (*Intent_Message_TableCard) ProtoMessage() {} func (x *Intent_Message_TableCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3198,11 +3134,9 @@ type Intent_Message_ColumnProperties struct { func (x *Intent_Message_ColumnProperties) Reset() { *x = Intent_Message_ColumnProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ColumnProperties) String() string { @@ -3213,7 +3147,7 @@ func (*Intent_Message_ColumnProperties) ProtoMessage() {} func (x *Intent_Message_ColumnProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3256,11 +3190,9 @@ type Intent_Message_TableCardRow struct { func (x *Intent_Message_TableCardRow) Reset() { *x = Intent_Message_TableCardRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCardRow) String() string { @@ -3271,7 +3203,7 @@ func (*Intent_Message_TableCardRow) ProtoMessage() {} func (x *Intent_Message_TableCardRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3313,11 +3245,9 @@ type Intent_Message_TableCardCell struct { func (x *Intent_Message_TableCardCell) Reset() { *x = Intent_Message_TableCardCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCardCell) String() string { @@ -3328,7 +3258,7 @@ func (*Intent_Message_TableCardCell) ProtoMessage() {} func (x *Intent_Message_TableCardCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3365,11 +3295,9 @@ type Intent_Message_Card_Button struct { func (x *Intent_Message_Card_Button) Reset() { *x = Intent_Message_Card_Button{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Card_Button) String() string { @@ -3380,7 +3308,7 @@ func (*Intent_Message_Card_Button) ProtoMessage() {} func (x *Intent_Message_Card_Button) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3423,11 +3351,9 @@ type Intent_Message_BasicCard_Button struct { func (x *Intent_Message_BasicCard_Button) Reset() { *x = Intent_Message_BasicCard_Button{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard_Button) String() string { @@ -3438,7 +3364,7 @@ func (*Intent_Message_BasicCard_Button) ProtoMessage() {} func (x *Intent_Message_BasicCard_Button) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3479,11 +3405,9 @@ type Intent_Message_BasicCard_Button_OpenUriAction struct { func (x *Intent_Message_BasicCard_Button_OpenUriAction) Reset() { *x = Intent_Message_BasicCard_Button_OpenUriAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard_Button_OpenUriAction) String() string { @@ -3494,7 +3418,7 @@ func (*Intent_Message_BasicCard_Button_OpenUriAction) ProtoMessage() {} func (x *Intent_Message_BasicCard_Button_OpenUriAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3534,11 +3458,9 @@ type Intent_Message_ListSelect_Item struct { func (x *Intent_Message_ListSelect_Item) Reset() { *x = Intent_Message_ListSelect_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ListSelect_Item) String() string { @@ -3549,7 +3471,7 @@ func (*Intent_Message_ListSelect_Item) ProtoMessage() {} func (x *Intent_Message_ListSelect_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3610,11 +3532,9 @@ type Intent_Message_CarouselSelect_Item struct { func (x *Intent_Message_CarouselSelect_Item) Reset() { *x = Intent_Message_CarouselSelect_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_CarouselSelect_Item) String() string { @@ -3625,7 +3545,7 @@ func (*Intent_Message_CarouselSelect_Item) ProtoMessage() {} func (x *Intent_Message_CarouselSelect_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3691,11 +3611,9 @@ type Intent_Message_MediaContent_ResponseMediaObject struct { func (x *Intent_Message_MediaContent_ResponseMediaObject) Reset() { *x = Intent_Message_MediaContent_ResponseMediaObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_MediaContent_ResponseMediaObject) String() string { @@ -3706,7 +3624,7 @@ func (*Intent_Message_MediaContent_ResponseMediaObject) ProtoMessage() {} func (x *Intent_Message_MediaContent_ResponseMediaObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3805,11 +3723,9 @@ type Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem struct { func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) Reset() { *x = Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) String() string { @@ -3820,7 +3736,7 @@ func (*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) ProtoMessage() func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3885,11 +3801,9 @@ type Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction stru func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) Reset() { *x = Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) String() string { @@ -3900,7 +3814,7 @@ func (*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) P func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_intent_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4936,524 +4850,6 @@ func file_google_cloud_dialogflow_v2_intent_proto_init() { return } file_google_cloud_dialogflow_v2_context_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*IntentBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Intent_FollowupIntentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_QuickReplies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Card); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SimpleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SimpleResponses); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Suggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Suggestions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_LinkOutSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ListSelect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_CarouselSelect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SelectItemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_MediaContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ColumnProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCardRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCardCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Card_Button); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard_Button); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard_Button_OpenUriAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ListSelect_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_CarouselSelect_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_MediaContent_ResponseMediaObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_intent_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_intent_proto_msgTypes[7].OneofWrappers = []any{ (*BatchUpdateIntentsRequest_IntentBatchUri)(nil), (*BatchUpdateIntentsRequest_IntentBatchInline)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/knowledge_base.pb.go b/dialogflow/apiv2/dialogflowpb/knowledge_base.pb.go index 1b47e454b113..1ae657f51d74 100755 --- a/dialogflow/apiv2/dialogflowpb/knowledge_base.pb.go +++ b/dialogflow/apiv2/dialogflowpb/knowledge_base.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/knowledge_base.proto @@ -73,11 +73,9 @@ type KnowledgeBase struct { func (x *KnowledgeBase) Reset() { *x = KnowledgeBase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeBase) String() string { @@ -88,7 +86,7 @@ func (*KnowledgeBase) ProtoMessage() {} func (x *KnowledgeBase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type ListKnowledgeBasesRequest struct { func (x *ListKnowledgeBasesRequest) Reset() { *x = ListKnowledgeBasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKnowledgeBasesRequest) String() string { @@ -185,7 +181,7 @@ func (*ListKnowledgeBasesRequest) ProtoMessage() {} func (x *ListKnowledgeBasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type ListKnowledgeBasesResponse struct { func (x *ListKnowledgeBasesResponse) Reset() { *x = ListKnowledgeBasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKnowledgeBasesResponse) String() string { @@ -259,7 +253,7 @@ func (*ListKnowledgeBasesResponse) ProtoMessage() {} func (x *ListKnowledgeBasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +297,9 @@ type GetKnowledgeBaseRequest struct { func (x *GetKnowledgeBaseRequest) Reset() { *x = GetKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKnowledgeBaseRequest) String() string { @@ -318,7 +310,7 @@ func (*GetKnowledgeBaseRequest) ProtoMessage() {} func (x *GetKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +348,9 @@ type CreateKnowledgeBaseRequest struct { func (x *CreateKnowledgeBaseRequest) Reset() { *x = CreateKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKnowledgeBaseRequest) String() string { @@ -371,7 +361,7 @@ func (*CreateKnowledgeBaseRequest) ProtoMessage() {} func (x *CreateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +408,9 @@ type DeleteKnowledgeBaseRequest struct { func (x *DeleteKnowledgeBaseRequest) Reset() { *x = DeleteKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKnowledgeBaseRequest) String() string { @@ -433,7 +421,7 @@ func (*DeleteKnowledgeBaseRequest) ProtoMessage() {} func (x *DeleteKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type UpdateKnowledgeBaseRequest struct { func (x *UpdateKnowledgeBaseRequest) Reset() { *x = UpdateKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKnowledgeBaseRequest) String() string { @@ -494,7 +480,7 @@ func (*UpdateKnowledgeBaseRequest) ProtoMessage() {} func (x *UpdateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,92 +776,6 @@ func file_google_cloud_dialogflow_v2_knowledge_base_proto_init() { if File_google_cloud_dialogflow_v2_knowledge_base_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeBase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListKnowledgeBasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListKnowledgeBasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_knowledge_base_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/participant.pb.go b/dialogflow/apiv2/dialogflowpb/participant.pb.go index e57c9557982b..9cb95bb870b4 100755 --- a/dialogflow/apiv2/dialogflowpb/participant.pb.go +++ b/dialogflow/apiv2/dialogflowpb/participant.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/participant.proto @@ -233,11 +233,9 @@ type Participant struct { func (x *Participant) Reset() { *x = Participant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Participant) String() string { @@ -248,7 +246,7 @@ func (*Participant) ProtoMessage() {} func (x *Participant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +328,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -345,7 +341,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +436,9 @@ type CreateParticipantRequest struct { func (x *CreateParticipantRequest) Reset() { *x = CreateParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateParticipantRequest) String() string { @@ -455,7 +449,7 @@ func (*CreateParticipantRequest) ProtoMessage() {} func (x *CreateParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +493,9 @@ type GetParticipantRequest struct { func (x *GetParticipantRequest) Reset() { *x = GetParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantRequest) String() string { @@ -514,7 +506,7 @@ func (*GetParticipantRequest) ProtoMessage() {} func (x *GetParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +548,9 @@ type ListParticipantsRequest struct { func (x *ListParticipantsRequest) Reset() { *x = ListParticipantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsRequest) String() string { @@ -571,7 +561,7 @@ func (*ListParticipantsRequest) ProtoMessage() {} func (x *ListParticipantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +614,9 @@ type ListParticipantsResponse struct { func (x *ListParticipantsResponse) Reset() { *x = ListParticipantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsResponse) String() string { @@ -639,7 +627,7 @@ func (*ListParticipantsResponse) ProtoMessage() {} func (x *ListParticipantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +671,9 @@ type UpdateParticipantRequest struct { func (x *UpdateParticipantRequest) Reset() { *x = UpdateParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateParticipantRequest) String() string { @@ -698,7 +684,7 @@ func (*UpdateParticipantRequest) ProtoMessage() {} func (x *UpdateParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +757,9 @@ type AnalyzeContentRequest struct { func (x *AnalyzeContentRequest) Reset() { *x = AnalyzeContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeContentRequest) String() string { @@ -786,7 +770,7 @@ func (*AnalyzeContentRequest) ProtoMessage() {} func (x *AnalyzeContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +892,9 @@ type DtmfParameters struct { func (x *DtmfParameters) Reset() { *x = DtmfParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DtmfParameters) String() string { @@ -923,7 +905,7 @@ func (*DtmfParameters) ProtoMessage() {} func (x *DtmfParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +986,9 @@ type AnalyzeContentResponse struct { func (x *AnalyzeContentResponse) Reset() { *x = AnalyzeContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeContentResponse) String() string { @@ -1019,7 +999,7 @@ func (*AnalyzeContentResponse) ProtoMessage() {} func (x *AnalyzeContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1197,11 +1177,9 @@ type StreamingAnalyzeContentRequest struct { func (x *StreamingAnalyzeContentRequest) Reset() { *x = StreamingAnalyzeContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnalyzeContentRequest) String() string { @@ -1212,7 +1190,7 @@ func (*StreamingAnalyzeContentRequest) ProtoMessage() {} func (x *StreamingAnalyzeContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1455,11 +1433,9 @@ type StreamingAnalyzeContentResponse struct { func (x *StreamingAnalyzeContentResponse) Reset() { *x = StreamingAnalyzeContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnalyzeContentResponse) String() string { @@ -1470,7 +1446,7 @@ func (*StreamingAnalyzeContentResponse) ProtoMessage() {} func (x *StreamingAnalyzeContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,11 +1552,9 @@ type SuggestArticlesRequest struct { func (x *SuggestArticlesRequest) Reset() { *x = SuggestArticlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestArticlesRequest) String() string { @@ -1591,7 +1565,7 @@ func (*SuggestArticlesRequest) ProtoMessage() {} func (x *SuggestArticlesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1660,11 +1634,9 @@ type SuggestArticlesResponse struct { func (x *SuggestArticlesResponse) Reset() { *x = SuggestArticlesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestArticlesResponse) String() string { @@ -1675,7 +1647,7 @@ func (*SuggestArticlesResponse) ProtoMessage() {} func (x *SuggestArticlesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1738,11 +1710,9 @@ type SuggestFaqAnswersRequest struct { func (x *SuggestFaqAnswersRequest) Reset() { *x = SuggestFaqAnswersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestFaqAnswersRequest) String() string { @@ -1753,7 +1723,7 @@ func (*SuggestFaqAnswersRequest) ProtoMessage() {} func (x *SuggestFaqAnswersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1792,9 @@ type SuggestFaqAnswersResponse struct { func (x *SuggestFaqAnswersResponse) Reset() { *x = SuggestFaqAnswersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestFaqAnswersResponse) String() string { @@ -1837,7 +1805,7 @@ func (*SuggestFaqAnswersResponse) ProtoMessage() {} func (x *SuggestFaqAnswersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1870,9 @@ type SuggestSmartRepliesRequest struct { func (x *SuggestSmartRepliesRequest) Reset() { *x = SuggestSmartRepliesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestSmartRepliesRequest) String() string { @@ -1917,7 +1883,7 @@ func (*SuggestSmartRepliesRequest) ProtoMessage() {} func (x *SuggestSmartRepliesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1988,11 +1954,9 @@ type SuggestSmartRepliesResponse struct { func (x *SuggestSmartRepliesResponse) Reset() { *x = SuggestSmartRepliesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestSmartRepliesResponse) String() string { @@ -2003,7 +1967,7 @@ func (*SuggestSmartRepliesResponse) ProtoMessage() {} func (x *SuggestSmartRepliesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2018,9 @@ type OutputAudio struct { func (x *OutputAudio) Reset() { *x = OutputAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudio) String() string { @@ -2069,7 +2031,7 @@ func (*OutputAudio) ProtoMessage() {} func (x *OutputAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,11 +2084,9 @@ type AutomatedAgentReply struct { func (x *AutomatedAgentReply) Reset() { *x = AutomatedAgentReply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedAgentReply) String() string { @@ -2137,7 +2097,7 @@ func (*AutomatedAgentReply) ProtoMessage() {} func (x *AutomatedAgentReply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2168,9 @@ type ArticleAnswer struct { func (x *ArticleAnswer) Reset() { *x = ArticleAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArticleAnswer) String() string { @@ -2223,7 +2181,7 @@ func (*ArticleAnswer) ProtoMessage() {} func (x *ArticleAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2310,11 +2268,9 @@ type FaqAnswer struct { func (x *FaqAnswer) Reset() { *x = FaqAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaqAnswer) String() string { @@ -2325,7 +2281,7 @@ func (*FaqAnswer) ProtoMessage() {} func (x *FaqAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2403,11 +2359,9 @@ type SmartReplyAnswer struct { func (x *SmartReplyAnswer) Reset() { *x = SmartReplyAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyAnswer) String() string { @@ -2418,7 +2372,7 @@ func (*SmartReplyAnswer) ProtoMessage() {} func (x *SmartReplyAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2475,11 +2429,9 @@ type IntentSuggestion struct { func (x *IntentSuggestion) Reset() { *x = IntentSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentSuggestion) String() string { @@ -2490,7 +2442,7 @@ func (*IntentSuggestion) ProtoMessage() {} func (x *IntentSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2567,11 +2519,9 @@ type DialogflowAssistAnswer struct { func (x *DialogflowAssistAnswer) Reset() { *x = DialogflowAssistAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogflowAssistAnswer) String() string { @@ -2582,7 +2532,7 @@ func (*DialogflowAssistAnswer) ProtoMessage() {} func (x *DialogflowAssistAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2669,11 +2619,9 @@ type SuggestionResult struct { func (x *SuggestionResult) Reset() { *x = SuggestionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionResult) String() string { @@ -2684,7 +2632,7 @@ func (*SuggestionResult) ProtoMessage() {} func (x *SuggestionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2794,11 +2742,9 @@ type InputTextConfig struct { func (x *InputTextConfig) Reset() { *x = InputTextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputTextConfig) String() string { @@ -2809,7 +2755,7 @@ func (*InputTextConfig) ProtoMessage() {} func (x *InputTextConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2809,9 @@ type AnnotatedMessagePart struct { func (x *AnnotatedMessagePart) Reset() { *x = AnnotatedMessagePart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedMessagePart) String() string { @@ -2878,7 +2822,7 @@ func (*AnnotatedMessagePart) ProtoMessage() {} func (x *AnnotatedMessagePart) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2930,11 +2874,9 @@ type MessageAnnotation struct { func (x *MessageAnnotation) Reset() { *x = MessageAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageAnnotation) String() string { @@ -2945,7 +2887,7 @@ func (*MessageAnnotation) ProtoMessage() {} func (x *MessageAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2991,11 +2933,9 @@ type SuggestionInput struct { func (x *SuggestionInput) Reset() { *x = SuggestionInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionInput) String() string { @@ -3006,7 +2946,7 @@ func (*SuggestionInput) ProtoMessage() {} func (x *SuggestionInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3059,11 +2999,9 @@ type AssistQueryParameters struct { func (x *AssistQueryParameters) Reset() { *x = AssistQueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssistQueryParameters) String() string { @@ -3074,7 +3012,7 @@ func (*AssistQueryParameters) ProtoMessage() {} func (x *AssistQueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3126,11 +3064,9 @@ type SuggestKnowledgeAssistRequest struct { func (x *SuggestKnowledgeAssistRequest) Reset() { *x = SuggestKnowledgeAssistRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestKnowledgeAssistRequest) String() string { @@ -3141,7 +3077,7 @@ func (*SuggestKnowledgeAssistRequest) ProtoMessage() {} func (x *SuggestKnowledgeAssistRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3207,11 +3143,9 @@ type SuggestKnowledgeAssistResponse struct { func (x *SuggestKnowledgeAssistResponse) Reset() { *x = SuggestKnowledgeAssistResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestKnowledgeAssistResponse) String() string { @@ -3222,7 +3156,7 @@ func (*SuggestKnowledgeAssistResponse) ProtoMessage() {} func (x *SuggestKnowledgeAssistResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3278,11 +3212,9 @@ type KnowledgeAssistAnswer struct { func (x *KnowledgeAssistAnswer) Reset() { *x = KnowledgeAssistAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer) String() string { @@ -3293,7 +3225,7 @@ func (*KnowledgeAssistAnswer) ProtoMessage() {} func (x *KnowledgeAssistAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3341,11 +3273,9 @@ type KnowledgeAssistAnswer_SuggestedQuery struct { func (x *KnowledgeAssistAnswer_SuggestedQuery) Reset() { *x = KnowledgeAssistAnswer_SuggestedQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_SuggestedQuery) String() string { @@ -3356,7 +3286,7 @@ func (*KnowledgeAssistAnswer_SuggestedQuery) ProtoMessage() {} func (x *KnowledgeAssistAnswer_SuggestedQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3398,11 +3328,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer) String() string { @@ -3413,7 +3341,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3488,11 +3416,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) String() string { @@ -3503,7 +3429,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3538,11 +3464,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) String() string { @@ -3553,7 +3477,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3593,11 +3517,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) String() string { @@ -3608,7 +3530,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) ProtoMess func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_participant_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4782,476 +4704,6 @@ func file_google_cloud_dialogflow_v2_participant_proto_init() { } file_google_cloud_dialogflow_v2_audio_config_proto_init() file_google_cloud_dialogflow_v2_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Participant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DtmfParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnalyzeContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnalyzeContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SuggestArticlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SuggestArticlesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SuggestFaqAnswersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SuggestFaqAnswersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SuggestSmartRepliesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SuggestSmartRepliesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedAgentReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ArticleAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FaqAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*IntentSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DialogflowAssistAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*InputTextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedMessagePart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*MessageAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AssistQueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SuggestKnowledgeAssistRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SuggestKnowledgeAssistResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_SuggestedQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_participant_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_participant_proto_msgTypes[7].OneofWrappers = []any{ (*AnalyzeContentRequest_TextInput)(nil), (*AnalyzeContentRequest_EventInput)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/session.pb.go b/dialogflow/apiv2/dialogflowpb/session.pb.go index ab4573518705..c428c3b4fdd2 100755 --- a/dialogflow/apiv2/dialogflowpb/session.pb.go +++ b/dialogflow/apiv2/dialogflowpb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/session.proto @@ -161,11 +161,9 @@ type DetectIntentRequest struct { func (x *DetectIntentRequest) Reset() { *x = DetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentRequest) String() string { @@ -176,7 +174,7 @@ func (*DetectIntentRequest) ProtoMessage() {} func (x *DetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type DetectIntentResponse struct { func (x *DetectIntentResponse) Reset() { *x = DetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentResponse) String() string { @@ -279,7 +275,7 @@ func (*DetectIntentResponse) ProtoMessage() {} func (x *DetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +377,9 @@ type QueryParameters struct { func (x *QueryParameters) Reset() { *x = QueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryParameters) String() string { @@ -396,7 +390,7 @@ func (*QueryParameters) ProtoMessage() {} func (x *QueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +493,9 @@ type QueryInput struct { func (x *QueryInput) Reset() { *x = QueryInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryInput) String() string { @@ -514,7 +506,7 @@ func (*QueryInput) ProtoMessage() {} func (x *QueryInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +678,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -701,7 +691,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +923,9 @@ type StreamingDetectIntentRequest struct { func (x *StreamingDetectIntentRequest) Reset() { *x = StreamingDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentRequest) String() string { @@ -948,7 +936,7 @@ func (*StreamingDetectIntentRequest) ProtoMessage() {} func (x *StreamingDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1065,9 @@ type CloudConversationDebuggingInfo struct { func (x *CloudConversationDebuggingInfo) Reset() { *x = CloudConversationDebuggingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudConversationDebuggingInfo) String() string { @@ -1092,7 +1078,7 @@ func (*CloudConversationDebuggingInfo) ProtoMessage() {} func (x *CloudConversationDebuggingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1285,11 +1271,9 @@ type StreamingDetectIntentResponse struct { func (x *StreamingDetectIntentResponse) Reset() { *x = StreamingDetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentResponse) String() string { @@ -1300,7 +1284,7 @@ func (*StreamingDetectIntentResponse) ProtoMessage() {} func (x *StreamingDetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1438,11 +1422,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -1453,7 +1435,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1519,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -1552,7 +1532,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1602,9 @@ type EventInput struct { func (x *EventInput) Reset() { *x = EventInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventInput) String() string { @@ -1637,7 +1615,7 @@ func (*EventInput) ProtoMessage() {} func (x *EventInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,11 +1665,9 @@ type SentimentAnalysisRequestConfig struct { func (x *SentimentAnalysisRequestConfig) Reset() { *x = SentimentAnalysisRequestConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisRequestConfig) String() string { @@ -1702,7 +1678,7 @@ func (*SentimentAnalysisRequestConfig) ProtoMessage() {} func (x *SentimentAnalysisRequestConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1748,11 +1724,9 @@ type SentimentAnalysisResult struct { func (x *SentimentAnalysisResult) Reset() { *x = SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisResult) String() string { @@ -1763,7 +1737,7 @@ func (*SentimentAnalysisResult) ProtoMessage() {} func (x *SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1804,11 +1778,9 @@ type Sentiment struct { func (x *Sentiment) Reset() { *x = Sentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentiment) String() string { @@ -1819,7 +1791,7 @@ func (*Sentiment) ProtoMessage() {} func (x *Sentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2462,176 +2434,6 @@ func file_google_cloud_dialogflow_v2_session_proto_init() { file_google_cloud_dialogflow_v2_context_proto_init() file_google_cloud_dialogflow_v2_intent_proto_init() file_google_cloud_dialogflow_v2_session_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QueryInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CloudConversationDebuggingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*EventInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisRequestConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Sentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2_session_proto_msgTypes[3].OneofWrappers = []any{ (*QueryInput_AudioConfig)(nil), (*QueryInput_Text)(nil), diff --git a/dialogflow/apiv2/dialogflowpb/session_entity_type.pb.go b/dialogflow/apiv2/dialogflowpb/session_entity_type.pb.go index 0d4d29f69264..3adf99195f08 100755 --- a/dialogflow/apiv2/dialogflowpb/session_entity_type.pb.go +++ b/dialogflow/apiv2/dialogflowpb/session_entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/session_entity_type.proto @@ -139,11 +139,9 @@ type SessionEntityType struct { func (x *SessionEntityType) Reset() { *x = SessionEntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEntityType) String() string { @@ -154,7 +152,7 @@ func (*SessionEntityType) ProtoMessage() {} func (x *SessionEntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +211,9 @@ type ListSessionEntityTypesRequest struct { func (x *ListSessionEntityTypesRequest) Reset() { *x = ListSessionEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesRequest) String() string { @@ -228,7 +224,7 @@ func (*ListSessionEntityTypesRequest) ProtoMessage() {} func (x *ListSessionEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +277,9 @@ type ListSessionEntityTypesResponse struct { func (x *ListSessionEntityTypesResponse) Reset() { *x = ListSessionEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesResponse) String() string { @@ -296,7 +290,7 @@ func (*ListSessionEntityTypesResponse) ProtoMessage() {} func (x *ListSessionEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +338,9 @@ type GetSessionEntityTypeRequest struct { func (x *GetSessionEntityTypeRequest) Reset() { *x = GetSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionEntityTypeRequest) String() string { @@ -359,7 +351,7 @@ func (*GetSessionEntityTypeRequest) ProtoMessage() {} func (x *GetSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +393,9 @@ type CreateSessionEntityTypeRequest struct { func (x *CreateSessionEntityTypeRequest) Reset() { *x = CreateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionEntityTypeRequest) String() string { @@ -416,7 +406,7 @@ func (*CreateSessionEntityTypeRequest) ProtoMessage() {} func (x *CreateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +450,9 @@ type UpdateSessionEntityTypeRequest struct { func (x *UpdateSessionEntityTypeRequest) Reset() { *x = UpdateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionEntityTypeRequest) String() string { @@ -475,7 +463,7 @@ func (*UpdateSessionEntityTypeRequest) ProtoMessage() {} func (x *UpdateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +511,9 @@ type DeleteSessionEntityTypeRequest struct { func (x *DeleteSessionEntityTypeRequest) Reset() { *x = DeleteSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionEntityTypeRequest) String() string { @@ -538,7 +524,7 @@ func (*DeleteSessionEntityTypeRequest) ProtoMessage() {} func (x *DeleteSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,92 +918,6 @@ func file_google_cloud_dialogflow_v2_session_entity_type_proto_init() { return } file_google_cloud_dialogflow_v2_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SessionEntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_session_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/validation_result.pb.go b/dialogflow/apiv2/dialogflowpb/validation_result.pb.go index 2b69a7016e79..8d253ddb76b3 100755 --- a/dialogflow/apiv2/dialogflowpb/validation_result.pb.go +++ b/dialogflow/apiv2/dialogflowpb/validation_result.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/validation_result.proto @@ -125,11 +125,9 @@ type ValidationError struct { func (x *ValidationError) Reset() { *x = ValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationError) String() string { @@ -140,7 +138,7 @@ func (*ValidationError) ProtoMessage() {} func (x *ValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +186,9 @@ type ValidationResult struct { func (x *ValidationResult) Reset() { *x = ValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationResult) String() string { @@ -203,7 +199,7 @@ func (*ValidationResult) ProtoMessage() {} func (x *ValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,32 +298,6 @@ func file_google_cloud_dialogflow_v2_validation_result_proto_init() { if File_google_cloud_dialogflow_v2_validation_result_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_validation_result_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/version.pb.go b/dialogflow/apiv2/dialogflowpb/version.pb.go index 9efe0baf9ae1..a988f3c12b58 100755 --- a/dialogflow/apiv2/dialogflowpb/version.pb.go +++ b/dialogflow/apiv2/dialogflowpb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/version.proto @@ -145,11 +145,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -160,7 +158,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +230,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -247,7 +243,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +296,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -315,7 +309,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +356,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -377,7 +369,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -433,7 +423,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +472,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -497,7 +485,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +532,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -559,7 +545,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,92 +816,6 @@ func file_google_cloud_dialogflow_v2_version_proto_init() { if File_google_cloud_dialogflow_v2_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/dialogflowpb/webhook.pb.go b/dialogflow/apiv2/dialogflowpb/webhook.pb.go index e284451219f5..56a009233bd1 100755 --- a/dialogflow/apiv2/dialogflowpb/webhook.pb.go +++ b/dialogflow/apiv2/dialogflowpb/webhook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2/webhook.proto @@ -61,11 +61,9 @@ type WebhookRequest struct { func (x *WebhookRequest) Reset() { *x = WebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest) String() string { @@ -76,7 +74,7 @@ func (*WebhookRequest) ProtoMessage() {} func (x *WebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type WebhookResponse struct { func (x *WebhookResponse) Reset() { *x = WebhookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse) String() string { @@ -204,7 +200,7 @@ func (*WebhookResponse) ProtoMessage() {} func (x *WebhookResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +298,9 @@ type OriginalDetectIntentRequest struct { func (x *OriginalDetectIntentRequest) Reset() { *x = OriginalDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OriginalDetectIntentRequest) String() string { @@ -317,7 +311,7 @@ func (*OriginalDetectIntentRequest) ProtoMessage() {} func (x *OriginalDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,44 +486,6 @@ func file_google_cloud_dialogflow_v2_webhook_proto_init() { file_google_cloud_dialogflow_v2_intent_proto_init() file_google_cloud_dialogflow_v2_session_proto_init() file_google_cloud_dialogflow_v2_session_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2_webhook_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OriginalDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2/documents_client.go b/dialogflow/apiv2/documents_client.go index 2162e2bec36e..4e97e1df4fd6 100755 --- a/dialogflow/apiv2/documents_client.go +++ b/dialogflow/apiv2/documents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -539,6 +538,8 @@ type documentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentsClient creates a new documents client based on gRPC. @@ -566,6 +567,7 @@ func NewDocumentsClient(ctx context.Context, opts ...option.ClientOption) (*Docu connPool: connPool, documentsClient: dialogflowpb.NewDocumentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -630,6 +632,8 @@ type documentsRESTClient struct { // Points back to the CallOptions field of the containing DocumentsClient CallOptions **DocumentsCallOptions + + logger *slog.Logger } // NewDocumentsRESTClient creates a new documents rest client. @@ -648,6 +652,7 @@ func NewDocumentsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -721,7 +726,7 @@ func (c *documentsGRPCClient) ListDocuments(ctx context.Context, req *dialogflow } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *documentsGRPCClient) GetDocument(ctx context.Context, req *dialogflowpb var resp *dialogflowpb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -774,7 +779,7 @@ func (c *documentsGRPCClient) CreateDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -794,7 +799,7 @@ func (c *documentsGRPCClient) ImportDocuments(ctx context.Context, req *dialogfl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -814,7 +819,7 @@ func (c *documentsGRPCClient) DeleteDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.DeleteDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *documentsGRPCClient) UpdateDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *documentsGRPCClient) ReloadDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ReloadDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ReloadDocument, req, settings.GRPC, c.logger, "ReloadDocument") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *documentsGRPCClient) ExportDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ExportDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ExportDocument, req, settings.GRPC, c.logger, "ExportDocument") return err }, opts...) if err != nil { @@ -894,7 +899,7 @@ func (c *documentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -923,7 +928,7 @@ func (c *documentsGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -957,7 +962,7 @@ func (c *documentsGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -972,7 +977,7 @@ func (c *documentsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *documentsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1075,21 +1080,10 @@ func (c *documentsRESTClient) ListDocuments(ctx context.Context, req *dialogflow } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1152,17 +1146,7 @@ func (c *documentsRESTClient) GetDocument(ctx context.Context, req *dialogflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1227,21 +1211,10 @@ func (c *documentsRESTClient) CreateDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1309,21 +1282,10 @@ func (c *documentsRESTClient) ImportDocuments(ctx context.Context, req *dialogfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1383,21 +1345,10 @@ func (c *documentsRESTClient) DeleteDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1470,21 +1421,10 @@ func (c *documentsRESTClient) UpdateDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1555,21 +1495,10 @@ func (c *documentsRESTClient) ReloadDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReloadDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1635,21 +1564,10 @@ func (c *documentsRESTClient) ExportDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportDocument") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1700,17 +1618,7 @@ func (c *documentsRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1775,21 +1683,10 @@ func (c *documentsRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1849,15 +1746,8 @@ func (c *documentsRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1894,17 +1784,7 @@ func (c *documentsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1969,21 +1849,10 @@ func (c *documentsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/documents_client_example_go123_test.go b/dialogflow/apiv2/documents_client_example_go123_test.go index ea0a84ee3460..854ce5491218 100644 --- a/dialogflow/apiv2/documents_client_example_go123_test.go +++ b/dialogflow/apiv2/documents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDocumentsClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDocumentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDocumentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/encryption_spec_client.go b/dialogflow/apiv2/encryption_spec_client.go index 22d684b09214..f51ef9127895 100755 --- a/dialogflow/apiv2/encryption_spec_client.go +++ b/dialogflow/apiv2/encryption_spec_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -262,6 +261,8 @@ type encryptionSpecGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEncryptionSpecClient creates a new encryption spec service client based on gRPC. @@ -288,6 +289,7 @@ func NewEncryptionSpecClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, encryptionSpecClient: dialogflowpb.NewEncryptionSpecServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -352,6 +354,8 @@ type encryptionSpecRESTClient struct { // Points back to the CallOptions field of the containing EncryptionSpecClient CallOptions **EncryptionSpecCallOptions + + logger *slog.Logger } // NewEncryptionSpecRESTClient creates a new encryption spec service rest client. @@ -369,6 +373,7 @@ func NewEncryptionSpecRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -431,7 +436,7 @@ func (c *encryptionSpecGRPCClient) GetEncryptionSpec(ctx context.Context, req *d var resp *dialogflowpb.EncryptionSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.encryptionSpecClient.GetEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.encryptionSpecClient.GetEncryptionSpec, req, settings.GRPC, c.logger, "GetEncryptionSpec") return err }, opts...) if err != nil { @@ -449,7 +454,7 @@ func (c *encryptionSpecGRPCClient) InitializeEncryptionSpec(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.encryptionSpecClient.InitializeEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.encryptionSpecClient.InitializeEncryptionSpec, req, settings.GRPC, c.logger, "InitializeEncryptionSpec") return err }, opts...) if err != nil { @@ -469,7 +474,7 @@ func (c *encryptionSpecGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -498,7 +503,7 @@ func (c *encryptionSpecGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -532,7 +537,7 @@ func (c *encryptionSpecGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -547,7 +552,7 @@ func (c *encryptionSpecGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -576,7 +581,7 @@ func (c *encryptionSpecGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -635,17 +640,7 @@ func (c *encryptionSpecRESTClient) GetEncryptionSpec(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEncryptionSpec") if err != nil { return err } @@ -704,21 +699,10 @@ func (c *encryptionSpecRESTClient) InitializeEncryptionSpec(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InitializeEncryptionSpec") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -769,17 +753,7 @@ func (c *encryptionSpecRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -844,21 +818,10 @@ func (c *encryptionSpecRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -918,15 +881,8 @@ func (c *encryptionSpecRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -963,17 +919,7 @@ func (c *encryptionSpecRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1038,21 +984,10 @@ func (c *encryptionSpecRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/encryption_spec_client_example_go123_test.go b/dialogflow/apiv2/encryption_spec_client_example_go123_test.go index ca9b290ef9b6..2be9e190f59b 100644 --- a/dialogflow/apiv2/encryption_spec_client_example_go123_test.go +++ b/dialogflow/apiv2/encryption_spec_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEncryptionSpecClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEncryptionSpecClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/entity_types_client.go b/dialogflow/apiv2/entity_types_client.go index 63115782ee13..4556160767f0 100755 --- a/dialogflow/apiv2/entity_types_client.go +++ b/dialogflow/apiv2/entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -610,6 +609,8 @@ type entityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEntityTypesClient creates a new entity types client based on gRPC. @@ -636,6 +637,7 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En connPool: connPool, entityTypesClient: dialogflowpb.NewEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -700,6 +702,8 @@ type entityTypesRESTClient struct { // Points back to the CallOptions field of the containing EntityTypesClient CallOptions **EntityTypesCallOptions + + logger *slog.Logger } // NewEntityTypesRESTClient creates a new entity types rest client. @@ -717,6 +721,7 @@ func NewEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -790,7 +795,7 @@ func (c *entityTypesGRPCClient) ListEntityTypes(ctx context.Context, req *dialog } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *entityTypesGRPCClient) GetEntityType(ctx context.Context, req *dialogfl var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -843,7 +848,7 @@ func (c *entityTypesGRPCClient) CreateEntityType(ctx context.Context, req *dialo var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -861,7 +866,7 @@ func (c *entityTypesGRPCClient) UpdateEntityType(ctx context.Context, req *dialo var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *entityTypesGRPCClient) DeleteEntityType(ctx context.Context, req *dialo opts = append((*c.CallOptions).DeleteEntityType[0:len((*c.CallOptions).DeleteEntityType):len((*c.CallOptions).DeleteEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.entityTypesClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) return err @@ -893,7 +898,7 @@ func (c *entityTypesGRPCClient) BatchUpdateEntityTypes(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchUpdateEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchUpdateEntityTypes, req, settings.GRPC, c.logger, "BatchUpdateEntityTypes") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *entityTypesGRPCClient) BatchDeleteEntityTypes(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchDeleteEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchDeleteEntityTypes, req, settings.GRPC, c.logger, "BatchDeleteEntityTypes") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *entityTypesGRPCClient) BatchCreateEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchCreateEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchCreateEntities, req, settings.GRPC, c.logger, "BatchCreateEntities") return err }, opts...) if err != nil { @@ -953,7 +958,7 @@ func (c *entityTypesGRPCClient) BatchUpdateEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchUpdateEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchUpdateEntities, req, settings.GRPC, c.logger, "BatchUpdateEntities") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *entityTypesGRPCClient) BatchDeleteEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchDeleteEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchDeleteEntities, req, settings.GRPC, c.logger, "BatchDeleteEntities") return err }, opts...) if err != nil { @@ -993,7 +998,7 @@ func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1022,7 +1027,7 @@ func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1071,7 +1076,7 @@ func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1174,21 +1179,10 @@ func (c *entityTypesRESTClient) ListEntityTypes(ctx context.Context, req *dialog } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1254,17 +1248,7 @@ func (c *entityTypesRESTClient) GetEntityType(ctx context.Context, req *dialogfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntityType") if err != nil { return err } @@ -1328,17 +1312,7 @@ func (c *entityTypesRESTClient) CreateEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntityType") if err != nil { return err } @@ -1409,17 +1383,7 @@ func (c *entityTypesRESTClient) UpdateEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntityType") if err != nil { return err } @@ -1470,15 +1434,8 @@ func (c *entityTypesRESTClient) DeleteEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntityType") + return err }, opts...) } @@ -1534,21 +1491,10 @@ func (c *entityTypesRESTClient) BatchUpdateEntityTypes(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1618,21 +1564,10 @@ func (c *entityTypesRESTClient) BatchDeleteEntityTypes(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1702,21 +1637,10 @@ func (c *entityTypesRESTClient) BatchCreateEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateEntities") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1788,21 +1712,10 @@ func (c *entityTypesRESTClient) BatchUpdateEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateEntities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1872,21 +1785,10 @@ func (c *entityTypesRESTClient) BatchDeleteEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteEntities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1937,17 +1839,7 @@ func (c *entityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2012,21 +1904,10 @@ func (c *entityTypesRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2086,15 +1967,8 @@ func (c *entityTypesRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2131,17 +2005,7 @@ func (c *entityTypesRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2206,21 +2070,10 @@ func (c *entityTypesRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/entity_types_client_example_go123_test.go b/dialogflow/apiv2/entity_types_client_example_go123_test.go index 0d5572b7b393..d869069f1f4d 100644 --- a/dialogflow/apiv2/entity_types_client_example_go123_test.go +++ b/dialogflow/apiv2/entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEntityTypesClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/environments_client.go b/dialogflow/apiv2/environments_client.go index 00a526a52cc5..c8bf32237874 100755 --- a/dialogflow/apiv2/environments_client.go +++ b/dialogflow/apiv2/environments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -370,6 +369,8 @@ type environmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEnvironmentsClient creates a new environments client based on gRPC. @@ -396,6 +397,7 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E connPool: connPool, environmentsClient: dialogflowpb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -444,6 +446,8 @@ type environmentsRESTClient struct { // Points back to the CallOptions field of the containing EnvironmentsClient CallOptions **EnvironmentsCallOptions + + logger *slog.Logger } // NewEnvironmentsRESTClient creates a new environments rest client. @@ -461,6 +465,7 @@ func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -524,7 +529,7 @@ func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *dial } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -559,7 +564,7 @@ func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *dialog var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *dia var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *dia var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *dia opts = append((*c.CallOptions).DeleteEnvironment[0:len((*c.CallOptions).DeleteEnvironment):len((*c.CallOptions).DeleteEnvironment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) return err @@ -638,7 +643,7 @@ func (c *environmentsGRPCClient) GetEnvironmentHistory(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironmentHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironmentHistory, req, settings.GRPC, c.logger, "GetEnvironmentHistory") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -702,7 +707,7 @@ func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -751,7 +756,7 @@ func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -851,21 +856,10 @@ func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *dial } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -928,17 +922,7 @@ func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -996,17 +980,7 @@ func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } @@ -1084,17 +1058,7 @@ func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnvironment") if err != nil { return err } @@ -1141,15 +1105,8 @@ func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") + return err }, opts...) } @@ -1198,21 +1155,10 @@ func (c *environmentsRESTClient) GetEnvironmentHistory(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironmentHistory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1275,17 +1221,7 @@ func (c *environmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1350,21 +1286,10 @@ func (c *environmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1424,15 +1349,8 @@ func (c *environmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1469,17 +1387,7 @@ func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1544,21 +1452,10 @@ func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/environments_client_example_go123_test.go b/dialogflow/apiv2/environments_client_example_go123_test.go index 52a020ed715f..3e44d274df8d 100644 --- a/dialogflow/apiv2/environments_client_example_go123_test.go +++ b/dialogflow/apiv2/environments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEnvironmentsClient_GetEnvironmentHistory_all() { } for resp, err := range c.GetEnvironmentHistory(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEnvironmentsClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEnvironmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleEnvironmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/fulfillments_client.go b/dialogflow/apiv2/fulfillments_client.go index 259bfbd01676..bde776aca95a 100755 --- a/dialogflow/apiv2/fulfillments_client.go +++ b/dialogflow/apiv2/fulfillments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -239,6 +238,8 @@ type fulfillmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFulfillmentsClient creates a new fulfillments client based on gRPC. @@ -265,6 +266,7 @@ func NewFulfillmentsClient(ctx context.Context, opts ...option.ClientOption) (*F connPool: connPool, fulfillmentsClient: dialogflowpb.NewFulfillmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -313,6 +315,8 @@ type fulfillmentsRESTClient struct { // Points back to the CallOptions field of the containing FulfillmentsClient CallOptions **FulfillmentsCallOptions + + logger *slog.Logger } // NewFulfillmentsRESTClient creates a new fulfillments rest client. @@ -330,6 +334,7 @@ func NewFulfillmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -382,7 +387,7 @@ func (c *fulfillmentsGRPCClient) GetFulfillment(ctx context.Context, req *dialog var resp *dialogflowpb.Fulfillment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fulfillmentsClient.GetFulfillment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fulfillmentsClient.GetFulfillment, req, settings.GRPC, c.logger, "GetFulfillment") return err }, opts...) if err != nil { @@ -400,7 +405,7 @@ func (c *fulfillmentsGRPCClient) UpdateFulfillment(ctx context.Context, req *dia var resp *dialogflowpb.Fulfillment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fulfillmentsClient.UpdateFulfillment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fulfillmentsClient.UpdateFulfillment, req, settings.GRPC, c.logger, "UpdateFulfillment") return err }, opts...) if err != nil { @@ -418,7 +423,7 @@ func (c *fulfillmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *fulfillmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -481,7 +486,7 @@ func (c *fulfillmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -496,7 +501,7 @@ func (c *fulfillmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -525,7 +530,7 @@ func (c *fulfillmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -584,17 +589,7 @@ func (c *fulfillmentsRESTClient) GetFulfillment(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFulfillment") if err != nil { return err } @@ -658,17 +653,7 @@ func (c *fulfillmentsRESTClient) UpdateFulfillment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFulfillment") if err != nil { return err } @@ -718,17 +703,7 @@ func (c *fulfillmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -793,21 +768,10 @@ func (c *fulfillmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -867,15 +831,8 @@ func (c *fulfillmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -912,17 +869,7 @@ func (c *fulfillmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -987,21 +934,10 @@ func (c *fulfillmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/fulfillments_client_example_go123_test.go b/dialogflow/apiv2/fulfillments_client_example_go123_test.go index 4195de59580e..770e8ca70c3a 100644 --- a/dialogflow/apiv2/fulfillments_client_example_go123_test.go +++ b/dialogflow/apiv2/fulfillments_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFulfillmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFulfillmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/generators_client.go b/dialogflow/apiv2/generators_client.go index a17c2f25d391..57ab2ebc768f 100755 --- a/dialogflow/apiv2/generators_client.go +++ b/dialogflow/apiv2/generators_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -333,6 +332,8 @@ type generatorsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGeneratorsClient creates a new generators client based on gRPC. @@ -363,6 +364,7 @@ func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generatorsClient: dialogflowpb.NewGeneratorsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -411,6 +413,8 @@ type generatorsRESTClient struct { // Points back to the CallOptions field of the containing GeneratorsClient CallOptions **GeneratorsCallOptions + + logger *slog.Logger } // NewGeneratorsRESTClient creates a new generators rest client. @@ -432,6 +436,7 @@ func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,7 +489,7 @@ func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *dialogf var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.CreateGenerator, req, settings.GRPC, c.logger, "CreateGenerator") return err }, opts...) if err != nil { @@ -502,7 +507,7 @@ func (c *generatorsGRPCClient) GetGenerator(ctx context.Context, req *dialogflow var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.GetGenerator, req, settings.GRPC, c.logger, "GetGenerator") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *dialogfl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.ListGenerators, req, settings.GRPC, c.logger, "ListGenerators") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *dialogf opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.generatorsClient.DeleteGenerator, req, settings.GRPC, c.logger, "DeleteGenerator") return err }, opts...) return err @@ -580,7 +585,7 @@ func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *dialogf var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.UpdateGenerator, req, settings.GRPC, c.logger, "UpdateGenerator") return err }, opts...) if err != nil { @@ -598,7 +603,7 @@ func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -676,7 +681,7 @@ func (c *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -774,17 +779,7 @@ func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGenerator") if err != nil { return err } @@ -834,17 +829,7 @@ func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *dialogflow httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerator") if err != nil { return err } @@ -906,21 +891,10 @@ func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *dialogfl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerators") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -980,15 +954,8 @@ func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGenerator") + return err }, opts...) } @@ -1039,17 +1006,7 @@ func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerator") if err != nil { return err } @@ -1099,17 +1056,7 @@ func (c *generatorsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1174,21 +1121,10 @@ func (c *generatorsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1248,15 +1184,8 @@ func (c *generatorsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1293,17 +1222,7 @@ func (c *generatorsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1368,21 +1287,10 @@ func (c *generatorsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/generators_client_example_go123_test.go b/dialogflow/apiv2/generators_client_example_go123_test.go index ed88d7d30041..71267d837919 100644 --- a/dialogflow/apiv2/generators_client_example_go123_test.go +++ b/dialogflow/apiv2/generators_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGeneratorsClient_ListGenerators_all() { } for resp, err := range c.ListGenerators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGeneratorsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGeneratorsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/helpers.go b/dialogflow/apiv2/helpers.go index c107236c7a0f..304ffa716908 100755 --- a/dialogflow/apiv2/helpers.go +++ b/dialogflow/apiv2/helpers.go @@ -18,10 +18,20 @@ package dialogflow import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dialogflow.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/dialogflow", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dialogflow/apiv2/intents_client.go b/dialogflow/apiv2/intents_client.go index ccaf52c32976..e57cb57df472 100755 --- a/dialogflow/apiv2/intents_client.go +++ b/dialogflow/apiv2/intents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -455,6 +454,8 @@ type intentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIntentsClient creates a new intents client based on gRPC. @@ -481,6 +482,7 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent connPool: connPool, intentsClient: dialogflowpb.NewIntentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -545,6 +547,8 @@ type intentsRESTClient struct { // Points back to the CallOptions field of the containing IntentsClient CallOptions **IntentsCallOptions + + logger *slog.Logger } // NewIntentsRESTClient creates a new intents rest client. @@ -562,6 +566,7 @@ func NewIntentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*In endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -635,7 +640,7 @@ func (c *intentsGRPCClient) ListIntents(ctx context.Context, req *dialogflowpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ListIntents, req, settings.GRPC, c.logger, "ListIntents") return err }, opts...) if err != nil { @@ -670,7 +675,7 @@ func (c *intentsGRPCClient) GetIntent(ctx context.Context, req *dialogflowpb.Get var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.GetIntent, req, settings.GRPC, c.logger, "GetIntent") return err }, opts...) if err != nil { @@ -688,7 +693,7 @@ func (c *intentsGRPCClient) CreateIntent(ctx context.Context, req *dialogflowpb. var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.CreateIntent, req, settings.GRPC, c.logger, "CreateIntent") return err }, opts...) if err != nil { @@ -706,7 +711,7 @@ func (c *intentsGRPCClient) UpdateIntent(ctx context.Context, req *dialogflowpb. var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.UpdateIntent, req, settings.GRPC, c.logger, "UpdateIntent") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *intentsGRPCClient) DeleteIntent(ctx context.Context, req *dialogflowpb. opts = append((*c.CallOptions).DeleteIntent[0:len((*c.CallOptions).DeleteIntent):len((*c.CallOptions).DeleteIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.intentsClient.DeleteIntent, req, settings.GRPC, c.logger, "DeleteIntent") return err }, opts...) return err @@ -738,7 +743,7 @@ func (c *intentsGRPCClient) BatchUpdateIntents(ctx context.Context, req *dialogf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.BatchUpdateIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.BatchUpdateIntents, req, settings.GRPC, c.logger, "BatchUpdateIntents") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *intentsGRPCClient) BatchDeleteIntents(ctx context.Context, req *dialogf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.BatchDeleteIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.BatchDeleteIntents, req, settings.GRPC, c.logger, "BatchDeleteIntents") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -856,7 +861,7 @@ func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -962,21 +967,10 @@ func (c *intentsRESTClient) ListIntents(ctx context.Context, req *dialogflowpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1045,17 +1039,7 @@ func (c *intentsRESTClient) GetIntent(ctx context.Context, req *dialogflowpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIntent") if err != nil { return err } @@ -1122,17 +1106,7 @@ func (c *intentsRESTClient) CreateIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIntent") if err != nil { return err } @@ -1206,17 +1180,7 @@ func (c *intentsRESTClient) UpdateIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIntent") if err != nil { return err } @@ -1267,15 +1231,8 @@ func (c *intentsRESTClient) DeleteIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIntent") + return err }, opts...) } @@ -1331,21 +1288,10 @@ func (c *intentsRESTClient) BatchUpdateIntents(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,21 +1361,10 @@ func (c *intentsRESTClient) BatchDeleteIntents(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1480,17 +1415,7 @@ func (c *intentsRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1555,21 +1480,10 @@ func (c *intentsRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1629,15 +1543,8 @@ func (c *intentsRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1674,17 +1581,7 @@ func (c *intentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1749,21 +1646,10 @@ func (c *intentsRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/intents_client_example_go123_test.go b/dialogflow/apiv2/intents_client_example_go123_test.go index ce624aa610b2..82a047379f96 100644 --- a/dialogflow/apiv2/intents_client_example_go123_test.go +++ b/dialogflow/apiv2/intents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIntentsClient_ListIntents_all() { } for resp, err := range c.ListIntents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIntentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIntentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/knowledge_bases_client.go b/dialogflow/apiv2/knowledge_bases_client.go index 05e4a586c731..2483a7b2fdf2 100755 --- a/dialogflow/apiv2/knowledge_bases_client.go +++ b/dialogflow/apiv2/knowledge_bases_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -330,6 +329,8 @@ type knowledgeBasesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewKnowledgeBasesClient creates a new knowledge bases client based on gRPC. @@ -357,6 +358,7 @@ func NewKnowledgeBasesClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, knowledgeBasesClient: dialogflowpb.NewKnowledgeBasesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -405,6 +407,8 @@ type knowledgeBasesRESTClient struct { // Points back to the CallOptions field of the containing KnowledgeBasesClient CallOptions **KnowledgeBasesCallOptions + + logger *slog.Logger } // NewKnowledgeBasesRESTClient creates a new knowledge bases rest client. @@ -423,6 +427,7 @@ func NewKnowledgeBasesRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -486,7 +491,7 @@ func (c *knowledgeBasesGRPCClient) ListKnowledgeBases(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.ListKnowledgeBases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.ListKnowledgeBases, req, settings.GRPC, c.logger, "ListKnowledgeBases") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *knowledgeBasesGRPCClient) GetKnowledgeBase(ctx context.Context, req *di var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.GetKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.GetKnowledgeBase, req, settings.GRPC, c.logger, "GetKnowledgeBase") return err }, opts...) if err != nil { @@ -539,7 +544,7 @@ func (c *knowledgeBasesGRPCClient) CreateKnowledgeBase(ctx context.Context, req var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.CreateKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.CreateKnowledgeBase, req, settings.GRPC, c.logger, "CreateKnowledgeBase") return err }, opts...) if err != nil { @@ -556,7 +561,7 @@ func (c *knowledgeBasesGRPCClient) DeleteKnowledgeBase(ctx context.Context, req opts = append((*c.CallOptions).DeleteKnowledgeBase[0:len((*c.CallOptions).DeleteKnowledgeBase):len((*c.CallOptions).DeleteKnowledgeBase)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.knowledgeBasesClient.DeleteKnowledgeBase(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.knowledgeBasesClient.DeleteKnowledgeBase, req, settings.GRPC, c.logger, "DeleteKnowledgeBase") return err }, opts...) return err @@ -571,7 +576,7 @@ func (c *knowledgeBasesGRPCClient) UpdateKnowledgeBase(ctx context.Context, req var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.UpdateKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.UpdateKnowledgeBase, req, settings.GRPC, c.logger, "UpdateKnowledgeBase") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *knowledgeBasesGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *knowledgeBasesGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *knowledgeBasesGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -667,7 +672,7 @@ func (c *knowledgeBasesGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *knowledgeBasesGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -770,21 +775,10 @@ func (c *knowledgeBasesRESTClient) ListKnowledgeBases(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKnowledgeBases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -847,17 +841,7 @@ func (c *knowledgeBasesRESTClient) GetKnowledgeBase(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKnowledgeBase") if err != nil { return err } @@ -914,17 +898,7 @@ func (c *knowledgeBasesRESTClient) CreateKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKnowledgeBase") if err != nil { return err } @@ -974,15 +948,8 @@ func (c *knowledgeBasesRESTClient) DeleteKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteKnowledgeBase") + return err }, opts...) } @@ -1033,17 +1000,7 @@ func (c *knowledgeBasesRESTClient) UpdateKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateKnowledgeBase") if err != nil { return err } @@ -1093,17 +1050,7 @@ func (c *knowledgeBasesRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1168,21 +1115,10 @@ func (c *knowledgeBasesRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1242,15 +1178,8 @@ func (c *knowledgeBasesRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1287,17 +1216,7 @@ func (c *knowledgeBasesRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1362,21 +1281,10 @@ func (c *knowledgeBasesRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/knowledge_bases_client_example_go123_test.go b/dialogflow/apiv2/knowledge_bases_client_example_go123_test.go index 05d91a08d193..ae41bcaffec5 100644 --- a/dialogflow/apiv2/knowledge_bases_client_example_go123_test.go +++ b/dialogflow/apiv2/knowledge_bases_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleKnowledgeBasesClient_ListKnowledgeBases_all() { } for resp, err := range c.ListKnowledgeBases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleKnowledgeBasesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleKnowledgeBasesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/participants_client.go b/dialogflow/apiv2/participants_client.go index d2e53c3a7a51..d5407ddfeeab 100755 --- a/dialogflow/apiv2/participants_client.go +++ b/dialogflow/apiv2/participants_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -485,6 +484,8 @@ type participantsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewParticipantsClient creates a new participants client based on gRPC. @@ -511,6 +512,7 @@ func NewParticipantsClient(ctx context.Context, opts ...option.ClientOption) (*P connPool: connPool, participantsClient: dialogflowpb.NewParticipantsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -559,6 +561,8 @@ type participantsRESTClient struct { // Points back to the CallOptions field of the containing ParticipantsClient CallOptions **ParticipantsCallOptions + + logger *slog.Logger } // NewParticipantsRESTClient creates a new participants rest client. @@ -576,6 +580,7 @@ func NewParticipantsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -628,7 +633,7 @@ func (c *participantsGRPCClient) CreateParticipant(ctx context.Context, req *dia var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.CreateParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.CreateParticipant, req, settings.GRPC, c.logger, "CreateParticipant") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *participantsGRPCClient) GetParticipant(ctx context.Context, req *dialog var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.GetParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.GetParticipant, req, settings.GRPC, c.logger, "GetParticipant") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *participantsGRPCClient) ListParticipants(ctx context.Context, req *dial } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.ListParticipants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.ListParticipants, req, settings.GRPC, c.logger, "ListParticipants") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *participantsGRPCClient) UpdateParticipant(ctx context.Context, req *dia var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.UpdateParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.UpdateParticipant, req, settings.GRPC, c.logger, "UpdateParticipant") return err }, opts...) if err != nil { @@ -728,7 +733,7 @@ func (c *participantsGRPCClient) AnalyzeContent(ctx context.Context, req *dialog var resp *dialogflowpb.AnalyzeContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.AnalyzeContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.AnalyzeContent, req, settings.GRPC, c.logger, "AnalyzeContent") return err }, opts...) if err != nil { @@ -743,7 +748,9 @@ func (c *participantsGRPCClient) StreamingAnalyzeContent(ctx context.Context, op opts = append((*c.CallOptions).StreamingAnalyzeContent[0:len((*c.CallOptions).StreamingAnalyzeContent):len((*c.CallOptions).StreamingAnalyzeContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingAnalyzeContent") resp, err = c.participantsClient.StreamingAnalyzeContent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingAnalyzeContent") return err }, opts...) if err != nil { @@ -761,7 +768,7 @@ func (c *participantsGRPCClient) SuggestArticles(ctx context.Context, req *dialo var resp *dialogflowpb.SuggestArticlesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestArticles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestArticles, req, settings.GRPC, c.logger, "SuggestArticles") return err }, opts...) if err != nil { @@ -779,7 +786,7 @@ func (c *participantsGRPCClient) SuggestFaqAnswers(ctx context.Context, req *dia var resp *dialogflowpb.SuggestFaqAnswersResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestFaqAnswers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestFaqAnswers, req, settings.GRPC, c.logger, "SuggestFaqAnswers") return err }, opts...) if err != nil { @@ -797,7 +804,7 @@ func (c *participantsGRPCClient) SuggestSmartReplies(ctx context.Context, req *d var resp *dialogflowpb.SuggestSmartRepliesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestSmartReplies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestSmartReplies, req, settings.GRPC, c.logger, "SuggestSmartReplies") return err }, opts...) if err != nil { @@ -815,7 +822,7 @@ func (c *participantsGRPCClient) SuggestKnowledgeAssist(ctx context.Context, req var resp *dialogflowpb.SuggestKnowledgeAssistResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestKnowledgeAssist(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestKnowledgeAssist, req, settings.GRPC, c.logger, "SuggestKnowledgeAssist") return err }, opts...) if err != nil { @@ -833,7 +840,7 @@ func (c *participantsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -862,7 +869,7 @@ func (c *participantsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -896,7 +903,7 @@ func (c *participantsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -911,7 +918,7 @@ func (c *participantsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -940,7 +947,7 @@ func (c *participantsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1006,17 +1013,7 @@ func (c *participantsRESTClient) CreateParticipant(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateParticipant") if err != nil { return err } @@ -1066,17 +1063,7 @@ func (c *participantsRESTClient) GetParticipant(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipant") if err != nil { return err } @@ -1138,21 +1125,10 @@ func (c *participantsRESTClient) ListParticipants(ctx context.Context, req *dial } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipants") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1229,17 +1205,7 @@ func (c *participantsRESTClient) UpdateParticipant(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateParticipant") if err != nil { return err } @@ -1300,17 +1266,7 @@ func (c *participantsRESTClient) AnalyzeContent(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeContent") if err != nil { return err } @@ -1388,17 +1344,7 @@ func (c *participantsRESTClient) SuggestArticles(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestArticles") if err != nil { return err } @@ -1455,17 +1401,7 @@ func (c *participantsRESTClient) SuggestFaqAnswers(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestFaqAnswers") if err != nil { return err } @@ -1522,17 +1458,7 @@ func (c *participantsRESTClient) SuggestSmartReplies(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestSmartReplies") if err != nil { return err } @@ -1588,17 +1514,7 @@ func (c *participantsRESTClient) SuggestKnowledgeAssist(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestKnowledgeAssist") if err != nil { return err } @@ -1648,17 +1564,7 @@ func (c *participantsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1723,21 +1629,10 @@ func (c *participantsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1797,15 +1692,8 @@ func (c *participantsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1842,17 +1730,7 @@ func (c *participantsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1917,21 +1795,10 @@ func (c *participantsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/participants_client_example_go123_test.go b/dialogflow/apiv2/participants_client_example_go123_test.go index a1f4994c901f..ccef5b5499fe 100644 --- a/dialogflow/apiv2/participants_client_example_go123_test.go +++ b/dialogflow/apiv2/participants_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleParticipantsClient_ListParticipants_all() { } for resp, err := range c.ListParticipants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleParticipantsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleParticipantsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/session_entity_types_client.go b/dialogflow/apiv2/session_entity_types_client.go index e7e382280b8a..3d38603c4039 100755 --- a/dialogflow/apiv2/session_entity_types_client.go +++ b/dialogflow/apiv2/session_entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -353,6 +352,8 @@ type sessionEntityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionEntityTypesClient creates a new session entity types client based on gRPC. @@ -380,6 +381,7 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, sessionEntityTypesClient: dialogflowpb.NewSessionEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -428,6 +430,8 @@ type sessionEntityTypesRESTClient struct { // Points back to the CallOptions field of the containing SessionEntityTypesClient CallOptions **SessionEntityTypesCallOptions + + logger *slog.Logger } // NewSessionEntityTypesRESTClient creates a new session entity types rest client. @@ -446,6 +450,7 @@ func NewSessionEntityTypesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -509,7 +514,7 @@ func (c *sessionEntityTypesGRPCClient) ListSessionEntityTypes(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.ListSessionEntityTypes, req, settings.GRPC, c.logger, "ListSessionEntityTypes") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *sessionEntityTypesGRPCClient) GetSessionEntityType(ctx context.Context, var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.GetSessionEntityType, req, settings.GRPC, c.logger, "GetSessionEntityType") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *sessionEntityTypesGRPCClient) CreateSessionEntityType(ctx context.Conte var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.CreateSessionEntityType, req, settings.GRPC, c.logger, "CreateSessionEntityType") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *sessionEntityTypesGRPCClient) UpdateSessionEntityType(ctx context.Conte var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.UpdateSessionEntityType, req, settings.GRPC, c.logger, "UpdateSessionEntityType") return err }, opts...) if err != nil { @@ -597,7 +602,7 @@ func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Conte opts = append((*c.CallOptions).DeleteSessionEntityType[0:len((*c.CallOptions).DeleteSessionEntityType):len((*c.CallOptions).DeleteSessionEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sessionEntityTypesClient.DeleteSessionEntityType, req, settings.GRPC, c.logger, "DeleteSessionEntityType") return err }, opts...) return err @@ -612,7 +617,7 @@ func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -690,7 +695,7 @@ func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -719,7 +724,7 @@ func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -794,21 +799,10 @@ func (c *sessionEntityTypesRESTClient) ListSessionEntityTypes(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessionEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -875,17 +869,7 @@ func (c *sessionEntityTypesRESTClient) GetSessionEntityType(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSessionEntityType") if err != nil { return err } @@ -949,17 +933,7 @@ func (c *sessionEntityTypesRESTClient) CreateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSessionEntityType") if err != nil { return err } @@ -1027,17 +1001,7 @@ func (c *sessionEntityTypesRESTClient) UpdateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSessionEntityType") if err != nil { return err } @@ -1088,15 +1052,8 @@ func (c *sessionEntityTypesRESTClient) DeleteSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSessionEntityType") + return err }, opts...) } @@ -1133,17 +1090,7 @@ func (c *sessionEntityTypesRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1208,21 +1155,10 @@ func (c *sessionEntityTypesRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1282,15 +1218,8 @@ func (c *sessionEntityTypesRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1327,17 +1256,7 @@ func (c *sessionEntityTypesRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1402,21 +1321,10 @@ func (c *sessionEntityTypesRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/session_entity_types_client_example_go123_test.go b/dialogflow/apiv2/session_entity_types_client_example_go123_test.go index 1c2981022d73..083d92082378 100644 --- a/dialogflow/apiv2/session_entity_types_client_example_go123_test.go +++ b/dialogflow/apiv2/session_entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes_all() { } for resp, err := range c.ListSessionEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSessionEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSessionEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/sessions_client.go b/dialogflow/apiv2/sessions_client.go index f1b9afdc1684..614b9ceeb1d6 100755 --- a/dialogflow/apiv2/sessions_client.go +++ b/dialogflow/apiv2/sessions_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type sessionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionsClient creates a new sessions client based on gRPC. @@ -282,6 +283,7 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi connPool: connPool, sessionsClient: dialogflowpb.NewSessionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -330,6 +332,8 @@ type sessionsRESTClient struct { // Points back to the CallOptions field of the containing SessionsClient CallOptions **SessionsCallOptions + + logger *slog.Logger } // NewSessionsRESTClient creates a new sessions rest client. @@ -350,6 +354,7 @@ func NewSessionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -402,7 +407,7 @@ func (c *sessionsGRPCClient) DetectIntent(ctx context.Context, req *dialogflowpb var resp *dialogflowpb.DetectIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.DetectIntent, req, settings.GRPC, c.logger, "DetectIntent") return err }, opts...) if err != nil { @@ -417,7 +422,9 @@ func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingDetectIntent[0:len((*c.CallOptions).StreamingDetectIntent):len((*c.CallOptions).StreamingDetectIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") return err }, opts...) if err != nil { @@ -435,7 +442,7 @@ func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -464,7 +471,7 @@ func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -498,7 +505,7 @@ func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -513,7 +520,7 @@ func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -542,7 +549,7 @@ func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -621,17 +628,7 @@ func (c *sessionsRESTClient) DetectIntent(ctx context.Context, req *dialogflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetectIntent") if err != nil { return err } @@ -701,17 +698,7 @@ func (c *sessionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -776,21 +763,10 @@ func (c *sessionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -850,15 +826,8 @@ func (c *sessionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -895,17 +864,7 @@ func (c *sessionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -970,21 +929,10 @@ func (c *sessionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/sessions_client_example_go123_test.go b/dialogflow/apiv2/sessions_client_example_go123_test.go index d5a700573651..dca057d8e698 100644 --- a/dialogflow/apiv2/sessions_client_example_go123_test.go +++ b/dialogflow/apiv2/sessions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2/versions_client.go b/dialogflow/apiv2/versions_client.go index 53f01c37f24a..f1f17ab7cc70 100755 --- a/dialogflow/apiv2/versions_client.go +++ b/dialogflow/apiv2/versions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -335,6 +334,8 @@ type versionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVersionsClient creates a new versions client based on gRPC. @@ -361,6 +362,7 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi connPool: connPool, versionsClient: dialogflowpb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -409,6 +411,8 @@ type versionsRESTClient struct { // Points back to the CallOptions field of the containing VersionsClient CallOptions **VersionsCallOptions + + logger *slog.Logger } // NewVersionsRESTClient creates a new versions rest client. @@ -426,6 +430,7 @@ func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*V endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -489,7 +494,7 @@ func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *dialogflowpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *dialogflowpb.G var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CreateVersion, req, settings.GRPC, c.logger, "CreateVersion") return err }, opts...) if err != nil { @@ -560,7 +565,7 @@ func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *dialogflowp opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.versionsClient.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) return err @@ -592,7 +597,7 @@ func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -621,7 +626,7 @@ func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -670,7 +675,7 @@ func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -699,7 +704,7 @@ func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -770,21 +775,10 @@ func (c *versionsRESTClient) ListVersions(ctx context.Context, req *dialogflowpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -847,17 +841,7 @@ func (c *versionsRESTClient) GetVersion(ctx context.Context, req *dialogflowpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -916,17 +900,7 @@ func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } @@ -994,17 +968,7 @@ func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -1051,15 +1015,8 @@ func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") + return err }, opts...) } @@ -1096,17 +1053,7 @@ func (c *versionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1171,21 +1118,10 @@ func (c *versionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1245,15 +1181,8 @@ func (c *versionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1290,17 +1219,7 @@ func (c *versionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1365,21 +1284,10 @@ func (c *versionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2/versions_client_example_go123_test.go b/dialogflow/apiv2/versions_client_example_go123_test.go index 9adcd1b677e5..2bb66b9c3e15 100644 --- a/dialogflow/apiv2/versions_client_example_go123_test.go +++ b/dialogflow/apiv2/versions_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVersionsClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVersionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVersionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/agents_client.go b/dialogflow/apiv2beta1/agents_client.go index 35ae70316ded..44c635468f34 100755 --- a/dialogflow/apiv2beta1/agents_client.go +++ b/dialogflow/apiv2beta1/agents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -575,6 +574,8 @@ type agentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAgentsClient creates a new agents client based on gRPC. @@ -601,6 +602,7 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC connPool: connPool, agentsClient: dialogflowpb.NewAgentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -665,6 +667,8 @@ type agentsRESTClient struct { // Points back to the CallOptions field of the containing AgentsClient CallOptions **AgentsCallOptions + + logger *slog.Logger } // NewAgentsRESTClient creates a new agents rest client. @@ -682,6 +686,7 @@ func NewAgentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Age endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -744,7 +749,7 @@ func (c *agentsGRPCClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAg var resp *dialogflowpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgent, req, settings.GRPC, c.logger, "GetAgent") return err }, opts...) if err != nil { @@ -762,7 +767,7 @@ func (c *agentsGRPCClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAg var resp *dialogflowpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.SetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.SetAgent, req, settings.GRPC, c.logger, "SetAgent") return err }, opts...) if err != nil { @@ -779,7 +784,7 @@ func (c *agentsGRPCClient) DeleteAgent(ctx context.Context, req *dialogflowpb.De opts = append((*c.CallOptions).DeleteAgent[0:len((*c.CallOptions).DeleteAgent):len((*c.CallOptions).DeleteAgent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.agentsClient.DeleteAgent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.agentsClient.DeleteAgent, req, settings.GRPC, c.logger, "DeleteAgent") return err }, opts...) return err @@ -805,7 +810,7 @@ func (c *agentsGRPCClient) SearchAgents(ctx context.Context, req *dialogflowpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.SearchAgents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.SearchAgents, req, settings.GRPC, c.logger, "SearchAgents") return err }, opts...) if err != nil { @@ -840,7 +845,7 @@ func (c *agentsGRPCClient) TrainAgent(ctx context.Context, req *dialogflowpb.Tra var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.TrainAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.TrainAgent, req, settings.GRPC, c.logger, "TrainAgent") return err }, opts...) if err != nil { @@ -860,7 +865,7 @@ func (c *agentsGRPCClient) ExportAgent(ctx context.Context, req *dialogflowpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ExportAgent, req, settings.GRPC, c.logger, "ExportAgent") return err }, opts...) if err != nil { @@ -880,7 +885,7 @@ func (c *agentsGRPCClient) ImportAgent(ctx context.Context, req *dialogflowpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ImportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ImportAgent, req, settings.GRPC, c.logger, "ImportAgent") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *agentsGRPCClient) RestoreAgent(ctx context.Context, req *dialogflowpb.R var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.RestoreAgent, req, settings.GRPC, c.logger, "RestoreAgent") return err }, opts...) if err != nil { @@ -920,7 +925,7 @@ func (c *agentsGRPCClient) GetValidationResult(ctx context.Context, req *dialogf var resp *dialogflowpb.ValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetValidationResult, req, settings.GRPC, c.logger, "GetValidationResult") return err }, opts...) if err != nil { @@ -938,7 +943,7 @@ func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1016,7 +1021,7 @@ func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1104,17 +1109,7 @@ func (c *agentsRESTClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgent") if err != nil { return err } @@ -1182,17 +1177,7 @@ func (c *agentsRESTClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetAgent") if err != nil { return err } @@ -1239,15 +1224,8 @@ func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *dialogflowpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAgent") + return err }, opts...) } @@ -1301,21 +1279,10 @@ func (c *agentsRESTClient) SearchAgents(ctx context.Context, req *dialogflowpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchAgents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1397,21 +1364,10 @@ func (c *agentsRESTClient) TrainAgent(ctx context.Context, req *dialogflowpb.Tra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1477,21 +1433,10 @@ func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *dialogflowpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAgent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1574,21 +1519,10 @@ func (c *agentsRESTClient) ImportAgent(ctx context.Context, req *dialogflowpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAgent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1669,21 +1603,10 @@ func (c *agentsRESTClient) RestoreAgent(ctx context.Context, req *dialogflowpb.R httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1738,17 +1661,7 @@ func (c *agentsRESTClient) GetValidationResult(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetValidationResult") if err != nil { return err } @@ -1798,17 +1711,7 @@ func (c *agentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1873,21 +1776,10 @@ func (c *agentsRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1947,15 +1839,8 @@ func (c *agentsRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1992,17 +1877,7 @@ func (c *agentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2067,21 +1942,10 @@ func (c *agentsRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/agents_client_example_go123_test.go b/dialogflow/apiv2beta1/agents_client_example_go123_test.go index a8b04b283221..4c72742e4715 100644 --- a/dialogflow/apiv2beta1/agents_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/agents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAgentsClient_SearchAgents_all() { } for resp, err := range c.SearchAgents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAgentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAgentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/answer_records_client.go b/dialogflow/apiv2beta1/answer_records_client.go index 16352f7e87b7..9dda497c0422 100755 --- a/dialogflow/apiv2beta1/answer_records_client.go +++ b/dialogflow/apiv2beta1/answer_records_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -274,6 +273,8 @@ type answerRecordsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnswerRecordsClient creates a new answer records client based on gRPC. @@ -301,6 +302,7 @@ func NewAnswerRecordsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, answerRecordsClient: dialogflowpb.NewAnswerRecordsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -349,6 +351,8 @@ type answerRecordsRESTClient struct { // Points back to the CallOptions field of the containing AnswerRecordsClient CallOptions **AnswerRecordsCallOptions + + logger *slog.Logger } // NewAnswerRecordsRESTClient creates a new answer records rest client. @@ -367,6 +371,7 @@ func NewAnswerRecordsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,7 +424,7 @@ func (c *answerRecordsGRPCClient) GetAnswerRecord(ctx context.Context, req *dial var resp *dialogflowpb.AnswerRecord err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.answerRecordsClient.GetAnswerRecord(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.answerRecordsClient.GetAnswerRecord, req, settings.GRPC, c.logger, "GetAnswerRecord") return err }, opts...) if err != nil { @@ -448,7 +453,7 @@ func (c *answerRecordsGRPCClient) ListAnswerRecords(ctx context.Context, req *di } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.answerRecordsClient.ListAnswerRecords(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.answerRecordsClient.ListAnswerRecords, req, settings.GRPC, c.logger, "ListAnswerRecords") return err }, opts...) if err != nil { @@ -483,7 +488,7 @@ func (c *answerRecordsGRPCClient) UpdateAnswerRecord(ctx context.Context, req *d var resp *dialogflowpb.AnswerRecord err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.answerRecordsClient.UpdateAnswerRecord(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.answerRecordsClient.UpdateAnswerRecord, req, settings.GRPC, c.logger, "UpdateAnswerRecord") return err }, opts...) if err != nil { @@ -501,7 +506,7 @@ func (c *answerRecordsGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *answerRecordsGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *answerRecordsGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -579,7 +584,7 @@ func (c *answerRecordsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -608,7 +613,7 @@ func (c *answerRecordsGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -670,17 +675,7 @@ func (c *answerRecordsRESTClient) GetAnswerRecord(ctx context.Context, req *dial httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnswerRecord") if err != nil { return err } @@ -746,21 +741,10 @@ func (c *answerRecordsRESTClient) ListAnswerRecords(ctx context.Context, req *di } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnswerRecords") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -837,17 +821,7 @@ func (c *answerRecordsRESTClient) UpdateAnswerRecord(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAnswerRecord") if err != nil { return err } @@ -897,17 +871,7 @@ func (c *answerRecordsRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -972,21 +936,10 @@ func (c *answerRecordsRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1046,15 +999,8 @@ func (c *answerRecordsRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1091,17 +1037,7 @@ func (c *answerRecordsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1166,21 +1102,10 @@ func (c *answerRecordsRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/answer_records_client_example_go123_test.go b/dialogflow/apiv2beta1/answer_records_client_example_go123_test.go index e217826b6091..3235d28d29df 100644 --- a/dialogflow/apiv2beta1/answer_records_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/answer_records_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAnswerRecordsClient_ListAnswerRecords_all() { } for resp, err := range c.ListAnswerRecords(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAnswerRecordsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAnswerRecordsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/contexts_client.go b/dialogflow/apiv2beta1/contexts_client.go index 4eac0aca900e..e39d9628872b 100755 --- a/dialogflow/apiv2beta1/contexts_client.go +++ b/dialogflow/apiv2beta1/contexts_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -361,6 +360,8 @@ type contextsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewContextsClient creates a new contexts client based on gRPC. @@ -387,6 +388,7 @@ func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*Conte connPool: connPool, contextsClient: dialogflowpb.NewContextsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -435,6 +437,8 @@ type contextsRESTClient struct { // Points back to the CallOptions field of the containing ContextsClient CallOptions **ContextsCallOptions + + logger *slog.Logger } // NewContextsRESTClient creates a new contexts rest client. @@ -452,6 +456,7 @@ func NewContextsRESTClient(ctx context.Context, opts ...option.ClientOption) (*C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -515,7 +520,7 @@ func (c *contextsGRPCClient) ListContexts(ctx context.Context, req *dialogflowpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.ListContexts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.ListContexts, req, settings.GRPC, c.logger, "ListContexts") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *contextsGRPCClient) GetContext(ctx context.Context, req *dialogflowpb.G var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.GetContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.GetContext, req, settings.GRPC, c.logger, "GetContext") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *contextsGRPCClient) CreateContext(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.CreateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.CreateContext, req, settings.GRPC, c.logger, "CreateContext") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *contextsGRPCClient) UpdateContext(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Context err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.contextsClient.UpdateContext(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.contextsClient.UpdateContext, req, settings.GRPC, c.logger, "UpdateContext") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *contextsGRPCClient) DeleteContext(ctx context.Context, req *dialogflowp opts = append((*c.CallOptions).DeleteContext[0:len((*c.CallOptions).DeleteContext):len((*c.CallOptions).DeleteContext)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.contextsClient.DeleteContext(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.contextsClient.DeleteContext, req, settings.GRPC, c.logger, "DeleteContext") return err }, opts...) return err @@ -617,7 +622,7 @@ func (c *contextsGRPCClient) DeleteAllContexts(ctx context.Context, req *dialogf opts = append((*c.CallOptions).DeleteAllContexts[0:len((*c.CallOptions).DeleteAllContexts):len((*c.CallOptions).DeleteAllContexts)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.contextsClient.DeleteAllContexts(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.contextsClient.DeleteAllContexts, req, settings.GRPC, c.logger, "DeleteAllContexts") return err }, opts...) return err @@ -632,7 +637,7 @@ func (c *contextsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *contextsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *contextsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -710,7 +715,7 @@ func (c *contextsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *contextsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -810,21 +815,10 @@ func (c *contextsRESTClient) ListContexts(ctx context.Context, req *dialogflowpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContexts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -887,17 +881,7 @@ func (c *contextsRESTClient) GetContext(ctx context.Context, req *dialogflowpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetContext") if err != nil { return err } @@ -956,17 +940,7 @@ func (c *contextsRESTClient) CreateContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateContext") if err != nil { return err } @@ -1030,17 +1004,7 @@ func (c *contextsRESTClient) UpdateContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateContext") if err != nil { return err } @@ -1087,15 +1051,8 @@ func (c *contextsRESTClient) DeleteContext(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteContext") + return err }, opts...) } @@ -1129,15 +1086,8 @@ func (c *contextsRESTClient) DeleteAllContexts(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAllContexts") + return err }, opts...) } @@ -1174,17 +1124,7 @@ func (c *contextsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1249,21 +1189,10 @@ func (c *contextsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1323,15 +1252,8 @@ func (c *contextsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1368,17 +1290,7 @@ func (c *contextsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1443,21 +1355,10 @@ func (c *contextsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/contexts_client_example_go123_test.go b/dialogflow/apiv2beta1/contexts_client_example_go123_test.go index 1667c4399cc7..802f176ca32e 100644 --- a/dialogflow/apiv2beta1/contexts_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/contexts_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleContextsClient_ListContexts_all() { } for resp, err := range c.ListContexts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleContextsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleContextsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/conversation_profiles_client.go b/dialogflow/apiv2beta1/conversation_profiles_client.go index da4bb1fca920..1cbbcfdafb4f 100755 --- a/dialogflow/apiv2beta1/conversation_profiles_client.go +++ b/dialogflow/apiv2beta1/conversation_profiles_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -455,6 +454,8 @@ type conversationProfilesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationProfilesClient creates a new conversation profiles client based on gRPC. @@ -482,6 +483,7 @@ func NewConversationProfilesClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationProfilesClient: dialogflowpb.NewConversationProfilesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -546,6 +548,8 @@ type conversationProfilesRESTClient struct { // Points back to the CallOptions field of the containing ConversationProfilesClient CallOptions **ConversationProfilesCallOptions + + logger *slog.Logger } // NewConversationProfilesRESTClient creates a new conversation profiles rest client. @@ -564,6 +568,7 @@ func NewConversationProfilesRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -637,7 +642,7 @@ func (c *conversationProfilesGRPCClient) ListConversationProfiles(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.ListConversationProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.ListConversationProfiles, req, settings.GRPC, c.logger, "ListConversationProfiles") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *conversationProfilesGRPCClient) GetConversationProfile(ctx context.Cont var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.GetConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.GetConversationProfile, req, settings.GRPC, c.logger, "GetConversationProfile") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *conversationProfilesGRPCClient) CreateConversationProfile(ctx context.C var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.CreateConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.CreateConversationProfile, req, settings.GRPC, c.logger, "CreateConversationProfile") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *conversationProfilesGRPCClient) UpdateConversationProfile(ctx context.C var resp *dialogflowpb.ConversationProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.UpdateConversationProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.UpdateConversationProfile, req, settings.GRPC, c.logger, "UpdateConversationProfile") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *conversationProfilesGRPCClient) DeleteConversationProfile(ctx context.C opts = append((*c.CallOptions).DeleteConversationProfile[0:len((*c.CallOptions).DeleteConversationProfile):len((*c.CallOptions).DeleteConversationProfile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationProfilesClient.DeleteConversationProfile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationProfilesClient.DeleteConversationProfile, req, settings.GRPC, c.logger, "DeleteConversationProfile") return err }, opts...) return err @@ -740,7 +745,7 @@ func (c *conversationProfilesGRPCClient) SetSuggestionFeatureConfig(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.SetSuggestionFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.SetSuggestionFeatureConfig, req, settings.GRPC, c.logger, "SetSuggestionFeatureConfig") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *conversationProfilesGRPCClient) ClearSuggestionFeatureConfig(ctx contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationProfilesClient.ClearSuggestionFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationProfilesClient.ClearSuggestionFeatureConfig, req, settings.GRPC, c.logger, "ClearSuggestionFeatureConfig") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *conversationProfilesGRPCClient) GetLocation(ctx context.Context, req *l var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *conversationProfilesGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -843,7 +848,7 @@ func (c *conversationProfilesGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -858,7 +863,7 @@ func (c *conversationProfilesGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -887,7 +892,7 @@ func (c *conversationProfilesGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -958,21 +963,10 @@ func (c *conversationProfilesRESTClient) ListConversationProfiles(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversationProfiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1035,17 +1029,7 @@ func (c *conversationProfilesRESTClient) GetConversationProfile(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversationProfile") if err != nil { return err } @@ -1107,17 +1091,7 @@ func (c *conversationProfilesRESTClient) CreateConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversationProfile") if err != nil { return err } @@ -1186,17 +1160,7 @@ func (c *conversationProfilesRESTClient) UpdateConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversationProfile") if err != nil { return err } @@ -1243,15 +1207,8 @@ func (c *conversationProfilesRESTClient) DeleteConversationProfile(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversationProfile") + return err }, opts...) } @@ -1311,21 +1268,10 @@ func (c *conversationProfilesRESTClient) SetSuggestionFeatureConfig(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetSuggestionFeatureConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1392,21 +1338,10 @@ func (c *conversationProfilesRESTClient) ClearSuggestionFeatureConfig(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClearSuggestionFeatureConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1457,17 +1392,7 @@ func (c *conversationProfilesRESTClient) GetLocation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1532,21 +1457,10 @@ func (c *conversationProfilesRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1606,15 +1520,8 @@ func (c *conversationProfilesRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1651,17 +1558,7 @@ func (c *conversationProfilesRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1726,21 +1623,10 @@ func (c *conversationProfilesRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/conversation_profiles_client_example_go123_test.go b/dialogflow/apiv2beta1/conversation_profiles_client_example_go123_test.go index 1e115f501f4b..1c057d0d587b 100644 --- a/dialogflow/apiv2beta1/conversation_profiles_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/conversation_profiles_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationProfilesClient_ListConversationProfiles_all() { } for resp, err := range c.ListConversationProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationProfilesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationProfilesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/conversations_client.go b/dialogflow/apiv2beta1/conversations_client.go index 50491bd08e9b..0748259dd513 100755 --- a/dialogflow/apiv2beta1/conversations_client.go +++ b/dialogflow/apiv2beta1/conversations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -509,6 +508,8 @@ type conversationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationsClient creates a new conversations client based on gRPC. @@ -536,6 +537,7 @@ func NewConversationsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, conversationsClient: dialogflowpb.NewConversationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -584,6 +586,8 @@ type conversationsRESTClient struct { // Points back to the CallOptions field of the containing ConversationsClient CallOptions **ConversationsCallOptions + + logger *slog.Logger } // NewConversationsRESTClient creates a new conversations rest client. @@ -602,6 +606,7 @@ func NewConversationsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -654,7 +659,7 @@ func (c *conversationsGRPCClient) CreateConversation(ctx context.Context, req *d var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -683,7 +688,7 @@ func (c *conversationsGRPCClient) ListConversations(ctx context.Context, req *di } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -718,7 +723,7 @@ func (c *conversationsGRPCClient) GetConversation(ctx context.Context, req *dial var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *conversationsGRPCClient) CompleteConversation(ctx context.Context, req var resp *dialogflowpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.CompleteConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.CompleteConversation, req, settings.GRPC, c.logger, "CompleteConversation") return err }, opts...) if err != nil { @@ -754,7 +759,7 @@ func (c *conversationsGRPCClient) BatchCreateMessages(ctx context.Context, req * var resp *dialogflowpb.BatchCreateMessagesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.BatchCreateMessages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.BatchCreateMessages, req, settings.GRPC, c.logger, "BatchCreateMessages") return err }, opts...) if err != nil { @@ -783,7 +788,7 @@ func (c *conversationsGRPCClient) ListMessages(ctx context.Context, req *dialogf } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.ListMessages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.ListMessages, req, settings.GRPC, c.logger, "ListMessages") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *conversationsGRPCClient) SuggestConversationSummary(ctx context.Context var resp *dialogflowpb.SuggestConversationSummaryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.SuggestConversationSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.SuggestConversationSummary, req, settings.GRPC, c.logger, "SuggestConversationSummary") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *conversationsGRPCClient) GenerateStatelessSummary(ctx context.Context, var resp *dialogflowpb.GenerateStatelessSummaryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GenerateStatelessSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GenerateStatelessSummary, req, settings.GRPC, c.logger, "GenerateStatelessSummary") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *conversationsGRPCClient) GenerateStatelessSuggestion(ctx context.Contex var resp *dialogflowpb.GenerateStatelessSuggestionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.GenerateStatelessSuggestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.GenerateStatelessSuggestion, req, settings.GRPC, c.logger, "GenerateStatelessSuggestion") return err }, opts...) if err != nil { @@ -872,7 +877,7 @@ func (c *conversationsGRPCClient) SearchKnowledge(ctx context.Context, req *dial var resp *dialogflowpb.SearchKnowledgeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationsClient.SearchKnowledge(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationsClient.SearchKnowledge, req, settings.GRPC, c.logger, "SearchKnowledge") return err }, opts...) if err != nil { @@ -890,7 +895,7 @@ func (c *conversationsGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -919,7 +924,7 @@ func (c *conversationsGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -953,7 +958,7 @@ func (c *conversationsGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -968,7 +973,7 @@ func (c *conversationsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -997,7 +1002,7 @@ func (c *conversationsGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1086,17 +1091,7 @@ func (c *conversationsRESTClient) CreateConversation(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -1161,21 +1156,10 @@ func (c *conversationsRESTClient) ListConversations(ctx context.Context, req *di } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1238,17 +1222,7 @@ func (c *conversationsRESTClient) GetConversation(ctx context.Context, req *dial httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -1305,17 +1279,7 @@ func (c *conversationsRESTClient) CompleteConversation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompleteConversation") if err != nil { return err } @@ -1372,17 +1336,7 @@ func (c *conversationsRESTClient) BatchCreateMessages(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateMessages") if err != nil { return err } @@ -1450,21 +1404,10 @@ func (c *conversationsRESTClient) ListMessages(ctx context.Context, req *dialogf } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMessages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1535,17 +1478,7 @@ func (c *conversationsRESTClient) SuggestConversationSummary(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestConversationSummary") if err != nil { return err } @@ -1602,17 +1535,7 @@ func (c *conversationsRESTClient) GenerateStatelessSummary(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateStatelessSummary") if err != nil { return err } @@ -1669,17 +1592,7 @@ func (c *conversationsRESTClient) GenerateStatelessSuggestion(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateStatelessSuggestion") if err != nil { return err } @@ -1735,17 +1648,7 @@ func (c *conversationsRESTClient) SearchKnowledge(ctx context.Context, req *dial httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchKnowledge") if err != nil { return err } @@ -1795,17 +1698,7 @@ func (c *conversationsRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1870,21 +1763,10 @@ func (c *conversationsRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1944,15 +1826,8 @@ func (c *conversationsRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1989,17 +1864,7 @@ func (c *conversationsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2064,21 +1929,10 @@ func (c *conversationsRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/conversations_client_example_go123_test.go b/dialogflow/apiv2beta1/conversations_client_example_go123_test.go index 68bc4ab1d347..c94e1e970db2 100644 --- a/dialogflow/apiv2beta1/conversations_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/conversations_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationsClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationsClient_ListMessages_all() { } for resp, err := range c.ListMessages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleConversationsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/dialogflowpb/agent.pb.go b/dialogflow/apiv2beta1/dialogflowpb/agent.pb.go index 7a565b744141..84fc0545ce51 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/agent.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/agent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/agent.proto @@ -284,11 +284,9 @@ type Agent struct { func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -299,7 +297,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +413,9 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentRequest) String() string { @@ -430,7 +426,7 @@ func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +463,9 @@ type SetAgentRequest struct { func (x *SetAgentRequest) Reset() { *x = SetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetAgentRequest) String() string { @@ -482,7 +476,7 @@ func (*SetAgentRequest) ProtoMessage() {} func (x *SetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +521,9 @@ type DeleteAgentRequest struct { func (x *DeleteAgentRequest) Reset() { *x = DeleteAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAgentRequest) String() string { @@ -542,7 +534,7 @@ func (*DeleteAgentRequest) ProtoMessage() {} func (x *DeleteAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +575,9 @@ type SubAgent struct { func (x *SubAgent) Reset() { *x = SubAgent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubAgent) String() string { @@ -598,7 +588,7 @@ func (*SubAgent) ProtoMessage() {} func (x *SubAgent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +638,9 @@ type SearchAgentsRequest struct { func (x *SearchAgentsRequest) Reset() { *x = SearchAgentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAgentsRequest) String() string { @@ -663,7 +651,7 @@ func (*SearchAgentsRequest) ProtoMessage() {} func (x *SearchAgentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +704,9 @@ type SearchAgentsResponse struct { func (x *SearchAgentsResponse) Reset() { *x = SearchAgentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAgentsResponse) String() string { @@ -731,7 +717,7 @@ func (*SearchAgentsResponse) ProtoMessage() {} func (x *SearchAgentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +762,9 @@ type TrainAgentRequest struct { func (x *TrainAgentRequest) Reset() { *x = TrainAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainAgentRequest) String() string { @@ -791,7 +775,7 @@ func (*TrainAgentRequest) ProtoMessage() {} func (x *TrainAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +825,9 @@ type ExportAgentRequest struct { func (x *ExportAgentRequest) Reset() { *x = ExportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest) String() string { @@ -856,7 +838,7 @@ func (*ExportAgentRequest) ProtoMessage() {} func (x *ExportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +885,9 @@ type ExportAgentResponse struct { func (x *ExportAgentResponse) Reset() { *x = ExportAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentResponse) String() string { @@ -918,7 +898,7 @@ func (*ExportAgentResponse) ProtoMessage() {} func (x *ExportAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +976,9 @@ type ImportAgentRequest struct { func (x *ImportAgentRequest) Reset() { *x = ImportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAgentRequest) String() string { @@ -1011,7 +989,7 @@ func (*ImportAgentRequest) ProtoMessage() {} func (x *ImportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,11 +1080,9 @@ type RestoreAgentRequest struct { func (x *RestoreAgentRequest) Reset() { *x = RestoreAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest) String() string { @@ -1117,7 +1093,7 @@ func (*RestoreAgentRequest) ProtoMessage() {} func (x *RestoreAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1183,9 @@ type GetValidationResultRequest struct { func (x *GetValidationResultRequest) Reset() { *x = GetValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetValidationResultRequest) String() string { @@ -1222,7 +1196,7 @@ func (*GetValidationResultRequest) ProtoMessage() {} func (x *GetValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,164 +1645,6 @@ func file_google_cloud_dialogflow_v2beta1_agent_proto_init() { return } file_google_cloud_dialogflow_v2beta1_validation_result_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SubAgent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchAgentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchAgentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TrainAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_agent_proto_msgTypes[9].OneofWrappers = []any{ (*ExportAgentResponse_AgentUri)(nil), (*ExportAgentResponse_AgentContent)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/answer_record.pb.go b/dialogflow/apiv2beta1/dialogflowpb/answer_record.pb.go index c3467a1d55b8..10ec152347b0 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/answer_record.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/answer_record.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/answer_record.proto @@ -314,11 +314,9 @@ type AnswerRecord struct { func (x *AnswerRecord) Reset() { *x = AnswerRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerRecord) String() string { @@ -329,7 +327,7 @@ func (*AnswerRecord) ProtoMessage() {} func (x *AnswerRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +399,9 @@ type AgentAssistantRecord struct { func (x *AgentAssistantRecord) Reset() { *x = AgentAssistantRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantRecord) String() string { @@ -416,7 +412,7 @@ func (*AgentAssistantRecord) ProtoMessage() {} func (x *AgentAssistantRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +511,9 @@ type AnswerFeedback struct { func (x *AnswerFeedback) Reset() { *x = AnswerFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback) String() string { @@ -530,7 +524,7 @@ func (*AnswerFeedback) ProtoMessage() {} func (x *AnswerFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +641,9 @@ type AgentAssistantFeedback struct { func (x *AgentAssistantFeedback) Reset() { *x = AgentAssistantFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback) String() string { @@ -662,7 +654,7 @@ func (*AgentAssistantFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +726,9 @@ type GetAnswerRecordRequest struct { func (x *GetAnswerRecordRequest) Reset() { *x = GetAnswerRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnswerRecordRequest) String() string { @@ -749,7 +739,7 @@ func (*GetAnswerRecordRequest) ProtoMessage() {} func (x *GetAnswerRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +792,9 @@ type ListAnswerRecordsRequest struct { func (x *ListAnswerRecordsRequest) Reset() { *x = ListAnswerRecordsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnswerRecordsRequest) String() string { @@ -817,7 +805,7 @@ func (*ListAnswerRecordsRequest) ProtoMessage() {} func (x *ListAnswerRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +869,9 @@ type ListAnswerRecordsResponse struct { func (x *ListAnswerRecordsResponse) Reset() { *x = ListAnswerRecordsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnswerRecordsResponse) String() string { @@ -896,7 +882,7 @@ func (*ListAnswerRecordsResponse) ProtoMessage() {} func (x *ListAnswerRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +926,9 @@ type UpdateAnswerRecordRequest struct { func (x *UpdateAnswerRecordRequest) Reset() { *x = UpdateAnswerRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAnswerRecordRequest) String() string { @@ -955,7 +939,7 @@ func (*UpdateAnswerRecordRequest) ProtoMessage() {} func (x *UpdateAnswerRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +986,9 @@ type AgentAssistantFeedback_SummarizationFeedback struct { func (x *AgentAssistantFeedback_SummarizationFeedback) Reset() { *x = AgentAssistantFeedback_SummarizationFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_SummarizationFeedback) String() string { @@ -1017,7 +999,7 @@ func (*AgentAssistantFeedback_SummarizationFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_SummarizationFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,11 +1063,9 @@ type AgentAssistantFeedback_KnowledgeSearchFeedback struct { func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) Reset() { *x = AgentAssistantFeedback_KnowledgeSearchFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) String() string { @@ -1096,7 +1076,7 @@ func (*AgentAssistantFeedback_KnowledgeSearchFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_KnowledgeSearchFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1126,9 @@ type AgentAssistantFeedback_KnowledgeAssistFeedback struct { func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) Reset() { *x = AgentAssistantFeedback_KnowledgeAssistFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) String() string { @@ -1161,7 +1139,7 @@ func (*AgentAssistantFeedback_KnowledgeAssistFeedback) ProtoMessage() {} func (x *AgentAssistantFeedback_KnowledgeAssistFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1590,140 +1568,6 @@ func file_google_cloud_dialogflow_v2beta1_answer_record_proto_init() { return } file_google_cloud_dialogflow_v2beta1_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnswerRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetAnswerRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAnswerRecordsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAnswerRecordsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAnswerRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_SummarizationFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_KnowledgeSearchFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AgentAssistantFeedback_KnowledgeAssistFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_answer_record_proto_msgTypes[0].OneofWrappers = []any{ (*AnswerRecord_AgentAssistantRecord)(nil), } diff --git a/dialogflow/apiv2beta1/dialogflowpb/audio_config.pb.go b/dialogflow/apiv2beta1/dialogflowpb/audio_config.pb.go index d995e6243822..9c16c36b887a 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/audio_config.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/audio_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/audio_config.proto @@ -499,11 +499,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -514,7 +512,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +569,9 @@ type SpeechWordInfo struct { func (x *SpeechWordInfo) Reset() { *x = SpeechWordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechWordInfo) String() string { @@ -586,7 +582,7 @@ func (*SpeechWordInfo) ProtoMessage() {} func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +679,9 @@ type BargeInConfig struct { func (x *BargeInConfig) Reset() { *x = BargeInConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BargeInConfig) String() string { @@ -698,7 +692,7 @@ func (*BargeInConfig) ProtoMessage() {} func (x *BargeInConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +809,9 @@ type InputAudioConfig struct { func (x *InputAudioConfig) Reset() { *x = InputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAudioConfig) String() string { @@ -830,7 +822,7 @@ func (*InputAudioConfig) ProtoMessage() {} func (x *InputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +967,9 @@ type VoiceSelectionParams struct { func (x *VoiceSelectionParams) Reset() { *x = VoiceSelectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceSelectionParams) String() string { @@ -990,7 +980,7 @@ func (*VoiceSelectionParams) ProtoMessage() {} func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1043,9 @@ type SynthesizeSpeechConfig struct { func (x *SynthesizeSpeechConfig) Reset() { *x = SynthesizeSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechConfig) String() string { @@ -1068,7 +1056,7 @@ func (*SynthesizeSpeechConfig) ProtoMessage() {} func (x *SynthesizeSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1140,11 +1128,9 @@ type OutputAudioConfig struct { func (x *OutputAudioConfig) Reset() { *x = OutputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudioConfig) String() string { @@ -1155,7 +1141,7 @@ func (*OutputAudioConfig) ProtoMessage() {} func (x *OutputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,11 +1189,9 @@ type TelephonyDtmfEvents struct { func (x *TelephonyDtmfEvents) Reset() { *x = TelephonyDtmfEvents{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TelephonyDtmfEvents) String() string { @@ -1218,7 +1202,7 @@ func (*TelephonyDtmfEvents) ProtoMessage() {} func (x *TelephonyDtmfEvents) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1310,11 +1294,9 @@ type SpeechToTextConfig struct { func (x *SpeechToTextConfig) Reset() { *x = SpeechToTextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechToTextConfig) String() string { @@ -1325,7 +1307,7 @@ func (*SpeechToTextConfig) ProtoMessage() {} func (x *SpeechToTextConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1733,116 +1715,6 @@ func file_google_cloud_dialogflow_v2beta1_audio_config_proto_init() { if File_google_cloud_dialogflow_v2beta1_audio_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SpeechWordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BargeInConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VoiceSelectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TelephonyDtmfEvents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SpeechToTextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/context.pb.go b/dialogflow/apiv2beta1/dialogflowpb/context.pb.go index 51eb08e172fd..52fe54962ab1 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/context.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/context.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/context.proto @@ -111,11 +111,9 @@ type Context struct { func (x *Context) Reset() { *x = Context{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Context) String() string { @@ -126,7 +124,7 @@ func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type ListContextsRequest struct { func (x *ListContextsRequest) Reset() { *x = ListContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsRequest) String() string { @@ -207,7 +203,7 @@ func (*ListContextsRequest) ProtoMessage() {} func (x *ListContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ListContextsResponse struct { func (x *ListContextsResponse) Reset() { *x = ListContextsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContextsResponse) String() string { @@ -275,7 +269,7 @@ func (*ListContextsResponse) ProtoMessage() {} func (x *ListContextsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +324,9 @@ type GetContextRequest struct { func (x *GetContextRequest) Reset() { *x = GetContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContextRequest) String() string { @@ -345,7 +337,7 @@ func (*GetContextRequest) ProtoMessage() {} func (x *GetContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +386,9 @@ type CreateContextRequest struct { func (x *CreateContextRequest) Reset() { *x = CreateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContextRequest) String() string { @@ -409,7 +399,7 @@ func (*CreateContextRequest) ProtoMessage() {} func (x *CreateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +443,9 @@ type UpdateContextRequest struct { func (x *UpdateContextRequest) Reset() { *x = UpdateContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContextRequest) String() string { @@ -468,7 +456,7 @@ func (*UpdateContextRequest) ProtoMessage() {} func (x *UpdateContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +511,9 @@ type DeleteContextRequest struct { func (x *DeleteContextRequest) Reset() { *x = DeleteContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContextRequest) String() string { @@ -538,7 +524,7 @@ func (*DeleteContextRequest) ProtoMessage() {} func (x *DeleteContextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +572,9 @@ type DeleteAllContextsRequest struct { func (x *DeleteAllContextsRequest) Reset() { *x = DeleteAllContextsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAllContextsRequest) String() string { @@ -601,7 +585,7 @@ func (*DeleteAllContextsRequest) ProtoMessage() {} func (x *DeleteAllContextsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,104 +964,6 @@ func file_google_cloud_dialogflow_v2beta1_context_proto_init() { if File_google_cloud_dialogflow_v2beta1_context_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Context); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListContextsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_context_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAllContextsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/conversation.pb.go b/dialogflow/apiv2beta1/dialogflowpb/conversation.pb.go index 46e301a4b734..881a24671b2a 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/conversation.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/conversation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/conversation.proto @@ -429,11 +429,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -444,7 +442,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +519,9 @@ type ConversationPhoneNumber struct { func (x *ConversationPhoneNumber) Reset() { *x = ConversationPhoneNumber{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationPhoneNumber) String() string { @@ -536,7 +532,7 @@ func (*ConversationPhoneNumber) ProtoMessage() {} func (x *ConversationPhoneNumber) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +581,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -600,7 +594,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +658,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -679,7 +671,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +731,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -754,7 +744,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +788,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -813,7 +801,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +838,9 @@ type CompleteConversationRequest struct { func (x *CompleteConversationRequest) Reset() { *x = CompleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteConversationRequest) String() string { @@ -865,7 +851,7 @@ func (*CompleteConversationRequest) ProtoMessage() {} func (x *CompleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -906,11 +892,9 @@ type CreateMessageRequest struct { func (x *CreateMessageRequest) Reset() { *x = CreateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMessageRequest) String() string { @@ -921,7 +905,7 @@ func (*CreateMessageRequest) ProtoMessage() {} func (x *CreateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,11 +953,9 @@ type BatchCreateMessagesRequest struct { func (x *BatchCreateMessagesRequest) Reset() { *x = BatchCreateMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateMessagesRequest) String() string { @@ -984,7 +966,7 @@ func (*BatchCreateMessagesRequest) ProtoMessage() {} func (x *BatchCreateMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1007,9 @@ type BatchCreateMessagesResponse struct { func (x *BatchCreateMessagesResponse) Reset() { *x = BatchCreateMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateMessagesResponse) String() string { @@ -1040,7 +1020,7 @@ func (*BatchCreateMessagesResponse) ProtoMessage() {} func (x *BatchCreateMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1071,9 @@ type ListMessagesRequest struct { func (x *ListMessagesRequest) Reset() { *x = ListMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesRequest) String() string { @@ -1106,7 +1084,7 @@ func (*ListMessagesRequest) ProtoMessage() {} func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1145,9 @@ type ListMessagesResponse struct { func (x *ListMessagesResponse) Reset() { *x = ListMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessagesResponse) String() string { @@ -1182,7 +1158,7 @@ func (*ListMessagesResponse) ProtoMessage() {} func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1240,11 +1216,9 @@ type SuggestConversationSummaryRequest struct { func (x *SuggestConversationSummaryRequest) Reset() { *x = SuggestConversationSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryRequest) String() string { @@ -1255,7 +1229,7 @@ func (*SuggestConversationSummaryRequest) ProtoMessage() {} func (x *SuggestConversationSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1322,11 +1296,9 @@ type SuggestConversationSummaryResponse struct { func (x *SuggestConversationSummaryResponse) Reset() { *x = SuggestConversationSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryResponse) String() string { @@ -1337,7 +1309,7 @@ func (*SuggestConversationSummaryResponse) ProtoMessage() {} func (x *SuggestConversationSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1372,9 @@ type GenerateStatelessSummaryRequest struct { func (x *GenerateStatelessSummaryRequest) Reset() { *x = GenerateStatelessSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryRequest) String() string { @@ -1415,7 +1385,7 @@ func (*GenerateStatelessSummaryRequest) ProtoMessage() {} func (x *GenerateStatelessSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1450,9 @@ type GenerateStatelessSummaryResponse struct { func (x *GenerateStatelessSummaryResponse) Reset() { *x = GenerateStatelessSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryResponse) String() string { @@ -1495,7 +1463,7 @@ func (*GenerateStatelessSummaryResponse) ProtoMessage() {} func (x *GenerateStatelessSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1557,11 +1525,9 @@ type GenerateStatelessSuggestionRequest struct { func (x *GenerateStatelessSuggestionRequest) Reset() { *x = GenerateStatelessSuggestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSuggestionRequest) String() string { @@ -1572,7 +1538,7 @@ func (*GenerateStatelessSuggestionRequest) ProtoMessage() {} func (x *GenerateStatelessSuggestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1664,11 +1630,9 @@ type GenerateStatelessSuggestionResponse struct { func (x *GenerateStatelessSuggestionResponse) Reset() { *x = GenerateStatelessSuggestionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSuggestionResponse) String() string { @@ -1679,7 +1643,7 @@ func (*GenerateStatelessSuggestionResponse) ProtoMessage() {} func (x *GenerateStatelessSuggestionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,11 +1729,9 @@ type SearchKnowledgeRequest struct { func (x *SearchKnowledgeRequest) Reset() { *x = SearchKnowledgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest) String() string { @@ -1780,7 +1742,7 @@ func (*SearchKnowledgeRequest) ProtoMessage() {} func (x *SearchKnowledgeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1881,11 +1843,9 @@ type SearchKnowledgeResponse struct { func (x *SearchKnowledgeResponse) Reset() { *x = SearchKnowledgeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeResponse) String() string { @@ -1896,7 +1856,7 @@ func (*SearchKnowledgeResponse) ProtoMessage() {} func (x *SearchKnowledgeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1946,11 +1906,9 @@ type SearchKnowledgeAnswer struct { func (x *SearchKnowledgeAnswer) Reset() { *x = SearchKnowledgeAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeAnswer) String() string { @@ -1961,7 +1919,7 @@ func (*SearchKnowledgeAnswer) ProtoMessage() {} func (x *SearchKnowledgeAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2026,11 +1984,9 @@ type SuggestConversationSummaryResponse_Summary struct { func (x *SuggestConversationSummaryResponse_Summary) Reset() { *x = SuggestConversationSummaryResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestConversationSummaryResponse_Summary) String() string { @@ -2041,7 +1997,7 @@ func (*SuggestConversationSummaryResponse_Summary) ProtoMessage() {} func (x *SuggestConversationSummaryResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2104,11 +2060,9 @@ type GenerateStatelessSummaryRequest_MinimalConversation struct { func (x *GenerateStatelessSummaryRequest_MinimalConversation) Reset() { *x = GenerateStatelessSummaryRequest_MinimalConversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryRequest_MinimalConversation) String() string { @@ -2119,7 +2073,7 @@ func (*GenerateStatelessSummaryRequest_MinimalConversation) ProtoMessage() {} func (x *GenerateStatelessSummaryRequest_MinimalConversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2167,11 +2121,9 @@ type GenerateStatelessSummaryResponse_Summary struct { func (x *GenerateStatelessSummaryResponse_Summary) Reset() { *x = GenerateStatelessSummaryResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStatelessSummaryResponse_Summary) String() string { @@ -2182,7 +2134,7 @@ func (*GenerateStatelessSummaryResponse_Summary) ProtoMessage() {} func (x *GenerateStatelessSummaryResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2232,11 +2184,9 @@ type SearchKnowledgeRequest_SearchConfig struct { func (x *SearchKnowledgeRequest_SearchConfig) Reset() { *x = SearchKnowledgeRequest_SearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig) String() string { @@ -2247,7 +2197,7 @@ func (*SearchKnowledgeRequest_SearchConfig) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2293,11 +2243,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs struct { func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) String() string { @@ -2308,7 +2256,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2356,11 +2304,9 @@ type SearchKnowledgeRequest_SearchConfig_FilterSpecs struct { func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) Reset() { *x = SearchKnowledgeRequest_SearchConfig_FilterSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) String() string { @@ -2371,7 +2317,7 @@ func (*SearchKnowledgeRequest_SearchConfig_FilterSpecs) ProtoMessage() {} func (x *SearchKnowledgeRequest_SearchConfig_FilterSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2418,11 +2364,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec struct { func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) String() string { @@ -2433,7 +2377,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) ProtoMessage() func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2497,11 +2441,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) String() string { @@ -2512,7 +2454,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2578,11 +2520,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -2594,7 +2534,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2648,11 +2588,9 @@ type SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -2664,7 +2602,7 @@ func (*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSp func (x *SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2697,11 +2635,9 @@ type SearchKnowledgeAnswer_AnswerSource struct { func (x *SearchKnowledgeAnswer_AnswerSource) Reset() { *x = SearchKnowledgeAnswer_AnswerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchKnowledgeAnswer_AnswerSource) String() string { @@ -2712,7 +2648,7 @@ func (*SearchKnowledgeAnswer_AnswerSource) ProtoMessage() {} func (x *SearchKnowledgeAnswer_AnswerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3700,392 +3636,6 @@ func file_google_cloud_dialogflow_v2beta1_conversation_proto_init() { file_google_cloud_dialogflow_v2beta1_generator_proto_init() file_google_cloud_dialogflow_v2beta1_participant_proto_init() file_google_cloud_dialogflow_v2beta1_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConversationPhoneNumber); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CompleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSuggestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSuggestionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SuggestConversationSummaryResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryRequest_MinimalConversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStatelessSummaryResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_FilterSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeRequest_SearchConfig_BoostSpecs_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchKnowledgeAnswer_AnswerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_conversation_proto_msgTypes[16].OneofWrappers = []any{ (*GenerateStatelessSuggestionRequest_Generator)(nil), (*GenerateStatelessSuggestionRequest_GeneratorName)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/conversation_event.pb.go b/dialogflow/apiv2beta1/dialogflowpb/conversation_event.pb.go index de159a44f8bf..dda720a202a7 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/conversation_event.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/conversation_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/conversation_event.proto @@ -141,11 +141,9 @@ type ConversationEvent struct { func (x *ConversationEvent) Reset() { *x = ConversationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationEvent) String() string { @@ -156,7 +154,7 @@ func (*ConversationEvent) ProtoMessage() {} func (x *ConversationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,20 +307,6 @@ func file_google_cloud_dialogflow_v2beta1_conversation_event_proto_init() { return } file_google_cloud_dialogflow_v2beta1_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_conversation_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_conversation_event_proto_msgTypes[0].OneofWrappers = []any{ (*ConversationEvent_NewMessagePayload)(nil), } diff --git a/dialogflow/apiv2beta1/dialogflowpb/conversation_profile.pb.go b/dialogflow/apiv2beta1/dialogflowpb/conversation_profile.pb.go index a132d806120f..52d727ead52e 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/conversation_profile.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/conversation_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -236,11 +236,9 @@ type ConversationProfile struct { func (x *ConversationProfile) Reset() { *x = ConversationProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationProfile) String() string { @@ -251,7 +249,7 @@ func (*ConversationProfile) ProtoMessage() {} func (x *ConversationProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +402,9 @@ type AutomatedAgentConfig struct { func (x *AutomatedAgentConfig) Reset() { *x = AutomatedAgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedAgentConfig) String() string { @@ -419,7 +415,7 @@ func (*AutomatedAgentConfig) ProtoMessage() {} func (x *AutomatedAgentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +465,9 @@ type HumanAgentAssistantConfig struct { func (x *HumanAgentAssistantConfig) Reset() { *x = HumanAgentAssistantConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig) String() string { @@ -484,7 +478,7 @@ func (*HumanAgentAssistantConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +542,9 @@ type HumanAgentHandoffConfig struct { func (x *HumanAgentHandoffConfig) Reset() { *x = HumanAgentHandoffConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig) String() string { @@ -563,7 +555,7 @@ func (*HumanAgentHandoffConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +639,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -662,7 +652,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +697,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -722,7 +710,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +751,9 @@ type ListConversationProfilesRequest struct { func (x *ListConversationProfilesRequest) Reset() { *x = ListConversationProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationProfilesRequest) String() string { @@ -778,7 +764,7 @@ func (*ListConversationProfilesRequest) ProtoMessage() {} func (x *ListConversationProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +817,9 @@ type ListConversationProfilesResponse struct { func (x *ListConversationProfilesResponse) Reset() { *x = ListConversationProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationProfilesResponse) String() string { @@ -846,7 +830,7 @@ func (*ListConversationProfilesResponse) ProtoMessage() {} func (x *ListConversationProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +874,9 @@ type GetConversationProfileRequest struct { func (x *GetConversationProfileRequest) Reset() { *x = GetConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationProfileRequest) String() string { @@ -905,7 +887,7 @@ func (*GetConversationProfileRequest) ProtoMessage() {} func (x *GetConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +925,9 @@ type CreateConversationProfileRequest struct { func (x *CreateConversationProfileRequest) Reset() { *x = CreateConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationProfileRequest) String() string { @@ -958,7 +938,7 @@ func (*CreateConversationProfileRequest) ProtoMessage() {} func (x *CreateConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +982,9 @@ type UpdateConversationProfileRequest struct { func (x *UpdateConversationProfileRequest) Reset() { *x = UpdateConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationProfileRequest) String() string { @@ -1017,7 +995,7 @@ func (*UpdateConversationProfileRequest) ProtoMessage() {} func (x *UpdateConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1042,9 @@ type DeleteConversationProfileRequest struct { func (x *DeleteConversationProfileRequest) Reset() { *x = DeleteConversationProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationProfileRequest) String() string { @@ -1079,7 +1055,7 @@ func (*DeleteConversationProfileRequest) ProtoMessage() {} func (x *DeleteConversationProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1097,9 @@ type SetSuggestionFeatureConfigRequest struct { func (x *SetSuggestionFeatureConfigRequest) Reset() { *x = SetSuggestionFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSuggestionFeatureConfigRequest) String() string { @@ -1136,7 +1110,7 @@ func (*SetSuggestionFeatureConfigRequest) ProtoMessage() {} func (x *SetSuggestionFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1191,11 +1165,9 @@ type ClearSuggestionFeatureConfigRequest struct { func (x *ClearSuggestionFeatureConfigRequest) Reset() { *x = ClearSuggestionFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearSuggestionFeatureConfigRequest) String() string { @@ -1206,7 +1178,7 @@ func (*ClearSuggestionFeatureConfigRequest) ProtoMessage() {} func (x *ClearSuggestionFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1236,9 @@ type SetSuggestionFeatureConfigOperationMetadata struct { func (x *SetSuggestionFeatureConfigOperationMetadata) Reset() { *x = SetSuggestionFeatureConfigOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetSuggestionFeatureConfigOperationMetadata) String() string { @@ -1279,7 +1249,7 @@ func (*SetSuggestionFeatureConfigOperationMetadata) ProtoMessage() {} func (x *SetSuggestionFeatureConfigOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1314,9 @@ type ClearSuggestionFeatureConfigOperationMetadata struct { func (x *ClearSuggestionFeatureConfigOperationMetadata) Reset() { *x = ClearSuggestionFeatureConfigOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearSuggestionFeatureConfigOperationMetadata) String() string { @@ -1359,7 +1327,7 @@ func (*ClearSuggestionFeatureConfigOperationMetadata) ProtoMessage() {} func (x *ClearSuggestionFeatureConfigOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1417,11 +1385,9 @@ type HumanAgentAssistantConfig_SuggestionTriggerSettings struct { func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) Reset() { *x = HumanAgentAssistantConfig_SuggestionTriggerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) String() string { @@ -1432,7 +1398,7 @@ func (*HumanAgentAssistantConfig_SuggestionTriggerSettings) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionTriggerSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1471,9 @@ type HumanAgentAssistantConfig_SuggestionFeatureConfig struct { func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionFeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) String() string { @@ -1520,7 +1484,7 @@ func (*HumanAgentAssistantConfig_SuggestionFeatureConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionFeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1640,11 +1604,9 @@ type HumanAgentAssistantConfig_SuggestionConfig struct { func (x *HumanAgentAssistantConfig_SuggestionConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionConfig) String() string { @@ -1655,7 +1617,7 @@ func (*HumanAgentAssistantConfig_SuggestionConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1749,11 +1711,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig struct { func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) String() string { @@ -1764,7 +1724,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_SuggestionQueryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1859,9 @@ type HumanAgentAssistantConfig_ConversationModelConfig struct { func (x *HumanAgentAssistantConfig_ConversationModelConfig) Reset() { *x = HumanAgentAssistantConfig_ConversationModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_ConversationModelConfig) String() string { @@ -1914,7 +1872,7 @@ func (*HumanAgentAssistantConfig_ConversationModelConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_ConversationModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1914,9 @@ type HumanAgentAssistantConfig_ConversationProcessConfig struct { func (x *HumanAgentAssistantConfig_ConversationProcessConfig) Reset() { *x = HumanAgentAssistantConfig_ConversationProcessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_ConversationProcessConfig) String() string { @@ -1971,7 +1927,7 @@ func (*HumanAgentAssistantConfig_ConversationProcessConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_ConversationProcessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2031,11 +1987,9 @@ type HumanAgentAssistantConfig_MessageAnalysisConfig struct { func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) Reset() { *x = HumanAgentAssistantConfig_MessageAnalysisConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) String() string { @@ -2046,7 +2000,7 @@ func (*HumanAgentAssistantConfig_MessageAnalysisConfig) ProtoMessage() {} func (x *HumanAgentAssistantConfig_MessageAnalysisConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,11 +2046,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource st func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) String() string { @@ -2107,7 +2059,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2146,11 +2098,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource struct func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) String() string { @@ -2161,7 +2111,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) Prot func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2202,11 +2152,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource struc func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) String() string { @@ -2217,7 +2165,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) Pr func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2212,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings struc func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) String() string { @@ -2279,7 +2225,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) Pr func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2334,11 +2280,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_Sections struct { func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_Sections{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) String() string { @@ -2349,7 +2293,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) ProtoMessage() func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_Sections) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2386,11 +2330,9 @@ type HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_Human func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) Reset() { *x = HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) String() string { @@ -2402,7 +2344,7 @@ func (*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_Hum func (x *HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2437,11 +2379,9 @@ type HumanAgentHandoffConfig_LivePersonConfig struct { func (x *HumanAgentHandoffConfig_LivePersonConfig) Reset() { *x = HumanAgentHandoffConfig_LivePersonConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig_LivePersonConfig) String() string { @@ -2452,7 +2392,7 @@ func (*HumanAgentHandoffConfig_LivePersonConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig_LivePersonConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2495,11 +2435,9 @@ type HumanAgentHandoffConfig_SalesforceLiveAgentConfig struct { func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) Reset() { *x = HumanAgentHandoffConfig_SalesforceLiveAgentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) String() string { @@ -2510,7 +2448,7 @@ func (*HumanAgentHandoffConfig_SalesforceLiveAgentConfig) ProtoMessage() {} func (x *HumanAgentHandoffConfig_SalesforceLiveAgentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3507,380 +3445,6 @@ func file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_init() { } file_google_cloud_dialogflow_v2beta1_audio_config_proto_init() file_google_cloud_dialogflow_v2beta1_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversationProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedAgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SetSuggestionFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ClearSuggestionFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SetSuggestionFeatureConfigOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ClearSuggestionFeatureConfigOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionTriggerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionFeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_ConversationModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_ConversationProcessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_MessageAnalysisConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_KnowledgeBaseQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DocumentQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_ContextFilterSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_Sections); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantConfig_SuggestionQueryConfig_DialogflowQuerySource_HumanAgentSideConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig_LivePersonConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentHandoffConfig_SalesforceLiveAgentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_conversation_profile_proto_msgTypes[3].OneofWrappers = []any{ (*HumanAgentHandoffConfig_LivePersonConfig_)(nil), (*HumanAgentHandoffConfig_SalesforceLiveAgentConfig_)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/document.pb.go b/dialogflow/apiv2beta1/dialogflowpb/document.pb.go index 395206f05539..ea69b66cb172 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/document.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/document.proto @@ -305,11 +305,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -320,7 +318,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +472,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -489,7 +485,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +549,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -568,7 +562,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -627,11 +621,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -642,7 +634,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +683,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -706,7 +696,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,11 +765,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -790,7 +778,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -875,11 +863,9 @@ type ImportDocumentTemplate struct { func (x *ImportDocumentTemplate) Reset() { *x = ImportDocumentTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentTemplate) String() string { @@ -890,7 +876,7 @@ func (*ImportDocumentTemplate) ProtoMessage() {} func (x *ImportDocumentTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +925,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -954,7 +938,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -991,11 +975,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -1006,7 +988,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1027,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -1060,7 +1040,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,11 +1081,9 @@ type ExportOperationMetadata struct { func (x *ExportOperationMetadata) Reset() { *x = ExportOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportOperationMetadata) String() string { @@ -1116,7 +1094,7 @@ func (*ExportOperationMetadata) ProtoMessage() {} func (x *ExportOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1136,9 @@ type KnowledgeOperationMetadata struct { func (x *KnowledgeOperationMetadata) Reset() { *x = KnowledgeOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeOperationMetadata) String() string { @@ -1173,7 +1149,7 @@ func (*KnowledgeOperationMetadata) ProtoMessage() {} func (x *KnowledgeOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1235,9 @@ type ReloadDocumentRequest struct { func (x *ReloadDocumentRequest) Reset() { *x = ReloadDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReloadDocumentRequest) String() string { @@ -1274,7 +1248,7 @@ func (*ReloadDocumentRequest) ProtoMessage() {} func (x *ReloadDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1319,9 @@ type Document_ReloadStatus struct { func (x *Document_ReloadStatus) Reset() { *x = Document_ReloadStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ReloadStatus) String() string { @@ -1360,7 +1332,7 @@ func (*Document_ReloadStatus) ProtoMessage() {} func (x *Document_ReloadStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1920,176 +1892,6 @@ func file_google_cloud_dialogflow_v2beta1_document_proto_init() { return } file_google_cloud_dialogflow_v2beta1_gcs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExportOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReloadDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Document_ReloadStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_ContentUri)(nil), (*Document_Content)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/encryption_spec.pb.go b/dialogflow/apiv2beta1/dialogflowpb/encryption_spec.pb.go index 1b7033cdc414..85c480e5ef7e 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/encryption_spec.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/encryption_spec.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/encryption_spec.proto @@ -53,11 +53,9 @@ type GetEncryptionSpecRequest struct { func (x *GetEncryptionSpecRequest) Reset() { *x = GetEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEncryptionSpecRequest) String() string { @@ -68,7 +66,7 @@ func (*GetEncryptionSpecRequest) ProtoMessage() {} func (x *GetEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type EncryptionSpec struct { func (x *EncryptionSpec) Reset() { *x = EncryptionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionSpec) String() string { @@ -126,7 +122,7 @@ func (*EncryptionSpec) ProtoMessage() {} func (x *EncryptionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +166,9 @@ type InitializeEncryptionSpecRequest struct { func (x *InitializeEncryptionSpecRequest) Reset() { *x = InitializeEncryptionSpecRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecRequest) String() string { @@ -185,7 +179,7 @@ func (*InitializeEncryptionSpecRequest) ProtoMessage() {} func (x *InitializeEncryptionSpecRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +210,9 @@ type InitializeEncryptionSpecResponse struct { func (x *InitializeEncryptionSpecResponse) Reset() { *x = InitializeEncryptionSpecResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecResponse) String() string { @@ -231,7 +223,7 @@ func (*InitializeEncryptionSpecResponse) ProtoMessage() {} func (x *InitializeEncryptionSpecResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +250,9 @@ type InitializeEncryptionSpecMetadata struct { func (x *InitializeEncryptionSpecMetadata) Reset() { *x = InitializeEncryptionSpecMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeEncryptionSpecMetadata) String() string { @@ -273,7 +263,7 @@ func (*InitializeEncryptionSpecMetadata) ProtoMessage() {} func (x *InitializeEncryptionSpecMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,68 +436,6 @@ func file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_init() { if File_google_cloud_dialogflow_v2beta1_encryption_spec_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_encryption_spec_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InitializeEncryptionSpecMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/entity_type.pb.go b/dialogflow/apiv2beta1/dialogflowpb/entity_type.pb.go index 0d2e191a2867..2c0038152d88 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/entity_type.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/entity_type.proto @@ -199,11 +199,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -214,7 +212,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +296,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -313,7 +309,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +369,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -388,7 +382,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +434,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -455,7 +447,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +500,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -523,7 +513,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +570,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -595,7 +583,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +636,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -663,7 +649,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +707,9 @@ type BatchUpdateEntityTypesRequest struct { func (x *BatchUpdateEntityTypesRequest) Reset() { *x = BatchUpdateEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntityTypesRequest) String() string { @@ -736,7 +720,7 @@ func (*BatchUpdateEntityTypesRequest) ProtoMessage() {} func (x *BatchUpdateEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +813,9 @@ type BatchUpdateEntityTypesResponse struct { func (x *BatchUpdateEntityTypesResponse) Reset() { *x = BatchUpdateEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntityTypesResponse) String() string { @@ -844,7 +826,7 @@ func (*BatchUpdateEntityTypesResponse) ProtoMessage() {} func (x *BatchUpdateEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +867,9 @@ type BatchDeleteEntityTypesRequest struct { func (x *BatchDeleteEntityTypesRequest) Reset() { *x = BatchDeleteEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteEntityTypesRequest) String() string { @@ -900,7 +880,7 @@ func (*BatchDeleteEntityTypesRequest) ProtoMessage() {} func (x *BatchDeleteEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +934,9 @@ type BatchCreateEntitiesRequest struct { func (x *BatchCreateEntitiesRequest) Reset() { *x = BatchCreateEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateEntitiesRequest) String() string { @@ -969,7 +947,7 @@ func (*BatchCreateEntitiesRequest) ProtoMessage() {} func (x *BatchCreateEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1010,9 @@ type BatchUpdateEntitiesRequest struct { func (x *BatchUpdateEntitiesRequest) Reset() { *x = BatchUpdateEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateEntitiesRequest) String() string { @@ -1047,7 +1023,7 @@ func (*BatchUpdateEntitiesRequest) ProtoMessage() {} func (x *BatchUpdateEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1117,11 +1093,9 @@ type BatchDeleteEntitiesRequest struct { func (x *BatchDeleteEntitiesRequest) Reset() { *x = BatchDeleteEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteEntitiesRequest) String() string { @@ -1132,7 +1106,7 @@ func (*BatchDeleteEntitiesRequest) ProtoMessage() {} func (x *BatchDeleteEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1154,9 @@ type EntityTypeBatch struct { func (x *EntityTypeBatch) Reset() { *x = EntityTypeBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityTypeBatch) String() string { @@ -1195,7 +1167,7 @@ func (*EntityTypeBatch) ProtoMessage() {} func (x *EntityTypeBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,11 +1220,9 @@ type EntityType_Entity struct { func (x *EntityType_Entity) Reset() { *x = EntityType_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_Entity) String() string { @@ -1263,7 +1233,7 @@ func (*EntityType_Entity) ProtoMessage() {} func (x *EntityType_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,188 +1807,6 @@ func file_google_cloud_dialogflow_v2beta1_entity_type_proto_init() { if File_google_cloud_dialogflow_v2beta1_entity_type_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EntityTypeBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_entity_type_proto_msgTypes[7].OneofWrappers = []any{ (*BatchUpdateEntityTypesRequest_EntityTypeBatchUri)(nil), (*BatchUpdateEntityTypesRequest_EntityTypeBatchInline)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/environment.pb.go b/dialogflow/apiv2beta1/dialogflowpb/environment.pb.go index e0b42c53689a..0199ac59527c 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/environment.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/environment.proto @@ -156,11 +156,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -171,7 +169,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +258,9 @@ type TextToSpeechSettings struct { func (x *TextToSpeechSettings) Reset() { *x = TextToSpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextToSpeechSettings) String() string { @@ -275,7 +271,7 @@ func (*TextToSpeechSettings) ProtoMessage() {} func (x *TextToSpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +335,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -354,7 +348,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +401,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -422,7 +414,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -468,11 +460,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -483,7 +473,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +515,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -540,7 +528,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +584,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -611,7 +597,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +650,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -679,7 +663,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +707,9 @@ type GetEnvironmentHistoryRequest struct { func (x *GetEnvironmentHistoryRequest) Reset() { *x = GetEnvironmentHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentHistoryRequest) String() string { @@ -738,7 +720,7 @@ func (*GetEnvironmentHistoryRequest) ProtoMessage() {} func (x *GetEnvironmentHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +779,9 @@ type EnvironmentHistory struct { func (x *EnvironmentHistory) Reset() { *x = EnvironmentHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentHistory) String() string { @@ -812,7 +792,7 @@ func (*EnvironmentHistory) ProtoMessage() {} func (x *EnvironmentHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +844,9 @@ type EnvironmentHistory_Entry struct { func (x *EnvironmentHistory_Entry) Reset() { *x = EnvironmentHistory_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentHistory_Entry) String() string { @@ -879,7 +857,7 @@ func (*EnvironmentHistory_Entry) ProtoMessage() {} func (x *EnvironmentHistory_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1314,140 +1292,6 @@ func file_google_cloud_dialogflow_v2beta1_environment_proto_init() { } file_google_cloud_dialogflow_v2beta1_audio_config_proto_init() file_google_cloud_dialogflow_v2beta1_fulfillment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TextToSpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_environment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentHistory_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/fulfillment.pb.go b/dialogflow/apiv2beta1/dialogflowpb/fulfillment.pb.go index 64087424f964..291acfa689f6 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/fulfillment.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/fulfillment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/fulfillment.proto @@ -131,11 +131,9 @@ type Fulfillment struct { func (x *Fulfillment) Reset() { *x = Fulfillment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment) String() string { @@ -146,7 +144,7 @@ func (*Fulfillment) ProtoMessage() {} func (x *Fulfillment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +229,9 @@ type GetFulfillmentRequest struct { func (x *GetFulfillmentRequest) Reset() { *x = GetFulfillmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFulfillmentRequest) String() string { @@ -246,7 +242,7 @@ func (*GetFulfillmentRequest) ProtoMessage() {} func (x *GetFulfillmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +280,9 @@ type UpdateFulfillmentRequest struct { func (x *UpdateFulfillmentRequest) Reset() { *x = UpdateFulfillmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFulfillmentRequest) String() string { @@ -299,7 +293,7 @@ func (*UpdateFulfillmentRequest) ProtoMessage() {} func (x *UpdateFulfillmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +356,9 @@ type Fulfillment_GenericWebService struct { func (x *Fulfillment_GenericWebService) Reset() { *x = Fulfillment_GenericWebService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_GenericWebService) String() string { @@ -377,7 +369,7 @@ func (*Fulfillment_GenericWebService) ProtoMessage() {} func (x *Fulfillment_GenericWebService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +432,9 @@ type Fulfillment_Feature struct { func (x *Fulfillment_Feature) Reset() { *x = Fulfillment_Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_Feature) String() string { @@ -455,7 +445,7 @@ func (*Fulfillment_Feature) ProtoMessage() {} func (x *Fulfillment_Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,68 +664,6 @@ func file_google_cloud_dialogflow_v2beta1_fulfillment_proto_init() { if File_google_cloud_dialogflow_v2beta1_fulfillment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFulfillmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFulfillmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_GenericWebService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_fulfillment_proto_msgTypes[0].OneofWrappers = []any{ (*Fulfillment_GenericWebService_)(nil), } diff --git a/dialogflow/apiv2beta1/dialogflowpb/gcs.pb.go b/dialogflow/apiv2beta1/dialogflowpb/gcs.pb.go index cf4ec2565ccc..c7647988280e 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/gcs.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/gcs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/gcs.proto @@ -51,11 +51,9 @@ type GcsSources struct { func (x *GcsSources) Reset() { *x = GcsSources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSources) String() string { @@ -66,7 +64,7 @@ func (*GcsSources) ProtoMessage() {} func (x *GcsSources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,11 +101,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -118,7 +114,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +152,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -171,7 +165,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,44 +247,6 @@ func file_google_cloud_dialogflow_v2beta1_gcs_proto_init() { if File_google_cloud_dialogflow_v2beta1_gcs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_gcs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/generator.pb.go b/dialogflow/apiv2beta1/dialogflowpb/generator.pb.go index a71f2b7acd9e..e4d0d1925fda 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/generator.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/generator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/generator.proto @@ -265,11 +265,9 @@ type CreateGeneratorRequest struct { func (x *CreateGeneratorRequest) Reset() { *x = CreateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGeneratorRequest) String() string { @@ -280,7 +278,7 @@ func (*CreateGeneratorRequest) ProtoMessage() {} func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +327,9 @@ type GetGeneratorRequest struct { func (x *GetGeneratorRequest) Reset() { *x = GetGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGeneratorRequest) String() string { @@ -344,7 +340,7 @@ func (*GetGeneratorRequest) ProtoMessage() {} func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +380,9 @@ type ListGeneratorsRequest struct { func (x *ListGeneratorsRequest) Reset() { *x = ListGeneratorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsRequest) String() string { @@ -399,7 +393,7 @@ func (*ListGeneratorsRequest) ProtoMessage() {} func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +444,9 @@ type ListGeneratorsResponse struct { func (x *ListGeneratorsResponse) Reset() { *x = ListGeneratorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsResponse) String() string { @@ -465,7 +457,7 @@ func (*ListGeneratorsResponse) ProtoMessage() {} func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +499,9 @@ type DeleteGeneratorRequest struct { func (x *DeleteGeneratorRequest) Reset() { *x = DeleteGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGeneratorRequest) String() string { @@ -522,7 +512,7 @@ func (*DeleteGeneratorRequest) ProtoMessage() {} func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +549,9 @@ type UpdateGeneratorRequest struct { func (x *UpdateGeneratorRequest) Reset() { *x = UpdateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGeneratorRequest) String() string { @@ -574,7 +562,7 @@ func (*UpdateGeneratorRequest) ProtoMessage() {} func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +611,9 @@ type MessageEntry struct { func (x *MessageEntry) Reset() { *x = MessageEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageEntry) String() string { @@ -638,7 +624,7 @@ func (*MessageEntry) ProtoMessage() {} func (x *MessageEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +679,9 @@ type ConversationContext struct { func (x *ConversationContext) Reset() { *x = ConversationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationContext) String() string { @@ -708,7 +692,7 @@ func (*ConversationContext) ProtoMessage() {} func (x *ConversationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +726,9 @@ type SummarizationSectionList struct { func (x *SummarizationSectionList) Reset() { *x = SummarizationSectionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationSectionList) String() string { @@ -757,7 +739,7 @@ func (*SummarizationSectionList) ProtoMessage() {} func (x *SummarizationSectionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +786,9 @@ type FewShotExample struct { func (x *FewShotExample) Reset() { *x = FewShotExample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FewShotExample) String() string { @@ -819,7 +799,7 @@ func (*FewShotExample) ProtoMessage() {} func (x *FewShotExample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +895,9 @@ type InferenceParameter struct { func (x *InferenceParameter) Reset() { *x = InferenceParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InferenceParameter) String() string { @@ -930,7 +908,7 @@ func (*InferenceParameter) ProtoMessage() {} func (x *InferenceParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +968,9 @@ type SummarizationSection struct { func (x *SummarizationSection) Reset() { *x = SummarizationSection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationSection) String() string { @@ -1005,7 +981,7 @@ func (*SummarizationSection) ProtoMessage() {} func (x *SummarizationSection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1039,9 @@ type SummarizationContext struct { func (x *SummarizationContext) Reset() { *x = SummarizationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarizationContext) String() string { @@ -1078,7 +1052,7 @@ func (*SummarizationContext) ProtoMessage() {} func (x *SummarizationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,11 +1125,9 @@ type Generator struct { func (x *Generator) Reset() { *x = Generator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator) String() string { @@ -1166,7 +1138,7 @@ func (*Generator) ProtoMessage() {} func (x *Generator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1260,11 +1232,9 @@ type SummarySuggestion struct { func (x *SummarySuggestion) Reset() { *x = SummarySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarySuggestion) String() string { @@ -1275,7 +1245,7 @@ func (*SummarySuggestion) ProtoMessage() {} func (x *SummarySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1283,9 @@ type GeneratorSuggestion struct { func (x *GeneratorSuggestion) Reset() { *x = GeneratorSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneratorSuggestion) String() string { @@ -1328,7 +1296,7 @@ func (*GeneratorSuggestion) ProtoMessage() {} func (x *GeneratorSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1350,9 @@ type SummarySuggestion_SummarySection struct { func (x *SummarySuggestion_SummarySection) Reset() { *x = SummarySuggestion_SummarySection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummarySuggestion_SummarySection) String() string { @@ -1397,7 +1363,7 @@ func (*SummarySuggestion_SummarySection) ProtoMessage() {} func (x *SummarySuggestion_SummarySection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,212 +1838,6 @@ func file_google_cloud_dialogflow_v2beta1_generator_proto_init() { if File_google_cloud_dialogflow_v2beta1_generator_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MessageEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ConversationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationSectionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FewShotExample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*InferenceParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationSection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SummarizationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Generator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SummarySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GeneratorSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SummarySuggestion_SummarySection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_generator_proto_msgTypes[9].OneofWrappers = []any{ (*FewShotExample_SummarizationSectionList)(nil), } diff --git a/dialogflow/apiv2beta1/dialogflowpb/human_agent_assistant_event.pb.go b/dialogflow/apiv2beta1/dialogflowpb/human_agent_assistant_event.pb.go index 686a3e7fb85d..2699d3e3a0fd 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/human_agent_assistant_event.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/human_agent_assistant_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto @@ -63,11 +63,9 @@ type HumanAgentAssistantEvent struct { func (x *HumanAgentAssistantEvent) Reset() { *x = HumanAgentAssistantEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_human_agent_assistant_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_human_agent_assistant_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanAgentAssistantEvent) String() string { @@ -78,7 +76,7 @@ func (*HumanAgentAssistantEvent) ProtoMessage() {} func (x *HumanAgentAssistantEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_human_agent_assistant_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,20 +183,6 @@ func file_google_cloud_dialogflow_v2beta1_human_agent_assistant_event_proto_init return } file_google_cloud_dialogflow_v2beta1_participant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_human_agent_assistant_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HumanAgentAssistantEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/intent.pb.go b/dialogflow/apiv2beta1/dialogflowpb/intent.pb.go index ece62b879fe6..59df92d41dab 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/intent.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/intent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/intent.proto @@ -875,11 +875,9 @@ type Intent struct { func (x *Intent) Reset() { *x = Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent) String() string { @@ -890,7 +888,7 @@ func (*Intent) ProtoMessage() {} func (x *Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1086,9 @@ type ListIntentsRequest struct { func (x *ListIntentsRequest) Reset() { *x = ListIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsRequest) String() string { @@ -1103,7 +1099,7 @@ func (*ListIntentsRequest) ProtoMessage() {} func (x *ListIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1166,9 @@ type ListIntentsResponse struct { func (x *ListIntentsResponse) Reset() { *x = ListIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsResponse) String() string { @@ -1185,7 +1179,7 @@ func (*ListIntentsResponse) ProtoMessage() {} func (x *ListIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1239,11 +1233,9 @@ type GetIntentRequest struct { func (x *GetIntentRequest) Reset() { *x = GetIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIntentRequest) String() string { @@ -1254,7 +1246,7 @@ func (*GetIntentRequest) ProtoMessage() {} func (x *GetIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1309,9 @@ type CreateIntentRequest struct { func (x *CreateIntentRequest) Reset() { *x = CreateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIntentRequest) String() string { @@ -1332,7 +1322,7 @@ func (*CreateIntentRequest) ProtoMessage() {} func (x *CreateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,11 +1388,9 @@ type UpdateIntentRequest struct { func (x *UpdateIntentRequest) Reset() { *x = UpdateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIntentRequest) String() string { @@ -1413,7 +1401,7 @@ func (*UpdateIntentRequest) ProtoMessage() {} func (x *UpdateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1475,11 +1463,9 @@ type DeleteIntentRequest struct { func (x *DeleteIntentRequest) Reset() { *x = DeleteIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIntentRequest) String() string { @@ -1490,7 +1476,7 @@ func (*DeleteIntentRequest) ProtoMessage() {} func (x *DeleteIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1537,9 @@ type BatchUpdateIntentsRequest struct { func (x *BatchUpdateIntentsRequest) Reset() { *x = BatchUpdateIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIntentsRequest) String() string { @@ -1566,7 +1550,7 @@ func (*BatchUpdateIntentsRequest) ProtoMessage() {} func (x *BatchUpdateIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1647,9 @@ type BatchUpdateIntentsResponse struct { func (x *BatchUpdateIntentsResponse) Reset() { *x = BatchUpdateIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateIntentsResponse) String() string { @@ -1678,7 +1660,7 @@ func (*BatchUpdateIntentsResponse) ProtoMessage() {} func (x *BatchUpdateIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1720,11 +1702,9 @@ type BatchDeleteIntentsRequest struct { func (x *BatchDeleteIntentsRequest) Reset() { *x = BatchDeleteIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteIntentsRequest) String() string { @@ -1735,7 +1715,7 @@ func (*BatchDeleteIntentsRequest) ProtoMessage() {} func (x *BatchDeleteIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1776,11 +1756,9 @@ type IntentBatch struct { func (x *IntentBatch) Reset() { *x = IntentBatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentBatch) String() string { @@ -1791,7 +1769,7 @@ func (*IntentBatch) ProtoMessage() {} func (x *IntentBatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1853,11 +1831,9 @@ type Intent_TrainingPhrase struct { func (x *Intent_TrainingPhrase) Reset() { *x = Intent_TrainingPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase) String() string { @@ -1868,7 +1844,7 @@ func (*Intent_TrainingPhrase) ProtoMessage() {} func (x *Intent_TrainingPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1951,11 +1927,9 @@ type Intent_Parameter struct { func (x *Intent_Parameter) Reset() { *x = Intent_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Parameter) String() string { @@ -1966,7 +1940,7 @@ func (*Intent_Parameter) ProtoMessage() {} func (x *Intent_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2074,11 +2048,9 @@ type Intent_Message struct { func (x *Intent_Message) Reset() { *x = Intent_Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message) String() string { @@ -2089,7 +2061,7 @@ func (*Intent_Message) ProtoMessage() {} func (x *Intent_Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2421,11 +2393,9 @@ type Intent_FollowupIntentInfo struct { func (x *Intent_FollowupIntentInfo) Reset() { *x = Intent_FollowupIntentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_FollowupIntentInfo) String() string { @@ -2436,7 +2406,7 @@ func (*Intent_FollowupIntentInfo) ProtoMessage() {} func (x *Intent_FollowupIntentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2489,11 +2459,9 @@ type Intent_TrainingPhrase_Part struct { func (x *Intent_TrainingPhrase_Part) Reset() { *x = Intent_TrainingPhrase_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase_Part) String() string { @@ -2504,7 +2472,7 @@ func (*Intent_TrainingPhrase_Part) ProtoMessage() {} func (x *Intent_TrainingPhrase_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2559,11 +2527,9 @@ type Intent_Message_Text struct { func (x *Intent_Message_Text) Reset() { *x = Intent_Message_Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Text) String() string { @@ -2574,7 +2540,7 @@ func (*Intent_Message_Text) ProtoMessage() {} func (x *Intent_Message_Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2611,11 +2577,9 @@ type Intent_Message_Image struct { func (x *Intent_Message_Image) Reset() { *x = Intent_Message_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Image) String() string { @@ -2626,7 +2590,7 @@ func (*Intent_Message_Image) ProtoMessage() {} func (x *Intent_Message_Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2669,11 +2633,9 @@ type Intent_Message_QuickReplies struct { func (x *Intent_Message_QuickReplies) Reset() { *x = Intent_Message_QuickReplies{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_QuickReplies) String() string { @@ -2684,7 +2646,7 @@ func (*Intent_Message_QuickReplies) ProtoMessage() {} func (x *Intent_Message_QuickReplies) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2731,11 +2693,9 @@ type Intent_Message_Card struct { func (x *Intent_Message_Card) Reset() { *x = Intent_Message_Card{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Card) String() string { @@ -2746,7 +2706,7 @@ func (*Intent_Message_Card) ProtoMessage() {} func (x *Intent_Message_Card) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,11 +2768,9 @@ type Intent_Message_SimpleResponse struct { func (x *Intent_Message_SimpleResponse) Reset() { *x = Intent_Message_SimpleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SimpleResponse) String() string { @@ -2823,7 +2781,7 @@ func (*Intent_Message_SimpleResponse) ProtoMessage() {} func (x *Intent_Message_SimpleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2874,11 +2832,9 @@ type Intent_Message_SimpleResponses struct { func (x *Intent_Message_SimpleResponses) Reset() { *x = Intent_Message_SimpleResponses{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SimpleResponses) String() string { @@ -2889,7 +2845,7 @@ func (*Intent_Message_SimpleResponses) ProtoMessage() {} func (x *Intent_Message_SimpleResponses) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2931,11 +2887,9 @@ type Intent_Message_BasicCard struct { func (x *Intent_Message_BasicCard) Reset() { *x = Intent_Message_BasicCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard) String() string { @@ -2946,7 +2900,7 @@ func (*Intent_Message_BasicCard) ProtoMessage() {} func (x *Intent_Message_BasicCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3009,11 +2963,9 @@ type Intent_Message_Suggestion struct { func (x *Intent_Message_Suggestion) Reset() { *x = Intent_Message_Suggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Suggestion) String() string { @@ -3024,7 +2976,7 @@ func (*Intent_Message_Suggestion) ProtoMessage() {} func (x *Intent_Message_Suggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3058,11 +3010,9 @@ type Intent_Message_Suggestions struct { func (x *Intent_Message_Suggestions) Reset() { *x = Intent_Message_Suggestions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Suggestions) String() string { @@ -3073,7 +3023,7 @@ func (*Intent_Message_Suggestions) ProtoMessage() {} func (x *Intent_Message_Suggestions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3111,11 +3061,9 @@ type Intent_Message_LinkOutSuggestion struct { func (x *Intent_Message_LinkOutSuggestion) Reset() { *x = Intent_Message_LinkOutSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_LinkOutSuggestion) String() string { @@ -3126,7 +3074,7 @@ func (*Intent_Message_LinkOutSuggestion) ProtoMessage() {} func (x *Intent_Message_LinkOutSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3171,11 +3119,9 @@ type Intent_Message_ListSelect struct { func (x *Intent_Message_ListSelect) Reset() { *x = Intent_Message_ListSelect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ListSelect) String() string { @@ -3186,7 +3132,7 @@ func (*Intent_Message_ListSelect) ProtoMessage() {} func (x *Intent_Message_ListSelect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3234,11 +3180,9 @@ type Intent_Message_CarouselSelect struct { func (x *Intent_Message_CarouselSelect) Reset() { *x = Intent_Message_CarouselSelect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_CarouselSelect) String() string { @@ -3249,7 +3193,7 @@ func (*Intent_Message_CarouselSelect) ProtoMessage() {} func (x *Intent_Message_CarouselSelect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3288,11 +3232,9 @@ type Intent_Message_SelectItemInfo struct { func (x *Intent_Message_SelectItemInfo) Reset() { *x = Intent_Message_SelectItemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_SelectItemInfo) String() string { @@ -3303,7 +3245,7 @@ func (*Intent_Message_SelectItemInfo) ProtoMessage() {} func (x *Intent_Message_SelectItemInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3356,11 +3298,9 @@ type Intent_Message_TelephonyPlayAudio struct { func (x *Intent_Message_TelephonyPlayAudio) Reset() { *x = Intent_Message_TelephonyPlayAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TelephonyPlayAudio) String() string { @@ -3371,7 +3311,7 @@ func (*Intent_Message_TelephonyPlayAudio) ProtoMessage() {} func (x *Intent_Message_TelephonyPlayAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3415,11 +3355,9 @@ type Intent_Message_TelephonySynthesizeSpeech struct { func (x *Intent_Message_TelephonySynthesizeSpeech) Reset() { *x = Intent_Message_TelephonySynthesizeSpeech{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TelephonySynthesizeSpeech) String() string { @@ -3430,7 +3368,7 @@ func (*Intent_Message_TelephonySynthesizeSpeech) ProtoMessage() {} func (x *Intent_Message_TelephonySynthesizeSpeech) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3502,11 +3440,9 @@ type Intent_Message_TelephonyTransferCall struct { func (x *Intent_Message_TelephonyTransferCall) Reset() { *x = Intent_Message_TelephonyTransferCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TelephonyTransferCall) String() string { @@ -3517,7 +3453,7 @@ func (*Intent_Message_TelephonyTransferCall) ProtoMessage() {} func (x *Intent_Message_TelephonyTransferCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3553,11 +3489,9 @@ type Intent_Message_RbmText struct { func (x *Intent_Message_RbmText) Reset() { *x = Intent_Message_RbmText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmText) String() string { @@ -3568,7 +3502,7 @@ func (*Intent_Message_RbmText) ProtoMessage() {} func (x *Intent_Message_RbmText) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3620,11 +3554,9 @@ type Intent_Message_RbmCarouselCard struct { func (x *Intent_Message_RbmCarouselCard) Reset() { *x = Intent_Message_RbmCarouselCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmCarouselCard) String() string { @@ -3635,7 +3567,7 @@ func (*Intent_Message_RbmCarouselCard) ProtoMessage() {} func (x *Intent_Message_RbmCarouselCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3688,11 +3620,9 @@ type Intent_Message_RbmStandaloneCard struct { func (x *Intent_Message_RbmStandaloneCard) Reset() { *x = Intent_Message_RbmStandaloneCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmStandaloneCard) String() string { @@ -3703,7 +3633,7 @@ func (*Intent_Message_RbmStandaloneCard) ProtoMessage() {} func (x *Intent_Message_RbmStandaloneCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3762,11 +3692,9 @@ type Intent_Message_RbmCardContent struct { func (x *Intent_Message_RbmCardContent) Reset() { *x = Intent_Message_RbmCardContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmCardContent) String() string { @@ -3777,7 +3705,7 @@ func (*Intent_Message_RbmCardContent) ProtoMessage() {} func (x *Intent_Message_RbmCardContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3839,11 +3767,9 @@ type Intent_Message_RbmSuggestion struct { func (x *Intent_Message_RbmSuggestion) Reset() { *x = Intent_Message_RbmSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestion) String() string { @@ -3854,7 +3780,7 @@ func (*Intent_Message_RbmSuggestion) ProtoMessage() {} func (x *Intent_Message_RbmSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3925,11 +3851,9 @@ type Intent_Message_RbmSuggestedReply struct { func (x *Intent_Message_RbmSuggestedReply) Reset() { *x = Intent_Message_RbmSuggestedReply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestedReply) String() string { @@ -3940,7 +3864,7 @@ func (*Intent_Message_RbmSuggestedReply) ProtoMessage() {} func (x *Intent_Message_RbmSuggestedReply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3994,11 +3918,9 @@ type Intent_Message_RbmSuggestedAction struct { func (x *Intent_Message_RbmSuggestedAction) Reset() { *x = Intent_Message_RbmSuggestedAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestedAction) String() string { @@ -4009,7 +3931,7 @@ func (*Intent_Message_RbmSuggestedAction) ProtoMessage() {} func (x *Intent_Message_RbmSuggestedAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4106,11 +4028,9 @@ type Intent_Message_MediaContent struct { func (x *Intent_Message_MediaContent) Reset() { *x = Intent_Message_MediaContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_MediaContent) String() string { @@ -4121,7 +4041,7 @@ func (*Intent_Message_MediaContent) ProtoMessage() {} func (x *Intent_Message_MediaContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4167,11 +4087,9 @@ type Intent_Message_BrowseCarouselCard struct { func (x *Intent_Message_BrowseCarouselCard) Reset() { *x = Intent_Message_BrowseCarouselCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard) String() string { @@ -4182,7 +4100,7 @@ func (*Intent_Message_BrowseCarouselCard) ProtoMessage() {} func (x *Intent_Message_BrowseCarouselCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4233,11 +4151,9 @@ type Intent_Message_TableCard struct { func (x *Intent_Message_TableCard) Reset() { *x = Intent_Message_TableCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCard) String() string { @@ -4248,7 +4164,7 @@ func (*Intent_Message_TableCard) ProtoMessage() {} func (x *Intent_Message_TableCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4320,11 +4236,9 @@ type Intent_Message_ColumnProperties struct { func (x *Intent_Message_ColumnProperties) Reset() { *x = Intent_Message_ColumnProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ColumnProperties) String() string { @@ -4335,7 +4249,7 @@ func (*Intent_Message_ColumnProperties) ProtoMessage() {} func (x *Intent_Message_ColumnProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4379,11 +4293,9 @@ type Intent_Message_TableCardRow struct { func (x *Intent_Message_TableCardRow) Reset() { *x = Intent_Message_TableCardRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCardRow) String() string { @@ -4394,7 +4306,7 @@ func (*Intent_Message_TableCardRow) ProtoMessage() {} func (x *Intent_Message_TableCardRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4436,11 +4348,9 @@ type Intent_Message_TableCardCell struct { func (x *Intent_Message_TableCardCell) Reset() { *x = Intent_Message_TableCardCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_TableCardCell) String() string { @@ -4451,7 +4361,7 @@ func (*Intent_Message_TableCardCell) ProtoMessage() {} func (x *Intent_Message_TableCardCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4488,11 +4398,9 @@ type Intent_Message_Card_Button struct { func (x *Intent_Message_Card_Button) Reset() { *x = Intent_Message_Card_Button{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_Card_Button) String() string { @@ -4503,7 +4411,7 @@ func (*Intent_Message_Card_Button) ProtoMessage() {} func (x *Intent_Message_Card_Button) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4546,11 +4454,9 @@ type Intent_Message_BasicCard_Button struct { func (x *Intent_Message_BasicCard_Button) Reset() { *x = Intent_Message_BasicCard_Button{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard_Button) String() string { @@ -4561,7 +4467,7 @@ func (*Intent_Message_BasicCard_Button) ProtoMessage() {} func (x *Intent_Message_BasicCard_Button) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4602,11 +4508,9 @@ type Intent_Message_BasicCard_Button_OpenUriAction struct { func (x *Intent_Message_BasicCard_Button_OpenUriAction) Reset() { *x = Intent_Message_BasicCard_Button_OpenUriAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BasicCard_Button_OpenUriAction) String() string { @@ -4617,7 +4521,7 @@ func (*Intent_Message_BasicCard_Button_OpenUriAction) ProtoMessage() {} func (x *Intent_Message_BasicCard_Button_OpenUriAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4657,11 +4561,9 @@ type Intent_Message_ListSelect_Item struct { func (x *Intent_Message_ListSelect_Item) Reset() { *x = Intent_Message_ListSelect_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_ListSelect_Item) String() string { @@ -4672,7 +4574,7 @@ func (*Intent_Message_ListSelect_Item) ProtoMessage() {} func (x *Intent_Message_ListSelect_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4733,11 +4635,9 @@ type Intent_Message_CarouselSelect_Item struct { func (x *Intent_Message_CarouselSelect_Item) Reset() { *x = Intent_Message_CarouselSelect_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_CarouselSelect_Item) String() string { @@ -4748,7 +4648,7 @@ func (*Intent_Message_CarouselSelect_Item) ProtoMessage() {} func (x *Intent_Message_CarouselSelect_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4834,11 +4734,9 @@ type Intent_Message_RbmCardContent_RbmMedia struct { func (x *Intent_Message_RbmCardContent_RbmMedia) Reset() { *x = Intent_Message_RbmCardContent_RbmMedia{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmCardContent_RbmMedia) String() string { @@ -4849,7 +4747,7 @@ func (*Intent_Message_RbmCardContent_RbmMedia) ProtoMessage() {} func (x *Intent_Message_RbmCardContent_RbmMedia) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4901,11 +4799,9 @@ type Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial struct { func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial) Reset() { *x = Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial) String() string { @@ -4916,7 +4812,7 @@ func (*Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial) ProtoMessage() func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4953,11 +4849,9 @@ type Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri struct { func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri) Reset() { *x = Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri) String() string { @@ -4968,7 +4862,7 @@ func (*Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri) ProtoMessage func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5000,11 +4894,9 @@ type Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation struct { func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation) Reset() { *x = Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation) String() string { @@ -5015,7 +4907,7 @@ func (*Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation) ProtoM func (x *Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5053,11 +4945,9 @@ type Intent_Message_MediaContent_ResponseMediaObject struct { func (x *Intent_Message_MediaContent_ResponseMediaObject) Reset() { *x = Intent_Message_MediaContent_ResponseMediaObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_MediaContent_ResponseMediaObject) String() string { @@ -5068,7 +4958,7 @@ func (*Intent_Message_MediaContent_ResponseMediaObject) ProtoMessage() {} func (x *Intent_Message_MediaContent_ResponseMediaObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5167,11 +5057,9 @@ type Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem struct { func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) Reset() { *x = Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) String() string { @@ -5182,7 +5070,7 @@ func (*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) ProtoMessage() func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5247,11 +5135,9 @@ type Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction stru func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) Reset() { *x = Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) String() string { @@ -5262,7 +5148,7 @@ func (*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) P func (x *Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6558,692 +6444,6 @@ func file_google_cloud_dialogflow_v2beta1_intent_proto_init() { return } file_google_cloud_dialogflow_v2beta1_context_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*IntentBatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Intent_FollowupIntentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_QuickReplies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Card); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SimpleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SimpleResponses); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Suggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Suggestions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_LinkOutSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ListSelect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_CarouselSelect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_SelectItemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TelephonyPlayAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TelephonySynthesizeSpeech); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TelephonyTransferCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmCarouselCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmStandaloneCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmCardContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestedReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestedAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_MediaContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ColumnProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCardRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_TableCardCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_Card_Button); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard_Button); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BasicCard_Button_OpenUriAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_ListSelect_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_CarouselSelect_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmCardContent_RbmMedia); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestedAction_RbmSuggestedActionDial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestedAction_RbmSuggestedActionOpenUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_RbmSuggestedAction_RbmSuggestedActionShareLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_MediaContent_ResponseMediaObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_intent_proto_msgTypes[7].OneofWrappers = []any{ (*BatchUpdateIntentsRequest_IntentBatchUri)(nil), (*BatchUpdateIntentsRequest_IntentBatchInline)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/knowledge_base.pb.go b/dialogflow/apiv2beta1/dialogflowpb/knowledge_base.pb.go index 40ee3f553673..5e16d1e4b2a3 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/knowledge_base.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/knowledge_base.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -73,11 +73,9 @@ type KnowledgeBase struct { func (x *KnowledgeBase) Reset() { *x = KnowledgeBase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeBase) String() string { @@ -88,7 +86,7 @@ func (*KnowledgeBase) ProtoMessage() {} func (x *KnowledgeBase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type ListKnowledgeBasesRequest struct { func (x *ListKnowledgeBasesRequest) Reset() { *x = ListKnowledgeBasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKnowledgeBasesRequest) String() string { @@ -185,7 +181,7 @@ func (*ListKnowledgeBasesRequest) ProtoMessage() {} func (x *ListKnowledgeBasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type ListKnowledgeBasesResponse struct { func (x *ListKnowledgeBasesResponse) Reset() { *x = ListKnowledgeBasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKnowledgeBasesResponse) String() string { @@ -259,7 +253,7 @@ func (*ListKnowledgeBasesResponse) ProtoMessage() {} func (x *ListKnowledgeBasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +297,9 @@ type GetKnowledgeBaseRequest struct { func (x *GetKnowledgeBaseRequest) Reset() { *x = GetKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKnowledgeBaseRequest) String() string { @@ -318,7 +310,7 @@ func (*GetKnowledgeBaseRequest) ProtoMessage() {} func (x *GetKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +348,9 @@ type CreateKnowledgeBaseRequest struct { func (x *CreateKnowledgeBaseRequest) Reset() { *x = CreateKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKnowledgeBaseRequest) String() string { @@ -371,7 +361,7 @@ func (*CreateKnowledgeBaseRequest) ProtoMessage() {} func (x *CreateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +408,9 @@ type DeleteKnowledgeBaseRequest struct { func (x *DeleteKnowledgeBaseRequest) Reset() { *x = DeleteKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKnowledgeBaseRequest) String() string { @@ -433,7 +421,7 @@ func (*DeleteKnowledgeBaseRequest) ProtoMessage() {} func (x *DeleteKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type UpdateKnowledgeBaseRequest struct { func (x *UpdateKnowledgeBaseRequest) Reset() { *x = UpdateKnowledgeBaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKnowledgeBaseRequest) String() string { @@ -494,7 +480,7 @@ func (*UpdateKnowledgeBaseRequest) ProtoMessage() {} func (x *UpdateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,92 +787,6 @@ func file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_init() { if File_google_cloud_dialogflow_v2beta1_knowledge_base_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeBase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListKnowledgeBasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListKnowledgeBasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_knowledge_base_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKnowledgeBaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/participant.pb.go b/dialogflow/apiv2beta1/dialogflowpb/participant.pb.go index 5f2c058001f0..407f17ab7086 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/participant.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/participant.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/participant.proto @@ -303,11 +303,9 @@ type Participant struct { func (x *Participant) Reset() { *x = Participant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Participant) String() string { @@ -318,7 +316,7 @@ func (*Participant) ProtoMessage() {} func (x *Participant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +393,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -410,7 +406,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +508,9 @@ type CreateParticipantRequest struct { func (x *CreateParticipantRequest) Reset() { *x = CreateParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateParticipantRequest) String() string { @@ -527,7 +521,7 @@ func (*CreateParticipantRequest) ProtoMessage() {} func (x *CreateParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +565,9 @@ type GetParticipantRequest struct { func (x *GetParticipantRequest) Reset() { *x = GetParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetParticipantRequest) String() string { @@ -586,7 +578,7 @@ func (*GetParticipantRequest) ProtoMessage() {} func (x *GetParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +620,9 @@ type ListParticipantsRequest struct { func (x *ListParticipantsRequest) Reset() { *x = ListParticipantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsRequest) String() string { @@ -643,7 +633,7 @@ func (*ListParticipantsRequest) ProtoMessage() {} func (x *ListParticipantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +686,9 @@ type ListParticipantsResponse struct { func (x *ListParticipantsResponse) Reset() { *x = ListParticipantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListParticipantsResponse) String() string { @@ -711,7 +699,7 @@ func (*ListParticipantsResponse) ProtoMessage() {} func (x *ListParticipantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +743,9 @@ type UpdateParticipantRequest struct { func (x *UpdateParticipantRequest) Reset() { *x = UpdateParticipantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateParticipantRequest) String() string { @@ -770,7 +756,7 @@ func (*UpdateParticipantRequest) ProtoMessage() {} func (x *UpdateParticipantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +802,9 @@ type AudioInput struct { func (x *AudioInput) Reset() { *x = AudioInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioInput) String() string { @@ -831,7 +815,7 @@ func (*AudioInput) ProtoMessage() {} func (x *AudioInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -875,11 +859,9 @@ type OutputAudio struct { func (x *OutputAudio) Reset() { *x = OutputAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudio) String() string { @@ -890,7 +872,7 @@ func (*OutputAudio) ProtoMessage() {} func (x *OutputAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,11 +953,9 @@ type AutomatedAgentReply struct { func (x *AutomatedAgentReply) Reset() { *x = AutomatedAgentReply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomatedAgentReply) String() string { @@ -986,7 +966,7 @@ func (*AutomatedAgentReply) ProtoMessage() {} func (x *AutomatedAgentReply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1154,9 @@ type SuggestionInput struct { func (x *SuggestionInput) Reset() { *x = SuggestionInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionInput) String() string { @@ -1189,7 +1167,7 @@ func (*SuggestionInput) ProtoMessage() {} func (x *SuggestionInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1251,11 +1229,9 @@ type IntentInput struct { func (x *IntentInput) Reset() { *x = IntentInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentInput) String() string { @@ -1266,7 +1242,7 @@ func (*IntentInput) ProtoMessage() {} func (x *IntentInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1309,11 +1285,9 @@ type SuggestionFeature struct { func (x *SuggestionFeature) Reset() { *x = SuggestionFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionFeature) String() string { @@ -1324,7 +1298,7 @@ func (*SuggestionFeature) ProtoMessage() {} func (x *SuggestionFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1351,9 @@ type AssistQueryParameters struct { func (x *AssistQueryParameters) Reset() { *x = AssistQueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssistQueryParameters) String() string { @@ -1392,7 +1364,7 @@ func (*AssistQueryParameters) ProtoMessage() {} func (x *AssistQueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1490,11 +1462,9 @@ type AnalyzeContentRequest struct { func (x *AnalyzeContentRequest) Reset() { *x = AnalyzeContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeContentRequest) String() string { @@ -1505,7 +1475,7 @@ func (*AnalyzeContentRequest) ProtoMessage() {} func (x *AnalyzeContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1639,9 @@ type DtmfParameters struct { func (x *DtmfParameters) Reset() { *x = DtmfParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DtmfParameters) String() string { @@ -1684,7 +1652,7 @@ func (*DtmfParameters) ProtoMessage() {} func (x *DtmfParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1732,9 @@ type AnalyzeContentResponse struct { func (x *AnalyzeContentResponse) Reset() { *x = AnalyzeContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeContentResponse) String() string { @@ -1779,7 +1745,7 @@ func (*AnalyzeContentResponse) ProtoMessage() {} func (x *AnalyzeContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1857,11 +1823,9 @@ type InputTextConfig struct { func (x *InputTextConfig) Reset() { *x = InputTextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputTextConfig) String() string { @@ -1872,7 +1836,7 @@ func (*InputTextConfig) ProtoMessage() {} func (x *InputTextConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1993,9 @@ type StreamingAnalyzeContentRequest struct { func (x *StreamingAnalyzeContentRequest) Reset() { *x = StreamingAnalyzeContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnalyzeContentRequest) String() string { @@ -2044,7 +2006,7 @@ func (*StreamingAnalyzeContentRequest) ProtoMessage() {} func (x *StreamingAnalyzeContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2326,11 +2288,9 @@ type StreamingAnalyzeContentResponse struct { func (x *StreamingAnalyzeContentResponse) Reset() { *x = StreamingAnalyzeContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnalyzeContentResponse) String() string { @@ -2341,7 +2301,7 @@ func (*StreamingAnalyzeContentResponse) ProtoMessage() {} func (x *StreamingAnalyzeContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2451,11 +2411,9 @@ type AnnotatedMessagePart struct { func (x *AnnotatedMessagePart) Reset() { *x = AnnotatedMessagePart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotatedMessagePart) String() string { @@ -2466,7 +2424,7 @@ func (*AnnotatedMessagePart) ProtoMessage() {} func (x *AnnotatedMessagePart) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2518,11 +2476,9 @@ type MessageAnnotation struct { func (x *MessageAnnotation) Reset() { *x = MessageAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageAnnotation) String() string { @@ -2533,7 +2489,7 @@ func (*MessageAnnotation) ProtoMessage() {} func (x *MessageAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2585,11 +2541,9 @@ type ArticleAnswer struct { func (x *ArticleAnswer) Reset() { *x = ArticleAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArticleAnswer) String() string { @@ -2600,7 +2554,7 @@ func (*ArticleAnswer) ProtoMessage() {} func (x *ArticleAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2680,11 +2634,9 @@ type FaqAnswer struct { func (x *FaqAnswer) Reset() { *x = FaqAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaqAnswer) String() string { @@ -2695,7 +2647,7 @@ func (*FaqAnswer) ProtoMessage() {} func (x *FaqAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2773,11 +2725,9 @@ type SmartReplyAnswer struct { func (x *SmartReplyAnswer) Reset() { *x = SmartReplyAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmartReplyAnswer) String() string { @@ -2788,7 +2738,7 @@ func (*SmartReplyAnswer) ProtoMessage() {} func (x *SmartReplyAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2845,11 +2795,9 @@ type IntentSuggestion struct { func (x *IntentSuggestion) Reset() { *x = IntentSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentSuggestion) String() string { @@ -2860,7 +2808,7 @@ func (*IntentSuggestion) ProtoMessage() {} func (x *IntentSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2938,11 +2886,9 @@ type DialogflowAssistAnswer struct { func (x *DialogflowAssistAnswer) Reset() { *x = DialogflowAssistAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialogflowAssistAnswer) String() string { @@ -2953,7 +2899,7 @@ func (*DialogflowAssistAnswer) ProtoMessage() {} func (x *DialogflowAssistAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3042,11 +2988,9 @@ type SuggestionResult struct { func (x *SuggestionResult) Reset() { *x = SuggestionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionResult) String() string { @@ -3057,7 +3001,7 @@ func (*SuggestionResult) ProtoMessage() {} func (x *SuggestionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3209,11 +3153,9 @@ type SuggestArticlesRequest struct { func (x *SuggestArticlesRequest) Reset() { *x = SuggestArticlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestArticlesRequest) String() string { @@ -3224,7 +3166,7 @@ func (*SuggestArticlesRequest) ProtoMessage() {} func (x *SuggestArticlesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3293,11 +3235,9 @@ type SuggestArticlesResponse struct { func (x *SuggestArticlesResponse) Reset() { *x = SuggestArticlesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestArticlesResponse) String() string { @@ -3308,7 +3248,7 @@ func (*SuggestArticlesResponse) ProtoMessage() {} func (x *SuggestArticlesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3371,11 +3311,9 @@ type SuggestFaqAnswersRequest struct { func (x *SuggestFaqAnswersRequest) Reset() { *x = SuggestFaqAnswersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestFaqAnswersRequest) String() string { @@ -3386,7 +3324,7 @@ func (*SuggestFaqAnswersRequest) ProtoMessage() {} func (x *SuggestFaqAnswersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3455,11 +3393,9 @@ type SuggestFaqAnswersResponse struct { func (x *SuggestFaqAnswersResponse) Reset() { *x = SuggestFaqAnswersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestFaqAnswersResponse) String() string { @@ -3470,7 +3406,7 @@ func (*SuggestFaqAnswersResponse) ProtoMessage() {} func (x *SuggestFaqAnswersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3535,11 +3471,9 @@ type SuggestSmartRepliesRequest struct { func (x *SuggestSmartRepliesRequest) Reset() { *x = SuggestSmartRepliesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestSmartRepliesRequest) String() string { @@ -3550,7 +3484,7 @@ func (*SuggestSmartRepliesRequest) ProtoMessage() {} func (x *SuggestSmartRepliesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3621,11 +3555,9 @@ type SuggestSmartRepliesResponse struct { func (x *SuggestSmartRepliesResponse) Reset() { *x = SuggestSmartRepliesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestSmartRepliesResponse) String() string { @@ -3636,7 +3568,7 @@ func (*SuggestSmartRepliesResponse) ProtoMessage() {} func (x *SuggestSmartRepliesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3698,11 +3630,9 @@ type SuggestDialogflowAssistsResponse struct { func (x *SuggestDialogflowAssistsResponse) Reset() { *x = SuggestDialogflowAssistsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestDialogflowAssistsResponse) String() string { @@ -3713,7 +3643,7 @@ func (*SuggestDialogflowAssistsResponse) ProtoMessage() {} func (x *SuggestDialogflowAssistsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3777,11 +3707,9 @@ type Suggestion struct { func (x *Suggestion) Reset() { *x = Suggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Suggestion) String() string { @@ -3792,7 +3720,7 @@ func (*Suggestion) ProtoMessage() {} func (x *Suggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3873,11 +3801,9 @@ type ListSuggestionsRequest struct { func (x *ListSuggestionsRequest) Reset() { *x = ListSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSuggestionsRequest) String() string { @@ -3888,7 +3814,7 @@ func (*ListSuggestionsRequest) ProtoMessage() {} func (x *ListSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3951,11 +3877,9 @@ type ListSuggestionsResponse struct { func (x *ListSuggestionsResponse) Reset() { *x = ListSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSuggestionsResponse) String() string { @@ -3966,7 +3890,7 @@ func (*ListSuggestionsResponse) ProtoMessage() {} func (x *ListSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4022,11 +3946,9 @@ type CompileSuggestionRequest struct { func (x *CompileSuggestionRequest) Reset() { *x = CompileSuggestionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompileSuggestionRequest) String() string { @@ -4037,7 +3959,7 @@ func (*CompileSuggestionRequest) ProtoMessage() {} func (x *CompileSuggestionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4101,11 +4023,9 @@ type CompileSuggestionResponse struct { func (x *CompileSuggestionResponse) Reset() { *x = CompileSuggestionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompileSuggestionResponse) String() string { @@ -4116,7 +4036,7 @@ func (*CompileSuggestionResponse) ProtoMessage() {} func (x *CompileSuggestionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4173,11 +4093,9 @@ type ResponseMessage struct { func (x *ResponseMessage) Reset() { *x = ResponseMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage) String() string { @@ -4188,7 +4106,7 @@ func (*ResponseMessage) ProtoMessage() {} func (x *ResponseMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4331,11 +4249,9 @@ type SuggestKnowledgeAssistRequest struct { func (x *SuggestKnowledgeAssistRequest) Reset() { *x = SuggestKnowledgeAssistRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestKnowledgeAssistRequest) String() string { @@ -4346,7 +4262,7 @@ func (*SuggestKnowledgeAssistRequest) ProtoMessage() {} func (x *SuggestKnowledgeAssistRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4412,11 +4328,9 @@ type SuggestKnowledgeAssistResponse struct { func (x *SuggestKnowledgeAssistResponse) Reset() { *x = SuggestKnowledgeAssistResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestKnowledgeAssistResponse) String() string { @@ -4427,7 +4341,7 @@ func (*SuggestKnowledgeAssistResponse) ProtoMessage() {} func (x *SuggestKnowledgeAssistResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4483,11 +4397,9 @@ type KnowledgeAssistAnswer struct { func (x *KnowledgeAssistAnswer) Reset() { *x = KnowledgeAssistAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer) String() string { @@ -4498,7 +4410,7 @@ func (*KnowledgeAssistAnswer) ProtoMessage() {} func (x *KnowledgeAssistAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4557,11 +4469,9 @@ type Suggestion_Article struct { func (x *Suggestion_Article) Reset() { *x = Suggestion_Article{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Suggestion_Article) String() string { @@ -4572,7 +4482,7 @@ func (*Suggestion_Article) ProtoMessage() {} func (x *Suggestion_Article) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4652,11 +4562,9 @@ type Suggestion_FaqAnswer struct { func (x *Suggestion_FaqAnswer) Reset() { *x = Suggestion_FaqAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Suggestion_FaqAnswer) String() string { @@ -4667,7 +4575,7 @@ func (*Suggestion_FaqAnswer) ProtoMessage() {} func (x *Suggestion_FaqAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4737,11 +4645,9 @@ type ResponseMessage_Text struct { func (x *ResponseMessage_Text) Reset() { *x = ResponseMessage_Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_Text) String() string { @@ -4752,7 +4658,7 @@ func (*ResponseMessage_Text) ProtoMessage() {} func (x *ResponseMessage_Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4798,11 +4704,9 @@ type ResponseMessage_LiveAgentHandoff struct { func (x *ResponseMessage_LiveAgentHandoff) Reset() { *x = ResponseMessage_LiveAgentHandoff{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_LiveAgentHandoff) String() string { @@ -4813,7 +4717,7 @@ func (*ResponseMessage_LiveAgentHandoff) ProtoMessage() {} func (x *ResponseMessage_LiveAgentHandoff) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4844,11 +4748,9 @@ type ResponseMessage_EndInteraction struct { func (x *ResponseMessage_EndInteraction) Reset() { *x = ResponseMessage_EndInteraction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_EndInteraction) String() string { @@ -4859,7 +4761,7 @@ func (*ResponseMessage_EndInteraction) ProtoMessage() {} func (x *ResponseMessage_EndInteraction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4888,11 +4790,9 @@ type ResponseMessage_MixedAudio struct { func (x *ResponseMessage_MixedAudio) Reset() { *x = ResponseMessage_MixedAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio) String() string { @@ -4903,7 +4803,7 @@ func (*ResponseMessage_MixedAudio) ProtoMessage() {} func (x *ResponseMessage_MixedAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4943,11 +4843,9 @@ type ResponseMessage_TelephonyTransferCall struct { func (x *ResponseMessage_TelephonyTransferCall) Reset() { *x = ResponseMessage_TelephonyTransferCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_TelephonyTransferCall) String() string { @@ -4958,7 +4856,7 @@ func (*ResponseMessage_TelephonyTransferCall) ProtoMessage() {} func (x *ResponseMessage_TelephonyTransferCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5036,11 +4934,9 @@ type ResponseMessage_MixedAudio_Segment struct { func (x *ResponseMessage_MixedAudio_Segment) Reset() { *x = ResponseMessage_MixedAudio_Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio_Segment) String() string { @@ -5051,7 +4947,7 @@ func (*ResponseMessage_MixedAudio_Segment) ProtoMessage() {} func (x *ResponseMessage_MixedAudio_Segment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5126,11 +5022,9 @@ type KnowledgeAssistAnswer_SuggestedQuery struct { func (x *KnowledgeAssistAnswer_SuggestedQuery) Reset() { *x = KnowledgeAssistAnswer_SuggestedQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_SuggestedQuery) String() string { @@ -5141,7 +5035,7 @@ func (*KnowledgeAssistAnswer_SuggestedQuery) ProtoMessage() {} func (x *KnowledgeAssistAnswer_SuggestedQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5183,11 +5077,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer) String() string { @@ -5198,7 +5090,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5273,11 +5165,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) String() string { @@ -5288,7 +5178,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5323,11 +5213,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) String() string { @@ -5338,7 +5226,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) ProtoMessage() {} func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5378,11 +5266,9 @@ type KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet struct { func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) Reset() { *x = KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) String() string { @@ -5393,7 +5279,7 @@ func (*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) ProtoMess func (x *KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6975,692 +6861,6 @@ func file_google_cloud_dialogflow_v2beta1_participant_proto_init() { } file_google_cloud_dialogflow_v2beta1_audio_config_proto_init() file_google_cloud_dialogflow_v2beta1_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Participant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListParticipantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateParticipantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AudioInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AutomatedAgentReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*IntentInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AssistQueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DtmfParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*InputTextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnalyzeContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnalyzeContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnnotatedMessagePart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*MessageAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ArticleAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*FaqAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SmartReplyAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*IntentSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DialogflowAssistAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SuggestArticlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SuggestArticlesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SuggestFaqAnswersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SuggestFaqAnswersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SuggestSmartRepliesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SuggestSmartRepliesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SuggestDialogflowAssistsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Suggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*CompileSuggestionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CompileSuggestionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*SuggestKnowledgeAssistRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SuggestKnowledgeAssistResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Suggestion_Article); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Suggestion_FaqAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_LiveAgentHandoff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_EndInteraction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_TelephonyTransferCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio_Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_SuggestedQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_FaqSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAssistAnswer_KnowledgeAnswer_GenerativeSource_Snippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_participant_proto_msgTypes[9].OneofWrappers = []any{ (*AutomatedAgentReply_DetectIntentResponse)(nil), (*AutomatedAgentReply_Intent)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/session.pb.go b/dialogflow/apiv2beta1/dialogflowpb/session.pb.go index ab789d811da7..d8619238db05 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/session.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/session.proto @@ -234,11 +234,9 @@ type DetectIntentRequest struct { func (x *DetectIntentRequest) Reset() { *x = DetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentRequest) String() string { @@ -249,7 +247,7 @@ func (*DetectIntentRequest) ProtoMessage() {} func (x *DetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +344,9 @@ type DetectIntentResponse struct { func (x *DetectIntentResponse) Reset() { *x = DetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentResponse) String() string { @@ -361,7 +357,7 @@ func (*DetectIntentResponse) ProtoMessage() {} func (x *DetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +476,9 @@ type QueryParameters struct { func (x *QueryParameters) Reset() { *x = QueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryParameters) String() string { @@ -495,7 +489,7 @@ func (*QueryParameters) ProtoMessage() {} func (x *QueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +607,9 @@ type QueryInput struct { func (x *QueryInput) Reset() { *x = QueryInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryInput) String() string { @@ -628,7 +620,7 @@ func (*QueryInput) ProtoMessage() {} func (x *QueryInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +808,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -831,7 +821,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +967,9 @@ type KnowledgeAnswers struct { func (x *KnowledgeAnswers) Reset() { *x = KnowledgeAnswers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAnswers) String() string { @@ -992,7 +980,7 @@ func (*KnowledgeAnswers) ProtoMessage() {} func (x *KnowledgeAnswers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1115,9 @@ type StreamingDetectIntentRequest struct { func (x *StreamingDetectIntentRequest) Reset() { *x = StreamingDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentRequest) String() string { @@ -1142,7 +1128,7 @@ func (*StreamingDetectIntentRequest) ProtoMessage() {} func (x *StreamingDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1271,11 +1257,9 @@ type CloudConversationDebuggingInfo struct { func (x *CloudConversationDebuggingInfo) Reset() { *x = CloudConversationDebuggingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudConversationDebuggingInfo) String() string { @@ -1286,7 +1270,7 @@ func (*CloudConversationDebuggingInfo) ProtoMessage() {} func (x *CloudConversationDebuggingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1490,11 +1474,9 @@ type StreamingDetectIntentResponse struct { func (x *StreamingDetectIntentResponse) Reset() { *x = StreamingDetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentResponse) String() string { @@ -1505,7 +1487,7 @@ func (*StreamingDetectIntentResponse) ProtoMessage() {} func (x *StreamingDetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1660,11 +1642,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -1675,7 +1655,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1771,11 +1751,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -1786,7 +1764,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,11 +1834,9 @@ type EventInput struct { func (x *EventInput) Reset() { *x = EventInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventInput) String() string { @@ -1871,7 +1847,7 @@ func (*EventInput) ProtoMessage() {} func (x *EventInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1921,11 +1897,9 @@ type SentimentAnalysisRequestConfig struct { func (x *SentimentAnalysisRequestConfig) Reset() { *x = SentimentAnalysisRequestConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisRequestConfig) String() string { @@ -1936,7 +1910,7 @@ func (*SentimentAnalysisRequestConfig) ProtoMessage() {} func (x *SentimentAnalysisRequestConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1956,9 @@ type SentimentAnalysisResult struct { func (x *SentimentAnalysisResult) Reset() { *x = SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisResult) String() string { @@ -1997,7 +1969,7 @@ func (*SentimentAnalysisResult) ProtoMessage() {} func (x *SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2039,11 +2011,9 @@ type Sentiment struct { func (x *Sentiment) Reset() { *x = Sentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentiment) String() string { @@ -2054,7 +2024,7 @@ func (*Sentiment) ProtoMessage() {} func (x *Sentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2119,11 +2089,9 @@ type KnowledgeAnswers_Answer struct { func (x *KnowledgeAnswers_Answer) Reset() { *x = KnowledgeAnswers_Answer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeAnswers_Answer) String() string { @@ -2134,7 +2102,7 @@ func (*KnowledgeAnswers_Answer) ProtoMessage() {} func (x *KnowledgeAnswers_Answer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2900,200 +2868,6 @@ func file_google_cloud_dialogflow_v2beta1_session_proto_init() { file_google_cloud_dialogflow_v2beta1_context_proto_init() file_google_cloud_dialogflow_v2beta1_intent_proto_init() file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*QueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QueryInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAnswers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CloudConversationDebuggingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EventInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisRequestConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Sentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeAnswers_Answer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_session_proto_msgTypes[3].OneofWrappers = []any{ (*QueryInput_AudioConfig)(nil), (*QueryInput_Text)(nil), diff --git a/dialogflow/apiv2beta1/dialogflowpb/session_entity_type.pb.go b/dialogflow/apiv2beta1/dialogflowpb/session_entity_type.pb.go index 80708b6deb71..161c2d51ed0c 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/session_entity_type.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/session_entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -146,11 +146,9 @@ type SessionEntityType struct { func (x *SessionEntityType) Reset() { *x = SessionEntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEntityType) String() string { @@ -161,7 +159,7 @@ func (*SessionEntityType) ProtoMessage() {} func (x *SessionEntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type ListSessionEntityTypesRequest struct { func (x *ListSessionEntityTypesRequest) Reset() { *x = ListSessionEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesRequest) String() string { @@ -243,7 +239,7 @@ func (*ListSessionEntityTypesRequest) ProtoMessage() {} func (x *ListSessionEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +292,9 @@ type ListSessionEntityTypesResponse struct { func (x *ListSessionEntityTypesResponse) Reset() { *x = ListSessionEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesResponse) String() string { @@ -311,7 +305,7 @@ func (*ListSessionEntityTypesResponse) ProtoMessage() {} func (x *ListSessionEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +360,9 @@ type GetSessionEntityTypeRequest struct { func (x *GetSessionEntityTypeRequest) Reset() { *x = GetSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionEntityTypeRequest) String() string { @@ -381,7 +373,7 @@ func (*GetSessionEntityTypeRequest) ProtoMessage() {} func (x *GetSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +423,9 @@ type CreateSessionEntityTypeRequest struct { func (x *CreateSessionEntityTypeRequest) Reset() { *x = CreateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionEntityTypeRequest) String() string { @@ -446,7 +436,7 @@ func (*CreateSessionEntityTypeRequest) ProtoMessage() {} func (x *CreateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +480,9 @@ type UpdateSessionEntityTypeRequest struct { func (x *UpdateSessionEntityTypeRequest) Reset() { *x = UpdateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionEntityTypeRequest) String() string { @@ -505,7 +493,7 @@ func (*UpdateSessionEntityTypeRequest) ProtoMessage() {} func (x *UpdateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +549,9 @@ type DeleteSessionEntityTypeRequest struct { func (x *DeleteSessionEntityTypeRequest) Reset() { *x = DeleteSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionEntityTypeRequest) String() string { @@ -576,7 +562,7 @@ func (*DeleteSessionEntityTypeRequest) ProtoMessage() {} func (x *DeleteSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -981,92 +967,6 @@ func file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_init() { return } file_google_cloud_dialogflow_v2beta1_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SessionEntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/sip_trunk.pb.go b/dialogflow/apiv2beta1/dialogflowpb/sip_trunk.pb.go index a4b4b7dbc592..29cadab694ac 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/sip_trunk.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/sip_trunk.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/sip_trunk.proto @@ -197,11 +197,9 @@ type CreateSipTrunkRequest struct { func (x *CreateSipTrunkRequest) Reset() { *x = CreateSipTrunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSipTrunkRequest) String() string { @@ -212,7 +210,7 @@ func (*CreateSipTrunkRequest) ProtoMessage() {} func (x *CreateSipTrunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +254,9 @@ type DeleteSipTrunkRequest struct { func (x *DeleteSipTrunkRequest) Reset() { *x = DeleteSipTrunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSipTrunkRequest) String() string { @@ -271,7 +267,7 @@ func (*DeleteSipTrunkRequest) ProtoMessage() {} func (x *DeleteSipTrunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +308,9 @@ type ListSipTrunksRequest struct { func (x *ListSipTrunksRequest) Reset() { *x = ListSipTrunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSipTrunksRequest) String() string { @@ -327,7 +321,7 @@ func (*ListSipTrunksRequest) ProtoMessage() {} func (x *ListSipTrunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +373,9 @@ type ListSipTrunksResponse struct { func (x *ListSipTrunksResponse) Reset() { *x = ListSipTrunksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSipTrunksResponse) String() string { @@ -394,7 +386,7 @@ func (*ListSipTrunksResponse) ProtoMessage() {} func (x *ListSipTrunksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type GetSipTrunkRequest struct { func (x *GetSipTrunkRequest) Reset() { *x = GetSipTrunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSipTrunkRequest) String() string { @@ -453,7 +443,7 @@ func (*GetSipTrunkRequest) ProtoMessage() {} func (x *GetSipTrunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +481,9 @@ type UpdateSipTrunkRequest struct { func (x *UpdateSipTrunkRequest) Reset() { *x = UpdateSipTrunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSipTrunkRequest) String() string { @@ -506,7 +494,7 @@ func (*UpdateSipTrunkRequest) ProtoMessage() {} func (x *UpdateSipTrunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +545,9 @@ type SipTrunk struct { func (x *SipTrunk) Reset() { *x = SipTrunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SipTrunk) String() string { @@ -572,7 +558,7 @@ func (*SipTrunk) ProtoMessage() {} func (x *SipTrunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +620,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -649,7 +633,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +690,9 @@ type Connection_ErrorDetails struct { func (x *Connection_ErrorDetails) Reset() { *x = Connection_ErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection_ErrorDetails) String() string { @@ -721,7 +703,7 @@ func (*Connection_ErrorDetails) ProtoMessage() {} func (x *Connection_ErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,116 +1031,6 @@ func file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_init() { if File_google_cloud_dialogflow_v2beta1_sip_trunk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSipTrunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSipTrunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSipTrunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSipTrunksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetSipTrunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSipTrunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SipTrunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Connection_ErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[7].OneofWrappers = []any{} file_google_cloud_dialogflow_v2beta1_sip_trunk_proto_msgTypes[8].OneofWrappers = []any{} type x struct{} diff --git a/dialogflow/apiv2beta1/dialogflowpb/validation_result.pb.go b/dialogflow/apiv2beta1/dialogflowpb/validation_result.pb.go index 8905455a32bf..473e66ce7413 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/validation_result.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/validation_result.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/validation_result.proto @@ -125,11 +125,9 @@ type ValidationError struct { func (x *ValidationError) Reset() { *x = ValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationError) String() string { @@ -140,7 +138,7 @@ func (*ValidationError) ProtoMessage() {} func (x *ValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +186,9 @@ type ValidationResult struct { func (x *ValidationResult) Reset() { *x = ValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationResult) String() string { @@ -203,7 +199,7 @@ func (*ValidationResult) ProtoMessage() {} func (x *ValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,32 +301,6 @@ func file_google_cloud_dialogflow_v2beta1_validation_result_proto_init() { if File_google_cloud_dialogflow_v2beta1_validation_result_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_validation_result_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/version.pb.go b/dialogflow/apiv2beta1/dialogflowpb/version.pb.go index 8d2afd421707..2084545cf4eb 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/version.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/version.proto @@ -144,11 +144,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -159,7 +157,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +228,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -245,7 +241,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +294,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -313,7 +307,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +353,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -374,7 +366,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +406,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -429,7 +419,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +467,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -492,7 +480,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +526,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -553,7 +539,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,92 +819,6 @@ func file_google_cloud_dialogflow_v2beta1_version_proto_init() { if File_google_cloud_dialogflow_v2beta1_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/dialogflowpb/webhook.pb.go b/dialogflow/apiv2beta1/dialogflowpb/webhook.pb.go index 1d20a7159caf..daabbf55a68c 100755 --- a/dialogflow/apiv2beta1/dialogflowpb/webhook.pb.go +++ b/dialogflow/apiv2beta1/dialogflowpb/webhook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/v2beta1/webhook.proto @@ -69,11 +69,9 @@ type WebhookRequest struct { func (x *WebhookRequest) Reset() { *x = WebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest) String() string { @@ -84,7 +82,7 @@ func (*WebhookRequest) ProtoMessage() {} func (x *WebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +211,9 @@ type WebhookResponse struct { func (x *WebhookResponse) Reset() { *x = WebhookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse) String() string { @@ -228,7 +224,7 @@ func (*WebhookResponse) ProtoMessage() {} func (x *WebhookResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +336,9 @@ type OriginalDetectIntentRequest struct { func (x *OriginalDetectIntentRequest) Reset() { *x = OriginalDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OriginalDetectIntentRequest) String() string { @@ -355,7 +349,7 @@ func (*OriginalDetectIntentRequest) ProtoMessage() {} func (x *OriginalDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,44 +541,6 @@ func file_google_cloud_dialogflow_v2beta1_webhook_proto_init() { file_google_cloud_dialogflow_v2beta1_intent_proto_init() file_google_cloud_dialogflow_v2beta1_session_proto_init() file_google_cloud_dialogflow_v2beta1_session_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_v2beta1_webhook_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OriginalDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/apiv2beta1/documents_client.go b/dialogflow/apiv2beta1/documents_client.go index 0d1785b628ed..52b8896e44ba 100755 --- a/dialogflow/apiv2beta1/documents_client.go +++ b/dialogflow/apiv2beta1/documents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -510,6 +509,8 @@ type documentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentsClient creates a new documents client based on gRPC. @@ -537,6 +538,7 @@ func NewDocumentsClient(ctx context.Context, opts ...option.ClientOption) (*Docu connPool: connPool, documentsClient: dialogflowpb.NewDocumentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -601,6 +603,8 @@ type documentsRESTClient struct { // Points back to the CallOptions field of the containing DocumentsClient CallOptions **DocumentsCallOptions + + logger *slog.Logger } // NewDocumentsRESTClient creates a new documents rest client. @@ -619,6 +623,7 @@ func NewDocumentsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -692,7 +697,7 @@ func (c *documentsGRPCClient) ListDocuments(ctx context.Context, req *dialogflow } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *documentsGRPCClient) GetDocument(ctx context.Context, req *dialogflowpb var resp *dialogflowpb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *documentsGRPCClient) CreateDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -765,7 +770,7 @@ func (c *documentsGRPCClient) ImportDocuments(ctx context.Context, req *dialogfl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -785,7 +790,7 @@ func (c *documentsGRPCClient) DeleteDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.DeleteDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) if err != nil { @@ -805,7 +810,7 @@ func (c *documentsGRPCClient) UpdateDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *documentsGRPCClient) ReloadDocument(ctx context.Context, req *dialogflo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentsClient.ReloadDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentsClient.ReloadDocument, req, settings.GRPC, c.logger, "ReloadDocument") return err }, opts...) if err != nil { @@ -845,7 +850,7 @@ func (c *documentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *documentsGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *documentsGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -923,7 +928,7 @@ func (c *documentsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -952,7 +957,7 @@ func (c *documentsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1029,21 +1034,10 @@ func (c *documentsRESTClient) ListDocuments(ctx context.Context, req *dialogflow } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1109,17 +1103,7 @@ func (c *documentsRESTClient) GetDocument(ctx context.Context, req *dialogflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1190,21 +1174,10 @@ func (c *documentsRESTClient) CreateDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1272,21 +1245,10 @@ func (c *documentsRESTClient) ImportDocuments(ctx context.Context, req *dialogfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1349,21 +1311,10 @@ func (c *documentsRESTClient) DeleteDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1439,21 +1390,10 @@ func (c *documentsRESTClient) UpdateDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1527,21 +1467,10 @@ func (c *documentsRESTClient) ReloadDocument(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReloadDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1592,17 +1521,7 @@ func (c *documentsRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1667,21 +1586,10 @@ func (c *documentsRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1741,15 +1649,8 @@ func (c *documentsRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1786,17 +1687,7 @@ func (c *documentsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1861,21 +1752,10 @@ func (c *documentsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/documents_client_example_go123_test.go b/dialogflow/apiv2beta1/documents_client_example_go123_test.go index b6d7fa873263..1b3b3b26a3a2 100644 --- a/dialogflow/apiv2beta1/documents_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/documents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDocumentsClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDocumentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDocumentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/encryption_spec_client.go b/dialogflow/apiv2beta1/encryption_spec_client.go index 894c21720e21..3b947285eca4 100755 --- a/dialogflow/apiv2beta1/encryption_spec_client.go +++ b/dialogflow/apiv2beta1/encryption_spec_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -262,6 +261,8 @@ type encryptionSpecGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEncryptionSpecClient creates a new encryption spec service client based on gRPC. @@ -288,6 +289,7 @@ func NewEncryptionSpecClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, encryptionSpecClient: dialogflowpb.NewEncryptionSpecServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -352,6 +354,8 @@ type encryptionSpecRESTClient struct { // Points back to the CallOptions field of the containing EncryptionSpecClient CallOptions **EncryptionSpecCallOptions + + logger *slog.Logger } // NewEncryptionSpecRESTClient creates a new encryption spec service rest client. @@ -369,6 +373,7 @@ func NewEncryptionSpecRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -431,7 +436,7 @@ func (c *encryptionSpecGRPCClient) GetEncryptionSpec(ctx context.Context, req *d var resp *dialogflowpb.EncryptionSpec err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.encryptionSpecClient.GetEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.encryptionSpecClient.GetEncryptionSpec, req, settings.GRPC, c.logger, "GetEncryptionSpec") return err }, opts...) if err != nil { @@ -449,7 +454,7 @@ func (c *encryptionSpecGRPCClient) InitializeEncryptionSpec(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.encryptionSpecClient.InitializeEncryptionSpec(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.encryptionSpecClient.InitializeEncryptionSpec, req, settings.GRPC, c.logger, "InitializeEncryptionSpec") return err }, opts...) if err != nil { @@ -469,7 +474,7 @@ func (c *encryptionSpecGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -498,7 +503,7 @@ func (c *encryptionSpecGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -532,7 +537,7 @@ func (c *encryptionSpecGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -547,7 +552,7 @@ func (c *encryptionSpecGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -576,7 +581,7 @@ func (c *encryptionSpecGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -635,17 +640,7 @@ func (c *encryptionSpecRESTClient) GetEncryptionSpec(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEncryptionSpec") if err != nil { return err } @@ -704,21 +699,10 @@ func (c *encryptionSpecRESTClient) InitializeEncryptionSpec(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InitializeEncryptionSpec") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -769,17 +753,7 @@ func (c *encryptionSpecRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -844,21 +818,10 @@ func (c *encryptionSpecRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -918,15 +881,8 @@ func (c *encryptionSpecRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -963,17 +919,7 @@ func (c *encryptionSpecRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1038,21 +984,10 @@ func (c *encryptionSpecRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/encryption_spec_client_example_go123_test.go b/dialogflow/apiv2beta1/encryption_spec_client_example_go123_test.go index b247d806c5f9..75173484acf0 100644 --- a/dialogflow/apiv2beta1/encryption_spec_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/encryption_spec_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEncryptionSpecClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEncryptionSpecClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/entity_types_client.go b/dialogflow/apiv2beta1/entity_types_client.go index 4f8b23607508..a2d894a7a910 100755 --- a/dialogflow/apiv2beta1/entity_types_client.go +++ b/dialogflow/apiv2beta1/entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -611,6 +610,8 @@ type entityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEntityTypesClient creates a new entity types client based on gRPC. @@ -638,6 +639,7 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En connPool: connPool, entityTypesClient: dialogflowpb.NewEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -702,6 +704,8 @@ type entityTypesRESTClient struct { // Points back to the CallOptions field of the containing EntityTypesClient CallOptions **EntityTypesCallOptions + + logger *slog.Logger } // NewEntityTypesRESTClient creates a new entity types rest client. @@ -720,6 +724,7 @@ func NewEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -793,7 +798,7 @@ func (c *entityTypesGRPCClient) ListEntityTypes(ctx context.Context, req *dialog } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *entityTypesGRPCClient) GetEntityType(ctx context.Context, req *dialogfl var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -846,7 +851,7 @@ func (c *entityTypesGRPCClient) CreateEntityType(ctx context.Context, req *dialo var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -864,7 +869,7 @@ func (c *entityTypesGRPCClient) UpdateEntityType(ctx context.Context, req *dialo var resp *dialogflowpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -881,7 +886,7 @@ func (c *entityTypesGRPCClient) DeleteEntityType(ctx context.Context, req *dialo opts = append((*c.CallOptions).DeleteEntityType[0:len((*c.CallOptions).DeleteEntityType):len((*c.CallOptions).DeleteEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.entityTypesClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) return err @@ -896,7 +901,7 @@ func (c *entityTypesGRPCClient) BatchUpdateEntityTypes(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchUpdateEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchUpdateEntityTypes, req, settings.GRPC, c.logger, "BatchUpdateEntityTypes") return err }, opts...) if err != nil { @@ -916,7 +921,7 @@ func (c *entityTypesGRPCClient) BatchDeleteEntityTypes(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchDeleteEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchDeleteEntityTypes, req, settings.GRPC, c.logger, "BatchDeleteEntityTypes") return err }, opts...) if err != nil { @@ -936,7 +941,7 @@ func (c *entityTypesGRPCClient) BatchCreateEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchCreateEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchCreateEntities, req, settings.GRPC, c.logger, "BatchCreateEntities") return err }, opts...) if err != nil { @@ -956,7 +961,7 @@ func (c *entityTypesGRPCClient) BatchUpdateEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchUpdateEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchUpdateEntities, req, settings.GRPC, c.logger, "BatchUpdateEntities") return err }, opts...) if err != nil { @@ -976,7 +981,7 @@ func (c *entityTypesGRPCClient) BatchDeleteEntities(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.BatchDeleteEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.BatchDeleteEntities, req, settings.GRPC, c.logger, "BatchDeleteEntities") return err }, opts...) if err != nil { @@ -996,7 +1001,7 @@ func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1059,7 +1064,7 @@ func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1074,7 +1079,7 @@ func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1103,7 +1108,7 @@ func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1177,21 +1182,10 @@ func (c *entityTypesRESTClient) ListEntityTypes(ctx context.Context, req *dialog } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1257,17 +1251,7 @@ func (c *entityTypesRESTClient) GetEntityType(ctx context.Context, req *dialogfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntityType") if err != nil { return err } @@ -1331,17 +1315,7 @@ func (c *entityTypesRESTClient) CreateEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntityType") if err != nil { return err } @@ -1412,17 +1386,7 @@ func (c *entityTypesRESTClient) UpdateEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntityType") if err != nil { return err } @@ -1473,15 +1437,8 @@ func (c *entityTypesRESTClient) DeleteEntityType(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntityType") + return err }, opts...) } @@ -1537,21 +1494,10 @@ func (c *entityTypesRESTClient) BatchUpdateEntityTypes(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1621,21 +1567,10 @@ func (c *entityTypesRESTClient) BatchDeleteEntityTypes(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1705,21 +1640,10 @@ func (c *entityTypesRESTClient) BatchCreateEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateEntities") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1791,21 +1715,10 @@ func (c *entityTypesRESTClient) BatchUpdateEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateEntities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1875,21 +1788,10 @@ func (c *entityTypesRESTClient) BatchDeleteEntities(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteEntities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1940,17 +1842,7 @@ func (c *entityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2015,21 +1907,10 @@ func (c *entityTypesRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2089,15 +1970,8 @@ func (c *entityTypesRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2134,17 +2008,7 @@ func (c *entityTypesRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2209,21 +2073,10 @@ func (c *entityTypesRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/entity_types_client_example_go123_test.go b/dialogflow/apiv2beta1/entity_types_client_example_go123_test.go index ffaab7c6c65c..f5be83fd6d51 100644 --- a/dialogflow/apiv2beta1/entity_types_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEntityTypesClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/environments_client.go b/dialogflow/apiv2beta1/environments_client.go index 5fa1b489c40f..0da43793de62 100755 --- a/dialogflow/apiv2beta1/environments_client.go +++ b/dialogflow/apiv2beta1/environments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -371,6 +370,8 @@ type environmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEnvironmentsClient creates a new environments client based on gRPC. @@ -398,6 +399,7 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E connPool: connPool, environmentsClient: dialogflowpb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -446,6 +448,8 @@ type environmentsRESTClient struct { // Points back to the CallOptions field of the containing EnvironmentsClient CallOptions **EnvironmentsCallOptions + + logger *slog.Logger } // NewEnvironmentsRESTClient creates a new environments rest client. @@ -464,6 +468,7 @@ func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -527,7 +532,7 @@ func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *dial } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *dialog var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *dia var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -598,7 +603,7 @@ func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *dia var resp *dialogflowpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *dia opts = append((*c.CallOptions).DeleteEnvironment[0:len((*c.CallOptions).DeleteEnvironment):len((*c.CallOptions).DeleteEnvironment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) return err @@ -641,7 +646,7 @@ func (c *environmentsGRPCClient) GetEnvironmentHistory(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironmentHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironmentHistory, req, settings.GRPC, c.logger, "GetEnvironmentHistory") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -754,7 +759,7 @@ func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -783,7 +788,7 @@ func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -854,21 +859,10 @@ func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *dial } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -931,17 +925,7 @@ func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -999,17 +983,7 @@ func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } @@ -1087,17 +1061,7 @@ func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnvironment") if err != nil { return err } @@ -1144,15 +1108,8 @@ func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") + return err }, opts...) } @@ -1201,21 +1158,10 @@ func (c *environmentsRESTClient) GetEnvironmentHistory(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironmentHistory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1278,17 +1224,7 @@ func (c *environmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1353,21 +1289,10 @@ func (c *environmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1427,15 +1352,8 @@ func (c *environmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1472,17 +1390,7 @@ func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1547,21 +1455,10 @@ func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/environments_client_example_go123_test.go b/dialogflow/apiv2beta1/environments_client_example_go123_test.go index 0f20c0a09446..a38099ee2135 100644 --- a/dialogflow/apiv2beta1/environments_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/environments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEnvironmentsClient_GetEnvironmentHistory_all() { } for resp, err := range c.GetEnvironmentHistory(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEnvironmentsClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEnvironmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleEnvironmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/fulfillments_client.go b/dialogflow/apiv2beta1/fulfillments_client.go index a04f84eeed32..f4f03caa336c 100755 --- a/dialogflow/apiv2beta1/fulfillments_client.go +++ b/dialogflow/apiv2beta1/fulfillments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -240,6 +239,8 @@ type fulfillmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFulfillmentsClient creates a new fulfillments client based on gRPC. @@ -267,6 +268,7 @@ func NewFulfillmentsClient(ctx context.Context, opts ...option.ClientOption) (*F connPool: connPool, fulfillmentsClient: dialogflowpb.NewFulfillmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -315,6 +317,8 @@ type fulfillmentsRESTClient struct { // Points back to the CallOptions field of the containing FulfillmentsClient CallOptions **FulfillmentsCallOptions + + logger *slog.Logger } // NewFulfillmentsRESTClient creates a new fulfillments rest client. @@ -333,6 +337,7 @@ func NewFulfillmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -385,7 +390,7 @@ func (c *fulfillmentsGRPCClient) GetFulfillment(ctx context.Context, req *dialog var resp *dialogflowpb.Fulfillment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fulfillmentsClient.GetFulfillment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fulfillmentsClient.GetFulfillment, req, settings.GRPC, c.logger, "GetFulfillment") return err }, opts...) if err != nil { @@ -403,7 +408,7 @@ func (c *fulfillmentsGRPCClient) UpdateFulfillment(ctx context.Context, req *dia var resp *dialogflowpb.Fulfillment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fulfillmentsClient.UpdateFulfillment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fulfillmentsClient.UpdateFulfillment, req, settings.GRPC, c.logger, "UpdateFulfillment") return err }, opts...) if err != nil { @@ -421,7 +426,7 @@ func (c *fulfillmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *fulfillmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -484,7 +489,7 @@ func (c *fulfillmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -499,7 +504,7 @@ func (c *fulfillmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -528,7 +533,7 @@ func (c *fulfillmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -587,17 +592,7 @@ func (c *fulfillmentsRESTClient) GetFulfillment(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFulfillment") if err != nil { return err } @@ -661,17 +656,7 @@ func (c *fulfillmentsRESTClient) UpdateFulfillment(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFulfillment") if err != nil { return err } @@ -721,17 +706,7 @@ func (c *fulfillmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -796,21 +771,10 @@ func (c *fulfillmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -870,15 +834,8 @@ func (c *fulfillmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -915,17 +872,7 @@ func (c *fulfillmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -990,21 +937,10 @@ func (c *fulfillmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/fulfillments_client_example_go123_test.go b/dialogflow/apiv2beta1/fulfillments_client_example_go123_test.go index 1f00391155ca..fc70238bef7a 100644 --- a/dialogflow/apiv2beta1/fulfillments_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/fulfillments_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFulfillmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFulfillmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/generators_client.go b/dialogflow/apiv2beta1/generators_client.go index ecbfc84ad440..6719f912a68a 100755 --- a/dialogflow/apiv2beta1/generators_client.go +++ b/dialogflow/apiv2beta1/generators_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -333,6 +332,8 @@ type generatorsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGeneratorsClient creates a new generators client based on gRPC. @@ -363,6 +364,7 @@ func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generatorsClient: dialogflowpb.NewGeneratorsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -411,6 +413,8 @@ type generatorsRESTClient struct { // Points back to the CallOptions field of the containing GeneratorsClient CallOptions **GeneratorsCallOptions + + logger *slog.Logger } // NewGeneratorsRESTClient creates a new generators rest client. @@ -432,6 +436,7 @@ func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,7 +489,7 @@ func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *dialogf var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.CreateGenerator, req, settings.GRPC, c.logger, "CreateGenerator") return err }, opts...) if err != nil { @@ -502,7 +507,7 @@ func (c *generatorsGRPCClient) GetGenerator(ctx context.Context, req *dialogflow var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.GetGenerator, req, settings.GRPC, c.logger, "GetGenerator") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *dialogfl } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.ListGenerators, req, settings.GRPC, c.logger, "ListGenerators") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *dialogf opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.generatorsClient.DeleteGenerator, req, settings.GRPC, c.logger, "DeleteGenerator") return err }, opts...) return err @@ -580,7 +585,7 @@ func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *dialogf var resp *dialogflowpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.UpdateGenerator, req, settings.GRPC, c.logger, "UpdateGenerator") return err }, opts...) if err != nil { @@ -598,7 +603,7 @@ func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -676,7 +681,7 @@ func (c *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -774,17 +779,7 @@ func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGenerator") if err != nil { return err } @@ -834,17 +829,7 @@ func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *dialogflow httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerator") if err != nil { return err } @@ -906,21 +891,10 @@ func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *dialogfl } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerators") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -980,15 +954,8 @@ func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGenerator") + return err }, opts...) } @@ -1039,17 +1006,7 @@ func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerator") if err != nil { return err } @@ -1099,17 +1056,7 @@ func (c *generatorsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1174,21 +1121,10 @@ func (c *generatorsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1248,15 +1184,8 @@ func (c *generatorsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1293,17 +1222,7 @@ func (c *generatorsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1368,21 +1287,10 @@ func (c *generatorsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/generators_client_example_go123_test.go b/dialogflow/apiv2beta1/generators_client_example_go123_test.go index 8415627072f2..f6ac278e6543 100644 --- a/dialogflow/apiv2beta1/generators_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/generators_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGeneratorsClient_ListGenerators_all() { } for resp, err := range c.ListGenerators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGeneratorsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGeneratorsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/helpers.go b/dialogflow/apiv2beta1/helpers.go index c107236c7a0f..304ffa716908 100755 --- a/dialogflow/apiv2beta1/helpers.go +++ b/dialogflow/apiv2beta1/helpers.go @@ -18,10 +18,20 @@ package dialogflow import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dialogflow.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/dialogflow", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dialogflow/apiv2beta1/intents_client.go b/dialogflow/apiv2beta1/intents_client.go index a6e4ff0b8533..6e50032d4c84 100755 --- a/dialogflow/apiv2beta1/intents_client.go +++ b/dialogflow/apiv2beta1/intents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -455,6 +454,8 @@ type intentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIntentsClient creates a new intents client based on gRPC. @@ -481,6 +482,7 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent connPool: connPool, intentsClient: dialogflowpb.NewIntentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -545,6 +547,8 @@ type intentsRESTClient struct { // Points back to the CallOptions field of the containing IntentsClient CallOptions **IntentsCallOptions + + logger *slog.Logger } // NewIntentsRESTClient creates a new intents rest client. @@ -562,6 +566,7 @@ func NewIntentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*In endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -635,7 +640,7 @@ func (c *intentsGRPCClient) ListIntents(ctx context.Context, req *dialogflowpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ListIntents, req, settings.GRPC, c.logger, "ListIntents") return err }, opts...) if err != nil { @@ -670,7 +675,7 @@ func (c *intentsGRPCClient) GetIntent(ctx context.Context, req *dialogflowpb.Get var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.GetIntent, req, settings.GRPC, c.logger, "GetIntent") return err }, opts...) if err != nil { @@ -688,7 +693,7 @@ func (c *intentsGRPCClient) CreateIntent(ctx context.Context, req *dialogflowpb. var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.CreateIntent, req, settings.GRPC, c.logger, "CreateIntent") return err }, opts...) if err != nil { @@ -706,7 +711,7 @@ func (c *intentsGRPCClient) UpdateIntent(ctx context.Context, req *dialogflowpb. var resp *dialogflowpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.UpdateIntent, req, settings.GRPC, c.logger, "UpdateIntent") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *intentsGRPCClient) DeleteIntent(ctx context.Context, req *dialogflowpb. opts = append((*c.CallOptions).DeleteIntent[0:len((*c.CallOptions).DeleteIntent):len((*c.CallOptions).DeleteIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.intentsClient.DeleteIntent, req, settings.GRPC, c.logger, "DeleteIntent") return err }, opts...) return err @@ -738,7 +743,7 @@ func (c *intentsGRPCClient) BatchUpdateIntents(ctx context.Context, req *dialogf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.BatchUpdateIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.BatchUpdateIntents, req, settings.GRPC, c.logger, "BatchUpdateIntents") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *intentsGRPCClient) BatchDeleteIntents(ctx context.Context, req *dialogf var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.BatchDeleteIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.BatchDeleteIntents, req, settings.GRPC, c.logger, "BatchDeleteIntents") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -856,7 +861,7 @@ func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -962,21 +967,10 @@ func (c *intentsRESTClient) ListIntents(ctx context.Context, req *dialogflowpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1045,17 +1039,7 @@ func (c *intentsRESTClient) GetIntent(ctx context.Context, req *dialogflowpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIntent") if err != nil { return err } @@ -1122,17 +1106,7 @@ func (c *intentsRESTClient) CreateIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIntent") if err != nil { return err } @@ -1206,17 +1180,7 @@ func (c *intentsRESTClient) UpdateIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIntent") if err != nil { return err } @@ -1267,15 +1231,8 @@ func (c *intentsRESTClient) DeleteIntent(ctx context.Context, req *dialogflowpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIntent") + return err }, opts...) } @@ -1331,21 +1288,10 @@ func (c *intentsRESTClient) BatchUpdateIntents(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,21 +1361,10 @@ func (c *intentsRESTClient) BatchDeleteIntents(ctx context.Context, req *dialogf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1480,17 +1415,7 @@ func (c *intentsRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1555,21 +1480,10 @@ func (c *intentsRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1629,15 +1543,8 @@ func (c *intentsRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1674,17 +1581,7 @@ func (c *intentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1749,21 +1646,10 @@ func (c *intentsRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/intents_client_example_go123_test.go b/dialogflow/apiv2beta1/intents_client_example_go123_test.go index af69f2d720f2..c517baf33a9d 100644 --- a/dialogflow/apiv2beta1/intents_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/intents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIntentsClient_ListIntents_all() { } for resp, err := range c.ListIntents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIntentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIntentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/knowledge_bases_client.go b/dialogflow/apiv2beta1/knowledge_bases_client.go index bbede14dd903..7fa15a4e11a5 100755 --- a/dialogflow/apiv2beta1/knowledge_bases_client.go +++ b/dialogflow/apiv2beta1/knowledge_bases_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -345,6 +344,8 @@ type knowledgeBasesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewKnowledgeBasesClient creates a new knowledge bases client based on gRPC. @@ -372,6 +373,7 @@ func NewKnowledgeBasesClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, knowledgeBasesClient: dialogflowpb.NewKnowledgeBasesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -420,6 +422,8 @@ type knowledgeBasesRESTClient struct { // Points back to the CallOptions field of the containing KnowledgeBasesClient CallOptions **KnowledgeBasesCallOptions + + logger *slog.Logger } // NewKnowledgeBasesRESTClient creates a new knowledge bases rest client. @@ -438,6 +442,7 @@ func NewKnowledgeBasesRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -501,7 +506,7 @@ func (c *knowledgeBasesGRPCClient) ListKnowledgeBases(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.ListKnowledgeBases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.ListKnowledgeBases, req, settings.GRPC, c.logger, "ListKnowledgeBases") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *knowledgeBasesGRPCClient) GetKnowledgeBase(ctx context.Context, req *di var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.GetKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.GetKnowledgeBase, req, settings.GRPC, c.logger, "GetKnowledgeBase") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *knowledgeBasesGRPCClient) CreateKnowledgeBase(ctx context.Context, req var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.CreateKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.CreateKnowledgeBase, req, settings.GRPC, c.logger, "CreateKnowledgeBase") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *knowledgeBasesGRPCClient) DeleteKnowledgeBase(ctx context.Context, req opts = append((*c.CallOptions).DeleteKnowledgeBase[0:len((*c.CallOptions).DeleteKnowledgeBase):len((*c.CallOptions).DeleteKnowledgeBase)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.knowledgeBasesClient.DeleteKnowledgeBase(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.knowledgeBasesClient.DeleteKnowledgeBase, req, settings.GRPC, c.logger, "DeleteKnowledgeBase") return err }, opts...) return err @@ -586,7 +591,7 @@ func (c *knowledgeBasesGRPCClient) UpdateKnowledgeBase(ctx context.Context, req var resp *dialogflowpb.KnowledgeBase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.knowledgeBasesClient.UpdateKnowledgeBase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.knowledgeBasesClient.UpdateKnowledgeBase, req, settings.GRPC, c.logger, "UpdateKnowledgeBase") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *knowledgeBasesGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -633,7 +638,7 @@ func (c *knowledgeBasesGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *knowledgeBasesGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -682,7 +687,7 @@ func (c *knowledgeBasesGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *knowledgeBasesGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -788,21 +793,10 @@ func (c *knowledgeBasesRESTClient) ListKnowledgeBases(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKnowledgeBases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -868,17 +862,7 @@ func (c *knowledgeBasesRESTClient) GetKnowledgeBase(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKnowledgeBase") if err != nil { return err } @@ -938,17 +922,7 @@ func (c *knowledgeBasesRESTClient) CreateKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKnowledgeBase") if err != nil { return err } @@ -1001,15 +975,8 @@ func (c *knowledgeBasesRESTClient) DeleteKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteKnowledgeBase") + return err }, opts...) } @@ -1063,17 +1030,7 @@ func (c *knowledgeBasesRESTClient) UpdateKnowledgeBase(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateKnowledgeBase") if err != nil { return err } @@ -1123,17 +1080,7 @@ func (c *knowledgeBasesRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1198,21 +1145,10 @@ func (c *knowledgeBasesRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1272,15 +1208,8 @@ func (c *knowledgeBasesRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1317,17 +1246,7 @@ func (c *knowledgeBasesRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1392,21 +1311,10 @@ func (c *knowledgeBasesRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/knowledge_bases_client_example_go123_test.go b/dialogflow/apiv2beta1/knowledge_bases_client_example_go123_test.go index 9fb0aea7f56a..590829478018 100644 --- a/dialogflow/apiv2beta1/knowledge_bases_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/knowledge_bases_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleKnowledgeBasesClient_ListKnowledgeBases_all() { } for resp, err := range c.ListKnowledgeBases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleKnowledgeBasesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleKnowledgeBasesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/participants_client.go b/dialogflow/apiv2beta1/participants_client.go index 8d5a7984e66e..f49caeced8ef 100755 --- a/dialogflow/apiv2beta1/participants_client.go +++ b/dialogflow/apiv2beta1/participants_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -589,6 +588,8 @@ type participantsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewParticipantsClient creates a new participants client based on gRPC. @@ -616,6 +617,7 @@ func NewParticipantsClient(ctx context.Context, opts ...option.ClientOption) (*P connPool: connPool, participantsClient: dialogflowpb.NewParticipantsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -664,6 +666,8 @@ type participantsRESTClient struct { // Points back to the CallOptions field of the containing ParticipantsClient CallOptions **ParticipantsCallOptions + + logger *slog.Logger } // NewParticipantsRESTClient creates a new participants rest client. @@ -682,6 +686,7 @@ func NewParticipantsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -734,7 +739,7 @@ func (c *participantsGRPCClient) CreateParticipant(ctx context.Context, req *dia var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.CreateParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.CreateParticipant, req, settings.GRPC, c.logger, "CreateParticipant") return err }, opts...) if err != nil { @@ -752,7 +757,7 @@ func (c *participantsGRPCClient) GetParticipant(ctx context.Context, req *dialog var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.GetParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.GetParticipant, req, settings.GRPC, c.logger, "GetParticipant") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *participantsGRPCClient) ListParticipants(ctx context.Context, req *dial } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.ListParticipants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.ListParticipants, req, settings.GRPC, c.logger, "ListParticipants") return err }, opts...) if err != nil { @@ -816,7 +821,7 @@ func (c *participantsGRPCClient) UpdateParticipant(ctx context.Context, req *dia var resp *dialogflowpb.Participant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.UpdateParticipant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.UpdateParticipant, req, settings.GRPC, c.logger, "UpdateParticipant") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *participantsGRPCClient) AnalyzeContent(ctx context.Context, req *dialog var resp *dialogflowpb.AnalyzeContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.AnalyzeContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.AnalyzeContent, req, settings.GRPC, c.logger, "AnalyzeContent") return err }, opts...) if err != nil { @@ -849,7 +854,9 @@ func (c *participantsGRPCClient) StreamingAnalyzeContent(ctx context.Context, op opts = append((*c.CallOptions).StreamingAnalyzeContent[0:len((*c.CallOptions).StreamingAnalyzeContent):len((*c.CallOptions).StreamingAnalyzeContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingAnalyzeContent") resp, err = c.participantsClient.StreamingAnalyzeContent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingAnalyzeContent") return err }, opts...) if err != nil { @@ -867,7 +874,7 @@ func (c *participantsGRPCClient) SuggestArticles(ctx context.Context, req *dialo var resp *dialogflowpb.SuggestArticlesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestArticles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestArticles, req, settings.GRPC, c.logger, "SuggestArticles") return err }, opts...) if err != nil { @@ -885,7 +892,7 @@ func (c *participantsGRPCClient) SuggestFaqAnswers(ctx context.Context, req *dia var resp *dialogflowpb.SuggestFaqAnswersResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestFaqAnswers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestFaqAnswers, req, settings.GRPC, c.logger, "SuggestFaqAnswers") return err }, opts...) if err != nil { @@ -903,7 +910,7 @@ func (c *participantsGRPCClient) SuggestSmartReplies(ctx context.Context, req *d var resp *dialogflowpb.SuggestSmartRepliesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestSmartReplies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestSmartReplies, req, settings.GRPC, c.logger, "SuggestSmartReplies") return err }, opts...) if err != nil { @@ -921,7 +928,7 @@ func (c *participantsGRPCClient) SuggestKnowledgeAssist(ctx context.Context, req var resp *dialogflowpb.SuggestKnowledgeAssistResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.SuggestKnowledgeAssist(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.SuggestKnowledgeAssist, req, settings.GRPC, c.logger, "SuggestKnowledgeAssist") return err }, opts...) if err != nil { @@ -950,7 +957,7 @@ func (c *participantsGRPCClient) ListSuggestions(ctx context.Context, req *dialo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.ListSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.ListSuggestions, req, settings.GRPC, c.logger, "ListSuggestions") return err }, opts...) if err != nil { @@ -985,7 +992,7 @@ func (c *participantsGRPCClient) CompileSuggestion(ctx context.Context, req *dia var resp *dialogflowpb.CompileSuggestionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.participantsClient.CompileSuggestion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.participantsClient.CompileSuggestion, req, settings.GRPC, c.logger, "CompileSuggestion") return err }, opts...) if err != nil { @@ -1003,7 +1010,7 @@ func (c *participantsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1032,7 +1039,7 @@ func (c *participantsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1066,7 +1073,7 @@ func (c *participantsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1081,7 +1088,7 @@ func (c *participantsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1110,7 +1117,7 @@ func (c *participantsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1176,17 +1183,7 @@ func (c *participantsRESTClient) CreateParticipant(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateParticipant") if err != nil { return err } @@ -1236,17 +1233,7 @@ func (c *participantsRESTClient) GetParticipant(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetParticipant") if err != nil { return err } @@ -1308,21 +1295,10 @@ func (c *participantsRESTClient) ListParticipants(ctx context.Context, req *dial } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListParticipants") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1399,17 +1375,7 @@ func (c *participantsRESTClient) UpdateParticipant(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateParticipant") if err != nil { return err } @@ -1470,17 +1436,7 @@ func (c *participantsRESTClient) AnalyzeContent(ctx context.Context, req *dialog httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeContent") if err != nil { return err } @@ -1565,17 +1521,7 @@ func (c *participantsRESTClient) SuggestArticles(ctx context.Context, req *dialo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestArticles") if err != nil { return err } @@ -1632,17 +1578,7 @@ func (c *participantsRESTClient) SuggestFaqAnswers(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestFaqAnswers") if err != nil { return err } @@ -1699,17 +1635,7 @@ func (c *participantsRESTClient) SuggestSmartReplies(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestSmartReplies") if err != nil { return err } @@ -1765,17 +1691,7 @@ func (c *participantsRESTClient) SuggestKnowledgeAssist(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SuggestKnowledgeAssist") if err != nil { return err } @@ -1860,21 +1776,10 @@ func (c *participantsRESTClient) ListSuggestions(ctx context.Context, req *dialo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSuggestions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1959,17 +1864,7 @@ func (c *participantsRESTClient) CompileSuggestion(ctx context.Context, req *dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompileSuggestion") if err != nil { return err } @@ -2019,17 +1914,7 @@ func (c *participantsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2094,21 +1979,10 @@ func (c *participantsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2168,15 +2042,8 @@ func (c *participantsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2213,17 +2080,7 @@ func (c *participantsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2288,21 +2145,10 @@ func (c *participantsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/participants_client_example_go123_test.go b/dialogflow/apiv2beta1/participants_client_example_go123_test.go index bc78b7cd734d..d63b0d6f33ac 100644 --- a/dialogflow/apiv2beta1/participants_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/participants_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleParticipantsClient_ListParticipants_all() { } for resp, err := range c.ListParticipants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleParticipantsClient_ListSuggestions_all() { } for resp, err := range c.ListSuggestions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleParticipantsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleParticipantsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/session_entity_types_client.go b/dialogflow/apiv2beta1/session_entity_types_client.go index a2c79cff0652..e123da9e90d6 100755 --- a/dialogflow/apiv2beta1/session_entity_types_client.go +++ b/dialogflow/apiv2beta1/session_entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -353,6 +352,8 @@ type sessionEntityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionEntityTypesClient creates a new session entity types client based on gRPC. @@ -380,6 +381,7 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, sessionEntityTypesClient: dialogflowpb.NewSessionEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -428,6 +430,8 @@ type sessionEntityTypesRESTClient struct { // Points back to the CallOptions field of the containing SessionEntityTypesClient CallOptions **SessionEntityTypesCallOptions + + logger *slog.Logger } // NewSessionEntityTypesRESTClient creates a new session entity types rest client. @@ -446,6 +450,7 @@ func NewSessionEntityTypesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -509,7 +514,7 @@ func (c *sessionEntityTypesGRPCClient) ListSessionEntityTypes(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.ListSessionEntityTypes, req, settings.GRPC, c.logger, "ListSessionEntityTypes") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *sessionEntityTypesGRPCClient) GetSessionEntityType(ctx context.Context, var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.GetSessionEntityType, req, settings.GRPC, c.logger, "GetSessionEntityType") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *sessionEntityTypesGRPCClient) CreateSessionEntityType(ctx context.Conte var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.CreateSessionEntityType, req, settings.GRPC, c.logger, "CreateSessionEntityType") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *sessionEntityTypesGRPCClient) UpdateSessionEntityType(ctx context.Conte var resp *dialogflowpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.UpdateSessionEntityType, req, settings.GRPC, c.logger, "UpdateSessionEntityType") return err }, opts...) if err != nil { @@ -597,7 +602,7 @@ func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Conte opts = append((*c.CallOptions).DeleteSessionEntityType[0:len((*c.CallOptions).DeleteSessionEntityType):len((*c.CallOptions).DeleteSessionEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sessionEntityTypesClient.DeleteSessionEntityType, req, settings.GRPC, c.logger, "DeleteSessionEntityType") return err }, opts...) return err @@ -612,7 +617,7 @@ func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -690,7 +695,7 @@ func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -719,7 +724,7 @@ func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -794,21 +799,10 @@ func (c *sessionEntityTypesRESTClient) ListSessionEntityTypes(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessionEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -875,17 +869,7 @@ func (c *sessionEntityTypesRESTClient) GetSessionEntityType(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSessionEntityType") if err != nil { return err } @@ -949,17 +933,7 @@ func (c *sessionEntityTypesRESTClient) CreateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSessionEntityType") if err != nil { return err } @@ -1027,17 +1001,7 @@ func (c *sessionEntityTypesRESTClient) UpdateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSessionEntityType") if err != nil { return err } @@ -1088,15 +1052,8 @@ func (c *sessionEntityTypesRESTClient) DeleteSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSessionEntityType") + return err }, opts...) } @@ -1133,17 +1090,7 @@ func (c *sessionEntityTypesRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1208,21 +1155,10 @@ func (c *sessionEntityTypesRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1282,15 +1218,8 @@ func (c *sessionEntityTypesRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1327,17 +1256,7 @@ func (c *sessionEntityTypesRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1402,21 +1321,10 @@ func (c *sessionEntityTypesRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/session_entity_types_client_example_go123_test.go b/dialogflow/apiv2beta1/session_entity_types_client_example_go123_test.go index 05008bb570b3..79cc0fff136c 100644 --- a/dialogflow/apiv2beta1/session_entity_types_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/session_entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes_all() { } for resp, err := range c.ListSessionEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSessionEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSessionEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/sessions_client.go b/dialogflow/apiv2beta1/sessions_client.go index 2d39ce0fa14d..357c1886dab7 100755 --- a/dialogflow/apiv2beta1/sessions_client.go +++ b/dialogflow/apiv2beta1/sessions_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type sessionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionsClient creates a new sessions client based on gRPC. @@ -282,6 +283,7 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi connPool: connPool, sessionsClient: dialogflowpb.NewSessionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -330,6 +332,8 @@ type sessionsRESTClient struct { // Points back to the CallOptions field of the containing SessionsClient CallOptions **SessionsCallOptions + + logger *slog.Logger } // NewSessionsRESTClient creates a new sessions rest client. @@ -350,6 +354,7 @@ func NewSessionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -402,7 +407,7 @@ func (c *sessionsGRPCClient) DetectIntent(ctx context.Context, req *dialogflowpb var resp *dialogflowpb.DetectIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.DetectIntent, req, settings.GRPC, c.logger, "DetectIntent") return err }, opts...) if err != nil { @@ -417,7 +422,9 @@ func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingDetectIntent[0:len((*c.CallOptions).StreamingDetectIntent):len((*c.CallOptions).StreamingDetectIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") return err }, opts...) if err != nil { @@ -435,7 +442,7 @@ func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -464,7 +471,7 @@ func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -498,7 +505,7 @@ func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -513,7 +520,7 @@ func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -542,7 +549,7 @@ func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -621,17 +628,7 @@ func (c *sessionsRESTClient) DetectIntent(ctx context.Context, req *dialogflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetectIntent") if err != nil { return err } @@ -701,17 +698,7 @@ func (c *sessionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -776,21 +763,10 @@ func (c *sessionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -850,15 +826,8 @@ func (c *sessionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -895,17 +864,7 @@ func (c *sessionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -970,21 +929,10 @@ func (c *sessionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/sessions_client_example_go123_test.go b/dialogflow/apiv2beta1/sessions_client_example_go123_test.go index abbc6de73971..037b3e4626d8 100644 --- a/dialogflow/apiv2beta1/sessions_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/sessions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/sip_trunks_client.go b/dialogflow/apiv2beta1/sip_trunks_client.go index ded7e612aec2..a0cb1d051453 100755 --- a/dialogflow/apiv2beta1/sip_trunks_client.go +++ b/dialogflow/apiv2beta1/sip_trunks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type sipTrunksGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSipTrunksClient creates a new sip trunks client based on gRPC. @@ -355,6 +356,7 @@ func NewSipTrunksClient(ctx context.Context, opts ...option.ClientOption) (*SipT connPool: connPool, sipTrunksClient: dialogflowpb.NewSipTrunksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type sipTrunksRESTClient struct { // Points back to the CallOptions field of the containing SipTrunksClient CallOptions **SipTrunksCallOptions + + logger *slog.Logger } // NewSipTrunksRESTClient creates a new sip trunks rest client. @@ -420,6 +424,7 @@ func NewSipTrunksRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -472,7 +477,7 @@ func (c *sipTrunksGRPCClient) CreateSipTrunk(ctx context.Context, req *dialogflo var resp *dialogflowpb.SipTrunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sipTrunksClient.CreateSipTrunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sipTrunksClient.CreateSipTrunk, req, settings.GRPC, c.logger, "CreateSipTrunk") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *sipTrunksGRPCClient) DeleteSipTrunk(ctx context.Context, req *dialogflo opts = append((*c.CallOptions).DeleteSipTrunk[0:len((*c.CallOptions).DeleteSipTrunk):len((*c.CallOptions).DeleteSipTrunk)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sipTrunksClient.DeleteSipTrunk(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sipTrunksClient.DeleteSipTrunk, req, settings.GRPC, c.logger, "DeleteSipTrunk") return err }, opts...) return err @@ -515,7 +520,7 @@ func (c *sipTrunksGRPCClient) ListSipTrunks(ctx context.Context, req *dialogflow } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sipTrunksClient.ListSipTrunks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sipTrunksClient.ListSipTrunks, req, settings.GRPC, c.logger, "ListSipTrunks") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *sipTrunksGRPCClient) GetSipTrunk(ctx context.Context, req *dialogflowpb var resp *dialogflowpb.SipTrunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sipTrunksClient.GetSipTrunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sipTrunksClient.GetSipTrunk, req, settings.GRPC, c.logger, "GetSipTrunk") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *sipTrunksGRPCClient) UpdateSipTrunk(ctx context.Context, req *dialogflo var resp *dialogflowpb.SipTrunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sipTrunksClient.UpdateSipTrunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sipTrunksClient.UpdateSipTrunk, req, settings.GRPC, c.logger, "UpdateSipTrunk") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *sipTrunksGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *sipTrunksGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *sipTrunksGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *sipTrunksGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *sipTrunksGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -759,17 +764,7 @@ func (c *sipTrunksRESTClient) CreateSipTrunk(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSipTrunk") if err != nil { return err } @@ -816,15 +811,8 @@ func (c *sipTrunksRESTClient) DeleteSipTrunk(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSipTrunk") + return err }, opts...) } @@ -873,21 +861,10 @@ func (c *sipTrunksRESTClient) ListSipTrunks(ctx context.Context, req *dialogflow } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSipTrunks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -950,17 +927,7 @@ func (c *sipTrunksRESTClient) GetSipTrunk(ctx context.Context, req *dialogflowpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSipTrunk") if err != nil { return err } @@ -1024,17 +991,7 @@ func (c *sipTrunksRESTClient) UpdateSipTrunk(ctx context.Context, req *dialogflo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSipTrunk") if err != nil { return err } @@ -1084,17 +1041,7 @@ func (c *sipTrunksRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1159,21 +1106,10 @@ func (c *sipTrunksRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1233,15 +1169,8 @@ func (c *sipTrunksRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1278,17 +1207,7 @@ func (c *sipTrunksRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1353,21 +1272,10 @@ func (c *sipTrunksRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/sip_trunks_client_example_go123_test.go b/dialogflow/apiv2beta1/sip_trunks_client_example_go123_test.go index c9b71f495d1a..38e0e96d215e 100644 --- a/dialogflow/apiv2beta1/sip_trunks_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/sip_trunks_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSipTrunksClient_ListSipTrunks_all() { } for resp, err := range c.ListSipTrunks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSipTrunksClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSipTrunksClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/apiv2beta1/versions_client.go b/dialogflow/apiv2beta1/versions_client.go index a09037040af2..3c1ca42ccec7 100755 --- a/dialogflow/apiv2beta1/versions_client.go +++ b/dialogflow/apiv2beta1/versions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( dialogflowpb "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -335,6 +334,8 @@ type versionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVersionsClient creates a new versions client based on gRPC. @@ -361,6 +362,7 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi connPool: connPool, versionsClient: dialogflowpb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -409,6 +411,8 @@ type versionsRESTClient struct { // Points back to the CallOptions field of the containing VersionsClient CallOptions **VersionsCallOptions + + logger *slog.Logger } // NewVersionsRESTClient creates a new versions rest client. @@ -426,6 +430,7 @@ func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*V endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -489,7 +494,7 @@ func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *dialogflowpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *dialogflowpb.G var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CreateVersion, req, settings.GRPC, c.logger, "CreateVersion") return err }, opts...) if err != nil { @@ -560,7 +565,7 @@ func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *dialogflowp var resp *dialogflowpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *dialogflowp opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.versionsClient.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) return err @@ -592,7 +597,7 @@ func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -621,7 +626,7 @@ func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -670,7 +675,7 @@ func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -699,7 +704,7 @@ func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -770,21 +775,10 @@ func (c *versionsRESTClient) ListVersions(ctx context.Context, req *dialogflowpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -847,17 +841,7 @@ func (c *versionsRESTClient) GetVersion(ctx context.Context, req *dialogflowpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -916,17 +900,7 @@ func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } @@ -994,17 +968,7 @@ func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -1051,15 +1015,8 @@ func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *dialogflowp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") + return err }, opts...) } @@ -1096,17 +1053,7 @@ func (c *versionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1171,21 +1118,10 @@ func (c *versionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1245,15 +1181,8 @@ func (c *versionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1290,17 +1219,7 @@ func (c *versionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1365,21 +1284,10 @@ func (c *versionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/apiv2beta1/versions_client_example_go123_test.go b/dialogflow/apiv2beta1/versions_client_example_go123_test.go index 799fa159e47c..2c2222d2a435 100644 --- a/dialogflow/apiv2beta1/versions_client_example_go123_test.go +++ b/dialogflow/apiv2beta1/versions_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVersionsClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVersionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVersionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/agents_client.go b/dialogflow/cx/apiv3/agents_client.go index 00a0993e6ee8..133836929863 100755 --- a/dialogflow/cx/apiv3/agents_client.go +++ b/dialogflow/cx/apiv3/agents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -573,6 +572,8 @@ type agentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAgentsClient creates a new agents client based on gRPC. @@ -599,6 +600,7 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC connPool: connPool, agentsClient: cxpb.NewAgentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -663,6 +665,8 @@ type agentsRESTClient struct { // Points back to the CallOptions field of the containing AgentsClient CallOptions **AgentsCallOptions + + logger *slog.Logger } // NewAgentsRESTClient creates a new agents rest client. @@ -680,6 +684,7 @@ func NewAgentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Age endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -753,7 +758,7 @@ func (c *agentsGRPCClient) ListAgents(ctx context.Context, req *cxpb.ListAgentsR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ListAgents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ListAgents, req, settings.GRPC, c.logger, "ListAgents") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *agentsGRPCClient) GetAgent(ctx context.Context, req *cxpb.GetAgentReque var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgent, req, settings.GRPC, c.logger, "GetAgent") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *agentsGRPCClient) CreateAgent(ctx context.Context, req *cxpb.CreateAgen var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.CreateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.CreateAgent, req, settings.GRPC, c.logger, "CreateAgent") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *agentsGRPCClient) UpdateAgent(ctx context.Context, req *cxpb.UpdateAgen var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.UpdateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.UpdateAgent, req, settings.GRPC, c.logger, "UpdateAgent") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *agentsGRPCClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgen opts = append((*c.CallOptions).DeleteAgent[0:len((*c.CallOptions).DeleteAgent):len((*c.CallOptions).DeleteAgent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.agentsClient.DeleteAgent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.agentsClient.DeleteAgent, req, settings.GRPC, c.logger, "DeleteAgent") return err }, opts...) return err @@ -856,7 +861,7 @@ func (c *agentsGRPCClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ExportAgent, req, settings.GRPC, c.logger, "ExportAgent") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *agentsGRPCClient) RestoreAgent(ctx context.Context, req *cxpb.RestoreAg var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.RestoreAgent, req, settings.GRPC, c.logger, "RestoreAgent") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *agentsGRPCClient) ValidateAgent(ctx context.Context, req *cxpb.Validate var resp *cxpb.AgentValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ValidateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ValidateAgent, req, settings.GRPC, c.logger, "ValidateAgent") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *agentsGRPCClient) GetAgentValidationResult(ctx context.Context, req *cx var resp *cxpb.AgentValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgentValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgentValidationResult, req, settings.GRPC, c.logger, "GetAgentValidationResult") return err }, opts...) if err != nil { @@ -932,7 +937,7 @@ func (c *agentsGRPCClient) GetGenerativeSettings(ctx context.Context, req *cxpb. var resp *cxpb.GenerativeSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetGenerativeSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetGenerativeSettings, req, settings.GRPC, c.logger, "GetGenerativeSettings") return err }, opts...) if err != nil { @@ -950,7 +955,7 @@ func (c *agentsGRPCClient) UpdateGenerativeSettings(ctx context.Context, req *cx var resp *cxpb.GenerativeSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.UpdateGenerativeSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.UpdateGenerativeSettings, req, settings.GRPC, c.logger, "UpdateGenerativeSettings") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -997,7 +1002,7 @@ func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1031,7 +1036,7 @@ func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1046,7 +1051,7 @@ func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1146,21 +1151,10 @@ func (c *agentsRESTClient) ListAgents(ctx context.Context, req *cxpb.ListAgentsR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAgents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1223,17 +1217,7 @@ func (c *agentsRESTClient) GetAgent(ctx context.Context, req *cxpb.GetAgentReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgent") if err != nil { return err } @@ -1294,17 +1278,7 @@ func (c *agentsRESTClient) CreateAgent(ctx context.Context, req *cxpb.CreateAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAgent") if err != nil { return err } @@ -1372,17 +1346,7 @@ func (c *agentsRESTClient) UpdateAgent(ctx context.Context, req *cxpb.UpdateAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAgent") if err != nil { return err } @@ -1429,15 +1393,8 @@ func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAgent") + return err }, opts...) } @@ -1489,21 +1446,10 @@ func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,21 +1522,10 @@ func (c *agentsRESTClient) RestoreAgent(ctx context.Context, req *cxpb.RestoreAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1649,17 +1584,7 @@ func (c *agentsRESTClient) ValidateAgent(ctx context.Context, req *cxpb.Validate httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateAgent") if err != nil { return err } @@ -1713,17 +1638,7 @@ func (c *agentsRESTClient) GetAgentValidationResult(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgentValidationResult") if err != nil { return err } @@ -1774,17 +1689,7 @@ func (c *agentsRESTClient) GetGenerativeSettings(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerativeSettings") if err != nil { return err } @@ -1848,17 +1753,7 @@ func (c *agentsRESTClient) UpdateGenerativeSettings(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeSettings") if err != nil { return err } @@ -1908,17 +1803,7 @@ func (c *agentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1983,21 +1868,10 @@ func (c *agentsRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2057,15 +1931,8 @@ func (c *agentsRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2102,17 +1969,7 @@ func (c *agentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2177,21 +2034,10 @@ func (c *agentsRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/agents_client_example_go123_test.go b/dialogflow/cx/apiv3/agents_client_example_go123_test.go index 7cfa1adef844..830b925eebbe 100644 --- a/dialogflow/cx/apiv3/agents_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/agents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAgentsClient_ListAgents_all() { } for resp, err := range c.ListAgents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAgentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAgentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/changelogs_client.go b/dialogflow/cx/apiv3/changelogs_client.go index 791b2f44b3d7..f309246c7850 100755 --- a/dialogflow/cx/apiv3/changelogs_client.go +++ b/dialogflow/cx/apiv3/changelogs_client.go @@ -19,7 +19,7 @@ package cx import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -238,6 +237,8 @@ type changelogsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewChangelogsClient creates a new changelogs client based on gRPC. @@ -264,6 +265,7 @@ func NewChangelogsClient(ctx context.Context, opts ...option.ClientOption) (*Cha connPool: connPool, changelogsClient: cxpb.NewChangelogsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -312,6 +314,8 @@ type changelogsRESTClient struct { // Points back to the CallOptions field of the containing ChangelogsClient CallOptions **ChangelogsCallOptions + + logger *slog.Logger } // NewChangelogsRESTClient creates a new changelogs rest client. @@ -329,6 +333,7 @@ func NewChangelogsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -392,7 +397,7 @@ func (c *changelogsGRPCClient) ListChangelogs(ctx context.Context, req *cxpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.changelogsClient.ListChangelogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.changelogsClient.ListChangelogs, req, settings.GRPC, c.logger, "ListChangelogs") return err }, opts...) if err != nil { @@ -427,7 +432,7 @@ func (c *changelogsGRPCClient) GetChangelog(ctx context.Context, req *cxpb.GetCh var resp *cxpb.Changelog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.changelogsClient.GetChangelog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.changelogsClient.GetChangelog, req, settings.GRPC, c.logger, "GetChangelog") return err }, opts...) if err != nil { @@ -445,7 +450,7 @@ func (c *changelogsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *changelogsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *changelogsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -523,7 +528,7 @@ func (c *changelogsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *changelogsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -626,21 +631,10 @@ func (c *changelogsRESTClient) ListChangelogs(ctx context.Context, req *cxpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChangelogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -703,17 +697,7 @@ func (c *changelogsRESTClient) GetChangelog(ctx context.Context, req *cxpb.GetCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChangelog") if err != nil { return err } @@ -763,17 +747,7 @@ func (c *changelogsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -838,21 +812,10 @@ func (c *changelogsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -912,15 +875,8 @@ func (c *changelogsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -957,17 +913,7 @@ func (c *changelogsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1032,21 +978,10 @@ func (c *changelogsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/changelogs_client_example_go123_test.go b/dialogflow/cx/apiv3/changelogs_client_example_go123_test.go index 203c13cd80c4..45bc898f7e45 100644 --- a/dialogflow/cx/apiv3/changelogs_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/changelogs_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleChangelogsClient_ListChangelogs_all() { } for resp, err := range c.ListChangelogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleChangelogsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleChangelogsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/cxpb/advanced_settings.pb.go b/dialogflow/cx/apiv3/cxpb/advanced_settings.pb.go index 50e5682dd365..f9b9b212c863 100755 --- a/dialogflow/cx/apiv3/cxpb/advanced_settings.pb.go +++ b/dialogflow/cx/apiv3/cxpb/advanced_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -83,11 +83,9 @@ type AdvancedSettings struct { func (x *AdvancedSettings) Reset() { *x = AdvancedSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings) String() string { @@ -98,7 +96,7 @@ func (*AdvancedSettings) ProtoMessage() {} func (x *AdvancedSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,11 +163,9 @@ type AdvancedSettings_SpeechSettings struct { func (x *AdvancedSettings_SpeechSettings) Reset() { *x = AdvancedSettings_SpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_SpeechSettings) String() string { @@ -180,7 +176,7 @@ func (*AdvancedSettings_SpeechSettings) ProtoMessage() {} func (x *AdvancedSettings_SpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +244,9 @@ type AdvancedSettings_DtmfSettings struct { func (x *AdvancedSettings_DtmfSettings) Reset() { *x = AdvancedSettings_DtmfSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_DtmfSettings) String() string { @@ -263,7 +257,7 @@ func (*AdvancedSettings_DtmfSettings) ProtoMessage() {} func (x *AdvancedSettings_DtmfSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +325,9 @@ type AdvancedSettings_LoggingSettings struct { func (x *AdvancedSettings_LoggingSettings) Reset() { *x = AdvancedSettings_LoggingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_LoggingSettings) String() string { @@ -346,7 +338,7 @@ func (*AdvancedSettings_LoggingSettings) ProtoMessage() {} func (x *AdvancedSettings_LoggingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,56 +530,6 @@ func file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_init() { return } file_google_cloud_dialogflow_cx_v3_gcs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_SpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_DtmfSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_LoggingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/agent.pb.go b/dialogflow/cx/apiv3/cxpb/agent.pb.go index a01872d23067..44caadf19408 100755 --- a/dialogflow/cx/apiv3/cxpb/agent.pb.go +++ b/dialogflow/cx/apiv3/cxpb/agent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/agent.proto @@ -165,11 +165,9 @@ type SpeechToTextSettings struct { func (x *SpeechToTextSettings) Reset() { *x = SpeechToTextSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechToTextSettings) String() string { @@ -180,7 +178,7 @@ func (*SpeechToTextSettings) ProtoMessage() {} func (x *SpeechToTextSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +299,9 @@ type Agent struct { func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -316,7 +312,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +494,9 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentsRequest) String() string { @@ -513,7 +507,7 @@ func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +560,9 @@ type ListAgentsResponse struct { func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentsResponse) String() string { @@ -581,7 +573,7 @@ func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +616,9 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentRequest) String() string { @@ -639,7 +629,7 @@ func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +667,9 @@ type CreateAgentRequest struct { func (x *CreateAgentRequest) Reset() { *x = CreateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAgentRequest) String() string { @@ -692,7 +680,7 @@ func (*CreateAgentRequest) ProtoMessage() {} func (x *CreateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +725,9 @@ type UpdateAgentRequest struct { func (x *UpdateAgentRequest) Reset() { *x = UpdateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAgentRequest) String() string { @@ -752,7 +738,7 @@ func (*UpdateAgentRequest) ProtoMessage() {} func (x *UpdateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,11 +781,9 @@ type DeleteAgentRequest struct { func (x *DeleteAgentRequest) Reset() { *x = DeleteAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAgentRequest) String() string { @@ -810,7 +794,7 @@ func (*DeleteAgentRequest) ProtoMessage() {} func (x *DeleteAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +852,9 @@ type ExportAgentRequest struct { func (x *ExportAgentRequest) Reset() { *x = ExportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest) String() string { @@ -883,7 +865,7 @@ func (*ExportAgentRequest) ProtoMessage() {} func (x *ExportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +941,9 @@ type ExportAgentResponse struct { func (x *ExportAgentResponse) Reset() { *x = ExportAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentResponse) String() string { @@ -974,7 +954,7 @@ func (*ExportAgentResponse) ProtoMessage() {} func (x *ExportAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,11 +1052,9 @@ type RestoreAgentRequest struct { func (x *RestoreAgentRequest) Reset() { *x = RestoreAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest) String() string { @@ -1087,7 +1065,7 @@ func (*RestoreAgentRequest) ProtoMessage() {} func (x *RestoreAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1171,9 @@ type ValidateAgentRequest struct { func (x *ValidateAgentRequest) Reset() { *x = ValidateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAgentRequest) String() string { @@ -1208,7 +1184,7 @@ func (*ValidateAgentRequest) ProtoMessage() {} func (x *ValidateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1230,9 @@ type GetAgentValidationResultRequest struct { func (x *GetAgentValidationResultRequest) Reset() { *x = GetAgentValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentValidationResultRequest) String() string { @@ -1269,7 +1243,7 @@ func (*GetAgentValidationResultRequest) ProtoMessage() {} func (x *GetAgentValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1289,9 @@ type AgentValidationResult struct { func (x *AgentValidationResult) Reset() { *x = AgentValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentValidationResult) String() string { @@ -1330,7 +1302,7 @@ func (*AgentValidationResult) ProtoMessage() {} func (x *AgentValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1348,9 @@ type GetGenerativeSettingsRequest struct { func (x *GetGenerativeSettingsRequest) Reset() { *x = GetGenerativeSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGenerativeSettingsRequest) String() string { @@ -1391,7 +1361,7 @@ func (*GetGenerativeSettingsRequest) ProtoMessage() {} func (x *GetGenerativeSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1437,11 +1407,9 @@ type UpdateGenerativeSettingsRequest struct { func (x *UpdateGenerativeSettingsRequest) Reset() { *x = UpdateGenerativeSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeSettingsRequest) String() string { @@ -1452,7 +1420,7 @@ func (*UpdateGenerativeSettingsRequest) ProtoMessage() {} func (x *UpdateGenerativeSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1497,11 +1465,9 @@ type Agent_GitIntegrationSettings struct { func (x *Agent_GitIntegrationSettings) Reset() { *x = Agent_GitIntegrationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GitIntegrationSettings) String() string { @@ -1512,7 +1478,7 @@ func (*Agent_GitIntegrationSettings) ProtoMessage() {} func (x *Agent_GitIntegrationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1566,11 +1532,9 @@ type Agent_GenAppBuilderSettings struct { func (x *Agent_GenAppBuilderSettings) Reset() { *x = Agent_GenAppBuilderSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GenAppBuilderSettings) String() string { @@ -1581,7 +1545,7 @@ func (*Agent_GenAppBuilderSettings) ProtoMessage() {} func (x *Agent_GenAppBuilderSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1618,11 +1582,9 @@ type Agent_AnswerFeedbackSettings struct { func (x *Agent_AnswerFeedbackSettings) Reset() { *x = Agent_AnswerFeedbackSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_AnswerFeedbackSettings) String() string { @@ -1633,7 +1595,7 @@ func (*Agent_AnswerFeedbackSettings) ProtoMessage() {} func (x *Agent_AnswerFeedbackSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1636,9 @@ type Agent_PersonalizationSettings struct { func (x *Agent_PersonalizationSettings) Reset() { *x = Agent_PersonalizationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_PersonalizationSettings) String() string { @@ -1689,7 +1649,7 @@ func (*Agent_PersonalizationSettings) ProtoMessage() {} func (x *Agent_PersonalizationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1733,11 +1693,9 @@ type Agent_ClientCertificateSettings struct { func (x *Agent_ClientCertificateSettings) Reset() { *x = Agent_ClientCertificateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_ClientCertificateSettings) String() string { @@ -1748,7 +1706,7 @@ func (*Agent_ClientCertificateSettings) ProtoMessage() {} func (x *Agent_ClientCertificateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1805,11 +1763,9 @@ type Agent_GitIntegrationSettings_GithubSettings struct { func (x *Agent_GitIntegrationSettings_GithubSettings) Reset() { *x = Agent_GitIntegrationSettings_GithubSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GitIntegrationSettings_GithubSettings) String() string { @@ -1820,7 +1776,7 @@ func (*Agent_GitIntegrationSettings_GithubSettings) ProtoMessage() {} func (x *Agent_GitIntegrationSettings_GithubSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,11 +1840,9 @@ type ExportAgentRequest_GitDestination struct { func (x *ExportAgentRequest_GitDestination) Reset() { *x = ExportAgentRequest_GitDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest_GitDestination) String() string { @@ -1899,7 +1853,7 @@ func (*ExportAgentRequest_GitDestination) ProtoMessage() {} func (x *ExportAgentRequest_GitDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,11 +1894,9 @@ type RestoreAgentRequest_GitSource struct { func (x *RestoreAgentRequest_GitSource) Reset() { *x = RestoreAgentRequest_GitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest_GitSource) String() string { @@ -1955,7 +1907,7 @@ func (*RestoreAgentRequest_GitSource) ProtoMessage() {} func (x *RestoreAgentRequest_GitSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2640,296 +2592,6 @@ func file_google_cloud_dialogflow_cx_v3_agent_proto_init() { file_google_cloud_dialogflow_cx_v3_audio_config_proto_init() file_google_cloud_dialogflow_cx_v3_flow_proto_init() file_google_cloud_dialogflow_cx_v3_generative_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechToTextSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AgentValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetGenerativeSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GitIntegrationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GenAppBuilderSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Agent_AnswerFeedbackSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Agent_PersonalizationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Agent_ClientCertificateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GitIntegrationSettings_GithubSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest_GitDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest_GitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_dialogflow_cx_v3_agent_proto_msgTypes[9].OneofWrappers = []any{ (*ExportAgentResponse_AgentUri)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/audio_config.pb.go b/dialogflow/cx/apiv3/cxpb/audio_config.pb.go index 8c8a41733d45..4d5c6d635a04 100755 --- a/dialogflow/cx/apiv3/cxpb/audio_config.pb.go +++ b/dialogflow/cx/apiv3/cxpb/audio_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/audio_config.proto @@ -373,11 +373,9 @@ type SpeechWordInfo struct { func (x *SpeechWordInfo) Reset() { *x = SpeechWordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechWordInfo) String() string { @@ -388,7 +386,7 @@ func (*SpeechWordInfo) ProtoMessage() {} func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +467,9 @@ type BargeInConfig struct { func (x *BargeInConfig) Reset() { *x = BargeInConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BargeInConfig) String() string { @@ -484,7 +480,7 @@ func (*BargeInConfig) ProtoMessage() {} func (x *BargeInConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +565,9 @@ type InputAudioConfig struct { func (x *InputAudioConfig) Reset() { *x = InputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAudioConfig) String() string { @@ -584,7 +578,7 @@ func (*InputAudioConfig) ProtoMessage() {} func (x *InputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +680,9 @@ type VoiceSelectionParams struct { func (x *VoiceSelectionParams) Reset() { *x = VoiceSelectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceSelectionParams) String() string { @@ -701,7 +693,7 @@ func (*VoiceSelectionParams) ProtoMessage() {} func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +756,9 @@ type SynthesizeSpeechConfig struct { func (x *SynthesizeSpeechConfig) Reset() { *x = SynthesizeSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechConfig) String() string { @@ -779,7 +769,7 @@ func (*SynthesizeSpeechConfig) ProtoMessage() {} func (x *SynthesizeSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +842,9 @@ type OutputAudioConfig struct { func (x *OutputAudioConfig) Reset() { *x = OutputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudioConfig) String() string { @@ -867,7 +855,7 @@ func (*OutputAudioConfig) ProtoMessage() {} func (x *OutputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +919,9 @@ type TextToSpeechSettings struct { func (x *TextToSpeechSettings) Reset() { *x = TextToSpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextToSpeechSettings) String() string { @@ -946,7 +932,7 @@ func (*TextToSpeechSettings) ProtoMessage() {} func (x *TextToSpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,92 +1209,6 @@ func file_google_cloud_dialogflow_cx_v3_audio_config_proto_init() { if File_google_cloud_dialogflow_cx_v3_audio_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechWordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BargeInConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VoiceSelectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_audio_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TextToSpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/changelog.pb.go b/dialogflow/cx/apiv3/cxpb/changelog.pb.go index cc66ca229831..ee177707cb5c 100755 --- a/dialogflow/cx/apiv3/cxpb/changelog.pb.go +++ b/dialogflow/cx/apiv3/cxpb/changelog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/changelog.proto @@ -81,11 +81,9 @@ type ListChangelogsRequest struct { func (x *ListChangelogsRequest) Reset() { *x = ListChangelogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChangelogsRequest) String() string { @@ -96,7 +94,7 @@ func (*ListChangelogsRequest) ProtoMessage() {} func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,11 +155,9 @@ type ListChangelogsResponse struct { func (x *ListChangelogsResponse) Reset() { *x = ListChangelogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChangelogsResponse) String() string { @@ -172,7 +168,7 @@ func (*ListChangelogsResponse) ProtoMessage() {} func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +212,9 @@ type GetChangelogRequest struct { func (x *GetChangelogRequest) Reset() { *x = GetChangelogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChangelogRequest) String() string { @@ -231,7 +225,7 @@ func (*GetChangelogRequest) ProtoMessage() {} func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type Changelog struct { func (x *Changelog) Reset() { *x = Changelog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Changelog) String() string { @@ -296,7 +288,7 @@ func (*Changelog) ProtoMessage() {} func (x *Changelog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,56 +512,6 @@ func file_google_cloud_dialogflow_cx_v3_changelog_proto_init() { if File_google_cloud_dialogflow_cx_v3_changelog_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListChangelogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListChangelogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetChangelogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_changelog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Changelog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/data_store_connection.pb.go b/dialogflow/cx/apiv3/cxpb/data_store_connection.pb.go index a6f4d7df80c1..89af108e5446 100755 --- a/dialogflow/cx/apiv3/cxpb/data_store_connection.pb.go +++ b/dialogflow/cx/apiv3/cxpb/data_store_connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/data_store_connection.proto @@ -343,11 +343,9 @@ type DataStoreConnection struct { func (x *DataStoreConnection) Reset() { *x = DataStoreConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnection) String() string { @@ -358,7 +356,7 @@ func (*DataStoreConnection) ProtoMessage() {} func (x *DataStoreConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +419,9 @@ type DataStoreConnectionSignals struct { func (x *DataStoreConnectionSignals) Reset() { *x = DataStoreConnectionSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals) String() string { @@ -436,7 +432,7 @@ func (*DataStoreConnectionSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +527,9 @@ type DataStoreConnectionSignals_RewriterModelCallSignals struct { func (x *DataStoreConnectionSignals_RewriterModelCallSignals) Reset() { *x = DataStoreConnectionSignals_RewriterModelCallSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_RewriterModelCallSignals) String() string { @@ -546,7 +540,7 @@ func (*DataStoreConnectionSignals_RewriterModelCallSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_RewriterModelCallSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -598,11 +592,9 @@ type DataStoreConnectionSignals_SearchSnippet struct { func (x *DataStoreConnectionSignals_SearchSnippet) Reset() { *x = DataStoreConnectionSignals_SearchSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_SearchSnippet) String() string { @@ -613,7 +605,7 @@ func (*DataStoreConnectionSignals_SearchSnippet) ProtoMessage() {} func (x *DataStoreConnectionSignals_SearchSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +658,9 @@ type DataStoreConnectionSignals_AnswerGenerationModelCallSignals struct { func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) Reset() { *x = DataStoreConnectionSignals_AnswerGenerationModelCallSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) String() string { @@ -681,7 +671,7 @@ func (*DataStoreConnectionSignals_AnswerGenerationModelCallSignals) ProtoMessage func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +721,9 @@ type DataStoreConnectionSignals_AnswerPart struct { func (x *DataStoreConnectionSignals_AnswerPart) Reset() { *x = DataStoreConnectionSignals_AnswerPart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_AnswerPart) String() string { @@ -746,7 +734,7 @@ func (*DataStoreConnectionSignals_AnswerPart) ProtoMessage() {} func (x *DataStoreConnectionSignals_AnswerPart) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +777,9 @@ type DataStoreConnectionSignals_CitedSnippet struct { func (x *DataStoreConnectionSignals_CitedSnippet) Reset() { *x = DataStoreConnectionSignals_CitedSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_CitedSnippet) String() string { @@ -804,7 +790,7 @@ func (*DataStoreConnectionSignals_CitedSnippet) ProtoMessage() {} func (x *DataStoreConnectionSignals_CitedSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +833,9 @@ type DataStoreConnectionSignals_GroundingSignals struct { func (x *DataStoreConnectionSignals_GroundingSignals) Reset() { *x = DataStoreConnectionSignals_GroundingSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_GroundingSignals) String() string { @@ -862,7 +846,7 @@ func (*DataStoreConnectionSignals_GroundingSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_GroundingSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +891,9 @@ type DataStoreConnectionSignals_SafetySignals struct { func (x *DataStoreConnectionSignals_SafetySignals) Reset() { *x = DataStoreConnectionSignals_SafetySignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_SafetySignals) String() string { @@ -922,7 +904,7 @@ func (*DataStoreConnectionSignals_SafetySignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_SafetySignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,116 +1207,6 @@ func file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_init() { if File_google_cloud_dialogflow_cx_v3_data_store_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_RewriterModelCallSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_SearchSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_AnswerGenerationModelCallSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_AnswerPart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_CitedSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_GroundingSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_SafetySignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/deployment.pb.go b/dialogflow/cx/apiv3/cxpb/deployment.pb.go index edb94a1e468b..00c3d3f5fa17 100755 --- a/dialogflow/cx/apiv3/cxpb/deployment.pb.go +++ b/dialogflow/cx/apiv3/cxpb/deployment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/deployment.proto @@ -127,11 +127,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -142,7 +140,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +217,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -234,7 +230,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +285,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -304,7 +298,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +342,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -363,7 +355,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +395,9 @@ type Deployment_Result struct { func (x *Deployment_Result) Reset() { *x = Deployment_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment_Result) String() string { @@ -418,7 +408,7 @@ func (*Deployment_Result) ProtoMessage() {} func (x *Deployment_Result) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,68 +622,6 @@ func file_google_cloud_dialogflow_cx_v3_deployment_proto_init() { if File_google_cloud_dialogflow_cx_v3_deployment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_deployment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Deployment_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/entity_type.pb.go b/dialogflow/cx/apiv3/cxpb/entity_type.pb.go index 005eab603373..7556daf5faa6 100755 --- a/dialogflow/cx/apiv3/cxpb/entity_type.pb.go +++ b/dialogflow/cx/apiv3/cxpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/entity_type.proto @@ -344,11 +344,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -359,7 +357,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +469,9 @@ type ExportEntityTypesRequest struct { func (x *ExportEntityTypesRequest) Reset() { *x = ExportEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesRequest) String() string { @@ -486,7 +482,7 @@ func (*ExportEntityTypesRequest) ProtoMessage() {} func (x *ExportEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +591,9 @@ type ExportEntityTypesResponse struct { func (x *ExportEntityTypesResponse) Reset() { *x = ExportEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesResponse) String() string { @@ -610,7 +604,7 @@ func (*ExportEntityTypesResponse) ProtoMessage() {} func (x *ExportEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +674,9 @@ type ExportEntityTypesMetadata struct { func (x *ExportEntityTypesMetadata) Reset() { *x = ExportEntityTypesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesMetadata) String() string { @@ -695,7 +687,7 @@ func (*ExportEntityTypesMetadata) ProtoMessage() {} func (x *ExportEntityTypesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +734,9 @@ type ImportEntityTypesRequest struct { func (x *ImportEntityTypesRequest) Reset() { *x = ImportEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesRequest) String() string { @@ -757,7 +747,7 @@ func (*ImportEntityTypesRequest) ProtoMessage() {} func (x *ImportEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +849,9 @@ type ImportEntityTypesResponse struct { func (x *ImportEntityTypesResponse) Reset() { *x = ImportEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesResponse) String() string { @@ -874,7 +862,7 @@ func (*ImportEntityTypesResponse) ProtoMessage() {} func (x *ImportEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +902,9 @@ type ImportEntityTypesMetadata struct { func (x *ImportEntityTypesMetadata) Reset() { *x = ImportEntityTypesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesMetadata) String() string { @@ -929,7 +915,7 @@ func (*ImportEntityTypesMetadata) ProtoMessage() {} func (x *ImportEntityTypesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +962,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -991,7 +975,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1035,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -1066,7 +1048,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1105,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -1138,7 +1118,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1195,11 +1175,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -1210,7 +1188,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1251,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -1288,7 +1264,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1328,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -1367,7 +1341,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1427,11 +1401,9 @@ type EntityType_Entity struct { func (x *EntityType_Entity) Reset() { *x = EntityType_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_Entity) String() string { @@ -1442,7 +1414,7 @@ func (*EntityType_Entity) ProtoMessage() {} func (x *EntityType_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1483,11 +1455,9 @@ type EntityType_ExcludedPhrase struct { func (x *EntityType_ExcludedPhrase) Reset() { *x = EntityType_ExcludedPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_ExcludedPhrase) String() string { @@ -1498,7 +1468,7 @@ func (*EntityType_ExcludedPhrase) ProtoMessage() {} func (x *EntityType_ExcludedPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1506,9 @@ type ImportEntityTypesResponse_ConflictingResources struct { func (x *ImportEntityTypesResponse_ConflictingResources) Reset() { *x = ImportEntityTypesResponse_ConflictingResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesResponse_ConflictingResources) String() string { @@ -1551,7 +1519,7 @@ func (*ImportEntityTypesResponse_ConflictingResources) ProtoMessage() {} func (x *ImportEntityTypesResponse_ConflictingResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2030,200 +1998,6 @@ func file_google_cloud_dialogflow_cx_v3_entity_type_proto_init() { return } file_google_cloud_dialogflow_cx_v3_inline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_ExcludedPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesResponse_ConflictingResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_entity_type_proto_msgTypes[1].OneofWrappers = []any{ (*ExportEntityTypesRequest_EntityTypesUri)(nil), (*ExportEntityTypesRequest_EntityTypesContentInline)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/environment.pb.go b/dialogflow/cx/apiv3/cxpb/environment.pb.go index 8d567b61512f..a97c01dcb300 100755 --- a/dialogflow/cx/apiv3/cxpb/environment.pb.go +++ b/dialogflow/cx/apiv3/cxpb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/environment.proto @@ -136,11 +136,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -151,7 +149,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +233,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -250,7 +246,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -320,7 +314,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +358,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -379,7 +371,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -433,7 +423,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +467,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -492,7 +480,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +524,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -551,7 +537,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +579,9 @@ type LookupEnvironmentHistoryRequest struct { func (x *LookupEnvironmentHistoryRequest) Reset() { *x = LookupEnvironmentHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEnvironmentHistoryRequest) String() string { @@ -608,7 +592,7 @@ func (*LookupEnvironmentHistoryRequest) ProtoMessage() {} func (x *LookupEnvironmentHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +646,9 @@ type LookupEnvironmentHistoryResponse struct { func (x *LookupEnvironmentHistoryResponse) Reset() { *x = LookupEnvironmentHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEnvironmentHistoryResponse) String() string { @@ -677,7 +659,7 @@ func (*LookupEnvironmentHistoryResponse) ProtoMessage() {} func (x *LookupEnvironmentHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +708,9 @@ type ContinuousTestResult struct { func (x *ContinuousTestResult) Reset() { *x = ContinuousTestResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousTestResult) String() string { @@ -741,7 +721,7 @@ func (*ContinuousTestResult) ProtoMessage() {} func (x *ContinuousTestResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +778,9 @@ type RunContinuousTestRequest struct { func (x *RunContinuousTestRequest) Reset() { *x = RunContinuousTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestRequest) String() string { @@ -813,7 +791,7 @@ func (*RunContinuousTestRequest) ProtoMessage() {} func (x *RunContinuousTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +826,9 @@ type RunContinuousTestResponse struct { func (x *RunContinuousTestResponse) Reset() { *x = RunContinuousTestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestResponse) String() string { @@ -863,7 +839,7 @@ func (*RunContinuousTestResponse) ProtoMessage() {} func (x *RunContinuousTestResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +875,9 @@ type RunContinuousTestMetadata struct { func (x *RunContinuousTestMetadata) Reset() { *x = RunContinuousTestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestMetadata) String() string { @@ -914,7 +888,7 @@ func (*RunContinuousTestMetadata) ProtoMessage() {} func (x *RunContinuousTestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +930,9 @@ type ListContinuousTestResultsRequest struct { func (x *ListContinuousTestResultsRequest) Reset() { *x = ListContinuousTestResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContinuousTestResultsRequest) String() string { @@ -971,7 +943,7 @@ func (*ListContinuousTestResultsRequest) ProtoMessage() {} func (x *ListContinuousTestResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,11 +994,9 @@ type ListContinuousTestResultsResponse struct { func (x *ListContinuousTestResultsResponse) Reset() { *x = ListContinuousTestResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContinuousTestResultsResponse) String() string { @@ -1037,7 +1007,7 @@ func (*ListContinuousTestResultsResponse) ProtoMessage() {} func (x *ListContinuousTestResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1055,9 @@ type DeployFlowRequest struct { func (x *DeployFlowRequest) Reset() { *x = DeployFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowRequest) String() string { @@ -1100,7 +1068,7 @@ func (*DeployFlowRequest) ProtoMessage() {} func (x *DeployFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1114,9 @@ type DeployFlowResponse struct { func (x *DeployFlowResponse) Reset() { *x = DeployFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowResponse) String() string { @@ -1161,7 +1127,7 @@ func (*DeployFlowResponse) ProtoMessage() {} func (x *DeployFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,11 +1170,9 @@ type DeployFlowMetadata struct { func (x *DeployFlowMetadata) Reset() { *x = DeployFlowMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowMetadata) String() string { @@ -1219,7 +1183,7 @@ func (*DeployFlowMetadata) ProtoMessage() {} func (x *DeployFlowMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1221,9 @@ type Environment_VersionConfig struct { func (x *Environment_VersionConfig) Reset() { *x = Environment_VersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_VersionConfig) String() string { @@ -1272,7 +1234,7 @@ func (*Environment_VersionConfig) ProtoMessage() {} func (x *Environment_VersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1278,9 @@ type Environment_TestCasesConfig struct { func (x *Environment_TestCasesConfig) Reset() { *x = Environment_TestCasesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_TestCasesConfig) String() string { @@ -1331,7 +1291,7 @@ func (*Environment_TestCasesConfig) ProtoMessage() {} func (x *Environment_TestCasesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1383,11 +1343,9 @@ type Environment_WebhookConfig struct { func (x *Environment_WebhookConfig) Reset() { *x = Environment_WebhookConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_WebhookConfig) String() string { @@ -1398,7 +1356,7 @@ func (*Environment_WebhookConfig) ProtoMessage() {} func (x *Environment_WebhookConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,260 +1898,6 @@ func file_google_cloud_dialogflow_cx_v3_environment_proto_init() { } file_google_cloud_dialogflow_cx_v3_test_case_proto_init() file_google_cloud_dialogflow_cx_v3_webhook_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LookupEnvironmentHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LookupEnvironmentHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousTestResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListContinuousTestResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListContinuousTestResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Environment_VersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Environment_TestCasesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_environment_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Environment_WebhookConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/experiment.pb.go b/dialogflow/cx/apiv3/cxpb/experiment.pb.go index d2f03900da9c..391fb1359ed1 100755 --- a/dialogflow/cx/apiv3/cxpb/experiment.pb.go +++ b/dialogflow/cx/apiv3/cxpb/experiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/experiment.proto @@ -281,11 +281,9 @@ type Experiment struct { func (x *Experiment) Reset() { *x = Experiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment) String() string { @@ -296,7 +294,7 @@ func (*Experiment) ProtoMessage() {} func (x *Experiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +426,9 @@ type VersionVariants struct { func (x *VersionVariants) Reset() { *x = VersionVariants{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionVariants) String() string { @@ -443,7 +439,7 @@ func (*VersionVariants) ProtoMessage() {} func (x *VersionVariants) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +480,9 @@ type VariantsHistory struct { func (x *VariantsHistory) Reset() { *x = VariantsHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VariantsHistory) String() string { @@ -499,7 +493,7 @@ func (*VariantsHistory) ProtoMessage() {} func (x *VariantsHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +564,9 @@ type RolloutConfig struct { func (x *RolloutConfig) Reset() { *x = RolloutConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutConfig) String() string { @@ -585,7 +577,7 @@ func (*RolloutConfig) ProtoMessage() {} func (x *RolloutConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,11 +629,9 @@ type RolloutState struct { func (x *RolloutState) Reset() { *x = RolloutState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutState) String() string { @@ -652,7 +642,7 @@ func (*RolloutState) ProtoMessage() {} func (x *RolloutState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +698,9 @@ type ListExperimentsRequest struct { func (x *ListExperimentsRequest) Reset() { *x = ListExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsRequest) String() string { @@ -723,7 +711,7 @@ func (*ListExperimentsRequest) ProtoMessage() {} func (x *ListExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +766,9 @@ type ListExperimentsResponse struct { func (x *ListExperimentsResponse) Reset() { *x = ListExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsResponse) String() string { @@ -793,7 +779,7 @@ func (*ListExperimentsResponse) ProtoMessage() {} func (x *ListExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +823,9 @@ type GetExperimentRequest struct { func (x *GetExperimentRequest) Reset() { *x = GetExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExperimentRequest) String() string { @@ -852,7 +836,7 @@ func (*GetExperimentRequest) ProtoMessage() {} func (x *GetExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +875,9 @@ type CreateExperimentRequest struct { func (x *CreateExperimentRequest) Reset() { *x = CreateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExperimentRequest) String() string { @@ -906,7 +888,7 @@ func (*CreateExperimentRequest) ProtoMessage() {} func (x *CreateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +932,9 @@ type UpdateExperimentRequest struct { func (x *UpdateExperimentRequest) Reset() { *x = UpdateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExperimentRequest) String() string { @@ -965,7 +945,7 @@ func (*UpdateExperimentRequest) ProtoMessage() {} func (x *UpdateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +989,9 @@ type DeleteExperimentRequest struct { func (x *DeleteExperimentRequest) Reset() { *x = DeleteExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExperimentRequest) String() string { @@ -1024,7 +1002,7 @@ func (*DeleteExperimentRequest) ProtoMessage() {} func (x *DeleteExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1039,9 @@ type StartExperimentRequest struct { func (x *StartExperimentRequest) Reset() { *x = StartExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartExperimentRequest) String() string { @@ -1076,7 +1052,7 @@ func (*StartExperimentRequest) ProtoMessage() {} func (x *StartExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1089,9 @@ type StopExperimentRequest struct { func (x *StopExperimentRequest) Reset() { *x = StopExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopExperimentRequest) String() string { @@ -1128,7 +1102,7 @@ func (*StopExperimentRequest) ProtoMessage() {} func (x *StopExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1172,11 +1146,9 @@ type Experiment_Definition struct { func (x *Experiment_Definition) Reset() { *x = Experiment_Definition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Definition) String() string { @@ -1187,7 +1159,7 @@ func (*Experiment_Definition) ProtoMessage() {} func (x *Experiment_Definition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1222,9 @@ type Experiment_Result struct { func (x *Experiment_Result) Reset() { *x = Experiment_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result) String() string { @@ -1265,7 +1235,7 @@ func (*Experiment_Result) ProtoMessage() {} func (x *Experiment_Result) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1285,9 @@ type Experiment_Result_ConfidenceInterval struct { func (x *Experiment_Result_ConfidenceInterval) Reset() { *x = Experiment_Result_ConfidenceInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_ConfidenceInterval) String() string { @@ -1330,7 +1298,7 @@ func (*Experiment_Result_ConfidenceInterval) ProtoMessage() {} func (x *Experiment_Result_ConfidenceInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1399,11 +1367,9 @@ type Experiment_Result_Metric struct { func (x *Experiment_Result_Metric) Reset() { *x = Experiment_Result_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_Metric) String() string { @@ -1414,7 +1380,7 @@ func (*Experiment_Result_Metric) ProtoMessage() {} func (x *Experiment_Result_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1508,11 +1474,9 @@ type Experiment_Result_VersionMetrics struct { func (x *Experiment_Result_VersionMetrics) Reset() { *x = Experiment_Result_VersionMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_VersionMetrics) String() string { @@ -1523,7 +1487,7 @@ func (*Experiment_Result_VersionMetrics) ProtoMessage() {} func (x *Experiment_Result_VersionMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1542,9 @@ type VersionVariants_Variant struct { func (x *VersionVariants_Variant) Reset() { *x = VersionVariants_Variant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionVariants_Variant) String() string { @@ -1593,7 +1555,7 @@ func (*VersionVariants_Variant) ProtoMessage() {} func (x *VersionVariants_Variant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1648,11 +1610,9 @@ type RolloutConfig_RolloutStep struct { func (x *RolloutConfig_RolloutStep) Reset() { *x = RolloutConfig_RolloutStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutConfig_RolloutStep) String() string { @@ -1663,7 +1623,7 @@ func (*RolloutConfig_RolloutStep) ProtoMessage() {} func (x *RolloutConfig_RolloutStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2218,248 +2178,6 @@ func file_google_cloud_dialogflow_cx_v3_experiment_proto_init() { if File_google_cloud_dialogflow_cx_v3_experiment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Experiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VersionVariants); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VariantsHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RolloutConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RolloutState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StartExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StopExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Definition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_ConfidenceInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_VersionMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*VersionVariants_Variant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RolloutConfig_RolloutStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_experiment_proto_msgTypes[2].OneofWrappers = []any{ (*VariantsHistory_VersionVariants)(nil), } diff --git a/dialogflow/cx/apiv3/cxpb/flow.pb.go b/dialogflow/cx/apiv3/cxpb/flow.pb.go index 225d411b0877..6eede98b5c44 100755 --- a/dialogflow/cx/apiv3/cxpb/flow.pb.go +++ b/dialogflow/cx/apiv3/cxpb/flow.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/flow.proto @@ -232,11 +232,9 @@ type NluSettings struct { func (x *NluSettings) Reset() { *x = NluSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NluSettings) String() string { @@ -247,7 +245,7 @@ func (*NluSettings) ProtoMessage() {} func (x *NluSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +370,9 @@ type Flow struct { func (x *Flow) Reset() { *x = Flow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Flow) String() string { @@ -387,7 +383,7 @@ func (*Flow) ProtoMessage() {} func (x *Flow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +504,9 @@ type CreateFlowRequest struct { func (x *CreateFlowRequest) Reset() { *x = CreateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFlowRequest) String() string { @@ -523,7 +517,7 @@ func (*CreateFlowRequest) ProtoMessage() {} func (x *CreateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +579,9 @@ type DeleteFlowRequest struct { func (x *DeleteFlowRequest) Reset() { *x = DeleteFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFlowRequest) String() string { @@ -600,7 +592,7 @@ func (*DeleteFlowRequest) ProtoMessage() {} func (x *DeleteFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -662,11 +654,9 @@ type ListFlowsRequest struct { func (x *ListFlowsRequest) Reset() { *x = ListFlowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFlowsRequest) String() string { @@ -677,7 +667,7 @@ func (*ListFlowsRequest) ProtoMessage() {} func (x *ListFlowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +727,9 @@ type ListFlowsResponse struct { func (x *ListFlowsResponse) Reset() { *x = ListFlowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFlowsResponse) String() string { @@ -752,7 +740,7 @@ func (*ListFlowsResponse) ProtoMessage() {} func (x *ListFlowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +798,9 @@ type GetFlowRequest struct { func (x *GetFlowRequest) Reset() { *x = GetFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFlowRequest) String() string { @@ -825,7 +811,7 @@ func (*GetFlowRequest) ProtoMessage() {} func (x *GetFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -883,11 +869,9 @@ type UpdateFlowRequest struct { func (x *UpdateFlowRequest) Reset() { *x = UpdateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFlowRequest) String() string { @@ -898,7 +882,7 @@ func (*UpdateFlowRequest) ProtoMessage() {} func (x *UpdateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type TrainFlowRequest struct { func (x *TrainFlowRequest) Reset() { *x = TrainFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainFlowRequest) String() string { @@ -964,7 +946,7 @@ func (*TrainFlowRequest) ProtoMessage() {} func (x *TrainFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,11 +985,9 @@ type ValidateFlowRequest struct { func (x *ValidateFlowRequest) Reset() { *x = ValidateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateFlowRequest) String() string { @@ -1018,7 +998,7 @@ func (*ValidateFlowRequest) ProtoMessage() {} func (x *ValidateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1044,9 @@ type GetFlowValidationResultRequest struct { func (x *GetFlowValidationResultRequest) Reset() { *x = GetFlowValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFlowValidationResultRequest) String() string { @@ -1079,7 +1057,7 @@ func (*GetFlowValidationResultRequest) ProtoMessage() {} func (x *GetFlowValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1105,9 @@ type FlowValidationResult struct { func (x *FlowValidationResult) Reset() { *x = FlowValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowValidationResult) String() string { @@ -1142,7 +1118,7 @@ func (*FlowValidationResult) ProtoMessage() {} func (x *FlowValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,11 +1180,9 @@ type ImportFlowRequest struct { func (x *ImportFlowRequest) Reset() { *x = ImportFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFlowRequest) String() string { @@ -1219,7 +1193,7 @@ func (*ImportFlowRequest) ProtoMessage() {} func (x *ImportFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1318,11 +1292,9 @@ type FlowImportStrategy struct { func (x *FlowImportStrategy) Reset() { *x = FlowImportStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowImportStrategy) String() string { @@ -1333,7 +1305,7 @@ func (*FlowImportStrategy) ProtoMessage() {} func (x *FlowImportStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1370,11 +1342,9 @@ type ImportFlowResponse struct { func (x *ImportFlowResponse) Reset() { *x = ImportFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFlowResponse) String() string { @@ -1385,7 +1355,7 @@ func (*ImportFlowResponse) ProtoMessage() {} func (x *ImportFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1405,9 @@ type ExportFlowRequest struct { func (x *ExportFlowRequest) Reset() { *x = ExportFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFlowRequest) String() string { @@ -1450,7 +1418,7 @@ func (*ExportFlowRequest) ProtoMessage() {} func (x *ExportFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1504,11 +1472,9 @@ type ExportFlowResponse struct { func (x *ExportFlowResponse) Reset() { *x = ExportFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFlowResponse) String() string { @@ -1519,7 +1485,7 @@ func (*ExportFlowResponse) ProtoMessage() {} func (x *ExportFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1564,9 @@ type Flow_MultiLanguageSettings struct { func (x *Flow_MultiLanguageSettings) Reset() { *x = Flow_MultiLanguageSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Flow_MultiLanguageSettings) String() string { @@ -1613,7 +1577,7 @@ func (*Flow_MultiLanguageSettings) ProtoMessage() {} func (x *Flow_MultiLanguageSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2181,224 +2145,6 @@ func file_google_cloud_dialogflow_cx_v3_flow_proto_init() { file_google_cloud_dialogflow_cx_v3_import_strategy_proto_init() file_google_cloud_dialogflow_cx_v3_page_proto_init() file_google_cloud_dialogflow_cx_v3_validation_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NluSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Flow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListFlowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListFlowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TrainFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ValidateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetFlowValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FlowValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FlowImportStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExportFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExportFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Flow_MultiLanguageSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_flow_proto_msgTypes[12].OneofWrappers = []any{ (*ImportFlowRequest_FlowUri)(nil), (*ImportFlowRequest_FlowContent)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/fulfillment.pb.go b/dialogflow/cx/apiv3/cxpb/fulfillment.pb.go index ec1e122e23f8..7c7265abe5b4 100755 --- a/dialogflow/cx/apiv3/cxpb/fulfillment.pb.go +++ b/dialogflow/cx/apiv3/cxpb/fulfillment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -98,11 +98,9 @@ type Fulfillment struct { func (x *Fulfillment) Reset() { *x = Fulfillment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment) String() string { @@ -113,7 +111,7 @@ func (*Fulfillment) ProtoMessage() {} func (x *Fulfillment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +196,9 @@ type Fulfillment_SetParameterAction struct { func (x *Fulfillment_SetParameterAction) Reset() { *x = Fulfillment_SetParameterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_SetParameterAction) String() string { @@ -213,7 +209,7 @@ func (*Fulfillment_SetParameterAction) ProtoMessage() {} func (x *Fulfillment_SetParameterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +251,9 @@ type Fulfillment_ConditionalCases struct { func (x *Fulfillment_ConditionalCases) Reset() { *x = Fulfillment_ConditionalCases{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases) String() string { @@ -270,7 +264,7 @@ func (*Fulfillment_ConditionalCases) ProtoMessage() {} func (x *Fulfillment_ConditionalCases) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +307,9 @@ type Fulfillment_ConditionalCases_Case struct { func (x *Fulfillment_ConditionalCases_Case) Reset() { *x = Fulfillment_ConditionalCases_Case{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases_Case) String() string { @@ -328,7 +320,7 @@ func (*Fulfillment_ConditionalCases_Case) ProtoMessage() {} func (x *Fulfillment_ConditionalCases_Case) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +366,9 @@ type Fulfillment_ConditionalCases_Case_CaseContent struct { func (x *Fulfillment_ConditionalCases_Case_CaseContent) Reset() { *x = Fulfillment_ConditionalCases_Case_CaseContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases_Case_CaseContent) String() string { @@ -389,7 +379,7 @@ func (*Fulfillment_ConditionalCases_Case_CaseContent) ProtoMessage() {} func (x *Fulfillment_ConditionalCases_Case_CaseContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,68 +589,6 @@ func file_google_cloud_dialogflow_cx_v3_fulfillment_proto_init() { } file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_init() file_google_cloud_dialogflow_cx_v3_response_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_SetParameterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases_Case); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases_Case_CaseContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_fulfillment_proto_msgTypes[4].OneofWrappers = []any{ (*Fulfillment_ConditionalCases_Case_CaseContent_Message)(nil), (*Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/gcs.pb.go b/dialogflow/cx/apiv3/cxpb/gcs.pb.go index 98359be1358e..edfd7d8010c6 100755 --- a/dialogflow/cx/apiv3/cxpb/gcs.pb.go +++ b/dialogflow/cx/apiv3/cxpb/gcs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/gcs.proto @@ -51,11 +51,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_gcs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_gcs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -66,7 +64,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_gcs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,20 +141,6 @@ func file_google_cloud_dialogflow_cx_v3_gcs_proto_init() { if File_google_cloud_dialogflow_cx_v3_gcs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_gcs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/generative_settings.pb.go b/dialogflow/cx/apiv3/cxpb/generative_settings.pb.go index dfb9eaa8499d..5054dec21fd6 100755 --- a/dialogflow/cx/apiv3/cxpb/generative_settings.pb.go +++ b/dialogflow/cx/apiv3/cxpb/generative_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/generative_settings.proto @@ -57,11 +57,9 @@ type GenerativeSettings struct { func (x *GenerativeSettings) Reset() { *x = GenerativeSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings) String() string { @@ -72,7 +70,7 @@ func (*GenerativeSettings) ProtoMessage() {} func (x *GenerativeSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type GenerativeSettings_FallbackSettings struct { func (x *GenerativeSettings_FallbackSettings) Reset() { *x = GenerativeSettings_FallbackSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_FallbackSettings) String() string { @@ -152,7 +148,7 @@ func (*GenerativeSettings_FallbackSettings) ProtoMessage() {} func (x *GenerativeSettings_FallbackSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +207,9 @@ type GenerativeSettings_KnowledgeConnectorSettings struct { func (x *GenerativeSettings_KnowledgeConnectorSettings) Reset() { *x = GenerativeSettings_KnowledgeConnectorSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_KnowledgeConnectorSettings) String() string { @@ -226,7 +220,7 @@ func (*GenerativeSettings_KnowledgeConnectorSettings) ProtoMessage() {} func (x *GenerativeSettings_KnowledgeConnectorSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +296,9 @@ type GenerativeSettings_FallbackSettings_PromptTemplate struct { func (x *GenerativeSettings_FallbackSettings_PromptTemplate) Reset() { *x = GenerativeSettings_FallbackSettings_PromptTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_FallbackSettings_PromptTemplate) String() string { @@ -317,7 +309,7 @@ func (*GenerativeSettings_FallbackSettings_PromptTemplate) ProtoMessage() {} func (x *GenerativeSettings_FallbackSettings_PromptTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,56 +483,6 @@ func file_google_cloud_dialogflow_cx_v3_generative_settings_proto_init() { return } file_google_cloud_dialogflow_cx_v3_safety_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_FallbackSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_KnowledgeConnectorSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generative_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_FallbackSettings_PromptTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/generator.pb.go b/dialogflow/cx/apiv3/cxpb/generator.pb.go index 1c34a34a88da..8f99eb368f51 100755 --- a/dialogflow/cx/apiv3/cxpb/generator.pb.go +++ b/dialogflow/cx/apiv3/cxpb/generator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/generator.proto @@ -73,11 +73,9 @@ type Generator struct { func (x *Generator) Reset() { *x = Generator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator) String() string { @@ -88,7 +86,7 @@ func (*Generator) ProtoMessage() {} func (x *Generator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type Phrase struct { func (x *Phrase) Reset() { *x = Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Phrase) String() string { @@ -165,7 +161,7 @@ func (*Phrase) ProtoMessage() {} func (x *Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +204,9 @@ type ListGeneratorsRequest struct { func (x *ListGeneratorsRequest) Reset() { *x = ListGeneratorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsRequest) String() string { @@ -223,7 +217,7 @@ func (*ListGeneratorsRequest) ProtoMessage() {} func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type ListGeneratorsResponse struct { func (x *ListGeneratorsResponse) Reset() { *x = ListGeneratorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsResponse) String() string { @@ -298,7 +290,7 @@ func (*ListGeneratorsResponse) ProtoMessage() {} func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +336,9 @@ type GetGeneratorRequest struct { func (x *GetGeneratorRequest) Reset() { *x = GetGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGeneratorRequest) String() string { @@ -359,7 +349,7 @@ func (*GetGeneratorRequest) ProtoMessage() {} func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +398,9 @@ type CreateGeneratorRequest struct { func (x *CreateGeneratorRequest) Reset() { *x = CreateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGeneratorRequest) String() string { @@ -423,7 +411,7 @@ func (*CreateGeneratorRequest) ProtoMessage() {} func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +465,9 @@ type UpdateGeneratorRequest struct { func (x *UpdateGeneratorRequest) Reset() { *x = UpdateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGeneratorRequest) String() string { @@ -492,7 +478,7 @@ func (*UpdateGeneratorRequest) ProtoMessage() {} func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +538,9 @@ type DeleteGeneratorRequest struct { func (x *DeleteGeneratorRequest) Reset() { *x = DeleteGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGeneratorRequest) String() string { @@ -567,7 +551,7 @@ func (*DeleteGeneratorRequest) ProtoMessage() {} func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +594,9 @@ type Generator_Placeholder struct { func (x *Generator_Placeholder) Reset() { *x = Generator_Placeholder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator_Placeholder) String() string { @@ -625,7 +607,7 @@ func (*Generator_Placeholder) ProtoMessage() {} func (x *Generator_Placeholder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,11 +666,9 @@ type Generator_ModelParameter struct { func (x *Generator_ModelParameter) Reset() { *x = Generator_ModelParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator_ModelParameter) String() string { @@ -699,7 +679,7 @@ func (*Generator_ModelParameter) ProtoMessage() {} func (x *Generator_ModelParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1012,128 +992,6 @@ func file_google_cloud_dialogflow_cx_v3_generator_proto_init() { if File_google_cloud_dialogflow_cx_v3_generator_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Generator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Generator_Placeholder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Generator_ModelParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_generator_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/import_strategy.pb.go b/dialogflow/cx/apiv3/cxpb/import_strategy.pb.go index 13ef65651002..286c36f1a2ef 100755 --- a/dialogflow/cx/apiv3/cxpb/import_strategy.pb.go +++ b/dialogflow/cx/apiv3/cxpb/import_strategy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/import_strategy.proto diff --git a/dialogflow/cx/apiv3/cxpb/inline.pb.go b/dialogflow/cx/apiv3/cxpb/inline.pb.go index 5dd4c94e6d02..09f719c7835f 100755 --- a/dialogflow/cx/apiv3/cxpb/inline.pb.go +++ b/dialogflow/cx/apiv3/cxpb/inline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/inline.proto @@ -50,11 +50,9 @@ type InlineDestination struct { func (x *InlineDestination) Reset() { *x = InlineDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineDestination) String() string { @@ -65,7 +63,7 @@ func (*InlineDestination) ProtoMessage() {} func (x *InlineDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100,11 +98,9 @@ type InlineSource struct { func (x *InlineSource) Reset() { *x = InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineSource) String() string { @@ -115,7 +111,7 @@ func (*InlineSource) ProtoMessage() {} func (x *InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,32 +193,6 @@ func file_google_cloud_dialogflow_cx_v3_inline_proto_init() { if File_google_cloud_dialogflow_cx_v3_inline_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InlineDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_inline_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/intent.pb.go b/dialogflow/cx/apiv3/cxpb/intent.pb.go index 29688d48d369..131a3b5ff9c5 100755 --- a/dialogflow/cx/apiv3/cxpb/intent.pb.go +++ b/dialogflow/cx/apiv3/cxpb/intent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/intent.proto @@ -296,11 +296,9 @@ type Intent struct { func (x *Intent) Reset() { *x = Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent) String() string { @@ -311,7 +309,7 @@ func (*Intent) ProtoMessage() {} func (x *Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +412,9 @@ type ListIntentsRequest struct { func (x *ListIntentsRequest) Reset() { *x = ListIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsRequest) String() string { @@ -429,7 +425,7 @@ func (*ListIntentsRequest) ProtoMessage() {} func (x *ListIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +492,9 @@ type ListIntentsResponse struct { func (x *ListIntentsResponse) Reset() { *x = ListIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsResponse) String() string { @@ -511,7 +505,7 @@ func (*ListIntentsResponse) ProtoMessage() {} func (x *ListIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +560,9 @@ type GetIntentRequest struct { func (x *GetIntentRequest) Reset() { *x = GetIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIntentRequest) String() string { @@ -581,7 +573,7 @@ func (*GetIntentRequest) ProtoMessage() {} func (x *GetIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +628,9 @@ type CreateIntentRequest struct { func (x *CreateIntentRequest) Reset() { *x = CreateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIntentRequest) String() string { @@ -651,7 +641,7 @@ func (*CreateIntentRequest) ProtoMessage() {} func (x *CreateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +703,9 @@ type UpdateIntentRequest struct { func (x *UpdateIntentRequest) Reset() { *x = UpdateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIntentRequest) String() string { @@ -728,7 +716,7 @@ func (*UpdateIntentRequest) ProtoMessage() {} func (x *UpdateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +767,9 @@ type DeleteIntentRequest struct { func (x *DeleteIntentRequest) Reset() { *x = DeleteIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIntentRequest) String() string { @@ -794,7 +780,7 @@ func (*DeleteIntentRequest) ProtoMessage() {} func (x *DeleteIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +825,9 @@ type ImportIntentsRequest struct { func (x *ImportIntentsRequest) Reset() { *x = ImportIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsRequest) String() string { @@ -854,7 +838,7 @@ func (*ImportIntentsRequest) ProtoMessage() {} func (x *ImportIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type ImportIntentsResponse struct { func (x *ImportIntentsResponse) Reset() { *x = ImportIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsResponse) String() string { @@ -964,7 +946,7 @@ func (*ImportIntentsResponse) ProtoMessage() {} func (x *ImportIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +986,9 @@ type ImportIntentsMetadata struct { func (x *ImportIntentsMetadata) Reset() { *x = ImportIntentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsMetadata) String() string { @@ -1019,7 +999,7 @@ func (*ImportIntentsMetadata) ProtoMessage() {} func (x *ImportIntentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1042,9 @@ type ExportIntentsRequest struct { func (x *ExportIntentsRequest) Reset() { *x = ExportIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsRequest) String() string { @@ -1077,7 +1055,7 @@ func (*ExportIntentsRequest) ProtoMessage() {} func (x *ExportIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1157,9 @@ type ExportIntentsResponse struct { func (x *ExportIntentsResponse) Reset() { *x = ExportIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsResponse) String() string { @@ -1194,7 +1170,7 @@ func (*ExportIntentsResponse) ProtoMessage() {} func (x *ExportIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1239,9 @@ type ExportIntentsMetadata struct { func (x *ExportIntentsMetadata) Reset() { *x = ExportIntentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsMetadata) String() string { @@ -1278,7 +1252,7 @@ func (*ExportIntentsMetadata) ProtoMessage() {} func (x *ExportIntentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,11 +1302,9 @@ type Intent_TrainingPhrase struct { func (x *Intent_TrainingPhrase) Reset() { *x = Intent_TrainingPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase) String() string { @@ -1343,7 +1315,7 @@ func (*Intent_TrainingPhrase) ProtoMessage() {} func (x *Intent_TrainingPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,11 +1383,9 @@ type Intent_Parameter struct { func (x *Intent_Parameter) Reset() { *x = Intent_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Parameter) String() string { @@ -1426,7 +1396,7 @@ func (*Intent_Parameter) ProtoMessage() {} func (x *Intent_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1485,11 +1455,9 @@ type Intent_TrainingPhrase_Part struct { func (x *Intent_TrainingPhrase_Part) Reset() { *x = Intent_TrainingPhrase_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase_Part) String() string { @@ -1500,7 +1468,7 @@ func (*Intent_TrainingPhrase_Part) ProtoMessage() {} func (x *Intent_TrainingPhrase_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1545,11 +1513,9 @@ type ImportIntentsResponse_ConflictingResources struct { func (x *ImportIntentsResponse_ConflictingResources) Reset() { *x = ImportIntentsResponse_ConflictingResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsResponse_ConflictingResources) String() string { @@ -1560,7 +1526,7 @@ func (*ImportIntentsResponse_ConflictingResources) ProtoMessage() {} func (x *ImportIntentsResponse_ConflictingResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2022,212 +1988,6 @@ func file_google_cloud_dialogflow_cx_v3_intent_proto_init() { return } file_google_cloud_dialogflow_cx_v3_inline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsResponse_ConflictingResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_intent_proto_msgTypes[7].OneofWrappers = []any{ (*ImportIntentsRequest_IntentsUri)(nil), (*ImportIntentsRequest_IntentsContent)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/page.pb.go b/dialogflow/cx/apiv3/cxpb/page.pb.go index 7780e707e533..9b876827b24b 100755 --- a/dialogflow/cx/apiv3/cxpb/page.pb.go +++ b/dialogflow/cx/apiv3/cxpb/page.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/page.proto @@ -135,11 +135,9 @@ type Page struct { func (x *Page) Reset() { *x = Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Page) String() string { @@ -150,7 +148,7 @@ func (*Page) ProtoMessage() {} func (x *Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +250,9 @@ type Form struct { func (x *Form) Reset() { *x = Form{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form) String() string { @@ -267,7 +263,7 @@ func (*Form) ProtoMessage() {} func (x *Form) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +329,9 @@ type EventHandler struct { func (x *EventHandler) Reset() { *x = EventHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventHandler) String() string { @@ -348,7 +342,7 @@ func (*EventHandler) ProtoMessage() {} func (x *EventHandler) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +484,9 @@ type TransitionRoute struct { func (x *TransitionRoute) Reset() { *x = TransitionRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRoute) String() string { @@ -505,7 +497,7 @@ func (*TransitionRoute) ProtoMessage() {} func (x *TransitionRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +632,9 @@ type ListPagesRequest struct { func (x *ListPagesRequest) Reset() { *x = ListPagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPagesRequest) String() string { @@ -655,7 +645,7 @@ func (*ListPagesRequest) ProtoMessage() {} func (x *ListPagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +705,9 @@ type ListPagesResponse struct { func (x *ListPagesResponse) Reset() { *x = ListPagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPagesResponse) String() string { @@ -730,7 +718,7 @@ func (*ListPagesResponse) ProtoMessage() {} func (x *ListPagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +784,9 @@ type GetPageRequest struct { func (x *GetPageRequest) Reset() { *x = GetPageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPageRequest) String() string { @@ -811,7 +797,7 @@ func (*GetPageRequest) ProtoMessage() {} func (x *GetPageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -878,11 +864,9 @@ type CreatePageRequest struct { func (x *CreatePageRequest) Reset() { *x = CreatePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePageRequest) String() string { @@ -893,7 +877,7 @@ func (*CreatePageRequest) ProtoMessage() {} func (x *CreatePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +950,9 @@ type UpdatePageRequest struct { func (x *UpdatePageRequest) Reset() { *x = UpdatePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePageRequest) String() string { @@ -981,7 +963,7 @@ func (*UpdatePageRequest) ProtoMessage() {} func (x *UpdatePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1025,9 @@ type DeletePageRequest struct { func (x *DeletePageRequest) Reset() { *x = DeletePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePageRequest) String() string { @@ -1058,7 +1038,7 @@ func (*DeletePageRequest) ProtoMessage() {} func (x *DeletePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1101,9 @@ type KnowledgeConnectorSettings struct { func (x *KnowledgeConnectorSettings) Reset() { *x = KnowledgeConnectorSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeConnectorSettings) String() string { @@ -1136,7 +1114,7 @@ func (*KnowledgeConnectorSettings) ProtoMessage() {} func (x *KnowledgeConnectorSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1257,11 +1235,9 @@ type Form_Parameter struct { func (x *Form_Parameter) Reset() { *x = Form_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form_Parameter) String() string { @@ -1272,7 +1248,7 @@ func (*Form_Parameter) ProtoMessage() {} func (x *Form_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1389,11 +1365,9 @@ type Form_Parameter_FillBehavior struct { func (x *Form_Parameter_FillBehavior) Reset() { *x = Form_Parameter_FillBehavior{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form_Parameter_FillBehavior) String() string { @@ -1404,7 +1378,7 @@ func (*Form_Parameter_FillBehavior) ProtoMessage() {} func (x *Form_Parameter_FillBehavior) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,164 +1829,6 @@ func file_google_cloud_dialogflow_cx_v3_page_proto_init() { file_google_cloud_dialogflow_cx_v3_advanced_settings_proto_init() file_google_cloud_dialogflow_cx_v3_data_store_connection_proto_init() file_google_cloud_dialogflow_cx_v3_fulfillment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Form); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListPagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetPageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeletePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeConnectorSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Form_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Form_Parameter_FillBehavior); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_page_proto_msgTypes[2].OneofWrappers = []any{ (*EventHandler_TargetPage)(nil), (*EventHandler_TargetFlow)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/response_message.pb.go b/dialogflow/cx/apiv3/cxpb/response_message.pb.go index 7c66f95f589e..03a2f2677f6f 100755 --- a/dialogflow/cx/apiv3/cxpb/response_message.pb.go +++ b/dialogflow/cx/apiv3/cxpb/response_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/response_message.proto @@ -148,11 +148,9 @@ type ResponseMessage struct { func (x *ResponseMessage) Reset() { *x = ResponseMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage) String() string { @@ -163,7 +161,7 @@ func (*ResponseMessage) ProtoMessage() {} func (x *ResponseMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +374,9 @@ type ResponseMessage_Text struct { func (x *ResponseMessage_Text) Reset() { *x = ResponseMessage_Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_Text) String() string { @@ -391,7 +387,7 @@ func (*ResponseMessage_Text) ProtoMessage() {} func (x *ResponseMessage_Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +443,9 @@ type ResponseMessage_LiveAgentHandoff struct { func (x *ResponseMessage_LiveAgentHandoff) Reset() { *x = ResponseMessage_LiveAgentHandoff{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_LiveAgentHandoff) String() string { @@ -462,7 +456,7 @@ func (*ResponseMessage_LiveAgentHandoff) ProtoMessage() {} func (x *ResponseMessage_LiveAgentHandoff) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +506,9 @@ type ResponseMessage_ConversationSuccess struct { func (x *ResponseMessage_ConversationSuccess) Reset() { *x = ResponseMessage_ConversationSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_ConversationSuccess) String() string { @@ -527,7 +519,7 @@ func (*ResponseMessage_ConversationSuccess) ProtoMessage() {} func (x *ResponseMessage_ConversationSuccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +563,9 @@ type ResponseMessage_OutputAudioText struct { func (x *ResponseMessage_OutputAudioText) Reset() { *x = ResponseMessage_OutputAudioText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_OutputAudioText) String() string { @@ -586,7 +576,7 @@ func (*ResponseMessage_OutputAudioText) ProtoMessage() {} func (x *ResponseMessage_OutputAudioText) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +649,9 @@ type ResponseMessage_EndInteraction struct { func (x *ResponseMessage_EndInteraction) Reset() { *x = ResponseMessage_EndInteraction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_EndInteraction) String() string { @@ -674,7 +662,7 @@ func (*ResponseMessage_EndInteraction) ProtoMessage() {} func (x *ResponseMessage_EndInteraction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +694,9 @@ type ResponseMessage_PlayAudio struct { func (x *ResponseMessage_PlayAudio) Reset() { *x = ResponseMessage_PlayAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_PlayAudio) String() string { @@ -721,7 +707,7 @@ func (*ResponseMessage_PlayAudio) ProtoMessage() {} func (x *ResponseMessage_PlayAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +754,9 @@ type ResponseMessage_MixedAudio struct { func (x *ResponseMessage_MixedAudio) Reset() { *x = ResponseMessage_MixedAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio) String() string { @@ -783,7 +767,7 @@ func (*ResponseMessage_MixedAudio) ProtoMessage() {} func (x *ResponseMessage_MixedAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +806,9 @@ type ResponseMessage_TelephonyTransferCall struct { func (x *ResponseMessage_TelephonyTransferCall) Reset() { *x = ResponseMessage_TelephonyTransferCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_TelephonyTransferCall) String() string { @@ -837,7 +819,7 @@ func (*ResponseMessage_TelephonyTransferCall) ProtoMessage() {} func (x *ResponseMessage_TelephonyTransferCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +874,9 @@ type ResponseMessage_KnowledgeInfoCard struct { func (x *ResponseMessage_KnowledgeInfoCard) Reset() { *x = ResponseMessage_KnowledgeInfoCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_KnowledgeInfoCard) String() string { @@ -907,7 +887,7 @@ func (*ResponseMessage_KnowledgeInfoCard) ProtoMessage() {} func (x *ResponseMessage_KnowledgeInfoCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +923,9 @@ type ResponseMessage_MixedAudio_Segment struct { func (x *ResponseMessage_MixedAudio_Segment) Reset() { *x = ResponseMessage_MixedAudio_Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio_Segment) String() string { @@ -958,7 +936,7 @@ func (*ResponseMessage_MixedAudio_Segment) ProtoMessage() {} func (x *ResponseMessage_MixedAudio_Segment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,140 +1216,6 @@ func file_google_cloud_dialogflow_cx_v3_response_message_proto_init() { if File_google_cloud_dialogflow_cx_v3_response_message_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_LiveAgentHandoff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_ConversationSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_OutputAudioText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_EndInteraction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_PlayAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_TelephonyTransferCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_KnowledgeInfoCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio_Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_response_message_proto_msgTypes[0].OneofWrappers = []any{ (*ResponseMessage_Text_)(nil), (*ResponseMessage_Payload)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/safety_settings.pb.go b/dialogflow/cx/apiv3/cxpb/safety_settings.pb.go index 90f3ca9a34c3..cc8f60609365 100755 --- a/dialogflow/cx/apiv3/cxpb/safety_settings.pb.go +++ b/dialogflow/cx/apiv3/cxpb/safety_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/safety_settings.proto @@ -48,11 +48,9 @@ type SafetySettings struct { func (x *SafetySettings) Reset() { *x = SafetySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySettings) String() string { @@ -63,7 +61,7 @@ func (*SafetySettings) ProtoMessage() {} func (x *SafetySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99,11 +97,9 @@ type SafetySettings_Phrase struct { func (x *SafetySettings_Phrase) Reset() { *x = SafetySettings_Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySettings_Phrase) String() string { @@ -114,7 +110,7 @@ func (*SafetySettings_Phrase) ProtoMessage() {} func (x *SafetySettings_Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,32 +207,6 @@ func file_google_cloud_dialogflow_cx_v3_safety_settings_proto_init() { if File_google_cloud_dialogflow_cx_v3_safety_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SafetySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_safety_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SafetySettings_Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/security_settings.pb.go b/dialogflow/cx/apiv3/cxpb/security_settings.pb.go index 51a8f6331ee1..d651bef3b27e 100755 --- a/dialogflow/cx/apiv3/cxpb/security_settings.pb.go +++ b/dialogflow/cx/apiv3/cxpb/security_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/security_settings.proto @@ -316,11 +316,9 @@ type GetSecuritySettingsRequest struct { func (x *GetSecuritySettingsRequest) Reset() { *x = GetSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecuritySettingsRequest) String() string { @@ -331,7 +329,7 @@ func (*GetSecuritySettingsRequest) ProtoMessage() {} func (x *GetSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +368,9 @@ type UpdateSecuritySettingsRequest struct { func (x *UpdateSecuritySettingsRequest) Reset() { *x = UpdateSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecuritySettingsRequest) String() string { @@ -385,7 +381,7 @@ func (*UpdateSecuritySettingsRequest) ProtoMessage() {} func (x *UpdateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +428,9 @@ type ListSecuritySettingsRequest struct { func (x *ListSecuritySettingsRequest) Reset() { *x = ListSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecuritySettingsRequest) String() string { @@ -447,7 +441,7 @@ func (*ListSecuritySettingsRequest) ProtoMessage() {} func (x *ListSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +492,9 @@ type ListSecuritySettingsResponse struct { func (x *ListSecuritySettingsResponse) Reset() { *x = ListSecuritySettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecuritySettingsResponse) String() string { @@ -513,7 +505,7 @@ func (*ListSecuritySettingsResponse) ProtoMessage() {} func (x *ListSecuritySettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +550,9 @@ type CreateSecuritySettingsRequest struct { func (x *CreateSecuritySettingsRequest) Reset() { *x = CreateSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecuritySettingsRequest) String() string { @@ -573,7 +563,7 @@ func (*CreateSecuritySettingsRequest) ProtoMessage() {} func (x *CreateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +607,9 @@ type DeleteSecuritySettingsRequest struct { func (x *DeleteSecuritySettingsRequest) Reset() { *x = DeleteSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecuritySettingsRequest) String() string { @@ -632,7 +620,7 @@ func (*DeleteSecuritySettingsRequest) ProtoMessage() {} func (x *DeleteSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +744,9 @@ type SecuritySettings struct { func (x *SecuritySettings) Reset() { *x = SecuritySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings) String() string { @@ -771,7 +757,7 @@ func (*SecuritySettings) ProtoMessage() {} func (x *SecuritySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -924,11 +910,9 @@ type SecuritySettings_AudioExportSettings struct { func (x *SecuritySettings_AudioExportSettings) Reset() { *x = SecuritySettings_AudioExportSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings_AudioExportSettings) String() string { @@ -939,7 +923,7 @@ func (*SecuritySettings_AudioExportSettings) ProtoMessage() {} func (x *SecuritySettings_AudioExportSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,11 +987,9 @@ type SecuritySettings_InsightsExportSettings struct { func (x *SecuritySettings_InsightsExportSettings) Reset() { *x = SecuritySettings_InsightsExportSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings_InsightsExportSettings) String() string { @@ -1018,7 +1000,7 @@ func (*SecuritySettings_InsightsExportSettings) ProtoMessage() {} func (x *SecuritySettings_InsightsExportSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,116 +1408,6 @@ func file_google_cloud_dialogflow_cx_v3_security_settings_proto_init() { if File_google_cloud_dialogflow_cx_v3_security_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSecuritySettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings_AudioExportSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings_InsightsExportSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_security_settings_proto_msgTypes[6].OneofWrappers = []any{ (*SecuritySettings_RetentionWindowDays)(nil), (*SecuritySettings_RetentionStrategy_)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/session.pb.go b/dialogflow/cx/apiv3/cxpb/session.pb.go index 79210e5f1e41..6461a0fd1d2c 100755 --- a/dialogflow/cx/apiv3/cxpb/session.pb.go +++ b/dialogflow/cx/apiv3/cxpb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/session.proto @@ -422,11 +422,9 @@ type AnswerFeedback struct { func (x *AnswerFeedback) Reset() { *x = AnswerFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback) String() string { @@ -437,7 +435,7 @@ func (*AnswerFeedback) ProtoMessage() {} func (x *AnswerFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +491,9 @@ type SubmitAnswerFeedbackRequest struct { func (x *SubmitAnswerFeedbackRequest) Reset() { *x = SubmitAnswerFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitAnswerFeedbackRequest) String() string { @@ -508,7 +504,7 @@ func (*SubmitAnswerFeedbackRequest) ProtoMessage() {} func (x *SubmitAnswerFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +581,9 @@ type DetectIntentRequest struct { func (x *DetectIntentRequest) Reset() { *x = DetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentRequest) String() string { @@ -600,7 +594,7 @@ func (*DetectIntentRequest) ProtoMessage() {} func (x *DetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +672,9 @@ type DetectIntentResponse struct { func (x *DetectIntentResponse) Reset() { *x = DetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentResponse) String() string { @@ -693,7 +685,7 @@ func (*DetectIntentResponse) ProtoMessage() {} func (x *DetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,11 +817,9 @@ type StreamingDetectIntentRequest struct { func (x *StreamingDetectIntentRequest) Reset() { *x = StreamingDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentRequest) String() string { @@ -840,7 +830,7 @@ func (*StreamingDetectIntentRequest) ProtoMessage() {} func (x *StreamingDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +944,9 @@ type CloudConversationDebuggingInfo struct { func (x *CloudConversationDebuggingInfo) Reset() { *x = CloudConversationDebuggingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudConversationDebuggingInfo) String() string { @@ -969,7 +957,7 @@ func (*CloudConversationDebuggingInfo) ProtoMessage() {} func (x *CloudConversationDebuggingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1145,9 @@ type StreamingDetectIntentResponse struct { func (x *StreamingDetectIntentResponse) Reset() { *x = StreamingDetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentResponse) String() string { @@ -1172,7 +1158,7 @@ func (*StreamingDetectIntentResponse) ProtoMessage() {} func (x *StreamingDetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1303,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -1332,7 +1316,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1544,11 +1528,9 @@ type QueryParameters struct { func (x *QueryParameters) Reset() { *x = QueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryParameters) String() string { @@ -1559,7 +1541,7 @@ func (*QueryParameters) ProtoMessage() {} func (x *QueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1675,9 @@ type SearchConfig struct { func (x *SearchConfig) Reset() { *x = SearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchConfig) String() string { @@ -1708,7 +1688,7 @@ func (*SearchConfig) ProtoMessage() {} func (x *SearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1735,9 @@ type BoostSpec struct { func (x *BoostSpec) Reset() { *x = BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec) String() string { @@ -1770,7 +1748,7 @@ func (*BoostSpec) ProtoMessage() {} func (x *BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1809,11 +1787,9 @@ type BoostSpecs struct { func (x *BoostSpecs) Reset() { *x = BoostSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpecs) String() string { @@ -1824,7 +1800,7 @@ func (*BoostSpecs) ProtoMessage() {} func (x *BoostSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,11 +1848,9 @@ type FilterSpecs struct { func (x *FilterSpecs) Reset() { *x = FilterSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilterSpecs) String() string { @@ -1887,7 +1861,7 @@ func (*FilterSpecs) ProtoMessage() {} func (x *FilterSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1953,11 +1927,9 @@ type QueryInput struct { func (x *QueryInput) Reset() { *x = QueryInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryInput) String() string { @@ -1968,7 +1940,7 @@ func (*QueryInput) ProtoMessage() {} func (x *QueryInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2199,11 +2171,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -2214,7 +2184,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2465,11 +2435,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -2480,7 +2448,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2517,11 +2485,9 @@ type IntentInput struct { func (x *IntentInput) Reset() { *x = IntentInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentInput) String() string { @@ -2532,7 +2498,7 @@ func (*IntentInput) ProtoMessage() {} func (x *IntentInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2577,11 +2543,9 @@ type AudioInput struct { func (x *AudioInput) Reset() { *x = AudioInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioInput) String() string { @@ -2592,7 +2556,7 @@ func (*AudioInput) ProtoMessage() {} func (x *AudioInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2633,11 +2597,9 @@ type EventInput struct { func (x *EventInput) Reset() { *x = EventInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventInput) String() string { @@ -2648,7 +2610,7 @@ func (*EventInput) ProtoMessage() {} func (x *EventInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2684,11 +2646,9 @@ type DtmfInput struct { func (x *DtmfInput) Reset() { *x = DtmfInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DtmfInput) String() string { @@ -2699,7 +2659,7 @@ func (*DtmfInput) ProtoMessage() {} func (x *DtmfInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2776,11 +2736,9 @@ type Match struct { func (x *Match) Reset() { *x = Match{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Match) String() string { @@ -2791,7 +2749,7 @@ func (*Match) ProtoMessage() {} func (x *Match) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2878,11 +2836,9 @@ type MatchIntentRequest struct { func (x *MatchIntentRequest) Reset() { *x = MatchIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchIntentRequest) String() string { @@ -2893,7 +2849,7 @@ func (*MatchIntentRequest) ProtoMessage() {} func (x *MatchIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2962,11 +2918,9 @@ type MatchIntentResponse struct { func (x *MatchIntentResponse) Reset() { *x = MatchIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchIntentResponse) String() string { @@ -2977,7 +2931,7 @@ func (*MatchIntentResponse) ProtoMessage() {} func (x *MatchIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3096,11 +3050,9 @@ type FulfillIntentRequest struct { func (x *FulfillIntentRequest) Reset() { *x = FulfillIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillIntentRequest) String() string { @@ -3111,7 +3063,7 @@ func (*FulfillIntentRequest) ProtoMessage() {} func (x *FulfillIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3176,11 +3128,9 @@ type FulfillIntentResponse struct { func (x *FulfillIntentResponse) Reset() { *x = FulfillIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillIntentResponse) String() string { @@ -3191,7 +3141,7 @@ func (*FulfillIntentResponse) ProtoMessage() {} func (x *FulfillIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3253,11 +3203,9 @@ type SentimentAnalysisResult struct { func (x *SentimentAnalysisResult) Reset() { *x = SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisResult) String() string { @@ -3268,7 +3216,7 @@ func (*SentimentAnalysisResult) ProtoMessage() {} func (x *SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3314,11 +3262,9 @@ type AnswerFeedback_RatingReason struct { func (x *AnswerFeedback_RatingReason) Reset() { *x = AnswerFeedback_RatingReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback_RatingReason) String() string { @@ -3329,7 +3275,7 @@ func (*AnswerFeedback_RatingReason) ProtoMessage() {} func (x *AnswerFeedback_RatingReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3399,11 +3345,9 @@ type BoostSpec_ConditionBoostSpec struct { func (x *BoostSpec_ConditionBoostSpec) Reset() { *x = BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec) String() string { @@ -3414,7 +3358,7 @@ func (*BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3478,11 +3422,9 @@ type BoostSpec_ConditionBoostSpec_BoostControlSpec struct { func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -3493,7 +3435,7 @@ func (*BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoMessage() {} func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3558,11 +3500,9 @@ type BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint struct { func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -3573,7 +3513,7 @@ func (*BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoMessage( func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4670,368 +4610,6 @@ func file_google_cloud_dialogflow_cx_v3_session_proto_init() { file_google_cloud_dialogflow_cx_v3_page_proto_init() file_google_cloud_dialogflow_cx_v3_response_message_proto_init() file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SubmitAnswerFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CloudConversationDebuggingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*QueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FilterSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*QueryInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*IntentInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AudioInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*EventInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DtmfInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Match); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*MatchIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*MatchIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*FulfillIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FulfillIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback_RatingReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_session_proto_msgTypes[6].OneofWrappers = []any{ (*StreamingDetectIntentResponse_RecognitionResult)(nil), (*StreamingDetectIntentResponse_DetectIntentResponse)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/session_entity_type.pb.go b/dialogflow/cx/apiv3/cxpb/session_entity_type.pb.go index ce4a5cc7c756..c60a239a8814 100755 --- a/dialogflow/cx/apiv3/cxpb/session_entity_type.pb.go +++ b/dialogflow/cx/apiv3/cxpb/session_entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto @@ -141,11 +141,9 @@ type SessionEntityType struct { func (x *SessionEntityType) Reset() { *x = SessionEntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEntityType) String() string { @@ -156,7 +154,7 @@ func (*SessionEntityType) ProtoMessage() {} func (x *SessionEntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +214,9 @@ type ListSessionEntityTypesRequest struct { func (x *ListSessionEntityTypesRequest) Reset() { *x = ListSessionEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesRequest) String() string { @@ -231,7 +227,7 @@ func (*ListSessionEntityTypesRequest) ProtoMessage() {} func (x *ListSessionEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +280,9 @@ type ListSessionEntityTypesResponse struct { func (x *ListSessionEntityTypesResponse) Reset() { *x = ListSessionEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesResponse) String() string { @@ -299,7 +293,7 @@ func (*ListSessionEntityTypesResponse) ProtoMessage() {} func (x *ListSessionEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +341,9 @@ type GetSessionEntityTypeRequest struct { func (x *GetSessionEntityTypeRequest) Reset() { *x = GetSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionEntityTypeRequest) String() string { @@ -362,7 +354,7 @@ func (*GetSessionEntityTypeRequest) ProtoMessage() {} func (x *GetSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +397,9 @@ type CreateSessionEntityTypeRequest struct { func (x *CreateSessionEntityTypeRequest) Reset() { *x = CreateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionEntityTypeRequest) String() string { @@ -420,7 +410,7 @@ func (*CreateSessionEntityTypeRequest) ProtoMessage() {} func (x *CreateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +460,9 @@ type UpdateSessionEntityTypeRequest struct { func (x *UpdateSessionEntityTypeRequest) Reset() { *x = UpdateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionEntityTypeRequest) String() string { @@ -485,7 +473,7 @@ func (*UpdateSessionEntityTypeRequest) ProtoMessage() {} func (x *UpdateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +521,9 @@ type DeleteSessionEntityTypeRequest struct { func (x *DeleteSessionEntityTypeRequest) Reset() { *x = DeleteSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionEntityTypeRequest) String() string { @@ -548,7 +534,7 @@ func (*DeleteSessionEntityTypeRequest) ProtoMessage() {} func (x *DeleteSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,92 +870,6 @@ func file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_init() { return } file_google_cloud_dialogflow_cx_v3_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SessionEntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_session_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/test_case.pb.go b/dialogflow/cx/apiv3/cxpb/test_case.pb.go index 6df5b49571b8..a0b5900074c5 100755 --- a/dialogflow/cx/apiv3/cxpb/test_case.pb.go +++ b/dialogflow/cx/apiv3/cxpb/test_case.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/test_case.proto @@ -363,11 +363,9 @@ type TestCase struct { func (x *TestCase) Reset() { *x = TestCase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCase) String() string { @@ -378,7 +376,7 @@ func (*TestCase) ProtoMessage() {} func (x *TestCase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +470,9 @@ type TestCaseResult struct { func (x *TestCaseResult) Reset() { *x = TestCaseResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCaseResult) String() string { @@ -487,7 +483,7 @@ func (*TestCaseResult) ProtoMessage() {} func (x *TestCaseResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +561,9 @@ type TestConfig struct { func (x *TestConfig) Reset() { *x = TestConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestConfig) String() string { @@ -580,7 +574,7 @@ func (*TestConfig) ProtoMessage() {} func (x *TestConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +625,9 @@ type ConversationTurn struct { func (x *ConversationTurn) Reset() { *x = ConversationTurn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn) String() string { @@ -646,7 +638,7 @@ func (*ConversationTurn) ProtoMessage() {} func (x *ConversationTurn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +682,9 @@ type TestRunDifference struct { func (x *TestRunDifference) Reset() { *x = TestRunDifference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestRunDifference) String() string { @@ -705,7 +695,7 @@ func (*TestRunDifference) ProtoMessage() {} func (x *TestRunDifference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +740,9 @@ type TransitionCoverage struct { func (x *TransitionCoverage) Reset() { *x = TransitionCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage) String() string { @@ -765,7 +753,7 @@ func (*TransitionCoverage) ProtoMessage() {} func (x *TransitionCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +799,9 @@ type TransitionRouteGroupCoverage struct { func (x *TransitionRouteGroupCoverage) Reset() { *x = TransitionRouteGroupCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage) String() string { @@ -826,7 +812,7 @@ func (*TransitionRouteGroupCoverage) ProtoMessage() {} func (x *TransitionRouteGroupCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +856,9 @@ type IntentCoverage struct { func (x *IntentCoverage) Reset() { *x = IntentCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentCoverage) String() string { @@ -885,7 +869,7 @@ func (*IntentCoverage) ProtoMessage() {} func (x *IntentCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,11 +914,9 @@ type CalculateCoverageRequest struct { func (x *CalculateCoverageRequest) Reset() { *x = CalculateCoverageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateCoverageRequest) String() string { @@ -945,7 +927,7 @@ func (*CalculateCoverageRequest) ProtoMessage() {} func (x *CalculateCoverageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +978,9 @@ type CalculateCoverageResponse struct { func (x *CalculateCoverageResponse) Reset() { *x = CalculateCoverageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateCoverageResponse) String() string { @@ -1011,7 +991,7 @@ func (*CalculateCoverageResponse) ProtoMessage() {} func (x *CalculateCoverageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1108,11 +1088,9 @@ type ListTestCasesRequest struct { func (x *ListTestCasesRequest) Reset() { *x = ListTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCasesRequest) String() string { @@ -1123,7 +1101,7 @@ func (*ListTestCasesRequest) ProtoMessage() {} func (x *ListTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1161,9 @@ type ListTestCasesResponse struct { func (x *ListTestCasesResponse) Reset() { *x = ListTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCasesResponse) String() string { @@ -1198,7 +1174,7 @@ func (*ListTestCasesResponse) ProtoMessage() {} func (x *ListTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1220,9 @@ type BatchDeleteTestCasesRequest struct { func (x *BatchDeleteTestCasesRequest) Reset() { *x = BatchDeleteTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteTestCasesRequest) String() string { @@ -1259,7 +1233,7 @@ func (*BatchDeleteTestCasesRequest) ProtoMessage() {} func (x *BatchDeleteTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1278,9 @@ type CreateTestCaseRequest struct { func (x *CreateTestCaseRequest) Reset() { *x = CreateTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTestCaseRequest) String() string { @@ -1319,7 +1291,7 @@ func (*CreateTestCaseRequest) ProtoMessage() {} func (x *CreateTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1366,11 +1338,9 @@ type UpdateTestCaseRequest struct { func (x *UpdateTestCaseRequest) Reset() { *x = UpdateTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTestCaseRequest) String() string { @@ -1381,7 +1351,7 @@ func (*UpdateTestCaseRequest) ProtoMessage() {} func (x *UpdateTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,11 +1395,9 @@ type GetTestCaseRequest struct { func (x *GetTestCaseRequest) Reset() { *x = GetTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTestCaseRequest) String() string { @@ -1440,7 +1408,7 @@ func (*GetTestCaseRequest) ProtoMessage() {} func (x *GetTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1448,9 @@ type RunTestCaseRequest struct { func (x *RunTestCaseRequest) Reset() { *x = RunTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseRequest) String() string { @@ -1495,7 +1461,7 @@ func (*RunTestCaseRequest) ProtoMessage() {} func (x *RunTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1503,9 @@ type RunTestCaseResponse struct { func (x *RunTestCaseResponse) Reset() { *x = RunTestCaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseResponse) String() string { @@ -1552,7 +1516,7 @@ func (*RunTestCaseResponse) ProtoMessage() {} func (x *RunTestCaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1585,11 +1549,9 @@ type RunTestCaseMetadata struct { func (x *RunTestCaseMetadata) Reset() { *x = RunTestCaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseMetadata) String() string { @@ -1600,7 +1562,7 @@ func (*RunTestCaseMetadata) ProtoMessage() {} func (x *RunTestCaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1635,11 +1597,9 @@ type BatchRunTestCasesRequest struct { func (x *BatchRunTestCasesRequest) Reset() { *x = BatchRunTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesRequest) String() string { @@ -1650,7 +1610,7 @@ func (*BatchRunTestCasesRequest) ProtoMessage() {} func (x *BatchRunTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1702,11 +1662,9 @@ type BatchRunTestCasesResponse struct { func (x *BatchRunTestCasesResponse) Reset() { *x = BatchRunTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesResponse) String() string { @@ -1717,7 +1675,7 @@ func (*BatchRunTestCasesResponse) ProtoMessage() {} func (x *BatchRunTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1753,11 +1711,9 @@ type BatchRunTestCasesMetadata struct { func (x *BatchRunTestCasesMetadata) Reset() { *x = BatchRunTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesMetadata) String() string { @@ -1768,7 +1724,7 @@ func (*BatchRunTestCasesMetadata) ProtoMessage() {} func (x *BatchRunTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1762,9 @@ type TestError struct { func (x *TestError) Reset() { *x = TestError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestError) String() string { @@ -1821,7 +1775,7 @@ func (*TestError) ProtoMessage() {} func (x *TestError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1878,11 +1832,9 @@ type ImportTestCasesRequest struct { func (x *ImportTestCasesRequest) Reset() { *x = ImportTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesRequest) String() string { @@ -1893,7 +1845,7 @@ func (*ImportTestCasesRequest) ProtoMessage() {} func (x *ImportTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1977,11 +1929,9 @@ type ImportTestCasesResponse struct { func (x *ImportTestCasesResponse) Reset() { *x = ImportTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesResponse) String() string { @@ -1992,7 +1942,7 @@ func (*ImportTestCasesResponse) ProtoMessage() {} func (x *ImportTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2028,11 +1978,9 @@ type ImportTestCasesMetadata struct { func (x *ImportTestCasesMetadata) Reset() { *x = ImportTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesMetadata) String() string { @@ -2043,7 +1991,7 @@ func (*ImportTestCasesMetadata) ProtoMessage() {} func (x *ImportTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2079,11 +2027,9 @@ type TestCaseError struct { func (x *TestCaseError) Reset() { *x = TestCaseError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCaseError) String() string { @@ -2094,7 +2040,7 @@ func (*TestCaseError) ProtoMessage() {} func (x *TestCaseError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2157,11 +2103,9 @@ type ExportTestCasesRequest struct { func (x *ExportTestCasesRequest) Reset() { *x = ExportTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesRequest) String() string { @@ -2172,7 +2116,7 @@ func (*ExportTestCasesRequest) ProtoMessage() {} func (x *ExportTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2260,11 +2204,9 @@ type ExportTestCasesResponse struct { func (x *ExportTestCasesResponse) Reset() { *x = ExportTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesResponse) String() string { @@ -2275,7 +2217,7 @@ func (*ExportTestCasesResponse) ProtoMessage() {} func (x *ExportTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2344,11 +2286,9 @@ type ExportTestCasesMetadata struct { func (x *ExportTestCasesMetadata) Reset() { *x = ExportTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesMetadata) String() string { @@ -2359,7 +2299,7 @@ func (*ExportTestCasesMetadata) ProtoMessage() {} func (x *ExportTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2422,11 +2362,9 @@ type ListTestCaseResultsRequest struct { func (x *ListTestCaseResultsRequest) Reset() { *x = ListTestCaseResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCaseResultsRequest) String() string { @@ -2437,7 +2375,7 @@ func (*ListTestCaseResultsRequest) ProtoMessage() {} func (x *ListTestCaseResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2496,11 +2434,9 @@ type ListTestCaseResultsResponse struct { func (x *ListTestCaseResultsResponse) Reset() { *x = ListTestCaseResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCaseResultsResponse) String() string { @@ -2511,7 +2447,7 @@ func (*ListTestCaseResultsResponse) ProtoMessage() {} func (x *ListTestCaseResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2555,11 +2491,9 @@ type GetTestCaseResultRequest struct { func (x *GetTestCaseResultRequest) Reset() { *x = GetTestCaseResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTestCaseResultRequest) String() string { @@ -2570,7 +2504,7 @@ func (*GetTestCaseResultRequest) ProtoMessage() {} func (x *GetTestCaseResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2615,11 +2549,9 @@ type ConversationTurn_UserInput struct { func (x *ConversationTurn_UserInput) Reset() { *x = ConversationTurn_UserInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn_UserInput) String() string { @@ -2630,7 +2562,7 @@ func (*ConversationTurn_UserInput) ProtoMessage() {} func (x *ConversationTurn_UserInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2705,11 +2637,9 @@ type ConversationTurn_VirtualAgentOutput struct { func (x *ConversationTurn_VirtualAgentOutput) Reset() { *x = ConversationTurn_VirtualAgentOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn_VirtualAgentOutput) String() string { @@ -2720,7 +2650,7 @@ func (*ConversationTurn_VirtualAgentOutput) ProtoMessage() {} func (x *ConversationTurn_VirtualAgentOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2801,11 +2731,9 @@ type TransitionCoverage_TransitionNode struct { func (x *TransitionCoverage_TransitionNode) Reset() { *x = TransitionCoverage_TransitionNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage_TransitionNode) String() string { @@ -2816,7 +2744,7 @@ func (*TransitionCoverage_TransitionNode) ProtoMessage() {} func (x *TransitionCoverage_TransitionNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2898,11 +2826,9 @@ type TransitionCoverage_Transition struct { func (x *TransitionCoverage_Transition) Reset() { *x = TransitionCoverage_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage_Transition) String() string { @@ -2913,7 +2839,7 @@ func (*TransitionCoverage_Transition) ProtoMessage() {} func (x *TransitionCoverage_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3012,11 +2938,9 @@ type TransitionRouteGroupCoverage_Coverage struct { func (x *TransitionRouteGroupCoverage_Coverage) Reset() { *x = TransitionRouteGroupCoverage_Coverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage_Coverage) String() string { @@ -3027,7 +2951,7 @@ func (*TransitionRouteGroupCoverage_Coverage) ProtoMessage() {} func (x *TransitionRouteGroupCoverage_Coverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3078,11 +3002,9 @@ type TransitionRouteGroupCoverage_Coverage_Transition struct { func (x *TransitionRouteGroupCoverage_Coverage_Transition) Reset() { *x = TransitionRouteGroupCoverage_Coverage_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage_Coverage_Transition) String() string { @@ -3093,7 +3015,7 @@ func (*TransitionRouteGroupCoverage_Coverage_Transition) ProtoMessage() {} func (x *TransitionRouteGroupCoverage_Coverage_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3137,11 +3059,9 @@ type IntentCoverage_Intent struct { func (x *IntentCoverage_Intent) Reset() { *x = IntentCoverage_Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentCoverage_Intent) String() string { @@ -3152,7 +3072,7 @@ func (*IntentCoverage_Intent) ProtoMessage() {} func (x *IntentCoverage_Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4087,488 +4007,6 @@ func file_google_cloud_dialogflow_cx_v3_test_case_proto_init() { file_google_cloud_dialogflow_cx_v3_response_message_proto_init() file_google_cloud_dialogflow_cx_v3_session_proto_init() file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TestCase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TestCaseResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TestConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TestRunDifference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IntentCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CalculateCoverageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CalculateCoverageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*TestError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*TestCaseError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCaseResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCaseResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetTestCaseResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn_UserInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn_VirtualAgentOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage_TransitionNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage_Coverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage_Coverage_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*IntentCoverage_Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_test_case_proto_msgTypes[9].OneofWrappers = []any{ (*CalculateCoverageResponse_IntentCoverage)(nil), (*CalculateCoverageResponse_TransitionCoverage)(nil), diff --git a/dialogflow/cx/apiv3/cxpb/transition_route_group.pb.go b/dialogflow/cx/apiv3/cxpb/transition_route_group.pb.go index 1a58120d3f9b..dd3795832495 100755 --- a/dialogflow/cx/apiv3/cxpb/transition_route_group.pb.go +++ b/dialogflow/cx/apiv3/cxpb/transition_route_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -66,11 +66,9 @@ type TransitionRouteGroup struct { func (x *TransitionRouteGroup) Reset() { *x = TransitionRouteGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroup) String() string { @@ -81,7 +79,7 @@ func (*TransitionRouteGroup) ProtoMessage() {} func (x *TransitionRouteGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListTransitionRouteGroupsRequest struct { func (x *ListTransitionRouteGroupsRequest) Reset() { *x = ListTransitionRouteGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransitionRouteGroupsRequest) String() string { @@ -167,7 +163,7 @@ func (*ListTransitionRouteGroupsRequest) ProtoMessage() {} func (x *ListTransitionRouteGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type ListTransitionRouteGroupsResponse struct { func (x *ListTransitionRouteGroupsResponse) Reset() { *x = ListTransitionRouteGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransitionRouteGroupsResponse) String() string { @@ -244,7 +238,7 @@ func (*ListTransitionRouteGroupsResponse) ProtoMessage() {} func (x *ListTransitionRouteGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +298,9 @@ type GetTransitionRouteGroupRequest struct { func (x *GetTransitionRouteGroupRequest) Reset() { *x = GetTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTransitionRouteGroupRequest) String() string { @@ -319,7 +311,7 @@ func (*GetTransitionRouteGroupRequest) ProtoMessage() {} func (x *GetTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +372,9 @@ type CreateTransitionRouteGroupRequest struct { func (x *CreateTransitionRouteGroupRequest) Reset() { *x = CreateTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTransitionRouteGroupRequest) String() string { @@ -395,7 +385,7 @@ func (*CreateTransitionRouteGroupRequest) ProtoMessage() {} func (x *CreateTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +448,9 @@ type UpdateTransitionRouteGroupRequest struct { func (x *UpdateTransitionRouteGroupRequest) Reset() { *x = UpdateTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTransitionRouteGroupRequest) String() string { @@ -473,7 +461,7 @@ func (*UpdateTransitionRouteGroupRequest) ProtoMessage() {} func (x *UpdateTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +523,9 @@ type DeleteTransitionRouteGroupRequest struct { func (x *DeleteTransitionRouteGroupRequest) Reset() { *x = DeleteTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTransitionRouteGroupRequest) String() string { @@ -550,7 +536,7 @@ func (*DeleteTransitionRouteGroupRequest) ProtoMessage() {} func (x *DeleteTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,92 +880,6 @@ func file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_init() { return } file_google_cloud_dialogflow_cx_v3_page_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTransitionRouteGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTransitionRouteGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_transition_route_group_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/validation_message.pb.go b/dialogflow/cx/apiv3/cxpb/validation_message.pb.go index 1c7c5a49d053..04d9513edd90 100755 --- a/dialogflow/cx/apiv3/cxpb/validation_message.pb.go +++ b/dialogflow/cx/apiv3/cxpb/validation_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/validation_message.proto @@ -215,11 +215,9 @@ type ValidationMessage struct { func (x *ValidationMessage) Reset() { *x = ValidationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationMessage) String() string { @@ -230,7 +228,7 @@ func (*ValidationMessage) ProtoMessage() {} func (x *ValidationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +293,9 @@ type ResourceName struct { func (x *ResourceName) Reset() { *x = ResourceName{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceName) String() string { @@ -310,7 +306,7 @@ func (*ResourceName) ProtoMessage() {} func (x *ResourceName) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,32 +444,6 @@ func file_google_cloud_dialogflow_cx_v3_validation_message_proto_init() { if File_google_cloud_dialogflow_cx_v3_validation_message_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValidationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_validation_message_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/version.pb.go b/dialogflow/cx/apiv3/cxpb/version.pb.go index 32799d24588e..fcbe45a52d47 100755 --- a/dialogflow/cx/apiv3/cxpb/version.pb.go +++ b/dialogflow/cx/apiv3/cxpb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/version.proto @@ -117,11 +117,9 @@ type CreateVersionOperationMetadata struct { func (x *CreateVersionOperationMetadata) Reset() { *x = CreateVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionOperationMetadata) String() string { @@ -132,7 +130,7 @@ func (*CreateVersionOperationMetadata) ProtoMessage() {} func (x *CreateVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +179,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -196,7 +192,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +269,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -288,7 +282,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +336,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -357,7 +349,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +393,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -416,7 +406,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +445,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -470,7 +458,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +503,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -530,7 +516,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +560,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -589,7 +573,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +615,9 @@ type LoadVersionRequest struct { func (x *LoadVersionRequest) Reset() { *x = LoadVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadVersionRequest) String() string { @@ -646,7 +628,7 @@ func (*LoadVersionRequest) ProtoMessage() {} func (x *LoadVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +687,9 @@ type CompareVersionsRequest struct { func (x *CompareVersionsRequest) Reset() { *x = CompareVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompareVersionsRequest) String() string { @@ -720,7 +700,7 @@ func (*CompareVersionsRequest) ProtoMessage() {} func (x *CompareVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +753,9 @@ type CompareVersionsResponse struct { func (x *CompareVersionsResponse) Reset() { *x = CompareVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompareVersionsResponse) String() string { @@ -788,7 +766,7 @@ func (*CompareVersionsResponse) ProtoMessage() {} func (x *CompareVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,140 +1140,6 @@ func file_google_cloud_dialogflow_cx_v3_version_proto_init() { return } file_google_cloud_dialogflow_cx_v3_flow_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LoadVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CompareVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_version_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompareVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3/cxpb/webhook.pb.go b/dialogflow/cx/apiv3/cxpb/webhook.pb.go index 1fb29b075688..1c308b0e363f 100755 --- a/dialogflow/cx/apiv3/cxpb/webhook.pb.go +++ b/dialogflow/cx/apiv3/cxpb/webhook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3/webhook.proto @@ -386,11 +386,9 @@ type Webhook struct { func (x *Webhook) Reset() { *x = Webhook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook) String() string { @@ -401,7 +399,7 @@ func (*Webhook) ProtoMessage() {} func (x *Webhook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +501,9 @@ type ListWebhooksRequest struct { func (x *ListWebhooksRequest) Reset() { *x = ListWebhooksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWebhooksRequest) String() string { @@ -518,7 +514,7 @@ func (*ListWebhooksRequest) ProtoMessage() {} func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +567,9 @@ type ListWebhooksResponse struct { func (x *ListWebhooksResponse) Reset() { *x = ListWebhooksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWebhooksResponse) String() string { @@ -586,7 +580,7 @@ func (*ListWebhooksResponse) ProtoMessage() {} func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +624,9 @@ type GetWebhookRequest struct { func (x *GetWebhookRequest) Reset() { *x = GetWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWebhookRequest) String() string { @@ -645,7 +637,7 @@ func (*GetWebhookRequest) ProtoMessage() {} func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +675,9 @@ type CreateWebhookRequest struct { func (x *CreateWebhookRequest) Reset() { *x = CreateWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWebhookRequest) String() string { @@ -698,7 +688,7 @@ func (*CreateWebhookRequest) ProtoMessage() {} func (x *CreateWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +733,9 @@ type UpdateWebhookRequest struct { func (x *UpdateWebhookRequest) Reset() { *x = UpdateWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWebhookRequest) String() string { @@ -758,7 +746,7 @@ func (*UpdateWebhookRequest) ProtoMessage() {} func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +801,9 @@ type DeleteWebhookRequest struct { func (x *DeleteWebhookRequest) Reset() { *x = DeleteWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWebhookRequest) String() string { @@ -828,7 +814,7 @@ func (*DeleteWebhookRequest) ProtoMessage() {} func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +895,9 @@ type WebhookRequest struct { func (x *WebhookRequest) Reset() { *x = WebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest) String() string { @@ -924,7 +908,7 @@ func (*WebhookRequest) ProtoMessage() {} func (x *WebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1128,11 +1112,9 @@ type WebhookResponse struct { func (x *WebhookResponse) Reset() { *x = WebhookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse) String() string { @@ -1143,7 +1125,7 @@ func (*WebhookResponse) ProtoMessage() {} func (x *WebhookResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1237,9 @@ type PageInfo struct { func (x *PageInfo) Reset() { *x = PageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo) String() string { @@ -1270,7 +1250,7 @@ func (*PageInfo) ProtoMessage() {} func (x *PageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1337,11 +1317,9 @@ type SessionInfo struct { func (x *SessionInfo) Reset() { *x = SessionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionInfo) String() string { @@ -1352,7 +1330,7 @@ func (*SessionInfo) ProtoMessage() {} func (x *SessionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1399,11 +1377,9 @@ type LanguageInfo struct { func (x *LanguageInfo) Reset() { *x = LanguageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LanguageInfo) String() string { @@ -1414,7 +1390,7 @@ func (*LanguageInfo) ProtoMessage() {} func (x *LanguageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1511,11 +1487,9 @@ type Webhook_GenericWebService struct { func (x *Webhook_GenericWebService) Reset() { *x = Webhook_GenericWebService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_GenericWebService) String() string { @@ -1526,7 +1500,7 @@ func (*Webhook_GenericWebService) ProtoMessage() {} func (x *Webhook_GenericWebService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1640,11 +1614,9 @@ type Webhook_ServiceDirectoryConfig struct { func (x *Webhook_ServiceDirectoryConfig) Reset() { *x = Webhook_ServiceDirectoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_ServiceDirectoryConfig) String() string { @@ -1655,7 +1627,7 @@ func (*Webhook_ServiceDirectoryConfig) ProtoMessage() {} func (x *Webhook_ServiceDirectoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,11 +1676,9 @@ type Webhook_GenericWebService_OAuthConfig struct { func (x *Webhook_GenericWebService_OAuthConfig) Reset() { *x = Webhook_GenericWebService_OAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_GenericWebService_OAuthConfig) String() string { @@ -1719,7 +1689,7 @@ func (*Webhook_GenericWebService_OAuthConfig) ProtoMessage() {} func (x *Webhook_GenericWebService_OAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1780,11 +1750,9 @@ type WebhookRequest_FulfillmentInfo struct { func (x *WebhookRequest_FulfillmentInfo) Reset() { *x = WebhookRequest_FulfillmentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_FulfillmentInfo) String() string { @@ -1795,7 +1763,7 @@ func (*WebhookRequest_FulfillmentInfo) ProtoMessage() {} func (x *WebhookRequest_FulfillmentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1843,11 +1811,9 @@ type WebhookRequest_IntentInfo struct { func (x *WebhookRequest_IntentInfo) Reset() { *x = WebhookRequest_IntentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_IntentInfo) String() string { @@ -1858,7 +1824,7 @@ func (*WebhookRequest_IntentInfo) ProtoMessage() {} func (x *WebhookRequest_IntentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1885,9 @@ type WebhookRequest_SentimentAnalysisResult struct { func (x *WebhookRequest_SentimentAnalysisResult) Reset() { *x = WebhookRequest_SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_SentimentAnalysisResult) String() string { @@ -1934,7 +1898,7 @@ func (*WebhookRequest_SentimentAnalysisResult) ProtoMessage() {} func (x *WebhookRequest_SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1942,9 @@ type WebhookRequest_IntentInfo_IntentParameterValue struct { func (x *WebhookRequest_IntentInfo_IntentParameterValue) Reset() { *x = WebhookRequest_IntentInfo_IntentParameterValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_IntentInfo_IntentParameterValue) String() string { @@ -1993,7 +1955,7 @@ func (*WebhookRequest_IntentInfo_IntentParameterValue) ProtoMessage() {} func (x *WebhookRequest_IntentInfo_IntentParameterValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2036,11 +1998,9 @@ type WebhookResponse_FulfillmentResponse struct { func (x *WebhookResponse_FulfillmentResponse) Reset() { *x = WebhookResponse_FulfillmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse_FulfillmentResponse) String() string { @@ -2051,7 +2011,7 @@ func (*WebhookResponse_FulfillmentResponse) ProtoMessage() {} func (x *WebhookResponse_FulfillmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2096,11 +2056,9 @@ type PageInfo_FormInfo struct { func (x *PageInfo_FormInfo) Reset() { *x = PageInfo_FormInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo_FormInfo) String() string { @@ -2111,7 +2069,7 @@ func (*PageInfo_FormInfo) ProtoMessage() {} func (x *PageInfo_FormInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2178,11 +2136,9 @@ type PageInfo_FormInfo_ParameterInfo struct { func (x *PageInfo_FormInfo_ParameterInfo) Reset() { *x = PageInfo_FormInfo_ParameterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo_FormInfo_ParameterInfo) String() string { @@ -2193,7 +2149,7 @@ func (*PageInfo_FormInfo_ParameterInfo) ProtoMessage() {} func (x *PageInfo_FormInfo_ParameterInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2882,272 +2838,6 @@ func file_google_cloud_dialogflow_cx_v3_webhook_proto_init() { return } file_google_cloud_dialogflow_cx_v3_response_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Webhook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWebhooksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWebhooksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SessionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LanguageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_GenericWebService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_ServiceDirectoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_GenericWebService_OAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_FulfillmentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_IntentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_IntentInfo_IntentParameterValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse_FulfillmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo_FormInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo_FormInfo_ParameterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3_webhook_proto_msgTypes[0].OneofWrappers = []any{ (*Webhook_GenericWebService_)(nil), (*Webhook_ServiceDirectory)(nil), diff --git a/dialogflow/cx/apiv3/deployments_client.go b/dialogflow/cx/apiv3/deployments_client.go index 0c931e52d8e1..956cf61a5b76 100755 --- a/dialogflow/cx/apiv3/deployments_client.go +++ b/dialogflow/cx/apiv3/deployments_client.go @@ -19,7 +19,7 @@ package cx import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -240,6 +239,8 @@ type deploymentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDeploymentsClient creates a new deployments client based on gRPC. @@ -266,6 +267,7 @@ func NewDeploymentsClient(ctx context.Context, opts ...option.ClientOption) (*De connPool: connPool, deploymentsClient: cxpb.NewDeploymentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -314,6 +316,8 @@ type deploymentsRESTClient struct { // Points back to the CallOptions field of the containing DeploymentsClient CallOptions **DeploymentsCallOptions + + logger *slog.Logger } // NewDeploymentsRESTClient creates a new deployments rest client. @@ -331,6 +335,7 @@ func NewDeploymentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -394,7 +399,7 @@ func (c *deploymentsGRPCClient) ListDeployments(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentsClient.ListDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentsClient.ListDeployments, req, settings.GRPC, c.logger, "ListDeployments") return err }, opts...) if err != nil { @@ -429,7 +434,7 @@ func (c *deploymentsGRPCClient) GetDeployment(ctx context.Context, req *cxpb.Get var resp *cxpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentsClient.GetDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentsClient.GetDeployment, req, settings.GRPC, c.logger, "GetDeployment") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *deploymentsGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -476,7 +481,7 @@ func (c *deploymentsGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -510,7 +515,7 @@ func (c *deploymentsGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -525,7 +530,7 @@ func (c *deploymentsGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *deploymentsGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -626,21 +631,10 @@ func (c *deploymentsRESTClient) ListDeployments(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -704,17 +698,7 @@ func (c *deploymentsRESTClient) GetDeployment(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -764,17 +748,7 @@ func (c *deploymentsRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -839,21 +813,10 @@ func (c *deploymentsRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -913,15 +876,8 @@ func (c *deploymentsRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -958,17 +914,7 @@ func (c *deploymentsRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1033,21 +979,10 @@ func (c *deploymentsRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/deployments_client_example_go123_test.go b/dialogflow/cx/apiv3/deployments_client_example_go123_test.go index 0f9b4a98c4e3..59e4b2855d8f 100644 --- a/dialogflow/cx/apiv3/deployments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/deployments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDeploymentsClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDeploymentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDeploymentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/entity_types_client.go b/dialogflow/cx/apiv3/entity_types_client.go index e3f54900a85b..baa80ff02b9b 100755 --- a/dialogflow/cx/apiv3/entity_types_client.go +++ b/dialogflow/cx/apiv3/entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -427,6 +426,8 @@ type entityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEntityTypesClient creates a new entity types client based on gRPC. @@ -453,6 +454,7 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En connPool: connPool, entityTypesClient: cxpb.NewEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -517,6 +519,8 @@ type entityTypesRESTClient struct { // Points back to the CallOptions field of the containing EntityTypesClient CallOptions **EntityTypesCallOptions + + logger *slog.Logger } // NewEntityTypesRESTClient creates a new entity types rest client. @@ -534,6 +538,7 @@ func NewEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -596,7 +601,7 @@ func (c *entityTypesGRPCClient) GetEntityType(ctx context.Context, req *cxpb.Get var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *entityTypesGRPCClient) CreateEntityType(ctx context.Context, req *cxpb. var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -632,7 +637,7 @@ func (c *entityTypesGRPCClient) UpdateEntityType(ctx context.Context, req *cxpb. var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *entityTypesGRPCClient) DeleteEntityType(ctx context.Context, req *cxpb. opts = append((*c.CallOptions).DeleteEntityType[0:len((*c.CallOptions).DeleteEntityType):len((*c.CallOptions).DeleteEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.entityTypesClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) return err @@ -675,7 +680,7 @@ func (c *entityTypesGRPCClient) ListEntityTypes(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *entityTypesGRPCClient) ExportEntityTypes(ctx context.Context, req *cxpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ExportEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ExportEntityTypes, req, settings.GRPC, c.logger, "ExportEntityTypes") return err }, opts...) if err != nil { @@ -730,7 +735,7 @@ func (c *entityTypesGRPCClient) ImportEntityTypes(ctx context.Context, req *cxpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ImportEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ImportEntityTypes, req, settings.GRPC, c.logger, "ImportEntityTypes") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -779,7 +784,7 @@ func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -813,7 +818,7 @@ func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -828,7 +833,7 @@ func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -857,7 +862,7 @@ func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -919,17 +924,7 @@ func (c *entityTypesRESTClient) GetEntityType(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntityType") if err != nil { return err } @@ -993,17 +988,7 @@ func (c *entityTypesRESTClient) CreateEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntityType") if err != nil { return err } @@ -1074,17 +1059,7 @@ func (c *entityTypesRESTClient) UpdateEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntityType") if err != nil { return err } @@ -1138,15 +1113,8 @@ func (c *entityTypesRESTClient) DeleteEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntityType") + return err }, opts...) } @@ -1198,21 +1166,10 @@ func (c *entityTypesRESTClient) ListEntityTypes(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1280,21 +1237,10 @@ func (c *entityTypesRESTClient) ExportEntityTypes(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportEntityTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1350,21 +1296,10 @@ func (c *entityTypesRESTClient) ImportEntityTypes(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportEntityTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,17 +1350,7 @@ func (c *entityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1490,21 +1415,10 @@ func (c *entityTypesRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1564,15 +1478,8 @@ func (c *entityTypesRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1609,17 +1516,7 @@ func (c *entityTypesRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1684,21 +1581,10 @@ func (c *entityTypesRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/entity_types_client_example_go123_test.go b/dialogflow/cx/apiv3/entity_types_client_example_go123_test.go index 868ee5ac47e3..cb7d577d5bce 100644 --- a/dialogflow/cx/apiv3/entity_types_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEntityTypesClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/environments_client.go b/dialogflow/cx/apiv3/environments_client.go index 6e3b9a632dbe..e26dbda0a351 100755 --- a/dialogflow/cx/apiv3/environments_client.go +++ b/dialogflow/cx/apiv3/environments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -536,6 +535,8 @@ type environmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEnvironmentsClient creates a new environments client based on gRPC. @@ -563,6 +564,7 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E connPool: connPool, environmentsClient: cxpb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -627,6 +629,8 @@ type environmentsRESTClient struct { // Points back to the CallOptions field of the containing EnvironmentsClient CallOptions **EnvironmentsCallOptions + + logger *slog.Logger } // NewEnvironmentsRESTClient creates a new environments rest client. @@ -645,6 +649,7 @@ func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -718,7 +723,7 @@ func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *cxpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *cxpb.G var resp *cxpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -771,7 +776,7 @@ func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *cxp opts = append((*c.CallOptions).DeleteEnvironment[0:len((*c.CallOptions).DeleteEnvironment):len((*c.CallOptions).DeleteEnvironment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) return err @@ -836,7 +841,7 @@ func (c *environmentsGRPCClient) LookupEnvironmentHistory(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.LookupEnvironmentHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.LookupEnvironmentHistory, req, settings.GRPC, c.logger, "LookupEnvironmentHistory") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *environmentsGRPCClient) RunContinuousTest(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.RunContinuousTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.RunContinuousTest, req, settings.GRPC, c.logger, "RunContinuousTest") return err }, opts...) if err != nil { @@ -902,7 +907,7 @@ func (c *environmentsGRPCClient) ListContinuousTestResults(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListContinuousTestResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListContinuousTestResults, req, settings.GRPC, c.logger, "ListContinuousTestResults") return err }, opts...) if err != nil { @@ -937,7 +942,7 @@ func (c *environmentsGRPCClient) DeployFlow(ctx context.Context, req *cxpb.Deplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.DeployFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.DeployFlow, req, settings.GRPC, c.logger, "DeployFlow") return err }, opts...) if err != nil { @@ -957,7 +962,7 @@ func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1035,7 +1040,7 @@ func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1064,7 +1069,7 @@ func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1136,21 +1141,10 @@ func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *cxpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1214,17 +1208,7 @@ func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *cxpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -1290,21 +1274,10 @@ func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1378,21 +1351,10 @@ func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1441,15 +1403,8 @@ func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") + return err }, opts...) } @@ -1499,21 +1454,10 @@ func (c *environmentsRESTClient) LookupEnvironmentHistory(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupEnvironmentHistory") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1592,21 +1536,10 @@ func (c *environmentsRESTClient) RunContinuousTest(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunContinuousTest") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1669,21 +1602,10 @@ func (c *environmentsRESTClient) ListContinuousTestResults(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContinuousTestResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1762,21 +1684,10 @@ func (c *environmentsRESTClient) DeployFlow(ctx context.Context, req *cxpb.Deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployFlow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1827,17 +1738,7 @@ func (c *environmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1902,21 +1803,10 @@ func (c *environmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1976,15 +1866,8 @@ func (c *environmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2021,17 +1904,7 @@ func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2096,21 +1969,10 @@ func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/environments_client_example_go123_test.go b/dialogflow/cx/apiv3/environments_client_example_go123_test.go index d1843532dd60..633565b2d8b1 100644 --- a/dialogflow/cx/apiv3/environments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/environments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEnvironmentsClient_ListContinuousTestResults_all() { } for resp, err := range c.ListContinuousTestResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEnvironmentsClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEnvironmentsClient_LookupEnvironmentHistory_all() { } for resp, err := range c.LookupEnvironmentHistory(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleEnvironmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleEnvironmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/experiments_client.go b/dialogflow/cx/apiv3/experiments_client.go index 86e2fcec5bef..d08e1de4f77c 100755 --- a/dialogflow/cx/apiv3/experiments_client.go +++ b/dialogflow/cx/apiv3/experiments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -397,6 +396,8 @@ type experimentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExperimentsClient creates a new experiments client based on gRPC. @@ -423,6 +424,7 @@ func NewExperimentsClient(ctx context.Context, opts ...option.ClientOption) (*Ex connPool: connPool, experimentsClient: cxpb.NewExperimentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -471,6 +473,8 @@ type experimentsRESTClient struct { // Points back to the CallOptions field of the containing ExperimentsClient CallOptions **ExperimentsCallOptions + + logger *slog.Logger } // NewExperimentsRESTClient creates a new experiments rest client. @@ -488,6 +492,7 @@ func NewExperimentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -551,7 +556,7 @@ func (c *experimentsGRPCClient) ListExperiments(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.ListExperiments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.ListExperiments, req, settings.GRPC, c.logger, "ListExperiments") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *experimentsGRPCClient) GetExperiment(ctx context.Context, req *cxpb.Get var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.GetExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.GetExperiment, req, settings.GRPC, c.logger, "GetExperiment") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *experimentsGRPCClient) CreateExperiment(ctx context.Context, req *cxpb. var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.CreateExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.CreateExperiment, req, settings.GRPC, c.logger, "CreateExperiment") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *experimentsGRPCClient) UpdateExperiment(ctx context.Context, req *cxpb. var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.UpdateExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.UpdateExperiment, req, settings.GRPC, c.logger, "UpdateExperiment") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *experimentsGRPCClient) DeleteExperiment(ctx context.Context, req *cxpb. opts = append((*c.CallOptions).DeleteExperiment[0:len((*c.CallOptions).DeleteExperiment):len((*c.CallOptions).DeleteExperiment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.experimentsClient.DeleteExperiment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.experimentsClient.DeleteExperiment, req, settings.GRPC, c.logger, "DeleteExperiment") return err }, opts...) return err @@ -654,7 +659,7 @@ func (c *experimentsGRPCClient) StartExperiment(ctx context.Context, req *cxpb.S var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.StartExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.StartExperiment, req, settings.GRPC, c.logger, "StartExperiment") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *experimentsGRPCClient) StopExperiment(ctx context.Context, req *cxpb.St var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.StopExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.StopExperiment, req, settings.GRPC, c.logger, "StopExperiment") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *experimentsGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -719,7 +724,7 @@ func (c *experimentsGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *experimentsGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -768,7 +773,7 @@ func (c *experimentsGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -797,7 +802,7 @@ func (c *experimentsGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -869,21 +874,10 @@ func (c *experimentsRESTClient) ListExperiments(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExperiments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -947,17 +941,7 @@ func (c *experimentsRESTClient) GetExperiment(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExperiment") if err != nil { return err } @@ -1015,17 +999,7 @@ func (c *experimentsRESTClient) CreateExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExperiment") if err != nil { return err } @@ -1090,17 +1064,7 @@ func (c *experimentsRESTClient) UpdateExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExperiment") if err != nil { return err } @@ -1148,15 +1112,8 @@ func (c *experimentsRESTClient) DeleteExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExperiment") + return err }, opts...) } @@ -1201,17 +1158,7 @@ func (c *experimentsRESTClient) StartExperiment(ctx context.Context, req *cxpb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartExperiment") if err != nil { return err } @@ -1268,17 +1215,7 @@ func (c *experimentsRESTClient) StopExperiment(ctx context.Context, req *cxpb.St httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopExperiment") if err != nil { return err } @@ -1328,17 +1265,7 @@ func (c *experimentsRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1403,21 +1330,10 @@ func (c *experimentsRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1477,15 +1393,8 @@ func (c *experimentsRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1522,17 +1431,7 @@ func (c *experimentsRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1597,21 +1496,10 @@ func (c *experimentsRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/experiments_client_example_go123_test.go b/dialogflow/cx/apiv3/experiments_client_example_go123_test.go index 49f1046d75e4..5c46baebcf98 100644 --- a/dialogflow/cx/apiv3/experiments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/experiments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleExperimentsClient_ListExperiments_all() { } for resp, err := range c.ListExperiments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleExperimentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleExperimentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/flows_client.go b/dialogflow/cx/apiv3/flows_client.go index 40b29fd07705..78db3feeac5b 100755 --- a/dialogflow/cx/apiv3/flows_client.go +++ b/dialogflow/cx/apiv3/flows_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -565,6 +564,8 @@ type flowsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFlowsClient creates a new flows client based on gRPC. @@ -591,6 +592,7 @@ func NewFlowsClient(ctx context.Context, opts ...option.ClientOption) (*FlowsCli connPool: connPool, flowsClient: cxpb.NewFlowsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -655,6 +657,8 @@ type flowsRESTClient struct { // Points back to the CallOptions field of the containing FlowsClient CallOptions **FlowsCallOptions + + logger *slog.Logger } // NewFlowsRESTClient creates a new flows rest client. @@ -672,6 +676,7 @@ func NewFlowsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Flow endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -734,7 +739,7 @@ func (c *flowsGRPCClient) CreateFlow(ctx context.Context, req *cxpb.CreateFlowRe var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.CreateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.CreateFlow, req, settings.GRPC, c.logger, "CreateFlow") return err }, opts...) if err != nil { @@ -751,7 +756,7 @@ func (c *flowsGRPCClient) DeleteFlow(ctx context.Context, req *cxpb.DeleteFlowRe opts = append((*c.CallOptions).DeleteFlow[0:len((*c.CallOptions).DeleteFlow):len((*c.CallOptions).DeleteFlow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.flowsClient.DeleteFlow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.flowsClient.DeleteFlow, req, settings.GRPC, c.logger, "DeleteFlow") return err }, opts...) return err @@ -777,7 +782,7 @@ func (c *flowsGRPCClient) ListFlows(ctx context.Context, req *cxpb.ListFlowsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ListFlows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ListFlows, req, settings.GRPC, c.logger, "ListFlows") return err }, opts...) if err != nil { @@ -812,7 +817,7 @@ func (c *flowsGRPCClient) GetFlow(ctx context.Context, req *cxpb.GetFlowRequest, var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.GetFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.GetFlow, req, settings.GRPC, c.logger, "GetFlow") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *flowsGRPCClient) UpdateFlow(ctx context.Context, req *cxpb.UpdateFlowRe var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.UpdateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.UpdateFlow, req, settings.GRPC, c.logger, "UpdateFlow") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *flowsGRPCClient) TrainFlow(ctx context.Context, req *cxpb.TrainFlowRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.TrainFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.TrainFlow, req, settings.GRPC, c.logger, "TrainFlow") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *flowsGRPCClient) ValidateFlow(ctx context.Context, req *cxpb.ValidateFl var resp *cxpb.FlowValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ValidateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ValidateFlow, req, settings.GRPC, c.logger, "ValidateFlow") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *flowsGRPCClient) GetFlowValidationResult(ctx context.Context, req *cxpb var resp *cxpb.FlowValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.GetFlowValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.GetFlowValidationResult, req, settings.GRPC, c.logger, "GetFlowValidationResult") return err }, opts...) if err != nil { @@ -904,7 +909,7 @@ func (c *flowsGRPCClient) ImportFlow(ctx context.Context, req *cxpb.ImportFlowRe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ImportFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ImportFlow, req, settings.GRPC, c.logger, "ImportFlow") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *flowsGRPCClient) ExportFlow(ctx context.Context, req *cxpb.ExportFlowRe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ExportFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ExportFlow, req, settings.GRPC, c.logger, "ExportFlow") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *flowsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *flowsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *flowsGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1022,7 +1027,7 @@ func (c *flowsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1051,7 +1056,7 @@ func (c *flowsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1124,17 +1129,7 @@ func (c *flowsRESTClient) CreateFlow(ctx context.Context, req *cxpb.CreateFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFlow") if err != nil { return err } @@ -1184,15 +1179,8 @@ func (c *flowsRESTClient) DeleteFlow(ctx context.Context, req *cxpb.DeleteFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFlow") + return err }, opts...) } @@ -1244,21 +1232,10 @@ func (c *flowsRESTClient) ListFlows(ctx context.Context, req *cxpb.ListFlowsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFlows") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1324,17 +1301,7 @@ func (c *flowsRESTClient) GetFlow(ctx context.Context, req *cxpb.GetFlowRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFlow") if err != nil { return err } @@ -1405,17 +1372,7 @@ func (c *flowsRESTClient) UpdateFlow(ctx context.Context, req *cxpb.UpdateFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFlow") if err != nil { return err } @@ -1485,21 +1442,10 @@ func (c *flowsRESTClient) TrainFlow(ctx context.Context, req *cxpb.TrainFlowRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainFlow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1558,17 +1504,7 @@ func (c *flowsRESTClient) ValidateFlow(ctx context.Context, req *cxpb.ValidateFl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateFlow") if err != nil { return err } @@ -1622,17 +1558,7 @@ func (c *flowsRESTClient) GetFlowValidationResult(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFlowValidationResult") if err != nil { return err } @@ -1701,21 +1627,10 @@ func (c *flowsRESTClient) ImportFlow(ctx context.Context, req *cxpb.ImportFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportFlow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1784,21 +1699,10 @@ func (c *flowsRESTClient) ExportFlow(ctx context.Context, req *cxpb.ExportFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportFlow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1849,17 +1753,7 @@ func (c *flowsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1924,21 +1818,10 @@ func (c *flowsRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1998,15 +1881,8 @@ func (c *flowsRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2043,17 +1919,7 @@ func (c *flowsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2118,21 +1984,10 @@ func (c *flowsRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/flows_client_example_go123_test.go b/dialogflow/cx/apiv3/flows_client_example_go123_test.go index 353653b0210d..9b682924a9fd 100644 --- a/dialogflow/cx/apiv3/flows_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/flows_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFlowsClient_ListFlows_all() { } for resp, err := range c.ListFlows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFlowsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFlowsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/generators_client.go b/dialogflow/cx/apiv3/generators_client.go index 7f1036ba8756..0c27a13f565c 100755 --- a/dialogflow/cx/apiv3/generators_client.go +++ b/dialogflow/cx/apiv3/generators_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type generatorsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGeneratorsClient creates a new generators client based on gRPC. @@ -355,6 +356,7 @@ func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generatorsClient: cxpb.NewGeneratorsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type generatorsRESTClient struct { // Points back to the CallOptions field of the containing GeneratorsClient CallOptions **GeneratorsCallOptions + + logger *slog.Logger } // NewGeneratorsRESTClient creates a new generators rest client. @@ -420,6 +424,7 @@ func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -483,7 +488,7 @@ func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *cxpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.ListGenerators, req, settings.GRPC, c.logger, "ListGenerators") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *generatorsGRPCClient) GetGenerator(ctx context.Context, req *cxpb.GetGe var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.GetGenerator, req, settings.GRPC, c.logger, "GetGenerator") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *cxpb.Cr var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.CreateGenerator, req, settings.GRPC, c.logger, "CreateGenerator") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *cxpb.Up var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.UpdateGenerator, req, settings.GRPC, c.logger, "UpdateGenerator") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *cxpb.De opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.generatorsClient.DeleteGenerator, req, settings.GRPC, c.logger, "DeleteGenerator") return err }, opts...) return err @@ -586,7 +591,7 @@ func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -767,21 +772,10 @@ func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *cxpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerators") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -847,17 +841,7 @@ func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *cxpb.GetGe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerator") if err != nil { return err } @@ -917,17 +901,7 @@ func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *cxpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGenerator") if err != nil { return err } @@ -994,17 +968,7 @@ func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *cxpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerator") if err != nil { return err } @@ -1054,15 +1018,8 @@ func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *cxpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGenerator") + return err }, opts...) } @@ -1099,17 +1056,7 @@ func (c *generatorsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1174,21 +1121,10 @@ func (c *generatorsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1248,15 +1184,8 @@ func (c *generatorsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1293,17 +1222,7 @@ func (c *generatorsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1368,21 +1287,10 @@ func (c *generatorsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/generators_client_example_go123_test.go b/dialogflow/cx/apiv3/generators_client_example_go123_test.go index aebbc5b461e1..f5fa55db9f5a 100644 --- a/dialogflow/cx/apiv3/generators_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/generators_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGeneratorsClient_ListGenerators_all() { } for resp, err := range c.ListGenerators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGeneratorsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGeneratorsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/helpers.go b/dialogflow/cx/apiv3/helpers.go index 4ecb78fa9e78..1ccd240c8542 100755 --- a/dialogflow/cx/apiv3/helpers.go +++ b/dialogflow/cx/apiv3/helpers.go @@ -18,10 +18,20 @@ package cx import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dialogflow.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/dialogflow", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dialogflow/cx/apiv3/intents_client.go b/dialogflow/cx/apiv3/intents_client.go index b117f1b27012..88a6f45b5299 100755 --- a/dialogflow/cx/apiv3/intents_client.go +++ b/dialogflow/cx/apiv3/intents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -447,6 +446,8 @@ type intentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIntentsClient creates a new intents client based on gRPC. @@ -473,6 +474,7 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent connPool: connPool, intentsClient: cxpb.NewIntentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -537,6 +539,8 @@ type intentsRESTClient struct { // Points back to the CallOptions field of the containing IntentsClient CallOptions **IntentsCallOptions + + logger *slog.Logger } // NewIntentsRESTClient creates a new intents rest client. @@ -554,6 +558,7 @@ func NewIntentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*In endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -627,7 +632,7 @@ func (c *intentsGRPCClient) ListIntents(ctx context.Context, req *cxpb.ListInten } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ListIntents, req, settings.GRPC, c.logger, "ListIntents") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *intentsGRPCClient) GetIntent(ctx context.Context, req *cxpb.GetIntentRe var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.GetIntent, req, settings.GRPC, c.logger, "GetIntent") return err }, opts...) if err != nil { @@ -680,7 +685,7 @@ func (c *intentsGRPCClient) CreateIntent(ctx context.Context, req *cxpb.CreateIn var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.CreateIntent, req, settings.GRPC, c.logger, "CreateIntent") return err }, opts...) if err != nil { @@ -698,7 +703,7 @@ func (c *intentsGRPCClient) UpdateIntent(ctx context.Context, req *cxpb.UpdateIn var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.UpdateIntent, req, settings.GRPC, c.logger, "UpdateIntent") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *intentsGRPCClient) DeleteIntent(ctx context.Context, req *cxpb.DeleteIn opts = append((*c.CallOptions).DeleteIntent[0:len((*c.CallOptions).DeleteIntent):len((*c.CallOptions).DeleteIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.intentsClient.DeleteIntent, req, settings.GRPC, c.logger, "DeleteIntent") return err }, opts...) return err @@ -730,7 +735,7 @@ func (c *intentsGRPCClient) ImportIntents(ctx context.Context, req *cxpb.ImportI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ImportIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ImportIntents, req, settings.GRPC, c.logger, "ImportIntents") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *intentsGRPCClient) ExportIntents(ctx context.Context, req *cxpb.ExportI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ExportIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ExportIntents, req, settings.GRPC, c.logger, "ExportIntents") return err }, opts...) if err != nil { @@ -770,7 +775,7 @@ func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -799,7 +804,7 @@ func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -848,7 +853,7 @@ func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -954,21 +959,10 @@ func (c *intentsRESTClient) ListIntents(ctx context.Context, req *cxpb.ListInten } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1034,17 +1028,7 @@ func (c *intentsRESTClient) GetIntent(ctx context.Context, req *cxpb.GetIntentRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIntent") if err != nil { return err } @@ -1108,17 +1092,7 @@ func (c *intentsRESTClient) CreateIntent(ctx context.Context, req *cxpb.CreateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIntent") if err != nil { return err } @@ -1189,17 +1163,7 @@ func (c *intentsRESTClient) UpdateIntent(ctx context.Context, req *cxpb.UpdateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIntent") if err != nil { return err } @@ -1250,15 +1214,8 @@ func (c *intentsRESTClient) DeleteIntent(ctx context.Context, req *cxpb.DeleteIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIntent") + return err }, opts...) } @@ -1310,21 +1267,10 @@ func (c *intentsRESTClient) ImportIntents(ctx context.Context, req *cxpb.ImportI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1390,21 +1336,10 @@ func (c *intentsRESTClient) ExportIntents(ctx context.Context, req *cxpb.ExportI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1455,17 +1390,7 @@ func (c *intentsRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1530,21 +1455,10 @@ func (c *intentsRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1604,15 +1518,8 @@ func (c *intentsRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1649,17 +1556,7 @@ func (c *intentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1724,21 +1621,10 @@ func (c *intentsRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/intents_client_example_go123_test.go b/dialogflow/cx/apiv3/intents_client_example_go123_test.go index ef17127397f8..55190b3b49f5 100644 --- a/dialogflow/cx/apiv3/intents_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/intents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIntentsClient_ListIntents_all() { } for resp, err := range c.ListIntents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIntentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIntentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/pages_client.go b/dialogflow/cx/apiv3/pages_client.go index cfb5402d9c39..d330db7a895e 100755 --- a/dialogflow/cx/apiv3/pages_client.go +++ b/dialogflow/cx/apiv3/pages_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -341,6 +340,8 @@ type pagesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPagesClient creates a new pages client based on gRPC. @@ -367,6 +368,7 @@ func NewPagesClient(ctx context.Context, opts ...option.ClientOption) (*PagesCli connPool: connPool, pagesClient: cxpb.NewPagesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -415,6 +417,8 @@ type pagesRESTClient struct { // Points back to the CallOptions field of the containing PagesClient CallOptions **PagesCallOptions + + logger *slog.Logger } // NewPagesRESTClient creates a new pages rest client. @@ -432,6 +436,7 @@ func NewPagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Page endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -495,7 +500,7 @@ func (c *pagesGRPCClient) ListPages(ctx context.Context, req *cxpb.ListPagesRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.ListPages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.ListPages, req, settings.GRPC, c.logger, "ListPages") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *pagesGRPCClient) GetPage(ctx context.Context, req *cxpb.GetPageRequest, var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.GetPage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.GetPage, req, settings.GRPC, c.logger, "GetPage") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *pagesGRPCClient) CreatePage(ctx context.Context, req *cxpb.CreatePageRe var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.CreatePage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.CreatePage, req, settings.GRPC, c.logger, "CreatePage") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *pagesGRPCClient) UpdatePage(ctx context.Context, req *cxpb.UpdatePageRe var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.UpdatePage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.UpdatePage, req, settings.GRPC, c.logger, "UpdatePage") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *pagesGRPCClient) DeletePage(ctx context.Context, req *cxpb.DeletePageRe opts = append((*c.CallOptions).DeletePage[0:len((*c.CallOptions).DeletePage):len((*c.CallOptions).DeletePage)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pagesClient.DeletePage(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pagesClient.DeletePage, req, settings.GRPC, c.logger, "DeletePage") return err }, opts...) return err @@ -598,7 +603,7 @@ func (c *pagesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *pagesGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *pagesGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -676,7 +681,7 @@ func (c *pagesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *pagesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -779,21 +784,10 @@ func (c *pagesRESTClient) ListPages(ctx context.Context, req *cxpb.ListPagesRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -859,17 +853,7 @@ func (c *pagesRESTClient) GetPage(ctx context.Context, req *cxpb.GetPageRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPage") if err != nil { return err } @@ -933,17 +917,7 @@ func (c *pagesRESTClient) CreatePage(ctx context.Context, req *cxpb.CreatePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePage") if err != nil { return err } @@ -1014,17 +988,7 @@ func (c *pagesRESTClient) UpdatePage(ctx context.Context, req *cxpb.UpdatePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePage") if err != nil { return err } @@ -1078,15 +1042,8 @@ func (c *pagesRESTClient) DeletePage(ctx context.Context, req *cxpb.DeletePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePage") + return err }, opts...) } @@ -1123,17 +1080,7 @@ func (c *pagesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1198,21 +1145,10 @@ func (c *pagesRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1272,15 +1208,8 @@ func (c *pagesRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1317,17 +1246,7 @@ func (c *pagesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1392,21 +1311,10 @@ func (c *pagesRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/pages_client_example_go123_test.go b/dialogflow/cx/apiv3/pages_client_example_go123_test.go index 1daff25fc076..f48a642f48eb 100644 --- a/dialogflow/cx/apiv3/pages_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/pages_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePagesClient_ListPages_all() { } for resp, err := range c.ListPages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePagesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePagesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/security_settings_client.go b/dialogflow/cx/apiv3/security_settings_client.go index 0f98f150886c..2c0b4d87732c 100755 --- a/dialogflow/cx/apiv3/security_settings_client.go +++ b/dialogflow/cx/apiv3/security_settings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -333,6 +332,8 @@ type securitySettingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSecuritySettingsClient creates a new security settings service client based on gRPC. @@ -359,6 +360,7 @@ func NewSecuritySettingsClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, securitySettingsClient: cxpb.NewSecuritySettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -407,6 +409,8 @@ type securitySettingsRESTClient struct { // Points back to the CallOptions field of the containing SecuritySettingsClient CallOptions **SecuritySettingsCallOptions + + logger *slog.Logger } // NewSecuritySettingsRESTClient creates a new security settings service rest client. @@ -424,6 +428,7 @@ func NewSecuritySettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -476,7 +481,7 @@ func (c *securitySettingsGRPCClient) CreateSecuritySettings(ctx context.Context, var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.CreateSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.CreateSecuritySettings, req, settings.GRPC, c.logger, "CreateSecuritySettings") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *securitySettingsGRPCClient) GetSecuritySettings(ctx context.Context, re var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.GetSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.GetSecuritySettings, req, settings.GRPC, c.logger, "GetSecuritySettings") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *securitySettingsGRPCClient) UpdateSecuritySettings(ctx context.Context, var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.UpdateSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.UpdateSecuritySettings, req, settings.GRPC, c.logger, "UpdateSecuritySettings") return err }, opts...) if err != nil { @@ -541,7 +546,7 @@ func (c *securitySettingsGRPCClient) ListSecuritySettings(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.ListSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.ListSecuritySettings, req, settings.GRPC, c.logger, "ListSecuritySettings") return err }, opts...) if err != nil { @@ -575,7 +580,7 @@ func (c *securitySettingsGRPCClient) DeleteSecuritySettings(ctx context.Context, opts = append((*c.CallOptions).DeleteSecuritySettings[0:len((*c.CallOptions).DeleteSecuritySettings):len((*c.CallOptions).DeleteSecuritySettings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.securitySettingsClient.DeleteSecuritySettings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.securitySettingsClient.DeleteSecuritySettings, req, settings.GRPC, c.logger, "DeleteSecuritySettings") return err }, opts...) return err @@ -590,7 +595,7 @@ func (c *securitySettingsGRPCClient) GetLocation(ctx context.Context, req *locat var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *securitySettingsGRPCClient) ListLocations(ctx context.Context, req *loc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -653,7 +658,7 @@ func (c *securitySettingsGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -668,7 +673,7 @@ func (c *securitySettingsGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *securitySettingsGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -763,17 +768,7 @@ func (c *securitySettingsRESTClient) CreateSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecuritySettings") if err != nil { return err } @@ -825,17 +820,7 @@ func (c *securitySettingsRESTClient) GetSecuritySettings(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecuritySettings") if err != nil { return err } @@ -900,17 +885,7 @@ func (c *securitySettingsRESTClient) UpdateSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecuritySettings") if err != nil { return err } @@ -972,21 +947,10 @@ func (c *securitySettingsRESTClient) ListSecuritySettings(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecuritySettings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1047,15 +1011,8 @@ func (c *securitySettingsRESTClient) DeleteSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecuritySettings") + return err }, opts...) } @@ -1092,17 +1049,7 @@ func (c *securitySettingsRESTClient) GetLocation(ctx context.Context, req *locat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1167,21 +1114,10 @@ func (c *securitySettingsRESTClient) ListLocations(ctx context.Context, req *loc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1241,15 +1177,8 @@ func (c *securitySettingsRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1286,17 +1215,7 @@ func (c *securitySettingsRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1361,21 +1280,10 @@ func (c *securitySettingsRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/security_settings_client_example_go123_test.go b/dialogflow/cx/apiv3/security_settings_client_example_go123_test.go index d84365d7e9e7..37e3520457c7 100644 --- a/dialogflow/cx/apiv3/security_settings_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/security_settings_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSecuritySettingsClient_ListSecuritySettings_all() { } for resp, err := range c.ListSecuritySettings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSecuritySettingsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSecuritySettingsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/session_entity_types_client.go b/dialogflow/cx/apiv3/session_entity_types_client.go index f604e31c398f..eeaabb2cd111 100755 --- a/dialogflow/cx/apiv3/session_entity_types_client.go +++ b/dialogflow/cx/apiv3/session_entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -330,6 +329,8 @@ type sessionEntityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionEntityTypesClient creates a new session entity types client based on gRPC. @@ -357,6 +358,7 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, sessionEntityTypesClient: cxpb.NewSessionEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -405,6 +407,8 @@ type sessionEntityTypesRESTClient struct { // Points back to the CallOptions field of the containing SessionEntityTypesClient CallOptions **SessionEntityTypesCallOptions + + logger *slog.Logger } // NewSessionEntityTypesRESTClient creates a new session entity types rest client. @@ -423,6 +427,7 @@ func NewSessionEntityTypesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -486,7 +491,7 @@ func (c *sessionEntityTypesGRPCClient) ListSessionEntityTypes(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.ListSessionEntityTypes, req, settings.GRPC, c.logger, "ListSessionEntityTypes") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *sessionEntityTypesGRPCClient) GetSessionEntityType(ctx context.Context, var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.GetSessionEntityType, req, settings.GRPC, c.logger, "GetSessionEntityType") return err }, opts...) if err != nil { @@ -539,7 +544,7 @@ func (c *sessionEntityTypesGRPCClient) CreateSessionEntityType(ctx context.Conte var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.CreateSessionEntityType, req, settings.GRPC, c.logger, "CreateSessionEntityType") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *sessionEntityTypesGRPCClient) UpdateSessionEntityType(ctx context.Conte var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.UpdateSessionEntityType, req, settings.GRPC, c.logger, "UpdateSessionEntityType") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Conte opts = append((*c.CallOptions).DeleteSessionEntityType[0:len((*c.CallOptions).DeleteSessionEntityType):len((*c.CallOptions).DeleteSessionEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sessionEntityTypesClient.DeleteSessionEntityType, req, settings.GRPC, c.logger, "DeleteSessionEntityType") return err }, opts...) return err @@ -589,7 +594,7 @@ func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -667,7 +672,7 @@ func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -767,21 +772,10 @@ func (c *sessionEntityTypesRESTClient) ListSessionEntityTypes(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessionEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -844,17 +838,7 @@ func (c *sessionEntityTypesRESTClient) GetSessionEntityType(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSessionEntityType") if err != nil { return err } @@ -911,17 +895,7 @@ func (c *sessionEntityTypesRESTClient) CreateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSessionEntityType") if err != nil { return err } @@ -985,17 +959,7 @@ func (c *sessionEntityTypesRESTClient) UpdateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSessionEntityType") if err != nil { return err } @@ -1042,15 +1006,8 @@ func (c *sessionEntityTypesRESTClient) DeleteSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSessionEntityType") + return err }, opts...) } @@ -1087,17 +1044,7 @@ func (c *sessionEntityTypesRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1162,21 +1109,10 @@ func (c *sessionEntityTypesRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,15 +1172,8 @@ func (c *sessionEntityTypesRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1281,17 +1210,7 @@ func (c *sessionEntityTypesRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1356,21 +1275,10 @@ func (c *sessionEntityTypesRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/session_entity_types_client_example_go123_test.go b/dialogflow/cx/apiv3/session_entity_types_client_example_go123_test.go index 8df85c41a43e..63b37164e7c8 100644 --- a/dialogflow/cx/apiv3/session_entity_types_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/session_entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes_all() { } for resp, err := range c.ListSessionEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSessionEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSessionEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/sessions_client.go b/dialogflow/cx/apiv3/sessions_client.go index f82585bd7dfe..6216a42ca5f7 100755 --- a/dialogflow/cx/apiv3/sessions_client.go +++ b/dialogflow/cx/apiv3/sessions_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -353,6 +352,8 @@ type sessionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionsClient creates a new sessions client based on gRPC. @@ -382,6 +383,7 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi connPool: connPool, sessionsClient: cxpb.NewSessionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -430,6 +432,8 @@ type sessionsRESTClient struct { // Points back to the CallOptions field of the containing SessionsClient CallOptions **SessionsCallOptions + + logger *slog.Logger } // NewSessionsRESTClient creates a new sessions rest client. @@ -450,6 +454,7 @@ func NewSessionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -502,7 +507,7 @@ func (c *sessionsGRPCClient) DetectIntent(ctx context.Context, req *cxpb.DetectI var resp *cxpb.DetectIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.DetectIntent, req, settings.GRPC, c.logger, "DetectIntent") return err }, opts...) if err != nil { @@ -520,7 +525,9 @@ func (c *sessionsGRPCClient) ServerStreamingDetectIntent(ctx context.Context, re var resp cxpb.Sessions_ServerStreamingDetectIntentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ServerStreamingDetectIntent") resp, err = c.sessionsClient.ServerStreamingDetectIntent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ServerStreamingDetectIntent") return err }, opts...) if err != nil { @@ -535,7 +542,9 @@ func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingDetectIntent[0:len((*c.CallOptions).StreamingDetectIntent):len((*c.CallOptions).StreamingDetectIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") return err }, opts...) if err != nil { @@ -553,7 +562,7 @@ func (c *sessionsGRPCClient) MatchIntent(ctx context.Context, req *cxpb.MatchInt var resp *cxpb.MatchIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.MatchIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.MatchIntent, req, settings.GRPC, c.logger, "MatchIntent") return err }, opts...) if err != nil { @@ -571,7 +580,7 @@ func (c *sessionsGRPCClient) FulfillIntent(ctx context.Context, req *cxpb.Fulfil var resp *cxpb.FulfillIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.FulfillIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.FulfillIntent, req, settings.GRPC, c.logger, "FulfillIntent") return err }, opts...) if err != nil { @@ -589,7 +598,7 @@ func (c *sessionsGRPCClient) SubmitAnswerFeedback(ctx context.Context, req *cxpb var resp *cxpb.AnswerFeedback err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.SubmitAnswerFeedback(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.SubmitAnswerFeedback, req, settings.GRPC, c.logger, "SubmitAnswerFeedback") return err }, opts...) if err != nil { @@ -607,7 +616,7 @@ func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -636,7 +645,7 @@ func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -670,7 +679,7 @@ func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -685,7 +694,7 @@ func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -714,7 +723,7 @@ func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -786,17 +795,7 @@ func (c *sessionsRESTClient) DetectIntent(ctx context.Context, req *cxpb.DetectI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetectIntent") if err != nil { return err } @@ -854,15 +853,11 @@ func (c *sessionsRESTClient) ServerStreamingDetectIntent(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ServerStreamingDetectIntent") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &serverStreamingDetectIntentRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -976,17 +971,7 @@ func (c *sessionsRESTClient) MatchIntent(ctx context.Context, req *cxpb.MatchInt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MatchIntent") if err != nil { return err } @@ -1048,17 +1033,7 @@ func (c *sessionsRESTClient) FulfillIntent(ctx context.Context, req *cxpb.Fulfil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FulfillIntent") if err != nil { return err } @@ -1115,17 +1090,7 @@ func (c *sessionsRESTClient) SubmitAnswerFeedback(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitAnswerFeedback") if err != nil { return err } @@ -1175,17 +1140,7 @@ func (c *sessionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1250,21 +1205,10 @@ func (c *sessionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1324,15 +1268,8 @@ func (c *sessionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1369,17 +1306,7 @@ func (c *sessionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1444,21 +1371,10 @@ func (c *sessionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/sessions_client_example_go123_test.go b/dialogflow/cx/apiv3/sessions_client_example_go123_test.go index 6861060d41a2..6c4fc81784c1 100644 --- a/dialogflow/cx/apiv3/sessions_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/sessions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/test_cases_client.go b/dialogflow/cx/apiv3/test_cases_client.go index 9ec293563a03..56a3fe553a68 100755 --- a/dialogflow/cx/apiv3/test_cases_client.go +++ b/dialogflow/cx/apiv3/test_cases_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -624,6 +623,8 @@ type testCasesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTestCasesClient creates a new test cases client based on gRPC. @@ -651,6 +652,7 @@ func NewTestCasesClient(ctx context.Context, opts ...option.ClientOption) (*Test connPool: connPool, testCasesClient: cxpb.NewTestCasesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -715,6 +717,8 @@ type testCasesRESTClient struct { // Points back to the CallOptions field of the containing TestCasesClient CallOptions **TestCasesCallOptions + + logger *slog.Logger } // NewTestCasesRESTClient creates a new test cases rest client. @@ -733,6 +737,7 @@ func NewTestCasesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -806,7 +811,7 @@ func (c *testCasesGRPCClient) ListTestCases(ctx context.Context, req *cxpb.ListT } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ListTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ListTestCases, req, settings.GRPC, c.logger, "ListTestCases") return err }, opts...) if err != nil { @@ -840,7 +845,7 @@ func (c *testCasesGRPCClient) BatchDeleteTestCases(ctx context.Context, req *cxp opts = append((*c.CallOptions).BatchDeleteTestCases[0:len((*c.CallOptions).BatchDeleteTestCases):len((*c.CallOptions).BatchDeleteTestCases)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.testCasesClient.BatchDeleteTestCases(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.testCasesClient.BatchDeleteTestCases, req, settings.GRPC, c.logger, "BatchDeleteTestCases") return err }, opts...) return err @@ -855,7 +860,7 @@ func (c *testCasesGRPCClient) GetTestCase(ctx context.Context, req *cxpb.GetTest var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.GetTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.GetTestCase, req, settings.GRPC, c.logger, "GetTestCase") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *testCasesGRPCClient) CreateTestCase(ctx context.Context, req *cxpb.Crea var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.CreateTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.CreateTestCase, req, settings.GRPC, c.logger, "CreateTestCase") return err }, opts...) if err != nil { @@ -891,7 +896,7 @@ func (c *testCasesGRPCClient) UpdateTestCase(ctx context.Context, req *cxpb.Upda var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.UpdateTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.UpdateTestCase, req, settings.GRPC, c.logger, "UpdateTestCase") return err }, opts...) if err != nil { @@ -909,7 +914,7 @@ func (c *testCasesGRPCClient) RunTestCase(ctx context.Context, req *cxpb.RunTest var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.RunTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.RunTestCase, req, settings.GRPC, c.logger, "RunTestCase") return err }, opts...) if err != nil { @@ -929,7 +934,7 @@ func (c *testCasesGRPCClient) BatchRunTestCases(ctx context.Context, req *cxpb.B var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.BatchRunTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.BatchRunTestCases, req, settings.GRPC, c.logger, "BatchRunTestCases") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *testCasesGRPCClient) CalculateCoverage(ctx context.Context, req *cxpb.C var resp *cxpb.CalculateCoverageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.CalculateCoverage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.CalculateCoverage, req, settings.GRPC, c.logger, "CalculateCoverage") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *testCasesGRPCClient) ImportTestCases(ctx context.Context, req *cxpb.Imp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ImportTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ImportTestCases, req, settings.GRPC, c.logger, "ImportTestCases") return err }, opts...) if err != nil { @@ -987,7 +992,7 @@ func (c *testCasesGRPCClient) ExportTestCases(ctx context.Context, req *cxpb.Exp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ExportTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ExportTestCases, req, settings.GRPC, c.logger, "ExportTestCases") return err }, opts...) if err != nil { @@ -1018,7 +1023,7 @@ func (c *testCasesGRPCClient) ListTestCaseResults(ctx context.Context, req *cxpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ListTestCaseResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ListTestCaseResults, req, settings.GRPC, c.logger, "ListTestCaseResults") return err }, opts...) if err != nil { @@ -1053,7 +1058,7 @@ func (c *testCasesGRPCClient) GetTestCaseResult(ctx context.Context, req *cxpb.G var resp *cxpb.TestCaseResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.GetTestCaseResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.GetTestCaseResult, req, settings.GRPC, c.logger, "GetTestCaseResult") return err }, opts...) if err != nil { @@ -1071,7 +1076,7 @@ func (c *testCasesGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *testCasesGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1134,7 +1139,7 @@ func (c *testCasesGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1149,7 +1154,7 @@ func (c *testCasesGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1178,7 +1183,7 @@ func (c *testCasesGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1252,21 +1257,10 @@ func (c *testCasesRESTClient) ListTestCases(ctx context.Context, req *cxpb.ListT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTestCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1332,15 +1326,8 @@ func (c *testCasesRESTClient) BatchDeleteTestCases(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteTestCases") + return err }, opts...) } @@ -1377,17 +1364,7 @@ func (c *testCasesRESTClient) GetTestCase(ctx context.Context, req *cxpb.GetTest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTestCase") if err != nil { return err } @@ -1444,17 +1421,7 @@ func (c *testCasesRESTClient) CreateTestCase(ctx context.Context, req *cxpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTestCase") if err != nil { return err } @@ -1518,17 +1485,7 @@ func (c *testCasesRESTClient) UpdateTestCase(ctx context.Context, req *cxpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTestCase") if err != nil { return err } @@ -1593,21 +1550,10 @@ func (c *testCasesRESTClient) RunTestCase(ctx context.Context, req *cxpb.RunTest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTestCase") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1673,21 +1619,10 @@ func (c *testCasesRESTClient) BatchRunTestCases(ctx context.Context, req *cxpb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRunTestCases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1739,17 +1674,7 @@ func (c *testCasesRESTClient) CalculateCoverage(ctx context.Context, req *cxpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateCoverage") if err != nil { return err } @@ -1816,21 +1741,10 @@ func (c *testCasesRESTClient) ImportTestCases(ctx context.Context, req *cxpb.Imp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportTestCases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1897,21 +1811,10 @@ func (c *testCasesRESTClient) ExportTestCases(ctx context.Context, req *cxpb.Exp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportTestCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1978,21 +1881,10 @@ func (c *testCasesRESTClient) ListTestCaseResults(ctx context.Context, req *cxpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTestCaseResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2055,17 +1947,7 @@ func (c *testCasesRESTClient) GetTestCaseResult(ctx context.Context, req *cxpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTestCaseResult") if err != nil { return err } @@ -2115,17 +1997,7 @@ func (c *testCasesRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2190,21 +2062,10 @@ func (c *testCasesRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2264,15 +2125,8 @@ func (c *testCasesRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2309,17 +2163,7 @@ func (c *testCasesRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2384,21 +2228,10 @@ func (c *testCasesRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/test_cases_client_example_go123_test.go b/dialogflow/cx/apiv3/test_cases_client_example_go123_test.go index fe569bb95a7f..dc4785df54f1 100644 --- a/dialogflow/cx/apiv3/test_cases_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/test_cases_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTestCasesClient_ListTestCaseResults_all() { } for resp, err := range c.ListTestCaseResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTestCasesClient_ListTestCases_all() { } for resp, err := range c.ListTestCases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTestCasesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleTestCasesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/transition_route_groups_client.go b/dialogflow/cx/apiv3/transition_route_groups_client.go index cd5b3a938a84..c7f8a95d902f 100755 --- a/dialogflow/cx/apiv3/transition_route_groups_client.go +++ b/dialogflow/cx/apiv3/transition_route_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -347,6 +346,8 @@ type transitionRouteGroupsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTransitionRouteGroupsClient creates a new transition route groups client based on gRPC. @@ -374,6 +375,7 @@ func NewTransitionRouteGroupsClient(ctx context.Context, opts ...option.ClientOp connPool: connPool, transitionRouteGroupsClient: cxpb.NewTransitionRouteGroupsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -422,6 +424,8 @@ type transitionRouteGroupsRESTClient struct { // Points back to the CallOptions field of the containing TransitionRouteGroupsClient CallOptions **TransitionRouteGroupsCallOptions + + logger *slog.Logger } // NewTransitionRouteGroupsRESTClient creates a new transition route groups rest client. @@ -440,6 +444,7 @@ func NewTransitionRouteGroupsRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -503,7 +508,7 @@ func (c *transitionRouteGroupsGRPCClient) ListTransitionRouteGroups(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.ListTransitionRouteGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.ListTransitionRouteGroups, req, settings.GRPC, c.logger, "ListTransitionRouteGroups") return err }, opts...) if err != nil { @@ -538,7 +543,7 @@ func (c *transitionRouteGroupsGRPCClient) GetTransitionRouteGroup(ctx context.Co var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.GetTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.GetTransitionRouteGroup, req, settings.GRPC, c.logger, "GetTransitionRouteGroup") return err }, opts...) if err != nil { @@ -556,7 +561,7 @@ func (c *transitionRouteGroupsGRPCClient) CreateTransitionRouteGroup(ctx context var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.CreateTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.CreateTransitionRouteGroup, req, settings.GRPC, c.logger, "CreateTransitionRouteGroup") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *transitionRouteGroupsGRPCClient) UpdateTransitionRouteGroup(ctx context var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.UpdateTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.UpdateTransitionRouteGroup, req, settings.GRPC, c.logger, "UpdateTransitionRouteGroup") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *transitionRouteGroupsGRPCClient) DeleteTransitionRouteGroup(ctx context opts = append((*c.CallOptions).DeleteTransitionRouteGroup[0:len((*c.CallOptions).DeleteTransitionRouteGroup):len((*c.CallOptions).DeleteTransitionRouteGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.transitionRouteGroupsClient.DeleteTransitionRouteGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.transitionRouteGroupsClient.DeleteTransitionRouteGroup, req, settings.GRPC, c.logger, "DeleteTransitionRouteGroup") return err }, opts...) return err @@ -606,7 +611,7 @@ func (c *transitionRouteGroupsGRPCClient) GetLocation(ctx context.Context, req * var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *transitionRouteGroupsGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -669,7 +674,7 @@ func (c *transitionRouteGroupsGRPCClient) CancelOperation(ctx context.Context, r opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -684,7 +689,7 @@ func (c *transitionRouteGroupsGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -713,7 +718,7 @@ func (c *transitionRouteGroupsGRPCClient) ListOperations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -787,21 +792,10 @@ func (c *transitionRouteGroupsRESTClient) ListTransitionRouteGroups(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransitionRouteGroups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -868,17 +862,7 @@ func (c *transitionRouteGroupsRESTClient) GetTransitionRouteGroup(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTransitionRouteGroup") if err != nil { return err } @@ -944,17 +928,7 @@ func (c *transitionRouteGroupsRESTClient) CreateTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTransitionRouteGroup") if err != nil { return err } @@ -1026,17 +1000,7 @@ func (c *transitionRouteGroupsRESTClient) UpdateTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTransitionRouteGroup") if err != nil { return err } @@ -1091,15 +1055,8 @@ func (c *transitionRouteGroupsRESTClient) DeleteTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTransitionRouteGroup") + return err }, opts...) } @@ -1136,17 +1093,7 @@ func (c *transitionRouteGroupsRESTClient) GetLocation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1211,21 +1158,10 @@ func (c *transitionRouteGroupsRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1285,15 +1221,8 @@ func (c *transitionRouteGroupsRESTClient) CancelOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1330,17 +1259,7 @@ func (c *transitionRouteGroupsRESTClient) GetOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1405,21 +1324,10 @@ func (c *transitionRouteGroupsRESTClient) ListOperations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/transition_route_groups_client_example_go123_test.go b/dialogflow/cx/apiv3/transition_route_groups_client_example_go123_test.go index 244f6c299fd2..5f9dc633e6a0 100644 --- a/dialogflow/cx/apiv3/transition_route_groups_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/transition_route_groups_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTransitionRouteGroupsClient_ListTransitionRouteGroups_all() { } for resp, err := range c.ListTransitionRouteGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTransitionRouteGroupsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTransitionRouteGroupsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/versions_client.go b/dialogflow/cx/apiv3/versions_client.go index a23a3ec95973..71a69e945f83 100755 --- a/dialogflow/cx/apiv3/versions_client.go +++ b/dialogflow/cx/apiv3/versions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -436,6 +435,8 @@ type versionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVersionsClient creates a new versions client based on gRPC. @@ -462,6 +463,7 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi connPool: connPool, versionsClient: cxpb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -526,6 +528,8 @@ type versionsRESTClient struct { // Points back to the CallOptions field of the containing VersionsClient CallOptions **VersionsCallOptions + + logger *slog.Logger } // NewVersionsRESTClient creates a new versions rest client. @@ -543,6 +547,7 @@ func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*V endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -616,7 +621,7 @@ func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *cxpb.ListVer } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -651,7 +656,7 @@ func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *cxpb.GetVersio var resp *cxpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -669,7 +674,7 @@ func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *cxpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CreateVersion, req, settings.GRPC, c.logger, "CreateVersion") return err }, opts...) if err != nil { @@ -689,7 +694,7 @@ func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *cxpb.Update var resp *cxpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -706,7 +711,7 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *cxpb.Delete opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.versionsClient.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) return err @@ -721,7 +726,7 @@ func (c *versionsGRPCClient) LoadVersion(ctx context.Context, req *cxpb.LoadVers var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.LoadVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.LoadVersion, req, settings.GRPC, c.logger, "LoadVersion") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *versionsGRPCClient) CompareVersions(ctx context.Context, req *cxpb.Comp var resp *cxpb.CompareVersionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CompareVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CompareVersions, req, settings.GRPC, c.logger, "CompareVersions") return err }, opts...) if err != nil { @@ -759,7 +764,7 @@ func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -837,7 +842,7 @@ func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -866,7 +871,7 @@ func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -938,21 +943,10 @@ func (c *versionsRESTClient) ListVersions(ctx context.Context, req *cxpb.ListVer } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1015,17 +1009,7 @@ func (c *versionsRESTClient) GetVersion(ctx context.Context, req *cxpb.GetVersio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -1091,21 +1075,10 @@ func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *cxpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1170,17 +1143,7 @@ func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *cxpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -1227,15 +1190,8 @@ func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *cxpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") + return err }, opts...) } @@ -1287,21 +1243,10 @@ func (c *versionsRESTClient) LoadVersion(ctx context.Context, req *cxpb.LoadVers httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LoadVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1358,17 +1303,7 @@ func (c *versionsRESTClient) CompareVersions(ctx context.Context, req *cxpb.Comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompareVersions") if err != nil { return err } @@ -1418,17 +1353,7 @@ func (c *versionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1493,21 +1418,10 @@ func (c *versionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1567,15 +1481,8 @@ func (c *versionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1612,17 +1519,7 @@ func (c *versionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1687,21 +1584,10 @@ func (c *versionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/versions_client_example_go123_test.go b/dialogflow/cx/apiv3/versions_client_example_go123_test.go index eb52c4d4f740..78eb26ccf1ee 100644 --- a/dialogflow/cx/apiv3/versions_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/versions_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVersionsClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVersionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVersionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3/webhooks_client.go b/dialogflow/cx/apiv3/webhooks_client.go index 804b35597410..fd0f4b6a689f 100755 --- a/dialogflow/cx/apiv3/webhooks_client.go +++ b/dialogflow/cx/apiv3/webhooks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type webhooksGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWebhooksClient creates a new webhooks client based on gRPC. @@ -355,6 +356,7 @@ func NewWebhooksClient(ctx context.Context, opts ...option.ClientOption) (*Webho connPool: connPool, webhooksClient: cxpb.NewWebhooksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type webhooksRESTClient struct { // Points back to the CallOptions field of the containing WebhooksClient CallOptions **WebhooksCallOptions + + logger *slog.Logger } // NewWebhooksRESTClient creates a new webhooks rest client. @@ -420,6 +424,7 @@ func NewWebhooksRESTClient(ctx context.Context, opts ...option.ClientOption) (*W endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -483,7 +488,7 @@ func (c *webhooksGRPCClient) ListWebhooks(ctx context.Context, req *cxpb.ListWeb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.ListWebhooks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.ListWebhooks, req, settings.GRPC, c.logger, "ListWebhooks") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *webhooksGRPCClient) GetWebhook(ctx context.Context, req *cxpb.GetWebhoo var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.GetWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.GetWebhook, req, settings.GRPC, c.logger, "GetWebhook") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *webhooksGRPCClient) CreateWebhook(ctx context.Context, req *cxpb.Create var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.CreateWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.CreateWebhook, req, settings.GRPC, c.logger, "CreateWebhook") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *webhooksGRPCClient) UpdateWebhook(ctx context.Context, req *cxpb.Update var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.UpdateWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.UpdateWebhook, req, settings.GRPC, c.logger, "UpdateWebhook") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *webhooksGRPCClient) DeleteWebhook(ctx context.Context, req *cxpb.Delete opts = append((*c.CallOptions).DeleteWebhook[0:len((*c.CallOptions).DeleteWebhook):len((*c.CallOptions).DeleteWebhook)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.webhooksClient.DeleteWebhook(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.webhooksClient.DeleteWebhook, req, settings.GRPC, c.logger, "DeleteWebhook") return err }, opts...) return err @@ -586,7 +591,7 @@ func (c *webhooksGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *webhooksGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *webhooksGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *webhooksGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *webhooksGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -764,21 +769,10 @@ func (c *webhooksRESTClient) ListWebhooks(ctx context.Context, req *cxpb.ListWeb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWebhooks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -841,17 +835,7 @@ func (c *webhooksRESTClient) GetWebhook(ctx context.Context, req *cxpb.GetWebhoo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWebhook") if err != nil { return err } @@ -908,17 +892,7 @@ func (c *webhooksRESTClient) CreateWebhook(ctx context.Context, req *cxpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWebhook") if err != nil { return err } @@ -982,17 +956,7 @@ func (c *webhooksRESTClient) UpdateWebhook(ctx context.Context, req *cxpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWebhook") if err != nil { return err } @@ -1042,15 +1006,8 @@ func (c *webhooksRESTClient) DeleteWebhook(ctx context.Context, req *cxpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWebhook") + return err }, opts...) } @@ -1087,17 +1044,7 @@ func (c *webhooksRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1162,21 +1109,10 @@ func (c *webhooksRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,15 +1172,8 @@ func (c *webhooksRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1281,17 +1210,7 @@ func (c *webhooksRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1356,21 +1275,10 @@ func (c *webhooksRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3/webhooks_client_example_go123_test.go b/dialogflow/cx/apiv3/webhooks_client_example_go123_test.go index 7cf895cfc0d0..23356c45cd8d 100644 --- a/dialogflow/cx/apiv3/webhooks_client_example_go123_test.go +++ b/dialogflow/cx/apiv3/webhooks_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleWebhooksClient_ListWebhooks_all() { } for resp, err := range c.ListWebhooks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleWebhooksClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleWebhooksClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/agents_client.go b/dialogflow/cx/apiv3beta1/agents_client.go index b0791c14b363..41393b150f26 100755 --- a/dialogflow/cx/apiv3beta1/agents_client.go +++ b/dialogflow/cx/apiv3beta1/agents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -573,6 +572,8 @@ type agentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAgentsClient creates a new agents client based on gRPC. @@ -599,6 +600,7 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC connPool: connPool, agentsClient: cxpb.NewAgentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -663,6 +665,8 @@ type agentsRESTClient struct { // Points back to the CallOptions field of the containing AgentsClient CallOptions **AgentsCallOptions + + logger *slog.Logger } // NewAgentsRESTClient creates a new agents rest client. @@ -680,6 +684,7 @@ func NewAgentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Age endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -753,7 +758,7 @@ func (c *agentsGRPCClient) ListAgents(ctx context.Context, req *cxpb.ListAgentsR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ListAgents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ListAgents, req, settings.GRPC, c.logger, "ListAgents") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *agentsGRPCClient) GetAgent(ctx context.Context, req *cxpb.GetAgentReque var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgent, req, settings.GRPC, c.logger, "GetAgent") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *agentsGRPCClient) CreateAgent(ctx context.Context, req *cxpb.CreateAgen var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.CreateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.CreateAgent, req, settings.GRPC, c.logger, "CreateAgent") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *agentsGRPCClient) UpdateAgent(ctx context.Context, req *cxpb.UpdateAgen var resp *cxpb.Agent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.UpdateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.UpdateAgent, req, settings.GRPC, c.logger, "UpdateAgent") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *agentsGRPCClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgen opts = append((*c.CallOptions).DeleteAgent[0:len((*c.CallOptions).DeleteAgent):len((*c.CallOptions).DeleteAgent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.agentsClient.DeleteAgent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.agentsClient.DeleteAgent, req, settings.GRPC, c.logger, "DeleteAgent") return err }, opts...) return err @@ -856,7 +861,7 @@ func (c *agentsGRPCClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ExportAgent, req, settings.GRPC, c.logger, "ExportAgent") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *agentsGRPCClient) RestoreAgent(ctx context.Context, req *cxpb.RestoreAg var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.RestoreAgent, req, settings.GRPC, c.logger, "RestoreAgent") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *agentsGRPCClient) ValidateAgent(ctx context.Context, req *cxpb.Validate var resp *cxpb.AgentValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.ValidateAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.ValidateAgent, req, settings.GRPC, c.logger, "ValidateAgent") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *agentsGRPCClient) GetAgentValidationResult(ctx context.Context, req *cx var resp *cxpb.AgentValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetAgentValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetAgentValidationResult, req, settings.GRPC, c.logger, "GetAgentValidationResult") return err }, opts...) if err != nil { @@ -932,7 +937,7 @@ func (c *agentsGRPCClient) GetGenerativeSettings(ctx context.Context, req *cxpb. var resp *cxpb.GenerativeSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.GetGenerativeSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.GetGenerativeSettings, req, settings.GRPC, c.logger, "GetGenerativeSettings") return err }, opts...) if err != nil { @@ -950,7 +955,7 @@ func (c *agentsGRPCClient) UpdateGenerativeSettings(ctx context.Context, req *cx var resp *cxpb.GenerativeSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.agentsClient.UpdateGenerativeSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.agentsClient.UpdateGenerativeSettings, req, settings.GRPC, c.logger, "UpdateGenerativeSettings") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -997,7 +1002,7 @@ func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1031,7 +1036,7 @@ func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1046,7 +1051,7 @@ func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1146,21 +1151,10 @@ func (c *agentsRESTClient) ListAgents(ctx context.Context, req *cxpb.ListAgentsR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAgents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1223,17 +1217,7 @@ func (c *agentsRESTClient) GetAgent(ctx context.Context, req *cxpb.GetAgentReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgent") if err != nil { return err } @@ -1294,17 +1278,7 @@ func (c *agentsRESTClient) CreateAgent(ctx context.Context, req *cxpb.CreateAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAgent") if err != nil { return err } @@ -1372,17 +1346,7 @@ func (c *agentsRESTClient) UpdateAgent(ctx context.Context, req *cxpb.UpdateAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAgent") if err != nil { return err } @@ -1429,15 +1393,8 @@ func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAgent") + return err }, opts...) } @@ -1489,21 +1446,10 @@ func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,21 +1522,10 @@ func (c *agentsRESTClient) RestoreAgent(ctx context.Context, req *cxpb.RestoreAg httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreAgent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1649,17 +1584,7 @@ func (c *agentsRESTClient) ValidateAgent(ctx context.Context, req *cxpb.Validate httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateAgent") if err != nil { return err } @@ -1713,17 +1638,7 @@ func (c *agentsRESTClient) GetAgentValidationResult(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgentValidationResult") if err != nil { return err } @@ -1774,17 +1689,7 @@ func (c *agentsRESTClient) GetGenerativeSettings(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerativeSettings") if err != nil { return err } @@ -1848,17 +1753,7 @@ func (c *agentsRESTClient) UpdateGenerativeSettings(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeSettings") if err != nil { return err } @@ -1908,17 +1803,7 @@ func (c *agentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1983,21 +1868,10 @@ func (c *agentsRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2057,15 +1931,8 @@ func (c *agentsRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2102,17 +1969,7 @@ func (c *agentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2177,21 +2034,10 @@ func (c *agentsRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/agents_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/agents_client_example_go123_test.go index eacf7cd27062..cf01ac38c8f4 100644 --- a/dialogflow/cx/apiv3beta1/agents_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/agents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleAgentsClient_ListAgents_all() { } for resp, err := range c.ListAgents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleAgentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleAgentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/changelogs_client.go b/dialogflow/cx/apiv3beta1/changelogs_client.go index 55acd3b8807b..f4d1bf8e9616 100755 --- a/dialogflow/cx/apiv3beta1/changelogs_client.go +++ b/dialogflow/cx/apiv3beta1/changelogs_client.go @@ -19,7 +19,7 @@ package cx import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -239,6 +238,8 @@ type changelogsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewChangelogsClient creates a new changelogs client based on gRPC. @@ -266,6 +267,7 @@ func NewChangelogsClient(ctx context.Context, opts ...option.ClientOption) (*Cha connPool: connPool, changelogsClient: cxpb.NewChangelogsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -314,6 +316,8 @@ type changelogsRESTClient struct { // Points back to the CallOptions field of the containing ChangelogsClient CallOptions **ChangelogsCallOptions + + logger *slog.Logger } // NewChangelogsRESTClient creates a new changelogs rest client. @@ -332,6 +336,7 @@ func NewChangelogsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -395,7 +400,7 @@ func (c *changelogsGRPCClient) ListChangelogs(ctx context.Context, req *cxpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.changelogsClient.ListChangelogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.changelogsClient.ListChangelogs, req, settings.GRPC, c.logger, "ListChangelogs") return err }, opts...) if err != nil { @@ -430,7 +435,7 @@ func (c *changelogsGRPCClient) GetChangelog(ctx context.Context, req *cxpb.GetCh var resp *cxpb.Changelog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.changelogsClient.GetChangelog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.changelogsClient.GetChangelog, req, settings.GRPC, c.logger, "GetChangelog") return err }, opts...) if err != nil { @@ -448,7 +453,7 @@ func (c *changelogsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -477,7 +482,7 @@ func (c *changelogsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -511,7 +516,7 @@ func (c *changelogsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -526,7 +531,7 @@ func (c *changelogsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -555,7 +560,7 @@ func (c *changelogsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -629,21 +634,10 @@ func (c *changelogsRESTClient) ListChangelogs(ctx context.Context, req *cxpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChangelogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -706,17 +700,7 @@ func (c *changelogsRESTClient) GetChangelog(ctx context.Context, req *cxpb.GetCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChangelog") if err != nil { return err } @@ -766,17 +750,7 @@ func (c *changelogsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -841,21 +815,10 @@ func (c *changelogsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -915,15 +878,8 @@ func (c *changelogsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -960,17 +916,7 @@ func (c *changelogsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1035,21 +981,10 @@ func (c *changelogsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/changelogs_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/changelogs_client_example_go123_test.go index fa33cdc6abf0..0fa07cb7c5a8 100644 --- a/dialogflow/cx/apiv3beta1/changelogs_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/changelogs_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleChangelogsClient_ListChangelogs_all() { } for resp, err := range c.ListChangelogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleChangelogsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleChangelogsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/conversation_history_client.go b/dialogflow/cx/apiv3beta1/conversation_history_client.go index 0d99fad11b12..a8128d342253 100755 --- a/dialogflow/cx/apiv3beta1/conversation_history_client.go +++ b/dialogflow/cx/apiv3beta1/conversation_history_client.go @@ -19,7 +19,7 @@ package cx import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -268,6 +267,8 @@ type conversationHistoryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationHistoryClient creates a new conversation history client based on gRPC. @@ -294,6 +295,7 @@ func NewConversationHistoryClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, conversationHistoryClient: cxpb.NewConversationHistoryClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -342,6 +344,8 @@ type conversationHistoryRESTClient struct { // Points back to the CallOptions field of the containing ConversationHistoryClient CallOptions **ConversationHistoryCallOptions + + logger *slog.Logger } // NewConversationHistoryRESTClient creates a new conversation history rest client. @@ -359,6 +363,7 @@ func NewConversationHistoryRESTClient(ctx context.Context, opts ...option.Client endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -422,7 +427,7 @@ func (c *conversationHistoryGRPCClient) ListConversations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationHistoryClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationHistoryClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *conversationHistoryGRPCClient) GetConversation(ctx context.Context, req var resp *cxpb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationHistoryClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationHistoryClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *conversationHistoryGRPCClient) DeleteConversation(ctx context.Context, opts = append((*c.CallOptions).DeleteConversation[0:len((*c.CallOptions).DeleteConversation):len((*c.CallOptions).DeleteConversation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationHistoryClient.DeleteConversation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationHistoryClient.DeleteConversation, req, settings.GRPC, c.logger, "DeleteConversation") return err }, opts...) return err @@ -489,7 +494,7 @@ func (c *conversationHistoryGRPCClient) GetLocation(ctx context.Context, req *lo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *conversationHistoryGRPCClient) ListLocations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *conversationHistoryGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -567,7 +572,7 @@ func (c *conversationHistoryGRPCClient) GetOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -596,7 +601,7 @@ func (c *conversationHistoryGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -670,21 +675,10 @@ func (c *conversationHistoryRESTClient) ListConversations(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -747,17 +741,7 @@ func (c *conversationHistoryRESTClient) GetConversation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -804,15 +788,8 @@ func (c *conversationHistoryRESTClient) DeleteConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversation") + return err }, opts...) } @@ -849,17 +826,7 @@ func (c *conversationHistoryRESTClient) GetLocation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -924,21 +891,10 @@ func (c *conversationHistoryRESTClient) ListLocations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -998,15 +954,8 @@ func (c *conversationHistoryRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1043,17 +992,7 @@ func (c *conversationHistoryRESTClient) GetOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1118,21 +1057,10 @@ func (c *conversationHistoryRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/conversation_history_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/conversation_history_client_example_go123_test.go index 508bd2e063ca..2b3c6f341f54 100644 --- a/dialogflow/cx/apiv3beta1/conversation_history_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/conversation_history_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleConversationHistoryClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleConversationHistoryClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleConversationHistoryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go index c96dd487477f..6e1e16ab7f8e 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto @@ -83,11 +83,9 @@ type AdvancedSettings struct { func (x *AdvancedSettings) Reset() { *x = AdvancedSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings) String() string { @@ -98,7 +96,7 @@ func (*AdvancedSettings) ProtoMessage() {} func (x *AdvancedSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,11 +163,9 @@ type AdvancedSettings_SpeechSettings struct { func (x *AdvancedSettings_SpeechSettings) Reset() { *x = AdvancedSettings_SpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_SpeechSettings) String() string { @@ -180,7 +176,7 @@ func (*AdvancedSettings_SpeechSettings) ProtoMessage() {} func (x *AdvancedSettings_SpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +244,9 @@ type AdvancedSettings_DtmfSettings struct { func (x *AdvancedSettings_DtmfSettings) Reset() { *x = AdvancedSettings_DtmfSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_DtmfSettings) String() string { @@ -263,7 +257,7 @@ func (*AdvancedSettings_DtmfSettings) ProtoMessage() {} func (x *AdvancedSettings_DtmfSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +325,9 @@ type AdvancedSettings_LoggingSettings struct { func (x *AdvancedSettings_LoggingSettings) Reset() { *x = AdvancedSettings_LoggingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedSettings_LoggingSettings) String() string { @@ -346,7 +338,7 @@ func (*AdvancedSettings_LoggingSettings) ProtoMessage() {} func (x *AdvancedSettings_LoggingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,56 +534,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_SpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_DtmfSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedSettings_LoggingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go b/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go index c1863079b473..9c58dd5c3cc3 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -165,11 +165,9 @@ type SpeechToTextSettings struct { func (x *SpeechToTextSettings) Reset() { *x = SpeechToTextSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechToTextSettings) String() string { @@ -180,7 +178,7 @@ func (*SpeechToTextSettings) ProtoMessage() {} func (x *SpeechToTextSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +307,9 @@ type Agent struct { func (x *Agent) Reset() { *x = Agent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent) String() string { @@ -324,7 +320,7 @@ func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +555,9 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentsRequest) String() string { @@ -574,7 +568,7 @@ func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -627,11 +621,9 @@ type ListAgentsResponse struct { func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentsResponse) String() string { @@ -642,7 +634,7 @@ func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +677,9 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentRequest) String() string { @@ -700,7 +690,7 @@ func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +728,9 @@ type CreateAgentRequest struct { func (x *CreateAgentRequest) Reset() { *x = CreateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAgentRequest) String() string { @@ -753,7 +741,7 @@ func (*CreateAgentRequest) ProtoMessage() {} func (x *CreateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +786,9 @@ type UpdateAgentRequest struct { func (x *UpdateAgentRequest) Reset() { *x = UpdateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAgentRequest) String() string { @@ -813,7 +799,7 @@ func (*UpdateAgentRequest) ProtoMessage() {} func (x *UpdateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +842,9 @@ type DeleteAgentRequest struct { func (x *DeleteAgentRequest) Reset() { *x = DeleteAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAgentRequest) String() string { @@ -871,7 +855,7 @@ func (*DeleteAgentRequest) ProtoMessage() {} func (x *DeleteAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -929,11 +913,9 @@ type ExportAgentRequest struct { func (x *ExportAgentRequest) Reset() { *x = ExportAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest) String() string { @@ -944,7 +926,7 @@ func (*ExportAgentRequest) ProtoMessage() {} func (x *ExportAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +1002,9 @@ type ExportAgentResponse struct { func (x *ExportAgentResponse) Reset() { *x = ExportAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentResponse) String() string { @@ -1035,7 +1015,7 @@ func (*ExportAgentResponse) ProtoMessage() {} func (x *ExportAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1113,9 @@ type RestoreAgentRequest struct { func (x *RestoreAgentRequest) Reset() { *x = RestoreAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest) String() string { @@ -1148,7 +1126,7 @@ func (*RestoreAgentRequest) ProtoMessage() {} func (x *RestoreAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1232,9 @@ type ValidateAgentRequest struct { func (x *ValidateAgentRequest) Reset() { *x = ValidateAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAgentRequest) String() string { @@ -1269,7 +1245,7 @@ func (*ValidateAgentRequest) ProtoMessage() {} func (x *ValidateAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1291,9 @@ type GetAgentValidationResultRequest struct { func (x *GetAgentValidationResultRequest) Reset() { *x = GetAgentValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentValidationResultRequest) String() string { @@ -1330,7 +1304,7 @@ func (*GetAgentValidationResultRequest) ProtoMessage() {} func (x *GetAgentValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1350,9 @@ type AgentValidationResult struct { func (x *AgentValidationResult) Reset() { *x = AgentValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentValidationResult) String() string { @@ -1391,7 +1363,7 @@ func (*AgentValidationResult) ProtoMessage() {} func (x *AgentValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1437,11 +1409,9 @@ type GetGenerativeSettingsRequest struct { func (x *GetGenerativeSettingsRequest) Reset() { *x = GetGenerativeSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGenerativeSettingsRequest) String() string { @@ -1452,7 +1422,7 @@ func (*GetGenerativeSettingsRequest) ProtoMessage() {} func (x *GetGenerativeSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1498,11 +1468,9 @@ type UpdateGenerativeSettingsRequest struct { func (x *UpdateGenerativeSettingsRequest) Reset() { *x = UpdateGenerativeSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeSettingsRequest) String() string { @@ -1513,7 +1481,7 @@ func (*UpdateGenerativeSettingsRequest) ProtoMessage() {} func (x *UpdateGenerativeSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1526,9 @@ type Agent_GitIntegrationSettings struct { func (x *Agent_GitIntegrationSettings) Reset() { *x = Agent_GitIntegrationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GitIntegrationSettings) String() string { @@ -1573,7 +1539,7 @@ func (*Agent_GitIntegrationSettings) ProtoMessage() {} func (x *Agent_GitIntegrationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1627,11 +1593,9 @@ type Agent_GenAppBuilderSettings struct { func (x *Agent_GenAppBuilderSettings) Reset() { *x = Agent_GenAppBuilderSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GenAppBuilderSettings) String() string { @@ -1642,7 +1606,7 @@ func (*Agent_GenAppBuilderSettings) ProtoMessage() {} func (x *Agent_GenAppBuilderSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1643,9 @@ type Agent_AnswerFeedbackSettings struct { func (x *Agent_AnswerFeedbackSettings) Reset() { *x = Agent_AnswerFeedbackSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_AnswerFeedbackSettings) String() string { @@ -1694,7 +1656,7 @@ func (*Agent_AnswerFeedbackSettings) ProtoMessage() {} func (x *Agent_AnswerFeedbackSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1697,9 @@ type Agent_PersonalizationSettings struct { func (x *Agent_PersonalizationSettings) Reset() { *x = Agent_PersonalizationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_PersonalizationSettings) String() string { @@ -1750,7 +1710,7 @@ func (*Agent_PersonalizationSettings) ProtoMessage() {} func (x *Agent_PersonalizationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1754,9 @@ type Agent_ClientCertificateSettings struct { func (x *Agent_ClientCertificateSettings) Reset() { *x = Agent_ClientCertificateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_ClientCertificateSettings) String() string { @@ -1809,7 +1767,7 @@ func (*Agent_ClientCertificateSettings) ProtoMessage() {} func (x *Agent_ClientCertificateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1866,11 +1824,9 @@ type Agent_GitIntegrationSettings_GithubSettings struct { func (x *Agent_GitIntegrationSettings_GithubSettings) Reset() { *x = Agent_GitIntegrationSettings_GithubSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Agent_GitIntegrationSettings_GithubSettings) String() string { @@ -1881,7 +1837,7 @@ func (*Agent_GitIntegrationSettings_GithubSettings) ProtoMessage() {} func (x *Agent_GitIntegrationSettings_GithubSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1945,11 +1901,9 @@ type ExportAgentRequest_GitDestination struct { func (x *ExportAgentRequest_GitDestination) Reset() { *x = ExportAgentRequest_GitDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAgentRequest_GitDestination) String() string { @@ -1960,7 +1914,7 @@ func (*ExportAgentRequest_GitDestination) ProtoMessage() {} func (x *ExportAgentRequest_GitDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2001,11 +1955,9 @@ type RestoreAgentRequest_GitSource struct { func (x *RestoreAgentRequest_GitSource) Reset() { *x = RestoreAgentRequest_GitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAgentRequest_GitSource) String() string { @@ -2016,7 +1968,7 @@ func (*RestoreAgentRequest_GitSource) ProtoMessage() {} func (x *RestoreAgentRequest_GitSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2740,296 +2692,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_agent_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_init() file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechToTextSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Agent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AgentValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetGenerativeSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GitIntegrationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GenAppBuilderSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Agent_AnswerFeedbackSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Agent_PersonalizationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Agent_ClientCertificateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Agent_GitIntegrationSettings_GithubSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ExportAgentRequest_GitDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAgentRequest_GitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1].OneofWrappers = []any{ (*Agent_StartFlow)(nil), (*Agent_StartPlaybook)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go index 697055d79c9b..e62e6cb2b6dd 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -373,11 +373,9 @@ type SpeechWordInfo struct { func (x *SpeechWordInfo) Reset() { *x = SpeechWordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechWordInfo) String() string { @@ -388,7 +386,7 @@ func (*SpeechWordInfo) ProtoMessage() {} func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +467,9 @@ type BargeInConfig struct { func (x *BargeInConfig) Reset() { *x = BargeInConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BargeInConfig) String() string { @@ -484,7 +480,7 @@ func (*BargeInConfig) ProtoMessage() {} func (x *BargeInConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +565,9 @@ type InputAudioConfig struct { func (x *InputAudioConfig) Reset() { *x = InputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAudioConfig) String() string { @@ -584,7 +578,7 @@ func (*InputAudioConfig) ProtoMessage() {} func (x *InputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +680,9 @@ type VoiceSelectionParams struct { func (x *VoiceSelectionParams) Reset() { *x = VoiceSelectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceSelectionParams) String() string { @@ -701,7 +693,7 @@ func (*VoiceSelectionParams) ProtoMessage() {} func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +756,9 @@ type SynthesizeSpeechConfig struct { func (x *SynthesizeSpeechConfig) Reset() { *x = SynthesizeSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechConfig) String() string { @@ -779,7 +769,7 @@ func (*SynthesizeSpeechConfig) ProtoMessage() {} func (x *SynthesizeSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +842,9 @@ type OutputAudioConfig struct { func (x *OutputAudioConfig) Reset() { *x = OutputAudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputAudioConfig) String() string { @@ -867,7 +855,7 @@ func (*OutputAudioConfig) ProtoMessage() {} func (x *OutputAudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +919,9 @@ type TextToSpeechSettings struct { func (x *TextToSpeechSettings) Reset() { *x = TextToSpeechSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextToSpeechSettings) String() string { @@ -946,7 +932,7 @@ func (*TextToSpeechSettings) ProtoMessage() {} func (x *TextToSpeechSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,92 +1214,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_audio_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeechWordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BargeInConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VoiceSelectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OutputAudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TextToSpeechSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/bigquery_export.pb.go b/dialogflow/cx/apiv3beta1/cxpb/bigquery_export.pb.go index 64e7e526f3fc..f9ce1f7e5bc7 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/bigquery_export.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/bigquery_export.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/bigquery_export.proto @@ -50,11 +50,9 @@ type BigQueryExportSettings struct { func (x *BigQueryExportSettings) Reset() { *x = BigQueryExportSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryExportSettings) String() string { @@ -65,7 +63,7 @@ func (*BigQueryExportSettings) ProtoMessage() {} func (x *BigQueryExportSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,20 +149,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_bigquery_export_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryExportSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go b/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go index d0e6ed013d68..d1dfcbd5b62e 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/changelog.proto @@ -81,11 +81,9 @@ type ListChangelogsRequest struct { func (x *ListChangelogsRequest) Reset() { *x = ListChangelogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChangelogsRequest) String() string { @@ -96,7 +94,7 @@ func (*ListChangelogsRequest) ProtoMessage() {} func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,11 +155,9 @@ type ListChangelogsResponse struct { func (x *ListChangelogsResponse) Reset() { *x = ListChangelogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChangelogsResponse) String() string { @@ -172,7 +168,7 @@ func (*ListChangelogsResponse) ProtoMessage() {} func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +212,9 @@ type GetChangelogRequest struct { func (x *GetChangelogRequest) Reset() { *x = GetChangelogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChangelogRequest) String() string { @@ -231,7 +225,7 @@ func (*GetChangelogRequest) ProtoMessage() {} func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type Changelog struct { func (x *Changelog) Reset() { *x = Changelog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Changelog) String() string { @@ -296,7 +288,7 @@ func (*Changelog) ProtoMessage() {} func (x *Changelog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,56 +516,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_changelog_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListChangelogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListChangelogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetChangelogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Changelog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/conversation_history.pb.go b/dialogflow/cx/apiv3beta1/cxpb/conversation_history.pb.go index c672126c4a5a..dd32bbbc07ff 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/conversation_history.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/conversation_history.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/conversation_history.proto @@ -119,11 +119,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -134,7 +132,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type DeleteConversationRequest struct { func (x *DeleteConversationRequest) Reset() { *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationRequest) String() string { @@ -185,7 +181,7 @@ func (*DeleteConversationRequest) ProtoMessage() {} func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +234,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -253,7 +247,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +309,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -330,7 +322,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +397,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -420,7 +410,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +548,9 @@ type Conversation_Metrics struct { func (x *Conversation_Metrics) Reset() { *x = Conversation_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Metrics) String() string { @@ -573,7 +561,7 @@ func (*Conversation_Metrics) ProtoMessage() {} func (x *Conversation_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,11 +672,9 @@ type Conversation_Interaction struct { func (x *Conversation_Interaction) Reset() { *x = Conversation_Interaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Interaction) String() string { @@ -699,7 +685,7 @@ func (*Conversation_Interaction) ProtoMessage() {} func (x *Conversation_Interaction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +779,9 @@ type Conversation_Metrics_QueryInputCount struct { func (x *Conversation_Metrics_QueryInputCount) Reset() { *x = Conversation_Metrics_QueryInputCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Metrics_QueryInputCount) String() string { @@ -808,7 +792,7 @@ func (*Conversation_Metrics_QueryInputCount) ProtoMessage() {} func (x *Conversation_Metrics_QueryInputCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +875,9 @@ type Conversation_Metrics_MatchTypeCount struct { func (x *Conversation_Metrics_MatchTypeCount) Reset() { *x = Conversation_Metrics_MatchTypeCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Metrics_MatchTypeCount) String() string { @@ -906,7 +888,7 @@ func (*Conversation_Metrics_MatchTypeCount) ProtoMessage() {} func (x *Conversation_Metrics_MatchTypeCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +969,9 @@ type Conversation_Interaction_MissingTransition struct { func (x *Conversation_Interaction_MissingTransition) Reset() { *x = Conversation_Interaction_MissingTransition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation_Interaction_MissingTransition) String() string { @@ -1002,7 +982,7 @@ func (*Conversation_Interaction_MissingTransition) ProtoMessage() {} func (x *Conversation_Interaction_MissingTransition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,128 +1415,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_intent_proto_init() file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() file_google_cloud_dialogflow_cx_v3beta1_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Interaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Metrics_QueryInputCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Metrics_MatchTypeCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_conversation_history_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Conversation_Interaction_MissingTransition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/data_store_connection.pb.go b/dialogflow/cx/apiv3beta1/cxpb/data_store_connection.pb.go index cb30ac790016..35f3bc5eefae 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/data_store_connection.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/data_store_connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto @@ -343,11 +343,9 @@ type DataStoreConnection struct { func (x *DataStoreConnection) Reset() { *x = DataStoreConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnection) String() string { @@ -358,7 +356,7 @@ func (*DataStoreConnection) ProtoMessage() {} func (x *DataStoreConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +419,9 @@ type DataStoreConnectionSignals struct { func (x *DataStoreConnectionSignals) Reset() { *x = DataStoreConnectionSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals) String() string { @@ -436,7 +432,7 @@ func (*DataStoreConnectionSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +527,9 @@ type DataStoreConnectionSignals_RewriterModelCallSignals struct { func (x *DataStoreConnectionSignals_RewriterModelCallSignals) Reset() { *x = DataStoreConnectionSignals_RewriterModelCallSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_RewriterModelCallSignals) String() string { @@ -546,7 +540,7 @@ func (*DataStoreConnectionSignals_RewriterModelCallSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_RewriterModelCallSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -598,11 +592,9 @@ type DataStoreConnectionSignals_SearchSnippet struct { func (x *DataStoreConnectionSignals_SearchSnippet) Reset() { *x = DataStoreConnectionSignals_SearchSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_SearchSnippet) String() string { @@ -613,7 +605,7 @@ func (*DataStoreConnectionSignals_SearchSnippet) ProtoMessage() {} func (x *DataStoreConnectionSignals_SearchSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +658,9 @@ type DataStoreConnectionSignals_AnswerGenerationModelCallSignals struct { func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) Reset() { *x = DataStoreConnectionSignals_AnswerGenerationModelCallSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) String() string { @@ -681,7 +671,7 @@ func (*DataStoreConnectionSignals_AnswerGenerationModelCallSignals) ProtoMessage func (x *DataStoreConnectionSignals_AnswerGenerationModelCallSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +721,9 @@ type DataStoreConnectionSignals_AnswerPart struct { func (x *DataStoreConnectionSignals_AnswerPart) Reset() { *x = DataStoreConnectionSignals_AnswerPart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_AnswerPart) String() string { @@ -746,7 +734,7 @@ func (*DataStoreConnectionSignals_AnswerPart) ProtoMessage() {} func (x *DataStoreConnectionSignals_AnswerPart) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +777,9 @@ type DataStoreConnectionSignals_CitedSnippet struct { func (x *DataStoreConnectionSignals_CitedSnippet) Reset() { *x = DataStoreConnectionSignals_CitedSnippet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_CitedSnippet) String() string { @@ -804,7 +790,7 @@ func (*DataStoreConnectionSignals_CitedSnippet) ProtoMessage() {} func (x *DataStoreConnectionSignals_CitedSnippet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +833,9 @@ type DataStoreConnectionSignals_GroundingSignals struct { func (x *DataStoreConnectionSignals_GroundingSignals) Reset() { *x = DataStoreConnectionSignals_GroundingSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_GroundingSignals) String() string { @@ -862,7 +846,7 @@ func (*DataStoreConnectionSignals_GroundingSignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_GroundingSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +891,9 @@ type DataStoreConnectionSignals_SafetySignals struct { func (x *DataStoreConnectionSignals_SafetySignals) Reset() { *x = DataStoreConnectionSignals_SafetySignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStoreConnectionSignals_SafetySignals) String() string { @@ -922,7 +904,7 @@ func (*DataStoreConnectionSignals_SafetySignals) ProtoMessage() {} func (x *DataStoreConnectionSignals_SafetySignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,116 +1213,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_init() if File_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_RewriterModelCallSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_SearchSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_AnswerGenerationModelCallSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_AnswerPart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_CitedSnippet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_GroundingSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DataStoreConnectionSignals_SafetySignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go index c10dd169c961..065ebccaa782 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/deployment.proto @@ -127,11 +127,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -142,7 +140,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +217,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -234,7 +230,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +285,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -304,7 +298,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +342,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -363,7 +355,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +395,9 @@ type Deployment_Result struct { func (x *Deployment_Result) Reset() { *x = Deployment_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment_Result) String() string { @@ -418,7 +408,7 @@ func (*Deployment_Result) ProtoMessage() {} func (x *Deployment_Result) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,68 +627,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_deployment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Deployment_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go b/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go index 4d98e9eb292d..f3d877cb2331 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -344,11 +344,9 @@ type EntityType struct { func (x *EntityType) Reset() { *x = EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType) String() string { @@ -359,7 +357,7 @@ func (*EntityType) ProtoMessage() {} func (x *EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +469,9 @@ type ExportEntityTypesRequest struct { func (x *ExportEntityTypesRequest) Reset() { *x = ExportEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesRequest) String() string { @@ -486,7 +482,7 @@ func (*ExportEntityTypesRequest) ProtoMessage() {} func (x *ExportEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +591,9 @@ type ExportEntityTypesResponse struct { func (x *ExportEntityTypesResponse) Reset() { *x = ExportEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesResponse) String() string { @@ -610,7 +604,7 @@ func (*ExportEntityTypesResponse) ProtoMessage() {} func (x *ExportEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +674,9 @@ type ExportEntityTypesMetadata struct { func (x *ExportEntityTypesMetadata) Reset() { *x = ExportEntityTypesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportEntityTypesMetadata) String() string { @@ -695,7 +687,7 @@ func (*ExportEntityTypesMetadata) ProtoMessage() {} func (x *ExportEntityTypesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +735,9 @@ type ImportEntityTypesRequest struct { func (x *ImportEntityTypesRequest) Reset() { *x = ImportEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesRequest) String() string { @@ -758,7 +748,7 @@ func (*ImportEntityTypesRequest) ProtoMessage() {} func (x *ImportEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +850,9 @@ type ImportEntityTypesResponse struct { func (x *ImportEntityTypesResponse) Reset() { *x = ImportEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesResponse) String() string { @@ -875,7 +863,7 @@ func (*ImportEntityTypesResponse) ProtoMessage() {} func (x *ImportEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +903,9 @@ type ImportEntityTypesMetadata struct { func (x *ImportEntityTypesMetadata) Reset() { *x = ImportEntityTypesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesMetadata) String() string { @@ -930,7 +916,7 @@ func (*ImportEntityTypesMetadata) ProtoMessage() {} func (x *ImportEntityTypesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +963,9 @@ type ListEntityTypesRequest struct { func (x *ListEntityTypesRequest) Reset() { *x = ListEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesRequest) String() string { @@ -992,7 +976,7 @@ func (*ListEntityTypesRequest) ProtoMessage() {} func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1036,9 @@ type ListEntityTypesResponse struct { func (x *ListEntityTypesResponse) Reset() { *x = ListEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntityTypesResponse) String() string { @@ -1067,7 +1049,7 @@ func (*ListEntityTypesResponse) ProtoMessage() {} func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1106,9 @@ type GetEntityTypeRequest struct { func (x *GetEntityTypeRequest) Reset() { *x = GetEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntityTypeRequest) String() string { @@ -1139,7 +1119,7 @@ func (*GetEntityTypeRequest) ProtoMessage() {} func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1196,11 +1176,9 @@ type CreateEntityTypeRequest struct { func (x *CreateEntityTypeRequest) Reset() { *x = CreateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntityTypeRequest) String() string { @@ -1211,7 +1189,7 @@ func (*CreateEntityTypeRequest) ProtoMessage() {} func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1252,9 @@ type UpdateEntityTypeRequest struct { func (x *UpdateEntityTypeRequest) Reset() { *x = UpdateEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntityTypeRequest) String() string { @@ -1289,7 +1265,7 @@ func (*UpdateEntityTypeRequest) ProtoMessage() {} func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1329,9 @@ type DeleteEntityTypeRequest struct { func (x *DeleteEntityTypeRequest) Reset() { *x = DeleteEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntityTypeRequest) String() string { @@ -1368,7 +1342,7 @@ func (*DeleteEntityTypeRequest) ProtoMessage() {} func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1428,11 +1402,9 @@ type EntityType_Entity struct { func (x *EntityType_Entity) Reset() { *x = EntityType_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_Entity) String() string { @@ -1443,7 +1415,7 @@ func (*EntityType_Entity) ProtoMessage() {} func (x *EntityType_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1484,11 +1456,9 @@ type EntityType_ExcludedPhrase struct { func (x *EntityType_ExcludedPhrase) Reset() { *x = EntityType_ExcludedPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityType_ExcludedPhrase) String() string { @@ -1499,7 +1469,7 @@ func (*EntityType_ExcludedPhrase) ProtoMessage() {} func (x *EntityType_ExcludedPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1507,9 @@ type ImportEntityTypesResponse_ConflictingResources struct { func (x *ImportEntityTypesResponse_ConflictingResources) Reset() { *x = ImportEntityTypesResponse_ConflictingResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportEntityTypesResponse_ConflictingResources) String() string { @@ -1552,7 +1520,7 @@ func (*ImportEntityTypesResponse_ConflictingResources) ProtoMessage() {} func (x *ImportEntityTypesResponse_ConflictingResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2043,200 +2011,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_inline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportEntityTypesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EntityType_ExcludedPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportEntityTypesResponse_ConflictingResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1].OneofWrappers = []any{ (*ExportEntityTypesRequest_EntityTypesUri)(nil), (*ExportEntityTypesRequest_EntityTypesContentInline)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go index 8e58062017a3..32612f2b1531 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -136,11 +136,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -151,7 +149,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +233,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -250,7 +246,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -320,7 +314,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +358,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -379,7 +371,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -433,7 +423,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +467,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -492,7 +480,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +525,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -552,7 +538,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type LookupEnvironmentHistoryRequest struct { func (x *LookupEnvironmentHistoryRequest) Reset() { *x = LookupEnvironmentHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEnvironmentHistoryRequest) String() string { @@ -609,7 +593,7 @@ func (*LookupEnvironmentHistoryRequest) ProtoMessage() {} func (x *LookupEnvironmentHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +647,9 @@ type LookupEnvironmentHistoryResponse struct { func (x *LookupEnvironmentHistoryResponse) Reset() { *x = LookupEnvironmentHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEnvironmentHistoryResponse) String() string { @@ -678,7 +660,7 @@ func (*LookupEnvironmentHistoryResponse) ProtoMessage() {} func (x *LookupEnvironmentHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,11 +709,9 @@ type ContinuousTestResult struct { func (x *ContinuousTestResult) Reset() { *x = ContinuousTestResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContinuousTestResult) String() string { @@ -742,7 +722,7 @@ func (*ContinuousTestResult) ProtoMessage() {} func (x *ContinuousTestResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +779,9 @@ type RunContinuousTestRequest struct { func (x *RunContinuousTestRequest) Reset() { *x = RunContinuousTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestRequest) String() string { @@ -814,7 +792,7 @@ func (*RunContinuousTestRequest) ProtoMessage() {} func (x *RunContinuousTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +827,9 @@ type RunContinuousTestResponse struct { func (x *RunContinuousTestResponse) Reset() { *x = RunContinuousTestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestResponse) String() string { @@ -864,7 +840,7 @@ func (*RunContinuousTestResponse) ProtoMessage() {} func (x *RunContinuousTestResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +876,9 @@ type RunContinuousTestMetadata struct { func (x *RunContinuousTestMetadata) Reset() { *x = RunContinuousTestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunContinuousTestMetadata) String() string { @@ -915,7 +889,7 @@ func (*RunContinuousTestMetadata) ProtoMessage() {} func (x *RunContinuousTestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +931,9 @@ type ListContinuousTestResultsRequest struct { func (x *ListContinuousTestResultsRequest) Reset() { *x = ListContinuousTestResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContinuousTestResultsRequest) String() string { @@ -972,7 +944,7 @@ func (*ListContinuousTestResultsRequest) ProtoMessage() {} func (x *ListContinuousTestResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +995,9 @@ type ListContinuousTestResultsResponse struct { func (x *ListContinuousTestResultsResponse) Reset() { *x = ListContinuousTestResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContinuousTestResultsResponse) String() string { @@ -1038,7 +1008,7 @@ func (*ListContinuousTestResultsResponse) ProtoMessage() {} func (x *ListContinuousTestResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1056,9 @@ type DeployFlowRequest struct { func (x *DeployFlowRequest) Reset() { *x = DeployFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowRequest) String() string { @@ -1101,7 +1069,7 @@ func (*DeployFlowRequest) ProtoMessage() {} func (x *DeployFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,11 +1115,9 @@ type DeployFlowResponse struct { func (x *DeployFlowResponse) Reset() { *x = DeployFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowResponse) String() string { @@ -1162,7 +1128,7 @@ func (*DeployFlowResponse) ProtoMessage() {} func (x *DeployFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1205,11 +1171,9 @@ type DeployFlowMetadata struct { func (x *DeployFlowMetadata) Reset() { *x = DeployFlowMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployFlowMetadata) String() string { @@ -1220,7 +1184,7 @@ func (*DeployFlowMetadata) ProtoMessage() {} func (x *DeployFlowMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1222,9 @@ type Environment_VersionConfig struct { func (x *Environment_VersionConfig) Reset() { *x = Environment_VersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_VersionConfig) String() string { @@ -1273,7 +1235,7 @@ func (*Environment_VersionConfig) ProtoMessage() {} func (x *Environment_VersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1279,9 @@ type Environment_TestCasesConfig struct { func (x *Environment_TestCasesConfig) Reset() { *x = Environment_TestCasesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_TestCasesConfig) String() string { @@ -1332,7 +1292,7 @@ func (*Environment_TestCasesConfig) ProtoMessage() {} func (x *Environment_TestCasesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1384,11 +1344,9 @@ type Environment_WebhookConfig struct { func (x *Environment_WebhookConfig) Reset() { *x = Environment_WebhookConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment_WebhookConfig) String() string { @@ -1399,7 +1357,7 @@ func (*Environment_WebhookConfig) ProtoMessage() {} func (x *Environment_WebhookConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,260 +1913,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_environment_proto_init() { } file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_init() file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LookupEnvironmentHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LookupEnvironmentHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ContinuousTestResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RunContinuousTestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListContinuousTestResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListContinuousTestResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeployFlowMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Environment_VersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Environment_TestCasesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Environment_WebhookConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/example.pb.go b/dialogflow/cx/apiv3beta1/cxpb/example.pb.go index e63da5201ae0..300597419d1b 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/example.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/example.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/example.proto @@ -126,11 +126,9 @@ type CreateExampleRequest struct { func (x *CreateExampleRequest) Reset() { *x = CreateExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExampleRequest) String() string { @@ -141,7 +139,7 @@ func (*CreateExampleRequest) ProtoMessage() {} func (x *CreateExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +183,9 @@ type DeleteExampleRequest struct { func (x *DeleteExampleRequest) Reset() { *x = DeleteExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExampleRequest) String() string { @@ -200,7 +196,7 @@ func (*DeleteExampleRequest) ProtoMessage() {} func (x *DeleteExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +243,9 @@ type ListExamplesRequest struct { func (x *ListExamplesRequest) Reset() { *x = ListExamplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesRequest) String() string { @@ -262,7 +256,7 @@ func (*ListExamplesRequest) ProtoMessage() {} func (x *ListExamplesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +318,9 @@ type ListExamplesResponse struct { func (x *ListExamplesResponse) Reset() { *x = ListExamplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesResponse) String() string { @@ -339,7 +331,7 @@ func (*ListExamplesResponse) ProtoMessage() {} func (x *ListExamplesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +375,9 @@ type GetExampleRequest struct { func (x *GetExampleRequest) Reset() { *x = GetExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExampleRequest) String() string { @@ -398,7 +388,7 @@ func (*GetExampleRequest) ProtoMessage() {} func (x *GetExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +426,9 @@ type UpdateExampleRequest struct { func (x *UpdateExampleRequest) Reset() { *x = UpdateExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExampleRequest) String() string { @@ -451,7 +439,7 @@ func (*UpdateExampleRequest) ProtoMessage() {} func (x *UpdateExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +511,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -538,7 +524,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +631,9 @@ type PlaybookInput struct { func (x *PlaybookInput) Reset() { *x = PlaybookInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaybookInput) String() string { @@ -660,7 +644,7 @@ func (*PlaybookInput) ProtoMessage() {} func (x *PlaybookInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +687,9 @@ type PlaybookOutput struct { func (x *PlaybookOutput) Reset() { *x = PlaybookOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaybookOutput) String() string { @@ -718,7 +700,7 @@ func (*PlaybookOutput) ProtoMessage() {} func (x *PlaybookOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +749,9 @@ type Action struct { func (x *Action) Reset() { *x = Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action) String() string { @@ -782,7 +762,7 @@ func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +872,9 @@ type UserUtterance struct { func (x *UserUtterance) Reset() { *x = UserUtterance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserUtterance) String() string { @@ -907,7 +885,7 @@ func (*UserUtterance) ProtoMessage() {} func (x *UserUtterance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +919,9 @@ type AgentUtterance struct { func (x *AgentUtterance) Reset() { *x = AgentUtterance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentUtterance) String() string { @@ -956,7 +932,7 @@ func (*AgentUtterance) ProtoMessage() {} func (x *AgentUtterance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -998,11 +974,9 @@ type ToolUse struct { func (x *ToolUse) Reset() { *x = ToolUse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolUse) String() string { @@ -1013,7 +987,7 @@ func (*ToolUse) ProtoMessage() {} func (x *ToolUse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1076,11 +1050,9 @@ type PlaybookInvocation struct { func (x *PlaybookInvocation) Reset() { *x = PlaybookInvocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaybookInvocation) String() string { @@ -1091,7 +1063,7 @@ func (*PlaybookInvocation) ProtoMessage() {} func (x *PlaybookInvocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1126,9 @@ type FlowInvocation struct { func (x *FlowInvocation) Reset() { *x = FlowInvocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowInvocation) String() string { @@ -1169,7 +1139,7 @@ func (*FlowInvocation) ProtoMessage() {} func (x *FlowInvocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1644,188 +1614,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_example_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_example_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PlaybookInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PlaybookOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserUtterance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AgentUtterance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ToolUse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PlaybookInvocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FlowInvocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_example_proto_msgTypes[9].OneofWrappers = []any{ (*Action_UserUtterance)(nil), (*Action_AgentUtterance)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go index 9ba4f5bf3d52..05c440d1099b 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -281,11 +281,9 @@ type Experiment struct { func (x *Experiment) Reset() { *x = Experiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment) String() string { @@ -296,7 +294,7 @@ func (*Experiment) ProtoMessage() {} func (x *Experiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +426,9 @@ type VersionVariants struct { func (x *VersionVariants) Reset() { *x = VersionVariants{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionVariants) String() string { @@ -443,7 +439,7 @@ func (*VersionVariants) ProtoMessage() {} func (x *VersionVariants) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +485,9 @@ type RolloutConfig struct { func (x *RolloutConfig) Reset() { *x = RolloutConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutConfig) String() string { @@ -504,7 +498,7 @@ func (*RolloutConfig) ProtoMessage() {} func (x *RolloutConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +550,9 @@ type RolloutState struct { func (x *RolloutState) Reset() { *x = RolloutState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutState) String() string { @@ -571,7 +563,7 @@ func (*RolloutState) ProtoMessage() {} func (x *RolloutState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +618,9 @@ type VariantsHistory struct { func (x *VariantsHistory) Reset() { *x = VariantsHistory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VariantsHistory) String() string { @@ -641,7 +631,7 @@ func (*VariantsHistory) ProtoMessage() {} func (x *VariantsHistory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +698,9 @@ type ListExperimentsRequest struct { func (x *ListExperimentsRequest) Reset() { *x = ListExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsRequest) String() string { @@ -723,7 +711,7 @@ func (*ListExperimentsRequest) ProtoMessage() {} func (x *ListExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +766,9 @@ type ListExperimentsResponse struct { func (x *ListExperimentsResponse) Reset() { *x = ListExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsResponse) String() string { @@ -793,7 +779,7 @@ func (*ListExperimentsResponse) ProtoMessage() {} func (x *ListExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +823,9 @@ type GetExperimentRequest struct { func (x *GetExperimentRequest) Reset() { *x = GetExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExperimentRequest) String() string { @@ -852,7 +836,7 @@ func (*GetExperimentRequest) ProtoMessage() {} func (x *GetExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +876,9 @@ type CreateExperimentRequest struct { func (x *CreateExperimentRequest) Reset() { *x = CreateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExperimentRequest) String() string { @@ -907,7 +889,7 @@ func (*CreateExperimentRequest) ProtoMessage() {} func (x *CreateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +933,9 @@ type UpdateExperimentRequest struct { func (x *UpdateExperimentRequest) Reset() { *x = UpdateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExperimentRequest) String() string { @@ -966,7 +946,7 @@ func (*UpdateExperimentRequest) ProtoMessage() {} func (x *UpdateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,11 +991,9 @@ type DeleteExperimentRequest struct { func (x *DeleteExperimentRequest) Reset() { *x = DeleteExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExperimentRequest) String() string { @@ -1026,7 +1004,7 @@ func (*DeleteExperimentRequest) ProtoMessage() {} func (x *DeleteExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1041,9 @@ type StartExperimentRequest struct { func (x *StartExperimentRequest) Reset() { *x = StartExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartExperimentRequest) String() string { @@ -1078,7 +1054,7 @@ func (*StartExperimentRequest) ProtoMessage() {} func (x *StartExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1091,9 @@ type StopExperimentRequest struct { func (x *StopExperimentRequest) Reset() { *x = StopExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopExperimentRequest) String() string { @@ -1130,7 +1104,7 @@ func (*StopExperimentRequest) ProtoMessage() {} func (x *StopExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1148,9 @@ type Experiment_Definition struct { func (x *Experiment_Definition) Reset() { *x = Experiment_Definition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Definition) String() string { @@ -1189,7 +1161,7 @@ func (*Experiment_Definition) ProtoMessage() {} func (x *Experiment_Definition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1224,9 @@ type Experiment_Result struct { func (x *Experiment_Result) Reset() { *x = Experiment_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result) String() string { @@ -1267,7 +1237,7 @@ func (*Experiment_Result) ProtoMessage() {} func (x *Experiment_Result) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1287,9 @@ type Experiment_Result_ConfidenceInterval struct { func (x *Experiment_Result_ConfidenceInterval) Reset() { *x = Experiment_Result_ConfidenceInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_ConfidenceInterval) String() string { @@ -1332,7 +1300,7 @@ func (*Experiment_Result_ConfidenceInterval) ProtoMessage() {} func (x *Experiment_Result_ConfidenceInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1369,9 @@ type Experiment_Result_Metric struct { func (x *Experiment_Result_Metric) Reset() { *x = Experiment_Result_Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_Metric) String() string { @@ -1416,7 +1382,7 @@ func (*Experiment_Result_Metric) ProtoMessage() {} func (x *Experiment_Result_Metric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,11 +1476,9 @@ type Experiment_Result_VersionMetrics struct { func (x *Experiment_Result_VersionMetrics) Reset() { *x = Experiment_Result_VersionMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment_Result_VersionMetrics) String() string { @@ -1525,7 +1489,7 @@ func (*Experiment_Result_VersionMetrics) ProtoMessage() {} func (x *Experiment_Result_VersionMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1580,11 +1544,9 @@ type VersionVariants_Variant struct { func (x *VersionVariants_Variant) Reset() { *x = VersionVariants_Variant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionVariants_Variant) String() string { @@ -1595,7 +1557,7 @@ func (*VersionVariants_Variant) ProtoMessage() {} func (x *VersionVariants_Variant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1650,11 +1612,9 @@ type RolloutConfig_RolloutStep struct { func (x *RolloutConfig_RolloutStep) Reset() { *x = RolloutConfig_RolloutStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RolloutConfig_RolloutStep) String() string { @@ -1665,7 +1625,7 @@ func (*RolloutConfig_RolloutStep) ProtoMessage() {} func (x *RolloutConfig_RolloutStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,248 +2194,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_experiment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Experiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VersionVariants); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RolloutConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RolloutState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VariantsHistory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StartExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StopExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Definition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_ConfidenceInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Experiment_Result_VersionMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*VersionVariants_Variant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RolloutConfig_RolloutStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4].OneofWrappers = []any{ (*VariantsHistory_VersionVariants)(nil), } diff --git a/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go b/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go index 462e5e2201ed..68da4d9231e7 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -232,11 +232,9 @@ type NluSettings struct { func (x *NluSettings) Reset() { *x = NluSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NluSettings) String() string { @@ -247,7 +245,7 @@ func (*NluSettings) ProtoMessage() {} func (x *NluSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +369,9 @@ type Flow struct { func (x *Flow) Reset() { *x = Flow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Flow) String() string { @@ -386,7 +382,7 @@ func (*Flow) ProtoMessage() {} func (x *Flow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +503,9 @@ type CreateFlowRequest struct { func (x *CreateFlowRequest) Reset() { *x = CreateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFlowRequest) String() string { @@ -522,7 +516,7 @@ func (*CreateFlowRequest) ProtoMessage() {} func (x *CreateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +578,9 @@ type DeleteFlowRequest struct { func (x *DeleteFlowRequest) Reset() { *x = DeleteFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFlowRequest) String() string { @@ -599,7 +591,7 @@ func (*DeleteFlowRequest) ProtoMessage() {} func (x *DeleteFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +653,9 @@ type ListFlowsRequest struct { func (x *ListFlowsRequest) Reset() { *x = ListFlowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFlowsRequest) String() string { @@ -676,7 +666,7 @@ func (*ListFlowsRequest) ProtoMessage() {} func (x *ListFlowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +726,9 @@ type ListFlowsResponse struct { func (x *ListFlowsResponse) Reset() { *x = ListFlowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFlowsResponse) String() string { @@ -751,7 +739,7 @@ func (*ListFlowsResponse) ProtoMessage() {} func (x *ListFlowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +797,9 @@ type GetFlowRequest struct { func (x *GetFlowRequest) Reset() { *x = GetFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFlowRequest) String() string { @@ -824,7 +810,7 @@ func (*GetFlowRequest) ProtoMessage() {} func (x *GetFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +868,9 @@ type UpdateFlowRequest struct { func (x *UpdateFlowRequest) Reset() { *x = UpdateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFlowRequest) String() string { @@ -897,7 +881,7 @@ func (*UpdateFlowRequest) ProtoMessage() {} func (x *UpdateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +932,9 @@ type TrainFlowRequest struct { func (x *TrainFlowRequest) Reset() { *x = TrainFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainFlowRequest) String() string { @@ -963,7 +945,7 @@ func (*TrainFlowRequest) ProtoMessage() {} func (x *TrainFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +984,9 @@ type ValidateFlowRequest struct { func (x *ValidateFlowRequest) Reset() { *x = ValidateFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateFlowRequest) String() string { @@ -1017,7 +997,7 @@ func (*ValidateFlowRequest) ProtoMessage() {} func (x *ValidateFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,11 +1043,9 @@ type GetFlowValidationResultRequest struct { func (x *GetFlowValidationResultRequest) Reset() { *x = GetFlowValidationResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFlowValidationResultRequest) String() string { @@ -1078,7 +1056,7 @@ func (*GetFlowValidationResultRequest) ProtoMessage() {} func (x *GetFlowValidationResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1104,9 @@ type FlowValidationResult struct { func (x *FlowValidationResult) Reset() { *x = FlowValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowValidationResult) String() string { @@ -1141,7 +1117,7 @@ func (*FlowValidationResult) ProtoMessage() {} func (x *FlowValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,11 +1179,9 @@ type ImportFlowRequest struct { func (x *ImportFlowRequest) Reset() { *x = ImportFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFlowRequest) String() string { @@ -1218,7 +1192,7 @@ func (*ImportFlowRequest) ProtoMessage() {} func (x *ImportFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1293,9 @@ type FlowImportStrategy struct { func (x *FlowImportStrategy) Reset() { *x = FlowImportStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowImportStrategy) String() string { @@ -1334,7 +1306,7 @@ func (*FlowImportStrategy) ProtoMessage() {} func (x *FlowImportStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1371,11 +1343,9 @@ type ImportFlowResponse struct { func (x *ImportFlowResponse) Reset() { *x = ImportFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportFlowResponse) String() string { @@ -1386,7 +1356,7 @@ func (*ImportFlowResponse) ProtoMessage() {} func (x *ImportFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1406,9 @@ type ExportFlowRequest struct { func (x *ExportFlowRequest) Reset() { *x = ExportFlowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFlowRequest) String() string { @@ -1451,7 +1419,7 @@ func (*ExportFlowRequest) ProtoMessage() {} func (x *ExportFlowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1473,9 @@ type ExportFlowResponse struct { func (x *ExportFlowResponse) Reset() { *x = ExportFlowResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportFlowResponse) String() string { @@ -1520,7 +1486,7 @@ func (*ExportFlowResponse) ProtoMessage() {} func (x *ExportFlowResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1599,11 +1565,9 @@ type Flow_MultiLanguageSettings struct { func (x *Flow_MultiLanguageSettings) Reset() { *x = Flow_MultiLanguageSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Flow_MultiLanguageSettings) String() string { @@ -1614,7 +1578,7 @@ func (*Flow_MultiLanguageSettings) ProtoMessage() {} func (x *Flow_MultiLanguageSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2198,224 +2162,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_import_strategy_proto_init() file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NluSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Flow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListFlowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListFlowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TrainFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ValidateFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetFlowValidationResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FlowValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*FlowImportStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExportFlowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExportFlowResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Flow_MultiLanguageSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12].OneofWrappers = []any{ (*ImportFlowRequest_FlowUri)(nil), (*ImportFlowRequest_FlowContent)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go index 135a03d55355..cb4099896e3a 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/fulfillment.proto @@ -100,11 +100,9 @@ type Fulfillment struct { func (x *Fulfillment) Reset() { *x = Fulfillment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment) String() string { @@ -115,7 +113,7 @@ func (*Fulfillment) ProtoMessage() {} func (x *Fulfillment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type Fulfillment_SetParameterAction struct { func (x *Fulfillment_SetParameterAction) Reset() { *x = Fulfillment_SetParameterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_SetParameterAction) String() string { @@ -215,7 +211,7 @@ func (*Fulfillment_SetParameterAction) ProtoMessage() {} func (x *Fulfillment_SetParameterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +253,9 @@ type Fulfillment_ConditionalCases struct { func (x *Fulfillment_ConditionalCases) Reset() { *x = Fulfillment_ConditionalCases{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases) String() string { @@ -272,7 +266,7 @@ func (*Fulfillment_ConditionalCases) ProtoMessage() {} func (x *Fulfillment_ConditionalCases) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +309,9 @@ type Fulfillment_ConditionalCases_Case struct { func (x *Fulfillment_ConditionalCases_Case) Reset() { *x = Fulfillment_ConditionalCases_Case{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases_Case) String() string { @@ -330,7 +322,7 @@ func (*Fulfillment_ConditionalCases_Case) ProtoMessage() {} func (x *Fulfillment_ConditionalCases_Case) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +368,9 @@ type Fulfillment_ConditionalCases_Case_CaseContent struct { func (x *Fulfillment_ConditionalCases_Case_CaseContent) Reset() { *x = Fulfillment_ConditionalCases_Case_CaseContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fulfillment_ConditionalCases_Case_CaseContent) String() string { @@ -391,7 +381,7 @@ func (*Fulfillment_ConditionalCases_Case_CaseContent) ProtoMessage() {} func (x *Fulfillment_ConditionalCases_Case_CaseContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,68 +596,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_init() { } file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_SetParameterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases_Case); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Fulfillment_ConditionalCases_Case_CaseContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4].OneofWrappers = []any{ (*Fulfillment_ConditionalCases_Case_CaseContent_Message)(nil), (*Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/gcs.pb.go b/dialogflow/cx/apiv3beta1/cxpb/gcs.pb.go index ff8b4b23c71c..4d637b921aa6 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/gcs.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/gcs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/gcs.proto @@ -51,11 +51,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -66,7 +64,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,20 +143,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_gcs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_gcs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/generative_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/generative_settings.pb.go index 06fb8b226392..743967a8575a 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/generative_settings.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/generative_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/generative_settings.proto @@ -59,11 +59,9 @@ type GenerativeSettings struct { func (x *GenerativeSettings) Reset() { *x = GenerativeSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings) String() string { @@ -74,7 +72,7 @@ func (*GenerativeSettings) ProtoMessage() {} func (x *GenerativeSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +143,9 @@ type LlmModelSettings struct { func (x *LlmModelSettings) Reset() { *x = LlmModelSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LlmModelSettings) String() string { @@ -160,7 +156,7 @@ func (*LlmModelSettings) ProtoMessage() {} func (x *LlmModelSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type GenerativeSettings_FallbackSettings struct { func (x *GenerativeSettings_FallbackSettings) Reset() { *x = GenerativeSettings_FallbackSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_FallbackSettings) String() string { @@ -219,7 +213,7 @@ func (*GenerativeSettings_FallbackSettings) ProtoMessage() {} func (x *GenerativeSettings_FallbackSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +272,9 @@ type GenerativeSettings_KnowledgeConnectorSettings struct { func (x *GenerativeSettings_KnowledgeConnectorSettings) Reset() { *x = GenerativeSettings_KnowledgeConnectorSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_KnowledgeConnectorSettings) String() string { @@ -293,7 +285,7 @@ func (*GenerativeSettings_KnowledgeConnectorSettings) ProtoMessage() {} func (x *GenerativeSettings_KnowledgeConnectorSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +361,9 @@ type GenerativeSettings_FallbackSettings_PromptTemplate struct { func (x *GenerativeSettings_FallbackSettings_PromptTemplate) Reset() { *x = GenerativeSettings_FallbackSettings_PromptTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeSettings_FallbackSettings_PromptTemplate) String() string { @@ -384,7 +374,7 @@ func (*GenerativeSettings_FallbackSettings_PromptTemplate) ProtoMessage() {} func (x *GenerativeSettings_FallbackSettings_PromptTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,68 +564,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LlmModelSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_FallbackSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_KnowledgeConnectorSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeSettings_FallbackSettings_PromptTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go b/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go index 3a559bc4ff80..aafd70c62b7f 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/generator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/generator.proto @@ -75,11 +75,9 @@ type Generator struct { func (x *Generator) Reset() { *x = Generator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator) String() string { @@ -90,7 +88,7 @@ func (*Generator) ProtoMessage() {} func (x *Generator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type Phrase struct { func (x *Phrase) Reset() { *x = Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Phrase) String() string { @@ -174,7 +170,7 @@ func (*Phrase) ProtoMessage() {} func (x *Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type ListGeneratorsRequest struct { func (x *ListGeneratorsRequest) Reset() { *x = ListGeneratorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsRequest) String() string { @@ -232,7 +226,7 @@ func (*ListGeneratorsRequest) ProtoMessage() {} func (x *ListGeneratorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +286,9 @@ type ListGeneratorsResponse struct { func (x *ListGeneratorsResponse) Reset() { *x = ListGeneratorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGeneratorsResponse) String() string { @@ -307,7 +299,7 @@ func (*ListGeneratorsResponse) ProtoMessage() {} func (x *ListGeneratorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +345,9 @@ type GetGeneratorRequest struct { func (x *GetGeneratorRequest) Reset() { *x = GetGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGeneratorRequest) String() string { @@ -368,7 +358,7 @@ func (*GetGeneratorRequest) ProtoMessage() {} func (x *GetGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +407,9 @@ type CreateGeneratorRequest struct { func (x *CreateGeneratorRequest) Reset() { *x = CreateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGeneratorRequest) String() string { @@ -432,7 +420,7 @@ func (*CreateGeneratorRequest) ProtoMessage() {} func (x *CreateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type UpdateGeneratorRequest struct { func (x *UpdateGeneratorRequest) Reset() { *x = UpdateGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGeneratorRequest) String() string { @@ -501,7 +487,7 @@ func (*UpdateGeneratorRequest) ProtoMessage() {} func (x *UpdateGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +547,9 @@ type DeleteGeneratorRequest struct { func (x *DeleteGeneratorRequest) Reset() { *x = DeleteGeneratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGeneratorRequest) String() string { @@ -576,7 +560,7 @@ func (*DeleteGeneratorRequest) ProtoMessage() {} func (x *DeleteGeneratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +603,9 @@ type Generator_Placeholder struct { func (x *Generator_Placeholder) Reset() { *x = Generator_Placeholder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator_Placeholder) String() string { @@ -634,7 +616,7 @@ func (*Generator_Placeholder) ProtoMessage() {} func (x *Generator_Placeholder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +675,9 @@ type Generator_ModelParameter struct { func (x *Generator_ModelParameter) Reset() { *x = Generator_ModelParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Generator_ModelParameter) String() string { @@ -708,7 +688,7 @@ func (*Generator_ModelParameter) ProtoMessage() {} func (x *Generator_ModelParameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,128 +1023,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_generator_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Generator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGeneratorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGeneratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Generator_Placeholder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Generator_ModelParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_generator_proto_msgTypes[9].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/import_strategy.pb.go b/dialogflow/cx/apiv3beta1/cxpb/import_strategy.pb.go index c1794871b198..c9f4f8a39d80 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/import_strategy.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/import_strategy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/import_strategy.proto diff --git a/dialogflow/cx/apiv3beta1/cxpb/inline.pb.go b/dialogflow/cx/apiv3beta1/cxpb/inline.pb.go index 66b2d5935aa9..a79ede16036a 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/inline.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/inline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/inline.proto @@ -51,11 +51,9 @@ type InlineDestination struct { func (x *InlineDestination) Reset() { *x = InlineDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineDestination) String() string { @@ -66,7 +64,7 @@ func (*InlineDestination) ProtoMessage() {} func (x *InlineDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -101,11 +99,9 @@ type InlineSource struct { func (x *InlineSource) Reset() { *x = InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineSource) String() string { @@ -116,7 +112,7 @@ func (*InlineSource) ProtoMessage() {} func (x *InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,32 +196,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_inline_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_inline_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InlineDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_inline_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go b/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go index 7bfa70a6066b..1fa9102a4090 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -296,11 +296,9 @@ type Intent struct { func (x *Intent) Reset() { *x = Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent) String() string { @@ -311,7 +309,7 @@ func (*Intent) ProtoMessage() {} func (x *Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +412,9 @@ type ListIntentsRequest struct { func (x *ListIntentsRequest) Reset() { *x = ListIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsRequest) String() string { @@ -429,7 +425,7 @@ func (*ListIntentsRequest) ProtoMessage() {} func (x *ListIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +492,9 @@ type ListIntentsResponse struct { func (x *ListIntentsResponse) Reset() { *x = ListIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIntentsResponse) String() string { @@ -511,7 +505,7 @@ func (*ListIntentsResponse) ProtoMessage() {} func (x *ListIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +560,9 @@ type GetIntentRequest struct { func (x *GetIntentRequest) Reset() { *x = GetIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIntentRequest) String() string { @@ -581,7 +573,7 @@ func (*GetIntentRequest) ProtoMessage() {} func (x *GetIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +628,9 @@ type CreateIntentRequest struct { func (x *CreateIntentRequest) Reset() { *x = CreateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIntentRequest) String() string { @@ -651,7 +641,7 @@ func (*CreateIntentRequest) ProtoMessage() {} func (x *CreateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +703,9 @@ type UpdateIntentRequest struct { func (x *UpdateIntentRequest) Reset() { *x = UpdateIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIntentRequest) String() string { @@ -728,7 +716,7 @@ func (*UpdateIntentRequest) ProtoMessage() {} func (x *UpdateIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +767,9 @@ type DeleteIntentRequest struct { func (x *DeleteIntentRequest) Reset() { *x = DeleteIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIntentRequest) String() string { @@ -794,7 +780,7 @@ func (*DeleteIntentRequest) ProtoMessage() {} func (x *DeleteIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +825,9 @@ type ImportIntentsRequest struct { func (x *ImportIntentsRequest) Reset() { *x = ImportIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsRequest) String() string { @@ -854,7 +838,7 @@ func (*ImportIntentsRequest) ProtoMessage() {} func (x *ImportIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type ImportIntentsResponse struct { func (x *ImportIntentsResponse) Reset() { *x = ImportIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsResponse) String() string { @@ -964,7 +946,7 @@ func (*ImportIntentsResponse) ProtoMessage() {} func (x *ImportIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +986,9 @@ type ImportIntentsMetadata struct { func (x *ImportIntentsMetadata) Reset() { *x = ImportIntentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsMetadata) String() string { @@ -1019,7 +999,7 @@ func (*ImportIntentsMetadata) ProtoMessage() {} func (x *ImportIntentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1042,9 @@ type ExportIntentsRequest struct { func (x *ExportIntentsRequest) Reset() { *x = ExportIntentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsRequest) String() string { @@ -1077,7 +1055,7 @@ func (*ExportIntentsRequest) ProtoMessage() {} func (x *ExportIntentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1157,9 @@ type ExportIntentsResponse struct { func (x *ExportIntentsResponse) Reset() { *x = ExportIntentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsResponse) String() string { @@ -1194,7 +1170,7 @@ func (*ExportIntentsResponse) ProtoMessage() {} func (x *ExportIntentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1239,9 @@ type ExportIntentsMetadata struct { func (x *ExportIntentsMetadata) Reset() { *x = ExportIntentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportIntentsMetadata) String() string { @@ -1278,7 +1252,7 @@ func (*ExportIntentsMetadata) ProtoMessage() {} func (x *ExportIntentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,11 +1302,9 @@ type Intent_TrainingPhrase struct { func (x *Intent_TrainingPhrase) Reset() { *x = Intent_TrainingPhrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase) String() string { @@ -1343,7 +1315,7 @@ func (*Intent_TrainingPhrase) ProtoMessage() {} func (x *Intent_TrainingPhrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1413,11 +1385,9 @@ type Intent_Parameter struct { func (x *Intent_Parameter) Reset() { *x = Intent_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_Parameter) String() string { @@ -1428,7 +1398,7 @@ func (*Intent_Parameter) ProtoMessage() {} func (x *Intent_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1457,9 @@ type Intent_TrainingPhrase_Part struct { func (x *Intent_TrainingPhrase_Part) Reset() { *x = Intent_TrainingPhrase_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Intent_TrainingPhrase_Part) String() string { @@ -1502,7 +1470,7 @@ func (*Intent_TrainingPhrase_Part) ProtoMessage() {} func (x *Intent_TrainingPhrase_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1547,11 +1515,9 @@ type ImportIntentsResponse_ConflictingResources struct { func (x *ImportIntentsResponse_ConflictingResources) Reset() { *x = ImportIntentsResponse_ConflictingResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportIntentsResponse_ConflictingResources) String() string { @@ -1562,7 +1528,7 @@ func (*ImportIntentsResponse_ConflictingResources) ProtoMessage() {} func (x *ImportIntentsResponse_ConflictingResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2036,212 +2002,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_intent_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_inline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExportIntentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Intent_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Intent_TrainingPhrase_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportIntentsResponse_ConflictingResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7].OneofWrappers = []any{ (*ImportIntentsRequest_IntentsUri)(nil), (*ImportIntentsRequest_IntentsContent)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/page.pb.go b/dialogflow/cx/apiv3beta1/cxpb/page.pb.go index 07aeb3597d49..d95c59af908c 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/page.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/page.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/page.proto @@ -136,11 +136,9 @@ type Page struct { func (x *Page) Reset() { *x = Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Page) String() string { @@ -151,7 +149,7 @@ func (*Page) ProtoMessage() {} func (x *Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +251,9 @@ type Form struct { func (x *Form) Reset() { *x = Form{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form) String() string { @@ -268,7 +264,7 @@ func (*Form) ProtoMessage() {} func (x *Form) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +331,9 @@ type EventHandler struct { func (x *EventHandler) Reset() { *x = EventHandler{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventHandler) String() string { @@ -350,7 +344,7 @@ func (*EventHandler) ProtoMessage() {} func (x *EventHandler) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +502,9 @@ type TransitionRoute struct { func (x *TransitionRoute) Reset() { *x = TransitionRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRoute) String() string { @@ -523,7 +515,7 @@ func (*TransitionRoute) ProtoMessage() {} func (x *TransitionRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +650,9 @@ type ListPagesRequest struct { func (x *ListPagesRequest) Reset() { *x = ListPagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPagesRequest) String() string { @@ -673,7 +663,7 @@ func (*ListPagesRequest) ProtoMessage() {} func (x *ListPagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,11 +723,9 @@ type ListPagesResponse struct { func (x *ListPagesResponse) Reset() { *x = ListPagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPagesResponse) String() string { @@ -748,7 +736,7 @@ func (*ListPagesResponse) ProtoMessage() {} func (x *ListPagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -814,11 +802,9 @@ type GetPageRequest struct { func (x *GetPageRequest) Reset() { *x = GetPageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPageRequest) String() string { @@ -829,7 +815,7 @@ func (*GetPageRequest) ProtoMessage() {} func (x *GetPageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +882,9 @@ type CreatePageRequest struct { func (x *CreatePageRequest) Reset() { *x = CreatePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePageRequest) String() string { @@ -911,7 +895,7 @@ func (*CreatePageRequest) ProtoMessage() {} func (x *CreatePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +968,9 @@ type UpdatePageRequest struct { func (x *UpdatePageRequest) Reset() { *x = UpdatePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePageRequest) String() string { @@ -999,7 +981,7 @@ func (*UpdatePageRequest) ProtoMessage() {} func (x *UpdatePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1043,9 @@ type DeletePageRequest struct { func (x *DeletePageRequest) Reset() { *x = DeletePageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePageRequest) String() string { @@ -1076,7 +1056,7 @@ func (*DeletePageRequest) ProtoMessage() {} func (x *DeletePageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1119,9 @@ type KnowledgeConnectorSettings struct { func (x *KnowledgeConnectorSettings) Reset() { *x = KnowledgeConnectorSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KnowledgeConnectorSettings) String() string { @@ -1154,7 +1132,7 @@ func (*KnowledgeConnectorSettings) ProtoMessage() {} func (x *KnowledgeConnectorSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1276,11 +1254,9 @@ type Form_Parameter struct { func (x *Form_Parameter) Reset() { *x = Form_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form_Parameter) String() string { @@ -1291,7 +1267,7 @@ func (*Form_Parameter) ProtoMessage() {} func (x *Form_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1408,11 +1384,9 @@ type Form_Parameter_FillBehavior struct { func (x *Form_Parameter_FillBehavior) Reset() { *x = Form_Parameter_FillBehavior{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form_Parameter_FillBehavior) String() string { @@ -1423,7 +1397,7 @@ func (*Form_Parameter_FillBehavior) ProtoMessage() {} func (x *Form_Parameter_FillBehavior) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1892,164 +1866,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_init() file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Form); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventHandler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListPagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetPageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeletePageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*KnowledgeConnectorSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Form_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Form_Parameter_FillBehavior); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2].OneofWrappers = []any{ (*EventHandler_TargetPage)(nil), (*EventHandler_TargetFlow)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/parameter_definition.pb.go b/dialogflow/cx/apiv3beta1/cxpb/parameter_definition.pb.go index 0da70c41a61d..e9439dad9611 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/parameter_definition.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/parameter_definition.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/parameter_definition.proto @@ -129,11 +129,9 @@ type ParameterDefinition struct { func (x *ParameterDefinition) Reset() { *x = ParameterDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterDefinition) String() string { @@ -144,7 +142,7 @@ func (*ParameterDefinition) ProtoMessage() {} func (x *ParameterDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,20 +256,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ParameterDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/playbook.pb.go b/dialogflow/cx/apiv3beta1/cxpb/playbook.pb.go index 47d5228aa0a3..645693c35907 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/playbook.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/playbook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/playbook.proto @@ -59,11 +59,9 @@ type CreatePlaybookRequest struct { func (x *CreatePlaybookRequest) Reset() { *x = CreatePlaybookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePlaybookRequest) String() string { @@ -74,7 +72,7 @@ func (*CreatePlaybookRequest) ProtoMessage() {} func (x *CreatePlaybookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type DeletePlaybookRequest struct { func (x *DeletePlaybookRequest) Reset() { *x = DeletePlaybookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePlaybookRequest) String() string { @@ -133,7 +129,7 @@ func (*DeletePlaybookRequest) ProtoMessage() {} func (x *DeletePlaybookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +170,9 @@ type ListPlaybooksRequest struct { func (x *ListPlaybooksRequest) Reset() { *x = ListPlaybooksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPlaybooksRequest) String() string { @@ -189,7 +183,7 @@ func (*ListPlaybooksRequest) ProtoMessage() {} func (x *ListPlaybooksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +236,9 @@ type ListPlaybooksResponse struct { func (x *ListPlaybooksResponse) Reset() { *x = ListPlaybooksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPlaybooksResponse) String() string { @@ -257,7 +249,7 @@ func (*ListPlaybooksResponse) ProtoMessage() {} func (x *ListPlaybooksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +293,9 @@ type GetPlaybookRequest struct { func (x *GetPlaybookRequest) Reset() { *x = GetPlaybookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlaybookRequest) String() string { @@ -316,7 +306,7 @@ func (*GetPlaybookRequest) ProtoMessage() {} func (x *GetPlaybookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +344,9 @@ type UpdatePlaybookRequest struct { func (x *UpdatePlaybookRequest) Reset() { *x = UpdatePlaybookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePlaybookRequest) String() string { @@ -369,7 +357,7 @@ func (*UpdatePlaybookRequest) ProtoMessage() {} func (x *UpdatePlaybookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +437,9 @@ type Playbook struct { func (x *Playbook) Reset() { *x = Playbook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Playbook) String() string { @@ -464,7 +450,7 @@ func (*Playbook) ProtoMessage() {} func (x *Playbook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +573,9 @@ type CreatePlaybookVersionRequest struct { func (x *CreatePlaybookVersionRequest) Reset() { *x = CreatePlaybookVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePlaybookVersionRequest) String() string { @@ -602,7 +586,7 @@ func (*CreatePlaybookVersionRequest) ProtoMessage() {} func (x *CreatePlaybookVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,11 +638,9 @@ type PlaybookVersion struct { func (x *PlaybookVersion) Reset() { *x = PlaybookVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaybookVersion) String() string { @@ -669,7 +651,7 @@ func (*PlaybookVersion) ProtoMessage() {} func (x *PlaybookVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +716,9 @@ type GetPlaybookVersionRequest struct { func (x *GetPlaybookVersionRequest) Reset() { *x = GetPlaybookVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlaybookVersionRequest) String() string { @@ -749,7 +729,7 @@ func (*GetPlaybookVersionRequest) ProtoMessage() {} func (x *GetPlaybookVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +771,9 @@ type ListPlaybookVersionsRequest struct { func (x *ListPlaybookVersionsRequest) Reset() { *x = ListPlaybookVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPlaybookVersionsRequest) String() string { @@ -806,7 +784,7 @@ func (*ListPlaybookVersionsRequest) ProtoMessage() {} func (x *ListPlaybookVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +837,9 @@ type ListPlaybookVersionsResponse struct { func (x *ListPlaybookVersionsResponse) Reset() { *x = ListPlaybookVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPlaybookVersionsResponse) String() string { @@ -874,7 +850,7 @@ func (*ListPlaybookVersionsResponse) ProtoMessage() {} func (x *ListPlaybookVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +894,9 @@ type DeletePlaybookVersionRequest struct { func (x *DeletePlaybookVersionRequest) Reset() { *x = DeletePlaybookVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePlaybookVersionRequest) String() string { @@ -933,7 +907,7 @@ func (*DeletePlaybookVersionRequest) ProtoMessage() {} func (x *DeletePlaybookVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -973,11 +947,9 @@ type Playbook_Step struct { func (x *Playbook_Step) Reset() { *x = Playbook_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Playbook_Step) String() string { @@ -988,7 +960,7 @@ func (*Playbook_Step) ProtoMessage() {} func (x *Playbook_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1048,11 +1020,9 @@ type Playbook_Instruction struct { func (x *Playbook_Instruction) Reset() { *x = Playbook_Instruction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Playbook_Instruction) String() string { @@ -1063,7 +1033,7 @@ func (*Playbook_Instruction) ProtoMessage() {} func (x *Playbook_Instruction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1560,188 +1530,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_example_proto_init() file_google_cloud_dialogflow_cx_v3beta1_generative_settings_proto_init() file_google_cloud_dialogflow_cx_v3beta1_parameter_definition_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePlaybookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeletePlaybookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPlaybooksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPlaybooksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetPlaybookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePlaybookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Playbook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreatePlaybookVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PlaybookVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetPlaybookVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListPlaybookVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListPlaybookVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeletePlaybookVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Playbook_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Playbook_Instruction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_playbook_proto_msgTypes[13].OneofWrappers = []any{ (*Playbook_Step_Text)(nil), } diff --git a/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go b/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go index c7ae44c6cd43..3d06bdeba991 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -84,11 +84,9 @@ type ResponseMessage struct { func (x *ResponseMessage) Reset() { *x = ResponseMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage) String() string { @@ -99,7 +97,7 @@ func (*ResponseMessage) ProtoMessage() {} func (x *ResponseMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +318,9 @@ type ResponseMessage_Text struct { func (x *ResponseMessage_Text) Reset() { *x = ResponseMessage_Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_Text) String() string { @@ -335,7 +331,7 @@ func (*ResponseMessage_Text) ProtoMessage() {} func (x *ResponseMessage_Text) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +387,9 @@ type ResponseMessage_LiveAgentHandoff struct { func (x *ResponseMessage_LiveAgentHandoff) Reset() { *x = ResponseMessage_LiveAgentHandoff{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_LiveAgentHandoff) String() string { @@ -406,7 +400,7 @@ func (*ResponseMessage_LiveAgentHandoff) ProtoMessage() {} func (x *ResponseMessage_LiveAgentHandoff) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +450,9 @@ type ResponseMessage_ConversationSuccess struct { func (x *ResponseMessage_ConversationSuccess) Reset() { *x = ResponseMessage_ConversationSuccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_ConversationSuccess) String() string { @@ -471,7 +463,7 @@ func (*ResponseMessage_ConversationSuccess) ProtoMessage() {} func (x *ResponseMessage_ConversationSuccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +507,9 @@ type ResponseMessage_OutputAudioText struct { func (x *ResponseMessage_OutputAudioText) Reset() { *x = ResponseMessage_OutputAudioText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_OutputAudioText) String() string { @@ -530,7 +520,7 @@ func (*ResponseMessage_OutputAudioText) ProtoMessage() {} func (x *ResponseMessage_OutputAudioText) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +593,9 @@ type ResponseMessage_EndInteraction struct { func (x *ResponseMessage_EndInteraction) Reset() { *x = ResponseMessage_EndInteraction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_EndInteraction) String() string { @@ -618,7 +606,7 @@ func (*ResponseMessage_EndInteraction) ProtoMessage() {} func (x *ResponseMessage_EndInteraction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +638,9 @@ type ResponseMessage_PlayAudio struct { func (x *ResponseMessage_PlayAudio) Reset() { *x = ResponseMessage_PlayAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_PlayAudio) String() string { @@ -665,7 +651,7 @@ func (*ResponseMessage_PlayAudio) ProtoMessage() {} func (x *ResponseMessage_PlayAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +698,9 @@ type ResponseMessage_MixedAudio struct { func (x *ResponseMessage_MixedAudio) Reset() { *x = ResponseMessage_MixedAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio) String() string { @@ -727,7 +711,7 @@ func (*ResponseMessage_MixedAudio) ProtoMessage() {} func (x *ResponseMessage_MixedAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,11 +750,9 @@ type ResponseMessage_TelephonyTransferCall struct { func (x *ResponseMessage_TelephonyTransferCall) Reset() { *x = ResponseMessage_TelephonyTransferCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_TelephonyTransferCall) String() string { @@ -781,7 +763,7 @@ func (*ResponseMessage_TelephonyTransferCall) ProtoMessage() {} func (x *ResponseMessage_TelephonyTransferCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +818,9 @@ type ResponseMessage_KnowledgeInfoCard struct { func (x *ResponseMessage_KnowledgeInfoCard) Reset() { *x = ResponseMessage_KnowledgeInfoCard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_KnowledgeInfoCard) String() string { @@ -851,7 +831,7 @@ func (*ResponseMessage_KnowledgeInfoCard) ProtoMessage() {} func (x *ResponseMessage_KnowledgeInfoCard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +867,9 @@ type ResponseMessage_MixedAudio_Segment struct { func (x *ResponseMessage_MixedAudio_Segment) Reset() { *x = ResponseMessage_MixedAudio_Segment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMessage_MixedAudio_Segment) String() string { @@ -902,7 +880,7 @@ func (*ResponseMessage_MixedAudio_Segment) ProtoMessage() {} func (x *ResponseMessage_MixedAudio_Segment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,140 +1161,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_LiveAgentHandoff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_ConversationSuccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_OutputAudioText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_EndInteraction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_PlayAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_TelephonyTransferCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_KnowledgeInfoCard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMessage_MixedAudio_Segment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0].OneofWrappers = []any{ (*ResponseMessage_Text_)(nil), (*ResponseMessage_Payload)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/safety_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/safety_settings.pb.go index 2e040916e1ca..51e0df9f027c 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/safety_settings.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/safety_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/safety_settings.proto @@ -105,11 +105,9 @@ type SafetySettings struct { func (x *SafetySettings) Reset() { *x = SafetySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySettings) String() string { @@ -120,7 +118,7 @@ func (*SafetySettings) ProtoMessage() {} func (x *SafetySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,11 +161,9 @@ type SafetySettings_Phrase struct { func (x *SafetySettings_Phrase) Reset() { *x = SafetySettings_Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafetySettings_Phrase) String() string { @@ -178,7 +174,7 @@ func (*SafetySettings_Phrase) ProtoMessage() {} func (x *SafetySettings_Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,32 +292,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SafetySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_safety_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SafetySettings_Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go index 70d78fb52e86..d43593b4af99 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -317,11 +317,9 @@ type GetSecuritySettingsRequest struct { func (x *GetSecuritySettingsRequest) Reset() { *x = GetSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecuritySettingsRequest) String() string { @@ -332,7 +330,7 @@ func (*GetSecuritySettingsRequest) ProtoMessage() {} func (x *GetSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +369,9 @@ type UpdateSecuritySettingsRequest struct { func (x *UpdateSecuritySettingsRequest) Reset() { *x = UpdateSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecuritySettingsRequest) String() string { @@ -386,7 +382,7 @@ func (*UpdateSecuritySettingsRequest) ProtoMessage() {} func (x *UpdateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +429,9 @@ type ListSecuritySettingsRequest struct { func (x *ListSecuritySettingsRequest) Reset() { *x = ListSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecuritySettingsRequest) String() string { @@ -448,7 +442,7 @@ func (*ListSecuritySettingsRequest) ProtoMessage() {} func (x *ListSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +493,9 @@ type ListSecuritySettingsResponse struct { func (x *ListSecuritySettingsResponse) Reset() { *x = ListSecuritySettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecuritySettingsResponse) String() string { @@ -514,7 +506,7 @@ func (*ListSecuritySettingsResponse) ProtoMessage() {} func (x *ListSecuritySettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +551,9 @@ type CreateSecuritySettingsRequest struct { func (x *CreateSecuritySettingsRequest) Reset() { *x = CreateSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecuritySettingsRequest) String() string { @@ -574,7 +564,7 @@ func (*CreateSecuritySettingsRequest) ProtoMessage() {} func (x *CreateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +608,9 @@ type DeleteSecuritySettingsRequest struct { func (x *DeleteSecuritySettingsRequest) Reset() { *x = DeleteSecuritySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecuritySettingsRequest) String() string { @@ -633,7 +621,7 @@ func (*DeleteSecuritySettingsRequest) ProtoMessage() {} func (x *DeleteSecuritySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +745,9 @@ type SecuritySettings struct { func (x *SecuritySettings) Reset() { *x = SecuritySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings) String() string { @@ -772,7 +758,7 @@ func (*SecuritySettings) ProtoMessage() {} func (x *SecuritySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +913,9 @@ type SecuritySettings_AudioExportSettings struct { func (x *SecuritySettings_AudioExportSettings) Reset() { *x = SecuritySettings_AudioExportSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings_AudioExportSettings) String() string { @@ -942,7 +926,7 @@ func (*SecuritySettings_AudioExportSettings) ProtoMessage() {} func (x *SecuritySettings_AudioExportSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +990,9 @@ type SecuritySettings_InsightsExportSettings struct { func (x *SecuritySettings_InsightsExportSettings) Reset() { *x = SecuritySettings_InsightsExportSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecuritySettings_InsightsExportSettings) String() string { @@ -1021,7 +1003,7 @@ func (*SecuritySettings_InsightsExportSettings) ProtoMessage() {} func (x *SecuritySettings_InsightsExportSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,116 +1421,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_security_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSecuritySettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecuritySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings_AudioExportSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecuritySettings_InsightsExportSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[6].OneofWrappers = []any{ (*SecuritySettings_RetentionWindowDays)(nil), (*SecuritySettings_RetentionStrategy_)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/session.pb.go b/dialogflow/cx/apiv3beta1/cxpb/session.pb.go index 956f0419238c..68402aec0f3b 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/session.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/session.proto @@ -423,11 +423,9 @@ type AnswerFeedback struct { func (x *AnswerFeedback) Reset() { *x = AnswerFeedback{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback) String() string { @@ -438,7 +436,7 @@ func (*AnswerFeedback) ProtoMessage() {} func (x *AnswerFeedback) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,11 +492,9 @@ type SubmitAnswerFeedbackRequest struct { func (x *SubmitAnswerFeedbackRequest) Reset() { *x = SubmitAnswerFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitAnswerFeedbackRequest) String() string { @@ -509,7 +505,7 @@ func (*SubmitAnswerFeedbackRequest) ProtoMessage() {} func (x *SubmitAnswerFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +582,9 @@ type DetectIntentRequest struct { func (x *DetectIntentRequest) Reset() { *x = DetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentRequest) String() string { @@ -601,7 +595,7 @@ func (*DetectIntentRequest) ProtoMessage() {} func (x *DetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +673,9 @@ type DetectIntentResponse struct { func (x *DetectIntentResponse) Reset() { *x = DetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectIntentResponse) String() string { @@ -694,7 +686,7 @@ func (*DetectIntentResponse) ProtoMessage() {} func (x *DetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +819,9 @@ type StreamingDetectIntentRequest struct { func (x *StreamingDetectIntentRequest) Reset() { *x = StreamingDetectIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentRequest) String() string { @@ -842,7 +832,7 @@ func (*StreamingDetectIntentRequest) ProtoMessage() {} func (x *StreamingDetectIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +946,9 @@ type CloudConversationDebuggingInfo struct { func (x *CloudConversationDebuggingInfo) Reset() { *x = CloudConversationDebuggingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudConversationDebuggingInfo) String() string { @@ -971,7 +959,7 @@ func (*CloudConversationDebuggingInfo) ProtoMessage() {} func (x *CloudConversationDebuggingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1159,11 +1147,9 @@ type StreamingDetectIntentResponse struct { func (x *StreamingDetectIntentResponse) Reset() { *x = StreamingDetectIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingDetectIntentResponse) String() string { @@ -1174,7 +1160,7 @@ func (*StreamingDetectIntentResponse) ProtoMessage() {} func (x *StreamingDetectIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1305,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -1334,7 +1318,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1542,9 @@ type QueryParameters struct { func (x *QueryParameters) Reset() { *x = QueryParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryParameters) String() string { @@ -1573,7 +1555,7 @@ func (*QueryParameters) ProtoMessage() {} func (x *QueryParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1721,11 +1703,9 @@ type SearchConfig struct { func (x *SearchConfig) Reset() { *x = SearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchConfig) String() string { @@ -1736,7 +1716,7 @@ func (*SearchConfig) ProtoMessage() {} func (x *SearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1783,11 +1763,9 @@ type BoostSpec struct { func (x *BoostSpec) Reset() { *x = BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec) String() string { @@ -1798,7 +1776,7 @@ func (*BoostSpec) ProtoMessage() {} func (x *BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1815,9 @@ type BoostSpecs struct { func (x *BoostSpecs) Reset() { *x = BoostSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpecs) String() string { @@ -1852,7 +1828,7 @@ func (*BoostSpecs) ProtoMessage() {} func (x *BoostSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1900,11 +1876,9 @@ type FilterSpecs struct { func (x *FilterSpecs) Reset() { *x = FilterSpecs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilterSpecs) String() string { @@ -1915,7 +1889,7 @@ func (*FilterSpecs) ProtoMessage() {} func (x *FilterSpecs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1956,9 @@ type QueryInput struct { func (x *QueryInput) Reset() { *x = QueryInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryInput) String() string { @@ -1997,7 +1969,7 @@ func (*QueryInput) ProtoMessage() {} func (x *QueryInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2132,11 +2104,9 @@ type GenerativeInfo struct { func (x *GenerativeInfo) Reset() { *x = GenerativeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeInfo) String() string { @@ -2147,7 +2117,7 @@ func (*GenerativeInfo) ProtoMessage() {} func (x *GenerativeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2306,11 +2276,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -2321,7 +2289,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2580,11 +2548,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -2595,7 +2561,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2632,11 +2598,9 @@ type IntentInput struct { func (x *IntentInput) Reset() { *x = IntentInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentInput) String() string { @@ -2647,7 +2611,7 @@ func (*IntentInput) ProtoMessage() {} func (x *IntentInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2692,11 +2656,9 @@ type AudioInput struct { func (x *AudioInput) Reset() { *x = AudioInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioInput) String() string { @@ -2707,7 +2669,7 @@ func (*AudioInput) ProtoMessage() {} func (x *AudioInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2748,11 +2710,9 @@ type EventInput struct { func (x *EventInput) Reset() { *x = EventInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventInput) String() string { @@ -2763,7 +2723,7 @@ func (*EventInput) ProtoMessage() {} func (x *EventInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2799,11 +2759,9 @@ type DtmfInput struct { func (x *DtmfInput) Reset() { *x = DtmfInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DtmfInput) String() string { @@ -2814,7 +2772,7 @@ func (*DtmfInput) ProtoMessage() {} func (x *DtmfInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2892,11 +2850,9 @@ type Match struct { func (x *Match) Reset() { *x = Match{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Match) String() string { @@ -2907,7 +2863,7 @@ func (*Match) ProtoMessage() {} func (x *Match) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2995,11 +2951,9 @@ type MatchIntentRequest struct { func (x *MatchIntentRequest) Reset() { *x = MatchIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchIntentRequest) String() string { @@ -3010,7 +2964,7 @@ func (*MatchIntentRequest) ProtoMessage() {} func (x *MatchIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3079,11 +3033,9 @@ type MatchIntentResponse struct { func (x *MatchIntentResponse) Reset() { *x = MatchIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchIntentResponse) String() string { @@ -3094,7 +3046,7 @@ func (*MatchIntentResponse) ProtoMessage() {} func (x *MatchIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3214,11 +3166,9 @@ type FulfillIntentRequest struct { func (x *FulfillIntentRequest) Reset() { *x = FulfillIntentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillIntentRequest) String() string { @@ -3229,7 +3179,7 @@ func (*FulfillIntentRequest) ProtoMessage() {} func (x *FulfillIntentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3294,11 +3244,9 @@ type FulfillIntentResponse struct { func (x *FulfillIntentResponse) Reset() { *x = FulfillIntentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillIntentResponse) String() string { @@ -3309,7 +3257,7 @@ func (*FulfillIntentResponse) ProtoMessage() {} func (x *FulfillIntentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3370,11 +3318,9 @@ type SentimentAnalysisResult struct { func (x *SentimentAnalysisResult) Reset() { *x = SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SentimentAnalysisResult) String() string { @@ -3385,7 +3331,7 @@ func (*SentimentAnalysisResult) ProtoMessage() {} func (x *SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3431,11 +3377,9 @@ type AnswerFeedback_RatingReason struct { func (x *AnswerFeedback_RatingReason) Reset() { *x = AnswerFeedback_RatingReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerFeedback_RatingReason) String() string { @@ -3446,7 +3390,7 @@ func (*AnswerFeedback_RatingReason) ProtoMessage() {} func (x *AnswerFeedback_RatingReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3516,11 +3460,9 @@ type BoostSpec_ConditionBoostSpec struct { func (x *BoostSpec_ConditionBoostSpec) Reset() { *x = BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec) String() string { @@ -3531,7 +3473,7 @@ func (*BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3595,11 +3537,9 @@ type BoostSpec_ConditionBoostSpec_BoostControlSpec struct { func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -3610,7 +3550,7 @@ func (*BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoMessage() {} func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3675,11 +3615,9 @@ type BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint struct { func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -3690,7 +3628,7 @@ func (*BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoMessage( func (x *BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4870,380 +4808,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_session_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_init() file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SubmitAnswerFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CloudConversationDebuggingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StreamingDetectIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*QueryParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FilterSpecs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*QueryInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*IntentInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AudioInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*EventInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DtmfInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Match); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*MatchIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*MatchIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FulfillIntentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*FulfillIntentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnswerFeedback_RatingReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_session_proto_msgTypes[6].OneofWrappers = []any{ (*StreamingDetectIntentResponse_RecognitionResult)(nil), (*StreamingDetectIntentResponse_DetectIntentResponse)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/session_entity_type.pb.go b/dialogflow/cx/apiv3beta1/cxpb/session_entity_type.pb.go index f6ccee56e54d..fefb636a91da 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/session_entity_type.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/session_entity_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto @@ -141,11 +141,9 @@ type SessionEntityType struct { func (x *SessionEntityType) Reset() { *x = SessionEntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionEntityType) String() string { @@ -156,7 +154,7 @@ func (*SessionEntityType) ProtoMessage() {} func (x *SessionEntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +215,9 @@ type ListSessionEntityTypesRequest struct { func (x *ListSessionEntityTypesRequest) Reset() { *x = ListSessionEntityTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesRequest) String() string { @@ -232,7 +228,7 @@ func (*ListSessionEntityTypesRequest) ProtoMessage() {} func (x *ListSessionEntityTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +281,9 @@ type ListSessionEntityTypesResponse struct { func (x *ListSessionEntityTypesResponse) Reset() { *x = ListSessionEntityTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionEntityTypesResponse) String() string { @@ -300,7 +294,7 @@ func (*ListSessionEntityTypesResponse) ProtoMessage() {} func (x *ListSessionEntityTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +342,9 @@ type GetSessionEntityTypeRequest struct { func (x *GetSessionEntityTypeRequest) Reset() { *x = GetSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionEntityTypeRequest) String() string { @@ -363,7 +355,7 @@ func (*GetSessionEntityTypeRequest) ProtoMessage() {} func (x *GetSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +398,9 @@ type CreateSessionEntityTypeRequest struct { func (x *CreateSessionEntityTypeRequest) Reset() { *x = CreateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionEntityTypeRequest) String() string { @@ -421,7 +411,7 @@ func (*CreateSessionEntityTypeRequest) ProtoMessage() {} func (x *CreateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +461,9 @@ type UpdateSessionEntityTypeRequest struct { func (x *UpdateSessionEntityTypeRequest) Reset() { *x = UpdateSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionEntityTypeRequest) String() string { @@ -486,7 +474,7 @@ func (*UpdateSessionEntityTypeRequest) ProtoMessage() {} func (x *UpdateSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +522,9 @@ type DeleteSessionEntityTypeRequest struct { func (x *DeleteSessionEntityTypeRequest) Reset() { *x = DeleteSessionEntityTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionEntityTypeRequest) String() string { @@ -549,7 +535,7 @@ func (*DeleteSessionEntityTypeRequest) ProtoMessage() {} func (x *DeleteSessionEntityTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,92 +880,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SessionEntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionEntityTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_session_entity_type_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionEntityTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/test_case.pb.go b/dialogflow/cx/apiv3beta1/cxpb/test_case.pb.go index 0287cfabc764..fa1dd94fa2cd 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/test_case.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/test_case.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -363,11 +363,9 @@ type TestCase struct { func (x *TestCase) Reset() { *x = TestCase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCase) String() string { @@ -378,7 +376,7 @@ func (*TestCase) ProtoMessage() {} func (x *TestCase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +470,9 @@ type TestCaseResult struct { func (x *TestCaseResult) Reset() { *x = TestCaseResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCaseResult) String() string { @@ -487,7 +483,7 @@ func (*TestCaseResult) ProtoMessage() {} func (x *TestCaseResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +561,9 @@ type TestConfig struct { func (x *TestConfig) Reset() { *x = TestConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestConfig) String() string { @@ -580,7 +574,7 @@ func (*TestConfig) ProtoMessage() {} func (x *TestConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +625,9 @@ type ConversationTurn struct { func (x *ConversationTurn) Reset() { *x = ConversationTurn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn) String() string { @@ -646,7 +638,7 @@ func (*ConversationTurn) ProtoMessage() {} func (x *ConversationTurn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +682,9 @@ type TestRunDifference struct { func (x *TestRunDifference) Reset() { *x = TestRunDifference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestRunDifference) String() string { @@ -705,7 +695,7 @@ func (*TestRunDifference) ProtoMessage() {} func (x *TestRunDifference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +740,9 @@ type TransitionCoverage struct { func (x *TransitionCoverage) Reset() { *x = TransitionCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage) String() string { @@ -765,7 +753,7 @@ func (*TransitionCoverage) ProtoMessage() {} func (x *TransitionCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +799,9 @@ type TransitionRouteGroupCoverage struct { func (x *TransitionRouteGroupCoverage) Reset() { *x = TransitionRouteGroupCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage) String() string { @@ -826,7 +812,7 @@ func (*TransitionRouteGroupCoverage) ProtoMessage() {} func (x *TransitionRouteGroupCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +856,9 @@ type IntentCoverage struct { func (x *IntentCoverage) Reset() { *x = IntentCoverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentCoverage) String() string { @@ -885,7 +869,7 @@ func (*IntentCoverage) ProtoMessage() {} func (x *IntentCoverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,11 +914,9 @@ type CalculateCoverageRequest struct { func (x *CalculateCoverageRequest) Reset() { *x = CalculateCoverageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateCoverageRequest) String() string { @@ -945,7 +927,7 @@ func (*CalculateCoverageRequest) ProtoMessage() {} func (x *CalculateCoverageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +978,9 @@ type CalculateCoverageResponse struct { func (x *CalculateCoverageResponse) Reset() { *x = CalculateCoverageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateCoverageResponse) String() string { @@ -1011,7 +991,7 @@ func (*CalculateCoverageResponse) ProtoMessage() {} func (x *CalculateCoverageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1108,11 +1088,9 @@ type ListTestCasesRequest struct { func (x *ListTestCasesRequest) Reset() { *x = ListTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCasesRequest) String() string { @@ -1123,7 +1101,7 @@ func (*ListTestCasesRequest) ProtoMessage() {} func (x *ListTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1161,9 @@ type ListTestCasesResponse struct { func (x *ListTestCasesResponse) Reset() { *x = ListTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCasesResponse) String() string { @@ -1198,7 +1174,7 @@ func (*ListTestCasesResponse) ProtoMessage() {} func (x *ListTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1220,9 @@ type BatchDeleteTestCasesRequest struct { func (x *BatchDeleteTestCasesRequest) Reset() { *x = BatchDeleteTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteTestCasesRequest) String() string { @@ -1259,7 +1233,7 @@ func (*BatchDeleteTestCasesRequest) ProtoMessage() {} func (x *BatchDeleteTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1278,9 @@ type CreateTestCaseRequest struct { func (x *CreateTestCaseRequest) Reset() { *x = CreateTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTestCaseRequest) String() string { @@ -1319,7 +1291,7 @@ func (*CreateTestCaseRequest) ProtoMessage() {} func (x *CreateTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,11 +1339,9 @@ type UpdateTestCaseRequest struct { func (x *UpdateTestCaseRequest) Reset() { *x = UpdateTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTestCaseRequest) String() string { @@ -1382,7 +1352,7 @@ func (*UpdateTestCaseRequest) ProtoMessage() {} func (x *UpdateTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1396,9 @@ type GetTestCaseRequest struct { func (x *GetTestCaseRequest) Reset() { *x = GetTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTestCaseRequest) String() string { @@ -1441,7 +1409,7 @@ func (*GetTestCaseRequest) ProtoMessage() {} func (x *GetTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1449,9 @@ type RunTestCaseRequest struct { func (x *RunTestCaseRequest) Reset() { *x = RunTestCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseRequest) String() string { @@ -1496,7 +1462,7 @@ func (*RunTestCaseRequest) ProtoMessage() {} func (x *RunTestCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1504,9 @@ type RunTestCaseResponse struct { func (x *RunTestCaseResponse) Reset() { *x = RunTestCaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseResponse) String() string { @@ -1553,7 +1517,7 @@ func (*RunTestCaseResponse) ProtoMessage() {} func (x *RunTestCaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1586,11 +1550,9 @@ type RunTestCaseMetadata struct { func (x *RunTestCaseMetadata) Reset() { *x = RunTestCaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTestCaseMetadata) String() string { @@ -1601,7 +1563,7 @@ func (*RunTestCaseMetadata) ProtoMessage() {} func (x *RunTestCaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1598,9 @@ type BatchRunTestCasesRequest struct { func (x *BatchRunTestCasesRequest) Reset() { *x = BatchRunTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesRequest) String() string { @@ -1651,7 +1611,7 @@ func (*BatchRunTestCasesRequest) ProtoMessage() {} func (x *BatchRunTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1663,9 @@ type BatchRunTestCasesResponse struct { func (x *BatchRunTestCasesResponse) Reset() { *x = BatchRunTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesResponse) String() string { @@ -1718,7 +1676,7 @@ func (*BatchRunTestCasesResponse) ProtoMessage() {} func (x *BatchRunTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1712,9 @@ type BatchRunTestCasesMetadata struct { func (x *BatchRunTestCasesMetadata) Reset() { *x = BatchRunTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunTestCasesMetadata) String() string { @@ -1769,7 +1725,7 @@ func (*BatchRunTestCasesMetadata) ProtoMessage() {} func (x *BatchRunTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1807,11 +1763,9 @@ type TestError struct { func (x *TestError) Reset() { *x = TestError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestError) String() string { @@ -1822,7 +1776,7 @@ func (*TestError) ProtoMessage() {} func (x *TestError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1879,11 +1833,9 @@ type ImportTestCasesRequest struct { func (x *ImportTestCasesRequest) Reset() { *x = ImportTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesRequest) String() string { @@ -1894,7 +1846,7 @@ func (*ImportTestCasesRequest) ProtoMessage() {} func (x *ImportTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1930,9 @@ type ImportTestCasesResponse struct { func (x *ImportTestCasesResponse) Reset() { *x = ImportTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesResponse) String() string { @@ -1993,7 +1943,7 @@ func (*ImportTestCasesResponse) ProtoMessage() {} func (x *ImportTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2029,11 +1979,9 @@ type ImportTestCasesMetadata struct { func (x *ImportTestCasesMetadata) Reset() { *x = ImportTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportTestCasesMetadata) String() string { @@ -2044,7 +1992,7 @@ func (*ImportTestCasesMetadata) ProtoMessage() {} func (x *ImportTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2080,11 +2028,9 @@ type TestCaseError struct { func (x *TestCaseError) Reset() { *x = TestCaseError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestCaseError) String() string { @@ -2095,7 +2041,7 @@ func (*TestCaseError) ProtoMessage() {} func (x *TestCaseError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2158,11 +2104,9 @@ type ExportTestCasesRequest struct { func (x *ExportTestCasesRequest) Reset() { *x = ExportTestCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesRequest) String() string { @@ -2173,7 +2117,7 @@ func (*ExportTestCasesRequest) ProtoMessage() {} func (x *ExportTestCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2261,11 +2205,9 @@ type ExportTestCasesResponse struct { func (x *ExportTestCasesResponse) Reset() { *x = ExportTestCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesResponse) String() string { @@ -2276,7 +2218,7 @@ func (*ExportTestCasesResponse) ProtoMessage() {} func (x *ExportTestCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2345,11 +2287,9 @@ type ExportTestCasesMetadata struct { func (x *ExportTestCasesMetadata) Reset() { *x = ExportTestCasesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportTestCasesMetadata) String() string { @@ -2360,7 +2300,7 @@ func (*ExportTestCasesMetadata) ProtoMessage() {} func (x *ExportTestCasesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2423,11 +2363,9 @@ type ListTestCaseResultsRequest struct { func (x *ListTestCaseResultsRequest) Reset() { *x = ListTestCaseResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCaseResultsRequest) String() string { @@ -2438,7 +2376,7 @@ func (*ListTestCaseResultsRequest) ProtoMessage() {} func (x *ListTestCaseResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2497,11 +2435,9 @@ type ListTestCaseResultsResponse struct { func (x *ListTestCaseResultsResponse) Reset() { *x = ListTestCaseResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTestCaseResultsResponse) String() string { @@ -2512,7 +2448,7 @@ func (*ListTestCaseResultsResponse) ProtoMessage() {} func (x *ListTestCaseResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2556,11 +2492,9 @@ type GetTestCaseResultRequest struct { func (x *GetTestCaseResultRequest) Reset() { *x = GetTestCaseResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTestCaseResultRequest) String() string { @@ -2571,7 +2505,7 @@ func (*GetTestCaseResultRequest) ProtoMessage() {} func (x *GetTestCaseResultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2618,11 +2552,9 @@ type ConversationTurn_UserInput struct { func (x *ConversationTurn_UserInput) Reset() { *x = ConversationTurn_UserInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn_UserInput) String() string { @@ -2633,7 +2565,7 @@ func (*ConversationTurn_UserInput) ProtoMessage() {} func (x *ConversationTurn_UserInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2708,11 +2640,9 @@ type ConversationTurn_VirtualAgentOutput struct { func (x *ConversationTurn_VirtualAgentOutput) Reset() { *x = ConversationTurn_VirtualAgentOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationTurn_VirtualAgentOutput) String() string { @@ -2723,7 +2653,7 @@ func (*ConversationTurn_VirtualAgentOutput) ProtoMessage() {} func (x *ConversationTurn_VirtualAgentOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2804,11 +2734,9 @@ type TransitionCoverage_TransitionNode struct { func (x *TransitionCoverage_TransitionNode) Reset() { *x = TransitionCoverage_TransitionNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage_TransitionNode) String() string { @@ -2819,7 +2747,7 @@ func (*TransitionCoverage_TransitionNode) ProtoMessage() {} func (x *TransitionCoverage_TransitionNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2903,11 +2831,9 @@ type TransitionCoverage_Transition struct { func (x *TransitionCoverage_Transition) Reset() { *x = TransitionCoverage_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionCoverage_Transition) String() string { @@ -2918,7 +2844,7 @@ func (*TransitionCoverage_Transition) ProtoMessage() {} func (x *TransitionCoverage_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3017,11 +2943,9 @@ type TransitionRouteGroupCoverage_Coverage struct { func (x *TransitionRouteGroupCoverage_Coverage) Reset() { *x = TransitionRouteGroupCoverage_Coverage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage_Coverage) String() string { @@ -3032,7 +2956,7 @@ func (*TransitionRouteGroupCoverage_Coverage) ProtoMessage() {} func (x *TransitionRouteGroupCoverage_Coverage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3083,11 +3007,9 @@ type TransitionRouteGroupCoverage_Coverage_Transition struct { func (x *TransitionRouteGroupCoverage_Coverage_Transition) Reset() { *x = TransitionRouteGroupCoverage_Coverage_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroupCoverage_Coverage_Transition) String() string { @@ -3098,7 +3020,7 @@ func (*TransitionRouteGroupCoverage_Coverage_Transition) ProtoMessage() {} func (x *TransitionRouteGroupCoverage_Coverage_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3142,11 +3064,9 @@ type IntentCoverage_Intent struct { func (x *IntentCoverage_Intent) Reset() { *x = IntentCoverage_Intent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntentCoverage_Intent) String() string { @@ -3157,7 +3077,7 @@ func (*IntentCoverage_Intent) ProtoMessage() {} func (x *IntentCoverage_Intent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4118,488 +4038,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_init() { file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() file_google_cloud_dialogflow_cx_v3beta1_session_proto_init() file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TestCase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TestCaseResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TestConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TestRunDifference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IntentCoverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CalculateCoverageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CalculateCoverageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RunTestCaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*TestError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ImportTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*TestCaseError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExportTestCasesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCaseResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListTestCaseResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetTestCaseResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn_UserInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ConversationTurn_VirtualAgentOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage_TransitionNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*TransitionCoverage_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage_Coverage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroupCoverage_Coverage_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*IntentCoverage_Intent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_msgTypes[9].OneofWrappers = []any{ (*CalculateCoverageResponse_IntentCoverage)(nil), (*CalculateCoverageResponse_TransitionCoverage)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/tool.pb.go b/dialogflow/cx/apiv3beta1/cxpb/tool.pb.go index 7af7e39c885d..0a2e874fdfea 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/tool.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/tool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/tool.proto @@ -333,11 +333,9 @@ type CreateToolRequest struct { func (x *CreateToolRequest) Reset() { *x = CreateToolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateToolRequest) String() string { @@ -348,7 +346,7 @@ func (*CreateToolRequest) ProtoMessage() {} func (x *CreateToolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +394,9 @@ type ListToolsRequest struct { func (x *ListToolsRequest) Reset() { *x = ListToolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListToolsRequest) String() string { @@ -411,7 +407,7 @@ func (*ListToolsRequest) ProtoMessage() {} func (x *ListToolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +460,9 @@ type ListToolsResponse struct { func (x *ListToolsResponse) Reset() { *x = ListToolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListToolsResponse) String() string { @@ -479,7 +473,7 @@ func (*ListToolsResponse) ProtoMessage() {} func (x *ListToolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +517,9 @@ type GetToolRequest struct { func (x *GetToolRequest) Reset() { *x = GetToolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetToolRequest) String() string { @@ -538,7 +530,7 @@ func (*GetToolRequest) ProtoMessage() {} func (x *GetToolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +580,9 @@ type ExportToolsRequest struct { func (x *ExportToolsRequest) Reset() { *x = ExportToolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportToolsRequest) String() string { @@ -603,7 +593,7 @@ func (*ExportToolsRequest) ProtoMessage() {} func (x *ExportToolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,11 +694,9 @@ type ExportToolsResponse struct { func (x *ExportToolsResponse) Reset() { *x = ExportToolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportToolsResponse) String() string { @@ -719,7 +707,7 @@ func (*ExportToolsResponse) ProtoMessage() {} func (x *ExportToolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +781,9 @@ type UpdateToolRequest struct { func (x *UpdateToolRequest) Reset() { *x = UpdateToolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateToolRequest) String() string { @@ -808,7 +794,7 @@ func (*UpdateToolRequest) ProtoMessage() {} func (x *UpdateToolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +846,9 @@ type DeleteToolRequest struct { func (x *DeleteToolRequest) Reset() { *x = DeleteToolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteToolRequest) String() string { @@ -875,7 +859,7 @@ func (*DeleteToolRequest) ProtoMessage() {} func (x *DeleteToolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -936,11 +920,9 @@ type Tool struct { func (x *Tool) Reset() { *x = Tool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool) String() string { @@ -951,7 +933,7 @@ func (*Tool) ProtoMessage() {} func (x *Tool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,11 +1054,9 @@ type ExportToolsMetadata struct { func (x *ExportToolsMetadata) Reset() { *x = ExportToolsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportToolsMetadata) String() string { @@ -1087,7 +1067,7 @@ func (*ExportToolsMetadata) ProtoMessage() {} func (x *ExportToolsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1105,9 @@ type Tool_OpenApiTool struct { func (x *Tool_OpenApiTool) Reset() { *x = Tool_OpenApiTool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_OpenApiTool) String() string { @@ -1140,7 +1118,7 @@ func (*Tool_OpenApiTool) ProtoMessage() {} func (x *Tool_OpenApiTool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,11 +1194,9 @@ type Tool_DataStoreTool struct { func (x *Tool_DataStoreTool) Reset() { *x = Tool_DataStoreTool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_DataStoreTool) String() string { @@ -1231,7 +1207,7 @@ func (*Tool_DataStoreTool) ProtoMessage() {} func (x *Tool_DataStoreTool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1250,9 @@ type Tool_ExtensionTool struct { func (x *Tool_ExtensionTool) Reset() { *x = Tool_ExtensionTool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_ExtensionTool) String() string { @@ -1289,7 +1263,7 @@ func (*Tool_ExtensionTool) ProtoMessage() {} func (x *Tool_ExtensionTool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1331,11 +1305,9 @@ type Tool_FunctionTool struct { func (x *Tool_FunctionTool) Reset() { *x = Tool_FunctionTool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_FunctionTool) String() string { @@ -1346,7 +1318,7 @@ func (*Tool_FunctionTool) ProtoMessage() {} func (x *Tool_FunctionTool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1394,11 +1366,9 @@ type Tool_Authentication struct { func (x *Tool_Authentication) Reset() { *x = Tool_Authentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_Authentication) String() string { @@ -1409,7 +1379,7 @@ func (*Tool_Authentication) ProtoMessage() {} func (x *Tool_Authentication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1506,11 +1476,9 @@ type Tool_TLSConfig struct { func (x *Tool_TLSConfig) Reset() { *x = Tool_TLSConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_TLSConfig) String() string { @@ -1521,7 +1489,7 @@ func (*Tool_TLSConfig) ProtoMessage() {} func (x *Tool_TLSConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1560,11 +1528,9 @@ type Tool_ServiceDirectoryConfig struct { func (x *Tool_ServiceDirectoryConfig) Reset() { *x = Tool_ServiceDirectoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_ServiceDirectoryConfig) String() string { @@ -1575,7 +1541,7 @@ func (*Tool_ServiceDirectoryConfig) ProtoMessage() {} func (x *Tool_ServiceDirectoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1607,11 +1573,9 @@ type Tool_DataStoreTool_FallbackPrompt struct { func (x *Tool_DataStoreTool_FallbackPrompt) Reset() { *x = Tool_DataStoreTool_FallbackPrompt{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_DataStoreTool_FallbackPrompt) String() string { @@ -1622,7 +1586,7 @@ func (*Tool_DataStoreTool_FallbackPrompt) ProtoMessage() {} func (x *Tool_DataStoreTool_FallbackPrompt) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1655,11 +1619,9 @@ type Tool_Authentication_ApiKeyConfig struct { func (x *Tool_Authentication_ApiKeyConfig) Reset() { *x = Tool_Authentication_ApiKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_Authentication_ApiKeyConfig) String() string { @@ -1670,7 +1632,7 @@ func (*Tool_Authentication_ApiKeyConfig) ProtoMessage() {} func (x *Tool_Authentication_ApiKeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1727,11 +1689,9 @@ type Tool_Authentication_OAuthConfig struct { func (x *Tool_Authentication_OAuthConfig) Reset() { *x = Tool_Authentication_OAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_Authentication_OAuthConfig) String() string { @@ -1742,7 +1702,7 @@ func (*Tool_Authentication_OAuthConfig) ProtoMessage() {} func (x *Tool_Authentication_OAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1768,9 @@ type Tool_Authentication_ServiceAgentAuthConfig struct { func (x *Tool_Authentication_ServiceAgentAuthConfig) Reset() { *x = Tool_Authentication_ServiceAgentAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_Authentication_ServiceAgentAuthConfig) String() string { @@ -1823,7 +1781,7 @@ func (*Tool_Authentication_ServiceAgentAuthConfig) ProtoMessage() {} func (x *Tool_Authentication_ServiceAgentAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1862,11 +1820,9 @@ type Tool_Authentication_BearerTokenConfig struct { func (x *Tool_Authentication_BearerTokenConfig) Reset() { *x = Tool_Authentication_BearerTokenConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_Authentication_BearerTokenConfig) String() string { @@ -1877,7 +1833,7 @@ func (*Tool_Authentication_BearerTokenConfig) ProtoMessage() {} func (x *Tool_Authentication_BearerTokenConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1924,11 +1880,9 @@ type Tool_TLSConfig_CACert struct { func (x *Tool_TLSConfig_CACert) Reset() { *x = Tool_TLSConfig_CACert{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tool_TLSConfig_CACert) String() string { @@ -1939,7 +1893,7 @@ func (*Tool_TLSConfig_CACert) ProtoMessage() {} func (x *Tool_TLSConfig_CACert) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2492,284 +2446,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_tool_proto_init() { } file_google_cloud_dialogflow_cx_v3beta1_data_store_connection_proto_init() file_google_cloud_dialogflow_cx_v3beta1_inline_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateToolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListToolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListToolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetToolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportToolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportToolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateToolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteToolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Tool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExportToolsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Tool_OpenApiTool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Tool_DataStoreTool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Tool_ExtensionTool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Tool_FunctionTool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Tool_Authentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Tool_TLSConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Tool_ServiceDirectoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Tool_DataStoreTool_FallbackPrompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Tool_Authentication_ApiKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Tool_Authentication_OAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Tool_Authentication_ServiceAgentAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Tool_Authentication_BearerTokenConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Tool_TLSConfig_CACert); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_tool_proto_msgTypes[4].OneofWrappers = []any{ (*ExportToolsRequest_ToolsUri)(nil), (*ExportToolsRequest_ToolsContentInline)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/tool_call.pb.go b/dialogflow/cx/apiv3beta1/cxpb/tool_call.pb.go index 1f850d9279ee..2f78c1bc2469 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/tool_call.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/tool_call.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto @@ -55,11 +55,9 @@ type ToolCall struct { func (x *ToolCall) Reset() { *x = ToolCall{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCall) String() string { @@ -70,7 +68,7 @@ func (*ToolCall) ProtoMessage() {} func (x *ToolCall) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type ToolCallResult struct { func (x *ToolCallResult) Reset() { *x = ToolCallResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallResult) String() string { @@ -144,7 +140,7 @@ func (*ToolCallResult) ProtoMessage() {} func (x *ToolCallResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +220,9 @@ type ToolCallResult_Error struct { func (x *ToolCallResult_Error) Reset() { *x = ToolCallResult_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToolCallResult_Error) String() string { @@ -239,7 +233,7 @@ func (*ToolCallResult_Error) ProtoMessage() {} func (x *ToolCallResult_Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,44 +354,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_tool_call_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ToolCall); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ToolCallResult_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_tool_call_proto_msgTypes[1].OneofWrappers = []any{ (*ToolCallResult_Error_)(nil), (*ToolCallResult_OutputParameters)(nil), diff --git a/dialogflow/cx/apiv3beta1/cxpb/transition_route_group.pb.go b/dialogflow/cx/apiv3beta1/cxpb/transition_route_group.pb.go index f01dbcb02cb8..cd4b5a30007d 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/transition_route_group.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/transition_route_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -68,11 +68,9 @@ type TransitionRouteGroup struct { func (x *TransitionRouteGroup) Reset() { *x = TransitionRouteGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionRouteGroup) String() string { @@ -83,7 +81,7 @@ func (*TransitionRouteGroup) ProtoMessage() {} func (x *TransitionRouteGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +152,9 @@ type ListTransitionRouteGroupsRequest struct { func (x *ListTransitionRouteGroupsRequest) Reset() { *x = ListTransitionRouteGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransitionRouteGroupsRequest) String() string { @@ -169,7 +165,7 @@ func (*ListTransitionRouteGroupsRequest) ProtoMessage() {} func (x *ListTransitionRouteGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type ListTransitionRouteGroupsResponse struct { func (x *ListTransitionRouteGroupsResponse) Reset() { *x = ListTransitionRouteGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransitionRouteGroupsResponse) String() string { @@ -246,7 +240,7 @@ func (*ListTransitionRouteGroupsResponse) ProtoMessage() {} func (x *ListTransitionRouteGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type GetTransitionRouteGroupRequest struct { func (x *GetTransitionRouteGroupRequest) Reset() { *x = GetTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTransitionRouteGroupRequest) String() string { @@ -321,7 +313,7 @@ func (*GetTransitionRouteGroupRequest) ProtoMessage() {} func (x *GetTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +374,9 @@ type CreateTransitionRouteGroupRequest struct { func (x *CreateTransitionRouteGroupRequest) Reset() { *x = CreateTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTransitionRouteGroupRequest) String() string { @@ -397,7 +387,7 @@ func (*CreateTransitionRouteGroupRequest) ProtoMessage() {} func (x *CreateTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +450,9 @@ type UpdateTransitionRouteGroupRequest struct { func (x *UpdateTransitionRouteGroupRequest) Reset() { *x = UpdateTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTransitionRouteGroupRequest) String() string { @@ -475,7 +463,7 @@ func (*UpdateTransitionRouteGroupRequest) ProtoMessage() {} func (x *UpdateTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +525,9 @@ type DeleteTransitionRouteGroupRequest struct { func (x *DeleteTransitionRouteGroupRequest) Reset() { *x = DeleteTransitionRouteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTransitionRouteGroupRequest) String() string { @@ -552,7 +538,7 @@ func (*DeleteTransitionRouteGroupRequest) ProtoMessage() {} func (x *DeleteTransitionRouteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -906,92 +892,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_init() return } file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransitionRouteGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTransitionRouteGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTransitionRouteGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_transition_route_group_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTransitionRouteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/validation_message.pb.go b/dialogflow/cx/apiv3beta1/cxpb/validation_message.pb.go index f0f7863775ee..c30e08a1471c 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/validation_message.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/validation_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -215,11 +215,9 @@ type ValidationMessage struct { func (x *ValidationMessage) Reset() { *x = ValidationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationMessage) String() string { @@ -230,7 +228,7 @@ func (*ValidationMessage) ProtoMessage() {} func (x *ValidationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +293,9 @@ type ResourceName struct { func (x *ResourceName) Reset() { *x = ResourceName{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceName) String() string { @@ -310,7 +306,7 @@ func (*ResourceName) ProtoMessage() {} func (x *ResourceName) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,32 +447,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_init() { if File_google_cloud_dialogflow_cx_v3beta1_validation_message_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValidationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/version.pb.go b/dialogflow/cx/apiv3beta1/cxpb/version.pb.go index 906c113f8d66..64418fca38a8 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/version.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/version.proto @@ -117,11 +117,9 @@ type CreateVersionOperationMetadata struct { func (x *CreateVersionOperationMetadata) Reset() { *x = CreateVersionOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionOperationMetadata) String() string { @@ -132,7 +130,7 @@ func (*CreateVersionOperationMetadata) ProtoMessage() {} func (x *CreateVersionOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +179,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -196,7 +192,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +269,9 @@ type ListVersionsRequest struct { func (x *ListVersionsRequest) Reset() { *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsRequest) String() string { @@ -288,7 +282,7 @@ func (*ListVersionsRequest) ProtoMessage() {} func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +336,9 @@ type ListVersionsResponse struct { func (x *ListVersionsResponse) Reset() { *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVersionsResponse) String() string { @@ -357,7 +349,7 @@ func (*ListVersionsResponse) ProtoMessage() {} func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +393,9 @@ type GetVersionRequest struct { func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -416,7 +406,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +445,9 @@ type CreateVersionRequest struct { func (x *CreateVersionRequest) Reset() { *x = CreateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVersionRequest) String() string { @@ -470,7 +458,7 @@ func (*CreateVersionRequest) ProtoMessage() {} func (x *CreateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +503,9 @@ type UpdateVersionRequest struct { func (x *UpdateVersionRequest) Reset() { *x = UpdateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVersionRequest) String() string { @@ -530,7 +516,7 @@ func (*UpdateVersionRequest) ProtoMessage() {} func (x *UpdateVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +560,9 @@ type DeleteVersionRequest struct { func (x *DeleteVersionRequest) Reset() { *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVersionRequest) String() string { @@ -589,7 +573,7 @@ func (*DeleteVersionRequest) ProtoMessage() {} func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +615,9 @@ type LoadVersionRequest struct { func (x *LoadVersionRequest) Reset() { *x = LoadVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadVersionRequest) String() string { @@ -646,7 +628,7 @@ func (*LoadVersionRequest) ProtoMessage() {} func (x *LoadVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +687,9 @@ type CompareVersionsRequest struct { func (x *CompareVersionsRequest) Reset() { *x = CompareVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompareVersionsRequest) String() string { @@ -720,7 +700,7 @@ func (*CompareVersionsRequest) ProtoMessage() {} func (x *CompareVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +753,9 @@ type CompareVersionsResponse struct { func (x *CompareVersionsResponse) Reset() { *x = CompareVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompareVersionsResponse) String() string { @@ -788,7 +766,7 @@ func (*CompareVersionsResponse) ProtoMessage() {} func (x *CompareVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1172,140 +1150,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_version_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LoadVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CompareVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_version_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompareVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/dialogflow/cx/apiv3beta1/cxpb/webhook.pb.go b/dialogflow/cx/apiv3beta1/cxpb/webhook.pb.go index f68902347c11..a1eb24139239 100755 --- a/dialogflow/cx/apiv3beta1/cxpb/webhook.pb.go +++ b/dialogflow/cx/apiv3beta1/cxpb/webhook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -386,11 +386,9 @@ type Webhook struct { func (x *Webhook) Reset() { *x = Webhook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook) String() string { @@ -401,7 +399,7 @@ func (*Webhook) ProtoMessage() {} func (x *Webhook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +501,9 @@ type ListWebhooksRequest struct { func (x *ListWebhooksRequest) Reset() { *x = ListWebhooksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWebhooksRequest) String() string { @@ -518,7 +514,7 @@ func (*ListWebhooksRequest) ProtoMessage() {} func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +567,9 @@ type ListWebhooksResponse struct { func (x *ListWebhooksResponse) Reset() { *x = ListWebhooksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWebhooksResponse) String() string { @@ -586,7 +580,7 @@ func (*ListWebhooksResponse) ProtoMessage() {} func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +624,9 @@ type GetWebhookRequest struct { func (x *GetWebhookRequest) Reset() { *x = GetWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWebhookRequest) String() string { @@ -645,7 +637,7 @@ func (*GetWebhookRequest) ProtoMessage() {} func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +675,9 @@ type CreateWebhookRequest struct { func (x *CreateWebhookRequest) Reset() { *x = CreateWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWebhookRequest) String() string { @@ -698,7 +688,7 @@ func (*CreateWebhookRequest) ProtoMessage() {} func (x *CreateWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +733,9 @@ type UpdateWebhookRequest struct { func (x *UpdateWebhookRequest) Reset() { *x = UpdateWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWebhookRequest) String() string { @@ -758,7 +746,7 @@ func (*UpdateWebhookRequest) ProtoMessage() {} func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +801,9 @@ type DeleteWebhookRequest struct { func (x *DeleteWebhookRequest) Reset() { *x = DeleteWebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWebhookRequest) String() string { @@ -828,7 +814,7 @@ func (*DeleteWebhookRequest) ProtoMessage() {} func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +895,9 @@ type WebhookRequest struct { func (x *WebhookRequest) Reset() { *x = WebhookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest) String() string { @@ -924,7 +908,7 @@ func (*WebhookRequest) ProtoMessage() {} func (x *WebhookRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,11 +1113,9 @@ type WebhookResponse struct { func (x *WebhookResponse) Reset() { *x = WebhookResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse) String() string { @@ -1144,7 +1126,7 @@ func (*WebhookResponse) ProtoMessage() {} func (x *WebhookResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1240,9 @@ type PageInfo struct { func (x *PageInfo) Reset() { *x = PageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo) String() string { @@ -1273,7 +1253,7 @@ func (*PageInfo) ProtoMessage() {} func (x *PageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1322,9 @@ type SessionInfo struct { func (x *SessionInfo) Reset() { *x = SessionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionInfo) String() string { @@ -1357,7 +1335,7 @@ func (*SessionInfo) ProtoMessage() {} func (x *SessionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1382,9 @@ type LanguageInfo struct { func (x *LanguageInfo) Reset() { *x = LanguageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LanguageInfo) String() string { @@ -1419,7 +1395,7 @@ func (*LanguageInfo) ProtoMessage() {} func (x *LanguageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1492,9 @@ type Webhook_GenericWebService struct { func (x *Webhook_GenericWebService) Reset() { *x = Webhook_GenericWebService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_GenericWebService) String() string { @@ -1531,7 +1505,7 @@ func (*Webhook_GenericWebService) ProtoMessage() {} func (x *Webhook_GenericWebService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1645,11 +1619,9 @@ type Webhook_ServiceDirectoryConfig struct { func (x *Webhook_ServiceDirectoryConfig) Reset() { *x = Webhook_ServiceDirectoryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_ServiceDirectoryConfig) String() string { @@ -1660,7 +1632,7 @@ func (*Webhook_ServiceDirectoryConfig) ProtoMessage() {} func (x *Webhook_ServiceDirectoryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,11 +1681,9 @@ type Webhook_GenericWebService_OAuthConfig struct { func (x *Webhook_GenericWebService_OAuthConfig) Reset() { *x = Webhook_GenericWebService_OAuthConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Webhook_GenericWebService_OAuthConfig) String() string { @@ -1724,7 +1694,7 @@ func (*Webhook_GenericWebService_OAuthConfig) ProtoMessage() {} func (x *Webhook_GenericWebService_OAuthConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1785,11 +1755,9 @@ type WebhookRequest_FulfillmentInfo struct { func (x *WebhookRequest_FulfillmentInfo) Reset() { *x = WebhookRequest_FulfillmentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_FulfillmentInfo) String() string { @@ -1800,7 +1768,7 @@ func (*WebhookRequest_FulfillmentInfo) ProtoMessage() {} func (x *WebhookRequest_FulfillmentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1848,11 +1816,9 @@ type WebhookRequest_IntentInfo struct { func (x *WebhookRequest_IntentInfo) Reset() { *x = WebhookRequest_IntentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_IntentInfo) String() string { @@ -1863,7 +1829,7 @@ func (*WebhookRequest_IntentInfo) ProtoMessage() {} func (x *WebhookRequest_IntentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1924,11 +1890,9 @@ type WebhookRequest_SentimentAnalysisResult struct { func (x *WebhookRequest_SentimentAnalysisResult) Reset() { *x = WebhookRequest_SentimentAnalysisResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_SentimentAnalysisResult) String() string { @@ -1939,7 +1903,7 @@ func (*WebhookRequest_SentimentAnalysisResult) ProtoMessage() {} func (x *WebhookRequest_SentimentAnalysisResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1983,11 +1947,9 @@ type WebhookRequest_IntentInfo_IntentParameterValue struct { func (x *WebhookRequest_IntentInfo_IntentParameterValue) Reset() { *x = WebhookRequest_IntentInfo_IntentParameterValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookRequest_IntentInfo_IntentParameterValue) String() string { @@ -1998,7 +1960,7 @@ func (*WebhookRequest_IntentInfo_IntentParameterValue) ProtoMessage() {} func (x *WebhookRequest_IntentInfo_IntentParameterValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2003,9 @@ type WebhookResponse_FulfillmentResponse struct { func (x *WebhookResponse_FulfillmentResponse) Reset() { *x = WebhookResponse_FulfillmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebhookResponse_FulfillmentResponse) String() string { @@ -2056,7 +2016,7 @@ func (*WebhookResponse_FulfillmentResponse) ProtoMessage() {} func (x *WebhookResponse_FulfillmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2061,9 @@ type PageInfo_FormInfo struct { func (x *PageInfo_FormInfo) Reset() { *x = PageInfo_FormInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo_FormInfo) String() string { @@ -2116,7 +2074,7 @@ func (*PageInfo_FormInfo) ProtoMessage() {} func (x *PageInfo_FormInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2184,11 +2142,9 @@ type PageInfo_FormInfo_ParameterInfo struct { func (x *PageInfo_FormInfo_ParameterInfo) Reset() { *x = PageInfo_FormInfo_ParameterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo_FormInfo_ParameterInfo) String() string { @@ -2199,7 +2155,7 @@ func (*PageInfo_FormInfo_ParameterInfo) ProtoMessage() {} func (x *PageInfo_FormInfo_ParameterInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2904,272 +2860,6 @@ func file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_init() { return } file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Webhook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWebhooksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWebhooksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SessionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LanguageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_GenericWebService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_ServiceDirectoryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Webhook_GenericWebService_OAuthConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_FulfillmentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_IntentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_SentimentAnalysisResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*WebhookRequest_IntentInfo_IntentParameterValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*WebhookResponse_FulfillmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo_FormInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo_FormInfo_ParameterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_msgTypes[0].OneofWrappers = []any{ (*Webhook_GenericWebService_)(nil), (*Webhook_ServiceDirectory)(nil), diff --git a/dialogflow/cx/apiv3beta1/deployments_client.go b/dialogflow/cx/apiv3beta1/deployments_client.go index 7122173b44f8..51fe8c62d99f 100755 --- a/dialogflow/cx/apiv3beta1/deployments_client.go +++ b/dialogflow/cx/apiv3beta1/deployments_client.go @@ -19,7 +19,7 @@ package cx import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -241,6 +240,8 @@ type deploymentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDeploymentsClient creates a new deployments client based on gRPC. @@ -268,6 +269,7 @@ func NewDeploymentsClient(ctx context.Context, opts ...option.ClientOption) (*De connPool: connPool, deploymentsClient: cxpb.NewDeploymentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -316,6 +318,8 @@ type deploymentsRESTClient struct { // Points back to the CallOptions field of the containing DeploymentsClient CallOptions **DeploymentsCallOptions + + logger *slog.Logger } // NewDeploymentsRESTClient creates a new deployments rest client. @@ -334,6 +338,7 @@ func NewDeploymentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *deploymentsGRPCClient) ListDeployments(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentsClient.ListDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentsClient.ListDeployments, req, settings.GRPC, c.logger, "ListDeployments") return err }, opts...) if err != nil { @@ -432,7 +437,7 @@ func (c *deploymentsGRPCClient) GetDeployment(ctx context.Context, req *cxpb.Get var resp *cxpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deploymentsClient.GetDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deploymentsClient.GetDeployment, req, settings.GRPC, c.logger, "GetDeployment") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *deploymentsGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -479,7 +484,7 @@ func (c *deploymentsGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *deploymentsGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -528,7 +533,7 @@ func (c *deploymentsGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *deploymentsGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -629,21 +634,10 @@ func (c *deploymentsRESTClient) ListDeployments(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -707,17 +701,7 @@ func (c *deploymentsRESTClient) GetDeployment(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -767,17 +751,7 @@ func (c *deploymentsRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -842,21 +816,10 @@ func (c *deploymentsRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -916,15 +879,8 @@ func (c *deploymentsRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -961,17 +917,7 @@ func (c *deploymentsRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1036,21 +982,10 @@ func (c *deploymentsRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/deployments_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/deployments_client_example_go123_test.go index bb339ed626b8..d79801c86ae0 100644 --- a/dialogflow/cx/apiv3beta1/deployments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/deployments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDeploymentsClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDeploymentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDeploymentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/entity_types_client.go b/dialogflow/cx/apiv3beta1/entity_types_client.go index 42e3f2b00dba..59a475cbf3ae 100755 --- a/dialogflow/cx/apiv3beta1/entity_types_client.go +++ b/dialogflow/cx/apiv3beta1/entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -424,6 +423,8 @@ type entityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEntityTypesClient creates a new entity types client based on gRPC. @@ -451,6 +452,7 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En connPool: connPool, entityTypesClient: cxpb.NewEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -515,6 +517,8 @@ type entityTypesRESTClient struct { // Points back to the CallOptions field of the containing EntityTypesClient CallOptions **EntityTypesCallOptions + + logger *slog.Logger } // NewEntityTypesRESTClient creates a new entity types rest client. @@ -533,6 +537,7 @@ func NewEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -595,7 +600,7 @@ func (c *entityTypesGRPCClient) GetEntityType(ctx context.Context, req *cxpb.Get var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.GetEntityType, req, settings.GRPC, c.logger, "GetEntityType") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *entityTypesGRPCClient) CreateEntityType(ctx context.Context, req *cxpb. var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.CreateEntityType, req, settings.GRPC, c.logger, "CreateEntityType") return err }, opts...) if err != nil { @@ -631,7 +636,7 @@ func (c *entityTypesGRPCClient) UpdateEntityType(ctx context.Context, req *cxpb. var resp *cxpb.EntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.UpdateEntityType, req, settings.GRPC, c.logger, "UpdateEntityType") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *entityTypesGRPCClient) DeleteEntityType(ctx context.Context, req *cxpb. opts = append((*c.CallOptions).DeleteEntityType[0:len((*c.CallOptions).DeleteEntityType):len((*c.CallOptions).DeleteEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.entityTypesClient.DeleteEntityType, req, settings.GRPC, c.logger, "DeleteEntityType") return err }, opts...) return err @@ -674,7 +679,7 @@ func (c *entityTypesGRPCClient) ListEntityTypes(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ListEntityTypes, req, settings.GRPC, c.logger, "ListEntityTypes") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *entityTypesGRPCClient) ExportEntityTypes(ctx context.Context, req *cxpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ExportEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ExportEntityTypes, req, settings.GRPC, c.logger, "ExportEntityTypes") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *entityTypesGRPCClient) ImportEntityTypes(ctx context.Context, req *cxpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.entityTypesClient.ImportEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.entityTypesClient.ImportEntityTypes, req, settings.GRPC, c.logger, "ImportEntityTypes") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -812,7 +817,7 @@ func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -827,7 +832,7 @@ func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -856,7 +861,7 @@ func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -918,17 +923,7 @@ func (c *entityTypesRESTClient) GetEntityType(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntityType") if err != nil { return err } @@ -988,17 +983,7 @@ func (c *entityTypesRESTClient) CreateEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntityType") if err != nil { return err } @@ -1069,17 +1054,7 @@ func (c *entityTypesRESTClient) UpdateEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntityType") if err != nil { return err } @@ -1133,15 +1108,8 @@ func (c *entityTypesRESTClient) DeleteEntityType(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntityType") + return err }, opts...) } @@ -1193,21 +1161,10 @@ func (c *entityTypesRESTClient) ListEntityTypes(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1275,21 +1232,10 @@ func (c *entityTypesRESTClient) ExportEntityTypes(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportEntityTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1345,21 +1291,10 @@ func (c *entityTypesRESTClient) ImportEntityTypes(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportEntityTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1410,17 +1345,7 @@ func (c *entityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1485,21 +1410,10 @@ func (c *entityTypesRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1559,15 +1473,8 @@ func (c *entityTypesRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1604,17 +1511,7 @@ func (c *entityTypesRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1679,21 +1576,10 @@ func (c *entityTypesRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/entity_types_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/entity_types_client_example_go123_test.go index bf74f0ce80fc..6b4b81aa6520 100644 --- a/dialogflow/cx/apiv3beta1/entity_types_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEntityTypesClient_ListEntityTypes_all() { } for resp, err := range c.ListEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/environments_client.go b/dialogflow/cx/apiv3beta1/environments_client.go index 9bd49d3f8b42..f1ee4d5f5cfd 100755 --- a/dialogflow/cx/apiv3beta1/environments_client.go +++ b/dialogflow/cx/apiv3beta1/environments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -536,6 +535,8 @@ type environmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEnvironmentsClient creates a new environments client based on gRPC. @@ -563,6 +564,7 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E connPool: connPool, environmentsClient: cxpb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -627,6 +629,8 @@ type environmentsRESTClient struct { // Points back to the CallOptions field of the containing EnvironmentsClient CallOptions **EnvironmentsCallOptions + + logger *slog.Logger } // NewEnvironmentsRESTClient creates a new environments rest client. @@ -645,6 +649,7 @@ func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -718,7 +723,7 @@ func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *cxpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *cxpb.G var resp *cxpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -771,7 +776,7 @@ func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *cxp opts = append((*c.CallOptions).DeleteEnvironment[0:len((*c.CallOptions).DeleteEnvironment):len((*c.CallOptions).DeleteEnvironment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) return err @@ -836,7 +841,7 @@ func (c *environmentsGRPCClient) LookupEnvironmentHistory(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.LookupEnvironmentHistory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.LookupEnvironmentHistory, req, settings.GRPC, c.logger, "LookupEnvironmentHistory") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *environmentsGRPCClient) RunContinuousTest(ctx context.Context, req *cxp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.RunContinuousTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.RunContinuousTest, req, settings.GRPC, c.logger, "RunContinuousTest") return err }, opts...) if err != nil { @@ -902,7 +907,7 @@ func (c *environmentsGRPCClient) ListContinuousTestResults(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListContinuousTestResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListContinuousTestResults, req, settings.GRPC, c.logger, "ListContinuousTestResults") return err }, opts...) if err != nil { @@ -937,7 +942,7 @@ func (c *environmentsGRPCClient) DeployFlow(ctx context.Context, req *cxpb.Deplo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.DeployFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.DeployFlow, req, settings.GRPC, c.logger, "DeployFlow") return err }, opts...) if err != nil { @@ -957,7 +962,7 @@ func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1035,7 +1040,7 @@ func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1064,7 +1069,7 @@ func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1136,21 +1141,10 @@ func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *cxpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1214,17 +1208,7 @@ func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *cxpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -1290,21 +1274,10 @@ func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1378,21 +1351,10 @@ func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1441,15 +1403,8 @@ func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") + return err }, opts...) } @@ -1499,21 +1454,10 @@ func (c *environmentsRESTClient) LookupEnvironmentHistory(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "LookupEnvironmentHistory") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1592,21 +1536,10 @@ func (c *environmentsRESTClient) RunContinuousTest(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunContinuousTest") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1669,21 +1602,10 @@ func (c *environmentsRESTClient) ListContinuousTestResults(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContinuousTestResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1762,21 +1684,10 @@ func (c *environmentsRESTClient) DeployFlow(ctx context.Context, req *cxpb.Deplo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployFlow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1827,17 +1738,7 @@ func (c *environmentsRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1902,21 +1803,10 @@ func (c *environmentsRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1976,15 +1866,8 @@ func (c *environmentsRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2021,17 +1904,7 @@ func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2096,21 +1969,10 @@ func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/environments_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/environments_client_example_go123_test.go index e5c2dc2338b1..a2236d4068bc 100644 --- a/dialogflow/cx/apiv3beta1/environments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/environments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleEnvironmentsClient_ListContinuousTestResults_all() { } for resp, err := range c.ListContinuousTestResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleEnvironmentsClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleEnvironmentsClient_LookupEnvironmentHistory_all() { } for resp, err := range c.LookupEnvironmentHistory(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleEnvironmentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleEnvironmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/examples_client.go b/dialogflow/cx/apiv3beta1/examples_client.go index 0ee2b9f4b630..9a78f52a55e8 100755 --- a/dialogflow/cx/apiv3beta1/examples_client.go +++ b/dialogflow/cx/apiv3beta1/examples_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type examplesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExamplesClient creates a new examples client based on gRPC. @@ -355,6 +356,7 @@ func NewExamplesClient(ctx context.Context, opts ...option.ClientOption) (*Examp connPool: connPool, examplesClient: cxpb.NewExamplesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type examplesRESTClient struct { // Points back to the CallOptions field of the containing ExamplesClient CallOptions **ExamplesCallOptions + + logger *slog.Logger } // NewExamplesRESTClient creates a new examples rest client. @@ -420,6 +424,7 @@ func NewExamplesRESTClient(ctx context.Context, opts ...option.ClientOption) (*E endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -472,7 +477,7 @@ func (c *examplesGRPCClient) CreateExample(ctx context.Context, req *cxpb.Create var resp *cxpb.Example err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.examplesClient.CreateExample(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.examplesClient.CreateExample, req, settings.GRPC, c.logger, "CreateExample") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *examplesGRPCClient) DeleteExample(ctx context.Context, req *cxpb.Delete opts = append((*c.CallOptions).DeleteExample[0:len((*c.CallOptions).DeleteExample):len((*c.CallOptions).DeleteExample)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.examplesClient.DeleteExample(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.examplesClient.DeleteExample, req, settings.GRPC, c.logger, "DeleteExample") return err }, opts...) return err @@ -515,7 +520,7 @@ func (c *examplesGRPCClient) ListExamples(ctx context.Context, req *cxpb.ListExa } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.examplesClient.ListExamples(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.examplesClient.ListExamples, req, settings.GRPC, c.logger, "ListExamples") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *examplesGRPCClient) GetExample(ctx context.Context, req *cxpb.GetExampl var resp *cxpb.Example err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.examplesClient.GetExample(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.examplesClient.GetExample, req, settings.GRPC, c.logger, "GetExample") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *examplesGRPCClient) UpdateExample(ctx context.Context, req *cxpb.Update var resp *cxpb.Example err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.examplesClient.UpdateExample(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.examplesClient.UpdateExample, req, settings.GRPC, c.logger, "UpdateExample") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *examplesGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *examplesGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *examplesGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *examplesGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *examplesGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -759,17 +764,7 @@ func (c *examplesRESTClient) CreateExample(ctx context.Context, req *cxpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExample") if err != nil { return err } @@ -816,15 +811,8 @@ func (c *examplesRESTClient) DeleteExample(ctx context.Context, req *cxpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExample") + return err }, opts...) } @@ -876,21 +864,10 @@ func (c *examplesRESTClient) ListExamples(ctx context.Context, req *cxpb.ListExa } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExamples") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -953,17 +930,7 @@ func (c *examplesRESTClient) GetExample(ctx context.Context, req *cxpb.GetExampl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExample") if err != nil { return err } @@ -1027,17 +994,7 @@ func (c *examplesRESTClient) UpdateExample(ctx context.Context, req *cxpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExample") if err != nil { return err } @@ -1087,17 +1044,7 @@ func (c *examplesRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1162,21 +1109,10 @@ func (c *examplesRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,15 +1172,8 @@ func (c *examplesRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1281,17 +1210,7 @@ func (c *examplesRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1356,21 +1275,10 @@ func (c *examplesRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/examples_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/examples_client_example_go123_test.go index 09abb8aa8161..c7428fd27616 100644 --- a/dialogflow/cx/apiv3beta1/examples_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/examples_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleExamplesClient_ListExamples_all() { } for resp, err := range c.ListExamples(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleExamplesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleExamplesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/experiments_client.go b/dialogflow/cx/apiv3beta1/experiments_client.go index 185969b170e4..7c3764d21d60 100755 --- a/dialogflow/cx/apiv3beta1/experiments_client.go +++ b/dialogflow/cx/apiv3beta1/experiments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -400,6 +399,8 @@ type experimentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExperimentsClient creates a new experiments client based on gRPC. @@ -427,6 +428,7 @@ func NewExperimentsClient(ctx context.Context, opts ...option.ClientOption) (*Ex connPool: connPool, experimentsClient: cxpb.NewExperimentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -475,6 +477,8 @@ type experimentsRESTClient struct { // Points back to the CallOptions field of the containing ExperimentsClient CallOptions **ExperimentsCallOptions + + logger *slog.Logger } // NewExperimentsRESTClient creates a new experiments rest client. @@ -493,6 +497,7 @@ func NewExperimentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -556,7 +561,7 @@ func (c *experimentsGRPCClient) ListExperiments(ctx context.Context, req *cxpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.ListExperiments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.ListExperiments, req, settings.GRPC, c.logger, "ListExperiments") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *experimentsGRPCClient) GetExperiment(ctx context.Context, req *cxpb.Get var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.GetExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.GetExperiment, req, settings.GRPC, c.logger, "GetExperiment") return err }, opts...) if err != nil { @@ -609,7 +614,7 @@ func (c *experimentsGRPCClient) CreateExperiment(ctx context.Context, req *cxpb. var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.CreateExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.CreateExperiment, req, settings.GRPC, c.logger, "CreateExperiment") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *experimentsGRPCClient) UpdateExperiment(ctx context.Context, req *cxpb. var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.UpdateExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.UpdateExperiment, req, settings.GRPC, c.logger, "UpdateExperiment") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *experimentsGRPCClient) DeleteExperiment(ctx context.Context, req *cxpb. opts = append((*c.CallOptions).DeleteExperiment[0:len((*c.CallOptions).DeleteExperiment):len((*c.CallOptions).DeleteExperiment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.experimentsClient.DeleteExperiment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.experimentsClient.DeleteExperiment, req, settings.GRPC, c.logger, "DeleteExperiment") return err }, opts...) return err @@ -659,7 +664,7 @@ func (c *experimentsGRPCClient) StartExperiment(ctx context.Context, req *cxpb.S var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.StartExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.StartExperiment, req, settings.GRPC, c.logger, "StartExperiment") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *experimentsGRPCClient) StopExperiment(ctx context.Context, req *cxpb.St var resp *cxpb.Experiment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.experimentsClient.StopExperiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.experimentsClient.StopExperiment, req, settings.GRPC, c.logger, "StopExperiment") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *experimentsGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -724,7 +729,7 @@ func (c *experimentsGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *experimentsGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -773,7 +778,7 @@ func (c *experimentsGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -802,7 +807,7 @@ func (c *experimentsGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -874,21 +879,10 @@ func (c *experimentsRESTClient) ListExperiments(ctx context.Context, req *cxpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExperiments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -952,17 +946,7 @@ func (c *experimentsRESTClient) GetExperiment(ctx context.Context, req *cxpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExperiment") if err != nil { return err } @@ -1021,17 +1005,7 @@ func (c *experimentsRESTClient) CreateExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExperiment") if err != nil { return err } @@ -1096,17 +1070,7 @@ func (c *experimentsRESTClient) UpdateExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExperiment") if err != nil { return err } @@ -1154,15 +1118,8 @@ func (c *experimentsRESTClient) DeleteExperiment(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExperiment") + return err }, opts...) } @@ -1207,17 +1164,7 @@ func (c *experimentsRESTClient) StartExperiment(ctx context.Context, req *cxpb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartExperiment") if err != nil { return err } @@ -1275,17 +1222,7 @@ func (c *experimentsRESTClient) StopExperiment(ctx context.Context, req *cxpb.St httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopExperiment") if err != nil { return err } @@ -1335,17 +1272,7 @@ func (c *experimentsRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1410,21 +1337,10 @@ func (c *experimentsRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1484,15 +1400,8 @@ func (c *experimentsRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1529,17 +1438,7 @@ func (c *experimentsRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1604,21 +1503,10 @@ func (c *experimentsRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/experiments_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/experiments_client_example_go123_test.go index 4b171b3466f8..c610ead4bc15 100644 --- a/dialogflow/cx/apiv3beta1/experiments_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/experiments_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleExperimentsClient_ListExperiments_all() { } for resp, err := range c.ListExperiments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleExperimentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleExperimentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/flows_client.go b/dialogflow/cx/apiv3beta1/flows_client.go index b11601d80b57..bfebdaaccc16 100755 --- a/dialogflow/cx/apiv3beta1/flows_client.go +++ b/dialogflow/cx/apiv3beta1/flows_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -565,6 +564,8 @@ type flowsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFlowsClient creates a new flows client based on gRPC. @@ -591,6 +592,7 @@ func NewFlowsClient(ctx context.Context, opts ...option.ClientOption) (*FlowsCli connPool: connPool, flowsClient: cxpb.NewFlowsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -655,6 +657,8 @@ type flowsRESTClient struct { // Points back to the CallOptions field of the containing FlowsClient CallOptions **FlowsCallOptions + + logger *slog.Logger } // NewFlowsRESTClient creates a new flows rest client. @@ -672,6 +676,7 @@ func NewFlowsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Flow endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -734,7 +739,7 @@ func (c *flowsGRPCClient) CreateFlow(ctx context.Context, req *cxpb.CreateFlowRe var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.CreateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.CreateFlow, req, settings.GRPC, c.logger, "CreateFlow") return err }, opts...) if err != nil { @@ -751,7 +756,7 @@ func (c *flowsGRPCClient) DeleteFlow(ctx context.Context, req *cxpb.DeleteFlowRe opts = append((*c.CallOptions).DeleteFlow[0:len((*c.CallOptions).DeleteFlow):len((*c.CallOptions).DeleteFlow)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.flowsClient.DeleteFlow(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.flowsClient.DeleteFlow, req, settings.GRPC, c.logger, "DeleteFlow") return err }, opts...) return err @@ -777,7 +782,7 @@ func (c *flowsGRPCClient) ListFlows(ctx context.Context, req *cxpb.ListFlowsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ListFlows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ListFlows, req, settings.GRPC, c.logger, "ListFlows") return err }, opts...) if err != nil { @@ -812,7 +817,7 @@ func (c *flowsGRPCClient) GetFlow(ctx context.Context, req *cxpb.GetFlowRequest, var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.GetFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.GetFlow, req, settings.GRPC, c.logger, "GetFlow") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *flowsGRPCClient) UpdateFlow(ctx context.Context, req *cxpb.UpdateFlowRe var resp *cxpb.Flow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.UpdateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.UpdateFlow, req, settings.GRPC, c.logger, "UpdateFlow") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *flowsGRPCClient) TrainFlow(ctx context.Context, req *cxpb.TrainFlowRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.TrainFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.TrainFlow, req, settings.GRPC, c.logger, "TrainFlow") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *flowsGRPCClient) ValidateFlow(ctx context.Context, req *cxpb.ValidateFl var resp *cxpb.FlowValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ValidateFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ValidateFlow, req, settings.GRPC, c.logger, "ValidateFlow") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *flowsGRPCClient) GetFlowValidationResult(ctx context.Context, req *cxpb var resp *cxpb.FlowValidationResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.GetFlowValidationResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.GetFlowValidationResult, req, settings.GRPC, c.logger, "GetFlowValidationResult") return err }, opts...) if err != nil { @@ -904,7 +909,7 @@ func (c *flowsGRPCClient) ImportFlow(ctx context.Context, req *cxpb.ImportFlowRe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ImportFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ImportFlow, req, settings.GRPC, c.logger, "ImportFlow") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *flowsGRPCClient) ExportFlow(ctx context.Context, req *cxpb.ExportFlowRe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.flowsClient.ExportFlow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.flowsClient.ExportFlow, req, settings.GRPC, c.logger, "ExportFlow") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *flowsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *flowsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *flowsGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1022,7 +1027,7 @@ func (c *flowsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1051,7 +1056,7 @@ func (c *flowsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1124,17 +1129,7 @@ func (c *flowsRESTClient) CreateFlow(ctx context.Context, req *cxpb.CreateFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFlow") if err != nil { return err } @@ -1184,15 +1179,8 @@ func (c *flowsRESTClient) DeleteFlow(ctx context.Context, req *cxpb.DeleteFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFlow") + return err }, opts...) } @@ -1244,21 +1232,10 @@ func (c *flowsRESTClient) ListFlows(ctx context.Context, req *cxpb.ListFlowsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFlows") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1324,17 +1301,7 @@ func (c *flowsRESTClient) GetFlow(ctx context.Context, req *cxpb.GetFlowRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFlow") if err != nil { return err } @@ -1405,17 +1372,7 @@ func (c *flowsRESTClient) UpdateFlow(ctx context.Context, req *cxpb.UpdateFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFlow") if err != nil { return err } @@ -1485,21 +1442,10 @@ func (c *flowsRESTClient) TrainFlow(ctx context.Context, req *cxpb.TrainFlowRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainFlow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1558,17 +1504,7 @@ func (c *flowsRESTClient) ValidateFlow(ctx context.Context, req *cxpb.ValidateFl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateFlow") if err != nil { return err } @@ -1622,17 +1558,7 @@ func (c *flowsRESTClient) GetFlowValidationResult(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFlowValidationResult") if err != nil { return err } @@ -1701,21 +1627,10 @@ func (c *flowsRESTClient) ImportFlow(ctx context.Context, req *cxpb.ImportFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportFlow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1784,21 +1699,10 @@ func (c *flowsRESTClient) ExportFlow(ctx context.Context, req *cxpb.ExportFlowRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportFlow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1849,17 +1753,7 @@ func (c *flowsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1924,21 +1818,10 @@ func (c *flowsRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1998,15 +1881,8 @@ func (c *flowsRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2043,17 +1919,7 @@ func (c *flowsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2118,21 +1984,10 @@ func (c *flowsRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/flows_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/flows_client_example_go123_test.go index 68cb44152b1f..7bb71037d526 100644 --- a/dialogflow/cx/apiv3beta1/flows_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/flows_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFlowsClient_ListFlows_all() { } for resp, err := range c.ListFlows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFlowsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFlowsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/generators_client.go b/dialogflow/cx/apiv3beta1/generators_client.go index 46eae4067150..74cfe6ec56a8 100755 --- a/dialogflow/cx/apiv3beta1/generators_client.go +++ b/dialogflow/cx/apiv3beta1/generators_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -330,6 +329,8 @@ type generatorsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGeneratorsClient creates a new generators client based on gRPC. @@ -357,6 +358,7 @@ func NewGeneratorsClient(ctx context.Context, opts ...option.ClientOption) (*Gen connPool: connPool, generatorsClient: cxpb.NewGeneratorsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -405,6 +407,8 @@ type generatorsRESTClient struct { // Points back to the CallOptions field of the containing GeneratorsClient CallOptions **GeneratorsCallOptions + + logger *slog.Logger } // NewGeneratorsRESTClient creates a new generators rest client. @@ -423,6 +427,7 @@ func NewGeneratorsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -486,7 +491,7 @@ func (c *generatorsGRPCClient) ListGenerators(ctx context.Context, req *cxpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.ListGenerators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.ListGenerators, req, settings.GRPC, c.logger, "ListGenerators") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *generatorsGRPCClient) GetGenerator(ctx context.Context, req *cxpb.GetGe var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.GetGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.GetGenerator, req, settings.GRPC, c.logger, "GetGenerator") return err }, opts...) if err != nil { @@ -539,7 +544,7 @@ func (c *generatorsGRPCClient) CreateGenerator(ctx context.Context, req *cxpb.Cr var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.CreateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.CreateGenerator, req, settings.GRPC, c.logger, "CreateGenerator") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *generatorsGRPCClient) UpdateGenerator(ctx context.Context, req *cxpb.Up var resp *cxpb.Generator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generatorsClient.UpdateGenerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generatorsClient.UpdateGenerator, req, settings.GRPC, c.logger, "UpdateGenerator") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *generatorsGRPCClient) DeleteGenerator(ctx context.Context, req *cxpb.De opts = append((*c.CallOptions).DeleteGenerator[0:len((*c.CallOptions).DeleteGenerator):len((*c.CallOptions).DeleteGenerator)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.generatorsClient.DeleteGenerator(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.generatorsClient.DeleteGenerator, req, settings.GRPC, c.logger, "DeleteGenerator") return err }, opts...) return err @@ -589,7 +594,7 @@ func (c *generatorsGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *generatorsGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *generatorsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -667,7 +672,7 @@ func (c *generatorsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *generatorsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -770,21 +775,10 @@ func (c *generatorsRESTClient) ListGenerators(ctx context.Context, req *cxpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerators") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -850,17 +844,7 @@ func (c *generatorsRESTClient) GetGenerator(ctx context.Context, req *cxpb.GetGe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerator") if err != nil { return err } @@ -920,17 +904,7 @@ func (c *generatorsRESTClient) CreateGenerator(ctx context.Context, req *cxpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGenerator") if err != nil { return err } @@ -997,17 +971,7 @@ func (c *generatorsRESTClient) UpdateGenerator(ctx context.Context, req *cxpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerator") if err != nil { return err } @@ -1057,15 +1021,8 @@ func (c *generatorsRESTClient) DeleteGenerator(ctx context.Context, req *cxpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGenerator") + return err }, opts...) } @@ -1102,17 +1059,7 @@ func (c *generatorsRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1177,21 +1124,10 @@ func (c *generatorsRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1251,15 +1187,8 @@ func (c *generatorsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1296,17 +1225,7 @@ func (c *generatorsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1371,21 +1290,10 @@ func (c *generatorsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/generators_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/generators_client_example_go123_test.go index 519946ac69a3..9b92941f69a3 100644 --- a/dialogflow/cx/apiv3beta1/generators_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/generators_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGeneratorsClient_ListGenerators_all() { } for resp, err := range c.ListGenerators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGeneratorsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGeneratorsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/helpers.go b/dialogflow/cx/apiv3beta1/helpers.go index 4ecb78fa9e78..1ccd240c8542 100755 --- a/dialogflow/cx/apiv3beta1/helpers.go +++ b/dialogflow/cx/apiv3beta1/helpers.go @@ -18,10 +18,20 @@ package cx import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dialogflow.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/dialogflow", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/dialogflow/cx/apiv3beta1/intents_client.go b/dialogflow/cx/apiv3beta1/intents_client.go index c901665563ff..453987b10217 100755 --- a/dialogflow/cx/apiv3beta1/intents_client.go +++ b/dialogflow/cx/apiv3beta1/intents_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -447,6 +446,8 @@ type intentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIntentsClient creates a new intents client based on gRPC. @@ -473,6 +474,7 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent connPool: connPool, intentsClient: cxpb.NewIntentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -537,6 +539,8 @@ type intentsRESTClient struct { // Points back to the CallOptions field of the containing IntentsClient CallOptions **IntentsCallOptions + + logger *slog.Logger } // NewIntentsRESTClient creates a new intents rest client. @@ -554,6 +558,7 @@ func NewIntentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*In endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -627,7 +632,7 @@ func (c *intentsGRPCClient) ListIntents(ctx context.Context, req *cxpb.ListInten } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ListIntents, req, settings.GRPC, c.logger, "ListIntents") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *intentsGRPCClient) GetIntent(ctx context.Context, req *cxpb.GetIntentRe var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.GetIntent, req, settings.GRPC, c.logger, "GetIntent") return err }, opts...) if err != nil { @@ -680,7 +685,7 @@ func (c *intentsGRPCClient) CreateIntent(ctx context.Context, req *cxpb.CreateIn var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.CreateIntent, req, settings.GRPC, c.logger, "CreateIntent") return err }, opts...) if err != nil { @@ -698,7 +703,7 @@ func (c *intentsGRPCClient) UpdateIntent(ctx context.Context, req *cxpb.UpdateIn var resp *cxpb.Intent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.UpdateIntent, req, settings.GRPC, c.logger, "UpdateIntent") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *intentsGRPCClient) DeleteIntent(ctx context.Context, req *cxpb.DeleteIn opts = append((*c.CallOptions).DeleteIntent[0:len((*c.CallOptions).DeleteIntent):len((*c.CallOptions).DeleteIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.intentsClient.DeleteIntent, req, settings.GRPC, c.logger, "DeleteIntent") return err }, opts...) return err @@ -730,7 +735,7 @@ func (c *intentsGRPCClient) ImportIntents(ctx context.Context, req *cxpb.ImportI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ImportIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ImportIntents, req, settings.GRPC, c.logger, "ImportIntents") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *intentsGRPCClient) ExportIntents(ctx context.Context, req *cxpb.ExportI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.intentsClient.ExportIntents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.intentsClient.ExportIntents, req, settings.GRPC, c.logger, "ExportIntents") return err }, opts...) if err != nil { @@ -770,7 +775,7 @@ func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -799,7 +804,7 @@ func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -848,7 +853,7 @@ func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -954,21 +959,10 @@ func (c *intentsRESTClient) ListIntents(ctx context.Context, req *cxpb.ListInten } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1034,17 +1028,7 @@ func (c *intentsRESTClient) GetIntent(ctx context.Context, req *cxpb.GetIntentRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIntent") if err != nil { return err } @@ -1108,17 +1092,7 @@ func (c *intentsRESTClient) CreateIntent(ctx context.Context, req *cxpb.CreateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIntent") if err != nil { return err } @@ -1189,17 +1163,7 @@ func (c *intentsRESTClient) UpdateIntent(ctx context.Context, req *cxpb.UpdateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIntent") if err != nil { return err } @@ -1250,15 +1214,8 @@ func (c *intentsRESTClient) DeleteIntent(ctx context.Context, req *cxpb.DeleteIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIntent") + return err }, opts...) } @@ -1310,21 +1267,10 @@ func (c *intentsRESTClient) ImportIntents(ctx context.Context, req *cxpb.ImportI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1390,21 +1336,10 @@ func (c *intentsRESTClient) ExportIntents(ctx context.Context, req *cxpb.ExportI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportIntents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1455,17 +1390,7 @@ func (c *intentsRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1530,21 +1455,10 @@ func (c *intentsRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1604,15 +1518,8 @@ func (c *intentsRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1649,17 +1556,7 @@ func (c *intentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1724,21 +1621,10 @@ func (c *intentsRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/intents_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/intents_client_example_go123_test.go index 5638756af492..5e2d93833ca1 100644 --- a/dialogflow/cx/apiv3beta1/intents_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/intents_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleIntentsClient_ListIntents_all() { } for resp, err := range c.ListIntents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleIntentsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleIntentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/pages_client.go b/dialogflow/cx/apiv3beta1/pages_client.go index c22dece963ee..ce2036c7feea 100755 --- a/dialogflow/cx/apiv3beta1/pages_client.go +++ b/dialogflow/cx/apiv3beta1/pages_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type pagesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPagesClient creates a new pages client based on gRPC. @@ -355,6 +356,7 @@ func NewPagesClient(ctx context.Context, opts ...option.ClientOption) (*PagesCli connPool: connPool, pagesClient: cxpb.NewPagesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type pagesRESTClient struct { // Points back to the CallOptions field of the containing PagesClient CallOptions **PagesCallOptions + + logger *slog.Logger } // NewPagesRESTClient creates a new pages rest client. @@ -420,6 +424,7 @@ func NewPagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Page endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -483,7 +488,7 @@ func (c *pagesGRPCClient) ListPages(ctx context.Context, req *cxpb.ListPagesRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.ListPages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.ListPages, req, settings.GRPC, c.logger, "ListPages") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *pagesGRPCClient) GetPage(ctx context.Context, req *cxpb.GetPageRequest, var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.GetPage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.GetPage, req, settings.GRPC, c.logger, "GetPage") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *pagesGRPCClient) CreatePage(ctx context.Context, req *cxpb.CreatePageRe var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.CreatePage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.CreatePage, req, settings.GRPC, c.logger, "CreatePage") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *pagesGRPCClient) UpdatePage(ctx context.Context, req *cxpb.UpdatePageRe var resp *cxpb.Page err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.pagesClient.UpdatePage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.pagesClient.UpdatePage, req, settings.GRPC, c.logger, "UpdatePage") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *pagesGRPCClient) DeletePage(ctx context.Context, req *cxpb.DeletePageRe opts = append((*c.CallOptions).DeletePage[0:len((*c.CallOptions).DeletePage):len((*c.CallOptions).DeletePage)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.pagesClient.DeletePage(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.pagesClient.DeletePage, req, settings.GRPC, c.logger, "DeletePage") return err }, opts...) return err @@ -586,7 +591,7 @@ func (c *pagesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *pagesGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *pagesGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *pagesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *pagesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -767,21 +772,10 @@ func (c *pagesRESTClient) ListPages(ctx context.Context, req *cxpb.ListPagesRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPages") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -847,17 +841,7 @@ func (c *pagesRESTClient) GetPage(ctx context.Context, req *cxpb.GetPageRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPage") if err != nil { return err } @@ -917,17 +901,7 @@ func (c *pagesRESTClient) CreatePage(ctx context.Context, req *cxpb.CreatePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePage") if err != nil { return err } @@ -994,17 +968,7 @@ func (c *pagesRESTClient) UpdatePage(ctx context.Context, req *cxpb.UpdatePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePage") if err != nil { return err } @@ -1054,15 +1018,8 @@ func (c *pagesRESTClient) DeletePage(ctx context.Context, req *cxpb.DeletePageRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePage") + return err }, opts...) } @@ -1099,17 +1056,7 @@ func (c *pagesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1174,21 +1121,10 @@ func (c *pagesRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1248,15 +1184,8 @@ func (c *pagesRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1293,17 +1222,7 @@ func (c *pagesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1368,21 +1287,10 @@ func (c *pagesRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/pages_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/pages_client_example_go123_test.go index 91e1031db500..895fbccb8b32 100644 --- a/dialogflow/cx/apiv3beta1/pages_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/pages_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePagesClient_ListPages_all() { } for resp, err := range c.ListPages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePagesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePagesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/playbooks_client.go b/dialogflow/cx/apiv3beta1/playbooks_client.go index e35cbf84ac02..52c7f76576b2 100755 --- a/dialogflow/cx/apiv3beta1/playbooks_client.go +++ b/dialogflow/cx/apiv3beta1/playbooks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -450,6 +449,8 @@ type playbooksGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPlaybooksClient creates a new playbooks client based on gRPC. @@ -477,6 +478,7 @@ func NewPlaybooksClient(ctx context.Context, opts ...option.ClientOption) (*Play connPool: connPool, playbooksClient: cxpb.NewPlaybooksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -525,6 +527,8 @@ type playbooksRESTClient struct { // Points back to the CallOptions field of the containing PlaybooksClient CallOptions **PlaybooksCallOptions + + logger *slog.Logger } // NewPlaybooksRESTClient creates a new playbooks rest client. @@ -543,6 +547,7 @@ func NewPlaybooksRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -595,7 +600,7 @@ func (c *playbooksGRPCClient) CreatePlaybook(ctx context.Context, req *cxpb.Crea var resp *cxpb.Playbook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.CreatePlaybook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.CreatePlaybook, req, settings.GRPC, c.logger, "CreatePlaybook") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *playbooksGRPCClient) DeletePlaybook(ctx context.Context, req *cxpb.Dele opts = append((*c.CallOptions).DeletePlaybook[0:len((*c.CallOptions).DeletePlaybook):len((*c.CallOptions).DeletePlaybook)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.playbooksClient.DeletePlaybook(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.playbooksClient.DeletePlaybook, req, settings.GRPC, c.logger, "DeletePlaybook") return err }, opts...) return err @@ -638,7 +643,7 @@ func (c *playbooksGRPCClient) ListPlaybooks(ctx context.Context, req *cxpb.ListP } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.ListPlaybooks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.ListPlaybooks, req, settings.GRPC, c.logger, "ListPlaybooks") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *playbooksGRPCClient) GetPlaybook(ctx context.Context, req *cxpb.GetPlay var resp *cxpb.Playbook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.GetPlaybook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.GetPlaybook, req, settings.GRPC, c.logger, "GetPlaybook") return err }, opts...) if err != nil { @@ -691,7 +696,7 @@ func (c *playbooksGRPCClient) UpdatePlaybook(ctx context.Context, req *cxpb.Upda var resp *cxpb.Playbook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.UpdatePlaybook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.UpdatePlaybook, req, settings.GRPC, c.logger, "UpdatePlaybook") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *playbooksGRPCClient) CreatePlaybookVersion(ctx context.Context, req *cx var resp *cxpb.PlaybookVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.CreatePlaybookVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.CreatePlaybookVersion, req, settings.GRPC, c.logger, "CreatePlaybookVersion") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *playbooksGRPCClient) GetPlaybookVersion(ctx context.Context, req *cxpb. var resp *cxpb.PlaybookVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.GetPlaybookVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.GetPlaybookVersion, req, settings.GRPC, c.logger, "GetPlaybookVersion") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *playbooksGRPCClient) ListPlaybookVersions(ctx context.Context, req *cxp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.playbooksClient.ListPlaybookVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.playbooksClient.ListPlaybookVersions, req, settings.GRPC, c.logger, "ListPlaybookVersions") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *playbooksGRPCClient) DeletePlaybookVersion(ctx context.Context, req *cx opts = append((*c.CallOptions).DeletePlaybookVersion[0:len((*c.CallOptions).DeletePlaybookVersion):len((*c.CallOptions).DeletePlaybookVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.playbooksClient.DeletePlaybookVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.playbooksClient.DeletePlaybookVersion, req, settings.GRPC, c.logger, "DeletePlaybookVersion") return err }, opts...) return err @@ -805,7 +810,7 @@ func (c *playbooksGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *playbooksGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *playbooksGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -883,7 +888,7 @@ func (c *playbooksGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -912,7 +917,7 @@ func (c *playbooksGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -978,17 +983,7 @@ func (c *playbooksRESTClient) CreatePlaybook(ctx context.Context, req *cxpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePlaybook") if err != nil { return err } @@ -1035,15 +1030,8 @@ func (c *playbooksRESTClient) DeletePlaybook(ctx context.Context, req *cxpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePlaybook") + return err }, opts...) } @@ -1092,21 +1080,10 @@ func (c *playbooksRESTClient) ListPlaybooks(ctx context.Context, req *cxpb.ListP } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPlaybooks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1169,17 +1146,7 @@ func (c *playbooksRESTClient) GetPlaybook(ctx context.Context, req *cxpb.GetPlay httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPlaybook") if err != nil { return err } @@ -1243,17 +1210,7 @@ func (c *playbooksRESTClient) UpdatePlaybook(ctx context.Context, req *cxpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePlaybook") if err != nil { return err } @@ -1310,17 +1267,7 @@ func (c *playbooksRESTClient) CreatePlaybookVersion(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePlaybookVersion") if err != nil { return err } @@ -1370,17 +1317,7 @@ func (c *playbooksRESTClient) GetPlaybookVersion(ctx context.Context, req *cxpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPlaybookVersion") if err != nil { return err } @@ -1442,21 +1379,10 @@ func (c *playbooksRESTClient) ListPlaybookVersions(ctx context.Context, req *cxp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPlaybookVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1516,15 +1442,8 @@ func (c *playbooksRESTClient) DeletePlaybookVersion(ctx context.Context, req *cx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePlaybookVersion") + return err }, opts...) } @@ -1561,17 +1480,7 @@ func (c *playbooksRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1636,21 +1545,10 @@ func (c *playbooksRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1710,15 +1608,8 @@ func (c *playbooksRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1755,17 +1646,7 @@ func (c *playbooksRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1830,21 +1711,10 @@ func (c *playbooksRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/playbooks_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/playbooks_client_example_go123_test.go index 10d09aabb90c..de417e39cf1d 100644 --- a/dialogflow/cx/apiv3beta1/playbooks_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/playbooks_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePlaybooksClient_ListPlaybookVersions_all() { } for resp, err := range c.ListPlaybookVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePlaybooksClient_ListPlaybooks_all() { } for resp, err := range c.ListPlaybooks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePlaybooksClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExamplePlaybooksClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/security_settings_client.go b/dialogflow/cx/apiv3beta1/security_settings_client.go index 5ae0e6bae4b0..a4ae0a04b282 100755 --- a/dialogflow/cx/apiv3beta1/security_settings_client.go +++ b/dialogflow/cx/apiv3beta1/security_settings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -333,6 +332,8 @@ type securitySettingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSecuritySettingsClient creates a new security settings service client based on gRPC. @@ -359,6 +360,7 @@ func NewSecuritySettingsClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, securitySettingsClient: cxpb.NewSecuritySettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -407,6 +409,8 @@ type securitySettingsRESTClient struct { // Points back to the CallOptions field of the containing SecuritySettingsClient CallOptions **SecuritySettingsCallOptions + + logger *slog.Logger } // NewSecuritySettingsRESTClient creates a new security settings service rest client. @@ -424,6 +428,7 @@ func NewSecuritySettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -476,7 +481,7 @@ func (c *securitySettingsGRPCClient) CreateSecuritySettings(ctx context.Context, var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.CreateSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.CreateSecuritySettings, req, settings.GRPC, c.logger, "CreateSecuritySettings") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *securitySettingsGRPCClient) GetSecuritySettings(ctx context.Context, re var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.GetSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.GetSecuritySettings, req, settings.GRPC, c.logger, "GetSecuritySettings") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *securitySettingsGRPCClient) UpdateSecuritySettings(ctx context.Context, var resp *cxpb.SecuritySettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.UpdateSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.UpdateSecuritySettings, req, settings.GRPC, c.logger, "UpdateSecuritySettings") return err }, opts...) if err != nil { @@ -541,7 +546,7 @@ func (c *securitySettingsGRPCClient) ListSecuritySettings(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securitySettingsClient.ListSecuritySettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securitySettingsClient.ListSecuritySettings, req, settings.GRPC, c.logger, "ListSecuritySettings") return err }, opts...) if err != nil { @@ -575,7 +580,7 @@ func (c *securitySettingsGRPCClient) DeleteSecuritySettings(ctx context.Context, opts = append((*c.CallOptions).DeleteSecuritySettings[0:len((*c.CallOptions).DeleteSecuritySettings):len((*c.CallOptions).DeleteSecuritySettings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.securitySettingsClient.DeleteSecuritySettings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.securitySettingsClient.DeleteSecuritySettings, req, settings.GRPC, c.logger, "DeleteSecuritySettings") return err }, opts...) return err @@ -590,7 +595,7 @@ func (c *securitySettingsGRPCClient) GetLocation(ctx context.Context, req *locat var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *securitySettingsGRPCClient) ListLocations(ctx context.Context, req *loc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -653,7 +658,7 @@ func (c *securitySettingsGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -668,7 +673,7 @@ func (c *securitySettingsGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *securitySettingsGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -763,17 +768,7 @@ func (c *securitySettingsRESTClient) CreateSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecuritySettings") if err != nil { return err } @@ -825,17 +820,7 @@ func (c *securitySettingsRESTClient) GetSecuritySettings(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecuritySettings") if err != nil { return err } @@ -900,17 +885,7 @@ func (c *securitySettingsRESTClient) UpdateSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecuritySettings") if err != nil { return err } @@ -972,21 +947,10 @@ func (c *securitySettingsRESTClient) ListSecuritySettings(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecuritySettings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1047,15 +1011,8 @@ func (c *securitySettingsRESTClient) DeleteSecuritySettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecuritySettings") + return err }, opts...) } @@ -1092,17 +1049,7 @@ func (c *securitySettingsRESTClient) GetLocation(ctx context.Context, req *locat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1167,21 +1114,10 @@ func (c *securitySettingsRESTClient) ListLocations(ctx context.Context, req *loc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1241,15 +1177,8 @@ func (c *securitySettingsRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1286,17 +1215,7 @@ func (c *securitySettingsRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1361,21 +1280,10 @@ func (c *securitySettingsRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/security_settings_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/security_settings_client_example_go123_test.go index 68f7aa31e69b..b9d8573a8a25 100644 --- a/dialogflow/cx/apiv3beta1/security_settings_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/security_settings_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSecuritySettingsClient_ListSecuritySettings_all() { } for resp, err := range c.ListSecuritySettings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSecuritySettingsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSecuritySettingsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/session_entity_types_client.go b/dialogflow/cx/apiv3beta1/session_entity_types_client.go index 79d40181c97c..13ea3cf1fa79 100755 --- a/dialogflow/cx/apiv3beta1/session_entity_types_client.go +++ b/dialogflow/cx/apiv3beta1/session_entity_types_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -330,6 +329,8 @@ type sessionEntityTypesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionEntityTypesClient creates a new session entity types client based on gRPC. @@ -357,6 +358,7 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, sessionEntityTypesClient: cxpb.NewSessionEntityTypesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -405,6 +407,8 @@ type sessionEntityTypesRESTClient struct { // Points back to the CallOptions field of the containing SessionEntityTypesClient CallOptions **SessionEntityTypesCallOptions + + logger *slog.Logger } // NewSessionEntityTypesRESTClient creates a new session entity types rest client. @@ -423,6 +427,7 @@ func NewSessionEntityTypesRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -486,7 +491,7 @@ func (c *sessionEntityTypesGRPCClient) ListSessionEntityTypes(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.ListSessionEntityTypes, req, settings.GRPC, c.logger, "ListSessionEntityTypes") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *sessionEntityTypesGRPCClient) GetSessionEntityType(ctx context.Context, var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.GetSessionEntityType, req, settings.GRPC, c.logger, "GetSessionEntityType") return err }, opts...) if err != nil { @@ -539,7 +544,7 @@ func (c *sessionEntityTypesGRPCClient) CreateSessionEntityType(ctx context.Conte var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.CreateSessionEntityType, req, settings.GRPC, c.logger, "CreateSessionEntityType") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *sessionEntityTypesGRPCClient) UpdateSessionEntityType(ctx context.Conte var resp *cxpb.SessionEntityType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionEntityTypesClient.UpdateSessionEntityType, req, settings.GRPC, c.logger, "UpdateSessionEntityType") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Conte opts = append((*c.CallOptions).DeleteSessionEntityType[0:len((*c.CallOptions).DeleteSessionEntityType):len((*c.CallOptions).DeleteSessionEntityType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sessionEntityTypesClient.DeleteSessionEntityType, req, settings.GRPC, c.logger, "DeleteSessionEntityType") return err }, opts...) return err @@ -589,7 +594,7 @@ func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -667,7 +672,7 @@ func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -767,21 +772,10 @@ func (c *sessionEntityTypesRESTClient) ListSessionEntityTypes(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessionEntityTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -844,17 +838,7 @@ func (c *sessionEntityTypesRESTClient) GetSessionEntityType(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSessionEntityType") if err != nil { return err } @@ -911,17 +895,7 @@ func (c *sessionEntityTypesRESTClient) CreateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSessionEntityType") if err != nil { return err } @@ -985,17 +959,7 @@ func (c *sessionEntityTypesRESTClient) UpdateSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSessionEntityType") if err != nil { return err } @@ -1042,15 +1006,8 @@ func (c *sessionEntityTypesRESTClient) DeleteSessionEntityType(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSessionEntityType") + return err }, opts...) } @@ -1087,17 +1044,7 @@ func (c *sessionEntityTypesRESTClient) GetLocation(ctx context.Context, req *loc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1162,21 +1109,10 @@ func (c *sessionEntityTypesRESTClient) ListLocations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,15 +1172,8 @@ func (c *sessionEntityTypesRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1281,17 +1210,7 @@ func (c *sessionEntityTypesRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1356,21 +1275,10 @@ func (c *sessionEntityTypesRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/session_entity_types_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/session_entity_types_client_example_go123_test.go index e314f5186eb3..a7bd9e930835 100644 --- a/dialogflow/cx/apiv3beta1/session_entity_types_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/session_entity_types_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes_all() { } for resp, err := range c.ListSessionEntityTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleSessionEntityTypesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleSessionEntityTypesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/sessions_client.go b/dialogflow/cx/apiv3beta1/sessions_client.go index a717aa7ad072..700a92a26dfd 100755 --- a/dialogflow/cx/apiv3beta1/sessions_client.go +++ b/dialogflow/cx/apiv3beta1/sessions_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -353,6 +352,8 @@ type sessionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSessionsClient creates a new sessions client based on gRPC. @@ -382,6 +383,7 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi connPool: connPool, sessionsClient: cxpb.NewSessionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -430,6 +432,8 @@ type sessionsRESTClient struct { // Points back to the CallOptions field of the containing SessionsClient CallOptions **SessionsCallOptions + + logger *slog.Logger } // NewSessionsRESTClient creates a new sessions rest client. @@ -450,6 +454,7 @@ func NewSessionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -502,7 +507,7 @@ func (c *sessionsGRPCClient) DetectIntent(ctx context.Context, req *cxpb.DetectI var resp *cxpb.DetectIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.DetectIntent, req, settings.GRPC, c.logger, "DetectIntent") return err }, opts...) if err != nil { @@ -520,7 +525,9 @@ func (c *sessionsGRPCClient) ServerStreamingDetectIntent(ctx context.Context, re var resp cxpb.Sessions_ServerStreamingDetectIntentClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ServerStreamingDetectIntent") resp, err = c.sessionsClient.ServerStreamingDetectIntent(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ServerStreamingDetectIntent") return err }, opts...) if err != nil { @@ -535,7 +542,9 @@ func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ... opts = append((*c.CallOptions).StreamingDetectIntent[0:len((*c.CallOptions).StreamingDetectIntent):len((*c.CallOptions).StreamingDetectIntent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingDetectIntent") return err }, opts...) if err != nil { @@ -553,7 +562,7 @@ func (c *sessionsGRPCClient) MatchIntent(ctx context.Context, req *cxpb.MatchInt var resp *cxpb.MatchIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.MatchIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.MatchIntent, req, settings.GRPC, c.logger, "MatchIntent") return err }, opts...) if err != nil { @@ -571,7 +580,7 @@ func (c *sessionsGRPCClient) FulfillIntent(ctx context.Context, req *cxpb.Fulfil var resp *cxpb.FulfillIntentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.FulfillIntent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.FulfillIntent, req, settings.GRPC, c.logger, "FulfillIntent") return err }, opts...) if err != nil { @@ -589,7 +598,7 @@ func (c *sessionsGRPCClient) SubmitAnswerFeedback(ctx context.Context, req *cxpb var resp *cxpb.AnswerFeedback err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sessionsClient.SubmitAnswerFeedback(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sessionsClient.SubmitAnswerFeedback, req, settings.GRPC, c.logger, "SubmitAnswerFeedback") return err }, opts...) if err != nil { @@ -607,7 +616,7 @@ func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -636,7 +645,7 @@ func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -670,7 +679,7 @@ func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -685,7 +694,7 @@ func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -714,7 +723,7 @@ func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -786,17 +795,7 @@ func (c *sessionsRESTClient) DetectIntent(ctx context.Context, req *cxpb.DetectI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetectIntent") if err != nil { return err } @@ -854,15 +853,11 @@ func (c *sessionsRESTClient) ServerStreamingDetectIntent(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ServerStreamingDetectIntent") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &serverStreamingDetectIntentRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -976,17 +971,7 @@ func (c *sessionsRESTClient) MatchIntent(ctx context.Context, req *cxpb.MatchInt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MatchIntent") if err != nil { return err } @@ -1048,17 +1033,7 @@ func (c *sessionsRESTClient) FulfillIntent(ctx context.Context, req *cxpb.Fulfil httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FulfillIntent") if err != nil { return err } @@ -1115,17 +1090,7 @@ func (c *sessionsRESTClient) SubmitAnswerFeedback(ctx context.Context, req *cxpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitAnswerFeedback") if err != nil { return err } @@ -1175,17 +1140,7 @@ func (c *sessionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1250,21 +1205,10 @@ func (c *sessionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1324,15 +1268,8 @@ func (c *sessionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1369,17 +1306,7 @@ func (c *sessionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1444,21 +1371,10 @@ func (c *sessionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/sessions_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/sessions_client_example_go123_test.go index 20480259f075..085419026ac8 100644 --- a/dialogflow/cx/apiv3beta1/sessions_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/sessions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSessionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSessionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/test_cases_client.go b/dialogflow/cx/apiv3beta1/test_cases_client.go index 20eec9a48791..2c6c95947c53 100755 --- a/dialogflow/cx/apiv3beta1/test_cases_client.go +++ b/dialogflow/cx/apiv3beta1/test_cases_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -625,6 +624,8 @@ type testCasesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTestCasesClient creates a new test cases client based on gRPC. @@ -653,6 +654,7 @@ func NewTestCasesClient(ctx context.Context, opts ...option.ClientOption) (*Test connPool: connPool, testCasesClient: cxpb.NewTestCasesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -717,6 +719,8 @@ type testCasesRESTClient struct { // Points back to the CallOptions field of the containing TestCasesClient CallOptions **TestCasesCallOptions + + logger *slog.Logger } // NewTestCasesRESTClient creates a new test cases rest client. @@ -736,6 +740,7 @@ func NewTestCasesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -809,7 +814,7 @@ func (c *testCasesGRPCClient) ListTestCases(ctx context.Context, req *cxpb.ListT } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ListTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ListTestCases, req, settings.GRPC, c.logger, "ListTestCases") return err }, opts...) if err != nil { @@ -843,7 +848,7 @@ func (c *testCasesGRPCClient) BatchDeleteTestCases(ctx context.Context, req *cxp opts = append((*c.CallOptions).BatchDeleteTestCases[0:len((*c.CallOptions).BatchDeleteTestCases):len((*c.CallOptions).BatchDeleteTestCases)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.testCasesClient.BatchDeleteTestCases(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.testCasesClient.BatchDeleteTestCases, req, settings.GRPC, c.logger, "BatchDeleteTestCases") return err }, opts...) return err @@ -858,7 +863,7 @@ func (c *testCasesGRPCClient) GetTestCase(ctx context.Context, req *cxpb.GetTest var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.GetTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.GetTestCase, req, settings.GRPC, c.logger, "GetTestCase") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *testCasesGRPCClient) CreateTestCase(ctx context.Context, req *cxpb.Crea var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.CreateTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.CreateTestCase, req, settings.GRPC, c.logger, "CreateTestCase") return err }, opts...) if err != nil { @@ -894,7 +899,7 @@ func (c *testCasesGRPCClient) UpdateTestCase(ctx context.Context, req *cxpb.Upda var resp *cxpb.TestCase err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.UpdateTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.UpdateTestCase, req, settings.GRPC, c.logger, "UpdateTestCase") return err }, opts...) if err != nil { @@ -912,7 +917,7 @@ func (c *testCasesGRPCClient) RunTestCase(ctx context.Context, req *cxpb.RunTest var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.RunTestCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.RunTestCase, req, settings.GRPC, c.logger, "RunTestCase") return err }, opts...) if err != nil { @@ -932,7 +937,7 @@ func (c *testCasesGRPCClient) BatchRunTestCases(ctx context.Context, req *cxpb.B var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.BatchRunTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.BatchRunTestCases, req, settings.GRPC, c.logger, "BatchRunTestCases") return err }, opts...) if err != nil { @@ -952,7 +957,7 @@ func (c *testCasesGRPCClient) CalculateCoverage(ctx context.Context, req *cxpb.C var resp *cxpb.CalculateCoverageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.CalculateCoverage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.CalculateCoverage, req, settings.GRPC, c.logger, "CalculateCoverage") return err }, opts...) if err != nil { @@ -970,7 +975,7 @@ func (c *testCasesGRPCClient) ImportTestCases(ctx context.Context, req *cxpb.Imp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ImportTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ImportTestCases, req, settings.GRPC, c.logger, "ImportTestCases") return err }, opts...) if err != nil { @@ -990,7 +995,7 @@ func (c *testCasesGRPCClient) ExportTestCases(ctx context.Context, req *cxpb.Exp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ExportTestCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ExportTestCases, req, settings.GRPC, c.logger, "ExportTestCases") return err }, opts...) if err != nil { @@ -1021,7 +1026,7 @@ func (c *testCasesGRPCClient) ListTestCaseResults(ctx context.Context, req *cxpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.ListTestCaseResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.ListTestCaseResults, req, settings.GRPC, c.logger, "ListTestCaseResults") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *testCasesGRPCClient) GetTestCaseResult(ctx context.Context, req *cxpb.G var resp *cxpb.TestCaseResult err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.testCasesClient.GetTestCaseResult(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.testCasesClient.GetTestCaseResult, req, settings.GRPC, c.logger, "GetTestCaseResult") return err }, opts...) if err != nil { @@ -1074,7 +1079,7 @@ func (c *testCasesGRPCClient) GetLocation(ctx context.Context, req *locationpb.G var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1103,7 +1108,7 @@ func (c *testCasesGRPCClient) ListLocations(ctx context.Context, req *locationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1137,7 +1142,7 @@ func (c *testCasesGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1152,7 +1157,7 @@ func (c *testCasesGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *testCasesGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1255,21 +1260,10 @@ func (c *testCasesRESTClient) ListTestCases(ctx context.Context, req *cxpb.ListT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTestCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1335,15 +1329,8 @@ func (c *testCasesRESTClient) BatchDeleteTestCases(ctx context.Context, req *cxp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteTestCases") + return err }, opts...) } @@ -1380,17 +1367,7 @@ func (c *testCasesRESTClient) GetTestCase(ctx context.Context, req *cxpb.GetTest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTestCase") if err != nil { return err } @@ -1447,17 +1424,7 @@ func (c *testCasesRESTClient) CreateTestCase(ctx context.Context, req *cxpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTestCase") if err != nil { return err } @@ -1521,17 +1488,7 @@ func (c *testCasesRESTClient) UpdateTestCase(ctx context.Context, req *cxpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTestCase") if err != nil { return err } @@ -1596,21 +1553,10 @@ func (c *testCasesRESTClient) RunTestCase(ctx context.Context, req *cxpb.RunTest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTestCase") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1676,21 +1622,10 @@ func (c *testCasesRESTClient) BatchRunTestCases(ctx context.Context, req *cxpb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRunTestCases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1742,17 +1677,7 @@ func (c *testCasesRESTClient) CalculateCoverage(ctx context.Context, req *cxpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateCoverage") if err != nil { return err } @@ -1819,21 +1744,10 @@ func (c *testCasesRESTClient) ImportTestCases(ctx context.Context, req *cxpb.Imp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportTestCases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1900,21 +1814,10 @@ func (c *testCasesRESTClient) ExportTestCases(ctx context.Context, req *cxpb.Exp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportTestCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1981,21 +1884,10 @@ func (c *testCasesRESTClient) ListTestCaseResults(ctx context.Context, req *cxpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTestCaseResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2058,17 +1950,7 @@ func (c *testCasesRESTClient) GetTestCaseResult(ctx context.Context, req *cxpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTestCaseResult") if err != nil { return err } @@ -2118,17 +2000,7 @@ func (c *testCasesRESTClient) GetLocation(ctx context.Context, req *locationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2193,21 +2065,10 @@ func (c *testCasesRESTClient) ListLocations(ctx context.Context, req *locationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2267,15 +2128,8 @@ func (c *testCasesRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2312,17 +2166,7 @@ func (c *testCasesRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2387,21 +2231,10 @@ func (c *testCasesRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/test_cases_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/test_cases_client_example_go123_test.go index 0eb91ab28e62..7699a5109f9d 100644 --- a/dialogflow/cx/apiv3beta1/test_cases_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/test_cases_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTestCasesClient_ListTestCaseResults_all() { } for resp, err := range c.ListTestCaseResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTestCasesClient_ListTestCases_all() { } for resp, err := range c.ListTestCases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTestCasesClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleTestCasesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/tools_client.go b/dialogflow/cx/apiv3beta1/tools_client.go index c1fe4b4e4983..107a8a2281a6 100755 --- a/dialogflow/cx/apiv3beta1/tools_client.go +++ b/dialogflow/cx/apiv3beta1/tools_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -380,6 +379,8 @@ type toolsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewToolsClient creates a new tools client based on gRPC. @@ -406,6 +407,7 @@ func NewToolsClient(ctx context.Context, opts ...option.ClientOption) (*ToolsCli connPool: connPool, toolsClient: cxpb.NewToolsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -470,6 +472,8 @@ type toolsRESTClient struct { // Points back to the CallOptions field of the containing ToolsClient CallOptions **ToolsCallOptions + + logger *slog.Logger } // NewToolsRESTClient creates a new tools rest client. @@ -487,6 +491,7 @@ func NewToolsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Tool endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -549,7 +554,7 @@ func (c *toolsGRPCClient) CreateTool(ctx context.Context, req *cxpb.CreateToolRe var resp *cxpb.Tool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.toolsClient.CreateTool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.toolsClient.CreateTool, req, settings.GRPC, c.logger, "CreateTool") return err }, opts...) if err != nil { @@ -578,7 +583,7 @@ func (c *toolsGRPCClient) ListTools(ctx context.Context, req *cxpb.ListToolsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.toolsClient.ListTools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.toolsClient.ListTools, req, settings.GRPC, c.logger, "ListTools") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *toolsGRPCClient) ExportTools(ctx context.Context, req *cxpb.ExportTools var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.toolsClient.ExportTools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.toolsClient.ExportTools, req, settings.GRPC, c.logger, "ExportTools") return err }, opts...) if err != nil { @@ -633,7 +638,7 @@ func (c *toolsGRPCClient) GetTool(ctx context.Context, req *cxpb.GetToolRequest, var resp *cxpb.Tool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.toolsClient.GetTool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.toolsClient.GetTool, req, settings.GRPC, c.logger, "GetTool") return err }, opts...) if err != nil { @@ -651,7 +656,7 @@ func (c *toolsGRPCClient) UpdateTool(ctx context.Context, req *cxpb.UpdateToolRe var resp *cxpb.Tool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.toolsClient.UpdateTool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.toolsClient.UpdateTool, req, settings.GRPC, c.logger, "UpdateTool") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *toolsGRPCClient) DeleteTool(ctx context.Context, req *cxpb.DeleteToolRe opts = append((*c.CallOptions).DeleteTool[0:len((*c.CallOptions).DeleteTool):len((*c.CallOptions).DeleteTool)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.toolsClient.DeleteTool(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.toolsClient.DeleteTool, req, settings.GRPC, c.logger, "DeleteTool") return err }, opts...) return err @@ -683,7 +688,7 @@ func (c *toolsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLo var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *toolsGRPCClient) ListLocations(ctx context.Context, req *locationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -746,7 +751,7 @@ func (c *toolsGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -761,7 +766,7 @@ func (c *toolsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *toolsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -857,17 +862,7 @@ func (c *toolsRESTClient) CreateTool(ctx context.Context, req *cxpb.CreateToolRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTool") if err != nil { return err } @@ -930,21 +925,10 @@ func (c *toolsRESTClient) ListTools(ctx context.Context, req *cxpb.ListToolsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTools") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1012,21 +996,10 @@ func (c *toolsRESTClient) ExportTools(ctx context.Context, req *cxpb.ExportTools httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportTools") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1077,17 +1050,7 @@ func (c *toolsRESTClient) GetTool(ctx context.Context, req *cxpb.GetToolRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTool") if err != nil { return err } @@ -1151,17 +1114,7 @@ func (c *toolsRESTClient) UpdateTool(ctx context.Context, req *cxpb.UpdateToolRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTool") if err != nil { return err } @@ -1211,15 +1164,8 @@ func (c *toolsRESTClient) DeleteTool(ctx context.Context, req *cxpb.DeleteToolRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTool") + return err }, opts...) } @@ -1256,17 +1202,7 @@ func (c *toolsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1331,21 +1267,10 @@ func (c *toolsRESTClient) ListLocations(ctx context.Context, req *locationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1405,15 +1330,8 @@ func (c *toolsRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1450,17 +1368,7 @@ func (c *toolsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1525,21 +1433,10 @@ func (c *toolsRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/tools_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/tools_client_example_go123_test.go index 3f0607d11df9..a8b792d5f77e 100644 --- a/dialogflow/cx/apiv3beta1/tools_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/tools_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleToolsClient_ListTools_all() { } for resp, err := range c.ListTools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleToolsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleToolsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/transition_route_groups_client.go b/dialogflow/cx/apiv3beta1/transition_route_groups_client.go index 007ac99050a0..a7e4efa933d4 100755 --- a/dialogflow/cx/apiv3beta1/transition_route_groups_client.go +++ b/dialogflow/cx/apiv3beta1/transition_route_groups_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -347,6 +346,8 @@ type transitionRouteGroupsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTransitionRouteGroupsClient creates a new transition route groups client based on gRPC. @@ -374,6 +375,7 @@ func NewTransitionRouteGroupsClient(ctx context.Context, opts ...option.ClientOp connPool: connPool, transitionRouteGroupsClient: cxpb.NewTransitionRouteGroupsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -422,6 +424,8 @@ type transitionRouteGroupsRESTClient struct { // Points back to the CallOptions field of the containing TransitionRouteGroupsClient CallOptions **TransitionRouteGroupsCallOptions + + logger *slog.Logger } // NewTransitionRouteGroupsRESTClient creates a new transition route groups rest client. @@ -440,6 +444,7 @@ func NewTransitionRouteGroupsRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -503,7 +508,7 @@ func (c *transitionRouteGroupsGRPCClient) ListTransitionRouteGroups(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.ListTransitionRouteGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.ListTransitionRouteGroups, req, settings.GRPC, c.logger, "ListTransitionRouteGroups") return err }, opts...) if err != nil { @@ -538,7 +543,7 @@ func (c *transitionRouteGroupsGRPCClient) GetTransitionRouteGroup(ctx context.Co var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.GetTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.GetTransitionRouteGroup, req, settings.GRPC, c.logger, "GetTransitionRouteGroup") return err }, opts...) if err != nil { @@ -556,7 +561,7 @@ func (c *transitionRouteGroupsGRPCClient) CreateTransitionRouteGroup(ctx context var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.CreateTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.CreateTransitionRouteGroup, req, settings.GRPC, c.logger, "CreateTransitionRouteGroup") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *transitionRouteGroupsGRPCClient) UpdateTransitionRouteGroup(ctx context var resp *cxpb.TransitionRouteGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.transitionRouteGroupsClient.UpdateTransitionRouteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.transitionRouteGroupsClient.UpdateTransitionRouteGroup, req, settings.GRPC, c.logger, "UpdateTransitionRouteGroup") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *transitionRouteGroupsGRPCClient) DeleteTransitionRouteGroup(ctx context opts = append((*c.CallOptions).DeleteTransitionRouteGroup[0:len((*c.CallOptions).DeleteTransitionRouteGroup):len((*c.CallOptions).DeleteTransitionRouteGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.transitionRouteGroupsClient.DeleteTransitionRouteGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.transitionRouteGroupsClient.DeleteTransitionRouteGroup, req, settings.GRPC, c.logger, "DeleteTransitionRouteGroup") return err }, opts...) return err @@ -606,7 +611,7 @@ func (c *transitionRouteGroupsGRPCClient) GetLocation(ctx context.Context, req * var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *transitionRouteGroupsGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -669,7 +674,7 @@ func (c *transitionRouteGroupsGRPCClient) CancelOperation(ctx context.Context, r opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -684,7 +689,7 @@ func (c *transitionRouteGroupsGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -713,7 +718,7 @@ func (c *transitionRouteGroupsGRPCClient) ListOperations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -787,21 +792,10 @@ func (c *transitionRouteGroupsRESTClient) ListTransitionRouteGroups(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransitionRouteGroups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -868,17 +862,7 @@ func (c *transitionRouteGroupsRESTClient) GetTransitionRouteGroup(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTransitionRouteGroup") if err != nil { return err } @@ -944,17 +928,7 @@ func (c *transitionRouteGroupsRESTClient) CreateTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTransitionRouteGroup") if err != nil { return err } @@ -1026,17 +1000,7 @@ func (c *transitionRouteGroupsRESTClient) UpdateTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTransitionRouteGroup") if err != nil { return err } @@ -1091,15 +1055,8 @@ func (c *transitionRouteGroupsRESTClient) DeleteTransitionRouteGroup(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTransitionRouteGroup") + return err }, opts...) } @@ -1136,17 +1093,7 @@ func (c *transitionRouteGroupsRESTClient) GetLocation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1211,21 +1158,10 @@ func (c *transitionRouteGroupsRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1285,15 +1221,8 @@ func (c *transitionRouteGroupsRESTClient) CancelOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1330,17 +1259,7 @@ func (c *transitionRouteGroupsRESTClient) GetOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1405,21 +1324,10 @@ func (c *transitionRouteGroupsRESTClient) ListOperations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/transition_route_groups_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/transition_route_groups_client_example_go123_test.go index d3d701e84fa3..c1c0fe10eb63 100644 --- a/dialogflow/cx/apiv3beta1/transition_route_groups_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/transition_route_groups_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTransitionRouteGroupsClient_ListTransitionRouteGroups_all() { } for resp, err := range c.ListTransitionRouteGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTransitionRouteGroupsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTransitionRouteGroupsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/versions_client.go b/dialogflow/cx/apiv3beta1/versions_client.go index b778b1701c7f..2f388efb4e5f 100755 --- a/dialogflow/cx/apiv3beta1/versions_client.go +++ b/dialogflow/cx/apiv3beta1/versions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -439,6 +438,8 @@ type versionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVersionsClient creates a new versions client based on gRPC. @@ -465,6 +466,7 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi connPool: connPool, versionsClient: cxpb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -529,6 +531,8 @@ type versionsRESTClient struct { // Points back to the CallOptions field of the containing VersionsClient CallOptions **VersionsCallOptions + + logger *slog.Logger } // NewVersionsRESTClient creates a new versions rest client. @@ -546,6 +550,7 @@ func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*V endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -619,7 +624,7 @@ func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *cxpb.ListVer } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.ListVersions, req, settings.GRPC, c.logger, "ListVersions") return err }, opts...) if err != nil { @@ -654,7 +659,7 @@ func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *cxpb.GetVersio var resp *cxpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.GetVersion, req, settings.GRPC, c.logger, "GetVersion") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *cxpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CreateVersion, req, settings.GRPC, c.logger, "CreateVersion") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *cxpb.Update var resp *cxpb.Version err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.UpdateVersion, req, settings.GRPC, c.logger, "UpdateVersion") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *cxpb.Delete opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.versionsClient.DeleteVersion, req, settings.GRPC, c.logger, "DeleteVersion") return err }, opts...) return err @@ -724,7 +729,7 @@ func (c *versionsGRPCClient) LoadVersion(ctx context.Context, req *cxpb.LoadVers var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.LoadVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.LoadVersion, req, settings.GRPC, c.logger, "LoadVersion") return err }, opts...) if err != nil { @@ -744,7 +749,7 @@ func (c *versionsGRPCClient) CompareVersions(ctx context.Context, req *cxpb.Comp var resp *cxpb.CompareVersionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.versionsClient.CompareVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.versionsClient.CompareVersions, req, settings.GRPC, c.logger, "CompareVersions") return err }, opts...) if err != nil { @@ -762,7 +767,7 @@ func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -840,7 +845,7 @@ func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -869,7 +874,7 @@ func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -941,21 +946,10 @@ func (c *versionsRESTClient) ListVersions(ctx context.Context, req *cxpb.ListVer } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1019,17 +1013,7 @@ func (c *versionsRESTClient) GetVersion(ctx context.Context, req *cxpb.GetVersio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVersion") if err != nil { return err } @@ -1095,21 +1079,10 @@ func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *cxpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1175,17 +1148,7 @@ func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *cxpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVersion") if err != nil { return err } @@ -1233,15 +1196,8 @@ func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *cxpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVersion") + return err }, opts...) } @@ -1293,21 +1249,10 @@ func (c *versionsRESTClient) LoadVersion(ctx context.Context, req *cxpb.LoadVers httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LoadVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1364,17 +1309,7 @@ func (c *versionsRESTClient) CompareVersions(ctx context.Context, req *cxpb.Comp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CompareVersions") if err != nil { return err } @@ -1424,17 +1359,7 @@ func (c *versionsRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1499,21 +1424,10 @@ func (c *versionsRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1573,15 +1487,8 @@ func (c *versionsRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1618,17 +1525,7 @@ func (c *versionsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1693,21 +1590,10 @@ func (c *versionsRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/versions_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/versions_client_example_go123_test.go index 8768e395690d..ff3ced867027 100644 --- a/dialogflow/cx/apiv3beta1/versions_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/versions_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleVersionsClient_ListVersions_all() { } for resp, err := range c.ListVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleVersionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleVersionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dialogflow/cx/apiv3beta1/webhooks_client.go b/dialogflow/cx/apiv3beta1/webhooks_client.go index 42783ba9420f..32c3c9c49bd7 100755 --- a/dialogflow/cx/apiv3beta1/webhooks_client.go +++ b/dialogflow/cx/apiv3beta1/webhooks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( cxpb "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type webhooksGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWebhooksClient creates a new webhooks client based on gRPC. @@ -355,6 +356,7 @@ func NewWebhooksClient(ctx context.Context, opts ...option.ClientOption) (*Webho connPool: connPool, webhooksClient: cxpb.NewWebhooksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -403,6 +405,8 @@ type webhooksRESTClient struct { // Points back to the CallOptions field of the containing WebhooksClient CallOptions **WebhooksCallOptions + + logger *slog.Logger } // NewWebhooksRESTClient creates a new webhooks rest client. @@ -420,6 +424,7 @@ func NewWebhooksRESTClient(ctx context.Context, opts ...option.ClientOption) (*W endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -483,7 +488,7 @@ func (c *webhooksGRPCClient) ListWebhooks(ctx context.Context, req *cxpb.ListWeb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.ListWebhooks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.ListWebhooks, req, settings.GRPC, c.logger, "ListWebhooks") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *webhooksGRPCClient) GetWebhook(ctx context.Context, req *cxpb.GetWebhoo var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.GetWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.GetWebhook, req, settings.GRPC, c.logger, "GetWebhook") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *webhooksGRPCClient) CreateWebhook(ctx context.Context, req *cxpb.Create var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.CreateWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.CreateWebhook, req, settings.GRPC, c.logger, "CreateWebhook") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *webhooksGRPCClient) UpdateWebhook(ctx context.Context, req *cxpb.Update var resp *cxpb.Webhook err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webhooksClient.UpdateWebhook(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webhooksClient.UpdateWebhook, req, settings.GRPC, c.logger, "UpdateWebhook") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *webhooksGRPCClient) DeleteWebhook(ctx context.Context, req *cxpb.Delete opts = append((*c.CallOptions).DeleteWebhook[0:len((*c.CallOptions).DeleteWebhook):len((*c.CallOptions).DeleteWebhook)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.webhooksClient.DeleteWebhook(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.webhooksClient.DeleteWebhook, req, settings.GRPC, c.logger, "DeleteWebhook") return err }, opts...) return err @@ -586,7 +591,7 @@ func (c *webhooksGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *webhooksGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *webhooksGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -664,7 +669,7 @@ func (c *webhooksGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *webhooksGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -764,21 +769,10 @@ func (c *webhooksRESTClient) ListWebhooks(ctx context.Context, req *cxpb.ListWeb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWebhooks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -841,17 +835,7 @@ func (c *webhooksRESTClient) GetWebhook(ctx context.Context, req *cxpb.GetWebhoo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWebhook") if err != nil { return err } @@ -908,17 +892,7 @@ func (c *webhooksRESTClient) CreateWebhook(ctx context.Context, req *cxpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWebhook") if err != nil { return err } @@ -982,17 +956,7 @@ func (c *webhooksRESTClient) UpdateWebhook(ctx context.Context, req *cxpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWebhook") if err != nil { return err } @@ -1042,15 +1006,8 @@ func (c *webhooksRESTClient) DeleteWebhook(ctx context.Context, req *cxpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWebhook") + return err }, opts...) } @@ -1087,17 +1044,7 @@ func (c *webhooksRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1162,21 +1109,10 @@ func (c *webhooksRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,15 +1172,8 @@ func (c *webhooksRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1281,17 +1210,7 @@ func (c *webhooksRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1356,21 +1275,10 @@ func (c *webhooksRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/dialogflow/cx/apiv3beta1/webhooks_client_example_go123_test.go b/dialogflow/cx/apiv3beta1/webhooks_client_example_go123_test.go index ff49a73f539d..e51acced3473 100644 --- a/dialogflow/cx/apiv3beta1/webhooks_client_example_go123_test.go +++ b/dialogflow/cx/apiv3beta1/webhooks_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleWebhooksClient_ListWebhooks_all() { } for resp, err := range c.ListWebhooks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleWebhooksClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleWebhooksClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/completion_client.go b/discoveryengine/apiv1/completion_client.go index 03c0106242f6..d531219ce87b 100755 --- a/discoveryengine/apiv1/completion_client.go +++ b/discoveryengine/apiv1/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -419,6 +418,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -445,6 +446,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: discoveryenginepb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -508,6 +510,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -525,6 +529,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -587,7 +592,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *discovery var resp *discoveryenginepb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *completionGRPCClient) ImportSuggestionDenyListEntries(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportSuggestionDenyListEntries, req, settings.GRPC, c.logger, "ImportSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -625,7 +630,7 @@ func (c *completionGRPCClient) PurgeSuggestionDenyListEntries(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeSuggestionDenyListEntries, req, settings.GRPC, c.logger, "PurgeSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -645,7 +650,7 @@ func (c *completionGRPCClient) ImportCompletionSuggestions(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionSuggestions, req, settings.GRPC, c.logger, "ImportCompletionSuggestions") return err }, opts...) if err != nil { @@ -665,7 +670,7 @@ func (c *completionGRPCClient) PurgeCompletionSuggestions(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeCompletionSuggestions, req, settings.GRPC, c.logger, "PurgeCompletionSuggestions") return err }, opts...) if err != nil { @@ -684,7 +689,7 @@ func (c *completionGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -699,7 +704,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -728,7 +733,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -797,17 +802,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -864,21 +859,10 @@ func (c *completionRESTClient) ImportSuggestionDenyListEntries(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSuggestionDenyListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -936,21 +920,10 @@ func (c *completionRESTClient) PurgeSuggestionDenyListEntries(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeSuggestionDenyListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1008,21 +981,10 @@ func (c *completionRESTClient) ImportCompletionSuggestions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionSuggestions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1080,21 +1042,10 @@ func (c *completionRESTClient) PurgeCompletionSuggestions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeCompletionSuggestions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1148,15 +1099,8 @@ func (c *completionRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1193,17 +1137,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1268,21 +1202,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/completion_client_example_go123_test.go b/discoveryengine/apiv1/completion_client_example_go123_test.go index 6e22c29ba807..0385001d8220 100644 --- a/discoveryengine/apiv1/completion_client_example_go123_test.go +++ b/discoveryengine/apiv1/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/control_client.go b/discoveryengine/apiv1/control_client.go index edb796d058ae..11bdd7379d2e 100755 --- a/discoveryengine/apiv1/control_client.go +++ b/discoveryengine/apiv1/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -387,6 +386,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -416,6 +417,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: discoveryenginepb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -463,6 +465,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -483,6 +487,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -535,7 +540,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *discoveryeng opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -567,7 +572,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *discoveryengi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *controlGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +668,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -764,17 +769,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -824,15 +819,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -887,17 +875,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -947,17 +925,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -1023,21 +991,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *discoveryengi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1103,15 +1060,8 @@ func (c *controlRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1148,17 +1098,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1223,21 +1163,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/control_client_example_go123_test.go b/discoveryengine/apiv1/control_client_example_go123_test.go index 2bc94d1b5e44..e4c69798067c 100644 --- a/discoveryengine/apiv1/control_client_example_go123_test.go +++ b/discoveryengine/apiv1/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/conversational_search_client.go b/discoveryengine/apiv1/conversational_search_client.go index ecc6ba449313..daf2c6af7c6e 100755 --- a/discoveryengine/apiv1/conversational_search_client.go +++ b/discoveryengine/apiv1/conversational_search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -634,6 +633,8 @@ type conversationalSearchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationalSearchClient creates a new conversational search service client based on gRPC. @@ -660,6 +661,7 @@ func NewConversationalSearchClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationalSearchClient: discoveryenginepb.NewConversationalSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -707,6 +709,8 @@ type conversationalSearchRESTClient struct { // Points back to the CallOptions field of the containing ConversationalSearchClient CallOptions **ConversationalSearchCallOptions + + logger *slog.Logger } // NewConversationalSearchRESTClient creates a new conversational search service rest client. @@ -724,6 +728,7 @@ func NewConversationalSearchRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -776,7 +781,7 @@ func (c *conversationalSearchGRPCClient) ConverseConversation(ctx context.Contex var resp *discoveryenginepb.ConverseConversationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ConverseConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ConverseConversation, req, settings.GRPC, c.logger, "ConverseConversation") return err }, opts...) if err != nil { @@ -794,7 +799,7 @@ func (c *conversationalSearchGRPCClient) CreateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *conversationalSearchGRPCClient) DeleteConversation(ctx context.Context, opts = append((*c.CallOptions).DeleteConversation[0:len((*c.CallOptions).DeleteConversation):len((*c.CallOptions).DeleteConversation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteConversation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteConversation, req, settings.GRPC, c.logger, "DeleteConversation") return err }, opts...) return err @@ -826,7 +831,7 @@ func (c *conversationalSearchGRPCClient) UpdateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateConversation, req, settings.GRPC, c.logger, "UpdateConversation") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *conversationalSearchGRPCClient) GetConversation(ctx context.Context, re var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *conversationalSearchGRPCClient) ListConversations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *conversationalSearchGRPCClient) AnswerQuery(ctx context.Context, req *d var resp *discoveryenginepb.AnswerQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.AnswerQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.AnswerQuery, req, settings.GRPC, c.logger, "AnswerQuery") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *conversationalSearchGRPCClient) GetAnswer(ctx context.Context, req *dis var resp *discoveryenginepb.Answer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetAnswer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetAnswer, req, settings.GRPC, c.logger, "GetAnswer") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *conversationalSearchGRPCClient) CreateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateSession, req, settings.GRPC, c.logger, "CreateSession") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *conversationalSearchGRPCClient) DeleteSession(ctx context.Context, req opts = append((*c.CallOptions).DeleteSession[0:len((*c.CallOptions).DeleteSession):len((*c.CallOptions).DeleteSession)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteSession(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteSession, req, settings.GRPC, c.logger, "DeleteSession") return err }, opts...) return err @@ -976,7 +981,7 @@ func (c *conversationalSearchGRPCClient) UpdateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateSession, req, settings.GRPC, c.logger, "UpdateSession") return err }, opts...) if err != nil { @@ -994,7 +999,7 @@ func (c *conversationalSearchGRPCClient) GetSession(ctx context.Context, req *di var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetSession, req, settings.GRPC, c.logger, "GetSession") return err }, opts...) if err != nil { @@ -1023,7 +1028,7 @@ func (c *conversationalSearchGRPCClient) ListSessions(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *conversationalSearchGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1072,7 +1077,7 @@ func (c *conversationalSearchGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *conversationalSearchGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1166,17 +1171,7 @@ func (c *conversationalSearchRESTClient) ConverseConversation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConverseConversation") if err != nil { return err } @@ -1236,17 +1231,7 @@ func (c *conversationalSearchRESTClient) CreateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -1296,15 +1281,8 @@ func (c *conversationalSearchRESTClient) DeleteConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversation") + return err }, opts...) } @@ -1360,17 +1338,7 @@ func (c *conversationalSearchRESTClient) UpdateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversation") if err != nil { return err } @@ -1420,17 +1388,7 @@ func (c *conversationalSearchRESTClient) GetConversation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -1499,21 +1457,10 @@ func (c *conversationalSearchRESTClient) ListConversations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1582,17 +1529,7 @@ func (c *conversationalSearchRESTClient) AnswerQuery(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnswerQuery") if err != nil { return err } @@ -1642,17 +1579,7 @@ func (c *conversationalSearchRESTClient) GetAnswer(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnswer") if err != nil { return err } @@ -1712,17 +1639,7 @@ func (c *conversationalSearchRESTClient) CreateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSession") if err != nil { return err } @@ -1772,15 +1689,8 @@ func (c *conversationalSearchRESTClient) DeleteSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSession") + return err }, opts...) } @@ -1835,17 +1745,7 @@ func (c *conversationalSearchRESTClient) UpdateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSession") if err != nil { return err } @@ -1895,17 +1795,7 @@ func (c *conversationalSearchRESTClient) GetSession(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSession") if err != nil { return err } @@ -1974,21 +1864,10 @@ func (c *conversationalSearchRESTClient) ListSessions(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2054,15 +1933,8 @@ func (c *conversationalSearchRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2099,17 +1971,7 @@ func (c *conversationalSearchRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2174,21 +2036,10 @@ func (c *conversationalSearchRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/conversational_search_client_example_go123_test.go b/discoveryengine/apiv1/conversational_search_client_example_go123_test.go index fda0419f524d..528a18279f86 100644 --- a/discoveryengine/apiv1/conversational_search_client_example_go123_test.go +++ b/discoveryengine/apiv1/conversational_search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleConversationalSearchClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleConversationalSearchClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleConversationalSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/data_store_client.go b/discoveryengine/apiv1/data_store_client.go index a197924bea40..53e43376e1d0 100755 --- a/discoveryengine/apiv1/data_store_client.go +++ b/discoveryengine/apiv1/data_store_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -300,6 +299,8 @@ type dataStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataStoreClient creates a new data store service client based on gRPC. @@ -327,6 +328,7 @@ func NewDataStoreClient(ctx context.Context, opts ...option.ClientOption) (*Data connPool: connPool, dataStoreClient: discoveryenginepb.NewDataStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -390,6 +392,8 @@ type dataStoreRESTClient struct { // Points back to the CallOptions field of the containing DataStoreClient CallOptions **DataStoreCallOptions + + logger *slog.Logger } // NewDataStoreRESTClient creates a new data store service rest client. @@ -408,6 +412,7 @@ func NewDataStoreRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -470,7 +475,7 @@ func (c *dataStoreGRPCClient) CreateDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.CreateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.CreateDataStore, req, settings.GRPC, c.logger, "CreateDataStore") return err }, opts...) if err != nil { @@ -490,7 +495,7 @@ func (c *dataStoreGRPCClient) GetDataStore(ctx context.Context, req *discoveryen var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.GetDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.GetDataStore, req, settings.GRPC, c.logger, "GetDataStore") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *dataStoreGRPCClient) ListDataStores(ctx context.Context, req *discovery } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.ListDataStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.ListDataStores, req, settings.GRPC, c.logger, "ListDataStores") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *dataStoreGRPCClient) DeleteDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.DeleteDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.DeleteDataStore, req, settings.GRPC, c.logger, "DeleteDataStore") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *dataStoreGRPCClient) UpdateDataStore(ctx context.Context, req *discover var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.UpdateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.UpdateDataStore, req, settings.GRPC, c.logger, "UpdateDataStore") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *dataStoreGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -606,7 +611,7 @@ func (c *dataStoreGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *dataStoreGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -713,21 +718,10 @@ func (c *dataStoreRESTClient) CreateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -778,17 +772,7 @@ func (c *dataStoreRESTClient) GetDataStore(ctx context.Context, req *discoveryen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataStore") if err != nil { return err } @@ -854,21 +838,10 @@ func (c *dataStoreRESTClient) ListDataStores(ctx context.Context, req *discovery } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataStores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -930,21 +903,10 @@ func (c *dataStoreRESTClient) DeleteDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataStore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1009,17 +971,7 @@ func (c *dataStoreRESTClient) UpdateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataStore") if err != nil { return err } @@ -1072,15 +1024,8 @@ func (c *dataStoreRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1117,17 +1062,7 @@ func (c *dataStoreRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1192,21 +1127,10 @@ func (c *dataStoreRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/data_store_client_example_go123_test.go b/discoveryengine/apiv1/data_store_client_example_go123_test.go index 8463462040c7..89f89a9a780b 100644 --- a/discoveryengine/apiv1/data_store_client_example_go123_test.go +++ b/discoveryengine/apiv1/data_store_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDataStoreClient_ListDataStores_all() { } for resp, err := range c.ListDataStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDataStoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/discoveryenginepb/answer.pb.go b/discoveryengine/apiv1/discoveryenginepb/answer.pb.go index 6b7cb34b94f8..2d01f06dde5f 100755 --- a/discoveryengine/apiv1/discoveryenginepb/answer.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/answer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/answer.proto @@ -350,11 +350,9 @@ type Answer struct { func (x *Answer) Reset() { *x = Answer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer) String() string { @@ -365,7 +363,7 @@ func (*Answer) ProtoMessage() {} func (x *Answer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +472,9 @@ type Answer_Citation struct { func (x *Answer_Citation) Reset() { *x = Answer_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Citation) String() string { @@ -489,7 +485,7 @@ func (*Answer_Citation) ProtoMessage() {} func (x *Answer_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +533,9 @@ type Answer_CitationSource struct { func (x *Answer_CitationSource) Reset() { *x = Answer_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_CitationSource) String() string { @@ -552,7 +546,7 @@ func (*Answer_CitationSource) ProtoMessage() {} func (x *Answer_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +586,9 @@ type Answer_Reference struct { func (x *Answer_Reference) Reset() { *x = Answer_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference) String() string { @@ -607,7 +599,7 @@ func (*Answer_Reference) ProtoMessage() {} func (x *Answer_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +685,9 @@ type Answer_Step struct { func (x *Answer_Step) Reset() { *x = Answer_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step) String() string { @@ -708,7 +698,7 @@ func (*Answer_Step) ProtoMessage() {} func (x *Answer_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +753,9 @@ type Answer_QueryUnderstandingInfo struct { func (x *Answer_QueryUnderstandingInfo) Reset() { *x = Answer_QueryUnderstandingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo) String() string { @@ -778,7 +766,7 @@ func (*Answer_QueryUnderstandingInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +809,9 @@ type Answer_Reference_UnstructuredDocumentInfo struct { func (x *Answer_Reference_UnstructuredDocumentInfo) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo) String() string { @@ -836,7 +822,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +894,9 @@ type Answer_Reference_ChunkInfo struct { func (x *Answer_Reference_ChunkInfo) Reset() { *x = Answer_Reference_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo) String() string { @@ -923,7 +907,7 @@ func (*Answer_Reference_ChunkInfo) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,11 +964,9 @@ type Answer_Reference_StructuredDocumentInfo struct { func (x *Answer_Reference_StructuredDocumentInfo) Reset() { *x = Answer_Reference_StructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_StructuredDocumentInfo) String() string { @@ -995,7 +977,7 @@ func (*Answer_Reference_StructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_StructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1026,9 @@ type Answer_Reference_UnstructuredDocumentInfo_ChunkContent struct { func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) String() string { @@ -1059,7 +1039,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1096,9 @@ type Answer_Reference_ChunkInfo_DocumentMetadata struct { func (x *Answer_Reference_ChunkInfo_DocumentMetadata) Reset() { *x = Answer_Reference_ChunkInfo_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo_DocumentMetadata) String() string { @@ -1131,7 +1109,7 @@ func (*Answer_Reference_ChunkInfo_DocumentMetadata) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1199,11 +1177,9 @@ type Answer_Step_Action struct { func (x *Answer_Step_Action) Reset() { *x = Answer_Step_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action) String() string { @@ -1214,7 +1190,7 @@ func (*Answer_Step_Action) ProtoMessage() {} func (x *Answer_Step_Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1249,9 @@ type Answer_Step_Action_SearchAction struct { func (x *Answer_Step_Action_SearchAction) Reset() { *x = Answer_Step_Action_SearchAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_SearchAction) String() string { @@ -1288,7 +1262,7 @@ func (*Answer_Step_Action_SearchAction) ProtoMessage() {} func (x *Answer_Step_Action_SearchAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1323,11 +1297,9 @@ type Answer_Step_Action_Observation struct { func (x *Answer_Step_Action_Observation) Reset() { *x = Answer_Step_Action_Observation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation) String() string { @@ -1338,7 +1310,7 @@ func (*Answer_Step_Action_Observation) ProtoMessage() {} func (x *Answer_Step_Action_Observation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1358,9 @@ type Answer_Step_Action_Observation_SearchResult struct { func (x *Answer_Step_Action_Observation_SearchResult) Reset() { *x = Answer_Step_Action_Observation_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult) String() string { @@ -1401,7 +1371,7 @@ func (*Answer_Step_Action_Observation_SearchResult) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1472,11 +1442,9 @@ type Answer_Step_Action_Observation_SearchResult_SnippetInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_SnippetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) String() string { @@ -1487,7 +1455,7 @@ func (*Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoMessage() { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1504,9 @@ type Answer_Step_Action_Observation_SearchResult_ChunkInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) String() string { @@ -1551,7 +1517,7 @@ func (*Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1601,11 +1567,9 @@ type Answer_QueryUnderstandingInfo_QueryClassificationInfo struct { func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) Reset() { *x = Answer_QueryUnderstandingInfo_QueryClassificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) String() string { @@ -1616,7 +1580,7 @@ func (*Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,224 +2046,6 @@ func file_google_cloud_discoveryengine_v1_answer_proto_init() { if File_google_cloud_discoveryengine_v1_answer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Answer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Answer_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_StructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_SearchAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_SnippetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo_QueryClassificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_answer_proto_msgTypes[3].OneofWrappers = []any{ (*Answer_Reference_UnstructuredDocumentInfo_)(nil), (*Answer_Reference_ChunkInfo_)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/chunk.pb.go b/discoveryengine/apiv1/discoveryenginepb/chunk.pb.go index 00ebdc69b64c..95eef80720d5 100755 --- a/discoveryengine/apiv1/discoveryenginepb/chunk.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/chunk.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/chunk.proto @@ -73,11 +73,9 @@ type Chunk struct { func (x *Chunk) Reset() { *x = Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk) String() string { @@ -88,7 +86,7 @@ func (*Chunk) ProtoMessage() {} func (x *Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type Chunk_DocumentMetadata struct { func (x *Chunk_DocumentMetadata) Reset() { *x = Chunk_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_DocumentMetadata) String() string { @@ -194,7 +190,7 @@ func (*Chunk_DocumentMetadata) ProtoMessage() {} func (x *Chunk_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type Chunk_PageSpan struct { func (x *Chunk_PageSpan) Reset() { *x = Chunk_PageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_PageSpan) String() string { @@ -259,7 +253,7 @@ func (*Chunk_PageSpan) ProtoMessage() {} func (x *Chunk_PageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +306,9 @@ type Chunk_ChunkMetadata struct { func (x *Chunk_ChunkMetadata) Reset() { *x = Chunk_ChunkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_ChunkMetadata) String() string { @@ -327,7 +319,7 @@ func (*Chunk_ChunkMetadata) ProtoMessage() {} func (x *Chunk_ChunkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,56 +493,6 @@ func file_google_cloud_discoveryengine_v1_chunk_proto_init() { if File_google_cloud_discoveryengine_v1_chunk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_PageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_ChunkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_chunk_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/common.pb.go b/discoveryengine/apiv1/discoveryenginepb/common.pb.go index 8abdbb46d435..ade538cedeb6 100755 --- a/discoveryengine/apiv1/discoveryenginepb/common.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/common.proto @@ -350,11 +350,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -365,7 +363,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +488,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -505,7 +501,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +564,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -583,7 +577,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,44 +810,6 @@ func file_google_cloud_discoveryengine_v1_common_proto_init() { if File_google_cloud_discoveryengine_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_common_proto_msgTypes[0].OneofWrappers = []any{ (*Interval_Minimum)(nil), (*Interval_ExclusiveMinimum)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/completion.pb.go b/discoveryengine/apiv1/discoveryenginepb/completion.pb.go index 192fd481f830..4332ccce0b88 100755 --- a/discoveryengine/apiv1/discoveryenginepb/completion.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/completion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/completion.proto @@ -106,11 +106,9 @@ type SuggestionDenyListEntry struct { func (x *SuggestionDenyListEntry) Reset() { *x = SuggestionDenyListEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionDenyListEntry) String() string { @@ -121,7 +119,7 @@ func (*SuggestionDenyListEntry) ProtoMessage() {} func (x *SuggestionDenyListEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type CompletionSuggestion struct { func (x *CompletionSuggestion) Reset() { *x = CompletionSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionSuggestion) String() string { @@ -194,7 +190,7 @@ func (*CompletionSuggestion) ProtoMessage() {} func (x *CompletionSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,32 +378,6 @@ func file_google_cloud_discoveryengine_v1_completion_proto_init() { if File_google_cloud_discoveryengine_v1_completion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionDenyListEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompletionSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_completion_proto_msgTypes[1].OneofWrappers = []any{ (*CompletionSuggestion_GlobalScore)(nil), (*CompletionSuggestion_Frequency)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/completion_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/completion_service.pb.go index 69d3e98eadef..cee5e1187b4d 100755 --- a/discoveryengine/apiv1/discoveryenginepb/completion_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/completion_service.proto @@ -98,11 +98,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -113,7 +111,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +181,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -198,7 +194,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type CompleteQueryResponse_QuerySuggestion struct { func (x *CompleteQueryResponse_QuerySuggestion) Reset() { *x = CompleteQueryResponse_QuerySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_QuerySuggestion) String() string { @@ -259,7 +253,7 @@ func (*CompleteQueryResponse_QuerySuggestion) ProtoMessage() {} func (x *CompleteQueryResponse_QuerySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,44 +554,6 @@ func file_google_cloud_discoveryengine_v1_completion_service_proto_init() { } file_google_cloud_discoveryengine_v1_import_config_proto_init() file_google_cloud_discoveryengine_v1_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_QuerySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/control.pb.go b/discoveryengine/apiv1/discoveryenginepb/control.pb.go index 3694bc87d311..e70efdd026ec 100755 --- a/discoveryengine/apiv1/discoveryenginepb/control.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/control.proto @@ -64,11 +64,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -79,7 +77,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -185,7 +181,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +325,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -344,7 +338,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +386,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -407,7 +399,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type Control_BoostAction struct { func (x *Control_BoostAction) Reset() { *x = Control_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_BoostAction) String() string { @@ -476,7 +466,7 @@ func (*Control_BoostAction) ProtoMessage() {} func (x *Control_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +525,9 @@ type Control_FilterAction struct { func (x *Control_FilterAction) Reset() { *x = Control_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_FilterAction) String() string { @@ -550,7 +538,7 @@ func (*Control_FilterAction) ProtoMessage() {} func (x *Control_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +583,9 @@ type Control_RedirectAction struct { func (x *Control_RedirectAction) Reset() { *x = Control_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_RedirectAction) String() string { @@ -610,7 +596,7 @@ func (*Control_RedirectAction) ProtoMessage() {} func (x *Control_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +636,9 @@ type Control_SynonymsAction struct { func (x *Control_SynonymsAction) Reset() { *x = Control_SynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_SynonymsAction) String() string { @@ -665,7 +649,7 @@ func (*Control_SynonymsAction) ProtoMessage() {} func (x *Control_SynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,104 +879,6 @@ func file_google_cloud_discoveryengine_v1_control_proto_init() { return } file_google_cloud_discoveryengine_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Control_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Control_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Control_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Control_SynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_control_proto_msgTypes[1].OneofWrappers = []any{ (*Control_BoostAction_)(nil), (*Control_FilterAction_)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/control_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/control_service.pb.go index c7fdf4426156..df574a2f0e80 100755 --- a/discoveryengine/apiv1/discoveryenginepb/control_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/control_service.proto @@ -65,11 +65,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -152,7 +148,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +190,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -209,7 +203,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +238,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -259,7 +251,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +300,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -323,7 +313,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -395,7 +383,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,80 +680,6 @@ func file_google_cloud_discoveryengine_v1_control_service_proto_init() { return } file_google_cloud_discoveryengine_v1_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/conversation.pb.go b/discoveryengine/apiv1/discoveryenginepb/conversation.pb.go index 31905bc37b38..b631aea26b55 100755 --- a/discoveryengine/apiv1/discoveryenginepb/conversation.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/conversation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/conversation.proto @@ -115,11 +115,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -130,7 +128,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type Reply struct { func (x *Reply) Reset() { *x = Reply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reply) String() string { @@ -214,7 +210,7 @@ func (*Reply) ProtoMessage() {} func (x *Reply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +248,9 @@ type ConversationContext struct { func (x *ConversationContext) Reset() { *x = ConversationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationContext) String() string { @@ -267,7 +261,7 @@ func (*ConversationContext) ProtoMessage() {} func (x *ConversationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +304,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -325,7 +317,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +363,9 @@ type ConversationMessage struct { func (x *ConversationMessage) Reset() { *x = ConversationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationMessage) String() string { @@ -386,7 +376,7 @@ func (*ConversationMessage) ProtoMessage() {} func (x *ConversationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,68 +606,6 @@ func file_google_cloud_discoveryengine_v1_conversation_proto_init() { return } file_google_cloud_discoveryengine_v1_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Reply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ConversationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ConversationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_conversation_proto_msgTypes[4].OneofWrappers = []any{ (*ConversationMessage_UserInput)(nil), (*ConversationMessage_Reply)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/conversational_search_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/conversational_search_service.pb.go index 30029cbb3dfd..620c1b32dc7b 100755 --- a/discoveryengine/apiv1/discoveryenginepb/conversational_search_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/conversational_search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/conversational_search_service.proto @@ -175,11 +175,9 @@ type ConverseConversationRequest struct { func (x *ConverseConversationRequest) Reset() { *x = ConverseConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationRequest) String() string { @@ -190,7 +188,7 @@ func (*ConverseConversationRequest) ProtoMessage() {} func (x *ConverseConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +284,9 @@ type ConverseConversationResponse struct { func (x *ConverseConversationResponse) Reset() { *x = ConverseConversationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationResponse) String() string { @@ -301,7 +297,7 @@ func (*ConverseConversationResponse) ProtoMessage() {} func (x *ConverseConversationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -367,7 +361,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +410,9 @@ type UpdateConversationRequest struct { func (x *UpdateConversationRequest) Reset() { *x = UpdateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationRequest) String() string { @@ -431,7 +423,7 @@ func (*UpdateConversationRequest) ProtoMessage() {} func (x *UpdateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +465,9 @@ type DeleteConversationRequest struct { func (x *DeleteConversationRequest) Reset() { *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationRequest) String() string { @@ -488,7 +478,7 @@ func (*DeleteConversationRequest) ProtoMessage() {} func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +513,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -538,7 +526,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +584,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -611,7 +597,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +661,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -690,7 +674,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type AnswerQueryRequest struct { func (x *AnswerQueryRequest) Reset() { *x = AnswerQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest) String() string { @@ -815,7 +797,7 @@ func (*AnswerQueryRequest) ProtoMessage() {} func (x *AnswerQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -936,11 +918,9 @@ type AnswerQueryResponse struct { func (x *AnswerQueryResponse) Reset() { *x = AnswerQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryResponse) String() string { @@ -951,7 +931,7 @@ func (*AnswerQueryResponse) ProtoMessage() {} func (x *AnswerQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +980,9 @@ type GetAnswerRequest struct { func (x *GetAnswerRequest) Reset() { *x = GetAnswerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnswerRequest) String() string { @@ -1015,7 +993,7 @@ func (*GetAnswerRequest) ProtoMessage() {} func (x *GetAnswerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,11 +1030,9 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionRequest) String() string { @@ -1067,7 +1043,7 @@ func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1092,9 @@ type UpdateSessionRequest struct { func (x *UpdateSessionRequest) Reset() { *x = UpdateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionRequest) String() string { @@ -1131,7 +1105,7 @@ func (*UpdateSessionRequest) ProtoMessage() {} func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,11 +1147,9 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionRequest) String() string { @@ -1188,7 +1160,7 @@ func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1195,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -1238,7 +1208,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,11 +1266,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -1311,7 +1279,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1375,11 +1343,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -1390,7 +1356,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1432,11 +1398,9 @@ type AnswerQueryRequest_SafetySpec struct { func (x *AnswerQueryRequest_SafetySpec) Reset() { *x = AnswerQueryRequest_SafetySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SafetySpec) String() string { @@ -1447,7 +1411,7 @@ func (*AnswerQueryRequest_SafetySpec) ProtoMessage() {} func (x *AnswerQueryRequest_SafetySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1445,9 @@ type AnswerQueryRequest_RelatedQuestionsSpec struct { func (x *AnswerQueryRequest_RelatedQuestionsSpec) Reset() { *x = AnswerQueryRequest_RelatedQuestionsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_RelatedQuestionsSpec) String() string { @@ -1496,7 +1458,7 @@ func (*AnswerQueryRequest_RelatedQuestionsSpec) ProtoMessage() {} func (x *AnswerQueryRequest_RelatedQuestionsSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1577,11 +1539,9 @@ type AnswerQueryRequest_AnswerGenerationSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec) String() string { @@ -1592,7 +1552,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1681,11 +1641,9 @@ type AnswerQueryRequest_SearchSpec struct { func (x *AnswerQueryRequest_SearchSpec) Reset() { *x = AnswerQueryRequest_SearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec) String() string { @@ -1696,7 +1654,7 @@ func (*AnswerQueryRequest_SearchSpec) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1722,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec) String() string { @@ -1779,7 +1735,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec) ProtoMessage() {} func (x *AnswerQueryRequest_QueryUnderstandingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1777,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_ModelSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) String() string { @@ -1836,7 +1790,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1824,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_PromptSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_PromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) String() string { @@ -1885,7 +1837,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1960,11 +1912,9 @@ type AnswerQueryRequest_SearchSpec_SearchParams struct { func (x *AnswerQueryRequest_SearchSpec_SearchParams) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchParams) String() string { @@ -1975,7 +1925,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchParams) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +1994,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList) String() string { @@ -2059,7 +2007,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchResultList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,11 +2046,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) String() string { @@ -2113,7 +2059,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoMessage func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2198,11 +2144,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) String() string { @@ -2214,7 +2158,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2288,11 +2232,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo struc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) String() string { @@ -2303,7 +2245,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Pr func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2353,11 +2295,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) String() string { @@ -2369,7 +2309,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2415,11 +2355,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) String() string { @@ -2431,7 +2369,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2475,11 +2413,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) String() string { @@ -2491,7 +2427,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2535,11 +2471,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_Docum func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) String() string { @@ -2551,7 +2485,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_Doc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2592,11 +2526,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) String() string { @@ -2607,7 +2539,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoM func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2645,11 +2577,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) String() string { @@ -2660,7 +2590,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoMessag func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3731,428 +3661,6 @@ func file_google_cloud_discoveryengine_v1_conversational_search_service_proto_in file_google_cloud_discoveryengine_v1_conversation_proto_init() file_google_cloud_discoveryengine_v1_search_service_proto_init() file_google_cloud_discoveryengine_v1_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetAnswerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SafetySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_RelatedQuestionsSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[20].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_conversational_search_service_proto_msgTypes[21].OneofWrappers = []any{ (*AnswerQueryRequest_SearchSpec_SearchParams_)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/custom_tuning_model.pb.go b/discoveryengine/apiv1/discoveryenginepb/custom_tuning_model.pb.go index 92b86064089a..ccd328b856f7 100755 --- a/discoveryengine/apiv1/discoveryenginepb/custom_tuning_model.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/custom_tuning_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/custom_tuning_model.proto @@ -144,11 +144,9 @@ type CustomTuningModel struct { func (x *CustomTuningModel) Reset() { *x = CustomTuningModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTuningModel) String() string { @@ -159,7 +157,7 @@ func (*CustomTuningModel) ProtoMessage() {} func (x *CustomTuningModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,20 +368,6 @@ func file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_init() { if File_google_cloud_discoveryengine_v1_custom_tuning_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomTuningModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/data_store.pb.go b/discoveryengine/apiv1/discoveryenginepb/data_store.pb.go index 54f038e3dd67..4144e0764754 100755 --- a/discoveryengine/apiv1/discoveryenginepb/data_store.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/data_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/data_store.proto @@ -242,11 +242,9 @@ type DataStore struct { func (x *DataStore) Reset() { *x = DataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore) String() string { @@ -257,7 +255,7 @@ func (*DataStore) ProtoMessage() {} func (x *DataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +369,9 @@ type WorkspaceConfig struct { func (x *WorkspaceConfig) Reset() { *x = WorkspaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkspaceConfig) String() string { @@ -386,7 +382,7 @@ func (*WorkspaceConfig) ProtoMessage() {} func (x *WorkspaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +447,9 @@ type DataStore_BillingEstimation struct { func (x *DataStore_BillingEstimation) Reset() { *x = DataStore_BillingEstimation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore_BillingEstimation) String() string { @@ -466,7 +460,7 @@ func (*DataStore_BillingEstimation) ProtoMessage() {} func (x *DataStore_BillingEstimation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,44 +745,6 @@ func file_google_cloud_discoveryengine_v1_data_store_proto_init() { file_google_cloud_discoveryengine_v1_common_proto_init() file_google_cloud_discoveryengine_v1_document_processing_config_proto_init() file_google_cloud_discoveryengine_v1_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkspaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataStore_BillingEstimation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/data_store_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/data_store_service.pb.go index b4acaa131bf3..9f4459e6f0bd 100755 --- a/discoveryengine/apiv1/discoveryenginepb/data_store_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/data_store_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/data_store_service.proto @@ -86,11 +86,9 @@ type CreateDataStoreRequest struct { func (x *CreateDataStoreRequest) Reset() { *x = CreateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreRequest) String() string { @@ -101,7 +99,7 @@ func (*CreateDataStoreRequest) ProtoMessage() {} func (x *CreateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type GetDataStoreRequest struct { func (x *GetDataStoreRequest) Reset() { *x = GetDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataStoreRequest) String() string { @@ -189,7 +185,7 @@ func (*GetDataStoreRequest) ProtoMessage() {} func (x *GetDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type CreateDataStoreMetadata struct { func (x *CreateDataStoreMetadata) Reset() { *x = CreateDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreMetadata) String() string { @@ -244,7 +238,7 @@ func (*CreateDataStoreMetadata) ProtoMessage() {} func (x *CreateDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +307,9 @@ type ListDataStoresRequest struct { func (x *ListDataStoresRequest) Reset() { *x = ListDataStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresRequest) String() string { @@ -328,7 +320,7 @@ func (*ListDataStoresRequest) ProtoMessage() {} func (x *ListDataStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +382,9 @@ type ListDataStoresResponse struct { func (x *ListDataStoresResponse) Reset() { *x = ListDataStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresResponse) String() string { @@ -405,7 +395,7 @@ func (*ListDataStoresResponse) ProtoMessage() {} func (x *ListDataStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +447,9 @@ type DeleteDataStoreRequest struct { func (x *DeleteDataStoreRequest) Reset() { *x = DeleteDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreRequest) String() string { @@ -472,7 +460,7 @@ func (*DeleteDataStoreRequest) ProtoMessage() {} func (x *DeleteDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +510,9 @@ type UpdateDataStoreRequest struct { func (x *UpdateDataStoreRequest) Reset() { *x = UpdateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataStoreRequest) String() string { @@ -537,7 +523,7 @@ func (*UpdateDataStoreRequest) ProtoMessage() {} func (x *UpdateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +570,9 @@ type DeleteDataStoreMetadata struct { func (x *DeleteDataStoreMetadata) Reset() { *x = DeleteDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreMetadata) String() string { @@ -599,7 +583,7 @@ func (*DeleteDataStoreMetadata) ProtoMessage() {} func (x *DeleteDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,104 +904,6 @@ func file_google_cloud_discoveryengine_v1_data_store_service_proto_init() { return } file_google_cloud_discoveryengine_v1_data_store_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_data_store_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/document.pb.go b/discoveryengine/apiv1/discoveryenginepb/document.pb.go index ae88564ac23b..3c507badfadb 100755 --- a/discoveryengine/apiv1/discoveryenginepb/document.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/document.proto @@ -100,11 +100,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -115,7 +113,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +252,9 @@ type Document_Content struct { func (x *Document_Content) Reset() { *x = Document_Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Content) String() string { @@ -269,7 +265,7 @@ func (*Document_Content) ProtoMessage() {} func (x *Document_Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +351,9 @@ type Document_IndexStatus struct { func (x *Document_IndexStatus) Reset() { *x = Document_IndexStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_IndexStatus) String() string { @@ -370,7 +364,7 @@ func (*Document_IndexStatus) ProtoMessage() {} func (x *Document_IndexStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,44 +537,6 @@ func file_google_cloud_discoveryengine_v1_document_proto_init() { if File_google_cloud_discoveryengine_v1_document_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Document_Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Document_IndexStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_StructData)(nil), (*Document_JsonData)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/document_processing_config.pb.go b/discoveryengine/apiv1/discoveryenginepb/document_processing_config.pb.go index 27bae2d0eef2..d875c6c386ff 100755 --- a/discoveryengine/apiv1/discoveryenginepb/document_processing_config.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/document_processing_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/document_processing_config.proto @@ -78,11 +78,9 @@ type DocumentProcessingConfig struct { func (x *DocumentProcessingConfig) Reset() { *x = DocumentProcessingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig) String() string { @@ -93,7 +91,7 @@ func (*DocumentProcessingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type DocumentProcessingConfig_ChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig) String() string { @@ -167,7 +163,7 @@ func (*DocumentProcessingConfig_ChunkingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type DocumentProcessingConfig_ParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig) String() string { @@ -241,7 +235,7 @@ func (*DocumentProcessingConfig_ParsingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) String() string { @@ -348,7 +340,7 @@ func (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoM func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) String() string { @@ -401,7 +391,7 @@ func (*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoMessage func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type DocumentProcessingConfig_ParsingConfig_OcrParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_OcrParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) String() string { @@ -449,7 +437,7 @@ func (*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoMessage() { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +476,9 @@ type DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) String() string { @@ -503,7 +489,7 @@ func (*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoMessage( func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,92 +695,6 @@ func file_google_cloud_discoveryengine_v1_document_processing_config_proto_init( if File_google_cloud_discoveryengine_v1_document_processing_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_document_processing_config_proto_msgTypes[1].OneofWrappers = []any{ (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig_)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/document_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/document_service.pb.go index add7d7b5cd4b..f07c549afe5f 100755 --- a/discoveryengine/apiv1/discoveryenginepb/document_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/document_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/document_service.proto @@ -126,11 +126,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -141,7 +139,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -217,7 +213,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +268,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -287,7 +281,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +346,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -367,7 +359,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -448,7 +438,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +497,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -522,7 +510,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,11 +550,9 @@ type BatchGetDocumentsMetadataRequest struct { func (x *BatchGetDocumentsMetadataRequest) Reset() { *x = BatchGetDocumentsMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest) String() string { @@ -577,7 +563,7 @@ func (*BatchGetDocumentsMetadataRequest) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +606,9 @@ type BatchGetDocumentsMetadataResponse struct { func (x *BatchGetDocumentsMetadataResponse) Reset() { *x = BatchGetDocumentsMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse) String() string { @@ -635,7 +619,7 @@ func (*BatchGetDocumentsMetadataResponse) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +654,9 @@ type BatchGetDocumentsMetadataRequest_UrisMatcher struct { func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) Reset() { *x = BatchGetDocumentsMetadataRequest_UrisMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) String() string { @@ -685,7 +667,7 @@ func (*BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +704,9 @@ type BatchGetDocumentsMetadataRequest_FhirMatcher struct { func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) Reset() { *x = BatchGetDocumentsMetadataRequest_FhirMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) String() string { @@ -737,7 +717,7 @@ func (*BatchGetDocumentsMetadataRequest_FhirMatcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,11 +757,9 @@ type BatchGetDocumentsMetadataRequest_Matcher struct { func (x *BatchGetDocumentsMetadataRequest_Matcher) Reset() { *x = BatchGetDocumentsMetadataRequest_Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_Matcher) String() string { @@ -792,7 +770,7 @@ func (*BatchGetDocumentsMetadataRequest_Matcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_Matcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +852,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) String() string { @@ -889,7 +865,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +927,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) String() string { @@ -966,7 +940,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoMes func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1477,164 +1451,6 @@ func file_google_cloud_discoveryengine_v1_document_service_proto_init() { file_google_cloud_discoveryengine_v1_document_proto_init() file_google_cloud_discoveryengine_v1_import_config_proto_init() file_google_cloud_discoveryengine_v1_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_UrisMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_FhirMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_document_service_proto_msgTypes[10].OneofWrappers = []any{ (*BatchGetDocumentsMetadataRequest_Matcher_UrisMatcher)(nil), (*BatchGetDocumentsMetadataRequest_Matcher_FhirMatcher)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/engine.pb.go b/discoveryengine/apiv1/discoveryenginepb/engine.pb.go index c859e7007fa6..41bfc3e85c09 100755 --- a/discoveryengine/apiv1/discoveryenginepb/engine.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/engine.proto @@ -110,11 +110,9 @@ type Engine struct { func (x *Engine) Reset() { *x = Engine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine) String() string { @@ -125,7 +123,7 @@ func (*Engine) ProtoMessage() {} func (x *Engine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,11 +293,9 @@ type Engine_SearchEngineConfig struct { func (x *Engine_SearchEngineConfig) Reset() { *x = Engine_SearchEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_SearchEngineConfig) String() string { @@ -310,7 +306,7 @@ func (*Engine_SearchEngineConfig) ProtoMessage() {} func (x *Engine_SearchEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +371,9 @@ type Engine_ChatEngineConfig struct { func (x *Engine_ChatEngineConfig) Reset() { *x = Engine_ChatEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig) String() string { @@ -390,7 +384,7 @@ func (*Engine_ChatEngineConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +426,9 @@ type Engine_CommonConfig struct { func (x *Engine_CommonConfig) Reset() { *x = Engine_CommonConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_CommonConfig) String() string { @@ -447,7 +439,7 @@ func (*Engine_CommonConfig) ProtoMessage() {} func (x *Engine_CommonConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +478,9 @@ type Engine_ChatEngineMetadata struct { func (x *Engine_ChatEngineMetadata) Reset() { *x = Engine_ChatEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineMetadata) String() string { @@ -501,7 +491,7 @@ func (*Engine_ChatEngineMetadata) ProtoMessage() {} func (x *Engine_ChatEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +547,9 @@ type Engine_ChatEngineConfig_AgentCreationConfig struct { func (x *Engine_ChatEngineConfig_AgentCreationConfig) Reset() { *x = Engine_ChatEngineConfig_AgentCreationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig_AgentCreationConfig) String() string { @@ -572,7 +560,7 @@ func (*Engine_ChatEngineConfig_AgentCreationConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig_AgentCreationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,80 +799,6 @@ func file_google_cloud_discoveryengine_v1_engine_proto_init() { return } file_google_cloud_discoveryengine_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Engine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Engine_SearchEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Engine_CommonConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig_AgentCreationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_engine_proto_msgTypes[0].OneofWrappers = []any{ (*Engine_ChatEngineConfig_)(nil), (*Engine_SearchEngineConfig_)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/engine_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/engine_service.pb.go index 0397406e02ba..9071b8300b4b 100755 --- a/discoveryengine/apiv1/discoveryenginepb/engine_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/engine_service.proto @@ -70,11 +70,9 @@ type CreateEngineRequest struct { func (x *CreateEngineRequest) Reset() { *x = CreateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineRequest) String() string { @@ -85,7 +83,7 @@ func (*CreateEngineRequest) ProtoMessage() {} func (x *CreateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,11 +137,9 @@ type CreateEngineMetadata struct { func (x *CreateEngineMetadata) Reset() { *x = CreateEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineMetadata) String() string { @@ -154,7 +150,7 @@ func (*CreateEngineMetadata) ProtoMessage() {} func (x *CreateEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,11 +202,9 @@ type DeleteEngineRequest struct { func (x *DeleteEngineRequest) Reset() { *x = DeleteEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineRequest) String() string { @@ -221,7 +215,7 @@ func (*DeleteEngineRequest) ProtoMessage() {} func (x *DeleteEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,11 +255,9 @@ type DeleteEngineMetadata struct { func (x *DeleteEngineMetadata) Reset() { *x = DeleteEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineMetadata) String() string { @@ -276,7 +268,7 @@ func (*DeleteEngineMetadata) ProtoMessage() {} func (x *DeleteEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +313,9 @@ type GetEngineRequest struct { func (x *GetEngineRequest) Reset() { *x = GetEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEngineRequest) String() string { @@ -336,7 +326,7 @@ func (*GetEngineRequest) ProtoMessage() {} func (x *GetEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type ListEnginesRequest struct { func (x *ListEnginesRequest) Reset() { *x = ListEnginesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesRequest) String() string { @@ -395,7 +383,7 @@ func (*ListEnginesRequest) ProtoMessage() {} func (x *ListEnginesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +442,9 @@ type ListEnginesResponse struct { func (x *ListEnginesResponse) Reset() { *x = ListEnginesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesResponse) String() string { @@ -469,7 +455,7 @@ func (*ListEnginesResponse) ProtoMessage() {} func (x *ListEnginesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +511,9 @@ type UpdateEngineRequest struct { func (x *UpdateEngineRequest) Reset() { *x = UpdateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEngineRequest) String() string { @@ -540,7 +524,7 @@ func (*UpdateEngineRequest) ProtoMessage() {} func (x *UpdateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,104 +809,6 @@ func file_google_cloud_discoveryengine_v1_engine_service_proto_init() { return } file_google_cloud_discoveryengine_v1_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/grounded_generation_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/grounded_generation_service.pb.go index 4a4078fe6b3f..78ae60eb0446 100755 --- a/discoveryengine/apiv1/discoveryenginepb/grounded_generation_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/grounded_generation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto @@ -216,11 +216,9 @@ type GroundedGenerationContent struct { func (x *GroundedGenerationContent) Reset() { *x = GroundedGenerationContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundedGenerationContent) String() string { @@ -231,7 +229,7 @@ func (*GroundedGenerationContent) ProtoMessage() {} func (x *GroundedGenerationContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +308,9 @@ type GenerateGroundedContentRequest struct { func (x *GenerateGroundedContentRequest) Reset() { *x = GenerateGroundedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest) String() string { @@ -325,7 +321,7 @@ func (*GenerateGroundedContentRequest) ProtoMessage() {} func (x *GenerateGroundedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +389,9 @@ type GenerateGroundedContentResponse struct { func (x *GenerateGroundedContentResponse) Reset() { *x = GenerateGroundedContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse) String() string { @@ -408,7 +402,7 @@ func (*GenerateGroundedContentResponse) ProtoMessage() {} func (x *GenerateGroundedContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +440,9 @@ type CheckGroundingSpec struct { func (x *CheckGroundingSpec) Reset() { *x = CheckGroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingSpec) String() string { @@ -461,7 +453,7 @@ func (*CheckGroundingSpec) ProtoMessage() {} func (x *CheckGroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +515,9 @@ type CheckGroundingRequest struct { func (x *CheckGroundingRequest) Reset() { *x = CheckGroundingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingRequest) String() string { @@ -538,7 +528,7 @@ func (*CheckGroundingRequest) ProtoMessage() {} func (x *CheckGroundingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +599,9 @@ type CheckGroundingResponse struct { func (x *CheckGroundingResponse) Reset() { *x = CheckGroundingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse) String() string { @@ -624,7 +612,7 @@ func (*CheckGroundingResponse) ProtoMessage() {} func (x *CheckGroundingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +664,9 @@ type GroundedGenerationContent_Part struct { func (x *GroundedGenerationContent_Part) Reset() { *x = GroundedGenerationContent_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundedGenerationContent_Part) String() string { @@ -691,7 +677,7 @@ func (*GroundedGenerationContent_Part) ProtoMessage() {} func (x *GroundedGenerationContent_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +744,9 @@ type GenerateGroundedContentRequest_GenerationSpec struct { func (x *GenerateGroundedContentRequest_GenerationSpec) Reset() { *x = GenerateGroundedContentRequest_GenerationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GenerationSpec) String() string { @@ -773,7 +757,7 @@ func (*GenerateGroundedContentRequest_GenerationSpec) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GenerationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +840,9 @@ type GenerateGroundedContentRequest_DynamicRetrievalConfiguration struct { func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) Reset() { *x = GenerateGroundedContentRequest_DynamicRetrievalConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) String() string { @@ -871,7 +853,7 @@ func (*GenerateGroundedContentRequest_DynamicRetrievalConfiguration) ProtoMessag func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -911,11 +893,9 @@ type GenerateGroundedContentRequest_GroundingSource struct { func (x *GenerateGroundedContentRequest_GroundingSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource) String() string { @@ -926,7 +906,7 @@ func (*GenerateGroundedContentRequest_GroundingSource) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GroundingSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +989,9 @@ type GenerateGroundedContentRequest_GroundingSpec struct { func (x *GenerateGroundedContentRequest_GroundingSpec) Reset() { *x = GenerateGroundedContentRequest_GroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSpec) String() string { @@ -1024,7 +1002,7 @@ func (*GenerateGroundedContentRequest_GroundingSpec) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1039,9 @@ type GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetriev func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) Reset() { *x = GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) String() string { @@ -1077,7 +1053,7 @@ func (*GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetri func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1099,9 @@ type GenerateGroundedContentRequest_GroundingSource_InlineSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) String() string { @@ -1138,7 +1112,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_InlineSource) ProtoMessage func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1167,9 @@ type GenerateGroundedContentRequest_GroundingSource_SearchSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_SearchSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) String() string { @@ -1208,7 +1180,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_SearchSource) ProtoMessage func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1236,9 @@ type GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) String() string { @@ -1279,7 +1249,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) ProtoM func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1289,9 @@ type GenerateGroundedContentResponse_Candidate struct { func (x *GenerateGroundedContentResponse_Candidate) Reset() { *x = GenerateGroundedContentResponse_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate) String() string { @@ -1334,7 +1302,7 @@ func (*GenerateGroundedContentResponse_Candidate) ProtoMessage() {} func (x *GenerateGroundedContentResponse_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1371,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata struct { func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) String() string { @@ -1418,7 +1384,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata) ProtoMessage func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,11 +1448,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetada func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) String() string { @@ -1498,7 +1462,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMeta func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1539,11 +1503,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrieva func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) String() string { @@ -1555,7 +1517,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrie func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1595,11 +1557,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrieva func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) String() string { @@ -1611,7 +1571,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrie func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1656,11 +1616,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoin func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) String() string { @@ -1671,7 +1629,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPo func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1722,11 +1680,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSuppor func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) String() string { @@ -1737,7 +1693,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupp func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1764,9 @@ type CheckGroundingResponse_Claim struct { func (x *CheckGroundingResponse_Claim) Reset() { *x = CheckGroundingResponse_Claim{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse_Claim) String() string { @@ -1823,7 +1777,7 @@ func (*CheckGroundingResponse_Claim) ProtoMessage() {} func (x *CheckGroundingResponse_Claim) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2470,284 +2424,6 @@ func file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_init return } file_google_cloud_discoveryengine_v1_grounding_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroundedGenerationContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GroundedGenerationContent_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GenerationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_DynamicRetrievalConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_SearchSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse_Claim); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[3].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[5].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_grounded_generation_service_proto_msgTypes[6].OneofWrappers = []any{ diff --git a/discoveryengine/apiv1/discoveryenginepb/grounding.pb.go b/discoveryengine/apiv1/discoveryenginepb/grounding.pb.go index a3f728d74813..571c75828a41 100755 --- a/discoveryengine/apiv1/discoveryenginepb/grounding.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/grounding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/grounding.proto @@ -52,11 +52,9 @@ type GroundingFact struct { func (x *GroundingFact) Reset() { *x = GroundingFact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingFact) String() string { @@ -67,7 +65,7 @@ func (*GroundingFact) ProtoMessage() {} func (x *GroundingFact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type FactChunk struct { func (x *FactChunk) Reset() { *x = FactChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FactChunk) String() string { @@ -132,7 +128,7 @@ func (*FactChunk) ProtoMessage() {} func (x *FactChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,32 +265,6 @@ func file_google_cloud_discoveryengine_v1_grounding_proto_init() { if File_google_cloud_discoveryengine_v1_grounding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroundingFact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_grounding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FactChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/import_config.pb.go b/discoveryengine/apiv1/discoveryenginepb/import_config.pb.go index 9f4ffaabb849..cebba745989a 100755 --- a/discoveryengine/apiv1/discoveryenginepb/import_config.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/import_config.proto @@ -271,11 +271,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -286,7 +284,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +365,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -382,7 +378,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +477,9 @@ type SpannerSource struct { func (x *SpannerSource) Reset() { *x = SpannerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerSource) String() string { @@ -496,7 +490,7 @@ func (*SpannerSource) ProtoMessage() {} func (x *SpannerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +558,9 @@ type BigtableOptions struct { func (x *BigtableOptions) Reset() { *x = BigtableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions) String() string { @@ -579,7 +571,7 @@ func (*BigtableOptions) ProtoMessage() {} func (x *BigtableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +621,9 @@ type BigtableSource struct { func (x *BigtableSource) Reset() { *x = BigtableSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableSource) String() string { @@ -644,7 +634,7 @@ func (*BigtableSource) ProtoMessage() {} func (x *BigtableSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,11 +700,9 @@ type FhirStoreSource struct { func (x *FhirStoreSource) Reset() { *x = FhirStoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FhirStoreSource) String() string { @@ -725,7 +713,7 @@ func (*FhirStoreSource) ProtoMessage() {} func (x *FhirStoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,11 +783,9 @@ type CloudSqlSource struct { func (x *CloudSqlSource) Reset() { *x = CloudSqlSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlSource) String() string { @@ -810,7 +796,7 @@ func (*CloudSqlSource) ProtoMessage() {} func (x *CloudSqlSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +886,9 @@ type AlloyDbSource struct { func (x *AlloyDbSource) Reset() { *x = AlloyDbSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSource) String() string { @@ -915,7 +899,7 @@ func (*AlloyDbSource) ProtoMessage() {} func (x *AlloyDbSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +983,9 @@ type FirestoreSource struct { func (x *FirestoreSource) Reset() { *x = FirestoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirestoreSource) String() string { @@ -1014,7 +996,7 @@ func (*FirestoreSource) ProtoMessage() {} func (x *FirestoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1055,9 @@ type ImportErrorConfig struct { func (x *ImportErrorConfig) Reset() { *x = ImportErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorConfig) String() string { @@ -1088,7 +1068,7 @@ func (*ImportErrorConfig) ProtoMessage() {} func (x *ImportErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1135,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -1170,7 +1148,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1252,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1289,7 +1265,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1328,9 @@ type ImportUserEventsMetadata struct { func (x *ImportUserEventsMetadata) Reset() { *x = ImportUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsMetadata) String() string { @@ -1367,7 +1341,7 @@ func (*ImportUserEventsMetadata) ProtoMessage() {} func (x *ImportUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1432,11 +1406,9 @@ type ImportDocumentsMetadata struct { func (x *ImportDocumentsMetadata) Reset() { *x = ImportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata) String() string { @@ -1447,7 +1419,7 @@ func (*ImportDocumentsMetadata) ProtoMessage() {} func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1595,11 +1567,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -1610,7 +1580,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1791,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -1836,7 +1804,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,11 +1855,9 @@ type ImportSuggestionDenyListEntriesRequest struct { func (x *ImportSuggestionDenyListEntriesRequest) Reset() { *x = ImportSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest) String() string { @@ -1902,7 +1868,7 @@ func (*ImportSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1990,11 +1956,9 @@ type ImportSuggestionDenyListEntriesResponse struct { func (x *ImportSuggestionDenyListEntriesResponse) Reset() { *x = ImportSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesResponse) String() string { @@ -2005,7 +1969,7 @@ func (*ImportSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,11 +2022,9 @@ type ImportSuggestionDenyListEntriesMetadata struct { func (x *ImportSuggestionDenyListEntriesMetadata) Reset() { *x = ImportSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesMetadata) String() string { @@ -2073,7 +2035,7 @@ func (*ImportSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2129,11 +2091,9 @@ type ImportCompletionSuggestionsRequest struct { func (x *ImportCompletionSuggestionsRequest) Reset() { *x = ImportCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest) String() string { @@ -2144,7 +2104,7 @@ func (*ImportCompletionSuggestionsRequest) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2246,11 +2206,9 @@ type ImportCompletionSuggestionsResponse struct { func (x *ImportCompletionSuggestionsResponse) Reset() { *x = ImportCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsResponse) String() string { @@ -2261,7 +2219,7 @@ func (*ImportCompletionSuggestionsResponse) ProtoMessage() {} func (x *ImportCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2315,11 +2273,9 @@ type ImportCompletionSuggestionsMetadata struct { func (x *ImportCompletionSuggestionsMetadata) Reset() { *x = ImportCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsMetadata) String() string { @@ -2330,7 +2286,7 @@ func (*ImportCompletionSuggestionsMetadata) ProtoMessage() {} func (x *ImportCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,11 +2360,9 @@ type BigtableOptions_BigtableColumnFamily struct { func (x *BigtableOptions_BigtableColumnFamily) Reset() { *x = BigtableOptions_BigtableColumnFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumnFamily) String() string { @@ -2419,7 +2373,7 @@ func (*BigtableOptions_BigtableColumnFamily) ProtoMessage() {} func (x *BigtableOptions_BigtableColumnFamily) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2493,11 +2447,9 @@ type BigtableOptions_BigtableColumn struct { func (x *BigtableOptions_BigtableColumn) Reset() { *x = BigtableOptions_BigtableColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumn) String() string { @@ -2508,7 +2460,7 @@ func (*BigtableOptions_BigtableColumn) ProtoMessage() {} func (x *BigtableOptions_BigtableColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2563,11 +2515,9 @@ type ImportUserEventsRequest_InlineSource struct { func (x *ImportUserEventsRequest_InlineSource) Reset() { *x = ImportUserEventsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest_InlineSource) String() string { @@ -2578,7 +2528,7 @@ func (*ImportUserEventsRequest_InlineSource) ProtoMessage() {} func (x *ImportUserEventsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2614,11 +2564,9 @@ type ImportDocumentsRequest_InlineSource struct { func (x *ImportDocumentsRequest_InlineSource) Reset() { *x = ImportDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest_InlineSource) String() string { @@ -2629,7 +2577,7 @@ func (*ImportDocumentsRequest_InlineSource) ProtoMessage() {} func (x *ImportDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2663,11 +2611,9 @@ type ImportSuggestionDenyListEntriesRequest_InlineSource struct { func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) Reset() { *x = ImportSuggestionDenyListEntriesRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) String() string { @@ -2678,7 +2624,7 @@ func (*ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2712,11 +2658,9 @@ type ImportCompletionSuggestionsRequest_InlineSource struct { func (x *ImportCompletionSuggestionsRequest_InlineSource) Reset() { *x = ImportCompletionSuggestionsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest_InlineSource) String() string { @@ -2727,7 +2671,7 @@ func (*ImportCompletionSuggestionsRequest_InlineSource) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3385,344 +3329,6 @@ func file_google_cloud_discoveryengine_v1_import_config_proto_init() { file_google_cloud_discoveryengine_v1_completion_proto_init() file_google_cloud_discoveryengine_v1_document_proto_init() file_google_cloud_discoveryengine_v1_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpannerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigtableSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FhirStoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FirestoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumnFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/project.pb.go b/discoveryengine/apiv1/discoveryenginepb/project.pb.go index 882cfe85a570..2b3ad30e3702 100755 --- a/discoveryengine/apiv1/discoveryenginepb/project.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/project.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/project.proto @@ -118,11 +118,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -133,7 +131,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type Project_ServiceTerms struct { func (x *Project_ServiceTerms) Reset() { *x = Project_ServiceTerms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project_ServiceTerms) String() string { @@ -222,7 +218,7 @@ func (*Project_ServiceTerms) ProtoMessage() {} func (x *Project_ServiceTerms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_project_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,32 +395,6 @@ func file_google_cloud_discoveryengine_v1_project_proto_init() { if File_google_cloud_discoveryengine_v1_project_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_project_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_project_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Project_ServiceTerms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/project_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/project_service.pb.go index 41d71aacdcc2..f4aad6d22795 100755 --- a/discoveryengine/apiv1/discoveryenginepb/project_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/project_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/project_service.proto @@ -67,11 +67,9 @@ type ProvisionProjectRequest struct { func (x *ProvisionProjectRequest) Reset() { *x = ProvisionProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectRequest) String() string { @@ -82,7 +80,7 @@ func (*ProvisionProjectRequest) ProtoMessage() {} func (x *ProvisionProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ProvisionProjectMetadata struct { func (x *ProvisionProjectMetadata) Reset() { *x = ProvisionProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectMetadata) String() string { @@ -142,7 +138,7 @@ func (*ProvisionProjectMetadata) ProtoMessage() {} func (x *ProvisionProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,32 +265,6 @@ func file_google_cloud_discoveryengine_v1_project_service_proto_init() { return } file_google_cloud_discoveryengine_v1_project_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/purge_config.pb.go b/discoveryengine/apiv1/discoveryenginepb/purge_config.pb.go index 03d646c729d4..89b9d10758a1 100755 --- a/discoveryengine/apiv1/discoveryenginepb/purge_config.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/purge_config.proto @@ -85,11 +85,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -100,7 +98,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -165,7 +161,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type PurgeUserEventsMetadata struct { func (x *PurgeUserEventsMetadata) Reset() { *x = PurgeUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsMetadata) String() string { @@ -222,7 +216,7 @@ func (*PurgeUserEventsMetadata) ProtoMessage() {} func (x *PurgeUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type PurgeErrorConfig struct { func (x *PurgeErrorConfig) Reset() { *x = PurgeErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeErrorConfig) String() string { @@ -296,7 +288,7 @@ func (*PurgeErrorConfig) ProtoMessage() {} func (x *PurgeErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type PurgeDocumentsRequest struct { func (x *PurgeDocumentsRequest) Reset() { *x = PurgeDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest) String() string { @@ -385,7 +375,7 @@ func (*PurgeDocumentsRequest) ProtoMessage() {} func (x *PurgeDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +479,9 @@ type PurgeDocumentsResponse struct { func (x *PurgeDocumentsResponse) Reset() { *x = PurgeDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsResponse) String() string { @@ -504,7 +492,7 @@ func (*PurgeDocumentsResponse) ProtoMessage() {} func (x *PurgeDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +543,9 @@ type PurgeDocumentsMetadata struct { func (x *PurgeDocumentsMetadata) Reset() { *x = PurgeDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsMetadata) String() string { @@ -570,7 +556,7 @@ func (*PurgeDocumentsMetadata) ProtoMessage() {} func (x *PurgeDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +621,9 @@ type PurgeSuggestionDenyListEntriesRequest struct { func (x *PurgeSuggestionDenyListEntriesRequest) Reset() { *x = PurgeSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesRequest) String() string { @@ -650,7 +634,7 @@ func (*PurgeSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +672,9 @@ type PurgeSuggestionDenyListEntriesResponse struct { func (x *PurgeSuggestionDenyListEntriesResponse) Reset() { *x = PurgeSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesResponse) String() string { @@ -703,7 +685,7 @@ func (*PurgeSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +731,9 @@ type PurgeSuggestionDenyListEntriesMetadata struct { func (x *PurgeSuggestionDenyListEntriesMetadata) Reset() { *x = PurgeSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesMetadata) String() string { @@ -764,7 +744,7 @@ func (*PurgeSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +789,9 @@ type PurgeCompletionSuggestionsRequest struct { func (x *PurgeCompletionSuggestionsRequest) Reset() { *x = PurgeCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsRequest) String() string { @@ -824,7 +802,7 @@ func (*PurgeCompletionSuggestionsRequest) ProtoMessage() {} func (x *PurgeCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +840,9 @@ type PurgeCompletionSuggestionsResponse struct { func (x *PurgeCompletionSuggestionsResponse) Reset() { *x = PurgeCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsResponse) String() string { @@ -877,7 +853,7 @@ func (*PurgeCompletionSuggestionsResponse) ProtoMessage() {} func (x *PurgeCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +899,9 @@ type PurgeCompletionSuggestionsMetadata struct { func (x *PurgeCompletionSuggestionsMetadata) Reset() { *x = PurgeCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsMetadata) String() string { @@ -938,7 +912,7 @@ func (*PurgeCompletionSuggestionsMetadata) ProtoMessage() {} func (x *PurgeCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +958,9 @@ type PurgeDocumentsRequest_InlineSource struct { func (x *PurgeDocumentsRequest_InlineSource) Reset() { *x = PurgeDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest_InlineSource) String() string { @@ -999,7 +971,7 @@ func (*PurgeDocumentsRequest_InlineSource) ProtoMessage() {} func (x *PurgeDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,176 +1231,6 @@ func file_google_cloud_discoveryengine_v1_purge_config_proto_init() { return } file_google_cloud_discoveryengine_v1_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_purge_config_proto_msgTypes[3].OneofWrappers = []any{ (*PurgeErrorConfig_GcsPrefix)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/rank_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/rank_service.pb.go index 06564e4bf20c..e39639dab46e 100755 --- a/discoveryengine/apiv1/discoveryenginepb/rank_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/rank_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/rank_service.proto @@ -67,11 +67,9 @@ type RankingRecord struct { func (x *RankingRecord) Reset() { *x = RankingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankingRecord) String() string { @@ -82,7 +80,7 @@ func (*RankingRecord) ProtoMessage() {} func (x *RankingRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type RankRequest struct { func (x *RankRequest) Reset() { *x = RankRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankRequest) String() string { @@ -189,7 +185,7 @@ func (*RankRequest) ProtoMessage() {} func (x *RankRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +262,9 @@ type RankResponse struct { func (x *RankResponse) Reset() { *x = RankResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankResponse) String() string { @@ -281,7 +275,7 @@ func (*RankResponse) ProtoMessage() {} func (x *RankResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,44 +429,6 @@ func file_google_cloud_discoveryengine_v1_rank_service_proto_init() { if File_google_cloud_discoveryengine_v1_rank_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RankingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RankRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_rank_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RankResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/recommendation_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/recommendation_service.pb.go index e2cc9175f979..0b5b9624ceb6 100755 --- a/discoveryengine/apiv1/discoveryenginepb/recommendation_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/recommendation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/recommendation_service.proto @@ -168,11 +168,9 @@ type RecommendRequest struct { func (x *RecommendRequest) Reset() { *x = RecommendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendRequest) String() string { @@ -183,7 +181,7 @@ func (*RecommendRequest) ProtoMessage() {} func (x *RecommendRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type RecommendResponse struct { func (x *RecommendResponse) Reset() { *x = RecommendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse) String() string { @@ -287,7 +283,7 @@ func (*RecommendResponse) ProtoMessage() {} func (x *RecommendResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type RecommendResponse_RecommendationResult struct { func (x *RecommendResponse_RecommendationResult) Reset() { *x = RecommendResponse_RecommendationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse_RecommendationResult) String() string { @@ -369,7 +363,7 @@ func (*RecommendResponse_RecommendationResult) ProtoMessage() {} func (x *RecommendResponse_RecommendationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,44 +598,6 @@ func file_google_cloud_discoveryengine_v1_recommendation_service_proto_init() { } file_google_cloud_discoveryengine_v1_document_proto_init() file_google_cloud_discoveryengine_v1_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecommendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_recommendation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse_RecommendationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/schema.pb.go b/discoveryengine/apiv1/discoveryenginepb/schema.pb.go index 55dc1bb48553..0f6040400af2 100755 --- a/discoveryengine/apiv1/discoveryenginepb/schema.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/schema.proto @@ -63,11 +63,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -78,7 +76,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,20 +224,6 @@ func file_google_cloud_discoveryengine_v1_schema_proto_init() { if File_google_cloud_discoveryengine_v1_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_schema_proto_msgTypes[0].OneofWrappers = []any{ (*Schema_StructSchema)(nil), (*Schema_JsonSchema)(nil), diff --git a/discoveryengine/apiv1/discoveryenginepb/schema_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/schema_service.pb.go index 5a14eb040526..cdb1ee368a7c 100755 --- a/discoveryengine/apiv1/discoveryenginepb/schema_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/schema_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/schema_service.proto @@ -58,11 +58,9 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSchemaRequest) String() string { @@ -73,7 +71,7 @@ func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type ListSchemasRequest struct { func (x *ListSchemasRequest) Reset() { *x = ListSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasRequest) String() string { @@ -141,7 +137,7 @@ func (*ListSchemasRequest) ProtoMessage() {} func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +192,9 @@ type ListSchemasResponse struct { func (x *ListSchemasResponse) Reset() { *x = ListSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasResponse) String() string { @@ -211,7 +205,7 @@ func (*ListSchemasResponse) ProtoMessage() {} func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +260,9 @@ type CreateSchemaRequest struct { func (x *CreateSchemaRequest) Reset() { *x = CreateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaRequest) String() string { @@ -281,7 +273,7 @@ func (*CreateSchemaRequest) ProtoMessage() {} func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +327,9 @@ type UpdateSchemaRequest struct { func (x *UpdateSchemaRequest) Reset() { *x = UpdateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaRequest) String() string { @@ -350,7 +340,7 @@ func (*UpdateSchemaRequest) ProtoMessage() {} func (x *UpdateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +384,9 @@ type DeleteSchemaRequest struct { func (x *DeleteSchemaRequest) Reset() { *x = DeleteSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaRequest) String() string { @@ -409,7 +397,7 @@ func (*DeleteSchemaRequest) ProtoMessage() {} func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type CreateSchemaMetadata struct { func (x *CreateSchemaMetadata) Reset() { *x = CreateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaMetadata) String() string { @@ -461,7 +447,7 @@ func (*CreateSchemaMetadata) ProtoMessage() {} func (x *CreateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type UpdateSchemaMetadata struct { func (x *UpdateSchemaMetadata) Reset() { *x = UpdateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaMetadata) String() string { @@ -520,7 +504,7 @@ func (*UpdateSchemaMetadata) ProtoMessage() {} func (x *UpdateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +548,9 @@ type DeleteSchemaMetadata struct { func (x *DeleteSchemaMetadata) Reset() { *x = DeleteSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaMetadata) String() string { @@ -579,7 +561,7 @@ func (*DeleteSchemaMetadata) ProtoMessage() {} func (x *DeleteSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,116 +879,6 @@ func file_google_cloud_discoveryengine_v1_schema_service_proto_init() { return } file_google_cloud_discoveryengine_v1_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_schema_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/search_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/search_service.pb.go index 4abd1f65b7ca..791c0b745ad5 100755 --- a/discoveryengine/apiv1/discoveryenginepb/search_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/search_service.proto @@ -718,11 +718,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -733,7 +731,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +985,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1002,7 +998,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,11 +1097,9 @@ type SearchRequest_ImageQuery struct { func (x *SearchRequest_ImageQuery) Reset() { *x = SearchRequest_ImageQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ImageQuery) String() string { @@ -1116,7 +1110,7 @@ func (*SearchRequest_ImageQuery) ProtoMessage() {} func (x *SearchRequest_ImageQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,11 +1171,9 @@ type SearchRequest_DataStoreSpec struct { func (x *SearchRequest_DataStoreSpec) Reset() { *x = SearchRequest_DataStoreSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DataStoreSpec) String() string { @@ -1192,7 +1184,7 @@ func (*SearchRequest_DataStoreSpec) ProtoMessage() {} func (x *SearchRequest_DataStoreSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,11 +1291,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1314,7 +1304,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1372,11 +1362,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1387,7 +1375,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1427,11 +1415,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1442,7 +1428,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1485,11 +1471,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1500,7 +1484,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1550,11 +1534,9 @@ type SearchRequest_ContentSearchSpec struct { func (x *SearchRequest_ContentSearchSpec) Reset() { *x = SearchRequest_ContentSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec) String() string { @@ -1565,7 +1547,7 @@ func (*SearchRequest_ContentSearchSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,11 +1611,9 @@ type SearchRequest_SearchAsYouTypeSpec struct { func (x *SearchRequest_SearchAsYouTypeSpec) Reset() { *x = SearchRequest_SearchAsYouTypeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SearchAsYouTypeSpec) String() string { @@ -1644,7 +1624,7 @@ func (*SearchRequest_SearchAsYouTypeSpec) ProtoMessage() {} func (x *SearchRequest_SearchAsYouTypeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1695,9 @@ type SearchRequest_SessionSpec struct { func (x *SearchRequest_SessionSpec) Reset() { *x = SearchRequest_SessionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SessionSpec) String() string { @@ -1730,7 +1708,7 @@ func (*SearchRequest_SessionSpec) ProtoMessage() {} func (x *SearchRequest_SessionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,11 +1796,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -1833,7 +1809,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1941,11 +1917,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -1956,7 +1930,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1994,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -2035,7 +2007,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoMessage func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,11 +2072,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint st func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -2115,7 +2085,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2169,11 +2139,9 @@ type SearchRequest_ContentSearchSpec_SnippetSpec struct { func (x *SearchRequest_ContentSearchSpec_SnippetSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SnippetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SnippetSpec) String() string { @@ -2184,7 +2152,7 @@ func (*SearchRequest_ContentSearchSpec_SnippetSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SnippetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2320,11 +2288,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec) String() string { @@ -2335,7 +2301,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2476,11 +2442,9 @@ type SearchRequest_ContentSearchSpec_ExtractiveContentSpec struct { func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ExtractiveContentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) String() string { @@ -2491,7 +2455,7 @@ func (*SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2563,11 +2527,9 @@ type SearchRequest_ContentSearchSpec_ChunkSpec struct { func (x *SearchRequest_ContentSearchSpec_ChunkSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ChunkSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ChunkSpec) String() string { @@ -2578,7 +2540,7 @@ func (*SearchRequest_ContentSearchSpec_ChunkSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ChunkSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2620,11 +2582,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) String() string { @@ -2635,7 +2595,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoMessage func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2680,11 +2640,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) String() string { @@ -2695,7 +2653,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2738,11 +2696,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -2753,7 +2709,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2806,11 +2762,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -2821,7 +2775,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2877,11 +2831,9 @@ type SearchResponse_Summary struct { func (x *SearchResponse_Summary) Reset() { *x = SearchResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary) String() string { @@ -2892,7 +2844,7 @@ func (*SearchResponse_Summary) ProtoMessage() {} func (x *SearchResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2953,11 +2905,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -2968,7 +2918,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3019,11 +2969,9 @@ type SearchResponse_SessionInfo struct { func (x *SearchResponse_SessionInfo) Reset() { *x = SearchResponse_SessionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SessionInfo) String() string { @@ -3034,7 +2982,7 @@ func (*SearchResponse_SessionInfo) ProtoMessage() {} func (x *SearchResponse_SessionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3082,11 +3030,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -3097,7 +3043,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3176,11 +3122,9 @@ type SearchResponse_Summary_SafetyAttributes struct { func (x *SearchResponse_Summary_SafetyAttributes) Reset() { *x = SearchResponse_Summary_SafetyAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SafetyAttributes) String() string { @@ -3191,7 +3135,7 @@ func (*SearchResponse_Summary_SafetyAttributes) ProtoMessage() {} func (x *SearchResponse_Summary_SafetyAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3232,11 +3176,9 @@ type SearchResponse_Summary_CitationMetadata struct { func (x *SearchResponse_Summary_CitationMetadata) Reset() { *x = SearchResponse_Summary_CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationMetadata) String() string { @@ -3247,7 +3189,7 @@ func (*SearchResponse_Summary_CitationMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3285,11 +3227,9 @@ type SearchResponse_Summary_Citation struct { func (x *SearchResponse_Summary_Citation) Reset() { *x = SearchResponse_Summary_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Citation) String() string { @@ -3300,7 +3240,7 @@ func (*SearchResponse_Summary_Citation) ProtoMessage() {} func (x *SearchResponse_Summary_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3350,11 +3290,9 @@ type SearchResponse_Summary_CitationSource struct { func (x *SearchResponse_Summary_CitationSource) Reset() { *x = SearchResponse_Summary_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationSource) String() string { @@ -3365,7 +3303,7 @@ func (*SearchResponse_Summary_CitationSource) ProtoMessage() {} func (x *SearchResponse_Summary_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3408,11 +3346,9 @@ type SearchResponse_Summary_Reference struct { func (x *SearchResponse_Summary_Reference) Reset() { *x = SearchResponse_Summary_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference) String() string { @@ -3423,7 +3359,7 @@ func (*SearchResponse_Summary_Reference) ProtoMessage() {} func (x *SearchResponse_Summary_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3482,11 +3418,9 @@ type SearchResponse_Summary_SummaryWithMetadata struct { func (x *SearchResponse_Summary_SummaryWithMetadata) Reset() { *x = SearchResponse_Summary_SummaryWithMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SummaryWithMetadata) String() string { @@ -3497,7 +3431,7 @@ func (*SearchResponse_Summary_SummaryWithMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_SummaryWithMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3547,11 +3481,9 @@ type SearchResponse_Summary_Reference_ChunkContent struct { func (x *SearchResponse_Summary_Reference_ChunkContent) Reset() { *x = SearchResponse_Summary_Reference_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference_ChunkContent) String() string { @@ -3562,7 +3494,7 @@ func (*SearchResponse_Summary_Reference_ChunkContent) ProtoMessage() {} func (x *SearchResponse_Summary_Reference_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4434,416 +4366,6 @@ func file_google_cloud_discoveryengine_v1_search_service_proto_init() { file_google_cloud_discoveryengine_v1_chunk_proto_init() file_google_cloud_discoveryengine_v1_common_proto_init() file_google_cloud_discoveryengine_v1_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ImageQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DataStoreSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SearchAsYouTypeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SessionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SnippetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ExtractiveContentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ChunkSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SessionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SafetyAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SummaryWithMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*SearchRequest_ImageQuery_ImageBytes)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/search_tuning_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/search_tuning_service.pb.go index fc2f86089fc1..4d19d9f613cb 100755 --- a/discoveryengine/apiv1/discoveryenginepb/search_tuning_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/search_tuning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/search_tuning_service.proto @@ -60,11 +60,9 @@ type ListCustomModelsRequest struct { func (x *ListCustomModelsRequest) Reset() { *x = ListCustomModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsRequest) String() string { @@ -75,7 +73,7 @@ func (*ListCustomModelsRequest) ProtoMessage() {} func (x *ListCustomModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type ListCustomModelsResponse struct { func (x *ListCustomModelsResponse) Reset() { *x = ListCustomModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsResponse) String() string { @@ -126,7 +122,7 @@ func (*ListCustomModelsResponse) ProtoMessage() {} func (x *ListCustomModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +175,9 @@ type TrainCustomModelRequest struct { func (x *TrainCustomModelRequest) Reset() { *x = TrainCustomModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest) String() string { @@ -194,7 +188,7 @@ func (*TrainCustomModelRequest) ProtoMessage() {} func (x *TrainCustomModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +286,9 @@ type TrainCustomModelResponse struct { func (x *TrainCustomModelResponse) Reset() { *x = TrainCustomModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelResponse) String() string { @@ -307,7 +299,7 @@ func (*TrainCustomModelResponse) ProtoMessage() {} func (x *TrainCustomModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type TrainCustomModelMetadata struct { func (x *TrainCustomModelMetadata) Reset() { *x = TrainCustomModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelMetadata) String() string { @@ -388,7 +378,7 @@ func (*TrainCustomModelMetadata) ProtoMessage() {} func (x *TrainCustomModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +446,9 @@ type TrainCustomModelRequest_GcsTrainingInput struct { func (x *TrainCustomModelRequest_GcsTrainingInput) Reset() { *x = TrainCustomModelRequest_GcsTrainingInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest_GcsTrainingInput) String() string { @@ -471,7 +459,7 @@ func (*TrainCustomModelRequest_GcsTrainingInput) ProtoMessage() {} func (x *TrainCustomModelRequest_GcsTrainingInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,80 +730,6 @@ func file_google_cloud_discoveryengine_v1_search_tuning_service_proto_init() { } file_google_cloud_discoveryengine_v1_custom_tuning_model_proto_init() file_google_cloud_discoveryengine_v1_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest_GcsTrainingInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_search_tuning_service_proto_msgTypes[2].OneofWrappers = []any{ (*TrainCustomModelRequest_GcsTrainingInput_)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/session.pb.go b/discoveryengine/apiv1/discoveryenginepb/session.pb.go index 9ce927f1bf0e..c765e4973d42 100755 --- a/discoveryengine/apiv1/discoveryenginepb/session.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/session.proto @@ -109,11 +109,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -124,7 +122,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type Query struct { func (x *Query) Reset() { *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Query) String() string { @@ -214,7 +210,7 @@ func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type Session_Turn struct { func (x *Session_Turn) Reset() { *x = Session_Turn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session_Turn) String() string { @@ -294,7 +288,7 @@ func (*Session_Turn) ProtoMessage() {} func (x *Session_Turn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,44 +447,6 @@ func file_google_cloud_discoveryengine_v1_session_proto_init() { if File_google_cloud_discoveryengine_v1_session_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Session_Turn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_session_proto_msgTypes[1].OneofWrappers = []any{ (*Query_Text)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/site_search_engine.pb.go b/discoveryengine/apiv1/discoveryenginepb/site_search_engine.pb.go index cc7979a4d82e..34e3b1d93675 100755 --- a/discoveryengine/apiv1/discoveryenginepb/site_search_engine.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/site_search_engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/site_search_engine.proto @@ -227,11 +227,9 @@ type SiteSearchEngine struct { func (x *SiteSearchEngine) Reset() { *x = SiteSearchEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteSearchEngine) String() string { @@ -242,7 +240,7 @@ func (*SiteSearchEngine) ProtoMessage() {} func (x *SiteSearchEngine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +301,9 @@ type TargetSite struct { func (x *TargetSite) Reset() { *x = TargetSite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite) String() string { @@ -318,7 +314,7 @@ func (*TargetSite) ProtoMessage() {} func (x *TargetSite) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +413,9 @@ type SiteVerificationInfo struct { func (x *SiteVerificationInfo) Reset() { *x = SiteVerificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteVerificationInfo) String() string { @@ -432,7 +426,7 @@ func (*SiteVerificationInfo) ProtoMessage() {} func (x *SiteVerificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +471,9 @@ type TargetSite_FailureReason struct { func (x *TargetSite_FailureReason) Reset() { *x = TargetSite_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason) String() string { @@ -492,7 +484,7 @@ func (*TargetSite_FailureReason) ProtoMessage() {} func (x *TargetSite_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +537,9 @@ type TargetSite_FailureReason_QuotaFailure struct { func (x *TargetSite_FailureReason_QuotaFailure) Reset() { *x = TargetSite_FailureReason_QuotaFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason_QuotaFailure) String() string { @@ -560,7 +550,7 @@ func (*TargetSite_FailureReason_QuotaFailure) ProtoMessage() {} func (x *TargetSite_FailureReason_QuotaFailure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,68 +775,6 @@ func file_google_cloud_discoveryengine_v1_site_search_engine_proto_init() { if File_google_cloud_discoveryengine_v1_site_search_engine_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SiteSearchEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SiteVerificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason_QuotaFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_site_search_engine_proto_msgTypes[3].OneofWrappers = []any{ (*TargetSite_FailureReason_QuotaFailure_)(nil), } diff --git a/discoveryengine/apiv1/discoveryenginepb/site_search_engine_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/site_search_engine_service.pb.go index aa8fa84dee44..5896cf463579 100755 --- a/discoveryengine/apiv1/discoveryenginepb/site_search_engine_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/site_search_engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto @@ -117,11 +117,9 @@ type GetSiteSearchEngineRequest struct { func (x *GetSiteSearchEngineRequest) Reset() { *x = GetSiteSearchEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSiteSearchEngineRequest) String() string { @@ -132,7 +130,7 @@ func (*GetSiteSearchEngineRequest) ProtoMessage() {} func (x *GetSiteSearchEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type CreateTargetSiteRequest struct { func (x *CreateTargetSiteRequest) Reset() { *x = CreateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteRequest) String() string { @@ -188,7 +184,7 @@ func (*CreateTargetSiteRequest) ProtoMessage() {} func (x *CreateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +231,9 @@ type CreateTargetSiteMetadata struct { func (x *CreateTargetSiteMetadata) Reset() { *x = CreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteMetadata) String() string { @@ -250,7 +244,7 @@ func (*CreateTargetSiteMetadata) ProtoMessage() {} func (x *CreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +293,9 @@ type BatchCreateTargetSitesRequest struct { func (x *BatchCreateTargetSitesRequest) Reset() { *x = BatchCreateTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesRequest) String() string { @@ -314,7 +306,7 @@ func (*BatchCreateTargetSitesRequest) ProtoMessage() {} func (x *BatchCreateTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +358,9 @@ type GetTargetSiteRequest struct { func (x *GetTargetSiteRequest) Reset() { *x = GetTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetSiteRequest) String() string { @@ -381,7 +371,7 @@ func (*GetTargetSiteRequest) ProtoMessage() {} func (x *GetTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +413,9 @@ type UpdateTargetSiteRequest struct { func (x *UpdateTargetSiteRequest) Reset() { *x = UpdateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteRequest) String() string { @@ -438,7 +426,7 @@ func (*UpdateTargetSiteRequest) ProtoMessage() {} func (x *UpdateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +466,9 @@ type UpdateTargetSiteMetadata struct { func (x *UpdateTargetSiteMetadata) Reset() { *x = UpdateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteMetadata) String() string { @@ -493,7 +479,7 @@ func (*UpdateTargetSiteMetadata) ProtoMessage() {} func (x *UpdateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +531,9 @@ type DeleteTargetSiteRequest struct { func (x *DeleteTargetSiteRequest) Reset() { *x = DeleteTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteRequest) String() string { @@ -560,7 +544,7 @@ func (*DeleteTargetSiteRequest) ProtoMessage() {} func (x *DeleteTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +584,9 @@ type DeleteTargetSiteMetadata struct { func (x *DeleteTargetSiteMetadata) Reset() { *x = DeleteTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteMetadata) String() string { @@ -615,7 +597,7 @@ func (*DeleteTargetSiteMetadata) ProtoMessage() {} func (x *DeleteTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +658,9 @@ type ListTargetSitesRequest struct { func (x *ListTargetSitesRequest) Reset() { *x = ListTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesRequest) String() string { @@ -691,7 +671,7 @@ func (*ListTargetSitesRequest) ProtoMessage() {} func (x *ListTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +727,9 @@ type ListTargetSitesResponse struct { func (x *ListTargetSitesResponse) Reset() { *x = ListTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesResponse) String() string { @@ -762,7 +740,7 @@ func (*ListTargetSitesResponse) ProtoMessage() {} func (x *ListTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +794,9 @@ type BatchCreateTargetSiteMetadata struct { func (x *BatchCreateTargetSiteMetadata) Reset() { *x = BatchCreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSiteMetadata) String() string { @@ -831,7 +807,7 @@ func (*BatchCreateTargetSiteMetadata) ProtoMessage() {} func (x *BatchCreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +850,9 @@ type BatchCreateTargetSitesResponse struct { func (x *BatchCreateTargetSitesResponse) Reset() { *x = BatchCreateTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesResponse) String() string { @@ -889,7 +863,7 @@ func (*BatchCreateTargetSitesResponse) ProtoMessage() {} func (x *BatchCreateTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +902,9 @@ type EnableAdvancedSiteSearchRequest struct { func (x *EnableAdvancedSiteSearchRequest) Reset() { *x = EnableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchRequest) String() string { @@ -943,7 +915,7 @@ func (*EnableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *EnableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +948,9 @@ type EnableAdvancedSiteSearchResponse struct { func (x *EnableAdvancedSiteSearchResponse) Reset() { *x = EnableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchResponse) String() string { @@ -991,7 +961,7 @@ func (*EnableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *EnableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +994,9 @@ type EnableAdvancedSiteSearchMetadata struct { func (x *EnableAdvancedSiteSearchMetadata) Reset() { *x = EnableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchMetadata) String() string { @@ -1039,7 +1007,7 @@ func (*EnableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *EnableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1053,9 @@ type DisableAdvancedSiteSearchRequest struct { func (x *DisableAdvancedSiteSearchRequest) Reset() { *x = DisableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchRequest) String() string { @@ -1100,7 +1066,7 @@ func (*DisableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *DisableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1099,9 @@ type DisableAdvancedSiteSearchResponse struct { func (x *DisableAdvancedSiteSearchResponse) Reset() { *x = DisableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchResponse) String() string { @@ -1148,7 +1112,7 @@ func (*DisableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *DisableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1181,11 +1145,9 @@ type DisableAdvancedSiteSearchMetadata struct { func (x *DisableAdvancedSiteSearchMetadata) Reset() { *x = DisableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchMetadata) String() string { @@ -1196,7 +1158,7 @@ func (*DisableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *DisableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1212,9 @@ type RecrawlUrisRequest struct { func (x *RecrawlUrisRequest) Reset() { *x = RecrawlUrisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisRequest) String() string { @@ -1265,7 +1225,7 @@ func (*RecrawlUrisRequest) ProtoMessage() {} func (x *RecrawlUrisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1277,9 @@ type RecrawlUrisResponse struct { func (x *RecrawlUrisResponse) Reset() { *x = RecrawlUrisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse) String() string { @@ -1332,7 +1290,7 @@ func (*RecrawlUrisResponse) ProtoMessage() {} func (x *RecrawlUrisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1392,11 +1350,9 @@ type RecrawlUrisMetadata struct { func (x *RecrawlUrisMetadata) Reset() { *x = RecrawlUrisMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisMetadata) String() string { @@ -1407,7 +1363,7 @@ func (*RecrawlUrisMetadata) ProtoMessage() {} func (x *RecrawlUrisMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1486,11 +1442,9 @@ type BatchVerifyTargetSitesRequest struct { func (x *BatchVerifyTargetSitesRequest) Reset() { *x = BatchVerifyTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesRequest) String() string { @@ -1501,7 +1455,7 @@ func (*BatchVerifyTargetSitesRequest) ProtoMessage() {} func (x *BatchVerifyTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1488,9 @@ type BatchVerifyTargetSitesResponse struct { func (x *BatchVerifyTargetSitesResponse) Reset() { *x = BatchVerifyTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesResponse) String() string { @@ -1549,7 +1501,7 @@ func (*BatchVerifyTargetSitesResponse) ProtoMessage() {} func (x *BatchVerifyTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1534,9 @@ type BatchVerifyTargetSitesMetadata struct { func (x *BatchVerifyTargetSitesMetadata) Reset() { *x = BatchVerifyTargetSitesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesMetadata) String() string { @@ -1597,7 +1547,7 @@ func (*BatchVerifyTargetSitesMetadata) ProtoMessage() {} func (x *BatchVerifyTargetSitesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1655,11 +1605,9 @@ type FetchDomainVerificationStatusRequest struct { func (x *FetchDomainVerificationStatusRequest) Reset() { *x = FetchDomainVerificationStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusRequest) String() string { @@ -1670,7 +1618,7 @@ func (*FetchDomainVerificationStatusRequest) ProtoMessage() {} func (x *FetchDomainVerificationStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1726,11 +1674,9 @@ type FetchDomainVerificationStatusResponse struct { func (x *FetchDomainVerificationStatusResponse) Reset() { *x = FetchDomainVerificationStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusResponse) String() string { @@ -1741,7 +1687,7 @@ func (*FetchDomainVerificationStatusResponse) ProtoMessage() {} func (x *FetchDomainVerificationStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1738,9 @@ type RecrawlUrisResponse_FailureInfo struct { func (x *RecrawlUrisResponse_FailureInfo) Reset() { *x = RecrawlUrisResponse_FailureInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo) String() string { @@ -1807,7 +1751,7 @@ func (*RecrawlUrisResponse_FailureInfo) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1851,11 +1795,9 @@ type RecrawlUrisResponse_FailureInfo_FailureReason struct { func (x *RecrawlUrisResponse_FailureInfo_FailureReason) Reset() { *x = RecrawlUrisResponse_FailureInfo_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo_FailureReason) String() string { @@ -1866,7 +1808,7 @@ func (*RecrawlUrisResponse_FailureInfo_FailureReason) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2634,356 +2576,6 @@ func file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_init( return } file_google_cloud_discoveryengine_v1_site_search_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSiteSearchEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_site_search_engine_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1/discoveryenginepb/user_event.pb.go b/discoveryengine/apiv1/discoveryenginepb/user_event.pb.go index b5a389b5dac6..9aedc604bd15 100755 --- a/discoveryengine/apiv1/discoveryenginepb/user_event.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/user_event.proto @@ -250,11 +250,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -265,7 +263,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +464,9 @@ type PageInfo struct { func (x *PageInfo) Reset() { *x = PageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo) String() string { @@ -481,7 +477,7 @@ func (*PageInfo) ProtoMessage() {} func (x *PageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +569,9 @@ type SearchInfo struct { func (x *SearchInfo) Reset() { *x = SearchInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchInfo) String() string { @@ -588,7 +582,7 @@ func (*SearchInfo) ProtoMessage() {} func (x *SearchInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +636,9 @@ type CompletionInfo struct { func (x *CompletionInfo) Reset() { *x = CompletionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionInfo) String() string { @@ -657,7 +649,7 @@ func (*CompletionInfo) ProtoMessage() {} func (x *CompletionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +727,9 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionInfo) String() string { @@ -750,7 +740,7 @@ func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +842,9 @@ type DocumentInfo struct { func (x *DocumentInfo) Reset() { *x = DocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInfo) String() string { @@ -867,7 +855,7 @@ func (*DocumentInfo) ProtoMessage() {} func (x *DocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -983,11 +971,9 @@ type PanelInfo struct { func (x *PanelInfo) Reset() { *x = PanelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PanelInfo) String() string { @@ -998,7 +984,7 @@ func (*PanelInfo) ProtoMessage() {} func (x *PanelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1066,11 +1052,9 @@ type MediaInfo struct { func (x *MediaInfo) Reset() { *x = MediaInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaInfo) String() string { @@ -1081,7 +1065,7 @@ func (*MediaInfo) ProtoMessage() {} func (x *MediaInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1365,104 +1349,6 @@ func file_google_cloud_discoveryengine_v1_user_event_proto_init() { return } file_google_cloud_discoveryengine_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PanelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MediaInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[2].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[4].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_user_event_proto_msgTypes[5].OneofWrappers = []any{ diff --git a/discoveryengine/apiv1/discoveryenginepb/user_event_service.pb.go b/discoveryengine/apiv1/discoveryenginepb/user_event_service.pb.go index 7c16a56d755a..500e911f30e3 100755 --- a/discoveryengine/apiv1/discoveryenginepb/user_event_service.pb.go +++ b/discoveryengine/apiv1/discoveryenginepb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1/user_event_service.proto @@ -68,11 +68,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -83,7 +81,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -159,7 +155,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,32 +420,6 @@ func file_google_cloud_discoveryengine_v1_user_event_service_proto_init() { file_google_cloud_discoveryengine_v1_import_config_proto_init() file_google_cloud_discoveryengine_v1_purge_config_proto_init() file_google_cloud_discoveryengine_v1_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1_user_event_service_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} diff --git a/discoveryengine/apiv1/document_client.go b/discoveryengine/apiv1/document_client.go index 6b55f78b03f3..75c92cac4c09 100755 --- a/discoveryengine/apiv1/document_client.go +++ b/discoveryengine/apiv1/document_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -511,6 +510,8 @@ type documentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentClient creates a new document service client based on gRPC. @@ -538,6 +539,7 @@ func NewDocumentClient(ctx context.Context, opts ...option.ClientOption) (*Docum connPool: connPool, documentClient: discoveryenginepb.NewDocumentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -601,6 +603,8 @@ type documentRESTClient struct { // Points back to the CallOptions field of the containing DocumentClient CallOptions **DocumentCallOptions + + logger *slog.Logger } // NewDocumentRESTClient creates a new document service rest client. @@ -619,6 +623,7 @@ func NewDocumentRESTClient(ctx context.Context, opts ...option.ClientOption) (*D endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -681,7 +686,7 @@ func (c *documentGRPCClient) GetDocument(ctx context.Context, req *discoveryengi var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *documentGRPCClient) ListDocuments(ctx context.Context, req *discoveryen } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *documentGRPCClient) CreateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *documentGRPCClient) UpdateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *documentGRPCClient) DeleteDocument(ctx context.Context, req *discoverye opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.documentClient.DeleteDocument(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.documentClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) return err @@ -795,7 +800,7 @@ func (c *documentGRPCClient) ImportDocuments(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -815,7 +820,7 @@ func (c *documentGRPCClient) PurgeDocuments(ctx context.Context, req *discoverye var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.PurgeDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.PurgeDocuments, req, settings.GRPC, c.logger, "PurgeDocuments") return err }, opts...) if err != nil { @@ -835,7 +840,7 @@ func (c *documentGRPCClient) BatchGetDocumentsMetadata(ctx context.Context, req var resp *discoveryenginepb.BatchGetDocumentsMetadataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.BatchGetDocumentsMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.BatchGetDocumentsMetadata, req, settings.GRPC, c.logger, "BatchGetDocumentsMetadata") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *documentGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -867,7 +872,7 @@ func (c *documentGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *documentGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -955,17 +960,7 @@ func (c *documentRESTClient) GetDocument(ctx context.Context, req *discoveryengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1027,21 +1022,10 @@ func (c *documentRESTClient) ListDocuments(ctx context.Context, req *discoveryen } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1112,17 +1096,7 @@ func (c *documentRESTClient) CreateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } @@ -1189,17 +1163,7 @@ func (c *documentRESTClient) UpdateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } @@ -1246,15 +1210,8 @@ func (c *documentRESTClient) DeleteDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") + return err }, opts...) } @@ -1302,21 +1259,10 @@ func (c *documentRESTClient) ImportDocuments(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1387,21 +1333,10 @@ func (c *documentRESTClient) PurgeDocuments(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1464,17 +1399,7 @@ func (c *documentRESTClient) BatchGetDocumentsMetadata(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetDocumentsMetadata") if err != nil { return err } @@ -1527,15 +1452,8 @@ func (c *documentRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1572,17 +1490,7 @@ func (c *documentRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1647,21 +1555,10 @@ func (c *documentRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/document_client_example_go123_test.go b/discoveryengine/apiv1/document_client_example_go123_test.go index 99cafd40d986..bc739181c6ab 100644 --- a/discoveryengine/apiv1/document_client_example_go123_test.go +++ b/discoveryengine/apiv1/document_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDocumentClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDocumentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/engine_client.go b/discoveryengine/apiv1/engine_client.go index af1f4aa0db02..686d3d948a64 100755 --- a/discoveryengine/apiv1/engine_client.go +++ b/discoveryengine/apiv1/engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -294,6 +293,8 @@ type engineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEngineClient creates a new engine service client based on gRPC. @@ -321,6 +322,7 @@ func NewEngineClient(ctx context.Context, opts ...option.ClientOption) (*EngineC connPool: connPool, engineClient: discoveryenginepb.NewEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -384,6 +386,8 @@ type engineRESTClient struct { // Points back to the CallOptions field of the containing EngineClient CallOptions **EngineCallOptions + + logger *slog.Logger } // NewEngineRESTClient creates a new engine service rest client. @@ -402,6 +406,7 @@ func NewEngineRESTClient(ctx context.Context, opts ...option.ClientOption) (*Eng endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -464,7 +469,7 @@ func (c *engineGRPCClient) CreateEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.CreateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.CreateEngine, req, settings.GRPC, c.logger, "CreateEngine") return err }, opts...) if err != nil { @@ -484,7 +489,7 @@ func (c *engineGRPCClient) DeleteEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.DeleteEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.DeleteEngine, req, settings.GRPC, c.logger, "DeleteEngine") return err }, opts...) if err != nil { @@ -504,7 +509,7 @@ func (c *engineGRPCClient) UpdateEngine(ctx context.Context, req *discoveryengin var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.UpdateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.UpdateEngine, req, settings.GRPC, c.logger, "UpdateEngine") return err }, opts...) if err != nil { @@ -522,7 +527,7 @@ func (c *engineGRPCClient) GetEngine(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.GetEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.GetEngine, req, settings.GRPC, c.logger, "GetEngine") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *engineGRPCClient) ListEngines(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.ListEngines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.ListEngines, req, settings.GRPC, c.logger, "ListEngines") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *engineGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -600,7 +605,7 @@ func (c *engineGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *engineGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -695,21 +700,10 @@ func (c *engineRESTClient) CreateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -759,21 +753,10 @@ func (c *engineRESTClient) DeleteEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEngine") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -838,17 +821,7 @@ func (c *engineRESTClient) UpdateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEngine") if err != nil { return err } @@ -898,17 +871,7 @@ func (c *engineRESTClient) GetEngine(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEngine") if err != nil { return err } @@ -974,21 +937,10 @@ func (c *engineRESTClient) ListEngines(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEngines") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1054,15 +1006,8 @@ func (c *engineRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1099,17 +1044,7 @@ func (c *engineRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1174,21 +1109,10 @@ func (c *engineRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/engine_client_example_go123_test.go b/discoveryengine/apiv1/engine_client_example_go123_test.go index 6602166f528d..827554776346 100644 --- a/discoveryengine/apiv1/engine_client_example_go123_test.go +++ b/discoveryengine/apiv1/engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEngineClient_ListEngines_all() { } for resp, err := range c.ListEngines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/grounded_generation_client.go b/discoveryengine/apiv1/grounded_generation_client.go index fdb7e8821491..589fb1123b11 100755 --- a/discoveryengine/apiv1/grounded_generation_client.go +++ b/discoveryengine/apiv1/grounded_generation_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -313,6 +312,8 @@ type groundedGenerationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGroundedGenerationClient creates a new grounded generation service client based on gRPC. @@ -339,6 +340,7 @@ func NewGroundedGenerationClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, groundedGenerationClient: discoveryenginepb.NewGroundedGenerationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -386,6 +388,8 @@ type groundedGenerationRESTClient struct { // Points back to the CallOptions field of the containing GroundedGenerationClient CallOptions **GroundedGenerationCallOptions + + logger *slog.Logger } // NewGroundedGenerationRESTClient creates a new grounded generation service rest client. @@ -403,6 +407,7 @@ func NewGroundedGenerationRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -452,7 +457,9 @@ func (c *groundedGenerationGRPCClient) StreamGenerateGroundedContent(ctx context opts = append((*c.CallOptions).StreamGenerateGroundedContent[0:len((*c.CallOptions).StreamGenerateGroundedContent):len((*c.CallOptions).StreamGenerateGroundedContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateGroundedContent") resp, err = c.groundedGenerationClient.StreamGenerateGroundedContent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateGroundedContent") return err }, opts...) if err != nil { @@ -470,7 +477,7 @@ func (c *groundedGenerationGRPCClient) GenerateGroundedContent(ctx context.Conte var resp *discoveryenginepb.GenerateGroundedContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groundedGenerationClient.GenerateGroundedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groundedGenerationClient.GenerateGroundedContent, req, settings.GRPC, c.logger, "GenerateGroundedContent") return err }, opts...) if err != nil { @@ -488,7 +495,7 @@ func (c *groundedGenerationGRPCClient) CheckGrounding(ctx context.Context, req * var resp *discoveryenginepb.CheckGroundingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groundedGenerationClient.CheckGrounding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groundedGenerationClient.CheckGrounding, req, settings.GRPC, c.logger, "CheckGrounding") return err }, opts...) if err != nil { @@ -505,7 +512,7 @@ func (c *groundedGenerationGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -520,7 +527,7 @@ func (c *groundedGenerationGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -549,7 +556,7 @@ func (c *groundedGenerationGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -621,17 +628,7 @@ func (c *groundedGenerationRESTClient) GenerateGroundedContent(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateGroundedContent") if err != nil { return err } @@ -687,17 +684,7 @@ func (c *groundedGenerationRESTClient) CheckGrounding(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckGrounding") if err != nil { return err } @@ -750,15 +737,8 @@ func (c *groundedGenerationRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -795,17 +775,7 @@ func (c *groundedGenerationRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -870,21 +840,10 @@ func (c *groundedGenerationRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/grounded_generation_client_example_go123_test.go b/discoveryengine/apiv1/grounded_generation_client_example_go123_test.go index e230663a09f3..4009419e4da7 100644 --- a/discoveryengine/apiv1/grounded_generation_client_example_go123_test.go +++ b/discoveryengine/apiv1/grounded_generation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGroundedGenerationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/helpers.go b/discoveryengine/apiv1/helpers.go index 92697c843781..bbd882c8f9de 100755 --- a/discoveryengine/apiv1/helpers.go +++ b/discoveryengine/apiv1/helpers.go @@ -18,10 +18,20 @@ package discoveryengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "discoveryengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/discoveryengine/apiv1/project_client.go b/discoveryengine/apiv1/project_client.go index 3e3a9383808a..293f12e075bc 100755 --- a/discoveryengine/apiv1/project_client.go +++ b/discoveryengine/apiv1/project_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -276,6 +275,8 @@ type projectGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectClient creates a new project service client based on gRPC. @@ -303,6 +304,7 @@ func NewProjectClient(ctx context.Context, opts ...option.ClientOption) (*Projec connPool: connPool, projectClient: discoveryenginepb.NewProjectServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -366,6 +368,8 @@ type projectRESTClient struct { // Points back to the CallOptions field of the containing ProjectClient CallOptions **ProjectCallOptions + + logger *slog.Logger } // NewProjectRESTClient creates a new project service rest client. @@ -384,6 +388,7 @@ func NewProjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -446,7 +451,7 @@ func (c *projectGRPCClient) ProvisionProject(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.ProvisionProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.ProvisionProject, req, settings.GRPC, c.logger, "ProvisionProject") return err }, opts...) if err != nil { @@ -465,7 +470,7 @@ func (c *projectGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -480,7 +485,7 @@ func (c *projectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -509,7 +514,7 @@ func (c *projectGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -578,21 +583,10 @@ func (c *projectRESTClient) ProvisionProject(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -646,15 +640,8 @@ func (c *projectRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -691,17 +678,7 @@ func (c *projectRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -766,21 +743,10 @@ func (c *projectRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/project_client_example_go123_test.go b/discoveryengine/apiv1/project_client_example_go123_test.go index 0042fcfaac08..892de0fbf5e9 100644 --- a/discoveryengine/apiv1/project_client_example_go123_test.go +++ b/discoveryengine/apiv1/project_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/rank_client.go b/discoveryengine/apiv1/rank_client.go index 9e77f322d0e8..1ce6b83c3c31 100755 --- a/discoveryengine/apiv1/rank_client.go +++ b/discoveryengine/apiv1/rank_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type rankGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRankClient creates a new rank service client based on gRPC. @@ -277,6 +278,7 @@ func NewRankClient(ctx context.Context, opts ...option.ClientOption) (*RankClien connPool: connPool, rankClient: discoveryenginepb.NewRankServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type rankRESTClient struct { // Points back to the CallOptions field of the containing RankClient CallOptions **RankCallOptions + + logger *slog.Logger } // NewRankRESTClient creates a new rank service rest client. @@ -341,6 +345,7 @@ func NewRankRESTClient(ctx context.Context, opts ...option.ClientOption) (*RankC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *rankGRPCClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe var resp *discoveryenginepb.RankResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.rankClient.Rank(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.rankClient.Rank, req, settings.GRPC, c.logger, "Rank") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *rankGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *rankGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *rankGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *rankRESTClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Rank") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *rankRESTClient) CancelOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *rankRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *rankRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/rank_client_example_go123_test.go b/discoveryengine/apiv1/rank_client_example_go123_test.go index 0323820848ec..899b5eb6c5c9 100644 --- a/discoveryengine/apiv1/rank_client_example_go123_test.go +++ b/discoveryengine/apiv1/rank_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRankClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/recommendation_client.go b/discoveryengine/apiv1/recommendation_client.go index 9a8e8b60faaf..3feecce3c0ad 100755 --- a/discoveryengine/apiv1/recommendation_client.go +++ b/discoveryengine/apiv1/recommendation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type recommendationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRecommendationClient creates a new recommendation service client based on gRPC. @@ -277,6 +278,7 @@ func NewRecommendationClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, recommendationClient: discoveryenginepb.NewRecommendationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type recommendationRESTClient struct { // Points back to the CallOptions field of the containing RecommendationClient CallOptions **RecommendationCallOptions + + logger *slog.Logger } // NewRecommendationRESTClient creates a new recommendation service rest client. @@ -341,6 +345,7 @@ func NewRecommendationRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *recommendationGRPCClient) Recommend(ctx context.Context, req *discovery var resp *discoveryenginepb.RecommendResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.recommendationClient.Recommend(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.recommendationClient.Recommend, req, settings.GRPC, c.logger, "Recommend") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *recommendationGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *recommendationGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *recommendationGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *recommendationRESTClient) Recommend(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recommend") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *recommendationRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *recommendationRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *recommendationRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/recommendation_client_example_go123_test.go b/discoveryengine/apiv1/recommendation_client_example_go123_test.go index 5e15f132dd07..fc4d1cc7697f 100644 --- a/discoveryengine/apiv1/recommendation_client_example_go123_test.go +++ b/discoveryengine/apiv1/recommendation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRecommendationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/schema_client.go b/discoveryengine/apiv1/schema_client.go index 040edfdf204d..b3d2e73d8de2 100755 --- a/discoveryengine/apiv1/schema_client.go +++ b/discoveryengine/apiv1/schema_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -404,6 +403,8 @@ type schemaGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSchemaClient creates a new schema service client based on gRPC. @@ -430,6 +431,7 @@ func NewSchemaClient(ctx context.Context, opts ...option.ClientOption) (*SchemaC connPool: connPool, schemaClient: discoveryenginepb.NewSchemaServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -493,6 +495,8 @@ type schemaRESTClient struct { // Points back to the CallOptions field of the containing SchemaClient CallOptions **SchemaCallOptions + + logger *slog.Logger } // NewSchemaRESTClient creates a new schema service rest client. @@ -510,6 +514,7 @@ func NewSchemaRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sch endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -572,7 +577,7 @@ func (c *schemaGRPCClient) GetSchema(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.GetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.GetSchema, req, settings.GRPC, c.logger, "GetSchema") return err }, opts...) if err != nil { @@ -601,7 +606,7 @@ func (c *schemaGRPCClient) ListSchemas(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ListSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ListSchemas, req, settings.GRPC, c.logger, "ListSchemas") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *schemaGRPCClient) CreateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.CreateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.CreateSchema, req, settings.GRPC, c.logger, "CreateSchema") return err }, opts...) if err != nil { @@ -656,7 +661,7 @@ func (c *schemaGRPCClient) UpdateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.UpdateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.UpdateSchema, req, settings.GRPC, c.logger, "UpdateSchema") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *schemaGRPCClient) DeleteSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.DeleteSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.DeleteSchema, req, settings.GRPC, c.logger, "DeleteSchema") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *schemaGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -710,7 +715,7 @@ func (c *schemaGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *schemaGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -798,17 +803,7 @@ func (c *schemaRESTClient) GetSchema(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSchema") if err != nil { return err } @@ -870,21 +865,10 @@ func (c *schemaRESTClient) ListSchemas(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -954,21 +938,10 @@ func (c *schemaRESTClient) CreateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSchema") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1028,21 +1001,10 @@ func (c *schemaRESTClient) UpdateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1092,21 +1054,10 @@ func (c *schemaRESTClient) DeleteSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,15 +1111,8 @@ func (c *schemaRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1205,17 +1149,7 @@ func (c *schemaRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1280,21 +1214,10 @@ func (c *schemaRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/schema_client_example_go123_test.go b/discoveryengine/apiv1/schema_client_example_go123_test.go index 416e99a7278e..07ebaf236e31 100644 --- a/discoveryengine/apiv1/schema_client_example_go123_test.go +++ b/discoveryengine/apiv1/schema_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSchemaClient_ListSchemas_all() { } for resp, err := range c.ListSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSchemaClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/search_client.go b/discoveryengine/apiv1/search_client.go index 24e5c179e39a..3f20017839fc 100755 --- a/discoveryengine/apiv1/search_client.go +++ b/discoveryengine/apiv1/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -293,6 +292,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -319,6 +320,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: discoveryenginepb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -366,6 +368,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -383,6 +387,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -446,7 +451,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *discoveryenginepb.Se } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -492,7 +497,7 @@ func (c *searchGRPCClient) SearchLite(ctx context.Context, req *discoveryenginep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.SearchLite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.SearchLite, req, settings.GRPC, c.logger, "SearchLite") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *searchGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -541,7 +546,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -570,7 +575,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -641,21 +646,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *discoveryenginepb.Se } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -742,21 +736,10 @@ func (c *searchRESTClient) SearchLite(ctx context.Context, req *discoveryenginep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchLite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -822,15 +805,8 @@ func (c *searchRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -867,17 +843,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -942,21 +908,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/search_client_example_go123_test.go b/discoveryengine/apiv1/search_client_example_go123_test.go index 458cfffd9ac6..f085fd48aef8 100644 --- a/discoveryengine/apiv1/search_client_example_go123_test.go +++ b/discoveryengine/apiv1/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_SearchLite_all() { } for resp, err := range c.SearchLite(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/search_tuning_client.go b/discoveryengine/apiv1/search_tuning_client.go index 3723be783bc9..648497cdbfe7 100755 --- a/discoveryengine/apiv1/search_tuning_client.go +++ b/discoveryengine/apiv1/search_tuning_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -258,6 +257,8 @@ type searchTuningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchTuningClient creates a new search tuning service client based on gRPC. @@ -284,6 +285,7 @@ func NewSearchTuningClient(ctx context.Context, opts ...option.ClientOption) (*S connPool: connPool, searchTuningClient: discoveryenginepb.NewSearchTuningServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -347,6 +349,8 @@ type searchTuningRESTClient struct { // Points back to the CallOptions field of the containing SearchTuningClient CallOptions **SearchTuningCallOptions + + logger *slog.Logger } // NewSearchTuningRESTClient creates a new search tuning service rest client. @@ -364,6 +368,7 @@ func NewSearchTuningRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -426,7 +431,7 @@ func (c *searchTuningGRPCClient) TrainCustomModel(ctx context.Context, req *disc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.TrainCustomModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.TrainCustomModel, req, settings.GRPC, c.logger, "TrainCustomModel") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *searchTuningGRPCClient) ListCustomModels(ctx context.Context, req *disc var resp *discoveryenginepb.ListCustomModelsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.ListCustomModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.ListCustomModels, req, settings.GRPC, c.logger, "ListCustomModels") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *searchTuningGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -478,7 +483,7 @@ func (c *searchTuningGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *searchTuningGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -571,21 +576,10 @@ func (c *searchTuningRESTClient) TrainCustomModel(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainCustomModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -636,17 +630,7 @@ func (c *searchTuningRESTClient) ListCustomModels(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomModels") if err != nil { return err } @@ -699,15 +683,8 @@ func (c *searchTuningRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -744,17 +721,7 @@ func (c *searchTuningRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -819,21 +786,10 @@ func (c *searchTuningRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/search_tuning_client_example_go123_test.go b/discoveryengine/apiv1/search_tuning_client_example_go123_test.go index 05ac2efb3ce9..58a0224ba053 100644 --- a/discoveryengine/apiv1/search_tuning_client_example_go123_test.go +++ b/discoveryengine/apiv1/search_tuning_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSearchTuningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/site_search_engine_client.go b/discoveryengine/apiv1/site_search_engine_client.go index 3a25a6c2cc6f..1e755ce52bf4 100755 --- a/discoveryengine/apiv1/site_search_engine_client.go +++ b/discoveryengine/apiv1/site_search_engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -403,6 +402,8 @@ type siteSearchEngineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSiteSearchEngineClient creates a new site search engine service client based on gRPC. @@ -429,6 +430,7 @@ func NewSiteSearchEngineClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, siteSearchEngineClient: discoveryenginepb.NewSiteSearchEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -492,6 +494,8 @@ type siteSearchEngineRESTClient struct { // Points back to the CallOptions field of the containing SiteSearchEngineClient CallOptions **SiteSearchEngineCallOptions + + logger *slog.Logger } // NewSiteSearchEngineRESTClient creates a new site search engine service rest client. @@ -509,6 +513,7 @@ func NewSiteSearchEngineRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -571,7 +576,7 @@ func (c *siteSearchEngineGRPCClient) GetSiteSearchEngine(ctx context.Context, re var resp *discoveryenginepb.SiteSearchEngine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetSiteSearchEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetSiteSearchEngine, req, settings.GRPC, c.logger, "GetSiteSearchEngine") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *siteSearchEngineGRPCClient) CreateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.CreateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.CreateTargetSite, req, settings.GRPC, c.logger, "CreateTargetSite") return err }, opts...) if err != nil { @@ -609,7 +614,7 @@ func (c *siteSearchEngineGRPCClient) BatchCreateTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchCreateTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchCreateTargetSites, req, settings.GRPC, c.logger, "BatchCreateTargetSites") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *siteSearchEngineGRPCClient) GetTargetSite(ctx context.Context, req *dis var resp *discoveryenginepb.TargetSite err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetTargetSite, req, settings.GRPC, c.logger, "GetTargetSite") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *siteSearchEngineGRPCClient) UpdateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.UpdateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.UpdateTargetSite, req, settings.GRPC, c.logger, "UpdateTargetSite") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *siteSearchEngineGRPCClient) DeleteTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DeleteTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DeleteTargetSite, req, settings.GRPC, c.logger, "DeleteTargetSite") return err }, opts...) if err != nil { @@ -698,7 +703,7 @@ func (c *siteSearchEngineGRPCClient) ListTargetSites(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.ListTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.ListTargetSites, req, settings.GRPC, c.logger, "ListTargetSites") return err }, opts...) if err != nil { @@ -733,7 +738,7 @@ func (c *siteSearchEngineGRPCClient) EnableAdvancedSiteSearch(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.EnableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.EnableAdvancedSiteSearch, req, settings.GRPC, c.logger, "EnableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *siteSearchEngineGRPCClient) DisableAdvancedSiteSearch(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DisableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DisableAdvancedSiteSearch, req, settings.GRPC, c.logger, "DisableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -773,7 +778,7 @@ func (c *siteSearchEngineGRPCClient) RecrawlUris(ctx context.Context, req *disco var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.RecrawlUris(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.RecrawlUris, req, settings.GRPC, c.logger, "RecrawlUris") return err }, opts...) if err != nil { @@ -793,7 +798,7 @@ func (c *siteSearchEngineGRPCClient) BatchVerifyTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchVerifyTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchVerifyTargetSites, req, settings.GRPC, c.logger, "BatchVerifyTargetSites") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *siteSearchEngineGRPCClient) FetchDomainVerificationStatus(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.FetchDomainVerificationStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.FetchDomainVerificationStatus, req, settings.GRPC, c.logger, "FetchDomainVerificationStatus") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *siteSearchEngineGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -873,7 +878,7 @@ func (c *siteSearchEngineGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -902,7 +907,7 @@ func (c *siteSearchEngineGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -962,17 +967,7 @@ func (c *siteSearchEngineRESTClient) GetSiteSearchEngine(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSiteSearchEngine") if err != nil { return err } @@ -1028,21 +1023,10 @@ func (c *siteSearchEngineRESTClient) CreateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1099,21 +1083,10 @@ func (c *siteSearchEngineRESTClient) BatchCreateTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTargetSites") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1164,17 +1137,7 @@ func (c *siteSearchEngineRESTClient) GetTargetSite(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTargetSite") if err != nil { return err } @@ -1230,21 +1193,10 @@ func (c *siteSearchEngineRESTClient) UpdateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1294,21 +1246,10 @@ func (c *siteSearchEngineRESTClient) DeleteTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1371,21 +1312,10 @@ func (c *siteSearchEngineRESTClient) ListTargetSites(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTargetSites") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1453,21 +1383,10 @@ func (c *siteSearchEngineRESTClient) EnableAdvancedSiteSearch(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableAdvancedSiteSearch") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1523,21 +1442,10 @@ func (c *siteSearchEngineRESTClient) DisableAdvancedSiteSearch(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableAdvancedSiteSearch") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1593,21 +1501,10 @@ func (c *siteSearchEngineRESTClient) RecrawlUris(ctx context.Context, req *disco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RecrawlUris") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1665,21 +1562,10 @@ func (c *siteSearchEngineRESTClient) BatchVerifyTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchVerifyTargetSites") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1744,21 +1630,10 @@ func (c *siteSearchEngineRESTClient) FetchDomainVerificationStatus(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchDomainVerificationStatus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1824,15 +1699,8 @@ func (c *siteSearchEngineRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1869,17 +1737,7 @@ func (c *siteSearchEngineRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1944,21 +1802,10 @@ func (c *siteSearchEngineRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/site_search_engine_client_example_go123_test.go b/discoveryengine/apiv1/site_search_engine_client_example_go123_test.go index 9e1b8a522d05..4db63a48a7f1 100644 --- a/discoveryengine/apiv1/site_search_engine_client_example_go123_test.go +++ b/discoveryengine/apiv1/site_search_engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSiteSearchEngineClient_FetchDomainVerificationStatus_all() { } for resp, err := range c.FetchDomainVerificationStatus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSiteSearchEngineClient_ListTargetSites_all() { } for resp, err := range c.ListTargetSites(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleSiteSearchEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1/user_event_client.go b/discoveryengine/apiv1/user_event_client.go index 139394967c0e..57b29d5bbe54 100755 --- a/discoveryengine/apiv1/user_event_client.go +++ b/discoveryengine/apiv1/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -381,6 +380,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -407,6 +408,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: discoveryenginepb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -470,6 +472,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -487,6 +491,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -549,7 +554,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *discovery var resp *discoveryenginepb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -567,7 +572,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *discove var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *discove var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *userEventGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -639,7 +644,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -737,17 +742,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -807,17 +802,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -876,21 +861,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -952,21 +926,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1020,15 +983,8 @@ func (c *userEventRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1065,17 +1021,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1140,21 +1086,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1/user_event_client_example_go123_test.go b/discoveryengine/apiv1/user_event_client_example_go123_test.go index 8c4610ddc146..268f9ada1e65 100644 --- a/discoveryengine/apiv1/user_event_client_example_go123_test.go +++ b/discoveryengine/apiv1/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/acl_config_client.go b/discoveryengine/apiv1alpha/acl_config_client.go index 46ade105dbd4..3e4dd7791740 100755 --- a/discoveryengine/apiv1alpha/acl_config_client.go +++ b/discoveryengine/apiv1alpha/acl_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -241,6 +240,8 @@ type aclConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAclConfigClient creates a new acl config service client based on gRPC. @@ -267,6 +268,7 @@ func NewAclConfigClient(ctx context.Context, opts ...option.ClientOption) (*AclC connPool: connPool, aclConfigClient: discoveryenginepb.NewAclConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -314,6 +316,8 @@ type aclConfigRESTClient struct { // Points back to the CallOptions field of the containing AclConfigClient CallOptions **AclConfigCallOptions + + logger *slog.Logger } // NewAclConfigRESTClient creates a new acl config service rest client. @@ -331,6 +335,7 @@ func NewAclConfigRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -383,7 +388,7 @@ func (c *aclConfigGRPCClient) UpdateAclConfig(ctx context.Context, req *discover var resp *discoveryenginepb.AclConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.aclConfigClient.UpdateAclConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.aclConfigClient.UpdateAclConfig, req, settings.GRPC, c.logger, "UpdateAclConfig") return err }, opts...) if err != nil { @@ -401,7 +406,7 @@ func (c *aclConfigGRPCClient) GetAclConfig(ctx context.Context, req *discoveryen var resp *discoveryenginepb.AclConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.aclConfigClient.GetAclConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.aclConfigClient.GetAclConfig, req, settings.GRPC, c.logger, "GetAclConfig") return err }, opts...) if err != nil { @@ -418,7 +423,7 @@ func (c *aclConfigGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -433,7 +438,7 @@ func (c *aclConfigGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -462,7 +467,7 @@ func (c *aclConfigGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -530,17 +535,7 @@ func (c *aclConfigRESTClient) UpdateAclConfig(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAclConfig") if err != nil { return err } @@ -590,17 +585,7 @@ func (c *aclConfigRESTClient) GetAclConfig(ctx context.Context, req *discoveryen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAclConfig") if err != nil { return err } @@ -653,15 +638,8 @@ func (c *aclConfigRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -698,17 +676,7 @@ func (c *aclConfigRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -773,21 +741,10 @@ func (c *aclConfigRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/acl_config_client_example_go123_test.go b/discoveryengine/apiv1alpha/acl_config_client_example_go123_test.go index d72f8b3a3012..108b2bbd7790 100644 --- a/discoveryengine/apiv1alpha/acl_config_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/acl_config_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAclConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/chunk_client.go b/discoveryengine/apiv1alpha/chunk_client.go index 57b6318a6869..8680c04d5dc5 100755 --- a/discoveryengine/apiv1alpha/chunk_client.go +++ b/discoveryengine/apiv1alpha/chunk_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -241,6 +240,8 @@ type chunkGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewChunkClient creates a new chunk service client based on gRPC. @@ -269,6 +270,7 @@ func NewChunkClient(ctx context.Context, opts ...option.ClientOption) (*ChunkCli connPool: connPool, chunkClient: discoveryenginepb.NewChunkServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -316,6 +318,8 @@ type chunkRESTClient struct { // Points back to the CallOptions field of the containing ChunkClient CallOptions **ChunkCallOptions + + logger *slog.Logger } // NewChunkRESTClient creates a new chunk service rest client. @@ -335,6 +339,7 @@ func NewChunkRESTClient(ctx context.Context, opts ...option.ClientOption) (*Chun endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -387,7 +392,7 @@ func (c *chunkGRPCClient) GetChunk(ctx context.Context, req *discoveryenginepb.G var resp *discoveryenginepb.Chunk err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.chunkClient.GetChunk(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.chunkClient.GetChunk, req, settings.GRPC, c.logger, "GetChunk") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *chunkGRPCClient) ListChunks(ctx context.Context, req *discoveryenginepb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.chunkClient.ListChunks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.chunkClient.ListChunks, req, settings.GRPC, c.logger, "ListChunks") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *chunkGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -465,7 +470,7 @@ func (c *chunkGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *chunkGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -553,17 +558,7 @@ func (c *chunkRESTClient) GetChunk(ctx context.Context, req *discoveryenginepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChunk") if err != nil { return err } @@ -625,21 +620,10 @@ func (c *chunkRESTClient) ListChunks(ctx context.Context, req *discoveryenginepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChunks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -705,15 +689,8 @@ func (c *chunkRESTClient) CancelOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -750,17 +727,7 @@ func (c *chunkRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -825,21 +792,10 @@ func (c *chunkRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/chunk_client_example_go123_test.go b/discoveryengine/apiv1alpha/chunk_client_example_go123_test.go index 51bb415b4ea1..a954de367fc5 100644 --- a/discoveryengine/apiv1alpha/chunk_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/chunk_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleChunkClient_ListChunks_all() { } for resp, err := range c.ListChunks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleChunkClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/completion_client.go b/discoveryengine/apiv1alpha/completion_client.go index 14f6fcb1fc9e..397e69d2ddf1 100755 --- a/discoveryengine/apiv1alpha/completion_client.go +++ b/discoveryengine/apiv1alpha/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -419,6 +418,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -445,6 +446,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: discoveryenginepb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -508,6 +510,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -525,6 +529,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -587,7 +592,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *discovery var resp *discoveryenginepb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *completionGRPCClient) ImportSuggestionDenyListEntries(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportSuggestionDenyListEntries, req, settings.GRPC, c.logger, "ImportSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -625,7 +630,7 @@ func (c *completionGRPCClient) PurgeSuggestionDenyListEntries(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeSuggestionDenyListEntries, req, settings.GRPC, c.logger, "PurgeSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -645,7 +650,7 @@ func (c *completionGRPCClient) ImportCompletionSuggestions(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionSuggestions, req, settings.GRPC, c.logger, "ImportCompletionSuggestions") return err }, opts...) if err != nil { @@ -665,7 +670,7 @@ func (c *completionGRPCClient) PurgeCompletionSuggestions(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeCompletionSuggestions, req, settings.GRPC, c.logger, "PurgeCompletionSuggestions") return err }, opts...) if err != nil { @@ -684,7 +689,7 @@ func (c *completionGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -699,7 +704,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -728,7 +733,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -797,17 +802,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -864,21 +859,10 @@ func (c *completionRESTClient) ImportSuggestionDenyListEntries(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSuggestionDenyListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -936,21 +920,10 @@ func (c *completionRESTClient) PurgeSuggestionDenyListEntries(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeSuggestionDenyListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1008,21 +981,10 @@ func (c *completionRESTClient) ImportCompletionSuggestions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionSuggestions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1080,21 +1042,10 @@ func (c *completionRESTClient) PurgeCompletionSuggestions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeCompletionSuggestions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1148,15 +1099,8 @@ func (c *completionRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1193,17 +1137,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1268,21 +1202,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/completion_client_example_go123_test.go b/discoveryengine/apiv1alpha/completion_client_example_go123_test.go index 5f40dd9c4f9d..8bb814067558 100644 --- a/discoveryengine/apiv1alpha/completion_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/control_client.go b/discoveryengine/apiv1alpha/control_client.go index 3fcff2e5b0f4..dd09061a910a 100755 --- a/discoveryengine/apiv1alpha/control_client.go +++ b/discoveryengine/apiv1alpha/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -387,6 +386,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -416,6 +417,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: discoveryenginepb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -463,6 +465,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -483,6 +487,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -535,7 +540,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *discoveryeng opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -567,7 +572,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *discoveryengi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *controlGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +668,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -764,17 +769,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -824,15 +819,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -887,17 +875,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -947,17 +925,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -1023,21 +991,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *discoveryengi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1103,15 +1060,8 @@ func (c *controlRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1148,17 +1098,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1223,21 +1163,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/control_client_example_go123_test.go b/discoveryengine/apiv1alpha/control_client_example_go123_test.go index 132bc8173341..161eb6bfd98a 100644 --- a/discoveryengine/apiv1alpha/control_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/conversational_search_client.go b/discoveryengine/apiv1alpha/conversational_search_client.go index 728956f41b11..7dc41eb0fe17 100755 --- a/discoveryengine/apiv1alpha/conversational_search_client.go +++ b/discoveryengine/apiv1alpha/conversational_search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -634,6 +633,8 @@ type conversationalSearchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationalSearchClient creates a new conversational search service client based on gRPC. @@ -660,6 +661,7 @@ func NewConversationalSearchClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationalSearchClient: discoveryenginepb.NewConversationalSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -707,6 +709,8 @@ type conversationalSearchRESTClient struct { // Points back to the CallOptions field of the containing ConversationalSearchClient CallOptions **ConversationalSearchCallOptions + + logger *slog.Logger } // NewConversationalSearchRESTClient creates a new conversational search service rest client. @@ -724,6 +728,7 @@ func NewConversationalSearchRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -776,7 +781,7 @@ func (c *conversationalSearchGRPCClient) ConverseConversation(ctx context.Contex var resp *discoveryenginepb.ConverseConversationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ConverseConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ConverseConversation, req, settings.GRPC, c.logger, "ConverseConversation") return err }, opts...) if err != nil { @@ -794,7 +799,7 @@ func (c *conversationalSearchGRPCClient) CreateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *conversationalSearchGRPCClient) DeleteConversation(ctx context.Context, opts = append((*c.CallOptions).DeleteConversation[0:len((*c.CallOptions).DeleteConversation):len((*c.CallOptions).DeleteConversation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteConversation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteConversation, req, settings.GRPC, c.logger, "DeleteConversation") return err }, opts...) return err @@ -826,7 +831,7 @@ func (c *conversationalSearchGRPCClient) UpdateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateConversation, req, settings.GRPC, c.logger, "UpdateConversation") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *conversationalSearchGRPCClient) GetConversation(ctx context.Context, re var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *conversationalSearchGRPCClient) ListConversations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *conversationalSearchGRPCClient) AnswerQuery(ctx context.Context, req *d var resp *discoveryenginepb.AnswerQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.AnswerQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.AnswerQuery, req, settings.GRPC, c.logger, "AnswerQuery") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *conversationalSearchGRPCClient) GetAnswer(ctx context.Context, req *dis var resp *discoveryenginepb.Answer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetAnswer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetAnswer, req, settings.GRPC, c.logger, "GetAnswer") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *conversationalSearchGRPCClient) CreateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateSession, req, settings.GRPC, c.logger, "CreateSession") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *conversationalSearchGRPCClient) DeleteSession(ctx context.Context, req opts = append((*c.CallOptions).DeleteSession[0:len((*c.CallOptions).DeleteSession):len((*c.CallOptions).DeleteSession)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteSession(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteSession, req, settings.GRPC, c.logger, "DeleteSession") return err }, opts...) return err @@ -976,7 +981,7 @@ func (c *conversationalSearchGRPCClient) UpdateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateSession, req, settings.GRPC, c.logger, "UpdateSession") return err }, opts...) if err != nil { @@ -994,7 +999,7 @@ func (c *conversationalSearchGRPCClient) GetSession(ctx context.Context, req *di var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetSession, req, settings.GRPC, c.logger, "GetSession") return err }, opts...) if err != nil { @@ -1023,7 +1028,7 @@ func (c *conversationalSearchGRPCClient) ListSessions(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *conversationalSearchGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1072,7 +1077,7 @@ func (c *conversationalSearchGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *conversationalSearchGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1166,17 +1171,7 @@ func (c *conversationalSearchRESTClient) ConverseConversation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConverseConversation") if err != nil { return err } @@ -1236,17 +1231,7 @@ func (c *conversationalSearchRESTClient) CreateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -1296,15 +1281,8 @@ func (c *conversationalSearchRESTClient) DeleteConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversation") + return err }, opts...) } @@ -1360,17 +1338,7 @@ func (c *conversationalSearchRESTClient) UpdateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversation") if err != nil { return err } @@ -1420,17 +1388,7 @@ func (c *conversationalSearchRESTClient) GetConversation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -1499,21 +1457,10 @@ func (c *conversationalSearchRESTClient) ListConversations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1582,17 +1529,7 @@ func (c *conversationalSearchRESTClient) AnswerQuery(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnswerQuery") if err != nil { return err } @@ -1642,17 +1579,7 @@ func (c *conversationalSearchRESTClient) GetAnswer(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnswer") if err != nil { return err } @@ -1712,17 +1639,7 @@ func (c *conversationalSearchRESTClient) CreateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSession") if err != nil { return err } @@ -1772,15 +1689,8 @@ func (c *conversationalSearchRESTClient) DeleteSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSession") + return err }, opts...) } @@ -1835,17 +1745,7 @@ func (c *conversationalSearchRESTClient) UpdateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSession") if err != nil { return err } @@ -1895,17 +1795,7 @@ func (c *conversationalSearchRESTClient) GetSession(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSession") if err != nil { return err } @@ -1974,21 +1864,10 @@ func (c *conversationalSearchRESTClient) ListSessions(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2054,15 +1933,8 @@ func (c *conversationalSearchRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2099,17 +1971,7 @@ func (c *conversationalSearchRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2174,21 +2036,10 @@ func (c *conversationalSearchRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/conversational_search_client_example_go123_test.go b/discoveryengine/apiv1alpha/conversational_search_client_example_go123_test.go index 4afd622a3c95..f0904f9cb0ce 100644 --- a/discoveryengine/apiv1alpha/conversational_search_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/conversational_search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleConversationalSearchClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleConversationalSearchClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleConversationalSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/data_store_client.go b/discoveryengine/apiv1alpha/data_store_client.go index c4a9e1b4bfd2..cf2eda2fac57 100755 --- a/discoveryengine/apiv1alpha/data_store_client.go +++ b/discoveryengine/apiv1alpha/data_store_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -326,6 +325,8 @@ type dataStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataStoreClient creates a new data store service client based on gRPC. @@ -353,6 +354,7 @@ func NewDataStoreClient(ctx context.Context, opts ...option.ClientOption) (*Data connPool: connPool, dataStoreClient: discoveryenginepb.NewDataStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -416,6 +418,8 @@ type dataStoreRESTClient struct { // Points back to the CallOptions field of the containing DataStoreClient CallOptions **DataStoreCallOptions + + logger *slog.Logger } // NewDataStoreRESTClient creates a new data store service rest client. @@ -434,6 +438,7 @@ func NewDataStoreRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -496,7 +501,7 @@ func (c *dataStoreGRPCClient) CreateDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.CreateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.CreateDataStore, req, settings.GRPC, c.logger, "CreateDataStore") return err }, opts...) if err != nil { @@ -516,7 +521,7 @@ func (c *dataStoreGRPCClient) GetDataStore(ctx context.Context, req *discoveryen var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.GetDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.GetDataStore, req, settings.GRPC, c.logger, "GetDataStore") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *dataStoreGRPCClient) ListDataStores(ctx context.Context, req *discovery } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.ListDataStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.ListDataStores, req, settings.GRPC, c.logger, "ListDataStores") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *dataStoreGRPCClient) DeleteDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.DeleteDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.DeleteDataStore, req, settings.GRPC, c.logger, "DeleteDataStore") return err }, opts...) if err != nil { @@ -600,7 +605,7 @@ func (c *dataStoreGRPCClient) UpdateDataStore(ctx context.Context, req *discover var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.UpdateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.UpdateDataStore, req, settings.GRPC, c.logger, "UpdateDataStore") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *dataStoreGRPCClient) GetDocumentProcessingConfig(ctx context.Context, r var resp *discoveryenginepb.DocumentProcessingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.GetDocumentProcessingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.GetDocumentProcessingConfig, req, settings.GRPC, c.logger, "GetDocumentProcessingConfig") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *dataStoreGRPCClient) UpdateDocumentProcessingConfig(ctx context.Context var resp *discoveryenginepb.DocumentProcessingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.UpdateDocumentProcessingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.UpdateDocumentProcessingConfig, req, settings.GRPC, c.logger, "UpdateDocumentProcessingConfig") return err }, opts...) if err != nil { @@ -653,7 +658,7 @@ func (c *dataStoreGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -668,7 +673,7 @@ func (c *dataStoreGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *dataStoreGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -775,21 +780,10 @@ func (c *dataStoreRESTClient) CreateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataStore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -840,17 +834,7 @@ func (c *dataStoreRESTClient) GetDataStore(ctx context.Context, req *discoveryen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataStore") if err != nil { return err } @@ -916,21 +900,10 @@ func (c *dataStoreRESTClient) ListDataStores(ctx context.Context, req *discovery } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataStores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -992,21 +965,10 @@ func (c *dataStoreRESTClient) DeleteDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataStore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1071,17 +1033,7 @@ func (c *dataStoreRESTClient) UpdateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataStore") if err != nil { return err } @@ -1132,17 +1084,7 @@ func (c *dataStoreRESTClient) GetDocumentProcessingConfig(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocumentProcessingConfig") if err != nil { return err } @@ -1213,17 +1155,7 @@ func (c *dataStoreRESTClient) UpdateDocumentProcessingConfig(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocumentProcessingConfig") if err != nil { return err } @@ -1276,15 +1208,8 @@ func (c *dataStoreRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1321,17 +1246,7 @@ func (c *dataStoreRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1396,21 +1311,10 @@ func (c *dataStoreRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/data_store_client_example_go123_test.go b/discoveryengine/apiv1alpha/data_store_client_example_go123_test.go index 500c513a7e5d..4a9389caa9d9 100644 --- a/discoveryengine/apiv1alpha/data_store_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/data_store_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDataStoreClient_ListDataStores_all() { } for resp, err := range c.ListDataStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDataStoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/acl_config.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/acl_config.pb.go index bd970d13f268..6d245f5f4118 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/acl_config.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/acl_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/acl_config.proto @@ -55,11 +55,9 @@ type AclConfig struct { func (x *AclConfig) Reset() { *x = AclConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AclConfig) String() string { @@ -70,7 +68,7 @@ func (*AclConfig) ProtoMessage() {} func (x *AclConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,20 +179,6 @@ func file_google_cloud_discoveryengine_v1alpha_acl_config_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_acl_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AclConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/acl_config_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/acl_config_service.pb.go index ba073ba33347..d16448b03582 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/acl_config_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/acl_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/acl_config_service.proto @@ -58,11 +58,9 @@ type GetAclConfigRequest struct { func (x *GetAclConfigRequest) Reset() { *x = GetAclConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAclConfigRequest) String() string { @@ -73,7 +71,7 @@ func (*GetAclConfigRequest) ProtoMessage() {} func (x *GetAclConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106,11 +104,9 @@ type UpdateAclConfigRequest struct { func (x *UpdateAclConfigRequest) Reset() { *x = UpdateAclConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAclConfigRequest) String() string { @@ -121,7 +117,7 @@ func (*UpdateAclConfigRequest) ProtoMessage() {} func (x *UpdateAclConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,32 +262,6 @@ func file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_acl_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetAclConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_acl_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAclConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/answer.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/answer.pb.go index e3ec32a39467..76a0132a4ec1 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/answer.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/answer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/answer.proto @@ -331,11 +331,9 @@ type Answer struct { func (x *Answer) Reset() { *x = Answer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer) String() string { @@ -346,7 +344,7 @@ func (*Answer) ProtoMessage() {} func (x *Answer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +453,9 @@ type Answer_Citation struct { func (x *Answer_Citation) Reset() { *x = Answer_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Citation) String() string { @@ -470,7 +466,7 @@ func (*Answer_Citation) ProtoMessage() {} func (x *Answer_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +514,9 @@ type Answer_CitationSource struct { func (x *Answer_CitationSource) Reset() { *x = Answer_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_CitationSource) String() string { @@ -533,7 +527,7 @@ func (*Answer_CitationSource) ProtoMessage() {} func (x *Answer_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +567,9 @@ type Answer_Reference struct { func (x *Answer_Reference) Reset() { *x = Answer_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference) String() string { @@ -588,7 +580,7 @@ func (*Answer_Reference) ProtoMessage() {} func (x *Answer_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +666,9 @@ type Answer_Step struct { func (x *Answer_Step) Reset() { *x = Answer_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step) String() string { @@ -689,7 +679,7 @@ func (*Answer_Step) ProtoMessage() {} func (x *Answer_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,11 +734,9 @@ type Answer_QueryUnderstandingInfo struct { func (x *Answer_QueryUnderstandingInfo) Reset() { *x = Answer_QueryUnderstandingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo) String() string { @@ -759,7 +747,7 @@ func (*Answer_QueryUnderstandingInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +790,9 @@ type Answer_Reference_UnstructuredDocumentInfo struct { func (x *Answer_Reference_UnstructuredDocumentInfo) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo) String() string { @@ -817,7 +803,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +875,9 @@ type Answer_Reference_ChunkInfo struct { func (x *Answer_Reference_ChunkInfo) Reset() { *x = Answer_Reference_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo) String() string { @@ -904,7 +888,7 @@ func (*Answer_Reference_ChunkInfo) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +945,9 @@ type Answer_Reference_StructuredDocumentInfo struct { func (x *Answer_Reference_StructuredDocumentInfo) Reset() { *x = Answer_Reference_StructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_StructuredDocumentInfo) String() string { @@ -976,7 +958,7 @@ func (*Answer_Reference_StructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_StructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1007,9 @@ type Answer_Reference_UnstructuredDocumentInfo_ChunkContent struct { func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) String() string { @@ -1040,7 +1020,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,11 +1077,9 @@ type Answer_Reference_ChunkInfo_DocumentMetadata struct { func (x *Answer_Reference_ChunkInfo_DocumentMetadata) Reset() { *x = Answer_Reference_ChunkInfo_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo_DocumentMetadata) String() string { @@ -1112,7 +1090,7 @@ func (*Answer_Reference_ChunkInfo_DocumentMetadata) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1158,9 @@ type Answer_Step_Action struct { func (x *Answer_Step_Action) Reset() { *x = Answer_Step_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action) String() string { @@ -1195,7 +1171,7 @@ func (*Answer_Step_Action) ProtoMessage() {} func (x *Answer_Step_Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1230,9 @@ type Answer_Step_Action_SearchAction struct { func (x *Answer_Step_Action_SearchAction) Reset() { *x = Answer_Step_Action_SearchAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_SearchAction) String() string { @@ -1269,7 +1243,7 @@ func (*Answer_Step_Action_SearchAction) ProtoMessage() {} func (x *Answer_Step_Action_SearchAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1278,9 @@ type Answer_Step_Action_Observation struct { func (x *Answer_Step_Action_Observation) Reset() { *x = Answer_Step_Action_Observation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation) String() string { @@ -1319,7 +1291,7 @@ func (*Answer_Step_Action_Observation) ProtoMessage() {} func (x *Answer_Step_Action_Observation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1341,9 @@ type Answer_Step_Action_Observation_SearchResult struct { func (x *Answer_Step_Action_Observation_SearchResult) Reset() { *x = Answer_Step_Action_Observation_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult) String() string { @@ -1384,7 +1354,7 @@ func (*Answer_Step_Action_Observation_SearchResult) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1455,11 +1425,9 @@ type Answer_Step_Action_Observation_SearchResult_SnippetInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_SnippetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) String() string { @@ -1470,7 +1438,7 @@ func (*Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoMessage() { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1487,9 @@ type Answer_Step_Action_Observation_SearchResult_ChunkInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) String() string { @@ -1534,7 +1500,7 @@ func (*Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1550,9 @@ type Answer_QueryUnderstandingInfo_QueryClassificationInfo struct { func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) Reset() { *x = Answer_QueryUnderstandingInfo_QueryClassificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) String() string { @@ -1599,7 +1563,7 @@ func (*Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2067,224 +2031,6 @@ func file_google_cloud_discoveryengine_v1alpha_answer_proto_init() { if File_google_cloud_discoveryengine_v1alpha_answer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Answer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Answer_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_StructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_SearchAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_SnippetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo_QueryClassificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_answer_proto_msgTypes[3].OneofWrappers = []any{ (*Answer_Reference_UnstructuredDocumentInfo_)(nil), (*Answer_Reference_ChunkInfo_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/chunk.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/chunk.pb.go index f59febd7d909..faef7869894b 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/chunk.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/chunk.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/chunk.proto @@ -73,11 +73,9 @@ type Chunk struct { func (x *Chunk) Reset() { *x = Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk) String() string { @@ -88,7 +86,7 @@ func (*Chunk) ProtoMessage() {} func (x *Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type Chunk_DocumentMetadata struct { func (x *Chunk_DocumentMetadata) Reset() { *x = Chunk_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_DocumentMetadata) String() string { @@ -194,7 +190,7 @@ func (*Chunk_DocumentMetadata) ProtoMessage() {} func (x *Chunk_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type Chunk_PageSpan struct { func (x *Chunk_PageSpan) Reset() { *x = Chunk_PageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_PageSpan) String() string { @@ -259,7 +253,7 @@ func (*Chunk_PageSpan) ProtoMessage() {} func (x *Chunk_PageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +306,9 @@ type Chunk_ChunkMetadata struct { func (x *Chunk_ChunkMetadata) Reset() { *x = Chunk_ChunkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_ChunkMetadata) String() string { @@ -327,7 +319,7 @@ func (*Chunk_ChunkMetadata) ProtoMessage() {} func (x *Chunk_ChunkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,56 +497,6 @@ func file_google_cloud_discoveryengine_v1alpha_chunk_proto_init() { if File_google_cloud_discoveryengine_v1alpha_chunk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_PageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_ChunkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_chunk_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/chunk_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/chunk_service.pb.go index ae2633d2ef0c..e22e21619a8e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/chunk_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/chunk_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/chunk_service.proto @@ -63,11 +63,9 @@ type GetChunkRequest struct { func (x *GetChunkRequest) Reset() { *x = GetChunkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChunkRequest) String() string { @@ -78,7 +76,7 @@ func (*GetChunkRequest) ProtoMessage() {} func (x *GetChunkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type ListChunksRequest struct { func (x *ListChunksRequest) Reset() { *x = ListChunksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChunksRequest) String() string { @@ -152,7 +148,7 @@ func (*ListChunksRequest) ProtoMessage() {} func (x *ListChunksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type ListChunksResponse struct { func (x *ListChunksResponse) Reset() { *x = ListChunksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChunksResponse) String() string { @@ -222,7 +216,7 @@ func (*ListChunksResponse) ProtoMessage() {} func (x *ListChunksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,44 +394,6 @@ func file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_chunk_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetChunkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListChunksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_chunk_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListChunksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/common.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/common.pb.go index 5f448e752178..46d34fe933b4 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/common.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/common.proto @@ -403,11 +403,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -418,7 +416,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +541,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -558,7 +554,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,11 +617,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -636,7 +630,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +671,9 @@ type EmbeddingConfig struct { func (x *EmbeddingConfig) Reset() { *x = EmbeddingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbeddingConfig) String() string { @@ -692,7 +684,7 @@ func (*EmbeddingConfig) ProtoMessage() {} func (x *EmbeddingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +718,9 @@ type DoubleList struct { func (x *DoubleList) Reset() { *x = DoubleList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleList) String() string { @@ -741,7 +731,7 @@ func (*DoubleList) ProtoMessage() {} func (x *DoubleList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +771,9 @@ type GuidedSearchSpec struct { func (x *GuidedSearchSpec) Reset() { *x = GuidedSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuidedSearchSpec) String() string { @@ -796,7 +784,7 @@ func (*GuidedSearchSpec) ProtoMessage() {} func (x *GuidedSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +833,9 @@ type CustomFineTuningSpec struct { func (x *CustomFineTuningSpec) Reset() { *x = CustomFineTuningSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomFineTuningSpec) String() string { @@ -860,7 +846,7 @@ func (*CustomFineTuningSpec) ProtoMessage() {} func (x *CustomFineTuningSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +882,9 @@ type IdpConfig struct { func (x *IdpConfig) Reset() { *x = IdpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdpConfig) String() string { @@ -911,7 +895,7 @@ func (*IdpConfig) ProtoMessage() {} func (x *IdpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +941,9 @@ type Principal struct { func (x *Principal) Reset() { *x = Principal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Principal) String() string { @@ -972,7 +954,7 @@ func (*Principal) ProtoMessage() {} func (x *Principal) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1047,11 +1029,9 @@ type IdpConfig_ExternalIdpConfig struct { func (x *IdpConfig_ExternalIdpConfig) Reset() { *x = IdpConfig_ExternalIdpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdpConfig_ExternalIdpConfig) String() string { @@ -1062,7 +1042,7 @@ func (*IdpConfig_ExternalIdpConfig) ProtoMessage() {} func (x *IdpConfig_ExternalIdpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,128 +1295,6 @@ func file_google_cloud_discoveryengine_v1alpha_common_proto_init() { if File_google_cloud_discoveryengine_v1alpha_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EmbeddingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DoubleList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GuidedSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CustomFineTuningSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*IdpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Principal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*IdpConfig_ExternalIdpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_common_proto_msgTypes[0].OneofWrappers = []any{ (*Interval_Minimum)(nil), (*Interval_ExclusiveMinimum)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/completion.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/completion.pb.go index 01e2560d07b4..302c69f61b18 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/completion.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/completion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/completion.proto @@ -106,11 +106,9 @@ type SuggestionDenyListEntry struct { func (x *SuggestionDenyListEntry) Reset() { *x = SuggestionDenyListEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionDenyListEntry) String() string { @@ -121,7 +119,7 @@ func (*SuggestionDenyListEntry) ProtoMessage() {} func (x *SuggestionDenyListEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type CompletionSuggestion struct { func (x *CompletionSuggestion) Reset() { *x = CompletionSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionSuggestion) String() string { @@ -194,7 +190,7 @@ func (*CompletionSuggestion) ProtoMessage() {} func (x *CompletionSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,32 +381,6 @@ func file_google_cloud_discoveryengine_v1alpha_completion_proto_init() { if File_google_cloud_discoveryengine_v1alpha_completion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionDenyListEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompletionSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_completion_proto_msgTypes[1].OneofWrappers = []any{ (*CompletionSuggestion_GlobalScore)(nil), (*CompletionSuggestion_Frequency)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/completion_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/completion_service.pb.go index 8c8aa9e39224..3a3e6c8b9a9d 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/completion_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/completion_service.proto @@ -98,11 +98,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -113,7 +111,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +181,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -198,7 +194,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type CompleteQueryResponse_QuerySuggestion struct { func (x *CompleteQueryResponse_QuerySuggestion) Reset() { *x = CompleteQueryResponse_QuerySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_QuerySuggestion) String() string { @@ -259,7 +253,7 @@ func (*CompleteQueryResponse_QuerySuggestion) ProtoMessage() {} func (x *CompleteQueryResponse_QuerySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,44 +564,6 @@ func file_google_cloud_discoveryengine_v1alpha_completion_service_proto_init() { } file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() file_google_cloud_discoveryengine_v1alpha_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_QuerySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/control.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/control.pb.go index 429b34405240..a25d14e104ac 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/control.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/control.proto @@ -56,11 +56,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -71,7 +69,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +154,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -171,7 +167,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +311,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -330,7 +324,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +372,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -393,7 +385,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +439,9 @@ type Control_BoostAction struct { func (x *Control_BoostAction) Reset() { *x = Control_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_BoostAction) String() string { @@ -462,7 +452,7 @@ func (*Control_BoostAction) ProtoMessage() {} func (x *Control_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +511,9 @@ type Control_FilterAction struct { func (x *Control_FilterAction) Reset() { *x = Control_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_FilterAction) String() string { @@ -536,7 +524,7 @@ func (*Control_FilterAction) ProtoMessage() {} func (x *Control_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +569,9 @@ type Control_RedirectAction struct { func (x *Control_RedirectAction) Reset() { *x = Control_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_RedirectAction) String() string { @@ -596,7 +582,7 @@ func (*Control_RedirectAction) ProtoMessage() {} func (x *Control_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +622,9 @@ type Control_SynonymsAction struct { func (x *Control_SynonymsAction) Reset() { *x = Control_SynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_SynonymsAction) String() string { @@ -651,7 +635,7 @@ func (*Control_SynonymsAction) ProtoMessage() {} func (x *Control_SynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,104 +868,6 @@ func file_google_cloud_discoveryengine_v1alpha_control_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Control_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Control_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Control_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Control_SynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_control_proto_msgTypes[1].OneofWrappers = []any{ (*Control_BoostAction_)(nil), (*Control_FilterAction_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/control_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/control_service.pb.go index 8090d2bf93b0..f00583035f9e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/control_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/control_service.proto @@ -65,11 +65,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -152,7 +148,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +190,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -209,7 +203,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +238,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -259,7 +251,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +300,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -323,7 +313,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -395,7 +383,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,80 +691,6 @@ func file_google_cloud_discoveryengine_v1alpha_control_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/conversation.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/conversation.pb.go index 9fd981ec8b90..dab0254e240a 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/conversation.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/conversation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/conversation.proto @@ -115,11 +115,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -130,7 +128,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +206,9 @@ type Reply struct { func (x *Reply) Reset() { *x = Reply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reply) String() string { @@ -223,7 +219,7 @@ func (*Reply) ProtoMessage() {} func (x *Reply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type ConversationContext struct { func (x *ConversationContext) Reset() { *x = ConversationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationContext) String() string { @@ -292,7 +286,7 @@ func (*ConversationContext) ProtoMessage() {} func (x *ConversationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +329,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -350,7 +342,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +388,9 @@ type ConversationMessage struct { func (x *ConversationMessage) Reset() { *x = ConversationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationMessage) String() string { @@ -411,7 +401,7 @@ func (*ConversationMessage) ProtoMessage() {} func (x *ConversationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +482,9 @@ type Reply_Reference struct { func (x *Reply_Reference) Reset() { *x = Reply_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reply_Reference) String() string { @@ -507,7 +495,7 @@ func (*Reply_Reference) ProtoMessage() {} func (x *Reply_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,80 +727,6 @@ func file_google_cloud_discoveryengine_v1alpha_conversation_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Reply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ConversationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ConversationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Reply_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_conversation_proto_msgTypes[4].OneofWrappers = []any{ (*ConversationMessage_UserInput)(nil), (*ConversationMessage_Reply)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/conversational_search_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/conversational_search_service.pb.go index 3065c0440f62..19259600a39e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/conversational_search_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/conversational_search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto @@ -171,11 +171,9 @@ type ConverseConversationRequest struct { func (x *ConverseConversationRequest) Reset() { *x = ConverseConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationRequest) String() string { @@ -186,7 +184,7 @@ func (*ConverseConversationRequest) ProtoMessage() {} func (x *ConverseConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +282,9 @@ type ConverseConversationResponse struct { func (x *ConverseConversationResponse) Reset() { *x = ConverseConversationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationResponse) String() string { @@ -299,7 +295,7 @@ func (*ConverseConversationResponse) ProtoMessage() {} func (x *ConverseConversationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +353,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -372,7 +366,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +415,9 @@ type UpdateConversationRequest struct { func (x *UpdateConversationRequest) Reset() { *x = UpdateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationRequest) String() string { @@ -436,7 +428,7 @@ func (*UpdateConversationRequest) ProtoMessage() {} func (x *UpdateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +470,9 @@ type DeleteConversationRequest struct { func (x *DeleteConversationRequest) Reset() { *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationRequest) String() string { @@ -493,7 +483,7 @@ func (*DeleteConversationRequest) ProtoMessage() {} func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +518,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -543,7 +531,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,11 +589,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -616,7 +602,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +666,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -695,7 +679,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type AnswerQueryRequest struct { func (x *AnswerQueryRequest) Reset() { *x = AnswerQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest) String() string { @@ -815,7 +797,7 @@ func (*AnswerQueryRequest) ProtoMessage() {} func (x *AnswerQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +917,9 @@ type AnswerQueryResponse struct { func (x *AnswerQueryResponse) Reset() { *x = AnswerQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryResponse) String() string { @@ -950,7 +930,7 @@ func (*AnswerQueryResponse) ProtoMessage() {} func (x *AnswerQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +979,9 @@ type GetAnswerRequest struct { func (x *GetAnswerRequest) Reset() { *x = GetAnswerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnswerRequest) String() string { @@ -1014,7 +992,7 @@ func (*GetAnswerRequest) ProtoMessage() {} func (x *GetAnswerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1029,9 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionRequest) String() string { @@ -1066,7 +1042,7 @@ func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1091,9 @@ type UpdateSessionRequest struct { func (x *UpdateSessionRequest) Reset() { *x = UpdateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionRequest) String() string { @@ -1130,7 +1104,7 @@ func (*UpdateSessionRequest) ProtoMessage() {} func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1172,11 +1146,9 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionRequest) String() string { @@ -1187,7 +1159,7 @@ func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1194,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -1237,7 +1207,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,11 +1265,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -1310,7 +1278,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,11 +1342,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -1389,7 +1355,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1431,11 +1397,9 @@ type AnswerQueryRequest_SafetySpec struct { func (x *AnswerQueryRequest_SafetySpec) Reset() { *x = AnswerQueryRequest_SafetySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SafetySpec) String() string { @@ -1446,7 +1410,7 @@ func (*AnswerQueryRequest_SafetySpec) ProtoMessage() {} func (x *AnswerQueryRequest_SafetySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1444,9 @@ type AnswerQueryRequest_RelatedQuestionsSpec struct { func (x *AnswerQueryRequest_RelatedQuestionsSpec) Reset() { *x = AnswerQueryRequest_RelatedQuestionsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_RelatedQuestionsSpec) String() string { @@ -1495,7 +1457,7 @@ func (*AnswerQueryRequest_RelatedQuestionsSpec) ProtoMessage() {} func (x *AnswerQueryRequest_RelatedQuestionsSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1564,11 +1526,9 @@ type AnswerQueryRequest_AnswerGenerationSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec) String() string { @@ -1579,7 +1539,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1661,11 +1621,9 @@ type AnswerQueryRequest_SearchSpec struct { func (x *AnswerQueryRequest_SearchSpec) Reset() { *x = AnswerQueryRequest_SearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec) String() string { @@ -1676,7 +1634,7 @@ func (*AnswerQueryRequest_SearchSpec) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1744,11 +1702,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec) String() string { @@ -1759,7 +1715,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec) ProtoMessage() {} func (x *AnswerQueryRequest_QueryUnderstandingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1801,11 +1757,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_ModelSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) String() string { @@ -1816,7 +1770,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1804,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_PromptSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_PromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) String() string { @@ -1865,7 +1817,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1943,11 +1895,9 @@ type AnswerQueryRequest_SearchSpec_SearchParams struct { func (x *AnswerQueryRequest_SearchSpec_SearchParams) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchParams) String() string { @@ -1958,7 +1908,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchParams) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2034,11 +1984,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList) String() string { @@ -2049,7 +1997,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchResultList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2088,11 +2036,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) String() string { @@ -2103,7 +2049,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoMessage func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2181,11 +2127,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) String() string { @@ -2197,7 +2141,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2268,11 +2212,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo struc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) String() string { @@ -2283,7 +2225,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Pr func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2326,11 +2268,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) String() string { @@ -2342,7 +2282,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2386,11 +2326,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) String() string { @@ -2402,7 +2340,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2446,11 +2384,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) String() string { @@ -2462,7 +2398,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2503,11 +2439,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) String() string { @@ -2518,7 +2452,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoM func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2556,11 +2490,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) String() string { @@ -2571,7 +2503,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoMessag func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3670,416 +3602,6 @@ func file_google_cloud_discoveryengine_v1alpha_conversational_search_service_pro file_google_cloud_discoveryengine_v1alpha_conversation_proto_init() file_google_cloud_discoveryengine_v1alpha_search_service_proto_init() file_google_cloud_discoveryengine_v1alpha_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetAnswerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SafetySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_RelatedQuestionsSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[20].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_conversational_search_service_proto_msgTypes[21].OneofWrappers = []any{ (*AnswerQueryRequest_SearchSpec_SearchParams_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/custom_tuning_model.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/custom_tuning_model.pb.go index 030d45ae4a9c..6a37734cedde 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/custom_tuning_model.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/custom_tuning_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto @@ -140,11 +140,9 @@ type CustomTuningModel struct { func (x *CustomTuningModel) Reset() { *x = CustomTuningModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTuningModel) String() string { @@ -155,7 +153,7 @@ func (*CustomTuningModel) ProtoMessage() {} func (x *CustomTuningModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,20 +358,6 @@ func file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_init() if File_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomTuningModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/data_store.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/data_store.pb.go index 8f1c4616539b..5554b52dafde 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/data_store.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/data_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/data_store.proto @@ -263,11 +263,9 @@ type DataStore struct { func (x *DataStore) Reset() { *x = DataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore) String() string { @@ -278,7 +276,7 @@ func (*DataStore) ProtoMessage() {} func (x *DataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +404,9 @@ type LanguageInfo struct { func (x *LanguageInfo) Reset() { *x = LanguageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LanguageInfo) String() string { @@ -421,7 +417,7 @@ func (*LanguageInfo) ProtoMessage() {} func (x *LanguageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +474,9 @@ type WorkspaceConfig struct { func (x *WorkspaceConfig) Reset() { *x = WorkspaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkspaceConfig) String() string { @@ -493,7 +487,7 @@ func (*WorkspaceConfig) ProtoMessage() {} func (x *WorkspaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,44 +730,6 @@ func file_google_cloud_discoveryengine_v1alpha_data_store_proto_init() { file_google_cloud_discoveryengine_v1alpha_common_proto_init() file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_init() file_google_cloud_discoveryengine_v1alpha_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LanguageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WorkspaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/data_store_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/data_store_service.pb.go index 1715850c7893..269e1861f9f5 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/data_store_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/data_store_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/data_store_service.proto @@ -87,11 +87,9 @@ type CreateDataStoreRequest struct { func (x *CreateDataStoreRequest) Reset() { *x = CreateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreRequest) String() string { @@ -102,7 +100,7 @@ func (*CreateDataStoreRequest) ProtoMessage() {} func (x *CreateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +174,9 @@ type GetDataStoreRequest struct { func (x *GetDataStoreRequest) Reset() { *x = GetDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataStoreRequest) String() string { @@ -191,7 +187,7 @@ func (*GetDataStoreRequest) ProtoMessage() {} func (x *GetDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type CreateDataStoreMetadata struct { func (x *CreateDataStoreMetadata) Reset() { *x = CreateDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreMetadata) String() string { @@ -246,7 +240,7 @@ func (*CreateDataStoreMetadata) ProtoMessage() {} func (x *CreateDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +310,9 @@ type ListDataStoresRequest struct { func (x *ListDataStoresRequest) Reset() { *x = ListDataStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresRequest) String() string { @@ -331,7 +323,7 @@ func (*ListDataStoresRequest) ProtoMessage() {} func (x *ListDataStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +386,9 @@ type ListDataStoresResponse struct { func (x *ListDataStoresResponse) Reset() { *x = ListDataStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresResponse) String() string { @@ -409,7 +399,7 @@ func (*ListDataStoresResponse) ProtoMessage() {} func (x *ListDataStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +451,9 @@ type DeleteDataStoreRequest struct { func (x *DeleteDataStoreRequest) Reset() { *x = DeleteDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreRequest) String() string { @@ -476,7 +464,7 @@ func (*DeleteDataStoreRequest) ProtoMessage() {} func (x *DeleteDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +514,9 @@ type UpdateDataStoreRequest struct { func (x *UpdateDataStoreRequest) Reset() { *x = UpdateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataStoreRequest) String() string { @@ -541,7 +527,7 @@ func (*UpdateDataStoreRequest) ProtoMessage() {} func (x *UpdateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +574,9 @@ type DeleteDataStoreMetadata struct { func (x *DeleteDataStoreMetadata) Reset() { *x = DeleteDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreMetadata) String() string { @@ -603,7 +587,7 @@ func (*DeleteDataStoreMetadata) ProtoMessage() {} func (x *DeleteDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +631,9 @@ type GetDocumentProcessingConfigRequest struct { func (x *GetDocumentProcessingConfigRequest) Reset() { *x = GetDocumentProcessingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentProcessingConfigRequest) String() string { @@ -662,7 +644,7 @@ func (*GetDocumentProcessingConfigRequest) ProtoMessage() {} func (x *GetDocumentProcessingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +698,9 @@ type UpdateDocumentProcessingConfigRequest struct { func (x *UpdateDocumentProcessingConfigRequest) Reset() { *x = UpdateDocumentProcessingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentProcessingConfigRequest) String() string { @@ -731,7 +711,7 @@ func (*UpdateDocumentProcessingConfigRequest) ProtoMessage() {} func (x *UpdateDocumentProcessingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1153,128 +1133,6 @@ func file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_init() { } file_google_cloud_discoveryengine_v1alpha_data_store_proto_init() file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentProcessingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_data_store_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentProcessingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/document.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/document.pb.go index f45115edd87d..b967bb9749f8 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/document.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/document.proto @@ -102,11 +102,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -117,7 +115,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +256,9 @@ type ProcessedDocument struct { func (x *ProcessedDocument) Reset() { *x = ProcessedDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessedDocument) String() string { @@ -273,7 +269,7 @@ func (*ProcessedDocument) ProtoMessage() {} func (x *ProcessedDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +341,9 @@ type Document_Content struct { func (x *Document_Content) Reset() { *x = Document_Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Content) String() string { @@ -360,7 +354,7 @@ func (*Document_Content) ProtoMessage() {} func (x *Document_Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,11 +436,9 @@ type Document_AclInfo struct { func (x *Document_AclInfo) Reset() { *x = Document_AclInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_AclInfo) String() string { @@ -457,7 +449,7 @@ func (*Document_AclInfo) ProtoMessage() {} func (x *Document_AclInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +487,9 @@ type Document_IndexStatus struct { func (x *Document_IndexStatus) Reset() { *x = Document_IndexStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_IndexStatus) String() string { @@ -510,7 +500,7 @@ func (*Document_IndexStatus) ProtoMessage() {} func (x *Document_IndexStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +604,9 @@ type Document_AclInfo_AccessRestriction struct { func (x *Document_AclInfo_AccessRestriction) Reset() { *x = Document_AclInfo_AccessRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_AclInfo_AccessRestriction) String() string { @@ -629,7 +617,7 @@ func (*Document_AclInfo_AccessRestriction) ProtoMessage() {} func (x *Document_AclInfo_AccessRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,80 +834,6 @@ func file_google_cloud_discoveryengine_v1alpha_document_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessedDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Document_Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Document_AclInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Document_IndexStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Document_AclInfo_AccessRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_StructData)(nil), (*Document_JsonData)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/document_processing_config.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/document_processing_config.pb.go index d3ff0fcb839d..077e24bcf4a2 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/document_processing_config.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/document_processing_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/document_processing_config.proto @@ -76,11 +76,9 @@ type DocumentProcessingConfig struct { func (x *DocumentProcessingConfig) Reset() { *x = DocumentProcessingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig) String() string { @@ -91,7 +89,7 @@ func (*DocumentProcessingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type DocumentProcessingConfig_ChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig) String() string { @@ -165,7 +161,7 @@ func (*DocumentProcessingConfig_ChunkingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +220,9 @@ type DocumentProcessingConfig_ParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig) String() string { @@ -239,7 +233,7 @@ func (*DocumentProcessingConfig_ParsingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +325,9 @@ type DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) String() string { @@ -346,7 +338,7 @@ func (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoM func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +376,9 @@ type DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) String() string { @@ -399,7 +389,7 @@ func (*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoMessage func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type DocumentProcessingConfig_ParsingConfig_OcrParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_OcrParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) String() string { @@ -447,7 +435,7 @@ func (*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoMessage() { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) String() string { @@ -501,7 +487,7 @@ func (*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoMessage( func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,92 +698,6 @@ func file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_ if File_google_cloud_discoveryengine_v1alpha_document_processing_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_document_processing_config_proto_msgTypes[1].OneofWrappers = []any{ (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig_)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/document_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/document_service.pb.go index f597ef7b3cb5..b780b2cfafd0 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/document_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/document_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/document_service.proto @@ -235,11 +235,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -250,7 +248,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +310,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -327,7 +323,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +378,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -397,7 +391,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +456,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -477,7 +469,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +536,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -559,7 +549,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +608,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -633,7 +621,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +670,9 @@ type GetProcessedDocumentRequest struct { func (x *GetProcessedDocumentRequest) Reset() { *x = GetProcessedDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessedDocumentRequest) String() string { @@ -697,7 +683,7 @@ func (*GetProcessedDocumentRequest) ProtoMessage() {} func (x *GetProcessedDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +737,9 @@ type BatchGetDocumentsMetadataRequest struct { func (x *BatchGetDocumentsMetadataRequest) Reset() { *x = BatchGetDocumentsMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest) String() string { @@ -766,7 +750,7 @@ func (*BatchGetDocumentsMetadataRequest) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +794,9 @@ type BatchGetDocumentsMetadataResponse struct { func (x *BatchGetDocumentsMetadataResponse) Reset() { *x = BatchGetDocumentsMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse) String() string { @@ -825,7 +807,7 @@ func (*BatchGetDocumentsMetadataResponse) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +842,9 @@ type BatchGetDocumentsMetadataRequest_UrisMatcher struct { func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) Reset() { *x = BatchGetDocumentsMetadataRequest_UrisMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) String() string { @@ -875,7 +855,7 @@ func (*BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +895,9 @@ type BatchGetDocumentsMetadataRequest_Matcher struct { func (x *BatchGetDocumentsMetadataRequest_Matcher) Reset() { *x = BatchGetDocumentsMetadataRequest_Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_Matcher) String() string { @@ -930,7 +908,7 @@ func (*BatchGetDocumentsMetadataRequest_Matcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_Matcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -991,11 +969,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) String() string { @@ -1006,7 +982,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1036,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) String() string { @@ -1075,7 +1049,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoMes func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1632,164 +1606,6 @@ func file_google_cloud_discoveryengine_v1alpha_document_service_proto_init() { file_google_cloud_discoveryengine_v1alpha_document_proto_init() file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() file_google_cloud_discoveryengine_v1alpha_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessedDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_UrisMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_document_service_proto_msgTypes[10].OneofWrappers = []any{ (*BatchGetDocumentsMetadataRequest_Matcher_UrisMatcher)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/engine.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/engine.pb.go index 10d0dd0cf953..45289d82fe71 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/engine.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/engine.proto @@ -278,11 +278,9 @@ type Engine struct { func (x *Engine) Reset() { *x = Engine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine) String() string { @@ -293,7 +291,7 @@ func (*Engine) ProtoMessage() {} func (x *Engine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,11 +509,9 @@ type Engine_SearchEngineConfig struct { func (x *Engine_SearchEngineConfig) Reset() { *x = Engine_SearchEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_SearchEngineConfig) String() string { @@ -526,7 +522,7 @@ func (*Engine_SearchEngineConfig) ProtoMessage() {} func (x *Engine_SearchEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +560,9 @@ type Engine_SimilarDocumentsEngineConfig struct { func (x *Engine_SimilarDocumentsEngineConfig) Reset() { *x = Engine_SimilarDocumentsEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_SimilarDocumentsEngineConfig) String() string { @@ -579,7 +573,7 @@ func (*Engine_SimilarDocumentsEngineConfig) ProtoMessage() {} func (x *Engine_SimilarDocumentsEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +641,9 @@ type Engine_MediaRecommendationEngineConfig struct { func (x *Engine_MediaRecommendationEngineConfig) Reset() { *x = Engine_MediaRecommendationEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_MediaRecommendationEngineConfig) String() string { @@ -662,7 +654,7 @@ func (*Engine_MediaRecommendationEngineConfig) ProtoMessage() {} func (x *Engine_MediaRecommendationEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +733,9 @@ type Engine_ChatEngineConfig struct { func (x *Engine_ChatEngineConfig) Reset() { *x = Engine_ChatEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig) String() string { @@ -756,7 +746,7 @@ func (*Engine_ChatEngineConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +788,9 @@ type Engine_CommonConfig struct { func (x *Engine_CommonConfig) Reset() { *x = Engine_CommonConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_CommonConfig) String() string { @@ -813,7 +801,7 @@ func (*Engine_CommonConfig) ProtoMessage() {} func (x *Engine_CommonConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +855,9 @@ type Engine_RecommendationMetadata struct { func (x *Engine_RecommendationMetadata) Reset() { *x = Engine_RecommendationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_RecommendationMetadata) String() string { @@ -882,7 +868,7 @@ func (*Engine_RecommendationMetadata) ProtoMessage() {} func (x *Engine_RecommendationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,11 +928,9 @@ type Engine_ChatEngineMetadata struct { func (x *Engine_ChatEngineMetadata) Reset() { *x = Engine_ChatEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineMetadata) String() string { @@ -957,7 +941,7 @@ func (*Engine_ChatEngineMetadata) ProtoMessage() {} func (x *Engine_ChatEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +978,9 @@ type Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig struct { func (x *Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig) Reset() { *x = Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig) String() string { @@ -1009,7 +991,7 @@ func (*Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig) Proto func (x *Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,11 +1054,9 @@ type Engine_ChatEngineConfig_AgentCreationConfig struct { func (x *Engine_ChatEngineConfig_AgentCreationConfig) Reset() { *x = Engine_ChatEngineConfig_AgentCreationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig_AgentCreationConfig) String() string { @@ -1087,7 +1067,7 @@ func (*Engine_ChatEngineConfig_AgentCreationConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig_AgentCreationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,128 +1426,6 @@ func file_google_cloud_discoveryengine_v1alpha_engine_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Engine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Engine_SearchEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Engine_SimilarDocumentsEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Engine_MediaRecommendationEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Engine_CommonConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Engine_RecommendationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig_AgentCreationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_engine_proto_msgTypes[0].OneofWrappers = []any{ (*Engine_SimilarDocumentsConfig)(nil), (*Engine_ChatEngineConfig_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/engine_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/engine_service.pb.go index 640e554992d3..654c956d27e3 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/engine_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/engine_service.proto @@ -71,11 +71,9 @@ type CreateEngineRequest struct { func (x *CreateEngineRequest) Reset() { *x = CreateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineRequest) String() string { @@ -86,7 +84,7 @@ func (*CreateEngineRequest) ProtoMessage() {} func (x *CreateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type CreateEngineMetadata struct { func (x *CreateEngineMetadata) Reset() { *x = CreateEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineMetadata) String() string { @@ -155,7 +151,7 @@ func (*CreateEngineMetadata) ProtoMessage() {} func (x *CreateEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type DeleteEngineRequest struct { func (x *DeleteEngineRequest) Reset() { *x = DeleteEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineRequest) String() string { @@ -222,7 +216,7 @@ func (*DeleteEngineRequest) ProtoMessage() {} func (x *DeleteEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +256,9 @@ type DeleteEngineMetadata struct { func (x *DeleteEngineMetadata) Reset() { *x = DeleteEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineMetadata) String() string { @@ -277,7 +269,7 @@ func (*DeleteEngineMetadata) ProtoMessage() {} func (x *DeleteEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +314,9 @@ type GetEngineRequest struct { func (x *GetEngineRequest) Reset() { *x = GetEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEngineRequest) String() string { @@ -337,7 +327,7 @@ func (*GetEngineRequest) ProtoMessage() {} func (x *GetEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +371,9 @@ type ListEnginesRequest struct { func (x *ListEnginesRequest) Reset() { *x = ListEnginesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesRequest) String() string { @@ -396,7 +384,7 @@ func (*ListEnginesRequest) ProtoMessage() {} func (x *ListEnginesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +443,9 @@ type ListEnginesResponse struct { func (x *ListEnginesResponse) Reset() { *x = ListEnginesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesResponse) String() string { @@ -470,7 +456,7 @@ func (*ListEnginesResponse) ProtoMessage() {} func (x *ListEnginesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +513,9 @@ type UpdateEngineRequest struct { func (x *UpdateEngineRequest) Reset() { *x = UpdateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEngineRequest) String() string { @@ -542,7 +526,7 @@ func (*UpdateEngineRequest) ProtoMessage() {} func (x *UpdateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +569,9 @@ type PauseEngineRequest struct { func (x *PauseEngineRequest) Reset() { *x = PauseEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseEngineRequest) String() string { @@ -600,7 +582,7 @@ func (*PauseEngineRequest) ProtoMessage() {} func (x *PauseEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +618,9 @@ type ResumeEngineRequest struct { func (x *ResumeEngineRequest) Reset() { *x = ResumeEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeEngineRequest) String() string { @@ -651,7 +631,7 @@ func (*ResumeEngineRequest) ProtoMessage() {} func (x *ResumeEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +668,9 @@ type TuneEngineRequest struct { func (x *TuneEngineRequest) Reset() { *x = TuneEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineRequest) String() string { @@ -703,7 +681,7 @@ func (*TuneEngineRequest) ProtoMessage() {} func (x *TuneEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +717,9 @@ type TuneEngineMetadata struct { func (x *TuneEngineMetadata) Reset() { *x = TuneEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineMetadata) String() string { @@ -754,7 +730,7 @@ func (*TuneEngineMetadata) ProtoMessage() {} func (x *TuneEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +761,9 @@ type TuneEngineResponse struct { func (x *TuneEngineResponse) Reset() { *x = TuneEngineResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineResponse) String() string { @@ -800,7 +774,7 @@ func (*TuneEngineResponse) ProtoMessage() {} func (x *TuneEngineResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,164 +1129,6 @@ func file_google_cloud_discoveryengine_v1alpha_engine_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PauseEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResumeEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_engine_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/estimate_billing_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/estimate_billing_service.pb.go index d11bce319d3d..7ca0fe367a56 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/estimate_billing_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/estimate_billing_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto @@ -64,11 +64,9 @@ type EstimateDataSizeRequest struct { func (x *EstimateDataSizeRequest) Reset() { *x = EstimateDataSizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeRequest) String() string { @@ -79,7 +77,7 @@ func (*EstimateDataSizeRequest) ProtoMessage() {} func (x *EstimateDataSizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +154,9 @@ type EstimateDataSizeResponse struct { func (x *EstimateDataSizeResponse) Reset() { *x = EstimateDataSizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeResponse) String() string { @@ -171,7 +167,7 @@ func (*EstimateDataSizeResponse) ProtoMessage() {} func (x *EstimateDataSizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type EstimateDataSizeMetadata struct { func (x *EstimateDataSizeMetadata) Reset() { *x = EstimateDataSizeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeMetadata) String() string { @@ -228,7 +222,7 @@ func (*EstimateDataSizeMetadata) ProtoMessage() {} func (x *EstimateDataSizeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +258,9 @@ type EstimateDataSizeRequest_WebsiteDataSource struct { func (x *EstimateDataSizeRequest_WebsiteDataSource) Reset() { *x = EstimateDataSizeRequest_WebsiteDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeRequest_WebsiteDataSource) String() string { @@ -279,7 +271,7 @@ func (*EstimateDataSizeRequest_WebsiteDataSource) ProtoMessage() {} func (x *EstimateDataSizeRequest_WebsiteDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +310,9 @@ type EstimateDataSizeRequest_FileDataSource struct { func (x *EstimateDataSizeRequest_FileDataSource) Reset() { *x = EstimateDataSizeRequest_FileDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeRequest_FileDataSource) String() string { @@ -333,7 +323,7 @@ func (*EstimateDataSizeRequest_FileDataSource) ProtoMessage() {} func (x *EstimateDataSizeRequest_FileDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +397,9 @@ type EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern struct { func (x *EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern) Reset() { *x = EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern) String() string { @@ -422,7 +410,7 @@ func (*EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern) ProtoMessa func (x *EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,80 +635,6 @@ func file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_in return } file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeRequest_WebsiteDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeRequest_FileDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EstimateDataSizeRequest_WebsiteDataSource_EstimatorUriPattern); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_estimate_billing_service_proto_msgTypes[0].OneofWrappers = []any{ (*EstimateDataSizeRequest_WebsiteDataSource_)(nil), (*EstimateDataSizeRequest_FileDataSource_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/evaluation.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/evaluation.pb.go index 8bbb43f49e21..065711baaeb9 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/evaluation.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/evaluation.proto @@ -141,11 +141,9 @@ type Evaluation struct { func (x *Evaluation) Reset() { *x = Evaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation) String() string { @@ -156,7 +154,7 @@ func (*Evaluation) ProtoMessage() {} func (x *Evaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +307,9 @@ type QualityMetrics struct { func (x *QualityMetrics) Reset() { *x = QualityMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QualityMetrics) String() string { @@ -324,7 +320,7 @@ func (*QualityMetrics) ProtoMessage() {} func (x *QualityMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +388,9 @@ type Evaluation_EvaluationSpec struct { func (x *Evaluation_EvaluationSpec) Reset() { *x = Evaluation_EvaluationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_EvaluationSpec) String() string { @@ -407,7 +401,7 @@ func (*Evaluation_EvaluationSpec) ProtoMessage() {} func (x *Evaluation_EvaluationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +474,9 @@ type Evaluation_EvaluationSpec_QuerySetSpec struct { func (x *Evaluation_EvaluationSpec_QuerySetSpec) Reset() { *x = Evaluation_EvaluationSpec_QuerySetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_EvaluationSpec_QuerySetSpec) String() string { @@ -495,7 +487,7 @@ func (*Evaluation_EvaluationSpec_QuerySetSpec) ProtoMessage() {} func (x *Evaluation_EvaluationSpec_QuerySetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +527,9 @@ type QualityMetrics_TopkMetrics struct { func (x *QualityMetrics_TopkMetrics) Reset() { *x = QualityMetrics_TopkMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QualityMetrics_TopkMetrics) String() string { @@ -550,7 +540,7 @@ func (*QualityMetrics_TopkMetrics) ProtoMessage() {} func (x *QualityMetrics_TopkMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,68 +786,6 @@ func file_google_cloud_discoveryengine_v1alpha_evaluation_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QualityMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_EvaluationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_EvaluationSpec_QuerySetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QualityMetrics_TopkMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_evaluation_proto_msgTypes[2].OneofWrappers = []any{ (*Evaluation_EvaluationSpec_SearchRequest)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/evaluation_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/evaluation_service.pb.go index e6dcdab9eee0..ee56e6a82f98 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/evaluation_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/evaluation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/evaluation_service.proto @@ -65,11 +65,9 @@ type GetEvaluationRequest struct { func (x *GetEvaluationRequest) Reset() { *x = GetEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationRequest) String() string { @@ -80,7 +78,7 @@ func (*GetEvaluationRequest) ProtoMessage() {} func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type ListEvaluationsRequest struct { func (x *ListEvaluationsRequest) Reset() { *x = ListEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsRequest) String() string { @@ -155,7 +151,7 @@ func (*ListEvaluationsRequest) ProtoMessage() {} func (x *ListEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type ListEvaluationsResponse struct { func (x *ListEvaluationsResponse) Reset() { *x = ListEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsResponse) String() string { @@ -225,7 +219,7 @@ func (*ListEvaluationsResponse) ProtoMessage() {} func (x *ListEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +266,9 @@ type CreateEvaluationRequest struct { func (x *CreateEvaluationRequest) Reset() { *x = CreateEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEvaluationRequest) String() string { @@ -287,7 +279,7 @@ func (*CreateEvaluationRequest) ProtoMessage() {} func (x *CreateEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +319,9 @@ type CreateEvaluationMetadata struct { func (x *CreateEvaluationMetadata) Reset() { *x = CreateEvaluationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEvaluationMetadata) String() string { @@ -342,7 +332,7 @@ func (*CreateEvaluationMetadata) ProtoMessage() {} func (x *CreateEvaluationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +383,9 @@ type ListEvaluationResultsRequest struct { func (x *ListEvaluationResultsRequest) Reset() { *x = ListEvaluationResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsRequest) String() string { @@ -408,7 +396,7 @@ func (*ListEvaluationResultsRequest) ProtoMessage() {} func (x *ListEvaluationResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +452,9 @@ type ListEvaluationResultsResponse struct { func (x *ListEvaluationResultsResponse) Reset() { *x = ListEvaluationResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsResponse) String() string { @@ -479,7 +465,7 @@ func (*ListEvaluationResultsResponse) ProtoMessage() {} func (x *ListEvaluationResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +512,9 @@ type ListEvaluationResultsResponse_EvaluationResult struct { func (x *ListEvaluationResultsResponse_EvaluationResult) Reset() { *x = ListEvaluationResultsResponse_EvaluationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsResponse_EvaluationResult) String() string { @@ -541,7 +525,7 @@ func (*ListEvaluationResultsResponse_EvaluationResult) ProtoMessage() {} func (x *ListEvaluationResultsResponse_EvaluationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -817,104 +801,6 @@ func file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_init() { } file_google_cloud_discoveryengine_v1alpha_evaluation_proto_init() file_google_cloud_discoveryengine_v1alpha_sample_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEvaluationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_evaluation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsResponse_EvaluationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/grounded_generation_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/grounded_generation_service.pb.go index 660e54bb1513..47bcd9d2d543 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/grounded_generation_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/grounded_generation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto @@ -56,11 +56,9 @@ type CheckGroundingSpec struct { func (x *CheckGroundingSpec) Reset() { *x = CheckGroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingSpec) String() string { @@ -71,7 +69,7 @@ func (*CheckGroundingSpec) ProtoMessage() {} func (x *CheckGroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,11 +131,9 @@ type CheckGroundingRequest struct { func (x *CheckGroundingRequest) Reset() { *x = CheckGroundingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingRequest) String() string { @@ -148,7 +144,7 @@ func (*CheckGroundingRequest) ProtoMessage() {} func (x *CheckGroundingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +215,9 @@ type CheckGroundingResponse struct { func (x *CheckGroundingResponse) Reset() { *x = CheckGroundingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse) String() string { @@ -234,7 +228,7 @@ func (*CheckGroundingResponse) ProtoMessage() {} func (x *CheckGroundingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +299,9 @@ type CheckGroundingResponse_Claim struct { func (x *CheckGroundingResponse_Claim) Reset() { *x = CheckGroundingResponse_Claim{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse_Claim) String() string { @@ -320,7 +312,7 @@ func (*CheckGroundingResponse_Claim) ProtoMessage() {} func (x *CheckGroundingResponse_Claim) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,56 +540,6 @@ func file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto return } file_google_cloud_discoveryengine_v1alpha_grounding_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse_Claim); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[2].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_grounded_generation_service_proto_msgTypes[4].OneofWrappers = []any{} diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/grounding.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/grounding.pb.go index 909bcff796f1..f77821f73957 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/grounding.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/grounding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/grounding.proto @@ -52,11 +52,9 @@ type GroundingFact struct { func (x *GroundingFact) Reset() { *x = GroundingFact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingFact) String() string { @@ -67,7 +65,7 @@ func (*GroundingFact) ProtoMessage() {} func (x *GroundingFact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type FactChunk struct { func (x *FactChunk) Reset() { *x = FactChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FactChunk) String() string { @@ -132,7 +128,7 @@ func (*FactChunk) ProtoMessage() {} func (x *FactChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,32 +268,6 @@ func file_google_cloud_discoveryengine_v1alpha_grounding_proto_init() { if File_google_cloud_discoveryengine_v1alpha_grounding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroundingFact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_grounding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FactChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/import_config.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/import_config.pb.go index 77af255f91cc..811b08c0c5d5 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/import_config.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/import_config.proto @@ -272,11 +272,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -287,7 +285,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +367,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -384,7 +380,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +479,9 @@ type SpannerSource struct { func (x *SpannerSource) Reset() { *x = SpannerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerSource) String() string { @@ -498,7 +492,7 @@ func (*SpannerSource) ProtoMessage() {} func (x *SpannerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +560,9 @@ type BigtableOptions struct { func (x *BigtableOptions) Reset() { *x = BigtableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions) String() string { @@ -581,7 +573,7 @@ func (*BigtableOptions) ProtoMessage() {} func (x *BigtableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +623,9 @@ type BigtableSource struct { func (x *BigtableSource) Reset() { *x = BigtableSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableSource) String() string { @@ -646,7 +636,7 @@ func (*BigtableSource) ProtoMessage() {} func (x *BigtableSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +702,9 @@ type FhirStoreSource struct { func (x *FhirStoreSource) Reset() { *x = FhirStoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FhirStoreSource) String() string { @@ -727,7 +715,7 @@ func (*FhirStoreSource) ProtoMessage() {} func (x *FhirStoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +785,9 @@ type CloudSqlSource struct { func (x *CloudSqlSource) Reset() { *x = CloudSqlSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlSource) String() string { @@ -812,7 +798,7 @@ func (*CloudSqlSource) ProtoMessage() {} func (x *CloudSqlSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +888,9 @@ type AlloyDbSource struct { func (x *AlloyDbSource) Reset() { *x = AlloyDbSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSource) String() string { @@ -917,7 +901,7 @@ func (*AlloyDbSource) ProtoMessage() {} func (x *AlloyDbSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1001,11 +985,9 @@ type FirestoreSource struct { func (x *FirestoreSource) Reset() { *x = FirestoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirestoreSource) String() string { @@ -1016,7 +998,7 @@ func (*FirestoreSource) ProtoMessage() {} func (x *FirestoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1057,9 @@ type ImportErrorConfig struct { func (x *ImportErrorConfig) Reset() { *x = ImportErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorConfig) String() string { @@ -1090,7 +1070,7 @@ func (*ImportErrorConfig) ProtoMessage() {} func (x *ImportErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1137,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -1172,7 +1150,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1276,11 +1254,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1291,7 +1267,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1330,9 @@ type ImportUserEventsMetadata struct { func (x *ImportUserEventsMetadata) Reset() { *x = ImportUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsMetadata) String() string { @@ -1369,7 +1343,7 @@ func (*ImportUserEventsMetadata) ProtoMessage() {} func (x *ImportUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1408,9 @@ type ImportDocumentsMetadata struct { func (x *ImportDocumentsMetadata) Reset() { *x = ImportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata) String() string { @@ -1449,7 +1421,7 @@ func (*ImportDocumentsMetadata) ProtoMessage() {} func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1597,11 +1569,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -1612,7 +1582,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1823,11 +1793,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -1838,7 +1806,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1889,11 +1857,9 @@ type ImportSuggestionDenyListEntriesRequest struct { func (x *ImportSuggestionDenyListEntriesRequest) Reset() { *x = ImportSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest) String() string { @@ -1904,7 +1870,7 @@ func (*ImportSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1992,11 +1958,9 @@ type ImportSuggestionDenyListEntriesResponse struct { func (x *ImportSuggestionDenyListEntriesResponse) Reset() { *x = ImportSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesResponse) String() string { @@ -2007,7 +1971,7 @@ func (*ImportSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,11 +2024,9 @@ type ImportSuggestionDenyListEntriesMetadata struct { func (x *ImportSuggestionDenyListEntriesMetadata) Reset() { *x = ImportSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesMetadata) String() string { @@ -2075,7 +2037,7 @@ func (*ImportSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2131,11 +2093,9 @@ type ImportCompletionSuggestionsRequest struct { func (x *ImportCompletionSuggestionsRequest) Reset() { *x = ImportCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest) String() string { @@ -2146,7 +2106,7 @@ func (*ImportCompletionSuggestionsRequest) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2248,11 +2208,9 @@ type ImportCompletionSuggestionsResponse struct { func (x *ImportCompletionSuggestionsResponse) Reset() { *x = ImportCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsResponse) String() string { @@ -2263,7 +2221,7 @@ func (*ImportCompletionSuggestionsResponse) ProtoMessage() {} func (x *ImportCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2317,11 +2275,9 @@ type ImportCompletionSuggestionsMetadata struct { func (x *ImportCompletionSuggestionsMetadata) Reset() { *x = ImportCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsMetadata) String() string { @@ -2332,7 +2288,7 @@ func (*ImportCompletionSuggestionsMetadata) ProtoMessage() {} func (x *ImportCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2405,11 +2361,9 @@ type ImportSampleQueriesRequest struct { func (x *ImportSampleQueriesRequest) Reset() { *x = ImportSampleQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesRequest) String() string { @@ -2420,7 +2374,7 @@ func (*ImportSampleQueriesRequest) ProtoMessage() {} func (x *ImportSampleQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2520,11 +2474,9 @@ type ImportSampleQueriesResponse struct { func (x *ImportSampleQueriesResponse) Reset() { *x = ImportSampleQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesResponse) String() string { @@ -2535,7 +2487,7 @@ func (*ImportSampleQueriesResponse) ProtoMessage() {} func (x *ImportSampleQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2591,11 +2543,9 @@ type ImportSampleQueriesMetadata struct { func (x *ImportSampleQueriesMetadata) Reset() { *x = ImportSampleQueriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesMetadata) String() string { @@ -2606,7 +2556,7 @@ func (*ImportSampleQueriesMetadata) ProtoMessage() {} func (x *ImportSampleQueriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2687,11 +2637,9 @@ type BigtableOptions_BigtableColumnFamily struct { func (x *BigtableOptions_BigtableColumnFamily) Reset() { *x = BigtableOptions_BigtableColumnFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumnFamily) String() string { @@ -2702,7 +2650,7 @@ func (*BigtableOptions_BigtableColumnFamily) ProtoMessage() {} func (x *BigtableOptions_BigtableColumnFamily) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2776,11 +2724,9 @@ type BigtableOptions_BigtableColumn struct { func (x *BigtableOptions_BigtableColumn) Reset() { *x = BigtableOptions_BigtableColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumn) String() string { @@ -2791,7 +2737,7 @@ func (*BigtableOptions_BigtableColumn) ProtoMessage() {} func (x *BigtableOptions_BigtableColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2846,11 +2792,9 @@ type ImportUserEventsRequest_InlineSource struct { func (x *ImportUserEventsRequest_InlineSource) Reset() { *x = ImportUserEventsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest_InlineSource) String() string { @@ -2861,7 +2805,7 @@ func (*ImportUserEventsRequest_InlineSource) ProtoMessage() {} func (x *ImportUserEventsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2897,11 +2841,9 @@ type ImportDocumentsRequest_InlineSource struct { func (x *ImportDocumentsRequest_InlineSource) Reset() { *x = ImportDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest_InlineSource) String() string { @@ -2912,7 +2854,7 @@ func (*ImportDocumentsRequest_InlineSource) ProtoMessage() {} func (x *ImportDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2946,11 +2888,9 @@ type ImportSuggestionDenyListEntriesRequest_InlineSource struct { func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) Reset() { *x = ImportSuggestionDenyListEntriesRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) String() string { @@ -2961,7 +2901,7 @@ func (*ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2995,11 +2935,9 @@ type ImportCompletionSuggestionsRequest_InlineSource struct { func (x *ImportCompletionSuggestionsRequest_InlineSource) Reset() { *x = ImportCompletionSuggestionsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest_InlineSource) String() string { @@ -3010,7 +2948,7 @@ func (*ImportCompletionSuggestionsRequest_InlineSource) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3047,11 +2985,9 @@ type ImportSampleQueriesRequest_InlineSource struct { func (x *ImportSampleQueriesRequest_InlineSource) Reset() { *x = ImportSampleQueriesRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesRequest_InlineSource) String() string { @@ -3062,7 +2998,7 @@ func (*ImportSampleQueriesRequest_InlineSource) ProtoMessage() {} func (x *ImportSampleQueriesRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3820,392 +3756,6 @@ func file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() { file_google_cloud_discoveryengine_v1alpha_document_proto_init() file_google_cloud_discoveryengine_v1alpha_sample_query_proto_init() file_google_cloud_discoveryengine_v1alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpannerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigtableSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FhirStoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FirestoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumnFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/project.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/project.pb.go index f822412f389f..77cc58cfe01a 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/project.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/project.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/project.proto @@ -118,11 +118,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -133,7 +131,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type Project_ServiceTerms struct { func (x *Project_ServiceTerms) Reset() { *x = Project_ServiceTerms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project_ServiceTerms) String() string { @@ -222,7 +218,7 @@ func (*Project_ServiceTerms) ProtoMessage() {} func (x *Project_ServiceTerms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,32 +398,6 @@ func file_google_cloud_discoveryengine_v1alpha_project_proto_init() { if File_google_cloud_discoveryengine_v1alpha_project_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_project_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Project_ServiceTerms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/project_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/project_service.pb.go index ff24e6ab6228..68d56f59100e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/project_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/project_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/project_service.proto @@ -108,11 +108,9 @@ type GetProjectRequest struct { func (x *GetProjectRequest) Reset() { *x = GetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectRequest) String() string { @@ -123,7 +121,7 @@ func (*GetProjectRequest) ProtoMessage() {} func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +169,9 @@ type ProvisionProjectRequest struct { func (x *ProvisionProjectRequest) Reset() { *x = ProvisionProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectRequest) String() string { @@ -186,7 +182,7 @@ func (*ProvisionProjectRequest) ProtoMessage() {} func (x *ProvisionProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type ProvisionProjectMetadata struct { func (x *ProvisionProjectMetadata) Reset() { *x = ProvisionProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectMetadata) String() string { @@ -246,7 +240,7 @@ func (*ProvisionProjectMetadata) ProtoMessage() {} func (x *ProvisionProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type ReportConsentChangeRequest struct { func (x *ReportConsentChangeRequest) Reset() { *x = ReportConsentChangeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportConsentChangeRequest) String() string { @@ -305,7 +297,7 @@ func (*ReportConsentChangeRequest) ProtoMessage() {} func (x *ReportConsentChangeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,56 +525,6 @@ func file_google_cloud_discoveryengine_v1alpha_project_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_project_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_project_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReportConsentChangeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/purge_config.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/purge_config.pb.go index d9e90841868a..24ce68397f53 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/purge_config.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/purge_config.proto @@ -85,11 +85,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -100,7 +98,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -165,7 +161,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type PurgeUserEventsMetadata struct { func (x *PurgeUserEventsMetadata) Reset() { *x = PurgeUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsMetadata) String() string { @@ -222,7 +216,7 @@ func (*PurgeUserEventsMetadata) ProtoMessage() {} func (x *PurgeUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type PurgeErrorConfig struct { func (x *PurgeErrorConfig) Reset() { *x = PurgeErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeErrorConfig) String() string { @@ -296,7 +288,7 @@ func (*PurgeErrorConfig) ProtoMessage() {} func (x *PurgeErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type PurgeDocumentsRequest struct { func (x *PurgeDocumentsRequest) Reset() { *x = PurgeDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest) String() string { @@ -385,7 +375,7 @@ func (*PurgeDocumentsRequest) ProtoMessage() {} func (x *PurgeDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +479,9 @@ type PurgeDocumentsResponse struct { func (x *PurgeDocumentsResponse) Reset() { *x = PurgeDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsResponse) String() string { @@ -504,7 +492,7 @@ func (*PurgeDocumentsResponse) ProtoMessage() {} func (x *PurgeDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +543,9 @@ type PurgeDocumentsMetadata struct { func (x *PurgeDocumentsMetadata) Reset() { *x = PurgeDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsMetadata) String() string { @@ -570,7 +556,7 @@ func (*PurgeDocumentsMetadata) ProtoMessage() {} func (x *PurgeDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +621,9 @@ type PurgeSuggestionDenyListEntriesRequest struct { func (x *PurgeSuggestionDenyListEntriesRequest) Reset() { *x = PurgeSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesRequest) String() string { @@ -650,7 +634,7 @@ func (*PurgeSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +672,9 @@ type PurgeSuggestionDenyListEntriesResponse struct { func (x *PurgeSuggestionDenyListEntriesResponse) Reset() { *x = PurgeSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesResponse) String() string { @@ -703,7 +685,7 @@ func (*PurgeSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +731,9 @@ type PurgeSuggestionDenyListEntriesMetadata struct { func (x *PurgeSuggestionDenyListEntriesMetadata) Reset() { *x = PurgeSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesMetadata) String() string { @@ -764,7 +744,7 @@ func (*PurgeSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +789,9 @@ type PurgeCompletionSuggestionsRequest struct { func (x *PurgeCompletionSuggestionsRequest) Reset() { *x = PurgeCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsRequest) String() string { @@ -824,7 +802,7 @@ func (*PurgeCompletionSuggestionsRequest) ProtoMessage() {} func (x *PurgeCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +840,9 @@ type PurgeCompletionSuggestionsResponse struct { func (x *PurgeCompletionSuggestionsResponse) Reset() { *x = PurgeCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsResponse) String() string { @@ -877,7 +853,7 @@ func (*PurgeCompletionSuggestionsResponse) ProtoMessage() {} func (x *PurgeCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +899,9 @@ type PurgeCompletionSuggestionsMetadata struct { func (x *PurgeCompletionSuggestionsMetadata) Reset() { *x = PurgeCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsMetadata) String() string { @@ -938,7 +912,7 @@ func (*PurgeCompletionSuggestionsMetadata) ProtoMessage() {} func (x *PurgeCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +958,9 @@ type PurgeDocumentsRequest_InlineSource struct { func (x *PurgeDocumentsRequest_InlineSource) Reset() { *x = PurgeDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest_InlineSource) String() string { @@ -999,7 +971,7 @@ func (*PurgeDocumentsRequest_InlineSource) ProtoMessage() {} func (x *PurgeDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,176 +1234,6 @@ func file_google_cloud_discoveryengine_v1alpha_purge_config_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_purge_config_proto_msgTypes[3].OneofWrappers = []any{ (*PurgeErrorConfig_GcsPrefix)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/rank_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/rank_service.pb.go index 656f0f736e54..618e107f17be 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/rank_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/rank_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/rank_service.proto @@ -68,11 +68,9 @@ type RankingRecord struct { func (x *RankingRecord) Reset() { *x = RankingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankingRecord) String() string { @@ -83,7 +81,7 @@ func (*RankingRecord) ProtoMessage() {} func (x *RankingRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +174,9 @@ type RankRequest struct { func (x *RankRequest) Reset() { *x = RankRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankRequest) String() string { @@ -191,7 +187,7 @@ func (*RankRequest) ProtoMessage() {} func (x *RankRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +265,9 @@ type RankResponse struct { func (x *RankResponse) Reset() { *x = RankResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankResponse) String() string { @@ -284,7 +278,7 @@ func (*RankResponse) ProtoMessage() {} func (x *RankResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,44 +436,6 @@ func file_google_cloud_discoveryengine_v1alpha_rank_service_proto_init() { if File_google_cloud_discoveryengine_v1alpha_rank_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RankingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RankRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_rank_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RankResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/recommendation_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/recommendation_service.pb.go index 5ea7fb47b40b..1ce665fd3a0e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/recommendation_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/recommendation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto @@ -168,11 +168,9 @@ type RecommendRequest struct { func (x *RecommendRequest) Reset() { *x = RecommendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendRequest) String() string { @@ -183,7 +181,7 @@ func (*RecommendRequest) ProtoMessage() {} func (x *RecommendRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type RecommendResponse struct { func (x *RecommendResponse) Reset() { *x = RecommendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse) String() string { @@ -287,7 +283,7 @@ func (*RecommendResponse) ProtoMessage() {} func (x *RecommendResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type RecommendResponse_RecommendationResult struct { func (x *RecommendResponse_RecommendationResult) Reset() { *x = RecommendResponse_RecommendationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse_RecommendationResult) String() string { @@ -369,7 +363,7 @@ func (*RecommendResponse_RecommendationResult) ProtoMessage() {} func (x *RecommendResponse_RecommendationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,44 +604,6 @@ func file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_init } file_google_cloud_discoveryengine_v1alpha_document_proto_init() file_google_cloud_discoveryengine_v1alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecommendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_recommendation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse_RecommendationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query.pb.go index 32427dae1ca2..25998612df90 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/sample_query.proto @@ -63,11 +63,9 @@ type SampleQuery struct { func (x *SampleQuery) Reset() { *x = SampleQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery) String() string { @@ -78,7 +76,7 @@ func (*SampleQuery) ProtoMessage() {} func (x *SampleQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type SampleQuery_QueryEntry struct { func (x *SampleQuery_QueryEntry) Reset() { *x = SampleQuery_QueryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery_QueryEntry) String() string { @@ -161,7 +157,7 @@ func (*SampleQuery_QueryEntry) ProtoMessage() {} func (x *SampleQuery_QueryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type SampleQuery_QueryEntry_Target struct { func (x *SampleQuery_QueryEntry_Target) Reset() { *x = SampleQuery_QueryEntry_Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery_QueryEntry_Target) String() string { @@ -229,7 +223,7 @@ func (*SampleQuery_QueryEntry_Target) ProtoMessage() {} func (x *SampleQuery_QueryEntry_Target) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,44 +368,6 @@ func file_google_cloud_discoveryengine_v1alpha_sample_query_proto_init() { if File_google_cloud_discoveryengine_v1alpha_sample_query_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery_QueryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery_QueryEntry_Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_sample_query_proto_msgTypes[0].OneofWrappers = []any{ (*SampleQuery_QueryEntry_)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_service.pb.go index a11ed9e303a2..3bff3fd6fca6 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/sample_query_service.proto @@ -67,11 +67,9 @@ type GetSampleQueryRequest struct { func (x *GetSampleQueryRequest) Reset() { *x = GetSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSampleQueryRequest) String() string { @@ -82,7 +80,7 @@ func (*GetSampleQueryRequest) ProtoMessage() {} func (x *GetSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type ListSampleQueriesRequest struct { func (x *ListSampleQueriesRequest) Reset() { *x = ListSampleQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQueriesRequest) String() string { @@ -157,7 +153,7 @@ func (*ListSampleQueriesRequest) ProtoMessage() {} func (x *ListSampleQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,11 +208,9 @@ type ListSampleQueriesResponse struct { func (x *ListSampleQueriesResponse) Reset() { *x = ListSampleQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQueriesResponse) String() string { @@ -227,7 +221,7 @@ func (*ListSampleQueriesResponse) ProtoMessage() {} func (x *ListSampleQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +287,9 @@ type CreateSampleQueryRequest struct { func (x *CreateSampleQueryRequest) Reset() { *x = CreateSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSampleQueryRequest) String() string { @@ -308,7 +300,7 @@ func (*CreateSampleQueryRequest) ProtoMessage() {} func (x *CreateSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type UpdateSampleQueryRequest struct { func (x *UpdateSampleQueryRequest) Reset() { *x = UpdateSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSampleQueryRequest) String() string { @@ -383,7 +373,7 @@ func (*UpdateSampleQueryRequest) ProtoMessage() {} func (x *UpdateSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +425,9 @@ type DeleteSampleQueryRequest struct { func (x *DeleteSampleQueryRequest) Reset() { *x = DeleteSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSampleQueryRequest) String() string { @@ -450,7 +438,7 @@ func (*DeleteSampleQueryRequest) ProtoMessage() {} func (x *DeleteSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -744,80 +732,6 @@ func file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_init() } file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() file_google_cloud_discoveryengine_v1alpha_sample_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set.pb.go index 7f02572b8104..22dddbcd6fc5 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/sample_query_set.proto @@ -68,11 +68,9 @@ type SampleQuerySet struct { func (x *SampleQuerySet) Reset() { *x = SampleQuerySet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuerySet) String() string { @@ -83,7 +81,7 @@ func (*SampleQuerySet) ProtoMessage() {} func (x *SampleQuerySet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,20 +211,6 @@ func file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_init() { if File_google_cloud_discoveryengine_v1alpha_sample_query_set_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuerySet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set_service.pb.go index 48acc82ea09f..1cb2bd374738 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/sample_query_set_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto @@ -68,11 +68,9 @@ type GetSampleQuerySetRequest struct { func (x *GetSampleQuerySetRequest) Reset() { *x = GetSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSampleQuerySetRequest) String() string { @@ -83,7 +81,7 @@ func (*GetSampleQuerySetRequest) ProtoMessage() {} func (x *GetSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +141,9 @@ type ListSampleQuerySetsRequest struct { func (x *ListSampleQuerySetsRequest) Reset() { *x = ListSampleQuerySetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQuerySetsRequest) String() string { @@ -158,7 +154,7 @@ func (*ListSampleQuerySetsRequest) ProtoMessage() {} func (x *ListSampleQuerySetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type ListSampleQuerySetsResponse struct { func (x *ListSampleQuerySetsResponse) Reset() { *x = ListSampleQuerySetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQuerySetsResponse) String() string { @@ -228,7 +222,7 @@ func (*ListSampleQuerySetsResponse) ProtoMessage() {} func (x *ListSampleQuerySetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type CreateSampleQuerySetRequest struct { func (x *CreateSampleQuerySetRequest) Reset() { *x = CreateSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSampleQuerySetRequest) String() string { @@ -311,7 +303,7 @@ func (*CreateSampleQuerySetRequest) ProtoMessage() {} func (x *CreateSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type UpdateSampleQuerySetRequest struct { func (x *UpdateSampleQuerySetRequest) Reset() { *x = UpdateSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSampleQuerySetRequest) String() string { @@ -388,7 +378,7 @@ func (*UpdateSampleQuerySetRequest) ProtoMessage() {} func (x *UpdateSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +433,9 @@ type DeleteSampleQuerySetRequest struct { func (x *DeleteSampleQuerySetRequest) Reset() { *x = DeleteSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSampleQuerySetRequest) String() string { @@ -458,7 +446,7 @@ func (*DeleteSampleQuerySetRequest) ProtoMessage() {} func (x *DeleteSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,80 +710,6 @@ func file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_in return } file_google_cloud_discoveryengine_v1alpha_sample_query_set_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQuerySetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQuerySetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_sample_query_set_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/schema.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/schema.pb.go index 8b200b58a71e..91d31dee3c92 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/schema.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/schema.proto @@ -537,11 +537,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -552,7 +550,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +792,9 @@ type FieldConfig struct { func (x *FieldConfig) Reset() { *x = FieldConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldConfig) String() string { @@ -809,7 +805,7 @@ func (*FieldConfig) ProtoMessage() {} func (x *FieldConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,32 +1139,6 @@ func file_google_cloud_discoveryengine_v1alpha_schema_proto_init() { if File_google_cloud_discoveryengine_v1alpha_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FieldConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_schema_proto_msgTypes[0].OneofWrappers = []any{ (*Schema_StructSchema)(nil), (*Schema_JsonSchema)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/schema_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/schema_service.pb.go index 42c79c10c2fc..44fb4209e68a 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/schema_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/schema_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/schema_service.proto @@ -58,11 +58,9 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSchemaRequest) String() string { @@ -73,7 +71,7 @@ func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ListSchemasRequest struct { func (x *ListSchemasRequest) Reset() { *x = ListSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasRequest) String() string { @@ -142,7 +138,7 @@ func (*ListSchemasRequest) ProtoMessage() {} func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type ListSchemasResponse struct { func (x *ListSchemasResponse) Reset() { *x = ListSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasResponse) String() string { @@ -212,7 +206,7 @@ func (*ListSchemasResponse) ProtoMessage() {} func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +262,9 @@ type CreateSchemaRequest struct { func (x *CreateSchemaRequest) Reset() { *x = CreateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaRequest) String() string { @@ -283,7 +275,7 @@ func (*CreateSchemaRequest) ProtoMessage() {} func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +331,9 @@ type UpdateSchemaRequest struct { func (x *UpdateSchemaRequest) Reset() { *x = UpdateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaRequest) String() string { @@ -354,7 +344,7 @@ func (*UpdateSchemaRequest) ProtoMessage() {} func (x *UpdateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +388,9 @@ type DeleteSchemaRequest struct { func (x *DeleteSchemaRequest) Reset() { *x = DeleteSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaRequest) String() string { @@ -413,7 +401,7 @@ func (*DeleteSchemaRequest) ProtoMessage() {} func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +438,9 @@ type CreateSchemaMetadata struct { func (x *CreateSchemaMetadata) Reset() { *x = CreateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaMetadata) String() string { @@ -465,7 +451,7 @@ func (*CreateSchemaMetadata) ProtoMessage() {} func (x *CreateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +495,9 @@ type UpdateSchemaMetadata struct { func (x *UpdateSchemaMetadata) Reset() { *x = UpdateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaMetadata) String() string { @@ -524,7 +508,7 @@ func (*UpdateSchemaMetadata) ProtoMessage() {} func (x *UpdateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +552,9 @@ type DeleteSchemaMetadata struct { func (x *DeleteSchemaMetadata) Reset() { *x = DeleteSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaMetadata) String() string { @@ -583,7 +565,7 @@ func (*DeleteSchemaMetadata) ProtoMessage() {} func (x *DeleteSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -911,116 +893,6 @@ func file_google_cloud_discoveryengine_v1alpha_schema_service_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_schema_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/search_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/search_service.pb.go index 1ae787885109..3b4ee23e319e 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/search_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/search_service.proto @@ -1010,11 +1010,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -1025,7 +1023,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1325,11 +1323,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1340,7 +1336,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1474,11 +1470,9 @@ type SearchRequest_ImageQuery struct { func (x *SearchRequest_ImageQuery) Reset() { *x = SearchRequest_ImageQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ImageQuery) String() string { @@ -1489,7 +1483,7 @@ func (*SearchRequest_ImageQuery) ProtoMessage() {} func (x *SearchRequest_ImageQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1546,11 +1540,9 @@ type SearchRequest_DataStoreSpec struct { func (x *SearchRequest_DataStoreSpec) Reset() { *x = SearchRequest_DataStoreSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DataStoreSpec) String() string { @@ -1561,7 +1553,7 @@ func (*SearchRequest_DataStoreSpec) ProtoMessage() {} func (x *SearchRequest_DataStoreSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1661,11 +1653,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1676,7 +1666,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1724,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1749,7 +1737,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1777,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1804,7 +1790,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1833,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1862,7 +1846,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1912,11 +1896,9 @@ type SearchRequest_ContentSearchSpec struct { func (x *SearchRequest_ContentSearchSpec) Reset() { *x = SearchRequest_ContentSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec) String() string { @@ -1927,7 +1909,7 @@ func (*SearchRequest_ContentSearchSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1990,11 +1972,9 @@ type SearchRequest_EmbeddingSpec struct { func (x *SearchRequest_EmbeddingSpec) Reset() { *x = SearchRequest_EmbeddingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_EmbeddingSpec) String() string { @@ -2005,7 +1985,7 @@ func (*SearchRequest_EmbeddingSpec) ProtoMessage() {} func (x *SearchRequest_EmbeddingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2048,11 +2028,9 @@ type SearchRequest_NaturalLanguageQueryUnderstandingSpec struct { func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) Reset() { *x = SearchRequest_NaturalLanguageQueryUnderstandingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) String() string { @@ -2063,7 +2041,7 @@ func (*SearchRequest_NaturalLanguageQueryUnderstandingSpec) ProtoMessage() {} func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2106,11 +2084,9 @@ type SearchRequest_SearchAsYouTypeSpec struct { func (x *SearchRequest_SearchAsYouTypeSpec) Reset() { *x = SearchRequest_SearchAsYouTypeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SearchAsYouTypeSpec) String() string { @@ -2121,7 +2097,7 @@ func (*SearchRequest_SearchAsYouTypeSpec) ProtoMessage() {} func (x *SearchRequest_SearchAsYouTypeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2192,11 +2168,9 @@ type SearchRequest_SessionSpec struct { func (x *SearchRequest_SessionSpec) Reset() { *x = SearchRequest_SessionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SessionSpec) String() string { @@ -2207,7 +2181,7 @@ func (*SearchRequest_SessionSpec) ProtoMessage() {} func (x *SearchRequest_SessionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2295,11 +2269,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -2310,7 +2282,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2418,11 +2390,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -2433,7 +2403,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2497,11 +2467,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -2512,7 +2480,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoMessage func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2577,11 +2545,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint st func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -2592,7 +2558,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2646,11 +2612,9 @@ type SearchRequest_ContentSearchSpec_SnippetSpec struct { func (x *SearchRequest_ContentSearchSpec_SnippetSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SnippetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SnippetSpec) String() string { @@ -2661,7 +2625,7 @@ func (*SearchRequest_ContentSearchSpec_SnippetSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SnippetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2785,11 +2749,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec) String() string { @@ -2800,7 +2762,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2934,11 +2896,9 @@ type SearchRequest_ContentSearchSpec_ExtractiveContentSpec struct { func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ExtractiveContentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) String() string { @@ -2949,7 +2909,7 @@ func (*SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +2981,9 @@ type SearchRequest_ContentSearchSpec_ChunkSpec struct { func (x *SearchRequest_ContentSearchSpec_ChunkSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ChunkSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ChunkSpec) String() string { @@ -3036,7 +2994,7 @@ func (*SearchRequest_ContentSearchSpec_ChunkSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ChunkSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3078,11 +3036,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) String() string { @@ -3093,7 +3049,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoMessage func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3138,11 +3094,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) String() string { @@ -3153,7 +3107,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3189,11 +3143,9 @@ type SearchRequest_EmbeddingSpec_EmbeddingVector struct { func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) Reset() { *x = SearchRequest_EmbeddingSpec_EmbeddingVector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) String() string { @@ -3204,7 +3156,7 @@ func (*SearchRequest_EmbeddingSpec_EmbeddingVector) ProtoMessage() {} func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3256,11 +3208,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -3271,7 +3221,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3331,11 +3281,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -3346,7 +3294,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3397,11 +3345,9 @@ type SearchResponse_GuidedSearchResult struct { func (x *SearchResponse_GuidedSearchResult) Reset() { *x = SearchResponse_GuidedSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GuidedSearchResult) String() string { @@ -3412,7 +3358,7 @@ func (*SearchResponse_GuidedSearchResult) ProtoMessage() {} func (x *SearchResponse_GuidedSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3461,11 +3407,9 @@ type SearchResponse_Summary struct { func (x *SearchResponse_Summary) Reset() { *x = SearchResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary) String() string { @@ -3476,7 +3420,7 @@ func (*SearchResponse_Summary) ProtoMessage() {} func (x *SearchResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3534,11 +3478,9 @@ type SearchResponse_GeoSearchDebugInfo struct { func (x *SearchResponse_GeoSearchDebugInfo) Reset() { *x = SearchResponse_GeoSearchDebugInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GeoSearchDebugInfo) String() string { @@ -3549,7 +3491,7 @@ func (*SearchResponse_GeoSearchDebugInfo) ProtoMessage() {} func (x *SearchResponse_GeoSearchDebugInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3596,11 +3538,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -3611,7 +3551,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3658,11 +3598,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo struct { func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) String() string { @@ -3673,7 +3611,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo) ProtoMessage() {} func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3731,11 +3669,9 @@ type SearchResponse_SessionInfo struct { func (x *SearchResponse_SessionInfo) Reset() { *x = SearchResponse_SessionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SessionInfo) String() string { @@ -3746,7 +3682,7 @@ func (*SearchResponse_SessionInfo) ProtoMessage() {} func (x *SearchResponse_SessionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3790,11 +3726,9 @@ type SearchResponse_OneBoxResult struct { func (x *SearchResponse_OneBoxResult) Reset() { *x = SearchResponse_OneBoxResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_OneBoxResult) String() string { @@ -3805,7 +3739,7 @@ func (*SearchResponse_OneBoxResult) ProtoMessage() {} func (x *SearchResponse_OneBoxResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3853,11 +3787,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -3868,7 +3800,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3945,11 +3877,9 @@ type SearchResponse_GuidedSearchResult_RefinementAttribute struct { func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) Reset() { *x = SearchResponse_GuidedSearchResult_RefinementAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) String() string { @@ -3960,7 +3890,7 @@ func (*SearchResponse_GuidedSearchResult_RefinementAttribute) ProtoMessage() {} func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4005,11 +3935,9 @@ type SearchResponse_Summary_SafetyAttributes struct { func (x *SearchResponse_Summary_SafetyAttributes) Reset() { *x = SearchResponse_Summary_SafetyAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SafetyAttributes) String() string { @@ -4020,7 +3948,7 @@ func (*SearchResponse_Summary_SafetyAttributes) ProtoMessage() {} func (x *SearchResponse_Summary_SafetyAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4061,11 +3989,9 @@ type SearchResponse_Summary_CitationMetadata struct { func (x *SearchResponse_Summary_CitationMetadata) Reset() { *x = SearchResponse_Summary_CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationMetadata) String() string { @@ -4076,7 +4002,7 @@ func (*SearchResponse_Summary_CitationMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4114,11 +4040,9 @@ type SearchResponse_Summary_Citation struct { func (x *SearchResponse_Summary_Citation) Reset() { *x = SearchResponse_Summary_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Citation) String() string { @@ -4129,7 +4053,7 @@ func (*SearchResponse_Summary_Citation) ProtoMessage() {} func (x *SearchResponse_Summary_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4179,11 +4103,9 @@ type SearchResponse_Summary_CitationSource struct { func (x *SearchResponse_Summary_CitationSource) Reset() { *x = SearchResponse_Summary_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationSource) String() string { @@ -4194,7 +4116,7 @@ func (*SearchResponse_Summary_CitationSource) ProtoMessage() {} func (x *SearchResponse_Summary_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4238,11 +4160,9 @@ type SearchResponse_Summary_Reference struct { func (x *SearchResponse_Summary_Reference) Reset() { *x = SearchResponse_Summary_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference) String() string { @@ -4253,7 +4173,7 @@ func (*SearchResponse_Summary_Reference) ProtoMessage() {} func (x *SearchResponse_Summary_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4312,11 +4232,9 @@ type SearchResponse_Summary_SummaryWithMetadata struct { func (x *SearchResponse_Summary_SummaryWithMetadata) Reset() { *x = SearchResponse_Summary_SummaryWithMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SummaryWithMetadata) String() string { @@ -4327,7 +4245,7 @@ func (*SearchResponse_Summary_SummaryWithMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_SummaryWithMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4377,11 +4295,9 @@ type SearchResponse_Summary_Reference_ChunkContent struct { func (x *SearchResponse_Summary_Reference_ChunkContent) Reset() { *x = SearchResponse_Summary_Reference_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference_ChunkContent) String() string { @@ -4392,7 +4308,7 @@ func (*SearchResponse_Summary_Reference_ChunkContent) ProtoMessage() {} func (x *SearchResponse_Summary_Reference_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4438,11 +4354,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) String() string { @@ -4454,7 +4368,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4493,11 +4407,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) String() string { @@ -4509,7 +4421,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4564,11 +4476,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) String() string { @@ -4580,7 +4490,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4647,11 +4557,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) String() string { @@ -4663,7 +4571,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4725,11 +4633,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) String() string { @@ -4741,7 +4647,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4775,11 +4681,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) String() string { @@ -4791,7 +4695,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4834,11 +4738,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) String() string { @@ -4850,7 +4752,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6160,596 +6062,6 @@ func file_google_cloud_discoveryengine_v1alpha_search_service_proto_init() { file_google_cloud_discoveryengine_v1alpha_chunk_proto_init() file_google_cloud_discoveryengine_v1alpha_common_proto_init() file_google_cloud_discoveryengine_v1alpha_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ImageQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DataStoreSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_EmbeddingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_NaturalLanguageQueryUnderstandingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SearchAsYouTypeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SessionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SnippetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ExtractiveContentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ChunkSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_EmbeddingSpec_EmbeddingVector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GuidedSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GeoSearchDebugInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SessionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_OneBoxResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GuidedSearchResult_RefinementAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SafetyAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SummaryWithMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*SearchRequest_ImageQuery_ImageBytes)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/search_tuning_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/search_tuning_service.pb.go index fc82f49282b0..94f53daffdd5 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/search_tuning_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/search_tuning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/search_tuning_service.proto @@ -60,11 +60,9 @@ type ListCustomModelsRequest struct { func (x *ListCustomModelsRequest) Reset() { *x = ListCustomModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsRequest) String() string { @@ -75,7 +73,7 @@ func (*ListCustomModelsRequest) ProtoMessage() {} func (x *ListCustomModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type ListCustomModelsResponse struct { func (x *ListCustomModelsResponse) Reset() { *x = ListCustomModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsResponse) String() string { @@ -126,7 +122,7 @@ func (*ListCustomModelsResponse) ProtoMessage() {} func (x *ListCustomModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +175,9 @@ type TrainCustomModelRequest struct { func (x *TrainCustomModelRequest) Reset() { *x = TrainCustomModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest) String() string { @@ -194,7 +188,7 @@ func (*TrainCustomModelRequest) ProtoMessage() {} func (x *TrainCustomModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +286,9 @@ type TrainCustomModelResponse struct { func (x *TrainCustomModelResponse) Reset() { *x = TrainCustomModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelResponse) String() string { @@ -307,7 +299,7 @@ func (*TrainCustomModelResponse) ProtoMessage() {} func (x *TrainCustomModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type TrainCustomModelMetadata struct { func (x *TrainCustomModelMetadata) Reset() { *x = TrainCustomModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelMetadata) String() string { @@ -388,7 +378,7 @@ func (*TrainCustomModelMetadata) ProtoMessage() {} func (x *TrainCustomModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +446,9 @@ type TrainCustomModelRequest_GcsTrainingInput struct { func (x *TrainCustomModelRequest_GcsTrainingInput) Reset() { *x = TrainCustomModelRequest_GcsTrainingInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest_GcsTrainingInput) String() string { @@ -471,7 +459,7 @@ func (*TrainCustomModelRequest_GcsTrainingInput) ProtoMessage() {} func (x *TrainCustomModelRequest_GcsTrainingInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,80 +736,6 @@ func file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_init( } file_google_cloud_discoveryengine_v1alpha_custom_tuning_model_proto_init() file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest_GcsTrainingInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_search_tuning_service_proto_msgTypes[2].OneofWrappers = []any{ (*TrainCustomModelRequest_GcsTrainingInput_)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/serving_config.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/serving_config.pb.go index 369af85e0851..1f47e6e9fee9 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/serving_config.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/serving_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/serving_config.proto @@ -205,11 +205,9 @@ type ServingConfig struct { func (x *ServingConfig) Reset() { *x = ServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig) String() string { @@ -220,7 +218,7 @@ func (*ServingConfig) ProtoMessage() {} func (x *ServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +453,9 @@ type ServingConfig_MediaConfig struct { func (x *ServingConfig_MediaConfig) Reset() { *x = ServingConfig_MediaConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig_MediaConfig) String() string { @@ -470,7 +466,7 @@ func (*ServingConfig_MediaConfig) ProtoMessage() {} func (x *ServingConfig_MediaConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +553,9 @@ type ServingConfig_GenericConfig struct { func (x *ServingConfig_GenericConfig) Reset() { *x = ServingConfig_GenericConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig_GenericConfig) String() string { @@ -572,7 +566,7 @@ func (*ServingConfig_GenericConfig) ProtoMessage() {} func (x *ServingConfig_GenericConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,44 +818,6 @@ func file_google_cloud_discoveryengine_v1alpha_serving_config_proto_init() { } file_google_cloud_discoveryengine_v1alpha_common_proto_init() file_google_cloud_discoveryengine_v1alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig_MediaConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig_GenericConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_serving_config_proto_msgTypes[0].OneofWrappers = []any{ (*ServingConfig_MediaConfig_)(nil), (*ServingConfig_GenericConfig_)(nil), diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/serving_config_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/serving_config_service.pb.go index 7e713255e2b6..f9b74a760934 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/serving_config_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/serving_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/serving_config_service.proto @@ -61,11 +61,9 @@ type UpdateServingConfigRequest struct { func (x *UpdateServingConfigRequest) Reset() { *x = UpdateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServingConfigRequest) String() string { @@ -76,7 +74,7 @@ func (*UpdateServingConfigRequest) ProtoMessage() {} func (x *UpdateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetServingConfigRequest struct { func (x *GetServingConfigRequest) Reset() { *x = GetServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServingConfigRequest) String() string { @@ -133,7 +129,7 @@ func (*GetServingConfigRequest) ProtoMessage() {} func (x *GetServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type ListServingConfigsRequest struct { func (x *ListServingConfigsRequest) Reset() { *x = ListServingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsRequest) String() string { @@ -190,7 +184,7 @@ func (*ListServingConfigsRequest) ProtoMessage() {} func (x *ListServingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +234,9 @@ type ListServingConfigsResponse struct { func (x *ListServingConfigsResponse) Reset() { *x = ListServingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsResponse) String() string { @@ -255,7 +247,7 @@ func (*ListServingConfigsResponse) ProtoMessage() {} func (x *ListServingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,56 +493,6 @@ func file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_init return } file_google_cloud_discoveryengine_v1alpha_serving_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_serving_config_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/session.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/session.pb.go index 1685d8a913f9..aa25aca1f2b5 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/session.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/session.proto @@ -109,11 +109,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -124,7 +122,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type Query struct { func (x *Query) Reset() { *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Query) String() string { @@ -214,7 +210,7 @@ func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type Session_Turn struct { func (x *Session_Turn) Reset() { *x = Session_Turn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session_Turn) String() string { @@ -294,7 +288,7 @@ func (*Session_Turn) ProtoMessage() {} func (x *Session_Turn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,44 +451,6 @@ func file_google_cloud_discoveryengine_v1alpha_session_proto_init() { if File_google_cloud_discoveryengine_v1alpha_session_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Session_Turn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_session_proto_msgTypes[1].OneofWrappers = []any{ (*Query_Text)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine.pb.go index 8638bcb61ab6..82dfc905f1a2 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/site_search_engine.proto @@ -227,11 +227,9 @@ type SiteSearchEngine struct { func (x *SiteSearchEngine) Reset() { *x = SiteSearchEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteSearchEngine) String() string { @@ -242,7 +240,7 @@ func (*SiteSearchEngine) ProtoMessage() {} func (x *SiteSearchEngine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +301,9 @@ type TargetSite struct { func (x *TargetSite) Reset() { *x = TargetSite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite) String() string { @@ -318,7 +314,7 @@ func (*TargetSite) ProtoMessage() {} func (x *TargetSite) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +413,9 @@ type SiteVerificationInfo struct { func (x *SiteVerificationInfo) Reset() { *x = SiteVerificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteVerificationInfo) String() string { @@ -432,7 +426,7 @@ func (*SiteVerificationInfo) ProtoMessage() {} func (x *SiteVerificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +471,9 @@ type TargetSite_FailureReason struct { func (x *TargetSite_FailureReason) Reset() { *x = TargetSite_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason) String() string { @@ -492,7 +484,7 @@ func (*TargetSite_FailureReason) ProtoMessage() {} func (x *TargetSite_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +537,9 @@ type TargetSite_FailureReason_QuotaFailure struct { func (x *TargetSite_FailureReason_QuotaFailure) Reset() { *x = TargetSite_FailureReason_QuotaFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason_QuotaFailure) String() string { @@ -560,7 +550,7 @@ func (*TargetSite_FailureReason_QuotaFailure) ProtoMessage() {} func (x *TargetSite_FailureReason_QuotaFailure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,68 +779,6 @@ func file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_init() { if File_google_cloud_discoveryengine_v1alpha_site_search_engine_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SiteSearchEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SiteVerificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason_QuotaFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_msgTypes[3].OneofWrappers = []any{ (*TargetSite_FailureReason_QuotaFailure_)(nil), } diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine_service.pb.go index a4a3c9e892ee..2afbe2eaa9fb 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/site_search_engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto @@ -118,11 +118,9 @@ type GetSiteSearchEngineRequest struct { func (x *GetSiteSearchEngineRequest) Reset() { *x = GetSiteSearchEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSiteSearchEngineRequest) String() string { @@ -133,7 +131,7 @@ func (*GetSiteSearchEngineRequest) ProtoMessage() {} func (x *GetSiteSearchEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type CreateTargetSiteRequest struct { func (x *CreateTargetSiteRequest) Reset() { *x = CreateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteRequest) String() string { @@ -189,7 +185,7 @@ func (*CreateTargetSiteRequest) ProtoMessage() {} func (x *CreateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +232,9 @@ type CreateTargetSiteMetadata struct { func (x *CreateTargetSiteMetadata) Reset() { *x = CreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteMetadata) String() string { @@ -251,7 +245,7 @@ func (*CreateTargetSiteMetadata) ProtoMessage() {} func (x *CreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +294,9 @@ type BatchCreateTargetSitesRequest struct { func (x *BatchCreateTargetSitesRequest) Reset() { *x = BatchCreateTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesRequest) String() string { @@ -315,7 +307,7 @@ func (*BatchCreateTargetSitesRequest) ProtoMessage() {} func (x *BatchCreateTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type GetTargetSiteRequest struct { func (x *GetTargetSiteRequest) Reset() { *x = GetTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetSiteRequest) String() string { @@ -383,7 +373,7 @@ func (*GetTargetSiteRequest) ProtoMessage() {} func (x *GetTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +415,9 @@ type UpdateTargetSiteRequest struct { func (x *UpdateTargetSiteRequest) Reset() { *x = UpdateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteRequest) String() string { @@ -440,7 +428,7 @@ func (*UpdateTargetSiteRequest) ProtoMessage() {} func (x *UpdateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +468,9 @@ type UpdateTargetSiteMetadata struct { func (x *UpdateTargetSiteMetadata) Reset() { *x = UpdateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteMetadata) String() string { @@ -495,7 +481,7 @@ func (*UpdateTargetSiteMetadata) ProtoMessage() {} func (x *UpdateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +534,9 @@ type DeleteTargetSiteRequest struct { func (x *DeleteTargetSiteRequest) Reset() { *x = DeleteTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteRequest) String() string { @@ -563,7 +547,7 @@ func (*DeleteTargetSiteRequest) ProtoMessage() {} func (x *DeleteTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +587,9 @@ type DeleteTargetSiteMetadata struct { func (x *DeleteTargetSiteMetadata) Reset() { *x = DeleteTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteMetadata) String() string { @@ -618,7 +600,7 @@ func (*DeleteTargetSiteMetadata) ProtoMessage() {} func (x *DeleteTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +661,9 @@ type ListTargetSitesRequest struct { func (x *ListTargetSitesRequest) Reset() { *x = ListTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesRequest) String() string { @@ -694,7 +674,7 @@ func (*ListTargetSitesRequest) ProtoMessage() {} func (x *ListTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +730,9 @@ type ListTargetSitesResponse struct { func (x *ListTargetSitesResponse) Reset() { *x = ListTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesResponse) String() string { @@ -765,7 +743,7 @@ func (*ListTargetSitesResponse) ProtoMessage() {} func (x *ListTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +797,9 @@ type BatchCreateTargetSiteMetadata struct { func (x *BatchCreateTargetSiteMetadata) Reset() { *x = BatchCreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSiteMetadata) String() string { @@ -834,7 +810,7 @@ func (*BatchCreateTargetSiteMetadata) ProtoMessage() {} func (x *BatchCreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,11 +853,9 @@ type BatchCreateTargetSitesResponse struct { func (x *BatchCreateTargetSitesResponse) Reset() { *x = BatchCreateTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesResponse) String() string { @@ -892,7 +866,7 @@ func (*BatchCreateTargetSitesResponse) ProtoMessage() {} func (x *BatchCreateTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +905,9 @@ type EnableAdvancedSiteSearchRequest struct { func (x *EnableAdvancedSiteSearchRequest) Reset() { *x = EnableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchRequest) String() string { @@ -946,7 +918,7 @@ func (*EnableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *EnableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -979,11 +951,9 @@ type EnableAdvancedSiteSearchResponse struct { func (x *EnableAdvancedSiteSearchResponse) Reset() { *x = EnableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchResponse) String() string { @@ -994,7 +964,7 @@ func (*EnableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *EnableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1027,11 +997,9 @@ type EnableAdvancedSiteSearchMetadata struct { func (x *EnableAdvancedSiteSearchMetadata) Reset() { *x = EnableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchMetadata) String() string { @@ -1042,7 +1010,7 @@ func (*EnableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *EnableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1056,9 @@ type DisableAdvancedSiteSearchRequest struct { func (x *DisableAdvancedSiteSearchRequest) Reset() { *x = DisableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchRequest) String() string { @@ -1103,7 +1069,7 @@ func (*DisableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *DisableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1102,9 @@ type DisableAdvancedSiteSearchResponse struct { func (x *DisableAdvancedSiteSearchResponse) Reset() { *x = DisableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchResponse) String() string { @@ -1151,7 +1115,7 @@ func (*DisableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *DisableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1148,9 @@ type DisableAdvancedSiteSearchMetadata struct { func (x *DisableAdvancedSiteSearchMetadata) Reset() { *x = DisableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchMetadata) String() string { @@ -1199,7 +1161,7 @@ func (*DisableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *DisableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1212,9 @@ type RecrawlUrisRequest struct { func (x *RecrawlUrisRequest) Reset() { *x = RecrawlUrisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisRequest) String() string { @@ -1265,7 +1225,7 @@ func (*RecrawlUrisRequest) ProtoMessage() {} func (x *RecrawlUrisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1310,11 +1270,9 @@ type RecrawlUrisResponse struct { func (x *RecrawlUrisResponse) Reset() { *x = RecrawlUrisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse) String() string { @@ -1325,7 +1283,7 @@ func (*RecrawlUrisResponse) ProtoMessage() {} func (x *RecrawlUrisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1385,11 +1343,9 @@ type RecrawlUrisMetadata struct { func (x *RecrawlUrisMetadata) Reset() { *x = RecrawlUrisMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisMetadata) String() string { @@ -1400,7 +1356,7 @@ func (*RecrawlUrisMetadata) ProtoMessage() {} func (x *RecrawlUrisMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1479,11 +1435,9 @@ type BatchVerifyTargetSitesRequest struct { func (x *BatchVerifyTargetSitesRequest) Reset() { *x = BatchVerifyTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesRequest) String() string { @@ -1494,7 +1448,7 @@ func (*BatchVerifyTargetSitesRequest) ProtoMessage() {} func (x *BatchVerifyTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1527,11 +1481,9 @@ type BatchVerifyTargetSitesResponse struct { func (x *BatchVerifyTargetSitesResponse) Reset() { *x = BatchVerifyTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesResponse) String() string { @@ -1542,7 +1494,7 @@ func (*BatchVerifyTargetSitesResponse) ProtoMessage() {} func (x *BatchVerifyTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1575,11 +1527,9 @@ type BatchVerifyTargetSitesMetadata struct { func (x *BatchVerifyTargetSitesMetadata) Reset() { *x = BatchVerifyTargetSitesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesMetadata) String() string { @@ -1590,7 +1540,7 @@ func (*BatchVerifyTargetSitesMetadata) ProtoMessage() {} func (x *BatchVerifyTargetSitesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1648,11 +1598,9 @@ type FetchDomainVerificationStatusRequest struct { func (x *FetchDomainVerificationStatusRequest) Reset() { *x = FetchDomainVerificationStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusRequest) String() string { @@ -1663,7 +1611,7 @@ func (*FetchDomainVerificationStatusRequest) ProtoMessage() {} func (x *FetchDomainVerificationStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1719,11 +1667,9 @@ type FetchDomainVerificationStatusResponse struct { func (x *FetchDomainVerificationStatusResponse) Reset() { *x = FetchDomainVerificationStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusResponse) String() string { @@ -1734,7 +1680,7 @@ func (*FetchDomainVerificationStatusResponse) ProtoMessage() {} func (x *FetchDomainVerificationStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1767,9 @@ type SetUriPatternDocumentDataRequest struct { func (x *SetUriPatternDocumentDataRequest) Reset() { *x = SetUriPatternDocumentDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUriPatternDocumentDataRequest) String() string { @@ -1836,7 +1780,7 @@ func (*SetUriPatternDocumentDataRequest) ProtoMessage() {} func (x *SetUriPatternDocumentDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1890,11 +1834,9 @@ type SetUriPatternDocumentDataResponse struct { func (x *SetUriPatternDocumentDataResponse) Reset() { *x = SetUriPatternDocumentDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUriPatternDocumentDataResponse) String() string { @@ -1905,7 +1847,7 @@ func (*SetUriPatternDocumentDataResponse) ProtoMessage() {} func (x *SetUriPatternDocumentDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1938,11 +1880,9 @@ type SetUriPatternDocumentDataMetadata struct { func (x *SetUriPatternDocumentDataMetadata) Reset() { *x = SetUriPatternDocumentDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUriPatternDocumentDataMetadata) String() string { @@ -1953,7 +1893,7 @@ func (*SetUriPatternDocumentDataMetadata) ProtoMessage() {} func (x *SetUriPatternDocumentDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1999,11 +1939,9 @@ type GetUriPatternDocumentDataRequest struct { func (x *GetUriPatternDocumentDataRequest) Reset() { *x = GetUriPatternDocumentDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUriPatternDocumentDataRequest) String() string { @@ -2014,7 +1952,7 @@ func (*GetUriPatternDocumentDataRequest) ProtoMessage() {} func (x *GetUriPatternDocumentDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2059,11 +1997,9 @@ type GetUriPatternDocumentDataResponse struct { func (x *GetUriPatternDocumentDataResponse) Reset() { *x = GetUriPatternDocumentDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUriPatternDocumentDataResponse) String() string { @@ -2074,7 +2010,7 @@ func (*GetUriPatternDocumentDataResponse) ProtoMessage() {} func (x *GetUriPatternDocumentDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2111,11 +2047,9 @@ type RecrawlUrisResponse_FailureInfo struct { func (x *RecrawlUrisResponse_FailureInfo) Reset() { *x = RecrawlUrisResponse_FailureInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo) String() string { @@ -2126,7 +2060,7 @@ func (*RecrawlUrisResponse_FailureInfo) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2170,11 +2104,9 @@ type RecrawlUrisResponse_FailureInfo_FailureReason struct { func (x *RecrawlUrisResponse_FailureInfo_FailureReason) Reset() { *x = RecrawlUrisResponse_FailureInfo_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo_FailureReason) String() string { @@ -2185,7 +2117,7 @@ func (*RecrawlUrisResponse_FailureInfo_FailureReason) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3106,416 +3038,6 @@ func file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_ return } file_google_cloud_discoveryengine_v1alpha_site_search_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSiteSearchEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SetUriPatternDocumentDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SetUriPatternDocumentDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SetUriPatternDocumentDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetUriPatternDocumentDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetUriPatternDocumentDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_site_search_engine_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/user_event.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/user_event.pb.go index 29459568daf0..b4eb2494a8e9 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/user_event.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/user_event.proto @@ -251,11 +251,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -266,7 +264,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +465,9 @@ type PageInfo struct { func (x *PageInfo) Reset() { *x = PageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo) String() string { @@ -482,7 +478,7 @@ func (*PageInfo) ProtoMessage() {} func (x *PageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +571,9 @@ type SearchInfo struct { func (x *SearchInfo) Reset() { *x = SearchInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchInfo) String() string { @@ -590,7 +584,7 @@ func (*SearchInfo) ProtoMessage() {} func (x *SearchInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +638,9 @@ type CompletionInfo struct { func (x *CompletionInfo) Reset() { *x = CompletionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionInfo) String() string { @@ -659,7 +651,7 @@ func (*CompletionInfo) ProtoMessage() {} func (x *CompletionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +731,9 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionInfo) String() string { @@ -754,7 +744,7 @@ func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +846,9 @@ type DocumentInfo struct { func (x *DocumentInfo) Reset() { *x = DocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInfo) String() string { @@ -871,7 +859,7 @@ func (*DocumentInfo) ProtoMessage() {} func (x *DocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +976,9 @@ type PanelInfo struct { func (x *PanelInfo) Reset() { *x = PanelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PanelInfo) String() string { @@ -1003,7 +989,7 @@ func (*PanelInfo) ProtoMessage() {} func (x *PanelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1057,9 @@ type MediaInfo struct { func (x *MediaInfo) Reset() { *x = MediaInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaInfo) String() string { @@ -1086,7 +1070,7 @@ func (*MediaInfo) ProtoMessage() {} func (x *MediaInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,104 +1360,6 @@ func file_google_cloud_discoveryengine_v1alpha_user_event_proto_init() { return } file_google_cloud_discoveryengine_v1alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PanelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MediaInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[2].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[4].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_user_event_proto_msgTypes[5].OneofWrappers = []any{ diff --git a/discoveryengine/apiv1alpha/discoveryenginepb/user_event_service.pb.go b/discoveryengine/apiv1alpha/discoveryenginepb/user_event_service.pb.go index 591628be0d5b..f8a59e323975 100755 --- a/discoveryengine/apiv1alpha/discoveryenginepb/user_event_service.pb.go +++ b/discoveryengine/apiv1alpha/discoveryenginepb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1alpha/user_event_service.proto @@ -68,11 +68,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -83,7 +81,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -159,7 +155,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,32 +430,6 @@ func file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_init() { file_google_cloud_discoveryengine_v1alpha_import_config_proto_init() file_google_cloud_discoveryengine_v1alpha_purge_config_proto_init() file_google_cloud_discoveryengine_v1alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1alpha_user_event_service_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} diff --git a/discoveryengine/apiv1alpha/document_client.go b/discoveryengine/apiv1alpha/document_client.go index 72d95946eeb7..106e4ea91aa8 100755 --- a/discoveryengine/apiv1alpha/document_client.go +++ b/discoveryengine/apiv1alpha/document_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -544,6 +543,8 @@ type documentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentClient creates a new document service client based on gRPC. @@ -572,6 +573,7 @@ func NewDocumentClient(ctx context.Context, opts ...option.ClientOption) (*Docum connPool: connPool, documentClient: discoveryenginepb.NewDocumentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -635,6 +637,8 @@ type documentRESTClient struct { // Points back to the CallOptions field of the containing DocumentClient CallOptions **DocumentCallOptions + + logger *slog.Logger } // NewDocumentRESTClient creates a new document service rest client. @@ -654,6 +658,7 @@ func NewDocumentRESTClient(ctx context.Context, opts ...option.ClientOption) (*D endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -716,7 +721,7 @@ func (c *documentGRPCClient) GetDocument(ctx context.Context, req *discoveryengi var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *documentGRPCClient) ListDocuments(ctx context.Context, req *discoveryen } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *documentGRPCClient) CreateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *documentGRPCClient) UpdateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -815,7 +820,7 @@ func (c *documentGRPCClient) DeleteDocument(ctx context.Context, req *discoverye opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.documentClient.DeleteDocument(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.documentClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) return err @@ -830,7 +835,7 @@ func (c *documentGRPCClient) ImportDocuments(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *documentGRPCClient) PurgeDocuments(ctx context.Context, req *discoverye var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.PurgeDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.PurgeDocuments, req, settings.GRPC, c.logger, "PurgeDocuments") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *documentGRPCClient) GetProcessedDocument(ctx context.Context, req *disc var resp *discoveryenginepb.ProcessedDocument err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetProcessedDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetProcessedDocument, req, settings.GRPC, c.logger, "GetProcessedDocument") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *documentGRPCClient) BatchGetDocumentsMetadata(ctx context.Context, req var resp *discoveryenginepb.BatchGetDocumentsMetadataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.BatchGetDocumentsMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.BatchGetDocumentsMetadata, req, settings.GRPC, c.logger, "BatchGetDocumentsMetadata") return err }, opts...) if err != nil { @@ -905,7 +910,7 @@ func (c *documentGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -920,7 +925,7 @@ func (c *documentGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *documentGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1008,17 +1013,7 @@ func (c *documentRESTClient) GetDocument(ctx context.Context, req *discoveryengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1080,21 +1075,10 @@ func (c *documentRESTClient) ListDocuments(ctx context.Context, req *discoveryen } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1165,17 +1149,7 @@ func (c *documentRESTClient) CreateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } @@ -1242,17 +1216,7 @@ func (c *documentRESTClient) UpdateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } @@ -1299,15 +1263,8 @@ func (c *documentRESTClient) DeleteDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") + return err }, opts...) } @@ -1355,21 +1312,10 @@ func (c *documentRESTClient) ImportDocuments(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1441,21 +1387,10 @@ func (c *documentRESTClient) PurgeDocuments(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1511,17 +1446,7 @@ func (c *documentRESTClient) GetProcessedDocument(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessedDocument") if err != nil { return err } @@ -1578,17 +1503,7 @@ func (c *documentRESTClient) BatchGetDocumentsMetadata(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetDocumentsMetadata") if err != nil { return err } @@ -1641,15 +1556,8 @@ func (c *documentRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1686,17 +1594,7 @@ func (c *documentRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1761,21 +1659,10 @@ func (c *documentRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/document_client_example_go123_test.go b/discoveryengine/apiv1alpha/document_client_example_go123_test.go index 45f33aef3415..02c8b882ecd6 100644 --- a/discoveryengine/apiv1alpha/document_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/document_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDocumentClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDocumentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/engine_client.go b/discoveryengine/apiv1alpha/engine_client.go index 80e93e3d9415..cbbb4e074c3e 100755 --- a/discoveryengine/apiv1alpha/engine_client.go +++ b/discoveryengine/apiv1alpha/engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -334,6 +333,8 @@ type engineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEngineClient creates a new engine service client based on gRPC. @@ -361,6 +362,7 @@ func NewEngineClient(ctx context.Context, opts ...option.ClientOption) (*EngineC connPool: connPool, engineClient: discoveryenginepb.NewEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -424,6 +426,8 @@ type engineRESTClient struct { // Points back to the CallOptions field of the containing EngineClient CallOptions **EngineCallOptions + + logger *slog.Logger } // NewEngineRESTClient creates a new engine service rest client. @@ -442,6 +446,7 @@ func NewEngineRESTClient(ctx context.Context, opts ...option.ClientOption) (*Eng endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -504,7 +509,7 @@ func (c *engineGRPCClient) CreateEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.CreateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.CreateEngine, req, settings.GRPC, c.logger, "CreateEngine") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *engineGRPCClient) DeleteEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.DeleteEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.DeleteEngine, req, settings.GRPC, c.logger, "DeleteEngine") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *engineGRPCClient) UpdateEngine(ctx context.Context, req *discoveryengin var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.UpdateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.UpdateEngine, req, settings.GRPC, c.logger, "UpdateEngine") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *engineGRPCClient) GetEngine(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.GetEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.GetEngine, req, settings.GRPC, c.logger, "GetEngine") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *engineGRPCClient) ListEngines(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.ListEngines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.ListEngines, req, settings.GRPC, c.logger, "ListEngines") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *engineGRPCClient) PauseEngine(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.PauseEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.PauseEngine, req, settings.GRPC, c.logger, "PauseEngine") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *engineGRPCClient) ResumeEngine(ctx context.Context, req *discoveryengin var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.ResumeEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.ResumeEngine, req, settings.GRPC, c.logger, "ResumeEngine") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *engineGRPCClient) TuneEngine(ctx context.Context, req *discoveryenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.TuneEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.TuneEngine, req, settings.GRPC, c.logger, "TuneEngine") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *engineGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -696,7 +701,7 @@ func (c *engineGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *engineGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -791,21 +796,10 @@ func (c *engineRESTClient) CreateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -855,21 +849,10 @@ func (c *engineRESTClient) DeleteEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -934,17 +917,7 @@ func (c *engineRESTClient) UpdateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEngine") if err != nil { return err } @@ -994,17 +967,7 @@ func (c *engineRESTClient) GetEngine(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEngine") if err != nil { return err } @@ -1070,21 +1033,10 @@ func (c *engineRESTClient) ListEngines(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEngines") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1155,17 +1107,7 @@ func (c *engineRESTClient) PauseEngine(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseEngine") if err != nil { return err } @@ -1223,17 +1165,7 @@ func (c *engineRESTClient) ResumeEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeEngine") if err != nil { return err } @@ -1290,21 +1222,10 @@ func (c *engineRESTClient) TuneEngine(ctx context.Context, req *discoveryenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneEngine") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1358,15 +1279,8 @@ func (c *engineRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1403,17 +1317,7 @@ func (c *engineRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1478,21 +1382,10 @@ func (c *engineRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/engine_client_example_go123_test.go b/discoveryengine/apiv1alpha/engine_client_example_go123_test.go index 5e36862f9ffc..b81a0aea0c7b 100644 --- a/discoveryengine/apiv1alpha/engine_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEngineClient_ListEngines_all() { } for resp, err := range c.ListEngines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/estimate_billing_client.go b/discoveryengine/apiv1alpha/estimate_billing_client.go index bc1d92c32367..dde4971e1661 100755 --- a/discoveryengine/apiv1alpha/estimate_billing_client.go +++ b/discoveryengine/apiv1alpha/estimate_billing_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -249,6 +248,8 @@ type estimateBillingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEstimateBillingClient creates a new estimate billing service client based on gRPC. @@ -275,6 +276,7 @@ func NewEstimateBillingClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, estimateBillingClient: discoveryenginepb.NewEstimateBillingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -338,6 +340,8 @@ type estimateBillingRESTClient struct { // Points back to the CallOptions field of the containing EstimateBillingClient CallOptions **EstimateBillingCallOptions + + logger *slog.Logger } // NewEstimateBillingRESTClient creates a new estimate billing service rest client. @@ -355,6 +359,7 @@ func NewEstimateBillingRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -417,7 +422,7 @@ func (c *estimateBillingGRPCClient) EstimateDataSize(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.estimateBillingClient.EstimateDataSize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.estimateBillingClient.EstimateDataSize, req, settings.GRPC, c.logger, "EstimateDataSize") return err }, opts...) if err != nil { @@ -436,7 +441,7 @@ func (c *estimateBillingGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -451,7 +456,7 @@ func (c *estimateBillingGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *estimateBillingGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -544,21 +549,10 @@ func (c *estimateBillingRESTClient) EstimateDataSize(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EstimateDataSize") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -612,15 +606,8 @@ func (c *estimateBillingRESTClient) CancelOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -657,17 +644,7 @@ func (c *estimateBillingRESTClient) GetOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -732,21 +709,10 @@ func (c *estimateBillingRESTClient) ListOperations(ctx context.Context, req *lon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/estimate_billing_client_example_go123_test.go b/discoveryengine/apiv1alpha/estimate_billing_client_example_go123_test.go index d4d1bd142bc0..79dcbee05a82 100644 --- a/discoveryengine/apiv1alpha/estimate_billing_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/estimate_billing_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleEstimateBillingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/evaluation_client.go b/discoveryengine/apiv1alpha/evaluation_client.go index 850eede42091..c8b574970caa 100755 --- a/discoveryengine/apiv1alpha/evaluation_client.go +++ b/discoveryengine/apiv1alpha/evaluation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -349,6 +348,8 @@ type evaluationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEvaluationClient creates a new evaluation service client based on gRPC. @@ -376,6 +377,7 @@ func NewEvaluationClient(ctx context.Context, opts ...option.ClientOption) (*Eva connPool: connPool, evaluationClient: discoveryenginepb.NewEvaluationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -439,6 +441,8 @@ type evaluationRESTClient struct { // Points back to the CallOptions field of the containing EvaluationClient CallOptions **EvaluationCallOptions + + logger *slog.Logger } // NewEvaluationRESTClient creates a new evaluation service rest client. @@ -457,6 +461,7 @@ func NewEvaluationRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -519,7 +524,7 @@ func (c *evaluationGRPCClient) GetEvaluation(ctx context.Context, req *discovery var resp *discoveryenginepb.Evaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.GetEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.GetEvaluation, req, settings.GRPC, c.logger, "GetEvaluation") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *evaluationGRPCClient) ListEvaluations(ctx context.Context, req *discove } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.ListEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.ListEvaluations, req, settings.GRPC, c.logger, "ListEvaluations") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *evaluationGRPCClient) CreateEvaluation(ctx context.Context, req *discov var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.CreateEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.CreateEvaluation, req, settings.GRPC, c.logger, "CreateEvaluation") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *evaluationGRPCClient) ListEvaluationResults(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.ListEvaluationResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.ListEvaluationResults, req, settings.GRPC, c.logger, "ListEvaluationResults") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *evaluationGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +668,7 @@ func (c *evaluationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *evaluationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -751,17 +756,7 @@ func (c *evaluationRESTClient) GetEvaluation(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluation") if err != nil { return err } @@ -824,21 +819,10 @@ func (c *evaluationRESTClient) ListEvaluations(ctx context.Context, req *discove } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -910,21 +894,10 @@ func (c *evaluationRESTClient) CreateEvaluation(ctx context.Context, req *discov httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEvaluation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -988,21 +961,10 @@ func (c *evaluationRESTClient) ListEvaluationResults(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluationResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1068,15 +1030,8 @@ func (c *evaluationRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1113,17 +1068,7 @@ func (c *evaluationRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1188,21 +1133,10 @@ func (c *evaluationRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/evaluation_client_example_go123_test.go b/discoveryengine/apiv1alpha/evaluation_client_example_go123_test.go index d34bd053c041..0bd958bc470b 100644 --- a/discoveryengine/apiv1alpha/evaluation_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/evaluation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEvaluationClient_ListEvaluationResults_all() { } for resp, err := range c.ListEvaluationResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEvaluationClient_ListEvaluations_all() { } for resp, err := range c.ListEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleEvaluationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/grounded_generation_client.go b/discoveryengine/apiv1alpha/grounded_generation_client.go index c523a915caf3..c0970c4af2b2 100755 --- a/discoveryengine/apiv1alpha/grounded_generation_client.go +++ b/discoveryengine/apiv1alpha/grounded_generation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type groundedGenerationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGroundedGenerationClient creates a new grounded generation service client based on gRPC. @@ -277,6 +278,7 @@ func NewGroundedGenerationClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, groundedGenerationClient: discoveryenginepb.NewGroundedGenerationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type groundedGenerationRESTClient struct { // Points back to the CallOptions field of the containing GroundedGenerationClient CallOptions **GroundedGenerationCallOptions + + logger *slog.Logger } // NewGroundedGenerationRESTClient creates a new grounded generation service rest client. @@ -341,6 +345,7 @@ func NewGroundedGenerationRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *groundedGenerationGRPCClient) CheckGrounding(ctx context.Context, req * var resp *discoveryenginepb.CheckGroundingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groundedGenerationClient.CheckGrounding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groundedGenerationClient.CheckGrounding, req, settings.GRPC, c.logger, "CheckGrounding") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *groundedGenerationGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *groundedGenerationGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *groundedGenerationGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *groundedGenerationRESTClient) CheckGrounding(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckGrounding") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *groundedGenerationRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *groundedGenerationRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *groundedGenerationRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/grounded_generation_client_example_go123_test.go b/discoveryengine/apiv1alpha/grounded_generation_client_example_go123_test.go index 146addcd601e..907c94e4b647 100644 --- a/discoveryengine/apiv1alpha/grounded_generation_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/grounded_generation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGroundedGenerationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/helpers.go b/discoveryengine/apiv1alpha/helpers.go index 92697c843781..bbd882c8f9de 100755 --- a/discoveryengine/apiv1alpha/helpers.go +++ b/discoveryengine/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package discoveryengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "discoveryengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/discoveryengine/apiv1alpha/project_client.go b/discoveryengine/apiv1alpha/project_client.go index 403ac1b81002..b28c7291f57c 100755 --- a/discoveryengine/apiv1alpha/project_client.go +++ b/discoveryengine/apiv1alpha/project_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -343,6 +342,8 @@ type projectGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectClient creates a new project service client based on gRPC. @@ -370,6 +371,7 @@ func NewProjectClient(ctx context.Context, opts ...option.ClientOption) (*Projec connPool: connPool, projectClient: discoveryenginepb.NewProjectServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -433,6 +435,8 @@ type projectRESTClient struct { // Points back to the CallOptions field of the containing ProjectClient CallOptions **ProjectCallOptions + + logger *slog.Logger } // NewProjectRESTClient creates a new project service rest client. @@ -451,6 +455,7 @@ func NewProjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -513,7 +518,7 @@ func (c *projectGRPCClient) GetProject(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Project err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.GetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.GetProject, req, settings.GRPC, c.logger, "GetProject") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *projectGRPCClient) ProvisionProject(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.ProvisionProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.ProvisionProject, req, settings.GRPC, c.logger, "ProvisionProject") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *projectGRPCClient) ReportConsentChange(ctx context.Context, req *discov var resp *discoveryenginepb.Project err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.ReportConsentChange(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.ReportConsentChange, req, settings.GRPC, c.logger, "ReportConsentChange") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *projectGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -583,7 +588,7 @@ func (c *projectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *projectGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -672,17 +677,7 @@ func (c *projectRESTClient) GetProject(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProject") if err != nil { return err } @@ -742,21 +737,10 @@ func (c *projectRESTClient) ProvisionProject(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionProject") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -819,17 +803,7 @@ func (c *projectRESTClient) ReportConsentChange(ctx context.Context, req *discov httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReportConsentChange") if err != nil { return err } @@ -882,15 +856,8 @@ func (c *projectRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -927,17 +894,7 @@ func (c *projectRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1002,21 +959,10 @@ func (c *projectRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/project_client_example_go123_test.go b/discoveryengine/apiv1alpha/project_client_example_go123_test.go index 4ee3db768d0e..d736b4e9f916 100644 --- a/discoveryengine/apiv1alpha/project_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/project_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/rank_client.go b/discoveryengine/apiv1alpha/rank_client.go index 895456063680..927e68d972b7 100755 --- a/discoveryengine/apiv1alpha/rank_client.go +++ b/discoveryengine/apiv1alpha/rank_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type rankGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRankClient creates a new rank service client based on gRPC. @@ -277,6 +278,7 @@ func NewRankClient(ctx context.Context, opts ...option.ClientOption) (*RankClien connPool: connPool, rankClient: discoveryenginepb.NewRankServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type rankRESTClient struct { // Points back to the CallOptions field of the containing RankClient CallOptions **RankCallOptions + + logger *slog.Logger } // NewRankRESTClient creates a new rank service rest client. @@ -341,6 +345,7 @@ func NewRankRESTClient(ctx context.Context, opts ...option.ClientOption) (*RankC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *rankGRPCClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe var resp *discoveryenginepb.RankResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.rankClient.Rank(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.rankClient.Rank, req, settings.GRPC, c.logger, "Rank") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *rankGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *rankGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *rankGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *rankRESTClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Rank") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *rankRESTClient) CancelOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *rankRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *rankRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/rank_client_example_go123_test.go b/discoveryengine/apiv1alpha/rank_client_example_go123_test.go index 44970509d5f5..dc4a0ae03e4e 100644 --- a/discoveryengine/apiv1alpha/rank_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/rank_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRankClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/recommendation_client.go b/discoveryengine/apiv1alpha/recommendation_client.go index 874c08a9adf6..72d8c4a0f6c0 100755 --- a/discoveryengine/apiv1alpha/recommendation_client.go +++ b/discoveryengine/apiv1alpha/recommendation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type recommendationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRecommendationClient creates a new recommendation service client based on gRPC. @@ -277,6 +278,7 @@ func NewRecommendationClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, recommendationClient: discoveryenginepb.NewRecommendationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type recommendationRESTClient struct { // Points back to the CallOptions field of the containing RecommendationClient CallOptions **RecommendationCallOptions + + logger *slog.Logger } // NewRecommendationRESTClient creates a new recommendation service rest client. @@ -341,6 +345,7 @@ func NewRecommendationRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *recommendationGRPCClient) Recommend(ctx context.Context, req *discovery var resp *discoveryenginepb.RecommendResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.recommendationClient.Recommend(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.recommendationClient.Recommend, req, settings.GRPC, c.logger, "Recommend") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *recommendationGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *recommendationGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *recommendationGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *recommendationRESTClient) Recommend(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recommend") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *recommendationRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *recommendationRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *recommendationRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/recommendation_client_example_go123_test.go b/discoveryengine/apiv1alpha/recommendation_client_example_go123_test.go index e89f5292a2c9..52b9e3b33be0 100644 --- a/discoveryengine/apiv1alpha/recommendation_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/recommendation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRecommendationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/sample_query_client.go b/discoveryengine/apiv1alpha/sample_query_client.go index 259e4973a266..ce47405f4e26 100755 --- a/discoveryengine/apiv1alpha/sample_query_client.go +++ b/discoveryengine/apiv1alpha/sample_query_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -428,6 +427,8 @@ type sampleQueryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSampleQueryClient creates a new sample query service client based on gRPC. @@ -455,6 +456,7 @@ func NewSampleQueryClient(ctx context.Context, opts ...option.ClientOption) (*Sa connPool: connPool, sampleQueryClient: discoveryenginepb.NewSampleQueryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -518,6 +520,8 @@ type sampleQueryRESTClient struct { // Points back to the CallOptions field of the containing SampleQueryClient CallOptions **SampleQueryCallOptions + + logger *slog.Logger } // NewSampleQueryRESTClient creates a new sample query service rest client. @@ -536,6 +540,7 @@ func NewSampleQueryRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -598,7 +603,7 @@ func (c *sampleQueryGRPCClient) GetSampleQuery(ctx context.Context, req *discove var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.GetSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.GetSampleQuery, req, settings.GRPC, c.logger, "GetSampleQuery") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *sampleQueryGRPCClient) ListSampleQueries(ctx context.Context, req *disc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.ListSampleQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.ListSampleQueries, req, settings.GRPC, c.logger, "ListSampleQueries") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *sampleQueryGRPCClient) CreateSampleQuery(ctx context.Context, req *disc var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.CreateSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.CreateSampleQuery, req, settings.GRPC, c.logger, "CreateSampleQuery") return err }, opts...) if err != nil { @@ -680,7 +685,7 @@ func (c *sampleQueryGRPCClient) UpdateSampleQuery(ctx context.Context, req *disc var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.UpdateSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.UpdateSampleQuery, req, settings.GRPC, c.logger, "UpdateSampleQuery") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *sampleQueryGRPCClient) DeleteSampleQuery(ctx context.Context, req *disc opts = append((*c.CallOptions).DeleteSampleQuery[0:len((*c.CallOptions).DeleteSampleQuery):len((*c.CallOptions).DeleteSampleQuery)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sampleQueryClient.DeleteSampleQuery(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sampleQueryClient.DeleteSampleQuery, req, settings.GRPC, c.logger, "DeleteSampleQuery") return err }, opts...) return err @@ -712,7 +717,7 @@ func (c *sampleQueryGRPCClient) ImportSampleQueries(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.ImportSampleQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.ImportSampleQueries, req, settings.GRPC, c.logger, "ImportSampleQueries") return err }, opts...) if err != nil { @@ -731,7 +736,7 @@ func (c *sampleQueryGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -746,7 +751,7 @@ func (c *sampleQueryGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *sampleQueryGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -834,17 +839,7 @@ func (c *sampleQueryRESTClient) GetSampleQuery(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSampleQuery") if err != nil { return err } @@ -907,21 +902,10 @@ func (c *sampleQueryRESTClient) ListSampleQueries(ctx context.Context, req *disc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSampleQueries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -992,17 +976,7 @@ func (c *sampleQueryRESTClient) CreateSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSampleQuery") if err != nil { return err } @@ -1066,17 +1040,7 @@ func (c *sampleQueryRESTClient) UpdateSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSampleQuery") if err != nil { return err } @@ -1123,15 +1087,8 @@ func (c *sampleQueryRESTClient) DeleteSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSampleQuery") + return err }, opts...) } @@ -1179,21 +1136,10 @@ func (c *sampleQueryRESTClient) ImportSampleQueries(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSampleQueries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1247,15 +1193,8 @@ func (c *sampleQueryRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1292,17 +1231,7 @@ func (c *sampleQueryRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1367,21 +1296,10 @@ func (c *sampleQueryRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/sample_query_client_example_go123_test.go b/discoveryengine/apiv1alpha/sample_query_client_example_go123_test.go index cd6da9aa2d58..d56f3b87b6cf 100644 --- a/discoveryengine/apiv1alpha/sample_query_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/sample_query_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSampleQueryClient_ListSampleQueries_all() { } for resp, err := range c.ListSampleQueries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSampleQueryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/sample_query_set_client.go b/discoveryengine/apiv1alpha/sample_query_set_client.go index 9f51a0f83059..085865925e09 100755 --- a/discoveryengine/apiv1alpha/sample_query_set_client.go +++ b/discoveryengine/apiv1alpha/sample_query_set_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -377,6 +376,8 @@ type sampleQuerySetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSampleQuerySetClient creates a new sample query set service client based on gRPC. @@ -404,6 +405,7 @@ func NewSampleQuerySetClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, sampleQuerySetClient: discoveryenginepb.NewSampleQuerySetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -451,6 +453,8 @@ type sampleQuerySetRESTClient struct { // Points back to the CallOptions field of the containing SampleQuerySetClient CallOptions **SampleQuerySetCallOptions + + logger *slog.Logger } // NewSampleQuerySetRESTClient creates a new sample query set service rest client. @@ -469,6 +473,7 @@ func NewSampleQuerySetRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -521,7 +526,7 @@ func (c *sampleQuerySetGRPCClient) GetSampleQuerySet(ctx context.Context, req *d var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.GetSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.GetSampleQuerySet, req, settings.GRPC, c.logger, "GetSampleQuerySet") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *sampleQuerySetGRPCClient) ListSampleQuerySets(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.ListSampleQuerySets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.ListSampleQuerySets, req, settings.GRPC, c.logger, "ListSampleQuerySets") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *sampleQuerySetGRPCClient) CreateSampleQuerySet(ctx context.Context, req var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.CreateSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.CreateSampleQuerySet, req, settings.GRPC, c.logger, "CreateSampleQuerySet") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *sampleQuerySetGRPCClient) UpdateSampleQuerySet(ctx context.Context, req var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.UpdateSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.UpdateSampleQuerySet, req, settings.GRPC, c.logger, "UpdateSampleQuerySet") return err }, opts...) if err != nil { @@ -620,7 +625,7 @@ func (c *sampleQuerySetGRPCClient) DeleteSampleQuerySet(ctx context.Context, req opts = append((*c.CallOptions).DeleteSampleQuerySet[0:len((*c.CallOptions).DeleteSampleQuerySet):len((*c.CallOptions).DeleteSampleQuerySet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sampleQuerySetClient.DeleteSampleQuerySet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sampleQuerySetClient.DeleteSampleQuerySet, req, settings.GRPC, c.logger, "DeleteSampleQuerySet") return err }, opts...) return err @@ -634,7 +639,7 @@ func (c *sampleQuerySetGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -649,7 +654,7 @@ func (c *sampleQuerySetGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *sampleQuerySetGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -738,17 +743,7 @@ func (c *sampleQuerySetRESTClient) GetSampleQuerySet(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSampleQuerySet") if err != nil { return err } @@ -811,21 +806,10 @@ func (c *sampleQuerySetRESTClient) ListSampleQuerySets(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSampleQuerySets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -897,17 +881,7 @@ func (c *sampleQuerySetRESTClient) CreateSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSampleQuerySet") if err != nil { return err } @@ -972,17 +946,7 @@ func (c *sampleQuerySetRESTClient) UpdateSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSampleQuerySet") if err != nil { return err } @@ -1030,15 +994,8 @@ func (c *sampleQuerySetRESTClient) DeleteSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSampleQuerySet") + return err }, opts...) } @@ -1078,15 +1035,8 @@ func (c *sampleQuerySetRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1123,17 +1073,7 @@ func (c *sampleQuerySetRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1198,21 +1138,10 @@ func (c *sampleQuerySetRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/sample_query_set_client_example_go123_test.go b/discoveryengine/apiv1alpha/sample_query_set_client_example_go123_test.go index 8939a26a2621..e1d46d80108d 100644 --- a/discoveryengine/apiv1alpha/sample_query_set_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/sample_query_set_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSampleQuerySetClient_ListSampleQuerySets_all() { } for resp, err := range c.ListSampleQuerySets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSampleQuerySetClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/schema_client.go b/discoveryengine/apiv1alpha/schema_client.go index 87cf549c7eb3..62314471a851 100755 --- a/discoveryengine/apiv1alpha/schema_client.go +++ b/discoveryengine/apiv1alpha/schema_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -404,6 +403,8 @@ type schemaGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSchemaClient creates a new schema service client based on gRPC. @@ -430,6 +431,7 @@ func NewSchemaClient(ctx context.Context, opts ...option.ClientOption) (*SchemaC connPool: connPool, schemaClient: discoveryenginepb.NewSchemaServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -493,6 +495,8 @@ type schemaRESTClient struct { // Points back to the CallOptions field of the containing SchemaClient CallOptions **SchemaCallOptions + + logger *slog.Logger } // NewSchemaRESTClient creates a new schema service rest client. @@ -510,6 +514,7 @@ func NewSchemaRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sch endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -572,7 +577,7 @@ func (c *schemaGRPCClient) GetSchema(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.GetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.GetSchema, req, settings.GRPC, c.logger, "GetSchema") return err }, opts...) if err != nil { @@ -601,7 +606,7 @@ func (c *schemaGRPCClient) ListSchemas(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ListSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ListSchemas, req, settings.GRPC, c.logger, "ListSchemas") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *schemaGRPCClient) CreateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.CreateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.CreateSchema, req, settings.GRPC, c.logger, "CreateSchema") return err }, opts...) if err != nil { @@ -656,7 +661,7 @@ func (c *schemaGRPCClient) UpdateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.UpdateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.UpdateSchema, req, settings.GRPC, c.logger, "UpdateSchema") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *schemaGRPCClient) DeleteSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.DeleteSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.DeleteSchema, req, settings.GRPC, c.logger, "DeleteSchema") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *schemaGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -710,7 +715,7 @@ func (c *schemaGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *schemaGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -798,17 +803,7 @@ func (c *schemaRESTClient) GetSchema(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSchema") if err != nil { return err } @@ -870,21 +865,10 @@ func (c *schemaRESTClient) ListSchemas(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -954,21 +938,10 @@ func (c *schemaRESTClient) CreateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSchema") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1028,21 +1001,10 @@ func (c *schemaRESTClient) UpdateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1092,21 +1054,10 @@ func (c *schemaRESTClient) DeleteSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,15 +1111,8 @@ func (c *schemaRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1205,17 +1149,7 @@ func (c *schemaRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1280,21 +1214,10 @@ func (c *schemaRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/schema_client_example_go123_test.go b/discoveryengine/apiv1alpha/schema_client_example_go123_test.go index 42e229f6d0d6..ffbfe41b34ab 100644 --- a/discoveryengine/apiv1alpha/schema_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/schema_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSchemaClient_ListSchemas_all() { } for resp, err := range c.ListSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSchemaClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/search_client.go b/discoveryengine/apiv1alpha/search_client.go index b83a6cd35bcb..632e93173ebe 100755 --- a/discoveryengine/apiv1alpha/search_client.go +++ b/discoveryengine/apiv1alpha/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -277,6 +278,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: discoveryenginepb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -341,6 +345,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -404,7 +409,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *discoveryenginepb.Se } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -438,7 +443,7 @@ func (c *searchGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -453,7 +458,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -482,7 +487,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -553,21 +558,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *discoveryenginepb.Se } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -633,15 +627,8 @@ func (c *searchRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -678,17 +665,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -753,21 +730,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/search_client_example_go123_test.go b/discoveryengine/apiv1alpha/search_client_example_go123_test.go index 5b9007a094f5..be85cbf08032 100644 --- a/discoveryengine/apiv1alpha/search_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/search_tuning_client.go b/discoveryengine/apiv1alpha/search_tuning_client.go index e120d997d6a5..0691c960c869 100755 --- a/discoveryengine/apiv1alpha/search_tuning_client.go +++ b/discoveryengine/apiv1alpha/search_tuning_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -258,6 +257,8 @@ type searchTuningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchTuningClient creates a new search tuning service client based on gRPC. @@ -284,6 +285,7 @@ func NewSearchTuningClient(ctx context.Context, opts ...option.ClientOption) (*S connPool: connPool, searchTuningClient: discoveryenginepb.NewSearchTuningServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -347,6 +349,8 @@ type searchTuningRESTClient struct { // Points back to the CallOptions field of the containing SearchTuningClient CallOptions **SearchTuningCallOptions + + logger *slog.Logger } // NewSearchTuningRESTClient creates a new search tuning service rest client. @@ -364,6 +368,7 @@ func NewSearchTuningRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -426,7 +431,7 @@ func (c *searchTuningGRPCClient) TrainCustomModel(ctx context.Context, req *disc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.TrainCustomModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.TrainCustomModel, req, settings.GRPC, c.logger, "TrainCustomModel") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *searchTuningGRPCClient) ListCustomModels(ctx context.Context, req *disc var resp *discoveryenginepb.ListCustomModelsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.ListCustomModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.ListCustomModels, req, settings.GRPC, c.logger, "ListCustomModels") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *searchTuningGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -478,7 +483,7 @@ func (c *searchTuningGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *searchTuningGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -571,21 +576,10 @@ func (c *searchTuningRESTClient) TrainCustomModel(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainCustomModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -636,17 +630,7 @@ func (c *searchTuningRESTClient) ListCustomModels(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomModels") if err != nil { return err } @@ -699,15 +683,8 @@ func (c *searchTuningRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -744,17 +721,7 @@ func (c *searchTuningRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -819,21 +786,10 @@ func (c *searchTuningRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/search_tuning_client_example_go123_test.go b/discoveryengine/apiv1alpha/search_tuning_client_example_go123_test.go index 59e3c9a9d218..794a4d13fea5 100644 --- a/discoveryengine/apiv1alpha/search_tuning_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/search_tuning_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSearchTuningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/serving_config_client.go b/discoveryengine/apiv1alpha/serving_config_client.go index c8a9a47a68ed..14e9bcbd2b28 100755 --- a/discoveryengine/apiv1alpha/serving_config_client.go +++ b/discoveryengine/apiv1alpha/serving_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type servingConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServingConfigClient creates a new serving config service client based on gRPC. @@ -280,6 +281,7 @@ func NewServingConfigClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, servingConfigClient: discoveryenginepb.NewServingConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -327,6 +329,8 @@ type servingConfigRESTClient struct { // Points back to the CallOptions field of the containing ServingConfigClient CallOptions **ServingConfigCallOptions + + logger *slog.Logger } // NewServingConfigRESTClient creates a new serving config service rest client. @@ -345,6 +349,7 @@ func NewServingConfigRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *servingConfigGRPCClient) UpdateServingConfig(ctx context.Context, req * var resp *discoveryenginepb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.UpdateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.UpdateServingConfig, req, settings.GRPC, c.logger, "UpdateServingConfig") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *servingConfigGRPCClient) GetServingConfig(ctx context.Context, req *dis var resp *discoveryenginepb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.GetServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.GetServingConfig, req, settings.GRPC, c.logger, "GetServingConfig") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *servingConfigGRPCClient) ListServingConfigs(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.ListServingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.ListServingConfigs, req, settings.GRPC, c.logger, "ListServingConfigs") return err }, opts...) if err != nil { @@ -478,7 +483,7 @@ func (c *servingConfigGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -493,7 +498,7 @@ func (c *servingConfigGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -522,7 +527,7 @@ func (c *servingConfigGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -597,17 +602,7 @@ func (c *servingConfigRESTClient) UpdateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServingConfig") if err != nil { return err } @@ -659,17 +654,7 @@ func (c *servingConfigRESTClient) GetServingConfig(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServingConfig") if err != nil { return err } @@ -731,21 +716,10 @@ func (c *servingConfigRESTClient) ListServingConfigs(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServingConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -811,15 +785,8 @@ func (c *servingConfigRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -856,17 +823,7 @@ func (c *servingConfigRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -931,21 +888,10 @@ func (c *servingConfigRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/serving_config_client_example_go123_test.go b/discoveryengine/apiv1alpha/serving_config_client_example_go123_test.go index 9efe09ce5ca3..532031fcf8bd 100644 --- a/discoveryengine/apiv1alpha/serving_config_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/serving_config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServingConfigClient_ListServingConfigs_all() { } for resp, err := range c.ListServingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServingConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/site_search_engine_client.go b/discoveryengine/apiv1alpha/site_search_engine_client.go index 90c9bc092bfe..93349d8ce685 100755 --- a/discoveryengine/apiv1alpha/site_search_engine_client.go +++ b/discoveryengine/apiv1alpha/site_search_engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -431,6 +430,8 @@ type siteSearchEngineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSiteSearchEngineClient creates a new site search engine service client based on gRPC. @@ -457,6 +458,7 @@ func NewSiteSearchEngineClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, siteSearchEngineClient: discoveryenginepb.NewSiteSearchEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -520,6 +522,8 @@ type siteSearchEngineRESTClient struct { // Points back to the CallOptions field of the containing SiteSearchEngineClient CallOptions **SiteSearchEngineCallOptions + + logger *slog.Logger } // NewSiteSearchEngineRESTClient creates a new site search engine service rest client. @@ -537,6 +541,7 @@ func NewSiteSearchEngineRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -599,7 +604,7 @@ func (c *siteSearchEngineGRPCClient) GetSiteSearchEngine(ctx context.Context, re var resp *discoveryenginepb.SiteSearchEngine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetSiteSearchEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetSiteSearchEngine, req, settings.GRPC, c.logger, "GetSiteSearchEngine") return err }, opts...) if err != nil { @@ -617,7 +622,7 @@ func (c *siteSearchEngineGRPCClient) CreateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.CreateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.CreateTargetSite, req, settings.GRPC, c.logger, "CreateTargetSite") return err }, opts...) if err != nil { @@ -637,7 +642,7 @@ func (c *siteSearchEngineGRPCClient) BatchCreateTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchCreateTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchCreateTargetSites, req, settings.GRPC, c.logger, "BatchCreateTargetSites") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *siteSearchEngineGRPCClient) GetTargetSite(ctx context.Context, req *dis var resp *discoveryenginepb.TargetSite err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetTargetSite, req, settings.GRPC, c.logger, "GetTargetSite") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *siteSearchEngineGRPCClient) UpdateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.UpdateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.UpdateTargetSite, req, settings.GRPC, c.logger, "UpdateTargetSite") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *siteSearchEngineGRPCClient) DeleteTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DeleteTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DeleteTargetSite, req, settings.GRPC, c.logger, "DeleteTargetSite") return err }, opts...) if err != nil { @@ -726,7 +731,7 @@ func (c *siteSearchEngineGRPCClient) ListTargetSites(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.ListTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.ListTargetSites, req, settings.GRPC, c.logger, "ListTargetSites") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *siteSearchEngineGRPCClient) EnableAdvancedSiteSearch(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.EnableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.EnableAdvancedSiteSearch, req, settings.GRPC, c.logger, "EnableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *siteSearchEngineGRPCClient) DisableAdvancedSiteSearch(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DisableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DisableAdvancedSiteSearch, req, settings.GRPC, c.logger, "DisableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *siteSearchEngineGRPCClient) RecrawlUris(ctx context.Context, req *disco var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.RecrawlUris(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.RecrawlUris, req, settings.GRPC, c.logger, "RecrawlUris") return err }, opts...) if err != nil { @@ -821,7 +826,7 @@ func (c *siteSearchEngineGRPCClient) BatchVerifyTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchVerifyTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchVerifyTargetSites, req, settings.GRPC, c.logger, "BatchVerifyTargetSites") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *siteSearchEngineGRPCClient) FetchDomainVerificationStatus(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.FetchDomainVerificationStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.FetchDomainVerificationStatus, req, settings.GRPC, c.logger, "FetchDomainVerificationStatus") return err }, opts...) if err != nil { @@ -887,7 +892,7 @@ func (c *siteSearchEngineGRPCClient) SetUriPatternDocumentData(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.SetUriPatternDocumentData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.SetUriPatternDocumentData, req, settings.GRPC, c.logger, "SetUriPatternDocumentData") return err }, opts...) if err != nil { @@ -907,7 +912,7 @@ func (c *siteSearchEngineGRPCClient) GetUriPatternDocumentData(ctx context.Conte var resp *discoveryenginepb.GetUriPatternDocumentDataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetUriPatternDocumentData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetUriPatternDocumentData, req, settings.GRPC, c.logger, "GetUriPatternDocumentData") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *siteSearchEngineGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -939,7 +944,7 @@ func (c *siteSearchEngineGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *siteSearchEngineGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1028,17 +1033,7 @@ func (c *siteSearchEngineRESTClient) GetSiteSearchEngine(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSiteSearchEngine") if err != nil { return err } @@ -1094,21 +1089,10 @@ func (c *siteSearchEngineRESTClient) CreateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1165,21 +1149,10 @@ func (c *siteSearchEngineRESTClient) BatchCreateTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1230,17 +1203,7 @@ func (c *siteSearchEngineRESTClient) GetTargetSite(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTargetSite") if err != nil { return err } @@ -1296,21 +1259,10 @@ func (c *siteSearchEngineRESTClient) UpdateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTargetSite") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1360,21 +1312,10 @@ func (c *siteSearchEngineRESTClient) DeleteTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1438,21 +1379,10 @@ func (c *siteSearchEngineRESTClient) ListTargetSites(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1520,21 +1450,10 @@ func (c *siteSearchEngineRESTClient) EnableAdvancedSiteSearch(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableAdvancedSiteSearch") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1590,21 +1509,10 @@ func (c *siteSearchEngineRESTClient) DisableAdvancedSiteSearch(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableAdvancedSiteSearch") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1660,21 +1568,10 @@ func (c *siteSearchEngineRESTClient) RecrawlUris(ctx context.Context, req *disco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RecrawlUris") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1732,21 +1629,10 @@ func (c *siteSearchEngineRESTClient) BatchVerifyTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchVerifyTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1811,21 +1697,10 @@ func (c *siteSearchEngineRESTClient) FetchDomainVerificationStatus(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchDomainVerificationStatus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1894,21 +1769,10 @@ func (c *siteSearchEngineRESTClient) SetUriPatternDocumentData(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetUriPatternDocumentData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1960,17 +1824,7 @@ func (c *siteSearchEngineRESTClient) GetUriPatternDocumentData(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUriPatternDocumentData") if err != nil { return err } @@ -2023,15 +1877,8 @@ func (c *siteSearchEngineRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2068,17 +1915,7 @@ func (c *siteSearchEngineRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2143,21 +1980,10 @@ func (c *siteSearchEngineRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/site_search_engine_client_example_go123_test.go b/discoveryengine/apiv1alpha/site_search_engine_client_example_go123_test.go index c49b82e89d0f..bff74b5acc29 100644 --- a/discoveryengine/apiv1alpha/site_search_engine_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/site_search_engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSiteSearchEngineClient_FetchDomainVerificationStatus_all() { } for resp, err := range c.FetchDomainVerificationStatus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSiteSearchEngineClient_ListTargetSites_all() { } for resp, err := range c.ListTargetSites(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleSiteSearchEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1alpha/user_event_client.go b/discoveryengine/apiv1alpha/user_event_client.go index 4cf9e0bfd7cb..db1d277e76a1 100755 --- a/discoveryengine/apiv1alpha/user_event_client.go +++ b/discoveryengine/apiv1alpha/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -381,6 +380,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -407,6 +408,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: discoveryenginepb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -470,6 +472,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -487,6 +491,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -549,7 +554,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *discovery var resp *discoveryenginepb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -567,7 +572,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *discove var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *discove var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *userEventGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -639,7 +644,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -737,17 +742,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -807,17 +802,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -876,21 +861,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -952,21 +926,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1020,15 +983,8 @@ func (c *userEventRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1065,17 +1021,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1140,21 +1086,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1alpha/user_event_client_example_go123_test.go b/discoveryengine/apiv1alpha/user_event_client_example_go123_test.go index c66cce5677a4..9f41a620562b 100644 --- a/discoveryengine/apiv1alpha/user_event_client_example_go123_test.go +++ b/discoveryengine/apiv1alpha/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/completion_client.go b/discoveryengine/apiv1beta/completion_client.go index a3eb1a854c36..5fbcc93fa262 100755 --- a/discoveryengine/apiv1beta/completion_client.go +++ b/discoveryengine/apiv1beta/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -449,6 +448,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -475,6 +476,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: discoveryenginepb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -538,6 +540,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -555,6 +559,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -617,7 +622,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *discovery var resp *discoveryenginepb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *completionGRPCClient) AdvancedCompleteQuery(ctx context.Context, req *d var resp *discoveryenginepb.AdvancedCompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.AdvancedCompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.AdvancedCompleteQuery, req, settings.GRPC, c.logger, "AdvancedCompleteQuery") return err }, opts...) if err != nil { @@ -653,7 +658,7 @@ func (c *completionGRPCClient) ImportSuggestionDenyListEntries(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportSuggestionDenyListEntries, req, settings.GRPC, c.logger, "ImportSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *completionGRPCClient) PurgeSuggestionDenyListEntries(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeSuggestionDenyListEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeSuggestionDenyListEntries, req, settings.GRPC, c.logger, "PurgeSuggestionDenyListEntries") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *completionGRPCClient) ImportCompletionSuggestions(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionSuggestions, req, settings.GRPC, c.logger, "ImportCompletionSuggestions") return err }, opts...) if err != nil { @@ -713,7 +718,7 @@ func (c *completionGRPCClient) PurgeCompletionSuggestions(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.PurgeCompletionSuggestions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.PurgeCompletionSuggestions, req, settings.GRPC, c.logger, "PurgeCompletionSuggestions") return err }, opts...) if err != nil { @@ -732,7 +737,7 @@ func (c *completionGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -747,7 +752,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -776,7 +781,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -845,17 +850,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -911,17 +906,7 @@ func (c *completionRESTClient) AdvancedCompleteQuery(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AdvancedCompleteQuery") if err != nil { return err } @@ -978,21 +963,10 @@ func (c *completionRESTClient) ImportSuggestionDenyListEntries(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSuggestionDenyListEntries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1050,21 +1024,10 @@ func (c *completionRESTClient) PurgeSuggestionDenyListEntries(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeSuggestionDenyListEntries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1122,21 +1085,10 @@ func (c *completionRESTClient) ImportCompletionSuggestions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionSuggestions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1194,21 +1146,10 @@ func (c *completionRESTClient) PurgeCompletionSuggestions(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeCompletionSuggestions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1262,15 +1203,8 @@ func (c *completionRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1307,17 +1241,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1382,21 +1306,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/completion_client_example_go123_test.go b/discoveryengine/apiv1beta/completion_client_example_go123_test.go index 09747e87f90c..41271b8367cf 100644 --- a/discoveryengine/apiv1beta/completion_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/control_client.go b/discoveryengine/apiv1beta/control_client.go index 5b8cc2fa47bb..9d7701956d13 100755 --- a/discoveryengine/apiv1beta/control_client.go +++ b/discoveryengine/apiv1beta/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -387,6 +386,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -416,6 +417,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: discoveryenginepb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -463,6 +465,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -483,6 +487,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -535,7 +540,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -552,7 +557,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *discoveryeng opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -567,7 +572,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *discoveryeng var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *discoveryengi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *controlGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +668,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -764,17 +769,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -824,15 +819,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -887,17 +875,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *discoveryeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -947,17 +925,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -1023,21 +991,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *discoveryengi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1103,15 +1060,8 @@ func (c *controlRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1148,17 +1098,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1223,21 +1163,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/control_client_example_go123_test.go b/discoveryengine/apiv1beta/control_client_example_go123_test.go index 3336453f66b6..af8065c742b7 100644 --- a/discoveryengine/apiv1beta/control_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/conversational_search_client.go b/discoveryengine/apiv1beta/conversational_search_client.go index 6e04683635fe..f6ec9f3c7acb 100755 --- a/discoveryengine/apiv1beta/conversational_search_client.go +++ b/discoveryengine/apiv1beta/conversational_search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -634,6 +633,8 @@ type conversationalSearchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversationalSearchClient creates a new conversational search service client based on gRPC. @@ -660,6 +661,7 @@ func NewConversationalSearchClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, conversationalSearchClient: discoveryenginepb.NewConversationalSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -707,6 +709,8 @@ type conversationalSearchRESTClient struct { // Points back to the CallOptions field of the containing ConversationalSearchClient CallOptions **ConversationalSearchCallOptions + + logger *slog.Logger } // NewConversationalSearchRESTClient creates a new conversational search service rest client. @@ -724,6 +728,7 @@ func NewConversationalSearchRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -776,7 +781,7 @@ func (c *conversationalSearchGRPCClient) ConverseConversation(ctx context.Contex var resp *discoveryenginepb.ConverseConversationResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ConverseConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ConverseConversation, req, settings.GRPC, c.logger, "ConverseConversation") return err }, opts...) if err != nil { @@ -794,7 +799,7 @@ func (c *conversationalSearchGRPCClient) CreateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateConversation, req, settings.GRPC, c.logger, "CreateConversation") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *conversationalSearchGRPCClient) DeleteConversation(ctx context.Context, opts = append((*c.CallOptions).DeleteConversation[0:len((*c.CallOptions).DeleteConversation):len((*c.CallOptions).DeleteConversation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteConversation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteConversation, req, settings.GRPC, c.logger, "DeleteConversation") return err }, opts...) return err @@ -826,7 +831,7 @@ func (c *conversationalSearchGRPCClient) UpdateConversation(ctx context.Context, var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateConversation, req, settings.GRPC, c.logger, "UpdateConversation") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *conversationalSearchGRPCClient) GetConversation(ctx context.Context, re var resp *discoveryenginepb.Conversation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetConversation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetConversation, req, settings.GRPC, c.logger, "GetConversation") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *conversationalSearchGRPCClient) ListConversations(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListConversations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListConversations, req, settings.GRPC, c.logger, "ListConversations") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *conversationalSearchGRPCClient) AnswerQuery(ctx context.Context, req *d var resp *discoveryenginepb.AnswerQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.AnswerQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.AnswerQuery, req, settings.GRPC, c.logger, "AnswerQuery") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *conversationalSearchGRPCClient) GetAnswer(ctx context.Context, req *dis var resp *discoveryenginepb.Answer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetAnswer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetAnswer, req, settings.GRPC, c.logger, "GetAnswer") return err }, opts...) if err != nil { @@ -944,7 +949,7 @@ func (c *conversationalSearchGRPCClient) CreateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.CreateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.CreateSession, req, settings.GRPC, c.logger, "CreateSession") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *conversationalSearchGRPCClient) DeleteSession(ctx context.Context, req opts = append((*c.CallOptions).DeleteSession[0:len((*c.CallOptions).DeleteSession):len((*c.CallOptions).DeleteSession)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversationalSearchClient.DeleteSession(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversationalSearchClient.DeleteSession, req, settings.GRPC, c.logger, "DeleteSession") return err }, opts...) return err @@ -976,7 +981,7 @@ func (c *conversationalSearchGRPCClient) UpdateSession(ctx context.Context, req var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.UpdateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.UpdateSession, req, settings.GRPC, c.logger, "UpdateSession") return err }, opts...) if err != nil { @@ -994,7 +999,7 @@ func (c *conversationalSearchGRPCClient) GetSession(ctx context.Context, req *di var resp *discoveryenginepb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.GetSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.GetSession, req, settings.GRPC, c.logger, "GetSession") return err }, opts...) if err != nil { @@ -1023,7 +1028,7 @@ func (c *conversationalSearchGRPCClient) ListSessions(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversationalSearchClient.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversationalSearchClient.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *conversationalSearchGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1072,7 +1077,7 @@ func (c *conversationalSearchGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *conversationalSearchGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1166,17 +1171,7 @@ func (c *conversationalSearchRESTClient) ConverseConversation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConverseConversation") if err != nil { return err } @@ -1236,17 +1231,7 @@ func (c *conversationalSearchRESTClient) CreateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversation") if err != nil { return err } @@ -1296,15 +1281,8 @@ func (c *conversationalSearchRESTClient) DeleteConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversation") + return err }, opts...) } @@ -1360,17 +1338,7 @@ func (c *conversationalSearchRESTClient) UpdateConversation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversation") if err != nil { return err } @@ -1420,17 +1388,7 @@ func (c *conversationalSearchRESTClient) GetConversation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversation") if err != nil { return err } @@ -1499,21 +1457,10 @@ func (c *conversationalSearchRESTClient) ListConversations(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1582,17 +1529,7 @@ func (c *conversationalSearchRESTClient) AnswerQuery(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnswerQuery") if err != nil { return err } @@ -1642,17 +1579,7 @@ func (c *conversationalSearchRESTClient) GetAnswer(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnswer") if err != nil { return err } @@ -1712,17 +1639,7 @@ func (c *conversationalSearchRESTClient) CreateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSession") if err != nil { return err } @@ -1772,15 +1689,8 @@ func (c *conversationalSearchRESTClient) DeleteSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSession") + return err }, opts...) } @@ -1835,17 +1745,7 @@ func (c *conversationalSearchRESTClient) UpdateSession(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSession") if err != nil { return err } @@ -1895,17 +1795,7 @@ func (c *conversationalSearchRESTClient) GetSession(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSession") if err != nil { return err } @@ -1974,21 +1864,10 @@ func (c *conversationalSearchRESTClient) ListSessions(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2054,15 +1933,8 @@ func (c *conversationalSearchRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2099,17 +1971,7 @@ func (c *conversationalSearchRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2174,21 +2036,10 @@ func (c *conversationalSearchRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/conversational_search_client_example_go123_test.go b/discoveryengine/apiv1beta/conversational_search_client_example_go123_test.go index 9020b66ad95d..48b98cdca49c 100644 --- a/discoveryengine/apiv1beta/conversational_search_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/conversational_search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleConversationalSearchClient_ListConversations_all() { } for resp, err := range c.ListConversations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleConversationalSearchClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleConversationalSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/data_store_client.go b/discoveryengine/apiv1beta/data_store_client.go index 5c7b3cbe77a1..d5e872e3bbad 100755 --- a/discoveryengine/apiv1beta/data_store_client.go +++ b/discoveryengine/apiv1beta/data_store_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -300,6 +299,8 @@ type dataStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataStoreClient creates a new data store service client based on gRPC. @@ -327,6 +328,7 @@ func NewDataStoreClient(ctx context.Context, opts ...option.ClientOption) (*Data connPool: connPool, dataStoreClient: discoveryenginepb.NewDataStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -390,6 +392,8 @@ type dataStoreRESTClient struct { // Points back to the CallOptions field of the containing DataStoreClient CallOptions **DataStoreCallOptions + + logger *slog.Logger } // NewDataStoreRESTClient creates a new data store service rest client. @@ -408,6 +412,7 @@ func NewDataStoreRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -470,7 +475,7 @@ func (c *dataStoreGRPCClient) CreateDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.CreateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.CreateDataStore, req, settings.GRPC, c.logger, "CreateDataStore") return err }, opts...) if err != nil { @@ -490,7 +495,7 @@ func (c *dataStoreGRPCClient) GetDataStore(ctx context.Context, req *discoveryen var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.GetDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.GetDataStore, req, settings.GRPC, c.logger, "GetDataStore") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *dataStoreGRPCClient) ListDataStores(ctx context.Context, req *discovery } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.ListDataStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.ListDataStores, req, settings.GRPC, c.logger, "ListDataStores") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *dataStoreGRPCClient) DeleteDataStore(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.DeleteDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.DeleteDataStore, req, settings.GRPC, c.logger, "DeleteDataStore") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *dataStoreGRPCClient) UpdateDataStore(ctx context.Context, req *discover var resp *discoveryenginepb.DataStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataStoreClient.UpdateDataStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataStoreClient.UpdateDataStore, req, settings.GRPC, c.logger, "UpdateDataStore") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *dataStoreGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -606,7 +611,7 @@ func (c *dataStoreGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *dataStoreGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -713,21 +718,10 @@ func (c *dataStoreRESTClient) CreateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataStore") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -778,17 +772,7 @@ func (c *dataStoreRESTClient) GetDataStore(ctx context.Context, req *discoveryen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataStore") if err != nil { return err } @@ -854,21 +838,10 @@ func (c *dataStoreRESTClient) ListDataStores(ctx context.Context, req *discovery } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataStores") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -930,21 +903,10 @@ func (c *dataStoreRESTClient) DeleteDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataStore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1009,17 +971,7 @@ func (c *dataStoreRESTClient) UpdateDataStore(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataStore") if err != nil { return err } @@ -1072,15 +1024,8 @@ func (c *dataStoreRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1117,17 +1062,7 @@ func (c *dataStoreRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1192,21 +1127,10 @@ func (c *dataStoreRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/data_store_client_example_go123_test.go b/discoveryengine/apiv1beta/data_store_client_example_go123_test.go index e9d95cd02808..b1e766424f9c 100644 --- a/discoveryengine/apiv1beta/data_store_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/data_store_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDataStoreClient_ListDataStores_all() { } for resp, err := range c.ListDataStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDataStoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/discoveryenginepb/answer.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/answer.pb.go index 723cc75147d8..dfa4513eb0ea 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/answer.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/answer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/answer.proto @@ -350,11 +350,9 @@ type Answer struct { func (x *Answer) Reset() { *x = Answer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer) String() string { @@ -365,7 +363,7 @@ func (*Answer) ProtoMessage() {} func (x *Answer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +472,9 @@ type Answer_Citation struct { func (x *Answer_Citation) Reset() { *x = Answer_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Citation) String() string { @@ -489,7 +485,7 @@ func (*Answer_Citation) ProtoMessage() {} func (x *Answer_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +533,9 @@ type Answer_CitationSource struct { func (x *Answer_CitationSource) Reset() { *x = Answer_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_CitationSource) String() string { @@ -552,7 +546,7 @@ func (*Answer_CitationSource) ProtoMessage() {} func (x *Answer_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +586,9 @@ type Answer_Reference struct { func (x *Answer_Reference) Reset() { *x = Answer_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference) String() string { @@ -607,7 +599,7 @@ func (*Answer_Reference) ProtoMessage() {} func (x *Answer_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,11 +685,9 @@ type Answer_Step struct { func (x *Answer_Step) Reset() { *x = Answer_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step) String() string { @@ -708,7 +698,7 @@ func (*Answer_Step) ProtoMessage() {} func (x *Answer_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +753,9 @@ type Answer_QueryUnderstandingInfo struct { func (x *Answer_QueryUnderstandingInfo) Reset() { *x = Answer_QueryUnderstandingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo) String() string { @@ -778,7 +766,7 @@ func (*Answer_QueryUnderstandingInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +809,9 @@ type Answer_Reference_UnstructuredDocumentInfo struct { func (x *Answer_Reference_UnstructuredDocumentInfo) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo) String() string { @@ -836,7 +822,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,11 +894,9 @@ type Answer_Reference_ChunkInfo struct { func (x *Answer_Reference_ChunkInfo) Reset() { *x = Answer_Reference_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo) String() string { @@ -923,7 +907,7 @@ func (*Answer_Reference_ChunkInfo) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,11 +964,9 @@ type Answer_Reference_StructuredDocumentInfo struct { func (x *Answer_Reference_StructuredDocumentInfo) Reset() { *x = Answer_Reference_StructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_StructuredDocumentInfo) String() string { @@ -995,7 +977,7 @@ func (*Answer_Reference_StructuredDocumentInfo) ProtoMessage() {} func (x *Answer_Reference_StructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1026,9 @@ type Answer_Reference_UnstructuredDocumentInfo_ChunkContent struct { func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) Reset() { *x = Answer_Reference_UnstructuredDocumentInfo_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) String() string { @@ -1059,7 +1039,7 @@ func (*Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoMessage() {} func (x *Answer_Reference_UnstructuredDocumentInfo_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1096,9 @@ type Answer_Reference_ChunkInfo_DocumentMetadata struct { func (x *Answer_Reference_ChunkInfo_DocumentMetadata) Reset() { *x = Answer_Reference_ChunkInfo_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Reference_ChunkInfo_DocumentMetadata) String() string { @@ -1131,7 +1109,7 @@ func (*Answer_Reference_ChunkInfo_DocumentMetadata) ProtoMessage() {} func (x *Answer_Reference_ChunkInfo_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1199,11 +1177,9 @@ type Answer_Step_Action struct { func (x *Answer_Step_Action) Reset() { *x = Answer_Step_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action) String() string { @@ -1214,7 +1190,7 @@ func (*Answer_Step_Action) ProtoMessage() {} func (x *Answer_Step_Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1249,9 @@ type Answer_Step_Action_SearchAction struct { func (x *Answer_Step_Action_SearchAction) Reset() { *x = Answer_Step_Action_SearchAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_SearchAction) String() string { @@ -1288,7 +1262,7 @@ func (*Answer_Step_Action_SearchAction) ProtoMessage() {} func (x *Answer_Step_Action_SearchAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1323,11 +1297,9 @@ type Answer_Step_Action_Observation struct { func (x *Answer_Step_Action_Observation) Reset() { *x = Answer_Step_Action_Observation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation) String() string { @@ -1338,7 +1310,7 @@ func (*Answer_Step_Action_Observation) ProtoMessage() {} func (x *Answer_Step_Action_Observation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1358,9 @@ type Answer_Step_Action_Observation_SearchResult struct { func (x *Answer_Step_Action_Observation_SearchResult) Reset() { *x = Answer_Step_Action_Observation_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult) String() string { @@ -1401,7 +1371,7 @@ func (*Answer_Step_Action_Observation_SearchResult) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1472,11 +1442,9 @@ type Answer_Step_Action_Observation_SearchResult_SnippetInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_SnippetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) String() string { @@ -1487,7 +1455,7 @@ func (*Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoMessage() { func (x *Answer_Step_Action_Observation_SearchResult_SnippetInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1504,9 @@ type Answer_Step_Action_Observation_SearchResult_ChunkInfo struct { func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) Reset() { *x = Answer_Step_Action_Observation_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) String() string { @@ -1551,7 +1517,7 @@ func (*Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoMessage() {} func (x *Answer_Step_Action_Observation_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1601,11 +1567,9 @@ type Answer_QueryUnderstandingInfo_QueryClassificationInfo struct { func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) Reset() { *x = Answer_QueryUnderstandingInfo_QueryClassificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) String() string { @@ -1616,7 +1580,7 @@ func (*Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoMessage() {} func (x *Answer_QueryUnderstandingInfo_QueryClassificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,224 +2053,6 @@ func file_google_cloud_discoveryengine_v1beta_answer_proto_init() { if File_google_cloud_discoveryengine_v1beta_answer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Answer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Answer_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_StructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_UnstructuredDocumentInfo_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Reference_ChunkInfo_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_SearchAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_SnippetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Answer_Step_Action_Observation_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Answer_QueryUnderstandingInfo_QueryClassificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_answer_proto_msgTypes[3].OneofWrappers = []any{ (*Answer_Reference_UnstructuredDocumentInfo_)(nil), (*Answer_Reference_ChunkInfo_)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/chunk.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/chunk.pb.go index 923bbf80641d..363d781405ce 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/chunk.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/chunk.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/chunk.proto @@ -73,11 +73,9 @@ type Chunk struct { func (x *Chunk) Reset() { *x = Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk) String() string { @@ -88,7 +86,7 @@ func (*Chunk) ProtoMessage() {} func (x *Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type Chunk_DocumentMetadata struct { func (x *Chunk_DocumentMetadata) Reset() { *x = Chunk_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_DocumentMetadata) String() string { @@ -194,7 +190,7 @@ func (*Chunk_DocumentMetadata) ProtoMessage() {} func (x *Chunk_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type Chunk_PageSpan struct { func (x *Chunk_PageSpan) Reset() { *x = Chunk_PageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_PageSpan) String() string { @@ -259,7 +253,7 @@ func (*Chunk_PageSpan) ProtoMessage() {} func (x *Chunk_PageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +306,9 @@ type Chunk_ChunkMetadata struct { func (x *Chunk_ChunkMetadata) Reset() { *x = Chunk_ChunkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Chunk_ChunkMetadata) String() string { @@ -327,7 +319,7 @@ func (*Chunk_ChunkMetadata) ProtoMessage() {} func (x *Chunk_ChunkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,56 +496,6 @@ func file_google_cloud_discoveryengine_v1beta_chunk_proto_init() { if File_google_cloud_discoveryengine_v1beta_chunk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_PageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Chunk_ChunkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_chunk_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/common.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/common.pb.go index 62cb0c139d32..d43205effe11 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/common.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/common.proto @@ -350,11 +350,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -365,7 +363,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +488,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -505,7 +501,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +564,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -583,7 +577,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +618,9 @@ type EmbeddingConfig struct { func (x *EmbeddingConfig) Reset() { *x = EmbeddingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmbeddingConfig) String() string { @@ -639,7 +631,7 @@ func (*EmbeddingConfig) ProtoMessage() {} func (x *EmbeddingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +665,9 @@ type DoubleList struct { func (x *DoubleList) Reset() { *x = DoubleList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleList) String() string { @@ -688,7 +678,7 @@ func (*DoubleList) ProtoMessage() {} func (x *DoubleList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,68 +902,6 @@ func file_google_cloud_discoveryengine_v1beta_common_proto_init() { if File_google_cloud_discoveryengine_v1beta_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EmbeddingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DoubleList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_common_proto_msgTypes[0].OneofWrappers = []any{ (*Interval_Minimum)(nil), (*Interval_ExclusiveMinimum)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/completion.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/completion.pb.go index 125b5bc1749e..8ea416aa9c2b 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/completion.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/completion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/completion.proto @@ -106,11 +106,9 @@ type SuggestionDenyListEntry struct { func (x *SuggestionDenyListEntry) Reset() { *x = SuggestionDenyListEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SuggestionDenyListEntry) String() string { @@ -121,7 +119,7 @@ func (*SuggestionDenyListEntry) ProtoMessage() {} func (x *SuggestionDenyListEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type CompletionSuggestion struct { func (x *CompletionSuggestion) Reset() { *x = CompletionSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionSuggestion) String() string { @@ -194,7 +190,7 @@ func (*CompletionSuggestion) ProtoMessage() {} func (x *CompletionSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,32 +380,6 @@ func file_google_cloud_discoveryengine_v1beta_completion_proto_init() { if File_google_cloud_discoveryengine_v1beta_completion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SuggestionDenyListEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompletionSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_completion_proto_msgTypes[1].OneofWrappers = []any{ (*CompletionSuggestion_GlobalScore)(nil), (*CompletionSuggestion_Frequency)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/completion_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/completion_service.pb.go index 6128a31a6729..5fe4bea12b65 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/completion_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/completion_service.proto @@ -270,11 +270,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -285,7 +283,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +353,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -370,7 +366,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +472,9 @@ type AdvancedCompleteQueryRequest struct { func (x *AdvancedCompleteQueryRequest) Reset() { *x = AdvancedCompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryRequest) String() string { @@ -491,7 +485,7 @@ func (*AdvancedCompleteQueryRequest) ProtoMessage() {} func (x *AdvancedCompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +585,9 @@ type AdvancedCompleteQueryResponse struct { func (x *AdvancedCompleteQueryResponse) Reset() { *x = AdvancedCompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryResponse) String() string { @@ -606,7 +598,7 @@ func (*AdvancedCompleteQueryResponse) ProtoMessage() {} func (x *AdvancedCompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +665,9 @@ type CompleteQueryResponse_QuerySuggestion struct { func (x *CompleteQueryResponse_QuerySuggestion) Reset() { *x = CompleteQueryResponse_QuerySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_QuerySuggestion) String() string { @@ -688,7 +678,7 @@ func (*CompleteQueryResponse_QuerySuggestion) ProtoMessage() {} func (x *CompleteQueryResponse_QuerySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +724,9 @@ type AdvancedCompleteQueryRequest_BoostSpec struct { func (x *AdvancedCompleteQueryRequest_BoostSpec) Reset() { *x = AdvancedCompleteQueryRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryRequest_BoostSpec) String() string { @@ -749,7 +737,7 @@ func (*AdvancedCompleteQueryRequest_BoostSpec) ProtoMessage() {} func (x *AdvancedCompleteQueryRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +791,9 @@ type AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec struct { func (x *AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -818,7 +804,7 @@ func (*AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() func (x *AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +852,9 @@ type AdvancedCompleteQueryResponse_QuerySuggestion struct { func (x *AdvancedCompleteQueryResponse_QuerySuggestion) Reset() { *x = AdvancedCompleteQueryResponse_QuerySuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryResponse_QuerySuggestion) String() string { @@ -881,7 +865,7 @@ func (*AdvancedCompleteQueryResponse_QuerySuggestion) ProtoMessage() {} func (x *AdvancedCompleteQueryResponse_QuerySuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -936,11 +920,9 @@ type AdvancedCompleteQueryResponse_PersonSuggestion struct { func (x *AdvancedCompleteQueryResponse_PersonSuggestion) Reset() { *x = AdvancedCompleteQueryResponse_PersonSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryResponse_PersonSuggestion) String() string { @@ -951,7 +933,7 @@ func (*AdvancedCompleteQueryResponse_PersonSuggestion) ProtoMessage() {} func (x *AdvancedCompleteQueryResponse_PersonSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +995,9 @@ type AdvancedCompleteQueryResponse_ContentSuggestion struct { func (x *AdvancedCompleteQueryResponse_ContentSuggestion) Reset() { *x = AdvancedCompleteQueryResponse_ContentSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryResponse_ContentSuggestion) String() string { @@ -1028,7 +1008,7 @@ func (*AdvancedCompleteQueryResponse_ContentSuggestion) ProtoMessage() {} func (x *AdvancedCompleteQueryResponse_ContentSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1065,9 @@ type AdvancedCompleteQueryResponse_RecentSearchSuggestion struct { func (x *AdvancedCompleteQueryResponse_RecentSearchSuggestion) Reset() { *x = AdvancedCompleteQueryResponse_RecentSearchSuggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedCompleteQueryResponse_RecentSearchSuggestion) String() string { @@ -1100,7 +1078,7 @@ func (*AdvancedCompleteQueryResponse_RecentSearchSuggestion) ProtoMessage() {} func (x *AdvancedCompleteQueryResponse_RecentSearchSuggestion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,140 +1630,6 @@ func file_google_cloud_discoveryengine_v1beta_completion_service_proto_init() { file_google_cloud_discoveryengine_v1beta_document_proto_init() file_google_cloud_discoveryengine_v1beta_import_config_proto_init() file_google_cloud_discoveryengine_v1beta_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_QuerySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryResponse_QuerySuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryResponse_PersonSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryResponse_ContentSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_completion_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedCompleteQueryResponse_RecentSearchSuggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/control.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/control.pb.go index 7ea603fba8b6..314ad3f60635 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/control.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/control.proto @@ -64,11 +64,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -79,7 +77,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -185,7 +181,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +325,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -344,7 +338,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +386,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -407,7 +399,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type Control_BoostAction struct { func (x *Control_BoostAction) Reset() { *x = Control_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_BoostAction) String() string { @@ -476,7 +466,7 @@ func (*Control_BoostAction) ProtoMessage() {} func (x *Control_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +525,9 @@ type Control_FilterAction struct { func (x *Control_FilterAction) Reset() { *x = Control_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_FilterAction) String() string { @@ -550,7 +538,7 @@ func (*Control_FilterAction) ProtoMessage() {} func (x *Control_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +583,9 @@ type Control_RedirectAction struct { func (x *Control_RedirectAction) Reset() { *x = Control_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_RedirectAction) String() string { @@ -610,7 +596,7 @@ func (*Control_RedirectAction) ProtoMessage() {} func (x *Control_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +636,9 @@ type Control_SynonymsAction struct { func (x *Control_SynonymsAction) Reset() { *x = Control_SynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control_SynonymsAction) String() string { @@ -665,7 +649,7 @@ func (*Control_SynonymsAction) ProtoMessage() {} func (x *Control_SynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,104 +884,6 @@ func file_google_cloud_discoveryengine_v1beta_control_proto_init() { return } file_google_cloud_discoveryengine_v1beta_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Control_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Control_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Control_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Control_SynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_control_proto_msgTypes[1].OneofWrappers = []any{ (*Control_BoostAction_)(nil), (*Control_FilterAction_)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/control_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/control_service.pb.go index 9e58a5e58bba..8dca27acb27e 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/control_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/control_service.proto @@ -65,11 +65,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -80,7 +78,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +135,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -152,7 +148,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +190,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -209,7 +203,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +238,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -259,7 +251,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +300,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -323,7 +313,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -395,7 +383,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,80 +688,6 @@ func file_google_cloud_discoveryengine_v1beta_control_service_proto_init() { return } file_google_cloud_discoveryengine_v1beta_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/conversation.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/conversation.pb.go index d0d8a6663a60..c69619cb6595 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/conversation.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/conversation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/conversation.proto @@ -115,11 +115,9 @@ type Conversation struct { func (x *Conversation) Reset() { *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Conversation) String() string { @@ -130,7 +128,7 @@ func (*Conversation) ProtoMessage() {} func (x *Conversation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +206,9 @@ type Reply struct { func (x *Reply) Reset() { *x = Reply{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reply) String() string { @@ -223,7 +219,7 @@ func (*Reply) ProtoMessage() {} func (x *Reply) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type ConversationContext struct { func (x *ConversationContext) Reset() { *x = ConversationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationContext) String() string { @@ -292,7 +286,7 @@ func (*ConversationContext) ProtoMessage() {} func (x *ConversationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +329,9 @@ type TextInput struct { func (x *TextInput) Reset() { *x = TextInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextInput) String() string { @@ -350,7 +342,7 @@ func (*TextInput) ProtoMessage() {} func (x *TextInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +388,9 @@ type ConversationMessage struct { func (x *ConversationMessage) Reset() { *x = ConversationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversationMessage) String() string { @@ -411,7 +401,7 @@ func (*ConversationMessage) ProtoMessage() {} func (x *ConversationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +482,9 @@ type Reply_Reference struct { func (x *Reply_Reference) Reset() { *x = Reply_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reply_Reference) String() string { @@ -507,7 +495,7 @@ func (*Reply_Reference) ProtoMessage() {} func (x *Reply_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,80 +726,6 @@ func file_google_cloud_discoveryengine_v1beta_conversation_proto_init() { return } file_google_cloud_discoveryengine_v1beta_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Reply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ConversationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TextInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ConversationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Reply_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_conversation_proto_msgTypes[4].OneofWrappers = []any{ (*ConversationMessage_UserInput)(nil), (*ConversationMessage_Reply)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/conversational_search_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/conversational_search_service.pb.go index 2a833da91a7f..b934ee13b080 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/conversational_search_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/conversational_search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/conversational_search_service.proto @@ -228,11 +228,9 @@ type ConverseConversationRequest struct { func (x *ConverseConversationRequest) Reset() { *x = ConverseConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationRequest) String() string { @@ -243,7 +241,7 @@ func (*ConverseConversationRequest) ProtoMessage() {} func (x *ConverseConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +339,9 @@ type ConverseConversationResponse struct { func (x *ConverseConversationResponse) Reset() { *x = ConverseConversationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConverseConversationResponse) String() string { @@ -356,7 +352,7 @@ func (*ConverseConversationResponse) ProtoMessage() {} func (x *ConverseConversationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +410,9 @@ type CreateConversationRequest struct { func (x *CreateConversationRequest) Reset() { *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversationRequest) String() string { @@ -429,7 +423,7 @@ func (*CreateConversationRequest) ProtoMessage() {} func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +472,9 @@ type UpdateConversationRequest struct { func (x *UpdateConversationRequest) Reset() { *x = UpdateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversationRequest) String() string { @@ -493,7 +485,7 @@ func (*UpdateConversationRequest) ProtoMessage() {} func (x *UpdateConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +527,9 @@ type DeleteConversationRequest struct { func (x *DeleteConversationRequest) Reset() { *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversationRequest) String() string { @@ -550,7 +540,7 @@ func (*DeleteConversationRequest) ProtoMessage() {} func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +575,9 @@ type GetConversationRequest struct { func (x *GetConversationRequest) Reset() { *x = GetConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversationRequest) String() string { @@ -600,7 +588,7 @@ func (*GetConversationRequest) ProtoMessage() {} func (x *GetConversationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +646,9 @@ type ListConversationsRequest struct { func (x *ListConversationsRequest) Reset() { *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsRequest) String() string { @@ -673,7 +659,7 @@ func (*ListConversationsRequest) ProtoMessage() {} func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +723,9 @@ type ListConversationsResponse struct { func (x *ListConversationsResponse) Reset() { *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversationsResponse) String() string { @@ -752,7 +736,7 @@ func (*ListConversationsResponse) ProtoMessage() {} func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +848,9 @@ type AnswerQueryRequest struct { func (x *AnswerQueryRequest) Reset() { *x = AnswerQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest) String() string { @@ -879,7 +861,7 @@ func (*AnswerQueryRequest) ProtoMessage() {} func (x *AnswerQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +989,9 @@ type AnswerQueryResponse struct { func (x *AnswerQueryResponse) Reset() { *x = AnswerQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryResponse) String() string { @@ -1022,7 +1002,7 @@ func (*AnswerQueryResponse) ProtoMessage() {} func (x *AnswerQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1051,9 @@ type GetAnswerRequest struct { func (x *GetAnswerRequest) Reset() { *x = GetAnswerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnswerRequest) String() string { @@ -1086,7 +1064,7 @@ func (*GetAnswerRequest) ProtoMessage() {} func (x *GetAnswerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1101,9 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionRequest) String() string { @@ -1138,7 +1114,7 @@ func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1187,11 +1163,9 @@ type UpdateSessionRequest struct { func (x *UpdateSessionRequest) Reset() { *x = UpdateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSessionRequest) String() string { @@ -1202,7 +1176,7 @@ func (*UpdateSessionRequest) ProtoMessage() {} func (x *UpdateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1218,9 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionRequest) String() string { @@ -1259,7 +1231,7 @@ func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,11 +1266,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -1309,7 +1279,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,11 +1337,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -1382,7 +1350,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,11 +1414,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -1461,7 +1427,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1469,9 @@ type AnswerQueryRequest_SafetySpec struct { func (x *AnswerQueryRequest_SafetySpec) Reset() { *x = AnswerQueryRequest_SafetySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SafetySpec) String() string { @@ -1518,7 +1482,7 @@ func (*AnswerQueryRequest_SafetySpec) ProtoMessage() {} func (x *AnswerQueryRequest_SafetySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1552,11 +1516,9 @@ type AnswerQueryRequest_RelatedQuestionsSpec struct { func (x *AnswerQueryRequest_RelatedQuestionsSpec) Reset() { *x = AnswerQueryRequest_RelatedQuestionsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_RelatedQuestionsSpec) String() string { @@ -1567,7 +1529,7 @@ func (*AnswerQueryRequest_RelatedQuestionsSpec) ProtoMessage() {} func (x *AnswerQueryRequest_RelatedQuestionsSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1608,11 +1570,9 @@ type AnswerQueryRequest_GroundingSpec struct { func (x *AnswerQueryRequest_GroundingSpec) Reset() { *x = AnswerQueryRequest_GroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_GroundingSpec) String() string { @@ -1623,7 +1583,7 @@ func (*AnswerQueryRequest_GroundingSpec) ProtoMessage() {} func (x *AnswerQueryRequest_GroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,11 +1671,9 @@ type AnswerQueryRequest_AnswerGenerationSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec) String() string { @@ -1726,7 +1684,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1815,11 +1773,9 @@ type AnswerQueryRequest_SearchSpec struct { func (x *AnswerQueryRequest_SearchSpec) Reset() { *x = AnswerQueryRequest_SearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec) String() string { @@ -1830,7 +1786,7 @@ func (*AnswerQueryRequest_SearchSpec) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1898,11 +1854,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec) String() string { @@ -1913,7 +1867,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec) ProtoMessage() {} func (x *AnswerQueryRequest_QueryUnderstandingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1909,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_ModelSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) String() string { @@ -1970,7 +1922,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2004,11 +1956,9 @@ type AnswerQueryRequest_AnswerGenerationSpec_PromptSpec struct { func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) Reset() { *x = AnswerQueryRequest_AnswerGenerationSpec_PromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) String() string { @@ -2019,7 +1969,7 @@ func (*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoMessage() {} func (x *AnswerQueryRequest_AnswerGenerationSpec_PromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,11 +2048,9 @@ type AnswerQueryRequest_SearchSpec_SearchParams struct { func (x *AnswerQueryRequest_SearchSpec_SearchParams) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchParams) String() string { @@ -2113,7 +2061,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchParams) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2189,11 +2137,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList) String() string { @@ -2204,7 +2150,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList) ProtoMessage() {} func (x *AnswerQueryRequest_SearchSpec_SearchResultList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2243,11 +2189,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult struct { func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) String() string { @@ -2258,7 +2202,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoMessage func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2343,11 +2287,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) String() string { @@ -2359,7 +2301,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2433,11 +2375,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo struc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) String() string { @@ -2448,7 +2388,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) Pr func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2498,11 +2438,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) String() string { @@ -2514,7 +2452,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2560,11 +2498,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) String() string { @@ -2576,7 +2512,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2620,11 +2556,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDoc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) String() string { @@ -2636,7 +2570,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredD func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2680,11 +2614,9 @@ type AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_Docum func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) Reset() { *x = AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) String() string { @@ -2696,7 +2628,7 @@ func (*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_Doc func (x *AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2737,11 +2669,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) String() string { @@ -2752,7 +2682,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoM func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2790,11 +2720,9 @@ type AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec struct { func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) Reset() { *x = AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) String() string { @@ -2805,7 +2733,7 @@ func (*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoMessag func (x *AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3952,440 +3880,6 @@ func file_google_cloud_discoveryengine_v1beta_conversational_search_service_prot file_google_cloud_discoveryengine_v1beta_conversation_proto_init() file_google_cloud_discoveryengine_v1beta_search_service_proto_init() file_google_cloud_discoveryengine_v1beta_session_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConverseConversationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetAnswerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SafetySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_RelatedQuestionsSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_GroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_AnswerGenerationSpec_PromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[21].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_conversational_search_service_proto_msgTypes[22].OneofWrappers = []any{ (*AnswerQueryRequest_SearchSpec_SearchParams_)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/custom_tuning_model.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/custom_tuning_model.pb.go index 55872ba8349b..81774595021b 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/custom_tuning_model.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/custom_tuning_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/custom_tuning_model.proto @@ -144,11 +144,9 @@ type CustomTuningModel struct { func (x *CustomTuningModel) Reset() { *x = CustomTuningModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomTuningModel) String() string { @@ -159,7 +157,7 @@ func (*CustomTuningModel) ProtoMessage() {} func (x *CustomTuningModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,20 +370,6 @@ func file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_init() { if File_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomTuningModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/data_store.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/data_store.pb.go index 680be55b656a..a0fe5788fa84 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/data_store.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/data_store.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/data_store.proto @@ -306,11 +306,9 @@ type DataStore struct { func (x *DataStore) Reset() { *x = DataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore) String() string { @@ -321,7 +319,7 @@ func (*DataStore) ProtoMessage() {} func (x *DataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +454,9 @@ type LanguageInfo struct { func (x *LanguageInfo) Reset() { *x = LanguageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LanguageInfo) String() string { @@ -471,7 +467,7 @@ func (*LanguageInfo) ProtoMessage() {} func (x *LanguageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +524,9 @@ type NaturalLanguageQueryUnderstandingConfig struct { func (x *NaturalLanguageQueryUnderstandingConfig) Reset() { *x = NaturalLanguageQueryUnderstandingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NaturalLanguageQueryUnderstandingConfig) String() string { @@ -543,7 +537,7 @@ func (*NaturalLanguageQueryUnderstandingConfig) ProtoMessage() {} func (x *NaturalLanguageQueryUnderstandingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +581,9 @@ type WorkspaceConfig struct { func (x *WorkspaceConfig) Reset() { *x = WorkspaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkspaceConfig) String() string { @@ -602,7 +594,7 @@ func (*WorkspaceConfig) ProtoMessage() {} func (x *WorkspaceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +659,9 @@ type DataStore_BillingEstimation struct { func (x *DataStore_BillingEstimation) Reset() { *x = DataStore_BillingEstimation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore_BillingEstimation) String() string { @@ -682,7 +672,7 @@ func (*DataStore_BillingEstimation) ProtoMessage() {} func (x *DataStore_BillingEstimation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +742,9 @@ type DataStore_ServingConfigDataStore struct { func (x *DataStore_ServingConfigDataStore) Reset() { *x = DataStore_ServingConfigDataStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataStore_ServingConfigDataStore) String() string { @@ -767,7 +755,7 @@ func (*DataStore_ServingConfigDataStore) ProtoMessage() {} func (x *DataStore_ServingConfigDataStore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,80 +1072,6 @@ func file_google_cloud_discoveryengine_v1beta_data_store_proto_init() { file_google_cloud_discoveryengine_v1beta_common_proto_init() file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_init() file_google_cloud_discoveryengine_v1beta_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LanguageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NaturalLanguageQueryUnderstandingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WorkspaceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DataStore_BillingEstimation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataStore_ServingConfigDataStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/data_store_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/data_store_service.pb.go index 710911668e43..5361a15f9b36 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/data_store_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/data_store_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/data_store_service.proto @@ -86,11 +86,9 @@ type CreateDataStoreRequest struct { func (x *CreateDataStoreRequest) Reset() { *x = CreateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreRequest) String() string { @@ -101,7 +99,7 @@ func (*CreateDataStoreRequest) ProtoMessage() {} func (x *CreateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type GetDataStoreRequest struct { func (x *GetDataStoreRequest) Reset() { *x = GetDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataStoreRequest) String() string { @@ -189,7 +185,7 @@ func (*GetDataStoreRequest) ProtoMessage() {} func (x *GetDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type CreateDataStoreMetadata struct { func (x *CreateDataStoreMetadata) Reset() { *x = CreateDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataStoreMetadata) String() string { @@ -244,7 +238,7 @@ func (*CreateDataStoreMetadata) ProtoMessage() {} func (x *CreateDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type ListDataStoresRequest struct { func (x *ListDataStoresRequest) Reset() { *x = ListDataStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresRequest) String() string { @@ -329,7 +321,7 @@ func (*ListDataStoresRequest) ProtoMessage() {} func (x *ListDataStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +384,9 @@ type ListDataStoresResponse struct { func (x *ListDataStoresResponse) Reset() { *x = ListDataStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataStoresResponse) String() string { @@ -407,7 +397,7 @@ func (*ListDataStoresResponse) ProtoMessage() {} func (x *ListDataStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +449,9 @@ type DeleteDataStoreRequest struct { func (x *DeleteDataStoreRequest) Reset() { *x = DeleteDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreRequest) String() string { @@ -474,7 +462,7 @@ func (*DeleteDataStoreRequest) ProtoMessage() {} func (x *DeleteDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +512,9 @@ type UpdateDataStoreRequest struct { func (x *UpdateDataStoreRequest) Reset() { *x = UpdateDataStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataStoreRequest) String() string { @@ -539,7 +525,7 @@ func (*UpdateDataStoreRequest) ProtoMessage() {} func (x *UpdateDataStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +572,9 @@ type DeleteDataStoreMetadata struct { func (x *DeleteDataStoreMetadata) Reset() { *x = DeleteDataStoreMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataStoreMetadata) String() string { @@ -601,7 +585,7 @@ func (*DeleteDataStoreMetadata) ProtoMessage() {} func (x *DeleteDataStoreMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,104 +914,6 @@ func file_google_cloud_discoveryengine_v1beta_data_store_service_proto_init() { return } file_google_cloud_discoveryengine_v1beta_data_store_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDataStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_data_store_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataStoreMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/document.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/document.pb.go index c51f45b94450..90b4376c66ba 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/document.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/document.proto @@ -100,11 +100,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -115,7 +113,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +252,9 @@ type Document_Content struct { func (x *Document_Content) Reset() { *x = Document_Content{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Content) String() string { @@ -269,7 +265,7 @@ func (*Document_Content) ProtoMessage() {} func (x *Document_Content) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +351,9 @@ type Document_IndexStatus struct { func (x *Document_IndexStatus) Reset() { *x = Document_IndexStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_IndexStatus) String() string { @@ -370,7 +364,7 @@ func (*Document_IndexStatus) ProtoMessage() {} func (x *Document_IndexStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,44 +539,6 @@ func file_google_cloud_discoveryengine_v1beta_document_proto_init() { if File_google_cloud_discoveryengine_v1beta_document_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Document_Content); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Document_IndexStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_StructData)(nil), (*Document_JsonData)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/document_processing_config.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/document_processing_config.pb.go index f407fe45f00c..28a664a55b13 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/document_processing_config.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/document_processing_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/document_processing_config.proto @@ -78,11 +78,9 @@ type DocumentProcessingConfig struct { func (x *DocumentProcessingConfig) Reset() { *x = DocumentProcessingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig) String() string { @@ -93,7 +91,7 @@ func (*DocumentProcessingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type DocumentProcessingConfig_ChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig) String() string { @@ -167,7 +163,7 @@ func (*DocumentProcessingConfig_ChunkingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type DocumentProcessingConfig_ParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig) String() string { @@ -241,7 +235,7 @@ func (*DocumentProcessingConfig_ParsingConfig) ProtoMessage() {} func (x *DocumentProcessingConfig_ParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig struct { func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) Reset() { *x = DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) String() string { @@ -348,7 +340,7 @@ func (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoM func (x *DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) String() string { @@ -401,7 +391,7 @@ func (*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoMessage func (x *DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type DocumentProcessingConfig_ParsingConfig_OcrParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_OcrParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) String() string { @@ -449,7 +437,7 @@ func (*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoMessage() { func (x *DocumentProcessingConfig_ParsingConfig_OcrParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +476,9 @@ type DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig struct { func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) Reset() { *x = DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) String() string { @@ -503,7 +489,7 @@ func (*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoMessage( func (x *DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,92 +699,6 @@ func file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_i if File_google_cloud_discoveryengine_v1beta_document_processing_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_DigitalParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_OcrParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_document_processing_config_proto_msgTypes[1].OneofWrappers = []any{ (*DocumentProcessingConfig_ChunkingConfig_LayoutBasedChunkingConfig_)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/document_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/document_service.pb.go index 793330a3effa..01cc32911573 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/document_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/document_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/document_service.proto @@ -127,11 +127,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -142,7 +140,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +201,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -218,7 +214,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +269,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -288,7 +282,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +347,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -368,7 +360,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +426,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -449,7 +439,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +498,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -523,7 +511,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +551,9 @@ type BatchGetDocumentsMetadataRequest struct { func (x *BatchGetDocumentsMetadataRequest) Reset() { *x = BatchGetDocumentsMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest) String() string { @@ -578,7 +564,7 @@ func (*BatchGetDocumentsMetadataRequest) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +608,9 @@ type BatchGetDocumentsMetadataResponse struct { func (x *BatchGetDocumentsMetadataResponse) Reset() { *x = BatchGetDocumentsMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse) String() string { @@ -637,7 +621,7 @@ func (*BatchGetDocumentsMetadataResponse) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +656,9 @@ type BatchGetDocumentsMetadataRequest_UrisMatcher struct { func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) Reset() { *x = BatchGetDocumentsMetadataRequest_UrisMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) String() string { @@ -687,7 +669,7 @@ func (*BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_UrisMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +706,9 @@ type BatchGetDocumentsMetadataRequest_FhirMatcher struct { func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) Reset() { *x = BatchGetDocumentsMetadataRequest_FhirMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) String() string { @@ -739,7 +719,7 @@ func (*BatchGetDocumentsMetadataRequest_FhirMatcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_FhirMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +760,9 @@ type BatchGetDocumentsMetadataRequest_Matcher struct { func (x *BatchGetDocumentsMetadataRequest_Matcher) Reset() { *x = BatchGetDocumentsMetadataRequest_Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataRequest_Matcher) String() string { @@ -795,7 +773,7 @@ func (*BatchGetDocumentsMetadataRequest_Matcher) ProtoMessage() {} func (x *BatchGetDocumentsMetadataRequest_Matcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -878,11 +856,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) String() string { @@ -893,7 +869,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoMessage() {} func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +931,9 @@ type BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue struct { func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) Reset() { *x = BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) String() string { @@ -970,7 +944,7 @@ func (*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoMes func (x *BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,164 +1468,6 @@ func file_google_cloud_discoveryengine_v1beta_document_service_proto_init() { file_google_cloud_discoveryengine_v1beta_document_proto_init() file_google_cloud_discoveryengine_v1beta_import_config_proto_init() file_google_cloud_discoveryengine_v1beta_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_UrisMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_FhirMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataRequest_Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsMetadataResponse_DocumentMetadata_MatcherValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_document_service_proto_msgTypes[10].OneofWrappers = []any{ (*BatchGetDocumentsMetadataRequest_Matcher_UrisMatcher)(nil), (*BatchGetDocumentsMetadataRequest_Matcher_FhirMatcher)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/engine.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/engine.pb.go index 334a572fd4dd..6e7608449305 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/engine.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/engine.proto @@ -112,11 +112,9 @@ type Engine struct { func (x *Engine) Reset() { *x = Engine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine) String() string { @@ -127,7 +125,7 @@ func (*Engine) ProtoMessage() {} func (x *Engine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +298,9 @@ type Engine_SearchEngineConfig struct { func (x *Engine_SearchEngineConfig) Reset() { *x = Engine_SearchEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_SearchEngineConfig) String() string { @@ -315,7 +311,7 @@ func (*Engine_SearchEngineConfig) ProtoMessage() {} func (x *Engine_SearchEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +376,9 @@ type Engine_ChatEngineConfig struct { func (x *Engine_ChatEngineConfig) Reset() { *x = Engine_ChatEngineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig) String() string { @@ -395,7 +389,7 @@ func (*Engine_ChatEngineConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -437,11 +431,9 @@ type Engine_CommonConfig struct { func (x *Engine_CommonConfig) Reset() { *x = Engine_CommonConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_CommonConfig) String() string { @@ -452,7 +444,7 @@ func (*Engine_CommonConfig) ProtoMessage() {} func (x *Engine_CommonConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +483,9 @@ type Engine_ChatEngineMetadata struct { func (x *Engine_ChatEngineMetadata) Reset() { *x = Engine_ChatEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineMetadata) String() string { @@ -506,7 +496,7 @@ func (*Engine_ChatEngineMetadata) ProtoMessage() {} func (x *Engine_ChatEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,11 +552,9 @@ type Engine_ChatEngineConfig_AgentCreationConfig struct { func (x *Engine_ChatEngineConfig_AgentCreationConfig) Reset() { *x = Engine_ChatEngineConfig_AgentCreationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Engine_ChatEngineConfig_AgentCreationConfig) String() string { @@ -577,7 +565,7 @@ func (*Engine_ChatEngineConfig_AgentCreationConfig) ProtoMessage() {} func (x *Engine_ChatEngineConfig_AgentCreationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,80 +808,6 @@ func file_google_cloud_discoveryengine_v1beta_engine_proto_init() { return } file_google_cloud_discoveryengine_v1beta_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Engine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Engine_SearchEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Engine_CommonConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Engine_ChatEngineConfig_AgentCreationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_engine_proto_msgTypes[0].OneofWrappers = []any{ (*Engine_ChatEngineConfig_)(nil), (*Engine_SearchEngineConfig_)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/engine_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/engine_service.pb.go index 26873dfa8322..3ca95bd3608d 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/engine_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/engine_service.proto @@ -71,11 +71,9 @@ type CreateEngineRequest struct { func (x *CreateEngineRequest) Reset() { *x = CreateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineRequest) String() string { @@ -86,7 +84,7 @@ func (*CreateEngineRequest) ProtoMessage() {} func (x *CreateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type CreateEngineMetadata struct { func (x *CreateEngineMetadata) Reset() { *x = CreateEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEngineMetadata) String() string { @@ -155,7 +151,7 @@ func (*CreateEngineMetadata) ProtoMessage() {} func (x *CreateEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type DeleteEngineRequest struct { func (x *DeleteEngineRequest) Reset() { *x = DeleteEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineRequest) String() string { @@ -222,7 +216,7 @@ func (*DeleteEngineRequest) ProtoMessage() {} func (x *DeleteEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +256,9 @@ type DeleteEngineMetadata struct { func (x *DeleteEngineMetadata) Reset() { *x = DeleteEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEngineMetadata) String() string { @@ -277,7 +269,7 @@ func (*DeleteEngineMetadata) ProtoMessage() {} func (x *DeleteEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +314,9 @@ type GetEngineRequest struct { func (x *GetEngineRequest) Reset() { *x = GetEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEngineRequest) String() string { @@ -337,7 +327,7 @@ func (*GetEngineRequest) ProtoMessage() {} func (x *GetEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +371,9 @@ type ListEnginesRequest struct { func (x *ListEnginesRequest) Reset() { *x = ListEnginesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesRequest) String() string { @@ -396,7 +384,7 @@ func (*ListEnginesRequest) ProtoMessage() {} func (x *ListEnginesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +443,9 @@ type ListEnginesResponse struct { func (x *ListEnginesResponse) Reset() { *x = ListEnginesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnginesResponse) String() string { @@ -470,7 +456,7 @@ func (*ListEnginesResponse) ProtoMessage() {} func (x *ListEnginesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +513,9 @@ type UpdateEngineRequest struct { func (x *UpdateEngineRequest) Reset() { *x = UpdateEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEngineRequest) String() string { @@ -542,7 +526,7 @@ func (*UpdateEngineRequest) ProtoMessage() {} func (x *UpdateEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +569,9 @@ type PauseEngineRequest struct { func (x *PauseEngineRequest) Reset() { *x = PauseEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseEngineRequest) String() string { @@ -600,7 +582,7 @@ func (*PauseEngineRequest) ProtoMessage() {} func (x *PauseEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +618,9 @@ type ResumeEngineRequest struct { func (x *ResumeEngineRequest) Reset() { *x = ResumeEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeEngineRequest) String() string { @@ -651,7 +631,7 @@ func (*ResumeEngineRequest) ProtoMessage() {} func (x *ResumeEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +668,9 @@ type TuneEngineRequest struct { func (x *TuneEngineRequest) Reset() { *x = TuneEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineRequest) String() string { @@ -703,7 +681,7 @@ func (*TuneEngineRequest) ProtoMessage() {} func (x *TuneEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +717,9 @@ type TuneEngineMetadata struct { func (x *TuneEngineMetadata) Reset() { *x = TuneEngineMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineMetadata) String() string { @@ -754,7 +730,7 @@ func (*TuneEngineMetadata) ProtoMessage() {} func (x *TuneEngineMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +761,9 @@ type TuneEngineResponse struct { func (x *TuneEngineResponse) Reset() { *x = TuneEngineResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneEngineResponse) String() string { @@ -800,7 +774,7 @@ func (*TuneEngineResponse) ProtoMessage() {} func (x *TuneEngineResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1153,164 +1127,6 @@ func file_google_cloud_discoveryengine_v1beta_engine_service_proto_init() { return } file_google_cloud_discoveryengine_v1beta_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEnginesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PauseEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResumeEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_engine_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TuneEngineResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/evaluation.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/evaluation.pb.go index e83946702b7f..3d5dba2c815c 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/evaluation.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/evaluation.proto @@ -140,11 +140,9 @@ type Evaluation struct { func (x *Evaluation) Reset() { *x = Evaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation) String() string { @@ -155,7 +153,7 @@ func (*Evaluation) ProtoMessage() {} func (x *Evaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type QualityMetrics struct { func (x *QualityMetrics) Reset() { *x = QualityMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QualityMetrics) String() string { @@ -323,7 +319,7 @@ func (*QualityMetrics) ProtoMessage() {} func (x *QualityMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +387,9 @@ type Evaluation_EvaluationSpec struct { func (x *Evaluation_EvaluationSpec) Reset() { *x = Evaluation_EvaluationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_EvaluationSpec) String() string { @@ -406,7 +400,7 @@ func (*Evaluation_EvaluationSpec) ProtoMessage() {} func (x *Evaluation_EvaluationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +473,9 @@ type Evaluation_EvaluationSpec_QuerySetSpec struct { func (x *Evaluation_EvaluationSpec_QuerySetSpec) Reset() { *x = Evaluation_EvaluationSpec_QuerySetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_EvaluationSpec_QuerySetSpec) String() string { @@ -494,7 +486,7 @@ func (*Evaluation_EvaluationSpec_QuerySetSpec) ProtoMessage() {} func (x *Evaluation_EvaluationSpec_QuerySetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +526,9 @@ type QualityMetrics_TopkMetrics struct { func (x *QualityMetrics_TopkMetrics) Reset() { *x = QualityMetrics_TopkMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QualityMetrics_TopkMetrics) String() string { @@ -549,7 +539,7 @@ func (*QualityMetrics_TopkMetrics) ProtoMessage() {} func (x *QualityMetrics_TopkMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,68 +783,6 @@ func file_google_cloud_discoveryengine_v1beta_evaluation_proto_init() { return } file_google_cloud_discoveryengine_v1beta_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QualityMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_EvaluationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_EvaluationSpec_QuerySetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QualityMetrics_TopkMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_evaluation_proto_msgTypes[2].OneofWrappers = []any{ (*Evaluation_EvaluationSpec_SearchRequest)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/evaluation_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/evaluation_service.pb.go index eb1e283fe97d..6217554e9428 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/evaluation_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/evaluation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/evaluation_service.proto @@ -65,11 +65,9 @@ type GetEvaluationRequest struct { func (x *GetEvaluationRequest) Reset() { *x = GetEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationRequest) String() string { @@ -80,7 +78,7 @@ func (*GetEvaluationRequest) ProtoMessage() {} func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type ListEvaluationsRequest struct { func (x *ListEvaluationsRequest) Reset() { *x = ListEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsRequest) String() string { @@ -155,7 +151,7 @@ func (*ListEvaluationsRequest) ProtoMessage() {} func (x *ListEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type ListEvaluationsResponse struct { func (x *ListEvaluationsResponse) Reset() { *x = ListEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsResponse) String() string { @@ -225,7 +219,7 @@ func (*ListEvaluationsResponse) ProtoMessage() {} func (x *ListEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +266,9 @@ type CreateEvaluationRequest struct { func (x *CreateEvaluationRequest) Reset() { *x = CreateEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEvaluationRequest) String() string { @@ -287,7 +279,7 @@ func (*CreateEvaluationRequest) ProtoMessage() {} func (x *CreateEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +319,9 @@ type CreateEvaluationMetadata struct { func (x *CreateEvaluationMetadata) Reset() { *x = CreateEvaluationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEvaluationMetadata) String() string { @@ -342,7 +332,7 @@ func (*CreateEvaluationMetadata) ProtoMessage() {} func (x *CreateEvaluationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +383,9 @@ type ListEvaluationResultsRequest struct { func (x *ListEvaluationResultsRequest) Reset() { *x = ListEvaluationResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsRequest) String() string { @@ -408,7 +396,7 @@ func (*ListEvaluationResultsRequest) ProtoMessage() {} func (x *ListEvaluationResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +452,9 @@ type ListEvaluationResultsResponse struct { func (x *ListEvaluationResultsResponse) Reset() { *x = ListEvaluationResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsResponse) String() string { @@ -479,7 +465,7 @@ func (*ListEvaluationResultsResponse) ProtoMessage() {} func (x *ListEvaluationResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +512,9 @@ type ListEvaluationResultsResponse_EvaluationResult struct { func (x *ListEvaluationResultsResponse_EvaluationResult) Reset() { *x = ListEvaluationResultsResponse_EvaluationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationResultsResponse_EvaluationResult) String() string { @@ -541,7 +525,7 @@ func (*ListEvaluationResultsResponse_EvaluationResult) ProtoMessage() {} func (x *ListEvaluationResultsResponse_EvaluationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,104 +799,6 @@ func file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_init() { } file_google_cloud_discoveryengine_v1beta_evaluation_proto_init() file_google_cloud_discoveryengine_v1beta_sample_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEvaluationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_evaluation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationResultsResponse_EvaluationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/grounded_generation_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/grounded_generation_service.pb.go index 42caf596c803..56865d819780 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/grounded_generation_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/grounded_generation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/grounded_generation_service.proto @@ -216,11 +216,9 @@ type GroundedGenerationContent struct { func (x *GroundedGenerationContent) Reset() { *x = GroundedGenerationContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundedGenerationContent) String() string { @@ -231,7 +229,7 @@ func (*GroundedGenerationContent) ProtoMessage() {} func (x *GroundedGenerationContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type GenerateGroundedContentRequest struct { func (x *GenerateGroundedContentRequest) Reset() { *x = GenerateGroundedContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest) String() string { @@ -323,7 +319,7 @@ func (*GenerateGroundedContentRequest) ProtoMessage() {} func (x *GenerateGroundedContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +388,9 @@ type GenerateGroundedContentResponse struct { func (x *GenerateGroundedContentResponse) Reset() { *x = GenerateGroundedContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse) String() string { @@ -407,7 +401,7 @@ func (*GenerateGroundedContentResponse) ProtoMessage() {} func (x *GenerateGroundedContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +439,9 @@ type CheckGroundingSpec struct { func (x *CheckGroundingSpec) Reset() { *x = CheckGroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingSpec) String() string { @@ -460,7 +452,7 @@ func (*CheckGroundingSpec) ProtoMessage() {} func (x *CheckGroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +514,9 @@ type CheckGroundingRequest struct { func (x *CheckGroundingRequest) Reset() { *x = CheckGroundingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingRequest) String() string { @@ -537,7 +527,7 @@ func (*CheckGroundingRequest) ProtoMessage() {} func (x *CheckGroundingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,11 +601,9 @@ type CheckGroundingResponse struct { func (x *CheckGroundingResponse) Reset() { *x = CheckGroundingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse) String() string { @@ -626,7 +614,7 @@ func (*CheckGroundingResponse) ProtoMessage() {} func (x *CheckGroundingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +673,9 @@ type GroundedGenerationContent_Part struct { func (x *GroundedGenerationContent_Part) Reset() { *x = GroundedGenerationContent_Part{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundedGenerationContent_Part) String() string { @@ -700,7 +686,7 @@ func (*GroundedGenerationContent_Part) ProtoMessage() {} func (x *GroundedGenerationContent_Part) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +753,9 @@ type GenerateGroundedContentRequest_GenerationSpec struct { func (x *GenerateGroundedContentRequest_GenerationSpec) Reset() { *x = GenerateGroundedContentRequest_GenerationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GenerationSpec) String() string { @@ -782,7 +766,7 @@ func (*GenerateGroundedContentRequest_GenerationSpec) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GenerationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -865,11 +849,9 @@ type GenerateGroundedContentRequest_DynamicRetrievalConfiguration struct { func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) Reset() { *x = GenerateGroundedContentRequest_DynamicRetrievalConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) String() string { @@ -880,7 +862,7 @@ func (*GenerateGroundedContentRequest_DynamicRetrievalConfiguration) ProtoMessag func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +902,9 @@ type GenerateGroundedContentRequest_GroundingSource struct { func (x *GenerateGroundedContentRequest_GroundingSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource) String() string { @@ -935,7 +915,7 @@ func (*GenerateGroundedContentRequest_GroundingSource) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GroundingSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +998,9 @@ type GenerateGroundedContentRequest_GroundingSpec struct { func (x *GenerateGroundedContentRequest_GroundingSpec) Reset() { *x = GenerateGroundedContentRequest_GroundingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSpec) String() string { @@ -1033,7 +1011,7 @@ func (*GenerateGroundedContentRequest_GroundingSpec) ProtoMessage() {} func (x *GenerateGroundedContentRequest_GroundingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1070,11 +1048,9 @@ type GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetriev func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) Reset() { *x = GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) String() string { @@ -1086,7 +1062,7 @@ func (*GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetri func (x *GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1108,9 @@ type GenerateGroundedContentRequest_GroundingSource_InlineSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) String() string { @@ -1147,7 +1121,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_InlineSource) ProtoMessage func (x *GenerateGroundedContentRequest_GroundingSource_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1176,9 @@ type GenerateGroundedContentRequest_GroundingSource_SearchSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_SearchSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) String() string { @@ -1217,7 +1189,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_SearchSource) ProtoMessage func (x *GenerateGroundedContentRequest_GroundingSource_SearchSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1245,9 @@ type GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource struct { func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) Reset() { *x = GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) String() string { @@ -1288,7 +1258,7 @@ func (*GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) ProtoM func (x *GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,11 +1298,9 @@ type GenerateGroundedContentResponse_Candidate struct { func (x *GenerateGroundedContentResponse_Candidate) Reset() { *x = GenerateGroundedContentResponse_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate) String() string { @@ -1343,7 +1311,7 @@ func (*GenerateGroundedContentResponse_Candidate) ProtoMessage() {} func (x *GenerateGroundedContentResponse_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1380,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata struct { func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) String() string { @@ -1427,7 +1393,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata) ProtoMessage func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1457,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetada func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) String() string { @@ -1507,7 +1471,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMeta func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1548,11 +1512,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrieva func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) String() string { @@ -1564,7 +1526,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrie func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1604,11 +1566,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrieva func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) String() string { @@ -1620,7 +1580,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrie func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1665,11 +1625,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoin func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) String() string { @@ -1680,7 +1638,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPo func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1689,9 @@ type GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSuppor func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) Reset() { *x = GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) String() string { @@ -1746,7 +1702,7 @@ func (*GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupp func (x *GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1750,9 @@ type CheckGroundingResponse_CheckGroundingFactChunk struct { func (x *CheckGroundingResponse_CheckGroundingFactChunk) Reset() { *x = CheckGroundingResponse_CheckGroundingFactChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse_CheckGroundingFactChunk) String() string { @@ -1809,7 +1763,7 @@ func (*CheckGroundingResponse_CheckGroundingFactChunk) ProtoMessage() {} func (x *CheckGroundingResponse_CheckGroundingFactChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1866,11 +1820,9 @@ type CheckGroundingResponse_Claim struct { func (x *CheckGroundingResponse_Claim) Reset() { *x = CheckGroundingResponse_Claim{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckGroundingResponse_Claim) String() string { @@ -1881,7 +1833,7 @@ func (*CheckGroundingResponse_Claim) ProtoMessage() {} func (x *CheckGroundingResponse_Claim) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2553,296 +2505,6 @@ func file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_ return } file_google_cloud_discoveryengine_v1beta_grounding_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroundedGenerationContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GroundedGenerationContent_Part); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GenerationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_DynamicRetrievalConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_DynamicRetrievalConfiguration_DynamicRetrievalPredictor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_SearchSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_DynamicRetrievalPredictorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_SearchEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse_CheckGroundingFactChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CheckGroundingResponse_Claim); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[3].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[5].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_grounded_generation_service_proto_msgTypes[6].OneofWrappers = []any{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/grounding.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/grounding.pb.go index 4e9bd71af459..c105d251821f 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/grounding.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/grounding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/grounding.proto @@ -49,11 +49,9 @@ type GroundingConfig struct { func (x *GroundingConfig) Reset() { *x = GroundingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingConfig) String() string { @@ -64,7 +62,7 @@ func (*GroundingConfig) ProtoMessage() {} func (x *GroundingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type GroundingFact struct { func (x *GroundingFact) Reset() { *x = GroundingFact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroundingFact) String() string { @@ -117,7 +113,7 @@ func (*GroundingFact) ProtoMessage() {} func (x *GroundingFact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type FactChunk struct { func (x *FactChunk) Reset() { *x = FactChunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FactChunk) String() string { @@ -182,7 +176,7 @@ func (*FactChunk) ProtoMessage() {} func (x *FactChunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,44 +328,6 @@ func file_google_cloud_discoveryengine_v1beta_grounding_proto_init() { if File_google_cloud_discoveryengine_v1beta_grounding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroundingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GroundingFact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_grounding_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FactChunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/import_config.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/import_config.pb.go index 28609bbd5d58..98300d691c1c 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/import_config.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/import_config.proto @@ -272,11 +272,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -287,7 +285,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -383,7 +379,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +478,9 @@ type SpannerSource struct { func (x *SpannerSource) Reset() { *x = SpannerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerSource) String() string { @@ -497,7 +491,7 @@ func (*SpannerSource) ProtoMessage() {} func (x *SpannerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +559,9 @@ type BigtableOptions struct { func (x *BigtableOptions) Reset() { *x = BigtableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions) String() string { @@ -580,7 +572,7 @@ func (*BigtableOptions) ProtoMessage() {} func (x *BigtableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +622,9 @@ type BigtableSource struct { func (x *BigtableSource) Reset() { *x = BigtableSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableSource) String() string { @@ -645,7 +635,7 @@ func (*BigtableSource) ProtoMessage() {} func (x *BigtableSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +701,9 @@ type FhirStoreSource struct { func (x *FhirStoreSource) Reset() { *x = FhirStoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FhirStoreSource) String() string { @@ -726,7 +714,7 @@ func (*FhirStoreSource) ProtoMessage() {} func (x *FhirStoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +784,9 @@ type CloudSqlSource struct { func (x *CloudSqlSource) Reset() { *x = CloudSqlSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlSource) String() string { @@ -811,7 +797,7 @@ func (*CloudSqlSource) ProtoMessage() {} func (x *CloudSqlSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +887,9 @@ type AlloyDbSource struct { func (x *AlloyDbSource) Reset() { *x = AlloyDbSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlloyDbSource) String() string { @@ -916,7 +900,7 @@ func (*AlloyDbSource) ProtoMessage() {} func (x *AlloyDbSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +984,9 @@ type FirestoreSource struct { func (x *FirestoreSource) Reset() { *x = FirestoreSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirestoreSource) String() string { @@ -1015,7 +997,7 @@ func (*FirestoreSource) ProtoMessage() {} func (x *FirestoreSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1056,9 @@ type ImportErrorConfig struct { func (x *ImportErrorConfig) Reset() { *x = ImportErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorConfig) String() string { @@ -1089,7 +1069,7 @@ func (*ImportErrorConfig) ProtoMessage() {} func (x *ImportErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1136,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -1171,7 +1149,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1275,11 +1253,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1290,7 +1266,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1329,9 @@ type ImportUserEventsMetadata struct { func (x *ImportUserEventsMetadata) Reset() { *x = ImportUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsMetadata) String() string { @@ -1368,7 +1342,7 @@ func (*ImportUserEventsMetadata) ProtoMessage() {} func (x *ImportUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1407,9 @@ type ImportDocumentsMetadata struct { func (x *ImportDocumentsMetadata) Reset() { *x = ImportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata) String() string { @@ -1448,7 +1420,7 @@ func (*ImportDocumentsMetadata) ProtoMessage() {} func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,11 +1568,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -1611,7 +1581,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1792,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -1837,7 +1805,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1888,11 +1856,9 @@ type ImportSuggestionDenyListEntriesRequest struct { func (x *ImportSuggestionDenyListEntriesRequest) Reset() { *x = ImportSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest) String() string { @@ -1903,7 +1869,7 @@ func (*ImportSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1957,9 @@ type ImportSuggestionDenyListEntriesResponse struct { func (x *ImportSuggestionDenyListEntriesResponse) Reset() { *x = ImportSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesResponse) String() string { @@ -2006,7 +1970,7 @@ func (*ImportSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2059,11 +2023,9 @@ type ImportSuggestionDenyListEntriesMetadata struct { func (x *ImportSuggestionDenyListEntriesMetadata) Reset() { *x = ImportSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesMetadata) String() string { @@ -2074,7 +2036,7 @@ func (*ImportSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2130,11 +2092,9 @@ type ImportCompletionSuggestionsRequest struct { func (x *ImportCompletionSuggestionsRequest) Reset() { *x = ImportCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest) String() string { @@ -2145,7 +2105,7 @@ func (*ImportCompletionSuggestionsRequest) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2207,9 @@ type ImportCompletionSuggestionsResponse struct { func (x *ImportCompletionSuggestionsResponse) Reset() { *x = ImportCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsResponse) String() string { @@ -2262,7 +2220,7 @@ func (*ImportCompletionSuggestionsResponse) ProtoMessage() {} func (x *ImportCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2316,11 +2274,9 @@ type ImportCompletionSuggestionsMetadata struct { func (x *ImportCompletionSuggestionsMetadata) Reset() { *x = ImportCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsMetadata) String() string { @@ -2331,7 +2287,7 @@ func (*ImportCompletionSuggestionsMetadata) ProtoMessage() {} func (x *ImportCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2404,11 +2360,9 @@ type ImportSampleQueriesRequest struct { func (x *ImportSampleQueriesRequest) Reset() { *x = ImportSampleQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesRequest) String() string { @@ -2419,7 +2373,7 @@ func (*ImportSampleQueriesRequest) ProtoMessage() {} func (x *ImportSampleQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2519,11 +2473,9 @@ type ImportSampleQueriesResponse struct { func (x *ImportSampleQueriesResponse) Reset() { *x = ImportSampleQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesResponse) String() string { @@ -2534,7 +2486,7 @@ func (*ImportSampleQueriesResponse) ProtoMessage() {} func (x *ImportSampleQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2590,11 +2542,9 @@ type ImportSampleQueriesMetadata struct { func (x *ImportSampleQueriesMetadata) Reset() { *x = ImportSampleQueriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesMetadata) String() string { @@ -2605,7 +2555,7 @@ func (*ImportSampleQueriesMetadata) ProtoMessage() {} func (x *ImportSampleQueriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2686,11 +2636,9 @@ type BigtableOptions_BigtableColumnFamily struct { func (x *BigtableOptions_BigtableColumnFamily) Reset() { *x = BigtableOptions_BigtableColumnFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumnFamily) String() string { @@ -2701,7 +2649,7 @@ func (*BigtableOptions_BigtableColumnFamily) ProtoMessage() {} func (x *BigtableOptions_BigtableColumnFamily) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2775,11 +2723,9 @@ type BigtableOptions_BigtableColumn struct { func (x *BigtableOptions_BigtableColumn) Reset() { *x = BigtableOptions_BigtableColumn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigtableOptions_BigtableColumn) String() string { @@ -2790,7 +2736,7 @@ func (*BigtableOptions_BigtableColumn) ProtoMessage() {} func (x *BigtableOptions_BigtableColumn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2845,11 +2791,9 @@ type ImportUserEventsRequest_InlineSource struct { func (x *ImportUserEventsRequest_InlineSource) Reset() { *x = ImportUserEventsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest_InlineSource) String() string { @@ -2860,7 +2804,7 @@ func (*ImportUserEventsRequest_InlineSource) ProtoMessage() {} func (x *ImportUserEventsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2896,11 +2840,9 @@ type ImportDocumentsRequest_InlineSource struct { func (x *ImportDocumentsRequest_InlineSource) Reset() { *x = ImportDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest_InlineSource) String() string { @@ -2911,7 +2853,7 @@ func (*ImportDocumentsRequest_InlineSource) ProtoMessage() {} func (x *ImportDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2945,11 +2887,9 @@ type ImportSuggestionDenyListEntriesRequest_InlineSource struct { func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) Reset() { *x = ImportSuggestionDenyListEntriesRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) String() string { @@ -2960,7 +2900,7 @@ func (*ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoMessage() {} func (x *ImportSuggestionDenyListEntriesRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2994,11 +2934,9 @@ type ImportCompletionSuggestionsRequest_InlineSource struct { func (x *ImportCompletionSuggestionsRequest_InlineSource) Reset() { *x = ImportCompletionSuggestionsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionSuggestionsRequest_InlineSource) String() string { @@ -3009,7 +2947,7 @@ func (*ImportCompletionSuggestionsRequest_InlineSource) ProtoMessage() {} func (x *ImportCompletionSuggestionsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3046,11 +2984,9 @@ type ImportSampleQueriesRequest_InlineSource struct { func (x *ImportSampleQueriesRequest_InlineSource) Reset() { *x = ImportSampleQueriesRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSampleQueriesRequest_InlineSource) String() string { @@ -3061,7 +2997,7 @@ func (*ImportSampleQueriesRequest_InlineSource) ProtoMessage() {} func (x *ImportSampleQueriesRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3815,392 +3751,6 @@ func file_google_cloud_discoveryengine_v1beta_import_config_proto_init() { file_google_cloud_discoveryengine_v1beta_document_proto_init() file_google_cloud_discoveryengine_v1beta_sample_query_proto_init() file_google_cloud_discoveryengine_v1beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpannerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigtableSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FhirStoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AlloyDbSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FirestoreSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumnFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BigtableOptions_BigtableColumn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ImportSuggestionDenyListEntriesRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionSuggestionsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ImportSampleQueriesRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/project.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/project.pb.go index 80942ed8e350..e03f726030da 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/project.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/project.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/project.proto @@ -118,11 +118,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -133,7 +131,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type Project_ServiceTerms struct { func (x *Project_ServiceTerms) Reset() { *x = Project_ServiceTerms{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project_ServiceTerms) String() string { @@ -222,7 +218,7 @@ func (*Project_ServiceTerms) ProtoMessage() {} func (x *Project_ServiceTerms) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,32 +398,6 @@ func file_google_cloud_discoveryengine_v1beta_project_proto_init() { if File_google_cloud_discoveryengine_v1beta_project_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_project_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Project_ServiceTerms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/project_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/project_service.pb.go index f2a91fb5300c..b960754dba50 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/project_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/project_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/project_service.proto @@ -67,11 +67,9 @@ type ProvisionProjectRequest struct { func (x *ProvisionProjectRequest) Reset() { *x = ProvisionProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectRequest) String() string { @@ -82,7 +80,7 @@ func (*ProvisionProjectRequest) ProtoMessage() {} func (x *ProvisionProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ProvisionProjectMetadata struct { func (x *ProvisionProjectMetadata) Reset() { *x = ProvisionProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvisionProjectMetadata) String() string { @@ -142,7 +138,7 @@ func (*ProvisionProjectMetadata) ProtoMessage() {} func (x *ProvisionProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,32 +268,6 @@ func file_google_cloud_discoveryengine_v1beta_project_service_proto_init() { return } file_google_cloud_discoveryengine_v1beta_project_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProvisionProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/purge_config.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/purge_config.pb.go index 8085d05df945..e1d2bc7dae0d 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/purge_config.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/purge_config.proto @@ -85,11 +85,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -100,7 +98,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -165,7 +161,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type PurgeUserEventsMetadata struct { func (x *PurgeUserEventsMetadata) Reset() { *x = PurgeUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsMetadata) String() string { @@ -222,7 +216,7 @@ func (*PurgeUserEventsMetadata) ProtoMessage() {} func (x *PurgeUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type PurgeErrorConfig struct { func (x *PurgeErrorConfig) Reset() { *x = PurgeErrorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeErrorConfig) String() string { @@ -296,7 +288,7 @@ func (*PurgeErrorConfig) ProtoMessage() {} func (x *PurgeErrorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type PurgeDocumentsRequest struct { func (x *PurgeDocumentsRequest) Reset() { *x = PurgeDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest) String() string { @@ -385,7 +375,7 @@ func (*PurgeDocumentsRequest) ProtoMessage() {} func (x *PurgeDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +479,9 @@ type PurgeDocumentsResponse struct { func (x *PurgeDocumentsResponse) Reset() { *x = PurgeDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsResponse) String() string { @@ -504,7 +492,7 @@ func (*PurgeDocumentsResponse) ProtoMessage() {} func (x *PurgeDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -555,11 +543,9 @@ type PurgeDocumentsMetadata struct { func (x *PurgeDocumentsMetadata) Reset() { *x = PurgeDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsMetadata) String() string { @@ -570,7 +556,7 @@ func (*PurgeDocumentsMetadata) ProtoMessage() {} func (x *PurgeDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +621,9 @@ type PurgeSuggestionDenyListEntriesRequest struct { func (x *PurgeSuggestionDenyListEntriesRequest) Reset() { *x = PurgeSuggestionDenyListEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesRequest) String() string { @@ -650,7 +634,7 @@ func (*PurgeSuggestionDenyListEntriesRequest) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +672,9 @@ type PurgeSuggestionDenyListEntriesResponse struct { func (x *PurgeSuggestionDenyListEntriesResponse) Reset() { *x = PurgeSuggestionDenyListEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesResponse) String() string { @@ -703,7 +685,7 @@ func (*PurgeSuggestionDenyListEntriesResponse) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +731,9 @@ type PurgeSuggestionDenyListEntriesMetadata struct { func (x *PurgeSuggestionDenyListEntriesMetadata) Reset() { *x = PurgeSuggestionDenyListEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeSuggestionDenyListEntriesMetadata) String() string { @@ -764,7 +744,7 @@ func (*PurgeSuggestionDenyListEntriesMetadata) ProtoMessage() {} func (x *PurgeSuggestionDenyListEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +789,9 @@ type PurgeCompletionSuggestionsRequest struct { func (x *PurgeCompletionSuggestionsRequest) Reset() { *x = PurgeCompletionSuggestionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsRequest) String() string { @@ -824,7 +802,7 @@ func (*PurgeCompletionSuggestionsRequest) ProtoMessage() {} func (x *PurgeCompletionSuggestionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,11 +840,9 @@ type PurgeCompletionSuggestionsResponse struct { func (x *PurgeCompletionSuggestionsResponse) Reset() { *x = PurgeCompletionSuggestionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsResponse) String() string { @@ -877,7 +853,7 @@ func (*PurgeCompletionSuggestionsResponse) ProtoMessage() {} func (x *PurgeCompletionSuggestionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +899,9 @@ type PurgeCompletionSuggestionsMetadata struct { func (x *PurgeCompletionSuggestionsMetadata) Reset() { *x = PurgeCompletionSuggestionsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeCompletionSuggestionsMetadata) String() string { @@ -938,7 +912,7 @@ func (*PurgeCompletionSuggestionsMetadata) ProtoMessage() {} func (x *PurgeCompletionSuggestionsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -984,11 +958,9 @@ type PurgeDocumentsRequest_InlineSource struct { func (x *PurgeDocumentsRequest_InlineSource) Reset() { *x = PurgeDocumentsRequest_InlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeDocumentsRequest_InlineSource) String() string { @@ -999,7 +971,7 @@ func (*PurgeDocumentsRequest_InlineSource) ProtoMessage() {} func (x *PurgeDocumentsRequest_InlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,176 +1234,6 @@ func file_google_cloud_discoveryengine_v1beta_purge_config_proto_init() { return } file_google_cloud_discoveryengine_v1beta_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeErrorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PurgeSuggestionDenyListEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PurgeCompletionSuggestionsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PurgeDocumentsRequest_InlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_purge_config_proto_msgTypes[3].OneofWrappers = []any{ (*PurgeErrorConfig_GcsPrefix)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/rank_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/rank_service.pb.go index d4f38ac58010..cbc2009ce9bc 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/rank_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/rank_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/rank_service.proto @@ -68,11 +68,9 @@ type RankingRecord struct { func (x *RankingRecord) Reset() { *x = RankingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankingRecord) String() string { @@ -83,7 +81,7 @@ func (*RankingRecord) ProtoMessage() {} func (x *RankingRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +174,9 @@ type RankRequest struct { func (x *RankRequest) Reset() { *x = RankRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankRequest) String() string { @@ -191,7 +187,7 @@ func (*RankRequest) ProtoMessage() {} func (x *RankRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +265,9 @@ type RankResponse struct { func (x *RankResponse) Reset() { *x = RankResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RankResponse) String() string { @@ -284,7 +278,7 @@ func (*RankResponse) ProtoMessage() {} func (x *RankResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,44 +435,6 @@ func file_google_cloud_discoveryengine_v1beta_rank_service_proto_init() { if File_google_cloud_discoveryengine_v1beta_rank_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RankingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RankRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_rank_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RankResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/recommendation_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/recommendation_service.pb.go index cd6472c54335..cbe207f25a36 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/recommendation_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/recommendation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/recommendation_service.proto @@ -168,11 +168,9 @@ type RecommendRequest struct { func (x *RecommendRequest) Reset() { *x = RecommendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendRequest) String() string { @@ -183,7 +181,7 @@ func (*RecommendRequest) ProtoMessage() {} func (x *RecommendRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type RecommendResponse struct { func (x *RecommendResponse) Reset() { *x = RecommendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse) String() string { @@ -287,7 +283,7 @@ func (*RecommendResponse) ProtoMessage() {} func (x *RecommendResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type RecommendResponse_RecommendationResult struct { func (x *RecommendResponse_RecommendationResult) Reset() { *x = RecommendResponse_RecommendationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendResponse_RecommendationResult) String() string { @@ -369,7 +363,7 @@ func (*RecommendResponse_RecommendationResult) ProtoMessage() {} func (x *RecommendResponse_RecommendationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,44 +603,6 @@ func file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_init( } file_google_cloud_discoveryengine_v1beta_document_proto_init() file_google_cloud_discoveryengine_v1beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecommendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_recommendation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RecommendResponse_RecommendationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/sample_query.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/sample_query.pb.go index 0a14dad4e9f7..f7a3e8b85fcb 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/sample_query.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/sample_query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/sample_query.proto @@ -63,11 +63,9 @@ type SampleQuery struct { func (x *SampleQuery) Reset() { *x = SampleQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery) String() string { @@ -78,7 +76,7 @@ func (*SampleQuery) ProtoMessage() {} func (x *SampleQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type SampleQuery_QueryEntry struct { func (x *SampleQuery_QueryEntry) Reset() { *x = SampleQuery_QueryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery_QueryEntry) String() string { @@ -161,7 +157,7 @@ func (*SampleQuery_QueryEntry) ProtoMessage() {} func (x *SampleQuery_QueryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type SampleQuery_QueryEntry_Target struct { func (x *SampleQuery_QueryEntry_Target) Reset() { *x = SampleQuery_QueryEntry_Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuery_QueryEntry_Target) String() string { @@ -229,7 +223,7 @@ func (*SampleQuery_QueryEntry_Target) ProtoMessage() {} func (x *SampleQuery_QueryEntry_Target) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,44 +367,6 @@ func file_google_cloud_discoveryengine_v1beta_sample_query_proto_init() { if File_google_cloud_discoveryengine_v1beta_sample_query_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery_QueryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuery_QueryEntry_Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_sample_query_proto_msgTypes[0].OneofWrappers = []any{ (*SampleQuery_QueryEntry_)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_service.pb.go index 6ba7878774be..589deafd7cea 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/sample_query_service.proto @@ -67,11 +67,9 @@ type GetSampleQueryRequest struct { func (x *GetSampleQueryRequest) Reset() { *x = GetSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSampleQueryRequest) String() string { @@ -82,7 +80,7 @@ func (*GetSampleQueryRequest) ProtoMessage() {} func (x *GetSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type ListSampleQueriesRequest struct { func (x *ListSampleQueriesRequest) Reset() { *x = ListSampleQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQueriesRequest) String() string { @@ -157,7 +153,7 @@ func (*ListSampleQueriesRequest) ProtoMessage() {} func (x *ListSampleQueriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,11 +208,9 @@ type ListSampleQueriesResponse struct { func (x *ListSampleQueriesResponse) Reset() { *x = ListSampleQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQueriesResponse) String() string { @@ -227,7 +221,7 @@ func (*ListSampleQueriesResponse) ProtoMessage() {} func (x *ListSampleQueriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +287,9 @@ type CreateSampleQueryRequest struct { func (x *CreateSampleQueryRequest) Reset() { *x = CreateSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSampleQueryRequest) String() string { @@ -308,7 +300,7 @@ func (*CreateSampleQueryRequest) ProtoMessage() {} func (x *CreateSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type UpdateSampleQueryRequest struct { func (x *UpdateSampleQueryRequest) Reset() { *x = UpdateSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSampleQueryRequest) String() string { @@ -383,7 +373,7 @@ func (*UpdateSampleQueryRequest) ProtoMessage() {} func (x *UpdateSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +425,9 @@ type DeleteSampleQueryRequest struct { func (x *DeleteSampleQueryRequest) Reset() { *x = DeleteSampleQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSampleQueryRequest) String() string { @@ -450,7 +438,7 @@ func (*DeleteSampleQueryRequest) ProtoMessage() {} func (x *DeleteSampleQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,80 +730,6 @@ func file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_init() } file_google_cloud_discoveryengine_v1beta_import_config_proto_init() file_google_cloud_discoveryengine_v1beta_sample_query_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSampleQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set.pb.go index 51c54d02e0cf..7f7b408273af 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/sample_query_set.proto @@ -68,11 +68,9 @@ type SampleQuerySet struct { func (x *SampleQuerySet) Reset() { *x = SampleQuerySet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SampleQuerySet) String() string { @@ -83,7 +81,7 @@ func (*SampleQuerySet) ProtoMessage() {} func (x *SampleQuerySet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,20 +210,6 @@ func file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_init() { if File_google_cloud_discoveryengine_v1beta_sample_query_set_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SampleQuerySet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set_service.pb.go index fa6039308563..5f489392bfd1 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/sample_query_set_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/sample_query_set_service.proto @@ -68,11 +68,9 @@ type GetSampleQuerySetRequest struct { func (x *GetSampleQuerySetRequest) Reset() { *x = GetSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSampleQuerySetRequest) String() string { @@ -83,7 +81,7 @@ func (*GetSampleQuerySetRequest) ProtoMessage() {} func (x *GetSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -143,11 +141,9 @@ type ListSampleQuerySetsRequest struct { func (x *ListSampleQuerySetsRequest) Reset() { *x = ListSampleQuerySetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQuerySetsRequest) String() string { @@ -158,7 +154,7 @@ func (*ListSampleQuerySetsRequest) ProtoMessage() {} func (x *ListSampleQuerySetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type ListSampleQuerySetsResponse struct { func (x *ListSampleQuerySetsResponse) Reset() { *x = ListSampleQuerySetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSampleQuerySetsResponse) String() string { @@ -228,7 +222,7 @@ func (*ListSampleQuerySetsResponse) ProtoMessage() {} func (x *ListSampleQuerySetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type CreateSampleQuerySetRequest struct { func (x *CreateSampleQuerySetRequest) Reset() { *x = CreateSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSampleQuerySetRequest) String() string { @@ -311,7 +303,7 @@ func (*CreateSampleQuerySetRequest) ProtoMessage() {} func (x *CreateSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +364,9 @@ type UpdateSampleQuerySetRequest struct { func (x *UpdateSampleQuerySetRequest) Reset() { *x = UpdateSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSampleQuerySetRequest) String() string { @@ -387,7 +377,7 @@ func (*UpdateSampleQuerySetRequest) ProtoMessage() {} func (x *UpdateSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +431,9 @@ type DeleteSampleQuerySetRequest struct { func (x *DeleteSampleQuerySetRequest) Reset() { *x = DeleteSampleQuerySetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSampleQuerySetRequest) String() string { @@ -456,7 +444,7 @@ func (*DeleteSampleQuerySetRequest) ProtoMessage() {} func (x *DeleteSampleQuerySetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,80 +706,6 @@ func file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_ini return } file_google_cloud_discoveryengine_v1beta_sample_query_set_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQuerySetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSampleQuerySetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_sample_query_set_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSampleQuerySetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/schema.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/schema.pb.go index 8e0b80ce6149..de8cd5497d12 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/schema.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/schema.proto @@ -63,11 +63,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -78,7 +76,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,20 +226,6 @@ func file_google_cloud_discoveryengine_v1beta_schema_proto_init() { if File_google_cloud_discoveryengine_v1beta_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_schema_proto_msgTypes[0].OneofWrappers = []any{ (*Schema_StructSchema)(nil), (*Schema_JsonSchema)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/schema_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/schema_service.pb.go index f211a61e17ae..d5c664b2ee04 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/schema_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/schema_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/schema_service.proto @@ -58,11 +58,9 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSchemaRequest) String() string { @@ -73,7 +71,7 @@ func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,11 +124,9 @@ type ListSchemasRequest struct { func (x *ListSchemasRequest) Reset() { *x = ListSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasRequest) String() string { @@ -141,7 +137,7 @@ func (*ListSchemasRequest) ProtoMessage() {} func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +192,9 @@ type ListSchemasResponse struct { func (x *ListSchemasResponse) Reset() { *x = ListSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasResponse) String() string { @@ -211,7 +205,7 @@ func (*ListSchemasResponse) ProtoMessage() {} func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type CreateSchemaRequest struct { func (x *CreateSchemaRequest) Reset() { *x = CreateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaRequest) String() string { @@ -282,7 +274,7 @@ func (*CreateSchemaRequest) ProtoMessage() {} func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +330,9 @@ type UpdateSchemaRequest struct { func (x *UpdateSchemaRequest) Reset() { *x = UpdateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaRequest) String() string { @@ -353,7 +343,7 @@ func (*UpdateSchemaRequest) ProtoMessage() {} func (x *UpdateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +387,9 @@ type DeleteSchemaRequest struct { func (x *DeleteSchemaRequest) Reset() { *x = DeleteSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaRequest) String() string { @@ -412,7 +400,7 @@ func (*DeleteSchemaRequest) ProtoMessage() {} func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +437,9 @@ type CreateSchemaMetadata struct { func (x *CreateSchemaMetadata) Reset() { *x = CreateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaMetadata) String() string { @@ -464,7 +450,7 @@ func (*CreateSchemaMetadata) ProtoMessage() {} func (x *CreateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +494,9 @@ type UpdateSchemaMetadata struct { func (x *UpdateSchemaMetadata) Reset() { *x = UpdateSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSchemaMetadata) String() string { @@ -523,7 +507,7 @@ func (*UpdateSchemaMetadata) ProtoMessage() {} func (x *UpdateSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +551,9 @@ type DeleteSchemaMetadata struct { func (x *DeleteSchemaMetadata) Reset() { *x = DeleteSchemaMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaMetadata) String() string { @@ -582,7 +564,7 @@ func (*DeleteSchemaMetadata) ProtoMessage() {} func (x *DeleteSchemaMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,116 +890,6 @@ func file_google_cloud_discoveryengine_v1beta_schema_service_proto_init() { return } file_google_cloud_discoveryengine_v1beta_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_schema_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/search_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/search_service.pb.go index 4bb16de127d6..8d03700e23fe 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/search_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/search_service.proto @@ -1080,11 +1080,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -1095,7 +1093,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1402,11 +1400,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1417,7 +1413,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1547,9 @@ type SearchRequest_ImageQuery struct { func (x *SearchRequest_ImageQuery) Reset() { *x = SearchRequest_ImageQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ImageQuery) String() string { @@ -1566,7 +1560,7 @@ func (*SearchRequest_ImageQuery) ProtoMessage() {} func (x *SearchRequest_ImageQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1627,11 +1621,9 @@ type SearchRequest_DataStoreSpec struct { func (x *SearchRequest_DataStoreSpec) Reset() { *x = SearchRequest_DataStoreSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DataStoreSpec) String() string { @@ -1642,7 +1634,7 @@ func (*SearchRequest_DataStoreSpec) ProtoMessage() {} func (x *SearchRequest_DataStoreSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1749,11 +1741,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1764,7 +1754,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1812,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1837,7 +1825,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1877,11 +1865,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1892,7 +1878,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1935,11 +1921,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1950,7 +1934,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2000,11 +1984,9 @@ type SearchRequest_ContentSearchSpec struct { func (x *SearchRequest_ContentSearchSpec) Reset() { *x = SearchRequest_ContentSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec) String() string { @@ -2015,7 +1997,7 @@ func (*SearchRequest_ContentSearchSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2078,11 +2060,9 @@ type SearchRequest_EmbeddingSpec struct { func (x *SearchRequest_EmbeddingSpec) Reset() { *x = SearchRequest_EmbeddingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_EmbeddingSpec) String() string { @@ -2093,7 +2073,7 @@ func (*SearchRequest_EmbeddingSpec) ProtoMessage() {} func (x *SearchRequest_EmbeddingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2136,11 +2116,9 @@ type SearchRequest_NaturalLanguageQueryUnderstandingSpec struct { func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) Reset() { *x = SearchRequest_NaturalLanguageQueryUnderstandingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) String() string { @@ -2151,7 +2129,7 @@ func (*SearchRequest_NaturalLanguageQueryUnderstandingSpec) ProtoMessage() {} func (x *SearchRequest_NaturalLanguageQueryUnderstandingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2194,11 +2172,9 @@ type SearchRequest_SearchAsYouTypeSpec struct { func (x *SearchRequest_SearchAsYouTypeSpec) Reset() { *x = SearchRequest_SearchAsYouTypeSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SearchAsYouTypeSpec) String() string { @@ -2209,7 +2185,7 @@ func (*SearchRequest_SearchAsYouTypeSpec) ProtoMessage() {} func (x *SearchRequest_SearchAsYouTypeSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2280,11 +2256,9 @@ type SearchRequest_SessionSpec struct { func (x *SearchRequest_SessionSpec) Reset() { *x = SearchRequest_SessionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SessionSpec) String() string { @@ -2295,7 +2269,7 @@ func (*SearchRequest_SessionSpec) ProtoMessage() {} func (x *SearchRequest_SessionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2338,11 +2312,9 @@ type SearchRequest_PersonalizationSpec struct { func (x *SearchRequest_PersonalizationSpec) Reset() { *x = SearchRequest_PersonalizationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_PersonalizationSpec) String() string { @@ -2353,7 +2325,7 @@ func (*SearchRequest_PersonalizationSpec) ProtoMessage() {} func (x *SearchRequest_PersonalizationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2434,11 +2406,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -2449,7 +2419,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2557,11 +2527,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -2572,7 +2540,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2636,11 +2604,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) String() string { @@ -2651,7 +2617,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoMessage func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2716,11 +2682,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint st func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) String() string { @@ -2731,7 +2695,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) func (x *SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2785,11 +2749,9 @@ type SearchRequest_ContentSearchSpec_SnippetSpec struct { func (x *SearchRequest_ContentSearchSpec_SnippetSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SnippetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SnippetSpec) String() string { @@ -2800,7 +2762,7 @@ func (*SearchRequest_ContentSearchSpec_SnippetSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SnippetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2936,11 +2898,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec) String() string { @@ -2951,7 +2911,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3092,11 +3052,9 @@ type SearchRequest_ContentSearchSpec_ExtractiveContentSpec struct { func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ExtractiveContentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) String() string { @@ -3107,7 +3065,7 @@ func (*SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ExtractiveContentSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3179,11 +3137,9 @@ type SearchRequest_ContentSearchSpec_ChunkSpec struct { func (x *SearchRequest_ContentSearchSpec_ChunkSpec) Reset() { *x = SearchRequest_ContentSearchSpec_ChunkSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_ChunkSpec) String() string { @@ -3194,7 +3150,7 @@ func (*SearchRequest_ContentSearchSpec_ChunkSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_ChunkSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3236,11 +3192,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) String() string { @@ -3251,7 +3205,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoMessage func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3296,11 +3250,9 @@ type SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec struct { func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) Reset() { *x = SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) String() string { @@ -3311,7 +3263,7 @@ func (*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoMessage() {} func (x *SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3347,11 +3299,9 @@ type SearchRequest_EmbeddingSpec_EmbeddingVector struct { func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) Reset() { *x = SearchRequest_EmbeddingSpec_EmbeddingVector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) String() string { @@ -3362,7 +3312,7 @@ func (*SearchRequest_EmbeddingSpec_EmbeddingVector) ProtoMessage() {} func (x *SearchRequest_EmbeddingSpec_EmbeddingVector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3414,11 +3364,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -3429,7 +3377,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3489,11 +3437,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -3504,7 +3450,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3555,11 +3501,9 @@ type SearchResponse_GuidedSearchResult struct { func (x *SearchResponse_GuidedSearchResult) Reset() { *x = SearchResponse_GuidedSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GuidedSearchResult) String() string { @@ -3570,7 +3514,7 @@ func (*SearchResponse_GuidedSearchResult) ProtoMessage() {} func (x *SearchResponse_GuidedSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3619,11 +3563,9 @@ type SearchResponse_Summary struct { func (x *SearchResponse_Summary) Reset() { *x = SearchResponse_Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary) String() string { @@ -3634,7 +3576,7 @@ func (*SearchResponse_Summary) ProtoMessage() {} func (x *SearchResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3692,11 +3634,9 @@ type SearchResponse_GeoSearchDebugInfo struct { func (x *SearchResponse_GeoSearchDebugInfo) Reset() { *x = SearchResponse_GeoSearchDebugInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GeoSearchDebugInfo) String() string { @@ -3707,7 +3647,7 @@ func (*SearchResponse_GeoSearchDebugInfo) ProtoMessage() {} func (x *SearchResponse_GeoSearchDebugInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3754,11 +3694,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -3769,7 +3707,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3816,11 +3754,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo struct { func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) String() string { @@ -3831,7 +3767,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo) ProtoMessage() {} func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3889,11 +3825,9 @@ type SearchResponse_SessionInfo struct { func (x *SearchResponse_SessionInfo) Reset() { *x = SearchResponse_SessionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SessionInfo) String() string { @@ -3904,7 +3838,7 @@ func (*SearchResponse_SessionInfo) ProtoMessage() {} func (x *SearchResponse_SessionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3948,11 +3882,9 @@ type SearchResponse_OneBoxResult struct { func (x *SearchResponse_OneBoxResult) Reset() { *x = SearchResponse_OneBoxResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_OneBoxResult) String() string { @@ -3963,7 +3895,7 @@ func (*SearchResponse_OneBoxResult) ProtoMessage() {} func (x *SearchResponse_OneBoxResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4011,11 +3943,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -4026,7 +3956,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4103,11 +4033,9 @@ type SearchResponse_GuidedSearchResult_RefinementAttribute struct { func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) Reset() { *x = SearchResponse_GuidedSearchResult_RefinementAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) String() string { @@ -4118,7 +4046,7 @@ func (*SearchResponse_GuidedSearchResult_RefinementAttribute) ProtoMessage() {} func (x *SearchResponse_GuidedSearchResult_RefinementAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4163,11 +4091,9 @@ type SearchResponse_Summary_SafetyAttributes struct { func (x *SearchResponse_Summary_SafetyAttributes) Reset() { *x = SearchResponse_Summary_SafetyAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SafetyAttributes) String() string { @@ -4178,7 +4104,7 @@ func (*SearchResponse_Summary_SafetyAttributes) ProtoMessage() {} func (x *SearchResponse_Summary_SafetyAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4219,11 +4145,9 @@ type SearchResponse_Summary_CitationMetadata struct { func (x *SearchResponse_Summary_CitationMetadata) Reset() { *x = SearchResponse_Summary_CitationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationMetadata) String() string { @@ -4234,7 +4158,7 @@ func (*SearchResponse_Summary_CitationMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_CitationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4272,11 +4196,9 @@ type SearchResponse_Summary_Citation struct { func (x *SearchResponse_Summary_Citation) Reset() { *x = SearchResponse_Summary_Citation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Citation) String() string { @@ -4287,7 +4209,7 @@ func (*SearchResponse_Summary_Citation) ProtoMessage() {} func (x *SearchResponse_Summary_Citation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4337,11 +4259,9 @@ type SearchResponse_Summary_CitationSource struct { func (x *SearchResponse_Summary_CitationSource) Reset() { *x = SearchResponse_Summary_CitationSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_CitationSource) String() string { @@ -4352,7 +4272,7 @@ func (*SearchResponse_Summary_CitationSource) ProtoMessage() {} func (x *SearchResponse_Summary_CitationSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4396,11 +4316,9 @@ type SearchResponse_Summary_Reference struct { func (x *SearchResponse_Summary_Reference) Reset() { *x = SearchResponse_Summary_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference) String() string { @@ -4411,7 +4329,7 @@ func (*SearchResponse_Summary_Reference) ProtoMessage() {} func (x *SearchResponse_Summary_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4470,11 +4388,9 @@ type SearchResponse_Summary_SummaryWithMetadata struct { func (x *SearchResponse_Summary_SummaryWithMetadata) Reset() { *x = SearchResponse_Summary_SummaryWithMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_SummaryWithMetadata) String() string { @@ -4485,7 +4401,7 @@ func (*SearchResponse_Summary_SummaryWithMetadata) ProtoMessage() {} func (x *SearchResponse_Summary_SummaryWithMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4535,11 +4451,9 @@ type SearchResponse_Summary_Reference_ChunkContent struct { func (x *SearchResponse_Summary_Reference_ChunkContent) Reset() { *x = SearchResponse_Summary_Reference_ChunkContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Summary_Reference_ChunkContent) String() string { @@ -4550,7 +4464,7 @@ func (*SearchResponse_Summary_Reference_ChunkContent) ProtoMessage() {} func (x *SearchResponse_Summary_Reference_ChunkContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,11 +4510,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) String() string { @@ -4612,7 +4524,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4651,11 +4563,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) String() string { @@ -4667,7 +4577,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4722,11 +4632,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) String() string { @@ -4738,7 +4646,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4805,11 +4713,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) String() string { @@ -4821,7 +4727,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4883,11 +4789,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) String() string { @@ -4899,7 +4803,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4933,11 +4837,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) String() string { @@ -4949,7 +4851,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4992,11 +4894,9 @@ type SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFil func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) Reset() { *x = SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) String() string { @@ -5008,7 +4908,7 @@ func (*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedF func (x *SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6366,608 +6266,6 @@ func file_google_cloud_discoveryengine_v1beta_search_service_proto_init() { file_google_cloud_discoveryengine_v1beta_chunk_proto_init() file_google_cloud_discoveryengine_v1beta_common_proto_init() file_google_cloud_discoveryengine_v1beta_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ImageQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DataStoreSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_EmbeddingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_NaturalLanguageQueryUnderstandingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SearchAsYouTypeSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SessionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_PersonalizationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec_BoostControlSpec_ControlPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SnippetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ExtractiveContentSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_ChunkSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_EmbeddingSpec_EmbeddingVector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GuidedSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GeoSearchDebugInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SessionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_OneBoxResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_GuidedSearchResult_RefinementAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SafetyAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Citation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_CitationSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_SummaryWithMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Summary_Reference_ChunkContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_StringConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_NumberConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_GeolocationConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_AndExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_OrExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_Expression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*SearchRequest_ImageQuery_ImageBytes)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/search_tuning_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/search_tuning_service.pb.go index ea101974a328..d14c925fd967 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/search_tuning_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/search_tuning_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/search_tuning_service.proto @@ -60,11 +60,9 @@ type ListCustomModelsRequest struct { func (x *ListCustomModelsRequest) Reset() { *x = ListCustomModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsRequest) String() string { @@ -75,7 +73,7 @@ func (*ListCustomModelsRequest) ProtoMessage() {} func (x *ListCustomModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type ListCustomModelsResponse struct { func (x *ListCustomModelsResponse) Reset() { *x = ListCustomModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomModelsResponse) String() string { @@ -126,7 +122,7 @@ func (*ListCustomModelsResponse) ProtoMessage() {} func (x *ListCustomModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +175,9 @@ type TrainCustomModelRequest struct { func (x *TrainCustomModelRequest) Reset() { *x = TrainCustomModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest) String() string { @@ -194,7 +188,7 @@ func (*TrainCustomModelRequest) ProtoMessage() {} func (x *TrainCustomModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +286,9 @@ type TrainCustomModelResponse struct { func (x *TrainCustomModelResponse) Reset() { *x = TrainCustomModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelResponse) String() string { @@ -307,7 +299,7 @@ func (*TrainCustomModelResponse) ProtoMessage() {} func (x *TrainCustomModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type TrainCustomModelMetadata struct { func (x *TrainCustomModelMetadata) Reset() { *x = TrainCustomModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelMetadata) String() string { @@ -388,7 +378,7 @@ func (*TrainCustomModelMetadata) ProtoMessage() {} func (x *TrainCustomModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +446,9 @@ type TrainCustomModelRequest_GcsTrainingInput struct { func (x *TrainCustomModelRequest_GcsTrainingInput) Reset() { *x = TrainCustomModelRequest_GcsTrainingInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainCustomModelRequest_GcsTrainingInput) String() string { @@ -471,7 +459,7 @@ func (*TrainCustomModelRequest_GcsTrainingInput) ProtoMessage() {} func (x *TrainCustomModelRequest_GcsTrainingInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,80 +735,6 @@ func file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_init() } file_google_cloud_discoveryengine_v1beta_custom_tuning_model_proto_init() file_google_cloud_discoveryengine_v1beta_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TrainCustomModelRequest_GcsTrainingInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_search_tuning_service_proto_msgTypes[2].OneofWrappers = []any{ (*TrainCustomModelRequest_GcsTrainingInput_)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/serving_config.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/serving_config.pb.go index 95a4602aaeb3..e2739c5bfec8 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/serving_config.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/serving_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/serving_config.proto @@ -209,11 +209,9 @@ type ServingConfig struct { func (x *ServingConfig) Reset() { *x = ServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig) String() string { @@ -224,7 +222,7 @@ func (*ServingConfig) ProtoMessage() {} func (x *ServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +453,9 @@ type ServingConfig_MediaConfig struct { func (x *ServingConfig_MediaConfig) Reset() { *x = ServingConfig_MediaConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig_MediaConfig) String() string { @@ -470,7 +466,7 @@ func (*ServingConfig_MediaConfig) ProtoMessage() {} func (x *ServingConfig_MediaConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +560,9 @@ type ServingConfig_GenericConfig struct { func (x *ServingConfig_GenericConfig) Reset() { *x = ServingConfig_GenericConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig_GenericConfig) String() string { @@ -579,7 +573,7 @@ func (*ServingConfig_GenericConfig) ProtoMessage() {} func (x *ServingConfig_GenericConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,44 +821,6 @@ func file_google_cloud_discoveryengine_v1beta_serving_config_proto_init() { } file_google_cloud_discoveryengine_v1beta_common_proto_init() file_google_cloud_discoveryengine_v1beta_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig_MediaConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig_GenericConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_serving_config_proto_msgTypes[0].OneofWrappers = []any{ (*ServingConfig_MediaConfig_)(nil), (*ServingConfig_GenericConfig_)(nil), diff --git a/discoveryengine/apiv1beta/discoveryenginepb/serving_config_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/serving_config_service.pb.go index 0ad04ee26384..2cc2e6c4921e 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/serving_config_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/serving_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/serving_config_service.proto @@ -61,11 +61,9 @@ type UpdateServingConfigRequest struct { func (x *UpdateServingConfigRequest) Reset() { *x = UpdateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServingConfigRequest) String() string { @@ -76,7 +74,7 @@ func (*UpdateServingConfigRequest) ProtoMessage() {} func (x *UpdateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetServingConfigRequest struct { func (x *GetServingConfigRequest) Reset() { *x = GetServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServingConfigRequest) String() string { @@ -133,7 +129,7 @@ func (*GetServingConfigRequest) ProtoMessage() {} func (x *GetServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type ListServingConfigsRequest struct { func (x *ListServingConfigsRequest) Reset() { *x = ListServingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsRequest) String() string { @@ -190,7 +184,7 @@ func (*ListServingConfigsRequest) ProtoMessage() {} func (x *ListServingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +234,9 @@ type ListServingConfigsResponse struct { func (x *ListServingConfigsResponse) Reset() { *x = ListServingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsResponse) String() string { @@ -255,7 +247,7 @@ func (*ListServingConfigsResponse) ProtoMessage() {} func (x *ListServingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,56 +491,6 @@ func file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_init( return } file_google_cloud_discoveryengine_v1beta_serving_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_serving_config_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/session.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/session.pb.go index 5c19549fea13..2404e8386879 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/session.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/session.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/session.proto @@ -109,11 +109,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -124,7 +122,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type Query struct { func (x *Query) Reset() { *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Query) String() string { @@ -214,7 +210,7 @@ func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type Session_Turn struct { func (x *Session_Turn) Reset() { *x = Session_Turn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session_Turn) String() string { @@ -294,7 +288,7 @@ func (*Session_Turn) ProtoMessage() {} func (x *Session_Turn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,44 +450,6 @@ func file_google_cloud_discoveryengine_v1beta_session_proto_init() { if File_google_cloud_discoveryengine_v1beta_session_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Session_Turn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_session_proto_msgTypes[1].OneofWrappers = []any{ (*Query_Text)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine.pb.go index 83068f89d35b..f8c6ef7e2aa0 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/site_search_engine.proto @@ -227,11 +227,9 @@ type SiteSearchEngine struct { func (x *SiteSearchEngine) Reset() { *x = SiteSearchEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteSearchEngine) String() string { @@ -242,7 +240,7 @@ func (*SiteSearchEngine) ProtoMessage() {} func (x *SiteSearchEngine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +301,9 @@ type TargetSite struct { func (x *TargetSite) Reset() { *x = TargetSite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite) String() string { @@ -318,7 +314,7 @@ func (*TargetSite) ProtoMessage() {} func (x *TargetSite) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +413,9 @@ type SiteVerificationInfo struct { func (x *SiteVerificationInfo) Reset() { *x = SiteVerificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteVerificationInfo) String() string { @@ -432,7 +426,7 @@ func (*SiteVerificationInfo) ProtoMessage() {} func (x *SiteVerificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +477,9 @@ type Sitemap struct { func (x *Sitemap) Reset() { *x = Sitemap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sitemap) String() string { @@ -498,7 +490,7 @@ func (*Sitemap) ProtoMessage() {} func (x *Sitemap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +560,9 @@ type TargetSite_FailureReason struct { func (x *TargetSite_FailureReason) Reset() { *x = TargetSite_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason) String() string { @@ -583,7 +573,7 @@ func (*TargetSite_FailureReason) ProtoMessage() {} func (x *TargetSite_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +626,9 @@ type TargetSite_FailureReason_QuotaFailure struct { func (x *TargetSite_FailureReason_QuotaFailure) Reset() { *x = TargetSite_FailureReason_QuotaFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetSite_FailureReason_QuotaFailure) String() string { @@ -651,7 +639,7 @@ func (*TargetSite_FailureReason_QuotaFailure) ProtoMessage() {} func (x *TargetSite_FailureReason_QuotaFailure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,80 +895,6 @@ func file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_init() { if File_google_cloud_discoveryengine_v1beta_site_search_engine_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SiteSearchEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SiteVerificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Sitemap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TargetSite_FailureReason_QuotaFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_msgTypes[3].OneofWrappers = []any{ (*Sitemap_Uri)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine_service.pb.go index 82e2290cab0a..6503da3fdbee 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/site_search_engine_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/site_search_engine_service.proto @@ -117,11 +117,9 @@ type GetSiteSearchEngineRequest struct { func (x *GetSiteSearchEngineRequest) Reset() { *x = GetSiteSearchEngineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSiteSearchEngineRequest) String() string { @@ -132,7 +130,7 @@ func (*GetSiteSearchEngineRequest) ProtoMessage() {} func (x *GetSiteSearchEngineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type CreateTargetSiteRequest struct { func (x *CreateTargetSiteRequest) Reset() { *x = CreateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteRequest) String() string { @@ -188,7 +184,7 @@ func (*CreateTargetSiteRequest) ProtoMessage() {} func (x *CreateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +231,9 @@ type CreateTargetSiteMetadata struct { func (x *CreateTargetSiteMetadata) Reset() { *x = CreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetSiteMetadata) String() string { @@ -250,7 +244,7 @@ func (*CreateTargetSiteMetadata) ProtoMessage() {} func (x *CreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +293,9 @@ type BatchCreateTargetSitesRequest struct { func (x *BatchCreateTargetSitesRequest) Reset() { *x = BatchCreateTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesRequest) String() string { @@ -314,7 +306,7 @@ func (*BatchCreateTargetSitesRequest) ProtoMessage() {} func (x *BatchCreateTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +359,9 @@ type GetTargetSiteRequest struct { func (x *GetTargetSiteRequest) Reset() { *x = GetTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetSiteRequest) String() string { @@ -382,7 +372,7 @@ func (*GetTargetSiteRequest) ProtoMessage() {} func (x *GetTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +414,9 @@ type UpdateTargetSiteRequest struct { func (x *UpdateTargetSiteRequest) Reset() { *x = UpdateTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteRequest) String() string { @@ -439,7 +427,7 @@ func (*UpdateTargetSiteRequest) ProtoMessage() {} func (x *UpdateTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type UpdateTargetSiteMetadata struct { func (x *UpdateTargetSiteMetadata) Reset() { *x = UpdateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetSiteMetadata) String() string { @@ -494,7 +480,7 @@ func (*UpdateTargetSiteMetadata) ProtoMessage() {} func (x *UpdateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +533,9 @@ type DeleteTargetSiteRequest struct { func (x *DeleteTargetSiteRequest) Reset() { *x = DeleteTargetSiteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteRequest) String() string { @@ -562,7 +546,7 @@ func (*DeleteTargetSiteRequest) ProtoMessage() {} func (x *DeleteTargetSiteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +586,9 @@ type DeleteTargetSiteMetadata struct { func (x *DeleteTargetSiteMetadata) Reset() { *x = DeleteTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetSiteMetadata) String() string { @@ -617,7 +599,7 @@ func (*DeleteTargetSiteMetadata) ProtoMessage() {} func (x *DeleteTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +660,9 @@ type ListTargetSitesRequest struct { func (x *ListTargetSitesRequest) Reset() { *x = ListTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesRequest) String() string { @@ -693,7 +673,7 @@ func (*ListTargetSitesRequest) ProtoMessage() {} func (x *ListTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +729,9 @@ type ListTargetSitesResponse struct { func (x *ListTargetSitesResponse) Reset() { *x = ListTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetSitesResponse) String() string { @@ -764,7 +742,7 @@ func (*ListTargetSitesResponse) ProtoMessage() {} func (x *ListTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +796,9 @@ type BatchCreateTargetSiteMetadata struct { func (x *BatchCreateTargetSiteMetadata) Reset() { *x = BatchCreateTargetSiteMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSiteMetadata) String() string { @@ -833,7 +809,7 @@ func (*BatchCreateTargetSiteMetadata) ProtoMessage() {} func (x *BatchCreateTargetSiteMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +852,9 @@ type BatchCreateTargetSitesResponse struct { func (x *BatchCreateTargetSitesResponse) Reset() { *x = BatchCreateTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTargetSitesResponse) String() string { @@ -891,7 +865,7 @@ func (*BatchCreateTargetSitesResponse) ProtoMessage() {} func (x *BatchCreateTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +907,9 @@ type CreateSitemapRequest struct { func (x *CreateSitemapRequest) Reset() { *x = CreateSitemapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSitemapRequest) String() string { @@ -948,7 +920,7 @@ func (*CreateSitemapRequest) ProtoMessage() {} func (x *CreateSitemapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +972,9 @@ type DeleteSitemapRequest struct { func (x *DeleteSitemapRequest) Reset() { *x = DeleteSitemapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSitemapRequest) String() string { @@ -1015,7 +985,7 @@ func (*DeleteSitemapRequest) ProtoMessage() {} func (x *DeleteSitemapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1029,9 @@ type FetchSitemapsRequest struct { func (x *FetchSitemapsRequest) Reset() { *x = FetchSitemapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchSitemapsRequest) String() string { @@ -1074,7 +1042,7 @@ func (*FetchSitemapsRequest) ProtoMessage() {} func (x *FetchSitemapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1089,9 @@ type CreateSitemapMetadata struct { func (x *CreateSitemapMetadata) Reset() { *x = CreateSitemapMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSitemapMetadata) String() string { @@ -1136,7 +1102,7 @@ func (*CreateSitemapMetadata) ProtoMessage() {} func (x *CreateSitemapMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1149,9 @@ type DeleteSitemapMetadata struct { func (x *DeleteSitemapMetadata) Reset() { *x = DeleteSitemapMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSitemapMetadata) String() string { @@ -1198,7 +1162,7 @@ func (*DeleteSitemapMetadata) ProtoMessage() {} func (x *DeleteSitemapMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1205,9 @@ type FetchSitemapsResponse struct { func (x *FetchSitemapsResponse) Reset() { *x = FetchSitemapsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchSitemapsResponse) String() string { @@ -1256,7 +1218,7 @@ func (*FetchSitemapsResponse) ProtoMessage() {} func (x *FetchSitemapsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,11 +1257,9 @@ type EnableAdvancedSiteSearchRequest struct { func (x *EnableAdvancedSiteSearchRequest) Reset() { *x = EnableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchRequest) String() string { @@ -1310,7 +1270,7 @@ func (*EnableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *EnableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1343,11 +1303,9 @@ type EnableAdvancedSiteSearchResponse struct { func (x *EnableAdvancedSiteSearchResponse) Reset() { *x = EnableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchResponse) String() string { @@ -1358,7 +1316,7 @@ func (*EnableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *EnableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1349,9 @@ type EnableAdvancedSiteSearchMetadata struct { func (x *EnableAdvancedSiteSearchMetadata) Reset() { *x = EnableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableAdvancedSiteSearchMetadata) String() string { @@ -1406,7 +1362,7 @@ func (*EnableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *EnableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1452,11 +1408,9 @@ type DisableAdvancedSiteSearchRequest struct { func (x *DisableAdvancedSiteSearchRequest) Reset() { *x = DisableAdvancedSiteSearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchRequest) String() string { @@ -1467,7 +1421,7 @@ func (*DisableAdvancedSiteSearchRequest) ProtoMessage() {} func (x *DisableAdvancedSiteSearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1500,11 +1454,9 @@ type DisableAdvancedSiteSearchResponse struct { func (x *DisableAdvancedSiteSearchResponse) Reset() { *x = DisableAdvancedSiteSearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchResponse) String() string { @@ -1515,7 +1467,7 @@ func (*DisableAdvancedSiteSearchResponse) ProtoMessage() {} func (x *DisableAdvancedSiteSearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1548,11 +1500,9 @@ type DisableAdvancedSiteSearchMetadata struct { func (x *DisableAdvancedSiteSearchMetadata) Reset() { *x = DisableAdvancedSiteSearchMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableAdvancedSiteSearchMetadata) String() string { @@ -1563,7 +1513,7 @@ func (*DisableAdvancedSiteSearchMetadata) ProtoMessage() {} func (x *DisableAdvancedSiteSearchMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1618,11 +1568,9 @@ type RecrawlUrisRequest struct { func (x *RecrawlUrisRequest) Reset() { *x = RecrawlUrisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisRequest) String() string { @@ -1633,7 +1581,7 @@ func (*RecrawlUrisRequest) ProtoMessage() {} func (x *RecrawlUrisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1685,11 +1633,9 @@ type RecrawlUrisResponse struct { func (x *RecrawlUrisResponse) Reset() { *x = RecrawlUrisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse) String() string { @@ -1700,7 +1646,7 @@ func (*RecrawlUrisResponse) ProtoMessage() {} func (x *RecrawlUrisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1767,11 +1713,9 @@ type RecrawlUrisMetadata struct { func (x *RecrawlUrisMetadata) Reset() { *x = RecrawlUrisMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisMetadata) String() string { @@ -1782,7 +1726,7 @@ func (*RecrawlUrisMetadata) ProtoMessage() {} func (x *RecrawlUrisMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1826,9 @@ type BatchVerifyTargetSitesRequest struct { func (x *BatchVerifyTargetSitesRequest) Reset() { *x = BatchVerifyTargetSitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesRequest) String() string { @@ -1897,7 +1839,7 @@ func (*BatchVerifyTargetSitesRequest) ProtoMessage() {} func (x *BatchVerifyTargetSitesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1930,11 +1872,9 @@ type BatchVerifyTargetSitesResponse struct { func (x *BatchVerifyTargetSitesResponse) Reset() { *x = BatchVerifyTargetSitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesResponse) String() string { @@ -1945,7 +1885,7 @@ func (*BatchVerifyTargetSitesResponse) ProtoMessage() {} func (x *BatchVerifyTargetSitesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1918,9 @@ type BatchVerifyTargetSitesMetadata struct { func (x *BatchVerifyTargetSitesMetadata) Reset() { *x = BatchVerifyTargetSitesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchVerifyTargetSitesMetadata) String() string { @@ -1993,7 +1931,7 @@ func (*BatchVerifyTargetSitesMetadata) ProtoMessage() {} func (x *BatchVerifyTargetSitesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2051,11 +1989,9 @@ type FetchDomainVerificationStatusRequest struct { func (x *FetchDomainVerificationStatusRequest) Reset() { *x = FetchDomainVerificationStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusRequest) String() string { @@ -2066,7 +2002,7 @@ func (*FetchDomainVerificationStatusRequest) ProtoMessage() {} func (x *FetchDomainVerificationStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,11 +2058,9 @@ type FetchDomainVerificationStatusResponse struct { func (x *FetchDomainVerificationStatusResponse) Reset() { *x = FetchDomainVerificationStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDomainVerificationStatusResponse) String() string { @@ -2137,7 +2071,7 @@ func (*FetchDomainVerificationStatusResponse) ProtoMessage() {} func (x *FetchDomainVerificationStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,11 +2120,9 @@ type FetchSitemapsRequest_UrisMatcher struct { func (x *FetchSitemapsRequest_UrisMatcher) Reset() { *x = FetchSitemapsRequest_UrisMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchSitemapsRequest_UrisMatcher) String() string { @@ -2201,7 +2133,7 @@ func (*FetchSitemapsRequest_UrisMatcher) ProtoMessage() {} func (x *FetchSitemapsRequest_UrisMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2240,11 +2172,9 @@ type FetchSitemapsRequest_Matcher struct { func (x *FetchSitemapsRequest_Matcher) Reset() { *x = FetchSitemapsRequest_Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchSitemapsRequest_Matcher) String() string { @@ -2255,7 +2185,7 @@ func (*FetchSitemapsRequest_Matcher) ProtoMessage() {} func (x *FetchSitemapsRequest_Matcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2308,11 +2238,9 @@ type FetchSitemapsResponse_SitemapMetadata struct { func (x *FetchSitemapsResponse_SitemapMetadata) Reset() { *x = FetchSitemapsResponse_SitemapMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchSitemapsResponse_SitemapMetadata) String() string { @@ -2323,7 +2251,7 @@ func (*FetchSitemapsResponse_SitemapMetadata) ProtoMessage() {} func (x *FetchSitemapsResponse_SitemapMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2360,11 +2288,9 @@ type RecrawlUrisResponse_FailureInfo struct { func (x *RecrawlUrisResponse_FailureInfo) Reset() { *x = RecrawlUrisResponse_FailureInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo) String() string { @@ -2375,7 +2301,7 @@ func (*RecrawlUrisResponse_FailureInfo) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2419,11 +2345,9 @@ type RecrawlUrisResponse_FailureInfo_FailureReason struct { func (x *RecrawlUrisResponse_FailureInfo_FailureReason) Reset() { *x = RecrawlUrisResponse_FailureInfo_FailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecrawlUrisResponse_FailureInfo_FailureReason) String() string { @@ -2434,7 +2358,7 @@ func (*RecrawlUrisResponse_FailureInfo_FailureReason) ProtoMessage() {} func (x *RecrawlUrisResponse_FailureInfo_FailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3397,464 +3321,6 @@ func file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_i return } file_google_cloud_discoveryengine_v1beta_site_search_engine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetSiteSearchEngineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSiteMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateSitemapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSitemapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FetchSitemapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateSitemapMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSitemapMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FetchSitemapsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*EnableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DisableAdvancedSiteSearchMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*BatchVerifyTargetSitesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*FetchDomainVerificationStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*FetchSitemapsRequest_UrisMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*FetchSitemapsRequest_Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FetchSitemapsResponse_SitemapMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RecrawlUrisResponse_FailureInfo_FailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_site_search_engine_service_proto_msgTypes[34].OneofWrappers = []any{ (*FetchSitemapsRequest_Matcher_UrisMatcher)(nil), } diff --git a/discoveryengine/apiv1beta/discoveryenginepb/user_event.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/user_event.pb.go index 0d6294c10031..021572314927 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/user_event.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/user_event.proto @@ -254,11 +254,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -269,7 +267,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +475,9 @@ type PageInfo struct { func (x *PageInfo) Reset() { *x = PageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageInfo) String() string { @@ -492,7 +488,7 @@ func (*PageInfo) ProtoMessage() {} func (x *PageInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +581,9 @@ type SearchInfo struct { func (x *SearchInfo) Reset() { *x = SearchInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchInfo) String() string { @@ -600,7 +594,7 @@ func (*SearchInfo) ProtoMessage() {} func (x *SearchInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,11 +648,9 @@ type CompletionInfo struct { func (x *CompletionInfo) Reset() { *x = CompletionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionInfo) String() string { @@ -669,7 +661,7 @@ func (*CompletionInfo) ProtoMessage() {} func (x *CompletionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +741,9 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionInfo) String() string { @@ -764,7 +754,7 @@ func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,11 +856,9 @@ type DocumentInfo struct { func (x *DocumentInfo) Reset() { *x = DocumentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInfo) String() string { @@ -881,7 +869,7 @@ func (*DocumentInfo) ProtoMessage() {} func (x *DocumentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +987,9 @@ type PanelInfo struct { func (x *PanelInfo) Reset() { *x = PanelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PanelInfo) String() string { @@ -1014,7 +1000,7 @@ func (*PanelInfo) ProtoMessage() {} func (x *PanelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1089,11 +1075,9 @@ type MediaInfo struct { func (x *MediaInfo) Reset() { *x = MediaInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaInfo) String() string { @@ -1104,7 +1088,7 @@ func (*MediaInfo) ProtoMessage() {} func (x *MediaInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,104 +1389,6 @@ func file_google_cloud_discoveryengine_v1beta_user_event_proto_init() { return } file_google_cloud_discoveryengine_v1beta_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PanelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MediaInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[2].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[4].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_user_event_proto_msgTypes[5].OneofWrappers = []any{ diff --git a/discoveryengine/apiv1beta/discoveryenginepb/user_event_service.pb.go b/discoveryengine/apiv1beta/discoveryenginepb/user_event_service.pb.go index 7f733c1ead3e..65e1b4c568a6 100755 --- a/discoveryengine/apiv1beta/discoveryenginepb/user_event_service.pb.go +++ b/discoveryengine/apiv1beta/discoveryenginepb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/discoveryengine/v1beta/user_event_service.proto @@ -68,11 +68,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -83,7 +81,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -159,7 +155,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,32 +428,6 @@ func file_google_cloud_discoveryengine_v1beta_user_event_service_proto_init() { file_google_cloud_discoveryengine_v1beta_import_config_proto_init() file_google_cloud_discoveryengine_v1beta_purge_config_proto_init() file_google_cloud_discoveryengine_v1beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_discoveryengine_v1beta_user_event_service_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} diff --git a/discoveryengine/apiv1beta/document_client.go b/discoveryengine/apiv1beta/document_client.go index d3c8f1f8c37a..8b5f18537bc1 100755 --- a/discoveryengine/apiv1beta/document_client.go +++ b/discoveryengine/apiv1beta/document_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -513,6 +512,8 @@ type documentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentClient creates a new document service client based on gRPC. @@ -541,6 +542,7 @@ func NewDocumentClient(ctx context.Context, opts ...option.ClientOption) (*Docum connPool: connPool, documentClient: discoveryenginepb.NewDocumentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -604,6 +606,8 @@ type documentRESTClient struct { // Points back to the CallOptions field of the containing DocumentClient CallOptions **DocumentCallOptions + + logger *slog.Logger } // NewDocumentRESTClient creates a new document service rest client. @@ -623,6 +627,7 @@ func NewDocumentRESTClient(ctx context.Context, opts ...option.ClientOption) (*D endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -685,7 +690,7 @@ func (c *documentGRPCClient) GetDocument(ctx context.Context, req *discoveryengi var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -714,7 +719,7 @@ func (c *documentGRPCClient) ListDocuments(ctx context.Context, req *discoveryen } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *documentGRPCClient) CreateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -767,7 +772,7 @@ func (c *documentGRPCClient) UpdateDocument(ctx context.Context, req *discoverye var resp *discoveryenginepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -784,7 +789,7 @@ func (c *documentGRPCClient) DeleteDocument(ctx context.Context, req *discoverye opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.documentClient.DeleteDocument(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.documentClient.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) return err @@ -799,7 +804,7 @@ func (c *documentGRPCClient) ImportDocuments(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *documentGRPCClient) PurgeDocuments(ctx context.Context, req *discoverye var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.PurgeDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.PurgeDocuments, req, settings.GRPC, c.logger, "PurgeDocuments") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *documentGRPCClient) BatchGetDocumentsMetadata(ctx context.Context, req var resp *discoveryenginepb.BatchGetDocumentsMetadataResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.BatchGetDocumentsMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.BatchGetDocumentsMetadata, req, settings.GRPC, c.logger, "BatchGetDocumentsMetadata") return err }, opts...) if err != nil { @@ -856,7 +861,7 @@ func (c *documentGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -871,7 +876,7 @@ func (c *documentGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *documentGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -959,17 +964,7 @@ func (c *documentRESTClient) GetDocument(ctx context.Context, req *discoveryengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1031,21 +1026,10 @@ func (c *documentRESTClient) ListDocuments(ctx context.Context, req *discoveryen } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1116,17 +1100,7 @@ func (c *documentRESTClient) CreateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } @@ -1193,17 +1167,7 @@ func (c *documentRESTClient) UpdateDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } @@ -1250,15 +1214,8 @@ func (c *documentRESTClient) DeleteDocument(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") + return err }, opts...) } @@ -1306,21 +1263,10 @@ func (c *documentRESTClient) ImportDocuments(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1392,21 +1338,10 @@ func (c *documentRESTClient) PurgeDocuments(ctx context.Context, req *discoverye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1469,17 +1404,7 @@ func (c *documentRESTClient) BatchGetDocumentsMetadata(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetDocumentsMetadata") if err != nil { return err } @@ -1532,15 +1457,8 @@ func (c *documentRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1577,17 +1495,7 @@ func (c *documentRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1652,21 +1560,10 @@ func (c *documentRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/document_client_example_go123_test.go b/discoveryengine/apiv1beta/document_client_example_go123_test.go index 163e8fedce9a..f457c50f902d 100644 --- a/discoveryengine/apiv1beta/document_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/document_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDocumentClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDocumentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/engine_client.go b/discoveryengine/apiv1beta/engine_client.go index 711d89dc3264..6995edc49d36 100755 --- a/discoveryengine/apiv1beta/engine_client.go +++ b/discoveryengine/apiv1beta/engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -334,6 +333,8 @@ type engineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEngineClient creates a new engine service client based on gRPC. @@ -361,6 +362,7 @@ func NewEngineClient(ctx context.Context, opts ...option.ClientOption) (*EngineC connPool: connPool, engineClient: discoveryenginepb.NewEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -424,6 +426,8 @@ type engineRESTClient struct { // Points back to the CallOptions field of the containing EngineClient CallOptions **EngineCallOptions + + logger *slog.Logger } // NewEngineRESTClient creates a new engine service rest client. @@ -442,6 +446,7 @@ func NewEngineRESTClient(ctx context.Context, opts ...option.ClientOption) (*Eng endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -504,7 +509,7 @@ func (c *engineGRPCClient) CreateEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.CreateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.CreateEngine, req, settings.GRPC, c.logger, "CreateEngine") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *engineGRPCClient) DeleteEngine(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.DeleteEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.DeleteEngine, req, settings.GRPC, c.logger, "DeleteEngine") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *engineGRPCClient) UpdateEngine(ctx context.Context, req *discoveryengin var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.UpdateEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.UpdateEngine, req, settings.GRPC, c.logger, "UpdateEngine") return err }, opts...) if err != nil { @@ -562,7 +567,7 @@ func (c *engineGRPCClient) GetEngine(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.GetEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.GetEngine, req, settings.GRPC, c.logger, "GetEngine") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *engineGRPCClient) ListEngines(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.ListEngines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.ListEngines, req, settings.GRPC, c.logger, "ListEngines") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *engineGRPCClient) PauseEngine(ctx context.Context, req *discoveryengine var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.PauseEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.PauseEngine, req, settings.GRPC, c.logger, "PauseEngine") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *engineGRPCClient) ResumeEngine(ctx context.Context, req *discoveryengin var resp *discoveryenginepb.Engine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.ResumeEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.ResumeEngine, req, settings.GRPC, c.logger, "ResumeEngine") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *engineGRPCClient) TuneEngine(ctx context.Context, req *discoveryenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.engineClient.TuneEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.engineClient.TuneEngine, req, settings.GRPC, c.logger, "TuneEngine") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *engineGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -696,7 +701,7 @@ func (c *engineGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *engineGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -791,21 +796,10 @@ func (c *engineRESTClient) CreateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -855,21 +849,10 @@ func (c *engineRESTClient) DeleteEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEngine") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -934,17 +917,7 @@ func (c *engineRESTClient) UpdateEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEngine") if err != nil { return err } @@ -994,17 +967,7 @@ func (c *engineRESTClient) GetEngine(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEngine") if err != nil { return err } @@ -1070,21 +1033,10 @@ func (c *engineRESTClient) ListEngines(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEngines") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1155,17 +1107,7 @@ func (c *engineRESTClient) PauseEngine(ctx context.Context, req *discoveryengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseEngine") if err != nil { return err } @@ -1223,17 +1165,7 @@ func (c *engineRESTClient) ResumeEngine(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeEngine") if err != nil { return err } @@ -1290,21 +1222,10 @@ func (c *engineRESTClient) TuneEngine(ctx context.Context, req *discoveryenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneEngine") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1358,15 +1279,8 @@ func (c *engineRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1403,17 +1317,7 @@ func (c *engineRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1478,21 +1382,10 @@ func (c *engineRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/engine_client_example_go123_test.go b/discoveryengine/apiv1beta/engine_client_example_go123_test.go index 6c2963322d76..7b0f25857102 100644 --- a/discoveryengine/apiv1beta/engine_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEngineClient_ListEngines_all() { } for resp, err := range c.ListEngines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/evaluation_client.go b/discoveryengine/apiv1beta/evaluation_client.go index 7efdd21fcfde..5a340fe8fcc3 100755 --- a/discoveryengine/apiv1beta/evaluation_client.go +++ b/discoveryengine/apiv1beta/evaluation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -349,6 +348,8 @@ type evaluationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEvaluationClient creates a new evaluation service client based on gRPC. @@ -376,6 +377,7 @@ func NewEvaluationClient(ctx context.Context, opts ...option.ClientOption) (*Eva connPool: connPool, evaluationClient: discoveryenginepb.NewEvaluationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -439,6 +441,8 @@ type evaluationRESTClient struct { // Points back to the CallOptions field of the containing EvaluationClient CallOptions **EvaluationCallOptions + + logger *slog.Logger } // NewEvaluationRESTClient creates a new evaluation service rest client. @@ -457,6 +461,7 @@ func NewEvaluationRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -519,7 +524,7 @@ func (c *evaluationGRPCClient) GetEvaluation(ctx context.Context, req *discovery var resp *discoveryenginepb.Evaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.GetEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.GetEvaluation, req, settings.GRPC, c.logger, "GetEvaluation") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *evaluationGRPCClient) ListEvaluations(ctx context.Context, req *discove } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.ListEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.ListEvaluations, req, settings.GRPC, c.logger, "ListEvaluations") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *evaluationGRPCClient) CreateEvaluation(ctx context.Context, req *discov var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.CreateEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.CreateEvaluation, req, settings.GRPC, c.logger, "CreateEvaluation") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *evaluationGRPCClient) ListEvaluationResults(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.evaluationClient.ListEvaluationResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.evaluationClient.ListEvaluationResults, req, settings.GRPC, c.logger, "ListEvaluationResults") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *evaluationGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -663,7 +668,7 @@ func (c *evaluationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *evaluationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -751,17 +756,7 @@ func (c *evaluationRESTClient) GetEvaluation(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluation") if err != nil { return err } @@ -824,21 +819,10 @@ func (c *evaluationRESTClient) ListEvaluations(ctx context.Context, req *discove } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -910,21 +894,10 @@ func (c *evaluationRESTClient) CreateEvaluation(ctx context.Context, req *discov httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEvaluation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -988,21 +961,10 @@ func (c *evaluationRESTClient) ListEvaluationResults(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluationResults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1068,15 +1030,8 @@ func (c *evaluationRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1113,17 +1068,7 @@ func (c *evaluationRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1188,21 +1133,10 @@ func (c *evaluationRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/evaluation_client_example_go123_test.go b/discoveryengine/apiv1beta/evaluation_client_example_go123_test.go index 1b38b66eba80..21bac74386f8 100644 --- a/discoveryengine/apiv1beta/evaluation_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/evaluation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEvaluationClient_ListEvaluationResults_all() { } for resp, err := range c.ListEvaluationResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEvaluationClient_ListEvaluations_all() { } for resp, err := range c.ListEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleEvaluationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/grounded_generation_client.go b/discoveryengine/apiv1beta/grounded_generation_client.go index e5e11ae2160c..fea2f946d6c7 100755 --- a/discoveryengine/apiv1beta/grounded_generation_client.go +++ b/discoveryengine/apiv1beta/grounded_generation_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -313,6 +312,8 @@ type groundedGenerationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGroundedGenerationClient creates a new grounded generation service client based on gRPC. @@ -339,6 +340,7 @@ func NewGroundedGenerationClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, groundedGenerationClient: discoveryenginepb.NewGroundedGenerationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -386,6 +388,8 @@ type groundedGenerationRESTClient struct { // Points back to the CallOptions field of the containing GroundedGenerationClient CallOptions **GroundedGenerationCallOptions + + logger *slog.Logger } // NewGroundedGenerationRESTClient creates a new grounded generation service rest client. @@ -403,6 +407,7 @@ func NewGroundedGenerationRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -452,7 +457,9 @@ func (c *groundedGenerationGRPCClient) StreamGenerateGroundedContent(ctx context opts = append((*c.CallOptions).StreamGenerateGroundedContent[0:len((*c.CallOptions).StreamGenerateGroundedContent):len((*c.CallOptions).StreamGenerateGroundedContent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamGenerateGroundedContent") resp, err = c.groundedGenerationClient.StreamGenerateGroundedContent(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamGenerateGroundedContent") return err }, opts...) if err != nil { @@ -470,7 +477,7 @@ func (c *groundedGenerationGRPCClient) GenerateGroundedContent(ctx context.Conte var resp *discoveryenginepb.GenerateGroundedContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groundedGenerationClient.GenerateGroundedContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groundedGenerationClient.GenerateGroundedContent, req, settings.GRPC, c.logger, "GenerateGroundedContent") return err }, opts...) if err != nil { @@ -488,7 +495,7 @@ func (c *groundedGenerationGRPCClient) CheckGrounding(ctx context.Context, req * var resp *discoveryenginepb.CheckGroundingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groundedGenerationClient.CheckGrounding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groundedGenerationClient.CheckGrounding, req, settings.GRPC, c.logger, "CheckGrounding") return err }, opts...) if err != nil { @@ -505,7 +512,7 @@ func (c *groundedGenerationGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -520,7 +527,7 @@ func (c *groundedGenerationGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -549,7 +556,7 @@ func (c *groundedGenerationGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -621,17 +628,7 @@ func (c *groundedGenerationRESTClient) GenerateGroundedContent(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateGroundedContent") if err != nil { return err } @@ -687,17 +684,7 @@ func (c *groundedGenerationRESTClient) CheckGrounding(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckGrounding") if err != nil { return err } @@ -750,15 +737,8 @@ func (c *groundedGenerationRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -795,17 +775,7 @@ func (c *groundedGenerationRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -870,21 +840,10 @@ func (c *groundedGenerationRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/grounded_generation_client_example_go123_test.go b/discoveryengine/apiv1beta/grounded_generation_client_example_go123_test.go index a3b892785b4c..96fb118c9dcb 100644 --- a/discoveryengine/apiv1beta/grounded_generation_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/grounded_generation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGroundedGenerationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/helpers.go b/discoveryengine/apiv1beta/helpers.go index 92697c843781..bbd882c8f9de 100755 --- a/discoveryengine/apiv1beta/helpers.go +++ b/discoveryengine/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package discoveryengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "discoveryengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/discoveryengine/apiv1beta/project_client.go b/discoveryengine/apiv1beta/project_client.go index 6d2cf9d4b115..e8a2d6a95ebc 100755 --- a/discoveryengine/apiv1beta/project_client.go +++ b/discoveryengine/apiv1beta/project_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -276,6 +275,8 @@ type projectGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectClient creates a new project service client based on gRPC. @@ -303,6 +304,7 @@ func NewProjectClient(ctx context.Context, opts ...option.ClientOption) (*Projec connPool: connPool, projectClient: discoveryenginepb.NewProjectServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -366,6 +368,8 @@ type projectRESTClient struct { // Points back to the CallOptions field of the containing ProjectClient CallOptions **ProjectCallOptions + + logger *slog.Logger } // NewProjectRESTClient creates a new project service rest client. @@ -384,6 +388,7 @@ func NewProjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -446,7 +451,7 @@ func (c *projectGRPCClient) ProvisionProject(ctx context.Context, req *discovery var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.ProvisionProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.ProvisionProject, req, settings.GRPC, c.logger, "ProvisionProject") return err }, opts...) if err != nil { @@ -465,7 +470,7 @@ func (c *projectGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -480,7 +485,7 @@ func (c *projectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -509,7 +514,7 @@ func (c *projectGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -578,21 +583,10 @@ func (c *projectRESTClient) ProvisionProject(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvisionProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -646,15 +640,8 @@ func (c *projectRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -691,17 +678,7 @@ func (c *projectRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -766,21 +743,10 @@ func (c *projectRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/project_client_example_go123_test.go b/discoveryengine/apiv1beta/project_client_example_go123_test.go index 12e560f6361c..db8645a349e3 100644 --- a/discoveryengine/apiv1beta/project_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/project_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/rank_client.go b/discoveryengine/apiv1beta/rank_client.go index 13df616b18cb..15d2d56a3034 100755 --- a/discoveryengine/apiv1beta/rank_client.go +++ b/discoveryengine/apiv1beta/rank_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type rankGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRankClient creates a new rank service client based on gRPC. @@ -277,6 +278,7 @@ func NewRankClient(ctx context.Context, opts ...option.ClientOption) (*RankClien connPool: connPool, rankClient: discoveryenginepb.NewRankServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type rankRESTClient struct { // Points back to the CallOptions field of the containing RankClient CallOptions **RankCallOptions + + logger *slog.Logger } // NewRankRESTClient creates a new rank service rest client. @@ -341,6 +345,7 @@ func NewRankRESTClient(ctx context.Context, opts ...option.ClientOption) (*RankC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *rankGRPCClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe var resp *discoveryenginepb.RankResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.rankClient.Rank(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.rankClient.Rank, req, settings.GRPC, c.logger, "Rank") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *rankGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *rankGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *rankGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *rankRESTClient) Rank(ctx context.Context, req *discoveryenginepb.RankRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Rank") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *rankRESTClient) CancelOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *rankRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *rankRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/rank_client_example_go123_test.go b/discoveryengine/apiv1beta/rank_client_example_go123_test.go index bdec4675703f..48e4f9441039 100644 --- a/discoveryengine/apiv1beta/rank_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/rank_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRankClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/recommendation_client.go b/discoveryengine/apiv1beta/recommendation_client.go index 11e363ed1816..6294a926b255 100755 --- a/discoveryengine/apiv1beta/recommendation_client.go +++ b/discoveryengine/apiv1beta/recommendation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -251,6 +250,8 @@ type recommendationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRecommendationClient creates a new recommendation service client based on gRPC. @@ -277,6 +278,7 @@ func NewRecommendationClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, recommendationClient: discoveryenginepb.NewRecommendationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -324,6 +326,8 @@ type recommendationRESTClient struct { // Points back to the CallOptions field of the containing RecommendationClient CallOptions **RecommendationCallOptions + + logger *slog.Logger } // NewRecommendationRESTClient creates a new recommendation service rest client. @@ -341,6 +345,7 @@ func NewRecommendationRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *recommendationGRPCClient) Recommend(ctx context.Context, req *discovery var resp *discoveryenginepb.RecommendResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.recommendationClient.Recommend(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.recommendationClient.Recommend, req, settings.GRPC, c.logger, "Recommend") return err }, opts...) if err != nil { @@ -410,7 +415,7 @@ func (c *recommendationGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -425,7 +430,7 @@ func (c *recommendationGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *recommendationGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -519,17 +524,7 @@ func (c *recommendationRESTClient) Recommend(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recommend") if err != nil { return err } @@ -582,15 +577,8 @@ func (c *recommendationRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -627,17 +615,7 @@ func (c *recommendationRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -702,21 +680,10 @@ func (c *recommendationRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/recommendation_client_example_go123_test.go b/discoveryengine/apiv1beta/recommendation_client_example_go123_test.go index 61ffbbc7f0e2..894241b2877e 100644 --- a/discoveryengine/apiv1beta/recommendation_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/recommendation_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRecommendationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/sample_query_client.go b/discoveryengine/apiv1beta/sample_query_client.go index 768f29c519f5..ad453f6b89c8 100755 --- a/discoveryengine/apiv1beta/sample_query_client.go +++ b/discoveryengine/apiv1beta/sample_query_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -428,6 +427,8 @@ type sampleQueryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSampleQueryClient creates a new sample query service client based on gRPC. @@ -455,6 +456,7 @@ func NewSampleQueryClient(ctx context.Context, opts ...option.ClientOption) (*Sa connPool: connPool, sampleQueryClient: discoveryenginepb.NewSampleQueryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -518,6 +520,8 @@ type sampleQueryRESTClient struct { // Points back to the CallOptions field of the containing SampleQueryClient CallOptions **SampleQueryCallOptions + + logger *slog.Logger } // NewSampleQueryRESTClient creates a new sample query service rest client. @@ -536,6 +540,7 @@ func NewSampleQueryRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -598,7 +603,7 @@ func (c *sampleQueryGRPCClient) GetSampleQuery(ctx context.Context, req *discove var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.GetSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.GetSampleQuery, req, settings.GRPC, c.logger, "GetSampleQuery") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *sampleQueryGRPCClient) ListSampleQueries(ctx context.Context, req *disc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.ListSampleQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.ListSampleQueries, req, settings.GRPC, c.logger, "ListSampleQueries") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *sampleQueryGRPCClient) CreateSampleQuery(ctx context.Context, req *disc var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.CreateSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.CreateSampleQuery, req, settings.GRPC, c.logger, "CreateSampleQuery") return err }, opts...) if err != nil { @@ -680,7 +685,7 @@ func (c *sampleQueryGRPCClient) UpdateSampleQuery(ctx context.Context, req *disc var resp *discoveryenginepb.SampleQuery err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.UpdateSampleQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.UpdateSampleQuery, req, settings.GRPC, c.logger, "UpdateSampleQuery") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *sampleQueryGRPCClient) DeleteSampleQuery(ctx context.Context, req *disc opts = append((*c.CallOptions).DeleteSampleQuery[0:len((*c.CallOptions).DeleteSampleQuery):len((*c.CallOptions).DeleteSampleQuery)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sampleQueryClient.DeleteSampleQuery(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sampleQueryClient.DeleteSampleQuery, req, settings.GRPC, c.logger, "DeleteSampleQuery") return err }, opts...) return err @@ -712,7 +717,7 @@ func (c *sampleQueryGRPCClient) ImportSampleQueries(ctx context.Context, req *di var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQueryClient.ImportSampleQueries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQueryClient.ImportSampleQueries, req, settings.GRPC, c.logger, "ImportSampleQueries") return err }, opts...) if err != nil { @@ -731,7 +736,7 @@ func (c *sampleQueryGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -746,7 +751,7 @@ func (c *sampleQueryGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *sampleQueryGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -834,17 +839,7 @@ func (c *sampleQueryRESTClient) GetSampleQuery(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSampleQuery") if err != nil { return err } @@ -907,21 +902,10 @@ func (c *sampleQueryRESTClient) ListSampleQueries(ctx context.Context, req *disc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSampleQueries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -992,17 +976,7 @@ func (c *sampleQueryRESTClient) CreateSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSampleQuery") if err != nil { return err } @@ -1066,17 +1040,7 @@ func (c *sampleQueryRESTClient) UpdateSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSampleQuery") if err != nil { return err } @@ -1123,15 +1087,8 @@ func (c *sampleQueryRESTClient) DeleteSampleQuery(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSampleQuery") + return err }, opts...) } @@ -1179,21 +1136,10 @@ func (c *sampleQueryRESTClient) ImportSampleQueries(ctx context.Context, req *di httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSampleQueries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1247,15 +1193,8 @@ func (c *sampleQueryRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1292,17 +1231,7 @@ func (c *sampleQueryRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1367,21 +1296,10 @@ func (c *sampleQueryRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/sample_query_client_example_go123_test.go b/discoveryengine/apiv1beta/sample_query_client_example_go123_test.go index d078fbde9f6b..8d9ea08d7b20 100644 --- a/discoveryengine/apiv1beta/sample_query_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/sample_query_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSampleQueryClient_ListSampleQueries_all() { } for resp, err := range c.ListSampleQueries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSampleQueryClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/sample_query_set_client.go b/discoveryengine/apiv1beta/sample_query_set_client.go index 668d2e5ddb0b..65682a34a54f 100755 --- a/discoveryengine/apiv1beta/sample_query_set_client.go +++ b/discoveryengine/apiv1beta/sample_query_set_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -377,6 +376,8 @@ type sampleQuerySetGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSampleQuerySetClient creates a new sample query set service client based on gRPC. @@ -404,6 +405,7 @@ func NewSampleQuerySetClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, sampleQuerySetClient: discoveryenginepb.NewSampleQuerySetServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -451,6 +453,8 @@ type sampleQuerySetRESTClient struct { // Points back to the CallOptions field of the containing SampleQuerySetClient CallOptions **SampleQuerySetCallOptions + + logger *slog.Logger } // NewSampleQuerySetRESTClient creates a new sample query set service rest client. @@ -469,6 +473,7 @@ func NewSampleQuerySetRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -521,7 +526,7 @@ func (c *sampleQuerySetGRPCClient) GetSampleQuerySet(ctx context.Context, req *d var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.GetSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.GetSampleQuerySet, req, settings.GRPC, c.logger, "GetSampleQuerySet") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *sampleQuerySetGRPCClient) ListSampleQuerySets(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.ListSampleQuerySets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.ListSampleQuerySets, req, settings.GRPC, c.logger, "ListSampleQuerySets") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *sampleQuerySetGRPCClient) CreateSampleQuerySet(ctx context.Context, req var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.CreateSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.CreateSampleQuerySet, req, settings.GRPC, c.logger, "CreateSampleQuerySet") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *sampleQuerySetGRPCClient) UpdateSampleQuerySet(ctx context.Context, req var resp *discoveryenginepb.SampleQuerySet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.sampleQuerySetClient.UpdateSampleQuerySet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.sampleQuerySetClient.UpdateSampleQuerySet, req, settings.GRPC, c.logger, "UpdateSampleQuerySet") return err }, opts...) if err != nil { @@ -620,7 +625,7 @@ func (c *sampleQuerySetGRPCClient) DeleteSampleQuerySet(ctx context.Context, req opts = append((*c.CallOptions).DeleteSampleQuerySet[0:len((*c.CallOptions).DeleteSampleQuerySet):len((*c.CallOptions).DeleteSampleQuerySet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.sampleQuerySetClient.DeleteSampleQuerySet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.sampleQuerySetClient.DeleteSampleQuerySet, req, settings.GRPC, c.logger, "DeleteSampleQuerySet") return err }, opts...) return err @@ -634,7 +639,7 @@ func (c *sampleQuerySetGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -649,7 +654,7 @@ func (c *sampleQuerySetGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *sampleQuerySetGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -738,17 +743,7 @@ func (c *sampleQuerySetRESTClient) GetSampleQuerySet(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSampleQuerySet") if err != nil { return err } @@ -811,21 +806,10 @@ func (c *sampleQuerySetRESTClient) ListSampleQuerySets(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSampleQuerySets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -897,17 +881,7 @@ func (c *sampleQuerySetRESTClient) CreateSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSampleQuerySet") if err != nil { return err } @@ -972,17 +946,7 @@ func (c *sampleQuerySetRESTClient) UpdateSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSampleQuerySet") if err != nil { return err } @@ -1030,15 +994,8 @@ func (c *sampleQuerySetRESTClient) DeleteSampleQuerySet(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSampleQuerySet") + return err }, opts...) } @@ -1078,15 +1035,8 @@ func (c *sampleQuerySetRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1123,17 +1073,7 @@ func (c *sampleQuerySetRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1198,21 +1138,10 @@ func (c *sampleQuerySetRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/sample_query_set_client_example_go123_test.go b/discoveryengine/apiv1beta/sample_query_set_client_example_go123_test.go index 3094af0793e7..556903880b34 100644 --- a/discoveryengine/apiv1beta/sample_query_set_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/sample_query_set_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSampleQuerySetClient_ListSampleQuerySets_all() { } for resp, err := range c.ListSampleQuerySets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSampleQuerySetClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/schema_client.go b/discoveryengine/apiv1beta/schema_client.go index 143b2c01eeeb..b159aa62e29a 100755 --- a/discoveryengine/apiv1beta/schema_client.go +++ b/discoveryengine/apiv1beta/schema_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -404,6 +403,8 @@ type schemaGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSchemaClient creates a new schema service client based on gRPC. @@ -430,6 +431,7 @@ func NewSchemaClient(ctx context.Context, opts ...option.ClientOption) (*SchemaC connPool: connPool, schemaClient: discoveryenginepb.NewSchemaServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -493,6 +495,8 @@ type schemaRESTClient struct { // Points back to the CallOptions field of the containing SchemaClient CallOptions **SchemaCallOptions + + logger *slog.Logger } // NewSchemaRESTClient creates a new schema service rest client. @@ -510,6 +514,7 @@ func NewSchemaRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sch endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -572,7 +577,7 @@ func (c *schemaGRPCClient) GetSchema(ctx context.Context, req *discoveryenginepb var resp *discoveryenginepb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.GetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.GetSchema, req, settings.GRPC, c.logger, "GetSchema") return err }, opts...) if err != nil { @@ -601,7 +606,7 @@ func (c *schemaGRPCClient) ListSchemas(ctx context.Context, req *discoveryengine } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ListSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ListSchemas, req, settings.GRPC, c.logger, "ListSchemas") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *schemaGRPCClient) CreateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.CreateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.CreateSchema, req, settings.GRPC, c.logger, "CreateSchema") return err }, opts...) if err != nil { @@ -656,7 +661,7 @@ func (c *schemaGRPCClient) UpdateSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.UpdateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.UpdateSchema, req, settings.GRPC, c.logger, "UpdateSchema") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *schemaGRPCClient) DeleteSchema(ctx context.Context, req *discoveryengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.DeleteSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.DeleteSchema, req, settings.GRPC, c.logger, "DeleteSchema") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *schemaGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -710,7 +715,7 @@ func (c *schemaGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *schemaGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -798,17 +803,7 @@ func (c *schemaRESTClient) GetSchema(ctx context.Context, req *discoveryenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSchema") if err != nil { return err } @@ -870,21 +865,10 @@ func (c *schemaRESTClient) ListSchemas(ctx context.Context, req *discoveryengine } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -954,21 +938,10 @@ func (c *schemaRESTClient) CreateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSchema") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1028,21 +1001,10 @@ func (c *schemaRESTClient) UpdateSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1092,21 +1054,10 @@ func (c *schemaRESTClient) DeleteSchema(ctx context.Context, req *discoveryengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchema") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,15 +1111,8 @@ func (c *schemaRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1205,17 +1149,7 @@ func (c *schemaRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1280,21 +1214,10 @@ func (c *schemaRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/schema_client_example_go123_test.go b/discoveryengine/apiv1beta/schema_client_example_go123_test.go index da33bb4338c0..28b8b6f4c076 100644 --- a/discoveryengine/apiv1beta/schema_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/schema_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSchemaClient_ListSchemas_all() { } for resp, err := range c.ListSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSchemaClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/search_client.go b/discoveryengine/apiv1beta/search_client.go index 75b40ba43730..4d04c196efa7 100755 --- a/discoveryengine/apiv1beta/search_client.go +++ b/discoveryengine/apiv1beta/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -293,6 +292,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -319,6 +320,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: discoveryenginepb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -366,6 +368,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -383,6 +387,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -446,7 +451,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *discoveryenginepb.Se } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -492,7 +497,7 @@ func (c *searchGRPCClient) SearchLite(ctx context.Context, req *discoveryenginep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.SearchLite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.SearchLite, req, settings.GRPC, c.logger, "SearchLite") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *searchGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -541,7 +546,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -570,7 +575,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -641,21 +646,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *discoveryenginepb.Se } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -742,21 +736,10 @@ func (c *searchRESTClient) SearchLite(ctx context.Context, req *discoveryenginep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchLite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -822,15 +805,8 @@ func (c *searchRESTClient) CancelOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -867,17 +843,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -942,21 +908,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/search_client_example_go123_test.go b/discoveryengine/apiv1beta/search_client_example_go123_test.go index edf719197d4b..f0b2087a7c63 100644 --- a/discoveryengine/apiv1beta/search_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_SearchLite_all() { } for resp, err := range c.SearchLite(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/search_tuning_client.go b/discoveryengine/apiv1beta/search_tuning_client.go index 64d789ebd945..582cfc875207 100755 --- a/discoveryengine/apiv1beta/search_tuning_client.go +++ b/discoveryengine/apiv1beta/search_tuning_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -258,6 +257,8 @@ type searchTuningGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchTuningClient creates a new search tuning service client based on gRPC. @@ -284,6 +285,7 @@ func NewSearchTuningClient(ctx context.Context, opts ...option.ClientOption) (*S connPool: connPool, searchTuningClient: discoveryenginepb.NewSearchTuningServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -347,6 +349,8 @@ type searchTuningRESTClient struct { // Points back to the CallOptions field of the containing SearchTuningClient CallOptions **SearchTuningCallOptions + + logger *slog.Logger } // NewSearchTuningRESTClient creates a new search tuning service rest client. @@ -364,6 +368,7 @@ func NewSearchTuningRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -426,7 +431,7 @@ func (c *searchTuningGRPCClient) TrainCustomModel(ctx context.Context, req *disc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.TrainCustomModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.TrainCustomModel, req, settings.GRPC, c.logger, "TrainCustomModel") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *searchTuningGRPCClient) ListCustomModels(ctx context.Context, req *disc var resp *discoveryenginepb.ListCustomModelsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchTuningClient.ListCustomModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchTuningClient.ListCustomModels, req, settings.GRPC, c.logger, "ListCustomModels") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *searchTuningGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -478,7 +483,7 @@ func (c *searchTuningGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *searchTuningGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -571,21 +576,10 @@ func (c *searchTuningRESTClient) TrainCustomModel(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainCustomModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -636,17 +630,7 @@ func (c *searchTuningRESTClient) ListCustomModels(ctx context.Context, req *disc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomModels") if err != nil { return err } @@ -699,15 +683,8 @@ func (c *searchTuningRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -744,17 +721,7 @@ func (c *searchTuningRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -819,21 +786,10 @@ func (c *searchTuningRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/search_tuning_client_example_go123_test.go b/discoveryengine/apiv1beta/search_tuning_client_example_go123_test.go index 027f37106f83..4f5d765a886d 100644 --- a/discoveryengine/apiv1beta/search_tuning_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/search_tuning_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSearchTuningClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/serving_config_client.go b/discoveryengine/apiv1beta/serving_config_client.go index 7cfd9cce7a5e..edf7934ddbbe 100755 --- a/discoveryengine/apiv1beta/serving_config_client.go +++ b/discoveryengine/apiv1beta/serving_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( discoveryenginepb "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type servingConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServingConfigClient creates a new serving config service client based on gRPC. @@ -280,6 +281,7 @@ func NewServingConfigClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, servingConfigClient: discoveryenginepb.NewServingConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -327,6 +329,8 @@ type servingConfigRESTClient struct { // Points back to the CallOptions field of the containing ServingConfigClient CallOptions **ServingConfigCallOptions + + logger *slog.Logger } // NewServingConfigRESTClient creates a new serving config service rest client. @@ -345,6 +349,7 @@ func NewServingConfigRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *servingConfigGRPCClient) UpdateServingConfig(ctx context.Context, req * var resp *discoveryenginepb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.UpdateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.UpdateServingConfig, req, settings.GRPC, c.logger, "UpdateServingConfig") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *servingConfigGRPCClient) GetServingConfig(ctx context.Context, req *dis var resp *discoveryenginepb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.GetServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.GetServingConfig, req, settings.GRPC, c.logger, "GetServingConfig") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *servingConfigGRPCClient) ListServingConfigs(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.ListServingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.ListServingConfigs, req, settings.GRPC, c.logger, "ListServingConfigs") return err }, opts...) if err != nil { @@ -478,7 +483,7 @@ func (c *servingConfigGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -493,7 +498,7 @@ func (c *servingConfigGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -522,7 +527,7 @@ func (c *servingConfigGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -597,17 +602,7 @@ func (c *servingConfigRESTClient) UpdateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServingConfig") if err != nil { return err } @@ -659,17 +654,7 @@ func (c *servingConfigRESTClient) GetServingConfig(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServingConfig") if err != nil { return err } @@ -731,21 +716,10 @@ func (c *servingConfigRESTClient) ListServingConfigs(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServingConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -811,15 +785,8 @@ func (c *servingConfigRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -856,17 +823,7 @@ func (c *servingConfigRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -931,21 +888,10 @@ func (c *servingConfigRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/serving_config_client_example_go123_test.go b/discoveryengine/apiv1beta/serving_config_client_example_go123_test.go index 9f3b9fb740f9..aa23514c11f5 100644 --- a/discoveryengine/apiv1beta/serving_config_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/serving_config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServingConfigClient_ListServingConfigs_all() { } for resp, err := range c.ListServingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServingConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/site_search_engine_client.go b/discoveryengine/apiv1beta/site_search_engine_client.go index f395410a176e..43d50ddd62be 100755 --- a/discoveryengine/apiv1beta/site_search_engine_client.go +++ b/discoveryengine/apiv1beta/site_search_engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -446,6 +445,8 @@ type siteSearchEngineGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSiteSearchEngineClient creates a new site search engine service client based on gRPC. @@ -472,6 +473,7 @@ func NewSiteSearchEngineClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, siteSearchEngineClient: discoveryenginepb.NewSiteSearchEngineServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -535,6 +537,8 @@ type siteSearchEngineRESTClient struct { // Points back to the CallOptions field of the containing SiteSearchEngineClient CallOptions **SiteSearchEngineCallOptions + + logger *slog.Logger } // NewSiteSearchEngineRESTClient creates a new site search engine service rest client. @@ -552,6 +556,7 @@ func NewSiteSearchEngineRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -614,7 +619,7 @@ func (c *siteSearchEngineGRPCClient) GetSiteSearchEngine(ctx context.Context, re var resp *discoveryenginepb.SiteSearchEngine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetSiteSearchEngine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetSiteSearchEngine, req, settings.GRPC, c.logger, "GetSiteSearchEngine") return err }, opts...) if err != nil { @@ -632,7 +637,7 @@ func (c *siteSearchEngineGRPCClient) CreateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.CreateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.CreateTargetSite, req, settings.GRPC, c.logger, "CreateTargetSite") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *siteSearchEngineGRPCClient) BatchCreateTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchCreateTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchCreateTargetSites, req, settings.GRPC, c.logger, "BatchCreateTargetSites") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *siteSearchEngineGRPCClient) GetTargetSite(ctx context.Context, req *dis var resp *discoveryenginepb.TargetSite err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.GetTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.GetTargetSite, req, settings.GRPC, c.logger, "GetTargetSite") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *siteSearchEngineGRPCClient) UpdateTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.UpdateTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.UpdateTargetSite, req, settings.GRPC, c.logger, "UpdateTargetSite") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *siteSearchEngineGRPCClient) DeleteTargetSite(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DeleteTargetSite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DeleteTargetSite, req, settings.GRPC, c.logger, "DeleteTargetSite") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *siteSearchEngineGRPCClient) ListTargetSites(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.ListTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.ListTargetSites, req, settings.GRPC, c.logger, "ListTargetSites") return err }, opts...) if err != nil { @@ -776,7 +781,7 @@ func (c *siteSearchEngineGRPCClient) CreateSitemap(ctx context.Context, req *dis var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.CreateSitemap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.CreateSitemap, req, settings.GRPC, c.logger, "CreateSitemap") return err }, opts...) if err != nil { @@ -796,7 +801,7 @@ func (c *siteSearchEngineGRPCClient) DeleteSitemap(ctx context.Context, req *dis var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DeleteSitemap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DeleteSitemap, req, settings.GRPC, c.logger, "DeleteSitemap") return err }, opts...) if err != nil { @@ -816,7 +821,7 @@ func (c *siteSearchEngineGRPCClient) FetchSitemaps(ctx context.Context, req *dis var resp *discoveryenginepb.FetchSitemapsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.FetchSitemaps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.FetchSitemaps, req, settings.GRPC, c.logger, "FetchSitemaps") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *siteSearchEngineGRPCClient) EnableAdvancedSiteSearch(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.EnableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.EnableAdvancedSiteSearch, req, settings.GRPC, c.logger, "EnableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -854,7 +859,7 @@ func (c *siteSearchEngineGRPCClient) DisableAdvancedSiteSearch(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.DisableAdvancedSiteSearch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.DisableAdvancedSiteSearch, req, settings.GRPC, c.logger, "DisableAdvancedSiteSearch") return err }, opts...) if err != nil { @@ -874,7 +879,7 @@ func (c *siteSearchEngineGRPCClient) RecrawlUris(ctx context.Context, req *disco var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.RecrawlUris(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.RecrawlUris, req, settings.GRPC, c.logger, "RecrawlUris") return err }, opts...) if err != nil { @@ -894,7 +899,7 @@ func (c *siteSearchEngineGRPCClient) BatchVerifyTargetSites(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.BatchVerifyTargetSites(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.BatchVerifyTargetSites, req, settings.GRPC, c.logger, "BatchVerifyTargetSites") return err }, opts...) if err != nil { @@ -925,7 +930,7 @@ func (c *siteSearchEngineGRPCClient) FetchDomainVerificationStatus(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.siteSearchEngineClient.FetchDomainVerificationStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.siteSearchEngineClient.FetchDomainVerificationStatus, req, settings.GRPC, c.logger, "FetchDomainVerificationStatus") return err }, opts...) if err != nil { @@ -959,7 +964,7 @@ func (c *siteSearchEngineGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -974,7 +979,7 @@ func (c *siteSearchEngineGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *siteSearchEngineGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1063,17 +1068,7 @@ func (c *siteSearchEngineRESTClient) GetSiteSearchEngine(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSiteSearchEngine") if err != nil { return err } @@ -1129,21 +1124,10 @@ func (c *siteSearchEngineRESTClient) CreateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTargetSite") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1200,21 +1184,10 @@ func (c *siteSearchEngineRESTClient) BatchCreateTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1265,17 +1238,7 @@ func (c *siteSearchEngineRESTClient) GetTargetSite(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTargetSite") if err != nil { return err } @@ -1331,21 +1294,10 @@ func (c *siteSearchEngineRESTClient) UpdateTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTargetSite") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1395,21 +1347,10 @@ func (c *siteSearchEngineRESTClient) DeleteTargetSite(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTargetSite") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1473,21 +1414,10 @@ func (c *siteSearchEngineRESTClient) ListTargetSites(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1556,21 +1486,10 @@ func (c *siteSearchEngineRESTClient) CreateSitemap(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSitemap") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1620,21 +1539,10 @@ func (c *siteSearchEngineRESTClient) DeleteSitemap(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSitemap") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1691,17 +1599,7 @@ func (c *siteSearchEngineRESTClient) FetchSitemaps(ctx context.Context, req *dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchSitemaps") if err != nil { return err } @@ -1756,21 +1654,10 @@ func (c *siteSearchEngineRESTClient) EnableAdvancedSiteSearch(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableAdvancedSiteSearch") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1826,21 +1713,10 @@ func (c *siteSearchEngineRESTClient) DisableAdvancedSiteSearch(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableAdvancedSiteSearch") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1896,21 +1772,10 @@ func (c *siteSearchEngineRESTClient) RecrawlUris(ctx context.Context, req *disco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RecrawlUris") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1968,21 +1833,10 @@ func (c *siteSearchEngineRESTClient) BatchVerifyTargetSites(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchVerifyTargetSites") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2047,21 +1901,10 @@ func (c *siteSearchEngineRESTClient) FetchDomainVerificationStatus(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchDomainVerificationStatus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2127,15 +1970,8 @@ func (c *siteSearchEngineRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2172,17 +2008,7 @@ func (c *siteSearchEngineRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2247,21 +2073,10 @@ func (c *siteSearchEngineRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/site_search_engine_client_example_go123_test.go b/discoveryengine/apiv1beta/site_search_engine_client_example_go123_test.go index 614831ad46da..4c26c1b39b71 100644 --- a/discoveryengine/apiv1beta/site_search_engine_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/site_search_engine_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSiteSearchEngineClient_FetchDomainVerificationStatus_all() { } for resp, err := range c.FetchDomainVerificationStatus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSiteSearchEngineClient_ListTargetSites_all() { } for resp, err := range c.ListTargetSites(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleSiteSearchEngineClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/discoveryengine/apiv1beta/user_event_client.go b/discoveryengine/apiv1beta/user_event_client.go index a2929b2d9f96..b59210e75ead 100755 --- a/discoveryengine/apiv1beta/user_event_client.go +++ b/discoveryengine/apiv1beta/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -381,6 +380,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -407,6 +408,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: discoveryenginepb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -470,6 +472,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -487,6 +491,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -549,7 +554,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *discovery var resp *discoveryenginepb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -567,7 +572,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *discove var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *discover var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *discove var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *userEventGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -639,7 +644,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -737,17 +742,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *discovery httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -807,17 +802,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -876,21 +861,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *discover httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -952,21 +926,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *discove httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1020,15 +983,8 @@ func (c *userEventRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1065,17 +1021,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1140,21 +1086,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/discoveryengine/apiv1beta/user_event_client_example_go123_test.go b/discoveryengine/apiv1beta/user_event_client_example_go123_test.go index 968923d802c9..86b4813b2c6d 100644 --- a/discoveryengine/apiv1beta/user_event_client_example_go123_test.go +++ b/discoveryengine/apiv1beta/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dlp/apiv2/dlp_client.go b/dlp/apiv2/dlp_client.go index e81960781ad0..846b07c93e29 100755 --- a/dlp/apiv2/dlp_client.go +++ b/dlp/apiv2/dlp_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dlppb "cloud.google.com/go/dlp/apiv2/dlppb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1565,6 +1564,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new dlp service client based on gRPC. @@ -1595,6 +1596,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: dlppb.NewDlpServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1641,6 +1643,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new dlp service rest client. @@ -1662,6 +1666,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1714,7 +1719,7 @@ func (c *gRPCClient) InspectContent(ctx context.Context, req *dlppb.InspectConte var resp *dlppb.InspectContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InspectContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InspectContent, req, settings.GRPC, c.logger, "InspectContent") return err }, opts...) if err != nil { @@ -1732,7 +1737,7 @@ func (c *gRPCClient) RedactImage(ctx context.Context, req *dlppb.RedactImageRequ var resp *dlppb.RedactImageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RedactImage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RedactImage, req, settings.GRPC, c.logger, "RedactImage") return err }, opts...) if err != nil { @@ -1750,7 +1755,7 @@ func (c *gRPCClient) DeidentifyContent(ctx context.Context, req *dlppb.Deidentif var resp *dlppb.DeidentifyContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeidentifyContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeidentifyContent, req, settings.GRPC, c.logger, "DeidentifyContent") return err }, opts...) if err != nil { @@ -1768,7 +1773,7 @@ func (c *gRPCClient) ReidentifyContent(ctx context.Context, req *dlppb.Reidentif var resp *dlppb.ReidentifyContentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReidentifyContent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReidentifyContent, req, settings.GRPC, c.logger, "ReidentifyContent") return err }, opts...) if err != nil { @@ -1786,7 +1791,7 @@ func (c *gRPCClient) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypes var resp *dlppb.ListInfoTypesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInfoTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInfoTypes, req, settings.GRPC, c.logger, "ListInfoTypes") return err }, opts...) if err != nil { @@ -1804,7 +1809,7 @@ func (c *gRPCClient) CreateInspectTemplate(ctx context.Context, req *dlppb.Creat var resp *dlppb.InspectTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInspectTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInspectTemplate, req, settings.GRPC, c.logger, "CreateInspectTemplate") return err }, opts...) if err != nil { @@ -1822,7 +1827,7 @@ func (c *gRPCClient) UpdateInspectTemplate(ctx context.Context, req *dlppb.Updat var resp *dlppb.InspectTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInspectTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInspectTemplate, req, settings.GRPC, c.logger, "UpdateInspectTemplate") return err }, opts...) if err != nil { @@ -1840,7 +1845,7 @@ func (c *gRPCClient) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspe var resp *dlppb.InspectTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInspectTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInspectTemplate, req, settings.GRPC, c.logger, "GetInspectTemplate") return err }, opts...) if err != nil { @@ -1869,7 +1874,7 @@ func (c *gRPCClient) ListInspectTemplates(ctx context.Context, req *dlppb.ListIn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInspectTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInspectTemplates, req, settings.GRPC, c.logger, "ListInspectTemplates") return err }, opts...) if err != nil { @@ -1903,7 +1908,7 @@ func (c *gRPCClient) DeleteInspectTemplate(ctx context.Context, req *dlppb.Delet opts = append((*c.CallOptions).DeleteInspectTemplate[0:len((*c.CallOptions).DeleteInspectTemplate):len((*c.CallOptions).DeleteInspectTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteInspectTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteInspectTemplate, req, settings.GRPC, c.logger, "DeleteInspectTemplate") return err }, opts...) return err @@ -1918,7 +1923,7 @@ func (c *gRPCClient) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.Cr var resp *dlppb.DeidentifyTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDeidentifyTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDeidentifyTemplate, req, settings.GRPC, c.logger, "CreateDeidentifyTemplate") return err }, opts...) if err != nil { @@ -1936,7 +1941,7 @@ func (c *gRPCClient) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.Up var resp *dlppb.DeidentifyTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDeidentifyTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDeidentifyTemplate, req, settings.GRPC, c.logger, "UpdateDeidentifyTemplate") return err }, opts...) if err != nil { @@ -1954,7 +1959,7 @@ func (c *gRPCClient) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDe var resp *dlppb.DeidentifyTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDeidentifyTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDeidentifyTemplate, req, settings.GRPC, c.logger, "GetDeidentifyTemplate") return err }, opts...) if err != nil { @@ -1983,7 +1988,7 @@ func (c *gRPCClient) ListDeidentifyTemplates(ctx context.Context, req *dlppb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeidentifyTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeidentifyTemplates, req, settings.GRPC, c.logger, "ListDeidentifyTemplates") return err }, opts...) if err != nil { @@ -2017,7 +2022,7 @@ func (c *gRPCClient) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.De opts = append((*c.CallOptions).DeleteDeidentifyTemplate[0:len((*c.CallOptions).DeleteDeidentifyTemplate):len((*c.CallOptions).DeleteDeidentifyTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDeidentifyTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDeidentifyTemplate, req, settings.GRPC, c.logger, "DeleteDeidentifyTemplate") return err }, opts...) return err @@ -2032,7 +2037,7 @@ func (c *gRPCClient) CreateJobTrigger(ctx context.Context, req *dlppb.CreateJobT var resp *dlppb.JobTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateJobTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateJobTrigger, req, settings.GRPC, c.logger, "CreateJobTrigger") return err }, opts...) if err != nil { @@ -2050,7 +2055,7 @@ func (c *gRPCClient) UpdateJobTrigger(ctx context.Context, req *dlppb.UpdateJobT var resp *dlppb.JobTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateJobTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateJobTrigger, req, settings.GRPC, c.logger, "UpdateJobTrigger") return err }, opts...) if err != nil { @@ -2068,7 +2073,7 @@ func (c *gRPCClient) HybridInspectJobTrigger(ctx context.Context, req *dlppb.Hyb var resp *dlppb.HybridInspectResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.HybridInspectJobTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.HybridInspectJobTrigger, req, settings.GRPC, c.logger, "HybridInspectJobTrigger") return err }, opts...) if err != nil { @@ -2086,7 +2091,7 @@ func (c *gRPCClient) GetJobTrigger(ctx context.Context, req *dlppb.GetJobTrigger var resp *dlppb.JobTrigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetJobTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetJobTrigger, req, settings.GRPC, c.logger, "GetJobTrigger") return err }, opts...) if err != nil { @@ -2115,7 +2120,7 @@ func (c *gRPCClient) ListJobTriggers(ctx context.Context, req *dlppb.ListJobTrig } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListJobTriggers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListJobTriggers, req, settings.GRPC, c.logger, "ListJobTriggers") return err }, opts...) if err != nil { @@ -2149,7 +2154,7 @@ func (c *gRPCClient) DeleteJobTrigger(ctx context.Context, req *dlppb.DeleteJobT opts = append((*c.CallOptions).DeleteJobTrigger[0:len((*c.CallOptions).DeleteJobTrigger):len((*c.CallOptions).DeleteJobTrigger)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteJobTrigger(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteJobTrigger, req, settings.GRPC, c.logger, "DeleteJobTrigger") return err }, opts...) return err @@ -2164,7 +2169,7 @@ func (c *gRPCClient) ActivateJobTrigger(ctx context.Context, req *dlppb.Activate var resp *dlppb.DlpJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ActivateJobTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ActivateJobTrigger, req, settings.GRPC, c.logger, "ActivateJobTrigger") return err }, opts...) if err != nil { @@ -2182,7 +2187,7 @@ func (c *gRPCClient) CreateDiscoveryConfig(ctx context.Context, req *dlppb.Creat var resp *dlppb.DiscoveryConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDiscoveryConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDiscoveryConfig, req, settings.GRPC, c.logger, "CreateDiscoveryConfig") return err }, opts...) if err != nil { @@ -2200,7 +2205,7 @@ func (c *gRPCClient) UpdateDiscoveryConfig(ctx context.Context, req *dlppb.Updat var resp *dlppb.DiscoveryConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDiscoveryConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDiscoveryConfig, req, settings.GRPC, c.logger, "UpdateDiscoveryConfig") return err }, opts...) if err != nil { @@ -2218,7 +2223,7 @@ func (c *gRPCClient) GetDiscoveryConfig(ctx context.Context, req *dlppb.GetDisco var resp *dlppb.DiscoveryConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDiscoveryConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDiscoveryConfig, req, settings.GRPC, c.logger, "GetDiscoveryConfig") return err }, opts...) if err != nil { @@ -2247,7 +2252,7 @@ func (c *gRPCClient) ListDiscoveryConfigs(ctx context.Context, req *dlppb.ListDi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDiscoveryConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDiscoveryConfigs, req, settings.GRPC, c.logger, "ListDiscoveryConfigs") return err }, opts...) if err != nil { @@ -2281,7 +2286,7 @@ func (c *gRPCClient) DeleteDiscoveryConfig(ctx context.Context, req *dlppb.Delet opts = append((*c.CallOptions).DeleteDiscoveryConfig[0:len((*c.CallOptions).DeleteDiscoveryConfig):len((*c.CallOptions).DeleteDiscoveryConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDiscoveryConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDiscoveryConfig, req, settings.GRPC, c.logger, "DeleteDiscoveryConfig") return err }, opts...) return err @@ -2296,7 +2301,7 @@ func (c *gRPCClient) CreateDlpJob(ctx context.Context, req *dlppb.CreateDlpJobRe var resp *dlppb.DlpJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDlpJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDlpJob, req, settings.GRPC, c.logger, "CreateDlpJob") return err }, opts...) if err != nil { @@ -2325,7 +2330,7 @@ func (c *gRPCClient) ListDlpJobs(ctx context.Context, req *dlppb.ListDlpJobsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDlpJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDlpJobs, req, settings.GRPC, c.logger, "ListDlpJobs") return err }, opts...) if err != nil { @@ -2360,7 +2365,7 @@ func (c *gRPCClient) GetDlpJob(ctx context.Context, req *dlppb.GetDlpJobRequest, var resp *dlppb.DlpJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDlpJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDlpJob, req, settings.GRPC, c.logger, "GetDlpJob") return err }, opts...) if err != nil { @@ -2377,7 +2382,7 @@ func (c *gRPCClient) DeleteDlpJob(ctx context.Context, req *dlppb.DeleteDlpJobRe opts = append((*c.CallOptions).DeleteDlpJob[0:len((*c.CallOptions).DeleteDlpJob):len((*c.CallOptions).DeleteDlpJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDlpJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDlpJob, req, settings.GRPC, c.logger, "DeleteDlpJob") return err }, opts...) return err @@ -2391,7 +2396,7 @@ func (c *gRPCClient) CancelDlpJob(ctx context.Context, req *dlppb.CancelDlpJobRe opts = append((*c.CallOptions).CancelDlpJob[0:len((*c.CallOptions).CancelDlpJob):len((*c.CallOptions).CancelDlpJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.CancelDlpJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.CancelDlpJob, req, settings.GRPC, c.logger, "CancelDlpJob") return err }, opts...) return err @@ -2406,7 +2411,7 @@ func (c *gRPCClient) CreateStoredInfoType(ctx context.Context, req *dlppb.Create var resp *dlppb.StoredInfoType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateStoredInfoType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateStoredInfoType, req, settings.GRPC, c.logger, "CreateStoredInfoType") return err }, opts...) if err != nil { @@ -2424,7 +2429,7 @@ func (c *gRPCClient) UpdateStoredInfoType(ctx context.Context, req *dlppb.Update var resp *dlppb.StoredInfoType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateStoredInfoType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateStoredInfoType, req, settings.GRPC, c.logger, "UpdateStoredInfoType") return err }, opts...) if err != nil { @@ -2442,7 +2447,7 @@ func (c *gRPCClient) GetStoredInfoType(ctx context.Context, req *dlppb.GetStored var resp *dlppb.StoredInfoType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetStoredInfoType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetStoredInfoType, req, settings.GRPC, c.logger, "GetStoredInfoType") return err }, opts...) if err != nil { @@ -2471,7 +2476,7 @@ func (c *gRPCClient) ListStoredInfoTypes(ctx context.Context, req *dlppb.ListSto } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListStoredInfoTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListStoredInfoTypes, req, settings.GRPC, c.logger, "ListStoredInfoTypes") return err }, opts...) if err != nil { @@ -2505,7 +2510,7 @@ func (c *gRPCClient) DeleteStoredInfoType(ctx context.Context, req *dlppb.Delete opts = append((*c.CallOptions).DeleteStoredInfoType[0:len((*c.CallOptions).DeleteStoredInfoType):len((*c.CallOptions).DeleteStoredInfoType)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteStoredInfoType(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteStoredInfoType, req, settings.GRPC, c.logger, "DeleteStoredInfoType") return err }, opts...) return err @@ -2531,7 +2536,7 @@ func (c *gRPCClient) ListProjectDataProfiles(ctx context.Context, req *dlppb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListProjectDataProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListProjectDataProfiles, req, settings.GRPC, c.logger, "ListProjectDataProfiles") return err }, opts...) if err != nil { @@ -2577,7 +2582,7 @@ func (c *gRPCClient) ListTableDataProfiles(ctx context.Context, req *dlppb.ListT } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTableDataProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTableDataProfiles, req, settings.GRPC, c.logger, "ListTableDataProfiles") return err }, opts...) if err != nil { @@ -2623,7 +2628,7 @@ func (c *gRPCClient) ListColumnDataProfiles(ctx context.Context, req *dlppb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListColumnDataProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListColumnDataProfiles, req, settings.GRPC, c.logger, "ListColumnDataProfiles") return err }, opts...) if err != nil { @@ -2658,7 +2663,7 @@ func (c *gRPCClient) GetProjectDataProfile(ctx context.Context, req *dlppb.GetPr var resp *dlppb.ProjectDataProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProjectDataProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProjectDataProfile, req, settings.GRPC, c.logger, "GetProjectDataProfile") return err }, opts...) if err != nil { @@ -2687,7 +2692,7 @@ func (c *gRPCClient) ListFileStoreDataProfiles(ctx context.Context, req *dlppb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFileStoreDataProfiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFileStoreDataProfiles, req, settings.GRPC, c.logger, "ListFileStoreDataProfiles") return err }, opts...) if err != nil { @@ -2722,7 +2727,7 @@ func (c *gRPCClient) GetFileStoreDataProfile(ctx context.Context, req *dlppb.Get var resp *dlppb.FileStoreDataProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFileStoreDataProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFileStoreDataProfile, req, settings.GRPC, c.logger, "GetFileStoreDataProfile") return err }, opts...) if err != nil { @@ -2739,7 +2744,7 @@ func (c *gRPCClient) DeleteFileStoreDataProfile(ctx context.Context, req *dlppb. opts = append((*c.CallOptions).DeleteFileStoreDataProfile[0:len((*c.CallOptions).DeleteFileStoreDataProfile):len((*c.CallOptions).DeleteFileStoreDataProfile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteFileStoreDataProfile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteFileStoreDataProfile, req, settings.GRPC, c.logger, "DeleteFileStoreDataProfile") return err }, opts...) return err @@ -2754,7 +2759,7 @@ func (c *gRPCClient) GetTableDataProfile(ctx context.Context, req *dlppb.GetTabl var resp *dlppb.TableDataProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTableDataProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTableDataProfile, req, settings.GRPC, c.logger, "GetTableDataProfile") return err }, opts...) if err != nil { @@ -2772,7 +2777,7 @@ func (c *gRPCClient) GetColumnDataProfile(ctx context.Context, req *dlppb.GetCol var resp *dlppb.ColumnDataProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetColumnDataProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetColumnDataProfile, req, settings.GRPC, c.logger, "GetColumnDataProfile") return err }, opts...) if err != nil { @@ -2789,7 +2794,7 @@ func (c *gRPCClient) DeleteTableDataProfile(ctx context.Context, req *dlppb.Dele opts = append((*c.CallOptions).DeleteTableDataProfile[0:len((*c.CallOptions).DeleteTableDataProfile):len((*c.CallOptions).DeleteTableDataProfile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTableDataProfile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTableDataProfile, req, settings.GRPC, c.logger, "DeleteTableDataProfile") return err }, opts...) return err @@ -2804,7 +2809,7 @@ func (c *gRPCClient) HybridInspectDlpJob(ctx context.Context, req *dlppb.HybridI var resp *dlppb.HybridInspectResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.HybridInspectDlpJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.HybridInspectDlpJob, req, settings.GRPC, c.logger, "HybridInspectDlpJob") return err }, opts...) if err != nil { @@ -2821,7 +2826,7 @@ func (c *gRPCClient) FinishDlpJob(ctx context.Context, req *dlppb.FinishDlpJobRe opts = append((*c.CallOptions).FinishDlpJob[0:len((*c.CallOptions).FinishDlpJob):len((*c.CallOptions).FinishDlpJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.FinishDlpJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.FinishDlpJob, req, settings.GRPC, c.logger, "FinishDlpJob") return err }, opts...) return err @@ -2836,7 +2841,7 @@ func (c *gRPCClient) CreateConnection(ctx context.Context, req *dlppb.CreateConn var resp *dlppb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnection, req, settings.GRPC, c.logger, "CreateConnection") return err }, opts...) if err != nil { @@ -2854,7 +2859,7 @@ func (c *gRPCClient) GetConnection(ctx context.Context, req *dlppb.GetConnection var resp *dlppb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnection, req, settings.GRPC, c.logger, "GetConnection") return err }, opts...) if err != nil { @@ -2883,7 +2888,7 @@ func (c *gRPCClient) ListConnections(ctx context.Context, req *dlppb.ListConnect } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnections, req, settings.GRPC, c.logger, "ListConnections") return err }, opts...) if err != nil { @@ -2929,7 +2934,7 @@ func (c *gRPCClient) SearchConnections(ctx context.Context, req *dlppb.SearchCon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchConnections, req, settings.GRPC, c.logger, "SearchConnections") return err }, opts...) if err != nil { @@ -2963,7 +2968,7 @@ func (c *gRPCClient) DeleteConnection(ctx context.Context, req *dlppb.DeleteConn opts = append((*c.CallOptions).DeleteConnection[0:len((*c.CallOptions).DeleteConnection):len((*c.CallOptions).DeleteConnection)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteConnection(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteConnection, req, settings.GRPC, c.logger, "DeleteConnection") return err }, opts...) return err @@ -2978,7 +2983,7 @@ func (c *gRPCClient) UpdateConnection(ctx context.Context, req *dlppb.UpdateConn var resp *dlppb.Connection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConnection, req, settings.GRPC, c.logger, "UpdateConnection") return err }, opts...) if err != nil { @@ -3036,17 +3041,7 @@ func (c *restClient) InspectContent(ctx context.Context, req *dlppb.InspectConte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InspectContent") if err != nil { return err } @@ -3110,17 +3105,7 @@ func (c *restClient) RedactImage(ctx context.Context, req *dlppb.RedactImageRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RedactImage") if err != nil { return err } @@ -3184,17 +3169,7 @@ func (c *restClient) DeidentifyContent(ctx context.Context, req *dlppb.Deidentif httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeidentifyContent") if err != nil { return err } @@ -3253,17 +3228,7 @@ func (c *restClient) ReidentifyContent(ctx context.Context, req *dlppb.Reidentif httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReidentifyContent") if err != nil { return err } @@ -3328,17 +3293,7 @@ func (c *restClient) ListInfoTypes(ctx context.Context, req *dlppb.ListInfoTypes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInfoTypes") if err != nil { return err } @@ -3398,17 +3353,7 @@ func (c *restClient) CreateInspectTemplate(ctx context.Context, req *dlppb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInspectTemplate") if err != nil { return err } @@ -3467,17 +3412,7 @@ func (c *restClient) UpdateInspectTemplate(ctx context.Context, req *dlppb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInspectTemplate") if err != nil { return err } @@ -3530,17 +3465,7 @@ func (c *restClient) GetInspectTemplate(ctx context.Context, req *dlppb.GetInspe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInspectTemplate") if err != nil { return err } @@ -3611,21 +3536,10 @@ func (c *restClient) ListInspectTemplates(ctx context.Context, req *dlppb.ListIn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInspectTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3688,15 +3602,8 @@ func (c *restClient) DeleteInspectTemplate(ctx context.Context, req *dlppb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInspectTemplate") + return err }, opts...) } @@ -3743,17 +3650,7 @@ func (c *restClient) CreateDeidentifyTemplate(ctx context.Context, req *dlppb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeidentifyTemplate") if err != nil { return err } @@ -3812,17 +3709,7 @@ func (c *restClient) UpdateDeidentifyTemplate(ctx context.Context, req *dlppb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeidentifyTemplate") if err != nil { return err } @@ -3875,17 +3762,7 @@ func (c *restClient) GetDeidentifyTemplate(ctx context.Context, req *dlppb.GetDe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeidentifyTemplate") if err != nil { return err } @@ -3956,21 +3833,10 @@ func (c *restClient) ListDeidentifyTemplates(ctx context.Context, req *dlppb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeidentifyTemplates") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4033,15 +3899,8 @@ func (c *restClient) DeleteDeidentifyTemplate(ctx context.Context, req *dlppb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeidentifyTemplate") + return err }, opts...) } @@ -4088,17 +3947,7 @@ func (c *restClient) CreateJobTrigger(ctx context.Context, req *dlppb.CreateJobT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJobTrigger") if err != nil { return err } @@ -4157,17 +4006,7 @@ func (c *restClient) UpdateJobTrigger(ctx context.Context, req *dlppb.UpdateJobT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJobTrigger") if err != nil { return err } @@ -4225,17 +4064,7 @@ func (c *restClient) HybridInspectJobTrigger(ctx context.Context, req *dlppb.Hyb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "HybridInspectJobTrigger") if err != nil { return err } @@ -4288,17 +4117,7 @@ func (c *restClient) GetJobTrigger(ctx context.Context, req *dlppb.GetJobTrigger httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJobTrigger") if err != nil { return err } @@ -4375,21 +4194,10 @@ func (c *restClient) ListJobTriggers(ctx context.Context, req *dlppb.ListJobTrig } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobTriggers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4452,15 +4260,8 @@ func (c *restClient) DeleteJobTrigger(ctx context.Context, req *dlppb.DeleteJobT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJobTrigger") + return err }, opts...) } @@ -4504,17 +4305,7 @@ func (c *restClient) ActivateJobTrigger(ctx context.Context, req *dlppb.Activate httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ActivateJobTrigger") if err != nil { return err } @@ -4570,17 +4361,7 @@ func (c *restClient) CreateDiscoveryConfig(ctx context.Context, req *dlppb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDiscoveryConfig") if err != nil { return err } @@ -4636,17 +4417,7 @@ func (c *restClient) UpdateDiscoveryConfig(ctx context.Context, req *dlppb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDiscoveryConfig") if err != nil { return err } @@ -4696,17 +4467,7 @@ func (c *restClient) GetDiscoveryConfig(ctx context.Context, req *dlppb.GetDisco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDiscoveryConfig") if err != nil { return err } @@ -4771,21 +4532,10 @@ func (c *restClient) ListDiscoveryConfigs(ctx context.Context, req *dlppb.ListDi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDiscoveryConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4845,15 +4595,8 @@ func (c *restClient) DeleteDiscoveryConfig(ctx context.Context, req *dlppb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDiscoveryConfig") + return err }, opts...) } @@ -4905,17 +4648,7 @@ func (c *restClient) CreateDlpJob(ctx context.Context, req *dlppb.CreateDlpJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDlpJob") if err != nil { return err } @@ -4994,21 +4727,10 @@ func (c *restClient) ListDlpJobs(ctx context.Context, req *dlppb.ListDlpJobsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDlpJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5076,17 +4798,7 @@ func (c *restClient) GetDlpJob(ctx context.Context, req *dlppb.GetDlpJobRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDlpJob") if err != nil { return err } @@ -5140,15 +4852,8 @@ func (c *restClient) DeleteDlpJob(ctx context.Context, req *dlppb.DeleteDlpJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDlpJob") + return err }, opts...) } @@ -5195,15 +4900,8 @@ func (c *restClient) CancelDlpJob(ctx context.Context, req *dlppb.CancelDlpJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelDlpJob") + return err }, opts...) } @@ -5249,17 +4947,7 @@ func (c *restClient) CreateStoredInfoType(ctx context.Context, req *dlppb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStoredInfoType") if err != nil { return err } @@ -5319,17 +5007,7 @@ func (c *restClient) UpdateStoredInfoType(ctx context.Context, req *dlppb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStoredInfoType") if err != nil { return err } @@ -5382,17 +5060,7 @@ func (c *restClient) GetStoredInfoType(ctx context.Context, req *dlppb.GetStored httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStoredInfoType") if err != nil { return err } @@ -5463,21 +5131,10 @@ func (c *restClient) ListStoredInfoTypes(ctx context.Context, req *dlppb.ListSto } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStoredInfoTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5540,15 +5197,8 @@ func (c *restClient) DeleteStoredInfoType(ctx context.Context, req *dlppb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStoredInfoType") + return err }, opts...) } @@ -5603,21 +5253,10 @@ func (c *restClient) ListProjectDataProfiles(ctx context.Context, req *dlppb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProjectDataProfiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5698,21 +5337,10 @@ func (c *restClient) ListTableDataProfiles(ctx context.Context, req *dlppb.ListT } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTableDataProfiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5793,21 +5421,10 @@ func (c *restClient) ListColumnDataProfiles(ctx context.Context, req *dlppb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListColumnDataProfiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5870,17 +5487,7 @@ func (c *restClient) GetProjectDataProfile(ctx context.Context, req *dlppb.GetPr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProjectDataProfile") if err != nil { return err } @@ -5948,21 +5555,10 @@ func (c *restClient) ListFileStoreDataProfiles(ctx context.Context, req *dlppb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFileStoreDataProfiles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6025,17 +5621,7 @@ func (c *restClient) GetFileStoreDataProfile(ctx context.Context, req *dlppb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFileStoreDataProfile") if err != nil { return err } @@ -6083,15 +5669,8 @@ func (c *restClient) DeleteFileStoreDataProfile(ctx context.Context, req *dlppb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFileStoreDataProfile") + return err }, opts...) } @@ -6128,17 +5707,7 @@ func (c *restClient) GetTableDataProfile(ctx context.Context, req *dlppb.GetTabl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTableDataProfile") if err != nil { return err } @@ -6188,17 +5757,7 @@ func (c *restClient) GetColumnDataProfile(ctx context.Context, req *dlppb.GetCol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetColumnDataProfile") if err != nil { return err } @@ -6246,15 +5805,8 @@ func (c *restClient) DeleteTableDataProfile(ctx context.Context, req *dlppb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTableDataProfile") + return err }, opts...) } @@ -6299,17 +5851,7 @@ func (c *restClient) HybridInspectDlpJob(ctx context.Context, req *dlppb.HybridI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "HybridInspectDlpJob") if err != nil { return err } @@ -6363,15 +5905,8 @@ func (c *restClient) FinishDlpJob(ctx context.Context, req *dlppb.FinishDlpJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinishDlpJob") + return err }, opts...) } @@ -6414,17 +5949,7 @@ func (c *restClient) CreateConnection(ctx context.Context, req *dlppb.CreateConn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnection") if err != nil { return err } @@ -6474,17 +5999,7 @@ func (c *restClient) GetConnection(ctx context.Context, req *dlppb.GetConnection httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnection") if err != nil { return err } @@ -6550,21 +6065,10 @@ func (c *restClient) ListConnections(ctx context.Context, req *dlppb.ListConnect } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6642,21 +6146,10 @@ func (c *restClient) SearchConnections(ctx context.Context, req *dlppb.SearchCon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6716,15 +6209,8 @@ func (c *restClient) DeleteConnection(ctx context.Context, req *dlppb.DeleteConn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnection") + return err }, opts...) } @@ -6767,17 +6253,7 @@ func (c *restClient) UpdateConnection(ctx context.Context, req *dlppb.UpdateConn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnection") if err != nil { return err } diff --git a/dlp/apiv2/dlp_client_example_go123_test.go b/dlp/apiv2/dlp_client_example_go123_test.go index a90e7c4b6d52..69af5e3dcd59 100644 --- a/dlp/apiv2/dlp_client_example_go123_test.go +++ b/dlp/apiv2/dlp_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListColumnDataProfiles_all() { } for resp, err := range c.ListColumnDataProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListConnections_all() { } for resp, err := range c.ListConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListDeidentifyTemplates_all() { } for resp, err := range c.ListDeidentifyTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListDiscoveryConfigs_all() { } for resp, err := range c.ListDiscoveryConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListDlpJobs_all() { } for resp, err := range c.ListDlpJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_ListFileStoreDataProfiles_all() { } for resp, err := range c.ListFileStoreDataProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -200,7 +200,7 @@ func ExampleClient_ListInspectTemplates_all() { } for resp, err := range c.ListInspectTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -226,7 +226,7 @@ func ExampleClient_ListJobTriggers_all() { } for resp, err := range c.ListJobTriggers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -252,7 +252,7 @@ func ExampleClient_ListProjectDataProfiles_all() { } for resp, err := range c.ListProjectDataProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -278,7 +278,7 @@ func ExampleClient_ListStoredInfoTypes_all() { } for resp, err := range c.ListStoredInfoTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -304,7 +304,7 @@ func ExampleClient_ListTableDataProfiles_all() { } for resp, err := range c.ListTableDataProfiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -330,7 +330,7 @@ func ExampleClient_SearchConnections_all() { } for resp, err := range c.SearchConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/dlp/apiv2/dlppb/dlp.pb.go b/dlp/apiv2/dlppb/dlp.pb.go index 2c5d227ff3b3..3967c1fa0a57 100755 --- a/dlp/apiv2/dlppb/dlp.pb.go +++ b/dlp/apiv2/dlppb/dlp.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/privacy/dlp/v2/dlp.proto @@ -3639,11 +3639,9 @@ type ExcludeInfoTypes struct { func (x *ExcludeInfoTypes) Reset() { *x = ExcludeInfoTypes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExcludeInfoTypes) String() string { @@ -3654,7 +3652,7 @@ func (*ExcludeInfoTypes) ProtoMessage() {} func (x *ExcludeInfoTypes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3696,11 +3694,9 @@ type ExcludeByHotword struct { func (x *ExcludeByHotword) Reset() { *x = ExcludeByHotword{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExcludeByHotword) String() string { @@ -3711,7 +3707,7 @@ func (*ExcludeByHotword) ProtoMessage() {} func (x *ExcludeByHotword) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3762,11 +3758,9 @@ type ExclusionRule struct { func (x *ExclusionRule) Reset() { *x = ExclusionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExclusionRule) String() string { @@ -3777,7 +3771,7 @@ func (*ExclusionRule) ProtoMessage() {} func (x *ExclusionRule) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3885,11 +3879,9 @@ type InspectionRule struct { func (x *InspectionRule) Reset() { *x = InspectionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectionRule) String() string { @@ -3900,7 +3892,7 @@ func (*InspectionRule) ProtoMessage() {} func (x *InspectionRule) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3969,11 +3961,9 @@ type InspectionRuleSet struct { func (x *InspectionRuleSet) Reset() { *x = InspectionRuleSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectionRuleSet) String() string { @@ -3984,7 +3974,7 @@ func (*InspectionRuleSet) ProtoMessage() {} func (x *InspectionRuleSet) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4084,11 +4074,9 @@ type InspectConfig struct { func (x *InspectConfig) Reset() { *x = InspectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectConfig) String() string { @@ -4099,7 +4087,7 @@ func (*InspectConfig) ProtoMessage() {} func (x *InspectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4191,11 +4179,9 @@ type ByteContentItem struct { func (x *ByteContentItem) Reset() { *x = ByteContentItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ByteContentItem) String() string { @@ -4206,7 +4192,7 @@ func (*ByteContentItem) ProtoMessage() {} func (x *ByteContentItem) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4253,11 +4239,9 @@ type ContentItem struct { func (x *ContentItem) Reset() { *x = ContentItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentItem) String() string { @@ -4268,7 +4252,7 @@ func (*ContentItem) ProtoMessage() {} func (x *ContentItem) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4354,11 +4338,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -4369,7 +4351,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4417,11 +4399,9 @@ type InspectResult struct { func (x *InspectResult) Reset() { *x = InspectResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectResult) String() string { @@ -4432,7 +4412,7 @@ func (*InspectResult) ProtoMessage() {} func (x *InspectResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4519,11 +4499,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -4534,7 +4512,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4665,11 +4643,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -4680,7 +4656,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4762,11 +4738,9 @@ type ContentLocation struct { func (x *ContentLocation) Reset() { *x = ContentLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentLocation) String() string { @@ -4777,7 +4751,7 @@ func (*ContentLocation) ProtoMessage() {} func (x *ContentLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4899,11 +4873,9 @@ type MetadataLocation struct { func (x *MetadataLocation) Reset() { *x = MetadataLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataLocation) String() string { @@ -4914,7 +4886,7 @@ func (*MetadataLocation) ProtoMessage() {} func (x *MetadataLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4973,11 +4945,9 @@ type StorageMetadataLabel struct { func (x *StorageMetadataLabel) Reset() { *x = StorageMetadataLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageMetadataLabel) String() string { @@ -4988,7 +4958,7 @@ func (*StorageMetadataLabel) ProtoMessage() {} func (x *StorageMetadataLabel) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5023,11 +4993,9 @@ type DocumentLocation struct { func (x *DocumentLocation) Reset() { *x = DocumentLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentLocation) String() string { @@ -5038,7 +5006,7 @@ func (*DocumentLocation) ProtoMessage() {} func (x *DocumentLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5076,11 +5044,9 @@ type RecordLocation struct { func (x *RecordLocation) Reset() { *x = RecordLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordLocation) String() string { @@ -5091,7 +5057,7 @@ func (*RecordLocation) ProtoMessage() {} func (x *RecordLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5144,11 +5110,9 @@ type TableLocation struct { func (x *TableLocation) Reset() { *x = TableLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableLocation) String() string { @@ -5159,7 +5123,7 @@ func (*TableLocation) ProtoMessage() {} func (x *TableLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5226,11 +5190,9 @@ type Container struct { func (x *Container) Reset() { *x = Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Container) String() string { @@ -5241,7 +5203,7 @@ func (*Container) ProtoMessage() {} func (x *Container) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5319,11 +5281,9 @@ type Range struct { func (x *Range) Reset() { *x = Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Range) String() string { @@ -5334,7 +5294,7 @@ func (*Range) ProtoMessage() {} func (x *Range) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5375,11 +5335,9 @@ type ImageLocation struct { func (x *ImageLocation) Reset() { *x = ImageLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageLocation) String() string { @@ -5390,7 +5348,7 @@ func (*ImageLocation) ProtoMessage() {} func (x *ImageLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5430,11 +5388,9 @@ type BoundingBox struct { func (x *BoundingBox) Reset() { *x = BoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingBox) String() string { @@ -5445,7 +5401,7 @@ func (*BoundingBox) ProtoMessage() {} func (x *BoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5527,11 +5483,9 @@ type RedactImageRequest struct { func (x *RedactImageRequest) Reset() { *x = RedactImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedactImageRequest) String() string { @@ -5542,7 +5496,7 @@ func (*RedactImageRequest) ProtoMessage() {} func (x *RedactImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5615,11 +5569,9 @@ type Color struct { func (x *Color) Reset() { *x = Color{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Color) String() string { @@ -5630,7 +5582,7 @@ func (*Color) ProtoMessage() {} func (x *Color) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5684,11 +5636,9 @@ type RedactImageResponse struct { func (x *RedactImageResponse) Reset() { *x = RedactImageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedactImageResponse) String() string { @@ -5699,7 +5649,7 @@ func (*RedactImageResponse) ProtoMessage() {} func (x *RedactImageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5793,11 +5743,9 @@ type DeidentifyContentRequest struct { func (x *DeidentifyContentRequest) Reset() { *x = DeidentifyContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyContentRequest) String() string { @@ -5808,7 +5756,7 @@ func (*DeidentifyContentRequest) ProtoMessage() {} func (x *DeidentifyContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5886,11 +5834,9 @@ type DeidentifyContentResponse struct { func (x *DeidentifyContentResponse) Reset() { *x = DeidentifyContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyContentResponse) String() string { @@ -5901,7 +5847,7 @@ func (*DeidentifyContentResponse) ProtoMessage() {} func (x *DeidentifyContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5988,11 +5934,9 @@ type ReidentifyContentRequest struct { func (x *ReidentifyContentRequest) Reset() { *x = ReidentifyContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReidentifyContentRequest) String() string { @@ -6003,7 +5947,7 @@ func (*ReidentifyContentRequest) ProtoMessage() {} func (x *ReidentifyContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6081,11 +6025,9 @@ type ReidentifyContentResponse struct { func (x *ReidentifyContentResponse) Reset() { *x = ReidentifyContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReidentifyContentResponse) String() string { @@ -6096,7 +6038,7 @@ func (*ReidentifyContentResponse) ProtoMessage() {} func (x *ReidentifyContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6165,11 +6107,9 @@ type InspectContentRequest struct { func (x *InspectContentRequest) Reset() { *x = InspectContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectContentRequest) String() string { @@ -6180,7 +6120,7 @@ func (*InspectContentRequest) ProtoMessage() {} func (x *InspectContentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6242,11 +6182,9 @@ type InspectContentResponse struct { func (x *InspectContentResponse) Reset() { *x = InspectContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectContentResponse) String() string { @@ -6257,7 +6195,7 @@ func (*InspectContentResponse) ProtoMessage() {} func (x *InspectContentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6306,11 +6244,9 @@ type OutputStorageConfig struct { func (x *OutputStorageConfig) Reset() { *x = OutputStorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputStorageConfig) String() string { @@ -6321,7 +6257,7 @@ func (*OutputStorageConfig) ProtoMessage() {} func (x *OutputStorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6395,11 +6331,9 @@ type InfoTypeStats struct { func (x *InfoTypeStats) Reset() { *x = InfoTypeStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeStats) String() string { @@ -6410,7 +6344,7 @@ func (*InfoTypeStats) ProtoMessage() {} func (x *InfoTypeStats) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6453,11 +6387,9 @@ type InspectDataSourceDetails struct { func (x *InspectDataSourceDetails) Reset() { *x = InspectDataSourceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectDataSourceDetails) String() string { @@ -6468,7 +6400,7 @@ func (*InspectDataSourceDetails) ProtoMessage() {} func (x *InspectDataSourceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6516,11 +6448,9 @@ type DataProfileBigQueryRowSchema struct { func (x *DataProfileBigQueryRowSchema) Reset() { *x = DataProfileBigQueryRowSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileBigQueryRowSchema) String() string { @@ -6531,7 +6461,7 @@ func (*DataProfileBigQueryRowSchema) ProtoMessage() {} func (x *DataProfileBigQueryRowSchema) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6620,11 +6550,9 @@ type HybridInspectStatistics struct { func (x *HybridInspectStatistics) Reset() { *x = HybridInspectStatistics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridInspectStatistics) String() string { @@ -6635,7 +6563,7 @@ func (*HybridInspectStatistics) ProtoMessage() {} func (x *HybridInspectStatistics) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6687,11 +6615,9 @@ type ActionDetails struct { func (x *ActionDetails) Reset() { *x = ActionDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActionDetails) String() string { @@ -6702,7 +6628,7 @@ func (*ActionDetails) ProtoMessage() {} func (x *ActionDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6758,11 +6684,9 @@ type DeidentifyDataSourceStats struct { func (x *DeidentifyDataSourceStats) Reset() { *x = DeidentifyDataSourceStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyDataSourceStats) String() string { @@ -6773,7 +6697,7 @@ func (*DeidentifyDataSourceStats) ProtoMessage() {} func (x *DeidentifyDataSourceStats) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6824,11 +6748,9 @@ type DeidentifyDataSourceDetails struct { func (x *DeidentifyDataSourceDetails) Reset() { *x = DeidentifyDataSourceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyDataSourceDetails) String() string { @@ -6839,7 +6761,7 @@ func (*DeidentifyDataSourceDetails) ProtoMessage() {} func (x *DeidentifyDataSourceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6893,11 +6815,9 @@ type InfoTypeDescription struct { func (x *InfoTypeDescription) Reset() { *x = InfoTypeDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeDescription) String() string { @@ -6908,7 +6828,7 @@ func (*InfoTypeDescription) ProtoMessage() {} func (x *InfoTypeDescription) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6991,11 +6911,9 @@ type InfoTypeCategory struct { func (x *InfoTypeCategory) Reset() { *x = InfoTypeCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeCategory) String() string { @@ -7006,7 +6924,7 @@ func (*InfoTypeCategory) ProtoMessage() {} func (x *InfoTypeCategory) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7089,11 +7007,9 @@ type VersionDescription struct { func (x *VersionDescription) Reset() { *x = VersionDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionDescription) String() string { @@ -7104,7 +7020,7 @@ func (*VersionDescription) ProtoMessage() {} func (x *VersionDescription) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7158,11 +7074,9 @@ type ListInfoTypesRequest struct { func (x *ListInfoTypesRequest) Reset() { *x = ListInfoTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInfoTypesRequest) String() string { @@ -7173,7 +7087,7 @@ func (*ListInfoTypesRequest) ProtoMessage() {} func (x *ListInfoTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7228,11 +7142,9 @@ type ListInfoTypesResponse struct { func (x *ListInfoTypesResponse) Reset() { *x = ListInfoTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInfoTypesResponse) String() string { @@ -7243,7 +7155,7 @@ func (*ListInfoTypesResponse) ProtoMessage() {} func (x *ListInfoTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7284,11 +7196,9 @@ type RiskAnalysisJobConfig struct { func (x *RiskAnalysisJobConfig) Reset() { *x = RiskAnalysisJobConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RiskAnalysisJobConfig) String() string { @@ -7299,7 +7209,7 @@ func (*RiskAnalysisJobConfig) ProtoMessage() {} func (x *RiskAnalysisJobConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7357,11 +7267,9 @@ type QuasiId struct { func (x *QuasiId) Reset() { *x = QuasiId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuasiId) String() string { @@ -7372,7 +7280,7 @@ func (*QuasiId) ProtoMessage() {} func (x *QuasiId) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7477,11 +7385,9 @@ type StatisticalTable struct { func (x *StatisticalTable) Reset() { *x = StatisticalTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatisticalTable) String() string { @@ -7492,7 +7398,7 @@ func (*StatisticalTable) ProtoMessage() {} func (x *StatisticalTable) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7549,11 +7455,9 @@ type PrivacyMetric struct { func (x *PrivacyMetric) Reset() { *x = PrivacyMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric) String() string { @@ -7564,7 +7468,7 @@ func (*PrivacyMetric) ProtoMessage() {} func (x *PrivacyMetric) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7701,11 +7605,9 @@ type AnalyzeDataSourceRiskDetails struct { func (x *AnalyzeDataSourceRiskDetails) Reset() { *x = AnalyzeDataSourceRiskDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails) String() string { @@ -7716,7 +7618,7 @@ func (*AnalyzeDataSourceRiskDetails) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7863,11 +7765,9 @@ type ValueFrequency struct { func (x *ValueFrequency) Reset() { *x = ValueFrequency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueFrequency) String() string { @@ -7878,7 +7778,7 @@ func (*ValueFrequency) ProtoMessage() {} func (x *ValueFrequency) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7935,11 +7835,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -7950,7 +7848,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8104,11 +8002,9 @@ type QuoteInfo struct { func (x *QuoteInfo) Reset() { *x = QuoteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuoteInfo) String() string { @@ -8119,7 +8015,7 @@ func (*QuoteInfo) ProtoMessage() {} func (x *QuoteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8179,11 +8075,9 @@ type DateTime struct { func (x *DateTime) Reset() { *x = DateTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateTime) String() string { @@ -8194,7 +8088,7 @@ func (*DateTime) ProtoMessage() {} func (x *DateTime) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8258,11 +8152,9 @@ type DeidentifyConfig struct { func (x *DeidentifyConfig) Reset() { *x = DeidentifyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyConfig) String() string { @@ -8273,7 +8165,7 @@ func (*DeidentifyConfig) ProtoMessage() {} func (x *DeidentifyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8363,11 +8255,9 @@ type ImageTransformations struct { func (x *ImageTransformations) Reset() { *x = ImageTransformations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageTransformations) String() string { @@ -8378,7 +8268,7 @@ func (*ImageTransformations) ProtoMessage() {} func (x *ImageTransformations) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8424,11 +8314,9 @@ type TransformationErrorHandling struct { func (x *TransformationErrorHandling) Reset() { *x = TransformationErrorHandling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationErrorHandling) String() string { @@ -8439,7 +8327,7 @@ func (*TransformationErrorHandling) ProtoMessage() {} func (x *TransformationErrorHandling) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8520,11 +8408,9 @@ type PrimitiveTransformation struct { func (x *PrimitiveTransformation) Reset() { *x = PrimitiveTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrimitiveTransformation) String() string { @@ -8535,7 +8421,7 @@ func (*PrimitiveTransformation) ProtoMessage() {} func (x *PrimitiveTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8745,11 +8631,9 @@ type TimePartConfig struct { func (x *TimePartConfig) Reset() { *x = TimePartConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimePartConfig) String() string { @@ -8760,7 +8644,7 @@ func (*TimePartConfig) ProtoMessage() {} func (x *TimePartConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8801,11 +8685,9 @@ type CryptoHashConfig struct { func (x *CryptoHashConfig) Reset() { *x = CryptoHashConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoHashConfig) String() string { @@ -8816,7 +8698,7 @@ func (*CryptoHashConfig) ProtoMessage() {} func (x *CryptoHashConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8906,11 +8788,9 @@ type CryptoDeterministicConfig struct { func (x *CryptoDeterministicConfig) Reset() { *x = CryptoDeterministicConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoDeterministicConfig) String() string { @@ -8921,7 +8801,7 @@ func (*CryptoDeterministicConfig) ProtoMessage() {} func (x *CryptoDeterministicConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8969,11 +8849,9 @@ type ReplaceValueConfig struct { func (x *ReplaceValueConfig) Reset() { *x = ReplaceValueConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceValueConfig) String() string { @@ -8984,7 +8862,7 @@ func (*ReplaceValueConfig) ProtoMessage() {} func (x *ReplaceValueConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9022,11 +8900,9 @@ type ReplaceDictionaryConfig struct { func (x *ReplaceDictionaryConfig) Reset() { *x = ReplaceDictionaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceDictionaryConfig) String() string { @@ -9037,7 +8913,7 @@ func (*ReplaceDictionaryConfig) ProtoMessage() {} func (x *ReplaceDictionaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9088,11 +8964,9 @@ type ReplaceWithInfoTypeConfig struct { func (x *ReplaceWithInfoTypeConfig) Reset() { *x = ReplaceWithInfoTypeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceWithInfoTypeConfig) String() string { @@ -9103,7 +8977,7 @@ func (*ReplaceWithInfoTypeConfig) ProtoMessage() {} func (x *ReplaceWithInfoTypeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9129,11 +9003,9 @@ type RedactConfig struct { func (x *RedactConfig) Reset() { *x = RedactConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedactConfig) String() string { @@ -9144,7 +9016,7 @@ func (*RedactConfig) ProtoMessage() {} func (x *RedactConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9177,11 +9049,9 @@ type CharsToIgnore struct { func (x *CharsToIgnore) Reset() { *x = CharsToIgnore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CharsToIgnore) String() string { @@ -9192,7 +9062,7 @@ func (*CharsToIgnore) ProtoMessage() {} func (x *CharsToIgnore) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9296,11 +9166,9 @@ type CharacterMaskConfig struct { func (x *CharacterMaskConfig) Reset() { *x = CharacterMaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CharacterMaskConfig) String() string { @@ -9311,7 +9179,7 @@ func (*CharacterMaskConfig) ProtoMessage() {} func (x *CharacterMaskConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9394,11 +9262,9 @@ type FixedSizeBucketingConfig struct { func (x *FixedSizeBucketingConfig) Reset() { *x = FixedSizeBucketingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FixedSizeBucketingConfig) String() string { @@ -9409,7 +9275,7 @@ func (*FixedSizeBucketingConfig) ProtoMessage() {} func (x *FixedSizeBucketingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9468,11 +9334,9 @@ type BucketingConfig struct { func (x *BucketingConfig) Reset() { *x = BucketingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BucketingConfig) String() string { @@ -9483,7 +9347,7 @@ func (*BucketingConfig) ProtoMessage() {} func (x *BucketingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9585,11 +9449,9 @@ type CryptoReplaceFfxFpeConfig struct { func (x *CryptoReplaceFfxFpeConfig) Reset() { *x = CryptoReplaceFfxFpeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoReplaceFfxFpeConfig) String() string { @@ -9600,7 +9462,7 @@ func (*CryptoReplaceFfxFpeConfig) ProtoMessage() {} func (x *CryptoReplaceFfxFpeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9720,11 +9582,9 @@ type CryptoKey struct { func (x *CryptoKey) Reset() { *x = CryptoKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKey) String() string { @@ -9735,7 +9595,7 @@ func (*CryptoKey) ProtoMessage() {} func (x *CryptoKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9821,11 +9681,9 @@ type TransientCryptoKey struct { func (x *TransientCryptoKey) Reset() { *x = TransientCryptoKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransientCryptoKey) String() string { @@ -9836,7 +9694,7 @@ func (*TransientCryptoKey) ProtoMessage() {} func (x *TransientCryptoKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9871,11 +9729,9 @@ type UnwrappedCryptoKey struct { func (x *UnwrappedCryptoKey) Reset() { *x = UnwrappedCryptoKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnwrappedCryptoKey) String() string { @@ -9886,7 +9742,7 @@ func (*UnwrappedCryptoKey) ProtoMessage() {} func (x *UnwrappedCryptoKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9932,11 +9788,9 @@ type KmsWrappedCryptoKey struct { func (x *KmsWrappedCryptoKey) Reset() { *x = KmsWrappedCryptoKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KmsWrappedCryptoKey) String() string { @@ -9947,7 +9801,7 @@ func (*KmsWrappedCryptoKey) ProtoMessage() {} func (x *KmsWrappedCryptoKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10009,11 +9863,9 @@ type DateShiftConfig struct { func (x *DateShiftConfig) Reset() { *x = DateShiftConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateShiftConfig) String() string { @@ -10024,7 +9876,7 @@ func (*DateShiftConfig) ProtoMessage() {} func (x *DateShiftConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10103,11 +9955,9 @@ type InfoTypeTransformations struct { func (x *InfoTypeTransformations) Reset() { *x = InfoTypeTransformations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeTransformations) String() string { @@ -10118,7 +9968,7 @@ func (*InfoTypeTransformations) ProtoMessage() {} func (x *InfoTypeTransformations) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10172,11 +10022,9 @@ type FieldTransformation struct { func (x *FieldTransformation) Reset() { *x = FieldTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldTransformation) String() string { @@ -10187,7 +10035,7 @@ func (*FieldTransformation) ProtoMessage() {} func (x *FieldTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10272,11 +10120,9 @@ type RecordTransformations struct { func (x *RecordTransformations) Reset() { *x = RecordTransformations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordTransformations) String() string { @@ -10287,7 +10133,7 @@ func (*RecordTransformations) ProtoMessage() {} func (x *RecordTransformations) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10330,11 +10176,9 @@ type RecordSuppression struct { func (x *RecordSuppression) Reset() { *x = RecordSuppression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordSuppression) String() string { @@ -10345,7 +10189,7 @@ func (*RecordSuppression) ProtoMessage() {} func (x *RecordSuppression) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10380,11 +10224,9 @@ type RecordCondition struct { func (x *RecordCondition) Reset() { *x = RecordCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordCondition) String() string { @@ -10395,7 +10237,7 @@ func (*RecordCondition) ProtoMessage() {} func (x *RecordCondition) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10431,11 +10273,9 @@ type TransformationOverview struct { func (x *TransformationOverview) Reset() { *x = TransformationOverview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationOverview) String() string { @@ -10446,7 +10286,7 @@ func (*TransformationOverview) ProtoMessage() {} func (x *TransformationOverview) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10503,11 +10343,9 @@ type TransformationSummary struct { func (x *TransformationSummary) Reset() { *x = TransformationSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationSummary) String() string { @@ -10518,7 +10356,7 @@ func (*TransformationSummary) ProtoMessage() {} func (x *TransformationSummary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10613,11 +10451,9 @@ type TransformationDescription struct { func (x *TransformationDescription) Reset() { *x = TransformationDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationDescription) String() string { @@ -10628,7 +10464,7 @@ func (*TransformationDescription) ProtoMessage() {} func (x *TransformationDescription) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10705,11 +10541,9 @@ type TransformationDetails struct { func (x *TransformationDetails) Reset() { *x = TransformationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationDetails) String() string { @@ -10720,7 +10554,7 @@ func (*TransformationDetails) ProtoMessage() {} func (x *TransformationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10797,11 +10631,9 @@ type TransformationLocation struct { func (x *TransformationLocation) Reset() { *x = TransformationLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationLocation) String() string { @@ -10812,7 +10644,7 @@ func (*TransformationLocation) ProtoMessage() {} func (x *TransformationLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10893,11 +10725,9 @@ type RecordTransformation struct { func (x *RecordTransformation) Reset() { *x = RecordTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordTransformation) String() string { @@ -10908,7 +10738,7 @@ func (*RecordTransformation) ProtoMessage() {} func (x *RecordTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10959,11 +10789,9 @@ type TransformationResultStatus struct { func (x *TransformationResultStatus) Reset() { *x = TransformationResultStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationResultStatus) String() string { @@ -10974,7 +10802,7 @@ func (*TransformationResultStatus) ProtoMessage() {} func (x *TransformationResultStatus) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11019,11 +10847,9 @@ type TransformationDetailsStorageConfig struct { func (x *TransformationDetailsStorageConfig) Reset() { *x = TransformationDetailsStorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationDetailsStorageConfig) String() string { @@ -11034,7 +10860,7 @@ func (*TransformationDetailsStorageConfig) ProtoMessage() {} func (x *TransformationDetailsStorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11095,11 +10921,9 @@ type Schedule struct { func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -11110,7 +10934,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11167,11 +10991,9 @@ type Manual struct { func (x *Manual) Reset() { *x = Manual{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Manual) String() string { @@ -11182,7 +11004,7 @@ func (*Manual) ProtoMessage() {} func (x *Manual) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11227,11 +11049,9 @@ type InspectTemplate struct { func (x *InspectTemplate) Reset() { *x = InspectTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectTemplate) String() string { @@ -11242,7 +11062,7 @@ func (*InspectTemplate) ProtoMessage() {} func (x *InspectTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11328,11 +11148,9 @@ type DeidentifyTemplate struct { func (x *DeidentifyTemplate) Reset() { *x = DeidentifyTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyTemplate) String() string { @@ -11343,7 +11161,7 @@ func (*DeidentifyTemplate) ProtoMessage() {} func (x *DeidentifyTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11418,11 +11236,9 @@ type Error struct { func (x *Error) Reset() { *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Error) String() string { @@ -11433,7 +11249,7 @@ func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11513,11 +11329,9 @@ type JobTrigger struct { func (x *JobTrigger) Reset() { *x = JobTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobTrigger) String() string { @@ -11528,7 +11342,7 @@ func (*JobTrigger) ProtoMessage() {} func (x *JobTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11655,11 +11469,9 @@ type Action struct { func (x *Action) Reset() { *x = Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action) String() string { @@ -11670,7 +11482,7 @@ func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11828,11 +11640,9 @@ type TransformationConfig struct { func (x *TransformationConfig) Reset() { *x = TransformationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationConfig) String() string { @@ -11843,7 +11653,7 @@ func (*TransformationConfig) ProtoMessage() {} func (x *TransformationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11919,11 +11729,9 @@ type CreateInspectTemplateRequest struct { func (x *CreateInspectTemplateRequest) Reset() { *x = CreateInspectTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInspectTemplateRequest) String() string { @@ -11934,7 +11742,7 @@ func (*CreateInspectTemplateRequest) ProtoMessage() {} func (x *CreateInspectTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11995,11 +11803,9 @@ type UpdateInspectTemplateRequest struct { func (x *UpdateInspectTemplateRequest) Reset() { *x = UpdateInspectTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInspectTemplateRequest) String() string { @@ -12010,7 +11816,7 @@ func (*UpdateInspectTemplateRequest) ProtoMessage() {} func (x *UpdateInspectTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12060,11 +11866,9 @@ type GetInspectTemplateRequest struct { func (x *GetInspectTemplateRequest) Reset() { *x = GetInspectTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInspectTemplateRequest) String() string { @@ -12075,7 +11879,7 @@ func (*GetInspectTemplateRequest) ProtoMessage() {} func (x *GetInspectTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12150,11 +11954,9 @@ type ListInspectTemplatesRequest struct { func (x *ListInspectTemplatesRequest) Reset() { *x = ListInspectTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInspectTemplatesRequest) String() string { @@ -12165,7 +11967,7 @@ func (*ListInspectTemplatesRequest) ProtoMessage() {} func (x *ListInspectTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12230,11 +12032,9 @@ type ListInspectTemplatesResponse struct { func (x *ListInspectTemplatesResponse) Reset() { *x = ListInspectTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInspectTemplatesResponse) String() string { @@ -12245,7 +12045,7 @@ func (*ListInspectTemplatesResponse) ProtoMessage() {} func (x *ListInspectTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12288,11 +12088,9 @@ type DeleteInspectTemplateRequest struct { func (x *DeleteInspectTemplateRequest) Reset() { *x = DeleteInspectTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInspectTemplateRequest) String() string { @@ -12303,7 +12101,7 @@ func (*DeleteInspectTemplateRequest) ProtoMessage() {} func (x *DeleteInspectTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12361,11 +12159,9 @@ type CreateJobTriggerRequest struct { func (x *CreateJobTriggerRequest) Reset() { *x = CreateJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobTriggerRequest) String() string { @@ -12376,7 +12172,7 @@ func (*CreateJobTriggerRequest) ProtoMessage() {} func (x *CreateJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12432,11 +12228,9 @@ type ActivateJobTriggerRequest struct { func (x *ActivateJobTriggerRequest) Reset() { *x = ActivateJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActivateJobTriggerRequest) String() string { @@ -12447,7 +12241,7 @@ func (*ActivateJobTriggerRequest) ProtoMessage() {} func (x *ActivateJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12486,11 +12280,9 @@ type UpdateJobTriggerRequest struct { func (x *UpdateJobTriggerRequest) Reset() { *x = UpdateJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobTriggerRequest) String() string { @@ -12501,7 +12293,7 @@ func (*UpdateJobTriggerRequest) ProtoMessage() {} func (x *UpdateJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12550,11 +12342,9 @@ type GetJobTriggerRequest struct { func (x *GetJobTriggerRequest) Reset() { *x = GetJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobTriggerRequest) String() string { @@ -12565,7 +12355,7 @@ func (*GetJobTriggerRequest) ProtoMessage() {} func (x *GetJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12620,11 +12410,9 @@ type CreateDiscoveryConfigRequest struct { func (x *CreateDiscoveryConfigRequest) Reset() { *x = CreateDiscoveryConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDiscoveryConfigRequest) String() string { @@ -12635,7 +12423,7 @@ func (*CreateDiscoveryConfigRequest) ProtoMessage() {} func (x *CreateDiscoveryConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12688,11 +12476,9 @@ type UpdateDiscoveryConfigRequest struct { func (x *UpdateDiscoveryConfigRequest) Reset() { *x = UpdateDiscoveryConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDiscoveryConfigRequest) String() string { @@ -12703,7 +12489,7 @@ func (*UpdateDiscoveryConfigRequest) ProtoMessage() {} func (x *UpdateDiscoveryConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12752,11 +12538,9 @@ type GetDiscoveryConfigRequest struct { func (x *GetDiscoveryConfigRequest) Reset() { *x = GetDiscoveryConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDiscoveryConfigRequest) String() string { @@ -12767,7 +12551,7 @@ func (*GetDiscoveryConfigRequest) ProtoMessage() {} func (x *GetDiscoveryConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12829,11 +12613,9 @@ type ListDiscoveryConfigsRequest struct { func (x *ListDiscoveryConfigsRequest) Reset() { *x = ListDiscoveryConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveryConfigsRequest) String() string { @@ -12844,7 +12626,7 @@ func (*ListDiscoveryConfigsRequest) ProtoMessage() {} func (x *ListDiscoveryConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12902,11 +12684,9 @@ type ListDiscoveryConfigsResponse struct { func (x *ListDiscoveryConfigsResponse) Reset() { *x = ListDiscoveryConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDiscoveryConfigsResponse) String() string { @@ -12917,7 +12697,7 @@ func (*ListDiscoveryConfigsResponse) ProtoMessage() {} func (x *ListDiscoveryConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12959,11 +12739,9 @@ type DeleteDiscoveryConfigRequest struct { func (x *DeleteDiscoveryConfigRequest) Reset() { *x = DeleteDiscoveryConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDiscoveryConfigRequest) String() string { @@ -12974,7 +12752,7 @@ func (*DeleteDiscoveryConfigRequest) ProtoMessage() {} func (x *DeleteDiscoveryConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13039,11 +12817,9 @@ type CreateDlpJobRequest struct { func (x *CreateDlpJobRequest) Reset() { *x = CreateDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDlpJobRequest) String() string { @@ -13054,7 +12830,7 @@ func (*CreateDlpJobRequest) ProtoMessage() {} func (x *CreateDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13209,11 +12985,9 @@ type ListJobTriggersRequest struct { func (x *ListJobTriggersRequest) Reset() { *x = ListJobTriggersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobTriggersRequest) String() string { @@ -13224,7 +12998,7 @@ func (*ListJobTriggersRequest) ProtoMessage() {} func (x *ListJobTriggersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13303,11 +13077,9 @@ type ListJobTriggersResponse struct { func (x *ListJobTriggersResponse) Reset() { *x = ListJobTriggersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobTriggersResponse) String() string { @@ -13318,7 +13090,7 @@ func (*ListJobTriggersResponse) ProtoMessage() {} func (x *ListJobTriggersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13360,11 +13132,9 @@ type DeleteJobTriggerRequest struct { func (x *DeleteJobTriggerRequest) Reset() { *x = DeleteJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobTriggerRequest) String() string { @@ -13375,7 +13145,7 @@ func (*DeleteJobTriggerRequest) ProtoMessage() {} func (x *DeleteJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13417,11 +13187,9 @@ type InspectJobConfig struct { func (x *InspectJobConfig) Reset() { *x = InspectJobConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectJobConfig) String() string { @@ -13432,7 +13200,7 @@ func (*InspectJobConfig) ProtoMessage() {} func (x *InspectJobConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13495,11 +13263,9 @@ type DataProfileAction struct { func (x *DataProfileAction) Reset() { *x = DataProfileAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction) String() string { @@ -13510,7 +13276,7 @@ func (*DataProfileAction) ProtoMessage() {} func (x *DataProfileAction) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13652,11 +13418,9 @@ type DataProfileJobConfig struct { func (x *DataProfileJobConfig) Reset() { *x = DataProfileJobConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileJobConfig) String() string { @@ -13667,7 +13431,7 @@ func (*DataProfileJobConfig) ProtoMessage() {} func (x *DataProfileJobConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13738,11 +13502,9 @@ type BigQueryRegex struct { func (x *BigQueryRegex) Reset() { *x = BigQueryRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryRegex) String() string { @@ -13753,7 +13515,7 @@ func (*BigQueryRegex) ProtoMessage() {} func (x *BigQueryRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13803,11 +13565,9 @@ type BigQueryRegexes struct { func (x *BigQueryRegexes) Reset() { *x = BigQueryRegexes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryRegexes) String() string { @@ -13818,7 +13578,7 @@ func (*BigQueryRegexes) ProtoMessage() {} func (x *BigQueryRegexes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13852,11 +13612,9 @@ type BigQueryTableTypes struct { func (x *BigQueryTableTypes) Reset() { *x = BigQueryTableTypes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryTableTypes) String() string { @@ -13867,7 +13625,7 @@ func (*BigQueryTableTypes) ProtoMessage() {} func (x *BigQueryTableTypes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13898,11 +13656,9 @@ type Disabled struct { func (x *Disabled) Reset() { *x = Disabled{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Disabled) String() string { @@ -13913,7 +13669,7 @@ func (*Disabled) ProtoMessage() {} func (x *Disabled) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13945,11 +13701,9 @@ type DataProfileLocation struct { func (x *DataProfileLocation) Reset() { *x = DataProfileLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileLocation) String() string { @@ -13960,7 +13714,7 @@ func (*DataProfileLocation) ProtoMessage() {} func (x *DataProfileLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14074,11 +13828,9 @@ type DiscoveryConfig struct { func (x *DiscoveryConfig) Reset() { *x = DiscoveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryConfig) String() string { @@ -14089,7 +13841,7 @@ func (*DiscoveryConfig) ProtoMessage() {} func (x *DiscoveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14208,11 +13960,9 @@ type DiscoveryTarget struct { func (x *DiscoveryTarget) Reset() { *x = DiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryTarget) String() string { @@ -14223,7 +13973,7 @@ func (*DiscoveryTarget) ProtoMessage() {} func (x *DiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14350,11 +14100,9 @@ type BigQueryDiscoveryTarget struct { func (x *BigQueryDiscoveryTarget) Reset() { *x = BigQueryDiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDiscoveryTarget) String() string { @@ -14365,7 +14113,7 @@ func (*BigQueryDiscoveryTarget) ProtoMessage() {} func (x *BigQueryDiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14458,11 +14206,9 @@ type DiscoveryBigQueryFilter struct { func (x *DiscoveryBigQueryFilter) Reset() { *x = DiscoveryBigQueryFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryBigQueryFilter) String() string { @@ -14473,7 +14219,7 @@ func (*DiscoveryBigQueryFilter) ProtoMessage() {} func (x *DiscoveryBigQueryFilter) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14566,11 +14312,9 @@ type BigQueryTableCollection struct { func (x *BigQueryTableCollection) Reset() { *x = BigQueryTableCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryTableCollection) String() string { @@ -14581,7 +14325,7 @@ func (*BigQueryTableCollection) ProtoMessage() {} func (x *BigQueryTableCollection) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14649,11 +14393,9 @@ type DiscoveryBigQueryConditions struct { func (x *DiscoveryBigQueryConditions) Reset() { *x = DiscoveryBigQueryConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryBigQueryConditions) String() string { @@ -14664,7 +14406,7 @@ func (*DiscoveryBigQueryConditions) ProtoMessage() {} func (x *DiscoveryBigQueryConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14756,11 +14498,9 @@ type DiscoveryGenerationCadence struct { func (x *DiscoveryGenerationCadence) Reset() { *x = DiscoveryGenerationCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryGenerationCadence) String() string { @@ -14771,7 +14511,7 @@ func (*DiscoveryGenerationCadence) ProtoMessage() {} func (x *DiscoveryGenerationCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14831,11 +14571,9 @@ type DiscoveryTableModifiedCadence struct { func (x *DiscoveryTableModifiedCadence) Reset() { *x = DiscoveryTableModifiedCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryTableModifiedCadence) String() string { @@ -14846,7 +14584,7 @@ func (*DiscoveryTableModifiedCadence) ProtoMessage() {} func (x *DiscoveryTableModifiedCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14892,11 +14630,9 @@ type DiscoverySchemaModifiedCadence struct { func (x *DiscoverySchemaModifiedCadence) Reset() { *x = DiscoverySchemaModifiedCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoverySchemaModifiedCadence) String() string { @@ -14907,7 +14643,7 @@ func (*DiscoverySchemaModifiedCadence) ProtoMessage() {} func (x *DiscoverySchemaModifiedCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14950,11 +14686,9 @@ type DiscoveryInspectTemplateModifiedCadence struct { func (x *DiscoveryInspectTemplateModifiedCadence) Reset() { *x = DiscoveryInspectTemplateModifiedCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryInspectTemplateModifiedCadence) String() string { @@ -14965,7 +14699,7 @@ func (*DiscoveryInspectTemplateModifiedCadence) ProtoMessage() {} func (x *DiscoveryInspectTemplateModifiedCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15010,11 +14744,9 @@ type CloudSqlDiscoveryTarget struct { func (x *CloudSqlDiscoveryTarget) Reset() { *x = CloudSqlDiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlDiscoveryTarget) String() string { @@ -15025,7 +14757,7 @@ func (*CloudSqlDiscoveryTarget) ProtoMessage() {} func (x *CloudSqlDiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15118,11 +14850,9 @@ type DiscoveryCloudSqlFilter struct { func (x *DiscoveryCloudSqlFilter) Reset() { *x = DiscoveryCloudSqlFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudSqlFilter) String() string { @@ -15133,7 +14863,7 @@ func (*DiscoveryCloudSqlFilter) ProtoMessage() {} func (x *DiscoveryCloudSqlFilter) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15223,11 +14953,9 @@ type DatabaseResourceCollection struct { func (x *DatabaseResourceCollection) Reset() { *x = DatabaseResourceCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseResourceCollection) String() string { @@ -15238,7 +14966,7 @@ func (*DatabaseResourceCollection) ProtoMessage() {} func (x *DatabaseResourceCollection) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15294,11 +15022,9 @@ type DatabaseResourceRegexes struct { func (x *DatabaseResourceRegexes) Reset() { *x = DatabaseResourceRegexes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseResourceRegexes) String() string { @@ -15309,7 +15035,7 @@ func (*DatabaseResourceRegexes) ProtoMessage() {} func (x *DatabaseResourceRegexes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15356,11 +15082,9 @@ type DatabaseResourceRegex struct { func (x *DatabaseResourceRegex) Reset() { *x = DatabaseResourceRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseResourceRegex) String() string { @@ -15371,7 +15095,7 @@ func (*DatabaseResourceRegex) ProtoMessage() {} func (x *DatabaseResourceRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15423,11 +15147,9 @@ type AllOtherDatabaseResources struct { func (x *AllOtherDatabaseResources) Reset() { *x = AllOtherDatabaseResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllOtherDatabaseResources) String() string { @@ -15438,7 +15160,7 @@ func (*AllOtherDatabaseResources) ProtoMessage() {} func (x *AllOtherDatabaseResources) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15474,11 +15196,9 @@ type DatabaseResourceReference struct { func (x *DatabaseResourceReference) Reset() { *x = DatabaseResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseResourceReference) String() string { @@ -15489,7 +15209,7 @@ func (*DatabaseResourceReference) ProtoMessage() {} func (x *DatabaseResourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15550,11 +15270,9 @@ type DiscoveryCloudSqlConditions struct { func (x *DiscoveryCloudSqlConditions) Reset() { *x = DiscoveryCloudSqlConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudSqlConditions) String() string { @@ -15565,7 +15283,7 @@ func (*DiscoveryCloudSqlConditions) ProtoMessage() {} func (x *DiscoveryCloudSqlConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15617,11 +15335,9 @@ type DiscoveryCloudSqlGenerationCadence struct { func (x *DiscoveryCloudSqlGenerationCadence) Reset() { *x = DiscoveryCloudSqlGenerationCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudSqlGenerationCadence) String() string { @@ -15632,7 +15348,7 @@ func (*DiscoveryCloudSqlGenerationCadence) ProtoMessage() {} func (x *DiscoveryCloudSqlGenerationCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15688,11 +15404,9 @@ type SecretsDiscoveryTarget struct { func (x *SecretsDiscoveryTarget) Reset() { *x = SecretsDiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretsDiscoveryTarget) String() string { @@ -15703,7 +15417,7 @@ func (*SecretsDiscoveryTarget) ProtoMessage() {} func (x *SecretsDiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15741,11 +15455,9 @@ type CloudStorageDiscoveryTarget struct { func (x *CloudStorageDiscoveryTarget) Reset() { *x = CloudStorageDiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageDiscoveryTarget) String() string { @@ -15756,7 +15468,7 @@ func (*CloudStorageDiscoveryTarget) ProtoMessage() {} func (x *CloudStorageDiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15849,11 +15561,9 @@ type DiscoveryCloudStorageFilter struct { func (x *DiscoveryCloudStorageFilter) Reset() { *x = DiscoveryCloudStorageFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudStorageFilter) String() string { @@ -15864,7 +15574,7 @@ func (*DiscoveryCloudStorageFilter) ProtoMessage() {} func (x *DiscoveryCloudStorageFilter) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15956,11 +15666,9 @@ type FileStoreCollection struct { func (x *FileStoreCollection) Reset() { *x = FileStoreCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStoreCollection) String() string { @@ -15971,7 +15679,7 @@ func (*FileStoreCollection) ProtoMessage() {} func (x *FileStoreCollection) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16027,11 +15735,9 @@ type FileStoreRegexes struct { func (x *FileStoreRegexes) Reset() { *x = FileStoreRegexes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStoreRegexes) String() string { @@ -16042,7 +15748,7 @@ func (*FileStoreRegexes) ProtoMessage() {} func (x *FileStoreRegexes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16080,11 +15786,9 @@ type FileStoreRegex struct { func (x *FileStoreRegex) Reset() { *x = FileStoreRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStoreRegex) String() string { @@ -16095,7 +15799,7 @@ func (*FileStoreRegex) ProtoMessage() {} func (x *FileStoreRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16154,11 +15858,9 @@ type CloudStorageRegex struct { func (x *CloudStorageRegex) Reset() { *x = CloudStorageRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageRegex) String() string { @@ -16169,7 +15871,7 @@ func (*CloudStorageRegex) ProtoMessage() {} func (x *CloudStorageRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16213,11 +15915,9 @@ type CloudStorageResourceReference struct { func (x *CloudStorageResourceReference) Reset() { *x = CloudStorageResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageResourceReference) String() string { @@ -16228,7 +15928,7 @@ func (*CloudStorageResourceReference) ProtoMessage() {} func (x *CloudStorageResourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16277,11 +15977,9 @@ type DiscoveryCloudStorageGenerationCadence struct { func (x *DiscoveryCloudStorageGenerationCadence) Reset() { *x = DiscoveryCloudStorageGenerationCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudStorageGenerationCadence) String() string { @@ -16292,7 +15990,7 @@ func (*DiscoveryCloudStorageGenerationCadence) ProtoMessage() {} func (x *DiscoveryCloudStorageGenerationCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16342,11 +16040,9 @@ type DiscoveryCloudStorageConditions struct { func (x *DiscoveryCloudStorageConditions) Reset() { *x = DiscoveryCloudStorageConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudStorageConditions) String() string { @@ -16357,7 +16053,7 @@ func (*DiscoveryCloudStorageConditions) ProtoMessage() {} func (x *DiscoveryCloudStorageConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16410,11 +16106,9 @@ type DiscoveryFileStoreConditions struct { func (x *DiscoveryFileStoreConditions) Reset() { *x = DiscoveryFileStoreConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryFileStoreConditions) String() string { @@ -16425,7 +16119,7 @@ func (*DiscoveryFileStoreConditions) ProtoMessage() {} func (x *DiscoveryFileStoreConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16510,11 +16204,9 @@ type OtherCloudDiscoveryTarget struct { func (x *OtherCloudDiscoveryTarget) Reset() { *x = OtherCloudDiscoveryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudDiscoveryTarget) String() string { @@ -16525,7 +16217,7 @@ func (*OtherCloudDiscoveryTarget) ProtoMessage() {} func (x *OtherCloudDiscoveryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16623,11 +16315,9 @@ type DiscoveryOtherCloudFilter struct { func (x *DiscoveryOtherCloudFilter) Reset() { *x = DiscoveryOtherCloudFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryOtherCloudFilter) String() string { @@ -16638,7 +16328,7 @@ func (*DiscoveryOtherCloudFilter) ProtoMessage() {} func (x *DiscoveryOtherCloudFilter) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16726,11 +16416,9 @@ type OtherCloudResourceCollection struct { func (x *OtherCloudResourceCollection) Reset() { *x = OtherCloudResourceCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudResourceCollection) String() string { @@ -16741,7 +16429,7 @@ func (*OtherCloudResourceCollection) ProtoMessage() {} func (x *OtherCloudResourceCollection) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16797,11 +16485,9 @@ type OtherCloudResourceRegexes struct { func (x *OtherCloudResourceRegexes) Reset() { *x = OtherCloudResourceRegexes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudResourceRegexes) String() string { @@ -16812,7 +16498,7 @@ func (*OtherCloudResourceRegexes) ProtoMessage() {} func (x *OtherCloudResourceRegexes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16853,11 +16539,9 @@ type OtherCloudResourceRegex struct { func (x *OtherCloudResourceRegex) Reset() { *x = OtherCloudResourceRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudResourceRegex) String() string { @@ -16868,7 +16552,7 @@ func (*OtherCloudResourceRegex) ProtoMessage() {} func (x *OtherCloudResourceRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16921,11 +16605,9 @@ type AwsAccountRegex struct { func (x *AwsAccountRegex) Reset() { *x = AwsAccountRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAccountRegex) String() string { @@ -16936,7 +16618,7 @@ func (*AwsAccountRegex) ProtoMessage() {} func (x *AwsAccountRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -16973,11 +16655,9 @@ type AmazonS3BucketRegex struct { func (x *AmazonS3BucketRegex) Reset() { *x = AmazonS3BucketRegex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AmazonS3BucketRegex) String() string { @@ -16988,7 +16668,7 @@ func (*AmazonS3BucketRegex) ProtoMessage() {} func (x *AmazonS3BucketRegex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17033,11 +16713,9 @@ type OtherCloudSingleResourceReference struct { func (x *OtherCloudSingleResourceReference) Reset() { *x = OtherCloudSingleResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudSingleResourceReference) String() string { @@ -17048,7 +16726,7 @@ func (*OtherCloudSingleResourceReference) ProtoMessage() {} func (x *OtherCloudSingleResourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17101,11 +16779,9 @@ type AwsAccount struct { func (x *AwsAccount) Reset() { *x = AwsAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAccount) String() string { @@ -17116,7 +16792,7 @@ func (*AwsAccount) ProtoMessage() {} func (x *AwsAccount) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17152,11 +16828,9 @@ type AmazonS3Bucket struct { func (x *AmazonS3Bucket) Reset() { *x = AmazonS3Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AmazonS3Bucket) String() string { @@ -17167,7 +16841,7 @@ func (*AmazonS3Bucket) ProtoMessage() {} func (x *AmazonS3Bucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17216,11 +16890,9 @@ type DiscoveryOtherCloudConditions struct { func (x *DiscoveryOtherCloudConditions) Reset() { *x = DiscoveryOtherCloudConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryOtherCloudConditions) String() string { @@ -17231,7 +16903,7 @@ func (*DiscoveryOtherCloudConditions) ProtoMessage() {} func (x *DiscoveryOtherCloudConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17295,11 +16967,9 @@ type AmazonS3BucketConditions struct { func (x *AmazonS3BucketConditions) Reset() { *x = AmazonS3BucketConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AmazonS3BucketConditions) String() string { @@ -17310,7 +16980,7 @@ func (*AmazonS3BucketConditions) ProtoMessage() {} func (x *AmazonS3BucketConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17358,11 +17028,9 @@ type DiscoveryOtherCloudGenerationCadence struct { func (x *DiscoveryOtherCloudGenerationCadence) Reset() { *x = DiscoveryOtherCloudGenerationCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryOtherCloudGenerationCadence) String() string { @@ -17373,7 +17041,7 @@ func (*DiscoveryOtherCloudGenerationCadence) ProtoMessage() {} func (x *DiscoveryOtherCloudGenerationCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17420,11 +17088,9 @@ type DiscoveryStartingLocation struct { func (x *DiscoveryStartingLocation) Reset() { *x = DiscoveryStartingLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryStartingLocation) String() string { @@ -17435,7 +17101,7 @@ func (*DiscoveryStartingLocation) ProtoMessage() {} func (x *DiscoveryStartingLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17505,11 +17171,9 @@ type OtherCloudDiscoveryStartingLocation struct { func (x *OtherCloudDiscoveryStartingLocation) Reset() { *x = OtherCloudDiscoveryStartingLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudDiscoveryStartingLocation) String() string { @@ -17520,7 +17184,7 @@ func (*OtherCloudDiscoveryStartingLocation) ProtoMessage() {} func (x *OtherCloudDiscoveryStartingLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17570,11 +17234,9 @@ type AllOtherResources struct { func (x *AllOtherResources) Reset() { *x = AllOtherResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllOtherResources) String() string { @@ -17585,7 +17247,7 @@ func (*AllOtherResources) ProtoMessage() {} func (x *AllOtherResources) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17638,11 +17300,9 @@ type DlpJob struct { func (x *DlpJob) Reset() { *x = DlpJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DlpJob) String() string { @@ -17653,7 +17313,7 @@ func (*DlpJob) ProtoMessage() {} func (x *DlpJob) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17789,11 +17449,9 @@ type GetDlpJobRequest struct { func (x *GetDlpJobRequest) Reset() { *x = GetDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDlpJobRequest) String() string { @@ -17804,7 +17462,7 @@ func (*GetDlpJobRequest) ProtoMessage() {} func (x *GetDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17906,11 +17564,9 @@ type ListDlpJobsRequest struct { func (x *ListDlpJobsRequest) Reset() { *x = ListDlpJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDlpJobsRequest) String() string { @@ -17921,7 +17577,7 @@ func (*ListDlpJobsRequest) ProtoMessage() {} func (x *ListDlpJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -17999,11 +17655,9 @@ type ListDlpJobsResponse struct { func (x *ListDlpJobsResponse) Reset() { *x = ListDlpJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDlpJobsResponse) String() string { @@ -18014,7 +17668,7 @@ func (*ListDlpJobsResponse) ProtoMessage() {} func (x *ListDlpJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18055,11 +17709,9 @@ type CancelDlpJobRequest struct { func (x *CancelDlpJobRequest) Reset() { *x = CancelDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelDlpJobRequest) String() string { @@ -18070,7 +17722,7 @@ func (*CancelDlpJobRequest) ProtoMessage() {} func (x *CancelDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18104,11 +17756,9 @@ type FinishDlpJobRequest struct { func (x *FinishDlpJobRequest) Reset() { *x = FinishDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinishDlpJobRequest) String() string { @@ -18119,7 +17769,7 @@ func (*FinishDlpJobRequest) ProtoMessage() {} func (x *FinishDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18153,11 +17803,9 @@ type DeleteDlpJobRequest struct { func (x *DeleteDlpJobRequest) Reset() { *x = DeleteDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDlpJobRequest) String() string { @@ -18168,7 +17816,7 @@ func (*DeleteDlpJobRequest) ProtoMessage() {} func (x *DeleteDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18230,11 +17878,9 @@ type CreateDeidentifyTemplateRequest struct { func (x *CreateDeidentifyTemplateRequest) Reset() { *x = CreateDeidentifyTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeidentifyTemplateRequest) String() string { @@ -18245,7 +17891,7 @@ func (*CreateDeidentifyTemplateRequest) ProtoMessage() {} func (x *CreateDeidentifyTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18307,11 +17953,9 @@ type UpdateDeidentifyTemplateRequest struct { func (x *UpdateDeidentifyTemplateRequest) Reset() { *x = UpdateDeidentifyTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeidentifyTemplateRequest) String() string { @@ -18322,7 +17966,7 @@ func (*UpdateDeidentifyTemplateRequest) ProtoMessage() {} func (x *UpdateDeidentifyTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18372,11 +18016,9 @@ type GetDeidentifyTemplateRequest struct { func (x *GetDeidentifyTemplateRequest) Reset() { *x = GetDeidentifyTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeidentifyTemplateRequest) String() string { @@ -18387,7 +18029,7 @@ func (*GetDeidentifyTemplateRequest) ProtoMessage() {} func (x *GetDeidentifyTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18462,11 +18104,9 @@ type ListDeidentifyTemplatesRequest struct { func (x *ListDeidentifyTemplatesRequest) Reset() { *x = ListDeidentifyTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeidentifyTemplatesRequest) String() string { @@ -18477,7 +18117,7 @@ func (*ListDeidentifyTemplatesRequest) ProtoMessage() {} func (x *ListDeidentifyTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18543,11 +18183,9 @@ type ListDeidentifyTemplatesResponse struct { func (x *ListDeidentifyTemplatesResponse) Reset() { *x = ListDeidentifyTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeidentifyTemplatesResponse) String() string { @@ -18558,7 +18196,7 @@ func (*ListDeidentifyTemplatesResponse) ProtoMessage() {} func (x *ListDeidentifyTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18602,11 +18240,9 @@ type DeleteDeidentifyTemplateRequest struct { func (x *DeleteDeidentifyTemplateRequest) Reset() { *x = DeleteDeidentifyTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeidentifyTemplateRequest) String() string { @@ -18617,7 +18253,7 @@ func (*DeleteDeidentifyTemplateRequest) ProtoMessage() {} func (x *DeleteDeidentifyTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18666,11 +18302,9 @@ type LargeCustomDictionaryConfig struct { func (x *LargeCustomDictionaryConfig) Reset() { *x = LargeCustomDictionaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LargeCustomDictionaryConfig) String() string { @@ -18681,7 +18315,7 @@ func (*LargeCustomDictionaryConfig) ProtoMessage() {} func (x *LargeCustomDictionaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18754,11 +18388,9 @@ type LargeCustomDictionaryStats struct { func (x *LargeCustomDictionaryStats) Reset() { *x = LargeCustomDictionaryStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LargeCustomDictionaryStats) String() string { @@ -18769,7 +18401,7 @@ func (*LargeCustomDictionaryStats) ProtoMessage() {} func (x *LargeCustomDictionaryStats) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18815,11 +18447,9 @@ type StoredInfoTypeConfig struct { func (x *StoredInfoTypeConfig) Reset() { *x = StoredInfoTypeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredInfoTypeConfig) String() string { @@ -18830,7 +18460,7 @@ func (*StoredInfoTypeConfig) ProtoMessage() {} func (x *StoredInfoTypeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -18928,11 +18558,9 @@ type StoredInfoTypeStats struct { func (x *StoredInfoTypeStats) Reset() { *x = StoredInfoTypeStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredInfoTypeStats) String() string { @@ -18943,7 +18571,7 @@ func (*StoredInfoTypeStats) ProtoMessage() {} func (x *StoredInfoTypeStats) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19018,11 +18646,9 @@ type StoredInfoTypeVersion struct { func (x *StoredInfoTypeVersion) Reset() { *x = StoredInfoTypeVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[186] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[186] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredInfoTypeVersion) String() string { @@ -19033,7 +18659,7 @@ func (*StoredInfoTypeVersion) ProtoMessage() {} func (x *StoredInfoTypeVersion) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[186] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19101,11 +18727,9 @@ type StoredInfoType struct { func (x *StoredInfoType) Reset() { *x = StoredInfoType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[187] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[187] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredInfoType) String() string { @@ -19116,7 +18740,7 @@ func (*StoredInfoType) ProtoMessage() {} func (x *StoredInfoType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[187] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19192,11 +18816,9 @@ type CreateStoredInfoTypeRequest struct { func (x *CreateStoredInfoTypeRequest) Reset() { *x = CreateStoredInfoTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[188] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[188] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStoredInfoTypeRequest) String() string { @@ -19207,7 +18829,7 @@ func (*CreateStoredInfoTypeRequest) ProtoMessage() {} func (x *CreateStoredInfoTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[188] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19270,11 +18892,9 @@ type UpdateStoredInfoTypeRequest struct { func (x *UpdateStoredInfoTypeRequest) Reset() { *x = UpdateStoredInfoTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[189] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[189] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStoredInfoTypeRequest) String() string { @@ -19285,7 +18905,7 @@ func (*UpdateStoredInfoTypeRequest) ProtoMessage() {} func (x *UpdateStoredInfoTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[189] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19335,11 +18955,9 @@ type GetStoredInfoTypeRequest struct { func (x *GetStoredInfoTypeRequest) Reset() { *x = GetStoredInfoTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[190] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[190] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStoredInfoTypeRequest) String() string { @@ -19350,7 +18968,7 @@ func (*GetStoredInfoTypeRequest) ProtoMessage() {} func (x *GetStoredInfoTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[190] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19422,11 +19040,9 @@ type ListStoredInfoTypesRequest struct { func (x *ListStoredInfoTypesRequest) Reset() { *x = ListStoredInfoTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[191] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[191] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoredInfoTypesRequest) String() string { @@ -19437,7 +19053,7 @@ func (*ListStoredInfoTypesRequest) ProtoMessage() {} func (x *ListStoredInfoTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[191] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19502,11 +19118,9 @@ type ListStoredInfoTypesResponse struct { func (x *ListStoredInfoTypesResponse) Reset() { *x = ListStoredInfoTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[192] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[192] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoredInfoTypesResponse) String() string { @@ -19517,7 +19131,7 @@ func (*ListStoredInfoTypesResponse) ProtoMessage() {} func (x *ListStoredInfoTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[192] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19560,11 +19174,9 @@ type DeleteStoredInfoTypeRequest struct { func (x *DeleteStoredInfoTypeRequest) Reset() { *x = DeleteStoredInfoTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[193] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[193] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStoredInfoTypeRequest) String() string { @@ -19575,7 +19187,7 @@ func (*DeleteStoredInfoTypeRequest) ProtoMessage() {} func (x *DeleteStoredInfoTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[193] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19612,11 +19224,9 @@ type HybridInspectJobTriggerRequest struct { func (x *HybridInspectJobTriggerRequest) Reset() { *x = HybridInspectJobTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[194] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[194] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridInspectJobTriggerRequest) String() string { @@ -19627,7 +19237,7 @@ func (*HybridInspectJobTriggerRequest) ProtoMessage() {} func (x *HybridInspectJobTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[194] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19671,11 +19281,9 @@ type HybridInspectDlpJobRequest struct { func (x *HybridInspectDlpJobRequest) Reset() { *x = HybridInspectDlpJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[195] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[195] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridInspectDlpJobRequest) String() string { @@ -19686,7 +19294,7 @@ func (*HybridInspectDlpJobRequest) ProtoMessage() {} func (x *HybridInspectDlpJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[195] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19730,11 +19338,9 @@ type HybridContentItem struct { func (x *HybridContentItem) Reset() { *x = HybridContentItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[196] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[196] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridContentItem) String() string { @@ -19745,7 +19351,7 @@ func (*HybridContentItem) ProtoMessage() {} func (x *HybridContentItem) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[196] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19819,11 +19425,9 @@ type HybridFindingDetails struct { func (x *HybridFindingDetails) Reset() { *x = HybridFindingDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[197] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[197] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridFindingDetails) String() string { @@ -19834,7 +19438,7 @@ func (*HybridFindingDetails) ProtoMessage() {} func (x *HybridFindingDetails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[197] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19893,11 +19497,9 @@ type HybridInspectResponse struct { func (x *HybridInspectResponse) Reset() { *x = HybridInspectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[198] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[198] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridInspectResponse) String() string { @@ -19908,7 +19510,7 @@ func (*HybridInspectResponse) ProtoMessage() {} func (x *HybridInspectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[198] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19980,11 +19582,9 @@ type ListProjectDataProfilesRequest struct { func (x *ListProjectDataProfilesRequest) Reset() { *x = ListProjectDataProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[199] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[199] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectDataProfilesRequest) String() string { @@ -19995,7 +19595,7 @@ func (*ListProjectDataProfilesRequest) ProtoMessage() {} func (x *ListProjectDataProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[199] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20059,11 +19659,9 @@ type ListProjectDataProfilesResponse struct { func (x *ListProjectDataProfilesResponse) Reset() { *x = ListProjectDataProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[200] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[200] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectDataProfilesResponse) String() string { @@ -20074,7 +19672,7 @@ func (*ListProjectDataProfilesResponse) ProtoMessage() {} func (x *ListProjectDataProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[200] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20173,11 +19771,9 @@ type ListTableDataProfilesRequest struct { func (x *ListTableDataProfilesRequest) Reset() { *x = ListTableDataProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[201] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[201] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTableDataProfilesRequest) String() string { @@ -20188,7 +19784,7 @@ func (*ListTableDataProfilesRequest) ProtoMessage() {} func (x *ListTableDataProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[201] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20252,11 +19848,9 @@ type ListTableDataProfilesResponse struct { func (x *ListTableDataProfilesResponse) Reset() { *x = ListTableDataProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[202] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[202] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTableDataProfilesResponse) String() string { @@ -20267,7 +19861,7 @@ func (*ListTableDataProfilesResponse) ProtoMessage() {} func (x *ListTableDataProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[202] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20367,11 +19961,9 @@ type ListColumnDataProfilesRequest struct { func (x *ListColumnDataProfilesRequest) Reset() { *x = ListColumnDataProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[203] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[203] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListColumnDataProfilesRequest) String() string { @@ -20382,7 +19974,7 @@ func (*ListColumnDataProfilesRequest) ProtoMessage() {} func (x *ListColumnDataProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[203] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20446,11 +20038,9 @@ type ListColumnDataProfilesResponse struct { func (x *ListColumnDataProfilesResponse) Reset() { *x = ListColumnDataProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[204] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[204] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListColumnDataProfilesResponse) String() string { @@ -20461,7 +20051,7 @@ func (*ListColumnDataProfilesResponse) ProtoMessage() {} func (x *ListColumnDataProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[204] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20503,11 +20093,9 @@ type DataRiskLevel struct { func (x *DataRiskLevel) Reset() { *x = DataRiskLevel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[205] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[205] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataRiskLevel) String() string { @@ -20518,7 +20106,7 @@ func (*DataRiskLevel) ProtoMessage() {} func (x *DataRiskLevel) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[205] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20567,11 +20155,9 @@ type ProjectDataProfile struct { func (x *ProjectDataProfile) Reset() { *x = ProjectDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[206] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[206] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectDataProfile) String() string { @@ -20582,7 +20168,7 @@ func (*ProjectDataProfile) ProtoMessage() {} func (x *ProjectDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[206] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20680,11 +20266,9 @@ type DataProfileConfigSnapshot struct { func (x *DataProfileConfigSnapshot) Reset() { *x = DataProfileConfigSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[207] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[207] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileConfigSnapshot) String() string { @@ -20695,7 +20279,7 @@ func (*DataProfileConfigSnapshot) ProtoMessage() {} func (x *DataProfileConfigSnapshot) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[207] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -20814,11 +20398,9 @@ type TableDataProfile struct { func (x *TableDataProfile) Reset() { *x = TableDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[208] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[208] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableDataProfile) String() string { @@ -20829,7 +20411,7 @@ func (*TableDataProfile) ProtoMessage() {} func (x *TableDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[208] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21041,11 +20623,9 @@ type ProfileStatus struct { func (x *ProfileStatus) Reset() { *x = ProfileStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[209] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[209] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProfileStatus) String() string { @@ -21056,7 +20636,7 @@ func (*ProfileStatus) ProtoMessage() {} func (x *ProfileStatus) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[209] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21101,11 +20681,9 @@ type InfoTypeSummary struct { func (x *InfoTypeSummary) Reset() { *x = InfoTypeSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[210] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[210] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeSummary) String() string { @@ -21116,7 +20694,7 @@ func (*InfoTypeSummary) ProtoMessage() {} func (x *InfoTypeSummary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[210] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21164,11 +20742,9 @@ type OtherInfoTypeSummary struct { func (x *OtherInfoTypeSummary) Reset() { *x = OtherInfoTypeSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[211] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[211] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherInfoTypeSummary) String() string { @@ -21179,7 +20755,7 @@ func (*OtherInfoTypeSummary) ProtoMessage() {} func (x *OtherInfoTypeSummary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[211] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21273,11 +20849,9 @@ type ColumnDataProfile struct { func (x *ColumnDataProfile) Reset() { *x = ColumnDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[212] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[212] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnDataProfile) String() string { @@ -21288,7 +20862,7 @@ func (*ColumnDataProfile) ProtoMessage() {} func (x *ColumnDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[212] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21527,11 +21101,9 @@ type FileStoreDataProfile struct { func (x *FileStoreDataProfile) Reset() { *x = FileStoreDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[213] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[213] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStoreDataProfile) String() string { @@ -21542,7 +21114,7 @@ func (*FileStoreDataProfile) ProtoMessage() {} func (x *FileStoreDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[213] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21730,11 +21302,9 @@ type FileStoreInfoTypeSummary struct { func (x *FileStoreInfoTypeSummary) Reset() { *x = FileStoreInfoTypeSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[214] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[214] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileStoreInfoTypeSummary) String() string { @@ -21745,7 +21315,7 @@ func (*FileStoreInfoTypeSummary) ProtoMessage() {} func (x *FileStoreInfoTypeSummary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[214] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21779,11 +21349,9 @@ type FileExtensionInfo struct { func (x *FileExtensionInfo) Reset() { *x = FileExtensionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[215] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[215] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileExtensionInfo) String() string { @@ -21794,7 +21362,7 @@ func (*FileExtensionInfo) ProtoMessage() {} func (x *FileExtensionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[215] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21850,11 +21418,9 @@ type FileClusterSummary struct { func (x *FileClusterSummary) Reset() { *x = FileClusterSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[216] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[216] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileClusterSummary) String() string { @@ -21865,7 +21431,7 @@ func (*FileClusterSummary) ProtoMessage() {} func (x *FileClusterSummary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[216] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21949,11 +21515,9 @@ type GetProjectDataProfileRequest struct { func (x *GetProjectDataProfileRequest) Reset() { *x = GetProjectDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[217] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[217] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectDataProfileRequest) String() string { @@ -21964,7 +21528,7 @@ func (*GetProjectDataProfileRequest) ProtoMessage() {} func (x *GetProjectDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[217] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -21999,11 +21563,9 @@ type GetFileStoreDataProfileRequest struct { func (x *GetFileStoreDataProfileRequest) Reset() { *x = GetFileStoreDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[218] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[218] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFileStoreDataProfileRequest) String() string { @@ -22014,7 +21576,7 @@ func (*GetFileStoreDataProfileRequest) ProtoMessage() {} func (x *GetFileStoreDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[218] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22112,11 +21674,9 @@ type ListFileStoreDataProfilesRequest struct { func (x *ListFileStoreDataProfilesRequest) Reset() { *x = ListFileStoreDataProfilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[219] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[219] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFileStoreDataProfilesRequest) String() string { @@ -22127,7 +21687,7 @@ func (*ListFileStoreDataProfilesRequest) ProtoMessage() {} func (x *ListFileStoreDataProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[219] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22192,11 +21752,9 @@ type ListFileStoreDataProfilesResponse struct { func (x *ListFileStoreDataProfilesResponse) Reset() { *x = ListFileStoreDataProfilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[220] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[220] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFileStoreDataProfilesResponse) String() string { @@ -22207,7 +21765,7 @@ func (*ListFileStoreDataProfilesResponse) ProtoMessage() {} func (x *ListFileStoreDataProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[220] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22248,11 +21806,9 @@ type DeleteFileStoreDataProfileRequest struct { func (x *DeleteFileStoreDataProfileRequest) Reset() { *x = DeleteFileStoreDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[221] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[221] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFileStoreDataProfileRequest) String() string { @@ -22263,7 +21819,7 @@ func (*DeleteFileStoreDataProfileRequest) ProtoMessage() {} func (x *DeleteFileStoreDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[221] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22298,11 +21854,9 @@ type GetTableDataProfileRequest struct { func (x *GetTableDataProfileRequest) Reset() { *x = GetTableDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[222] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[222] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTableDataProfileRequest) String() string { @@ -22313,7 +21867,7 @@ func (*GetTableDataProfileRequest) ProtoMessage() {} func (x *GetTableDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[222] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22348,11 +21902,9 @@ type GetColumnDataProfileRequest struct { func (x *GetColumnDataProfileRequest) Reset() { *x = GetColumnDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[223] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[223] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetColumnDataProfileRequest) String() string { @@ -22363,7 +21915,7 @@ func (*GetColumnDataProfileRequest) ProtoMessage() {} func (x *GetColumnDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[223] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22397,11 +21949,9 @@ type DataProfilePubSubCondition struct { func (x *DataProfilePubSubCondition) Reset() { *x = DataProfilePubSubCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[224] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[224] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfilePubSubCondition) String() string { @@ -22412,7 +21962,7 @@ func (*DataProfilePubSubCondition) ProtoMessage() {} func (x *DataProfilePubSubCondition) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[224] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22456,11 +22006,9 @@ type DataProfilePubSubMessage struct { func (x *DataProfilePubSubMessage) Reset() { *x = DataProfilePubSubMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[225] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[225] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfilePubSubMessage) String() string { @@ -22471,7 +22019,7 @@ func (*DataProfilePubSubMessage) ProtoMessage() {} func (x *DataProfilePubSubMessage) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[225] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22529,11 +22077,9 @@ type CreateConnectionRequest struct { func (x *CreateConnectionRequest) Reset() { *x = CreateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[226] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[226] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectionRequest) String() string { @@ -22544,7 +22090,7 @@ func (*CreateConnectionRequest) ProtoMessage() {} func (x *CreateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[226] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22586,11 +22132,9 @@ type GetConnectionRequest struct { func (x *GetConnectionRequest) Reset() { *x = GetConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[227] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[227] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectionRequest) String() string { @@ -22601,7 +22145,7 @@ func (*GetConnectionRequest) ProtoMessage() {} func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[227] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22644,11 +22188,9 @@ type ListConnectionsRequest struct { func (x *ListConnectionsRequest) Reset() { *x = ListConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[228] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[228] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsRequest) String() string { @@ -22659,7 +22201,7 @@ func (*ListConnectionsRequest) ProtoMessage() {} func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[228] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22723,11 +22265,9 @@ type SearchConnectionsRequest struct { func (x *SearchConnectionsRequest) Reset() { *x = SearchConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[229] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[229] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchConnectionsRequest) String() string { @@ -22738,7 +22278,7 @@ func (*SearchConnectionsRequest) ProtoMessage() {} func (x *SearchConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[229] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22796,11 +22336,9 @@ type ListConnectionsResponse struct { func (x *ListConnectionsResponse) Reset() { *x = ListConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[230] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[230] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectionsResponse) String() string { @@ -22811,7 +22349,7 @@ func (*ListConnectionsResponse) ProtoMessage() {} func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[230] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22857,11 +22395,9 @@ type SearchConnectionsResponse struct { func (x *SearchConnectionsResponse) Reset() { *x = SearchConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[231] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[231] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchConnectionsResponse) String() string { @@ -22872,7 +22408,7 @@ func (*SearchConnectionsResponse) ProtoMessage() {} func (x *SearchConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[231] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22918,11 +22454,9 @@ type UpdateConnectionRequest struct { func (x *UpdateConnectionRequest) Reset() { *x = UpdateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[232] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[232] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectionRequest) String() string { @@ -22933,7 +22467,7 @@ func (*UpdateConnectionRequest) ProtoMessage() {} func (x *UpdateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[232] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -22982,11 +22516,9 @@ type DeleteConnectionRequest struct { func (x *DeleteConnectionRequest) Reset() { *x = DeleteConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[233] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[233] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectionRequest) String() string { @@ -22997,7 +22529,7 @@ func (*DeleteConnectionRequest) ProtoMessage() {} func (x *DeleteConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[233] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23044,11 +22576,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[234] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[234] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -23059,7 +22589,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[234] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23138,11 +22668,9 @@ type SecretManagerCredential struct { func (x *SecretManagerCredential) Reset() { *x = SecretManagerCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[235] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[235] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretManagerCredential) String() string { @@ -23153,7 +22681,7 @@ func (*SecretManagerCredential) ProtoMessage() {} func (x *SecretManagerCredential) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[235] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23194,11 +22722,9 @@ type CloudSqlIamCredential struct { func (x *CloudSqlIamCredential) Reset() { *x = CloudSqlIamCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[236] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[236] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlIamCredential) String() string { @@ -23209,7 +22735,7 @@ func (*CloudSqlIamCredential) ProtoMessage() {} func (x *CloudSqlIamCredential) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[236] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23258,11 +22784,9 @@ type CloudSqlProperties struct { func (x *CloudSqlProperties) Reset() { *x = CloudSqlProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[237] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[237] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlProperties) String() string { @@ -23273,7 +22797,7 @@ func (*CloudSqlProperties) ProtoMessage() {} func (x *CloudSqlProperties) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[237] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23360,11 +22884,9 @@ type DeleteTableDataProfileRequest struct { func (x *DeleteTableDataProfileRequest) Reset() { *x = DeleteTableDataProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[238] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[238] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTableDataProfileRequest) String() string { @@ -23375,7 +22897,7 @@ func (*DeleteTableDataProfileRequest) ProtoMessage() {} func (x *DeleteTableDataProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[238] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23415,11 +22937,9 @@ type DataSourceType struct { func (x *DataSourceType) Reset() { *x = DataSourceType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[239] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[239] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceType) String() string { @@ -23430,7 +22950,7 @@ func (*DataSourceType) ProtoMessage() {} func (x *DataSourceType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[239] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23468,11 +22988,9 @@ type FileClusterType struct { func (x *FileClusterType) Reset() { *x = FileClusterType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[240] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[240] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileClusterType) String() string { @@ -23483,7 +23001,7 @@ func (*FileClusterType) ProtoMessage() {} func (x *FileClusterType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[240] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23544,11 +23062,9 @@ type InspectConfig_InfoTypeLikelihood struct { func (x *InspectConfig_InfoTypeLikelihood) Reset() { *x = InspectConfig_InfoTypeLikelihood{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[241] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[241] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectConfig_InfoTypeLikelihood) String() string { @@ -23559,7 +23075,7 @@ func (*InspectConfig_InfoTypeLikelihood) ProtoMessage() {} func (x *InspectConfig_InfoTypeLikelihood) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[241] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23630,11 +23146,9 @@ type InspectConfig_FindingLimits struct { func (x *InspectConfig_FindingLimits) Reset() { *x = InspectConfig_FindingLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[242] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[242] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectConfig_FindingLimits) String() string { @@ -23645,7 +23159,7 @@ func (*InspectConfig_FindingLimits) ProtoMessage() {} func (x *InspectConfig_FindingLimits) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[242] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23699,11 +23213,9 @@ type InspectConfig_FindingLimits_InfoTypeLimit struct { func (x *InspectConfig_FindingLimits_InfoTypeLimit) Reset() { *x = InspectConfig_FindingLimits_InfoTypeLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[243] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[243] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectConfig_FindingLimits_InfoTypeLimit) String() string { @@ -23714,7 +23226,7 @@ func (*InspectConfig_FindingLimits_InfoTypeLimit) ProtoMessage() {} func (x *InspectConfig_FindingLimits_InfoTypeLimit) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[243] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23755,11 +23267,9 @@ type Table_Row struct { func (x *Table_Row) Reset() { *x = Table_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[244] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[244] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table_Row) String() string { @@ -23770,7 +23280,7 @@ func (*Table_Row) ProtoMessage() {} func (x *Table_Row) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[244] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23812,11 +23322,9 @@ type RedactImageRequest_ImageRedactionConfig struct { func (x *RedactImageRequest_ImageRedactionConfig) Reset() { *x = RedactImageRequest_ImageRedactionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[246] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[246] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedactImageRequest_ImageRedactionConfig) String() string { @@ -23827,7 +23335,7 @@ func (*RedactImageRequest_ImageRedactionConfig) ProtoMessage() {} func (x *RedactImageRequest_ImageRedactionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[246] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23909,11 +23417,9 @@ type InspectDataSourceDetails_RequestedOptions struct { func (x *InspectDataSourceDetails_RequestedOptions) Reset() { *x = InspectDataSourceDetails_RequestedOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[247] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[247] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectDataSourceDetails_RequestedOptions) String() string { @@ -23924,7 +23430,7 @@ func (*InspectDataSourceDetails_RequestedOptions) ProtoMessage() {} func (x *InspectDataSourceDetails_RequestedOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[247] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -23975,11 +23481,9 @@ type InspectDataSourceDetails_Result struct { func (x *InspectDataSourceDetails_Result) Reset() { *x = InspectDataSourceDetails_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[248] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[248] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InspectDataSourceDetails_Result) String() string { @@ -23990,7 +23494,7 @@ func (*InspectDataSourceDetails_Result) ProtoMessage() {} func (x *InspectDataSourceDetails_Result) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[248] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24060,11 +23564,9 @@ type DeidentifyDataSourceDetails_RequestedDeidentifyOptions struct { func (x *DeidentifyDataSourceDetails_RequestedDeidentifyOptions) Reset() { *x = DeidentifyDataSourceDetails_RequestedDeidentifyOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[249] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[249] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeidentifyDataSourceDetails_RequestedDeidentifyOptions) String() string { @@ -24075,7 +23577,7 @@ func (*DeidentifyDataSourceDetails_RequestedDeidentifyOptions) ProtoMessage() {} func (x *DeidentifyDataSourceDetails_RequestedDeidentifyOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[249] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24128,11 +23630,9 @@ type StatisticalTable_QuasiIdentifierField struct { func (x *StatisticalTable_QuasiIdentifierField) Reset() { *x = StatisticalTable_QuasiIdentifierField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[250] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[250] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatisticalTable_QuasiIdentifierField) String() string { @@ -24143,7 +23643,7 @@ func (*StatisticalTable_QuasiIdentifierField) ProtoMessage() {} func (x *StatisticalTable_QuasiIdentifierField) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[250] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24186,11 +23686,9 @@ type PrivacyMetric_NumericalStatsConfig struct { func (x *PrivacyMetric_NumericalStatsConfig) Reset() { *x = PrivacyMetric_NumericalStatsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[251] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[251] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_NumericalStatsConfig) String() string { @@ -24201,7 +23699,7 @@ func (*PrivacyMetric_NumericalStatsConfig) ProtoMessage() {} func (x *PrivacyMetric_NumericalStatsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[251] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24239,11 +23737,9 @@ type PrivacyMetric_CategoricalStatsConfig struct { func (x *PrivacyMetric_CategoricalStatsConfig) Reset() { *x = PrivacyMetric_CategoricalStatsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[252] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[252] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_CategoricalStatsConfig) String() string { @@ -24254,7 +23750,7 @@ func (*PrivacyMetric_CategoricalStatsConfig) ProtoMessage() {} func (x *PrivacyMetric_CategoricalStatsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[252] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24303,11 +23799,9 @@ type PrivacyMetric_KAnonymityConfig struct { func (x *PrivacyMetric_KAnonymityConfig) Reset() { *x = PrivacyMetric_KAnonymityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[253] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[253] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_KAnonymityConfig) String() string { @@ -24318,7 +23812,7 @@ func (*PrivacyMetric_KAnonymityConfig) ProtoMessage() {} func (x *PrivacyMetric_KAnonymityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[253] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24363,11 +23857,9 @@ type PrivacyMetric_LDiversityConfig struct { func (x *PrivacyMetric_LDiversityConfig) Reset() { *x = PrivacyMetric_LDiversityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[254] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[254] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_LDiversityConfig) String() string { @@ -24378,7 +23870,7 @@ func (*PrivacyMetric_LDiversityConfig) ProtoMessage() {} func (x *PrivacyMetric_LDiversityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[254] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24433,11 +23925,9 @@ type PrivacyMetric_KMapEstimationConfig struct { func (x *PrivacyMetric_KMapEstimationConfig) Reset() { *x = PrivacyMetric_KMapEstimationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[255] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[255] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_KMapEstimationConfig) String() string { @@ -24448,7 +23938,7 @@ func (*PrivacyMetric_KMapEstimationConfig) ProtoMessage() {} func (x *PrivacyMetric_KMapEstimationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[255] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24508,11 +23998,9 @@ type PrivacyMetric_DeltaPresenceEstimationConfig struct { func (x *PrivacyMetric_DeltaPresenceEstimationConfig) Reset() { *x = PrivacyMetric_DeltaPresenceEstimationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[256] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[256] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_DeltaPresenceEstimationConfig) String() string { @@ -24523,7 +24011,7 @@ func (*PrivacyMetric_DeltaPresenceEstimationConfig) ProtoMessage() {} func (x *PrivacyMetric_DeltaPresenceEstimationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[256] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24581,11 +24069,9 @@ type PrivacyMetric_KMapEstimationConfig_TaggedField struct { func (x *PrivacyMetric_KMapEstimationConfig_TaggedField) Reset() { *x = PrivacyMetric_KMapEstimationConfig_TaggedField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[257] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[257] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_KMapEstimationConfig_TaggedField) String() string { @@ -24596,7 +24082,7 @@ func (*PrivacyMetric_KMapEstimationConfig_TaggedField) ProtoMessage() {} func (x *PrivacyMetric_KMapEstimationConfig_TaggedField) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[257] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24704,11 +24190,9 @@ type PrivacyMetric_KMapEstimationConfig_AuxiliaryTable struct { func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable) Reset() { *x = PrivacyMetric_KMapEstimationConfig_AuxiliaryTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[258] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[258] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable) String() string { @@ -24719,7 +24203,7 @@ func (*PrivacyMetric_KMapEstimationConfig_AuxiliaryTable) ProtoMessage() {} func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[258] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24770,11 +24254,9 @@ type PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField struct { func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField) Reset() { *x = PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[259] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[259] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField) String() string { @@ -24785,7 +24267,7 @@ func (*PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField) ProtoMess func (x *PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[259] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24831,11 +24313,9 @@ type AnalyzeDataSourceRiskDetails_NumericalStatsResult struct { func (x *AnalyzeDataSourceRiskDetails_NumericalStatsResult) Reset() { *x = AnalyzeDataSourceRiskDetails_NumericalStatsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[260] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[260] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_NumericalStatsResult) String() string { @@ -24846,7 +24326,7 @@ func (*AnalyzeDataSourceRiskDetails_NumericalStatsResult) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails_NumericalStatsResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[260] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24894,11 +24374,9 @@ type AnalyzeDataSourceRiskDetails_CategoricalStatsResult struct { func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult) Reset() { *x = AnalyzeDataSourceRiskDetails_CategoricalStatsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[261] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[261] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult) String() string { @@ -24909,7 +24387,7 @@ func (*AnalyzeDataSourceRiskDetails_CategoricalStatsResult) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[261] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24943,11 +24421,9 @@ type AnalyzeDataSourceRiskDetails_KAnonymityResult struct { func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult) Reset() { *x = AnalyzeDataSourceRiskDetails_KAnonymityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[262] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[262] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult) String() string { @@ -24958,7 +24434,7 @@ func (*AnalyzeDataSourceRiskDetails_KAnonymityResult) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[262] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -24992,11 +24468,9 @@ type AnalyzeDataSourceRiskDetails_LDiversityResult struct { func (x *AnalyzeDataSourceRiskDetails_LDiversityResult) Reset() { *x = AnalyzeDataSourceRiskDetails_LDiversityResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[263] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[263] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_LDiversityResult) String() string { @@ -25007,7 +24481,7 @@ func (*AnalyzeDataSourceRiskDetails_LDiversityResult) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails_LDiversityResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[263] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25051,11 +24525,9 @@ type AnalyzeDataSourceRiskDetails_KMapEstimationResult struct { func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult) Reset() { *x = AnalyzeDataSourceRiskDetails_KMapEstimationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[264] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[264] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult) String() string { @@ -25066,7 +24538,7 @@ func (*AnalyzeDataSourceRiskDetails_KMapEstimationResult) ProtoMessage() {} func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[264] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25110,11 +24582,9 @@ type AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult struct { func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult) Reset() { *x = AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[265] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[265] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult) String() string { @@ -25125,7 +24595,7 @@ func (*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult) ProtoMessage( func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[265] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25159,11 +24629,9 @@ type AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions struct { func (x *AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions) Reset() { *x = AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[266] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[266] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions) String() string { @@ -25174,7 +24642,7 @@ func (*AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions) ProtoMessage() func (x *AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[266] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25217,11 +24685,9 @@ type AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogr func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket) Reset() { *x = AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[267] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[267] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket) String() string { @@ -25233,7 +24699,7 @@ func (*AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHisto func (x *AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[267] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25300,11 +24766,9 @@ type AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass st func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass) Reset() { *x = AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[268] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[268] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass) String() string { @@ -25315,7 +24779,7 @@ func (*AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass) func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[268] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25365,11 +24829,9 @@ type AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket str func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket) Reset() { *x = AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[269] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[269] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket) String() string { @@ -25380,7 +24842,7 @@ func (*AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket) func (x *AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[269] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25449,11 +24911,9 @@ type AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass st func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass) Reset() { *x = AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[270] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[270] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass) String() string { @@ -25464,7 +24924,7 @@ func (*AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass) func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[270] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25530,11 +24990,9 @@ type AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket str func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket) Reset() { *x = AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[271] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[271] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket) String() string { @@ -25545,7 +25003,7 @@ func (*AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket) func (x *AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[271] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25609,11 +25067,9 @@ type AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValu func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues) Reset() { *x = AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[272] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[272] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues) String() string { @@ -25625,7 +25081,7 @@ func (*AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdVa func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[272] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25684,11 +25140,9 @@ type AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBu func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket) Reset() { *x = AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[273] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[273] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket) String() string { @@ -25700,7 +25154,7 @@ func (*AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogram func (x *AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[273] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25771,11 +25225,9 @@ type AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEst func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues) Reset() { *x = AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[274] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[274] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues) String() string { @@ -25787,7 +25239,7 @@ func (*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceE func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[274] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25847,11 +25299,9 @@ type AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEst func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket) Reset() { *x = AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[275] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[275] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket) String() string { @@ -25863,7 +25313,7 @@ func (*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceE func (x *AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[275] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25926,11 +25376,9 @@ type DateTime_TimeZone struct { func (x *DateTime_TimeZone) Reset() { *x = DateTime_TimeZone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[276] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[276] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateTime_TimeZone) String() string { @@ -25941,7 +25389,7 @@ func (*DateTime_TimeZone) ProtoMessage() {} func (x *DateTime_TimeZone) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[276] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -25984,11 +25432,9 @@ type ImageTransformations_ImageTransformation struct { func (x *ImageTransformations_ImageTransformation) Reset() { *x = ImageTransformations_ImageTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[277] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[277] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageTransformations_ImageTransformation) String() string { @@ -25999,7 +25445,7 @@ func (*ImageTransformations_ImageTransformation) ProtoMessage() {} func (x *ImageTransformations_ImageTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[277] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26093,11 +25539,9 @@ type ImageTransformations_ImageTransformation_SelectedInfoTypes struct { func (x *ImageTransformations_ImageTransformation_SelectedInfoTypes) Reset() { *x = ImageTransformations_ImageTransformation_SelectedInfoTypes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[278] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[278] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageTransformations_ImageTransformation_SelectedInfoTypes) String() string { @@ -26108,7 +25552,7 @@ func (*ImageTransformations_ImageTransformation_SelectedInfoTypes) ProtoMessage( func (x *ImageTransformations_ImageTransformation_SelectedInfoTypes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[278] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26139,11 +25583,9 @@ type ImageTransformations_ImageTransformation_AllInfoTypes struct { func (x *ImageTransformations_ImageTransformation_AllInfoTypes) Reset() { *x = ImageTransformations_ImageTransformation_AllInfoTypes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[279] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[279] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageTransformations_ImageTransformation_AllInfoTypes) String() string { @@ -26154,7 +25596,7 @@ func (*ImageTransformations_ImageTransformation_AllInfoTypes) ProtoMessage() {} func (x *ImageTransformations_ImageTransformation_AllInfoTypes) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[279] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26178,11 +25620,9 @@ type ImageTransformations_ImageTransformation_AllText struct { func (x *ImageTransformations_ImageTransformation_AllText) Reset() { *x = ImageTransformations_ImageTransformation_AllText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[280] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[280] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageTransformations_ImageTransformation_AllText) String() string { @@ -26193,7 +25633,7 @@ func (*ImageTransformations_ImageTransformation_AllText) ProtoMessage() {} func (x *ImageTransformations_ImageTransformation_AllText) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[280] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26217,11 +25657,9 @@ type TransformationErrorHandling_ThrowError struct { func (x *TransformationErrorHandling_ThrowError) Reset() { *x = TransformationErrorHandling_ThrowError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[281] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[281] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationErrorHandling_ThrowError) String() string { @@ -26232,7 +25670,7 @@ func (*TransformationErrorHandling_ThrowError) ProtoMessage() {} func (x *TransformationErrorHandling_ThrowError) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[281] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26259,11 +25697,9 @@ type TransformationErrorHandling_LeaveUntransformed struct { func (x *TransformationErrorHandling_LeaveUntransformed) Reset() { *x = TransformationErrorHandling_LeaveUntransformed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[282] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[282] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationErrorHandling_LeaveUntransformed) String() string { @@ -26274,7 +25710,7 @@ func (*TransformationErrorHandling_LeaveUntransformed) ProtoMessage() {} func (x *TransformationErrorHandling_LeaveUntransformed) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[282] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26306,11 +25742,9 @@ type BucketingConfig_Bucket struct { func (x *BucketingConfig_Bucket) Reset() { *x = BucketingConfig_Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[283] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[283] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BucketingConfig_Bucket) String() string { @@ -26321,7 +25755,7 @@ func (*BucketingConfig_Bucket) ProtoMessage() {} func (x *BucketingConfig_Bucket) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[283] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26374,11 +25808,9 @@ type InfoTypeTransformations_InfoTypeTransformation struct { func (x *InfoTypeTransformations_InfoTypeTransformation) Reset() { *x = InfoTypeTransformations_InfoTypeTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[284] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[284] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoTypeTransformations_InfoTypeTransformation) String() string { @@ -26389,7 +25821,7 @@ func (*InfoTypeTransformations_InfoTypeTransformation) ProtoMessage() {} func (x *InfoTypeTransformations_InfoTypeTransformation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[284] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26452,11 +25884,9 @@ type RecordCondition_Condition struct { func (x *RecordCondition_Condition) Reset() { *x = RecordCondition_Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[285] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[285] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordCondition_Condition) String() string { @@ -26467,7 +25897,7 @@ func (*RecordCondition_Condition) ProtoMessage() {} func (x *RecordCondition_Condition) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[285] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26515,11 +25945,9 @@ type RecordCondition_Conditions struct { func (x *RecordCondition_Conditions) Reset() { *x = RecordCondition_Conditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[286] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[286] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordCondition_Conditions) String() string { @@ -26530,7 +25958,7 @@ func (*RecordCondition_Conditions) ProtoMessage() {} func (x *RecordCondition_Conditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[286] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26571,11 +25999,9 @@ type RecordCondition_Expressions struct { func (x *RecordCondition_Expressions) Reset() { *x = RecordCondition_Expressions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[287] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[287] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordCondition_Expressions) String() string { @@ -26586,7 +26012,7 @@ func (*RecordCondition_Expressions) ProtoMessage() {} func (x *RecordCondition_Expressions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[287] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26651,11 +26077,9 @@ type TransformationSummary_SummaryResult struct { func (x *TransformationSummary_SummaryResult) Reset() { *x = TransformationSummary_SummaryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[288] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[288] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformationSummary_SummaryResult) String() string { @@ -26666,7 +26090,7 @@ func (*TransformationSummary_SummaryResult) ProtoMessage() {} func (x *TransformationSummary_SummaryResult) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[288] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26719,11 +26143,9 @@ type JobTrigger_Trigger struct { func (x *JobTrigger_Trigger) Reset() { *x = JobTrigger_Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[289] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[289] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobTrigger_Trigger) String() string { @@ -26734,7 +26156,7 @@ func (*JobTrigger_Trigger) ProtoMessage() {} func (x *JobTrigger_Trigger) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[289] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26803,11 +26225,9 @@ type Action_SaveFindings struct { func (x *Action_SaveFindings) Reset() { *x = Action_SaveFindings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[290] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[290] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_SaveFindings) String() string { @@ -26818,7 +26238,7 @@ func (*Action_SaveFindings) ProtoMessage() {} func (x *Action_SaveFindings) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[290] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26859,11 +26279,9 @@ type Action_PublishToPubSub struct { func (x *Action_PublishToPubSub) Reset() { *x = Action_PublishToPubSub{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[291] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[291] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_PublishToPubSub) String() string { @@ -26874,7 +26292,7 @@ func (*Action_PublishToPubSub) ProtoMessage() {} func (x *Action_PublishToPubSub) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[291] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26912,11 +26330,9 @@ type Action_PublishSummaryToCscc struct { func (x *Action_PublishSummaryToCscc) Reset() { *x = Action_PublishSummaryToCscc{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[292] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[292] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_PublishSummaryToCscc) String() string { @@ -26927,7 +26343,7 @@ func (*Action_PublishSummaryToCscc) ProtoMessage() {} func (x *Action_PublishSummaryToCscc) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[292] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -26968,11 +26384,9 @@ type Action_PublishFindingsToCloudDataCatalog struct { func (x *Action_PublishFindingsToCloudDataCatalog) Reset() { *x = Action_PublishFindingsToCloudDataCatalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[293] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[293] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_PublishFindingsToCloudDataCatalog) String() string { @@ -26983,7 +26397,7 @@ func (*Action_PublishFindingsToCloudDataCatalog) ProtoMessage() {} func (x *Action_PublishFindingsToCloudDataCatalog) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[293] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27046,11 +26460,9 @@ type Action_Deidentify struct { func (x *Action_Deidentify) Reset() { *x = Action_Deidentify{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[294] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[294] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_Deidentify) String() string { @@ -27061,7 +26473,7 @@ func (*Action_Deidentify) ProtoMessage() {} func (x *Action_Deidentify) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[294] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27139,11 +26551,9 @@ type Action_JobNotificationEmails struct { func (x *Action_JobNotificationEmails) Reset() { *x = Action_JobNotificationEmails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[295] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[295] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_JobNotificationEmails) String() string { @@ -27154,7 +26564,7 @@ func (*Action_JobNotificationEmails) ProtoMessage() {} func (x *Action_JobNotificationEmails) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[295] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27181,11 +26591,9 @@ type Action_PublishToStackdriver struct { func (x *Action_PublishToStackdriver) Reset() { *x = Action_PublishToStackdriver{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[296] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[296] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action_PublishToStackdriver) String() string { @@ -27196,7 +26604,7 @@ func (*Action_PublishToStackdriver) ProtoMessage() {} func (x *Action_PublishToStackdriver) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[296] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27232,11 +26640,9 @@ type DataProfileAction_Export struct { func (x *DataProfileAction_Export) Reset() { *x = DataProfileAction_Export{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[297] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[297] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_Export) String() string { @@ -27247,7 +26653,7 @@ func (*DataProfileAction_Export) ProtoMessage() {} func (x *DataProfileAction_Export) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[297] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27294,11 +26700,9 @@ type DataProfileAction_PubSubNotification struct { func (x *DataProfileAction_PubSubNotification) Reset() { *x = DataProfileAction_PubSubNotification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[298] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[298] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_PubSubNotification) String() string { @@ -27309,7 +26713,7 @@ func (*DataProfileAction_PubSubNotification) ProtoMessage() {} func (x *DataProfileAction_PubSubNotification) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[298] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27361,11 +26765,9 @@ type DataProfileAction_PublishToChronicle struct { func (x *DataProfileAction_PublishToChronicle) Reset() { *x = DataProfileAction_PublishToChronicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[299] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[299] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_PublishToChronicle) String() string { @@ -27376,7 +26778,7 @@ func (*DataProfileAction_PublishToChronicle) ProtoMessage() {} func (x *DataProfileAction_PublishToChronicle) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[299] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27400,11 +26802,9 @@ type DataProfileAction_PublishToSecurityCommandCenter struct { func (x *DataProfileAction_PublishToSecurityCommandCenter) Reset() { *x = DataProfileAction_PublishToSecurityCommandCenter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[300] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[300] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_PublishToSecurityCommandCenter) String() string { @@ -27415,7 +26815,7 @@ func (*DataProfileAction_PublishToSecurityCommandCenter) ProtoMessage() {} func (x *DataProfileAction_PublishToSecurityCommandCenter) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[300] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27463,11 +26863,9 @@ type DataProfileAction_TagResources struct { func (x *DataProfileAction_TagResources) Reset() { *x = DataProfileAction_TagResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[301] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[301] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_TagResources) String() string { @@ -27478,7 +26876,7 @@ func (*DataProfileAction_TagResources) ProtoMessage() {} func (x *DataProfileAction_TagResources) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[301] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27533,11 +26931,9 @@ type DataProfileAction_TagResources_TagCondition struct { func (x *DataProfileAction_TagResources_TagCondition) Reset() { *x = DataProfileAction_TagResources_TagCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[302] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[302] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_TagResources_TagCondition) String() string { @@ -27548,7 +26944,7 @@ func (*DataProfileAction_TagResources_TagCondition) ProtoMessage() {} func (x *DataProfileAction_TagResources_TagCondition) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[302] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27613,11 +27009,9 @@ type DataProfileAction_TagResources_TagValue struct { func (x *DataProfileAction_TagResources_TagValue) Reset() { *x = DataProfileAction_TagResources_TagValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[303] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[303] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfileAction_TagResources_TagValue) String() string { @@ -27628,7 +27022,7 @@ func (*DataProfileAction_TagResources_TagValue) ProtoMessage() {} func (x *DataProfileAction_TagResources_TagValue) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[303] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27687,11 +27081,9 @@ type DiscoveryConfig_OrgConfig struct { func (x *DiscoveryConfig_OrgConfig) Reset() { *x = DiscoveryConfig_OrgConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[304] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[304] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryConfig_OrgConfig) String() string { @@ -27702,7 +27094,7 @@ func (*DiscoveryConfig_OrgConfig) ProtoMessage() {} func (x *DiscoveryConfig_OrgConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[304] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27742,11 +27134,9 @@ type DiscoveryBigQueryFilter_AllOtherBigQueryTables struct { func (x *DiscoveryBigQueryFilter_AllOtherBigQueryTables) Reset() { *x = DiscoveryBigQueryFilter_AllOtherBigQueryTables{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[305] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[305] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryBigQueryFilter_AllOtherBigQueryTables) String() string { @@ -27757,7 +27147,7 @@ func (*DiscoveryBigQueryFilter_AllOtherBigQueryTables) ProtoMessage() {} func (x *DiscoveryBigQueryFilter_AllOtherBigQueryTables) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[305] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27789,11 +27179,9 @@ type DiscoveryBigQueryConditions_OrConditions struct { func (x *DiscoveryBigQueryConditions_OrConditions) Reset() { *x = DiscoveryBigQueryConditions_OrConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[306] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[306] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryBigQueryConditions_OrConditions) String() string { @@ -27804,7 +27192,7 @@ func (*DiscoveryBigQueryConditions_OrConditions) ProtoMessage() {} func (x *DiscoveryBigQueryConditions_OrConditions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[306] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27849,11 +27237,9 @@ type DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence struct { func (x *DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence) Reset() { *x = DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[307] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[307] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence) String() string { @@ -27864,7 +27250,7 @@ func (*DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence) ProtoMessage() func (x *DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[307] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -27910,11 +27296,9 @@ type OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation struct { func (x *OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation) Reset() { *x = OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[308] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[308] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation) String() string { @@ -27925,7 +27309,7 @@ func (*OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation) ProtoMe func (x *OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[308] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28002,11 +27386,9 @@ type DataProfilePubSubCondition_PubSubCondition struct { func (x *DataProfilePubSubCondition_PubSubCondition) Reset() { *x = DataProfilePubSubCondition_PubSubCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[313] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[313] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfilePubSubCondition_PubSubCondition) String() string { @@ -28017,7 +27399,7 @@ func (*DataProfilePubSubCondition_PubSubCondition) ProtoMessage() {} func (x *DataProfilePubSubCondition_PubSubCondition) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[313] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -28087,11 +27469,9 @@ type DataProfilePubSubCondition_PubSubExpressions struct { func (x *DataProfilePubSubCondition_PubSubExpressions) Reset() { *x = DataProfilePubSubCondition_PubSubExpressions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[314] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[314] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataProfilePubSubCondition_PubSubExpressions) String() string { @@ -28102,7 +27482,7 @@ func (*DataProfilePubSubCondition_PubSubExpressions) ProtoMessage() {} func (x *DataProfilePubSubCondition_PubSubExpressions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_dlp_proto_msgTypes[314] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -35160,3728 +34540,6 @@ func file_google_privacy_dlp_v2_dlp_proto_init() { return } file_google_privacy_dlp_v2_storage_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_privacy_dlp_v2_dlp_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExcludeInfoTypes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExcludeByHotword); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExclusionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InspectionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InspectionRuleSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*InspectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ByteContentItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ContentItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*InspectResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ContentLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MetadataLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StorageMetadataLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DocumentLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RecordLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TableLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ImageLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RedactImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Color); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RedactImageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ReidentifyContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ReidentifyContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*InspectContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*InspectContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*OutputStorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*InspectDataSourceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileBigQueryRowSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*HybridInspectStatistics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ActionDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyDataSourceStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyDataSourceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*VersionDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListInfoTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListInfoTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*RiskAnalysisJobConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*QuasiId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*StatisticalTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ValueFrequency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*QuoteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DateTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ImageTransformations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*TransformationErrorHandling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*PrimitiveTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*TimePartConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*CryptoHashConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*CryptoDeterministicConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceValueConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceDictionaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceWithInfoTypeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*RedactConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*CharsToIgnore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*CharacterMaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*FixedSizeBucketingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*BucketingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*CryptoReplaceFfxFpeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*TransientCryptoKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*UnwrappedCryptoKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*KmsWrappedCryptoKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*DateShiftConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeTransformations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*FieldTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*RecordTransformations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*RecordSuppression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*RecordCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*TransformationOverview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*TransformationSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*TransformationDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*TransformationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*TransformationLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*RecordTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*TransformationResultStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*TransformationDetailsStorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*Manual); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*InspectTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*JobTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*TransformationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*CreateInspectTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInspectTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*GetInspectTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*ListInspectTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ListInspectTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInspectTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ActivateJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*GetJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*CreateDiscoveryConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDiscoveryConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*GetDiscoveryConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveryConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*ListDiscoveryConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDiscoveryConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*CreateDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*ListJobTriggersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*ListJobTriggersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*InspectJobConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileJobConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryRegexes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryTableTypes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*Disabled); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryBigQueryFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryTableCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryBigQueryConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryGenerationCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryTableModifiedCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*DiscoverySchemaModifiedCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryInspectTemplateModifiedCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlDiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudSqlFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseResourceCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseResourceRegexes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseResourceRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*AllOtherDatabaseResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudSqlConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudSqlGenerationCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*SecretsDiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageDiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudStorageFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*FileStoreCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*FileStoreRegexes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*FileStoreRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudStorageGenerationCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudStorageConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryFileStoreConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudDiscoveryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryOtherCloudFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudResourceCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudResourceRegexes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudResourceRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*AwsAccountRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*AmazonS3BucketRegex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[160].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudSingleResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*AwsAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[162].Exporter = func(v any, i int) any { - switch v := v.(*AmazonS3Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[163].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryOtherCloudConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*AmazonS3BucketConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryOtherCloudGenerationCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryStartingLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudDiscoveryStartingLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*AllOtherResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[169].Exporter = func(v any, i int) any { - switch v := v.(*DlpJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[170].Exporter = func(v any, i int) any { - switch v := v.(*GetDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*ListDlpJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*ListDlpJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*CancelDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*FinishDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[176].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeidentifyTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[177].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeidentifyTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[178].Exporter = func(v any, i int) any { - switch v := v.(*GetDeidentifyTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[179].Exporter = func(v any, i int) any { - switch v := v.(*ListDeidentifyTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[180].Exporter = func(v any, i int) any { - switch v := v.(*ListDeidentifyTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeidentifyTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*LargeCustomDictionaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[183].Exporter = func(v any, i int) any { - switch v := v.(*LargeCustomDictionaryStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[184].Exporter = func(v any, i int) any { - switch v := v.(*StoredInfoTypeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[185].Exporter = func(v any, i int) any { - switch v := v.(*StoredInfoTypeStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[186].Exporter = func(v any, i int) any { - switch v := v.(*StoredInfoTypeVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[187].Exporter = func(v any, i int) any { - switch v := v.(*StoredInfoType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[188].Exporter = func(v any, i int) any { - switch v := v.(*CreateStoredInfoTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[189].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStoredInfoTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[190].Exporter = func(v any, i int) any { - switch v := v.(*GetStoredInfoTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[191].Exporter = func(v any, i int) any { - switch v := v.(*ListStoredInfoTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[192].Exporter = func(v any, i int) any { - switch v := v.(*ListStoredInfoTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[193].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStoredInfoTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[194].Exporter = func(v any, i int) any { - switch v := v.(*HybridInspectJobTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[195].Exporter = func(v any, i int) any { - switch v := v.(*HybridInspectDlpJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[196].Exporter = func(v any, i int) any { - switch v := v.(*HybridContentItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[197].Exporter = func(v any, i int) any { - switch v := v.(*HybridFindingDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[198].Exporter = func(v any, i int) any { - switch v := v.(*HybridInspectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[199].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectDataProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[200].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectDataProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[201].Exporter = func(v any, i int) any { - switch v := v.(*ListTableDataProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[202].Exporter = func(v any, i int) any { - switch v := v.(*ListTableDataProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[203].Exporter = func(v any, i int) any { - switch v := v.(*ListColumnDataProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[204].Exporter = func(v any, i int) any { - switch v := v.(*ListColumnDataProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[205].Exporter = func(v any, i int) any { - switch v := v.(*DataRiskLevel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[206].Exporter = func(v any, i int) any { - switch v := v.(*ProjectDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[207].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileConfigSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[208].Exporter = func(v any, i int) any { - switch v := v.(*TableDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[209].Exporter = func(v any, i int) any { - switch v := v.(*ProfileStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[210].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[211].Exporter = func(v any, i int) any { - switch v := v.(*OtherInfoTypeSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[212].Exporter = func(v any, i int) any { - switch v := v.(*ColumnDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[213].Exporter = func(v any, i int) any { - switch v := v.(*FileStoreDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[214].Exporter = func(v any, i int) any { - switch v := v.(*FileStoreInfoTypeSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[215].Exporter = func(v any, i int) any { - switch v := v.(*FileExtensionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[216].Exporter = func(v any, i int) any { - switch v := v.(*FileClusterSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[217].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[218].Exporter = func(v any, i int) any { - switch v := v.(*GetFileStoreDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[219].Exporter = func(v any, i int) any { - switch v := v.(*ListFileStoreDataProfilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[220].Exporter = func(v any, i int) any { - switch v := v.(*ListFileStoreDataProfilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[221].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFileStoreDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[222].Exporter = func(v any, i int) any { - switch v := v.(*GetTableDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[223].Exporter = func(v any, i int) any { - switch v := v.(*GetColumnDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[224].Exporter = func(v any, i int) any { - switch v := v.(*DataProfilePubSubCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[225].Exporter = func(v any, i int) any { - switch v := v.(*DataProfilePubSubMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[226].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[227].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[228].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[229].Exporter = func(v any, i int) any { - switch v := v.(*SearchConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[230].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[231].Exporter = func(v any, i int) any { - switch v := v.(*SearchConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[232].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[233].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[234].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[235].Exporter = func(v any, i int) any { - switch v := v.(*SecretManagerCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[236].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlIamCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[237].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[238].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTableDataProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[239].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[240].Exporter = func(v any, i int) any { - switch v := v.(*FileClusterType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[241].Exporter = func(v any, i int) any { - switch v := v.(*InspectConfig_InfoTypeLikelihood); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[242].Exporter = func(v any, i int) any { - switch v := v.(*InspectConfig_FindingLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[243].Exporter = func(v any, i int) any { - switch v := v.(*InspectConfig_FindingLimits_InfoTypeLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[244].Exporter = func(v any, i int) any { - switch v := v.(*Table_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[246].Exporter = func(v any, i int) any { - switch v := v.(*RedactImageRequest_ImageRedactionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[247].Exporter = func(v any, i int) any { - switch v := v.(*InspectDataSourceDetails_RequestedOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[248].Exporter = func(v any, i int) any { - switch v := v.(*InspectDataSourceDetails_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[249].Exporter = func(v any, i int) any { - switch v := v.(*DeidentifyDataSourceDetails_RequestedDeidentifyOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[250].Exporter = func(v any, i int) any { - switch v := v.(*StatisticalTable_QuasiIdentifierField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[251].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_NumericalStatsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[252].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_CategoricalStatsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[253].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_KAnonymityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[254].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_LDiversityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[255].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_KMapEstimationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[256].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_DeltaPresenceEstimationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[257].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_KMapEstimationConfig_TaggedField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[258].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_KMapEstimationConfig_AuxiliaryTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[259].Exporter = func(v any, i int) any { - switch v := v.(*PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[260].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_NumericalStatsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[261].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_CategoricalStatsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[262].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KAnonymityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[263].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_LDiversityResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[264].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KMapEstimationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[265].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[266].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[267].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[268].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[269].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[270].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[271].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[272].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[273].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[274].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[275].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[276].Exporter = func(v any, i int) any { - switch v := v.(*DateTime_TimeZone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[277].Exporter = func(v any, i int) any { - switch v := v.(*ImageTransformations_ImageTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[278].Exporter = func(v any, i int) any { - switch v := v.(*ImageTransformations_ImageTransformation_SelectedInfoTypes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[279].Exporter = func(v any, i int) any { - switch v := v.(*ImageTransformations_ImageTransformation_AllInfoTypes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[280].Exporter = func(v any, i int) any { - switch v := v.(*ImageTransformations_ImageTransformation_AllText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[281].Exporter = func(v any, i int) any { - switch v := v.(*TransformationErrorHandling_ThrowError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[282].Exporter = func(v any, i int) any { - switch v := v.(*TransformationErrorHandling_LeaveUntransformed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[283].Exporter = func(v any, i int) any { - switch v := v.(*BucketingConfig_Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[284].Exporter = func(v any, i int) any { - switch v := v.(*InfoTypeTransformations_InfoTypeTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[285].Exporter = func(v any, i int) any { - switch v := v.(*RecordCondition_Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[286].Exporter = func(v any, i int) any { - switch v := v.(*RecordCondition_Conditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[287].Exporter = func(v any, i int) any { - switch v := v.(*RecordCondition_Expressions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[288].Exporter = func(v any, i int) any { - switch v := v.(*TransformationSummary_SummaryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[289].Exporter = func(v any, i int) any { - switch v := v.(*JobTrigger_Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[290].Exporter = func(v any, i int) any { - switch v := v.(*Action_SaveFindings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[291].Exporter = func(v any, i int) any { - switch v := v.(*Action_PublishToPubSub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[292].Exporter = func(v any, i int) any { - switch v := v.(*Action_PublishSummaryToCscc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[293].Exporter = func(v any, i int) any { - switch v := v.(*Action_PublishFindingsToCloudDataCatalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[294].Exporter = func(v any, i int) any { - switch v := v.(*Action_Deidentify); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[295].Exporter = func(v any, i int) any { - switch v := v.(*Action_JobNotificationEmails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[296].Exporter = func(v any, i int) any { - switch v := v.(*Action_PublishToStackdriver); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[297].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_Export); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[298].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_PubSubNotification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[299].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_PublishToChronicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[300].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_PublishToSecurityCommandCenter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[301].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_TagResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[302].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_TagResources_TagCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[303].Exporter = func(v any, i int) any { - switch v := v.(*DataProfileAction_TagResources_TagValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[304].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryConfig_OrgConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[305].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryBigQueryFilter_AllOtherBigQueryTables); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[306].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryBigQueryConditions_OrConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[307].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryCloudSqlGenerationCadence_SchemaModifiedCadence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[308].Exporter = func(v any, i int) any { - switch v := v.(*OtherCloudDiscoveryStartingLocation_AwsDiscoveryStartingLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[313].Exporter = func(v any, i int) any { - switch v := v.(*DataProfilePubSubCondition_PubSubCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_dlp_proto_msgTypes[314].Exporter = func(v any, i int) any { - switch v := v.(*DataProfilePubSubCondition_PubSubExpressions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_privacy_dlp_v2_dlp_proto_msgTypes[2].OneofWrappers = []any{ (*ExclusionRule_Dictionary)(nil), (*ExclusionRule_Regex)(nil), diff --git a/dlp/apiv2/dlppb/storage.pb.go b/dlp/apiv2/dlppb/storage.pb.go index e4d0ff7056a0..7f2ec34d6bbd 100755 --- a/dlp/apiv2/dlppb/storage.pb.go +++ b/dlp/apiv2/dlppb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/privacy/dlp/v2/storage.proto @@ -499,11 +499,9 @@ type InfoType struct { func (x *InfoType) Reset() { *x = InfoType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InfoType) String() string { @@ -514,7 +512,7 @@ func (*InfoType) ProtoMessage() {} func (x *InfoType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +561,9 @@ type SensitivityScore struct { func (x *SensitivityScore) Reset() { *x = SensitivityScore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SensitivityScore) String() string { @@ -578,7 +574,7 @@ func (*SensitivityScore) ProtoMessage() {} func (x *SensitivityScore) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +613,9 @@ type StoredType struct { func (x *StoredType) Reset() { *x = StoredType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoredType) String() string { @@ -632,7 +626,7 @@ func (*StoredType) ProtoMessage() {} func (x *StoredType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +699,9 @@ type CustomInfoType struct { func (x *CustomInfoType) Reset() { *x = CustomInfoType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType) String() string { @@ -720,7 +712,7 @@ func (*CustomInfoType) ProtoMessage() {} func (x *CustomInfoType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -851,11 +843,9 @@ type FieldId struct { func (x *FieldId) Reset() { *x = FieldId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldId) String() string { @@ -866,7 +856,7 @@ func (*FieldId) ProtoMessage() {} func (x *FieldId) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +897,9 @@ type PartitionId struct { func (x *PartitionId) Reset() { *x = PartitionId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionId) String() string { @@ -922,7 +910,7 @@ func (*PartitionId) ProtoMessage() {} func (x *PartitionId) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,11 +951,9 @@ type KindExpression struct { func (x *KindExpression) Reset() { *x = KindExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KindExpression) String() string { @@ -978,7 +964,7 @@ func (*KindExpression) ProtoMessage() {} func (x *KindExpression) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1015,11 +1001,9 @@ type DatastoreOptions struct { func (x *DatastoreOptions) Reset() { *x = DatastoreOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatastoreOptions) String() string { @@ -1030,7 +1014,7 @@ func (*DatastoreOptions) ProtoMessage() {} func (x *DatastoreOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1120,11 +1104,9 @@ type CloudStorageRegexFileSet struct { func (x *CloudStorageRegexFileSet) Reset() { *x = CloudStorageRegexFileSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageRegexFileSet) String() string { @@ -1135,7 +1117,7 @@ func (*CloudStorageRegexFileSet) ProtoMessage() {} func (x *CloudStorageRegexFileSet) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1215,11 +1197,9 @@ type CloudStorageOptions struct { func (x *CloudStorageOptions) Reset() { *x = CloudStorageOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageOptions) String() string { @@ -1230,7 +1210,7 @@ func (*CloudStorageOptions) ProtoMessage() {} func (x *CloudStorageOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1300,11 +1280,9 @@ type CloudStorageFileSet struct { func (x *CloudStorageFileSet) Reset() { *x = CloudStorageFileSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageFileSet) String() string { @@ -1315,7 +1293,7 @@ func (*CloudStorageFileSet) ProtoMessage() {} func (x *CloudStorageFileSet) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,11 +1328,9 @@ type CloudStoragePath struct { func (x *CloudStoragePath) Reset() { *x = CloudStoragePath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStoragePath) String() string { @@ -1365,7 +1341,7 @@ func (*CloudStoragePath) ProtoMessage() {} func (x *CloudStoragePath) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1410,9 @@ type BigQueryOptions struct { func (x *BigQueryOptions) Reset() { *x = BigQueryOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryOptions) String() string { @@ -1449,7 +1423,7 @@ func (*BigQueryOptions) ProtoMessage() {} func (x *BigQueryOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1508,9 @@ type StorageConfig struct { func (x *StorageConfig) Reset() { *x = StorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageConfig) String() string { @@ -1549,7 +1521,7 @@ func (*StorageConfig) ProtoMessage() {} func (x *StorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1651,9 @@ type HybridOptions struct { func (x *HybridOptions) Reset() { *x = HybridOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridOptions) String() string { @@ -1694,7 +1664,7 @@ func (*HybridOptions) ProtoMessage() {} func (x *HybridOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1725,9 @@ type BigQueryKey struct { func (x *BigQueryKey) Reset() { *x = BigQueryKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryKey) String() string { @@ -1770,7 +1738,7 @@ func (*BigQueryKey) ProtoMessage() {} func (x *BigQueryKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1811,11 +1779,9 @@ type DatastoreKey struct { func (x *DatastoreKey) Reset() { *x = DatastoreKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatastoreKey) String() string { @@ -1826,7 +1792,7 @@ func (*DatastoreKey) ProtoMessage() {} func (x *DatastoreKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1875,11 +1841,9 @@ type Key struct { func (x *Key) Reset() { *x = Key{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key) String() string { @@ -1890,7 +1854,7 @@ func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1939,11 +1903,9 @@ type RecordKey struct { func (x *RecordKey) Reset() { *x = RecordKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecordKey) String() string { @@ -1954,7 +1916,7 @@ func (*RecordKey) ProtoMessage() {} func (x *RecordKey) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2036,11 +1998,9 @@ type BigQueryTable struct { func (x *BigQueryTable) Reset() { *x = BigQueryTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryTable) String() string { @@ -2051,7 +2011,7 @@ func (*BigQueryTable) ProtoMessage() {} func (x *BigQueryTable) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2102,11 +2062,9 @@ type TableReference struct { func (x *TableReference) Reset() { *x = TableReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableReference) String() string { @@ -2117,7 +2075,7 @@ func (*TableReference) ProtoMessage() {} func (x *TableReference) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2160,11 +2118,9 @@ type BigQueryField struct { func (x *BigQueryField) Reset() { *x = BigQueryField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryField) String() string { @@ -2175,7 +2131,7 @@ func (*BigQueryField) ProtoMessage() {} func (x *BigQueryField) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2220,11 +2176,9 @@ type EntityId struct { func (x *EntityId) Reset() { *x = EntityId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityId) String() string { @@ -2235,7 +2189,7 @@ func (*EntityId) ProtoMessage() {} func (x *EntityId) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2272,11 +2226,9 @@ type TableOptions struct { func (x *TableOptions) Reset() { *x = TableOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableOptions) String() string { @@ -2287,7 +2239,7 @@ func (*TableOptions) ProtoMessage() {} func (x *TableOptions) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2348,11 +2300,9 @@ type CustomInfoType_Dictionary struct { func (x *CustomInfoType_Dictionary) Reset() { *x = CustomInfoType_Dictionary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_Dictionary) String() string { @@ -2363,7 +2313,7 @@ func (*CustomInfoType_Dictionary) ProtoMessage() {} func (x *CustomInfoType_Dictionary) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2435,11 +2385,9 @@ type CustomInfoType_Regex struct { func (x *CustomInfoType_Regex) Reset() { *x = CustomInfoType_Regex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_Regex) String() string { @@ -2450,7 +2398,7 @@ func (*CustomInfoType_Regex) ProtoMessage() {} func (x *CustomInfoType_Regex) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2495,11 +2443,9 @@ type CustomInfoType_SurrogateType struct { func (x *CustomInfoType_SurrogateType) Reset() { *x = CustomInfoType_SurrogateType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_SurrogateType) String() string { @@ -2510,7 +2456,7 @@ func (*CustomInfoType_SurrogateType) ProtoMessage() {} func (x *CustomInfoType_SurrogateType) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2544,11 +2490,9 @@ type CustomInfoType_DetectionRule struct { func (x *CustomInfoType_DetectionRule) Reset() { *x = CustomInfoType_DetectionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_DetectionRule) String() string { @@ -2559,7 +2503,7 @@ func (*CustomInfoType_DetectionRule) ProtoMessage() {} func (x *CustomInfoType_DetectionRule) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2613,11 +2557,9 @@ type CustomInfoType_Dictionary_WordList struct { func (x *CustomInfoType_Dictionary_WordList) Reset() { *x = CustomInfoType_Dictionary_WordList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_Dictionary_WordList) String() string { @@ -2628,7 +2570,7 @@ func (*CustomInfoType_Dictionary_WordList) ProtoMessage() {} func (x *CustomInfoType_Dictionary_WordList) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2669,11 +2611,9 @@ type CustomInfoType_DetectionRule_Proximity struct { func (x *CustomInfoType_DetectionRule_Proximity) Reset() { *x = CustomInfoType_DetectionRule_Proximity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_DetectionRule_Proximity) String() string { @@ -2684,7 +2624,7 @@ func (*CustomInfoType_DetectionRule_Proximity) ProtoMessage() {} func (x *CustomInfoType_DetectionRule_Proximity) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2731,11 +2671,9 @@ type CustomInfoType_DetectionRule_LikelihoodAdjustment struct { func (x *CustomInfoType_DetectionRule_LikelihoodAdjustment) Reset() { *x = CustomInfoType_DetectionRule_LikelihoodAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_DetectionRule_LikelihoodAdjustment) String() string { @@ -2746,7 +2684,7 @@ func (*CustomInfoType_DetectionRule_LikelihoodAdjustment) ProtoMessage() {} func (x *CustomInfoType_DetectionRule_LikelihoodAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2838,11 +2776,9 @@ type CustomInfoType_DetectionRule_HotwordRule struct { func (x *CustomInfoType_DetectionRule_HotwordRule) Reset() { *x = CustomInfoType_DetectionRule_HotwordRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomInfoType_DetectionRule_HotwordRule) String() string { @@ -2853,7 +2789,7 @@ func (*CustomInfoType_DetectionRule_HotwordRule) ProtoMessage() {} func (x *CustomInfoType_DetectionRule_HotwordRule) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2913,11 +2849,9 @@ type CloudStorageOptions_FileSet struct { func (x *CloudStorageOptions_FileSet) Reset() { *x = CloudStorageOptions_FileSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageOptions_FileSet) String() string { @@ -2928,7 +2862,7 @@ func (*CloudStorageOptions_FileSet) ProtoMessage() {} func (x *CloudStorageOptions_FileSet) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,11 +2959,9 @@ type StorageConfig_TimespanConfig struct { func (x *StorageConfig_TimespanConfig) Reset() { *x = StorageConfig_TimespanConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageConfig_TimespanConfig) String() string { @@ -3040,7 +2972,7 @@ func (*StorageConfig_TimespanConfig) ProtoMessage() {} func (x *StorageConfig_TimespanConfig) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3108,11 +3040,9 @@ type Key_PathElement struct { func (x *Key_PathElement) Reset() { *x = Key_PathElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key_PathElement) String() string { @@ -3123,7 +3053,7 @@ func (*Key_PathElement) ProtoMessage() {} func (x *Key_PathElement) ProtoReflect() protoreflect.Message { mi := &file_google_privacy_dlp_v2_storage_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3741,428 +3671,6 @@ func file_google_privacy_dlp_v2_storage_proto_init() { if File_google_privacy_dlp_v2_storage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_privacy_dlp_v2_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InfoType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SensitivityScore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StoredType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FieldId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PartitionId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*KindExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DatastoreOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageRegexFileSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageFileSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CloudStoragePath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*HybridOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DatastoreKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RecordKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*TableReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*EntityId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*TableOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_Dictionary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_Regex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_SurrogateType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_DetectionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_Dictionary_WordList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_DetectionRule_Proximity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_DetectionRule_LikelihoodAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CustomInfoType_DetectionRule_HotwordRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageOptions_FileSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*StorageConfig_TimespanConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_privacy_dlp_v2_storage_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Key_PathElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_privacy_dlp_v2_storage_proto_msgTypes[3].OneofWrappers = []any{ (*CustomInfoType_Dictionary_)(nil), (*CustomInfoType_Regex_)(nil), diff --git a/dlp/apiv2/helpers.go b/dlp/apiv2/helpers.go index c868c5d585b7..848439a5ff75 100755 --- a/dlp/apiv2/helpers.go +++ b/dlp/apiv2/helpers.go @@ -18,10 +18,20 @@ package dlp import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "dlp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/documentai/apiv1/document_processor_client.go b/documentai/apiv1/document_processor_client.go index 1c331edabacc..9de9915c9e0b 100755 --- a/documentai/apiv1/document_processor_client.go +++ b/documentai/apiv1/document_processor_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -559,6 +558,8 @@ type documentProcessorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentProcessorClient creates a new document processor service client based on gRPC. @@ -588,6 +589,7 @@ func NewDocumentProcessorClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, documentProcessorClient: documentaipb.NewDocumentProcessorServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -652,6 +654,8 @@ type documentProcessorRESTClient struct { // Points back to the CallOptions field of the containing DocumentProcessorClient CallOptions **DocumentProcessorCallOptions + + logger *slog.Logger } // NewDocumentProcessorRESTClient creates a new document processor service rest client. @@ -672,6 +676,7 @@ func NewDocumentProcessorRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -734,7 +739,7 @@ func (c *documentProcessorGRPCClient) ProcessDocument(ctx context.Context, req * var resp *documentaipb.ProcessResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ProcessDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ProcessDocument, req, settings.GRPC, c.logger, "ProcessDocument") return err }, opts...) if err != nil { @@ -752,7 +757,7 @@ func (c *documentProcessorGRPCClient) BatchProcessDocuments(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.BatchProcessDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.BatchProcessDocuments, req, settings.GRPC, c.logger, "BatchProcessDocuments") return err }, opts...) if err != nil { @@ -772,7 +777,7 @@ func (c *documentProcessorGRPCClient) FetchProcessorTypes(ctx context.Context, r var resp *documentaipb.FetchProcessorTypesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.FetchProcessorTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.FetchProcessorTypes, req, settings.GRPC, c.logger, "FetchProcessorTypes") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *documentProcessorGRPCClient) ListProcessorTypes(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessorTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessorTypes, req, settings.GRPC, c.logger, "ListProcessorTypes") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *documentProcessorGRPCClient) GetProcessorType(ctx context.Context, req var resp *documentaipb.ProcessorType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessorType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessorType, req, settings.GRPC, c.logger, "GetProcessorType") return err }, opts...) if err != nil { @@ -865,7 +870,7 @@ func (c *documentProcessorGRPCClient) ListProcessors(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessors, req, settings.GRPC, c.logger, "ListProcessors") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *documentProcessorGRPCClient) GetProcessor(ctx context.Context, req *doc var resp *documentaipb.Processor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessor, req, settings.GRPC, c.logger, "GetProcessor") return err }, opts...) if err != nil { @@ -918,7 +923,7 @@ func (c *documentProcessorGRPCClient) TrainProcessorVersion(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.TrainProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.TrainProcessorVersion, req, settings.GRPC, c.logger, "TrainProcessorVersion") return err }, opts...) if err != nil { @@ -938,7 +943,7 @@ func (c *documentProcessorGRPCClient) GetProcessorVersion(ctx context.Context, r var resp *documentaipb.ProcessorVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessorVersion, req, settings.GRPC, c.logger, "GetProcessorVersion") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *documentProcessorGRPCClient) ListProcessorVersions(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessorVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessorVersions, req, settings.GRPC, c.logger, "ListProcessorVersions") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *documentProcessorGRPCClient) DeleteProcessorVersion(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeleteProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeleteProcessorVersion, req, settings.GRPC, c.logger, "DeleteProcessorVersion") return err }, opts...) if err != nil { @@ -1022,7 +1027,7 @@ func (c *documentProcessorGRPCClient) DeployProcessorVersion(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeployProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeployProcessorVersion, req, settings.GRPC, c.logger, "DeployProcessorVersion") return err }, opts...) if err != nil { @@ -1042,7 +1047,7 @@ func (c *documentProcessorGRPCClient) UndeployProcessorVersion(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.UndeployProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.UndeployProcessorVersion, req, settings.GRPC, c.logger, "UndeployProcessorVersion") return err }, opts...) if err != nil { @@ -1062,7 +1067,7 @@ func (c *documentProcessorGRPCClient) CreateProcessor(ctx context.Context, req * var resp *documentaipb.Processor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.CreateProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.CreateProcessor, req, settings.GRPC, c.logger, "CreateProcessor") return err }, opts...) if err != nil { @@ -1080,7 +1085,7 @@ func (c *documentProcessorGRPCClient) DeleteProcessor(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeleteProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeleteProcessor, req, settings.GRPC, c.logger, "DeleteProcessor") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *documentProcessorGRPCClient) EnableProcessor(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.EnableProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.EnableProcessor, req, settings.GRPC, c.logger, "EnableProcessor") return err }, opts...) if err != nil { @@ -1120,7 +1125,7 @@ func (c *documentProcessorGRPCClient) DisableProcessor(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DisableProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DisableProcessor, req, settings.GRPC, c.logger, "DisableProcessor") return err }, opts...) if err != nil { @@ -1140,7 +1145,7 @@ func (c *documentProcessorGRPCClient) SetDefaultProcessorVersion(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.SetDefaultProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.SetDefaultProcessorVersion, req, settings.GRPC, c.logger, "SetDefaultProcessorVersion") return err }, opts...) if err != nil { @@ -1160,7 +1165,7 @@ func (c *documentProcessorGRPCClient) ReviewDocument(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ReviewDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ReviewDocument, req, settings.GRPC, c.logger, "ReviewDocument") return err }, opts...) if err != nil { @@ -1180,7 +1185,7 @@ func (c *documentProcessorGRPCClient) EvaluateProcessorVersion(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.EvaluateProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.EvaluateProcessorVersion, req, settings.GRPC, c.logger, "EvaluateProcessorVersion") return err }, opts...) if err != nil { @@ -1200,7 +1205,7 @@ func (c *documentProcessorGRPCClient) GetEvaluation(ctx context.Context, req *do var resp *documentaipb.Evaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetEvaluation, req, settings.GRPC, c.logger, "GetEvaluation") return err }, opts...) if err != nil { @@ -1229,7 +1234,7 @@ func (c *documentProcessorGRPCClient) ListEvaluations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListEvaluations, req, settings.GRPC, c.logger, "ListEvaluations") return err }, opts...) if err != nil { @@ -1264,7 +1269,7 @@ func (c *documentProcessorGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1293,7 +1298,7 @@ func (c *documentProcessorGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1327,7 +1332,7 @@ func (c *documentProcessorGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1342,7 +1347,7 @@ func (c *documentProcessorGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1371,7 +1376,7 @@ func (c *documentProcessorGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1436,17 +1441,7 @@ func (c *documentProcessorRESTClient) ProcessDocument(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProcessDocument") if err != nil { return err } @@ -1502,21 +1497,10 @@ func (c *documentProcessorRESTClient) BatchProcessDocuments(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchProcessDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1569,17 +1553,7 @@ func (c *documentProcessorRESTClient) FetchProcessorTypes(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchProcessorTypes") if err != nil { return err } @@ -1641,21 +1615,10 @@ func (c *documentProcessorRESTClient) ListProcessorTypes(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessorTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1718,17 +1681,7 @@ func (c *documentProcessorRESTClient) GetProcessorType(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessorType") if err != nil { return err } @@ -1790,21 +1743,10 @@ func (c *documentProcessorRESTClient) ListProcessors(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1867,17 +1809,7 @@ func (c *documentProcessorRESTClient) GetProcessor(ctx context.Context, req *doc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessor") if err != nil { return err } @@ -1934,21 +1866,10 @@ func (c *documentProcessorRESTClient) TrainProcessorVersion(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1999,17 +1920,7 @@ func (c *documentProcessorRESTClient) GetProcessorVersion(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessorVersion") if err != nil { return err } @@ -2071,21 +1982,10 @@ func (c *documentProcessorRESTClient) ListProcessorVersions(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessorVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2148,21 +2048,10 @@ func (c *documentProcessorRESTClient) DeleteProcessorVersion(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2218,21 +2107,10 @@ func (c *documentProcessorRESTClient) DeployProcessorVersion(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2288,21 +2166,10 @@ func (c *documentProcessorRESTClient) UndeployProcessorVersion(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployProcessorVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2366,17 +2233,7 @@ func (c *documentProcessorRESTClient) CreateProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProcessor") if err != nil { return err } @@ -2426,21 +2283,10 @@ func (c *documentProcessorRESTClient) DeleteProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcessor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2496,21 +2342,10 @@ func (c *documentProcessorRESTClient) EnableProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableProcessor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2566,21 +2401,10 @@ func (c *documentProcessorRESTClient) DisableProcessor(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableProcessor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2640,21 +2464,10 @@ func (c *documentProcessorRESTClient) SetDefaultProcessorVersion(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2711,21 +2524,10 @@ func (c *documentProcessorRESTClient) ReviewDocument(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReviewDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2782,21 +2584,10 @@ func (c *documentProcessorRESTClient) EvaluateProcessorVersion(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EvaluateProcessorVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2847,17 +2638,7 @@ func (c *documentProcessorRESTClient) GetEvaluation(ctx context.Context, req *do httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluation") if err != nil { return err } @@ -2919,21 +2700,10 @@ func (c *documentProcessorRESTClient) ListEvaluations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2996,17 +2766,7 @@ func (c *documentProcessorRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3071,21 +2831,10 @@ func (c *documentProcessorRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3145,15 +2894,8 @@ func (c *documentProcessorRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3190,17 +2932,7 @@ func (c *documentProcessorRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3265,21 +2997,10 @@ func (c *documentProcessorRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/documentai/apiv1/document_processor_client_example_go123_test.go b/documentai/apiv1/document_processor_client_example_go123_test.go index 4c83c7abc5fc..89dcfe5774c5 100644 --- a/documentai/apiv1/document_processor_client_example_go123_test.go +++ b/documentai/apiv1/document_processor_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDocumentProcessorClient_ListEvaluations_all() { } for resp, err := range c.ListEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDocumentProcessorClient_ListProcessorTypes_all() { } for resp, err := range c.ListProcessorTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDocumentProcessorClient_ListProcessorVersions_all() { } for resp, err := range c.ListProcessorVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDocumentProcessorClient_ListProcessors_all() { } for resp, err := range c.ListProcessors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDocumentProcessorClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleDocumentProcessorClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/documentai/apiv1/documentaipb/barcode.pb.go b/documentai/apiv1/documentaipb/barcode.pb.go index 4a9b64a98841..ab9e90a0535d 100755 --- a/documentai/apiv1/documentaipb/barcode.pb.go +++ b/documentai/apiv1/documentaipb/barcode.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/barcode.proto @@ -83,11 +83,9 @@ type Barcode struct { func (x *Barcode) Reset() { *x = Barcode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_barcode_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_barcode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Barcode) String() string { @@ -98,7 +96,7 @@ func (*Barcode) ProtoMessage() {} func (x *Barcode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_barcode_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,20 +190,6 @@ func file_google_cloud_documentai_v1_barcode_proto_init() { if File_google_cloud_documentai_v1_barcode_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_barcode_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Barcode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1/documentaipb/document.pb.go b/documentai/apiv1/documentaipb/document.pb.go index 9b9a4ded384c..e4e4074cfdbd 100755 --- a/documentai/apiv1/documentaipb/document.pb.go +++ b/documentai/apiv1/documentaipb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/document.proto @@ -389,11 +389,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -404,7 +402,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +566,9 @@ type Document_ShardInfo struct { func (x *Document_ShardInfo) Reset() { *x = Document_ShardInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ShardInfo) String() string { @@ -583,7 +579,7 @@ func (*Document_ShardInfo) ProtoMessage() {} func (x *Document_ShardInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +649,9 @@ type Document_Style struct { func (x *Document_Style) Reset() { *x = Document_Style{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Style) String() string { @@ -668,7 +662,7 @@ func (*Document_Style) ProtoMessage() {} func (x *Document_Style) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +791,9 @@ type Document_Page struct { func (x *Document_Page) Reset() { *x = Document_Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page) String() string { @@ -812,7 +804,7 @@ func (*Document_Page) ProtoMessage() {} func (x *Document_Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +982,9 @@ type Document_Entity struct { func (x *Document_Entity) Reset() { *x = Document_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Entity) String() string { @@ -1005,7 +995,7 @@ func (*Document_Entity) ProtoMessage() {} func (x *Document_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1114,11 +1104,9 @@ type Document_EntityRelation struct { func (x *Document_EntityRelation) Reset() { *x = Document_EntityRelation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_EntityRelation) String() string { @@ -1129,7 +1117,7 @@ func (*Document_EntityRelation) ProtoMessage() {} func (x *Document_EntityRelation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1171,9 @@ type Document_TextAnchor struct { func (x *Document_TextAnchor) Reset() { *x = Document_TextAnchor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextAnchor) String() string { @@ -1198,7 +1184,7 @@ func (*Document_TextAnchor) ProtoMessage() {} func (x *Document_TextAnchor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1228,9 @@ type Document_PageAnchor struct { func (x *Document_PageAnchor) Reset() { *x = Document_PageAnchor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_PageAnchor) String() string { @@ -1257,7 +1241,7 @@ func (*Document_PageAnchor) ProtoMessage() {} func (x *Document_PageAnchor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1287,9 @@ type Document_Provenance struct { func (x *Document_Provenance) Reset() { *x = Document_Provenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Provenance) String() string { @@ -1318,7 +1300,7 @@ func (*Document_Provenance) ProtoMessage() {} func (x *Document_Provenance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,11 +1380,9 @@ type Document_Revision struct { func (x *Document_Revision) Reset() { *x = Document_Revision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Revision) String() string { @@ -1413,7 +1393,7 @@ func (*Document_Revision) ProtoMessage() {} func (x *Document_Revision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1528,11 +1508,9 @@ type Document_TextChange struct { func (x *Document_TextChange) Reset() { *x = Document_TextChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextChange) String() string { @@ -1543,7 +1521,7 @@ func (*Document_TextChange) ProtoMessage() {} func (x *Document_TextChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,11 +1571,9 @@ type Document_DocumentLayout struct { func (x *Document_DocumentLayout) Reset() { *x = Document_DocumentLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout) String() string { @@ -1608,7 +1584,7 @@ func (*Document_DocumentLayout) ProtoMessage() {} func (x *Document_DocumentLayout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1642,11 +1618,9 @@ type Document_ChunkedDocument struct { func (x *Document_ChunkedDocument) Reset() { *x = Document_ChunkedDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument) String() string { @@ -1657,7 +1631,7 @@ func (*Document_ChunkedDocument) ProtoMessage() {} func (x *Document_ChunkedDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1694,11 +1668,9 @@ type Document_Style_FontSize struct { func (x *Document_Style_FontSize) Reset() { *x = Document_Style_FontSize{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Style_FontSize) String() string { @@ -1709,7 +1681,7 @@ func (*Document_Style_FontSize) ProtoMessage() {} func (x *Document_Style_FontSize) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1726,9 @@ type Document_Page_Dimension struct { func (x *Document_Page_Dimension) Reset() { *x = Document_Page_Dimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Dimension) String() string { @@ -1769,7 +1739,7 @@ func (*Document_Page_Dimension) ProtoMessage() {} func (x *Document_Page_Dimension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1825,11 +1795,9 @@ type Document_Page_Image struct { func (x *Document_Page_Image) Reset() { *x = Document_Page_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Image) String() string { @@ -1840,7 +1808,7 @@ func (*Document_Page_Image) ProtoMessage() {} func (x *Document_Page_Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1905,11 +1873,9 @@ type Document_Page_Matrix struct { func (x *Document_Page_Matrix) Reset() { *x = Document_Page_Matrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Matrix) String() string { @@ -1920,7 +1886,7 @@ func (*Document_Page_Matrix) ProtoMessage() {} func (x *Document_Page_Matrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1988,11 +1954,9 @@ type Document_Page_Layout struct { func (x *Document_Page_Layout) Reset() { *x = Document_Page_Layout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Layout) String() string { @@ -2003,7 +1967,7 @@ func (*Document_Page_Layout) ProtoMessage() {} func (x *Document_Page_Layout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2066,11 +2030,9 @@ type Document_Page_Block struct { func (x *Document_Page_Block) Reset() { *x = Document_Page_Block{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Block) String() string { @@ -2081,7 +2043,7 @@ func (*Document_Page_Block) ProtoMessage() {} func (x *Document_Page_Block) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2137,11 +2099,9 @@ type Document_Page_Paragraph struct { func (x *Document_Page_Paragraph) Reset() { *x = Document_Page_Paragraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Paragraph) String() string { @@ -2152,7 +2112,7 @@ func (*Document_Page_Paragraph) ProtoMessage() {} func (x *Document_Page_Paragraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2209,11 +2169,9 @@ type Document_Page_Line struct { func (x *Document_Page_Line) Reset() { *x = Document_Page_Line{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Line) String() string { @@ -2224,7 +2182,7 @@ func (*Document_Page_Line) ProtoMessage() {} func (x *Document_Page_Line) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2285,11 +2243,9 @@ type Document_Page_Token struct { func (x *Document_Page_Token) Reset() { *x = Document_Page_Token{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token) String() string { @@ -2300,7 +2256,7 @@ func (*Document_Page_Token) ProtoMessage() {} func (x *Document_Page_Token) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,11 +2322,9 @@ type Document_Page_Symbol struct { func (x *Document_Page_Symbol) Reset() { *x = Document_Page_Symbol{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Symbol) String() string { @@ -2381,7 +2335,7 @@ func (*Document_Page_Symbol) ProtoMessage() {} func (x *Document_Page_Symbol) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2429,11 +2383,9 @@ type Document_Page_VisualElement struct { func (x *Document_Page_VisualElement) Reset() { *x = Document_Page_VisualElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_VisualElement) String() string { @@ -2444,7 +2396,7 @@ func (*Document_Page_VisualElement) ProtoMessage() {} func (x *Document_Page_VisualElement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2503,11 +2455,9 @@ type Document_Page_Table struct { func (x *Document_Page_Table) Reset() { *x = Document_Page_Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table) String() string { @@ -2518,7 +2468,7 @@ func (*Document_Page_Table) ProtoMessage() {} func (x *Document_Page_Table) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2607,11 +2557,9 @@ type Document_Page_FormField struct { func (x *Document_Page_FormField) Reset() { *x = Document_Page_FormField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_FormField) String() string { @@ -2622,7 +2570,7 @@ func (*Document_Page_FormField) ProtoMessage() {} func (x *Document_Page_FormField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2709,11 +2657,9 @@ type Document_Page_DetectedBarcode struct { func (x *Document_Page_DetectedBarcode) Reset() { *x = Document_Page_DetectedBarcode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_DetectedBarcode) String() string { @@ -2724,7 +2670,7 @@ func (*Document_Page_DetectedBarcode) ProtoMessage() {} func (x *Document_Page_DetectedBarcode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2769,11 +2715,9 @@ type Document_Page_DetectedLanguage struct { func (x *Document_Page_DetectedLanguage) Reset() { *x = Document_Page_DetectedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_DetectedLanguage) String() string { @@ -2784,7 +2728,7 @@ func (*Document_Page_DetectedLanguage) ProtoMessage() {} func (x *Document_Page_DetectedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2827,11 +2771,9 @@ type Document_Page_ImageQualityScores struct { func (x *Document_Page_ImageQualityScores) Reset() { *x = Document_Page_ImageQualityScores{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_ImageQualityScores) String() string { @@ -2842,7 +2784,7 @@ func (*Document_Page_ImageQualityScores) ProtoMessage() {} func (x *Document_Page_ImageQualityScores) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2884,11 +2826,9 @@ type Document_Page_Token_DetectedBreak struct { func (x *Document_Page_Token_DetectedBreak) Reset() { *x = Document_Page_Token_DetectedBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token_DetectedBreak) String() string { @@ -2899,7 +2839,7 @@ func (*Document_Page_Token_DetectedBreak) ProtoMessage() {} func (x *Document_Page_Token_DetectedBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2966,11 +2906,9 @@ type Document_Page_Token_StyleInfo struct { func (x *Document_Page_Token_StyleInfo) Reset() { *x = Document_Page_Token_StyleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token_StyleInfo) String() string { @@ -2981,7 +2919,7 @@ func (*Document_Page_Token_StyleInfo) ProtoMessage() {} func (x *Document_Page_Token_StyleInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3113,11 +3051,9 @@ type Document_Page_Table_TableRow struct { func (x *Document_Page_Table_TableRow) Reset() { *x = Document_Page_Table_TableRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table_TableRow) String() string { @@ -3128,7 +3064,7 @@ func (*Document_Page_Table_TableRow) ProtoMessage() {} func (x *Document_Page_Table_TableRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3169,11 +3105,9 @@ type Document_Page_Table_TableCell struct { func (x *Document_Page_Table_TableCell) Reset() { *x = Document_Page_Table_TableCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table_TableCell) String() string { @@ -3184,7 +3118,7 @@ func (*Document_Page_Table_TableCell) ProtoMessage() {} func (x *Document_Page_Table_TableCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3251,11 +3185,9 @@ type Document_Page_ImageQualityScores_DetectedDefect struct { func (x *Document_Page_ImageQualityScores_DetectedDefect) Reset() { *x = Document_Page_ImageQualityScores_DetectedDefect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_ImageQualityScores_DetectedDefect) String() string { @@ -3266,7 +3198,7 @@ func (*Document_Page_ImageQualityScores_DetectedDefect) ProtoMessage() {} func (x *Document_Page_ImageQualityScores_DetectedDefect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3332,11 +3264,9 @@ type Document_Entity_NormalizedValue struct { func (x *Document_Entity_NormalizedValue) Reset() { *x = Document_Entity_NormalizedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Entity_NormalizedValue) String() string { @@ -3347,7 +3277,7 @@ func (*Document_Entity_NormalizedValue) ProtoMessage() {} func (x *Document_Entity_NormalizedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3512,11 +3442,9 @@ type Document_TextAnchor_TextSegment struct { func (x *Document_TextAnchor_TextSegment) Reset() { *x = Document_TextAnchor_TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextAnchor_TextSegment) String() string { @@ -3527,7 +3455,7 @@ func (*Document_TextAnchor_TextSegment) ProtoMessage() {} func (x *Document_TextAnchor_TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3589,11 +3517,9 @@ type Document_PageAnchor_PageRef struct { func (x *Document_PageAnchor_PageRef) Reset() { *x = Document_PageAnchor_PageRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_PageAnchor_PageRef) String() string { @@ -3604,7 +3530,7 @@ func (*Document_PageAnchor_PageRef) ProtoMessage() {} func (x *Document_PageAnchor_PageRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3675,11 +3601,9 @@ type Document_Provenance_Parent struct { func (x *Document_Provenance_Parent) Reset() { *x = Document_Provenance_Parent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Provenance_Parent) String() string { @@ -3690,7 +3614,7 @@ func (*Document_Provenance_Parent) ProtoMessage() {} func (x *Document_Provenance_Parent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3742,11 +3666,9 @@ type Document_Revision_HumanReview struct { func (x *Document_Revision_HumanReview) Reset() { *x = Document_Revision_HumanReview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Revision_HumanReview) String() string { @@ -3757,7 +3679,7 @@ func (*Document_Revision_HumanReview) ProtoMessage() {} func (x *Document_Revision_HumanReview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3807,11 +3729,9 @@ type Document_DocumentLayout_DocumentLayoutBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock) String() string { @@ -3822,7 +3742,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock) ProtoMessage() {} func (x *Document_DocumentLayout_DocumentLayoutBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3921,11 +3841,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) String() string { @@ -3936,7 +3854,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) ProtoMessage( func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3984,11 +3902,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) String() string { @@ -3999,7 +3915,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4051,11 +3967,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) String() string { @@ -4066,7 +3980,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) ProtoMessag func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4114,11 +4028,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) String() string { @@ -4129,7 +4041,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) ProtoMessage( func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4168,11 +4080,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) String() string { @@ -4183,7 +4093,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4234,11 +4144,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) String() string { @@ -4249,7 +4157,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4291,11 +4199,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) String() string { @@ -4306,7 +4212,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4350,11 +4256,9 @@ type Document_ChunkedDocument_Chunk struct { func (x *Document_ChunkedDocument_Chunk) Reset() { *x = Document_ChunkedDocument_Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk) String() string { @@ -4365,7 +4269,7 @@ func (*Document_ChunkedDocument_Chunk) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4436,11 +4340,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageSpan struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) String() string { @@ -4451,7 +4353,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageSpan) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4494,11 +4396,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageHeader struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) String() string { @@ -4509,7 +4409,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageHeader) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4552,11 +4452,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageFooter struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageFooter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) String() string { @@ -4567,7 +4465,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageFooter) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5689,620 +5587,6 @@ func file_google_cloud_documentai_v1_document_proto_init() { } file_google_cloud_documentai_v1_barcode_proto_init() file_google_cloud_documentai_v1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Document_ShardInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Document_Style); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Document_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Document_EntityRelation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextAnchor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Document_PageAnchor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Document_Provenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Document_Revision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Document_Style_FontSize); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Dimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Matrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Layout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Paragraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Line); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Symbol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_VisualElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_FormField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_DetectedBarcode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_DetectedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_ImageQualityScores); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token_DetectedBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token_StyleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table_TableRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table_TableCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_ImageQualityScores_DetectedDefect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Document_Entity_NormalizedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextAnchor_TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Document_PageAnchor_PageRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Document_Provenance_Parent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Document_Revision_HumanReview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageFooter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_Uri)(nil), (*Document_Content)(nil), diff --git a/documentai/apiv1/documentaipb/document_io.pb.go b/documentai/apiv1/documentaipb/document_io.pb.go index 4b19888976a4..65c1817658d9 100755 --- a/documentai/apiv1/documentaipb/document_io.pb.go +++ b/documentai/apiv1/documentaipb/document_io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/document_io.proto @@ -57,11 +57,9 @@ type RawDocument struct { func (x *RawDocument) Reset() { *x = RawDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawDocument) String() string { @@ -72,7 +70,7 @@ func (*RawDocument) ProtoMessage() {} func (x *RawDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type GcsDocument struct { func (x *GcsDocument) Reset() { *x = GcsDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDocument) String() string { @@ -137,7 +133,7 @@ func (*GcsDocument) ProtoMessage() {} func (x *GcsDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type GcsDocuments struct { func (x *GcsDocuments) Reset() { *x = GcsDocuments{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDocuments) String() string { @@ -193,7 +187,7 @@ func (*GcsDocuments) ProtoMessage() {} func (x *GcsDocuments) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +221,9 @@ type GcsPrefix struct { func (x *GcsPrefix) Reset() { *x = GcsPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsPrefix) String() string { @@ -242,7 +234,7 @@ func (*GcsPrefix) ProtoMessage() {} func (x *GcsPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +274,9 @@ type BatchDocumentsInputConfig struct { func (x *BatchDocumentsInputConfig) Reset() { *x = BatchDocumentsInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDocumentsInputConfig) String() string { @@ -297,7 +287,7 @@ func (*BatchDocumentsInputConfig) ProtoMessage() {} func (x *BatchDocumentsInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type DocumentOutputConfig struct { func (x *DocumentOutputConfig) Reset() { *x = DocumentOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig) String() string { @@ -383,7 +371,7 @@ func (*DocumentOutputConfig) ProtoMessage() {} func (x *DocumentOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +452,9 @@ type OcrConfig struct { func (x *OcrConfig) Reset() { *x = OcrConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig) String() string { @@ -479,7 +465,7 @@ func (*OcrConfig) ProtoMessage() {} func (x *OcrConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +555,9 @@ type DocumentOutputConfig_GcsOutputConfig struct { func (x *DocumentOutputConfig_GcsOutputConfig) Reset() { *x = DocumentOutputConfig_GcsOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig_GcsOutputConfig) String() string { @@ -584,7 +568,7 @@ func (*DocumentOutputConfig_GcsOutputConfig) ProtoMessage() {} func (x *DocumentOutputConfig_GcsOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +618,9 @@ type DocumentOutputConfig_GcsOutputConfig_ShardingConfig struct { func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) Reset() { *x = DocumentOutputConfig_GcsOutputConfig_ShardingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) String() string { @@ -649,7 +631,7 @@ func (*DocumentOutputConfig_GcsOutputConfig_ShardingConfig) ProtoMessage() {} func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +677,9 @@ type OcrConfig_Hints struct { func (x *OcrConfig_Hints) Reset() { *x = OcrConfig_Hints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig_Hints) String() string { @@ -710,7 +690,7 @@ func (*OcrConfig_Hints) ProtoMessage() {} func (x *OcrConfig_Hints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +729,9 @@ type OcrConfig_PremiumFeatures struct { func (x *OcrConfig_PremiumFeatures) Reset() { *x = OcrConfig_PremiumFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig_PremiumFeatures) String() string { @@ -764,7 +742,7 @@ func (*OcrConfig_PremiumFeatures) ProtoMessage() {} func (x *OcrConfig_PremiumFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_io_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -981,140 +959,6 @@ func file_google_cloud_documentai_v1_document_io_proto_init() { if File_google_cloud_documentai_v1_document_io_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_document_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RawDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsDocuments); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchDocumentsInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig_GcsOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig_GcsOutputConfig_ShardingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig_Hints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_io_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig_PremiumFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1_document_io_proto_msgTypes[4].OneofWrappers = []any{ (*BatchDocumentsInputConfig_GcsPrefix)(nil), (*BatchDocumentsInputConfig_GcsDocuments)(nil), diff --git a/documentai/apiv1/documentaipb/document_processor_service.pb.go b/documentai/apiv1/documentaipb/document_processor_service.pb.go index 4973c63d3b12..0e0968ecdd00 100755 --- a/documentai/apiv1/documentaipb/document_processor_service.pb.go +++ b/documentai/apiv1/documentaipb/document_processor_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/document_processor_service.proto @@ -369,11 +369,9 @@ type ProcessOptions struct { func (x *ProcessOptions) Reset() { *x = ProcessOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions) String() string { @@ -384,7 +382,7 @@ func (*ProcessOptions) ProtoMessage() {} func (x *ProcessOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +522,9 @@ type ProcessRequest struct { func (x *ProcessRequest) Reset() { *x = ProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessRequest) String() string { @@ -539,7 +535,7 @@ func (*ProcessRequest) ProtoMessage() {} func (x *ProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +666,9 @@ type HumanReviewStatus struct { func (x *HumanReviewStatus) Reset() { *x = HumanReviewStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanReviewStatus) String() string { @@ -685,7 +679,7 @@ func (*HumanReviewStatus) ProtoMessage() {} func (x *HumanReviewStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +732,9 @@ type ProcessResponse struct { func (x *ProcessResponse) Reset() { *x = ProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessResponse) String() string { @@ -753,7 +745,7 @@ func (*ProcessResponse) ProtoMessage() {} func (x *ProcessResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +812,9 @@ type BatchProcessRequest struct { func (x *BatchProcessRequest) Reset() { *x = BatchProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessRequest) String() string { @@ -835,7 +825,7 @@ func (*BatchProcessRequest) ProtoMessage() {} func (x *BatchProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +892,9 @@ type BatchProcessResponse struct { func (x *BatchProcessResponse) Reset() { *x = BatchProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessResponse) String() string { @@ -917,7 +905,7 @@ func (*BatchProcessResponse) ProtoMessage() {} func (x *BatchProcessResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +942,9 @@ type BatchProcessMetadata struct { func (x *BatchProcessMetadata) Reset() { *x = BatchProcessMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessMetadata) String() string { @@ -969,7 +955,7 @@ func (*BatchProcessMetadata) ProtoMessage() {} func (x *BatchProcessMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1021,9 @@ type FetchProcessorTypesRequest struct { func (x *FetchProcessorTypesRequest) Reset() { *x = FetchProcessorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchProcessorTypesRequest) String() string { @@ -1050,7 +1034,7 @@ func (*FetchProcessorTypesRequest) ProtoMessage() {} func (x *FetchProcessorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1070,9 @@ type FetchProcessorTypesResponse struct { func (x *FetchProcessorTypesResponse) Reset() { *x = FetchProcessorTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchProcessorTypesResponse) String() string { @@ -1101,7 +1083,7 @@ func (*FetchProcessorTypesResponse) ProtoMessage() {} func (x *FetchProcessorTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1127,9 @@ type ListProcessorTypesRequest struct { func (x *ListProcessorTypesRequest) Reset() { *x = ListProcessorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorTypesRequest) String() string { @@ -1160,7 +1140,7 @@ func (*ListProcessorTypesRequest) ProtoMessage() {} func (x *ListProcessorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,11 +1192,9 @@ type ListProcessorTypesResponse struct { func (x *ListProcessorTypesResponse) Reset() { *x = ListProcessorTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorTypesResponse) String() string { @@ -1227,7 +1205,7 @@ func (*ListProcessorTypesResponse) ProtoMessage() {} func (x *ListProcessorTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1276,11 +1254,9 @@ type ListProcessorsRequest struct { func (x *ListProcessorsRequest) Reset() { *x = ListProcessorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsRequest) String() string { @@ -1291,7 +1267,7 @@ func (*ListProcessorsRequest) ProtoMessage() {} func (x *ListProcessorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1343,11 +1319,9 @@ type ListProcessorsResponse struct { func (x *ListProcessorsResponse) Reset() { *x = ListProcessorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsResponse) String() string { @@ -1358,7 +1332,7 @@ func (*ListProcessorsResponse) ProtoMessage() {} func (x *ListProcessorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1375,9 @@ type GetProcessorTypeRequest struct { func (x *GetProcessorTypeRequest) Reset() { *x = GetProcessorTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorTypeRequest) String() string { @@ -1416,7 +1388,7 @@ func (*GetProcessorTypeRequest) ProtoMessage() {} func (x *GetProcessorTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1452,11 +1424,9 @@ type GetProcessorRequest struct { func (x *GetProcessorRequest) Reset() { *x = GetProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorRequest) String() string { @@ -1467,7 +1437,7 @@ func (*GetProcessorRequest) ProtoMessage() {} func (x *GetProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1503,11 +1473,9 @@ type GetProcessorVersionRequest struct { func (x *GetProcessorVersionRequest) Reset() { *x = GetProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorVersionRequest) String() string { @@ -1518,7 +1486,7 @@ func (*GetProcessorVersionRequest) ProtoMessage() {} func (x *GetProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,11 +1529,9 @@ type ListProcessorVersionsRequest struct { func (x *ListProcessorVersionsRequest) Reset() { *x = ListProcessorVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorVersionsRequest) String() string { @@ -1576,7 +1542,7 @@ func (*ListProcessorVersionsRequest) ProtoMessage() {} func (x *ListProcessorVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1628,11 +1594,9 @@ type ListProcessorVersionsResponse struct { func (x *ListProcessorVersionsResponse) Reset() { *x = ListProcessorVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorVersionsResponse) String() string { @@ -1643,7 +1607,7 @@ func (*ListProcessorVersionsResponse) ProtoMessage() {} func (x *ListProcessorVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1686,11 +1650,9 @@ type DeleteProcessorVersionRequest struct { func (x *DeleteProcessorVersionRequest) Reset() { *x = DeleteProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorVersionRequest) String() string { @@ -1701,7 +1663,7 @@ func (*DeleteProcessorVersionRequest) ProtoMessage() {} func (x *DeleteProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1699,9 @@ type DeleteProcessorVersionMetadata struct { func (x *DeleteProcessorVersionMetadata) Reset() { *x = DeleteProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorVersionMetadata) String() string { @@ -1752,7 +1712,7 @@ func (*DeleteProcessorVersionMetadata) ProtoMessage() {} func (x *DeleteProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1788,11 +1748,9 @@ type DeployProcessorVersionRequest struct { func (x *DeployProcessorVersionRequest) Reset() { *x = DeployProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionRequest) String() string { @@ -1803,7 +1761,7 @@ func (*DeployProcessorVersionRequest) ProtoMessage() {} func (x *DeployProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1836,11 +1794,9 @@ type DeployProcessorVersionResponse struct { func (x *DeployProcessorVersionResponse) Reset() { *x = DeployProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionResponse) String() string { @@ -1851,7 +1807,7 @@ func (*DeployProcessorVersionResponse) ProtoMessage() {} func (x *DeployProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1880,11 +1836,9 @@ type DeployProcessorVersionMetadata struct { func (x *DeployProcessorVersionMetadata) Reset() { *x = DeployProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionMetadata) String() string { @@ -1895,7 +1849,7 @@ func (*DeployProcessorVersionMetadata) ProtoMessage() {} func (x *DeployProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1931,11 +1885,9 @@ type UndeployProcessorVersionRequest struct { func (x *UndeployProcessorVersionRequest) Reset() { *x = UndeployProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionRequest) String() string { @@ -1946,7 +1898,7 @@ func (*UndeployProcessorVersionRequest) ProtoMessage() {} func (x *UndeployProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,11 +1931,9 @@ type UndeployProcessorVersionResponse struct { func (x *UndeployProcessorVersionResponse) Reset() { *x = UndeployProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionResponse) String() string { @@ -1994,7 +1944,7 @@ func (*UndeployProcessorVersionResponse) ProtoMessage() {} func (x *UndeployProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,11 +1973,9 @@ type UndeployProcessorVersionMetadata struct { func (x *UndeployProcessorVersionMetadata) Reset() { *x = UndeployProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionMetadata) String() string { @@ -2038,7 +1986,7 @@ func (*UndeployProcessorVersionMetadata) ProtoMessage() {} func (x *UndeployProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2084,11 +2032,9 @@ type CreateProcessorRequest struct { func (x *CreateProcessorRequest) Reset() { *x = CreateProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProcessorRequest) String() string { @@ -2099,7 +2045,7 @@ func (*CreateProcessorRequest) ProtoMessage() {} func (x *CreateProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2142,11 +2088,9 @@ type DeleteProcessorRequest struct { func (x *DeleteProcessorRequest) Reset() { *x = DeleteProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorRequest) String() string { @@ -2157,7 +2101,7 @@ func (*DeleteProcessorRequest) ProtoMessage() {} func (x *DeleteProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2193,11 +2137,9 @@ type DeleteProcessorMetadata struct { func (x *DeleteProcessorMetadata) Reset() { *x = DeleteProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorMetadata) String() string { @@ -2208,7 +2150,7 @@ func (*DeleteProcessorMetadata) ProtoMessage() {} func (x *DeleteProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2244,11 +2186,9 @@ type EnableProcessorRequest struct { func (x *EnableProcessorRequest) Reset() { *x = EnableProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorRequest) String() string { @@ -2259,7 +2199,7 @@ func (*EnableProcessorRequest) ProtoMessage() {} func (x *EnableProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2292,11 +2232,9 @@ type EnableProcessorResponse struct { func (x *EnableProcessorResponse) Reset() { *x = EnableProcessorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorResponse) String() string { @@ -2307,7 +2245,7 @@ func (*EnableProcessorResponse) ProtoMessage() {} func (x *EnableProcessorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2336,11 +2274,9 @@ type EnableProcessorMetadata struct { func (x *EnableProcessorMetadata) Reset() { *x = EnableProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorMetadata) String() string { @@ -2351,7 +2287,7 @@ func (*EnableProcessorMetadata) ProtoMessage() {} func (x *EnableProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2387,11 +2323,9 @@ type DisableProcessorRequest struct { func (x *DisableProcessorRequest) Reset() { *x = DisableProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorRequest) String() string { @@ -2402,7 +2336,7 @@ func (*DisableProcessorRequest) ProtoMessage() {} func (x *DisableProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2435,11 +2369,9 @@ type DisableProcessorResponse struct { func (x *DisableProcessorResponse) Reset() { *x = DisableProcessorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorResponse) String() string { @@ -2450,7 +2382,7 @@ func (*DisableProcessorResponse) ProtoMessage() {} func (x *DisableProcessorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2479,11 +2411,9 @@ type DisableProcessorMetadata struct { func (x *DisableProcessorMetadata) Reset() { *x = DisableProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorMetadata) String() string { @@ -2494,7 +2424,7 @@ func (*DisableProcessorMetadata) ProtoMessage() {} func (x *DisableProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2537,11 +2467,9 @@ type SetDefaultProcessorVersionRequest struct { func (x *SetDefaultProcessorVersionRequest) Reset() { *x = SetDefaultProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionRequest) String() string { @@ -2552,7 +2480,7 @@ func (*SetDefaultProcessorVersionRequest) ProtoMessage() {} func (x *SetDefaultProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2592,11 +2520,9 @@ type SetDefaultProcessorVersionResponse struct { func (x *SetDefaultProcessorVersionResponse) Reset() { *x = SetDefaultProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionResponse) String() string { @@ -2607,7 +2533,7 @@ func (*SetDefaultProcessorVersionResponse) ProtoMessage() {} func (x *SetDefaultProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2636,11 +2562,9 @@ type SetDefaultProcessorVersionMetadata struct { func (x *SetDefaultProcessorVersionMetadata) Reset() { *x = SetDefaultProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionMetadata) String() string { @@ -2651,7 +2575,7 @@ func (*SetDefaultProcessorVersionMetadata) ProtoMessage() {} func (x *SetDefaultProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2705,11 +2629,9 @@ type TrainProcessorVersionRequest struct { func (x *TrainProcessorVersionRequest) Reset() { *x = TrainProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest) String() string { @@ -2720,7 +2642,7 @@ func (*TrainProcessorVersionRequest) ProtoMessage() {} func (x *TrainProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2824,11 +2746,9 @@ type TrainProcessorVersionResponse struct { func (x *TrainProcessorVersionResponse) Reset() { *x = TrainProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionResponse) String() string { @@ -2839,7 +2759,7 @@ func (*TrainProcessorVersionResponse) ProtoMessage() {} func (x *TrainProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2877,11 +2797,9 @@ type TrainProcessorVersionMetadata struct { func (x *TrainProcessorVersionMetadata) Reset() { *x = TrainProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionMetadata) String() string { @@ -2892,7 +2810,7 @@ func (*TrainProcessorVersionMetadata) ProtoMessage() {} func (x *TrainProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2956,11 +2874,9 @@ type ReviewDocumentRequest struct { func (x *ReviewDocumentRequest) Reset() { *x = ReviewDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentRequest) String() string { @@ -2971,7 +2887,7 @@ func (*ReviewDocumentRequest) ProtoMessage() {} func (x *ReviewDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3058,11 +2974,9 @@ type ReviewDocumentResponse struct { func (x *ReviewDocumentResponse) Reset() { *x = ReviewDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentResponse) String() string { @@ -3073,7 +2987,7 @@ func (*ReviewDocumentResponse) ProtoMessage() {} func (x *ReviewDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3125,11 +3039,9 @@ type ReviewDocumentOperationMetadata struct { func (x *ReviewDocumentOperationMetadata) Reset() { *x = ReviewDocumentOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentOperationMetadata) String() string { @@ -3140,7 +3052,7 @@ func (*ReviewDocumentOperationMetadata) ProtoMessage() {} func (x *ReviewDocumentOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3189,11 +3101,9 @@ type EvaluateProcessorVersionRequest struct { func (x *EvaluateProcessorVersionRequest) Reset() { *x = EvaluateProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionRequest) String() string { @@ -3204,7 +3114,7 @@ func (*EvaluateProcessorVersionRequest) ProtoMessage() {} func (x *EvaluateProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3247,11 +3157,9 @@ type EvaluateProcessorVersionMetadata struct { func (x *EvaluateProcessorVersionMetadata) Reset() { *x = EvaluateProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionMetadata) String() string { @@ -3262,7 +3170,7 @@ func (*EvaluateProcessorVersionMetadata) ProtoMessage() {} func (x *EvaluateProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3298,11 +3206,9 @@ type EvaluateProcessorVersionResponse struct { func (x *EvaluateProcessorVersionResponse) Reset() { *x = EvaluateProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionResponse) String() string { @@ -3313,7 +3219,7 @@ func (*EvaluateProcessorVersionResponse) ProtoMessage() {} func (x *EvaluateProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3349,11 +3255,9 @@ type GetEvaluationRequest struct { func (x *GetEvaluationRequest) Reset() { *x = GetEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationRequest) String() string { @@ -3364,7 +3268,7 @@ func (*GetEvaluationRequest) ProtoMessage() {} func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3409,11 +3313,9 @@ type ListEvaluationsRequest struct { func (x *ListEvaluationsRequest) Reset() { *x = ListEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsRequest) String() string { @@ -3424,7 +3326,7 @@ func (*ListEvaluationsRequest) ProtoMessage() {} func (x *ListEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3475,11 +3377,9 @@ type ListEvaluationsResponse struct { func (x *ListEvaluationsResponse) Reset() { *x = ListEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsResponse) String() string { @@ -3490,7 +3390,7 @@ func (*ListEvaluationsResponse) ProtoMessage() {} func (x *ListEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3531,11 +3431,9 @@ type ProcessOptions_LayoutConfig struct { func (x *ProcessOptions_LayoutConfig) Reset() { *x = ProcessOptions_LayoutConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_LayoutConfig) String() string { @@ -3546,7 +3444,7 @@ func (*ProcessOptions_LayoutConfig) ProtoMessage() {} func (x *ProcessOptions_LayoutConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3580,11 +3478,9 @@ type ProcessOptions_IndividualPageSelector struct { func (x *ProcessOptions_IndividualPageSelector) Reset() { *x = ProcessOptions_IndividualPageSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_IndividualPageSelector) String() string { @@ -3595,7 +3491,7 @@ func (*ProcessOptions_IndividualPageSelector) ProtoMessage() {} func (x *ProcessOptions_IndividualPageSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3632,11 +3528,9 @@ type ProcessOptions_LayoutConfig_ChunkingConfig struct { func (x *ProcessOptions_LayoutConfig_ChunkingConfig) Reset() { *x = ProcessOptions_LayoutConfig_ChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_LayoutConfig_ChunkingConfig) String() string { @@ -3647,7 +3541,7 @@ func (*ProcessOptions_LayoutConfig_ChunkingConfig) ProtoMessage() {} func (x *ProcessOptions_LayoutConfig_ChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3698,11 +3592,9 @@ type BatchProcessMetadata_IndividualProcessStatus struct { func (x *BatchProcessMetadata_IndividualProcessStatus) Reset() { *x = BatchProcessMetadata_IndividualProcessStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessMetadata_IndividualProcessStatus) String() string { @@ -3713,7 +3605,7 @@ func (*BatchProcessMetadata_IndividualProcessStatus) ProtoMessage() {} func (x *BatchProcessMetadata_IndividualProcessStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3771,11 +3663,9 @@ type TrainProcessorVersionRequest_InputData struct { func (x *TrainProcessorVersionRequest_InputData) Reset() { *x = TrainProcessorVersionRequest_InputData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_InputData) String() string { @@ -3786,7 +3676,7 @@ func (*TrainProcessorVersionRequest_InputData) ProtoMessage() {} func (x *TrainProcessorVersionRequest_InputData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3828,11 +3718,9 @@ type TrainProcessorVersionRequest_CustomDocumentExtractionOptions struct { func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) Reset() { *x = TrainProcessorVersionRequest_CustomDocumentExtractionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) String() string { @@ -3843,7 +3731,7 @@ func (*TrainProcessorVersionRequest_CustomDocumentExtractionOptions) ProtoMessag func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3882,11 +3770,9 @@ type TrainProcessorVersionRequest_FoundationModelTuningOptions struct { func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) Reset() { *x = TrainProcessorVersionRequest_FoundationModelTuningOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) String() string { @@ -3897,7 +3783,7 @@ func (*TrainProcessorVersionRequest_FoundationModelTuningOptions) ProtoMessage() func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3949,11 +3835,9 @@ type TrainProcessorVersionMetadata_DatasetValidation struct { func (x *TrainProcessorVersionMetadata_DatasetValidation) Reset() { *x = TrainProcessorVersionMetadata_DatasetValidation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionMetadata_DatasetValidation) String() string { @@ -3964,7 +3848,7 @@ func (*TrainProcessorVersionMetadata_DatasetValidation) ProtoMessage() {} func (x *TrainProcessorVersionMetadata_DatasetValidation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5303,704 +5187,6 @@ func file_google_cloud_documentai_v1_document_processor_service_proto_init() { file_google_cloud_documentai_v1_operation_metadata_proto_init() file_google_cloud_documentai_v1_processor_proto_init() file_google_cloud_documentai_v1_processor_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HumanReviewStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FetchProcessorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FetchProcessorTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_LayoutConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_IndividualPageSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_LayoutConfig_ChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessMetadata_IndividualProcessStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_InputData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_CustomDocumentExtractionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_FoundationModelTuningOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionMetadata_DatasetValidation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1_document_processor_service_proto_msgTypes[0].OneofWrappers = []any{ (*ProcessOptions_IndividualPageSelector_)(nil), (*ProcessOptions_FromStart)(nil), diff --git a/documentai/apiv1/documentaipb/document_schema.pb.go b/documentai/apiv1/documentaipb/document_schema.pb.go index 1a8bac845e64..7e40ac1db92c 100755 --- a/documentai/apiv1/documentaipb/document_schema.pb.go +++ b/documentai/apiv1/documentaipb/document_schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/document_schema.proto @@ -124,11 +124,9 @@ type DocumentSchema struct { func (x *DocumentSchema) Reset() { *x = DocumentSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema) String() string { @@ -139,7 +137,7 @@ func (*DocumentSchema) ProtoMessage() {} func (x *DocumentSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +217,9 @@ type DocumentSchema_EntityType struct { func (x *DocumentSchema_EntityType) Reset() { *x = DocumentSchema_EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType) String() string { @@ -234,7 +230,7 @@ func (*DocumentSchema_EntityType) ProtoMessage() {} func (x *DocumentSchema_EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +325,9 @@ type DocumentSchema_Metadata struct { func (x *DocumentSchema_Metadata) Reset() { *x = DocumentSchema_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_Metadata) String() string { @@ -344,7 +338,7 @@ func (*DocumentSchema_Metadata) ProtoMessage() {} func (x *DocumentSchema_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +393,9 @@ type DocumentSchema_EntityType_EnumValues struct { func (x *DocumentSchema_EntityType_EnumValues) Reset() { *x = DocumentSchema_EntityType_EnumValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType_EnumValues) String() string { @@ -414,7 +406,7 @@ func (*DocumentSchema_EntityType_EnumValues) ProtoMessage() {} func (x *DocumentSchema_EntityType_EnumValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +449,9 @@ type DocumentSchema_EntityType_Property struct { func (x *DocumentSchema_EntityType_Property) Reset() { *x = DocumentSchema_EntityType_Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType_Property) String() string { @@ -472,7 +462,7 @@ func (*DocumentSchema_EntityType_Property) ProtoMessage() {} func (x *DocumentSchema_EntityType_Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_document_schema_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,68 +645,6 @@ func file_google_cloud_documentai_v1_document_schema_proto_init() { if File_google_cloud_documentai_v1_document_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_document_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_schema_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_schema_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType_EnumValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_document_schema_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType_Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1_document_schema_proto_msgTypes[1].OneofWrappers = []any{ (*DocumentSchema_EntityType_EnumValues_)(nil), } diff --git a/documentai/apiv1/documentaipb/evaluation.pb.go b/documentai/apiv1/documentaipb/evaluation.pb.go index 3b8986fbd998..dd2a564e3066 100755 --- a/documentai/apiv1/documentaipb/evaluation.pb.go +++ b/documentai/apiv1/documentaipb/evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/evaluation.proto @@ -110,11 +110,9 @@ type EvaluationReference struct { func (x *EvaluationReference) Reset() { *x = EvaluationReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationReference) String() string { @@ -125,7 +123,7 @@ func (*EvaluationReference) ProtoMessage() {} func (x *EvaluationReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type Evaluation struct { func (x *Evaluation) Reset() { *x = Evaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation) String() string { @@ -209,7 +205,7 @@ func (*Evaluation) ProtoMessage() {} func (x *Evaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +289,9 @@ type Evaluation_Counters struct { func (x *Evaluation_Counters) Reset() { *x = Evaluation_Counters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_Counters) String() string { @@ -308,7 +302,7 @@ func (*Evaluation_Counters) ProtoMessage() {} func (x *Evaluation_Counters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +377,9 @@ type Evaluation_Metrics struct { func (x *Evaluation_Metrics) Reset() { *x = Evaluation_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_Metrics) String() string { @@ -398,7 +390,7 @@ func (*Evaluation_Metrics) ProtoMessage() {} func (x *Evaluation_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +496,9 @@ type Evaluation_ConfidenceLevelMetrics struct { func (x *Evaluation_ConfidenceLevelMetrics) Reset() { *x = Evaluation_ConfidenceLevelMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_ConfidenceLevelMetrics) String() string { @@ -519,7 +509,7 @@ func (*Evaluation_ConfidenceLevelMetrics) ProtoMessage() {} func (x *Evaluation_ConfidenceLevelMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +566,9 @@ type Evaluation_MultiConfidenceMetrics struct { func (x *Evaluation_MultiConfidenceMetrics) Reset() { *x = Evaluation_MultiConfidenceMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_MultiConfidenceMetrics) String() string { @@ -591,7 +579,7 @@ func (*Evaluation_MultiConfidenceMetrics) ProtoMessage() {} func (x *Evaluation_MultiConfidenceMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_evaluation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,80 +888,6 @@ func file_google_cloud_documentai_v1_evaluation_proto_init() { if File_google_cloud_documentai_v1_evaluation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_Counters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_ConfidenceLevelMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_evaluation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_MultiConfidenceMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1/documentaipb/geometry.pb.go b/documentai/apiv1/documentaipb/geometry.pb.go index 35a99f04445d..ddde5ca8f102 100755 --- a/documentai/apiv1/documentaipb/geometry.pb.go +++ b/documentai/apiv1/documentaipb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/geometry.proto @@ -50,11 +50,9 @@ type Vertex struct { func (x *Vertex) Reset() { *x = Vertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vertex) String() string { @@ -65,7 +63,7 @@ func (*Vertex) ProtoMessage() {} func (x *Vertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -125,7 +121,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -183,7 +177,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_geometry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,44 +279,6 @@ func file_google_cloud_documentai_v1_geometry_proto_init() { if File_google_cloud_documentai_v1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_geometry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1/documentaipb/operation_metadata.pb.go b/documentai/apiv1/documentaipb/operation_metadata.pb.go index d91009214191..b9000492ccfa 100755 --- a/documentai/apiv1/documentaipb/operation_metadata.pb.go +++ b/documentai/apiv1/documentaipb/operation_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/operation_metadata.proto @@ -121,11 +121,9 @@ type CommonOperationMetadata struct { func (x *CommonOperationMetadata) Reset() { *x = CommonOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_operation_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_operation_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonOperationMetadata) String() string { @@ -136,7 +134,7 @@ func (*CommonOperationMetadata) ProtoMessage() {} func (x *CommonOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_operation_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,20 +270,6 @@ func file_google_cloud_documentai_v1_operation_metadata_proto_init() { if File_google_cloud_documentai_v1_operation_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_operation_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CommonOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1/documentaipb/processor.pb.go b/documentai/apiv1/documentaipb/processor.pb.go index 10c5d3dd9f04..b6bf87bd4aee 100755 --- a/documentai/apiv1/documentaipb/processor.pb.go +++ b/documentai/apiv1/documentaipb/processor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/processor.proto @@ -345,11 +345,9 @@ type ProcessorVersion struct { func (x *ProcessorVersion) Reset() { *x = ProcessorVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion) String() string { @@ -360,7 +358,7 @@ func (*ProcessorVersion) ProtoMessage() {} func (x *ProcessorVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +485,9 @@ type ProcessorVersionAlias struct { func (x *ProcessorVersionAlias) Reset() { *x = ProcessorVersionAlias{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersionAlias) String() string { @@ -502,7 +498,7 @@ func (*ProcessorVersionAlias) ProtoMessage() {} func (x *ProcessorVersionAlias) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +565,9 @@ type Processor struct { func (x *Processor) Reset() { *x = Processor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Processor) String() string { @@ -584,7 +578,7 @@ func (*Processor) ProtoMessage() {} func (x *Processor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +684,9 @@ type ProcessorVersion_DeprecationInfo struct { func (x *ProcessorVersion_DeprecationInfo) Reset() { *x = ProcessorVersion_DeprecationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_DeprecationInfo) String() string { @@ -705,7 +697,7 @@ func (*ProcessorVersion_DeprecationInfo) ProtoMessage() {} func (x *ProcessorVersion_DeprecationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +744,9 @@ type ProcessorVersion_GenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo) String() string { @@ -767,7 +757,7 @@ func (*ProcessorVersion_GenAiModelInfo) ProtoMessage() {} func (x *ProcessorVersion_GenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +828,9 @@ type ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) String() string { @@ -853,7 +841,7 @@ func (*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) ProtoMessage() func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -898,11 +886,9 @@ type ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) String() string { @@ -913,7 +899,7 @@ func (*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) ProtoMessage() {} func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1243,92 +1229,6 @@ func file_google_cloud_documentai_v1_processor_proto_init() { } file_google_cloud_documentai_v1_document_schema_proto_init() file_google_cloud_documentai_v1_evaluation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_processor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersionAlias); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Processor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_DeprecationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1_processor_proto_msgTypes[4].OneofWrappers = []any{ (*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo_)(nil), (*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo_)(nil), diff --git a/documentai/apiv1/documentaipb/processor_type.pb.go b/documentai/apiv1/documentaipb/processor_type.pb.go index c765535d4881..dedd6ab4915e 100755 --- a/documentai/apiv1/documentaipb/processor_type.pb.go +++ b/documentai/apiv1/documentaipb/processor_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1/processor_type.proto @@ -64,11 +64,9 @@ type ProcessorType struct { func (x *ProcessorType) Reset() { *x = ProcessorType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorType) String() string { @@ -79,7 +77,7 @@ func (*ProcessorType) ProtoMessage() {} func (x *ProcessorType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +154,9 @@ type ProcessorType_LocationInfo struct { func (x *ProcessorType_LocationInfo) Reset() { *x = ProcessorType_LocationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorType_LocationInfo) String() string { @@ -171,7 +167,7 @@ func (*ProcessorType_LocationInfo) ProtoMessage() {} func (x *ProcessorType_LocationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1_processor_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,32 +282,6 @@ func file_google_cloud_documentai_v1_processor_type_proto_init() { if File_google_cloud_documentai_v1_processor_type_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1_processor_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1_processor_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorType_LocationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1/helpers.go b/documentai/apiv1/helpers.go index 5b942c370251..aaebfd257c26 100755 --- a/documentai/apiv1/helpers.go +++ b/documentai/apiv1/helpers.go @@ -18,10 +18,20 @@ package documentai import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "documentai.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/documentai/apiv1beta3/document_client.go b/documentai/apiv1beta3/document_client.go index eb11dd7b7498..2739a6e38df9 100755 --- a/documentai/apiv1beta3/document_client.go +++ b/documentai/apiv1beta3/document_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -278,6 +277,8 @@ type documentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentClient creates a new document service client based on gRPC. @@ -304,6 +305,7 @@ func NewDocumentClient(ctx context.Context, opts ...option.ClientOption) (*Docum connPool: connPool, documentClient: documentaipb.NewDocumentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -368,6 +370,8 @@ type documentRESTClient struct { // Points back to the CallOptions field of the containing DocumentClient CallOptions **DocumentCallOptions + + logger *slog.Logger } // NewDocumentRESTClient creates a new document service rest client. @@ -385,6 +389,7 @@ func NewDocumentRESTClient(ctx context.Context, opts ...option.ClientOption) (*D endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -447,7 +452,7 @@ func (c *documentGRPCClient) UpdateDataset(ctx context.Context, req *documentaip var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.UpdateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.UpdateDataset, req, settings.GRPC, c.logger, "UpdateDataset") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *documentGRPCClient) ImportDocuments(ctx context.Context, req *documenta var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -487,7 +492,7 @@ func (c *documentGRPCClient) GetDocument(ctx context.Context, req *documentaipb. var resp *documentaipb.GetDocumentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -516,7 +521,7 @@ func (c *documentGRPCClient) ListDocuments(ctx context.Context, req *documentaip } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *documentGRPCClient) BatchDeleteDocuments(ctx context.Context, req *docu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.BatchDeleteDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.BatchDeleteDocuments, req, settings.GRPC, c.logger, "BatchDeleteDocuments") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *documentGRPCClient) GetDatasetSchema(ctx context.Context, req *document var resp *documentaipb.DatasetSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.GetDatasetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.GetDatasetSchema, req, settings.GRPC, c.logger, "GetDatasetSchema") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *documentGRPCClient) UpdateDatasetSchema(ctx context.Context, req *docum var resp *documentaipb.DatasetSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentClient.UpdateDatasetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentClient.UpdateDatasetSchema, req, settings.GRPC, c.logger, "UpdateDatasetSchema") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *documentGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *documentGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -670,7 +675,7 @@ func (c *documentGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -685,7 +690,7 @@ func (c *documentGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -714,7 +719,7 @@ func (c *documentGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -791,21 +796,10 @@ func (c *documentRESTClient) UpdateDataset(ctx context.Context, req *documentaip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -861,21 +855,10 @@ func (c *documentRESTClient) ImportDocuments(ctx context.Context, req *documenta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -953,17 +936,7 @@ func (c *documentRESTClient) GetDocument(ctx context.Context, req *documentaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1025,21 +998,10 @@ func (c *documentRESTClient) ListDocuments(ctx context.Context, req *documentaip } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1107,21 +1069,10 @@ func (c *documentRESTClient) BatchDeleteDocuments(ctx context.Context, req *docu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1175,17 +1126,7 @@ func (c *documentRESTClient) GetDatasetSchema(ctx context.Context, req *document httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatasetSchema") if err != nil { return err } @@ -1249,17 +1190,7 @@ func (c *documentRESTClient) UpdateDatasetSchema(ctx context.Context, req *docum httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatasetSchema") if err != nil { return err } @@ -1309,17 +1240,7 @@ func (c *documentRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1384,21 +1305,10 @@ func (c *documentRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1458,15 +1368,8 @@ func (c *documentRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1503,17 +1406,7 @@ func (c *documentRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1578,21 +1471,10 @@ func (c *documentRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/documentai/apiv1beta3/document_client_example_go123_test.go b/documentai/apiv1beta3/document_client_example_go123_test.go index da9ed2a725ad..3eca836c70f4 100644 --- a/documentai/apiv1beta3/document_client_example_go123_test.go +++ b/documentai/apiv1beta3/document_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDocumentClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDocumentClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDocumentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/documentai/apiv1beta3/document_processor_client.go b/documentai/apiv1beta3/document_processor_client.go index 5217eb51af2e..b95dd2183159 100755 --- a/documentai/apiv1beta3/document_processor_client.go +++ b/documentai/apiv1beta3/document_processor_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -575,6 +574,8 @@ type documentProcessorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDocumentProcessorClient creates a new document processor service client based on gRPC. @@ -604,6 +605,7 @@ func NewDocumentProcessorClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, documentProcessorClient: documentaipb.NewDocumentProcessorServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -668,6 +670,8 @@ type documentProcessorRESTClient struct { // Points back to the CallOptions field of the containing DocumentProcessorClient CallOptions **DocumentProcessorCallOptions + + logger *slog.Logger } // NewDocumentProcessorRESTClient creates a new document processor service rest client. @@ -688,6 +692,7 @@ func NewDocumentProcessorRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -750,7 +755,7 @@ func (c *documentProcessorGRPCClient) ProcessDocument(ctx context.Context, req * var resp *documentaipb.ProcessResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ProcessDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ProcessDocument, req, settings.GRPC, c.logger, "ProcessDocument") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *documentProcessorGRPCClient) BatchProcessDocuments(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.BatchProcessDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.BatchProcessDocuments, req, settings.GRPC, c.logger, "BatchProcessDocuments") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *documentProcessorGRPCClient) FetchProcessorTypes(ctx context.Context, r var resp *documentaipb.FetchProcessorTypesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.FetchProcessorTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.FetchProcessorTypes, req, settings.GRPC, c.logger, "FetchProcessorTypes") return err }, opts...) if err != nil { @@ -817,7 +822,7 @@ func (c *documentProcessorGRPCClient) ListProcessorTypes(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessorTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessorTypes, req, settings.GRPC, c.logger, "ListProcessorTypes") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *documentProcessorGRPCClient) GetProcessorType(ctx context.Context, req var resp *documentaipb.ProcessorType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessorType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessorType, req, settings.GRPC, c.logger, "GetProcessorType") return err }, opts...) if err != nil { @@ -881,7 +886,7 @@ func (c *documentProcessorGRPCClient) ListProcessors(ctx context.Context, req *d } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessors, req, settings.GRPC, c.logger, "ListProcessors") return err }, opts...) if err != nil { @@ -916,7 +921,7 @@ func (c *documentProcessorGRPCClient) GetProcessor(ctx context.Context, req *doc var resp *documentaipb.Processor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessor, req, settings.GRPC, c.logger, "GetProcessor") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *documentProcessorGRPCClient) TrainProcessorVersion(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.TrainProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.TrainProcessorVersion, req, settings.GRPC, c.logger, "TrainProcessorVersion") return err }, opts...) if err != nil { @@ -954,7 +959,7 @@ func (c *documentProcessorGRPCClient) GetProcessorVersion(ctx context.Context, r var resp *documentaipb.ProcessorVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetProcessorVersion, req, settings.GRPC, c.logger, "GetProcessorVersion") return err }, opts...) if err != nil { @@ -983,7 +988,7 @@ func (c *documentProcessorGRPCClient) ListProcessorVersions(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListProcessorVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListProcessorVersions, req, settings.GRPC, c.logger, "ListProcessorVersions") return err }, opts...) if err != nil { @@ -1018,7 +1023,7 @@ func (c *documentProcessorGRPCClient) DeleteProcessorVersion(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeleteProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeleteProcessorVersion, req, settings.GRPC, c.logger, "DeleteProcessorVersion") return err }, opts...) if err != nil { @@ -1038,7 +1043,7 @@ func (c *documentProcessorGRPCClient) DeployProcessorVersion(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeployProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeployProcessorVersion, req, settings.GRPC, c.logger, "DeployProcessorVersion") return err }, opts...) if err != nil { @@ -1058,7 +1063,7 @@ func (c *documentProcessorGRPCClient) UndeployProcessorVersion(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.UndeployProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.UndeployProcessorVersion, req, settings.GRPC, c.logger, "UndeployProcessorVersion") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *documentProcessorGRPCClient) CreateProcessor(ctx context.Context, req * var resp *documentaipb.Processor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.CreateProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.CreateProcessor, req, settings.GRPC, c.logger, "CreateProcessor") return err }, opts...) if err != nil { @@ -1096,7 +1101,7 @@ func (c *documentProcessorGRPCClient) DeleteProcessor(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DeleteProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DeleteProcessor, req, settings.GRPC, c.logger, "DeleteProcessor") return err }, opts...) if err != nil { @@ -1116,7 +1121,7 @@ func (c *documentProcessorGRPCClient) EnableProcessor(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.EnableProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.EnableProcessor, req, settings.GRPC, c.logger, "EnableProcessor") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *documentProcessorGRPCClient) DisableProcessor(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.DisableProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.DisableProcessor, req, settings.GRPC, c.logger, "DisableProcessor") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *documentProcessorGRPCClient) SetDefaultProcessorVersion(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.SetDefaultProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.SetDefaultProcessorVersion, req, settings.GRPC, c.logger, "SetDefaultProcessorVersion") return err }, opts...) if err != nil { @@ -1176,7 +1181,7 @@ func (c *documentProcessorGRPCClient) ReviewDocument(ctx context.Context, req *d var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ReviewDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ReviewDocument, req, settings.GRPC, c.logger, "ReviewDocument") return err }, opts...) if err != nil { @@ -1196,7 +1201,7 @@ func (c *documentProcessorGRPCClient) EvaluateProcessorVersion(ctx context.Conte var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.EvaluateProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.EvaluateProcessorVersion, req, settings.GRPC, c.logger, "EvaluateProcessorVersion") return err }, opts...) if err != nil { @@ -1216,7 +1221,7 @@ func (c *documentProcessorGRPCClient) GetEvaluation(ctx context.Context, req *do var resp *documentaipb.Evaluation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.GetEvaluation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.GetEvaluation, req, settings.GRPC, c.logger, "GetEvaluation") return err }, opts...) if err != nil { @@ -1245,7 +1250,7 @@ func (c *documentProcessorGRPCClient) ListEvaluations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ListEvaluations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ListEvaluations, req, settings.GRPC, c.logger, "ListEvaluations") return err }, opts...) if err != nil { @@ -1280,7 +1285,7 @@ func (c *documentProcessorGRPCClient) ImportProcessorVersion(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.documentProcessorClient.ImportProcessorVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.documentProcessorClient.ImportProcessorVersion, req, settings.GRPC, c.logger, "ImportProcessorVersion") return err }, opts...) if err != nil { @@ -1300,7 +1305,7 @@ func (c *documentProcessorGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1329,7 +1334,7 @@ func (c *documentProcessorGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1363,7 +1368,7 @@ func (c *documentProcessorGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1378,7 +1383,7 @@ func (c *documentProcessorGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1407,7 +1412,7 @@ func (c *documentProcessorGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1472,17 +1477,7 @@ func (c *documentProcessorRESTClient) ProcessDocument(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProcessDocument") if err != nil { return err } @@ -1538,21 +1533,10 @@ func (c *documentProcessorRESTClient) BatchProcessDocuments(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchProcessDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1605,17 +1589,7 @@ func (c *documentProcessorRESTClient) FetchProcessorTypes(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchProcessorTypes") if err != nil { return err } @@ -1677,21 +1651,10 @@ func (c *documentProcessorRESTClient) ListProcessorTypes(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessorTypes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1754,17 +1717,7 @@ func (c *documentProcessorRESTClient) GetProcessorType(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessorType") if err != nil { return err } @@ -1826,21 +1779,10 @@ func (c *documentProcessorRESTClient) ListProcessors(ctx context.Context, req *d } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1903,17 +1845,7 @@ func (c *documentProcessorRESTClient) GetProcessor(ctx context.Context, req *doc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessor") if err != nil { return err } @@ -1970,21 +1902,10 @@ func (c *documentProcessorRESTClient) TrainProcessorVersion(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TrainProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2035,17 +1956,7 @@ func (c *documentProcessorRESTClient) GetProcessorVersion(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessorVersion") if err != nil { return err } @@ -2107,21 +2018,10 @@ func (c *documentProcessorRESTClient) ListProcessorVersions(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessorVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2184,21 +2084,10 @@ func (c *documentProcessorRESTClient) DeleteProcessorVersion(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2254,21 +2143,10 @@ func (c *documentProcessorRESTClient) DeployProcessorVersion(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2324,21 +2202,10 @@ func (c *documentProcessorRESTClient) UndeployProcessorVersion(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployProcessorVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2402,17 +2269,7 @@ func (c *documentProcessorRESTClient) CreateProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProcessor") if err != nil { return err } @@ -2462,21 +2319,10 @@ func (c *documentProcessorRESTClient) DeleteProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcessor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2532,21 +2378,10 @@ func (c *documentProcessorRESTClient) EnableProcessor(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableProcessor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2602,21 +2437,10 @@ func (c *documentProcessorRESTClient) DisableProcessor(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableProcessor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2676,21 +2500,10 @@ func (c *documentProcessorRESTClient) SetDefaultProcessorVersion(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultProcessorVersion") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2747,21 +2560,10 @@ func (c *documentProcessorRESTClient) ReviewDocument(ctx context.Context, req *d httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReviewDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2818,21 +2620,10 @@ func (c *documentProcessorRESTClient) EvaluateProcessorVersion(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EvaluateProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2883,17 +2674,7 @@ func (c *documentProcessorRESTClient) GetEvaluation(ctx context.Context, req *do httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvaluation") if err != nil { return err } @@ -2955,21 +2736,10 @@ func (c *documentProcessorRESTClient) ListEvaluations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvaluations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3037,21 +2807,10 @@ func (c *documentProcessorRESTClient) ImportProcessorVersion(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportProcessorVersion") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3102,17 +2861,7 @@ func (c *documentProcessorRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3177,21 +2926,10 @@ func (c *documentProcessorRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3251,15 +2989,8 @@ func (c *documentProcessorRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3296,17 +3027,7 @@ func (c *documentProcessorRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3371,21 +3092,10 @@ func (c *documentProcessorRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/documentai/apiv1beta3/document_processor_client_example_go123_test.go b/documentai/apiv1beta3/document_processor_client_example_go123_test.go index 98f5960fe09f..a4cf14ca3bed 100644 --- a/documentai/apiv1beta3/document_processor_client_example_go123_test.go +++ b/documentai/apiv1beta3/document_processor_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDocumentProcessorClient_ListEvaluations_all() { } for resp, err := range c.ListEvaluations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDocumentProcessorClient_ListProcessorTypes_all() { } for resp, err := range c.ListProcessorTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDocumentProcessorClient_ListProcessorVersions_all() { } for resp, err := range c.ListProcessorVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDocumentProcessorClient_ListProcessors_all() { } for resp, err := range c.ListProcessors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDocumentProcessorClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleDocumentProcessorClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/documentai/apiv1beta3/documentaipb/barcode.pb.go b/documentai/apiv1beta3/documentaipb/barcode.pb.go index 11eff34906d7..d1531ee92ffe 100755 --- a/documentai/apiv1beta3/documentaipb/barcode.pb.go +++ b/documentai/apiv1beta3/documentaipb/barcode.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/barcode.proto @@ -83,11 +83,9 @@ type Barcode struct { func (x *Barcode) Reset() { *x = Barcode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_barcode_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_barcode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Barcode) String() string { @@ -98,7 +96,7 @@ func (*Barcode) ProtoMessage() {} func (x *Barcode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_barcode_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,20 +193,6 @@ func file_google_cloud_documentai_v1beta3_barcode_proto_init() { if File_google_cloud_documentai_v1beta3_barcode_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_barcode_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Barcode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1beta3/documentaipb/dataset.pb.go b/documentai/apiv1beta3/documentaipb/dataset.pb.go index 3463c7da8fbb..20682bbb62c4 100755 --- a/documentai/apiv1beta3/documentaipb/dataset.pb.go +++ b/documentai/apiv1beta3/documentaipb/dataset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/dataset.proto @@ -125,11 +125,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -140,7 +138,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +286,9 @@ type DocumentId struct { func (x *DocumentId) Reset() { *x = DocumentId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentId) String() string { @@ -303,7 +299,7 @@ func (*DocumentId) ProtoMessage() {} func (x *DocumentId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +380,9 @@ type DatasetSchema struct { func (x *DatasetSchema) Reset() { *x = DatasetSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetSchema) String() string { @@ -399,7 +393,7 @@ func (*DatasetSchema) ProtoMessage() {} func (x *DatasetSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +451,9 @@ type BatchDatasetDocuments struct { func (x *BatchDatasetDocuments) Reset() { *x = BatchDatasetDocuments{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDatasetDocuments) String() string { @@ -472,7 +464,7 @@ func (*BatchDatasetDocuments) ProtoMessage() {} func (x *BatchDatasetDocuments) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +533,9 @@ type Dataset_GCSManagedConfig struct { func (x *Dataset_GCSManagedConfig) Reset() { *x = Dataset_GCSManagedConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset_GCSManagedConfig) String() string { @@ -556,7 +546,7 @@ func (*Dataset_GCSManagedConfig) ProtoMessage() {} func (x *Dataset_GCSManagedConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +584,9 @@ type Dataset_DocumentWarehouseConfig struct { func (x *Dataset_DocumentWarehouseConfig) Reset() { *x = Dataset_DocumentWarehouseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset_DocumentWarehouseConfig) String() string { @@ -609,7 +597,7 @@ func (*Dataset_DocumentWarehouseConfig) ProtoMessage() {} func (x *Dataset_DocumentWarehouseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +635,9 @@ type Dataset_UnmanagedDatasetConfig struct { func (x *Dataset_UnmanagedDatasetConfig) Reset() { *x = Dataset_UnmanagedDatasetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset_UnmanagedDatasetConfig) String() string { @@ -662,7 +648,7 @@ func (*Dataset_UnmanagedDatasetConfig) ProtoMessage() {} func (x *Dataset_UnmanagedDatasetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +672,9 @@ type Dataset_SpannerIndexingConfig struct { func (x *Dataset_SpannerIndexingConfig) Reset() { *x = Dataset_SpannerIndexingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset_SpannerIndexingConfig) String() string { @@ -701,7 +685,7 @@ func (*Dataset_SpannerIndexingConfig) ProtoMessage() {} func (x *Dataset_SpannerIndexingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,11 +717,9 @@ type DocumentId_GCSManagedDocumentId struct { func (x *DocumentId_GCSManagedDocumentId) Reset() { *x = DocumentId_GCSManagedDocumentId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentId_GCSManagedDocumentId) String() string { @@ -748,7 +730,7 @@ func (*DocumentId_GCSManagedDocumentId) ProtoMessage() {} func (x *DocumentId_GCSManagedDocumentId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,11 +773,9 @@ type DocumentId_UnmanagedDocumentId struct { func (x *DocumentId_UnmanagedDocumentId) Reset() { *x = DocumentId_UnmanagedDocumentId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentId_UnmanagedDocumentId) String() string { @@ -806,7 +786,7 @@ func (*DocumentId_UnmanagedDocumentId) ProtoMessage() {} func (x *DocumentId_UnmanagedDocumentId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +821,9 @@ type BatchDatasetDocuments_IndividualDocumentIds struct { func (x *BatchDatasetDocuments_IndividualDocumentIds) Reset() { *x = BatchDatasetDocuments_IndividualDocumentIds{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDatasetDocuments_IndividualDocumentIds) String() string { @@ -856,7 +834,7 @@ func (*BatchDatasetDocuments_IndividualDocumentIds) ProtoMessage() {} func (x *BatchDatasetDocuments_IndividualDocumentIds) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,140 +1107,6 @@ func file_google_cloud_documentai_v1beta3_dataset_proto_init() { file_google_cloud_documentai_v1beta3_document_proto_init() file_google_cloud_documentai_v1beta3_document_io_proto_init() file_google_cloud_documentai_v1beta3_document_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DatasetSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchDatasetDocuments); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Dataset_GCSManagedConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Dataset_DocumentWarehouseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Dataset_UnmanagedDatasetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Dataset_SpannerIndexingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DocumentId_GCSManagedDocumentId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DocumentId_UnmanagedDocumentId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchDatasetDocuments_IndividualDocumentIds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_dataset_proto_msgTypes[0].OneofWrappers = []any{ (*Dataset_GcsManagedConfig)(nil), (*Dataset_DocumentWarehouseConfig_)(nil), diff --git a/documentai/apiv1beta3/documentaipb/document.pb.go b/documentai/apiv1beta3/documentaipb/document.pb.go index 43f608c1f350..fabe6a6eefac 100755 --- a/documentai/apiv1beta3/documentaipb/document.pb.go +++ b/documentai/apiv1beta3/documentaipb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/document.proto @@ -449,11 +449,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -464,7 +462,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +624,9 @@ type RevisionRef struct { func (x *RevisionRef) Reset() { *x = RevisionRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevisionRef) String() string { @@ -641,7 +637,7 @@ func (*RevisionRef) ProtoMessage() {} func (x *RevisionRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +727,9 @@ type Document_ShardInfo struct { func (x *Document_ShardInfo) Reset() { *x = Document_ShardInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ShardInfo) String() string { @@ -746,7 +740,7 @@ func (*Document_ShardInfo) ProtoMessage() {} func (x *Document_ShardInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +810,9 @@ type Document_Style struct { func (x *Document_Style) Reset() { *x = Document_Style{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Style) String() string { @@ -831,7 +823,7 @@ func (*Document_Style) ProtoMessage() {} func (x *Document_Style) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +954,9 @@ type Document_Page struct { func (x *Document_Page) Reset() { *x = Document_Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page) String() string { @@ -977,7 +967,7 @@ func (*Document_Page) ProtoMessage() {} func (x *Document_Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1145,9 @@ type Document_Entity struct { func (x *Document_Entity) Reset() { *x = Document_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Entity) String() string { @@ -1170,7 +1158,7 @@ func (*Document_Entity) ProtoMessage() {} func (x *Document_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1279,11 +1267,9 @@ type Document_EntityRelation struct { func (x *Document_EntityRelation) Reset() { *x = Document_EntityRelation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_EntityRelation) String() string { @@ -1294,7 +1280,7 @@ func (*Document_EntityRelation) ProtoMessage() {} func (x *Document_EntityRelation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1348,11 +1334,9 @@ type Document_TextAnchor struct { func (x *Document_TextAnchor) Reset() { *x = Document_TextAnchor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextAnchor) String() string { @@ -1363,7 +1347,7 @@ func (*Document_TextAnchor) ProtoMessage() {} func (x *Document_TextAnchor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,11 +1391,9 @@ type Document_PageAnchor struct { func (x *Document_PageAnchor) Reset() { *x = Document_PageAnchor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_PageAnchor) String() string { @@ -1422,7 +1404,7 @@ func (*Document_PageAnchor) ProtoMessage() {} func (x *Document_PageAnchor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1468,11 +1450,9 @@ type Document_Provenance struct { func (x *Document_Provenance) Reset() { *x = Document_Provenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Provenance) String() string { @@ -1483,7 +1463,7 @@ func (*Document_Provenance) ProtoMessage() {} func (x *Document_Provenance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,11 +1543,9 @@ type Document_Revision struct { func (x *Document_Revision) Reset() { *x = Document_Revision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Revision) String() string { @@ -1578,7 +1556,7 @@ func (*Document_Revision) ProtoMessage() {} func (x *Document_Revision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1671,9 @@ type Document_TextChange struct { func (x *Document_TextChange) Reset() { *x = Document_TextChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextChange) String() string { @@ -1708,7 +1684,7 @@ func (*Document_TextChange) ProtoMessage() {} func (x *Document_TextChange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1758,11 +1734,9 @@ type Document_DocumentLayout struct { func (x *Document_DocumentLayout) Reset() { *x = Document_DocumentLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout) String() string { @@ -1773,7 +1747,7 @@ func (*Document_DocumentLayout) ProtoMessage() {} func (x *Document_DocumentLayout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1807,11 +1781,9 @@ type Document_ChunkedDocument struct { func (x *Document_ChunkedDocument) Reset() { *x = Document_ChunkedDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument) String() string { @@ -1822,7 +1794,7 @@ func (*Document_ChunkedDocument) ProtoMessage() {} func (x *Document_ChunkedDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1859,11 +1831,9 @@ type Document_Style_FontSize struct { func (x *Document_Style_FontSize) Reset() { *x = Document_Style_FontSize{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Style_FontSize) String() string { @@ -1874,7 +1844,7 @@ func (*Document_Style_FontSize) ProtoMessage() {} func (x *Document_Style_FontSize) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1889,9 @@ type Document_Page_Dimension struct { func (x *Document_Page_Dimension) Reset() { *x = Document_Page_Dimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Dimension) String() string { @@ -1934,7 +1902,7 @@ func (*Document_Page_Dimension) ProtoMessage() {} func (x *Document_Page_Dimension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1990,11 +1958,9 @@ type Document_Page_Image struct { func (x *Document_Page_Image) Reset() { *x = Document_Page_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Image) String() string { @@ -2005,7 +1971,7 @@ func (*Document_Page_Image) ProtoMessage() {} func (x *Document_Page_Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2070,11 +2036,9 @@ type Document_Page_Matrix struct { func (x *Document_Page_Matrix) Reset() { *x = Document_Page_Matrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Matrix) String() string { @@ -2085,7 +2049,7 @@ func (*Document_Page_Matrix) ProtoMessage() {} func (x *Document_Page_Matrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2153,11 +2117,9 @@ type Document_Page_Layout struct { func (x *Document_Page_Layout) Reset() { *x = Document_Page_Layout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Layout) String() string { @@ -2168,7 +2130,7 @@ func (*Document_Page_Layout) ProtoMessage() {} func (x *Document_Page_Layout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2231,11 +2193,9 @@ type Document_Page_Block struct { func (x *Document_Page_Block) Reset() { *x = Document_Page_Block{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Block) String() string { @@ -2246,7 +2206,7 @@ func (*Document_Page_Block) ProtoMessage() {} func (x *Document_Page_Block) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2302,11 +2262,9 @@ type Document_Page_Paragraph struct { func (x *Document_Page_Paragraph) Reset() { *x = Document_Page_Paragraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Paragraph) String() string { @@ -2317,7 +2275,7 @@ func (*Document_Page_Paragraph) ProtoMessage() {} func (x *Document_Page_Paragraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2374,11 +2332,9 @@ type Document_Page_Line struct { func (x *Document_Page_Line) Reset() { *x = Document_Page_Line{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Line) String() string { @@ -2389,7 +2345,7 @@ func (*Document_Page_Line) ProtoMessage() {} func (x *Document_Page_Line) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2450,11 +2406,9 @@ type Document_Page_Token struct { func (x *Document_Page_Token) Reset() { *x = Document_Page_Token{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token) String() string { @@ -2465,7 +2419,7 @@ func (*Document_Page_Token) ProtoMessage() {} func (x *Document_Page_Token) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2531,11 +2485,9 @@ type Document_Page_Symbol struct { func (x *Document_Page_Symbol) Reset() { *x = Document_Page_Symbol{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Symbol) String() string { @@ -2546,7 +2498,7 @@ func (*Document_Page_Symbol) ProtoMessage() {} func (x *Document_Page_Symbol) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2594,11 +2546,9 @@ type Document_Page_VisualElement struct { func (x *Document_Page_VisualElement) Reset() { *x = Document_Page_VisualElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_VisualElement) String() string { @@ -2609,7 +2559,7 @@ func (*Document_Page_VisualElement) ProtoMessage() {} func (x *Document_Page_VisualElement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2668,11 +2618,9 @@ type Document_Page_Table struct { func (x *Document_Page_Table) Reset() { *x = Document_Page_Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table) String() string { @@ -2683,7 +2631,7 @@ func (*Document_Page_Table) ProtoMessage() {} func (x *Document_Page_Table) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2773,11 +2721,9 @@ type Document_Page_FormField struct { func (x *Document_Page_FormField) Reset() { *x = Document_Page_FormField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_FormField) String() string { @@ -2788,7 +2734,7 @@ func (*Document_Page_FormField) ProtoMessage() {} func (x *Document_Page_FormField) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2875,11 +2821,9 @@ type Document_Page_DetectedBarcode struct { func (x *Document_Page_DetectedBarcode) Reset() { *x = Document_Page_DetectedBarcode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_DetectedBarcode) String() string { @@ -2890,7 +2834,7 @@ func (*Document_Page_DetectedBarcode) ProtoMessage() {} func (x *Document_Page_DetectedBarcode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2935,11 +2879,9 @@ type Document_Page_DetectedLanguage struct { func (x *Document_Page_DetectedLanguage) Reset() { *x = Document_Page_DetectedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_DetectedLanguage) String() string { @@ -2950,7 +2892,7 @@ func (*Document_Page_DetectedLanguage) ProtoMessage() {} func (x *Document_Page_DetectedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2993,11 +2935,9 @@ type Document_Page_ImageQualityScores struct { func (x *Document_Page_ImageQualityScores) Reset() { *x = Document_Page_ImageQualityScores{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_ImageQualityScores) String() string { @@ -3008,7 +2948,7 @@ func (*Document_Page_ImageQualityScores) ProtoMessage() {} func (x *Document_Page_ImageQualityScores) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3050,11 +2990,9 @@ type Document_Page_Token_DetectedBreak struct { func (x *Document_Page_Token_DetectedBreak) Reset() { *x = Document_Page_Token_DetectedBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token_DetectedBreak) String() string { @@ -3065,7 +3003,7 @@ func (*Document_Page_Token_DetectedBreak) ProtoMessage() {} func (x *Document_Page_Token_DetectedBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3132,11 +3070,9 @@ type Document_Page_Token_StyleInfo struct { func (x *Document_Page_Token_StyleInfo) Reset() { *x = Document_Page_Token_StyleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Token_StyleInfo) String() string { @@ -3147,7 +3083,7 @@ func (*Document_Page_Token_StyleInfo) ProtoMessage() {} func (x *Document_Page_Token_StyleInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3279,11 +3215,9 @@ type Document_Page_Table_TableRow struct { func (x *Document_Page_Table_TableRow) Reset() { *x = Document_Page_Table_TableRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table_TableRow) String() string { @@ -3294,7 +3228,7 @@ func (*Document_Page_Table_TableRow) ProtoMessage() {} func (x *Document_Page_Table_TableRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3335,11 +3269,9 @@ type Document_Page_Table_TableCell struct { func (x *Document_Page_Table_TableCell) Reset() { *x = Document_Page_Table_TableCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_Table_TableCell) String() string { @@ -3350,7 +3282,7 @@ func (*Document_Page_Table_TableCell) ProtoMessage() {} func (x *Document_Page_Table_TableCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3417,11 +3349,9 @@ type Document_Page_ImageQualityScores_DetectedDefect struct { func (x *Document_Page_ImageQualityScores_DetectedDefect) Reset() { *x = Document_Page_ImageQualityScores_DetectedDefect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Page_ImageQualityScores_DetectedDefect) String() string { @@ -3432,7 +3362,7 @@ func (*Document_Page_ImageQualityScores_DetectedDefect) ProtoMessage() {} func (x *Document_Page_ImageQualityScores_DetectedDefect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3498,11 +3428,9 @@ type Document_Entity_NormalizedValue struct { func (x *Document_Entity_NormalizedValue) Reset() { *x = Document_Entity_NormalizedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Entity_NormalizedValue) String() string { @@ -3513,7 +3441,7 @@ func (*Document_Entity_NormalizedValue) ProtoMessage() {} func (x *Document_Entity_NormalizedValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3678,11 +3606,9 @@ type Document_TextAnchor_TextSegment struct { func (x *Document_TextAnchor_TextSegment) Reset() { *x = Document_TextAnchor_TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_TextAnchor_TextSegment) String() string { @@ -3693,7 +3619,7 @@ func (*Document_TextAnchor_TextSegment) ProtoMessage() {} func (x *Document_TextAnchor_TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3755,11 +3681,9 @@ type Document_PageAnchor_PageRef struct { func (x *Document_PageAnchor_PageRef) Reset() { *x = Document_PageAnchor_PageRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_PageAnchor_PageRef) String() string { @@ -3770,7 +3694,7 @@ func (*Document_PageAnchor_PageRef) ProtoMessage() {} func (x *Document_PageAnchor_PageRef) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3841,11 +3765,9 @@ type Document_Provenance_Parent struct { func (x *Document_Provenance_Parent) Reset() { *x = Document_Provenance_Parent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Provenance_Parent) String() string { @@ -3856,7 +3778,7 @@ func (*Document_Provenance_Parent) ProtoMessage() {} func (x *Document_Provenance_Parent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3908,11 +3830,9 @@ type Document_Revision_HumanReview struct { func (x *Document_Revision_HumanReview) Reset() { *x = Document_Revision_HumanReview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_Revision_HumanReview) String() string { @@ -3923,7 +3843,7 @@ func (*Document_Revision_HumanReview) ProtoMessage() {} func (x *Document_Revision_HumanReview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3973,11 +3893,9 @@ type Document_DocumentLayout_DocumentLayoutBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock) String() string { @@ -3988,7 +3906,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock) ProtoMessage() {} func (x *Document_DocumentLayout_DocumentLayoutBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4087,11 +4005,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) String() string { @@ -4102,7 +4018,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) ProtoMessage( func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4150,11 +4066,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) String() string { @@ -4165,7 +4079,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4217,11 +4131,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) String() string { @@ -4232,7 +4144,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) ProtoMessag func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4280,11 +4192,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) String() string { @@ -4295,7 +4205,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) ProtoMessage( func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4334,11 +4244,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) String() string { @@ -4349,7 +4257,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4400,11 +4308,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) String() string { @@ -4415,7 +4321,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4457,11 +4363,9 @@ type Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry struct { func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) Reset() { *x = Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) String() string { @@ -4472,7 +4376,7 @@ func (*Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) ProtoMessage func (x *Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4516,11 +4420,9 @@ type Document_ChunkedDocument_Chunk struct { func (x *Document_ChunkedDocument_Chunk) Reset() { *x = Document_ChunkedDocument_Chunk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk) String() string { @@ -4531,7 +4433,7 @@ func (*Document_ChunkedDocument_Chunk) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4602,11 +4504,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageSpan struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) String() string { @@ -4617,7 +4517,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageSpan) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4660,11 +4560,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageHeader struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) String() string { @@ -4675,7 +4573,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageHeader) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4718,11 +4616,9 @@ type Document_ChunkedDocument_Chunk_ChunkPageFooter struct { func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) Reset() { *x = Document_ChunkedDocument_Chunk_ChunkPageFooter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) String() string { @@ -4733,7 +4629,7 @@ func (*Document_ChunkedDocument_Chunk_ChunkPageFooter) ProtoMessage() {} func (x *Document_ChunkedDocument_Chunk_ChunkPageFooter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5912,632 +5808,6 @@ func file_google_cloud_documentai_v1beta3_document_proto_init() { } file_google_cloud_documentai_v1beta3_barcode_proto_init() file_google_cloud_documentai_v1beta3_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RevisionRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Document_ShardInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Document_Style); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Document_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Document_EntityRelation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextAnchor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Document_PageAnchor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Document_Provenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Document_Revision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Document_Style_FontSize); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Dimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Matrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Layout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Paragraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Line); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Symbol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_VisualElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_FormField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_DetectedBarcode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_DetectedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_ImageQualityScores); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token_DetectedBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Token_StyleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table_TableRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_Table_TableCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Document_Page_ImageQualityScores_DetectedDefect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Document_Entity_NormalizedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Document_TextAnchor_TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Document_PageAnchor_PageRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Document_Provenance_Parent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Document_Revision_HumanReview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutPageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTextBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutTableCell); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutListBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Document_DocumentLayout_DocumentLayoutBlock_LayoutListEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*Document_ChunkedDocument_Chunk_ChunkPageFooter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_document_proto_msgTypes[0].OneofWrappers = []any{ (*Document_Uri)(nil), (*Document_Content)(nil), diff --git a/documentai/apiv1beta3/documentaipb/document_io.pb.go b/documentai/apiv1beta3/documentaipb/document_io.pb.go index 9a26585e36a9..e94a9b9c899f 100755 --- a/documentai/apiv1beta3/documentaipb/document_io.pb.go +++ b/documentai/apiv1beta3/documentaipb/document_io.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/document_io.proto @@ -57,11 +57,9 @@ type RawDocument struct { func (x *RawDocument) Reset() { *x = RawDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawDocument) String() string { @@ -72,7 +70,7 @@ func (*RawDocument) ProtoMessage() {} func (x *RawDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type GcsDocument struct { func (x *GcsDocument) Reset() { *x = GcsDocument{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDocument) String() string { @@ -137,7 +133,7 @@ func (*GcsDocument) ProtoMessage() {} func (x *GcsDocument) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type GcsDocuments struct { func (x *GcsDocuments) Reset() { *x = GcsDocuments{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDocuments) String() string { @@ -193,7 +187,7 @@ func (*GcsDocuments) ProtoMessage() {} func (x *GcsDocuments) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +221,9 @@ type GcsPrefix struct { func (x *GcsPrefix) Reset() { *x = GcsPrefix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsPrefix) String() string { @@ -242,7 +234,7 @@ func (*GcsPrefix) ProtoMessage() {} func (x *GcsPrefix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +274,9 @@ type BatchDocumentsInputConfig struct { func (x *BatchDocumentsInputConfig) Reset() { *x = BatchDocumentsInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDocumentsInputConfig) String() string { @@ -297,7 +287,7 @@ func (*BatchDocumentsInputConfig) ProtoMessage() {} func (x *BatchDocumentsInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +358,9 @@ type DocumentOutputConfig struct { func (x *DocumentOutputConfig) Reset() { *x = DocumentOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig) String() string { @@ -383,7 +371,7 @@ func (*DocumentOutputConfig) ProtoMessage() {} func (x *DocumentOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +452,9 @@ type OcrConfig struct { func (x *OcrConfig) Reset() { *x = OcrConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig) String() string { @@ -479,7 +465,7 @@ func (*OcrConfig) ProtoMessage() {} func (x *OcrConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +555,9 @@ type DocumentOutputConfig_GcsOutputConfig struct { func (x *DocumentOutputConfig_GcsOutputConfig) Reset() { *x = DocumentOutputConfig_GcsOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig_GcsOutputConfig) String() string { @@ -584,7 +568,7 @@ func (*DocumentOutputConfig_GcsOutputConfig) ProtoMessage() {} func (x *DocumentOutputConfig_GcsOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +618,9 @@ type DocumentOutputConfig_GcsOutputConfig_ShardingConfig struct { func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) Reset() { *x = DocumentOutputConfig_GcsOutputConfig_ShardingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) String() string { @@ -649,7 +631,7 @@ func (*DocumentOutputConfig_GcsOutputConfig_ShardingConfig) ProtoMessage() {} func (x *DocumentOutputConfig_GcsOutputConfig_ShardingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +677,9 @@ type OcrConfig_Hints struct { func (x *OcrConfig_Hints) Reset() { *x = OcrConfig_Hints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig_Hints) String() string { @@ -710,7 +690,7 @@ func (*OcrConfig_Hints) ProtoMessage() {} func (x *OcrConfig_Hints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +729,9 @@ type OcrConfig_PremiumFeatures struct { func (x *OcrConfig_PremiumFeatures) Reset() { *x = OcrConfig_PremiumFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OcrConfig_PremiumFeatures) String() string { @@ -764,7 +742,7 @@ func (*OcrConfig_PremiumFeatures) ProtoMessage() {} func (x *OcrConfig_PremiumFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,140 +963,6 @@ func file_google_cloud_documentai_v1beta3_document_io_proto_init() { if File_google_cloud_documentai_v1beta3_document_io_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RawDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcsDocument); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsDocuments); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsPrefix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchDocumentsInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig_GcsOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig_GcsOutputConfig_ShardingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig_Hints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OcrConfig_PremiumFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_document_io_proto_msgTypes[4].OneofWrappers = []any{ (*BatchDocumentsInputConfig_GcsPrefix)(nil), (*BatchDocumentsInputConfig_GcsDocuments)(nil), diff --git a/documentai/apiv1beta3/documentaipb/document_processor_service.pb.go b/documentai/apiv1beta3/documentaipb/document_processor_service.pb.go index 379bcde4a5c1..eed84efb272a 100755 --- a/documentai/apiv1beta3/documentaipb/document_processor_service.pb.go +++ b/documentai/apiv1beta3/documentaipb/document_processor_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/document_processor_service.proto @@ -434,11 +434,9 @@ type ProcessOptions struct { func (x *ProcessOptions) Reset() { *x = ProcessOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions) String() string { @@ -449,7 +447,7 @@ func (*ProcessOptions) ProtoMessage() {} func (x *ProcessOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +594,9 @@ type ProcessRequest struct { func (x *ProcessRequest) Reset() { *x = ProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessRequest) String() string { @@ -611,7 +607,7 @@ func (*ProcessRequest) ProtoMessage() {} func (x *ProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +746,9 @@ type HumanReviewStatus struct { func (x *HumanReviewStatus) Reset() { *x = HumanReviewStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HumanReviewStatus) String() string { @@ -765,7 +759,7 @@ func (*HumanReviewStatus) ProtoMessage() {} func (x *HumanReviewStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,11 +819,9 @@ type ProcessResponse struct { func (x *ProcessResponse) Reset() { *x = ProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessResponse) String() string { @@ -840,7 +832,7 @@ func (*ProcessResponse) ProtoMessage() {} func (x *ProcessResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +915,9 @@ type BatchProcessRequest struct { func (x *BatchProcessRequest) Reset() { *x = BatchProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessRequest) String() string { @@ -938,7 +928,7 @@ func (*BatchProcessRequest) ProtoMessage() {} func (x *BatchProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1011,9 @@ type BatchProcessResponse struct { func (x *BatchProcessResponse) Reset() { *x = BatchProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessResponse) String() string { @@ -1036,7 +1024,7 @@ func (*BatchProcessResponse) ProtoMessage() {} func (x *BatchProcessResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1061,9 @@ type BatchProcessMetadata struct { func (x *BatchProcessMetadata) Reset() { *x = BatchProcessMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessMetadata) String() string { @@ -1088,7 +1074,7 @@ func (*BatchProcessMetadata) ProtoMessage() {} func (x *BatchProcessMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1140,9 @@ type FetchProcessorTypesRequest struct { func (x *FetchProcessorTypesRequest) Reset() { *x = FetchProcessorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchProcessorTypesRequest) String() string { @@ -1169,7 +1153,7 @@ func (*FetchProcessorTypesRequest) ProtoMessage() {} func (x *FetchProcessorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1205,11 +1189,9 @@ type FetchProcessorTypesResponse struct { func (x *FetchProcessorTypesResponse) Reset() { *x = FetchProcessorTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchProcessorTypesResponse) String() string { @@ -1220,7 +1202,7 @@ func (*FetchProcessorTypesResponse) ProtoMessage() {} func (x *FetchProcessorTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1246,9 @@ type ListProcessorTypesRequest struct { func (x *ListProcessorTypesRequest) Reset() { *x = ListProcessorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorTypesRequest) String() string { @@ -1279,7 +1259,7 @@ func (*ListProcessorTypesRequest) ProtoMessage() {} func (x *ListProcessorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1331,11 +1311,9 @@ type ListProcessorTypesResponse struct { func (x *ListProcessorTypesResponse) Reset() { *x = ListProcessorTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorTypesResponse) String() string { @@ -1346,7 +1324,7 @@ func (*ListProcessorTypesResponse) ProtoMessage() {} func (x *ListProcessorTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1395,11 +1373,9 @@ type ListProcessorsRequest struct { func (x *ListProcessorsRequest) Reset() { *x = ListProcessorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsRequest) String() string { @@ -1410,7 +1386,7 @@ func (*ListProcessorsRequest) ProtoMessage() {} func (x *ListProcessorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1438,9 @@ type ListProcessorsResponse struct { func (x *ListProcessorsResponse) Reset() { *x = ListProcessorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsResponse) String() string { @@ -1477,7 +1451,7 @@ func (*ListProcessorsResponse) ProtoMessage() {} func (x *ListProcessorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1494,9 @@ type GetProcessorTypeRequest struct { func (x *GetProcessorTypeRequest) Reset() { *x = GetProcessorTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorTypeRequest) String() string { @@ -1535,7 +1507,7 @@ func (*GetProcessorTypeRequest) ProtoMessage() {} func (x *GetProcessorTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1543,9 @@ type GetProcessorRequest struct { func (x *GetProcessorRequest) Reset() { *x = GetProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorRequest) String() string { @@ -1586,7 +1556,7 @@ func (*GetProcessorRequest) ProtoMessage() {} func (x *GetProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1592,9 @@ type GetProcessorVersionRequest struct { func (x *GetProcessorVersionRequest) Reset() { *x = GetProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorVersionRequest) String() string { @@ -1637,7 +1605,7 @@ func (*GetProcessorVersionRequest) ProtoMessage() {} func (x *GetProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1648,9 @@ type ListProcessorVersionsRequest struct { func (x *ListProcessorVersionsRequest) Reset() { *x = ListProcessorVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorVersionsRequest) String() string { @@ -1695,7 +1661,7 @@ func (*ListProcessorVersionsRequest) ProtoMessage() {} func (x *ListProcessorVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1747,11 +1713,9 @@ type ListProcessorVersionsResponse struct { func (x *ListProcessorVersionsResponse) Reset() { *x = ListProcessorVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorVersionsResponse) String() string { @@ -1762,7 +1726,7 @@ func (*ListProcessorVersionsResponse) ProtoMessage() {} func (x *ListProcessorVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1805,11 +1769,9 @@ type DeleteProcessorVersionRequest struct { func (x *DeleteProcessorVersionRequest) Reset() { *x = DeleteProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorVersionRequest) String() string { @@ -1820,7 +1782,7 @@ func (*DeleteProcessorVersionRequest) ProtoMessage() {} func (x *DeleteProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,11 +1818,9 @@ type DeleteProcessorVersionMetadata struct { func (x *DeleteProcessorVersionMetadata) Reset() { *x = DeleteProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorVersionMetadata) String() string { @@ -1871,7 +1831,7 @@ func (*DeleteProcessorVersionMetadata) ProtoMessage() {} func (x *DeleteProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1907,11 +1867,9 @@ type DeployProcessorVersionRequest struct { func (x *DeployProcessorVersionRequest) Reset() { *x = DeployProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionRequest) String() string { @@ -1922,7 +1880,7 @@ func (*DeployProcessorVersionRequest) ProtoMessage() {} func (x *DeployProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1913,9 @@ type DeployProcessorVersionResponse struct { func (x *DeployProcessorVersionResponse) Reset() { *x = DeployProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionResponse) String() string { @@ -1970,7 +1926,7 @@ func (*DeployProcessorVersionResponse) ProtoMessage() {} func (x *DeployProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1999,11 +1955,9 @@ type DeployProcessorVersionMetadata struct { func (x *DeployProcessorVersionMetadata) Reset() { *x = DeployProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployProcessorVersionMetadata) String() string { @@ -2014,7 +1968,7 @@ func (*DeployProcessorVersionMetadata) ProtoMessage() {} func (x *DeployProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2050,11 +2004,9 @@ type UndeployProcessorVersionRequest struct { func (x *UndeployProcessorVersionRequest) Reset() { *x = UndeployProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionRequest) String() string { @@ -2065,7 +2017,7 @@ func (*UndeployProcessorVersionRequest) ProtoMessage() {} func (x *UndeployProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,11 +2050,9 @@ type UndeployProcessorVersionResponse struct { func (x *UndeployProcessorVersionResponse) Reset() { *x = UndeployProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionResponse) String() string { @@ -2113,7 +2063,7 @@ func (*UndeployProcessorVersionResponse) ProtoMessage() {} func (x *UndeployProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2142,11 +2092,9 @@ type UndeployProcessorVersionMetadata struct { func (x *UndeployProcessorVersionMetadata) Reset() { *x = UndeployProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployProcessorVersionMetadata) String() string { @@ -2157,7 +2105,7 @@ func (*UndeployProcessorVersionMetadata) ProtoMessage() {} func (x *UndeployProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2203,11 +2151,9 @@ type CreateProcessorRequest struct { func (x *CreateProcessorRequest) Reset() { *x = CreateProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProcessorRequest) String() string { @@ -2218,7 +2164,7 @@ func (*CreateProcessorRequest) ProtoMessage() {} func (x *CreateProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2261,11 +2207,9 @@ type DeleteProcessorRequest struct { func (x *DeleteProcessorRequest) Reset() { *x = DeleteProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorRequest) String() string { @@ -2276,7 +2220,7 @@ func (*DeleteProcessorRequest) ProtoMessage() {} func (x *DeleteProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2312,11 +2256,9 @@ type DeleteProcessorMetadata struct { func (x *DeleteProcessorMetadata) Reset() { *x = DeleteProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorMetadata) String() string { @@ -2327,7 +2269,7 @@ func (*DeleteProcessorMetadata) ProtoMessage() {} func (x *DeleteProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2363,11 +2305,9 @@ type EnableProcessorRequest struct { func (x *EnableProcessorRequest) Reset() { *x = EnableProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorRequest) String() string { @@ -2378,7 +2318,7 @@ func (*EnableProcessorRequest) ProtoMessage() {} func (x *EnableProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2411,11 +2351,9 @@ type EnableProcessorResponse struct { func (x *EnableProcessorResponse) Reset() { *x = EnableProcessorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorResponse) String() string { @@ -2426,7 +2364,7 @@ func (*EnableProcessorResponse) ProtoMessage() {} func (x *EnableProcessorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2393,9 @@ type EnableProcessorMetadata struct { func (x *EnableProcessorMetadata) Reset() { *x = EnableProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProcessorMetadata) String() string { @@ -2470,7 +2406,7 @@ func (*EnableProcessorMetadata) ProtoMessage() {} func (x *EnableProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2506,11 +2442,9 @@ type DisableProcessorRequest struct { func (x *DisableProcessorRequest) Reset() { *x = DisableProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorRequest) String() string { @@ -2521,7 +2455,7 @@ func (*DisableProcessorRequest) ProtoMessage() {} func (x *DisableProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2554,11 +2488,9 @@ type DisableProcessorResponse struct { func (x *DisableProcessorResponse) Reset() { *x = DisableProcessorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorResponse) String() string { @@ -2569,7 +2501,7 @@ func (*DisableProcessorResponse) ProtoMessage() {} func (x *DisableProcessorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2598,11 +2530,9 @@ type DisableProcessorMetadata struct { func (x *DisableProcessorMetadata) Reset() { *x = DisableProcessorMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProcessorMetadata) String() string { @@ -2613,7 +2543,7 @@ func (*DisableProcessorMetadata) ProtoMessage() {} func (x *DisableProcessorMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2656,11 +2586,9 @@ type SetDefaultProcessorVersionRequest struct { func (x *SetDefaultProcessorVersionRequest) Reset() { *x = SetDefaultProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionRequest) String() string { @@ -2671,7 +2599,7 @@ func (*SetDefaultProcessorVersionRequest) ProtoMessage() {} func (x *SetDefaultProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2711,11 +2639,9 @@ type SetDefaultProcessorVersionResponse struct { func (x *SetDefaultProcessorVersionResponse) Reset() { *x = SetDefaultProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionResponse) String() string { @@ -2726,7 +2652,7 @@ func (*SetDefaultProcessorVersionResponse) ProtoMessage() {} func (x *SetDefaultProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,11 +2681,9 @@ type SetDefaultProcessorVersionMetadata struct { func (x *SetDefaultProcessorVersionMetadata) Reset() { *x = SetDefaultProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultProcessorVersionMetadata) String() string { @@ -2770,7 +2694,7 @@ func (*SetDefaultProcessorVersionMetadata) ProtoMessage() {} func (x *SetDefaultProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2824,11 +2748,9 @@ type TrainProcessorVersionRequest struct { func (x *TrainProcessorVersionRequest) Reset() { *x = TrainProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest) String() string { @@ -2839,7 +2761,7 @@ func (*TrainProcessorVersionRequest) ProtoMessage() {} func (x *TrainProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2943,11 +2865,9 @@ type TrainProcessorVersionResponse struct { func (x *TrainProcessorVersionResponse) Reset() { *x = TrainProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionResponse) String() string { @@ -2958,7 +2878,7 @@ func (*TrainProcessorVersionResponse) ProtoMessage() {} func (x *TrainProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2916,9 @@ type TrainProcessorVersionMetadata struct { func (x *TrainProcessorVersionMetadata) Reset() { *x = TrainProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionMetadata) String() string { @@ -3011,7 +2929,7 @@ func (*TrainProcessorVersionMetadata) ProtoMessage() {} func (x *TrainProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3079,11 +2997,9 @@ type ReviewDocumentRequest struct { func (x *ReviewDocumentRequest) Reset() { *x = ReviewDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentRequest) String() string { @@ -3094,7 +3010,7 @@ func (*ReviewDocumentRequest) ProtoMessage() {} func (x *ReviewDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3189,11 +3105,9 @@ type ReviewDocumentResponse struct { func (x *ReviewDocumentResponse) Reset() { *x = ReviewDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentResponse) String() string { @@ -3204,7 +3118,7 @@ func (*ReviewDocumentResponse) ProtoMessage() {} func (x *ReviewDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3265,11 +3179,9 @@ type ReviewDocumentOperationMetadata struct { func (x *ReviewDocumentOperationMetadata) Reset() { *x = ReviewDocumentOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReviewDocumentOperationMetadata) String() string { @@ -3280,7 +3192,7 @@ func (*ReviewDocumentOperationMetadata) ProtoMessage() {} func (x *ReviewDocumentOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3357,11 +3269,9 @@ type EvaluateProcessorVersionRequest struct { func (x *EvaluateProcessorVersionRequest) Reset() { *x = EvaluateProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionRequest) String() string { @@ -3372,7 +3282,7 @@ func (*EvaluateProcessorVersionRequest) ProtoMessage() {} func (x *EvaluateProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3415,11 +3325,9 @@ type EvaluateProcessorVersionMetadata struct { func (x *EvaluateProcessorVersionMetadata) Reset() { *x = EvaluateProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionMetadata) String() string { @@ -3430,7 +3338,7 @@ func (*EvaluateProcessorVersionMetadata) ProtoMessage() {} func (x *EvaluateProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3466,11 +3374,9 @@ type EvaluateProcessorVersionResponse struct { func (x *EvaluateProcessorVersionResponse) Reset() { *x = EvaluateProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluateProcessorVersionResponse) String() string { @@ -3481,7 +3387,7 @@ func (*EvaluateProcessorVersionResponse) ProtoMessage() {} func (x *EvaluateProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3517,11 +3423,9 @@ type GetEvaluationRequest struct { func (x *GetEvaluationRequest) Reset() { *x = GetEvaluationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvaluationRequest) String() string { @@ -3532,7 +3436,7 @@ func (*GetEvaluationRequest) ProtoMessage() {} func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3577,11 +3481,9 @@ type ListEvaluationsRequest struct { func (x *ListEvaluationsRequest) Reset() { *x = ListEvaluationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsRequest) String() string { @@ -3592,7 +3494,7 @@ func (*ListEvaluationsRequest) ProtoMessage() {} func (x *ListEvaluationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3643,11 +3545,9 @@ type ListEvaluationsResponse struct { func (x *ListEvaluationsResponse) Reset() { *x = ListEvaluationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEvaluationsResponse) String() string { @@ -3658,7 +3558,7 @@ func (*ListEvaluationsResponse) ProtoMessage() {} func (x *ListEvaluationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3722,11 +3622,9 @@ type ImportProcessorVersionRequest struct { func (x *ImportProcessorVersionRequest) Reset() { *x = ImportProcessorVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProcessorVersionRequest) String() string { @@ -3737,7 +3635,7 @@ func (*ImportProcessorVersionRequest) ProtoMessage() {} func (x *ImportProcessorVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3818,11 +3716,9 @@ type ImportProcessorVersionResponse struct { func (x *ImportProcessorVersionResponse) Reset() { *x = ImportProcessorVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProcessorVersionResponse) String() string { @@ -3833,7 +3729,7 @@ func (*ImportProcessorVersionResponse) ProtoMessage() {} func (x *ImportProcessorVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3869,11 +3765,9 @@ type ImportProcessorVersionMetadata struct { func (x *ImportProcessorVersionMetadata) Reset() { *x = ImportProcessorVersionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProcessorVersionMetadata) String() string { @@ -3884,7 +3778,7 @@ func (*ImportProcessorVersionMetadata) ProtoMessage() {} func (x *ImportProcessorVersionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3918,11 +3812,9 @@ type ProcessOptions_LayoutConfig struct { func (x *ProcessOptions_LayoutConfig) Reset() { *x = ProcessOptions_LayoutConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_LayoutConfig) String() string { @@ -3933,7 +3825,7 @@ func (*ProcessOptions_LayoutConfig) ProtoMessage() {} func (x *ProcessOptions_LayoutConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3967,11 +3859,9 @@ type ProcessOptions_IndividualPageSelector struct { func (x *ProcessOptions_IndividualPageSelector) Reset() { *x = ProcessOptions_IndividualPageSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_IndividualPageSelector) String() string { @@ -3982,7 +3872,7 @@ func (*ProcessOptions_IndividualPageSelector) ProtoMessage() {} func (x *ProcessOptions_IndividualPageSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4026,11 +3916,9 @@ type ProcessOptions_LayoutConfig_ChunkingConfig struct { func (x *ProcessOptions_LayoutConfig_ChunkingConfig) Reset() { *x = ProcessOptions_LayoutConfig_ChunkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessOptions_LayoutConfig_ChunkingConfig) String() string { @@ -4041,7 +3929,7 @@ func (*ProcessOptions_LayoutConfig_ChunkingConfig) ProtoMessage() {} func (x *ProcessOptions_LayoutConfig_ChunkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4106,11 +3994,9 @@ type BatchProcessRequest_BatchInputConfig struct { func (x *BatchProcessRequest_BatchInputConfig) Reset() { *x = BatchProcessRequest_BatchInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessRequest_BatchInputConfig) String() string { @@ -4121,7 +4007,7 @@ func (*BatchProcessRequest_BatchInputConfig) ProtoMessage() {} func (x *BatchProcessRequest_BatchInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4166,11 +4052,9 @@ type BatchProcessRequest_BatchOutputConfig struct { func (x *BatchProcessRequest_BatchOutputConfig) Reset() { *x = BatchProcessRequest_BatchOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessRequest_BatchOutputConfig) String() string { @@ -4181,7 +4065,7 @@ func (*BatchProcessRequest_BatchOutputConfig) ProtoMessage() {} func (x *BatchProcessRequest_BatchOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4234,11 +4118,9 @@ type BatchProcessMetadata_IndividualProcessStatus struct { func (x *BatchProcessMetadata_IndividualProcessStatus) Reset() { *x = BatchProcessMetadata_IndividualProcessStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchProcessMetadata_IndividualProcessStatus) String() string { @@ -4249,7 +4131,7 @@ func (*BatchProcessMetadata_IndividualProcessStatus) ProtoMessage() {} func (x *BatchProcessMetadata_IndividualProcessStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4315,11 +4197,9 @@ type TrainProcessorVersionRequest_InputData struct { func (x *TrainProcessorVersionRequest_InputData) Reset() { *x = TrainProcessorVersionRequest_InputData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_InputData) String() string { @@ -4330,7 +4210,7 @@ func (*TrainProcessorVersionRequest_InputData) ProtoMessage() {} func (x *TrainProcessorVersionRequest_InputData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4372,11 +4252,9 @@ type TrainProcessorVersionRequest_CustomDocumentExtractionOptions struct { func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) Reset() { *x = TrainProcessorVersionRequest_CustomDocumentExtractionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) String() string { @@ -4387,7 +4265,7 @@ func (*TrainProcessorVersionRequest_CustomDocumentExtractionOptions) ProtoMessag func (x *TrainProcessorVersionRequest_CustomDocumentExtractionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4426,11 +4304,9 @@ type TrainProcessorVersionRequest_FoundationModelTuningOptions struct { func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) Reset() { *x = TrainProcessorVersionRequest_FoundationModelTuningOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) String() string { @@ -4441,7 +4317,7 @@ func (*TrainProcessorVersionRequest_FoundationModelTuningOptions) ProtoMessage() func (x *TrainProcessorVersionRequest_FoundationModelTuningOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4493,11 +4369,9 @@ type TrainProcessorVersionMetadata_DatasetValidation struct { func (x *TrainProcessorVersionMetadata_DatasetValidation) Reset() { *x = TrainProcessorVersionMetadata_DatasetValidation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrainProcessorVersionMetadata_DatasetValidation) String() string { @@ -4508,7 +4382,7 @@ func (*TrainProcessorVersionMetadata_DatasetValidation) ProtoMessage() {} func (x *TrainProcessorVersionMetadata_DatasetValidation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4567,11 +4441,9 @@ type ImportProcessorVersionRequest_ExternalProcessorVersionSource struct { func (x *ImportProcessorVersionRequest_ExternalProcessorVersionSource) Reset() { *x = ImportProcessorVersionRequest_ExternalProcessorVersionSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProcessorVersionRequest_ExternalProcessorVersionSource) String() string { @@ -4582,7 +4454,7 @@ func (*ImportProcessorVersionRequest_ExternalProcessorVersionSource) ProtoMessag func (x *ImportProcessorVersionRequest_ExternalProcessorVersionSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6104,776 +5976,6 @@ func file_google_cloud_documentai_v1beta3_document_processor_service_proto_init( file_google_cloud_documentai_v1beta3_operation_metadata_proto_init() file_google_cloud_documentai_v1beta3_processor_proto_init() file_google_cloud_documentai_v1beta3_processor_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HumanReviewStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*FetchProcessorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FetchProcessorTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeployProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UndeployProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*EnableProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DisableProcessorMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ReviewDocumentOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*EvaluateProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*GetEvaluationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListEvaluationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ImportProcessorVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ImportProcessorVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ImportProcessorVersionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_LayoutConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_IndividualPageSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ProcessOptions_LayoutConfig_ChunkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessRequest_BatchInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessRequest_BatchOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*BatchProcessMetadata_IndividualProcessStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_InputData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_CustomDocumentExtractionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionRequest_FoundationModelTuningOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*TrainProcessorVersionMetadata_DatasetValidation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*ImportProcessorVersionRequest_ExternalProcessorVersionSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_document_processor_service_proto_msgTypes[0].OneofWrappers = []any{ (*ProcessOptions_IndividualPageSelector_)(nil), (*ProcessOptions_FromStart)(nil), diff --git a/documentai/apiv1beta3/documentaipb/document_schema.pb.go b/documentai/apiv1beta3/documentaipb/document_schema.pb.go index 3e0d1c149b2e..6bf22fc0f42a 100755 --- a/documentai/apiv1beta3/documentaipb/document_schema.pb.go +++ b/documentai/apiv1beta3/documentaipb/document_schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/document_schema.proto @@ -230,11 +230,9 @@ type SummaryOptions struct { func (x *SummaryOptions) Reset() { *x = SummaryOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SummaryOptions) String() string { @@ -245,7 +243,7 @@ func (*SummaryOptions) ProtoMessage() {} func (x *SummaryOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +284,9 @@ type FieldExtractionMetadata struct { func (x *FieldExtractionMetadata) Reset() { *x = FieldExtractionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldExtractionMetadata) String() string { @@ -301,7 +297,7 @@ func (*FieldExtractionMetadata) ProtoMessage() {} func (x *FieldExtractionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,11 +333,9 @@ type PropertyMetadata struct { func (x *PropertyMetadata) Reset() { *x = PropertyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PropertyMetadata) String() string { @@ -352,7 +346,7 @@ func (*PropertyMetadata) ProtoMessage() {} func (x *PropertyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +387,9 @@ type EntityTypeMetadata struct { func (x *EntityTypeMetadata) Reset() { *x = EntityTypeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityTypeMetadata) String() string { @@ -408,7 +400,7 @@ func (*EntityTypeMetadata) ProtoMessage() {} func (x *EntityTypeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +440,9 @@ type DocumentSchema struct { func (x *DocumentSchema) Reset() { *x = DocumentSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema) String() string { @@ -463,7 +453,7 @@ func (*DocumentSchema) ProtoMessage() {} func (x *DocumentSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +538,9 @@ type DocumentSchema_EntityType struct { func (x *DocumentSchema_EntityType) Reset() { *x = DocumentSchema_EntityType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType) String() string { @@ -563,7 +551,7 @@ func (*DocumentSchema_EntityType) ProtoMessage() {} func (x *DocumentSchema_EntityType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +660,9 @@ type DocumentSchema_Metadata struct { func (x *DocumentSchema_Metadata) Reset() { *x = DocumentSchema_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_Metadata) String() string { @@ -687,7 +673,7 @@ func (*DocumentSchema_Metadata) ProtoMessage() {} func (x *DocumentSchema_Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +728,9 @@ type DocumentSchema_EntityType_EnumValues struct { func (x *DocumentSchema_EntityType_EnumValues) Reset() { *x = DocumentSchema_EntityType_EnumValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType_EnumValues) String() string { @@ -757,7 +741,7 @@ func (*DocumentSchema_EntityType_EnumValues) ProtoMessage() {} func (x *DocumentSchema_EntityType_EnumValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +789,9 @@ type DocumentSchema_EntityType_Property struct { func (x *DocumentSchema_EntityType_Property) Reset() { *x = DocumentSchema_EntityType_Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentSchema_EntityType_Property) String() string { @@ -820,7 +802,7 @@ func (*DocumentSchema_EntityType_Property) ProtoMessage() {} func (x *DocumentSchema_EntityType_Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,116 +1073,6 @@ func file_google_cloud_documentai_v1beta3_document_schema_proto_init() { if File_google_cloud_documentai_v1beta3_document_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SummaryOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FieldExtractionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PropertyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EntityTypeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType_EnumValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DocumentSchema_EntityType_Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_document_schema_proto_msgTypes[5].OneofWrappers = []any{ (*DocumentSchema_EntityType_EnumValues_)(nil), } diff --git a/documentai/apiv1beta3/documentaipb/document_service.pb.go b/documentai/apiv1beta3/documentaipb/document_service.pb.go index f9569c654168..1df2cfbe541c 100755 --- a/documentai/apiv1beta3/documentaipb/document_service.pb.go +++ b/documentai/apiv1beta3/documentaipb/document_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/document_service.proto @@ -172,11 +172,9 @@ type UpdateDatasetRequest struct { func (x *UpdateDatasetRequest) Reset() { *x = UpdateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetRequest) String() string { @@ -187,7 +185,7 @@ func (*UpdateDatasetRequest) ProtoMessage() {} func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +225,9 @@ type UpdateDatasetOperationMetadata struct { func (x *UpdateDatasetOperationMetadata) Reset() { *x = UpdateDatasetOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetOperationMetadata) String() string { @@ -242,7 +238,7 @@ func (*UpdateDatasetOperationMetadata) ProtoMessage() {} func (x *UpdateDatasetOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +276,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -295,7 +289,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type ImportDocumentsResponse struct { func (x *ImportDocumentsResponse) Reset() { *x = ImportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsResponse) String() string { @@ -348,7 +340,7 @@ func (*ImportDocumentsResponse) ProtoMessage() {} func (x *ImportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +373,9 @@ type ImportDocumentsMetadata struct { func (x *ImportDocumentsMetadata) Reset() { *x = ImportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata) String() string { @@ -396,7 +386,7 @@ func (*ImportDocumentsMetadata) ProtoMessage() {} func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +450,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -475,7 +463,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +516,9 @@ type GetDocumentResponse struct { func (x *GetDocumentResponse) Reset() { *x = GetDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentResponse) String() string { @@ -543,7 +529,7 @@ func (*GetDocumentResponse) ProtoMessage() {} func (x *GetDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +611,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -640,7 +624,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +699,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -730,7 +712,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +766,9 @@ type BatchDeleteDocumentsRequest struct { func (x *BatchDeleteDocumentsRequest) Reset() { *x = BatchDeleteDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteDocumentsRequest) String() string { @@ -799,7 +779,7 @@ func (*BatchDeleteDocumentsRequest) ProtoMessage() {} func (x *BatchDeleteDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +817,9 @@ type BatchDeleteDocumentsResponse struct { func (x *BatchDeleteDocumentsResponse) Reset() { *x = BatchDeleteDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteDocumentsResponse) String() string { @@ -852,7 +830,7 @@ func (*BatchDeleteDocumentsResponse) ProtoMessage() {} func (x *BatchDeleteDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +862,9 @@ type BatchDeleteDocumentsMetadata struct { func (x *BatchDeleteDocumentsMetadata) Reset() { *x = BatchDeleteDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteDocumentsMetadata) String() string { @@ -899,7 +875,7 @@ func (*BatchDeleteDocumentsMetadata) ProtoMessage() {} func (x *BatchDeleteDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -958,11 +934,9 @@ type GetDatasetSchemaRequest struct { func (x *GetDatasetSchemaRequest) Reset() { *x = GetDatasetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetSchemaRequest) String() string { @@ -973,7 +947,7 @@ func (*GetDatasetSchemaRequest) ProtoMessage() {} func (x *GetDatasetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +991,9 @@ type UpdateDatasetSchemaRequest struct { func (x *UpdateDatasetSchemaRequest) Reset() { *x = UpdateDatasetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatasetSchemaRequest) String() string { @@ -1032,7 +1004,7 @@ func (*UpdateDatasetSchemaRequest) ProtoMessage() {} func (x *UpdateDatasetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1047,9 @@ type DocumentPageRange struct { func (x *DocumentPageRange) Reset() { *x = DocumentPageRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentPageRange) String() string { @@ -1090,7 +1060,7 @@ func (*DocumentPageRange) ProtoMessage() {} func (x *DocumentPageRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1109,9 @@ type DocumentMetadata struct { func (x *DocumentMetadata) Reset() { *x = DocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentMetadata) String() string { @@ -1154,7 +1122,7 @@ func (*DocumentMetadata) ProtoMessage() {} func (x *DocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1190,9 @@ type ImportDocumentsRequest_BatchDocumentsImportConfig struct { func (x *ImportDocumentsRequest_BatchDocumentsImportConfig) Reset() { *x = ImportDocumentsRequest_BatchDocumentsImportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest_BatchDocumentsImportConfig) String() string { @@ -1237,7 +1203,7 @@ func (*ImportDocumentsRequest_BatchDocumentsImportConfig) ProtoMessage() {} func (x *ImportDocumentsRequest_BatchDocumentsImportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1279,9 @@ type ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig struct { func (x *ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig) Reset() { *x = ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig) String() string { @@ -1328,7 +1292,7 @@ func (*ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig) ProtoM func (x *ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,11 +1331,9 @@ type ImportDocumentsMetadata_IndividualImportStatus struct { func (x *ImportDocumentsMetadata_IndividualImportStatus) Reset() { *x = ImportDocumentsMetadata_IndividualImportStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata_IndividualImportStatus) String() string { @@ -1382,7 +1344,7 @@ func (*ImportDocumentsMetadata_IndividualImportStatus) ProtoMessage() {} func (x *ImportDocumentsMetadata_IndividualImportStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1396,9 @@ type ImportDocumentsMetadata_ImportConfigValidationResult struct { func (x *ImportDocumentsMetadata_ImportConfigValidationResult) Reset() { *x = ImportDocumentsMetadata_ImportConfigValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata_ImportConfigValidationResult) String() string { @@ -1449,7 +1409,7 @@ func (*ImportDocumentsMetadata_ImportConfigValidationResult) ProtoMessage() {} func (x *ImportDocumentsMetadata_ImportConfigValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1452,9 @@ type BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus struct { func (x *BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus) Reset() { *x = BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus) String() string { @@ -1507,7 +1465,7 @@ func (*BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus) ProtoMessage() func (x *BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2091,260 +2049,6 @@ func file_google_cloud_documentai_v1beta3_document_service_proto_init() { file_google_cloud_documentai_v1beta3_document_proto_init() file_google_cloud_documentai_v1beta3_document_io_proto_init() file_google_cloud_documentai_v1beta3_operation_metadata_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatasetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DocumentPageRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest_BatchDocumentsImportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata_IndividualImportStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata_ImportConfigValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteDocumentsMetadata_IndividualBatchDeleteStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_document_service_proto_msgTypes[16].OneofWrappers = []any{ (*ImportDocumentsRequest_BatchDocumentsImportConfig_DatasetSplit)(nil), (*ImportDocumentsRequest_BatchDocumentsImportConfig_AutoSplitConfig_)(nil), diff --git a/documentai/apiv1beta3/documentaipb/evaluation.pb.go b/documentai/apiv1beta3/documentaipb/evaluation.pb.go index 8485e8053ed1..49a206773c5e 100755 --- a/documentai/apiv1beta3/documentaipb/evaluation.pb.go +++ b/documentai/apiv1beta3/documentaipb/evaluation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/evaluation.proto @@ -110,11 +110,9 @@ type EvaluationReference struct { func (x *EvaluationReference) Reset() { *x = EvaluationReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvaluationReference) String() string { @@ -125,7 +123,7 @@ func (*EvaluationReference) ProtoMessage() {} func (x *EvaluationReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type Evaluation struct { func (x *Evaluation) Reset() { *x = Evaluation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation) String() string { @@ -209,7 +205,7 @@ func (*Evaluation) ProtoMessage() {} func (x *Evaluation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +289,9 @@ type Evaluation_Counters struct { func (x *Evaluation_Counters) Reset() { *x = Evaluation_Counters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_Counters) String() string { @@ -308,7 +302,7 @@ func (*Evaluation_Counters) ProtoMessage() {} func (x *Evaluation_Counters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +377,9 @@ type Evaluation_Metrics struct { func (x *Evaluation_Metrics) Reset() { *x = Evaluation_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_Metrics) String() string { @@ -398,7 +390,7 @@ func (*Evaluation_Metrics) ProtoMessage() {} func (x *Evaluation_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +496,9 @@ type Evaluation_ConfidenceLevelMetrics struct { func (x *Evaluation_ConfidenceLevelMetrics) Reset() { *x = Evaluation_ConfidenceLevelMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_ConfidenceLevelMetrics) String() string { @@ -519,7 +509,7 @@ func (*Evaluation_ConfidenceLevelMetrics) ProtoMessage() {} func (x *Evaluation_ConfidenceLevelMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +566,9 @@ type Evaluation_MultiConfidenceMetrics struct { func (x *Evaluation_MultiConfidenceMetrics) Reset() { *x = Evaluation_MultiConfidenceMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Evaluation_MultiConfidenceMetrics) String() string { @@ -591,7 +579,7 @@ func (*Evaluation_MultiConfidenceMetrics) ProtoMessage() {} func (x *Evaluation_MultiConfidenceMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,80 +893,6 @@ func file_google_cloud_documentai_v1beta3_evaluation_proto_init() { if File_google_cloud_documentai_v1beta3_evaluation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EvaluationReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_Counters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_ConfidenceLevelMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_evaluation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Evaluation_MultiConfidenceMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1beta3/documentaipb/geometry.pb.go b/documentai/apiv1beta3/documentaipb/geometry.pb.go index 2128c0f079ef..f12e8116ebcc 100755 --- a/documentai/apiv1beta3/documentaipb/geometry.pb.go +++ b/documentai/apiv1beta3/documentaipb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/geometry.proto @@ -50,11 +50,9 @@ type Vertex struct { func (x *Vertex) Reset() { *x = Vertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vertex) String() string { @@ -65,7 +63,7 @@ func (*Vertex) ProtoMessage() {} func (x *Vertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -125,7 +121,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -183,7 +177,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,44 +281,6 @@ func file_google_cloud_documentai_v1beta3_geometry_proto_init() { if File_google_cloud_documentai_v1beta3_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1beta3/documentaipb/operation_metadata.pb.go b/documentai/apiv1beta3/documentaipb/operation_metadata.pb.go index e87089040578..2fbed3a6289d 100755 --- a/documentai/apiv1beta3/documentaipb/operation_metadata.pb.go +++ b/documentai/apiv1beta3/documentaipb/operation_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/operation_metadata.proto @@ -121,11 +121,9 @@ type CommonOperationMetadata struct { func (x *CommonOperationMetadata) Reset() { *x = CommonOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_operation_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_operation_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonOperationMetadata) String() string { @@ -136,7 +134,7 @@ func (*CommonOperationMetadata) ProtoMessage() {} func (x *CommonOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_operation_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,20 +273,6 @@ func file_google_cloud_documentai_v1beta3_operation_metadata_proto_init() { if File_google_cloud_documentai_v1beta3_operation_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_operation_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CommonOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1beta3/documentaipb/processor.pb.go b/documentai/apiv1beta3/documentaipb/processor.pb.go index f4194652578b..647ae811b7f5 100755 --- a/documentai/apiv1beta3/documentaipb/processor.pb.go +++ b/documentai/apiv1beta3/documentaipb/processor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/processor.proto @@ -345,11 +345,9 @@ type ProcessorVersion struct { func (x *ProcessorVersion) Reset() { *x = ProcessorVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion) String() string { @@ -360,7 +358,7 @@ func (*ProcessorVersion) ProtoMessage() {} func (x *ProcessorVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +485,9 @@ type ProcessorVersionAlias struct { func (x *ProcessorVersionAlias) Reset() { *x = ProcessorVersionAlias{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersionAlias) String() string { @@ -502,7 +498,7 @@ func (*ProcessorVersionAlias) ProtoMessage() {} func (x *ProcessorVersionAlias) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +565,9 @@ type Processor struct { func (x *Processor) Reset() { *x = Processor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Processor) String() string { @@ -584,7 +578,7 @@ func (*Processor) ProtoMessage() {} func (x *Processor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +684,9 @@ type ProcessorVersion_DeprecationInfo struct { func (x *ProcessorVersion_DeprecationInfo) Reset() { *x = ProcessorVersion_DeprecationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_DeprecationInfo) String() string { @@ -705,7 +697,7 @@ func (*ProcessorVersion_DeprecationInfo) ProtoMessage() {} func (x *ProcessorVersion_DeprecationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +744,9 @@ type ProcessorVersion_GenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo) String() string { @@ -767,7 +757,7 @@ func (*ProcessorVersion_GenAiModelInfo) ProtoMessage() {} func (x *ProcessorVersion_GenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +828,9 @@ type ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) String() string { @@ -853,7 +841,7 @@ func (*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) ProtoMessage() func (x *ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -898,11 +886,9 @@ type ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo struct { func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) Reset() { *x = ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) String() string { @@ -913,7 +899,7 @@ func (*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) ProtoMessage() {} func (x *ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1249,92 +1235,6 @@ func file_google_cloud_documentai_v1beta3_processor_proto_init() { } file_google_cloud_documentai_v1beta3_document_schema_proto_init() file_google_cloud_documentai_v1beta3_evaluation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersionAlias); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Processor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_DeprecationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_documentai_v1beta3_processor_proto_msgTypes[4].OneofWrappers = []any{ (*ProcessorVersion_GenAiModelInfo_FoundationGenAiModelInfo_)(nil), (*ProcessorVersion_GenAiModelInfo_CustomGenAiModelInfo_)(nil), diff --git a/documentai/apiv1beta3/documentaipb/processor_type.pb.go b/documentai/apiv1beta3/documentaipb/processor_type.pb.go index e451b6be97ef..35f9a0ebd5e8 100755 --- a/documentai/apiv1beta3/documentaipb/processor_type.pb.go +++ b/documentai/apiv1beta3/documentaipb/processor_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/documentai/v1beta3/processor_type.proto @@ -64,11 +64,9 @@ type ProcessorType struct { func (x *ProcessorType) Reset() { *x = ProcessorType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorType) String() string { @@ -79,7 +77,7 @@ func (*ProcessorType) ProtoMessage() {} func (x *ProcessorType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +154,9 @@ type ProcessorType_LocationInfo struct { func (x *ProcessorType_LocationInfo) Reset() { *x = ProcessorType_LocationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorType_LocationInfo) String() string { @@ -171,7 +167,7 @@ func (*ProcessorType_LocationInfo) ProtoMessage() {} func (x *ProcessorType_LocationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,32 +284,6 @@ func file_google_cloud_documentai_v1beta3_processor_type_proto_init() { if File_google_cloud_documentai_v1beta3_processor_type_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_documentai_v1beta3_processor_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorType_LocationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/documentai/apiv1beta3/helpers.go b/documentai/apiv1beta3/helpers.go index 5b942c370251..aaebfd257c26 100755 --- a/documentai/apiv1beta3/helpers.go +++ b/documentai/apiv1beta3/helpers.go @@ -18,10 +18,20 @@ package documentai import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "documentai.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/domains/apiv1beta1/domains_client.go b/domains/apiv1beta1/domains_client.go index d8975cfff341..0907fbab1a1c 100755 --- a/domains/apiv1beta1/domains_client.go +++ b/domains/apiv1beta1/domains_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -413,6 +412,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new domains client based on gRPC. @@ -439,6 +440,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: domainspb.NewDomainsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -501,6 +503,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new domains rest client. @@ -518,6 +522,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -580,7 +585,7 @@ func (c *gRPCClient) SearchDomains(ctx context.Context, req *domainspb.SearchDom var resp *domainspb.SearchDomainsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchDomains(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchDomains, req, settings.GRPC, c.logger, "SearchDomains") return err }, opts...) if err != nil { @@ -598,7 +603,7 @@ func (c *gRPCClient) RetrieveRegisterParameters(ctx context.Context, req *domain var resp *domainspb.RetrieveRegisterParametersResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveRegisterParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveRegisterParameters, req, settings.GRPC, c.logger, "RetrieveRegisterParameters") return err }, opts...) if err != nil { @@ -616,7 +621,7 @@ func (c *gRPCClient) RegisterDomain(ctx context.Context, req *domainspb.Register var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RegisterDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RegisterDomain, req, settings.GRPC, c.logger, "RegisterDomain") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *gRPCClient) RetrieveTransferParameters(ctx context.Context, req *domain var resp *domainspb.RetrieveTransferParametersResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveTransferParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveTransferParameters, req, settings.GRPC, c.logger, "RetrieveTransferParameters") return err }, opts...) if err != nil { @@ -654,7 +659,7 @@ func (c *gRPCClient) TransferDomain(ctx context.Context, req *domainspb.Transfer var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TransferDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TransferDomain, req, settings.GRPC, c.logger, "TransferDomain") return err }, opts...) if err != nil { @@ -685,7 +690,7 @@ func (c *gRPCClient) ListRegistrations(ctx context.Context, req *domainspb.ListR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRegistrations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRegistrations, req, settings.GRPC, c.logger, "ListRegistrations") return err }, opts...) if err != nil { @@ -720,7 +725,7 @@ func (c *gRPCClient) GetRegistration(ctx context.Context, req *domainspb.GetRegi var resp *domainspb.Registration err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRegistration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRegistration, req, settings.GRPC, c.logger, "GetRegistration") return err }, opts...) if err != nil { @@ -738,7 +743,7 @@ func (c *gRPCClient) UpdateRegistration(ctx context.Context, req *domainspb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRegistration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRegistration, req, settings.GRPC, c.logger, "UpdateRegistration") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *gRPCClient) ConfigureManagementSettings(ctx context.Context, req *domai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ConfigureManagementSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ConfigureManagementSettings, req, settings.GRPC, c.logger, "ConfigureManagementSettings") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *gRPCClient) ConfigureDnsSettings(ctx context.Context, req *domainspb.Co var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ConfigureDnsSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ConfigureDnsSettings, req, settings.GRPC, c.logger, "ConfigureDnsSettings") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *gRPCClient) ConfigureContactSettings(ctx context.Context, req *domainsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ConfigureContactSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ConfigureContactSettings, req, settings.GRPC, c.logger, "ConfigureContactSettings") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *gRPCClient) ExportRegistration(ctx context.Context, req *domainspb.Expo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportRegistration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportRegistration, req, settings.GRPC, c.logger, "ExportRegistration") return err }, opts...) if err != nil { @@ -838,7 +843,7 @@ func (c *gRPCClient) DeleteRegistration(ctx context.Context, req *domainspb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRegistration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRegistration, req, settings.GRPC, c.logger, "DeleteRegistration") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *gRPCClient) RetrieveAuthorizationCode(ctx context.Context, req *domains var resp *domainspb.AuthorizationCode err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveAuthorizationCode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveAuthorizationCode, req, settings.GRPC, c.logger, "RetrieveAuthorizationCode") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *gRPCClient) ResetAuthorizationCode(ctx context.Context, req *domainspb. var resp *domainspb.AuthorizationCode err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResetAuthorizationCode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResetAuthorizationCode, req, settings.GRPC, c.logger, "ResetAuthorizationCode") return err }, opts...) if err != nil { @@ -923,17 +928,7 @@ func (c *restClient) SearchDomains(ctx context.Context, req *domainspb.SearchDom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchDomains") if err != nil { return err } @@ -985,17 +980,7 @@ func (c *restClient) RetrieveRegisterParameters(ctx context.Context, req *domain httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveRegisterParameters") if err != nil { return err } @@ -1062,21 +1047,10 @@ func (c *restClient) RegisterDomain(ctx context.Context, req *domainspb.Register httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RegisterDomain") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1132,17 +1106,7 @@ func (c *restClient) RetrieveTransferParameters(ctx context.Context, req *domain httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveTransferParameters") if err != nil { return err } @@ -1216,21 +1180,10 @@ func (c *restClient) TransferDomain(ctx context.Context, req *domainspb.Transfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TransferDomain") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1296,21 +1249,10 @@ func (c *restClient) ListRegistrations(ctx context.Context, req *domainspb.ListR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRegistrations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1373,17 +1315,7 @@ func (c *restClient) GetRegistration(ctx context.Context, req *domainspb.GetRegi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRegistration") if err != nil { return err } @@ -1453,21 +1385,10 @@ func (c *restClient) UpdateRegistration(ctx context.Context, req *domainspb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRegistration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1523,21 +1444,10 @@ func (c *restClient) ConfigureManagementSettings(ctx context.Context, req *domai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConfigureManagementSettings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1593,21 +1503,10 @@ func (c *restClient) ConfigureDnsSettings(ctx context.Context, req *domainspb.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConfigureDnsSettings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1664,21 +1563,10 @@ func (c *restClient) ConfigureContactSettings(ctx context.Context, req *domainsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ConfigureContactSettings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1742,21 +1630,10 @@ func (c *restClient) ExportRegistration(ctx context.Context, req *domainspb.Expo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportRegistration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1826,21 +1703,10 @@ func (c *restClient) DeleteRegistration(ctx context.Context, req *domainspb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRegistration") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1895,17 +1761,7 @@ func (c *restClient) RetrieveAuthorizationCode(ctx context.Context, req *domains httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveAuthorizationCode") if err != nil { return err } @@ -1964,17 +1820,7 @@ func (c *restClient) ResetAuthorizationCode(ctx context.Context, req *domainspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetAuthorizationCode") if err != nil { return err } diff --git a/domains/apiv1beta1/domains_client_example_go123_test.go b/domains/apiv1beta1/domains_client_example_go123_test.go index 58ec581ae3a1..313adc4f5190 100644 --- a/domains/apiv1beta1/domains_client_example_go123_test.go +++ b/domains/apiv1beta1/domains_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListRegistrations_all() { } for resp, err := range c.ListRegistrations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/domains/apiv1beta1/domainspb/domains.pb.go b/domains/apiv1beta1/domainspb/domains.pb.go index ca607afc526f..6bb7112ecf51 100755 --- a/domains/apiv1beta1/domainspb/domains.pb.go +++ b/domains/apiv1beta1/domainspb/domains.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/domains/v1beta1/domains.proto @@ -836,11 +836,9 @@ type Registration struct { func (x *Registration) Reset() { *x = Registration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Registration) String() string { @@ -851,7 +849,7 @@ func (*Registration) ProtoMessage() {} func (x *Registration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +962,9 @@ type ManagementSettings struct { func (x *ManagementSettings) Reset() { *x = ManagementSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagementSettings) String() string { @@ -979,7 +975,7 @@ func (*ManagementSettings) ProtoMessage() {} func (x *ManagementSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1024,9 @@ type DnsSettings struct { func (x *DnsSettings) Reset() { *x = DnsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsSettings) String() string { @@ -1043,7 +1037,7 @@ func (*DnsSettings) ProtoMessage() {} func (x *DnsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1128,9 @@ type ContactSettings struct { func (x *ContactSettings) Reset() { *x = ContactSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactSettings) String() string { @@ -1149,7 +1141,7 @@ func (*ContactSettings) ProtoMessage() {} func (x *ContactSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1198,9 @@ type SearchDomainsRequest struct { func (x *SearchDomainsRequest) Reset() { *x = SearchDomainsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDomainsRequest) String() string { @@ -1221,7 +1211,7 @@ func (*SearchDomainsRequest) ProtoMessage() {} func (x *SearchDomainsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,11 +1252,9 @@ type SearchDomainsResponse struct { func (x *SearchDomainsResponse) Reset() { *x = SearchDomainsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDomainsResponse) String() string { @@ -1277,7 +1265,7 @@ func (*SearchDomainsResponse) ProtoMessage() {} func (x *SearchDomainsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1301,9 @@ type RetrieveRegisterParametersRequest struct { func (x *RetrieveRegisterParametersRequest) Reset() { *x = RetrieveRegisterParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveRegisterParametersRequest) String() string { @@ -1328,7 +1314,7 @@ func (*RetrieveRegisterParametersRequest) ProtoMessage() {} func (x *RetrieveRegisterParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1355,9 @@ type RetrieveRegisterParametersResponse struct { func (x *RetrieveRegisterParametersResponse) Reset() { *x = RetrieveRegisterParametersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveRegisterParametersResponse) String() string { @@ -1384,7 +1368,7 @@ func (*RetrieveRegisterParametersResponse) ProtoMessage() {} func (x *RetrieveRegisterParametersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1420,9 @@ type RegisterDomainRequest struct { func (x *RegisterDomainRequest) Reset() { *x = RegisterDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterDomainRequest) String() string { @@ -1451,7 +1433,7 @@ func (*RegisterDomainRequest) ProtoMessage() {} func (x *RegisterDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1522,11 +1504,9 @@ type RetrieveTransferParametersRequest struct { func (x *RetrieveTransferParametersRequest) Reset() { *x = RetrieveTransferParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveTransferParametersRequest) String() string { @@ -1537,7 +1517,7 @@ func (*RetrieveTransferParametersRequest) ProtoMessage() {} func (x *RetrieveTransferParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1558,9 @@ type RetrieveTransferParametersResponse struct { func (x *RetrieveTransferParametersResponse) Reset() { *x = RetrieveTransferParametersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveTransferParametersResponse) String() string { @@ -1593,7 +1571,7 @@ func (*RetrieveTransferParametersResponse) ProtoMessage() {} func (x *RetrieveTransferParametersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1649,11 +1627,9 @@ type TransferDomainRequest struct { func (x *TransferDomainRequest) Reset() { *x = TransferDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferDomainRequest) String() string { @@ -1664,7 +1640,7 @@ func (*TransferDomainRequest) ProtoMessage() {} func (x *TransferDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,11 +1732,9 @@ type ListRegistrationsRequest struct { func (x *ListRegistrationsRequest) Reset() { *x = ListRegistrationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegistrationsRequest) String() string { @@ -1771,7 +1745,7 @@ func (*ListRegistrationsRequest) ProtoMessage() {} func (x *ListRegistrationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1803,9 @@ type ListRegistrationsResponse struct { func (x *ListRegistrationsResponse) Reset() { *x = ListRegistrationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegistrationsResponse) String() string { @@ -1844,7 +1816,7 @@ func (*ListRegistrationsResponse) ProtoMessage() {} func (x *ListRegistrationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1886,11 +1858,9 @@ type GetRegistrationRequest struct { func (x *GetRegistrationRequest) Reset() { *x = GetRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegistrationRequest) String() string { @@ -1901,7 +1871,7 @@ func (*GetRegistrationRequest) ProtoMessage() {} func (x *GetRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1939,11 +1909,9 @@ type UpdateRegistrationRequest struct { func (x *UpdateRegistrationRequest) Reset() { *x = UpdateRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegistrationRequest) String() string { @@ -1954,7 +1922,7 @@ func (*UpdateRegistrationRequest) ProtoMessage() {} func (x *UpdateRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2002,11 +1970,9 @@ type ConfigureManagementSettingsRequest struct { func (x *ConfigureManagementSettingsRequest) Reset() { *x = ConfigureManagementSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigureManagementSettingsRequest) String() string { @@ -2017,7 +1983,7 @@ func (*ConfigureManagementSettingsRequest) ProtoMessage() {} func (x *ConfigureManagementSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2080,11 +2046,9 @@ type ConfigureDnsSettingsRequest struct { func (x *ConfigureDnsSettingsRequest) Reset() { *x = ConfigureDnsSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigureDnsSettingsRequest) String() string { @@ -2095,7 +2059,7 @@ func (*ConfigureDnsSettingsRequest) ProtoMessage() {} func (x *ConfigureDnsSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2162,11 +2126,9 @@ type ConfigureContactSettingsRequest struct { func (x *ConfigureContactSettingsRequest) Reset() { *x = ConfigureContactSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigureContactSettingsRequest) String() string { @@ -2177,7 +2139,7 @@ func (*ConfigureContactSettingsRequest) ProtoMessage() {} func (x *ConfigureContactSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2240,11 +2202,9 @@ type ExportRegistrationRequest struct { func (x *ExportRegistrationRequest) Reset() { *x = ExportRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportRegistrationRequest) String() string { @@ -2255,7 +2215,7 @@ func (*ExportRegistrationRequest) ProtoMessage() {} func (x *ExportRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2290,11 +2250,9 @@ type DeleteRegistrationRequest struct { func (x *DeleteRegistrationRequest) Reset() { *x = DeleteRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegistrationRequest) String() string { @@ -2305,7 +2263,7 @@ func (*DeleteRegistrationRequest) ProtoMessage() {} func (x *DeleteRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2340,11 +2298,9 @@ type RetrieveAuthorizationCodeRequest struct { func (x *RetrieveAuthorizationCodeRequest) Reset() { *x = RetrieveAuthorizationCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveAuthorizationCodeRequest) String() string { @@ -2355,7 +2311,7 @@ func (*RetrieveAuthorizationCodeRequest) ProtoMessage() {} func (x *RetrieveAuthorizationCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2390,11 +2346,9 @@ type ResetAuthorizationCodeRequest struct { func (x *ResetAuthorizationCodeRequest) Reset() { *x = ResetAuthorizationCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetAuthorizationCodeRequest) String() string { @@ -2405,7 +2359,7 @@ func (*ResetAuthorizationCodeRequest) ProtoMessage() {} func (x *ResetAuthorizationCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2449,11 +2403,9 @@ type RegisterParameters struct { func (x *RegisterParameters) Reset() { *x = RegisterParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterParameters) String() string { @@ -2464,7 +2416,7 @@ func (*RegisterParameters) ProtoMessage() {} func (x *RegisterParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2538,11 +2490,9 @@ type TransferParameters struct { func (x *TransferParameters) Reset() { *x = TransferParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferParameters) String() string { @@ -2553,7 +2503,7 @@ func (*TransferParameters) ProtoMessage() {} func (x *TransferParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2623,11 +2573,9 @@ type AuthorizationCode struct { func (x *AuthorizationCode) Reset() { *x = AuthorizationCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationCode) String() string { @@ -2638,7 +2586,7 @@ func (*AuthorizationCode) ProtoMessage() {} func (x *AuthorizationCode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,11 +2630,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2697,7 +2643,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2772,11 +2718,9 @@ type DnsSettings_CustomDns struct { func (x *DnsSettings_CustomDns) Reset() { *x = DnsSettings_CustomDns{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsSettings_CustomDns) String() string { @@ -2787,7 +2731,7 @@ func (*DnsSettings_CustomDns) ProtoMessage() {} func (x *DnsSettings_CustomDns) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2841,11 +2785,9 @@ type DnsSettings_GoogleDomainsDns struct { func (x *DnsSettings_GoogleDomainsDns) Reset() { *x = DnsSettings_GoogleDomainsDns{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsSettings_GoogleDomainsDns) String() string { @@ -2856,7 +2798,7 @@ func (*DnsSettings_GoogleDomainsDns) ProtoMessage() {} func (x *DnsSettings_GoogleDomainsDns) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2912,11 +2854,9 @@ type DnsSettings_DsRecord struct { func (x *DnsSettings_DsRecord) Reset() { *x = DnsSettings_DsRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsSettings_DsRecord) String() string { @@ -2927,7 +2867,7 @@ func (*DnsSettings_DsRecord) ProtoMessage() {} func (x *DnsSettings_DsRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2995,11 +2935,9 @@ type DnsSettings_GlueRecord struct { func (x *DnsSettings_GlueRecord) Reset() { *x = DnsSettings_GlueRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsSettings_GlueRecord) String() string { @@ -3010,7 +2948,7 @@ func (*DnsSettings_GlueRecord) ProtoMessage() {} func (x *DnsSettings_GlueRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3066,11 +3004,9 @@ type ContactSettings_Contact struct { func (x *ContactSettings_Contact) Reset() { *x = ContactSettings_Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactSettings_Contact) String() string { @@ -3081,7 +3017,7 @@ func (*ContactSettings_Contact) ProtoMessage() {} func (x *ContactSettings_Contact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_domains_v1beta1_domains_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4131,392 +4067,6 @@ func file_google_cloud_domains_v1beta1_domains_proto_init() { if File_google_cloud_domains_v1beta1_domains_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Registration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ManagementSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DnsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContactSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchDomainsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchDomainsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveRegisterParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveRegisterParametersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RegisterDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveTransferParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveTransferParametersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TransferDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListRegistrationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListRegistrationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ConfigureManagementSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ConfigureDnsSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ConfigureContactSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ExportRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveAuthorizationCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ResetAuthorizationCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RegisterParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*TransferParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DnsSettings_CustomDns); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DnsSettings_GoogleDomainsDns); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DnsSettings_DsRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DnsSettings_GlueRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_domains_v1beta1_domains_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ContactSettings_Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_domains_v1beta1_domains_proto_msgTypes[2].OneofWrappers = []any{ (*DnsSettings_CustomDns_)(nil), (*DnsSettings_GoogleDomainsDns_)(nil), diff --git a/domains/apiv1beta1/helpers.go b/domains/apiv1beta1/helpers.go index c37097323d7b..c09e72e04d1b 100755 --- a/domains/apiv1beta1/helpers.go +++ b/domains/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package domains import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "domains.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/edgecontainer/apiv1/edge_container_client.go b/edgecontainer/apiv1/edge_container_client.go index 4f9bbdbd328e..23549f72a2bb 100755 --- a/edgecontainer/apiv1/edge_container_client.go +++ b/edgecontainer/apiv1/edge_container_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -711,6 +710,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new edge container client based on gRPC. @@ -738,6 +739,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: edgecontainerpb.NewEdgeContainerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -802,6 +804,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new edge container rest client. @@ -820,6 +824,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -893,7 +898,7 @@ func (c *gRPCClient) ListClusters(ctx context.Context, req *edgecontainerpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -928,7 +933,7 @@ func (c *gRPCClient) GetCluster(ctx context.Context, req *edgecontainerpb.GetClu var resp *edgecontainerpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) CreateCluster(ctx context.Context, req *edgecontainerpb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -966,7 +971,7 @@ func (c *gRPCClient) UpdateCluster(ctx context.Context, req *edgecontainerpb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *gRPCClient) UpgradeCluster(ctx context.Context, req *edgecontainerpb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpgradeCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpgradeCluster, req, settings.GRPC, c.logger, "UpgradeCluster") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *gRPCClient) DeleteCluster(ctx context.Context, req *edgecontainerpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -1026,7 +1031,7 @@ func (c *gRPCClient) GenerateAccessToken(ctx context.Context, req *edgecontainer var resp *edgecontainerpb.GenerateAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GenerateAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GenerateAccessToken, req, settings.GRPC, c.logger, "GenerateAccessToken") return err }, opts...) if err != nil { @@ -1044,7 +1049,7 @@ func (c *gRPCClient) GenerateOfflineCredential(ctx context.Context, req *edgecon var resp *edgecontainerpb.GenerateOfflineCredentialResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GenerateOfflineCredential(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GenerateOfflineCredential, req, settings.GRPC, c.logger, "GenerateOfflineCredential") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *gRPCClient) ListNodePools(ctx context.Context, req *edgecontainerpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNodePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNodePools, req, settings.GRPC, c.logger, "ListNodePools") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *gRPCClient) GetNodePool(ctx context.Context, req *edgecontainerpb.GetNo var resp *edgecontainerpb.NodePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNodePool, req, settings.GRPC, c.logger, "GetNodePool") return err }, opts...) if err != nil { @@ -1126,7 +1131,7 @@ func (c *gRPCClient) CreateNodePool(ctx context.Context, req *edgecontainerpb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNodePool, req, settings.GRPC, c.logger, "CreateNodePool") return err }, opts...) if err != nil { @@ -1146,7 +1151,7 @@ func (c *gRPCClient) UpdateNodePool(ctx context.Context, req *edgecontainerpb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNodePool, req, settings.GRPC, c.logger, "UpdateNodePool") return err }, opts...) if err != nil { @@ -1166,7 +1171,7 @@ func (c *gRPCClient) DeleteNodePool(ctx context.Context, req *edgecontainerpb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNodePool, req, settings.GRPC, c.logger, "DeleteNodePool") return err }, opts...) if err != nil { @@ -1197,7 +1202,7 @@ func (c *gRPCClient) ListMachines(ctx context.Context, req *edgecontainerpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMachines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMachines, req, settings.GRPC, c.logger, "ListMachines") return err }, opts...) if err != nil { @@ -1232,7 +1237,7 @@ func (c *gRPCClient) GetMachine(ctx context.Context, req *edgecontainerpb.GetMac var resp *edgecontainerpb.Machine err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMachine(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMachine, req, settings.GRPC, c.logger, "GetMachine") return err }, opts...) if err != nil { @@ -1261,7 +1266,7 @@ func (c *gRPCClient) ListVpnConnections(ctx context.Context, req *edgecontainerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVpnConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVpnConnections, req, settings.GRPC, c.logger, "ListVpnConnections") return err }, opts...) if err != nil { @@ -1296,7 +1301,7 @@ func (c *gRPCClient) GetVpnConnection(ctx context.Context, req *edgecontainerpb. var resp *edgecontainerpb.VpnConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVpnConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVpnConnection, req, settings.GRPC, c.logger, "GetVpnConnection") return err }, opts...) if err != nil { @@ -1314,7 +1319,7 @@ func (c *gRPCClient) CreateVpnConnection(ctx context.Context, req *edgecontainer var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateVpnConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateVpnConnection, req, settings.GRPC, c.logger, "CreateVpnConnection") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *gRPCClient) DeleteVpnConnection(ctx context.Context, req *edgecontainer var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteVpnConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteVpnConnection, req, settings.GRPC, c.logger, "DeleteVpnConnection") return err }, opts...) if err != nil { @@ -1354,7 +1359,7 @@ func (c *gRPCClient) GetServerConfig(ctx context.Context, req *edgecontainerpb.G var resp *edgecontainerpb.ServerConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetServerConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetServerConfig, req, settings.GRPC, c.logger, "GetServerConfig") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1401,7 +1406,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1435,7 +1440,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1449,7 +1454,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1464,7 +1469,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1493,7 +1498,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1570,21 +1575,10 @@ func (c *restClient) ListClusters(ctx context.Context, req *edgecontainerpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1647,17 +1641,7 @@ func (c *restClient) GetCluster(ctx context.Context, req *edgecontainerpb.GetClu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1717,21 +1701,10 @@ func (c *restClient) CreateCluster(ctx context.Context, req *edgecontainerpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1798,21 +1771,10 @@ func (c *restClient) UpdateCluster(ctx context.Context, req *edgecontainerpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1868,21 +1830,10 @@ func (c *restClient) UpgradeCluster(ctx context.Context, req *edgecontainerpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1935,21 +1886,10 @@ func (c *restClient) DeleteCluster(ctx context.Context, req *edgecontainerpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2000,17 +1940,7 @@ func (c *restClient) GenerateAccessToken(ctx context.Context, req *edgecontainer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateAccessToken") if err != nil { return err } @@ -2060,17 +1990,7 @@ func (c *restClient) GenerateOfflineCredential(ctx context.Context, req *edgecon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateOfflineCredential") if err != nil { return err } @@ -2138,21 +2058,10 @@ func (c *restClient) ListNodePools(ctx context.Context, req *edgecontainerpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodePools") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2215,17 +2124,7 @@ func (c *restClient) GetNodePool(ctx context.Context, req *edgecontainerpb.GetNo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNodePool") if err != nil { return err } @@ -2285,21 +2184,10 @@ func (c *restClient) CreateNodePool(ctx context.Context, req *edgecontainerpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNodePool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2366,21 +2254,10 @@ func (c *restClient) UpdateNodePool(ctx context.Context, req *edgecontainerpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNodePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2433,21 +2310,10 @@ func (c *restClient) DeleteNodePool(ctx context.Context, req *edgecontainerpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNodePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2516,21 +2382,10 @@ func (c *restClient) ListMachines(ctx context.Context, req *edgecontainerpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMachines") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2593,17 +2448,7 @@ func (c *restClient) GetMachine(ctx context.Context, req *edgecontainerpb.GetMac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMachine") if err != nil { return err } @@ -2671,21 +2516,10 @@ func (c *restClient) ListVpnConnections(ctx context.Context, req *edgecontainerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVpnConnections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2748,17 +2582,7 @@ func (c *restClient) GetVpnConnection(ctx context.Context, req *edgecontainerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVpnConnection") if err != nil { return err } @@ -2818,21 +2642,10 @@ func (c *restClient) CreateVpnConnection(ctx context.Context, req *edgecontainer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVpnConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2885,21 +2698,10 @@ func (c *restClient) DeleteVpnConnection(ctx context.Context, req *edgecontainer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVpnConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2950,17 +2752,7 @@ func (c *restClient) GetServerConfig(ctx context.Context, req *edgecontainerpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServerConfig") if err != nil { return err } @@ -3010,17 +2802,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3085,21 +2867,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3165,15 +2936,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3207,15 +2971,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3252,17 +3009,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3327,21 +3074,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/edgecontainer/apiv1/edge_container_client_example_go123_test.go b/edgecontainer/apiv1/edge_container_client_example_go123_test.go index 620a19465db5..6cadf85dea22 100644 --- a/edgecontainer/apiv1/edge_container_client_example_go123_test.go +++ b/edgecontainer/apiv1/edge_container_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListMachines_all() { } for resp, err := range c.ListMachines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListNodePools_all() { } for resp, err := range c.ListNodePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListVpnConnections_all() { } for resp, err := range c.ListVpnConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/edgecontainer/apiv1/edgecontainerpb/resources.pb.go b/edgecontainer/apiv1/edgecontainerpb/resources.pb.go index 95ca23b6aace..fa7b2081ac22 100755 --- a/edgecontainer/apiv1/edgecontainerpb/resources.pb.go +++ b/edgecontainer/apiv1/edgecontainerpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/edgecontainer/v1/resources.proto @@ -774,11 +774,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -789,7 +787,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -997,11 +995,9 @@ type ClusterNetworking struct { func (x *ClusterNetworking) Reset() { *x = ClusterNetworking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterNetworking) String() string { @@ -1012,7 +1008,7 @@ func (*ClusterNetworking) ProtoMessage() {} func (x *ClusterNetworking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1063,9 @@ type Fleet struct { func (x *Fleet) Reset() { *x = Fleet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fleet) String() string { @@ -1082,7 +1076,7 @@ func (*Fleet) ProtoMessage() {} func (x *Fleet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1117,9 @@ type ClusterUser struct { func (x *ClusterUser) Reset() { *x = ClusterUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterUser) String() string { @@ -1138,7 +1130,7 @@ func (*ClusterUser) ProtoMessage() {} func (x *ClusterUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1166,9 @@ type Authorization struct { func (x *Authorization) Reset() { *x = Authorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Authorization) String() string { @@ -1189,7 +1179,7 @@ func (*Authorization) ProtoMessage() {} func (x *Authorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1246,11 +1236,9 @@ type NodePool struct { func (x *NodePool) Reset() { *x = NodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool) String() string { @@ -1261,7 +1249,7 @@ func (*NodePool) ProtoMessage() {} func (x *NodePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1370,9 @@ type Machine struct { func (x *Machine) Reset() { *x = Machine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Machine) String() string { @@ -1397,7 +1383,7 @@ func (*Machine) ProtoMessage() {} func (x *Machine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1509,11 +1495,9 @@ type VpnConnection struct { func (x *VpnConnection) Reset() { *x = VpnConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnConnection) String() string { @@ -1524,7 +1508,7 @@ func (*VpnConnection) ProtoMessage() {} func (x *VpnConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1638,11 +1622,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -1653,7 +1635,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1691,11 +1673,9 @@ type ZoneMetadata struct { func (x *ZoneMetadata) Reset() { *x = ZoneMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneMetadata) String() string { @@ -1706,7 +1686,7 @@ func (*ZoneMetadata) ProtoMessage() {} func (x *ZoneMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,11 +1736,9 @@ type ConfigData struct { func (x *ConfigData) Reset() { *x = ConfigData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigData) String() string { @@ -1771,7 +1749,7 @@ func (*ConfigData) ProtoMessage() {} func (x *ConfigData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1794,9 @@ type Quota struct { func (x *Quota) Reset() { *x = Quota{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Quota) String() string { @@ -1831,7 +1807,7 @@ func (*Quota) ProtoMessage() {} func (x *Quota) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,11 +1860,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -1899,7 +1873,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,11 +1914,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -1955,7 +1927,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1993,11 +1965,9 @@ type RecurringTimeWindow struct { func (x *RecurringTimeWindow) Reset() { *x = RecurringTimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecurringTimeWindow) String() string { @@ -2008,7 +1978,7 @@ func (*RecurringTimeWindow) ProtoMessage() {} func (x *RecurringTimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2051,11 +2021,9 @@ type MaintenanceExclusionWindow struct { func (x *MaintenanceExclusionWindow) Reset() { *x = MaintenanceExclusionWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceExclusionWindow) String() string { @@ -2066,7 +2034,7 @@ func (*MaintenanceExclusionWindow) ProtoMessage() {} func (x *MaintenanceExclusionWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2110,11 +2078,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -2125,7 +2091,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2170,11 +2136,9 @@ type ServerConfig struct { func (x *ServerConfig) Reset() { *x = ServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerConfig) String() string { @@ -2185,7 +2149,7 @@ func (*ServerConfig) ProtoMessage() {} func (x *ServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,11 +2197,9 @@ type ChannelConfig struct { func (x *ChannelConfig) Reset() { *x = ChannelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelConfig) String() string { @@ -2248,7 +2210,7 @@ func (*ChannelConfig) ProtoMessage() {} func (x *ChannelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2282,11 +2244,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -2297,7 +2257,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2334,11 +2294,9 @@ type Cluster_ControlPlane struct { func (x *Cluster_ControlPlane) Reset() { *x = Cluster_ControlPlane{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ControlPlane) String() string { @@ -2349,7 +2307,7 @@ func (*Cluster_ControlPlane) ProtoMessage() {} func (x *Cluster_ControlPlane) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2423,11 +2381,9 @@ type Cluster_SystemAddonsConfig struct { func (x *Cluster_SystemAddonsConfig) Reset() { *x = Cluster_SystemAddonsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SystemAddonsConfig) String() string { @@ -2438,7 +2394,7 @@ func (*Cluster_SystemAddonsConfig) ProtoMessage() {} func (x *Cluster_SystemAddonsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2497,11 +2453,9 @@ type Cluster_ControlPlaneEncryption struct { func (x *Cluster_ControlPlaneEncryption) Reset() { *x = Cluster_ControlPlaneEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ControlPlaneEncryption) String() string { @@ -2512,7 +2466,7 @@ func (*Cluster_ControlPlaneEncryption) ProtoMessage() {} func (x *Cluster_ControlPlaneEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2600,11 +2554,9 @@ type Cluster_MaintenanceEvent struct { func (x *Cluster_MaintenanceEvent) Reset() { *x = Cluster_MaintenanceEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_MaintenanceEvent) String() string { @@ -2615,7 +2567,7 @@ func (*Cluster_MaintenanceEvent) ProtoMessage() {} func (x *Cluster_MaintenanceEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2715,11 +2667,9 @@ type Cluster_SurvivabilityConfig struct { func (x *Cluster_SurvivabilityConfig) Reset() { *x = Cluster_SurvivabilityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SurvivabilityConfig) String() string { @@ -2730,7 +2680,7 @@ func (*Cluster_SurvivabilityConfig) ProtoMessage() {} func (x *Cluster_SurvivabilityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2767,11 +2717,9 @@ type Cluster_ConnectionState struct { func (x *Cluster_ConnectionState) Reset() { *x = Cluster_ConnectionState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ConnectionState) String() string { @@ -2782,7 +2730,7 @@ func (*Cluster_ConnectionState) ProtoMessage() {} func (x *Cluster_ConnectionState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2820,11 +2768,9 @@ type Cluster_ControlPlane_Remote struct { func (x *Cluster_ControlPlane_Remote) Reset() { *x = Cluster_ControlPlane_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ControlPlane_Remote) String() string { @@ -2835,7 +2781,7 @@ func (*Cluster_ControlPlane_Remote) ProtoMessage() {} func (x *Cluster_ControlPlane_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2883,11 +2829,9 @@ type Cluster_ControlPlane_Local struct { func (x *Cluster_ControlPlane_Local) Reset() { *x = Cluster_ControlPlane_Local{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_ControlPlane_Local) String() string { @@ -2898,7 +2842,7 @@ func (*Cluster_ControlPlane_Local) ProtoMessage() {} func (x *Cluster_ControlPlane_Local) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2964,11 +2908,9 @@ type Cluster_SystemAddonsConfig_Ingress struct { func (x *Cluster_SystemAddonsConfig_Ingress) Reset() { *x = Cluster_SystemAddonsConfig_Ingress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SystemAddonsConfig_Ingress) String() string { @@ -2979,7 +2921,7 @@ func (*Cluster_SystemAddonsConfig_Ingress) ProtoMessage() {} func (x *Cluster_SystemAddonsConfig_Ingress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3020,11 +2962,9 @@ type Cluster_SystemAddonsConfig_VMServiceConfig struct { func (x *Cluster_SystemAddonsConfig_VMServiceConfig) Reset() { *x = Cluster_SystemAddonsConfig_VMServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_SystemAddonsConfig_VMServiceConfig) String() string { @@ -3035,7 +2975,7 @@ func (*Cluster_SystemAddonsConfig_VMServiceConfig) ProtoMessage() {} func (x *Cluster_SystemAddonsConfig_VMServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3087,11 +3027,9 @@ type NodePool_LocalDiskEncryption struct { func (x *NodePool_LocalDiskEncryption) Reset() { *x = NodePool_LocalDiskEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_LocalDiskEncryption) String() string { @@ -3102,7 +3040,7 @@ func (*NodePool_LocalDiskEncryption) ProtoMessage() {} func (x *NodePool_LocalDiskEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3170,11 +3108,9 @@ type NodePool_NodeConfig struct { func (x *NodePool_NodeConfig) Reset() { *x = NodePool_NodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodePool_NodeConfig) String() string { @@ -3185,7 +3121,7 @@ func (*NodePool_NodeConfig) ProtoMessage() {} func (x *NodePool_NodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3231,11 +3167,9 @@ type VpnConnection_VpcProject struct { func (x *VpnConnection_VpcProject) Reset() { *x = VpnConnection_VpcProject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnConnection_VpcProject) String() string { @@ -3246,7 +3180,7 @@ func (*VpnConnection_VpcProject) ProtoMessage() {} func (x *VpnConnection_VpcProject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3294,11 +3228,9 @@ type VpnConnection_Details struct { func (x *VpnConnection_Details) Reset() { *x = VpnConnection_Details{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnConnection_Details) String() string { @@ -3309,7 +3241,7 @@ func (*VpnConnection_Details) ProtoMessage() {} func (x *VpnConnection_Details) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3364,11 +3296,9 @@ type VpnConnection_Details_CloudRouter struct { func (x *VpnConnection_Details_CloudRouter) Reset() { *x = VpnConnection_Details_CloudRouter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnConnection_Details_CloudRouter) String() string { @@ -3379,7 +3309,7 @@ func (*VpnConnection_Details_CloudRouter) ProtoMessage() {} func (x *VpnConnection_Details_CloudRouter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3413,11 +3343,9 @@ type VpnConnection_Details_CloudVpn struct { func (x *VpnConnection_Details_CloudVpn) Reset() { *x = VpnConnection_Details_CloudVpn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnConnection_Details_CloudVpn) String() string { @@ -3428,7 +3356,7 @@ func (*VpnConnection_Details_CloudVpn) ProtoMessage() {} func (x *VpnConnection_Details_CloudVpn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4370,440 +4298,6 @@ func file_google_cloud_edgecontainer_v1_resources_proto_init() { if File_google_cloud_edgecontainer_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ClusterNetworking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Fleet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClusterUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Authorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Machine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VpnConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ZoneMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ConfigData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Quota); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RecurringTimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceExclusionWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ChannelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ControlPlane); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SystemAddonsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ControlPlaneEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_MaintenanceEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SurvivabilityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ConnectionState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ControlPlane_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_ControlPlane_Local); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SystemAddonsConfig_Ingress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_SystemAddonsConfig_VMServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_LocalDiskEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*NodePool_NodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*VpnConnection_VpcProject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*VpnConnection_Details); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*VpnConnection_Details_CloudRouter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*VpnConnection_Details_CloudVpn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_edgecontainer_v1_resources_proto_msgTypes[20].OneofWrappers = []any{ (*Cluster_ControlPlane_Remote_)(nil), (*Cluster_ControlPlane_Local_)(nil), diff --git a/edgecontainer/apiv1/edgecontainerpb/service.pb.go b/edgecontainer/apiv1/edgecontainerpb/service.pb.go index 49869fe836d1..697300d96c90 100755 --- a/edgecontainer/apiv1/edgecontainerpb/service.pb.go +++ b/edgecontainer/apiv1/edgecontainerpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/edgecontainer/v1/service.proto @@ -176,11 +176,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -191,7 +189,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +288,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -305,7 +301,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +367,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -386,7 +380,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +428,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -449,7 +441,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +483,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -506,7 +496,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +561,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -586,7 +574,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +630,9 @@ type UpgradeClusterRequest struct { func (x *UpgradeClusterRequest) Reset() { *x = UpgradeClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeClusterRequest) String() string { @@ -657,7 +643,7 @@ func (*UpgradeClusterRequest) ProtoMessage() {} func (x *UpgradeClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +702,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -731,7 +715,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +756,9 @@ type GenerateAccessTokenRequest struct { func (x *GenerateAccessTokenRequest) Reset() { *x = GenerateAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenRequest) String() string { @@ -787,7 +769,7 @@ func (*GenerateAccessTokenRequest) ProtoMessage() {} func (x *GenerateAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +805,9 @@ type GenerateAccessTokenResponse struct { func (x *GenerateAccessTokenResponse) Reset() { *x = GenerateAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenResponse) String() string { @@ -838,7 +818,7 @@ func (*GenerateAccessTokenResponse) ProtoMessage() {} func (x *GenerateAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -879,11 +859,9 @@ type GenerateOfflineCredentialRequest struct { func (x *GenerateOfflineCredentialRequest) Reset() { *x = GenerateOfflineCredentialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateOfflineCredentialRequest) String() string { @@ -894,7 +872,7 @@ func (*GenerateOfflineCredentialRequest) ProtoMessage() {} func (x *GenerateOfflineCredentialRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -934,11 +912,9 @@ type GenerateOfflineCredentialResponse struct { func (x *GenerateOfflineCredentialResponse) Reset() { *x = GenerateOfflineCredentialResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateOfflineCredentialResponse) String() string { @@ -949,7 +925,7 @@ func (*GenerateOfflineCredentialResponse) ProtoMessage() {} func (x *GenerateOfflineCredentialResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1012,11 +988,9 @@ type ListNodePoolsRequest struct { func (x *ListNodePoolsRequest) Reset() { *x = ListNodePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodePoolsRequest) String() string { @@ -1027,7 +1001,7 @@ func (*ListNodePoolsRequest) ProtoMessage() {} func (x *ListNodePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1093,11 +1067,9 @@ type ListNodePoolsResponse struct { func (x *ListNodePoolsResponse) Reset() { *x = ListNodePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodePoolsResponse) String() string { @@ -1108,7 +1080,7 @@ func (*ListNodePoolsResponse) ProtoMessage() {} func (x *ListNodePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1128,9 @@ type GetNodePoolRequest struct { func (x *GetNodePoolRequest) Reset() { *x = GetNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodePoolRequest) String() string { @@ -1171,7 +1141,7 @@ func (*GetNodePoolRequest) ProtoMessage() {} func (x *GetNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1183,9 @@ type CreateNodePoolRequest struct { func (x *CreateNodePoolRequest) Reset() { *x = CreateNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNodePoolRequest) String() string { @@ -1228,7 +1196,7 @@ func (*CreateNodePoolRequest) ProtoMessage() {} func (x *CreateNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1293,11 +1261,9 @@ type UpdateNodePoolRequest struct { func (x *UpdateNodePoolRequest) Reset() { *x = UpdateNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNodePoolRequest) String() string { @@ -1308,7 +1274,7 @@ func (*UpdateNodePoolRequest) ProtoMessage() {} func (x *UpdateNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1360,11 +1326,9 @@ type DeleteNodePoolRequest struct { func (x *DeleteNodePoolRequest) Reset() { *x = DeleteNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodePoolRequest) String() string { @@ -1375,7 +1339,7 @@ func (*DeleteNodePoolRequest) ProtoMessage() {} func (x *DeleteNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1388,9 @@ type ListMachinesRequest struct { func (x *ListMachinesRequest) Reset() { *x = ListMachinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMachinesRequest) String() string { @@ -1439,7 +1401,7 @@ func (*ListMachinesRequest) ProtoMessage() {} func (x *ListMachinesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1467,9 @@ type ListMachinesResponse struct { func (x *ListMachinesResponse) Reset() { *x = ListMachinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMachinesResponse) String() string { @@ -1520,7 +1480,7 @@ func (*ListMachinesResponse) ProtoMessage() {} func (x *ListMachinesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1528,9 @@ type GetMachineRequest struct { func (x *GetMachineRequest) Reset() { *x = GetMachineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMachineRequest) String() string { @@ -1583,7 +1541,7 @@ func (*GetMachineRequest) ProtoMessage() {} func (x *GetMachineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1584,9 @@ type ListVpnConnectionsRequest struct { func (x *ListVpnConnectionsRequest) Reset() { *x = ListVpnConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVpnConnectionsRequest) String() string { @@ -1641,7 +1597,7 @@ func (*ListVpnConnectionsRequest) ProtoMessage() {} func (x *ListVpnConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1663,9 @@ type ListVpnConnectionsResponse struct { func (x *ListVpnConnectionsResponse) Reset() { *x = ListVpnConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVpnConnectionsResponse) String() string { @@ -1722,7 +1676,7 @@ func (*ListVpnConnectionsResponse) ProtoMessage() {} func (x *ListVpnConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,11 +1724,9 @@ type GetVpnConnectionRequest struct { func (x *GetVpnConnectionRequest) Reset() { *x = GetVpnConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVpnConnectionRequest) String() string { @@ -1785,7 +1737,7 @@ func (*GetVpnConnectionRequest) ProtoMessage() {} func (x *GetVpnConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1827,11 +1779,9 @@ type CreateVpnConnectionRequest struct { func (x *CreateVpnConnectionRequest) Reset() { *x = CreateVpnConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVpnConnectionRequest) String() string { @@ -1842,7 +1792,7 @@ func (*CreateVpnConnectionRequest) ProtoMessage() {} func (x *CreateVpnConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,11 +1851,9 @@ type DeleteVpnConnectionRequest struct { func (x *DeleteVpnConnectionRequest) Reset() { *x = DeleteVpnConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVpnConnectionRequest) String() string { @@ -1916,7 +1864,7 @@ func (*DeleteVpnConnectionRequest) ProtoMessage() {} func (x *DeleteVpnConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1958,11 +1906,9 @@ type GetServerConfigRequest struct { func (x *GetServerConfigRequest) Reset() { *x = GetServerConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServerConfigRequest) String() string { @@ -1973,7 +1919,7 @@ func (*GetServerConfigRequest) ProtoMessage() {} func (x *GetServerConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgecontainer_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2739,332 +2685,6 @@ func file_google_cloud_edgecontainer_v1_service_proto_init() { return } file_google_cloud_edgecontainer_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateOfflineCredentialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GenerateOfflineCredentialResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListNodePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListNodePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListMachinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListMachinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetMachineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListVpnConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListVpnConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetVpnConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateVpnConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVpnConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgecontainer_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetServerConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/edgecontainer/apiv1/helpers.go b/edgecontainer/apiv1/helpers.go index b869e5ae652b..c6612613947b 100755 --- a/edgecontainer/apiv1/helpers.go +++ b/edgecontainer/apiv1/helpers.go @@ -18,10 +18,20 @@ package edgecontainer import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "edgecontainer.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/edgenetwork/apiv1/edge_network_client.go b/edgenetwork/apiv1/edge_network_client.go index ecff11bad169..d4f4c1d47bbb 100755 --- a/edgenetwork/apiv1/edge_network_client.go +++ b/edgenetwork/apiv1/edge_network_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -826,6 +825,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new edge network client based on gRPC. @@ -855,6 +856,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: edgenetworkpb.NewEdgeNetworkClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -919,6 +921,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new edge network rest client. @@ -939,6 +943,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1001,7 +1006,7 @@ func (c *gRPCClient) InitializeZone(ctx context.Context, req *edgenetworkpb.Init var resp *edgenetworkpb.InitializeZoneResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InitializeZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InitializeZone, req, settings.GRPC, c.logger, "InitializeZone") return err }, opts...) if err != nil { @@ -1030,7 +1035,7 @@ func (c *gRPCClient) ListZones(ctx context.Context, req *edgenetworkpb.ListZones } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListZones(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListZones, req, settings.GRPC, c.logger, "ListZones") return err }, opts...) if err != nil { @@ -1065,7 +1070,7 @@ func (c *gRPCClient) GetZone(ctx context.Context, req *edgenetworkpb.GetZoneRequ var resp *edgenetworkpb.Zone err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetZone, req, settings.GRPC, c.logger, "GetZone") return err }, opts...) if err != nil { @@ -1094,7 +1099,7 @@ func (c *gRPCClient) ListNetworks(ctx context.Context, req *edgenetworkpb.ListNe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNetworks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNetworks, req, settings.GRPC, c.logger, "ListNetworks") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *gRPCClient) GetNetwork(ctx context.Context, req *edgenetworkpb.GetNetwo var resp *edgenetworkpb.Network err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNetwork, req, settings.GRPC, c.logger, "GetNetwork") return err }, opts...) if err != nil { @@ -1147,7 +1152,7 @@ func (c *gRPCClient) DiagnoseNetwork(ctx context.Context, req *edgenetworkpb.Dia var resp *edgenetworkpb.DiagnoseNetworkResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiagnoseNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiagnoseNetwork, req, settings.GRPC, c.logger, "DiagnoseNetwork") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *gRPCClient) CreateNetwork(ctx context.Context, req *edgenetworkpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNetwork, req, settings.GRPC, c.logger, "CreateNetwork") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *gRPCClient) DeleteNetwork(ctx context.Context, req *edgenetworkpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNetwork, req, settings.GRPC, c.logger, "DeleteNetwork") return err }, opts...) if err != nil { @@ -1216,7 +1221,7 @@ func (c *gRPCClient) ListSubnets(ctx context.Context, req *edgenetworkpb.ListSub } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSubnets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSubnets, req, settings.GRPC, c.logger, "ListSubnets") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *gRPCClient) GetSubnet(ctx context.Context, req *edgenetworkpb.GetSubnet var resp *edgenetworkpb.Subnet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSubnet, req, settings.GRPC, c.logger, "GetSubnet") return err }, opts...) if err != nil { @@ -1269,7 +1274,7 @@ func (c *gRPCClient) CreateSubnet(ctx context.Context, req *edgenetworkpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSubnet, req, settings.GRPC, c.logger, "CreateSubnet") return err }, opts...) if err != nil { @@ -1289,7 +1294,7 @@ func (c *gRPCClient) UpdateSubnet(ctx context.Context, req *edgenetworkpb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSubnet, req, settings.GRPC, c.logger, "UpdateSubnet") return err }, opts...) if err != nil { @@ -1309,7 +1314,7 @@ func (c *gRPCClient) DeleteSubnet(ctx context.Context, req *edgenetworkpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSubnet, req, settings.GRPC, c.logger, "DeleteSubnet") return err }, opts...) if err != nil { @@ -1340,7 +1345,7 @@ func (c *gRPCClient) ListInterconnects(ctx context.Context, req *edgenetworkpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInterconnects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInterconnects, req, settings.GRPC, c.logger, "ListInterconnects") return err }, opts...) if err != nil { @@ -1375,7 +1380,7 @@ func (c *gRPCClient) GetInterconnect(ctx context.Context, req *edgenetworkpb.Get var resp *edgenetworkpb.Interconnect err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInterconnect(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInterconnect, req, settings.GRPC, c.logger, "GetInterconnect") return err }, opts...) if err != nil { @@ -1393,7 +1398,7 @@ func (c *gRPCClient) DiagnoseInterconnect(ctx context.Context, req *edgenetworkp var resp *edgenetworkpb.DiagnoseInterconnectResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiagnoseInterconnect(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiagnoseInterconnect, req, settings.GRPC, c.logger, "DiagnoseInterconnect") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *gRPCClient) ListInterconnectAttachments(ctx context.Context, req *edgen } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInterconnectAttachments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInterconnectAttachments, req, settings.GRPC, c.logger, "ListInterconnectAttachments") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *gRPCClient) GetInterconnectAttachment(ctx context.Context, req *edgenet var resp *edgenetworkpb.InterconnectAttachment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInterconnectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInterconnectAttachment, req, settings.GRPC, c.logger, "GetInterconnectAttachment") return err }, opts...) if err != nil { @@ -1475,7 +1480,7 @@ func (c *gRPCClient) CreateInterconnectAttachment(ctx context.Context, req *edge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInterconnectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInterconnectAttachment, req, settings.GRPC, c.logger, "CreateInterconnectAttachment") return err }, opts...) if err != nil { @@ -1495,7 +1500,7 @@ func (c *gRPCClient) DeleteInterconnectAttachment(ctx context.Context, req *edge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInterconnectAttachment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInterconnectAttachment, req, settings.GRPC, c.logger, "DeleteInterconnectAttachment") return err }, opts...) if err != nil { @@ -1526,7 +1531,7 @@ func (c *gRPCClient) ListRouters(ctx context.Context, req *edgenetworkpb.ListRou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRouters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRouters, req, settings.GRPC, c.logger, "ListRouters") return err }, opts...) if err != nil { @@ -1561,7 +1566,7 @@ func (c *gRPCClient) GetRouter(ctx context.Context, req *edgenetworkpb.GetRouter var resp *edgenetworkpb.Router err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRouter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRouter, req, settings.GRPC, c.logger, "GetRouter") return err }, opts...) if err != nil { @@ -1579,7 +1584,7 @@ func (c *gRPCClient) DiagnoseRouter(ctx context.Context, req *edgenetworkpb.Diag var resp *edgenetworkpb.DiagnoseRouterResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiagnoseRouter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiagnoseRouter, req, settings.GRPC, c.logger, "DiagnoseRouter") return err }, opts...) if err != nil { @@ -1597,7 +1602,7 @@ func (c *gRPCClient) CreateRouter(ctx context.Context, req *edgenetworkpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRouter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRouter, req, settings.GRPC, c.logger, "CreateRouter") return err }, opts...) if err != nil { @@ -1617,7 +1622,7 @@ func (c *gRPCClient) UpdateRouter(ctx context.Context, req *edgenetworkpb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRouter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRouter, req, settings.GRPC, c.logger, "UpdateRouter") return err }, opts...) if err != nil { @@ -1637,7 +1642,7 @@ func (c *gRPCClient) DeleteRouter(ctx context.Context, req *edgenetworkpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRouter(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRouter, req, settings.GRPC, c.logger, "DeleteRouter") return err }, opts...) if err != nil { @@ -1657,7 +1662,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1686,7 +1691,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1720,7 +1725,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1734,7 +1739,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1749,7 +1754,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1778,7 +1783,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1843,17 +1848,7 @@ func (c *restClient) InitializeZone(ctx context.Context, req *edgenetworkpb.Init httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InitializeZone") if err != nil { return err } @@ -1924,21 +1919,10 @@ func (c *restClient) ListZones(ctx context.Context, req *edgenetworkpb.ListZones } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListZones") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2004,17 +1988,7 @@ func (c *restClient) GetZone(ctx context.Context, req *edgenetworkpb.GetZoneRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetZone") if err != nil { return err } @@ -2082,21 +2056,10 @@ func (c *restClient) ListNetworks(ctx context.Context, req *edgenetworkpb.ListNe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2159,17 +2122,7 @@ func (c *restClient) GetNetwork(ctx context.Context, req *edgenetworkpb.GetNetwo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNetwork") if err != nil { return err } @@ -2219,17 +2172,7 @@ func (c *restClient) DiagnoseNetwork(ctx context.Context, req *edgenetworkpb.Dia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DiagnoseNetwork") if err != nil { return err } @@ -2289,21 +2232,10 @@ func (c *restClient) CreateNetwork(ctx context.Context, req *edgenetworkpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNetwork") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2356,21 +2288,10 @@ func (c *restClient) DeleteNetwork(ctx context.Context, req *edgenetworkpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNetwork") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2439,21 +2360,10 @@ func (c *restClient) ListSubnets(ctx context.Context, req *edgenetworkpb.ListSub } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubnets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2516,17 +2426,7 @@ func (c *restClient) GetSubnet(ctx context.Context, req *edgenetworkpb.GetSubnet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubnet") if err != nil { return err } @@ -2586,21 +2486,10 @@ func (c *restClient) CreateSubnet(ctx context.Context, req *edgenetworkpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSubnet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2667,21 +2556,10 @@ func (c *restClient) UpdateSubnet(ctx context.Context, req *edgenetworkpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSubnet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2734,21 +2612,10 @@ func (c *restClient) DeleteSubnet(ctx context.Context, req *edgenetworkpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSubnet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2817,21 +2684,10 @@ func (c *restClient) ListInterconnects(ctx context.Context, req *edgenetworkpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInterconnects") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2894,17 +2750,7 @@ func (c *restClient) GetInterconnect(ctx context.Context, req *edgenetworkpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInterconnect") if err != nil { return err } @@ -2954,17 +2800,7 @@ func (c *restClient) DiagnoseInterconnect(ctx context.Context, req *edgenetworkp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DiagnoseInterconnect") if err != nil { return err } @@ -3032,21 +2868,10 @@ func (c *restClient) ListInterconnectAttachments(ctx context.Context, req *edgen } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInterconnectAttachments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3109,17 +2934,7 @@ func (c *restClient) GetInterconnectAttachment(ctx context.Context, req *edgenet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInterconnectAttachment") if err != nil { return err } @@ -3179,21 +2994,10 @@ func (c *restClient) CreateInterconnectAttachment(ctx context.Context, req *edge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInterconnectAttachment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3246,21 +3050,10 @@ func (c *restClient) DeleteInterconnectAttachment(ctx context.Context, req *edge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInterconnectAttachment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3329,21 +3122,10 @@ func (c *restClient) ListRouters(ctx context.Context, req *edgenetworkpb.ListRou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRouters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3406,17 +3188,7 @@ func (c *restClient) GetRouter(ctx context.Context, req *edgenetworkpb.GetRouter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRouter") if err != nil { return err } @@ -3466,17 +3238,7 @@ func (c *restClient) DiagnoseRouter(ctx context.Context, req *edgenetworkpb.Diag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DiagnoseRouter") if err != nil { return err } @@ -3536,21 +3298,10 @@ func (c *restClient) CreateRouter(ctx context.Context, req *edgenetworkpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRouter") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3617,21 +3368,10 @@ func (c *restClient) UpdateRouter(ctx context.Context, req *edgenetworkpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRouter") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3684,21 +3424,10 @@ func (c *restClient) DeleteRouter(ctx context.Context, req *edgenetworkpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRouter") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3749,17 +3478,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3824,21 +3543,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3904,15 +3612,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3946,15 +3647,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3991,17 +3685,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4066,21 +3750,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/edgenetwork/apiv1/edge_network_client_example_go123_test.go b/edgenetwork/apiv1/edge_network_client_example_go123_test.go index 96abe2b18567..27b066d64225 100644 --- a/edgenetwork/apiv1/edge_network_client_example_go123_test.go +++ b/edgenetwork/apiv1/edge_network_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListInterconnectAttachments_all() { } for resp, err := range c.ListInterconnectAttachments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListInterconnects_all() { } for resp, err := range c.ListInterconnects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListNetworks_all() { } for resp, err := range c.ListNetworks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListRouters_all() { } for resp, err := range c.ListRouters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListSubnets_all() { } for resp, err := range c.ListSubnets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListZones_all() { } for resp, err := range c.ListZones(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/edgenetwork/apiv1/edgenetworkpb/resources.pb.go b/edgenetwork/apiv1/edgenetworkpb/resources.pb.go index a9a6b0245fcb..d0fe40427f9e 100755 --- a/edgenetwork/apiv1/edgenetworkpb/resources.pb.go +++ b/edgenetwork/apiv1/edgenetworkpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/edgenetwork/v1/resources.proto @@ -345,11 +345,9 @@ type Zone struct { func (x *Zone) Reset() { *x = Zone{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Zone) String() string { @@ -360,7 +358,7 @@ func (*Zone) ProtoMessage() {} func (x *Zone) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -437,11 +435,9 @@ type Network struct { func (x *Network) Reset() { *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Network) String() string { @@ -452,7 +448,7 @@ func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +543,9 @@ type Subnet struct { func (x *Subnet) Reset() { *x = Subnet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subnet) String() string { @@ -562,7 +556,7 @@ func (*Subnet) ProtoMessage() {} func (x *Subnet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +679,9 @@ type Interconnect struct { func (x *Interconnect) Reset() { *x = Interconnect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interconnect) String() string { @@ -700,7 +692,7 @@ func (*Interconnect) ProtoMessage() {} func (x *Interconnect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -814,11 +806,9 @@ type InterconnectAttachment struct { func (x *InterconnectAttachment) Reset() { *x = InterconnectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectAttachment) String() string { @@ -829,7 +819,7 @@ func (*InterconnectAttachment) ProtoMessage() {} func (x *InterconnectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +940,9 @@ type Router struct { func (x *Router) Reset() { *x = Router{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Router) String() string { @@ -965,7 +953,7 @@ func (*Router) ProtoMessage() {} func (x *Router) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1059,9 @@ type LinkLayerAddress struct { func (x *LinkLayerAddress) Reset() { *x = LinkLayerAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkLayerAddress) String() string { @@ -1086,7 +1072,7 @@ func (*LinkLayerAddress) ProtoMessage() {} func (x *LinkLayerAddress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1119,9 @@ type SubnetStatus struct { func (x *SubnetStatus) Reset() { *x = SubnetStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubnetStatus) String() string { @@ -1148,7 +1132,7 @@ func (*SubnetStatus) ProtoMessage() {} func (x *SubnetStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,11 +1187,9 @@ type InterconnectDiagnostics struct { func (x *InterconnectDiagnostics) Reset() { *x = InterconnectDiagnostics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics) String() string { @@ -1218,7 +1200,7 @@ func (*InterconnectDiagnostics) ProtoMessage() {} func (x *InterconnectDiagnostics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1269,11 +1251,9 @@ type RouterStatus struct { func (x *RouterStatus) Reset() { *x = RouterStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatus) String() string { @@ -1284,7 +1264,7 @@ func (*RouterStatus) ProtoMessage() {} func (x *RouterStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1318,9 @@ type Router_Interface struct { func (x *Router_Interface) Reset() { *x = Router_Interface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Router_Interface) String() string { @@ -1353,7 +1331,7 @@ func (*Router_Interface) ProtoMessage() {} func (x *Router_Interface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1440,11 +1418,9 @@ type Router_BgpPeer struct { func (x *Router_BgpPeer) Reset() { *x = Router_BgpPeer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Router_BgpPeer) String() string { @@ -1455,7 +1431,7 @@ func (*Router_BgpPeer) ProtoMessage() {} func (x *Router_BgpPeer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1541,11 +1517,9 @@ type Router_Bgp struct { func (x *Router_Bgp) Reset() { *x = Router_Bgp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Router_Bgp) String() string { @@ -1556,7 +1530,7 @@ func (*Router_Bgp) ProtoMessage() {} func (x *Router_Bgp) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1604,11 +1578,9 @@ type InterconnectDiagnostics_LinkStatus struct { func (x *InterconnectDiagnostics_LinkStatus) Reset() { *x = InterconnectDiagnostics_LinkStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics_LinkStatus) String() string { @@ -1619,7 +1591,7 @@ func (*InterconnectDiagnostics_LinkStatus) ProtoMessage() {} func (x *InterconnectDiagnostics_LinkStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,11 +1659,9 @@ type InterconnectDiagnostics_PacketCounts struct { func (x *InterconnectDiagnostics_PacketCounts) Reset() { *x = InterconnectDiagnostics_PacketCounts{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics_PacketCounts) String() string { @@ -1702,7 +1672,7 @@ func (*InterconnectDiagnostics_PacketCounts) ProtoMessage() {} func (x *InterconnectDiagnostics_PacketCounts) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1785,11 +1755,9 @@ type InterconnectDiagnostics_LinkLACPStatus struct { func (x *InterconnectDiagnostics_LinkLACPStatus) Reset() { *x = InterconnectDiagnostics_LinkLACPStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics_LinkLACPStatus) String() string { @@ -1800,7 +1768,7 @@ func (*InterconnectDiagnostics_LinkLACPStatus) ProtoMessage() {} func (x *InterconnectDiagnostics_LinkLACPStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1850,9 @@ type InterconnectDiagnostics_LinkLLDPStatus struct { func (x *InterconnectDiagnostics_LinkLLDPStatus) Reset() { *x = InterconnectDiagnostics_LinkLLDPStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InterconnectDiagnostics_LinkLLDPStatus) String() string { @@ -1897,7 +1863,7 @@ func (*InterconnectDiagnostics_LinkLLDPStatus) ProtoMessage() {} func (x *InterconnectDiagnostics_LinkLLDPStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1983,11 +1949,9 @@ type RouterStatus_BgpPeerStatus struct { func (x *RouterStatus_BgpPeerStatus) Reset() { *x = RouterStatus_BgpPeerStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatus_BgpPeerStatus) String() string { @@ -1998,7 +1962,7 @@ func (*RouterStatus_BgpPeerStatus) ProtoMessage() {} func (x *RouterStatus_BgpPeerStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2091,11 +2055,9 @@ type RouterStatus_PrefixCounter struct { func (x *RouterStatus_PrefixCounter) Reset() { *x = RouterStatus_PrefixCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterStatus_PrefixCounter) String() string { @@ -2106,7 +2068,7 @@ func (*RouterStatus_PrefixCounter) ProtoMessage() {} func (x *RouterStatus_PrefixCounter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,236 +2721,6 @@ func file_google_cloud_edgenetwork_v1_resources_proto_init() { if File_google_cloud_edgenetwork_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Zone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Subnet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Interconnect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Router); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*LinkLayerAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SubnetStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Router_Interface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Router_BgpPeer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Router_Bgp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics_LinkStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics_PacketCounts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics_LinkLACPStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*InterconnectDiagnostics_LinkLLDPStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatus_BgpPeerStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RouterStatus_PrefixCounter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/edgenetwork/apiv1/edgenetworkpb/service.pb.go b/edgenetwork/apiv1/edgenetworkpb/service.pb.go index 4f0925e577ca..4f8a87e3e90f 100755 --- a/edgenetwork/apiv1/edgenetworkpb/service.pb.go +++ b/edgenetwork/apiv1/edgenetworkpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/edgenetwork/v1/service.proto @@ -121,11 +121,9 @@ type ListZonesRequest struct { func (x *ListZonesRequest) Reset() { *x = ListZonesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZonesRequest) String() string { @@ -136,7 +134,7 @@ func (*ListZonesRequest) ProtoMessage() {} func (x *ListZonesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +203,9 @@ type ListZonesResponse struct { func (x *ListZonesResponse) Reset() { *x = ListZonesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListZonesResponse) String() string { @@ -220,7 +216,7 @@ func (*ListZonesResponse) ProtoMessage() {} func (x *ListZonesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +267,9 @@ type GetZoneRequest struct { func (x *GetZoneRequest) Reset() { *x = GetZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetZoneRequest) String() string { @@ -286,7 +280,7 @@ func (*GetZoneRequest) ProtoMessage() {} func (x *GetZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +323,9 @@ type ListNetworksRequest struct { func (x *ListNetworksRequest) Reset() { *x = ListNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworksRequest) String() string { @@ -344,7 +336,7 @@ func (*ListNetworksRequest) ProtoMessage() {} func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +402,9 @@ type ListNetworksResponse struct { func (x *ListNetworksResponse) Reset() { *x = ListNetworksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworksResponse) String() string { @@ -425,7 +415,7 @@ func (*ListNetworksResponse) ProtoMessage() {} func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +463,9 @@ type GetNetworkRequest struct { func (x *GetNetworkRequest) Reset() { *x = GetNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkRequest) String() string { @@ -488,7 +476,7 @@ func (*GetNetworkRequest) ProtoMessage() {} func (x *GetNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -542,11 +530,9 @@ type CreateNetworkRequest struct { func (x *CreateNetworkRequest) Reset() { *x = CreateNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNetworkRequest) String() string { @@ -557,7 +543,7 @@ func (*CreateNetworkRequest) ProtoMessage() {} func (x *CreateNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +612,9 @@ type DeleteNetworkRequest struct { func (x *DeleteNetworkRequest) Reset() { *x = DeleteNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkRequest) String() string { @@ -641,7 +625,7 @@ func (*DeleteNetworkRequest) ProtoMessage() {} func (x *DeleteNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +675,9 @@ type ListSubnetsRequest struct { func (x *ListSubnetsRequest) Reset() { *x = ListSubnetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubnetsRequest) String() string { @@ -706,7 +688,7 @@ func (*ListSubnetsRequest) ProtoMessage() {} func (x *ListSubnetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +754,9 @@ type ListSubnetsResponse struct { func (x *ListSubnetsResponse) Reset() { *x = ListSubnetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubnetsResponse) String() string { @@ -787,7 +767,7 @@ func (*ListSubnetsResponse) ProtoMessage() {} func (x *ListSubnetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +815,9 @@ type GetSubnetRequest struct { func (x *GetSubnetRequest) Reset() { *x = GetSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubnetRequest) String() string { @@ -850,7 +828,7 @@ func (*GetSubnetRequest) ProtoMessage() {} func (x *GetSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +882,9 @@ type CreateSubnetRequest struct { func (x *CreateSubnetRequest) Reset() { *x = CreateSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubnetRequest) String() string { @@ -919,7 +895,7 @@ func (*CreateSubnetRequest) ProtoMessage() {} func (x *CreateSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +970,9 @@ type UpdateSubnetRequest struct { func (x *UpdateSubnetRequest) Reset() { *x = UpdateSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubnetRequest) String() string { @@ -1009,7 +983,7 @@ func (*UpdateSubnetRequest) ProtoMessage() {} func (x *UpdateSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1045,9 @@ type DeleteSubnetRequest struct { func (x *DeleteSubnetRequest) Reset() { *x = DeleteSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubnetRequest) String() string { @@ -1086,7 +1058,7 @@ func (*DeleteSubnetRequest) ProtoMessage() {} func (x *DeleteSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1108,9 @@ type ListInterconnectsRequest struct { func (x *ListInterconnectsRequest) Reset() { *x = ListInterconnectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectsRequest) String() string { @@ -1151,7 +1121,7 @@ func (*ListInterconnectsRequest) ProtoMessage() {} func (x *ListInterconnectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1187,9 @@ type ListInterconnectsResponse struct { func (x *ListInterconnectsResponse) Reset() { *x = ListInterconnectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectsResponse) String() string { @@ -1232,7 +1200,7 @@ func (*ListInterconnectsResponse) ProtoMessage() {} func (x *ListInterconnectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1280,11 +1248,9 @@ type GetInterconnectRequest struct { func (x *GetInterconnectRequest) Reset() { *x = GetInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectRequest) String() string { @@ -1295,7 +1261,7 @@ func (*GetInterconnectRequest) ProtoMessage() {} func (x *GetInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1304,9 @@ type ListInterconnectAttachmentsRequest struct { func (x *ListInterconnectAttachmentsRequest) Reset() { *x = ListInterconnectAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectAttachmentsRequest) String() string { @@ -1353,7 +1317,7 @@ func (*ListInterconnectAttachmentsRequest) ProtoMessage() {} func (x *ListInterconnectAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1419,11 +1383,9 @@ type ListInterconnectAttachmentsResponse struct { func (x *ListInterconnectAttachmentsResponse) Reset() { *x = ListInterconnectAttachmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInterconnectAttachmentsResponse) String() string { @@ -1434,7 +1396,7 @@ func (*ListInterconnectAttachmentsResponse) ProtoMessage() {} func (x *ListInterconnectAttachmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,11 +1444,9 @@ type GetInterconnectAttachmentRequest struct { func (x *GetInterconnectAttachmentRequest) Reset() { *x = GetInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInterconnectAttachmentRequest) String() string { @@ -1497,7 +1457,7 @@ func (*GetInterconnectAttachmentRequest) ProtoMessage() {} func (x *GetInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1511,9 @@ type CreateInterconnectAttachmentRequest struct { func (x *CreateInterconnectAttachmentRequest) Reset() { *x = CreateInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInterconnectAttachmentRequest) String() string { @@ -1566,7 +1524,7 @@ func (*CreateInterconnectAttachmentRequest) ProtoMessage() {} func (x *CreateInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1635,11 +1593,9 @@ type DeleteInterconnectAttachmentRequest struct { func (x *DeleteInterconnectAttachmentRequest) Reset() { *x = DeleteInterconnectAttachmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInterconnectAttachmentRequest) String() string { @@ -1650,7 +1606,7 @@ func (*DeleteInterconnectAttachmentRequest) ProtoMessage() {} func (x *DeleteInterconnectAttachmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1700,11 +1656,9 @@ type ListRoutersRequest struct { func (x *ListRoutersRequest) Reset() { *x = ListRoutersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutersRequest) String() string { @@ -1715,7 +1669,7 @@ func (*ListRoutersRequest) ProtoMessage() {} func (x *ListRoutersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1781,11 +1735,9 @@ type ListRoutersResponse struct { func (x *ListRoutersResponse) Reset() { *x = ListRoutersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutersResponse) String() string { @@ -1796,7 +1748,7 @@ func (*ListRoutersResponse) ProtoMessage() {} func (x *ListRoutersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1844,11 +1796,9 @@ type GetRouterRequest struct { func (x *GetRouterRequest) Reset() { *x = GetRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouterRequest) String() string { @@ -1859,7 +1809,7 @@ func (*GetRouterRequest) ProtoMessage() {} func (x *GetRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1913,11 +1863,9 @@ type CreateRouterRequest struct { func (x *CreateRouterRequest) Reset() { *x = CreateRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRouterRequest) String() string { @@ -1928,7 +1876,7 @@ func (*CreateRouterRequest) ProtoMessage() {} func (x *CreateRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2003,11 +1951,9 @@ type UpdateRouterRequest struct { func (x *UpdateRouterRequest) Reset() { *x = UpdateRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRouterRequest) String() string { @@ -2018,7 +1964,7 @@ func (*UpdateRouterRequest) ProtoMessage() {} func (x *UpdateRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2080,11 +2026,9 @@ type DeleteRouterRequest struct { func (x *DeleteRouterRequest) Reset() { *x = DeleteRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRouterRequest) String() string { @@ -2095,7 +2039,7 @@ func (*DeleteRouterRequest) ProtoMessage() {} func (x *DeleteRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2152,11 +2096,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2167,7 +2109,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2243,11 +2185,9 @@ type DiagnoseNetworkRequest struct { func (x *DiagnoseNetworkRequest) Reset() { *x = DiagnoseNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseNetworkRequest) String() string { @@ -2258,7 +2198,7 @@ func (*DiagnoseNetworkRequest) ProtoMessage() {} func (x *DiagnoseNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2294,11 +2234,9 @@ type DiagnoseNetworkResponse struct { func (x *DiagnoseNetworkResponse) Reset() { *x = DiagnoseNetworkResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseNetworkResponse) String() string { @@ -2309,7 +2247,7 @@ func (*DiagnoseNetworkResponse) ProtoMessage() {} func (x *DiagnoseNetworkResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2351,11 +2289,9 @@ type DiagnoseInterconnectRequest struct { func (x *DiagnoseInterconnectRequest) Reset() { *x = DiagnoseInterconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseInterconnectRequest) String() string { @@ -2366,7 +2302,7 @@ func (*DiagnoseInterconnectRequest) ProtoMessage() {} func (x *DiagnoseInterconnectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2403,11 +2339,9 @@ type DiagnoseInterconnectResponse struct { func (x *DiagnoseInterconnectResponse) Reset() { *x = DiagnoseInterconnectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseInterconnectResponse) String() string { @@ -2418,7 +2352,7 @@ func (*DiagnoseInterconnectResponse) ProtoMessage() {} func (x *DiagnoseInterconnectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2459,11 +2393,9 @@ type DiagnoseRouterRequest struct { func (x *DiagnoseRouterRequest) Reset() { *x = DiagnoseRouterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseRouterRequest) String() string { @@ -2474,7 +2406,7 @@ func (*DiagnoseRouterRequest) ProtoMessage() {} func (x *DiagnoseRouterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2510,11 +2442,9 @@ type DiagnoseRouterResponse struct { func (x *DiagnoseRouterResponse) Reset() { *x = DiagnoseRouterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseRouterResponse) String() string { @@ -2525,7 +2455,7 @@ func (*DiagnoseRouterResponse) ProtoMessage() {} func (x *DiagnoseRouterResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2566,11 +2496,9 @@ type InitializeZoneRequest struct { func (x *InitializeZoneRequest) Reset() { *x = InitializeZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeZoneRequest) String() string { @@ -2581,7 +2509,7 @@ func (*InitializeZoneRequest) ProtoMessage() {} func (x *InitializeZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2612,11 +2540,9 @@ type InitializeZoneResponse struct { func (x *InitializeZoneResponse) Reset() { *x = InitializeZoneResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializeZoneResponse) String() string { @@ -2627,7 +2553,7 @@ func (*InitializeZoneResponse) ProtoMessage() {} func (x *InitializeZoneResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2657,11 +2583,9 @@ type DiagnoseNetworkResponse_NetworkStatus struct { func (x *DiagnoseNetworkResponse_NetworkStatus) Reset() { *x = DiagnoseNetworkResponse_NetworkStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseNetworkResponse_NetworkStatus) String() string { @@ -2672,7 +2596,7 @@ func (*DiagnoseNetworkResponse_NetworkStatus) ProtoMessage() {} func (x *DiagnoseNetworkResponse_NetworkStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_edgenetwork_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3643,464 +3567,6 @@ func file_google_cloud_edgenetwork_v1_service_proto_init() { return } file_google_cloud_edgenetwork_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListZonesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListZonesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListSubnetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListSubnetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListInterconnectAttachmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInterconnectAttachmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseNetworkResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseInterconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseInterconnectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseRouterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseRouterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*InitializeZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*InitializeZoneResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_edgenetwork_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseNetworkResponse_NetworkStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/edgenetwork/apiv1/helpers.go b/edgenetwork/apiv1/helpers.go index 0465c7471706..2aff610112a7 100755 --- a/edgenetwork/apiv1/helpers.go +++ b/edgenetwork/apiv1/helpers.go @@ -18,10 +18,20 @@ package edgenetwork import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "edgenetwork.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/essentialcontacts/apiv1/essential_contacts_client.go b/essentialcontacts/apiv1/essential_contacts_client.go index 2035d080419d..07e23db41c0c 100755 --- a/essentialcontacts/apiv1/essential_contacts_client.go +++ b/essentialcontacts/apiv1/essential_contacts_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( essentialcontactspb "cloud.google.com/go/essentialcontacts/apiv1/essentialcontactspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -257,6 +256,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new essential contacts service client based on gRPC. @@ -283,6 +284,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: essentialcontactspb.NewEssentialContactsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -329,6 +331,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new essential contacts service rest client. @@ -346,6 +350,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,7 +403,7 @@ func (c *gRPCClient) CreateContact(ctx context.Context, req *essentialcontactspb var resp *essentialcontactspb.Contact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateContact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateContact, req, settings.GRPC, c.logger, "CreateContact") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *gRPCClient) UpdateContact(ctx context.Context, req *essentialcontactspb var resp *essentialcontactspb.Contact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateContact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateContact, req, settings.GRPC, c.logger, "UpdateContact") return err }, opts...) if err != nil { @@ -445,7 +450,7 @@ func (c *gRPCClient) ListContacts(ctx context.Context, req *essentialcontactspb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListContacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListContacts, req, settings.GRPC, c.logger, "ListContacts") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *gRPCClient) GetContact(ctx context.Context, req *essentialcontactspb.Ge var resp *essentialcontactspb.Contact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetContact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetContact, req, settings.GRPC, c.logger, "GetContact") return err }, opts...) if err != nil { @@ -497,7 +502,7 @@ func (c *gRPCClient) DeleteContact(ctx context.Context, req *essentialcontactspb opts = append((*c.CallOptions).DeleteContact[0:len((*c.CallOptions).DeleteContact):len((*c.CallOptions).DeleteContact)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteContact(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteContact, req, settings.GRPC, c.logger, "DeleteContact") return err }, opts...) return err @@ -523,7 +528,7 @@ func (c *gRPCClient) ComputeContacts(ctx context.Context, req *essentialcontacts } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComputeContacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComputeContacts, req, settings.GRPC, c.logger, "ComputeContacts") return err }, opts...) if err != nil { @@ -557,7 +562,7 @@ func (c *gRPCClient) SendTestMessage(ctx context.Context, req *essentialcontacts opts = append((*c.CallOptions).SendTestMessage[0:len((*c.CallOptions).SendTestMessage):len((*c.CallOptions).SendTestMessage)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.SendTestMessage(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.SendTestMessage, req, settings.GRPC, c.logger, "SendTestMessage") return err }, opts...) return err @@ -603,17 +608,7 @@ func (c *restClient) CreateContact(ctx context.Context, req *essentialcontactspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateContact") if err != nil { return err } @@ -678,17 +673,7 @@ func (c *restClient) UpdateContact(ctx context.Context, req *essentialcontactspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateContact") if err != nil { return err } @@ -750,21 +735,10 @@ func (c *restClient) ListContacts(ctx context.Context, req *essentialcontactspb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListContacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -827,17 +801,7 @@ func (c *restClient) GetContact(ctx context.Context, req *essentialcontactspb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetContact") if err != nil { return err } @@ -884,15 +848,8 @@ func (c *restClient) DeleteContact(ctx context.Context, req *essentialcontactspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteContact") + return err }, opts...) } @@ -948,21 +905,10 @@ func (c *restClient) ComputeContacts(ctx context.Context, req *essentialcontacts } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ComputeContacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1029,14 +975,7 @@ func (c *restClient) SendTestMessage(ctx context.Context, req *essentialcontacts httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SendTestMessage") + return err }, opts...) } diff --git a/essentialcontacts/apiv1/essential_contacts_client_example_go123_test.go b/essentialcontacts/apiv1/essential_contacts_client_example_go123_test.go index b7e4cf5bb8e1..f2b65edd592b 100644 --- a/essentialcontacts/apiv1/essential_contacts_client_example_go123_test.go +++ b/essentialcontacts/apiv1/essential_contacts_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ComputeContacts_all() { } for resp, err := range c.ComputeContacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListContacts_all() { } for resp, err := range c.ListContacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/essentialcontacts/apiv1/essentialcontactspb/enums.pb.go b/essentialcontacts/apiv1/essentialcontactspb/enums.pb.go index e342c60bb31c..2b61051078af 100755 --- a/essentialcontacts/apiv1/essentialcontactspb/enums.pb.go +++ b/essentialcontacts/apiv1/essentialcontactspb/enums.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/essentialcontacts/v1/enums.proto diff --git a/essentialcontacts/apiv1/essentialcontactspb/service.pb.go b/essentialcontacts/apiv1/essentialcontactspb/service.pb.go index 38329a38c3c5..2f3c0d2d0a0d 100755 --- a/essentialcontacts/apiv1/essentialcontactspb/service.pb.go +++ b/essentialcontacts/apiv1/essentialcontactspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/essentialcontacts/v1/service.proto @@ -74,11 +74,9 @@ type Contact struct { func (x *Contact) Reset() { *x = Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Contact) String() string { @@ -89,7 +87,7 @@ func (*Contact) ProtoMessage() {} func (x *Contact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type ListContactsRequest struct { func (x *ListContactsRequest) Reset() { *x = ListContactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContactsRequest) String() string { @@ -185,7 +181,7 @@ func (*ListContactsRequest) ProtoMessage() {} func (x *ListContactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +234,9 @@ type ListContactsResponse struct { func (x *ListContactsResponse) Reset() { *x = ListContactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListContactsResponse) String() string { @@ -253,7 +247,7 @@ func (*ListContactsResponse) ProtoMessage() {} func (x *ListContactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type GetContactRequest struct { func (x *GetContactRequest) Reset() { *x = GetContactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetContactRequest) String() string { @@ -312,7 +304,7 @@ func (*GetContactRequest) ProtoMessage() {} func (x *GetContactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +341,9 @@ type DeleteContactRequest struct { func (x *DeleteContactRequest) Reset() { *x = DeleteContactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteContactRequest) String() string { @@ -364,7 +354,7 @@ func (*DeleteContactRequest) ProtoMessage() {} func (x *DeleteContactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +393,9 @@ type CreateContactRequest struct { func (x *CreateContactRequest) Reset() { *x = CreateContactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateContactRequest) String() string { @@ -418,7 +406,7 @@ func (*CreateContactRequest) ProtoMessage() {} func (x *CreateContactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +452,9 @@ type UpdateContactRequest struct { func (x *UpdateContactRequest) Reset() { *x = UpdateContactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContactRequest) String() string { @@ -479,7 +465,7 @@ func (*UpdateContactRequest) ProtoMessage() {} func (x *UpdateContactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +522,9 @@ type ComputeContactsRequest struct { func (x *ComputeContactsRequest) Reset() { *x = ComputeContactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeContactsRequest) String() string { @@ -551,7 +535,7 @@ func (*ComputeContactsRequest) ProtoMessage() {} func (x *ComputeContactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +597,9 @@ type ComputeContactsResponse struct { func (x *ComputeContactsResponse) Reset() { *x = ComputeContactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeContactsResponse) String() string { @@ -628,7 +610,7 @@ func (*ComputeContactsResponse) ProtoMessage() {} func (x *ComputeContactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +663,9 @@ type SendTestMessageRequest struct { func (x *SendTestMessageRequest) Reset() { *x = SendTestMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendTestMessageRequest) String() string { @@ -696,7 +676,7 @@ func (*SendTestMessageRequest) ProtoMessage() {} func (x *SendTestMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,128 +1081,6 @@ func file_google_cloud_essentialcontacts_v1_service_proto_init() { return } file_google_cloud_essentialcontacts_v1_enums_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListContactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListContactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetContactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteContactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateContactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateContactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ComputeContactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ComputeContactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_essentialcontacts_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SendTestMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/essentialcontacts/apiv1/helpers.go b/essentialcontacts/apiv1/helpers.go index 8fc0be10971f..28c64b141f31 100755 --- a/essentialcontacts/apiv1/helpers.go +++ b/essentialcontacts/apiv1/helpers.go @@ -18,10 +18,20 @@ package essentialcontacts import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "essentialcontacts.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/eventarc/apiv1/eventarc_client.go b/eventarc/apiv1/eventarc_client.go index 0240c12848bf..8dc428ddd5e9 100755 --- a/eventarc/apiv1/eventarc_client.go +++ b/eventarc/apiv1/eventarc_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1231,6 +1230,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new eventarc client based on gRPC. @@ -1258,6 +1259,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: eventarcpb.NewEventarcClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1323,6 +1325,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new eventarc rest client. @@ -1341,6 +1345,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1403,7 +1408,7 @@ func (c *gRPCClient) GetTrigger(ctx context.Context, req *eventarcpb.GetTriggerR var resp *eventarcpb.Trigger err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTrigger, req, settings.GRPC, c.logger, "GetTrigger") return err }, opts...) if err != nil { @@ -1432,7 +1437,7 @@ func (c *gRPCClient) ListTriggers(ctx context.Context, req *eventarcpb.ListTrigg } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTriggers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTriggers, req, settings.GRPC, c.logger, "ListTriggers") return err }, opts...) if err != nil { @@ -1467,7 +1472,7 @@ func (c *gRPCClient) CreateTrigger(ctx context.Context, req *eventarcpb.CreateTr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTrigger, req, settings.GRPC, c.logger, "CreateTrigger") return err }, opts...) if err != nil { @@ -1487,7 +1492,7 @@ func (c *gRPCClient) UpdateTrigger(ctx context.Context, req *eventarcpb.UpdateTr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTrigger, req, settings.GRPC, c.logger, "UpdateTrigger") return err }, opts...) if err != nil { @@ -1507,7 +1512,7 @@ func (c *gRPCClient) DeleteTrigger(ctx context.Context, req *eventarcpb.DeleteTr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTrigger(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTrigger, req, settings.GRPC, c.logger, "DeleteTrigger") return err }, opts...) if err != nil { @@ -1527,7 +1532,7 @@ func (c *gRPCClient) GetChannel(ctx context.Context, req *eventarcpb.GetChannelR var resp *eventarcpb.Channel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetChannel, req, settings.GRPC, c.logger, "GetChannel") return err }, opts...) if err != nil { @@ -1556,7 +1561,7 @@ func (c *gRPCClient) ListChannels(ctx context.Context, req *eventarcpb.ListChann } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListChannels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListChannels, req, settings.GRPC, c.logger, "ListChannels") return err }, opts...) if err != nil { @@ -1591,7 +1596,7 @@ func (c *gRPCClient) CreateChannel(ctx context.Context, req *eventarcpb.CreateCh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateChannel, req, settings.GRPC, c.logger, "CreateChannel") return err }, opts...) if err != nil { @@ -1611,7 +1616,7 @@ func (c *gRPCClient) UpdateChannel(ctx context.Context, req *eventarcpb.UpdateCh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateChannel, req, settings.GRPC, c.logger, "UpdateChannel") return err }, opts...) if err != nil { @@ -1631,7 +1636,7 @@ func (c *gRPCClient) DeleteChannel(ctx context.Context, req *eventarcpb.DeleteCh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteChannel, req, settings.GRPC, c.logger, "DeleteChannel") return err }, opts...) if err != nil { @@ -1651,7 +1656,7 @@ func (c *gRPCClient) GetProvider(ctx context.Context, req *eventarcpb.GetProvide var resp *eventarcpb.Provider err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProvider(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProvider, req, settings.GRPC, c.logger, "GetProvider") return err }, opts...) if err != nil { @@ -1680,7 +1685,7 @@ func (c *gRPCClient) ListProviders(ctx context.Context, req *eventarcpb.ListProv } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListProviders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListProviders, req, settings.GRPC, c.logger, "ListProviders") return err }, opts...) if err != nil { @@ -1715,7 +1720,7 @@ func (c *gRPCClient) GetChannelConnection(ctx context.Context, req *eventarcpb.G var resp *eventarcpb.ChannelConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetChannelConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetChannelConnection, req, settings.GRPC, c.logger, "GetChannelConnection") return err }, opts...) if err != nil { @@ -1744,7 +1749,7 @@ func (c *gRPCClient) ListChannelConnections(ctx context.Context, req *eventarcpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListChannelConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListChannelConnections, req, settings.GRPC, c.logger, "ListChannelConnections") return err }, opts...) if err != nil { @@ -1779,7 +1784,7 @@ func (c *gRPCClient) CreateChannelConnection(ctx context.Context, req *eventarcp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateChannelConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateChannelConnection, req, settings.GRPC, c.logger, "CreateChannelConnection") return err }, opts...) if err != nil { @@ -1799,7 +1804,7 @@ func (c *gRPCClient) DeleteChannelConnection(ctx context.Context, req *eventarcp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteChannelConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteChannelConnection, req, settings.GRPC, c.logger, "DeleteChannelConnection") return err }, opts...) if err != nil { @@ -1819,7 +1824,7 @@ func (c *gRPCClient) GetGoogleChannelConfig(ctx context.Context, req *eventarcpb var resp *eventarcpb.GoogleChannelConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGoogleChannelConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGoogleChannelConfig, req, settings.GRPC, c.logger, "GetGoogleChannelConfig") return err }, opts...) if err != nil { @@ -1837,7 +1842,7 @@ func (c *gRPCClient) UpdateGoogleChannelConfig(ctx context.Context, req *eventar var resp *eventarcpb.GoogleChannelConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGoogleChannelConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGoogleChannelConfig, req, settings.GRPC, c.logger, "UpdateGoogleChannelConfig") return err }, opts...) if err != nil { @@ -1855,7 +1860,7 @@ func (c *gRPCClient) GetMessageBus(ctx context.Context, req *eventarcpb.GetMessa var resp *eventarcpb.MessageBus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMessageBus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMessageBus, req, settings.GRPC, c.logger, "GetMessageBus") return err }, opts...) if err != nil { @@ -1884,7 +1889,7 @@ func (c *gRPCClient) ListMessageBuses(ctx context.Context, req *eventarcpb.ListM } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMessageBuses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMessageBuses, req, settings.GRPC, c.logger, "ListMessageBuses") return err }, opts...) if err != nil { @@ -1930,7 +1935,7 @@ func (c *gRPCClient) ListMessageBusEnrollments(ctx context.Context, req *eventar } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMessageBusEnrollments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMessageBusEnrollments, req, settings.GRPC, c.logger, "ListMessageBusEnrollments") return err }, opts...) if err != nil { @@ -1965,7 +1970,7 @@ func (c *gRPCClient) CreateMessageBus(ctx context.Context, req *eventarcpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMessageBus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMessageBus, req, settings.GRPC, c.logger, "CreateMessageBus") return err }, opts...) if err != nil { @@ -1985,7 +1990,7 @@ func (c *gRPCClient) UpdateMessageBus(ctx context.Context, req *eventarcpb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMessageBus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMessageBus, req, settings.GRPC, c.logger, "UpdateMessageBus") return err }, opts...) if err != nil { @@ -2005,7 +2010,7 @@ func (c *gRPCClient) DeleteMessageBus(ctx context.Context, req *eventarcpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteMessageBus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteMessageBus, req, settings.GRPC, c.logger, "DeleteMessageBus") return err }, opts...) if err != nil { @@ -2025,7 +2030,7 @@ func (c *gRPCClient) GetEnrollment(ctx context.Context, req *eventarcpb.GetEnrol var resp *eventarcpb.Enrollment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEnrollment, req, settings.GRPC, c.logger, "GetEnrollment") return err }, opts...) if err != nil { @@ -2054,7 +2059,7 @@ func (c *gRPCClient) ListEnrollments(ctx context.Context, req *eventarcpb.ListEn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEnrollments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEnrollments, req, settings.GRPC, c.logger, "ListEnrollments") return err }, opts...) if err != nil { @@ -2089,7 +2094,7 @@ func (c *gRPCClient) CreateEnrollment(ctx context.Context, req *eventarcpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEnrollment, req, settings.GRPC, c.logger, "CreateEnrollment") return err }, opts...) if err != nil { @@ -2109,7 +2114,7 @@ func (c *gRPCClient) UpdateEnrollment(ctx context.Context, req *eventarcpb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEnrollment, req, settings.GRPC, c.logger, "UpdateEnrollment") return err }, opts...) if err != nil { @@ -2129,7 +2134,7 @@ func (c *gRPCClient) DeleteEnrollment(ctx context.Context, req *eventarcpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEnrollment, req, settings.GRPC, c.logger, "DeleteEnrollment") return err }, opts...) if err != nil { @@ -2149,7 +2154,7 @@ func (c *gRPCClient) GetPipeline(ctx context.Context, req *eventarcpb.GetPipelin var resp *eventarcpb.Pipeline err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPipeline, req, settings.GRPC, c.logger, "GetPipeline") return err }, opts...) if err != nil { @@ -2178,7 +2183,7 @@ func (c *gRPCClient) ListPipelines(ctx context.Context, req *eventarcpb.ListPipe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPipelines(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPipelines, req, settings.GRPC, c.logger, "ListPipelines") return err }, opts...) if err != nil { @@ -2213,7 +2218,7 @@ func (c *gRPCClient) CreatePipeline(ctx context.Context, req *eventarcpb.CreateP var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePipeline, req, settings.GRPC, c.logger, "CreatePipeline") return err }, opts...) if err != nil { @@ -2233,7 +2238,7 @@ func (c *gRPCClient) UpdatePipeline(ctx context.Context, req *eventarcpb.UpdateP var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePipeline, req, settings.GRPC, c.logger, "UpdatePipeline") return err }, opts...) if err != nil { @@ -2253,7 +2258,7 @@ func (c *gRPCClient) DeletePipeline(ctx context.Context, req *eventarcpb.DeleteP var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePipeline, req, settings.GRPC, c.logger, "DeletePipeline") return err }, opts...) if err != nil { @@ -2273,7 +2278,7 @@ func (c *gRPCClient) GetGoogleApiSource(ctx context.Context, req *eventarcpb.Get var resp *eventarcpb.GoogleApiSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGoogleApiSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGoogleApiSource, req, settings.GRPC, c.logger, "GetGoogleApiSource") return err }, opts...) if err != nil { @@ -2302,7 +2307,7 @@ func (c *gRPCClient) ListGoogleApiSources(ctx context.Context, req *eventarcpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGoogleApiSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGoogleApiSources, req, settings.GRPC, c.logger, "ListGoogleApiSources") return err }, opts...) if err != nil { @@ -2337,7 +2342,7 @@ func (c *gRPCClient) CreateGoogleApiSource(ctx context.Context, req *eventarcpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGoogleApiSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGoogleApiSource, req, settings.GRPC, c.logger, "CreateGoogleApiSource") return err }, opts...) if err != nil { @@ -2357,7 +2362,7 @@ func (c *gRPCClient) UpdateGoogleApiSource(ctx context.Context, req *eventarcpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGoogleApiSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGoogleApiSource, req, settings.GRPC, c.logger, "UpdateGoogleApiSource") return err }, opts...) if err != nil { @@ -2377,7 +2382,7 @@ func (c *gRPCClient) DeleteGoogleApiSource(ctx context.Context, req *eventarcpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGoogleApiSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGoogleApiSource, req, settings.GRPC, c.logger, "DeleteGoogleApiSource") return err }, opts...) if err != nil { @@ -2397,7 +2402,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2426,7 +2431,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2461,7 +2466,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2479,7 +2484,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2497,7 +2502,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2514,7 +2519,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2528,7 +2533,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2543,7 +2548,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2572,7 +2577,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2631,17 +2636,7 @@ func (c *restClient) GetTrigger(ctx context.Context, req *eventarcpb.GetTriggerR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTrigger") if err != nil { return err } @@ -2709,21 +2704,10 @@ func (c *restClient) ListTriggers(ctx context.Context, req *eventarcpb.ListTrigg } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTriggers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2796,21 +2780,10 @@ func (c *restClient) CreateTrigger(ctx context.Context, req *eventarcpb.CreateTr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTrigger") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2880,21 +2853,10 @@ func (c *restClient) UpdateTrigger(ctx context.Context, req *eventarcpb.UpdateTr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTrigger") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2953,21 +2915,10 @@ func (c *restClient) DeleteTrigger(ctx context.Context, req *eventarcpb.DeleteTr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTrigger") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3018,17 +2969,7 @@ func (c *restClient) GetChannel(ctx context.Context, req *eventarcpb.GetChannelR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannel") if err != nil { return err } @@ -3093,21 +3034,10 @@ func (c *restClient) ListChannels(ctx context.Context, req *eventarcpb.ListChann } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3180,21 +3110,10 @@ func (c *restClient) CreateChannel(ctx context.Context, req *eventarcpb.CreateCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3261,21 +3180,10 @@ func (c *restClient) UpdateChannel(ctx context.Context, req *eventarcpb.UpdateCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChannel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3328,21 +3236,10 @@ func (c *restClient) DeleteChannel(ctx context.Context, req *eventarcpb.DeleteCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChannel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3393,17 +3290,7 @@ func (c *restClient) GetProvider(ctx context.Context, req *eventarcpb.GetProvide httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProvider") if err != nil { return err } @@ -3471,21 +3358,10 @@ func (c *restClient) ListProviders(ctx context.Context, req *eventarcpb.ListProv } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProviders") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3548,17 +3424,7 @@ func (c *restClient) GetChannelConnection(ctx context.Context, req *eventarcpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannelConnection") if err != nil { return err } @@ -3620,21 +3486,10 @@ func (c *restClient) ListChannelConnections(ctx context.Context, req *eventarcpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannelConnections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3704,21 +3559,10 @@ func (c *restClient) CreateChannelConnection(ctx context.Context, req *eventarcp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannelConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3768,21 +3612,10 @@ func (c *restClient) DeleteChannelConnection(ctx context.Context, req *eventarcp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChannelConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3833,17 +3666,7 @@ func (c *restClient) GetGoogleChannelConfig(ctx context.Context, req *eventarcpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGoogleChannelConfig") if err != nil { return err } @@ -3907,17 +3730,7 @@ func (c *restClient) UpdateGoogleChannelConfig(ctx context.Context, req *eventar httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGoogleChannelConfig") if err != nil { return err } @@ -3967,17 +3780,7 @@ func (c *restClient) GetMessageBus(ctx context.Context, req *eventarcpb.GetMessa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMessageBus") if err != nil { return err } @@ -4045,21 +3848,10 @@ func (c *restClient) ListMessageBuses(ctx context.Context, req *eventarcpb.ListM } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMessageBuses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4134,21 +3926,10 @@ func (c *restClient) ListMessageBusEnrollments(ctx context.Context, req *eventar } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMessageBusEnrollments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4221,21 +4002,10 @@ func (c *restClient) CreateMessageBus(ctx context.Context, req *eventarcpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMessageBus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4305,21 +4075,10 @@ func (c *restClient) UpdateMessageBus(ctx context.Context, req *eventarcpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMessageBus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4378,21 +4137,10 @@ func (c *restClient) DeleteMessageBus(ctx context.Context, req *eventarcpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMessageBus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4443,17 +4191,7 @@ func (c *restClient) GetEnrollment(ctx context.Context, req *eventarcpb.GetEnrol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnrollment") if err != nil { return err } @@ -4521,21 +4259,10 @@ func (c *restClient) ListEnrollments(ctx context.Context, req *eventarcpb.ListEn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnrollments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4608,21 +4335,10 @@ func (c *restClient) CreateEnrollment(ctx context.Context, req *eventarcpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnrollment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4692,21 +4408,10 @@ func (c *restClient) UpdateEnrollment(ctx context.Context, req *eventarcpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnrollment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4765,21 +4470,10 @@ func (c *restClient) DeleteEnrollment(ctx context.Context, req *eventarcpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnrollment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4830,17 +4524,7 @@ func (c *restClient) GetPipeline(ctx context.Context, req *eventarcpb.GetPipelin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPipeline") if err != nil { return err } @@ -4908,21 +4592,10 @@ func (c *restClient) ListPipelines(ctx context.Context, req *eventarcpb.ListPipe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPipelines") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4995,21 +4668,10 @@ func (c *restClient) CreatePipeline(ctx context.Context, req *eventarcpb.CreateP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5079,21 +4741,10 @@ func (c *restClient) UpdatePipeline(ctx context.Context, req *eventarcpb.UpdateP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePipeline") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5152,21 +4803,10 @@ func (c *restClient) DeletePipeline(ctx context.Context, req *eventarcpb.DeleteP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePipeline") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5217,17 +4857,7 @@ func (c *restClient) GetGoogleApiSource(ctx context.Context, req *eventarcpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGoogleApiSource") if err != nil { return err } @@ -5295,21 +4925,10 @@ func (c *restClient) ListGoogleApiSources(ctx context.Context, req *eventarcpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGoogleApiSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5382,21 +5001,10 @@ func (c *restClient) CreateGoogleApiSource(ctx context.Context, req *eventarcpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGoogleApiSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5466,21 +5074,10 @@ func (c *restClient) UpdateGoogleApiSource(ctx context.Context, req *eventarcpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGoogleApiSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5539,21 +5136,10 @@ func (c *restClient) DeleteGoogleApiSource(ctx context.Context, req *eventarcpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGoogleApiSource") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5604,17 +5190,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -5679,21 +5255,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5760,17 +5325,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -5830,17 +5385,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -5902,17 +5447,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5965,15 +5500,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -6007,15 +5535,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -6052,17 +5573,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -6127,21 +5638,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/eventarc/apiv1/eventarc_client_example_go123_test.go b/eventarc/apiv1/eventarc_client_example_go123_test.go index 5380e5aeac0b..4d0c6792d28f 100644 --- a/eventarc/apiv1/eventarc_client_example_go123_test.go +++ b/eventarc/apiv1/eventarc_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListChannelConnections_all() { } for resp, err := range c.ListChannelConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListChannels_all() { } for resp, err := range c.ListChannels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListEnrollments_all() { } for resp, err := range c.ListEnrollments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListGoogleApiSources_all() { } for resp, err := range c.ListGoogleApiSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListMessageBusEnrollments_all() { } for resp, err := range c.ListMessageBusEnrollments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListMessageBuses_all() { } for resp, err := range c.ListMessageBuses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListPipelines_all() { } for resp, err := range c.ListPipelines(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListProviders_all() { } for resp, err := range c.ListProviders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListTriggers_all() { } for resp, err := range c.ListTriggers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/eventarc/apiv1/eventarcpb/channel.pb.go b/eventarc/apiv1/eventarcpb/channel.pb.go index 67e8cc5c7d31..25b351f42dfb 100755 --- a/eventarc/apiv1/eventarcpb/channel.pb.go +++ b/eventarc/apiv1/eventarcpb/channel.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/channel.proto @@ -155,11 +155,9 @@ type Channel struct { func (x *Channel) Reset() { *x = Channel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_channel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_channel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Channel) String() string { @@ -170,7 +168,7 @@ func (*Channel) ProtoMessage() {} func (x *Channel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_channel_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,20 +380,6 @@ func file_google_cloud_eventarc_v1_channel_proto_init() { if File_google_cloud_eventarc_v1_channel_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_channel_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Channel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_eventarc_v1_channel_proto_msgTypes[0].OneofWrappers = []any{ (*Channel_PubsubTopic)(nil), } diff --git a/eventarc/apiv1/eventarcpb/channel_connection.pb.go b/eventarc/apiv1/eventarcpb/channel_connection.pb.go index 220c7845ceee..3aa31b247215 100755 --- a/eventarc/apiv1/eventarcpb/channel_connection.pb.go +++ b/eventarc/apiv1/eventarcpb/channel_connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/channel_connection.proto @@ -68,11 +68,9 @@ type ChannelConnection struct { func (x *ChannelConnection) Reset() { *x = ChannelConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_channel_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_channel_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelConnection) String() string { @@ -83,7 +81,7 @@ func (*ChannelConnection) ProtoMessage() {} func (x *ChannelConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_channel_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,20 +230,6 @@ func file_google_cloud_eventarc_v1_channel_connection_proto_init() { if File_google_cloud_eventarc_v1_channel_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_channel_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ChannelConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/discovery.pb.go b/eventarc/apiv1/eventarcpb/discovery.pb.go index e5848e695ded..7a594fe93163 100755 --- a/eventarc/apiv1/eventarcpb/discovery.pb.go +++ b/eventarc/apiv1/eventarcpb/discovery.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/discovery.proto @@ -54,11 +54,9 @@ type Provider struct { func (x *Provider) Reset() { *x = Provider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Provider) String() string { @@ -69,7 +67,7 @@ func (*Provider) ProtoMessage() {} func (x *Provider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type EventType struct { func (x *EventType) Reset() { *x = EventType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventType) String() string { @@ -146,7 +142,7 @@ func (*EventType) ProtoMessage() {} func (x *EventType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +206,9 @@ type FilteringAttribute struct { func (x *FilteringAttribute) Reset() { *x = FilteringAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FilteringAttribute) String() string { @@ -225,7 +219,7 @@ func (*FilteringAttribute) ProtoMessage() {} func (x *FilteringAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_discovery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,44 +359,6 @@ func file_google_cloud_eventarc_v1_discovery_proto_init() { if File_google_cloud_eventarc_v1_discovery_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_discovery_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Provider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_discovery_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EventType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_discovery_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FilteringAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/enrollment.pb.go b/eventarc/apiv1/eventarcpb/enrollment.pb.go index 6c95977ea225..9a76e7fd8e8b 100755 --- a/eventarc/apiv1/eventarcpb/enrollment.pb.go +++ b/eventarc/apiv1/eventarcpb/enrollment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/enrollment.proto @@ -81,11 +81,9 @@ type Enrollment struct { func (x *Enrollment) Reset() { *x = Enrollment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_enrollment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_enrollment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Enrollment) String() string { @@ -96,7 +94,7 @@ func (*Enrollment) ProtoMessage() {} func (x *Enrollment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_enrollment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,20 +303,6 @@ func file_google_cloud_eventarc_v1_enrollment_proto_init() { if File_google_cloud_eventarc_v1_enrollment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_enrollment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Enrollment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/eventarc.pb.go b/eventarc/apiv1/eventarcpb/eventarc.pb.go index b76ef35264e6..44428199d8fc 100755 --- a/eventarc/apiv1/eventarcpb/eventarc.pb.go +++ b/eventarc/apiv1/eventarcpb/eventarc.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/eventarc.proto @@ -55,11 +55,9 @@ type GetTriggerRequest struct { func (x *GetTriggerRequest) Reset() { *x = GetTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTriggerRequest) String() string { @@ -70,7 +68,7 @@ func (*GetTriggerRequest) ProtoMessage() {} func (x *GetTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type ListTriggersRequest struct { func (x *ListTriggersRequest) Reset() { *x = ListTriggersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTriggersRequest) String() string { @@ -138,7 +134,7 @@ func (*ListTriggersRequest) ProtoMessage() {} func (x *ListTriggersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +201,9 @@ type ListTriggersResponse struct { func (x *ListTriggersResponse) Reset() { *x = ListTriggersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTriggersResponse) String() string { @@ -220,7 +214,7 @@ func (*ListTriggersResponse) ProtoMessage() {} func (x *ListTriggersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +269,9 @@ type CreateTriggerRequest struct { func (x *CreateTriggerRequest) Reset() { *x = CreateTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTriggerRequest) String() string { @@ -290,7 +282,7 @@ func (*CreateTriggerRequest) ProtoMessage() {} func (x *CreateTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +347,9 @@ type UpdateTriggerRequest struct { func (x *UpdateTriggerRequest) Reset() { *x = UpdateTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTriggerRequest) String() string { @@ -370,7 +360,7 @@ func (*UpdateTriggerRequest) ProtoMessage() {} func (x *UpdateTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type DeleteTriggerRequest struct { func (x *DeleteTriggerRequest) Reset() { *x = DeleteTriggerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTriggerRequest) String() string { @@ -449,7 +437,7 @@ func (*DeleteTriggerRequest) ProtoMessage() {} func (x *DeleteTriggerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +492,9 @@ type GetChannelRequest struct { func (x *GetChannelRequest) Reset() { *x = GetChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelRequest) String() string { @@ -519,7 +505,7 @@ func (*GetChannelRequest) ProtoMessage() {} func (x *GetChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +554,9 @@ type ListChannelsRequest struct { func (x *ListChannelsRequest) Reset() { *x = ListChannelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelsRequest) String() string { @@ -583,7 +567,7 @@ func (*ListChannelsRequest) ProtoMessage() {} func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +627,9 @@ type ListChannelsResponse struct { func (x *ListChannelsResponse) Reset() { *x = ListChannelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelsResponse) String() string { @@ -658,7 +640,7 @@ func (*ListChannelsResponse) ProtoMessage() {} func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +695,9 @@ type CreateChannelRequest struct { func (x *CreateChannelRequest) Reset() { *x = CreateChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelRequest) String() string { @@ -728,7 +708,7 @@ func (*CreateChannelRequest) ProtoMessage() {} func (x *CreateChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +770,9 @@ type UpdateChannelRequest struct { func (x *UpdateChannelRequest) Reset() { *x = UpdateChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChannelRequest) String() string { @@ -805,7 +783,7 @@ func (*UpdateChannelRequest) ProtoMessage() {} func (x *UpdateChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +834,9 @@ type DeleteChannelRequest struct { func (x *DeleteChannelRequest) Reset() { *x = DeleteChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChannelRequest) String() string { @@ -871,7 +847,7 @@ func (*DeleteChannelRequest) ProtoMessage() {} func (x *DeleteChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,11 +888,9 @@ type GetProviderRequest struct { func (x *GetProviderRequest) Reset() { *x = GetProviderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProviderRequest) String() string { @@ -927,7 +901,7 @@ func (*GetProviderRequest) ProtoMessage() {} func (x *GetProviderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +950,9 @@ type ListProvidersRequest struct { func (x *ListProvidersRequest) Reset() { *x = ListProvidersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProvidersRequest) String() string { @@ -991,7 +963,7 @@ func (*ListProvidersRequest) ProtoMessage() {} func (x *ListProvidersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1058,11 +1030,9 @@ type ListProvidersResponse struct { func (x *ListProvidersResponse) Reset() { *x = ListProvidersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProvidersResponse) String() string { @@ -1073,7 +1043,7 @@ func (*ListProvidersResponse) ProtoMessage() {} func (x *ListProvidersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1091,9 @@ type GetChannelConnectionRequest struct { func (x *GetChannelConnectionRequest) Reset() { *x = GetChannelConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelConnectionRequest) String() string { @@ -1136,7 +1104,7 @@ func (*GetChannelConnectionRequest) ProtoMessage() {} func (x *GetChannelConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1148,9 @@ type ListChannelConnectionsRequest struct { func (x *ListChannelConnectionsRequest) Reset() { *x = ListChannelConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelConnectionsRequest) String() string { @@ -1195,7 +1161,7 @@ func (*ListChannelConnectionsRequest) ProtoMessage() {} func (x *ListChannelConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1216,9 @@ type ListChannelConnectionsResponse struct { func (x *ListChannelConnectionsResponse) Reset() { *x = ListChannelConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelConnectionsResponse) String() string { @@ -1265,7 +1229,7 @@ func (*ListChannelConnectionsResponse) ProtoMessage() {} func (x *ListChannelConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1281,9 @@ type CreateChannelConnectionRequest struct { func (x *CreateChannelConnectionRequest) Reset() { *x = CreateChannelConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelConnectionRequest) String() string { @@ -1332,7 +1294,7 @@ func (*CreateChannelConnectionRequest) ProtoMessage() {} func (x *CreateChannelConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1342,9 @@ type DeleteChannelConnectionRequest struct { func (x *DeleteChannelConnectionRequest) Reset() { *x = DeleteChannelConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChannelConnectionRequest) String() string { @@ -1395,7 +1355,7 @@ func (*DeleteChannelConnectionRequest) ProtoMessage() {} func (x *DeleteChannelConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1393,9 @@ type UpdateGoogleChannelConfigRequest struct { func (x *UpdateGoogleChannelConfigRequest) Reset() { *x = UpdateGoogleChannelConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGoogleChannelConfigRequest) String() string { @@ -1448,7 +1406,7 @@ func (*UpdateGoogleChannelConfigRequest) ProtoMessage() {} func (x *UpdateGoogleChannelConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,11 +1447,9 @@ type GetGoogleChannelConfigRequest struct { func (x *GetGoogleChannelConfigRequest) Reset() { *x = GetGoogleChannelConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGoogleChannelConfigRequest) String() string { @@ -1504,7 +1460,7 @@ func (*GetGoogleChannelConfigRequest) ProtoMessage() {} func (x *GetGoogleChannelConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1494,9 @@ type GetMessageBusRequest struct { func (x *GetMessageBusRequest) Reset() { *x = GetMessageBusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMessageBusRequest) String() string { @@ -1553,7 +1507,7 @@ func (*GetMessageBusRequest) ProtoMessage() {} func (x *GetMessageBusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1605,11 +1559,9 @@ type ListMessageBusesRequest struct { func (x *ListMessageBusesRequest) Reset() { *x = ListMessageBusesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessageBusesRequest) String() string { @@ -1620,7 +1572,7 @@ func (*ListMessageBusesRequest) ProtoMessage() {} func (x *ListMessageBusesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,11 +1639,9 @@ type ListMessageBusesResponse struct { func (x *ListMessageBusesResponse) Reset() { *x = ListMessageBusesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessageBusesResponse) String() string { @@ -1702,7 +1652,7 @@ func (*ListMessageBusesResponse) ProtoMessage() {} func (x *ListMessageBusesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1760,11 +1710,9 @@ type ListMessageBusEnrollmentsRequest struct { func (x *ListMessageBusEnrollmentsRequest) Reset() { *x = ListMessageBusEnrollmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessageBusEnrollmentsRequest) String() string { @@ -1775,7 +1723,7 @@ func (*ListMessageBusEnrollmentsRequest) ProtoMessage() {} func (x *ListMessageBusEnrollmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1828,11 +1776,9 @@ type ListMessageBusEnrollmentsResponse struct { func (x *ListMessageBusEnrollmentsResponse) Reset() { *x = ListMessageBusEnrollmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMessageBusEnrollmentsResponse) String() string { @@ -1843,7 +1789,7 @@ func (*ListMessageBusEnrollmentsResponse) ProtoMessage() {} func (x *ListMessageBusEnrollmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1845,9 @@ type CreateMessageBusRequest struct { func (x *CreateMessageBusRequest) Reset() { *x = CreateMessageBusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMessageBusRequest) String() string { @@ -1914,7 +1858,7 @@ func (*CreateMessageBusRequest) ProtoMessage() {} func (x *CreateMessageBusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,11 +1923,9 @@ type UpdateMessageBusRequest struct { func (x *UpdateMessageBusRequest) Reset() { *x = UpdateMessageBusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMessageBusRequest) String() string { @@ -1994,7 +1936,7 @@ func (*UpdateMessageBusRequest) ProtoMessage() {} func (x *UpdateMessageBusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,11 +2000,9 @@ type DeleteMessageBusRequest struct { func (x *DeleteMessageBusRequest) Reset() { *x = DeleteMessageBusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMessageBusRequest) String() string { @@ -2073,7 +2013,7 @@ func (*DeleteMessageBusRequest) ProtoMessage() {} func (x *DeleteMessageBusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2128,11 +2068,9 @@ type GetEnrollmentRequest struct { func (x *GetEnrollmentRequest) Reset() { *x = GetEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnrollmentRequest) String() string { @@ -2143,7 +2081,7 @@ func (*GetEnrollmentRequest) ProtoMessage() {} func (x *GetEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2195,11 +2133,9 @@ type ListEnrollmentsRequest struct { func (x *ListEnrollmentsRequest) Reset() { *x = ListEnrollmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnrollmentsRequest) String() string { @@ -2210,7 +2146,7 @@ func (*ListEnrollmentsRequest) ProtoMessage() {} func (x *ListEnrollmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2277,11 +2213,9 @@ type ListEnrollmentsResponse struct { func (x *ListEnrollmentsResponse) Reset() { *x = ListEnrollmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnrollmentsResponse) String() string { @@ -2292,7 +2226,7 @@ func (*ListEnrollmentsResponse) ProtoMessage() {} func (x *ListEnrollmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2348,11 +2282,9 @@ type CreateEnrollmentRequest struct { func (x *CreateEnrollmentRequest) Reset() { *x = CreateEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnrollmentRequest) String() string { @@ -2363,7 +2295,7 @@ func (*CreateEnrollmentRequest) ProtoMessage() {} func (x *CreateEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2428,11 +2360,9 @@ type UpdateEnrollmentRequest struct { func (x *UpdateEnrollmentRequest) Reset() { *x = UpdateEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnrollmentRequest) String() string { @@ -2443,7 +2373,7 @@ func (*UpdateEnrollmentRequest) ProtoMessage() {} func (x *UpdateEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2507,11 +2437,9 @@ type DeleteEnrollmentRequest struct { func (x *DeleteEnrollmentRequest) Reset() { *x = DeleteEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnrollmentRequest) String() string { @@ -2522,7 +2450,7 @@ func (*DeleteEnrollmentRequest) ProtoMessage() {} func (x *DeleteEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2577,11 +2505,9 @@ type GetPipelineRequest struct { func (x *GetPipelineRequest) Reset() { *x = GetPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineRequest) String() string { @@ -2592,7 +2518,7 @@ func (*GetPipelineRequest) ProtoMessage() {} func (x *GetPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2644,11 +2570,9 @@ type ListPipelinesRequest struct { func (x *ListPipelinesRequest) Reset() { *x = ListPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesRequest) String() string { @@ -2659,7 +2583,7 @@ func (*ListPipelinesRequest) ProtoMessage() {} func (x *ListPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2726,11 +2650,9 @@ type ListPipelinesResponse struct { func (x *ListPipelinesResponse) Reset() { *x = ListPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesResponse) String() string { @@ -2741,7 +2663,7 @@ func (*ListPipelinesResponse) ProtoMessage() {} func (x *ListPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2796,11 +2718,9 @@ type CreatePipelineRequest struct { func (x *CreatePipelineRequest) Reset() { *x = CreatePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineRequest) String() string { @@ -2811,7 +2731,7 @@ func (*CreatePipelineRequest) ProtoMessage() {} func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2876,11 +2796,9 @@ type UpdatePipelineRequest struct { func (x *UpdatePipelineRequest) Reset() { *x = UpdatePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePipelineRequest) String() string { @@ -2891,7 +2809,7 @@ func (*UpdatePipelineRequest) ProtoMessage() {} func (x *UpdatePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2955,11 +2873,9 @@ type DeletePipelineRequest struct { func (x *DeletePipelineRequest) Reset() { *x = DeletePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineRequest) String() string { @@ -2970,7 +2886,7 @@ func (*DeletePipelineRequest) ProtoMessage() {} func (x *DeletePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,11 +2941,9 @@ type GetGoogleApiSourceRequest struct { func (x *GetGoogleApiSourceRequest) Reset() { *x = GetGoogleApiSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGoogleApiSourceRequest) String() string { @@ -3040,7 +2954,7 @@ func (*GetGoogleApiSourceRequest) ProtoMessage() {} func (x *GetGoogleApiSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3092,11 +3006,9 @@ type ListGoogleApiSourcesRequest struct { func (x *ListGoogleApiSourcesRequest) Reset() { *x = ListGoogleApiSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGoogleApiSourcesRequest) String() string { @@ -3107,7 +3019,7 @@ func (*ListGoogleApiSourcesRequest) ProtoMessage() {} func (x *ListGoogleApiSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3174,11 +3086,9 @@ type ListGoogleApiSourcesResponse struct { func (x *ListGoogleApiSourcesResponse) Reset() { *x = ListGoogleApiSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGoogleApiSourcesResponse) String() string { @@ -3189,7 +3099,7 @@ func (*ListGoogleApiSourcesResponse) ProtoMessage() {} func (x *ListGoogleApiSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3245,11 +3155,9 @@ type CreateGoogleApiSourceRequest struct { func (x *CreateGoogleApiSourceRequest) Reset() { *x = CreateGoogleApiSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGoogleApiSourceRequest) String() string { @@ -3260,7 +3168,7 @@ func (*CreateGoogleApiSourceRequest) ProtoMessage() {} func (x *CreateGoogleApiSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3326,11 +3234,9 @@ type UpdateGoogleApiSourceRequest struct { func (x *UpdateGoogleApiSourceRequest) Reset() { *x = UpdateGoogleApiSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGoogleApiSourceRequest) String() string { @@ -3341,7 +3247,7 @@ func (*UpdateGoogleApiSourceRequest) ProtoMessage() {} func (x *UpdateGoogleApiSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3405,11 +3311,9 @@ type DeleteGoogleApiSourceRequest struct { func (x *DeleteGoogleApiSourceRequest) Reset() { *x = DeleteGoogleApiSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGoogleApiSourceRequest) String() string { @@ -3420,7 +3324,7 @@ func (*DeleteGoogleApiSourceRequest) ProtoMessage() {} func (x *DeleteGoogleApiSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3491,11 +3395,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3506,7 +3408,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4932,596 +4834,6 @@ func file_google_cloud_eventarc_v1_eventarc_proto_init() { file_google_cloud_eventarc_v1_message_bus_proto_init() file_google_cloud_eventarc_v1_pipeline_proto_init() file_google_cloud_eventarc_v1_trigger_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTriggersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTriggersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTriggerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetProviderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListProvidersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListProvidersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChannelConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGoogleChannelConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetGoogleChannelConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetMessageBusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListMessageBusesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListMessageBusesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListMessageBusEnrollmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListMessageBusEnrollmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateMessageBusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMessageBusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMessageBusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListEnrollmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListEnrollmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreatePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*DeletePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*GetGoogleApiSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListGoogleApiSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListGoogleApiSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CreateGoogleApiSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGoogleApiSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGoogleApiSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_eventarc_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/google_api_source.pb.go b/eventarc/apiv1/eventarcpb/google_api_source.pb.go index ea8948092687..15d07988c0d2 100755 --- a/eventarc/apiv1/eventarcpb/google_api_source.pb.go +++ b/eventarc/apiv1/eventarcpb/google_api_source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/google_api_source.proto @@ -81,11 +81,9 @@ type GoogleApiSource struct { func (x *GoogleApiSource) Reset() { *x = GoogleApiSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_google_api_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_google_api_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleApiSource) String() string { @@ -96,7 +94,7 @@ func (*GoogleApiSource) ProtoMessage() {} func (x *GoogleApiSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_google_api_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,20 +320,6 @@ func file_google_cloud_eventarc_v1_google_api_source_proto_init() { return } file_google_cloud_eventarc_v1_logging_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_google_api_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GoogleApiSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/google_channel_config.pb.go b/eventarc/apiv1/eventarcpb/google_channel_config.pb.go index 9b0a9bb76fe2..2dd72e6ba701 100755 --- a/eventarc/apiv1/eventarcpb/google_channel_config.pb.go +++ b/eventarc/apiv1/eventarcpb/google_channel_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/google_channel_config.proto @@ -62,11 +62,9 @@ type GoogleChannelConfig struct { func (x *GoogleChannelConfig) Reset() { *x = GoogleChannelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_google_channel_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_google_channel_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleChannelConfig) String() string { @@ -77,7 +75,7 @@ func (*GoogleChannelConfig) ProtoMessage() {} func (x *GoogleChannelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_google_channel_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,20 +200,6 @@ func file_google_cloud_eventarc_v1_google_channel_config_proto_init() { if File_google_cloud_eventarc_v1_google_channel_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_google_channel_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GoogleChannelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/logging_config.pb.go b/eventarc/apiv1/eventarcpb/logging_config.pb.go index 75438c875fec..7014938c559e 100755 --- a/eventarc/apiv1/eventarcpb/logging_config.pb.go +++ b/eventarc/apiv1/eventarcpb/logging_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/logging_config.proto @@ -139,11 +139,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_logging_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_logging_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -154,7 +152,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_logging_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,20 +247,6 @@ func file_google_cloud_eventarc_v1_logging_config_proto_init() { if File_google_cloud_eventarc_v1_logging_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_logging_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/message_bus.pb.go b/eventarc/apiv1/eventarcpb/message_bus.pb.go index ba400e3df582..57fe7c77bb15 100755 --- a/eventarc/apiv1/eventarcpb/message_bus.pb.go +++ b/eventarc/apiv1/eventarcpb/message_bus.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/message_bus.proto @@ -81,11 +81,9 @@ type MessageBus struct { func (x *MessageBus) Reset() { *x = MessageBus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_message_bus_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_message_bus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageBus) String() string { @@ -96,7 +94,7 @@ func (*MessageBus) ProtoMessage() {} func (x *MessageBus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_message_bus_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,20 +303,6 @@ func file_google_cloud_eventarc_v1_message_bus_proto_init() { return } file_google_cloud_eventarc_v1_logging_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_message_bus_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MessageBus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/network_config.pb.go b/eventarc/apiv1/eventarcpb/network_config.pb.go index 5d7c7589c7a2..a5e1211a9ac6 100755 --- a/eventarc/apiv1/eventarcpb/network_config.pb.go +++ b/eventarc/apiv1/eventarcpb/network_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/network_config.proto @@ -50,11 +50,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_network_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_network_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -65,7 +63,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_network_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,20 +148,6 @@ func file_google_cloud_eventarc_v1_network_config_proto_init() { if File_google_cloud_eventarc_v1_network_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_network_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/eventarc/apiv1/eventarcpb/pipeline.pb.go b/eventarc/apiv1/eventarcpb/pipeline.pb.go index 333133f6c259..53b4c0119967 100755 --- a/eventarc/apiv1/eventarcpb/pipeline.pb.go +++ b/eventarc/apiv1/eventarcpb/pipeline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/pipeline.proto @@ -103,11 +103,9 @@ type Pipeline struct { func (x *Pipeline) Reset() { *x = Pipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline) String() string { @@ -118,7 +116,7 @@ func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +250,9 @@ type Pipeline_MessagePayloadFormat struct { func (x *Pipeline_MessagePayloadFormat) Reset() { *x = Pipeline_MessagePayloadFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_MessagePayloadFormat) String() string { @@ -267,7 +263,7 @@ func (*Pipeline_MessagePayloadFormat) ProtoMessage() {} func (x *Pipeline_MessagePayloadFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +364,9 @@ type Pipeline_Destination struct { func (x *Pipeline_Destination) Reset() { *x = Pipeline_Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination) String() string { @@ -383,7 +377,7 @@ func (*Pipeline_Destination) ProtoMessage() {} func (x *Pipeline_Destination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +508,9 @@ type Pipeline_Mediation struct { func (x *Pipeline_Mediation) Reset() { *x = Pipeline_Mediation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Mediation) String() string { @@ -529,7 +521,7 @@ func (*Pipeline_Mediation) ProtoMessage() {} func (x *Pipeline_Mediation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +589,9 @@ type Pipeline_RetryPolicy struct { func (x *Pipeline_RetryPolicy) Reset() { *x = Pipeline_RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_RetryPolicy) String() string { @@ -612,7 +602,7 @@ func (*Pipeline_RetryPolicy) ProtoMessage() {} func (x *Pipeline_RetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +647,9 @@ type Pipeline_MessagePayloadFormat_JsonFormat struct { func (x *Pipeline_MessagePayloadFormat_JsonFormat) Reset() { *x = Pipeline_MessagePayloadFormat_JsonFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_MessagePayloadFormat_JsonFormat) String() string { @@ -672,7 +660,7 @@ func (*Pipeline_MessagePayloadFormat_JsonFormat) ProtoMessage() {} func (x *Pipeline_MessagePayloadFormat_JsonFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +687,9 @@ type Pipeline_MessagePayloadFormat_ProtobufFormat struct { func (x *Pipeline_MessagePayloadFormat_ProtobufFormat) Reset() { *x = Pipeline_MessagePayloadFormat_ProtobufFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_MessagePayloadFormat_ProtobufFormat) String() string { @@ -714,7 +700,7 @@ func (*Pipeline_MessagePayloadFormat_ProtobufFormat) ProtoMessage() {} func (x *Pipeline_MessagePayloadFormat_ProtobufFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +734,9 @@ type Pipeline_MessagePayloadFormat_AvroFormat struct { func (x *Pipeline_MessagePayloadFormat_AvroFormat) Reset() { *x = Pipeline_MessagePayloadFormat_AvroFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_MessagePayloadFormat_AvroFormat) String() string { @@ -763,7 +747,7 @@ func (*Pipeline_MessagePayloadFormat_AvroFormat) ProtoMessage() {} func (x *Pipeline_MessagePayloadFormat_AvroFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type Pipeline_Destination_NetworkConfig struct { func (x *Pipeline_Destination_NetworkConfig) Reset() { *x = Pipeline_Destination_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination_NetworkConfig) String() string { @@ -815,7 +797,7 @@ func (*Pipeline_Destination_NetworkConfig) ProtoMessage() {} func (x *Pipeline_Destination_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +1003,9 @@ type Pipeline_Destination_HttpEndpoint struct { func (x *Pipeline_Destination_HttpEndpoint) Reset() { *x = Pipeline_Destination_HttpEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination_HttpEndpoint) String() string { @@ -1036,7 +1016,7 @@ func (*Pipeline_Destination_HttpEndpoint) ProtoMessage() {} func (x *Pipeline_Destination_HttpEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1082,11 +1062,9 @@ type Pipeline_Destination_AuthenticationConfig struct { func (x *Pipeline_Destination_AuthenticationConfig) Reset() { *x = Pipeline_Destination_AuthenticationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination_AuthenticationConfig) String() string { @@ -1097,7 +1075,7 @@ func (*Pipeline_Destination_AuthenticationConfig) ProtoMessage() {} func (x *Pipeline_Destination_AuthenticationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1163,9 @@ type Pipeline_Destination_AuthenticationConfig_OidcToken struct { func (x *Pipeline_Destination_AuthenticationConfig_OidcToken) Reset() { *x = Pipeline_Destination_AuthenticationConfig_OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination_AuthenticationConfig_OidcToken) String() string { @@ -1200,7 +1176,7 @@ func (*Pipeline_Destination_AuthenticationConfig_OidcToken) ProtoMessage() {} func (x *Pipeline_Destination_AuthenticationConfig_OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1255,11 +1231,9 @@ type Pipeline_Destination_AuthenticationConfig_OAuthToken struct { func (x *Pipeline_Destination_AuthenticationConfig_OAuthToken) Reset() { *x = Pipeline_Destination_AuthenticationConfig_OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Destination_AuthenticationConfig_OAuthToken) String() string { @@ -1270,7 +1244,7 @@ func (*Pipeline_Destination_AuthenticationConfig_OAuthToken) ProtoMessage() {} func (x *Pipeline_Destination_AuthenticationConfig_OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1360,9 @@ type Pipeline_Mediation_Transformation struct { func (x *Pipeline_Mediation_Transformation) Reset() { *x = Pipeline_Mediation_Transformation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline_Mediation_Transformation) String() string { @@ -1401,7 +1373,7 @@ func (*Pipeline_Mediation_Transformation) ProtoMessage() {} func (x *Pipeline_Mediation_Transformation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,176 +1728,6 @@ func file_google_cloud_eventarc_v1_pipeline_proto_init() { return } file_google_cloud_eventarc_v1_logging_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_MessagePayloadFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Mediation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_MessagePayloadFormat_JsonFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_MessagePayloadFormat_ProtobufFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_MessagePayloadFormat_AvroFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination_HttpEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination_AuthenticationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination_AuthenticationConfig_OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Destination_AuthenticationConfig_OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline_Mediation_Transformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_eventarc_v1_pipeline_proto_msgTypes[1].OneofWrappers = []any{ (*Pipeline_MessagePayloadFormat_Protobuf)(nil), (*Pipeline_MessagePayloadFormat_Avro)(nil), diff --git a/eventarc/apiv1/eventarcpb/trigger.pb.go b/eventarc/apiv1/eventarcpb/trigger.pb.go index 4f1442515d91..8f54409240d5 100755 --- a/eventarc/apiv1/eventarcpb/trigger.pb.go +++ b/eventarc/apiv1/eventarcpb/trigger.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/v1/trigger.proto @@ -100,11 +100,9 @@ type Trigger struct { func (x *Trigger) Reset() { *x = Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger) String() string { @@ -115,7 +113,7 @@ func (*Trigger) ProtoMessage() {} func (x *Trigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +251,9 @@ type EventFilter struct { func (x *EventFilter) Reset() { *x = EventFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventFilter) String() string { @@ -268,7 +264,7 @@ func (*EventFilter) ProtoMessage() {} func (x *EventFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +314,9 @@ type StateCondition struct { func (x *StateCondition) Reset() { *x = StateCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StateCondition) String() string { @@ -333,7 +327,7 @@ func (*StateCondition) ProtoMessage() {} func (x *StateCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +378,9 @@ type Destination struct { func (x *Destination) Reset() { *x = Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Destination) String() string { @@ -399,7 +391,7 @@ func (*Destination) ProtoMessage() {} func (x *Destination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +520,9 @@ type Transport struct { func (x *Transport) Reset() { *x = Transport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transport) String() string { @@ -543,7 +533,7 @@ func (*Transport) ProtoMessage() {} func (x *Transport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +598,9 @@ type CloudRun struct { func (x *CloudRun) Reset() { *x = CloudRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRun) String() string { @@ -623,7 +611,7 @@ func (*CloudRun) ProtoMessage() {} func (x *CloudRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +675,9 @@ type GKE struct { func (x *GKE) Reset() { *x = GKE{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GKE) String() string { @@ -702,7 +688,7 @@ func (*GKE) ProtoMessage() {} func (x *GKE) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -774,11 +760,9 @@ type Pubsub struct { func (x *Pubsub) Reset() { *x = Pubsub{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pubsub) String() string { @@ -789,7 +773,7 @@ func (*Pubsub) ProtoMessage() {} func (x *Pubsub) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +821,9 @@ type HttpEndpoint struct { func (x *HttpEndpoint) Reset() { *x = HttpEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpEndpoint) String() string { @@ -852,7 +834,7 @@ func (*HttpEndpoint) ProtoMessage() {} func (x *HttpEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_v1_trigger_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1129,116 +1111,6 @@ func file_google_cloud_eventarc_v1_trigger_proto_init() { return } file_google_cloud_eventarc_v1_network_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EventFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StateCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Transport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CloudRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GKE); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Pubsub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_v1_trigger_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*HttpEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_eventarc_v1_trigger_proto_msgTypes[3].OneofWrappers = []any{ (*Destination_CloudRun)(nil), (*Destination_CloudFunction)(nil), diff --git a/eventarc/apiv1/helpers.go b/eventarc/apiv1/helpers.go index 0fafc5187769..9ac5896dd0e1 100755 --- a/eventarc/apiv1/helpers.go +++ b/eventarc/apiv1/helpers.go @@ -18,10 +18,20 @@ package eventarc import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "eventarc.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/eventarc/publishing/apiv1/helpers.go b/eventarc/publishing/apiv1/helpers.go index 539c31ec0474..f9a7e34fa804 100755 --- a/eventarc/publishing/apiv1/helpers.go +++ b/eventarc/publishing/apiv1/helpers.go @@ -18,10 +18,20 @@ package publishing import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "eventarcpublishing.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/eventarc/publishing/apiv1/publisher_client.go b/eventarc/publishing/apiv1/publisher_client.go index dac85e0604fe..95e849341c89 100755 --- a/eventarc/publishing/apiv1/publisher_client.go +++ b/eventarc/publishing/apiv1/publisher_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( publishingpb "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -183,6 +182,8 @@ type publisherGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPublisherClient creates a new publisher client based on gRPC. @@ -232,6 +233,7 @@ func NewPublisherClient(ctx context.Context, opts ...option.ClientOption) (*Publ connPool: connPool, publisherClient: publishingpb.NewPublisherClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -278,6 +280,8 @@ type publisherRESTClient struct { // Points back to the CallOptions field of the containing PublisherClient CallOptions **PublisherCallOptions + + logger *slog.Logger } // NewPublisherRESTClient creates a new publisher rest client. @@ -318,6 +322,7 @@ func NewPublisherRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -370,7 +375,7 @@ func (c *publisherGRPCClient) PublishChannelConnectionEvents(ctx context.Context var resp *publishingpb.PublishChannelConnectionEventsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.PublishChannelConnectionEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.PublishChannelConnectionEvents, req, settings.GRPC, c.logger, "PublishChannelConnectionEvents") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *publisherGRPCClient) PublishEvents(ctx context.Context, req *publishing var resp *publishingpb.PublishEventsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.PublishEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.PublishEvents, req, settings.GRPC, c.logger, "PublishEvents") return err }, opts...) if err != nil { @@ -406,7 +411,7 @@ func (c *publisherGRPCClient) Publish(ctx context.Context, req *publishingpb.Pub var resp *publishingpb.PublishResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.Publish(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.Publish, req, settings.GRPC, c.logger, "Publish") return err }, opts...) if err != nil { @@ -454,17 +459,7 @@ func (c *publisherRESTClient) PublishChannelConnectionEvents(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PublishChannelConnectionEvents") if err != nil { return err } @@ -520,17 +515,7 @@ func (c *publisherRESTClient) PublishEvents(ctx context.Context, req *publishing httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PublishEvents") if err != nil { return err } @@ -586,17 +571,7 @@ func (c *publisherRESTClient) Publish(ctx context.Context, req *publishingpb.Pub httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Publish") if err != nil { return err } diff --git a/eventarc/publishing/apiv1/publishingpb/cloud_event.pb.go b/eventarc/publishing/apiv1/publishingpb/cloud_event.pb.go index a0b48995019f..90a1b3481a9b 100755 --- a/eventarc/publishing/apiv1/publishingpb/cloud_event.pb.go +++ b/eventarc/publishing/apiv1/publishingpb/cloud_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/publishing/v1/cloud_event.proto @@ -74,11 +74,9 @@ type CloudEvent struct { func (x *CloudEvent) Reset() { *x = CloudEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudEvent) String() string { @@ -89,7 +87,7 @@ func (*CloudEvent) ProtoMessage() {} func (x *CloudEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +212,9 @@ type CloudEvent_CloudEventAttributeValue struct { func (x *CloudEvent_CloudEventAttributeValue) Reset() { *x = CloudEvent_CloudEventAttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudEvent_CloudEventAttributeValue) String() string { @@ -229,7 +225,7 @@ func (*CloudEvent_CloudEventAttributeValue) ProtoMessage() {} func (x *CloudEvent_CloudEventAttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,32 +470,6 @@ func file_google_cloud_eventarc_publishing_v1_cloud_event_proto_init() { if File_google_cloud_eventarc_publishing_v1_cloud_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudEvent_CloudEventAttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_eventarc_publishing_v1_cloud_event_proto_msgTypes[0].OneofWrappers = []any{ (*CloudEvent_BinaryData)(nil), (*CloudEvent_TextData)(nil), diff --git a/eventarc/publishing/apiv1/publishingpb/publisher.pb.go b/eventarc/publishing/apiv1/publishingpb/publisher.pb.go index 66a84ab69e46..3834a6df9e0e 100755 --- a/eventarc/publishing/apiv1/publishingpb/publisher.pb.go +++ b/eventarc/publishing/apiv1/publishingpb/publisher.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/eventarc/publishing/v1/publisher.proto @@ -63,11 +63,9 @@ type PublishChannelConnectionEventsRequest struct { func (x *PublishChannelConnectionEventsRequest) Reset() { *x = PublishChannelConnectionEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishChannelConnectionEventsRequest) String() string { @@ -78,7 +76,7 @@ func (*PublishChannelConnectionEventsRequest) ProtoMessage() {} func (x *PublishChannelConnectionEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type PublishChannelConnectionEventsResponse struct { func (x *PublishChannelConnectionEventsResponse) Reset() { *x = PublishChannelConnectionEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishChannelConnectionEventsResponse) String() string { @@ -138,7 +134,7 @@ func (*PublishChannelConnectionEventsResponse) ProtoMessage() {} func (x *PublishChannelConnectionEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type PublishEventsRequest struct { func (x *PublishEventsRequest) Reset() { *x = PublishEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishEventsRequest) String() string { @@ -190,7 +184,7 @@ func (*PublishEventsRequest) ProtoMessage() {} func (x *PublishEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +229,9 @@ type PublishEventsResponse struct { func (x *PublishEventsResponse) Reset() { *x = PublishEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishEventsResponse) String() string { @@ -250,7 +242,7 @@ func (*PublishEventsResponse) ProtoMessage() {} func (x *PublishEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +276,9 @@ type PublishRequest struct { func (x *PublishRequest) Reset() { *x = PublishRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishRequest) String() string { @@ -299,7 +289,7 @@ func (*PublishRequest) ProtoMessage() {} func (x *PublishRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +379,9 @@ type PublishResponse struct { func (x *PublishResponse) Reset() { *x = PublishResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishResponse) String() string { @@ -404,7 +392,7 @@ func (*PublishResponse) ProtoMessage() {} func (x *PublishResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,80 +580,6 @@ func file_google_cloud_eventarc_publishing_v1_publisher_proto_init() { return } file_google_cloud_eventarc_publishing_v1_cloud_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PublishChannelConnectionEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PublishChannelConnectionEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PublishEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PublishEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PublishRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PublishResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_eventarc_publishing_v1_publisher_proto_msgTypes[4].OneofWrappers = []any{ (*PublishRequest_ProtoMessage_)(nil), (*PublishRequest_JsonMessage)(nil), diff --git a/filestore/apiv1/cloud_filestore_manager_client.go b/filestore/apiv1/cloud_filestore_manager_client.go index 07b5bf946bab..33fceaa00dea 100755 --- a/filestore/apiv1/cloud_filestore_manager_client.go +++ b/filestore/apiv1/cloud_filestore_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -576,6 +575,8 @@ type cloudFilestoreManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudFilestoreManagerClient creates a new cloud filestore manager client based on gRPC. @@ -626,6 +627,7 @@ func NewCloudFilestoreManagerClient(ctx context.Context, opts ...option.ClientOp connPool: connPool, cloudFilestoreManagerClient: filestorepb.NewCloudFilestoreManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -690,6 +692,8 @@ type cloudFilestoreManagerRESTClient struct { // Points back to the CallOptions field of the containing CloudFilestoreManagerClient CallOptions **CloudFilestoreManagerCallOptions + + logger *slog.Logger } // NewCloudFilestoreManagerRESTClient creates a new cloud filestore manager rest client. @@ -731,6 +735,7 @@ func NewCloudFilestoreManagerRESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -804,7 +809,7 @@ func (c *cloudFilestoreManagerGRPCClient) ListInstances(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *cloudFilestoreManagerGRPCClient) GetInstance(ctx context.Context, req * var resp *filestorepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -857,7 +862,7 @@ func (c *cloudFilestoreManagerGRPCClient) CreateInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *cloudFilestoreManagerGRPCClient) UpdateInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -897,7 +902,7 @@ func (c *cloudFilestoreManagerGRPCClient) RestoreInstance(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.RestoreInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.RestoreInstance, req, settings.GRPC, c.logger, "RestoreInstance") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *cloudFilestoreManagerGRPCClient) RevertInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.RevertInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.RevertInstance, req, settings.GRPC, c.logger, "RevertInstance") return err }, opts...) if err != nil { @@ -937,7 +942,7 @@ func (c *cloudFilestoreManagerGRPCClient) DeleteInstance(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *cloudFilestoreManagerGRPCClient) ListSnapshots(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.ListSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.ListSnapshots, req, settings.GRPC, c.logger, "ListSnapshots") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *cloudFilestoreManagerGRPCClient) GetSnapshot(ctx context.Context, req * var resp *filestorepb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.GetSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.GetSnapshot, req, settings.GRPC, c.logger, "GetSnapshot") return err }, opts...) if err != nil { @@ -1021,7 +1026,7 @@ func (c *cloudFilestoreManagerGRPCClient) CreateSnapshot(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.CreateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.CreateSnapshot, req, settings.GRPC, c.logger, "CreateSnapshot") return err }, opts...) if err != nil { @@ -1041,7 +1046,7 @@ func (c *cloudFilestoreManagerGRPCClient) DeleteSnapshot(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.DeleteSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.DeleteSnapshot, req, settings.GRPC, c.logger, "DeleteSnapshot") return err }, opts...) if err != nil { @@ -1061,7 +1066,7 @@ func (c *cloudFilestoreManagerGRPCClient) UpdateSnapshot(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.UpdateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.UpdateSnapshot, req, settings.GRPC, c.logger, "UpdateSnapshot") return err }, opts...) if err != nil { @@ -1092,7 +1097,7 @@ func (c *cloudFilestoreManagerGRPCClient) ListBackups(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1127,7 +1132,7 @@ func (c *cloudFilestoreManagerGRPCClient) GetBackup(ctx context.Context, req *fi var resp *filestorepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1145,7 +1150,7 @@ func (c *cloudFilestoreManagerGRPCClient) CreateBackup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *cloudFilestoreManagerGRPCClient) DeleteBackup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1185,7 +1190,7 @@ func (c *cloudFilestoreManagerGRPCClient) UpdateBackup(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFilestoreManagerClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFilestoreManagerClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1205,7 +1210,7 @@ func (c *cloudFilestoreManagerGRPCClient) GetLocation(ctx context.Context, req * var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *cloudFilestoreManagerGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1268,7 +1273,7 @@ func (c *cloudFilestoreManagerGRPCClient) CancelOperation(ctx context.Context, r opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1282,7 +1287,7 @@ func (c *cloudFilestoreManagerGRPCClient) DeleteOperation(ctx context.Context, r opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1297,7 +1302,7 @@ func (c *cloudFilestoreManagerGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1326,7 +1331,7 @@ func (c *cloudFilestoreManagerGRPCClient) ListOperations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1404,21 +1409,10 @@ func (c *cloudFilestoreManagerRESTClient) ListInstances(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1481,17 +1475,7 @@ func (c *cloudFilestoreManagerRESTClient) GetInstance(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1551,21 +1535,10 @@ func (c *cloudFilestoreManagerRESTClient) CreateInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1629,21 +1602,10 @@ func (c *cloudFilestoreManagerRESTClient) UpdateInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1703,21 +1665,10 @@ func (c *cloudFilestoreManagerRESTClient) RestoreInstance(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1773,21 +1724,10 @@ func (c *cloudFilestoreManagerRESTClient) RevertInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevertInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1840,21 +1780,10 @@ func (c *cloudFilestoreManagerRESTClient) DeleteInstance(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1924,21 +1853,10 @@ func (c *cloudFilestoreManagerRESTClient) ListSnapshots(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSnapshots") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2001,17 +1919,7 @@ func (c *cloudFilestoreManagerRESTClient) GetSnapshot(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSnapshot") if err != nil { return err } @@ -2068,21 +1976,10 @@ func (c *cloudFilestoreManagerRESTClient) CreateSnapshot(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSnapshot") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2132,21 +2029,10 @@ func (c *cloudFilestoreManagerRESTClient) DeleteSnapshot(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSnapshot") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2210,21 +2096,10 @@ func (c *cloudFilestoreManagerRESTClient) UpdateSnapshot(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSnapshot") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2294,21 +2169,10 @@ func (c *cloudFilestoreManagerRESTClient) ListBackups(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2371,17 +2235,7 @@ func (c *cloudFilestoreManagerRESTClient) GetBackup(ctx context.Context, req *fi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2438,21 +2292,10 @@ func (c *cloudFilestoreManagerRESTClient) CreateBackup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2502,21 +2345,10 @@ func (c *cloudFilestoreManagerRESTClient) DeleteBackup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2580,21 +2412,10 @@ func (c *cloudFilestoreManagerRESTClient) UpdateBackup(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2645,17 +2466,7 @@ func (c *cloudFilestoreManagerRESTClient) GetLocation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2720,21 +2531,10 @@ func (c *cloudFilestoreManagerRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2800,15 +2600,8 @@ func (c *cloudFilestoreManagerRESTClient) CancelOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2842,15 +2635,8 @@ func (c *cloudFilestoreManagerRESTClient) DeleteOperation(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2887,17 +2673,7 @@ func (c *cloudFilestoreManagerRESTClient) GetOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2962,21 +2738,10 @@ func (c *cloudFilestoreManagerRESTClient) ListOperations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/filestore/apiv1/cloud_filestore_manager_client_example_go123_test.go b/filestore/apiv1/cloud_filestore_manager_client_example_go123_test.go index f11b06ceeacb..11770fc8d0fb 100644 --- a/filestore/apiv1/cloud_filestore_manager_client_example_go123_test.go +++ b/filestore/apiv1/cloud_filestore_manager_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudFilestoreManagerClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudFilestoreManagerClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudFilestoreManagerClient_ListSnapshots_all() { } for resp, err := range c.ListSnapshots(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleCloudFilestoreManagerClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleCloudFilestoreManagerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/filestore/apiv1/filestorepb/cloud_filestore_service.pb.go b/filestore/apiv1/filestorepb/cloud_filestore_service.pb.go index aa1e8e030400..34c1ad793ae6 100755 --- a/filestore/apiv1/filestorepb/cloud_filestore_service.pb.go +++ b/filestore/apiv1/filestorepb/cloud_filestore_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/filestore/v1/cloud_filestore_service.proto @@ -648,11 +648,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -663,7 +661,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +739,9 @@ type FileShareConfig struct { func (x *FileShareConfig) Reset() { *x = FileShareConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileShareConfig) String() string { @@ -756,7 +752,7 @@ func (*FileShareConfig) ProtoMessage() {} func (x *FileShareConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +852,9 @@ type NfsExportOptions struct { func (x *NfsExportOptions) Reset() { *x = NfsExportOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsExportOptions) String() string { @@ -871,7 +865,7 @@ func (*NfsExportOptions) ProtoMessage() {} func (x *NfsExportOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +958,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -979,7 +971,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1103,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1126,7 +1116,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1175,11 +1165,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1190,7 +1178,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1220,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1247,7 +1233,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1283,9 @@ type RestoreInstanceRequest struct { func (x *RestoreInstanceRequest) Reset() { *x = RestoreInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreInstanceRequest) String() string { @@ -1312,7 +1296,7 @@ func (*RestoreInstanceRequest) ProtoMessage() {} func (x *RestoreInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1370,9 @@ type RevertInstanceRequest struct { func (x *RevertInstanceRequest) Reset() { *x = RevertInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevertInstanceRequest) String() string { @@ -1401,7 +1383,7 @@ func (*RevertInstanceRequest) ProtoMessage() {} func (x *RevertInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,11 +1428,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1461,7 +1441,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1496,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1531,7 +1509,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1603,11 +1581,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1618,7 +1594,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1655,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -1694,7 +1668,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1772,11 +1746,9 @@ type CreateSnapshotRequest struct { func (x *CreateSnapshotRequest) Reset() { *x = CreateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnapshotRequest) String() string { @@ -1787,7 +1759,7 @@ func (*CreateSnapshotRequest) ProtoMessage() {} func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1836,11 +1808,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -1851,7 +1821,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1886,11 +1856,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -1901,7 +1869,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1938,11 +1906,9 @@ type UpdateSnapshotRequest struct { func (x *UpdateSnapshotRequest) Reset() { *x = UpdateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSnapshotRequest) String() string { @@ -1953,7 +1919,7 @@ func (*UpdateSnapshotRequest) ProtoMessage() {} func (x *UpdateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2005,11 +1971,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -2020,7 +1984,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2085,11 +2049,9 @@ type ListSnapshotsResponse struct { func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { @@ -2100,7 +2062,7 @@ func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2176,11 +2138,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -2191,7 +2151,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2288,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -2343,7 +2301,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2392,11 +2350,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -2407,7 +2363,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2444,11 +2400,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -2459,7 +2413,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2501,11 +2455,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -2516,7 +2468,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2564,11 +2516,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -2579,7 +2529,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2652,11 +2602,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -2667,7 +2615,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3558,320 +3506,6 @@ func file_google_cloud_filestore_v1_cloud_filestore_service_proto_init() { if File_google_cloud_filestore_v1_cloud_filestore_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FileShareConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NfsExportOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RestoreInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RevertInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_filestore_v1_cloud_filestore_service_proto_msgTypes[1].OneofWrappers = []any{ (*FileShareConfig_SourceBackup)(nil), } diff --git a/filestore/apiv1/helpers.go b/filestore/apiv1/helpers.go index b3dafaeb7aec..f1ac66a79826 100755 --- a/filestore/apiv1/helpers.go +++ b/filestore/apiv1/helpers.go @@ -18,10 +18,20 @@ package filestore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "file.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/firestore/apiv1/admin/adminpb/backup.pb.go b/firestore/apiv1/admin/adminpb/backup.pb.go index 7005aa87f26c..57c0a9417e50 100755 --- a/firestore/apiv1/admin/adminpb/backup.pb.go +++ b/firestore/apiv1/admin/adminpb/backup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/backup.proto @@ -131,11 +131,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -146,7 +144,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +225,9 @@ type Backup_Stats struct { func (x *Backup_Stats) Reset() { *x = Backup_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_Stats) String() string { @@ -242,7 +238,7 @@ func (*Backup_Stats) ProtoMessage() {} func (x *Backup_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_backup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,32 +386,6 @@ func file_google_firestore_admin_v1_backup_proto_init() { if File_google_firestore_admin_v1_backup_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_backup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_backup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Backup_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/admin/adminpb/database.pb.go b/firestore/apiv1/admin/adminpb/database.pb.go index 0e0f451ac975..f54e329effc0 100755 --- a/firestore/apiv1/admin/adminpb/database.pb.go +++ b/firestore/apiv1/admin/adminpb/database.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/database.proto @@ -413,11 +413,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -428,7 +426,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +598,9 @@ type Database_CmekConfig struct { func (x *Database_CmekConfig) Reset() { *x = Database_CmekConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_CmekConfig) String() string { @@ -615,7 +611,7 @@ func (*Database_CmekConfig) ProtoMessage() {} func (x *Database_CmekConfig) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +660,9 @@ type Database_SourceInfo struct { func (x *Database_SourceInfo) Reset() { *x = Database_SourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_SourceInfo) String() string { @@ -679,7 +673,7 @@ func (*Database_SourceInfo) ProtoMessage() {} func (x *Database_SourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +742,9 @@ type Database_EncryptionConfig struct { func (x *Database_EncryptionConfig) Reset() { *x = Database_EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_EncryptionConfig) String() string { @@ -763,7 +755,7 @@ func (*Database_EncryptionConfig) ProtoMessage() {} func (x *Database_EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +839,9 @@ type Database_SourceInfo_BackupSource struct { func (x *Database_SourceInfo_BackupSource) Reset() { *x = Database_SourceInfo_BackupSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_SourceInfo_BackupSource) String() string { @@ -862,7 +852,7 @@ func (*Database_SourceInfo_BackupSource) ProtoMessage() {} func (x *Database_SourceInfo_BackupSource) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +883,9 @@ type Database_EncryptionConfig_GoogleDefaultEncryptionOptions struct { func (x *Database_EncryptionConfig_GoogleDefaultEncryptionOptions) Reset() { *x = Database_EncryptionConfig_GoogleDefaultEncryptionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_EncryptionConfig_GoogleDefaultEncryptionOptions) String() string { @@ -908,7 +896,7 @@ func (*Database_EncryptionConfig_GoogleDefaultEncryptionOptions) ProtoMessage() func (x *Database_EncryptionConfig_GoogleDefaultEncryptionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +921,9 @@ type Database_EncryptionConfig_SourceEncryptionOptions struct { func (x *Database_EncryptionConfig_SourceEncryptionOptions) Reset() { *x = Database_EncryptionConfig_SourceEncryptionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_EncryptionConfig_SourceEncryptionOptions) String() string { @@ -948,7 +934,7 @@ func (*Database_EncryptionConfig_SourceEncryptionOptions) ProtoMessage() {} func (x *Database_EncryptionConfig_SourceEncryptionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,11 +971,9 @@ type Database_EncryptionConfig_CustomerManagedEncryptionOptions struct { func (x *Database_EncryptionConfig_CustomerManagedEncryptionOptions) Reset() { *x = Database_EncryptionConfig_CustomerManagedEncryptionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_database_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_database_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database_EncryptionConfig_CustomerManagedEncryptionOptions) String() string { @@ -1000,7 +984,7 @@ func (*Database_EncryptionConfig_CustomerManagedEncryptionOptions) ProtoMessage( func (x *Database_EncryptionConfig_CustomerManagedEncryptionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_database_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,104 +1288,6 @@ func file_google_firestore_admin_v1_database_proto_init() { if File_google_firestore_admin_v1_database_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_database_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Database_CmekConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Database_SourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Database_EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Database_SourceInfo_BackupSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Database_EncryptionConfig_GoogleDefaultEncryptionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Database_EncryptionConfig_SourceEncryptionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_database_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Database_EncryptionConfig_CustomerManagedEncryptionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_admin_v1_database_proto_msgTypes[2].OneofWrappers = []any{ (*Database_SourceInfo_Backup)(nil), } diff --git a/firestore/apiv1/admin/adminpb/field.pb.go b/firestore/apiv1/admin/adminpb/field.pb.go index bde99abbcfff..34cd51f9f48d 100755 --- a/firestore/apiv1/admin/adminpb/field.pb.go +++ b/firestore/apiv1/admin/adminpb/field.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/field.proto @@ -147,11 +147,9 @@ type Field struct { func (x *Field) Reset() { *x = Field{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_field_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_field_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Field) String() string { @@ -162,7 +160,7 @@ func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_field_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +223,9 @@ type Field_IndexConfig struct { func (x *Field_IndexConfig) Reset() { *x = Field_IndexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_field_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_field_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Field_IndexConfig) String() string { @@ -240,7 +236,7 @@ func (*Field_IndexConfig) ProtoMessage() {} func (x *Field_IndexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_field_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +298,9 @@ type Field_TtlConfig struct { func (x *Field_TtlConfig) Reset() { *x = Field_TtlConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_field_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_field_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Field_TtlConfig) String() string { @@ -317,7 +311,7 @@ func (*Field_TtlConfig) ProtoMessage() {} func (x *Field_TtlConfig) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_field_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,44 +444,6 @@ func file_google_firestore_admin_v1_field_proto_init() { return } file_google_firestore_admin_v1_index_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_field_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_field_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Field_IndexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_field_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Field_TtlConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/admin/adminpb/firestore_admin.pb.go b/firestore/apiv1/admin/adminpb/firestore_admin.pb.go index e86331a8b39c..b7293ad3ba85 100755 --- a/firestore/apiv1/admin/adminpb/firestore_admin.pb.go +++ b/firestore/apiv1/admin/adminpb/firestore_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/firestore_admin.proto @@ -59,11 +59,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -74,7 +72,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type CreateDatabaseRequest struct { func (x *CreateDatabaseRequest) Reset() { *x = CreateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseRequest) String() string { @@ -143,7 +139,7 @@ func (*CreateDatabaseRequest) ProtoMessage() {} func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +184,9 @@ type CreateDatabaseMetadata struct { func (x *CreateDatabaseMetadata) Reset() { *x = CreateDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseMetadata) String() string { @@ -203,7 +197,7 @@ func (*CreateDatabaseMetadata) ProtoMessage() {} func (x *CreateDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +234,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -255,7 +247,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type GetDatabaseRequest struct { func (x *GetDatabaseRequest) Reset() { *x = GetDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseRequest) String() string { @@ -313,7 +303,7 @@ func (*GetDatabaseRequest) ProtoMessage() {} func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +340,9 @@ type UpdateDatabaseRequest struct { func (x *UpdateDatabaseRequest) Reset() { *x = UpdateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseRequest) String() string { @@ -365,7 +353,7 @@ func (*UpdateDatabaseRequest) ProtoMessage() {} func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +391,9 @@ type UpdateDatabaseMetadata struct { func (x *UpdateDatabaseMetadata) Reset() { *x = UpdateDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseMetadata) String() string { @@ -418,7 +404,7 @@ func (*UpdateDatabaseMetadata) ProtoMessage() {} func (x *UpdateDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +437,9 @@ type DeleteDatabaseRequest struct { func (x *DeleteDatabaseRequest) Reset() { *x = DeleteDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatabaseRequest) String() string { @@ -466,7 +450,7 @@ func (*DeleteDatabaseRequest) ProtoMessage() {} func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +488,9 @@ type DeleteDatabaseMetadata struct { func (x *DeleteDatabaseMetadata) Reset() { *x = DeleteDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatabaseMetadata) String() string { @@ -519,7 +501,7 @@ func (*DeleteDatabaseMetadata) ProtoMessage() {} func (x *DeleteDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +533,9 @@ type CreateBackupScheduleRequest struct { func (x *CreateBackupScheduleRequest) Reset() { *x = CreateBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupScheduleRequest) String() string { @@ -566,7 +546,7 @@ func (*CreateBackupScheduleRequest) ProtoMessage() {} func (x *CreateBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,11 +591,9 @@ type GetBackupScheduleRequest struct { func (x *GetBackupScheduleRequest) Reset() { *x = GetBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupScheduleRequest) String() string { @@ -626,7 +604,7 @@ func (*GetBackupScheduleRequest) ProtoMessage() {} func (x *GetBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +641,9 @@ type UpdateBackupScheduleRequest struct { func (x *UpdateBackupScheduleRequest) Reset() { *x = UpdateBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupScheduleRequest) String() string { @@ -678,7 +654,7 @@ func (*UpdateBackupScheduleRequest) ProtoMessage() {} func (x *UpdateBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +698,9 @@ type ListBackupSchedulesRequest struct { func (x *ListBackupSchedulesRequest) Reset() { *x = ListBackupSchedulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupSchedulesRequest) String() string { @@ -737,7 +711,7 @@ func (*ListBackupSchedulesRequest) ProtoMessage() {} func (x *ListBackupSchedulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +746,9 @@ type ListBackupSchedulesResponse struct { func (x *ListBackupSchedulesResponse) Reset() { *x = ListBackupSchedulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupSchedulesResponse) String() string { @@ -787,7 +759,7 @@ func (*ListBackupSchedulesResponse) ProtoMessage() {} func (x *ListBackupSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +796,9 @@ type DeleteBackupScheduleRequest struct { func (x *DeleteBackupScheduleRequest) Reset() { *x = DeleteBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupScheduleRequest) String() string { @@ -839,7 +809,7 @@ func (*DeleteBackupScheduleRequest) ProtoMessage() {} func (x *DeleteBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,11 +847,9 @@ type CreateIndexRequest struct { func (x *CreateIndexRequest) Reset() { *x = CreateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexRequest) String() string { @@ -892,7 +860,7 @@ func (*CreateIndexRequest) ProtoMessage() {} func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +911,9 @@ type ListIndexesRequest struct { func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesRequest) String() string { @@ -958,7 +924,7 @@ func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +983,9 @@ type ListIndexesResponse struct { func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesResponse) String() string { @@ -1032,7 +996,7 @@ func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1039,9 @@ type GetIndexRequest struct { func (x *GetIndexRequest) Reset() { *x = GetIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexRequest) String() string { @@ -1090,7 +1052,7 @@ func (*GetIndexRequest) ProtoMessage() {} func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1088,9 @@ type DeleteIndexRequest struct { func (x *DeleteIndexRequest) Reset() { *x = DeleteIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexRequest) String() string { @@ -1141,7 +1101,7 @@ func (*DeleteIndexRequest) ProtoMessage() {} func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1139,9 @@ type UpdateFieldRequest struct { func (x *UpdateFieldRequest) Reset() { *x = UpdateFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFieldRequest) String() string { @@ -1194,7 +1152,7 @@ func (*UpdateFieldRequest) ProtoMessage() {} func (x *UpdateFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1237,11 +1195,9 @@ type GetFieldRequest struct { func (x *GetFieldRequest) Reset() { *x = GetFieldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFieldRequest) String() string { @@ -1252,7 +1208,7 @@ func (*GetFieldRequest) ProtoMessage() {} func (x *GetFieldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1302,11 +1258,9 @@ type ListFieldsRequest struct { func (x *ListFieldsRequest) Reset() { *x = ListFieldsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFieldsRequest) String() string { @@ -1317,7 +1271,7 @@ func (*ListFieldsRequest) ProtoMessage() {} func (x *ListFieldsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1330,9 @@ type ListFieldsResponse struct { func (x *ListFieldsResponse) Reset() { *x = ListFieldsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFieldsResponse) String() string { @@ -1391,7 +1343,7 @@ func (*ListFieldsResponse) ProtoMessage() {} func (x *ListFieldsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1461,11 +1413,9 @@ type ExportDocumentsRequest struct { func (x *ExportDocumentsRequest) Reset() { *x = ExportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDocumentsRequest) String() string { @@ -1476,7 +1426,7 @@ func (*ExportDocumentsRequest) ProtoMessage() {} func (x *ExportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,11 +1506,9 @@ type ImportDocumentsRequest struct { func (x *ImportDocumentsRequest) Reset() { *x = ImportDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsRequest) String() string { @@ -1571,7 +1519,7 @@ func (*ImportDocumentsRequest) ProtoMessage() {} func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,11 +1600,9 @@ type BulkDeleteDocumentsRequest struct { func (x *BulkDeleteDocumentsRequest) Reset() { *x = BulkDeleteDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteDocumentsRequest) String() string { @@ -1667,7 +1613,7 @@ func (*BulkDeleteDocumentsRequest) ProtoMessage() {} func (x *BulkDeleteDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,11 +1659,9 @@ type BulkDeleteDocumentsResponse struct { func (x *BulkDeleteDocumentsResponse) Reset() { *x = BulkDeleteDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteDocumentsResponse) String() string { @@ -1728,7 +1672,7 @@ func (*BulkDeleteDocumentsResponse) ProtoMessage() {} func (x *BulkDeleteDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1758,11 +1702,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -1773,7 +1715,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1813,11 +1755,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -1828,7 +1768,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1810,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -1885,7 +1823,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1929,11 +1867,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -1944,7 +1880,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2004,11 +1940,9 @@ type RestoreDatabaseRequest struct { func (x *RestoreDatabaseRequest) Reset() { *x = RestoreDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatabaseRequest) String() string { @@ -2019,7 +1953,7 @@ func (*RestoreDatabaseRequest) ProtoMessage() {} func (x *RestoreDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2833,404 +2767,6 @@ func file_google_firestore_admin_v1_firestore_admin_proto_init() { file_google_firestore_admin_v1_index_proto_init() file_google_firestore_admin_v1_operation_proto_init() file_google_firestore_admin_v1_schedule_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupSchedulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupSchedulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetFieldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListFieldsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListFieldsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ExportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_firestore_admin_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/admin/adminpb/index.pb.go b/firestore/apiv1/admin/adminpb/index.pb.go index e1fd37232c37..33efe6ac652a 100755 --- a/firestore/apiv1/admin/adminpb/index.pb.go +++ b/firestore/apiv1/admin/adminpb/index.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/index.proto @@ -364,11 +364,9 @@ type Index struct { func (x *Index) Reset() { *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_index_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_index_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index) String() string { @@ -379,7 +377,7 @@ func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_index_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +451,9 @@ type Index_IndexField struct { func (x *Index_IndexField) Reset() { *x = Index_IndexField{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_index_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_index_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index_IndexField) String() string { @@ -468,7 +464,7 @@ func (*Index_IndexField) ProtoMessage() {} func (x *Index_IndexField) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_index_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +562,9 @@ type Index_IndexField_VectorConfig struct { func (x *Index_IndexField_VectorConfig) Reset() { *x = Index_IndexField_VectorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_index_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_index_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index_IndexField_VectorConfig) String() string { @@ -581,7 +575,7 @@ func (*Index_IndexField_VectorConfig) ProtoMessage() {} func (x *Index_IndexField_VectorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_index_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +632,9 @@ type Index_IndexField_VectorConfig_FlatIndex struct { func (x *Index_IndexField_VectorConfig_FlatIndex) Reset() { *x = Index_IndexField_VectorConfig_FlatIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_index_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_index_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index_IndexField_VectorConfig_FlatIndex) String() string { @@ -653,7 +645,7 @@ func (*Index_IndexField_VectorConfig_FlatIndex) ProtoMessage() {} func (x *Index_IndexField_VectorConfig_FlatIndex) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_index_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,56 +813,6 @@ func file_google_firestore_admin_v1_index_proto_init() { if File_google_firestore_admin_v1_index_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_index_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_index_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Index_IndexField); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_index_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Index_IndexField_VectorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_index_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Index_IndexField_VectorConfig_FlatIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_admin_v1_index_proto_msgTypes[1].OneofWrappers = []any{ (*Index_IndexField_Order_)(nil), (*Index_IndexField_ArrayConfig_)(nil), diff --git a/firestore/apiv1/admin/adminpb/location.pb.go b/firestore/apiv1/admin/adminpb/location.pb.go index 8e2ffcc9f0b5..68d0a0f32e52 100755 --- a/firestore/apiv1/admin/adminpb/location.pb.go +++ b/firestore/apiv1/admin/adminpb/location.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/location.proto @@ -45,11 +45,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_location_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_location_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -60,7 +58,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_location_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,20 +127,6 @@ func file_google_firestore_admin_v1_location_proto_init() { if File_google_firestore_admin_v1_location_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_location_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/admin/adminpb/operation.pb.go b/firestore/apiv1/admin/adminpb/operation.pb.go index db217f37d8c0..e7f53391db32 100755 --- a/firestore/apiv1/admin/adminpb/operation.pb.go +++ b/firestore/apiv1/admin/adminpb/operation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/operation.proto @@ -244,11 +244,9 @@ type IndexOperationMetadata struct { func (x *IndexOperationMetadata) Reset() { *x = IndexOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexOperationMetadata) String() string { @@ -259,7 +257,7 @@ func (*IndexOperationMetadata) ProtoMessage() {} func (x *IndexOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +346,9 @@ type FieldOperationMetadata struct { func (x *FieldOperationMetadata) Reset() { *x = FieldOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOperationMetadata) String() string { @@ -363,7 +359,7 @@ func (*FieldOperationMetadata) ProtoMessage() {} func (x *FieldOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +463,9 @@ type ExportDocumentsMetadata struct { func (x *ExportDocumentsMetadata) Reset() { *x = ExportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDocumentsMetadata) String() string { @@ -482,7 +476,7 @@ func (*ExportDocumentsMetadata) ProtoMessage() {} func (x *ExportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +583,9 @@ type ImportDocumentsMetadata struct { func (x *ImportDocumentsMetadata) Reset() { *x = ImportDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDocumentsMetadata) String() string { @@ -604,7 +596,7 @@ func (*ImportDocumentsMetadata) ProtoMessage() {} func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +699,9 @@ type BulkDeleteDocumentsMetadata struct { func (x *BulkDeleteDocumentsMetadata) Reset() { *x = BulkDeleteDocumentsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkDeleteDocumentsMetadata) String() string { @@ -722,7 +712,7 @@ func (*BulkDeleteDocumentsMetadata) ProtoMessage() {} func (x *BulkDeleteDocumentsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +798,9 @@ type ExportDocumentsResponse struct { func (x *ExportDocumentsResponse) Reset() { *x = ExportDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDocumentsResponse) String() string { @@ -823,7 +811,7 @@ func (*ExportDocumentsResponse) ProtoMessage() {} func (x *ExportDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +856,9 @@ type RestoreDatabaseMetadata struct { func (x *RestoreDatabaseMetadata) Reset() { *x = RestoreDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatabaseMetadata) String() string { @@ -883,7 +869,7 @@ func (*RestoreDatabaseMetadata) ProtoMessage() {} func (x *RestoreDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +942,9 @@ type Progress struct { func (x *Progress) Reset() { *x = Progress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Progress) String() string { @@ -971,7 +955,7 @@ func (*Progress) ProtoMessage() {} func (x *Progress) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1014,11 +998,9 @@ type FieldOperationMetadata_IndexConfigDelta struct { func (x *FieldOperationMetadata_IndexConfigDelta) Reset() { *x = FieldOperationMetadata_IndexConfigDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOperationMetadata_IndexConfigDelta) String() string { @@ -1029,7 +1011,7 @@ func (*FieldOperationMetadata_IndexConfigDelta) ProtoMessage() {} func (x *FieldOperationMetadata_IndexConfigDelta) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1070,11 +1052,9 @@ type FieldOperationMetadata_TtlConfigDelta struct { func (x *FieldOperationMetadata_TtlConfigDelta) Reset() { *x = FieldOperationMetadata_TtlConfigDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOperationMetadata_TtlConfigDelta) String() string { @@ -1085,7 +1065,7 @@ func (*FieldOperationMetadata_TtlConfigDelta) ProtoMessage() {} func (x *FieldOperationMetadata_TtlConfigDelta) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_operation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1457,128 +1437,6 @@ func file_google_firestore_admin_v1_operation_proto_init() { return } file_google_firestore_admin_v1_index_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IndexOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FieldOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BulkDeleteDocumentsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Progress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*FieldOperationMetadata_IndexConfigDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_operation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FieldOperationMetadata_TtlConfigDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/admin/adminpb/schedule.pb.go b/firestore/apiv1/admin/adminpb/schedule.pb.go index cd3cdbd53142..fb82f93b59b9 100755 --- a/firestore/apiv1/admin/adminpb/schedule.pb.go +++ b/firestore/apiv1/admin/adminpb/schedule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/admin/v1/schedule.proto @@ -81,11 +81,9 @@ type BackupSchedule struct { func (x *BackupSchedule) Reset() { *x = BackupSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupSchedule) String() string { @@ -96,7 +94,7 @@ func (*BackupSchedule) ProtoMessage() {} func (x *BackupSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type DailyRecurrence struct { func (x *DailyRecurrence) Reset() { *x = DailyRecurrence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyRecurrence) String() string { @@ -204,7 +200,7 @@ func (*DailyRecurrence) ProtoMessage() {} func (x *DailyRecurrence) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +231,9 @@ type WeeklyRecurrence struct { func (x *WeeklyRecurrence) Reset() { *x = WeeklyRecurrence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyRecurrence) String() string { @@ -250,7 +244,7 @@ func (*WeeklyRecurrence) ProtoMessage() {} func (x *WeeklyRecurrence) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_admin_v1_schedule_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,44 +379,6 @@ func file_google_firestore_admin_v1_schedule_proto_init() { if File_google_firestore_admin_v1_schedule_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_admin_v1_schedule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_schedule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DailyRecurrence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_admin_v1_schedule_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyRecurrence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_admin_v1_schedule_proto_msgTypes[0].OneofWrappers = []any{ (*BackupSchedule_DailyRecurrence)(nil), (*BackupSchedule_WeeklyRecurrence)(nil), diff --git a/firestore/apiv1/admin/firestore_admin_client.go b/firestore/apiv1/admin/firestore_admin_client.go index d7bf4e991233..9c0731216f71 100755 --- a/firestore/apiv1/admin/firestore_admin_client.go +++ b/firestore/apiv1/admin/firestore_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -695,6 +694,8 @@ type firestoreAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFirestoreAdminClient creates a new firestore admin client based on gRPC. @@ -748,6 +749,7 @@ func NewFirestoreAdminClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, firestoreAdminClient: adminpb.NewFirestoreAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -811,6 +813,8 @@ type firestoreAdminRESTClient struct { // Points back to the CallOptions field of the containing FirestoreAdminClient CallOptions **FirestoreAdminCallOptions + + logger *slog.Logger } // NewFirestoreAdminRESTClient creates a new firestore admin rest client. @@ -855,6 +859,7 @@ func NewFirestoreAdminRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -917,7 +922,7 @@ func (c *firestoreAdminGRPCClient) CreateIndex(ctx context.Context, req *adminpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.CreateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") return err }, opts...) if err != nil { @@ -948,7 +953,7 @@ func (c *firestoreAdminGRPCClient) ListIndexes(ctx context.Context, req *adminpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ListIndexes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") return err }, opts...) if err != nil { @@ -983,7 +988,7 @@ func (c *firestoreAdminGRPCClient) GetIndex(ctx context.Context, req *adminpb.Ge var resp *adminpb.Index err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.GetIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.GetIndex, req, settings.GRPC, c.logger, "GetIndex") return err }, opts...) if err != nil { @@ -1000,7 +1005,7 @@ func (c *firestoreAdminGRPCClient) DeleteIndex(ctx context.Context, req *adminpb opts = append((*c.CallOptions).DeleteIndex[0:len((*c.CallOptions).DeleteIndex):len((*c.CallOptions).DeleteIndex)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.firestoreAdminClient.DeleteIndex(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.firestoreAdminClient.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") return err }, opts...) return err @@ -1015,7 +1020,7 @@ func (c *firestoreAdminGRPCClient) GetField(ctx context.Context, req *adminpb.Ge var resp *adminpb.Field err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.GetField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.GetField, req, settings.GRPC, c.logger, "GetField") return err }, opts...) if err != nil { @@ -1033,7 +1038,7 @@ func (c *firestoreAdminGRPCClient) UpdateField(ctx context.Context, req *adminpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.UpdateField(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.UpdateField, req, settings.GRPC, c.logger, "UpdateField") return err }, opts...) if err != nil { @@ -1064,7 +1069,7 @@ func (c *firestoreAdminGRPCClient) ListFields(ctx context.Context, req *adminpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ListFields(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ListFields, req, settings.GRPC, c.logger, "ListFields") return err }, opts...) if err != nil { @@ -1099,7 +1104,7 @@ func (c *firestoreAdminGRPCClient) ExportDocuments(ctx context.Context, req *adm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ExportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ExportDocuments, req, settings.GRPC, c.logger, "ExportDocuments") return err }, opts...) if err != nil { @@ -1119,7 +1124,7 @@ func (c *firestoreAdminGRPCClient) ImportDocuments(ctx context.Context, req *adm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ImportDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ImportDocuments, req, settings.GRPC, c.logger, "ImportDocuments") return err }, opts...) if err != nil { @@ -1139,7 +1144,7 @@ func (c *firestoreAdminGRPCClient) BulkDeleteDocuments(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.BulkDeleteDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.BulkDeleteDocuments, req, settings.GRPC, c.logger, "BulkDeleteDocuments") return err }, opts...) if err != nil { @@ -1159,7 +1164,7 @@ func (c *firestoreAdminGRPCClient) CreateDatabase(ctx context.Context, req *admi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.CreateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.CreateDatabase, req, settings.GRPC, c.logger, "CreateDatabase") return err }, opts...) if err != nil { @@ -1179,7 +1184,7 @@ func (c *firestoreAdminGRPCClient) GetDatabase(ctx context.Context, req *adminpb var resp *adminpb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.GetDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.GetDatabase, req, settings.GRPC, c.logger, "GetDatabase") return err }, opts...) if err != nil { @@ -1197,7 +1202,7 @@ func (c *firestoreAdminGRPCClient) ListDatabases(ctx context.Context, req *admin var resp *adminpb.ListDatabasesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -1215,7 +1220,7 @@ func (c *firestoreAdminGRPCClient) UpdateDatabase(ctx context.Context, req *admi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.UpdateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.UpdateDatabase, req, settings.GRPC, c.logger, "UpdateDatabase") return err }, opts...) if err != nil { @@ -1235,7 +1240,7 @@ func (c *firestoreAdminGRPCClient) DeleteDatabase(ctx context.Context, req *admi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.DeleteDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.DeleteDatabase, req, settings.GRPC, c.logger, "DeleteDatabase") return err }, opts...) if err != nil { @@ -1255,7 +1260,7 @@ func (c *firestoreAdminGRPCClient) GetBackup(ctx context.Context, req *adminpb.G var resp *adminpb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1273,7 +1278,7 @@ func (c *firestoreAdminGRPCClient) ListBackups(ctx context.Context, req *adminpb var resp *adminpb.ListBackupsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1290,7 +1295,7 @@ func (c *firestoreAdminGRPCClient) DeleteBackup(ctx context.Context, req *adminp opts = append((*c.CallOptions).DeleteBackup[0:len((*c.CallOptions).DeleteBackup):len((*c.CallOptions).DeleteBackup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.firestoreAdminClient.DeleteBackup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.firestoreAdminClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) return err @@ -1305,7 +1310,7 @@ func (c *firestoreAdminGRPCClient) RestoreDatabase(ctx context.Context, req *adm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.RestoreDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.RestoreDatabase, req, settings.GRPC, c.logger, "RestoreDatabase") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *firestoreAdminGRPCClient) CreateBackupSchedule(ctx context.Context, req var resp *adminpb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.CreateBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.CreateBackupSchedule, req, settings.GRPC, c.logger, "CreateBackupSchedule") return err }, opts...) if err != nil { @@ -1343,7 +1348,7 @@ func (c *firestoreAdminGRPCClient) GetBackupSchedule(ctx context.Context, req *a var resp *adminpb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.GetBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.GetBackupSchedule, req, settings.GRPC, c.logger, "GetBackupSchedule") return err }, opts...) if err != nil { @@ -1361,7 +1366,7 @@ func (c *firestoreAdminGRPCClient) ListBackupSchedules(ctx context.Context, req var resp *adminpb.ListBackupSchedulesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.ListBackupSchedules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.ListBackupSchedules, req, settings.GRPC, c.logger, "ListBackupSchedules") return err }, opts...) if err != nil { @@ -1379,7 +1384,7 @@ func (c *firestoreAdminGRPCClient) UpdateBackupSchedule(ctx context.Context, req var resp *adminpb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.firestoreAdminClient.UpdateBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.firestoreAdminClient.UpdateBackupSchedule, req, settings.GRPC, c.logger, "UpdateBackupSchedule") return err }, opts...) if err != nil { @@ -1396,7 +1401,7 @@ func (c *firestoreAdminGRPCClient) DeleteBackupSchedule(ctx context.Context, req opts = append((*c.CallOptions).DeleteBackupSchedule[0:len((*c.CallOptions).DeleteBackupSchedule):len((*c.CallOptions).DeleteBackupSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.firestoreAdminClient.DeleteBackupSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.firestoreAdminClient.DeleteBackupSchedule, req, settings.GRPC, c.logger, "DeleteBackupSchedule") return err }, opts...) return err @@ -1410,7 +1415,7 @@ func (c *firestoreAdminGRPCClient) CancelOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1424,7 +1429,7 @@ func (c *firestoreAdminGRPCClient) DeleteOperation(ctx context.Context, req *lon opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1439,7 +1444,7 @@ func (c *firestoreAdminGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1468,7 +1473,7 @@ func (c *firestoreAdminGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1537,21 +1542,10 @@ func (c *firestoreAdminRESTClient) CreateIndex(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1617,21 +1611,10 @@ func (c *firestoreAdminRESTClient) ListIndexes(ctx context.Context, req *adminpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1694,17 +1677,7 @@ func (c *firestoreAdminRESTClient) GetIndex(ctx context.Context, req *adminpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndex") if err != nil { return err } @@ -1751,15 +1724,8 @@ func (c *firestoreAdminRESTClient) DeleteIndex(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndex") + return err }, opts...) } @@ -1796,17 +1762,7 @@ func (c *firestoreAdminRESTClient) GetField(ctx context.Context, req *adminpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetField") if err != nil { return err } @@ -1883,21 +1839,10 @@ func (c *firestoreAdminRESTClient) UpdateField(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateField") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1971,21 +1916,10 @@ func (c *firestoreAdminRESTClient) ListFields(ctx context.Context, req *adminpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFields") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2063,21 +1997,10 @@ func (c *firestoreAdminRESTClient) ExportDocuments(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2137,21 +2060,10 @@ func (c *firestoreAdminRESTClient) ImportDocuments(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDocuments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2214,21 +2126,10 @@ func (c *firestoreAdminRESTClient) BulkDeleteDocuments(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkDeleteDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2286,21 +2187,10 @@ func (c *firestoreAdminRESTClient) CreateDatabase(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2351,17 +2241,7 @@ func (c *firestoreAdminRESTClient) GetDatabase(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatabase") if err != nil { return err } @@ -2414,17 +2294,7 @@ func (c *firestoreAdminRESTClient) ListDatabases(ctx context.Context, req *admin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } @@ -2487,21 +2357,10 @@ func (c *firestoreAdminRESTClient) UpdateDatabase(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatabase") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2554,21 +2413,10 @@ func (c *firestoreAdminRESTClient) DeleteDatabase(ctx context.Context, req *admi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2619,17 +2467,7 @@ func (c *firestoreAdminRESTClient) GetBackup(ctx context.Context, req *adminpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2679,17 +2517,7 @@ func (c *firestoreAdminRESTClient) ListBackups(ctx context.Context, req *adminpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } @@ -2736,15 +2564,8 @@ func (c *firestoreAdminRESTClient) DeleteBackup(ctx context.Context, req *adminp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") + return err }, opts...) } @@ -2802,21 +2623,10 @@ func (c *firestoreAdminRESTClient) RestoreDatabase(ctx context.Context, req *adm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2876,17 +2686,7 @@ func (c *firestoreAdminRESTClient) CreateBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupSchedule") if err != nil { return err } @@ -2936,17 +2736,7 @@ func (c *firestoreAdminRESTClient) GetBackupSchedule(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupSchedule") if err != nil { return err } @@ -2996,17 +2786,7 @@ func (c *firestoreAdminRESTClient) ListBackupSchedules(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupSchedules") if err != nil { return err } @@ -3070,17 +2850,7 @@ func (c *firestoreAdminRESTClient) UpdateBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupSchedule") if err != nil { return err } @@ -3127,15 +2897,8 @@ func (c *firestoreAdminRESTClient) DeleteBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupSchedule") + return err }, opts...) } @@ -3175,15 +2938,8 @@ func (c *firestoreAdminRESTClient) CancelOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3217,15 +2973,8 @@ func (c *firestoreAdminRESTClient) DeleteOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3262,17 +3011,7 @@ func (c *firestoreAdminRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3337,21 +3076,10 @@ func (c *firestoreAdminRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/firestore/apiv1/admin/firestore_admin_client_example_go123_test.go b/firestore/apiv1/admin/firestore_admin_client_example_go123_test.go index 290989a81732..3f402579e2f4 100644 --- a/firestore/apiv1/admin/firestore_admin_client_example_go123_test.go +++ b/firestore/apiv1/admin/firestore_admin_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleFirestoreAdminClient_ListFields_all() { } for resp, err := range c.ListFields(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleFirestoreAdminClient_ListIndexes_all() { } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleFirestoreAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/firestore/apiv1/admin/helpers.go b/firestore/apiv1/admin/helpers.go index 87f6d67cddcc..8a2cc0b024b7 100755 --- a/firestore/apiv1/admin/helpers.go +++ b/firestore/apiv1/admin/helpers.go @@ -18,10 +18,20 @@ package apiv1 import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "firestore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/datastore", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/firestore/apiv1/firestore_client.go b/firestore/apiv1/firestore_client.go index 97a15e007989..551ba8ecec25 100755 --- a/firestore/apiv1/firestore_client.go +++ b/firestore/apiv1/firestore_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( firestorepb "cloud.google.com/go/firestore/apiv1/firestorepb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -736,6 +735,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new firestore client based on gRPC. @@ -769,6 +770,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: firestorepb.NewFirestoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -816,6 +818,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new firestore rest client. @@ -840,6 +844,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -892,7 +897,7 @@ func (c *gRPCClient) GetDocument(ctx context.Context, req *firestorepb.GetDocume var resp *firestorepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDocument, req, settings.GRPC, c.logger, "GetDocument") return err }, opts...) if err != nil { @@ -921,7 +926,7 @@ func (c *gRPCClient) ListDocuments(ctx context.Context, req *firestorepb.ListDoc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDocuments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDocuments, req, settings.GRPC, c.logger, "ListDocuments") return err }, opts...) if err != nil { @@ -956,7 +961,7 @@ func (c *gRPCClient) UpdateDocument(ctx context.Context, req *firestorepb.Update var resp *firestorepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDocument, req, settings.GRPC, c.logger, "UpdateDocument") return err }, opts...) if err != nil { @@ -973,7 +978,7 @@ func (c *gRPCClient) DeleteDocument(ctx context.Context, req *firestorepb.Delete opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDocument(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDocument, req, settings.GRPC, c.logger, "DeleteDocument") return err }, opts...) return err @@ -988,7 +993,9 @@ func (c *gRPCClient) BatchGetDocuments(ctx context.Context, req *firestorepb.Bat var resp firestorepb.Firestore_BatchGetDocumentsClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "BatchGetDocuments") resp, err = c.client.BatchGetDocuments(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "BatchGetDocuments") return err }, opts...) if err != nil { @@ -1006,7 +1013,7 @@ func (c *gRPCClient) BeginTransaction(ctx context.Context, req *firestorepb.Begi var resp *firestorepb.BeginTransactionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BeginTransaction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BeginTransaction, req, settings.GRPC, c.logger, "BeginTransaction") return err }, opts...) if err != nil { @@ -1024,7 +1031,7 @@ func (c *gRPCClient) Commit(ctx context.Context, req *firestorepb.CommitRequest, var resp *firestorepb.CommitResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Commit(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Commit, req, settings.GRPC, c.logger, "Commit") return err }, opts...) if err != nil { @@ -1041,7 +1048,7 @@ func (c *gRPCClient) Rollback(ctx context.Context, req *firestorepb.RollbackRequ opts = append((*c.CallOptions).Rollback[0:len((*c.CallOptions).Rollback):len((*c.CallOptions).Rollback)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.Rollback(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.Rollback, req, settings.GRPC, c.logger, "Rollback") return err }, opts...) return err @@ -1056,7 +1063,9 @@ func (c *gRPCClient) RunQuery(ctx context.Context, req *firestorepb.RunQueryRequ var resp firestorepb.Firestore_RunQueryClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "RunQuery") resp, err = c.client.RunQuery(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "RunQuery") return err }, opts...) if err != nil { @@ -1074,7 +1083,9 @@ func (c *gRPCClient) RunAggregationQuery(ctx context.Context, req *firestorepb.R var resp firestorepb.Firestore_RunAggregationQueryClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "RunAggregationQuery") resp, err = c.client.RunAggregationQuery(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "RunAggregationQuery") return err }, opts...) if err != nil { @@ -1103,7 +1114,7 @@ func (c *gRPCClient) PartitionQuery(ctx context.Context, req *firestorepb.Partit } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PartitionQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PartitionQuery, req, settings.GRPC, c.logger, "PartitionQuery") return err }, opts...) if err != nil { @@ -1135,7 +1146,9 @@ func (c *gRPCClient) Write(ctx context.Context, opts ...gax.CallOption) (firesto opts = append((*c.CallOptions).Write[0:len((*c.CallOptions).Write):len((*c.CallOptions).Write)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "Write") resp, err = c.client.Write(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "Write") return err }, opts...) if err != nil { @@ -1150,7 +1163,9 @@ func (c *gRPCClient) Listen(ctx context.Context, opts ...gax.CallOption) (firest opts = append((*c.CallOptions).Listen[0:len((*c.CallOptions).Listen):len((*c.CallOptions).Listen)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "Listen") resp, err = c.client.Listen(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "Listen") return err }, opts...) if err != nil { @@ -1179,7 +1194,7 @@ func (c *gRPCClient) ListCollectionIds(ctx context.Context, req *firestorepb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCollectionIds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCollectionIds, req, settings.GRPC, c.logger, "ListCollectionIds") return err }, opts...) if err != nil { @@ -1214,7 +1229,7 @@ func (c *gRPCClient) BatchWrite(ctx context.Context, req *firestorepb.BatchWrite var resp *firestorepb.BatchWriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchWrite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchWrite, req, settings.GRPC, c.logger, "BatchWrite") return err }, opts...) if err != nil { @@ -1232,7 +1247,7 @@ func (c *gRPCClient) CreateDocument(ctx context.Context, req *firestorepb.Create var resp *firestorepb.Document err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDocument, req, settings.GRPC, c.logger, "CreateDocument") return err }, opts...) if err != nil { @@ -1249,7 +1264,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1263,7 +1278,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1278,7 +1293,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1307,7 +1322,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1381,17 +1396,7 @@ func (c *restClient) GetDocument(ctx context.Context, req *firestorepb.GetDocume httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDocument") if err != nil { return err } @@ -1474,21 +1479,10 @@ func (c *restClient) ListDocuments(ctx context.Context, req *firestorepb.ListDoc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDocuments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1578,17 +1572,7 @@ func (c *restClient) UpdateDocument(ctx context.Context, req *firestorepb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDocument") if err != nil { return err } @@ -1645,15 +1629,8 @@ func (c *restClient) DeleteDocument(ctx context.Context, req *firestorepb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDocument") + return err }, opts...) } @@ -1697,15 +1674,11 @@ func (c *restClient) BatchGetDocuments(ctx context.Context, req *firestorepb.Bat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchGetDocuments") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &batchGetDocumentsRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -1805,17 +1778,7 @@ func (c *restClient) BeginTransaction(ctx context.Context, req *firestorepb.Begi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BeginTransaction") if err != nil { return err } @@ -1871,17 +1834,7 @@ func (c *restClient) Commit(ctx context.Context, req *firestorepb.CommitRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Commit") if err != nil { return err } @@ -1934,15 +1887,8 @@ func (c *restClient) Rollback(ctx context.Context, req *firestorepb.RollbackRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Rollback") + return err }, opts...) } @@ -1983,15 +1929,11 @@ func (c *restClient) RunQuery(ctx context.Context, req *firestorepb.RunQueryRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunQuery") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &runQueryRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -2096,15 +2038,11 @@ func (c *restClient) RunAggregationQuery(ctx context.Context, req *firestorepb.R httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunAggregationQuery") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &runAggregationQueryRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -2212,21 +2150,10 @@ func (c *restClient) PartitionQuery(ctx context.Context, req *firestorepb.Partit } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PartitionQuery") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2317,21 +2244,10 @@ func (c *restClient) ListCollectionIds(ctx context.Context, req *firestorepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListCollectionIds") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2409,17 +2325,7 @@ func (c *restClient) BatchWrite(ctx context.Context, req *firestorepb.BatchWrite httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchWrite") if err != nil { return err } @@ -2484,17 +2390,7 @@ func (c *restClient) CreateDocument(ctx context.Context, req *firestorepb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDocument") if err != nil { return err } @@ -2547,15 +2443,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2589,15 +2478,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2634,17 +2516,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2709,21 +2581,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/firestore/apiv1/firestore_client_example_go123_test.go b/firestore/apiv1/firestore_client_example_go123_test.go index 2548d79c9564..024a4e555e01 100644 --- a/firestore/apiv1/firestore_client_example_go123_test.go +++ b/firestore/apiv1/firestore_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListCollectionIds_all() { } for resp, err := range c.ListCollectionIds(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListDocuments_all() { } for resp, err := range c.ListDocuments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_PartitionQuery_all() { } for resp, err := range c.PartitionQuery(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/firestore/apiv1/firestorepb/aggregation_result.pb.go b/firestore/apiv1/firestorepb/aggregation_result.pb.go index a14afcb17399..15ee3158e664 100755 --- a/firestore/apiv1/firestorepb/aggregation_result.pb.go +++ b/firestore/apiv1/firestorepb/aggregation_result.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/aggregation_result.proto @@ -56,11 +56,9 @@ type AggregationResult struct { func (x *AggregationResult) Reset() { *x = AggregationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_aggregation_result_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_aggregation_result_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult) String() string { @@ -71,7 +69,7 @@ func (*AggregationResult) ProtoMessage() {} func (x *AggregationResult) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_aggregation_result_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,20 +164,6 @@ func file_google_firestore_v1_aggregation_result_proto_init() { return } file_google_firestore_v1_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_aggregation_result_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/firestorepb/bloom_filter.pb.go b/firestore/apiv1/firestorepb/bloom_filter.pb.go index 34146b41dd88..216481e4a23c 100755 --- a/firestore/apiv1/firestorepb/bloom_filter.pb.go +++ b/firestore/apiv1/firestorepb/bloom_filter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/bloom_filter.proto @@ -66,11 +66,9 @@ type BitSequence struct { func (x *BitSequence) Reset() { *x = BitSequence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BitSequence) String() string { @@ -81,7 +79,7 @@ func (*BitSequence) ProtoMessage() {} func (x *BitSequence) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,11 +134,9 @@ type BloomFilter struct { func (x *BloomFilter) Reset() { *x = BloomFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BloomFilter) String() string { @@ -151,7 +147,7 @@ func (*BloomFilter) ProtoMessage() {} func (x *BloomFilter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_bloom_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,32 +240,6 @@ func file_google_firestore_v1_bloom_filter_proto_init() { if File_google_firestore_v1_bloom_filter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_bloom_filter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BitSequence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_bloom_filter_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BloomFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/firestorepb/common.pb.go b/firestore/apiv1/firestorepb/common.pb.go index 06af91f8a55a..cac0c2b76f52 100755 --- a/firestore/apiv1/firestorepb/common.pb.go +++ b/firestore/apiv1/firestorepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/common.proto @@ -55,11 +55,9 @@ type DocumentMask struct { func (x *DocumentMask) Reset() { *x = DocumentMask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentMask) String() string { @@ -70,7 +68,7 @@ func (*DocumentMask) ProtoMessage() {} func (x *DocumentMask) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type Precondition struct { func (x *Precondition) Reset() { *x = Precondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Precondition) String() string { @@ -124,7 +120,7 @@ func (*Precondition) ProtoMessage() {} func (x *Precondition) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type TransactionOptions struct { func (x *TransactionOptions) Reset() { *x = TransactionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions) String() string { @@ -212,7 +206,7 @@ func (*TransactionOptions) ProtoMessage() {} func (x *TransactionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +275,9 @@ type TransactionOptions_ReadWrite struct { func (x *TransactionOptions_ReadWrite) Reset() { *x = TransactionOptions_ReadWrite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadWrite) String() string { @@ -296,7 +288,7 @@ func (*TransactionOptions_ReadWrite) ProtoMessage() {} func (x *TransactionOptions_ReadWrite) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +327,9 @@ type TransactionOptions_ReadOnly struct { func (x *TransactionOptions_ReadOnly) Reset() { *x = TransactionOptions_ReadOnly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadOnly) String() string { @@ -350,7 +340,7 @@ func (*TransactionOptions_ReadOnly) ProtoMessage() {} func (x *TransactionOptions_ReadOnly) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,68 +478,6 @@ func file_google_firestore_v1_common_proto_init() { if File_google_firestore_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DocumentMask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Precondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadWrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadOnly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_v1_common_proto_msgTypes[1].OneofWrappers = []any{ (*Precondition_Exists)(nil), (*Precondition_UpdateTime)(nil), diff --git a/firestore/apiv1/firestorepb/document.pb.go b/firestore/apiv1/firestorepb/document.pb.go index b36f1b1b762a..ff68f7fd492c 100755 --- a/firestore/apiv1/firestorepb/document.pb.go +++ b/firestore/apiv1/firestorepb/document.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/document.proto @@ -91,11 +91,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_document_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_document_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -106,7 +104,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_document_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_document_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_document_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -190,7 +186,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_document_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +392,9 @@ type ArrayValue struct { func (x *ArrayValue) Reset() { *x = ArrayValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_document_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_document_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArrayValue) String() string { @@ -411,7 +405,7 @@ func (*ArrayValue) ProtoMessage() {} func (x *ArrayValue) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_document_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +444,9 @@ type MapValue struct { func (x *MapValue) Reset() { *x = MapValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_document_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_document_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MapValue) String() string { @@ -465,7 +457,7 @@ func (*MapValue) ProtoMessage() {} func (x *MapValue) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_document_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,56 +628,6 @@ func file_google_firestore_v1_document_proto_init() { if File_google_firestore_v1_document_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_document_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_document_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_document_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ArrayValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_document_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MapValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_v1_document_proto_msgTypes[1].OneofWrappers = []any{ (*Value_NullValue)(nil), (*Value_BooleanValue)(nil), diff --git a/firestore/apiv1/firestorepb/firestore.pb.go b/firestore/apiv1/firestorepb/firestore.pb.go index e3c9b6fbc303..211b40f0a2e5 100755 --- a/firestore/apiv1/firestorepb/firestore.pb.go +++ b/firestore/apiv1/firestorepb/firestore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/firestore.proto @@ -143,11 +143,9 @@ type GetDocumentRequest struct { func (x *GetDocumentRequest) Reset() { *x = GetDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDocumentRequest) String() string { @@ -158,7 +156,7 @@ func (*GetDocumentRequest) ProtoMessage() {} func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +295,9 @@ type ListDocumentsRequest struct { func (x *ListDocumentsRequest) Reset() { *x = ListDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsRequest) String() string { @@ -312,7 +308,7 @@ func (*ListDocumentsRequest) ProtoMessage() {} func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +432,9 @@ type ListDocumentsResponse struct { func (x *ListDocumentsResponse) Reset() { *x = ListDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDocumentsResponse) String() string { @@ -451,7 +445,7 @@ func (*ListDocumentsResponse) ProtoMessage() {} func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +503,9 @@ type CreateDocumentRequest struct { func (x *CreateDocumentRequest) Reset() { *x = CreateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDocumentRequest) String() string { @@ -524,7 +516,7 @@ func (*CreateDocumentRequest) ProtoMessage() {} func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +596,9 @@ type UpdateDocumentRequest struct { func (x *UpdateDocumentRequest) Reset() { *x = UpdateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDocumentRequest) String() string { @@ -619,7 +609,7 @@ func (*UpdateDocumentRequest) ProtoMessage() {} func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +669,9 @@ type DeleteDocumentRequest struct { func (x *DeleteDocumentRequest) Reset() { *x = DeleteDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDocumentRequest) String() string { @@ -694,7 +682,7 @@ func (*DeleteDocumentRequest) ProtoMessage() {} func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +744,9 @@ type BatchGetDocumentsRequest struct { func (x *BatchGetDocumentsRequest) Reset() { *x = BatchGetDocumentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsRequest) String() string { @@ -771,7 +757,7 @@ func (*BatchGetDocumentsRequest) ProtoMessage() {} func (x *BatchGetDocumentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +882,9 @@ type BatchGetDocumentsResponse struct { func (x *BatchGetDocumentsResponse) Reset() { *x = BatchGetDocumentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetDocumentsResponse) String() string { @@ -911,7 +895,7 @@ func (*BatchGetDocumentsResponse) ProtoMessage() {} func (x *BatchGetDocumentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -997,11 +981,9 @@ type BeginTransactionRequest struct { func (x *BeginTransactionRequest) Reset() { *x = BeginTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BeginTransactionRequest) String() string { @@ -1012,7 +994,7 @@ func (*BeginTransactionRequest) ProtoMessage() {} func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1036,9 @@ type BeginTransactionResponse struct { func (x *BeginTransactionResponse) Reset() { *x = BeginTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BeginTransactionResponse) String() string { @@ -1069,7 +1049,7 @@ func (*BeginTransactionResponse) ProtoMessage() {} func (x *BeginTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1110,11 +1090,9 @@ type CommitRequest struct { func (x *CommitRequest) Reset() { *x = CommitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRequest) String() string { @@ -1125,7 +1103,7 @@ func (*CommitRequest) ProtoMessage() {} func (x *CommitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1157,9 @@ type CommitResponse struct { func (x *CommitResponse) Reset() { *x = CommitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitResponse) String() string { @@ -1194,7 +1170,7 @@ func (*CommitResponse) ProtoMessage() {} func (x *CommitResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1214,9 @@ type RollbackRequest struct { func (x *RollbackRequest) Reset() { *x = RollbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackRequest) String() string { @@ -1253,7 +1227,7 @@ func (*RollbackRequest) ProtoMessage() {} func (x *RollbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1291,9 @@ type RunQueryRequest struct { func (x *RunQueryRequest) Reset() { *x = RunQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunQueryRequest) String() string { @@ -1332,7 +1304,7 @@ func (*RunQueryRequest) ProtoMessage() {} func (x *RunQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1490,11 +1462,9 @@ type RunQueryResponse struct { func (x *RunQueryResponse) Reset() { *x = RunQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunQueryResponse) String() string { @@ -1505,7 +1475,7 @@ func (*RunQueryResponse) ProtoMessage() {} func (x *RunQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1586,9 @@ type RunAggregationQueryRequest struct { func (x *RunAggregationQueryRequest) Reset() { *x = RunAggregationQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAggregationQueryRequest) String() string { @@ -1631,7 +1599,7 @@ func (*RunAggregationQueryRequest) ProtoMessage() {} func (x *RunAggregationQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1782,11 +1750,9 @@ type RunAggregationQueryResponse struct { func (x *RunAggregationQueryResponse) Reset() { *x = RunAggregationQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAggregationQueryResponse) String() string { @@ -1797,7 +1763,7 @@ func (*RunAggregationQueryResponse) ProtoMessage() {} func (x *RunAggregationQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1900,11 +1866,9 @@ type PartitionQueryRequest struct { func (x *PartitionQueryRequest) Reset() { *x = PartitionQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionQueryRequest) String() string { @@ -1915,7 +1879,7 @@ func (*PartitionQueryRequest) ProtoMessage() {} func (x *PartitionQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2048,11 +2012,9 @@ type PartitionQueryResponse struct { func (x *PartitionQueryResponse) Reset() { *x = PartitionQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionQueryResponse) String() string { @@ -2063,7 +2025,7 @@ func (*PartitionQueryResponse) ProtoMessage() {} func (x *PartitionQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2143,11 +2105,9 @@ type WriteRequest struct { func (x *WriteRequest) Reset() { *x = WriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteRequest) String() string { @@ -2158,7 +2118,7 @@ func (*WriteRequest) ProtoMessage() {} func (x *WriteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,11 +2194,9 @@ type WriteResponse struct { func (x *WriteResponse) Reset() { *x = WriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteResponse) String() string { @@ -2249,7 +2207,7 @@ func (*WriteResponse) ProtoMessage() {} func (x *WriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2314,11 +2272,9 @@ type ListenRequest struct { func (x *ListenRequest) Reset() { *x = ListenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListenRequest) String() string { @@ -2329,7 +2285,7 @@ func (*ListenRequest) ProtoMessage() {} func (x *ListenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2417,11 +2373,9 @@ type ListenResponse struct { func (x *ListenResponse) Reset() { *x = ListenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListenResponse) String() string { @@ -2432,7 +2386,7 @@ func (*ListenResponse) ProtoMessage() {} func (x *ListenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2588,11 +2542,9 @@ type Target struct { func (x *Target) Reset() { *x = Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target) String() string { @@ -2603,7 +2555,7 @@ func (*Target) ProtoMessage() {} func (x *Target) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2758,11 +2710,9 @@ type TargetChange struct { func (x *TargetChange) Reset() { *x = TargetChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetChange) String() string { @@ -2773,7 +2723,7 @@ func (*TargetChange) ProtoMessage() {} func (x *TargetChange) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2851,11 +2801,9 @@ type ListCollectionIdsRequest struct { func (x *ListCollectionIdsRequest) Reset() { *x = ListCollectionIdsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectionIdsRequest) String() string { @@ -2866,7 +2814,7 @@ func (*ListCollectionIdsRequest) ProtoMessage() {} func (x *ListCollectionIdsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2946,11 +2894,9 @@ type ListCollectionIdsResponse struct { func (x *ListCollectionIdsResponse) Reset() { *x = ListCollectionIdsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectionIdsResponse) String() string { @@ -2961,7 +2907,7 @@ func (*ListCollectionIdsResponse) ProtoMessage() {} func (x *ListCollectionIdsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3012,11 +2958,9 @@ type BatchWriteRequest struct { func (x *BatchWriteRequest) Reset() { *x = BatchWriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteRequest) String() string { @@ -3027,7 +2971,7 @@ func (*BatchWriteRequest) ProtoMessage() {} func (x *BatchWriteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3084,11 +3028,9 @@ type BatchWriteResponse struct { func (x *BatchWriteResponse) Reset() { *x = BatchWriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteResponse) String() string { @@ -3099,7 +3041,7 @@ func (*BatchWriteResponse) ProtoMessage() {} func (x *BatchWriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3143,11 +3085,9 @@ type Target_DocumentsTarget struct { func (x *Target_DocumentsTarget) Reset() { *x = Target_DocumentsTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target_DocumentsTarget) String() string { @@ -3158,7 +3098,7 @@ func (*Target_DocumentsTarget) ProtoMessage() {} func (x *Target_DocumentsTarget) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3203,11 +3143,9 @@ type Target_QueryTarget struct { func (x *Target_QueryTarget) Reset() { *x = Target_QueryTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_firestore_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_firestore_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Target_QueryTarget) String() string { @@ -3218,7 +3156,7 @@ func (*Target_QueryTarget) ProtoMessage() {} func (x *Target_QueryTarget) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_firestore_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4165,380 +4103,6 @@ func file_google_firestore_v1_firestore_proto_init() { file_google_firestore_v1_query_proto_init() file_google_firestore_v1_query_profile_proto_init() file_google_firestore_v1_write_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_firestore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetDocumentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BeginTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BeginTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CommitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CommitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RollbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RunQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RunQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RunAggregationQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RunAggregationQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PartitionQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PartitionQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*WriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*WriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*TargetChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectionIdsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectionIdsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Target_DocumentsTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_firestore_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Target_QueryTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_v1_firestore_proto_msgTypes[0].OneofWrappers = []any{ (*GetDocumentRequest_Transaction)(nil), (*GetDocumentRequest_ReadTime)(nil), diff --git a/firestore/apiv1/firestorepb/query.pb.go b/firestore/apiv1/firestorepb/query.pb.go index 98b169190464..2efba3e1a226 100755 --- a/firestore/apiv1/firestorepb/query.pb.go +++ b/firestore/apiv1/firestorepb/query.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/query.proto @@ -524,11 +524,9 @@ type StructuredQuery struct { func (x *StructuredQuery) Reset() { *x = StructuredQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery) String() string { @@ -539,7 +537,7 @@ func (*StructuredQuery) ProtoMessage() {} func (x *StructuredQuery) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +639,9 @@ type StructuredAggregationQuery struct { func (x *StructuredAggregationQuery) Reset() { *x = StructuredAggregationQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredAggregationQuery) String() string { @@ -656,7 +652,7 @@ func (*StructuredAggregationQuery) ProtoMessage() {} func (x *StructuredAggregationQuery) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +717,9 @@ type Cursor struct { func (x *Cursor) Reset() { *x = Cursor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cursor) String() string { @@ -736,7 +730,7 @@ func (*Cursor) ProtoMessage() {} func (x *Cursor) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +776,9 @@ type StructuredQuery_CollectionSelector struct { func (x *StructuredQuery_CollectionSelector) Reset() { *x = StructuredQuery_CollectionSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_CollectionSelector) String() string { @@ -797,7 +789,7 @@ func (*StructuredQuery_CollectionSelector) ProtoMessage() {} func (x *StructuredQuery_CollectionSelector) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +836,9 @@ type StructuredQuery_Filter struct { func (x *StructuredQuery_Filter) Reset() { *x = StructuredQuery_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_Filter) String() string { @@ -859,7 +849,7 @@ func (*StructuredQuery_Filter) ProtoMessage() {} func (x *StructuredQuery_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +935,9 @@ type StructuredQuery_CompositeFilter struct { func (x *StructuredQuery_CompositeFilter) Reset() { *x = StructuredQuery_CompositeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_CompositeFilter) String() string { @@ -960,7 +948,7 @@ func (*StructuredQuery_CompositeFilter) ProtoMessage() {} func (x *StructuredQuery_CompositeFilter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +993,9 @@ type StructuredQuery_FieldFilter struct { func (x *StructuredQuery_FieldFilter) Reset() { *x = StructuredQuery_FieldFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_FieldFilter) String() string { @@ -1020,7 +1006,7 @@ func (*StructuredQuery_FieldFilter) ProtoMessage() {} func (x *StructuredQuery_FieldFilter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1060,9 @@ type StructuredQuery_UnaryFilter struct { func (x *StructuredQuery_UnaryFilter) Reset() { *x = StructuredQuery_UnaryFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_UnaryFilter) String() string { @@ -1089,7 +1073,7 @@ func (*StructuredQuery_UnaryFilter) ProtoMessage() {} func (x *StructuredQuery_UnaryFilter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1134,9 @@ type StructuredQuery_Order struct { func (x *StructuredQuery_Order) Reset() { *x = StructuredQuery_Order{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_Order) String() string { @@ -1165,7 +1147,7 @@ func (*StructuredQuery_Order) ProtoMessage() {} func (x *StructuredQuery_Order) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,11 +1194,9 @@ type StructuredQuery_FieldReference struct { func (x *StructuredQuery_FieldReference) Reset() { *x = StructuredQuery_FieldReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_FieldReference) String() string { @@ -1227,7 +1207,7 @@ func (*StructuredQuery_FieldReference) ProtoMessage() {} func (x *StructuredQuery_FieldReference) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1244,9 @@ type StructuredQuery_Projection struct { func (x *StructuredQuery_Projection) Reset() { *x = StructuredQuery_Projection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_Projection) String() string { @@ -1279,7 +1257,7 @@ func (*StructuredQuery_Projection) ProtoMessage() {} func (x *StructuredQuery_Projection) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1339,11 +1317,9 @@ type StructuredQuery_FindNearest struct { func (x *StructuredQuery_FindNearest) Reset() { *x = StructuredQuery_FindNearest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredQuery_FindNearest) String() string { @@ -1354,7 +1330,7 @@ func (*StructuredQuery_FindNearest) ProtoMessage() {} func (x *StructuredQuery_FindNearest) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1473,11 +1449,9 @@ type StructuredAggregationQuery_Aggregation struct { func (x *StructuredAggregationQuery_Aggregation) Reset() { *x = StructuredAggregationQuery_Aggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredAggregationQuery_Aggregation) String() string { @@ -1488,7 +1462,7 @@ func (*StructuredAggregationQuery_Aggregation) ProtoMessage() {} func (x *StructuredAggregationQuery_Aggregation) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1597,11 +1571,9 @@ type StructuredAggregationQuery_Aggregation_Count struct { func (x *StructuredAggregationQuery_Aggregation_Count) Reset() { *x = StructuredAggregationQuery_Aggregation_Count{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredAggregationQuery_Aggregation_Count) String() string { @@ -1612,7 +1584,7 @@ func (*StructuredAggregationQuery_Aggregation_Count) ProtoMessage() {} func (x *StructuredAggregationQuery_Aggregation_Count) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,11 +1638,9 @@ type StructuredAggregationQuery_Aggregation_Sum struct { func (x *StructuredAggregationQuery_Aggregation_Sum) Reset() { *x = StructuredAggregationQuery_Aggregation_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredAggregationQuery_Aggregation_Sum) String() string { @@ -1681,7 +1651,7 @@ func (*StructuredAggregationQuery_Aggregation_Sum) ProtoMessage() {} func (x *StructuredAggregationQuery_Aggregation_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1725,11 +1695,9 @@ type StructuredAggregationQuery_Aggregation_Avg struct { func (x *StructuredAggregationQuery_Aggregation_Avg) Reset() { *x = StructuredAggregationQuery_Aggregation_Avg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructuredAggregationQuery_Aggregation_Avg) String() string { @@ -1740,7 +1708,7 @@ func (*StructuredAggregationQuery_Aggregation_Avg) ProtoMessage() {} func (x *StructuredAggregationQuery_Aggregation_Avg) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2113,200 +2081,6 @@ func file_google_firestore_v1_query_proto_init() { return } file_google_firestore_v1_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_query_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StructuredAggregationQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Cursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_CollectionSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_CompositeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_FieldFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_UnaryFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_Order); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_FieldReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_Projection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StructuredQuery_FindNearest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StructuredAggregationQuery_Aggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StructuredAggregationQuery_Aggregation_Count); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StructuredAggregationQuery_Aggregation_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StructuredAggregationQuery_Aggregation_Avg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_v1_query_proto_msgTypes[1].OneofWrappers = []any{ (*StructuredAggregationQuery_StructuredQuery)(nil), } diff --git a/firestore/apiv1/firestorepb/query_profile.pb.go b/firestore/apiv1/firestorepb/query_profile.pb.go index e203dafa0670..2c62a1b120cb 100755 --- a/firestore/apiv1/firestorepb/query_profile.pb.go +++ b/firestore/apiv1/firestorepb/query_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/query_profile.proto @@ -56,11 +56,9 @@ type ExplainOptions struct { func (x *ExplainOptions) Reset() { *x = ExplainOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainOptions) String() string { @@ -71,7 +69,7 @@ func (*ExplainOptions) ProtoMessage() {} func (x *ExplainOptions) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type ExplainMetrics struct { func (x *ExplainMetrics) Reset() { *x = ExplainMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_profile_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainMetrics) String() string { @@ -124,7 +120,7 @@ func (*ExplainMetrics) ProtoMessage() {} func (x *ExplainMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_profile_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +166,9 @@ type PlanSummary struct { func (x *PlanSummary) Reset() { *x = PlanSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_profile_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanSummary) String() string { @@ -185,7 +179,7 @@ func (*PlanSummary) ProtoMessage() {} func (x *PlanSummary) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_profile_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +232,9 @@ type ExecutionStats struct { func (x *ExecutionStats) Reset() { *x = ExecutionStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_query_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_query_profile_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionStats) String() string { @@ -253,7 +245,7 @@ func (*ExecutionStats) ProtoMessage() {} func (x *ExecutionStats) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_query_profile_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,56 +388,6 @@ func file_google_firestore_v1_query_profile_proto_init() { if File_google_firestore_v1_query_profile_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_query_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExplainOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_profile_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplainMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_profile_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PlanSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_query_profile_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/firestore/apiv1/firestorepb/write.pb.go b/firestore/apiv1/firestorepb/write.pb.go index 836f23b16df3..20d0fc3578c3 100755 --- a/firestore/apiv1/firestorepb/write.pb.go +++ b/firestore/apiv1/firestorepb/write.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/firestore/v1/write.proto @@ -126,11 +126,9 @@ type Write struct { func (x *Write) Reset() { *x = Write{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Write) String() string { @@ -141,7 +139,7 @@ func (*Write) ProtoMessage() {} func (x *Write) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type DocumentTransform struct { func (x *DocumentTransform) Reset() { *x = DocumentTransform{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentTransform) String() string { @@ -262,7 +258,7 @@ func (*DocumentTransform) ProtoMessage() {} func (x *DocumentTransform) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +307,9 @@ type WriteResult struct { func (x *WriteResult) Reset() { *x = WriteResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteResult) String() string { @@ -326,7 +320,7 @@ func (*WriteResult) ProtoMessage() {} func (x *WriteResult) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +374,9 @@ type DocumentChange struct { func (x *DocumentChange) Reset() { *x = DocumentChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentChange) String() string { @@ -395,7 +387,7 @@ func (*DocumentChange) ProtoMessage() {} func (x *DocumentChange) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +449,9 @@ type DocumentDelete struct { func (x *DocumentDelete) Reset() { *x = DocumentDelete{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentDelete) String() string { @@ -472,7 +462,7 @@ func (*DocumentDelete) ProtoMessage() {} func (x *DocumentDelete) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +526,9 @@ type DocumentRemove struct { func (x *DocumentRemove) Reset() { *x = DocumentRemove{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentRemove) String() string { @@ -551,7 +539,7 @@ func (*DocumentRemove) ProtoMessage() {} func (x *DocumentRemove) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +610,9 @@ type ExistenceFilter struct { func (x *ExistenceFilter) Reset() { *x = ExistenceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExistenceFilter) String() string { @@ -637,7 +623,7 @@ func (*ExistenceFilter) ProtoMessage() {} func (x *ExistenceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +684,9 @@ type DocumentTransform_FieldTransform struct { func (x *DocumentTransform_FieldTransform) Reset() { *x = DocumentTransform_FieldTransform{} - if protoimpl.UnsafeEnabled { - mi := &file_google_firestore_v1_write_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_firestore_v1_write_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentTransform_FieldTransform) String() string { @@ -713,7 +697,7 @@ func (*DocumentTransform_FieldTransform) ProtoMessage() {} func (x *DocumentTransform_FieldTransform) ProtoReflect() protoreflect.Message { mi := &file_google_firestore_v1_write_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,104 +1086,6 @@ func file_google_firestore_v1_write_proto_init() { file_google_firestore_v1_bloom_filter_proto_init() file_google_firestore_v1_common_proto_init() file_google_firestore_v1_document_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_firestore_v1_write_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Write); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DocumentTransform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DocumentChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DocumentDelete); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DocumentRemove); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExistenceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_firestore_v1_write_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DocumentTransform_FieldTransform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_firestore_v1_write_proto_msgTypes[0].OneofWrappers = []any{ (*Write_Update)(nil), (*Write_Delete)(nil), diff --git a/firestore/apiv1/helpers.go b/firestore/apiv1/helpers.go index d45d1d36390e..41291e1880c9 100755 --- a/firestore/apiv1/helpers.go +++ b/firestore/apiv1/helpers.go @@ -18,10 +18,20 @@ package firestore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "firestore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/datastore", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/functions/apiv1/cloud_functions_client.go b/functions/apiv1/cloud_functions_client.go index d36bd5a900c7..980587eb44ef 100755 --- a/functions/apiv1/cloud_functions_client.go +++ b/functions/apiv1/cloud_functions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -438,6 +437,8 @@ type cloudFunctionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudFunctionsClient creates a new cloud functions service client based on gRPC. @@ -464,6 +465,7 @@ func NewCloudFunctionsClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, cloudFunctionsClient: functionspb.NewCloudFunctionsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -528,6 +530,8 @@ type cloudFunctionsRESTClient struct { // Points back to the CallOptions field of the containing CloudFunctionsClient CallOptions **CloudFunctionsCallOptions + + logger *slog.Logger } // NewCloudFunctionsRESTClient creates a new cloud functions service rest client. @@ -545,6 +549,7 @@ func NewCloudFunctionsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -618,7 +623,7 @@ func (c *cloudFunctionsGRPCClient) ListFunctions(ctx context.Context, req *funct } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.ListFunctions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.ListFunctions, req, settings.GRPC, c.logger, "ListFunctions") return err }, opts...) if err != nil { @@ -653,7 +658,7 @@ func (c *cloudFunctionsGRPCClient) GetFunction(ctx context.Context, req *functio var resp *functionspb.CloudFunction err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.GetFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.GetFunction, req, settings.GRPC, c.logger, "GetFunction") return err }, opts...) if err != nil { @@ -671,7 +676,7 @@ func (c *cloudFunctionsGRPCClient) CreateFunction(ctx context.Context, req *func var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.CreateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.CreateFunction, req, settings.GRPC, c.logger, "CreateFunction") return err }, opts...) if err != nil { @@ -691,7 +696,7 @@ func (c *cloudFunctionsGRPCClient) UpdateFunction(ctx context.Context, req *func var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.UpdateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.UpdateFunction, req, settings.GRPC, c.logger, "UpdateFunction") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *cloudFunctionsGRPCClient) DeleteFunction(ctx context.Context, req *func var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.DeleteFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.DeleteFunction, req, settings.GRPC, c.logger, "DeleteFunction") return err }, opts...) if err != nil { @@ -731,7 +736,7 @@ func (c *cloudFunctionsGRPCClient) CallFunction(ctx context.Context, req *functi var resp *functionspb.CallFunctionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.CallFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.CallFunction, req, settings.GRPC, c.logger, "CallFunction") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *cloudFunctionsGRPCClient) GenerateUploadUrl(ctx context.Context, req *f var resp *functionspb.GenerateUploadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.GenerateUploadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.GenerateUploadUrl, req, settings.GRPC, c.logger, "GenerateUploadUrl") return err }, opts...) if err != nil { @@ -767,7 +772,7 @@ func (c *cloudFunctionsGRPCClient) GenerateDownloadUrl(ctx context.Context, req var resp *functionspb.GenerateDownloadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.GenerateDownloadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.GenerateDownloadUrl, req, settings.GRPC, c.logger, "GenerateDownloadUrl") return err }, opts...) if err != nil { @@ -785,7 +790,7 @@ func (c *cloudFunctionsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -803,7 +808,7 @@ func (c *cloudFunctionsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -821,7 +826,7 @@ func (c *cloudFunctionsGRPCClient) TestIamPermissions(ctx context.Context, req * var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudFunctionsClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudFunctionsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *cloudFunctionsGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *cloudFunctionsGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -911,7 +916,7 @@ func (c *cloudFunctionsGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -982,21 +987,10 @@ func (c *cloudFunctionsRESTClient) ListFunctions(ctx context.Context, req *funct } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFunctions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1062,17 +1056,7 @@ func (c *cloudFunctionsRESTClient) GetFunction(ctx context.Context, req *functio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFunction") if err != nil { return err } @@ -1130,21 +1114,10 @@ func (c *cloudFunctionsRESTClient) CreateFunction(ctx context.Context, req *func httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1208,21 +1181,10 @@ func (c *cloudFunctionsRESTClient) UpdateFunction(ctx context.Context, req *func httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1274,21 +1236,10 @@ func (c *cloudFunctionsRESTClient) DeleteFunction(ctx context.Context, req *func httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFunction") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1348,17 +1299,7 @@ func (c *cloudFunctionsRESTClient) CallFunction(ctx context.Context, req *functi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CallFunction") if err != nil { return err } @@ -1441,17 +1382,7 @@ func (c *cloudFunctionsRESTClient) GenerateUploadUrl(ctx context.Context, req *f httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateUploadUrl") if err != nil { return err } @@ -1511,17 +1442,7 @@ func (c *cloudFunctionsRESTClient) GenerateDownloadUrl(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateDownloadUrl") if err != nil { return err } @@ -1578,17 +1499,7 @@ func (c *cloudFunctionsRESTClient) SetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1643,17 +1554,7 @@ func (c *cloudFunctionsRESTClient) GetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1712,17 +1613,7 @@ func (c *cloudFunctionsRESTClient) TestIamPermissions(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1787,21 +1678,10 @@ func (c *cloudFunctionsRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1864,17 +1744,7 @@ func (c *cloudFunctionsRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1942,21 +1812,10 @@ func (c *cloudFunctionsRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/functions/apiv1/cloud_functions_client_example_go123_test.go b/functions/apiv1/cloud_functions_client_example_go123_test.go index 84aa4fbc5f67..c512535af9bb 100644 --- a/functions/apiv1/cloud_functions_client_example_go123_test.go +++ b/functions/apiv1/cloud_functions_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudFunctionsClient_ListFunctions_all() { } for resp, err := range c.ListFunctions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudFunctionsClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudFunctionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/functions/apiv1/functionspb/functions.pb.go b/functions/apiv1/functionspb/functions.pb.go index 67a7eaa57fac..2ff06684e3e2 100755 --- a/functions/apiv1/functionspb/functions.pb.go +++ b/functions/apiv1/functionspb/functions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/functions/v1/functions.proto @@ -537,11 +537,9 @@ type CloudFunction struct { func (x *CloudFunction) Reset() { *x = CloudFunction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudFunction) String() string { @@ -552,7 +550,7 @@ func (*CloudFunction) ProtoMessage() {} func (x *CloudFunction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +936,9 @@ type SourceRepository struct { func (x *SourceRepository) Reset() { *x = SourceRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceRepository) String() string { @@ -953,7 +949,7 @@ func (*SourceRepository) ProtoMessage() {} func (x *SourceRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +992,9 @@ type HttpsTrigger struct { func (x *HttpsTrigger) Reset() { *x = HttpsTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpsTrigger) String() string { @@ -1011,7 +1005,7 @@ func (*HttpsTrigger) ProtoMessage() {} func (x *HttpsTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1089,9 @@ type EventTrigger struct { func (x *EventTrigger) Reset() { *x = EventTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventTrigger) String() string { @@ -1110,7 +1102,7 @@ func (*EventTrigger) ProtoMessage() {} func (x *EventTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1170,11 +1162,9 @@ type FailurePolicy struct { func (x *FailurePolicy) Reset() { *x = FailurePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailurePolicy) String() string { @@ -1185,7 +1175,7 @@ func (*FailurePolicy) ProtoMessage() {} func (x *FailurePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1240,9 @@ type SecretEnvVar struct { func (x *SecretEnvVar) Reset() { *x = SecretEnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretEnvVar) String() string { @@ -1265,7 +1253,7 @@ func (*SecretEnvVar) ProtoMessage() {} func (x *SecretEnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1341,11 +1329,9 @@ type SecretVolume struct { func (x *SecretVolume) Reset() { *x = SecretVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume) String() string { @@ -1356,7 +1342,7 @@ func (*SecretVolume) ProtoMessage() {} func (x *SecretVolume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1414,11 +1400,9 @@ type CreateFunctionRequest struct { func (x *CreateFunctionRequest) Reset() { *x = CreateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFunctionRequest) String() string { @@ -1429,7 +1413,7 @@ func (*CreateFunctionRequest) ProtoMessage() {} func (x *CreateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1472,11 +1456,9 @@ type UpdateFunctionRequest struct { func (x *UpdateFunctionRequest) Reset() { *x = UpdateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFunctionRequest) String() string { @@ -1487,7 +1469,7 @@ func (*UpdateFunctionRequest) ProtoMessage() {} func (x *UpdateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1535,11 +1517,9 @@ type GetFunctionRequest struct { func (x *GetFunctionRequest) Reset() { *x = GetFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFunctionRequest) String() string { @@ -1550,7 +1530,7 @@ func (*GetFunctionRequest) ProtoMessage() {} func (x *GetFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1603,11 +1583,9 @@ type ListFunctionsRequest struct { func (x *ListFunctionsRequest) Reset() { *x = ListFunctionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsRequest) String() string { @@ -1618,7 +1596,7 @@ func (*ListFunctionsRequest) ProtoMessage() {} func (x *ListFunctionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1652,9 @@ type ListFunctionsResponse struct { func (x *ListFunctionsResponse) Reset() { *x = ListFunctionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsResponse) String() string { @@ -1689,7 +1665,7 @@ func (*ListFunctionsResponse) ProtoMessage() {} func (x *ListFunctionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1713,9 @@ type DeleteFunctionRequest struct { func (x *DeleteFunctionRequest) Reset() { *x = DeleteFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFunctionRequest) String() string { @@ -1752,7 +1726,7 @@ func (*DeleteFunctionRequest) ProtoMessage() {} func (x *DeleteFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1788,11 +1762,9 @@ type CallFunctionRequest struct { func (x *CallFunctionRequest) Reset() { *x = CallFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CallFunctionRequest) String() string { @@ -1803,7 +1775,7 @@ func (*CallFunctionRequest) ProtoMessage() {} func (x *CallFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1850,11 +1822,9 @@ type CallFunctionResponse struct { func (x *CallFunctionResponse) Reset() { *x = CallFunctionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CallFunctionResponse) String() string { @@ -1865,7 +1835,7 @@ func (*CallFunctionResponse) ProtoMessage() {} func (x *CallFunctionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1932,11 +1902,9 @@ type GenerateUploadUrlRequest struct { func (x *GenerateUploadUrlRequest) Reset() { *x = GenerateUploadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlRequest) String() string { @@ -1947,7 +1915,7 @@ func (*GenerateUploadUrlRequest) ProtoMessage() {} func (x *GenerateUploadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1990,11 +1958,9 @@ type GenerateUploadUrlResponse struct { func (x *GenerateUploadUrlResponse) Reset() { *x = GenerateUploadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlResponse) String() string { @@ -2005,7 +1971,7 @@ func (*GenerateUploadUrlResponse) ProtoMessage() {} func (x *GenerateUploadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2043,11 +2009,9 @@ type GenerateDownloadUrlRequest struct { func (x *GenerateDownloadUrlRequest) Reset() { *x = GenerateDownloadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlRequest) String() string { @@ -2058,7 +2022,7 @@ func (*GenerateDownloadUrlRequest) ProtoMessage() {} func (x *GenerateDownloadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,11 +2064,9 @@ type GenerateDownloadUrlResponse struct { func (x *GenerateDownloadUrlResponse) Reset() { *x = GenerateDownloadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlResponse) String() string { @@ -2115,7 +2077,7 @@ func (*GenerateDownloadUrlResponse) ProtoMessage() {} func (x *GenerateDownloadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2147,11 +2109,9 @@ type CloudFunction_AutomaticUpdatePolicy struct { func (x *CloudFunction_AutomaticUpdatePolicy) Reset() { *x = CloudFunction_AutomaticUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudFunction_AutomaticUpdatePolicy) String() string { @@ -2162,7 +2122,7 @@ func (*CloudFunction_AutomaticUpdatePolicy) ProtoMessage() {} func (x *CloudFunction_AutomaticUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2190,11 +2150,9 @@ type CloudFunction_OnDeployUpdatePolicy struct { func (x *CloudFunction_OnDeployUpdatePolicy) Reset() { *x = CloudFunction_OnDeployUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudFunction_OnDeployUpdatePolicy) String() string { @@ -2205,7 +2163,7 @@ func (*CloudFunction_OnDeployUpdatePolicy) ProtoMessage() {} func (x *CloudFunction_OnDeployUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2240,11 +2198,9 @@ type FailurePolicy_Retry struct { func (x *FailurePolicy_Retry) Reset() { *x = FailurePolicy_Retry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailurePolicy_Retry) String() string { @@ -2255,7 +2211,7 @@ func (*FailurePolicy_Retry) ProtoMessage() {} func (x *FailurePolicy_Retry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2289,11 +2245,9 @@ type SecretVolume_SecretVersion struct { func (x *SecretVolume_SecretVersion) Reset() { *x = SecretVolume_SecretVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume_SecretVersion) String() string { @@ -2304,7 +2258,7 @@ func (*SecretVolume_SecretVersion) ProtoMessage() {} func (x *SecretVolume_SecretVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_functions_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3004,284 +2958,6 @@ func file_google_cloud_functions_v1_functions_proto_init() { return } file_google_cloud_functions_v1_operations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_functions_v1_functions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudFunction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SourceRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HttpsTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EventTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FailurePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SecretEnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CallFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CallFunctionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CloudFunction_AutomaticUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CloudFunction_OnDeployUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FailurePolicy_Retry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v1_functions_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume_SecretVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_functions_v1_functions_proto_msgTypes[0].OneofWrappers = []any{ (*CloudFunction_SourceArchiveUrl)(nil), (*CloudFunction_SourceRepository)(nil), diff --git a/functions/apiv1/functionspb/operations.pb.go b/functions/apiv1/functionspb/operations.pb.go index 1ec9b63f6641..bb53b6ba4b72 100755 --- a/functions/apiv1/functionspb/operations.pb.go +++ b/functions/apiv1/functionspb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/functions/v1/operations.proto @@ -126,11 +126,9 @@ type OperationMetadataV1 struct { func (x *OperationMetadataV1) Reset() { *x = OperationMetadataV1{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadataV1) String() string { @@ -141,7 +139,7 @@ func (*OperationMetadataV1) ProtoMessage() {} func (x *OperationMetadataV1) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,20 +296,6 @@ func file_google_cloud_functions_v1_operations_proto_init() { if File_google_cloud_functions_v1_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_functions_v1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadataV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/functions/apiv1/helpers.go b/functions/apiv1/helpers.go index e7661dc2f4a0..55a53082ff9f 100755 --- a/functions/apiv1/helpers.go +++ b/functions/apiv1/helpers.go @@ -18,10 +18,20 @@ package functions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudfunctions.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/functions/apiv2/function_client.go b/functions/apiv2/function_client.go index 90af5dd8f950..74d73fae6366 100755 --- a/functions/apiv2/function_client.go +++ b/functions/apiv2/function_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -341,6 +340,8 @@ type functionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFunctionClient creates a new function service client based on gRPC. @@ -372,6 +373,7 @@ func NewFunctionClient(ctx context.Context, opts ...option.ClientOption) (*Funct connPool: connPool, functionClient: functionspb.NewFunctionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -437,6 +439,8 @@ type functionRESTClient struct { // Points back to the CallOptions field of the containing FunctionClient CallOptions **FunctionCallOptions + + logger *slog.Logger } // NewFunctionRESTClient creates a new function service rest client. @@ -459,6 +463,7 @@ func NewFunctionRESTClient(ctx context.Context, opts ...option.ClientOption) (*F endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -521,7 +526,7 @@ func (c *functionGRPCClient) GetFunction(ctx context.Context, req *functionspb.G var resp *functionspb.Function err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GetFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GetFunction, req, settings.GRPC, c.logger, "GetFunction") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *functionGRPCClient) ListFunctions(ctx context.Context, req *functionspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.ListFunctions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.ListFunctions, req, settings.GRPC, c.logger, "ListFunctions") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *functionGRPCClient) CreateFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.CreateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.CreateFunction, req, settings.GRPC, c.logger, "CreateFunction") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *functionGRPCClient) UpdateFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.UpdateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.UpdateFunction, req, settings.GRPC, c.logger, "UpdateFunction") return err }, opts...) if err != nil { @@ -625,7 +630,7 @@ func (c *functionGRPCClient) DeleteFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.DeleteFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.DeleteFunction, req, settings.GRPC, c.logger, "DeleteFunction") return err }, opts...) if err != nil { @@ -645,7 +650,7 @@ func (c *functionGRPCClient) GenerateUploadUrl(ctx context.Context, req *functio var resp *functionspb.GenerateUploadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GenerateUploadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GenerateUploadUrl, req, settings.GRPC, c.logger, "GenerateUploadUrl") return err }, opts...) if err != nil { @@ -663,7 +668,7 @@ func (c *functionGRPCClient) GenerateDownloadUrl(ctx context.Context, req *funct var resp *functionspb.GenerateDownloadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GenerateDownloadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GenerateDownloadUrl, req, settings.GRPC, c.logger, "GenerateDownloadUrl") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *functionGRPCClient) ListRuntimes(ctx context.Context, req *functionspb. var resp *functionspb.ListRuntimesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.ListRuntimes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.ListRuntimes, req, settings.GRPC, c.logger, "ListRuntimes") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *functionGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *functionGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *functionGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *functionGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -799,7 +804,7 @@ func (c *functionGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *functionGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -890,17 +895,7 @@ func (c *functionRESTClient) GetFunction(ctx context.Context, req *functionspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFunction") if err != nil { return err } @@ -968,21 +963,10 @@ func (c *functionRESTClient) ListFunctions(ctx context.Context, req *functionspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFunctions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1056,21 +1040,10 @@ func (c *functionRESTClient) CreateFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1134,21 +1107,10 @@ func (c *functionRESTClient) UpdateFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1200,21 +1162,10 @@ func (c *functionRESTClient) DeleteFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFunction") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1294,17 +1245,7 @@ func (c *functionRESTClient) GenerateUploadUrl(ctx context.Context, req *functio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateUploadUrl") if err != nil { return err } @@ -1364,17 +1305,7 @@ func (c *functionRESTClient) GenerateDownloadUrl(ctx context.Context, req *funct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateDownloadUrl") if err != nil { return err } @@ -1427,17 +1358,7 @@ func (c *functionRESTClient) ListRuntimes(ctx context.Context, req *functionspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRuntimes") if err != nil { return err } @@ -1502,21 +1423,10 @@ func (c *functionRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1583,17 +1493,7 @@ func (c *functionRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1653,17 +1553,7 @@ func (c *functionRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1725,17 +1615,7 @@ func (c *functionRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1785,17 +1665,7 @@ func (c *functionRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1860,21 +1730,10 @@ func (c *functionRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/functions/apiv2/function_client_example_go123_test.go b/functions/apiv2/function_client_example_go123_test.go index 60b2dbad538b..dd0c66f4d5ad 100644 --- a/functions/apiv2/function_client_example_go123_test.go +++ b/functions/apiv2/function_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFunctionClient_ListFunctions_all() { } for resp, err := range c.ListFunctions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFunctionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFunctionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/functions/apiv2/functionspb/functions.pb.go b/functions/apiv2/functionspb/functions.pb.go index 0188bf3ddeb0..42c9ac9b24cf 100755 --- a/functions/apiv2/functionspb/functions.pb.go +++ b/functions/apiv2/functionspb/functions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/functions/v2/functions.proto @@ -815,11 +815,9 @@ type Function struct { func (x *Function) Reset() { *x = Function{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Function) String() string { @@ -830,7 +828,7 @@ func (*Function) ProtoMessage() {} func (x *Function) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +957,9 @@ type StateMessage struct { func (x *StateMessage) Reset() { *x = StateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StateMessage) String() string { @@ -974,7 +970,7 @@ func (*StateMessage) ProtoMessage() {} func (x *StateMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1032,9 @@ type StorageSource struct { func (x *StorageSource) Reset() { *x = StorageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageSource) String() string { @@ -1051,7 +1045,7 @@ func (*StorageSource) ProtoMessage() {} func (x *StorageSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1121,9 @@ type RepoSource struct { func (x *RepoSource) Reset() { *x = RepoSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepoSource) String() string { @@ -1142,7 +1134,7 @@ func (*RepoSource) ProtoMessage() {} func (x *RepoSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1255,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -1278,7 +1268,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1359,9 @@ type SourceProvenance struct { func (x *SourceProvenance) Reset() { *x = SourceProvenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceProvenance) String() string { @@ -1384,7 +1372,7 @@ func (*SourceProvenance) ProtoMessage() {} func (x *SourceProvenance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1497,11 +1485,9 @@ type BuildConfig struct { func (x *BuildConfig) Reset() { *x = BuildConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildConfig) String() string { @@ -1512,7 +1498,7 @@ func (*BuildConfig) ProtoMessage() {} func (x *BuildConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,11 +1714,9 @@ type ServiceConfig struct { func (x *ServiceConfig) Reset() { *x = ServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceConfig) String() string { @@ -1743,7 +1727,7 @@ func (*ServiceConfig) ProtoMessage() {} func (x *ServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1916,11 +1900,9 @@ type SecretEnvVar struct { func (x *SecretEnvVar) Reset() { *x = SecretEnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretEnvVar) String() string { @@ -1931,7 +1913,7 @@ func (*SecretEnvVar) ProtoMessage() {} func (x *SecretEnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2002,11 +1984,9 @@ type SecretVolume struct { func (x *SecretVolume) Reset() { *x = SecretVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume) String() string { @@ -2017,7 +1997,7 @@ func (*SecretVolume) ProtoMessage() {} func (x *SecretVolume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,11 +2095,9 @@ type EventTrigger struct { func (x *EventTrigger) Reset() { *x = EventTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventTrigger) String() string { @@ -2130,7 +2108,7 @@ func (*EventTrigger) ProtoMessage() {} func (x *EventTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2227,11 +2205,9 @@ type EventFilter struct { func (x *EventFilter) Reset() { *x = EventFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventFilter) String() string { @@ -2242,7 +2218,7 @@ func (*EventFilter) ProtoMessage() {} func (x *EventFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2297,11 +2273,9 @@ type GetFunctionRequest struct { func (x *GetFunctionRequest) Reset() { *x = GetFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFunctionRequest) String() string { @@ -2312,7 +2286,7 @@ func (*GetFunctionRequest) ProtoMessage() {} func (x *GetFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2375,11 +2349,9 @@ type ListFunctionsRequest struct { func (x *ListFunctionsRequest) Reset() { *x = ListFunctionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsRequest) String() string { @@ -2390,7 +2362,7 @@ func (*ListFunctionsRequest) ProtoMessage() {} func (x *ListFunctionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2458,11 +2430,9 @@ type ListFunctionsResponse struct { func (x *ListFunctionsResponse) Reset() { *x = ListFunctionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsResponse) String() string { @@ -2473,7 +2443,7 @@ func (*ListFunctionsResponse) ProtoMessage() {} func (x *ListFunctionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2530,11 +2500,9 @@ type CreateFunctionRequest struct { func (x *CreateFunctionRequest) Reset() { *x = CreateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFunctionRequest) String() string { @@ -2545,7 +2513,7 @@ func (*CreateFunctionRequest) ProtoMessage() {} func (x *CreateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2596,11 +2564,9 @@ type UpdateFunctionRequest struct { func (x *UpdateFunctionRequest) Reset() { *x = UpdateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFunctionRequest) String() string { @@ -2611,7 +2577,7 @@ func (*UpdateFunctionRequest) ProtoMessage() {} func (x *UpdateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2652,11 +2618,9 @@ type DeleteFunctionRequest struct { func (x *DeleteFunctionRequest) Reset() { *x = DeleteFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFunctionRequest) String() string { @@ -2667,7 +2631,7 @@ func (*DeleteFunctionRequest) ProtoMessage() {} func (x *DeleteFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2723,11 +2687,9 @@ type GenerateUploadUrlRequest struct { func (x *GenerateUploadUrlRequest) Reset() { *x = GenerateUploadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlRequest) String() string { @@ -2738,7 +2700,7 @@ func (*GenerateUploadUrlRequest) ProtoMessage() {} func (x *GenerateUploadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2797,11 +2759,9 @@ type GenerateUploadUrlResponse struct { func (x *GenerateUploadUrlResponse) Reset() { *x = GenerateUploadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlResponse) String() string { @@ -2812,7 +2772,7 @@ func (*GenerateUploadUrlResponse) ProtoMessage() {} func (x *GenerateUploadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2854,11 +2814,9 @@ type GenerateDownloadUrlRequest struct { func (x *GenerateDownloadUrlRequest) Reset() { *x = GenerateDownloadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlRequest) String() string { @@ -2869,7 +2827,7 @@ func (*GenerateDownloadUrlRequest) ProtoMessage() {} func (x *GenerateDownloadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2904,11 +2862,9 @@ type GenerateDownloadUrlResponse struct { func (x *GenerateDownloadUrlResponse) Reset() { *x = GenerateDownloadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlResponse) String() string { @@ -2919,7 +2875,7 @@ func (*GenerateDownloadUrlResponse) ProtoMessage() {} func (x *GenerateDownloadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2957,11 +2913,9 @@ type ListRuntimesRequest struct { func (x *ListRuntimesRequest) Reset() { *x = ListRuntimesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesRequest) String() string { @@ -2972,7 +2926,7 @@ func (*ListRuntimesRequest) ProtoMessage() {} func (x *ListRuntimesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3013,11 +2967,9 @@ type ListRuntimesResponse struct { func (x *ListRuntimesResponse) Reset() { *x = ListRuntimesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesResponse) String() string { @@ -3028,7 +2980,7 @@ func (*ListRuntimesResponse) ProtoMessage() {} func (x *ListRuntimesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3060,11 +3012,9 @@ type AutomaticUpdatePolicy struct { func (x *AutomaticUpdatePolicy) Reset() { *x = AutomaticUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomaticUpdatePolicy) String() string { @@ -3075,7 +3025,7 @@ func (*AutomaticUpdatePolicy) ProtoMessage() {} func (x *AutomaticUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3103,11 +3053,9 @@ type OnDeployUpdatePolicy struct { func (x *OnDeployUpdatePolicy) Reset() { *x = OnDeployUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnDeployUpdatePolicy) String() string { @@ -3118,7 +3066,7 @@ func (*OnDeployUpdatePolicy) ProtoMessage() {} func (x *OnDeployUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3180,11 +3128,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3195,7 +3141,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3306,11 +3252,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -3321,7 +3265,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3365,11 +3309,9 @@ type Stage struct { func (x *Stage) Reset() { *x = Stage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stage) String() string { @@ -3380,7 +3322,7 @@ func (*Stage) ProtoMessage() {} func (x *Stage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3456,11 +3398,9 @@ type SecretVolume_SecretVersion struct { func (x *SecretVolume_SecretVersion) Reset() { *x = SecretVolume_SecretVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume_SecretVersion) String() string { @@ -3471,7 +3411,7 @@ func (*SecretVolume_SecretVersion) ProtoMessage() {} func (x *SecretVolume_SecretVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3525,11 +3465,9 @@ type ListRuntimesResponse_Runtime struct { func (x *ListRuntimesResponse_Runtime) Reset() { *x = ListRuntimesResponse_Runtime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesResponse_Runtime) String() string { @@ -3540,7 +3478,7 @@ func (*ListRuntimesResponse_Runtime) ProtoMessage() {} func (x *ListRuntimesResponse_Runtime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2_functions_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4572,380 +4510,6 @@ func file_google_cloud_functions_v2_functions_proto_init() { if File_google_cloud_functions_v2_functions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_functions_v2_functions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Function); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StorageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RepoSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SourceProvenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BuildConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecretEnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*EventTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EventFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AutomaticUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*OnDeployUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Stage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume_SecretVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2_functions_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesResponse_Runtime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_functions_v2_functions_proto_msgTypes[3].OneofWrappers = []any{ (*RepoSource_BranchName)(nil), (*RepoSource_TagName)(nil), diff --git a/functions/apiv2/helpers.go b/functions/apiv2/helpers.go index e7661dc2f4a0..55a53082ff9f 100755 --- a/functions/apiv2/helpers.go +++ b/functions/apiv2/helpers.go @@ -18,10 +18,20 @@ package functions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudfunctions.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/functions/apiv2beta/function_client.go b/functions/apiv2beta/function_client.go index 9a8742b3d3d8..76cb69274e07 100755 --- a/functions/apiv2beta/function_client.go +++ b/functions/apiv2beta/function_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -341,6 +340,8 @@ type functionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFunctionClient creates a new function service client based on gRPC. @@ -372,6 +373,7 @@ func NewFunctionClient(ctx context.Context, opts ...option.ClientOption) (*Funct connPool: connPool, functionClient: functionspb.NewFunctionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -437,6 +439,8 @@ type functionRESTClient struct { // Points back to the CallOptions field of the containing FunctionClient CallOptions **FunctionCallOptions + + logger *slog.Logger } // NewFunctionRESTClient creates a new function service rest client. @@ -459,6 +463,7 @@ func NewFunctionRESTClient(ctx context.Context, opts ...option.ClientOption) (*F endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -521,7 +526,7 @@ func (c *functionGRPCClient) GetFunction(ctx context.Context, req *functionspb.G var resp *functionspb.Function err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GetFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GetFunction, req, settings.GRPC, c.logger, "GetFunction") return err }, opts...) if err != nil { @@ -550,7 +555,7 @@ func (c *functionGRPCClient) ListFunctions(ctx context.Context, req *functionspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.ListFunctions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.ListFunctions, req, settings.GRPC, c.logger, "ListFunctions") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *functionGRPCClient) CreateFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.CreateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.CreateFunction, req, settings.GRPC, c.logger, "CreateFunction") return err }, opts...) if err != nil { @@ -605,7 +610,7 @@ func (c *functionGRPCClient) UpdateFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.UpdateFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.UpdateFunction, req, settings.GRPC, c.logger, "UpdateFunction") return err }, opts...) if err != nil { @@ -625,7 +630,7 @@ func (c *functionGRPCClient) DeleteFunction(ctx context.Context, req *functionsp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.DeleteFunction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.DeleteFunction, req, settings.GRPC, c.logger, "DeleteFunction") return err }, opts...) if err != nil { @@ -645,7 +650,7 @@ func (c *functionGRPCClient) GenerateUploadUrl(ctx context.Context, req *functio var resp *functionspb.GenerateUploadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GenerateUploadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GenerateUploadUrl, req, settings.GRPC, c.logger, "GenerateUploadUrl") return err }, opts...) if err != nil { @@ -663,7 +668,7 @@ func (c *functionGRPCClient) GenerateDownloadUrl(ctx context.Context, req *funct var resp *functionspb.GenerateDownloadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.GenerateDownloadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.GenerateDownloadUrl, req, settings.GRPC, c.logger, "GenerateDownloadUrl") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *functionGRPCClient) ListRuntimes(ctx context.Context, req *functionspb. var resp *functionspb.ListRuntimesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.functionClient.ListRuntimes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.functionClient.ListRuntimes, req, settings.GRPC, c.logger, "ListRuntimes") return err }, opts...) if err != nil { @@ -710,7 +715,7 @@ func (c *functionGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *functionGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *functionGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *functionGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -799,7 +804,7 @@ func (c *functionGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *functionGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -890,17 +895,7 @@ func (c *functionRESTClient) GetFunction(ctx context.Context, req *functionspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFunction") if err != nil { return err } @@ -968,21 +963,10 @@ func (c *functionRESTClient) ListFunctions(ctx context.Context, req *functionspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFunctions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1056,21 +1040,10 @@ func (c *functionRESTClient) CreateFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1134,21 +1107,10 @@ func (c *functionRESTClient) UpdateFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFunction") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1200,21 +1162,10 @@ func (c *functionRESTClient) DeleteFunction(ctx context.Context, req *functionsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFunction") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1294,17 +1245,7 @@ func (c *functionRESTClient) GenerateUploadUrl(ctx context.Context, req *functio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateUploadUrl") if err != nil { return err } @@ -1364,17 +1305,7 @@ func (c *functionRESTClient) GenerateDownloadUrl(ctx context.Context, req *funct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateDownloadUrl") if err != nil { return err } @@ -1427,17 +1358,7 @@ func (c *functionRESTClient) ListRuntimes(ctx context.Context, req *functionspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRuntimes") if err != nil { return err } @@ -1502,21 +1423,10 @@ func (c *functionRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1583,17 +1493,7 @@ func (c *functionRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1653,17 +1553,7 @@ func (c *functionRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1725,17 +1615,7 @@ func (c *functionRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1785,17 +1665,7 @@ func (c *functionRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1860,21 +1730,10 @@ func (c *functionRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/functions/apiv2beta/function_client_example_go123_test.go b/functions/apiv2beta/function_client_example_go123_test.go index bc822479a99e..42e12ee43a8a 100644 --- a/functions/apiv2beta/function_client_example_go123_test.go +++ b/functions/apiv2beta/function_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleFunctionClient_ListFunctions_all() { } for resp, err := range c.ListFunctions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleFunctionClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleFunctionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/functions/apiv2beta/functionspb/functions.pb.go b/functions/apiv2beta/functionspb/functions.pb.go index 59fee041396b..5f1eb7e2639b 100755 --- a/functions/apiv2beta/functionspb/functions.pb.go +++ b/functions/apiv2beta/functionspb/functions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/functions/v2beta/functions.proto @@ -815,11 +815,9 @@ type Function struct { func (x *Function) Reset() { *x = Function{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Function) String() string { @@ -830,7 +828,7 @@ func (*Function) ProtoMessage() {} func (x *Function) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +957,9 @@ type StateMessage struct { func (x *StateMessage) Reset() { *x = StateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StateMessage) String() string { @@ -974,7 +970,7 @@ func (*StateMessage) ProtoMessage() {} func (x *StateMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1032,9 @@ type StorageSource struct { func (x *StorageSource) Reset() { *x = StorageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageSource) String() string { @@ -1051,7 +1045,7 @@ func (*StorageSource) ProtoMessage() {} func (x *StorageSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1121,9 @@ type RepoSource struct { func (x *RepoSource) Reset() { *x = RepoSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepoSource) String() string { @@ -1142,7 +1134,7 @@ func (*RepoSource) ProtoMessage() {} func (x *RepoSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1255,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -1278,7 +1268,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1359,9 @@ type SourceProvenance struct { func (x *SourceProvenance) Reset() { *x = SourceProvenance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceProvenance) String() string { @@ -1384,7 +1372,7 @@ func (*SourceProvenance) ProtoMessage() {} func (x *SourceProvenance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1497,11 +1485,9 @@ type BuildConfig struct { func (x *BuildConfig) Reset() { *x = BuildConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildConfig) String() string { @@ -1512,7 +1498,7 @@ func (*BuildConfig) ProtoMessage() {} func (x *BuildConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,11 +1714,9 @@ type ServiceConfig struct { func (x *ServiceConfig) Reset() { *x = ServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceConfig) String() string { @@ -1743,7 +1727,7 @@ func (*ServiceConfig) ProtoMessage() {} func (x *ServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1916,11 +1900,9 @@ type SecretEnvVar struct { func (x *SecretEnvVar) Reset() { *x = SecretEnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretEnvVar) String() string { @@ -1931,7 +1913,7 @@ func (*SecretEnvVar) ProtoMessage() {} func (x *SecretEnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2002,11 +1984,9 @@ type SecretVolume struct { func (x *SecretVolume) Reset() { *x = SecretVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume) String() string { @@ -2017,7 +1997,7 @@ func (*SecretVolume) ProtoMessage() {} func (x *SecretVolume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,11 +2095,9 @@ type EventTrigger struct { func (x *EventTrigger) Reset() { *x = EventTrigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventTrigger) String() string { @@ -2130,7 +2108,7 @@ func (*EventTrigger) ProtoMessage() {} func (x *EventTrigger) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2227,11 +2205,9 @@ type EventFilter struct { func (x *EventFilter) Reset() { *x = EventFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventFilter) String() string { @@ -2242,7 +2218,7 @@ func (*EventFilter) ProtoMessage() {} func (x *EventFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2297,11 +2273,9 @@ type GetFunctionRequest struct { func (x *GetFunctionRequest) Reset() { *x = GetFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFunctionRequest) String() string { @@ -2312,7 +2286,7 @@ func (*GetFunctionRequest) ProtoMessage() {} func (x *GetFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2375,11 +2349,9 @@ type ListFunctionsRequest struct { func (x *ListFunctionsRequest) Reset() { *x = ListFunctionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsRequest) String() string { @@ -2390,7 +2362,7 @@ func (*ListFunctionsRequest) ProtoMessage() {} func (x *ListFunctionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2458,11 +2430,9 @@ type ListFunctionsResponse struct { func (x *ListFunctionsResponse) Reset() { *x = ListFunctionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFunctionsResponse) String() string { @@ -2473,7 +2443,7 @@ func (*ListFunctionsResponse) ProtoMessage() {} func (x *ListFunctionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2530,11 +2500,9 @@ type CreateFunctionRequest struct { func (x *CreateFunctionRequest) Reset() { *x = CreateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFunctionRequest) String() string { @@ -2545,7 +2513,7 @@ func (*CreateFunctionRequest) ProtoMessage() {} func (x *CreateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2596,11 +2564,9 @@ type UpdateFunctionRequest struct { func (x *UpdateFunctionRequest) Reset() { *x = UpdateFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFunctionRequest) String() string { @@ -2611,7 +2577,7 @@ func (*UpdateFunctionRequest) ProtoMessage() {} func (x *UpdateFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2652,11 +2618,9 @@ type DeleteFunctionRequest struct { func (x *DeleteFunctionRequest) Reset() { *x = DeleteFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFunctionRequest) String() string { @@ -2667,7 +2631,7 @@ func (*DeleteFunctionRequest) ProtoMessage() {} func (x *DeleteFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2723,11 +2687,9 @@ type GenerateUploadUrlRequest struct { func (x *GenerateUploadUrlRequest) Reset() { *x = GenerateUploadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlRequest) String() string { @@ -2738,7 +2700,7 @@ func (*GenerateUploadUrlRequest) ProtoMessage() {} func (x *GenerateUploadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2797,11 +2759,9 @@ type GenerateUploadUrlResponse struct { func (x *GenerateUploadUrlResponse) Reset() { *x = GenerateUploadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateUploadUrlResponse) String() string { @@ -2812,7 +2772,7 @@ func (*GenerateUploadUrlResponse) ProtoMessage() {} func (x *GenerateUploadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2854,11 +2814,9 @@ type GenerateDownloadUrlRequest struct { func (x *GenerateDownloadUrlRequest) Reset() { *x = GenerateDownloadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlRequest) String() string { @@ -2869,7 +2827,7 @@ func (*GenerateDownloadUrlRequest) ProtoMessage() {} func (x *GenerateDownloadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2904,11 +2862,9 @@ type GenerateDownloadUrlResponse struct { func (x *GenerateDownloadUrlResponse) Reset() { *x = GenerateDownloadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDownloadUrlResponse) String() string { @@ -2919,7 +2875,7 @@ func (*GenerateDownloadUrlResponse) ProtoMessage() {} func (x *GenerateDownloadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2957,11 +2913,9 @@ type ListRuntimesRequest struct { func (x *ListRuntimesRequest) Reset() { *x = ListRuntimesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesRequest) String() string { @@ -2972,7 +2926,7 @@ func (*ListRuntimesRequest) ProtoMessage() {} func (x *ListRuntimesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3013,11 +2967,9 @@ type ListRuntimesResponse struct { func (x *ListRuntimesResponse) Reset() { *x = ListRuntimesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesResponse) String() string { @@ -3028,7 +2980,7 @@ func (*ListRuntimesResponse) ProtoMessage() {} func (x *ListRuntimesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3060,11 +3012,9 @@ type AutomaticUpdatePolicy struct { func (x *AutomaticUpdatePolicy) Reset() { *x = AutomaticUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutomaticUpdatePolicy) String() string { @@ -3075,7 +3025,7 @@ func (*AutomaticUpdatePolicy) ProtoMessage() {} func (x *AutomaticUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3103,11 +3053,9 @@ type OnDeployUpdatePolicy struct { func (x *OnDeployUpdatePolicy) Reset() { *x = OnDeployUpdatePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnDeployUpdatePolicy) String() string { @@ -3118,7 +3066,7 @@ func (*OnDeployUpdatePolicy) ProtoMessage() {} func (x *OnDeployUpdatePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3177,11 +3125,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3192,7 +3138,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3296,11 +3242,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -3311,7 +3255,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3355,11 +3299,9 @@ type Stage struct { func (x *Stage) Reset() { *x = Stage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stage) String() string { @@ -3370,7 +3312,7 @@ func (*Stage) ProtoMessage() {} func (x *Stage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3446,11 +3388,9 @@ type SecretVolume_SecretVersion struct { func (x *SecretVolume_SecretVersion) Reset() { *x = SecretVolume_SecretVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolume_SecretVersion) String() string { @@ -3461,7 +3401,7 @@ func (*SecretVolume_SecretVersion) ProtoMessage() {} func (x *SecretVolume_SecretVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3515,11 +3455,9 @@ type ListRuntimesResponse_Runtime struct { func (x *ListRuntimesResponse_Runtime) Reset() { *x = ListRuntimesResponse_Runtime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesResponse_Runtime) String() string { @@ -3530,7 +3468,7 @@ func (*ListRuntimesResponse_Runtime) ProtoMessage() {} func (x *ListRuntimesResponse_Runtime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_functions_v2beta_functions_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4577,380 +4515,6 @@ func file_google_cloud_functions_v2beta_functions_proto_init() { if File_google_cloud_functions_v2beta_functions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_functions_v2beta_functions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Function); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StorageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RepoSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SourceProvenance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BuildConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecretEnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*EventTrigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EventFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListFunctionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateUploadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDownloadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AutomaticUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*OnDeployUpdatePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Stage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolume_SecretVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_functions_v2beta_functions_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesResponse_Runtime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_functions_v2beta_functions_proto_msgTypes[3].OneofWrappers = []any{ (*RepoSource_BranchName)(nil), (*RepoSource_TagName)(nil), diff --git a/functions/apiv2beta/helpers.go b/functions/apiv2beta/helpers.go index e7661dc2f4a0..55a53082ff9f 100755 --- a/functions/apiv2beta/helpers.go +++ b/functions/apiv2beta/helpers.go @@ -18,10 +18,20 @@ package functions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudfunctions.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/gkebackup/apiv1/backup_forgke_client.go b/gkebackup/apiv1/backup_forgke_client.go index 3145fc9a40b0..f9e31837bb24 100755 --- a/gkebackup/apiv1/backup_forgke_client.go +++ b/gkebackup/apiv1/backup_forgke_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -872,6 +871,8 @@ type backupForGKEGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBackupForGKEClient creates a new backup forgke client based on gRPC. @@ -899,6 +900,7 @@ func NewBackupForGKEClient(ctx context.Context, opts ...option.ClientOption) (*B connPool: connPool, backupForGKEClient: gkebackuppb.NewBackupForGKEClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -964,6 +966,8 @@ type backupForGKERESTClient struct { // Points back to the CallOptions field of the containing BackupForGKEClient CallOptions **BackupForGKECallOptions + + logger *slog.Logger } // NewBackupForGKERESTClient creates a new backup forgke rest client. @@ -982,6 +986,7 @@ func NewBackupForGKERESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1044,7 +1049,7 @@ func (c *backupForGKEGRPCClient) CreateBackupPlan(ctx context.Context, req *gkeb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.CreateBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.CreateBackupPlan, req, settings.GRPC, c.logger, "CreateBackupPlan") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *backupForGKEGRPCClient) ListBackupPlans(ctx context.Context, req *gkeba } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListBackupPlans(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListBackupPlans, req, settings.GRPC, c.logger, "ListBackupPlans") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *backupForGKEGRPCClient) GetBackupPlan(ctx context.Context, req *gkeback var resp *gkebackuppb.BackupPlan err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetBackupPlan, req, settings.GRPC, c.logger, "GetBackupPlan") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *backupForGKEGRPCClient) UpdateBackupPlan(ctx context.Context, req *gkeb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.UpdateBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.UpdateBackupPlan, req, settings.GRPC, c.logger, "UpdateBackupPlan") return err }, opts...) if err != nil { @@ -1148,7 +1153,7 @@ func (c *backupForGKEGRPCClient) DeleteBackupPlan(ctx context.Context, req *gkeb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.DeleteBackupPlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.DeleteBackupPlan, req, settings.GRPC, c.logger, "DeleteBackupPlan") return err }, opts...) if err != nil { @@ -1168,7 +1173,7 @@ func (c *backupForGKEGRPCClient) CreateBackup(ctx context.Context, req *gkebacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *backupForGKEGRPCClient) ListBackups(ctx context.Context, req *gkebackup } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *backupForGKEGRPCClient) GetBackup(ctx context.Context, req *gkebackuppb var resp *gkebackuppb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *backupForGKEGRPCClient) UpdateBackup(ctx context.Context, req *gkebacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1272,7 +1277,7 @@ func (c *backupForGKEGRPCClient) DeleteBackup(ctx context.Context, req *gkebacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1303,7 +1308,7 @@ func (c *backupForGKEGRPCClient) ListVolumeBackups(ctx context.Context, req *gke } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListVolumeBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListVolumeBackups, req, settings.GRPC, c.logger, "ListVolumeBackups") return err }, opts...) if err != nil { @@ -1338,7 +1343,7 @@ func (c *backupForGKEGRPCClient) GetVolumeBackup(ctx context.Context, req *gkeba var resp *gkebackuppb.VolumeBackup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetVolumeBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetVolumeBackup, req, settings.GRPC, c.logger, "GetVolumeBackup") return err }, opts...) if err != nil { @@ -1356,7 +1361,7 @@ func (c *backupForGKEGRPCClient) CreateRestorePlan(ctx context.Context, req *gke var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.CreateRestorePlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.CreateRestorePlan, req, settings.GRPC, c.logger, "CreateRestorePlan") return err }, opts...) if err != nil { @@ -1387,7 +1392,7 @@ func (c *backupForGKEGRPCClient) ListRestorePlans(ctx context.Context, req *gkeb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListRestorePlans(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListRestorePlans, req, settings.GRPC, c.logger, "ListRestorePlans") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *backupForGKEGRPCClient) GetRestorePlan(ctx context.Context, req *gkebac var resp *gkebackuppb.RestorePlan err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetRestorePlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetRestorePlan, req, settings.GRPC, c.logger, "GetRestorePlan") return err }, opts...) if err != nil { @@ -1440,7 +1445,7 @@ func (c *backupForGKEGRPCClient) UpdateRestorePlan(ctx context.Context, req *gke var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.UpdateRestorePlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.UpdateRestorePlan, req, settings.GRPC, c.logger, "UpdateRestorePlan") return err }, opts...) if err != nil { @@ -1460,7 +1465,7 @@ func (c *backupForGKEGRPCClient) DeleteRestorePlan(ctx context.Context, req *gke var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.DeleteRestorePlan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.DeleteRestorePlan, req, settings.GRPC, c.logger, "DeleteRestorePlan") return err }, opts...) if err != nil { @@ -1480,7 +1485,7 @@ func (c *backupForGKEGRPCClient) CreateRestore(ctx context.Context, req *gkeback var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.CreateRestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.CreateRestore, req, settings.GRPC, c.logger, "CreateRestore") return err }, opts...) if err != nil { @@ -1511,7 +1516,7 @@ func (c *backupForGKEGRPCClient) ListRestores(ctx context.Context, req *gkebacku } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListRestores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListRestores, req, settings.GRPC, c.logger, "ListRestores") return err }, opts...) if err != nil { @@ -1546,7 +1551,7 @@ func (c *backupForGKEGRPCClient) GetRestore(ctx context.Context, req *gkebackupp var resp *gkebackuppb.Restore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetRestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetRestore, req, settings.GRPC, c.logger, "GetRestore") return err }, opts...) if err != nil { @@ -1564,7 +1569,7 @@ func (c *backupForGKEGRPCClient) UpdateRestore(ctx context.Context, req *gkeback var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.UpdateRestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.UpdateRestore, req, settings.GRPC, c.logger, "UpdateRestore") return err }, opts...) if err != nil { @@ -1584,7 +1589,7 @@ func (c *backupForGKEGRPCClient) DeleteRestore(ctx context.Context, req *gkeback var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.DeleteRestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.DeleteRestore, req, settings.GRPC, c.logger, "DeleteRestore") return err }, opts...) if err != nil { @@ -1615,7 +1620,7 @@ func (c *backupForGKEGRPCClient) ListVolumeRestores(ctx context.Context, req *gk } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.ListVolumeRestores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.ListVolumeRestores, req, settings.GRPC, c.logger, "ListVolumeRestores") return err }, opts...) if err != nil { @@ -1650,7 +1655,7 @@ func (c *backupForGKEGRPCClient) GetVolumeRestore(ctx context.Context, req *gkeb var resp *gkebackuppb.VolumeRestore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetVolumeRestore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetVolumeRestore, req, settings.GRPC, c.logger, "GetVolumeRestore") return err }, opts...) if err != nil { @@ -1668,7 +1673,7 @@ func (c *backupForGKEGRPCClient) GetBackupIndexDownloadUrl(ctx context.Context, var resp *gkebackuppb.GetBackupIndexDownloadUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.backupForGKEClient.GetBackupIndexDownloadUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.backupForGKEClient.GetBackupIndexDownloadUrl, req, settings.GRPC, c.logger, "GetBackupIndexDownloadUrl") return err }, opts...) if err != nil { @@ -1686,7 +1691,7 @@ func (c *backupForGKEGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1715,7 +1720,7 @@ func (c *backupForGKEGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1750,7 +1755,7 @@ func (c *backupForGKEGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1768,7 +1773,7 @@ func (c *backupForGKEGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1786,7 +1791,7 @@ func (c *backupForGKEGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1803,7 +1808,7 @@ func (c *backupForGKEGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1817,7 +1822,7 @@ func (c *backupForGKEGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1832,7 +1837,7 @@ func (c *backupForGKEGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1861,7 +1866,7 @@ func (c *backupForGKEGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1927,21 +1932,10 @@ func (c *backupForGKERESTClient) CreateBackupPlan(ctx context.Context, req *gkeb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupPlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2010,21 +2004,10 @@ func (c *backupForGKERESTClient) ListBackupPlans(ctx context.Context, req *gkeba } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupPlans") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2087,17 +2070,7 @@ func (c *backupForGKERESTClient) GetBackupPlan(ctx context.Context, req *gkeback httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupPlan") if err != nil { return err } @@ -2160,21 +2133,10 @@ func (c *backupForGKERESTClient) UpdateBackupPlan(ctx context.Context, req *gkeb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupPlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2227,21 +2189,10 @@ func (c *backupForGKERESTClient) DeleteBackupPlan(ctx context.Context, req *gkeb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupPlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2301,21 +2252,10 @@ func (c *backupForGKERESTClient) CreateBackup(ctx context.Context, req *gkebacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2384,21 +2324,10 @@ func (c *backupForGKERESTClient) ListBackups(ctx context.Context, req *gkebackup } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2461,17 +2390,7 @@ func (c *backupForGKERESTClient) GetBackup(ctx context.Context, req *gkebackuppb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2534,21 +2453,10 @@ func (c *backupForGKERESTClient) UpdateBackup(ctx context.Context, req *gkebacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2604,21 +2512,10 @@ func (c *backupForGKERESTClient) DeleteBackup(ctx context.Context, req *gkebacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2687,21 +2584,10 @@ func (c *backupForGKERESTClient) ListVolumeBackups(ctx context.Context, req *gke } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVolumeBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2764,17 +2650,7 @@ func (c *backupForGKERESTClient) GetVolumeBackup(ctx context.Context, req *gkeba httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVolumeBackup") if err != nil { return err } @@ -2831,21 +2707,10 @@ func (c *backupForGKERESTClient) CreateRestorePlan(ctx context.Context, req *gke httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRestorePlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2914,21 +2779,10 @@ func (c *backupForGKERESTClient) ListRestorePlans(ctx context.Context, req *gkeb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRestorePlans") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2991,17 +2845,7 @@ func (c *backupForGKERESTClient) GetRestorePlan(ctx context.Context, req *gkebac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRestorePlan") if err != nil { return err } @@ -3064,21 +2908,10 @@ func (c *backupForGKERESTClient) UpdateRestorePlan(ctx context.Context, req *gke httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRestorePlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3134,21 +2967,10 @@ func (c *backupForGKERESTClient) DeleteRestorePlan(ctx context.Context, req *gke httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRestorePlan") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3206,21 +3028,10 @@ func (c *backupForGKERESTClient) CreateRestore(ctx context.Context, req *gkeback httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRestore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3289,21 +3100,10 @@ func (c *backupForGKERESTClient) ListRestores(ctx context.Context, req *gkebacku } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRestores") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3366,17 +3166,7 @@ func (c *backupForGKERESTClient) GetRestore(ctx context.Context, req *gkebackupp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRestore") if err != nil { return err } @@ -3439,21 +3229,10 @@ func (c *backupForGKERESTClient) UpdateRestore(ctx context.Context, req *gkeback httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRestore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3509,21 +3288,10 @@ func (c *backupForGKERESTClient) DeleteRestore(ctx context.Context, req *gkeback httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRestore") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3592,21 +3360,10 @@ func (c *backupForGKERESTClient) ListVolumeRestores(ctx context.Context, req *gk } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVolumeRestores") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3669,17 +3426,7 @@ func (c *backupForGKERESTClient) GetVolumeRestore(ctx context.Context, req *gkeb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVolumeRestore") if err != nil { return err } @@ -3729,17 +3476,7 @@ func (c *backupForGKERESTClient) GetBackupIndexDownloadUrl(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupIndexDownloadUrl") if err != nil { return err } @@ -3789,17 +3526,7 @@ func (c *backupForGKERESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3864,21 +3591,10 @@ func (c *backupForGKERESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3945,17 +3661,7 @@ func (c *backupForGKERESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4015,17 +3721,7 @@ func (c *backupForGKERESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4087,17 +3783,7 @@ func (c *backupForGKERESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4150,15 +3836,8 @@ func (c *backupForGKERESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4192,15 +3871,8 @@ func (c *backupForGKERESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4237,17 +3909,7 @@ func (c *backupForGKERESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4312,21 +3974,10 @@ func (c *backupForGKERESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/gkebackup/apiv1/backup_forgke_client_example_go123_test.go b/gkebackup/apiv1/backup_forgke_client_example_go123_test.go index fdabd0e75523..a37a15d15af2 100644 --- a/gkebackup/apiv1/backup_forgke_client_example_go123_test.go +++ b/gkebackup/apiv1/backup_forgke_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleBackupForGKEClient_ListBackupPlans_all() { } for resp, err := range c.ListBackupPlans(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleBackupForGKEClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleBackupForGKEClient_ListRestorePlans_all() { } for resp, err := range c.ListRestorePlans(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleBackupForGKEClient_ListRestores_all() { } for resp, err := range c.ListRestores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleBackupForGKEClient_ListVolumeBackups_all() { } for resp, err := range c.ListVolumeBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleBackupForGKEClient_ListVolumeRestores_all() { } for resp, err := range c.ListVolumeRestores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleBackupForGKEClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleBackupForGKEClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gkebackup/apiv1/gkebackuppb/backup.pb.go b/gkebackup/apiv1/gkebackuppb/backup.pb.go index 8f0c3b1f1038..5efbc3334e18 100755 --- a/gkebackup/apiv1/gkebackuppb/backup.pb.go +++ b/gkebackup/apiv1/gkebackuppb/backup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/backup.proto @@ -235,11 +235,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -250,7 +248,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +524,9 @@ type Backup_ClusterMetadata struct { func (x *Backup_ClusterMetadata) Reset() { *x = Backup_ClusterMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup_ClusterMetadata) String() string { @@ -541,7 +537,7 @@ func (*Backup_ClusterMetadata) ProtoMessage() {} func (x *Backup_ClusterMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,32 +836,6 @@ func file_google_cloud_gkebackup_v1_backup_proto_init() { return } file_google_cloud_gkebackup_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_backup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Backup_ClusterMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_gkebackup_v1_backup_proto_msgTypes[0].OneofWrappers = []any{ (*Backup_AllNamespaces)(nil), (*Backup_SelectedNamespaces)(nil), diff --git a/gkebackup/apiv1/gkebackuppb/backup_plan.pb.go b/gkebackup/apiv1/gkebackuppb/backup_plan.pb.go index 7b6dde9d686c..321fd79999aa 100755 --- a/gkebackup/apiv1/gkebackuppb/backup_plan.pb.go +++ b/gkebackup/apiv1/gkebackuppb/backup_plan.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/backup_plan.proto @@ -184,11 +184,9 @@ type BackupPlan struct { func (x *BackupPlan) Reset() { *x = BackupPlan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlan) String() string { @@ -199,7 +197,7 @@ func (*BackupPlan) ProtoMessage() {} func (x *BackupPlan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +358,9 @@ type RpoConfig struct { func (x *RpoConfig) Reset() { *x = RpoConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RpoConfig) String() string { @@ -375,7 +371,7 @@ func (*RpoConfig) ProtoMessage() {} func (x *RpoConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +434,9 @@ type ExclusionWindow struct { func (x *ExclusionWindow) Reset() { *x = ExclusionWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExclusionWindow) String() string { @@ -453,7 +447,7 @@ func (*ExclusionWindow) ProtoMessage() {} func (x *ExclusionWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +577,9 @@ type BackupPlan_RetentionPolicy struct { func (x *BackupPlan_RetentionPolicy) Reset() { *x = BackupPlan_RetentionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlan_RetentionPolicy) String() string { @@ -598,7 +590,7 @@ func (*BackupPlan_RetentionPolicy) ProtoMessage() {} func (x *BackupPlan_RetentionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +666,9 @@ type BackupPlan_Schedule struct { func (x *BackupPlan_Schedule) Reset() { *x = BackupPlan_Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlan_Schedule) String() string { @@ -689,7 +679,7 @@ func (*BackupPlan_Schedule) ProtoMessage() {} func (x *BackupPlan_Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,11 +765,9 @@ type BackupPlan_BackupConfig struct { func (x *BackupPlan_BackupConfig) Reset() { *x = BackupPlan_BackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPlan_BackupConfig) String() string { @@ -790,7 +778,7 @@ func (*BackupPlan_BackupConfig) ProtoMessage() {} func (x *BackupPlan_BackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +887,9 @@ type ExclusionWindow_DayOfWeekList struct { func (x *ExclusionWindow_DayOfWeekList) Reset() { *x = ExclusionWindow_DayOfWeekList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExclusionWindow_DayOfWeekList) String() string { @@ -914,7 +900,7 @@ func (*ExclusionWindow_DayOfWeekList) ProtoMessage() {} func (x *ExclusionWindow_DayOfWeekList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,92 +1199,6 @@ func file_google_cloud_gkebackup_v1_backup_plan_proto_init() { return } file_google_cloud_gkebackup_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RpoConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExclusionWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlan_RetentionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlan_Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BackupPlan_BackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExclusionWindow_DayOfWeekList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_gkebackup_v1_backup_plan_proto_msgTypes[2].OneofWrappers = []any{ (*ExclusionWindow_SingleOccurrenceDate)(nil), (*ExclusionWindow_Daily)(nil), diff --git a/gkebackup/apiv1/gkebackuppb/common.pb.go b/gkebackup/apiv1/gkebackuppb/common.pb.go index 2c324a96cd8f..ea415582a27a 100755 --- a/gkebackup/apiv1/gkebackuppb/common.pb.go +++ b/gkebackup/apiv1/gkebackuppb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/common.proto @@ -97,11 +97,9 @@ type Namespaces struct { func (x *Namespaces) Reset() { *x = Namespaces{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Namespaces) String() string { @@ -112,7 +110,7 @@ func (*Namespaces) ProtoMessage() {} func (x *Namespaces) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type NamespacedName struct { func (x *NamespacedName) Reset() { *x = NamespacedName{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NamespacedName) String() string { @@ -163,7 +159,7 @@ func (*NamespacedName) ProtoMessage() {} func (x *NamespacedName) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type NamespacedNames struct { func (x *NamespacedNames) Reset() { *x = NamespacedNames{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NamespacedNames) String() string { @@ -219,7 +213,7 @@ func (*NamespacedNames) ProtoMessage() {} func (x *NamespacedNames) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +249,9 @@ type EncryptionKey struct { func (x *EncryptionKey) Reset() { *x = EncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionKey) String() string { @@ -270,7 +262,7 @@ func (*EncryptionKey) ProtoMessage() {} func (x *EncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,11 +293,9 @@ type VolumeTypeEnum struct { func (x *VolumeTypeEnum) Reset() { *x = VolumeTypeEnum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeTypeEnum) String() string { @@ -316,7 +306,7 @@ func (*VolumeTypeEnum) ProtoMessage() {} func (x *VolumeTypeEnum) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,68 +411,6 @@ func file_google_cloud_gkebackup_v1_common_proto_init() { if File_google_cloud_gkebackup_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Namespaces); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NamespacedName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NamespacedNames); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VolumeTypeEnum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkebackup/apiv1/gkebackuppb/gkebackup.pb.go b/gkebackup/apiv1/gkebackuppb/gkebackup.pb.go index 9dd72ebdf909..f46cae5ac726 100755 --- a/gkebackup/apiv1/gkebackuppb/gkebackup.pb.go +++ b/gkebackup/apiv1/gkebackuppb/gkebackup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/gkebackup.proto @@ -72,11 +72,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -87,7 +85,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type CreateBackupPlanRequest struct { func (x *CreateBackupPlanRequest) Reset() { *x = CreateBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupPlanRequest) String() string { @@ -190,7 +186,7 @@ func (*CreateBackupPlanRequest) ProtoMessage() {} func (x *CreateBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +253,9 @@ type ListBackupPlansRequest struct { func (x *ListBackupPlansRequest) Reset() { *x = ListBackupPlansRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlansRequest) String() string { @@ -272,7 +266,7 @@ func (*ListBackupPlansRequest) ProtoMessage() {} func (x *ListBackupPlansRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +336,9 @@ type ListBackupPlansResponse struct { func (x *ListBackupPlansResponse) Reset() { *x = ListBackupPlansResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPlansResponse) String() string { @@ -357,7 +349,7 @@ func (*ListBackupPlansResponse) ProtoMessage() {} func (x *ListBackupPlansResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +398,9 @@ type GetBackupPlanRequest struct { func (x *GetBackupPlanRequest) Reset() { *x = GetBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupPlanRequest) String() string { @@ -421,7 +411,7 @@ func (*GetBackupPlanRequest) ProtoMessage() {} func (x *GetBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +456,9 @@ type UpdateBackupPlanRequest struct { func (x *UpdateBackupPlanRequest) Reset() { *x = UpdateBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupPlanRequest) String() string { @@ -481,7 +469,7 @@ func (*UpdateBackupPlanRequest) ProtoMessage() {} func (x *UpdateBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +515,9 @@ type DeleteBackupPlanRequest struct { func (x *DeleteBackupPlanRequest) Reset() { *x = DeleteBackupPlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupPlanRequest) String() string { @@ -542,7 +528,7 @@ func (*DeleteBackupPlanRequest) ProtoMessage() {} func (x *DeleteBackupPlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +581,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -610,7 +594,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +661,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -692,7 +674,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +741,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -774,7 +754,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +796,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -831,7 +809,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -875,11 +853,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -890,7 +866,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +916,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -955,7 +929,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,11 +996,9 @@ type ListVolumeBackupsRequest struct { func (x *ListVolumeBackupsRequest) Reset() { *x = ListVolumeBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeBackupsRequest) String() string { @@ -1037,7 +1009,7 @@ func (*ListVolumeBackupsRequest) ProtoMessage() {} func (x *ListVolumeBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,11 +1077,9 @@ type ListVolumeBackupsResponse struct { func (x *ListVolumeBackupsResponse) Reset() { *x = ListVolumeBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeBackupsResponse) String() string { @@ -1120,7 +1090,7 @@ func (*ListVolumeBackupsResponse) ProtoMessage() {} func (x *ListVolumeBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,11 +1132,9 @@ type GetVolumeBackupRequest struct { func (x *GetVolumeBackupRequest) Reset() { *x = GetVolumeBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVolumeBackupRequest) String() string { @@ -1177,7 +1145,7 @@ func (*GetVolumeBackupRequest) ProtoMessage() {} func (x *GetVolumeBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1223,11 +1191,9 @@ type CreateRestorePlanRequest struct { func (x *CreateRestorePlanRequest) Reset() { *x = CreateRestorePlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRestorePlanRequest) String() string { @@ -1238,7 +1204,7 @@ func (*CreateRestorePlanRequest) ProtoMessage() {} func (x *CreateRestorePlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1305,11 +1271,9 @@ type ListRestorePlansRequest struct { func (x *ListRestorePlansRequest) Reset() { *x = ListRestorePlansRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRestorePlansRequest) String() string { @@ -1320,7 +1284,7 @@ func (*ListRestorePlansRequest) ProtoMessage() {} func (x *ListRestorePlansRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1390,11 +1354,9 @@ type ListRestorePlansResponse struct { func (x *ListRestorePlansResponse) Reset() { *x = ListRestorePlansResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRestorePlansResponse) String() string { @@ -1405,7 +1367,7 @@ func (*ListRestorePlansResponse) ProtoMessage() {} func (x *ListRestorePlansResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1454,11 +1416,9 @@ type GetRestorePlanRequest struct { func (x *GetRestorePlanRequest) Reset() { *x = GetRestorePlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRestorePlanRequest) String() string { @@ -1469,7 +1429,7 @@ func (*GetRestorePlanRequest) ProtoMessage() {} func (x *GetRestorePlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1513,11 +1473,9 @@ type UpdateRestorePlanRequest struct { func (x *UpdateRestorePlanRequest) Reset() { *x = UpdateRestorePlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRestorePlanRequest) String() string { @@ -1528,7 +1486,7 @@ func (*UpdateRestorePlanRequest) ProtoMessage() {} func (x *UpdateRestorePlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1536,9 @@ type DeleteRestorePlanRequest struct { func (x *DeleteRestorePlanRequest) Reset() { *x = DeleteRestorePlanRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRestorePlanRequest) String() string { @@ -1593,7 +1549,7 @@ func (*DeleteRestorePlanRequest) ProtoMessage() {} func (x *DeleteRestorePlanRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1609,9 @@ type CreateRestoreRequest struct { func (x *CreateRestoreRequest) Reset() { *x = CreateRestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRestoreRequest) String() string { @@ -1668,7 +1622,7 @@ func (*CreateRestoreRequest) ProtoMessage() {} func (x *CreateRestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1689,9 @@ type ListRestoresRequest struct { func (x *ListRestoresRequest) Reset() { *x = ListRestoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRestoresRequest) String() string { @@ -1750,7 +1702,7 @@ func (*ListRestoresRequest) ProtoMessage() {} func (x *ListRestoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1819,11 +1771,9 @@ type ListRestoresResponse struct { func (x *ListRestoresResponse) Reset() { *x = ListRestoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRestoresResponse) String() string { @@ -1834,7 +1784,7 @@ func (*ListRestoresResponse) ProtoMessage() {} func (x *ListRestoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1883,11 +1833,9 @@ type GetRestoreRequest struct { func (x *GetRestoreRequest) Reset() { *x = GetRestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRestoreRequest) String() string { @@ -1898,7 +1846,7 @@ func (*GetRestoreRequest) ProtoMessage() {} func (x *GetRestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1942,11 +1890,9 @@ type UpdateRestoreRequest struct { func (x *UpdateRestoreRequest) Reset() { *x = UpdateRestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRestoreRequest) String() string { @@ -1957,7 +1903,7 @@ func (*UpdateRestoreRequest) ProtoMessage() {} func (x *UpdateRestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2007,11 +1953,9 @@ type DeleteRestoreRequest struct { func (x *DeleteRestoreRequest) Reset() { *x = DeleteRestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRestoreRequest) String() string { @@ -2022,7 +1966,7 @@ func (*DeleteRestoreRequest) ProtoMessage() {} func (x *DeleteRestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,11 +2033,9 @@ type ListVolumeRestoresRequest struct { func (x *ListVolumeRestoresRequest) Reset() { *x = ListVolumeRestoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeRestoresRequest) String() string { @@ -2104,7 +2046,7 @@ func (*ListVolumeRestoresRequest) ProtoMessage() {} func (x *ListVolumeRestoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2172,11 +2114,9 @@ type ListVolumeRestoresResponse struct { func (x *ListVolumeRestoresResponse) Reset() { *x = ListVolumeRestoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumeRestoresResponse) String() string { @@ -2187,7 +2127,7 @@ func (*ListVolumeRestoresResponse) ProtoMessage() {} func (x *ListVolumeRestoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2229,11 +2169,9 @@ type GetVolumeRestoreRequest struct { func (x *GetVolumeRestoreRequest) Reset() { *x = GetVolumeRestoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVolumeRestoreRequest) String() string { @@ -2244,7 +2182,7 @@ func (*GetVolumeRestoreRequest) ProtoMessage() {} func (x *GetVolumeRestoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2280,11 +2218,9 @@ type GetBackupIndexDownloadUrlRequest struct { func (x *GetBackupIndexDownloadUrlRequest) Reset() { *x = GetBackupIndexDownloadUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupIndexDownloadUrlRequest) String() string { @@ -2295,7 +2231,7 @@ func (*GetBackupIndexDownloadUrlRequest) ProtoMessage() {} func (x *GetBackupIndexDownloadUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2264,9 @@ type GetBackupIndexDownloadUrlResponse struct { func (x *GetBackupIndexDownloadUrlResponse) Reset() { *x = GetBackupIndexDownloadUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupIndexDownloadUrlResponse) String() string { @@ -2343,7 +2277,7 @@ func (*GetBackupIndexDownloadUrlResponse) ProtoMessage() {} func (x *GetBackupIndexDownloadUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3252,404 +3186,6 @@ func file_google_cloud_gkebackup_v1_gkebackup_proto_init() { file_google_cloud_gkebackup_v1_restore_proto_init() file_google_cloud_gkebackup_v1_restore_plan_proto_init() file_google_cloud_gkebackup_v1_volume_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlansRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPlansResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupPlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetVolumeBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateRestorePlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListRestorePlansRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListRestorePlansResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetRestorePlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRestorePlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRestorePlanRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateRestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListRestoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListRestoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetRestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeRestoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumeRestoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetVolumeRestoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupIndexDownloadUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_gkebackup_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupIndexDownloadUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkebackup/apiv1/gkebackuppb/restore.pb.go b/gkebackup/apiv1/gkebackuppb/restore.pb.go index 8263d57319e5..b360043591f9 100755 --- a/gkebackup/apiv1/gkebackuppb/restore.pb.go +++ b/gkebackup/apiv1/gkebackuppb/restore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/restore.proto @@ -491,11 +491,9 @@ type Restore struct { func (x *Restore) Reset() { *x = Restore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restore) String() string { @@ -506,7 +504,7 @@ func (*Restore) ProtoMessage() {} func (x *Restore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +717,9 @@ type RestoreConfig struct { func (x *RestoreConfig) Reset() { *x = RestoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig) String() string { @@ -734,7 +730,7 @@ func (*RestoreConfig) ProtoMessage() {} func (x *RestoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +923,9 @@ type ResourceSelector struct { func (x *ResourceSelector) Reset() { *x = ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceSelector) String() string { @@ -942,7 +936,7 @@ func (*ResourceSelector) ProtoMessage() {} func (x *ResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +996,9 @@ type VolumeDataRestorePolicyOverride struct { func (x *VolumeDataRestorePolicyOverride) Reset() { *x = VolumeDataRestorePolicyOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeDataRestorePolicyOverride) String() string { @@ -1017,7 +1009,7 @@ func (*VolumeDataRestorePolicyOverride) ProtoMessage() {} func (x *VolumeDataRestorePolicyOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,11 +1079,9 @@ type Restore_Filter struct { func (x *Restore_Filter) Reset() { *x = Restore_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restore_Filter) String() string { @@ -1102,7 +1092,7 @@ func (*Restore_Filter) ProtoMessage() {} func (x *Restore_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,11 +1141,9 @@ type RestoreConfig_GroupKind struct { func (x *RestoreConfig_GroupKind) Reset() { *x = RestoreConfig_GroupKind{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_GroupKind) String() string { @@ -1166,7 +1154,7 @@ func (*RestoreConfig_GroupKind) ProtoMessage() {} func (x *RestoreConfig_GroupKind) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1226,9 @@ type RestoreConfig_ClusterResourceRestoreScope struct { func (x *RestoreConfig_ClusterResourceRestoreScope) Reset() { *x = RestoreConfig_ClusterResourceRestoreScope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_ClusterResourceRestoreScope) String() string { @@ -1253,7 +1239,7 @@ func (*RestoreConfig_ClusterResourceRestoreScope) ProtoMessage() {} func (x *RestoreConfig_ClusterResourceRestoreScope) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1330,9 @@ type RestoreConfig_SubstitutionRule struct { func (x *RestoreConfig_SubstitutionRule) Reset() { *x = RestoreConfig_SubstitutionRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_SubstitutionRule) String() string { @@ -1359,7 +1343,7 @@ func (*RestoreConfig_SubstitutionRule) ProtoMessage() {} func (x *RestoreConfig_SubstitutionRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1431,11 +1415,9 @@ type RestoreConfig_TransformationRuleAction struct { func (x *RestoreConfig_TransformationRuleAction) Reset() { *x = RestoreConfig_TransformationRuleAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_TransformationRuleAction) String() string { @@ -1446,7 +1428,7 @@ func (*RestoreConfig_TransformationRuleAction) ProtoMessage() {} func (x *RestoreConfig_TransformationRuleAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1501,9 @@ type RestoreConfig_ResourceFilter struct { func (x *RestoreConfig_ResourceFilter) Reset() { *x = RestoreConfig_ResourceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_ResourceFilter) String() string { @@ -1534,7 +1514,7 @@ func (*RestoreConfig_ResourceFilter) ProtoMessage() {} func (x *RestoreConfig_ResourceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1595,11 +1575,9 @@ type RestoreConfig_TransformationRule struct { func (x *RestoreConfig_TransformationRule) Reset() { *x = RestoreConfig_TransformationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_TransformationRule) String() string { @@ -1610,7 +1588,7 @@ func (*RestoreConfig_TransformationRule) ProtoMessage() {} func (x *RestoreConfig_TransformationRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1641,9 @@ type RestoreConfig_VolumeDataRestorePolicyBinding struct { func (x *RestoreConfig_VolumeDataRestorePolicyBinding) Reset() { *x = RestoreConfig_VolumeDataRestorePolicyBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_VolumeDataRestorePolicyBinding) String() string { @@ -1678,7 +1654,7 @@ func (*RestoreConfig_VolumeDataRestorePolicyBinding) ProtoMessage() {} func (x *RestoreConfig_VolumeDataRestorePolicyBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1718,9 @@ type RestoreConfig_RestoreOrder struct { func (x *RestoreConfig_RestoreOrder) Reset() { *x = RestoreConfig_RestoreOrder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_RestoreOrder) String() string { @@ -1757,7 +1731,7 @@ func (*RestoreConfig_RestoreOrder) ProtoMessage() {} func (x *RestoreConfig_RestoreOrder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1795,11 +1769,9 @@ type RestoreConfig_RestoreOrder_GroupKindDependency struct { func (x *RestoreConfig_RestoreOrder_GroupKindDependency) Reset() { *x = RestoreConfig_RestoreOrder_GroupKindDependency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreConfig_RestoreOrder_GroupKindDependency) String() string { @@ -1810,7 +1782,7 @@ func (*RestoreConfig_RestoreOrder_GroupKindDependency) ProtoMessage() {} func (x *RestoreConfig_RestoreOrder_GroupKindDependency) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2357,176 +2329,6 @@ func file_google_cloud_gkebackup_v1_restore_proto_init() { return } file_google_cloud_gkebackup_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Restore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VolumeDataRestorePolicyOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Restore_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_GroupKind); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_ClusterResourceRestoreScope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_SubstitutionRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_TransformationRuleAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_ResourceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_TransformationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_VolumeDataRestorePolicyBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_RestoreOrder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_restore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RestoreConfig_RestoreOrder_GroupKindDependency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_gkebackup_v1_restore_proto_msgTypes[1].OneofWrappers = []any{ (*RestoreConfig_AllNamespaces)(nil), (*RestoreConfig_SelectedNamespaces)(nil), diff --git a/gkebackup/apiv1/gkebackuppb/restore_plan.pb.go b/gkebackup/apiv1/gkebackuppb/restore_plan.pb.go index 02d837f951ec..0242436bc47d 100755 --- a/gkebackup/apiv1/gkebackuppb/restore_plan.pb.go +++ b/gkebackup/apiv1/gkebackuppb/restore_plan.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/restore_plan.proto @@ -155,11 +155,9 @@ type RestorePlan struct { func (x *RestorePlan) Reset() { *x = RestorePlan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_restore_plan_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_restore_plan_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestorePlan) String() string { @@ -170,7 +168,7 @@ func (*RestorePlan) ProtoMessage() {} func (x *RestorePlan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_restore_plan_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,20 +398,6 @@ func file_google_cloud_gkebackup_v1_restore_plan_proto_init() { return } file_google_cloud_gkebackup_v1_restore_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_restore_plan_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RestorePlan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkebackup/apiv1/gkebackuppb/volume.pb.go b/gkebackup/apiv1/gkebackuppb/volume.pb.go index ba1b8fc93b45..34c1ee139146 100755 --- a/gkebackup/apiv1/gkebackuppb/volume.pb.go +++ b/gkebackup/apiv1/gkebackuppb/volume.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkebackup/v1/volume.proto @@ -331,11 +331,9 @@ type VolumeBackup struct { func (x *VolumeBackup) Reset() { *x = VolumeBackup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeBackup) String() string { @@ -346,7 +344,7 @@ func (*VolumeBackup) ProtoMessage() {} func (x *VolumeBackup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +497,9 @@ type VolumeRestore struct { func (x *VolumeRestore) Reset() { *x = VolumeRestore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeRestore) String() string { @@ -514,7 +510,7 @@ func (*VolumeRestore) ProtoMessage() {} func (x *VolumeRestore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkebackup_v1_volume_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,32 +820,6 @@ func file_google_cloud_gkebackup_v1_volume_proto_init() { return } file_google_cloud_gkebackup_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkebackup_v1_volume_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VolumeBackup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkebackup_v1_volume_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VolumeRestore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkebackup/apiv1/helpers.go b/gkebackup/apiv1/helpers.go index dfaa65dcf6ab..faa3baea5e93 100755 --- a/gkebackup/apiv1/helpers.go +++ b/gkebackup/apiv1/helpers.go @@ -18,10 +18,20 @@ package gkebackup import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "gkebackup.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/gkeconnect/gateway/apiv1/gateway_control_client.go b/gkeconnect/gateway/apiv1/gateway_control_client.go index 448ca9922a80..d19e7f1c09b8 100755 --- a/gkeconnect/gateway/apiv1/gateway_control_client.go +++ b/gkeconnect/gateway/apiv1/gateway_control_client.go @@ -19,14 +19,13 @@ package gateway import ( "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" gatewaypb "cloud.google.com/go/gkeconnect/gateway/apiv1/gatewaypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -119,6 +118,8 @@ type gatewayControlRESTClient struct { // Points back to the CallOptions field of the containing GatewayControlClient CallOptions **GatewayControlCallOptions + + logger *slog.Logger } // NewGatewayControlRESTClient creates a new gateway control rest client. @@ -136,6 +137,7 @@ func NewGatewayControlRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -226,17 +228,7 @@ func (c *gatewayControlRESTClient) GenerateCredentials(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateCredentials") if err != nil { return err } diff --git a/gkeconnect/gateway/apiv1/gatewaypb/control.pb.go b/gkeconnect/gateway/apiv1/gatewaypb/control.pb.go index d7cbee950ed1..6a8c2d238210 100755 --- a/gkeconnect/gateway/apiv1/gatewaypb/control.pb.go +++ b/gkeconnect/gateway/apiv1/gatewaypb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkeconnect/gateway/v1/control.proto @@ -122,11 +122,9 @@ type GenerateCredentialsRequest struct { func (x *GenerateCredentialsRequest) Reset() { *x = GenerateCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCredentialsRequest) String() string { @@ -137,7 +135,7 @@ func (*GenerateCredentialsRequest) ProtoMessage() {} func (x *GenerateCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type GenerateCredentialsResponse struct { func (x *GenerateCredentialsResponse) Reset() { *x = GenerateCredentialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCredentialsResponse) String() string { @@ -217,7 +213,7 @@ func (*GenerateCredentialsResponse) ProtoMessage() {} func (x *GenerateCredentialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,32 +360,6 @@ func file_google_cloud_gkeconnect_gateway_v1_control_proto_init() { if File_google_cloud_gkeconnect_gateway_v1_control_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkeconnect_gateway_v1_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateCredentialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkeconnect/gateway/apiv1/helpers.go b/gkeconnect/gateway/apiv1/helpers.go index 33842245def1..0731698f1f59 100755 --- a/gkeconnect/gateway/apiv1/helpers.go +++ b/gkeconnect/gateway/apiv1/helpers.go @@ -18,10 +18,17 @@ package gateway import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" ) +const serviceName = "connectgateway.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +49,39 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} diff --git a/gkeconnect/gateway/apiv1beta1/gateway_control_client.go b/gkeconnect/gateway/apiv1beta1/gateway_control_client.go index 34cef648f534..181cea21ba38 100755 --- a/gkeconnect/gateway/apiv1beta1/gateway_control_client.go +++ b/gkeconnect/gateway/apiv1beta1/gateway_control_client.go @@ -19,14 +19,13 @@ package gateway import ( "context" "fmt" - "io" + "log/slog" "net/http" "net/url" "time" gatewaypb "cloud.google.com/go/gkeconnect/gateway/apiv1beta1/gatewaypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" httptransport "google.golang.org/api/transport/http" @@ -119,6 +118,8 @@ type gatewayControlRESTClient struct { // Points back to the CallOptions field of the containing GatewayControlClient CallOptions **GatewayControlCallOptions + + logger *slog.Logger } // NewGatewayControlRESTClient creates a new gateway control rest client. @@ -136,6 +137,7 @@ func NewGatewayControlRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -225,17 +227,7 @@ func (c *gatewayControlRESTClient) GenerateCredentials(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateCredentials") if err != nil { return err } diff --git a/gkeconnect/gateway/apiv1beta1/gatewaypb/control.pb.go b/gkeconnect/gateway/apiv1beta1/gatewaypb/control.pb.go index 1b2693d32d2d..138f5d6b55be 100755 --- a/gkeconnect/gateway/apiv1beta1/gatewaypb/control.pb.go +++ b/gkeconnect/gateway/apiv1beta1/gatewaypb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkeconnect/gateway/v1beta1/control.proto @@ -122,11 +122,9 @@ type GenerateCredentialsRequest struct { func (x *GenerateCredentialsRequest) Reset() { *x = GenerateCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCredentialsRequest) String() string { @@ -137,7 +135,7 @@ func (*GenerateCredentialsRequest) ProtoMessage() {} func (x *GenerateCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +200,9 @@ type GenerateCredentialsResponse struct { func (x *GenerateCredentialsResponse) Reset() { *x = GenerateCredentialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCredentialsResponse) String() string { @@ -217,7 +213,7 @@ func (*GenerateCredentialsResponse) ProtoMessage() {} func (x *GenerateCredentialsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,32 +364,6 @@ func file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_init() { if File_google_cloud_gkeconnect_gateway_v1beta1_control_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkeconnect_gateway_v1beta1_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateCredentialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkeconnect/gateway/apiv1beta1/helpers.go b/gkeconnect/gateway/apiv1beta1/helpers.go index 33842245def1..0731698f1f59 100755 --- a/gkeconnect/gateway/apiv1beta1/helpers.go +++ b/gkeconnect/gateway/apiv1beta1/helpers.go @@ -18,10 +18,17 @@ package gateway import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" ) +const serviceName = "connectgateway.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +49,39 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} diff --git a/gkehub/apiv1beta1/gke_hub_membership_client.go b/gkehub/apiv1beta1/gke_hub_membership_client.go index 5666b6376547..264432e8eb0a 100755 --- a/gkehub/apiv1beta1/gke_hub_membership_client.go +++ b/gkehub/apiv1beta1/gke_hub_membership_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -534,6 +533,8 @@ type gkeHubMembershipGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGkeHubMembershipClient creates a new gke hub membership service client based on gRPC. @@ -569,6 +570,7 @@ func NewGkeHubMembershipClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, gkeHubMembershipClient: gkehubpb.NewGkeHubMembershipServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -634,6 +636,8 @@ type gkeHubMembershipRESTClient struct { // Points back to the CallOptions field of the containing GkeHubMembershipClient CallOptions **GkeHubMembershipCallOptions + + logger *slog.Logger } // NewGkeHubMembershipRESTClient creates a new gke hub membership service rest client. @@ -660,6 +664,7 @@ func NewGkeHubMembershipRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -733,7 +738,7 @@ func (c *gkeHubMembershipGRPCClient) ListMemberships(ctx context.Context, req *g } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.ListMemberships(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.ListMemberships, req, settings.GRPC, c.logger, "ListMemberships") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *gkeHubMembershipGRPCClient) GetMembership(ctx context.Context, req *gke var resp *gkehubpb.Membership err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.GetMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.GetMembership, req, settings.GRPC, c.logger, "GetMembership") return err }, opts...) if err != nil { @@ -786,7 +791,7 @@ func (c *gkeHubMembershipGRPCClient) CreateMembership(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.CreateMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.CreateMembership, req, settings.GRPC, c.logger, "CreateMembership") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *gkeHubMembershipGRPCClient) DeleteMembership(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.DeleteMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.DeleteMembership, req, settings.GRPC, c.logger, "DeleteMembership") return err }, opts...) if err != nil { @@ -826,7 +831,7 @@ func (c *gkeHubMembershipGRPCClient) UpdateMembership(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.UpdateMembership(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.UpdateMembership, req, settings.GRPC, c.logger, "UpdateMembership") return err }, opts...) if err != nil { @@ -846,7 +851,7 @@ func (c *gkeHubMembershipGRPCClient) GenerateConnectManifest(ctx context.Context var resp *gkehubpb.GenerateConnectManifestResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.GenerateConnectManifest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.GenerateConnectManifest, req, settings.GRPC, c.logger, "GenerateConnectManifest") return err }, opts...) if err != nil { @@ -864,7 +869,7 @@ func (c *gkeHubMembershipGRPCClient) ValidateExclusivity(ctx context.Context, re var resp *gkehubpb.ValidateExclusivityResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.ValidateExclusivity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.ValidateExclusivity, req, settings.GRPC, c.logger, "ValidateExclusivity") return err }, opts...) if err != nil { @@ -882,7 +887,7 @@ func (c *gkeHubMembershipGRPCClient) GenerateExclusivityManifest(ctx context.Con var resp *gkehubpb.GenerateExclusivityManifestResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.gkeHubMembershipClient.GenerateExclusivityManifest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.gkeHubMembershipClient.GenerateExclusivityManifest, req, settings.GRPC, c.logger, "GenerateExclusivityManifest") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *gkeHubMembershipGRPCClient) GetLocation(ctx context.Context, req *locat var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -929,7 +934,7 @@ func (c *gkeHubMembershipGRPCClient) ListLocations(ctx context.Context, req *loc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -964,7 +969,7 @@ func (c *gkeHubMembershipGRPCClient) GetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -982,7 +987,7 @@ func (c *gkeHubMembershipGRPCClient) SetIamPolicy(ctx context.Context, req *iamp var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1000,7 +1005,7 @@ func (c *gkeHubMembershipGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1017,7 +1022,7 @@ func (c *gkeHubMembershipGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1031,7 +1036,7 @@ func (c *gkeHubMembershipGRPCClient) DeleteOperation(ctx context.Context, req *l opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1046,7 +1051,7 @@ func (c *gkeHubMembershipGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *gkeHubMembershipGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1152,21 +1157,10 @@ func (c *gkeHubMembershipRESTClient) ListMemberships(ctx context.Context, req *g } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMemberships") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1229,17 +1223,7 @@ func (c *gkeHubMembershipRESTClient) GetMembership(ctx context.Context, req *gke httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMembership") if err != nil { return err } @@ -1303,21 +1287,10 @@ func (c *gkeHubMembershipRESTClient) CreateMembership(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMembership") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1377,21 +1350,10 @@ func (c *gkeHubMembershipRESTClient) DeleteMembership(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMembership") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1458,21 +1420,10 @@ func (c *gkeHubMembershipRESTClient) UpdateMembership(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMembership") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1547,17 +1498,7 @@ func (c *gkeHubMembershipRESTClient) GenerateConnectManifest(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateConnectManifest") if err != nil { return err } @@ -1612,17 +1553,7 @@ func (c *gkeHubMembershipRESTClient) ValidateExclusivity(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ValidateExclusivity") if err != nil { return err } @@ -1689,17 +1620,7 @@ func (c *gkeHubMembershipRESTClient) GenerateExclusivityManifest(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GenerateExclusivityManifest") if err != nil { return err } @@ -1749,17 +1670,7 @@ func (c *gkeHubMembershipRESTClient) GetLocation(ctx context.Context, req *locat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1824,21 +1735,10 @@ func (c *gkeHubMembershipRESTClient) ListLocations(ctx context.Context, req *loc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1905,17 +1805,7 @@ func (c *gkeHubMembershipRESTClient) GetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1975,17 +1865,7 @@ func (c *gkeHubMembershipRESTClient) SetIamPolicy(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2047,17 +1927,7 @@ func (c *gkeHubMembershipRESTClient) TestIamPermissions(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2110,15 +1980,8 @@ func (c *gkeHubMembershipRESTClient) CancelOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2152,15 +2015,8 @@ func (c *gkeHubMembershipRESTClient) DeleteOperation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2197,17 +2053,7 @@ func (c *gkeHubMembershipRESTClient) GetOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2272,21 +2118,10 @@ func (c *gkeHubMembershipRESTClient) ListOperations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/gkehub/apiv1beta1/gke_hub_membership_client_example_go123_test.go b/gkehub/apiv1beta1/gke_hub_membership_client_example_go123_test.go index 1e9480729c49..2026fd3880d8 100644 --- a/gkehub/apiv1beta1/gke_hub_membership_client_example_go123_test.go +++ b/gkehub/apiv1beta1/gke_hub_membership_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleGkeHubMembershipClient_ListMemberships_all() { } for resp, err := range c.ListMemberships(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleGkeHubMembershipClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleGkeHubMembershipClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gkehub/apiv1beta1/gkehubpb/membership.pb.go b/gkehub/apiv1beta1/gkehubpb/membership.pb.go index 5d49863fe32c..e7b7d52b84d1 100755 --- a/gkehub/apiv1beta1/gkehubpb/membership.pb.go +++ b/gkehub/apiv1beta1/gkehubpb/membership.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkehub/v1beta1/membership.proto @@ -301,11 +301,9 @@ type Membership struct { func (x *Membership) Reset() { *x = Membership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Membership) String() string { @@ -316,7 +314,7 @@ func (*Membership) ProtoMessage() {} func (x *Membership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +477,9 @@ type MembershipEndpoint struct { func (x *MembershipEndpoint) Reset() { *x = MembershipEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipEndpoint) String() string { @@ -494,7 +490,7 @@ func (*MembershipEndpoint) ProtoMessage() {} func (x *MembershipEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +641,9 @@ type KubernetesResource struct { func (x *KubernetesResource) Reset() { *x = KubernetesResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesResource) String() string { @@ -660,7 +654,7 @@ func (*KubernetesResource) ProtoMessage() {} func (x *KubernetesResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +720,9 @@ type ResourceOptions struct { func (x *ResourceOptions) Reset() { *x = ResourceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceOptions) String() string { @@ -741,7 +733,7 @@ func (*ResourceOptions) ProtoMessage() {} func (x *ResourceOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +788,9 @@ type ResourceManifest struct { func (x *ResourceManifest) Reset() { *x = ResourceManifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceManifest) String() string { @@ -811,7 +801,7 @@ func (*ResourceManifest) ProtoMessage() {} func (x *ResourceManifest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +849,9 @@ type GkeCluster struct { func (x *GkeCluster) Reset() { *x = GkeCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GkeCluster) String() string { @@ -874,7 +862,7 @@ func (*GkeCluster) ProtoMessage() {} func (x *GkeCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +915,9 @@ type OnPremCluster struct { func (x *OnPremCluster) Reset() { *x = OnPremCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnPremCluster) String() string { @@ -942,7 +928,7 @@ func (*OnPremCluster) ProtoMessage() {} func (x *OnPremCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +992,9 @@ type MultiCloudCluster struct { func (x *MultiCloudCluster) Reset() { *x = MultiCloudCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiCloudCluster) String() string { @@ -1021,7 +1005,7 @@ func (*MultiCloudCluster) ProtoMessage() {} func (x *MultiCloudCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1049,9 @@ type EdgeCluster struct { func (x *EdgeCluster) Reset() { *x = EdgeCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EdgeCluster) String() string { @@ -1080,7 +1062,7 @@ func (*EdgeCluster) ProtoMessage() {} func (x *EdgeCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1118,11 +1100,9 @@ type ApplianceCluster struct { func (x *ApplianceCluster) Reset() { *x = ApplianceCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplianceCluster) String() string { @@ -1133,7 +1113,7 @@ func (*ApplianceCluster) ProtoMessage() {} func (x *ApplianceCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1185,11 +1165,9 @@ type KubernetesMetadata struct { func (x *KubernetesMetadata) Reset() { *x = KubernetesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesMetadata) String() string { @@ -1200,7 +1178,7 @@ func (*KubernetesMetadata) ProtoMessage() {} func (x *KubernetesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1275,9 @@ type Authority struct { func (x *Authority) Reset() { *x = Authority{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Authority) String() string { @@ -1312,7 +1288,7 @@ func (*Authority) ProtoMessage() {} func (x *Authority) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1362,9 @@ type MonitoringConfig struct { func (x *MonitoringConfig) Reset() { *x = MonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonitoringConfig) String() string { @@ -1401,7 +1375,7 @@ func (*MonitoringConfig) ProtoMessage() {} func (x *MonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1471,11 +1445,9 @@ type MembershipState struct { func (x *MembershipState) Reset() { *x = MembershipState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MembershipState) String() string { @@ -1486,7 +1458,7 @@ func (*MembershipState) ProtoMessage() {} func (x *MembershipState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1570,11 +1542,9 @@ type ListMembershipsRequest struct { func (x *ListMembershipsRequest) Reset() { *x = ListMembershipsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMembershipsRequest) String() string { @@ -1585,7 +1555,7 @@ func (*ListMembershipsRequest) ProtoMessage() {} func (x *ListMembershipsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,11 +1623,9 @@ type ListMembershipsResponse struct { func (x *ListMembershipsResponse) Reset() { *x = ListMembershipsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMembershipsResponse) String() string { @@ -1668,7 +1636,7 @@ func (*ListMembershipsResponse) ProtoMessage() {} func (x *ListMembershipsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,11 +1685,9 @@ type GetMembershipRequest struct { func (x *GetMembershipRequest) Reset() { *x = GetMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMembershipRequest) String() string { @@ -1732,7 +1698,7 @@ func (*GetMembershipRequest) ProtoMessage() {} func (x *GetMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1793,11 +1759,9 @@ type CreateMembershipRequest struct { func (x *CreateMembershipRequest) Reset() { *x = CreateMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMembershipRequest) String() string { @@ -1808,7 +1772,7 @@ func (*CreateMembershipRequest) ProtoMessage() {} func (x *CreateMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1882,11 +1846,9 @@ type DeleteMembershipRequest struct { func (x *DeleteMembershipRequest) Reset() { *x = DeleteMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMembershipRequest) String() string { @@ -1897,7 +1859,7 @@ func (*DeleteMembershipRequest) ProtoMessage() {} func (x *DeleteMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,11 +1934,9 @@ type UpdateMembershipRequest struct { func (x *UpdateMembershipRequest) Reset() { *x = UpdateMembershipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMembershipRequest) String() string { @@ -1987,7 +1947,7 @@ func (*UpdateMembershipRequest) ProtoMessage() {} func (x *UpdateMembershipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2057,11 +2017,9 @@ type GenerateConnectManifestRequest struct { func (x *GenerateConnectManifestRequest) Reset() { *x = GenerateConnectManifestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConnectManifestRequest) String() string { @@ -2072,7 +2030,7 @@ func (*GenerateConnectManifestRequest) ProtoMessage() {} func (x *GenerateConnectManifestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2143,11 +2101,9 @@ type GenerateConnectManifestResponse struct { func (x *GenerateConnectManifestResponse) Reset() { *x = GenerateConnectManifestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConnectManifestResponse) String() string { @@ -2158,7 +2114,7 @@ func (*GenerateConnectManifestResponse) ProtoMessage() {} func (x *GenerateConnectManifestResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2195,11 +2151,9 @@ type ConnectAgentResource struct { func (x *ConnectAgentResource) Reset() { *x = ConnectAgentResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectAgentResource) String() string { @@ -2210,7 +2164,7 @@ func (*ConnectAgentResource) ProtoMessage() {} func (x *ConnectAgentResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2254,11 +2208,9 @@ type TypeMeta struct { func (x *TypeMeta) Reset() { *x = TypeMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeMeta) String() string { @@ -2269,7 +2221,7 @@ func (*TypeMeta) ProtoMessage() {} func (x *TypeMeta) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2325,11 +2277,9 @@ type ConnectAgent struct { func (x *ConnectAgent) Reset() { *x = ConnectAgent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectAgent) String() string { @@ -2340,7 +2290,7 @@ func (*ConnectAgent) ProtoMessage() {} func (x *ConnectAgent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2398,11 +2348,9 @@ type ValidateExclusivityRequest struct { func (x *ValidateExclusivityRequest) Reset() { *x = ValidateExclusivityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateExclusivityRequest) String() string { @@ -2413,7 +2361,7 @@ func (*ValidateExclusivityRequest) ProtoMessage() {} func (x *ValidateExclusivityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2466,11 +2414,9 @@ type ValidateExclusivityResponse struct { func (x *ValidateExclusivityResponse) Reset() { *x = ValidateExclusivityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateExclusivityResponse) String() string { @@ -2481,7 +2427,7 @@ func (*ValidateExclusivityResponse) ProtoMessage() {} func (x *ValidateExclusivityResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2524,11 +2470,9 @@ type GenerateExclusivityManifestRequest struct { func (x *GenerateExclusivityManifestRequest) Reset() { *x = GenerateExclusivityManifestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateExclusivityManifestRequest) String() string { @@ -2539,7 +2483,7 @@ func (*GenerateExclusivityManifestRequest) ProtoMessage() {} func (x *GenerateExclusivityManifestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2591,11 +2535,9 @@ type GenerateExclusivityManifestResponse struct { func (x *GenerateExclusivityManifestResponse) Reset() { *x = GenerateExclusivityManifestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateExclusivityManifestResponse) String() string { @@ -2606,7 +2548,7 @@ func (*GenerateExclusivityManifestResponse) ProtoMessage() {} func (x *GenerateExclusivityManifestResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2663,11 +2605,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2678,7 +2618,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3453,368 +3393,6 @@ func file_google_cloud_gkehub_v1beta1_membership_proto_init() { if File_google_cloud_gkehub_v1beta1_membership_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Membership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MembershipEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResourceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourceManifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GkeCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OnPremCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MultiCloudCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EdgeCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ApplianceCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Authority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*MonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MembershipState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListMembershipsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListMembershipsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMembershipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConnectManifestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConnectManifestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ConnectAgentResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*TypeMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ConnectAgent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ValidateExclusivityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ValidateExclusivityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GenerateExclusivityManifestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GenerateExclusivityManifestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_gkehub_v1beta1_membership_proto_msgTypes[0].OneofWrappers = []any{ (*Membership_Endpoint)(nil), } diff --git a/gkehub/apiv1beta1/helpers.go b/gkehub/apiv1beta1/helpers.go index e3536205907b..0ebacbddb202 100755 --- a/gkehub/apiv1beta1/helpers.go +++ b/gkehub/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package gkehub import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "gkehub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/gkemulticloud/apiv1/attached_clusters_client.go b/gkemulticloud/apiv1/attached_clusters_client.go index 88e74b44671d..bed34028f491 100755 --- a/gkemulticloud/apiv1/attached_clusters_client.go +++ b/gkemulticloud/apiv1/attached_clusters_client.go @@ -19,6 +19,7 @@ package gkemulticloud import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -353,6 +354,8 @@ type attachedClustersGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAttachedClustersClient creates a new attached clusters client based on gRPC. @@ -381,6 +384,7 @@ func NewAttachedClustersClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, attachedClustersClient: gkemulticloudpb.NewAttachedClustersClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -435,7 +439,7 @@ func (c *attachedClustersGRPCClient) CreateAttachedCluster(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.CreateAttachedCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.CreateAttachedCluster, req, settings.GRPC, c.logger, "CreateAttachedCluster") return err }, opts...) if err != nil { @@ -455,7 +459,7 @@ func (c *attachedClustersGRPCClient) UpdateAttachedCluster(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.UpdateAttachedCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.UpdateAttachedCluster, req, settings.GRPC, c.logger, "UpdateAttachedCluster") return err }, opts...) if err != nil { @@ -475,7 +479,7 @@ func (c *attachedClustersGRPCClient) ImportAttachedCluster(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.ImportAttachedCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.ImportAttachedCluster, req, settings.GRPC, c.logger, "ImportAttachedCluster") return err }, opts...) if err != nil { @@ -495,7 +499,7 @@ func (c *attachedClustersGRPCClient) GetAttachedCluster(ctx context.Context, req var resp *gkemulticloudpb.AttachedCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.GetAttachedCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.GetAttachedCluster, req, settings.GRPC, c.logger, "GetAttachedCluster") return err }, opts...) if err != nil { @@ -524,7 +528,7 @@ func (c *attachedClustersGRPCClient) ListAttachedClusters(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.ListAttachedClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.ListAttachedClusters, req, settings.GRPC, c.logger, "ListAttachedClusters") return err }, opts...) if err != nil { @@ -559,7 +563,7 @@ func (c *attachedClustersGRPCClient) DeleteAttachedCluster(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.DeleteAttachedCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.DeleteAttachedCluster, req, settings.GRPC, c.logger, "DeleteAttachedCluster") return err }, opts...) if err != nil { @@ -579,7 +583,7 @@ func (c *attachedClustersGRPCClient) GetAttachedServerConfig(ctx context.Context var resp *gkemulticloudpb.AttachedServerConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.GetAttachedServerConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.GetAttachedServerConfig, req, settings.GRPC, c.logger, "GetAttachedServerConfig") return err }, opts...) if err != nil { @@ -597,7 +601,7 @@ func (c *attachedClustersGRPCClient) GenerateAttachedClusterInstallManifest(ctx var resp *gkemulticloudpb.GenerateAttachedClusterInstallManifestResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.GenerateAttachedClusterInstallManifest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.GenerateAttachedClusterInstallManifest, req, settings.GRPC, c.logger, "GenerateAttachedClusterInstallManifest") return err }, opts...) if err != nil { @@ -615,7 +619,7 @@ func (c *attachedClustersGRPCClient) GenerateAttachedClusterAgentToken(ctx conte var resp *gkemulticloudpb.GenerateAttachedClusterAgentTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.attachedClustersClient.GenerateAttachedClusterAgentToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.attachedClustersClient.GenerateAttachedClusterAgentToken, req, settings.GRPC, c.logger, "GenerateAttachedClusterAgentToken") return err }, opts...) if err != nil { @@ -632,7 +636,7 @@ func (c *attachedClustersGRPCClient) CancelOperation(ctx context.Context, req *l opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -646,7 +650,7 @@ func (c *attachedClustersGRPCClient) DeleteOperation(ctx context.Context, req *l opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -661,7 +665,7 @@ func (c *attachedClustersGRPCClient) GetOperation(ctx context.Context, req *long var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -690,7 +694,7 @@ func (c *attachedClustersGRPCClient) ListOperations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/gkemulticloud/apiv1/attached_clusters_client_example_go123_test.go b/gkemulticloud/apiv1/attached_clusters_client_example_go123_test.go index 570cc081966e..924f841d70b1 100644 --- a/gkemulticloud/apiv1/attached_clusters_client_example_go123_test.go +++ b/gkemulticloud/apiv1/attached_clusters_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAttachedClustersClient_ListAttachedClusters_all() { } for resp, err := range c.ListAttachedClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAttachedClustersClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gkemulticloud/apiv1/aws_clusters_client.go b/gkemulticloud/apiv1/aws_clusters_client.go index 9f2959becc86..f0c605e536bf 100755 --- a/gkemulticloud/apiv1/aws_clusters_client.go +++ b/gkemulticloud/apiv1/aws_clusters_client.go @@ -19,6 +19,7 @@ package gkemulticloud import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -495,6 +496,8 @@ type awsClustersGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAwsClustersClient creates a new aws clusters client based on gRPC. @@ -522,6 +525,7 @@ func NewAwsClustersClient(ctx context.Context, opts ...option.ClientOption) (*Aw connPool: connPool, awsClustersClient: gkemulticloudpb.NewAwsClustersClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -576,7 +580,7 @@ func (c *awsClustersGRPCClient) CreateAwsCluster(ctx context.Context, req *gkemu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.CreateAwsCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.CreateAwsCluster, req, settings.GRPC, c.logger, "CreateAwsCluster") return err }, opts...) if err != nil { @@ -596,7 +600,7 @@ func (c *awsClustersGRPCClient) UpdateAwsCluster(ctx context.Context, req *gkemu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.UpdateAwsCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.UpdateAwsCluster, req, settings.GRPC, c.logger, "UpdateAwsCluster") return err }, opts...) if err != nil { @@ -616,7 +620,7 @@ func (c *awsClustersGRPCClient) GetAwsCluster(ctx context.Context, req *gkemulti var resp *gkemulticloudpb.AwsCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GetAwsCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GetAwsCluster, req, settings.GRPC, c.logger, "GetAwsCluster") return err }, opts...) if err != nil { @@ -645,7 +649,7 @@ func (c *awsClustersGRPCClient) ListAwsClusters(ctx context.Context, req *gkemul } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.ListAwsClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.ListAwsClusters, req, settings.GRPC, c.logger, "ListAwsClusters") return err }, opts...) if err != nil { @@ -680,7 +684,7 @@ func (c *awsClustersGRPCClient) DeleteAwsCluster(ctx context.Context, req *gkemu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.DeleteAwsCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.DeleteAwsCluster, req, settings.GRPC, c.logger, "DeleteAwsCluster") return err }, opts...) if err != nil { @@ -700,7 +704,7 @@ func (c *awsClustersGRPCClient) GenerateAwsClusterAgentToken(ctx context.Context var resp *gkemulticloudpb.GenerateAwsClusterAgentTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GenerateAwsClusterAgentToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GenerateAwsClusterAgentToken, req, settings.GRPC, c.logger, "GenerateAwsClusterAgentToken") return err }, opts...) if err != nil { @@ -718,7 +722,7 @@ func (c *awsClustersGRPCClient) GenerateAwsAccessToken(ctx context.Context, req var resp *gkemulticloudpb.GenerateAwsAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GenerateAwsAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GenerateAwsAccessToken, req, settings.GRPC, c.logger, "GenerateAwsAccessToken") return err }, opts...) if err != nil { @@ -736,7 +740,7 @@ func (c *awsClustersGRPCClient) CreateAwsNodePool(ctx context.Context, req *gkem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.CreateAwsNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.CreateAwsNodePool, req, settings.GRPC, c.logger, "CreateAwsNodePool") return err }, opts...) if err != nil { @@ -756,7 +760,7 @@ func (c *awsClustersGRPCClient) UpdateAwsNodePool(ctx context.Context, req *gkem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.UpdateAwsNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.UpdateAwsNodePool, req, settings.GRPC, c.logger, "UpdateAwsNodePool") return err }, opts...) if err != nil { @@ -776,7 +780,7 @@ func (c *awsClustersGRPCClient) RollbackAwsNodePoolUpdate(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.RollbackAwsNodePoolUpdate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.RollbackAwsNodePoolUpdate, req, settings.GRPC, c.logger, "RollbackAwsNodePoolUpdate") return err }, opts...) if err != nil { @@ -796,7 +800,7 @@ func (c *awsClustersGRPCClient) GetAwsNodePool(ctx context.Context, req *gkemult var resp *gkemulticloudpb.AwsNodePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GetAwsNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GetAwsNodePool, req, settings.GRPC, c.logger, "GetAwsNodePool") return err }, opts...) if err != nil { @@ -825,7 +829,7 @@ func (c *awsClustersGRPCClient) ListAwsNodePools(ctx context.Context, req *gkemu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.ListAwsNodePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.ListAwsNodePools, req, settings.GRPC, c.logger, "ListAwsNodePools") return err }, opts...) if err != nil { @@ -860,7 +864,7 @@ func (c *awsClustersGRPCClient) DeleteAwsNodePool(ctx context.Context, req *gkem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.DeleteAwsNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.DeleteAwsNodePool, req, settings.GRPC, c.logger, "DeleteAwsNodePool") return err }, opts...) if err != nil { @@ -880,7 +884,7 @@ func (c *awsClustersGRPCClient) GetAwsOpenIdConfig(ctx context.Context, req *gke var resp *gkemulticloudpb.AwsOpenIdConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GetAwsOpenIdConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GetAwsOpenIdConfig, req, settings.GRPC, c.logger, "GetAwsOpenIdConfig") return err }, opts...) if err != nil { @@ -898,7 +902,7 @@ func (c *awsClustersGRPCClient) GetAwsJsonWebKeys(ctx context.Context, req *gkem var resp *gkemulticloudpb.AwsJsonWebKeys err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GetAwsJsonWebKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GetAwsJsonWebKeys, req, settings.GRPC, c.logger, "GetAwsJsonWebKeys") return err }, opts...) if err != nil { @@ -916,7 +920,7 @@ func (c *awsClustersGRPCClient) GetAwsServerConfig(ctx context.Context, req *gke var resp *gkemulticloudpb.AwsServerConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.awsClustersClient.GetAwsServerConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.awsClustersClient.GetAwsServerConfig, req, settings.GRPC, c.logger, "GetAwsServerConfig") return err }, opts...) if err != nil { @@ -933,7 +937,7 @@ func (c *awsClustersGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -947,7 +951,7 @@ func (c *awsClustersGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -962,7 +966,7 @@ func (c *awsClustersGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -991,7 +995,7 @@ func (c *awsClustersGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/gkemulticloud/apiv1/aws_clusters_client_example_go123_test.go b/gkemulticloud/apiv1/aws_clusters_client_example_go123_test.go index c0c9935505f3..22f651d53050 100644 --- a/gkemulticloud/apiv1/aws_clusters_client_example_go123_test.go +++ b/gkemulticloud/apiv1/aws_clusters_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAwsClustersClient_ListAwsClusters_all() { } for resp, err := range c.ListAwsClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAwsClustersClient_ListAwsNodePools_all() { } for resp, err := range c.ListAwsNodePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAwsClustersClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gkemulticloud/apiv1/azure_clusters_client.go b/gkemulticloud/apiv1/azure_clusters_client.go index b1541fe2dcc4..8b35979c4e03 100755 --- a/gkemulticloud/apiv1/azure_clusters_client.go +++ b/gkemulticloud/apiv1/azure_clusters_client.go @@ -19,6 +19,7 @@ package gkemulticloud import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -565,6 +566,8 @@ type azureClustersGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAzureClustersClient creates a new azure clusters client based on gRPC. @@ -592,6 +595,7 @@ func NewAzureClustersClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, azureClustersClient: gkemulticloudpb.NewAzureClustersClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -646,7 +650,7 @@ func (c *azureClustersGRPCClient) CreateAzureClient(ctx context.Context, req *gk var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.CreateAzureClient(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.CreateAzureClient, req, settings.GRPC, c.logger, "CreateAzureClient") return err }, opts...) if err != nil { @@ -666,7 +670,7 @@ func (c *azureClustersGRPCClient) GetAzureClient(ctx context.Context, req *gkemu var resp *gkemulticloudpb.AzureClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureClient(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureClient, req, settings.GRPC, c.logger, "GetAzureClient") return err }, opts...) if err != nil { @@ -695,7 +699,7 @@ func (c *azureClustersGRPCClient) ListAzureClients(ctx context.Context, req *gke } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.ListAzureClients(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.ListAzureClients, req, settings.GRPC, c.logger, "ListAzureClients") return err }, opts...) if err != nil { @@ -730,7 +734,7 @@ func (c *azureClustersGRPCClient) DeleteAzureClient(ctx context.Context, req *gk var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.DeleteAzureClient(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.DeleteAzureClient, req, settings.GRPC, c.logger, "DeleteAzureClient") return err }, opts...) if err != nil { @@ -750,7 +754,7 @@ func (c *azureClustersGRPCClient) CreateAzureCluster(ctx context.Context, req *g var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.CreateAzureCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.CreateAzureCluster, req, settings.GRPC, c.logger, "CreateAzureCluster") return err }, opts...) if err != nil { @@ -770,7 +774,7 @@ func (c *azureClustersGRPCClient) UpdateAzureCluster(ctx context.Context, req *g var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.UpdateAzureCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.UpdateAzureCluster, req, settings.GRPC, c.logger, "UpdateAzureCluster") return err }, opts...) if err != nil { @@ -790,7 +794,7 @@ func (c *azureClustersGRPCClient) GetAzureCluster(ctx context.Context, req *gkem var resp *gkemulticloudpb.AzureCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureCluster, req, settings.GRPC, c.logger, "GetAzureCluster") return err }, opts...) if err != nil { @@ -819,7 +823,7 @@ func (c *azureClustersGRPCClient) ListAzureClusters(ctx context.Context, req *gk } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.ListAzureClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.ListAzureClusters, req, settings.GRPC, c.logger, "ListAzureClusters") return err }, opts...) if err != nil { @@ -854,7 +858,7 @@ func (c *azureClustersGRPCClient) DeleteAzureCluster(ctx context.Context, req *g var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.DeleteAzureCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.DeleteAzureCluster, req, settings.GRPC, c.logger, "DeleteAzureCluster") return err }, opts...) if err != nil { @@ -874,7 +878,7 @@ func (c *azureClustersGRPCClient) GenerateAzureClusterAgentToken(ctx context.Con var resp *gkemulticloudpb.GenerateAzureClusterAgentTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GenerateAzureClusterAgentToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GenerateAzureClusterAgentToken, req, settings.GRPC, c.logger, "GenerateAzureClusterAgentToken") return err }, opts...) if err != nil { @@ -892,7 +896,7 @@ func (c *azureClustersGRPCClient) GenerateAzureAccessToken(ctx context.Context, var resp *gkemulticloudpb.GenerateAzureAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GenerateAzureAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GenerateAzureAccessToken, req, settings.GRPC, c.logger, "GenerateAzureAccessToken") return err }, opts...) if err != nil { @@ -910,7 +914,7 @@ func (c *azureClustersGRPCClient) CreateAzureNodePool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.CreateAzureNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.CreateAzureNodePool, req, settings.GRPC, c.logger, "CreateAzureNodePool") return err }, opts...) if err != nil { @@ -930,7 +934,7 @@ func (c *azureClustersGRPCClient) UpdateAzureNodePool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.UpdateAzureNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.UpdateAzureNodePool, req, settings.GRPC, c.logger, "UpdateAzureNodePool") return err }, opts...) if err != nil { @@ -950,7 +954,7 @@ func (c *azureClustersGRPCClient) GetAzureNodePool(ctx context.Context, req *gke var resp *gkemulticloudpb.AzureNodePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureNodePool, req, settings.GRPC, c.logger, "GetAzureNodePool") return err }, opts...) if err != nil { @@ -979,7 +983,7 @@ func (c *azureClustersGRPCClient) ListAzureNodePools(ctx context.Context, req *g } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.ListAzureNodePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.ListAzureNodePools, req, settings.GRPC, c.logger, "ListAzureNodePools") return err }, opts...) if err != nil { @@ -1014,7 +1018,7 @@ func (c *azureClustersGRPCClient) DeleteAzureNodePool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.DeleteAzureNodePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.DeleteAzureNodePool, req, settings.GRPC, c.logger, "DeleteAzureNodePool") return err }, opts...) if err != nil { @@ -1034,7 +1038,7 @@ func (c *azureClustersGRPCClient) GetAzureOpenIdConfig(ctx context.Context, req var resp *gkemulticloudpb.AzureOpenIdConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureOpenIdConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureOpenIdConfig, req, settings.GRPC, c.logger, "GetAzureOpenIdConfig") return err }, opts...) if err != nil { @@ -1052,7 +1056,7 @@ func (c *azureClustersGRPCClient) GetAzureJsonWebKeys(ctx context.Context, req * var resp *gkemulticloudpb.AzureJsonWebKeys err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureJsonWebKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureJsonWebKeys, req, settings.GRPC, c.logger, "GetAzureJsonWebKeys") return err }, opts...) if err != nil { @@ -1070,7 +1074,7 @@ func (c *azureClustersGRPCClient) GetAzureServerConfig(ctx context.Context, req var resp *gkemulticloudpb.AzureServerConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.azureClustersClient.GetAzureServerConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.azureClustersClient.GetAzureServerConfig, req, settings.GRPC, c.logger, "GetAzureServerConfig") return err }, opts...) if err != nil { @@ -1087,7 +1091,7 @@ func (c *azureClustersGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1101,7 +1105,7 @@ func (c *azureClustersGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1116,7 +1120,7 @@ func (c *azureClustersGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1145,7 +1149,7 @@ func (c *azureClustersGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/gkemulticloud/apiv1/azure_clusters_client_example_go123_test.go b/gkemulticloud/apiv1/azure_clusters_client_example_go123_test.go index c04055096a55..fbbcc581b7b0 100644 --- a/gkemulticloud/apiv1/azure_clusters_client_example_go123_test.go +++ b/gkemulticloud/apiv1/azure_clusters_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAzureClustersClient_ListAzureClients_all() { } for resp, err := range c.ListAzureClients(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAzureClustersClient_ListAzureClusters_all() { } for resp, err := range c.ListAzureClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAzureClustersClient_ListAzureNodePools_all() { } for resp, err := range c.ListAzureNodePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleAzureClustersClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gkemulticloud/apiv1/gkemulticloudpb/attached_resources.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/attached_resources.pb.go index 6824a501c289..579cf21b405f 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/attached_resources.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/attached_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/attached_resources.proto @@ -194,11 +194,9 @@ type AttachedCluster struct { func (x *AttachedCluster) Reset() { *x = AttachedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedCluster) String() string { @@ -209,7 +207,7 @@ func (*AttachedCluster) ProtoMessage() {} func (x *AttachedCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,11 +407,9 @@ type AttachedClustersAuthorization struct { func (x *AttachedClustersAuthorization) Reset() { *x = AttachedClustersAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedClustersAuthorization) String() string { @@ -424,7 +420,7 @@ func (*AttachedClustersAuthorization) ProtoMessage() {} func (x *AttachedClustersAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -465,11 +461,9 @@ type AttachedClusterUser struct { func (x *AttachedClusterUser) Reset() { *x = AttachedClusterUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedClusterUser) String() string { @@ -480,7 +474,7 @@ func (*AttachedClusterUser) ProtoMessage() {} func (x *AttachedClusterUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +508,9 @@ type AttachedClusterGroup struct { func (x *AttachedClusterGroup) Reset() { *x = AttachedClusterGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedClusterGroup) String() string { @@ -529,7 +521,7 @@ func (*AttachedClusterGroup) ProtoMessage() {} func (x *AttachedClusterGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +573,9 @@ type AttachedOidcConfig struct { func (x *AttachedOidcConfig) Reset() { *x = AttachedOidcConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedOidcConfig) String() string { @@ -596,7 +586,7 @@ func (*AttachedOidcConfig) ProtoMessage() {} func (x *AttachedOidcConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +630,9 @@ type AttachedServerConfig struct { func (x *AttachedServerConfig) Reset() { *x = AttachedServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedServerConfig) String() string { @@ -655,7 +643,7 @@ func (*AttachedServerConfig) ProtoMessage() {} func (x *AttachedServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +684,9 @@ type AttachedPlatformVersionInfo struct { func (x *AttachedPlatformVersionInfo) Reset() { *x = AttachedPlatformVersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedPlatformVersionInfo) String() string { @@ -711,7 +697,7 @@ func (*AttachedPlatformVersionInfo) ProtoMessage() {} func (x *AttachedPlatformVersionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,11 +731,9 @@ type AttachedClusterError struct { func (x *AttachedClusterError) Reset() { *x = AttachedClusterError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedClusterError) String() string { @@ -760,7 +744,7 @@ func (*AttachedClusterError) ProtoMessage() {} func (x *AttachedClusterError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +780,9 @@ type AttachedProxyConfig struct { func (x *AttachedProxyConfig) Reset() { *x = AttachedProxyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachedProxyConfig) String() string { @@ -811,7 +793,7 @@ func (*AttachedProxyConfig) ProtoMessage() {} func (x *AttachedProxyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +829,9 @@ type KubernetesSecret struct { func (x *KubernetesSecret) Reset() { *x = KubernetesSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesSecret) String() string { @@ -862,7 +842,7 @@ func (*KubernetesSecret) ProtoMessage() {} func (x *KubernetesSecret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,128 +1154,6 @@ func file_google_cloud_gkemulticloud_v1_attached_resources_proto_init() { return } file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttachedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttachedClustersAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttachedClusterUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AttachedClusterGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AttachedOidcConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AttachedServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AttachedPlatformVersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AttachedClusterError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AttachedProxyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*KubernetesSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/attached_service.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/attached_service.pb.go index 57e7b1204e59..83ba920c8408 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/attached_service.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/attached_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/attached_service.proto @@ -87,11 +87,9 @@ type GenerateAttachedClusterInstallManifestRequest struct { func (x *GenerateAttachedClusterInstallManifestRequest) Reset() { *x = GenerateAttachedClusterInstallManifestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAttachedClusterInstallManifestRequest) String() string { @@ -102,7 +100,7 @@ func (*GenerateAttachedClusterInstallManifestRequest) ProtoMessage() {} func (x *GenerateAttachedClusterInstallManifestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type GenerateAttachedClusterInstallManifestResponse struct { func (x *GenerateAttachedClusterInstallManifestResponse) Reset() { *x = GenerateAttachedClusterInstallManifestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAttachedClusterInstallManifestResponse) String() string { @@ -174,7 +170,7 @@ func (*GenerateAttachedClusterInstallManifestResponse) ProtoMessage() {} func (x *GenerateAttachedClusterInstallManifestResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +226,9 @@ type CreateAttachedClusterRequest struct { func (x *CreateAttachedClusterRequest) Reset() { *x = CreateAttachedClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAttachedClusterRequest) String() string { @@ -245,7 +239,7 @@ func (*CreateAttachedClusterRequest) ProtoMessage() {} func (x *CreateAttachedClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +317,9 @@ type ImportAttachedClusterRequest struct { func (x *ImportAttachedClusterRequest) Reset() { *x = ImportAttachedClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAttachedClusterRequest) String() string { @@ -338,7 +330,7 @@ func (*ImportAttachedClusterRequest) ProtoMessage() {} func (x *ImportAttachedClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +420,9 @@ type UpdateAttachedClusterRequest struct { func (x *UpdateAttachedClusterRequest) Reset() { *x = UpdateAttachedClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttachedClusterRequest) String() string { @@ -443,7 +433,7 @@ func (*UpdateAttachedClusterRequest) ProtoMessage() {} func (x *UpdateAttachedClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type GetAttachedClusterRequest struct { func (x *GetAttachedClusterRequest) Reset() { *x = GetAttachedClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttachedClusterRequest) String() string { @@ -514,7 +502,7 @@ func (*GetAttachedClusterRequest) ProtoMessage() {} func (x *GetAttachedClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +554,9 @@ type ListAttachedClustersRequest struct { func (x *ListAttachedClustersRequest) Reset() { *x = ListAttachedClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachedClustersRequest) String() string { @@ -581,7 +567,7 @@ func (*ListAttachedClustersRequest) ProtoMessage() {} func (x *ListAttachedClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,11 +619,9 @@ type ListAttachedClustersResponse struct { func (x *ListAttachedClustersResponse) Reset() { *x = ListAttachedClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachedClustersResponse) String() string { @@ -648,7 +632,7 @@ func (*ListAttachedClustersResponse) ProtoMessage() {} func (x *ListAttachedClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +703,9 @@ type DeleteAttachedClusterRequest struct { func (x *DeleteAttachedClusterRequest) Reset() { *x = DeleteAttachedClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAttachedClusterRequest) String() string { @@ -734,7 +716,7 @@ func (*DeleteAttachedClusterRequest) ProtoMessage() {} func (x *DeleteAttachedClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -805,11 +787,9 @@ type GetAttachedServerConfigRequest struct { func (x *GetAttachedServerConfigRequest) Reset() { *x = GetAttachedServerConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttachedServerConfigRequest) String() string { @@ -820,7 +800,7 @@ func (*GetAttachedServerConfigRequest) ProtoMessage() {} func (x *GetAttachedServerConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +849,9 @@ type GenerateAttachedClusterAgentTokenRequest struct { func (x *GenerateAttachedClusterAgentTokenRequest) Reset() { *x = GenerateAttachedClusterAgentTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAttachedClusterAgentTokenRequest) String() string { @@ -884,7 +862,7 @@ func (*GenerateAttachedClusterAgentTokenRequest) ProtoMessage() {} func (x *GenerateAttachedClusterAgentTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +952,9 @@ type GenerateAttachedClusterAgentTokenResponse struct { func (x *GenerateAttachedClusterAgentTokenResponse) Reset() { *x = GenerateAttachedClusterAgentTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAttachedClusterAgentTokenResponse) String() string { @@ -989,7 +965,7 @@ func (*GenerateAttachedClusterAgentTokenResponse) ProtoMessage() {} func (x *GenerateAttachedClusterAgentTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1460,152 +1436,6 @@ func file_google_cloud_gkemulticloud_v1_attached_service_proto_init() { } file_google_cloud_gkemulticloud_v1_attached_resources_proto_init() file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAttachedClusterInstallManifestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAttachedClusterInstallManifestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateAttachedClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportAttachedClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttachedClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetAttachedClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachedClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachedClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAttachedClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetAttachedServerConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAttachedClusterAgentTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_attached_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAttachedClusterAgentTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/aws_resources.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/aws_resources.pb.go index 1a2a3029f0ec..808cafbd79b2 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/aws_resources.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/aws_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/aws_resources.proto @@ -372,11 +372,9 @@ type AwsCluster struct { func (x *AwsCluster) Reset() { *x = AwsCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsCluster) String() string { @@ -387,7 +385,7 @@ func (*AwsCluster) ProtoMessage() {} func (x *AwsCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +618,9 @@ type AwsControlPlane struct { func (x *AwsControlPlane) Reset() { *x = AwsControlPlane{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsControlPlane) String() string { @@ -635,7 +631,7 @@ func (*AwsControlPlane) ProtoMessage() {} func (x *AwsControlPlane) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +761,9 @@ type AwsServicesAuthentication struct { func (x *AwsServicesAuthentication) Reset() { *x = AwsServicesAuthentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsServicesAuthentication) String() string { @@ -780,7 +774,7 @@ func (*AwsServicesAuthentication) ProtoMessage() {} func (x *AwsServicesAuthentication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +827,9 @@ type AwsAuthorization struct { func (x *AwsAuthorization) Reset() { *x = AwsAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAuthorization) String() string { @@ -848,7 +840,7 @@ func (*AwsAuthorization) ProtoMessage() {} func (x *AwsAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +881,9 @@ type AwsClusterUser struct { func (x *AwsClusterUser) Reset() { *x = AwsClusterUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsClusterUser) String() string { @@ -904,7 +894,7 @@ func (*AwsClusterUser) ProtoMessage() {} func (x *AwsClusterUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +928,9 @@ type AwsClusterGroup struct { func (x *AwsClusterGroup) Reset() { *x = AwsClusterGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsClusterGroup) String() string { @@ -953,7 +941,7 @@ func (*AwsClusterGroup) ProtoMessage() {} func (x *AwsClusterGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +975,9 @@ type AwsDatabaseEncryption struct { func (x *AwsDatabaseEncryption) Reset() { *x = AwsDatabaseEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsDatabaseEncryption) String() string { @@ -1002,7 +988,7 @@ func (*AwsDatabaseEncryption) ProtoMessage() {} func (x *AwsDatabaseEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1057,11 +1043,9 @@ type AwsVolumeTemplate struct { func (x *AwsVolumeTemplate) Reset() { *x = AwsVolumeTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsVolumeTemplate) String() string { @@ -1072,7 +1056,7 @@ func (*AwsVolumeTemplate) ProtoMessage() {} func (x *AwsVolumeTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1138,9 @@ type AwsClusterNetworking struct { func (x *AwsClusterNetworking) Reset() { *x = AwsClusterNetworking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsClusterNetworking) String() string { @@ -1169,7 +1151,7 @@ func (*AwsClusterNetworking) ProtoMessage() {} func (x *AwsClusterNetworking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1281,11 +1263,9 @@ type AwsNodePool struct { func (x *AwsNodePool) Reset() { *x = AwsNodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsNodePool) String() string { @@ -1296,7 +1276,7 @@ func (*AwsNodePool) ProtoMessage() {} func (x *AwsNodePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1444,9 @@ type UpdateSettings struct { func (x *UpdateSettings) Reset() { *x = UpdateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettings) String() string { @@ -1479,7 +1457,7 @@ func (*UpdateSettings) ProtoMessage() {} func (x *UpdateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1496,9 @@ type SurgeSettings struct { func (x *SurgeSettings) Reset() { *x = SurgeSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SurgeSettings) String() string { @@ -1533,7 +1509,7 @@ func (*SurgeSettings) ProtoMessage() {} func (x *SurgeSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1554,9 @@ type AwsNodeManagement struct { func (x *AwsNodeManagement) Reset() { *x = AwsNodeManagement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsNodeManagement) String() string { @@ -1593,7 +1567,7 @@ func (*AwsNodeManagement) ProtoMessage() {} func (x *AwsNodeManagement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1653,9 @@ type AwsNodeConfig struct { func (x *AwsNodeConfig) Reset() { *x = AwsNodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsNodeConfig) String() string { @@ -1694,7 +1666,7 @@ func (*AwsNodeConfig) ProtoMessage() {} func (x *AwsNodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1824,11 +1796,9 @@ type AwsNodePoolAutoscaling struct { func (x *AwsNodePoolAutoscaling) Reset() { *x = AwsNodePoolAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsNodePoolAutoscaling) String() string { @@ -1839,7 +1809,7 @@ func (*AwsNodePoolAutoscaling) ProtoMessage() {} func (x *AwsNodePoolAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1893,11 +1863,9 @@ type AwsOpenIdConfig struct { func (x *AwsOpenIdConfig) Reset() { *x = AwsOpenIdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsOpenIdConfig) String() string { @@ -1908,7 +1876,7 @@ func (*AwsOpenIdConfig) ProtoMessage() {} func (x *AwsOpenIdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1985,11 +1953,9 @@ type AwsJsonWebKeys struct { func (x *AwsJsonWebKeys) Reset() { *x = AwsJsonWebKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsJsonWebKeys) String() string { @@ -2000,7 +1966,7 @@ func (*AwsJsonWebKeys) ProtoMessage() {} func (x *AwsJsonWebKeys) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2007,9 @@ type AwsServerConfig struct { func (x *AwsServerConfig) Reset() { *x = AwsServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsServerConfig) String() string { @@ -2056,7 +2020,7 @@ func (*AwsServerConfig) ProtoMessage() {} func (x *AwsServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2120,11 +2084,9 @@ type AwsK8SVersionInfo struct { func (x *AwsK8SVersionInfo) Reset() { *x = AwsK8SVersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsK8SVersionInfo) String() string { @@ -2135,7 +2097,7 @@ func (*AwsK8SVersionInfo) ProtoMessage() {} func (x *AwsK8SVersionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2159,9 @@ type AwsSshConfig struct { func (x *AwsSshConfig) Reset() { *x = AwsSshConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSshConfig) String() string { @@ -2212,7 +2172,7 @@ func (*AwsSshConfig) ProtoMessage() {} func (x *AwsSshConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2254,11 +2214,9 @@ type AwsProxyConfig struct { func (x *AwsProxyConfig) Reset() { *x = AwsProxyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsProxyConfig) String() string { @@ -2269,7 +2227,7 @@ func (*AwsProxyConfig) ProtoMessage() {} func (x *AwsProxyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2310,11 +2268,9 @@ type AwsConfigEncryption struct { func (x *AwsConfigEncryption) Reset() { *x = AwsConfigEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsConfigEncryption) String() string { @@ -2325,7 +2281,7 @@ func (*AwsConfigEncryption) ProtoMessage() {} func (x *AwsConfigEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2363,11 +2319,9 @@ type AwsInstancePlacement struct { func (x *AwsInstancePlacement) Reset() { *x = AwsInstancePlacement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsInstancePlacement) String() string { @@ -2378,7 +2332,7 @@ func (*AwsInstancePlacement) ProtoMessage() {} func (x *AwsInstancePlacement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2419,11 +2373,9 @@ type AwsAutoscalingGroupMetricsCollection struct { func (x *AwsAutoscalingGroupMetricsCollection) Reset() { *x = AwsAutoscalingGroupMetricsCollection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAutoscalingGroupMetricsCollection) String() string { @@ -2434,7 +2386,7 @@ func (*AwsAutoscalingGroupMetricsCollection) ProtoMessage() {} func (x *AwsAutoscalingGroupMetricsCollection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2475,11 +2427,9 @@ type SpotConfig struct { func (x *SpotConfig) Reset() { *x = SpotConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpotConfig) String() string { @@ -2490,7 +2440,7 @@ func (*SpotConfig) ProtoMessage() {} func (x *SpotConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2524,11 +2474,9 @@ type AwsClusterError struct { func (x *AwsClusterError) Reset() { *x = AwsClusterError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsClusterError) String() string { @@ -2539,7 +2487,7 @@ func (*AwsClusterError) ProtoMessage() {} func (x *AwsClusterError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2573,11 +2521,9 @@ type AwsNodePoolError struct { func (x *AwsNodePoolError) Reset() { *x = AwsNodePoolError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsNodePoolError) String() string { @@ -2588,7 +2534,7 @@ func (*AwsNodePoolError) ProtoMessage() {} func (x *AwsNodePoolError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3311,332 +3257,6 @@ func file_google_cloud_gkemulticloud_v1_aws_resources_proto_init() { return } file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AwsCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AwsControlPlane); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AwsServicesAuthentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AwsAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AwsClusterUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AwsClusterGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AwsDatabaseEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AwsVolumeTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AwsClusterNetworking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AwsNodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SurgeSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AwsNodeManagement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AwsNodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AwsNodePoolAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AwsOpenIdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AwsJsonWebKeys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AwsServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AwsK8SVersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AwsSshConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AwsProxyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AwsConfigEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AwsInstancePlacement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AwsAutoscalingGroupMetricsCollection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SpotConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AwsClusterError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AwsNodePoolError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/aws_service.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/aws_service.pb.go index 563ff0b33365..729aff078207 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/aws_service.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/aws_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/aws_service.proto @@ -78,11 +78,9 @@ type CreateAwsClusterRequest struct { func (x *CreateAwsClusterRequest) Reset() { *x = CreateAwsClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAwsClusterRequest) String() string { @@ -93,7 +91,7 @@ func (*CreateAwsClusterRequest) ProtoMessage() {} func (x *CreateAwsClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +181,9 @@ type UpdateAwsClusterRequest struct { func (x *UpdateAwsClusterRequest) Reset() { *x = UpdateAwsClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAwsClusterRequest) String() string { @@ -198,7 +194,7 @@ func (*UpdateAwsClusterRequest) ProtoMessage() {} func (x *UpdateAwsClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +250,9 @@ type GetAwsClusterRequest struct { func (x *GetAwsClusterRequest) Reset() { *x = GetAwsClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAwsClusterRequest) String() string { @@ -269,7 +263,7 @@ func (*GetAwsClusterRequest) ProtoMessage() {} func (x *GetAwsClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,11 +315,9 @@ type ListAwsClustersRequest struct { func (x *ListAwsClustersRequest) Reset() { *x = ListAwsClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAwsClustersRequest) String() string { @@ -336,7 +328,7 @@ func (*ListAwsClustersRequest) ProtoMessage() {} func (x *ListAwsClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,11 +380,9 @@ type ListAwsClustersResponse struct { func (x *ListAwsClustersResponse) Reset() { *x = ListAwsClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAwsClustersResponse) String() string { @@ -403,7 +393,7 @@ func (*ListAwsClustersResponse) ProtoMessage() {} func (x *ListAwsClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +463,9 @@ type DeleteAwsClusterRequest struct { func (x *DeleteAwsClusterRequest) Reset() { *x = DeleteAwsClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAwsClusterRequest) String() string { @@ -488,7 +476,7 @@ func (*DeleteAwsClusterRequest) ProtoMessage() {} func (x *DeleteAwsClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +561,9 @@ type CreateAwsNodePoolRequest struct { func (x *CreateAwsNodePoolRequest) Reset() { *x = CreateAwsNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAwsNodePoolRequest) String() string { @@ -588,7 +574,7 @@ func (*CreateAwsNodePoolRequest) ProtoMessage() {} func (x *CreateAwsNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +667,9 @@ type UpdateAwsNodePoolRequest struct { func (x *UpdateAwsNodePoolRequest) Reset() { *x = UpdateAwsNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAwsNodePoolRequest) String() string { @@ -696,7 +680,7 @@ func (*UpdateAwsNodePoolRequest) ProtoMessage() {} func (x *UpdateAwsNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +739,9 @@ type RollbackAwsNodePoolUpdateRequest struct { func (x *RollbackAwsNodePoolUpdateRequest) Reset() { *x = RollbackAwsNodePoolUpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackAwsNodePoolUpdateRequest) String() string { @@ -770,7 +752,7 @@ func (*RollbackAwsNodePoolUpdateRequest) ProtoMessage() {} func (x *RollbackAwsNodePoolUpdateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +801,9 @@ type GetAwsNodePoolRequest struct { func (x *GetAwsNodePoolRequest) Reset() { *x = GetAwsNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAwsNodePoolRequest) String() string { @@ -834,7 +814,7 @@ func (*GetAwsNodePoolRequest) ProtoMessage() {} func (x *GetAwsNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +867,9 @@ type ListAwsNodePoolsRequest struct { func (x *ListAwsNodePoolsRequest) Reset() { *x = ListAwsNodePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAwsNodePoolsRequest) String() string { @@ -902,7 +880,7 @@ func (*ListAwsNodePoolsRequest) ProtoMessage() {} func (x *ListAwsNodePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +932,9 @@ type ListAwsNodePoolsResponse struct { func (x *ListAwsNodePoolsResponse) Reset() { *x = ListAwsNodePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAwsNodePoolsResponse) String() string { @@ -969,7 +945,7 @@ func (*ListAwsNodePoolsResponse) ProtoMessage() {} func (x *ListAwsNodePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,11 +1016,9 @@ type DeleteAwsNodePoolRequest struct { func (x *DeleteAwsNodePoolRequest) Reset() { *x = DeleteAwsNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAwsNodePoolRequest) String() string { @@ -1055,7 +1029,7 @@ func (*DeleteAwsNodePoolRequest) ProtoMessage() {} func (x *DeleteAwsNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1120,11 +1094,9 @@ type GetAwsOpenIdConfigRequest struct { func (x *GetAwsOpenIdConfigRequest) Reset() { *x = GetAwsOpenIdConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAwsOpenIdConfigRequest) String() string { @@ -1135,7 +1107,7 @@ func (*GetAwsOpenIdConfigRequest) ProtoMessage() {} func (x *GetAwsOpenIdConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1146,9 @@ type GetAwsJsonWebKeysRequest struct { func (x *GetAwsJsonWebKeysRequest) Reset() { *x = GetAwsJsonWebKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAwsJsonWebKeysRequest) String() string { @@ -1189,7 +1159,7 @@ func (*GetAwsJsonWebKeysRequest) ProtoMessage() {} func (x *GetAwsJsonWebKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1201,9 @@ type GetAwsServerConfigRequest struct { func (x *GetAwsServerConfigRequest) Reset() { *x = GetAwsServerConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAwsServerConfigRequest) String() string { @@ -1246,7 +1214,7 @@ func (*GetAwsServerConfigRequest) ProtoMessage() {} func (x *GetAwsServerConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1288,11 +1256,9 @@ type GenerateAwsAccessTokenRequest struct { func (x *GenerateAwsAccessTokenRequest) Reset() { *x = GenerateAwsAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAwsAccessTokenRequest) String() string { @@ -1303,7 +1269,7 @@ func (*GenerateAwsAccessTokenRequest) ProtoMessage() {} func (x *GenerateAwsAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1339,11 +1305,9 @@ type GenerateAwsAccessTokenResponse struct { func (x *GenerateAwsAccessTokenResponse) Reset() { *x = GenerateAwsAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAwsAccessTokenResponse) String() string { @@ -1354,7 +1318,7 @@ func (*GenerateAwsAccessTokenResponse) ProtoMessage() {} func (x *GenerateAwsAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1376,9 @@ type GenerateAwsClusterAgentTokenRequest struct { func (x *GenerateAwsClusterAgentTokenRequest) Reset() { *x = GenerateAwsClusterAgentTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAwsClusterAgentTokenRequest) String() string { @@ -1427,7 +1389,7 @@ func (*GenerateAwsClusterAgentTokenRequest) ProtoMessage() {} func (x *GenerateAwsClusterAgentTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,11 +1486,9 @@ type GenerateAwsClusterAgentTokenResponse struct { func (x *GenerateAwsClusterAgentTokenResponse) Reset() { *x = GenerateAwsClusterAgentTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAwsClusterAgentTokenResponse) String() string { @@ -1539,7 +1499,7 @@ func (*GenerateAwsClusterAgentTokenResponse) ProtoMessage() {} func (x *GenerateAwsClusterAgentTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2180,248 +2140,6 @@ func file_google_cloud_gkemulticloud_v1_aws_service_proto_init() { } file_google_cloud_gkemulticloud_v1_aws_resources_proto_init() file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAwsClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAwsClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAwsClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAwsClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAwsClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAwsClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateAwsNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAwsNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RollbackAwsNodePoolUpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetAwsNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListAwsNodePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListAwsNodePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAwsNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetAwsOpenIdConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetAwsJsonWebKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetAwsServerConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAwsAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAwsAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAwsClusterAgentTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_aws_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAwsClusterAgentTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/azure_resources.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/azure_resources.pb.go index ae4346609e00..369d4689d957 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/azure_resources.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/azure_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/azure_resources.proto @@ -283,11 +283,9 @@ type AzureCluster struct { func (x *AzureCluster) Reset() { *x = AzureCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureCluster) String() string { @@ -298,7 +296,7 @@ func (*AzureCluster) ProtoMessage() {} func (x *AzureCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +523,9 @@ type AzureClusterNetworking struct { func (x *AzureClusterNetworking) Reset() { *x = AzureClusterNetworking{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClusterNetworking) String() string { @@ -540,7 +536,7 @@ func (*AzureClusterNetworking) ProtoMessage() {} func (x *AzureClusterNetworking) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +649,9 @@ type AzureControlPlane struct { func (x *AzureControlPlane) Reset() { *x = AzureControlPlane{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureControlPlane) String() string { @@ -668,7 +662,7 @@ func (*AzureControlPlane) ProtoMessage() {} func (x *AzureControlPlane) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +778,9 @@ type ReplicaPlacement struct { func (x *ReplicaPlacement) Reset() { *x = ReplicaPlacement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicaPlacement) String() string { @@ -799,7 +791,7 @@ func (*ReplicaPlacement) ProtoMessage() {} func (x *ReplicaPlacement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +844,9 @@ type AzureProxyConfig struct { func (x *AzureProxyConfig) Reset() { *x = AzureProxyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureProxyConfig) String() string { @@ -867,7 +857,7 @@ func (*AzureProxyConfig) ProtoMessage() {} func (x *AzureProxyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +906,9 @@ type AzureDatabaseEncryption struct { func (x *AzureDatabaseEncryption) Reset() { *x = AzureDatabaseEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureDatabaseEncryption) String() string { @@ -931,7 +919,7 @@ func (*AzureDatabaseEncryption) ProtoMessage() {} func (x *AzureDatabaseEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -979,11 +967,9 @@ type AzureConfigEncryption struct { func (x *AzureConfigEncryption) Reset() { *x = AzureConfigEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureConfigEncryption) String() string { @@ -994,7 +980,7 @@ func (*AzureConfigEncryption) ProtoMessage() {} func (x *AzureConfigEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1024,9 @@ type AzureDiskTemplate struct { func (x *AzureDiskTemplate) Reset() { *x = AzureDiskTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureDiskTemplate) String() string { @@ -1053,7 +1037,7 @@ func (*AzureDiskTemplate) ProtoMessage() {} func (x *AzureDiskTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1128,11 +1112,9 @@ type AzureClient struct { func (x *AzureClient) Reset() { *x = AzureClient{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClient) String() string { @@ -1143,7 +1125,7 @@ func (*AzureClient) ProtoMessage() {} func (x *AzureClient) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1227,9 @@ type AzureAuthorization struct { func (x *AzureAuthorization) Reset() { *x = AzureAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureAuthorization) String() string { @@ -1260,7 +1240,7 @@ func (*AzureAuthorization) ProtoMessage() {} func (x *AzureAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1283,9 @@ type AzureServicesAuthentication struct { func (x *AzureServicesAuthentication) Reset() { *x = AzureServicesAuthentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureServicesAuthentication) String() string { @@ -1318,7 +1296,7 @@ func (*AzureServicesAuthentication) ProtoMessage() {} func (x *AzureServicesAuthentication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1359,11 +1337,9 @@ type AzureClusterUser struct { func (x *AzureClusterUser) Reset() { *x = AzureClusterUser{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClusterUser) String() string { @@ -1374,7 +1350,7 @@ func (*AzureClusterUser) ProtoMessage() {} func (x *AzureClusterUser) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1408,11 +1384,9 @@ type AzureClusterGroup struct { func (x *AzureClusterGroup) Reset() { *x = AzureClusterGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClusterGroup) String() string { @@ -1423,7 +1397,7 @@ func (*AzureClusterGroup) ProtoMessage() {} func (x *AzureClusterGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1511,11 +1485,9 @@ type AzureNodePool struct { func (x *AzureNodePool) Reset() { *x = AzureNodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureNodePool) String() string { @@ -1526,7 +1498,7 @@ func (*AzureNodePool) ProtoMessage() {} func (x *AzureNodePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1641,9 @@ type AzureNodeManagement struct { func (x *AzureNodeManagement) Reset() { *x = AzureNodeManagement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureNodeManagement) String() string { @@ -1684,7 +1654,7 @@ func (*AzureNodeManagement) ProtoMessage() {} func (x *AzureNodeManagement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1753,11 +1723,9 @@ type AzureNodeConfig struct { func (x *AzureNodeConfig) Reset() { *x = AzureNodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureNodeConfig) String() string { @@ -1768,7 +1736,7 @@ func (*AzureNodeConfig) ProtoMessage() {} func (x *AzureNodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1865,11 +1833,9 @@ type AzureNodePoolAutoscaling struct { func (x *AzureNodePoolAutoscaling) Reset() { *x = AzureNodePoolAutoscaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureNodePoolAutoscaling) String() string { @@ -1880,7 +1846,7 @@ func (*AzureNodePoolAutoscaling) ProtoMessage() {} func (x *AzureNodePoolAutoscaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1934,11 +1900,9 @@ type AzureOpenIdConfig struct { func (x *AzureOpenIdConfig) Reset() { *x = AzureOpenIdConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureOpenIdConfig) String() string { @@ -1949,7 +1913,7 @@ func (*AzureOpenIdConfig) ProtoMessage() {} func (x *AzureOpenIdConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2026,11 +1990,9 @@ type AzureJsonWebKeys struct { func (x *AzureJsonWebKeys) Reset() { *x = AzureJsonWebKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureJsonWebKeys) String() string { @@ -2041,7 +2003,7 @@ func (*AzureJsonWebKeys) ProtoMessage() {} func (x *AzureJsonWebKeys) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,11 +2051,9 @@ type AzureServerConfig struct { func (x *AzureServerConfig) Reset() { *x = AzureServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureServerConfig) String() string { @@ -2104,7 +2064,7 @@ func (*AzureServerConfig) ProtoMessage() {} func (x *AzureServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2168,11 +2128,9 @@ type AzureK8SVersionInfo struct { func (x *AzureK8SVersionInfo) Reset() { *x = AzureK8SVersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureK8SVersionInfo) String() string { @@ -2183,7 +2141,7 @@ func (*AzureK8SVersionInfo) ProtoMessage() {} func (x *AzureK8SVersionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2205,9 @@ type AzureSshConfig struct { func (x *AzureSshConfig) Reset() { *x = AzureSshConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureSshConfig) String() string { @@ -2262,7 +2218,7 @@ func (*AzureSshConfig) ProtoMessage() {} func (x *AzureSshConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2300,11 +2256,9 @@ type AzureClusterResources struct { func (x *AzureClusterResources) Reset() { *x = AzureClusterResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClusterResources) String() string { @@ -2315,7 +2269,7 @@ func (*AzureClusterResources) ProtoMessage() {} func (x *AzureClusterResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2356,11 +2310,9 @@ type AzureClusterError struct { func (x *AzureClusterError) Reset() { *x = AzureClusterError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureClusterError) String() string { @@ -2371,7 +2323,7 @@ func (*AzureClusterError) ProtoMessage() {} func (x *AzureClusterError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2405,11 +2357,9 @@ type AzureNodePoolError struct { func (x *AzureNodePoolError) Reset() { *x = AzureNodePoolError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureNodePoolError) String() string { @@ -2420,7 +2370,7 @@ func (*AzureNodePoolError) ProtoMessage() {} func (x *AzureNodePoolError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3116,308 +3066,6 @@ func file_google_cloud_gkemulticloud_v1_azure_resources_proto_init() { return } file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AzureCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AzureClusterNetworking); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AzureControlPlane); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReplicaPlacement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AzureProxyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AzureDatabaseEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AzureConfigEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AzureDiskTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AzureClient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AzureAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AzureServicesAuthentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AzureClusterUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AzureClusterGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AzureNodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AzureNodeManagement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AzureNodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AzureNodePoolAutoscaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AzureOpenIdConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AzureJsonWebKeys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AzureServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AzureK8SVersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AzureSshConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AzureClusterResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AzureClusterError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AzureNodePoolError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/azure_service.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/azure_service.pb.go index f5cfa3cd82c1..c6a02e240ec4 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/azure_service.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/azure_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/azure_service.proto @@ -78,11 +78,9 @@ type CreateAzureClusterRequest struct { func (x *CreateAzureClusterRequest) Reset() { *x = CreateAzureClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAzureClusterRequest) String() string { @@ -93,7 +91,7 @@ func (*CreateAzureClusterRequest) ProtoMessage() {} func (x *CreateAzureClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type UpdateAzureClusterRequest struct { func (x *UpdateAzureClusterRequest) Reset() { *x = UpdateAzureClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAzureClusterRequest) String() string { @@ -188,7 +184,7 @@ func (*UpdateAzureClusterRequest) ProtoMessage() {} func (x *UpdateAzureClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type GetAzureClusterRequest struct { func (x *GetAzureClusterRequest) Reset() { *x = GetAzureClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureClusterRequest) String() string { @@ -259,7 +253,7 @@ func (*GetAzureClusterRequest) ProtoMessage() {} func (x *GetAzureClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +305,9 @@ type ListAzureClustersRequest struct { func (x *ListAzureClustersRequest) Reset() { *x = ListAzureClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureClustersRequest) String() string { @@ -326,7 +318,7 @@ func (*ListAzureClustersRequest) ProtoMessage() {} func (x *ListAzureClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +370,9 @@ type ListAzureClustersResponse struct { func (x *ListAzureClustersResponse) Reset() { *x = ListAzureClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureClustersResponse) String() string { @@ -393,7 +383,7 @@ func (*ListAzureClustersResponse) ProtoMessage() {} func (x *ListAzureClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +453,9 @@ type DeleteAzureClusterRequest struct { func (x *DeleteAzureClusterRequest) Reset() { *x = DeleteAzureClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAzureClusterRequest) String() string { @@ -478,7 +466,7 @@ func (*DeleteAzureClusterRequest) ProtoMessage() {} func (x *DeleteAzureClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +551,9 @@ type CreateAzureNodePoolRequest struct { func (x *CreateAzureNodePoolRequest) Reset() { *x = CreateAzureNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAzureNodePoolRequest) String() string { @@ -578,7 +564,7 @@ func (*CreateAzureNodePoolRequest) ProtoMessage() {} func (x *CreateAzureNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +634,9 @@ type UpdateAzureNodePoolRequest struct { func (x *UpdateAzureNodePoolRequest) Reset() { *x = UpdateAzureNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAzureNodePoolRequest) String() string { @@ -663,7 +647,7 @@ func (*UpdateAzureNodePoolRequest) ProtoMessage() {} func (x *UpdateAzureNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +703,9 @@ type GetAzureNodePoolRequest struct { func (x *GetAzureNodePoolRequest) Reset() { *x = GetAzureNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureNodePoolRequest) String() string { @@ -734,7 +716,7 @@ func (*GetAzureNodePoolRequest) ProtoMessage() {} func (x *GetAzureNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +769,9 @@ type ListAzureNodePoolsRequest struct { func (x *ListAzureNodePoolsRequest) Reset() { *x = ListAzureNodePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureNodePoolsRequest) String() string { @@ -802,7 +782,7 @@ func (*ListAzureNodePoolsRequest) ProtoMessage() {} func (x *ListAzureNodePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +834,9 @@ type ListAzureNodePoolsResponse struct { func (x *ListAzureNodePoolsResponse) Reset() { *x = ListAzureNodePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureNodePoolsResponse) String() string { @@ -869,7 +847,7 @@ func (*ListAzureNodePoolsResponse) ProtoMessage() {} func (x *ListAzureNodePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +919,9 @@ type DeleteAzureNodePoolRequest struct { func (x *DeleteAzureNodePoolRequest) Reset() { *x = DeleteAzureNodePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAzureNodePoolRequest) String() string { @@ -956,7 +932,7 @@ func (*DeleteAzureNodePoolRequest) ProtoMessage() {} func (x *DeleteAzureNodePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +997,9 @@ type GetAzureOpenIdConfigRequest struct { func (x *GetAzureOpenIdConfigRequest) Reset() { *x = GetAzureOpenIdConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureOpenIdConfigRequest) String() string { @@ -1036,7 +1010,7 @@ func (*GetAzureOpenIdConfigRequest) ProtoMessage() {} func (x *GetAzureOpenIdConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1049,9 @@ type GetAzureJsonWebKeysRequest struct { func (x *GetAzureJsonWebKeysRequest) Reset() { *x = GetAzureJsonWebKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureJsonWebKeysRequest) String() string { @@ -1090,7 +1062,7 @@ func (*GetAzureJsonWebKeysRequest) ProtoMessage() {} func (x *GetAzureJsonWebKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1104,9 @@ type GetAzureServerConfigRequest struct { func (x *GetAzureServerConfigRequest) Reset() { *x = GetAzureServerConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureServerConfigRequest) String() string { @@ -1147,7 +1117,7 @@ func (*GetAzureServerConfigRequest) ProtoMessage() {} func (x *GetAzureServerConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,11 +1173,9 @@ type CreateAzureClientRequest struct { func (x *CreateAzureClientRequest) Reset() { *x = CreateAzureClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAzureClientRequest) String() string { @@ -1218,7 +1186,7 @@ func (*CreateAzureClientRequest) ProtoMessage() {} func (x *CreateAzureClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1282,11 +1250,9 @@ type GetAzureClientRequest struct { func (x *GetAzureClientRequest) Reset() { *x = GetAzureClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAzureClientRequest) String() string { @@ -1297,7 +1263,7 @@ func (*GetAzureClientRequest) ProtoMessage() {} func (x *GetAzureClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1315,9 @@ type ListAzureClientsRequest struct { func (x *ListAzureClientsRequest) Reset() { *x = ListAzureClientsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureClientsRequest) String() string { @@ -1364,7 +1328,7 @@ func (*ListAzureClientsRequest) ProtoMessage() {} func (x *ListAzureClientsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1416,11 +1380,9 @@ type ListAzureClientsResponse struct { func (x *ListAzureClientsResponse) Reset() { *x = ListAzureClientsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAzureClientsResponse) String() string { @@ -1431,7 +1393,7 @@ func (*ListAzureClientsResponse) ProtoMessage() {} func (x *ListAzureClientsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,11 +1451,9 @@ type DeleteAzureClientRequest struct { func (x *DeleteAzureClientRequest) Reset() { *x = DeleteAzureClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAzureClientRequest) String() string { @@ -1504,7 +1464,7 @@ func (*DeleteAzureClientRequest) ProtoMessage() {} func (x *DeleteAzureClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1560,11 +1520,9 @@ type GenerateAzureAccessTokenRequest struct { func (x *GenerateAzureAccessTokenRequest) Reset() { *x = GenerateAzureAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAzureAccessTokenRequest) String() string { @@ -1575,7 +1533,7 @@ func (*GenerateAzureAccessTokenRequest) ProtoMessage() {} func (x *GenerateAzureAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1611,11 +1569,9 @@ type GenerateAzureAccessTokenResponse struct { func (x *GenerateAzureAccessTokenResponse) Reset() { *x = GenerateAzureAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAzureAccessTokenResponse) String() string { @@ -1626,7 +1582,7 @@ func (*GenerateAzureAccessTokenResponse) ProtoMessage() {} func (x *GenerateAzureAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1684,11 +1640,9 @@ type GenerateAzureClusterAgentTokenRequest struct { func (x *GenerateAzureClusterAgentTokenRequest) Reset() { *x = GenerateAzureClusterAgentTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAzureClusterAgentTokenRequest) String() string { @@ -1699,7 +1653,7 @@ func (*GenerateAzureClusterAgentTokenRequest) ProtoMessage() {} func (x *GenerateAzureClusterAgentTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1750,9 @@ type GenerateAzureClusterAgentTokenResponse struct { func (x *GenerateAzureClusterAgentTokenResponse) Reset() { *x = GenerateAzureClusterAgentTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAzureClusterAgentTokenResponse) String() string { @@ -1811,7 +1763,7 @@ func (*GenerateAzureClusterAgentTokenResponse) ProtoMessage() {} func (x *GenerateAzureClusterAgentTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2567,296 +2519,6 @@ func file_google_cloud_gkemulticloud_v1_azure_service_proto_init() { } file_google_cloud_gkemulticloud_v1_azure_resources_proto_init() file_google_cloud_gkemulticloud_v1_common_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAzureClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAzureClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAzureClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateAzureNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAzureNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureNodePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureNodePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAzureNodePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureOpenIdConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureJsonWebKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureServerConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateAzureClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetAzureClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureClientsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListAzureClientsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAzureClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAzureAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAzureAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAzureClusterAgentTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_azure_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAzureClusterAgentTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gkemulticloud/apiv1/gkemulticloudpb/common_resources.pb.go b/gkemulticloud/apiv1/gkemulticloudpb/common_resources.pb.go index 4e08242de28b..abff62c5cadd 100755 --- a/gkemulticloud/apiv1/gkemulticloudpb/common_resources.pb.go +++ b/gkemulticloud/apiv1/gkemulticloudpb/common_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gkemulticloud/v1/common_resources.proto @@ -289,11 +289,9 @@ type Jwk struct { func (x *Jwk) Reset() { *x = Jwk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Jwk) String() string { @@ -304,7 +302,7 @@ func (*Jwk) ProtoMessage() {} func (x *Jwk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +397,9 @@ type WorkloadIdentityConfig struct { func (x *WorkloadIdentityConfig) Reset() { *x = WorkloadIdentityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadIdentityConfig) String() string { @@ -414,7 +410,7 @@ func (*WorkloadIdentityConfig) ProtoMessage() {} func (x *WorkloadIdentityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +458,9 @@ type MaxPodsConstraint struct { func (x *MaxPodsConstraint) Reset() { *x = MaxPodsConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaxPodsConstraint) String() string { @@ -477,7 +471,7 @@ func (*MaxPodsConstraint) ProtoMessage() {} func (x *MaxPodsConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +523,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -544,7 +536,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +616,9 @@ type NodeTaint struct { func (x *NodeTaint) Reset() { *x = NodeTaint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTaint) String() string { @@ -639,7 +629,7 @@ func (*NodeTaint) ProtoMessage() {} func (x *NodeTaint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +715,9 @@ type NodeKubeletConfig struct { func (x *NodeKubeletConfig) Reset() { *x = NodeKubeletConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeKubeletConfig) String() string { @@ -740,7 +728,7 @@ func (*NodeKubeletConfig) ProtoMessage() {} func (x *NodeKubeletConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +808,9 @@ type Fleet struct { func (x *Fleet) Reset() { *x = Fleet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Fleet) String() string { @@ -835,7 +821,7 @@ func (*Fleet) ProtoMessage() {} func (x *Fleet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +862,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -891,7 +875,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,11 +909,9 @@ type LoggingComponentConfig struct { func (x *LoggingComponentConfig) Reset() { *x = LoggingComponentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingComponentConfig) String() string { @@ -940,7 +922,7 @@ func (*LoggingComponentConfig) ProtoMessage() {} func (x *LoggingComponentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +956,9 @@ type MonitoringConfig struct { func (x *MonitoringConfig) Reset() { *x = MonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonitoringConfig) String() string { @@ -989,7 +969,7 @@ func (*MonitoringConfig) ProtoMessage() {} func (x *MonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +1004,9 @@ type ManagedPrometheusConfig struct { func (x *ManagedPrometheusConfig) Reset() { *x = ManagedPrometheusConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedPrometheusConfig) String() string { @@ -1039,7 +1017,7 @@ func (*ManagedPrometheusConfig) ProtoMessage() {} func (x *ManagedPrometheusConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1052,9 @@ type BinaryAuthorization struct { func (x *BinaryAuthorization) Reset() { *x = BinaryAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BinaryAuthorization) String() string { @@ -1089,7 +1065,7 @@ func (*BinaryAuthorization) ProtoMessage() {} func (x *BinaryAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1100,9 @@ type SecurityPostureConfig struct { func (x *SecurityPostureConfig) Reset() { *x = SecurityPostureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPostureConfig) String() string { @@ -1139,7 +1113,7 @@ func (*SecurityPostureConfig) ProtoMessage() {} func (x *SecurityPostureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,164 +1372,6 @@ func file_google_cloud_gkemulticloud_v1_common_resources_proto_init() { if File_google_cloud_gkemulticloud_v1_common_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Jwk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadIdentityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MaxPodsConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*NodeTaint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NodeKubeletConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Fleet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LoggingComponentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ManagedPrometheusConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BinaryAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPostureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_gkemulticloud_v1_common_resources_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/gkemulticloud/apiv1/helpers.go b/gkemulticloud/apiv1/helpers.go index 28348270a377..e85d99999509 100755 --- a/gkemulticloud/apiv1/helpers.go +++ b/gkemulticloud/apiv1/helpers.go @@ -18,10 +18,16 @@ package gkemulticloud import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "gkemulticloud.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/gsuiteaddons/apiv1/g_suite_add_ons_client.go b/gsuiteaddons/apiv1/g_suite_add_ons_client.go index 7ef9c892fec4..bbcc7254ea9e 100755 --- a/gsuiteaddons/apiv1/g_suite_add_ons_client.go +++ b/gsuiteaddons/apiv1/g_suite_add_ons_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( gsuiteaddonspb "cloud.google.com/go/gsuiteaddons/apiv1/gsuiteaddonspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -390,6 +389,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new g suite add ons client based on gRPC. @@ -443,6 +444,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: gsuiteaddonspb.NewGSuiteAddOnsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -489,6 +491,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new g suite add ons rest client. @@ -533,6 +537,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -585,7 +590,7 @@ func (c *gRPCClient) GetAuthorization(ctx context.Context, req *gsuiteaddonspb.G var resp *gsuiteaddonspb.Authorization err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAuthorization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAuthorization, req, settings.GRPC, c.logger, "GetAuthorization") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *gRPCClient) CreateDeployment(ctx context.Context, req *gsuiteaddonspb.C var resp *gsuiteaddonspb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDeployment, req, settings.GRPC, c.logger, "CreateDeployment") return err }, opts...) if err != nil { @@ -621,7 +626,7 @@ func (c *gRPCClient) ReplaceDeployment(ctx context.Context, req *gsuiteaddonspb. var resp *gsuiteaddonspb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReplaceDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReplaceDeployment, req, settings.GRPC, c.logger, "ReplaceDeployment") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *gRPCClient) GetDeployment(ctx context.Context, req *gsuiteaddonspb.GetD var resp *gsuiteaddonspb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDeployment, req, settings.GRPC, c.logger, "GetDeployment") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *gRPCClient) ListDeployments(ctx context.Context, req *gsuiteaddonspb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeployments, req, settings.GRPC, c.logger, "ListDeployments") return err }, opts...) if err != nil { @@ -702,7 +707,7 @@ func (c *gRPCClient) DeleteDeployment(ctx context.Context, req *gsuiteaddonspb.D opts = append((*c.CallOptions).DeleteDeployment[0:len((*c.CallOptions).DeleteDeployment):len((*c.CallOptions).DeleteDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDeployment, req, settings.GRPC, c.logger, "DeleteDeployment") return err }, opts...) return err @@ -716,7 +721,7 @@ func (c *gRPCClient) InstallDeployment(ctx context.Context, req *gsuiteaddonspb. opts = append((*c.CallOptions).InstallDeployment[0:len((*c.CallOptions).InstallDeployment):len((*c.CallOptions).InstallDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.InstallDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.InstallDeployment, req, settings.GRPC, c.logger, "InstallDeployment") return err }, opts...) return err @@ -730,7 +735,7 @@ func (c *gRPCClient) UninstallDeployment(ctx context.Context, req *gsuiteaddonsp opts = append((*c.CallOptions).UninstallDeployment[0:len((*c.CallOptions).UninstallDeployment):len((*c.CallOptions).UninstallDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.UninstallDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.UninstallDeployment, req, settings.GRPC, c.logger, "UninstallDeployment") return err }, opts...) return err @@ -745,7 +750,7 @@ func (c *gRPCClient) GetInstallStatus(ctx context.Context, req *gsuiteaddonspb.G var resp *gsuiteaddonspb.InstallStatus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstallStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstallStatus, req, settings.GRPC, c.logger, "GetInstallStatus") return err }, opts...) if err != nil { @@ -787,17 +792,7 @@ func (c *restClient) GetAuthorization(ctx context.Context, req *gsuiteaddonspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAuthorization") if err != nil { return err } @@ -855,17 +850,7 @@ func (c *restClient) CreateDeployment(ctx context.Context, req *gsuiteaddonspb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeployment") if err != nil { return err } @@ -922,17 +907,7 @@ func (c *restClient) ReplaceDeployment(ctx context.Context, req *gsuiteaddonspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceDeployment") if err != nil { return err } @@ -982,17 +957,7 @@ func (c *restClient) GetDeployment(ctx context.Context, req *gsuiteaddonspb.GetD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -1054,21 +1019,10 @@ func (c *restClient) ListDeployments(ctx context.Context, req *gsuiteaddonspb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1131,15 +1085,8 @@ func (c *restClient) DeleteDeployment(ctx context.Context, req *gsuiteaddonspb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeployment") + return err }, opts...) } @@ -1181,15 +1128,8 @@ func (c *restClient) InstallDeployment(ctx context.Context, req *gsuiteaddonspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InstallDeployment") + return err }, opts...) } @@ -1231,15 +1171,8 @@ func (c *restClient) UninstallDeployment(ctx context.Context, req *gsuiteaddonsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UninstallDeployment") + return err }, opts...) } @@ -1276,17 +1209,7 @@ func (c *restClient) GetInstallStatus(ctx context.Context, req *gsuiteaddonspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstallStatus") if err != nil { return err } diff --git a/gsuiteaddons/apiv1/g_suite_add_ons_client_example_go123_test.go b/gsuiteaddons/apiv1/g_suite_add_ons_client_example_go123_test.go index 7759761c8a19..288186d593f2 100644 --- a/gsuiteaddons/apiv1/g_suite_add_ons_client_example_go123_test.go +++ b/gsuiteaddons/apiv1/g_suite_add_ons_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/gsuiteaddons/apiv1/gsuiteaddonspb/gsuiteaddons.pb.go b/gsuiteaddons/apiv1/gsuiteaddonspb/gsuiteaddons.pb.go index fab55899b8d6..daedc8deafde 100755 --- a/gsuiteaddons/apiv1/gsuiteaddonspb/gsuiteaddons.pb.go +++ b/gsuiteaddons/apiv1/gsuiteaddonspb/gsuiteaddons.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/gsuiteaddons/v1/gsuiteaddons.proto @@ -64,11 +64,9 @@ type GetAuthorizationRequest struct { func (x *GetAuthorizationRequest) Reset() { *x = GetAuthorizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuthorizationRequest) String() string { @@ -79,7 +77,7 @@ func (*GetAuthorizationRequest) ProtoMessage() {} func (x *GetAuthorizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type Authorization struct { func (x *Authorization) Reset() { *x = Authorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Authorization) String() string { @@ -135,7 +131,7 @@ func (*Authorization) ProtoMessage() {} func (x *Authorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type CreateDeploymentRequest struct { func (x *CreateDeploymentRequest) Reset() { *x = CreateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentRequest) String() string { @@ -205,7 +199,7 @@ func (*CreateDeploymentRequest) ProtoMessage() {} func (x *CreateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +247,9 @@ type ReplaceDeploymentRequest struct { func (x *ReplaceDeploymentRequest) Reset() { *x = ReplaceDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceDeploymentRequest) String() string { @@ -268,7 +260,7 @@ func (*ReplaceDeploymentRequest) ProtoMessage() {} func (x *ReplaceDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +296,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -319,7 +309,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +356,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -381,7 +369,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +420,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -447,7 +433,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +479,9 @@ type DeleteDeploymentRequest struct { func (x *DeleteDeploymentRequest) Reset() { *x = DeleteDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeploymentRequest) String() string { @@ -508,7 +492,7 @@ func (*DeleteDeploymentRequest) ProtoMessage() {} func (x *DeleteDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +535,9 @@ type InstallDeploymentRequest struct { func (x *InstallDeploymentRequest) Reset() { *x = InstallDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallDeploymentRequest) String() string { @@ -566,7 +548,7 @@ func (*InstallDeploymentRequest) ProtoMessage() {} func (x *InstallDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +584,9 @@ type UninstallDeploymentRequest struct { func (x *UninstallDeploymentRequest) Reset() { *x = UninstallDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UninstallDeploymentRequest) String() string { @@ -617,7 +597,7 @@ func (*UninstallDeploymentRequest) ProtoMessage() {} func (x *UninstallDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +633,9 @@ type GetInstallStatusRequest struct { func (x *GetInstallStatusRequest) Reset() { *x = GetInstallStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstallStatusRequest) String() string { @@ -668,7 +646,7 @@ func (*GetInstallStatusRequest) ProtoMessage() {} func (x *GetInstallStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +684,9 @@ type InstallStatus struct { func (x *InstallStatus) Reset() { *x = InstallStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstallStatus) String() string { @@ -721,7 +697,7 @@ func (*InstallStatus) ProtoMessage() {} func (x *InstallStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +748,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -787,7 +761,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +830,9 @@ type AddOns struct { func (x *AddOns) Reset() { *x = AddOns{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddOns) String() string { @@ -871,7 +843,7 @@ func (*AddOns) ProtoMessage() {} func (x *AddOns) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,176 +1321,6 @@ func file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_init() { if File_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetAuthorizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Authorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*InstallDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UninstallDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetInstallStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InstallStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_gsuiteaddons_v1_gsuiteaddons_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddOns); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gsuiteaddons/apiv1/helpers.go b/gsuiteaddons/apiv1/helpers.go index c757e1473ba0..671d538519f6 100755 --- a/gsuiteaddons/apiv1/helpers.go +++ b/gsuiteaddons/apiv1/helpers.go @@ -18,10 +18,20 @@ package gsuiteaddons import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "gsuiteaddons.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iam/apiv1/helpers.go b/iam/apiv1/helpers.go index 185d079f7d84..ae4996c87f6a 100755 --- a/iam/apiv1/helpers.go +++ b/iam/apiv1/helpers.go @@ -18,10 +18,20 @@ package iam import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "iam-meta-api.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iam/apiv1/iam_policy_client.go b/iam/apiv1/iam_policy_client.go index a1696a5008ed..ab730e0416ce 100755 --- a/iam/apiv1/iam_policy_client.go +++ b/iam/apiv1/iam_policy_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" iampb "cloud.google.com/go/iam/apiv1/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -182,6 +181,8 @@ type iamPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIamPolicyClient creates a new iam policy client based on gRPC. @@ -228,6 +229,7 @@ func NewIamPolicyClient(ctx context.Context, opts ...option.ClientOption) (*IamP connPool: connPool, iamPolicyClient: iampb.NewIAMPolicyClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,6 +276,8 @@ type iamPolicyRESTClient struct { // Points back to the CallOptions field of the containing IamPolicyClient CallOptions **IamPolicyCallOptions + + logger *slog.Logger } // NewIamPolicyRESTClient creates a new iam policy rest client. @@ -311,6 +315,7 @@ func NewIamPolicyRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -363,7 +368,7 @@ func (c *iamPolicyGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -381,7 +386,7 @@ func (c *iamPolicyGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -399,7 +404,7 @@ func (c *iamPolicyGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -450,17 +455,7 @@ func (c *iamPolicyRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -518,17 +513,7 @@ func (c *iamPolicyRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -590,17 +575,7 @@ func (c *iamPolicyRESTClient) TestIamPermissions(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/iam/apiv1/iampb/iam_policy.pb.go b/iam/apiv1/iampb/iam_policy.pb.go index 56de55be8424..f975d76191bc 100755 --- a/iam/apiv1/iampb/iam_policy.pb.go +++ b/iam/apiv1/iampb/iam_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/iam_policy.proto @@ -65,11 +65,9 @@ type SetIamPolicyRequest struct { func (x *SetIamPolicyRequest) Reset() { *x = SetIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRequest) String() string { @@ -80,7 +78,7 @@ func (*SetIamPolicyRequest) ProtoMessage() {} func (x *SetIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetIamPolicyRequest struct { func (x *GetIamPolicyRequest) Reset() { *x = GetIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRequest) String() string { @@ -147,7 +143,7 @@ func (*GetIamPolicyRequest) ProtoMessage() {} func (x *GetIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +190,9 @@ type TestIamPermissionsRequest struct { func (x *TestIamPermissionsRequest) Reset() { *x = TestIamPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRequest) String() string { @@ -209,7 +203,7 @@ func (*TestIamPermissionsRequest) ProtoMessage() {} func (x *TestIamPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type TestIamPermissionsResponse struct { func (x *TestIamPermissionsResponse) Reset() { *x = TestIamPermissionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsResponse) String() string { @@ -266,7 +258,7 @@ func (*TestIamPermissionsResponse) ProtoMessage() {} func (x *TestIamPermissionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,56 +412,6 @@ func file_google_iam_v1_iam_policy_proto_init() { } file_google_iam_v1_options_proto_init() file_google_iam_v1_policy_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_iam_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/apiv1/iampb/options.pb.go b/iam/apiv1/iampb/options.pb.go index f1c1c084e34d..0c82db752bd3 100755 --- a/iam/apiv1/iampb/options.pb.go +++ b/iam/apiv1/iampb/options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/options.proto @@ -64,11 +64,9 @@ type GetPolicyOptions struct { func (x *GetPolicyOptions) Reset() { *x = GetPolicyOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyOptions) String() string { @@ -79,7 +77,7 @@ func (*GetPolicyOptions) ProtoMessage() {} func (x *GetPolicyOptions) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,20 +150,6 @@ func file_google_iam_v1_options_proto_init() { if File_google_iam_v1_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/apiv1/iampb/policy.pb.go b/iam/apiv1/iampb/policy.pb.go index 4dda5d6d056b..a2e42f878699 100755 --- a/iam/apiv1/iampb/policy.pb.go +++ b/iam/apiv1/iampb/policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/policy.proto @@ -337,11 +337,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -352,7 +350,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +460,9 @@ type Binding struct { func (x *Binding) Reset() { *x = Binding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Binding) String() string { @@ -477,7 +473,7 @@ func (*Binding) ProtoMessage() {} func (x *Binding) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +575,9 @@ type AuditConfig struct { func (x *AuditConfig) Reset() { *x = AuditConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditConfig) String() string { @@ -594,7 +588,7 @@ func (*AuditConfig) ProtoMessage() {} func (x *AuditConfig) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +652,9 @@ type AuditLogConfig struct { func (x *AuditLogConfig) Reset() { *x = AuditLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditLogConfig) String() string { @@ -673,7 +665,7 @@ func (*AuditLogConfig) ProtoMessage() {} func (x *AuditLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +708,9 @@ type PolicyDelta struct { func (x *PolicyDelta) Reset() { *x = PolicyDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyDelta) String() string { @@ -731,7 +721,7 @@ func (*PolicyDelta) ProtoMessage() {} func (x *PolicyDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +774,9 @@ type BindingDelta struct { func (x *BindingDelta) Reset() { *x = BindingDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingDelta) String() string { @@ -799,7 +787,7 @@ func (*BindingDelta) ProtoMessage() {} func (x *BindingDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +857,9 @@ type AuditConfigDelta struct { func (x *AuditConfigDelta) Reset() { *x = AuditConfigDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditConfigDelta) String() string { @@ -884,7 +870,7 @@ func (*AuditConfigDelta) ProtoMessage() {} func (x *AuditConfigDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,92 +1058,6 @@ func file_google_iam_v1_policy_proto_init() { if File_google_iam_v1_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Binding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AuditConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AuditLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PolicyDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BindingDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AuditConfigDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/apiv1/iampb/resource_policy_member.pb.go b/iam/apiv1/iampb/resource_policy_member.pb.go index c464a684f525..361d79752ad9 100755 --- a/iam/apiv1/iampb/resource_policy_member.pb.go +++ b/iam/apiv1/iampb/resource_policy_member.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/resource_policy_member.proto @@ -63,11 +63,9 @@ type ResourcePolicyMember struct { func (x *ResourcePolicyMember) Reset() { *x = ResourcePolicyMember{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_resource_policy_member_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_resource_policy_member_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePolicyMember) String() string { @@ -78,7 +76,7 @@ func (*ResourcePolicyMember) ProtoMessage() {} func (x *ResourcePolicyMember) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_resource_policy_member_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,20 +164,6 @@ func file_google_iam_v1_resource_policy_member_proto_init() { if File_google_iam_v1_resource_policy_member_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_resource_policy_member_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePolicyMember); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/apiv2/helpers.go b/iam/apiv2/helpers.go index adf7f26bba8b..8e5b695d26b3 100755 --- a/iam/apiv2/helpers.go +++ b/iam/apiv2/helpers.go @@ -18,10 +18,20 @@ package iam import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "iam.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iam/apiv2/iampb/deny.pb.go b/iam/apiv2/iampb/deny.pb.go index 274144289ae0..80aa4d3d4d9a 100755 --- a/iam/apiv2/iampb/deny.pb.go +++ b/iam/apiv2/iampb/deny.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v2/deny.proto @@ -121,11 +121,9 @@ type DenyRule struct { func (x *DenyRule) Reset() { *x = DenyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_deny_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_deny_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyRule) String() string { @@ -136,7 +134,7 @@ func (*DenyRule) ProtoMessage() {} func (x *DenyRule) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_deny_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,20 +250,6 @@ func file_google_iam_v2_deny_proto_init() { if File_google_iam_v2_deny_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v2_deny_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DenyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/apiv2/iampb/policy.pb.go b/iam/apiv2/iampb/policy.pb.go index be9ae1dd2d8b..4ccb724c3871 100755 --- a/iam/apiv2/iampb/policy.pb.go +++ b/iam/apiv2/iampb/policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v2/policy.proto @@ -94,11 +94,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -109,7 +107,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type PolicyRule struct { func (x *PolicyRule) Reset() { *x = PolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyRule) String() string { @@ -233,7 +229,7 @@ func (*PolicyRule) ProtoMessage() {} func (x *PolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +304,9 @@ type ListPoliciesRequest struct { func (x *ListPoliciesRequest) Reset() { *x = ListPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPoliciesRequest) String() string { @@ -323,7 +317,7 @@ func (*ListPoliciesRequest) ProtoMessage() {} func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +368,9 @@ type ListPoliciesResponse struct { func (x *ListPoliciesResponse) Reset() { *x = ListPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPoliciesResponse) String() string { @@ -389,7 +381,7 @@ func (*ListPoliciesResponse) ProtoMessage() {} func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type GetPolicyRequest struct { func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyRequest) String() string { @@ -453,7 +443,7 @@ func (*GetPolicyRequest) ProtoMessage() {} func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +493,9 @@ type CreatePolicyRequest struct { func (x *CreatePolicyRequest) Reset() { *x = CreatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePolicyRequest) String() string { @@ -518,7 +506,7 @@ func (*CreatePolicyRequest) ProtoMessage() {} func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +558,9 @@ type UpdatePolicyRequest struct { func (x *UpdatePolicyRequest) Reset() { *x = UpdatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyRequest) String() string { @@ -585,7 +571,7 @@ func (*UpdatePolicyRequest) ProtoMessage() {} func (x *UpdatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +620,9 @@ type DeletePolicyRequest struct { func (x *DeletePolicyRequest) Reset() { *x = DeletePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePolicyRequest) String() string { @@ -649,7 +633,7 @@ func (*DeletePolicyRequest) ProtoMessage() {} func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +674,9 @@ type PolicyOperationMetadata struct { func (x *PolicyOperationMetadata) Reset() { *x = PolicyOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v2_policy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v2_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyOperationMetadata) String() string { @@ -705,7 +687,7 @@ func (*PolicyOperationMetadata) ProtoMessage() {} func (x *PolicyOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v2_policy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -953,116 +935,6 @@ func file_google_iam_v2_policy_proto_init() { return } file_google_iam_v2_deny_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_iam_v2_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeletePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v2_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PolicyOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_iam_v2_policy_proto_msgTypes[1].OneofWrappers = []any{ (*PolicyRule_DenyRule)(nil), } diff --git a/iam/apiv2/policies_client.go b/iam/apiv2/policies_client.go index 5ac17cb0cebd..ca6378be7d31 100755 --- a/iam/apiv2/policies_client.go +++ b/iam/apiv2/policies_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -339,6 +338,8 @@ type policiesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPoliciesClient creates a new policies client based on gRPC. @@ -365,6 +366,7 @@ func NewPoliciesClient(ctx context.Context, opts ...option.ClientOption) (*Polic connPool: connPool, policiesClient: iampb.NewPoliciesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -428,6 +430,8 @@ type policiesRESTClient struct { // Points back to the CallOptions field of the containing PoliciesClient CallOptions **PoliciesCallOptions + + logger *slog.Logger } // NewPoliciesRESTClient creates a new policies rest client. @@ -445,6 +449,7 @@ func NewPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -518,7 +523,7 @@ func (c *policiesGRPCClient) ListPolicies(ctx context.Context, req *iampb.ListPo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policiesClient.ListPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policiesClient.ListPolicies, req, settings.GRPC, c.logger, "ListPolicies") return err }, opts...) if err != nil { @@ -553,7 +558,7 @@ func (c *policiesGRPCClient) GetPolicy(ctx context.Context, req *iampb.GetPolicy var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policiesClient.GetPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policiesClient.GetPolicy, req, settings.GRPC, c.logger, "GetPolicy") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *policiesGRPCClient) CreatePolicy(ctx context.Context, req *iampb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policiesClient.CreatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policiesClient.CreatePolicy, req, settings.GRPC, c.logger, "CreatePolicy") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *policiesGRPCClient) UpdatePolicy(ctx context.Context, req *iampb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policiesClient.UpdatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policiesClient.UpdatePolicy, req, settings.GRPC, c.logger, "UpdatePolicy") return err }, opts...) if err != nil { @@ -611,7 +616,7 @@ func (c *policiesGRPCClient) DeletePolicy(ctx context.Context, req *iampb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policiesClient.DeletePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policiesClient.DeletePolicy, req, settings.GRPC, c.logger, "DeletePolicy") return err }, opts...) if err != nil { @@ -631,7 +636,7 @@ func (c *policiesGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -689,21 +694,10 @@ func (c *policiesRESTClient) ListPolicies(ctx context.Context, req *iampb.ListPo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -766,17 +760,7 @@ func (c *policiesRESTClient) GetPolicy(ctx context.Context, req *iampb.GetPolicy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicy") if err != nil { return err } @@ -835,21 +819,10 @@ func (c *policiesRESTClient) CreatePolicy(ctx context.Context, req *iampb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -918,21 +891,10 @@ func (c *policiesRESTClient) UpdatePolicy(ctx context.Context, req *iampb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -985,21 +947,10 @@ func (c *policiesRESTClient) DeletePolicy(ctx context.Context, req *iampb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1050,17 +1001,7 @@ func (c *policiesRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/iam/apiv2/policies_client_example_go123_test.go b/iam/apiv2/policies_client_example_go123_test.go index de9569e12637..e241ac72db5f 100644 --- a/iam/apiv2/policies_client_example_go123_test.go +++ b/iam/apiv2/policies_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePoliciesClient_ListPolicies_all() { } for resp, err := range c.ListPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/iam/credentials/apiv1/credentialspb/common.pb.go b/iam/credentials/apiv1/credentialspb/common.pb.go index fb213ea46a2a..4826077528d2 100755 --- a/iam/credentials/apiv1/credentialspb/common.pb.go +++ b/iam/credentials/apiv1/credentialspb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/credentials/v1/common.proto @@ -73,11 +73,9 @@ type GenerateAccessTokenRequest struct { func (x *GenerateAccessTokenRequest) Reset() { *x = GenerateAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenRequest) String() string { @@ -88,7 +86,7 @@ func (*GenerateAccessTokenRequest) ProtoMessage() {} func (x *GenerateAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +143,9 @@ type GenerateAccessTokenResponse struct { func (x *GenerateAccessTokenResponse) Reset() { *x = GenerateAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenResponse) String() string { @@ -160,7 +156,7 @@ func (*GenerateAccessTokenResponse) ProtoMessage() {} func (x *GenerateAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -216,11 +212,9 @@ type SignBlobRequest struct { func (x *SignBlobRequest) Reset() { *x = SignBlobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignBlobRequest) String() string { @@ -231,7 +225,7 @@ func (*SignBlobRequest) ProtoMessage() {} func (x *SignBlobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +274,9 @@ type SignBlobResponse struct { func (x *SignBlobResponse) Reset() { *x = SignBlobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignBlobResponse) String() string { @@ -295,7 +287,7 @@ func (*SignBlobResponse) ProtoMessage() {} func (x *SignBlobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +343,9 @@ type SignJwtRequest struct { func (x *SignJwtRequest) Reset() { *x = SignJwtRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignJwtRequest) String() string { @@ -366,7 +356,7 @@ func (*SignJwtRequest) ProtoMessage() {} func (x *SignJwtRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type SignJwtResponse struct { func (x *SignJwtResponse) Reset() { *x = SignJwtResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignJwtResponse) String() string { @@ -430,7 +418,7 @@ func (*SignJwtResponse) ProtoMessage() {} func (x *SignJwtResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +478,9 @@ type GenerateIdTokenRequest struct { func (x *GenerateIdTokenRequest) Reset() { *x = GenerateIdTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateIdTokenRequest) String() string { @@ -505,7 +491,7 @@ func (*GenerateIdTokenRequest) ProtoMessage() {} func (x *GenerateIdTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type GenerateIdTokenResponse struct { func (x *GenerateIdTokenResponse) Reset() { *x = GenerateIdTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_credentials_v1_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_credentials_v1_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateIdTokenResponse) String() string { @@ -574,7 +558,7 @@ func (*GenerateIdTokenResponse) ProtoMessage() {} func (x *GenerateIdTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_credentials_v1_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,104 +720,6 @@ func file_google_iam_credentials_v1_common_proto_init() { if File_google_iam_credentials_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_credentials_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SignBlobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SignBlobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SignJwtRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SignJwtResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GenerateIdTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_credentials_v1_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GenerateIdTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iam/credentials/apiv1/credentialspb/iamcredentials.pb.go b/iam/credentials/apiv1/credentialspb/iamcredentials.pb.go index 3f1c267694e6..9ee33d7719f5 100755 --- a/iam/credentials/apiv1/credentialspb/iamcredentials.pb.go +++ b/iam/credentials/apiv1/credentialspb/iamcredentials.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/credentials/v1/iamcredentials.proto diff --git a/iam/credentials/apiv1/helpers.go b/iam/credentials/apiv1/helpers.go index c5d8f62e06fe..1540a334f110 100755 --- a/iam/credentials/apiv1/helpers.go +++ b/iam/credentials/apiv1/helpers.go @@ -18,10 +18,20 @@ package credentials import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "iamcredentials.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iam/credentials/apiv1/iam_credentials_client.go b/iam/credentials/apiv1/iam_credentials_client.go index ef589ddb1cae..9f22feea39db 100755 --- a/iam/credentials/apiv1/iam_credentials_client.go +++ b/iam/credentials/apiv1/iam_credentials_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( credentialspb "cloud.google.com/go/iam/credentials/apiv1/credentialspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -262,6 +261,8 @@ type iamCredentialsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIamCredentialsClient creates a new iam credentials client based on gRPC. @@ -296,6 +297,7 @@ func NewIamCredentialsClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, iamCredentialsClient: credentialspb.NewIAMCredentialsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -342,6 +344,8 @@ type iamCredentialsRESTClient struct { // Points back to the CallOptions field of the containing IamCredentialsClient CallOptions **IamCredentialsCallOptions + + logger *slog.Logger } // NewIamCredentialsRESTClient creates a new iam credentials rest client. @@ -367,6 +371,7 @@ func NewIamCredentialsRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,7 +424,7 @@ func (c *iamCredentialsGRPCClient) GenerateAccessToken(ctx context.Context, req var resp *credentialspb.GenerateAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamCredentialsClient.GenerateAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamCredentialsClient.GenerateAccessToken, req, settings.GRPC, c.logger, "GenerateAccessToken") return err }, opts...) if err != nil { @@ -437,7 +442,7 @@ func (c *iamCredentialsGRPCClient) GenerateIdToken(ctx context.Context, req *cre var resp *credentialspb.GenerateIdTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamCredentialsClient.GenerateIdToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamCredentialsClient.GenerateIdToken, req, settings.GRPC, c.logger, "GenerateIdToken") return err }, opts...) if err != nil { @@ -455,7 +460,7 @@ func (c *iamCredentialsGRPCClient) SignBlob(ctx context.Context, req *credential var resp *credentialspb.SignBlobResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamCredentialsClient.SignBlob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamCredentialsClient.SignBlob, req, settings.GRPC, c.logger, "SignBlob") return err }, opts...) if err != nil { @@ -473,7 +478,7 @@ func (c *iamCredentialsGRPCClient) SignJwt(ctx context.Context, req *credentials var resp *credentialspb.SignJwtResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamCredentialsClient.SignJwt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamCredentialsClient.SignJwt, req, settings.GRPC, c.logger, "SignJwt") return err }, opts...) if err != nil { @@ -521,17 +526,7 @@ func (c *iamCredentialsRESTClient) GenerateAccessToken(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateAccessToken") if err != nil { return err } @@ -587,17 +582,7 @@ func (c *iamCredentialsRESTClient) GenerateIdToken(ctx context.Context, req *cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateIdToken") if err != nil { return err } @@ -653,17 +638,7 @@ func (c *iamCredentialsRESTClient) SignBlob(ctx context.Context, req *credential httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SignBlob") if err != nil { return err } @@ -719,17 +694,7 @@ func (c *iamCredentialsRESTClient) SignJwt(ctx context.Context, req *credentials httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SignJwt") if err != nil { return err } diff --git a/iap/apiv1/helpers.go b/iap/apiv1/helpers.go index 4afa3da7120d..66183d17075d 100755 --- a/iap/apiv1/helpers.go +++ b/iap/apiv1/helpers.go @@ -18,10 +18,20 @@ package iap import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "iap.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iap/apiv1/iappb/service.pb.go b/iap/apiv1/iappb/service.pb.go index 3e3a89f9502d..a970a4d83611 100755 --- a/iap/apiv1/iappb/service.pb.go +++ b/iap/apiv1/iappb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/iap/v1/service.proto @@ -248,11 +248,9 @@ type ListTunnelDestGroupsRequest struct { func (x *ListTunnelDestGroupsRequest) Reset() { *x = ListTunnelDestGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTunnelDestGroupsRequest) String() string { @@ -263,7 +261,7 @@ func (*ListTunnelDestGroupsRequest) ProtoMessage() {} func (x *ListTunnelDestGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +312,9 @@ type ListTunnelDestGroupsResponse struct { func (x *ListTunnelDestGroupsResponse) Reset() { *x = ListTunnelDestGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTunnelDestGroupsResponse) String() string { @@ -329,7 +325,7 @@ func (*ListTunnelDestGroupsResponse) ProtoMessage() {} func (x *ListTunnelDestGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +376,9 @@ type CreateTunnelDestGroupRequest struct { func (x *CreateTunnelDestGroupRequest) Reset() { *x = CreateTunnelDestGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTunnelDestGroupRequest) String() string { @@ -395,7 +389,7 @@ func (*CreateTunnelDestGroupRequest) ProtoMessage() {} func (x *CreateTunnelDestGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +439,9 @@ type GetTunnelDestGroupRequest struct { func (x *GetTunnelDestGroupRequest) Reset() { *x = GetTunnelDestGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTunnelDestGroupRequest) String() string { @@ -460,7 +452,7 @@ func (*GetTunnelDestGroupRequest) ProtoMessage() {} func (x *GetTunnelDestGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +488,9 @@ type DeleteTunnelDestGroupRequest struct { func (x *DeleteTunnelDestGroupRequest) Reset() { *x = DeleteTunnelDestGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTunnelDestGroupRequest) String() string { @@ -511,7 +501,7 @@ func (*DeleteTunnelDestGroupRequest) ProtoMessage() {} func (x *DeleteTunnelDestGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +539,9 @@ type UpdateTunnelDestGroupRequest struct { func (x *UpdateTunnelDestGroupRequest) Reset() { *x = UpdateTunnelDestGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTunnelDestGroupRequest) String() string { @@ -564,7 +552,7 @@ func (*UpdateTunnelDestGroupRequest) ProtoMessage() {} func (x *UpdateTunnelDestGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,11 +599,9 @@ type TunnelDestGroup struct { func (x *TunnelDestGroup) Reset() { *x = TunnelDestGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TunnelDestGroup) String() string { @@ -626,7 +612,7 @@ func (*TunnelDestGroup) ProtoMessage() {} func (x *TunnelDestGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +662,9 @@ type GetIapSettingsRequest struct { func (x *GetIapSettingsRequest) Reset() { *x = GetIapSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIapSettingsRequest) String() string { @@ -691,7 +675,7 @@ func (*GetIapSettingsRequest) ProtoMessage() {} func (x *GetIapSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +718,9 @@ type UpdateIapSettingsRequest struct { func (x *UpdateIapSettingsRequest) Reset() { *x = UpdateIapSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIapSettingsRequest) String() string { @@ -749,7 +731,7 @@ func (*UpdateIapSettingsRequest) ProtoMessage() {} func (x *UpdateIapSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +776,9 @@ type IapSettings struct { func (x *IapSettings) Reset() { *x = IapSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IapSettings) String() string { @@ -809,7 +789,7 @@ func (*IapSettings) ProtoMessage() {} func (x *IapSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -865,11 +845,9 @@ type AccessSettings struct { func (x *AccessSettings) Reset() { *x = AccessSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessSettings) String() string { @@ -880,7 +858,7 @@ func (*AccessSettings) ProtoMessage() {} func (x *AccessSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +929,9 @@ type GcipSettings struct { func (x *GcipSettings) Reset() { *x = GcipSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcipSettings) String() string { @@ -966,7 +942,7 @@ func (*GcipSettings) ProtoMessage() {} func (x *GcipSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +985,9 @@ type CorsSettings struct { func (x *CorsSettings) Reset() { *x = CorsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CorsSettings) String() string { @@ -1024,7 +998,7 @@ func (*CorsSettings) ProtoMessage() {} func (x *CorsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1039,9 @@ type OAuthSettings struct { func (x *OAuthSettings) Reset() { *x = OAuthSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthSettings) String() string { @@ -1080,7 +1052,7 @@ func (*OAuthSettings) ProtoMessage() {} func (x *OAuthSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,11 +1099,9 @@ type ReauthSettings struct { func (x *ReauthSettings) Reset() { *x = ReauthSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReauthSettings) String() string { @@ -1142,7 +1112,7 @@ func (*ReauthSettings) ProtoMessage() {} func (x *ReauthSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1163,9 @@ type AllowedDomainsSettings struct { func (x *AllowedDomainsSettings) Reset() { *x = AllowedDomainsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowedDomainsSettings) String() string { @@ -1208,7 +1176,7 @@ func (*AllowedDomainsSettings) ProtoMessage() {} func (x *AllowedDomainsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1256,11 +1224,9 @@ type ApplicationSettings struct { func (x *ApplicationSettings) Reset() { *x = ApplicationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationSettings) String() string { @@ -1271,7 +1237,7 @@ func (*ApplicationSettings) ProtoMessage() {} func (x *ApplicationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1296,9 @@ type CsmSettings struct { func (x *CsmSettings) Reset() { *x = CsmSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CsmSettings) String() string { @@ -1345,7 +1309,7 @@ func (*CsmSettings) ProtoMessage() {} func (x *CsmSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1388,11 +1352,9 @@ type AccessDeniedPageSettings struct { func (x *AccessDeniedPageSettings) Reset() { *x = AccessDeniedPageSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessDeniedPageSettings) String() string { @@ -1403,7 +1365,7 @@ func (*AccessDeniedPageSettings) ProtoMessage() {} func (x *AccessDeniedPageSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1449,9 @@ type AttributePropagationSettings struct { func (x *AttributePropagationSettings) Reset() { *x = AttributePropagationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributePropagationSettings) String() string { @@ -1502,7 +1462,7 @@ func (*AttributePropagationSettings) ProtoMessage() {} func (x *AttributePropagationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1511,9 @@ type ListBrandsRequest struct { func (x *ListBrandsRequest) Reset() { *x = ListBrandsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBrandsRequest) String() string { @@ -1566,7 +1524,7 @@ func (*ListBrandsRequest) ProtoMessage() {} func (x *ListBrandsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1600,11 +1558,9 @@ type ListBrandsResponse struct { func (x *ListBrandsResponse) Reset() { *x = ListBrandsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBrandsResponse) String() string { @@ -1615,7 +1571,7 @@ func (*ListBrandsResponse) ProtoMessage() {} func (x *ListBrandsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,11 +1608,9 @@ type CreateBrandRequest struct { func (x *CreateBrandRequest) Reset() { *x = CreateBrandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBrandRequest) String() string { @@ -1667,7 +1621,7 @@ func (*CreateBrandRequest) ProtoMessage() {} func (x *CreateBrandRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,11 +1663,9 @@ type GetBrandRequest struct { func (x *GetBrandRequest) Reset() { *x = GetBrandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBrandRequest) String() string { @@ -1724,7 +1676,7 @@ func (*GetBrandRequest) ProtoMessage() {} func (x *GetBrandRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1771,11 +1723,9 @@ type ListIdentityAwareProxyClientsRequest struct { func (x *ListIdentityAwareProxyClientsRequest) Reset() { *x = ListIdentityAwareProxyClientsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIdentityAwareProxyClientsRequest) String() string { @@ -1786,7 +1736,7 @@ func (*ListIdentityAwareProxyClientsRequest) ProtoMessage() {} func (x *ListIdentityAwareProxyClientsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1787,9 @@ type ListIdentityAwareProxyClientsResponse struct { func (x *ListIdentityAwareProxyClientsResponse) Reset() { *x = ListIdentityAwareProxyClientsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIdentityAwareProxyClientsResponse) String() string { @@ -1852,7 +1800,7 @@ func (*ListIdentityAwareProxyClientsResponse) ProtoMessage() {} func (x *ListIdentityAwareProxyClientsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1898,11 +1846,9 @@ type CreateIdentityAwareProxyClientRequest struct { func (x *CreateIdentityAwareProxyClientRequest) Reset() { *x = CreateIdentityAwareProxyClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIdentityAwareProxyClientRequest) String() string { @@ -1913,7 +1859,7 @@ func (*CreateIdentityAwareProxyClientRequest) ProtoMessage() {} func (x *CreateIdentityAwareProxyClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1902,9 @@ type GetIdentityAwareProxyClientRequest struct { func (x *GetIdentityAwareProxyClientRequest) Reset() { *x = GetIdentityAwareProxyClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIdentityAwareProxyClientRequest) String() string { @@ -1971,7 +1915,7 @@ func (*GetIdentityAwareProxyClientRequest) ProtoMessage() {} func (x *GetIdentityAwareProxyClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2007,11 +1951,9 @@ type ResetIdentityAwareProxyClientSecretRequest struct { func (x *ResetIdentityAwareProxyClientSecretRequest) Reset() { *x = ResetIdentityAwareProxyClientSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetIdentityAwareProxyClientSecretRequest) String() string { @@ -2022,7 +1964,7 @@ func (*ResetIdentityAwareProxyClientSecretRequest) ProtoMessage() {} func (x *ResetIdentityAwareProxyClientSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,11 +2000,9 @@ type DeleteIdentityAwareProxyClientRequest struct { func (x *DeleteIdentityAwareProxyClientRequest) Reset() { *x = DeleteIdentityAwareProxyClientRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIdentityAwareProxyClientRequest) String() string { @@ -2073,7 +2013,7 @@ func (*DeleteIdentityAwareProxyClientRequest) ProtoMessage() {} func (x *DeleteIdentityAwareProxyClientRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2117,11 +2057,9 @@ type Brand struct { func (x *Brand) Reset() { *x = Brand{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Brand) String() string { @@ -2132,7 +2070,7 @@ func (*Brand) ProtoMessage() {} func (x *Brand) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2191,11 +2129,9 @@ type IdentityAwareProxyClient struct { func (x *IdentityAwareProxyClient) Reset() { *x = IdentityAwareProxyClient{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iap_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iap_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IdentityAwareProxyClient) String() string { @@ -2206,7 +2142,7 @@ func (*IdentityAwareProxyClient) ProtoMessage() {} func (x *IdentityAwareProxyClient) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iap_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,392 +2905,6 @@ func file_google_cloud_iap_v1_service_proto_init() { if File_google_cloud_iap_v1_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_iap_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListTunnelDestGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTunnelDestGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTunnelDestGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTunnelDestGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTunnelDestGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTunnelDestGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TunnelDestGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetIapSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIapSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*IapSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AccessSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GcipSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CorsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OAuthSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReauthSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AllowedDomainsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CsmSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AccessDeniedPageSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AttributePropagationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListBrandsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListBrandsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateBrandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetBrandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListIdentityAwareProxyClientsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListIdentityAwareProxyClientsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateIdentityAwareProxyClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetIdentityAwareProxyClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ResetIdentityAwareProxyClientSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIdentityAwareProxyClientRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Brand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iap_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*IdentityAwareProxyClient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_iap_v1_service_proto_msgTypes[15].OneofWrappers = []any{} file_google_cloud_iap_v1_service_proto_msgTypes[18].OneofWrappers = []any{} file_google_cloud_iap_v1_service_proto_msgTypes[19].OneofWrappers = []any{} diff --git a/iap/apiv1/identity_aware_proxy_admin_client.go b/iap/apiv1/identity_aware_proxy_admin_client.go index aa541b4f44a5..94eb75581c3d 100755 --- a/iap/apiv1/identity_aware_proxy_admin_client.go +++ b/iap/apiv1/identity_aware_proxy_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" iappb "cloud.google.com/go/iap/apiv1/iappb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -270,6 +269,8 @@ type identityAwareProxyAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIdentityAwareProxyAdminClient creates a new identity aware proxy admin service client based on gRPC. @@ -296,6 +297,7 @@ func NewIdentityAwareProxyAdminClient(ctx context.Context, opts ...option.Client connPool: connPool, identityAwareProxyAdminClient: iappb.NewIdentityAwareProxyAdminServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -342,6 +344,8 @@ type identityAwareProxyAdminRESTClient struct { // Points back to the CallOptions field of the containing IdentityAwareProxyAdminClient CallOptions **IdentityAwareProxyAdminCallOptions + + logger *slog.Logger } // NewIdentityAwareProxyAdminRESTClient creates a new identity aware proxy admin service rest client. @@ -359,6 +363,7 @@ func NewIdentityAwareProxyAdminRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -411,7 +416,7 @@ func (c *identityAwareProxyAdminGRPCClient) SetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -429,7 +434,7 @@ func (c *identityAwareProxyAdminGRPCClient) GetIamPolicy(ctx context.Context, re var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *identityAwareProxyAdminGRPCClient) TestIamPermissions(ctx context.Conte var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -465,7 +470,7 @@ func (c *identityAwareProxyAdminGRPCClient) GetIapSettings(ctx context.Context, var resp *iappb.IapSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.GetIapSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.GetIapSettings, req, settings.GRPC, c.logger, "GetIapSettings") return err }, opts...) if err != nil { @@ -483,7 +488,7 @@ func (c *identityAwareProxyAdminGRPCClient) UpdateIapSettings(ctx context.Contex var resp *iappb.IapSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.UpdateIapSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.UpdateIapSettings, req, settings.GRPC, c.logger, "UpdateIapSettings") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *identityAwareProxyAdminGRPCClient) ListTunnelDestGroups(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.ListTunnelDestGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.ListTunnelDestGroups, req, settings.GRPC, c.logger, "ListTunnelDestGroups") return err }, opts...) if err != nil { @@ -547,7 +552,7 @@ func (c *identityAwareProxyAdminGRPCClient) CreateTunnelDestGroup(ctx context.Co var resp *iappb.TunnelDestGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.CreateTunnelDestGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.CreateTunnelDestGroup, req, settings.GRPC, c.logger, "CreateTunnelDestGroup") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *identityAwareProxyAdminGRPCClient) GetTunnelDestGroup(ctx context.Conte var resp *iappb.TunnelDestGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.GetTunnelDestGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.GetTunnelDestGroup, req, settings.GRPC, c.logger, "GetTunnelDestGroup") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *identityAwareProxyAdminGRPCClient) DeleteTunnelDestGroup(ctx context.Co opts = append((*c.CallOptions).DeleteTunnelDestGroup[0:len((*c.CallOptions).DeleteTunnelDestGroup):len((*c.CallOptions).DeleteTunnelDestGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.identityAwareProxyAdminClient.DeleteTunnelDestGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.identityAwareProxyAdminClient.DeleteTunnelDestGroup, req, settings.GRPC, c.logger, "DeleteTunnelDestGroup") return err }, opts...) return err @@ -597,7 +602,7 @@ func (c *identityAwareProxyAdminGRPCClient) UpdateTunnelDestGroup(ctx context.Co var resp *iappb.TunnelDestGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyAdminClient.UpdateTunnelDestGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyAdminClient.UpdateTunnelDestGroup, req, settings.GRPC, c.logger, "UpdateTunnelDestGroup") return err }, opts...) if err != nil { @@ -648,17 +653,7 @@ func (c *identityAwareProxyAdminRESTClient) SetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -717,17 +712,7 @@ func (c *identityAwareProxyAdminRESTClient) GetIamPolicy(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -786,17 +771,7 @@ func (c *identityAwareProxyAdminRESTClient) TestIamPermissions(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -846,17 +821,7 @@ func (c *identityAwareProxyAdminRESTClient) GetIapSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIapSettings") if err != nil { return err } @@ -921,17 +886,7 @@ func (c *identityAwareProxyAdminRESTClient) UpdateIapSettings(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIapSettings") if err != nil { return err } @@ -995,21 +950,10 @@ func (c *identityAwareProxyAdminRESTClient) ListTunnelDestGroups(ctx context.Con } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTunnelDestGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1080,17 +1024,7 @@ func (c *identityAwareProxyAdminRESTClient) CreateTunnelDestGroup(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTunnelDestGroup") if err != nil { return err } @@ -1140,17 +1074,7 @@ func (c *identityAwareProxyAdminRESTClient) GetTunnelDestGroup(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTunnelDestGroup") if err != nil { return err } @@ -1197,15 +1121,8 @@ func (c *identityAwareProxyAdminRESTClient) DeleteTunnelDestGroup(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTunnelDestGroup") + return err }, opts...) } @@ -1256,17 +1173,7 @@ func (c *identityAwareProxyAdminRESTClient) UpdateTunnelDestGroup(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTunnelDestGroup") if err != nil { return err } diff --git a/iap/apiv1/identity_aware_proxy_admin_client_example_go123_test.go b/iap/apiv1/identity_aware_proxy_admin_client_example_go123_test.go index 0064f4cb15a5..732e67605361 100644 --- a/iap/apiv1/identity_aware_proxy_admin_client_example_go123_test.go +++ b/iap/apiv1/identity_aware_proxy_admin_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleIdentityAwareProxyAdminClient_ListTunnelDestGroups_all() { } for resp, err := range c.ListTunnelDestGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/iap/apiv1/identity_aware_proxyo_auth_client.go b/iap/apiv1/identity_aware_proxyo_auth_client.go index 3abe6e9e6feb..0329df916901 100755 --- a/iap/apiv1/identity_aware_proxyo_auth_client.go +++ b/iap/apiv1/identity_aware_proxyo_auth_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( iappb "cloud.google.com/go/iap/apiv1/iappb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -246,6 +245,8 @@ type identityAwareProxyOAuthGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIdentityAwareProxyOAuthClient creates a new identity aware proxyo auth service client based on gRPC. @@ -274,6 +275,7 @@ func NewIdentityAwareProxyOAuthClient(ctx context.Context, opts ...option.Client connPool: connPool, identityAwareProxyOAuthClient: iappb.NewIdentityAwareProxyOAuthServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -320,6 +322,8 @@ type identityAwareProxyOAuthRESTClient struct { // Points back to the CallOptions field of the containing IdentityAwareProxyOAuthClient CallOptions **IdentityAwareProxyOAuthCallOptions + + logger *slog.Logger } // NewIdentityAwareProxyOAuthRESTClient creates a new identity aware proxyo auth service rest client. @@ -339,6 +343,7 @@ func NewIdentityAwareProxyOAuthRESTClient(ctx context.Context, opts ...option.Cl endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -391,7 +396,7 @@ func (c *identityAwareProxyOAuthGRPCClient) ListBrands(ctx context.Context, req var resp *iappb.ListBrandsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.ListBrands(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.ListBrands, req, settings.GRPC, c.logger, "ListBrands") return err }, opts...) if err != nil { @@ -409,7 +414,7 @@ func (c *identityAwareProxyOAuthGRPCClient) CreateBrand(ctx context.Context, req var resp *iappb.Brand err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.CreateBrand(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.CreateBrand, req, settings.GRPC, c.logger, "CreateBrand") return err }, opts...) if err != nil { @@ -427,7 +432,7 @@ func (c *identityAwareProxyOAuthGRPCClient) GetBrand(ctx context.Context, req *i var resp *iappb.Brand err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.GetBrand(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.GetBrand, req, settings.GRPC, c.logger, "GetBrand") return err }, opts...) if err != nil { @@ -445,7 +450,7 @@ func (c *identityAwareProxyOAuthGRPCClient) CreateIdentityAwareProxyClient(ctx c var resp *iappb.IdentityAwareProxyClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.CreateIdentityAwareProxyClient(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.CreateIdentityAwareProxyClient, req, settings.GRPC, c.logger, "CreateIdentityAwareProxyClient") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *identityAwareProxyOAuthGRPCClient) ListIdentityAwareProxyClients(ctx co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.ListIdentityAwareProxyClients(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.ListIdentityAwareProxyClients, req, settings.GRPC, c.logger, "ListIdentityAwareProxyClients") return err }, opts...) if err != nil { @@ -509,7 +514,7 @@ func (c *identityAwareProxyOAuthGRPCClient) GetIdentityAwareProxyClient(ctx cont var resp *iappb.IdentityAwareProxyClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.GetIdentityAwareProxyClient(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.GetIdentityAwareProxyClient, req, settings.GRPC, c.logger, "GetIdentityAwareProxyClient") return err }, opts...) if err != nil { @@ -527,7 +532,7 @@ func (c *identityAwareProxyOAuthGRPCClient) ResetIdentityAwareProxyClientSecret( var resp *iappb.IdentityAwareProxyClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.identityAwareProxyOAuthClient.ResetIdentityAwareProxyClientSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.ResetIdentityAwareProxyClientSecret, req, settings.GRPC, c.logger, "ResetIdentityAwareProxyClientSecret") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *identityAwareProxyOAuthGRPCClient) DeleteIdentityAwareProxyClient(ctx c opts = append((*c.CallOptions).DeleteIdentityAwareProxyClient[0:len((*c.CallOptions).DeleteIdentityAwareProxyClient):len((*c.CallOptions).DeleteIdentityAwareProxyClient)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.identityAwareProxyOAuthClient.DeleteIdentityAwareProxyClient(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.identityAwareProxyOAuthClient.DeleteIdentityAwareProxyClient, req, settings.GRPC, c.logger, "DeleteIdentityAwareProxyClient") return err }, opts...) return err @@ -583,17 +588,7 @@ func (c *identityAwareProxyOAuthRESTClient) ListBrands(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBrands") if err != nil { return err } @@ -657,17 +652,7 @@ func (c *identityAwareProxyOAuthRESTClient) CreateBrand(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBrand") if err != nil { return err } @@ -717,17 +702,7 @@ func (c *identityAwareProxyOAuthRESTClient) GetBrand(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBrand") if err != nil { return err } @@ -786,17 +761,7 @@ func (c *identityAwareProxyOAuthRESTClient) CreateIdentityAwareProxyClient(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIdentityAwareProxyClient") if err != nil { return err } @@ -858,21 +823,10 @@ func (c *identityAwareProxyOAuthRESTClient) ListIdentityAwareProxyClients(ctx co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIdentityAwareProxyClients") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -936,17 +890,7 @@ func (c *identityAwareProxyOAuthRESTClient) GetIdentityAwareProxyClient(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIdentityAwareProxyClient") if err != nil { return err } @@ -1003,17 +947,7 @@ func (c *identityAwareProxyOAuthRESTClient) ResetIdentityAwareProxyClientSecret( httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetIdentityAwareProxyClientSecret") if err != nil { return err } @@ -1062,14 +996,7 @@ func (c *identityAwareProxyOAuthRESTClient) DeleteIdentityAwareProxyClient(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIdentityAwareProxyClient") + return err }, opts...) } diff --git a/iap/apiv1/identity_aware_proxyo_auth_client_example_go123_test.go b/iap/apiv1/identity_aware_proxyo_auth_client_example_go123_test.go index bdcde24f1087..7d491dedd14b 100644 --- a/iap/apiv1/identity_aware_proxyo_auth_client_example_go123_test.go +++ b/iap/apiv1/identity_aware_proxyo_auth_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleIdentityAwareProxyOAuthClient_ListIdentityAwareProxyClients_all() { } for resp, err := range c.ListIdentityAwareProxyClients(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/identitytoolkit/apiv2/account_management_client.go b/identitytoolkit/apiv2/account_management_client.go index 233e9cba6d49..035427703a79 100755 --- a/identitytoolkit/apiv2/account_management_client.go +++ b/identitytoolkit/apiv2/account_management_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( identitytoolkitpb "cloud.google.com/go/identitytoolkit/apiv2/identitytoolkitpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -165,6 +164,8 @@ type accountManagementGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAccountManagementClient creates a new account management service client based on gRPC. @@ -191,6 +192,7 @@ func NewAccountManagementClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, accountManagementClient: identitytoolkitpb.NewAccountManagementServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -237,6 +239,8 @@ type accountManagementRESTClient struct { // Points back to the CallOptions field of the containing AccountManagementClient CallOptions **AccountManagementCallOptions + + logger *slog.Logger } // NewAccountManagementRESTClient creates a new account management service rest client. @@ -254,6 +258,7 @@ func NewAccountManagementRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -303,7 +308,7 @@ func (c *accountManagementGRPCClient) FinalizeMfaEnrollment(ctx context.Context, var resp *identitytoolkitpb.FinalizeMfaEnrollmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountManagementClient.FinalizeMfaEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountManagementClient.FinalizeMfaEnrollment, req, settings.GRPC, c.logger, "FinalizeMfaEnrollment") return err }, opts...) if err != nil { @@ -318,7 +323,7 @@ func (c *accountManagementGRPCClient) StartMfaEnrollment(ctx context.Context, re var resp *identitytoolkitpb.StartMfaEnrollmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountManagementClient.StartMfaEnrollment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountManagementClient.StartMfaEnrollment, req, settings.GRPC, c.logger, "StartMfaEnrollment") return err }, opts...) if err != nil { @@ -333,7 +338,7 @@ func (c *accountManagementGRPCClient) WithdrawMfa(ctx context.Context, req *iden var resp *identitytoolkitpb.WithdrawMfaResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountManagementClient.WithdrawMfa(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountManagementClient.WithdrawMfa, req, settings.GRPC, c.logger, "WithdrawMfa") return err }, opts...) if err != nil { @@ -378,17 +383,7 @@ func (c *accountManagementRESTClient) FinalizeMfaEnrollment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinalizeMfaEnrollment") if err != nil { return err } @@ -442,17 +437,7 @@ func (c *accountManagementRESTClient) StartMfaEnrollment(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartMfaEnrollment") if err != nil { return err } @@ -505,17 +490,7 @@ func (c *accountManagementRESTClient) WithdrawMfa(ctx context.Context, req *iden httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WithdrawMfa") if err != nil { return err } diff --git a/identitytoolkit/apiv2/authentication_client.go b/identitytoolkit/apiv2/authentication_client.go index 3869b807fb15..914fd8c63cc4 100755 --- a/identitytoolkit/apiv2/authentication_client.go +++ b/identitytoolkit/apiv2/authentication_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( identitytoolkitpb "cloud.google.com/go/identitytoolkit/apiv2/identitytoolkitpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -151,6 +150,8 @@ type authenticationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAuthenticationClient creates a new authentication service client based on gRPC. @@ -177,6 +178,7 @@ func NewAuthenticationClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, authenticationClient: identitytoolkitpb.NewAuthenticationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -223,6 +225,8 @@ type authenticationRESTClient struct { // Points back to the CallOptions field of the containing AuthenticationClient CallOptions **AuthenticationCallOptions + + logger *slog.Logger } // NewAuthenticationRESTClient creates a new authentication service rest client. @@ -240,6 +244,7 @@ func NewAuthenticationRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -289,7 +294,7 @@ func (c *authenticationGRPCClient) FinalizeMfaSignIn(ctx context.Context, req *i var resp *identitytoolkitpb.FinalizeMfaSignInResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authenticationClient.FinalizeMfaSignIn(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authenticationClient.FinalizeMfaSignIn, req, settings.GRPC, c.logger, "FinalizeMfaSignIn") return err }, opts...) if err != nil { @@ -304,7 +309,7 @@ func (c *authenticationGRPCClient) StartMfaSignIn(ctx context.Context, req *iden var resp *identitytoolkitpb.StartMfaSignInResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.authenticationClient.StartMfaSignIn(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.authenticationClient.StartMfaSignIn, req, settings.GRPC, c.logger, "StartMfaSignIn") return err }, opts...) if err != nil { @@ -349,17 +354,7 @@ func (c *authenticationRESTClient) FinalizeMfaSignIn(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinalizeMfaSignIn") if err != nil { return err } @@ -412,17 +407,7 @@ func (c *authenticationRESTClient) StartMfaSignIn(ctx context.Context, req *iden httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartMfaSignIn") if err != nil { return err } diff --git a/identitytoolkit/apiv2/helpers.go b/identitytoolkit/apiv2/helpers.go index d5a0e7d3dd47..6f1ba65b02e1 100755 --- a/identitytoolkit/apiv2/helpers.go +++ b/identitytoolkit/apiv2/helpers.go @@ -18,10 +18,20 @@ package identitytoolkit import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "identitytoolkit.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/identitytoolkit/apiv2/identitytoolkitpb/account_management_service.pb.go b/identitytoolkit/apiv2/identitytoolkitpb/account_management_service.pb.go index 1fc48f239c50..16fcac8e0b33 100755 --- a/identitytoolkit/apiv2/identitytoolkitpb/account_management_service.pb.go +++ b/identitytoolkit/apiv2/identitytoolkitpb/account_management_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/identitytoolkit/v2/account_management_service.proto @@ -64,11 +64,9 @@ type FinalizeMfaEnrollmentRequest struct { func (x *FinalizeMfaEnrollmentRequest) Reset() { *x = FinalizeMfaEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaEnrollmentRequest) String() string { @@ -79,7 +77,7 @@ func (*FinalizeMfaEnrollmentRequest) ProtoMessage() {} func (x *FinalizeMfaEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +159,9 @@ type FinalizeMfaEnrollmentResponse struct { func (x *FinalizeMfaEnrollmentResponse) Reset() { *x = FinalizeMfaEnrollmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaEnrollmentResponse) String() string { @@ -176,7 +172,7 @@ func (*FinalizeMfaEnrollmentResponse) ProtoMessage() {} func (x *FinalizeMfaEnrollmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +248,9 @@ type StartMfaEnrollmentRequest struct { func (x *StartMfaEnrollmentRequest) Reset() { *x = StartMfaEnrollmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaEnrollmentRequest) String() string { @@ -267,7 +261,7 @@ func (*StartMfaEnrollmentRequest) ProtoMessage() {} func (x *StartMfaEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,11 +331,9 @@ type StartMfaEnrollmentResponse struct { func (x *StartMfaEnrollmentResponse) Reset() { *x = StartMfaEnrollmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaEnrollmentResponse) String() string { @@ -352,7 +344,7 @@ func (*StartMfaEnrollmentResponse) ProtoMessage() {} func (x *StartMfaEnrollmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +403,9 @@ type WithdrawMfaRequest struct { func (x *WithdrawMfaRequest) Reset() { *x = WithdrawMfaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawMfaRequest) String() string { @@ -426,7 +416,7 @@ func (*WithdrawMfaRequest) ProtoMessage() {} func (x *WithdrawMfaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +466,9 @@ type WithdrawMfaResponse struct { func (x *WithdrawMfaResponse) Reset() { *x = WithdrawMfaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WithdrawMfaResponse) String() string { @@ -491,7 +479,7 @@ func (*WithdrawMfaResponse) ProtoMessage() {} func (x *WithdrawMfaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,80 +703,6 @@ func file_google_cloud_identitytoolkit_v2_account_management_service_proto_init( return } file_google_cloud_identitytoolkit_v2_mfa_info_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaEnrollmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaEnrollmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaEnrollmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WithdrawMfaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WithdrawMfaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_identitytoolkit_v2_account_management_service_proto_msgTypes[0].OneofWrappers = []any{ (*FinalizeMfaEnrollmentRequest_PhoneVerificationInfo)(nil), } diff --git a/identitytoolkit/apiv2/identitytoolkitpb/authentication_service.pb.go b/identitytoolkit/apiv2/identitytoolkitpb/authentication_service.pb.go index faaed090682b..dabf31f9753d 100755 --- a/identitytoolkit/apiv2/identitytoolkitpb/authentication_service.pb.go +++ b/identitytoolkit/apiv2/identitytoolkitpb/authentication_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/identitytoolkit/v2/authentication_service.proto @@ -61,11 +61,9 @@ type FinalizeMfaSignInRequest struct { func (x *FinalizeMfaSignInRequest) Reset() { *x = FinalizeMfaSignInRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaSignInRequest) String() string { @@ -76,7 +74,7 @@ func (*FinalizeMfaSignInRequest) ProtoMessage() {} func (x *FinalizeMfaSignInRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type FinalizeMfaSignInResponse struct { func (x *FinalizeMfaSignInResponse) Reset() { *x = FinalizeMfaSignInResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaSignInResponse) String() string { @@ -166,7 +162,7 @@ func (*FinalizeMfaSignInResponse) ProtoMessage() {} func (x *FinalizeMfaSignInResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +239,9 @@ type StartMfaSignInRequest struct { func (x *StartMfaSignInRequest) Reset() { *x = StartMfaSignInRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaSignInRequest) String() string { @@ -258,7 +252,7 @@ func (*StartMfaSignInRequest) ProtoMessage() {} func (x *StartMfaSignInRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,11 +329,9 @@ type StartMfaSignInResponse struct { func (x *StartMfaSignInResponse) Reset() { *x = StartMfaSignInResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaSignInResponse) String() string { @@ -350,7 +342,7 @@ func (*StartMfaSignInResponse) ProtoMessage() {} func (x *StartMfaSignInResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,56 +551,6 @@ func file_google_cloud_identitytoolkit_v2_authentication_service_proto_init() { return } file_google_cloud_identitytoolkit_v2_mfa_info_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaSignInRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaSignInResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaSignInRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaSignInResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_identitytoolkit_v2_authentication_service_proto_msgTypes[0].OneofWrappers = []any{ (*FinalizeMfaSignInRequest_PhoneVerificationInfo)(nil), } diff --git a/identitytoolkit/apiv2/identitytoolkitpb/mfa_info.pb.go b/identitytoolkit/apiv2/identitytoolkitpb/mfa_info.pb.go index 401027fd2814..d85f421a4300 100755 --- a/identitytoolkit/apiv2/identitytoolkitpb/mfa_info.pb.go +++ b/identitytoolkit/apiv2/identitytoolkitpb/mfa_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/identitytoolkit/v2/mfa_info.proto @@ -49,11 +49,9 @@ type AutoRetrievalInfo struct { func (x *AutoRetrievalInfo) Reset() { *x = AutoRetrievalInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoRetrievalInfo) String() string { @@ -64,7 +62,7 @@ func (*AutoRetrievalInfo) ProtoMessage() {} func (x *AutoRetrievalInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113,11 +111,9 @@ type StartMfaPhoneRequestInfo struct { func (x *StartMfaPhoneRequestInfo) Reset() { *x = StartMfaPhoneRequestInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaPhoneRequestInfo) String() string { @@ -128,7 +124,7 @@ func (*StartMfaPhoneRequestInfo) ProtoMessage() {} func (x *StartMfaPhoneRequestInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,11 +193,9 @@ type StartMfaPhoneResponseInfo struct { func (x *StartMfaPhoneResponseInfo) Reset() { *x = StartMfaPhoneResponseInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMfaPhoneResponseInfo) String() string { @@ -212,7 +206,7 @@ func (*StartMfaPhoneResponseInfo) ProtoMessage() {} func (x *StartMfaPhoneResponseInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +246,9 @@ type FinalizeMfaPhoneRequestInfo struct { func (x *FinalizeMfaPhoneRequestInfo) Reset() { *x = FinalizeMfaPhoneRequestInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaPhoneRequestInfo) String() string { @@ -267,7 +259,7 @@ func (*FinalizeMfaPhoneRequestInfo) ProtoMessage() {} func (x *FinalizeMfaPhoneRequestInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +318,9 @@ type FinalizeMfaPhoneResponseInfo struct { func (x *FinalizeMfaPhoneResponseInfo) Reset() { *x = FinalizeMfaPhoneResponseInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMfaPhoneResponseInfo) String() string { @@ -341,7 +331,7 @@ func (*FinalizeMfaPhoneResponseInfo) ProtoMessage() {} func (x *FinalizeMfaPhoneResponseInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,68 +484,6 @@ func file_google_cloud_identitytoolkit_v2_mfa_info_proto_init() { if File_google_cloud_identitytoolkit_v2_mfa_info_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutoRetrievalInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaPhoneRequestInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StartMfaPhoneResponseInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaPhoneRequestInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_identitytoolkit_v2_mfa_info_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMfaPhoneResponseInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/ids/apiv1/helpers.go b/ids/apiv1/helpers.go index 00f7441a57a7..bbfe79467c69 100755 --- a/ids/apiv1/helpers.go +++ b/ids/apiv1/helpers.go @@ -18,10 +18,20 @@ package ids import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "ids.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/ids/apiv1/ids_client.go b/ids/apiv1/ids_client.go index 915cd79aec00..9c4c738349eb 100755 --- a/ids/apiv1/ids_client.go +++ b/ids/apiv1/ids_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -241,6 +240,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new ids client based on gRPC. @@ -267,6 +268,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: idspb.NewIDSClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -329,6 +331,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new ids rest client. @@ -346,6 +350,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,7 +424,7 @@ func (c *gRPCClient) ListEndpoints(ctx context.Context, req *idspb.ListEndpoints } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEndpoints, req, settings.GRPC, c.logger, "ListEndpoints") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *gRPCClient) GetEndpoint(ctx context.Context, req *idspb.GetEndpointRequ var resp *idspb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEndpoint, req, settings.GRPC, c.logger, "GetEndpoint") return err }, opts...) if err != nil { @@ -472,7 +477,7 @@ func (c *gRPCClient) CreateEndpoint(ctx context.Context, req *idspb.CreateEndpoi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEndpoint, req, settings.GRPC, c.logger, "CreateEndpoint") return err }, opts...) if err != nil { @@ -492,7 +497,7 @@ func (c *gRPCClient) DeleteEndpoint(ctx context.Context, req *idspb.DeleteEndpoi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEndpoint, req, settings.GRPC, c.logger, "DeleteEndpoint") return err }, opts...) if err != nil { @@ -554,21 +559,10 @@ func (c *restClient) ListEndpoints(ctx context.Context, req *idspb.ListEndpoints } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEndpoints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -631,17 +625,7 @@ func (c *restClient) GetEndpoint(ctx context.Context, req *idspb.GetEndpointRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEndpoint") if err != nil { return err } @@ -701,21 +685,10 @@ func (c *restClient) CreateEndpoint(ctx context.Context, req *idspb.CreateEndpoi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEndpoint") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -768,21 +741,10 @@ func (c *restClient) DeleteEndpoint(ctx context.Context, req *idspb.DeleteEndpoi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEndpoint") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/ids/apiv1/ids_client_example_go123_test.go b/ids/apiv1/ids_client_example_go123_test.go index 80b3c5706a33..61532227991d 100644 --- a/ids/apiv1/ids_client_example_go123_test.go +++ b/ids/apiv1/ids_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListEndpoints_all() { } for resp, err := range c.ListEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/ids/apiv1/idspb/ids.pb.go b/ids/apiv1/idspb/ids.pb.go index c1bef3960206..7758d663b7ed 100755 --- a/ids/apiv1/idspb/ids.pb.go +++ b/ids/apiv1/idspb/ids.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/ids/v1/ids.proto @@ -198,11 +198,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -213,7 +211,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +329,9 @@ type ListEndpointsRequest struct { func (x *ListEndpointsRequest) Reset() { *x = ListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsRequest) String() string { @@ -346,7 +342,7 @@ func (*ListEndpointsRequest) ProtoMessage() {} func (x *ListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +408,9 @@ type ListEndpointsResponse struct { func (x *ListEndpointsResponse) Reset() { *x = ListEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsResponse) String() string { @@ -427,7 +421,7 @@ func (*ListEndpointsResponse) ProtoMessage() {} func (x *ListEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +469,9 @@ type GetEndpointRequest struct { func (x *GetEndpointRequest) Reset() { *x = GetEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointRequest) String() string { @@ -490,7 +482,7 @@ func (*GetEndpointRequest) ProtoMessage() {} func (x *GetEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +538,9 @@ type CreateEndpointRequest struct { func (x *CreateEndpointRequest) Reset() { *x = CreateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointRequest) String() string { @@ -561,7 +551,7 @@ func (*CreateEndpointRequest) ProtoMessage() {} func (x *CreateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +619,9 @@ type DeleteEndpointRequest struct { func (x *DeleteEndpointRequest) Reset() { *x = DeleteEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointRequest) String() string { @@ -644,7 +632,7 @@ func (*DeleteEndpointRequest) ProtoMessage() {} func (x *DeleteEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,11 +688,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -715,7 +701,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_ids_v1_ids_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,92 +1029,6 @@ func file_google_cloud_ids_v1_ids_proto_init() { if File_google_cloud_ids_v1_ids_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_ids_v1_ids_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_ids_v1_ids_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/iot/apiv1/device_manager_client.go b/iot/apiv1/device_manager_client.go index 80c3f83eceb9..7f4397ea1559 100755 --- a/iot/apiv1/device_manager_client.go +++ b/iot/apiv1/device_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" iotpb "cloud.google.com/go/iot/apiv1/iotpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -593,6 +592,8 @@ type deviceManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDeviceManagerClient creates a new device manager client based on gRPC. @@ -619,6 +620,7 @@ func NewDeviceManagerClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, deviceManagerClient: iotpb.NewDeviceManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -665,6 +667,8 @@ type deviceManagerRESTClient struct { // Points back to the CallOptions field of the containing DeviceManagerClient CallOptions **DeviceManagerCallOptions + + logger *slog.Logger } // NewDeviceManagerRESTClient creates a new device manager rest client. @@ -682,6 +686,7 @@ func NewDeviceManagerRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -734,7 +739,7 @@ func (c *deviceManagerGRPCClient) CreateDeviceRegistry(ctx context.Context, req var resp *iotpb.DeviceRegistry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.CreateDeviceRegistry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.CreateDeviceRegistry, req, settings.GRPC, c.logger, "CreateDeviceRegistry") return err }, opts...) if err != nil { @@ -752,7 +757,7 @@ func (c *deviceManagerGRPCClient) GetDeviceRegistry(ctx context.Context, req *io var resp *iotpb.DeviceRegistry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.GetDeviceRegistry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.GetDeviceRegistry, req, settings.GRPC, c.logger, "GetDeviceRegistry") return err }, opts...) if err != nil { @@ -770,7 +775,7 @@ func (c *deviceManagerGRPCClient) UpdateDeviceRegistry(ctx context.Context, req var resp *iotpb.DeviceRegistry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.UpdateDeviceRegistry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.UpdateDeviceRegistry, req, settings.GRPC, c.logger, "UpdateDeviceRegistry") return err }, opts...) if err != nil { @@ -787,7 +792,7 @@ func (c *deviceManagerGRPCClient) DeleteDeviceRegistry(ctx context.Context, req opts = append((*c.CallOptions).DeleteDeviceRegistry[0:len((*c.CallOptions).DeleteDeviceRegistry):len((*c.CallOptions).DeleteDeviceRegistry)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.deviceManagerClient.DeleteDeviceRegistry(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.deviceManagerClient.DeleteDeviceRegistry, req, settings.GRPC, c.logger, "DeleteDeviceRegistry") return err }, opts...) return err @@ -813,7 +818,7 @@ func (c *deviceManagerGRPCClient) ListDeviceRegistries(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.ListDeviceRegistries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.ListDeviceRegistries, req, settings.GRPC, c.logger, "ListDeviceRegistries") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *deviceManagerGRPCClient) CreateDevice(ctx context.Context, req *iotpb.C var resp *iotpb.Device err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.CreateDevice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.CreateDevice, req, settings.GRPC, c.logger, "CreateDevice") return err }, opts...) if err != nil { @@ -866,7 +871,7 @@ func (c *deviceManagerGRPCClient) GetDevice(ctx context.Context, req *iotpb.GetD var resp *iotpb.Device err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.GetDevice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.GetDevice, req, settings.GRPC, c.logger, "GetDevice") return err }, opts...) if err != nil { @@ -884,7 +889,7 @@ func (c *deviceManagerGRPCClient) UpdateDevice(ctx context.Context, req *iotpb.U var resp *iotpb.Device err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.UpdateDevice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.UpdateDevice, req, settings.GRPC, c.logger, "UpdateDevice") return err }, opts...) if err != nil { @@ -901,7 +906,7 @@ func (c *deviceManagerGRPCClient) DeleteDevice(ctx context.Context, req *iotpb.D opts = append((*c.CallOptions).DeleteDevice[0:len((*c.CallOptions).DeleteDevice):len((*c.CallOptions).DeleteDevice)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.deviceManagerClient.DeleteDevice(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.deviceManagerClient.DeleteDevice, req, settings.GRPC, c.logger, "DeleteDevice") return err }, opts...) return err @@ -927,7 +932,7 @@ func (c *deviceManagerGRPCClient) ListDevices(ctx context.Context, req *iotpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.ListDevices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.ListDevices, req, settings.GRPC, c.logger, "ListDevices") return err }, opts...) if err != nil { @@ -962,7 +967,7 @@ func (c *deviceManagerGRPCClient) ModifyCloudToDeviceConfig(ctx context.Context, var resp *iotpb.DeviceConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.ModifyCloudToDeviceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.ModifyCloudToDeviceConfig, req, settings.GRPC, c.logger, "ModifyCloudToDeviceConfig") return err }, opts...) if err != nil { @@ -980,7 +985,7 @@ func (c *deviceManagerGRPCClient) ListDeviceConfigVersions(ctx context.Context, var resp *iotpb.ListDeviceConfigVersionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.ListDeviceConfigVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.ListDeviceConfigVersions, req, settings.GRPC, c.logger, "ListDeviceConfigVersions") return err }, opts...) if err != nil { @@ -998,7 +1003,7 @@ func (c *deviceManagerGRPCClient) ListDeviceStates(ctx context.Context, req *iot var resp *iotpb.ListDeviceStatesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.ListDeviceStates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.ListDeviceStates, req, settings.GRPC, c.logger, "ListDeviceStates") return err }, opts...) if err != nil { @@ -1016,7 +1021,7 @@ func (c *deviceManagerGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1034,7 +1039,7 @@ func (c *deviceManagerGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1052,7 +1057,7 @@ func (c *deviceManagerGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1070,7 +1075,7 @@ func (c *deviceManagerGRPCClient) SendCommandToDevice(ctx context.Context, req * var resp *iotpb.SendCommandToDeviceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.SendCommandToDevice(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.SendCommandToDevice, req, settings.GRPC, c.logger, "SendCommandToDevice") return err }, opts...) if err != nil { @@ -1088,7 +1093,7 @@ func (c *deviceManagerGRPCClient) BindDeviceToGateway(ctx context.Context, req * var resp *iotpb.BindDeviceToGatewayResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.BindDeviceToGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.BindDeviceToGateway, req, settings.GRPC, c.logger, "BindDeviceToGateway") return err }, opts...) if err != nil { @@ -1106,7 +1111,7 @@ func (c *deviceManagerGRPCClient) UnbindDeviceFromGateway(ctx context.Context, r var resp *iotpb.UnbindDeviceFromGatewayResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.deviceManagerClient.UnbindDeviceFromGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.deviceManagerClient.UnbindDeviceFromGateway, req, settings.GRPC, c.logger, "UnbindDeviceFromGateway") return err }, opts...) if err != nil { @@ -1155,17 +1160,7 @@ func (c *deviceManagerRESTClient) CreateDeviceRegistry(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeviceRegistry") if err != nil { return err } @@ -1215,17 +1210,7 @@ func (c *deviceManagerRESTClient) GetDeviceRegistry(ctx context.Context, req *io httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeviceRegistry") if err != nil { return err } @@ -1289,17 +1274,7 @@ func (c *deviceManagerRESTClient) UpdateDeviceRegistry(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeviceRegistry") if err != nil { return err } @@ -1346,15 +1321,8 @@ func (c *deviceManagerRESTClient) DeleteDeviceRegistry(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDeviceRegistry") + return err }, opts...) } @@ -1403,21 +1371,10 @@ func (c *deviceManagerRESTClient) ListDeviceRegistries(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeviceRegistries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1487,17 +1444,7 @@ func (c *deviceManagerRESTClient) CreateDevice(ctx context.Context, req *iotpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDevice") if err != nil { return err } @@ -1554,17 +1501,7 @@ func (c *deviceManagerRESTClient) GetDevice(ctx context.Context, req *iotpb.GetD httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDevice") if err != nil { return err } @@ -1628,17 +1565,7 @@ func (c *deviceManagerRESTClient) UpdateDevice(ctx context.Context, req *iotpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDevice") if err != nil { return err } @@ -1685,15 +1612,8 @@ func (c *deviceManagerRESTClient) DeleteDevice(ctx context.Context, req *iotpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDevice") + return err }, opts...) } @@ -1768,21 +1688,10 @@ func (c *deviceManagerRESTClient) ListDevices(ctx context.Context, req *iotpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDevices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1853,17 +1762,7 @@ func (c *deviceManagerRESTClient) ModifyCloudToDeviceConfig(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyCloudToDeviceConfig") if err != nil { return err } @@ -1917,17 +1816,7 @@ func (c *deviceManagerRESTClient) ListDeviceConfigVersions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeviceConfigVersions") if err != nil { return err } @@ -1981,17 +1870,7 @@ func (c *deviceManagerRESTClient) ListDeviceStates(ctx context.Context, req *iot httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeviceStates") if err != nil { return err } @@ -2048,17 +1927,7 @@ func (c *deviceManagerRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2116,17 +1985,7 @@ func (c *deviceManagerRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2184,17 +2043,7 @@ func (c *deviceManagerRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2264,17 +2113,7 @@ func (c *deviceManagerRESTClient) SendCommandToDevice(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SendCommandToDevice") if err != nil { return err } @@ -2330,17 +2169,7 @@ func (c *deviceManagerRESTClient) BindDeviceToGateway(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BindDeviceToGateway") if err != nil { return err } @@ -2396,17 +2225,7 @@ func (c *deviceManagerRESTClient) UnbindDeviceFromGateway(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnbindDeviceFromGateway") if err != nil { return err } diff --git a/iot/apiv1/device_manager_client_example_go123_test.go b/iot/apiv1/device_manager_client_example_go123_test.go index 25f9add34bf3..72604da9f86d 100644 --- a/iot/apiv1/device_manager_client_example_go123_test.go +++ b/iot/apiv1/device_manager_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDeviceManagerClient_ListDeviceRegistries_all() { } for resp, err := range c.ListDeviceRegistries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleDeviceManagerClient_ListDevices_all() { } for resp, err := range c.ListDevices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/iot/apiv1/helpers.go b/iot/apiv1/helpers.go index 470df4318cc9..0d67abe6051f 100755 --- a/iot/apiv1/helpers.go +++ b/iot/apiv1/helpers.go @@ -18,10 +18,20 @@ package iot import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudiot.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloudiot", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/iot/apiv1/iotpb/device_manager.pb.go b/iot/apiv1/iotpb/device_manager.pb.go index a21451830e07..37340b9e89ee 100755 --- a/iot/apiv1/iotpb/device_manager.pb.go +++ b/iot/apiv1/iotpb/device_manager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/iot/v1/device_manager.proto @@ -60,11 +60,9 @@ type CreateDeviceRegistryRequest struct { func (x *CreateDeviceRegistryRequest) Reset() { *x = CreateDeviceRegistryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeviceRegistryRequest) String() string { @@ -75,7 +73,7 @@ func (*CreateDeviceRegistryRequest) ProtoMessage() {} func (x *CreateDeviceRegistryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type GetDeviceRegistryRequest struct { func (x *GetDeviceRegistryRequest) Reset() { *x = GetDeviceRegistryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeviceRegistryRequest) String() string { @@ -132,7 +128,7 @@ func (*GetDeviceRegistryRequest) ProtoMessage() {} func (x *GetDeviceRegistryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type DeleteDeviceRegistryRequest struct { func (x *DeleteDeviceRegistryRequest) Reset() { *x = DeleteDeviceRegistryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeviceRegistryRequest) String() string { @@ -182,7 +176,7 @@ func (*DeleteDeviceRegistryRequest) ProtoMessage() {} func (x *DeleteDeviceRegistryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +218,9 @@ type UpdateDeviceRegistryRequest struct { func (x *UpdateDeviceRegistryRequest) Reset() { *x = UpdateDeviceRegistryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeviceRegistryRequest) String() string { @@ -239,7 +231,7 @@ func (*UpdateDeviceRegistryRequest) ProtoMessage() {} func (x *UpdateDeviceRegistryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +282,9 @@ type ListDeviceRegistriesRequest struct { func (x *ListDeviceRegistriesRequest) Reset() { *x = ListDeviceRegistriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceRegistriesRequest) String() string { @@ -305,7 +295,7 @@ func (*ListDeviceRegistriesRequest) ProtoMessage() {} func (x *ListDeviceRegistriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +347,9 @@ type ListDeviceRegistriesResponse struct { func (x *ListDeviceRegistriesResponse) Reset() { *x = ListDeviceRegistriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceRegistriesResponse) String() string { @@ -372,7 +360,7 @@ func (*ListDeviceRegistriesResponse) ProtoMessage() {} func (x *ListDeviceRegistriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +407,9 @@ type CreateDeviceRequest struct { func (x *CreateDeviceRequest) Reset() { *x = CreateDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeviceRequest) String() string { @@ -434,7 +420,7 @@ func (*CreateDeviceRequest) ProtoMessage() {} func (x *CreateDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +467,9 @@ type GetDeviceRequest struct { func (x *GetDeviceRequest) Reset() { *x = GetDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeviceRequest) String() string { @@ -496,7 +480,7 @@ func (*GetDeviceRequest) ProtoMessage() {} func (x *GetDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +529,9 @@ type UpdateDeviceRequest struct { func (x *UpdateDeviceRequest) Reset() { *x = UpdateDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeviceRequest) String() string { @@ -560,7 +542,7 @@ func (*UpdateDeviceRequest) ProtoMessage() {} func (x *UpdateDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +585,9 @@ type DeleteDeviceRequest struct { func (x *DeleteDeviceRequest) Reset() { *x = DeleteDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDeviceRequest) String() string { @@ -618,7 +598,7 @@ func (*DeleteDeviceRequest) ProtoMessage() {} func (x *DeleteDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +655,9 @@ type ListDevicesRequest struct { func (x *ListDevicesRequest) Reset() { *x = ListDevicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDevicesRequest) String() string { @@ -690,7 +668,7 @@ func (*ListDevicesRequest) ProtoMessage() {} func (x *ListDevicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +751,9 @@ type GatewayListOptions struct { func (x *GatewayListOptions) Reset() { *x = GatewayListOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GatewayListOptions) String() string { @@ -788,7 +764,7 @@ func (*GatewayListOptions) ProtoMessage() {} func (x *GatewayListOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -879,11 +855,9 @@ type ListDevicesResponse struct { func (x *ListDevicesResponse) Reset() { *x = ListDevicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDevicesResponse) String() string { @@ -894,7 +868,7 @@ func (*ListDevicesResponse) ProtoMessage() {} func (x *ListDevicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +919,9 @@ type ModifyCloudToDeviceConfigRequest struct { func (x *ModifyCloudToDeviceConfigRequest) Reset() { *x = ModifyCloudToDeviceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyCloudToDeviceConfigRequest) String() string { @@ -960,7 +932,7 @@ func (*ModifyCloudToDeviceConfigRequest) ProtoMessage() {} func (x *ModifyCloudToDeviceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1014,11 +986,9 @@ type ListDeviceConfigVersionsRequest struct { func (x *ListDeviceConfigVersionsRequest) Reset() { *x = ListDeviceConfigVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceConfigVersionsRequest) String() string { @@ -1029,7 +999,7 @@ func (*ListDeviceConfigVersionsRequest) ProtoMessage() {} func (x *ListDeviceConfigVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1041,9 @@ type ListDeviceConfigVersionsResponse struct { func (x *ListDeviceConfigVersionsResponse) Reset() { *x = ListDeviceConfigVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceConfigVersionsResponse) String() string { @@ -1086,7 +1054,7 @@ func (*ListDeviceConfigVersionsResponse) ProtoMessage() {} func (x *ListDeviceConfigVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1094,9 @@ type ListDeviceStatesRequest struct { func (x *ListDeviceStatesRequest) Reset() { *x = ListDeviceStatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceStatesRequest) String() string { @@ -1141,7 +1107,7 @@ func (*ListDeviceStatesRequest) ProtoMessage() {} func (x *ListDeviceStatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1149,9 @@ type ListDeviceStatesResponse struct { func (x *ListDeviceStatesResponse) Reset() { *x = ListDeviceStatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeviceStatesResponse) String() string { @@ -1198,7 +1162,7 @@ func (*ListDeviceStatesResponse) ProtoMessage() {} func (x *ListDeviceStatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1206,9 @@ type SendCommandToDeviceRequest struct { func (x *SendCommandToDeviceRequest) Reset() { *x = SendCommandToDeviceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendCommandToDeviceRequest) String() string { @@ -1257,7 +1219,7 @@ func (*SendCommandToDeviceRequest) ProtoMessage() {} func (x *SendCommandToDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1302,11 +1264,9 @@ type SendCommandToDeviceResponse struct { func (x *SendCommandToDeviceResponse) Reset() { *x = SendCommandToDeviceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendCommandToDeviceResponse) String() string { @@ -1317,7 +1277,7 @@ func (*SendCommandToDeviceResponse) ProtoMessage() {} func (x *SendCommandToDeviceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1312,9 @@ type BindDeviceToGatewayRequest struct { func (x *BindDeviceToGatewayRequest) Reset() { *x = BindDeviceToGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindDeviceToGatewayRequest) String() string { @@ -1367,7 +1325,7 @@ func (*BindDeviceToGatewayRequest) ProtoMessage() {} func (x *BindDeviceToGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1370,9 @@ type BindDeviceToGatewayResponse struct { func (x *BindDeviceToGatewayResponse) Reset() { *x = BindDeviceToGatewayResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindDeviceToGatewayResponse) String() string { @@ -1427,7 +1383,7 @@ func (*BindDeviceToGatewayResponse) ProtoMessage() {} func (x *BindDeviceToGatewayResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1418,9 @@ type UnbindDeviceFromGatewayRequest struct { func (x *UnbindDeviceFromGatewayRequest) Reset() { *x = UnbindDeviceFromGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnbindDeviceFromGatewayRequest) String() string { @@ -1477,7 +1431,7 @@ func (*UnbindDeviceFromGatewayRequest) ProtoMessage() {} func (x *UnbindDeviceFromGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1522,11 +1476,9 @@ type UnbindDeviceFromGatewayResponse struct { func (x *UnbindDeviceFromGatewayResponse) Reset() { *x = UnbindDeviceFromGatewayResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnbindDeviceFromGatewayResponse) String() string { @@ -1537,7 +1489,7 @@ func (*UnbindDeviceFromGatewayResponse) ProtoMessage() {} func (x *UnbindDeviceFromGatewayResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_device_manager_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2216,296 +2168,6 @@ func file_google_cloud_iot_v1_device_manager_proto_init() { return } file_google_cloud_iot_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_iot_v1_device_manager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeviceRegistryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDeviceRegistryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeviceRegistryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeviceRegistryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceRegistriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceRegistriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListDevicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GatewayListOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListDevicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ModifyCloudToDeviceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceConfigVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceConfigVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceStatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListDeviceStatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SendCommandToDeviceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SendCommandToDeviceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BindDeviceToGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BindDeviceToGatewayResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UnbindDeviceFromGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_device_manager_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UnbindDeviceFromGatewayResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_iot_v1_device_manager_proto_msgTypes[11].OneofWrappers = []any{ (*GatewayListOptions_GatewayType)(nil), (*GatewayListOptions_AssociationsGatewayId)(nil), diff --git a/iot/apiv1/iotpb/resources.pb.go b/iot/apiv1/iotpb/resources.pb.go index 06719e178aa7..8018df44e2a5 100755 --- a/iot/apiv1/iotpb/resources.pb.go +++ b/iot/apiv1/iotpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/iot/v1/resources.proto @@ -548,11 +548,9 @@ type Device struct { func (x *Device) Reset() { *x = Device{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Device) String() string { @@ -563,7 +561,7 @@ func (*Device) ProtoMessage() {} func (x *Device) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,11 +715,9 @@ type GatewayConfig struct { func (x *GatewayConfig) Reset() { *x = GatewayConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GatewayConfig) String() string { @@ -732,7 +728,7 @@ func (*GatewayConfig) ProtoMessage() {} func (x *GatewayConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +824,9 @@ type DeviceRegistry struct { func (x *DeviceRegistry) Reset() { *x = DeviceRegistry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceRegistry) String() string { @@ -843,7 +837,7 @@ func (*DeviceRegistry) ProtoMessage() {} func (x *DeviceRegistry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,11 +921,9 @@ type MqttConfig struct { func (x *MqttConfig) Reset() { *x = MqttConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MqttConfig) String() string { @@ -942,7 +934,7 @@ func (*MqttConfig) ProtoMessage() {} func (x *MqttConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +969,9 @@ type HttpConfig struct { func (x *HttpConfig) Reset() { *x = HttpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpConfig) String() string { @@ -992,7 +982,7 @@ func (*HttpConfig) ProtoMessage() {} func (x *HttpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1022,9 @@ type EventNotificationConfig struct { func (x *EventNotificationConfig) Reset() { *x = EventNotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventNotificationConfig) String() string { @@ -1047,7 +1035,7 @@ func (*EventNotificationConfig) ProtoMessage() {} func (x *EventNotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1089,11 +1077,9 @@ type StateNotificationConfig struct { func (x *StateNotificationConfig) Reset() { *x = StateNotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StateNotificationConfig) String() string { @@ -1104,7 +1090,7 @@ func (*StateNotificationConfig) ProtoMessage() {} func (x *StateNotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1142,11 +1128,9 @@ type RegistryCredential struct { func (x *RegistryCredential) Reset() { *x = RegistryCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegistryCredential) String() string { @@ -1157,7 +1141,7 @@ func (*RegistryCredential) ProtoMessage() {} func (x *RegistryCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,11 +1203,9 @@ type X509CertificateDetails struct { func (x *X509CertificateDetails) Reset() { *x = X509CertificateDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *X509CertificateDetails) String() string { @@ -1234,7 +1216,7 @@ func (*X509CertificateDetails) ProtoMessage() {} func (x *X509CertificateDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1289,9 @@ type PublicKeyCertificate struct { func (x *PublicKeyCertificate) Reset() { *x = PublicKeyCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicKeyCertificate) String() string { @@ -1322,7 +1302,7 @@ func (*PublicKeyCertificate) ProtoMessage() {} func (x *PublicKeyCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1378,11 +1358,9 @@ type DeviceCredential struct { func (x *DeviceCredential) Reset() { *x = DeviceCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceCredential) String() string { @@ -1393,7 +1371,7 @@ func (*DeviceCredential) ProtoMessage() {} func (x *DeviceCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1442,9 @@ type PublicKeyCredential struct { func (x *PublicKeyCredential) Reset() { *x = PublicKeyCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicKeyCredential) String() string { @@ -1479,7 +1455,7 @@ func (*PublicKeyCredential) ProtoMessage() {} func (x *PublicKeyCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1514,9 @@ type DeviceConfig struct { func (x *DeviceConfig) Reset() { *x = DeviceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceConfig) String() string { @@ -1553,7 +1527,7 @@ func (*DeviceConfig) ProtoMessage() {} func (x *DeviceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1611,11 +1585,9 @@ type DeviceState struct { func (x *DeviceState) Reset() { *x = DeviceState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceState) String() string { @@ -1626,7 +1598,7 @@ func (*DeviceState) ProtoMessage() {} func (x *DeviceState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_iot_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2040,176 +2012,6 @@ func file_google_cloud_iot_v1_resources_proto_init() { if File_google_cloud_iot_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_iot_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Device); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GatewayConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeviceRegistry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MqttConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*HttpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EventNotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StateNotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RegistryCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*X509CertificateDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PublicKeyCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeviceCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PublicKeyCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeviceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_iot_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeviceState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_iot_v1_resources_proto_msgTypes[7].OneofWrappers = []any{ (*RegistryCredential_PublicKeyCertificate)(nil), } diff --git a/kms/apiv1/autokey_admin_client.go b/kms/apiv1/autokey_admin_client.go index 16440fbc7c63..2e3add07f5ff 100755 --- a/kms/apiv1/autokey_admin_client.go +++ b/kms/apiv1/autokey_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( kmspb "cloud.google.com/go/kms/apiv1/kmspb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -312,6 +311,8 @@ type autokeyAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAutokeyAdminClient creates a new autokey admin client based on gRPC. @@ -345,6 +346,7 @@ func NewAutokeyAdminClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, autokeyAdminClient: kmspb.NewAutokeyAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -394,6 +396,8 @@ type autokeyAdminRESTClient struct { // Points back to the CallOptions field of the containing AutokeyAdminClient CallOptions **AutokeyAdminCallOptions + + logger *slog.Logger } // NewAutokeyAdminRESTClient creates a new autokey admin rest client. @@ -418,6 +422,7 @@ func NewAutokeyAdminRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -470,7 +475,7 @@ func (c *autokeyAdminGRPCClient) UpdateAutokeyConfig(ctx context.Context, req *k var resp *kmspb.AutokeyConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyAdminClient.UpdateAutokeyConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyAdminClient.UpdateAutokeyConfig, req, settings.GRPC, c.logger, "UpdateAutokeyConfig") return err }, opts...) if err != nil { @@ -488,7 +493,7 @@ func (c *autokeyAdminGRPCClient) GetAutokeyConfig(ctx context.Context, req *kmsp var resp *kmspb.AutokeyConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyAdminClient.GetAutokeyConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyAdminClient.GetAutokeyConfig, req, settings.GRPC, c.logger, "GetAutokeyConfig") return err }, opts...) if err != nil { @@ -506,7 +511,7 @@ func (c *autokeyAdminGRPCClient) ShowEffectiveAutokeyConfig(ctx context.Context, var resp *kmspb.ShowEffectiveAutokeyConfigResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyAdminClient.ShowEffectiveAutokeyConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyAdminClient.ShowEffectiveAutokeyConfig, req, settings.GRPC, c.logger, "ShowEffectiveAutokeyConfig") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *autokeyAdminGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -553,7 +558,7 @@ func (c *autokeyAdminGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -588,7 +593,7 @@ func (c *autokeyAdminGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *autokeyAdminGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *autokeyAdminGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -642,7 +647,7 @@ func (c *autokeyAdminGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -704,17 +709,7 @@ func (c *autokeyAdminRESTClient) UpdateAutokeyConfig(ctx context.Context, req *k httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAutokeyConfig") if err != nil { return err } @@ -765,17 +760,7 @@ func (c *autokeyAdminRESTClient) GetAutokeyConfig(ctx context.Context, req *kmsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutokeyConfig") if err != nil { return err } @@ -825,17 +810,7 @@ func (c *autokeyAdminRESTClient) ShowEffectiveAutokeyConfig(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ShowEffectiveAutokeyConfig") if err != nil { return err } @@ -885,17 +860,7 @@ func (c *autokeyAdminRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -960,21 +925,10 @@ func (c *autokeyAdminRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1041,17 +995,7 @@ func (c *autokeyAdminRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1111,17 +1055,7 @@ func (c *autokeyAdminRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1183,17 +1117,7 @@ func (c *autokeyAdminRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1243,17 +1167,7 @@ func (c *autokeyAdminRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/kms/apiv1/autokey_admin_client_example_go123_test.go b/kms/apiv1/autokey_admin_client_example_go123_test.go index deb9ab67ee37..3d7cd7130cd1 100644 --- a/kms/apiv1/autokey_admin_client_example_go123_test.go +++ b/kms/apiv1/autokey_admin_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAutokeyAdminClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/kms/apiv1/autokey_client.go b/kms/apiv1/autokey_client.go index 0cd015059c5a..892e96aded73 100755 --- a/kms/apiv1/autokey_client.go +++ b/kms/apiv1/autokey_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -321,6 +320,8 @@ type autokeyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAutokeyClient creates a new autokey client based on gRPC. @@ -364,6 +365,7 @@ func NewAutokeyClient(ctx context.Context, opts ...option.ClientOption) (*Autoke connPool: connPool, autokeyClient: kmspb.NewAutokeyClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -429,6 +431,8 @@ type autokeyRESTClient struct { // Points back to the CallOptions field of the containing AutokeyClient CallOptions **AutokeyCallOptions + + logger *slog.Logger } // NewAutokeyRESTClient creates a new autokey rest client. @@ -463,6 +467,7 @@ func NewAutokeyRESTClient(ctx context.Context, opts ...option.ClientOption) (*Au endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -525,7 +530,7 @@ func (c *autokeyGRPCClient) CreateKeyHandle(ctx context.Context, req *kmspb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyClient.CreateKeyHandle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyClient.CreateKeyHandle, req, settings.GRPC, c.logger, "CreateKeyHandle") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *autokeyGRPCClient) GetKeyHandle(ctx context.Context, req *kmspb.GetKeyH var resp *kmspb.KeyHandle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyClient.GetKeyHandle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyClient.GetKeyHandle, req, settings.GRPC, c.logger, "GetKeyHandle") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *autokeyGRPCClient) ListKeyHandles(ctx context.Context, req *kmspb.ListK } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autokeyClient.ListKeyHandles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autokeyClient.ListKeyHandles, req, settings.GRPC, c.logger, "ListKeyHandles") return err }, opts...) if err != nil { @@ -609,7 +614,7 @@ func (c *autokeyGRPCClient) GetLocation(ctx context.Context, req *locationpb.Get var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -638,7 +643,7 @@ func (c *autokeyGRPCClient) ListLocations(ctx context.Context, req *locationpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *autokeyGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -691,7 +696,7 @@ func (c *autokeyGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *autokeyGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *autokeyGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -784,21 +789,10 @@ func (c *autokeyRESTClient) CreateKeyHandle(ctx context.Context, req *kmspb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKeyHandle") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -849,17 +843,7 @@ func (c *autokeyRESTClient) GetKeyHandle(ctx context.Context, req *kmspb.GetKeyH httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKeyHandle") if err != nil { return err } @@ -924,21 +908,10 @@ func (c *autokeyRESTClient) ListKeyHandles(ctx context.Context, req *kmspb.ListK } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKeyHandles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1001,17 +974,7 @@ func (c *autokeyRESTClient) GetLocation(ctx context.Context, req *locationpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1076,21 +1039,10 @@ func (c *autokeyRESTClient) ListLocations(ctx context.Context, req *locationpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1157,17 +1109,7 @@ func (c *autokeyRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1227,17 +1169,7 @@ func (c *autokeyRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1299,17 +1231,7 @@ func (c *autokeyRESTClient) TestIamPermissions(ctx context.Context, req *iampb.T httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1359,17 +1281,7 @@ func (c *autokeyRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/kms/apiv1/autokey_client_example_go123_test.go b/kms/apiv1/autokey_client_example_go123_test.go index 45d7a0b97e4b..4e321012fc2c 100644 --- a/kms/apiv1/autokey_client_example_go123_test.go +++ b/kms/apiv1/autokey_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAutokeyClient_ListKeyHandles_all() { } for resp, err := range c.ListKeyHandles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAutokeyClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/kms/apiv1/ekm_client.go b/kms/apiv1/ekm_client.go index 411a37084ef6..7488bb432c5c 100755 --- a/kms/apiv1/ekm_client.go +++ b/kms/apiv1/ekm_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( kmspb "cloud.google.com/go/kms/apiv1/kmspb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -370,6 +369,8 @@ type ekmGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEkmClient creates a new ekm service client based on gRPC. @@ -401,6 +402,7 @@ func NewEkmClient(ctx context.Context, opts ...option.ClientOption) (*EkmClient, connPool: connPool, ekmClient: kmspb.NewEkmServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -450,6 +452,8 @@ type ekmRESTClient struct { // Points back to the CallOptions field of the containing EkmClient CallOptions **EkmCallOptions + + logger *slog.Logger } // NewEkmRESTClient creates a new ekm service rest client. @@ -472,6 +476,7 @@ func NewEkmRESTClient(ctx context.Context, opts ...option.ClientOption) (*EkmCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -535,7 +540,7 @@ func (c *ekmGRPCClient) ListEkmConnections(ctx context.Context, req *kmspb.ListE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.ListEkmConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.ListEkmConnections, req, settings.GRPC, c.logger, "ListEkmConnections") return err }, opts...) if err != nil { @@ -570,7 +575,7 @@ func (c *ekmGRPCClient) GetEkmConnection(ctx context.Context, req *kmspb.GetEkmC var resp *kmspb.EkmConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.GetEkmConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.GetEkmConnection, req, settings.GRPC, c.logger, "GetEkmConnection") return err }, opts...) if err != nil { @@ -588,7 +593,7 @@ func (c *ekmGRPCClient) CreateEkmConnection(ctx context.Context, req *kmspb.Crea var resp *kmspb.EkmConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.CreateEkmConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.CreateEkmConnection, req, settings.GRPC, c.logger, "CreateEkmConnection") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *ekmGRPCClient) UpdateEkmConnection(ctx context.Context, req *kmspb.Upda var resp *kmspb.EkmConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.UpdateEkmConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.UpdateEkmConnection, req, settings.GRPC, c.logger, "UpdateEkmConnection") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *ekmGRPCClient) GetEkmConfig(ctx context.Context, req *kmspb.GetEkmConfi var resp *kmspb.EkmConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.GetEkmConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.GetEkmConfig, req, settings.GRPC, c.logger, "GetEkmConfig") return err }, opts...) if err != nil { @@ -642,7 +647,7 @@ func (c *ekmGRPCClient) UpdateEkmConfig(ctx context.Context, req *kmspb.UpdateEk var resp *kmspb.EkmConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.UpdateEkmConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.UpdateEkmConfig, req, settings.GRPC, c.logger, "UpdateEkmConfig") return err }, opts...) if err != nil { @@ -660,7 +665,7 @@ func (c *ekmGRPCClient) VerifyConnectivity(ctx context.Context, req *kmspb.Verif var resp *kmspb.VerifyConnectivityResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.ekmClient.VerifyConnectivity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.ekmClient.VerifyConnectivity, req, settings.GRPC, c.logger, "VerifyConnectivity") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *ekmGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLoca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -707,7 +712,7 @@ func (c *ekmGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -742,7 +747,7 @@ func (c *ekmGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *ekmGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *ekmGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestI var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -796,7 +801,7 @@ func (c *ekmGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -856,21 +861,10 @@ func (c *ekmRESTClient) ListEkmConnections(ctx context.Context, req *kmspb.ListE } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEkmConnections") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -934,17 +928,7 @@ func (c *ekmRESTClient) GetEkmConnection(ctx context.Context, req *kmspb.GetEkmC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEkmConnection") if err != nil { return err } @@ -1003,17 +987,7 @@ func (c *ekmRESTClient) CreateEkmConnection(ctx context.Context, req *kmspb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEkmConnection") if err != nil { return err } @@ -1077,17 +1051,7 @@ func (c *ekmRESTClient) UpdateEkmConnection(ctx context.Context, req *kmspb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEkmConnection") if err != nil { return err } @@ -1138,17 +1102,7 @@ func (c *ekmRESTClient) GetEkmConfig(ctx context.Context, req *kmspb.GetEkmConfi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEkmConfig") if err != nil { return err } @@ -1213,17 +1167,7 @@ func (c *ekmRESTClient) UpdateEkmConfig(ctx context.Context, req *kmspb.UpdateEk httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEkmConfig") if err != nil { return err } @@ -1277,17 +1221,7 @@ func (c *ekmRESTClient) VerifyConnectivity(ctx context.Context, req *kmspb.Verif httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "VerifyConnectivity") if err != nil { return err } @@ -1337,17 +1271,7 @@ func (c *ekmRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLoca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1412,21 +1336,10 @@ func (c *ekmRESTClient) ListLocations(ctx context.Context, req *locationpb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1493,17 +1406,7 @@ func (c *ekmRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1563,17 +1466,7 @@ func (c *ekmRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1635,17 +1528,7 @@ func (c *ekmRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1695,17 +1578,7 @@ func (c *ekmRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/kms/apiv1/ekm_client_example_go123_test.go b/kms/apiv1/ekm_client_example_go123_test.go index bf001930ac50..6077c15a3fb4 100644 --- a/kms/apiv1/ekm_client_example_go123_test.go +++ b/kms/apiv1/ekm_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEkmClient_ListEkmConnections_all() { } for resp, err := range c.ListEkmConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEkmClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/kms/apiv1/helpers.go b/kms/apiv1/helpers.go index c7bcd3a6015a..9dfe05507637 100755 --- a/kms/apiv1/helpers.go +++ b/kms/apiv1/helpers.go @@ -18,10 +18,20 @@ package kms import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudkms.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloudkms", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/kms/apiv1/key_management_client.go b/kms/apiv1/key_management_client.go index 285df9b61e8e..07f8e4ba05ae 100755 --- a/kms/apiv1/key_management_client.go +++ b/kms/apiv1/key_management_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( kmspb "cloud.google.com/go/kms/apiv1/kmspb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1130,6 +1129,8 @@ type keyManagementGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewKeyManagementClient creates a new key management service client based on gRPC. @@ -1170,6 +1171,7 @@ func NewKeyManagementClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, keyManagementClient: kmspb.NewKeyManagementServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1219,6 +1221,8 @@ type keyManagementRESTClient struct { // Points back to the CallOptions field of the containing KeyManagementClient CallOptions **KeyManagementCallOptions + + logger *slog.Logger } // NewKeyManagementRESTClient creates a new key management service rest client. @@ -1250,6 +1254,7 @@ func NewKeyManagementRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1313,7 +1318,7 @@ func (c *keyManagementGRPCClient) ListKeyRings(ctx context.Context, req *kmspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.ListKeyRings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.ListKeyRings, req, settings.GRPC, c.logger, "ListKeyRings") return err }, opts...) if err != nil { @@ -1359,7 +1364,7 @@ func (c *keyManagementGRPCClient) ListCryptoKeys(ctx context.Context, req *kmspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.ListCryptoKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.ListCryptoKeys, req, settings.GRPC, c.logger, "ListCryptoKeys") return err }, opts...) if err != nil { @@ -1405,7 +1410,7 @@ func (c *keyManagementGRPCClient) ListCryptoKeyVersions(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.ListCryptoKeyVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.ListCryptoKeyVersions, req, settings.GRPC, c.logger, "ListCryptoKeyVersions") return err }, opts...) if err != nil { @@ -1451,7 +1456,7 @@ func (c *keyManagementGRPCClient) ListImportJobs(ctx context.Context, req *kmspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.ListImportJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.ListImportJobs, req, settings.GRPC, c.logger, "ListImportJobs") return err }, opts...) if err != nil { @@ -1486,7 +1491,7 @@ func (c *keyManagementGRPCClient) GetKeyRing(ctx context.Context, req *kmspb.Get var resp *kmspb.KeyRing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GetKeyRing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GetKeyRing, req, settings.GRPC, c.logger, "GetKeyRing") return err }, opts...) if err != nil { @@ -1504,7 +1509,7 @@ func (c *keyManagementGRPCClient) GetCryptoKey(ctx context.Context, req *kmspb.G var resp *kmspb.CryptoKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GetCryptoKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GetCryptoKey, req, settings.GRPC, c.logger, "GetCryptoKey") return err }, opts...) if err != nil { @@ -1522,7 +1527,7 @@ func (c *keyManagementGRPCClient) GetCryptoKeyVersion(ctx context.Context, req * var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GetCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GetCryptoKeyVersion, req, settings.GRPC, c.logger, "GetCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *keyManagementGRPCClient) GetPublicKey(ctx context.Context, req *kmspb.G var resp *kmspb.PublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GetPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GetPublicKey, req, settings.GRPC, c.logger, "GetPublicKey") return err }, opts...) if err != nil { @@ -1558,7 +1563,7 @@ func (c *keyManagementGRPCClient) GetImportJob(ctx context.Context, req *kmspb.G var resp *kmspb.ImportJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GetImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GetImportJob, req, settings.GRPC, c.logger, "GetImportJob") return err }, opts...) if err != nil { @@ -1576,7 +1581,7 @@ func (c *keyManagementGRPCClient) CreateKeyRing(ctx context.Context, req *kmspb. var resp *kmspb.KeyRing err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.CreateKeyRing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.CreateKeyRing, req, settings.GRPC, c.logger, "CreateKeyRing") return err }, opts...) if err != nil { @@ -1594,7 +1599,7 @@ func (c *keyManagementGRPCClient) CreateCryptoKey(ctx context.Context, req *kmsp var resp *kmspb.CryptoKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.CreateCryptoKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.CreateCryptoKey, req, settings.GRPC, c.logger, "CreateCryptoKey") return err }, opts...) if err != nil { @@ -1612,7 +1617,7 @@ func (c *keyManagementGRPCClient) CreateCryptoKeyVersion(ctx context.Context, re var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.CreateCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.CreateCryptoKeyVersion, req, settings.GRPC, c.logger, "CreateCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1630,7 +1635,7 @@ func (c *keyManagementGRPCClient) ImportCryptoKeyVersion(ctx context.Context, re var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.ImportCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.ImportCryptoKeyVersion, req, settings.GRPC, c.logger, "ImportCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1648,7 +1653,7 @@ func (c *keyManagementGRPCClient) CreateImportJob(ctx context.Context, req *kmsp var resp *kmspb.ImportJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.CreateImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.CreateImportJob, req, settings.GRPC, c.logger, "CreateImportJob") return err }, opts...) if err != nil { @@ -1666,7 +1671,7 @@ func (c *keyManagementGRPCClient) UpdateCryptoKey(ctx context.Context, req *kmsp var resp *kmspb.CryptoKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.UpdateCryptoKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.UpdateCryptoKey, req, settings.GRPC, c.logger, "UpdateCryptoKey") return err }, opts...) if err != nil { @@ -1684,7 +1689,7 @@ func (c *keyManagementGRPCClient) UpdateCryptoKeyVersion(ctx context.Context, re var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.UpdateCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.UpdateCryptoKeyVersion, req, settings.GRPC, c.logger, "UpdateCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1702,7 +1707,7 @@ func (c *keyManagementGRPCClient) UpdateCryptoKeyPrimaryVersion(ctx context.Cont var resp *kmspb.CryptoKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.UpdateCryptoKeyPrimaryVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.UpdateCryptoKeyPrimaryVersion, req, settings.GRPC, c.logger, "UpdateCryptoKeyPrimaryVersion") return err }, opts...) if err != nil { @@ -1720,7 +1725,7 @@ func (c *keyManagementGRPCClient) DestroyCryptoKeyVersion(ctx context.Context, r var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.DestroyCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.DestroyCryptoKeyVersion, req, settings.GRPC, c.logger, "DestroyCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1738,7 +1743,7 @@ func (c *keyManagementGRPCClient) RestoreCryptoKeyVersion(ctx context.Context, r var resp *kmspb.CryptoKeyVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.RestoreCryptoKeyVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.RestoreCryptoKeyVersion, req, settings.GRPC, c.logger, "RestoreCryptoKeyVersion") return err }, opts...) if err != nil { @@ -1756,7 +1761,7 @@ func (c *keyManagementGRPCClient) Encrypt(ctx context.Context, req *kmspb.Encryp var resp *kmspb.EncryptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.Encrypt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.Encrypt, req, settings.GRPC, c.logger, "Encrypt") return err }, opts...) if err != nil { @@ -1774,7 +1779,7 @@ func (c *keyManagementGRPCClient) Decrypt(ctx context.Context, req *kmspb.Decryp var resp *kmspb.DecryptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.Decrypt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.Decrypt, req, settings.GRPC, c.logger, "Decrypt") return err }, opts...) if err != nil { @@ -1792,7 +1797,7 @@ func (c *keyManagementGRPCClient) RawEncrypt(ctx context.Context, req *kmspb.Raw var resp *kmspb.RawEncryptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.RawEncrypt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.RawEncrypt, req, settings.GRPC, c.logger, "RawEncrypt") return err }, opts...) if err != nil { @@ -1810,7 +1815,7 @@ func (c *keyManagementGRPCClient) RawDecrypt(ctx context.Context, req *kmspb.Raw var resp *kmspb.RawDecryptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.RawDecrypt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.RawDecrypt, req, settings.GRPC, c.logger, "RawDecrypt") return err }, opts...) if err != nil { @@ -1828,7 +1833,7 @@ func (c *keyManagementGRPCClient) AsymmetricSign(ctx context.Context, req *kmspb var resp *kmspb.AsymmetricSignResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.AsymmetricSign(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.AsymmetricSign, req, settings.GRPC, c.logger, "AsymmetricSign") return err }, opts...) if err != nil { @@ -1846,7 +1851,7 @@ func (c *keyManagementGRPCClient) AsymmetricDecrypt(ctx context.Context, req *km var resp *kmspb.AsymmetricDecryptResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.AsymmetricDecrypt(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.AsymmetricDecrypt, req, settings.GRPC, c.logger, "AsymmetricDecrypt") return err }, opts...) if err != nil { @@ -1864,7 +1869,7 @@ func (c *keyManagementGRPCClient) MacSign(ctx context.Context, req *kmspb.MacSig var resp *kmspb.MacSignResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.MacSign(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.MacSign, req, settings.GRPC, c.logger, "MacSign") return err }, opts...) if err != nil { @@ -1882,7 +1887,7 @@ func (c *keyManagementGRPCClient) MacVerify(ctx context.Context, req *kmspb.MacV var resp *kmspb.MacVerifyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.MacVerify(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.MacVerify, req, settings.GRPC, c.logger, "MacVerify") return err }, opts...) if err != nil { @@ -1900,7 +1905,7 @@ func (c *keyManagementGRPCClient) GenerateRandomBytes(ctx context.Context, req * var resp *kmspb.GenerateRandomBytesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyManagementClient.GenerateRandomBytes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyManagementClient.GenerateRandomBytes, req, settings.GRPC, c.logger, "GenerateRandomBytes") return err }, opts...) if err != nil { @@ -1918,7 +1923,7 @@ func (c *keyManagementGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1947,7 +1952,7 @@ func (c *keyManagementGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1982,7 +1987,7 @@ func (c *keyManagementGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2000,7 +2005,7 @@ func (c *keyManagementGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2018,7 +2023,7 @@ func (c *keyManagementGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2036,7 +2041,7 @@ func (c *keyManagementGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2096,21 +2101,10 @@ func (c *keyManagementRESTClient) ListKeyRings(ctx context.Context, req *kmspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKeyRings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2194,21 +2188,10 @@ func (c *keyManagementRESTClient) ListCryptoKeys(ctx context.Context, req *kmspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCryptoKeys") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2292,21 +2275,10 @@ func (c *keyManagementRESTClient) ListCryptoKeyVersions(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCryptoKeyVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2387,21 +2359,10 @@ func (c *keyManagementRESTClient) ListImportJobs(ctx context.Context, req *kmspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListImportJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2464,17 +2425,7 @@ func (c *keyManagementRESTClient) GetKeyRing(ctx context.Context, req *kmspb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKeyRing") if err != nil { return err } @@ -2526,17 +2477,7 @@ func (c *keyManagementRESTClient) GetCryptoKey(ctx context.Context, req *kmspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCryptoKey") if err != nil { return err } @@ -2587,17 +2528,7 @@ func (c *keyManagementRESTClient) GetCryptoKeyVersion(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCryptoKeyVersion") if err != nil { return err } @@ -2652,17 +2583,7 @@ func (c *keyManagementRESTClient) GetPublicKey(ctx context.Context, req *kmspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPublicKey") if err != nil { return err } @@ -2712,17 +2633,7 @@ func (c *keyManagementRESTClient) GetImportJob(ctx context.Context, req *kmspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetImportJob") if err != nil { return err } @@ -2781,17 +2692,7 @@ func (c *keyManagementRESTClient) CreateKeyRing(ctx context.Context, req *kmspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKeyRing") if err != nil { return err } @@ -2857,17 +2758,7 @@ func (c *keyManagementRESTClient) CreateCryptoKey(ctx context.Context, req *kmsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCryptoKey") if err != nil { return err } @@ -2929,17 +2820,7 @@ func (c *keyManagementRESTClient) CreateCryptoKeyVersion(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCryptoKeyVersion") if err != nil { return err } @@ -3002,17 +2883,7 @@ func (c *keyManagementRESTClient) ImportCryptoKeyVersion(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCryptoKeyVersion") if err != nil { return err } @@ -3074,17 +2945,7 @@ func (c *keyManagementRESTClient) CreateImportJob(ctx context.Context, req *kmsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateImportJob") if err != nil { return err } @@ -3148,17 +3009,7 @@ func (c *keyManagementRESTClient) UpdateCryptoKey(ctx context.Context, req *kmsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCryptoKey") if err != nil { return err } @@ -3233,17 +3084,7 @@ func (c *keyManagementRESTClient) UpdateCryptoKeyVersion(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCryptoKeyVersion") if err != nil { return err } @@ -3304,17 +3145,7 @@ func (c *keyManagementRESTClient) UpdateCryptoKeyPrimaryVersion(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCryptoKeyPrimaryVersion") if err != nil { return err } @@ -3390,17 +3221,7 @@ func (c *keyManagementRESTClient) DestroyCryptoKeyVersion(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DestroyCryptoKeyVersion") if err != nil { return err } @@ -3464,17 +3285,7 @@ func (c *keyManagementRESTClient) RestoreCryptoKeyVersion(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreCryptoKeyVersion") if err != nil { return err } @@ -3533,17 +3344,7 @@ func (c *keyManagementRESTClient) Encrypt(ctx context.Context, req *kmspb.Encryp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Encrypt") if err != nil { return err } @@ -3602,17 +3403,7 @@ func (c *keyManagementRESTClient) Decrypt(ctx context.Context, req *kmspb.Decryp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Decrypt") if err != nil { return err } @@ -3673,17 +3464,7 @@ func (c *keyManagementRESTClient) RawEncrypt(ctx context.Context, req *kmspb.Raw httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RawEncrypt") if err != nil { return err } @@ -3742,17 +3523,7 @@ func (c *keyManagementRESTClient) RawDecrypt(ctx context.Context, req *kmspb.Raw httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RawDecrypt") if err != nil { return err } @@ -3812,17 +3583,7 @@ func (c *keyManagementRESTClient) AsymmetricSign(ctx context.Context, req *kmspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AsymmetricSign") if err != nil { return err } @@ -3882,17 +3643,7 @@ func (c *keyManagementRESTClient) AsymmetricDecrypt(ctx context.Context, req *km httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AsymmetricDecrypt") if err != nil { return err } @@ -3950,17 +3701,7 @@ func (c *keyManagementRESTClient) MacSign(ctx context.Context, req *kmspb.MacSig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MacSign") if err != nil { return err } @@ -4019,17 +3760,7 @@ func (c *keyManagementRESTClient) MacVerify(ctx context.Context, req *kmspb.MacV httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MacVerify") if err != nil { return err } @@ -4086,17 +3817,7 @@ func (c *keyManagementRESTClient) GenerateRandomBytes(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateRandomBytes") if err != nil { return err } @@ -4146,17 +3867,7 @@ func (c *keyManagementRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4221,21 +3932,10 @@ func (c *keyManagementRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4302,17 +4002,7 @@ func (c *keyManagementRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4372,17 +4062,7 @@ func (c *keyManagementRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4444,17 +4124,7 @@ func (c *keyManagementRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4504,17 +4174,7 @@ func (c *keyManagementRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/kms/apiv1/key_management_client_example_go123_test.go b/kms/apiv1/key_management_client_example_go123_test.go index e00e8a3fe088..0c3fb85c1784 100644 --- a/kms/apiv1/key_management_client_example_go123_test.go +++ b/kms/apiv1/key_management_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleKeyManagementClient_ListCryptoKeyVersions_all() { } for resp, err := range c.ListCryptoKeyVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleKeyManagementClient_ListCryptoKeys_all() { } for resp, err := range c.ListCryptoKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleKeyManagementClient_ListImportJobs_all() { } for resp, err := range c.ListImportJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleKeyManagementClient_ListKeyRings_all() { } for resp, err := range c.ListKeyRings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleKeyManagementClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/kms/apiv1/kmspb/autokey.pb.go b/kms/apiv1/kmspb/autokey.pb.go index 193704115128..db927847038d 100755 --- a/kms/apiv1/kmspb/autokey.pb.go +++ b/kms/apiv1/kmspb/autokey.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/v1/autokey.proto @@ -62,11 +62,9 @@ type CreateKeyHandleRequest struct { func (x *CreateKeyHandleRequest) Reset() { *x = CreateKeyHandleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyHandleRequest) String() string { @@ -77,7 +75,7 @@ func (*CreateKeyHandleRequest) ProtoMessage() {} func (x *CreateKeyHandleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type GetKeyHandleRequest struct { func (x *GetKeyHandleRequest) Reset() { *x = GetKeyHandleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyHandleRequest) String() string { @@ -142,7 +138,7 @@ func (*GetKeyHandleRequest) ProtoMessage() {} func (x *GetKeyHandleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,11 +192,9 @@ type KeyHandle struct { func (x *KeyHandle) Reset() { *x = KeyHandle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyHandle) String() string { @@ -211,7 +205,7 @@ func (*KeyHandle) ProtoMessage() {} func (x *KeyHandle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +252,9 @@ type CreateKeyHandleMetadata struct { func (x *CreateKeyHandleMetadata) Reset() { *x = CreateKeyHandleMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyHandleMetadata) String() string { @@ -273,7 +265,7 @@ func (*CreateKeyHandleMetadata) ProtoMessage() {} func (x *CreateKeyHandleMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +311,9 @@ type ListKeyHandlesRequest struct { func (x *ListKeyHandlesRequest) Reset() { *x = ListKeyHandlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyHandlesRequest) String() string { @@ -334,7 +324,7 @@ func (*ListKeyHandlesRequest) ProtoMessage() {} func (x *ListKeyHandlesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +384,9 @@ type ListKeyHandlesResponse struct { func (x *ListKeyHandlesResponse) Reset() { *x = ListKeyHandlesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyHandlesResponse) String() string { @@ -409,7 +397,7 @@ func (*ListKeyHandlesResponse) ProtoMessage() {} func (x *ListKeyHandlesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,80 +595,6 @@ func file_google_cloud_kms_v1_autokey_proto_init() { if File_google_cloud_kms_v1_autokey_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_v1_autokey_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyHandleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyHandleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*KeyHandle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyHandleMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyHandlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyHandlesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/kms/apiv1/kmspb/autokey_admin.pb.go b/kms/apiv1/kmspb/autokey_admin.pb.go index 0d612bba5d00..bb1abb0af628 100755 --- a/kms/apiv1/kmspb/autokey_admin.pb.go +++ b/kms/apiv1/kmspb/autokey_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/v1/autokey_admin.proto @@ -118,11 +118,9 @@ type UpdateAutokeyConfigRequest struct { func (x *UpdateAutokeyConfigRequest) Reset() { *x = UpdateAutokeyConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAutokeyConfigRequest) String() string { @@ -133,7 +131,7 @@ func (*UpdateAutokeyConfigRequest) ProtoMessage() {} func (x *UpdateAutokeyConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +174,9 @@ type GetAutokeyConfigRequest struct { func (x *GetAutokeyConfigRequest) Reset() { *x = GetAutokeyConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutokeyConfigRequest) String() string { @@ -191,7 +187,7 @@ func (*GetAutokeyConfigRequest) ProtoMessage() {} func (x *GetAutokeyConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +236,9 @@ type AutokeyConfig struct { func (x *AutokeyConfig) Reset() { *x = AutokeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutokeyConfig) String() string { @@ -255,7 +249,7 @@ func (*AutokeyConfig) ProtoMessage() {} func (x *AutokeyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type ShowEffectiveAutokeyConfigRequest struct { func (x *ShowEffectiveAutokeyConfigRequest) Reset() { *x = ShowEffectiveAutokeyConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShowEffectiveAutokeyConfigRequest) String() string { @@ -321,7 +313,7 @@ func (*ShowEffectiveAutokeyConfigRequest) ProtoMessage() {} func (x *ShowEffectiveAutokeyConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type ShowEffectiveAutokeyConfigResponse struct { func (x *ShowEffectiveAutokeyConfigResponse) Reset() { *x = ShowEffectiveAutokeyConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShowEffectiveAutokeyConfigResponse) String() string { @@ -372,7 +362,7 @@ func (*ShowEffectiveAutokeyConfigResponse) ProtoMessage() {} func (x *ShowEffectiveAutokeyConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,68 +549,6 @@ func file_google_cloud_kms_v1_autokey_admin_proto_init() { if File_google_cloud_kms_v1_autokey_admin_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAutokeyConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAutokeyConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutokeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ShowEffectiveAutokeyConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_autokey_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ShowEffectiveAutokeyConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/kms/apiv1/kmspb/ekm_service.pb.go b/kms/apiv1/kmspb/ekm_service.pb.go index 46c49a52714a..46874e976836 100755 --- a/kms/apiv1/kmspb/ekm_service.pb.go +++ b/kms/apiv1/kmspb/ekm_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/v1/ekm_service.proto @@ -159,11 +159,9 @@ type ListEkmConnectionsRequest struct { func (x *ListEkmConnectionsRequest) Reset() { *x = ListEkmConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEkmConnectionsRequest) String() string { @@ -174,7 +172,7 @@ func (*ListEkmConnectionsRequest) ProtoMessage() {} func (x *ListEkmConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +242,9 @@ type ListEkmConnectionsResponse struct { func (x *ListEkmConnectionsResponse) Reset() { *x = ListEkmConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEkmConnectionsResponse) String() string { @@ -259,7 +255,7 @@ func (*ListEkmConnectionsResponse) ProtoMessage() {} func (x *ListEkmConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +305,9 @@ type GetEkmConnectionRequest struct { func (x *GetEkmConnectionRequest) Reset() { *x = GetEkmConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEkmConnectionRequest) String() string { @@ -324,7 +318,7 @@ func (*GetEkmConnectionRequest) ProtoMessage() {} func (x *GetEkmConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +361,9 @@ type CreateEkmConnectionRequest struct { func (x *CreateEkmConnectionRequest) Reset() { *x = CreateEkmConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEkmConnectionRequest) String() string { @@ -382,7 +374,7 @@ func (*CreateEkmConnectionRequest) ProtoMessage() {} func (x *CreateEkmConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +426,9 @@ type UpdateEkmConnectionRequest struct { func (x *UpdateEkmConnectionRequest) Reset() { *x = UpdateEkmConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEkmConnectionRequest) String() string { @@ -449,7 +439,7 @@ func (*UpdateEkmConnectionRequest) ProtoMessage() {} func (x *UpdateEkmConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +482,9 @@ type GetEkmConfigRequest struct { func (x *GetEkmConfigRequest) Reset() { *x = GetEkmConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEkmConfigRequest) String() string { @@ -507,7 +495,7 @@ func (*GetEkmConfigRequest) ProtoMessage() {} func (x *GetEkmConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +532,9 @@ type UpdateEkmConfigRequest struct { func (x *UpdateEkmConfigRequest) Reset() { *x = UpdateEkmConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEkmConfigRequest) String() string { @@ -559,7 +545,7 @@ func (*UpdateEkmConfigRequest) ProtoMessage() {} func (x *UpdateEkmConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +610,9 @@ type Certificate struct { func (x *Certificate) Reset() { *x = Certificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate) String() string { @@ -639,7 +623,7 @@ func (*Certificate) ProtoMessage() {} func (x *Certificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +745,9 @@ type EkmConnection struct { func (x *EkmConnection) Reset() { *x = EkmConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection) String() string { @@ -776,7 +758,7 @@ func (*EkmConnection) ProtoMessage() {} func (x *EkmConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,11 +839,9 @@ type EkmConfig struct { func (x *EkmConfig) Reset() { *x = EkmConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConfig) String() string { @@ -872,7 +852,7 @@ func (*EkmConfig) ProtoMessage() {} func (x *EkmConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +895,9 @@ type VerifyConnectivityRequest struct { func (x *VerifyConnectivityRequest) Reset() { *x = VerifyConnectivityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyConnectivityRequest) String() string { @@ -930,7 +908,7 @@ func (*VerifyConnectivityRequest) ProtoMessage() {} func (x *VerifyConnectivityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +940,9 @@ type VerifyConnectivityResponse struct { func (x *VerifyConnectivityResponse) Reset() { *x = VerifyConnectivityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyConnectivityResponse) String() string { @@ -977,7 +953,7 @@ func (*VerifyConnectivityResponse) ProtoMessage() {} func (x *VerifyConnectivityResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +997,9 @@ type EkmConnection_ServiceResolver struct { func (x *EkmConnection_ServiceResolver) Reset() { *x = EkmConnection_ServiceResolver{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EkmConnection_ServiceResolver) String() string { @@ -1036,7 +1010,7 @@ func (*EkmConnection_ServiceResolver) ProtoMessage() {} func (x *EkmConnection_ServiceResolver) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_ekm_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1459,164 +1433,6 @@ func file_google_cloud_kms_v1_ekm_service_proto_init() { if File_google_cloud_kms_v1_ekm_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListEkmConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEkmConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetEkmConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateEkmConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEkmConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetEkmConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEkmConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Certificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EkmConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VerifyConnectivityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*VerifyConnectivityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_ekm_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*EkmConnection_ServiceResolver); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/kms/apiv1/kmspb/resources.pb.go b/kms/apiv1/kmspb/resources.pb.go index 4f6121799882..23841a891db8 100755 --- a/kms/apiv1/kmspb/resources.pb.go +++ b/kms/apiv1/kmspb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/v1/resources.proto @@ -957,11 +957,9 @@ type KeyRing struct { func (x *KeyRing) Reset() { *x = KeyRing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyRing) String() string { @@ -972,7 +970,7 @@ func (*KeyRing) ProtoMessage() {} func (x *KeyRing) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,11 +1099,9 @@ type CryptoKey struct { func (x *CryptoKey) Reset() { *x = CryptoKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKey) String() string { @@ -1116,7 +1112,7 @@ func (*CryptoKey) ProtoMessage() {} func (x *CryptoKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1275,11 +1271,9 @@ type CryptoKeyVersionTemplate struct { func (x *CryptoKeyVersionTemplate) Reset() { *x = CryptoKeyVersionTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKeyVersionTemplate) String() string { @@ -1290,7 +1284,7 @@ func (*CryptoKeyVersionTemplate) ProtoMessage() {} func (x *CryptoKeyVersionTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1332,9 @@ type KeyOperationAttestation struct { func (x *KeyOperationAttestation) Reset() { *x = KeyOperationAttestation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyOperationAttestation) String() string { @@ -1353,7 +1345,7 @@ func (*KeyOperationAttestation) ProtoMessage() {} func (x *KeyOperationAttestation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,11 +1474,9 @@ type CryptoKeyVersion struct { func (x *CryptoKeyVersion) Reset() { *x = CryptoKeyVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CryptoKeyVersion) String() string { @@ -1497,7 +1487,7 @@ func (*CryptoKeyVersion) ProtoMessage() {} func (x *CryptoKeyVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1670,11 +1660,9 @@ type PublicKey struct { func (x *PublicKey) Reset() { *x = PublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicKey) String() string { @@ -1685,7 +1673,7 @@ func (*PublicKey) ProtoMessage() {} func (x *PublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1819,11 +1807,9 @@ type ImportJob struct { func (x *ImportJob) Reset() { *x = ImportJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportJob) String() string { @@ -1834,7 +1820,7 @@ func (*ImportJob) ProtoMessage() {} func (x *ImportJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1942,11 +1928,9 @@ type ExternalProtectionLevelOptions struct { func (x *ExternalProtectionLevelOptions) Reset() { *x = ExternalProtectionLevelOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalProtectionLevelOptions) String() string { @@ -1957,7 +1941,7 @@ func (*ExternalProtectionLevelOptions) ProtoMessage() {} func (x *ExternalProtectionLevelOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2006,11 +1990,9 @@ type KeyAccessJustificationsPolicy struct { func (x *KeyAccessJustificationsPolicy) Reset() { *x = KeyAccessJustificationsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyAccessJustificationsPolicy) String() string { @@ -2021,7 +2003,7 @@ func (*KeyAccessJustificationsPolicy) ProtoMessage() {} func (x *KeyAccessJustificationsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2061,11 +2043,9 @@ type KeyOperationAttestation_CertificateChains struct { func (x *KeyOperationAttestation_CertificateChains) Reset() { *x = KeyOperationAttestation_CertificateChains{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyOperationAttestation_CertificateChains) String() string { @@ -2076,7 +2056,7 @@ func (*KeyOperationAttestation_CertificateChains) ProtoMessage() {} func (x *KeyOperationAttestation_CertificateChains) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2130,11 +2110,9 @@ type ImportJob_WrappingPublicKey struct { func (x *ImportJob_WrappingPublicKey) Reset() { *x = ImportJob_WrappingPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportJob_WrappingPublicKey) String() string { @@ -2145,7 +2123,7 @@ func (*ImportJob_WrappingPublicKey) ProtoMessage() {} func (x *ImportJob_WrappingPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2745,140 +2723,6 @@ func file_google_cloud_kms_v1_resources_proto_init() { if File_google_cloud_kms_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KeyRing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKeyVersionTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*KeyOperationAttestation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CryptoKeyVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExternalProtectionLevelOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*KeyAccessJustificationsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*KeyOperationAttestation_CertificateChains); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportJob_WrappingPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_kms_v1_resources_proto_msgTypes[1].OneofWrappers = []any{ (*CryptoKey_RotationPeriod)(nil), } diff --git a/kms/apiv1/kmspb/service.pb.go b/kms/apiv1/kmspb/service.pb.go index d629ee2d21b9..6f4ffdd60acb 100755 --- a/kms/apiv1/kmspb/service.pb.go +++ b/kms/apiv1/kmspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/v1/service.proto @@ -78,11 +78,9 @@ type ListKeyRingsRequest struct { func (x *ListKeyRingsRequest) Reset() { *x = ListKeyRingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyRingsRequest) String() string { @@ -93,7 +91,7 @@ func (*ListKeyRingsRequest) ProtoMessage() {} func (x *ListKeyRingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type ListCryptoKeysRequest struct { func (x *ListCryptoKeysRequest) Reset() { *x = ListCryptoKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeysRequest) String() string { @@ -195,7 +191,7 @@ func (*ListCryptoKeysRequest) ProtoMessage() {} func (x *ListCryptoKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +286,9 @@ type ListCryptoKeyVersionsRequest struct { func (x *ListCryptoKeyVersionsRequest) Reset() { *x = ListCryptoKeyVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeyVersionsRequest) String() string { @@ -305,7 +299,7 @@ func (*ListCryptoKeyVersionsRequest) ProtoMessage() {} func (x *ListCryptoKeyVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +391,9 @@ type ListImportJobsRequest struct { func (x *ListImportJobsRequest) Reset() { *x = ListImportJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportJobsRequest) String() string { @@ -412,7 +404,7 @@ func (*ListImportJobsRequest) ProtoMessage() {} func (x *ListImportJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +474,9 @@ type ListKeyRingsResponse struct { func (x *ListKeyRingsResponse) Reset() { *x = ListKeyRingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeyRingsResponse) String() string { @@ -497,7 +487,7 @@ func (*ListKeyRingsResponse) ProtoMessage() {} func (x *ListKeyRingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +543,9 @@ type ListCryptoKeysResponse struct { func (x *ListCryptoKeysResponse) Reset() { *x = ListCryptoKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeysResponse) String() string { @@ -568,7 +556,7 @@ func (*ListCryptoKeysResponse) ProtoMessage() {} func (x *ListCryptoKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +613,9 @@ type ListCryptoKeyVersionsResponse struct { func (x *ListCryptoKeyVersionsResponse) Reset() { *x = ListCryptoKeyVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeyVersionsResponse) String() string { @@ -640,7 +626,7 @@ func (*ListCryptoKeyVersionsResponse) ProtoMessage() {} func (x *ListCryptoKeyVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +682,9 @@ type ListImportJobsResponse struct { func (x *ListImportJobsResponse) Reset() { *x = ListImportJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportJobsResponse) String() string { @@ -711,7 +695,7 @@ func (*ListImportJobsResponse) ProtoMessage() {} func (x *ListImportJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -761,11 +745,9 @@ type GetKeyRingRequest struct { func (x *GetKeyRingRequest) Reset() { *x = GetKeyRingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyRingRequest) String() string { @@ -776,7 +758,7 @@ func (*GetKeyRingRequest) ProtoMessage() {} func (x *GetKeyRingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -812,11 +794,9 @@ type GetCryptoKeyRequest struct { func (x *GetCryptoKeyRequest) Reset() { *x = GetCryptoKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptoKeyRequest) String() string { @@ -827,7 +807,7 @@ func (*GetCryptoKeyRequest) ProtoMessage() {} func (x *GetCryptoKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +843,9 @@ type GetCryptoKeyVersionRequest struct { func (x *GetCryptoKeyVersionRequest) Reset() { *x = GetCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCryptoKeyVersionRequest) String() string { @@ -878,7 +856,7 @@ func (*GetCryptoKeyVersionRequest) ProtoMessage() {} func (x *GetCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +892,9 @@ type GetPublicKeyRequest struct { func (x *GetPublicKeyRequest) Reset() { *x = GetPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublicKeyRequest) String() string { @@ -929,7 +905,7 @@ func (*GetPublicKeyRequest) ProtoMessage() {} func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,11 +941,9 @@ type GetImportJobRequest struct { func (x *GetImportJobRequest) Reset() { *x = GetImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetImportJobRequest) String() string { @@ -980,7 +954,7 @@ func (*GetImportJobRequest) ProtoMessage() {} func (x *GetImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +997,9 @@ type CreateKeyRingRequest struct { func (x *CreateKeyRingRequest) Reset() { *x = CreateKeyRingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyRingRequest) String() string { @@ -1038,7 +1010,7 @@ func (*CreateKeyRingRequest) ProtoMessage() {} func (x *CreateKeyRingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,11 +1075,9 @@ type CreateCryptoKeyRequest struct { func (x *CreateCryptoKeyRequest) Reset() { *x = CreateCryptoKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCryptoKeyRequest) String() string { @@ -1118,7 +1088,7 @@ func (*CreateCryptoKeyRequest) ProtoMessage() {} func (x *CreateCryptoKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1149,9 @@ type CreateCryptoKeyVersionRequest struct { func (x *CreateCryptoKeyVersionRequest) Reset() { *x = CreateCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCryptoKeyVersionRequest) String() string { @@ -1194,7 +1162,7 @@ func (*CreateCryptoKeyVersionRequest) ProtoMessage() {} func (x *CreateCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1321,11 +1289,9 @@ type ImportCryptoKeyVersionRequest struct { func (x *ImportCryptoKeyVersionRequest) Reset() { *x = ImportCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCryptoKeyVersionRequest) String() string { @@ -1336,7 +1302,7 @@ func (*ImportCryptoKeyVersionRequest) ProtoMessage() {} func (x *ImportCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1402,9 @@ type CreateImportJobRequest struct { func (x *CreateImportJobRequest) Reset() { *x = CreateImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateImportJobRequest) String() string { @@ -1451,7 +1415,7 @@ func (*CreateImportJobRequest) ProtoMessage() {} func (x *CreateImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1466,9 @@ type UpdateCryptoKeyRequest struct { func (x *UpdateCryptoKeyRequest) Reset() { *x = UpdateCryptoKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCryptoKeyRequest) String() string { @@ -1517,7 +1479,7 @@ func (*UpdateCryptoKeyRequest) ProtoMessage() {} func (x *UpdateCryptoKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1562,11 +1524,9 @@ type UpdateCryptoKeyVersionRequest struct { func (x *UpdateCryptoKeyVersionRequest) Reset() { *x = UpdateCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCryptoKeyVersionRequest) String() string { @@ -1577,7 +1537,7 @@ func (*UpdateCryptoKeyVersionRequest) ProtoMessage() {} func (x *UpdateCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1623,11 +1583,9 @@ type UpdateCryptoKeyPrimaryVersionRequest struct { func (x *UpdateCryptoKeyPrimaryVersionRequest) Reset() { *x = UpdateCryptoKeyPrimaryVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCryptoKeyPrimaryVersionRequest) String() string { @@ -1638,7 +1596,7 @@ func (*UpdateCryptoKeyPrimaryVersionRequest) ProtoMessage() {} func (x *UpdateCryptoKeyPrimaryVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1681,11 +1639,9 @@ type DestroyCryptoKeyVersionRequest struct { func (x *DestroyCryptoKeyVersionRequest) Reset() { *x = DestroyCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestroyCryptoKeyVersionRequest) String() string { @@ -1696,7 +1652,7 @@ func (*DestroyCryptoKeyVersionRequest) ProtoMessage() {} func (x *DestroyCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,11 +1688,9 @@ type RestoreCryptoKeyVersionRequest struct { func (x *RestoreCryptoKeyVersionRequest) Reset() { *x = RestoreCryptoKeyVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreCryptoKeyVersionRequest) String() string { @@ -1747,7 +1701,7 @@ func (*RestoreCryptoKeyVersionRequest) ProtoMessage() {} func (x *RestoreCryptoKeyVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1854,11 +1808,9 @@ type EncryptRequest struct { func (x *EncryptRequest) Reset() { *x = EncryptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptRequest) String() string { @@ -1869,7 +1821,7 @@ func (*EncryptRequest) ProtoMessage() {} func (x *EncryptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1932,9 @@ type DecryptRequest struct { func (x *DecryptRequest) Reset() { *x = DecryptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecryptRequest) String() string { @@ -1995,7 +1945,7 @@ func (*DecryptRequest) ProtoMessage() {} func (x *DecryptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2141,11 +2091,9 @@ type RawEncryptRequest struct { func (x *RawEncryptRequest) Reset() { *x = RawEncryptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawEncryptRequest) String() string { @@ -2156,7 +2104,7 @@ func (*RawEncryptRequest) ProtoMessage() {} func (x *RawEncryptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2298,11 +2246,9 @@ type RawDecryptRequest struct { func (x *RawDecryptRequest) Reset() { *x = RawDecryptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawDecryptRequest) String() string { @@ -2313,7 +2259,7 @@ func (*RawDecryptRequest) ProtoMessage() {} func (x *RawDecryptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2452,11 +2398,9 @@ type AsymmetricSignRequest struct { func (x *AsymmetricSignRequest) Reset() { *x = AsymmetricSignRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsymmetricSignRequest) String() string { @@ -2467,7 +2411,7 @@ func (*AsymmetricSignRequest) ProtoMessage() {} func (x *AsymmetricSignRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2556,11 +2500,9 @@ type AsymmetricDecryptRequest struct { func (x *AsymmetricDecryptRequest) Reset() { *x = AsymmetricDecryptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsymmetricDecryptRequest) String() string { @@ -2571,7 +2513,7 @@ func (*AsymmetricDecryptRequest) ProtoMessage() {} func (x *AsymmetricDecryptRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,11 +2585,9 @@ type MacSignRequest struct { func (x *MacSignRequest) Reset() { *x = MacSignRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MacSignRequest) String() string { @@ -2658,7 +2598,7 @@ func (*MacSignRequest) ProtoMessage() {} func (x *MacSignRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2751,11 +2691,9 @@ type MacVerifyRequest struct { func (x *MacVerifyRequest) Reset() { *x = MacVerifyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MacVerifyRequest) String() string { @@ -2766,7 +2704,7 @@ func (*MacVerifyRequest) ProtoMessage() {} func (x *MacVerifyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2838,11 +2776,9 @@ type GenerateRandomBytesRequest struct { func (x *GenerateRandomBytesRequest) Reset() { *x = GenerateRandomBytesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateRandomBytesRequest) String() string { @@ -2853,7 +2789,7 @@ func (*GenerateRandomBytesRequest) ProtoMessage() {} func (x *GenerateRandomBytesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2955,11 +2891,9 @@ type EncryptResponse struct { func (x *EncryptResponse) Reset() { *x = EncryptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptResponse) String() string { @@ -2970,7 +2904,7 @@ func (*EncryptResponse) ProtoMessage() {} func (x *EncryptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3065,11 +2999,9 @@ type DecryptResponse struct { func (x *DecryptResponse) Reset() { *x = DecryptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DecryptResponse) String() string { @@ -3080,7 +3012,7 @@ func (*DecryptResponse) ProtoMessage() {} func (x *DecryptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3219,11 +3151,9 @@ type RawEncryptResponse struct { func (x *RawEncryptResponse) Reset() { *x = RawEncryptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawEncryptResponse) String() string { @@ -3234,7 +3164,7 @@ func (*RawEncryptResponse) ProtoMessage() {} func (x *RawEncryptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3394,11 +3324,9 @@ type RawDecryptResponse struct { func (x *RawDecryptResponse) Reset() { *x = RawDecryptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawDecryptResponse) String() string { @@ -3409,7 +3337,7 @@ func (*RawDecryptResponse) ProtoMessage() {} func (x *RawDecryptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3530,11 +3458,9 @@ type AsymmetricSignResponse struct { func (x *AsymmetricSignResponse) Reset() { *x = AsymmetricSignResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsymmetricSignResponse) String() string { @@ -3545,7 +3471,7 @@ func (*AsymmetricSignResponse) ProtoMessage() {} func (x *AsymmetricSignResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3648,11 +3574,9 @@ type AsymmetricDecryptResponse struct { func (x *AsymmetricDecryptResponse) Reset() { *x = AsymmetricDecryptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsymmetricDecryptResponse) String() string { @@ -3663,7 +3587,7 @@ func (*AsymmetricDecryptResponse) ProtoMessage() {} func (x *AsymmetricDecryptResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3755,11 +3679,9 @@ type MacSignResponse struct { func (x *MacSignResponse) Reset() { *x = MacSignResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MacSignResponse) String() string { @@ -3770,7 +3692,7 @@ func (*MacSignResponse) ProtoMessage() {} func (x *MacSignResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3880,11 +3802,9 @@ type MacVerifyResponse struct { func (x *MacVerifyResponse) Reset() { *x = MacVerifyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MacVerifyResponse) String() string { @@ -3895,7 +3815,7 @@ func (*MacVerifyResponse) ProtoMessage() {} func (x *MacVerifyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3979,11 +3899,9 @@ type GenerateRandomBytesResponse struct { func (x *GenerateRandomBytesResponse) Reset() { *x = GenerateRandomBytesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateRandomBytesResponse) String() string { @@ -3994,7 +3912,7 @@ func (*GenerateRandomBytesResponse) ProtoMessage() {} func (x *GenerateRandomBytesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4041,11 +3959,9 @@ type Digest struct { func (x *Digest) Reset() { *x = Digest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Digest) String() string { @@ -4056,7 +3972,7 @@ func (*Digest) ProtoMessage() {} func (x *Digest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4145,11 +4061,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4160,7 +4074,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5424,524 +5338,6 @@ func file_google_cloud_kms_v1_service_proto_init() { return } file_google_cloud_kms_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyRingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeyVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListImportJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListKeyRingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeyVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListImportJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyRingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetCryptoKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyRingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateCryptoKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCryptoKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCryptoKeyPrimaryVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DestroyCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RestoreCryptoKeyVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*EncryptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DecryptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*RawEncryptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RawDecryptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AsymmetricSignRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AsymmetricDecryptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*MacSignRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*MacVerifyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GenerateRandomBytesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*EncryptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DecryptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*RawEncryptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*RawDecryptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AsymmetricSignResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*AsymmetricDecryptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*MacSignResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*MacVerifyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*GenerateRandomBytesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Digest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_v1_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_kms_v1_service_proto_msgTypes[16].OneofWrappers = []any{ (*ImportCryptoKeyVersionRequest_RsaAesWrappedKey)(nil), } diff --git a/kms/inventory/apiv1/helpers.go b/kms/inventory/apiv1/helpers.go index 27196da5137c..e83cd44311e3 100755 --- a/kms/inventory/apiv1/helpers.go +++ b/kms/inventory/apiv1/helpers.go @@ -18,10 +18,20 @@ package inventory import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "kmsinventory.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/kms/inventory/apiv1/inventorypb/key_dashboard_service.pb.go b/kms/inventory/apiv1/inventorypb/key_dashboard_service.pb.go index a4d7baff9855..4bfbb05bce8c 100755 --- a/kms/inventory/apiv1/inventorypb/key_dashboard_service.pb.go +++ b/kms/inventory/apiv1/inventorypb/key_dashboard_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/inventory/v1/key_dashboard_service.proto @@ -62,11 +62,9 @@ type ListCryptoKeysRequest struct { func (x *ListCryptoKeysRequest) Reset() { *x = ListCryptoKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeysRequest) String() string { @@ -77,7 +75,7 @@ func (*ListCryptoKeysRequest) ProtoMessage() {} func (x *ListCryptoKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type ListCryptoKeysResponse struct { func (x *ListCryptoKeysResponse) Reset() { *x = ListCryptoKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCryptoKeysResponse) String() string { @@ -144,7 +140,7 @@ func (*ListCryptoKeysResponse) ProtoMessage() {} func (x *ListCryptoKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,32 +273,6 @@ func file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_init() { if File_google_cloud_kms_inventory_v1_key_dashboard_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_inventory_v1_key_dashboard_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCryptoKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/kms/inventory/apiv1/inventorypb/key_tracking_service.pb.go b/kms/inventory/apiv1/inventorypb/key_tracking_service.pb.go index 940ec796436d..56295a6a48ef 100755 --- a/kms/inventory/apiv1/inventorypb/key_tracking_service.pb.go +++ b/kms/inventory/apiv1/inventorypb/key_tracking_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/kms/inventory/v1/key_tracking_service.proto @@ -55,11 +55,9 @@ type GetProtectedResourcesSummaryRequest struct { func (x *GetProtectedResourcesSummaryRequest) Reset() { *x = GetProtectedResourcesSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProtectedResourcesSummaryRequest) String() string { @@ -70,7 +68,7 @@ func (*GetProtectedResourcesSummaryRequest) ProtoMessage() {} func (x *GetProtectedResourcesSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type ProtectedResourcesSummary struct { func (x *ProtectedResourcesSummary) Reset() { *x = ProtectedResourcesSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtectedResourcesSummary) String() string { @@ -134,7 +130,7 @@ func (*ProtectedResourcesSummary) ProtoMessage() {} func (x *ProtectedResourcesSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +232,9 @@ type SearchProtectedResourcesRequest struct { func (x *SearchProtectedResourcesRequest) Reset() { *x = SearchProtectedResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProtectedResourcesRequest) String() string { @@ -251,7 +245,7 @@ func (*SearchProtectedResourcesRequest) ProtoMessage() {} func (x *SearchProtectedResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +311,9 @@ type SearchProtectedResourcesResponse struct { func (x *SearchProtectedResourcesResponse) Reset() { *x = SearchProtectedResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProtectedResourcesResponse) String() string { @@ -332,7 +324,7 @@ func (*SearchProtectedResourcesResponse) ProtoMessage() {} func (x *SearchProtectedResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +399,9 @@ type ProtectedResource struct { func (x *ProtectedResource) Reset() { *x = ProtectedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProtectedResource) String() string { @@ -422,7 +412,7 @@ func (*ProtectedResource) ProtoMessage() {} func (x *ProtectedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -762,68 +752,6 @@ func file_google_cloud_kms_inventory_v1_key_tracking_service_proto_init() { if File_google_cloud_kms_inventory_v1_key_tracking_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetProtectedResourcesSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProtectedResourcesSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchProtectedResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchProtectedResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_kms_inventory_v1_key_tracking_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProtectedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/kms/inventory/apiv1/key_dashboard_client.go b/kms/inventory/apiv1/key_dashboard_client.go index d51f34b5cd37..406474eb965e 100755 --- a/kms/inventory/apiv1/key_dashboard_client.go +++ b/kms/inventory/apiv1/key_dashboard_client.go @@ -19,7 +19,7 @@ package inventory import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( kmspb "cloud.google.com/go/kms/apiv1/kmspb" inventorypb "cloud.google.com/go/kms/inventory/apiv1/inventorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -142,6 +141,8 @@ type keyDashboardGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewKeyDashboardClient creates a new key dashboard service client based on gRPC. @@ -168,6 +169,7 @@ func NewKeyDashboardClient(ctx context.Context, opts ...option.ClientOption) (*K connPool: connPool, keyDashboardClient: inventorypb.NewKeyDashboardServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -214,6 +216,8 @@ type keyDashboardRESTClient struct { // Points back to the CallOptions field of the containing KeyDashboardClient CallOptions **KeyDashboardCallOptions + + logger *slog.Logger } // NewKeyDashboardRESTClient creates a new key dashboard service rest client. @@ -231,6 +235,7 @@ func NewKeyDashboardRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -294,7 +299,7 @@ func (c *keyDashboardGRPCClient) ListCryptoKeys(ctx context.Context, req *invent } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyDashboardClient.ListCryptoKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyDashboardClient.ListCryptoKeys, req, settings.GRPC, c.logger, "ListCryptoKeys") return err }, opts...) if err != nil { @@ -367,21 +372,10 @@ func (c *keyDashboardRESTClient) ListCryptoKeys(ctx context.Context, req *invent } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCryptoKeys") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/kms/inventory/apiv1/key_dashboard_client_example_go123_test.go b/kms/inventory/apiv1/key_dashboard_client_example_go123_test.go index 046cae61ec66..63dbe3b18b17 100644 --- a/kms/inventory/apiv1/key_dashboard_client_example_go123_test.go +++ b/kms/inventory/apiv1/key_dashboard_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleKeyDashboardClient_ListCryptoKeys_all() { } for resp, err := range c.ListCryptoKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/kms/inventory/apiv1/key_tracking_client.go b/kms/inventory/apiv1/key_tracking_client.go index 18d7cb3e3731..ebb6fa4e6a73 100755 --- a/kms/inventory/apiv1/key_tracking_client.go +++ b/kms/inventory/apiv1/key_tracking_client.go @@ -19,7 +19,7 @@ package inventory import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( inventorypb "cloud.google.com/go/kms/inventory/apiv1/inventorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -158,6 +157,8 @@ type keyTrackingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewKeyTrackingClient creates a new key tracking service client based on gRPC. @@ -185,6 +186,7 @@ func NewKeyTrackingClient(ctx context.Context, opts ...option.ClientOption) (*Ke connPool: connPool, keyTrackingClient: inventorypb.NewKeyTrackingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -231,6 +233,8 @@ type keyTrackingRESTClient struct { // Points back to the CallOptions field of the containing KeyTrackingClient CallOptions **KeyTrackingCallOptions + + logger *slog.Logger } // NewKeyTrackingRESTClient creates a new key tracking service rest client. @@ -249,6 +253,7 @@ func NewKeyTrackingRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -301,7 +306,7 @@ func (c *keyTrackingGRPCClient) GetProtectedResourcesSummary(ctx context.Context var resp *inventorypb.ProtectedResourcesSummary err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyTrackingClient.GetProtectedResourcesSummary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyTrackingClient.GetProtectedResourcesSummary, req, settings.GRPC, c.logger, "GetProtectedResourcesSummary") return err }, opts...) if err != nil { @@ -330,7 +335,7 @@ func (c *keyTrackingGRPCClient) SearchProtectedResources(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.keyTrackingClient.SearchProtectedResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.keyTrackingClient.SearchProtectedResources, req, settings.GRPC, c.logger, "SearchProtectedResources") return err }, opts...) if err != nil { @@ -393,17 +398,7 @@ func (c *keyTrackingRESTClient) GetProtectedResourcesSummary(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProtectedResourcesSummary") if err != nil { return err } @@ -472,21 +467,10 @@ func (c *keyTrackingRESTClient) SearchProtectedResources(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchProtectedResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/kms/inventory/apiv1/key_tracking_client_example_go123_test.go b/kms/inventory/apiv1/key_tracking_client_example_go123_test.go index 23a856e2cc14..a591d6d1fd08 100644 --- a/kms/inventory/apiv1/key_tracking_client_example_go123_test.go +++ b/kms/inventory/apiv1/key_tracking_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleKeyTrackingClient_SearchProtectedResources_all() { } for resp, err := range c.SearchProtectedResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/language/apiv1/helpers.go b/language/apiv1/helpers.go index e05ff8b84c0e..78257998d03e 100755 --- a/language/apiv1/helpers.go +++ b/language/apiv1/helpers.go @@ -18,10 +18,20 @@ package language import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "language.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/language/apiv1/language_client.go b/language/apiv1/language_client.go index 329f3a1f5a14..adad4b00342c 100755 --- a/language/apiv1/language_client.go +++ b/language/apiv1/language_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( languagepb "cloud.google.com/go/language/apiv1/languagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -336,6 +335,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new language service client based on gRPC. @@ -363,6 +364,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: languagepb.NewLanguageServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -409,6 +411,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new language service rest client. @@ -427,6 +431,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -476,7 +481,7 @@ func (c *gRPCClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy var resp *languagepb.AnalyzeSentimentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeSentiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeSentiment, req, settings.GRPC, c.logger, "AnalyzeSentiment") return err }, opts...) if err != nil { @@ -491,7 +496,7 @@ func (c *gRPCClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz var resp *languagepb.AnalyzeEntitiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeEntities, req, settings.GRPC, c.logger, "AnalyzeEntities") return err }, opts...) if err != nil { @@ -506,7 +511,7 @@ func (c *gRPCClient) AnalyzeEntitySentiment(ctx context.Context, req *languagepb var resp *languagepb.AnalyzeEntitySentimentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeEntitySentiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeEntitySentiment, req, settings.GRPC, c.logger, "AnalyzeEntitySentiment") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *gRPCClient) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeS var resp *languagepb.AnalyzeSyntaxResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeSyntax(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeSyntax, req, settings.GRPC, c.logger, "AnalyzeSyntax") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *gRPCClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT var resp *languagepb.ClassifyTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ClassifyText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ClassifyText, req, settings.GRPC, c.logger, "ClassifyText") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *gRPCClient) ModerateText(ctx context.Context, req *languagepb.ModerateT var resp *languagepb.ModerateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ModerateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ModerateText, req, settings.GRPC, c.logger, "ModerateText") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *gRPCClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT var resp *languagepb.AnnotateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateText, req, settings.GRPC, c.logger, "AnnotateText") return err }, opts...) if err != nil { @@ -611,17 +616,7 @@ func (c *restClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeSentiment") if err != nil { return err } @@ -676,17 +671,7 @@ func (c *restClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeEntities") if err != nil { return err } @@ -742,17 +727,7 @@ func (c *restClient) AnalyzeEntitySentiment(ctx context.Context, req *languagepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeEntitySentiment") if err != nil { return err } @@ -807,17 +782,7 @@ func (c *restClient) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeSyntax") if err != nil { return err } @@ -870,17 +835,7 @@ func (c *restClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClassifyText") if err != nil { return err } @@ -933,17 +888,7 @@ func (c *restClient) ModerateText(ctx context.Context, req *languagepb.ModerateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModerateText") if err != nil { return err } @@ -997,17 +942,7 @@ func (c *restClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateText") if err != nil { return err } diff --git a/language/apiv1/languagepb/language_service.pb.go b/language/apiv1/languagepb/language_service.pb.go index b960e47ea428..5cd25d6e13f8 100755 --- a/language/apiv1/languagepb/language_service.pb.go +++ b/language/apiv1/languagepb/language_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/language/v1/language_service.proto @@ -1628,11 +1628,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -1643,7 +1641,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1729,9 @@ type Sentence struct { func (x *Sentence) Reset() { *x = Sentence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentence) String() string { @@ -1746,7 +1742,7 @@ func (*Sentence) ProtoMessage() {} func (x *Sentence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1812,11 +1808,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -1827,7 +1821,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1896,9 @@ type Token struct { func (x *Token) Reset() { *x = Token{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Token) String() string { @@ -1917,7 +1909,7 @@ func (*Token) ProtoMessage() {} func (x *Token) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,11 +1970,9 @@ type Sentiment struct { func (x *Sentiment) Reset() { *x = Sentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentiment) String() string { @@ -1993,7 +1983,7 @@ func (*Sentiment) ProtoMessage() {} func (x *Sentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,11 +2048,9 @@ type PartOfSpeech struct { func (x *PartOfSpeech) Reset() { *x = PartOfSpeech{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartOfSpeech) String() string { @@ -2073,7 +2061,7 @@ func (*PartOfSpeech) ProtoMessage() {} func (x *PartOfSpeech) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2192,11 +2180,9 @@ type DependencyEdge struct { func (x *DependencyEdge) Reset() { *x = DependencyEdge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DependencyEdge) String() string { @@ -2207,7 +2193,7 @@ func (*DependencyEdge) ProtoMessage() {} func (x *DependencyEdge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2256,11 +2242,9 @@ type EntityMention struct { func (x *EntityMention) Reset() { *x = EntityMention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMention) String() string { @@ -2271,7 +2255,7 @@ func (*EntityMention) ProtoMessage() {} func (x *EntityMention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2324,11 +2308,9 @@ type TextSpan struct { func (x *TextSpan) Reset() { *x = TextSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSpan) String() string { @@ -2339,7 +2321,7 @@ func (*TextSpan) ProtoMessage() {} func (x *TextSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2383,11 +2365,9 @@ type ClassificationCategory struct { func (x *ClassificationCategory) Reset() { *x = ClassificationCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationCategory) String() string { @@ -2398,7 +2378,7 @@ func (*ClassificationCategory) ProtoMessage() {} func (x *ClassificationCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2444,11 +2424,9 @@ type ClassificationModelOptions struct { func (x *ClassificationModelOptions) Reset() { *x = ClassificationModelOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions) String() string { @@ -2459,7 +2437,7 @@ func (*ClassificationModelOptions) ProtoMessage() {} func (x *ClassificationModelOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2530,11 +2508,9 @@ type AnalyzeSentimentRequest struct { func (x *AnalyzeSentimentRequest) Reset() { *x = AnalyzeSentimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentRequest) String() string { @@ -2545,7 +2521,7 @@ func (*AnalyzeSentimentRequest) ProtoMessage() {} func (x *AnalyzeSentimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2593,11 +2569,9 @@ type AnalyzeSentimentResponse struct { func (x *AnalyzeSentimentResponse) Reset() { *x = AnalyzeSentimentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentResponse) String() string { @@ -2608,7 +2582,7 @@ func (*AnalyzeSentimentResponse) ProtoMessage() {} func (x *AnalyzeSentimentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2658,11 +2632,9 @@ type AnalyzeEntitySentimentRequest struct { func (x *AnalyzeEntitySentimentRequest) Reset() { *x = AnalyzeEntitySentimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitySentimentRequest) String() string { @@ -2673,7 +2645,7 @@ func (*AnalyzeEntitySentimentRequest) ProtoMessage() {} func (x *AnalyzeEntitySentimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2719,11 +2691,9 @@ type AnalyzeEntitySentimentResponse struct { func (x *AnalyzeEntitySentimentResponse) Reset() { *x = AnalyzeEntitySentimentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitySentimentResponse) String() string { @@ -2734,7 +2704,7 @@ func (*AnalyzeEntitySentimentResponse) ProtoMessage() {} func (x *AnalyzeEntitySentimentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2777,11 +2747,9 @@ type AnalyzeEntitiesRequest struct { func (x *AnalyzeEntitiesRequest) Reset() { *x = AnalyzeEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesRequest) String() string { @@ -2792,7 +2760,7 @@ func (*AnalyzeEntitiesRequest) ProtoMessage() {} func (x *AnalyzeEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2838,11 +2806,9 @@ type AnalyzeEntitiesResponse struct { func (x *AnalyzeEntitiesResponse) Reset() { *x = AnalyzeEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesResponse) String() string { @@ -2853,7 +2819,7 @@ func (*AnalyzeEntitiesResponse) ProtoMessage() {} func (x *AnalyzeEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2896,11 +2862,9 @@ type AnalyzeSyntaxRequest struct { func (x *AnalyzeSyntaxRequest) Reset() { *x = AnalyzeSyntaxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSyntaxRequest) String() string { @@ -2911,7 +2875,7 @@ func (*AnalyzeSyntaxRequest) ProtoMessage() {} func (x *AnalyzeSyntaxRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2959,11 +2923,9 @@ type AnalyzeSyntaxResponse struct { func (x *AnalyzeSyntaxResponse) Reset() { *x = AnalyzeSyntaxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSyntaxResponse) String() string { @@ -2974,7 +2936,7 @@ func (*AnalyzeSyntaxResponse) ProtoMessage() {} func (x *AnalyzeSyntaxResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,11 +2987,9 @@ type ClassifyTextRequest struct { func (x *ClassifyTextRequest) Reset() { *x = ClassifyTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextRequest) String() string { @@ -3040,7 +3000,7 @@ func (*ClassifyTextRequest) ProtoMessage() {} func (x *ClassifyTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3081,11 +3041,9 @@ type ClassifyTextResponse struct { func (x *ClassifyTextResponse) Reset() { *x = ClassifyTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextResponse) String() string { @@ -3096,7 +3054,7 @@ func (*ClassifyTextResponse) ProtoMessage() {} func (x *ClassifyTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3130,11 +3088,9 @@ type ModerateTextRequest struct { func (x *ModerateTextRequest) Reset() { *x = ModerateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextRequest) String() string { @@ -3145,7 +3101,7 @@ func (*ModerateTextRequest) ProtoMessage() {} func (x *ModerateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3179,11 +3135,9 @@ type ModerateTextResponse struct { func (x *ModerateTextResponse) Reset() { *x = ModerateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextResponse) String() string { @@ -3194,7 +3148,7 @@ func (*ModerateTextResponse) ProtoMessage() {} func (x *ModerateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3233,11 +3187,9 @@ type AnnotateTextRequest struct { func (x *AnnotateTextRequest) Reset() { *x = AnnotateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest) String() string { @@ -3248,7 +3200,7 @@ func (*AnnotateTextRequest) ProtoMessage() {} func (x *AnnotateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3317,11 +3269,9 @@ type AnnotateTextResponse struct { func (x *AnnotateTextResponse) Reset() { *x = AnnotateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextResponse) String() string { @@ -3332,7 +3282,7 @@ func (*AnnotateTextResponse) ProtoMessage() {} func (x *AnnotateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3405,11 +3355,9 @@ type ClassificationModelOptions_V1Model struct { func (x *ClassificationModelOptions_V1Model) Reset() { *x = ClassificationModelOptions_V1Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions_V1Model) String() string { @@ -3420,7 +3368,7 @@ func (*ClassificationModelOptions_V1Model) ProtoMessage() {} func (x *ClassificationModelOptions_V1Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3447,11 +3395,9 @@ type ClassificationModelOptions_V2Model struct { func (x *ClassificationModelOptions_V2Model) Reset() { *x = ClassificationModelOptions_V2Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions_V2Model) String() string { @@ -3462,7 +3408,7 @@ func (*ClassificationModelOptions_V2Model) ProtoMessage() {} func (x *ClassificationModelOptions_V2Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3510,11 +3456,9 @@ type AnnotateTextRequest_Features struct { func (x *AnnotateTextRequest_Features) Reset() { *x = AnnotateTextRequest_Features{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest_Features) String() string { @@ -3525,7 +3469,7 @@ func (*AnnotateTextRequest_Features) ProtoMessage() {} func (x *AnnotateTextRequest_Features) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1_language_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4385,344 +4329,6 @@ func file_google_cloud_language_v1_language_service_proto_init() { if File_google_cloud_language_v1_language_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_language_v1_language_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Sentence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Token); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Sentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PartOfSpeech); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DependencyEdge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EntityMention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitySentimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitySentimentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSyntaxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSyntaxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions_V1Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions_V2Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1_language_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest_Features); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_language_v1_language_service_proto_msgTypes[0].OneofWrappers = []any{ (*Document_Content)(nil), (*Document_GcsContentUri)(nil), diff --git a/language/apiv1beta2/helpers.go b/language/apiv1beta2/helpers.go index e05ff8b84c0e..78257998d03e 100755 --- a/language/apiv1beta2/helpers.go +++ b/language/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package language import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "language.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/language/apiv1beta2/language_client.go b/language/apiv1beta2/language_client.go index bb49002cad69..f3ca0e5134ce 100755 --- a/language/apiv1beta2/language_client.go +++ b/language/apiv1beta2/language_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( languagepb "cloud.google.com/go/language/apiv1beta2/languagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -336,6 +335,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new language service client based on gRPC. @@ -363,6 +364,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: languagepb.NewLanguageServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -409,6 +411,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new language service rest client. @@ -427,6 +431,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -476,7 +481,7 @@ func (c *gRPCClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy var resp *languagepb.AnalyzeSentimentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeSentiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeSentiment, req, settings.GRPC, c.logger, "AnalyzeSentiment") return err }, opts...) if err != nil { @@ -491,7 +496,7 @@ func (c *gRPCClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz var resp *languagepb.AnalyzeEntitiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeEntities, req, settings.GRPC, c.logger, "AnalyzeEntities") return err }, opts...) if err != nil { @@ -506,7 +511,7 @@ func (c *gRPCClient) AnalyzeEntitySentiment(ctx context.Context, req *languagepb var resp *languagepb.AnalyzeEntitySentimentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeEntitySentiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeEntitySentiment, req, settings.GRPC, c.logger, "AnalyzeEntitySentiment") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *gRPCClient) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeS var resp *languagepb.AnalyzeSyntaxResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeSyntax(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeSyntax, req, settings.GRPC, c.logger, "AnalyzeSyntax") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *gRPCClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT var resp *languagepb.ClassifyTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ClassifyText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ClassifyText, req, settings.GRPC, c.logger, "ClassifyText") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *gRPCClient) ModerateText(ctx context.Context, req *languagepb.ModerateT var resp *languagepb.ModerateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ModerateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ModerateText, req, settings.GRPC, c.logger, "ModerateText") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *gRPCClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT var resp *languagepb.AnnotateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateText, req, settings.GRPC, c.logger, "AnnotateText") return err }, opts...) if err != nil { @@ -611,17 +616,7 @@ func (c *restClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeSentiment") if err != nil { return err } @@ -676,17 +671,7 @@ func (c *restClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeEntities") if err != nil { return err } @@ -742,17 +727,7 @@ func (c *restClient) AnalyzeEntitySentiment(ctx context.Context, req *languagepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeEntitySentiment") if err != nil { return err } @@ -807,17 +782,7 @@ func (c *restClient) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeSyntax") if err != nil { return err } @@ -870,17 +835,7 @@ func (c *restClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClassifyText") if err != nil { return err } @@ -933,17 +888,7 @@ func (c *restClient) ModerateText(ctx context.Context, req *languagepb.ModerateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModerateText") if err != nil { return err } @@ -997,17 +942,7 @@ func (c *restClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateText") if err != nil { return err } diff --git a/language/apiv1beta2/languagepb/language_service.pb.go b/language/apiv1beta2/languagepb/language_service.pb.go index a2fe78657301..bb879eb2d1ae 100755 --- a/language/apiv1beta2/languagepb/language_service.pb.go +++ b/language/apiv1beta2/languagepb/language_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/language/v1beta2/language_service.proto @@ -1689,11 +1689,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -1704,7 +1702,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1804,9 @@ type Sentence struct { func (x *Sentence) Reset() { *x = Sentence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentence) String() string { @@ -1821,7 +1817,7 @@ func (*Sentence) ProtoMessage() {} func (x *Sentence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,11 +1883,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -1902,7 +1896,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1977,11 +1971,9 @@ type Token struct { func (x *Token) Reset() { *x = Token{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Token) String() string { @@ -1992,7 +1984,7 @@ func (*Token) ProtoMessage() {} func (x *Token) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2046,9 @@ type Sentiment struct { func (x *Sentiment) Reset() { *x = Sentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentiment) String() string { @@ -2069,7 +2059,7 @@ func (*Sentiment) ProtoMessage() {} func (x *Sentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2132,11 +2122,9 @@ type PartOfSpeech struct { func (x *PartOfSpeech) Reset() { *x = PartOfSpeech{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartOfSpeech) String() string { @@ -2147,7 +2135,7 @@ func (*PartOfSpeech) ProtoMessage() {} func (x *PartOfSpeech) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2252,9 @@ type DependencyEdge struct { func (x *DependencyEdge) Reset() { *x = DependencyEdge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DependencyEdge) String() string { @@ -2279,7 +2265,7 @@ func (*DependencyEdge) ProtoMessage() {} func (x *DependencyEdge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2314,9 @@ type EntityMention struct { func (x *EntityMention) Reset() { *x = EntityMention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMention) String() string { @@ -2343,7 +2327,7 @@ func (*EntityMention) ProtoMessage() {} func (x *EntityMention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2396,11 +2380,9 @@ type TextSpan struct { func (x *TextSpan) Reset() { *x = TextSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSpan) String() string { @@ -2411,7 +2393,7 @@ func (*TextSpan) ProtoMessage() {} func (x *TextSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2437,9 @@ type ClassificationCategory struct { func (x *ClassificationCategory) Reset() { *x = ClassificationCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationCategory) String() string { @@ -2470,7 +2450,7 @@ func (*ClassificationCategory) ProtoMessage() {} func (x *ClassificationCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,11 +2496,9 @@ type ClassificationModelOptions struct { func (x *ClassificationModelOptions) Reset() { *x = ClassificationModelOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions) String() string { @@ -2531,7 +2509,7 @@ func (*ClassificationModelOptions) ProtoMessage() {} func (x *ClassificationModelOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2603,11 +2581,9 @@ type AnalyzeSentimentRequest struct { func (x *AnalyzeSentimentRequest) Reset() { *x = AnalyzeSentimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentRequest) String() string { @@ -2618,7 +2594,7 @@ func (*AnalyzeSentimentRequest) ProtoMessage() {} func (x *AnalyzeSentimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2666,11 +2642,9 @@ type AnalyzeSentimentResponse struct { func (x *AnalyzeSentimentResponse) Reset() { *x = AnalyzeSentimentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentResponse) String() string { @@ -2681,7 +2655,7 @@ func (*AnalyzeSentimentResponse) ProtoMessage() {} func (x *AnalyzeSentimentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2731,11 +2705,9 @@ type AnalyzeEntitySentimentRequest struct { func (x *AnalyzeEntitySentimentRequest) Reset() { *x = AnalyzeEntitySentimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitySentimentRequest) String() string { @@ -2746,7 +2718,7 @@ func (*AnalyzeEntitySentimentRequest) ProtoMessage() {} func (x *AnalyzeEntitySentimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2792,11 +2764,9 @@ type AnalyzeEntitySentimentResponse struct { func (x *AnalyzeEntitySentimentResponse) Reset() { *x = AnalyzeEntitySentimentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitySentimentResponse) String() string { @@ -2807,7 +2777,7 @@ func (*AnalyzeEntitySentimentResponse) ProtoMessage() {} func (x *AnalyzeEntitySentimentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2820,9 @@ type AnalyzeEntitiesRequest struct { func (x *AnalyzeEntitiesRequest) Reset() { *x = AnalyzeEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesRequest) String() string { @@ -2865,7 +2833,7 @@ func (*AnalyzeEntitiesRequest) ProtoMessage() {} func (x *AnalyzeEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2911,11 +2879,9 @@ type AnalyzeEntitiesResponse struct { func (x *AnalyzeEntitiesResponse) Reset() { *x = AnalyzeEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesResponse) String() string { @@ -2926,7 +2892,7 @@ func (*AnalyzeEntitiesResponse) ProtoMessage() {} func (x *AnalyzeEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,11 +2935,9 @@ type AnalyzeSyntaxRequest struct { func (x *AnalyzeSyntaxRequest) Reset() { *x = AnalyzeSyntaxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSyntaxRequest) String() string { @@ -2984,7 +2948,7 @@ func (*AnalyzeSyntaxRequest) ProtoMessage() {} func (x *AnalyzeSyntaxRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3032,11 +2996,9 @@ type AnalyzeSyntaxResponse struct { func (x *AnalyzeSyntaxResponse) Reset() { *x = AnalyzeSyntaxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSyntaxResponse) String() string { @@ -3047,7 +3009,7 @@ func (*AnalyzeSyntaxResponse) ProtoMessage() {} func (x *AnalyzeSyntaxResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3098,11 +3060,9 @@ type ClassifyTextRequest struct { func (x *ClassifyTextRequest) Reset() { *x = ClassifyTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextRequest) String() string { @@ -3113,7 +3073,7 @@ func (*ClassifyTextRequest) ProtoMessage() {} func (x *ClassifyTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3154,11 +3114,9 @@ type ClassifyTextResponse struct { func (x *ClassifyTextResponse) Reset() { *x = ClassifyTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextResponse) String() string { @@ -3169,7 +3127,7 @@ func (*ClassifyTextResponse) ProtoMessage() {} func (x *ClassifyTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3203,11 +3161,9 @@ type ModerateTextRequest struct { func (x *ModerateTextRequest) Reset() { *x = ModerateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextRequest) String() string { @@ -3218,7 +3174,7 @@ func (*ModerateTextRequest) ProtoMessage() {} func (x *ModerateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3252,11 +3208,9 @@ type ModerateTextResponse struct { func (x *ModerateTextResponse) Reset() { *x = ModerateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextResponse) String() string { @@ -3267,7 +3221,7 @@ func (*ModerateTextResponse) ProtoMessage() {} func (x *ModerateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3306,11 +3260,9 @@ type AnnotateTextRequest struct { func (x *AnnotateTextRequest) Reset() { *x = AnnotateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest) String() string { @@ -3321,7 +3273,7 @@ func (*AnnotateTextRequest) ProtoMessage() {} func (x *AnnotateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3390,11 +3342,9 @@ type AnnotateTextResponse struct { func (x *AnnotateTextResponse) Reset() { *x = AnnotateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextResponse) String() string { @@ -3405,7 +3355,7 @@ func (*AnnotateTextResponse) ProtoMessage() {} func (x *AnnotateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3478,11 +3428,9 @@ type ClassificationModelOptions_V1Model struct { func (x *ClassificationModelOptions_V1Model) Reset() { *x = ClassificationModelOptions_V1Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions_V1Model) String() string { @@ -3493,7 +3441,7 @@ func (*ClassificationModelOptions_V1Model) ProtoMessage() {} func (x *ClassificationModelOptions_V1Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3520,11 +3468,9 @@ type ClassificationModelOptions_V2Model struct { func (x *ClassificationModelOptions_V2Model) Reset() { *x = ClassificationModelOptions_V2Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationModelOptions_V2Model) String() string { @@ -3535,7 +3481,7 @@ func (*ClassificationModelOptions_V2Model) ProtoMessage() {} func (x *ClassificationModelOptions_V2Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3587,11 +3533,9 @@ type AnnotateTextRequest_Features struct { func (x *AnnotateTextRequest_Features) Reset() { *x = AnnotateTextRequest_Features{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest_Features) String() string { @@ -3602,7 +3546,7 @@ func (*AnnotateTextRequest_Features) ProtoMessage() {} func (x *AnnotateTextRequest_Features) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v1beta2_language_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4506,344 +4450,6 @@ func file_google_cloud_language_v1beta2_language_service_proto_init() { if File_google_cloud_language_v1beta2_language_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Sentence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Token); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Sentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PartOfSpeech); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DependencyEdge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EntityMention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitySentimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitySentimentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSyntaxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSyntaxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions_V1Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationModelOptions_V2Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v1beta2_language_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest_Features); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_language_v1beta2_language_service_proto_msgTypes[0].OneofWrappers = []any{ (*Document_Content)(nil), (*Document_GcsContentUri)(nil), diff --git a/language/apiv2/helpers.go b/language/apiv2/helpers.go index e05ff8b84c0e..78257998d03e 100755 --- a/language/apiv2/helpers.go +++ b/language/apiv2/helpers.go @@ -18,10 +18,20 @@ package language import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "language.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/language/apiv2/language_client.go b/language/apiv2/language_client.go index 7bf0cd8a9ef4..9f811e8994bc 100755 --- a/language/apiv2/language_client.go +++ b/language/apiv2/language_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( languagepb "cloud.google.com/go/language/apiv2/languagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -289,6 +288,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new language service client based on gRPC. @@ -316,6 +317,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: languagepb.NewLanguageServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -362,6 +364,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new language service rest client. @@ -380,6 +384,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -429,7 +434,7 @@ func (c *gRPCClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy var resp *languagepb.AnalyzeSentimentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeSentiment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeSentiment, req, settings.GRPC, c.logger, "AnalyzeSentiment") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *gRPCClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz var resp *languagepb.AnalyzeEntitiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnalyzeEntities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnalyzeEntities, req, settings.GRPC, c.logger, "AnalyzeEntities") return err }, opts...) if err != nil { @@ -459,7 +464,7 @@ func (c *gRPCClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT var resp *languagepb.ClassifyTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ClassifyText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ClassifyText, req, settings.GRPC, c.logger, "ClassifyText") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *gRPCClient) ModerateText(ctx context.Context, req *languagepb.ModerateT var resp *languagepb.ModerateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ModerateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ModerateText, req, settings.GRPC, c.logger, "ModerateText") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *gRPCClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT var resp *languagepb.AnnotateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateText, req, settings.GRPC, c.logger, "AnnotateText") return err }, opts...) if err != nil { @@ -534,17 +539,7 @@ func (c *restClient) AnalyzeSentiment(ctx context.Context, req *languagepb.Analy httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeSentiment") if err != nil { return err } @@ -599,17 +594,7 @@ func (c *restClient) AnalyzeEntities(ctx context.Context, req *languagepb.Analyz httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeEntities") if err != nil { return err } @@ -662,17 +647,7 @@ func (c *restClient) ClassifyText(ctx context.Context, req *languagepb.ClassifyT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClassifyText") if err != nil { return err } @@ -725,17 +700,7 @@ func (c *restClient) ModerateText(ctx context.Context, req *languagepb.ModerateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModerateText") if err != nil { return err } @@ -788,17 +753,7 @@ func (c *restClient) AnnotateText(ctx context.Context, req *languagepb.AnnotateT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateText") if err != nil { return err } diff --git a/language/apiv2/languagepb/language_service.pb.go b/language/apiv2/languagepb/language_service.pb.go index 615661ae1244..7653aa117366 100755 --- a/language/apiv2/languagepb/language_service.pb.go +++ b/language/apiv2/languagepb/language_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/language/v2/language_service.proto @@ -430,11 +430,9 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Document) String() string { @@ -445,7 +443,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +531,9 @@ type Sentence struct { func (x *Sentence) Reset() { *x = Sentence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentence) String() string { @@ -548,7 +544,7 @@ func (*Sentence) ProtoMessage() {} func (x *Sentence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +602,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -621,7 +615,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +683,9 @@ type Sentiment struct { func (x *Sentiment) Reset() { *x = Sentiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sentiment) String() string { @@ -704,7 +696,7 @@ func (*Sentiment) ProtoMessage() {} func (x *Sentiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +750,9 @@ type EntityMention struct { func (x *EntityMention) Reset() { *x = EntityMention{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityMention) String() string { @@ -773,7 +763,7 @@ func (*EntityMention) ProtoMessage() {} func (x *EntityMention) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +823,9 @@ type TextSpan struct { func (x *TextSpan) Reset() { *x = TextSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSpan) String() string { @@ -848,7 +836,7 @@ func (*TextSpan) ProtoMessage() {} func (x *TextSpan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +884,9 @@ type ClassificationCategory struct { func (x *ClassificationCategory) Reset() { *x = ClassificationCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationCategory) String() string { @@ -911,7 +897,7 @@ func (*ClassificationCategory) ProtoMessage() {} func (x *ClassificationCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +947,9 @@ type AnalyzeSentimentRequest struct { func (x *AnalyzeSentimentRequest) Reset() { *x = AnalyzeSentimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentRequest) String() string { @@ -976,7 +960,7 @@ func (*AnalyzeSentimentRequest) ProtoMessage() {} func (x *AnalyzeSentimentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1027,11 +1011,9 @@ type AnalyzeSentimentResponse struct { func (x *AnalyzeSentimentResponse) Reset() { *x = AnalyzeSentimentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeSentimentResponse) String() string { @@ -1042,7 +1024,7 @@ func (*AnalyzeSentimentResponse) ProtoMessage() {} func (x *AnalyzeSentimentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1081,9 @@ type AnalyzeEntitiesRequest struct { func (x *AnalyzeEntitiesRequest) Reset() { *x = AnalyzeEntitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesRequest) String() string { @@ -1114,7 +1094,7 @@ func (*AnalyzeEntitiesRequest) ProtoMessage() {} func (x *AnalyzeEntitiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1163,11 +1143,9 @@ type AnalyzeEntitiesResponse struct { func (x *AnalyzeEntitiesResponse) Reset() { *x = AnalyzeEntitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeEntitiesResponse) String() string { @@ -1178,7 +1156,7 @@ func (*AnalyzeEntitiesResponse) ProtoMessage() {} func (x *AnalyzeEntitiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1226,11 +1204,9 @@ type ClassifyTextRequest struct { func (x *ClassifyTextRequest) Reset() { *x = ClassifyTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextRequest) String() string { @@ -1241,7 +1217,7 @@ func (*ClassifyTextRequest) ProtoMessage() {} func (x *ClassifyTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1283,11 +1259,9 @@ type ClassifyTextResponse struct { func (x *ClassifyTextResponse) Reset() { *x = ClassifyTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassifyTextResponse) String() string { @@ -1298,7 +1272,7 @@ func (*ClassifyTextResponse) ProtoMessage() {} func (x *ClassifyTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1348,11 +1322,9 @@ type ModerateTextRequest struct { func (x *ModerateTextRequest) Reset() { *x = ModerateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextRequest) String() string { @@ -1363,7 +1335,7 @@ func (*ModerateTextRequest) ProtoMessage() {} func (x *ModerateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1384,9 @@ type ModerateTextResponse struct { func (x *ModerateTextResponse) Reset() { *x = ModerateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModerateTextResponse) String() string { @@ -1427,7 +1397,7 @@ func (*ModerateTextResponse) ProtoMessage() {} func (x *ModerateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,11 +1450,9 @@ type AnnotateTextRequest struct { func (x *AnnotateTextRequest) Reset() { *x = AnnotateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest) String() string { @@ -1495,7 +1463,7 @@ func (*AnnotateTextRequest) ProtoMessage() {} func (x *AnnotateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1533,9 @@ type AnnotateTextResponse struct { func (x *AnnotateTextResponse) Reset() { *x = AnnotateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextResponse) String() string { @@ -1580,7 +1546,7 @@ func (*AnnotateTextResponse) ProtoMessage() {} func (x *AnnotateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1663,11 +1629,9 @@ type AnnotateTextRequest_Features struct { func (x *AnnotateTextRequest_Features) Reset() { *x = AnnotateTextRequest_Features{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateTextRequest_Features) String() string { @@ -1678,7 +1642,7 @@ func (*AnnotateTextRequest_Features) ProtoMessage() {} func (x *AnnotateTextRequest_Features) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_language_v2_language_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2159,224 +2123,6 @@ func file_google_cloud_language_v2_language_service_proto_init() { if File_google_cloud_language_v2_language_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_language_v2_language_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Sentence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Sentiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EntityMention); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TextSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeSentimentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeEntitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ClassifyTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ModerateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_language_v2_language_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateTextRequest_Features); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_language_v2_language_service_proto_msgTypes[0].OneofWrappers = []any{ (*Document_Content)(nil), (*Document_GcsContentUri)(nil), diff --git a/lifesciences/apiv2beta/helpers.go b/lifesciences/apiv2beta/helpers.go index 979c161ed80d..45323970a95e 100755 --- a/lifesciences/apiv2beta/helpers.go +++ b/lifesciences/apiv2beta/helpers.go @@ -18,10 +18,20 @@ package lifesciences import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "lifesciences.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/lifesciences/apiv2beta/lifesciencespb/workflows.pb.go b/lifesciences/apiv2beta/lifesciencespb/workflows.pb.go index 48f763b2f68e..b3c63f5ac6e0 100755 --- a/lifesciences/apiv2beta/lifesciencespb/workflows.pb.go +++ b/lifesciences/apiv2beta/lifesciencespb/workflows.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/lifesciences/v2beta/workflows.proto @@ -72,11 +72,9 @@ type RunPipelineRequest struct { func (x *RunPipelineRequest) Reset() { *x = RunPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunPipelineRequest) String() string { @@ -87,7 +85,7 @@ func (*RunPipelineRequest) ProtoMessage() {} func (x *RunPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type RunPipelineResponse struct { func (x *RunPipelineResponse) Reset() { *x = RunPipelineResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunPipelineResponse) String() string { @@ -155,7 +151,7 @@ func (*RunPipelineResponse) ProtoMessage() {} func (x *RunPipelineResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +199,9 @@ type Pipeline struct { func (x *Pipeline) Reset() { *x = Pipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline) String() string { @@ -218,7 +212,7 @@ func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +415,9 @@ type Action struct { func (x *Action) Reset() { *x = Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Action) String() string { @@ -436,7 +428,7 @@ func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +601,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -624,7 +614,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +659,9 @@ type Mount struct { func (x *Mount) Reset() { *x = Mount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mount) String() string { @@ -684,7 +672,7 @@ func (*Mount) ProtoMessage() {} func (x *Mount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +728,9 @@ type Resources struct { func (x *Resources) Reset() { *x = Resources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resources) String() string { @@ -755,7 +741,7 @@ func (*Resources) ProtoMessage() {} func (x *Resources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +872,9 @@ type VirtualMachine struct { func (x *VirtualMachine) Reset() { *x = VirtualMachine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualMachine) String() string { @@ -901,7 +885,7 @@ func (*VirtualMachine) ProtoMessage() {} func (x *VirtualMachine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1022,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -1053,7 +1035,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,11 +1085,9 @@ type Accelerator struct { func (x *Accelerator) Reset() { *x = Accelerator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Accelerator) String() string { @@ -1118,7 +1098,7 @@ func (*Accelerator) ProtoMessage() {} func (x *Accelerator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1160,9 @@ type Network struct { func (x *Network) Reset() { *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Network) String() string { @@ -1195,7 +1173,7 @@ func (*Network) ProtoMessage() {} func (x *Network) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1241,9 @@ type Disk struct { func (x *Disk) Reset() { *x = Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Disk) String() string { @@ -1278,7 +1254,7 @@ func (*Disk) ProtoMessage() {} func (x *Disk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1321,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -1360,7 +1334,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1460,11 +1434,9 @@ type PersistentDisk struct { func (x *PersistentDisk) Reset() { *x = PersistentDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistentDisk) String() string { @@ -1475,7 +1447,7 @@ func (*PersistentDisk) ProtoMessage() {} func (x *PersistentDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1532,11 +1504,9 @@ type ExistingDisk struct { func (x *ExistingDisk) Reset() { *x = ExistingDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExistingDisk) String() string { @@ -1547,7 +1517,7 @@ func (*ExistingDisk) ProtoMessage() {} func (x *ExistingDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1581,11 +1551,9 @@ type NFSMount struct { func (x *NFSMount) Reset() { *x = NFSMount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NFSMount) String() string { @@ -1596,7 +1564,7 @@ func (*NFSMount) ProtoMessage() {} func (x *NFSMount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1645,11 +1613,9 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metadata) String() string { @@ -1660,7 +1626,7 @@ func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1721,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -1770,7 +1734,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1944,9 @@ type DelayedEvent struct { func (x *DelayedEvent) Reset() { *x = DelayedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DelayedEvent) String() string { @@ -1995,7 +1957,7 @@ func (*DelayedEvent) ProtoMessage() {} func (x *DelayedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2003,9 @@ type WorkerAssignedEvent struct { func (x *WorkerAssignedEvent) Reset() { *x = WorkerAssignedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerAssignedEvent) String() string { @@ -2056,7 +2016,7 @@ func (*WorkerAssignedEvent) ProtoMessage() {} func (x *WorkerAssignedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2107,11 +2067,9 @@ type WorkerReleasedEvent struct { func (x *WorkerReleasedEvent) Reset() { *x = WorkerReleasedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkerReleasedEvent) String() string { @@ -2122,7 +2080,7 @@ func (*WorkerReleasedEvent) ProtoMessage() {} func (x *WorkerReleasedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2163,11 +2121,9 @@ type PullStartedEvent struct { func (x *PullStartedEvent) Reset() { *x = PullStartedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullStartedEvent) String() string { @@ -2178,7 +2134,7 @@ func (*PullStartedEvent) ProtoMessage() {} func (x *PullStartedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2212,11 +2168,9 @@ type PullStoppedEvent struct { func (x *PullStoppedEvent) Reset() { *x = PullStoppedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullStoppedEvent) String() string { @@ -2227,7 +2181,7 @@ func (*PullStoppedEvent) ProtoMessage() {} func (x *PullStoppedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2270,11 +2224,9 @@ type ContainerStartedEvent struct { func (x *ContainerStartedEvent) Reset() { *x = ContainerStartedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerStartedEvent) String() string { @@ -2285,7 +2237,7 @@ func (*ContainerStartedEvent) ProtoMessage() {} func (x *ContainerStartedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2344,11 +2296,9 @@ type ContainerStoppedEvent struct { func (x *ContainerStoppedEvent) Reset() { *x = ContainerStoppedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerStoppedEvent) String() string { @@ -2359,7 +2309,7 @@ func (*ContainerStoppedEvent) ProtoMessage() {} func (x *ContainerStoppedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2412,11 +2362,9 @@ type UnexpectedExitStatusEvent struct { func (x *UnexpectedExitStatusEvent) Reset() { *x = UnexpectedExitStatusEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnexpectedExitStatusEvent) String() string { @@ -2427,7 +2375,7 @@ func (*UnexpectedExitStatusEvent) ProtoMessage() {} func (x *UnexpectedExitStatusEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2470,11 +2418,9 @@ type ContainerKilledEvent struct { func (x *ContainerKilledEvent) Reset() { *x = ContainerKilledEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerKilledEvent) String() string { @@ -2485,7 +2431,7 @@ func (*ContainerKilledEvent) ProtoMessage() {} func (x *ContainerKilledEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2522,11 +2468,9 @@ type FailedEvent struct { func (x *FailedEvent) Reset() { *x = FailedEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailedEvent) String() string { @@ -2537,7 +2481,7 @@ func (*FailedEvent) ProtoMessage() {} func (x *FailedEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3153,344 +3097,6 @@ func file_google_cloud_lifesciences_v2beta_workflows_proto_init() { if File_google_cloud_lifesciences_v2beta_workflows_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RunPipelineResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Pipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Mount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Resources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VirtualMachine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Accelerator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PersistentDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExistingDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*NFSMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DelayedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*WorkerAssignedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*WorkerReleasedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PullStartedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PullStoppedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ContainerStartedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ContainerStoppedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UnexpectedExitStatusEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ContainerKilledEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*FailedEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_lifesciences_v2beta_workflows_proto_msgTypes[12].OneofWrappers = []any{ (*Volume_PersistentDisk)(nil), (*Volume_ExistingDisk)(nil), diff --git a/lifesciences/apiv2beta/workflows_service_v2_beta_client.go b/lifesciences/apiv2beta/workflows_service_v2_beta_client.go index 7664b34d66c4..fbcf89f4e642 100755 --- a/lifesciences/apiv2beta/workflows_service_v2_beta_client.go +++ b/lifesciences/apiv2beta/workflows_service_v2_beta_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( lroauto "cloud.google.com/go/longrunning/autogen" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -247,6 +246,8 @@ type workflowsServiceV2BetaGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWorkflowsServiceV2BetaClient creates a new workflows service v2 beta client based on gRPC. @@ -274,6 +275,7 @@ func NewWorkflowsServiceV2BetaClient(ctx context.Context, opts ...option.ClientO connPool: connPool, workflowsServiceV2BetaClient: lifesciencespb.NewWorkflowsServiceV2BetaClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -338,6 +340,8 @@ type workflowsServiceV2BetaRESTClient struct { // Points back to the CallOptions field of the containing WorkflowsServiceV2BetaClient CallOptions **WorkflowsServiceV2BetaCallOptions + + logger *slog.Logger } // NewWorkflowsServiceV2BetaRESTClient creates a new workflows service v2 beta rest client. @@ -356,6 +360,7 @@ func NewWorkflowsServiceV2BetaRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -418,7 +423,7 @@ func (c *workflowsServiceV2BetaGRPCClient) RunPipeline(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.workflowsServiceV2BetaClient.RunPipeline(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.workflowsServiceV2BetaClient.RunPipeline, req, settings.GRPC, c.logger, "RunPipeline") return err }, opts...) if err != nil { @@ -438,7 +443,7 @@ func (c *workflowsServiceV2BetaGRPCClient) GetLocation(ctx context.Context, req var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *workflowsServiceV2BetaGRPCClient) ListLocations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -501,7 +506,7 @@ func (c *workflowsServiceV2BetaGRPCClient) CancelOperation(ctx context.Context, opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -516,7 +521,7 @@ func (c *workflowsServiceV2BetaGRPCClient) GetOperation(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *workflowsServiceV2BetaGRPCClient) ListOperations(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -625,21 +630,10 @@ func (c *workflowsServiceV2BetaRESTClient) RunPipeline(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunPipeline") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -690,17 +684,7 @@ func (c *workflowsServiceV2BetaRESTClient) GetLocation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -765,21 +749,10 @@ func (c *workflowsServiceV2BetaRESTClient) ListLocations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -855,15 +828,8 @@ func (c *workflowsServiceV2BetaRESTClient) CancelOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -906,17 +872,7 @@ func (c *workflowsServiceV2BetaRESTClient) GetOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -985,21 +941,10 @@ func (c *workflowsServiceV2BetaRESTClient) ListOperations(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/lifesciences/apiv2beta/workflows_service_v2_beta_client_example_go123_test.go b/lifesciences/apiv2beta/workflows_service_v2_beta_client_example_go123_test.go index 2d66f72bcbe2..79972e28fe29 100644 --- a/lifesciences/apiv2beta/workflows_service_v2_beta_client_example_go123_test.go +++ b/lifesciences/apiv2beta/workflows_service_v2_beta_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleWorkflowsServiceV2BetaClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleWorkflowsServiceV2BetaClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/logging/apiv2/config_client.go b/logging/apiv2/config_client.go index 7c347f7aaf89..2f9fc4a631ba 100755 --- a/logging/apiv2/config_client.go +++ b/logging/apiv2/config_client.go @@ -19,6 +19,7 @@ package logging import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -631,6 +632,8 @@ type configGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConfigClient creates a new config service v2 client based on gRPC. @@ -657,6 +660,7 @@ func NewConfigClient(ctx context.Context, opts ...option.ClientOption) (*ConfigC connPool: connPool, configClient: loggingpb.NewConfigServiceV2Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -722,7 +726,7 @@ func (c *configGRPCClient) ListBuckets(ctx context.Context, req *loggingpb.ListB } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.ListBuckets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.ListBuckets, req, settings.GRPC, c.logger, "ListBuckets") return err }, opts...) if err != nil { @@ -757,7 +761,7 @@ func (c *configGRPCClient) GetBucket(ctx context.Context, req *loggingpb.GetBuck var resp *loggingpb.LogBucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetBucket, req, settings.GRPC, c.logger, "GetBucket") return err }, opts...) if err != nil { @@ -775,7 +779,7 @@ func (c *configGRPCClient) CreateBucketAsync(ctx context.Context, req *loggingpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateBucketAsync(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateBucketAsync, req, settings.GRPC, c.logger, "CreateBucketAsync") return err }, opts...) if err != nil { @@ -795,7 +799,7 @@ func (c *configGRPCClient) UpdateBucketAsync(ctx context.Context, req *loggingpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateBucketAsync(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateBucketAsync, req, settings.GRPC, c.logger, "UpdateBucketAsync") return err }, opts...) if err != nil { @@ -815,7 +819,7 @@ func (c *configGRPCClient) CreateBucket(ctx context.Context, req *loggingpb.Crea var resp *loggingpb.LogBucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateBucket, req, settings.GRPC, c.logger, "CreateBucket") return err }, opts...) if err != nil { @@ -833,7 +837,7 @@ func (c *configGRPCClient) UpdateBucket(ctx context.Context, req *loggingpb.Upda var resp *loggingpb.LogBucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateBucket, req, settings.GRPC, c.logger, "UpdateBucket") return err }, opts...) if err != nil { @@ -850,7 +854,7 @@ func (c *configGRPCClient) DeleteBucket(ctx context.Context, req *loggingpb.Dele opts = append((*c.CallOptions).DeleteBucket[0:len((*c.CallOptions).DeleteBucket):len((*c.CallOptions).DeleteBucket)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.configClient.DeleteBucket(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.configClient.DeleteBucket, req, settings.GRPC, c.logger, "DeleteBucket") return err }, opts...) return err @@ -864,7 +868,7 @@ func (c *configGRPCClient) UndeleteBucket(ctx context.Context, req *loggingpb.Un opts = append((*c.CallOptions).UndeleteBucket[0:len((*c.CallOptions).UndeleteBucket):len((*c.CallOptions).UndeleteBucket)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.configClient.UndeleteBucket(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.configClient.UndeleteBucket, req, settings.GRPC, c.logger, "UndeleteBucket") return err }, opts...) return err @@ -890,7 +894,7 @@ func (c *configGRPCClient) ListViews(ctx context.Context, req *loggingpb.ListVie } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.ListViews(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.ListViews, req, settings.GRPC, c.logger, "ListViews") return err }, opts...) if err != nil { @@ -925,7 +929,7 @@ func (c *configGRPCClient) GetView(ctx context.Context, req *loggingpb.GetViewRe var resp *loggingpb.LogView err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetView, req, settings.GRPC, c.logger, "GetView") return err }, opts...) if err != nil { @@ -943,7 +947,7 @@ func (c *configGRPCClient) CreateView(ctx context.Context, req *loggingpb.Create var resp *loggingpb.LogView err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateView, req, settings.GRPC, c.logger, "CreateView") return err }, opts...) if err != nil { @@ -961,7 +965,7 @@ func (c *configGRPCClient) UpdateView(ctx context.Context, req *loggingpb.Update var resp *loggingpb.LogView err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateView(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateView, req, settings.GRPC, c.logger, "UpdateView") return err }, opts...) if err != nil { @@ -978,7 +982,7 @@ func (c *configGRPCClient) DeleteView(ctx context.Context, req *loggingpb.Delete opts = append((*c.CallOptions).DeleteView[0:len((*c.CallOptions).DeleteView):len((*c.CallOptions).DeleteView)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.configClient.DeleteView(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.configClient.DeleteView, req, settings.GRPC, c.logger, "DeleteView") return err }, opts...) return err @@ -1004,7 +1008,7 @@ func (c *configGRPCClient) ListSinks(ctx context.Context, req *loggingpb.ListSin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.ListSinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.ListSinks, req, settings.GRPC, c.logger, "ListSinks") return err }, opts...) if err != nil { @@ -1039,7 +1043,7 @@ func (c *configGRPCClient) GetSink(ctx context.Context, req *loggingpb.GetSinkRe var resp *loggingpb.LogSink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetSink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetSink, req, settings.GRPC, c.logger, "GetSink") return err }, opts...) if err != nil { @@ -1057,7 +1061,7 @@ func (c *configGRPCClient) CreateSink(ctx context.Context, req *loggingpb.Create var resp *loggingpb.LogSink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateSink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateSink, req, settings.GRPC, c.logger, "CreateSink") return err }, opts...) if err != nil { @@ -1075,7 +1079,7 @@ func (c *configGRPCClient) UpdateSink(ctx context.Context, req *loggingpb.Update var resp *loggingpb.LogSink err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateSink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateSink, req, settings.GRPC, c.logger, "UpdateSink") return err }, opts...) if err != nil { @@ -1092,7 +1096,7 @@ func (c *configGRPCClient) DeleteSink(ctx context.Context, req *loggingpb.Delete opts = append((*c.CallOptions).DeleteSink[0:len((*c.CallOptions).DeleteSink):len((*c.CallOptions).DeleteSink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.configClient.DeleteSink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.configClient.DeleteSink, req, settings.GRPC, c.logger, "DeleteSink") return err }, opts...) return err @@ -1107,7 +1111,7 @@ func (c *configGRPCClient) CreateLink(ctx context.Context, req *loggingpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateLink, req, settings.GRPC, c.logger, "CreateLink") return err }, opts...) if err != nil { @@ -1127,7 +1131,7 @@ func (c *configGRPCClient) DeleteLink(ctx context.Context, req *loggingpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.DeleteLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.DeleteLink, req, settings.GRPC, c.logger, "DeleteLink") return err }, opts...) if err != nil { @@ -1158,7 +1162,7 @@ func (c *configGRPCClient) ListLinks(ctx context.Context, req *loggingpb.ListLin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.ListLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.ListLinks, req, settings.GRPC, c.logger, "ListLinks") return err }, opts...) if err != nil { @@ -1193,7 +1197,7 @@ func (c *configGRPCClient) GetLink(ctx context.Context, req *loggingpb.GetLinkRe var resp *loggingpb.Link err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetLink, req, settings.GRPC, c.logger, "GetLink") return err }, opts...) if err != nil { @@ -1222,7 +1226,7 @@ func (c *configGRPCClient) ListExclusions(ctx context.Context, req *loggingpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.ListExclusions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.ListExclusions, req, settings.GRPC, c.logger, "ListExclusions") return err }, opts...) if err != nil { @@ -1257,7 +1261,7 @@ func (c *configGRPCClient) GetExclusion(ctx context.Context, req *loggingpb.GetE var resp *loggingpb.LogExclusion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetExclusion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetExclusion, req, settings.GRPC, c.logger, "GetExclusion") return err }, opts...) if err != nil { @@ -1275,7 +1279,7 @@ func (c *configGRPCClient) CreateExclusion(ctx context.Context, req *loggingpb.C var resp *loggingpb.LogExclusion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CreateExclusion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CreateExclusion, req, settings.GRPC, c.logger, "CreateExclusion") return err }, opts...) if err != nil { @@ -1293,7 +1297,7 @@ func (c *configGRPCClient) UpdateExclusion(ctx context.Context, req *loggingpb.U var resp *loggingpb.LogExclusion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateExclusion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateExclusion, req, settings.GRPC, c.logger, "UpdateExclusion") return err }, opts...) if err != nil { @@ -1310,7 +1314,7 @@ func (c *configGRPCClient) DeleteExclusion(ctx context.Context, req *loggingpb.D opts = append((*c.CallOptions).DeleteExclusion[0:len((*c.CallOptions).DeleteExclusion):len((*c.CallOptions).DeleteExclusion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.configClient.DeleteExclusion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.configClient.DeleteExclusion, req, settings.GRPC, c.logger, "DeleteExclusion") return err }, opts...) return err @@ -1325,7 +1329,7 @@ func (c *configGRPCClient) GetCmekSettings(ctx context.Context, req *loggingpb.G var resp *loggingpb.CmekSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetCmekSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetCmekSettings, req, settings.GRPC, c.logger, "GetCmekSettings") return err }, opts...) if err != nil { @@ -1343,7 +1347,7 @@ func (c *configGRPCClient) UpdateCmekSettings(ctx context.Context, req *loggingp var resp *loggingpb.CmekSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateCmekSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateCmekSettings, req, settings.GRPC, c.logger, "UpdateCmekSettings") return err }, opts...) if err != nil { @@ -1361,7 +1365,7 @@ func (c *configGRPCClient) GetSettings(ctx context.Context, req *loggingpb.GetSe var resp *loggingpb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.GetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.GetSettings, req, settings.GRPC, c.logger, "GetSettings") return err }, opts...) if err != nil { @@ -1379,7 +1383,7 @@ func (c *configGRPCClient) UpdateSettings(ctx context.Context, req *loggingpb.Up var resp *loggingpb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.UpdateSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.UpdateSettings, req, settings.GRPC, c.logger, "UpdateSettings") return err }, opts...) if err != nil { @@ -1394,7 +1398,7 @@ func (c *configGRPCClient) CopyLogEntries(ctx context.Context, req *loggingpb.Co var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.configClient.CopyLogEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.configClient.CopyLogEntries, req, settings.GRPC, c.logger, "CopyLogEntries") return err }, opts...) if err != nil { @@ -1413,7 +1417,7 @@ func (c *configGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1428,7 +1432,7 @@ func (c *configGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1457,7 +1461,7 @@ func (c *configGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/logging/apiv2/config_client_example_go123_test.go b/logging/apiv2/config_client_example_go123_test.go index 344e6533d337..420fb859b58a 100644 --- a/logging/apiv2/config_client_example_go123_test.go +++ b/logging/apiv2/config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleConfigClient_ListBuckets_all() { } for resp, err := range c.ListBuckets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleConfigClient_ListExclusions_all() { } for resp, err := range c.ListExclusions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleConfigClient_ListLinks_all() { } for resp, err := range c.ListLinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleConfigClient_ListSinks_all() { } for resp, err := range c.ListSinks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleConfigClient_ListViews_all() { } for resp, err := range c.ListViews(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/logging/apiv2/helpers.go b/logging/apiv2/helpers.go index 70496d6a4b92..b895f7bc0084 100755 --- a/logging/apiv2/helpers.go +++ b/logging/apiv2/helpers.go @@ -18,10 +18,16 @@ package logging import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "logging.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -46,3 +52,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/logging.write", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/logging/apiv2/logging_client.go b/logging/apiv2/logging_client.go index a06056b15300..1b0b420079bd 100755 --- a/logging/apiv2/logging_client.go +++ b/logging/apiv2/logging_client.go @@ -19,6 +19,7 @@ package logging import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -284,6 +285,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new logging service v2 client based on gRPC. @@ -310,6 +313,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: loggingpb.NewLoggingServiceV2Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -352,7 +356,7 @@ func (c *gRPCClient) DeleteLog(ctx context.Context, req *loggingpb.DeleteLogRequ opts = append((*c.CallOptions).DeleteLog[0:len((*c.CallOptions).DeleteLog):len((*c.CallOptions).DeleteLog)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteLog(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteLog, req, settings.GRPC, c.logger, "DeleteLog") return err }, opts...) return err @@ -364,7 +368,7 @@ func (c *gRPCClient) WriteLogEntries(ctx context.Context, req *loggingpb.WriteLo var resp *loggingpb.WriteLogEntriesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.WriteLogEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.WriteLogEntries, req, settings.GRPC, c.logger, "WriteLogEntries") return err }, opts...) if err != nil { @@ -390,7 +394,7 @@ func (c *gRPCClient) ListLogEntries(ctx context.Context, req *loggingpb.ListLogE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLogEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLogEntries, req, settings.GRPC, c.logger, "ListLogEntries") return err }, opts...) if err != nil { @@ -433,7 +437,7 @@ func (c *gRPCClient) ListMonitoredResourceDescriptors(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMonitoredResourceDescriptors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMonitoredResourceDescriptors, req, settings.GRPC, c.logger, "ListMonitoredResourceDescriptors") return err }, opts...) if err != nil { @@ -479,7 +483,7 @@ func (c *gRPCClient) ListLogs(ctx context.Context, req *loggingpb.ListLogsReques } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLogs, req, settings.GRPC, c.logger, "ListLogs") return err }, opts...) if err != nil { @@ -511,7 +515,9 @@ func (c *gRPCClient) TailLogEntries(ctx context.Context, opts ...gax.CallOption) opts = append((*c.CallOptions).TailLogEntries[0:len((*c.CallOptions).TailLogEntries):len((*c.CallOptions).TailLogEntries)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "TailLogEntries") resp, err = c.client.TailLogEntries(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "TailLogEntries") return err }, opts...) if err != nil { @@ -528,7 +534,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -543,7 +549,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -572,7 +578,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/logging/apiv2/logging_client_example_go123_test.go b/logging/apiv2/logging_client_example_go123_test.go index 8081f7e09d8c..9a00c2281a5b 100644 --- a/logging/apiv2/logging_client_example_go123_test.go +++ b/logging/apiv2/logging_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListLogEntries_all() { } for resp, err := range c.ListLogEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListLogs_all() { } for resp, err := range c.ListLogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListMonitoredResourceDescriptors_all() { } for resp, err := range c.ListMonitoredResourceDescriptors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/logging/apiv2/loggingpb/log_entry.pb.go b/logging/apiv2/loggingpb/log_entry.pb.go index 2be3cccb23ee..228742049177 100755 --- a/logging/apiv2/loggingpb/log_entry.pb.go +++ b/logging/apiv2/loggingpb/log_entry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/logging/v2/log_entry.proto @@ -195,11 +195,9 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_log_entry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_log_entry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntry) String() string { @@ -210,7 +208,7 @@ func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_log_entry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +404,9 @@ type LogEntryOperation struct { func (x *LogEntryOperation) Reset() { *x = LogEntryOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_log_entry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_log_entry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntryOperation) String() string { @@ -421,7 +417,7 @@ func (*LogEntryOperation) ProtoMessage() {} func (x *LogEntryOperation) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_log_entry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +484,9 @@ type LogEntrySourceLocation struct { func (x *LogEntrySourceLocation) Reset() { *x = LogEntrySourceLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_log_entry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_log_entry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntrySourceLocation) String() string { @@ -503,7 +497,7 @@ func (*LogEntrySourceLocation) ProtoMessage() {} func (x *LogEntrySourceLocation) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_log_entry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +555,9 @@ type LogSplit struct { func (x *LogSplit) Reset() { *x = LogSplit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_log_entry_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_log_entry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogSplit) String() string { @@ -576,7 +568,7 @@ func (*LogSplit) ProtoMessage() {} func (x *LogSplit) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_log_entry_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,56 +789,6 @@ func file_google_logging_v2_log_entry_proto_init() { if File_google_logging_v2_log_entry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_logging_v2_log_entry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_log_entry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LogEntryOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_log_entry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LogEntrySourceLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_log_entry_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LogSplit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_logging_v2_log_entry_proto_msgTypes[0].OneofWrappers = []any{ (*LogEntry_ProtoPayload)(nil), (*LogEntry_TextPayload)(nil), diff --git a/logging/apiv2/loggingpb/logging.pb.go b/logging/apiv2/loggingpb/logging.pb.go index 2e21a84bec7d..7cedbb294e13 100755 --- a/logging/apiv2/loggingpb/logging.pb.go +++ b/logging/apiv2/loggingpb/logging.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/logging/v2/logging.proto @@ -125,11 +125,9 @@ type DeleteLogRequest struct { func (x *DeleteLogRequest) Reset() { *x = DeleteLogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLogRequest) String() string { @@ -140,7 +138,7 @@ func (*DeleteLogRequest) ProtoMessage() {} func (x *DeleteLogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +239,9 @@ type WriteLogEntriesRequest struct { func (x *WriteLogEntriesRequest) Reset() { *x = WriteLogEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteLogEntriesRequest) String() string { @@ -256,7 +252,7 @@ func (*WriteLogEntriesRequest) ProtoMessage() {} func (x *WriteLogEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +318,9 @@ type WriteLogEntriesResponse struct { func (x *WriteLogEntriesResponse) Reset() { *x = WriteLogEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteLogEntriesResponse) String() string { @@ -337,7 +331,7 @@ func (*WriteLogEntriesResponse) ProtoMessage() {} func (x *WriteLogEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +363,9 @@ type WriteLogEntriesPartialErrors struct { func (x *WriteLogEntriesPartialErrors) Reset() { *x = WriteLogEntriesPartialErrors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteLogEntriesPartialErrors) String() string { @@ -384,7 +376,7 @@ func (*WriteLogEntriesPartialErrors) ProtoMessage() {} func (x *WriteLogEntriesPartialErrors) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +449,9 @@ type ListLogEntriesRequest struct { func (x *ListLogEntriesRequest) Reset() { *x = ListLogEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogEntriesRequest) String() string { @@ -472,7 +462,7 @@ func (*ListLogEntriesRequest) ProtoMessage() {} func (x *ListLogEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +537,9 @@ type ListLogEntriesResponse struct { func (x *ListLogEntriesResponse) Reset() { *x = ListLogEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogEntriesResponse) String() string { @@ -562,7 +550,7 @@ func (*ListLogEntriesResponse) ProtoMessage() {} func (x *ListLogEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +598,9 @@ type ListMonitoredResourceDescriptorsRequest struct { func (x *ListMonitoredResourceDescriptorsRequest) Reset() { *x = ListMonitoredResourceDescriptorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMonitoredResourceDescriptorsRequest) String() string { @@ -625,7 +611,7 @@ func (*ListMonitoredResourceDescriptorsRequest) ProtoMessage() {} func (x *ListMonitoredResourceDescriptorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +656,9 @@ type ListMonitoredResourceDescriptorsResponse struct { func (x *ListMonitoredResourceDescriptorsResponse) Reset() { *x = ListMonitoredResourceDescriptorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMonitoredResourceDescriptorsResponse) String() string { @@ -685,7 +669,7 @@ func (*ListMonitoredResourceDescriptorsResponse) ProtoMessage() {} func (x *ListMonitoredResourceDescriptorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +740,9 @@ type ListLogsRequest struct { func (x *ListLogsRequest) Reset() { *x = ListLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogsRequest) String() string { @@ -771,7 +753,7 @@ func (*ListLogsRequest) ProtoMessage() {} func (x *ListLogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +814,9 @@ type ListLogsResponse struct { func (x *ListLogsResponse) Reset() { *x = ListLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogsResponse) String() string { @@ -847,7 +827,7 @@ func (*ListLogsResponse) ProtoMessage() {} func (x *ListLogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -911,11 +891,9 @@ type TailLogEntriesRequest struct { func (x *TailLogEntriesRequest) Reset() { *x = TailLogEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TailLogEntriesRequest) String() string { @@ -926,7 +904,7 @@ func (*TailLogEntriesRequest) ProtoMessage() {} func (x *TailLogEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +960,9 @@ type TailLogEntriesResponse struct { func (x *TailLogEntriesResponse) Reset() { *x = TailLogEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TailLogEntriesResponse) String() string { @@ -997,7 +973,7 @@ func (*TailLogEntriesResponse) ProtoMessage() {} func (x *TailLogEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,11 +1016,9 @@ type TailLogEntriesResponse_SuppressionInfo struct { func (x *TailLogEntriesResponse_SuppressionInfo) Reset() { *x = TailLogEntriesResponse_SuppressionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TailLogEntriesResponse_SuppressionInfo) String() string { @@ -1055,7 +1029,7 @@ func (*TailLogEntriesResponse_SuppressionInfo) ProtoMessage() {} func (x *TailLogEntriesResponse_SuppressionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,164 +1425,6 @@ func file_google_logging_v2_logging_proto_init() { return } file_google_logging_v2_log_entry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WriteLogEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WriteLogEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WriteLogEntriesPartialErrors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListLogEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListLogEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListMonitoredResourceDescriptorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListMonitoredResourceDescriptorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListLogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListLogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TailLogEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TailLogEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TailLogEntriesResponse_SuppressionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/logging/apiv2/loggingpb/logging_config.pb.go b/logging/apiv2/loggingpb/logging_config.pb.go index 47428daa5a47..e880e5e7e920 100755 --- a/logging/apiv2/loggingpb/logging_config.pb.go +++ b/logging/apiv2/loggingpb/logging_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/logging/v2/logging_config.proto @@ -319,11 +319,9 @@ type IndexConfig struct { func (x *IndexConfig) Reset() { *x = IndexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexConfig) String() string { @@ -334,7 +332,7 @@ func (*IndexConfig) ProtoMessage() {} func (x *IndexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +431,9 @@ type LogBucket struct { func (x *LogBucket) Reset() { *x = LogBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogBucket) String() string { @@ -448,7 +444,7 @@ func (*LogBucket) ProtoMessage() {} func (x *LogBucket) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +573,9 @@ type LogView struct { func (x *LogView) Reset() { *x = LogView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogView) String() string { @@ -592,7 +586,7 @@ func (*LogView) ProtoMessage() {} func (x *LogView) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +746,9 @@ type LogSink struct { func (x *LogSink) Reset() { *x = LogSink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogSink) String() string { @@ -767,7 +759,7 @@ func (*LogSink) ProtoMessage() {} func (x *LogSink) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +896,9 @@ type BigQueryDataset struct { func (x *BigQueryDataset) Reset() { *x = BigQueryDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryDataset) String() string { @@ -919,7 +909,7 @@ func (*BigQueryDataset) ProtoMessage() {} func (x *BigQueryDataset) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +967,9 @@ type Link struct { func (x *Link) Reset() { *x = Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Link) String() string { @@ -992,7 +980,7 @@ func (*Link) ProtoMessage() {} func (x *Link) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1069,11 +1057,9 @@ type BigQueryOptions struct { func (x *BigQueryOptions) Reset() { *x = BigQueryOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryOptions) String() string { @@ -1084,7 +1070,7 @@ func (*BigQueryOptions) ProtoMessage() {} func (x *BigQueryOptions) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1129,9 @@ type ListBucketsRequest struct { func (x *ListBucketsRequest) Reset() { *x = ListBucketsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBucketsRequest) String() string { @@ -1158,7 +1142,7 @@ func (*ListBucketsRequest) ProtoMessage() {} func (x *ListBucketsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,11 +1194,9 @@ type ListBucketsResponse struct { func (x *ListBucketsResponse) Reset() { *x = ListBucketsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBucketsResponse) String() string { @@ -1225,7 +1207,7 @@ func (*ListBucketsResponse) ProtoMessage() {} func (x *ListBucketsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1280,11 +1262,9 @@ type CreateBucketRequest struct { func (x *CreateBucketRequest) Reset() { *x = CreateBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBucketRequest) String() string { @@ -1295,7 +1275,7 @@ func (*CreateBucketRequest) ProtoMessage() {} func (x *CreateBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1363,11 +1343,9 @@ type UpdateBucketRequest struct { func (x *UpdateBucketRequest) Reset() { *x = UpdateBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBucketRequest) String() string { @@ -1378,7 +1356,7 @@ func (*UpdateBucketRequest) ProtoMessage() {} func (x *UpdateBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1413,9 @@ type GetBucketRequest struct { func (x *GetBucketRequest) Reset() { *x = GetBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBucketRequest) String() string { @@ -1450,7 +1426,7 @@ func (*GetBucketRequest) ProtoMessage() {} func (x *GetBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1493,11 +1469,9 @@ type DeleteBucketRequest struct { func (x *DeleteBucketRequest) Reset() { *x = DeleteBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBucketRequest) String() string { @@ -1508,7 +1482,7 @@ func (*DeleteBucketRequest) ProtoMessage() {} func (x *DeleteBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1525,9 @@ type UndeleteBucketRequest struct { func (x *UndeleteBucketRequest) Reset() { *x = UndeleteBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteBucketRequest) String() string { @@ -1566,7 +1538,7 @@ func (*UndeleteBucketRequest) ProtoMessage() {} func (x *UndeleteBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,11 +1584,9 @@ type ListViewsRequest struct { func (x *ListViewsRequest) Reset() { *x = ListViewsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViewsRequest) String() string { @@ -1627,7 +1597,7 @@ func (*ListViewsRequest) ProtoMessage() {} func (x *ListViewsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,11 +1649,9 @@ type ListViewsResponse struct { func (x *ListViewsResponse) Reset() { *x = ListViewsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListViewsResponse) String() string { @@ -1694,7 +1662,7 @@ func (*ListViewsResponse) ProtoMessage() {} func (x *ListViewsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1747,11 +1715,9 @@ type CreateViewRequest struct { func (x *CreateViewRequest) Reset() { *x = CreateViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateViewRequest) String() string { @@ -1762,7 +1728,7 @@ func (*CreateViewRequest) ProtoMessage() {} func (x *CreateViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1827,11 +1793,9 @@ type UpdateViewRequest struct { func (x *UpdateViewRequest) Reset() { *x = UpdateViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateViewRequest) String() string { @@ -1842,7 +1806,7 @@ func (*UpdateViewRequest) ProtoMessage() {} func (x *UpdateViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1896,11 +1860,9 @@ type GetViewRequest struct { func (x *GetViewRequest) Reset() { *x = GetViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetViewRequest) String() string { @@ -1911,7 +1873,7 @@ func (*GetViewRequest) ProtoMessage() {} func (x *GetViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1951,11 +1913,9 @@ type DeleteViewRequest struct { func (x *DeleteViewRequest) Reset() { *x = DeleteViewRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteViewRequest) String() string { @@ -1966,7 +1926,7 @@ func (*DeleteViewRequest) ProtoMessage() {} func (x *DeleteViewRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2014,11 +1974,9 @@ type ListSinksRequest struct { func (x *ListSinksRequest) Reset() { *x = ListSinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSinksRequest) String() string { @@ -2029,7 +1987,7 @@ func (*ListSinksRequest) ProtoMessage() {} func (x *ListSinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2081,11 +2039,9 @@ type ListSinksResponse struct { func (x *ListSinksResponse) Reset() { *x = ListSinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSinksResponse) String() string { @@ -2096,7 +2052,7 @@ func (*ListSinksResponse) ProtoMessage() {} func (x *ListSinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2146,11 +2102,9 @@ type GetSinkRequest struct { func (x *GetSinkRequest) Reset() { *x = GetSinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSinkRequest) String() string { @@ -2161,7 +2115,7 @@ func (*GetSinkRequest) ProtoMessage() {} func (x *GetSinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2221,11 +2175,9 @@ type CreateSinkRequest struct { func (x *CreateSinkRequest) Reset() { *x = CreateSinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSinkRequest) String() string { @@ -2236,7 +2188,7 @@ func (*CreateSinkRequest) ProtoMessage() {} func (x *CreateSinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2326,11 +2278,9 @@ type UpdateSinkRequest struct { func (x *UpdateSinkRequest) Reset() { *x = UpdateSinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSinkRequest) String() string { @@ -2341,7 +2291,7 @@ func (*UpdateSinkRequest) ProtoMessage() {} func (x *UpdateSinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2406,11 +2356,9 @@ type DeleteSinkRequest struct { func (x *DeleteSinkRequest) Reset() { *x = DeleteSinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSinkRequest) String() string { @@ -2421,7 +2369,7 @@ func (*DeleteSinkRequest) ProtoMessage() {} func (x *DeleteSinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2466,11 +2414,9 @@ type CreateLinkRequest struct { func (x *CreateLinkRequest) Reset() { *x = CreateLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLinkRequest) String() string { @@ -2481,7 +2427,7 @@ func (*CreateLinkRequest) ProtoMessage() {} func (x *CreateLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2534,11 +2480,9 @@ type DeleteLinkRequest struct { func (x *DeleteLinkRequest) Reset() { *x = DeleteLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLinkRequest) String() string { @@ -2549,7 +2493,7 @@ func (*DeleteLinkRequest) ProtoMessage() {} func (x *DeleteLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2594,11 +2538,9 @@ type ListLinksRequest struct { func (x *ListLinksRequest) Reset() { *x = ListLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLinksRequest) String() string { @@ -2609,7 +2551,7 @@ func (*ListLinksRequest) ProtoMessage() {} func (x *ListLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2661,11 +2603,9 @@ type ListLinksResponse struct { func (x *ListLinksResponse) Reset() { *x = ListLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLinksResponse) String() string { @@ -2676,7 +2616,7 @@ func (*ListLinksResponse) ProtoMessage() {} func (x *ListLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2722,11 +2662,9 @@ type GetLinkRequest struct { func (x *GetLinkRequest) Reset() { *x = GetLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLinkRequest) String() string { @@ -2737,7 +2675,7 @@ func (*GetLinkRequest) ProtoMessage() {} func (x *GetLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2804,11 +2742,9 @@ type LogExclusion struct { func (x *LogExclusion) Reset() { *x = LogExclusion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogExclusion) String() string { @@ -2819,7 +2755,7 @@ func (*LogExclusion) ProtoMessage() {} func (x *LogExclusion) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2902,11 +2838,9 @@ type ListExclusionsRequest struct { func (x *ListExclusionsRequest) Reset() { *x = ListExclusionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExclusionsRequest) String() string { @@ -2917,7 +2851,7 @@ func (*ListExclusionsRequest) ProtoMessage() {} func (x *ListExclusionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,11 +2903,9 @@ type ListExclusionsResponse struct { func (x *ListExclusionsResponse) Reset() { *x = ListExclusionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExclusionsResponse) String() string { @@ -2984,7 +2916,7 @@ func (*ListExclusionsResponse) ProtoMessage() {} func (x *ListExclusionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3034,11 +2966,9 @@ type GetExclusionRequest struct { func (x *GetExclusionRequest) Reset() { *x = GetExclusionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExclusionRequest) String() string { @@ -3049,7 +2979,7 @@ func (*GetExclusionRequest) ProtoMessage() {} func (x *GetExclusionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3096,11 +3026,9 @@ type CreateExclusionRequest struct { func (x *CreateExclusionRequest) Reset() { *x = CreateExclusionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExclusionRequest) String() string { @@ -3111,7 +3039,7 @@ func (*CreateExclusionRequest) ProtoMessage() {} func (x *CreateExclusionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3173,11 +3101,9 @@ type UpdateExclusionRequest struct { func (x *UpdateExclusionRequest) Reset() { *x = UpdateExclusionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExclusionRequest) String() string { @@ -3188,7 +3114,7 @@ func (*UpdateExclusionRequest) ProtoMessage() {} func (x *UpdateExclusionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3245,11 +3171,9 @@ type DeleteExclusionRequest struct { func (x *DeleteExclusionRequest) Reset() { *x = DeleteExclusionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExclusionRequest) String() string { @@ -3260,7 +3184,7 @@ func (*DeleteExclusionRequest) ProtoMessage() {} func (x *DeleteExclusionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3313,11 +3237,9 @@ type GetCmekSettingsRequest struct { func (x *GetCmekSettingsRequest) Reset() { *x = GetCmekSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCmekSettingsRequest) String() string { @@ -3328,7 +3250,7 @@ func (*GetCmekSettingsRequest) ProtoMessage() {} func (x *GetCmekSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3394,11 +3316,9 @@ type UpdateCmekSettingsRequest struct { func (x *UpdateCmekSettingsRequest) Reset() { *x = UpdateCmekSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCmekSettingsRequest) String() string { @@ -3409,7 +3329,7 @@ func (*UpdateCmekSettingsRequest) ProtoMessage() {} func (x *UpdateCmekSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3524,11 +3444,9 @@ type CmekSettings struct { func (x *CmekSettings) Reset() { *x = CmekSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CmekSettings) String() string { @@ -3539,7 +3457,7 @@ func (*CmekSettings) ProtoMessage() {} func (x *CmekSettings) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3613,11 +3531,9 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingsRequest) String() string { @@ -3628,7 +3544,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3691,11 +3607,9 @@ type UpdateSettingsRequest struct { func (x *UpdateSettingsRequest) Reset() { *x = UpdateSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingsRequest) String() string { @@ -3706,7 +3620,7 @@ func (*UpdateSettingsRequest) ProtoMessage() {} func (x *UpdateSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3803,11 +3717,9 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings) String() string { @@ -3818,7 +3730,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3889,11 +3801,9 @@ type CopyLogEntriesRequest struct { func (x *CopyLogEntriesRequest) Reset() { *x = CopyLogEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyLogEntriesRequest) String() string { @@ -3904,7 +3814,7 @@ func (*CopyLogEntriesRequest) ProtoMessage() {} func (x *CopyLogEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3970,11 +3880,9 @@ type CopyLogEntriesMetadata struct { func (x *CopyLogEntriesMetadata) Reset() { *x = CopyLogEntriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyLogEntriesMetadata) String() string { @@ -3985,7 +3893,7 @@ func (*CopyLogEntriesMetadata) ProtoMessage() {} func (x *CopyLogEntriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4061,11 +3969,9 @@ type CopyLogEntriesResponse struct { func (x *CopyLogEntriesResponse) Reset() { *x = CopyLogEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyLogEntriesResponse) String() string { @@ -4076,7 +3982,7 @@ func (*CopyLogEntriesResponse) ProtoMessage() {} func (x *CopyLogEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4119,11 +4025,9 @@ type BucketMetadata struct { func (x *BucketMetadata) Reset() { *x = BucketMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BucketMetadata) String() string { @@ -4134,7 +4038,7 @@ func (*BucketMetadata) ProtoMessage() {} func (x *BucketMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4230,11 +4134,9 @@ type LinkMetadata struct { func (x *LinkMetadata) Reset() { *x = LinkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkMetadata) String() string { @@ -4245,7 +4147,7 @@ func (*LinkMetadata) ProtoMessage() {} func (x *LinkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4333,11 +4235,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_config_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_config_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4348,7 +4248,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_config_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6039,608 +5939,6 @@ func file_google_logging_v2_logging_config_proto_init() { if File_google_logging_v2_logging_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IndexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LogBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LogView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LogSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListBucketsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListBucketsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListViewsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListViewsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteViewRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListSinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListSinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetSinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateSinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*LogExclusion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListExclusionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListExclusionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GetExclusionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CreateExclusionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExclusionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExclusionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*GetCmekSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCmekSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CmekSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*CopyLogEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CopyLogEntriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*CopyLogEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*BucketMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*LinkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_config_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_logging_v2_logging_config_proto_msgTypes[3].OneofWrappers = []any{ (*LogSink_BigqueryOptions)(nil), } diff --git a/logging/apiv2/loggingpb/logging_metrics.pb.go b/logging/apiv2/loggingpb/logging_metrics.pb.go index db4193b7b6f1..c190599cfd94 100755 --- a/logging/apiv2/loggingpb/logging_metrics.pb.go +++ b/logging/apiv2/loggingpb/logging_metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/logging/v2/logging_metrics.proto @@ -222,11 +222,9 @@ type LogMetric struct { func (x *LogMetric) Reset() { *x = LogMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogMetric) String() string { @@ -237,7 +235,7 @@ func (*LogMetric) ProtoMessage() {} func (x *LogMetric) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +358,9 @@ type ListLogMetricsRequest struct { func (x *ListLogMetricsRequest) Reset() { *x = ListLogMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogMetricsRequest) String() string { @@ -375,7 +371,7 @@ func (*ListLogMetricsRequest) ProtoMessage() {} func (x *ListLogMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +423,9 @@ type ListLogMetricsResponse struct { func (x *ListLogMetricsResponse) Reset() { *x = ListLogMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLogMetricsResponse) String() string { @@ -442,7 +436,7 @@ func (*ListLogMetricsResponse) ProtoMessage() {} func (x *ListLogMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +479,9 @@ type GetLogMetricRequest struct { func (x *GetLogMetricRequest) Reset() { *x = GetLogMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLogMetricRequest) String() string { @@ -500,7 +492,7 @@ func (*GetLogMetricRequest) ProtoMessage() {} func (x *GetLogMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +533,9 @@ type CreateLogMetricRequest struct { func (x *CreateLogMetricRequest) Reset() { *x = CreateLogMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLogMetricRequest) String() string { @@ -556,7 +546,7 @@ func (*CreateLogMetricRequest) ProtoMessage() {} func (x *CreateLogMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +595,9 @@ type UpdateLogMetricRequest struct { func (x *UpdateLogMetricRequest) Reset() { *x = UpdateLogMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLogMetricRequest) String() string { @@ -620,7 +608,7 @@ func (*UpdateLogMetricRequest) ProtoMessage() {} func (x *UpdateLogMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +651,9 @@ type DeleteLogMetricRequest struct { func (x *DeleteLogMetricRequest) Reset() { *x = DeleteLogMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLogMetricRequest) String() string { @@ -678,7 +664,7 @@ func (*DeleteLogMetricRequest) ProtoMessage() {} func (x *DeleteLogMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_google_logging_v2_logging_metrics_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,92 +955,6 @@ func file_google_logging_v2_logging_metrics_proto_init() { if File_google_logging_v2_logging_metrics_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_logging_v2_logging_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListLogMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListLogMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetLogMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateLogMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLogMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_logging_v2_logging_metrics_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLogMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/logging/apiv2/metrics_client.go b/logging/apiv2/metrics_client.go index 50108fc13ba5..c48855df95f9 100755 --- a/logging/apiv2/metrics_client.go +++ b/logging/apiv2/metrics_client.go @@ -19,6 +19,7 @@ package logging import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -238,6 +239,8 @@ type metricsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetricsClient creates a new metrics service v2 client based on gRPC. @@ -264,6 +267,7 @@ func NewMetricsClient(ctx context.Context, opts ...option.ClientOption) (*Metric connPool: connPool, metricsClient: loggingpb.NewMetricsServiceV2Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -318,7 +322,7 @@ func (c *metricsGRPCClient) ListLogMetrics(ctx context.Context, req *loggingpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsClient.ListLogMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsClient.ListLogMetrics, req, settings.GRPC, c.logger, "ListLogMetrics") return err }, opts...) if err != nil { @@ -353,7 +357,7 @@ func (c *metricsGRPCClient) GetLogMetric(ctx context.Context, req *loggingpb.Get var resp *loggingpb.LogMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsClient.GetLogMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsClient.GetLogMetric, req, settings.GRPC, c.logger, "GetLogMetric") return err }, opts...) if err != nil { @@ -371,7 +375,7 @@ func (c *metricsGRPCClient) CreateLogMetric(ctx context.Context, req *loggingpb. var resp *loggingpb.LogMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsClient.CreateLogMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsClient.CreateLogMetric, req, settings.GRPC, c.logger, "CreateLogMetric") return err }, opts...) if err != nil { @@ -389,7 +393,7 @@ func (c *metricsGRPCClient) UpdateLogMetric(ctx context.Context, req *loggingpb. var resp *loggingpb.LogMetric err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsClient.UpdateLogMetric(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsClient.UpdateLogMetric, req, settings.GRPC, c.logger, "UpdateLogMetric") return err }, opts...) if err != nil { @@ -406,7 +410,7 @@ func (c *metricsGRPCClient) DeleteLogMetric(ctx context.Context, req *loggingpb. opts = append((*c.CallOptions).DeleteLogMetric[0:len((*c.CallOptions).DeleteLogMetric):len((*c.CallOptions).DeleteLogMetric)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metricsClient.DeleteLogMetric(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metricsClient.DeleteLogMetric, req, settings.GRPC, c.logger, "DeleteLogMetric") return err }, opts...) return err @@ -420,7 +424,7 @@ func (c *metricsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -435,7 +439,7 @@ func (c *metricsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -464,7 +468,7 @@ func (c *metricsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/logging/apiv2/metrics_client_example_go123_test.go b/logging/apiv2/metrics_client_example_go123_test.go index 79689a49cb01..a7aa8eac3ba7 100644 --- a/logging/apiv2/metrics_client_example_go123_test.go +++ b/logging/apiv2/metrics_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleMetricsClient_ListLogMetrics_all() { } for resp, err := range c.ListLogMetrics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleMetricsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/longrunning/autogen/helpers.go b/longrunning/autogen/helpers.go index 342bed797ce8..d14fac0d3f81 100755 --- a/longrunning/autogen/helpers.go +++ b/longrunning/autogen/helpers.go @@ -18,10 +18,20 @@ package longrunning import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "longrunning.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/longrunning/autogen/longrunningpb/operations.pb.go b/longrunning/autogen/longrunningpb/operations.pb.go index b1c01821a047..7f779c74d0b5 100755 --- a/longrunning/autogen/longrunningpb/operations.pb.go +++ b/longrunning/autogen/longrunningpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/longrunning/operations.proto @@ -79,11 +79,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -94,7 +92,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type GetOperationRequest struct { func (x *GetOperationRequest) Reset() { *x = GetOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOperationRequest) String() string { @@ -204,7 +200,7 @@ func (*GetOperationRequest) ProtoMessage() {} func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +241,9 @@ type ListOperationsRequest struct { func (x *ListOperationsRequest) Reset() { *x = ListOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsRequest) String() string { @@ -260,7 +254,7 @@ func (*ListOperationsRequest) ProtoMessage() {} func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type ListOperationsResponse struct { func (x *ListOperationsResponse) Reset() { *x = ListOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsResponse) String() string { @@ -333,7 +325,7 @@ func (*ListOperationsResponse) ProtoMessage() {} func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +367,9 @@ type CancelOperationRequest struct { func (x *CancelOperationRequest) Reset() { *x = CancelOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOperationRequest) String() string { @@ -390,7 +380,7 @@ func (*CancelOperationRequest) ProtoMessage() {} func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +415,9 @@ type DeleteOperationRequest struct { func (x *DeleteOperationRequest) Reset() { *x = DeleteOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationRequest) String() string { @@ -440,7 +428,7 @@ func (*DeleteOperationRequest) ProtoMessage() {} func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +467,9 @@ type WaitOperationRequest struct { func (x *WaitOperationRequest) Reset() { *x = WaitOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WaitOperationRequest) String() string { @@ -494,7 +480,7 @@ func (*WaitOperationRequest) ProtoMessage() {} func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type OperationInfo struct { func (x *OperationInfo) Reset() { *x = OperationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationInfo) String() string { @@ -574,7 +558,7 @@ func (*OperationInfo) ProtoMessage() {} func (x *OperationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -817,104 +801,6 @@ func file_google_longrunning_operations_proto_init() { if File_google_longrunning_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_longrunning_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CancelOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*WaitOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_longrunning_operations_proto_msgTypes[0].OneofWrappers = []any{ (*Operation_Error)(nil), (*Operation_Response)(nil), diff --git a/longrunning/autogen/operations_client.go b/longrunning/autogen/operations_client.go index b42f6c5c685c..a0a229cf0e9a 100755 --- a/longrunning/autogen/operations_client.go +++ b/longrunning/autogen/operations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -289,6 +288,8 @@ type operationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOperationsClient creates a new operations client based on gRPC. @@ -323,6 +324,7 @@ func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*Ope connPool: connPool, operationsClient: longrunningpb.NewOperationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -369,6 +371,8 @@ type operationsRESTClient struct { // Points back to the CallOptions field of the containing OperationsClient CallOptions **OperationsCallOptions + + logger *slog.Logger } // NewOperationsRESTClient creates a new operations rest client. @@ -394,6 +398,7 @@ func NewOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -457,7 +462,7 @@ func (c *operationsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -492,7 +497,7 @@ func (c *operationsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -509,7 +514,7 @@ func (c *operationsGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -523,7 +528,7 @@ func (c *operationsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -535,7 +540,7 @@ func (c *operationsGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -592,21 +597,10 @@ func (c *operationsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -666,17 +660,7 @@ func (c *operationsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -721,15 +705,8 @@ func (c *operationsRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -774,15 +751,8 @@ func (c *operationsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -833,17 +803,7 @@ func (c *operationsRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/longrunning/autogen/operations_client_example_go123_test.go b/longrunning/autogen/operations_client_example_go123_test.go index 1e9d174ed081..8b8cce4172cb 100644 --- a/longrunning/autogen/operations_client_example_go123_test.go +++ b/longrunning/autogen/operations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleOperationsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/managedidentities/apiv1/helpers.go b/managedidentities/apiv1/helpers.go index 891dec79819f..d1c83f8f8df9 100755 --- a/managedidentities/apiv1/helpers.go +++ b/managedidentities/apiv1/helpers.go @@ -18,10 +18,16 @@ package managedidentities import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "managedidentities.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/managedidentities/apiv1/managed_identities_client.go b/managedidentities/apiv1/managed_identities_client.go index 7a73cbf66530..a78c950eecde 100755 --- a/managedidentities/apiv1/managed_identities_client.go +++ b/managedidentities/apiv1/managed_identities_client.go @@ -19,6 +19,7 @@ package managedidentities import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -317,6 +318,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new managed identities service client based on gRPC. @@ -381,6 +384,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: managedidentitiespb.NewManagedIdentitiesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -434,7 +438,7 @@ func (c *gRPCClient) CreateMicrosoftAdDomain(ctx context.Context, req *managedid var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMicrosoftAdDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMicrosoftAdDomain, req, settings.GRPC, c.logger, "CreateMicrosoftAdDomain") return err }, opts...) if err != nil { @@ -454,7 +458,7 @@ func (c *gRPCClient) ResetAdminPassword(ctx context.Context, req *managedidentit var resp *managedidentitiespb.ResetAdminPasswordResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResetAdminPassword(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResetAdminPassword, req, settings.GRPC, c.logger, "ResetAdminPassword") return err }, opts...) if err != nil { @@ -483,7 +487,7 @@ func (c *gRPCClient) ListDomains(ctx context.Context, req *managedidentitiespb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDomains(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDomains, req, settings.GRPC, c.logger, "ListDomains") return err }, opts...) if err != nil { @@ -518,7 +522,7 @@ func (c *gRPCClient) GetDomain(ctx context.Context, req *managedidentitiespb.Get var resp *managedidentitiespb.Domain err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDomain, req, settings.GRPC, c.logger, "GetDomain") return err }, opts...) if err != nil { @@ -536,7 +540,7 @@ func (c *gRPCClient) UpdateDomain(ctx context.Context, req *managedidentitiespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDomain, req, settings.GRPC, c.logger, "UpdateDomain") return err }, opts...) if err != nil { @@ -556,7 +560,7 @@ func (c *gRPCClient) DeleteDomain(ctx context.Context, req *managedidentitiespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDomain(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDomain, req, settings.GRPC, c.logger, "DeleteDomain") return err }, opts...) if err != nil { @@ -576,7 +580,7 @@ func (c *gRPCClient) AttachTrust(ctx context.Context, req *managedidentitiespb.A var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AttachTrust(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AttachTrust, req, settings.GRPC, c.logger, "AttachTrust") return err }, opts...) if err != nil { @@ -596,7 +600,7 @@ func (c *gRPCClient) ReconfigureTrust(ctx context.Context, req *managedidentitie var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReconfigureTrust(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReconfigureTrust, req, settings.GRPC, c.logger, "ReconfigureTrust") return err }, opts...) if err != nil { @@ -616,7 +620,7 @@ func (c *gRPCClient) DetachTrust(ctx context.Context, req *managedidentitiespb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DetachTrust(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DetachTrust, req, settings.GRPC, c.logger, "DetachTrust") return err }, opts...) if err != nil { @@ -636,7 +640,7 @@ func (c *gRPCClient) ValidateTrust(ctx context.Context, req *managedidentitiespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ValidateTrust(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ValidateTrust, req, settings.GRPC, c.logger, "ValidateTrust") return err }, opts...) if err != nil { diff --git a/managedidentities/apiv1/managed_identities_client_example_go123_test.go b/managedidentities/apiv1/managed_identities_client_example_go123_test.go index 13892703a47f..a5fcbf76f562 100644 --- a/managedidentities/apiv1/managed_identities_client_example_go123_test.go +++ b/managedidentities/apiv1/managed_identities_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDomains_all() { } for resp, err := range c.ListDomains(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/managedidentities/apiv1/managedidentitiespb/managed_identities_service.pb.go b/managedidentities/apiv1/managedidentitiespb/managed_identities_service.pb.go index 831d7ef07dc3..c20a7bf3869a 100755 --- a/managedidentities/apiv1/managedidentitiespb/managed_identities_service.pb.go +++ b/managedidentities/apiv1/managedidentitiespb/managed_identities_service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/managedidentities/v1/managed_identities_service.proto @@ -69,11 +69,9 @@ type OpMetadata struct { func (x *OpMetadata) Reset() { *x = OpMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpMetadata) String() string { @@ -84,7 +82,7 @@ func (*OpMetadata) ProtoMessage() {} func (x *OpMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type CreateMicrosoftAdDomainRequest struct { func (x *CreateMicrosoftAdDomainRequest) Reset() { *x = CreateMicrosoftAdDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMicrosoftAdDomainRequest) String() string { @@ -185,7 +181,7 @@ func (*CreateMicrosoftAdDomainRequest) ProtoMessage() {} func (x *CreateMicrosoftAdDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +231,9 @@ type ResetAdminPasswordRequest struct { func (x *ResetAdminPasswordRequest) Reset() { *x = ResetAdminPasswordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetAdminPasswordRequest) String() string { @@ -250,7 +244,7 @@ func (*ResetAdminPasswordRequest) ProtoMessage() {} func (x *ResetAdminPasswordRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +279,9 @@ type ResetAdminPasswordResponse struct { func (x *ResetAdminPasswordResponse) Reset() { *x = ResetAdminPasswordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetAdminPasswordResponse) String() string { @@ -300,7 +292,7 @@ func (*ResetAdminPasswordResponse) ProtoMessage() {} func (x *ResetAdminPasswordResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +346,9 @@ type ListDomainsRequest struct { func (x *ListDomainsRequest) Reset() { *x = ListDomainsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDomainsRequest) String() string { @@ -369,7 +359,7 @@ func (*ListDomainsRequest) ProtoMessage() {} func (x *ListDomainsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -437,11 +427,9 @@ type ListDomainsResponse struct { func (x *ListDomainsResponse) Reset() { *x = ListDomainsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDomainsResponse) String() string { @@ -452,7 +440,7 @@ func (*ListDomainsResponse) ProtoMessage() {} func (x *ListDomainsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,11 +489,9 @@ type GetDomainRequest struct { func (x *GetDomainRequest) Reset() { *x = GetDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDomainRequest) String() string { @@ -516,7 +502,7 @@ func (*GetDomainRequest) ProtoMessage() {} func (x *GetDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type UpdateDomainRequest struct { func (x *UpdateDomainRequest) Reset() { *x = UpdateDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDomainRequest) String() string { @@ -574,7 +558,7 @@ func (*UpdateDomainRequest) ProtoMessage() {} func (x *UpdateDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +601,9 @@ type DeleteDomainRequest struct { func (x *DeleteDomainRequest) Reset() { *x = DeleteDomainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDomainRequest) String() string { @@ -632,7 +614,7 @@ func (*DeleteDomainRequest) ProtoMessage() {} func (x *DeleteDomainRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,11 +652,9 @@ type AttachTrustRequest struct { func (x *AttachTrustRequest) Reset() { *x = AttachTrustRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttachTrustRequest) String() string { @@ -685,7 +665,7 @@ func (*AttachTrustRequest) ProtoMessage() {} func (x *AttachTrustRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +714,9 @@ type ReconfigureTrustRequest struct { func (x *ReconfigureTrustRequest) Reset() { *x = ReconfigureTrustRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReconfigureTrustRequest) String() string { @@ -749,7 +727,7 @@ func (*ReconfigureTrustRequest) ProtoMessage() {} func (x *ReconfigureTrustRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +779,9 @@ type DetachTrustRequest struct { func (x *DetachTrustRequest) Reset() { *x = DetachTrustRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachTrustRequest) String() string { @@ -816,7 +792,7 @@ func (*DetachTrustRequest) ProtoMessage() {} func (x *DetachTrustRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -861,11 +837,9 @@ type ValidateTrustRequest struct { func (x *ValidateTrustRequest) Reset() { *x = ValidateTrustRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateTrustRequest) String() string { @@ -876,7 +850,7 @@ func (*ValidateTrustRequest) ProtoMessage() {} func (x *ValidateTrustRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1302,164 +1276,6 @@ func file_google_cloud_managedidentities_v1_managed_identities_service_proto_ini return } file_google_cloud_managedidentities_v1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OpMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateMicrosoftAdDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResetAdminPasswordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResetAdminPasswordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListDomainsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListDomainsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDomainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AttachTrustRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ReconfigureTrustRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DetachTrustRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_managed_identities_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ValidateTrustRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/managedidentities/apiv1/managedidentitiespb/resource.pb.go b/managedidentities/apiv1/managedidentitiespb/resource.pb.go index 782dfdae857c..61958bb054c0 100755 --- a/managedidentities/apiv1/managedidentitiespb/resource.pb.go +++ b/managedidentities/apiv1/managedidentitiespb/resource.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/managedidentities/v1/resource.proto @@ -340,11 +340,9 @@ type Domain struct { func (x *Domain) Reset() { *x = Domain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Domain) String() string { @@ -355,7 +353,7 @@ func (*Domain) ProtoMessage() {} func (x *Domain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +491,9 @@ type Trust struct { func (x *Trust) Reset() { *x = Trust{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trust) String() string { @@ -508,7 +504,7 @@ func (*Trust) ProtoMessage() {} func (x *Trust) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedidentities_v1_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,32 +802,6 @@ func file_google_cloud_managedidentities_v1_resource_proto_init() { if File_google_cloud_managedidentities_v1_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_managedidentities_v1_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Domain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedidentities_v1_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Trust); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/managedkafka/apiv1/helpers.go b/managedkafka/apiv1/helpers.go index 4eb1e043daad..cdbfe106fb65 100755 --- a/managedkafka/apiv1/helpers.go +++ b/managedkafka/apiv1/helpers.go @@ -18,10 +18,20 @@ package managedkafka import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "managedkafka.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/managedkafka/apiv1/managed_kafka_client.go b/managedkafka/apiv1/managed_kafka_client.go index a038d72e1bf8..92173b42e0a1 100755 --- a/managedkafka/apiv1/managed_kafka_client.go +++ b/managedkafka/apiv1/managed_kafka_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" managedkafkapb "cloud.google.com/go/managedkafka/apiv1/managedkafkapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -506,6 +505,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new managed kafka client based on gRPC. @@ -533,6 +534,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: managedkafkapb.NewManagedKafkaClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -597,6 +599,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new managed kafka rest client. @@ -615,6 +619,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -688,7 +693,7 @@ func (c *gRPCClient) ListClusters(ctx context.Context, req *managedkafkapb.ListC } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *gRPCClient) GetCluster(ctx context.Context, req *managedkafkapb.GetClus var resp *managedkafkapb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *gRPCClient) CreateCluster(ctx context.Context, req *managedkafkapb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *gRPCClient) UpdateCluster(ctx context.Context, req *managedkafkapb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *gRPCClient) DeleteCluster(ctx context.Context, req *managedkafkapb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -812,7 +817,7 @@ func (c *gRPCClient) ListTopics(ctx context.Context, req *managedkafkapb.ListTop } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTopics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTopics, req, settings.GRPC, c.logger, "ListTopics") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *gRPCClient) GetTopic(ctx context.Context, req *managedkafkapb.GetTopicR var resp *managedkafkapb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTopic, req, settings.GRPC, c.logger, "GetTopic") return err }, opts...) if err != nil { @@ -865,7 +870,7 @@ func (c *gRPCClient) CreateTopic(ctx context.Context, req *managedkafkapb.Create var resp *managedkafkapb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTopic, req, settings.GRPC, c.logger, "CreateTopic") return err }, opts...) if err != nil { @@ -883,7 +888,7 @@ func (c *gRPCClient) UpdateTopic(ctx context.Context, req *managedkafkapb.Update var resp *managedkafkapb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTopic, req, settings.GRPC, c.logger, "UpdateTopic") return err }, opts...) if err != nil { @@ -900,7 +905,7 @@ func (c *gRPCClient) DeleteTopic(ctx context.Context, req *managedkafkapb.Delete opts = append((*c.CallOptions).DeleteTopic[0:len((*c.CallOptions).DeleteTopic):len((*c.CallOptions).DeleteTopic)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTopic(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTopic, req, settings.GRPC, c.logger, "DeleteTopic") return err }, opts...) return err @@ -926,7 +931,7 @@ func (c *gRPCClient) ListConsumerGroups(ctx context.Context, req *managedkafkapb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConsumerGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConsumerGroups, req, settings.GRPC, c.logger, "ListConsumerGroups") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *gRPCClient) GetConsumerGroup(ctx context.Context, req *managedkafkapb.G var resp *managedkafkapb.ConsumerGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConsumerGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConsumerGroup, req, settings.GRPC, c.logger, "GetConsumerGroup") return err }, opts...) if err != nil { @@ -979,7 +984,7 @@ func (c *gRPCClient) UpdateConsumerGroup(ctx context.Context, req *managedkafkap var resp *managedkafkapb.ConsumerGroup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConsumerGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConsumerGroup, req, settings.GRPC, c.logger, "UpdateConsumerGroup") return err }, opts...) if err != nil { @@ -996,7 +1001,7 @@ func (c *gRPCClient) DeleteConsumerGroup(ctx context.Context, req *managedkafkap opts = append((*c.CallOptions).DeleteConsumerGroup[0:len((*c.CallOptions).DeleteConsumerGroup):len((*c.CallOptions).DeleteConsumerGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteConsumerGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteConsumerGroup, req, settings.GRPC, c.logger, "DeleteConsumerGroup") return err }, opts...) return err @@ -1011,7 +1016,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1040,7 +1045,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1074,7 +1079,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1088,7 +1093,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1103,7 +1108,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1132,7 +1137,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1209,21 +1214,10 @@ func (c *restClient) ListClusters(ctx context.Context, req *managedkafkapb.ListC } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1286,17 +1280,7 @@ func (c *restClient) GetCluster(ctx context.Context, req *managedkafkapb.GetClus httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1356,21 +1340,10 @@ func (c *restClient) CreateCluster(ctx context.Context, req *managedkafkapb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1437,21 +1410,10 @@ func (c *restClient) UpdateCluster(ctx context.Context, req *managedkafkapb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1504,21 +1466,10 @@ func (c *restClient) DeleteCluster(ctx context.Context, req *managedkafkapb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1581,21 +1532,10 @@ func (c *restClient) ListTopics(ctx context.Context, req *managedkafkapb.ListTop } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTopics") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1658,17 +1598,7 @@ func (c *restClient) GetTopic(ctx context.Context, req *managedkafkapb.GetTopicR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTopic") if err != nil { return err } @@ -1726,17 +1656,7 @@ func (c *restClient) CreateTopic(ctx context.Context, req *managedkafkapb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTopic") if err != nil { return err } @@ -1800,17 +1720,7 @@ func (c *restClient) UpdateTopic(ctx context.Context, req *managedkafkapb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTopic") if err != nil { return err } @@ -1857,15 +1767,8 @@ func (c *restClient) DeleteTopic(ctx context.Context, req *managedkafkapb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTopic") + return err }, opts...) } @@ -1914,21 +1817,10 @@ func (c *restClient) ListConsumerGroups(ctx context.Context, req *managedkafkapb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConsumerGroups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1991,17 +1883,7 @@ func (c *restClient) GetConsumerGroup(ctx context.Context, req *managedkafkapb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConsumerGroup") if err != nil { return err } @@ -2065,17 +1947,7 @@ func (c *restClient) UpdateConsumerGroup(ctx context.Context, req *managedkafkap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConsumerGroup") if err != nil { return err } @@ -2122,15 +1994,8 @@ func (c *restClient) DeleteConsumerGroup(ctx context.Context, req *managedkafkap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConsumerGroup") + return err }, opts...) } @@ -2167,17 +2032,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2242,21 +2097,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2322,15 +2166,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2364,15 +2201,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2409,17 +2239,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2484,21 +2304,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/managedkafka/apiv1/managed_kafka_client_example_go123_test.go b/managedkafka/apiv1/managed_kafka_client_example_go123_test.go index d9d29dee3ce8..b1e27b227f63 100644 --- a/managedkafka/apiv1/managed_kafka_client_example_go123_test.go +++ b/managedkafka/apiv1/managed_kafka_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListConsumerGroups_all() { } for resp, err := range c.ListConsumerGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListTopics_all() { } for resp, err := range c.ListTopics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/managedkafka/apiv1/managedkafkapb/managed_kafka.pb.go b/managedkafka/apiv1/managedkafkapb/managed_kafka.pb.go index 731f661533ce..04d94c67592f 100755 --- a/managedkafka/apiv1/managedkafkapb/managed_kafka.pb.go +++ b/managedkafka/apiv1/managedkafkapb/managed_kafka.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/managedkafka/v1/managed_kafka.proto @@ -70,11 +70,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -85,7 +83,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -167,7 +163,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -230,7 +224,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -305,7 +297,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +373,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -396,7 +386,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +449,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -474,7 +462,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +514,9 @@ type ListTopicsRequest struct { func (x *ListTopicsRequest) Reset() { *x = ListTopicsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsRequest) String() string { @@ -541,7 +527,7 @@ func (*ListTopicsRequest) ProtoMessage() {} func (x *ListTopicsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +579,9 @@ type ListTopicsResponse struct { func (x *ListTopicsResponse) Reset() { *x = ListTopicsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsResponse) String() string { @@ -608,7 +592,7 @@ func (*ListTopicsResponse) ProtoMessage() {} func (x *ListTopicsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +635,9 @@ type GetTopicRequest struct { func (x *GetTopicRequest) Reset() { *x = GetTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTopicRequest) String() string { @@ -666,7 +648,7 @@ func (*GetTopicRequest) ProtoMessage() {} func (x *GetTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,11 +692,9 @@ type CreateTopicRequest struct { func (x *CreateTopicRequest) Reset() { *x = CreateTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTopicRequest) String() string { @@ -725,7 +705,7 @@ func (*CreateTopicRequest) ProtoMessage() {} func (x *CreateTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +759,9 @@ type UpdateTopicRequest struct { func (x *UpdateTopicRequest) Reset() { *x = UpdateTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTopicRequest) String() string { @@ -794,7 +772,7 @@ func (*UpdateTopicRequest) ProtoMessage() {} func (x *UpdateTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +814,9 @@ type DeleteTopicRequest struct { func (x *DeleteTopicRequest) Reset() { *x = DeleteTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTopicRequest) String() string { @@ -851,7 +827,7 @@ func (*DeleteTopicRequest) ProtoMessage() {} func (x *DeleteTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,11 +873,9 @@ type ListConsumerGroupsRequest struct { func (x *ListConsumerGroupsRequest) Reset() { *x = ListConsumerGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConsumerGroupsRequest) String() string { @@ -912,7 +886,7 @@ func (*ListConsumerGroupsRequest) ProtoMessage() {} func (x *ListConsumerGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +938,9 @@ type ListConsumerGroupsResponse struct { func (x *ListConsumerGroupsResponse) Reset() { *x = ListConsumerGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConsumerGroupsResponse) String() string { @@ -979,7 +951,7 @@ func (*ListConsumerGroupsResponse) ProtoMessage() {} func (x *ListConsumerGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1021,11 +993,9 @@ type GetConsumerGroupRequest struct { func (x *GetConsumerGroupRequest) Reset() { *x = GetConsumerGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConsumerGroupRequest) String() string { @@ -1036,7 +1006,7 @@ func (*GetConsumerGroupRequest) ProtoMessage() {} func (x *GetConsumerGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1076,11 +1046,9 @@ type UpdateConsumerGroupRequest struct { func (x *UpdateConsumerGroupRequest) Reset() { *x = UpdateConsumerGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConsumerGroupRequest) String() string { @@ -1091,7 +1059,7 @@ func (*UpdateConsumerGroupRequest) ProtoMessage() {} func (x *UpdateConsumerGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1133,11 +1101,9 @@ type DeleteConsumerGroupRequest struct { func (x *DeleteConsumerGroupRequest) Reset() { *x = DeleteConsumerGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConsumerGroupRequest) String() string { @@ -1148,7 +1114,7 @@ func (*DeleteConsumerGroupRequest) ProtoMessage() {} func (x *DeleteConsumerGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1644,212 +1610,6 @@ func file_google_cloud_managedkafka_v1_managed_kafka_proto_init() { return } file_google_cloud_managedkafka_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListConsumerGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListConsumerGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetConsumerGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConsumerGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_managed_kafka_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConsumerGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/managedkafka/apiv1/managedkafkapb/resources.pb.go b/managedkafka/apiv1/managedkafkapb/resources.pb.go index 45c1040d4fdc..7c47279569e6 100755 --- a/managedkafka/apiv1/managedkafkapb/resources.pb.go +++ b/managedkafka/apiv1/managedkafkapb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/managedkafka/v1/resources.proto @@ -183,11 +183,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -198,7 +196,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +316,9 @@ type CapacityConfig struct { func (x *CapacityConfig) Reset() { *x = CapacityConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CapacityConfig) String() string { @@ -333,7 +329,7 @@ func (*CapacityConfig) ProtoMessage() {} func (x *CapacityConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +371,9 @@ type RebalanceConfig struct { func (x *RebalanceConfig) Reset() { *x = RebalanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RebalanceConfig) String() string { @@ -390,7 +384,7 @@ func (*RebalanceConfig) ProtoMessage() {} func (x *RebalanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +428,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -449,7 +441,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +477,9 @@ type AccessConfig struct { func (x *AccessConfig) Reset() { *x = AccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessConfig) String() string { @@ -500,7 +490,7 @@ func (*AccessConfig) ProtoMessage() {} func (x *AccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +530,9 @@ type GcpConfig struct { func (x *GcpConfig) Reset() { *x = GcpConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpConfig) String() string { @@ -555,7 +543,7 @@ func (*GcpConfig) ProtoMessage() {} func (x *GcpConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +598,9 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic) String() string { @@ -625,7 +611,7 @@ func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +667,9 @@ type ConsumerTopicMetadata struct { func (x *ConsumerTopicMetadata) Reset() { *x = ConsumerTopicMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsumerTopicMetadata) String() string { @@ -696,7 +680,7 @@ func (*ConsumerTopicMetadata) ProtoMessage() {} func (x *ConsumerTopicMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +718,9 @@ type ConsumerPartitionMetadata struct { func (x *ConsumerPartitionMetadata) Reset() { *x = ConsumerPartitionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsumerPartitionMetadata) String() string { @@ -749,7 +731,7 @@ func (*ConsumerPartitionMetadata) ProtoMessage() {} func (x *ConsumerPartitionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +778,9 @@ type ConsumerGroup struct { func (x *ConsumerGroup) Reset() { *x = ConsumerGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsumerGroup) String() string { @@ -811,7 +791,7 @@ func (*ConsumerGroup) ProtoMessage() {} func (x *ConsumerGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +848,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -883,7 +861,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_managedkafka_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,140 +1220,6 @@ func file_google_cloud_managedkafka_v1_resources_proto_init() { if File_google_cloud_managedkafka_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CapacityConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RebalanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GcpConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ConsumerTopicMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ConsumerPartitionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ConsumerGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_managedkafka_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_managedkafka_v1_resources_proto_msgTypes[0].OneofWrappers = []any{ (*Cluster_GcpConfig)(nil), } diff --git a/maps/addressvalidation/apiv1/address_validation_client.go b/maps/addressvalidation/apiv1/address_validation_client.go index 9662b72001a0..77fb569089e2 100755 --- a/maps/addressvalidation/apiv1/address_validation_client.go +++ b/maps/addressvalidation/apiv1/address_validation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( addressvalidationpb "cloud.google.com/go/maps/addressvalidation/apiv1/addressvalidationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -190,6 +189,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new address validation client based on gRPC. @@ -216,6 +217,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: addressvalidationpb.NewAddressValidationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -262,6 +264,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new address validation rest client. @@ -279,6 +283,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,7 +333,7 @@ func (c *gRPCClient) ValidateAddress(ctx context.Context, req *addressvalidation var resp *addressvalidationpb.ValidateAddressResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ValidateAddress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ValidateAddress, req, settings.GRPC, c.logger, "ValidateAddress") return err }, opts...) if err != nil { @@ -343,7 +348,7 @@ func (c *gRPCClient) ProvideValidationFeedback(ctx context.Context, req *address var resp *addressvalidationpb.ProvideValidationFeedbackResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ProvideValidationFeedback(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ProvideValidationFeedback, req, settings.GRPC, c.logger, "ProvideValidationFeedback") return err }, opts...) if err != nil { @@ -388,17 +393,7 @@ func (c *restClient) ValidateAddress(ctx context.Context, req *addressvalidation httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateAddress") if err != nil { return err } @@ -455,17 +450,7 @@ func (c *restClient) ProvideValidationFeedback(ctx context.Context, req *address httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProvideValidationFeedback") if err != nil { return err } diff --git a/maps/addressvalidation/apiv1/addressvalidationpb/address.pb.go b/maps/addressvalidation/apiv1/addressvalidationpb/address.pb.go index 8709a0b723a7..f2a6933bd35d 100755 --- a/maps/addressvalidation/apiv1/addressvalidationpb/address.pb.go +++ b/maps/addressvalidation/apiv1/addressvalidationpb/address.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/addressvalidation/v1/address.proto @@ -148,11 +148,9 @@ type Address struct { func (x *Address) Reset() { *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Address) String() string { @@ -163,7 +161,7 @@ func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,11 +257,9 @@ type AddressComponent struct { func (x *AddressComponent) Reset() { *x = AddressComponent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressComponent) String() string { @@ -274,7 +270,7 @@ func (*AddressComponent) ProtoMessage() {} func (x *AddressComponent) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,11 +350,9 @@ type ComponentName struct { func (x *ComponentName) Reset() { *x = ComponentName{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentName) String() string { @@ -369,7 +363,7 @@ func (*ComponentName) ProtoMessage() {} func (x *ComponentName) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,44 +524,6 @@ func file_google_maps_addressvalidation_v1_address_proto_init() { if File_google_maps_addressvalidation_v1_address_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_addressvalidation_v1_address_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AddressComponent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComponentName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/addressvalidation/apiv1/addressvalidationpb/address_validation_service.pb.go b/maps/addressvalidation/apiv1/addressvalidationpb/address_validation_service.pb.go index 09885f961e49..82e6156e19f9 100755 --- a/maps/addressvalidation/apiv1/addressvalidationpb/address_validation_service.pb.go +++ b/maps/addressvalidation/apiv1/addressvalidationpb/address_validation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/addressvalidation/v1/address_validation_service.proto @@ -259,11 +259,9 @@ type ValidateAddressRequest struct { func (x *ValidateAddressRequest) Reset() { *x = ValidateAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAddressRequest) String() string { @@ -274,7 +272,7 @@ func (*ValidateAddressRequest) ProtoMessage() {} func (x *ValidateAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +330,9 @@ type ValidateAddressResponse struct { func (x *ValidateAddressResponse) Reset() { *x = ValidateAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateAddressResponse) String() string { @@ -347,7 +343,7 @@ func (*ValidateAddressResponse) ProtoMessage() {} func (x *ValidateAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +392,9 @@ type ProvideValidationFeedbackRequest struct { func (x *ProvideValidationFeedbackRequest) Reset() { *x = ProvideValidationFeedbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvideValidationFeedbackRequest) String() string { @@ -411,7 +405,7 @@ func (*ProvideValidationFeedbackRequest) ProtoMessage() {} func (x *ProvideValidationFeedbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +445,9 @@ type ProvideValidationFeedbackResponse struct { func (x *ProvideValidationFeedbackResponse) Reset() { *x = ProvideValidationFeedbackResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProvideValidationFeedbackResponse) String() string { @@ -466,7 +458,7 @@ func (*ProvideValidationFeedbackResponse) ProtoMessage() {} func (x *ProvideValidationFeedbackResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +495,9 @@ type ValidationResult struct { func (x *ValidationResult) Reset() { *x = ValidationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationResult) String() string { @@ -518,7 +508,7 @@ func (*ValidationResult) ProtoMessage() {} func (x *ValidationResult) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +616,9 @@ type Verdict struct { func (x *Verdict) Reset() { *x = Verdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Verdict) String() string { @@ -641,7 +629,7 @@ func (*Verdict) ProtoMessage() {} func (x *Verdict) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,80 +944,6 @@ func file_google_maps_addressvalidation_v1_address_validation_service_proto_init file_google_maps_addressvalidation_v1_geocode_proto_init() file_google_maps_addressvalidation_v1_metadata_proto_init() file_google_maps_addressvalidation_v1_usps_data_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ValidateAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProvideValidationFeedbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProvideValidationFeedbackResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ValidationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_address_validation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Verdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/addressvalidation/apiv1/addressvalidationpb/geocode.pb.go b/maps/addressvalidation/apiv1/addressvalidationpb/geocode.pb.go index b541ede3086a..d68b3eaea938 100755 --- a/maps/addressvalidation/apiv1/addressvalidationpb/geocode.pb.go +++ b/maps/addressvalidation/apiv1/addressvalidationpb/geocode.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/addressvalidation/v1/geocode.proto @@ -75,11 +75,9 @@ type Geocode struct { func (x *Geocode) Reset() { *x = Geocode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Geocode) String() string { @@ -90,7 +88,7 @@ func (*Geocode) ProtoMessage() {} func (x *Geocode) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +164,9 @@ type PlusCode struct { func (x *PlusCode) Reset() { *x = PlusCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlusCode) String() string { @@ -181,7 +177,7 @@ func (*PlusCode) ProtoMessage() {} func (x *PlusCode) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,32 +296,6 @@ func file_google_maps_addressvalidation_v1_geocode_proto_init() { if File_google_maps_addressvalidation_v1_geocode_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Geocode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_geocode_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PlusCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/addressvalidation/apiv1/addressvalidationpb/metadata.pb.go b/maps/addressvalidation/apiv1/addressvalidationpb/metadata.pb.go index b2893dd3f744..b517004559be 100755 --- a/maps/addressvalidation/apiv1/addressvalidationpb/metadata.pb.go +++ b/maps/addressvalidation/apiv1/addressvalidationpb/metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/addressvalidation/v1/metadata.proto @@ -55,11 +55,9 @@ type AddressMetadata struct { func (x *AddressMetadata) Reset() { *x = AddressMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddressMetadata) String() string { @@ -70,7 +68,7 @@ func (*AddressMetadata) ProtoMessage() {} func (x *AddressMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,20 +171,6 @@ func file_google_maps_addressvalidation_v1_metadata_proto_init() { if File_google_maps_addressvalidation_v1_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_addressvalidation_v1_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AddressMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_addressvalidation_v1_metadata_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/addressvalidation/apiv1/addressvalidationpb/usps_data.pb.go b/maps/addressvalidation/apiv1/addressvalidationpb/usps_data.pb.go index ac0054c9bfb7..989b717bf10c 100755 --- a/maps/addressvalidation/apiv1/addressvalidationpb/usps_data.pb.go +++ b/maps/addressvalidation/apiv1/addressvalidationpb/usps_data.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/addressvalidation/v1/usps_data.proto @@ -63,11 +63,9 @@ type UspsAddress struct { func (x *UspsAddress) Reset() { *x = UspsAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UspsAddress) String() string { @@ -78,7 +76,7 @@ func (*UspsAddress) ProtoMessage() {} func (x *UspsAddress) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +381,9 @@ type UspsData struct { func (x *UspsData) Reset() { *x = UspsData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UspsData) String() string { @@ -398,7 +394,7 @@ func (*UspsData) ProtoMessage() {} func (x *UspsData) ProtoReflect() protoreflect.Message { mi := &file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -855,32 +851,6 @@ func file_google_maps_addressvalidation_v1_usps_data_proto_init() { if File_google_maps_addressvalidation_v1_usps_data_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UspsAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_addressvalidation_v1_usps_data_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UspsData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/addressvalidation/apiv1/helpers.go b/maps/addressvalidation/apiv1/helpers.go index 3646a1738002..85890371ddc9 100755 --- a/maps/addressvalidation/apiv1/helpers.go +++ b/maps/addressvalidation/apiv1/helpers.go @@ -18,10 +18,20 @@ package addressvalidation import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "addressvalidation.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/areainsights/apiv1/area_insights_client.go b/maps/areainsights/apiv1/area_insights_client.go index 80457721a8f7..ecce1b2d1ed5 100755 --- a/maps/areainsights/apiv1/area_insights_client.go +++ b/maps/areainsights/apiv1/area_insights_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( areainsightspb "cloud.google.com/go/maps/areainsights/apiv1/areainsightspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -166,6 +165,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new area insights client based on gRPC. @@ -192,6 +193,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: areainsightspb.NewAreaInsightsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -238,6 +240,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new area insights rest client. @@ -255,6 +259,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,7 +309,7 @@ func (c *gRPCClient) ComputeInsights(ctx context.Context, req *areainsightspb.Co var resp *areainsightspb.ComputeInsightsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComputeInsights(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComputeInsights, req, settings.GRPC, c.logger, "ComputeInsights") return err }, opts...) if err != nil { @@ -359,17 +364,7 @@ func (c *restClient) ComputeInsights(ctx context.Context, req *areainsightspb.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ComputeInsights") if err != nil { return err } diff --git a/maps/areainsights/apiv1/areainsightspb/area_insights_service.pb.go b/maps/areainsights/apiv1/areainsightspb/area_insights_service.pb.go index 37d7e92149aa..4600ad667fdb 100755 --- a/maps/areainsights/apiv1/areainsightspb/area_insights_service.pb.go +++ b/maps/areainsights/apiv1/areainsightspb/area_insights_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/areainsights/v1/area_insights_service.proto @@ -291,11 +291,9 @@ type ComputeInsightsRequest struct { func (x *ComputeInsightsRequest) Reset() { *x = ComputeInsightsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInsightsRequest) String() string { @@ -306,7 +304,7 @@ func (*ComputeInsightsRequest) ProtoMessage() {} func (x *ComputeInsightsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,11 +347,9 @@ type ComputeInsightsResponse struct { func (x *ComputeInsightsResponse) Reset() { *x = ComputeInsightsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeInsightsResponse) String() string { @@ -364,7 +360,7 @@ func (*ComputeInsightsResponse) ProtoMessage() {} func (x *ComputeInsightsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +403,9 @@ type PlaceInsight struct { func (x *PlaceInsight) Reset() { *x = PlaceInsight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlaceInsight) String() string { @@ -422,7 +416,7 @@ func (*PlaceInsight) ProtoMessage() {} func (x *PlaceInsight) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +465,9 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -486,7 +478,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +548,9 @@ type LocationFilter struct { func (x *LocationFilter) Reset() { *x = LocationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter) String() string { @@ -571,7 +561,7 @@ func (*LocationFilter) ProtoMessage() {} func (x *LocationFilter) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +675,9 @@ type TypeFilter struct { func (x *TypeFilter) Reset() { *x = TypeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypeFilter) String() string { @@ -700,7 +688,7 @@ func (*TypeFilter) ProtoMessage() {} func (x *TypeFilter) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +747,9 @@ type RatingFilter struct { func (x *RatingFilter) Reset() { *x = RatingFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RatingFilter) String() string { @@ -774,7 +760,7 @@ func (*RatingFilter) ProtoMessage() {} func (x *RatingFilter) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +808,9 @@ type LocationFilter_Circle struct { func (x *LocationFilter_Circle) Reset() { *x = LocationFilter_Circle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter_Circle) String() string { @@ -837,7 +821,7 @@ func (*LocationFilter_Circle) ProtoMessage() {} func (x *LocationFilter_Circle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +900,9 @@ type LocationFilter_Region struct { func (x *LocationFilter_Region) Reset() { *x = LocationFilter_Region{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter_Region) String() string { @@ -931,7 +913,7 @@ func (*LocationFilter_Region) ProtoMessage() {} func (x *LocationFilter_Region) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -983,11 +965,9 @@ type LocationFilter_CustomArea struct { func (x *LocationFilter_CustomArea) Reset() { *x = LocationFilter_CustomArea{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter_CustomArea) String() string { @@ -998,7 +978,7 @@ func (*LocationFilter_CustomArea) ProtoMessage() {} func (x *LocationFilter_CustomArea) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1017,9 @@ type LocationFilter_CustomArea_Polygon struct { func (x *LocationFilter_CustomArea_Polygon) Reset() { *x = LocationFilter_CustomArea_Polygon{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter_CustomArea_Polygon) String() string { @@ -1052,7 +1030,7 @@ func (*LocationFilter_CustomArea_Polygon) ProtoMessage() {} func (x *LocationFilter_CustomArea_Polygon) ProtoReflect() protoreflect.Message { mi := &file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1329,140 +1307,6 @@ func file_google_maps_areainsights_v1_area_insights_service_proto_init() { if File_google_maps_areainsights_v1_area_insights_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInsightsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeInsightsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PlaceInsight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TypeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RatingFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter_Circle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter_Region); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter_CustomArea); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter_CustomArea_Polygon); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[1].OneofWrappers = []any{} file_google_maps_areainsights_v1_area_insights_service_proto_msgTypes[4].OneofWrappers = []any{ (*LocationFilter_Circle_)(nil), diff --git a/maps/areainsights/apiv1/helpers.go b/maps/areainsights/apiv1/helpers.go index 697918a0cbe9..c0fc5cdb9a32 100755 --- a/maps/areainsights/apiv1/helpers.go +++ b/maps/areainsights/apiv1/helpers.go @@ -18,10 +18,20 @@ package areainsights import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "areainsights.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/fleetengine/apiv1/fleetenginepb/fleetengine.pb.go b/maps/fleetengine/apiv1/fleetenginepb/fleetengine.pb.go index b25b93df9859..f22ba7c76617 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/fleetengine.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/fleetengine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/fleetengine.proto @@ -374,11 +374,9 @@ type TerminalPointId struct { func (x *TerminalPointId) Reset() { *x = TerminalPointId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminalPointId) String() string { @@ -389,7 +387,7 @@ func (*TerminalPointId) ProtoMessage() {} func (x *TerminalPointId) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +483,9 @@ type TerminalLocation struct { func (x *TerminalLocation) Reset() { *x = TerminalLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminalLocation) String() string { @@ -500,7 +496,7 @@ func (*TerminalLocation) ProtoMessage() {} func (x *TerminalLocation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +588,9 @@ type TripWaypoint struct { func (x *TripWaypoint) Reset() { *x = TripWaypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TripWaypoint) String() string { @@ -607,7 +601,7 @@ func (*TripWaypoint) ProtoMessage() {} func (x *TripWaypoint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +702,9 @@ type VehicleAttribute struct { func (x *VehicleAttribute) Reset() { *x = VehicleAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleAttribute) String() string { @@ -723,7 +715,7 @@ func (*VehicleAttribute) ProtoMessage() {} func (x *VehicleAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +893,9 @@ type VehicleLocation struct { func (x *VehicleLocation) Reset() { *x = VehicleLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleLocation) String() string { @@ -916,7 +906,7 @@ func (*VehicleLocation) ProtoMessage() {} func (x *VehicleLocation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1498,68 +1488,6 @@ func file_google_maps_fleetengine_v1_fleetengine_proto_init() { return } file_google_maps_fleetengine_v1_traffic_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TerminalPointId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TerminalLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TripWaypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VehicleAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VehicleLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_fleetengine_v1_fleetengine_proto_msgTypes[0].OneofWrappers = []any{ (*TerminalPointId_PlaceId)(nil), (*TerminalPointId_GeneratedId)(nil), diff --git a/maps/fleetengine/apiv1/fleetenginepb/header.pb.go b/maps/fleetengine/apiv1/fleetenginepb/header.pb.go index 71dc8dab4f00..5a3db85a3378 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/header.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/header.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/header.proto @@ -197,11 +197,9 @@ type RequestHeader struct { func (x *RequestHeader) Reset() { *x = RequestHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_header_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestHeader) String() string { @@ -212,7 +210,7 @@ func (*RequestHeader) ProtoMessage() {} func (x *RequestHeader) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_header_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,20 +410,6 @@ func file_google_maps_fleetengine_v1_header_proto_init() { if File_google_maps_fleetengine_v1_header_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_header_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RequestHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/fleetenginepb/traffic.pb.go b/maps/fleetengine/apiv1/fleetenginepb/traffic.pb.go index 1e4da5dcf9f1..3822dfa3296f 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/traffic.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/traffic.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/traffic.proto @@ -112,11 +112,9 @@ type SpeedReadingInterval struct { func (x *SpeedReadingInterval) Reset() { *x = SpeedReadingInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeedReadingInterval) String() string { @@ -127,7 +125,7 @@ func (*SpeedReadingInterval) ProtoMessage() {} func (x *SpeedReadingInterval) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,11 +179,9 @@ type ConsumableTrafficPolyline struct { func (x *ConsumableTrafficPolyline) Reset() { *x = ConsumableTrafficPolyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConsumableTrafficPolyline) String() string { @@ -196,7 +192,7 @@ func (*ConsumableTrafficPolyline) ProtoMessage() {} func (x *ConsumableTrafficPolyline) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_traffic_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,32 +308,6 @@ func file_google_maps_fleetengine_v1_traffic_proto_init() { if File_google_maps_fleetengine_v1_traffic_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_traffic_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeedReadingInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_traffic_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ConsumableTrafficPolyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/fleetenginepb/trip_api.pb.go b/maps/fleetengine/apiv1/fleetenginepb/trip_api.pb.go index 948e1607bf12..7669de216d4a 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/trip_api.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/trip_api.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/trip_api.proto @@ -158,11 +158,9 @@ type CreateTripRequest struct { func (x *CreateTripRequest) Reset() { *x = CreateTripRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTripRequest) String() string { @@ -173,7 +171,7 @@ func (*CreateTripRequest) ProtoMessage() {} func (x *CreateTripRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +261,9 @@ type GetTripRequest struct { func (x *GetTripRequest) Reset() { *x = GetTripRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTripRequest) String() string { @@ -278,7 +274,7 @@ func (*GetTripRequest) ProtoMessage() {} func (x *GetTripRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +374,9 @@ type ReportBillableTripRequest struct { func (x *ReportBillableTripRequest) Reset() { *x = ReportBillableTripRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportBillableTripRequest) String() string { @@ -393,7 +387,7 @@ func (*ReportBillableTripRequest) ProtoMessage() {} func (x *ReportBillableTripRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +499,9 @@ type UpdateTripRequest struct { func (x *UpdateTripRequest) Reset() { *x = UpdateTripRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTripRequest) String() string { @@ -520,7 +512,7 @@ func (*UpdateTripRequest) ProtoMessage() {} func (x *UpdateTripRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +591,9 @@ type SearchTripsRequest struct { func (x *SearchTripsRequest) Reset() { *x = SearchTripsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTripsRequest) String() string { @@ -614,7 +604,7 @@ func (*SearchTripsRequest) ProtoMessage() {} func (x *SearchTripsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +684,9 @@ type SearchTripsResponse struct { func (x *SearchTripsResponse) Reset() { *x = SearchTripsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTripsResponse) String() string { @@ -709,7 +697,7 @@ func (*SearchTripsResponse) ProtoMessage() {} func (x *SearchTripsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,80 +1032,6 @@ func file_google_maps_fleetengine_v1_trip_api_proto_init() { file_google_maps_fleetengine_v1_fleetengine_proto_init() file_google_maps_fleetengine_v1_header_proto_init() file_google_maps_fleetengine_v1_trips_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTripRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTripRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReportBillableTripRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTripRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchTripsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trip_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchTripsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/fleetenginepb/trips.pb.go b/maps/fleetengine/apiv1/fleetenginepb/trips.pb.go index 070fbadb9fdf..1a3fcab3008f 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/trips.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/trips.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/trips.proto @@ -387,11 +387,9 @@ type Trip struct { func (x *Trip) Reset() { *x = Trip{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trip) String() string { @@ -402,7 +400,7 @@ func (*Trip) ProtoMessage() {} func (x *Trip) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -666,11 +664,9 @@ type StopLocation struct { func (x *StopLocation) Reset() { *x = StopLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopLocation) String() string { @@ -681,7 +677,7 @@ func (*StopLocation) ProtoMessage() {} func (x *StopLocation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_trips_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1047,32 +1043,6 @@ func file_google_maps_fleetengine_v1_trips_proto_init() { } file_google_maps_fleetengine_v1_fleetengine_proto_init() file_google_maps_fleetengine_v1_traffic_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_trips_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Trip); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_trips_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StopLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/fleetenginepb/vehicle_api.pb.go b/maps/fleetengine/apiv1/fleetenginepb/vehicle_api.pb.go index 19bda94f65e5..a2c8bd15945b 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/vehicle_api.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/vehicle_api.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/vehicle_api.proto @@ -293,11 +293,9 @@ type CreateVehicleRequest struct { func (x *CreateVehicleRequest) Reset() { *x = CreateVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVehicleRequest) String() string { @@ -308,7 +306,7 @@ func (*CreateVehicleRequest) ProtoMessage() {} func (x *CreateVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +378,9 @@ type GetVehicleRequest struct { func (x *GetVehicleRequest) Reset() { *x = GetVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVehicleRequest) String() string { @@ -395,7 +391,7 @@ func (*GetVehicleRequest) ProtoMessage() {} func (x *GetVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +472,9 @@ type UpdateVehicleRequest struct { func (x *UpdateVehicleRequest) Reset() { *x = UpdateVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVehicleRequest) String() string { @@ -491,7 +485,7 @@ func (*UpdateVehicleRequest) ProtoMessage() {} func (x *UpdateVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +548,9 @@ type UpdateVehicleAttributesRequest struct { func (x *UpdateVehicleAttributesRequest) Reset() { *x = UpdateVehicleAttributesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVehicleAttributesRequest) String() string { @@ -569,7 +561,7 @@ func (*UpdateVehicleAttributesRequest) ProtoMessage() {} func (x *UpdateVehicleAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +610,9 @@ type UpdateVehicleAttributesResponse struct { func (x *UpdateVehicleAttributesResponse) Reset() { *x = UpdateVehicleAttributesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVehicleAttributesResponse) String() string { @@ -633,7 +623,7 @@ func (*UpdateVehicleAttributesResponse) ProtoMessage() {} func (x *UpdateVehicleAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +790,9 @@ type SearchVehiclesRequest struct { func (x *SearchVehiclesRequest) Reset() { *x = SearchVehiclesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchVehiclesRequest) String() string { @@ -815,7 +803,7 @@ func (*SearchVehiclesRequest) ProtoMessage() {} func (x *SearchVehiclesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,11 +957,9 @@ type SearchVehiclesResponse struct { func (x *SearchVehiclesResponse) Reset() { *x = SearchVehiclesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchVehiclesResponse) String() string { @@ -984,7 +970,7 @@ func (*SearchVehiclesResponse) ProtoMessage() {} func (x *SearchVehiclesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1122,9 @@ type ListVehiclesRequest struct { func (x *ListVehiclesRequest) Reset() { *x = ListVehiclesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVehiclesRequest) String() string { @@ -1151,7 +1135,7 @@ func (*ListVehiclesRequest) ProtoMessage() {} func (x *ListVehiclesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1275,9 @@ type ListVehiclesResponse struct { func (x *ListVehiclesResponse) Reset() { *x = ListVehiclesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVehiclesResponse) String() string { @@ -1306,7 +1288,7 @@ func (*ListVehiclesResponse) ProtoMessage() {} func (x *ListVehiclesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,11 +1340,9 @@ type Waypoint struct { func (x *Waypoint) Reset() { *x = Waypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Waypoint) String() string { @@ -1373,7 +1353,7 @@ func (*Waypoint) ProtoMessage() {} func (x *Waypoint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1444,9 @@ type VehicleMatch struct { func (x *VehicleMatch) Reset() { *x = VehicleMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleMatch) String() string { @@ -1479,7 +1457,7 @@ func (*VehicleMatch) ProtoMessage() {} func (x *VehicleMatch) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1583,11 +1561,9 @@ type VehicleAttributeList struct { func (x *VehicleAttributeList) Reset() { *x = VehicleAttributeList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleAttributeList) String() string { @@ -1598,7 +1574,7 @@ func (*VehicleAttributeList) ProtoMessage() {} func (x *VehicleAttributeList) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2183,152 +2159,6 @@ func file_google_maps_fleetengine_v1_vehicle_api_proto_init() { file_google_maps_fleetengine_v1_fleetengine_proto_init() file_google_maps_fleetengine_v1_header_proto_init() file_google_maps_fleetengine_v1_vehicles_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVehicleAttributesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVehicleAttributesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchVehiclesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchVehiclesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListVehiclesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListVehiclesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Waypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VehicleMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicle_api_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*VehicleAttributeList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/fleetenginepb/vehicles.pb.go b/maps/fleetengine/apiv1/fleetenginepb/vehicles.pb.go index 9ac64b800fc9..ee5bdeb4a9f0 100755 --- a/maps/fleetengine/apiv1/fleetenginepb/vehicles.pb.go +++ b/maps/fleetengine/apiv1/fleetenginepb/vehicles.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/v1/vehicles.proto @@ -507,11 +507,9 @@ type Vehicle struct { func (x *Vehicle) Reset() { *x = Vehicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle) String() string { @@ -522,7 +520,7 @@ func (*Vehicle) ProtoMessage() {} func (x *Vehicle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +706,9 @@ type BatteryInfo struct { func (x *BatteryInfo) Reset() { *x = BatteryInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatteryInfo) String() string { @@ -723,7 +719,7 @@ func (*BatteryInfo) ProtoMessage() {} func (x *BatteryInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +774,9 @@ type DeviceSettings struct { func (x *DeviceSettings) Reset() { *x = DeviceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceSettings) String() string { @@ -793,7 +787,7 @@ func (*DeviceSettings) ProtoMessage() {} func (x *DeviceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -858,11 +852,9 @@ type LicensePlate struct { func (x *LicensePlate) Reset() { *x = LicensePlate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LicensePlate) String() string { @@ -873,7 +865,7 @@ func (*LicensePlate) ProtoMessage() {} func (x *LicensePlate) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +912,9 @@ type VisualTrafficReportPolylineRendering struct { func (x *VisualTrafficReportPolylineRendering) Reset() { *x = VisualTrafficReportPolylineRendering{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VisualTrafficReportPolylineRendering) String() string { @@ -935,7 +925,7 @@ func (*VisualTrafficReportPolylineRendering) ProtoMessage() {} func (x *VisualTrafficReportPolylineRendering) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,11 +960,9 @@ type TrafficPolylineData struct { func (x *TrafficPolylineData) Reset() { *x = TrafficPolylineData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficPolylineData) String() string { @@ -985,7 +973,7 @@ func (*TrafficPolylineData) ProtoMessage() {} func (x *TrafficPolylineData) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,11 +1007,9 @@ type Vehicle_VehicleType struct { func (x *Vehicle_VehicleType) Reset() { *x = Vehicle_VehicleType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_VehicleType) String() string { @@ -1034,7 +1020,7 @@ func (*Vehicle_VehicleType) ProtoMessage() {} func (x *Vehicle_VehicleType) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1059,9 @@ type VisualTrafficReportPolylineRendering_RoadStretch struct { func (x *VisualTrafficReportPolylineRendering_RoadStretch) Reset() { *x = VisualTrafficReportPolylineRendering_RoadStretch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VisualTrafficReportPolylineRendering_RoadStretch) String() string { @@ -1088,7 +1072,7 @@ func (*VisualTrafficReportPolylineRendering_RoadStretch) ProtoMessage() {} func (x *VisualTrafficReportPolylineRendering_RoadStretch) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1467,104 +1451,6 @@ func file_google_maps_fleetengine_v1_vehicles_proto_init() { return } file_google_maps_fleetengine_v1_fleetengine_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatteryInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeviceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LicensePlate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VisualTrafficReportPolylineRendering); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TrafficPolylineData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_VehicleType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_v1_vehicles_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VisualTrafficReportPolylineRendering_RoadStretch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/apiv1/helpers.go b/maps/fleetengine/apiv1/helpers.go index 9831ddbb4fc5..b4b7636bd0cb 100755 --- a/maps/fleetengine/apiv1/helpers.go +++ b/maps/fleetengine/apiv1/helpers.go @@ -18,10 +18,16 @@ package fleetengine import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "fleetengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/fleetengine/apiv1/trip_client.go b/maps/fleetengine/apiv1/trip_client.go index 3168d6d4681f..f9ebda4a5048 100755 --- a/maps/fleetengine/apiv1/trip_client.go +++ b/maps/fleetengine/apiv1/trip_client.go @@ -19,6 +19,7 @@ package fleetengine import ( "context" "fmt" + "log/slog" "math" "net/url" "regexp" @@ -203,6 +204,8 @@ type tripGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTripClient creates a new trip service client based on gRPC. @@ -229,6 +232,7 @@ func NewTripClient(ctx context.Context, opts ...option.ClientOption) (*TripClien connPool: connPool, tripClient: fleetenginepb.NewTripServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -280,7 +284,7 @@ func (c *tripGRPCClient) CreateTrip(ctx context.Context, req *fleetenginepb.Crea var resp *fleetenginepb.Trip err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tripClient.CreateTrip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tripClient.CreateTrip, req, settings.GRPC, c.logger, "CreateTrip") return err }, opts...) if err != nil { @@ -307,7 +311,7 @@ func (c *tripGRPCClient) GetTrip(ctx context.Context, req *fleetenginepb.GetTrip var resp *fleetenginepb.Trip err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tripClient.GetTrip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tripClient.GetTrip, req, settings.GRPC, c.logger, "GetTrip") return err }, opts...) if err != nil { @@ -333,7 +337,7 @@ func (c *tripGRPCClient) ReportBillableTrip(ctx context.Context, req *fleetengin opts = append((*c.CallOptions).ReportBillableTrip[0:len((*c.CallOptions).ReportBillableTrip):len((*c.CallOptions).ReportBillableTrip)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.tripClient.ReportBillableTrip(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.tripClient.ReportBillableTrip, req, settings.GRPC, c.logger, "ReportBillableTrip") return err }, opts...) return err @@ -368,7 +372,7 @@ func (c *tripGRPCClient) SearchTrips(ctx context.Context, req *fleetenginepb.Sea } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tripClient.SearchTrips(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tripClient.SearchTrips, req, settings.GRPC, c.logger, "SearchTrips") return err }, opts...) if err != nil { @@ -412,7 +416,7 @@ func (c *tripGRPCClient) UpdateTrip(ctx context.Context, req *fleetenginepb.Upda var resp *fleetenginepb.Trip err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tripClient.UpdateTrip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tripClient.UpdateTrip, req, settings.GRPC, c.logger, "UpdateTrip") return err }, opts...) if err != nil { diff --git a/maps/fleetengine/apiv1/trip_client_example_go123_test.go b/maps/fleetengine/apiv1/trip_client_example_go123_test.go index 40e0fe1a5ffe..2a38a984ae1f 100644 --- a/maps/fleetengine/apiv1/trip_client_example_go123_test.go +++ b/maps/fleetengine/apiv1/trip_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTripClient_SearchTrips_all() { } for resp, err := range c.SearchTrips(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/maps/fleetengine/apiv1/vehicle_client.go b/maps/fleetengine/apiv1/vehicle_client.go index e723d5b41110..3b5b98fb0ab0 100755 --- a/maps/fleetengine/apiv1/vehicle_client.go +++ b/maps/fleetengine/apiv1/vehicle_client.go @@ -19,6 +19,7 @@ package fleetengine import ( "context" "fmt" + "log/slog" "math" "net/url" "regexp" @@ -289,6 +290,8 @@ type vehicleGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVehicleClient creates a new vehicle service client based on gRPC. @@ -315,6 +318,7 @@ func NewVehicleClient(ctx context.Context, opts ...option.ClientOption) (*Vehicl connPool: connPool, vehicleClient: fleetenginepb.NewVehicleServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -366,7 +370,7 @@ func (c *vehicleGRPCClient) CreateVehicle(ctx context.Context, req *fleetenginep var resp *fleetenginepb.Vehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.CreateVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.CreateVehicle, req, settings.GRPC, c.logger, "CreateVehicle") return err }, opts...) if err != nil { @@ -393,7 +397,7 @@ func (c *vehicleGRPCClient) GetVehicle(ctx context.Context, req *fleetenginepb.G var resp *fleetenginepb.Vehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.GetVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.GetVehicle, req, settings.GRPC, c.logger, "GetVehicle") return err }, opts...) if err != nil { @@ -420,7 +424,7 @@ func (c *vehicleGRPCClient) UpdateVehicle(ctx context.Context, req *fleetenginep var resp *fleetenginepb.Vehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.UpdateVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.UpdateVehicle, req, settings.GRPC, c.logger, "UpdateVehicle") return err }, opts...) if err != nil { @@ -447,7 +451,7 @@ func (c *vehicleGRPCClient) UpdateVehicleAttributes(ctx context.Context, req *fl var resp *fleetenginepb.UpdateVehicleAttributesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.UpdateVehicleAttributes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.UpdateVehicleAttributes, req, settings.GRPC, c.logger, "UpdateVehicleAttributes") return err }, opts...) if err != nil { @@ -485,7 +489,7 @@ func (c *vehicleGRPCClient) ListVehicles(ctx context.Context, req *fleetenginepb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.ListVehicles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.ListVehicles, req, settings.GRPC, c.logger, "ListVehicles") return err }, opts...) if err != nil { @@ -529,7 +533,7 @@ func (c *vehicleGRPCClient) SearchVehicles(ctx context.Context, req *fleetengine var resp *fleetenginepb.SearchVehiclesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.vehicleClient.SearchVehicles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.vehicleClient.SearchVehicles, req, settings.GRPC, c.logger, "SearchVehicles") return err }, opts...) if err != nil { diff --git a/maps/fleetengine/apiv1/vehicle_client_example_go123_test.go b/maps/fleetengine/apiv1/vehicle_client_example_go123_test.go index baac5e112aab..3359b1366363 100644 --- a/maps/fleetengine/apiv1/vehicle_client_example_go123_test.go +++ b/maps/fleetengine/apiv1/vehicle_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleVehicleClient_ListVehicles_all() { } for resp, err := range c.ListVehicles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/maps/fleetengine/delivery/apiv1/delivery_client.go b/maps/fleetengine/delivery/apiv1/delivery_client.go index e3a45f048a7b..0094f59e0e7d 100755 --- a/maps/fleetengine/delivery/apiv1/delivery_client.go +++ b/maps/fleetengine/delivery/apiv1/delivery_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( deliverypb "cloud.google.com/go/maps/fleetengine/delivery/apiv1/deliverypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -436,6 +435,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new delivery service client based on gRPC. @@ -462,6 +463,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: deliverypb.NewDeliveryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -508,6 +510,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new delivery service rest client. @@ -525,6 +529,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -586,7 +591,7 @@ func (c *gRPCClient) CreateDeliveryVehicle(ctx context.Context, req *deliverypb. var resp *deliverypb.DeliveryVehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDeliveryVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDeliveryVehicle, req, settings.GRPC, c.logger, "CreateDeliveryVehicle") return err }, opts...) if err != nil { @@ -613,7 +618,7 @@ func (c *gRPCClient) GetDeliveryVehicle(ctx context.Context, req *deliverypb.Get var resp *deliverypb.DeliveryVehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDeliveryVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDeliveryVehicle, req, settings.GRPC, c.logger, "GetDeliveryVehicle") return err }, opts...) if err != nil { @@ -640,7 +645,7 @@ func (c *gRPCClient) UpdateDeliveryVehicle(ctx context.Context, req *deliverypb. var resp *deliverypb.DeliveryVehicle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDeliveryVehicle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDeliveryVehicle, req, settings.GRPC, c.logger, "UpdateDeliveryVehicle") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *gRPCClient) BatchCreateTasks(ctx context.Context, req *deliverypb.Batch var resp *deliverypb.BatchCreateTasksResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchCreateTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchCreateTasks, req, settings.GRPC, c.logger, "BatchCreateTasks") return err }, opts...) if err != nil { @@ -694,7 +699,7 @@ func (c *gRPCClient) CreateTask(ctx context.Context, req *deliverypb.CreateTaskR var resp *deliverypb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTask, req, settings.GRPC, c.logger, "CreateTask") return err }, opts...) if err != nil { @@ -721,7 +726,7 @@ func (c *gRPCClient) GetTask(ctx context.Context, req *deliverypb.GetTaskRequest var resp *deliverypb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -748,7 +753,7 @@ func (c *gRPCClient) UpdateTask(ctx context.Context, req *deliverypb.UpdateTaskR var resp *deliverypb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTask, req, settings.GRPC, c.logger, "UpdateTask") return err }, opts...) if err != nil { @@ -786,7 +791,7 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *deliverypb.ListTasksReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *gRPCClient) GetTaskTrackingInfo(ctx context.Context, req *deliverypb.Ge var resp *deliverypb.TaskTrackingInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTaskTrackingInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTaskTrackingInfo, req, settings.GRPC, c.logger, "GetTaskTrackingInfo") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *gRPCClient) ListDeliveryVehicles(ctx context.Context, req *deliverypb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeliveryVehicles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeliveryVehicles, req, settings.GRPC, c.logger, "ListDeliveryVehicles") return err }, opts...) if err != nil { @@ -978,17 +983,7 @@ func (c *restClient) CreateDeliveryVehicle(ctx context.Context, req *deliverypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeliveryVehicle") if err != nil { return err } @@ -1081,17 +1076,7 @@ func (c *restClient) GetDeliveryVehicle(ctx context.Context, req *deliverypb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeliveryVehicle") if err != nil { return err } @@ -1204,17 +1189,7 @@ func (c *restClient) UpdateDeliveryVehicle(ctx context.Context, req *deliverypb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeliveryVehicle") if err != nil { return err } @@ -1279,17 +1254,7 @@ func (c *restClient) BatchCreateTasks(ctx context.Context, req *deliverypb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateTasks") if err != nil { return err } @@ -1390,17 +1355,7 @@ func (c *restClient) CreateTask(ctx context.Context, req *deliverypb.CreateTaskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTask") if err != nil { return err } @@ -1493,17 +1448,7 @@ func (c *restClient) GetTask(ctx context.Context, req *deliverypb.GetTaskRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -1610,17 +1555,7 @@ func (c *restClient) UpdateTask(ctx context.Context, req *deliverypb.UpdateTaskR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTask") if err != nil { return err } @@ -1719,21 +1654,10 @@ func (c *restClient) ListTasks(ctx context.Context, req *deliverypb.ListTasksReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1839,17 +1763,7 @@ func (c *restClient) GetTaskTrackingInfo(ctx context.Context, req *deliverypb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTaskTrackingInfo") if err != nil { return err } @@ -1960,21 +1874,10 @@ func (c *restClient) ListDeliveryVehicles(ctx context.Context, req *deliverypb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeliveryVehicles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/maps/fleetengine/delivery/apiv1/delivery_client_example_go123_test.go b/maps/fleetengine/delivery/apiv1/delivery_client_example_go123_test.go index d22655d4fa35..02ed0eae9a29 100644 --- a/maps/fleetengine/delivery/apiv1/delivery_client_example_go123_test.go +++ b/maps/fleetengine/delivery/apiv1/delivery_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDeliveryVehicles_all() { } for resp, err := range c.ListDeliveryVehicles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/common.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/common.pb.go index f9c2229b3b7a..6eacd1643da9 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/common.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/common.proto @@ -208,11 +208,9 @@ type DeliveryVehicleAttribute struct { func (x *DeliveryVehicleAttribute) Reset() { *x = DeliveryVehicleAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryVehicleAttribute) String() string { @@ -223,7 +221,7 @@ func (*DeliveryVehicleAttribute) ProtoMessage() {} func (x *DeliveryVehicleAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +402,9 @@ type DeliveryVehicleLocation struct { func (x *DeliveryVehicleLocation) Reset() { *x = DeliveryVehicleLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryVehicleLocation) String() string { @@ -419,7 +415,7 @@ func (*DeliveryVehicleLocation) ProtoMessage() {} func (x *DeliveryVehicleLocation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +646,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -665,7 +659,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +710,9 @@ type TaskAttribute struct { func (x *TaskAttribute) Reset() { *x = TaskAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskAttribute) String() string { @@ -731,7 +723,7 @@ func (*TaskAttribute) ProtoMessage() {} func (x *TaskAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,56 +1091,6 @@ func file_google_maps_fleetengine_delivery_v1_common_proto_init() { if File_google_maps_fleetengine_delivery_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryVehicleAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryVehicleLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TaskAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_fleetengine_delivery_v1_common_proto_msgTypes[0].OneofWrappers = []any{ (*DeliveryVehicleAttribute_StringValue)(nil), (*DeliveryVehicleAttribute_BoolValue)(nil), diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/delivery_api.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/delivery_api.pb.go index 5a7a404d4b6e..158772137ffb 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/delivery_api.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/delivery_api.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/delivery_api.proto @@ -77,11 +77,9 @@ type CreateDeliveryVehicleRequest struct { func (x *CreateDeliveryVehicleRequest) Reset() { *x = CreateDeliveryVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeliveryVehicleRequest) String() string { @@ -92,7 +90,7 @@ func (*CreateDeliveryVehicleRequest) ProtoMessage() {} func (x *CreateDeliveryVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type GetDeliveryVehicleRequest struct { func (x *GetDeliveryVehicleRequest) Reset() { *x = GetDeliveryVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeliveryVehicleRequest) String() string { @@ -167,7 +163,7 @@ func (*GetDeliveryVehicleRequest) ProtoMessage() {} func (x *GetDeliveryVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type ListDeliveryVehiclesRequest struct { func (x *ListDeliveryVehiclesRequest) Reset() { *x = ListDeliveryVehiclesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeliveryVehiclesRequest) String() string { @@ -259,7 +253,7 @@ func (*ListDeliveryVehiclesRequest) ProtoMessage() {} func (x *ListDeliveryVehiclesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +332,9 @@ type ListDeliveryVehiclesResponse struct { func (x *ListDeliveryVehiclesResponse) Reset() { *x = ListDeliveryVehiclesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeliveryVehiclesResponse) String() string { @@ -353,7 +345,7 @@ func (*ListDeliveryVehiclesResponse) ProtoMessage() {} func (x *ListDeliveryVehiclesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +402,9 @@ type UpdateDeliveryVehicleRequest struct { func (x *UpdateDeliveryVehicleRequest) Reset() { *x = UpdateDeliveryVehicleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeliveryVehicleRequest) String() string { @@ -425,7 +415,7 @@ func (*UpdateDeliveryVehicleRequest) ProtoMessage() {} func (x *UpdateDeliveryVehicleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +475,9 @@ type BatchCreateTasksRequest struct { func (x *BatchCreateTasksRequest) Reset() { *x = BatchCreateTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTasksRequest) String() string { @@ -500,7 +488,7 @@ func (*BatchCreateTasksRequest) ProtoMessage() {} func (x *BatchCreateTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +536,9 @@ type BatchCreateTasksResponse struct { func (x *BatchCreateTasksResponse) Reset() { *x = BatchCreateTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateTasksResponse) String() string { @@ -563,7 +549,7 @@ func (*BatchCreateTasksResponse) ProtoMessage() {} func (x *BatchCreateTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +611,9 @@ type CreateTaskRequest struct { func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -640,7 +624,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +683,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -714,7 +696,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +760,9 @@ type UpdateTaskRequest struct { func (x *UpdateTaskRequest) Reset() { *x = UpdateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTaskRequest) String() string { @@ -793,7 +773,7 @@ func (*UpdateTaskRequest) ProtoMessage() {} func (x *UpdateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -861,11 +841,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -876,7 +854,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +927,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -964,7 +940,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +994,9 @@ type GetTaskTrackingInfoRequest struct { func (x *GetTaskTrackingInfoRequest) Reset() { *x = GetTaskTrackingInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskTrackingInfoRequest) String() string { @@ -1033,7 +1007,7 @@ func (*GetTaskTrackingInfoRequest) ProtoMessage() {} func (x *GetTaskTrackingInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1544,164 +1518,6 @@ func file_google_maps_fleetengine_delivery_v1_delivery_api_proto_init() { file_google_maps_fleetengine_delivery_v1_header_proto_init() file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_init() file_google_maps_fleetengine_delivery_v1_tasks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeliveryVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDeliveryVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDeliveryVehiclesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDeliveryVehiclesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeliveryVehicleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_api_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskTrackingInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/delivery_vehicles.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/delivery_vehicles.pb.go index 43275dd7f84e..1b516293814a 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/delivery_vehicles.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/delivery_vehicles.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/delivery_vehicles.proto @@ -256,11 +256,9 @@ type DeliveryVehicle struct { func (x *DeliveryVehicle) Reset() { *x = DeliveryVehicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryVehicle) String() string { @@ -271,7 +269,7 @@ func (*DeliveryVehicle) ProtoMessage() {} func (x *DeliveryVehicle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type LocationInfo struct { func (x *LocationInfo) Reset() { *x = LocationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationInfo) String() string { @@ -383,7 +379,7 @@ func (*LocationInfo) ProtoMessage() {} func (x *LocationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +452,9 @@ type VehicleJourneySegment struct { func (x *VehicleJourneySegment) Reset() { *x = VehicleJourneySegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleJourneySegment) String() string { @@ -471,7 +465,7 @@ func (*VehicleJourneySegment) ProtoMessage() {} func (x *VehicleJourneySegment) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +528,9 @@ type VehicleStop struct { func (x *VehicleStop) Reset() { *x = VehicleStop{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleStop) String() string { @@ -549,7 +541,7 @@ func (*VehicleStop) ProtoMessage() {} func (x *VehicleStop) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +602,9 @@ type VehicleStop_TaskInfo struct { func (x *VehicleStop_TaskInfo) Reset() { *x = VehicleStop_TaskInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleStop_TaskInfo) String() string { @@ -625,7 +615,7 @@ func (*VehicleStop_TaskInfo) ProtoMessage() {} func (x *VehicleStop_TaskInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,68 +875,6 @@ func file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_init() { return } file_google_maps_fleetengine_delivery_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryVehicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LocationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VehicleJourneySegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VehicleStop); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VehicleStop_TaskInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/header.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/header.pb.go index 34c6fb22ab8a..481d612d5ce4 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/header.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/header.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/header.proto @@ -197,11 +197,9 @@ type DeliveryRequestHeader struct { func (x *DeliveryRequestHeader) Reset() { *x = DeliveryRequestHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_header_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryRequestHeader) String() string { @@ -212,7 +210,7 @@ func (*DeliveryRequestHeader) ProtoMessage() {} func (x *DeliveryRequestHeader) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_header_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,20 +417,6 @@ func file_google_maps_fleetengine_delivery_v1_header_proto_init() { if File_google_maps_fleetengine_delivery_v1_header_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_header_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryRequestHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/task_tracking_info.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/task_tracking_info.pb.go index fad9364d162e..0e6465dcc7e6 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/task_tracking_info.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/task_tracking_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/task_tracking_info.proto @@ -92,11 +92,9 @@ type TaskTrackingInfo struct { func (x *TaskTrackingInfo) Reset() { *x = TaskTrackingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskTrackingInfo) String() string { @@ -107,7 +105,7 @@ func (*TaskTrackingInfo) ProtoMessage() {} func (x *TaskTrackingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,20 +393,6 @@ func file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_init() { file_google_maps_fleetengine_delivery_v1_common_proto_init() file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_init() file_google_maps_fleetengine_delivery_v1_tasks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_task_tracking_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TaskTrackingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/fleetengine/delivery/apiv1/deliverypb/tasks.pb.go b/maps/fleetengine/delivery/apiv1/deliverypb/tasks.pb.go index 4f9aa1c01698..64ced9bbb2aa 100755 --- a/maps/fleetengine/delivery/apiv1/deliverypb/tasks.pb.go +++ b/maps/fleetengine/delivery/apiv1/deliverypb/tasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/fleetengine/delivery/v1/tasks.proto @@ -348,11 +348,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -363,7 +361,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +516,9 @@ type TaskTrackingViewConfig struct { func (x *TaskTrackingViewConfig) Reset() { *x = TaskTrackingViewConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskTrackingViewConfig) String() string { @@ -533,7 +529,7 @@ func (*TaskTrackingViewConfig) ProtoMessage() {} func (x *TaskTrackingViewConfig) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +620,9 @@ type Task_JourneySharingInfo struct { func (x *Task_JourneySharingInfo) Reset() { *x = Task_JourneySharingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task_JourneySharingInfo) String() string { @@ -639,7 +633,7 @@ func (*Task_JourneySharingInfo) ProtoMessage() {} func (x *Task_JourneySharingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +690,9 @@ type TaskTrackingViewConfig_VisibilityOption struct { func (x *TaskTrackingViewConfig_VisibilityOption) Reset() { *x = TaskTrackingViewConfig_VisibilityOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskTrackingViewConfig_VisibilityOption) String() string { @@ -711,7 +703,7 @@ func (*TaskTrackingViewConfig_VisibilityOption) ProtoMessage() {} func (x *TaskTrackingViewConfig_VisibilityOption) ProtoReflect() protoreflect.Message { mi := &file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,56 +1119,6 @@ func file_google_maps_fleetengine_delivery_v1_tasks_proto_init() { } file_google_maps_fleetengine_delivery_v1_common_proto_init() file_google_maps_fleetengine_delivery_v1_delivery_vehicles_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TaskTrackingViewConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Task_JourneySharingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TaskTrackingViewConfig_VisibilityOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_fleetengine_delivery_v1_tasks_proto_msgTypes[3].OneofWrappers = []any{ (*TaskTrackingViewConfig_VisibilityOption_RemainingStopCountThreshold)(nil), (*TaskTrackingViewConfig_VisibilityOption_DurationUntilEstimatedArrivalTimeThreshold)(nil), diff --git a/maps/fleetengine/delivery/apiv1/helpers.go b/maps/fleetengine/delivery/apiv1/helpers.go index a7894fe674da..75914639360e 100755 --- a/maps/fleetengine/delivery/apiv1/helpers.go +++ b/maps/fleetengine/delivery/apiv1/helpers.go @@ -18,10 +18,20 @@ package delivery import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "fleetengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/places/apiv1/helpers.go b/maps/places/apiv1/helpers.go index 8d490019b111..e88214bc9c8d 100755 --- a/maps/places/apiv1/helpers.go +++ b/maps/places/apiv1/helpers.go @@ -18,10 +18,20 @@ package places import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "places.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/places/apiv1/places_client.go b/maps/places/apiv1/places_client.go index 171ebb8b40b9..c317171c222d 100755 --- a/maps/places/apiv1/places_client.go +++ b/maps/places/apiv1/places_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" placespb "cloud.google.com/go/maps/places/apiv1/placespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -174,6 +173,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new places client based on gRPC. @@ -204,6 +205,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: placespb.NewPlacesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -250,6 +252,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new places rest client. @@ -271,6 +275,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -320,7 +325,7 @@ func (c *gRPCClient) SearchNearby(ctx context.Context, req *placespb.SearchNearb var resp *placespb.SearchNearbyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchNearby(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchNearby, req, settings.GRPC, c.logger, "SearchNearby") return err }, opts...) if err != nil { @@ -335,7 +340,7 @@ func (c *gRPCClient) SearchText(ctx context.Context, req *placespb.SearchTextReq var resp *placespb.SearchTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchText, req, settings.GRPC, c.logger, "SearchText") return err }, opts...) if err != nil { @@ -353,7 +358,7 @@ func (c *gRPCClient) GetPhotoMedia(ctx context.Context, req *placespb.GetPhotoMe var resp *placespb.PhotoMedia err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPhotoMedia(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPhotoMedia, req, settings.GRPC, c.logger, "GetPhotoMedia") return err }, opts...) if err != nil { @@ -371,7 +376,7 @@ func (c *gRPCClient) GetPlace(ctx context.Context, req *placespb.GetPlaceRequest var resp *placespb.Place err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPlace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPlace, req, settings.GRPC, c.logger, "GetPlace") return err }, opts...) if err != nil { @@ -386,7 +391,7 @@ func (c *gRPCClient) AutocompletePlaces(ctx context.Context, req *placespb.Autoc var resp *placespb.AutocompletePlacesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AutocompletePlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AutocompletePlaces, req, settings.GRPC, c.logger, "AutocompletePlaces") return err }, opts...) if err != nil { @@ -431,17 +436,7 @@ func (c *restClient) SearchNearby(ctx context.Context, req *placespb.SearchNearb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchNearby") if err != nil { return err } @@ -494,17 +489,7 @@ func (c *restClient) SearchText(ctx context.Context, req *placespb.SearchTextReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchText") if err != nil { return err } @@ -563,17 +548,7 @@ func (c *restClient) GetPhotoMedia(ctx context.Context, req *placespb.GetPhotoMe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhotoMedia") if err != nil { return err } @@ -633,17 +608,7 @@ func (c *restClient) GetPlace(ctx context.Context, req *placespb.GetPlaceRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPlace") if err != nil { return err } @@ -696,17 +661,7 @@ func (c *restClient) AutocompletePlaces(ctx context.Context, req *placespb.Autoc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AutocompletePlaces") if err != nil { return err } diff --git a/maps/places/apiv1/placespb/attribution.pb.go b/maps/places/apiv1/placespb/attribution.pb.go index aa2c51fa62c2..a4797660aee1 100755 --- a/maps/places/apiv1/placespb/attribution.pb.go +++ b/maps/places/apiv1/placespb/attribution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/attribution.proto @@ -57,11 +57,9 @@ type AuthorAttribution struct { func (x *AuthorAttribution) Reset() { *x = AuthorAttribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_attribution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_attribution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorAttribution) String() string { @@ -72,7 +70,7 @@ func (*AuthorAttribution) ProtoMessage() {} func (x *AuthorAttribution) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_attribution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,20 +162,6 @@ func file_google_maps_places_v1_attribution_proto_init() { if File_google_maps_places_v1_attribution_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_attribution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuthorAttribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/content_block.pb.go b/maps/places/apiv1/placespb/content_block.pb.go index 3e1539c6e527..f1269dbc983b 100755 --- a/maps/places/apiv1/placespb/content_block.pb.go +++ b/maps/places/apiv1/placespb/content_block.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/content_block.proto @@ -56,11 +56,9 @@ type ContentBlock struct { func (x *ContentBlock) Reset() { *x = ContentBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_content_block_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_content_block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentBlock) String() string { @@ -71,7 +69,7 @@ func (*ContentBlock) ProtoMessage() {} func (x *ContentBlock) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_content_block_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,20 +174,6 @@ func file_google_maps_places_v1_content_block_proto_init() { return } file_google_maps_places_v1_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_content_block_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContentBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/contextual_content.pb.go b/maps/places/apiv1/placespb/contextual_content.pb.go index 1e136d3d492d..33914f3197ba 100755 --- a/maps/places/apiv1/placespb/contextual_content.pb.go +++ b/maps/places/apiv1/placespb/contextual_content.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/contextual_content.proto @@ -60,11 +60,9 @@ type ContextualContent struct { func (x *ContextualContent) Reset() { *x = ContextualContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent) String() string { @@ -75,7 +73,7 @@ func (*ContextualContent) ProtoMessage() {} func (x *ContextualContent) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type ContextualContent_Justification struct { func (x *ContextualContent_Justification) Reset() { *x = ContextualContent_Justification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent_Justification) String() string { @@ -146,7 +142,7 @@ func (*ContextualContent_Justification) ProtoMessage() {} func (x *ContextualContent_Justification) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type ContextualContent_Justification_ReviewJustification struct { func (x *ContextualContent_Justification_ReviewJustification) Reset() { *x = ContextualContent_Justification_ReviewJustification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent_Justification_ReviewJustification) String() string { @@ -241,7 +235,7 @@ func (*ContextualContent_Justification_ReviewJustification) ProtoMessage() {} func (x *ContextualContent_Justification_ReviewJustification) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type ContextualContent_Justification_BusinessAvailabilityAttributesJustification func (x *ContextualContent_Justification_BusinessAvailabilityAttributesJustification) Reset() { *x = ContextualContent_Justification_BusinessAvailabilityAttributesJustification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent_Justification_BusinessAvailabilityAttributesJustification) String() string { @@ -305,7 +297,7 @@ func (*ContextualContent_Justification_BusinessAvailabilityAttributesJustificati func (x *ContextualContent_Justification_BusinessAvailabilityAttributesJustification) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type ContextualContent_Justification_ReviewJustification_HighlightedText struct func (x *ContextualContent_Justification_ReviewJustification_HighlightedText) Reset() { *x = ContextualContent_Justification_ReviewJustification_HighlightedText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent_Justification_ReviewJustification_HighlightedText) String() string { @@ -372,7 +362,7 @@ func (*ContextualContent_Justification_ReviewJustification_HighlightedText) Prot func (x *ContextualContent_Justification_ReviewJustification_HighlightedText) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +403,9 @@ type ContextualContent_Justification_ReviewJustification_HighlightedText_Highlig func (x *ContextualContent_Justification_ReviewJustification_HighlightedText_HighlightedTextRange) Reset() { *x = ContextualContent_Justification_ReviewJustification_HighlightedText_HighlightedTextRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContextualContent_Justification_ReviewJustification_HighlightedText_HighlightedTextRange) String() string { @@ -429,7 +417,7 @@ func (*ContextualContent_Justification_ReviewJustification_HighlightedText_Highl func (x *ContextualContent_Justification_ReviewJustification_HighlightedText_HighlightedTextRange) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_contextual_content_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,80 +595,6 @@ func file_google_maps_places_v1_contextual_content_proto_init() { } file_google_maps_places_v1_photo_proto_init() file_google_maps_places_v1_review_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_contextual_content_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_contextual_content_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent_Justification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_contextual_content_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent_Justification_ReviewJustification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_contextual_content_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent_Justification_BusinessAvailabilityAttributesJustification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_contextual_content_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent_Justification_ReviewJustification_HighlightedText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_contextual_content_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ContextualContent_Justification_ReviewJustification_HighlightedText_HighlightedTextRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_places_v1_contextual_content_proto_msgTypes[1].OneofWrappers = []any{ (*ContextualContent_Justification_ReviewJustification_)(nil), (*ContextualContent_Justification_BusinessAvailabilityAttributesJustification_)(nil), diff --git a/maps/places/apiv1/placespb/ev_charging.pb.go b/maps/places/apiv1/placespb/ev_charging.pb.go index e214a678d39b..777ff69f30b2 100755 --- a/maps/places/apiv1/placespb/ev_charging.pb.go +++ b/maps/places/apiv1/placespb/ev_charging.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/ev_charging.proto @@ -148,11 +148,9 @@ type EVChargeOptions struct { func (x *EVChargeOptions) Reset() { *x = EVChargeOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EVChargeOptions) String() string { @@ -163,7 +161,7 @@ func (*EVChargeOptions) ProtoMessage() {} func (x *EVChargeOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type EVChargeOptions_ConnectorAggregation struct { func (x *EVChargeOptions_ConnectorAggregation) Reset() { *x = EVChargeOptions_ConnectorAggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EVChargeOptions_ConnectorAggregation) String() string { @@ -233,7 +229,7 @@ func (*EVChargeOptions_ConnectorAggregation) ProtoMessage() {} func (x *EVChargeOptions_ConnectorAggregation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_ev_charging_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,32 +402,6 @@ func file_google_maps_places_v1_ev_charging_proto_init() { if File_google_maps_places_v1_ev_charging_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_ev_charging_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EVChargeOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_ev_charging_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EVChargeOptions_ConnectorAggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_places_v1_ev_charging_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/places/apiv1/placespb/fuel_options.pb.go b/maps/places/apiv1/placespb/fuel_options.pb.go index da8f1f7aa8c7..f3dd68cfa7d9 100755 --- a/maps/places/apiv1/placespb/fuel_options.pb.go +++ b/maps/places/apiv1/placespb/fuel_options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/fuel_options.proto @@ -168,11 +168,9 @@ type FuelOptions struct { func (x *FuelOptions) Reset() { *x = FuelOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FuelOptions) String() string { @@ -183,7 +181,7 @@ func (*FuelOptions) ProtoMessage() {} func (x *FuelOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type FuelOptions_FuelPrice struct { func (x *FuelOptions_FuelPrice) Reset() { *x = FuelOptions_FuelPrice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FuelOptions_FuelPrice) String() string { @@ -236,7 +232,7 @@ func (*FuelOptions_FuelPrice) ProtoMessage() {} func (x *FuelOptions_FuelPrice) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_fuel_options_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,32 +364,6 @@ func file_google_maps_places_v1_fuel_options_proto_init() { if File_google_maps_places_v1_fuel_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_fuel_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FuelOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_fuel_options_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FuelOptions_FuelPrice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/geometry.pb.go b/maps/places/apiv1/placespb/geometry.pb.go index aaddea9de2f2..0db27013bde2 100755 --- a/maps/places/apiv1/placespb/geometry.pb.go +++ b/maps/places/apiv1/placespb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/geometry.proto @@ -55,11 +55,9 @@ type Circle struct { func (x *Circle) Reset() { *x = Circle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Circle) String() string { @@ -70,7 +68,7 @@ func (*Circle) ProtoMessage() {} func (x *Circle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,20 +157,6 @@ func file_google_maps_places_v1_geometry_proto_init() { if File_google_maps_places_v1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Circle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/photo.pb.go b/maps/places/apiv1/placespb/photo.pb.go index c771c7b4e30a..9f918f2aa0e1 100755 --- a/maps/places/apiv1/placespb/photo.pb.go +++ b/maps/places/apiv1/placespb/photo.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/photo.proto @@ -56,11 +56,9 @@ type Photo struct { func (x *Photo) Reset() { *x = Photo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_photo_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_photo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Photo) String() string { @@ -71,7 +69,7 @@ func (*Photo) ProtoMessage() {} func (x *Photo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_photo_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,20 +186,6 @@ func file_google_maps_places_v1_photo_proto_init() { return } file_google_maps_places_v1_attribution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_photo_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Photo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/place.pb.go b/maps/places/apiv1/placespb/place.pb.go index 93f275bb43f8..76b45cd09e72 100755 --- a/maps/places/apiv1/placespb/place.pb.go +++ b/maps/places/apiv1/placespb/place.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/place.proto @@ -467,11 +467,9 @@ type Place struct { func (x *Place) Reset() { *x = Place{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place) String() string { @@ -482,7 +480,7 @@ func (*Place) ProtoMessage() {} func (x *Place) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +980,9 @@ type Place_AddressComponent struct { func (x *Place_AddressComponent) Reset() { *x = Place_AddressComponent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_AddressComponent) String() string { @@ -997,7 +993,7 @@ func (*Place_AddressComponent) ProtoMessage() {} func (x *Place_AddressComponent) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1055,9 @@ type Place_PlusCode struct { func (x *Place_PlusCode) Reset() { *x = Place_PlusCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_PlusCode) String() string { @@ -1074,7 +1068,7 @@ func (*Place_PlusCode) ProtoMessage() {} func (x *Place_PlusCode) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1137,9 @@ type Place_OpeningHours struct { func (x *Place_OpeningHours) Reset() { *x = Place_OpeningHours{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_OpeningHours) String() string { @@ -1158,7 +1150,7 @@ func (*Place_OpeningHours) ProtoMessage() {} func (x *Place_OpeningHours) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1236,11 +1228,9 @@ type Place_Attribution struct { func (x *Place_Attribution) Reset() { *x = Place_Attribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_Attribution) String() string { @@ -1251,7 +1241,7 @@ func (*Place_Attribution) ProtoMessage() {} func (x *Place_Attribution) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,11 +1289,9 @@ type Place_PaymentOptions struct { func (x *Place_PaymentOptions) Reset() { *x = Place_PaymentOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_PaymentOptions) String() string { @@ -1314,7 +1302,7 @@ func (*Place_PaymentOptions) ProtoMessage() {} func (x *Place_PaymentOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1370,9 @@ type Place_ParkingOptions struct { func (x *Place_ParkingOptions) Reset() { *x = Place_ParkingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_ParkingOptions) String() string { @@ -1397,7 +1383,7 @@ func (*Place_ParkingOptions) ProtoMessage() {} func (x *Place_ParkingOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1476,11 +1462,9 @@ type Place_SubDestination struct { func (x *Place_SubDestination) Reset() { *x = Place_SubDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_SubDestination) String() string { @@ -1491,7 +1475,7 @@ func (*Place_SubDestination) ProtoMessage() {} func (x *Place_SubDestination) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1522,9 @@ type Place_AccessibilityOptions struct { func (x *Place_AccessibilityOptions) Reset() { *x = Place_AccessibilityOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_AccessibilityOptions) String() string { @@ -1553,7 +1535,7 @@ func (*Place_AccessibilityOptions) ProtoMessage() {} func (x *Place_AccessibilityOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1598,9 @@ type Place_GenerativeSummary struct { func (x *Place_GenerativeSummary) Reset() { *x = Place_GenerativeSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_GenerativeSummary) String() string { @@ -1631,7 +1611,7 @@ func (*Place_GenerativeSummary) ProtoMessage() {} func (x *Place_GenerativeSummary) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1684,11 +1664,9 @@ type Place_AreaSummary struct { func (x *Place_AreaSummary) Reset() { *x = Place_AreaSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_AreaSummary) String() string { @@ -1699,7 +1677,7 @@ func (*Place_AreaSummary) ProtoMessage() {} func (x *Place_AreaSummary) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1713,9 @@ type Place_ContainingPlace struct { func (x *Place_ContainingPlace) Reset() { *x = Place_ContainingPlace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_ContainingPlace) String() string { @@ -1750,7 +1726,7 @@ func (*Place_ContainingPlace) ProtoMessage() {} func (x *Place_ContainingPlace) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1793,11 +1769,9 @@ type Place_OpeningHours_Period struct { func (x *Place_OpeningHours_Period) Reset() { *x = Place_OpeningHours_Period{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_OpeningHours_Period) String() string { @@ -1808,7 +1782,7 @@ func (*Place_OpeningHours_Period) ProtoMessage() {} func (x *Place_OpeningHours_Period) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1851,11 +1825,9 @@ type Place_OpeningHours_SpecialDay struct { func (x *Place_OpeningHours_SpecialDay) Reset() { *x = Place_OpeningHours_SpecialDay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_OpeningHours_SpecialDay) String() string { @@ -1866,7 +1838,7 @@ func (*Place_OpeningHours_SpecialDay) ProtoMessage() {} func (x *Place_OpeningHours_SpecialDay) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1913,11 +1885,9 @@ type Place_OpeningHours_Period_Point struct { func (x *Place_OpeningHours_Period_Point) Reset() { *x = Place_OpeningHours_Period_Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_place_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_place_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place_OpeningHours_Period_Point) String() string { @@ -1928,7 +1898,7 @@ func (*Place_OpeningHours_Period_Point) ProtoMessage() {} func (x *Place_OpeningHours_Period_Point) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_place_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2626,188 +2596,6 @@ func file_google_maps_places_v1_place_proto_init() { file_google_maps_places_v1_price_range_proto_init() file_google_maps_places_v1_reference_proto_init() file_google_maps_places_v1_review_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_place_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Place); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Place_AddressComponent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Place_PlusCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Place_OpeningHours); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Place_Attribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Place_PaymentOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Place_ParkingOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Place_SubDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Place_AccessibilityOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Place_GenerativeSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Place_AreaSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Place_ContainingPlace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Place_OpeningHours_Period); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Place_OpeningHours_SpecialDay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_place_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Place_OpeningHours_Period_Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_places_v1_place_proto_msgTypes[0].OneofWrappers = []any{} file_google_maps_places_v1_place_proto_msgTypes[3].OneofWrappers = []any{} file_google_maps_places_v1_place_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/maps/places/apiv1/placespb/places_service.pb.go b/maps/places/apiv1/placespb/places_service.pb.go index bb58f6518449..9e9f3b8f6504 100755 --- a/maps/places/apiv1/placespb/places_service.pb.go +++ b/maps/places/apiv1/placespb/places_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/places_service.proto @@ -175,11 +175,9 @@ type RoutingParameters struct { func (x *RoutingParameters) Reset() { *x = RoutingParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutingParameters) String() string { @@ -190,7 +188,7 @@ func (*RoutingParameters) ProtoMessage() {} func (x *RoutingParameters) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +344,9 @@ type SearchNearbyRequest struct { func (x *SearchNearbyRequest) Reset() { *x = SearchNearbyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearbyRequest) String() string { @@ -361,7 +357,7 @@ func (*SearchNearbyRequest) ProtoMessage() {} func (x *SearchNearbyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -465,11 +461,9 @@ type SearchNearbyResponse struct { func (x *SearchNearbyResponse) Reset() { *x = SearchNearbyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearbyResponse) String() string { @@ -480,7 +474,7 @@ func (*SearchNearbyResponse) ProtoMessage() {} func (x *SearchNearbyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +582,9 @@ type SearchTextRequest struct { func (x *SearchTextRequest) Reset() { *x = SearchTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextRequest) String() string { @@ -603,7 +595,7 @@ func (*SearchTextRequest) ProtoMessage() {} func (x *SearchTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,11 +752,9 @@ type SearchTextResponse struct { func (x *SearchTextResponse) Reset() { *x = SearchTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextResponse) String() string { @@ -775,7 +765,7 @@ func (*SearchTextResponse) ProtoMessage() {} func (x *SearchTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -858,11 +848,9 @@ type GetPhotoMediaRequest struct { func (x *GetPhotoMediaRequest) Reset() { *x = GetPhotoMediaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhotoMediaRequest) String() string { @@ -873,7 +861,7 @@ func (*GetPhotoMediaRequest) ProtoMessage() {} func (x *GetPhotoMediaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +919,9 @@ type PhotoMedia struct { func (x *PhotoMedia) Reset() { *x = PhotoMedia{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhotoMedia) String() string { @@ -946,7 +932,7 @@ func (*PhotoMedia) ProtoMessage() {} func (x *PhotoMedia) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1016,9 @@ type GetPlaceRequest struct { func (x *GetPlaceRequest) Reset() { *x = GetPlaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlaceRequest) String() string { @@ -1045,7 +1029,7 @@ func (*GetPlaceRequest) ProtoMessage() {} func (x *GetPlaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1168,9 @@ type AutocompletePlacesRequest struct { func (x *AutocompletePlacesRequest) Reset() { *x = AutocompletePlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesRequest) String() string { @@ -1199,7 +1181,7 @@ func (*AutocompletePlacesRequest) ProtoMessage() {} func (x *AutocompletePlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1310,11 +1292,9 @@ type AutocompletePlacesResponse struct { func (x *AutocompletePlacesResponse) Reset() { *x = AutocompletePlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse) String() string { @@ -1325,7 +1305,7 @@ func (*AutocompletePlacesResponse) ProtoMessage() {} func (x *AutocompletePlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,11 +1341,9 @@ type SearchNearbyRequest_LocationRestriction struct { func (x *SearchNearbyRequest_LocationRestriction) Reset() { *x = SearchNearbyRequest_LocationRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchNearbyRequest_LocationRestriction) String() string { @@ -1376,7 +1354,7 @@ func (*SearchNearbyRequest_LocationRestriction) ProtoMessage() {} func (x *SearchNearbyRequest_LocationRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1411,9 @@ type SearchTextRequest_LocationBias struct { func (x *SearchTextRequest_LocationBias) Reset() { *x = SearchTextRequest_LocationBias{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextRequest_LocationBias) String() string { @@ -1448,7 +1424,7 @@ func (*SearchTextRequest_LocationBias) ProtoMessage() {} func (x *SearchTextRequest_LocationBias) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1522,11 +1498,9 @@ type SearchTextRequest_LocationRestriction struct { func (x *SearchTextRequest_LocationRestriction) Reset() { *x = SearchTextRequest_LocationRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextRequest_LocationRestriction) String() string { @@ -1537,7 +1511,7 @@ func (*SearchTextRequest_LocationRestriction) ProtoMessage() {} func (x *SearchTextRequest_LocationRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1599,11 +1573,9 @@ type SearchTextRequest_EVOptions struct { func (x *SearchTextRequest_EVOptions) Reset() { *x = SearchTextRequest_EVOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextRequest_EVOptions) String() string { @@ -1614,7 +1586,7 @@ func (*SearchTextRequest_EVOptions) ProtoMessage() {} func (x *SearchTextRequest_EVOptions) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,11 +1640,9 @@ type SearchTextRequest_SearchAlongRouteParameters struct { func (x *SearchTextRequest_SearchAlongRouteParameters) Reset() { *x = SearchTextRequest_SearchAlongRouteParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchTextRequest_SearchAlongRouteParameters) String() string { @@ -1683,7 +1653,7 @@ func (*SearchTextRequest_SearchAlongRouteParameters) ProtoMessage() {} func (x *SearchTextRequest_SearchAlongRouteParameters) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1721,11 +1691,9 @@ type AutocompletePlacesRequest_LocationBias struct { func (x *AutocompletePlacesRequest_LocationBias) Reset() { *x = AutocompletePlacesRequest_LocationBias{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesRequest_LocationBias) String() string { @@ -1736,7 +1704,7 @@ func (*AutocompletePlacesRequest_LocationBias) ProtoMessage() {} func (x *AutocompletePlacesRequest_LocationBias) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1776,9 @@ type AutocompletePlacesRequest_LocationRestriction struct { func (x *AutocompletePlacesRequest_LocationRestriction) Reset() { *x = AutocompletePlacesRequest_LocationRestriction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesRequest_LocationRestriction) String() string { @@ -1823,7 +1789,7 @@ func (*AutocompletePlacesRequest_LocationRestriction) ProtoMessage() {} func (x *AutocompletePlacesRequest_LocationRestriction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1894,11 +1860,9 @@ type AutocompletePlacesResponse_Suggestion struct { func (x *AutocompletePlacesResponse_Suggestion) Reset() { *x = AutocompletePlacesResponse_Suggestion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion) String() string { @@ -1909,7 +1873,7 @@ func (*AutocompletePlacesResponse_Suggestion) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1944,9 @@ type AutocompletePlacesResponse_Suggestion_StringRange struct { func (x *AutocompletePlacesResponse_Suggestion_StringRange) Reset() { *x = AutocompletePlacesResponse_Suggestion_StringRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion_StringRange) String() string { @@ -1995,7 +1957,7 @@ func (*AutocompletePlacesResponse_Suggestion_StringRange) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion_StringRange) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2046,11 +2008,9 @@ type AutocompletePlacesResponse_Suggestion_FormattableText struct { func (x *AutocompletePlacesResponse_Suggestion_FormattableText) Reset() { *x = AutocompletePlacesResponse_Suggestion_FormattableText{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion_FormattableText) String() string { @@ -2061,7 +2021,7 @@ func (*AutocompletePlacesResponse_Suggestion_FormattableText) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion_FormattableText) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2112,11 +2072,9 @@ type AutocompletePlacesResponse_Suggestion_StructuredFormat struct { func (x *AutocompletePlacesResponse_Suggestion_StructuredFormat) Reset() { *x = AutocompletePlacesResponse_Suggestion_StructuredFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion_StructuredFormat) String() string { @@ -2127,7 +2085,7 @@ func (*AutocompletePlacesResponse_Suggestion_StructuredFormat) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion_StructuredFormat) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2208,11 +2166,9 @@ type AutocompletePlacesResponse_Suggestion_PlacePrediction struct { func (x *AutocompletePlacesResponse_Suggestion_PlacePrediction) Reset() { *x = AutocompletePlacesResponse_Suggestion_PlacePrediction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion_PlacePrediction) String() string { @@ -2223,7 +2179,7 @@ func (*AutocompletePlacesResponse_Suggestion_PlacePrediction) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion_PlacePrediction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2314,11 +2270,9 @@ type AutocompletePlacesResponse_Suggestion_QueryPrediction struct { func (x *AutocompletePlacesResponse_Suggestion_QueryPrediction) Reset() { *x = AutocompletePlacesResponse_Suggestion_QueryPrediction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_places_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_places_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutocompletePlacesResponse_Suggestion_QueryPrediction) String() string { @@ -2329,7 +2283,7 @@ func (*AutocompletePlacesResponse_Suggestion_QueryPrediction) ProtoMessage() {} func (x *AutocompletePlacesResponse_Suggestion_QueryPrediction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_places_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2983,284 +2937,6 @@ func file_google_maps_places_v1_places_service_proto_init() { file_google_maps_places_v1_routing_preference_proto_init() file_google_maps_places_v1_routing_summary_proto_init() file_google_maps_places_v1_travel_mode_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_places_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RoutingParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearbyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearbyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetPhotoMediaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PhotoMedia); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetPlaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchNearbyRequest_LocationRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextRequest_LocationBias); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextRequest_LocationRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextRequest_EVOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SearchTextRequest_SearchAlongRouteParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesRequest_LocationBias); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesRequest_LocationRestriction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion_StringRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion_FormattableText); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion_StructuredFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion_PlacePrediction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_places_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AutocompletePlacesResponse_Suggestion_QueryPrediction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_places_v1_places_service_proto_msgTypes[10].OneofWrappers = []any{ (*SearchNearbyRequest_LocationRestriction_Circle)(nil), } diff --git a/maps/places/apiv1/placespb/polyline.pb.go b/maps/places/apiv1/placespb/polyline.pb.go index 5a9621dafcb9..73ce04cfb7b0 100755 --- a/maps/places/apiv1/placespb/polyline.pb.go +++ b/maps/places/apiv1/placespb/polyline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/polyline.proto @@ -55,11 +55,9 @@ type Polyline struct { func (x *Polyline) Reset() { *x = Polyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_polyline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_polyline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Polyline) String() string { @@ -70,7 +68,7 @@ func (*Polyline) ProtoMessage() {} func (x *Polyline) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_polyline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,20 +169,6 @@ func file_google_maps_places_v1_polyline_proto_init() { if File_google_maps_places_v1_polyline_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_polyline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Polyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_places_v1_polyline_proto_msgTypes[0].OneofWrappers = []any{ (*Polyline_EncodedPolyline)(nil), } diff --git a/maps/places/apiv1/placespb/price_range.pb.go b/maps/places/apiv1/placespb/price_range.pb.go index 524ad9d48c7d..47433e909726 100755 --- a/maps/places/apiv1/placespb/price_range.pb.go +++ b/maps/places/apiv1/placespb/price_range.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/price_range.proto @@ -53,11 +53,9 @@ type PriceRange struct { func (x *PriceRange) Reset() { *x = PriceRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_price_range_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_price_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceRange) String() string { @@ -68,7 +66,7 @@ func (*PriceRange) ProtoMessage() {} func (x *PriceRange) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_price_range_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,20 +156,6 @@ func file_google_maps_places_v1_price_range_proto_init() { if File_google_maps_places_v1_price_range_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_price_range_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PriceRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/reference.pb.go b/maps/places/apiv1/placespb/reference.pb.go index 91aad0307c72..024c287f8ba0 100755 --- a/maps/places/apiv1/placespb/reference.pb.go +++ b/maps/places/apiv1/placespb/reference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/reference.proto @@ -55,11 +55,9 @@ type References struct { func (x *References) Reset() { *x = References{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_reference_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *References) String() string { @@ -70,7 +68,7 @@ func (*References) ProtoMessage() {} func (x *References) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_reference_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,20 +161,6 @@ func file_google_maps_places_v1_reference_proto_init() { return } file_google_maps_places_v1_review_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_reference_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*References); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/review.pb.go b/maps/places/apiv1/placespb/review.pb.go index ddd53006ca07..178b2eed5beb 100755 --- a/maps/places/apiv1/placespb/review.pb.go +++ b/maps/places/apiv1/placespb/review.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/review.proto @@ -65,11 +65,9 @@ type Review struct { func (x *Review) Reset() { *x = Review{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_review_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_review_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Review) String() string { @@ -80,7 +78,7 @@ func (*Review) ProtoMessage() {} func (x *Review) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_review_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,20 +237,6 @@ func file_google_maps_places_v1_review_proto_init() { return } file_google_maps_places_v1_attribution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_review_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Review); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/route_modifiers.pb.go b/maps/places/apiv1/placespb/route_modifiers.pb.go index b9deb66fb217..85afeda27a1f 100755 --- a/maps/places/apiv1/placespb/route_modifiers.pb.go +++ b/maps/places/apiv1/placespb/route_modifiers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/route_modifiers.proto @@ -63,11 +63,9 @@ type RouteModifiers struct { func (x *RouteModifiers) Reset() { *x = RouteModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_route_modifiers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_route_modifiers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteModifiers) String() string { @@ -78,7 +76,7 @@ func (*RouteModifiers) ProtoMessage() {} func (x *RouteModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_route_modifiers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,20 +182,6 @@ func file_google_maps_places_v1_route_modifiers_proto_init() { if File_google_maps_places_v1_route_modifiers_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_route_modifiers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RouteModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/routing_preference.pb.go b/maps/places/apiv1/placespb/routing_preference.pb.go index 44689c8817de..9811dad302cb 100755 --- a/maps/places/apiv1/placespb/routing_preference.pb.go +++ b/maps/places/apiv1/placespb/routing_preference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/routing_preference.proto diff --git a/maps/places/apiv1/placespb/routing_summary.pb.go b/maps/places/apiv1/placespb/routing_summary.pb.go index e6e29f0a4d82..0d83141382fe 100755 --- a/maps/places/apiv1/placespb/routing_summary.pb.go +++ b/maps/places/apiv1/placespb/routing_summary.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/routing_summary.proto @@ -66,11 +66,9 @@ type RoutingSummary struct { func (x *RoutingSummary) Reset() { *x = RoutingSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutingSummary) String() string { @@ -81,7 +79,7 @@ func (*RoutingSummary) ProtoMessage() {} func (x *RoutingSummary) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type RoutingSummary_Leg struct { func (x *RoutingSummary_Leg) Reset() { *x = RoutingSummary_Leg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutingSummary_Leg) String() string { @@ -139,7 +135,7 @@ func (*RoutingSummary_Leg) ProtoMessage() {} func (x *RoutingSummary_Leg) ProtoReflect() protoreflect.Message { mi := &file_google_maps_places_v1_routing_summary_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,32 +234,6 @@ func file_google_maps_places_v1_routing_summary_proto_init() { if File_google_maps_places_v1_routing_summary_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_places_v1_routing_summary_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RoutingSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_places_v1_routing_summary_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RoutingSummary_Leg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/places/apiv1/placespb/travel_mode.pb.go b/maps/places/apiv1/placespb/travel_mode.pb.go index 0b9d6f5e3288..5b4af2ec5142 100755 --- a/maps/places/apiv1/placespb/travel_mode.pb.go +++ b/maps/places/apiv1/placespb/travel_mode.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/places/v1/travel_mode.proto diff --git a/maps/routeoptimization/apiv1/helpers.go b/maps/routeoptimization/apiv1/helpers.go index 34efa493d74b..71acf01c3bc9 100755 --- a/maps/routeoptimization/apiv1/helpers.go +++ b/maps/routeoptimization/apiv1/helpers.go @@ -18,10 +18,20 @@ package routeoptimization import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "routeoptimization.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/routeoptimization/apiv1/route_optimization_client.go b/maps/routeoptimization/apiv1/route_optimization_client.go index 8163e46a43ad..08e7cd048143 100755 --- a/maps/routeoptimization/apiv1/route_optimization_client.go +++ b/maps/routeoptimization/apiv1/route_optimization_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" routeoptimizationpb "cloud.google.com/go/maps/routeoptimization/apiv1/routeoptimizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -256,6 +255,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new route optimization client based on gRPC. @@ -308,6 +309,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: routeoptimizationpb.NewRouteOptimizationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -371,6 +373,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new route optimization rest client. @@ -414,6 +418,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -476,7 +481,7 @@ func (c *gRPCClient) OptimizeTours(ctx context.Context, req *routeoptimizationpb var resp *routeoptimizationpb.OptimizeToursResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.OptimizeTours(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.OptimizeTours, req, settings.GRPC, c.logger, "OptimizeTours") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *gRPCClient) BatchOptimizeTours(ctx context.Context, req *routeoptimizat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchOptimizeTours(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchOptimizeTours, req, settings.GRPC, c.logger, "BatchOptimizeTours") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -575,17 +580,7 @@ func (c *restClient) OptimizeTours(ctx context.Context, req *routeoptimizationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "OptimizeTours") if err != nil { return err } @@ -661,21 +656,10 @@ func (c *restClient) BatchOptimizeTours(ctx context.Context, req *routeoptimizat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchOptimizeTours") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -726,17 +710,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/maps/routeoptimization/apiv1/routeoptimizationpb/route_optimization_service.pb.go b/maps/routeoptimization/apiv1/routeoptimizationpb/route_optimization_service.pb.go index d1aa0e6c0fc4..77f6c18f67e2 100755 --- a/maps/routeoptimization/apiv1/routeoptimizationpb/route_optimization_service.pb.go +++ b/maps/routeoptimization/apiv1/routeoptimizationpb/route_optimization_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routeoptimization/v1/route_optimization_service.proto @@ -658,11 +658,9 @@ type BatchOptimizeToursRequest struct { func (x *BatchOptimizeToursRequest) Reset() { *x = BatchOptimizeToursRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursRequest) String() string { @@ -673,7 +671,7 @@ func (*BatchOptimizeToursRequest) ProtoMessage() {} func (x *BatchOptimizeToursRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +710,9 @@ type BatchOptimizeToursResponse struct { func (x *BatchOptimizeToursResponse) Reset() { *x = BatchOptimizeToursResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursResponse) String() string { @@ -727,7 +723,7 @@ func (*BatchOptimizeToursResponse) ProtoMessage() {} func (x *BatchOptimizeToursResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +747,9 @@ type BatchOptimizeToursMetadata struct { func (x *BatchOptimizeToursMetadata) Reset() { *x = BatchOptimizeToursMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursMetadata) String() string { @@ -766,7 +760,7 @@ func (*BatchOptimizeToursMetadata) ProtoMessage() {} func (x *BatchOptimizeToursMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +968,9 @@ type OptimizeToursRequest struct { func (x *OptimizeToursRequest) Reset() { *x = OptimizeToursRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursRequest) String() string { @@ -989,7 +981,7 @@ func (*OptimizeToursRequest) ProtoMessage() {} func (x *OptimizeToursRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1152,11 +1144,9 @@ type OptimizeToursResponse struct { func (x *OptimizeToursResponse) Reset() { *x = OptimizeToursResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursResponse) String() string { @@ -1167,7 +1157,7 @@ func (*OptimizeToursResponse) ProtoMessage() {} func (x *OptimizeToursResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1397,11 +1387,9 @@ type ShipmentModel struct { func (x *ShipmentModel) Reset() { *x = ShipmentModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel) String() string { @@ -1412,7 +1400,7 @@ func (*ShipmentModel) ProtoMessage() {} func (x *ShipmentModel) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1644,11 +1632,9 @@ type Shipment struct { func (x *Shipment) Reset() { *x = Shipment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment) String() string { @@ -1659,7 +1645,7 @@ func (*Shipment) ProtoMessage() {} func (x *Shipment) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1775,9 @@ type ShipmentTypeIncompatibility struct { func (x *ShipmentTypeIncompatibility) Reset() { *x = ShipmentTypeIncompatibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentTypeIncompatibility) String() string { @@ -1804,7 +1788,7 @@ func (*ShipmentTypeIncompatibility) ProtoMessage() {} func (x *ShipmentTypeIncompatibility) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,11 +1840,9 @@ type ShipmentTypeRequirement struct { func (x *ShipmentTypeRequirement) Reset() { *x = ShipmentTypeRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentTypeRequirement) String() string { @@ -1871,7 +1853,7 @@ func (*ShipmentTypeRequirement) ProtoMessage() {} func (x *ShipmentTypeRequirement) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1936,11 +1918,9 @@ type RouteModifiers struct { func (x *RouteModifiers) Reset() { *x = RouteModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteModifiers) String() string { @@ -1951,7 +1931,7 @@ func (*RouteModifiers) ProtoMessage() {} func (x *RouteModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2173,11 +2153,9 @@ type Vehicle struct { func (x *Vehicle) Reset() { *x = Vehicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle) String() string { @@ -2188,7 +2166,7 @@ func (*Vehicle) ProtoMessage() {} func (x *Vehicle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2456,11 +2434,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -2471,7 +2447,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2573,11 +2549,9 @@ type DistanceLimit struct { func (x *DistanceLimit) Reset() { *x = DistanceLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistanceLimit) String() string { @@ -2588,7 +2562,7 @@ func (*DistanceLimit) ProtoMessage() {} func (x *DistanceLimit) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2684,11 +2658,9 @@ type TransitionAttributes struct { func (x *TransitionAttributes) Reset() { *x = TransitionAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionAttributes) String() string { @@ -2699,7 +2671,7 @@ func (*TransitionAttributes) ProtoMessage() {} func (x *TransitionAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2795,11 +2767,9 @@ type Waypoint struct { func (x *Waypoint) Reset() { *x = Waypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Waypoint) String() string { @@ -2810,7 +2780,7 @@ func (*Waypoint) ProtoMessage() {} func (x *Waypoint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,11 +2859,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -2904,7 +2872,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2957,11 +2925,9 @@ type BreakRule struct { func (x *BreakRule) Reset() { *x = BreakRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule) String() string { @@ -2972,7 +2938,7 @@ func (*BreakRule) ProtoMessage() {} func (x *BreakRule) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3171,11 +3137,9 @@ type ShipmentRoute struct { func (x *ShipmentRoute) Reset() { *x = ShipmentRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute) String() string { @@ -3186,7 +3150,7 @@ func (*ShipmentRoute) ProtoMessage() {} func (x *ShipmentRoute) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3308,11 +3272,9 @@ type SkippedShipment struct { func (x *SkippedShipment) Reset() { *x = SkippedShipment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkippedShipment) String() string { @@ -3323,7 +3285,7 @@ func (*SkippedShipment) ProtoMessage() {} func (x *SkippedShipment) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3406,11 +3368,9 @@ type AggregatedMetrics struct { func (x *AggregatedMetrics) Reset() { *x = AggregatedMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedMetrics) String() string { @@ -3421,7 +3381,7 @@ func (*AggregatedMetrics) ProtoMessage() {} func (x *AggregatedMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3521,11 +3481,9 @@ type InjectedSolutionConstraint struct { func (x *InjectedSolutionConstraint) Reset() { *x = InjectedSolutionConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint) String() string { @@ -3536,7 +3494,7 @@ func (*InjectedSolutionConstraint) ProtoMessage() {} func (x *InjectedSolutionConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3625,11 +3583,9 @@ type OptimizeToursValidationError struct { func (x *OptimizeToursValidationError) Reset() { *x = OptimizeToursValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursValidationError) String() string { @@ -3640,7 +3596,7 @@ func (*OptimizeToursValidationError) ProtoMessage() {} func (x *OptimizeToursValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3709,11 +3665,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -3724,7 +3678,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3791,11 +3745,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -3806,7 +3758,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3866,11 +3818,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -3881,7 +3831,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3916,11 +3866,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -3931,7 +3879,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3970,11 +3918,9 @@ type BatchOptimizeToursRequest_AsyncModelConfig struct { func (x *BatchOptimizeToursRequest_AsyncModelConfig) Reset() { *x = BatchOptimizeToursRequest_AsyncModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursRequest_AsyncModelConfig) String() string { @@ -3985,7 +3931,7 @@ func (*BatchOptimizeToursRequest_AsyncModelConfig) ProtoMessage() {} func (x *BatchOptimizeToursRequest_AsyncModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4062,11 +4008,9 @@ type OptimizeToursResponse_Metrics struct { func (x *OptimizeToursResponse_Metrics) Reset() { *x = OptimizeToursResponse_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursResponse_Metrics) String() string { @@ -4077,7 +4021,7 @@ func (*OptimizeToursResponse_Metrics) ProtoMessage() {} func (x *OptimizeToursResponse_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4166,11 +4110,9 @@ type ShipmentModel_DurationDistanceMatrix struct { func (x *ShipmentModel_DurationDistanceMatrix) Reset() { *x = ShipmentModel_DurationDistanceMatrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_DurationDistanceMatrix) String() string { @@ -4181,7 +4123,7 @@ func (*ShipmentModel_DurationDistanceMatrix) ProtoMessage() {} func (x *ShipmentModel_DurationDistanceMatrix) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4239,11 +4181,9 @@ type ShipmentModel_PrecedenceRule struct { func (x *ShipmentModel_PrecedenceRule) Reset() { *x = ShipmentModel_PrecedenceRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_PrecedenceRule) String() string { @@ -4254,7 +4194,7 @@ func (*ShipmentModel_PrecedenceRule) ProtoMessage() {} func (x *ShipmentModel_PrecedenceRule) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4321,11 +4261,9 @@ type ShipmentModel_DurationDistanceMatrix_Row struct { func (x *ShipmentModel_DurationDistanceMatrix_Row) Reset() { *x = ShipmentModel_DurationDistanceMatrix_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_DurationDistanceMatrix_Row) String() string { @@ -4336,7 +4274,7 @@ func (*ShipmentModel_DurationDistanceMatrix_Row) ProtoMessage() {} func (x *ShipmentModel_DurationDistanceMatrix_Row) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4442,11 +4380,9 @@ type Shipment_VisitRequest struct { func (x *Shipment_VisitRequest) Reset() { *x = Shipment_VisitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment_VisitRequest) String() string { @@ -4457,7 +4393,7 @@ func (*Shipment_VisitRequest) ProtoMessage() {} func (x *Shipment_VisitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4566,11 +4502,9 @@ type Shipment_Load struct { func (x *Shipment_Load) Reset() { *x = Shipment_Load{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment_Load) String() string { @@ -4581,7 +4515,7 @@ func (*Shipment_Load) ProtoMessage() {} func (x *Shipment_Load) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4633,11 +4567,9 @@ type Vehicle_LoadLimit struct { func (x *Vehicle_LoadLimit) Reset() { *x = Vehicle_LoadLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_LoadLimit) String() string { @@ -4648,7 +4580,7 @@ func (*Vehicle_LoadLimit) ProtoMessage() {} func (x *Vehicle_LoadLimit) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4757,11 +4689,9 @@ type Vehicle_DurationLimit struct { func (x *Vehicle_DurationLimit) Reset() { *x = Vehicle_DurationLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_DurationLimit) String() string { @@ -4772,7 +4702,7 @@ func (*Vehicle_DurationLimit) ProtoMessage() {} func (x *Vehicle_DurationLimit) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4845,11 +4775,9 @@ type Vehicle_LoadLimit_Interval struct { func (x *Vehicle_LoadLimit_Interval) Reset() { *x = Vehicle_LoadLimit_Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_LoadLimit_Interval) String() string { @@ -4860,7 +4788,7 @@ func (*Vehicle_LoadLimit_Interval) ProtoMessage() {} func (x *Vehicle_LoadLimit_Interval) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4909,11 +4837,9 @@ type BreakRule_BreakRequest struct { func (x *BreakRule_BreakRequest) Reset() { *x = BreakRule_BreakRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule_BreakRequest) String() string { @@ -4924,7 +4850,7 @@ func (*BreakRule_BreakRequest) ProtoMessage() {} func (x *BreakRule_BreakRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5013,11 +4939,9 @@ type BreakRule_FrequencyConstraint struct { func (x *BreakRule_FrequencyConstraint) Reset() { *x = BreakRule_FrequencyConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule_FrequencyConstraint) String() string { @@ -5028,7 +4952,7 @@ func (*BreakRule_FrequencyConstraint) ProtoMessage() {} func (x *BreakRule_FrequencyConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5110,11 +5034,9 @@ type ShipmentRoute_Visit struct { func (x *ShipmentRoute_Visit) Reset() { *x = ShipmentRoute_Visit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Visit) String() string { @@ -5125,7 +5047,7 @@ func (*ShipmentRoute_Visit) ProtoMessage() {} func (x *ShipmentRoute_Visit) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5273,11 +5195,9 @@ type ShipmentRoute_Transition struct { func (x *ShipmentRoute_Transition) Reset() { *x = ShipmentRoute_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Transition) String() string { @@ -5288,7 +5208,7 @@ func (*ShipmentRoute_Transition) ProtoMessage() {} func (x *ShipmentRoute_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5396,11 +5316,9 @@ type ShipmentRoute_VehicleLoad struct { func (x *ShipmentRoute_VehicleLoad) Reset() { *x = ShipmentRoute_VehicleLoad{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_VehicleLoad) String() string { @@ -5411,7 +5329,7 @@ func (*ShipmentRoute_VehicleLoad) ProtoMessage() {} func (x *ShipmentRoute_VehicleLoad) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5448,11 +5366,9 @@ type ShipmentRoute_EncodedPolyline struct { func (x *ShipmentRoute_EncodedPolyline) Reset() { *x = ShipmentRoute_EncodedPolyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_EncodedPolyline) String() string { @@ -5463,7 +5379,7 @@ func (*ShipmentRoute_EncodedPolyline) ProtoMessage() {} func (x *ShipmentRoute_EncodedPolyline) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5499,11 +5415,9 @@ type ShipmentRoute_Break struct { func (x *ShipmentRoute_Break) Reset() { *x = ShipmentRoute_Break{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Break) String() string { @@ -5514,7 +5428,7 @@ func (*ShipmentRoute_Break) ProtoMessage() {} func (x *ShipmentRoute_Break) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5590,11 +5504,9 @@ type SkippedShipment_Reason struct { func (x *SkippedShipment_Reason) Reset() { *x = SkippedShipment_Reason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkippedShipment_Reason) String() string { @@ -5605,7 +5517,7 @@ func (*SkippedShipment_Reason) ProtoMessage() {} func (x *SkippedShipment_Reason) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5670,11 +5582,9 @@ type InjectedSolutionConstraint_ConstraintRelaxation struct { func (x *InjectedSolutionConstraint_ConstraintRelaxation) Reset() { *x = InjectedSolutionConstraint_ConstraintRelaxation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint_ConstraintRelaxation) String() string { @@ -5685,7 +5595,7 @@ func (*InjectedSolutionConstraint_ConstraintRelaxation) ProtoMessage() {} func (x *InjectedSolutionConstraint_ConstraintRelaxation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5773,11 +5683,9 @@ type InjectedSolutionConstraint_ConstraintRelaxation_Relaxation struct { func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) Reset() { *x = InjectedSolutionConstraint_ConstraintRelaxation_Relaxation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) String() string { @@ -5788,7 +5696,7 @@ func (*InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) ProtoMessage( func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5851,11 +5759,9 @@ type OptimizeToursValidationError_FieldReference struct { func (x *OptimizeToursValidationError_FieldReference) Reset() { *x = OptimizeToursValidationError_FieldReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursValidationError_FieldReference) String() string { @@ -5866,7 +5772,7 @@ func (*OptimizeToursValidationError_FieldReference) ProtoMessage() {} func (x *OptimizeToursValidationError_FieldReference) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7432,572 +7338,6 @@ func file_google_maps_routeoptimization_v1_route_optimization_service_proto_init if File_google_maps_routeoptimization_v1_route_optimization_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Shipment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentTypeIncompatibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentTypeRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RouteModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DistanceLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TransitionAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Waypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SkippedShipment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursRequest_AsyncModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursResponse_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_DurationDistanceMatrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_PrecedenceRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_DurationDistanceMatrix_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Shipment_VisitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Shipment_Load); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_LoadLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_DurationLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_LoadLimit_Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule_BreakRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule_FrequencyConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Visit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_VehicleLoad); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_EncodedPolyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Break); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*SkippedShipment_Reason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint_ConstraintRelaxation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint_ConstraintRelaxation_Relaxation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursValidationError_FieldReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[3].OneofWrappers = []any{} file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[5].OneofWrappers = []any{} file_google_maps_routeoptimization_v1_route_optimization_service_proto_msgTypes[6].OneofWrappers = []any{} diff --git a/maps/routing/apiv2/helpers.go b/maps/routing/apiv2/helpers.go index 1e8cffd4f0b2..f31ffb81b876 100755 --- a/maps/routing/apiv2/helpers.go +++ b/maps/routing/apiv2/helpers.go @@ -18,10 +18,20 @@ package routing import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "routes.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/routing/apiv2/routes_client.go b/maps/routing/apiv2/routes_client.go index 15ef8317a4d6..f24cae90fa2b 100755 --- a/maps/routing/apiv2/routes_client.go +++ b/maps/routing/apiv2/routes_client.go @@ -21,14 +21,13 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" routingpb "cloud.google.com/go/maps/routing/apiv2/routingpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -216,6 +215,8 @@ type routesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRoutesClient creates a new routes client based on gRPC. @@ -242,6 +243,7 @@ func NewRoutesClient(ctx context.Context, opts ...option.ClientOption) (*RoutesC connPool: connPool, routesClient: routingpb.NewRoutesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -288,6 +290,8 @@ type routesRESTClient struct { // Points back to the CallOptions field of the containing RoutesClient CallOptions **RoutesCallOptions + + logger *slog.Logger } // NewRoutesRESTClient creates a new routes rest client. @@ -305,6 +309,7 @@ func NewRoutesRESTClient(ctx context.Context, opts ...option.ClientOption) (*Rou endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -354,7 +359,7 @@ func (c *routesGRPCClient) ComputeRoutes(ctx context.Context, req *routingpb.Com var resp *routingpb.ComputeRoutesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.routesClient.ComputeRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.routesClient.ComputeRoutes, req, settings.GRPC, c.logger, "ComputeRoutes") return err }, opts...) if err != nil { @@ -369,7 +374,9 @@ func (c *routesGRPCClient) ComputeRouteMatrix(ctx context.Context, req *routingp var resp routingpb.Routes_ComputeRouteMatrixClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ComputeRouteMatrix") resp, err = c.routesClient.ComputeRouteMatrix(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ComputeRouteMatrix") return err }, opts...) if err != nil { @@ -450,17 +457,7 @@ func (c *routesRESTClient) ComputeRoutes(ctx context.Context, req *routingpb.Com httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ComputeRoutes") if err != nil { return err } @@ -547,15 +544,11 @@ func (c *routesRESTClient) ComputeRouteMatrix(ctx context.Context, req *routingp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ComputeRouteMatrix") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &computeRouteMatrixRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), diff --git a/maps/routing/apiv2/routingpb/fallback_info.pb.go b/maps/routing/apiv2/routingpb/fallback_info.pb.go index c464afaf788d..9cec28714721 100755 --- a/maps/routing/apiv2/routingpb/fallback_info.pb.go +++ b/maps/routing/apiv2/routingpb/fallback_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/fallback_info.proto @@ -169,11 +169,9 @@ type FallbackInfo struct { func (x *FallbackInfo) Reset() { *x = FallbackInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_fallback_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_fallback_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FallbackInfo) String() string { @@ -184,7 +182,7 @@ func (*FallbackInfo) ProtoMessage() {} func (x *FallbackInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_fallback_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,20 +291,6 @@ func file_google_maps_routing_v2_fallback_info_proto_init() { if File_google_maps_routing_v2_fallback_info_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_fallback_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FallbackInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/geocoding_results.pb.go b/maps/routing/apiv2/routingpb/geocoding_results.pb.go index 59bfd5046479..9d595c9708c0 100755 --- a/maps/routing/apiv2/routingpb/geocoding_results.pb.go +++ b/maps/routing/apiv2/routingpb/geocoding_results.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/geocoding_results.proto @@ -56,11 +56,9 @@ type GeocodingResults struct { func (x *GeocodingResults) Reset() { *x = GeocodingResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeocodingResults) String() string { @@ -71,7 +69,7 @@ func (*GeocodingResults) ProtoMessage() {} func (x *GeocodingResults) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,11 +134,9 @@ type GeocodedWaypoint struct { func (x *GeocodedWaypoint) Reset() { *x = GeocodedWaypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeocodedWaypoint) String() string { @@ -151,7 +147,7 @@ func (*GeocodedWaypoint) ProtoMessage() {} func (x *GeocodedWaypoint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_geocoding_results_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,32 +290,6 @@ func file_google_maps_routing_v2_geocoding_results_proto_init() { if File_google_maps_routing_v2_geocoding_results_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_geocoding_results_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GeocodingResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_geocoding_results_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GeocodedWaypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_geocoding_results_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/routing/apiv2/routingpb/localized_time.pb.go b/maps/routing/apiv2/routingpb/localized_time.pb.go index 6171b4617d89..a7c0ddbf3254 100755 --- a/maps/routing/apiv2/routingpb/localized_time.pb.go +++ b/maps/routing/apiv2/routingpb/localized_time.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/localized_time.proto @@ -52,11 +52,9 @@ type LocalizedTime struct { func (x *LocalizedTime) Reset() { *x = LocalizedTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_localized_time_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_localized_time_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalizedTime) String() string { @@ -67,7 +65,7 @@ func (*LocalizedTime) ProtoMessage() {} func (x *LocalizedTime) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_localized_time_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,20 +156,6 @@ func file_google_maps_routing_v2_localized_time_proto_init() { if File_google_maps_routing_v2_localized_time_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_localized_time_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocalizedTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/location.pb.go b/maps/routing/apiv2/routingpb/location.pb.go index a7c11452ea41..a4ee85c95fc2 100755 --- a/maps/routing/apiv2/routingpb/location.pb.go +++ b/maps/routing/apiv2/routingpb/location.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/location.proto @@ -56,11 +56,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_location_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_location_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -71,7 +69,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_location_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,20 +164,6 @@ func file_google_maps_routing_v2_location_proto_init() { if File_google_maps_routing_v2_location_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_location_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/maneuver.pb.go b/maps/routing/apiv2/routingpb/maneuver.pb.go index fdfc7364b0ad..4274cddf1181 100755 --- a/maps/routing/apiv2/routingpb/maneuver.pb.go +++ b/maps/routing/apiv2/routingpb/maneuver.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/maneuver.proto diff --git a/maps/routing/apiv2/routingpb/navigation_instruction.pb.go b/maps/routing/apiv2/routingpb/navigation_instruction.pb.go index 0994a4c74be9..dbe65de7a4e7 100755 --- a/maps/routing/apiv2/routingpb/navigation_instruction.pb.go +++ b/maps/routing/apiv2/routingpb/navigation_instruction.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/navigation_instruction.proto @@ -52,11 +52,9 @@ type NavigationInstruction struct { func (x *NavigationInstruction) Reset() { *x = NavigationInstruction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_navigation_instruction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_navigation_instruction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NavigationInstruction) String() string { @@ -67,7 +65,7 @@ func (*NavigationInstruction) ProtoMessage() {} func (x *NavigationInstruction) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_navigation_instruction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,20 +160,6 @@ func file_google_maps_routing_v2_navigation_instruction_proto_init() { return } file_google_maps_routing_v2_maneuver_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_navigation_instruction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NavigationInstruction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/polyline.pb.go b/maps/routing/apiv2/routingpb/polyline.pb.go index 90988890321c..2dfd9726b042 100755 --- a/maps/routing/apiv2/routingpb/polyline.pb.go +++ b/maps/routing/apiv2/routingpb/polyline.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/polyline.proto @@ -166,11 +166,9 @@ type Polyline struct { func (x *Polyline) Reset() { *x = Polyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_polyline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_polyline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Polyline) String() string { @@ -181,7 +179,7 @@ func (*Polyline) ProtoMessage() {} func (x *Polyline) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_polyline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,20 +314,6 @@ func file_google_maps_routing_v2_polyline_proto_init() { if File_google_maps_routing_v2_polyline_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_polyline_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Polyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_polyline_proto_msgTypes[0].OneofWrappers = []any{ (*Polyline_EncodedPolyline)(nil), (*Polyline_GeoJsonLinestring)(nil), diff --git a/maps/routing/apiv2/routingpb/polyline_details.pb.go b/maps/routing/apiv2/routingpb/polyline_details.pb.go index f0744b678554..28db4aee99cd 100755 --- a/maps/routing/apiv2/routingpb/polyline_details.pb.go +++ b/maps/routing/apiv2/routingpb/polyline_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/polyline_details.proto @@ -105,11 +105,9 @@ type PolylineDetails struct { func (x *PolylineDetails) Reset() { *x = PolylineDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolylineDetails) String() string { @@ -120,7 +118,7 @@ func (*PolylineDetails) ProtoMessage() {} func (x *PolylineDetails) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,11 +163,9 @@ type PolylineDetails_PolylinePointIndex struct { func (x *PolylineDetails_PolylinePointIndex) Reset() { *x = PolylineDetails_PolylinePointIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolylineDetails_PolylinePointIndex) String() string { @@ -180,7 +176,7 @@ func (*PolylineDetails_PolylinePointIndex) ProtoMessage() {} func (x *PolylineDetails_PolylinePointIndex) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,11 +220,9 @@ type PolylineDetails_FlyoverInfo struct { func (x *PolylineDetails_FlyoverInfo) Reset() { *x = PolylineDetails_FlyoverInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolylineDetails_FlyoverInfo) String() string { @@ -239,7 +233,7 @@ func (*PolylineDetails_FlyoverInfo) ProtoMessage() {} func (x *PolylineDetails_FlyoverInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type PolylineDetails_NarrowRoadInfo struct { func (x *PolylineDetails_NarrowRoadInfo) Reset() { *x = PolylineDetails_NarrowRoadInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolylineDetails_NarrowRoadInfo) String() string { @@ -298,7 +290,7 @@ func (*PolylineDetails_NarrowRoadInfo) ProtoMessage() {} func (x *PolylineDetails_NarrowRoadInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_polyline_details_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,56 +440,6 @@ func file_google_maps_routing_v2_polyline_details_proto_init() { if File_google_maps_routing_v2_polyline_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_polyline_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PolylineDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_polyline_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PolylineDetails_PolylinePointIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_polyline_details_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PolylineDetails_FlyoverInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_polyline_details_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PolylineDetails_NarrowRoadInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_polyline_details_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/routing/apiv2/routingpb/route.pb.go b/maps/routing/apiv2/routingpb/route.pb.go index 32c8db0fc4a1..115af3b99619 100755 --- a/maps/routing/apiv2/routingpb/route.pb.go +++ b/maps/routing/apiv2/routingpb/route.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/route.proto @@ -110,11 +110,9 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route) String() string { @@ -125,7 +123,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +273,9 @@ type RouteTravelAdvisory struct { func (x *RouteTravelAdvisory) Reset() { *x = RouteTravelAdvisory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteTravelAdvisory) String() string { @@ -290,7 +286,7 @@ func (*RouteTravelAdvisory) ProtoMessage() {} func (x *RouteTravelAdvisory) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type RouteLegTravelAdvisory struct { func (x *RouteLegTravelAdvisory) Reset() { *x = RouteLegTravelAdvisory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegTravelAdvisory) String() string { @@ -384,7 +378,7 @@ func (*RouteLegTravelAdvisory) ProtoMessage() {} func (x *RouteLegTravelAdvisory) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,11 +420,9 @@ type RouteLegStepTravelAdvisory struct { func (x *RouteLegStepTravelAdvisory) Reset() { *x = RouteLegStepTravelAdvisory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStepTravelAdvisory) String() string { @@ -441,7 +433,7 @@ func (*RouteLegStepTravelAdvisory) ProtoMessage() {} func (x *RouteLegStepTravelAdvisory) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +498,9 @@ type RouteLeg struct { func (x *RouteLeg) Reset() { *x = RouteLeg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLeg) String() string { @@ -521,7 +511,7 @@ func (*RouteLeg) ProtoMessage() {} func (x *RouteLeg) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +632,9 @@ type RouteLegStep struct { func (x *RouteLegStep) Reset() { *x = RouteLegStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStep) String() string { @@ -657,7 +645,7 @@ func (*RouteLegStep) ProtoMessage() {} func (x *RouteLegStep) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +764,9 @@ type RouteLegStepTransitDetails struct { func (x *RouteLegStepTransitDetails) Reset() { *x = RouteLegStepTransitDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStepTransitDetails) String() string { @@ -791,7 +777,7 @@ func (*RouteLegStepTransitDetails) ProtoMessage() {} func (x *RouteLegStepTransitDetails) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,11 +863,9 @@ type Route_RouteLocalizedValues struct { func (x *Route_RouteLocalizedValues) Reset() { *x = Route_RouteLocalizedValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route_RouteLocalizedValues) String() string { @@ -892,7 +876,7 @@ func (*Route_RouteLocalizedValues) ProtoMessage() {} func (x *Route_RouteLocalizedValues) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -955,11 +939,9 @@ type RouteLeg_RouteLegLocalizedValues struct { func (x *RouteLeg_RouteLegLocalizedValues) Reset() { *x = RouteLeg_RouteLegLocalizedValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLeg_RouteLegLocalizedValues) String() string { @@ -970,7 +952,7 @@ func (*RouteLeg_RouteLegLocalizedValues) ProtoMessage() {} func (x *RouteLeg_RouteLegLocalizedValues) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,11 +1002,9 @@ type RouteLeg_StepsOverview struct { func (x *RouteLeg_StepsOverview) Reset() { *x = RouteLeg_StepsOverview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLeg_StepsOverview) String() string { @@ -1035,7 +1015,7 @@ func (*RouteLeg_StepsOverview) ProtoMessage() {} func (x *RouteLeg_StepsOverview) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,11 +1061,9 @@ type RouteLeg_StepsOverview_MultiModalSegment struct { func (x *RouteLeg_StepsOverview_MultiModalSegment) Reset() { *x = RouteLeg_StepsOverview_MultiModalSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLeg_StepsOverview_MultiModalSegment) String() string { @@ -1096,7 +1074,7 @@ func (*RouteLeg_StepsOverview_MultiModalSegment) ProtoMessage() {} func (x *RouteLeg_StepsOverview_MultiModalSegment) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1132,9 @@ type RouteLegStep_RouteLegStepLocalizedValues struct { func (x *RouteLegStep_RouteLegStepLocalizedValues) Reset() { *x = RouteLegStep_RouteLegStepLocalizedValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStep_RouteLegStepLocalizedValues) String() string { @@ -1169,7 +1145,7 @@ func (*RouteLegStep_RouteLegStepLocalizedValues) ProtoMessage() {} func (x *RouteLegStep_RouteLegStepLocalizedValues) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,11 +1192,9 @@ type RouteLegStepTransitDetails_TransitStopDetails struct { func (x *RouteLegStepTransitDetails_TransitStopDetails) Reset() { *x = RouteLegStepTransitDetails_TransitStopDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStepTransitDetails_TransitStopDetails) String() string { @@ -1231,7 +1205,7 @@ func (*RouteLegStepTransitDetails_TransitStopDetails) ProtoMessage() {} func (x *RouteLegStepTransitDetails_TransitStopDetails) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1288,11 +1262,9 @@ type RouteLegStepTransitDetails_TransitDetailsLocalizedValues struct { func (x *RouteLegStepTransitDetails_TransitDetailsLocalizedValues) Reset() { *x = RouteLegStepTransitDetails_TransitDetailsLocalizedValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteLegStepTransitDetails_TransitDetailsLocalizedValues) String() string { @@ -1303,7 +1275,7 @@ func (*RouteLegStepTransitDetails_TransitDetailsLocalizedValues) ProtoMessage() func (x *RouteLegStepTransitDetails_TransitDetailsLocalizedValues) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,176 +1809,6 @@ func file_google_maps_routing_v2_route_proto_init() { file_google_maps_routing_v2_speed_reading_interval_proto_init() file_google_maps_routing_v2_toll_info_proto_init() file_google_maps_routing_v2_transit_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_route_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RouteTravelAdvisory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegTravelAdvisory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStepTravelAdvisory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RouteLeg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStepTransitDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Route_RouteLocalizedValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RouteLeg_RouteLegLocalizedValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RouteLeg_StepsOverview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RouteLeg_StepsOverview_MultiModalSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStep_RouteLegStepLocalizedValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStepTransitDetails_TransitStopDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_route_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RouteLegStepTransitDetails_TransitDetailsLocalizedValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_route_proto_msgTypes[10].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/routing/apiv2/routingpb/route_label.pb.go b/maps/routing/apiv2/routingpb/route_label.pb.go index aae31945f3a2..2777a3a9de6d 100755 --- a/maps/routing/apiv2/routingpb/route_label.pb.go +++ b/maps/routing/apiv2/routingpb/route_label.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/route_label.proto diff --git a/maps/routing/apiv2/routingpb/route_modifiers.pb.go b/maps/routing/apiv2/routingpb/route_modifiers.pb.go index 9d6800665606..e79604fb279d 100755 --- a/maps/routing/apiv2/routingpb/route_modifiers.pb.go +++ b/maps/routing/apiv2/routingpb/route_modifiers.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/route_modifiers.proto @@ -71,11 +71,9 @@ type RouteModifiers struct { func (x *RouteModifiers) Reset() { *x = RouteModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_route_modifiers_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_route_modifiers_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteModifiers) String() string { @@ -86,7 +84,7 @@ func (*RouteModifiers) ProtoMessage() {} func (x *RouteModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_route_modifiers_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,20 +223,6 @@ func file_google_maps_routing_v2_route_modifiers_proto_init() { } file_google_maps_routing_v2_toll_passes_proto_init() file_google_maps_routing_v2_vehicle_info_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_route_modifiers_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RouteModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/route_travel_mode.pb.go b/maps/routing/apiv2/routingpb/route_travel_mode.pb.go index b1a01073fafe..c43201249f67 100755 --- a/maps/routing/apiv2/routingpb/route_travel_mode.pb.go +++ b/maps/routing/apiv2/routingpb/route_travel_mode.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/route_travel_mode.proto diff --git a/maps/routing/apiv2/routingpb/routes_service.pb.go b/maps/routing/apiv2/routingpb/routes_service.pb.go index 47e2459c52a6..25a3798b03e0 100755 --- a/maps/routing/apiv2/routingpb/routes_service.pb.go +++ b/maps/routing/apiv2/routingpb/routes_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/routes_service.proto @@ -409,11 +409,9 @@ type ComputeRoutesRequest struct { func (x *ComputeRoutesRequest) Reset() { *x = ComputeRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeRoutesRequest) String() string { @@ -424,7 +422,7 @@ func (*ComputeRoutesRequest) ProtoMessage() {} func (x *ComputeRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +593,9 @@ type ComputeRoutesResponse struct { func (x *ComputeRoutesResponse) Reset() { *x = ComputeRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeRoutesResponse) String() string { @@ -610,7 +606,7 @@ func (*ComputeRoutesResponse) ProtoMessage() {} func (x *ComputeRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -726,11 +722,9 @@ type ComputeRouteMatrixRequest struct { func (x *ComputeRouteMatrixRequest) Reset() { *x = ComputeRouteMatrixRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeRouteMatrixRequest) String() string { @@ -741,7 +735,7 @@ func (*ComputeRouteMatrixRequest) ProtoMessage() {} func (x *ComputeRouteMatrixRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +848,9 @@ type RouteMatrixOrigin struct { func (x *RouteMatrixOrigin) Reset() { *x = RouteMatrixOrigin{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteMatrixOrigin) String() string { @@ -869,7 +861,7 @@ func (*RouteMatrixOrigin) ProtoMessage() {} func (x *RouteMatrixOrigin) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -910,11 +902,9 @@ type RouteMatrixDestination struct { func (x *RouteMatrixDestination) Reset() { *x = RouteMatrixDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteMatrixDestination) String() string { @@ -925,7 +915,7 @@ func (*RouteMatrixDestination) ProtoMessage() {} func (x *RouteMatrixDestination) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +979,9 @@ type RouteMatrixElement struct { func (x *RouteMatrixElement) Reset() { *x = RouteMatrixElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteMatrixElement) String() string { @@ -1004,7 +992,7 @@ func (*RouteMatrixElement) ProtoMessage() {} func (x *RouteMatrixElement) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1110,11 +1098,9 @@ type RouteMatrixElement_LocalizedValues struct { func (x *RouteMatrixElement_LocalizedValues) Reset() { *x = RouteMatrixElement_LocalizedValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteMatrixElement_LocalizedValues) String() string { @@ -1125,7 +1111,7 @@ func (*RouteMatrixElement_LocalizedValues) ProtoMessage() {} func (x *RouteMatrixElement_LocalizedValues) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_routes_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1647,92 +1633,6 @@ func file_google_maps_routing_v2_routes_service_proto_init() { file_google_maps_routing_v2_transit_preferences_proto_init() file_google_maps_routing_v2_units_proto_init() file_google_maps_routing_v2_waypoint_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_routes_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComputeRouteMatrixRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RouteMatrixOrigin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RouteMatrixDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RouteMatrixElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_routes_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RouteMatrixElement_LocalizedValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_routes_service_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/maps/routing/apiv2/routingpb/routing_preference.pb.go b/maps/routing/apiv2/routingpb/routing_preference.pb.go index 54f596bf3075..01b16eb37aea 100755 --- a/maps/routing/apiv2/routingpb/routing_preference.pb.go +++ b/maps/routing/apiv2/routingpb/routing_preference.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/routing_preference.proto diff --git a/maps/routing/apiv2/routingpb/speed_reading_interval.pb.go b/maps/routing/apiv2/routingpb/speed_reading_interval.pb.go index fedee300cfe5..667cb3cae845 100755 --- a/maps/routing/apiv2/routingpb/speed_reading_interval.pb.go +++ b/maps/routing/apiv2/routingpb/speed_reading_interval.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/speed_reading_interval.proto @@ -113,11 +113,9 @@ type SpeedReadingInterval struct { func (x *SpeedReadingInterval) Reset() { *x = SpeedReadingInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_speed_reading_interval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_speed_reading_interval_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeedReadingInterval) String() string { @@ -128,7 +126,7 @@ func (*SpeedReadingInterval) ProtoMessage() {} func (x *SpeedReadingInterval) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_speed_reading_interval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,20 +259,6 @@ func file_google_maps_routing_v2_speed_reading_interval_proto_init() { if File_google_maps_routing_v2_speed_reading_interval_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_speed_reading_interval_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpeedReadingInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_speed_reading_interval_proto_msgTypes[0].OneofWrappers = []any{ (*SpeedReadingInterval_Speed_)(nil), } diff --git a/maps/routing/apiv2/routingpb/toll_info.pb.go b/maps/routing/apiv2/routingpb/toll_info.pb.go index d423669e7e4b..f8ea20256421 100755 --- a/maps/routing/apiv2/routingpb/toll_info.pb.go +++ b/maps/routing/apiv2/routingpb/toll_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/toll_info.proto @@ -55,11 +55,9 @@ type TollInfo struct { func (x *TollInfo) Reset() { *x = TollInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_toll_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_toll_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TollInfo) String() string { @@ -70,7 +68,7 @@ func (*TollInfo) ProtoMessage() {} func (x *TollInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_toll_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,20 +149,6 @@ func file_google_maps_routing_v2_toll_info_proto_init() { if File_google_maps_routing_v2_toll_info_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_toll_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TollInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/toll_passes.pb.go b/maps/routing/apiv2/routingpb/toll_passes.pb.go index 6edb5d59a11c..7a0792e27290 100755 --- a/maps/routing/apiv2/routingpb/toll_passes.pb.go +++ b/maps/routing/apiv2/routingpb/toll_passes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/toll_passes.proto diff --git a/maps/routing/apiv2/routingpb/traffic_model.pb.go b/maps/routing/apiv2/routingpb/traffic_model.pb.go index 752e59f3e9f8..53517e3ea4c1 100755 --- a/maps/routing/apiv2/routingpb/traffic_model.pb.go +++ b/maps/routing/apiv2/routingpb/traffic_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/traffic_model.proto diff --git a/maps/routing/apiv2/routingpb/transit.pb.go b/maps/routing/apiv2/routingpb/transit.pb.go index cdb5bddce597..5440ed83cc47 100755 --- a/maps/routing/apiv2/routingpb/transit.pb.go +++ b/maps/routing/apiv2/routingpb/transit.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/transit.proto @@ -173,11 +173,9 @@ type TransitAgency struct { func (x *TransitAgency) Reset() { *x = TransitAgency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_transit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_transit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitAgency) String() string { @@ -188,7 +186,7 @@ func (*TransitAgency) ProtoMessage() {} func (x *TransitAgency) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_transit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +251,9 @@ type TransitLine struct { func (x *TransitLine) Reset() { *x = TransitLine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_transit_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_transit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitLine) String() string { @@ -268,7 +264,7 @@ func (*TransitLine) ProtoMessage() {} func (x *TransitLine) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_transit_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +349,9 @@ type TransitStop struct { func (x *TransitStop) Reset() { *x = TransitStop{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_transit_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_transit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitStop) String() string { @@ -368,7 +362,7 @@ func (*TransitStop) ProtoMessage() {} func (x *TransitStop) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_transit_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +410,9 @@ type TransitVehicle struct { func (x *TransitVehicle) Reset() { *x = TransitVehicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_transit_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_transit_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitVehicle) String() string { @@ -431,7 +423,7 @@ func (*TransitVehicle) ProtoMessage() {} func (x *TransitVehicle) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_transit_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,56 +599,6 @@ func file_google_maps_routing_v2_transit_proto_init() { return } file_google_maps_routing_v2_location_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_transit_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransitAgency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_transit_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TransitLine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_transit_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TransitStop); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_routing_v2_transit_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TransitVehicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/transit_preferences.pb.go b/maps/routing/apiv2/routingpb/transit_preferences.pb.go index ddc47c7ce59c..aae16e3044de 100755 --- a/maps/routing/apiv2/routingpb/transit_preferences.pb.go +++ b/maps/routing/apiv2/routingpb/transit_preferences.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/transit_preferences.proto @@ -173,11 +173,9 @@ type TransitPreferences struct { func (x *TransitPreferences) Reset() { *x = TransitPreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_transit_preferences_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_transit_preferences_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitPreferences) String() string { @@ -188,7 +186,7 @@ func (*TransitPreferences) ProtoMessage() {} func (x *TransitPreferences) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_transit_preferences_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,20 +302,6 @@ func file_google_maps_routing_v2_transit_preferences_proto_init() { if File_google_maps_routing_v2_transit_preferences_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_transit_preferences_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransitPreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/units.pb.go b/maps/routing/apiv2/routingpb/units.pb.go index 8466ed4653e4..65d0aeed41d9 100755 --- a/maps/routing/apiv2/routingpb/units.pb.go +++ b/maps/routing/apiv2/routingpb/units.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/units.proto diff --git a/maps/routing/apiv2/routingpb/vehicle_emission_type.pb.go b/maps/routing/apiv2/routingpb/vehicle_emission_type.pb.go index 757b52e5c886..51f389cbd948 100755 --- a/maps/routing/apiv2/routingpb/vehicle_emission_type.pb.go +++ b/maps/routing/apiv2/routingpb/vehicle_emission_type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/vehicle_emission_type.proto diff --git a/maps/routing/apiv2/routingpb/vehicle_info.pb.go b/maps/routing/apiv2/routingpb/vehicle_info.pb.go index 4d0bc86454b8..e208b03fe45b 100755 --- a/maps/routing/apiv2/routingpb/vehicle_info.pb.go +++ b/maps/routing/apiv2/routingpb/vehicle_info.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/vehicle_info.proto @@ -49,11 +49,9 @@ type VehicleInfo struct { func (x *VehicleInfo) Reset() { *x = VehicleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_vehicle_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_vehicle_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VehicleInfo) String() string { @@ -64,7 +62,7 @@ func (*VehicleInfo) ProtoMessage() {} func (x *VehicleInfo) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_vehicle_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,20 +148,6 @@ func file_google_maps_routing_v2_vehicle_info_proto_init() { return } file_google_maps_routing_v2_vehicle_emission_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_vehicle_info_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VehicleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/maps/routing/apiv2/routingpb/waypoint.pb.go b/maps/routing/apiv2/routingpb/waypoint.pb.go index 46807abeb909..31ca0a19815c 100755 --- a/maps/routing/apiv2/routingpb/waypoint.pb.go +++ b/maps/routing/apiv2/routingpb/waypoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/routing/v2/waypoint.proto @@ -80,11 +80,9 @@ type Waypoint struct { func (x *Waypoint) Reset() { *x = Waypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_routing_v2_waypoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_routing_v2_waypoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Waypoint) String() string { @@ -95,7 +93,7 @@ func (*Waypoint) ProtoMessage() {} func (x *Waypoint) ProtoReflect() protoreflect.Message { mi := &file_google_maps_routing_v2_waypoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,20 +256,6 @@ func file_google_maps_routing_v2_waypoint_proto_init() { return } file_google_maps_routing_v2_location_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_maps_routing_v2_waypoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Waypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_routing_v2_waypoint_proto_msgTypes[0].OneofWrappers = []any{ (*Waypoint_Location)(nil), (*Waypoint_PlaceId)(nil), diff --git a/maps/solar/apiv1/helpers.go b/maps/solar/apiv1/helpers.go index e2ba6640aba7..22213580f597 100755 --- a/maps/solar/apiv1/helpers.go +++ b/maps/solar/apiv1/helpers.go @@ -18,10 +18,20 @@ package solar import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "solar.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maps/solar/apiv1/solar_client.go b/maps/solar/apiv1/solar_client.go index 95fb5cfd50a1..96f1a9a6c39c 100755 --- a/maps/solar/apiv1/solar_client.go +++ b/maps/solar/apiv1/solar_client.go @@ -19,7 +19,7 @@ package solar import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( solarpb "cloud.google.com/go/maps/solar/apiv1/solarpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -220,6 +219,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new solar client based on gRPC. @@ -246,6 +247,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: solarpb.NewSolarClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -292,6 +294,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new solar rest client. @@ -309,6 +313,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -358,7 +363,7 @@ func (c *gRPCClient) FindClosestBuildingInsights(ctx context.Context, req *solar var resp *solarpb.BuildingInsights err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FindClosestBuildingInsights(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FindClosestBuildingInsights, req, settings.GRPC, c.logger, "FindClosestBuildingInsights") return err }, opts...) if err != nil { @@ -373,7 +378,7 @@ func (c *gRPCClient) GetDataLayers(ctx context.Context, req *solarpb.GetDataLaye var resp *solarpb.DataLayers err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataLayers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataLayers, req, settings.GRPC, c.logger, "GetDataLayers") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *gRPCClient) GetGeoTiff(ctx context.Context, req *solarpb.GetGeoTiffRequ var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGeoTiff(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGeoTiff, req, settings.GRPC, c.logger, "GetGeoTiff") return err }, opts...) if err != nil { @@ -441,17 +446,7 @@ func (c *restClient) FindClosestBuildingInsights(ctx context.Context, req *solar httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FindClosestBuildingInsights") if err != nil { return err } @@ -519,17 +514,7 @@ func (c *restClient) GetDataLayers(ctx context.Context, req *solarpb.GetDataLaye httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataLayers") if err != nil { return err } @@ -576,17 +561,7 @@ func (c *restClient) GetGeoTiff(ctx context.Context, req *solarpb.GetGeoTiffRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "GetGeoTiff") if err != nil { return err } diff --git a/maps/solar/apiv1/solarpb/solar_service.pb.go b/maps/solar/apiv1/solarpb/solar_service.pb.go index e322add1f30d..82a415a3c327 100755 --- a/maps/solar/apiv1/solarpb/solar_service.pb.go +++ b/maps/solar/apiv1/solarpb/solar_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/maps/solar/v1/solar_service.proto @@ -250,11 +250,9 @@ type FindClosestBuildingInsightsRequest struct { func (x *FindClosestBuildingInsightsRequest) Reset() { *x = FindClosestBuildingInsightsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindClosestBuildingInsightsRequest) String() string { @@ -265,7 +263,7 @@ func (*FindClosestBuildingInsightsRequest) ProtoMessage() {} func (x *FindClosestBuildingInsightsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +313,9 @@ type LatLngBox struct { func (x *LatLngBox) Reset() { *x = LatLngBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatLngBox) String() string { @@ -330,7 +326,7 @@ func (*LatLngBox) ProtoMessage() {} func (x *LatLngBox) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +390,9 @@ type BuildingInsights struct { func (x *BuildingInsights) Reset() { *x = BuildingInsights{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BuildingInsights) String() string { @@ -409,7 +403,7 @@ func (*BuildingInsights) ProtoMessage() {} func (x *BuildingInsights) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +579,9 @@ type SolarPotential struct { func (x *SolarPotential) Reset() { *x = SolarPotential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SolarPotential) String() string { @@ -600,7 +592,7 @@ func (*SolarPotential) ProtoMessage() {} func (x *SolarPotential) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +734,9 @@ type RoofSegmentSizeAndSunshineStats struct { func (x *RoofSegmentSizeAndSunshineStats) Reset() { *x = RoofSegmentSizeAndSunshineStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoofSegmentSizeAndSunshineStats) String() string { @@ -757,7 +747,7 @@ func (*RoofSegmentSizeAndSunshineStats) ProtoMessage() {} func (x *RoofSegmentSizeAndSunshineStats) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +826,9 @@ type SizeAndSunshineStats struct { func (x *SizeAndSunshineStats) Reset() { *x = SizeAndSunshineStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SizeAndSunshineStats) String() string { @@ -851,7 +839,7 @@ func (*SizeAndSunshineStats) ProtoMessage() {} func (x *SizeAndSunshineStats) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +906,9 @@ type SolarPanel struct { func (x *SolarPanel) Reset() { *x = SolarPanel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SolarPanel) String() string { @@ -933,7 +919,7 @@ func (*SolarPanel) ProtoMessage() {} func (x *SolarPanel) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +985,9 @@ type SolarPanelConfig struct { func (x *SolarPanelConfig) Reset() { *x = SolarPanelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SolarPanelConfig) String() string { @@ -1014,7 +998,7 @@ func (*SolarPanelConfig) ProtoMessage() {} func (x *SolarPanelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1062,9 @@ type RoofSegmentSummary struct { func (x *RoofSegmentSummary) Reset() { *x = RoofSegmentSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoofSegmentSummary) String() string { @@ -1093,7 +1075,7 @@ func (*RoofSegmentSummary) ProtoMessage() {} func (x *RoofSegmentSummary) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1178,11 +1160,9 @@ type FinancialAnalysis struct { func (x *FinancialAnalysis) Reset() { *x = FinancialAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinancialAnalysis) String() string { @@ -1193,7 +1173,7 @@ func (*FinancialAnalysis) ProtoMessage() {} func (x *FinancialAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1296,9 @@ type FinancialDetails struct { func (x *FinancialDetails) Reset() { *x = FinancialDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinancialDetails) String() string { @@ -1331,7 +1309,7 @@ func (*FinancialDetails) ProtoMessage() {} func (x *FinancialDetails) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1419,9 @@ type SavingsOverTime struct { func (x *SavingsOverTime) Reset() { *x = SavingsOverTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SavingsOverTime) String() string { @@ -1456,7 +1432,7 @@ func (*SavingsOverTime) ProtoMessage() {} func (x *SavingsOverTime) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1514,9 @@ type LeasingSavings struct { func (x *LeasingSavings) Reset() { *x = LeasingSavings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeasingSavings) String() string { @@ -1553,7 +1527,7 @@ func (*LeasingSavings) ProtoMessage() {} func (x *LeasingSavings) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1621,11 +1595,9 @@ type CashPurchaseSavings struct { func (x *CashPurchaseSavings) Reset() { *x = CashPurchaseSavings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CashPurchaseSavings) String() string { @@ -1636,7 +1608,7 @@ func (*CashPurchaseSavings) ProtoMessage() {} func (x *CashPurchaseSavings) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,11 +1678,9 @@ type FinancedPurchaseSavings struct { func (x *FinancedPurchaseSavings) Reset() { *x = FinancedPurchaseSavings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinancedPurchaseSavings) String() string { @@ -1721,7 +1691,7 @@ func (*FinancedPurchaseSavings) ProtoMessage() {} func (x *FinancedPurchaseSavings) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1778,9 @@ type GetDataLayersRequest struct { func (x *GetDataLayersRequest) Reset() { *x = GetDataLayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataLayersRequest) String() string { @@ -1823,7 +1791,7 @@ func (*GetDataLayersRequest) ProtoMessage() {} func (x *GetDataLayersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1960,11 +1928,9 @@ type DataLayers struct { func (x *DataLayers) Reset() { *x = DataLayers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataLayers) String() string { @@ -1975,7 +1941,7 @@ func (*DataLayers) ProtoMessage() {} func (x *DataLayers) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2065,11 +2031,9 @@ type GetGeoTiffRequest struct { func (x *GetGeoTiffRequest) Reset() { *x = GetGeoTiffRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGeoTiffRequest) String() string { @@ -2080,7 +2044,7 @@ func (*GetGeoTiffRequest) ProtoMessage() {} func (x *GetGeoTiffRequest) ProtoReflect() protoreflect.Message { mi := &file_google_maps_solar_v1_solar_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2717,224 +2681,6 @@ func file_google_maps_solar_v1_solar_service_proto_init() { if File_google_maps_solar_v1_solar_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_maps_solar_v1_solar_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FindClosestBuildingInsightsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LatLngBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BuildingInsights); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SolarPotential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RoofSegmentSizeAndSunshineStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SizeAndSunshineStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SolarPanel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SolarPanelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RoofSegmentSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FinancialAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FinancialDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SavingsOverTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LeasingSavings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CashPurchaseSavings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FinancedPurchaseSavings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetDataLayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DataLayers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_maps_solar_v1_solar_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetGeoTiffRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_maps_solar_v1_solar_service_proto_msgTypes[4].OneofWrappers = []any{} file_google_maps_solar_v1_solar_service_proto_msgTypes[6].OneofWrappers = []any{} file_google_maps_solar_v1_solar_service_proto_msgTypes[8].OneofWrappers = []any{} diff --git a/mediatranslation/apiv1beta1/helpers.go b/mediatranslation/apiv1beta1/helpers.go index 22f9a94764d0..1aa27f94ee08 100755 --- a/mediatranslation/apiv1beta1/helpers.go +++ b/mediatranslation/apiv1beta1/helpers.go @@ -18,10 +18,16 @@ package mediatranslation import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "mediatranslation.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/mediatranslation/apiv1beta1/mediatranslationpb/media_translation.pb.go b/mediatranslation/apiv1beta1/mediatranslationpb/media_translation.pb.go index daf18b4ace92..b0c0b8a8e00a 100755 --- a/mediatranslation/apiv1beta1/mediatranslationpb/media_translation.pb.go +++ b/mediatranslation/apiv1beta1/mediatranslationpb/media_translation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/mediatranslation/v1beta1/media_translation.proto @@ -160,11 +160,9 @@ type TranslateSpeechConfig struct { func (x *TranslateSpeechConfig) Reset() { *x = TranslateSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateSpeechConfig) String() string { @@ -175,7 +173,7 @@ func (*TranslateSpeechConfig) ProtoMessage() {} func (x *TranslateSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +250,9 @@ type StreamingTranslateSpeechConfig struct { func (x *StreamingTranslateSpeechConfig) Reset() { *x = StreamingTranslateSpeechConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingTranslateSpeechConfig) String() string { @@ -267,7 +263,7 @@ func (*StreamingTranslateSpeechConfig) ProtoMessage() {} func (x *StreamingTranslateSpeechConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type StreamingTranslateSpeechRequest struct { func (x *StreamingTranslateSpeechRequest) Reset() { *x = StreamingTranslateSpeechRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingTranslateSpeechRequest) String() string { @@ -332,7 +326,7 @@ func (*StreamingTranslateSpeechRequest) ProtoMessage() {} func (x *StreamingTranslateSpeechRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +408,9 @@ type StreamingTranslateSpeechResult struct { func (x *StreamingTranslateSpeechResult) Reset() { *x = StreamingTranslateSpeechResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingTranslateSpeechResult) String() string { @@ -429,7 +421,7 @@ func (*StreamingTranslateSpeechResult) ProtoMessage() {} func (x *StreamingTranslateSpeechResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +481,9 @@ type StreamingTranslateSpeechResponse struct { func (x *StreamingTranslateSpeechResponse) Reset() { *x = StreamingTranslateSpeechResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingTranslateSpeechResponse) String() string { @@ -504,7 +494,7 @@ func (*StreamingTranslateSpeechResponse) ProtoMessage() {} func (x *StreamingTranslateSpeechResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +549,9 @@ type StreamingTranslateSpeechResult_TextTranslationResult struct { func (x *StreamingTranslateSpeechResult_TextTranslationResult) Reset() { *x = StreamingTranslateSpeechResult_TextTranslationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingTranslateSpeechResult_TextTranslationResult) String() string { @@ -574,7 +562,7 @@ func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage() {} func (x *StreamingTranslateSpeechResult_TextTranslationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,80 +774,6 @@ func file_google_cloud_mediatranslation_v1beta1_media_translation_proto_init() { if File_google_cloud_mediatranslation_v1beta1_media_translation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TranslateSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StreamingTranslateSpeechConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StreamingTranslateSpeechRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamingTranslateSpeechResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingTranslateSpeechResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamingTranslateSpeechResult_TextTranslationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2].OneofWrappers = []any{ (*StreamingTranslateSpeechRequest_StreamingConfig)(nil), (*StreamingTranslateSpeechRequest_AudioContent)(nil), diff --git a/mediatranslation/apiv1beta1/speech_translation_client.go b/mediatranslation/apiv1beta1/speech_translation_client.go index d42d69397a3b..56680cfb76e0 100755 --- a/mediatranslation/apiv1beta1/speech_translation_client.go +++ b/mediatranslation/apiv1beta1/speech_translation_client.go @@ -18,6 +18,7 @@ package mediatranslation import ( "context" + "log/slog" "math" mediatranslationpb "cloud.google.com/go/mediatranslation/apiv1beta1/mediatranslationpb" @@ -120,6 +121,8 @@ type speechTranslationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpeechTranslationClient creates a new speech translation service client based on gRPC. @@ -146,6 +149,7 @@ func NewSpeechTranslationClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, speechTranslationClient: mediatranslationpb.NewSpeechTranslationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -185,7 +189,9 @@ func (c *speechTranslationGRPCClient) StreamingTranslateSpeech(ctx context.Conte opts = append((*c.CallOptions).StreamingTranslateSpeech[0:len((*c.CallOptions).StreamingTranslateSpeech):len((*c.CallOptions).StreamingTranslateSpeech)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingTranslateSpeech") resp, err = c.speechTranslationClient.StreamingTranslateSpeech(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingTranslateSpeech") return err }, opts...) if err != nil { diff --git a/memcache/apiv1/cloud_memcache_client.go b/memcache/apiv1/cloud_memcache_client.go index dc194992a6c2..445a7266a279 100755 --- a/memcache/apiv1/cloud_memcache_client.go +++ b/memcache/apiv1/cloud_memcache_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" memcachepb "cloud.google.com/go/memcache/apiv1/memcachepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -367,6 +366,8 @@ type cloudMemcacheGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudMemcacheClient creates a new cloud memcache client based on gRPC. @@ -411,6 +412,7 @@ func NewCloudMemcacheClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, cloudMemcacheClient: memcachepb.NewCloudMemcacheClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -475,6 +477,8 @@ type cloudMemcacheRESTClient struct { // Points back to the CallOptions field of the containing CloudMemcacheClient CallOptions **CloudMemcacheCallOptions + + logger *slog.Logger } // NewCloudMemcacheRESTClient creates a new cloud memcache rest client. @@ -510,6 +514,7 @@ func NewCloudMemcacheRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -583,7 +588,7 @@ func (c *cloudMemcacheGRPCClient) ListInstances(ctx context.Context, req *memcac } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -618,7 +623,7 @@ func (c *cloudMemcacheGRPCClient) GetInstance(ctx context.Context, req *memcache var resp *memcachepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -636,7 +641,7 @@ func (c *cloudMemcacheGRPCClient) CreateInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -656,7 +661,7 @@ func (c *cloudMemcacheGRPCClient) UpdateInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *cloudMemcacheGRPCClient) UpdateParameters(ctx context.Context, req *mem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.UpdateParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.UpdateParameters, req, settings.GRPC, c.logger, "UpdateParameters") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *cloudMemcacheGRPCClient) DeleteInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *cloudMemcacheGRPCClient) ApplyParameters(ctx context.Context, req *memc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.ApplyParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.ApplyParameters, req, settings.GRPC, c.logger, "ApplyParameters") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *cloudMemcacheGRPCClient) RescheduleMaintenance(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.RescheduleMaintenance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.RescheduleMaintenance, req, settings.GRPC, c.logger, "RescheduleMaintenance") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *cloudMemcacheGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -785,7 +790,7 @@ func (c *cloudMemcacheGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *cloudMemcacheGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -833,7 +838,7 @@ func (c *cloudMemcacheGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -848,7 +853,7 @@ func (c *cloudMemcacheGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *cloudMemcacheGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -954,21 +959,10 @@ func (c *cloudMemcacheRESTClient) ListInstances(ctx context.Context, req *memcac } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1031,17 +1025,7 @@ func (c *cloudMemcacheRESTClient) GetInstance(ctx context.Context, req *memcache httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1098,21 +1082,10 @@ func (c *cloudMemcacheRESTClient) CreateInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1176,21 +1149,10 @@ func (c *cloudMemcacheRESTClient) UpdateInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1249,21 +1211,10 @@ func (c *cloudMemcacheRESTClient) UpdateParameters(ctx context.Context, req *mem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateParameters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1313,21 +1264,10 @@ func (c *cloudMemcacheRESTClient) DeleteInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1384,21 +1324,10 @@ func (c *cloudMemcacheRESTClient) ApplyParameters(ctx context.Context, req *memc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyParameters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1454,21 +1383,10 @@ func (c *cloudMemcacheRESTClient) RescheduleMaintenance(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RescheduleMaintenance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1519,17 +1437,7 @@ func (c *cloudMemcacheRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1594,21 +1502,10 @@ func (c *cloudMemcacheRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1674,15 +1571,8 @@ func (c *cloudMemcacheRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1716,15 +1606,8 @@ func (c *cloudMemcacheRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1761,17 +1644,7 @@ func (c *cloudMemcacheRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1836,21 +1709,10 @@ func (c *cloudMemcacheRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/memcache/apiv1/cloud_memcache_client_example_go123_test.go b/memcache/apiv1/cloud_memcache_client_example_go123_test.go index 3e901970ff42..e732ad16935d 100644 --- a/memcache/apiv1/cloud_memcache_client_example_go123_test.go +++ b/memcache/apiv1/cloud_memcache_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudMemcacheClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudMemcacheClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudMemcacheClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/memcache/apiv1/helpers.go b/memcache/apiv1/helpers.go index a36f6c3e99d3..a2f8a0fa5e56 100755 --- a/memcache/apiv1/helpers.go +++ b/memcache/apiv1/helpers.go @@ -18,10 +18,20 @@ package memcache import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "memcache.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/memcache/apiv1/memcachepb/cloud_memcache.pb.go b/memcache/apiv1/memcachepb/cloud_memcache.pb.go index 9562f6ad5493..3c51cde1b540 100755 --- a/memcache/apiv1/memcachepb/cloud_memcache.pb.go +++ b/memcache/apiv1/memcachepb/cloud_memcache.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/memcache/v1/cloud_memcache.proto @@ -401,11 +401,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -416,7 +414,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +576,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -593,7 +589,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +648,9 @@ type WeeklyMaintenanceWindow struct { func (x *WeeklyMaintenanceWindow) Reset() { *x = WeeklyMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyMaintenanceWindow) String() string { @@ -667,7 +661,7 @@ func (*WeeklyMaintenanceWindow) ProtoMessage() {} func (x *WeeklyMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +714,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -735,7 +727,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +785,9 @@ type RescheduleMaintenanceRequest struct { func (x *RescheduleMaintenanceRequest) Reset() { *x = RescheduleMaintenanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RescheduleMaintenanceRequest) String() string { @@ -808,7 +798,7 @@ func (*RescheduleMaintenanceRequest) ProtoMessage() {} func (x *RescheduleMaintenanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -875,11 +865,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -890,7 +878,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +949,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -976,7 +962,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1014,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1043,7 +1027,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1078,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1109,7 +1091,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,11 +1144,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1177,7 +1157,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1202,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1237,7 +1215,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1278,11 +1256,9 @@ type ApplyParametersRequest struct { func (x *ApplyParametersRequest) Reset() { *x = ApplyParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyParametersRequest) String() string { @@ -1293,7 +1269,7 @@ func (*ApplyParametersRequest) ProtoMessage() {} func (x *ApplyParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1322,9 @@ type UpdateParametersRequest struct { func (x *UpdateParametersRequest) Reset() { *x = UpdateParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateParametersRequest) String() string { @@ -1361,7 +1335,7 @@ func (*UpdateParametersRequest) ProtoMessage() {} func (x *UpdateParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1414,11 +1388,9 @@ type MemcacheParameters struct { func (x *MemcacheParameters) Reset() { *x = MemcacheParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemcacheParameters) String() string { @@ -1429,7 +1401,7 @@ func (*MemcacheParameters) ProtoMessage() {} func (x *MemcacheParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1485,11 +1457,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1500,7 +1470,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1548,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -1593,7 +1561,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1623,11 +1591,9 @@ type ZoneMetadata struct { func (x *ZoneMetadata) Reset() { *x = ZoneMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneMetadata) String() string { @@ -1638,7 +1604,7 @@ func (*ZoneMetadata) ProtoMessage() {} func (x *ZoneMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1667,11 +1633,9 @@ type Instance_NodeConfig struct { func (x *Instance_NodeConfig) Reset() { *x = Instance_NodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_NodeConfig) String() string { @@ -1682,7 +1646,7 @@ func (*Instance_NodeConfig) ProtoMessage() {} func (x *Instance_NodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1698,9 @@ type Instance_Node struct { func (x *Instance_Node) Reset() { *x = Instance_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Node) String() string { @@ -1749,7 +1711,7 @@ func (*Instance_Node) ProtoMessage() {} func (x *Instance_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1819,11 +1781,9 @@ type Instance_InstanceMessage struct { func (x *Instance_InstanceMessage) Reset() { *x = Instance_InstanceMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceMessage) String() string { @@ -1834,7 +1794,7 @@ func (*Instance_InstanceMessage) ProtoMessage() {} func (x *Instance_InstanceMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2481,248 +2441,6 @@ func file_google_cloud_memcache_v1_cloud_memcache_proto_init() { if File_google_cloud_memcache_v1_cloud_memcache_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RescheduleMaintenanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ApplyParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MemcacheParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ZoneMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Instance_NodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1_cloud_memcache_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/memcache/apiv1beta2/cloud_memcache_client.go b/memcache/apiv1beta2/cloud_memcache_client.go index c18f49037b73..959250b2195d 100755 --- a/memcache/apiv1beta2/cloud_memcache_client.go +++ b/memcache/apiv1beta2/cloud_memcache_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" memcachepb "cloud.google.com/go/memcache/apiv1beta2/memcachepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -387,6 +386,8 @@ type cloudMemcacheGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudMemcacheClient creates a new cloud memcache client based on gRPC. @@ -431,6 +432,7 @@ func NewCloudMemcacheClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, cloudMemcacheClient: memcachepb.NewCloudMemcacheClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -495,6 +497,8 @@ type cloudMemcacheRESTClient struct { // Points back to the CallOptions field of the containing CloudMemcacheClient CallOptions **CloudMemcacheCallOptions + + logger *slog.Logger } // NewCloudMemcacheRESTClient creates a new cloud memcache rest client. @@ -530,6 +534,7 @@ func NewCloudMemcacheRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -603,7 +608,7 @@ func (c *cloudMemcacheGRPCClient) ListInstances(ctx context.Context, req *memcac } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -638,7 +643,7 @@ func (c *cloudMemcacheGRPCClient) GetInstance(ctx context.Context, req *memcache var resp *memcachepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -656,7 +661,7 @@ func (c *cloudMemcacheGRPCClient) CreateInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *cloudMemcacheGRPCClient) UpdateInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -696,7 +701,7 @@ func (c *cloudMemcacheGRPCClient) UpdateParameters(ctx context.Context, req *mem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.UpdateParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.UpdateParameters, req, settings.GRPC, c.logger, "UpdateParameters") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *cloudMemcacheGRPCClient) DeleteInstance(ctx context.Context, req *memca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -736,7 +741,7 @@ func (c *cloudMemcacheGRPCClient) ApplyParameters(ctx context.Context, req *memc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.ApplyParameters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.ApplyParameters, req, settings.GRPC, c.logger, "ApplyParameters") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *cloudMemcacheGRPCClient) ApplySoftwareUpdate(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.ApplySoftwareUpdate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.ApplySoftwareUpdate, req, settings.GRPC, c.logger, "ApplySoftwareUpdate") return err }, opts...) if err != nil { @@ -776,7 +781,7 @@ func (c *cloudMemcacheGRPCClient) RescheduleMaintenance(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudMemcacheClient.RescheduleMaintenance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudMemcacheClient.RescheduleMaintenance, req, settings.GRPC, c.logger, "RescheduleMaintenance") return err }, opts...) if err != nil { @@ -796,7 +801,7 @@ func (c *cloudMemcacheGRPCClient) GetLocation(ctx context.Context, req *location var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *cloudMemcacheGRPCClient) ListLocations(ctx context.Context, req *locati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *cloudMemcacheGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -873,7 +878,7 @@ func (c *cloudMemcacheGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -888,7 +893,7 @@ func (c *cloudMemcacheGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *cloudMemcacheGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -994,21 +999,10 @@ func (c *cloudMemcacheRESTClient) ListInstances(ctx context.Context, req *memcac } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1071,17 +1065,7 @@ func (c *cloudMemcacheRESTClient) GetInstance(ctx context.Context, req *memcache httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1138,21 +1122,10 @@ func (c *cloudMemcacheRESTClient) CreateInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1216,21 +1189,10 @@ func (c *cloudMemcacheRESTClient) UpdateInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1289,21 +1251,10 @@ func (c *cloudMemcacheRESTClient) UpdateParameters(ctx context.Context, req *mem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateParameters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1353,21 +1304,10 @@ func (c *cloudMemcacheRESTClient) DeleteInstance(ctx context.Context, req *memca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1424,21 +1364,10 @@ func (c *cloudMemcacheRESTClient) ApplyParameters(ctx context.Context, req *memc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyParameters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1494,21 +1423,10 @@ func (c *cloudMemcacheRESTClient) ApplySoftwareUpdate(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplySoftwareUpdate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1564,21 +1482,10 @@ func (c *cloudMemcacheRESTClient) RescheduleMaintenance(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RescheduleMaintenance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1629,17 +1536,7 @@ func (c *cloudMemcacheRESTClient) GetLocation(ctx context.Context, req *location httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1704,21 +1601,10 @@ func (c *cloudMemcacheRESTClient) ListLocations(ctx context.Context, req *locati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1784,15 +1670,8 @@ func (c *cloudMemcacheRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1826,15 +1705,8 @@ func (c *cloudMemcacheRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1871,17 +1743,7 @@ func (c *cloudMemcacheRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1946,21 +1808,10 @@ func (c *cloudMemcacheRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/memcache/apiv1beta2/cloud_memcache_client_example_go123_test.go b/memcache/apiv1beta2/cloud_memcache_client_example_go123_test.go index b12c8528a2de..43c21d22c430 100644 --- a/memcache/apiv1beta2/cloud_memcache_client_example_go123_test.go +++ b/memcache/apiv1beta2/cloud_memcache_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudMemcacheClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudMemcacheClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudMemcacheClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/memcache/apiv1beta2/helpers.go b/memcache/apiv1beta2/helpers.go index a36f6c3e99d3..a2f8a0fa5e56 100755 --- a/memcache/apiv1beta2/helpers.go +++ b/memcache/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package memcache import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "memcache.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/memcache/apiv1beta2/memcachepb/cloud_memcache.pb.go b/memcache/apiv1beta2/memcachepb/cloud_memcache.pb.go index b4635ca5fe9c..b3b67c3a0c27 100755 --- a/memcache/apiv1beta2/memcachepb/cloud_memcache.pb.go +++ b/memcache/apiv1beta2/memcachepb/cloud_memcache.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/memcache/v1beta2/cloud_memcache.proto @@ -403,11 +403,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -418,7 +416,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +585,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -602,7 +598,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +657,9 @@ type WeeklyMaintenanceWindow struct { func (x *WeeklyMaintenanceWindow) Reset() { *x = WeeklyMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyMaintenanceWindow) String() string { @@ -676,7 +670,7 @@ func (*WeeklyMaintenanceWindow) ProtoMessage() {} func (x *WeeklyMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +723,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -744,7 +736,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +803,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -826,7 +816,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,11 +887,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -912,7 +900,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +952,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -979,7 +965,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1016,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1045,7 +1029,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,11 +1082,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1113,7 +1095,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1140,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1173,7 +1153,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1197,9 @@ type RescheduleMaintenanceRequest struct { func (x *RescheduleMaintenanceRequest) Reset() { *x = RescheduleMaintenanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RescheduleMaintenanceRequest) String() string { @@ -1232,7 +1210,7 @@ func (*RescheduleMaintenanceRequest) ProtoMessage() {} func (x *RescheduleMaintenanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1265,9 @@ type ApplyParametersRequest struct { func (x *ApplyParametersRequest) Reset() { *x = ApplyParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyParametersRequest) String() string { @@ -1302,7 +1278,7 @@ func (*ApplyParametersRequest) ProtoMessage() {} func (x *ApplyParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1331,9 @@ type UpdateParametersRequest struct { func (x *UpdateParametersRequest) Reset() { *x = UpdateParametersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateParametersRequest) String() string { @@ -1370,7 +1344,7 @@ func (*UpdateParametersRequest) ProtoMessage() {} func (x *UpdateParametersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1400,9 @@ type ApplySoftwareUpdateRequest struct { func (x *ApplySoftwareUpdateRequest) Reset() { *x = ApplySoftwareUpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplySoftwareUpdateRequest) String() string { @@ -1441,7 +1413,7 @@ func (*ApplySoftwareUpdateRequest) ProtoMessage() {} func (x *ApplySoftwareUpdateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1466,9 @@ type MemcacheParameters struct { func (x *MemcacheParameters) Reset() { *x = MemcacheParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemcacheParameters) String() string { @@ -1509,7 +1479,7 @@ func (*MemcacheParameters) ProtoMessage() {} func (x *MemcacheParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1535,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1580,7 +1548,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1658,11 +1626,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -1673,7 +1639,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1669,9 @@ type ZoneMetadata struct { func (x *ZoneMetadata) Reset() { *x = ZoneMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneMetadata) String() string { @@ -1718,7 +1682,7 @@ func (*ZoneMetadata) ProtoMessage() {} func (x *ZoneMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1747,11 +1711,9 @@ type Instance_NodeConfig struct { func (x *Instance_NodeConfig) Reset() { *x = Instance_NodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_NodeConfig) String() string { @@ -1762,7 +1724,7 @@ func (*Instance_NodeConfig) ProtoMessage() {} func (x *Instance_NodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1778,9 @@ type Instance_Node struct { func (x *Instance_Node) Reset() { *x = Instance_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Node) String() string { @@ -1831,7 +1791,7 @@ func (*Instance_Node) ProtoMessage() {} func (x *Instance_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1868,9 @@ type Instance_InstanceMessage struct { func (x *Instance_InstanceMessage) Reset() { *x = Instance_InstanceMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InstanceMessage) String() string { @@ -1923,7 +1881,7 @@ func (*Instance_InstanceMessage) ProtoMessage() {} func (x *Instance_InstanceMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2626,260 +2584,6 @@ func file_google_cloud_memcache_v1beta2_cloud_memcache_proto_init() { if File_google_cloud_memcache_v1beta2_cloud_memcache_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RescheduleMaintenanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ApplyParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateParametersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ApplySoftwareUpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MemcacheParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ZoneMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Instance_NodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_memcache_v1beta2_cloud_memcache_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InstanceMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/metastore/apiv1/dataproc_metastore_client.go b/metastore/apiv1/dataproc_metastore_client.go index fe85ebe5f0de..833fe0e081a5 100755 --- a/metastore/apiv1/dataproc_metastore_client.go +++ b/metastore/apiv1/dataproc_metastore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -735,6 +734,8 @@ type dataprocMetastoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreClient creates a new dataproc metastore client based on gRPC. @@ -780,6 +781,7 @@ func NewDataprocMetastoreClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, dataprocMetastoreClient: metastorepb.NewDataprocMetastoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -845,6 +847,8 @@ type dataprocMetastoreRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreClient CallOptions **DataprocMetastoreCallOptions + + logger *slog.Logger } // NewDataprocMetastoreRESTClient creates a new dataproc metastore rest client. @@ -881,6 +885,7 @@ func NewDataprocMetastoreRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -954,7 +959,7 @@ func (c *dataprocMetastoreGRPCClient) ListServices(ctx context.Context, req *met } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -989,7 +994,7 @@ func (c *dataprocMetastoreGRPCClient) GetService(ctx context.Context, req *metas var resp *metastorepb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *dataprocMetastoreGRPCClient) CreateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1027,7 +1032,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1047,7 +1052,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *dataprocMetastoreGRPCClient) ListMetadataImports(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListMetadataImports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListMetadataImports, req, settings.GRPC, c.logger, "ListMetadataImports") return err }, opts...) if err != nil { @@ -1113,7 +1118,7 @@ func (c *dataprocMetastoreGRPCClient) GetMetadataImport(ctx context.Context, req var resp *metastorepb.MetadataImport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetMetadataImport, req, settings.GRPC, c.logger, "GetMetadataImport") return err }, opts...) if err != nil { @@ -1131,7 +1136,7 @@ func (c *dataprocMetastoreGRPCClient) CreateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateMetadataImport, req, settings.GRPC, c.logger, "CreateMetadataImport") return err }, opts...) if err != nil { @@ -1151,7 +1156,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateMetadataImport, req, settings.GRPC, c.logger, "UpdateMetadataImport") return err }, opts...) if err != nil { @@ -1171,7 +1176,7 @@ func (c *dataprocMetastoreGRPCClient) ExportMetadata(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ExportMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ExportMetadata, req, settings.GRPC, c.logger, "ExportMetadata") return err }, opts...) if err != nil { @@ -1191,7 +1196,7 @@ func (c *dataprocMetastoreGRPCClient) RestoreService(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.RestoreService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.RestoreService, req, settings.GRPC, c.logger, "RestoreService") return err }, opts...) if err != nil { @@ -1222,7 +1227,7 @@ func (c *dataprocMetastoreGRPCClient) ListBackups(ctx context.Context, req *meta } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1257,7 +1262,7 @@ func (c *dataprocMetastoreGRPCClient) GetBackup(ctx context.Context, req *metast var resp *metastorepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1275,7 +1280,7 @@ func (c *dataprocMetastoreGRPCClient) CreateBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1295,7 +1300,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1315,7 +1320,7 @@ func (c *dataprocMetastoreGRPCClient) QueryMetadata(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.QueryMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.QueryMetadata, req, settings.GRPC, c.logger, "QueryMetadata") return err }, opts...) if err != nil { @@ -1335,7 +1340,7 @@ func (c *dataprocMetastoreGRPCClient) MoveTableToDatabase(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.MoveTableToDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.MoveTableToDatabase, req, settings.GRPC, c.logger, "MoveTableToDatabase") return err }, opts...) if err != nil { @@ -1355,7 +1360,7 @@ func (c *dataprocMetastoreGRPCClient) AlterMetadataResourceLocation(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.AlterMetadataResourceLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.AlterMetadataResourceLocation, req, settings.GRPC, c.logger, "AlterMetadataResourceLocation") return err }, opts...) if err != nil { @@ -1375,7 +1380,7 @@ func (c *dataprocMetastoreGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1404,7 +1409,7 @@ func (c *dataprocMetastoreGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1439,7 +1444,7 @@ func (c *dataprocMetastoreGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *dataprocMetastoreGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1475,7 +1480,7 @@ func (c *dataprocMetastoreGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1492,7 +1497,7 @@ func (c *dataprocMetastoreGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1506,7 +1511,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1521,7 +1526,7 @@ func (c *dataprocMetastoreGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1550,7 +1555,7 @@ func (c *dataprocMetastoreGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1627,21 +1632,10 @@ func (c *dataprocMetastoreRESTClient) ListServices(ctx context.Context, req *met } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1704,17 +1698,7 @@ func (c *dataprocMetastoreRESTClient) GetService(ctx context.Context, req *metas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1774,21 +1758,10 @@ func (c *dataprocMetastoreRESTClient) CreateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1855,21 +1828,10 @@ func (c *dataprocMetastoreRESTClient) UpdateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1922,21 +1884,10 @@ func (c *dataprocMetastoreRESTClient) DeleteService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2005,21 +1956,10 @@ func (c *dataprocMetastoreRESTClient) ListMetadataImports(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMetadataImports") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2082,17 +2022,7 @@ func (c *dataprocMetastoreRESTClient) GetMetadataImport(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMetadataImport") if err != nil { return err } @@ -2152,21 +2082,10 @@ func (c *dataprocMetastoreRESTClient) CreateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMetadataImport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2234,21 +2153,10 @@ func (c *dataprocMetastoreRESTClient) UpdateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMetadataImport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2304,21 +2212,10 @@ func (c *dataprocMetastoreRESTClient) ExportMetadata(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportMetadata") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2374,21 +2271,10 @@ func (c *dataprocMetastoreRESTClient) RestoreService(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2457,21 +2343,10 @@ func (c *dataprocMetastoreRESTClient) ListBackups(ctx context.Context, req *meta } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2534,17 +2409,7 @@ func (c *dataprocMetastoreRESTClient) GetBackup(ctx context.Context, req *metast httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2604,21 +2469,10 @@ func (c *dataprocMetastoreRESTClient) CreateBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2671,21 +2525,10 @@ func (c *dataprocMetastoreRESTClient) DeleteBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2741,21 +2584,10 @@ func (c *dataprocMetastoreRESTClient) QueryMetadata(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryMetadata") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2811,21 +2643,10 @@ func (c *dataprocMetastoreRESTClient) MoveTableToDatabase(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveTableToDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2884,21 +2705,10 @@ func (c *dataprocMetastoreRESTClient) AlterMetadataResourceLocation(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AlterMetadataResourceLocation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2949,17 +2759,7 @@ func (c *dataprocMetastoreRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3024,21 +2824,10 @@ func (c *dataprocMetastoreRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3105,17 +2894,7 @@ func (c *dataprocMetastoreRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3175,17 +2954,7 @@ func (c *dataprocMetastoreRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3247,17 +3016,7 @@ func (c *dataprocMetastoreRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3310,15 +3069,8 @@ func (c *dataprocMetastoreRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3352,15 +3104,8 @@ func (c *dataprocMetastoreRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3397,17 +3142,7 @@ func (c *dataprocMetastoreRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3472,21 +3207,10 @@ func (c *dataprocMetastoreRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1/dataproc_metastore_client_example_go123_test.go b/metastore/apiv1/dataproc_metastore_client_example_go123_test.go index 6124b4a25ccf..84f80f9e993c 100644 --- a/metastore/apiv1/dataproc_metastore_client_example_go123_test.go +++ b/metastore/apiv1/dataproc_metastore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreClient_ListMetadataImports_all() { } for resp, err := range c.ListMetadataImports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataprocMetastoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDataprocMetastoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1/dataproc_metastore_federation_client.go b/metastore/apiv1/dataproc_metastore_federation_client.go index 7224e4839a09..0fa01677d390 100755 --- a/metastore/apiv1/dataproc_metastore_federation_client.go +++ b/metastore/apiv1/dataproc_metastore_federation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -321,6 +320,8 @@ type dataprocMetastoreFederationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreFederationClient creates a new dataproc metastore federation client based on gRPC. @@ -363,6 +364,7 @@ func NewDataprocMetastoreFederationClient(ctx context.Context, opts ...option.Cl connPool: connPool, dataprocMetastoreFederationClient: metastorepb.NewDataprocMetastoreFederationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -428,6 +430,8 @@ type dataprocMetastoreFederationRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreFederationClient CallOptions **DataprocMetastoreFederationCallOptions + + logger *slog.Logger } // NewDataprocMetastoreFederationRESTClient creates a new dataproc metastore federation rest client. @@ -461,6 +465,7 @@ func NewDataprocMetastoreFederationRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -534,7 +539,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListFederations(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.ListFederations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.ListFederations, req, settings.GRPC, c.logger, "ListFederations") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetFederation(ctx context.Contex var resp *metastorepb.Federation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.GetFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.GetFederation, req, settings.GRPC, c.logger, "GetFederation") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CreateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.CreateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.CreateFederation, req, settings.GRPC, c.logger, "CreateFederation") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *dataprocMetastoreFederationGRPCClient) UpdateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.UpdateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.UpdateFederation, req, settings.GRPC, c.logger, "UpdateFederation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.DeleteFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.DeleteFederation, req, settings.GRPC, c.logger, "DeleteFederation") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetLocation(ctx context.Context, var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListLocations(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *dataprocMetastoreFederationGRPCClient) SetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *dataprocMetastoreFederationGRPCClient) TestIamPermissions(ctx context.C var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -764,7 +769,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CancelOperation(ctx context.Cont opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -778,7 +783,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteOperation(ctx context.Cont opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -793,7 +798,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetOperation(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListOperations(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -899,21 +904,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListFederations(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFederations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -976,17 +970,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetFederation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFederation") if err != nil { return err } @@ -1046,21 +1030,10 @@ func (c *dataprocMetastoreFederationRESTClient) CreateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1127,21 +1100,10 @@ func (c *dataprocMetastoreFederationRESTClient) UpdateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1194,21 +1156,10 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1259,17 +1210,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetLocation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1334,21 +1275,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListLocations(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,17 +1345,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1485,17 +1405,7 @@ func (c *dataprocMetastoreFederationRESTClient) SetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1557,17 +1467,7 @@ func (c *dataprocMetastoreFederationRESTClient) TestIamPermissions(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1620,15 +1520,8 @@ func (c *dataprocMetastoreFederationRESTClient) CancelOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1662,15 +1555,8 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1707,17 +1593,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1782,21 +1658,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListOperations(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1/dataproc_metastore_federation_client_example_go123_test.go b/metastore/apiv1/dataproc_metastore_federation_client_example_go123_test.go index 45f3586140ba..dd4e8401a41b 100644 --- a/metastore/apiv1/dataproc_metastore_federation_client_example_go123_test.go +++ b/metastore/apiv1/dataproc_metastore_federation_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreFederationClient_ListFederations_all() { } for resp, err := range c.ListFederations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreFederationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreFederationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1/helpers.go b/metastore/apiv1/helpers.go index 0ce8e8260626..76e24fee5486 100755 --- a/metastore/apiv1/helpers.go +++ b/metastore/apiv1/helpers.go @@ -18,10 +18,20 @@ package metastore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "metastore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/metastore/apiv1/metastorepb/metastore.pb.go b/metastore/apiv1/metastorepb/metastore.pb.go index 0e34d771b9c9..3b0b1d0f9c95 100755 --- a/metastore/apiv1/metastorepb/metastore.pb.go +++ b/metastore/apiv1/metastorepb/metastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1/metastore.proto @@ -935,11 +935,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -950,7 +948,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1144,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -1161,7 +1157,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1227,11 +1223,9 @@ type HiveMetastoreConfig struct { func (x *HiveMetastoreConfig) Reset() { *x = HiveMetastoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveMetastoreConfig) String() string { @@ -1242,7 +1236,7 @@ func (*HiveMetastoreConfig) ProtoMessage() {} func (x *HiveMetastoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1307,9 @@ type KerberosConfig struct { func (x *KerberosConfig) Reset() { *x = KerberosConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KerberosConfig) String() string { @@ -1328,7 +1320,7 @@ func (*KerberosConfig) ProtoMessage() {} func (x *KerberosConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1378,11 +1370,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -1393,7 +1383,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1441,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1466,7 +1454,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,11 +1498,9 @@ type AuxiliaryVersionConfig struct { func (x *AuxiliaryVersionConfig) Reset() { *x = AuxiliaryVersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuxiliaryVersionConfig) String() string { @@ -1525,7 +1511,7 @@ func (*AuxiliaryVersionConfig) ProtoMessage() {} func (x *AuxiliaryVersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,11 +1562,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -1591,7 +1575,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1625,11 +1609,9 @@ type TelemetryConfig struct { func (x *TelemetryConfig) Reset() { *x = TelemetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TelemetryConfig) String() string { @@ -1640,7 +1622,7 @@ func (*TelemetryConfig) ProtoMessage() {} func (x *TelemetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1676,11 +1658,9 @@ type MetadataManagementActivity struct { func (x *MetadataManagementActivity) Reset() { *x = MetadataManagementActivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataManagementActivity) String() string { @@ -1691,7 +1671,7 @@ func (*MetadataManagementActivity) ProtoMessage() {} func (x *MetadataManagementActivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1750,11 +1730,9 @@ type MetadataImport struct { func (x *MetadataImport) Reset() { *x = MetadataImport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport) String() string { @@ -1765,7 +1743,7 @@ func (*MetadataImport) ProtoMessage() {} func (x *MetadataImport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1869,11 +1847,9 @@ type MetadataExport struct { func (x *MetadataExport) Reset() { *x = MetadataExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExport) String() string { @@ -1884,7 +1860,7 @@ func (*MetadataExport) ProtoMessage() {} func (x *MetadataExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1981,11 +1957,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -1996,7 +1970,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2086,11 +2060,9 @@ type Restore struct { func (x *Restore) Reset() { *x = Restore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restore) String() string { @@ -2101,7 +2073,7 @@ func (*Restore) ProtoMessage() {} func (x *Restore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2176,11 +2148,9 @@ type ScalingConfig struct { func (x *ScalingConfig) Reset() { *x = ScalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScalingConfig) String() string { @@ -2191,7 +2161,7 @@ func (*ScalingConfig) ProtoMessage() {} func (x *ScalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2284,11 +2254,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -2299,7 +2267,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2367,11 +2335,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -2382,7 +2348,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2434,11 +2400,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -2449,7 +2413,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2511,11 +2475,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -2526,7 +2488,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2604,11 +2566,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -2619,7 +2579,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2684,11 +2644,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -2699,7 +2657,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2764,11 +2722,9 @@ type ListMetadataImportsRequest struct { func (x *ListMetadataImportsRequest) Reset() { *x = ListMetadataImportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsRequest) String() string { @@ -2779,7 +2735,7 @@ func (*ListMetadataImportsRequest) ProtoMessage() {} func (x *ListMetadataImportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2847,11 +2803,9 @@ type ListMetadataImportsResponse struct { func (x *ListMetadataImportsResponse) Reset() { *x = ListMetadataImportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsResponse) String() string { @@ -2862,7 +2816,7 @@ func (*ListMetadataImportsResponse) ProtoMessage() {} func (x *ListMetadataImportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2914,11 +2868,9 @@ type GetMetadataImportRequest struct { func (x *GetMetadataImportRequest) Reset() { *x = GetMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataImportRequest) String() string { @@ -2929,7 +2881,7 @@ func (*GetMetadataImportRequest) ProtoMessage() {} func (x *GetMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2991,11 +2943,9 @@ type CreateMetadataImportRequest struct { func (x *CreateMetadataImportRequest) Reset() { *x = CreateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataImportRequest) String() string { @@ -3006,7 +2956,7 @@ func (*CreateMetadataImportRequest) ProtoMessage() {} func (x *CreateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3084,11 +3034,9 @@ type UpdateMetadataImportRequest struct { func (x *UpdateMetadataImportRequest) Reset() { *x = UpdateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMetadataImportRequest) String() string { @@ -3099,7 +3047,7 @@ func (*UpdateMetadataImportRequest) ProtoMessage() {} func (x *UpdateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3171,11 +3119,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3186,7 +3132,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3254,11 +3200,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3269,7 +3213,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3321,11 +3265,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3336,7 +3278,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3397,11 +3339,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -3412,7 +3352,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3484,11 +3424,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3499,7 +3437,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3566,11 +3504,9 @@ type ExportMetadataRequest struct { func (x *ExportMetadataRequest) Reset() { *x = ExportMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadataRequest) String() string { @@ -3581,7 +3517,7 @@ func (*ExportMetadataRequest) ProtoMessage() {} func (x *ExportMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3679,11 +3615,9 @@ type RestoreServiceRequest struct { func (x *RestoreServiceRequest) Reset() { *x = RestoreServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreServiceRequest) String() string { @@ -3694,7 +3628,7 @@ func (*RestoreServiceRequest) ProtoMessage() {} func (x *RestoreServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3765,11 +3699,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3780,7 +3712,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3858,11 +3790,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -3873,7 +3803,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3904,11 +3834,9 @@ type DatabaseDumpSpec struct { func (x *DatabaseDumpSpec) Reset() { *x = DatabaseDumpSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseDumpSpec) String() string { @@ -3919,7 +3847,7 @@ func (*DatabaseDumpSpec) ProtoMessage() {} func (x *DatabaseDumpSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3953,11 +3881,9 @@ type QueryMetadataRequest struct { func (x *QueryMetadataRequest) Reset() { *x = QueryMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataRequest) String() string { @@ -3968,7 +3894,7 @@ func (*QueryMetadataRequest) ProtoMessage() {} func (x *QueryMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4013,11 +3939,9 @@ type QueryMetadataResponse struct { func (x *QueryMetadataResponse) Reset() { *x = QueryMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataResponse) String() string { @@ -4028,7 +3952,7 @@ func (*QueryMetadataResponse) ProtoMessage() {} func (x *QueryMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4066,11 +3990,9 @@ type ErrorDetails struct { func (x *ErrorDetails) Reset() { *x = ErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetails) String() string { @@ -4081,7 +4003,7 @@ func (*ErrorDetails) ProtoMessage() {} func (x *ErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4125,11 +4047,9 @@ type MoveTableToDatabaseRequest struct { func (x *MoveTableToDatabaseRequest) Reset() { *x = MoveTableToDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseRequest) String() string { @@ -4140,7 +4060,7 @@ func (*MoveTableToDatabaseRequest) ProtoMessage() {} func (x *MoveTableToDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4193,11 +4113,9 @@ type MoveTableToDatabaseResponse struct { func (x *MoveTableToDatabaseResponse) Reset() { *x = MoveTableToDatabaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseResponse) String() string { @@ -4208,7 +4126,7 @@ func (*MoveTableToDatabaseResponse) ProtoMessage() {} func (x *MoveTableToDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4249,11 +4167,9 @@ type AlterMetadataResourceLocationRequest struct { func (x *AlterMetadataResourceLocationRequest) Reset() { *x = AlterMetadataResourceLocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationRequest) String() string { @@ -4264,7 +4180,7 @@ func (*AlterMetadataResourceLocationRequest) ProtoMessage() {} func (x *AlterMetadataResourceLocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4310,11 +4226,9 @@ type AlterMetadataResourceLocationResponse struct { func (x *AlterMetadataResourceLocationResponse) Reset() { *x = AlterMetadataResourceLocationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationResponse) String() string { @@ -4325,7 +4239,7 @@ func (*AlterMetadataResourceLocationResponse) ProtoMessage() {} func (x *AlterMetadataResourceLocationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4362,11 +4276,9 @@ type NetworkConfig_Consumer struct { func (x *NetworkConfig_Consumer) Reset() { *x = NetworkConfig_Consumer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig_Consumer) String() string { @@ -4377,7 +4289,7 @@ func (*NetworkConfig_Consumer) ProtoMessage() {} func (x *NetworkConfig_Consumer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4463,11 +4375,9 @@ type MetadataImport_DatabaseDump struct { func (x *MetadataImport_DatabaseDump) Reset() { *x = MetadataImport_DatabaseDump{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport_DatabaseDump) String() string { @@ -4478,7 +4388,7 @@ func (*MetadataImport_DatabaseDump) ProtoMessage() {} func (x *MetadataImport_DatabaseDump) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4538,11 +4448,9 @@ type LocationMetadata_HiveMetastoreVersion struct { func (x *LocationMetadata_HiveMetastoreVersion) Reset() { *x = LocationMetadata_HiveMetastoreVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata_HiveMetastoreVersion) String() string { @@ -4553,7 +4461,7 @@ func (*LocationMetadata_HiveMetastoreVersion) ProtoMessage() {} func (x *LocationMetadata_HiveMetastoreVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5855,560 +5763,6 @@ func file_google_cloud_metastore_v1_metastore_proto_init() { if File_google_cloud_metastore_v1_metastore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1_metastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HiveMetastoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*KerberosConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AuxiliaryVersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TelemetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MetadataManagementActivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Restore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ScalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*RestoreServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseDumpSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig_Consumer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport_DatabaseDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata_HiveMetastoreVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_metastore_v1_metastore_proto_msgTypes[0].OneofWrappers = []any{ (*Service_HiveMetastoreConfig)(nil), } diff --git a/metastore/apiv1/metastorepb/metastore_federation.pb.go b/metastore/apiv1/metastorepb/metastore_federation.pb.go index 54b4431986a6..585674027e4f 100755 --- a/metastore/apiv1/metastorepb/metastore_federation.pb.go +++ b/metastore/apiv1/metastorepb/metastore_federation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1/metastore_federation.proto @@ -204,11 +204,9 @@ type Federation struct { func (x *Federation) Reset() { *x = Federation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Federation) String() string { @@ -219,7 +217,7 @@ func (*Federation) ProtoMessage() {} func (x *Federation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +324,9 @@ type BackendMetastore struct { func (x *BackendMetastore) Reset() { *x = BackendMetastore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendMetastore) String() string { @@ -341,7 +337,7 @@ func (*BackendMetastore) ProtoMessage() {} func (x *BackendMetastore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +400,9 @@ type ListFederationsRequest struct { func (x *ListFederationsRequest) Reset() { *x = ListFederationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsRequest) String() string { @@ -419,7 +413,7 @@ func (*ListFederationsRequest) ProtoMessage() {} func (x *ListFederationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +480,9 @@ type ListFederationsResponse struct { func (x *ListFederationsResponse) Reset() { *x = ListFederationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsResponse) String() string { @@ -501,7 +493,7 @@ func (*ListFederationsResponse) ProtoMessage() {} func (x *ListFederationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +544,9 @@ type GetFederationRequest struct { func (x *GetFederationRequest) Reset() { *x = GetFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFederationRequest) String() string { @@ -567,7 +557,7 @@ func (*GetFederationRequest) ProtoMessage() {} func (x *GetFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +618,9 @@ type CreateFederationRequest struct { func (x *CreateFederationRequest) Reset() { *x = CreateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFederationRequest) String() string { @@ -643,7 +631,7 @@ func (*CreateFederationRequest) ProtoMessage() {} func (x *CreateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +708,9 @@ type UpdateFederationRequest struct { func (x *UpdateFederationRequest) Reset() { *x = UpdateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFederationRequest) String() string { @@ -735,7 +721,7 @@ func (*UpdateFederationRequest) ProtoMessage() {} func (x *UpdateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +785,9 @@ type DeleteFederationRequest struct { func (x *DeleteFederationRequest) Reset() { *x = DeleteFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFederationRequest) String() string { @@ -814,7 +798,7 @@ func (*DeleteFederationRequest) ProtoMessage() {} func (x *DeleteFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,104 +1148,6 @@ func file_google_cloud_metastore_v1_metastore_federation_proto_init() { return } file_google_cloud_metastore_v1_metastore_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Federation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BackendMetastore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1_metastore_federation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/metastore/apiv1alpha/dataproc_metastore_client.go b/metastore/apiv1alpha/dataproc_metastore_client.go index 0687470cd114..f70beb5cec21 100755 --- a/metastore/apiv1alpha/dataproc_metastore_client.go +++ b/metastore/apiv1alpha/dataproc_metastore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1alpha/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -765,6 +764,8 @@ type dataprocMetastoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreClient creates a new dataproc metastore client based on gRPC. @@ -810,6 +811,7 @@ func NewDataprocMetastoreClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, dataprocMetastoreClient: metastorepb.NewDataprocMetastoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -875,6 +877,8 @@ type dataprocMetastoreRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreClient CallOptions **DataprocMetastoreCallOptions + + logger *slog.Logger } // NewDataprocMetastoreRESTClient creates a new dataproc metastore rest client. @@ -911,6 +915,7 @@ func NewDataprocMetastoreRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -984,7 +989,7 @@ func (c *dataprocMetastoreGRPCClient) ListServices(ctx context.Context, req *met } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -1019,7 +1024,7 @@ func (c *dataprocMetastoreGRPCClient) GetService(ctx context.Context, req *metas var resp *metastorepb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1037,7 +1042,7 @@ func (c *dataprocMetastoreGRPCClient) CreateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1077,7 +1082,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *dataprocMetastoreGRPCClient) ListMetadataImports(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListMetadataImports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListMetadataImports, req, settings.GRPC, c.logger, "ListMetadataImports") return err }, opts...) if err != nil { @@ -1143,7 +1148,7 @@ func (c *dataprocMetastoreGRPCClient) GetMetadataImport(ctx context.Context, req var resp *metastorepb.MetadataImport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetMetadataImport, req, settings.GRPC, c.logger, "GetMetadataImport") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *dataprocMetastoreGRPCClient) CreateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateMetadataImport, req, settings.GRPC, c.logger, "CreateMetadataImport") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateMetadataImport, req, settings.GRPC, c.logger, "UpdateMetadataImport") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *dataprocMetastoreGRPCClient) ExportMetadata(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ExportMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ExportMetadata, req, settings.GRPC, c.logger, "ExportMetadata") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *dataprocMetastoreGRPCClient) RestoreService(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.RestoreService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.RestoreService, req, settings.GRPC, c.logger, "RestoreService") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *dataprocMetastoreGRPCClient) ListBackups(ctx context.Context, req *meta } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *dataprocMetastoreGRPCClient) GetBackup(ctx context.Context, req *metast var resp *metastorepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1305,7 +1310,7 @@ func (c *dataprocMetastoreGRPCClient) CreateBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1345,7 +1350,7 @@ func (c *dataprocMetastoreGRPCClient) RemoveIamPolicy(ctx context.Context, req * var resp *metastorepb.RemoveIamPolicyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.RemoveIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.RemoveIamPolicy, req, settings.GRPC, c.logger, "RemoveIamPolicy") return err }, opts...) if err != nil { @@ -1363,7 +1368,7 @@ func (c *dataprocMetastoreGRPCClient) QueryMetadata(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.QueryMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.QueryMetadata, req, settings.GRPC, c.logger, "QueryMetadata") return err }, opts...) if err != nil { @@ -1383,7 +1388,7 @@ func (c *dataprocMetastoreGRPCClient) MoveTableToDatabase(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.MoveTableToDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.MoveTableToDatabase, req, settings.GRPC, c.logger, "MoveTableToDatabase") return err }, opts...) if err != nil { @@ -1403,7 +1408,7 @@ func (c *dataprocMetastoreGRPCClient) AlterMetadataResourceLocation(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.AlterMetadataResourceLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.AlterMetadataResourceLocation, req, settings.GRPC, c.logger, "AlterMetadataResourceLocation") return err }, opts...) if err != nil { @@ -1423,7 +1428,7 @@ func (c *dataprocMetastoreGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1452,7 +1457,7 @@ func (c *dataprocMetastoreGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1487,7 +1492,7 @@ func (c *dataprocMetastoreGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1505,7 +1510,7 @@ func (c *dataprocMetastoreGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1523,7 +1528,7 @@ func (c *dataprocMetastoreGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *dataprocMetastoreGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1554,7 +1559,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1569,7 +1574,7 @@ func (c *dataprocMetastoreGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1598,7 +1603,7 @@ func (c *dataprocMetastoreGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1675,21 +1680,10 @@ func (c *dataprocMetastoreRESTClient) ListServices(ctx context.Context, req *met } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1752,17 +1746,7 @@ func (c *dataprocMetastoreRESTClient) GetService(ctx context.Context, req *metas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1822,21 +1806,10 @@ func (c *dataprocMetastoreRESTClient) CreateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1903,21 +1876,10 @@ func (c *dataprocMetastoreRESTClient) UpdateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1970,21 +1932,10 @@ func (c *dataprocMetastoreRESTClient) DeleteService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2053,21 +2004,10 @@ func (c *dataprocMetastoreRESTClient) ListMetadataImports(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMetadataImports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2130,17 +2070,7 @@ func (c *dataprocMetastoreRESTClient) GetMetadataImport(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMetadataImport") if err != nil { return err } @@ -2200,21 +2130,10 @@ func (c *dataprocMetastoreRESTClient) CreateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMetadataImport") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2282,21 +2201,10 @@ func (c *dataprocMetastoreRESTClient) UpdateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMetadataImport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2352,21 +2260,10 @@ func (c *dataprocMetastoreRESTClient) ExportMetadata(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportMetadata") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2422,21 +2319,10 @@ func (c *dataprocMetastoreRESTClient) RestoreService(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2505,21 +2391,10 @@ func (c *dataprocMetastoreRESTClient) ListBackups(ctx context.Context, req *meta } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2582,17 +2457,7 @@ func (c *dataprocMetastoreRESTClient) GetBackup(ctx context.Context, req *metast httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2652,21 +2517,10 @@ func (c *dataprocMetastoreRESTClient) CreateBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2719,21 +2573,10 @@ func (c *dataprocMetastoreRESTClient) DeleteBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2790,17 +2633,7 @@ func (c *dataprocMetastoreRESTClient) RemoveIamPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveIamPolicy") if err != nil { return err } @@ -2855,21 +2688,10 @@ func (c *dataprocMetastoreRESTClient) QueryMetadata(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryMetadata") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2925,21 +2747,10 @@ func (c *dataprocMetastoreRESTClient) MoveTableToDatabase(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveTableToDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2998,21 +2809,10 @@ func (c *dataprocMetastoreRESTClient) AlterMetadataResourceLocation(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AlterMetadataResourceLocation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3063,17 +2863,7 @@ func (c *dataprocMetastoreRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3138,21 +2928,10 @@ func (c *dataprocMetastoreRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3219,17 +2998,7 @@ func (c *dataprocMetastoreRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3289,17 +3058,7 @@ func (c *dataprocMetastoreRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3361,17 +3120,7 @@ func (c *dataprocMetastoreRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3424,15 +3173,8 @@ func (c *dataprocMetastoreRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3466,15 +3208,8 @@ func (c *dataprocMetastoreRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3511,17 +3246,7 @@ func (c *dataprocMetastoreRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3586,21 +3311,10 @@ func (c *dataprocMetastoreRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1alpha/dataproc_metastore_client_example_go123_test.go b/metastore/apiv1alpha/dataproc_metastore_client_example_go123_test.go index f6cd653a6ae4..76a6d4f0cfc6 100644 --- a/metastore/apiv1alpha/dataproc_metastore_client_example_go123_test.go +++ b/metastore/apiv1alpha/dataproc_metastore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreClient_ListMetadataImports_all() { } for resp, err := range c.ListMetadataImports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataprocMetastoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDataprocMetastoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1alpha/dataproc_metastore_federation_client.go b/metastore/apiv1alpha/dataproc_metastore_federation_client.go index 151dd6e62cb8..ba6600900c85 100755 --- a/metastore/apiv1alpha/dataproc_metastore_federation_client.go +++ b/metastore/apiv1alpha/dataproc_metastore_federation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1alpha/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -321,6 +320,8 @@ type dataprocMetastoreFederationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreFederationClient creates a new dataproc metastore federation client based on gRPC. @@ -363,6 +364,7 @@ func NewDataprocMetastoreFederationClient(ctx context.Context, opts ...option.Cl connPool: connPool, dataprocMetastoreFederationClient: metastorepb.NewDataprocMetastoreFederationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -428,6 +430,8 @@ type dataprocMetastoreFederationRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreFederationClient CallOptions **DataprocMetastoreFederationCallOptions + + logger *slog.Logger } // NewDataprocMetastoreFederationRESTClient creates a new dataproc metastore federation rest client. @@ -461,6 +465,7 @@ func NewDataprocMetastoreFederationRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -534,7 +539,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListFederations(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.ListFederations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.ListFederations, req, settings.GRPC, c.logger, "ListFederations") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetFederation(ctx context.Contex var resp *metastorepb.Federation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.GetFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.GetFederation, req, settings.GRPC, c.logger, "GetFederation") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CreateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.CreateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.CreateFederation, req, settings.GRPC, c.logger, "CreateFederation") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *dataprocMetastoreFederationGRPCClient) UpdateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.UpdateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.UpdateFederation, req, settings.GRPC, c.logger, "UpdateFederation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.DeleteFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.DeleteFederation, req, settings.GRPC, c.logger, "DeleteFederation") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetLocation(ctx context.Context, var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListLocations(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *dataprocMetastoreFederationGRPCClient) SetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *dataprocMetastoreFederationGRPCClient) TestIamPermissions(ctx context.C var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -764,7 +769,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CancelOperation(ctx context.Cont opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -778,7 +783,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteOperation(ctx context.Cont opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -793,7 +798,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetOperation(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListOperations(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -899,21 +904,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListFederations(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFederations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -976,17 +970,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetFederation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFederation") if err != nil { return err } @@ -1046,21 +1030,10 @@ func (c *dataprocMetastoreFederationRESTClient) CreateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1127,21 +1100,10 @@ func (c *dataprocMetastoreFederationRESTClient) UpdateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1194,21 +1156,10 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1259,17 +1210,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetLocation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1334,21 +1275,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListLocations(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,17 +1345,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1485,17 +1405,7 @@ func (c *dataprocMetastoreFederationRESTClient) SetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1557,17 +1467,7 @@ func (c *dataprocMetastoreFederationRESTClient) TestIamPermissions(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1620,15 +1520,8 @@ func (c *dataprocMetastoreFederationRESTClient) CancelOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1662,15 +1555,8 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1707,17 +1593,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1782,21 +1658,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListOperations(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1alpha/dataproc_metastore_federation_client_example_go123_test.go b/metastore/apiv1alpha/dataproc_metastore_federation_client_example_go123_test.go index 42602ffc032c..8b60254d130a 100644 --- a/metastore/apiv1alpha/dataproc_metastore_federation_client_example_go123_test.go +++ b/metastore/apiv1alpha/dataproc_metastore_federation_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreFederationClient_ListFederations_all() { } for resp, err := range c.ListFederations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreFederationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreFederationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1alpha/helpers.go b/metastore/apiv1alpha/helpers.go index 0ce8e8260626..76e24fee5486 100755 --- a/metastore/apiv1alpha/helpers.go +++ b/metastore/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package metastore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "metastore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/metastore/apiv1alpha/metastorepb/metastore.pb.go b/metastore/apiv1alpha/metastorepb/metastore.pb.go index b4a2825aad4a..ff3da3817d63 100755 --- a/metastore/apiv1alpha/metastorepb/metastore.pb.go +++ b/metastore/apiv1alpha/metastorepb/metastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1alpha/metastore.proto @@ -938,11 +938,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -953,7 +951,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1153,9 @@ type MetadataIntegration struct { func (x *MetadataIntegration) Reset() { *x = MetadataIntegration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataIntegration) String() string { @@ -1170,7 +1166,7 @@ func (*MetadataIntegration) ProtoMessage() {} func (x *MetadataIntegration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1209,9 @@ type DataCatalogConfig struct { func (x *DataCatalogConfig) Reset() { *x = DataCatalogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataCatalogConfig) String() string { @@ -1228,7 +1222,7 @@ func (*DataCatalogConfig) ProtoMessage() {} func (x *DataCatalogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1265,11 +1259,9 @@ type DataplexConfig struct { func (x *DataplexConfig) Reset() { *x = DataplexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexConfig) String() string { @@ -1280,7 +1272,7 @@ func (*DataplexConfig) ProtoMessage() {} func (x *DataplexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1308,9 @@ type Lake struct { func (x *Lake) Reset() { *x = Lake{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lake) String() string { @@ -1331,7 +1321,7 @@ func (*Lake) ProtoMessage() {} func (x *Lake) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,11 +1358,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -1383,7 +1371,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1449,11 +1437,9 @@ type HiveMetastoreConfig struct { func (x *HiveMetastoreConfig) Reset() { *x = HiveMetastoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveMetastoreConfig) String() string { @@ -1464,7 +1450,7 @@ func (*HiveMetastoreConfig) ProtoMessage() {} func (x *HiveMetastoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1535,11 +1521,9 @@ type KerberosConfig struct { func (x *KerberosConfig) Reset() { *x = KerberosConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KerberosConfig) String() string { @@ -1550,7 +1534,7 @@ func (*KerberosConfig) ProtoMessage() {} func (x *KerberosConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1600,11 +1584,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -1615,7 +1597,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1655,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1688,7 +1668,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,11 +1712,9 @@ type AuxiliaryVersionConfig struct { func (x *AuxiliaryVersionConfig) Reset() { *x = AuxiliaryVersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuxiliaryVersionConfig) String() string { @@ -1747,7 +1725,7 @@ func (*AuxiliaryVersionConfig) ProtoMessage() {} func (x *AuxiliaryVersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1801,11 +1779,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -1816,7 +1792,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1857,11 +1833,9 @@ type TelemetryConfig struct { func (x *TelemetryConfig) Reset() { *x = TelemetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TelemetryConfig) String() string { @@ -1872,7 +1846,7 @@ func (*TelemetryConfig) ProtoMessage() {} func (x *TelemetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1882,9 @@ type MetadataManagementActivity struct { func (x *MetadataManagementActivity) Reset() { *x = MetadataManagementActivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataManagementActivity) String() string { @@ -1923,7 +1895,7 @@ func (*MetadataManagementActivity) ProtoMessage() {} func (x *MetadataManagementActivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1954,9 @@ type MetadataImport struct { func (x *MetadataImport) Reset() { *x = MetadataImport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport) String() string { @@ -1997,7 +1967,7 @@ func (*MetadataImport) ProtoMessage() {} func (x *MetadataImport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2071,9 @@ type MetadataExport struct { func (x *MetadataExport) Reset() { *x = MetadataExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExport) String() string { @@ -2116,7 +2084,7 @@ func (*MetadataExport) ProtoMessage() {} func (x *MetadataExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2213,11 +2181,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -2228,7 +2194,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2318,11 +2284,9 @@ type Restore struct { func (x *Restore) Reset() { *x = Restore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restore) String() string { @@ -2333,7 +2297,7 @@ func (*Restore) ProtoMessage() {} func (x *Restore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2372,9 @@ type ScalingConfig struct { func (x *ScalingConfig) Reset() { *x = ScalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScalingConfig) String() string { @@ -2423,7 +2385,7 @@ func (*ScalingConfig) ProtoMessage() {} func (x *ScalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,11 +2478,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -2531,7 +2491,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2599,11 +2559,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -2614,7 +2572,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2666,11 +2624,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -2681,7 +2637,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2743,11 +2699,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -2758,7 +2712,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2836,11 +2790,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -2851,7 +2803,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2916,11 +2868,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -2931,7 +2881,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2946,9 @@ type ListMetadataImportsRequest struct { func (x *ListMetadataImportsRequest) Reset() { *x = ListMetadataImportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsRequest) String() string { @@ -3011,7 +2959,7 @@ func (*ListMetadataImportsRequest) ProtoMessage() {} func (x *ListMetadataImportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3079,11 +3027,9 @@ type ListMetadataImportsResponse struct { func (x *ListMetadataImportsResponse) Reset() { *x = ListMetadataImportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsResponse) String() string { @@ -3094,7 +3040,7 @@ func (*ListMetadataImportsResponse) ProtoMessage() {} func (x *ListMetadataImportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3146,11 +3092,9 @@ type GetMetadataImportRequest struct { func (x *GetMetadataImportRequest) Reset() { *x = GetMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataImportRequest) String() string { @@ -3161,7 +3105,7 @@ func (*GetMetadataImportRequest) ProtoMessage() {} func (x *GetMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3223,11 +3167,9 @@ type CreateMetadataImportRequest struct { func (x *CreateMetadataImportRequest) Reset() { *x = CreateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataImportRequest) String() string { @@ -3238,7 +3180,7 @@ func (*CreateMetadataImportRequest) ProtoMessage() {} func (x *CreateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3316,11 +3258,9 @@ type UpdateMetadataImportRequest struct { func (x *UpdateMetadataImportRequest) Reset() { *x = UpdateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMetadataImportRequest) String() string { @@ -3331,7 +3271,7 @@ func (*UpdateMetadataImportRequest) ProtoMessage() {} func (x *UpdateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3403,11 +3343,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3418,7 +3356,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3486,11 +3424,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3501,7 +3437,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3553,11 +3489,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3568,7 +3502,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3629,11 +3563,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -3644,7 +3576,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3716,11 +3648,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3731,7 +3661,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3798,11 +3728,9 @@ type ExportMetadataRequest struct { func (x *ExportMetadataRequest) Reset() { *x = ExportMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadataRequest) String() string { @@ -3813,7 +3741,7 @@ func (*ExportMetadataRequest) ProtoMessage() {} func (x *ExportMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3911,11 +3839,9 @@ type RestoreServiceRequest struct { func (x *RestoreServiceRequest) Reset() { *x = RestoreServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreServiceRequest) String() string { @@ -3926,7 +3852,7 @@ func (*RestoreServiceRequest) ProtoMessage() {} func (x *RestoreServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3997,11 +3923,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -4012,7 +3936,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4090,11 +4014,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4105,7 +4027,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4136,11 +4058,9 @@ type DatabaseDumpSpec struct { func (x *DatabaseDumpSpec) Reset() { *x = DatabaseDumpSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseDumpSpec) String() string { @@ -4151,7 +4071,7 @@ func (*DatabaseDumpSpec) ProtoMessage() {} func (x *DatabaseDumpSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4187,11 +4107,9 @@ type RemoveIamPolicyRequest struct { func (x *RemoveIamPolicyRequest) Reset() { *x = RemoveIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIamPolicyRequest) String() string { @@ -4202,7 +4120,7 @@ func (*RemoveIamPolicyRequest) ProtoMessage() {} func (x *RemoveIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4244,11 +4162,9 @@ type RemoveIamPolicyResponse struct { func (x *RemoveIamPolicyResponse) Reset() { *x = RemoveIamPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIamPolicyResponse) String() string { @@ -4259,7 +4175,7 @@ func (*RemoveIamPolicyResponse) ProtoMessage() {} func (x *RemoveIamPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4300,11 +4216,9 @@ type QueryMetadataRequest struct { func (x *QueryMetadataRequest) Reset() { *x = QueryMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataRequest) String() string { @@ -4315,7 +4229,7 @@ func (*QueryMetadataRequest) ProtoMessage() {} func (x *QueryMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4360,11 +4274,9 @@ type QueryMetadataResponse struct { func (x *QueryMetadataResponse) Reset() { *x = QueryMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataResponse) String() string { @@ -4375,7 +4287,7 @@ func (*QueryMetadataResponse) ProtoMessage() {} func (x *QueryMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4413,11 +4325,9 @@ type ErrorDetails struct { func (x *ErrorDetails) Reset() { *x = ErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetails) String() string { @@ -4428,7 +4338,7 @@ func (*ErrorDetails) ProtoMessage() {} func (x *ErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4472,11 +4382,9 @@ type MoveTableToDatabaseRequest struct { func (x *MoveTableToDatabaseRequest) Reset() { *x = MoveTableToDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseRequest) String() string { @@ -4487,7 +4395,7 @@ func (*MoveTableToDatabaseRequest) ProtoMessage() {} func (x *MoveTableToDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4540,11 +4448,9 @@ type MoveTableToDatabaseResponse struct { func (x *MoveTableToDatabaseResponse) Reset() { *x = MoveTableToDatabaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseResponse) String() string { @@ -4555,7 +4461,7 @@ func (*MoveTableToDatabaseResponse) ProtoMessage() {} func (x *MoveTableToDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,11 +4502,9 @@ type AlterMetadataResourceLocationRequest struct { func (x *AlterMetadataResourceLocationRequest) Reset() { *x = AlterMetadataResourceLocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationRequest) String() string { @@ -4611,7 +4515,7 @@ func (*AlterMetadataResourceLocationRequest) ProtoMessage() {} func (x *AlterMetadataResourceLocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4657,11 +4561,9 @@ type AlterMetadataResourceLocationResponse struct { func (x *AlterMetadataResourceLocationResponse) Reset() { *x = AlterMetadataResourceLocationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationResponse) String() string { @@ -4672,7 +4574,7 @@ func (*AlterMetadataResourceLocationResponse) ProtoMessage() {} func (x *AlterMetadataResourceLocationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4709,11 +4611,9 @@ type NetworkConfig_Consumer struct { func (x *NetworkConfig_Consumer) Reset() { *x = NetworkConfig_Consumer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig_Consumer) String() string { @@ -4724,7 +4624,7 @@ func (*NetworkConfig_Consumer) ProtoMessage() {} func (x *NetworkConfig_Consumer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4810,11 +4710,9 @@ type MetadataImport_DatabaseDump struct { func (x *MetadataImport_DatabaseDump) Reset() { *x = MetadataImport_DatabaseDump{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport_DatabaseDump) String() string { @@ -4825,7 +4723,7 @@ func (*MetadataImport_DatabaseDump) ProtoMessage() {} func (x *MetadataImport_DatabaseDump) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4885,11 +4783,9 @@ type LocationMetadata_HiveMetastoreVersion struct { func (x *LocationMetadata_HiveMetastoreVersion) Reset() { *x = LocationMetadata_HiveMetastoreVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata_HiveMetastoreVersion) String() string { @@ -4900,7 +4796,7 @@ func (*LocationMetadata_HiveMetastoreVersion) ProtoMessage() {} func (x *LocationMetadata_HiveMetastoreVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6317,632 +6213,6 @@ func file_google_cloud_metastore_v1alpha_metastore_proto_init() { if File_google_cloud_metastore_v1alpha_metastore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataIntegration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataCatalogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataplexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Lake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*HiveMetastoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*KerberosConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AuxiliaryVersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TelemetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MetadataManagementActivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Restore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ScalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*RestoreServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseDumpSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIamPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig_Consumer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport_DatabaseDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata_HiveMetastoreVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_metastore_v1alpha_metastore_proto_msgTypes[0].OneofWrappers = []any{ (*Service_HiveMetastoreConfig)(nil), } diff --git a/metastore/apiv1alpha/metastorepb/metastore_federation.pb.go b/metastore/apiv1alpha/metastorepb/metastore_federation.pb.go index c7657f36d5be..2aa7b087b867 100755 --- a/metastore/apiv1alpha/metastorepb/metastore_federation.pb.go +++ b/metastore/apiv1alpha/metastorepb/metastore_federation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1alpha/metastore_federation.proto @@ -208,11 +208,9 @@ type Federation struct { func (x *Federation) Reset() { *x = Federation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Federation) String() string { @@ -223,7 +221,7 @@ func (*Federation) ProtoMessage() {} func (x *Federation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +328,9 @@ type BackendMetastore struct { func (x *BackendMetastore) Reset() { *x = BackendMetastore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendMetastore) String() string { @@ -345,7 +341,7 @@ func (*BackendMetastore) ProtoMessage() {} func (x *BackendMetastore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +404,9 @@ type ListFederationsRequest struct { func (x *ListFederationsRequest) Reset() { *x = ListFederationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsRequest) String() string { @@ -423,7 +417,7 @@ func (*ListFederationsRequest) ProtoMessage() {} func (x *ListFederationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +484,9 @@ type ListFederationsResponse struct { func (x *ListFederationsResponse) Reset() { *x = ListFederationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsResponse) String() string { @@ -505,7 +497,7 @@ func (*ListFederationsResponse) ProtoMessage() {} func (x *ListFederationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +548,9 @@ type GetFederationRequest struct { func (x *GetFederationRequest) Reset() { *x = GetFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFederationRequest) String() string { @@ -571,7 +561,7 @@ func (*GetFederationRequest) ProtoMessage() {} func (x *GetFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +622,9 @@ type CreateFederationRequest struct { func (x *CreateFederationRequest) Reset() { *x = CreateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFederationRequest) String() string { @@ -647,7 +635,7 @@ func (*CreateFederationRequest) ProtoMessage() {} func (x *CreateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +712,9 @@ type UpdateFederationRequest struct { func (x *UpdateFederationRequest) Reset() { *x = UpdateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFederationRequest) String() string { @@ -739,7 +725,7 @@ func (*UpdateFederationRequest) ProtoMessage() {} func (x *UpdateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +789,9 @@ type DeleteFederationRequest struct { func (x *DeleteFederationRequest) Reset() { *x = DeleteFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFederationRequest) String() string { @@ -818,7 +802,7 @@ func (*DeleteFederationRequest) ProtoMessage() {} func (x *DeleteFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1178,104 +1162,6 @@ func file_google_cloud_metastore_v1alpha_metastore_federation_proto_init() { return } file_google_cloud_metastore_v1alpha_metastore_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Federation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BackendMetastore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1alpha_metastore_federation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/metastore/apiv1beta/dataproc_metastore_client.go b/metastore/apiv1beta/dataproc_metastore_client.go index 1bca15d5be94..8eeeb4256153 100755 --- a/metastore/apiv1beta/dataproc_metastore_client.go +++ b/metastore/apiv1beta/dataproc_metastore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1beta/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -765,6 +764,8 @@ type dataprocMetastoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreClient creates a new dataproc metastore client based on gRPC. @@ -810,6 +811,7 @@ func NewDataprocMetastoreClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, dataprocMetastoreClient: metastorepb.NewDataprocMetastoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -875,6 +877,8 @@ type dataprocMetastoreRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreClient CallOptions **DataprocMetastoreCallOptions + + logger *slog.Logger } // NewDataprocMetastoreRESTClient creates a new dataproc metastore rest client. @@ -911,6 +915,7 @@ func NewDataprocMetastoreRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -984,7 +989,7 @@ func (c *dataprocMetastoreGRPCClient) ListServices(ctx context.Context, req *met } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -1019,7 +1024,7 @@ func (c *dataprocMetastoreGRPCClient) GetService(ctx context.Context, req *metas var resp *metastorepb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1037,7 +1042,7 @@ func (c *dataprocMetastoreGRPCClient) CreateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1057,7 +1062,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1077,7 +1082,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteService(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *dataprocMetastoreGRPCClient) ListMetadataImports(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListMetadataImports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListMetadataImports, req, settings.GRPC, c.logger, "ListMetadataImports") return err }, opts...) if err != nil { @@ -1143,7 +1148,7 @@ func (c *dataprocMetastoreGRPCClient) GetMetadataImport(ctx context.Context, req var resp *metastorepb.MetadataImport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetMetadataImport, req, settings.GRPC, c.logger, "GetMetadataImport") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *dataprocMetastoreGRPCClient) CreateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateMetadataImport, req, settings.GRPC, c.logger, "CreateMetadataImport") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *dataprocMetastoreGRPCClient) UpdateMetadataImport(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.UpdateMetadataImport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.UpdateMetadataImport, req, settings.GRPC, c.logger, "UpdateMetadataImport") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *dataprocMetastoreGRPCClient) ExportMetadata(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ExportMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ExportMetadata, req, settings.GRPC, c.logger, "ExportMetadata") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *dataprocMetastoreGRPCClient) RestoreService(ctx context.Context, req *m var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.RestoreService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.RestoreService, req, settings.GRPC, c.logger, "RestoreService") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *dataprocMetastoreGRPCClient) ListBackups(ctx context.Context, req *meta } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *dataprocMetastoreGRPCClient) GetBackup(ctx context.Context, req *metast var resp *metastorepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1305,7 +1310,7 @@ func (c *dataprocMetastoreGRPCClient) CreateBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteBackup(ctx context.Context, req *met var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -1345,7 +1350,7 @@ func (c *dataprocMetastoreGRPCClient) RemoveIamPolicy(ctx context.Context, req * var resp *metastorepb.RemoveIamPolicyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.RemoveIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.RemoveIamPolicy, req, settings.GRPC, c.logger, "RemoveIamPolicy") return err }, opts...) if err != nil { @@ -1363,7 +1368,7 @@ func (c *dataprocMetastoreGRPCClient) QueryMetadata(ctx context.Context, req *me var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.QueryMetadata(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.QueryMetadata, req, settings.GRPC, c.logger, "QueryMetadata") return err }, opts...) if err != nil { @@ -1383,7 +1388,7 @@ func (c *dataprocMetastoreGRPCClient) MoveTableToDatabase(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.MoveTableToDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.MoveTableToDatabase, req, settings.GRPC, c.logger, "MoveTableToDatabase") return err }, opts...) if err != nil { @@ -1403,7 +1408,7 @@ func (c *dataprocMetastoreGRPCClient) AlterMetadataResourceLocation(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreClient.AlterMetadataResourceLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreClient.AlterMetadataResourceLocation, req, settings.GRPC, c.logger, "AlterMetadataResourceLocation") return err }, opts...) if err != nil { @@ -1423,7 +1428,7 @@ func (c *dataprocMetastoreGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1452,7 +1457,7 @@ func (c *dataprocMetastoreGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1487,7 +1492,7 @@ func (c *dataprocMetastoreGRPCClient) GetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1505,7 +1510,7 @@ func (c *dataprocMetastoreGRPCClient) SetIamPolicy(ctx context.Context, req *iam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1523,7 +1528,7 @@ func (c *dataprocMetastoreGRPCClient) TestIamPermissions(ctx context.Context, re var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1540,7 +1545,7 @@ func (c *dataprocMetastoreGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1554,7 +1559,7 @@ func (c *dataprocMetastoreGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1569,7 +1574,7 @@ func (c *dataprocMetastoreGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1598,7 +1603,7 @@ func (c *dataprocMetastoreGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1675,21 +1680,10 @@ func (c *dataprocMetastoreRESTClient) ListServices(ctx context.Context, req *met } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1752,17 +1746,7 @@ func (c *dataprocMetastoreRESTClient) GetService(ctx context.Context, req *metas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1822,21 +1806,10 @@ func (c *dataprocMetastoreRESTClient) CreateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1903,21 +1876,10 @@ func (c *dataprocMetastoreRESTClient) UpdateService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1970,21 +1932,10 @@ func (c *dataprocMetastoreRESTClient) DeleteService(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2053,21 +2004,10 @@ func (c *dataprocMetastoreRESTClient) ListMetadataImports(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMetadataImports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2130,17 +2070,7 @@ func (c *dataprocMetastoreRESTClient) GetMetadataImport(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMetadataImport") if err != nil { return err } @@ -2200,21 +2130,10 @@ func (c *dataprocMetastoreRESTClient) CreateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMetadataImport") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2282,21 +2201,10 @@ func (c *dataprocMetastoreRESTClient) UpdateMetadataImport(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMetadataImport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2352,21 +2260,10 @@ func (c *dataprocMetastoreRESTClient) ExportMetadata(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportMetadata") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2422,21 +2319,10 @@ func (c *dataprocMetastoreRESTClient) RestoreService(ctx context.Context, req *m httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2505,21 +2391,10 @@ func (c *dataprocMetastoreRESTClient) ListBackups(ctx context.Context, req *meta } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2582,17 +2457,7 @@ func (c *dataprocMetastoreRESTClient) GetBackup(ctx context.Context, req *metast httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2652,21 +2517,10 @@ func (c *dataprocMetastoreRESTClient) CreateBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2719,21 +2573,10 @@ func (c *dataprocMetastoreRESTClient) DeleteBackup(ctx context.Context, req *met httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2790,17 +2633,7 @@ func (c *dataprocMetastoreRESTClient) RemoveIamPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveIamPolicy") if err != nil { return err } @@ -2855,21 +2688,10 @@ func (c *dataprocMetastoreRESTClient) QueryMetadata(ctx context.Context, req *me httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryMetadata") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2925,21 +2747,10 @@ func (c *dataprocMetastoreRESTClient) MoveTableToDatabase(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveTableToDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2998,21 +2809,10 @@ func (c *dataprocMetastoreRESTClient) AlterMetadataResourceLocation(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AlterMetadataResourceLocation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3063,17 +2863,7 @@ func (c *dataprocMetastoreRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3138,21 +2928,10 @@ func (c *dataprocMetastoreRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3219,17 +2998,7 @@ func (c *dataprocMetastoreRESTClient) GetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3289,17 +3058,7 @@ func (c *dataprocMetastoreRESTClient) SetIamPolicy(ctx context.Context, req *iam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3361,17 +3120,7 @@ func (c *dataprocMetastoreRESTClient) TestIamPermissions(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3424,15 +3173,8 @@ func (c *dataprocMetastoreRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3466,15 +3208,8 @@ func (c *dataprocMetastoreRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3511,17 +3246,7 @@ func (c *dataprocMetastoreRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3586,21 +3311,10 @@ func (c *dataprocMetastoreRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1beta/dataproc_metastore_client_example_go123_test.go b/metastore/apiv1beta/dataproc_metastore_client_example_go123_test.go index e2358a344a1f..d59d2c52d377 100644 --- a/metastore/apiv1beta/dataproc_metastore_client_example_go123_test.go +++ b/metastore/apiv1beta/dataproc_metastore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreClient_ListMetadataImports_all() { } for resp, err := range c.ListMetadataImports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDataprocMetastoreClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleDataprocMetastoreClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1beta/dataproc_metastore_federation_client.go b/metastore/apiv1beta/dataproc_metastore_federation_client.go index 6d8deb89dfbc..c736b6f4f9b1 100755 --- a/metastore/apiv1beta/dataproc_metastore_federation_client.go +++ b/metastore/apiv1beta/dataproc_metastore_federation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" metastorepb "cloud.google.com/go/metastore/apiv1beta/metastorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -321,6 +320,8 @@ type dataprocMetastoreFederationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDataprocMetastoreFederationClient creates a new dataproc metastore federation client based on gRPC. @@ -363,6 +364,7 @@ func NewDataprocMetastoreFederationClient(ctx context.Context, opts ...option.Cl connPool: connPool, dataprocMetastoreFederationClient: metastorepb.NewDataprocMetastoreFederationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -428,6 +430,8 @@ type dataprocMetastoreFederationRESTClient struct { // Points back to the CallOptions field of the containing DataprocMetastoreFederationClient CallOptions **DataprocMetastoreFederationCallOptions + + logger *slog.Logger } // NewDataprocMetastoreFederationRESTClient creates a new dataproc metastore federation rest client. @@ -461,6 +465,7 @@ func NewDataprocMetastoreFederationRESTClient(ctx context.Context, opts ...optio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -534,7 +539,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListFederations(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.ListFederations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.ListFederations, req, settings.GRPC, c.logger, "ListFederations") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetFederation(ctx context.Contex var resp *metastorepb.Federation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.GetFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.GetFederation, req, settings.GRPC, c.logger, "GetFederation") return err }, opts...) if err != nil { @@ -587,7 +592,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CreateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.CreateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.CreateFederation, req, settings.GRPC, c.logger, "CreateFederation") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *dataprocMetastoreFederationGRPCClient) UpdateFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.UpdateFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.UpdateFederation, req, settings.GRPC, c.logger, "UpdateFederation") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteFederation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dataprocMetastoreFederationClient.DeleteFederation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dataprocMetastoreFederationClient.DeleteFederation, req, settings.GRPC, c.logger, "DeleteFederation") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetLocation(ctx context.Context, var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListLocations(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *dataprocMetastoreFederationGRPCClient) SetIamPolicy(ctx context.Context var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *dataprocMetastoreFederationGRPCClient) TestIamPermissions(ctx context.C var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -764,7 +769,7 @@ func (c *dataprocMetastoreFederationGRPCClient) CancelOperation(ctx context.Cont opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -778,7 +783,7 @@ func (c *dataprocMetastoreFederationGRPCClient) DeleteOperation(ctx context.Cont opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -793,7 +798,7 @@ func (c *dataprocMetastoreFederationGRPCClient) GetOperation(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *dataprocMetastoreFederationGRPCClient) ListOperations(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -899,21 +904,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListFederations(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFederations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -976,17 +970,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetFederation(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFederation") if err != nil { return err } @@ -1046,21 +1030,10 @@ func (c *dataprocMetastoreFederationRESTClient) CreateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1127,21 +1100,10 @@ func (c *dataprocMetastoreFederationRESTClient) UpdateFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1194,21 +1156,10 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteFederation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFederation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1259,17 +1210,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetLocation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1334,21 +1275,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListLocations(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1415,17 +1345,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1485,17 +1405,7 @@ func (c *dataprocMetastoreFederationRESTClient) SetIamPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1557,17 +1467,7 @@ func (c *dataprocMetastoreFederationRESTClient) TestIamPermissions(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1620,15 +1520,8 @@ func (c *dataprocMetastoreFederationRESTClient) CancelOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1662,15 +1555,8 @@ func (c *dataprocMetastoreFederationRESTClient) DeleteOperation(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1707,17 +1593,7 @@ func (c *dataprocMetastoreFederationRESTClient) GetOperation(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1782,21 +1658,10 @@ func (c *dataprocMetastoreFederationRESTClient) ListOperations(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/metastore/apiv1beta/dataproc_metastore_federation_client_example_go123_test.go b/metastore/apiv1beta/dataproc_metastore_federation_client_example_go123_test.go index b3624b51a0e1..e280566a3349 100644 --- a/metastore/apiv1beta/dataproc_metastore_federation_client_example_go123_test.go +++ b/metastore/apiv1beta/dataproc_metastore_federation_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDataprocMetastoreFederationClient_ListFederations_all() { } for resp, err := range c.ListFederations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDataprocMetastoreFederationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDataprocMetastoreFederationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/metastore/apiv1beta/helpers.go b/metastore/apiv1beta/helpers.go index 0ce8e8260626..76e24fee5486 100755 --- a/metastore/apiv1beta/helpers.go +++ b/metastore/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package metastore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "metastore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/metastore/apiv1beta/metastorepb/metastore.pb.go b/metastore/apiv1beta/metastorepb/metastore.pb.go index c526d69fc6b8..311684958aa6 100755 --- a/metastore/apiv1beta/metastorepb/metastore.pb.go +++ b/metastore/apiv1beta/metastorepb/metastore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1beta/metastore.proto @@ -938,11 +938,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -953,7 +951,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1153,9 @@ type MetadataIntegration struct { func (x *MetadataIntegration) Reset() { *x = MetadataIntegration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataIntegration) String() string { @@ -1170,7 +1166,7 @@ func (*MetadataIntegration) ProtoMessage() {} func (x *MetadataIntegration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1209,9 @@ type DataCatalogConfig struct { func (x *DataCatalogConfig) Reset() { *x = DataCatalogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataCatalogConfig) String() string { @@ -1228,7 +1222,7 @@ func (*DataCatalogConfig) ProtoMessage() {} func (x *DataCatalogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1265,11 +1259,9 @@ type DataplexConfig struct { func (x *DataplexConfig) Reset() { *x = DataplexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataplexConfig) String() string { @@ -1280,7 +1272,7 @@ func (*DataplexConfig) ProtoMessage() {} func (x *DataplexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1308,9 @@ type Lake struct { func (x *Lake) Reset() { *x = Lake{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lake) String() string { @@ -1331,7 +1321,7 @@ func (*Lake) ProtoMessage() {} func (x *Lake) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,11 +1358,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -1383,7 +1371,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1449,11 +1437,9 @@ type HiveMetastoreConfig struct { func (x *HiveMetastoreConfig) Reset() { *x = HiveMetastoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HiveMetastoreConfig) String() string { @@ -1464,7 +1450,7 @@ func (*HiveMetastoreConfig) ProtoMessage() {} func (x *HiveMetastoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1535,11 +1521,9 @@ type KerberosConfig struct { func (x *KerberosConfig) Reset() { *x = KerberosConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KerberosConfig) String() string { @@ -1550,7 +1534,7 @@ func (*KerberosConfig) ProtoMessage() {} func (x *KerberosConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1600,11 +1584,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -1615,7 +1597,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1655,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -1688,7 +1668,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,11 +1712,9 @@ type AuxiliaryVersionConfig struct { func (x *AuxiliaryVersionConfig) Reset() { *x = AuxiliaryVersionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuxiliaryVersionConfig) String() string { @@ -1747,7 +1725,7 @@ func (*AuxiliaryVersionConfig) ProtoMessage() {} func (x *AuxiliaryVersionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1801,11 +1779,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -1816,7 +1792,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1857,11 +1833,9 @@ type TelemetryConfig struct { func (x *TelemetryConfig) Reset() { *x = TelemetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TelemetryConfig) String() string { @@ -1872,7 +1846,7 @@ func (*TelemetryConfig) ProtoMessage() {} func (x *TelemetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1882,9 @@ type MetadataManagementActivity struct { func (x *MetadataManagementActivity) Reset() { *x = MetadataManagementActivity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataManagementActivity) String() string { @@ -1923,7 +1895,7 @@ func (*MetadataManagementActivity) ProtoMessage() {} func (x *MetadataManagementActivity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1982,11 +1954,9 @@ type MetadataImport struct { func (x *MetadataImport) Reset() { *x = MetadataImport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport) String() string { @@ -1997,7 +1967,7 @@ func (*MetadataImport) ProtoMessage() {} func (x *MetadataImport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2071,9 @@ type MetadataExport struct { func (x *MetadataExport) Reset() { *x = MetadataExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataExport) String() string { @@ -2116,7 +2084,7 @@ func (*MetadataExport) ProtoMessage() {} func (x *MetadataExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2213,11 +2181,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -2228,7 +2194,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2318,11 +2284,9 @@ type Restore struct { func (x *Restore) Reset() { *x = Restore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Restore) String() string { @@ -2333,7 +2297,7 @@ func (*Restore) ProtoMessage() {} func (x *Restore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2372,9 @@ type ScalingConfig struct { func (x *ScalingConfig) Reset() { *x = ScalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScalingConfig) String() string { @@ -2423,7 +2385,7 @@ func (*ScalingConfig) ProtoMessage() {} func (x *ScalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,11 +2478,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -2531,7 +2491,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2599,11 +2559,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -2614,7 +2572,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2666,11 +2624,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -2681,7 +2637,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2743,11 +2699,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -2758,7 +2712,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2836,11 +2790,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -2851,7 +2803,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2916,11 +2868,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -2931,7 +2881,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2996,11 +2946,9 @@ type ListMetadataImportsRequest struct { func (x *ListMetadataImportsRequest) Reset() { *x = ListMetadataImportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsRequest) String() string { @@ -3011,7 +2959,7 @@ func (*ListMetadataImportsRequest) ProtoMessage() {} func (x *ListMetadataImportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3079,11 +3027,9 @@ type ListMetadataImportsResponse struct { func (x *ListMetadataImportsResponse) Reset() { *x = ListMetadataImportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetadataImportsResponse) String() string { @@ -3094,7 +3040,7 @@ func (*ListMetadataImportsResponse) ProtoMessage() {} func (x *ListMetadataImportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3146,11 +3092,9 @@ type GetMetadataImportRequest struct { func (x *GetMetadataImportRequest) Reset() { *x = GetMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetadataImportRequest) String() string { @@ -3161,7 +3105,7 @@ func (*GetMetadataImportRequest) ProtoMessage() {} func (x *GetMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3223,11 +3167,9 @@ type CreateMetadataImportRequest struct { func (x *CreateMetadataImportRequest) Reset() { *x = CreateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetadataImportRequest) String() string { @@ -3238,7 +3180,7 @@ func (*CreateMetadataImportRequest) ProtoMessage() {} func (x *CreateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3316,11 +3258,9 @@ type UpdateMetadataImportRequest struct { func (x *UpdateMetadataImportRequest) Reset() { *x = UpdateMetadataImportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMetadataImportRequest) String() string { @@ -3331,7 +3271,7 @@ func (*UpdateMetadataImportRequest) ProtoMessage() {} func (x *UpdateMetadataImportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3403,11 +3343,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -3418,7 +3356,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3486,11 +3424,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -3501,7 +3437,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3553,11 +3489,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -3568,7 +3502,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3629,11 +3563,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -3644,7 +3576,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3716,11 +3648,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -3731,7 +3661,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3798,11 +3728,9 @@ type ExportMetadataRequest struct { func (x *ExportMetadataRequest) Reset() { *x = ExportMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadataRequest) String() string { @@ -3813,7 +3741,7 @@ func (*ExportMetadataRequest) ProtoMessage() {} func (x *ExportMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3911,11 +3839,9 @@ type RestoreServiceRequest struct { func (x *RestoreServiceRequest) Reset() { *x = RestoreServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreServiceRequest) String() string { @@ -3926,7 +3852,7 @@ func (*RestoreServiceRequest) ProtoMessage() {} func (x *RestoreServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3997,11 +3923,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -4012,7 +3936,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4090,11 +4014,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4105,7 +4027,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4136,11 +4058,9 @@ type DatabaseDumpSpec struct { func (x *DatabaseDumpSpec) Reset() { *x = DatabaseDumpSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseDumpSpec) String() string { @@ -4151,7 +4071,7 @@ func (*DatabaseDumpSpec) ProtoMessage() {} func (x *DatabaseDumpSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4187,11 +4107,9 @@ type RemoveIamPolicyRequest struct { func (x *RemoveIamPolicyRequest) Reset() { *x = RemoveIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIamPolicyRequest) String() string { @@ -4202,7 +4120,7 @@ func (*RemoveIamPolicyRequest) ProtoMessage() {} func (x *RemoveIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4244,11 +4162,9 @@ type RemoveIamPolicyResponse struct { func (x *RemoveIamPolicyResponse) Reset() { *x = RemoveIamPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIamPolicyResponse) String() string { @@ -4259,7 +4175,7 @@ func (*RemoveIamPolicyResponse) ProtoMessage() {} func (x *RemoveIamPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4300,11 +4216,9 @@ type QueryMetadataRequest struct { func (x *QueryMetadataRequest) Reset() { *x = QueryMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataRequest) String() string { @@ -4315,7 +4229,7 @@ func (*QueryMetadataRequest) ProtoMessage() {} func (x *QueryMetadataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4360,11 +4274,9 @@ type QueryMetadataResponse struct { func (x *QueryMetadataResponse) Reset() { *x = QueryMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryMetadataResponse) String() string { @@ -4375,7 +4287,7 @@ func (*QueryMetadataResponse) ProtoMessage() {} func (x *QueryMetadataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4413,11 +4325,9 @@ type ErrorDetails struct { func (x *ErrorDetails) Reset() { *x = ErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorDetails) String() string { @@ -4428,7 +4338,7 @@ func (*ErrorDetails) ProtoMessage() {} func (x *ErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4472,11 +4382,9 @@ type MoveTableToDatabaseRequest struct { func (x *MoveTableToDatabaseRequest) Reset() { *x = MoveTableToDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseRequest) String() string { @@ -4487,7 +4395,7 @@ func (*MoveTableToDatabaseRequest) ProtoMessage() {} func (x *MoveTableToDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4540,11 +4448,9 @@ type MoveTableToDatabaseResponse struct { func (x *MoveTableToDatabaseResponse) Reset() { *x = MoveTableToDatabaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveTableToDatabaseResponse) String() string { @@ -4555,7 +4461,7 @@ func (*MoveTableToDatabaseResponse) ProtoMessage() {} func (x *MoveTableToDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,11 +4502,9 @@ type AlterMetadataResourceLocationRequest struct { func (x *AlterMetadataResourceLocationRequest) Reset() { *x = AlterMetadataResourceLocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationRequest) String() string { @@ -4611,7 +4515,7 @@ func (*AlterMetadataResourceLocationRequest) ProtoMessage() {} func (x *AlterMetadataResourceLocationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4657,11 +4561,9 @@ type AlterMetadataResourceLocationResponse struct { func (x *AlterMetadataResourceLocationResponse) Reset() { *x = AlterMetadataResourceLocationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlterMetadataResourceLocationResponse) String() string { @@ -4672,7 +4574,7 @@ func (*AlterMetadataResourceLocationResponse) ProtoMessage() {} func (x *AlterMetadataResourceLocationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4709,11 +4611,9 @@ type NetworkConfig_Consumer struct { func (x *NetworkConfig_Consumer) Reset() { *x = NetworkConfig_Consumer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig_Consumer) String() string { @@ -4724,7 +4624,7 @@ func (*NetworkConfig_Consumer) ProtoMessage() {} func (x *NetworkConfig_Consumer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4810,11 +4710,9 @@ type MetadataImport_DatabaseDump struct { func (x *MetadataImport_DatabaseDump) Reset() { *x = MetadataImport_DatabaseDump{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataImport_DatabaseDump) String() string { @@ -4825,7 +4723,7 @@ func (*MetadataImport_DatabaseDump) ProtoMessage() {} func (x *MetadataImport_DatabaseDump) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4885,11 +4783,9 @@ type LocationMetadata_HiveMetastoreVersion struct { func (x *LocationMetadata_HiveMetastoreVersion) Reset() { *x = LocationMetadata_HiveMetastoreVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata_HiveMetastoreVersion) String() string { @@ -4900,7 +4796,7 @@ func (*LocationMetadata_HiveMetastoreVersion) ProtoMessage() {} func (x *LocationMetadata_HiveMetastoreVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6310,632 +6206,6 @@ func file_google_cloud_metastore_v1beta_metastore_proto_init() { if File_google_cloud_metastore_v1beta_metastore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetadataIntegration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataCatalogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DataplexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Lake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*HiveMetastoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*KerberosConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AuxiliaryVersionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TelemetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MetadataManagementActivity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MetadataExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Restore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ScalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListMetadataImportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMetadataImportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*RestoreServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseDumpSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIamPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*QueryMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*MoveTableToDatabaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*AlterMetadataResourceLocationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig_Consumer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*MetadataImport_DatabaseDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata_HiveMetastoreVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_metastore_v1beta_metastore_proto_msgTypes[0].OneofWrappers = []any{ (*Service_HiveMetastoreConfig)(nil), } diff --git a/metastore/apiv1beta/metastorepb/metastore_federation.pb.go b/metastore/apiv1beta/metastorepb/metastore_federation.pb.go index 501d2c84adf0..587abaf21db6 100755 --- a/metastore/apiv1beta/metastorepb/metastore_federation.pb.go +++ b/metastore/apiv1beta/metastorepb/metastore_federation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/metastore/v1beta/metastore_federation.proto @@ -208,11 +208,9 @@ type Federation struct { func (x *Federation) Reset() { *x = Federation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Federation) String() string { @@ -223,7 +221,7 @@ func (*Federation) ProtoMessage() {} func (x *Federation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +328,9 @@ type BackendMetastore struct { func (x *BackendMetastore) Reset() { *x = BackendMetastore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackendMetastore) String() string { @@ -345,7 +341,7 @@ func (*BackendMetastore) ProtoMessage() {} func (x *BackendMetastore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +404,9 @@ type ListFederationsRequest struct { func (x *ListFederationsRequest) Reset() { *x = ListFederationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsRequest) String() string { @@ -423,7 +417,7 @@ func (*ListFederationsRequest) ProtoMessage() {} func (x *ListFederationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +484,9 @@ type ListFederationsResponse struct { func (x *ListFederationsResponse) Reset() { *x = ListFederationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFederationsResponse) String() string { @@ -505,7 +497,7 @@ func (*ListFederationsResponse) ProtoMessage() {} func (x *ListFederationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +548,9 @@ type GetFederationRequest struct { func (x *GetFederationRequest) Reset() { *x = GetFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFederationRequest) String() string { @@ -571,7 +561,7 @@ func (*GetFederationRequest) ProtoMessage() {} func (x *GetFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +622,9 @@ type CreateFederationRequest struct { func (x *CreateFederationRequest) Reset() { *x = CreateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFederationRequest) String() string { @@ -647,7 +635,7 @@ func (*CreateFederationRequest) ProtoMessage() {} func (x *CreateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +712,9 @@ type UpdateFederationRequest struct { func (x *UpdateFederationRequest) Reset() { *x = UpdateFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFederationRequest) String() string { @@ -739,7 +725,7 @@ func (*UpdateFederationRequest) ProtoMessage() {} func (x *UpdateFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +789,9 @@ type DeleteFederationRequest struct { func (x *DeleteFederationRequest) Reset() { *x = DeleteFederationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFederationRequest) String() string { @@ -818,7 +802,7 @@ func (*DeleteFederationRequest) ProtoMessage() {} func (x *DeleteFederationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,104 +1160,6 @@ func file_google_cloud_metastore_v1beta_metastore_federation_proto_init() { return } file_google_cloud_metastore_v1beta_metastore_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Federation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BackendMetastore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFederationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_metastore_v1beta_metastore_federation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFederationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/migrationcenter/apiv1/helpers.go b/migrationcenter/apiv1/helpers.go index 0d0fa4f5c42e..2e05896acc69 100755 --- a/migrationcenter/apiv1/helpers.go +++ b/migrationcenter/apiv1/helpers.go @@ -18,10 +18,20 @@ package migrationcenter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "migrationcenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/migrationcenter/apiv1/migration_center_client.go b/migrationcenter/apiv1/migration_center_client.go index b1d14405a6ba..5783977e2784 100755 --- a/migrationcenter/apiv1/migration_center_client.go +++ b/migrationcenter/apiv1/migration_center_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" migrationcenterpb "cloud.google.com/go/migrationcenter/apiv1/migrationcenterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -984,6 +983,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new migration center client based on gRPC. @@ -1010,6 +1011,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: migrationcenterpb.NewMigrationCenterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1074,6 +1076,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new migration center rest client. @@ -1091,6 +1095,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1164,7 +1169,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *migrationcenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *gRPCClient) GetAsset(ctx context.Context, req *migrationcenterpb.GetAss var resp *migrationcenterpb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAsset, req, settings.GRPC, c.logger, "GetAsset") return err }, opts...) if err != nil { @@ -1217,7 +1222,7 @@ func (c *gRPCClient) UpdateAsset(ctx context.Context, req *migrationcenterpb.Upd var resp *migrationcenterpb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAsset, req, settings.GRPC, c.logger, "UpdateAsset") return err }, opts...) if err != nil { @@ -1235,7 +1240,7 @@ func (c *gRPCClient) BatchUpdateAssets(ctx context.Context, req *migrationcenter var resp *migrationcenterpb.BatchUpdateAssetsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchUpdateAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchUpdateAssets, req, settings.GRPC, c.logger, "BatchUpdateAssets") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) DeleteAsset(ctx context.Context, req *migrationcenterpb.Del opts = append((*c.CallOptions).DeleteAsset[0:len((*c.CallOptions).DeleteAsset):len((*c.CallOptions).DeleteAsset)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAsset(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAsset, req, settings.GRPC, c.logger, "DeleteAsset") return err }, opts...) return err @@ -1266,7 +1271,7 @@ func (c *gRPCClient) BatchDeleteAssets(ctx context.Context, req *migrationcenter opts = append((*c.CallOptions).BatchDeleteAssets[0:len((*c.CallOptions).BatchDeleteAssets):len((*c.CallOptions).BatchDeleteAssets)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.BatchDeleteAssets(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.BatchDeleteAssets, req, settings.GRPC, c.logger, "BatchDeleteAssets") return err }, opts...) return err @@ -1281,7 +1286,7 @@ func (c *gRPCClient) ReportAssetFrames(ctx context.Context, req *migrationcenter var resp *migrationcenterpb.ReportAssetFramesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportAssetFrames(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportAssetFrames, req, settings.GRPC, c.logger, "ReportAssetFrames") return err }, opts...) if err != nil { @@ -1299,7 +1304,7 @@ func (c *gRPCClient) AggregateAssetsValues(ctx context.Context, req *migrationce var resp *migrationcenterpb.AggregateAssetsValuesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AggregateAssetsValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AggregateAssetsValues, req, settings.GRPC, c.logger, "AggregateAssetsValues") return err }, opts...) if err != nil { @@ -1317,7 +1322,7 @@ func (c *gRPCClient) CreateImportJob(ctx context.Context, req *migrationcenterpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateImportJob, req, settings.GRPC, c.logger, "CreateImportJob") return err }, opts...) if err != nil { @@ -1348,7 +1353,7 @@ func (c *gRPCClient) ListImportJobs(ctx context.Context, req *migrationcenterpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListImportJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListImportJobs, req, settings.GRPC, c.logger, "ListImportJobs") return err }, opts...) if err != nil { @@ -1383,7 +1388,7 @@ func (c *gRPCClient) GetImportJob(ctx context.Context, req *migrationcenterpb.Ge var resp *migrationcenterpb.ImportJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetImportJob, req, settings.GRPC, c.logger, "GetImportJob") return err }, opts...) if err != nil { @@ -1401,7 +1406,7 @@ func (c *gRPCClient) DeleteImportJob(ctx context.Context, req *migrationcenterpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteImportJob, req, settings.GRPC, c.logger, "DeleteImportJob") return err }, opts...) if err != nil { @@ -1421,7 +1426,7 @@ func (c *gRPCClient) UpdateImportJob(ctx context.Context, req *migrationcenterpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateImportJob, req, settings.GRPC, c.logger, "UpdateImportJob") return err }, opts...) if err != nil { @@ -1441,7 +1446,7 @@ func (c *gRPCClient) ValidateImportJob(ctx context.Context, req *migrationcenter var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ValidateImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ValidateImportJob, req, settings.GRPC, c.logger, "ValidateImportJob") return err }, opts...) if err != nil { @@ -1461,7 +1466,7 @@ func (c *gRPCClient) RunImportJob(ctx context.Context, req *migrationcenterpb.Ru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunImportJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunImportJob, req, settings.GRPC, c.logger, "RunImportJob") return err }, opts...) if err != nil { @@ -1481,7 +1486,7 @@ func (c *gRPCClient) GetImportDataFile(ctx context.Context, req *migrationcenter var resp *migrationcenterpb.ImportDataFile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetImportDataFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetImportDataFile, req, settings.GRPC, c.logger, "GetImportDataFile") return err }, opts...) if err != nil { @@ -1510,7 +1515,7 @@ func (c *gRPCClient) ListImportDataFiles(ctx context.Context, req *migrationcent } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListImportDataFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListImportDataFiles, req, settings.GRPC, c.logger, "ListImportDataFiles") return err }, opts...) if err != nil { @@ -1545,7 +1550,7 @@ func (c *gRPCClient) CreateImportDataFile(ctx context.Context, req *migrationcen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateImportDataFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateImportDataFile, req, settings.GRPC, c.logger, "CreateImportDataFile") return err }, opts...) if err != nil { @@ -1565,7 +1570,7 @@ func (c *gRPCClient) DeleteImportDataFile(ctx context.Context, req *migrationcen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteImportDataFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteImportDataFile, req, settings.GRPC, c.logger, "DeleteImportDataFile") return err }, opts...) if err != nil { @@ -1596,7 +1601,7 @@ func (c *gRPCClient) ListGroups(ctx context.Context, req *migrationcenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGroups, req, settings.GRPC, c.logger, "ListGroups") return err }, opts...) if err != nil { @@ -1631,7 +1636,7 @@ func (c *gRPCClient) GetGroup(ctx context.Context, req *migrationcenterpb.GetGro var resp *migrationcenterpb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGroup, req, settings.GRPC, c.logger, "GetGroup") return err }, opts...) if err != nil { @@ -1649,7 +1654,7 @@ func (c *gRPCClient) CreateGroup(ctx context.Context, req *migrationcenterpb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGroup, req, settings.GRPC, c.logger, "CreateGroup") return err }, opts...) if err != nil { @@ -1669,7 +1674,7 @@ func (c *gRPCClient) UpdateGroup(ctx context.Context, req *migrationcenterpb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGroup, req, settings.GRPC, c.logger, "UpdateGroup") return err }, opts...) if err != nil { @@ -1689,7 +1694,7 @@ func (c *gRPCClient) DeleteGroup(ctx context.Context, req *migrationcenterpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGroup, req, settings.GRPC, c.logger, "DeleteGroup") return err }, opts...) if err != nil { @@ -1709,7 +1714,7 @@ func (c *gRPCClient) AddAssetsToGroup(ctx context.Context, req *migrationcenterp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AddAssetsToGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AddAssetsToGroup, req, settings.GRPC, c.logger, "AddAssetsToGroup") return err }, opts...) if err != nil { @@ -1729,7 +1734,7 @@ func (c *gRPCClient) RemoveAssetsFromGroup(ctx context.Context, req *migrationce var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RemoveAssetsFromGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RemoveAssetsFromGroup, req, settings.GRPC, c.logger, "RemoveAssetsFromGroup") return err }, opts...) if err != nil { @@ -1760,7 +1765,7 @@ func (c *gRPCClient) ListErrorFrames(ctx context.Context, req *migrationcenterpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListErrorFrames(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListErrorFrames, req, settings.GRPC, c.logger, "ListErrorFrames") return err }, opts...) if err != nil { @@ -1795,7 +1800,7 @@ func (c *gRPCClient) GetErrorFrame(ctx context.Context, req *migrationcenterpb.G var resp *migrationcenterpb.ErrorFrame err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetErrorFrame(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetErrorFrame, req, settings.GRPC, c.logger, "GetErrorFrame") return err }, opts...) if err != nil { @@ -1824,7 +1829,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *migrationcenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -1859,7 +1864,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *migrationcenterpb.GetSo var resp *migrationcenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -1877,7 +1882,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *migrationcenterpb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -1897,7 +1902,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *migrationcenterpb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -1917,7 +1922,7 @@ func (c *gRPCClient) DeleteSource(ctx context.Context, req *migrationcenterpb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSource, req, settings.GRPC, c.logger, "DeleteSource") return err }, opts...) if err != nil { @@ -1948,7 +1953,7 @@ func (c *gRPCClient) ListPreferenceSets(ctx context.Context, req *migrationcente } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPreferenceSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPreferenceSets, req, settings.GRPC, c.logger, "ListPreferenceSets") return err }, opts...) if err != nil { @@ -1983,7 +1988,7 @@ func (c *gRPCClient) GetPreferenceSet(ctx context.Context, req *migrationcenterp var resp *migrationcenterpb.PreferenceSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPreferenceSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPreferenceSet, req, settings.GRPC, c.logger, "GetPreferenceSet") return err }, opts...) if err != nil { @@ -2001,7 +2006,7 @@ func (c *gRPCClient) CreatePreferenceSet(ctx context.Context, req *migrationcent var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePreferenceSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePreferenceSet, req, settings.GRPC, c.logger, "CreatePreferenceSet") return err }, opts...) if err != nil { @@ -2021,7 +2026,7 @@ func (c *gRPCClient) UpdatePreferenceSet(ctx context.Context, req *migrationcent var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePreferenceSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePreferenceSet, req, settings.GRPC, c.logger, "UpdatePreferenceSet") return err }, opts...) if err != nil { @@ -2041,7 +2046,7 @@ func (c *gRPCClient) DeletePreferenceSet(ctx context.Context, req *migrationcent var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePreferenceSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePreferenceSet, req, settings.GRPC, c.logger, "DeletePreferenceSet") return err }, opts...) if err != nil { @@ -2061,7 +2066,7 @@ func (c *gRPCClient) GetSettings(ctx context.Context, req *migrationcenterpb.Get var resp *migrationcenterpb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSettings, req, settings.GRPC, c.logger, "GetSettings") return err }, opts...) if err != nil { @@ -2079,7 +2084,7 @@ func (c *gRPCClient) UpdateSettings(ctx context.Context, req *migrationcenterpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSettings, req, settings.GRPC, c.logger, "UpdateSettings") return err }, opts...) if err != nil { @@ -2099,7 +2104,7 @@ func (c *gRPCClient) CreateReportConfig(ctx context.Context, req *migrationcente var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReportConfig, req, settings.GRPC, c.logger, "CreateReportConfig") return err }, opts...) if err != nil { @@ -2119,7 +2124,7 @@ func (c *gRPCClient) GetReportConfig(ctx context.Context, req *migrationcenterpb var resp *migrationcenterpb.ReportConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReportConfig, req, settings.GRPC, c.logger, "GetReportConfig") return err }, opts...) if err != nil { @@ -2148,7 +2153,7 @@ func (c *gRPCClient) ListReportConfigs(ctx context.Context, req *migrationcenter } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReportConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReportConfigs, req, settings.GRPC, c.logger, "ListReportConfigs") return err }, opts...) if err != nil { @@ -2183,7 +2188,7 @@ func (c *gRPCClient) DeleteReportConfig(ctx context.Context, req *migrationcente var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteReportConfig, req, settings.GRPC, c.logger, "DeleteReportConfig") return err }, opts...) if err != nil { @@ -2203,7 +2208,7 @@ func (c *gRPCClient) CreateReport(ctx context.Context, req *migrationcenterpb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReport, req, settings.GRPC, c.logger, "CreateReport") return err }, opts...) if err != nil { @@ -2223,7 +2228,7 @@ func (c *gRPCClient) GetReport(ctx context.Context, req *migrationcenterpb.GetRe var resp *migrationcenterpb.Report err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReport, req, settings.GRPC, c.logger, "GetReport") return err }, opts...) if err != nil { @@ -2252,7 +2257,7 @@ func (c *gRPCClient) ListReports(ctx context.Context, req *migrationcenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReports, req, settings.GRPC, c.logger, "ListReports") return err }, opts...) if err != nil { @@ -2287,7 +2292,7 @@ func (c *gRPCClient) DeleteReport(ctx context.Context, req *migrationcenterpb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteReport, req, settings.GRPC, c.logger, "DeleteReport") return err }, opts...) if err != nil { @@ -2307,7 +2312,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2336,7 +2341,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2370,7 +2375,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2384,7 +2389,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2399,7 +2404,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2428,7 +2433,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2508,21 +2513,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *migrationcenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2588,17 +2582,7 @@ func (c *restClient) GetAsset(ctx context.Context, req *migrationcenterpb.GetAss httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAsset") if err != nil { return err } @@ -2665,17 +2649,7 @@ func (c *restClient) UpdateAsset(ctx context.Context, req *migrationcenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAsset") if err != nil { return err } @@ -2731,17 +2705,7 @@ func (c *restClient) BatchUpdateAssets(ctx context.Context, req *migrationcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateAssets") if err != nil { return err } @@ -2791,15 +2755,8 @@ func (c *restClient) DeleteAsset(ctx context.Context, req *migrationcenterpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAsset") + return err }, opts...) } @@ -2839,15 +2796,8 @@ func (c *restClient) BatchDeleteAssets(ctx context.Context, req *migrationcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteAssets") + return err }, opts...) } @@ -2892,17 +2842,7 @@ func (c *restClient) ReportAssetFrames(ctx context.Context, req *migrationcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReportAssetFrames") if err != nil { return err } @@ -2958,17 +2898,7 @@ func (c *restClient) AggregateAssetsValues(ctx context.Context, req *migrationce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AggregateAssetsValues") if err != nil { return err } @@ -3028,21 +2958,10 @@ func (c *restClient) CreateImportJob(ctx context.Context, req *migrationcenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateImportJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3114,21 +3033,10 @@ func (c *restClient) ListImportJobs(ctx context.Context, req *migrationcenterpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListImportJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3194,17 +3102,7 @@ func (c *restClient) GetImportJob(ctx context.Context, req *migrationcenterpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetImportJob") if err != nil { return err } @@ -3259,21 +3157,10 @@ func (c *restClient) DeleteImportJob(ctx context.Context, req *migrationcenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteImportJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3340,21 +3227,10 @@ func (c *restClient) UpdateImportJob(ctx context.Context, req *migrationcenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateImportJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3410,21 +3286,10 @@ func (c *restClient) ValidateImportJob(ctx context.Context, req *migrationcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateImportJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3480,21 +3345,10 @@ func (c *restClient) RunImportJob(ctx context.Context, req *migrationcenterpb.Ru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunImportJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3545,17 +3399,7 @@ func (c *restClient) GetImportDataFile(ctx context.Context, req *migrationcenter httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetImportDataFile") if err != nil { return err } @@ -3623,21 +3467,10 @@ func (c *restClient) ListImportDataFiles(ctx context.Context, req *migrationcent } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListImportDataFiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3710,21 +3543,10 @@ func (c *restClient) CreateImportDataFile(ctx context.Context, req *migrationcen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateImportDataFile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3777,21 +3599,10 @@ func (c *restClient) DeleteImportDataFile(ctx context.Context, req *migrationcen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteImportDataFile") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3860,21 +3671,10 @@ func (c *restClient) ListGroups(ctx context.Context, req *migrationcenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3937,17 +3737,7 @@ func (c *restClient) GetGroup(ctx context.Context, req *migrationcenterpb.GetGro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGroup") if err != nil { return err } @@ -4007,21 +3797,10 @@ func (c *restClient) CreateGroup(ctx context.Context, req *migrationcenterpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4088,21 +3867,10 @@ func (c *restClient) UpdateGroup(ctx context.Context, req *migrationcenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4155,21 +3923,10 @@ func (c *restClient) DeleteGroup(ctx context.Context, req *migrationcenterpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4225,21 +3982,10 @@ func (c *restClient) AddAssetsToGroup(ctx context.Context, req *migrationcenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddAssetsToGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4295,21 +4041,10 @@ func (c *restClient) RemoveAssetsFromGroup(ctx context.Context, req *migrationce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveAssetsFromGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4375,21 +4110,10 @@ func (c *restClient) ListErrorFrames(ctx context.Context, req *migrationcenterpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListErrorFrames") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4455,17 +4179,7 @@ func (c *restClient) GetErrorFrame(ctx context.Context, req *migrationcenterpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetErrorFrame") if err != nil { return err } @@ -4533,21 +4247,10 @@ func (c *restClient) ListSources(ctx context.Context, req *migrationcenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4610,17 +4313,7 @@ func (c *restClient) GetSource(ctx context.Context, req *migrationcenterpb.GetSo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -4680,21 +4373,10 @@ func (c *restClient) CreateSource(ctx context.Context, req *migrationcenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4761,21 +4443,10 @@ func (c *restClient) UpdateSource(ctx context.Context, req *migrationcenterpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4828,21 +4499,10 @@ func (c *restClient) DeleteSource(ctx context.Context, req *migrationcenterpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4908,21 +4568,10 @@ func (c *restClient) ListPreferenceSets(ctx context.Context, req *migrationcente } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPreferenceSets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4985,17 +4634,7 @@ func (c *restClient) GetPreferenceSet(ctx context.Context, req *migrationcenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPreferenceSet") if err != nil { return err } @@ -5055,21 +4694,10 @@ func (c *restClient) CreatePreferenceSet(ctx context.Context, req *migrationcent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePreferenceSet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5136,21 +4764,10 @@ func (c *restClient) UpdatePreferenceSet(ctx context.Context, req *migrationcent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePreferenceSet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5203,21 +4820,10 @@ func (c *restClient) DeletePreferenceSet(ctx context.Context, req *migrationcent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePreferenceSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5268,17 +4874,7 @@ func (c *restClient) GetSettings(ctx context.Context, req *migrationcenterpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSettings") if err != nil { return err } @@ -5344,21 +4940,10 @@ func (c *restClient) UpdateSettings(ctx context.Context, req *migrationcenterpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSettings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5419,21 +5004,10 @@ func (c *restClient) CreateReportConfig(ctx context.Context, req *migrationcente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReportConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5484,17 +5058,7 @@ func (c *restClient) GetReportConfig(ctx context.Context, req *migrationcenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReportConfig") if err != nil { return err } @@ -5562,21 +5126,10 @@ func (c *restClient) ListReportConfigs(ctx context.Context, req *migrationcenter } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReportConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5644,21 +5197,10 @@ func (c *restClient) DeleteReportConfig(ctx context.Context, req *migrationcente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReportConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5719,21 +5261,10 @@ func (c *restClient) CreateReport(ctx context.Context, req *migrationcenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5787,17 +5318,7 @@ func (c *restClient) GetReport(ctx context.Context, req *migrationcenterpb.GetRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReport") if err != nil { return err } @@ -5868,21 +5389,10 @@ func (c *restClient) ListReports(ctx context.Context, req *migrationcenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5947,21 +5457,10 @@ func (c *restClient) DeleteReport(ctx context.Context, req *migrationcenterpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6012,17 +5511,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -6087,21 +5576,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6167,15 +5645,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -6209,15 +5680,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -6254,17 +5718,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -6329,21 +5783,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/migrationcenter/apiv1/migration_center_client_example_go123_test.go b/migrationcenter/apiv1/migration_center_client_example_go123_test.go index de8423a9a729..65eecad55419 100644 --- a/migrationcenter/apiv1/migration_center_client_example_go123_test.go +++ b/migrationcenter/apiv1/migration_center_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListErrorFrames_all() { } for resp, err := range c.ListErrorFrames(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListGroups_all() { } for resp, err := range c.ListGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListImportDataFiles_all() { } for resp, err := range c.ListImportDataFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListImportJobs_all() { } for resp, err := range c.ListImportJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListPreferenceSets_all() { } for resp, err := range c.ListPreferenceSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListReportConfigs_all() { } for resp, err := range c.ListReportConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListReports_all() { } for resp, err := range c.ListReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/migrationcenter/apiv1/migrationcenterpb/migrationcenter.pb.go b/migrationcenter/apiv1/migrationcenterpb/migrationcenter.pb.go index f4a531bba1a8..60ebd0f057b7 100755 --- a/migrationcenter/apiv1/migrationcenterpb/migrationcenter.pb.go +++ b/migrationcenter/apiv1/migrationcenterpb/migrationcenter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/migrationcenter/v1/migrationcenter.proto @@ -2100,11 +2100,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -2115,7 +2113,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2241,11 +2239,9 @@ type PreferenceSet struct { func (x *PreferenceSet) Reset() { *x = PreferenceSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreferenceSet) String() string { @@ -2256,7 +2252,7 @@ func (*PreferenceSet) ProtoMessage() {} func (x *PreferenceSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2346,11 +2342,9 @@ type ImportJob struct { func (x *ImportJob) Reset() { *x = ImportJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportJob) String() string { @@ -2361,7 +2355,7 @@ func (*ImportJob) ProtoMessage() {} func (x *ImportJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2495,11 +2489,9 @@ type ImportDataFile struct { func (x *ImportDataFile) Reset() { *x = ImportDataFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataFile) String() string { @@ -2510,7 +2502,7 @@ func (*ImportDataFile) ProtoMessage() {} func (x *ImportDataFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2610,11 +2602,9 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Group) String() string { @@ -2625,7 +2615,7 @@ func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,11 +2690,9 @@ type ErrorFrame struct { func (x *ErrorFrame) Reset() { *x = ErrorFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorFrame) String() string { @@ -2715,7 +2703,7 @@ func (*ErrorFrame) ProtoMessage() {} func (x *ErrorFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2793,11 +2781,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -2808,7 +2794,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2923,11 +2909,9 @@ type ReportConfig struct { func (x *ReportConfig) Reset() { *x = ReportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportConfig) String() string { @@ -2938,7 +2922,7 @@ func (*ReportConfig) ProtoMessage() {} func (x *ReportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +3005,9 @@ type Report struct { func (x *Report) Reset() { *x = Report{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Report) String() string { @@ -3036,7 +3018,7 @@ func (*Report) ProtoMessage() {} func (x *Report) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3135,11 +3117,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3150,7 +3130,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3237,11 +3217,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -3252,7 +3230,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3325,11 +3303,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -3340,7 +3316,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3390,11 +3366,9 @@ type GetAssetRequest struct { func (x *GetAssetRequest) Reset() { *x = GetAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssetRequest) String() string { @@ -3405,7 +3379,7 @@ func (*GetAssetRequest) ProtoMessage() {} func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3467,11 +3441,9 @@ type UpdateAssetRequest struct { func (x *UpdateAssetRequest) Reset() { *x = UpdateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAssetRequest) String() string { @@ -3482,7 +3454,7 @@ func (*UpdateAssetRequest) ProtoMessage() {} func (x *UpdateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3533,11 +3505,9 @@ type BatchUpdateAssetsRequest struct { func (x *BatchUpdateAssetsRequest) Reset() { *x = BatchUpdateAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateAssetsRequest) String() string { @@ -3548,7 +3518,7 @@ func (*BatchUpdateAssetsRequest) ProtoMessage() {} func (x *BatchUpdateAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3590,11 +3560,9 @@ type BatchUpdateAssetsResponse struct { func (x *BatchUpdateAssetsResponse) Reset() { *x = BatchUpdateAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateAssetsResponse) String() string { @@ -3605,7 +3573,7 @@ func (*BatchUpdateAssetsResponse) ProtoMessage() {} func (x *BatchUpdateAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3653,11 +3621,9 @@ type DeleteAssetRequest struct { func (x *DeleteAssetRequest) Reset() { *x = DeleteAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssetRequest) String() string { @@ -3668,7 +3634,7 @@ func (*DeleteAssetRequest) ProtoMessage() {} func (x *DeleteAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3717,11 +3683,9 @@ type BatchDeleteAssetsRequest struct { func (x *BatchDeleteAssetsRequest) Reset() { *x = BatchDeleteAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteAssetsRequest) String() string { @@ -3732,7 +3696,7 @@ func (*BatchDeleteAssetsRequest) ProtoMessage() {} func (x *BatchDeleteAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3784,11 +3748,9 @@ type ReportAssetFramesRequest struct { func (x *ReportAssetFramesRequest) Reset() { *x = ReportAssetFramesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportAssetFramesRequest) String() string { @@ -3799,7 +3761,7 @@ func (*ReportAssetFramesRequest) ProtoMessage() {} func (x *ReportAssetFramesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3844,11 +3806,9 @@ type ReportAssetFramesResponse struct { func (x *ReportAssetFramesResponse) Reset() { *x = ReportAssetFramesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportAssetFramesResponse) String() string { @@ -3859,7 +3819,7 @@ func (*ReportAssetFramesResponse) ProtoMessage() {} func (x *ReportAssetFramesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3891,11 +3851,9 @@ type AggregateAssetsValuesRequest struct { func (x *AggregateAssetsValuesRequest) Reset() { *x = AggregateAssetsValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregateAssetsValuesRequest) String() string { @@ -3906,7 +3864,7 @@ func (*AggregateAssetsValuesRequest) ProtoMessage() {} func (x *AggregateAssetsValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3954,11 +3912,9 @@ type AggregateAssetsValuesResponse struct { func (x *AggregateAssetsValuesResponse) Reset() { *x = AggregateAssetsValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregateAssetsValuesResponse) String() string { @@ -3969,7 +3925,7 @@ func (*AggregateAssetsValuesResponse) ProtoMessage() {} func (x *AggregateAssetsValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4021,11 +3977,9 @@ type CreateImportJobRequest struct { func (x *CreateImportJobRequest) Reset() { *x = CreateImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateImportJobRequest) String() string { @@ -4036,7 +3990,7 @@ func (*CreateImportJobRequest) ProtoMessage() {} func (x *CreateImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4103,11 +4057,9 @@ type ListImportJobsRequest struct { func (x *ListImportJobsRequest) Reset() { *x = ListImportJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportJobsRequest) String() string { @@ -4118,7 +4070,7 @@ func (*ListImportJobsRequest) ProtoMessage() {} func (x *ListImportJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4191,11 +4143,9 @@ type ListImportJobsResponse struct { func (x *ListImportJobsResponse) Reset() { *x = ListImportJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportJobsResponse) String() string { @@ -4206,7 +4156,7 @@ func (*ListImportJobsResponse) ProtoMessage() {} func (x *ListImportJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4257,11 +4207,9 @@ type GetImportJobRequest struct { func (x *GetImportJobRequest) Reset() { *x = GetImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetImportJobRequest) String() string { @@ -4272,7 +4220,7 @@ func (*GetImportJobRequest) ProtoMessage() {} func (x *GetImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4331,11 +4279,9 @@ type DeleteImportJobRequest struct { func (x *DeleteImportJobRequest) Reset() { *x = DeleteImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteImportJobRequest) String() string { @@ -4346,7 +4292,7 @@ func (*DeleteImportJobRequest) ProtoMessage() {} func (x *DeleteImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4415,11 +4361,9 @@ type UpdateImportJobRequest struct { func (x *UpdateImportJobRequest) Reset() { *x = UpdateImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateImportJobRequest) String() string { @@ -4430,7 +4374,7 @@ func (*UpdateImportJobRequest) ProtoMessage() {} func (x *UpdateImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4492,11 +4436,9 @@ type ValidateImportJobRequest struct { func (x *ValidateImportJobRequest) Reset() { *x = ValidateImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateImportJobRequest) String() string { @@ -4507,7 +4449,7 @@ func (*ValidateImportJobRequest) ProtoMessage() {} func (x *ValidateImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4562,11 +4504,9 @@ type RunImportJobRequest struct { func (x *RunImportJobRequest) Reset() { *x = RunImportJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunImportJobRequest) String() string { @@ -4577,7 +4517,7 @@ func (*RunImportJobRequest) ProtoMessage() {} func (x *RunImportJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4618,11 +4558,9 @@ type GetImportDataFileRequest struct { func (x *GetImportDataFileRequest) Reset() { *x = GetImportDataFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetImportDataFileRequest) String() string { @@ -4633,7 +4571,7 @@ func (*GetImportDataFileRequest) ProtoMessage() {} func (x *GetImportDataFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4682,11 +4620,9 @@ type ListImportDataFilesRequest struct { func (x *ListImportDataFilesRequest) Reset() { *x = ListImportDataFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportDataFilesRequest) String() string { @@ -4697,7 +4633,7 @@ func (*ListImportDataFilesRequest) ProtoMessage() {} func (x *ListImportDataFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4764,11 +4700,9 @@ type ListImportDataFilesResponse struct { func (x *ListImportDataFilesResponse) Reset() { *x = ListImportDataFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImportDataFilesResponse) String() string { @@ -4779,7 +4713,7 @@ func (*ListImportDataFilesResponse) ProtoMessage() {} func (x *ListImportDataFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4845,11 +4779,9 @@ type CreateImportDataFileRequest struct { func (x *CreateImportDataFileRequest) Reset() { *x = CreateImportDataFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateImportDataFileRequest) String() string { @@ -4860,7 +4792,7 @@ func (*CreateImportDataFileRequest) ProtoMessage() {} func (x *CreateImportDataFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4929,11 +4861,9 @@ type DeleteImportDataFileRequest struct { func (x *DeleteImportDataFileRequest) Reset() { *x = DeleteImportDataFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteImportDataFileRequest) String() string { @@ -4944,7 +4874,7 @@ func (*DeleteImportDataFileRequest) ProtoMessage() {} func (x *DeleteImportDataFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4994,11 +4924,9 @@ type ListGroupsRequest struct { func (x *ListGroupsRequest) Reset() { *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsRequest) String() string { @@ -5009,7 +4937,7 @@ func (*ListGroupsRequest) ProtoMessage() {} func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5075,11 +5003,9 @@ type ListGroupsResponse struct { func (x *ListGroupsResponse) Reset() { *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsResponse) String() string { @@ -5090,7 +5016,7 @@ func (*ListGroupsResponse) ProtoMessage() {} func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5138,11 +5064,9 @@ type GetGroupRequest struct { func (x *GetGroupRequest) Reset() { *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGroupRequest) String() string { @@ -5153,7 +5077,7 @@ func (*GetGroupRequest) ProtoMessage() {} func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5209,11 +5133,9 @@ type CreateGroupRequest struct { func (x *CreateGroupRequest) Reset() { *x = CreateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGroupRequest) String() string { @@ -5224,7 +5146,7 @@ func (*CreateGroupRequest) ProtoMessage() {} func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5299,11 +5221,9 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGroupRequest) String() string { @@ -5314,7 +5234,7 @@ func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5376,11 +5296,9 @@ type DeleteGroupRequest struct { func (x *DeleteGroupRequest) Reset() { *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGroupRequest) String() string { @@ -5391,7 +5309,7 @@ func (*DeleteGroupRequest) ProtoMessage() {} func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5457,11 +5375,9 @@ type AddAssetsToGroupRequest struct { func (x *AddAssetsToGroupRequest) Reset() { *x = AddAssetsToGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddAssetsToGroupRequest) String() string { @@ -5472,7 +5388,7 @@ func (*AddAssetsToGroupRequest) ProtoMessage() {} func (x *AddAssetsToGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5551,11 +5467,9 @@ type RemoveAssetsFromGroupRequest struct { func (x *RemoveAssetsFromGroupRequest) Reset() { *x = RemoveAssetsFromGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveAssetsFromGroupRequest) String() string { @@ -5566,7 +5480,7 @@ func (*RemoveAssetsFromGroupRequest) ProtoMessage() {} func (x *RemoveAssetsFromGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5629,11 +5543,9 @@ type ListErrorFramesRequest struct { func (x *ListErrorFramesRequest) Reset() { *x = ListErrorFramesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListErrorFramesRequest) String() string { @@ -5644,7 +5556,7 @@ func (*ListErrorFramesRequest) ProtoMessage() {} func (x *ListErrorFramesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5703,11 +5615,9 @@ type ListErrorFramesResponse struct { func (x *ListErrorFramesResponse) Reset() { *x = ListErrorFramesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListErrorFramesResponse) String() string { @@ -5718,7 +5628,7 @@ func (*ListErrorFramesResponse) ProtoMessage() {} func (x *ListErrorFramesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5770,11 +5680,9 @@ type GetErrorFrameRequest struct { func (x *GetErrorFrameRequest) Reset() { *x = GetErrorFrameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetErrorFrameRequest) String() string { @@ -5785,7 +5693,7 @@ func (*GetErrorFrameRequest) ProtoMessage() {} func (x *GetErrorFrameRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5835,11 +5743,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -5850,7 +5756,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5916,11 +5822,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -5931,7 +5835,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5979,11 +5883,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -5994,7 +5896,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6050,11 +5952,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -6065,7 +5965,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6141,11 +6041,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -6156,7 +6054,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6218,11 +6116,9 @@ type DeleteSourceRequest struct { func (x *DeleteSourceRequest) Reset() { *x = DeleteSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSourceRequest) String() string { @@ -6233,7 +6129,7 @@ func (*DeleteSourceRequest) ProtoMessage() {} func (x *DeleteSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6282,11 +6178,9 @@ type ListPreferenceSetsRequest struct { func (x *ListPreferenceSetsRequest) Reset() { *x = ListPreferenceSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPreferenceSetsRequest) String() string { @@ -6297,7 +6191,7 @@ func (*ListPreferenceSetsRequest) ProtoMessage() {} func (x *ListPreferenceSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6356,11 +6250,9 @@ type ListPreferenceSetsResponse struct { func (x *ListPreferenceSetsResponse) Reset() { *x = ListPreferenceSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPreferenceSetsResponse) String() string { @@ -6371,7 +6263,7 @@ func (*ListPreferenceSetsResponse) ProtoMessage() {} func (x *ListPreferenceSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6419,11 +6311,9 @@ type GetPreferenceSetRequest struct { func (x *GetPreferenceSetRequest) Reset() { *x = GetPreferenceSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPreferenceSetRequest) String() string { @@ -6434,7 +6324,7 @@ func (*GetPreferenceSetRequest) ProtoMessage() {} func (x *GetPreferenceSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6491,11 +6381,9 @@ type CreatePreferenceSetRequest struct { func (x *CreatePreferenceSetRequest) Reset() { *x = CreatePreferenceSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePreferenceSetRequest) String() string { @@ -6506,7 +6394,7 @@ func (*CreatePreferenceSetRequest) ProtoMessage() {} func (x *CreatePreferenceSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6582,11 +6470,9 @@ type UpdatePreferenceSetRequest struct { func (x *UpdatePreferenceSetRequest) Reset() { *x = UpdatePreferenceSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePreferenceSetRequest) String() string { @@ -6597,7 +6483,7 @@ func (*UpdatePreferenceSetRequest) ProtoMessage() {} func (x *UpdatePreferenceSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6659,11 +6545,9 @@ type DeletePreferenceSetRequest struct { func (x *DeletePreferenceSetRequest) Reset() { *x = DeletePreferenceSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePreferenceSetRequest) String() string { @@ -6674,7 +6558,7 @@ func (*DeletePreferenceSetRequest) ProtoMessage() {} func (x *DeletePreferenceSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6715,11 +6599,9 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingsRequest) String() string { @@ -6730,7 +6612,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6785,11 +6667,9 @@ type UpdateSettingsRequest struct { func (x *UpdateSettingsRequest) Reset() { *x = UpdateSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingsRequest) String() string { @@ -6800,7 +6680,7 @@ func (*UpdateSettingsRequest) ProtoMessage() {} func (x *UpdateSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6870,11 +6750,9 @@ type CreateReportConfigRequest struct { func (x *CreateReportConfigRequest) Reset() { *x = CreateReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReportConfigRequest) String() string { @@ -6885,7 +6763,7 @@ func (*CreateReportConfigRequest) ProtoMessage() {} func (x *CreateReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6958,11 +6836,9 @@ type DeleteReportConfigRequest struct { func (x *DeleteReportConfigRequest) Reset() { *x = DeleteReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReportConfigRequest) String() string { @@ -6973,7 +6849,7 @@ func (*DeleteReportConfigRequest) ProtoMessage() {} func (x *DeleteReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7023,11 +6899,9 @@ type GetReportRequest struct { func (x *GetReportRequest) Reset() { *x = GetReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReportRequest) String() string { @@ -7038,7 +6912,7 @@ func (*GetReportRequest) ProtoMessage() {} func (x *GetReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7090,11 +6964,9 @@ type ListReportsRequest struct { func (x *ListReportsRequest) Reset() { *x = ListReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportsRequest) String() string { @@ -7105,7 +6977,7 @@ func (*ListReportsRequest) ProtoMessage() {} func (x *ListReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7178,11 +7050,9 @@ type ListReportsResponse struct { func (x *ListReportsResponse) Reset() { *x = ListReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportsResponse) String() string { @@ -7193,7 +7063,7 @@ func (*ListReportsResponse) ProtoMessage() {} func (x *ListReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7255,11 +7125,9 @@ type DeleteReportRequest struct { func (x *DeleteReportRequest) Reset() { *x = DeleteReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReportRequest) String() string { @@ -7270,7 +7138,7 @@ func (*DeleteReportRequest) ProtoMessage() {} func (x *DeleteReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7311,11 +7179,9 @@ type GetReportConfigRequest struct { func (x *GetReportConfigRequest) Reset() { *x = GetReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReportConfigRequest) String() string { @@ -7326,7 +7192,7 @@ func (*GetReportConfigRequest) ProtoMessage() {} func (x *GetReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7369,11 +7235,9 @@ type ListReportConfigsRequest struct { func (x *ListReportConfigsRequest) Reset() { *x = ListReportConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportConfigsRequest) String() string { @@ -7384,7 +7248,7 @@ func (*ListReportConfigsRequest) ProtoMessage() {} func (x *ListReportConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7450,11 +7314,9 @@ type ListReportConfigsResponse struct { func (x *ListReportConfigsResponse) Reset() { *x = ListReportConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportConfigsResponse) String() string { @@ -7465,7 +7327,7 @@ func (*ListReportConfigsResponse) ProtoMessage() {} func (x *ListReportConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7535,11 +7397,9 @@ type CreateReportRequest struct { func (x *CreateReportRequest) Reset() { *x = CreateReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReportRequest) String() string { @@ -7550,7 +7410,7 @@ func (*CreateReportRequest) ProtoMessage() {} func (x *CreateReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7605,11 +7465,9 @@ type Frames struct { func (x *Frames) Reset() { *x = Frames{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Frames) String() string { @@ -7620,7 +7478,7 @@ func (*Frames) ProtoMessage() {} func (x *Frames) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7671,11 +7529,9 @@ type AssetFrame struct { func (x *AssetFrame) Reset() { *x = AssetFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetFrame) String() string { @@ -7686,7 +7542,7 @@ func (*AssetFrame) ProtoMessage() {} func (x *AssetFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7793,11 +7649,9 @@ type MachineDetails struct { func (x *MachineDetails) Reset() { *x = MachineDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineDetails) String() string { @@ -7808,7 +7662,7 @@ func (*MachineDetails) ProtoMessage() {} func (x *MachineDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7926,11 +7780,9 @@ type MachineArchitectureDetails struct { func (x *MachineArchitectureDetails) Reset() { *x = MachineArchitectureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineArchitectureDetails) String() string { @@ -7941,7 +7793,7 @@ func (*MachineArchitectureDetails) ProtoMessage() {} func (x *MachineArchitectureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8037,11 +7889,9 @@ type BiosDetails struct { func (x *BiosDetails) Reset() { *x = BiosDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BiosDetails) String() string { @@ -8052,7 +7902,7 @@ func (*BiosDetails) ProtoMessage() {} func (x *BiosDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8129,11 +7979,9 @@ type MachineNetworkDetails struct { func (x *MachineNetworkDetails) Reset() { *x = MachineNetworkDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineNetworkDetails) String() string { @@ -8144,7 +7992,7 @@ func (*MachineNetworkDetails) ProtoMessage() {} func (x *MachineNetworkDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8199,11 +8047,9 @@ type NetworkAdapterList struct { func (x *NetworkAdapterList) Reset() { *x = NetworkAdapterList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAdapterList) String() string { @@ -8214,7 +8060,7 @@ func (*NetworkAdapterList) ProtoMessage() {} func (x *NetworkAdapterList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8252,11 +8098,9 @@ type NetworkAdapterDetails struct { func (x *NetworkAdapterDetails) Reset() { *x = NetworkAdapterDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAdapterDetails) String() string { @@ -8267,7 +8111,7 @@ func (*NetworkAdapterDetails) ProtoMessage() {} func (x *NetworkAdapterDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8315,11 +8159,9 @@ type NetworkAddressList struct { func (x *NetworkAddressList) Reset() { *x = NetworkAddressList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAddressList) String() string { @@ -8330,7 +8172,7 @@ func (*NetworkAddressList) ProtoMessage() {} func (x *NetworkAddressList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8372,11 +8214,9 @@ type NetworkAddress struct { func (x *NetworkAddress) Reset() { *x = NetworkAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkAddress) String() string { @@ -8387,7 +8227,7 @@ func (*NetworkAddress) ProtoMessage() {} func (x *NetworkAddress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8453,11 +8293,9 @@ type MachineDiskDetails struct { func (x *MachineDiskDetails) Reset() { *x = MachineDiskDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineDiskDetails) String() string { @@ -8468,7 +8306,7 @@ func (*MachineDiskDetails) ProtoMessage() {} func (x *MachineDiskDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8516,11 +8354,9 @@ type DiskEntryList struct { func (x *DiskEntryList) Reset() { *x = DiskEntryList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskEntryList) String() string { @@ -8531,7 +8367,7 @@ func (*DiskEntryList) ProtoMessage() {} func (x *DiskEntryList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8583,11 +8419,9 @@ type DiskEntry struct { func (x *DiskEntry) Reset() { *x = DiskEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskEntry) String() string { @@ -8598,7 +8432,7 @@ func (*DiskEntry) ProtoMessage() {} func (x *DiskEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8699,11 +8533,9 @@ type DiskPartitionList struct { func (x *DiskPartitionList) Reset() { *x = DiskPartitionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskPartitionList) String() string { @@ -8714,7 +8546,7 @@ func (*DiskPartitionList) ProtoMessage() {} func (x *DiskPartitionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8760,11 +8592,9 @@ type DiskPartition struct { func (x *DiskPartition) Reset() { *x = DiskPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskPartition) String() string { @@ -8775,7 +8605,7 @@ func (*DiskPartition) ProtoMessage() {} func (x *DiskPartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8857,11 +8687,9 @@ type VmwareDiskConfig struct { func (x *VmwareDiskConfig) Reset() { *x = VmwareDiskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareDiskConfig) String() string { @@ -8872,7 +8700,7 @@ func (*VmwareDiskConfig) ProtoMessage() {} func (x *VmwareDiskConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8935,11 +8763,9 @@ type GuestOsDetails struct { func (x *GuestOsDetails) Reset() { *x = GuestOsDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestOsDetails) String() string { @@ -8950,7 +8776,7 @@ func (*GuestOsDetails) ProtoMessage() {} func (x *GuestOsDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9020,11 +8846,9 @@ type GuestConfigDetails struct { func (x *GuestConfigDetails) Reset() { *x = GuestConfigDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestConfigDetails) String() string { @@ -9035,7 +8859,7 @@ func (*GuestConfigDetails) ProtoMessage() {} func (x *GuestConfigDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9097,11 +8921,9 @@ type FstabEntryList struct { func (x *FstabEntryList) Reset() { *x = FstabEntryList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FstabEntryList) String() string { @@ -9112,7 +8934,7 @@ func (*FstabEntryList) ProtoMessage() {} func (x *FstabEntryList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9157,11 +8979,9 @@ type FstabEntry struct { func (x *FstabEntry) Reset() { *x = FstabEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FstabEntry) String() string { @@ -9172,7 +8992,7 @@ func (*FstabEntry) ProtoMessage() {} func (x *FstabEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9241,11 +9061,9 @@ type HostsEntryList struct { func (x *HostsEntryList) Reset() { *x = HostsEntryList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostsEntryList) String() string { @@ -9256,7 +9074,7 @@ func (*HostsEntryList) ProtoMessage() {} func (x *HostsEntryList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9292,11 +9110,9 @@ type HostsEntry struct { func (x *HostsEntry) Reset() { *x = HostsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HostsEntry) String() string { @@ -9307,7 +9123,7 @@ func (*HostsEntry) ProtoMessage() {} func (x *HostsEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9348,11 +9164,9 @@ type NfsExportList struct { func (x *NfsExportList) Reset() { *x = NfsExportList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsExportList) String() string { @@ -9363,7 +9177,7 @@ func (*NfsExportList) ProtoMessage() {} func (x *NfsExportList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9399,11 +9213,9 @@ type NfsExport struct { func (x *NfsExport) Reset() { *x = NfsExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NfsExport) String() string { @@ -9414,7 +9226,7 @@ func (*NfsExport) ProtoMessage() {} func (x *NfsExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9469,11 +9281,9 @@ type GuestRuntimeDetails struct { func (x *GuestRuntimeDetails) Reset() { *x = GuestRuntimeDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestRuntimeDetails) String() string { @@ -9484,7 +9294,7 @@ func (*GuestRuntimeDetails) ProtoMessage() {} func (x *GuestRuntimeDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9567,11 +9377,9 @@ type RunningServiceList struct { func (x *RunningServiceList) Reset() { *x = RunningServiceList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunningServiceList) String() string { @@ -9582,7 +9390,7 @@ func (*RunningServiceList) ProtoMessage() {} func (x *RunningServiceList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9626,11 +9434,9 @@ type RunningService struct { func (x *RunningService) Reset() { *x = RunningService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunningService) String() string { @@ -9641,7 +9447,7 @@ func (*RunningService) ProtoMessage() {} func (x *RunningService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9710,11 +9516,9 @@ type RunningProcessList struct { func (x *RunningProcessList) Reset() { *x = RunningProcessList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunningProcessList) String() string { @@ -9725,7 +9529,7 @@ func (*RunningProcessList) ProtoMessage() {} func (x *RunningProcessList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9767,11 +9571,9 @@ type RunningProcess struct { func (x *RunningProcess) Reset() { *x = RunningProcess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunningProcess) String() string { @@ -9782,7 +9584,7 @@ func (*RunningProcess) ProtoMessage() {} func (x *RunningProcess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9846,11 +9648,9 @@ type RuntimeNetworkInfo struct { func (x *RuntimeNetworkInfo) Reset() { *x = RuntimeNetworkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeNetworkInfo) String() string { @@ -9861,7 +9661,7 @@ func (*RuntimeNetworkInfo) ProtoMessage() {} func (x *RuntimeNetworkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9902,11 +9702,9 @@ type NetworkConnectionList struct { func (x *NetworkConnectionList) Reset() { *x = NetworkConnectionList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConnectionList) String() string { @@ -9917,7 +9715,7 @@ func (*NetworkConnectionList) ProtoMessage() {} func (x *NetworkConnectionList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9964,11 +9762,9 @@ type NetworkConnection struct { func (x *NetworkConnection) Reset() { *x = NetworkConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConnection) String() string { @@ -9979,7 +9775,7 @@ func (*NetworkConnection) ProtoMessage() {} func (x *NetworkConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10062,11 +9858,9 @@ type GuestInstalledApplicationList struct { func (x *GuestInstalledApplicationList) Reset() { *x = GuestInstalledApplicationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestInstalledApplicationList) String() string { @@ -10077,7 +9871,7 @@ func (*GuestInstalledApplicationList) ProtoMessage() {} func (x *GuestInstalledApplicationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10119,11 +9913,9 @@ type GuestInstalledApplication struct { func (x *GuestInstalledApplication) Reset() { *x = GuestInstalledApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestInstalledApplication) String() string { @@ -10134,7 +9926,7 @@ func (*GuestInstalledApplication) ProtoMessage() {} func (x *GuestInstalledApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10196,11 +9988,9 @@ type OpenFileList struct { func (x *OpenFileList) Reset() { *x = OpenFileList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenFileList) String() string { @@ -10211,7 +10001,7 @@ func (*OpenFileList) ProtoMessage() {} func (x *OpenFileList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10251,11 +10041,9 @@ type OpenFileDetails struct { func (x *OpenFileDetails) Reset() { *x = OpenFileDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OpenFileDetails) String() string { @@ -10266,7 +10054,7 @@ func (*OpenFileDetails) ProtoMessage() {} func (x *OpenFileDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10327,11 +10115,9 @@ type PlatformDetails struct { func (x *PlatformDetails) Reset() { *x = PlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlatformDetails) String() string { @@ -10342,7 +10128,7 @@ func (*PlatformDetails) ProtoMessage() {} func (x *PlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10461,11 +10247,9 @@ type VmwarePlatformDetails struct { func (x *VmwarePlatformDetails) Reset() { *x = VmwarePlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwarePlatformDetails) String() string { @@ -10476,7 +10260,7 @@ func (*VmwarePlatformDetails) ProtoMessage() {} func (x *VmwarePlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10547,11 +10331,9 @@ type AwsEc2PlatformDetails struct { func (x *AwsEc2PlatformDetails) Reset() { *x = AwsEc2PlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsEc2PlatformDetails) String() string { @@ -10562,7 +10344,7 @@ func (*AwsEc2PlatformDetails) ProtoMessage() {} func (x *AwsEc2PlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10607,11 +10389,9 @@ type AzureVmPlatformDetails struct { func (x *AzureVmPlatformDetails) Reset() { *x = AzureVmPlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureVmPlatformDetails) String() string { @@ -10622,7 +10402,7 @@ func (*AzureVmPlatformDetails) ProtoMessage() {} func (x *AzureVmPlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10672,11 +10452,9 @@ type GenericPlatformDetails struct { func (x *GenericPlatformDetails) Reset() { *x = GenericPlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericPlatformDetails) String() string { @@ -10687,7 +10465,7 @@ func (*GenericPlatformDetails) ProtoMessage() {} func (x *GenericPlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10723,11 +10501,9 @@ type PhysicalPlatformDetails struct { func (x *PhysicalPlatformDetails) Reset() { *x = PhysicalPlatformDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhysicalPlatformDetails) String() string { @@ -10738,7 +10514,7 @@ func (*PhysicalPlatformDetails) ProtoMessage() {} func (x *PhysicalPlatformDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10772,11 +10548,9 @@ type MemoryUsageSample struct { func (x *MemoryUsageSample) Reset() { *x = MemoryUsageSample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MemoryUsageSample) String() string { @@ -10787,7 +10561,7 @@ func (*MemoryUsageSample) ProtoMessage() {} func (x *MemoryUsageSample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10822,11 +10596,9 @@ type CpuUsageSample struct { func (x *CpuUsageSample) Reset() { *x = CpuUsageSample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CpuUsageSample) String() string { @@ -10837,7 +10609,7 @@ func (*CpuUsageSample) ProtoMessage() {} func (x *CpuUsageSample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10875,11 +10647,9 @@ type NetworkUsageSample struct { func (x *NetworkUsageSample) Reset() { *x = NetworkUsageSample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkUsageSample) String() string { @@ -10890,7 +10660,7 @@ func (*NetworkUsageSample) ProtoMessage() {} func (x *NetworkUsageSample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10931,11 +10701,9 @@ type DiskUsageSample struct { func (x *DiskUsageSample) Reset() { *x = DiskUsageSample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiskUsageSample) String() string { @@ -10946,7 +10714,7 @@ func (*DiskUsageSample) ProtoMessage() {} func (x *DiskUsageSample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10989,11 +10757,9 @@ type PerformanceSample struct { func (x *PerformanceSample) Reset() { *x = PerformanceSample{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PerformanceSample) String() string { @@ -11004,7 +10770,7 @@ func (*PerformanceSample) ProtoMessage() {} func (x *PerformanceSample) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11068,11 +10834,9 @@ type AssetPerformanceData struct { func (x *AssetPerformanceData) Reset() { *x = AssetPerformanceData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetPerformanceData) String() string { @@ -11083,7 +10847,7 @@ func (*AssetPerformanceData) ProtoMessage() {} func (x *AssetPerformanceData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11125,11 +10889,9 @@ type DailyResourceUsageAggregation struct { func (x *DailyResourceUsageAggregation) Reset() { *x = DailyResourceUsageAggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation) String() string { @@ -11140,7 +10902,7 @@ func (*DailyResourceUsageAggregation) ProtoMessage() {} func (x *DailyResourceUsageAggregation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11204,11 +10966,9 @@ type InsightList struct { func (x *InsightList) Reset() { *x = InsightList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightList) String() string { @@ -11219,7 +10979,7 @@ func (*InsightList) ProtoMessage() {} func (x *InsightList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11263,11 +11023,9 @@ type Insight struct { func (x *Insight) Reset() { *x = Insight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Insight) String() string { @@ -11278,7 +11036,7 @@ func (*Insight) ProtoMessage() {} func (x *Insight) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11353,11 +11111,9 @@ type GenericInsight struct { func (x *GenericInsight) Reset() { *x = GenericInsight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericInsight) String() string { @@ -11368,7 +11124,7 @@ func (*GenericInsight) ProtoMessage() {} func (x *GenericInsight) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11423,11 +11179,9 @@ type MigrationInsight struct { func (x *MigrationInsight) Reset() { *x = MigrationInsight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationInsight) String() string { @@ -11438,7 +11192,7 @@ func (*MigrationInsight) ProtoMessage() {} func (x *MigrationInsight) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11497,11 +11251,9 @@ type ComputeEngineMigrationTarget struct { func (x *ComputeEngineMigrationTarget) Reset() { *x = ComputeEngineMigrationTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeEngineMigrationTarget) String() string { @@ -11512,7 +11264,7 @@ func (*ComputeEngineMigrationTarget) ProtoMessage() {} func (x *ComputeEngineMigrationTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11556,11 +11308,9 @@ type ComputeEngineShapeDescriptor struct { func (x *ComputeEngineShapeDescriptor) Reset() { *x = ComputeEngineShapeDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeEngineShapeDescriptor) String() string { @@ -11571,7 +11321,7 @@ func (*ComputeEngineShapeDescriptor) ProtoMessage() {} func (x *ComputeEngineShapeDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11642,11 +11392,9 @@ type ComputeStorageDescriptor struct { func (x *ComputeStorageDescriptor) Reset() { *x = ComputeStorageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeStorageDescriptor) String() string { @@ -11657,7 +11405,7 @@ func (*ComputeStorageDescriptor) ProtoMessage() {} func (x *ComputeStorageDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11698,11 +11446,9 @@ type FitDescriptor struct { func (x *FitDescriptor) Reset() { *x = FitDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FitDescriptor) String() string { @@ -11713,7 +11459,7 @@ func (*FitDescriptor) ProtoMessage() {} func (x *FitDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11755,11 +11501,9 @@ type Aggregation struct { func (x *Aggregation) Reset() { *x = Aggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation) String() string { @@ -11770,7 +11514,7 @@ func (*Aggregation) ProtoMessage() {} func (x *Aggregation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11877,11 +11621,9 @@ type AggregationResult struct { func (x *AggregationResult) Reset() { *x = AggregationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult) String() string { @@ -11892,7 +11634,7 @@ func (*AggregationResult) ProtoMessage() {} func (x *AggregationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11996,11 +11738,9 @@ type FileValidationReport struct { func (x *FileValidationReport) Reset() { *x = FileValidationReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileValidationReport) String() string { @@ -12011,7 +11751,7 @@ func (*FileValidationReport) ProtoMessage() {} func (x *FileValidationReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12068,11 +11808,9 @@ type ValidationReport struct { func (x *ValidationReport) Reset() { *x = ValidationReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationReport) String() string { @@ -12083,7 +11821,7 @@ func (*ValidationReport) ProtoMessage() {} func (x *ValidationReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12128,11 +11866,9 @@ type ExecutionReport struct { func (x *ExecutionReport) Reset() { *x = ExecutionReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionReport) String() string { @@ -12143,7 +11879,7 @@ func (*ExecutionReport) ProtoMessage() {} func (x *ExecutionReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12194,11 +11930,9 @@ type ImportError struct { func (x *ImportError) Reset() { *x = ImportError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportError) String() string { @@ -12209,7 +11943,7 @@ func (*ImportError) ProtoMessage() {} func (x *ImportError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12258,11 +11992,9 @@ type ImportRowError struct { func (x *ImportRowError) Reset() { *x = ImportRowError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportRowError) String() string { @@ -12273,7 +12005,7 @@ func (*ImportRowError) ProtoMessage() {} func (x *ImportRowError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12333,11 +12065,9 @@ type UploadFileInfo struct { func (x *UploadFileInfo) Reset() { *x = UploadFileInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadFileInfo) String() string { @@ -12348,7 +12078,7 @@ func (*UploadFileInfo) ProtoMessage() {} func (x *UploadFileInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12396,11 +12126,9 @@ type AssetList struct { func (x *AssetList) Reset() { *x = AssetList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetList) String() string { @@ -12411,7 +12139,7 @@ func (*AssetList) ProtoMessage() {} func (x *AssetList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12448,11 +12176,9 @@ type FrameViolationEntry struct { func (x *FrameViolationEntry) Reset() { *x = FrameViolationEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrameViolationEntry) String() string { @@ -12463,7 +12189,7 @@ func (*FrameViolationEntry) ProtoMessage() {} func (x *FrameViolationEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12532,11 +12258,9 @@ type VirtualMachinePreferences struct { func (x *VirtualMachinePreferences) Reset() { *x = VirtualMachinePreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualMachinePreferences) String() string { @@ -12547,7 +12271,7 @@ func (*VirtualMachinePreferences) ProtoMessage() {} func (x *VirtualMachinePreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12627,11 +12351,9 @@ type ComputeEnginePreferences struct { func (x *ComputeEnginePreferences) Reset() { *x = ComputeEnginePreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeEnginePreferences) String() string { @@ -12642,7 +12364,7 @@ func (*ComputeEnginePreferences) ProtoMessage() {} func (x *ComputeEnginePreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12686,11 +12408,9 @@ type MachinePreferences struct { func (x *MachinePreferences) Reset() { *x = MachinePreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachinePreferences) String() string { @@ -12701,7 +12421,7 @@ func (*MachinePreferences) ProtoMessage() {} func (x *MachinePreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12737,11 +12457,9 @@ type MachineSeries struct { func (x *MachineSeries) Reset() { *x = MachineSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineSeries) String() string { @@ -12752,7 +12470,7 @@ func (*MachineSeries) ProtoMessage() {} func (x *MachineSeries) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12804,11 +12522,9 @@ type VmwareEnginePreferences struct { func (x *VmwareEnginePreferences) Reset() { *x = VmwareEnginePreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareEnginePreferences) String() string { @@ -12819,7 +12535,7 @@ func (*VmwareEnginePreferences) ProtoMessage() {} func (x *VmwareEnginePreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12885,11 +12601,9 @@ type SoleTenancyPreferences struct { func (x *SoleTenancyPreferences) Reset() { *x = SoleTenancyPreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoleTenancyPreferences) String() string { @@ -12900,7 +12614,7 @@ func (*SoleTenancyPreferences) ProtoMessage() {} func (x *SoleTenancyPreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12956,11 +12670,9 @@ type SoleTenantNodeType struct { func (x *SoleTenantNodeType) Reset() { *x = SoleTenantNodeType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoleTenantNodeType) String() string { @@ -12971,7 +12683,7 @@ func (*SoleTenantNodeType) ProtoMessage() {} func (x *SoleTenantNodeType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13009,11 +12721,9 @@ type RegionPreferences struct { func (x *RegionPreferences) Reset() { *x = RegionPreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionPreferences) String() string { @@ -13024,7 +12734,7 @@ func (*RegionPreferences) ProtoMessage() {} func (x *RegionPreferences) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13060,11 +12770,9 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings) String() string { @@ -13075,7 +12783,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13119,11 +12827,9 @@ type ReportSummary struct { func (x *ReportSummary) Reset() { *x = ReportSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary) String() string { @@ -13134,7 +12840,7 @@ func (*ReportSummary) ProtoMessage() {} func (x *ReportSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13177,11 +12883,9 @@ type ReportConfig_GroupPreferenceSetAssignment struct { func (x *ReportConfig_GroupPreferenceSetAssignment) Reset() { *x = ReportConfig_GroupPreferenceSetAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportConfig_GroupPreferenceSetAssignment) String() string { @@ -13192,7 +12896,7 @@ func (*ReportConfig_GroupPreferenceSetAssignment) ProtoMessage() {} func (x *ReportConfig_GroupPreferenceSetAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13239,11 +12943,9 @@ type DailyResourceUsageAggregation_Stats struct { func (x *DailyResourceUsageAggregation_Stats) Reset() { *x = DailyResourceUsageAggregation_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation_Stats) String() string { @@ -13254,7 +12956,7 @@ func (*DailyResourceUsageAggregation_Stats) ProtoMessage() {} func (x *DailyResourceUsageAggregation_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13309,11 +13011,9 @@ type DailyResourceUsageAggregation_CPU struct { func (x *DailyResourceUsageAggregation_CPU) Reset() { *x = DailyResourceUsageAggregation_CPU{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation_CPU) String() string { @@ -13324,7 +13024,7 @@ func (*DailyResourceUsageAggregation_CPU) ProtoMessage() {} func (x *DailyResourceUsageAggregation_CPU) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13358,11 +13058,9 @@ type DailyResourceUsageAggregation_Memory struct { func (x *DailyResourceUsageAggregation_Memory) Reset() { *x = DailyResourceUsageAggregation_Memory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation_Memory) String() string { @@ -13373,7 +13071,7 @@ func (*DailyResourceUsageAggregation_Memory) ProtoMessage() {} func (x *DailyResourceUsageAggregation_Memory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13409,11 +13107,9 @@ type DailyResourceUsageAggregation_Network struct { func (x *DailyResourceUsageAggregation_Network) Reset() { *x = DailyResourceUsageAggregation_Network{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation_Network) String() string { @@ -13424,7 +13120,7 @@ func (*DailyResourceUsageAggregation_Network) ProtoMessage() {} func (x *DailyResourceUsageAggregation_Network) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13465,11 +13161,9 @@ type DailyResourceUsageAggregation_Disk struct { func (x *DailyResourceUsageAggregation_Disk) Reset() { *x = DailyResourceUsageAggregation_Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailyResourceUsageAggregation_Disk) String() string { @@ -13480,7 +13174,7 @@ func (*DailyResourceUsageAggregation_Disk) ProtoMessage() {} func (x *DailyResourceUsageAggregation_Disk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13511,11 +13205,9 @@ type Aggregation_Count struct { func (x *Aggregation_Count) Reset() { *x = Aggregation_Count{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[160] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[160] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation_Count) String() string { @@ -13526,7 +13218,7 @@ func (*Aggregation_Count) ProtoMessage() {} func (x *Aggregation_Count) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[160] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13550,11 +13242,9 @@ type Aggregation_Sum struct { func (x *Aggregation_Sum) Reset() { *x = Aggregation_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation_Sum) String() string { @@ -13565,7 +13255,7 @@ func (*Aggregation_Sum) ProtoMessage() {} func (x *Aggregation_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13600,11 +13290,9 @@ type Aggregation_Histogram struct { func (x *Aggregation_Histogram) Reset() { *x = Aggregation_Histogram{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[162] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[162] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation_Histogram) String() string { @@ -13615,7 +13303,7 @@ func (*Aggregation_Histogram) ProtoMessage() {} func (x *Aggregation_Histogram) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[162] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13646,11 +13334,9 @@ type Aggregation_Frequency struct { func (x *Aggregation_Frequency) Reset() { *x = Aggregation_Frequency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[163] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[163] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation_Frequency) String() string { @@ -13661,7 +13347,7 @@ func (*Aggregation_Frequency) ProtoMessage() {} func (x *Aggregation_Frequency) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[163] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13687,11 +13373,9 @@ type AggregationResult_Count struct { func (x *AggregationResult_Count) Reset() { *x = AggregationResult_Count{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult_Count) String() string { @@ -13702,7 +13386,7 @@ func (*AggregationResult_Count) ProtoMessage() {} func (x *AggregationResult_Count) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13735,11 +13419,9 @@ type AggregationResult_Sum struct { func (x *AggregationResult_Sum) Reset() { *x = AggregationResult_Sum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult_Sum) String() string { @@ -13750,7 +13432,7 @@ func (*AggregationResult_Sum) ProtoMessage() {} func (x *AggregationResult_Sum) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13788,11 +13470,9 @@ type AggregationResult_Histogram struct { func (x *AggregationResult_Histogram) Reset() { *x = AggregationResult_Histogram{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult_Histogram) String() string { @@ -13803,7 +13483,7 @@ func (*AggregationResult_Histogram) ProtoMessage() {} func (x *AggregationResult_Histogram) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13836,11 +13516,9 @@ type AggregationResult_Frequency struct { func (x *AggregationResult_Frequency) Reset() { *x = AggregationResult_Frequency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult_Frequency) String() string { @@ -13851,7 +13529,7 @@ func (*AggregationResult_Frequency) ProtoMessage() {} func (x *AggregationResult_Frequency) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13892,11 +13570,9 @@ type AggregationResult_Histogram_Bucket struct { func (x *AggregationResult_Histogram_Bucket) Reset() { *x = AggregationResult_Histogram_Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregationResult_Histogram_Bucket) String() string { @@ -13907,7 +13583,7 @@ func (*AggregationResult_Histogram_Bucket) ProtoMessage() {} func (x *AggregationResult_Histogram_Bucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13957,11 +13633,9 @@ type ReportSummary_ChartData struct { func (x *ReportSummary_ChartData) Reset() { *x = ReportSummary_ChartData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_ChartData) String() string { @@ -13972,7 +13646,7 @@ func (*ReportSummary_ChartData) ProtoMessage() {} func (x *ReportSummary_ChartData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14009,11 +13683,9 @@ type ReportSummary_UtilizationChartData struct { func (x *ReportSummary_UtilizationChartData) Reset() { *x = ReportSummary_UtilizationChartData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_UtilizationChartData) String() string { @@ -14024,7 +13696,7 @@ func (*ReportSummary_UtilizationChartData) ProtoMessage() {} func (x *ReportSummary_UtilizationChartData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14070,11 +13742,9 @@ type ReportSummary_HistogramChartData struct { func (x *ReportSummary_HistogramChartData) Reset() { *x = ReportSummary_HistogramChartData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_HistogramChartData) String() string { @@ -14085,7 +13755,7 @@ func (*ReportSummary_HistogramChartData) ProtoMessage() {} func (x *ReportSummary_HistogramChartData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14137,11 +13807,9 @@ type ReportSummary_AssetAggregateStats struct { func (x *ReportSummary_AssetAggregateStats) Reset() { *x = ReportSummary_AssetAggregateStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_AssetAggregateStats) String() string { @@ -14152,7 +13820,7 @@ func (*ReportSummary_AssetAggregateStats) ProtoMessage() {} func (x *ReportSummary_AssetAggregateStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14252,11 +13920,9 @@ type ReportSummary_MachineSeriesAllocation struct { func (x *ReportSummary_MachineSeriesAllocation) Reset() { *x = ReportSummary_MachineSeriesAllocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_MachineSeriesAllocation) String() string { @@ -14267,7 +13933,7 @@ func (*ReportSummary_MachineSeriesAllocation) ProtoMessage() {} func (x *ReportSummary_MachineSeriesAllocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14314,11 +13980,9 @@ type ReportSummary_ComputeEngineFinding struct { func (x *ReportSummary_ComputeEngineFinding) Reset() { *x = ReportSummary_ComputeEngineFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[176] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[176] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_ComputeEngineFinding) String() string { @@ -14329,7 +13993,7 @@ func (*ReportSummary_ComputeEngineFinding) ProtoMessage() {} func (x *ReportSummary_ComputeEngineFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[176] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14388,11 +14052,9 @@ type ReportSummary_VmwareEngineFinding struct { func (x *ReportSummary_VmwareEngineFinding) Reset() { *x = ReportSummary_VmwareEngineFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[177] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[177] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_VmwareEngineFinding) String() string { @@ -14403,7 +14065,7 @@ func (*ReportSummary_VmwareEngineFinding) ProtoMessage() {} func (x *ReportSummary_VmwareEngineFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[177] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14455,11 +14117,9 @@ type ReportSummary_VmwareNodeAllocation struct { func (x *ReportSummary_VmwareNodeAllocation) Reset() { *x = ReportSummary_VmwareNodeAllocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[178] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[178] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_VmwareNodeAllocation) String() string { @@ -14470,7 +14130,7 @@ func (*ReportSummary_VmwareNodeAllocation) ProtoMessage() {} func (x *ReportSummary_VmwareNodeAllocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[178] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14520,11 +14180,9 @@ type ReportSummary_VmwareNode struct { func (x *ReportSummary_VmwareNode) Reset() { *x = ReportSummary_VmwareNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[179] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[179] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_VmwareNode) String() string { @@ -14535,7 +14193,7 @@ func (*ReportSummary_VmwareNode) ProtoMessage() {} func (x *ReportSummary_VmwareNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[179] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14573,11 +14231,9 @@ type ReportSummary_SoleTenantFinding struct { func (x *ReportSummary_SoleTenantFinding) Reset() { *x = ReportSummary_SoleTenantFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[180] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[180] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_SoleTenantFinding) String() string { @@ -14588,7 +14244,7 @@ func (*ReportSummary_SoleTenantFinding) ProtoMessage() {} func (x *ReportSummary_SoleTenantFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[180] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14640,11 +14296,9 @@ type ReportSummary_SoleTenantNodeAllocation struct { func (x *ReportSummary_SoleTenantNodeAllocation) Reset() { *x = ReportSummary_SoleTenantNodeAllocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[181] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[181] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_SoleTenantNodeAllocation) String() string { @@ -14655,7 +14309,7 @@ func (*ReportSummary_SoleTenantNodeAllocation) ProtoMessage() {} func (x *ReportSummary_SoleTenantNodeAllocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[181] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14725,11 +14379,9 @@ type ReportSummary_GroupPreferenceSetFinding struct { func (x *ReportSummary_GroupPreferenceSetFinding) Reset() { *x = ReportSummary_GroupPreferenceSetFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[182] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[182] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_GroupPreferenceSetFinding) String() string { @@ -14740,7 +14392,7 @@ func (*ReportSummary_GroupPreferenceSetFinding) ProtoMessage() {} func (x *ReportSummary_GroupPreferenceSetFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[182] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14861,11 +14513,9 @@ type ReportSummary_GroupFinding struct { func (x *ReportSummary_GroupFinding) Reset() { *x = ReportSummary_GroupFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[183] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[183] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_GroupFinding) String() string { @@ -14876,7 +14526,7 @@ func (*ReportSummary_GroupFinding) ProtoMessage() {} func (x *ReportSummary_GroupFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[183] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -14941,11 +14591,9 @@ type ReportSummary_ChartData_DataPoint struct { func (x *ReportSummary_ChartData_DataPoint) Reset() { *x = ReportSummary_ChartData_DataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[184] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[184] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_ChartData_DataPoint) String() string { @@ -14956,7 +14604,7 @@ func (*ReportSummary_ChartData_DataPoint) ProtoMessage() {} func (x *ReportSummary_ChartData_DataPoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[184] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15004,11 +14652,9 @@ type ReportSummary_HistogramChartData_Bucket struct { func (x *ReportSummary_HistogramChartData_Bucket) Reset() { *x = ReportSummary_HistogramChartData_Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[185] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[185] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportSummary_HistogramChartData_Bucket) String() string { @@ -15019,7 +14665,7 @@ func (*ReportSummary_HistogramChartData_Bucket) ProtoMessage() {} func (x *ReportSummary_HistogramChartData_Bucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[185] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -19045,2132 +18691,6 @@ func file_google_cloud_migrationcenter_v1_migrationcenter_proto_init() { if File_google_cloud_migrationcenter_v1_migrationcenter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PreferenceSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ErrorFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Report); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReportAssetFramesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ReportAssetFramesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AggregateAssetsValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AggregateAssetsValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListImportJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListImportJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeleteImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*UpdateImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ValidateImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*RunImportJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetImportDataFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListImportDataFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListImportDataFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*CreateImportDataFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteImportDataFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*CreateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AddAssetsToGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RemoveAssetsFromGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListErrorFramesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListErrorFramesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetErrorFrameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ListPreferenceSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ListPreferenceSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*GetPreferenceSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*CreatePreferenceSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePreferenceSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*DeletePreferenceSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*CreateReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*GetReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*ListReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ListReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*GetReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*ListReportConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ListReportConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*CreateReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*Frames); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*AssetFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*MachineDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*MachineArchitectureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*BiosDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*MachineNetworkDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAdapterList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAdapterDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAddressList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*NetworkAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*MachineDiskDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*DiskEntryList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*DiskEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*DiskPartitionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*DiskPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*VmwareDiskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*GuestOsDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*GuestConfigDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*FstabEntryList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*FstabEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*HostsEntryList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*HostsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*NfsExportList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*NfsExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*GuestRuntimeDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*RunningServiceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*RunningService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*RunningProcessList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*RunningProcess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeNetworkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConnectionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*GuestInstalledApplicationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*GuestInstalledApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*OpenFileList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*OpenFileDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*PlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*VmwarePlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*AwsEc2PlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*AzureVmPlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*GenericPlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*PhysicalPlatformDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*MemoryUsageSample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*CpuUsageSample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*NetworkUsageSample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*DiskUsageSample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*PerformanceSample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*AssetPerformanceData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*InsightList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*Insight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*GenericInsight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*MigrationInsight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*ComputeEngineMigrationTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*ComputeEngineShapeDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*ComputeStorageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*FitDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*FileValidationReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*ValidationReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*ImportError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*ImportRowError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*UploadFileInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*AssetList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*FrameViolationEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*VirtualMachinePreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*ComputeEnginePreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*MachinePreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*MachineSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*VmwareEnginePreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*SoleTenancyPreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*SoleTenantNodeType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*RegionPreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*ReportConfig_GroupPreferenceSetAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation_CPU); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation_Memory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation_Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*DailyResourceUsageAggregation_Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[160].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation_Count); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[162].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation_Histogram); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[163].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation_Frequency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult_Count); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult_Sum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult_Histogram); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult_Frequency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*AggregationResult_Histogram_Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_ChartData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_UtilizationChartData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_HistogramChartData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_AssetAggregateStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_MachineSeriesAllocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[176].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_ComputeEngineFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[177].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_VmwareEngineFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[178].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_VmwareNodeAllocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[179].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_VmwareNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[180].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_SoleTenantFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[181].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_SoleTenantNodeAllocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[182].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_GroupPreferenceSetFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[183].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_GroupFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[184].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_ChartData_DataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[185].Exporter = func(v any, i int) any { - switch v := v.(*ReportSummary_HistogramChartData_Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_migrationcenter_v1_migrationcenter_proto_msgTypes[0].OneofWrappers = []any{ (*Asset_MachineDetails)(nil), } diff --git a/monitoring/apiv3/v2/alert_policy_client.go b/monitoring/apiv3/v2/alert_policy_client.go index ae1dd6b9a233..c099e6fa9b74 100755 --- a/monitoring/apiv3/v2/alert_policy_client.go +++ b/monitoring/apiv3/v2/alert_policy_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -217,6 +218,8 @@ type alertPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAlertPolicyClient creates a new alert policy service client based on gRPC. @@ -251,6 +254,7 @@ func NewAlertPolicyClient(ctx context.Context, opts ...option.ClientOption) (*Al connPool: connPool, alertPolicyClient: monitoringpb.NewAlertPolicyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,7 +308,7 @@ func (c *alertPolicyGRPCClient) ListAlertPolicies(ctx context.Context, req *moni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alertPolicyClient.ListAlertPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alertPolicyClient.ListAlertPolicies, req, settings.GRPC, c.logger, "ListAlertPolicies") return err }, opts...) if err != nil { @@ -339,7 +343,7 @@ func (c *alertPolicyGRPCClient) GetAlertPolicy(ctx context.Context, req *monitor var resp *monitoringpb.AlertPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alertPolicyClient.GetAlertPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alertPolicyClient.GetAlertPolicy, req, settings.GRPC, c.logger, "GetAlertPolicy") return err }, opts...) if err != nil { @@ -357,7 +361,7 @@ func (c *alertPolicyGRPCClient) CreateAlertPolicy(ctx context.Context, req *moni var resp *monitoringpb.AlertPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alertPolicyClient.CreateAlertPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alertPolicyClient.CreateAlertPolicy, req, settings.GRPC, c.logger, "CreateAlertPolicy") return err }, opts...) if err != nil { @@ -374,7 +378,7 @@ func (c *alertPolicyGRPCClient) DeleteAlertPolicy(ctx context.Context, req *moni opts = append((*c.CallOptions).DeleteAlertPolicy[0:len((*c.CallOptions).DeleteAlertPolicy):len((*c.CallOptions).DeleteAlertPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.alertPolicyClient.DeleteAlertPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.alertPolicyClient.DeleteAlertPolicy, req, settings.GRPC, c.logger, "DeleteAlertPolicy") return err }, opts...) return err @@ -389,7 +393,7 @@ func (c *alertPolicyGRPCClient) UpdateAlertPolicy(ctx context.Context, req *moni var resp *monitoringpb.AlertPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.alertPolicyClient.UpdateAlertPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.alertPolicyClient.UpdateAlertPolicy, req, settings.GRPC, c.logger, "UpdateAlertPolicy") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/alert_policy_client_example_go123_test.go b/monitoring/apiv3/v2/alert_policy_client_example_go123_test.go index 06642aedcfe7..401fdecb855b 100644 --- a/monitoring/apiv3/v2/alert_policy_client_example_go123_test.go +++ b/monitoring/apiv3/v2/alert_policy_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAlertPolicyClient_ListAlertPolicies_all() { } for resp, err := range c.ListAlertPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/group_client.go b/monitoring/apiv3/v2/group_client.go index da216081d5a3..e7e51bf789ca 100755 --- a/monitoring/apiv3/v2/group_client.go +++ b/monitoring/apiv3/v2/group_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -235,6 +236,8 @@ type groupGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGroupClient creates a new group service client based on gRPC. @@ -272,6 +275,7 @@ func NewGroupClient(ctx context.Context, opts ...option.ClientOption) (*GroupCli connPool: connPool, groupClient: monitoringpb.NewGroupServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -325,7 +329,7 @@ func (c *groupGRPCClient) ListGroups(ctx context.Context, req *monitoringpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groupClient.ListGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groupClient.ListGroups, req, settings.GRPC, c.logger, "ListGroups") return err }, opts...) if err != nil { @@ -360,7 +364,7 @@ func (c *groupGRPCClient) GetGroup(ctx context.Context, req *monitoringpb.GetGro var resp *monitoringpb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groupClient.GetGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groupClient.GetGroup, req, settings.GRPC, c.logger, "GetGroup") return err }, opts...) if err != nil { @@ -378,7 +382,7 @@ func (c *groupGRPCClient) CreateGroup(ctx context.Context, req *monitoringpb.Cre var resp *monitoringpb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groupClient.CreateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groupClient.CreateGroup, req, settings.GRPC, c.logger, "CreateGroup") return err }, opts...) if err != nil { @@ -396,7 +400,7 @@ func (c *groupGRPCClient) UpdateGroup(ctx context.Context, req *monitoringpb.Upd var resp *monitoringpb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groupClient.UpdateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groupClient.UpdateGroup, req, settings.GRPC, c.logger, "UpdateGroup") return err }, opts...) if err != nil { @@ -413,7 +417,7 @@ func (c *groupGRPCClient) DeleteGroup(ctx context.Context, req *monitoringpb.Del opts = append((*c.CallOptions).DeleteGroup[0:len((*c.CallOptions).DeleteGroup):len((*c.CallOptions).DeleteGroup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.groupClient.DeleteGroup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.groupClient.DeleteGroup, req, settings.GRPC, c.logger, "DeleteGroup") return err }, opts...) return err @@ -439,7 +443,7 @@ func (c *groupGRPCClient) ListGroupMembers(ctx context.Context, req *monitoringp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.groupClient.ListGroupMembers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.groupClient.ListGroupMembers, req, settings.GRPC, c.logger, "ListGroupMembers") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/group_client_example_go123_test.go b/monitoring/apiv3/v2/group_client_example_go123_test.go index ecc21333c22f..688c65b8ace0 100644 --- a/monitoring/apiv3/v2/group_client_example_go123_test.go +++ b/monitoring/apiv3/v2/group_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGroupClient_ListGroupMembers_all() { } for resp, err := range c.ListGroupMembers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleGroupClient_ListGroups_all() { } for resp, err := range c.ListGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/helpers.go b/monitoring/apiv3/v2/helpers.go index 7bc42109da87..7eb0121796c0 100755 --- a/monitoring/apiv3/v2/helpers.go +++ b/monitoring/apiv3/v2/helpers.go @@ -18,10 +18,16 @@ package monitoring import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "monitoring.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +51,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/monitoring.write", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/monitoring/apiv3/v2/metric_client.go b/monitoring/apiv3/v2/metric_client.go index d43d261d185a..f5d405050c53 100755 --- a/monitoring/apiv3/v2/metric_client.go +++ b/monitoring/apiv3/v2/metric_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -283,6 +284,8 @@ type metricGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetricClient creates a new metric service client based on gRPC. @@ -310,6 +313,7 @@ func NewMetricClient(ctx context.Context, opts ...option.ClientOption) (*MetricC connPool: connPool, metricClient: monitoringpb.NewMetricServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -363,7 +367,7 @@ func (c *metricGRPCClient) ListMonitoredResourceDescriptors(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.ListMonitoredResourceDescriptors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.ListMonitoredResourceDescriptors, req, settings.GRPC, c.logger, "ListMonitoredResourceDescriptors") return err }, opts...) if err != nil { @@ -398,7 +402,7 @@ func (c *metricGRPCClient) GetMonitoredResourceDescriptor(ctx context.Context, r var resp *monitoredrespb.MonitoredResourceDescriptor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.GetMonitoredResourceDescriptor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.GetMonitoredResourceDescriptor, req, settings.GRPC, c.logger, "GetMonitoredResourceDescriptor") return err }, opts...) if err != nil { @@ -427,7 +431,7 @@ func (c *metricGRPCClient) ListMetricDescriptors(ctx context.Context, req *monit } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.ListMetricDescriptors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.ListMetricDescriptors, req, settings.GRPC, c.logger, "ListMetricDescriptors") return err }, opts...) if err != nil { @@ -462,7 +466,7 @@ func (c *metricGRPCClient) GetMetricDescriptor(ctx context.Context, req *monitor var resp *metricpb.MetricDescriptor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.GetMetricDescriptor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.GetMetricDescriptor, req, settings.GRPC, c.logger, "GetMetricDescriptor") return err }, opts...) if err != nil { @@ -480,7 +484,7 @@ func (c *metricGRPCClient) CreateMetricDescriptor(ctx context.Context, req *moni var resp *metricpb.MetricDescriptor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.CreateMetricDescriptor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.CreateMetricDescriptor, req, settings.GRPC, c.logger, "CreateMetricDescriptor") return err }, opts...) if err != nil { @@ -497,7 +501,7 @@ func (c *metricGRPCClient) DeleteMetricDescriptor(ctx context.Context, req *moni opts = append((*c.CallOptions).DeleteMetricDescriptor[0:len((*c.CallOptions).DeleteMetricDescriptor):len((*c.CallOptions).DeleteMetricDescriptor)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metricClient.DeleteMetricDescriptor(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metricClient.DeleteMetricDescriptor, req, settings.GRPC, c.logger, "DeleteMetricDescriptor") return err }, opts...) return err @@ -523,7 +527,7 @@ func (c *metricGRPCClient) ListTimeSeries(ctx context.Context, req *monitoringpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricClient.ListTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricClient.ListTimeSeries, req, settings.GRPC, c.logger, "ListTimeSeries") return err }, opts...) if err != nil { @@ -557,7 +561,7 @@ func (c *metricGRPCClient) CreateTimeSeries(ctx context.Context, req *monitoring opts = append((*c.CallOptions).CreateTimeSeries[0:len((*c.CallOptions).CreateTimeSeries):len((*c.CallOptions).CreateTimeSeries)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metricClient.CreateTimeSeries(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metricClient.CreateTimeSeries, req, settings.GRPC, c.logger, "CreateTimeSeries") return err }, opts...) return err @@ -571,7 +575,7 @@ func (c *metricGRPCClient) CreateServiceTimeSeries(ctx context.Context, req *mon opts = append((*c.CallOptions).CreateServiceTimeSeries[0:len((*c.CallOptions).CreateServiceTimeSeries):len((*c.CallOptions).CreateServiceTimeSeries)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.metricClient.CreateServiceTimeSeries(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.metricClient.CreateServiceTimeSeries, req, settings.GRPC, c.logger, "CreateServiceTimeSeries") return err }, opts...) return err diff --git a/monitoring/apiv3/v2/metric_client_example_go123_test.go b/monitoring/apiv3/v2/metric_client_example_go123_test.go index 29e24b7a1463..09081082a019 100644 --- a/monitoring/apiv3/v2/metric_client_example_go123_test.go +++ b/monitoring/apiv3/v2/metric_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMetricClient_ListMetricDescriptors_all() { } for resp, err := range c.ListMetricDescriptors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleMetricClient_ListMonitoredResourceDescriptors_all() { } for resp, err := range c.ListMonitoredResourceDescriptors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleMetricClient_ListTimeSeries_all() { } for resp, err := range c.ListTimeSeries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/monitoringpb/alert.pb.go b/monitoring/apiv3/v2/monitoringpb/alert.pb.go index 17c383ca8090..a332ebdc97a0 100755 --- a/monitoring/apiv3/v2/monitoringpb/alert.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/alert.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/alert.proto @@ -381,11 +381,9 @@ type AlertPolicy struct { func (x *AlertPolicy) Reset() { *x = AlertPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy) String() string { @@ -396,7 +394,7 @@ func (*AlertPolicy) ProtoMessage() {} func (x *AlertPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +538,9 @@ type AlertPolicy_Documentation struct { func (x *AlertPolicy_Documentation) Reset() { *x = AlertPolicy_Documentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Documentation) String() string { @@ -555,7 +551,7 @@ func (*AlertPolicy_Documentation) ProtoMessage() {} func (x *AlertPolicy_Documentation) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +646,9 @@ type AlertPolicy_Condition struct { func (x *AlertPolicy_Condition) Reset() { *x = AlertPolicy_Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition) String() string { @@ -665,7 +659,7 @@ func (*AlertPolicy_Condition) ProtoMessage() {} func (x *AlertPolicy_Condition) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +798,9 @@ type AlertPolicy_AlertStrategy struct { func (x *AlertPolicy_AlertStrategy) Reset() { *x = AlertPolicy_AlertStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_AlertStrategy) String() string { @@ -819,7 +811,7 @@ func (*AlertPolicy_AlertStrategy) ProtoMessage() {} func (x *AlertPolicy_AlertStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +873,9 @@ type AlertPolicy_Documentation_Link struct { func (x *AlertPolicy_Documentation_Link) Reset() { *x = AlertPolicy_Documentation_Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Documentation_Link) String() string { @@ -896,7 +886,7 @@ func (*AlertPolicy_Documentation_Link) ProtoMessage() {} func (x *AlertPolicy_Documentation_Link) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +933,9 @@ type AlertPolicy_Condition_Trigger struct { func (x *AlertPolicy_Condition_Trigger) Reset() { *x = AlertPolicy_Condition_Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_Trigger) String() string { @@ -958,7 +946,7 @@ func (*AlertPolicy_Condition_Trigger) ProtoMessage() {} func (x *AlertPolicy_Condition_Trigger) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1095,9 @@ type AlertPolicy_Condition_MetricThreshold struct { func (x *AlertPolicy_Condition_MetricThreshold) Reset() { *x = AlertPolicy_Condition_MetricThreshold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_MetricThreshold) String() string { @@ -1122,7 +1108,7 @@ func (*AlertPolicy_Condition_MetricThreshold) ProtoMessage() {} func (x *AlertPolicy_Condition_MetricThreshold) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1244,9 @@ type AlertPolicy_Condition_MetricAbsence struct { func (x *AlertPolicy_Condition_MetricAbsence) Reset() { *x = AlertPolicy_Condition_MetricAbsence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_MetricAbsence) String() string { @@ -1273,7 +1257,7 @@ func (*AlertPolicy_Condition_MetricAbsence) ProtoMessage() {} func (x *AlertPolicy_Condition_MetricAbsence) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1329,9 @@ type AlertPolicy_Condition_LogMatch struct { func (x *AlertPolicy_Condition_LogMatch) Reset() { *x = AlertPolicy_Condition_LogMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_LogMatch) String() string { @@ -1360,7 +1342,7 @@ func (*AlertPolicy_Condition_LogMatch) ProtoMessage() {} func (x *AlertPolicy_Condition_LogMatch) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1406,9 @@ type AlertPolicy_Condition_MonitoringQueryLanguageCondition struct { func (x *AlertPolicy_Condition_MonitoringQueryLanguageCondition) Reset() { *x = AlertPolicy_Condition_MonitoringQueryLanguageCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_MonitoringQueryLanguageCondition) String() string { @@ -1439,7 +1419,7 @@ func (*AlertPolicy_Condition_MonitoringQueryLanguageCondition) ProtoMessage() {} func (x *AlertPolicy_Condition_MonitoringQueryLanguageCondition) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1575,11 +1555,9 @@ type AlertPolicy_Condition_PrometheusQueryLanguageCondition struct { func (x *AlertPolicy_Condition_PrometheusQueryLanguageCondition) Reset() { *x = AlertPolicy_Condition_PrometheusQueryLanguageCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_PrometheusQueryLanguageCondition) String() string { @@ -1590,7 +1568,7 @@ func (*AlertPolicy_Condition_PrometheusQueryLanguageCondition) ProtoMessage() {} func (x *AlertPolicy_Condition_PrometheusQueryLanguageCondition) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1665,11 +1643,9 @@ type AlertPolicy_Condition_MetricThreshold_ForecastOptions struct { func (x *AlertPolicy_Condition_MetricThreshold_ForecastOptions) Reset() { *x = AlertPolicy_Condition_MetricThreshold_ForecastOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_Condition_MetricThreshold_ForecastOptions) String() string { @@ -1680,7 +1656,7 @@ func (*AlertPolicy_Condition_MetricThreshold_ForecastOptions) ProtoMessage() {} func (x *AlertPolicy_Condition_MetricThreshold_ForecastOptions) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1691,9 @@ type AlertPolicy_AlertStrategy_NotificationRateLimit struct { func (x *AlertPolicy_AlertStrategy_NotificationRateLimit) Reset() { *x = AlertPolicy_AlertStrategy_NotificationRateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_AlertStrategy_NotificationRateLimit) String() string { @@ -1730,7 +1704,7 @@ func (*AlertPolicy_AlertStrategy_NotificationRateLimit) ProtoMessage() {} func (x *AlertPolicy_AlertStrategy_NotificationRateLimit) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1774,11 +1748,9 @@ type AlertPolicy_AlertStrategy_NotificationChannelStrategy struct { func (x *AlertPolicy_AlertStrategy_NotificationChannelStrategy) Reset() { *x = AlertPolicy_AlertStrategy_NotificationChannelStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertPolicy_AlertStrategy_NotificationChannelStrategy) String() string { @@ -1789,7 +1761,7 @@ func (*AlertPolicy_AlertStrategy_NotificationChannelStrategy) ProtoMessage() {} func (x *AlertPolicy_AlertStrategy_NotificationChannelStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2310,176 +2282,6 @@ func file_google_monitoring_v3_alert_proto_init() { } file_google_monitoring_v3_common_proto_init() file_google_monitoring_v3_mutation_record_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_alert_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Documentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_AlertStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Documentation_Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_MetricThreshold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_MetricAbsence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_LogMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_MonitoringQueryLanguageCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_PrometheusQueryLanguageCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_Condition_MetricThreshold_ForecastOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_AlertStrategy_NotificationRateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AlertPolicy_AlertStrategy_NotificationChannelStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_alert_proto_msgTypes[2].OneofWrappers = []any{ (*AlertPolicy_Condition_ConditionThreshold)(nil), (*AlertPolicy_Condition_ConditionAbsent)(nil), diff --git a/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go b/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go index b45b4ec85174..02103f8cd491 100755 --- a/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/alert_service.proto @@ -70,11 +70,9 @@ type CreateAlertPolicyRequest struct { func (x *CreateAlertPolicyRequest) Reset() { *x = CreateAlertPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAlertPolicyRequest) String() string { @@ -85,7 +83,7 @@ func (*CreateAlertPolicyRequest) ProtoMessage() {} func (x *CreateAlertPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type GetAlertPolicyRequest struct { func (x *GetAlertPolicyRequest) Reset() { *x = GetAlertPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAlertPolicyRequest) String() string { @@ -143,7 +139,7 @@ func (*GetAlertPolicyRequest) ProtoMessage() {} func (x *GetAlertPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type ListAlertPoliciesRequest struct { func (x *ListAlertPoliciesRequest) Reset() { *x = ListAlertPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAlertPoliciesRequest) String() string { @@ -222,7 +216,7 @@ func (*ListAlertPoliciesRequest) ProtoMessage() {} func (x *ListAlertPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +285,9 @@ type ListAlertPoliciesResponse struct { func (x *ListAlertPoliciesResponse) Reset() { *x = ListAlertPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAlertPoliciesResponse) String() string { @@ -306,7 +298,7 @@ func (*ListAlertPoliciesResponse) ProtoMessage() {} func (x *ListAlertPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +371,9 @@ type UpdateAlertPolicyRequest struct { func (x *UpdateAlertPolicyRequest) Reset() { *x = UpdateAlertPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAlertPolicyRequest) String() string { @@ -394,7 +384,7 @@ func (*UpdateAlertPolicyRequest) ProtoMessage() {} func (x *UpdateAlertPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +429,9 @@ type DeleteAlertPolicyRequest struct { func (x *DeleteAlertPolicyRequest) Reset() { *x = DeleteAlertPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAlertPolicyRequest) String() string { @@ -454,7 +442,7 @@ func (*DeleteAlertPolicyRequest) ProtoMessage() {} func (x *DeleteAlertPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_alert_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,80 +676,6 @@ func file_google_monitoring_v3_alert_service_proto_init() { return } file_google_monitoring_v3_alert_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_alert_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAlertPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAlertPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAlertPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAlertPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAlertPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_alert_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAlertPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/common.pb.go b/monitoring/apiv3/v2/monitoringpb/common.pb.go index c9aa5a02472a..e301262a2fa7 100755 --- a/monitoring/apiv3/v2/monitoringpb/common.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/common.proto @@ -558,11 +558,9 @@ type TypedValue struct { func (x *TypedValue) Reset() { *x = TypedValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TypedValue) String() string { @@ -573,7 +571,7 @@ func (*TypedValue) ProtoMessage() {} func (x *TypedValue) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +722,9 @@ type TimeInterval struct { func (x *TimeInterval) Reset() { *x = TimeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeInterval) String() string { @@ -739,7 +735,7 @@ func (*TimeInterval) ProtoMessage() {} func (x *TimeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +860,9 @@ type Aggregation struct { func (x *Aggregation) Reset() { *x = Aggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation) String() string { @@ -879,7 +873,7 @@ func (*Aggregation) ProtoMessage() {} func (x *Aggregation) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,44 +1092,6 @@ func file_google_monitoring_v3_common_proto_init() { if File_google_monitoring_v3_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TypedValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_common_proto_msgTypes[0].OneofWrappers = []any{ (*TypedValue_BoolValue)(nil), (*TypedValue_Int64Value)(nil), diff --git a/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go b/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go index 7b1dc962da8a..0dbf58e43516 100755 --- a/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/dropped_labels.proto @@ -62,11 +62,9 @@ type DroppedLabels struct { func (x *DroppedLabels) Reset() { *x = DroppedLabels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_dropped_labels_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_dropped_labels_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DroppedLabels) String() string { @@ -77,7 +75,7 @@ func (*DroppedLabels) ProtoMessage() {} func (x *DroppedLabels) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_dropped_labels_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,20 +160,6 @@ func file_google_monitoring_v3_dropped_labels_proto_init() { if File_google_monitoring_v3_dropped_labels_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_dropped_labels_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DroppedLabels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/group.pb.go b/monitoring/apiv3/v2/monitoringpb/group.pb.go index dff27f9d8ce2..11d1a62d35b9 100755 --- a/monitoring/apiv3/v2/monitoringpb/group.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/group.proto @@ -93,11 +93,9 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Group) String() string { @@ -108,7 +106,7 @@ func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,20 +228,6 @@ func file_google_monitoring_v3_group_proto_init() { if File_google_monitoring_v3_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/group_service.pb.go b/monitoring/apiv3/v2/monitoringpb/group_service.pb.go index 46747d906438..3cfa112bb450 100755 --- a/monitoring/apiv3/v2/monitoringpb/group_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/group_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/group_service.proto @@ -74,11 +74,9 @@ type ListGroupsRequest struct { func (x *ListGroupsRequest) Reset() { *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsRequest) String() string { @@ -89,7 +87,7 @@ func (*ListGroupsRequest) ProtoMessage() {} func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,11 +210,9 @@ type ListGroupsResponse struct { func (x *ListGroupsResponse) Reset() { *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsResponse) String() string { @@ -227,7 +223,7 @@ func (*ListGroupsResponse) ProtoMessage() {} func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +266,9 @@ type GetGroupRequest struct { func (x *GetGroupRequest) Reset() { *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGroupRequest) String() string { @@ -285,7 +279,7 @@ func (*GetGroupRequest) ProtoMessage() {} func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +322,9 @@ type CreateGroupRequest struct { func (x *CreateGroupRequest) Reset() { *x = CreateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGroupRequest) String() string { @@ -343,7 +335,7 @@ func (*CreateGroupRequest) ProtoMessage() {} func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +387,9 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGroupRequest) String() string { @@ -410,7 +400,7 @@ func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +448,9 @@ type DeleteGroupRequest struct { func (x *DeleteGroupRequest) Reset() { *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGroupRequest) String() string { @@ -473,7 +461,7 @@ func (*DeleteGroupRequest) ProtoMessage() {} func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +524,9 @@ type ListGroupMembersRequest struct { func (x *ListGroupMembersRequest) Reset() { *x = ListGroupMembersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupMembersRequest) String() string { @@ -551,7 +537,7 @@ func (*ListGroupMembersRequest) ProtoMessage() {} func (x *ListGroupMembersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +605,9 @@ type ListGroupMembersResponse struct { func (x *ListGroupMembersResponse) Reset() { *x = ListGroupMembersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_group_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_group_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupMembersResponse) String() string { @@ -634,7 +618,7 @@ func (*ListGroupMembersResponse) ProtoMessage() {} func (x *ListGroupMembersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_group_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -921,104 +905,6 @@ func file_google_monitoring_v3_group_service_proto_init() { } file_google_monitoring_v3_common_proto_init() file_google_monitoring_v3_group_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_group_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupMembersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_group_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupMembersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_group_service_proto_msgTypes[0].OneofWrappers = []any{ (*ListGroupsRequest_ChildrenOfGroup)(nil), (*ListGroupsRequest_AncestorsOfGroup)(nil), diff --git a/monitoring/apiv3/v2/monitoringpb/metric.pb.go b/monitoring/apiv3/v2/monitoringpb/metric.pb.go index b22c22d07e55..e1c37bd59a2b 100755 --- a/monitoring/apiv3/v2/monitoringpb/metric.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/metric.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/metric.proto @@ -60,11 +60,9 @@ type Point struct { func (x *Point) Reset() { *x = Point{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Point) String() string { @@ -75,7 +73,7 @@ func (*Point) ProtoMessage() {} func (x *Point) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type TimeSeries struct { func (x *TimeSeries) Reset() { *x = TimeSeries{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeries) String() string { @@ -174,7 +170,7 @@ func (*TimeSeries) ProtoMessage() {} func (x *TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +248,9 @@ type TimeSeriesDescriptor struct { func (x *TimeSeriesDescriptor) Reset() { *x = TimeSeriesDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesDescriptor) String() string { @@ -267,7 +261,7 @@ func (*TimeSeriesDescriptor) ProtoMessage() {} func (x *TimeSeriesDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type TimeSeriesData struct { func (x *TimeSeriesData) Reset() { *x = TimeSeriesData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesData) String() string { @@ -329,7 +321,7 @@ func (*TimeSeriesData) ProtoMessage() {} func (x *TimeSeriesData) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +368,9 @@ type LabelValue struct { func (x *LabelValue) Reset() { *x = LabelValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelValue) String() string { @@ -391,7 +381,7 @@ func (*LabelValue) ProtoMessage() {} func (x *LabelValue) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +464,9 @@ type QueryError struct { func (x *QueryError) Reset() { *x = QueryError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryError) String() string { @@ -489,7 +477,7 @@ func (*QueryError) ProtoMessage() {} func (x *QueryError) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +559,9 @@ type TextLocator struct { func (x *TextLocator) Reset() { *x = TextLocator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextLocator) String() string { @@ -586,7 +572,7 @@ func (*TextLocator) ProtoMessage() {} func (x *TextLocator) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +643,9 @@ type TimeSeriesDescriptor_ValueDescriptor struct { func (x *TimeSeriesDescriptor_ValueDescriptor) Reset() { *x = TimeSeriesDescriptor_ValueDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesDescriptor_ValueDescriptor) String() string { @@ -672,7 +656,7 @@ func (*TimeSeriesDescriptor_ValueDescriptor) ProtoMessage() {} func (x *TimeSeriesDescriptor_ValueDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +715,9 @@ type TimeSeriesData_PointData struct { func (x *TimeSeriesData_PointData) Reset() { *x = TimeSeriesData_PointData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesData_PointData) String() string { @@ -746,7 +728,7 @@ func (*TimeSeriesData_PointData) ProtoMessage() {} func (x *TimeSeriesData_PointData) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +772,9 @@ type TextLocator_Position struct { func (x *TextLocator_Position) Reset() { *x = TextLocator_Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextLocator_Position) String() string { @@ -805,7 +785,7 @@ func (*TextLocator_Position) ProtoMessage() {} func (x *TextLocator_Position) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,128 +1026,6 @@ func file_google_monitoring_v3_metric_proto_init() { return } file_google_monitoring_v3_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_metric_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Point); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LabelValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*QueryError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TextLocator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesDescriptor_ValueDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesData_PointData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TextLocator_Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_metric_proto_msgTypes[4].OneofWrappers = []any{ (*LabelValue_BoolValue)(nil), (*LabelValue_Int64Value)(nil), diff --git a/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go b/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go index 52e1c1e0b9ba..471746e08136 100755 --- a/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/metric_service.proto @@ -124,11 +124,9 @@ type ListMonitoredResourceDescriptorsRequest struct { func (x *ListMonitoredResourceDescriptorsRequest) Reset() { *x = ListMonitoredResourceDescriptorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMonitoredResourceDescriptorsRequest) String() string { @@ -139,7 +137,7 @@ func (*ListMonitoredResourceDescriptorsRequest) ProtoMessage() {} func (x *ListMonitoredResourceDescriptorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type ListMonitoredResourceDescriptorsResponse struct { func (x *ListMonitoredResourceDescriptorsResponse) Reset() { *x = ListMonitoredResourceDescriptorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMonitoredResourceDescriptorsResponse) String() string { @@ -214,7 +210,7 @@ func (*ListMonitoredResourceDescriptorsResponse) ProtoMessage() {} func (x *ListMonitoredResourceDescriptorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type GetMonitoredResourceDescriptorRequest struct { func (x *GetMonitoredResourceDescriptorRequest) Reset() { *x = GetMonitoredResourceDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMonitoredResourceDescriptorRequest) String() string { @@ -275,7 +269,7 @@ func (*GetMonitoredResourceDescriptorRequest) ProtoMessage() {} func (x *GetMonitoredResourceDescriptorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +324,9 @@ type ListMetricDescriptorsRequest struct { func (x *ListMetricDescriptorsRequest) Reset() { *x = ListMetricDescriptorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetricDescriptorsRequest) String() string { @@ -345,7 +337,7 @@ func (*ListMetricDescriptorsRequest) ProtoMessage() {} func (x *ListMetricDescriptorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +397,9 @@ type ListMetricDescriptorsResponse struct { func (x *ListMetricDescriptorsResponse) Reset() { *x = ListMetricDescriptorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetricDescriptorsResponse) String() string { @@ -420,7 +410,7 @@ func (*ListMetricDescriptorsResponse) ProtoMessage() {} func (x *ListMetricDescriptorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +457,9 @@ type GetMetricDescriptorRequest struct { func (x *GetMetricDescriptorRequest) Reset() { *x = GetMetricDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetricDescriptorRequest) String() string { @@ -482,7 +470,7 @@ func (*GetMetricDescriptorRequest) ProtoMessage() {} func (x *GetMetricDescriptorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +512,9 @@ type CreateMetricDescriptorRequest struct { func (x *CreateMetricDescriptorRequest) Reset() { *x = CreateMetricDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMetricDescriptorRequest) String() string { @@ -539,7 +525,7 @@ func (*CreateMetricDescriptorRequest) ProtoMessage() {} func (x *CreateMetricDescriptorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,11 +572,9 @@ type DeleteMetricDescriptorRequest struct { func (x *DeleteMetricDescriptorRequest) Reset() { *x = DeleteMetricDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMetricDescriptorRequest) String() string { @@ -601,7 +585,7 @@ func (*DeleteMetricDescriptorRequest) ProtoMessage() {} func (x *DeleteMetricDescriptorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +662,9 @@ type ListTimeSeriesRequest struct { func (x *ListTimeSeriesRequest) Reset() { *x = ListTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTimeSeriesRequest) String() string { @@ -693,7 +675,7 @@ func (*ListTimeSeriesRequest) ProtoMessage() {} func (x *ListTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +779,9 @@ type ListTimeSeriesResponse struct { func (x *ListTimeSeriesResponse) Reset() { *x = ListTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTimeSeriesResponse) String() string { @@ -812,7 +792,7 @@ func (*ListTimeSeriesResponse) ProtoMessage() {} func (x *ListTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -879,11 +859,9 @@ type CreateTimeSeriesRequest struct { func (x *CreateTimeSeriesRequest) Reset() { *x = CreateTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTimeSeriesRequest) String() string { @@ -894,7 +872,7 @@ func (*CreateTimeSeriesRequest) ProtoMessage() {} func (x *CreateTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +919,9 @@ type CreateTimeSeriesError struct { func (x *CreateTimeSeriesError) Reset() { *x = CreateTimeSeriesError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTimeSeriesError) String() string { @@ -956,7 +932,7 @@ func (*CreateTimeSeriesError) ProtoMessage() {} func (x *CreateTimeSeriesError) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,11 +979,9 @@ type CreateTimeSeriesSummary struct { func (x *CreateTimeSeriesSummary) Reset() { *x = CreateTimeSeriesSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTimeSeriesSummary) String() string { @@ -1018,7 +992,7 @@ func (*CreateTimeSeriesSummary) ProtoMessage() {} func (x *CreateTimeSeriesSummary) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,11 +1054,9 @@ type QueryTimeSeriesRequest struct { func (x *QueryTimeSeriesRequest) Reset() { *x = QueryTimeSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryTimeSeriesRequest) String() string { @@ -1095,7 +1067,7 @@ func (*QueryTimeSeriesRequest) ProtoMessage() {} func (x *QueryTimeSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,11 +1132,9 @@ type QueryTimeSeriesResponse struct { func (x *QueryTimeSeriesResponse) Reset() { *x = QueryTimeSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryTimeSeriesResponse) String() string { @@ -1175,7 +1145,7 @@ func (*QueryTimeSeriesResponse) ProtoMessage() {} func (x *QueryTimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1203,9 @@ type QueryErrorList struct { func (x *QueryErrorList) Reset() { *x = QueryErrorList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryErrorList) String() string { @@ -1248,7 +1216,7 @@ func (*QueryErrorList) ProtoMessage() {} func (x *QueryErrorList) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1259,9 @@ type CreateTimeSeriesSummary_Error struct { func (x *CreateTimeSeriesSummary_Error) Reset() { *x = CreateTimeSeriesSummary_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTimeSeriesSummary_Error) String() string { @@ -1306,7 +1272,7 @@ func (*CreateTimeSeriesSummary_Error) ProtoMessage() {} func (x *CreateTimeSeriesSummary_Error) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_metric_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,212 +1812,6 @@ func file_google_monitoring_v3_metric_service_proto_init() { } file_google_monitoring_v3_common_proto_init() file_google_monitoring_v3_metric_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_metric_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListMonitoredResourceDescriptorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListMonitoredResourceDescriptorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetMonitoredResourceDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListMetricDescriptorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListMetricDescriptorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetMetricDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateMetricDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMetricDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateTimeSeriesError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateTimeSeriesSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*QueryTimeSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*QueryTimeSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*QueryErrorList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_metric_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateTimeSeriesSummary_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go b/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go index 643b244e4d39..5fd4f3380759 100755 --- a/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/mutation_record.proto @@ -50,11 +50,9 @@ type MutationRecord struct { func (x *MutationRecord) Reset() { *x = MutationRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_mutation_record_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_mutation_record_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationRecord) String() string { @@ -65,7 +63,7 @@ func (*MutationRecord) ProtoMessage() {} func (x *MutationRecord) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_mutation_record_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_monitoring_v3_mutation_record_proto_init() { if File_google_monitoring_v3_mutation_record_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_mutation_record_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MutationRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/notification.pb.go b/monitoring/apiv3/v2/monitoringpb/notification.pb.go index fe0a9b5f73e9..48d69d1431dc 100755 --- a/monitoring/apiv3/v2/monitoringpb/notification.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/notification.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/notification.proto @@ -146,11 +146,9 @@ type NotificationChannelDescriptor struct { func (x *NotificationChannelDescriptor) Reset() { *x = NotificationChannelDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationChannelDescriptor) String() string { @@ -161,7 +159,7 @@ func (*NotificationChannelDescriptor) ProtoMessage() {} func (x *NotificationChannelDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +304,9 @@ type NotificationChannel struct { func (x *NotificationChannel) Reset() { *x = NotificationChannel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationChannel) String() string { @@ -321,7 +317,7 @@ func (*NotificationChannel) ProtoMessage() {} func (x *NotificationChannel) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,32 +597,6 @@ func file_google_monitoring_v3_notification_proto_init() { } file_google_monitoring_v3_common_proto_init() file_google_monitoring_v3_mutation_record_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_notification_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationChannelDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotificationChannel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go b/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go index 51f9af12b3fe..9ae6580b1b43 100755 --- a/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/notification_service.proto @@ -73,11 +73,9 @@ type ListNotificationChannelDescriptorsRequest struct { func (x *ListNotificationChannelDescriptorsRequest) Reset() { *x = ListNotificationChannelDescriptorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationChannelDescriptorsRequest) String() string { @@ -88,7 +86,7 @@ func (*ListNotificationChannelDescriptorsRequest) ProtoMessage() {} func (x *ListNotificationChannelDescriptorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,11 +140,9 @@ type ListNotificationChannelDescriptorsResponse struct { func (x *ListNotificationChannelDescriptorsResponse) Reset() { *x = ListNotificationChannelDescriptorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationChannelDescriptorsResponse) String() string { @@ -157,7 +153,7 @@ func (*ListNotificationChannelDescriptorsResponse) ProtoMessage() {} func (x *ListNotificationChannelDescriptorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +196,9 @@ type GetNotificationChannelDescriptorRequest struct { func (x *GetNotificationChannelDescriptorRequest) Reset() { *x = GetNotificationChannelDescriptorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationChannelDescriptorRequest) String() string { @@ -215,7 +209,7 @@ func (*GetNotificationChannelDescriptorRequest) ProtoMessage() {} func (x *GetNotificationChannelDescriptorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +254,9 @@ type CreateNotificationChannelRequest struct { func (x *CreateNotificationChannelRequest) Reset() { *x = CreateNotificationChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotificationChannelRequest) String() string { @@ -275,7 +267,7 @@ func (*CreateNotificationChannelRequest) ProtoMessage() {} func (x *CreateNotificationChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,11 +340,9 @@ type ListNotificationChannelsRequest struct { func (x *ListNotificationChannelsRequest) Reset() { *x = ListNotificationChannelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationChannelsRequest) String() string { @@ -363,7 +353,7 @@ func (*ListNotificationChannelsRequest) ProtoMessage() {} func (x *ListNotificationChannelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +423,9 @@ type ListNotificationChannelsResponse struct { func (x *ListNotificationChannelsResponse) Reset() { *x = ListNotificationChannelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationChannelsResponse) String() string { @@ -448,7 +436,7 @@ func (*ListNotificationChannelsResponse) ProtoMessage() {} func (x *ListNotificationChannelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +486,9 @@ type GetNotificationChannelRequest struct { func (x *GetNotificationChannelRequest) Reset() { *x = GetNotificationChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationChannelRequest) String() string { @@ -513,7 +499,7 @@ func (*GetNotificationChannelRequest) ProtoMessage() {} func (x *GetNotificationChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +538,9 @@ type UpdateNotificationChannelRequest struct { func (x *UpdateNotificationChannelRequest) Reset() { *x = UpdateNotificationChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotificationChannelRequest) String() string { @@ -567,7 +551,7 @@ func (*UpdateNotificationChannelRequest) ProtoMessage() {} func (x *UpdateNotificationChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +599,9 @@ type DeleteNotificationChannelRequest struct { func (x *DeleteNotificationChannelRequest) Reset() { *x = DeleteNotificationChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotificationChannelRequest) String() string { @@ -630,7 +612,7 @@ func (*DeleteNotificationChannelRequest) ProtoMessage() {} func (x *DeleteNotificationChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +653,9 @@ type SendNotificationChannelVerificationCodeRequest struct { func (x *SendNotificationChannelVerificationCodeRequest) Reset() { *x = SendNotificationChannelVerificationCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendNotificationChannelVerificationCodeRequest) String() string { @@ -686,7 +666,7 @@ func (*SendNotificationChannelVerificationCodeRequest) ProtoMessage() {} func (x *SendNotificationChannelVerificationCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -732,11 +712,9 @@ type GetNotificationChannelVerificationCodeRequest struct { func (x *GetNotificationChannelVerificationCodeRequest) Reset() { *x = GetNotificationChannelVerificationCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationChannelVerificationCodeRequest) String() string { @@ -747,7 +725,7 @@ func (*GetNotificationChannelVerificationCodeRequest) ProtoMessage() {} func (x *GetNotificationChannelVerificationCodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,11 +773,9 @@ type GetNotificationChannelVerificationCodeResponse struct { func (x *GetNotificationChannelVerificationCodeResponse) Reset() { *x = GetNotificationChannelVerificationCodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationChannelVerificationCodeResponse) String() string { @@ -810,7 +786,7 @@ func (*GetNotificationChannelVerificationCodeResponse) ProtoMessage() {} func (x *GetNotificationChannelVerificationCodeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +835,9 @@ type VerifyNotificationChannelRequest struct { func (x *VerifyNotificationChannelRequest) Reset() { *x = VerifyNotificationChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyNotificationChannelRequest) String() string { @@ -874,7 +848,7 @@ func (*VerifyNotificationChannelRequest) ProtoMessage() {} func (x *VerifyNotificationChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_notification_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,164 +1278,6 @@ func file_google_monitoring_v3_notification_service_proto_init() { return } file_google_monitoring_v3_notification_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_notification_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationChannelDescriptorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationChannelDescriptorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationChannelDescriptorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotificationChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationChannelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationChannelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotificationChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotificationChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SendNotificationChannelVerificationCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationChannelVerificationCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationChannelVerificationCodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_notification_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*VerifyNotificationChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/query_service.pb.go b/monitoring/apiv3/v2/monitoringpb/query_service.pb.go index e9bfbd68f537..9b3cf40e7745 100755 --- a/monitoring/apiv3/v2/monitoringpb/query_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/query_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/query_service.proto diff --git a/monitoring/apiv3/v2/monitoringpb/service.pb.go b/monitoring/apiv3/v2/monitoringpb/service.pb.go index 869a3738c09b..606852b05e71 100755 --- a/monitoring/apiv3/v2/monitoringpb/service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/service.proto @@ -147,11 +147,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -162,7 +160,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +405,9 @@ type ServiceLevelObjective struct { func (x *ServiceLevelObjective) Reset() { *x = ServiceLevelObjective{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceLevelObjective) String() string { @@ -422,7 +418,7 @@ func (*ServiceLevelObjective) ProtoMessage() {} func (x *ServiceLevelObjective) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +542,9 @@ type ServiceLevelIndicator struct { func (x *ServiceLevelIndicator) Reset() { *x = ServiceLevelIndicator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceLevelIndicator) String() string { @@ -561,7 +555,7 @@ func (*ServiceLevelIndicator) ProtoMessage() {} func (x *ServiceLevelIndicator) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +663,9 @@ type BasicSli struct { func (x *BasicSli) Reset() { *x = BasicSli{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicSli) String() string { @@ -684,7 +676,7 @@ func (*BasicSli) ProtoMessage() {} func (x *BasicSli) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,11 +767,9 @@ type Range struct { func (x *Range) Reset() { *x = Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Range) String() string { @@ -790,7 +780,7 @@ func (*Range) ProtoMessage() {} func (x *Range) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +827,9 @@ type RequestBasedSli struct { func (x *RequestBasedSli) Reset() { *x = RequestBasedSli{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestBasedSli) String() string { @@ -852,7 +840,7 @@ func (*RequestBasedSli) ProtoMessage() {} func (x *RequestBasedSli) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +929,9 @@ type TimeSeriesRatio struct { func (x *TimeSeriesRatio) Reset() { *x = TimeSeriesRatio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesRatio) String() string { @@ -956,7 +942,7 @@ func (*TimeSeriesRatio) ProtoMessage() {} func (x *TimeSeriesRatio) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +999,9 @@ type DistributionCut struct { func (x *DistributionCut) Reset() { *x = DistributionCut{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistributionCut) String() string { @@ -1028,7 +1012,7 @@ func (*DistributionCut) ProtoMessage() {} func (x *DistributionCut) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,11 +1065,9 @@ type WindowsBasedSli struct { func (x *WindowsBasedSli) Reset() { *x = WindowsBasedSli{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsBasedSli) String() string { @@ -1096,7 +1078,7 @@ func (*WindowsBasedSli) ProtoMessage() {} func (x *WindowsBasedSli) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1182,9 @@ type Service_Custom struct { func (x *Service_Custom) Reset() { *x = Service_Custom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_Custom) String() string { @@ -1215,7 +1195,7 @@ func (*Service_Custom) ProtoMessage() {} func (x *Service_Custom) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1224,9 @@ type Service_AppEngine struct { func (x *Service_AppEngine) Reset() { *x = Service_AppEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_AppEngine) String() string { @@ -1259,7 +1237,7 @@ func (*Service_AppEngine) ProtoMessage() {} func (x *Service_AppEngine) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,11 +1273,9 @@ type Service_CloudEndpoints struct { func (x *Service_CloudEndpoints) Reset() { *x = Service_CloudEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_CloudEndpoints) String() string { @@ -1310,7 +1286,7 @@ func (*Service_CloudEndpoints) ProtoMessage() {} func (x *Service_CloudEndpoints) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,11 +1334,9 @@ type Service_ClusterIstio struct { func (x *Service_ClusterIstio) Reset() { *x = Service_ClusterIstio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_ClusterIstio) String() string { @@ -1373,7 +1347,7 @@ func (*Service_ClusterIstio) ProtoMessage() {} func (x *Service_ClusterIstio) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1410,9 @@ type Service_MeshIstio struct { func (x *Service_MeshIstio) Reset() { *x = Service_MeshIstio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_MeshIstio) String() string { @@ -1451,7 +1423,7 @@ func (*Service_MeshIstio) ProtoMessage() {} func (x *Service_MeshIstio) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1512,11 +1484,9 @@ type Service_IstioCanonicalService struct { func (x *Service_IstioCanonicalService) Reset() { *x = Service_IstioCanonicalService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_IstioCanonicalService) String() string { @@ -1527,7 +1497,7 @@ func (*Service_IstioCanonicalService) ProtoMessage() {} func (x *Service_IstioCanonicalService) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1581,11 +1551,9 @@ type Service_CloudRun struct { func (x *Service_CloudRun) Reset() { *x = Service_CloudRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_CloudRun) String() string { @@ -1596,7 +1564,7 @@ func (*Service_CloudRun) ProtoMessage() {} func (x *Service_CloudRun) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1647,11 +1615,9 @@ type Service_GkeNamespace struct { func (x *Service_GkeNamespace) Reset() { *x = Service_GkeNamespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_GkeNamespace) String() string { @@ -1662,7 +1628,7 @@ func (*Service_GkeNamespace) ProtoMessage() {} func (x *Service_GkeNamespace) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1697,9 @@ type Service_GkeWorkload struct { func (x *Service_GkeWorkload) Reset() { *x = Service_GkeWorkload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_GkeWorkload) String() string { @@ -1746,7 +1710,7 @@ func (*Service_GkeWorkload) ProtoMessage() {} func (x *Service_GkeWorkload) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1830,11 +1794,9 @@ type Service_GkeService struct { func (x *Service_GkeService) Reset() { *x = Service_GkeService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_GkeService) String() string { @@ -1845,7 +1807,7 @@ func (*Service_GkeService) ProtoMessage() {} func (x *Service_GkeService) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1917,11 +1879,9 @@ type Service_BasicService struct { func (x *Service_BasicService) Reset() { *x = Service_BasicService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_BasicService) String() string { @@ -1932,7 +1892,7 @@ func (*Service_BasicService) ProtoMessage() {} func (x *Service_BasicService) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1974,11 +1934,9 @@ type Service_Telemetry struct { func (x *Service_Telemetry) Reset() { *x = Service_Telemetry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_Telemetry) String() string { @@ -1989,7 +1947,7 @@ func (*Service_Telemetry) ProtoMessage() {} func (x *Service_Telemetry) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1978,9 @@ type BasicSli_AvailabilityCriteria struct { func (x *BasicSli_AvailabilityCriteria) Reset() { *x = BasicSli_AvailabilityCriteria{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicSli_AvailabilityCriteria) String() string { @@ -2035,7 +1991,7 @@ func (*BasicSli_AvailabilityCriteria) ProtoMessage() {} func (x *BasicSli_AvailabilityCriteria) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2063,11 +2019,9 @@ type BasicSli_LatencyCriteria struct { func (x *BasicSli_LatencyCriteria) Reset() { *x = BasicSli_LatencyCriteria{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicSli_LatencyCriteria) String() string { @@ -2078,7 +2032,7 @@ func (*BasicSli_LatencyCriteria) ProtoMessage() {} func (x *BasicSli_LatencyCriteria) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2121,11 +2075,9 @@ type WindowsBasedSli_PerformanceThreshold struct { func (x *WindowsBasedSli_PerformanceThreshold) Reset() { *x = WindowsBasedSli_PerformanceThreshold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsBasedSli_PerformanceThreshold) String() string { @@ -2136,7 +2088,7 @@ func (*WindowsBasedSli_PerformanceThreshold) ProtoMessage() {} func (x *WindowsBasedSli_PerformanceThreshold) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2218,11 +2170,9 @@ type WindowsBasedSli_MetricRange struct { func (x *WindowsBasedSli_MetricRange) Reset() { *x = WindowsBasedSli_MetricRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsBasedSli_MetricRange) String() string { @@ -2233,7 +2183,7 @@ func (*WindowsBasedSli_MetricRange) ProtoMessage() {} func (x *WindowsBasedSli_MetricRange) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2744,308 +2694,6 @@ func file_google_monitoring_v3_service_proto_init() { if File_google_monitoring_v3_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceLevelObjective); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServiceLevelIndicator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BasicSli); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RequestBasedSli); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesRatio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DistributionCut); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*WindowsBasedSli); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Service_Custom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Service_AppEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Service_CloudEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Service_ClusterIstio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Service_MeshIstio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Service_IstioCanonicalService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Service_CloudRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Service_GkeNamespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Service_GkeWorkload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Service_GkeService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Service_BasicService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Service_Telemetry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BasicSli_AvailabilityCriteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BasicSli_LatencyCriteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*WindowsBasedSli_PerformanceThreshold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*WindowsBasedSli_MetricRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_service_proto_msgTypes[0].OneofWrappers = []any{ (*Service_Custom_)(nil), (*Service_AppEngine_)(nil), diff --git a/monitoring/apiv3/v2/monitoringpb/service_service.pb.go b/monitoring/apiv3/v2/monitoringpb/service_service.pb.go index 15e1f04d6a50..01520d88a2ce 100755 --- a/monitoring/apiv3/v2/monitoringpb/service_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/service_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/service_service.proto @@ -63,11 +63,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -143,7 +139,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,11 +204,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -223,7 +217,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +276,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -297,7 +289,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +333,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -356,7 +346,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,11 +389,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -414,7 +402,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +446,9 @@ type CreateServiceLevelObjectiveRequest struct { func (x *CreateServiceLevelObjectiveRequest) Reset() { *x = CreateServiceLevelObjectiveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceLevelObjectiveRequest) String() string { @@ -473,7 +459,7 @@ func (*CreateServiceLevelObjectiveRequest) ProtoMessage() {} func (x *CreateServiceLevelObjectiveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +515,9 @@ type GetServiceLevelObjectiveRequest struct { func (x *GetServiceLevelObjectiveRequest) Reset() { *x = GetServiceLevelObjectiveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceLevelObjectiveRequest) String() string { @@ -544,7 +528,7 @@ func (*GetServiceLevelObjectiveRequest) ProtoMessage() {} func (x *GetServiceLevelObjectiveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +587,9 @@ type ListServiceLevelObjectivesRequest struct { func (x *ListServiceLevelObjectivesRequest) Reset() { *x = ListServiceLevelObjectivesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceLevelObjectivesRequest) String() string { @@ -618,7 +600,7 @@ func (*ListServiceLevelObjectivesRequest) ProtoMessage() {} func (x *ListServiceLevelObjectivesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,11 +666,9 @@ type ListServiceLevelObjectivesResponse struct { func (x *ListServiceLevelObjectivesResponse) Reset() { *x = ListServiceLevelObjectivesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceLevelObjectivesResponse) String() string { @@ -699,7 +679,7 @@ func (*ListServiceLevelObjectivesResponse) ProtoMessage() {} func (x *ListServiceLevelObjectivesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +723,9 @@ type UpdateServiceLevelObjectiveRequest struct { func (x *UpdateServiceLevelObjectiveRequest) Reset() { *x = UpdateServiceLevelObjectiveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceLevelObjectiveRequest) String() string { @@ -758,7 +736,7 @@ func (*UpdateServiceLevelObjectiveRequest) ProtoMessage() {} func (x *UpdateServiceLevelObjectiveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +780,9 @@ type DeleteServiceLevelObjectiveRequest struct { func (x *DeleteServiceLevelObjectiveRequest) Reset() { *x = DeleteServiceLevelObjectiveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_service_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_service_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceLevelObjectiveRequest) String() string { @@ -817,7 +793,7 @@ func (*DeleteServiceLevelObjectiveRequest) ProtoMessage() {} func (x *DeleteServiceLevelObjectiveRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_service_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1205,152 +1181,6 @@ func file_google_monitoring_v3_service_service_proto_init() { return } file_google_monitoring_v3_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_service_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceLevelObjectiveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceLevelObjectiveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceLevelObjectivesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceLevelObjectivesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceLevelObjectiveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_service_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceLevelObjectiveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/snooze.pb.go b/monitoring/apiv3/v2/monitoringpb/snooze.pb.go index c9303a3079f4..dc835473887d 100755 --- a/monitoring/apiv3/v2/monitoringpb/snooze.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/snooze.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/snooze.proto @@ -67,11 +67,9 @@ type Snooze struct { func (x *Snooze) Reset() { *x = Snooze{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snooze) String() string { @@ -82,7 +80,7 @@ func (*Snooze) ProtoMessage() {} func (x *Snooze) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +143,9 @@ type Snooze_Criteria struct { func (x *Snooze_Criteria) Reset() { *x = Snooze_Criteria{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snooze_Criteria) String() string { @@ -160,7 +156,7 @@ func (*Snooze_Criteria) ProtoMessage() {} func (x *Snooze_Criteria) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,32 +264,6 @@ func file_google_monitoring_v3_snooze_proto_init() { return } file_google_monitoring_v3_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_snooze_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Snooze); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_snooze_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Snooze_Criteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go b/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go index 39388a998288..8c9ffaa9d4f8 100755 --- a/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/snooze_service.proto @@ -61,11 +61,9 @@ type CreateSnoozeRequest struct { func (x *CreateSnoozeRequest) Reset() { *x = CreateSnoozeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnoozeRequest) String() string { @@ -76,7 +74,7 @@ func (*CreateSnoozeRequest) ProtoMessage() {} func (x *CreateSnoozeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type ListSnoozesRequest struct { func (x *ListSnoozesRequest) Reset() { *x = ListSnoozesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnoozesRequest) String() string { @@ -159,7 +155,7 @@ func (*ListSnoozesRequest) ProtoMessage() {} func (x *ListSnoozesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +214,9 @@ type ListSnoozesResponse struct { func (x *ListSnoozesResponse) Reset() { *x = ListSnoozesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnoozesResponse) String() string { @@ -233,7 +227,7 @@ func (*ListSnoozesResponse) ProtoMessage() {} func (x *ListSnoozesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +271,9 @@ type GetSnoozeRequest struct { func (x *GetSnoozeRequest) Reset() { *x = GetSnoozeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnoozeRequest) String() string { @@ -292,7 +284,7 @@ func (*GetSnoozeRequest) ProtoMessage() {} func (x *GetSnoozeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +353,9 @@ type UpdateSnoozeRequest struct { func (x *UpdateSnoozeRequest) Reset() { *x = UpdateSnoozeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSnoozeRequest) String() string { @@ -376,7 +366,7 @@ func (*UpdateSnoozeRequest) ProtoMessage() {} func (x *UpdateSnoozeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_snooze_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,68 +570,6 @@ func file_google_monitoring_v3_snooze_service_proto_init() { return } file_google_monitoring_v3_snooze_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_snooze_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnoozeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_snooze_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSnoozesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_snooze_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListSnoozesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_snooze_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSnoozeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_snooze_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSnoozeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/span_context.pb.go b/monitoring/apiv3/v2/monitoringpb/span_context.pb.go index 5a55ecc66509..3555d6e0a1cd 100755 --- a/monitoring/apiv3/v2/monitoringpb/span_context.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/span_context.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/span_context.proto @@ -61,11 +61,9 @@ type SpanContext struct { func (x *SpanContext) Reset() { *x = SpanContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_span_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_span_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpanContext) String() string { @@ -76,7 +74,7 @@ func (*SpanContext) ProtoMessage() {} func (x *SpanContext) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_span_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,20 +151,6 @@ func file_google_monitoring_v3_span_context_proto_init() { if File_google_monitoring_v3_span_context_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_span_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpanContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/monitoringpb/uptime.pb.go b/monitoring/apiv3/v2/monitoringpb/uptime.pb.go index e0b9e4a385a6..22044dabc56d 100755 --- a/monitoring/apiv3/v2/monitoringpb/uptime.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/uptime.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/uptime.proto @@ -699,11 +699,9 @@ type InternalChecker struct { func (x *InternalChecker) Reset() { *x = InternalChecker{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InternalChecker) String() string { @@ -714,7 +712,7 @@ func (*InternalChecker) ProtoMessage() {} func (x *InternalChecker) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +785,9 @@ type SyntheticMonitorTarget struct { func (x *SyntheticMonitorTarget) Reset() { *x = SyntheticMonitorTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyntheticMonitorTarget) String() string { @@ -802,7 +798,7 @@ func (*SyntheticMonitorTarget) ProtoMessage() {} func (x *SyntheticMonitorTarget) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +924,9 @@ type UptimeCheckConfig struct { func (x *UptimeCheckConfig) Reset() { *x = UptimeCheckConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig) String() string { @@ -943,7 +937,7 @@ func (*UptimeCheckConfig) ProtoMessage() {} func (x *UptimeCheckConfig) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1151,9 @@ type UptimeCheckIp struct { func (x *UptimeCheckIp) Reset() { *x = UptimeCheckIp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckIp) String() string { @@ -1172,7 +1164,7 @@ func (*UptimeCheckIp) ProtoMessage() {} func (x *UptimeCheckIp) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1227,11 +1219,9 @@ type SyntheticMonitorTarget_CloudFunctionV2Target struct { func (x *SyntheticMonitorTarget_CloudFunctionV2Target) Reset() { *x = SyntheticMonitorTarget_CloudFunctionV2Target{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyntheticMonitorTarget_CloudFunctionV2Target) String() string { @@ -1242,7 +1232,7 @@ func (*SyntheticMonitorTarget_CloudFunctionV2Target) ProtoMessage() {} func (x *SyntheticMonitorTarget_CloudFunctionV2Target) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1288,11 +1278,9 @@ type UptimeCheckConfig_ResourceGroup struct { func (x *UptimeCheckConfig_ResourceGroup) Reset() { *x = UptimeCheckConfig_ResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_ResourceGroup) String() string { @@ -1303,7 +1291,7 @@ func (*UptimeCheckConfig_ResourceGroup) ProtoMessage() {} func (x *UptimeCheckConfig_ResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1334,9 @@ type UptimeCheckConfig_PingConfig struct { func (x *UptimeCheckConfig_PingConfig) Reset() { *x = UptimeCheckConfig_PingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_PingConfig) String() string { @@ -1361,7 +1347,7 @@ func (*UptimeCheckConfig_PingConfig) ProtoMessage() {} func (x *UptimeCheckConfig_PingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1474,11 +1460,9 @@ type UptimeCheckConfig_HttpCheck struct { func (x *UptimeCheckConfig_HttpCheck) Reset() { *x = UptimeCheckConfig_HttpCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_HttpCheck) String() string { @@ -1489,7 +1473,7 @@ func (*UptimeCheckConfig_HttpCheck) ProtoMessage() {} func (x *UptimeCheckConfig_HttpCheck) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1639,11 +1623,9 @@ type UptimeCheckConfig_TcpCheck struct { func (x *UptimeCheckConfig_TcpCheck) Reset() { *x = UptimeCheckConfig_TcpCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_TcpCheck) String() string { @@ -1654,7 +1636,7 @@ func (*UptimeCheckConfig_TcpCheck) ProtoMessage() {} func (x *UptimeCheckConfig_TcpCheck) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,11 +1693,9 @@ type UptimeCheckConfig_ContentMatcher struct { func (x *UptimeCheckConfig_ContentMatcher) Reset() { *x = UptimeCheckConfig_ContentMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_ContentMatcher) String() string { @@ -1726,7 +1706,7 @@ func (*UptimeCheckConfig_ContentMatcher) ProtoMessage() {} func (x *UptimeCheckConfig_ContentMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1798,11 +1778,9 @@ type UptimeCheckConfig_HttpCheck_BasicAuthentication struct { func (x *UptimeCheckConfig_HttpCheck_BasicAuthentication) Reset() { *x = UptimeCheckConfig_HttpCheck_BasicAuthentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_HttpCheck_BasicAuthentication) String() string { @@ -1813,7 +1791,7 @@ func (*UptimeCheckConfig_HttpCheck_BasicAuthentication) ProtoMessage() {} func (x *UptimeCheckConfig_HttpCheck_BasicAuthentication) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1860,11 +1838,9 @@ type UptimeCheckConfig_HttpCheck_ResponseStatusCode struct { func (x *UptimeCheckConfig_HttpCheck_ResponseStatusCode) Reset() { *x = UptimeCheckConfig_HttpCheck_ResponseStatusCode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_HttpCheck_ResponseStatusCode) String() string { @@ -1875,7 +1851,7 @@ func (*UptimeCheckConfig_HttpCheck_ResponseStatusCode) ProtoMessage() {} func (x *UptimeCheckConfig_HttpCheck_ResponseStatusCode) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1947,11 +1923,9 @@ type UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication struct { func (x *UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication) Reset() { *x = UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication) String() string { @@ -1962,7 +1936,7 @@ func (*UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication) ProtoMessage() {} func (x *UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2002,11 +1976,9 @@ type UptimeCheckConfig_ContentMatcher_JsonPathMatcher struct { func (x *UptimeCheckConfig_ContentMatcher_JsonPathMatcher) Reset() { *x = UptimeCheckConfig_ContentMatcher_JsonPathMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UptimeCheckConfig_ContentMatcher_JsonPathMatcher) String() string { @@ -2017,7 +1989,7 @@ func (*UptimeCheckConfig_ContentMatcher_JsonPathMatcher) ProtoMessage() {} func (x *UptimeCheckConfig_ContentMatcher_JsonPathMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2514,176 +2486,6 @@ func file_google_monitoring_v3_uptime_proto_init() { if File_google_monitoring_v3_uptime_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_uptime_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InternalChecker); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SyntheticMonitorTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckIp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SyntheticMonitorTarget_CloudFunctionV2Target); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_ResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_PingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_HttpCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_TcpCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_ContentMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_HttpCheck_BasicAuthentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_HttpCheck_ResponseStatusCode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UptimeCheckConfig_ContentMatcher_JsonPathMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_v3_uptime_proto_msgTypes[1].OneofWrappers = []any{ (*SyntheticMonitorTarget_CloudFunctionV2)(nil), } diff --git a/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go b/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go index d4ba902fb07a..6a16084afb1b 100755 --- a/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go +++ b/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/v3/uptime_service.proto @@ -73,11 +73,9 @@ type ListUptimeCheckConfigsRequest struct { func (x *ListUptimeCheckConfigsRequest) Reset() { *x = ListUptimeCheckConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUptimeCheckConfigsRequest) String() string { @@ -88,7 +86,7 @@ func (*ListUptimeCheckConfigsRequest) ProtoMessage() {} func (x *ListUptimeCheckConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListUptimeCheckConfigsResponse struct { func (x *ListUptimeCheckConfigsResponse) Reset() { *x = ListUptimeCheckConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUptimeCheckConfigsResponse) String() string { @@ -167,7 +163,7 @@ func (*ListUptimeCheckConfigsResponse) ProtoMessage() {} func (x *ListUptimeCheckConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +213,9 @@ type GetUptimeCheckConfigRequest struct { func (x *GetUptimeCheckConfigRequest) Reset() { *x = GetUptimeCheckConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUptimeCheckConfigRequest) String() string { @@ -232,7 +226,7 @@ func (*GetUptimeCheckConfigRequest) ProtoMessage() {} func (x *GetUptimeCheckConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +266,9 @@ type CreateUptimeCheckConfigRequest struct { func (x *CreateUptimeCheckConfigRequest) Reset() { *x = CreateUptimeCheckConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUptimeCheckConfigRequest) String() string { @@ -287,7 +279,7 @@ func (*CreateUptimeCheckConfigRequest) ProtoMessage() {} func (x *CreateUptimeCheckConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -343,11 +335,9 @@ type UpdateUptimeCheckConfigRequest struct { func (x *UpdateUptimeCheckConfigRequest) Reset() { *x = UpdateUptimeCheckConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUptimeCheckConfigRequest) String() string { @@ -358,7 +348,7 @@ func (*UpdateUptimeCheckConfigRequest) ProtoMessage() {} func (x *UpdateUptimeCheckConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +391,9 @@ type DeleteUptimeCheckConfigRequest struct { func (x *DeleteUptimeCheckConfigRequest) Reset() { *x = DeleteUptimeCheckConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUptimeCheckConfigRequest) String() string { @@ -416,7 +404,7 @@ func (*DeleteUptimeCheckConfigRequest) ProtoMessage() {} func (x *DeleteUptimeCheckConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +447,9 @@ type ListUptimeCheckIpsRequest struct { func (x *ListUptimeCheckIpsRequest) Reset() { *x = ListUptimeCheckIpsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUptimeCheckIpsRequest) String() string { @@ -474,7 +460,7 @@ func (*ListUptimeCheckIpsRequest) ProtoMessage() {} func (x *ListUptimeCheckIpsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +509,9 @@ type ListUptimeCheckIpsResponse struct { func (x *ListUptimeCheckIpsResponse) Reset() { *x = ListUptimeCheckIpsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUptimeCheckIpsResponse) String() string { @@ -538,7 +522,7 @@ func (*ListUptimeCheckIpsResponse) ProtoMessage() {} func (x *ListUptimeCheckIpsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_v3_uptime_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,104 +807,6 @@ func file_google_monitoring_v3_uptime_service_proto_init() { return } file_google_monitoring_v3_uptime_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_v3_uptime_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListUptimeCheckConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListUptimeCheckConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetUptimeCheckConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateUptimeCheckConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUptimeCheckConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUptimeCheckConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListUptimeCheckIpsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_v3_uptime_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListUptimeCheckIpsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/apiv3/v2/notification_channel_client.go b/monitoring/apiv3/v2/notification_channel_client.go index 6f7fe5d7c493..ad64cb1292a0 100755 --- a/monitoring/apiv3/v2/notification_channel_client.go +++ b/monitoring/apiv3/v2/notification_channel_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -329,6 +330,8 @@ type notificationChannelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotificationChannelClient creates a new notification channel service client based on gRPC. @@ -356,6 +359,7 @@ func NewNotificationChannelClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, notificationChannelClient: monitoringpb.NewNotificationChannelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -409,7 +413,7 @@ func (c *notificationChannelGRPCClient) ListNotificationChannelDescriptors(ctx c } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.ListNotificationChannelDescriptors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.ListNotificationChannelDescriptors, req, settings.GRPC, c.logger, "ListNotificationChannelDescriptors") return err }, opts...) if err != nil { @@ -444,7 +448,7 @@ func (c *notificationChannelGRPCClient) GetNotificationChannelDescriptor(ctx con var resp *monitoringpb.NotificationChannelDescriptor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.GetNotificationChannelDescriptor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.GetNotificationChannelDescriptor, req, settings.GRPC, c.logger, "GetNotificationChannelDescriptor") return err }, opts...) if err != nil { @@ -473,7 +477,7 @@ func (c *notificationChannelGRPCClient) ListNotificationChannels(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.ListNotificationChannels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.ListNotificationChannels, req, settings.GRPC, c.logger, "ListNotificationChannels") return err }, opts...) if err != nil { @@ -508,7 +512,7 @@ func (c *notificationChannelGRPCClient) GetNotificationChannel(ctx context.Conte var resp *monitoringpb.NotificationChannel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.GetNotificationChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.GetNotificationChannel, req, settings.GRPC, c.logger, "GetNotificationChannel") return err }, opts...) if err != nil { @@ -526,7 +530,7 @@ func (c *notificationChannelGRPCClient) CreateNotificationChannel(ctx context.Co var resp *monitoringpb.NotificationChannel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.CreateNotificationChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.CreateNotificationChannel, req, settings.GRPC, c.logger, "CreateNotificationChannel") return err }, opts...) if err != nil { @@ -544,7 +548,7 @@ func (c *notificationChannelGRPCClient) UpdateNotificationChannel(ctx context.Co var resp *monitoringpb.NotificationChannel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.UpdateNotificationChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.UpdateNotificationChannel, req, settings.GRPC, c.logger, "UpdateNotificationChannel") return err }, opts...) if err != nil { @@ -561,7 +565,7 @@ func (c *notificationChannelGRPCClient) DeleteNotificationChannel(ctx context.Co opts = append((*c.CallOptions).DeleteNotificationChannel[0:len((*c.CallOptions).DeleteNotificationChannel):len((*c.CallOptions).DeleteNotificationChannel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.notificationChannelClient.DeleteNotificationChannel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.notificationChannelClient.DeleteNotificationChannel, req, settings.GRPC, c.logger, "DeleteNotificationChannel") return err }, opts...) return err @@ -575,7 +579,7 @@ func (c *notificationChannelGRPCClient) SendNotificationChannelVerificationCode( opts = append((*c.CallOptions).SendNotificationChannelVerificationCode[0:len((*c.CallOptions).SendNotificationChannelVerificationCode):len((*c.CallOptions).SendNotificationChannelVerificationCode)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.notificationChannelClient.SendNotificationChannelVerificationCode(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.notificationChannelClient.SendNotificationChannelVerificationCode, req, settings.GRPC, c.logger, "SendNotificationChannelVerificationCode") return err }, opts...) return err @@ -590,7 +594,7 @@ func (c *notificationChannelGRPCClient) GetNotificationChannelVerificationCode(c var resp *monitoringpb.GetNotificationChannelVerificationCodeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.GetNotificationChannelVerificationCode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.GetNotificationChannelVerificationCode, req, settings.GRPC, c.logger, "GetNotificationChannelVerificationCode") return err }, opts...) if err != nil { @@ -608,7 +612,7 @@ func (c *notificationChannelGRPCClient) VerifyNotificationChannel(ctx context.Co var resp *monitoringpb.NotificationChannel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationChannelClient.VerifyNotificationChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationChannelClient.VerifyNotificationChannel, req, settings.GRPC, c.logger, "VerifyNotificationChannel") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/notification_channel_client_example_go123_test.go b/monitoring/apiv3/v2/notification_channel_client_example_go123_test.go index feaeac6c67ad..03e5bb330fee 100644 --- a/monitoring/apiv3/v2/notification_channel_client_example_go123_test.go +++ b/monitoring/apiv3/v2/notification_channel_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNotificationChannelClient_ListNotificationChannelDescriptors_all() { } for resp, err := range c.ListNotificationChannelDescriptors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleNotificationChannelClient_ListNotificationChannels_all() { } for resp, err := range c.ListNotificationChannels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/query_client.go b/monitoring/apiv3/v2/query_client.go index 3c111637e19d..97b414ec3f5b 100755 --- a/monitoring/apiv3/v2/query_client.go +++ b/monitoring/apiv3/v2/query_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -125,6 +126,8 @@ type queryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewQueryClient creates a new query service client based on gRPC. @@ -153,6 +156,7 @@ func NewQueryClient(ctx context.Context, opts ...option.ClientOption) (*QueryCli connPool: connPool, queryClient: monitoringpb.NewQueryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -206,7 +210,7 @@ func (c *queryGRPCClient) QueryTimeSeries(ctx context.Context, req *monitoringpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.queryClient.QueryTimeSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.queryClient.QueryTimeSeries, req, settings.GRPC, c.logger, "QueryTimeSeries") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/query_client_example_go123_test.go b/monitoring/apiv3/v2/query_client_example_go123_test.go index a5a93499ae4b..7bef0d77675c 100644 --- a/monitoring/apiv3/v2/query_client_example_go123_test.go +++ b/monitoring/apiv3/v2/query_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleQueryClient_QueryTimeSeries_all() { } for resp, err := range c.QueryTimeSeries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/service_monitoring_client.go b/monitoring/apiv3/v2/service_monitoring_client.go index 7776c425f9f8..206b7e4c1131 100755 --- a/monitoring/apiv3/v2/service_monitoring_client.go +++ b/monitoring/apiv3/v2/service_monitoring_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -274,6 +275,8 @@ type serviceMonitoringGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServiceMonitoringClient creates a new service monitoring service client based on gRPC. @@ -303,6 +306,7 @@ func NewServiceMonitoringClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, serviceMonitoringClient: monitoringpb.NewServiceMonitoringServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +349,7 @@ func (c *serviceMonitoringGRPCClient) CreateService(ctx context.Context, req *mo var resp *monitoringpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -363,7 +367,7 @@ func (c *serviceMonitoringGRPCClient) GetService(ctx context.Context, req *monit var resp *monitoringpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -392,7 +396,7 @@ func (c *serviceMonitoringGRPCClient) ListServices(ctx context.Context, req *mon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -427,7 +431,7 @@ func (c *serviceMonitoringGRPCClient) UpdateService(ctx context.Context, req *mo var resp *monitoringpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -444,7 +448,7 @@ func (c *serviceMonitoringGRPCClient) DeleteService(ctx context.Context, req *mo opts = append((*c.CallOptions).DeleteService[0:len((*c.CallOptions).DeleteService):len((*c.CallOptions).DeleteService)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.serviceMonitoringClient.DeleteService(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.serviceMonitoringClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) return err @@ -459,7 +463,7 @@ func (c *serviceMonitoringGRPCClient) CreateServiceLevelObjective(ctx context.Co var resp *monitoringpb.ServiceLevelObjective err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.CreateServiceLevelObjective(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.CreateServiceLevelObjective, req, settings.GRPC, c.logger, "CreateServiceLevelObjective") return err }, opts...) if err != nil { @@ -477,7 +481,7 @@ func (c *serviceMonitoringGRPCClient) GetServiceLevelObjective(ctx context.Conte var resp *monitoringpb.ServiceLevelObjective err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.GetServiceLevelObjective(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.GetServiceLevelObjective, req, settings.GRPC, c.logger, "GetServiceLevelObjective") return err }, opts...) if err != nil { @@ -506,7 +510,7 @@ func (c *serviceMonitoringGRPCClient) ListServiceLevelObjectives(ctx context.Con } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.ListServiceLevelObjectives(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.ListServiceLevelObjectives, req, settings.GRPC, c.logger, "ListServiceLevelObjectives") return err }, opts...) if err != nil { @@ -541,7 +545,7 @@ func (c *serviceMonitoringGRPCClient) UpdateServiceLevelObjective(ctx context.Co var resp *monitoringpb.ServiceLevelObjective err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceMonitoringClient.UpdateServiceLevelObjective(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceMonitoringClient.UpdateServiceLevelObjective, req, settings.GRPC, c.logger, "UpdateServiceLevelObjective") return err }, opts...) if err != nil { @@ -558,7 +562,7 @@ func (c *serviceMonitoringGRPCClient) DeleteServiceLevelObjective(ctx context.Co opts = append((*c.CallOptions).DeleteServiceLevelObjective[0:len((*c.CallOptions).DeleteServiceLevelObjective):len((*c.CallOptions).DeleteServiceLevelObjective)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.serviceMonitoringClient.DeleteServiceLevelObjective(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.serviceMonitoringClient.DeleteServiceLevelObjective, req, settings.GRPC, c.logger, "DeleteServiceLevelObjective") return err }, opts...) return err diff --git a/monitoring/apiv3/v2/service_monitoring_client_example_go123_test.go b/monitoring/apiv3/v2/service_monitoring_client_example_go123_test.go index 61694fcf45d2..a0c2ecf881e3 100644 --- a/monitoring/apiv3/v2/service_monitoring_client_example_go123_test.go +++ b/monitoring/apiv3/v2/service_monitoring_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleServiceMonitoringClient_ListServiceLevelObjectives_all() { } for resp, err := range c.ListServiceLevelObjectives(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleServiceMonitoringClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/snooze_client.go b/monitoring/apiv3/v2/snooze_client.go index 32cad577e3ff..ce238659ed90 100755 --- a/monitoring/apiv3/v2/snooze_client.go +++ b/monitoring/apiv3/v2/snooze_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -181,6 +182,8 @@ type snoozeGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSnoozeClient creates a new snooze service client based on gRPC. @@ -209,6 +212,7 @@ func NewSnoozeClient(ctx context.Context, opts ...option.ClientOption) (*SnoozeC connPool: connPool, snoozeClient: monitoringpb.NewSnoozeServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -251,7 +255,7 @@ func (c *snoozeGRPCClient) CreateSnooze(ctx context.Context, req *monitoringpb.C var resp *monitoringpb.Snooze err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snoozeClient.CreateSnooze(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snoozeClient.CreateSnooze, req, settings.GRPC, c.logger, "CreateSnooze") return err }, opts...) if err != nil { @@ -280,7 +284,7 @@ func (c *snoozeGRPCClient) ListSnoozes(ctx context.Context, req *monitoringpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snoozeClient.ListSnoozes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snoozeClient.ListSnoozes, req, settings.GRPC, c.logger, "ListSnoozes") return err }, opts...) if err != nil { @@ -315,7 +319,7 @@ func (c *snoozeGRPCClient) GetSnooze(ctx context.Context, req *monitoringpb.GetS var resp *monitoringpb.Snooze err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snoozeClient.GetSnooze(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snoozeClient.GetSnooze, req, settings.GRPC, c.logger, "GetSnooze") return err }, opts...) if err != nil { @@ -333,7 +337,7 @@ func (c *snoozeGRPCClient) UpdateSnooze(ctx context.Context, req *monitoringpb.U var resp *monitoringpb.Snooze err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.snoozeClient.UpdateSnooze(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.snoozeClient.UpdateSnooze, req, settings.GRPC, c.logger, "UpdateSnooze") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/snooze_client_example_go123_test.go b/monitoring/apiv3/v2/snooze_client_example_go123_test.go index 6706d818fb14..91e89a0ff0d4 100644 --- a/monitoring/apiv3/v2/snooze_client_example_go123_test.go +++ b/monitoring/apiv3/v2/snooze_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSnoozeClient_ListSnoozes_all() { } for resp, err := range c.ListSnoozes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/apiv3/v2/uptime_check_client.go b/monitoring/apiv3/v2/uptime_check_client.go index d3815251374d..a16dc7f436dc 100755 --- a/monitoring/apiv3/v2/uptime_check_client.go +++ b/monitoring/apiv3/v2/uptime_check_client.go @@ -19,6 +19,7 @@ package monitoring import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -226,6 +227,8 @@ type uptimeCheckGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUptimeCheckClient creates a new uptime check service client based on gRPC. @@ -259,6 +262,7 @@ func NewUptimeCheckClient(ctx context.Context, opts ...option.ClientOption) (*Up connPool: connPool, uptimeCheckClient: monitoringpb.NewUptimeCheckServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -312,7 +316,7 @@ func (c *uptimeCheckGRPCClient) ListUptimeCheckConfigs(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.uptimeCheckClient.ListUptimeCheckConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.uptimeCheckClient.ListUptimeCheckConfigs, req, settings.GRPC, c.logger, "ListUptimeCheckConfigs") return err }, opts...) if err != nil { @@ -347,7 +351,7 @@ func (c *uptimeCheckGRPCClient) GetUptimeCheckConfig(ctx context.Context, req *m var resp *monitoringpb.UptimeCheckConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.uptimeCheckClient.GetUptimeCheckConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.uptimeCheckClient.GetUptimeCheckConfig, req, settings.GRPC, c.logger, "GetUptimeCheckConfig") return err }, opts...) if err != nil { @@ -365,7 +369,7 @@ func (c *uptimeCheckGRPCClient) CreateUptimeCheckConfig(ctx context.Context, req var resp *monitoringpb.UptimeCheckConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.uptimeCheckClient.CreateUptimeCheckConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.uptimeCheckClient.CreateUptimeCheckConfig, req, settings.GRPC, c.logger, "CreateUptimeCheckConfig") return err }, opts...) if err != nil { @@ -383,7 +387,7 @@ func (c *uptimeCheckGRPCClient) UpdateUptimeCheckConfig(ctx context.Context, req var resp *monitoringpb.UptimeCheckConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.uptimeCheckClient.UpdateUptimeCheckConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.uptimeCheckClient.UpdateUptimeCheckConfig, req, settings.GRPC, c.logger, "UpdateUptimeCheckConfig") return err }, opts...) if err != nil { @@ -400,7 +404,7 @@ func (c *uptimeCheckGRPCClient) DeleteUptimeCheckConfig(ctx context.Context, req opts = append((*c.CallOptions).DeleteUptimeCheckConfig[0:len((*c.CallOptions).DeleteUptimeCheckConfig):len((*c.CallOptions).DeleteUptimeCheckConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.uptimeCheckClient.DeleteUptimeCheckConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.uptimeCheckClient.DeleteUptimeCheckConfig, req, settings.GRPC, c.logger, "DeleteUptimeCheckConfig") return err }, opts...) return err @@ -423,7 +427,7 @@ func (c *uptimeCheckGRPCClient) ListUptimeCheckIps(ctx context.Context, req *mon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.uptimeCheckClient.ListUptimeCheckIps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.uptimeCheckClient.ListUptimeCheckIps, req, settings.GRPC, c.logger, "ListUptimeCheckIps") return err }, opts...) if err != nil { diff --git a/monitoring/apiv3/v2/uptime_check_client_example_go123_test.go b/monitoring/apiv3/v2/uptime_check_client_example_go123_test.go index aeb50beaf5cd..b4cce21fa192 100644 --- a/monitoring/apiv3/v2/uptime_check_client_example_go123_test.go +++ b/monitoring/apiv3/v2/uptime_check_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUptimeCheckClient_ListUptimeCheckConfigs_all() { } for resp, err := range c.ListUptimeCheckConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleUptimeCheckClient_ListUptimeCheckIps_all() { } for resp, err := range c.ListUptimeCheckIps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go b/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go index 73af74c4c5a5..29367b80d5f7 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/alertchart.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/alertchart.proto @@ -50,11 +50,9 @@ type AlertChart struct { func (x *AlertChart) Reset() { *x = AlertChart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertChart) String() string { @@ -65,7 +63,7 @@ func (*AlertChart) ProtoMessage() {} func (x *AlertChart) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +153,6 @@ func file_google_monitoring_dashboard_v1_alertchart_proto_init() { if File_google_monitoring_dashboard_v1_alertchart_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_alertchart_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AlertChart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go b/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go index 0e975dd8cf01..f6c5da2bd445 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/collapsible_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/collapsible_group.proto @@ -48,11 +48,9 @@ type CollapsibleGroup struct { func (x *CollapsibleGroup) Reset() { *x = CollapsibleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollapsibleGroup) String() string { @@ -63,7 +61,7 @@ func (*CollapsibleGroup) ProtoMessage() {} func (x *CollapsibleGroup) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,20 +143,6 @@ func file_google_monitoring_dashboard_v1_collapsible_group_proto_init() { if File_google_monitoring_dashboard_v1_collapsible_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_collapsible_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CollapsibleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/common.pb.go b/monitoring/dashboard/apiv1/dashboardpb/common.pb.go index b2f06f824a10..f86cf61774ed 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/common.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/common.proto @@ -664,11 +664,9 @@ type Aggregation struct { func (x *Aggregation) Reset() { *x = Aggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Aggregation) String() string { @@ -679,7 +677,7 @@ func (*Aggregation) ProtoMessage() {} func (x *Aggregation) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +746,9 @@ type PickTimeSeriesFilter struct { func (x *PickTimeSeriesFilter) Reset() { *x = PickTimeSeriesFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PickTimeSeriesFilter) String() string { @@ -763,7 +759,7 @@ func (*PickTimeSeriesFilter) ProtoMessage() {} func (x *PickTimeSeriesFilter) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +822,9 @@ type StatisticalTimeSeriesFilter struct { func (x *StatisticalTimeSeriesFilter) Reset() { *x = StatisticalTimeSeriesFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatisticalTimeSeriesFilter) String() string { @@ -841,7 +835,7 @@ func (*StatisticalTimeSeriesFilter) ProtoMessage() {} func (x *StatisticalTimeSeriesFilter) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,44 +1050,6 @@ func file_google_monitoring_dashboard_v1_common_proto_init() { if File_google_monitoring_dashboard_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Aggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PickTimeSeriesFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StatisticalTimeSeriesFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go b/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go index 2cca38212505..93f9545fe4c7 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/dashboard.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/dashboard.proto @@ -72,11 +72,9 @@ type Dashboard struct { func (x *Dashboard) Reset() { *x = Dashboard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dashboard) String() string { @@ -87,7 +85,7 @@ func (*Dashboard) ProtoMessage() {} func (x *Dashboard) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,20 +333,6 @@ func file_google_monitoring_dashboard_v1_dashboard_proto_init() { } file_google_monitoring_dashboard_v1_dashboard_filter_proto_init() file_google_monitoring_dashboard_v1_layouts_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Dashboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_dashboard_v1_dashboard_proto_msgTypes[0].OneofWrappers = []any{ (*Dashboard_GridLayout)(nil), (*Dashboard_MosaicLayout)(nil), diff --git a/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go b/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go index d2103ec4c2ec..b49f6a3715ce 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/dashboard_filter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/dashboard_filter.proto @@ -125,11 +125,9 @@ type DashboardFilter struct { func (x *DashboardFilter) Reset() { *x = DashboardFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DashboardFilter) String() string { @@ -140,7 +138,7 @@ func (*DashboardFilter) ProtoMessage() {} func (x *DashboardFilter) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,20 +285,6 @@ func file_google_monitoring_dashboard_v1_dashboard_filter_proto_init() { if File_google_monitoring_dashboard_v1_dashboard_filter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DashboardFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_dashboard_v1_dashboard_filter_proto_msgTypes[0].OneofWrappers = []any{ (*DashboardFilter_StringValue)(nil), } diff --git a/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go b/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go index 09a86a36e24e..263eb2284aaf 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/dashboards_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/dashboards_service.proto @@ -62,11 +62,9 @@ type CreateDashboardRequest struct { func (x *CreateDashboardRequest) Reset() { *x = CreateDashboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDashboardRequest) String() string { @@ -77,7 +75,7 @@ func (*CreateDashboardRequest) ProtoMessage() {} func (x *CreateDashboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,11 +133,9 @@ type ListDashboardsRequest struct { func (x *ListDashboardsRequest) Reset() { *x = ListDashboardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDashboardsRequest) String() string { @@ -150,7 +146,7 @@ func (*ListDashboardsRequest) ProtoMessage() {} func (x *ListDashboardsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type ListDashboardsResponse struct { func (x *ListDashboardsResponse) Reset() { *x = ListDashboardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDashboardsResponse) String() string { @@ -217,7 +211,7 @@ func (*ListDashboardsResponse) ProtoMessage() {} func (x *ListDashboardsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +256,9 @@ type GetDashboardRequest struct { func (x *GetDashboardRequest) Reset() { *x = GetDashboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDashboardRequest) String() string { @@ -277,7 +269,7 @@ func (*GetDashboardRequest) ProtoMessage() {} func (x *GetDashboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +305,9 @@ type DeleteDashboardRequest struct { func (x *DeleteDashboardRequest) Reset() { *x = DeleteDashboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDashboardRequest) String() string { @@ -328,7 +318,7 @@ func (*DeleteDashboardRequest) ProtoMessage() {} func (x *DeleteDashboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +355,9 @@ type UpdateDashboardRequest struct { func (x *UpdateDashboardRequest) Reset() { *x = UpdateDashboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDashboardRequest) String() string { @@ -380,7 +368,7 @@ func (*UpdateDashboardRequest) ProtoMessage() {} func (x *UpdateDashboardRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,80 +610,6 @@ func file_google_monitoring_dashboard_v1_dashboards_service_proto_init() { return } file_google_monitoring_dashboard_v1_dashboard_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateDashboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListDashboardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDashboardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetDashboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDashboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_dashboards_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDashboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go b/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go index 2029cd534801..78ffcff6d0fc 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/drilldowns.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/drilldowns.proto diff --git a/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go b/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go index 6e88986e8ac1..d70d34cfd3aa 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/error_reporting_panel.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/error_reporting_panel.proto @@ -65,11 +65,9 @@ type ErrorReportingPanel struct { func (x *ErrorReportingPanel) Reset() { *x = ErrorReportingPanel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorReportingPanel) String() string { @@ -80,7 +78,7 @@ func (*ErrorReportingPanel) ProtoMessage() {} func (x *ErrorReportingPanel) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,20 +176,6 @@ func file_google_monitoring_dashboard_v1_error_reporting_panel_proto_init() { if File_google_monitoring_dashboard_v1_error_reporting_panel_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_error_reporting_panel_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ErrorReportingPanel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go b/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go index 3fd79f0e43a6..eb317143322a 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/incident_list.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/incident_list.proto @@ -56,11 +56,9 @@ type IncidentList struct { func (x *IncidentList) Reset() { *x = IncidentList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IncidentList) String() string { @@ -71,7 +69,7 @@ func (*IncidentList) ProtoMessage() {} func (x *IncidentList) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,20 +169,6 @@ func file_google_monitoring_dashboard_v1_incident_list_proto_init() { if File_google_monitoring_dashboard_v1_incident_list_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_incident_list_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IncidentList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go b/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go index abe9b5c3080a..2c615309bad2 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/layouts.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/layouts.proto @@ -51,11 +51,9 @@ type GridLayout struct { func (x *GridLayout) Reset() { *x = GridLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GridLayout) String() string { @@ -66,7 +64,7 @@ func (*GridLayout) ProtoMessage() {} func (x *GridLayout) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,11 +110,9 @@ type MosaicLayout struct { func (x *MosaicLayout) Reset() { *x = MosaicLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MosaicLayout) String() string { @@ -127,7 +123,7 @@ func (*MosaicLayout) ProtoMessage() {} func (x *MosaicLayout) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +165,9 @@ type RowLayout struct { func (x *RowLayout) Reset() { *x = RowLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowLayout) String() string { @@ -184,7 +178,7 @@ func (*RowLayout) ProtoMessage() {} func (x *RowLayout) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +213,9 @@ type ColumnLayout struct { func (x *ColumnLayout) Reset() { *x = ColumnLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnLayout) String() string { @@ -234,7 +226,7 @@ func (*ColumnLayout) ProtoMessage() {} func (x *ColumnLayout) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +274,9 @@ type MosaicLayout_Tile struct { func (x *MosaicLayout_Tile) Reset() { *x = MosaicLayout_Tile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MosaicLayout_Tile) String() string { @@ -297,7 +287,7 @@ func (*MosaicLayout_Tile) ProtoMessage() {} func (x *MosaicLayout_Tile) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +354,9 @@ type RowLayout_Row struct { func (x *RowLayout_Row) Reset() { *x = RowLayout_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowLayout_Row) String() string { @@ -379,7 +367,7 @@ func (*RowLayout_Row) ProtoMessage() {} func (x *RowLayout_Row) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +413,9 @@ type ColumnLayout_Column struct { func (x *ColumnLayout_Column) Reset() { *x = ColumnLayout_Column{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnLayout_Column) String() string { @@ -440,7 +426,7 @@ func (*ColumnLayout_Column) ProtoMessage() {} func (x *ColumnLayout_Column) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,92 +575,6 @@ func file_google_monitoring_dashboard_v1_layouts_proto_init() { return } file_google_monitoring_dashboard_v1_widget_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GridLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MosaicLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RowLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ColumnLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MosaicLayout_Tile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RowLayout_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_layouts_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ColumnLayout_Column); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go b/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go index 7090c5ea56f5..64ce83452b6b 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/logs_panel.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/logs_panel.proto @@ -53,11 +53,9 @@ type LogsPanel struct { func (x *LogsPanel) Reset() { *x = LogsPanel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogsPanel) String() string { @@ -68,7 +66,7 @@ func (*LogsPanel) ProtoMessage() {} func (x *LogsPanel) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_monitoring_dashboard_v1_logs_panel_proto_init() { if File_google_monitoring_dashboard_v1_logs_panel_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_logs_panel_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogsPanel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go b/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go index c18c32b8cafd..e52bb7ddf0b7 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/metrics.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/metrics.proto @@ -287,11 +287,9 @@ type TimeSeriesQuery struct { func (x *TimeSeriesQuery) Reset() { *x = TimeSeriesQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesQuery) String() string { @@ -302,7 +300,7 @@ func (*TimeSeriesQuery) ProtoMessage() {} func (x *TimeSeriesQuery) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +426,9 @@ type TimeSeriesFilter struct { func (x *TimeSeriesFilter) Reset() { *x = TimeSeriesFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesFilter) String() string { @@ -443,7 +439,7 @@ func (*TimeSeriesFilter) ProtoMessage() {} func (x *TimeSeriesFilter) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +544,9 @@ type TimeSeriesFilterRatio struct { func (x *TimeSeriesFilterRatio) Reset() { *x = TimeSeriesFilterRatio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesFilterRatio) String() string { @@ -563,7 +557,7 @@ func (*TimeSeriesFilterRatio) ProtoMessage() {} func (x *TimeSeriesFilterRatio) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +659,9 @@ type Threshold struct { func (x *Threshold) Reset() { *x = Threshold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Threshold) String() string { @@ -680,7 +672,7 @@ func (*Threshold) ProtoMessage() {} func (x *Threshold) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +741,9 @@ type TimeSeriesFilterRatio_RatioPart struct { func (x *TimeSeriesFilterRatio_RatioPart) Reset() { *x = TimeSeriesFilterRatio_RatioPart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesFilterRatio_RatioPart) String() string { @@ -764,7 +754,7 @@ func (*TimeSeriesFilterRatio_RatioPart) ProtoMessage() {} func (x *TimeSeriesFilterRatio_RatioPart) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,68 +1008,6 @@ func file_google_monitoring_dashboard_v1_metrics_proto_init() { return } file_google_monitoring_dashboard_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesFilterRatio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Threshold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesFilterRatio_RatioPart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_dashboard_v1_metrics_proto_msgTypes[0].OneofWrappers = []any{ (*TimeSeriesQuery_TimeSeriesFilter)(nil), (*TimeSeriesQuery_TimeSeriesFilterRatio)(nil), diff --git a/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go b/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go index 678e98492e7f..e0f40725af6c 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/piechart.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/piechart.proto @@ -106,11 +106,9 @@ type PieChart struct { func (x *PieChart) Reset() { *x = PieChart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PieChart) String() string { @@ -121,7 +119,7 @@ func (*PieChart) ProtoMessage() {} func (x *PieChart) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +181,9 @@ type PieChart_PieChartDataSet struct { func (x *PieChart_PieChartDataSet) Reset() { *x = PieChart_PieChartDataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PieChart_PieChartDataSet) String() string { @@ -198,7 +194,7 @@ func (*PieChart_PieChartDataSet) ProtoMessage() {} func (x *PieChart_PieChartDataSet) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,32 +337,6 @@ func file_google_monitoring_dashboard_v1_piechart_proto_init() { return } file_google_monitoring_dashboard_v1_metrics_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PieChart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_piechart_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PieChart_PieChartDataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go b/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go index 112695b0cf1f..7dfaf19904a9 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/scorecard.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/scorecard.proto @@ -105,11 +105,9 @@ type Scorecard struct { func (x *Scorecard) Reset() { *x = Scorecard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scorecard) String() string { @@ -120,7 +118,7 @@ func (*Scorecard) ProtoMessage() {} func (x *Scorecard) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type Scorecard_GaugeView struct { func (x *Scorecard_GaugeView) Reset() { *x = Scorecard_GaugeView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scorecard_GaugeView) String() string { @@ -236,7 +232,7 @@ func (*Scorecard_GaugeView) ProtoMessage() {} func (x *Scorecard_GaugeView) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -286,11 +282,9 @@ type Scorecard_SparkChartView struct { func (x *Scorecard_SparkChartView) Reset() { *x = Scorecard_SparkChartView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scorecard_SparkChartView) String() string { @@ -301,7 +295,7 @@ func (*Scorecard_SparkChartView) ProtoMessage() {} func (x *Scorecard_SparkChartView) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,44 +448,6 @@ func file_google_monitoring_dashboard_v1_scorecard_proto_init() { return } file_google_monitoring_dashboard_v1_metrics_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Scorecard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Scorecard_GaugeView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Scorecard_SparkChartView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_dashboard_v1_scorecard_proto_msgTypes[0].OneofWrappers = []any{ (*Scorecard_GaugeView_)(nil), (*Scorecard_SparkChartView_)(nil), diff --git a/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go b/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go index 1b153b1f2349..1b577ea0e161 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/section_header.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/section_header.proto @@ -50,11 +50,9 @@ type SectionHeader struct { func (x *SectionHeader) Reset() { *x = SectionHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SectionHeader) String() string { @@ -65,7 +63,7 @@ func (*SectionHeader) ProtoMessage() {} func (x *SectionHeader) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +153,6 @@ func file_google_monitoring_dashboard_v1_section_header_proto_init() { if File_google_monitoring_dashboard_v1_section_header_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_section_header_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SectionHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/service.pb.go b/monitoring/dashboard/apiv1/dashboardpb/service.pb.go index e0f9fbb25168..775286489d95 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/service.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/service.proto diff --git a/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go b/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go index c9a444ebab36..fd75b4b26292 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/single_view_group.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/single_view_group.proto @@ -46,11 +46,9 @@ type SingleViewGroup struct { func (x *SingleViewGroup) Reset() { *x = SingleViewGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SingleViewGroup) String() string { @@ -61,7 +59,7 @@ func (*SingleViewGroup) ProtoMessage() {} func (x *SingleViewGroup) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,20 +132,6 @@ func file_google_monitoring_dashboard_v1_single_view_group_proto_init() { if File_google_monitoring_dashboard_v1_single_view_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_single_view_group_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SingleViewGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/table.pb.go b/monitoring/dashboard/apiv1/dashboardpb/table.pb.go index 26b7e2c82c04..d59e5d76df01 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/table.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/table.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/table.proto @@ -106,11 +106,9 @@ type TimeSeriesTable struct { func (x *TimeSeriesTable) Reset() { *x = TimeSeriesTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesTable) String() string { @@ -121,7 +119,7 @@ func (*TimeSeriesTable) ProtoMessage() {} func (x *TimeSeriesTable) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +182,9 @@ type TimeSeriesTable_TableDataSet struct { func (x *TimeSeriesTable_TableDataSet) Reset() { *x = TimeSeriesTable_TableDataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesTable_TableDataSet) String() string { @@ -199,7 +195,7 @@ func (*TimeSeriesTable_TableDataSet) ProtoMessage() {} func (x *TimeSeriesTable_TableDataSet) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +252,9 @@ type TimeSeriesTable_ColumnSettings struct { func (x *TimeSeriesTable_ColumnSettings) Reset() { *x = TimeSeriesTable_ColumnSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeSeriesTable_ColumnSettings) String() string { @@ -271,7 +265,7 @@ func (*TimeSeriesTable_ColumnSettings) ProtoMessage() {} func (x *TimeSeriesTable_ColumnSettings) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_table_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,44 +429,6 @@ func file_google_monitoring_dashboard_v1_table_proto_init() { } file_google_monitoring_dashboard_v1_metrics_proto_init() file_google_monitoring_dashboard_v1_table_display_options_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_table_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_table_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesTable_TableDataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_table_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TimeSeriesTable_ColumnSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go b/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go index d654d9e18c05..9511d49c2414 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/table_display_options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/table_display_options.proto @@ -51,11 +51,9 @@ type TableDisplayOptions struct { func (x *TableDisplayOptions) Reset() { *x = TableDisplayOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableDisplayOptions) String() string { @@ -66,7 +64,7 @@ func (*TableDisplayOptions) ProtoMessage() {} func (x *TableDisplayOptions) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,20 +150,6 @@ func file_google_monitoring_dashboard_v1_table_display_options_proto_init() { if File_google_monitoring_dashboard_v1_table_display_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_table_display_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TableDisplayOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/text.pb.go b/monitoring/dashboard/apiv1/dashboardpb/text.pb.go index ab45f55d1456..2fa06a5871f2 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/text.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/text.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/text.proto @@ -442,11 +442,9 @@ type Text struct { func (x *Text) Reset() { *x = Text{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Text) String() string { @@ -457,7 +455,7 @@ func (*Text) ProtoMessage() {} func (x *Text) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +516,9 @@ type Text_TextStyle struct { func (x *Text_TextStyle) Reset() { *x = Text_TextStyle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Text_TextStyle) String() string { @@ -533,7 +529,7 @@ func (*Text_TextStyle) ProtoMessage() {} func (x *Text_TextStyle) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_text_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,32 +759,6 @@ func file_google_monitoring_dashboard_v1_text_proto_init() { if File_google_monitoring_dashboard_v1_text_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_text_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Text); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_text_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Text_TextStyle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go b/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go index 51c368ad7412..afd7293566f2 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/widget.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/widget.proto @@ -71,11 +71,9 @@ type Widget struct { func (x *Widget) Reset() { *x = Widget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Widget) String() string { @@ -86,7 +84,7 @@ func (*Widget) ProtoMessage() {} func (x *Widget) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,20 +513,6 @@ func file_google_monitoring_dashboard_v1_widget_proto_init() { file_google_monitoring_dashboard_v1_table_proto_init() file_google_monitoring_dashboard_v1_text_proto_init() file_google_monitoring_dashboard_v1_xychart_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Widget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_monitoring_dashboard_v1_widget_proto_msgTypes[0].OneofWrappers = []any{ (*Widget_XyChart)(nil), (*Widget_Scorecard)(nil), diff --git a/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go b/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go index 9a9eb0ada1a0..bcde170788cd 100755 --- a/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go +++ b/monitoring/dashboard/apiv1/dashboardpb/xychart.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/dashboard/v1/xychart.proto @@ -301,11 +301,9 @@ type XyChart struct { func (x *XyChart) Reset() { *x = XyChart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XyChart) String() string { @@ -316,7 +314,7 @@ func (*XyChart) ProtoMessage() {} func (x *XyChart) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +390,9 @@ type ChartOptions struct { func (x *ChartOptions) Reset() { *x = ChartOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChartOptions) String() string { @@ -407,7 +403,7 @@ func (*ChartOptions) ProtoMessage() {} func (x *ChartOptions) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +452,9 @@ type XyChart_DataSet struct { func (x *XyChart_DataSet) Reset() { *x = XyChart_DataSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XyChart_DataSet) String() string { @@ -471,7 +465,7 @@ func (*XyChart_DataSet) ProtoMessage() {} func (x *XyChart_DataSet) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +529,9 @@ type XyChart_Axis struct { func (x *XyChart_Axis) Reset() { *x = XyChart_Axis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *XyChart_Axis) String() string { @@ -550,7 +542,7 @@ func (*XyChart_Axis) ProtoMessage() {} func (x *XyChart_Axis) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,56 +747,6 @@ func file_google_monitoring_dashboard_v1_xychart_proto_init() { return } file_google_monitoring_dashboard_v1_metrics_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*XyChart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ChartOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*XyChart_DataSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_dashboard_v1_xychart_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*XyChart_Axis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/dashboard/apiv1/dashboards_client.go b/monitoring/dashboard/apiv1/dashboards_client.go index a780cd7a1e27..7644024f2904 100755 --- a/monitoring/dashboard/apiv1/dashboards_client.go +++ b/monitoring/dashboard/apiv1/dashboards_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( dashboardpb "cloud.google.com/go/monitoring/dashboard/apiv1/dashboardpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type dashboardsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDashboardsClient creates a new dashboards service client based on gRPC. @@ -280,6 +281,7 @@ func NewDashboardsClient(ctx context.Context, opts ...option.ClientOption) (*Das connPool: connPool, dashboardsClient: dashboardpb.NewDashboardsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -326,6 +328,8 @@ type dashboardsRESTClient struct { // Points back to the CallOptions field of the containing DashboardsClient CallOptions **DashboardsCallOptions + + logger *slog.Logger } // NewDashboardsRESTClient creates a new dashboards service rest client. @@ -344,6 +348,7 @@ func NewDashboardsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -396,7 +401,7 @@ func (c *dashboardsGRPCClient) CreateDashboard(ctx context.Context, req *dashboa var resp *dashboardpb.Dashboard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dashboardsClient.CreateDashboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dashboardsClient.CreateDashboard, req, settings.GRPC, c.logger, "CreateDashboard") return err }, opts...) if err != nil { @@ -425,7 +430,7 @@ func (c *dashboardsGRPCClient) ListDashboards(ctx context.Context, req *dashboar } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dashboardsClient.ListDashboards(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dashboardsClient.ListDashboards, req, settings.GRPC, c.logger, "ListDashboards") return err }, opts...) if err != nil { @@ -460,7 +465,7 @@ func (c *dashboardsGRPCClient) GetDashboard(ctx context.Context, req *dashboardp var resp *dashboardpb.Dashboard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dashboardsClient.GetDashboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dashboardsClient.GetDashboard, req, settings.GRPC, c.logger, "GetDashboard") return err }, opts...) if err != nil { @@ -477,7 +482,7 @@ func (c *dashboardsGRPCClient) DeleteDashboard(ctx context.Context, req *dashboa opts = append((*c.CallOptions).DeleteDashboard[0:len((*c.CallOptions).DeleteDashboard):len((*c.CallOptions).DeleteDashboard)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.dashboardsClient.DeleteDashboard(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.dashboardsClient.DeleteDashboard, req, settings.GRPC, c.logger, "DeleteDashboard") return err }, opts...) return err @@ -492,7 +497,7 @@ func (c *dashboardsGRPCClient) UpdateDashboard(ctx context.Context, req *dashboa var resp *dashboardpb.Dashboard err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.dashboardsClient.UpdateDashboard(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.dashboardsClient.UpdateDashboard, req, settings.GRPC, c.logger, "UpdateDashboard") return err }, opts...) if err != nil { @@ -549,17 +554,7 @@ func (c *dashboardsRESTClient) CreateDashboard(ctx context.Context, req *dashboa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDashboard") if err != nil { return err } @@ -625,21 +620,10 @@ func (c *dashboardsRESTClient) ListDashboards(ctx context.Context, req *dashboar } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDashboards") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -706,17 +690,7 @@ func (c *dashboardsRESTClient) GetDashboard(ctx context.Context, req *dashboardp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDashboard") if err != nil { return err } @@ -767,15 +741,8 @@ func (c *dashboardsRESTClient) DeleteDashboard(ctx context.Context, req *dashboa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDashboard") + return err }, opts...) } @@ -826,17 +793,7 @@ func (c *dashboardsRESTClient) UpdateDashboard(ctx context.Context, req *dashboa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDashboard") if err != nil { return err } diff --git a/monitoring/dashboard/apiv1/dashboards_client_example_go123_test.go b/monitoring/dashboard/apiv1/dashboards_client_example_go123_test.go index 8cf0ba9b7a16..807e81ff3156 100644 --- a/monitoring/dashboard/apiv1/dashboards_client_example_go123_test.go +++ b/monitoring/dashboard/apiv1/dashboards_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleDashboardsClient_ListDashboards_all() { } for resp, err := range c.ListDashboards(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/monitoring/dashboard/apiv1/helpers.go b/monitoring/dashboard/apiv1/helpers.go index 8ae6b64eec65..d0e548e4dd4a 100755 --- a/monitoring/dashboard/apiv1/helpers.go +++ b/monitoring/dashboard/apiv1/helpers.go @@ -18,10 +18,20 @@ package dashboard import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "monitoring.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/monitoring.write", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/monitoring/metricsscope/apiv1/helpers.go b/monitoring/metricsscope/apiv1/helpers.go index acae377b97e7..54190d32b6e9 100755 --- a/monitoring/metricsscope/apiv1/helpers.go +++ b/monitoring/metricsscope/apiv1/helpers.go @@ -18,10 +18,16 @@ package metricsscope import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "monitoring.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +51,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/monitoring.write", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/monitoring/metricsscope/apiv1/metrics_scopes_client.go b/monitoring/metricsscope/apiv1/metrics_scopes_client.go index 02b0a61c174b..1110d977a443 100755 --- a/monitoring/metricsscope/apiv1/metrics_scopes_client.go +++ b/monitoring/metricsscope/apiv1/metrics_scopes_client.go @@ -19,6 +19,7 @@ package metricsscope import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -176,6 +177,8 @@ type metricsScopesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMetricsScopesClient creates a new metrics scopes client based on gRPC. @@ -203,6 +206,7 @@ func NewMetricsScopesClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, metricsScopesClient: metricsscopepb.NewMetricsScopesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -256,7 +260,7 @@ func (c *metricsScopesGRPCClient) GetMetricsScope(ctx context.Context, req *metr var resp *metricsscopepb.MetricsScope err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsScopesClient.GetMetricsScope(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsScopesClient.GetMetricsScope, req, settings.GRPC, c.logger, "GetMetricsScope") return err }, opts...) if err != nil { @@ -271,7 +275,7 @@ func (c *metricsScopesGRPCClient) ListMetricsScopesByMonitoredProject(ctx contex var resp *metricsscopepb.ListMetricsScopesByMonitoredProjectResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsScopesClient.ListMetricsScopesByMonitoredProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsScopesClient.ListMetricsScopesByMonitoredProject, req, settings.GRPC, c.logger, "ListMetricsScopesByMonitoredProject") return err }, opts...) if err != nil { @@ -289,7 +293,7 @@ func (c *metricsScopesGRPCClient) CreateMonitoredProject(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsScopesClient.CreateMonitoredProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsScopesClient.CreateMonitoredProject, req, settings.GRPC, c.logger, "CreateMonitoredProject") return err }, opts...) if err != nil { @@ -309,7 +313,7 @@ func (c *metricsScopesGRPCClient) DeleteMonitoredProject(ctx context.Context, re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.metricsScopesClient.DeleteMonitoredProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.metricsScopesClient.DeleteMonitoredProject, req, settings.GRPC, c.logger, "DeleteMonitoredProject") return err }, opts...) if err != nil { diff --git a/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scope.pb.go b/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scope.pb.go index dac70335e7a1..acbb74294bf8 100755 --- a/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scope.pb.go +++ b/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scope.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/metricsscope/v1/metrics_scope.proto @@ -63,11 +63,9 @@ type MetricsScope struct { func (x *MetricsScope) Reset() { *x = MetricsScope{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricsScope) String() string { @@ -78,7 +76,7 @@ func (*MetricsScope) ProtoMessage() {} func (x *MetricsScope) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141,11 +139,9 @@ type MonitoredProject struct { func (x *MonitoredProject) Reset() { *x = MonitoredProject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonitoredProject) String() string { @@ -156,7 +152,7 @@ func (*MonitoredProject) ProtoMessage() {} func (x *MonitoredProject) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,32 +288,6 @@ func file_google_monitoring_metricsscope_v1_metrics_scope_proto_init() { if File_google_monitoring_metricsscope_v1_metrics_scope_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetricsScope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scope_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MonitoredProject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scopes.pb.go b/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scopes.pb.go index 54e1a2c6e235..d6c71c894f02 100755 --- a/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scopes.pb.go +++ b/monitoring/metricsscope/apiv1/metricsscopepb/metrics_scopes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/monitoring/metricsscope/v1/metrics_scopes.proto @@ -117,11 +117,9 @@ type GetMetricsScopeRequest struct { func (x *GetMetricsScopeRequest) Reset() { *x = GetMetricsScopeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetricsScopeRequest) String() string { @@ -132,7 +130,7 @@ func (*GetMetricsScopeRequest) ProtoMessage() {} func (x *GetMetricsScopeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +166,9 @@ type ListMetricsScopesByMonitoredProjectRequest struct { func (x *ListMetricsScopesByMonitoredProjectRequest) Reset() { *x = ListMetricsScopesByMonitoredProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetricsScopesByMonitoredProjectRequest) String() string { @@ -183,7 +179,7 @@ func (*ListMetricsScopesByMonitoredProjectRequest) ProtoMessage() {} func (x *ListMetricsScopesByMonitoredProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +214,9 @@ type ListMetricsScopesByMonitoredProjectResponse struct { func (x *ListMetricsScopesByMonitoredProjectResponse) Reset() { *x = ListMetricsScopesByMonitoredProjectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMetricsScopesByMonitoredProjectResponse) String() string { @@ -233,7 +227,7 @@ func (*ListMetricsScopesByMonitoredProjectResponse) ProtoMessage() {} func (x *ListMetricsScopesByMonitoredProjectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,11 +269,9 @@ type CreateMonitoredProjectRequest struct { func (x *CreateMonitoredProjectRequest) Reset() { *x = CreateMonitoredProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMonitoredProjectRequest) String() string { @@ -290,7 +282,7 @@ func (*CreateMonitoredProjectRequest) ProtoMessage() {} func (x *CreateMonitoredProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,11 +329,9 @@ type DeleteMonitoredProjectRequest struct { func (x *DeleteMonitoredProjectRequest) Reset() { *x = DeleteMonitoredProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMonitoredProjectRequest) String() string { @@ -352,7 +342,7 @@ func (*DeleteMonitoredProjectRequest) ProtoMessage() {} func (x *DeleteMonitoredProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +381,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -406,7 +394,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,80 +665,6 @@ func file_google_monitoring_metricsscope_v1_metrics_scopes_proto_init() { return } file_google_monitoring_metricsscope_v1_metrics_scope_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetMetricsScopeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListMetricsScopesByMonitoredProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListMetricsScopesByMonitoredProjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateMonitoredProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMonitoredProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_monitoring_metricsscope_v1_metrics_scopes_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/helpers.go b/netapp/apiv1/helpers.go index 9948fbd95efb..c9e9f79e9bd9 100755 --- a/netapp/apiv1/helpers.go +++ b/netapp/apiv1/helpers.go @@ -18,10 +18,20 @@ package netapp import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "netapp.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/netapp/apiv1/net_app_client.go b/netapp/apiv1/net_app_client.go index 9de06d603d17..034e6208245c 100755 --- a/netapp/apiv1/net_app_client.go +++ b/netapp/apiv1/net_app_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" netapppb "cloud.google.com/go/netapp/apiv1/netapppb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1451,6 +1450,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new net app client based on gRPC. @@ -1477,6 +1478,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: netapppb.NewNetAppClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1541,6 +1543,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new net app rest client. @@ -1558,6 +1562,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1631,7 +1636,7 @@ func (c *gRPCClient) ListStoragePools(ctx context.Context, req *netapppb.ListSto } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListStoragePools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListStoragePools, req, settings.GRPC, c.logger, "ListStoragePools") return err }, opts...) if err != nil { @@ -1666,7 +1671,7 @@ func (c *gRPCClient) CreateStoragePool(ctx context.Context, req *netapppb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateStoragePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateStoragePool, req, settings.GRPC, c.logger, "CreateStoragePool") return err }, opts...) if err != nil { @@ -1686,7 +1691,7 @@ func (c *gRPCClient) GetStoragePool(ctx context.Context, req *netapppb.GetStorag var resp *netapppb.StoragePool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetStoragePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetStoragePool, req, settings.GRPC, c.logger, "GetStoragePool") return err }, opts...) if err != nil { @@ -1704,7 +1709,7 @@ func (c *gRPCClient) UpdateStoragePool(ctx context.Context, req *netapppb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateStoragePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateStoragePool, req, settings.GRPC, c.logger, "UpdateStoragePool") return err }, opts...) if err != nil { @@ -1724,7 +1729,7 @@ func (c *gRPCClient) DeleteStoragePool(ctx context.Context, req *netapppb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteStoragePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteStoragePool, req, settings.GRPC, c.logger, "DeleteStoragePool") return err }, opts...) if err != nil { @@ -1744,7 +1749,7 @@ func (c *gRPCClient) SwitchActiveReplicaZone(ctx context.Context, req *netapppb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SwitchActiveReplicaZone(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SwitchActiveReplicaZone, req, settings.GRPC, c.logger, "SwitchActiveReplicaZone") return err }, opts...) if err != nil { @@ -1775,7 +1780,7 @@ func (c *gRPCClient) ListVolumes(ctx context.Context, req *netapppb.ListVolumesR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVolumes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVolumes, req, settings.GRPC, c.logger, "ListVolumes") return err }, opts...) if err != nil { @@ -1810,7 +1815,7 @@ func (c *gRPCClient) GetVolume(ctx context.Context, req *netapppb.GetVolumeReque var resp *netapppb.Volume err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVolume, req, settings.GRPC, c.logger, "GetVolume") return err }, opts...) if err != nil { @@ -1828,7 +1833,7 @@ func (c *gRPCClient) CreateVolume(ctx context.Context, req *netapppb.CreateVolum var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateVolume, req, settings.GRPC, c.logger, "CreateVolume") return err }, opts...) if err != nil { @@ -1848,7 +1853,7 @@ func (c *gRPCClient) UpdateVolume(ctx context.Context, req *netapppb.UpdateVolum var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateVolume, req, settings.GRPC, c.logger, "UpdateVolume") return err }, opts...) if err != nil { @@ -1868,7 +1873,7 @@ func (c *gRPCClient) DeleteVolume(ctx context.Context, req *netapppb.DeleteVolum var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteVolume, req, settings.GRPC, c.logger, "DeleteVolume") return err }, opts...) if err != nil { @@ -1888,7 +1893,7 @@ func (c *gRPCClient) RevertVolume(ctx context.Context, req *netapppb.RevertVolum var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RevertVolume(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RevertVolume, req, settings.GRPC, c.logger, "RevertVolume") return err }, opts...) if err != nil { @@ -1919,7 +1924,7 @@ func (c *gRPCClient) ListSnapshots(ctx context.Context, req *netapppb.ListSnapsh } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSnapshots, req, settings.GRPC, c.logger, "ListSnapshots") return err }, opts...) if err != nil { @@ -1954,7 +1959,7 @@ func (c *gRPCClient) GetSnapshot(ctx context.Context, req *netapppb.GetSnapshotR var resp *netapppb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSnapshot, req, settings.GRPC, c.logger, "GetSnapshot") return err }, opts...) if err != nil { @@ -1972,7 +1977,7 @@ func (c *gRPCClient) CreateSnapshot(ctx context.Context, req *netapppb.CreateSna var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSnapshot, req, settings.GRPC, c.logger, "CreateSnapshot") return err }, opts...) if err != nil { @@ -1992,7 +1997,7 @@ func (c *gRPCClient) DeleteSnapshot(ctx context.Context, req *netapppb.DeleteSna var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSnapshot, req, settings.GRPC, c.logger, "DeleteSnapshot") return err }, opts...) if err != nil { @@ -2012,7 +2017,7 @@ func (c *gRPCClient) UpdateSnapshot(ctx context.Context, req *netapppb.UpdateSna var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSnapshot, req, settings.GRPC, c.logger, "UpdateSnapshot") return err }, opts...) if err != nil { @@ -2043,7 +2048,7 @@ func (c *gRPCClient) ListActiveDirectories(ctx context.Context, req *netapppb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListActiveDirectories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListActiveDirectories, req, settings.GRPC, c.logger, "ListActiveDirectories") return err }, opts...) if err != nil { @@ -2078,7 +2083,7 @@ func (c *gRPCClient) GetActiveDirectory(ctx context.Context, req *netapppb.GetAc var resp *netapppb.ActiveDirectory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetActiveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetActiveDirectory, req, settings.GRPC, c.logger, "GetActiveDirectory") return err }, opts...) if err != nil { @@ -2096,7 +2101,7 @@ func (c *gRPCClient) CreateActiveDirectory(ctx context.Context, req *netapppb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateActiveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateActiveDirectory, req, settings.GRPC, c.logger, "CreateActiveDirectory") return err }, opts...) if err != nil { @@ -2116,7 +2121,7 @@ func (c *gRPCClient) UpdateActiveDirectory(ctx context.Context, req *netapppb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateActiveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateActiveDirectory, req, settings.GRPC, c.logger, "UpdateActiveDirectory") return err }, opts...) if err != nil { @@ -2136,7 +2141,7 @@ func (c *gRPCClient) DeleteActiveDirectory(ctx context.Context, req *netapppb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteActiveDirectory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteActiveDirectory, req, settings.GRPC, c.logger, "DeleteActiveDirectory") return err }, opts...) if err != nil { @@ -2167,7 +2172,7 @@ func (c *gRPCClient) ListKmsConfigs(ctx context.Context, req *netapppb.ListKmsCo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListKmsConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListKmsConfigs, req, settings.GRPC, c.logger, "ListKmsConfigs") return err }, opts...) if err != nil { @@ -2202,7 +2207,7 @@ func (c *gRPCClient) CreateKmsConfig(ctx context.Context, req *netapppb.CreateKm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateKmsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateKmsConfig, req, settings.GRPC, c.logger, "CreateKmsConfig") return err }, opts...) if err != nil { @@ -2222,7 +2227,7 @@ func (c *gRPCClient) GetKmsConfig(ctx context.Context, req *netapppb.GetKmsConfi var resp *netapppb.KmsConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetKmsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetKmsConfig, req, settings.GRPC, c.logger, "GetKmsConfig") return err }, opts...) if err != nil { @@ -2240,7 +2245,7 @@ func (c *gRPCClient) UpdateKmsConfig(ctx context.Context, req *netapppb.UpdateKm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateKmsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateKmsConfig, req, settings.GRPC, c.logger, "UpdateKmsConfig") return err }, opts...) if err != nil { @@ -2260,7 +2265,7 @@ func (c *gRPCClient) EncryptVolumes(ctx context.Context, req *netapppb.EncryptVo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EncryptVolumes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EncryptVolumes, req, settings.GRPC, c.logger, "EncryptVolumes") return err }, opts...) if err != nil { @@ -2280,7 +2285,7 @@ func (c *gRPCClient) VerifyKmsConfig(ctx context.Context, req *netapppb.VerifyKm var resp *netapppb.VerifyKmsConfigResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.VerifyKmsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.VerifyKmsConfig, req, settings.GRPC, c.logger, "VerifyKmsConfig") return err }, opts...) if err != nil { @@ -2298,7 +2303,7 @@ func (c *gRPCClient) DeleteKmsConfig(ctx context.Context, req *netapppb.DeleteKm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteKmsConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteKmsConfig, req, settings.GRPC, c.logger, "DeleteKmsConfig") return err }, opts...) if err != nil { @@ -2329,7 +2334,7 @@ func (c *gRPCClient) ListReplications(ctx context.Context, req *netapppb.ListRep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReplications(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReplications, req, settings.GRPC, c.logger, "ListReplications") return err }, opts...) if err != nil { @@ -2364,7 +2369,7 @@ func (c *gRPCClient) GetReplication(ctx context.Context, req *netapppb.GetReplic var resp *netapppb.Replication err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReplication, req, settings.GRPC, c.logger, "GetReplication") return err }, opts...) if err != nil { @@ -2382,7 +2387,7 @@ func (c *gRPCClient) CreateReplication(ctx context.Context, req *netapppb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReplication, req, settings.GRPC, c.logger, "CreateReplication") return err }, opts...) if err != nil { @@ -2402,7 +2407,7 @@ func (c *gRPCClient) DeleteReplication(ctx context.Context, req *netapppb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteReplication, req, settings.GRPC, c.logger, "DeleteReplication") return err }, opts...) if err != nil { @@ -2422,7 +2427,7 @@ func (c *gRPCClient) UpdateReplication(ctx context.Context, req *netapppb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateReplication, req, settings.GRPC, c.logger, "UpdateReplication") return err }, opts...) if err != nil { @@ -2442,7 +2447,7 @@ func (c *gRPCClient) StopReplication(ctx context.Context, req *netapppb.StopRepl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopReplication, req, settings.GRPC, c.logger, "StopReplication") return err }, opts...) if err != nil { @@ -2462,7 +2467,7 @@ func (c *gRPCClient) ResumeReplication(ctx context.Context, req *netapppb.Resume var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeReplication, req, settings.GRPC, c.logger, "ResumeReplication") return err }, opts...) if err != nil { @@ -2482,7 +2487,7 @@ func (c *gRPCClient) ReverseReplicationDirection(ctx context.Context, req *netap var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReverseReplicationDirection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReverseReplicationDirection, req, settings.GRPC, c.logger, "ReverseReplicationDirection") return err }, opts...) if err != nil { @@ -2502,7 +2507,7 @@ func (c *gRPCClient) EstablishPeering(ctx context.Context, req *netapppb.Establi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EstablishPeering(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EstablishPeering, req, settings.GRPC, c.logger, "EstablishPeering") return err }, opts...) if err != nil { @@ -2522,7 +2527,7 @@ func (c *gRPCClient) SyncReplication(ctx context.Context, req *netapppb.SyncRepl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SyncReplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SyncReplication, req, settings.GRPC, c.logger, "SyncReplication") return err }, opts...) if err != nil { @@ -2542,7 +2547,7 @@ func (c *gRPCClient) CreateBackupVault(ctx context.Context, req *netapppb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackupVault, req, settings.GRPC, c.logger, "CreateBackupVault") return err }, opts...) if err != nil { @@ -2562,7 +2567,7 @@ func (c *gRPCClient) GetBackupVault(ctx context.Context, req *netapppb.GetBackup var resp *netapppb.BackupVault err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackupVault, req, settings.GRPC, c.logger, "GetBackupVault") return err }, opts...) if err != nil { @@ -2591,7 +2596,7 @@ func (c *gRPCClient) ListBackupVaults(ctx context.Context, req *netapppb.ListBac } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackupVaults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackupVaults, req, settings.GRPC, c.logger, "ListBackupVaults") return err }, opts...) if err != nil { @@ -2626,7 +2631,7 @@ func (c *gRPCClient) UpdateBackupVault(ctx context.Context, req *netapppb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBackupVault, req, settings.GRPC, c.logger, "UpdateBackupVault") return err }, opts...) if err != nil { @@ -2646,7 +2651,7 @@ func (c *gRPCClient) DeleteBackupVault(ctx context.Context, req *netapppb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackupVault(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackupVault, req, settings.GRPC, c.logger, "DeleteBackupVault") return err }, opts...) if err != nil { @@ -2666,7 +2671,7 @@ func (c *gRPCClient) CreateBackup(ctx context.Context, req *netapppb.CreateBacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -2686,7 +2691,7 @@ func (c *gRPCClient) GetBackup(ctx context.Context, req *netapppb.GetBackupReque var resp *netapppb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -2715,7 +2720,7 @@ func (c *gRPCClient) ListBackups(ctx context.Context, req *netapppb.ListBackupsR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -2750,7 +2755,7 @@ func (c *gRPCClient) DeleteBackup(ctx context.Context, req *netapppb.DeleteBacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) if err != nil { @@ -2770,7 +2775,7 @@ func (c *gRPCClient) UpdateBackup(ctx context.Context, req *netapppb.UpdateBacku var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -2790,7 +2795,7 @@ func (c *gRPCClient) CreateBackupPolicy(ctx context.Context, req *netapppb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBackupPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBackupPolicy, req, settings.GRPC, c.logger, "CreateBackupPolicy") return err }, opts...) if err != nil { @@ -2810,7 +2815,7 @@ func (c *gRPCClient) GetBackupPolicy(ctx context.Context, req *netapppb.GetBacku var resp *netapppb.BackupPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBackupPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBackupPolicy, req, settings.GRPC, c.logger, "GetBackupPolicy") return err }, opts...) if err != nil { @@ -2839,7 +2844,7 @@ func (c *gRPCClient) ListBackupPolicies(ctx context.Context, req *netapppb.ListB } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBackupPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBackupPolicies, req, settings.GRPC, c.logger, "ListBackupPolicies") return err }, opts...) if err != nil { @@ -2874,7 +2879,7 @@ func (c *gRPCClient) UpdateBackupPolicy(ctx context.Context, req *netapppb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBackupPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBackupPolicy, req, settings.GRPC, c.logger, "UpdateBackupPolicy") return err }, opts...) if err != nil { @@ -2894,7 +2899,7 @@ func (c *gRPCClient) DeleteBackupPolicy(ctx context.Context, req *netapppb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBackupPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBackupPolicy, req, settings.GRPC, c.logger, "DeleteBackupPolicy") return err }, opts...) if err != nil { @@ -2914,7 +2919,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2943,7 +2948,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2977,7 +2982,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2991,7 +2996,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -3006,7 +3011,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -3035,7 +3040,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -3112,21 +3117,10 @@ func (c *restClient) ListStoragePools(ctx context.Context, req *netapppb.ListSto } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStoragePools") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3196,21 +3190,10 @@ func (c *restClient) CreateStoragePool(ctx context.Context, req *netapppb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStoragePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3261,17 +3244,7 @@ func (c *restClient) GetStoragePool(ctx context.Context, req *netapppb.GetStorag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStoragePool") if err != nil { return err } @@ -3334,21 +3307,10 @@ func (c *restClient) UpdateStoragePool(ctx context.Context, req *netapppb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStoragePool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3398,21 +3360,10 @@ func (c *restClient) DeleteStoragePool(ctx context.Context, req *netapppb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStoragePool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3469,21 +3420,10 @@ func (c *restClient) SwitchActiveReplicaZone(ctx context.Context, req *netapppb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SwitchActiveReplicaZone") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3552,21 +3492,10 @@ func (c *restClient) ListVolumes(ctx context.Context, req *netapppb.ListVolumesR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVolumes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3629,17 +3558,7 @@ func (c *restClient) GetVolume(ctx context.Context, req *netapppb.GetVolumeReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVolume") if err != nil { return err } @@ -3696,21 +3615,10 @@ func (c *restClient) CreateVolume(ctx context.Context, req *netapppb.CreateVolum httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVolume") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3774,21 +3682,10 @@ func (c *restClient) UpdateVolume(ctx context.Context, req *netapppb.UpdateVolum httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVolume") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3841,21 +3738,10 @@ func (c *restClient) DeleteVolume(ctx context.Context, req *netapppb.DeleteVolum httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVolume") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3913,21 +3799,10 @@ func (c *restClient) RevertVolume(ctx context.Context, req *netapppb.RevertVolum httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevertVolume") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3996,21 +3871,10 @@ func (c *restClient) ListSnapshots(ctx context.Context, req *netapppb.ListSnapsh } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSnapshots") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4073,17 +3937,7 @@ func (c *restClient) GetSnapshot(ctx context.Context, req *netapppb.GetSnapshotR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSnapshot") if err != nil { return err } @@ -4140,21 +3994,10 @@ func (c *restClient) CreateSnapshot(ctx context.Context, req *netapppb.CreateSna httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSnapshot") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4204,21 +4047,10 @@ func (c *restClient) DeleteSnapshot(ctx context.Context, req *netapppb.DeleteSna httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSnapshot") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4282,21 +4114,10 @@ func (c *restClient) UpdateSnapshot(ctx context.Context, req *netapppb.UpdateSna httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSnapshot") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4365,21 +4186,10 @@ func (c *restClient) ListActiveDirectories(ctx context.Context, req *netapppb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListActiveDirectories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4442,17 +4252,7 @@ func (c *restClient) GetActiveDirectory(ctx context.Context, req *netapppb.GetAc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetActiveDirectory") if err != nil { return err } @@ -4510,21 +4310,10 @@ func (c *restClient) CreateActiveDirectory(ctx context.Context, req *netapppb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateActiveDirectory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4588,21 +4377,10 @@ func (c *restClient) UpdateActiveDirectory(ctx context.Context, req *netapppb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateActiveDirectory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4652,21 +4430,10 @@ func (c *restClient) DeleteActiveDirectory(ctx context.Context, req *netapppb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteActiveDirectory") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4735,21 +4502,10 @@ func (c *restClient) ListKmsConfigs(ctx context.Context, req *netapppb.ListKmsCo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListKmsConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4819,21 +4575,10 @@ func (c *restClient) CreateKmsConfig(ctx context.Context, req *netapppb.CreateKm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateKmsConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4884,17 +4629,7 @@ func (c *restClient) GetKmsConfig(ctx context.Context, req *netapppb.GetKmsConfi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetKmsConfig") if err != nil { return err } @@ -4957,21 +4692,10 @@ func (c *restClient) UpdateKmsConfig(ctx context.Context, req *netapppb.UpdateKm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateKmsConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5028,21 +4752,10 @@ func (c *restClient) EncryptVolumes(ctx context.Context, req *netapppb.EncryptVo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EncryptVolumes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5099,17 +4812,7 @@ func (c *restClient) VerifyKmsConfig(ctx context.Context, req *netapppb.VerifyKm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "VerifyKmsConfig") if err != nil { return err } @@ -5158,21 +4861,10 @@ func (c *restClient) DeleteKmsConfig(ctx context.Context, req *netapppb.DeleteKm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteKmsConfig") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5241,21 +4933,10 @@ func (c *restClient) ListReplications(ctx context.Context, req *netapppb.ListRep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReplications") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5318,17 +4999,7 @@ func (c *restClient) GetReplication(ctx context.Context, req *netapppb.GetReplic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReplication") if err != nil { return err } @@ -5385,21 +5056,10 @@ func (c *restClient) CreateReplication(ctx context.Context, req *netapppb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5449,21 +5109,10 @@ func (c *restClient) DeleteReplication(ctx context.Context, req *netapppb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5527,21 +5176,10 @@ func (c *restClient) UpdateReplication(ctx context.Context, req *netapppb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateReplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5597,21 +5235,10 @@ func (c *restClient) StopReplication(ctx context.Context, req *netapppb.StopRepl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopReplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5667,21 +5294,10 @@ func (c *restClient) ResumeReplication(ctx context.Context, req *netapppb.Resume httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeReplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5738,21 +5354,10 @@ func (c *restClient) ReverseReplicationDirection(ctx context.Context, req *netap httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReverseReplicationDirection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5808,21 +5413,10 @@ func (c *restClient) EstablishPeering(ctx context.Context, req *netapppb.Establi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EstablishPeering") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5879,21 +5473,10 @@ func (c *restClient) SyncReplication(ctx context.Context, req *netapppb.SyncRepl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SyncReplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5951,21 +5534,10 @@ func (c *restClient) CreateBackupVault(ctx context.Context, req *netapppb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupVault") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6016,17 +5588,7 @@ func (c *restClient) GetBackupVault(ctx context.Context, req *netapppb.GetBackup httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupVault") if err != nil { return err } @@ -6094,21 +5656,10 @@ func (c *restClient) ListBackupVaults(ctx context.Context, req *netapppb.ListBac } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupVaults") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6184,21 +5735,10 @@ func (c *restClient) UpdateBackupVault(ctx context.Context, req *netapppb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupVault") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6248,21 +5788,10 @@ func (c *restClient) DeleteBackupVault(ctx context.Context, req *netapppb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupVault") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6323,21 +5852,10 @@ func (c *restClient) CreateBackup(ctx context.Context, req *netapppb.CreateBacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6388,17 +5906,7 @@ func (c *restClient) GetBackup(ctx context.Context, req *netapppb.GetBackupReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -6466,21 +5974,10 @@ func (c *restClient) ListBackups(ctx context.Context, req *netapppb.ListBackupsR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6542,21 +6039,10 @@ func (c *restClient) DeleteBackup(ctx context.Context, req *netapppb.DeleteBacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6620,21 +6106,10 @@ func (c *restClient) UpdateBackup(ctx context.Context, req *netapppb.UpdateBacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6692,21 +6167,10 @@ func (c *restClient) CreateBackupPolicy(ctx context.Context, req *netapppb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6757,17 +6221,7 @@ func (c *restClient) GetBackupPolicy(ctx context.Context, req *netapppb.GetBacku httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupPolicy") if err != nil { return err } @@ -6835,21 +6289,10 @@ func (c *restClient) ListBackupPolicies(ctx context.Context, req *netapppb.ListB } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6925,21 +6368,10 @@ func (c *restClient) UpdateBackupPolicy(ctx context.Context, req *netapppb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6989,21 +6421,10 @@ func (c *restClient) DeleteBackupPolicy(ctx context.Context, req *netapppb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7054,17 +6475,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -7129,21 +6540,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7209,15 +6609,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -7251,15 +6644,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -7296,17 +6682,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -7371,21 +6747,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/netapp/apiv1/net_app_client_example_go123_test.go b/netapp/apiv1/net_app_client_example_go123_test.go index e6fe13ac95bc..1779edf0bbf9 100644 --- a/netapp/apiv1/net_app_client_example_go123_test.go +++ b/netapp/apiv1/net_app_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListActiveDirectories_all() { } for resp, err := range c.ListActiveDirectories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListBackupPolicies_all() { } for resp, err := range c.ListBackupPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListBackupVaults_all() { } for resp, err := range c.ListBackupVaults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListKmsConfigs_all() { } for resp, err := range c.ListKmsConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListReplications_all() { } for resp, err := range c.ListReplications(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListSnapshots_all() { } for resp, err := range c.ListSnapshots(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListStoragePools_all() { } for resp, err := range c.ListStoragePools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListVolumes_all() { } for resp, err := range c.ListVolumes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/netapp/apiv1/netapppb/active_directory.pb.go b/netapp/apiv1/netapppb/active_directory.pb.go index 43cfe5815193..2e2f1b4bee3b 100755 --- a/netapp/apiv1/netapppb/active_directory.pb.go +++ b/netapp/apiv1/netapppb/active_directory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/active_directory.proto @@ -132,11 +132,9 @@ type ListActiveDirectoriesRequest struct { func (x *ListActiveDirectoriesRequest) Reset() { *x = ListActiveDirectoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListActiveDirectoriesRequest) String() string { @@ -147,7 +145,7 @@ func (*ListActiveDirectoriesRequest) ProtoMessage() {} func (x *ListActiveDirectoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +211,9 @@ type ListActiveDirectoriesResponse struct { func (x *ListActiveDirectoriesResponse) Reset() { *x = ListActiveDirectoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListActiveDirectoriesResponse) String() string { @@ -228,7 +224,7 @@ func (*ListActiveDirectoriesResponse) ProtoMessage() {} func (x *ListActiveDirectoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type GetActiveDirectoryRequest struct { func (x *GetActiveDirectoryRequest) Reset() { *x = GetActiveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetActiveDirectoryRequest) String() string { @@ -291,7 +285,7 @@ func (*GetActiveDirectoryRequest) ProtoMessage() {} func (x *GetActiveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +326,9 @@ type CreateActiveDirectoryRequest struct { func (x *CreateActiveDirectoryRequest) Reset() { *x = CreateActiveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateActiveDirectoryRequest) String() string { @@ -347,7 +339,7 @@ func (*CreateActiveDirectoryRequest) ProtoMessage() {} func (x *CreateActiveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +393,9 @@ type UpdateActiveDirectoryRequest struct { func (x *UpdateActiveDirectoryRequest) Reset() { *x = UpdateActiveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateActiveDirectoryRequest) String() string { @@ -416,7 +406,7 @@ func (*UpdateActiveDirectoryRequest) ProtoMessage() {} func (x *UpdateActiveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +447,9 @@ type DeleteActiveDirectoryRequest struct { func (x *DeleteActiveDirectoryRequest) Reset() { *x = DeleteActiveDirectoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteActiveDirectoryRequest) String() string { @@ -472,7 +460,7 @@ func (*DeleteActiveDirectoryRequest) ProtoMessage() {} func (x *DeleteActiveDirectoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +545,9 @@ type ActiveDirectory struct { func (x *ActiveDirectory) Reset() { *x = ActiveDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActiveDirectory) String() string { @@ -572,7 +558,7 @@ func (*ActiveDirectory) ProtoMessage() {} func (x *ActiveDirectory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_active_directory_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,92 +950,6 @@ func file_google_cloud_netapp_v1_active_directory_proto_init() { if File_google_cloud_netapp_v1_active_directory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListActiveDirectoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListActiveDirectoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetActiveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateActiveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateActiveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteActiveDirectoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_active_directory_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ActiveDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/backup.pb.go b/netapp/apiv1/netapppb/backup.pb.go index 158662d178e0..d3c09a3fb872 100755 --- a/netapp/apiv1/netapppb/backup.pb.go +++ b/netapp/apiv1/netapppb/backup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/backup.proto @@ -206,11 +206,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -221,7 +219,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +338,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -355,7 +351,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +418,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -437,7 +431,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +480,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -501,7 +493,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +536,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -559,7 +549,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +598,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -623,7 +611,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +651,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -678,7 +664,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,92 +885,6 @@ func file_google_cloud_netapp_v1_backup_proto_init() { if File_google_cloud_netapp_v1_backup_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_backup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_netapp_v1_backup_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/netapp/apiv1/netapppb/backup_policy.pb.go b/netapp/apiv1/netapppb/backup_policy.pb.go index 8aa7fc13c690..08cb044a4689 100755 --- a/netapp/apiv1/netapppb/backup_policy.pb.go +++ b/netapp/apiv1/netapppb/backup_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/backup_policy.proto @@ -139,11 +139,9 @@ type BackupPolicy struct { func (x *BackupPolicy) Reset() { *x = BackupPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupPolicy) String() string { @@ -154,7 +152,7 @@ func (*BackupPolicy) ProtoMessage() {} func (x *BackupPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +258,9 @@ type CreateBackupPolicyRequest struct { func (x *CreateBackupPolicyRequest) Reset() { *x = CreateBackupPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupPolicyRequest) String() string { @@ -275,7 +271,7 @@ func (*CreateBackupPolicyRequest) ProtoMessage() {} func (x *CreateBackupPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +320,9 @@ type GetBackupPolicyRequest struct { func (x *GetBackupPolicyRequest) Reset() { *x = GetBackupPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupPolicyRequest) String() string { @@ -339,7 +333,7 @@ func (*GetBackupPolicyRequest) ProtoMessage() {} func (x *GetBackupPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +376,9 @@ type ListBackupPoliciesRequest struct { func (x *ListBackupPoliciesRequest) Reset() { *x = ListBackupPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPoliciesRequest) String() string { @@ -397,7 +389,7 @@ func (*ListBackupPoliciesRequest) ProtoMessage() {} func (x *ListBackupPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +455,9 @@ type ListBackupPoliciesResponse struct { func (x *ListBackupPoliciesResponse) Reset() { *x = ListBackupPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupPoliciesResponse) String() string { @@ -478,7 +468,7 @@ func (*ListBackupPoliciesResponse) ProtoMessage() {} func (x *ListBackupPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +522,9 @@ type UpdateBackupPolicyRequest struct { func (x *UpdateBackupPolicyRequest) Reset() { *x = UpdateBackupPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupPolicyRequest) String() string { @@ -547,7 +535,7 @@ func (*UpdateBackupPolicyRequest) ProtoMessage() {} func (x *UpdateBackupPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +577,9 @@ type DeleteBackupPolicyRequest struct { func (x *DeleteBackupPolicyRequest) Reset() { *x = DeleteBackupPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupPolicyRequest) String() string { @@ -604,7 +590,7 @@ func (*DeleteBackupPolicyRequest) ProtoMessage() {} func (x *DeleteBackupPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,92 +810,6 @@ func file_google_cloud_netapp_v1_backup_policy_proto_init() { if File_google_cloud_netapp_v1_backup_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_netapp_v1_backup_policy_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/netapp/apiv1/netapppb/backup_vault.pb.go b/netapp/apiv1/netapppb/backup_vault.pb.go index 62368a932c38..51f5afe79087 100755 --- a/netapp/apiv1/netapppb/backup_vault.pb.go +++ b/netapp/apiv1/netapppb/backup_vault.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/backup_vault.proto @@ -125,11 +125,9 @@ type BackupVault struct { func (x *BackupVault) Reset() { *x = BackupVault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupVault) String() string { @@ -140,7 +138,7 @@ func (*BackupVault) ProtoMessage() {} func (x *BackupVault) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +201,9 @@ type GetBackupVaultRequest struct { func (x *GetBackupVaultRequest) Reset() { *x = GetBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupVaultRequest) String() string { @@ -218,7 +214,7 @@ func (*GetBackupVaultRequest) ProtoMessage() {} func (x *GetBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +259,9 @@ type ListBackupVaultsRequest struct { func (x *ListBackupVaultsRequest) Reset() { *x = ListBackupVaultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupVaultsRequest) String() string { @@ -278,7 +272,7 @@ func (*ListBackupVaultsRequest) ProtoMessage() {} func (x *ListBackupVaultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +339,9 @@ type ListBackupVaultsResponse struct { func (x *ListBackupVaultsResponse) Reset() { *x = ListBackupVaultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupVaultsResponse) String() string { @@ -360,7 +352,7 @@ func (*ListBackupVaultsResponse) ProtoMessage() {} func (x *ListBackupVaultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +409,9 @@ type CreateBackupVaultRequest struct { func (x *CreateBackupVaultRequest) Reset() { *x = CreateBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupVaultRequest) String() string { @@ -432,7 +422,7 @@ func (*CreateBackupVaultRequest) ProtoMessage() {} func (x *CreateBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +471,9 @@ type DeleteBackupVaultRequest struct { func (x *DeleteBackupVaultRequest) Reset() { *x = DeleteBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupVaultRequest) String() string { @@ -496,7 +484,7 @@ func (*DeleteBackupVaultRequest) ProtoMessage() {} func (x *DeleteBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +524,9 @@ type UpdateBackupVaultRequest struct { func (x *UpdateBackupVaultRequest) Reset() { *x = UpdateBackupVaultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupVaultRequest) String() string { @@ -551,7 +537,7 @@ func (*UpdateBackupVaultRequest) ProtoMessage() {} func (x *UpdateBackupVaultRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,92 +738,6 @@ func file_google_cloud_netapp_v1_backup_vault_proto_init() { if File_google_cloud_netapp_v1_backup_vault_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupVault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupVaultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupVaultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_backup_vault_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupVaultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/cloud_netapp_service.pb.go b/netapp/apiv1/netapppb/cloud_netapp_service.pb.go index 7fa12a0d1bac..098ce154ff29 100755 --- a/netapp/apiv1/netapppb/cloud_netapp_service.pb.go +++ b/netapp/apiv1/netapppb/cloud_netapp_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/cloud_netapp_service.proto @@ -71,11 +71,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_cloud_netapp_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_cloud_netapp_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -86,7 +84,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_cloud_netapp_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,20 +1175,6 @@ func file_google_cloud_netapp_v1_cloud_netapp_service_proto_init() { file_google_cloud_netapp_v1_snapshot_proto_init() file_google_cloud_netapp_v1_storage_pool_proto_init() file_google_cloud_netapp_v1_volume_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_cloud_netapp_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/common.pb.go b/netapp/apiv1/netapppb/common.pb.go index ed9b06bae56f..c42990df735f 100755 --- a/netapp/apiv1/netapppb/common.pb.go +++ b/netapp/apiv1/netapppb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/common.proto @@ -163,11 +163,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -178,7 +176,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -275,20 +273,6 @@ func file_google_cloud_netapp_v1_common_proto_init() { if File_google_cloud_netapp_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/kms.pb.go b/netapp/apiv1/netapppb/kms.pb.go index b0ef0b6c43be..713d68713621 100755 --- a/netapp/apiv1/netapppb/kms.pb.go +++ b/netapp/apiv1/netapppb/kms.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/kms.proto @@ -141,11 +141,9 @@ type GetKmsConfigRequest struct { func (x *GetKmsConfigRequest) Reset() { *x = GetKmsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKmsConfigRequest) String() string { @@ -156,7 +154,7 @@ func (*GetKmsConfigRequest) ProtoMessage() {} func (x *GetKmsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type ListKmsConfigsRequest struct { func (x *ListKmsConfigsRequest) Reset() { *x = ListKmsConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKmsConfigsRequest) String() string { @@ -214,7 +210,7 @@ func (*ListKmsConfigsRequest) ProtoMessage() {} func (x *ListKmsConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +276,9 @@ type ListKmsConfigsResponse struct { func (x *ListKmsConfigsResponse) Reset() { *x = ListKmsConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKmsConfigsResponse) String() string { @@ -295,7 +289,7 @@ func (*ListKmsConfigsResponse) ProtoMessage() {} func (x *ListKmsConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +344,9 @@ type CreateKmsConfigRequest struct { func (x *CreateKmsConfigRequest) Reset() { *x = CreateKmsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKmsConfigRequest) String() string { @@ -365,7 +357,7 @@ func (*CreateKmsConfigRequest) ProtoMessage() {} func (x *CreateKmsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +411,9 @@ type UpdateKmsConfigRequest struct { func (x *UpdateKmsConfigRequest) Reset() { *x = UpdateKmsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKmsConfigRequest) String() string { @@ -434,7 +424,7 @@ func (*UpdateKmsConfigRequest) ProtoMessage() {} func (x *UpdateKmsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +465,9 @@ type DeleteKmsConfigRequest struct { func (x *DeleteKmsConfigRequest) Reset() { *x = DeleteKmsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKmsConfigRequest) String() string { @@ -490,7 +478,7 @@ func (*DeleteKmsConfigRequest) ProtoMessage() {} func (x *DeleteKmsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +512,9 @@ type EncryptVolumesRequest struct { func (x *EncryptVolumesRequest) Reset() { *x = EncryptVolumesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptVolumesRequest) String() string { @@ -539,7 +525,7 @@ func (*EncryptVolumesRequest) ProtoMessage() {} func (x *EncryptVolumesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +559,9 @@ type VerifyKmsConfigRequest struct { func (x *VerifyKmsConfigRequest) Reset() { *x = VerifyKmsConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyKmsConfigRequest) String() string { @@ -588,7 +572,7 @@ func (*VerifyKmsConfigRequest) ProtoMessage() {} func (x *VerifyKmsConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +613,9 @@ type VerifyKmsConfigResponse struct { func (x *VerifyKmsConfigResponse) Reset() { *x = VerifyKmsConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VerifyKmsConfigResponse) String() string { @@ -644,7 +626,7 @@ func (*VerifyKmsConfigResponse) ProtoMessage() {} func (x *VerifyKmsConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +693,9 @@ type KmsConfig struct { func (x *KmsConfig) Reset() { *x = KmsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KmsConfig) String() string { @@ -726,7 +706,7 @@ func (*KmsConfig) ProtoMessage() {} func (x *KmsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_kms_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,128 +991,6 @@ func file_google_cloud_netapp_v1_kms_proto_init() { if File_google_cloud_netapp_v1_kms_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_kms_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetKmsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListKmsConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListKmsConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateKmsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKmsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKmsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EncryptVolumesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VerifyKmsConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*VerifyKmsConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_kms_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*KmsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/replication.pb.go b/netapp/apiv1/netapppb/replication.pb.go index 7abc5fa8a57e..68f73f3edfc3 100755 --- a/netapp/apiv1/netapppb/replication.pb.go +++ b/netapp/apiv1/netapppb/replication.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/replication.proto @@ -378,11 +378,9 @@ type TransferStats struct { func (x *TransferStats) Reset() { *x = TransferStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferStats) String() string { @@ -393,7 +391,7 @@ func (*TransferStats) ProtoMessage() {} func (x *TransferStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +516,9 @@ type Replication struct { func (x *Replication) Reset() { *x = Replication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication) String() string { @@ -533,7 +529,7 @@ func (*Replication) ProtoMessage() {} func (x *Replication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +683,9 @@ type HybridPeeringDetails struct { func (x *HybridPeeringDetails) Reset() { *x = HybridPeeringDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridPeeringDetails) String() string { @@ -702,7 +696,7 @@ func (*HybridPeeringDetails) ProtoMessage() {} func (x *HybridPeeringDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +762,9 @@ type ListReplicationsRequest struct { func (x *ListReplicationsRequest) Reset() { *x = ListReplicationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplicationsRequest) String() string { @@ -783,7 +775,7 @@ func (*ListReplicationsRequest) ProtoMessage() {} func (x *ListReplicationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +842,9 @@ type ListReplicationsResponse struct { func (x *ListReplicationsResponse) Reset() { *x = ListReplicationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplicationsResponse) String() string { @@ -865,7 +855,7 @@ func (*ListReplicationsResponse) ProtoMessage() {} func (x *ListReplicationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +904,9 @@ type GetReplicationRequest struct { func (x *GetReplicationRequest) Reset() { *x = GetReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReplicationRequest) String() string { @@ -929,7 +917,7 @@ func (*GetReplicationRequest) ProtoMessage() {} func (x *GetReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +964,9 @@ type DestinationVolumeParameters struct { func (x *DestinationVolumeParameters) Reset() { *x = DestinationVolumeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationVolumeParameters) String() string { @@ -991,7 +977,7 @@ func (*DestinationVolumeParameters) ProtoMessage() {} func (x *DestinationVolumeParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1047,9 @@ type CreateReplicationRequest struct { func (x *CreateReplicationRequest) Reset() { *x = CreateReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReplicationRequest) String() string { @@ -1076,7 +1060,7 @@ func (*CreateReplicationRequest) ProtoMessage() {} func (x *CreateReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1125,11 +1109,9 @@ type DeleteReplicationRequest struct { func (x *DeleteReplicationRequest) Reset() { *x = DeleteReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReplicationRequest) String() string { @@ -1140,7 +1122,7 @@ func (*DeleteReplicationRequest) ProtoMessage() {} func (x *DeleteReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,11 +1159,9 @@ type UpdateReplicationRequest struct { func (x *UpdateReplicationRequest) Reset() { *x = UpdateReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReplicationRequest) String() string { @@ -1192,7 +1172,7 @@ func (*UpdateReplicationRequest) ProtoMessage() {} func (x *UpdateReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1221,9 @@ type StopReplicationRequest struct { func (x *StopReplicationRequest) Reset() { *x = StopReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopReplicationRequest) String() string { @@ -1256,7 +1234,7 @@ func (*StopReplicationRequest) ProtoMessage() {} func (x *StopReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,11 +1276,9 @@ type ResumeReplicationRequest struct { func (x *ResumeReplicationRequest) Reset() { *x = ResumeReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeReplicationRequest) String() string { @@ -1313,7 +1289,7 @@ func (*ResumeReplicationRequest) ProtoMessage() {} func (x *ResumeReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1325,9 @@ type ReverseReplicationDirectionRequest struct { func (x *ReverseReplicationDirectionRequest) Reset() { *x = ReverseReplicationDirectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReverseReplicationDirectionRequest) String() string { @@ -1364,7 +1338,7 @@ func (*ReverseReplicationDirectionRequest) ProtoMessage() {} func (x *ReverseReplicationDirectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,11 +1385,9 @@ type EstablishPeeringRequest struct { func (x *EstablishPeeringRequest) Reset() { *x = EstablishPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EstablishPeeringRequest) String() string { @@ -1426,7 +1398,7 @@ func (*EstablishPeeringRequest) ProtoMessage() {} func (x *EstablishPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,11 +1461,9 @@ type SyncReplicationRequest struct { func (x *SyncReplicationRequest) Reset() { *x = SyncReplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SyncReplicationRequest) String() string { @@ -1504,7 +1474,7 @@ func (*SyncReplicationRequest) ProtoMessage() {} func (x *SyncReplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_replication_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1950,188 +1920,6 @@ func file_google_cloud_netapp_v1_replication_proto_init() { return } file_google_cloud_netapp_v1_volume_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_replication_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransferStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Replication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HybridPeeringDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListReplicationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListReplicationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DestinationVolumeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StopReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ResumeReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReverseReplicationDirectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EstablishPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_replication_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SyncReplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_netapp_v1_replication_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_netapp_v1_replication_proto_msgTypes[1].OneofWrappers = []any{} file_google_cloud_netapp_v1_replication_proto_msgTypes[6].OneofWrappers = []any{} diff --git a/netapp/apiv1/netapppb/snapshot.pb.go b/netapp/apiv1/netapppb/snapshot.pb.go index aa1f80e3c524..d8a2a89233f9 100755 --- a/netapp/apiv1/netapppb/snapshot.pb.go +++ b/netapp/apiv1/netapppb/snapshot.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/snapshot.proto @@ -130,11 +130,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -145,7 +143,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,11 +210,9 @@ type ListSnapshotsResponse struct { func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { @@ -227,7 +223,7 @@ func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +272,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -291,7 +285,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type CreateSnapshotRequest struct { func (x *CreateSnapshotRequest) Reset() { *x = CreateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnapshotRequest) String() string { @@ -348,7 +340,7 @@ func (*CreateSnapshotRequest) ProtoMessage() {} func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +389,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -412,7 +402,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +439,9 @@ type UpdateSnapshotRequest struct { func (x *UpdateSnapshotRequest) Reset() { *x = UpdateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSnapshotRequest) String() string { @@ -464,7 +452,7 @@ func (*UpdateSnapshotRequest) ProtoMessage() {} func (x *UpdateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +508,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -535,7 +521,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_snapshot_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,92 +758,6 @@ func file_google_cloud_netapp_v1_snapshot_proto_init() { if File_google_cloud_netapp_v1_snapshot_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_snapshot_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/netapp/apiv1/netapppb/storage_pool.pb.go b/netapp/apiv1/netapppb/storage_pool.pb.go index 48c42ea65b6e..dd9e70d28d76 100755 --- a/netapp/apiv1/netapppb/storage_pool.pb.go +++ b/netapp/apiv1/netapppb/storage_pool.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/storage_pool.proto @@ -123,11 +123,9 @@ type GetStoragePoolRequest struct { func (x *GetStoragePoolRequest) Reset() { *x = GetStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStoragePoolRequest) String() string { @@ -138,7 +136,7 @@ func (*GetStoragePoolRequest) ProtoMessage() {} func (x *GetStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +180,9 @@ type ListStoragePoolsRequest struct { func (x *ListStoragePoolsRequest) Reset() { *x = ListStoragePoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoragePoolsRequest) String() string { @@ -197,7 +193,7 @@ func (*ListStoragePoolsRequest) ProtoMessage() {} func (x *ListStoragePoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +259,9 @@ type ListStoragePoolsResponse struct { func (x *ListStoragePoolsResponse) Reset() { *x = ListStoragePoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStoragePoolsResponse) String() string { @@ -278,7 +272,7 @@ func (*ListStoragePoolsResponse) ProtoMessage() {} func (x *ListStoragePoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type CreateStoragePoolRequest struct { func (x *CreateStoragePoolRequest) Reset() { *x = CreateStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStoragePoolRequest) String() string { @@ -348,7 +340,7 @@ func (*CreateStoragePoolRequest) ProtoMessage() {} func (x *CreateStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,11 +394,9 @@ type UpdateStoragePoolRequest struct { func (x *UpdateStoragePoolRequest) Reset() { *x = UpdateStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStoragePoolRequest) String() string { @@ -417,7 +407,7 @@ func (*UpdateStoragePoolRequest) ProtoMessage() {} func (x *UpdateStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +448,9 @@ type DeleteStoragePoolRequest struct { func (x *DeleteStoragePoolRequest) Reset() { *x = DeleteStoragePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStoragePoolRequest) String() string { @@ -473,7 +461,7 @@ func (*DeleteStoragePoolRequest) ProtoMessage() {} func (x *DeleteStoragePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +496,9 @@ type SwitchActiveReplicaZoneRequest struct { func (x *SwitchActiveReplicaZoneRequest) Reset() { *x = SwitchActiveReplicaZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchActiveReplicaZoneRequest) String() string { @@ -523,7 +509,7 @@ func (*SwitchActiveReplicaZoneRequest) ProtoMessage() {} func (x *SwitchActiveReplicaZoneRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +591,9 @@ type StoragePool struct { func (x *StoragePool) Reset() { *x = StoragePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StoragePool) String() string { @@ -620,7 +604,7 @@ func (*StoragePool) ProtoMessage() {} func (x *StoragePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,104 +1003,6 @@ func file_google_cloud_netapp_v1_storage_pool_proto_init() { return } file_google_cloud_netapp_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListStoragePoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListStoragePoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStoragePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SwitchActiveReplicaZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StoragePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_netapp_v1_storage_pool_proto_msgTypes[7].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/netapp/apiv1/netapppb/volume.pb.go b/netapp/apiv1/netapppb/volume.pb.go index 43d4d7c16c0c..9c8a99ed94d2 100755 --- a/netapp/apiv1/netapppb/volume.pb.go +++ b/netapp/apiv1/netapppb/volume.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/netapp/v1/volume.proto @@ -494,11 +494,9 @@ type ListVolumesRequest struct { func (x *ListVolumesRequest) Reset() { *x = ListVolumesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumesRequest) String() string { @@ -509,7 +507,7 @@ func (*ListVolumesRequest) ProtoMessage() {} func (x *ListVolumesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +573,9 @@ type ListVolumesResponse struct { func (x *ListVolumesResponse) Reset() { *x = ListVolumesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVolumesResponse) String() string { @@ -590,7 +586,7 @@ func (*ListVolumesResponse) ProtoMessage() {} func (x *ListVolumesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,11 +634,9 @@ type GetVolumeRequest struct { func (x *GetVolumeRequest) Reset() { *x = GetVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVolumeRequest) String() string { @@ -653,7 +647,7 @@ func (*GetVolumeRequest) ProtoMessage() {} func (x *GetVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +688,9 @@ type CreateVolumeRequest struct { func (x *CreateVolumeRequest) Reset() { *x = CreateVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVolumeRequest) String() string { @@ -709,7 +701,7 @@ func (*CreateVolumeRequest) ProtoMessage() {} func (x *CreateVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +755,9 @@ type UpdateVolumeRequest struct { func (x *UpdateVolumeRequest) Reset() { *x = UpdateVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVolumeRequest) String() string { @@ -778,7 +768,7 @@ func (*UpdateVolumeRequest) ProtoMessage() {} func (x *UpdateVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +813,9 @@ type DeleteVolumeRequest struct { func (x *DeleteVolumeRequest) Reset() { *x = DeleteVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVolumeRequest) String() string { @@ -838,7 +826,7 @@ func (*DeleteVolumeRequest) ProtoMessage() {} func (x *DeleteVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +872,9 @@ type RevertVolumeRequest struct { func (x *RevertVolumeRequest) Reset() { *x = RevertVolumeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevertVolumeRequest) String() string { @@ -899,7 +885,7 @@ func (*RevertVolumeRequest) ProtoMessage() {} func (x *RevertVolumeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1012,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -1041,7 +1025,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1334,11 +1318,9 @@ type ExportPolicy struct { func (x *ExportPolicy) Reset() { *x = ExportPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportPolicy) String() string { @@ -1349,7 +1331,7 @@ func (*ExportPolicy) ProtoMessage() {} func (x *ExportPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1418,11 +1400,9 @@ type SimpleExportPolicyRule struct { func (x *SimpleExportPolicyRule) Reset() { *x = SimpleExportPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimpleExportPolicyRule) String() string { @@ -1433,7 +1413,7 @@ func (*SimpleExportPolicyRule) ProtoMessage() {} func (x *SimpleExportPolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1546,11 +1526,9 @@ type SnapshotPolicy struct { func (x *SnapshotPolicy) Reset() { *x = SnapshotPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SnapshotPolicy) String() string { @@ -1561,7 +1539,7 @@ func (*SnapshotPolicy) ProtoMessage() {} func (x *SnapshotPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1626,11 +1604,9 @@ type HourlySchedule struct { func (x *HourlySchedule) Reset() { *x = HourlySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HourlySchedule) String() string { @@ -1641,7 +1617,7 @@ func (*HourlySchedule) ProtoMessage() {} func (x *HourlySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,11 +1663,9 @@ type DailySchedule struct { func (x *DailySchedule) Reset() { *x = DailySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DailySchedule) String() string { @@ -1702,7 +1676,7 @@ func (*DailySchedule) ProtoMessage() {} func (x *DailySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1759,11 +1733,9 @@ type WeeklySchedule struct { func (x *WeeklySchedule) Reset() { *x = WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklySchedule) String() string { @@ -1774,7 +1746,7 @@ func (*WeeklySchedule) ProtoMessage() {} func (x *WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1809,9 @@ type MonthlySchedule struct { func (x *MonthlySchedule) Reset() { *x = MonthlySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonthlySchedule) String() string { @@ -1852,7 +1822,7 @@ func (*MonthlySchedule) ProtoMessage() {} func (x *MonthlySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1913,11 +1883,9 @@ type MountOption struct { func (x *MountOption) Reset() { *x = MountOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MountOption) String() string { @@ -1928,7 +1896,7 @@ func (*MountOption) ProtoMessage() {} func (x *MountOption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1988,11 +1956,9 @@ type RestoreParameters struct { func (x *RestoreParameters) Reset() { *x = RestoreParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreParameters) String() string { @@ -2003,7 +1969,7 @@ func (*RestoreParameters) ProtoMessage() {} func (x *RestoreParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2084,11 +2050,9 @@ type BackupConfig struct { func (x *BackupConfig) Reset() { *x = BackupConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupConfig) String() string { @@ -2099,7 +2063,7 @@ func (*BackupConfig) ProtoMessage() {} func (x *BackupConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2158,11 +2122,9 @@ type TieringPolicy struct { func (x *TieringPolicy) Reset() { *x = TieringPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TieringPolicy) String() string { @@ -2173,7 +2135,7 @@ func (*TieringPolicy) ProtoMessage() {} func (x *TieringPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,11 +2196,9 @@ type HybridReplicationParameters struct { func (x *HybridReplicationParameters) Reset() { *x = HybridReplicationParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HybridReplicationParameters) String() string { @@ -2249,7 +2209,7 @@ func (*HybridReplicationParameters) ProtoMessage() {} func (x *HybridReplicationParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_netapp_v1_volume_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2933,248 +2893,6 @@ func file_google_cloud_netapp_v1_volume_proto_init() { return } file_google_cloud_netapp_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_netapp_v1_volume_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVolumesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RevertVolumeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SimpleExportPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SnapshotPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*HourlySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DailySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*MonthlySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MountOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RestoreParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BackupConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*TieringPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_netapp_v1_volume_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*HybridReplicationParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_netapp_v1_volume_proto_msgTypes[7].OneofWrappers = []any{} file_google_cloud_netapp_v1_volume_proto_msgTypes[9].OneofWrappers = []any{} file_google_cloud_netapp_v1_volume_proto_msgTypes[10].OneofWrappers = []any{} diff --git a/networkconnectivity/apiv1/helpers.go b/networkconnectivity/apiv1/helpers.go index 489c765df22c..bb8aab88a618 100755 --- a/networkconnectivity/apiv1/helpers.go +++ b/networkconnectivity/apiv1/helpers.go @@ -18,10 +18,16 @@ package networkconnectivity import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "networkconnectivity.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/networkconnectivity/apiv1/hub_client.go b/networkconnectivity/apiv1/hub_client.go index e59c0ce04c8e..33d1c6718256 100755 --- a/networkconnectivity/apiv1/hub_client.go +++ b/networkconnectivity/apiv1/hub_client.go @@ -19,6 +19,7 @@ package networkconnectivity import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -640,6 +641,8 @@ type hubGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewHubClient creates a new hub service client based on gRPC. @@ -668,6 +671,7 @@ func NewHubClient(ctx context.Context, opts ...option.ClientOption) (*HubClient, connPool: connPool, hubClient: networkconnectivitypb.NewHubServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -735,7 +739,7 @@ func (c *hubGRPCClient) ListHubs(ctx context.Context, req *networkconnectivitypb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListHubs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListHubs, req, settings.GRPC, c.logger, "ListHubs") return err }, opts...) if err != nil { @@ -770,7 +774,7 @@ func (c *hubGRPCClient) GetHub(ctx context.Context, req *networkconnectivitypb.G var resp *networkconnectivitypb.Hub err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetHub, req, settings.GRPC, c.logger, "GetHub") return err }, opts...) if err != nil { @@ -788,7 +792,7 @@ func (c *hubGRPCClient) CreateHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.CreateHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.CreateHub, req, settings.GRPC, c.logger, "CreateHub") return err }, opts...) if err != nil { @@ -808,7 +812,7 @@ func (c *hubGRPCClient) UpdateHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.UpdateHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.UpdateHub, req, settings.GRPC, c.logger, "UpdateHub") return err }, opts...) if err != nil { @@ -828,7 +832,7 @@ func (c *hubGRPCClient) DeleteHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.DeleteHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.DeleteHub, req, settings.GRPC, c.logger, "DeleteHub") return err }, opts...) if err != nil { @@ -859,7 +863,7 @@ func (c *hubGRPCClient) ListHubSpokes(ctx context.Context, req *networkconnectiv } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListHubSpokes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListHubSpokes, req, settings.GRPC, c.logger, "ListHubSpokes") return err }, opts...) if err != nil { @@ -905,7 +909,7 @@ func (c *hubGRPCClient) QueryHubStatus(ctx context.Context, req *networkconnecti } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.QueryHubStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.QueryHubStatus, req, settings.GRPC, c.logger, "QueryHubStatus") return err }, opts...) if err != nil { @@ -951,7 +955,7 @@ func (c *hubGRPCClient) ListSpokes(ctx context.Context, req *networkconnectivity } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListSpokes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListSpokes, req, settings.GRPC, c.logger, "ListSpokes") return err }, opts...) if err != nil { @@ -986,7 +990,7 @@ func (c *hubGRPCClient) GetSpoke(ctx context.Context, req *networkconnectivitypb var resp *networkconnectivitypb.Spoke err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetSpoke, req, settings.GRPC, c.logger, "GetSpoke") return err }, opts...) if err != nil { @@ -1004,7 +1008,7 @@ func (c *hubGRPCClient) CreateSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.CreateSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.CreateSpoke, req, settings.GRPC, c.logger, "CreateSpoke") return err }, opts...) if err != nil { @@ -1024,7 +1028,7 @@ func (c *hubGRPCClient) UpdateSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.UpdateSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.UpdateSpoke, req, settings.GRPC, c.logger, "UpdateSpoke") return err }, opts...) if err != nil { @@ -1044,7 +1048,7 @@ func (c *hubGRPCClient) RejectHubSpoke(ctx context.Context, req *networkconnecti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.RejectHubSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.RejectHubSpoke, req, settings.GRPC, c.logger, "RejectHubSpoke") return err }, opts...) if err != nil { @@ -1064,7 +1068,7 @@ func (c *hubGRPCClient) AcceptHubSpoke(ctx context.Context, req *networkconnecti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.AcceptHubSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.AcceptHubSpoke, req, settings.GRPC, c.logger, "AcceptHubSpoke") return err }, opts...) if err != nil { @@ -1084,7 +1088,7 @@ func (c *hubGRPCClient) DeleteSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.DeleteSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.DeleteSpoke, req, settings.GRPC, c.logger, "DeleteSpoke") return err }, opts...) if err != nil { @@ -1104,7 +1108,7 @@ func (c *hubGRPCClient) GetRouteTable(ctx context.Context, req *networkconnectiv var resp *networkconnectivitypb.RouteTable err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetRouteTable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetRouteTable, req, settings.GRPC, c.logger, "GetRouteTable") return err }, opts...) if err != nil { @@ -1122,7 +1126,7 @@ func (c *hubGRPCClient) GetRoute(ctx context.Context, req *networkconnectivitypb var resp *networkconnectivitypb.Route err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetRoute, req, settings.GRPC, c.logger, "GetRoute") return err }, opts...) if err != nil { @@ -1151,7 +1155,7 @@ func (c *hubGRPCClient) ListRoutes(ctx context.Context, req *networkconnectivity } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListRoutes, req, settings.GRPC, c.logger, "ListRoutes") return err }, opts...) if err != nil { @@ -1197,7 +1201,7 @@ func (c *hubGRPCClient) ListRouteTables(ctx context.Context, req *networkconnect } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListRouteTables(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListRouteTables, req, settings.GRPC, c.logger, "ListRouteTables") return err }, opts...) if err != nil { @@ -1232,7 +1236,7 @@ func (c *hubGRPCClient) GetGroup(ctx context.Context, req *networkconnectivitypb var resp *networkconnectivitypb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetGroup, req, settings.GRPC, c.logger, "GetGroup") return err }, opts...) if err != nil { @@ -1261,7 +1265,7 @@ func (c *hubGRPCClient) ListGroups(ctx context.Context, req *networkconnectivity } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListGroups, req, settings.GRPC, c.logger, "ListGroups") return err }, opts...) if err != nil { @@ -1296,7 +1300,7 @@ func (c *hubGRPCClient) UpdateGroup(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.UpdateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.UpdateGroup, req, settings.GRPC, c.logger, "UpdateGroup") return err }, opts...) if err != nil { @@ -1316,7 +1320,7 @@ func (c *hubGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLoca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1345,7 +1349,7 @@ func (c *hubGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1380,7 +1384,7 @@ func (c *hubGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1398,7 +1402,7 @@ func (c *hubGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1416,7 +1420,7 @@ func (c *hubGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestI var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1433,7 +1437,7 @@ func (c *hubGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1447,7 +1451,7 @@ func (c *hubGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1462,7 +1466,7 @@ func (c *hubGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1491,7 +1495,7 @@ func (c *hubGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/networkconnectivity/apiv1/hub_client_example_go123_test.go b/networkconnectivity/apiv1/hub_client_example_go123_test.go index dd09cf1e8a8e..dba46ee081c4 100644 --- a/networkconnectivity/apiv1/hub_client_example_go123_test.go +++ b/networkconnectivity/apiv1/hub_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleHubClient_ListGroups_all() { } for resp, err := range c.ListGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleHubClient_ListHubSpokes_all() { } for resp, err := range c.ListHubSpokes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleHubClient_ListHubs_all() { } for resp, err := range c.ListHubs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleHubClient_ListRouteTables_all() { } for resp, err := range c.ListRouteTables(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleHubClient_ListRoutes_all() { } for resp, err := range c.ListRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleHubClient_ListSpokes_all() { } for resp, err := range c.ListSpokes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleHubClient_QueryHubStatus_all() { } for resp, err := range c.QueryHubStatus(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleHubClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleHubClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networkconnectivity/apiv1/networkconnectivitypb/common.pb.go b/networkconnectivity/apiv1/networkconnectivitypb/common.pb.go index 35b30eed3a83..8282262c8a31 100755 --- a/networkconnectivity/apiv1/networkconnectivitypb/common.pb.go +++ b/networkconnectivity/apiv1/networkconnectivitypb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkconnectivity/v1/common.proto @@ -65,11 +65,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -80,7 +78,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,20 +243,6 @@ func file_google_cloud_networkconnectivity_v1_common_proto_init() { if File_google_cloud_networkconnectivity_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkconnectivity_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkconnectivity/apiv1/networkconnectivitypb/hub.pb.go b/networkconnectivity/apiv1/networkconnectivitypb/hub.pb.go index d33a9cdb9687..17d11b48d11a 100755 --- a/networkconnectivity/apiv1/networkconnectivitypb/hub.pb.go +++ b/networkconnectivity/apiv1/networkconnectivitypb/hub.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkconnectivity/v1/hub.proto @@ -679,11 +679,9 @@ type Hub struct { func (x *Hub) Reset() { *x = Hub{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hub) String() string { @@ -694,7 +692,7 @@ func (*Hub) ProtoMessage() {} func (x *Hub) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +817,9 @@ type RoutingVPC struct { func (x *RoutingVPC) Reset() { *x = RoutingVPC{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoutingVPC) String() string { @@ -834,7 +830,7 @@ func (*RoutingVPC) ProtoMessage() {} func (x *RoutingVPC) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -922,11 +918,9 @@ type Spoke struct { func (x *Spoke) Reset() { *x = Spoke{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Spoke) String() string { @@ -937,7 +931,7 @@ func (*Spoke) ProtoMessage() {} func (x *Spoke) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1089,9 @@ type RouteTable struct { func (x *RouteTable) Reset() { *x = RouteTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteTable) String() string { @@ -1110,7 +1102,7 @@ func (*RouteTable) ProtoMessage() {} func (x *RouteTable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1224,9 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Route) String() string { @@ -1247,7 +1237,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1412,11 +1402,9 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Group) String() string { @@ -1427,7 +1415,7 @@ func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1525,11 +1513,9 @@ type AutoAccept struct { func (x *AutoAccept) Reset() { *x = AutoAccept{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoAccept) String() string { @@ -1540,7 +1526,7 @@ func (*AutoAccept) ProtoMessage() {} func (x *AutoAccept) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1570,9 @@ type ListHubsRequest struct { func (x *ListHubsRequest) Reset() { *x = ListHubsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubsRequest) String() string { @@ -1599,7 +1583,7 @@ func (*ListHubsRequest) ProtoMessage() {} func (x *ListHubsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1653,9 @@ type ListHubsResponse struct { func (x *ListHubsResponse) Reset() { *x = ListHubsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubsResponse) String() string { @@ -1684,7 +1666,7 @@ func (*ListHubsResponse) ProtoMessage() {} func (x *ListHubsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1716,9 @@ type GetHubRequest struct { func (x *GetHubRequest) Reset() { *x = GetHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHubRequest) String() string { @@ -1749,7 +1729,7 @@ func (*GetHubRequest) ProtoMessage() {} func (x *GetHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1804,11 +1784,9 @@ type CreateHubRequest struct { func (x *CreateHubRequest) Reset() { *x = CreateHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHubRequest) String() string { @@ -1819,7 +1797,7 @@ func (*CreateHubRequest) ProtoMessage() {} func (x *CreateHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1897,11 +1875,9 @@ type UpdateHubRequest struct { func (x *UpdateHubRequest) Reset() { *x = UpdateHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHubRequest) String() string { @@ -1912,7 +1888,7 @@ func (*UpdateHubRequest) ProtoMessage() {} func (x *UpdateHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1976,11 +1952,9 @@ type DeleteHubRequest struct { func (x *DeleteHubRequest) Reset() { *x = DeleteHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHubRequest) String() string { @@ -1991,7 +1965,7 @@ func (*DeleteHubRequest) ProtoMessage() {} func (x *DeleteHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2028,9 @@ type ListHubSpokesRequest struct { func (x *ListHubSpokesRequest) Reset() { *x = ListHubSpokesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubSpokesRequest) String() string { @@ -2069,7 +2041,7 @@ func (*ListHubSpokesRequest) ProtoMessage() {} func (x *ListHubSpokesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2154,11 +2126,9 @@ type ListHubSpokesResponse struct { func (x *ListHubSpokesResponse) Reset() { *x = ListHubSpokesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubSpokesResponse) String() string { @@ -2169,7 +2139,7 @@ func (*ListHubSpokesResponse) ProtoMessage() {} func (x *ListHubSpokesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2253,11 +2223,9 @@ type QueryHubStatusRequest struct { func (x *QueryHubStatusRequest) Reset() { *x = QueryHubStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryHubStatusRequest) String() string { @@ -2268,7 +2236,7 @@ func (*QueryHubStatusRequest) ProtoMessage() {} func (x *QueryHubStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2342,11 +2310,9 @@ type QueryHubStatusResponse struct { func (x *QueryHubStatusResponse) Reset() { *x = QueryHubStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryHubStatusResponse) String() string { @@ -2357,7 +2323,7 @@ func (*QueryHubStatusResponse) ProtoMessage() {} func (x *QueryHubStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2406,11 +2372,9 @@ type HubStatusEntry struct { func (x *HubStatusEntry) Reset() { *x = HubStatusEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HubStatusEntry) String() string { @@ -2421,7 +2385,7 @@ func (*HubStatusEntry) ProtoMessage() {} func (x *HubStatusEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2483,11 +2447,9 @@ type PscPropagationStatus struct { func (x *PscPropagationStatus) Reset() { *x = PscPropagationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscPropagationStatus) String() string { @@ -2498,7 +2460,7 @@ func (*PscPropagationStatus) ProtoMessage() {} func (x *PscPropagationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2583,11 +2545,9 @@ type ListSpokesRequest struct { func (x *ListSpokesRequest) Reset() { *x = ListSpokesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpokesRequest) String() string { @@ -2598,7 +2558,7 @@ func (*ListSpokesRequest) ProtoMessage() {} func (x *ListSpokesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2667,11 +2627,9 @@ type ListSpokesResponse struct { func (x *ListSpokesResponse) Reset() { *x = ListSpokesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpokesResponse) String() string { @@ -2682,7 +2640,7 @@ func (*ListSpokesResponse) ProtoMessage() {} func (x *ListSpokesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2731,11 +2689,9 @@ type GetSpokeRequest struct { func (x *GetSpokeRequest) Reset() { *x = GetSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpokeRequest) String() string { @@ -2746,7 +2702,7 @@ func (*GetSpokeRequest) ProtoMessage() {} func (x *GetSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2800,11 +2756,9 @@ type CreateSpokeRequest struct { func (x *CreateSpokeRequest) Reset() { *x = CreateSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpokeRequest) String() string { @@ -2815,7 +2769,7 @@ func (*CreateSpokeRequest) ProtoMessage() {} func (x *CreateSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2893,11 +2847,9 @@ type UpdateSpokeRequest struct { func (x *UpdateSpokeRequest) Reset() { *x = UpdateSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpokeRequest) String() string { @@ -2908,7 +2860,7 @@ func (*UpdateSpokeRequest) ProtoMessage() {} func (x *UpdateSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2972,11 +2924,9 @@ type DeleteSpokeRequest struct { func (x *DeleteSpokeRequest) Reset() { *x = DeleteSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpokeRequest) String() string { @@ -2987,7 +2937,7 @@ func (*DeleteSpokeRequest) ProtoMessage() {} func (x *DeleteSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3046,11 +2996,9 @@ type AcceptHubSpokeRequest struct { func (x *AcceptHubSpokeRequest) Reset() { *x = AcceptHubSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceptHubSpokeRequest) String() string { @@ -3061,7 +3009,7 @@ func (*AcceptHubSpokeRequest) ProtoMessage() {} func (x *AcceptHubSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3110,11 +3058,9 @@ type AcceptHubSpokeResponse struct { func (x *AcceptHubSpokeResponse) Reset() { *x = AcceptHubSpokeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceptHubSpokeResponse) String() string { @@ -3125,7 +3071,7 @@ func (*AcceptHubSpokeResponse) ProtoMessage() {} func (x *AcceptHubSpokeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3179,11 +3125,9 @@ type RejectHubSpokeRequest struct { func (x *RejectHubSpokeRequest) Reset() { *x = RejectHubSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejectHubSpokeRequest) String() string { @@ -3194,7 +3138,7 @@ func (*RejectHubSpokeRequest) ProtoMessage() {} func (x *RejectHubSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3250,11 +3194,9 @@ type RejectHubSpokeResponse struct { func (x *RejectHubSpokeResponse) Reset() { *x = RejectHubSpokeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejectHubSpokeResponse) String() string { @@ -3265,7 +3207,7 @@ func (*RejectHubSpokeResponse) ProtoMessage() {} func (x *RejectHubSpokeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3300,11 +3242,9 @@ type GetRouteTableRequest struct { func (x *GetRouteTableRequest) Reset() { *x = GetRouteTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouteTableRequest) String() string { @@ -3315,7 +3255,7 @@ func (*GetRouteTableRequest) ProtoMessage() {} func (x *GetRouteTableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3350,11 +3290,9 @@ type GetRouteRequest struct { func (x *GetRouteRequest) Reset() { *x = GetRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRouteRequest) String() string { @@ -3365,7 +3303,7 @@ func (*GetRouteRequest) ProtoMessage() {} func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3409,11 +3347,9 @@ type ListRoutesRequest struct { func (x *ListRoutesRequest) Reset() { *x = ListRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesRequest) String() string { @@ -3424,7 +3360,7 @@ func (*ListRoutesRequest) ProtoMessage() {} func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3494,11 +3430,9 @@ type ListRoutesResponse struct { func (x *ListRoutesResponse) Reset() { *x = ListRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRoutesResponse) String() string { @@ -3509,7 +3443,7 @@ func (*ListRoutesResponse) ProtoMessage() {} func (x *ListRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3567,11 +3501,9 @@ type ListRouteTablesRequest struct { func (x *ListRouteTablesRequest) Reset() { *x = ListRouteTablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRouteTablesRequest) String() string { @@ -3582,7 +3514,7 @@ func (*ListRouteTablesRequest) ProtoMessage() {} func (x *ListRouteTablesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3652,11 +3584,9 @@ type ListRouteTablesResponse struct { func (x *ListRouteTablesResponse) Reset() { *x = ListRouteTablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRouteTablesResponse) String() string { @@ -3667,7 +3597,7 @@ func (*ListRouteTablesResponse) ProtoMessage() {} func (x *ListRouteTablesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3725,11 +3655,9 @@ type ListGroupsRequest struct { func (x *ListGroupsRequest) Reset() { *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsRequest) String() string { @@ -3740,7 +3668,7 @@ func (*ListGroupsRequest) ProtoMessage() {} func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3810,11 +3738,9 @@ type ListGroupsResponse struct { func (x *ListGroupsResponse) Reset() { *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsResponse) String() string { @@ -3825,7 +3751,7 @@ func (*ListGroupsResponse) ProtoMessage() {} func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3886,11 +3812,9 @@ type LinkedVpnTunnels struct { func (x *LinkedVpnTunnels) Reset() { *x = LinkedVpnTunnels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkedVpnTunnels) String() string { @@ -3901,7 +3825,7 @@ func (*LinkedVpnTunnels) ProtoMessage() {} func (x *LinkedVpnTunnels) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3969,11 +3893,9 @@ type LinkedInterconnectAttachments struct { func (x *LinkedInterconnectAttachments) Reset() { *x = LinkedInterconnectAttachments{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkedInterconnectAttachments) String() string { @@ -3984,7 +3906,7 @@ func (*LinkedInterconnectAttachments) ProtoMessage() {} func (x *LinkedInterconnectAttachments) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4053,11 +3975,9 @@ type LinkedRouterApplianceInstances struct { func (x *LinkedRouterApplianceInstances) Reset() { *x = LinkedRouterApplianceInstances{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkedRouterApplianceInstances) String() string { @@ -4068,7 +3988,7 @@ func (*LinkedRouterApplianceInstances) ProtoMessage() {} func (x *LinkedRouterApplianceInstances) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4131,11 +4051,9 @@ type LinkedVpcNetwork struct { func (x *LinkedVpcNetwork) Reset() { *x = LinkedVpcNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkedVpcNetwork) String() string { @@ -4146,7 +4064,7 @@ func (*LinkedVpcNetwork) ProtoMessage() {} func (x *LinkedVpcNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4213,11 +4131,9 @@ type LinkedProducerVpcNetwork struct { func (x *LinkedProducerVpcNetwork) Reset() { *x = LinkedProducerVpcNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LinkedProducerVpcNetwork) String() string { @@ -4228,7 +4144,7 @@ func (*LinkedProducerVpcNetwork) ProtoMessage() {} func (x *LinkedProducerVpcNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4302,11 +4218,9 @@ type RouterApplianceInstance struct { func (x *RouterApplianceInstance) Reset() { *x = RouterApplianceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterApplianceInstance) String() string { @@ -4317,7 +4231,7 @@ func (*RouterApplianceInstance) ProtoMessage() {} func (x *RouterApplianceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4358,11 +4272,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4373,7 +4285,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4406,11 +4318,9 @@ type NextHopVpcNetwork struct { func (x *NextHopVpcNetwork) Reset() { *x = NextHopVpcNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NextHopVpcNetwork) String() string { @@ -4421,7 +4331,7 @@ func (*NextHopVpcNetwork) ProtoMessage() {} func (x *NextHopVpcNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4461,11 +4371,9 @@ type NextHopVPNTunnel struct { func (x *NextHopVPNTunnel) Reset() { *x = NextHopVPNTunnel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NextHopVPNTunnel) String() string { @@ -4476,7 +4384,7 @@ func (*NextHopVPNTunnel) ProtoMessage() {} func (x *NextHopVPNTunnel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4530,11 +4438,9 @@ type NextHopRouterApplianceInstance struct { func (x *NextHopRouterApplianceInstance) Reset() { *x = NextHopRouterApplianceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NextHopRouterApplianceInstance) String() string { @@ -4545,7 +4451,7 @@ func (*NextHopRouterApplianceInstance) ProtoMessage() {} func (x *NextHopRouterApplianceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4600,11 +4506,9 @@ type NextHopInterconnectAttachment struct { func (x *NextHopInterconnectAttachment) Reset() { *x = NextHopInterconnectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NextHopInterconnectAttachment) String() string { @@ -4615,7 +4519,7 @@ func (*NextHopInterconnectAttachment) ProtoMessage() {} func (x *NextHopInterconnectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4674,11 +4578,9 @@ type SpokeSummary struct { func (x *SpokeSummary) Reset() { *x = SpokeSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpokeSummary) String() string { @@ -4689,7 +4591,7 @@ func (*SpokeSummary) ProtoMessage() {} func (x *SpokeSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4738,11 +4640,9 @@ type GetGroupRequest struct { func (x *GetGroupRequest) Reset() { *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGroupRequest) String() string { @@ -4753,7 +4653,7 @@ func (*GetGroupRequest) ProtoMessage() {} func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4810,11 +4710,9 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGroupRequest) String() string { @@ -4825,7 +4723,7 @@ func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4877,11 +4775,9 @@ type Spoke_StateReason struct { func (x *Spoke_StateReason) Reset() { *x = Spoke_StateReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Spoke_StateReason) String() string { @@ -4892,7 +4788,7 @@ func (*Spoke_StateReason) ProtoMessage() {} func (x *Spoke_StateReason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4945,11 +4841,9 @@ type SpokeSummary_SpokeTypeCount struct { func (x *SpokeSummary_SpokeTypeCount) Reset() { *x = SpokeSummary_SpokeTypeCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpokeSummary_SpokeTypeCount) String() string { @@ -4960,7 +4854,7 @@ func (*SpokeSummary_SpokeTypeCount) ProtoMessage() {} func (x *SpokeSummary_SpokeTypeCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5005,11 +4899,9 @@ type SpokeSummary_SpokeStateCount struct { func (x *SpokeSummary_SpokeStateCount) Reset() { *x = SpokeSummary_SpokeStateCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpokeSummary_SpokeStateCount) String() string { @@ -5020,7 +4912,7 @@ func (*SpokeSummary_SpokeStateCount) ProtoMessage() {} func (x *SpokeSummary_SpokeStateCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5064,11 +4956,9 @@ type SpokeSummary_SpokeStateReasonCount struct { func (x *SpokeSummary_SpokeStateReasonCount) Reset() { *x = SpokeSummary_SpokeStateReasonCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpokeSummary_SpokeStateReasonCount) String() string { @@ -5079,7 +4969,7 @@ func (*SpokeSummary_SpokeStateReasonCount) ProtoMessage() {} func (x *SpokeSummary_SpokeStateReasonCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6627,668 +6517,6 @@ func file_google_cloud_networkconnectivity_v1_hub_proto_init() { return } file_google_cloud_networkconnectivity_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Hub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RoutingVPC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Spoke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RouteTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AutoAccept); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListHubsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListHubsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListHubSpokesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListHubSpokesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*QueryHubStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*QueryHubStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*HubStatusEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PscPropagationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListSpokesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListSpokesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AcceptHubSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AcceptHubSpokeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*RejectHubSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*RejectHubSpokeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetRouteTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListRouteTablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListRouteTablesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*LinkedVpnTunnels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*LinkedInterconnectAttachments); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*LinkedRouterApplianceInstances); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*LinkedVpcNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*LinkedProducerVpcNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*RouterApplianceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*NextHopVpcNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*NextHopVPNTunnel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*NextHopRouterApplianceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*NextHopInterconnectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SpokeSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*Spoke_StateReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*SpokeSummary_SpokeTypeCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*SpokeSummary_SpokeStateCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*SpokeSummary_SpokeStateReasonCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkconnectivity_v1_hub_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/networkconnectivity/apiv1/networkconnectivitypb/policy_based_routing.pb.go b/networkconnectivity/apiv1/networkconnectivitypb/policy_based_routing.pb.go index 17178ed4bbb3..0983e8f6b86b 100755 --- a/networkconnectivity/apiv1/networkconnectivitypb/policy_based_routing.pb.go +++ b/networkconnectivity/apiv1/networkconnectivitypb/policy_based_routing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkconnectivity/v1/policy_based_routing.proto @@ -260,11 +260,9 @@ type PolicyBasedRoute struct { func (x *PolicyBasedRoute) Reset() { *x = PolicyBasedRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyBasedRoute) String() string { @@ -275,7 +273,7 @@ func (*PolicyBasedRoute) ProtoMessage() {} func (x *PolicyBasedRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -468,11 +466,9 @@ type ListPolicyBasedRoutesRequest struct { func (x *ListPolicyBasedRoutesRequest) Reset() { *x = ListPolicyBasedRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyBasedRoutesRequest) String() string { @@ -483,7 +479,7 @@ func (*ListPolicyBasedRoutesRequest) ProtoMessage() {} func (x *ListPolicyBasedRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +546,9 @@ type ListPolicyBasedRoutesResponse struct { func (x *ListPolicyBasedRoutesResponse) Reset() { *x = ListPolicyBasedRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPolicyBasedRoutesResponse) String() string { @@ -565,7 +559,7 @@ func (*ListPolicyBasedRoutesResponse) ProtoMessage() {} func (x *ListPolicyBasedRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +607,9 @@ type GetPolicyBasedRouteRequest struct { func (x *GetPolicyBasedRouteRequest) Reset() { *x = GetPolicyBasedRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyBasedRouteRequest) String() string { @@ -628,7 +620,7 @@ func (*GetPolicyBasedRouteRequest) ProtoMessage() {} func (x *GetPolicyBasedRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +672,9 @@ type CreatePolicyBasedRouteRequest struct { func (x *CreatePolicyBasedRouteRequest) Reset() { *x = CreatePolicyBasedRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePolicyBasedRouteRequest) String() string { @@ -695,7 +685,7 @@ func (*CreatePolicyBasedRouteRequest) ProtoMessage() {} func (x *CreatePolicyBasedRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +754,9 @@ type DeletePolicyBasedRouteRequest struct { func (x *DeletePolicyBasedRouteRequest) Reset() { *x = DeletePolicyBasedRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePolicyBasedRouteRequest) String() string { @@ -779,7 +767,7 @@ func (*DeletePolicyBasedRouteRequest) ProtoMessage() {} func (x *DeletePolicyBasedRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +810,9 @@ type PolicyBasedRoute_VirtualMachine struct { func (x *PolicyBasedRoute_VirtualMachine) Reset() { *x = PolicyBasedRoute_VirtualMachine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyBasedRoute_VirtualMachine) String() string { @@ -837,7 +823,7 @@ func (*PolicyBasedRoute_VirtualMachine) ProtoMessage() {} func (x *PolicyBasedRoute_VirtualMachine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -872,11 +858,9 @@ type PolicyBasedRoute_InterconnectAttachment struct { func (x *PolicyBasedRoute_InterconnectAttachment) Reset() { *x = PolicyBasedRoute_InterconnectAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyBasedRoute_InterconnectAttachment) String() string { @@ -887,7 +871,7 @@ func (*PolicyBasedRoute_InterconnectAttachment) ProtoMessage() {} func (x *PolicyBasedRoute_InterconnectAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,11 +916,9 @@ type PolicyBasedRoute_Filter struct { func (x *PolicyBasedRoute_Filter) Reset() { *x = PolicyBasedRoute_Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyBasedRoute_Filter) String() string { @@ -947,7 +929,7 @@ func (*PolicyBasedRoute_Filter) ProtoMessage() {} func (x *PolicyBasedRoute_Filter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,11 +993,9 @@ type PolicyBasedRoute_Warnings struct { func (x *PolicyBasedRoute_Warnings) Reset() { *x = PolicyBasedRoute_Warnings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyBasedRoute_Warnings) String() string { @@ -1026,7 +1006,7 @@ func (*PolicyBasedRoute_Warnings) ProtoMessage() {} func (x *PolicyBasedRoute_Warnings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1444,128 +1424,6 @@ func file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_init() return } file_google_cloud_networkconnectivity_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PolicyBasedRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyBasedRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPolicyBasedRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyBasedRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreatePolicyBasedRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeletePolicyBasedRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PolicyBasedRoute_VirtualMachine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PolicyBasedRoute_InterconnectAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PolicyBasedRoute_Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PolicyBasedRoute_Warnings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkconnectivity_v1_policy_based_routing_proto_msgTypes[0].OneofWrappers = []any{ (*PolicyBasedRoute_VirtualMachine_)(nil), (*PolicyBasedRoute_InterconnectAttachment_)(nil), diff --git a/networkconnectivity/apiv1/policy_based_routing_client.go b/networkconnectivity/apiv1/policy_based_routing_client.go index 5ae4383d91b7..a74ec1464ed9 100755 --- a/networkconnectivity/apiv1/policy_based_routing_client.go +++ b/networkconnectivity/apiv1/policy_based_routing_client.go @@ -19,6 +19,7 @@ package networkconnectivity import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -294,6 +295,8 @@ type policyBasedRoutingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyBasedRoutingClient creates a new policy based routing service client based on gRPC. @@ -321,6 +324,7 @@ func NewPolicyBasedRoutingClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, policyBasedRoutingClient: networkconnectivitypb.NewPolicyBasedRoutingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -388,7 +392,7 @@ func (c *policyBasedRoutingGRPCClient) ListPolicyBasedRoutes(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyBasedRoutingClient.ListPolicyBasedRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyBasedRoutingClient.ListPolicyBasedRoutes, req, settings.GRPC, c.logger, "ListPolicyBasedRoutes") return err }, opts...) if err != nil { @@ -423,7 +427,7 @@ func (c *policyBasedRoutingGRPCClient) GetPolicyBasedRoute(ctx context.Context, var resp *networkconnectivitypb.PolicyBasedRoute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyBasedRoutingClient.GetPolicyBasedRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyBasedRoutingClient.GetPolicyBasedRoute, req, settings.GRPC, c.logger, "GetPolicyBasedRoute") return err }, opts...) if err != nil { @@ -441,7 +445,7 @@ func (c *policyBasedRoutingGRPCClient) CreatePolicyBasedRoute(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyBasedRoutingClient.CreatePolicyBasedRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyBasedRoutingClient.CreatePolicyBasedRoute, req, settings.GRPC, c.logger, "CreatePolicyBasedRoute") return err }, opts...) if err != nil { @@ -461,7 +465,7 @@ func (c *policyBasedRoutingGRPCClient) DeletePolicyBasedRoute(ctx context.Contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyBasedRoutingClient.DeletePolicyBasedRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyBasedRoutingClient.DeletePolicyBasedRoute, req, settings.GRPC, c.logger, "DeletePolicyBasedRoute") return err }, opts...) if err != nil { @@ -481,7 +485,7 @@ func (c *policyBasedRoutingGRPCClient) GetLocation(ctx context.Context, req *loc var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -510,7 +514,7 @@ func (c *policyBasedRoutingGRPCClient) ListLocations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -545,7 +549,7 @@ func (c *policyBasedRoutingGRPCClient) GetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -563,7 +567,7 @@ func (c *policyBasedRoutingGRPCClient) SetIamPolicy(ctx context.Context, req *ia var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -581,7 +585,7 @@ func (c *policyBasedRoutingGRPCClient) TestIamPermissions(ctx context.Context, r var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -598,7 +602,7 @@ func (c *policyBasedRoutingGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -612,7 +616,7 @@ func (c *policyBasedRoutingGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -627,7 +631,7 @@ func (c *policyBasedRoutingGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -656,7 +660,7 @@ func (c *policyBasedRoutingGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/networkconnectivity/apiv1/policy_based_routing_client_example_go123_test.go b/networkconnectivity/apiv1/policy_based_routing_client_example_go123_test.go index a759cffa5a51..9c3e7be5cdc0 100644 --- a/networkconnectivity/apiv1/policy_based_routing_client_example_go123_test.go +++ b/networkconnectivity/apiv1/policy_based_routing_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExamplePolicyBasedRoutingClient_ListPolicyBasedRoutes_all() { } for resp, err := range c.ListPolicyBasedRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExamplePolicyBasedRoutingClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExamplePolicyBasedRoutingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networkconnectivity/apiv1alpha1/helpers.go b/networkconnectivity/apiv1alpha1/helpers.go index 489c765df22c..7d438850fefd 100755 --- a/networkconnectivity/apiv1alpha1/helpers.go +++ b/networkconnectivity/apiv1alpha1/helpers.go @@ -18,10 +18,20 @@ package networkconnectivity import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "networkconnectivity.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/networkconnectivity/apiv1alpha1/hub_client.go b/networkconnectivity/apiv1alpha1/hub_client.go index 20cb8e48fce1..20e583d5f15c 100755 --- a/networkconnectivity/apiv1alpha1/hub_client.go +++ b/networkconnectivity/apiv1alpha1/hub_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1alpha1/networkconnectivitypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -384,6 +383,8 @@ type hubGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewHubClient creates a new hub service client based on gRPC. @@ -413,6 +414,7 @@ func NewHubClient(ctx context.Context, opts ...option.ClientOption) (*HubClient, connPool: connPool, hubClient: networkconnectivitypb.NewHubServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -475,6 +477,8 @@ type hubRESTClient struct { // Points back to the CallOptions field of the containing HubClient CallOptions **HubCallOptions + + logger *slog.Logger } // NewHubRESTClient creates a new hub service rest client. @@ -495,6 +499,7 @@ func NewHubRESTClient(ctx context.Context, opts ...option.ClientOption) (*HubCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -568,7 +573,7 @@ func (c *hubGRPCClient) ListHubs(ctx context.Context, req *networkconnectivitypb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListHubs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListHubs, req, settings.GRPC, c.logger, "ListHubs") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *hubGRPCClient) GetHub(ctx context.Context, req *networkconnectivitypb.G var resp *networkconnectivitypb.Hub err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetHub, req, settings.GRPC, c.logger, "GetHub") return err }, opts...) if err != nil { @@ -621,7 +626,7 @@ func (c *hubGRPCClient) CreateHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.CreateHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.CreateHub, req, settings.GRPC, c.logger, "CreateHub") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *hubGRPCClient) UpdateHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.UpdateHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.UpdateHub, req, settings.GRPC, c.logger, "UpdateHub") return err }, opts...) if err != nil { @@ -661,7 +666,7 @@ func (c *hubGRPCClient) DeleteHub(ctx context.Context, req *networkconnectivityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.DeleteHub(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.DeleteHub, req, settings.GRPC, c.logger, "DeleteHub") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *hubGRPCClient) ListSpokes(ctx context.Context, req *networkconnectivity } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.ListSpokes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.ListSpokes, req, settings.GRPC, c.logger, "ListSpokes") return err }, opts...) if err != nil { @@ -727,7 +732,7 @@ func (c *hubGRPCClient) GetSpoke(ctx context.Context, req *networkconnectivitypb var resp *networkconnectivitypb.Spoke err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.GetSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.GetSpoke, req, settings.GRPC, c.logger, "GetSpoke") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *hubGRPCClient) CreateSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.CreateSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.CreateSpoke, req, settings.GRPC, c.logger, "CreateSpoke") return err }, opts...) if err != nil { @@ -765,7 +770,7 @@ func (c *hubGRPCClient) UpdateSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.UpdateSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.UpdateSpoke, req, settings.GRPC, c.logger, "UpdateSpoke") return err }, opts...) if err != nil { @@ -785,7 +790,7 @@ func (c *hubGRPCClient) DeleteSpoke(ctx context.Context, req *networkconnectivit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.hubClient.DeleteSpoke(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.hubClient.DeleteSpoke, req, settings.GRPC, c.logger, "DeleteSpoke") return err }, opts...) if err != nil { @@ -847,21 +852,10 @@ func (c *hubRESTClient) ListHubs(ctx context.Context, req *networkconnectivitypb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHubs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -924,17 +918,7 @@ func (c *hubRESTClient) GetHub(ctx context.Context, req *networkconnectivitypb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHub") if err != nil { return err } @@ -996,21 +980,10 @@ func (c *hubRESTClient) CreateHub(ctx context.Context, req *networkconnectivityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateHub") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1077,21 +1050,10 @@ func (c *hubRESTClient) UpdateHub(ctx context.Context, req *networkconnectivityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateHub") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1144,21 +1106,10 @@ func (c *hubRESTClient) DeleteHub(ctx context.Context, req *networkconnectivityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteHub") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1227,21 +1178,10 @@ func (c *hubRESTClient) ListSpokes(ctx context.Context, req *networkconnectivity } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSpokes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1304,17 +1244,7 @@ func (c *hubRESTClient) GetSpoke(ctx context.Context, req *networkconnectivitypb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSpoke") if err != nil { return err } @@ -1376,21 +1306,10 @@ func (c *hubRESTClient) CreateSpoke(ctx context.Context, req *networkconnectivit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpoke") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1457,21 +1376,10 @@ func (c *hubRESTClient) UpdateSpoke(ctx context.Context, req *networkconnectivit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSpoke") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1524,21 +1432,10 @@ func (c *hubRESTClient) DeleteSpoke(ctx context.Context, req *networkconnectivit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSpoke") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/networkconnectivity/apiv1alpha1/hub_client_example_go123_test.go b/networkconnectivity/apiv1alpha1/hub_client_example_go123_test.go index 25ce8aa123c0..ce457e805e68 100644 --- a/networkconnectivity/apiv1alpha1/hub_client_example_go123_test.go +++ b/networkconnectivity/apiv1alpha1/hub_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleHubClient_ListHubs_all() { } for resp, err := range c.ListHubs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleHubClient_ListSpokes_all() { } for resp, err := range c.ListSpokes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networkconnectivity/apiv1alpha1/networkconnectivitypb/common.pb.go b/networkconnectivity/apiv1alpha1/networkconnectivitypb/common.pb.go index 5791cf84a80a..bef659058537 100755 --- a/networkconnectivity/apiv1alpha1/networkconnectivitypb/common.pb.go +++ b/networkconnectivity/apiv1alpha1/networkconnectivitypb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkconnectivity/v1alpha1/common.proto @@ -64,11 +64,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -79,7 +77,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,20 +229,6 @@ func file_google_cloud_networkconnectivity_v1alpha1_common_proto_init() { if File_google_cloud_networkconnectivity_v1alpha1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkconnectivity_v1alpha1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkconnectivity/apiv1alpha1/networkconnectivitypb/hub.pb.go b/networkconnectivity/apiv1alpha1/networkconnectivitypb/hub.pb.go index cdbc237c6844..ea3fd585576b 100755 --- a/networkconnectivity/apiv1alpha1/networkconnectivitypb/hub.pb.go +++ b/networkconnectivity/apiv1alpha1/networkconnectivitypb/hub.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkconnectivity/v1alpha1/hub.proto @@ -132,11 +132,9 @@ type Hub struct { func (x *Hub) Reset() { *x = Hub{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hub) String() string { @@ -147,7 +145,7 @@ func (*Hub) ProtoMessage() {} func (x *Hub) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +252,9 @@ type Spoke struct { func (x *Spoke) Reset() { *x = Spoke{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Spoke) String() string { @@ -269,7 +265,7 @@ func (*Spoke) ProtoMessage() {} func (x *Spoke) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +377,9 @@ type ListHubsRequest struct { func (x *ListHubsRequest) Reset() { *x = ListHubsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubsRequest) String() string { @@ -396,7 +390,7 @@ func (*ListHubsRequest) ProtoMessage() {} func (x *ListHubsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +457,9 @@ type ListHubsResponse struct { func (x *ListHubsResponse) Reset() { *x = ListHubsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHubsResponse) String() string { @@ -478,7 +470,7 @@ func (*ListHubsResponse) ProtoMessage() {} func (x *ListHubsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +518,9 @@ type GetHubRequest struct { func (x *GetHubRequest) Reset() { *x = GetHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHubRequest) String() string { @@ -541,7 +531,7 @@ func (*GetHubRequest) ProtoMessage() {} func (x *GetHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +583,9 @@ type CreateHubRequest struct { func (x *CreateHubRequest) Reset() { *x = CreateHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHubRequest) String() string { @@ -608,7 +596,7 @@ func (*CreateHubRequest) ProtoMessage() {} func (x *CreateHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +671,9 @@ type UpdateHubRequest struct { func (x *UpdateHubRequest) Reset() { *x = UpdateHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHubRequest) String() string { @@ -698,7 +684,7 @@ func (*UpdateHubRequest) ProtoMessage() {} func (x *UpdateHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,11 +746,9 @@ type DeleteHubRequest struct { func (x *DeleteHubRequest) Reset() { *x = DeleteHubRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHubRequest) String() string { @@ -775,7 +759,7 @@ func (*DeleteHubRequest) ProtoMessage() {} func (x *DeleteHubRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +808,9 @@ type ListSpokesRequest struct { func (x *ListSpokesRequest) Reset() { *x = ListSpokesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpokesRequest) String() string { @@ -839,7 +821,7 @@ func (*ListSpokesRequest) ProtoMessage() {} func (x *ListSpokesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -906,11 +888,9 @@ type ListSpokesResponse struct { func (x *ListSpokesResponse) Reset() { *x = ListSpokesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSpokesResponse) String() string { @@ -921,7 +901,7 @@ func (*ListSpokesResponse) ProtoMessage() {} func (x *ListSpokesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,11 +949,9 @@ type GetSpokeRequest struct { func (x *GetSpokeRequest) Reset() { *x = GetSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSpokeRequest) String() string { @@ -984,7 +962,7 @@ func (*GetSpokeRequest) ProtoMessage() {} func (x *GetSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1014,9 @@ type CreateSpokeRequest struct { func (x *CreateSpokeRequest) Reset() { *x = CreateSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSpokeRequest) String() string { @@ -1051,7 +1027,7 @@ func (*CreateSpokeRequest) ProtoMessage() {} func (x *CreateSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,11 +1102,9 @@ type UpdateSpokeRequest struct { func (x *UpdateSpokeRequest) Reset() { *x = UpdateSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSpokeRequest) String() string { @@ -1141,7 +1115,7 @@ func (*UpdateSpokeRequest) ProtoMessage() {} func (x *UpdateSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,11 +1177,9 @@ type DeleteSpokeRequest struct { func (x *DeleteSpokeRequest) Reset() { *x = DeleteSpokeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSpokeRequest) String() string { @@ -1218,7 +1190,7 @@ func (*DeleteSpokeRequest) ProtoMessage() {} func (x *DeleteSpokeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1236,9 @@ type RouterApplianceInstance struct { func (x *RouterApplianceInstance) Reset() { *x = RouterApplianceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouterApplianceInstance) String() string { @@ -1279,7 +1249,7 @@ func (*RouterApplianceInstance) ProtoMessage() {} func (x *RouterApplianceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,188 +1816,6 @@ func file_google_cloud_networkconnectivity_v1alpha1_hub_proto_init() { if File_google_cloud_networkconnectivity_v1alpha1_hub_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Hub); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Spoke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListHubsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListHubsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHubRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListSpokesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListSpokesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSpokeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkconnectivity_v1alpha1_hub_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RouterApplianceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkmanagement/apiv1/helpers.go b/networkmanagement/apiv1/helpers.go index 55c149bfbff5..f3fc22aa88a8 100755 --- a/networkmanagement/apiv1/helpers.go +++ b/networkmanagement/apiv1/helpers.go @@ -18,10 +18,20 @@ package networkmanagement import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "networkmanagement.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/networkmanagement/apiv1/networkmanagementpb/connectivity_test.pb.go b/networkmanagement/apiv1/networkmanagementpb/connectivity_test.pb.go index 8f7da8cfcf27..c9bce459fdc5 100755 --- a/networkmanagement/apiv1/networkmanagementpb/connectivity_test.pb.go +++ b/networkmanagement/apiv1/networkmanagementpb/connectivity_test.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkmanagement/v1/connectivity_test.proto @@ -448,11 +448,9 @@ type ConnectivityTest struct { func (x *ConnectivityTest) Reset() { *x = ConnectivityTest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectivityTest) String() string { @@ -463,7 +461,7 @@ func (*ConnectivityTest) ProtoMessage() {} func (x *ConnectivityTest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,11 +653,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -670,7 +666,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +827,9 @@ type ReachabilityDetails struct { func (x *ReachabilityDetails) Reset() { *x = ReachabilityDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReachabilityDetails) String() string { @@ -846,7 +840,7 @@ func (*ReachabilityDetails) ProtoMessage() {} func (x *ReachabilityDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,11 +899,9 @@ type LatencyPercentile struct { func (x *LatencyPercentile) Reset() { *x = LatencyPercentile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatencyPercentile) String() string { @@ -920,7 +912,7 @@ func (*LatencyPercentile) ProtoMessage() {} func (x *LatencyPercentile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +953,9 @@ type LatencyDistribution struct { func (x *LatencyDistribution) Reset() { *x = LatencyDistribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatencyDistribution) String() string { @@ -976,7 +966,7 @@ func (*LatencyDistribution) ProtoMessage() {} func (x *LatencyDistribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1023,9 @@ type ProbingDetails struct { func (x *ProbingDetails) Reset() { *x = ProbingDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProbingDetails) String() string { @@ -1048,7 +1036,7 @@ func (*ProbingDetails) ProtoMessage() {} func (x *ProbingDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,11 +1126,9 @@ type Endpoint_CloudFunctionEndpoint struct { func (x *Endpoint_CloudFunctionEndpoint) Reset() { *x = Endpoint_CloudFunctionEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint_CloudFunctionEndpoint) String() string { @@ -1153,7 +1139,7 @@ func (*Endpoint_CloudFunctionEndpoint) ProtoMessage() {} func (x *Endpoint_CloudFunctionEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1189,11 +1175,9 @@ type Endpoint_AppEngineVersionEndpoint struct { func (x *Endpoint_AppEngineVersionEndpoint) Reset() { *x = Endpoint_AppEngineVersionEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint_AppEngineVersionEndpoint) String() string { @@ -1204,7 +1188,7 @@ func (*Endpoint_AppEngineVersionEndpoint) ProtoMessage() {} func (x *Endpoint_AppEngineVersionEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1225,9 @@ type Endpoint_CloudRunRevisionEndpoint struct { func (x *Endpoint_CloudRunRevisionEndpoint) Reset() { *x = Endpoint_CloudRunRevisionEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint_CloudRunRevisionEndpoint) String() string { @@ -1256,7 +1238,7 @@ func (*Endpoint_CloudRunRevisionEndpoint) ProtoMessage() {} func (x *Endpoint_CloudRunRevisionEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1273,9 @@ type ProbingDetails_EdgeLocation struct { func (x *ProbingDetails_EdgeLocation) Reset() { *x = ProbingDetails_EdgeLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProbingDetails_EdgeLocation) String() string { @@ -1306,7 +1286,7 @@ func (*ProbingDetails_EdgeLocation) ProtoMessage() {} func (x *ProbingDetails_EdgeLocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,128 +1691,6 @@ func file_google_cloud_networkmanagement_v1_connectivity_test_proto_init() { return } file_google_cloud_networkmanagement_v1_trace_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConnectivityTest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReachabilityDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LatencyPercentile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LatencyDistribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProbingDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint_CloudFunctionEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint_AppEngineVersionEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint_CloudRunRevisionEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ProbingDetails_EdgeLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkmanagement_v1_connectivity_test_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/networkmanagement/apiv1/networkmanagementpb/reachability.pb.go b/networkmanagement/apiv1/networkmanagementpb/reachability.pb.go index f65448b3a142..14deedd13dad 100755 --- a/networkmanagement/apiv1/networkmanagementpb/reachability.pb.go +++ b/networkmanagement/apiv1/networkmanagementpb/reachability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkmanagement/v1/reachability.proto @@ -83,11 +83,9 @@ type ListConnectivityTestsRequest struct { func (x *ListConnectivityTestsRequest) Reset() { *x = ListConnectivityTestsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectivityTestsRequest) String() string { @@ -98,7 +96,7 @@ func (*ListConnectivityTestsRequest) ProtoMessage() {} func (x *ListConnectivityTestsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +162,9 @@ type ListConnectivityTestsResponse struct { func (x *ListConnectivityTestsResponse) Reset() { *x = ListConnectivityTestsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectivityTestsResponse) String() string { @@ -179,7 +175,7 @@ func (*ListConnectivityTestsResponse) ProtoMessage() {} func (x *ListConnectivityTestsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type GetConnectivityTestRequest struct { func (x *GetConnectivityTestRequest) Reset() { *x = GetConnectivityTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectivityTestRequest) String() string { @@ -244,7 +238,7 @@ func (*GetConnectivityTestRequest) ProtoMessage() {} func (x *GetConnectivityTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +285,9 @@ type CreateConnectivityTestRequest struct { func (x *CreateConnectivityTestRequest) Reset() { *x = CreateConnectivityTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectivityTestRequest) String() string { @@ -306,7 +298,7 @@ func (*CreateConnectivityTestRequest) ProtoMessage() {} func (x *CreateConnectivityTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type UpdateConnectivityTestRequest struct { func (x *UpdateConnectivityTestRequest) Reset() { *x = UpdateConnectivityTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConnectivityTestRequest) String() string { @@ -372,7 +362,7 @@ func (*UpdateConnectivityTestRequest) ProtoMessage() {} func (x *UpdateConnectivityTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type DeleteConnectivityTestRequest struct { func (x *DeleteConnectivityTestRequest) Reset() { *x = DeleteConnectivityTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectivityTestRequest) String() string { @@ -430,7 +418,7 @@ func (*DeleteConnectivityTestRequest) ProtoMessage() {} func (x *DeleteConnectivityTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +454,9 @@ type RerunConnectivityTestRequest struct { func (x *RerunConnectivityTestRequest) Reset() { *x = RerunConnectivityTestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RerunConnectivityTestRequest) String() string { @@ -481,7 +467,7 @@ func (*RerunConnectivityTestRequest) ProtoMessage() {} func (x *RerunConnectivityTestRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +514,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -543,7 +527,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -910,104 +894,6 @@ func file_google_cloud_networkmanagement_v1_reachability_proto_init() { return } file_google_cloud_networkmanagement_v1_connectivity_test_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectivityTestsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectivityTestsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectivityTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectivityTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConnectivityTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectivityTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RerunConnectivityTestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_reachability_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkmanagement/apiv1/networkmanagementpb/trace.pb.go b/networkmanagement/apiv1/networkmanagementpb/trace.pb.go index f345012ec886..34ef593102fe 100755 --- a/networkmanagement/apiv1/networkmanagementpb/trace.pb.go +++ b/networkmanagement/apiv1/networkmanagementpb/trace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkmanagement/v1/trace.proto @@ -2031,11 +2031,9 @@ type Trace struct { func (x *Trace) Reset() { *x = Trace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trace) String() string { @@ -2046,7 +2044,7 @@ func (*Trace) ProtoMessage() {} func (x *Trace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2137,11 +2135,9 @@ type Step struct { func (x *Step) Reset() { *x = Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Step) String() string { @@ -2152,7 +2148,7 @@ func (*Step) ProtoMessage() {} func (x *Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,11 +2618,9 @@ type InstanceInfo struct { func (x *InstanceInfo) Reset() { *x = InstanceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceInfo) String() string { @@ -2637,7 +2631,7 @@ func (*InstanceInfo) ProtoMessage() {} func (x *InstanceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2737,11 +2731,9 @@ type NetworkInfo struct { func (x *NetworkInfo) Reset() { *x = NetworkInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkInfo) String() string { @@ -2752,7 +2744,7 @@ func (*NetworkInfo) ProtoMessage() {} func (x *NetworkInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2843,11 +2835,9 @@ type FirewallInfo struct { func (x *FirewallInfo) Reset() { *x = FirewallInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallInfo) String() string { @@ -2858,7 +2848,7 @@ func (*FirewallInfo) ProtoMessage() {} func (x *FirewallInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3002,11 +2992,9 @@ type RouteInfo struct { func (x *RouteInfo) Reset() { *x = RouteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteInfo) String() string { @@ -3017,7 +3005,7 @@ func (*RouteInfo) ProtoMessage() {} func (x *RouteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3183,11 +3171,9 @@ type GoogleServiceInfo struct { func (x *GoogleServiceInfo) Reset() { *x = GoogleServiceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleServiceInfo) String() string { @@ -3198,7 +3184,7 @@ func (*GoogleServiceInfo) ProtoMessage() {} func (x *GoogleServiceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3261,11 +3247,9 @@ type ForwardingRuleInfo struct { func (x *ForwardingRuleInfo) Reset() { *x = ForwardingRuleInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardingRuleInfo) String() string { @@ -3276,7 +3260,7 @@ func (*ForwardingRuleInfo) ProtoMessage() {} func (x *ForwardingRuleInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3392,11 +3376,9 @@ type LoadBalancerInfo struct { func (x *LoadBalancerInfo) Reset() { *x = LoadBalancerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadBalancerInfo) String() string { @@ -3407,7 +3389,7 @@ func (*LoadBalancerInfo) ProtoMessage() {} func (x *LoadBalancerInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3478,11 +3460,9 @@ type LoadBalancerBackend struct { func (x *LoadBalancerBackend) Reset() { *x = LoadBalancerBackend{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadBalancerBackend) String() string { @@ -3493,7 +3473,7 @@ func (*LoadBalancerBackend) ProtoMessage() {} func (x *LoadBalancerBackend) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3567,11 +3547,9 @@ type VpnGatewayInfo struct { func (x *VpnGatewayInfo) Reset() { *x = VpnGatewayInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnGatewayInfo) String() string { @@ -3582,7 +3560,7 @@ func (*VpnGatewayInfo) ProtoMessage() {} func (x *VpnGatewayInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3667,11 +3645,9 @@ type VpnTunnelInfo struct { func (x *VpnTunnelInfo) Reset() { *x = VpnTunnelInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpnTunnelInfo) String() string { @@ -3682,7 +3658,7 @@ func (*VpnTunnelInfo) ProtoMessage() {} func (x *VpnTunnelInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3788,11 +3764,9 @@ type EndpointInfo struct { func (x *EndpointInfo) Reset() { *x = EndpointInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointInfo) String() string { @@ -3803,7 +3777,7 @@ func (*EndpointInfo) ProtoMessage() {} func (x *EndpointInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3895,11 +3869,9 @@ type DeliverInfo struct { func (x *DeliverInfo) Reset() { *x = DeliverInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliverInfo) String() string { @@ -3910,7 +3882,7 @@ func (*DeliverInfo) ProtoMessage() {} func (x *DeliverInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3976,11 +3948,9 @@ type ForwardInfo struct { func (x *ForwardInfo) Reset() { *x = ForwardInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ForwardInfo) String() string { @@ -3991,7 +3961,7 @@ func (*ForwardInfo) ProtoMessage() {} func (x *ForwardInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4046,11 +4016,9 @@ type AbortInfo struct { func (x *AbortInfo) Reset() { *x = AbortInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AbortInfo) String() string { @@ -4061,7 +4029,7 @@ func (*AbortInfo) ProtoMessage() {} func (x *AbortInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4124,11 +4092,9 @@ type DropInfo struct { func (x *DropInfo) Reset() { *x = DropInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DropInfo) String() string { @@ -4139,7 +4105,7 @@ func (*DropInfo) ProtoMessage() {} func (x *DropInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4210,11 +4176,9 @@ type GKEMasterInfo struct { func (x *GKEMasterInfo) Reset() { *x = GKEMasterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GKEMasterInfo) String() string { @@ -4225,7 +4189,7 @@ func (*GKEMasterInfo) ProtoMessage() {} func (x *GKEMasterInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4298,11 +4262,9 @@ type CloudSQLInstanceInfo struct { func (x *CloudSQLInstanceInfo) Reset() { *x = CloudSQLInstanceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSQLInstanceInfo) String() string { @@ -4313,7 +4275,7 @@ func (*CloudSQLInstanceInfo) ProtoMessage() {} func (x *CloudSQLInstanceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4392,11 +4354,9 @@ type RedisInstanceInfo struct { func (x *RedisInstanceInfo) Reset() { *x = RedisInstanceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedisInstanceInfo) String() string { @@ -4407,7 +4367,7 @@ func (*RedisInstanceInfo) ProtoMessage() {} func (x *RedisInstanceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4489,11 +4449,9 @@ type RedisClusterInfo struct { func (x *RedisClusterInfo) Reset() { *x = RedisClusterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RedisClusterInfo) String() string { @@ -4504,7 +4462,7 @@ func (*RedisClusterInfo) ProtoMessage() {} func (x *RedisClusterInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4579,11 +4537,9 @@ type CloudFunctionInfo struct { func (x *CloudFunctionInfo) Reset() { *x = CloudFunctionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudFunctionInfo) String() string { @@ -4594,7 +4550,7 @@ func (*CloudFunctionInfo) ProtoMessage() {} func (x *CloudFunctionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4655,11 +4611,9 @@ type CloudRunRevisionInfo struct { func (x *CloudRunRevisionInfo) Reset() { *x = CloudRunRevisionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudRunRevisionInfo) String() string { @@ -4670,7 +4624,7 @@ func (*CloudRunRevisionInfo) ProtoMessage() {} func (x *CloudRunRevisionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4731,11 +4685,9 @@ type AppEngineVersionInfo struct { func (x *AppEngineVersionInfo) Reset() { *x = AppEngineVersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineVersionInfo) String() string { @@ -4746,7 +4698,7 @@ func (*AppEngineVersionInfo) ProtoMessage() {} func (x *AppEngineVersionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4805,11 +4757,9 @@ type VpcConnectorInfo struct { func (x *VpcConnectorInfo) Reset() { *x = VpcConnectorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcConnectorInfo) String() string { @@ -4820,7 +4770,7 @@ func (*VpcConnectorInfo) ProtoMessage() {} func (x *VpcConnectorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4894,11 +4844,9 @@ type NatInfo struct { func (x *NatInfo) Reset() { *x = NatInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NatInfo) String() string { @@ -4909,7 +4857,7 @@ func (*NatInfo) ProtoMessage() {} func (x *NatInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5050,11 +4998,9 @@ type ProxyConnectionInfo struct { func (x *ProxyConnectionInfo) Reset() { *x = ProxyConnectionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProxyConnectionInfo) String() string { @@ -5065,7 +5011,7 @@ func (*ProxyConnectionInfo) ProtoMessage() {} func (x *ProxyConnectionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5196,11 +5142,9 @@ type LoadBalancerBackendInfo struct { func (x *LoadBalancerBackendInfo) Reset() { *x = LoadBalancerBackendInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadBalancerBackendInfo) String() string { @@ -5211,7 +5155,7 @@ func (*LoadBalancerBackendInfo) ProtoMessage() {} func (x *LoadBalancerBackendInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5308,11 +5252,9 @@ type StorageBucketInfo struct { func (x *StorageBucketInfo) Reset() { *x = StorageBucketInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageBucketInfo) String() string { @@ -5323,7 +5265,7 @@ func (*StorageBucketInfo) ProtoMessage() {} func (x *StorageBucketInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5358,11 +5300,9 @@ type ServerlessNegInfo struct { func (x *ServerlessNegInfo) Reset() { *x = ServerlessNegInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerlessNegInfo) String() string { @@ -5373,7 +5313,7 @@ func (*ServerlessNegInfo) ProtoMessage() {} func (x *ServerlessNegInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6754,368 +6694,6 @@ func file_google_cloud_networkmanagement_v1_trace_proto_init() { if File_google_cloud_networkmanagement_v1_trace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Trace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NetworkInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FirewallInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RouteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GoogleServiceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ForwardingRuleInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LoadBalancerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LoadBalancerBackend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VpnGatewayInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*VpnTunnelInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*EndpointInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeliverInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ForwardInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AbortInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DropInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GKEMasterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CloudSQLInstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RedisInstanceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RedisClusterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CloudFunctionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CloudRunRevisionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineVersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*VpcConnectorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*NatInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ProxyConnectionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*LoadBalancerBackendInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*StorageBucketInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ServerlessNegInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkmanagement_v1_trace_proto_msgTypes[1].OneofWrappers = []any{ (*Step_Instance)(nil), (*Step_Firewall)(nil), diff --git a/networkmanagement/apiv1/reachability_client.go b/networkmanagement/apiv1/reachability_client.go index 80d1b12facb1..29f0fffd81b0 100755 --- a/networkmanagement/apiv1/reachability_client.go +++ b/networkmanagement/apiv1/reachability_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networkmanagementpb "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -389,6 +388,8 @@ type reachabilityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewReachabilityClient creates a new reachability service client based on gRPC. @@ -422,6 +423,7 @@ func NewReachabilityClient(ctx context.Context, opts ...option.ClientOption) (*R connPool: connPool, reachabilityClient: networkmanagementpb.NewReachabilityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -487,6 +489,8 @@ type reachabilityRESTClient struct { // Points back to the CallOptions field of the containing ReachabilityClient CallOptions **ReachabilityCallOptions + + logger *slog.Logger } // NewReachabilityRESTClient creates a new reachability service rest client. @@ -511,6 +515,7 @@ func NewReachabilityRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -584,7 +589,7 @@ func (c *reachabilityGRPCClient) ListConnectivityTests(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.ListConnectivityTests(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.ListConnectivityTests, req, settings.GRPC, c.logger, "ListConnectivityTests") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *reachabilityGRPCClient) GetConnectivityTest(ctx context.Context, req *n var resp *networkmanagementpb.ConnectivityTest err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.GetConnectivityTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.GetConnectivityTest, req, settings.GRPC, c.logger, "GetConnectivityTest") return err }, opts...) if err != nil { @@ -637,7 +642,7 @@ func (c *reachabilityGRPCClient) CreateConnectivityTest(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.CreateConnectivityTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.CreateConnectivityTest, req, settings.GRPC, c.logger, "CreateConnectivityTest") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *reachabilityGRPCClient) UpdateConnectivityTest(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.UpdateConnectivityTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.UpdateConnectivityTest, req, settings.GRPC, c.logger, "UpdateConnectivityTest") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *reachabilityGRPCClient) RerunConnectivityTest(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.RerunConnectivityTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.RerunConnectivityTest, req, settings.GRPC, c.logger, "RerunConnectivityTest") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *reachabilityGRPCClient) DeleteConnectivityTest(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reachabilityClient.DeleteConnectivityTest(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reachabilityClient.DeleteConnectivityTest, req, settings.GRPC, c.logger, "DeleteConnectivityTest") return err }, opts...) if err != nil { @@ -717,7 +722,7 @@ func (c *reachabilityGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -746,7 +751,7 @@ func (c *reachabilityGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *reachabilityGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -799,7 +804,7 @@ func (c *reachabilityGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -817,7 +822,7 @@ func (c *reachabilityGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *reachabilityGRPCClient) CancelOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -848,7 +853,7 @@ func (c *reachabilityGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -863,7 +868,7 @@ func (c *reachabilityGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -892,7 +897,7 @@ func (c *reachabilityGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -969,21 +974,10 @@ func (c *reachabilityRESTClient) ListConnectivityTests(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnectivityTests") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1046,17 +1040,7 @@ func (c *reachabilityRESTClient) GetConnectivityTest(ctx context.Context, req *n httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnectivityTest") if err != nil { return err } @@ -1125,21 +1109,10 @@ func (c *reachabilityRESTClient) CreateConnectivityTest(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnectivityTest") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1216,21 +1189,10 @@ func (c *reachabilityRESTClient) UpdateConnectivityTest(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConnectivityTest") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1297,21 +1259,10 @@ func (c *reachabilityRESTClient) RerunConnectivityTest(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RerunConnectivityTest") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1361,21 +1312,10 @@ func (c *reachabilityRESTClient) DeleteConnectivityTest(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnectivityTest") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1426,17 +1366,7 @@ func (c *reachabilityRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1501,21 +1431,10 @@ func (c *reachabilityRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1582,17 +1501,7 @@ func (c *reachabilityRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1652,17 +1561,7 @@ func (c *reachabilityRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1724,17 +1623,7 @@ func (c *reachabilityRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1787,15 +1676,8 @@ func (c *reachabilityRESTClient) CancelOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1829,15 +1711,8 @@ func (c *reachabilityRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1874,17 +1749,7 @@ func (c *reachabilityRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1949,21 +1814,10 @@ func (c *reachabilityRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/networkmanagement/apiv1/reachability_client_example_go123_test.go b/networkmanagement/apiv1/reachability_client_example_go123_test.go index fd9aa10e7324..0a313b214eb7 100644 --- a/networkmanagement/apiv1/reachability_client_example_go123_test.go +++ b/networkmanagement/apiv1/reachability_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleReachabilityClient_ListConnectivityTests_all() { } for resp, err := range c.ListConnectivityTests(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleReachabilityClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleReachabilityClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networksecurity/apiv1beta1/helpers.go b/networksecurity/apiv1beta1/helpers.go index 8f9640db567e..1fbe416e2854 100755 --- a/networksecurity/apiv1beta1/helpers.go +++ b/networksecurity/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package networksecurity import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "networksecurity.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/networksecurity/apiv1beta1/network_security_client.go b/networksecurity/apiv1beta1/network_security_client.go index b08c43e17c84..7d714ba68cc3 100755 --- a/networksecurity/apiv1beta1/network_security_client.go +++ b/networksecurity/apiv1beta1/network_security_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -500,6 +499,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new network security client based on gRPC. @@ -528,6 +529,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: networksecuritypb.NewNetworkSecurityClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -593,6 +595,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new network security rest client. @@ -612,6 +616,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -685,7 +690,7 @@ func (c *gRPCClient) ListAuthorizationPolicies(ctx context.Context, req *network } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAuthorizationPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAuthorizationPolicies, req, settings.GRPC, c.logger, "ListAuthorizationPolicies") return err }, opts...) if err != nil { @@ -720,7 +725,7 @@ func (c *gRPCClient) GetAuthorizationPolicy(ctx context.Context, req *networksec var resp *networksecuritypb.AuthorizationPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAuthorizationPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAuthorizationPolicy, req, settings.GRPC, c.logger, "GetAuthorizationPolicy") return err }, opts...) if err != nil { @@ -738,7 +743,7 @@ func (c *gRPCClient) CreateAuthorizationPolicy(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAuthorizationPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAuthorizationPolicy, req, settings.GRPC, c.logger, "CreateAuthorizationPolicy") return err }, opts...) if err != nil { @@ -758,7 +763,7 @@ func (c *gRPCClient) UpdateAuthorizationPolicy(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAuthorizationPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAuthorizationPolicy, req, settings.GRPC, c.logger, "UpdateAuthorizationPolicy") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *gRPCClient) DeleteAuthorizationPolicy(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAuthorizationPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAuthorizationPolicy, req, settings.GRPC, c.logger, "DeleteAuthorizationPolicy") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *gRPCClient) ListServerTlsPolicies(ctx context.Context, req *networksecu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServerTlsPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServerTlsPolicies, req, settings.GRPC, c.logger, "ListServerTlsPolicies") return err }, opts...) if err != nil { @@ -844,7 +849,7 @@ func (c *gRPCClient) GetServerTlsPolicy(ctx context.Context, req *networksecurit var resp *networksecuritypb.ServerTlsPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetServerTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetServerTlsPolicy, req, settings.GRPC, c.logger, "GetServerTlsPolicy") return err }, opts...) if err != nil { @@ -862,7 +867,7 @@ func (c *gRPCClient) CreateServerTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateServerTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateServerTlsPolicy, req, settings.GRPC, c.logger, "CreateServerTlsPolicy") return err }, opts...) if err != nil { @@ -882,7 +887,7 @@ func (c *gRPCClient) UpdateServerTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateServerTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateServerTlsPolicy, req, settings.GRPC, c.logger, "UpdateServerTlsPolicy") return err }, opts...) if err != nil { @@ -902,7 +907,7 @@ func (c *gRPCClient) DeleteServerTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteServerTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteServerTlsPolicy, req, settings.GRPC, c.logger, "DeleteServerTlsPolicy") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *gRPCClient) ListClientTlsPolicies(ctx context.Context, req *networksecu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClientTlsPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClientTlsPolicies, req, settings.GRPC, c.logger, "ListClientTlsPolicies") return err }, opts...) if err != nil { @@ -968,7 +973,7 @@ func (c *gRPCClient) GetClientTlsPolicy(ctx context.Context, req *networksecurit var resp *networksecuritypb.ClientTlsPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetClientTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetClientTlsPolicy, req, settings.GRPC, c.logger, "GetClientTlsPolicy") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *gRPCClient) CreateClientTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateClientTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateClientTlsPolicy, req, settings.GRPC, c.logger, "CreateClientTlsPolicy") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *gRPCClient) UpdateClientTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateClientTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateClientTlsPolicy, req, settings.GRPC, c.logger, "UpdateClientTlsPolicy") return err }, opts...) if err != nil { @@ -1026,7 +1031,7 @@ func (c *gRPCClient) DeleteClientTlsPolicy(ctx context.Context, req *networksecu var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteClientTlsPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteClientTlsPolicy, req, settings.GRPC, c.logger, "DeleteClientTlsPolicy") return err }, opts...) if err != nil { @@ -1046,7 +1051,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1146,7 +1151,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1163,7 +1168,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1177,7 +1182,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1192,7 +1197,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1292,21 +1297,10 @@ func (c *restClient) ListAuthorizationPolicies(ctx context.Context, req *network } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAuthorizationPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1369,17 +1363,7 @@ func (c *restClient) GetAuthorizationPolicy(ctx context.Context, req *networksec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAuthorizationPolicy") if err != nil { return err } @@ -1436,21 +1420,10 @@ func (c *restClient) CreateAuthorizationPolicy(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAuthorizationPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1514,21 +1487,10 @@ func (c *restClient) UpdateAuthorizationPolicy(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAuthorizationPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1578,21 +1540,10 @@ func (c *restClient) DeleteAuthorizationPolicy(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAuthorizationPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1655,21 +1606,10 @@ func (c *restClient) ListServerTlsPolicies(ctx context.Context, req *networksecu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServerTlsPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1732,17 +1672,7 @@ func (c *restClient) GetServerTlsPolicy(ctx context.Context, req *networksecurit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServerTlsPolicy") if err != nil { return err } @@ -1799,21 +1729,10 @@ func (c *restClient) CreateServerTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServerTlsPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1877,21 +1796,10 @@ func (c *restClient) UpdateServerTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServerTlsPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1941,21 +1849,10 @@ func (c *restClient) DeleteServerTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServerTlsPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2018,21 +1915,10 @@ func (c *restClient) ListClientTlsPolicies(ctx context.Context, req *networksecu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClientTlsPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2095,17 +1981,7 @@ func (c *restClient) GetClientTlsPolicy(ctx context.Context, req *networksecurit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetClientTlsPolicy") if err != nil { return err } @@ -2162,21 +2038,10 @@ func (c *restClient) CreateClientTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateClientTlsPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2240,21 +2105,10 @@ func (c *restClient) UpdateClientTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateClientTlsPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2304,21 +2158,10 @@ func (c *restClient) DeleteClientTlsPolicy(ctx context.Context, req *networksecu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteClientTlsPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2369,17 +2212,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2444,21 +2277,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2525,17 +2347,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2595,17 +2407,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2667,17 +2469,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2730,15 +2522,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2772,15 +2557,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2817,17 +2595,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2892,21 +2660,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/networksecurity/apiv1beta1/network_security_client_example_go123_test.go b/networksecurity/apiv1beta1/network_security_client_example_go123_test.go index 0b2094c9bab2..0e1cca187234 100644 --- a/networksecurity/apiv1beta1/network_security_client_example_go123_test.go +++ b/networksecurity/apiv1beta1/network_security_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAuthorizationPolicies_all() { } for resp, err := range c.ListAuthorizationPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListClientTlsPolicies_all() { } for resp, err := range c.ListClientTlsPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListServerTlsPolicies_all() { } for resp, err := range c.ListServerTlsPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networksecurity/apiv1beta1/networksecuritypb/authorization_policy.pb.go b/networksecurity/apiv1beta1/networksecuritypb/authorization_policy.pb.go index 32286ed010b9..e6af910e3a2d 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/authorization_policy.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/authorization_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/authorization_policy.proto @@ -127,11 +127,9 @@ type AuthorizationPolicy struct { func (x *AuthorizationPolicy) Reset() { *x = AuthorizationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationPolicy) String() string { @@ -142,7 +140,7 @@ func (*AuthorizationPolicy) ProtoMessage() {} func (x *AuthorizationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +225,9 @@ type ListAuthorizationPoliciesRequest struct { func (x *ListAuthorizationPoliciesRequest) Reset() { *x = ListAuthorizationPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizationPoliciesRequest) String() string { @@ -242,7 +238,7 @@ func (*ListAuthorizationPoliciesRequest) ProtoMessage() {} func (x *ListAuthorizationPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +290,9 @@ type ListAuthorizationPoliciesResponse struct { func (x *ListAuthorizationPoliciesResponse) Reset() { *x = ListAuthorizationPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAuthorizationPoliciesResponse) String() string { @@ -309,7 +303,7 @@ func (*ListAuthorizationPoliciesResponse) ProtoMessage() {} func (x *ListAuthorizationPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +345,9 @@ type GetAuthorizationPolicyRequest struct { func (x *GetAuthorizationPolicyRequest) Reset() { *x = GetAuthorizationPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAuthorizationPolicyRequest) String() string { @@ -366,7 +358,7 @@ func (*GetAuthorizationPolicyRequest) ProtoMessage() {} func (x *GetAuthorizationPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +400,9 @@ type CreateAuthorizationPolicyRequest struct { func (x *CreateAuthorizationPolicyRequest) Reset() { *x = CreateAuthorizationPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAuthorizationPolicyRequest) String() string { @@ -423,7 +413,7 @@ func (*CreateAuthorizationPolicyRequest) ProtoMessage() {} func (x *CreateAuthorizationPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +467,9 @@ type UpdateAuthorizationPolicyRequest struct { func (x *UpdateAuthorizationPolicyRequest) Reset() { *x = UpdateAuthorizationPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAuthorizationPolicyRequest) String() string { @@ -492,7 +480,7 @@ func (*UpdateAuthorizationPolicyRequest) ProtoMessage() {} func (x *UpdateAuthorizationPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +522,9 @@ type DeleteAuthorizationPolicyRequest struct { func (x *DeleteAuthorizationPolicyRequest) Reset() { *x = DeleteAuthorizationPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAuthorizationPolicyRequest) String() string { @@ -549,7 +535,7 @@ func (*DeleteAuthorizationPolicyRequest) ProtoMessage() {} func (x *DeleteAuthorizationPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +578,9 @@ type AuthorizationPolicy_Rule struct { func (x *AuthorizationPolicy_Rule) Reset() { *x = AuthorizationPolicy_Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationPolicy_Rule) String() string { @@ -607,7 +591,7 @@ func (*AuthorizationPolicy_Rule) ProtoMessage() {} func (x *AuthorizationPolicy_Rule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -659,11 +643,9 @@ type AuthorizationPolicy_Rule_Source struct { func (x *AuthorizationPolicy_Rule_Source) Reset() { *x = AuthorizationPolicy_Rule_Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationPolicy_Rule_Source) String() string { @@ -674,7 +656,7 @@ func (*AuthorizationPolicy_Rule_Source) ProtoMessage() {} func (x *AuthorizationPolicy_Rule_Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +712,9 @@ type AuthorizationPolicy_Rule_Destination struct { func (x *AuthorizationPolicy_Rule_Destination) Reset() { *x = AuthorizationPolicy_Rule_Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationPolicy_Rule_Destination) String() string { @@ -745,7 +725,7 @@ func (*AuthorizationPolicy_Rule_Destination) ProtoMessage() {} func (x *AuthorizationPolicy_Rule_Destination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,11 +787,9 @@ type AuthorizationPolicy_Rule_Destination_HttpHeaderMatch struct { func (x *AuthorizationPolicy_Rule_Destination_HttpHeaderMatch) Reset() { *x = AuthorizationPolicy_Rule_Destination_HttpHeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizationPolicy_Rule_Destination_HttpHeaderMatch) String() string { @@ -822,7 +800,7 @@ func (*AuthorizationPolicy_Rule_Destination_HttpHeaderMatch) ProtoMessage() {} func (x *AuthorizationPolicy_Rule_Destination_HttpHeaderMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,140 +1105,6 @@ func file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_init() if File_google_cloud_networksecurity_v1beta1_authorization_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizationPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAuthorizationPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAuthorizationPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateAuthorizationPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAuthorizationPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAuthorizationPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationPolicy_Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationPolicy_Rule_Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationPolicy_Rule_Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizationPolicy_Rule_Destination_HttpHeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networksecurity_v1beta1_authorization_policy_proto_msgTypes[11].OneofWrappers = []any{ (*AuthorizationPolicy_Rule_Destination_HttpHeaderMatch_RegexMatch)(nil), } diff --git a/networksecurity/apiv1beta1/networksecuritypb/client_tls_policy.pb.go b/networksecurity/apiv1beta1/networksecuritypb/client_tls_policy.pb.go index d79b53b0a499..4e50a3b38b24 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/client_tls_policy.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/client_tls_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/client_tls_policy.proto @@ -72,11 +72,9 @@ type ClientTlsPolicy struct { func (x *ClientTlsPolicy) Reset() { *x = ClientTlsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientTlsPolicy) String() string { @@ -87,7 +85,7 @@ func (*ClientTlsPolicy) ProtoMessage() {} func (x *ClientTlsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +176,9 @@ type ListClientTlsPoliciesRequest struct { func (x *ListClientTlsPoliciesRequest) Reset() { *x = ListClientTlsPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientTlsPoliciesRequest) String() string { @@ -193,7 +189,7 @@ func (*ListClientTlsPoliciesRequest) ProtoMessage() {} func (x *ListClientTlsPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +241,9 @@ type ListClientTlsPoliciesResponse struct { func (x *ListClientTlsPoliciesResponse) Reset() { *x = ListClientTlsPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClientTlsPoliciesResponse) String() string { @@ -260,7 +254,7 @@ func (*ListClientTlsPoliciesResponse) ProtoMessage() {} func (x *ListClientTlsPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +296,9 @@ type GetClientTlsPolicyRequest struct { func (x *GetClientTlsPolicyRequest) Reset() { *x = GetClientTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClientTlsPolicyRequest) String() string { @@ -317,7 +309,7 @@ func (*GetClientTlsPolicyRequest) ProtoMessage() {} func (x *GetClientTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +351,9 @@ type CreateClientTlsPolicyRequest struct { func (x *CreateClientTlsPolicyRequest) Reset() { *x = CreateClientTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClientTlsPolicyRequest) String() string { @@ -374,7 +364,7 @@ func (*CreateClientTlsPolicyRequest) ProtoMessage() {} func (x *CreateClientTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +419,9 @@ type UpdateClientTlsPolicyRequest struct { func (x *UpdateClientTlsPolicyRequest) Reset() { *x = UpdateClientTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClientTlsPolicyRequest) String() string { @@ -444,7 +432,7 @@ func (*UpdateClientTlsPolicyRequest) ProtoMessage() {} func (x *UpdateClientTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type DeleteClientTlsPolicyRequest struct { func (x *DeleteClientTlsPolicyRequest) Reset() { *x = DeleteClientTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClientTlsPolicyRequest) String() string { @@ -501,7 +487,7 @@ func (*DeleteClientTlsPolicyRequest) ProtoMessage() {} func (x *DeleteClientTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,92 +710,6 @@ func file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_init() { return } file_google_cloud_networksecurity_v1beta1_tls_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientTlsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClientTlsPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListClientTlsPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetClientTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateClientTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClientTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_client_tls_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClientTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networksecurity/apiv1beta1/networksecuritypb/common.pb.go b/networksecurity/apiv1beta1/networksecuritypb/common.pb.go index 2155e27490a2..2ae80937b8ac 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/common.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/common.proto @@ -65,11 +65,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -80,7 +78,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,20 +228,6 @@ func file_google_cloud_networksecurity_v1beta1_common_proto_init() { if File_google_cloud_networksecurity_v1beta1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networksecurity_v1beta1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networksecurity/apiv1beta1/networksecuritypb/network_security.pb.go b/networksecurity/apiv1beta1/networksecuritypb/network_security.pb.go index 26bc0c68ee36..84dfaae9ea95 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/network_security.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/network_security.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/network_security.proto diff --git a/networksecurity/apiv1beta1/networksecuritypb/server_tls_policy.pb.go b/networksecurity/apiv1beta1/networksecuritypb/server_tls_policy.pb.go index 6c4a18a225b5..b51b848c519c 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/server_tls_policy.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/server_tls_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/server_tls_policy.proto @@ -81,11 +81,9 @@ type ServerTlsPolicy struct { func (x *ServerTlsPolicy) Reset() { *x = ServerTlsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerTlsPolicy) String() string { @@ -96,7 +94,7 @@ func (*ServerTlsPolicy) ProtoMessage() {} func (x *ServerTlsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +185,9 @@ type ListServerTlsPoliciesRequest struct { func (x *ListServerTlsPoliciesRequest) Reset() { *x = ListServerTlsPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServerTlsPoliciesRequest) String() string { @@ -202,7 +198,7 @@ func (*ListServerTlsPoliciesRequest) ProtoMessage() {} func (x *ListServerTlsPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -254,11 +250,9 @@ type ListServerTlsPoliciesResponse struct { func (x *ListServerTlsPoliciesResponse) Reset() { *x = ListServerTlsPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServerTlsPoliciesResponse) String() string { @@ -269,7 +263,7 @@ func (*ListServerTlsPoliciesResponse) ProtoMessage() {} func (x *ListServerTlsPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +305,9 @@ type GetServerTlsPolicyRequest struct { func (x *GetServerTlsPolicyRequest) Reset() { *x = GetServerTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServerTlsPolicyRequest) String() string { @@ -326,7 +318,7 @@ func (*GetServerTlsPolicyRequest) ProtoMessage() {} func (x *GetServerTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type CreateServerTlsPolicyRequest struct { func (x *CreateServerTlsPolicyRequest) Reset() { *x = CreateServerTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServerTlsPolicyRequest) String() string { @@ -383,7 +373,7 @@ func (*CreateServerTlsPolicyRequest) ProtoMessage() {} func (x *CreateServerTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +428,9 @@ type UpdateServerTlsPolicyRequest struct { func (x *UpdateServerTlsPolicyRequest) Reset() { *x = UpdateServerTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServerTlsPolicyRequest) String() string { @@ -453,7 +441,7 @@ func (*UpdateServerTlsPolicyRequest) ProtoMessage() {} func (x *UpdateServerTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +483,9 @@ type DeleteServerTlsPolicyRequest struct { func (x *DeleteServerTlsPolicyRequest) Reset() { *x = DeleteServerTlsPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServerTlsPolicyRequest) String() string { @@ -510,7 +496,7 @@ func (*DeleteServerTlsPolicyRequest) ProtoMessage() {} func (x *DeleteServerTlsPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +531,9 @@ type ServerTlsPolicy_MTLSPolicy struct { func (x *ServerTlsPolicy_MTLSPolicy) Reset() { *x = ServerTlsPolicy_MTLSPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerTlsPolicy_MTLSPolicy) String() string { @@ -560,7 +544,7 @@ func (*ServerTlsPolicy_MTLSPolicy) ProtoMessage() {} func (x *ServerTlsPolicy_MTLSPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -791,104 +775,6 @@ func file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_init() { return } file_google_cloud_networksecurity_v1beta1_tls_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServerTlsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListServerTlsPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServerTlsPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetServerTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateServerTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServerTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServerTlsPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_server_tls_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ServerTlsPolicy_MTLSPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networksecurity/apiv1beta1/networksecuritypb/tls.pb.go b/networksecurity/apiv1beta1/networksecuritypb/tls.pb.go index f4d4e4e54cc7..ceb8611c3504 100755 --- a/networksecurity/apiv1beta1/networksecuritypb/tls.pb.go +++ b/networksecurity/apiv1beta1/networksecuritypb/tls.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networksecurity/v1beta1/tls.proto @@ -49,11 +49,9 @@ type GrpcEndpoint struct { func (x *GrpcEndpoint) Reset() { *x = GrpcEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcEndpoint) String() string { @@ -64,7 +62,7 @@ func (*GrpcEndpoint) ProtoMessage() {} func (x *GrpcEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -104,11 +102,9 @@ type ValidationCA struct { func (x *ValidationCA) Reset() { *x = ValidationCA{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidationCA) String() string { @@ -119,7 +115,7 @@ func (*ValidationCA) ProtoMessage() {} func (x *ValidationCA) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,11 +189,9 @@ type CertificateProviderInstance struct { func (x *CertificateProviderInstance) Reset() { *x = CertificateProviderInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateProviderInstance) String() string { @@ -208,7 +202,7 @@ func (*CertificateProviderInstance) ProtoMessage() {} func (x *CertificateProviderInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +243,9 @@ type CertificateProvider struct { func (x *CertificateProvider) Reset() { *x = CertificateProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateProvider) String() string { @@ -264,7 +256,7 @@ func (*CertificateProvider) ProtoMessage() {} func (x *CertificateProvider) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,56 +419,6 @@ func file_google_cloud_networksecurity_v1beta1_tls_proto_init() { if File_google_cloud_networksecurity_v1beta1_tls_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GrpcEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ValidationCA); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CertificateProviderInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CertificateProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networksecurity_v1beta1_tls_proto_msgTypes[1].OneofWrappers = []any{ (*ValidationCA_GrpcEndpoint)(nil), (*ValidationCA_CertificateProviderInstance)(nil), diff --git a/networkservices/apiv1/dep_client.go b/networkservices/apiv1/dep_client.go index 10b63716e350..7d1be7bc9ffa 100755 --- a/networkservices/apiv1/dep_client.go +++ b/networkservices/apiv1/dep_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -413,6 +412,8 @@ type depGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDepClient creates a new dep service client based on gRPC. @@ -439,6 +440,7 @@ func NewDepClient(ctx context.Context, opts ...option.ClientOption) (*DepClient, connPool: connPool, depClient: networkservicespb.NewDepServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -504,6 +506,8 @@ type depRESTClient struct { // Points back to the CallOptions field of the containing DepClient CallOptions **DepCallOptions + + logger *slog.Logger } // NewDepRESTClient creates a new dep service rest client. @@ -521,6 +525,7 @@ func NewDepRESTClient(ctx context.Context, opts ...option.ClientOption) (*DepCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -594,7 +599,7 @@ func (c *depGRPCClient) ListLbTrafficExtensions(ctx context.Context, req *networ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.ListLbTrafficExtensions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.ListLbTrafficExtensions, req, settings.GRPC, c.logger, "ListLbTrafficExtensions") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *depGRPCClient) GetLbTrafficExtension(ctx context.Context, req *networks var resp *networkservicespb.LbTrafficExtension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.GetLbTrafficExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.GetLbTrafficExtension, req, settings.GRPC, c.logger, "GetLbTrafficExtension") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *depGRPCClient) CreateLbTrafficExtension(ctx context.Context, req *netwo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.CreateLbTrafficExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.CreateLbTrafficExtension, req, settings.GRPC, c.logger, "CreateLbTrafficExtension") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *depGRPCClient) UpdateLbTrafficExtension(ctx context.Context, req *netwo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.UpdateLbTrafficExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.UpdateLbTrafficExtension, req, settings.GRPC, c.logger, "UpdateLbTrafficExtension") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *depGRPCClient) DeleteLbTrafficExtension(ctx context.Context, req *netwo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.DeleteLbTrafficExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.DeleteLbTrafficExtension, req, settings.GRPC, c.logger, "DeleteLbTrafficExtension") return err }, opts...) if err != nil { @@ -718,7 +723,7 @@ func (c *depGRPCClient) ListLbRouteExtensions(ctx context.Context, req *networks } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.ListLbRouteExtensions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.ListLbRouteExtensions, req, settings.GRPC, c.logger, "ListLbRouteExtensions") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *depGRPCClient) GetLbRouteExtension(ctx context.Context, req *networkser var resp *networkservicespb.LbRouteExtension err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.GetLbRouteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.GetLbRouteExtension, req, settings.GRPC, c.logger, "GetLbRouteExtension") return err }, opts...) if err != nil { @@ -771,7 +776,7 @@ func (c *depGRPCClient) CreateLbRouteExtension(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.CreateLbRouteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.CreateLbRouteExtension, req, settings.GRPC, c.logger, "CreateLbRouteExtension") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *depGRPCClient) UpdateLbRouteExtension(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.UpdateLbRouteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.UpdateLbRouteExtension, req, settings.GRPC, c.logger, "UpdateLbRouteExtension") return err }, opts...) if err != nil { @@ -811,7 +816,7 @@ func (c *depGRPCClient) DeleteLbRouteExtension(ctx context.Context, req *network var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.depClient.DeleteLbRouteExtension(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.depClient.DeleteLbRouteExtension, req, settings.GRPC, c.logger, "DeleteLbRouteExtension") return err }, opts...) if err != nil { @@ -831,7 +836,7 @@ func (c *depGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLoca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -860,7 +865,7 @@ func (c *depGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *depGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *depGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *depGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestI var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -948,7 +953,7 @@ func (c *depGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -962,7 +967,7 @@ func (c *depGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb. opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -977,7 +982,7 @@ func (c *depGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *depGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1083,21 +1088,10 @@ func (c *depRESTClient) ListLbTrafficExtensions(ctx context.Context, req *networ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLbTrafficExtensions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1160,17 +1154,7 @@ func (c *depRESTClient) GetLbTrafficExtension(ctx context.Context, req *networks httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLbTrafficExtension") if err != nil { return err } @@ -1231,21 +1215,10 @@ func (c *depRESTClient) CreateLbTrafficExtension(ctx context.Context, req *netwo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateLbTrafficExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1312,21 +1285,10 @@ func (c *depRESTClient) UpdateLbTrafficExtension(ctx context.Context, req *netwo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLbTrafficExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1379,21 +1341,10 @@ func (c *depRESTClient) DeleteLbTrafficExtension(ctx context.Context, req *netwo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLbTrafficExtension") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1462,21 +1413,10 @@ func (c *depRESTClient) ListLbRouteExtensions(ctx context.Context, req *networks } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLbRouteExtensions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1539,17 +1479,7 @@ func (c *depRESTClient) GetLbRouteExtension(ctx context.Context, req *networkser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLbRouteExtension") if err != nil { return err } @@ -1609,21 +1539,10 @@ func (c *depRESTClient) CreateLbRouteExtension(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateLbRouteExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1690,21 +1609,10 @@ func (c *depRESTClient) UpdateLbRouteExtension(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLbRouteExtension") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1757,21 +1665,10 @@ func (c *depRESTClient) DeleteLbRouteExtension(ctx context.Context, req *network httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLbRouteExtension") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1822,17 +1719,7 @@ func (c *depRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLoca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1897,21 +1784,10 @@ func (c *depRESTClient) ListLocations(ctx context.Context, req *locationpb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1978,17 +1854,7 @@ func (c *depRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2048,17 +1914,7 @@ func (c *depRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2120,17 +1976,7 @@ func (c *depRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2183,15 +2029,8 @@ func (c *depRESTClient) CancelOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2225,15 +2064,8 @@ func (c *depRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2270,17 +2102,7 @@ func (c *depRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2345,21 +2167,10 @@ func (c *depRESTClient) ListOperations(ctx context.Context, req *longrunningpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/networkservices/apiv1/dep_client_example_go123_test.go b/networkservices/apiv1/dep_client_example_go123_test.go index f1437dbf6cae..f7a0961efc99 100644 --- a/networkservices/apiv1/dep_client_example_go123_test.go +++ b/networkservices/apiv1/dep_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleDepClient_ListLbRouteExtensions_all() { } for resp, err := range c.ListLbRouteExtensions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleDepClient_ListLbTrafficExtensions_all() { } for resp, err := range c.ListLbTrafficExtensions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleDepClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleDepClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networkservices/apiv1/helpers.go b/networkservices/apiv1/helpers.go index b91daa8b128f..5ee1815371b4 100755 --- a/networkservices/apiv1/helpers.go +++ b/networkservices/apiv1/helpers.go @@ -18,10 +18,20 @@ package networkservices import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "networkservices.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/networkservices/apiv1/network_services_client.go b/networkservices/apiv1/network_services_client.go index fd5efebab1b3..8e02fb9f739d 100755 --- a/networkservices/apiv1/network_services_client.go +++ b/networkservices/apiv1/network_services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -908,6 +907,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new network services client based on gRPC. @@ -934,6 +935,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: networkservicespb.NewNetworkServicesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -999,6 +1001,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new network services rest client. @@ -1016,6 +1020,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1089,7 +1094,7 @@ func (c *gRPCClient) ListEndpointPolicies(ctx context.Context, req *networkservi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEndpointPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEndpointPolicies, req, settings.GRPC, c.logger, "ListEndpointPolicies") return err }, opts...) if err != nil { @@ -1124,7 +1129,7 @@ func (c *gRPCClient) GetEndpointPolicy(ctx context.Context, req *networkservices var resp *networkservicespb.EndpointPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEndpointPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEndpointPolicy, req, settings.GRPC, c.logger, "GetEndpointPolicy") return err }, opts...) if err != nil { @@ -1142,7 +1147,7 @@ func (c *gRPCClient) CreateEndpointPolicy(ctx context.Context, req *networkservi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEndpointPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEndpointPolicy, req, settings.GRPC, c.logger, "CreateEndpointPolicy") return err }, opts...) if err != nil { @@ -1162,7 +1167,7 @@ func (c *gRPCClient) UpdateEndpointPolicy(ctx context.Context, req *networkservi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEndpointPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEndpointPolicy, req, settings.GRPC, c.logger, "UpdateEndpointPolicy") return err }, opts...) if err != nil { @@ -1182,7 +1187,7 @@ func (c *gRPCClient) DeleteEndpointPolicy(ctx context.Context, req *networkservi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEndpointPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEndpointPolicy, req, settings.GRPC, c.logger, "DeleteEndpointPolicy") return err }, opts...) if err != nil { @@ -1213,7 +1218,7 @@ func (c *gRPCClient) ListGateways(ctx context.Context, req *networkservicespb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGateways(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGateways, req, settings.GRPC, c.logger, "ListGateways") return err }, opts...) if err != nil { @@ -1248,7 +1253,7 @@ func (c *gRPCClient) GetGateway(ctx context.Context, req *networkservicespb.GetG var resp *networkservicespb.Gateway err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGateway, req, settings.GRPC, c.logger, "GetGateway") return err }, opts...) if err != nil { @@ -1266,7 +1271,7 @@ func (c *gRPCClient) CreateGateway(ctx context.Context, req *networkservicespb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGateway, req, settings.GRPC, c.logger, "CreateGateway") return err }, opts...) if err != nil { @@ -1286,7 +1291,7 @@ func (c *gRPCClient) UpdateGateway(ctx context.Context, req *networkservicespb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGateway, req, settings.GRPC, c.logger, "UpdateGateway") return err }, opts...) if err != nil { @@ -1306,7 +1311,7 @@ func (c *gRPCClient) DeleteGateway(ctx context.Context, req *networkservicespb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGateway(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGateway, req, settings.GRPC, c.logger, "DeleteGateway") return err }, opts...) if err != nil { @@ -1337,7 +1342,7 @@ func (c *gRPCClient) ListGrpcRoutes(ctx context.Context, req *networkservicespb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGrpcRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGrpcRoutes, req, settings.GRPC, c.logger, "ListGrpcRoutes") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *gRPCClient) GetGrpcRoute(ctx context.Context, req *networkservicespb.Ge var resp *networkservicespb.GrpcRoute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGrpcRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGrpcRoute, req, settings.GRPC, c.logger, "GetGrpcRoute") return err }, opts...) if err != nil { @@ -1390,7 +1395,7 @@ func (c *gRPCClient) CreateGrpcRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGrpcRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGrpcRoute, req, settings.GRPC, c.logger, "CreateGrpcRoute") return err }, opts...) if err != nil { @@ -1410,7 +1415,7 @@ func (c *gRPCClient) UpdateGrpcRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGrpcRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGrpcRoute, req, settings.GRPC, c.logger, "UpdateGrpcRoute") return err }, opts...) if err != nil { @@ -1430,7 +1435,7 @@ func (c *gRPCClient) DeleteGrpcRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGrpcRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGrpcRoute, req, settings.GRPC, c.logger, "DeleteGrpcRoute") return err }, opts...) if err != nil { @@ -1461,7 +1466,7 @@ func (c *gRPCClient) ListHttpRoutes(ctx context.Context, req *networkservicespb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListHttpRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListHttpRoutes, req, settings.GRPC, c.logger, "ListHttpRoutes") return err }, opts...) if err != nil { @@ -1496,7 +1501,7 @@ func (c *gRPCClient) GetHttpRoute(ctx context.Context, req *networkservicespb.Ge var resp *networkservicespb.HttpRoute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetHttpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetHttpRoute, req, settings.GRPC, c.logger, "GetHttpRoute") return err }, opts...) if err != nil { @@ -1514,7 +1519,7 @@ func (c *gRPCClient) CreateHttpRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateHttpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateHttpRoute, req, settings.GRPC, c.logger, "CreateHttpRoute") return err }, opts...) if err != nil { @@ -1534,7 +1539,7 @@ func (c *gRPCClient) UpdateHttpRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateHttpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateHttpRoute, req, settings.GRPC, c.logger, "UpdateHttpRoute") return err }, opts...) if err != nil { @@ -1554,7 +1559,7 @@ func (c *gRPCClient) DeleteHttpRoute(ctx context.Context, req *networkservicespb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteHttpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteHttpRoute, req, settings.GRPC, c.logger, "DeleteHttpRoute") return err }, opts...) if err != nil { @@ -1585,7 +1590,7 @@ func (c *gRPCClient) ListTcpRoutes(ctx context.Context, req *networkservicespb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTcpRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTcpRoutes, req, settings.GRPC, c.logger, "ListTcpRoutes") return err }, opts...) if err != nil { @@ -1620,7 +1625,7 @@ func (c *gRPCClient) GetTcpRoute(ctx context.Context, req *networkservicespb.Get var resp *networkservicespb.TcpRoute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTcpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTcpRoute, req, settings.GRPC, c.logger, "GetTcpRoute") return err }, opts...) if err != nil { @@ -1638,7 +1643,7 @@ func (c *gRPCClient) CreateTcpRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTcpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTcpRoute, req, settings.GRPC, c.logger, "CreateTcpRoute") return err }, opts...) if err != nil { @@ -1658,7 +1663,7 @@ func (c *gRPCClient) UpdateTcpRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTcpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTcpRoute, req, settings.GRPC, c.logger, "UpdateTcpRoute") return err }, opts...) if err != nil { @@ -1678,7 +1683,7 @@ func (c *gRPCClient) DeleteTcpRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTcpRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTcpRoute, req, settings.GRPC, c.logger, "DeleteTcpRoute") return err }, opts...) if err != nil { @@ -1709,7 +1714,7 @@ func (c *gRPCClient) ListTlsRoutes(ctx context.Context, req *networkservicespb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTlsRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTlsRoutes, req, settings.GRPC, c.logger, "ListTlsRoutes") return err }, opts...) if err != nil { @@ -1744,7 +1749,7 @@ func (c *gRPCClient) GetTlsRoute(ctx context.Context, req *networkservicespb.Get var resp *networkservicespb.TlsRoute err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTlsRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTlsRoute, req, settings.GRPC, c.logger, "GetTlsRoute") return err }, opts...) if err != nil { @@ -1762,7 +1767,7 @@ func (c *gRPCClient) CreateTlsRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTlsRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTlsRoute, req, settings.GRPC, c.logger, "CreateTlsRoute") return err }, opts...) if err != nil { @@ -1782,7 +1787,7 @@ func (c *gRPCClient) UpdateTlsRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTlsRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTlsRoute, req, settings.GRPC, c.logger, "UpdateTlsRoute") return err }, opts...) if err != nil { @@ -1802,7 +1807,7 @@ func (c *gRPCClient) DeleteTlsRoute(ctx context.Context, req *networkservicespb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTlsRoute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTlsRoute, req, settings.GRPC, c.logger, "DeleteTlsRoute") return err }, opts...) if err != nil { @@ -1833,7 +1838,7 @@ func (c *gRPCClient) ListServiceBindings(ctx context.Context, req *networkservic } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServiceBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServiceBindings, req, settings.GRPC, c.logger, "ListServiceBindings") return err }, opts...) if err != nil { @@ -1868,7 +1873,7 @@ func (c *gRPCClient) GetServiceBinding(ctx context.Context, req *networkservices var resp *networkservicespb.ServiceBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetServiceBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetServiceBinding, req, settings.GRPC, c.logger, "GetServiceBinding") return err }, opts...) if err != nil { @@ -1886,7 +1891,7 @@ func (c *gRPCClient) CreateServiceBinding(ctx context.Context, req *networkservi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateServiceBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateServiceBinding, req, settings.GRPC, c.logger, "CreateServiceBinding") return err }, opts...) if err != nil { @@ -1906,7 +1911,7 @@ func (c *gRPCClient) DeleteServiceBinding(ctx context.Context, req *networkservi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteServiceBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteServiceBinding, req, settings.GRPC, c.logger, "DeleteServiceBinding") return err }, opts...) if err != nil { @@ -1937,7 +1942,7 @@ func (c *gRPCClient) ListMeshes(ctx context.Context, req *networkservicespb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMeshes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMeshes, req, settings.GRPC, c.logger, "ListMeshes") return err }, opts...) if err != nil { @@ -1972,7 +1977,7 @@ func (c *gRPCClient) GetMesh(ctx context.Context, req *networkservicespb.GetMesh var resp *networkservicespb.Mesh err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMesh(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMesh, req, settings.GRPC, c.logger, "GetMesh") return err }, opts...) if err != nil { @@ -1990,7 +1995,7 @@ func (c *gRPCClient) CreateMesh(ctx context.Context, req *networkservicespb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMesh(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMesh, req, settings.GRPC, c.logger, "CreateMesh") return err }, opts...) if err != nil { @@ -2010,7 +2015,7 @@ func (c *gRPCClient) UpdateMesh(ctx context.Context, req *networkservicespb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMesh(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMesh, req, settings.GRPC, c.logger, "UpdateMesh") return err }, opts...) if err != nil { @@ -2030,7 +2035,7 @@ func (c *gRPCClient) DeleteMesh(ctx context.Context, req *networkservicespb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteMesh(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteMesh, req, settings.GRPC, c.logger, "DeleteMesh") return err }, opts...) if err != nil { @@ -2050,7 +2055,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2079,7 +2084,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2114,7 +2119,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2132,7 +2137,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2150,7 +2155,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2167,7 +2172,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2181,7 +2186,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2196,7 +2201,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2225,7 +2230,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2296,21 +2301,10 @@ func (c *restClient) ListEndpointPolicies(ctx context.Context, req *networkservi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEndpointPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2373,17 +2367,7 @@ func (c *restClient) GetEndpointPolicy(ctx context.Context, req *networkservices httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEndpointPolicy") if err != nil { return err } @@ -2440,21 +2424,10 @@ func (c *restClient) CreateEndpointPolicy(ctx context.Context, req *networkservi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEndpointPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2518,21 +2491,10 @@ func (c *restClient) UpdateEndpointPolicy(ctx context.Context, req *networkservi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEndpointPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2582,21 +2544,10 @@ func (c *restClient) DeleteEndpointPolicy(ctx context.Context, req *networkservi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEndpointPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2659,21 +2610,10 @@ func (c *restClient) ListGateways(ctx context.Context, req *networkservicespb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGateways") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2736,17 +2676,7 @@ func (c *restClient) GetGateway(ctx context.Context, req *networkservicespb.GetG httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGateway") if err != nil { return err } @@ -2803,21 +2733,10 @@ func (c *restClient) CreateGateway(ctx context.Context, req *networkservicespb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGateway") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2881,21 +2800,10 @@ func (c *restClient) UpdateGateway(ctx context.Context, req *networkservicespb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGateway") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2945,21 +2853,10 @@ func (c *restClient) DeleteGateway(ctx context.Context, req *networkservicespb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGateway") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3022,21 +2919,10 @@ func (c *restClient) ListGrpcRoutes(ctx context.Context, req *networkservicespb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGrpcRoutes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3099,17 +2985,7 @@ func (c *restClient) GetGrpcRoute(ctx context.Context, req *networkservicespb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGrpcRoute") if err != nil { return err } @@ -3166,21 +3042,10 @@ func (c *restClient) CreateGrpcRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGrpcRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3244,21 +3109,10 @@ func (c *restClient) UpdateGrpcRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGrpcRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3308,21 +3162,10 @@ func (c *restClient) DeleteGrpcRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGrpcRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3385,21 +3228,10 @@ func (c *restClient) ListHttpRoutes(ctx context.Context, req *networkservicespb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHttpRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3462,17 +3294,7 @@ func (c *restClient) GetHttpRoute(ctx context.Context, req *networkservicespb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHttpRoute") if err != nil { return err } @@ -3529,21 +3351,10 @@ func (c *restClient) CreateHttpRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateHttpRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3607,21 +3418,10 @@ func (c *restClient) UpdateHttpRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateHttpRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3671,21 +3471,10 @@ func (c *restClient) DeleteHttpRoute(ctx context.Context, req *networkservicespb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteHttpRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3748,21 +3537,10 @@ func (c *restClient) ListTcpRoutes(ctx context.Context, req *networkservicespb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTcpRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3825,17 +3603,7 @@ func (c *restClient) GetTcpRoute(ctx context.Context, req *networkservicespb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTcpRoute") if err != nil { return err } @@ -3892,21 +3660,10 @@ func (c *restClient) CreateTcpRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTcpRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3970,21 +3727,10 @@ func (c *restClient) UpdateTcpRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTcpRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4034,21 +3780,10 @@ func (c *restClient) DeleteTcpRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTcpRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4111,21 +3846,10 @@ func (c *restClient) ListTlsRoutes(ctx context.Context, req *networkservicespb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTlsRoutes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4188,17 +3912,7 @@ func (c *restClient) GetTlsRoute(ctx context.Context, req *networkservicespb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTlsRoute") if err != nil { return err } @@ -4255,21 +3969,10 @@ func (c *restClient) CreateTlsRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTlsRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4333,21 +4036,10 @@ func (c *restClient) UpdateTlsRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTlsRoute") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4397,21 +4089,10 @@ func (c *restClient) DeleteTlsRoute(ctx context.Context, req *networkservicespb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTlsRoute") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4474,21 +4155,10 @@ func (c *restClient) ListServiceBindings(ctx context.Context, req *networkservic } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServiceBindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4551,17 +4221,7 @@ func (c *restClient) GetServiceBinding(ctx context.Context, req *networkservices httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServiceBinding") if err != nil { return err } @@ -4618,21 +4278,10 @@ func (c *restClient) CreateServiceBinding(ctx context.Context, req *networkservi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServiceBinding") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4682,21 +4331,10 @@ func (c *restClient) DeleteServiceBinding(ctx context.Context, req *networkservi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServiceBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4759,21 +4397,10 @@ func (c *restClient) ListMeshes(ctx context.Context, req *networkservicespb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMeshes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4836,17 +4463,7 @@ func (c *restClient) GetMesh(ctx context.Context, req *networkservicespb.GetMesh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMesh") if err != nil { return err } @@ -4903,21 +4520,10 @@ func (c *restClient) CreateMesh(ctx context.Context, req *networkservicespb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMesh") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4981,21 +4587,10 @@ func (c *restClient) UpdateMesh(ctx context.Context, req *networkservicespb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMesh") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5045,21 +4640,10 @@ func (c *restClient) DeleteMesh(ctx context.Context, req *networkservicespb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMesh") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5110,17 +4694,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -5185,21 +4759,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5266,17 +4829,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -5336,17 +4889,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -5408,17 +4951,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5471,15 +5004,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -5513,15 +5039,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -5558,17 +5077,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5633,21 +5142,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/networkservices/apiv1/network_services_client_example_go123_test.go b/networkservices/apiv1/network_services_client_example_go123_test.go index 0cc2ea6df0c0..8148025e44a8 100644 --- a/networkservices/apiv1/network_services_client_example_go123_test.go +++ b/networkservices/apiv1/network_services_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListEndpointPolicies_all() { } for resp, err := range c.ListEndpointPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListGateways_all() { } for resp, err := range c.ListGateways(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListGrpcRoutes_all() { } for resp, err := range c.ListGrpcRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListHttpRoutes_all() { } for resp, err := range c.ListHttpRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListMeshes_all() { } for resp, err := range c.ListMeshes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListServiceBindings_all() { } for resp, err := range c.ListServiceBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListTcpRoutes_all() { } for resp, err := range c.ListTcpRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListTlsRoutes_all() { } for resp, err := range c.ListTlsRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/networkservices/apiv1/networkservicespb/common.pb.go b/networkservices/apiv1/networkservicespb/common.pb.go index 1240af53ddea..b90294af1f89 100755 --- a/networkservices/apiv1/networkservicespb/common.pb.go +++ b/networkservices/apiv1/networkservicespb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/common.proto @@ -120,11 +120,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -135,7 +133,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +212,9 @@ type TrafficPortSelector struct { func (x *TrafficPortSelector) Reset() { *x = TrafficPortSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficPortSelector) String() string { @@ -229,7 +225,7 @@ func (*TrafficPortSelector) ProtoMessage() {} func (x *TrafficPortSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +264,9 @@ type EndpointMatcher struct { func (x *EndpointMatcher) Reset() { *x = EndpointMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointMatcher) String() string { @@ -283,7 +277,7 @@ func (*EndpointMatcher) ProtoMessage() {} func (x *EndpointMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +363,9 @@ type EndpointMatcher_MetadataLabelMatcher struct { func (x *EndpointMatcher_MetadataLabelMatcher) Reset() { *x = EndpointMatcher_MetadataLabelMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointMatcher_MetadataLabelMatcher) String() string { @@ -384,7 +376,7 @@ func (*EndpointMatcher_MetadataLabelMatcher) ProtoMessage() {} func (x *EndpointMatcher_MetadataLabelMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -428,11 +420,9 @@ type EndpointMatcher_MetadataLabelMatcher_MetadataLabels struct { func (x *EndpointMatcher_MetadataLabelMatcher_MetadataLabels) Reset() { *x = EndpointMatcher_MetadataLabelMatcher_MetadataLabels{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointMatcher_MetadataLabelMatcher_MetadataLabels) String() string { @@ -443,7 +433,7 @@ func (*EndpointMatcher_MetadataLabelMatcher_MetadataLabels) ProtoMessage() {} func (x *EndpointMatcher_MetadataLabelMatcher_MetadataLabels) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,68 +600,6 @@ func file_google_cloud_networkservices_v1_common_proto_init() { if File_google_cloud_networkservices_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TrafficPortSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EndpointMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EndpointMatcher_MetadataLabelMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EndpointMatcher_MetadataLabelMatcher_MetadataLabels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkservices_v1_common_proto_msgTypes[2].OneofWrappers = []any{ (*EndpointMatcher_MetadataLabelMatcher_)(nil), } diff --git a/networkservices/apiv1/networkservicespb/dep.pb.go b/networkservices/apiv1/networkservicespb/dep.pb.go index 31f0a44d0cef..6faf0ac781db 100755 --- a/networkservices/apiv1/networkservicespb/dep.pb.go +++ b/networkservices/apiv1/networkservicespb/dep.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/dep.proto @@ -204,11 +204,9 @@ type ExtensionChain struct { func (x *ExtensionChain) Reset() { *x = ExtensionChain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionChain) String() string { @@ -219,7 +217,7 @@ func (*ExtensionChain) ProtoMessage() {} func (x *ExtensionChain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,11 +309,9 @@ type LbTrafficExtension struct { func (x *LbTrafficExtension) Reset() { *x = LbTrafficExtension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LbTrafficExtension) String() string { @@ -326,7 +322,7 @@ func (*LbTrafficExtension) ProtoMessage() {} func (x *LbTrafficExtension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +423,9 @@ type ListLbTrafficExtensionsRequest struct { func (x *ListLbTrafficExtensionsRequest) Reset() { *x = ListLbTrafficExtensionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLbTrafficExtensionsRequest) String() string { @@ -442,7 +436,7 @@ func (*ListLbTrafficExtensionsRequest) ProtoMessage() {} func (x *ListLbTrafficExtensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +502,9 @@ type ListLbTrafficExtensionsResponse struct { func (x *ListLbTrafficExtensionsResponse) Reset() { *x = ListLbTrafficExtensionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLbTrafficExtensionsResponse) String() string { @@ -523,7 +515,7 @@ func (*ListLbTrafficExtensionsResponse) ProtoMessage() {} func (x *ListLbTrafficExtensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -573,11 +565,9 @@ type GetLbTrafficExtensionRequest struct { func (x *GetLbTrafficExtensionRequest) Reset() { *x = GetLbTrafficExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLbTrafficExtensionRequest) String() string { @@ -588,7 +578,7 @@ func (*GetLbTrafficExtensionRequest) ProtoMessage() {} func (x *GetLbTrafficExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +632,9 @@ type CreateLbTrafficExtensionRequest struct { func (x *CreateLbTrafficExtensionRequest) Reset() { *x = CreateLbTrafficExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLbTrafficExtensionRequest) String() string { @@ -657,7 +645,7 @@ func (*CreateLbTrafficExtensionRequest) ProtoMessage() {} func (x *CreateLbTrafficExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -732,11 +720,9 @@ type UpdateLbTrafficExtensionRequest struct { func (x *UpdateLbTrafficExtensionRequest) Reset() { *x = UpdateLbTrafficExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLbTrafficExtensionRequest) String() string { @@ -747,7 +733,7 @@ func (*UpdateLbTrafficExtensionRequest) ProtoMessage() {} func (x *UpdateLbTrafficExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +797,9 @@ type DeleteLbTrafficExtensionRequest struct { func (x *DeleteLbTrafficExtensionRequest) Reset() { *x = DeleteLbTrafficExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLbTrafficExtensionRequest) String() string { @@ -826,7 +810,7 @@ func (*DeleteLbTrafficExtensionRequest) ProtoMessage() {} func (x *DeleteLbTrafficExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -910,11 +894,9 @@ type LbRouteExtension struct { func (x *LbRouteExtension) Reset() { *x = LbRouteExtension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LbRouteExtension) String() string { @@ -925,7 +907,7 @@ func (*LbRouteExtension) ProtoMessage() {} func (x *LbRouteExtension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1008,9 @@ type ListLbRouteExtensionsRequest struct { func (x *ListLbRouteExtensionsRequest) Reset() { *x = ListLbRouteExtensionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLbRouteExtensionsRequest) String() string { @@ -1041,7 +1021,7 @@ func (*ListLbRouteExtensionsRequest) ProtoMessage() {} func (x *ListLbRouteExtensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1087,9 @@ type ListLbRouteExtensionsResponse struct { func (x *ListLbRouteExtensionsResponse) Reset() { *x = ListLbRouteExtensionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLbRouteExtensionsResponse) String() string { @@ -1122,7 +1100,7 @@ func (*ListLbRouteExtensionsResponse) ProtoMessage() {} func (x *ListLbRouteExtensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1172,11 +1150,9 @@ type GetLbRouteExtensionRequest struct { func (x *GetLbRouteExtensionRequest) Reset() { *x = GetLbRouteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLbRouteExtensionRequest) String() string { @@ -1187,7 +1163,7 @@ func (*GetLbRouteExtensionRequest) ProtoMessage() {} func (x *GetLbRouteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1217,9 @@ type CreateLbRouteExtensionRequest struct { func (x *CreateLbRouteExtensionRequest) Reset() { *x = CreateLbRouteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLbRouteExtensionRequest) String() string { @@ -1256,7 +1230,7 @@ func (*CreateLbRouteExtensionRequest) ProtoMessage() {} func (x *CreateLbRouteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1331,11 +1305,9 @@ type UpdateLbRouteExtensionRequest struct { func (x *UpdateLbRouteExtensionRequest) Reset() { *x = UpdateLbRouteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLbRouteExtensionRequest) String() string { @@ -1346,7 +1318,7 @@ func (*UpdateLbRouteExtensionRequest) ProtoMessage() {} func (x *UpdateLbRouteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1382,9 @@ type DeleteLbRouteExtensionRequest struct { func (x *DeleteLbRouteExtensionRequest) Reset() { *x = DeleteLbRouteExtensionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLbRouteExtensionRequest) String() string { @@ -1425,7 +1395,7 @@ func (*DeleteLbRouteExtensionRequest) ProtoMessage() {} func (x *DeleteLbRouteExtensionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1440,9 @@ type ExtensionChain_MatchCondition struct { func (x *ExtensionChain_MatchCondition) Reset() { *x = ExtensionChain_MatchCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionChain_MatchCondition) String() string { @@ -1485,7 +1453,7 @@ func (*ExtensionChain_MatchCondition) ProtoMessage() {} func (x *ExtensionChain_MatchCondition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,11 +1537,9 @@ type ExtensionChain_Extension struct { func (x *ExtensionChain_Extension) Reset() { *x = ExtensionChain_Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionChain_Extension) String() string { @@ -1584,7 +1550,7 @@ func (*ExtensionChain_Extension) ProtoMessage() {} func (x *ExtensionChain_Extension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_dep_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2292,212 +2258,6 @@ func file_google_cloud_networkservices_v1_dep_proto_init() { return } file_google_cloud_networkservices_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_dep_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LbTrafficExtension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListLbTrafficExtensionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListLbTrafficExtensionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetLbTrafficExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateLbTrafficExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLbTrafficExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLbTrafficExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LbRouteExtension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListLbRouteExtensionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListLbRouteExtensionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetLbRouteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateLbRouteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLbRouteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLbRouteExtensionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionChain_MatchCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_dep_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionChain_Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/endpoint_policy.pb.go b/networkservices/apiv1/networkservicespb/endpoint_policy.pb.go index 62fa21c130de..77af26fee121 100755 --- a/networkservices/apiv1/networkservicespb/endpoint_policy.pb.go +++ b/networkservices/apiv1/networkservicespb/endpoint_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/endpoint_policy.proto @@ -145,11 +145,9 @@ type EndpointPolicy struct { func (x *EndpointPolicy) Reset() { *x = EndpointPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointPolicy) String() string { @@ -160,7 +158,7 @@ func (*EndpointPolicy) ProtoMessage() {} func (x *EndpointPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type ListEndpointPoliciesRequest struct { func (x *ListEndpointPoliciesRequest) Reset() { *x = ListEndpointPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointPoliciesRequest) String() string { @@ -287,7 +283,7 @@ func (*ListEndpointPoliciesRequest) ProtoMessage() {} func (x *ListEndpointPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +335,9 @@ type ListEndpointPoliciesResponse struct { func (x *ListEndpointPoliciesResponse) Reset() { *x = ListEndpointPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointPoliciesResponse) String() string { @@ -354,7 +348,7 @@ func (*ListEndpointPoliciesResponse) ProtoMessage() {} func (x *ListEndpointPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +390,9 @@ type GetEndpointPolicyRequest struct { func (x *GetEndpointPolicyRequest) Reset() { *x = GetEndpointPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointPolicyRequest) String() string { @@ -411,7 +403,7 @@ func (*GetEndpointPolicyRequest) ProtoMessage() {} func (x *GetEndpointPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +443,9 @@ type CreateEndpointPolicyRequest struct { func (x *CreateEndpointPolicyRequest) Reset() { *x = CreateEndpointPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointPolicyRequest) String() string { @@ -466,7 +456,7 @@ func (*CreateEndpointPolicyRequest) ProtoMessage() {} func (x *CreateEndpointPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +510,9 @@ type UpdateEndpointPolicyRequest struct { func (x *UpdateEndpointPolicyRequest) Reset() { *x = UpdateEndpointPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointPolicyRequest) String() string { @@ -535,7 +523,7 @@ func (*UpdateEndpointPolicyRequest) ProtoMessage() {} func (x *UpdateEndpointPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +565,9 @@ type DeleteEndpointPolicyRequest struct { func (x *DeleteEndpointPolicyRequest) Reset() { *x = DeleteEndpointPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointPolicyRequest) String() string { @@ -592,7 +578,7 @@ func (*DeleteEndpointPolicyRequest) ProtoMessage() {} func (x *DeleteEndpointPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,92 +853,6 @@ func file_google_cloud_networkservices_v1_endpoint_policy_proto_init() { return } file_google_cloud_networkservices_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EndpointPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_endpoint_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/gateway.pb.go b/networkservices/apiv1/networkservicespb/gateway.pb.go index c5009d5dd1e3..9699d685a9cd 100755 --- a/networkservices/apiv1/networkservicespb/gateway.pb.go +++ b/networkservices/apiv1/networkservicespb/gateway.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/gateway.proto @@ -141,11 +141,9 @@ type Gateway struct { func (x *Gateway) Reset() { *x = Gateway{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Gateway) String() string { @@ -156,7 +154,7 @@ func (*Gateway) ProtoMessage() {} func (x *Gateway) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +258,9 @@ type ListGatewaysRequest struct { func (x *ListGatewaysRequest) Reset() { *x = ListGatewaysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGatewaysRequest) String() string { @@ -275,7 +271,7 @@ func (*ListGatewaysRequest) ProtoMessage() {} func (x *ListGatewaysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +323,9 @@ type ListGatewaysResponse struct { func (x *ListGatewaysResponse) Reset() { *x = ListGatewaysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGatewaysResponse) String() string { @@ -342,7 +336,7 @@ func (*ListGatewaysResponse) ProtoMessage() {} func (x *ListGatewaysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +378,9 @@ type GetGatewayRequest struct { func (x *GetGatewayRequest) Reset() { *x = GetGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGatewayRequest) String() string { @@ -399,7 +391,7 @@ func (*GetGatewayRequest) ProtoMessage() {} func (x *GetGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +430,9 @@ type CreateGatewayRequest struct { func (x *CreateGatewayRequest) Reset() { *x = CreateGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGatewayRequest) String() string { @@ -453,7 +443,7 @@ func (*CreateGatewayRequest) ProtoMessage() {} func (x *CreateGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +497,9 @@ type UpdateGatewayRequest struct { func (x *UpdateGatewayRequest) Reset() { *x = UpdateGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGatewayRequest) String() string { @@ -522,7 +510,7 @@ func (*UpdateGatewayRequest) ProtoMessage() {} func (x *UpdateGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +552,9 @@ type DeleteGatewayRequest struct { func (x *DeleteGatewayRequest) Reset() { *x = DeleteGatewayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGatewayRequest) String() string { @@ -579,7 +565,7 @@ func (*DeleteGatewayRequest) ProtoMessage() {} func (x *DeleteGatewayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_gateway_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,92 +768,6 @@ func file_google_cloud_networkservices_v1_gateway_proto_init() { if File_google_cloud_networkservices_v1_gateway_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Gateway); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListGatewaysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGatewaysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_gateway_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGatewayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/grpc_route.pb.go b/networkservices/apiv1/networkservicespb/grpc_route.pb.go index 36404c06c1d2..3b2160c3c83c 100755 --- a/networkservices/apiv1/networkservicespb/grpc_route.pb.go +++ b/networkservices/apiv1/networkservicespb/grpc_route.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/grpc_route.proto @@ -223,11 +223,9 @@ type GrpcRoute struct { func (x *GrpcRoute) Reset() { *x = GrpcRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute) String() string { @@ -238,7 +236,7 @@ func (*GrpcRoute) ProtoMessage() {} func (x *GrpcRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +340,9 @@ type ListGrpcRoutesRequest struct { func (x *ListGrpcRoutesRequest) Reset() { *x = ListGrpcRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGrpcRoutesRequest) String() string { @@ -357,7 +353,7 @@ func (*ListGrpcRoutesRequest) ProtoMessage() {} func (x *ListGrpcRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,11 +405,9 @@ type ListGrpcRoutesResponse struct { func (x *ListGrpcRoutesResponse) Reset() { *x = ListGrpcRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGrpcRoutesResponse) String() string { @@ -424,7 +418,7 @@ func (*ListGrpcRoutesResponse) ProtoMessage() {} func (x *ListGrpcRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +460,9 @@ type GetGrpcRouteRequest struct { func (x *GetGrpcRouteRequest) Reset() { *x = GetGrpcRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGrpcRouteRequest) String() string { @@ -481,7 +473,7 @@ func (*GetGrpcRouteRequest) ProtoMessage() {} func (x *GetGrpcRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +512,9 @@ type CreateGrpcRouteRequest struct { func (x *CreateGrpcRouteRequest) Reset() { *x = CreateGrpcRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGrpcRouteRequest) String() string { @@ -535,7 +525,7 @@ func (*CreateGrpcRouteRequest) ProtoMessage() {} func (x *CreateGrpcRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +579,9 @@ type UpdateGrpcRouteRequest struct { func (x *UpdateGrpcRouteRequest) Reset() { *x = UpdateGrpcRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGrpcRouteRequest) String() string { @@ -604,7 +592,7 @@ func (*UpdateGrpcRouteRequest) ProtoMessage() {} func (x *UpdateGrpcRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +634,9 @@ type DeleteGrpcRouteRequest struct { func (x *DeleteGrpcRouteRequest) Reset() { *x = DeleteGrpcRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGrpcRouteRequest) String() string { @@ -661,7 +647,7 @@ func (*DeleteGrpcRouteRequest) ProtoMessage() {} func (x *DeleteGrpcRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +692,9 @@ type GrpcRoute_MethodMatch struct { func (x *GrpcRoute_MethodMatch) Reset() { *x = GrpcRoute_MethodMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_MethodMatch) String() string { @@ -721,7 +705,7 @@ func (*GrpcRoute_MethodMatch) ProtoMessage() {} func (x *GrpcRoute_MethodMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +765,9 @@ type GrpcRoute_HeaderMatch struct { func (x *GrpcRoute_HeaderMatch) Reset() { *x = GrpcRoute_HeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_HeaderMatch) String() string { @@ -796,7 +778,7 @@ func (*GrpcRoute_HeaderMatch) ProtoMessage() {} func (x *GrpcRoute_HeaderMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +830,9 @@ type GrpcRoute_RouteMatch struct { func (x *GrpcRoute_RouteMatch) Reset() { *x = GrpcRoute_RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_RouteMatch) String() string { @@ -863,7 +843,7 @@ func (*GrpcRoute_RouteMatch) ProtoMessage() {} func (x *GrpcRoute_RouteMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +903,9 @@ type GrpcRoute_Destination struct { func (x *GrpcRoute_Destination) Reset() { *x = GrpcRoute_Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_Destination) String() string { @@ -938,7 +916,7 @@ func (*GrpcRoute_Destination) ProtoMessage() {} func (x *GrpcRoute_Destination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +983,9 @@ type GrpcRoute_FaultInjectionPolicy struct { func (x *GrpcRoute_FaultInjectionPolicy) Reset() { *x = GrpcRoute_FaultInjectionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_FaultInjectionPolicy) String() string { @@ -1020,7 +996,7 @@ func (*GrpcRoute_FaultInjectionPolicy) ProtoMessage() {} func (x *GrpcRoute_FaultInjectionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1061,9 @@ type GrpcRoute_RetryPolicy struct { func (x *GrpcRoute_RetryPolicy) Reset() { *x = GrpcRoute_RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_RetryPolicy) String() string { @@ -1100,7 +1074,7 @@ func (*GrpcRoute_RetryPolicy) ProtoMessage() {} func (x *GrpcRoute_RetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,11 +1134,9 @@ type GrpcRoute_RouteAction struct { func (x *GrpcRoute_RouteAction) Reset() { *x = GrpcRoute_RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_RouteAction) String() string { @@ -1175,7 +1147,7 @@ func (*GrpcRoute_RouteAction) ProtoMessage() {} func (x *GrpcRoute_RouteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1236,11 +1208,9 @@ type GrpcRoute_RouteRule struct { func (x *GrpcRoute_RouteRule) Reset() { *x = GrpcRoute_RouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_RouteRule) String() string { @@ -1251,7 +1221,7 @@ func (*GrpcRoute_RouteRule) ProtoMessage() {} func (x *GrpcRoute_RouteRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1267,9 @@ type GrpcRoute_FaultInjectionPolicy_Delay struct { func (x *GrpcRoute_FaultInjectionPolicy_Delay) Reset() { *x = GrpcRoute_FaultInjectionPolicy_Delay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_FaultInjectionPolicy_Delay) String() string { @@ -1312,7 +1280,7 @@ func (*GrpcRoute_FaultInjectionPolicy_Delay) ProtoMessage() {} func (x *GrpcRoute_FaultInjectionPolicy_Delay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1360,11 +1328,9 @@ type GrpcRoute_FaultInjectionPolicy_Abort struct { func (x *GrpcRoute_FaultInjectionPolicy_Abort) Reset() { *x = GrpcRoute_FaultInjectionPolicy_Abort{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrpcRoute_FaultInjectionPolicy_Abort) String() string { @@ -1375,7 +1341,7 @@ func (*GrpcRoute_FaultInjectionPolicy_Abort) ProtoMessage() {} func (x *GrpcRoute_FaultInjectionPolicy_Abort) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1745,212 +1711,6 @@ func file_google_cloud_networkservices_v1_grpc_route_proto_init() { if File_google_cloud_networkservices_v1_grpc_route_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListGrpcRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGrpcRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetGrpcRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateGrpcRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGrpcRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGrpcRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_MethodMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_HeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_FaultInjectionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_RouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_FaultInjectionPolicy_Delay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GrpcRoute_FaultInjectionPolicy_Abort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[7].OneofWrappers = []any{} file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[9].OneofWrappers = []any{} file_google_cloud_networkservices_v1_grpc_route_proto_msgTypes[10].OneofWrappers = []any{ diff --git a/networkservices/apiv1/networkservicespb/http_route.pb.go b/networkservices/apiv1/networkservicespb/http_route.pb.go index 65e8b2c63dee..7d498a1e9e36 100755 --- a/networkservices/apiv1/networkservicespb/http_route.pb.go +++ b/networkservices/apiv1/networkservicespb/http_route.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/http_route.proto @@ -173,11 +173,9 @@ type HttpRoute struct { func (x *HttpRoute) Reset() { *x = HttpRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute) String() string { @@ -188,7 +186,7 @@ func (*HttpRoute) ProtoMessage() {} func (x *HttpRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +290,9 @@ type ListHttpRoutesRequest struct { func (x *ListHttpRoutesRequest) Reset() { *x = ListHttpRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHttpRoutesRequest) String() string { @@ -307,7 +303,7 @@ func (*ListHttpRoutesRequest) ProtoMessage() {} func (x *ListHttpRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +355,9 @@ type ListHttpRoutesResponse struct { func (x *ListHttpRoutesResponse) Reset() { *x = ListHttpRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHttpRoutesResponse) String() string { @@ -374,7 +368,7 @@ func (*ListHttpRoutesResponse) ProtoMessage() {} func (x *ListHttpRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +410,9 @@ type GetHttpRouteRequest struct { func (x *GetHttpRouteRequest) Reset() { *x = GetHttpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHttpRouteRequest) String() string { @@ -431,7 +423,7 @@ func (*GetHttpRouteRequest) ProtoMessage() {} func (x *GetHttpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +462,9 @@ type CreateHttpRouteRequest struct { func (x *CreateHttpRouteRequest) Reset() { *x = CreateHttpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHttpRouteRequest) String() string { @@ -485,7 +475,7 @@ func (*CreateHttpRouteRequest) ProtoMessage() {} func (x *CreateHttpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +529,9 @@ type UpdateHttpRouteRequest struct { func (x *UpdateHttpRouteRequest) Reset() { *x = UpdateHttpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHttpRouteRequest) String() string { @@ -554,7 +542,7 @@ func (*UpdateHttpRouteRequest) ProtoMessage() {} func (x *UpdateHttpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +584,9 @@ type DeleteHttpRouteRequest struct { func (x *DeleteHttpRouteRequest) Reset() { *x = DeleteHttpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteHttpRouteRequest) String() string { @@ -611,7 +597,7 @@ func (*DeleteHttpRouteRequest) ProtoMessage() {} func (x *DeleteHttpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +643,9 @@ type HttpRoute_HeaderMatch struct { func (x *HttpRoute_HeaderMatch) Reset() { *x = HttpRoute_HeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_HeaderMatch) String() string { @@ -672,7 +656,7 @@ func (*HttpRoute_HeaderMatch) ProtoMessage() {} func (x *HttpRoute_HeaderMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +803,9 @@ type HttpRoute_QueryParameterMatch struct { func (x *HttpRoute_QueryParameterMatch) Reset() { *x = HttpRoute_QueryParameterMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_QueryParameterMatch) String() string { @@ -834,7 +816,7 @@ func (*HttpRoute_QueryParameterMatch) ProtoMessage() {} func (x *HttpRoute_QueryParameterMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +929,9 @@ type HttpRoute_RouteMatch struct { func (x *HttpRoute_RouteMatch) Reset() { *x = HttpRoute_RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_RouteMatch) String() string { @@ -962,7 +942,7 @@ func (*HttpRoute_RouteMatch) ProtoMessage() {} func (x *HttpRoute_RouteMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1071,9 @@ type HttpRoute_Destination struct { func (x *HttpRoute_Destination) Reset() { *x = HttpRoute_Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_Destination) String() string { @@ -1106,7 +1084,7 @@ func (*HttpRoute_Destination) ProtoMessage() {} func (x *HttpRoute_Destination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1175,11 +1153,9 @@ type HttpRoute_Redirect struct { func (x *HttpRoute_Redirect) Reset() { *x = HttpRoute_Redirect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_Redirect) String() string { @@ -1190,7 +1166,7 @@ func (*HttpRoute_Redirect) ProtoMessage() {} func (x *HttpRoute_Redirect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1249,9 @@ type HttpRoute_FaultInjectionPolicy struct { func (x *HttpRoute_FaultInjectionPolicy) Reset() { *x = HttpRoute_FaultInjectionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_FaultInjectionPolicy) String() string { @@ -1288,7 +1262,7 @@ func (*HttpRoute_FaultInjectionPolicy) ProtoMessage() {} func (x *HttpRoute_FaultInjectionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1336,11 +1310,9 @@ type HttpRoute_HeaderModifier struct { func (x *HttpRoute_HeaderModifier) Reset() { *x = HttpRoute_HeaderModifier{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_HeaderModifier) String() string { @@ -1351,7 +1323,7 @@ func (*HttpRoute_HeaderModifier) ProtoMessage() {} func (x *HttpRoute_HeaderModifier) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1376,9 @@ type HttpRoute_URLRewrite struct { func (x *HttpRoute_URLRewrite) Reset() { *x = HttpRoute_URLRewrite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_URLRewrite) String() string { @@ -1419,7 +1389,7 @@ func (*HttpRoute_URLRewrite) ProtoMessage() {} func (x *HttpRoute_URLRewrite) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1487,11 +1457,9 @@ type HttpRoute_RetryPolicy struct { func (x *HttpRoute_RetryPolicy) Reset() { *x = HttpRoute_RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_RetryPolicy) String() string { @@ -1502,7 +1470,7 @@ func (*HttpRoute_RetryPolicy) ProtoMessage() {} func (x *HttpRoute_RetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1554,11 +1522,9 @@ type HttpRoute_RequestMirrorPolicy struct { func (x *HttpRoute_RequestMirrorPolicy) Reset() { *x = HttpRoute_RequestMirrorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_RequestMirrorPolicy) String() string { @@ -1569,7 +1535,7 @@ func (*HttpRoute_RequestMirrorPolicy) ProtoMessage() {} func (x *HttpRoute_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1627,11 +1593,9 @@ type HttpRoute_CorsPolicy struct { func (x *HttpRoute_CorsPolicy) Reset() { *x = HttpRoute_CorsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_CorsPolicy) String() string { @@ -1642,7 +1606,7 @@ func (*HttpRoute_CorsPolicy) ProtoMessage() {} func (x *HttpRoute_CorsPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1728,9 @@ type HttpRoute_RouteAction struct { func (x *HttpRoute_RouteAction) Reset() { *x = HttpRoute_RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_RouteAction) String() string { @@ -1779,7 +1741,7 @@ func (*HttpRoute_RouteAction) ProtoMessage() {} func (x *HttpRoute_RouteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,11 +1849,9 @@ type HttpRoute_RouteRule struct { func (x *HttpRoute_RouteRule) Reset() { *x = HttpRoute_RouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_RouteRule) String() string { @@ -1902,7 +1862,7 @@ func (*HttpRoute_RouteRule) ProtoMessage() {} func (x *HttpRoute_RouteRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1945,11 +1905,9 @@ type HttpRoute_HeaderMatch_IntegerRange struct { func (x *HttpRoute_HeaderMatch_IntegerRange) Reset() { *x = HttpRoute_HeaderMatch_IntegerRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_HeaderMatch_IntegerRange) String() string { @@ -1960,7 +1918,7 @@ func (*HttpRoute_HeaderMatch_IntegerRange) ProtoMessage() {} func (x *HttpRoute_HeaderMatch_IntegerRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2006,11 +1964,9 @@ type HttpRoute_FaultInjectionPolicy_Delay struct { func (x *HttpRoute_FaultInjectionPolicy_Delay) Reset() { *x = HttpRoute_FaultInjectionPolicy_Delay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_FaultInjectionPolicy_Delay) String() string { @@ -2021,7 +1977,7 @@ func (*HttpRoute_FaultInjectionPolicy_Delay) ProtoMessage() {} func (x *HttpRoute_FaultInjectionPolicy_Delay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2069,11 +2025,9 @@ type HttpRoute_FaultInjectionPolicy_Abort struct { func (x *HttpRoute_FaultInjectionPolicy_Abort) Reset() { *x = HttpRoute_FaultInjectionPolicy_Abort{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRoute_FaultInjectionPolicy_Abort) String() string { @@ -2084,7 +2038,7 @@ func (*HttpRoute_FaultInjectionPolicy_Abort) ProtoMessage() {} func (x *HttpRoute_FaultInjectionPolicy_Abort) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_http_route_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2601,284 +2555,6 @@ func file_google_cloud_networkservices_v1_http_route_proto_init() { if File_google_cloud_networkservices_v1_http_route_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListHttpRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListHttpRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetHttpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateHttpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHttpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteHttpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_HeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_QueryParameterMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_Redirect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_FaultInjectionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_HeaderModifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_URLRewrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_RequestMirrorPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_CorsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_RouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_HeaderMatch_IntegerRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_FaultInjectionPolicy_Delay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_http_route_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*HttpRoute_FaultInjectionPolicy_Abort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_networkservices_v1_http_route_proto_msgTypes[7].OneofWrappers = []any{ (*HttpRoute_HeaderMatch_ExactMatch)(nil), (*HttpRoute_HeaderMatch_RegexMatch)(nil), diff --git a/networkservices/apiv1/networkservicespb/mesh.pb.go b/networkservices/apiv1/networkservicespb/mesh.pb.go index 29bab4eaf389..0c5b966bb8bc 100755 --- a/networkservices/apiv1/networkservicespb/mesh.pb.go +++ b/networkservices/apiv1/networkservicespb/mesh.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/mesh.proto @@ -71,11 +71,9 @@ type Mesh struct { func (x *Mesh) Reset() { *x = Mesh{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mesh) String() string { @@ -86,7 +84,7 @@ func (*Mesh) ProtoMessage() {} func (x *Mesh) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +167,9 @@ type ListMeshesRequest struct { func (x *ListMeshesRequest) Reset() { *x = ListMeshesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMeshesRequest) String() string { @@ -184,7 +180,7 @@ func (*ListMeshesRequest) ProtoMessage() {} func (x *ListMeshesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +232,9 @@ type ListMeshesResponse struct { func (x *ListMeshesResponse) Reset() { *x = ListMeshesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMeshesResponse) String() string { @@ -251,7 +245,7 @@ func (*ListMeshesResponse) ProtoMessage() {} func (x *ListMeshesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +287,9 @@ type GetMeshRequest struct { func (x *GetMeshRequest) Reset() { *x = GetMeshRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMeshRequest) String() string { @@ -308,7 +300,7 @@ func (*GetMeshRequest) ProtoMessage() {} func (x *GetMeshRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +339,9 @@ type CreateMeshRequest struct { func (x *CreateMeshRequest) Reset() { *x = CreateMeshRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMeshRequest) String() string { @@ -362,7 +352,7 @@ func (*CreateMeshRequest) ProtoMessage() {} func (x *CreateMeshRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +406,9 @@ type UpdateMeshRequest struct { func (x *UpdateMeshRequest) Reset() { *x = UpdateMeshRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMeshRequest) String() string { @@ -431,7 +419,7 @@ func (*UpdateMeshRequest) ProtoMessage() {} func (x *UpdateMeshRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +461,9 @@ type DeleteMeshRequest struct { func (x *DeleteMeshRequest) Reset() { *x = DeleteMeshRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMeshRequest) String() string { @@ -488,7 +474,7 @@ func (*DeleteMeshRequest) ProtoMessage() {} func (x *DeleteMeshRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_mesh_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -670,92 +656,6 @@ func file_google_cloud_networkservices_v1_mesh_proto_init() { if File_google_cloud_networkservices_v1_mesh_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Mesh); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListMeshesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListMeshesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetMeshRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateMeshRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMeshRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_mesh_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMeshRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/network_services.pb.go b/networkservices/apiv1/networkservicespb/network_services.pb.go index 5bdcccc9cc07..9c054b4950ab 100755 --- a/networkservices/apiv1/networkservicespb/network_services.pb.go +++ b/networkservices/apiv1/networkservicespb/network_services.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/network_services.proto diff --git a/networkservices/apiv1/networkservicespb/service_binding.pb.go b/networkservices/apiv1/networkservicespb/service_binding.pb.go index 67f6bfd4ddd1..da262ae6415d 100755 --- a/networkservices/apiv1/networkservicespb/service_binding.pb.go +++ b/networkservices/apiv1/networkservicespb/service_binding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/service_binding.proto @@ -63,11 +63,9 @@ type ServiceBinding struct { func (x *ServiceBinding) Reset() { *x = ServiceBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceBinding) String() string { @@ -78,7 +76,7 @@ func (*ServiceBinding) ProtoMessage() {} func (x *ServiceBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +152,9 @@ type ListServiceBindingsRequest struct { func (x *ListServiceBindingsRequest) Reset() { *x = ListServiceBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceBindingsRequest) String() string { @@ -169,7 +165,7 @@ func (*ListServiceBindingsRequest) ProtoMessage() {} func (x *ListServiceBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type ListServiceBindingsResponse struct { func (x *ListServiceBindingsResponse) Reset() { *x = ListServiceBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceBindingsResponse) String() string { @@ -236,7 +230,7 @@ func (*ListServiceBindingsResponse) ProtoMessage() {} func (x *ListServiceBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +272,9 @@ type GetServiceBindingRequest struct { func (x *GetServiceBindingRequest) Reset() { *x = GetServiceBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceBindingRequest) String() string { @@ -293,7 +285,7 @@ func (*GetServiceBindingRequest) ProtoMessage() {} func (x *GetServiceBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type CreateServiceBindingRequest struct { func (x *CreateServiceBindingRequest) Reset() { *x = CreateServiceBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceBindingRequest) String() string { @@ -347,7 +337,7 @@ func (*CreateServiceBindingRequest) ProtoMessage() {} func (x *CreateServiceBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,11 +386,9 @@ type DeleteServiceBindingRequest struct { func (x *DeleteServiceBindingRequest) Reset() { *x = DeleteServiceBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceBindingRequest) String() string { @@ -411,7 +399,7 @@ func (*DeleteServiceBindingRequest) ProtoMessage() {} func (x *DeleteServiceBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,80 +577,6 @@ func file_google_cloud_networkservices_v1_service_binding_proto_init() { if File_google_cloud_networkservices_v1_service_binding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServiceBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_service_binding_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/tcp_route.pb.go b/networkservices/apiv1/networkservicespb/tcp_route.pb.go index 839f2d15c5ca..4b3081ecca2e 100755 --- a/networkservices/apiv1/networkservicespb/tcp_route.pb.go +++ b/networkservices/apiv1/networkservicespb/tcp_route.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/tcp_route.proto @@ -81,11 +81,9 @@ type TcpRoute struct { func (x *TcpRoute) Reset() { *x = TcpRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpRoute) String() string { @@ -96,7 +94,7 @@ func (*TcpRoute) ProtoMessage() {} func (x *TcpRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,11 +191,9 @@ type ListTcpRoutesRequest struct { func (x *ListTcpRoutesRequest) Reset() { *x = ListTcpRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTcpRoutesRequest) String() string { @@ -208,7 +204,7 @@ func (*ListTcpRoutesRequest) ProtoMessage() {} func (x *ListTcpRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ListTcpRoutesResponse struct { func (x *ListTcpRoutesResponse) Reset() { *x = ListTcpRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTcpRoutesResponse) String() string { @@ -275,7 +269,7 @@ func (*ListTcpRoutesResponse) ProtoMessage() {} func (x *ListTcpRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +311,9 @@ type GetTcpRouteRequest struct { func (x *GetTcpRouteRequest) Reset() { *x = GetTcpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTcpRouteRequest) String() string { @@ -332,7 +324,7 @@ func (*GetTcpRouteRequest) ProtoMessage() {} func (x *GetTcpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +363,9 @@ type CreateTcpRouteRequest struct { func (x *CreateTcpRouteRequest) Reset() { *x = CreateTcpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTcpRouteRequest) String() string { @@ -386,7 +376,7 @@ func (*CreateTcpRouteRequest) ProtoMessage() {} func (x *CreateTcpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +430,9 @@ type UpdateTcpRouteRequest struct { func (x *UpdateTcpRouteRequest) Reset() { *x = UpdateTcpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTcpRouteRequest) String() string { @@ -455,7 +443,7 @@ func (*UpdateTcpRouteRequest) ProtoMessage() {} func (x *UpdateTcpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -497,11 +485,9 @@ type DeleteTcpRouteRequest struct { func (x *DeleteTcpRouteRequest) Reset() { *x = DeleteTcpRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTcpRouteRequest) String() string { @@ -512,7 +498,7 @@ func (*DeleteTcpRouteRequest) ProtoMessage() {} func (x *DeleteTcpRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +538,9 @@ type TcpRoute_RouteRule struct { func (x *TcpRoute_RouteRule) Reset() { *x = TcpRoute_RouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpRoute_RouteRule) String() string { @@ -567,7 +551,7 @@ func (*TcpRoute_RouteRule) ProtoMessage() {} func (x *TcpRoute_RouteRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,11 +605,9 @@ type TcpRoute_RouteMatch struct { func (x *TcpRoute_RouteMatch) Reset() { *x = TcpRoute_RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpRoute_RouteMatch) String() string { @@ -636,7 +618,7 @@ func (*TcpRoute_RouteMatch) ProtoMessage() {} func (x *TcpRoute_RouteMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -683,11 +665,9 @@ type TcpRoute_RouteAction struct { func (x *TcpRoute_RouteAction) Reset() { *x = TcpRoute_RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpRoute_RouteAction) String() string { @@ -698,7 +678,7 @@ func (*TcpRoute_RouteAction) ProtoMessage() {} func (x *TcpRoute_RouteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +734,9 @@ type TcpRoute_RouteDestination struct { func (x *TcpRoute_RouteDestination) Reset() { *x = TcpRoute_RouteDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TcpRoute_RouteDestination) String() string { @@ -769,7 +747,7 @@ func (*TcpRoute_RouteDestination) ProtoMessage() {} func (x *TcpRoute_RouteDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,140 +1004,6 @@ func file_google_cloud_networkservices_v1_tcp_route_proto_init() { if File_google_cloud_networkservices_v1_tcp_route_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TcpRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTcpRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTcpRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTcpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTcpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTcpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTcpRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TcpRoute_RouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TcpRoute_RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TcpRoute_RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tcp_route_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TcpRoute_RouteDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networkservices/apiv1/networkservicespb/tls_route.pb.go b/networkservices/apiv1/networkservicespb/tls_route.pb.go index 5e0e6091252c..e7758a646ef3 100755 --- a/networkservices/apiv1/networkservicespb/tls_route.pb.go +++ b/networkservices/apiv1/networkservicespb/tls_route.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/networkservices/v1/tls_route.proto @@ -79,11 +79,9 @@ type TlsRoute struct { func (x *TlsRoute) Reset() { *x = TlsRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsRoute) String() string { @@ -94,7 +92,7 @@ func (*TlsRoute) ProtoMessage() {} func (x *TlsRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +182,9 @@ type ListTlsRoutesRequest struct { func (x *ListTlsRoutesRequest) Reset() { *x = ListTlsRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTlsRoutesRequest) String() string { @@ -199,7 +195,7 @@ func (*ListTlsRoutesRequest) ProtoMessage() {} func (x *ListTlsRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +247,9 @@ type ListTlsRoutesResponse struct { func (x *ListTlsRoutesResponse) Reset() { *x = ListTlsRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTlsRoutesResponse) String() string { @@ -266,7 +260,7 @@ func (*ListTlsRoutesResponse) ProtoMessage() {} func (x *ListTlsRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +302,9 @@ type GetTlsRouteRequest struct { func (x *GetTlsRouteRequest) Reset() { *x = GetTlsRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTlsRouteRequest) String() string { @@ -323,7 +315,7 @@ func (*GetTlsRouteRequest) ProtoMessage() {} func (x *GetTlsRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type CreateTlsRouteRequest struct { func (x *CreateTlsRouteRequest) Reset() { *x = CreateTlsRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTlsRouteRequest) String() string { @@ -377,7 +367,7 @@ func (*CreateTlsRouteRequest) ProtoMessage() {} func (x *CreateTlsRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +421,9 @@ type UpdateTlsRouteRequest struct { func (x *UpdateTlsRouteRequest) Reset() { *x = UpdateTlsRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTlsRouteRequest) String() string { @@ -446,7 +434,7 @@ func (*UpdateTlsRouteRequest) ProtoMessage() {} func (x *UpdateTlsRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,11 +476,9 @@ type DeleteTlsRouteRequest struct { func (x *DeleteTlsRouteRequest) Reset() { *x = DeleteTlsRouteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTlsRouteRequest) String() string { @@ -503,7 +489,7 @@ func (*DeleteTlsRouteRequest) ProtoMessage() {} func (x *DeleteTlsRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +527,9 @@ type TlsRoute_RouteRule struct { func (x *TlsRoute_RouteRule) Reset() { *x = TlsRoute_RouteRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsRoute_RouteRule) String() string { @@ -556,7 +540,7 @@ func (*TlsRoute_RouteRule) ProtoMessage() {} func (x *TlsRoute_RouteRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +596,9 @@ type TlsRoute_RouteMatch struct { func (x *TlsRoute_RouteMatch) Reset() { *x = TlsRoute_RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsRoute_RouteMatch) String() string { @@ -627,7 +609,7 @@ func (*TlsRoute_RouteMatch) ProtoMessage() {} func (x *TlsRoute_RouteMatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +651,9 @@ type TlsRoute_RouteAction struct { func (x *TlsRoute_RouteAction) Reset() { *x = TlsRoute_RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsRoute_RouteAction) String() string { @@ -684,7 +664,7 @@ func (*TlsRoute_RouteAction) ProtoMessage() {} func (x *TlsRoute_RouteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +703,9 @@ type TlsRoute_RouteDestination struct { func (x *TlsRoute_RouteDestination) Reset() { *x = TlsRoute_RouteDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsRoute_RouteDestination) String() string { @@ -738,7 +716,7 @@ func (*TlsRoute_RouteDestination) ProtoMessage() {} func (x *TlsRoute_RouteDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,140 +952,6 @@ func file_google_cloud_networkservices_v1_tls_route_proto_init() { if File_google_cloud_networkservices_v1_tls_route_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TlsRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTlsRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTlsRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTlsRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateTlsRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTlsRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTlsRouteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TlsRoute_RouteRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TlsRoute_RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TlsRoute_RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_networkservices_v1_tls_route_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TlsRoute_RouteDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/helpers.go b/notebooks/apiv1/helpers.go index 49ccae67c07b..7c127f4ecf88 100755 --- a/notebooks/apiv1/helpers.go +++ b/notebooks/apiv1/helpers.go @@ -18,10 +18,16 @@ package notebooks import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "notebooks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/notebooks/apiv1/managed_notebook_client.go b/notebooks/apiv1/managed_notebook_client.go index 9e4f1e3abf0a..0f910d0c89cb 100755 --- a/notebooks/apiv1/managed_notebook_client.go +++ b/notebooks/apiv1/managed_notebook_client.go @@ -19,6 +19,7 @@ package notebooks import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -470,6 +471,8 @@ type managedNotebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewManagedNotebookClient creates a new managed notebook service client based on gRPC. @@ -496,6 +499,7 @@ func NewManagedNotebookClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, managedNotebookClient: notebookspb.NewManagedNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -563,7 +567,7 @@ func (c *managedNotebookGRPCClient) ListRuntimes(ctx context.Context, req *noteb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.ListRuntimes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.ListRuntimes, req, settings.GRPC, c.logger, "ListRuntimes") return err }, opts...) if err != nil { @@ -598,7 +602,7 @@ func (c *managedNotebookGRPCClient) GetRuntime(ctx context.Context, req *noteboo var resp *notebookspb.Runtime err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.GetRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.GetRuntime, req, settings.GRPC, c.logger, "GetRuntime") return err }, opts...) if err != nil { @@ -616,7 +620,7 @@ func (c *managedNotebookGRPCClient) CreateRuntime(ctx context.Context, req *note var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.CreateRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.CreateRuntime, req, settings.GRPC, c.logger, "CreateRuntime") return err }, opts...) if err != nil { @@ -636,7 +640,7 @@ func (c *managedNotebookGRPCClient) UpdateRuntime(ctx context.Context, req *note var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.UpdateRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.UpdateRuntime, req, settings.GRPC, c.logger, "UpdateRuntime") return err }, opts...) if err != nil { @@ -656,7 +660,7 @@ func (c *managedNotebookGRPCClient) DeleteRuntime(ctx context.Context, req *note var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.DeleteRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.DeleteRuntime, req, settings.GRPC, c.logger, "DeleteRuntime") return err }, opts...) if err != nil { @@ -676,7 +680,7 @@ func (c *managedNotebookGRPCClient) StartRuntime(ctx context.Context, req *noteb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.StartRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.StartRuntime, req, settings.GRPC, c.logger, "StartRuntime") return err }, opts...) if err != nil { @@ -696,7 +700,7 @@ func (c *managedNotebookGRPCClient) StopRuntime(ctx context.Context, req *notebo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.StopRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.StopRuntime, req, settings.GRPC, c.logger, "StopRuntime") return err }, opts...) if err != nil { @@ -716,7 +720,7 @@ func (c *managedNotebookGRPCClient) SwitchRuntime(ctx context.Context, req *note var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.SwitchRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.SwitchRuntime, req, settings.GRPC, c.logger, "SwitchRuntime") return err }, opts...) if err != nil { @@ -736,7 +740,7 @@ func (c *managedNotebookGRPCClient) ResetRuntime(ctx context.Context, req *noteb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.ResetRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.ResetRuntime, req, settings.GRPC, c.logger, "ResetRuntime") return err }, opts...) if err != nil { @@ -756,7 +760,7 @@ func (c *managedNotebookGRPCClient) UpgradeRuntime(ctx context.Context, req *not var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.UpgradeRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.UpgradeRuntime, req, settings.GRPC, c.logger, "UpgradeRuntime") return err }, opts...) if err != nil { @@ -776,7 +780,7 @@ func (c *managedNotebookGRPCClient) ReportRuntimeEvent(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.ReportRuntimeEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.ReportRuntimeEvent, req, settings.GRPC, c.logger, "ReportRuntimeEvent") return err }, opts...) if err != nil { @@ -796,7 +800,7 @@ func (c *managedNotebookGRPCClient) RefreshRuntimeTokenInternal(ctx context.Cont var resp *notebookspb.RefreshRuntimeTokenInternalResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.RefreshRuntimeTokenInternal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.RefreshRuntimeTokenInternal, req, settings.GRPC, c.logger, "RefreshRuntimeTokenInternal") return err }, opts...) if err != nil { @@ -814,7 +818,7 @@ func (c *managedNotebookGRPCClient) DiagnoseRuntime(ctx context.Context, req *no var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.managedNotebookClient.DiagnoseRuntime(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.managedNotebookClient.DiagnoseRuntime, req, settings.GRPC, c.logger, "DiagnoseRuntime") return err }, opts...) if err != nil { @@ -834,7 +838,7 @@ func (c *managedNotebookGRPCClient) GetLocation(ctx context.Context, req *locati var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -863,7 +867,7 @@ func (c *managedNotebookGRPCClient) ListLocations(ctx context.Context, req *loca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -898,7 +902,7 @@ func (c *managedNotebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -916,7 +920,7 @@ func (c *managedNotebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -934,7 +938,7 @@ func (c *managedNotebookGRPCClient) TestIamPermissions(ctx context.Context, req var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -951,7 +955,7 @@ func (c *managedNotebookGRPCClient) CancelOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -965,7 +969,7 @@ func (c *managedNotebookGRPCClient) DeleteOperation(ctx context.Context, req *lo opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -980,7 +984,7 @@ func (c *managedNotebookGRPCClient) GetOperation(ctx context.Context, req *longr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1009,7 +1013,7 @@ func (c *managedNotebookGRPCClient) ListOperations(ctx context.Context, req *lon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/notebooks/apiv1/managed_notebook_client_example_go123_test.go b/notebooks/apiv1/managed_notebook_client_example_go123_test.go index ef962a95e844..138bdd7e81fe 100644 --- a/notebooks/apiv1/managed_notebook_client_example_go123_test.go +++ b/notebooks/apiv1/managed_notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleManagedNotebookClient_ListRuntimes_all() { } for resp, err := range c.ListRuntimes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleManagedNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleManagedNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/notebooks/apiv1/notebook_client.go b/notebooks/apiv1/notebook_client.go index efb2023c514b..82d4352a7951 100755 --- a/notebooks/apiv1/notebook_client.go +++ b/notebooks/apiv1/notebook_client.go @@ -19,6 +19,7 @@ package notebooks import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -759,6 +760,8 @@ type notebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotebookClient creates a new notebook service client based on gRPC. @@ -785,6 +788,7 @@ func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*Noteb connPool: connPool, notebookClient: notebookspb.NewNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -852,7 +856,7 @@ func (c *notebookGRPCClient) ListInstances(ctx context.Context, req *notebookspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -887,7 +891,7 @@ func (c *notebookGRPCClient) GetInstance(ctx context.Context, req *notebookspb.G var resp *notebookspb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -905,7 +909,7 @@ func (c *notebookGRPCClient) CreateInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -925,7 +929,7 @@ func (c *notebookGRPCClient) RegisterInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.RegisterInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.RegisterInstance, req, settings.GRPC, c.logger, "RegisterInstance") return err }, opts...) if err != nil { @@ -945,7 +949,7 @@ func (c *notebookGRPCClient) SetInstanceAccelerator(ctx context.Context, req *no var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceAccelerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceAccelerator, req, settings.GRPC, c.logger, "SetInstanceAccelerator") return err }, opts...) if err != nil { @@ -965,7 +969,7 @@ func (c *notebookGRPCClient) SetInstanceMachineType(ctx context.Context, req *no var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceMachineType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceMachineType, req, settings.GRPC, c.logger, "SetInstanceMachineType") return err }, opts...) if err != nil { @@ -985,7 +989,7 @@ func (c *notebookGRPCClient) UpdateInstanceConfig(ctx context.Context, req *note var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateInstanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateInstanceConfig, req, settings.GRPC, c.logger, "UpdateInstanceConfig") return err }, opts...) if err != nil { @@ -1005,7 +1009,7 @@ func (c *notebookGRPCClient) UpdateShieldedInstanceConfig(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateShieldedInstanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateShieldedInstanceConfig, req, settings.GRPC, c.logger, "UpdateShieldedInstanceConfig") return err }, opts...) if err != nil { @@ -1025,7 +1029,7 @@ func (c *notebookGRPCClient) SetInstanceLabels(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceLabels, req, settings.GRPC, c.logger, "SetInstanceLabels") return err }, opts...) if err != nil { @@ -1045,7 +1049,7 @@ func (c *notebookGRPCClient) UpdateInstanceMetadataItems(ctx context.Context, re var resp *notebookspb.UpdateInstanceMetadataItemsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateInstanceMetadataItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateInstanceMetadataItems, req, settings.GRPC, c.logger, "UpdateInstanceMetadataItems") return err }, opts...) if err != nil { @@ -1063,7 +1067,7 @@ func (c *notebookGRPCClient) DeleteInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -1083,7 +1087,7 @@ func (c *notebookGRPCClient) StartInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StartInstance, req, settings.GRPC, c.logger, "StartInstance") return err }, opts...) if err != nil { @@ -1103,7 +1107,7 @@ func (c *notebookGRPCClient) StopInstance(ctx context.Context, req *notebookspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StopInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StopInstance, req, settings.GRPC, c.logger, "StopInstance") return err }, opts...) if err != nil { @@ -1123,7 +1127,7 @@ func (c *notebookGRPCClient) ResetInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ResetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ResetInstance, req, settings.GRPC, c.logger, "ResetInstance") return err }, opts...) if err != nil { @@ -1143,7 +1147,7 @@ func (c *notebookGRPCClient) ReportInstanceInfo(ctx context.Context, req *notebo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ReportInstanceInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ReportInstanceInfo, req, settings.GRPC, c.logger, "ReportInstanceInfo") return err }, opts...) if err != nil { @@ -1163,7 +1167,7 @@ func (c *notebookGRPCClient) IsInstanceUpgradeable(ctx context.Context, req *not var resp *notebookspb.IsInstanceUpgradeableResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.IsInstanceUpgradeable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.IsInstanceUpgradeable, req, settings.GRPC, c.logger, "IsInstanceUpgradeable") return err }, opts...) if err != nil { @@ -1181,7 +1185,7 @@ func (c *notebookGRPCClient) GetInstanceHealth(ctx context.Context, req *noteboo var resp *notebookspb.GetInstanceHealthResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetInstanceHealth(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetInstanceHealth, req, settings.GRPC, c.logger, "GetInstanceHealth") return err }, opts...) if err != nil { @@ -1199,7 +1203,7 @@ func (c *notebookGRPCClient) UpgradeInstance(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeInstance, req, settings.GRPC, c.logger, "UpgradeInstance") return err }, opts...) if err != nil { @@ -1219,7 +1223,7 @@ func (c *notebookGRPCClient) RollbackInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.RollbackInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.RollbackInstance, req, settings.GRPC, c.logger, "RollbackInstance") return err }, opts...) if err != nil { @@ -1239,7 +1243,7 @@ func (c *notebookGRPCClient) DiagnoseInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DiagnoseInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DiagnoseInstance, req, settings.GRPC, c.logger, "DiagnoseInstance") return err }, opts...) if err != nil { @@ -1259,7 +1263,7 @@ func (c *notebookGRPCClient) UpgradeInstanceInternal(ctx context.Context, req *n var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeInstanceInternal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeInstanceInternal, req, settings.GRPC, c.logger, "UpgradeInstanceInternal") return err }, opts...) if err != nil { @@ -1290,7 +1294,7 @@ func (c *notebookGRPCClient) ListEnvironments(ctx context.Context, req *notebook } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -1325,7 +1329,7 @@ func (c *notebookGRPCClient) GetEnvironment(ctx context.Context, req *notebooksp var resp *notebookspb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -1343,7 +1347,7 @@ func (c *notebookGRPCClient) CreateEnvironment(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -1363,7 +1367,7 @@ func (c *notebookGRPCClient) DeleteEnvironment(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) if err != nil { @@ -1394,7 +1398,7 @@ func (c *notebookGRPCClient) ListSchedules(ctx context.Context, req *notebookspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListSchedules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListSchedules, req, settings.GRPC, c.logger, "ListSchedules") return err }, opts...) if err != nil { @@ -1429,7 +1433,7 @@ func (c *notebookGRPCClient) GetSchedule(ctx context.Context, req *notebookspb.G var resp *notebookspb.Schedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetSchedule, req, settings.GRPC, c.logger, "GetSchedule") return err }, opts...) if err != nil { @@ -1447,7 +1451,7 @@ func (c *notebookGRPCClient) DeleteSchedule(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteSchedule, req, settings.GRPC, c.logger, "DeleteSchedule") return err }, opts...) if err != nil { @@ -1467,7 +1471,7 @@ func (c *notebookGRPCClient) CreateSchedule(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateSchedule, req, settings.GRPC, c.logger, "CreateSchedule") return err }, opts...) if err != nil { @@ -1487,7 +1491,7 @@ func (c *notebookGRPCClient) TriggerSchedule(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.TriggerSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.TriggerSchedule, req, settings.GRPC, c.logger, "TriggerSchedule") return err }, opts...) if err != nil { @@ -1518,7 +1522,7 @@ func (c *notebookGRPCClient) ListExecutions(ctx context.Context, req *notebooksp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -1553,7 +1557,7 @@ func (c *notebookGRPCClient) GetExecution(ctx context.Context, req *notebookspb. var resp *notebookspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -1571,7 +1575,7 @@ func (c *notebookGRPCClient) DeleteExecution(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteExecution, req, settings.GRPC, c.logger, "DeleteExecution") return err }, opts...) if err != nil { @@ -1591,7 +1595,7 @@ func (c *notebookGRPCClient) CreateExecution(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateExecution, req, settings.GRPC, c.logger, "CreateExecution") return err }, opts...) if err != nil { @@ -1611,7 +1615,7 @@ func (c *notebookGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1640,7 +1644,7 @@ func (c *notebookGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1675,7 +1679,7 @@ func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1693,7 +1697,7 @@ func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1711,7 +1715,7 @@ func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1728,7 +1732,7 @@ func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1742,7 +1746,7 @@ func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1757,7 +1761,7 @@ func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1786,7 +1790,7 @@ func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/notebooks/apiv1/notebook_client_example_go123_test.go b/notebooks/apiv1/notebook_client_example_go123_test.go index 66a34ff9e3f5..a30a8a95b5e4 100644 --- a/notebooks/apiv1/notebook_client_example_go123_test.go +++ b/notebooks/apiv1/notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleNotebookClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleNotebookClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleNotebookClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleNotebookClient_ListSchedules_all() { } for resp, err := range c.ListSchedules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/notebooks/apiv1/notebookspb/diagnostic_config.pb.go b/notebooks/apiv1/notebookspb/diagnostic_config.pb.go index 5266718fbd71..6a89fd5b4dfd 100755 --- a/notebooks/apiv1/notebookspb/diagnostic_config.pb.go +++ b/notebooks/apiv1/notebookspb/diagnostic_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/diagnostic_config.proto @@ -74,11 +74,9 @@ type DiagnosticConfig struct { func (x *DiagnosticConfig) Reset() { *x = DiagnosticConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_diagnostic_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_diagnostic_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnosticConfig) String() string { @@ -89,7 +87,7 @@ func (*DiagnosticConfig) ProtoMessage() {} func (x *DiagnosticConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_diagnostic_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,20 +204,6 @@ func file_google_cloud_notebooks_v1_diagnostic_config_proto_init() { if File_google_cloud_notebooks_v1_diagnostic_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_diagnostic_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DiagnosticConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/notebookspb/environment.pb.go b/notebooks/apiv1/notebookspb/environment.pb.go index 4eaaa7db6d81..c6ff4c66841a 100755 --- a/notebooks/apiv1/notebookspb/environment.pb.go +++ b/notebooks/apiv1/notebookspb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/environment.proto @@ -69,11 +69,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -84,7 +82,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type VmImage struct { func (x *VmImage) Reset() { *x = VmImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmImage) String() string { @@ -209,7 +205,7 @@ func (*VmImage) ProtoMessage() {} func (x *VmImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +284,9 @@ type ContainerImage struct { func (x *ContainerImage) Reset() { *x = ContainerImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerImage) String() string { @@ -303,7 +297,7 @@ func (*ContainerImage) ProtoMessage() {} func (x *ContainerImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,44 +432,6 @@ func file_google_cloud_notebooks_v1_environment_proto_init() { if File_google_cloud_notebooks_v1_environment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VmImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContainerImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1_environment_proto_msgTypes[0].OneofWrappers = []any{ (*Environment_VmImage)(nil), (*Environment_ContainerImage)(nil), diff --git a/notebooks/apiv1/notebookspb/event.pb.go b/notebooks/apiv1/notebookspb/event.pb.go index e623fcc330fb..658b5059c9a2 100755 --- a/notebooks/apiv1/notebookspb/event.pb.go +++ b/notebooks/apiv1/notebookspb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/event.proto @@ -120,11 +120,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -135,7 +133,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,20 +249,6 @@ func file_google_cloud_notebooks_v1_event_proto_init() { if File_google_cloud_notebooks_v1_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/notebookspb/execution.pb.go b/notebooks/apiv1/notebookspb/execution.pb.go index 313d990cd62f..b3cffd43b29e 100755 --- a/notebooks/apiv1/notebookspb/execution.pb.go +++ b/notebooks/apiv1/notebookspb/execution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/execution.proto @@ -448,11 +448,9 @@ type ExecutionTemplate struct { func (x *ExecutionTemplate) Reset() { *x = ExecutionTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionTemplate) String() string { @@ -463,7 +461,7 @@ func (*ExecutionTemplate) ProtoMessage() {} func (x *ExecutionTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +637,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -654,7 +650,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +745,9 @@ type ExecutionTemplate_SchedulerAcceleratorConfig struct { func (x *ExecutionTemplate_SchedulerAcceleratorConfig) Reset() { *x = ExecutionTemplate_SchedulerAcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionTemplate_SchedulerAcceleratorConfig) String() string { @@ -764,7 +758,7 @@ func (*ExecutionTemplate_SchedulerAcceleratorConfig) ProtoMessage() {} func (x *ExecutionTemplate_SchedulerAcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,11 +800,9 @@ type ExecutionTemplate_DataprocParameters struct { func (x *ExecutionTemplate_DataprocParameters) Reset() { *x = ExecutionTemplate_DataprocParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionTemplate_DataprocParameters) String() string { @@ -821,7 +813,7 @@ func (*ExecutionTemplate_DataprocParameters) ProtoMessage() {} func (x *ExecutionTemplate_DataprocParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +861,9 @@ type ExecutionTemplate_VertexAIParameters struct { func (x *ExecutionTemplate_VertexAIParameters) Reset() { *x = ExecutionTemplate_VertexAIParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionTemplate_VertexAIParameters) String() string { @@ -884,7 +874,7 @@ func (*ExecutionTemplate_VertexAIParameters) ProtoMessage() {} func (x *ExecutionTemplate_VertexAIParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_execution_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,68 +1154,6 @@ func file_google_cloud_notebooks_v1_execution_proto_init() { if File_google_cloud_notebooks_v1_execution_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_execution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_execution_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_execution_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionTemplate_SchedulerAcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_execution_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionTemplate_DataprocParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_execution_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionTemplate_VertexAIParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1_execution_proto_msgTypes[0].OneofWrappers = []any{ (*ExecutionTemplate_DataprocParameters_)(nil), (*ExecutionTemplate_VertexAiParameters)(nil), diff --git a/notebooks/apiv1/notebookspb/instance.pb.go b/notebooks/apiv1/notebookspb/instance.pb.go index 28423362cbb4..fa6d40cf79be 100755 --- a/notebooks/apiv1/notebookspb/instance.pb.go +++ b/notebooks/apiv1/notebookspb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/instance.proto @@ -569,11 +569,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -584,7 +582,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +761,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -778,7 +774,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,11 +1083,9 @@ type Instance_AcceleratorConfig struct { func (x *Instance_AcceleratorConfig) Reset() { *x = Instance_AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_AcceleratorConfig) String() string { @@ -1102,7 +1096,7 @@ func (*Instance_AcceleratorConfig) ProtoMessage() {} func (x *Instance_AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1194,9 @@ type Instance_Disk struct { func (x *Instance_Disk) Reset() { *x = Instance_Disk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Disk) String() string { @@ -1215,7 +1207,7 @@ func (*Instance_Disk) ProtoMessage() {} func (x *Instance_Disk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1334,9 @@ type Instance_ShieldedInstanceConfig struct { func (x *Instance_ShieldedInstanceConfig) Reset() { *x = Instance_ShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_ShieldedInstanceConfig) String() string { @@ -1357,7 +1347,7 @@ func (*Instance_ShieldedInstanceConfig) ProtoMessage() {} func (x *Instance_ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,11 +1415,9 @@ type Instance_UpgradeHistoryEntry struct { func (x *Instance_UpgradeHistoryEntry) Reset() { *x = Instance_UpgradeHistoryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_UpgradeHistoryEntry) String() string { @@ -1440,7 +1428,7 @@ func (*Instance_UpgradeHistoryEntry) ProtoMessage() {} func (x *Instance_UpgradeHistoryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1547,11 +1535,9 @@ type Instance_Disk_GuestOsFeature struct { func (x *Instance_Disk_GuestOsFeature) Reset() { *x = Instance_Disk_GuestOsFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_Disk_GuestOsFeature) String() string { @@ -1562,7 +1548,7 @@ func (*Instance_Disk_GuestOsFeature) ProtoMessage() {} func (x *Instance_Disk_GuestOsFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1983,92 +1969,6 @@ func file_google_cloud_notebooks_v1_instance_proto_init() { return } file_google_cloud_notebooks_v1_environment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Instance_AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Disk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Instance_ShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Instance_UpgradeHistoryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_instance_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Instance_Disk_GuestOsFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1_instance_proto_msgTypes[1].OneofWrappers = []any{ (*Instance_VmImage)(nil), (*Instance_ContainerImage)(nil), diff --git a/notebooks/apiv1/notebookspb/instance_config.pb.go b/notebooks/apiv1/notebookspb/instance_config.pb.go index db1c8d37bfba..049dfa8c7191 100755 --- a/notebooks/apiv1/notebookspb/instance_config.pb.go +++ b/notebooks/apiv1/notebookspb/instance_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/instance_config.proto @@ -50,11 +50,9 @@ type InstanceConfig struct { func (x *InstanceConfig) Reset() { *x = InstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_instance_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_instance_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConfig) String() string { @@ -65,7 +63,7 @@ func (*InstanceConfig) ProtoMessage() {} func (x *InstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_instance_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +153,6 @@ func file_google_cloud_notebooks_v1_instance_config_proto_init() { if File_google_cloud_notebooks_v1_instance_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_instance_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/notebookspb/managed_service.pb.go b/notebooks/apiv1/notebookspb/managed_service.pb.go index f848aff79411..983a8adfaf1c 100755 --- a/notebooks/apiv1/notebookspb/managed_service.pb.go +++ b/notebooks/apiv1/notebookspb/managed_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/managed_service.proto @@ -61,11 +61,9 @@ type ListRuntimesRequest struct { func (x *ListRuntimesRequest) Reset() { *x = ListRuntimesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesRequest) String() string { @@ -76,7 +74,7 @@ func (*ListRuntimesRequest) ProtoMessage() {} func (x *ListRuntimesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type ListRuntimesResponse struct { func (x *ListRuntimesResponse) Reset() { *x = ListRuntimesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRuntimesResponse) String() string { @@ -146,7 +142,7 @@ func (*ListRuntimesResponse) ProtoMessage() {} func (x *ListRuntimesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,11 +191,9 @@ type GetRuntimeRequest struct { func (x *GetRuntimeRequest) Reset() { *x = GetRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRuntimeRequest) String() string { @@ -210,7 +204,7 @@ func (*GetRuntimeRequest) ProtoMessage() {} func (x *GetRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type CreateRuntimeRequest struct { func (x *CreateRuntimeRequest) Reset() { *x = CreateRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRuntimeRequest) String() string { @@ -266,7 +258,7 @@ func (*CreateRuntimeRequest) ProtoMessage() {} func (x *CreateRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +316,9 @@ type DeleteRuntimeRequest struct { func (x *DeleteRuntimeRequest) Reset() { *x = DeleteRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRuntimeRequest) String() string { @@ -339,7 +329,7 @@ func (*DeleteRuntimeRequest) ProtoMessage() {} func (x *DeleteRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +373,9 @@ type StartRuntimeRequest struct { func (x *StartRuntimeRequest) Reset() { *x = StartRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartRuntimeRequest) String() string { @@ -398,7 +386,7 @@ func (*StartRuntimeRequest) ProtoMessage() {} func (x *StartRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,11 +430,9 @@ type StopRuntimeRequest struct { func (x *StopRuntimeRequest) Reset() { *x = StopRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopRuntimeRequest) String() string { @@ -457,7 +443,7 @@ func (*StopRuntimeRequest) ProtoMessage() {} func (x *StopRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +491,9 @@ type SwitchRuntimeRequest struct { func (x *SwitchRuntimeRequest) Reset() { *x = SwitchRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SwitchRuntimeRequest) String() string { @@ -520,7 +504,7 @@ func (*SwitchRuntimeRequest) ProtoMessage() {} func (x *SwitchRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +562,9 @@ type ResetRuntimeRequest struct { func (x *ResetRuntimeRequest) Reset() { *x = ResetRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetRuntimeRequest) String() string { @@ -593,7 +575,7 @@ func (*ResetRuntimeRequest) ProtoMessage() {} func (x *ResetRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +622,9 @@ type UpgradeRuntimeRequest struct { func (x *UpgradeRuntimeRequest) Reset() { *x = UpgradeRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeRuntimeRequest) String() string { @@ -655,7 +635,7 @@ func (*UpgradeRuntimeRequest) ProtoMessage() {} func (x *UpgradeRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -702,11 +682,9 @@ type ReportRuntimeEventRequest struct { func (x *ReportRuntimeEventRequest) Reset() { *x = ReportRuntimeEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRuntimeEventRequest) String() string { @@ -717,7 +695,7 @@ func (*ReportRuntimeEventRequest) ProtoMessage() {} func (x *ReportRuntimeEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +768,9 @@ type UpdateRuntimeRequest struct { func (x *UpdateRuntimeRequest) Reset() { *x = UpdateRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRuntimeRequest) String() string { @@ -805,7 +781,7 @@ func (*UpdateRuntimeRequest) ProtoMessage() {} func (x *UpdateRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,11 +833,9 @@ type RefreshRuntimeTokenInternalRequest struct { func (x *RefreshRuntimeTokenInternalRequest) Reset() { *x = RefreshRuntimeTokenInternalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RefreshRuntimeTokenInternalRequest) String() string { @@ -872,7 +846,7 @@ func (*RefreshRuntimeTokenInternalRequest) ProtoMessage() {} func (x *RefreshRuntimeTokenInternalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +889,9 @@ type RefreshRuntimeTokenInternalResponse struct { func (x *RefreshRuntimeTokenInternalResponse) Reset() { *x = RefreshRuntimeTokenInternalResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RefreshRuntimeTokenInternalResponse) String() string { @@ -930,7 +902,7 @@ func (*RefreshRuntimeTokenInternalResponse) ProtoMessage() {} func (x *RefreshRuntimeTokenInternalResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +946,9 @@ type DiagnoseRuntimeRequest struct { func (x *DiagnoseRuntimeRequest) Reset() { *x = DiagnoseRuntimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseRuntimeRequest) String() string { @@ -989,7 +959,7 @@ func (*DiagnoseRuntimeRequest) ProtoMessage() {} func (x *DiagnoseRuntimeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1454,188 +1424,6 @@ func file_google_cloud_notebooks_v1_managed_service_proto_init() { file_google_cloud_notebooks_v1_diagnostic_config_proto_init() file_google_cloud_notebooks_v1_event_proto_init() file_google_cloud_notebooks_v1_runtime_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRuntimesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StartRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StopRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SwitchRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResetRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ReportRuntimeEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RefreshRuntimeTokenInternalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RefreshRuntimeTokenInternalResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_managed_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseRuntimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/notebookspb/runtime.pb.go b/notebooks/apiv1/notebookspb/runtime.pb.go index 02f487e812b8..45352a2e641f 100755 --- a/notebooks/apiv1/notebookspb/runtime.pb.go +++ b/notebooks/apiv1/notebookspb/runtime.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/runtime.proto @@ -533,11 +533,9 @@ type Runtime struct { func (x *Runtime) Reset() { *x = Runtime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Runtime) String() string { @@ -548,7 +546,7 @@ func (*Runtime) ProtoMessage() {} func (x *Runtime) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +667,9 @@ type RuntimeAcceleratorConfig struct { func (x *RuntimeAcceleratorConfig) Reset() { *x = RuntimeAcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeAcceleratorConfig) String() string { @@ -684,7 +680,7 @@ func (*RuntimeAcceleratorConfig) ProtoMessage() {} func (x *RuntimeAcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,11 +725,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -744,7 +738,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +832,9 @@ type LocalDisk struct { func (x *LocalDisk) Reset() { *x = LocalDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalDisk) String() string { @@ -853,7 +845,7 @@ func (*LocalDisk) ProtoMessage() {} func (x *LocalDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +974,9 @@ type LocalDiskInitializeParams struct { func (x *LocalDiskInitializeParams) Reset() { *x = LocalDiskInitializeParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalDiskInitializeParams) String() string { @@ -997,7 +987,7 @@ func (*LocalDiskInitializeParams) ProtoMessage() {} func (x *LocalDiskInitializeParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1054,9 @@ type RuntimeAccessConfig struct { func (x *RuntimeAccessConfig) Reset() { *x = RuntimeAccessConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeAccessConfig) String() string { @@ -1079,7 +1067,7 @@ func (*RuntimeAccessConfig) ProtoMessage() {} func (x *RuntimeAccessConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1163,11 +1151,9 @@ type RuntimeSoftwareConfig struct { func (x *RuntimeSoftwareConfig) Reset() { *x = RuntimeSoftwareConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeSoftwareConfig) String() string { @@ -1178,7 +1164,7 @@ func (*RuntimeSoftwareConfig) ProtoMessage() {} func (x *RuntimeSoftwareConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1275,9 @@ type RuntimeMetrics struct { func (x *RuntimeMetrics) Reset() { *x = RuntimeMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeMetrics) String() string { @@ -1304,7 +1288,7 @@ func (*RuntimeMetrics) ProtoMessage() {} func (x *RuntimeMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1338,9 @@ type RuntimeShieldedInstanceConfig struct { func (x *RuntimeShieldedInstanceConfig) Reset() { *x = RuntimeShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeShieldedInstanceConfig) String() string { @@ -1369,7 +1351,7 @@ func (*RuntimeShieldedInstanceConfig) ProtoMessage() {} func (x *RuntimeShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1421,11 +1403,9 @@ type VirtualMachine struct { func (x *VirtualMachine) Reset() { *x = VirtualMachine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualMachine) String() string { @@ -1436,7 +1416,7 @@ func (*VirtualMachine) ProtoMessage() {} func (x *VirtualMachine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1558,9 @@ type VirtualMachineConfig struct { func (x *VirtualMachineConfig) Reset() { *x = VirtualMachineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualMachineConfig) String() string { @@ -1593,7 +1571,7 @@ func (*VirtualMachineConfig) ProtoMessage() {} func (x *VirtualMachineConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,11 +1733,9 @@ type LocalDisk_RuntimeGuestOsFeature struct { func (x *LocalDisk_RuntimeGuestOsFeature) Reset() { *x = LocalDisk_RuntimeGuestOsFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalDisk_RuntimeGuestOsFeature) String() string { @@ -1770,7 +1746,7 @@ func (*LocalDisk_RuntimeGuestOsFeature) ProtoMessage() {} func (x *LocalDisk_RuntimeGuestOsFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1802,11 +1778,9 @@ type VirtualMachineConfig_BootImage struct { func (x *VirtualMachineConfig_BootImage) Reset() { *x = VirtualMachineConfig_BootImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VirtualMachineConfig_BootImage) String() string { @@ -1817,7 +1791,7 @@ func (*VirtualMachineConfig_BootImage) ProtoMessage() {} func (x *VirtualMachineConfig_BootImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_runtime_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2318,164 +2292,6 @@ func file_google_cloud_notebooks_v1_runtime_proto_init() { return } file_google_cloud_notebooks_v1_environment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Runtime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeAcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LocalDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LocalDiskInitializeParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeAccessConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeSoftwareConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RuntimeShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VirtualMachine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VirtualMachineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LocalDisk_RuntimeGuestOsFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_runtime_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*VirtualMachineConfig_BootImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1_runtime_proto_msgTypes[0].OneofWrappers = []any{ (*Runtime_VirtualMachine)(nil), } diff --git a/notebooks/apiv1/notebookspb/schedule.pb.go b/notebooks/apiv1/notebookspb/schedule.pb.go index 6681f72a3c39..0bdb97bf700f 100755 --- a/notebooks/apiv1/notebookspb/schedule.pb.go +++ b/notebooks/apiv1/notebookspb/schedule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/schedule.proto @@ -154,11 +154,9 @@ type Schedule struct { func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_schedule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -169,7 +167,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_schedule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,20 +366,6 @@ func file_google_cloud_notebooks_v1_schedule_proto_init() { return } file_google_cloud_notebooks_v1_execution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_schedule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1/notebookspb/service.pb.go b/notebooks/apiv1/notebookspb/service.pb.go index 2822b5d824ba..5c42192a925d 100755 --- a/notebooks/apiv1/notebookspb/service.pb.go +++ b/notebooks/apiv1/notebookspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1/service.proto @@ -200,11 +200,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -215,7 +213,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +302,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -319,7 +315,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +370,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -389,7 +383,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,11 +432,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -453,7 +445,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +484,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -507,7 +497,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +551,9 @@ type RegisterInstanceRequest struct { func (x *RegisterInstanceRequest) Reset() { *x = RegisterInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterInstanceRequest) String() string { @@ -576,7 +564,7 @@ func (*RegisterInstanceRequest) ProtoMessage() {} func (x *RegisterInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +613,9 @@ type SetInstanceAcceleratorRequest struct { func (x *SetInstanceAcceleratorRequest) Reset() { *x = SetInstanceAcceleratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceAcceleratorRequest) String() string { @@ -640,7 +626,7 @@ func (*SetInstanceAcceleratorRequest) ProtoMessage() {} func (x *SetInstanceAcceleratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +678,9 @@ type SetInstanceMachineTypeRequest struct { func (x *SetInstanceMachineTypeRequest) Reset() { *x = SetInstanceMachineTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceMachineTypeRequest) String() string { @@ -707,7 +691,7 @@ func (*SetInstanceMachineTypeRequest) ProtoMessage() {} func (x *SetInstanceMachineTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +735,9 @@ type UpdateInstanceConfigRequest struct { func (x *UpdateInstanceConfigRequest) Reset() { *x = UpdateInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceConfigRequest) String() string { @@ -766,7 +748,7 @@ func (*UpdateInstanceConfigRequest) ProtoMessage() {} func (x *UpdateInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +793,9 @@ type SetInstanceLabelsRequest struct { func (x *SetInstanceLabelsRequest) Reset() { *x = SetInstanceLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceLabelsRequest) String() string { @@ -826,7 +806,7 @@ func (*SetInstanceLabelsRequest) ProtoMessage() {} func (x *SetInstanceLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +850,9 @@ type UpdateInstanceMetadataItemsRequest struct { func (x *UpdateInstanceMetadataItemsRequest) Reset() { *x = UpdateInstanceMetadataItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceMetadataItemsRequest) String() string { @@ -885,7 +863,7 @@ func (*UpdateInstanceMetadataItemsRequest) ProtoMessage() {} func (x *UpdateInstanceMetadataItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -926,11 +904,9 @@ type UpdateInstanceMetadataItemsResponse struct { func (x *UpdateInstanceMetadataItemsResponse) Reset() { *x = UpdateInstanceMetadataItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceMetadataItemsResponse) String() string { @@ -941,7 +917,7 @@ func (*UpdateInstanceMetadataItemsResponse) ProtoMessage() {} func (x *UpdateInstanceMetadataItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -979,11 +955,9 @@ type UpdateShieldedInstanceConfigRequest struct { func (x *UpdateShieldedInstanceConfigRequest) Reset() { *x = UpdateShieldedInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateShieldedInstanceConfigRequest) String() string { @@ -994,7 +968,7 @@ func (*UpdateShieldedInstanceConfigRequest) ProtoMessage() {} func (x *UpdateShieldedInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1010,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1051,7 +1023,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,11 +1058,9 @@ type StartInstanceRequest struct { func (x *StartInstanceRequest) Reset() { *x = StartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceRequest) String() string { @@ -1101,7 +1071,7 @@ func (*StartInstanceRequest) ProtoMessage() {} func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1106,9 @@ type StopInstanceRequest struct { func (x *StopInstanceRequest) Reset() { *x = StopInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceRequest) String() string { @@ -1151,7 +1119,7 @@ func (*StopInstanceRequest) ProtoMessage() {} func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1154,9 @@ type ResetInstanceRequest struct { func (x *ResetInstanceRequest) Reset() { *x = ResetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceRequest) String() string { @@ -1201,7 +1167,7 @@ func (*ResetInstanceRequest) ProtoMessage() {} func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,11 +1208,9 @@ type ReportInstanceInfoRequest struct { func (x *ReportInstanceInfoRequest) Reset() { *x = ReportInstanceInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportInstanceInfoRequest) String() string { @@ -1257,7 +1221,7 @@ func (*ReportInstanceInfoRequest) ProtoMessage() {} func (x *ReportInstanceInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1309,11 +1273,9 @@ type IsInstanceUpgradeableRequest struct { func (x *IsInstanceUpgradeableRequest) Reset() { *x = IsInstanceUpgradeableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsInstanceUpgradeableRequest) String() string { @@ -1324,7 +1286,7 @@ func (*IsInstanceUpgradeableRequest) ProtoMessage() {} func (x *IsInstanceUpgradeableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,11 +1336,9 @@ type IsInstanceUpgradeableResponse struct { func (x *IsInstanceUpgradeableResponse) Reset() { *x = IsInstanceUpgradeableResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsInstanceUpgradeableResponse) String() string { @@ -1389,7 +1349,7 @@ func (*IsInstanceUpgradeableResponse) ProtoMessage() {} func (x *IsInstanceUpgradeableResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,11 +1405,9 @@ type GetInstanceHealthRequest struct { func (x *GetInstanceHealthRequest) Reset() { *x = GetInstanceHealthRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceHealthRequest) String() string { @@ -1460,7 +1418,7 @@ func (*GetInstanceHealthRequest) ProtoMessage() {} func (x *GetInstanceHealthRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1463,9 @@ type GetInstanceHealthResponse struct { func (x *GetInstanceHealthResponse) Reset() { *x = GetInstanceHealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceHealthResponse) String() string { @@ -1520,7 +1476,7 @@ func (*GetInstanceHealthResponse) ProtoMessage() {} func (x *GetInstanceHealthResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,11 +1521,9 @@ type UpgradeInstanceRequest struct { func (x *UpgradeInstanceRequest) Reset() { *x = UpgradeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceRequest) String() string { @@ -1580,7 +1534,7 @@ func (*UpgradeInstanceRequest) ProtoMessage() {} func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1625,11 +1579,9 @@ type RollbackInstanceRequest struct { func (x *RollbackInstanceRequest) Reset() { *x = RollbackInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackInstanceRequest) String() string { @@ -1640,7 +1592,7 @@ func (*RollbackInstanceRequest) ProtoMessage() {} func (x *RollbackInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1688,11 +1640,9 @@ type UpgradeInstanceInternalRequest struct { func (x *UpgradeInstanceInternalRequest) Reset() { *x = UpgradeInstanceInternalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceInternalRequest) String() string { @@ -1703,7 +1653,7 @@ func (*UpgradeInstanceInternalRequest) ProtoMessage() {} func (x *UpgradeInstanceInternalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,11 +1706,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -1771,7 +1719,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,11 +1770,9 @@ type DiagnoseInstanceRequest struct { func (x *DiagnoseInstanceRequest) Reset() { *x = DiagnoseInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseInstanceRequest) String() string { @@ -1837,7 +1783,7 @@ func (*DiagnoseInstanceRequest) ProtoMessage() {} func (x *DiagnoseInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1883,11 +1829,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -1898,7 +1842,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1947,11 +1891,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -1962,7 +1904,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2003,11 +1945,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -2018,7 +1958,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2067,11 +2007,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -2082,7 +2020,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2126,11 +2064,9 @@ type ListSchedulesRequest struct { func (x *ListSchedulesRequest) Reset() { *x = ListSchedulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesRequest) String() string { @@ -2141,7 +2077,7 @@ func (*ListSchedulesRequest) ProtoMessage() {} func (x *ListSchedulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2211,11 +2147,9 @@ type ListSchedulesResponse struct { func (x *ListSchedulesResponse) Reset() { *x = ListSchedulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchedulesResponse) String() string { @@ -2226,7 +2160,7 @@ func (*ListSchedulesResponse) ProtoMessage() {} func (x *ListSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2275,11 +2209,9 @@ type GetScheduleRequest struct { func (x *GetScheduleRequest) Reset() { *x = GetScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScheduleRequest) String() string { @@ -2290,7 +2222,7 @@ func (*GetScheduleRequest) ProtoMessage() {} func (x *GetScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2325,11 +2257,9 @@ type DeleteScheduleRequest struct { func (x *DeleteScheduleRequest) Reset() { *x = DeleteScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteScheduleRequest) String() string { @@ -2340,7 +2270,7 @@ func (*DeleteScheduleRequest) ProtoMessage() {} func (x *DeleteScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2379,11 +2309,9 @@ type CreateScheduleRequest struct { func (x *CreateScheduleRequest) Reset() { *x = CreateScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateScheduleRequest) String() string { @@ -2394,7 +2322,7 @@ func (*CreateScheduleRequest) ProtoMessage() {} func (x *CreateScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2443,11 +2371,9 @@ type TriggerScheduleRequest struct { func (x *TriggerScheduleRequest) Reset() { *x = TriggerScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TriggerScheduleRequest) String() string { @@ -2458,7 +2384,7 @@ func (*TriggerScheduleRequest) ProtoMessage() {} func (x *TriggerScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2504,11 +2430,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -2519,7 +2443,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2589,11 +2513,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -2604,7 +2526,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2653,11 +2575,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -2668,7 +2588,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2703,11 +2623,9 @@ type DeleteExecutionRequest struct { func (x *DeleteExecutionRequest) Reset() { *x = DeleteExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExecutionRequest) String() string { @@ -2718,7 +2636,7 @@ func (*DeleteExecutionRequest) ProtoMessage() {} func (x *DeleteExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2757,11 +2675,9 @@ type CreateExecutionRequest struct { func (x *CreateExecutionRequest) Reset() { *x = CreateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExecutionRequest) String() string { @@ -2772,7 +2688,7 @@ func (*CreateExecutionRequest) ProtoMessage() {} func (x *CreateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3878,512 +3794,6 @@ func file_google_cloud_notebooks_v1_service_proto_init() { file_google_cloud_notebooks_v1_instance_proto_init() file_google_cloud_notebooks_v1_instance_config_proto_init() file_google_cloud_notebooks_v1_schedule_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RegisterInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceAcceleratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceMachineTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceMetadataItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceMetadataItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateShieldedInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReportInstanceInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*IsInstanceUpgradeableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*IsInstanceUpgradeableResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceHealthRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceHealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RollbackInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceInternalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListSchedulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CreateScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*TriggerScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*CreateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv1beta1/helpers.go b/notebooks/apiv1beta1/helpers.go index 49ccae67c07b..e0f25a02b66e 100755 --- a/notebooks/apiv1beta1/helpers.go +++ b/notebooks/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package notebooks import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "notebooks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/notebooks/apiv1beta1/notebook_client.go b/notebooks/apiv1beta1/notebook_client.go index b4da311b79c5..8673b4b28991 100755 --- a/notebooks/apiv1beta1/notebook_client.go +++ b/notebooks/apiv1beta1/notebook_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" notebookspb "cloud.google.com/go/notebooks/apiv1beta1/notebookspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -601,6 +600,8 @@ type notebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotebookClient creates a new notebook service client based on gRPC. @@ -627,6 +628,7 @@ func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*Noteb connPool: connPool, notebookClient: notebookspb.NewNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -692,6 +694,8 @@ type notebookRESTClient struct { // Points back to the CallOptions field of the containing NotebookClient CallOptions **NotebookCallOptions + + logger *slog.Logger } // NewNotebookRESTClient creates a new notebook service rest client. @@ -709,6 +713,7 @@ func NewNotebookRESTClient(ctx context.Context, opts ...option.ClientOption) (*N endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -782,7 +787,7 @@ func (c *notebookGRPCClient) ListInstances(ctx context.Context, req *notebookspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -817,7 +822,7 @@ func (c *notebookGRPCClient) GetInstance(ctx context.Context, req *notebookspb.G var resp *notebookspb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -835,7 +840,7 @@ func (c *notebookGRPCClient) CreateInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -855,7 +860,7 @@ func (c *notebookGRPCClient) RegisterInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.RegisterInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.RegisterInstance, req, settings.GRPC, c.logger, "RegisterInstance") return err }, opts...) if err != nil { @@ -875,7 +880,7 @@ func (c *notebookGRPCClient) SetInstanceAccelerator(ctx context.Context, req *no var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceAccelerator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceAccelerator, req, settings.GRPC, c.logger, "SetInstanceAccelerator") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *notebookGRPCClient) SetInstanceMachineType(ctx context.Context, req *no var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceMachineType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceMachineType, req, settings.GRPC, c.logger, "SetInstanceMachineType") return err }, opts...) if err != nil { @@ -915,7 +920,7 @@ func (c *notebookGRPCClient) SetInstanceLabels(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.SetInstanceLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.SetInstanceLabels, req, settings.GRPC, c.logger, "SetInstanceLabels") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *notebookGRPCClient) DeleteInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -955,7 +960,7 @@ func (c *notebookGRPCClient) StartInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StartInstance, req, settings.GRPC, c.logger, "StartInstance") return err }, opts...) if err != nil { @@ -975,7 +980,7 @@ func (c *notebookGRPCClient) StopInstance(ctx context.Context, req *notebookspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StopInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StopInstance, req, settings.GRPC, c.logger, "StopInstance") return err }, opts...) if err != nil { @@ -995,7 +1000,7 @@ func (c *notebookGRPCClient) ResetInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ResetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ResetInstance, req, settings.GRPC, c.logger, "ResetInstance") return err }, opts...) if err != nil { @@ -1015,7 +1020,7 @@ func (c *notebookGRPCClient) ReportInstanceInfo(ctx context.Context, req *notebo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ReportInstanceInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ReportInstanceInfo, req, settings.GRPC, c.logger, "ReportInstanceInfo") return err }, opts...) if err != nil { @@ -1035,7 +1040,7 @@ func (c *notebookGRPCClient) IsInstanceUpgradeable(ctx context.Context, req *not var resp *notebookspb.IsInstanceUpgradeableResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.IsInstanceUpgradeable(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.IsInstanceUpgradeable, req, settings.GRPC, c.logger, "IsInstanceUpgradeable") return err }, opts...) if err != nil { @@ -1053,7 +1058,7 @@ func (c *notebookGRPCClient) UpgradeInstance(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeInstance, req, settings.GRPC, c.logger, "UpgradeInstance") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *notebookGRPCClient) UpgradeInstanceInternal(ctx context.Context, req *n var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeInstanceInternal(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeInstanceInternal, req, settings.GRPC, c.logger, "UpgradeInstanceInternal") return err }, opts...) if err != nil { @@ -1104,7 +1109,7 @@ func (c *notebookGRPCClient) ListEnvironments(ctx context.Context, req *notebook } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -1139,7 +1144,7 @@ func (c *notebookGRPCClient) GetEnvironment(ctx context.Context, req *notebooksp var resp *notebookspb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -1157,7 +1162,7 @@ func (c *notebookGRPCClient) CreateEnvironment(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -1177,7 +1182,7 @@ func (c *notebookGRPCClient) DeleteEnvironment(ctx context.Context, req *noteboo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) if err != nil { @@ -1197,7 +1202,7 @@ func (c *notebookGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1226,7 +1231,7 @@ func (c *notebookGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1261,7 +1266,7 @@ func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1279,7 +1284,7 @@ func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1297,7 +1302,7 @@ func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1314,7 +1319,7 @@ func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1328,7 +1333,7 @@ func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1343,7 +1348,7 @@ func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1443,21 +1448,10 @@ func (c *notebookRESTClient) ListInstances(ctx context.Context, req *notebookspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1520,17 +1514,7 @@ func (c *notebookRESTClient) GetInstance(ctx context.Context, req *notebookspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1587,21 +1571,10 @@ func (c *notebookRESTClient) CreateInstance(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1660,21 +1633,10 @@ func (c *notebookRESTClient) RegisterInstance(ctx context.Context, req *notebook httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RegisterInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1730,21 +1692,10 @@ func (c *notebookRESTClient) SetInstanceAccelerator(ctx context.Context, req *no httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInstanceAccelerator") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1800,21 +1751,10 @@ func (c *notebookRESTClient) SetInstanceMachineType(ctx context.Context, req *no httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInstanceMachineType") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1870,21 +1810,10 @@ func (c *notebookRESTClient) SetInstanceLabels(ctx context.Context, req *noteboo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInstanceLabels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1934,21 +1863,10 @@ func (c *notebookRESTClient) DeleteInstance(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2004,21 +1922,10 @@ func (c *notebookRESTClient) StartInstance(ctx context.Context, req *notebookspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2074,21 +1981,10 @@ func (c *notebookRESTClient) StopInstance(ctx context.Context, req *notebookspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2144,21 +2040,10 @@ func (c *notebookRESTClient) ResetInstance(ctx context.Context, req *notebookspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2217,21 +2102,10 @@ func (c *notebookRESTClient) ReportInstanceInfo(ctx context.Context, req *notebo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReportInstanceInfo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2285,17 +2159,7 @@ func (c *notebookRESTClient) IsInstanceUpgradeable(ctx context.Context, req *not httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "IsInstanceUpgradeable") if err != nil { return err } @@ -2353,21 +2217,10 @@ func (c *notebookRESTClient) UpgradeInstance(ctx context.Context, req *notebooks httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2427,21 +2280,10 @@ func (c *notebookRESTClient) UpgradeInstanceInternal(ctx context.Context, req *n httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeInstanceInternal") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2504,21 +2346,10 @@ func (c *notebookRESTClient) ListEnvironments(ctx context.Context, req *notebook } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2581,17 +2412,7 @@ func (c *notebookRESTClient) GetEnvironment(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -2648,21 +2469,10 @@ func (c *notebookRESTClient) CreateEnvironment(ctx context.Context, req *noteboo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2712,21 +2522,10 @@ func (c *notebookRESTClient) DeleteEnvironment(ctx context.Context, req *noteboo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2777,17 +2576,7 @@ func (c *notebookRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2852,21 +2641,10 @@ func (c *notebookRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2933,17 +2711,7 @@ func (c *notebookRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3003,17 +2771,7 @@ func (c *notebookRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3075,17 +2833,7 @@ func (c *notebookRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3138,15 +2886,8 @@ func (c *notebookRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3180,15 +2921,8 @@ func (c *notebookRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3225,17 +2959,7 @@ func (c *notebookRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3300,21 +3024,10 @@ func (c *notebookRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/notebooks/apiv1beta1/notebook_client_example_go123_test.go b/notebooks/apiv1beta1/notebook_client_example_go123_test.go index a3dfe3bbd15c..1ca037106763 100644 --- a/notebooks/apiv1beta1/notebook_client_example_go123_test.go +++ b/notebooks/apiv1beta1/notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleNotebookClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleNotebookClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/notebooks/apiv1beta1/notebookspb/environment.pb.go b/notebooks/apiv1beta1/notebookspb/environment.pb.go index 7c6ed48f78e8..2561c5d3d956 100755 --- a/notebooks/apiv1beta1/notebookspb/environment.pb.go +++ b/notebooks/apiv1beta1/notebookspb/environment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1beta1/environment.proto @@ -69,11 +69,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -84,7 +82,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type VmImage struct { func (x *VmImage) Reset() { *x = VmImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmImage) String() string { @@ -209,7 +205,7 @@ func (*VmImage) ProtoMessage() {} func (x *VmImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +284,9 @@ type ContainerImage struct { func (x *ContainerImage) Reset() { *x = ContainerImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerImage) String() string { @@ -303,7 +297,7 @@ func (*ContainerImage) ProtoMessage() {} func (x *ContainerImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,44 +435,6 @@ func file_google_cloud_notebooks_v1beta1_environment_proto_init() { if File_google_cloud_notebooks_v1beta1_environment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VmImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContainerImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1beta1_environment_proto_msgTypes[0].OneofWrappers = []any{ (*Environment_VmImage)(nil), (*Environment_ContainerImage)(nil), diff --git a/notebooks/apiv1beta1/notebookspb/instance.pb.go b/notebooks/apiv1beta1/notebookspb/instance.pb.go index ad9054f4be3d..0981b751a6d8 100755 --- a/notebooks/apiv1beta1/notebookspb/instance.pb.go +++ b/notebooks/apiv1beta1/notebookspb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1beta1/instance.proto @@ -451,11 +451,9 @@ type ReservationAffinity struct { func (x *ReservationAffinity) Reset() { *x = ReservationAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationAffinity) String() string { @@ -466,7 +464,7 @@ func (*ReservationAffinity) ProtoMessage() {} func (x *ReservationAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +618,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -635,7 +631,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +898,9 @@ type Instance_AcceleratorConfig struct { func (x *Instance_AcceleratorConfig) Reset() { *x = Instance_AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_AcceleratorConfig) String() string { @@ -917,7 +911,7 @@ func (*Instance_AcceleratorConfig) ProtoMessage() {} func (x *Instance_AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1235,44 +1229,6 @@ func file_google_cloud_notebooks_v1beta1_instance_proto_init() { return } file_google_cloud_notebooks_v1beta1_environment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReservationAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Instance_AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v1beta1_instance_proto_msgTypes[1].OneofWrappers = []any{ (*Instance_VmImage)(nil), (*Instance_ContainerImage)(nil), diff --git a/notebooks/apiv1beta1/notebookspb/service.pb.go b/notebooks/apiv1beta1/notebookspb/service.pb.go index 28927dc70d8d..2ded024be9e4 100755 --- a/notebooks/apiv1beta1/notebookspb/service.pb.go +++ b/notebooks/apiv1beta1/notebookspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v1beta1/service.proto @@ -71,11 +71,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -86,7 +84,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -190,7 +186,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +241,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -260,7 +254,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -324,7 +316,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +355,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -378,7 +368,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type RegisterInstanceRequest struct { func (x *RegisterInstanceRequest) Reset() { *x = RegisterInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterInstanceRequest) String() string { @@ -447,7 +435,7 @@ func (*RegisterInstanceRequest) ProtoMessage() {} func (x *RegisterInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +484,9 @@ type SetInstanceAcceleratorRequest struct { func (x *SetInstanceAcceleratorRequest) Reset() { *x = SetInstanceAcceleratorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceAcceleratorRequest) String() string { @@ -511,7 +497,7 @@ func (*SetInstanceAcceleratorRequest) ProtoMessage() {} func (x *SetInstanceAcceleratorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +549,9 @@ type SetInstanceMachineTypeRequest struct { func (x *SetInstanceMachineTypeRequest) Reset() { *x = SetInstanceMachineTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceMachineTypeRequest) String() string { @@ -578,7 +562,7 @@ func (*SetInstanceMachineTypeRequest) ProtoMessage() {} func (x *SetInstanceMachineTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +607,9 @@ type SetInstanceLabelsRequest struct { func (x *SetInstanceLabelsRequest) Reset() { *x = SetInstanceLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInstanceLabelsRequest) String() string { @@ -638,7 +620,7 @@ func (*SetInstanceLabelsRequest) ProtoMessage() {} func (x *SetInstanceLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +662,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -695,7 +675,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +710,9 @@ type StartInstanceRequest struct { func (x *StartInstanceRequest) Reset() { *x = StartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceRequest) String() string { @@ -745,7 +723,7 @@ func (*StartInstanceRequest) ProtoMessage() {} func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +758,9 @@ type StopInstanceRequest struct { func (x *StopInstanceRequest) Reset() { *x = StopInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceRequest) String() string { @@ -795,7 +771,7 @@ func (*StopInstanceRequest) ProtoMessage() {} func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,11 +806,9 @@ type ResetInstanceRequest struct { func (x *ResetInstanceRequest) Reset() { *x = ResetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceRequest) String() string { @@ -845,7 +819,7 @@ func (*ResetInstanceRequest) ProtoMessage() {} func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +860,9 @@ type ReportInstanceInfoRequest struct { func (x *ReportInstanceInfoRequest) Reset() { *x = ReportInstanceInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportInstanceInfoRequest) String() string { @@ -901,7 +873,7 @@ func (*ReportInstanceInfoRequest) ProtoMessage() {} func (x *ReportInstanceInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +922,9 @@ type IsInstanceUpgradeableRequest struct { func (x *IsInstanceUpgradeableRequest) Reset() { *x = IsInstanceUpgradeableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsInstanceUpgradeableRequest) String() string { @@ -965,7 +935,7 @@ func (*IsInstanceUpgradeableRequest) ProtoMessage() {} func (x *IsInstanceUpgradeableRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +978,9 @@ type IsInstanceUpgradeableResponse struct { func (x *IsInstanceUpgradeableResponse) Reset() { *x = IsInstanceUpgradeableResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsInstanceUpgradeableResponse) String() string { @@ -1023,7 +991,7 @@ func (*IsInstanceUpgradeableResponse) ProtoMessage() {} func (x *IsInstanceUpgradeableResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1047,9 @@ type UpgradeInstanceRequest struct { func (x *UpgradeInstanceRequest) Reset() { *x = UpgradeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceRequest) String() string { @@ -1094,7 +1060,7 @@ func (*UpgradeInstanceRequest) ProtoMessage() {} func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1098,9 @@ type UpgradeInstanceInternalRequest struct { func (x *UpgradeInstanceInternalRequest) Reset() { *x = UpgradeInstanceInternalRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceInternalRequest) String() string { @@ -1147,7 +1111,7 @@ func (*UpgradeInstanceInternalRequest) ProtoMessage() {} func (x *UpgradeInstanceInternalRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1157,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -1208,7 +1170,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,11 +1223,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -1276,7 +1236,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1325,11 +1285,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -1340,7 +1298,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1381,11 +1339,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -1396,7 +1352,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,11 +1401,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -1460,7 +1414,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2064,284 +2018,6 @@ func file_google_cloud_notebooks_v1beta1_service_proto_init() { } file_google_cloud_notebooks_v1beta1_environment_proto_init() file_google_cloud_notebooks_v1beta1_instance_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RegisterInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceAcceleratorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceMachineTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SetInstanceLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReportInstanceInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*IsInstanceUpgradeableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*IsInstanceUpgradeableResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceInternalRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v1beta1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv2/helpers.go b/notebooks/apiv2/helpers.go index 49ccae67c07b..e0f25a02b66e 100755 --- a/notebooks/apiv2/helpers.go +++ b/notebooks/apiv2/helpers.go @@ -18,10 +18,20 @@ package notebooks import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "notebooks.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/notebooks/apiv2/notebook_client.go b/notebooks/apiv2/notebook_client.go index dfe593839a6c..c677b5f46120 100755 --- a/notebooks/apiv2/notebook_client.go +++ b/notebooks/apiv2/notebook_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -534,6 +533,8 @@ type notebookGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotebookClient creates a new notebook service client based on gRPC. @@ -560,6 +561,7 @@ func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*Noteb connPool: connPool, notebookClient: notebookspb.NewNotebookServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -625,6 +627,8 @@ type notebookRESTClient struct { // Points back to the CallOptions field of the containing NotebookClient CallOptions **NotebookCallOptions + + logger *slog.Logger } // NewNotebookRESTClient creates a new notebook service rest client. @@ -642,6 +646,7 @@ func NewNotebookRESTClient(ctx context.Context, opts ...option.ClientOption) (*N endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -715,7 +720,7 @@ func (c *notebookGRPCClient) ListInstances(ctx context.Context, req *notebookspb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -750,7 +755,7 @@ func (c *notebookGRPCClient) GetInstance(ctx context.Context, req *notebookspb.G var resp *notebookspb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *notebookGRPCClient) CreateInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *notebookGRPCClient) UpdateInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -808,7 +813,7 @@ func (c *notebookGRPCClient) DeleteInstance(ctx context.Context, req *notebooksp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -828,7 +833,7 @@ func (c *notebookGRPCClient) StartInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StartInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StartInstance, req, settings.GRPC, c.logger, "StartInstance") return err }, opts...) if err != nil { @@ -848,7 +853,7 @@ func (c *notebookGRPCClient) StopInstance(ctx context.Context, req *notebookspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.StopInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.StopInstance, req, settings.GRPC, c.logger, "StopInstance") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *notebookGRPCClient) ResetInstance(ctx context.Context, req *notebookspb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.ResetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.ResetInstance, req, settings.GRPC, c.logger, "ResetInstance") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *notebookGRPCClient) CheckInstanceUpgradability(ctx context.Context, req var resp *notebookspb.CheckInstanceUpgradabilityResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.CheckInstanceUpgradability(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.CheckInstanceUpgradability, req, settings.GRPC, c.logger, "CheckInstanceUpgradability") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *notebookGRPCClient) UpgradeInstance(ctx context.Context, req *notebooks var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.UpgradeInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.UpgradeInstance, req, settings.GRPC, c.logger, "UpgradeInstance") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *notebookGRPCClient) RollbackInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.RollbackInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.RollbackInstance, req, settings.GRPC, c.logger, "RollbackInstance") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *notebookGRPCClient) DiagnoseInstance(ctx context.Context, req *notebook var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notebookClient.DiagnoseInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notebookClient.DiagnoseInstance, req, settings.GRPC, c.logger, "DiagnoseInstance") return err }, opts...) if err != nil { @@ -966,7 +971,7 @@ func (c *notebookGRPCClient) GetLocation(ctx context.Context, req *locationpb.Ge var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -995,7 +1000,7 @@ func (c *notebookGRPCClient) ListLocations(ctx context.Context, req *locationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1030,7 +1035,7 @@ func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1048,7 +1053,7 @@ func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1066,7 +1071,7 @@ func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1097,7 +1102,7 @@ func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1112,7 +1117,7 @@ func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1141,7 +1146,7 @@ func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1218,21 +1223,10 @@ func (c *notebookRESTClient) ListInstances(ctx context.Context, req *notebookspb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1295,17 +1289,7 @@ func (c *notebookRESTClient) GetInstance(ctx context.Context, req *notebookspb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1365,21 +1349,10 @@ func (c *notebookRESTClient) CreateInstance(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1446,21 +1419,10 @@ func (c *notebookRESTClient) UpdateInstance(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1513,21 +1475,10 @@ func (c *notebookRESTClient) DeleteInstance(ctx context.Context, req *notebooksp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1583,21 +1534,10 @@ func (c *notebookRESTClient) StartInstance(ctx context.Context, req *notebookspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1653,21 +1593,10 @@ func (c *notebookRESTClient) StopInstance(ctx context.Context, req *notebookspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1723,21 +1652,10 @@ func (c *notebookRESTClient) ResetInstance(ctx context.Context, req *notebookspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1788,17 +1706,7 @@ func (c *notebookRESTClient) CheckInstanceUpgradability(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CheckInstanceUpgradability") if err != nil { return err } @@ -1853,21 +1761,10 @@ func (c *notebookRESTClient) UpgradeInstance(ctx context.Context, req *notebooks httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1923,21 +1820,10 @@ func (c *notebookRESTClient) RollbackInstance(ctx context.Context, req *notebook httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1993,21 +1879,10 @@ func (c *notebookRESTClient) DiagnoseInstance(ctx context.Context, req *notebook httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiagnoseInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2058,17 +1933,7 @@ func (c *notebookRESTClient) GetLocation(ctx context.Context, req *locationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2133,21 +1998,10 @@ func (c *notebookRESTClient) ListLocations(ctx context.Context, req *locationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2214,17 +2068,7 @@ func (c *notebookRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2284,17 +2128,7 @@ func (c *notebookRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2356,17 +2190,7 @@ func (c *notebookRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2419,15 +2243,8 @@ func (c *notebookRESTClient) CancelOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2461,15 +2278,8 @@ func (c *notebookRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2506,17 +2316,7 @@ func (c *notebookRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2581,21 +2381,10 @@ func (c *notebookRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/notebooks/apiv2/notebook_client_example_go123_test.go b/notebooks/apiv2/notebook_client_example_go123_test.go index bbb2acb9bded..307349ab6c81 100644 --- a/notebooks/apiv2/notebook_client_example_go123_test.go +++ b/notebooks/apiv2/notebook_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleNotebookClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleNotebookClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleNotebookClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/notebooks/apiv2/notebookspb/diagnostic_config.pb.go b/notebooks/apiv2/notebookspb/diagnostic_config.pb.go index 5d2e38682fa6..8d191931364f 100755 --- a/notebooks/apiv2/notebookspb/diagnostic_config.pb.go +++ b/notebooks/apiv2/notebookspb/diagnostic_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v2/diagnostic_config.proto @@ -73,11 +73,9 @@ type DiagnosticConfig struct { func (x *DiagnosticConfig) Reset() { *x = DiagnosticConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnosticConfig) String() string { @@ -88,7 +86,7 @@ func (*DiagnosticConfig) ProtoMessage() {} func (x *DiagnosticConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,20 +209,6 @@ func file_google_cloud_notebooks_v2_diagnostic_config_proto_init() { if File_google_cloud_notebooks_v2_diagnostic_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DiagnosticConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv2/notebookspb/event.pb.go b/notebooks/apiv2/notebookspb/event.pb.go index 4c1d00d0e200..67ca11f0a284 100755 --- a/notebooks/apiv2/notebookspb/event.pb.go +++ b/notebooks/apiv2/notebookspb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v2/event.proto @@ -126,11 +126,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -141,7 +139,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,20 +262,6 @@ func file_google_cloud_notebooks_v2_event_proto_init() { if File_google_cloud_notebooks_v2_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v2_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/notebooks/apiv2/notebookspb/gce_setup.pb.go b/notebooks/apiv2/notebookspb/gce_setup.pb.go index b03a27ef44dc..45283293d81a 100755 --- a/notebooks/apiv2/notebookspb/gce_setup.pb.go +++ b/notebooks/apiv2/notebookspb/gce_setup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v2/gce_setup.proto @@ -311,11 +311,9 @@ type NetworkInterface struct { func (x *NetworkInterface) Reset() { *x = NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkInterface) String() string { @@ -326,7 +324,7 @@ func (*NetworkInterface) ProtoMessage() {} func (x *NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +381,9 @@ type VmImage struct { func (x *VmImage) Reset() { *x = VmImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmImage) String() string { @@ -398,7 +394,7 @@ func (*VmImage) ProtoMessage() {} func (x *VmImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,11 +473,9 @@ type ContainerImage struct { func (x *ContainerImage) Reset() { *x = ContainerImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerImage) String() string { @@ -492,7 +486,7 @@ func (*ContainerImage) ProtoMessage() {} func (x *ContainerImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +534,9 @@ type AcceleratorConfig struct { func (x *AcceleratorConfig) Reset() { *x = AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorConfig) String() string { @@ -555,7 +547,7 @@ func (*AcceleratorConfig) ProtoMessage() {} func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +605,9 @@ type ShieldedInstanceConfig struct { func (x *ShieldedInstanceConfig) Reset() { *x = ShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShieldedInstanceConfig) String() string { @@ -628,7 +618,7 @@ func (*ShieldedInstanceConfig) ProtoMessage() {} func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +672,9 @@ type GPUDriverConfig struct { func (x *GPUDriverConfig) Reset() { *x = GPUDriverConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GPUDriverConfig) String() string { @@ -697,7 +685,7 @@ func (*GPUDriverConfig) ProtoMessage() {} func (x *GPUDriverConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +738,9 @@ type DataDisk struct { func (x *DataDisk) Reset() { *x = DataDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataDisk) String() string { @@ -765,7 +751,7 @@ func (*DataDisk) ProtoMessage() {} func (x *DataDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +819,9 @@ type BootDisk struct { func (x *BootDisk) Reset() { *x = BootDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BootDisk) String() string { @@ -848,7 +832,7 @@ func (*BootDisk) ProtoMessage() {} func (x *BootDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -906,11 +890,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -921,7 +903,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +986,9 @@ type GceSetup struct { func (x *GceSetup) Reset() { *x = GceSetup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GceSetup) String() string { @@ -1019,7 +999,7 @@ func (*GceSetup) ProtoMessage() {} func (x *GceSetup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1431,128 +1411,6 @@ func file_google_cloud_notebooks_v2_gce_setup_proto_init() { if File_google_cloud_notebooks_v2_gce_setup_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VmImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContainerImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GPUDriverConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DataDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BootDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GceSetup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1].OneofWrappers = []any{ (*VmImage_Name)(nil), (*VmImage_Family)(nil), diff --git a/notebooks/apiv2/notebookspb/instance.pb.go b/notebooks/apiv2/notebookspb/instance.pb.go index f990f28ef7ba..fc6a9ecc813b 100755 --- a/notebooks/apiv2/notebookspb/instance.pb.go +++ b/notebooks/apiv2/notebookspb/instance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v2/instance.proto @@ -329,11 +329,9 @@ type UpgradeHistoryEntry struct { func (x *UpgradeHistoryEntry) Reset() { *x = UpgradeHistoryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeHistoryEntry) String() string { @@ -344,7 +342,7 @@ func (*UpgradeHistoryEntry) ProtoMessage() {} func (x *UpgradeHistoryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +480,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -497,7 +493,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,32 +833,6 @@ func file_google_cloud_notebooks_v2_instance_proto_init() { return } file_google_cloud_notebooks_v2_gce_setup_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v2_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeHistoryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_notebooks_v2_instance_proto_msgTypes[1].OneofWrappers = []any{ (*Instance_GceSetup)(nil), } diff --git a/notebooks/apiv2/notebookspb/service.pb.go b/notebooks/apiv2/notebookspb/service.pb.go index 99242e9e88d6..1cc49bc87e4c 100755 --- a/notebooks/apiv2/notebookspb/service.pb.go +++ b/notebooks/apiv2/notebookspb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/notebooks/v2/service.proto @@ -74,11 +74,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -89,7 +87,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +181,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -198,7 +194,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +263,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -282,7 +276,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +325,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -346,7 +338,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +379,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -402,7 +392,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +451,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -476,7 +464,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +515,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -542,7 +528,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +570,9 @@ type StartInstanceRequest struct { func (x *StartInstanceRequest) Reset() { *x = StartInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartInstanceRequest) String() string { @@ -599,7 +583,7 @@ func (*StartInstanceRequest) ProtoMessage() {} func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +618,9 @@ type StopInstanceRequest struct { func (x *StopInstanceRequest) Reset() { *x = StopInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopInstanceRequest) String() string { @@ -649,7 +631,7 @@ func (*StopInstanceRequest) ProtoMessage() {} func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -684,11 +666,9 @@ type ResetInstanceRequest struct { func (x *ResetInstanceRequest) Reset() { *x = ResetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetInstanceRequest) String() string { @@ -699,7 +679,7 @@ func (*ResetInstanceRequest) ProtoMessage() {} func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +714,9 @@ type CheckInstanceUpgradabilityRequest struct { func (x *CheckInstanceUpgradabilityRequest) Reset() { *x = CheckInstanceUpgradabilityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckInstanceUpgradabilityRequest) String() string { @@ -749,7 +727,7 @@ func (*CheckInstanceUpgradabilityRequest) ProtoMessage() {} func (x *CheckInstanceUpgradabilityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +770,9 @@ type CheckInstanceUpgradabilityResponse struct { func (x *CheckInstanceUpgradabilityResponse) Reset() { *x = CheckInstanceUpgradabilityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckInstanceUpgradabilityResponse) String() string { @@ -807,7 +783,7 @@ func (*CheckInstanceUpgradabilityResponse) ProtoMessage() {} func (x *CheckInstanceUpgradabilityResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +839,9 @@ type UpgradeInstanceRequest struct { func (x *UpgradeInstanceRequest) Reset() { *x = UpgradeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceRequest) String() string { @@ -878,7 +852,7 @@ func (*UpgradeInstanceRequest) ProtoMessage() {} func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +892,9 @@ type RollbackInstanceRequest struct { func (x *RollbackInstanceRequest) Reset() { *x = RollbackInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackInstanceRequest) String() string { @@ -933,7 +905,7 @@ func (*RollbackInstanceRequest) ProtoMessage() {} func (x *RollbackInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +958,9 @@ type DiagnoseInstanceRequest struct { func (x *DiagnoseInstanceRequest) Reset() { *x = DiagnoseInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiagnoseInstanceRequest) String() string { @@ -1001,7 +971,7 @@ func (*DiagnoseInstanceRequest) ProtoMessage() {} func (x *DiagnoseInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,188 +1432,6 @@ func file_google_cloud_notebooks_v2_service_proto_init() { } file_google_cloud_notebooks_v2_diagnostic_config_proto_init() file_google_cloud_notebooks_v2_instance_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_notebooks_v2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*StartInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StopInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ResetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CheckInstanceUpgradabilityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CheckInstanceUpgradabilityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RollbackInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_notebooks_v2_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DiagnoseInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/optimization/apiv1/fleet_routing_client.go b/optimization/apiv1/fleet_routing_client.go index 4433eadc9e82..553f16419b65 100755 --- a/optimization/apiv1/fleet_routing_client.go +++ b/optimization/apiv1/fleet_routing_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" optimizationpb "cloud.google.com/go/optimization/apiv1/optimizationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -265,6 +264,8 @@ type fleetRoutingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFleetRoutingClient creates a new fleet routing client based on gRPC. @@ -317,6 +318,7 @@ func NewFleetRoutingClient(ctx context.Context, opts ...option.ClientOption) (*F connPool: connPool, fleetRoutingClient: optimizationpb.NewFleetRoutingClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -380,6 +382,8 @@ type fleetRoutingRESTClient struct { // Points back to the CallOptions field of the containing FleetRoutingClient CallOptions **FleetRoutingCallOptions + + logger *slog.Logger } // NewFleetRoutingRESTClient creates a new fleet routing rest client. @@ -423,6 +427,7 @@ func NewFleetRoutingRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -485,7 +490,7 @@ func (c *fleetRoutingGRPCClient) OptimizeTours(ctx context.Context, req *optimiz var resp *optimizationpb.OptimizeToursResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fleetRoutingClient.OptimizeTours(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fleetRoutingClient.OptimizeTours, req, settings.GRPC, c.logger, "OptimizeTours") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *fleetRoutingGRPCClient) BatchOptimizeTours(ctx context.Context, req *op var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fleetRoutingClient.BatchOptimizeTours(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fleetRoutingClient.BatchOptimizeTours, req, settings.GRPC, c.logger, "BatchOptimizeTours") return err }, opts...) if err != nil { @@ -523,7 +528,7 @@ func (c *fleetRoutingGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -584,17 +589,7 @@ func (c *fleetRoutingRESTClient) OptimizeTours(ctx context.Context, req *optimiz httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "OptimizeTours") if err != nil { return err } @@ -658,21 +653,10 @@ func (c *fleetRoutingRESTClient) BatchOptimizeTours(ctx context.Context, req *op httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchOptimizeTours") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -723,17 +707,7 @@ func (c *fleetRoutingRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/optimization/apiv1/helpers.go b/optimization/apiv1/helpers.go index eb31589c68d6..58c095955c45 100755 --- a/optimization/apiv1/helpers.go +++ b/optimization/apiv1/helpers.go @@ -18,10 +18,20 @@ package optimization import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudoptimization.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/optimization/apiv1/optimizationpb/async_model.pb.go b/optimization/apiv1/optimizationpb/async_model.pb.go index 5311ca148a09..58ea2cc03db9 100755 --- a/optimization/apiv1/optimizationpb/async_model.pb.go +++ b/optimization/apiv1/optimizationpb/async_model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/optimization/v1/async_model.proto @@ -170,11 +170,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -185,7 +183,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +250,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -267,7 +263,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +322,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -341,7 +335,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -390,7 +382,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +423,9 @@ type AsyncModelMetadata struct { func (x *AsyncModelMetadata) Reset() { *x = AsyncModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncModelMetadata) String() string { @@ -446,7 +436,7 @@ func (*AsyncModelMetadata) ProtoMessage() {} func (x *AsyncModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_async_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,68 +600,6 @@ func file_google_cloud_optimization_v1_async_model_proto_init() { if File_google_cloud_optimization_v1_async_model_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_optimization_v1_async_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_async_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_async_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_async_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_async_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AsyncModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_optimization_v1_async_model_proto_msgTypes[0].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), } diff --git a/optimization/apiv1/optimizationpb/fleet_routing.pb.go b/optimization/apiv1/optimizationpb/fleet_routing.pb.go index 6e930ee05b00..7de001bb7927 100755 --- a/optimization/apiv1/optimizationpb/fleet_routing.pb.go +++ b/optimization/apiv1/optimizationpb/fleet_routing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/optimization/v1/fleet_routing.proto @@ -781,11 +781,9 @@ type OptimizeToursRequest struct { func (x *OptimizeToursRequest) Reset() { *x = OptimizeToursRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursRequest) String() string { @@ -796,7 +794,7 @@ func (*OptimizeToursRequest) ProtoMessage() {} func (x *OptimizeToursRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,11 +972,9 @@ type OptimizeToursResponse struct { func (x *OptimizeToursResponse) Reset() { *x = OptimizeToursResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursResponse) String() string { @@ -989,7 +985,7 @@ func (*OptimizeToursResponse) ProtoMessage() {} func (x *OptimizeToursResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1070,11 +1066,9 @@ type BatchOptimizeToursRequest struct { func (x *BatchOptimizeToursRequest) Reset() { *x = BatchOptimizeToursRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursRequest) String() string { @@ -1085,7 +1079,7 @@ func (*BatchOptimizeToursRequest) ProtoMessage() {} func (x *BatchOptimizeToursRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1124,11 +1118,9 @@ type BatchOptimizeToursResponse struct { func (x *BatchOptimizeToursResponse) Reset() { *x = BatchOptimizeToursResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursResponse) String() string { @@ -1139,7 +1131,7 @@ func (*BatchOptimizeToursResponse) ProtoMessage() {} func (x *BatchOptimizeToursResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1332,9 @@ type ShipmentModel struct { func (x *ShipmentModel) Reset() { *x = ShipmentModel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel) String() string { @@ -1355,7 +1345,7 @@ func (*ShipmentModel) ProtoMessage() {} func (x *ShipmentModel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1588,9 @@ type Shipment struct { func (x *Shipment) Reset() { *x = Shipment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment) String() string { @@ -1613,7 +1601,7 @@ func (*Shipment) ProtoMessage() {} func (x *Shipment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1744,11 +1732,9 @@ type ShipmentTypeIncompatibility struct { func (x *ShipmentTypeIncompatibility) Reset() { *x = ShipmentTypeIncompatibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentTypeIncompatibility) String() string { @@ -1759,7 +1745,7 @@ func (*ShipmentTypeIncompatibility) ProtoMessage() {} func (x *ShipmentTypeIncompatibility) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1811,11 +1797,9 @@ type ShipmentTypeRequirement struct { func (x *ShipmentTypeRequirement) Reset() { *x = ShipmentTypeRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentTypeRequirement) String() string { @@ -1826,7 +1810,7 @@ func (*ShipmentTypeRequirement) ProtoMessage() {} func (x *ShipmentTypeRequirement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1891,11 +1875,9 @@ type RouteModifiers struct { func (x *RouteModifiers) Reset() { *x = RouteModifiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RouteModifiers) String() string { @@ -1906,7 +1888,7 @@ func (*RouteModifiers) ProtoMessage() {} func (x *RouteModifiers) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2152,11 +2134,9 @@ type Vehicle struct { func (x *Vehicle) Reset() { *x = Vehicle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle) String() string { @@ -2167,7 +2147,7 @@ func (*Vehicle) ProtoMessage() {} func (x *Vehicle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2459,11 +2439,9 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeWindow) String() string { @@ -2474,7 +2452,7 @@ func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2547,11 +2525,9 @@ type CapacityQuantity struct { func (x *CapacityQuantity) Reset() { *x = CapacityQuantity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CapacityQuantity) String() string { @@ -2562,7 +2538,7 @@ func (*CapacityQuantity) ProtoMessage() {} func (x *CapacityQuantity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2608,11 +2584,9 @@ type CapacityQuantityInterval struct { func (x *CapacityQuantityInterval) Reset() { *x = CapacityQuantityInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CapacityQuantityInterval) String() string { @@ -2623,7 +2597,7 @@ func (*CapacityQuantityInterval) ProtoMessage() {} func (x *CapacityQuantityInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2704,11 +2678,9 @@ type DistanceLimit struct { func (x *DistanceLimit) Reset() { *x = DistanceLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DistanceLimit) String() string { @@ -2719,7 +2691,7 @@ func (*DistanceLimit) ProtoMessage() {} func (x *DistanceLimit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2814,11 +2786,9 @@ type TransitionAttributes struct { func (x *TransitionAttributes) Reset() { *x = TransitionAttributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitionAttributes) String() string { @@ -2829,7 +2799,7 @@ func (*TransitionAttributes) ProtoMessage() {} func (x *TransitionAttributes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2925,11 +2895,9 @@ type Waypoint struct { func (x *Waypoint) Reset() { *x = Waypoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Waypoint) String() string { @@ -2940,7 +2908,7 @@ func (*Waypoint) ProtoMessage() {} func (x *Waypoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3019,11 +2987,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -3034,7 +3000,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3087,11 +3053,9 @@ type BreakRule struct { func (x *BreakRule) Reset() { *x = BreakRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule) String() string { @@ -3102,7 +3066,7 @@ func (*BreakRule) ProtoMessage() {} func (x *BreakRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3336,11 +3300,9 @@ type ShipmentRoute struct { func (x *ShipmentRoute) Reset() { *x = ShipmentRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute) String() string { @@ -3351,7 +3313,7 @@ func (*ShipmentRoute) ProtoMessage() {} func (x *ShipmentRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3504,11 +3466,9 @@ type SkippedShipment struct { func (x *SkippedShipment) Reset() { *x = SkippedShipment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkippedShipment) String() string { @@ -3519,7 +3479,7 @@ func (*SkippedShipment) ProtoMessage() {} func (x *SkippedShipment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3614,11 +3574,9 @@ type AggregatedMetrics struct { func (x *AggregatedMetrics) Reset() { *x = AggregatedMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AggregatedMetrics) String() string { @@ -3629,7 +3587,7 @@ func (*AggregatedMetrics) ProtoMessage() {} func (x *AggregatedMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3745,11 +3703,9 @@ type InjectedSolutionConstraint struct { func (x *InjectedSolutionConstraint) Reset() { *x = InjectedSolutionConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint) String() string { @@ -3760,7 +3716,7 @@ func (*InjectedSolutionConstraint) ProtoMessage() {} func (x *InjectedSolutionConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4091,11 +4047,9 @@ type OptimizeToursValidationError struct { func (x *OptimizeToursValidationError) Reset() { *x = OptimizeToursValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursValidationError) String() string { @@ -4106,7 +4060,7 @@ func (*OptimizeToursValidationError) ProtoMessage() {} func (x *OptimizeToursValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4197,11 +4151,9 @@ type OptimizeToursResponse_Metrics struct { func (x *OptimizeToursResponse_Metrics) Reset() { *x = OptimizeToursResponse_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursResponse_Metrics) String() string { @@ -4212,7 +4164,7 @@ func (*OptimizeToursResponse_Metrics) ProtoMessage() {} func (x *OptimizeToursResponse_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4302,11 +4254,9 @@ type BatchOptimizeToursRequest_AsyncModelConfig struct { func (x *BatchOptimizeToursRequest_AsyncModelConfig) Reset() { *x = BatchOptimizeToursRequest_AsyncModelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOptimizeToursRequest_AsyncModelConfig) String() string { @@ -4317,7 +4267,7 @@ func (*BatchOptimizeToursRequest_AsyncModelConfig) ProtoMessage() {} func (x *BatchOptimizeToursRequest_AsyncModelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4385,11 +4335,9 @@ type ShipmentModel_DurationDistanceMatrix struct { func (x *ShipmentModel_DurationDistanceMatrix) Reset() { *x = ShipmentModel_DurationDistanceMatrix{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_DurationDistanceMatrix) String() string { @@ -4400,7 +4348,7 @@ func (*ShipmentModel_DurationDistanceMatrix) ProtoMessage() {} func (x *ShipmentModel_DurationDistanceMatrix) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4458,11 +4406,9 @@ type ShipmentModel_PrecedenceRule struct { func (x *ShipmentModel_PrecedenceRule) Reset() { *x = ShipmentModel_PrecedenceRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_PrecedenceRule) String() string { @@ -4473,7 +4419,7 @@ func (*ShipmentModel_PrecedenceRule) ProtoMessage() {} func (x *ShipmentModel_PrecedenceRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4552,11 +4498,9 @@ type ShipmentModel_BreakRule struct { func (x *ShipmentModel_BreakRule) Reset() { *x = ShipmentModel_BreakRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_BreakRule) String() string { @@ -4567,7 +4511,7 @@ func (*ShipmentModel_BreakRule) ProtoMessage() {} func (x *ShipmentModel_BreakRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4613,11 +4557,9 @@ type ShipmentModel_DurationDistanceMatrix_Row struct { func (x *ShipmentModel_DurationDistanceMatrix_Row) Reset() { *x = ShipmentModel_DurationDistanceMatrix_Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_DurationDistanceMatrix_Row) String() string { @@ -4628,7 +4570,7 @@ func (*ShipmentModel_DurationDistanceMatrix_Row) ProtoMessage() {} func (x *ShipmentModel_DurationDistanceMatrix_Row) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4677,11 +4619,9 @@ type ShipmentModel_BreakRule_BreakRequest struct { func (x *ShipmentModel_BreakRule_BreakRequest) Reset() { *x = ShipmentModel_BreakRule_BreakRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_BreakRule_BreakRequest) String() string { @@ -4692,7 +4632,7 @@ func (*ShipmentModel_BreakRule_BreakRequest) ProtoMessage() {} func (x *ShipmentModel_BreakRule_BreakRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4781,11 +4721,9 @@ type ShipmentModel_BreakRule_FrequencyConstraint struct { func (x *ShipmentModel_BreakRule_FrequencyConstraint) Reset() { *x = ShipmentModel_BreakRule_FrequencyConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentModel_BreakRule_FrequencyConstraint) String() string { @@ -4796,7 +4734,7 @@ func (*ShipmentModel_BreakRule_FrequencyConstraint) ProtoMessage() {} func (x *ShipmentModel_BreakRule_FrequencyConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4907,11 +4845,9 @@ type Shipment_VisitRequest struct { func (x *Shipment_VisitRequest) Reset() { *x = Shipment_VisitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment_VisitRequest) String() string { @@ -4922,7 +4858,7 @@ func (*Shipment_VisitRequest) ProtoMessage() {} func (x *Shipment_VisitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5039,11 +4975,9 @@ type Shipment_Load struct { func (x *Shipment_Load) Reset() { *x = Shipment_Load{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipment_Load) String() string { @@ -5054,7 +4988,7 @@ func (*Shipment_Load) ProtoMessage() {} func (x *Shipment_Load) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5106,11 +5040,9 @@ type Vehicle_LoadLimit struct { func (x *Vehicle_LoadLimit) Reset() { *x = Vehicle_LoadLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_LoadLimit) String() string { @@ -5121,7 +5053,7 @@ func (*Vehicle_LoadLimit) ProtoMessage() {} func (x *Vehicle_LoadLimit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5230,11 +5162,9 @@ type Vehicle_DurationLimit struct { func (x *Vehicle_DurationLimit) Reset() { *x = Vehicle_DurationLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_DurationLimit) String() string { @@ -5245,7 +5175,7 @@ func (*Vehicle_DurationLimit) ProtoMessage() {} func (x *Vehicle_DurationLimit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5318,11 +5248,9 @@ type Vehicle_LoadLimit_Interval struct { func (x *Vehicle_LoadLimit_Interval) Reset() { *x = Vehicle_LoadLimit_Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vehicle_LoadLimit_Interval) String() string { @@ -5333,7 +5261,7 @@ func (*Vehicle_LoadLimit_Interval) ProtoMessage() {} func (x *Vehicle_LoadLimit_Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5382,11 +5310,9 @@ type BreakRule_BreakRequest struct { func (x *BreakRule_BreakRequest) Reset() { *x = BreakRule_BreakRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule_BreakRequest) String() string { @@ -5397,7 +5323,7 @@ func (*BreakRule_BreakRequest) ProtoMessage() {} func (x *BreakRule_BreakRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5486,11 +5412,9 @@ type BreakRule_FrequencyConstraint struct { func (x *BreakRule_FrequencyConstraint) Reset() { *x = BreakRule_FrequencyConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BreakRule_FrequencyConstraint) String() string { @@ -5501,7 +5425,7 @@ func (*BreakRule_FrequencyConstraint) ProtoMessage() {} func (x *BreakRule_FrequencyConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5549,11 +5473,9 @@ type ShipmentRoute_Delay struct { func (x *ShipmentRoute_Delay) Reset() { *x = ShipmentRoute_Delay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Delay) String() string { @@ -5564,7 +5486,7 @@ func (*ShipmentRoute_Delay) ProtoMessage() {} func (x *ShipmentRoute_Delay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5670,11 +5592,9 @@ type ShipmentRoute_Visit struct { func (x *ShipmentRoute_Visit) Reset() { *x = ShipmentRoute_Visit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Visit) String() string { @@ -5685,7 +5605,7 @@ func (*ShipmentRoute_Visit) ProtoMessage() {} func (x *ShipmentRoute_Visit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5853,11 +5773,9 @@ type ShipmentRoute_Transition struct { func (x *ShipmentRoute_Transition) Reset() { *x = ShipmentRoute_Transition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Transition) String() string { @@ -5868,7 +5786,7 @@ func (*ShipmentRoute_Transition) ProtoMessage() {} func (x *ShipmentRoute_Transition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5977,11 +5895,9 @@ type ShipmentRoute_VehicleLoad struct { func (x *ShipmentRoute_VehicleLoad) Reset() { *x = ShipmentRoute_VehicleLoad{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_VehicleLoad) String() string { @@ -5992,7 +5908,7 @@ func (*ShipmentRoute_VehicleLoad) ProtoMessage() {} func (x *ShipmentRoute_VehicleLoad) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6029,11 +5945,9 @@ type ShipmentRoute_EncodedPolyline struct { func (x *ShipmentRoute_EncodedPolyline) Reset() { *x = ShipmentRoute_EncodedPolyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_EncodedPolyline) String() string { @@ -6044,7 +5958,7 @@ func (*ShipmentRoute_EncodedPolyline) ProtoMessage() {} func (x *ShipmentRoute_EncodedPolyline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6080,11 +5994,9 @@ type ShipmentRoute_Break struct { func (x *ShipmentRoute_Break) Reset() { *x = ShipmentRoute_Break{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_Break) String() string { @@ -6095,7 +6007,7 @@ func (*ShipmentRoute_Break) ProtoMessage() {} func (x *ShipmentRoute_Break) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6166,11 +6078,9 @@ type ShipmentRoute_TravelStep struct { func (x *ShipmentRoute_TravelStep) Reset() { *x = ShipmentRoute_TravelStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShipmentRoute_TravelStep) String() string { @@ -6181,7 +6091,7 @@ func (*ShipmentRoute_TravelStep) ProtoMessage() {} func (x *ShipmentRoute_TravelStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6271,11 +6181,9 @@ type SkippedShipment_Reason struct { func (x *SkippedShipment_Reason) Reset() { *x = SkippedShipment_Reason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SkippedShipment_Reason) String() string { @@ -6286,7 +6194,7 @@ func (*SkippedShipment_Reason) ProtoMessage() {} func (x *SkippedShipment_Reason) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6351,11 +6259,9 @@ type InjectedSolutionConstraint_ConstraintRelaxation struct { func (x *InjectedSolutionConstraint_ConstraintRelaxation) Reset() { *x = InjectedSolutionConstraint_ConstraintRelaxation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint_ConstraintRelaxation) String() string { @@ -6366,7 +6272,7 @@ func (*InjectedSolutionConstraint_ConstraintRelaxation) ProtoMessage() {} func (x *InjectedSolutionConstraint_ConstraintRelaxation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6454,11 +6360,9 @@ type InjectedSolutionConstraint_ConstraintRelaxation_Relaxation struct { func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) Reset() { *x = InjectedSolutionConstraint_ConstraintRelaxation_Relaxation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) String() string { @@ -6469,7 +6373,7 @@ func (*InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) ProtoMessage( func (x *InjectedSolutionConstraint_ConstraintRelaxation_Relaxation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6532,11 +6436,9 @@ type OptimizeToursValidationError_FieldReference struct { func (x *OptimizeToursValidationError_FieldReference) Reset() { *x = OptimizeToursValidationError_FieldReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeToursValidationError_FieldReference) String() string { @@ -6547,7 +6449,7 @@ func (*OptimizeToursValidationError_FieldReference) ProtoMessage() {} func (x *OptimizeToursValidationError_FieldReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8253,596 +8155,6 @@ func file_google_cloud_optimization_v1_fleet_routing_proto_init() { return } file_google_cloud_optimization_v1_async_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Shipment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentTypeIncompatibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentTypeRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RouteModifiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TimeWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CapacityQuantity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CapacityQuantityInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DistanceLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TransitionAttributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Waypoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SkippedShipment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AggregatedMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursResponse_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BatchOptimizeToursRequest_AsyncModelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_DurationDistanceMatrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_PrecedenceRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_BreakRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_DurationDistanceMatrix_Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_BreakRule_BreakRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentModel_BreakRule_FrequencyConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Shipment_VisitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Shipment_Load); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_LoadLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_DurationLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Vehicle_LoadLimit_Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule_BreakRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*BreakRule_FrequencyConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Delay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Visit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Transition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_VehicleLoad); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_EncodedPolyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_Break); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ShipmentRoute_TravelStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*SkippedShipment_Reason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint_ConstraintRelaxation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*InjectedSolutionConstraint_ConstraintRelaxation_Relaxation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeToursValidationError_FieldReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[4].OneofWrappers = []any{} file_google_cloud_optimization_v1_fleet_routing_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/oracledatabase/apiv1/helpers.go b/oracledatabase/apiv1/helpers.go index af6c9bec968e..2b8fb8e12a8f 100755 --- a/oracledatabase/apiv1/helpers.go +++ b/oracledatabase/apiv1/helpers.go @@ -18,10 +18,17 @@ package oracledatabase import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" ) +const serviceName = "oracledatabase.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +49,39 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} diff --git a/oracledatabase/apiv1/oracle_database_client.go b/oracledatabase/apiv1/oracle_database_client.go index 35abc6b3c69a..21a5e1a37b6d 100755 --- a/oracledatabase/apiv1/oracle_database_client.go +++ b/oracledatabase/apiv1/oracle_database_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" oracledatabasepb "cloud.google.com/go/oracledatabase/apiv1/oracledatabasepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -591,6 +590,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new oracle database rest client. @@ -608,6 +609,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -707,21 +709,10 @@ func (c *restClient) ListCloudExadataInfrastructures(ctx context.Context, req *o } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCloudExadataInfrastructures") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -784,17 +775,7 @@ func (c *restClient) GetCloudExadataInfrastructure(ctx context.Context, req *ora httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCloudExadataInfrastructure") if err != nil { return err } @@ -854,21 +835,10 @@ func (c *restClient) CreateCloudExadataInfrastructure(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCloudExadataInfrastructure") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -924,21 +894,10 @@ func (c *restClient) DeleteCloudExadataInfrastructure(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCloudExadataInfrastructure") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1004,21 +963,10 @@ func (c *restClient) ListCloudVmClusters(ctx context.Context, req *oracledatabas } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCloudVmClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1081,17 +1029,7 @@ func (c *restClient) GetCloudVmCluster(ctx context.Context, req *oracledatabasep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCloudVmCluster") if err != nil { return err } @@ -1151,21 +1089,10 @@ func (c *restClient) CreateCloudVmCluster(ctx context.Context, req *oracledataba httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCloudVmCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1221,21 +1148,10 @@ func (c *restClient) DeleteCloudVmCluster(ctx context.Context, req *oracledataba httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCloudVmCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1298,21 +1214,10 @@ func (c *restClient) ListEntitlements(ctx context.Context, req *oracledatabasepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntitlements") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1387,21 +1292,10 @@ func (c *restClient) ListDbServers(ctx context.Context, req *oracledatabasepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDbServers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1476,21 +1370,10 @@ func (c *restClient) ListDbNodes(ctx context.Context, req *oracledatabasepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDbNodes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1566,21 +1449,10 @@ func (c *restClient) ListGiVersions(ctx context.Context, req *oracledatabasepb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGiVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1655,21 +1527,10 @@ func (c *restClient) ListDbSystemShapes(ctx context.Context, req *oracledatabase } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDbSystemShapes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1750,21 +1611,10 @@ func (c *restClient) ListAutonomousDatabases(ctx context.Context, req *oracledat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutonomousDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1827,17 +1677,7 @@ func (c *restClient) GetAutonomousDatabase(ctx context.Context, req *oracledatab httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutonomousDatabase") if err != nil { return err } @@ -1897,21 +1737,10 @@ func (c *restClient) CreateAutonomousDatabase(ctx context.Context, req *oracleda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAutonomousDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1964,21 +1793,10 @@ func (c *restClient) DeleteAutonomousDatabase(ctx context.Context, req *oracleda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAutonomousDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2034,21 +1852,10 @@ func (c *restClient) RestoreAutonomousDatabase(ctx context.Context, req *oracled httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreAutonomousDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2105,17 +1912,7 @@ func (c *restClient) GenerateAutonomousDatabaseWallet(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateAutonomousDatabaseWallet") if err != nil { return err } @@ -2178,21 +1975,10 @@ func (c *restClient) ListAutonomousDbVersions(ctx context.Context, req *oracleda } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutonomousDbVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2270,21 +2056,10 @@ func (c *restClient) ListAutonomousDatabaseCharacterSets(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutonomousDatabaseCharacterSets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2362,21 +2137,10 @@ func (c *restClient) ListAutonomousDatabaseBackups(ctx context.Context, req *ora } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAutonomousDatabaseBackups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2439,17 +2203,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2514,21 +2268,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2594,15 +2337,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2636,15 +2372,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2681,17 +2410,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2756,21 +2475,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/oracledatabase/apiv1/oracle_database_client_example_go123_test.go b/oracledatabase/apiv1/oracle_database_client_example_go123_test.go index be3d5347ca87..c3b6c6e00634 100644 --- a/oracledatabase/apiv1/oracle_database_client_example_go123_test.go +++ b/oracledatabase/apiv1/oracle_database_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAutonomousDatabaseBackups_all() { } for resp, err := range c.ListAutonomousDatabaseBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListAutonomousDatabaseCharacterSets_all() { } for resp, err := range c.ListAutonomousDatabaseCharacterSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListAutonomousDatabases_all() { } for resp, err := range c.ListAutonomousDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListAutonomousDbVersions_all() { } for resp, err := range c.ListAutonomousDbVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListCloudExadataInfrastructures_all() { } for resp, err := range c.ListCloudExadataInfrastructures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListCloudVmClusters_all() { } for resp, err := range c.ListCloudVmClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListDbNodes_all() { } for resp, err := range c.ListDbNodes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListDbServers_all() { } for resp, err := range c.ListDbServers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListDbSystemShapes_all() { } for resp, err := range c.ListDbSystemShapes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListEntitlements_all() { } for resp, err := range c.ListEntitlements(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListGiVersions_all() { } for resp, err := range c.ListGiVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -332,7 +332,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -358,7 +358,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/oracledatabase/apiv1/oracledatabasepb/autonomous_database.pb.go b/oracledatabase/apiv1/oracledatabasepb/autonomous_database.pb.go index 7d1447b1a07b..e10ed09182d2 100755 --- a/oracledatabase/apiv1/oracledatabasepb/autonomous_database.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/autonomous_database.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/autonomous_database.proto @@ -1352,11 +1352,9 @@ type AutonomousDatabase struct { func (x *AutonomousDatabase) Reset() { *x = AutonomousDatabase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabase) String() string { @@ -1367,7 +1365,7 @@ func (*AutonomousDatabase) ProtoMessage() {} func (x *AutonomousDatabase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1610,11 +1608,9 @@ type AutonomousDatabaseProperties struct { func (x *AutonomousDatabaseProperties) Reset() { *x = AutonomousDatabaseProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseProperties) String() string { @@ -1625,7 +1621,7 @@ func (*AutonomousDatabaseProperties) ProtoMessage() {} func (x *AutonomousDatabaseProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2050,9 @@ type AutonomousDatabaseApex struct { func (x *AutonomousDatabaseApex) Reset() { *x = AutonomousDatabaseApex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseApex) String() string { @@ -2069,7 +2063,7 @@ func (*AutonomousDatabaseApex) ProtoMessage() {} func (x *AutonomousDatabaseApex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2128,11 +2122,9 @@ type AutonomousDatabaseConnectionStrings struct { func (x *AutonomousDatabaseConnectionStrings) Reset() { *x = AutonomousDatabaseConnectionStrings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseConnectionStrings) String() string { @@ -2143,7 +2135,7 @@ func (*AutonomousDatabaseConnectionStrings) ProtoMessage() {} func (x *AutonomousDatabaseConnectionStrings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2232,11 +2224,9 @@ type DatabaseConnectionStringProfile struct { func (x *DatabaseConnectionStringProfile) Reset() { *x = DatabaseConnectionStringProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseConnectionStringProfile) String() string { @@ -2247,7 +2237,7 @@ func (*DatabaseConnectionStringProfile) ProtoMessage() {} func (x *DatabaseConnectionStringProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2345,11 +2335,9 @@ type AllConnectionStrings struct { func (x *AllConnectionStrings) Reset() { *x = AllConnectionStrings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllConnectionStrings) String() string { @@ -2360,7 +2348,7 @@ func (*AllConnectionStrings) ProtoMessage() {} func (x *AllConnectionStrings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2429,11 +2417,9 @@ type AutonomousDatabaseConnectionUrls struct { func (x *AutonomousDatabaseConnectionUrls) Reset() { *x = AutonomousDatabaseConnectionUrls{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseConnectionUrls) String() string { @@ -2444,7 +2430,7 @@ func (*AutonomousDatabaseConnectionUrls) ProtoMessage() {} func (x *AutonomousDatabaseConnectionUrls) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2540,11 +2526,9 @@ type AutonomousDatabaseStandbySummary struct { func (x *AutonomousDatabaseStandbySummary) Reset() { *x = AutonomousDatabaseStandbySummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseStandbySummary) String() string { @@ -2555,7 +2539,7 @@ func (*AutonomousDatabaseStandbySummary) ProtoMessage() {} func (x *AutonomousDatabaseStandbySummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,11 +2606,9 @@ type ScheduledOperationDetails struct { func (x *ScheduledOperationDetails) Reset() { *x = ScheduledOperationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduledOperationDetails) String() string { @@ -2637,7 +2619,7 @@ func (*ScheduledOperationDetails) ProtoMessage() {} func (x *ScheduledOperationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3466,116 +3448,6 @@ func file_google_cloud_oracledatabase_v1_autonomous_database_proto_init() { return } file_google_cloud_oracledatabase_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseApex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseConnectionStrings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseConnectionStringProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AllConnectionStrings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseConnectionUrls); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseStandbySummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ScheduledOperationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_oracledatabase_v1_autonomous_database_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/autonomous_database_character_set.pb.go b/oracledatabase/apiv1/oracledatabasepb/autonomous_database_character_set.pb.go index 307bb9051ec0..dd2756a4f855 100755 --- a/oracledatabase/apiv1/oracledatabasepb/autonomous_database_character_set.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/autonomous_database_character_set.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/autonomous_database_character_set.proto @@ -109,11 +109,9 @@ type AutonomousDatabaseCharacterSet struct { func (x *AutonomousDatabaseCharacterSet) Reset() { *x = AutonomousDatabaseCharacterSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseCharacterSet) String() string { @@ -124,7 +122,7 @@ func (*AutonomousDatabaseCharacterSet) ProtoMessage() {} func (x *AutonomousDatabaseCharacterSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,20 +257,6 @@ func file_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto if File_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_autonomous_database_character_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseCharacterSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/autonomous_db_backup.pb.go b/oracledatabase/apiv1/oracledatabasepb/autonomous_db_backup.pb.go index 99f11020a5c3..e3b7bb1db473 100755 --- a/oracledatabase/apiv1/oracledatabasepb/autonomous_db_backup.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/autonomous_db_backup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/autonomous_db_backup.proto @@ -189,11 +189,9 @@ type AutonomousDatabaseBackup struct { func (x *AutonomousDatabaseBackup) Reset() { *x = AutonomousDatabaseBackup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseBackup) String() string { @@ -204,7 +202,7 @@ func (*AutonomousDatabaseBackup) ProtoMessage() {} func (x *AutonomousDatabaseBackup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +310,9 @@ type AutonomousDatabaseBackupProperties struct { func (x *AutonomousDatabaseBackupProperties) Reset() { *x = AutonomousDatabaseBackupProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDatabaseBackupProperties) String() string { @@ -327,7 +323,7 @@ func (*AutonomousDatabaseBackupProperties) ProtoMessage() {} func (x *AutonomousDatabaseBackupProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,32 +675,6 @@ func file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_init() { if File_google_cloud_oracledatabase_v1_autonomous_db_backup_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseBackup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_autonomous_db_backup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDatabaseBackupProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/autonomous_db_version.pb.go b/oracledatabase/apiv1/oracledatabasepb/autonomous_db_version.pb.go index fb5d489e2023..eaa4b0e6c21a 100755 --- a/oracledatabase/apiv1/oracledatabasepb/autonomous_db_version.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/autonomous_db_version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/autonomous_db_version.proto @@ -58,11 +58,9 @@ type AutonomousDbVersion struct { func (x *AutonomousDbVersion) Reset() { *x = AutonomousDbVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_autonomous_db_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_autonomous_db_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutonomousDbVersion) String() string { @@ -73,7 +71,7 @@ func (*AutonomousDbVersion) ProtoMessage() {} func (x *AutonomousDbVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_autonomous_db_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,20 +205,6 @@ func file_google_cloud_oracledatabase_v1_autonomous_db_version_proto_init() { return } file_google_cloud_oracledatabase_v1_autonomous_database_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_autonomous_db_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutonomousDbVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/common.pb.go b/oracledatabase/apiv1/oracledatabasepb/common.pb.go index 8f0108234e6c..41cb41134104 100755 --- a/oracledatabase/apiv1/oracledatabasepb/common.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/common.proto @@ -50,11 +50,9 @@ type CustomerContact struct { func (x *CustomerContact) Reset() { *x = CustomerContact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerContact) String() string { @@ -65,7 +63,7 @@ func (*CustomerContact) ProtoMessage() {} func (x *CustomerContact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,20 +144,6 @@ func file_google_cloud_oracledatabase_v1_common_proto_init() { if File_google_cloud_oracledatabase_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomerContact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/db_node.pb.go b/oracledatabase/apiv1/oracledatabasepb/db_node.pb.go index 292ff1353bf2..d5180d22ba28 100755 --- a/oracledatabase/apiv1/oracledatabasepb/db_node.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/db_node.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/db_node.proto @@ -133,11 +133,9 @@ type DbNode struct { func (x *DbNode) Reset() { *x = DbNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbNode) String() string { @@ -148,7 +146,7 @@ func (*DbNode) ProtoMessage() {} func (x *DbNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +201,9 @@ type DbNodeProperties struct { func (x *DbNodeProperties) Reset() { *x = DbNodeProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbNodeProperties) String() string { @@ -218,7 +214,7 @@ func (*DbNodeProperties) ProtoMessage() {} func (x *DbNodeProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,32 +400,6 @@ func file_google_cloud_oracledatabase_v1_db_node_proto_init() { if File_google_cloud_oracledatabase_v1_db_node_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DbNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_db_node_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DbNodeProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/db_server.pb.go b/oracledatabase/apiv1/oracledatabasepb/db_server.pb.go index c3e78630e897..564aba68f1d0 100755 --- a/oracledatabase/apiv1/oracledatabasepb/db_server.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/db_server.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/db_server.proto @@ -119,11 +119,9 @@ type DbServer struct { func (x *DbServer) Reset() { *x = DbServer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbServer) String() string { @@ -134,7 +132,7 @@ func (*DbServer) ProtoMessage() {} func (x *DbServer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type DbServerProperties struct { func (x *DbServerProperties) Reset() { *x = DbServerProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbServerProperties) String() string { @@ -215,7 +211,7 @@ func (*DbServerProperties) ProtoMessage() {} func (x *DbServerProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,32 +419,6 @@ func file_google_cloud_oracledatabase_v1_db_server_proto_init() { if File_google_cloud_oracledatabase_v1_db_server_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DbServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_db_server_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DbServerProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/db_system_shape.pb.go b/oracledatabase/apiv1/oracledatabasepb/db_system_shape.pb.go index 30c2dc01d4eb..674c47cb5cd5 100755 --- a/oracledatabase/apiv1/oracledatabasepb/db_system_shape.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/db_system_shape.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/db_system_shape.proto @@ -72,11 +72,9 @@ type DbSystemShape struct { func (x *DbSystemShape) Reset() { *x = DbSystemShape{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_db_system_shape_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_db_system_shape_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DbSystemShape) String() string { @@ -87,7 +85,7 @@ func (*DbSystemShape) ProtoMessage() {} func (x *DbSystemShape) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_db_system_shape_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,20 +293,6 @@ func file_google_cloud_oracledatabase_v1_db_system_shape_proto_init() { if File_google_cloud_oracledatabase_v1_db_system_shape_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_db_system_shape_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DbSystemShape); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/entitlement.pb.go b/oracledatabase/apiv1/oracledatabasepb/entitlement.pb.go index ca764afa81cb..36bf07943e58 100755 --- a/oracledatabase/apiv1/oracledatabasepb/entitlement.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/entitlement.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/entitlement.proto @@ -112,11 +112,9 @@ type Entitlement struct { func (x *Entitlement) Reset() { *x = Entitlement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement) String() string { @@ -127,7 +125,7 @@ func (*Entitlement) ProtoMessage() {} func (x *Entitlement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +186,9 @@ type CloudAccountDetails struct { func (x *CloudAccountDetails) Reset() { *x = CloudAccountDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudAccountDetails) String() string { @@ -203,7 +199,7 @@ func (*CloudAccountDetails) ProtoMessage() {} func (x *CloudAccountDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,32 +357,6 @@ func file_google_cloud_oracledatabase_v1_entitlement_proto_init() { if File_google_cloud_oracledatabase_v1_entitlement_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudAccountDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_oracledatabase_v1_entitlement_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/exadata_infra.pb.go b/oracledatabase/apiv1/oracledatabasepb/exadata_infra.pb.go index a03b7288abb9..c195ea70d3fa 100755 --- a/oracledatabase/apiv1/oracledatabasepb/exadata_infra.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/exadata_infra.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/exadata_infra.proto @@ -247,11 +247,9 @@ type CloudExadataInfrastructure struct { func (x *CloudExadataInfrastructure) Reset() { *x = CloudExadataInfrastructure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudExadataInfrastructure) String() string { @@ -262,7 +260,7 @@ func (*CloudExadataInfrastructure) ProtoMessage() {} func (x *CloudExadataInfrastructure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,15 +353,15 @@ type CloudExadataInfrastructureProperties struct { Shape string `protobuf:"bytes,8,opt,name=shape,proto3" json:"shape,omitempty"` // Output only. Deep link to the OCI console to view this resource. OciUrl string `protobuf:"bytes,9,opt,name=oci_url,json=ociUrl,proto3" json:"oci_url,omitempty"` - // Optional. The number of enabled CPU cores. + // Output only. The number of enabled CPU cores. CpuCount int32 `protobuf:"varint,10,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"` // Output only. The total number of CPU cores available. MaxCpuCount int32 `protobuf:"varint,11,opt,name=max_cpu_count,json=maxCpuCount,proto3" json:"max_cpu_count,omitempty"` - // Optional. The memory allocated in GBs. + // Output only. The memory allocated in GBs. MemorySizeGb int32 `protobuf:"varint,12,opt,name=memory_size_gb,json=memorySizeGb,proto3" json:"memory_size_gb,omitempty"` // Output only. The total memory available in GBs. MaxMemoryGb int32 `protobuf:"varint,13,opt,name=max_memory_gb,json=maxMemoryGb,proto3" json:"max_memory_gb,omitempty"` - // Optional. The local node storage allocated in GBs. + // Output only. The local node storage allocated in GBs. DbNodeStorageSizeGb int32 `protobuf:"varint,14,opt,name=db_node_storage_size_gb,json=dbNodeStorageSizeGb,proto3" json:"db_node_storage_size_gb,omitempty"` // Output only. The total local node storage available in GBs. MaxDbNodeStorageSizeGb int32 `protobuf:"varint,15,opt,name=max_db_node_storage_size_gb,json=maxDbNodeStorageSizeGb,proto3" json:"max_db_node_storage_size_gb,omitempty"` @@ -401,11 +399,9 @@ type CloudExadataInfrastructureProperties struct { func (x *CloudExadataInfrastructureProperties) Reset() { *x = CloudExadataInfrastructureProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudExadataInfrastructureProperties) String() string { @@ -416,7 +412,7 @@ func (*CloudExadataInfrastructureProperties) ProtoMessage() {} func (x *CloudExadataInfrastructureProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +663,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -682,7 +676,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -861,18 +855,18 @@ var file_google_cloud_oracledatabase_v1_exadata_infra_proto_rawDesc = []byte{ 0x1c, 0x0a, 0x07, 0x6f, 0x63, 0x69, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x6f, 0x63, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x27, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x67, 0x62, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x47, 0x62, 0x12, 0x39, 0x0a, 0x17, 0x64, 0x62, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x13, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x41, 0x03, 0x52, 0x13, 0x64, 0x62, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x40, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x62, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, @@ -1062,44 +1056,6 @@ func file_google_cloud_oracledatabase_v1_exadata_infra_proto_init() { return } file_google_cloud_oracledatabase_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudExadataInfrastructure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudExadataInfrastructureProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_exadata_infra_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/gi_version.pb.go b/oracledatabase/apiv1/oracledatabasepb/gi_version.pb.go index ef3d62b19c83..45f0b2eb4393 100755 --- a/oracledatabase/apiv1/oracledatabasepb/gi_version.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/gi_version.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/gi_version.proto @@ -53,11 +53,9 @@ type GiVersion struct { func (x *GiVersion) Reset() { *x = GiVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_gi_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_gi_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GiVersion) String() string { @@ -68,7 +66,7 @@ func (*GiVersion) ProtoMessage() {} func (x *GiVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_gi_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,20 +166,6 @@ func file_google_cloud_oracledatabase_v1_gi_version_proto_init() { if File_google_cloud_oracledatabase_v1_gi_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_gi_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GiVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/location_metadata.pb.go b/oracledatabase/apiv1/oracledatabasepb/location_metadata.pb.go index c64ebc023593..1a5a019e4c78 100755 --- a/oracledatabase/apiv1/oracledatabasepb/location_metadata.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/location_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/location_metadata.proto @@ -48,11 +48,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_location_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_location_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -63,7 +61,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_location_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,20 +145,6 @@ func file_google_cloud_oracledatabase_v1_location_metadata_proto_init() { if File_google_cloud_oracledatabase_v1_location_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_location_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/oracledatabase.pb.go b/oracledatabase/apiv1/oracledatabasepb/oracledatabase.pb.go index b63d7302ae62..a32b674c5f8f 100755 --- a/oracledatabase/apiv1/oracledatabasepb/oracledatabase.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/oracledatabase.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/oracledatabase.proto @@ -62,11 +62,9 @@ type ListCloudExadataInfrastructuresRequest struct { func (x *ListCloudExadataInfrastructuresRequest) Reset() { *x = ListCloudExadataInfrastructuresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudExadataInfrastructuresRequest) String() string { @@ -77,7 +75,7 @@ func (*ListCloudExadataInfrastructuresRequest) ProtoMessage() {} func (x *ListCloudExadataInfrastructuresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ListCloudExadataInfrastructuresResponse struct { func (x *ListCloudExadataInfrastructuresResponse) Reset() { *x = ListCloudExadataInfrastructuresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudExadataInfrastructuresResponse) String() string { @@ -142,7 +138,7 @@ func (*ListCloudExadataInfrastructuresResponse) ProtoMessage() {} func (x *ListCloudExadataInfrastructuresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +181,9 @@ type GetCloudExadataInfrastructureRequest struct { func (x *GetCloudExadataInfrastructureRequest) Reset() { *x = GetCloudExadataInfrastructureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudExadataInfrastructureRequest) String() string { @@ -200,7 +194,7 @@ func (*GetCloudExadataInfrastructureRequest) ProtoMessage() {} func (x *GetCloudExadataInfrastructureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type CreateCloudExadataInfrastructureRequest struct { func (x *CreateCloudExadataInfrastructureRequest) Reset() { *x = CreateCloudExadataInfrastructureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloudExadataInfrastructureRequest) String() string { @@ -266,7 +258,7 @@ func (*CreateCloudExadataInfrastructureRequest) ProtoMessage() {} func (x *CreateCloudExadataInfrastructureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +328,9 @@ type DeleteCloudExadataInfrastructureRequest struct { func (x *DeleteCloudExadataInfrastructureRequest) Reset() { *x = DeleteCloudExadataInfrastructureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCloudExadataInfrastructureRequest) String() string { @@ -351,7 +341,7 @@ func (*DeleteCloudExadataInfrastructureRequest) ProtoMessage() {} func (x *DeleteCloudExadataInfrastructureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +398,9 @@ type ListCloudVmClustersRequest struct { func (x *ListCloudVmClustersRequest) Reset() { *x = ListCloudVmClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudVmClustersRequest) String() string { @@ -423,7 +411,7 @@ func (*ListCloudVmClustersRequest) ProtoMessage() {} func (x *ListCloudVmClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +468,9 @@ type ListCloudVmClustersResponse struct { func (x *ListCloudVmClustersResponse) Reset() { *x = ListCloudVmClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudVmClustersResponse) String() string { @@ -495,7 +481,7 @@ func (*ListCloudVmClustersResponse) ProtoMessage() {} func (x *ListCloudVmClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +523,9 @@ type GetCloudVmClusterRequest struct { func (x *GetCloudVmClusterRequest) Reset() { *x = GetCloudVmClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudVmClusterRequest) String() string { @@ -552,7 +536,7 @@ func (*GetCloudVmClusterRequest) ProtoMessage() {} func (x *GetCloudVmClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +587,9 @@ type CreateCloudVmClusterRequest struct { func (x *CreateCloudVmClusterRequest) Reset() { *x = CreateCloudVmClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloudVmClusterRequest) String() string { @@ -618,7 +600,7 @@ func (*CreateCloudVmClusterRequest) ProtoMessage() {} func (x *CreateCloudVmClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +669,9 @@ type DeleteCloudVmClusterRequest struct { func (x *DeleteCloudVmClusterRequest) Reset() { *x = DeleteCloudVmClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCloudVmClusterRequest) String() string { @@ -702,7 +682,7 @@ func (*DeleteCloudVmClusterRequest) ProtoMessage() {} func (x *DeleteCloudVmClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +737,9 @@ type ListEntitlementsRequest struct { func (x *ListEntitlementsRequest) Reset() { *x = ListEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsRequest) String() string { @@ -772,7 +750,7 @@ func (*ListEntitlementsRequest) ProtoMessage() {} func (x *ListEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +800,9 @@ type ListEntitlementsResponse struct { func (x *ListEntitlementsResponse) Reset() { *x = ListEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsResponse) String() string { @@ -837,7 +813,7 @@ func (*ListEntitlementsResponse) ProtoMessage() {} func (x *ListEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +861,9 @@ type ListDbServersRequest struct { func (x *ListDbServersRequest) Reset() { *x = ListDbServersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbServersRequest) String() string { @@ -900,7 +874,7 @@ func (*ListDbServersRequest) ProtoMessage() {} func (x *ListDbServersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +924,9 @@ type ListDbServersResponse struct { func (x *ListDbServersResponse) Reset() { *x = ListDbServersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbServersResponse) String() string { @@ -965,7 +937,7 @@ func (*ListDbServersResponse) ProtoMessage() {} func (x *ListDbServersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +985,9 @@ type ListDbNodesRequest struct { func (x *ListDbNodesRequest) Reset() { *x = ListDbNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbNodesRequest) String() string { @@ -1028,7 +998,7 @@ func (*ListDbNodesRequest) ProtoMessage() {} func (x *ListDbNodesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1048,9 @@ type ListDbNodesResponse struct { func (x *ListDbNodesResponse) Reset() { *x = ListDbNodesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbNodesResponse) String() string { @@ -1093,7 +1061,7 @@ func (*ListDbNodesResponse) ProtoMessage() {} func (x *ListDbNodesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1142,11 +1110,9 @@ type ListGiVersionsRequest struct { func (x *ListGiVersionsRequest) Reset() { *x = ListGiVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGiVersionsRequest) String() string { @@ -1157,7 +1123,7 @@ func (*ListGiVersionsRequest) ProtoMessage() {} func (x *ListGiVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1173,9 @@ type ListGiVersionsResponse struct { func (x *ListGiVersionsResponse) Reset() { *x = ListGiVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGiVersionsResponse) String() string { @@ -1222,7 +1186,7 @@ func (*ListGiVersionsResponse) ProtoMessage() {} func (x *ListGiVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1270,11 +1234,9 @@ type ListDbSystemShapesRequest struct { func (x *ListDbSystemShapesRequest) Reset() { *x = ListDbSystemShapesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbSystemShapesRequest) String() string { @@ -1285,7 +1247,7 @@ func (*ListDbSystemShapesRequest) ProtoMessage() {} func (x *ListDbSystemShapesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1335,11 +1297,9 @@ type ListDbSystemShapesResponse struct { func (x *ListDbSystemShapesResponse) Reset() { *x = ListDbSystemShapesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDbSystemShapesResponse) String() string { @@ -1350,7 +1310,7 @@ func (*ListDbSystemShapesResponse) ProtoMessage() {} func (x *ListDbSystemShapesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1370,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1425,7 +1383,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1477,9 @@ type ListAutonomousDatabasesRequest struct { func (x *ListAutonomousDatabasesRequest) Reset() { *x = ListAutonomousDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabasesRequest) String() string { @@ -1534,7 +1490,7 @@ func (*ListAutonomousDatabasesRequest) ProtoMessage() {} func (x *ListAutonomousDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1554,9 @@ type ListAutonomousDatabasesResponse struct { func (x *ListAutonomousDatabasesResponse) Reset() { *x = ListAutonomousDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabasesResponse) String() string { @@ -1613,7 +1567,7 @@ func (*ListAutonomousDatabasesResponse) ProtoMessage() {} func (x *ListAutonomousDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1655,11 +1609,9 @@ type GetAutonomousDatabaseRequest struct { func (x *GetAutonomousDatabaseRequest) Reset() { *x = GetAutonomousDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutonomousDatabaseRequest) String() string { @@ -1670,7 +1622,7 @@ func (*GetAutonomousDatabaseRequest) ProtoMessage() {} func (x *GetAutonomousDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1721,11 +1673,9 @@ type CreateAutonomousDatabaseRequest struct { func (x *CreateAutonomousDatabaseRequest) Reset() { *x = CreateAutonomousDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAutonomousDatabaseRequest) String() string { @@ -1736,7 +1686,7 @@ func (*CreateAutonomousDatabaseRequest) ProtoMessage() {} func (x *CreateAutonomousDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1801,11 +1751,9 @@ type DeleteAutonomousDatabaseRequest struct { func (x *DeleteAutonomousDatabaseRequest) Reset() { *x = DeleteAutonomousDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAutonomousDatabaseRequest) String() string { @@ -1816,7 +1764,7 @@ func (*DeleteAutonomousDatabaseRequest) ProtoMessage() {} func (x *DeleteAutonomousDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1860,11 +1808,9 @@ type RestoreAutonomousDatabaseRequest struct { func (x *RestoreAutonomousDatabaseRequest) Reset() { *x = RestoreAutonomousDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreAutonomousDatabaseRequest) String() string { @@ -1875,7 +1821,7 @@ func (*RestoreAutonomousDatabaseRequest) ProtoMessage() {} func (x *RestoreAutonomousDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,11 +1872,9 @@ type GenerateAutonomousDatabaseWalletRequest struct { func (x *GenerateAutonomousDatabaseWalletRequest) Reset() { *x = GenerateAutonomousDatabaseWalletRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAutonomousDatabaseWalletRequest) String() string { @@ -1941,7 +1885,7 @@ func (*GenerateAutonomousDatabaseWalletRequest) ProtoMessage() {} func (x *GenerateAutonomousDatabaseWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1996,11 +1940,9 @@ type GenerateAutonomousDatabaseWalletResponse struct { func (x *GenerateAutonomousDatabaseWalletResponse) Reset() { *x = GenerateAutonomousDatabaseWalletResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAutonomousDatabaseWalletResponse) String() string { @@ -2011,7 +1953,7 @@ func (*GenerateAutonomousDatabaseWalletResponse) ProtoMessage() {} func (x *GenerateAutonomousDatabaseWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2052,11 +1994,9 @@ type ListAutonomousDbVersionsRequest struct { func (x *ListAutonomousDbVersionsRequest) Reset() { *x = ListAutonomousDbVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDbVersionsRequest) String() string { @@ -2067,7 +2007,7 @@ func (*ListAutonomousDbVersionsRequest) ProtoMessage() {} func (x *ListAutonomousDbVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2117,11 +2057,9 @@ type ListAutonomousDbVersionsResponse struct { func (x *ListAutonomousDbVersionsResponse) Reset() { *x = ListAutonomousDbVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDbVersionsResponse) String() string { @@ -2132,7 +2070,7 @@ func (*ListAutonomousDbVersionsResponse) ProtoMessage() {} func (x *ListAutonomousDbVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2185,11 +2123,9 @@ type ListAutonomousDatabaseCharacterSetsRequest struct { func (x *ListAutonomousDatabaseCharacterSetsRequest) Reset() { *x = ListAutonomousDatabaseCharacterSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabaseCharacterSetsRequest) String() string { @@ -2200,7 +2136,7 @@ func (*ListAutonomousDatabaseCharacterSetsRequest) ProtoMessage() {} func (x *ListAutonomousDatabaseCharacterSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2257,11 +2193,9 @@ type ListAutonomousDatabaseCharacterSetsResponse struct { func (x *ListAutonomousDatabaseCharacterSetsResponse) Reset() { *x = ListAutonomousDatabaseCharacterSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabaseCharacterSetsResponse) String() string { @@ -2272,7 +2206,7 @@ func (*ListAutonomousDatabaseCharacterSetsResponse) ProtoMessage() {} func (x *ListAutonomousDatabaseCharacterSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2328,11 +2262,9 @@ type ListAutonomousDatabaseBackupsRequest struct { func (x *ListAutonomousDatabaseBackupsRequest) Reset() { *x = ListAutonomousDatabaseBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabaseBackupsRequest) String() string { @@ -2343,7 +2275,7 @@ func (*ListAutonomousDatabaseBackupsRequest) ProtoMessage() {} func (x *ListAutonomousDatabaseBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2400,11 +2332,9 @@ type ListAutonomousDatabaseBackupsResponse struct { func (x *ListAutonomousDatabaseBackupsResponse) Reset() { *x = ListAutonomousDatabaseBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAutonomousDatabaseBackupsResponse) String() string { @@ -2415,7 +2345,7 @@ func (*ListAutonomousDatabaseBackupsResponse) ProtoMessage() {} func (x *ListAutonomousDatabaseBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3452,428 +3382,6 @@ func file_google_cloud_oracledatabase_v1_oracledatabase_proto_init() { file_google_cloud_oracledatabase_v1_exadata_infra_proto_init() file_google_cloud_oracledatabase_v1_gi_version_proto_init() file_google_cloud_oracledatabase_v1_vm_cluster_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudExadataInfrastructuresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudExadataInfrastructuresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudExadataInfrastructureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloudExadataInfrastructureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCloudExadataInfrastructureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudVmClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudVmClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudVmClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloudVmClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCloudVmClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListDbServersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListDbServersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListDbNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListDbNodesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListGiVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListGiVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListDbSystemShapesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListDbSystemShapesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetAutonomousDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateAutonomousDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAutonomousDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*RestoreAutonomousDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAutonomousDatabaseWalletRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAutonomousDatabaseWalletResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDbVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDbVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabaseCharacterSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabaseCharacterSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabaseBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_oracledatabase_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListAutonomousDatabaseBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oracledatabase/apiv1/oracledatabasepb/vm_cluster.pb.go b/oracledatabase/apiv1/oracledatabasepb/vm_cluster.pb.go index 746f147944d4..364e99f249e1 100755 --- a/oracledatabase/apiv1/oracledatabasepb/vm_cluster.pb.go +++ b/oracledatabase/apiv1/oracledatabasepb/vm_cluster.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oracledatabase/v1/vm_cluster.proto @@ -253,11 +253,9 @@ type CloudVmCluster struct { func (x *CloudVmCluster) Reset() { *x = CloudVmCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudVmCluster) String() string { @@ -268,7 +266,7 @@ func (*CloudVmCluster) ProtoMessage() {} func (x *CloudVmCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +429,9 @@ type CloudVmClusterProperties struct { func (x *CloudVmClusterProperties) Reset() { *x = CloudVmClusterProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudVmClusterProperties) String() string { @@ -446,7 +442,7 @@ func (*CloudVmClusterProperties) ProtoMessage() {} func (x *CloudVmClusterProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +699,9 @@ type DataCollectionOptions struct { func (x *DataCollectionOptions) Reset() { *x = DataCollectionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataCollectionOptions) String() string { @@ -718,7 +712,7 @@ func (*DataCollectionOptions) ProtoMessage() {} func (x *DataCollectionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,44 +1022,6 @@ func file_google_cloud_oracledatabase_v1_vm_cluster_proto_init() { if File_google_cloud_oracledatabase_v1_vm_cluster_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudVmCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudVmClusterProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oracledatabase_v1_vm_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DataCollectionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/orchestration/airflow/service/apiv1/environments_client.go b/orchestration/airflow/service/apiv1/environments_client.go index 5041eb83ce63..84888bc54551 100755 --- a/orchestration/airflow/service/apiv1/environments_client.go +++ b/orchestration/airflow/service/apiv1/environments_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" servicepb "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -476,6 +475,8 @@ type environmentsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEnvironmentsClient creates a new environments client based on gRPC. @@ -502,6 +503,7 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E connPool: connPool, environmentsClient: servicepb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -565,6 +567,8 @@ type environmentsRESTClient struct { // Points back to the CallOptions field of the containing EnvironmentsClient CallOptions **EnvironmentsCallOptions + + logger *slog.Logger } // NewEnvironmentsRESTClient creates a new environments rest client. @@ -582,6 +586,7 @@ func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -644,7 +649,7 @@ func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *ser var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateEnvironment, req, settings.GRPC, c.logger, "CreateEnvironment") return err }, opts...) if err != nil { @@ -664,7 +669,7 @@ func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *servic var resp *servicepb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *serv } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListEnvironments, req, settings.GRPC, c.logger, "ListEnvironments") return err }, opts...) if err != nil { @@ -728,7 +733,7 @@ func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *ser var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateEnvironment, req, settings.GRPC, c.logger, "UpdateEnvironment") return err }, opts...) if err != nil { @@ -748,7 +753,7 @@ func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *ser var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.DeleteEnvironment, req, settings.GRPC, c.logger, "DeleteEnvironment") return err }, opts...) if err != nil { @@ -768,7 +773,7 @@ func (c *environmentsGRPCClient) ExecuteAirflowCommand(ctx context.Context, req var resp *servicepb.ExecuteAirflowCommandResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ExecuteAirflowCommand(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ExecuteAirflowCommand, req, settings.GRPC, c.logger, "ExecuteAirflowCommand") return err }, opts...) if err != nil { @@ -786,7 +791,7 @@ func (c *environmentsGRPCClient) StopAirflowCommand(ctx context.Context, req *se var resp *servicepb.StopAirflowCommandResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.StopAirflowCommand(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.StopAirflowCommand, req, settings.GRPC, c.logger, "StopAirflowCommand") return err }, opts...) if err != nil { @@ -804,7 +809,7 @@ func (c *environmentsGRPCClient) PollAirflowCommand(ctx context.Context, req *se var resp *servicepb.PollAirflowCommandResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.PollAirflowCommand(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.PollAirflowCommand, req, settings.GRPC, c.logger, "PollAirflowCommand") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *environmentsGRPCClient) ListWorkloads(ctx context.Context, req *service } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListWorkloads(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListWorkloads, req, settings.GRPC, c.logger, "ListWorkloads") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *environmentsGRPCClient) CheckUpgrade(ctx context.Context, req *servicep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CheckUpgrade(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CheckUpgrade, req, settings.GRPC, c.logger, "CheckUpgrade") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *environmentsGRPCClient) CreateUserWorkloadsSecret(ctx context.Context, var resp *servicepb.UserWorkloadsSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateUserWorkloadsSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateUserWorkloadsSecret, req, settings.GRPC, c.logger, "CreateUserWorkloadsSecret") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *environmentsGRPCClient) GetUserWorkloadsSecret(ctx context.Context, req var resp *servicepb.UserWorkloadsSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetUserWorkloadsSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetUserWorkloadsSecret, req, settings.GRPC, c.logger, "GetUserWorkloadsSecret") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *environmentsGRPCClient) ListUserWorkloadsSecrets(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListUserWorkloadsSecrets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListUserWorkloadsSecrets, req, settings.GRPC, c.logger, "ListUserWorkloadsSecrets") return err }, opts...) if err != nil { @@ -970,7 +975,7 @@ func (c *environmentsGRPCClient) UpdateUserWorkloadsSecret(ctx context.Context, var resp *servicepb.UserWorkloadsSecret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateUserWorkloadsSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateUserWorkloadsSecret, req, settings.GRPC, c.logger, "UpdateUserWorkloadsSecret") return err }, opts...) if err != nil { @@ -987,7 +992,7 @@ func (c *environmentsGRPCClient) DeleteUserWorkloadsSecret(ctx context.Context, opts = append((*c.CallOptions).DeleteUserWorkloadsSecret[0:len((*c.CallOptions).DeleteUserWorkloadsSecret):len((*c.CallOptions).DeleteUserWorkloadsSecret)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteUserWorkloadsSecret(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteUserWorkloadsSecret, req, settings.GRPC, c.logger, "DeleteUserWorkloadsSecret") return err }, opts...) return err @@ -1002,7 +1007,7 @@ func (c *environmentsGRPCClient) CreateUserWorkloadsConfigMap(ctx context.Contex var resp *servicepb.UserWorkloadsConfigMap err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.CreateUserWorkloadsConfigMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.CreateUserWorkloadsConfigMap, req, settings.GRPC, c.logger, "CreateUserWorkloadsConfigMap") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *environmentsGRPCClient) GetUserWorkloadsConfigMap(ctx context.Context, var resp *servicepb.UserWorkloadsConfigMap err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.GetUserWorkloadsConfigMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.GetUserWorkloadsConfigMap, req, settings.GRPC, c.logger, "GetUserWorkloadsConfigMap") return err }, opts...) if err != nil { @@ -1049,7 +1054,7 @@ func (c *environmentsGRPCClient) ListUserWorkloadsConfigMaps(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.ListUserWorkloadsConfigMaps(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.ListUserWorkloadsConfigMaps, req, settings.GRPC, c.logger, "ListUserWorkloadsConfigMaps") return err }, opts...) if err != nil { @@ -1084,7 +1089,7 @@ func (c *environmentsGRPCClient) UpdateUserWorkloadsConfigMap(ctx context.Contex var resp *servicepb.UserWorkloadsConfigMap err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.UpdateUserWorkloadsConfigMap(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.UpdateUserWorkloadsConfigMap, req, settings.GRPC, c.logger, "UpdateUserWorkloadsConfigMap") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *environmentsGRPCClient) DeleteUserWorkloadsConfigMap(ctx context.Contex opts = append((*c.CallOptions).DeleteUserWorkloadsConfigMap[0:len((*c.CallOptions).DeleteUserWorkloadsConfigMap):len((*c.CallOptions).DeleteUserWorkloadsConfigMap)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.environmentsClient.DeleteUserWorkloadsConfigMap(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.environmentsClient.DeleteUserWorkloadsConfigMap, req, settings.GRPC, c.logger, "DeleteUserWorkloadsConfigMap") return err }, opts...) return err @@ -1116,7 +1121,7 @@ func (c *environmentsGRPCClient) SaveSnapshot(ctx context.Context, req *servicep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.SaveSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.SaveSnapshot, req, settings.GRPC, c.logger, "SaveSnapshot") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *environmentsGRPCClient) LoadSnapshot(ctx context.Context, req *servicep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.LoadSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.LoadSnapshot, req, settings.GRPC, c.logger, "LoadSnapshot") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *environmentsGRPCClient) DatabaseFailover(ctx context.Context, req *serv var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.DatabaseFailover(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.DatabaseFailover, req, settings.GRPC, c.logger, "DatabaseFailover") return err }, opts...) if err != nil { @@ -1176,7 +1181,7 @@ func (c *environmentsGRPCClient) FetchDatabaseProperties(ctx context.Context, re var resp *servicepb.FetchDatabasePropertiesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.environmentsClient.FetchDatabaseProperties(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.environmentsClient.FetchDatabaseProperties, req, settings.GRPC, c.logger, "FetchDatabaseProperties") return err }, opts...) if err != nil { @@ -1193,7 +1198,7 @@ func (c *environmentsGRPCClient) DeleteOperation(ctx context.Context, req *longr opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1208,7 +1213,7 @@ func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1237,7 +1242,7 @@ func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longru } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1302,21 +1307,10 @@ func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *ser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1367,17 +1361,7 @@ func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -1439,21 +1423,10 @@ func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *serv } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnvironments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1529,21 +1502,10 @@ func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *ser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1593,21 +1555,10 @@ func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *ser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1664,17 +1615,7 @@ func (c *environmentsRESTClient) ExecuteAirflowCommand(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteAirflowCommand") if err != nil { return err } @@ -1730,17 +1671,7 @@ func (c *environmentsRESTClient) StopAirflowCommand(ctx context.Context, req *se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopAirflowCommand") if err != nil { return err } @@ -1796,17 +1727,7 @@ func (c *environmentsRESTClient) PollAirflowCommand(ctx context.Context, req *se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PollAirflowCommand") if err != nil { return err } @@ -1875,21 +1796,10 @@ func (c *environmentsRESTClient) ListWorkloads(ctx context.Context, req *service } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkloads") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1959,21 +1869,10 @@ func (c *environmentsRESTClient) CheckUpgrade(ctx context.Context, req *servicep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CheckUpgrade") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2034,17 +1933,7 @@ func (c *environmentsRESTClient) CreateUserWorkloadsSecret(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUserWorkloadsSecret") if err != nil { return err } @@ -2098,17 +1987,7 @@ func (c *environmentsRESTClient) GetUserWorkloadsSecret(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUserWorkloadsSecret") if err != nil { return err } @@ -2173,21 +2052,10 @@ func (c *environmentsRESTClient) ListUserWorkloadsSecrets(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUserWorkloadsSecrets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2260,17 +2128,7 @@ func (c *environmentsRESTClient) UpdateUserWorkloadsSecret(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUserWorkloadsSecret") if err != nil { return err } @@ -2320,15 +2178,8 @@ func (c *environmentsRESTClient) DeleteUserWorkloadsSecret(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUserWorkloadsSecret") + return err }, opts...) } @@ -2375,17 +2226,7 @@ func (c *environmentsRESTClient) CreateUserWorkloadsConfigMap(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUserWorkloadsConfigMap") if err != nil { return err } @@ -2438,17 +2279,7 @@ func (c *environmentsRESTClient) GetUserWorkloadsConfigMap(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUserWorkloadsConfigMap") if err != nil { return err } @@ -2513,21 +2344,10 @@ func (c *environmentsRESTClient) ListUserWorkloadsConfigMaps(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUserWorkloadsConfigMaps") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2600,17 +2420,7 @@ func (c *environmentsRESTClient) UpdateUserWorkloadsConfigMap(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUserWorkloadsConfigMap") if err != nil { return err } @@ -2660,15 +2470,8 @@ func (c *environmentsRESTClient) DeleteUserWorkloadsConfigMap(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUserWorkloadsConfigMap") + return err }, opts...) } @@ -2713,21 +2516,10 @@ func (c *environmentsRESTClient) SaveSnapshot(ctx context.Context, req *servicep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SaveSnapshot") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2786,21 +2578,10 @@ func (c *environmentsRESTClient) LoadSnapshot(ctx context.Context, req *servicep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LoadSnapshot") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2856,21 +2637,10 @@ func (c *environmentsRESTClient) DatabaseFailover(ctx context.Context, req *serv httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DatabaseFailover") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2921,17 +2691,7 @@ func (c *environmentsRESTClient) FetchDatabaseProperties(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchDatabaseProperties") if err != nil { return err } @@ -2978,15 +2738,8 @@ func (c *environmentsRESTClient) DeleteOperation(ctx context.Context, req *longr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3023,17 +2776,7 @@ func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3098,21 +2841,10 @@ func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longru } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/orchestration/airflow/service/apiv1/environments_client_example_go123_test.go b/orchestration/airflow/service/apiv1/environments_client_example_go123_test.go index a8c8a8e289c4..0a8f393d9bb0 100644 --- a/orchestration/airflow/service/apiv1/environments_client_example_go123_test.go +++ b/orchestration/airflow/service/apiv1/environments_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleEnvironmentsClient_ListEnvironments_all() { } for resp, err := range c.ListEnvironments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleEnvironmentsClient_ListUserWorkloadsConfigMaps_all() { } for resp, err := range c.ListUserWorkloadsConfigMaps(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleEnvironmentsClient_ListUserWorkloadsSecrets_all() { } for resp, err := range c.ListUserWorkloadsSecrets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleEnvironmentsClient_ListWorkloads_all() { } for resp, err := range c.ListWorkloads(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleEnvironmentsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/orchestration/airflow/service/apiv1/helpers.go b/orchestration/airflow/service/apiv1/helpers.go index e98869ab54e0..e4530c951433 100755 --- a/orchestration/airflow/service/apiv1/helpers.go +++ b/orchestration/airflow/service/apiv1/helpers.go @@ -18,10 +18,20 @@ package service import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "composer.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/orchestration/airflow/service/apiv1/image_versions_client.go b/orchestration/airflow/service/apiv1/image_versions_client.go index bc03d279bc2e..28d6b900c94f 100755 --- a/orchestration/airflow/service/apiv1/image_versions_client.go +++ b/orchestration/airflow/service/apiv1/image_versions_client.go @@ -19,7 +19,7 @@ package service import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" servicepb "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -164,6 +163,8 @@ type imageVersionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewImageVersionsClient creates a new image versions client based on gRPC. @@ -190,6 +191,7 @@ func NewImageVersionsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, imageVersionsClient: servicepb.NewImageVersionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -237,6 +239,8 @@ type imageVersionsRESTClient struct { // Points back to the CallOptions field of the containing ImageVersionsClient CallOptions **ImageVersionsCallOptions + + logger *slog.Logger } // NewImageVersionsRESTClient creates a new image versions rest client. @@ -254,6 +258,7 @@ func NewImageVersionsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -317,7 +322,7 @@ func (c *imageVersionsGRPCClient) ListImageVersions(ctx context.Context, req *se } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageVersionsClient.ListImageVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageVersionsClient.ListImageVersions, req, settings.GRPC, c.logger, "ListImageVersions") return err }, opts...) if err != nil { @@ -351,7 +356,7 @@ func (c *imageVersionsGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -366,7 +371,7 @@ func (c *imageVersionsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -395,7 +400,7 @@ func (c *imageVersionsGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -469,21 +474,10 @@ func (c *imageVersionsRESTClient) ListImageVersions(ctx context.Context, req *se } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListImageVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -543,15 +537,8 @@ func (c *imageVersionsRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -588,17 +575,7 @@ func (c *imageVersionsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -663,21 +640,10 @@ func (c *imageVersionsRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/orchestration/airflow/service/apiv1/image_versions_client_example_go123_test.go b/orchestration/airflow/service/apiv1/image_versions_client_example_go123_test.go index d8583267c113..6a8ba30b0660 100644 --- a/orchestration/airflow/service/apiv1/image_versions_client_example_go123_test.go +++ b/orchestration/airflow/service/apiv1/image_versions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleImageVersionsClient_ListImageVersions_all() { } for resp, err := range c.ListImageVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleImageVersionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/orchestration/airflow/service/apiv1/servicepb/environments.pb.go b/orchestration/airflow/service/apiv1/servicepb/environments.pb.go index 20b9aaadb8f7..081cc41c9155 100755 --- a/orchestration/airflow/service/apiv1/servicepb/environments.pb.go +++ b/orchestration/airflow/service/apiv1/servicepb/environments.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orchestration/airflow/service/v1/environments.proto @@ -648,11 +648,9 @@ type CreateEnvironmentRequest struct { func (x *CreateEnvironmentRequest) Reset() { *x = CreateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentRequest) String() string { @@ -663,7 +661,7 @@ func (*CreateEnvironmentRequest) ProtoMessage() {} func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +703,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -720,7 +716,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +755,9 @@ type ListEnvironmentsRequest struct { func (x *ListEnvironmentsRequest) Reset() { *x = ListEnvironmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsRequest) String() string { @@ -774,7 +768,7 @@ func (*ListEnvironmentsRequest) ProtoMessage() {} func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +818,9 @@ type ListEnvironmentsResponse struct { func (x *ListEnvironmentsResponse) Reset() { *x = ListEnvironmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnvironmentsResponse) String() string { @@ -839,7 +831,7 @@ func (*ListEnvironmentsResponse) ProtoMessage() {} func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +873,9 @@ type DeleteEnvironmentRequest struct { func (x *DeleteEnvironmentRequest) Reset() { *x = DeleteEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentRequest) String() string { @@ -896,7 +886,7 @@ func (*DeleteEnvironmentRequest) ProtoMessage() {} func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1069,11 +1059,9 @@ type UpdateEnvironmentRequest struct { func (x *UpdateEnvironmentRequest) Reset() { *x = UpdateEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEnvironmentRequest) String() string { @@ -1084,7 +1072,7 @@ func (*UpdateEnvironmentRequest) ProtoMessage() {} func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1142,11 +1130,9 @@ type ExecuteAirflowCommandRequest struct { func (x *ExecuteAirflowCommandRequest) Reset() { *x = ExecuteAirflowCommandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteAirflowCommandRequest) String() string { @@ -1157,7 +1143,7 @@ func (*ExecuteAirflowCommandRequest) ProtoMessage() {} func (x *ExecuteAirflowCommandRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,11 +1204,9 @@ type ExecuteAirflowCommandResponse struct { func (x *ExecuteAirflowCommandResponse) Reset() { *x = ExecuteAirflowCommandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteAirflowCommandResponse) String() string { @@ -1233,7 +1217,7 @@ func (*ExecuteAirflowCommandResponse) ProtoMessage() {} func (x *ExecuteAirflowCommandResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,11 +1282,9 @@ type StopAirflowCommandRequest struct { func (x *StopAirflowCommandRequest) Reset() { *x = StopAirflowCommandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAirflowCommandRequest) String() string { @@ -1313,7 +1295,7 @@ func (*StopAirflowCommandRequest) ProtoMessage() {} func (x *StopAirflowCommandRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1359,9 @@ type StopAirflowCommandResponse struct { func (x *StopAirflowCommandResponse) Reset() { *x = StopAirflowCommandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopAirflowCommandResponse) String() string { @@ -1392,7 +1372,7 @@ func (*StopAirflowCommandResponse) ProtoMessage() {} func (x *StopAirflowCommandResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1422,9 @@ type PollAirflowCommandRequest struct { func (x *PollAirflowCommandRequest) Reset() { *x = PollAirflowCommandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PollAirflowCommandRequest) String() string { @@ -1457,7 +1435,7 @@ func (*PollAirflowCommandRequest) ProtoMessage() {} func (x *PollAirflowCommandRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,11 +1502,9 @@ type PollAirflowCommandResponse struct { func (x *PollAirflowCommandResponse) Reset() { *x = PollAirflowCommandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PollAirflowCommandResponse) String() string { @@ -1539,7 +1515,7 @@ func (*PollAirflowCommandResponse) ProtoMessage() {} func (x *PollAirflowCommandResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1590,11 +1566,9 @@ type CreateUserWorkloadsSecretRequest struct { func (x *CreateUserWorkloadsSecretRequest) Reset() { *x = CreateUserWorkloadsSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserWorkloadsSecretRequest) String() string { @@ -1605,7 +1579,7 @@ func (*CreateUserWorkloadsSecretRequest) ProtoMessage() {} func (x *CreateUserWorkloadsSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1647,11 +1621,9 @@ type GetUserWorkloadsSecretRequest struct { func (x *GetUserWorkloadsSecretRequest) Reset() { *x = GetUserWorkloadsSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserWorkloadsSecretRequest) String() string { @@ -1662,7 +1634,7 @@ func (*GetUserWorkloadsSecretRequest) ProtoMessage() {} func (x *GetUserWorkloadsSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1702,11 +1674,9 @@ type ListUserWorkloadsSecretsRequest struct { func (x *ListUserWorkloadsSecretsRequest) Reset() { *x = ListUserWorkloadsSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserWorkloadsSecretsRequest) String() string { @@ -1717,7 +1687,7 @@ func (*ListUserWorkloadsSecretsRequest) ProtoMessage() {} func (x *ListUserWorkloadsSecretsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1765,11 +1735,9 @@ type UpdateUserWorkloadsSecretRequest struct { func (x *UpdateUserWorkloadsSecretRequest) Reset() { *x = UpdateUserWorkloadsSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserWorkloadsSecretRequest) String() string { @@ -1780,7 +1748,7 @@ func (*UpdateUserWorkloadsSecretRequest) ProtoMessage() {} func (x *UpdateUserWorkloadsSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1815,11 +1783,9 @@ type DeleteUserWorkloadsSecretRequest struct { func (x *DeleteUserWorkloadsSecretRequest) Reset() { *x = DeleteUserWorkloadsSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserWorkloadsSecretRequest) String() string { @@ -1830,7 +1796,7 @@ func (*DeleteUserWorkloadsSecretRequest) ProtoMessage() {} func (x *DeleteUserWorkloadsSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1867,11 +1833,9 @@ type CreateUserWorkloadsConfigMapRequest struct { func (x *CreateUserWorkloadsConfigMapRequest) Reset() { *x = CreateUserWorkloadsConfigMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserWorkloadsConfigMapRequest) String() string { @@ -1882,7 +1846,7 @@ func (*CreateUserWorkloadsConfigMapRequest) ProtoMessage() {} func (x *CreateUserWorkloadsConfigMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1924,11 +1888,9 @@ type GetUserWorkloadsConfigMapRequest struct { func (x *GetUserWorkloadsConfigMapRequest) Reset() { *x = GetUserWorkloadsConfigMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserWorkloadsConfigMapRequest) String() string { @@ -1939,7 +1901,7 @@ func (*GetUserWorkloadsConfigMapRequest) ProtoMessage() {} func (x *GetUserWorkloadsConfigMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,11 +1941,9 @@ type ListUserWorkloadsConfigMapsRequest struct { func (x *ListUserWorkloadsConfigMapsRequest) Reset() { *x = ListUserWorkloadsConfigMapsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserWorkloadsConfigMapsRequest) String() string { @@ -1994,7 +1954,7 @@ func (*ListUserWorkloadsConfigMapsRequest) ProtoMessage() {} func (x *ListUserWorkloadsConfigMapsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2042,11 +2002,9 @@ type UpdateUserWorkloadsConfigMapRequest struct { func (x *UpdateUserWorkloadsConfigMapRequest) Reset() { *x = UpdateUserWorkloadsConfigMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserWorkloadsConfigMapRequest) String() string { @@ -2057,7 +2015,7 @@ func (*UpdateUserWorkloadsConfigMapRequest) ProtoMessage() {} func (x *UpdateUserWorkloadsConfigMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,11 +2050,9 @@ type DeleteUserWorkloadsConfigMapRequest struct { func (x *DeleteUserWorkloadsConfigMapRequest) Reset() { *x = DeleteUserWorkloadsConfigMapRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserWorkloadsConfigMapRequest) String() string { @@ -2107,7 +2063,7 @@ func (*DeleteUserWorkloadsConfigMapRequest) ProtoMessage() {} func (x *DeleteUserWorkloadsConfigMapRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2111,9 @@ type UserWorkloadsSecret struct { func (x *UserWorkloadsSecret) Reset() { *x = UserWorkloadsSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserWorkloadsSecret) String() string { @@ -2170,7 +2124,7 @@ func (*UserWorkloadsSecret) ProtoMessage() {} func (x *UserWorkloadsSecret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2213,11 +2167,9 @@ type ListUserWorkloadsSecretsResponse struct { func (x *ListUserWorkloadsSecretsResponse) Reset() { *x = ListUserWorkloadsSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserWorkloadsSecretsResponse) String() string { @@ -2228,7 +2180,7 @@ func (*ListUserWorkloadsSecretsResponse) ProtoMessage() {} func (x *ListUserWorkloadsSecretsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2282,11 +2234,9 @@ type UserWorkloadsConfigMap struct { func (x *UserWorkloadsConfigMap) Reset() { *x = UserWorkloadsConfigMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserWorkloadsConfigMap) String() string { @@ -2297,7 +2247,7 @@ func (*UserWorkloadsConfigMap) ProtoMessage() {} func (x *UserWorkloadsConfigMap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2340,11 +2290,9 @@ type ListUserWorkloadsConfigMapsResponse struct { func (x *ListUserWorkloadsConfigMapsResponse) Reset() { *x = ListUserWorkloadsConfigMapsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserWorkloadsConfigMapsResponse) String() string { @@ -2355,7 +2303,7 @@ func (*ListUserWorkloadsConfigMapsResponse) ProtoMessage() {} func (x *ListUserWorkloadsConfigMapsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2409,11 +2357,9 @@ type ListWorkloadsRequest struct { func (x *ListWorkloadsRequest) Reset() { *x = ListWorkloadsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsRequest) String() string { @@ -2424,7 +2370,7 @@ func (*ListWorkloadsRequest) ProtoMessage() {} func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2481,11 +2427,9 @@ type ListWorkloadsResponse struct { func (x *ListWorkloadsResponse) Reset() { *x = ListWorkloadsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse) String() string { @@ -2496,7 +2440,7 @@ func (*ListWorkloadsResponse) ProtoMessage() {} func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2541,11 +2485,9 @@ type SaveSnapshotRequest struct { func (x *SaveSnapshotRequest) Reset() { *x = SaveSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SaveSnapshotRequest) String() string { @@ -2556,7 +2498,7 @@ func (*SaveSnapshotRequest) ProtoMessage() {} func (x *SaveSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2600,11 +2542,9 @@ type SaveSnapshotResponse struct { func (x *SaveSnapshotResponse) Reset() { *x = SaveSnapshotResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SaveSnapshotResponse) String() string { @@ -2615,7 +2555,7 @@ func (*SaveSnapshotResponse) ProtoMessage() {} func (x *SaveSnapshotResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2665,11 +2605,9 @@ type LoadSnapshotRequest struct { func (x *LoadSnapshotRequest) Reset() { *x = LoadSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadSnapshotRequest) String() string { @@ -2680,7 +2618,7 @@ func (*LoadSnapshotRequest) ProtoMessage() {} func (x *LoadSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2746,11 +2684,9 @@ type LoadSnapshotResponse struct { func (x *LoadSnapshotResponse) Reset() { *x = LoadSnapshotResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadSnapshotResponse) String() string { @@ -2761,7 +2697,7 @@ func (*LoadSnapshotResponse) ProtoMessage() {} func (x *LoadSnapshotResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2790,11 +2726,9 @@ type DatabaseFailoverRequest struct { func (x *DatabaseFailoverRequest) Reset() { *x = DatabaseFailoverRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseFailoverRequest) String() string { @@ -2805,7 +2739,7 @@ func (*DatabaseFailoverRequest) ProtoMessage() {} func (x *DatabaseFailoverRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2836,11 +2770,9 @@ type DatabaseFailoverResponse struct { func (x *DatabaseFailoverResponse) Reset() { *x = DatabaseFailoverResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseFailoverResponse) String() string { @@ -2851,7 +2783,7 @@ func (*DatabaseFailoverResponse) ProtoMessage() {} func (x *DatabaseFailoverResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2879,11 +2811,9 @@ type FetchDatabasePropertiesRequest struct { func (x *FetchDatabasePropertiesRequest) Reset() { *x = FetchDatabasePropertiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDatabasePropertiesRequest) String() string { @@ -2894,7 +2824,7 @@ func (*FetchDatabasePropertiesRequest) ProtoMessage() {} func (x *FetchDatabasePropertiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2935,11 +2865,9 @@ type FetchDatabasePropertiesResponse struct { func (x *FetchDatabasePropertiesResponse) Reset() { *x = FetchDatabasePropertiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDatabasePropertiesResponse) String() string { @@ -2950,7 +2878,7 @@ func (*FetchDatabasePropertiesResponse) ProtoMessage() {} func (x *FetchDatabasePropertiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2999,11 +2927,9 @@ type StorageConfig struct { func (x *StorageConfig) Reset() { *x = StorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageConfig) String() string { @@ -3014,7 +2940,7 @@ func (*StorageConfig) ProtoMessage() {} func (x *StorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3137,11 +3063,9 @@ type EnvironmentConfig struct { func (x *EnvironmentConfig) Reset() { *x = EnvironmentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentConfig) String() string { @@ -3152,7 +3076,7 @@ func (*EnvironmentConfig) ProtoMessage() {} func (x *EnvironmentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3312,11 +3236,9 @@ type WebServerNetworkAccessControl struct { func (x *WebServerNetworkAccessControl) Reset() { *x = WebServerNetworkAccessControl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebServerNetworkAccessControl) String() string { @@ -3327,7 +3249,7 @@ func (*WebServerNetworkAccessControl) ProtoMessage() {} func (x *WebServerNetworkAccessControl) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3372,11 +3294,9 @@ type DatabaseConfig struct { func (x *DatabaseConfig) Reset() { *x = DatabaseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseConfig) String() string { @@ -3387,7 +3307,7 @@ func (*DatabaseConfig) ProtoMessage() {} func (x *DatabaseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3435,11 +3355,9 @@ type WebServerConfig struct { func (x *WebServerConfig) Reset() { *x = WebServerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebServerConfig) String() string { @@ -3450,7 +3368,7 @@ func (*WebServerConfig) ProtoMessage() {} func (x *WebServerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3488,11 +3406,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -3503,7 +3419,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3560,11 +3476,9 @@ type MaintenanceWindow struct { func (x *MaintenanceWindow) Reset() { *x = MaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceWindow) String() string { @@ -3575,7 +3489,7 @@ func (*MaintenanceWindow) ProtoMessage() {} func (x *MaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3717,11 +3631,9 @@ type SoftwareConfig struct { func (x *SoftwareConfig) Reset() { *x = SoftwareConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareConfig) String() string { @@ -3732,7 +3644,7 @@ func (*SoftwareConfig) ProtoMessage() {} func (x *SoftwareConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3835,11 +3747,9 @@ type IPAllocationPolicy struct { func (x *IPAllocationPolicy) Reset() { *x = IPAllocationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IPAllocationPolicy) String() string { @@ -3850,7 +3760,7 @@ func (*IPAllocationPolicy) ProtoMessage() {} func (x *IPAllocationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4117,11 +4027,9 @@ type NodeConfig struct { func (x *NodeConfig) Reset() { *x = NodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeConfig) String() string { @@ -4132,7 +4040,7 @@ func (*NodeConfig) ProtoMessage() {} func (x *NodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4254,11 +4162,9 @@ type PrivateClusterConfig struct { func (x *PrivateClusterConfig) Reset() { *x = PrivateClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateClusterConfig) String() string { @@ -4269,7 +4175,7 @@ func (*PrivateClusterConfig) ProtoMessage() {} func (x *PrivateClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4320,11 +4226,9 @@ type NetworkingConfig struct { func (x *NetworkingConfig) Reset() { *x = NetworkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkingConfig) String() string { @@ -4335,7 +4239,7 @@ func (*NetworkingConfig) ProtoMessage() {} func (x *NetworkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4429,11 +4333,9 @@ type PrivateEnvironmentConfig struct { func (x *PrivateEnvironmentConfig) Reset() { *x = PrivateEnvironmentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateEnvironmentConfig) String() string { @@ -4444,7 +4346,7 @@ func (*PrivateEnvironmentConfig) ProtoMessage() {} func (x *PrivateEnvironmentConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4561,11 +4463,9 @@ type WorkloadsConfig struct { func (x *WorkloadsConfig) Reset() { *x = WorkloadsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig) String() string { @@ -4576,7 +4476,7 @@ func (*WorkloadsConfig) ProtoMessage() {} func (x *WorkloadsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4638,11 +4538,9 @@ type RecoveryConfig struct { func (x *RecoveryConfig) Reset() { *x = RecoveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecoveryConfig) String() string { @@ -4653,7 +4551,7 @@ func (*RecoveryConfig) ProtoMessage() {} func (x *RecoveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4697,11 +4595,9 @@ type ScheduledSnapshotsConfig struct { func (x *ScheduledSnapshotsConfig) Reset() { *x = ScheduledSnapshotsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScheduledSnapshotsConfig) String() string { @@ -4712,7 +4608,7 @@ func (*ScheduledSnapshotsConfig) ProtoMessage() {} func (x *ScheduledSnapshotsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4773,11 +4669,9 @@ type MasterAuthorizedNetworksConfig struct { func (x *MasterAuthorizedNetworksConfig) Reset() { *x = MasterAuthorizedNetworksConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig) String() string { @@ -4788,7 +4682,7 @@ func (*MasterAuthorizedNetworksConfig) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4829,11 +4723,9 @@ type CloudDataLineageIntegration struct { func (x *CloudDataLineageIntegration) Reset() { *x = CloudDataLineageIntegration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDataLineageIntegration) String() string { @@ -4844,7 +4736,7 @@ func (*CloudDataLineageIntegration) ProtoMessage() {} func (x *CloudDataLineageIntegration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4908,11 +4800,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -4923,7 +4813,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5047,11 +4937,9 @@ type CheckUpgradeRequest struct { func (x *CheckUpgradeRequest) Reset() { *x = CheckUpgradeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckUpgradeRequest) String() string { @@ -5062,7 +4950,7 @@ func (*CheckUpgradeRequest) ProtoMessage() {} func (x *CheckUpgradeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5114,11 +5002,9 @@ type CheckUpgradeResponse struct { func (x *CheckUpgradeResponse) Reset() { *x = CheckUpgradeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckUpgradeResponse) String() string { @@ -5129,7 +5015,7 @@ func (*CheckUpgradeResponse) ProtoMessage() {} func (x *CheckUpgradeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5193,11 +5079,9 @@ type DataRetentionConfig struct { func (x *DataRetentionConfig) Reset() { *x = DataRetentionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataRetentionConfig) String() string { @@ -5208,7 +5092,7 @@ func (*DataRetentionConfig) ProtoMessage() {} func (x *DataRetentionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5249,11 +5133,9 @@ type TaskLogsRetentionConfig struct { func (x *TaskLogsRetentionConfig) Reset() { *x = TaskLogsRetentionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskLogsRetentionConfig) String() string { @@ -5264,7 +5146,7 @@ func (*TaskLogsRetentionConfig) ProtoMessage() {} func (x *TaskLogsRetentionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5300,11 +5182,9 @@ type AirflowMetadataRetentionPolicyConfig struct { func (x *AirflowMetadataRetentionPolicyConfig) Reset() { *x = AirflowMetadataRetentionPolicyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AirflowMetadataRetentionPolicyConfig) String() string { @@ -5315,7 +5195,7 @@ func (*AirflowMetadataRetentionPolicyConfig) ProtoMessage() {} func (x *AirflowMetadataRetentionPolicyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5358,11 +5238,9 @@ type PollAirflowCommandResponse_Line struct { func (x *PollAirflowCommandResponse_Line) Reset() { *x = PollAirflowCommandResponse_Line{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PollAirflowCommandResponse_Line) String() string { @@ -5373,7 +5251,7 @@ func (*PollAirflowCommandResponse_Line) ProtoMessage() {} func (x *PollAirflowCommandResponse_Line) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5416,11 +5294,9 @@ type PollAirflowCommandResponse_ExitInfo struct { func (x *PollAirflowCommandResponse_ExitInfo) Reset() { *x = PollAirflowCommandResponse_ExitInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PollAirflowCommandResponse_ExitInfo) String() string { @@ -5431,7 +5307,7 @@ func (*PollAirflowCommandResponse_ExitInfo) ProtoMessage() {} func (x *PollAirflowCommandResponse_ExitInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5476,11 +5352,9 @@ type ListWorkloadsResponse_ComposerWorkload struct { func (x *ListWorkloadsResponse_ComposerWorkload) Reset() { *x = ListWorkloadsResponse_ComposerWorkload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse_ComposerWorkload) String() string { @@ -5491,7 +5365,7 @@ func (*ListWorkloadsResponse_ComposerWorkload) ProtoMessage() {} func (x *ListWorkloadsResponse_ComposerWorkload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5543,11 +5417,9 @@ type ListWorkloadsResponse_ComposerWorkloadStatus struct { func (x *ListWorkloadsResponse_ComposerWorkloadStatus) Reset() { *x = ListWorkloadsResponse_ComposerWorkloadStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkloadsResponse_ComposerWorkloadStatus) String() string { @@ -5558,7 +5430,7 @@ func (*ListWorkloadsResponse_ComposerWorkloadStatus) ProtoMessage() {} func (x *ListWorkloadsResponse_ComposerWorkloadStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5617,11 +5489,9 @@ type WebServerNetworkAccessControl_AllowedIpRange struct { func (x *WebServerNetworkAccessControl_AllowedIpRange) Reset() { *x = WebServerNetworkAccessControl_AllowedIpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebServerNetworkAccessControl_AllowedIpRange) String() string { @@ -5632,7 +5502,7 @@ func (*WebServerNetworkAccessControl_AllowedIpRange) ProtoMessage() {} func (x *WebServerNetworkAccessControl_AllowedIpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5681,11 +5551,9 @@ type WorkloadsConfig_SchedulerResource struct { func (x *WorkloadsConfig_SchedulerResource) Reset() { *x = WorkloadsConfig_SchedulerResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig_SchedulerResource) String() string { @@ -5696,7 +5564,7 @@ func (*WorkloadsConfig_SchedulerResource) ProtoMessage() {} func (x *WorkloadsConfig_SchedulerResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5755,11 +5623,9 @@ type WorkloadsConfig_WebServerResource struct { func (x *WorkloadsConfig_WebServerResource) Reset() { *x = WorkloadsConfig_WebServerResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig_WebServerResource) String() string { @@ -5770,7 +5636,7 @@ func (*WorkloadsConfig_WebServerResource) ProtoMessage() {} func (x *WorkloadsConfig_WebServerResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5828,11 +5694,9 @@ type WorkloadsConfig_WorkerResource struct { func (x *WorkloadsConfig_WorkerResource) Reset() { *x = WorkloadsConfig_WorkerResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig_WorkerResource) String() string { @@ -5843,7 +5707,7 @@ func (*WorkloadsConfig_WorkerResource) ProtoMessage() {} func (x *WorkloadsConfig_WorkerResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5910,11 +5774,9 @@ type WorkloadsConfig_TriggererResource struct { func (x *WorkloadsConfig_TriggererResource) Reset() { *x = WorkloadsConfig_TriggererResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig_TriggererResource) String() string { @@ -5925,7 +5787,7 @@ func (*WorkloadsConfig_TriggererResource) ProtoMessage() {} func (x *WorkloadsConfig_TriggererResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5986,11 +5848,9 @@ type WorkloadsConfig_DagProcessorResource struct { func (x *WorkloadsConfig_DagProcessorResource) Reset() { *x = WorkloadsConfig_DagProcessorResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadsConfig_DagProcessorResource) String() string { @@ -6001,7 +5861,7 @@ func (*WorkloadsConfig_DagProcessorResource) ProtoMessage() {} func (x *WorkloadsConfig_DagProcessorResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6058,11 +5918,9 @@ type MasterAuthorizedNetworksConfig_CidrBlock struct { func (x *MasterAuthorizedNetworksConfig_CidrBlock) Reset() { *x = MasterAuthorizedNetworksConfig_CidrBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig_CidrBlock) String() string { @@ -6073,7 +5931,7 @@ func (*MasterAuthorizedNetworksConfig_CidrBlock) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig_CidrBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7932,860 +7790,6 @@ func file_google_cloud_orchestration_airflow_service_v1_environments_proto_init( return } file_google_cloud_orchestration_airflow_service_v1_operations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEnvironmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteAirflowCommandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteAirflowCommandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StopAirflowCommandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StopAirflowCommandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PollAirflowCommandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PollAirflowCommandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserWorkloadsSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetUserWorkloadsSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListUserWorkloadsSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserWorkloadsSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserWorkloadsSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserWorkloadsConfigMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetUserWorkloadsConfigMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListUserWorkloadsConfigMapsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserWorkloadsConfigMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserWorkloadsConfigMapRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UserWorkloadsSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListUserWorkloadsSecretsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UserWorkloadsConfigMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListUserWorkloadsConfigMapsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SaveSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SaveSnapshotResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*LoadSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*LoadSnapshotResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseFailoverRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseFailoverResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*FetchDatabasePropertiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*FetchDatabasePropertiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*StorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*WebServerNetworkAccessControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*WebServerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*IPAllocationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*NodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*PrivateClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*NetworkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*PrivateEnvironmentConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*RecoveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ScheduledSnapshotsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*CloudDataLineageIntegration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*CheckUpgradeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*CheckUpgradeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*DataRetentionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*TaskLogsRetentionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*AirflowMetadataRetentionPolicyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*PollAirflowCommandResponse_Line); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*PollAirflowCommandResponse_ExitInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse_ComposerWorkload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkloadsResponse_ComposerWorkloadStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*WebServerNetworkAccessControl_AllowedIpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig_SchedulerResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig_WebServerResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig_WorkerResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig_TriggererResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadsConfig_DagProcessorResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig_CidrBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_orchestration_airflow_service_v1_environments_proto_msgTypes[44].OneofWrappers = []any{ (*IPAllocationPolicy_ClusterSecondaryRangeName)(nil), (*IPAllocationPolicy_ClusterIpv4CidrBlock)(nil), diff --git a/orchestration/airflow/service/apiv1/servicepb/image_versions.pb.go b/orchestration/airflow/service/apiv1/servicepb/image_versions.pb.go index f23f163454c5..41388e0cf844 100755 --- a/orchestration/airflow/service/apiv1/servicepb/image_versions.pb.go +++ b/orchestration/airflow/service/apiv1/servicepb/image_versions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orchestration/airflow/service/v1/image_versions.proto @@ -60,11 +60,9 @@ type ListImageVersionsRequest struct { func (x *ListImageVersionsRequest) Reset() { *x = ListImageVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImageVersionsRequest) String() string { @@ -75,7 +73,7 @@ func (*ListImageVersionsRequest) ProtoMessage() {} func (x *ListImageVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type ListImageVersionsResponse struct { func (x *ListImageVersionsResponse) Reset() { *x = ListImageVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListImageVersionsResponse) String() string { @@ -147,7 +143,7 @@ func (*ListImageVersionsResponse) ProtoMessage() {} func (x *ListImageVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,11 +197,9 @@ type ImageVersion struct { func (x *ImageVersion) Reset() { *x = ImageVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageVersion) String() string { @@ -216,7 +210,7 @@ func (*ImageVersion) ProtoMessage() {} func (x *ImageVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,44 +389,6 @@ func file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_ini if File_google_cloud_orchestration_airflow_service_v1_image_versions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListImageVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListImageVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orchestration_airflow_service_v1_image_versions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/orchestration/airflow/service/apiv1/servicepb/operations.pb.go b/orchestration/airflow/service/apiv1/servicepb/operations.pb.go index 027d3387c89f..2153cdedb989 100755 --- a/orchestration/airflow/service/apiv1/servicepb/operations.pb.go +++ b/orchestration/airflow/service/apiv1/servicepb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orchestration/airflow/service/v1/operations.proto @@ -198,11 +198,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orchestration_airflow_service_v1_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orchestration_airflow_service_v1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -213,7 +211,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orchestration_airflow_service_v1_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,20 +370,6 @@ func file_google_cloud_orchestration_airflow_service_v1_operations_proto_init() if File_google_cloud_orchestration_airflow_service_v1_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_orchestration_airflow_service_v1_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/orgpolicy/apiv1/orgpolicypb/orgpolicy.pb.go b/orgpolicy/apiv1/orgpolicypb/orgpolicy.pb.go index 4b288546f8dd..a5a09dbbd55e 100755 --- a/orgpolicy/apiv1/orgpolicypb/orgpolicy.pb.go +++ b/orgpolicy/apiv1/orgpolicypb/orgpolicy.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orgpolicy/v1/orgpolicy.proto @@ -157,11 +157,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -172,7 +170,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +428,9 @@ type Policy_ListPolicy struct { func (x *Policy_ListPolicy) Reset() { *x = Policy_ListPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy_ListPolicy) String() string { @@ -445,7 +441,7 @@ func (*Policy_ListPolicy) ProtoMessage() {} func (x *Policy_ListPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +553,9 @@ type Policy_BooleanPolicy struct { func (x *Policy_BooleanPolicy) Reset() { *x = Policy_BooleanPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy_BooleanPolicy) String() string { @@ -572,7 +566,7 @@ func (*Policy_BooleanPolicy) ProtoMessage() {} func (x *Policy_BooleanPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +608,9 @@ type Policy_RestoreDefault struct { func (x *Policy_RestoreDefault) Reset() { *x = Policy_RestoreDefault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy_RestoreDefault) String() string { @@ -629,7 +621,7 @@ func (*Policy_RestoreDefault) ProtoMessage() {} func (x *Policy_RestoreDefault) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,56 +752,6 @@ func file_google_cloud_orgpolicy_v1_orgpolicy_proto_init() { if File_google_cloud_orgpolicy_v1_orgpolicy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Policy_ListPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Policy_BooleanPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Policy_RestoreDefault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0].OneofWrappers = []any{ (*Policy_ListPolicy_)(nil), (*Policy_BooleanPolicy_)(nil), diff --git a/orgpolicy/apiv2/helpers.go b/orgpolicy/apiv2/helpers.go index a6950750d374..eaef5b93ab2c 100755 --- a/orgpolicy/apiv2/helpers.go +++ b/orgpolicy/apiv2/helpers.go @@ -18,10 +18,20 @@ package orgpolicy import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "orgpolicy.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/orgpolicy/apiv2/org_policy_client.go b/orgpolicy/apiv2/org_policy_client.go index 214b54765b5b..914c3b07da21 100755 --- a/orgpolicy/apiv2/org_policy_client.go +++ b/orgpolicy/apiv2/org_policy_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( orgpolicypb "cloud.google.com/go/orgpolicy/apiv2/orgpolicypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -574,6 +573,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new org policy client based on gRPC. @@ -619,6 +620,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: orgpolicypb.NewOrgPolicyClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -665,6 +667,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new org policy rest client. @@ -701,6 +705,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -764,7 +769,7 @@ func (c *gRPCClient) ListConstraints(ctx context.Context, req *orgpolicypb.ListC } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConstraints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConstraints, req, settings.GRPC, c.logger, "ListConstraints") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *gRPCClient) ListPolicies(ctx context.Context, req *orgpolicypb.ListPoli } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPolicies, req, settings.GRPC, c.logger, "ListPolicies") return err }, opts...) if err != nil { @@ -845,7 +850,7 @@ func (c *gRPCClient) GetPolicy(ctx context.Context, req *orgpolicypb.GetPolicyRe var resp *orgpolicypb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPolicy, req, settings.GRPC, c.logger, "GetPolicy") return err }, opts...) if err != nil { @@ -863,7 +868,7 @@ func (c *gRPCClient) GetEffectivePolicy(ctx context.Context, req *orgpolicypb.Ge var resp *orgpolicypb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEffectivePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEffectivePolicy, req, settings.GRPC, c.logger, "GetEffectivePolicy") return err }, opts...) if err != nil { @@ -881,7 +886,7 @@ func (c *gRPCClient) CreatePolicy(ctx context.Context, req *orgpolicypb.CreatePo var resp *orgpolicypb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePolicy, req, settings.GRPC, c.logger, "CreatePolicy") return err }, opts...) if err != nil { @@ -899,7 +904,7 @@ func (c *gRPCClient) UpdatePolicy(ctx context.Context, req *orgpolicypb.UpdatePo var resp *orgpolicypb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePolicy, req, settings.GRPC, c.logger, "UpdatePolicy") return err }, opts...) if err != nil { @@ -916,7 +921,7 @@ func (c *gRPCClient) DeletePolicy(ctx context.Context, req *orgpolicypb.DeletePo opts = append((*c.CallOptions).DeletePolicy[0:len((*c.CallOptions).DeletePolicy):len((*c.CallOptions).DeletePolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePolicy, req, settings.GRPC, c.logger, "DeletePolicy") return err }, opts...) return err @@ -931,7 +936,7 @@ func (c *gRPCClient) CreateCustomConstraint(ctx context.Context, req *orgpolicyp var resp *orgpolicypb.CustomConstraint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCustomConstraint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCustomConstraint, req, settings.GRPC, c.logger, "CreateCustomConstraint") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *gRPCClient) UpdateCustomConstraint(ctx context.Context, req *orgpolicyp var resp *orgpolicypb.CustomConstraint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCustomConstraint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCustomConstraint, req, settings.GRPC, c.logger, "UpdateCustomConstraint") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *gRPCClient) GetCustomConstraint(ctx context.Context, req *orgpolicypb.G var resp *orgpolicypb.CustomConstraint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCustomConstraint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCustomConstraint, req, settings.GRPC, c.logger, "GetCustomConstraint") return err }, opts...) if err != nil { @@ -996,7 +1001,7 @@ func (c *gRPCClient) ListCustomConstraints(ctx context.Context, req *orgpolicypb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCustomConstraints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCustomConstraints, req, settings.GRPC, c.logger, "ListCustomConstraints") return err }, opts...) if err != nil { @@ -1030,7 +1035,7 @@ func (c *gRPCClient) DeleteCustomConstraint(ctx context.Context, req *orgpolicyp opts = append((*c.CallOptions).DeleteCustomConstraint[0:len((*c.CallOptions).DeleteCustomConstraint):len((*c.CallOptions).DeleteCustomConstraint)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteCustomConstraint(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteCustomConstraint, req, settings.GRPC, c.logger, "DeleteCustomConstraint") return err }, opts...) return err @@ -1081,21 +1086,10 @@ func (c *restClient) ListConstraints(ctx context.Context, req *orgpolicypb.ListC } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConstraints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1170,21 +1164,10 @@ func (c *restClient) ListPolicies(ctx context.Context, req *orgpolicypb.ListPoli } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1251,17 +1234,7 @@ func (c *restClient) GetPolicy(ctx context.Context, req *orgpolicypb.GetPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPolicy") if err != nil { return err } @@ -1316,17 +1289,7 @@ func (c *restClient) GetEffectivePolicy(ctx context.Context, req *orgpolicypb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectivePolicy") if err != nil { return err } @@ -1388,17 +1351,7 @@ func (c *restClient) CreatePolicy(ctx context.Context, req *orgpolicypb.CreatePo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePolicy") if err != nil { return err } @@ -1470,17 +1423,7 @@ func (c *restClient) UpdatePolicy(ctx context.Context, req *orgpolicypb.UpdatePo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePolicy") if err != nil { return err } @@ -1533,15 +1476,8 @@ func (c *restClient) DeletePolicy(ctx context.Context, req *orgpolicypb.DeletePo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePolicy") + return err }, opts...) } @@ -1590,17 +1526,7 @@ func (c *restClient) CreateCustomConstraint(ctx context.Context, req *orgpolicyp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomConstraint") if err != nil { return err } @@ -1663,17 +1589,7 @@ func (c *restClient) UpdateCustomConstraint(ctx context.Context, req *orgpolicyp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomConstraint") if err != nil { return err } @@ -1726,17 +1642,7 @@ func (c *restClient) GetCustomConstraint(ctx context.Context, req *orgpolicypb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomConstraint") if err != nil { return err } @@ -1799,21 +1705,10 @@ func (c *restClient) ListCustomConstraints(ctx context.Context, req *orgpolicypb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomConstraints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1876,14 +1771,7 @@ func (c *restClient) DeleteCustomConstraint(ctx context.Context, req *orgpolicyp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomConstraint") + return err }, opts...) } diff --git a/orgpolicy/apiv2/org_policy_client_example_go123_test.go b/orgpolicy/apiv2/org_policy_client_example_go123_test.go index d9ee56536f37..37653fe6adbf 100644 --- a/orgpolicy/apiv2/org_policy_client_example_go123_test.go +++ b/orgpolicy/apiv2/org_policy_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListConstraints_all() { } for resp, err := range c.ListConstraints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListCustomConstraints_all() { } for resp, err := range c.ListCustomConstraints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListPolicies_all() { } for resp, err := range c.ListPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/orgpolicy/apiv2/orgpolicypb/constraint.pb.go b/orgpolicy/apiv2/orgpolicypb/constraint.pb.go index c5466aa650a2..8300bdd582b3 100755 --- a/orgpolicy/apiv2/orgpolicypb/constraint.pb.go +++ b/orgpolicy/apiv2/orgpolicypb/constraint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orgpolicy/v2/constraint.proto @@ -275,11 +275,9 @@ type Constraint struct { func (x *Constraint) Reset() { *x = Constraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Constraint) String() string { @@ -290,7 +288,7 @@ func (*Constraint) ProtoMessage() {} func (x *Constraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +427,9 @@ type CustomConstraint struct { func (x *CustomConstraint) Reset() { *x = CustomConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConstraint) String() string { @@ -444,7 +440,7 @@ func (*CustomConstraint) ProtoMessage() {} func (x *CustomConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,11 +531,9 @@ type Constraint_ListConstraint struct { func (x *Constraint_ListConstraint) Reset() { *x = Constraint_ListConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Constraint_ListConstraint) String() string { @@ -550,7 +544,7 @@ func (*Constraint_ListConstraint) ProtoMessage() {} func (x *Constraint_ListConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +586,9 @@ type Constraint_BooleanConstraint struct { func (x *Constraint_BooleanConstraint) Reset() { *x = Constraint_BooleanConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Constraint_BooleanConstraint) String() string { @@ -607,7 +599,7 @@ func (*Constraint_BooleanConstraint) ProtoMessage() {} func (x *Constraint_BooleanConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,56 +785,6 @@ func file_google_cloud_orgpolicy_v2_constraint_proto_init() { if File_google_cloud_orgpolicy_v2_constraint_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Constraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Constraint_ListConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Constraint_BooleanConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_orgpolicy_v2_constraint_proto_msgTypes[0].OneofWrappers = []any{ (*Constraint_ListConstraint_)(nil), (*Constraint_BooleanConstraint_)(nil), diff --git a/orgpolicy/apiv2/orgpolicypb/orgpolicy.pb.go b/orgpolicy/apiv2/orgpolicypb/orgpolicy.pb.go index f2414f62c9d4..2ab3e005a8fa 100755 --- a/orgpolicy/apiv2/orgpolicypb/orgpolicy.pb.go +++ b/orgpolicy/apiv2/orgpolicypb/orgpolicy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/orgpolicy/v2/orgpolicy.proto @@ -84,11 +84,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -99,7 +97,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +165,9 @@ type AlternatePolicySpec struct { func (x *AlternatePolicySpec) Reset() { *x = AlternatePolicySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlternatePolicySpec) String() string { @@ -182,7 +178,7 @@ func (*AlternatePolicySpec) ProtoMessage() {} func (x *AlternatePolicySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,11 +257,9 @@ type PolicySpec struct { func (x *PolicySpec) Reset() { *x = PolicySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicySpec) String() string { @@ -276,7 +270,7 @@ func (*PolicySpec) ProtoMessage() {} func (x *PolicySpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +346,9 @@ type ListConstraintsRequest struct { func (x *ListConstraintsRequest) Reset() { *x = ListConstraintsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConstraintsRequest) String() string { @@ -367,7 +359,7 @@ func (*ListConstraintsRequest) ProtoMessage() {} func (x *ListConstraintsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type ListConstraintsResponse struct { func (x *ListConstraintsResponse) Reset() { *x = ListConstraintsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConstraintsResponse) String() string { @@ -433,7 +423,7 @@ func (*ListConstraintsResponse) ProtoMessage() {} func (x *ListConstraintsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +479,9 @@ type ListPoliciesRequest struct { func (x *ListPoliciesRequest) Reset() { *x = ListPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPoliciesRequest) String() string { @@ -504,7 +492,7 @@ func (*ListPoliciesRequest) ProtoMessage() {} func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +546,9 @@ type ListPoliciesResponse struct { func (x *ListPoliciesResponse) Reset() { *x = ListPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPoliciesResponse) String() string { @@ -573,7 +559,7 @@ func (*ListPoliciesResponse) ProtoMessage() {} func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +602,9 @@ type GetPolicyRequest struct { func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyRequest) String() string { @@ -631,7 +615,7 @@ func (*GetPolicyRequest) ProtoMessage() {} func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +651,9 @@ type GetEffectivePolicyRequest struct { func (x *GetEffectivePolicyRequest) Reset() { *x = GetEffectivePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectivePolicyRequest) String() string { @@ -682,7 +664,7 @@ func (*GetEffectivePolicyRequest) ProtoMessage() {} func (x *GetEffectivePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -725,11 +707,9 @@ type CreatePolicyRequest struct { func (x *CreatePolicyRequest) Reset() { *x = CreatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePolicyRequest) String() string { @@ -740,7 +720,7 @@ func (*CreatePolicyRequest) ProtoMessage() {} func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +766,9 @@ type UpdatePolicyRequest struct { func (x *UpdatePolicyRequest) Reset() { *x = UpdatePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePolicyRequest) String() string { @@ -801,7 +779,7 @@ func (*UpdatePolicyRequest) ProtoMessage() {} func (x *UpdatePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +826,9 @@ type DeletePolicyRequest struct { func (x *DeletePolicyRequest) Reset() { *x = DeletePolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePolicyRequest) String() string { @@ -863,7 +839,7 @@ func (*DeletePolicyRequest) ProtoMessage() {} func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +885,9 @@ type CreateCustomConstraintRequest struct { func (x *CreateCustomConstraintRequest) Reset() { *x = CreateCustomConstraintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomConstraintRequest) String() string { @@ -924,7 +898,7 @@ func (*CreateCustomConstraintRequest) ProtoMessage() {} func (x *CreateCustomConstraintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -967,11 +941,9 @@ type GetCustomConstraintRequest struct { func (x *GetCustomConstraintRequest) Reset() { *x = GetCustomConstraintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomConstraintRequest) String() string { @@ -982,7 +954,7 @@ func (*GetCustomConstraintRequest) ProtoMessage() {} func (x *GetCustomConstraintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1000,9 @@ type ListCustomConstraintsRequest struct { func (x *ListCustomConstraintsRequest) Reset() { *x = ListCustomConstraintsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomConstraintsRequest) String() string { @@ -1043,7 +1013,7 @@ func (*ListCustomConstraintsRequest) ProtoMessage() {} func (x *ListCustomConstraintsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,11 +1067,9 @@ type ListCustomConstraintsResponse struct { func (x *ListCustomConstraintsResponse) Reset() { *x = ListCustomConstraintsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomConstraintsResponse) String() string { @@ -1112,7 +1080,7 @@ func (*ListCustomConstraintsResponse) ProtoMessage() {} func (x *ListCustomConstraintsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1122,9 @@ type UpdateCustomConstraintRequest struct { func (x *UpdateCustomConstraintRequest) Reset() { *x = UpdateCustomConstraintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomConstraintRequest) String() string { @@ -1169,7 +1135,7 @@ func (*UpdateCustomConstraintRequest) ProtoMessage() {} func (x *UpdateCustomConstraintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1205,11 +1171,9 @@ type DeleteCustomConstraintRequest struct { func (x *DeleteCustomConstraintRequest) Reset() { *x = DeleteCustomConstraintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomConstraintRequest) String() string { @@ -1220,7 +1184,7 @@ func (*DeleteCustomConstraintRequest) ProtoMessage() {} func (x *DeleteCustomConstraintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,11 +1236,9 @@ type PolicySpec_PolicyRule struct { func (x *PolicySpec_PolicyRule) Reset() { *x = PolicySpec_PolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicySpec_PolicyRule) String() string { @@ -1287,7 +1249,7 @@ func (*PolicySpec_PolicyRule) ProtoMessage() {} func (x *PolicySpec_PolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1411,11 +1373,9 @@ type PolicySpec_PolicyRule_StringValues struct { func (x *PolicySpec_PolicyRule_StringValues) Reset() { *x = PolicySpec_PolicyRule_StringValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicySpec_PolicyRule_StringValues) String() string { @@ -1426,7 +1386,7 @@ func (*PolicySpec_PolicyRule_StringValues) ProtoMessage() {} func (x *PolicySpec_PolicyRule_StringValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1968,248 +1928,6 @@ func file_google_cloud_orgpolicy_v2_orgpolicy_proto_init() { return } file_google_cloud_orgpolicy_v2_constraint_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AlternatePolicySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PolicySpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConstraintsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListConstraintsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectivePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeletePolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomConstraintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomConstraintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomConstraintsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomConstraintsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomConstraintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomConstraintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PolicySpec_PolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PolicySpec_PolicyRule_StringValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_orgpolicy_v2_orgpolicy_proto_msgTypes[18].OneofWrappers = []any{ (*PolicySpec_PolicyRule_Values)(nil), (*PolicySpec_PolicyRule_AllowAll)(nil), diff --git a/osconfig/agentendpoint/apiv1/agent_endpoint_client.go b/osconfig/agentendpoint/apiv1/agent_endpoint_client.go index b794caa7d444..0a9c4ffbda1e 100755 --- a/osconfig/agentendpoint/apiv1/agent_endpoint_client.go +++ b/osconfig/agentendpoint/apiv1/agent_endpoint_client.go @@ -18,6 +18,7 @@ package agentendpoint import ( "context" + "log/slog" "math" "time" @@ -231,6 +232,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new agent endpoint service client based on gRPC. @@ -257,6 +260,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: agentendpointpb.NewAgentEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -296,7 +300,9 @@ func (c *gRPCClient) ReceiveTaskNotification(ctx context.Context, req *agentendp var resp agentendpointpb.AgentEndpointService_ReceiveTaskNotificationClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReceiveTaskNotification") resp, err = c.client.ReceiveTaskNotification(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReceiveTaskNotification") return err }, opts...) if err != nil { @@ -311,7 +317,7 @@ func (c *gRPCClient) StartNextTask(ctx context.Context, req *agentendpointpb.Sta var resp *agentendpointpb.StartNextTaskResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartNextTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartNextTask, req, settings.GRPC, c.logger, "StartNextTask") return err }, opts...) if err != nil { @@ -326,7 +332,7 @@ func (c *gRPCClient) ReportTaskProgress(ctx context.Context, req *agentendpointp var resp *agentendpointpb.ReportTaskProgressResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportTaskProgress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportTaskProgress, req, settings.GRPC, c.logger, "ReportTaskProgress") return err }, opts...) if err != nil { @@ -341,7 +347,7 @@ func (c *gRPCClient) ReportTaskComplete(ctx context.Context, req *agentendpointp var resp *agentendpointpb.ReportTaskCompleteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportTaskComplete(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportTaskComplete, req, settings.GRPC, c.logger, "ReportTaskComplete") return err }, opts...) if err != nil { @@ -356,7 +362,7 @@ func (c *gRPCClient) RegisterAgent(ctx context.Context, req *agentendpointpb.Reg var resp *agentendpointpb.RegisterAgentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RegisterAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RegisterAgent, req, settings.GRPC, c.logger, "RegisterAgent") return err }, opts...) if err != nil { @@ -371,7 +377,7 @@ func (c *gRPCClient) ReportInventory(ctx context.Context, req *agentendpointpb.R var resp *agentendpointpb.ReportInventoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportInventory, req, settings.GRPC, c.logger, "ReportInventory") return err }, opts...) if err != nil { diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/agentendpoint.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/agentendpoint.pb.go index a239e9d92c38..a486d433e58d 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/agentendpoint.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/agentendpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto @@ -56,11 +56,9 @@ type ReceiveTaskNotificationRequest struct { func (x *ReceiveTaskNotificationRequest) Reset() { *x = ReceiveTaskNotificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTaskNotificationRequest) String() string { @@ -71,7 +69,7 @@ func (*ReceiveTaskNotificationRequest) ProtoMessage() {} func (x *ReceiveTaskNotificationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type ReceiveTaskNotificationResponse struct { func (x *ReceiveTaskNotificationResponse) Reset() { *x = ReceiveTaskNotificationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTaskNotificationResponse) String() string { @@ -125,7 +121,7 @@ func (*ReceiveTaskNotificationResponse) ProtoMessage() {} func (x *ReceiveTaskNotificationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +150,9 @@ type StartNextTaskRequest struct { func (x *StartNextTaskRequest) Reset() { *x = StartNextTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNextTaskRequest) String() string { @@ -169,7 +163,7 @@ func (*StartNextTaskRequest) ProtoMessage() {} func (x *StartNextTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +198,9 @@ type StartNextTaskResponse struct { func (x *StartNextTaskResponse) Reset() { *x = StartNextTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNextTaskResponse) String() string { @@ -219,7 +211,7 @@ func (*StartNextTaskResponse) ProtoMessage() {} func (x *StartNextTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +265,9 @@ type ReportTaskProgressRequest struct { func (x *ReportTaskProgressRequest) Reset() { *x = ReportTaskProgressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskProgressRequest) String() string { @@ -288,7 +278,7 @@ func (*ReportTaskProgressRequest) ProtoMessage() {} func (x *ReportTaskProgressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +379,9 @@ type ReportTaskProgressResponse struct { func (x *ReportTaskProgressResponse) Reset() { *x = ReportTaskProgressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskProgressResponse) String() string { @@ -404,7 +392,7 @@ func (*ReportTaskProgressResponse) ProtoMessage() {} func (x *ReportTaskProgressResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -460,11 +448,9 @@ type ReportTaskCompleteRequest struct { func (x *ReportTaskCompleteRequest) Reset() { *x = ReportTaskCompleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskCompleteRequest) String() string { @@ -475,7 +461,7 @@ func (*ReportTaskCompleteRequest) ProtoMessage() {} func (x *ReportTaskCompleteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +566,9 @@ type ReportTaskCompleteResponse struct { func (x *ReportTaskCompleteResponse) Reset() { *x = ReportTaskCompleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskCompleteResponse) String() string { @@ -595,7 +579,7 @@ func (*ReportTaskCompleteResponse) ProtoMessage() {} func (x *ReportTaskCompleteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +626,9 @@ type RegisterAgentRequest struct { func (x *RegisterAgentRequest) Reset() { *x = RegisterAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterAgentRequest) String() string { @@ -657,7 +639,7 @@ func (*RegisterAgentRequest) ProtoMessage() {} func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +712,9 @@ type RegisterAgentResponse struct { func (x *RegisterAgentResponse) Reset() { *x = RegisterAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterAgentResponse) String() string { @@ -745,7 +725,7 @@ func (*RegisterAgentResponse) ProtoMessage() {} func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +762,9 @@ type ReportInventoryRequest struct { func (x *ReportInventoryRequest) Reset() { *x = ReportInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportInventoryRequest) String() string { @@ -797,7 +775,7 @@ func (*ReportInventoryRequest) ProtoMessage() {} func (x *ReportInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +823,9 @@ type ReportInventoryResponse struct { func (x *ReportInventoryResponse) Reset() { *x = ReportInventoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportInventoryResponse) String() string { @@ -860,7 +836,7 @@ func (*ReportInventoryResponse) ProtoMessage() {} func (x *ReportInventoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,152 +1188,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_init() { } file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_init() file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTaskNotificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTaskNotificationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StartNextTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StartNextTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskProgressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskProgressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskCompleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskCompleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RegisterAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RegisterAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ReportInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ReportInventoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_agentendpoint_proto_msgTypes[4].OneofWrappers = []any{ (*ReportTaskProgressRequest_ApplyPatchesTaskProgress)(nil), (*ReportTaskProgressRequest_ExecStepTaskProgress)(nil), diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/config_common.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/config_common.pb.go index 757f86917fae..1bda40211f41 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/config_common.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/config_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/config_common.proto @@ -235,11 +235,9 @@ type OSPolicyResourceConfigStep struct { func (x *OSPolicyResourceConfigStep) Reset() { *x = OSPolicyResourceConfigStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceConfigStep) String() string { @@ -250,7 +248,7 @@ func (*OSPolicyResourceConfigStep) ProtoMessage() {} func (x *OSPolicyResourceConfigStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +307,9 @@ type OSPolicyResourceCompliance struct { func (x *OSPolicyResourceCompliance) Reset() { *x = OSPolicyResourceCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceCompliance) String() string { @@ -324,7 +320,7 @@ func (*OSPolicyResourceCompliance) ProtoMessage() {} func (x *OSPolicyResourceCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +394,9 @@ type OSPolicyResourceCompliance_ExecResourceOutput struct { func (x *OSPolicyResourceCompliance_ExecResourceOutput) Reset() { *x = OSPolicyResourceCompliance_ExecResourceOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceCompliance_ExecResourceOutput) String() string { @@ -413,7 +407,7 @@ func (*OSPolicyResourceCompliance_ExecResourceOutput) ProtoMessage() {} func (x *OSPolicyResourceCompliance_ExecResourceOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,44 +560,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_init() { if File_google_cloud_osconfig_agentendpoint_v1_config_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceConfigStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceCompliance_ExecResourceOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_msgTypes[1].OneofWrappers = []any{ (*OSPolicyResourceCompliance_ExecResourceOutput_)(nil), } diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/inventory.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/inventory.pb.go index 3f6209ed64a5..e36fb2e245fa 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/inventory.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/inventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/inventory.proto @@ -55,11 +55,9 @@ type Inventory struct { func (x *Inventory) Reset() { *x = Inventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory) String() string { @@ -70,7 +68,7 @@ func (*Inventory) ProtoMessage() {} func (x *Inventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,11 +133,9 @@ type Inventory_OsInfo struct { func (x *Inventory_OsInfo) Reset() { *x = Inventory_OsInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_OsInfo) String() string { @@ -150,7 +146,7 @@ func (*Inventory_OsInfo) ProtoMessage() {} func (x *Inventory_OsInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +241,9 @@ type Inventory_SoftwarePackage struct { func (x *Inventory_SoftwarePackage) Reset() { *x = Inventory_SoftwarePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_SoftwarePackage) String() string { @@ -260,7 +254,7 @@ func (*Inventory_SoftwarePackage) ProtoMessage() {} func (x *Inventory_SoftwarePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +441,9 @@ type Inventory_VersionedPackage struct { func (x *Inventory_VersionedPackage) Reset() { *x = Inventory_VersionedPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_VersionedPackage) String() string { @@ -462,7 +454,7 @@ func (*Inventory_VersionedPackage) ProtoMessage() {} func (x *Inventory_VersionedPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +515,9 @@ type Inventory_ZypperPatch struct { func (x *Inventory_ZypperPatch) Reset() { *x = Inventory_ZypperPatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_ZypperPatch) String() string { @@ -538,7 +528,7 @@ func (*Inventory_ZypperPatch) ProtoMessage() {} func (x *Inventory_ZypperPatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +606,9 @@ type Inventory_WindowsUpdatePackage struct { func (x *Inventory_WindowsUpdatePackage) Reset() { *x = Inventory_WindowsUpdatePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage) String() string { @@ -631,7 +619,7 @@ func (*Inventory_WindowsUpdatePackage) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +718,9 @@ type Inventory_WindowsQuickFixEngineeringPackage struct { func (x *Inventory_WindowsQuickFixEngineeringPackage) Reset() { *x = Inventory_WindowsQuickFixEngineeringPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsQuickFixEngineeringPackage) String() string { @@ -745,7 +731,7 @@ func (*Inventory_WindowsQuickFixEngineeringPackage) ProtoMessage() {} func (x *Inventory_WindowsQuickFixEngineeringPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +796,9 @@ type Inventory_WindowsApplication struct { func (x *Inventory_WindowsApplication) Reset() { *x = Inventory_WindowsApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsApplication) String() string { @@ -825,7 +809,7 @@ func (*Inventory_WindowsApplication) ProtoMessage() {} func (x *Inventory_WindowsApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +874,9 @@ type Inventory_VersionedPackage_Source struct { func (x *Inventory_VersionedPackage_Source) Reset() { *x = Inventory_VersionedPackage_Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_VersionedPackage_Source) String() string { @@ -905,7 +887,7 @@ func (*Inventory_VersionedPackage_Source) ProtoMessage() {} func (x *Inventory_VersionedPackage_Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +930,9 @@ type Inventory_WindowsUpdatePackage_WindowsUpdateCategory struct { func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) Reset() { *x = Inventory_WindowsUpdatePackage_WindowsUpdateCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) String() string { @@ -963,7 +943,7 @@ func (*Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,128 +1242,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_init() { if File_google_cloud_osconfig_agentendpoint_v1_inventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Inventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_OsInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_SoftwarePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_VersionedPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_ZypperPatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsQuickFixEngineeringPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_VersionedPackage_Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage_WindowsUpdateCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_inventory_proto_msgTypes[2].OneofWrappers = []any{ (*Inventory_SoftwarePackage_YumPackage)(nil), (*Inventory_SoftwarePackage_AptPackage)(nil), diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/os_policy.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/os_policy.pb.go index b2ff542a5f33..dfaca87e927f 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/os_policy.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/os_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/os_policy.proto @@ -328,11 +328,9 @@ type OSPolicy struct { func (x *OSPolicy) Reset() { *x = OSPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy) String() string { @@ -343,7 +341,7 @@ func (*OSPolicy) ProtoMessage() {} func (x *OSPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +388,9 @@ type OSPolicy_Resource struct { func (x *OSPolicy_Resource) Reset() { *x = OSPolicy_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource) String() string { @@ -405,7 +401,7 @@ func (*OSPolicy_Resource) ProtoMessage() {} func (x *OSPolicy_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +514,9 @@ type OSPolicy_Resource_File struct { func (x *OSPolicy_Resource_File) Reset() { *x = OSPolicy_Resource_File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File) String() string { @@ -533,7 +527,7 @@ func (*OSPolicy_Resource_File) ProtoMessage() {} func (x *OSPolicy_Resource_File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,11 +627,9 @@ type OSPolicy_Resource_PackageResource struct { func (x *OSPolicy_Resource_PackageResource) Reset() { *x = OSPolicy_Resource_PackageResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource) String() string { @@ -648,7 +640,7 @@ func (*OSPolicy_Resource_PackageResource) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +792,9 @@ type OSPolicy_Resource_RepositoryResource struct { func (x *OSPolicy_Resource_RepositoryResource) Reset() { *x = OSPolicy_Resource_RepositoryResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource) String() string { @@ -815,7 +805,7 @@ func (*OSPolicy_Resource_RepositoryResource) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +910,9 @@ type OSPolicy_Resource_ExecResource struct { func (x *OSPolicy_Resource_ExecResource) Reset() { *x = OSPolicy_Resource_ExecResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource) String() string { @@ -935,7 +923,7 @@ func (*OSPolicy_Resource_ExecResource) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +987,9 @@ type OSPolicy_Resource_FileResource struct { func (x *OSPolicy_Resource_FileResource) Reset() { *x = OSPolicy_Resource_FileResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_FileResource) String() string { @@ -1014,7 +1000,7 @@ func (*OSPolicy_Resource_FileResource) ProtoMessage() {} func (x *OSPolicy_Resource_FileResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1090,9 @@ type OSPolicy_Resource_File_Remote struct { func (x *OSPolicy_Resource_File_Remote) Reset() { *x = OSPolicy_Resource_File_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Remote) String() string { @@ -1119,7 +1103,7 @@ func (*OSPolicy_Resource_File_Remote) ProtoMessage() {} func (x *OSPolicy_Resource_File_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1148,9 @@ type OSPolicy_Resource_File_Gcs struct { func (x *OSPolicy_Resource_File_Gcs) Reset() { *x = OSPolicy_Resource_File_Gcs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Gcs) String() string { @@ -1179,7 +1161,7 @@ func (*OSPolicy_Resource_File_Gcs) ProtoMessage() {} func (x *OSPolicy_Resource_File_Gcs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1214,9 @@ type OSPolicy_Resource_PackageResource_Deb struct { func (x *OSPolicy_Resource_PackageResource_Deb) Reset() { *x = OSPolicy_Resource_PackageResource_Deb{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Deb) String() string { @@ -1247,7 +1227,7 @@ func (*OSPolicy_Resource_PackageResource_Deb) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Deb) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1270,9 @@ type OSPolicy_Resource_PackageResource_APT struct { func (x *OSPolicy_Resource_PackageResource_APT) Reset() { *x = OSPolicy_Resource_PackageResource_APT{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_APT) String() string { @@ -1305,7 +1283,7 @@ func (*OSPolicy_Resource_PackageResource_APT) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_APT) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1322,9 @@ type OSPolicy_Resource_PackageResource_RPM struct { func (x *OSPolicy_Resource_PackageResource_RPM) Reset() { *x = OSPolicy_Resource_PackageResource_RPM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_RPM) String() string { @@ -1359,7 +1335,7 @@ func (*OSPolicy_Resource_PackageResource_RPM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_RPM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1402,11 +1378,9 @@ type OSPolicy_Resource_PackageResource_YUM struct { func (x *OSPolicy_Resource_PackageResource_YUM) Reset() { *x = OSPolicy_Resource_PackageResource_YUM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_YUM) String() string { @@ -1417,7 +1391,7 @@ func (*OSPolicy_Resource_PackageResource_YUM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_YUM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1453,11 +1427,9 @@ type OSPolicy_Resource_PackageResource_Zypper struct { func (x *OSPolicy_Resource_PackageResource_Zypper) Reset() { *x = OSPolicy_Resource_PackageResource_Zypper{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Zypper) String() string { @@ -1468,7 +1440,7 @@ func (*OSPolicy_Resource_PackageResource_Zypper) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Zypper) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1504,11 +1476,9 @@ type OSPolicy_Resource_PackageResource_GooGet struct { func (x *OSPolicy_Resource_PackageResource_GooGet) Reset() { *x = OSPolicy_Resource_PackageResource_GooGet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_GooGet) String() string { @@ -1519,7 +1489,7 @@ func (*OSPolicy_Resource_PackageResource_GooGet) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_GooGet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1528,9 @@ type OSPolicy_Resource_PackageResource_MSI struct { func (x *OSPolicy_Resource_PackageResource_MSI) Reset() { *x = OSPolicy_Resource_PackageResource_MSI{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_MSI) String() string { @@ -1573,7 +1541,7 @@ func (*OSPolicy_Resource_PackageResource_MSI) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_MSI) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1627,11 +1595,9 @@ type OSPolicy_Resource_RepositoryResource_AptRepository struct { func (x *OSPolicy_Resource_RepositoryResource_AptRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_AptRepository) String() string { @@ -1642,7 +1608,7 @@ func (*OSPolicy_Resource_RepositoryResource_AptRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1681,9 @@ type OSPolicy_Resource_RepositoryResource_YumRepository struct { func (x *OSPolicy_Resource_RepositoryResource_YumRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_YumRepository) String() string { @@ -1730,7 +1694,7 @@ func (*OSPolicy_Resource_RepositoryResource_YumRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1796,11 +1760,9 @@ type OSPolicy_Resource_RepositoryResource_ZypperRepository struct { func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_ZypperRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) String() string { @@ -1811,7 +1773,7 @@ func (*OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1832,9 @@ type OSPolicy_Resource_RepositoryResource_GooRepository struct { func (x *OSPolicy_Resource_RepositoryResource_GooRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_GooRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_GooRepository) String() string { @@ -1885,7 +1845,7 @@ func (*OSPolicy_Resource_RepositoryResource_GooRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_GooRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1942,11 +1902,9 @@ type OSPolicy_Resource_ExecResource_Exec struct { func (x *OSPolicy_Resource_ExecResource_Exec) Reset() { *x = OSPolicy_Resource_ExecResource_Exec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource_Exec) String() string { @@ -1957,7 +1915,7 @@ func (*OSPolicy_Resource_ExecResource_Exec) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource_Exec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2430,260 +2388,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_init() { if File_google_cloud_osconfig_agentendpoint_v1_os_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_FileResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Gcs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Deb); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_APT); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_RPM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_YUM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Zypper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_GooGet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_MSI); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_ZypperRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_GooRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource_Exec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_msgTypes[1].OneofWrappers = []any{ (*OSPolicy_Resource_Pkg)(nil), (*OSPolicy_Resource_Repository)(nil), diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/patch_jobs.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/patch_jobs.pb.go index 8551ca2703a4..4fd733b780a8 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/patch_jobs.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/patch_jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/patch_jobs.proto @@ -343,11 +343,9 @@ type PatchConfig struct { func (x *PatchConfig) Reset() { *x = PatchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchConfig) String() string { @@ -358,7 +356,7 @@ func (*PatchConfig) ProtoMessage() {} func (x *PatchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +462,9 @@ type AptSettings struct { func (x *AptSettings) Reset() { *x = AptSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptSettings) String() string { @@ -479,7 +475,7 @@ func (*AptSettings) ProtoMessage() {} func (x *AptSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +537,9 @@ type YumSettings struct { func (x *YumSettings) Reset() { *x = YumSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumSettings) String() string { @@ -556,7 +550,7 @@ func (*YumSettings) ProtoMessage() {} func (x *YumSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +602,9 @@ type GooSettings struct { func (x *GooSettings) Reset() { *x = GooSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooSettings) String() string { @@ -623,7 +615,7 @@ func (*GooSettings) ProtoMessage() {} func (x *GooSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +657,9 @@ type ZypperSettings struct { func (x *ZypperSettings) Reset() { *x = ZypperSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperSettings) String() string { @@ -680,7 +670,7 @@ func (*ZypperSettings) ProtoMessage() {} func (x *ZypperSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +746,9 @@ type WindowsUpdateSettings struct { func (x *WindowsUpdateSettings) Reset() { *x = WindowsUpdateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsUpdateSettings) String() string { @@ -771,7 +759,7 @@ func (*WindowsUpdateSettings) ProtoMessage() {} func (x *WindowsUpdateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +808,9 @@ type RetryStrategy struct { func (x *RetryStrategy) Reset() { *x = RetryStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryStrategy) String() string { @@ -835,7 +821,7 @@ func (*RetryStrategy) ProtoMessage() {} func (x *RetryStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +857,9 @@ type ExecStep struct { func (x *ExecStep) Reset() { *x = ExecStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStep) String() string { @@ -886,7 +870,7 @@ func (*ExecStep) ProtoMessage() {} func (x *ExecStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +924,9 @@ type ExecStepConfig struct { func (x *ExecStepConfig) Reset() { *x = ExecStepConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepConfig) String() string { @@ -955,7 +937,7 @@ func (*ExecStepConfig) ProtoMessage() {} func (x *ExecStepConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,11 +1022,9 @@ type GcsObject struct { func (x *GcsObject) Reset() { *x = GcsObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsObject) String() string { @@ -1055,7 +1035,7 @@ func (*GcsObject) ProtoMessage() {} func (x *GcsObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1337,128 +1317,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_init() { if File_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PatchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AptSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*YumSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GooSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ZypperSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WindowsUpdateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RetryStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExecStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GcsObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_msgTypes[8].OneofWrappers = []any{ (*ExecStepConfig_LocalPath)(nil), (*ExecStepConfig_GcsObject)(nil), diff --git a/osconfig/agentendpoint/apiv1/agentendpointpb/tasks.pb.go b/osconfig/agentendpoint/apiv1/agentendpointpb/tasks.pb.go index 70615c839db7..d07ebb418bd9 100755 --- a/osconfig/agentendpoint/apiv1/agentendpointpb/tasks.pb.go +++ b/osconfig/agentendpoint/apiv1/agentendpointpb/tasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1/tasks.proto @@ -514,11 +514,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -529,7 +527,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +638,9 @@ type ApplyPatchesTask struct { func (x *ApplyPatchesTask) Reset() { *x = ApplyPatchesTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTask) String() string { @@ -655,7 +651,7 @@ func (*ApplyPatchesTask) ProtoMessage() {} func (x *ApplyPatchesTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +692,9 @@ type ApplyPatchesTaskProgress struct { func (x *ApplyPatchesTaskProgress) Reset() { *x = ApplyPatchesTaskProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTaskProgress) String() string { @@ -711,7 +705,7 @@ func (*ApplyPatchesTaskProgress) ProtoMessage() {} func (x *ApplyPatchesTaskProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,11 +739,9 @@ type ApplyPatchesTaskOutput struct { func (x *ApplyPatchesTaskOutput) Reset() { *x = ApplyPatchesTaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTaskOutput) String() string { @@ -760,7 +752,7 @@ func (*ApplyPatchesTaskOutput) ProtoMessage() {} func (x *ApplyPatchesTaskOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +786,9 @@ type ExecStepTask struct { func (x *ExecStepTask) Reset() { *x = ExecStepTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTask) String() string { @@ -809,7 +799,7 @@ func (*ExecStepTask) ProtoMessage() {} func (x *ExecStepTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +833,9 @@ type ExecStepTaskProgress struct { func (x *ExecStepTaskProgress) Reset() { *x = ExecStepTaskProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTaskProgress) String() string { @@ -858,7 +846,7 @@ func (*ExecStepTaskProgress) ProtoMessage() {} func (x *ExecStepTaskProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +883,9 @@ type ExecStepTaskOutput struct { func (x *ExecStepTaskOutput) Reset() { *x = ExecStepTaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTaskOutput) String() string { @@ -910,7 +896,7 @@ func (*ExecStepTaskOutput) ProtoMessage() {} func (x *ExecStepTaskOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +938,9 @@ type ApplyConfigTask struct { func (x *ApplyConfigTask) Reset() { *x = ApplyConfigTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConfigTask) String() string { @@ -967,7 +951,7 @@ func (*ApplyConfigTask) ProtoMessage() {} func (x *ApplyConfigTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +986,9 @@ type ApplyConfigTaskProgress struct { func (x *ApplyConfigTaskProgress) Reset() { *x = ApplyConfigTaskProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConfigTaskProgress) String() string { @@ -1017,7 +999,7 @@ func (*ApplyConfigTaskProgress) ProtoMessage() {} func (x *ApplyConfigTaskProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1036,9 @@ type ApplyConfigTaskOutput struct { func (x *ApplyConfigTaskOutput) Reset() { *x = ApplyConfigTaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConfigTaskOutput) String() string { @@ -1069,7 +1049,7 @@ func (*ApplyConfigTaskOutput) ProtoMessage() {} func (x *ApplyConfigTaskOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1102,9 @@ type ApplyConfigTask_OSPolicy struct { func (x *ApplyConfigTask_OSPolicy) Reset() { *x = ApplyConfigTask_OSPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConfigTask_OSPolicy) String() string { @@ -1137,7 +1115,7 @@ func (*ApplyConfigTask_OSPolicy) ProtoMessage() {} func (x *ApplyConfigTask_OSPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,11 +1178,9 @@ type ApplyConfigTaskOutput_OSPolicyResult struct { func (x *ApplyConfigTaskOutput_OSPolicyResult) Reset() { *x = ApplyConfigTaskOutput_OSPolicyResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyConfigTaskOutput_OSPolicyResult) String() string { @@ -1215,7 +1191,7 @@ func (*ApplyConfigTaskOutput_OSPolicyResult) ProtoMessage() {} func (x *ApplyConfigTaskOutput_OSPolicyResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,152 +1544,6 @@ func file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_init() { file_google_cloud_osconfig_agentendpoint_v1_config_common_proto_init() file_google_cloud_osconfig_agentendpoint_v1_os_policy_proto_init() file_google_cloud_osconfig_agentendpoint_v1_patch_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTaskProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTaskProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConfigTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConfigTaskProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConfigTaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConfigTask_OSPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ApplyConfigTaskOutput_OSPolicyResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1_tasks_proto_msgTypes[0].OneofWrappers = []any{ (*Task_ApplyPatchesTask)(nil), (*Task_ExecStepTask)(nil), diff --git a/osconfig/agentendpoint/apiv1/helpers.go b/osconfig/agentendpoint/apiv1/helpers.go index a9c378aaf837..d0e407b6f415 100755 --- a/osconfig/agentendpoint/apiv1/helpers.go +++ b/osconfig/agentendpoint/apiv1/helpers.go @@ -18,10 +18,20 @@ package agentendpoint import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "osconfig.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/osconfig/agentendpoint/apiv1beta/agent_endpoint_client.go b/osconfig/agentendpoint/apiv1beta/agent_endpoint_client.go index 808702b34d6d..e38d7f4eb339 100755 --- a/osconfig/agentendpoint/apiv1beta/agent_endpoint_client.go +++ b/osconfig/agentendpoint/apiv1beta/agent_endpoint_client.go @@ -18,6 +18,7 @@ package agentendpoint import ( "context" + "log/slog" "math" "time" @@ -232,6 +233,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new agent endpoint service client based on gRPC. @@ -258,6 +261,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: agentendpointpb.NewAgentEndpointServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -297,7 +301,9 @@ func (c *gRPCClient) ReceiveTaskNotification(ctx context.Context, req *agentendp var resp agentendpointpb.AgentEndpointService_ReceiveTaskNotificationClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReceiveTaskNotification") resp, err = c.client.ReceiveTaskNotification(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReceiveTaskNotification") return err }, opts...) if err != nil { @@ -312,7 +318,7 @@ func (c *gRPCClient) StartNextTask(ctx context.Context, req *agentendpointpb.Sta var resp *agentendpointpb.StartNextTaskResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartNextTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartNextTask, req, settings.GRPC, c.logger, "StartNextTask") return err }, opts...) if err != nil { @@ -327,7 +333,7 @@ func (c *gRPCClient) ReportTaskProgress(ctx context.Context, req *agentendpointp var resp *agentendpointpb.ReportTaskProgressResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportTaskProgress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportTaskProgress, req, settings.GRPC, c.logger, "ReportTaskProgress") return err }, opts...) if err != nil { @@ -342,7 +348,7 @@ func (c *gRPCClient) ReportTaskComplete(ctx context.Context, req *agentendpointp var resp *agentendpointpb.ReportTaskCompleteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReportTaskComplete(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReportTaskComplete, req, settings.GRPC, c.logger, "ReportTaskComplete") return err }, opts...) if err != nil { @@ -357,7 +363,7 @@ func (c *gRPCClient) LookupEffectiveGuestPolicy(ctx context.Context, req *agente var resp *agentendpointpb.EffectiveGuestPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupEffectiveGuestPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupEffectiveGuestPolicy, req, settings.GRPC, c.logger, "LookupEffectiveGuestPolicy") return err }, opts...) if err != nil { @@ -372,7 +378,7 @@ func (c *gRPCClient) RegisterAgent(ctx context.Context, req *agentendpointpb.Reg var resp *agentendpointpb.RegisterAgentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RegisterAgent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RegisterAgent, req, settings.GRPC, c.logger, "RegisterAgent") return err }, opts...) if err != nil { diff --git a/osconfig/agentendpoint/apiv1beta/agentendpointpb/agentendpoint.pb.go b/osconfig/agentendpoint/apiv1beta/agentendpointpb/agentendpoint.pb.go index 98e920d13818..b86a9a746731 100755 --- a/osconfig/agentendpoint/apiv1beta/agentendpointpb/agentendpoint.pb.go +++ b/osconfig/agentendpoint/apiv1beta/agentendpointpb/agentendpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1beta/agentendpoint.proto @@ -56,11 +56,9 @@ type ReceiveTaskNotificationRequest struct { func (x *ReceiveTaskNotificationRequest) Reset() { *x = ReceiveTaskNotificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTaskNotificationRequest) String() string { @@ -71,7 +69,7 @@ func (*ReceiveTaskNotificationRequest) ProtoMessage() {} func (x *ReceiveTaskNotificationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type ReceiveTaskNotificationResponse struct { func (x *ReceiveTaskNotificationResponse) Reset() { *x = ReceiveTaskNotificationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveTaskNotificationResponse) String() string { @@ -125,7 +121,7 @@ func (*ReceiveTaskNotificationResponse) ProtoMessage() {} func (x *ReceiveTaskNotificationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +150,9 @@ type StartNextTaskRequest struct { func (x *StartNextTaskRequest) Reset() { *x = StartNextTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNextTaskRequest) String() string { @@ -169,7 +163,7 @@ func (*StartNextTaskRequest) ProtoMessage() {} func (x *StartNextTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +198,9 @@ type StartNextTaskResponse struct { func (x *StartNextTaskResponse) Reset() { *x = StartNextTaskResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNextTaskResponse) String() string { @@ -219,7 +211,7 @@ func (*StartNextTaskResponse) ProtoMessage() {} func (x *StartNextTaskResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +264,9 @@ type ReportTaskProgressRequest struct { func (x *ReportTaskProgressRequest) Reset() { *x = ReportTaskProgressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskProgressRequest) String() string { @@ -287,7 +277,7 @@ func (*ReportTaskProgressRequest) ProtoMessage() {} func (x *ReportTaskProgressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +364,9 @@ type ReportTaskProgressResponse struct { func (x *ReportTaskProgressResponse) Reset() { *x = ReportTaskProgressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskProgressResponse) String() string { @@ -389,7 +377,7 @@ func (*ReportTaskProgressResponse) ProtoMessage() {} func (x *ReportTaskProgressResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +432,9 @@ type ReportTaskCompleteRequest struct { func (x *ReportTaskCompleteRequest) Reset() { *x = ReportTaskCompleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskCompleteRequest) String() string { @@ -459,7 +445,7 @@ func (*ReportTaskCompleteRequest) ProtoMessage() {} func (x *ReportTaskCompleteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +536,9 @@ type ReportTaskCompleteResponse struct { func (x *ReportTaskCompleteResponse) Reset() { *x = ReportTaskCompleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportTaskCompleteResponse) String() string { @@ -565,7 +549,7 @@ func (*ReportTaskCompleteResponse) ProtoMessage() {} func (x *ReportTaskCompleteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +596,9 @@ type RegisterAgentRequest struct { func (x *RegisterAgentRequest) Reset() { *x = RegisterAgentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterAgentRequest) String() string { @@ -627,7 +609,7 @@ func (*RegisterAgentRequest) ProtoMessage() {} func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,11 +682,9 @@ type RegisterAgentResponse struct { func (x *RegisterAgentResponse) Reset() { *x = RegisterAgentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterAgentResponse) String() string { @@ -715,7 +695,7 @@ func (*RegisterAgentResponse) ProtoMessage() {} func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,128 +1009,6 @@ func file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_init() } file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_init() file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTaskNotificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveTaskNotificationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StartNextTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StartNextTaskResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskProgressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskProgressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskCompleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReportTaskCompleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RegisterAgentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RegisterAgentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1beta_agentendpoint_proto_msgTypes[4].OneofWrappers = []any{ (*ReportTaskProgressRequest_ApplyPatchesTaskProgress)(nil), (*ReportTaskProgressRequest_ExecStepTaskProgress)(nil), diff --git a/osconfig/agentendpoint/apiv1beta/agentendpointpb/guest_policies.pb.go b/osconfig/agentendpoint/apiv1beta/agentendpointpb/guest_policies.pb.go index 9c80603e0155..184b9f7e651f 100755 --- a/osconfig/agentendpoint/apiv1beta/agentendpointpb/guest_policies.pb.go +++ b/osconfig/agentendpoint/apiv1beta/agentendpointpb/guest_policies.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1beta/guest_policies.proto @@ -384,11 +384,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -399,7 +397,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +457,9 @@ type AptRepository struct { func (x *AptRepository) Reset() { *x = AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptRepository) String() string { @@ -474,7 +470,7 @@ func (*AptRepository) ProtoMessage() {} func (x *AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +542,9 @@ type YumRepository struct { func (x *YumRepository) Reset() { *x = YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumRepository) String() string { @@ -561,7 +555,7 @@ func (*YumRepository) ProtoMessage() {} func (x *YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +620,9 @@ type ZypperRepository struct { func (x *ZypperRepository) Reset() { *x = ZypperRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperRepository) String() string { @@ -641,7 +633,7 @@ func (*ZypperRepository) ProtoMessage() {} func (x *ZypperRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +691,9 @@ type GooRepository struct { func (x *GooRepository) Reset() { *x = GooRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooRepository) String() string { @@ -714,7 +704,7 @@ func (*GooRepository) ProtoMessage() {} func (x *GooRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -762,11 +752,9 @@ type PackageRepository struct { func (x *PackageRepository) Reset() { *x = PackageRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PackageRepository) String() string { @@ -777,7 +765,7 @@ func (*PackageRepository) ProtoMessage() {} func (x *PackageRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,11 +918,9 @@ type SoftwareRecipe struct { func (x *SoftwareRecipe) Reset() { *x = SoftwareRecipe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe) String() string { @@ -945,7 +931,7 @@ func (*SoftwareRecipe) ProtoMessage() {} func (x *SoftwareRecipe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1014,9 @@ type LookupEffectiveGuestPolicyRequest struct { func (x *LookupEffectiveGuestPolicyRequest) Reset() { *x = LookupEffectiveGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEffectiveGuestPolicyRequest) String() string { @@ -1043,7 +1027,7 @@ func (*LookupEffectiveGuestPolicyRequest) ProtoMessage() {} func (x *LookupEffectiveGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,11 +1086,9 @@ type EffectiveGuestPolicy struct { func (x *EffectiveGuestPolicy) Reset() { *x = EffectiveGuestPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy) String() string { @@ -1117,7 +1099,7 @@ func (*EffectiveGuestPolicy) ProtoMessage() {} func (x *EffectiveGuestPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1182,11 +1164,9 @@ type SoftwareRecipe_Artifact struct { func (x *SoftwareRecipe_Artifact) Reset() { *x = SoftwareRecipe_Artifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact) String() string { @@ -1197,7 +1177,7 @@ func (*SoftwareRecipe_Artifact) ProtoMessage() {} func (x *SoftwareRecipe_Artifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1267,9 @@ type SoftwareRecipe_Step struct { func (x *SoftwareRecipe_Step) Reset() { *x = SoftwareRecipe_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step) String() string { @@ -1302,7 +1280,7 @@ func (*SoftwareRecipe_Step) ProtoMessage() {} func (x *SoftwareRecipe_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1445,11 +1423,9 @@ type SoftwareRecipe_Artifact_Remote struct { func (x *SoftwareRecipe_Artifact_Remote) Reset() { *x = SoftwareRecipe_Artifact_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact_Remote) String() string { @@ -1460,7 +1436,7 @@ func (*SoftwareRecipe_Artifact_Remote) ProtoMessage() {} func (x *SoftwareRecipe_Artifact_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1492,9 @@ type SoftwareRecipe_Artifact_Gcs struct { func (x *SoftwareRecipe_Artifact_Gcs) Reset() { *x = SoftwareRecipe_Artifact_Gcs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact_Gcs) String() string { @@ -1531,7 +1505,7 @@ func (*SoftwareRecipe_Artifact_Gcs) ProtoMessage() {} func (x *SoftwareRecipe_Artifact_Gcs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1599,11 +1573,9 @@ type SoftwareRecipe_Step_CopyFile struct { func (x *SoftwareRecipe_Step_CopyFile) Reset() { *x = SoftwareRecipe_Step_CopyFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_CopyFile) String() string { @@ -1614,7 +1586,7 @@ func (*SoftwareRecipe_Step_CopyFile) ProtoMessage() {} func (x *SoftwareRecipe_Step_CopyFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1646,9 @@ type SoftwareRecipe_Step_ExtractArchive struct { func (x *SoftwareRecipe_Step_ExtractArchive) Reset() { *x = SoftwareRecipe_Step_ExtractArchive{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_ExtractArchive) String() string { @@ -1689,7 +1659,7 @@ func (*SoftwareRecipe_Step_ExtractArchive) ProtoMessage() {} func (x *SoftwareRecipe_Step_ExtractArchive) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1743,11 +1713,9 @@ type SoftwareRecipe_Step_InstallMsi struct { func (x *SoftwareRecipe_Step_InstallMsi) Reset() { *x = SoftwareRecipe_Step_InstallMsi{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallMsi) String() string { @@ -1758,7 +1726,7 @@ func (*SoftwareRecipe_Step_InstallMsi) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallMsi) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1774,9 @@ type SoftwareRecipe_Step_InstallDpkg struct { func (x *SoftwareRecipe_Step_InstallDpkg) Reset() { *x = SoftwareRecipe_Step_InstallDpkg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallDpkg) String() string { @@ -1821,7 +1787,7 @@ func (*SoftwareRecipe_Step_InstallDpkg) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallDpkg) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1821,9 @@ type SoftwareRecipe_Step_InstallRpm struct { func (x *SoftwareRecipe_Step_InstallRpm) Reset() { *x = SoftwareRecipe_Step_InstallRpm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallRpm) String() string { @@ -1870,7 +1834,7 @@ func (*SoftwareRecipe_Step_InstallRpm) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallRpm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1914,11 +1878,9 @@ type SoftwareRecipe_Step_ExecFile struct { func (x *SoftwareRecipe_Step_ExecFile) Reset() { *x = SoftwareRecipe_Step_ExecFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_ExecFile) String() string { @@ -1929,7 +1891,7 @@ func (*SoftwareRecipe_Step_ExecFile) ProtoMessage() {} func (x *SoftwareRecipe_Step_ExecFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2017,11 +1979,9 @@ type SoftwareRecipe_Step_RunScript struct { func (x *SoftwareRecipe_Step_RunScript) Reset() { *x = SoftwareRecipe_Step_RunScript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_RunScript) String() string { @@ -2032,7 +1992,7 @@ func (*SoftwareRecipe_Step_RunScript) ProtoMessage() {} func (x *SoftwareRecipe_Step_RunScript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,11 +2042,9 @@ type EffectiveGuestPolicy_SourcedPackage struct { func (x *EffectiveGuestPolicy_SourcedPackage) Reset() { *x = EffectiveGuestPolicy_SourcedPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedPackage) String() string { @@ -2097,7 +2055,7 @@ func (*EffectiveGuestPolicy_SourcedPackage) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2140,11 +2098,9 @@ type EffectiveGuestPolicy_SourcedPackageRepository struct { func (x *EffectiveGuestPolicy_SourcedPackageRepository) Reset() { *x = EffectiveGuestPolicy_SourcedPackageRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedPackageRepository) String() string { @@ -2155,7 +2111,7 @@ func (*EffectiveGuestPolicy_SourcedPackageRepository) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedPackageRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2198,11 +2154,9 @@ type EffectiveGuestPolicy_SourcedSoftwareRecipe struct { func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) Reset() { *x = EffectiveGuestPolicy_SourcedSoftwareRecipe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) String() string { @@ -2213,7 +2167,7 @@ func (*EffectiveGuestPolicy_SourcedSoftwareRecipe) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2679,284 +2633,6 @@ func file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_init() if File_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ZypperRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GooRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PackageRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LookupEffectiveGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact_Gcs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_CopyFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_ExtractArchive); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallMsi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallDpkg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallRpm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_ExecFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_RunScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedPackageRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedSoftwareRecipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1beta_guest_policies_proto_msgTypes[5].OneofWrappers = []any{ (*PackageRepository_Apt)(nil), (*PackageRepository_Yum)(nil), diff --git a/osconfig/agentendpoint/apiv1beta/agentendpointpb/patch_jobs.pb.go b/osconfig/agentendpoint/apiv1beta/agentendpointpb/patch_jobs.pb.go index 2c9dac6f4254..0d8a6a84929f 100755 --- a/osconfig/agentendpoint/apiv1beta/agentendpointpb/patch_jobs.pb.go +++ b/osconfig/agentendpoint/apiv1beta/agentendpointpb/patch_jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1beta/patch_jobs.proto @@ -341,11 +341,9 @@ type PatchConfig struct { func (x *PatchConfig) Reset() { *x = PatchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchConfig) String() string { @@ -356,7 +354,7 @@ func (*PatchConfig) ProtoMessage() {} func (x *PatchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +460,9 @@ type AptSettings struct { func (x *AptSettings) Reset() { *x = AptSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptSettings) String() string { @@ -477,7 +473,7 @@ func (*AptSettings) ProtoMessage() {} func (x *AptSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +535,9 @@ type YumSettings struct { func (x *YumSettings) Reset() { *x = YumSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumSettings) String() string { @@ -554,7 +548,7 @@ func (*YumSettings) ProtoMessage() {} func (x *YumSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +600,9 @@ type GooSettings struct { func (x *GooSettings) Reset() { *x = GooSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooSettings) String() string { @@ -621,7 +613,7 @@ func (*GooSettings) ProtoMessage() {} func (x *GooSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +655,9 @@ type ZypperSettings struct { func (x *ZypperSettings) Reset() { *x = ZypperSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperSettings) String() string { @@ -678,7 +668,7 @@ func (*ZypperSettings) ProtoMessage() {} func (x *ZypperSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +744,9 @@ type WindowsUpdateSettings struct { func (x *WindowsUpdateSettings) Reset() { *x = WindowsUpdateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsUpdateSettings) String() string { @@ -769,7 +757,7 @@ func (*WindowsUpdateSettings) ProtoMessage() {} func (x *WindowsUpdateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +806,9 @@ type RetryStrategy struct { func (x *RetryStrategy) Reset() { *x = RetryStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryStrategy) String() string { @@ -833,7 +819,7 @@ func (*RetryStrategy) ProtoMessage() {} func (x *RetryStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +855,9 @@ type ExecStep struct { func (x *ExecStep) Reset() { *x = ExecStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStep) String() string { @@ -884,7 +868,7 @@ func (*ExecStep) ProtoMessage() {} func (x *ExecStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +922,9 @@ type ExecStepConfig struct { func (x *ExecStepConfig) Reset() { *x = ExecStepConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepConfig) String() string { @@ -953,7 +935,7 @@ func (*ExecStepConfig) ProtoMessage() {} func (x *ExecStepConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1020,9 @@ type GcsObject struct { func (x *GcsObject) Reset() { *x = GcsObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsObject) String() string { @@ -1053,7 +1033,7 @@ func (*GcsObject) ProtoMessage() {} func (x *GcsObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,128 +1322,6 @@ func file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_init() { if File_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PatchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AptSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*YumSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GooSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ZypperSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WindowsUpdateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RetryStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExecStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GcsObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_msgTypes[8].OneofWrappers = []any{ (*ExecStepConfig_LocalPath)(nil), (*ExecStepConfig_GcsObject)(nil), diff --git a/osconfig/agentendpoint/apiv1beta/agentendpointpb/tasks.pb.go b/osconfig/agentendpoint/apiv1beta/agentendpointpb/tasks.pb.go index fcdb715d558b..db1b9de4c2d7 100755 --- a/osconfig/agentendpoint/apiv1beta/agentendpointpb/tasks.pb.go +++ b/osconfig/agentendpoint/apiv1beta/agentendpointpb/tasks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/agentendpoint/v1beta/tasks.proto @@ -398,11 +398,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -413,7 +411,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +508,9 @@ type ApplyPatchesTask struct { func (x *ApplyPatchesTask) Reset() { *x = ApplyPatchesTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTask) String() string { @@ -525,7 +521,7 @@ func (*ApplyPatchesTask) ProtoMessage() {} func (x *ApplyPatchesTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +562,9 @@ type ApplyPatchesTaskProgress struct { func (x *ApplyPatchesTaskProgress) Reset() { *x = ApplyPatchesTaskProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTaskProgress) String() string { @@ -581,7 +575,7 @@ func (*ApplyPatchesTaskProgress) ProtoMessage() {} func (x *ApplyPatchesTaskProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +609,9 @@ type ApplyPatchesTaskOutput struct { func (x *ApplyPatchesTaskOutput) Reset() { *x = ApplyPatchesTaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyPatchesTaskOutput) String() string { @@ -630,7 +622,7 @@ func (*ApplyPatchesTaskOutput) ProtoMessage() {} func (x *ApplyPatchesTaskOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +656,9 @@ type ExecStepTask struct { func (x *ExecStepTask) Reset() { *x = ExecStepTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTask) String() string { @@ -679,7 +669,7 @@ func (*ExecStepTask) ProtoMessage() {} func (x *ExecStepTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,11 +703,9 @@ type ExecStepTaskProgress struct { func (x *ExecStepTaskProgress) Reset() { *x = ExecStepTaskProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTaskProgress) String() string { @@ -728,7 +716,7 @@ func (*ExecStepTaskProgress) ProtoMessage() {} func (x *ExecStepTaskProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +752,9 @@ type ExecStepTaskOutput struct { func (x *ExecStepTaskOutput) Reset() { *x = ExecStepTaskOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepTaskOutput) String() string { @@ -779,7 +765,7 @@ func (*ExecStepTaskOutput) ProtoMessage() {} func (x *ExecStepTaskOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,92 +996,6 @@ func file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_init() { return } file_google_cloud_osconfig_agentendpoint_v1beta_patch_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTaskProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ApplyPatchesTaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTaskProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepTaskOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_agentendpoint_v1beta_tasks_proto_msgTypes[0].OneofWrappers = []any{ (*Task_ApplyPatchesTask)(nil), (*Task_ExecStepTask)(nil), diff --git a/osconfig/agentendpoint/apiv1beta/helpers.go b/osconfig/agentendpoint/apiv1beta/helpers.go index a9c378aaf837..d0e407b6f415 100755 --- a/osconfig/agentendpoint/apiv1beta/helpers.go +++ b/osconfig/agentendpoint/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package agentendpoint import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "osconfig.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +50,50 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/osconfig/apiv1/helpers.go b/osconfig/apiv1/helpers.go index cf4b6b82d6fa..18c5d7283e99 100755 --- a/osconfig/apiv1/helpers.go +++ b/osconfig/apiv1/helpers.go @@ -18,10 +18,20 @@ package osconfig import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "osconfig.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/osconfig/apiv1/os_config_client.go b/osconfig/apiv1/os_config_client.go index 888f219f9c71..b66c4a318e66 100755 --- a/osconfig/apiv1/os_config_client.go +++ b/osconfig/apiv1/os_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( osconfigpb "cloud.google.com/go/osconfig/apiv1/osconfigpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -495,6 +494,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new os config service client based on gRPC. @@ -524,6 +525,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: osconfigpb.NewOsConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -570,6 +572,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new os config service rest client. @@ -590,6 +594,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -642,7 +647,7 @@ func (c *gRPCClient) ExecutePatchJob(ctx context.Context, req *osconfigpb.Execut var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExecutePatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExecutePatchJob, req, settings.GRPC, c.logger, "ExecutePatchJob") return err }, opts...) if err != nil { @@ -660,7 +665,7 @@ func (c *gRPCClient) GetPatchJob(ctx context.Context, req *osconfigpb.GetPatchJo var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPatchJob, req, settings.GRPC, c.logger, "GetPatchJob") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *gRPCClient) CancelPatchJob(ctx context.Context, req *osconfigpb.CancelP var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelPatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelPatchJob, req, settings.GRPC, c.logger, "CancelPatchJob") return err }, opts...) if err != nil { @@ -707,7 +712,7 @@ func (c *gRPCClient) ListPatchJobs(ctx context.Context, req *osconfigpb.ListPatc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchJobs, req, settings.GRPC, c.logger, "ListPatchJobs") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *gRPCClient) ListPatchJobInstanceDetails(ctx context.Context, req *oscon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchJobInstanceDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchJobInstanceDetails, req, settings.GRPC, c.logger, "ListPatchJobInstanceDetails") return err }, opts...) if err != nil { @@ -788,7 +793,7 @@ func (c *gRPCClient) CreatePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePatchDeployment, req, settings.GRPC, c.logger, "CreatePatchDeployment") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *gRPCClient) GetPatchDeployment(ctx context.Context, req *osconfigpb.Get var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPatchDeployment, req, settings.GRPC, c.logger, "GetPatchDeployment") return err }, opts...) if err != nil { @@ -835,7 +840,7 @@ func (c *gRPCClient) ListPatchDeployments(ctx context.Context, req *osconfigpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchDeployments, req, settings.GRPC, c.logger, "ListPatchDeployments") return err }, opts...) if err != nil { @@ -869,7 +874,7 @@ func (c *gRPCClient) DeletePatchDeployment(ctx context.Context, req *osconfigpb. opts = append((*c.CallOptions).DeletePatchDeployment[0:len((*c.CallOptions).DeletePatchDeployment):len((*c.CallOptions).DeletePatchDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePatchDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePatchDeployment, req, settings.GRPC, c.logger, "DeletePatchDeployment") return err }, opts...) return err @@ -884,7 +889,7 @@ func (c *gRPCClient) UpdatePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePatchDeployment, req, settings.GRPC, c.logger, "UpdatePatchDeployment") return err }, opts...) if err != nil { @@ -902,7 +907,7 @@ func (c *gRPCClient) PausePatchDeployment(ctx context.Context, req *osconfigpb.P var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PausePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PausePatchDeployment, req, settings.GRPC, c.logger, "PausePatchDeployment") return err }, opts...) if err != nil { @@ -920,7 +925,7 @@ func (c *gRPCClient) ResumePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumePatchDeployment, req, settings.GRPC, c.logger, "ResumePatchDeployment") return err }, opts...) if err != nil { @@ -968,17 +973,7 @@ func (c *restClient) ExecutePatchJob(ctx context.Context, req *osconfigpb.Execut httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecutePatchJob") if err != nil { return err } @@ -1029,17 +1024,7 @@ func (c *restClient) GetPatchJob(ctx context.Context, req *osconfigpb.GetPatchJo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPatchJob") if err != nil { return err } @@ -1096,17 +1081,7 @@ func (c *restClient) CancelPatchJob(ctx context.Context, req *osconfigpb.CancelP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelPatchJob") if err != nil { return err } @@ -1171,21 +1146,10 @@ func (c *restClient) ListPatchJobs(ctx context.Context, req *osconfigpb.ListPatc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1263,21 +1227,10 @@ func (c *restClient) ListPatchJobInstanceDetails(ctx context.Context, req *oscon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchJobInstanceDetails") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1348,17 +1301,7 @@ func (c *restClient) CreatePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePatchDeployment") if err != nil { return err } @@ -1408,17 +1351,7 @@ func (c *restClient) GetPatchDeployment(ctx context.Context, req *osconfigpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPatchDeployment") if err != nil { return err } @@ -1480,21 +1413,10 @@ func (c *restClient) ListPatchDeployments(ctx context.Context, req *osconfigpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchDeployments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1554,15 +1476,8 @@ func (c *restClient) DeletePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePatchDeployment") + return err }, opts...) } @@ -1613,17 +1528,7 @@ func (c *restClient) UpdatePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePatchDeployment") if err != nil { return err } @@ -1680,17 +1585,7 @@ func (c *restClient) PausePatchDeployment(ctx context.Context, req *osconfigpb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PausePatchDeployment") if err != nil { return err } @@ -1747,17 +1642,7 @@ func (c *restClient) ResumePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumePatchDeployment") if err != nil { return err } diff --git a/osconfig/apiv1/os_config_client_example_go123_test.go b/osconfig/apiv1/os_config_client_example_go123_test.go index 0062cff07df8..f99d6337b82d 100644 --- a/osconfig/apiv1/os_config_client_example_go123_test.go +++ b/osconfig/apiv1/os_config_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListPatchDeployments_all() { } for resp, err := range c.ListPatchDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListPatchJobInstanceDetails_all() { } for resp, err := range c.ListPatchJobInstanceDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListPatchJobs_all() { } for resp, err := range c.ListPatchJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/osconfig/apiv1/os_config_zonal_client.go b/osconfig/apiv1/os_config_zonal_client.go index 575f1e6719c9..ced705ca15dc 100755 --- a/osconfig/apiv1/os_config_zonal_client.go +++ b/osconfig/apiv1/os_config_zonal_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" osconfigpb "cloud.google.com/go/osconfig/apiv1/osconfigpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -562,6 +561,8 @@ type osConfigZonalGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOsConfigZonalClient creates a new os config zonal service client based on gRPC. @@ -591,6 +592,7 @@ func NewOsConfigZonalClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, osConfigZonalClient: osconfigpb.NewOsConfigZonalServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -653,6 +655,8 @@ type osConfigZonalRESTClient struct { // Points back to the CallOptions field of the containing OsConfigZonalClient CallOptions **OsConfigZonalCallOptions + + logger *slog.Logger } // NewOsConfigZonalRESTClient creates a new os config zonal service rest client. @@ -673,6 +677,7 @@ func NewOsConfigZonalRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -735,7 +740,7 @@ func (c *osConfigZonalGRPCClient) CreateOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.CreateOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.CreateOSPolicyAssignment, req, settings.GRPC, c.logger, "CreateOSPolicyAssignment") return err }, opts...) if err != nil { @@ -755,7 +760,7 @@ func (c *osConfigZonalGRPCClient) UpdateOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.UpdateOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.UpdateOSPolicyAssignment, req, settings.GRPC, c.logger, "UpdateOSPolicyAssignment") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *osConfigZonalGRPCClient) GetOSPolicyAssignment(ctx context.Context, req var resp *osconfigpb.OSPolicyAssignment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetOSPolicyAssignment, req, settings.GRPC, c.logger, "GetOSPolicyAssignment") return err }, opts...) if err != nil { @@ -804,7 +809,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignments(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignments, req, settings.GRPC, c.logger, "ListOSPolicyAssignments") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignmentRevisions(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignmentRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignmentRevisions, req, settings.GRPC, c.logger, "ListOSPolicyAssignmentRevisions") return err }, opts...) if err != nil { @@ -885,7 +890,7 @@ func (c *osConfigZonalGRPCClient) DeleteOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.DeleteOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.DeleteOSPolicyAssignment, req, settings.GRPC, c.logger, "DeleteOSPolicyAssignment") return err }, opts...) if err != nil { @@ -905,7 +910,7 @@ func (c *osConfigZonalGRPCClient) GetOSPolicyAssignmentReport(ctx context.Contex var resp *osconfigpb.OSPolicyAssignmentReport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetOSPolicyAssignmentReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetOSPolicyAssignmentReport, req, settings.GRPC, c.logger, "GetOSPolicyAssignmentReport") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignmentReports(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignmentReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignmentReports, req, settings.GRPC, c.logger, "ListOSPolicyAssignmentReports") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *osConfigZonalGRPCClient) GetInventory(ctx context.Context, req *osconfi var resp *osconfigpb.Inventory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetInventory, req, settings.GRPC, c.logger, "GetInventory") return err }, opts...) if err != nil { @@ -998,7 +1003,7 @@ func (c *osConfigZonalGRPCClient) ListInventories(ctx context.Context, req *osco } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListInventories, req, settings.GRPC, c.logger, "ListInventories") return err }, opts...) if err != nil { @@ -1033,7 +1038,7 @@ func (c *osConfigZonalGRPCClient) GetVulnerabilityReport(ctx context.Context, re var resp *osconfigpb.VulnerabilityReport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetVulnerabilityReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetVulnerabilityReport, req, settings.GRPC, c.logger, "GetVulnerabilityReport") return err }, opts...) if err != nil { @@ -1062,7 +1067,7 @@ func (c *osConfigZonalGRPCClient) ListVulnerabilityReports(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListVulnerabilityReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListVulnerabilityReports, req, settings.GRPC, c.logger, "ListVulnerabilityReports") return err }, opts...) if err != nil { @@ -1136,21 +1141,10 @@ func (c *osConfigZonalRESTClient) CreateOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOSPolicyAssignment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1222,21 +1216,10 @@ func (c *osConfigZonalRESTClient) UpdateOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOSPolicyAssignment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1291,17 +1274,7 @@ func (c *osConfigZonalRESTClient) GetOSPolicyAssignment(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOSPolicyAssignment") if err != nil { return err } @@ -1365,21 +1338,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignments(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1454,21 +1416,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignmentRevisions(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignmentRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1541,21 +1492,10 @@ func (c *osConfigZonalRESTClient) DeleteOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOSPolicyAssignment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1607,17 +1547,7 @@ func (c *osConfigZonalRESTClient) GetOSPolicyAssignmentReport(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOSPolicyAssignmentReport") if err != nil { return err } @@ -1683,21 +1613,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignmentReports(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignmentReports") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1764,17 +1683,7 @@ func (c *osConfigZonalRESTClient) GetInventory(ctx context.Context, req *osconfi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInventory") if err != nil { return err } @@ -1842,21 +1751,10 @@ func (c *osConfigZonalRESTClient) ListInventories(ctx context.Context, req *osco } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1920,17 +1818,7 @@ func (c *osConfigZonalRESTClient) GetVulnerabilityReport(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVulnerabilityReport") if err != nil { return err } @@ -1995,21 +1883,10 @@ func (c *osConfigZonalRESTClient) ListVulnerabilityReports(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVulnerabilityReports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/osconfig/apiv1/os_config_zonal_client_example_go123_test.go b/osconfig/apiv1/os_config_zonal_client_example_go123_test.go index add9029b7352..cc69e094a628 100644 --- a/osconfig/apiv1/os_config_zonal_client_example_go123_test.go +++ b/osconfig/apiv1/os_config_zonal_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleOsConfigZonalClient_ListInventories_all() { } for resp, err := range c.ListInventories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignmentReports_all() { } for resp, err := range c.ListOSPolicyAssignmentReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignmentRevisions_all() { } for resp, err := range c.ListOSPolicyAssignmentRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignments_all() { } for resp, err := range c.ListOSPolicyAssignments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleOsConfigZonalClient_ListVulnerabilityReports_all() { } for resp, err := range c.ListVulnerabilityReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/osconfig/apiv1/osconfigpb/inventory.pb.go b/osconfig/apiv1/osconfigpb/inventory.pb.go index f389c33f1221..7c1510e77457 100755 --- a/osconfig/apiv1/osconfigpb/inventory.pb.go +++ b/osconfig/apiv1/osconfigpb/inventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/inventory.proto @@ -225,11 +225,9 @@ type Inventory struct { func (x *Inventory) Reset() { *x = Inventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory) String() string { @@ -240,7 +238,7 @@ func (*Inventory) ProtoMessage() {} func (x *Inventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +303,9 @@ type GetInventoryRequest struct { func (x *GetInventoryRequest) Reset() { *x = GetInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInventoryRequest) String() string { @@ -320,7 +316,7 @@ func (*GetInventoryRequest) ProtoMessage() {} func (x *GetInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +374,9 @@ type ListInventoriesRequest struct { func (x *ListInventoriesRequest) Reset() { *x = ListInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInventoriesRequest) String() string { @@ -393,7 +387,7 @@ func (*ListInventoriesRequest) ProtoMessage() {} func (x *ListInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +452,9 @@ type ListInventoriesResponse struct { func (x *ListInventoriesResponse) Reset() { *x = ListInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInventoriesResponse) String() string { @@ -473,7 +465,7 @@ func (*ListInventoriesResponse) ProtoMessage() {} func (x *ListInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +523,9 @@ type Inventory_OsInfo struct { func (x *Inventory_OsInfo) Reset() { *x = Inventory_OsInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_OsInfo) String() string { @@ -546,7 +536,7 @@ func (*Inventory_OsInfo) ProtoMessage() {} func (x *Inventory_OsInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +634,9 @@ type Inventory_Item struct { func (x *Inventory_Item) Reset() { *x = Inventory_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_Item) String() string { @@ -659,7 +647,7 @@ func (*Inventory_Item) ProtoMessage() {} func (x *Inventory_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +760,9 @@ type Inventory_SoftwarePackage struct { func (x *Inventory_SoftwarePackage) Reset() { *x = Inventory_SoftwarePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_SoftwarePackage) String() string { @@ -787,7 +773,7 @@ func (*Inventory_SoftwarePackage) ProtoMessage() {} func (x *Inventory_SoftwarePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,11 +958,9 @@ type Inventory_VersionedPackage struct { func (x *Inventory_VersionedPackage) Reset() { *x = Inventory_VersionedPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_VersionedPackage) String() string { @@ -987,7 +971,7 @@ func (*Inventory_VersionedPackage) ProtoMessage() {} func (x *Inventory_VersionedPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1025,9 @@ type Inventory_ZypperPatch struct { func (x *Inventory_ZypperPatch) Reset() { *x = Inventory_ZypperPatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_ZypperPatch) String() string { @@ -1056,7 +1038,7 @@ func (*Inventory_ZypperPatch) ProtoMessage() {} func (x *Inventory_ZypperPatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1116,9 @@ type Inventory_WindowsUpdatePackage struct { func (x *Inventory_WindowsUpdatePackage) Reset() { *x = Inventory_WindowsUpdatePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage) String() string { @@ -1149,7 +1129,7 @@ func (*Inventory_WindowsUpdatePackage) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,11 +1228,9 @@ type Inventory_WindowsQuickFixEngineeringPackage struct { func (x *Inventory_WindowsQuickFixEngineeringPackage) Reset() { *x = Inventory_WindowsQuickFixEngineeringPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsQuickFixEngineeringPackage) String() string { @@ -1263,7 +1241,7 @@ func (*Inventory_WindowsQuickFixEngineeringPackage) ProtoMessage() {} func (x *Inventory_WindowsQuickFixEngineeringPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1308,9 @@ type Inventory_WindowsApplication struct { func (x *Inventory_WindowsApplication) Reset() { *x = Inventory_WindowsApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsApplication) String() string { @@ -1345,7 +1321,7 @@ func (*Inventory_WindowsApplication) ProtoMessage() {} func (x *Inventory_WindowsApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1409,11 +1385,9 @@ type Inventory_WindowsUpdatePackage_WindowsUpdateCategory struct { func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) Reset() { *x = Inventory_WindowsUpdatePackage_WindowsUpdateCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) String() string { @@ -1424,7 +1398,7 @@ func (*Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_inventory_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1809,164 +1783,6 @@ func file_google_cloud_osconfig_v1_inventory_proto_init() { if File_google_cloud_osconfig_v1_inventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Inventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_OsInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_SoftwarePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_VersionedPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_ZypperPatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsQuickFixEngineeringPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_inventory_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage_WindowsUpdateCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_inventory_proto_msgTypes[5].OneofWrappers = []any{ (*Inventory_Item_InstalledPackage)(nil), (*Inventory_Item_AvailablePackage)(nil), diff --git a/osconfig/apiv1/osconfigpb/os_policy.pb.go b/osconfig/apiv1/osconfigpb/os_policy.pb.go index 6c7fe064dc21..3c43c22c3d00 100755 --- a/osconfig/apiv1/osconfigpb/os_policy.pb.go +++ b/osconfig/apiv1/osconfigpb/os_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/os_policy.proto @@ -356,11 +356,9 @@ type OSPolicy struct { func (x *OSPolicy) Reset() { *x = OSPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy) String() string { @@ -371,7 +369,7 @@ func (*OSPolicy) ProtoMessage() {} func (x *OSPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +439,9 @@ type OSPolicy_InventoryFilter struct { func (x *OSPolicy_InventoryFilter) Reset() { *x = OSPolicy_InventoryFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_InventoryFilter) String() string { @@ -456,7 +452,7 @@ func (*OSPolicy_InventoryFilter) ProtoMessage() {} func (x *OSPolicy_InventoryFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +513,9 @@ type OSPolicy_Resource struct { func (x *OSPolicy_Resource) Reset() { *x = OSPolicy_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource) String() string { @@ -532,7 +526,7 @@ func (*OSPolicy_Resource) ProtoMessage() {} func (x *OSPolicy_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,11 +649,9 @@ type OSPolicy_ResourceGroup struct { func (x *OSPolicy_ResourceGroup) Reset() { *x = OSPolicy_ResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_ResourceGroup) String() string { @@ -670,7 +662,7 @@ func (*OSPolicy_ResourceGroup) ProtoMessage() {} func (x *OSPolicy_ResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +715,9 @@ type OSPolicy_Resource_File struct { func (x *OSPolicy_Resource_File) Reset() { *x = OSPolicy_Resource_File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File) String() string { @@ -738,7 +728,7 @@ func (*OSPolicy_Resource_File) ProtoMessage() {} func (x *OSPolicy_Resource_File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +827,9 @@ type OSPolicy_Resource_PackageResource struct { func (x *OSPolicy_Resource_PackageResource) Reset() { *x = OSPolicy_Resource_PackageResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource) String() string { @@ -852,7 +840,7 @@ func (*OSPolicy_Resource_PackageResource) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +992,9 @@ type OSPolicy_Resource_RepositoryResource struct { func (x *OSPolicy_Resource_RepositoryResource) Reset() { *x = OSPolicy_Resource_RepositoryResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource) String() string { @@ -1019,7 +1005,7 @@ func (*OSPolicy_Resource_RepositoryResource) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,11 +1135,9 @@ type OSPolicy_Resource_ExecResource struct { func (x *OSPolicy_Resource_ExecResource) Reset() { *x = OSPolicy_Resource_ExecResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource) String() string { @@ -1164,7 +1148,7 @@ func (*OSPolicy_Resource_ExecResource) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,11 +1212,9 @@ type OSPolicy_Resource_FileResource struct { func (x *OSPolicy_Resource_FileResource) Reset() { *x = OSPolicy_Resource_FileResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_FileResource) String() string { @@ -1243,7 +1225,7 @@ func (*OSPolicy_Resource_FileResource) ProtoMessage() {} func (x *OSPolicy_Resource_FileResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1334,11 +1316,9 @@ type OSPolicy_Resource_File_Remote struct { func (x *OSPolicy_Resource_File_Remote) Reset() { *x = OSPolicy_Resource_File_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Remote) String() string { @@ -1349,7 +1329,7 @@ func (*OSPolicy_Resource_File_Remote) ProtoMessage() {} func (x *OSPolicy_Resource_File_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1394,11 +1374,9 @@ type OSPolicy_Resource_File_Gcs struct { func (x *OSPolicy_Resource_File_Gcs) Reset() { *x = OSPolicy_Resource_File_Gcs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Gcs) String() string { @@ -1409,7 +1387,7 @@ func (*OSPolicy_Resource_File_Gcs) ProtoMessage() {} func (x *OSPolicy_Resource_File_Gcs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1462,11 +1440,9 @@ type OSPolicy_Resource_PackageResource_Deb struct { func (x *OSPolicy_Resource_PackageResource_Deb) Reset() { *x = OSPolicy_Resource_PackageResource_Deb{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Deb) String() string { @@ -1477,7 +1453,7 @@ func (*OSPolicy_Resource_PackageResource_Deb) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Deb) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1496,9 @@ type OSPolicy_Resource_PackageResource_APT struct { func (x *OSPolicy_Resource_PackageResource_APT) Reset() { *x = OSPolicy_Resource_PackageResource_APT{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_APT) String() string { @@ -1535,7 +1509,7 @@ func (*OSPolicy_Resource_PackageResource_APT) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_APT) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1574,11 +1548,9 @@ type OSPolicy_Resource_PackageResource_RPM struct { func (x *OSPolicy_Resource_PackageResource_RPM) Reset() { *x = OSPolicy_Resource_PackageResource_RPM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_RPM) String() string { @@ -1589,7 +1561,7 @@ func (*OSPolicy_Resource_PackageResource_RPM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_RPM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1632,11 +1604,9 @@ type OSPolicy_Resource_PackageResource_YUM struct { func (x *OSPolicy_Resource_PackageResource_YUM) Reset() { *x = OSPolicy_Resource_PackageResource_YUM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_YUM) String() string { @@ -1647,7 +1617,7 @@ func (*OSPolicy_Resource_PackageResource_YUM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_YUM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1683,11 +1653,9 @@ type OSPolicy_Resource_PackageResource_Zypper struct { func (x *OSPolicy_Resource_PackageResource_Zypper) Reset() { *x = OSPolicy_Resource_PackageResource_Zypper{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Zypper) String() string { @@ -1698,7 +1666,7 @@ func (*OSPolicy_Resource_PackageResource_Zypper) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Zypper) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1702,9 @@ type OSPolicy_Resource_PackageResource_GooGet struct { func (x *OSPolicy_Resource_PackageResource_GooGet) Reset() { *x = OSPolicy_Resource_PackageResource_GooGet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_GooGet) String() string { @@ -1749,7 +1715,7 @@ func (*OSPolicy_Resource_PackageResource_GooGet) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_GooGet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1788,11 +1754,9 @@ type OSPolicy_Resource_PackageResource_MSI struct { func (x *OSPolicy_Resource_PackageResource_MSI) Reset() { *x = OSPolicy_Resource_PackageResource_MSI{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_MSI) String() string { @@ -1803,7 +1767,7 @@ func (*OSPolicy_Resource_PackageResource_MSI) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_MSI) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,11 +1820,9 @@ type OSPolicy_Resource_RepositoryResource_AptRepository struct { func (x *OSPolicy_Resource_RepositoryResource_AptRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_AptRepository) String() string { @@ -1871,7 +1833,7 @@ func (*OSPolicy_Resource_RepositoryResource_AptRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1944,11 +1906,9 @@ type OSPolicy_Resource_RepositoryResource_YumRepository struct { func (x *OSPolicy_Resource_RepositoryResource_YumRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_YumRepository) String() string { @@ -1959,7 +1919,7 @@ func (*OSPolicy_Resource_RepositoryResource_YumRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2025,11 +1985,9 @@ type OSPolicy_Resource_RepositoryResource_ZypperRepository struct { func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_ZypperRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) String() string { @@ -2040,7 +1998,7 @@ func (*OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2099,11 +2057,9 @@ type OSPolicy_Resource_RepositoryResource_GooRepository struct { func (x *OSPolicy_Resource_RepositoryResource_GooRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_GooRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_GooRepository) String() string { @@ -2114,7 +2070,7 @@ func (*OSPolicy_Resource_RepositoryResource_GooRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_GooRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2171,11 +2127,9 @@ type OSPolicy_Resource_ExecResource_Exec struct { func (x *OSPolicy_Resource_ExecResource_Exec) Reset() { *x = OSPolicy_Resource_ExecResource_Exec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource_Exec) String() string { @@ -2186,7 +2140,7 @@ func (*OSPolicy_Resource_ExecResource_Exec) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource_Exec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2678,284 +2632,6 @@ func file_google_cloud_osconfig_v1_os_policy_proto_init() { if File_google_cloud_osconfig_v1_os_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_InventoryFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_ResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_FileResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Gcs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Deb); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_APT); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_RPM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_YUM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Zypper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_GooGet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_MSI); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_ZypperRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_GooRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource_Exec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_os_policy_proto_msgTypes[2].OneofWrappers = []any{ (*OSPolicy_Resource_Pkg)(nil), (*OSPolicy_Resource_Repository)(nil), diff --git a/osconfig/apiv1/osconfigpb/os_policy_assignment_reports.pb.go b/osconfig/apiv1/osconfigpb/os_policy_assignment_reports.pb.go index bbeb6d1355e2..26dd8c830ce2 100755 --- a/osconfig/apiv1/osconfigpb/os_policy_assignment_reports.pb.go +++ b/osconfig/apiv1/osconfigpb/os_policy_assignment_reports.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/os_policy_assignment_reports.proto @@ -243,11 +243,9 @@ type GetOSPolicyAssignmentReportRequest struct { func (x *GetOSPolicyAssignmentReportRequest) Reset() { *x = GetOSPolicyAssignmentReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOSPolicyAssignmentReportRequest) String() string { @@ -258,7 +256,7 @@ func (*GetOSPolicyAssignmentReportRequest) ProtoMessage() {} func (x *GetOSPolicyAssignmentReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +324,9 @@ type ListOSPolicyAssignmentReportsRequest struct { func (x *ListOSPolicyAssignmentReportsRequest) Reset() { *x = ListOSPolicyAssignmentReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentReportsRequest) String() string { @@ -341,7 +337,7 @@ func (*ListOSPolicyAssignmentReportsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +396,9 @@ type ListOSPolicyAssignmentReportsResponse struct { func (x *ListOSPolicyAssignmentReportsResponse) Reset() { *x = ListOSPolicyAssignmentReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentReportsResponse) String() string { @@ -415,7 +409,7 @@ func (*ListOSPolicyAssignmentReportsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +473,9 @@ type OSPolicyAssignmentReport struct { func (x *OSPolicyAssignmentReport) Reset() { *x = OSPolicyAssignmentReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport) String() string { @@ -494,7 +486,7 @@ func (*OSPolicyAssignmentReport) ProtoMessage() {} func (x *OSPolicyAssignmentReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +581,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance struct { func (x *OSPolicyAssignmentReport_OSPolicyCompliance) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance) String() string { @@ -604,7 +594,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance) ProtoMessage() {} func (x *OSPolicyAssignmentReport_OSPolicyCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +675,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance stru func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) String() string { @@ -700,7 +688,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) P func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +773,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPo func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) String() string { @@ -801,7 +787,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OS func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +829,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_Exec func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) String() string { @@ -859,7 +843,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_Ex func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,104 +1123,6 @@ func file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_init() { if File_google_cloud_osconfig_v1_os_policy_assignment_reports_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetOSPolicyAssignmentReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_os_policy_assignment_reports_proto_msgTypes[5].OneofWrappers = []any{ (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_)(nil), } diff --git a/osconfig/apiv1/osconfigpb/os_policy_assignments.pb.go b/osconfig/apiv1/osconfigpb/os_policy_assignments.pb.go index 646f0c382845..8700d873a545 100755 --- a/osconfig/apiv1/osconfigpb/os_policy_assignments.pb.go +++ b/osconfig/apiv1/osconfigpb/os_policy_assignments.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/os_policy_assignments.proto @@ -289,11 +289,9 @@ type OSPolicyAssignment struct { func (x *OSPolicyAssignment) Reset() { *x = OSPolicyAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment) String() string { @@ -304,7 +302,7 @@ func (*OSPolicyAssignment) ProtoMessage() {} func (x *OSPolicyAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +432,9 @@ type OSPolicyAssignmentOperationMetadata struct { func (x *OSPolicyAssignmentOperationMetadata) Reset() { *x = OSPolicyAssignmentOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentOperationMetadata) String() string { @@ -449,7 +445,7 @@ func (*OSPolicyAssignmentOperationMetadata) ProtoMessage() {} func (x *OSPolicyAssignmentOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +519,9 @@ type CreateOSPolicyAssignmentRequest struct { func (x *CreateOSPolicyAssignmentRequest) Reset() { *x = CreateOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOSPolicyAssignmentRequest) String() string { @@ -538,7 +532,7 @@ func (*CreateOSPolicyAssignmentRequest) ProtoMessage() {} func (x *CreateOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +583,9 @@ type UpdateOSPolicyAssignmentRequest struct { func (x *UpdateOSPolicyAssignmentRequest) Reset() { *x = UpdateOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOSPolicyAssignmentRequest) String() string { @@ -604,7 +596,7 @@ func (*UpdateOSPolicyAssignmentRequest) ProtoMessage() {} func (x *UpdateOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +640,9 @@ type GetOSPolicyAssignmentRequest struct { func (x *GetOSPolicyAssignmentRequest) Reset() { *x = GetOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOSPolicyAssignmentRequest) String() string { @@ -663,7 +653,7 @@ func (*GetOSPolicyAssignmentRequest) ProtoMessage() {} func (x *GetOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +693,9 @@ type ListOSPolicyAssignmentsRequest struct { func (x *ListOSPolicyAssignmentsRequest) Reset() { *x = ListOSPolicyAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentsRequest) String() string { @@ -718,7 +706,7 @@ func (*ListOSPolicyAssignmentsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +756,9 @@ type ListOSPolicyAssignmentsResponse struct { func (x *ListOSPolicyAssignmentsResponse) Reset() { *x = ListOSPolicyAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentsResponse) String() string { @@ -783,7 +769,7 @@ func (*ListOSPolicyAssignmentsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,11 +816,9 @@ type ListOSPolicyAssignmentRevisionsRequest struct { func (x *ListOSPolicyAssignmentRevisionsRequest) Reset() { *x = ListOSPolicyAssignmentRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentRevisionsRequest) String() string { @@ -845,7 +829,7 @@ func (*ListOSPolicyAssignmentRevisionsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +880,9 @@ type ListOSPolicyAssignmentRevisionsResponse struct { func (x *ListOSPolicyAssignmentRevisionsResponse) Reset() { *x = ListOSPolicyAssignmentRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentRevisionsResponse) String() string { @@ -911,7 +893,7 @@ func (*ListOSPolicyAssignmentRevisionsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +934,9 @@ type DeleteOSPolicyAssignmentRequest struct { func (x *DeleteOSPolicyAssignmentRequest) Reset() { *x = DeleteOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOSPolicyAssignmentRequest) String() string { @@ -967,7 +947,7 @@ func (*DeleteOSPolicyAssignmentRequest) ProtoMessage() {} func (x *DeleteOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,11 +991,9 @@ type OSPolicyAssignment_LabelSet struct { func (x *OSPolicyAssignment_LabelSet) Reset() { *x = OSPolicyAssignment_LabelSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_LabelSet) String() string { @@ -1026,7 +1004,7 @@ func (*OSPolicyAssignment_LabelSet) ProtoMessage() {} func (x *OSPolicyAssignment_LabelSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1057,9 @@ type OSPolicyAssignment_InstanceFilter struct { func (x *OSPolicyAssignment_InstanceFilter) Reset() { *x = OSPolicyAssignment_InstanceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_InstanceFilter) String() string { @@ -1094,7 +1070,7 @@ func (*OSPolicyAssignment_InstanceFilter) ProtoMessage() {} func (x *OSPolicyAssignment_InstanceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1133,9 @@ type OSPolicyAssignment_Rollout struct { func (x *OSPolicyAssignment_Rollout) Reset() { *x = OSPolicyAssignment_Rollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_Rollout) String() string { @@ -1172,7 +1146,7 @@ func (*OSPolicyAssignment_Rollout) ProtoMessage() {} func (x *OSPolicyAssignment_Rollout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1195,9 @@ type OSPolicyAssignment_InstanceFilter_Inventory struct { func (x *OSPolicyAssignment_InstanceFilter_Inventory) Reset() { *x = OSPolicyAssignment_InstanceFilter_Inventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_InstanceFilter_Inventory) String() string { @@ -1236,7 +1208,7 @@ func (*OSPolicyAssignment_InstanceFilter_Inventory) ProtoMessage() {} func (x *OSPolicyAssignment_InstanceFilter_Inventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1615,176 +1587,6 @@ func file_google_cloud_osconfig_v1_os_policy_assignments_proto_init() { } file_google_cloud_osconfig_v1_os_policy_proto_init() file_google_cloud_osconfig_v1_osconfig_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_LabelSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_InstanceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_Rollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_os_policy_assignments_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_InstanceFilter_Inventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/osconfig/apiv1/osconfigpb/osconfig_common.pb.go b/osconfig/apiv1/osconfigpb/osconfig_common.pb.go index c3e24379afb8..449c29deb7b8 100755 --- a/osconfig/apiv1/osconfigpb/osconfig_common.pb.go +++ b/osconfig/apiv1/osconfigpb/osconfig_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/osconfig_common.proto @@ -53,11 +53,9 @@ type FixedOrPercent struct { func (x *FixedOrPercent) Reset() { *x = FixedOrPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_osconfig_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_osconfig_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FixedOrPercent) String() string { @@ -68,7 +66,7 @@ func (*FixedOrPercent) ProtoMessage() {} func (x *FixedOrPercent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_osconfig_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,20 +177,6 @@ func file_google_cloud_osconfig_v1_osconfig_common_proto_init() { if File_google_cloud_osconfig_v1_osconfig_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_osconfig_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FixedOrPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_osconfig_common_proto_msgTypes[0].OneofWrappers = []any{ (*FixedOrPercent_Fixed)(nil), (*FixedOrPercent_Percent)(nil), diff --git a/osconfig/apiv1/osconfigpb/osconfig_service.pb.go b/osconfig/apiv1/osconfigpb/osconfig_service.pb.go index 4b1823408ed2..192a04abe7dd 100755 --- a/osconfig/apiv1/osconfigpb/osconfig_service.pb.go +++ b/osconfig/apiv1/osconfigpb/osconfig_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/osconfig_service.proto diff --git a/osconfig/apiv1/osconfigpb/osconfig_zonal_service.pb.go b/osconfig/apiv1/osconfigpb/osconfig_zonal_service.pb.go index 54bd5d49fb30..3de2bb993515 100755 --- a/osconfig/apiv1/osconfigpb/osconfig_zonal_service.pb.go +++ b/osconfig/apiv1/osconfigpb/osconfig_zonal_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/osconfig_zonal_service.proto diff --git a/osconfig/apiv1/osconfigpb/patch_deployments.pb.go b/osconfig/apiv1/osconfigpb/patch_deployments.pb.go index 88cd79ca8ec9..c8a24f19549a 100755 --- a/osconfig/apiv1/osconfigpb/patch_deployments.pb.go +++ b/osconfig/apiv1/osconfigpb/patch_deployments.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/patch_deployments.proto @@ -206,11 +206,9 @@ type PatchDeployment struct { func (x *PatchDeployment) Reset() { *x = PatchDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchDeployment) String() string { @@ -221,7 +219,7 @@ func (*PatchDeployment) ProtoMessage() {} func (x *PatchDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +356,9 @@ type OneTimeSchedule struct { func (x *OneTimeSchedule) Reset() { *x = OneTimeSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneTimeSchedule) String() string { @@ -373,7 +369,7 @@ func (*OneTimeSchedule) ProtoMessage() {} func (x *OneTimeSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +426,9 @@ type RecurringSchedule struct { func (x *RecurringSchedule) Reset() { *x = RecurringSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecurringSchedule) String() string { @@ -445,7 +439,7 @@ func (*RecurringSchedule) ProtoMessage() {} func (x *RecurringSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +554,9 @@ type WeeklySchedule struct { func (x *WeeklySchedule) Reset() { *x = WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklySchedule) String() string { @@ -575,7 +567,7 @@ func (*WeeklySchedule) ProtoMessage() {} func (x *WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +607,9 @@ type MonthlySchedule struct { func (x *MonthlySchedule) Reset() { *x = MonthlySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonthlySchedule) String() string { @@ -630,7 +620,7 @@ func (*MonthlySchedule) ProtoMessage() {} func (x *MonthlySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -710,11 +700,9 @@ type WeekDayOfMonth struct { func (x *WeekDayOfMonth) Reset() { *x = WeekDayOfMonth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeekDayOfMonth) String() string { @@ -725,7 +713,7 @@ func (*WeekDayOfMonth) ProtoMessage() {} func (x *WeekDayOfMonth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +772,9 @@ type CreatePatchDeploymentRequest struct { func (x *CreatePatchDeploymentRequest) Reset() { *x = CreatePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePatchDeploymentRequest) String() string { @@ -799,7 +785,7 @@ func (*CreatePatchDeploymentRequest) ProtoMessage() {} func (x *CreatePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,11 +834,9 @@ type GetPatchDeploymentRequest struct { func (x *GetPatchDeploymentRequest) Reset() { *x = GetPatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPatchDeploymentRequest) String() string { @@ -863,7 +847,7 @@ func (*GetPatchDeploymentRequest) ProtoMessage() {} func (x *GetPatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +888,9 @@ type ListPatchDeploymentsRequest struct { func (x *ListPatchDeploymentsRequest) Reset() { *x = ListPatchDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchDeploymentsRequest) String() string { @@ -919,7 +901,7 @@ func (*ListPatchDeploymentsRequest) ProtoMessage() {} func (x *ListPatchDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,11 +952,9 @@ type ListPatchDeploymentsResponse struct { func (x *ListPatchDeploymentsResponse) Reset() { *x = ListPatchDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchDeploymentsResponse) String() string { @@ -985,7 +965,7 @@ func (*ListPatchDeploymentsResponse) ProtoMessage() {} func (x *ListPatchDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1027,11 +1007,9 @@ type DeletePatchDeploymentRequest struct { func (x *DeletePatchDeploymentRequest) Reset() { *x = DeletePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePatchDeploymentRequest) String() string { @@ -1042,7 +1020,7 @@ func (*DeletePatchDeploymentRequest) ProtoMessage() {} func (x *DeletePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1057,9 @@ type UpdatePatchDeploymentRequest struct { func (x *UpdatePatchDeploymentRequest) Reset() { *x = UpdatePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePatchDeploymentRequest) String() string { @@ -1094,7 +1070,7 @@ func (*UpdatePatchDeploymentRequest) ProtoMessage() {} func (x *UpdatePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1112,9 @@ type PausePatchDeploymentRequest struct { func (x *PausePatchDeploymentRequest) Reset() { *x = PausePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PausePatchDeploymentRequest) String() string { @@ -1151,7 +1125,7 @@ func (*PausePatchDeploymentRequest) ProtoMessage() {} func (x *PausePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1160,9 @@ type ResumePatchDeploymentRequest struct { func (x *ResumePatchDeploymentRequest) Reset() { *x = ResumePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumePatchDeploymentRequest) String() string { @@ -1201,7 +1173,7 @@ func (*ResumePatchDeploymentRequest) ProtoMessage() {} func (x *ResumePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1562,176 +1534,6 @@ func file_google_cloud_osconfig_v1_patch_deployments_proto_init() { return } file_google_cloud_osconfig_v1_patch_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PatchDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OneTimeSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RecurringSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MonthlySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WeekDayOfMonth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreatePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetPatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeletePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PausePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ResumePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_patch_deployments_proto_msgTypes[0].OneofWrappers = []any{ (*PatchDeployment_OneTimeSchedule)(nil), (*PatchDeployment_RecurringSchedule)(nil), diff --git a/osconfig/apiv1/osconfigpb/patch_jobs.pb.go b/osconfig/apiv1/osconfigpb/patch_jobs.pb.go index 5d7e30ac295e..bdf84ed82e10 100755 --- a/osconfig/apiv1/osconfigpb/patch_jobs.pb.go +++ b/osconfig/apiv1/osconfigpb/patch_jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/patch_jobs.proto @@ -579,11 +579,9 @@ type ExecutePatchJobRequest struct { func (x *ExecutePatchJobRequest) Reset() { *x = ExecutePatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutePatchJobRequest) String() string { @@ -594,7 +592,7 @@ func (*ExecutePatchJobRequest) ProtoMessage() {} func (x *ExecutePatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +675,9 @@ type GetPatchJobRequest struct { func (x *GetPatchJobRequest) Reset() { *x = GetPatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPatchJobRequest) String() string { @@ -692,7 +688,7 @@ func (*GetPatchJobRequest) ProtoMessage() {} func (x *GetPatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +732,9 @@ type ListPatchJobInstanceDetailsRequest struct { func (x *ListPatchJobInstanceDetailsRequest) Reset() { *x = ListPatchJobInstanceDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobInstanceDetailsRequest) String() string { @@ -751,7 +745,7 @@ func (*ListPatchJobInstanceDetailsRequest) ProtoMessage() {} func (x *ListPatchJobInstanceDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +802,9 @@ type ListPatchJobInstanceDetailsResponse struct { func (x *ListPatchJobInstanceDetailsResponse) Reset() { *x = ListPatchJobInstanceDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobInstanceDetailsResponse) String() string { @@ -823,7 +815,7 @@ func (*ListPatchJobInstanceDetailsResponse) ProtoMessage() {} func (x *ListPatchJobInstanceDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +868,9 @@ type PatchJobInstanceDetails struct { func (x *PatchJobInstanceDetails) Reset() { *x = PatchJobInstanceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJobInstanceDetails) String() string { @@ -891,7 +881,7 @@ func (*PatchJobInstanceDetails) ProtoMessage() {} func (x *PatchJobInstanceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +952,9 @@ type ListPatchJobsRequest struct { func (x *ListPatchJobsRequest) Reset() { *x = ListPatchJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobsRequest) String() string { @@ -977,7 +965,7 @@ func (*ListPatchJobsRequest) ProtoMessage() {} func (x *ListPatchJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1034,11 +1022,9 @@ type ListPatchJobsResponse struct { func (x *ListPatchJobsResponse) Reset() { *x = ListPatchJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobsResponse) String() string { @@ -1049,7 +1035,7 @@ func (*ListPatchJobsResponse) ProtoMessage() {} func (x *ListPatchJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1118,9 @@ type PatchJob struct { func (x *PatchJob) Reset() { *x = PatchJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJob) String() string { @@ -1147,7 +1131,7 @@ func (*PatchJob) ProtoMessage() {} func (x *PatchJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1300,11 +1284,9 @@ type PatchConfig struct { func (x *PatchConfig) Reset() { *x = PatchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchConfig) String() string { @@ -1315,7 +1297,7 @@ func (*PatchConfig) ProtoMessage() {} func (x *PatchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1402,11 +1384,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -1417,7 +1397,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1444,11 +1424,9 @@ type CancelPatchJobRequest struct { func (x *CancelPatchJobRequest) Reset() { *x = CancelPatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelPatchJobRequest) String() string { @@ -1459,7 +1437,7 @@ func (*CancelPatchJobRequest) ProtoMessage() {} func (x *CancelPatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1480,9 @@ type AptSettings struct { func (x *AptSettings) Reset() { *x = AptSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptSettings) String() string { @@ -1517,7 +1493,7 @@ func (*AptSettings) ProtoMessage() {} func (x *AptSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1579,11 +1555,9 @@ type YumSettings struct { func (x *YumSettings) Reset() { *x = YumSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumSettings) String() string { @@ -1594,7 +1568,7 @@ func (*YumSettings) ProtoMessage() {} func (x *YumSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1646,11 +1620,9 @@ type GooSettings struct { func (x *GooSettings) Reset() { *x = GooSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooSettings) String() string { @@ -1661,7 +1633,7 @@ func (*GooSettings) ProtoMessage() {} func (x *GooSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1703,11 +1675,9 @@ type ZypperSettings struct { func (x *ZypperSettings) Reset() { *x = ZypperSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperSettings) String() string { @@ -1718,7 +1688,7 @@ func (*ZypperSettings) ProtoMessage() {} func (x *ZypperSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1764,9 @@ type WindowsUpdateSettings struct { func (x *WindowsUpdateSettings) Reset() { *x = WindowsUpdateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsUpdateSettings) String() string { @@ -1809,7 +1777,7 @@ func (*WindowsUpdateSettings) ProtoMessage() {} func (x *WindowsUpdateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1859,11 +1827,9 @@ type ExecStep struct { func (x *ExecStep) Reset() { *x = ExecStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStep) String() string { @@ -1874,7 +1840,7 @@ func (*ExecStep) ProtoMessage() {} func (x *ExecStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1928,11 +1894,9 @@ type ExecStepConfig struct { func (x *ExecStepConfig) Reset() { *x = ExecStepConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepConfig) String() string { @@ -1943,7 +1907,7 @@ func (*ExecStepConfig) ProtoMessage() {} func (x *ExecStepConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2028,11 +1992,9 @@ type GcsObject struct { func (x *GcsObject) Reset() { *x = GcsObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsObject) String() string { @@ -2043,7 +2005,7 @@ func (*GcsObject) ProtoMessage() {} func (x *GcsObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2110,11 +2072,9 @@ type PatchInstanceFilter struct { func (x *PatchInstanceFilter) Reset() { *x = PatchInstanceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceFilter) String() string { @@ -2125,7 +2085,7 @@ func (*PatchInstanceFilter) ProtoMessage() {} func (x *PatchInstanceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2212,11 +2172,9 @@ type PatchRollout struct { func (x *PatchRollout) Reset() { *x = PatchRollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRollout) String() string { @@ -2227,7 +2185,7 @@ func (*PatchRollout) ProtoMessage() {} func (x *PatchRollout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2301,11 +2259,9 @@ type PatchJob_InstanceDetailsSummary struct { func (x *PatchJob_InstanceDetailsSummary) Reset() { *x = PatchJob_InstanceDetailsSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJob_InstanceDetailsSummary) String() string { @@ -2316,7 +2272,7 @@ func (*PatchJob_InstanceDetailsSummary) ProtoMessage() {} func (x *PatchJob_InstanceDetailsSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2456,11 +2412,9 @@ type PatchInstanceFilter_GroupLabel struct { func (x *PatchInstanceFilter_GroupLabel) Reset() { *x = PatchInstanceFilter_GroupLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceFilter_GroupLabel) String() string { @@ -2471,7 +2425,7 @@ func (*PatchInstanceFilter_GroupLabel) ProtoMessage() {} func (x *PatchInstanceFilter_GroupLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3063,284 +3017,6 @@ func file_google_cloud_osconfig_v1_patch_jobs_proto_init() { return } file_google_cloud_osconfig_v1_osconfig_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExecutePatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobInstanceDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobInstanceDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PatchJobInstanceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PatchJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PatchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CancelPatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AptSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*YumSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GooSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ZypperSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*WindowsUpdateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExecStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GcsObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*PatchRollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PatchJob_InstanceDetailsSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceFilter_GroupLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1_patch_jobs_proto_msgTypes[17].OneofWrappers = []any{ (*ExecStepConfig_LocalPath)(nil), (*ExecStepConfig_GcsObject)(nil), diff --git a/osconfig/apiv1/osconfigpb/vulnerability.pb.go b/osconfig/apiv1/osconfigpb/vulnerability.pb.go index 8d707643cf71..a179b9d011bc 100755 --- a/osconfig/apiv1/osconfigpb/vulnerability.pb.go +++ b/osconfig/apiv1/osconfigpb/vulnerability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1/vulnerability.proto @@ -424,11 +424,9 @@ type VulnerabilityReport struct { func (x *VulnerabilityReport) Reset() { *x = VulnerabilityReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport) String() string { @@ -439,7 +437,7 @@ func (*VulnerabilityReport) ProtoMessage() {} func (x *VulnerabilityReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,11 +492,9 @@ type GetVulnerabilityReportRequest struct { func (x *GetVulnerabilityReportRequest) Reset() { *x = GetVulnerabilityReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVulnerabilityReportRequest) String() string { @@ -509,7 +505,7 @@ func (*GetVulnerabilityReportRequest) ProtoMessage() {} func (x *GetVulnerabilityReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +553,9 @@ type ListVulnerabilityReportsRequest struct { func (x *ListVulnerabilityReportsRequest) Reset() { *x = ListVulnerabilityReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVulnerabilityReportsRequest) String() string { @@ -572,7 +566,7 @@ func (*ListVulnerabilityReportsRequest) ProtoMessage() {} func (x *ListVulnerabilityReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +625,9 @@ type ListVulnerabilityReportsResponse struct { func (x *ListVulnerabilityReportsResponse) Reset() { *x = ListVulnerabilityReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVulnerabilityReportsResponse) String() string { @@ -646,7 +638,7 @@ func (*ListVulnerabilityReportsResponse) ProtoMessage() {} func (x *ListVulnerabilityReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +713,9 @@ type CVSSv3 struct { func (x *CVSSv3) Reset() { *x = CVSSv3{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CVSSv3) String() string { @@ -736,7 +726,7 @@ func (*CVSSv3) ProtoMessage() {} func (x *CVSSv3) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +854,9 @@ type VulnerabilityReport_Vulnerability struct { func (x *VulnerabilityReport_Vulnerability) Reset() { *x = VulnerabilityReport_Vulnerability{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability) String() string { @@ -879,7 +867,7 @@ func (*VulnerabilityReport_Vulnerability) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +952,9 @@ type VulnerabilityReport_Vulnerability_Details struct { func (x *VulnerabilityReport_Vulnerability_Details) Reset() { *x = VulnerabilityReport_Vulnerability_Details{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Details) String() string { @@ -979,7 +965,7 @@ func (*VulnerabilityReport_Vulnerability_Details) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Details) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1051,9 @@ type VulnerabilityReport_Vulnerability_Item struct { func (x *VulnerabilityReport_Vulnerability_Item) Reset() { *x = VulnerabilityReport_Vulnerability_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Item) String() string { @@ -1080,7 +1064,7 @@ func (*VulnerabilityReport_Vulnerability_Item) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,11 +1121,9 @@ type VulnerabilityReport_Vulnerability_Details_Reference struct { func (x *VulnerabilityReport_Vulnerability_Details_Reference) Reset() { *x = VulnerabilityReport_Vulnerability_Details_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Details_Reference) String() string { @@ -1152,7 +1134,7 @@ func (*VulnerabilityReport_Vulnerability_Details_Reference) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Details_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,116 +1464,6 @@ func file_google_cloud_osconfig_v1_vulnerability_proto_init() { if File_google_cloud_osconfig_v1_vulnerability_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVulnerabilityReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVulnerabilityReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVulnerabilityReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CVSSv3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Details); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1_vulnerability_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Details_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/osconfig/apiv1alpha/helpers.go b/osconfig/apiv1alpha/helpers.go index cf4b6b82d6fa..18c5d7283e99 100755 --- a/osconfig/apiv1alpha/helpers.go +++ b/osconfig/apiv1alpha/helpers.go @@ -18,10 +18,20 @@ package osconfig import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "osconfig.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/osconfig/apiv1alpha/os_config_zonal_client.go b/osconfig/apiv1alpha/os_config_zonal_client.go index a9a5a587224e..e6c4bd5b16af 100755 --- a/osconfig/apiv1alpha/os_config_zonal_client.go +++ b/osconfig/apiv1alpha/os_config_zonal_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" osconfigpb "cloud.google.com/go/osconfig/apiv1alpha/osconfigpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -628,6 +627,8 @@ type osConfigZonalGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOsConfigZonalClient creates a new os config zonal service client based on gRPC. @@ -657,6 +658,7 @@ func NewOsConfigZonalClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, osConfigZonalClient: osconfigpb.NewOsConfigZonalServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -719,6 +721,8 @@ type osConfigZonalRESTClient struct { // Points back to the CallOptions field of the containing OsConfigZonalClient CallOptions **OsConfigZonalCallOptions + + logger *slog.Logger } // NewOsConfigZonalRESTClient creates a new os config zonal service rest client. @@ -739,6 +743,7 @@ func NewOsConfigZonalRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -801,7 +806,7 @@ func (c *osConfigZonalGRPCClient) CreateOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.CreateOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.CreateOSPolicyAssignment, req, settings.GRPC, c.logger, "CreateOSPolicyAssignment") return err }, opts...) if err != nil { @@ -821,7 +826,7 @@ func (c *osConfigZonalGRPCClient) UpdateOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.UpdateOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.UpdateOSPolicyAssignment, req, settings.GRPC, c.logger, "UpdateOSPolicyAssignment") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *osConfigZonalGRPCClient) GetOSPolicyAssignment(ctx context.Context, req var resp *osconfigpb.OSPolicyAssignment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetOSPolicyAssignment, req, settings.GRPC, c.logger, "GetOSPolicyAssignment") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignments(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignments, req, settings.GRPC, c.logger, "ListOSPolicyAssignments") return err }, opts...) if err != nil { @@ -916,7 +921,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignmentRevisions(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignmentRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignmentRevisions, req, settings.GRPC, c.logger, "ListOSPolicyAssignmentRevisions") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *osConfigZonalGRPCClient) DeleteOSPolicyAssignment(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.DeleteOSPolicyAssignment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.DeleteOSPolicyAssignment, req, settings.GRPC, c.logger, "DeleteOSPolicyAssignment") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *osConfigZonalGRPCClient) GetInstanceOSPoliciesCompliance(ctx context.Co var resp *osconfigpb.InstanceOSPoliciesCompliance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetInstanceOSPoliciesCompliance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetInstanceOSPoliciesCompliance, req, settings.GRPC, c.logger, "GetInstanceOSPoliciesCompliance") return err }, opts...) if err != nil { @@ -1000,7 +1005,7 @@ func (c *osConfigZonalGRPCClient) ListInstanceOSPoliciesCompliances(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListInstanceOSPoliciesCompliances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListInstanceOSPoliciesCompliances, req, settings.GRPC, c.logger, "ListInstanceOSPoliciesCompliances") return err }, opts...) if err != nil { @@ -1035,7 +1040,7 @@ func (c *osConfigZonalGRPCClient) GetOSPolicyAssignmentReport(ctx context.Contex var resp *osconfigpb.OSPolicyAssignmentReport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetOSPolicyAssignmentReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetOSPolicyAssignmentReport, req, settings.GRPC, c.logger, "GetOSPolicyAssignmentReport") return err }, opts...) if err != nil { @@ -1064,7 +1069,7 @@ func (c *osConfigZonalGRPCClient) ListOSPolicyAssignmentReports(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListOSPolicyAssignmentReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListOSPolicyAssignmentReports, req, settings.GRPC, c.logger, "ListOSPolicyAssignmentReports") return err }, opts...) if err != nil { @@ -1099,7 +1104,7 @@ func (c *osConfigZonalGRPCClient) GetInventory(ctx context.Context, req *osconfi var resp *osconfigpb.Inventory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetInventory, req, settings.GRPC, c.logger, "GetInventory") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *osConfigZonalGRPCClient) ListInventories(ctx context.Context, req *osco } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListInventories, req, settings.GRPC, c.logger, "ListInventories") return err }, opts...) if err != nil { @@ -1163,7 +1168,7 @@ func (c *osConfigZonalGRPCClient) GetVulnerabilityReport(ctx context.Context, re var resp *osconfigpb.VulnerabilityReport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.GetVulnerabilityReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.GetVulnerabilityReport, req, settings.GRPC, c.logger, "GetVulnerabilityReport") return err }, opts...) if err != nil { @@ -1192,7 +1197,7 @@ func (c *osConfigZonalGRPCClient) ListVulnerabilityReports(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.osConfigZonalClient.ListVulnerabilityReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.osConfigZonalClient.ListVulnerabilityReports, req, settings.GRPC, c.logger, "ListVulnerabilityReports") return err }, opts...) if err != nil { @@ -1266,21 +1271,10 @@ func (c *osConfigZonalRESTClient) CreateOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOSPolicyAssignment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1352,21 +1346,10 @@ func (c *osConfigZonalRESTClient) UpdateOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOSPolicyAssignment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1421,17 +1404,7 @@ func (c *osConfigZonalRESTClient) GetOSPolicyAssignment(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOSPolicyAssignment") if err != nil { return err } @@ -1495,21 +1468,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignments(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1584,21 +1546,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignmentRevisions(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignmentRevisions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1671,21 +1622,10 @@ func (c *osConfigZonalRESTClient) DeleteOSPolicyAssignment(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOSPolicyAssignment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1739,17 +1679,7 @@ func (c *osConfigZonalRESTClient) GetInstanceOSPoliciesCompliance(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstanceOSPoliciesCompliance") if err != nil { return err } @@ -1817,21 +1747,10 @@ func (c *osConfigZonalRESTClient) ListInstanceOSPoliciesCompliances(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstanceOSPoliciesCompliances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1895,17 +1814,7 @@ func (c *osConfigZonalRESTClient) GetOSPolicyAssignmentReport(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOSPolicyAssignmentReport") if err != nil { return err } @@ -1971,21 +1880,10 @@ func (c *osConfigZonalRESTClient) ListOSPolicyAssignmentReports(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOSPolicyAssignmentReports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2052,17 +1950,7 @@ func (c *osConfigZonalRESTClient) GetInventory(ctx context.Context, req *osconfi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInventory") if err != nil { return err } @@ -2130,21 +2018,10 @@ func (c *osConfigZonalRESTClient) ListInventories(ctx context.Context, req *osco } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInventories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2208,17 +2085,7 @@ func (c *osConfigZonalRESTClient) GetVulnerabilityReport(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVulnerabilityReport") if err != nil { return err } @@ -2283,21 +2150,10 @@ func (c *osConfigZonalRESTClient) ListVulnerabilityReports(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVulnerabilityReports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/osconfig/apiv1alpha/os_config_zonal_client_example_go123_test.go b/osconfig/apiv1alpha/os_config_zonal_client_example_go123_test.go index 14fc0761704b..8a3d3d0220fd 100644 --- a/osconfig/apiv1alpha/os_config_zonal_client_example_go123_test.go +++ b/osconfig/apiv1alpha/os_config_zonal_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleOsConfigZonalClient_ListInstanceOSPoliciesCompliances_all() { } for resp, err := range c.ListInstanceOSPoliciesCompliances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleOsConfigZonalClient_ListInventories_all() { } for resp, err := range c.ListInventories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignmentReports_all() { } for resp, err := range c.ListOSPolicyAssignmentReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignmentRevisions_all() { } for resp, err := range c.ListOSPolicyAssignmentRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleOsConfigZonalClient_ListOSPolicyAssignments_all() { } for resp, err := range c.ListOSPolicyAssignments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleOsConfigZonalClient_ListVulnerabilityReports_all() { } for resp, err := range c.ListVulnerabilityReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/osconfig/apiv1alpha/osconfigpb/config_common.pb.go b/osconfig/apiv1alpha/osconfigpb/config_common.pb.go index 6ea11ff604ec..c9b842f27327 100755 --- a/osconfig/apiv1alpha/osconfigpb/config_common.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/config_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/config_common.proto @@ -243,11 +243,9 @@ type OSPolicyResourceConfigStep struct { func (x *OSPolicyResourceConfigStep) Reset() { *x = OSPolicyResourceConfigStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceConfigStep) String() string { @@ -258,7 +256,7 @@ func (*OSPolicyResourceConfigStep) ProtoMessage() {} func (x *OSPolicyResourceConfigStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +317,9 @@ type OSPolicyResourceCompliance struct { func (x *OSPolicyResourceCompliance) Reset() { *x = OSPolicyResourceCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceCompliance) String() string { @@ -334,7 +330,7 @@ func (*OSPolicyResourceCompliance) ProtoMessage() {} func (x *OSPolicyResourceCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +406,9 @@ type OSPolicyResourceCompliance_ExecResourceOutput struct { func (x *OSPolicyResourceCompliance_ExecResourceOutput) Reset() { *x = OSPolicyResourceCompliance_ExecResourceOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyResourceCompliance_ExecResourceOutput) String() string { @@ -425,7 +419,7 @@ func (*OSPolicyResourceCompliance_ExecResourceOutput) ProtoMessage() {} func (x *OSPolicyResourceCompliance_ExecResourceOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,44 +574,6 @@ func file_google_cloud_osconfig_v1alpha_config_common_proto_init() { if File_google_cloud_osconfig_v1alpha_config_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceConfigStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyResourceCompliance_ExecResourceOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1alpha_config_common_proto_msgTypes[1].OneofWrappers = []any{ (*OSPolicyResourceCompliance_ExecResourceOutput_)(nil), } diff --git a/osconfig/apiv1alpha/osconfigpb/instance_os_policies_compliance.pb.go b/osconfig/apiv1alpha/osconfigpb/instance_os_policies_compliance.pb.go index b16fc190c8fa..099a16bc116f 100755 --- a/osconfig/apiv1alpha/osconfigpb/instance_os_policies_compliance.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/instance_os_policies_compliance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -94,11 +94,9 @@ type InstanceOSPoliciesCompliance struct { func (x *InstanceOSPoliciesCompliance) Reset() { *x = InstanceOSPoliciesCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceOSPoliciesCompliance) String() string { @@ -109,7 +107,7 @@ func (*InstanceOSPoliciesCompliance) ProtoMessage() {} func (x *InstanceOSPoliciesCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,11 +201,9 @@ type GetInstanceOSPoliciesComplianceRequest struct { func (x *GetInstanceOSPoliciesComplianceRequest) Reset() { *x = GetInstanceOSPoliciesComplianceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceOSPoliciesComplianceRequest) String() string { @@ -218,7 +214,7 @@ func (*GetInstanceOSPoliciesComplianceRequest) ProtoMessage() {} func (x *GetInstanceOSPoliciesComplianceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +265,9 @@ type ListInstanceOSPoliciesCompliancesRequest struct { func (x *ListInstanceOSPoliciesCompliancesRequest) Reset() { *x = ListInstanceOSPoliciesCompliancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceOSPoliciesCompliancesRequest) String() string { @@ -284,7 +278,7 @@ func (*ListInstanceOSPoliciesCompliancesRequest) ProtoMessage() {} func (x *ListInstanceOSPoliciesCompliancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +339,9 @@ type ListInstanceOSPoliciesCompliancesResponse struct { func (x *ListInstanceOSPoliciesCompliancesResponse) Reset() { *x = ListInstanceOSPoliciesCompliancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceOSPoliciesCompliancesResponse) String() string { @@ -360,7 +352,7 @@ func (*ListInstanceOSPoliciesCompliancesResponse) ProtoMessage() {} func (x *ListInstanceOSPoliciesCompliancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +406,9 @@ type InstanceOSPoliciesCompliance_OSPolicyCompliance struct { func (x *InstanceOSPoliciesCompliance_OSPolicyCompliance) Reset() { *x = InstanceOSPoliciesCompliance_OSPolicyCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceOSPoliciesCompliance_OSPolicyCompliance) String() string { @@ -429,7 +419,7 @@ func (*InstanceOSPoliciesCompliance_OSPolicyCompliance) ProtoMessage() {} func (x *InstanceOSPoliciesCompliance_OSPolicyCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,68 +643,6 @@ func file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_in return } file_google_cloud_osconfig_v1alpha_config_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InstanceOSPoliciesCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceOSPoliciesComplianceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceOSPoliciesCompliancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceOSPoliciesCompliancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_instance_os_policies_compliance_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*InstanceOSPoliciesCompliance_OSPolicyCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/osconfig/apiv1alpha/osconfigpb/inventory.pb.go b/osconfig/apiv1alpha/osconfigpb/inventory.pb.go index c0c055c1fbe1..675fd2368347 100755 --- a/osconfig/apiv1alpha/osconfigpb/inventory.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/inventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/inventory.proto @@ -225,11 +225,9 @@ type Inventory struct { func (x *Inventory) Reset() { *x = Inventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory) String() string { @@ -240,7 +238,7 @@ func (*Inventory) ProtoMessage() {} func (x *Inventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +303,9 @@ type GetInventoryRequest struct { func (x *GetInventoryRequest) Reset() { *x = GetInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInventoryRequest) String() string { @@ -320,7 +316,7 @@ func (*GetInventoryRequest) ProtoMessage() {} func (x *GetInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +374,9 @@ type ListInventoriesRequest struct { func (x *ListInventoriesRequest) Reset() { *x = ListInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInventoriesRequest) String() string { @@ -393,7 +387,7 @@ func (*ListInventoriesRequest) ProtoMessage() {} func (x *ListInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +452,9 @@ type ListInventoriesResponse struct { func (x *ListInventoriesResponse) Reset() { *x = ListInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInventoriesResponse) String() string { @@ -473,7 +465,7 @@ func (*ListInventoriesResponse) ProtoMessage() {} func (x *ListInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +523,9 @@ type Inventory_OsInfo struct { func (x *Inventory_OsInfo) Reset() { *x = Inventory_OsInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_OsInfo) String() string { @@ -546,7 +536,7 @@ func (*Inventory_OsInfo) ProtoMessage() {} func (x *Inventory_OsInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +634,9 @@ type Inventory_Item struct { func (x *Inventory_Item) Reset() { *x = Inventory_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_Item) String() string { @@ -659,7 +647,7 @@ func (*Inventory_Item) ProtoMessage() {} func (x *Inventory_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +760,9 @@ type Inventory_SoftwarePackage struct { func (x *Inventory_SoftwarePackage) Reset() { *x = Inventory_SoftwarePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_SoftwarePackage) String() string { @@ -787,7 +773,7 @@ func (*Inventory_SoftwarePackage) ProtoMessage() {} func (x *Inventory_SoftwarePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,11 +958,9 @@ type Inventory_VersionedPackage struct { func (x *Inventory_VersionedPackage) Reset() { *x = Inventory_VersionedPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_VersionedPackage) String() string { @@ -987,7 +971,7 @@ func (*Inventory_VersionedPackage) ProtoMessage() {} func (x *Inventory_VersionedPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1025,9 @@ type Inventory_ZypperPatch struct { func (x *Inventory_ZypperPatch) Reset() { *x = Inventory_ZypperPatch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_ZypperPatch) String() string { @@ -1056,7 +1038,7 @@ func (*Inventory_ZypperPatch) ProtoMessage() {} func (x *Inventory_ZypperPatch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1134,11 +1116,9 @@ type Inventory_WindowsUpdatePackage struct { func (x *Inventory_WindowsUpdatePackage) Reset() { *x = Inventory_WindowsUpdatePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage) String() string { @@ -1149,7 +1129,7 @@ func (*Inventory_WindowsUpdatePackage) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,11 +1228,9 @@ type Inventory_WindowsQuickFixEngineeringPackage struct { func (x *Inventory_WindowsQuickFixEngineeringPackage) Reset() { *x = Inventory_WindowsQuickFixEngineeringPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsQuickFixEngineeringPackage) String() string { @@ -1263,7 +1241,7 @@ func (*Inventory_WindowsQuickFixEngineeringPackage) ProtoMessage() {} func (x *Inventory_WindowsQuickFixEngineeringPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,11 +1308,9 @@ type Inventory_WindowsApplication struct { func (x *Inventory_WindowsApplication) Reset() { *x = Inventory_WindowsApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsApplication) String() string { @@ -1345,7 +1321,7 @@ func (*Inventory_WindowsApplication) ProtoMessage() {} func (x *Inventory_WindowsApplication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1409,11 +1385,9 @@ type Inventory_WindowsUpdatePackage_WindowsUpdateCategory struct { func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) Reset() { *x = Inventory_WindowsUpdatePackage_WindowsUpdateCategory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) String() string { @@ -1424,7 +1398,7 @@ func (*Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoMessage() {} func (x *Inventory_WindowsUpdatePackage_WindowsUpdateCategory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1818,164 +1792,6 @@ func file_google_cloud_osconfig_v1alpha_inventory_proto_init() { if File_google_cloud_osconfig_v1alpha_inventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Inventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_OsInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_SoftwarePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_VersionedPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_ZypperPatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsQuickFixEngineeringPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Inventory_WindowsUpdatePackage_WindowsUpdateCategory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1alpha_inventory_proto_msgTypes[5].OneofWrappers = []any{ (*Inventory_Item_InstalledPackage)(nil), (*Inventory_Item_AvailablePackage)(nil), diff --git a/osconfig/apiv1alpha/osconfigpb/os_policy.pb.go b/osconfig/apiv1alpha/osconfigpb/os_policy.pb.go index ad055a447c4e..da6365111591 100755 --- a/osconfig/apiv1alpha/osconfigpb/os_policy.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/os_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/os_policy.proto @@ -356,11 +356,9 @@ type OSPolicy struct { func (x *OSPolicy) Reset() { *x = OSPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy) String() string { @@ -371,7 +369,7 @@ func (*OSPolicy) ProtoMessage() {} func (x *OSPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +438,9 @@ type OSPolicy_OSFilter struct { func (x *OSPolicy_OSFilter) Reset() { *x = OSPolicy_OSFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_OSFilter) String() string { @@ -455,7 +451,7 @@ func (*OSPolicy_OSFilter) ProtoMessage() {} func (x *OSPolicy_OSFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +500,9 @@ type OSPolicy_InventoryFilter struct { func (x *OSPolicy_InventoryFilter) Reset() { *x = OSPolicy_InventoryFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_InventoryFilter) String() string { @@ -519,7 +513,7 @@ func (*OSPolicy_InventoryFilter) ProtoMessage() {} func (x *OSPolicy_InventoryFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +574,9 @@ type OSPolicy_Resource struct { func (x *OSPolicy_Resource) Reset() { *x = OSPolicy_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource) String() string { @@ -595,7 +587,7 @@ func (*OSPolicy_Resource) ProtoMessage() {} func (x *OSPolicy_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +715,9 @@ type OSPolicy_ResourceGroup struct { func (x *OSPolicy_ResourceGroup) Reset() { *x = OSPolicy_ResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_ResourceGroup) String() string { @@ -738,7 +728,7 @@ func (*OSPolicy_ResourceGroup) ProtoMessage() {} func (x *OSPolicy_ResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +789,9 @@ type OSPolicy_Resource_File struct { func (x *OSPolicy_Resource_File) Reset() { *x = OSPolicy_Resource_File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File) String() string { @@ -814,7 +802,7 @@ func (*OSPolicy_Resource_File) ProtoMessage() {} func (x *OSPolicy_Resource_File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -913,11 +901,9 @@ type OSPolicy_Resource_PackageResource struct { func (x *OSPolicy_Resource_PackageResource) Reset() { *x = OSPolicy_Resource_PackageResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource) String() string { @@ -928,7 +914,7 @@ func (*OSPolicy_Resource_PackageResource) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,11 +1066,9 @@ type OSPolicy_Resource_RepositoryResource struct { func (x *OSPolicy_Resource_RepositoryResource) Reset() { *x = OSPolicy_Resource_RepositoryResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource) String() string { @@ -1095,7 +1079,7 @@ func (*OSPolicy_Resource_RepositoryResource) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,11 +1209,9 @@ type OSPolicy_Resource_ExecResource struct { func (x *OSPolicy_Resource_ExecResource) Reset() { *x = OSPolicy_Resource_ExecResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource) String() string { @@ -1240,7 +1222,7 @@ func (*OSPolicy_Resource_ExecResource) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1286,9 @@ type OSPolicy_Resource_FileResource struct { func (x *OSPolicy_Resource_FileResource) Reset() { *x = OSPolicy_Resource_FileResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_FileResource) String() string { @@ -1319,7 +1299,7 @@ func (*OSPolicy_Resource_FileResource) ProtoMessage() {} func (x *OSPolicy_Resource_FileResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1390,9 @@ type OSPolicy_Resource_File_Remote struct { func (x *OSPolicy_Resource_File_Remote) Reset() { *x = OSPolicy_Resource_File_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Remote) String() string { @@ -1425,7 +1403,7 @@ func (*OSPolicy_Resource_File_Remote) ProtoMessage() {} func (x *OSPolicy_Resource_File_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1448,9 @@ type OSPolicy_Resource_File_Gcs struct { func (x *OSPolicy_Resource_File_Gcs) Reset() { *x = OSPolicy_Resource_File_Gcs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_File_Gcs) String() string { @@ -1485,7 +1461,7 @@ func (*OSPolicy_Resource_File_Gcs) ProtoMessage() {} func (x *OSPolicy_Resource_File_Gcs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1514,9 @@ type OSPolicy_Resource_PackageResource_Deb struct { func (x *OSPolicy_Resource_PackageResource_Deb) Reset() { *x = OSPolicy_Resource_PackageResource_Deb{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Deb) String() string { @@ -1553,7 +1527,7 @@ func (*OSPolicy_Resource_PackageResource_Deb) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Deb) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,11 +1570,9 @@ type OSPolicy_Resource_PackageResource_APT struct { func (x *OSPolicy_Resource_PackageResource_APT) Reset() { *x = OSPolicy_Resource_PackageResource_APT{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_APT) String() string { @@ -1611,7 +1583,7 @@ func (*OSPolicy_Resource_PackageResource_APT) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_APT) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1650,11 +1622,9 @@ type OSPolicy_Resource_PackageResource_RPM struct { func (x *OSPolicy_Resource_PackageResource_RPM) Reset() { *x = OSPolicy_Resource_PackageResource_RPM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_RPM) String() string { @@ -1665,7 +1635,7 @@ func (*OSPolicy_Resource_PackageResource_RPM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_RPM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1708,11 +1678,9 @@ type OSPolicy_Resource_PackageResource_YUM struct { func (x *OSPolicy_Resource_PackageResource_YUM) Reset() { *x = OSPolicy_Resource_PackageResource_YUM{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_YUM) String() string { @@ -1723,7 +1691,7 @@ func (*OSPolicy_Resource_PackageResource_YUM) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_YUM) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1759,11 +1727,9 @@ type OSPolicy_Resource_PackageResource_Zypper struct { func (x *OSPolicy_Resource_PackageResource_Zypper) Reset() { *x = OSPolicy_Resource_PackageResource_Zypper{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_Zypper) String() string { @@ -1774,7 +1740,7 @@ func (*OSPolicy_Resource_PackageResource_Zypper) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_Zypper) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1810,11 +1776,9 @@ type OSPolicy_Resource_PackageResource_GooGet struct { func (x *OSPolicy_Resource_PackageResource_GooGet) Reset() { *x = OSPolicy_Resource_PackageResource_GooGet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_GooGet) String() string { @@ -1825,7 +1789,7 @@ func (*OSPolicy_Resource_PackageResource_GooGet) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_GooGet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1864,11 +1828,9 @@ type OSPolicy_Resource_PackageResource_MSI struct { func (x *OSPolicy_Resource_PackageResource_MSI) Reset() { *x = OSPolicy_Resource_PackageResource_MSI{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_PackageResource_MSI) String() string { @@ -1879,7 +1841,7 @@ func (*OSPolicy_Resource_PackageResource_MSI) ProtoMessage() {} func (x *OSPolicy_Resource_PackageResource_MSI) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1932,11 +1894,9 @@ type OSPolicy_Resource_RepositoryResource_AptRepository struct { func (x *OSPolicy_Resource_RepositoryResource_AptRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_AptRepository) String() string { @@ -1947,7 +1907,7 @@ func (*OSPolicy_Resource_RepositoryResource_AptRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1980,9 @@ type OSPolicy_Resource_RepositoryResource_YumRepository struct { func (x *OSPolicy_Resource_RepositoryResource_YumRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_YumRepository) String() string { @@ -2035,7 +1993,7 @@ func (*OSPolicy_Resource_RepositoryResource_YumRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2059,9 @@ type OSPolicy_Resource_RepositoryResource_ZypperRepository struct { func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_ZypperRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) String() string { @@ -2116,7 +2072,7 @@ func (*OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_ZypperRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2175,11 +2131,9 @@ type OSPolicy_Resource_RepositoryResource_GooRepository struct { func (x *OSPolicy_Resource_RepositoryResource_GooRepository) Reset() { *x = OSPolicy_Resource_RepositoryResource_GooRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_RepositoryResource_GooRepository) String() string { @@ -2190,7 +2144,7 @@ func (*OSPolicy_Resource_RepositoryResource_GooRepository) ProtoMessage() {} func (x *OSPolicy_Resource_RepositoryResource_GooRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2247,11 +2201,9 @@ type OSPolicy_Resource_ExecResource_Exec struct { func (x *OSPolicy_Resource_ExecResource_Exec) Reset() { *x = OSPolicy_Resource_ExecResource_Exec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicy_Resource_ExecResource_Exec) String() string { @@ -2262,7 +2214,7 @@ func (*OSPolicy_Resource_ExecResource_Exec) ProtoMessage() {} func (x *OSPolicy_Resource_ExecResource_Exec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2778,296 +2730,6 @@ func file_google_cloud_osconfig_v1alpha_os_policy_proto_init() { if File_google_cloud_osconfig_v1alpha_os_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_OSFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_InventoryFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_ResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_FileResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_File_Gcs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Deb); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_APT); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_RPM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_YUM); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_Zypper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_GooGet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_PackageResource_MSI); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_ZypperRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_RepositoryResource_GooRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicy_Resource_ExecResource_Exec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3].OneofWrappers = []any{ (*OSPolicy_Resource_Pkg)(nil), (*OSPolicy_Resource_Repository)(nil), diff --git a/osconfig/apiv1alpha/osconfigpb/os_policy_assignment_reports.pb.go b/osconfig/apiv1alpha/osconfigpb/os_policy_assignment_reports.pb.go index 01b792b835fd..30e0c18481ff 100755 --- a/osconfig/apiv1alpha/osconfigpb/os_policy_assignment_reports.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/os_policy_assignment_reports.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto @@ -243,11 +243,9 @@ type GetOSPolicyAssignmentReportRequest struct { func (x *GetOSPolicyAssignmentReportRequest) Reset() { *x = GetOSPolicyAssignmentReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOSPolicyAssignmentReportRequest) String() string { @@ -258,7 +256,7 @@ func (*GetOSPolicyAssignmentReportRequest) ProtoMessage() {} func (x *GetOSPolicyAssignmentReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +324,9 @@ type ListOSPolicyAssignmentReportsRequest struct { func (x *ListOSPolicyAssignmentReportsRequest) Reset() { *x = ListOSPolicyAssignmentReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentReportsRequest) String() string { @@ -341,7 +337,7 @@ func (*ListOSPolicyAssignmentReportsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +396,9 @@ type ListOSPolicyAssignmentReportsResponse struct { func (x *ListOSPolicyAssignmentReportsResponse) Reset() { *x = ListOSPolicyAssignmentReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentReportsResponse) String() string { @@ -415,7 +409,7 @@ func (*ListOSPolicyAssignmentReportsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +473,9 @@ type OSPolicyAssignmentReport struct { func (x *OSPolicyAssignmentReport) Reset() { *x = OSPolicyAssignmentReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport) String() string { @@ -494,7 +486,7 @@ func (*OSPolicyAssignmentReport) ProtoMessage() {} func (x *OSPolicyAssignmentReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +581,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance struct { func (x *OSPolicyAssignmentReport_OSPolicyCompliance) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance) String() string { @@ -604,7 +594,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance) ProtoMessage() {} func (x *OSPolicyAssignmentReport_OSPolicyCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +675,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance stru func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) String() string { @@ -700,7 +688,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) P func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +773,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPo func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) String() string { @@ -801,7 +787,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OS func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +829,9 @@ type OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_Exec func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) Reset() { *x = OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) String() string { @@ -859,7 +843,7 @@ func (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_Ex func (x *OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,104 +1127,6 @@ func file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_init( if File_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetOSPolicyAssignmentReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1alpha_os_policy_assignment_reports_proto_msgTypes[5].OneofWrappers = []any{ (*OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput_)(nil), } diff --git a/osconfig/apiv1alpha/osconfigpb/os_policy_assignments.pb.go b/osconfig/apiv1alpha/osconfigpb/os_policy_assignments.pb.go index 92dc6f3840b6..1e5894438f93 100755 --- a/osconfig/apiv1alpha/osconfigpb/os_policy_assignments.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/os_policy_assignments.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -288,11 +288,9 @@ type OSPolicyAssignment struct { func (x *OSPolicyAssignment) Reset() { *x = OSPolicyAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment) String() string { @@ -303,7 +301,7 @@ func (*OSPolicyAssignment) ProtoMessage() {} func (x *OSPolicyAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +431,9 @@ type OSPolicyAssignmentOperationMetadata struct { func (x *OSPolicyAssignmentOperationMetadata) Reset() { *x = OSPolicyAssignmentOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignmentOperationMetadata) String() string { @@ -448,7 +444,7 @@ func (*OSPolicyAssignmentOperationMetadata) ProtoMessage() {} func (x *OSPolicyAssignmentOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +518,9 @@ type CreateOSPolicyAssignmentRequest struct { func (x *CreateOSPolicyAssignmentRequest) Reset() { *x = CreateOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOSPolicyAssignmentRequest) String() string { @@ -537,7 +531,7 @@ func (*CreateOSPolicyAssignmentRequest) ProtoMessage() {} func (x *CreateOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +581,9 @@ type UpdateOSPolicyAssignmentRequest struct { func (x *UpdateOSPolicyAssignmentRequest) Reset() { *x = UpdateOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOSPolicyAssignmentRequest) String() string { @@ -602,7 +594,7 @@ func (*UpdateOSPolicyAssignmentRequest) ProtoMessage() {} func (x *UpdateOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +638,9 @@ type GetOSPolicyAssignmentRequest struct { func (x *GetOSPolicyAssignmentRequest) Reset() { *x = GetOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOSPolicyAssignmentRequest) String() string { @@ -661,7 +651,7 @@ func (*GetOSPolicyAssignmentRequest) ProtoMessage() {} func (x *GetOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +691,9 @@ type ListOSPolicyAssignmentsRequest struct { func (x *ListOSPolicyAssignmentsRequest) Reset() { *x = ListOSPolicyAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentsRequest) String() string { @@ -716,7 +704,7 @@ func (*ListOSPolicyAssignmentsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,11 +754,9 @@ type ListOSPolicyAssignmentsResponse struct { func (x *ListOSPolicyAssignmentsResponse) Reset() { *x = ListOSPolicyAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentsResponse) String() string { @@ -781,7 +767,7 @@ func (*ListOSPolicyAssignmentsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +814,9 @@ type ListOSPolicyAssignmentRevisionsRequest struct { func (x *ListOSPolicyAssignmentRevisionsRequest) Reset() { *x = ListOSPolicyAssignmentRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentRevisionsRequest) String() string { @@ -843,7 +827,7 @@ func (*ListOSPolicyAssignmentRevisionsRequest) ProtoMessage() {} func (x *ListOSPolicyAssignmentRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +878,9 @@ type ListOSPolicyAssignmentRevisionsResponse struct { func (x *ListOSPolicyAssignmentRevisionsResponse) Reset() { *x = ListOSPolicyAssignmentRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOSPolicyAssignmentRevisionsResponse) String() string { @@ -909,7 +891,7 @@ func (*ListOSPolicyAssignmentRevisionsResponse) ProtoMessage() {} func (x *ListOSPolicyAssignmentRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +932,9 @@ type DeleteOSPolicyAssignmentRequest struct { func (x *DeleteOSPolicyAssignmentRequest) Reset() { *x = DeleteOSPolicyAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOSPolicyAssignmentRequest) String() string { @@ -965,7 +945,7 @@ func (*DeleteOSPolicyAssignmentRequest) ProtoMessage() {} func (x *DeleteOSPolicyAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +989,9 @@ type OSPolicyAssignment_LabelSet struct { func (x *OSPolicyAssignment_LabelSet) Reset() { *x = OSPolicyAssignment_LabelSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_LabelSet) String() string { @@ -1024,7 +1002,7 @@ func (*OSPolicyAssignment_LabelSet) ProtoMessage() {} func (x *OSPolicyAssignment_LabelSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1061,9 @@ type OSPolicyAssignment_InstanceFilter struct { func (x *OSPolicyAssignment_InstanceFilter) Reset() { *x = OSPolicyAssignment_InstanceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_InstanceFilter) String() string { @@ -1098,7 +1074,7 @@ func (*OSPolicyAssignment_InstanceFilter) ProtoMessage() {} func (x *OSPolicyAssignment_InstanceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1145,9 @@ type OSPolicyAssignment_Rollout struct { func (x *OSPolicyAssignment_Rollout) Reset() { *x = OSPolicyAssignment_Rollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_Rollout) String() string { @@ -1184,7 +1158,7 @@ func (*OSPolicyAssignment_Rollout) ProtoMessage() {} func (x *OSPolicyAssignment_Rollout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1207,9 @@ type OSPolicyAssignment_InstanceFilter_Inventory struct { func (x *OSPolicyAssignment_InstanceFilter_Inventory) Reset() { *x = OSPolicyAssignment_InstanceFilter_Inventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OSPolicyAssignment_InstanceFilter_Inventory) String() string { @@ -1248,7 +1220,7 @@ func (*OSPolicyAssignment_InstanceFilter_Inventory) ProtoMessage() {} func (x *OSPolicyAssignment_InstanceFilter_Inventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1637,176 +1609,6 @@ func file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_init() { } file_google_cloud_osconfig_v1alpha_os_policy_proto_init() file_google_cloud_osconfig_v1alpha_osconfig_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignmentOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListOSPolicyAssignmentRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOSPolicyAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_LabelSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_InstanceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_Rollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_os_policy_assignments_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*OSPolicyAssignment_InstanceFilter_Inventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/osconfig/apiv1alpha/osconfigpb/osconfig_common.pb.go b/osconfig/apiv1alpha/osconfigpb/osconfig_common.pb.go index 5930f6c90c51..02a8273c65a0 100755 --- a/osconfig/apiv1alpha/osconfigpb/osconfig_common.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/osconfig_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -53,11 +53,9 @@ type FixedOrPercent struct { func (x *FixedOrPercent) Reset() { *x = FixedOrPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_osconfig_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_osconfig_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FixedOrPercent) String() string { @@ -68,7 +66,7 @@ func (*FixedOrPercent) ProtoMessage() {} func (x *FixedOrPercent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_osconfig_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,20 +179,6 @@ func file_google_cloud_osconfig_v1alpha_osconfig_common_proto_init() { if File_google_cloud_osconfig_v1alpha_osconfig_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_osconfig_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FixedOrPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1alpha_osconfig_common_proto_msgTypes[0].OneofWrappers = []any{ (*FixedOrPercent_Fixed)(nil), (*FixedOrPercent_Percent)(nil), diff --git a/osconfig/apiv1alpha/osconfigpb/osconfig_zonal_service.pb.go b/osconfig/apiv1alpha/osconfigpb/osconfig_zonal_service.pb.go index 00b354f07316..e9194c9f0b5a 100755 --- a/osconfig/apiv1alpha/osconfigpb/osconfig_zonal_service.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/osconfig_zonal_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto diff --git a/osconfig/apiv1alpha/osconfigpb/vulnerability.pb.go b/osconfig/apiv1alpha/osconfigpb/vulnerability.pb.go index f4546a393a20..41cedec3bffc 100755 --- a/osconfig/apiv1alpha/osconfigpb/vulnerability.pb.go +++ b/osconfig/apiv1alpha/osconfigpb/vulnerability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1alpha/vulnerability.proto @@ -424,11 +424,9 @@ type VulnerabilityReport struct { func (x *VulnerabilityReport) Reset() { *x = VulnerabilityReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport) String() string { @@ -439,7 +437,7 @@ func (*VulnerabilityReport) ProtoMessage() {} func (x *VulnerabilityReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,11 +492,9 @@ type GetVulnerabilityReportRequest struct { func (x *GetVulnerabilityReportRequest) Reset() { *x = GetVulnerabilityReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVulnerabilityReportRequest) String() string { @@ -509,7 +505,7 @@ func (*GetVulnerabilityReportRequest) ProtoMessage() {} func (x *GetVulnerabilityReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +553,9 @@ type ListVulnerabilityReportsRequest struct { func (x *ListVulnerabilityReportsRequest) Reset() { *x = ListVulnerabilityReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVulnerabilityReportsRequest) String() string { @@ -572,7 +566,7 @@ func (*ListVulnerabilityReportsRequest) ProtoMessage() {} func (x *ListVulnerabilityReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +625,9 @@ type ListVulnerabilityReportsResponse struct { func (x *ListVulnerabilityReportsResponse) Reset() { *x = ListVulnerabilityReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVulnerabilityReportsResponse) String() string { @@ -646,7 +638,7 @@ func (*ListVulnerabilityReportsResponse) ProtoMessage() {} func (x *ListVulnerabilityReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +713,9 @@ type CVSSv3 struct { func (x *CVSSv3) Reset() { *x = CVSSv3{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CVSSv3) String() string { @@ -736,7 +726,7 @@ func (*CVSSv3) ProtoMessage() {} func (x *CVSSv3) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -864,11 +854,9 @@ type VulnerabilityReport_Vulnerability struct { func (x *VulnerabilityReport_Vulnerability) Reset() { *x = VulnerabilityReport_Vulnerability{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability) String() string { @@ -879,7 +867,7 @@ func (*VulnerabilityReport_Vulnerability) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -964,11 +952,9 @@ type VulnerabilityReport_Vulnerability_Details struct { func (x *VulnerabilityReport_Vulnerability_Details) Reset() { *x = VulnerabilityReport_Vulnerability_Details{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Details) String() string { @@ -979,7 +965,7 @@ func (*VulnerabilityReport_Vulnerability_Details) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Details) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1051,9 @@ type VulnerabilityReport_Vulnerability_Item struct { func (x *VulnerabilityReport_Vulnerability_Item) Reset() { *x = VulnerabilityReport_Vulnerability_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Item) String() string { @@ -1080,7 +1064,7 @@ func (*VulnerabilityReport_Vulnerability_Item) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,11 +1121,9 @@ type VulnerabilityReport_Vulnerability_Details_Reference struct { func (x *VulnerabilityReport_Vulnerability_Details_Reference) Reset() { *x = VulnerabilityReport_Vulnerability_Details_Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerabilityReport_Vulnerability_Details_Reference) String() string { @@ -1152,7 +1134,7 @@ func (*VulnerabilityReport_Vulnerability_Details_Reference) ProtoMessage() {} func (x *VulnerabilityReport_Vulnerability_Details_Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1488,116 +1470,6 @@ func file_google_cloud_osconfig_v1alpha_vulnerability_proto_init() { if File_google_cloud_osconfig_v1alpha_vulnerability_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVulnerabilityReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListVulnerabilityReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListVulnerabilityReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CVSSv3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Details); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1alpha_vulnerability_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*VulnerabilityReport_Vulnerability_Details_Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/osconfig/apiv1beta/helpers.go b/osconfig/apiv1beta/helpers.go index cf4b6b82d6fa..18c5d7283e99 100755 --- a/osconfig/apiv1beta/helpers.go +++ b/osconfig/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package osconfig import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "osconfig.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/osconfig/apiv1beta/os_config_client.go b/osconfig/apiv1beta/os_config_client.go index 0f3866c30745..d44cdea24de0 100755 --- a/osconfig/apiv1beta/os_config_client.go +++ b/osconfig/apiv1beta/os_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( osconfigpb "cloud.google.com/go/osconfig/apiv1beta/osconfigpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -676,6 +675,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new os config service client based on gRPC. @@ -705,6 +706,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: osconfigpb.NewOsConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -751,6 +753,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new os config service rest client. @@ -771,6 +775,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -823,7 +828,7 @@ func (c *gRPCClient) ExecutePatchJob(ctx context.Context, req *osconfigpb.Execut var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExecutePatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExecutePatchJob, req, settings.GRPC, c.logger, "ExecutePatchJob") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *gRPCClient) GetPatchJob(ctx context.Context, req *osconfigpb.GetPatchJo var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPatchJob, req, settings.GRPC, c.logger, "GetPatchJob") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *gRPCClient) CancelPatchJob(ctx context.Context, req *osconfigpb.CancelP var resp *osconfigpb.PatchJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelPatchJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelPatchJob, req, settings.GRPC, c.logger, "CancelPatchJob") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *gRPCClient) ListPatchJobs(ctx context.Context, req *osconfigpb.ListPatc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchJobs, req, settings.GRPC, c.logger, "ListPatchJobs") return err }, opts...) if err != nil { @@ -934,7 +939,7 @@ func (c *gRPCClient) ListPatchJobInstanceDetails(ctx context.Context, req *oscon } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchJobInstanceDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchJobInstanceDetails, req, settings.GRPC, c.logger, "ListPatchJobInstanceDetails") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *gRPCClient) CreatePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePatchDeployment, req, settings.GRPC, c.logger, "CreatePatchDeployment") return err }, opts...) if err != nil { @@ -987,7 +992,7 @@ func (c *gRPCClient) GetPatchDeployment(ctx context.Context, req *osconfigpb.Get var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPatchDeployment, req, settings.GRPC, c.logger, "GetPatchDeployment") return err }, opts...) if err != nil { @@ -1016,7 +1021,7 @@ func (c *gRPCClient) ListPatchDeployments(ctx context.Context, req *osconfigpb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPatchDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPatchDeployments, req, settings.GRPC, c.logger, "ListPatchDeployments") return err }, opts...) if err != nil { @@ -1050,7 +1055,7 @@ func (c *gRPCClient) DeletePatchDeployment(ctx context.Context, req *osconfigpb. opts = append((*c.CallOptions).DeletePatchDeployment[0:len((*c.CallOptions).DeletePatchDeployment):len((*c.CallOptions).DeletePatchDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePatchDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePatchDeployment, req, settings.GRPC, c.logger, "DeletePatchDeployment") return err }, opts...) return err @@ -1065,7 +1070,7 @@ func (c *gRPCClient) UpdatePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePatchDeployment, req, settings.GRPC, c.logger, "UpdatePatchDeployment") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *gRPCClient) PausePatchDeployment(ctx context.Context, req *osconfigpb.P var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PausePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PausePatchDeployment, req, settings.GRPC, c.logger, "PausePatchDeployment") return err }, opts...) if err != nil { @@ -1101,7 +1106,7 @@ func (c *gRPCClient) ResumePatchDeployment(ctx context.Context, req *osconfigpb. var resp *osconfigpb.PatchDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumePatchDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumePatchDeployment, req, settings.GRPC, c.logger, "ResumePatchDeployment") return err }, opts...) if err != nil { @@ -1119,7 +1124,7 @@ func (c *gRPCClient) CreateGuestPolicy(ctx context.Context, req *osconfigpb.Crea var resp *osconfigpb.GuestPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGuestPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGuestPolicy, req, settings.GRPC, c.logger, "CreateGuestPolicy") return err }, opts...) if err != nil { @@ -1137,7 +1142,7 @@ func (c *gRPCClient) GetGuestPolicy(ctx context.Context, req *osconfigpb.GetGues var resp *osconfigpb.GuestPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGuestPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGuestPolicy, req, settings.GRPC, c.logger, "GetGuestPolicy") return err }, opts...) if err != nil { @@ -1166,7 +1171,7 @@ func (c *gRPCClient) ListGuestPolicies(ctx context.Context, req *osconfigpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGuestPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGuestPolicies, req, settings.GRPC, c.logger, "ListGuestPolicies") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *gRPCClient) UpdateGuestPolicy(ctx context.Context, req *osconfigpb.Upda var resp *osconfigpb.GuestPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGuestPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGuestPolicy, req, settings.GRPC, c.logger, "UpdateGuestPolicy") return err }, opts...) if err != nil { @@ -1218,7 +1223,7 @@ func (c *gRPCClient) DeleteGuestPolicy(ctx context.Context, req *osconfigpb.Dele opts = append((*c.CallOptions).DeleteGuestPolicy[0:len((*c.CallOptions).DeleteGuestPolicy):len((*c.CallOptions).DeleteGuestPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteGuestPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteGuestPolicy, req, settings.GRPC, c.logger, "DeleteGuestPolicy") return err }, opts...) return err @@ -1233,7 +1238,7 @@ func (c *gRPCClient) LookupEffectiveGuestPolicy(ctx context.Context, req *osconf var resp *osconfigpb.EffectiveGuestPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LookupEffectiveGuestPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LookupEffectiveGuestPolicy, req, settings.GRPC, c.logger, "LookupEffectiveGuestPolicy") return err }, opts...) if err != nil { @@ -1281,17 +1286,7 @@ func (c *restClient) ExecutePatchJob(ctx context.Context, req *osconfigpb.Execut httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecutePatchJob") if err != nil { return err } @@ -1342,17 +1337,7 @@ func (c *restClient) GetPatchJob(ctx context.Context, req *osconfigpb.GetPatchJo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPatchJob") if err != nil { return err } @@ -1409,17 +1394,7 @@ func (c *restClient) CancelPatchJob(ctx context.Context, req *osconfigpb.CancelP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelPatchJob") if err != nil { return err } @@ -1484,21 +1459,10 @@ func (c *restClient) ListPatchJobs(ctx context.Context, req *osconfigpb.ListPatc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,21 +1540,10 @@ func (c *restClient) ListPatchJobInstanceDetails(ctx context.Context, req *oscon } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchJobInstanceDetails") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1661,17 +1614,7 @@ func (c *restClient) CreatePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePatchDeployment") if err != nil { return err } @@ -1721,17 +1664,7 @@ func (c *restClient) GetPatchDeployment(ctx context.Context, req *osconfigpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPatchDeployment") if err != nil { return err } @@ -1793,21 +1726,10 @@ func (c *restClient) ListPatchDeployments(ctx context.Context, req *osconfigpb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPatchDeployments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1867,15 +1789,8 @@ func (c *restClient) DeletePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePatchDeployment") + return err }, opts...) } @@ -1926,17 +1841,7 @@ func (c *restClient) UpdatePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePatchDeployment") if err != nil { return err } @@ -1993,17 +1898,7 @@ func (c *restClient) PausePatchDeployment(ctx context.Context, req *osconfigpb.P httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PausePatchDeployment") if err != nil { return err } @@ -2060,17 +1955,7 @@ func (c *restClient) ResumePatchDeployment(ctx context.Context, req *osconfigpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumePatchDeployment") if err != nil { return err } @@ -2128,17 +2013,7 @@ func (c *restClient) CreateGuestPolicy(ctx context.Context, req *osconfigpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGuestPolicy") if err != nil { return err } @@ -2188,17 +2063,7 @@ func (c *restClient) GetGuestPolicy(ctx context.Context, req *osconfigpb.GetGues httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGuestPolicy") if err != nil { return err } @@ -2260,21 +2125,10 @@ func (c *restClient) ListGuestPolicies(ctx context.Context, req *osconfigpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGuestPolicies") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2351,17 +2205,7 @@ func (c *restClient) UpdateGuestPolicy(ctx context.Context, req *osconfigpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGuestPolicy") if err != nil { return err } @@ -2408,15 +2252,8 @@ func (c *restClient) DeleteGuestPolicy(ctx context.Context, req *osconfigpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGuestPolicy") + return err }, opts...) } @@ -2460,17 +2297,7 @@ func (c *restClient) LookupEffectiveGuestPolicy(ctx context.Context, req *osconf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LookupEffectiveGuestPolicy") if err != nil { return err } diff --git a/osconfig/apiv1beta/os_config_client_example_go123_test.go b/osconfig/apiv1beta/os_config_client_example_go123_test.go index c6fe1aef70fc..eac7f165876f 100644 --- a/osconfig/apiv1beta/os_config_client_example_go123_test.go +++ b/osconfig/apiv1beta/os_config_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListGuestPolicies_all() { } for resp, err := range c.ListGuestPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListPatchDeployments_all() { } for resp, err := range c.ListPatchDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListPatchJobInstanceDetails_all() { } for resp, err := range c.ListPatchJobInstanceDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListPatchJobs_all() { } for resp, err := range c.ListPatchJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/osconfig/apiv1beta/osconfigpb/guest_policies.pb.go b/osconfig/apiv1beta/osconfigpb/guest_policies.pb.go index a66b77aac12c..e3be076f3cc0 100755 --- a/osconfig/apiv1beta/osconfigpb/guest_policies.pb.go +++ b/osconfig/apiv1beta/osconfigpb/guest_policies.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1beta/guest_policies.proto @@ -385,11 +385,9 @@ type GuestPolicy struct { func (x *GuestPolicy) Reset() { *x = GuestPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestPolicy) String() string { @@ -400,7 +398,7 @@ func (*GuestPolicy) ProtoMessage() {} func (x *GuestPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +524,9 @@ type Assignment struct { func (x *Assignment) Reset() { *x = Assignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assignment) String() string { @@ -541,7 +537,7 @@ func (*Assignment) ProtoMessage() {} func (x *Assignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +635,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -654,7 +648,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +708,9 @@ type AptRepository struct { func (x *AptRepository) Reset() { *x = AptRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptRepository) String() string { @@ -729,7 +721,7 @@ func (*AptRepository) ProtoMessage() {} func (x *AptRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +793,9 @@ type YumRepository struct { func (x *YumRepository) Reset() { *x = YumRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumRepository) String() string { @@ -816,7 +806,7 @@ func (*YumRepository) ProtoMessage() {} func (x *YumRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -881,11 +871,9 @@ type ZypperRepository struct { func (x *ZypperRepository) Reset() { *x = ZypperRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperRepository) String() string { @@ -896,7 +884,7 @@ func (*ZypperRepository) ProtoMessage() {} func (x *ZypperRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +942,9 @@ type GooRepository struct { func (x *GooRepository) Reset() { *x = GooRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooRepository) String() string { @@ -969,7 +955,7 @@ func (*GooRepository) ProtoMessage() {} func (x *GooRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,11 +1003,9 @@ type PackageRepository struct { func (x *PackageRepository) Reset() { *x = PackageRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PackageRepository) String() string { @@ -1032,7 +1016,7 @@ func (*PackageRepository) ProtoMessage() {} func (x *PackageRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1167,9 @@ type SoftwareRecipe struct { func (x *SoftwareRecipe) Reset() { *x = SoftwareRecipe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe) String() string { @@ -1198,7 +1180,7 @@ func (*SoftwareRecipe) ProtoMessage() {} func (x *SoftwareRecipe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1279,11 +1261,9 @@ type CreateGuestPolicyRequest struct { func (x *CreateGuestPolicyRequest) Reset() { *x = CreateGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGuestPolicyRequest) String() string { @@ -1294,7 +1274,7 @@ func (*CreateGuestPolicyRequest) ProtoMessage() {} func (x *CreateGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1343,11 +1323,9 @@ type GetGuestPolicyRequest struct { func (x *GetGuestPolicyRequest) Reset() { *x = GetGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGuestPolicyRequest) String() string { @@ -1358,7 +1336,7 @@ func (*GetGuestPolicyRequest) ProtoMessage() {} func (x *GetGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,11 +1376,9 @@ type ListGuestPoliciesRequest struct { func (x *ListGuestPoliciesRequest) Reset() { *x = ListGuestPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGuestPoliciesRequest) String() string { @@ -1413,7 +1389,7 @@ func (*ListGuestPoliciesRequest) ProtoMessage() {} func (x *ListGuestPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1440,9 @@ type ListGuestPoliciesResponse struct { func (x *ListGuestPoliciesResponse) Reset() { *x = ListGuestPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGuestPoliciesResponse) String() string { @@ -1479,7 +1453,7 @@ func (*ListGuestPoliciesResponse) ProtoMessage() {} func (x *ListGuestPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1523,11 +1497,9 @@ type UpdateGuestPolicyRequest struct { func (x *UpdateGuestPolicyRequest) Reset() { *x = UpdateGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGuestPolicyRequest) String() string { @@ -1538,7 +1510,7 @@ func (*UpdateGuestPolicyRequest) ProtoMessage() {} func (x *UpdateGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1580,11 +1552,9 @@ type DeleteGuestPolicyRequest struct { func (x *DeleteGuestPolicyRequest) Reset() { *x = DeleteGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGuestPolicyRequest) String() string { @@ -1595,7 +1565,7 @@ func (*DeleteGuestPolicyRequest) ProtoMessage() {} func (x *DeleteGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1642,11 +1612,9 @@ type LookupEffectiveGuestPolicyRequest struct { func (x *LookupEffectiveGuestPolicyRequest) Reset() { *x = LookupEffectiveGuestPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LookupEffectiveGuestPolicyRequest) String() string { @@ -1657,7 +1625,7 @@ func (*LookupEffectiveGuestPolicyRequest) ProtoMessage() {} func (x *LookupEffectiveGuestPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,11 +1684,9 @@ type EffectiveGuestPolicy struct { func (x *EffectiveGuestPolicy) Reset() { *x = EffectiveGuestPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy) String() string { @@ -1731,7 +1697,7 @@ func (*EffectiveGuestPolicy) ProtoMessage() {} func (x *EffectiveGuestPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1781,11 +1747,9 @@ type Assignment_GroupLabel struct { func (x *Assignment_GroupLabel) Reset() { *x = Assignment_GroupLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assignment_GroupLabel) String() string { @@ -1796,7 +1760,7 @@ func (*Assignment_GroupLabel) ProtoMessage() {} func (x *Assignment_GroupLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1837,11 +1801,9 @@ type Assignment_OsType struct { func (x *Assignment_OsType) Reset() { *x = Assignment_OsType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assignment_OsType) String() string { @@ -1852,7 +1814,7 @@ func (*Assignment_OsType) ProtoMessage() {} func (x *Assignment_OsType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1915,11 +1877,9 @@ type SoftwareRecipe_Artifact struct { func (x *SoftwareRecipe_Artifact) Reset() { *x = SoftwareRecipe_Artifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact) String() string { @@ -1930,7 +1890,7 @@ func (*SoftwareRecipe_Artifact) ProtoMessage() {} func (x *SoftwareRecipe_Artifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2020,11 +1980,9 @@ type SoftwareRecipe_Step struct { func (x *SoftwareRecipe_Step) Reset() { *x = SoftwareRecipe_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step) String() string { @@ -2035,7 +1993,7 @@ func (*SoftwareRecipe_Step) ProtoMessage() {} func (x *SoftwareRecipe_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2178,11 +2136,9 @@ type SoftwareRecipe_Artifact_Remote struct { func (x *SoftwareRecipe_Artifact_Remote) Reset() { *x = SoftwareRecipe_Artifact_Remote{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact_Remote) String() string { @@ -2193,7 +2149,7 @@ func (*SoftwareRecipe_Artifact_Remote) ProtoMessage() {} func (x *SoftwareRecipe_Artifact_Remote) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2249,11 +2205,9 @@ type SoftwareRecipe_Artifact_Gcs struct { func (x *SoftwareRecipe_Artifact_Gcs) Reset() { *x = SoftwareRecipe_Artifact_Gcs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Artifact_Gcs) String() string { @@ -2264,7 +2218,7 @@ func (*SoftwareRecipe_Artifact_Gcs) ProtoMessage() {} func (x *SoftwareRecipe_Artifact_Gcs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2332,11 +2286,9 @@ type SoftwareRecipe_Step_CopyFile struct { func (x *SoftwareRecipe_Step_CopyFile) Reset() { *x = SoftwareRecipe_Step_CopyFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_CopyFile) String() string { @@ -2347,7 +2299,7 @@ func (*SoftwareRecipe_Step_CopyFile) ProtoMessage() {} func (x *SoftwareRecipe_Step_CopyFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2407,11 +2359,9 @@ type SoftwareRecipe_Step_ExtractArchive struct { func (x *SoftwareRecipe_Step_ExtractArchive) Reset() { *x = SoftwareRecipe_Step_ExtractArchive{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_ExtractArchive) String() string { @@ -2422,7 +2372,7 @@ func (*SoftwareRecipe_Step_ExtractArchive) ProtoMessage() {} func (x *SoftwareRecipe_Step_ExtractArchive) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2476,11 +2426,9 @@ type SoftwareRecipe_Step_InstallMsi struct { func (x *SoftwareRecipe_Step_InstallMsi) Reset() { *x = SoftwareRecipe_Step_InstallMsi{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallMsi) String() string { @@ -2491,7 +2439,7 @@ func (*SoftwareRecipe_Step_InstallMsi) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallMsi) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2539,11 +2487,9 @@ type SoftwareRecipe_Step_InstallDpkg struct { func (x *SoftwareRecipe_Step_InstallDpkg) Reset() { *x = SoftwareRecipe_Step_InstallDpkg{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallDpkg) String() string { @@ -2554,7 +2500,7 @@ func (*SoftwareRecipe_Step_InstallDpkg) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallDpkg) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2588,11 +2534,9 @@ type SoftwareRecipe_Step_InstallRpm struct { func (x *SoftwareRecipe_Step_InstallRpm) Reset() { *x = SoftwareRecipe_Step_InstallRpm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_InstallRpm) String() string { @@ -2603,7 +2547,7 @@ func (*SoftwareRecipe_Step_InstallRpm) ProtoMessage() {} func (x *SoftwareRecipe_Step_InstallRpm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2647,11 +2591,9 @@ type SoftwareRecipe_Step_ExecFile struct { func (x *SoftwareRecipe_Step_ExecFile) Reset() { *x = SoftwareRecipe_Step_ExecFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_ExecFile) String() string { @@ -2662,7 +2604,7 @@ func (*SoftwareRecipe_Step_ExecFile) ProtoMessage() {} func (x *SoftwareRecipe_Step_ExecFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2750,11 +2692,9 @@ type SoftwareRecipe_Step_RunScript struct { func (x *SoftwareRecipe_Step_RunScript) Reset() { *x = SoftwareRecipe_Step_RunScript{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SoftwareRecipe_Step_RunScript) String() string { @@ -2765,7 +2705,7 @@ func (*SoftwareRecipe_Step_RunScript) ProtoMessage() {} func (x *SoftwareRecipe_Step_RunScript) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2815,11 +2755,9 @@ type EffectiveGuestPolicy_SourcedPackage struct { func (x *EffectiveGuestPolicy_SourcedPackage) Reset() { *x = EffectiveGuestPolicy_SourcedPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedPackage) String() string { @@ -2830,7 +2768,7 @@ func (*EffectiveGuestPolicy_SourcedPackage) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedPackage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2873,11 +2811,9 @@ type EffectiveGuestPolicy_SourcedPackageRepository struct { func (x *EffectiveGuestPolicy_SourcedPackageRepository) Reset() { *x = EffectiveGuestPolicy_SourcedPackageRepository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedPackageRepository) String() string { @@ -2888,7 +2824,7 @@ func (*EffectiveGuestPolicy_SourcedPackageRepository) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedPackageRepository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2931,11 +2867,9 @@ type EffectiveGuestPolicy_SourcedSoftwareRecipe struct { func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) Reset() { *x = EffectiveGuestPolicy_SourcedSoftwareRecipe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) String() string { @@ -2946,7 +2880,7 @@ func (*EffectiveGuestPolicy_SourcedSoftwareRecipe) ProtoMessage() {} func (x *EffectiveGuestPolicy_SourcedSoftwareRecipe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3549,404 +3483,6 @@ func file_google_cloud_osconfig_v1beta_guest_policies_proto_init() { if File_google_cloud_osconfig_v1beta_guest_policies_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GuestPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Assignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AptRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*YumRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ZypperRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GooRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PackageRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListGuestPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListGuestPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LookupEffectiveGuestPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Assignment_GroupLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Assignment_OsType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact_Remote); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Artifact_Gcs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_CopyFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_ExtractArchive); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallMsi); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallDpkg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_InstallRpm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_ExecFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SoftwareRecipe_Step_RunScript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedPackageRepository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveGuestPolicy_SourcedSoftwareRecipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1beta_guest_policies_proto_msgTypes[7].OneofWrappers = []any{ (*PackageRepository_Apt)(nil), (*PackageRepository_Yum)(nil), diff --git a/osconfig/apiv1beta/osconfigpb/osconfig_common.pb.go b/osconfig/apiv1beta/osconfigpb/osconfig_common.pb.go index 2fe8309df01d..79fa9d5d7708 100755 --- a/osconfig/apiv1beta/osconfigpb/osconfig_common.pb.go +++ b/osconfig/apiv1beta/osconfigpb/osconfig_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1beta/osconfig_common.proto @@ -53,11 +53,9 @@ type FixedOrPercent struct { func (x *FixedOrPercent) Reset() { *x = FixedOrPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_osconfig_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_osconfig_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FixedOrPercent) String() string { @@ -68,7 +66,7 @@ func (*FixedOrPercent) ProtoMessage() {} func (x *FixedOrPercent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_osconfig_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,20 +173,6 @@ func file_google_cloud_osconfig_v1beta_osconfig_common_proto_init() { if File_google_cloud_osconfig_v1beta_osconfig_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1beta_osconfig_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FixedOrPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1beta_osconfig_common_proto_msgTypes[0].OneofWrappers = []any{ (*FixedOrPercent_Fixed)(nil), (*FixedOrPercent_Percent)(nil), diff --git a/osconfig/apiv1beta/osconfigpb/osconfig_service.pb.go b/osconfig/apiv1beta/osconfigpb/osconfig_service.pb.go index 66b251a5f516..5a2cbda3d4af 100755 --- a/osconfig/apiv1beta/osconfigpb/osconfig_service.pb.go +++ b/osconfig/apiv1beta/osconfigpb/osconfig_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1beta/osconfig_service.proto diff --git a/osconfig/apiv1beta/osconfigpb/patch_deployments.pb.go b/osconfig/apiv1beta/osconfigpb/patch_deployments.pb.go index 9186df9953b6..a0bc6c7cdc92 100755 --- a/osconfig/apiv1beta/osconfigpb/patch_deployments.pb.go +++ b/osconfig/apiv1beta/osconfigpb/patch_deployments.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1beta/patch_deployments.proto @@ -205,11 +205,9 @@ type PatchDeployment struct { func (x *PatchDeployment) Reset() { *x = PatchDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchDeployment) String() string { @@ -220,7 +218,7 @@ func (*PatchDeployment) ProtoMessage() {} func (x *PatchDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +355,9 @@ type OneTimeSchedule struct { func (x *OneTimeSchedule) Reset() { *x = OneTimeSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneTimeSchedule) String() string { @@ -372,7 +368,7 @@ func (*OneTimeSchedule) ProtoMessage() {} func (x *OneTimeSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +425,9 @@ type RecurringSchedule struct { func (x *RecurringSchedule) Reset() { *x = RecurringSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecurringSchedule) String() string { @@ -444,7 +438,7 @@ func (*RecurringSchedule) ProtoMessage() {} func (x *RecurringSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +553,9 @@ type WeeklySchedule struct { func (x *WeeklySchedule) Reset() { *x = WeeklySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklySchedule) String() string { @@ -574,7 +566,7 @@ func (*WeeklySchedule) ProtoMessage() {} func (x *WeeklySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +606,9 @@ type MonthlySchedule struct { func (x *MonthlySchedule) Reset() { *x = MonthlySchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MonthlySchedule) String() string { @@ -629,7 +619,7 @@ func (*MonthlySchedule) ProtoMessage() {} func (x *MonthlySchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +699,9 @@ type WeekDayOfMonth struct { func (x *WeekDayOfMonth) Reset() { *x = WeekDayOfMonth{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeekDayOfMonth) String() string { @@ -724,7 +712,7 @@ func (*WeekDayOfMonth) ProtoMessage() {} func (x *WeekDayOfMonth) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +770,9 @@ type CreatePatchDeploymentRequest struct { func (x *CreatePatchDeploymentRequest) Reset() { *x = CreatePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePatchDeploymentRequest) String() string { @@ -797,7 +783,7 @@ func (*CreatePatchDeploymentRequest) ProtoMessage() {} func (x *CreatePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +832,9 @@ type GetPatchDeploymentRequest struct { func (x *GetPatchDeploymentRequest) Reset() { *x = GetPatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPatchDeploymentRequest) String() string { @@ -861,7 +845,7 @@ func (*GetPatchDeploymentRequest) ProtoMessage() {} func (x *GetPatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +884,9 @@ type ListPatchDeploymentsRequest struct { func (x *ListPatchDeploymentsRequest) Reset() { *x = ListPatchDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchDeploymentsRequest) String() string { @@ -915,7 +897,7 @@ func (*ListPatchDeploymentsRequest) ProtoMessage() {} func (x *ListPatchDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +948,9 @@ type ListPatchDeploymentsResponse struct { func (x *ListPatchDeploymentsResponse) Reset() { *x = ListPatchDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchDeploymentsResponse) String() string { @@ -981,7 +961,7 @@ func (*ListPatchDeploymentsResponse) ProtoMessage() {} func (x *ListPatchDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +1003,9 @@ type DeletePatchDeploymentRequest struct { func (x *DeletePatchDeploymentRequest) Reset() { *x = DeletePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePatchDeploymentRequest) String() string { @@ -1038,7 +1016,7 @@ func (*DeletePatchDeploymentRequest) ProtoMessage() {} func (x *DeletePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1075,11 +1053,9 @@ type UpdatePatchDeploymentRequest struct { func (x *UpdatePatchDeploymentRequest) Reset() { *x = UpdatePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePatchDeploymentRequest) String() string { @@ -1090,7 +1066,7 @@ func (*UpdatePatchDeploymentRequest) ProtoMessage() {} func (x *UpdatePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,11 +1108,9 @@ type PausePatchDeploymentRequest struct { func (x *PausePatchDeploymentRequest) Reset() { *x = PausePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PausePatchDeploymentRequest) String() string { @@ -1147,7 +1121,7 @@ func (*PausePatchDeploymentRequest) ProtoMessage() {} func (x *PausePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1182,11 +1156,9 @@ type ResumePatchDeploymentRequest struct { func (x *ResumePatchDeploymentRequest) Reset() { *x = ResumePatchDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumePatchDeploymentRequest) String() string { @@ -1197,7 +1169,7 @@ func (*ResumePatchDeploymentRequest) ProtoMessage() {} func (x *ResumePatchDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1545,176 +1517,6 @@ func file_google_cloud_osconfig_v1beta_patch_deployments_proto_init() { return } file_google_cloud_osconfig_v1beta_patch_jobs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PatchDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OneTimeSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RecurringSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WeeklySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MonthlySchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WeekDayOfMonth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreatePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetPatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeletePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PausePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ResumePatchDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1beta_patch_deployments_proto_msgTypes[0].OneofWrappers = []any{ (*PatchDeployment_OneTimeSchedule)(nil), (*PatchDeployment_RecurringSchedule)(nil), diff --git a/osconfig/apiv1beta/osconfigpb/patch_jobs.pb.go b/osconfig/apiv1beta/osconfigpb/patch_jobs.pb.go index 4718df2fa7bc..513bca48ff26 100755 --- a/osconfig/apiv1beta/osconfigpb/patch_jobs.pb.go +++ b/osconfig/apiv1beta/osconfigpb/patch_jobs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/osconfig/v1beta/patch_jobs.proto @@ -578,11 +578,9 @@ type ExecutePatchJobRequest struct { func (x *ExecutePatchJobRequest) Reset() { *x = ExecutePatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutePatchJobRequest) String() string { @@ -593,7 +591,7 @@ func (*ExecutePatchJobRequest) ProtoMessage() {} func (x *ExecutePatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +674,9 @@ type GetPatchJobRequest struct { func (x *GetPatchJobRequest) Reset() { *x = GetPatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPatchJobRequest) String() string { @@ -691,7 +687,7 @@ func (*GetPatchJobRequest) ProtoMessage() {} func (x *GetPatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +730,9 @@ type ListPatchJobInstanceDetailsRequest struct { func (x *ListPatchJobInstanceDetailsRequest) Reset() { *x = ListPatchJobInstanceDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobInstanceDetailsRequest) String() string { @@ -749,7 +743,7 @@ func (*ListPatchJobInstanceDetailsRequest) ProtoMessage() {} func (x *ListPatchJobInstanceDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,11 +800,9 @@ type ListPatchJobInstanceDetailsResponse struct { func (x *ListPatchJobInstanceDetailsResponse) Reset() { *x = ListPatchJobInstanceDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobInstanceDetailsResponse) String() string { @@ -821,7 +813,7 @@ func (*ListPatchJobInstanceDetailsResponse) ProtoMessage() {} func (x *ListPatchJobInstanceDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +866,9 @@ type PatchJobInstanceDetails struct { func (x *PatchJobInstanceDetails) Reset() { *x = PatchJobInstanceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJobInstanceDetails) String() string { @@ -889,7 +879,7 @@ func (*PatchJobInstanceDetails) ProtoMessage() {} func (x *PatchJobInstanceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +950,9 @@ type ListPatchJobsRequest struct { func (x *ListPatchJobsRequest) Reset() { *x = ListPatchJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobsRequest) String() string { @@ -975,7 +963,7 @@ func (*ListPatchJobsRequest) ProtoMessage() {} func (x *ListPatchJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1032,11 +1020,9 @@ type ListPatchJobsResponse struct { func (x *ListPatchJobsResponse) Reset() { *x = ListPatchJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPatchJobsResponse) String() string { @@ -1047,7 +1033,7 @@ func (*ListPatchJobsResponse) ProtoMessage() {} func (x *ListPatchJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1130,11 +1116,9 @@ type PatchJob struct { func (x *PatchJob) Reset() { *x = PatchJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJob) String() string { @@ -1145,7 +1129,7 @@ func (*PatchJob) ProtoMessage() {} func (x *PatchJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1298,11 +1282,9 @@ type PatchConfig struct { func (x *PatchConfig) Reset() { *x = PatchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchConfig) String() string { @@ -1313,7 +1295,7 @@ func (*PatchConfig) ProtoMessage() {} func (x *PatchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1382,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -1415,7 +1395,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1422,9 @@ type CancelPatchJobRequest struct { func (x *CancelPatchJobRequest) Reset() { *x = CancelPatchJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelPatchJobRequest) String() string { @@ -1457,7 +1435,7 @@ func (*CancelPatchJobRequest) ProtoMessage() {} func (x *CancelPatchJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1500,11 +1478,9 @@ type AptSettings struct { func (x *AptSettings) Reset() { *x = AptSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AptSettings) String() string { @@ -1515,7 +1491,7 @@ func (*AptSettings) ProtoMessage() {} func (x *AptSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1577,11 +1553,9 @@ type YumSettings struct { func (x *YumSettings) Reset() { *x = YumSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *YumSettings) String() string { @@ -1592,7 +1566,7 @@ func (*YumSettings) ProtoMessage() {} func (x *YumSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1644,11 +1618,9 @@ type GooSettings struct { func (x *GooSettings) Reset() { *x = GooSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GooSettings) String() string { @@ -1659,7 +1631,7 @@ func (*GooSettings) ProtoMessage() {} func (x *GooSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1701,11 +1673,9 @@ type ZypperSettings struct { func (x *ZypperSettings) Reset() { *x = ZypperSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZypperSettings) String() string { @@ -1716,7 +1686,7 @@ func (*ZypperSettings) ProtoMessage() {} func (x *ZypperSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1792,11 +1762,9 @@ type WindowsUpdateSettings struct { func (x *WindowsUpdateSettings) Reset() { *x = WindowsUpdateSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WindowsUpdateSettings) String() string { @@ -1807,7 +1775,7 @@ func (*WindowsUpdateSettings) ProtoMessage() {} func (x *WindowsUpdateSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1857,11 +1825,9 @@ type ExecStep struct { func (x *ExecStep) Reset() { *x = ExecStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStep) String() string { @@ -1872,7 +1838,7 @@ func (*ExecStep) ProtoMessage() {} func (x *ExecStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,11 +1892,9 @@ type ExecStepConfig struct { func (x *ExecStepConfig) Reset() { *x = ExecStepConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecStepConfig) String() string { @@ -1941,7 +1905,7 @@ func (*ExecStepConfig) ProtoMessage() {} func (x *ExecStepConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2026,11 +1990,9 @@ type GcsObject struct { func (x *GcsObject) Reset() { *x = GcsObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsObject) String() string { @@ -2041,7 +2003,7 @@ func (*GcsObject) ProtoMessage() {} func (x *GcsObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2108,11 +2070,9 @@ type PatchInstanceFilter struct { func (x *PatchInstanceFilter) Reset() { *x = PatchInstanceFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceFilter) String() string { @@ -2123,7 +2083,7 @@ func (*PatchInstanceFilter) ProtoMessage() {} func (x *PatchInstanceFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2210,11 +2170,9 @@ type PatchRollout struct { func (x *PatchRollout) Reset() { *x = PatchRollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchRollout) String() string { @@ -2225,7 +2183,7 @@ func (*PatchRollout) ProtoMessage() {} func (x *PatchRollout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2299,11 +2257,9 @@ type PatchJob_InstanceDetailsSummary struct { func (x *PatchJob_InstanceDetailsSummary) Reset() { *x = PatchJob_InstanceDetailsSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchJob_InstanceDetailsSummary) String() string { @@ -2314,7 +2270,7 @@ func (*PatchJob_InstanceDetailsSummary) ProtoMessage() {} func (x *PatchJob_InstanceDetailsSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2448,11 +2404,9 @@ type PatchInstanceFilter_GroupLabel struct { func (x *PatchInstanceFilter_GroupLabel) Reset() { *x = PatchInstanceFilter_GroupLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchInstanceFilter_GroupLabel) String() string { @@ -2463,7 +2417,7 @@ func (*PatchInstanceFilter_GroupLabel) ProtoMessage() {} func (x *PatchInstanceFilter_GroupLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3041,284 +2995,6 @@ func file_google_cloud_osconfig_v1beta_patch_jobs_proto_init() { return } file_google_cloud_osconfig_v1beta_osconfig_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExecutePatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobInstanceDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobInstanceDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PatchJobInstanceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPatchJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PatchJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PatchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CancelPatchJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AptSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*YumSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GooSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ZypperSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*WindowsUpdateSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExecStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExecStepConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GcsObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*PatchRollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PatchJob_InstanceDetailsSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PatchInstanceFilter_GroupLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_osconfig_v1beta_patch_jobs_proto_msgTypes[17].OneofWrappers = []any{ (*ExecStepConfig_LocalPath)(nil), (*ExecStepConfig_GcsObject)(nil), diff --git a/oslogin/apiv1/helpers.go b/oslogin/apiv1/helpers.go index d229b42e6298..1684ee8282bc 100755 --- a/oslogin/apiv1/helpers.go +++ b/oslogin/apiv1/helpers.go @@ -18,10 +18,20 @@ package oslogin import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "oslogin.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/compute.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/oslogin/apiv1/os_login_client.go b/oslogin/apiv1/os_login_client.go index 60ec56826c61..0234789cb1b9 100755 --- a/oslogin/apiv1/os_login_client.go +++ b/oslogin/apiv1/os_login_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( osloginpb "cloud.google.com/go/oslogin/apiv1/osloginpb" commonpb "cloud.google.com/go/oslogin/common/commonpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -335,6 +334,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new os login service client based on gRPC. @@ -364,6 +365,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: osloginpb.NewOsLoginServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -410,6 +412,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new os login service rest client. @@ -430,6 +434,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -482,7 +487,7 @@ func (c *gRPCClient) CreateSshPublicKey(ctx context.Context, req *osloginpb.Crea var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSshPublicKey, req, settings.GRPC, c.logger, "CreateSshPublicKey") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *gRPCClient) DeletePosixAccount(ctx context.Context, req *osloginpb.Dele opts = append((*c.CallOptions).DeletePosixAccount[0:len((*c.CallOptions).DeletePosixAccount):len((*c.CallOptions).DeletePosixAccount)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePosixAccount(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePosixAccount, req, settings.GRPC, c.logger, "DeletePosixAccount") return err }, opts...) return err @@ -513,7 +518,7 @@ func (c *gRPCClient) DeleteSshPublicKey(ctx context.Context, req *osloginpb.Dele opts = append((*c.CallOptions).DeleteSshPublicKey[0:len((*c.CallOptions).DeleteSshPublicKey):len((*c.CallOptions).DeleteSshPublicKey)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSshPublicKey(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSshPublicKey, req, settings.GRPC, c.logger, "DeleteSshPublicKey") return err }, opts...) return err @@ -528,7 +533,7 @@ func (c *gRPCClient) GetLoginProfile(ctx context.Context, req *osloginpb.GetLogi var resp *osloginpb.LoginProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLoginProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLoginProfile, req, settings.GRPC, c.logger, "GetLoginProfile") return err }, opts...) if err != nil { @@ -546,7 +551,7 @@ func (c *gRPCClient) GetSshPublicKey(ctx context.Context, req *osloginpb.GetSshP var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSshPublicKey, req, settings.GRPC, c.logger, "GetSshPublicKey") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) ImportSshPublicKey(ctx context.Context, req *osloginpb.Impo var resp *osloginpb.ImportSshPublicKeyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportSshPublicKey, req, settings.GRPC, c.logger, "ImportSshPublicKey") return err }, opts...) if err != nil { @@ -582,7 +587,7 @@ func (c *gRPCClient) UpdateSshPublicKey(ctx context.Context, req *osloginpb.Upda var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSshPublicKey, req, settings.GRPC, c.logger, "UpdateSshPublicKey") return err }, opts...) if err != nil { @@ -631,17 +636,7 @@ func (c *restClient) CreateSshPublicKey(ctx context.Context, req *osloginpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSshPublicKey") if err != nil { return err } @@ -688,15 +683,8 @@ func (c *restClient) DeletePosixAccount(ctx context.Context, req *osloginpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePosixAccount") + return err }, opts...) } @@ -730,15 +718,8 @@ func (c *restClient) DeleteSshPublicKey(ctx context.Context, req *osloginpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSshPublicKey") + return err }, opts...) } @@ -782,17 +763,7 @@ func (c *restClient) GetLoginProfile(ctx context.Context, req *osloginpb.GetLogi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLoginProfile") if err != nil { return err } @@ -842,17 +813,7 @@ func (c *restClient) GetSshPublicKey(ctx context.Context, req *osloginpb.GetSshP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSshPublicKey") if err != nil { return err } @@ -919,17 +880,7 @@ func (c *restClient) ImportSshPublicKey(ctx context.Context, req *osloginpb.Impo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSshPublicKey") if err != nil { return err } @@ -994,17 +945,7 @@ func (c *restClient) UpdateSshPublicKey(ctx context.Context, req *osloginpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSshPublicKey") if err != nil { return err } diff --git a/oslogin/apiv1/osloginpb/oslogin.pb.go b/oslogin/apiv1/osloginpb/oslogin.pb.go index dc91aa5ae20a..c311dc9afc45 100755 --- a/oslogin/apiv1/osloginpb/oslogin.pb.go +++ b/oslogin/apiv1/osloginpb/oslogin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oslogin/v1/oslogin.proto @@ -60,11 +60,9 @@ type LoginProfile struct { func (x *LoginProfile) Reset() { *x = LoginProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginProfile) String() string { @@ -75,7 +73,7 @@ func (*LoginProfile) ProtoMessage() {} func (x *LoginProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +123,9 @@ type CreateSshPublicKeyRequest struct { func (x *CreateSshPublicKeyRequest) Reset() { *x = CreateSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSshPublicKeyRequest) String() string { @@ -140,7 +136,7 @@ func (*CreateSshPublicKeyRequest) ProtoMessage() {} func (x *CreateSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +179,9 @@ type DeletePosixAccountRequest struct { func (x *DeletePosixAccountRequest) Reset() { *x = DeletePosixAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePosixAccountRequest) String() string { @@ -198,7 +192,7 @@ func (*DeletePosixAccountRequest) ProtoMessage() {} func (x *DeletePosixAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +228,9 @@ type DeleteSshPublicKeyRequest struct { func (x *DeleteSshPublicKeyRequest) Reset() { *x = DeleteSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSshPublicKeyRequest) String() string { @@ -249,7 +241,7 @@ func (*DeleteSshPublicKeyRequest) ProtoMessage() {} func (x *DeleteSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +279,9 @@ type GetLoginProfileRequest struct { func (x *GetLoginProfileRequest) Reset() { *x = GetLoginProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoginProfileRequest) String() string { @@ -302,7 +292,7 @@ func (*GetLoginProfileRequest) ProtoMessage() {} func (x *GetLoginProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +342,9 @@ type GetSshPublicKeyRequest struct { func (x *GetSshPublicKeyRequest) Reset() { *x = GetSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSshPublicKeyRequest) String() string { @@ -367,7 +355,7 @@ func (*GetSshPublicKeyRequest) ProtoMessage() {} func (x *GetSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,11 +397,9 @@ type ImportSshPublicKeyRequest struct { func (x *ImportSshPublicKeyRequest) Reset() { *x = ImportSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSshPublicKeyRequest) String() string { @@ -424,7 +410,7 @@ func (*ImportSshPublicKeyRequest) ProtoMessage() {} func (x *ImportSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +467,9 @@ type ImportSshPublicKeyResponse struct { func (x *ImportSshPublicKeyResponse) Reset() { *x = ImportSshPublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSshPublicKeyResponse) String() string { @@ -496,7 +480,7 @@ func (*ImportSshPublicKeyResponse) ProtoMessage() {} func (x *ImportSshPublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +527,9 @@ type UpdateSshPublicKeyRequest struct { func (x *UpdateSshPublicKeyRequest) Reset() { *x = UpdateSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSshPublicKeyRequest) String() string { @@ -558,7 +540,7 @@ func (*UpdateSshPublicKeyRequest) ProtoMessage() {} func (x *UpdateSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,116 +870,6 @@ func file_google_cloud_oslogin_v1_oslogin_proto_init() { if File_google_cloud_oslogin_v1_oslogin_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoginProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeletePosixAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetLoginProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportSshPublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1_oslogin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/oslogin/apiv1beta/helpers.go b/oslogin/apiv1beta/helpers.go index d229b42e6298..1684ee8282bc 100755 --- a/oslogin/apiv1beta/helpers.go +++ b/oslogin/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package oslogin import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "oslogin.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/compute.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/oslogin/apiv1beta/os_login_client.go b/oslogin/apiv1beta/os_login_client.go index 25e583f5699a..a508e42494bd 100755 --- a/oslogin/apiv1beta/os_login_client.go +++ b/oslogin/apiv1beta/os_login_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( osloginpb "cloud.google.com/go/oslogin/apiv1beta/osloginpb" commonpb "cloud.google.com/go/oslogin/common/commonpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -344,6 +343,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new os login service client based on gRPC. @@ -373,6 +374,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: osloginpb.NewOsLoginServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,6 +421,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new os login service rest client. @@ -439,6 +443,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -491,7 +496,7 @@ func (c *gRPCClient) CreateSshPublicKey(ctx context.Context, req *osloginpb.Crea var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSshPublicKey, req, settings.GRPC, c.logger, "CreateSshPublicKey") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *gRPCClient) DeletePosixAccount(ctx context.Context, req *osloginpb.Dele opts = append((*c.CallOptions).DeletePosixAccount[0:len((*c.CallOptions).DeletePosixAccount):len((*c.CallOptions).DeletePosixAccount)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeletePosixAccount(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeletePosixAccount, req, settings.GRPC, c.logger, "DeletePosixAccount") return err }, opts...) return err @@ -522,7 +527,7 @@ func (c *gRPCClient) DeleteSshPublicKey(ctx context.Context, req *osloginpb.Dele opts = append((*c.CallOptions).DeleteSshPublicKey[0:len((*c.CallOptions).DeleteSshPublicKey):len((*c.CallOptions).DeleteSshPublicKey)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSshPublicKey(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSshPublicKey, req, settings.GRPC, c.logger, "DeleteSshPublicKey") return err }, opts...) return err @@ -537,7 +542,7 @@ func (c *gRPCClient) GetLoginProfile(ctx context.Context, req *osloginpb.GetLogi var resp *osloginpb.LoginProfile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLoginProfile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLoginProfile, req, settings.GRPC, c.logger, "GetLoginProfile") return err }, opts...) if err != nil { @@ -555,7 +560,7 @@ func (c *gRPCClient) GetSshPublicKey(ctx context.Context, req *osloginpb.GetSshP var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSshPublicKey, req, settings.GRPC, c.logger, "GetSshPublicKey") return err }, opts...) if err != nil { @@ -573,7 +578,7 @@ func (c *gRPCClient) ImportSshPublicKey(ctx context.Context, req *osloginpb.Impo var resp *osloginpb.ImportSshPublicKeyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportSshPublicKey, req, settings.GRPC, c.logger, "ImportSshPublicKey") return err }, opts...) if err != nil { @@ -591,7 +596,7 @@ func (c *gRPCClient) UpdateSshPublicKey(ctx context.Context, req *osloginpb.Upda var resp *commonpb.SshPublicKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSshPublicKey, req, settings.GRPC, c.logger, "UpdateSshPublicKey") return err }, opts...) if err != nil { @@ -609,7 +614,7 @@ func (c *gRPCClient) SignSshPublicKey(ctx context.Context, req *osloginpb.SignSs var resp *osloginpb.SignSshPublicKeyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SignSshPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SignSshPublicKey, req, settings.GRPC, c.logger, "SignSshPublicKey") return err }, opts...) if err != nil { @@ -658,17 +663,7 @@ func (c *restClient) CreateSshPublicKey(ctx context.Context, req *osloginpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSshPublicKey") if err != nil { return err } @@ -715,15 +710,8 @@ func (c *restClient) DeletePosixAccount(ctx context.Context, req *osloginpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePosixAccount") + return err }, opts...) } @@ -757,15 +745,8 @@ func (c *restClient) DeleteSshPublicKey(ctx context.Context, req *osloginpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSshPublicKey") + return err }, opts...) } @@ -812,17 +793,7 @@ func (c *restClient) GetLoginProfile(ctx context.Context, req *osloginpb.GetLogi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLoginProfile") if err != nil { return err } @@ -872,17 +843,7 @@ func (c *restClient) GetSshPublicKey(ctx context.Context, req *osloginpb.GetSshP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSshPublicKey") if err != nil { return err } @@ -952,17 +913,7 @@ func (c *restClient) ImportSshPublicKey(ctx context.Context, req *osloginpb.Impo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportSshPublicKey") if err != nil { return err } @@ -1027,17 +978,7 @@ func (c *restClient) UpdateSshPublicKey(ctx context.Context, req *osloginpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSshPublicKey") if err != nil { return err } @@ -1093,17 +1034,7 @@ func (c *restClient) SignSshPublicKey(ctx context.Context, req *osloginpb.SignSs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SignSshPublicKey") if err != nil { return err } diff --git a/oslogin/apiv1beta/osloginpb/oslogin.pb.go b/oslogin/apiv1beta/osloginpb/oslogin.pb.go index 8d407c2b059d..3c4669f49f03 100755 --- a/oslogin/apiv1beta/osloginpb/oslogin.pb.go +++ b/oslogin/apiv1beta/osloginpb/oslogin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oslogin/v1beta/oslogin.proto @@ -115,11 +115,9 @@ type LoginProfile struct { func (x *LoginProfile) Reset() { *x = LoginProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginProfile) String() string { @@ -130,7 +128,7 @@ func (*LoginProfile) ProtoMessage() {} func (x *LoginProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +185,9 @@ type CreateSshPublicKeyRequest struct { func (x *CreateSshPublicKeyRequest) Reset() { *x = CreateSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSshPublicKeyRequest) String() string { @@ -202,7 +198,7 @@ func (*CreateSshPublicKeyRequest) ProtoMessage() {} func (x *CreateSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +241,9 @@ type DeletePosixAccountRequest struct { func (x *DeletePosixAccountRequest) Reset() { *x = DeletePosixAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePosixAccountRequest) String() string { @@ -260,7 +254,7 @@ func (*DeletePosixAccountRequest) ProtoMessage() {} func (x *DeletePosixAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type DeleteSshPublicKeyRequest struct { func (x *DeleteSshPublicKeyRequest) Reset() { *x = DeleteSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSshPublicKeyRequest) String() string { @@ -311,7 +303,7 @@ func (*DeleteSshPublicKeyRequest) ProtoMessage() {} func (x *DeleteSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +343,9 @@ type GetLoginProfileRequest struct { func (x *GetLoginProfileRequest) Reset() { *x = GetLoginProfileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoginProfileRequest) String() string { @@ -366,7 +356,7 @@ func (*GetLoginProfileRequest) ProtoMessage() {} func (x *GetLoginProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +413,9 @@ type GetSshPublicKeyRequest struct { func (x *GetSshPublicKeyRequest) Reset() { *x = GetSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSshPublicKeyRequest) String() string { @@ -438,7 +426,7 @@ func (*GetSshPublicKeyRequest) ProtoMessage() {} func (x *GetSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +470,9 @@ type ImportSshPublicKeyRequest struct { func (x *ImportSshPublicKeyRequest) Reset() { *x = ImportSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSshPublicKeyRequest) String() string { @@ -497,7 +483,7 @@ func (*ImportSshPublicKeyRequest) ProtoMessage() {} func (x *ImportSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +547,9 @@ type ImportSshPublicKeyResponse struct { func (x *ImportSshPublicKeyResponse) Reset() { *x = ImportSshPublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportSshPublicKeyResponse) String() string { @@ -576,7 +560,7 @@ func (*ImportSshPublicKeyResponse) ProtoMessage() {} func (x *ImportSshPublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +607,9 @@ type UpdateSshPublicKeyRequest struct { func (x *UpdateSshPublicKeyRequest) Reset() { *x = UpdateSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSshPublicKeyRequest) String() string { @@ -638,7 +620,7 @@ func (*UpdateSshPublicKeyRequest) ProtoMessage() {} func (x *UpdateSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +680,9 @@ type SecurityKey struct { func (x *SecurityKey) Reset() { *x = SecurityKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityKey) String() string { @@ -713,7 +693,7 @@ func (*SecurityKey) ProtoMessage() {} func (x *SecurityKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +780,9 @@ type UniversalTwoFactor struct { func (x *UniversalTwoFactor) Reset() { *x = UniversalTwoFactor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UniversalTwoFactor) String() string { @@ -815,7 +793,7 @@ func (*UniversalTwoFactor) ProtoMessage() {} func (x *UniversalTwoFactor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +827,9 @@ type WebAuthn struct { func (x *WebAuthn) Reset() { *x = WebAuthn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebAuthn) String() string { @@ -864,7 +840,7 @@ func (*WebAuthn) ProtoMessage() {} func (x *WebAuthn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +875,9 @@ type SignSshPublicKeyRequest struct { func (x *SignSshPublicKeyRequest) Reset() { *x = SignSshPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignSshPublicKeyRequest) String() string { @@ -914,7 +888,7 @@ func (*SignSshPublicKeyRequest) ProtoMessage() {} func (x *SignSshPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,11 +928,9 @@ type SignSshPublicKeyResponse struct { func (x *SignSshPublicKeyResponse) Reset() { *x = SignSshPublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SignSshPublicKeyResponse) String() string { @@ -969,7 +941,7 @@ func (*SignSshPublicKeyResponse) ProtoMessage() {} func (x *SignSshPublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1378,176 +1350,6 @@ func file_google_cloud_oslogin_v1beta_oslogin_proto_init() { if File_google_cloud_oslogin_v1beta_oslogin_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoginProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeletePosixAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetLoginProfileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportSshPublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SecurityKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UniversalTwoFactor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*WebAuthn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SignSshPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SignSshPublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_oslogin_v1beta_oslogin_proto_msgTypes[9].OneofWrappers = []any{ (*SecurityKey_UniversalTwoFactor)(nil), (*SecurityKey_WebAuthn)(nil), diff --git a/oslogin/common/commonpb/common.pb.go b/oslogin/common/commonpb/common.pb.go index 7d0f16e664f3..1c404806f0b7 100755 --- a/oslogin/common/commonpb/common.pb.go +++ b/oslogin/common/commonpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/oslogin/common/common.proto @@ -123,11 +123,9 @@ type PosixAccount struct { func (x *PosixAccount) Reset() { *x = PosixAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PosixAccount) String() string { @@ -138,7 +136,7 @@ func (*PosixAccount) ProtoMessage() {} func (x *PosixAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +248,9 @@ type SshPublicKey struct { func (x *SshPublicKey) Reset() { *x = SshPublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SshPublicKey) String() string { @@ -265,7 +261,7 @@ func (*SshPublicKey) ProtoMessage() {} func (x *SshPublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_oslogin_common_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,32 +415,6 @@ func file_google_cloud_oslogin_common_common_proto_init() { if File_google_cloud_oslogin_common_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_oslogin_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PosixAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_oslogin_common_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SshPublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/parallelstore/apiv1/helpers.go b/parallelstore/apiv1/helpers.go index c5b8fcf2dbcc..68f46282b9bf 100755 --- a/parallelstore/apiv1/helpers.go +++ b/parallelstore/apiv1/helpers.go @@ -18,10 +18,20 @@ package parallelstore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "parallelstore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/parallelstore/apiv1/parallelstore_client.go b/parallelstore/apiv1/parallelstore_client.go index 85446d268b04..a34e27bfbe9e 100755 --- a/parallelstore/apiv1/parallelstore_client.go +++ b/parallelstore/apiv1/parallelstore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" parallelstorepb "cloud.google.com/go/parallelstore/apiv1/parallelstorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -315,6 +314,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new parallelstore client based on gRPC. @@ -360,6 +361,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: parallelstorepb.NewParallelstoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -424,6 +426,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new parallelstore rest client. @@ -460,6 +464,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -533,7 +538,7 @@ func (c *gRPCClient) ListInstances(ctx context.Context, req *parallelstorepb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *gRPCClient) GetInstance(ctx context.Context, req *parallelstorepb.GetIn var resp *parallelstorepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *gRPCClient) CreateInstance(ctx context.Context, req *parallelstorepb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *gRPCClient) UpdateInstance(ctx context.Context, req *parallelstorepb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *gRPCClient) DeleteInstance(ctx context.Context, req *parallelstorepb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *gRPCClient) ImportData(ctx context.Context, req *parallelstorepb.Import var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -666,7 +671,7 @@ func (c *gRPCClient) ExportData(ctx context.Context, req *parallelstorepb.Export var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -686,7 +691,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -763,7 +768,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -778,7 +783,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -884,21 +889,10 @@ func (c *restClient) ListInstances(ctx context.Context, req *parallelstorepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -961,17 +955,7 @@ func (c *restClient) GetInstance(ctx context.Context, req *parallelstorepb.GetIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1031,21 +1015,10 @@ func (c *restClient) CreateInstance(ctx context.Context, req *parallelstorepb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1112,21 +1085,10 @@ func (c *restClient) UpdateInstance(ctx context.Context, req *parallelstorepb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1179,21 +1141,10 @@ func (c *restClient) DeleteInstance(ctx context.Context, req *parallelstorepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1249,21 +1200,10 @@ func (c *restClient) ImportData(ctx context.Context, req *parallelstorepb.Import httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1319,21 +1259,10 @@ func (c *restClient) ExportData(ctx context.Context, req *parallelstorepb.Export httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1384,17 +1313,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1459,21 +1378,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1539,15 +1447,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1581,15 +1482,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1626,17 +1520,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1701,21 +1585,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/parallelstore/apiv1/parallelstore_client_example_go123_test.go b/parallelstore/apiv1/parallelstore_client_example_go123_test.go index 1a7e49d1069e..358672f99616 100644 --- a/parallelstore/apiv1/parallelstore_client_example_go123_test.go +++ b/parallelstore/apiv1/parallelstore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/parallelstore/apiv1/parallelstorepb/parallelstore.pb.go b/parallelstore/apiv1/parallelstorepb/parallelstore.pb.go index 596ed8f30a8b..00289faca925 100755 --- a/parallelstore/apiv1/parallelstorepb/parallelstore.pb.go +++ b/parallelstore/apiv1/parallelstorepb/parallelstore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/parallelstore/v1/parallelstore.proto @@ -340,11 +340,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -355,7 +353,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +491,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -508,7 +504,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +571,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -590,7 +584,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +633,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -654,7 +646,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +706,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -729,7 +719,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +793,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -818,7 +806,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,11 +868,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -895,7 +881,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -952,11 +938,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -967,7 +951,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1029,9 @@ type SourceGcsBucket struct { func (x *SourceGcsBucket) Reset() { *x = SourceGcsBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceGcsBucket) String() string { @@ -1060,7 +1042,7 @@ func (*SourceGcsBucket) ProtoMessage() {} func (x *SourceGcsBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1096,11 +1078,9 @@ type DestinationGcsBucket struct { func (x *DestinationGcsBucket) Reset() { *x = DestinationGcsBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationGcsBucket) String() string { @@ -1111,7 +1091,7 @@ func (*DestinationGcsBucket) ProtoMessage() {} func (x *DestinationGcsBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1126,9 @@ type SourceParallelstore struct { func (x *SourceParallelstore) Reset() { *x = SourceParallelstore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceParallelstore) String() string { @@ -1161,7 +1139,7 @@ func (*SourceParallelstore) ProtoMessage() {} func (x *SourceParallelstore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1196,11 +1174,9 @@ type DestinationParallelstore struct { func (x *DestinationParallelstore) Reset() { *x = DestinationParallelstore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationParallelstore) String() string { @@ -1211,7 +1187,7 @@ func (*DestinationParallelstore) ProtoMessage() {} func (x *DestinationParallelstore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1283,11 +1259,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -1298,7 +1272,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1407,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -1448,7 +1420,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1543,11 +1515,9 @@ type ImportDataResponse struct { func (x *ImportDataResponse) Reset() { *x = ImportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataResponse) String() string { @@ -1558,7 +1528,7 @@ func (*ImportDataResponse) ProtoMessage() {} func (x *ImportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1603,11 +1573,9 @@ type ImportDataMetadata struct { func (x *ImportDataMetadata) Reset() { *x = ImportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataMetadata) String() string { @@ -1618,7 +1586,7 @@ func (*ImportDataMetadata) ProtoMessage() {} func (x *ImportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1698,11 +1666,9 @@ type ExportDataResponse struct { func (x *ExportDataResponse) Reset() { *x = ExportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataResponse) String() string { @@ -1713,7 +1679,7 @@ func (*ExportDataResponse) ProtoMessage() {} func (x *ExportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1758,11 +1724,9 @@ type ExportDataMetadata struct { func (x *ExportDataMetadata) Reset() { *x = ExportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataMetadata) String() string { @@ -1773,7 +1737,7 @@ func (*ExportDataMetadata) ProtoMessage() {} func (x *ExportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1872,11 +1836,9 @@ type TransferOperationMetadata struct { func (x *TransferOperationMetadata) Reset() { *x = TransferOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOperationMetadata) String() string { @@ -1887,7 +1849,7 @@ func (*TransferOperationMetadata) ProtoMessage() {} func (x *TransferOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,11 +1985,9 @@ type TransferCounters struct { func (x *TransferCounters) Reset() { *x = TransferCounters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferCounters) String() string { @@ -2038,7 +1998,7 @@ func (*TransferCounters) ProtoMessage() {} func (x *TransferCounters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2725,248 +2685,6 @@ func file_google_cloud_parallelstore_v1_parallelstore_proto_init() { if File_google_cloud_parallelstore_v1_parallelstore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SourceGcsBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DestinationGcsBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SourceParallelstore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DestinationParallelstore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*TransferOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TransferCounters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_parallelstore_v1_parallelstore_proto_msgTypes[12].OneofWrappers = []any{ (*ImportDataRequest_SourceGcsBucket)(nil), (*ImportDataRequest_DestinationParallelstore)(nil), diff --git a/parallelstore/apiv1beta/helpers.go b/parallelstore/apiv1beta/helpers.go index c5b8fcf2dbcc..68f46282b9bf 100755 --- a/parallelstore/apiv1beta/helpers.go +++ b/parallelstore/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package parallelstore import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "parallelstore.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/parallelstore/apiv1beta/parallelstore_client.go b/parallelstore/apiv1beta/parallelstore_client.go index dc33239feaa6..9ec46152b226 100755 --- a/parallelstore/apiv1beta/parallelstore_client.go +++ b/parallelstore/apiv1beta/parallelstore_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" parallelstorepb "cloud.google.com/go/parallelstore/apiv1beta/parallelstorepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -315,6 +314,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new parallelstore client based on gRPC. @@ -360,6 +361,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: parallelstorepb.NewParallelstoreClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -424,6 +426,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new parallelstore rest client. @@ -460,6 +464,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -533,7 +538,7 @@ func (c *gRPCClient) ListInstances(ctx context.Context, req *parallelstorepb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -568,7 +573,7 @@ func (c *gRPCClient) GetInstance(ctx context.Context, req *parallelstorepb.GetIn var resp *parallelstorepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *gRPCClient) CreateInstance(ctx context.Context, req *parallelstorepb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -606,7 +611,7 @@ func (c *gRPCClient) UpdateInstance(ctx context.Context, req *parallelstorepb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *gRPCClient) DeleteInstance(ctx context.Context, req *parallelstorepb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *gRPCClient) ImportData(ctx context.Context, req *parallelstorepb.Import var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -666,7 +671,7 @@ func (c *gRPCClient) ExportData(ctx context.Context, req *parallelstorepb.Export var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -686,7 +691,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -715,7 +720,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -763,7 +768,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -778,7 +783,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -884,21 +889,10 @@ func (c *restClient) ListInstances(ctx context.Context, req *parallelstorepb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -961,17 +955,7 @@ func (c *restClient) GetInstance(ctx context.Context, req *parallelstorepb.GetIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1031,21 +1015,10 @@ func (c *restClient) CreateInstance(ctx context.Context, req *parallelstorepb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1112,21 +1085,10 @@ func (c *restClient) UpdateInstance(ctx context.Context, req *parallelstorepb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1179,21 +1141,10 @@ func (c *restClient) DeleteInstance(ctx context.Context, req *parallelstorepb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1249,21 +1200,10 @@ func (c *restClient) ImportData(ctx context.Context, req *parallelstorepb.Import httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1319,21 +1259,10 @@ func (c *restClient) ExportData(ctx context.Context, req *parallelstorepb.Export httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1384,17 +1313,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1459,21 +1378,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1533,15 +1441,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1575,15 +1476,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1620,17 +1514,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1695,21 +1579,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/parallelstore/apiv1beta/parallelstore_client_example_go123_test.go b/parallelstore/apiv1beta/parallelstore_client_example_go123_test.go index 06d61ca09f0a..bf25e3a6c7bd 100644 --- a/parallelstore/apiv1beta/parallelstore_client_example_go123_test.go +++ b/parallelstore/apiv1beta/parallelstore_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/parallelstore/apiv1beta/parallelstorepb/parallelstore.pb.go b/parallelstore/apiv1beta/parallelstorepb/parallelstore.pb.go index bdd7f5fef965..293e2f28ec46 100755 --- a/parallelstore/apiv1beta/parallelstorepb/parallelstore.pb.go +++ b/parallelstore/apiv1beta/parallelstorepb/parallelstore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/parallelstore/v1beta/parallelstore.proto @@ -399,11 +399,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -414,7 +412,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +557,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -574,7 +570,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +637,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -656,7 +650,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +699,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -720,7 +712,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +772,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -795,7 +785,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +859,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -884,7 +872,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +934,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -961,7 +947,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +1004,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1033,7 +1017,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1095,9 @@ type SourceGcsBucket struct { func (x *SourceGcsBucket) Reset() { *x = SourceGcsBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceGcsBucket) String() string { @@ -1126,7 +1108,7 @@ func (*SourceGcsBucket) ProtoMessage() {} func (x *SourceGcsBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,11 +1144,9 @@ type DestinationGcsBucket struct { func (x *DestinationGcsBucket) Reset() { *x = DestinationGcsBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationGcsBucket) String() string { @@ -1177,7 +1157,7 @@ func (*DestinationGcsBucket) ProtoMessage() {} func (x *DestinationGcsBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,11 +1192,9 @@ type SourceParallelstore struct { func (x *SourceParallelstore) Reset() { *x = SourceParallelstore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceParallelstore) String() string { @@ -1227,7 +1205,7 @@ func (*SourceParallelstore) ProtoMessage() {} func (x *SourceParallelstore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1262,11 +1240,9 @@ type DestinationParallelstore struct { func (x *DestinationParallelstore) Reset() { *x = DestinationParallelstore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestinationParallelstore) String() string { @@ -1277,7 +1253,7 @@ func (*DestinationParallelstore) ProtoMessage() {} func (x *DestinationParallelstore) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1325,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -1364,7 +1338,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,11 +1473,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -1514,7 +1486,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1581,9 @@ type ImportDataResponse struct { func (x *ImportDataResponse) Reset() { *x = ImportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataResponse) String() string { @@ -1624,7 +1594,7 @@ func (*ImportDataResponse) ProtoMessage() {} func (x *ImportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1639,9 @@ type ImportDataMetadata struct { func (x *ImportDataMetadata) Reset() { *x = ImportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataMetadata) String() string { @@ -1684,7 +1652,7 @@ func (*ImportDataMetadata) ProtoMessage() {} func (x *ImportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1732,9 @@ type ExportDataResponse struct { func (x *ExportDataResponse) Reset() { *x = ExportDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataResponse) String() string { @@ -1779,7 +1745,7 @@ func (*ExportDataResponse) ProtoMessage() {} func (x *ExportDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1824,11 +1790,9 @@ type ExportDataMetadata struct { func (x *ExportDataMetadata) Reset() { *x = ExportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataMetadata) String() string { @@ -1839,7 +1803,7 @@ func (*ExportDataMetadata) ProtoMessage() {} func (x *ExportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1938,11 +1902,9 @@ type TransferOperationMetadata struct { func (x *TransferOperationMetadata) Reset() { *x = TransferOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOperationMetadata) String() string { @@ -1953,7 +1915,7 @@ func (*TransferOperationMetadata) ProtoMessage() {} func (x *TransferOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2089,11 +2051,9 @@ type TransferCounters struct { func (x *TransferCounters) Reset() { *x = TransferCounters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferCounters) String() string { @@ -2104,7 +2064,7 @@ func (*TransferCounters) ProtoMessage() {} func (x *TransferCounters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2814,248 +2774,6 @@ func file_google_cloud_parallelstore_v1beta_parallelstore_proto_init() { if File_google_cloud_parallelstore_v1beta_parallelstore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SourceGcsBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DestinationGcsBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SourceParallelstore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DestinationParallelstore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*TransferOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TransferCounters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_parallelstore_v1beta_parallelstore_proto_msgTypes[12].OneofWrappers = []any{ (*ImportDataRequest_SourceGcsBucket)(nil), (*ImportDataRequest_DestinationParallelstore)(nil), diff --git a/phishingprotection/apiv1beta1/helpers.go b/phishingprotection/apiv1beta1/helpers.go index 9c209bb4b2d7..b0722d80b03b 100755 --- a/phishingprotection/apiv1beta1/helpers.go +++ b/phishingprotection/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package phishingprotection import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "phishingprotection.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/phishingprotection/apiv1beta1/phishing_protection_service_v1_beta1_client.go b/phishingprotection/apiv1beta1/phishing_protection_service_v1_beta1_client.go index 46dc9f665262..867a65fa9c2f 100755 --- a/phishingprotection/apiv1beta1/phishing_protection_service_v1_beta1_client.go +++ b/phishingprotection/apiv1beta1/phishing_protection_service_v1_beta1_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( phishingprotectionpb "cloud.google.com/go/phishingprotection/apiv1beta1/phishingprotectionpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -144,6 +143,8 @@ type phishingProtectionServiceV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPhishingProtectionServiceV1Beta1Client creates a new phishing protection service v1 beta1 client based on gRPC. @@ -170,6 +171,7 @@ func NewPhishingProtectionServiceV1Beta1Client(ctx context.Context, opts ...opti connPool: connPool, phishingProtectionServiceV1Beta1Client: phishingprotectionpb.NewPhishingProtectionServiceV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -216,6 +218,8 @@ type phishingProtectionServiceV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing PhishingProtectionServiceV1Beta1Client CallOptions **PhishingProtectionServiceV1Beta1CallOptions + + logger *slog.Logger } // NewPhishingProtectionServiceV1Beta1RESTClient creates a new phishing protection service v1 beta1 rest client. @@ -233,6 +237,7 @@ func NewPhishingProtectionServiceV1Beta1RESTClient(ctx context.Context, opts ... endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -285,7 +290,7 @@ func (c *phishingProtectionServiceV1Beta1GRPCClient) ReportPhishing(ctx context. var resp *phishingprotectionpb.ReportPhishingResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.phishingProtectionServiceV1Beta1Client.ReportPhishing(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.phishingProtectionServiceV1Beta1Client.ReportPhishing, req, settings.GRPC, c.logger, "ReportPhishing") return err }, opts...) if err != nil { @@ -339,17 +344,7 @@ func (c *phishingProtectionServiceV1Beta1RESTClient) ReportPhishing(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReportPhishing") if err != nil { return err } diff --git a/phishingprotection/apiv1beta1/phishingprotectionpb/phishingprotection.pb.go b/phishingprotection/apiv1beta1/phishingprotectionpb/phishingprotection.pb.go index 5c65739465e6..7c256b0a22ae 100755 --- a/phishingprotection/apiv1beta1/phishingprotectionpb/phishingprotection.pb.go +++ b/phishingprotection/apiv1beta1/phishingprotectionpb/phishingprotection.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto @@ -56,11 +56,9 @@ type ReportPhishingRequest struct { func (x *ReportPhishingRequest) Reset() { *x = ReportPhishingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportPhishingRequest) String() string { @@ -71,7 +69,7 @@ func (*ReportPhishingRequest) ProtoMessage() {} func (x *ReportPhishingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type ReportPhishingResponse struct { func (x *ReportPhishingResponse) Reset() { *x = ReportPhishingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportPhishingResponse) String() string { @@ -124,7 +120,7 @@ func (*ReportPhishingResponse) ProtoMessage() {} func (x *ReportPhishingResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,32 +236,6 @@ func file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_init( if File_google_cloud_phishingprotection_v1beta1_phishingprotection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReportPhishingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_phishingprotection_v1beta1_phishingprotection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReportPhishingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/policysimulator/apiv1/helpers.go b/policysimulator/apiv1/helpers.go index e62cd805d823..9682e2cfe745 100755 --- a/policysimulator/apiv1/helpers.go +++ b/policysimulator/apiv1/helpers.go @@ -18,10 +18,20 @@ package policysimulator import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "policysimulator.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/policysimulator/apiv1/policysimulatorpb/explanations.pb.go b/policysimulator/apiv1/policysimulatorpb/explanations.pb.go index 102fa3e45a78..495e7f2b07ac 100755 --- a/policysimulator/apiv1/policysimulatorpb/explanations.pb.go +++ b/policysimulator/apiv1/policysimulatorpb/explanations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/policysimulator/v1/explanations.proto @@ -321,11 +321,9 @@ type AccessTuple struct { func (x *AccessTuple) Reset() { *x = AccessTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessTuple) String() string { @@ -336,7 +334,7 @@ func (*AccessTuple) ProtoMessage() {} func (x *AccessTuple) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +420,9 @@ type ExplainedPolicy struct { func (x *ExplainedPolicy) Reset() { *x = ExplainedPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedPolicy) String() string { @@ -437,7 +433,7 @@ func (*ExplainedPolicy) ProtoMessage() {} func (x *ExplainedPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +545,9 @@ type BindingExplanation struct { func (x *BindingExplanation) Reset() { *x = BindingExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingExplanation) String() string { @@ -564,7 +558,7 @@ func (*BindingExplanation) ProtoMessage() {} func (x *BindingExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +637,9 @@ type BindingExplanation_AnnotatedMembership struct { func (x *BindingExplanation_AnnotatedMembership) Reset() { *x = BindingExplanation_AnnotatedMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingExplanation_AnnotatedMembership) String() string { @@ -658,7 +650,7 @@ func (*BindingExplanation_AnnotatedMembership) ProtoMessage() {} func (x *BindingExplanation_AnnotatedMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,56 +886,6 @@ func file_google_cloud_policysimulator_v1_explanations_proto_init() { if File_google_cloud_policysimulator_v1_explanations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BindingExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_explanations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BindingExplanation_AnnotatedMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/policysimulator/apiv1/policysimulatorpb/simulator.pb.go b/policysimulator/apiv1/policysimulatorpb/simulator.pb.go index f3d30bc8bfc7..16eb6e859816 100755 --- a/policysimulator/apiv1/policysimulatorpb/simulator.pb.go +++ b/policysimulator/apiv1/policysimulatorpb/simulator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/policysimulator/v1/simulator.proto @@ -277,11 +277,9 @@ type Replay struct { func (x *Replay) Reset() { *x = Replay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replay) String() string { @@ -292,7 +290,7 @@ func (*Replay) ProtoMessage() {} func (x *Replay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +368,9 @@ type ReplayResult struct { func (x *ReplayResult) Reset() { *x = ReplayResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplayResult) String() string { @@ -385,7 +381,7 @@ func (*ReplayResult) ProtoMessage() {} func (x *ReplayResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +492,9 @@ type CreateReplayRequest struct { func (x *CreateReplayRequest) Reset() { *x = CreateReplayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReplayRequest) String() string { @@ -511,7 +505,7 @@ func (*CreateReplayRequest) ProtoMessage() {} func (x *CreateReplayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,11 +546,9 @@ type ReplayOperationMetadata struct { func (x *ReplayOperationMetadata) Reset() { *x = ReplayOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplayOperationMetadata) String() string { @@ -567,7 +559,7 @@ func (*ReplayOperationMetadata) ProtoMessage() {} func (x *ReplayOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +602,9 @@ type GetReplayRequest struct { func (x *GetReplayRequest) Reset() { *x = GetReplayRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReplayRequest) String() string { @@ -625,7 +615,7 @@ func (*GetReplayRequest) ProtoMessage() {} func (x *GetReplayRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +670,9 @@ type ListReplayResultsRequest struct { func (x *ListReplayResultsRequest) Reset() { *x = ListReplayResultsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplayResultsRequest) String() string { @@ -695,7 +683,7 @@ func (*ListReplayResultsRequest) ProtoMessage() {} func (x *ListReplayResultsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -748,11 +736,9 @@ type ListReplayResultsResponse struct { func (x *ListReplayResultsResponse) Reset() { *x = ListReplayResultsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplayResultsResponse) String() string { @@ -763,7 +749,7 @@ func (*ListReplayResultsResponse) ProtoMessage() {} func (x *ListReplayResultsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +807,9 @@ type ReplayConfig struct { func (x *ReplayConfig) Reset() { *x = ReplayConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplayConfig) String() string { @@ -836,7 +820,7 @@ func (*ReplayConfig) ProtoMessage() {} func (x *ReplayConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +869,9 @@ type ReplayDiff struct { func (x *ReplayDiff) Reset() { *x = ReplayDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplayDiff) String() string { @@ -900,7 +882,7 @@ func (*ReplayDiff) ProtoMessage() {} func (x *ReplayDiff) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +930,9 @@ type AccessStateDiff struct { func (x *AccessStateDiff) Reset() { *x = AccessStateDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessStateDiff) String() string { @@ -963,7 +943,7 @@ func (*AccessStateDiff) ProtoMessage() {} func (x *AccessStateDiff) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +1008,9 @@ type ExplainedAccess struct { func (x *ExplainedAccess) Reset() { *x = ExplainedAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedAccess) String() string { @@ -1043,7 +1021,7 @@ func (*ExplainedAccess) ProtoMessage() {} func (x *ExplainedAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,11 +1081,9 @@ type Replay_ResultsSummary struct { func (x *Replay_ResultsSummary) Reset() { *x = Replay_ResultsSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replay_ResultsSummary) String() string { @@ -1118,7 +1094,7 @@ func (*Replay_ResultsSummary) ProtoMessage() {} func (x *Replay_ResultsSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,152 +1549,6 @@ func file_google_cloud_policysimulator_v1_simulator_proto_init() { return } file_google_cloud_policysimulator_v1_explanations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Replay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReplayResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateReplayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReplayOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetReplayRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListReplayResultsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListReplayResultsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReplayConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReplayDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessStateDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Replay_ResultsSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_policysimulator_v1_simulator_proto_msgTypes[1].OneofWrappers = []any{ (*ReplayResult_Diff)(nil), (*ReplayResult_Error)(nil), diff --git a/policysimulator/apiv1/simulator_client.go b/policysimulator/apiv1/simulator_client.go index 9dcd81c7db2c..d9ff98d42739 100755 --- a/policysimulator/apiv1/simulator_client.go +++ b/policysimulator/apiv1/simulator_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" policysimulatorpb "cloud.google.com/go/policysimulator/apiv1/policysimulatorpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -255,6 +254,8 @@ type simulatorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSimulatorClient creates a new simulator client based on gRPC. @@ -292,6 +293,7 @@ func NewSimulatorClient(ctx context.Context, opts ...option.ClientOption) (*Simu connPool: connPool, simulatorClient: policysimulatorpb.NewSimulatorClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -355,6 +357,8 @@ type simulatorRESTClient struct { // Points back to the CallOptions field of the containing SimulatorClient CallOptions **SimulatorCallOptions + + logger *slog.Logger } // NewSimulatorRESTClient creates a new simulator rest client. @@ -383,6 +387,7 @@ func NewSimulatorRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -445,7 +450,7 @@ func (c *simulatorGRPCClient) GetReplay(ctx context.Context, req *policysimulato var resp *policysimulatorpb.Replay err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.simulatorClient.GetReplay(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.simulatorClient.GetReplay, req, settings.GRPC, c.logger, "GetReplay") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *simulatorGRPCClient) CreateReplay(ctx context.Context, req *policysimul var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.simulatorClient.CreateReplay(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.simulatorClient.CreateReplay, req, settings.GRPC, c.logger, "CreateReplay") return err }, opts...) if err != nil { @@ -494,7 +499,7 @@ func (c *simulatorGRPCClient) ListReplayResults(ctx context.Context, req *policy } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.simulatorClient.ListReplayResults(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.simulatorClient.ListReplayResults, req, settings.GRPC, c.logger, "ListReplayResults") return err }, opts...) if err != nil { @@ -529,7 +534,7 @@ func (c *simulatorGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -558,7 +563,7 @@ func (c *simulatorGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -618,17 +623,7 @@ func (c *simulatorRESTClient) GetReplay(ctx context.Context, req *policysimulato httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReplay") if err != nil { return err } @@ -685,21 +680,10 @@ func (c *simulatorRESTClient) CreateReplay(ctx context.Context, req *policysimul httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReplay") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -763,21 +747,10 @@ func (c *simulatorRESTClient) ListReplayResults(ctx context.Context, req *policy } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReplayResults") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -840,17 +813,7 @@ func (c *simulatorRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -915,21 +878,10 @@ func (c *simulatorRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/policysimulator/apiv1/simulator_client_example_go123_test.go b/policysimulator/apiv1/simulator_client_example_go123_test.go index 23c219c03f14..1e174f2f40fc 100644 --- a/policysimulator/apiv1/simulator_client_example_go123_test.go +++ b/policysimulator/apiv1/simulator_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSimulatorClient_ListReplayResults_all() { } for resp, err := range c.ListReplayResults(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSimulatorClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/policytroubleshooter/apiv1/helpers.go b/policytroubleshooter/apiv1/helpers.go index 68adb43822c6..f7b2bf658fae 100755 --- a/policytroubleshooter/apiv1/helpers.go +++ b/policytroubleshooter/apiv1/helpers.go @@ -18,10 +18,20 @@ package policytroubleshooter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "policytroubleshooter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/policytroubleshooter/apiv1/iam_checker_client.go b/policytroubleshooter/apiv1/iam_checker_client.go index 0d3f587b6335..cb014f07263b 100755 --- a/policytroubleshooter/apiv1/iam_checker_client.go +++ b/policytroubleshooter/apiv1/iam_checker_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( policytroubleshooterpb "cloud.google.com/go/policytroubleshooter/apiv1/policytroubleshooterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -142,6 +141,8 @@ type iamCheckerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewIamCheckerClient creates a new iam checker client based on gRPC. @@ -170,6 +171,7 @@ func NewIamCheckerClient(ctx context.Context, opts ...option.ClientOption) (*Iam connPool: connPool, iamCheckerClient: policytroubleshooterpb.NewIamCheckerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -216,6 +218,8 @@ type iamCheckerRESTClient struct { // Points back to the CallOptions field of the containing IamCheckerClient CallOptions **IamCheckerCallOptions + + logger *slog.Logger } // NewIamCheckerRESTClient creates a new iam checker rest client. @@ -235,6 +239,7 @@ func NewIamCheckerRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -284,7 +289,7 @@ func (c *iamCheckerGRPCClient) TroubleshootIamPolicy(ctx context.Context, req *p var resp *policytroubleshooterpb.TroubleshootIamPolicyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamCheckerClient.TroubleshootIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamCheckerClient.TroubleshootIamPolicy, req, settings.GRPC, c.logger, "TroubleshootIamPolicy") return err }, opts...) if err != nil { @@ -331,17 +336,7 @@ func (c *iamCheckerRESTClient) TroubleshootIamPolicy(ctx context.Context, req *p httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TroubleshootIamPolicy") if err != nil { return err } diff --git a/policytroubleshooter/apiv1/policytroubleshooterpb/checker.pb.go b/policytroubleshooter/apiv1/policytroubleshooterpb/checker.pb.go index fd9ef71fc1c4..1eb338b984e9 100755 --- a/policytroubleshooter/apiv1/policytroubleshooterpb/checker.pb.go +++ b/policytroubleshooter/apiv1/policytroubleshooterpb/checker.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/policytroubleshooter/v1/checker.proto @@ -55,11 +55,9 @@ type TroubleshootIamPolicyRequest struct { func (x *TroubleshootIamPolicyRequest) Reset() { *x = TroubleshootIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TroubleshootIamPolicyRequest) String() string { @@ -70,7 +68,7 @@ func (*TroubleshootIamPolicyRequest) ProtoMessage() {} func (x *TroubleshootIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type TroubleshootIamPolicyResponse struct { func (x *TroubleshootIamPolicyResponse) Reset() { *x = TroubleshootIamPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TroubleshootIamPolicyResponse) String() string { @@ -134,7 +130,7 @@ func (*TroubleshootIamPolicyResponse) ProtoMessage() {} func (x *TroubleshootIamPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,32 +287,6 @@ func file_google_cloud_policytroubleshooter_v1_checker_proto_init() { return } file_google_cloud_policytroubleshooter_v1_explanations_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TroubleshootIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_v1_checker_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TroubleshootIamPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/policytroubleshooter/apiv1/policytroubleshooterpb/explanations.pb.go b/policytroubleshooter/apiv1/policytroubleshooterpb/explanations.pb.go index 62a36ef5a63a..9d1a3d4e0e63 100755 --- a/policytroubleshooter/apiv1/policytroubleshooterpb/explanations.pb.go +++ b/policytroubleshooter/apiv1/policytroubleshooterpb/explanations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/policytroubleshooter/v1/explanations.proto @@ -316,11 +316,9 @@ type AccessTuple struct { func (x *AccessTuple) Reset() { *x = AccessTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessTuple) String() string { @@ -331,7 +329,7 @@ func (*AccessTuple) ProtoMessage() {} func (x *AccessTuple) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +411,9 @@ type ExplainedPolicy struct { func (x *ExplainedPolicy) Reset() { *x = ExplainedPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedPolicy) String() string { @@ -428,7 +424,7 @@ func (*ExplainedPolicy) ProtoMessage() {} func (x *ExplainedPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +536,9 @@ type BindingExplanation struct { func (x *BindingExplanation) Reset() { *x = BindingExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingExplanation) String() string { @@ -555,7 +549,7 @@ func (*BindingExplanation) ProtoMessage() {} func (x *BindingExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -634,11 +628,9 @@ type BindingExplanation_AnnotatedMembership struct { func (x *BindingExplanation_AnnotatedMembership) Reset() { *x = BindingExplanation_AnnotatedMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingExplanation_AnnotatedMembership) String() string { @@ -649,7 +641,7 @@ func (*BindingExplanation_AnnotatedMembership) ProtoMessage() {} func (x *BindingExplanation_AnnotatedMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,56 +880,6 @@ func file_google_cloud_policytroubleshooter_v1_explanations_proto_init() { if File_google_cloud_policytroubleshooter_v1_explanations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccessTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BindingExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_v1_explanations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BindingExplanation_AnnotatedMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/policytroubleshooter/iam/apiv3/helpers.go b/policytroubleshooter/iam/apiv3/helpers.go index adf7f26bba8b..84c1e4418a56 100755 --- a/policytroubleshooter/iam/apiv3/helpers.go +++ b/policytroubleshooter/iam/apiv3/helpers.go @@ -18,10 +18,20 @@ package iam import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "policytroubleshooter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/policytroubleshooter/iam/apiv3/iampb/troubleshooter.pb.go b/policytroubleshooter/iam/apiv3/iampb/troubleshooter.pb.go index ebb7ba895e8f..893806a49be4 100755 --- a/policytroubleshooter/iam/apiv3/iampb/troubleshooter.pb.go +++ b/policytroubleshooter/iam/apiv3/iampb/troubleshooter.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto @@ -490,11 +490,9 @@ type TroubleshootIamPolicyRequest struct { func (x *TroubleshootIamPolicyRequest) Reset() { *x = TroubleshootIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TroubleshootIamPolicyRequest) String() string { @@ -505,7 +503,7 @@ func (*TroubleshootIamPolicyRequest) ProtoMessage() {} func (x *TroubleshootIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +549,9 @@ type TroubleshootIamPolicyResponse struct { func (x *TroubleshootIamPolicyResponse) Reset() { *x = TroubleshootIamPolicyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TroubleshootIamPolicyResponse) String() string { @@ -566,7 +562,7 @@ func (*TroubleshootIamPolicyResponse) ProtoMessage() {} func (x *TroubleshootIamPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +647,9 @@ type AccessTuple struct { func (x *AccessTuple) Reset() { *x = AccessTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessTuple) String() string { @@ -666,7 +660,7 @@ func (*AccessTuple) ProtoMessage() {} func (x *AccessTuple) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,11 +734,9 @@ type ConditionContext struct { func (x *ConditionContext) Reset() { *x = ConditionContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionContext) String() string { @@ -755,7 +747,7 @@ func (*ConditionContext) ProtoMessage() {} func (x *ConditionContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -825,11 +817,9 @@ type AllowPolicyExplanation struct { func (x *AllowPolicyExplanation) Reset() { *x = AllowPolicyExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowPolicyExplanation) String() string { @@ -840,7 +830,7 @@ func (*AllowPolicyExplanation) ProtoMessage() {} func (x *AllowPolicyExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +913,9 @@ type ExplainedAllowPolicy struct { func (x *ExplainedAllowPolicy) Reset() { *x = ExplainedAllowPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedAllowPolicy) String() string { @@ -938,7 +926,7 @@ func (*ExplainedAllowPolicy) ProtoMessage() {} func (x *ExplainedAllowPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1042,9 @@ type AllowBindingExplanation struct { func (x *AllowBindingExplanation) Reset() { *x = AllowBindingExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowBindingExplanation) String() string { @@ -1069,7 +1055,7 @@ func (*AllowBindingExplanation) ProtoMessage() {} func (x *AllowBindingExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1166,9 @@ type DenyPolicyExplanation struct { func (x *DenyPolicyExplanation) Reset() { *x = DenyPolicyExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyPolicyExplanation) String() string { @@ -1195,7 +1179,7 @@ func (*DenyPolicyExplanation) ProtoMessage() {} func (x *DenyPolicyExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1278,11 +1262,9 @@ type ExplainedDenyResource struct { func (x *ExplainedDenyResource) Reset() { *x = ExplainedDenyResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedDenyResource) String() string { @@ -1293,7 +1275,7 @@ func (*ExplainedDenyResource) ProtoMessage() {} func (x *ExplainedDenyResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,11 +1356,9 @@ type ExplainedDenyPolicy struct { func (x *ExplainedDenyPolicy) Reset() { *x = ExplainedDenyPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplainedDenyPolicy) String() string { @@ -1389,7 +1369,7 @@ func (*ExplainedDenyPolicy) ProtoMessage() {} func (x *ExplainedDenyPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1485,9 @@ type DenyRuleExplanation struct { func (x *DenyRuleExplanation) Reset() { *x = DenyRuleExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyRuleExplanation) String() string { @@ -1520,7 +1498,7 @@ func (*DenyRuleExplanation) ProtoMessage() {} func (x *DenyRuleExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1637,11 +1615,9 @@ type ConditionExplanation struct { func (x *ConditionExplanation) Reset() { *x = ConditionExplanation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionExplanation) String() string { @@ -1652,7 +1628,7 @@ func (*ConditionExplanation) ProtoMessage() {} func (x *ConditionExplanation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1720,11 +1696,9 @@ type ConditionContext_Resource struct { func (x *ConditionContext_Resource) Reset() { *x = ConditionContext_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionContext_Resource) String() string { @@ -1735,7 +1709,7 @@ func (*ConditionContext_Resource) ProtoMessage() {} func (x *ConditionContext_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1788,11 +1762,9 @@ type ConditionContext_Peer struct { func (x *ConditionContext_Peer) Reset() { *x = ConditionContext_Peer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionContext_Peer) String() string { @@ -1803,7 +1775,7 @@ func (*ConditionContext_Peer) ProtoMessage() {} func (x *ConditionContext_Peer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1819,9 @@ type ConditionContext_Request struct { func (x *ConditionContext_Request) Reset() { *x = ConditionContext_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionContext_Request) String() string { @@ -1862,7 +1832,7 @@ func (*ConditionContext_Request) ProtoMessage() {} func (x *ConditionContext_Request) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1922,11 +1892,9 @@ type ConditionContext_EffectiveTag struct { func (x *ConditionContext_EffectiveTag) Reset() { *x = ConditionContext_EffectiveTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionContext_EffectiveTag) String() string { @@ -1937,7 +1905,7 @@ func (*ConditionContext_EffectiveTag) ProtoMessage() {} func (x *ConditionContext_EffectiveTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2009,11 +1977,9 @@ type AllowBindingExplanation_AnnotatedAllowMembership struct { func (x *AllowBindingExplanation_AnnotatedAllowMembership) Reset() { *x = AllowBindingExplanation_AnnotatedAllowMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllowBindingExplanation_AnnotatedAllowMembership) String() string { @@ -2024,7 +1990,7 @@ func (*AllowBindingExplanation_AnnotatedAllowMembership) ProtoMessage() {} func (x *AllowBindingExplanation_AnnotatedAllowMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2070,11 +2036,9 @@ type DenyRuleExplanation_AnnotatedPermissionMatching struct { func (x *DenyRuleExplanation_AnnotatedPermissionMatching) Reset() { *x = DenyRuleExplanation_AnnotatedPermissionMatching{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyRuleExplanation_AnnotatedPermissionMatching) String() string { @@ -2085,7 +2049,7 @@ func (*DenyRuleExplanation_AnnotatedPermissionMatching) ProtoMessage() {} func (x *DenyRuleExplanation_AnnotatedPermissionMatching) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2132,11 +2096,9 @@ type DenyRuleExplanation_AnnotatedDenyPrincipalMatching struct { func (x *DenyRuleExplanation_AnnotatedDenyPrincipalMatching) Reset() { *x = DenyRuleExplanation_AnnotatedDenyPrincipalMatching{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyRuleExplanation_AnnotatedDenyPrincipalMatching) String() string { @@ -2147,7 +2109,7 @@ func (*DenyRuleExplanation_AnnotatedDenyPrincipalMatching) ProtoMessage() {} func (x *DenyRuleExplanation_AnnotatedDenyPrincipalMatching) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2159,9 @@ type ConditionExplanation_EvaluationState struct { func (x *ConditionExplanation_EvaluationState) Reset() { *x = ConditionExplanation_EvaluationState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConditionExplanation_EvaluationState) String() string { @@ -2212,7 +2172,7 @@ func (*ConditionExplanation_EvaluationState) ProtoMessage() {} func (x *ConditionExplanation_EvaluationState) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3036,248 +2996,6 @@ func file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_init() { if File_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TroubleshootIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TroubleshootIamPolicyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AccessTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConditionContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AllowPolicyExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedAllowPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AllowBindingExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DenyPolicyExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedDenyResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ExplainedDenyPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DenyRuleExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ConditionExplanation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ConditionContext_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ConditionContext_Peer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ConditionContext_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ConditionContext_EffectiveTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AllowBindingExplanation_AnnotatedAllowMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DenyRuleExplanation_AnnotatedPermissionMatching); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DenyRuleExplanation_AnnotatedDenyPrincipalMatching); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_policytroubleshooter_iam_v3_troubleshooter_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ConditionExplanation_EvaluationState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/policytroubleshooter/iam/apiv3/policy_troubleshooter_client.go b/policytroubleshooter/iam/apiv3/policy_troubleshooter_client.go index 3d2651814db0..c0da9e8a8aa7 100755 --- a/policytroubleshooter/iam/apiv3/policy_troubleshooter_client.go +++ b/policytroubleshooter/iam/apiv3/policy_troubleshooter_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( iampb "cloud.google.com/go/policytroubleshooter/iam/apiv3/iampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -160,6 +159,8 @@ type policyTroubleshooterGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPolicyTroubleshooterClient creates a new policy troubleshooter client based on gRPC. @@ -188,6 +189,7 @@ func NewPolicyTroubleshooterClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, policyTroubleshooterClient: iampb.NewPolicyTroubleshooterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -234,6 +236,8 @@ type policyTroubleshooterRESTClient struct { // Points back to the CallOptions field of the containing PolicyTroubleshooterClient CallOptions **PolicyTroubleshooterCallOptions + + logger *slog.Logger } // NewPolicyTroubleshooterRESTClient creates a new policy troubleshooter rest client. @@ -253,6 +257,7 @@ func NewPolicyTroubleshooterRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -302,7 +307,7 @@ func (c *policyTroubleshooterGRPCClient) TroubleshootIamPolicy(ctx context.Conte var resp *iampb.TroubleshootIamPolicyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.policyTroubleshooterClient.TroubleshootIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.policyTroubleshooterClient.TroubleshootIamPolicy, req, settings.GRPC, c.logger, "TroubleshootIamPolicy") return err }, opts...) if err != nil { @@ -349,17 +354,7 @@ func (c *policyTroubleshooterRESTClient) TroubleshootIamPolicy(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TroubleshootIamPolicy") if err != nil { return err } diff --git a/privatecatalog/apiv1beta1/helpers.go b/privatecatalog/apiv1beta1/helpers.go index fe3cbc5b5739..36e37c22f525 100755 --- a/privatecatalog/apiv1beta1/helpers.go +++ b/privatecatalog/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package privatecatalog import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudprivatecatalog.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/privatecatalog/apiv1beta1/private_catalog_client.go b/privatecatalog/apiv1beta1/private_catalog_client.go index 3d149ed06194..4262deb08473 100755 --- a/privatecatalog/apiv1beta1/private_catalog_client.go +++ b/privatecatalog/apiv1beta1/private_catalog_client.go @@ -19,14 +19,13 @@ package privatecatalog import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" privatecatalogpb "cloud.google.com/go/privatecatalog/apiv1beta1/privatecatalogpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new private catalog client based on gRPC. @@ -221,6 +222,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: privatecatalogpb.NewPrivateCatalogClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -267,6 +269,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new private catalog rest client. @@ -304,6 +308,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,7 +372,7 @@ func (c *gRPCClient) SearchCatalogs(ctx context.Context, req *privatecatalogpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchCatalogs, req, settings.GRPC, c.logger, "SearchCatalogs") return err }, opts...) if err != nil { @@ -413,7 +418,7 @@ func (c *gRPCClient) SearchProducts(ctx context.Context, req *privatecatalogpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchProducts, req, settings.GRPC, c.logger, "SearchProducts") return err }, opts...) if err != nil { @@ -459,7 +464,7 @@ func (c *gRPCClient) SearchVersions(ctx context.Context, req *privatecatalogpb.S } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchVersions, req, settings.GRPC, c.logger, "SearchVersions") return err }, opts...) if err != nil { @@ -534,21 +539,10 @@ func (c *restClient) SearchCatalogs(ctx context.Context, req *privatecatalogpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchCatalogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -627,21 +621,10 @@ func (c *restClient) SearchProducts(ctx context.Context, req *privatecatalogpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchProducts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -718,21 +701,10 @@ func (c *restClient) SearchVersions(ctx context.Context, req *privatecatalogpb.S } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchVersions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/privatecatalog/apiv1beta1/private_catalog_client_example_go123_test.go b/privatecatalog/apiv1beta1/private_catalog_client_example_go123_test.go index 6491bad07a1f..94972a1c96b0 100644 --- a/privatecatalog/apiv1beta1/private_catalog_client_example_go123_test.go +++ b/privatecatalog/apiv1beta1/private_catalog_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_SearchCatalogs_all() { } for resp, err := range c.SearchCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_SearchProducts_all() { } for resp, err := range c.SearchProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_SearchVersions_all() { } for resp, err := range c.SearchVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/privatecatalog/apiv1beta1/privatecatalogpb/private_catalog.pb.go b/privatecatalog/apiv1beta1/privatecatalogpb/private_catalog.pb.go index 5d454dd02c0e..c28dc849504a 100755 --- a/privatecatalog/apiv1beta1/privatecatalogpb/private_catalog.pb.go +++ b/privatecatalog/apiv1beta1/privatecatalogpb/private_catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/privatecatalog/v1beta1/private_catalog.proto @@ -125,11 +125,9 @@ type SearchCatalogsRequest struct { func (x *SearchCatalogsRequest) Reset() { *x = SearchCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogsRequest) String() string { @@ -140,7 +138,7 @@ func (*SearchCatalogsRequest) ProtoMessage() {} func (x *SearchCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +196,9 @@ type SearchCatalogsResponse struct { func (x *SearchCatalogsResponse) Reset() { *x = SearchCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCatalogsResponse) String() string { @@ -213,7 +209,7 @@ func (*SearchCatalogsResponse) ProtoMessage() {} func (x *SearchCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +264,9 @@ type SearchProductsRequest struct { func (x *SearchProductsRequest) Reset() { *x = SearchProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProductsRequest) String() string { @@ -283,7 +277,7 @@ func (*SearchProductsRequest) ProtoMessage() {} func (x *SearchProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -341,11 +335,9 @@ type SearchProductsResponse struct { func (x *SearchProductsResponse) Reset() { *x = SearchProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProductsResponse) String() string { @@ -356,7 +348,7 @@ func (*SearchProductsResponse) ProtoMessage() {} func (x *SearchProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +403,9 @@ type SearchVersionsRequest struct { func (x *SearchVersionsRequest) Reset() { *x = SearchVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchVersionsRequest) String() string { @@ -426,7 +416,7 @@ func (*SearchVersionsRequest) ProtoMessage() {} func (x *SearchVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +474,9 @@ type SearchVersionsResponse struct { func (x *SearchVersionsResponse) Reset() { *x = SearchVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchVersionsResponse) String() string { @@ -499,7 +487,7 @@ func (*SearchVersionsResponse) ProtoMessage() {} func (x *SearchVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -550,11 +538,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -565,7 +551,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -810,11 +796,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -825,7 +809,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +912,9 @@ type AssetReference struct { func (x *AssetReference) Reset() { *x = AssetReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetReference) String() string { @@ -943,7 +925,7 @@ func (*AssetReference) ProtoMessage() {} func (x *AssetReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1072,9 @@ type Inputs struct { func (x *Inputs) Reset() { *x = Inputs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Inputs) String() string { @@ -1105,7 +1085,7 @@ func (*Inputs) ProtoMessage() {} func (x *Inputs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1124,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -1159,7 +1137,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1199,9 @@ type GitSource struct { func (x *GitSource) Reset() { *x = GitSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GitSource) String() string { @@ -1236,7 +1212,7 @@ func (*GitSource) ProtoMessage() {} func (x *GitSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1321,9 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Version) String() string { @@ -1360,7 +1334,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1791,164 +1765,6 @@ func file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_init() { if File_google_cloud_privatecatalog_v1beta1_private_catalog_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AssetReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Inputs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GitSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_privatecatalog_v1beta1_private_catalog_proto_msgTypes[8].OneofWrappers = []any{ (*AssetReference_Asset)(nil), (*AssetReference_GcsPath)(nil), diff --git a/privilegedaccessmanager/apiv1/helpers.go b/privilegedaccessmanager/apiv1/helpers.go index 50c1b19fcbc5..b306e81b70ac 100755 --- a/privilegedaccessmanager/apiv1/helpers.go +++ b/privilegedaccessmanager/apiv1/helpers.go @@ -18,10 +18,20 @@ package privilegedaccessmanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "privilegedaccessmanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/privilegedaccessmanager/apiv1/privileged_access_manager_client.go b/privilegedaccessmanager/apiv1/privileged_access_manager_client.go index fa46e612910f..e3a3b703bd0b 100755 --- a/privilegedaccessmanager/apiv1/privileged_access_manager_client.go +++ b/privilegedaccessmanager/apiv1/privileged_access_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" privilegedaccessmanagerpb "cloud.google.com/go/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -404,6 +403,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new privileged access manager client based on gRPC. @@ -453,6 +454,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: privilegedaccessmanagerpb.NewPrivilegedAccessManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -517,6 +519,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new privileged access manager rest client. @@ -557,6 +561,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -619,7 +624,7 @@ func (c *gRPCClient) CheckOnboardingStatus(ctx context.Context, req *privilegeda var resp *privilegedaccessmanagerpb.CheckOnboardingStatusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CheckOnboardingStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CheckOnboardingStatus, req, settings.GRPC, c.logger, "CheckOnboardingStatus") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *gRPCClient) ListEntitlements(ctx context.Context, req *privilegedaccess } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEntitlements(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEntitlements, req, settings.GRPC, c.logger, "ListEntitlements") return err }, opts...) if err != nil { @@ -694,7 +699,7 @@ func (c *gRPCClient) SearchEntitlements(ctx context.Context, req *privilegedacce } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchEntitlements(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchEntitlements, req, settings.GRPC, c.logger, "SearchEntitlements") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *gRPCClient) GetEntitlement(ctx context.Context, req *privilegedaccessma var resp *privilegedaccessmanagerpb.Entitlement err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEntitlement, req, settings.GRPC, c.logger, "GetEntitlement") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *gRPCClient) CreateEntitlement(ctx context.Context, req *privilegedacces var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEntitlement, req, settings.GRPC, c.logger, "CreateEntitlement") return err }, opts...) if err != nil { @@ -767,7 +772,7 @@ func (c *gRPCClient) DeleteEntitlement(ctx context.Context, req *privilegedacces var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEntitlement, req, settings.GRPC, c.logger, "DeleteEntitlement") return err }, opts...) if err != nil { @@ -787,7 +792,7 @@ func (c *gRPCClient) UpdateEntitlement(ctx context.Context, req *privilegedacces var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEntitlement(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEntitlement, req, settings.GRPC, c.logger, "UpdateEntitlement") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *gRPCClient) ListGrants(ctx context.Context, req *privilegedaccessmanage } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGrants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGrants, req, settings.GRPC, c.logger, "ListGrants") return err }, opts...) if err != nil { @@ -864,7 +869,7 @@ func (c *gRPCClient) SearchGrants(ctx context.Context, req *privilegedaccessmana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchGrants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchGrants, req, settings.GRPC, c.logger, "SearchGrants") return err }, opts...) if err != nil { @@ -899,7 +904,7 @@ func (c *gRPCClient) GetGrant(ctx context.Context, req *privilegedaccessmanagerp var resp *privilegedaccessmanagerpb.Grant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGrant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGrant, req, settings.GRPC, c.logger, "GetGrant") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *gRPCClient) CreateGrant(ctx context.Context, req *privilegedaccessmanag var resp *privilegedaccessmanagerpb.Grant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGrant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGrant, req, settings.GRPC, c.logger, "CreateGrant") return err }, opts...) if err != nil { @@ -935,7 +940,7 @@ func (c *gRPCClient) ApproveGrant(ctx context.Context, req *privilegedaccessmana var resp *privilegedaccessmanagerpb.Grant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApproveGrant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApproveGrant, req, settings.GRPC, c.logger, "ApproveGrant") return err }, opts...) if err != nil { @@ -953,7 +958,7 @@ func (c *gRPCClient) DenyGrant(ctx context.Context, req *privilegedaccessmanager var resp *privilegedaccessmanagerpb.Grant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DenyGrant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DenyGrant, req, settings.GRPC, c.logger, "DenyGrant") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *gRPCClient) RevokeGrant(ctx context.Context, req *privilegedaccessmanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RevokeGrant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RevokeGrant, req, settings.GRPC, c.logger, "RevokeGrant") return err }, opts...) if err != nil { @@ -991,7 +996,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1020,7 +1025,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1054,7 +1059,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1069,7 +1074,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1098,7 +1103,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1159,17 +1164,7 @@ func (c *restClient) CheckOnboardingStatus(ctx context.Context, req *privilegeda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CheckOnboardingStatus") if err != nil { return err } @@ -1237,21 +1232,10 @@ func (c *restClient) ListEntitlements(ctx context.Context, req *privilegedaccess } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEntitlements") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1331,21 +1315,10 @@ func (c *restClient) SearchEntitlements(ctx context.Context, req *privilegedacce } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchEntitlements") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1408,17 +1381,7 @@ func (c *restClient) GetEntitlement(ctx context.Context, req *privilegedaccessma httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEntitlement") if err != nil { return err } @@ -1479,21 +1442,10 @@ func (c *restClient) CreateEntitlement(ctx context.Context, req *privilegedacces httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1551,21 +1503,10 @@ func (c *restClient) DeleteEntitlement(ctx context.Context, req *privilegedacces httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1654,21 +1595,10 @@ func (c *restClient) UpdateEntitlement(ctx context.Context, req *privilegedacces httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEntitlement") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1737,21 +1667,10 @@ func (c *restClient) ListGrants(ctx context.Context, req *privilegedaccessmanage } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGrants") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1831,21 +1750,10 @@ func (c *restClient) SearchGrants(ctx context.Context, req *privilegedaccessmana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchGrants") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1908,17 +1816,7 @@ func (c *restClient) GetGrant(ctx context.Context, req *privilegedaccessmanagerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGrant") if err != nil { return err } @@ -1979,17 +1877,7 @@ func (c *restClient) CreateGrant(ctx context.Context, req *privilegedaccessmanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGrant") if err != nil { return err } @@ -2047,17 +1935,7 @@ func (c *restClient) ApproveGrant(ctx context.Context, req *privilegedaccessmana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveGrant") if err != nil { return err } @@ -2115,17 +1993,7 @@ func (c *restClient) DenyGrant(ctx context.Context, req *privilegedaccessmanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DenyGrant") if err != nil { return err } @@ -2181,21 +2049,10 @@ func (c *restClient) RevokeGrant(ctx context.Context, req *privilegedaccessmanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevokeGrant") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2246,17 +2103,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2321,21 +2168,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2395,15 +2231,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2440,17 +2269,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2515,21 +2334,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/privilegedaccessmanager/apiv1/privileged_access_manager_client_example_go123_test.go b/privilegedaccessmanager/apiv1/privileged_access_manager_client_example_go123_test.go index 18dbf99392b2..84f73794dc50 100644 --- a/privilegedaccessmanager/apiv1/privileged_access_manager_client_example_go123_test.go +++ b/privilegedaccessmanager/apiv1/privileged_access_manager_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListEntitlements_all() { } for resp, err := range c.ListEntitlements(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListGrants_all() { } for resp, err := range c.ListGrants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_SearchEntitlements_all() { } for resp, err := range c.SearchEntitlements(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_SearchGrants_all() { } for resp, err := range c.SearchGrants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb/privilegedaccessmanager.pb.go b/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb/privilegedaccessmanager.pb.go index 0c20730039c8..36193ba0a1c8 100755 --- a/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb/privilegedaccessmanager.pb.go +++ b/privilegedaccessmanager/apiv1/privilegedaccessmanagerpb/privilegedaccessmanager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto @@ -330,11 +330,9 @@ type CheckOnboardingStatusRequest struct { func (x *CheckOnboardingStatusRequest) Reset() { *x = CheckOnboardingStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOnboardingStatusRequest) String() string { @@ -345,7 +343,7 @@ func (*CheckOnboardingStatusRequest) ProtoMessage() {} func (x *CheckOnboardingStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +381,9 @@ type CheckOnboardingStatusResponse struct { func (x *CheckOnboardingStatusResponse) Reset() { *x = CheckOnboardingStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOnboardingStatusResponse) String() string { @@ -398,7 +394,7 @@ func (*CheckOnboardingStatusResponse) ProtoMessage() {} func (x *CheckOnboardingStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,11 +471,9 @@ type Entitlement struct { func (x *Entitlement) Reset() { *x = Entitlement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement) String() string { @@ -490,7 +484,7 @@ func (*Entitlement) ProtoMessage() {} func (x *Entitlement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +590,9 @@ type AccessControlEntry struct { func (x *AccessControlEntry) Reset() { *x = AccessControlEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessControlEntry) String() string { @@ -611,7 +603,7 @@ func (*AccessControlEntry) ProtoMessage() {} func (x *AccessControlEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +640,9 @@ type ApprovalWorkflow struct { func (x *ApprovalWorkflow) Reset() { *x = ApprovalWorkflow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApprovalWorkflow) String() string { @@ -663,7 +653,7 @@ func (*ApprovalWorkflow) ProtoMessage() {} func (x *ApprovalWorkflow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +724,9 @@ type ManualApprovals struct { func (x *ManualApprovals) Reset() { *x = ManualApprovals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualApprovals) String() string { @@ -749,7 +737,7 @@ func (*ManualApprovals) ProtoMessage() {} func (x *ManualApprovals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,11 +780,9 @@ type PrivilegedAccess struct { func (x *PrivilegedAccess) Reset() { *x = PrivilegedAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivilegedAccess) String() string { @@ -807,7 +793,7 @@ func (*PrivilegedAccess) ProtoMessage() {} func (x *PrivilegedAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +854,9 @@ type ListEntitlementsRequest struct { func (x *ListEntitlementsRequest) Reset() { *x = ListEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsRequest) String() string { @@ -883,7 +867,7 @@ func (*ListEntitlementsRequest) ProtoMessage() {} func (x *ListEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type ListEntitlementsResponse struct { func (x *ListEntitlementsResponse) Reset() { *x = ListEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEntitlementsResponse) String() string { @@ -964,7 +946,7 @@ func (*ListEntitlementsResponse) ProtoMessage() {} func (x *ListEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +1005,9 @@ type SearchEntitlementsRequest struct { func (x *SearchEntitlementsRequest) Reset() { *x = SearchEntitlementsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntitlementsRequest) String() string { @@ -1038,7 +1018,7 @@ func (*SearchEntitlementsRequest) ProtoMessage() {} func (x *SearchEntitlementsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,11 +1082,9 @@ type SearchEntitlementsResponse struct { func (x *SearchEntitlementsResponse) Reset() { *x = SearchEntitlementsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchEntitlementsResponse) String() string { @@ -1117,7 +1095,7 @@ func (*SearchEntitlementsResponse) ProtoMessage() {} func (x *SearchEntitlementsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1136,9 @@ type GetEntitlementRequest struct { func (x *GetEntitlementRequest) Reset() { *x = GetEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntitlementRequest) String() string { @@ -1173,7 +1149,7 @@ func (*GetEntitlementRequest) ProtoMessage() {} func (x *GetEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1214,9 @@ type CreateEntitlementRequest struct { func (x *CreateEntitlementRequest) Reset() { *x = CreateEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntitlementRequest) String() string { @@ -1253,7 +1227,7 @@ func (*CreateEntitlementRequest) ProtoMessage() {} func (x *CreateEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1325,11 +1299,9 @@ type DeleteEntitlementRequest struct { func (x *DeleteEntitlementRequest) Reset() { *x = DeleteEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntitlementRequest) String() string { @@ -1340,7 +1312,7 @@ func (*DeleteEntitlementRequest) ProtoMessage() {} func (x *DeleteEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1398,11 +1370,9 @@ type UpdateEntitlementRequest struct { func (x *UpdateEntitlementRequest) Reset() { *x = UpdateEntitlementRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEntitlementRequest) String() string { @@ -1413,7 +1383,7 @@ func (*UpdateEntitlementRequest) ProtoMessage() {} func (x *UpdateEntitlementRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1462,9 @@ type Grant struct { func (x *Grant) Reset() { *x = Grant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant) String() string { @@ -1507,7 +1475,7 @@ func (*Grant) ProtoMessage() {} func (x *Grant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1620,11 +1588,9 @@ type Justification struct { func (x *Justification) Reset() { *x = Justification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Justification) String() string { @@ -1635,7 +1601,7 @@ func (*Justification) ProtoMessage() {} func (x *Justification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1697,11 +1663,9 @@ type ListGrantsRequest struct { func (x *ListGrantsRequest) Reset() { *x = ListGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGrantsRequest) String() string { @@ -1712,7 +1676,7 @@ func (*ListGrantsRequest) ProtoMessage() {} func (x *ListGrantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1778,11 +1742,9 @@ type ListGrantsResponse struct { func (x *ListGrantsResponse) Reset() { *x = ListGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGrantsResponse) String() string { @@ -1793,7 +1755,7 @@ func (*ListGrantsResponse) ProtoMessage() {} func (x *ListGrantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1851,11 +1813,9 @@ type SearchGrantsRequest struct { func (x *SearchGrantsRequest) Reset() { *x = SearchGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchGrantsRequest) String() string { @@ -1866,7 +1826,7 @@ func (*SearchGrantsRequest) ProtoMessage() {} func (x *SearchGrantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1930,11 +1890,9 @@ type SearchGrantsResponse struct { func (x *SearchGrantsResponse) Reset() { *x = SearchGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchGrantsResponse) String() string { @@ -1945,7 +1903,7 @@ func (*SearchGrantsResponse) ProtoMessage() {} func (x *SearchGrantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1986,11 +1944,9 @@ type GetGrantRequest struct { func (x *GetGrantRequest) Reset() { *x = GetGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGrantRequest) String() string { @@ -2001,7 +1957,7 @@ func (*GetGrantRequest) ProtoMessage() {} func (x *GetGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2039,11 +1995,9 @@ type ApproveGrantRequest struct { func (x *ApproveGrantRequest) Reset() { *x = ApproveGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveGrantRequest) String() string { @@ -2054,7 +2008,7 @@ func (*ApproveGrantRequest) ProtoMessage() {} func (x *ApproveGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2099,11 +2053,9 @@ type DenyGrantRequest struct { func (x *DenyGrantRequest) Reset() { *x = DenyGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyGrantRequest) String() string { @@ -2114,7 +2066,7 @@ func (*DenyGrantRequest) ProtoMessage() {} func (x *DenyGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2157,11 +2109,9 @@ type RevokeGrantRequest struct { func (x *RevokeGrantRequest) Reset() { *x = RevokeGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevokeGrantRequest) String() string { @@ -2172,7 +2122,7 @@ func (*RevokeGrantRequest) ProtoMessage() {} func (x *RevokeGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2230,11 +2180,9 @@ type CreateGrantRequest struct { func (x *CreateGrantRequest) Reset() { *x = CreateGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGrantRequest) String() string { @@ -2245,7 +2193,7 @@ func (*CreateGrantRequest) ProtoMessage() {} func (x *CreateGrantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2309,11 +2257,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2324,7 +2270,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2403,11 +2349,9 @@ type CheckOnboardingStatusResponse_Finding struct { func (x *CheckOnboardingStatusResponse_Finding) Reset() { *x = CheckOnboardingStatusResponse_Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOnboardingStatusResponse_Finding) String() string { @@ -2418,7 +2362,7 @@ func (*CheckOnboardingStatusResponse_Finding) ProtoMessage() {} func (x *CheckOnboardingStatusResponse_Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2474,11 +2418,9 @@ type CheckOnboardingStatusResponse_Finding_IAMAccessDenied struct { func (x *CheckOnboardingStatusResponse_Finding_IAMAccessDenied) Reset() { *x = CheckOnboardingStatusResponse_Finding_IAMAccessDenied{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckOnboardingStatusResponse_Finding_IAMAccessDenied) String() string { @@ -2489,7 +2431,7 @@ func (*CheckOnboardingStatusResponse_Finding_IAMAccessDenied) ProtoMessage() {} func (x *CheckOnboardingStatusResponse_Finding_IAMAccessDenied) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2530,11 +2472,9 @@ type Entitlement_RequesterJustificationConfig struct { func (x *Entitlement_RequesterJustificationConfig) Reset() { *x = Entitlement_RequesterJustificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement_RequesterJustificationConfig) String() string { @@ -2545,7 +2485,7 @@ func (*Entitlement_RequesterJustificationConfig) ProtoMessage() {} func (x *Entitlement_RequesterJustificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2620,11 +2560,9 @@ type Entitlement_AdditionalNotificationTargets struct { func (x *Entitlement_AdditionalNotificationTargets) Reset() { *x = Entitlement_AdditionalNotificationTargets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement_AdditionalNotificationTargets) String() string { @@ -2635,7 +2573,7 @@ func (*Entitlement_AdditionalNotificationTargets) ProtoMessage() {} func (x *Entitlement_AdditionalNotificationTargets) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2674,11 +2612,9 @@ type Entitlement_RequesterJustificationConfig_NotMandatory struct { func (x *Entitlement_RequesterJustificationConfig_NotMandatory) Reset() { *x = Entitlement_RequesterJustificationConfig_NotMandatory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement_RequesterJustificationConfig_NotMandatory) String() string { @@ -2689,7 +2625,7 @@ func (*Entitlement_RequesterJustificationConfig_NotMandatory) ProtoMessage() {} func (x *Entitlement_RequesterJustificationConfig_NotMandatory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2713,11 +2649,9 @@ type Entitlement_RequesterJustificationConfig_Unstructured struct { func (x *Entitlement_RequesterJustificationConfig_Unstructured) Reset() { *x = Entitlement_RequesterJustificationConfig_Unstructured{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entitlement_RequesterJustificationConfig_Unstructured) String() string { @@ -2728,7 +2662,7 @@ func (*Entitlement_RequesterJustificationConfig_Unstructured) ProtoMessage() {} func (x *Entitlement_RequesterJustificationConfig_Unstructured) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2763,11 +2697,9 @@ type ManualApprovals_Step struct { func (x *ManualApprovals_Step) Reset() { *x = ManualApprovals_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManualApprovals_Step) String() string { @@ -2778,7 +2710,7 @@ func (*ManualApprovals_Step) ProtoMessage() {} func (x *ManualApprovals_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2832,11 +2764,9 @@ type PrivilegedAccess_GcpIamAccess struct { func (x *PrivilegedAccess_GcpIamAccess) Reset() { *x = PrivilegedAccess_GcpIamAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivilegedAccess_GcpIamAccess) String() string { @@ -2847,7 +2777,7 @@ func (*PrivilegedAccess_GcpIamAccess) ProtoMessage() {} func (x *PrivilegedAccess_GcpIamAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2905,11 +2835,9 @@ type PrivilegedAccess_GcpIamAccess_RoleBinding struct { func (x *PrivilegedAccess_GcpIamAccess_RoleBinding) Reset() { *x = PrivilegedAccess_GcpIamAccess_RoleBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivilegedAccess_GcpIamAccess_RoleBinding) String() string { @@ -2920,7 +2848,7 @@ func (*PrivilegedAccess_GcpIamAccess_RoleBinding) ProtoMessage() {} func (x *PrivilegedAccess_GcpIamAccess_RoleBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2964,11 +2892,9 @@ type Grant_Timeline struct { func (x *Grant_Timeline) Reset() { *x = Grant_Timeline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline) String() string { @@ -2979,7 +2905,7 @@ func (*Grant_Timeline) ProtoMessage() {} func (x *Grant_Timeline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3018,11 +2944,9 @@ type Grant_AuditTrail struct { func (x *Grant_AuditTrail) Reset() { *x = Grant_AuditTrail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_AuditTrail) String() string { @@ -3033,7 +2957,7 @@ func (*Grant_AuditTrail) ProtoMessage() {} func (x *Grant_AuditTrail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3087,11 +3011,9 @@ type Grant_Timeline_Event struct { func (x *Grant_Timeline_Event) Reset() { *x = Grant_Timeline_Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event) String() string { @@ -3102,7 +3024,7 @@ func (*Grant_Timeline_Event) ProtoMessage() {} func (x *Grant_Timeline_Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3290,11 +3212,9 @@ type Grant_Timeline_Event_Requested struct { func (x *Grant_Timeline_Event_Requested) Reset() { *x = Grant_Timeline_Event_Requested{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Requested) String() string { @@ -3305,7 +3225,7 @@ func (*Grant_Timeline_Event_Requested) ProtoMessage() {} func (x *Grant_Timeline_Event_Requested) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3342,11 +3262,9 @@ type Grant_Timeline_Event_Approved struct { func (x *Grant_Timeline_Event_Approved) Reset() { *x = Grant_Timeline_Event_Approved{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Approved) String() string { @@ -3357,7 +3275,7 @@ func (*Grant_Timeline_Event_Approved) ProtoMessage() {} func (x *Grant_Timeline_Event_Approved) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3401,11 +3319,9 @@ type Grant_Timeline_Event_Denied struct { func (x *Grant_Timeline_Event_Denied) Reset() { *x = Grant_Timeline_Event_Denied{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Denied) String() string { @@ -3416,7 +3332,7 @@ func (*Grant_Timeline_Event_Denied) ProtoMessage() {} func (x *Grant_Timeline_Event_Denied) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3459,11 +3375,9 @@ type Grant_Timeline_Event_Revoked struct { func (x *Grant_Timeline_Event_Revoked) Reset() { *x = Grant_Timeline_Event_Revoked{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Revoked) String() string { @@ -3474,7 +3388,7 @@ func (*Grant_Timeline_Event_Revoked) ProtoMessage() {} func (x *Grant_Timeline_Event_Revoked) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3516,11 +3430,9 @@ type Grant_Timeline_Event_Scheduled struct { func (x *Grant_Timeline_Event_Scheduled) Reset() { *x = Grant_Timeline_Event_Scheduled{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Scheduled) String() string { @@ -3531,7 +3443,7 @@ func (*Grant_Timeline_Event_Scheduled) ProtoMessage() {} func (x *Grant_Timeline_Event_Scheduled) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3563,11 +3475,9 @@ type Grant_Timeline_Event_Activated struct { func (x *Grant_Timeline_Event_Activated) Reset() { *x = Grant_Timeline_Event_Activated{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Activated) String() string { @@ -3578,7 +3488,7 @@ func (*Grant_Timeline_Event_Activated) ProtoMessage() {} func (x *Grant_Timeline_Event_Activated) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3605,11 +3515,9 @@ type Grant_Timeline_Event_ActivationFailed struct { func (x *Grant_Timeline_Event_ActivationFailed) Reset() { *x = Grant_Timeline_Event_ActivationFailed{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_ActivationFailed) String() string { @@ -3620,7 +3528,7 @@ func (*Grant_Timeline_Event_ActivationFailed) ProtoMessage() {} func (x *Grant_Timeline_Event_ActivationFailed) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3651,11 +3559,9 @@ type Grant_Timeline_Event_Expired struct { func (x *Grant_Timeline_Event_Expired) Reset() { *x = Grant_Timeline_Event_Expired{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Expired) String() string { @@ -3666,7 +3572,7 @@ func (*Grant_Timeline_Event_Expired) ProtoMessage() {} func (x *Grant_Timeline_Event_Expired) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3690,11 +3596,9 @@ type Grant_Timeline_Event_Ended struct { func (x *Grant_Timeline_Event_Ended) Reset() { *x = Grant_Timeline_Event_Ended{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_Ended) String() string { @@ -3705,7 +3609,7 @@ func (*Grant_Timeline_Event_Ended) ProtoMessage() {} func (x *Grant_Timeline_Event_Ended) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3730,11 +3634,9 @@ type Grant_Timeline_Event_ExternallyModified struct { func (x *Grant_Timeline_Event_ExternallyModified) Reset() { *x = Grant_Timeline_Event_ExternallyModified{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Grant_Timeline_Event_ExternallyModified) String() string { @@ -3745,7 +3647,7 @@ func (*Grant_Timeline_Event_ExternallyModified) ProtoMessage() {} func (x *Grant_Timeline_Event_ExternallyModified) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4982,596 +4884,6 @@ func file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_ if File_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckOnboardingStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckOnboardingStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AccessControlEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ApprovalWorkflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ManualApprovals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PrivilegedAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntitlementsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchEntitlementsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEntitlementRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Grant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Justification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ApproveGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DenyGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RevokeGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CheckOnboardingStatusResponse_Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CheckOnboardingStatusResponse_Finding_IAMAccessDenied); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement_RequesterJustificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement_AdditionalNotificationTargets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement_RequesterJustificationConfig_NotMandatory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Entitlement_RequesterJustificationConfig_Unstructured); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ManualApprovals_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*PrivilegedAccess_GcpIamAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*PrivilegedAccess_GcpIamAccess_RoleBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*Grant_AuditTrail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Requested); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Approved); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Denied); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Revoked); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Scheduled); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Activated); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_ActivationFailed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Expired); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_Ended); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Grant_Timeline_Event_ExternallyModified); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_privilegedaccessmanager_v1_privilegedaccessmanager_proto_msgTypes[4].OneofWrappers = []any{ (*ApprovalWorkflow_ManualApprovals)(nil), } diff --git a/pubsub/apiv1/helpers.go b/pubsub/apiv1/helpers.go index 512907422f30..942aeb294a07 100755 --- a/pubsub/apiv1/helpers.go +++ b/pubsub/apiv1/helpers.go @@ -18,10 +18,20 @@ package pubsub import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "pubsub.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/pubsub", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/pubsub/apiv1/publisher_client.go b/pubsub/apiv1/publisher_client.go index cae0b96f505c..0417a2a16276 100755 --- a/pubsub/apiv1/publisher_client.go +++ b/pubsub/apiv1/publisher_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -482,6 +481,8 @@ type publisherGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPublisherClient creates a new publisher client based on gRPC. @@ -509,6 +510,7 @@ func NewPublisherClient(ctx context.Context, opts ...option.ClientOption) (*Publ connPool: connPool, publisherClient: pubsubpb.NewPublisherClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } c.setGoogleClientInfo() @@ -556,6 +558,8 @@ type publisherRESTClient struct { // Points back to the CallOptions field of the containing PublisherClient CallOptions **PublisherCallOptions + + logger *slog.Logger } // NewPublisherRESTClient creates a new publisher rest client. @@ -574,6 +578,7 @@ func NewPublisherRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -626,7 +631,7 @@ func (c *publisherGRPCClient) CreateTopic(ctx context.Context, req *pubsubpb.Top var resp *pubsubpb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.CreateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.CreateTopic, req, settings.GRPC, c.logger, "CreateTopic") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *publisherGRPCClient) UpdateTopic(ctx context.Context, req *pubsubpb.Upd var resp *pubsubpb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.UpdateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.UpdateTopic, req, settings.GRPC, c.logger, "UpdateTopic") return err }, opts...) if err != nil { @@ -662,7 +667,7 @@ func (c *publisherGRPCClient) Publish(ctx context.Context, req *pubsubpb.Publish var resp *pubsubpb.PublishResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.Publish(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.Publish, req, settings.GRPC, c.logger, "Publish") return err }, opts...) if err != nil { @@ -680,7 +685,7 @@ func (c *publisherGRPCClient) GetTopic(ctx context.Context, req *pubsubpb.GetTop var resp *pubsubpb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.GetTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.GetTopic, req, settings.GRPC, c.logger, "GetTopic") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *publisherGRPCClient) ListTopics(ctx context.Context, req *pubsubpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.ListTopics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.ListTopics, req, settings.GRPC, c.logger, "ListTopics") return err }, opts...) if err != nil { @@ -755,7 +760,7 @@ func (c *publisherGRPCClient) ListTopicSubscriptions(ctx context.Context, req *p } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.ListTopicSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.ListTopicSubscriptions, req, settings.GRPC, c.logger, "ListTopicSubscriptions") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *publisherGRPCClient) ListTopicSnapshots(ctx context.Context, req *pubsu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.ListTopicSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.ListTopicSnapshots, req, settings.GRPC, c.logger, "ListTopicSnapshots") return err }, opts...) if err != nil { @@ -835,7 +840,7 @@ func (c *publisherGRPCClient) DeleteTopic(ctx context.Context, req *pubsubpb.Del opts = append((*c.CallOptions).DeleteTopic[0:len((*c.CallOptions).DeleteTopic):len((*c.CallOptions).DeleteTopic)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.publisherClient.DeleteTopic(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.publisherClient.DeleteTopic, req, settings.GRPC, c.logger, "DeleteTopic") return err }, opts...) return err @@ -850,7 +855,7 @@ func (c *publisherGRPCClient) DetachSubscription(ctx context.Context, req *pubsu var resp *pubsubpb.DetachSubscriptionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publisherClient.DetachSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publisherClient.DetachSubscription, req, settings.GRPC, c.logger, "DetachSubscription") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *publisherGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *publisherGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -904,7 +909,7 @@ func (c *publisherGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -953,17 +958,7 @@ func (c *publisherRESTClient) CreateTopic(ctx context.Context, req *pubsubpb.Top httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTopic") if err != nil { return err } @@ -1020,17 +1015,7 @@ func (c *publisherRESTClient) UpdateTopic(ctx context.Context, req *pubsubpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTopic") if err != nil { return err } @@ -1087,17 +1072,7 @@ func (c *publisherRESTClient) Publish(ctx context.Context, req *pubsubpb.Publish httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Publish") if err != nil { return err } @@ -1147,17 +1122,7 @@ func (c *publisherRESTClient) GetTopic(ctx context.Context, req *pubsubpb.GetTop httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTopic") if err != nil { return err } @@ -1219,21 +1184,10 @@ func (c *publisherRESTClient) ListTopics(ctx context.Context, req *pubsubpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTopics") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1308,21 +1262,10 @@ func (c *publisherRESTClient) ListTopicSubscriptions(ctx context.Context, req *p } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTopicSubscriptions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1401,21 +1344,10 @@ func (c *publisherRESTClient) ListTopicSnapshots(ctx context.Context, req *pubsu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTopicSnapshots") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1479,15 +1411,8 @@ func (c *publisherRESTClient) DeleteTopic(ctx context.Context, req *pubsubpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTopic") + return err }, opts...) } @@ -1527,17 +1452,7 @@ func (c *publisherRESTClient) DetachSubscription(ctx context.Context, req *pubsu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DetachSubscription") if err != nil { return err } @@ -1591,17 +1506,7 @@ func (c *publisherRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1661,17 +1566,7 @@ func (c *publisherRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1733,17 +1628,7 @@ func (c *publisherRESTClient) TestIamPermissions(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/pubsub/apiv1/publisher_client_example_go123_test.go b/pubsub/apiv1/publisher_client_example_go123_test.go index 644877b5b152..0fb0c1276c31 100644 --- a/pubsub/apiv1/publisher_client_example_go123_test.go +++ b/pubsub/apiv1/publisher_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePublisherClient_ListTopicSnapshots_all() { } for resp, err := range c.ListTopicSnapshots(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExamplePublisherClient_ListTopicSubscriptions_all() { } for resp, err := range c.ListTopicSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExamplePublisherClient_ListTopics_all() { } for resp, err := range c.ListTopics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsub/apiv1/pubsubpb/pubsub.pb.go b/pubsub/apiv1/pubsubpb/pubsub.pb.go index f18defab41d3..aadd6530ba16 100755 --- a/pubsub/apiv1/pubsubpb/pubsub.pb.go +++ b/pubsub/apiv1/pubsubpb/pubsub.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/pubsub/v1/pubsub.proto @@ -530,11 +530,9 @@ type MessageStoragePolicy struct { func (x *MessageStoragePolicy) Reset() { *x = MessageStoragePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageStoragePolicy) String() string { @@ -545,7 +543,7 @@ func (*MessageStoragePolicy) ProtoMessage() {} func (x *MessageStoragePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,11 +597,9 @@ type SchemaSettings struct { func (x *SchemaSettings) Reset() { *x = SchemaSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaSettings) String() string { @@ -614,7 +610,7 @@ func (*SchemaSettings) ProtoMessage() {} func (x *SchemaSettings) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +673,9 @@ type IngestionDataSourceSettings struct { func (x *IngestionDataSourceSettings) Reset() { *x = IngestionDataSourceSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings) String() string { @@ -692,7 +686,7 @@ func (*IngestionDataSourceSettings) ProtoMessage() {} func (x *IngestionDataSourceSettings) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +759,9 @@ type PlatformLogsSettings struct { func (x *PlatformLogsSettings) Reset() { *x = PlatformLogsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlatformLogsSettings) String() string { @@ -780,7 +772,7 @@ func (*PlatformLogsSettings) ProtoMessage() {} func (x *PlatformLogsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +814,9 @@ type IngestionFailureEvent struct { func (x *IngestionFailureEvent) Reset() { *x = IngestionFailureEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionFailureEvent) String() string { @@ -837,7 +827,7 @@ func (*IngestionFailureEvent) ProtoMessage() {} func (x *IngestionFailureEvent) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +929,9 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic) String() string { @@ -954,7 +942,7 @@ func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1062,9 @@ type PubsubMessage struct { func (x *PubsubMessage) Reset() { *x = PubsubMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubMessage) String() string { @@ -1089,7 +1075,7 @@ func (*PubsubMessage) ProtoMessage() {} func (x *PubsubMessage) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1152,11 +1138,9 @@ type GetTopicRequest struct { func (x *GetTopicRequest) Reset() { *x = GetTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTopicRequest) String() string { @@ -1167,7 +1151,7 @@ func (*GetTopicRequest) ProtoMessage() {} func (x *GetTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1191,9 @@ type UpdateTopicRequest struct { func (x *UpdateTopicRequest) Reset() { *x = UpdateTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTopicRequest) String() string { @@ -1222,7 +1204,7 @@ func (*UpdateTopicRequest) ProtoMessage() {} func (x *UpdateTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1266,11 +1248,9 @@ type PublishRequest struct { func (x *PublishRequest) Reset() { *x = PublishRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishRequest) String() string { @@ -1281,7 +1261,7 @@ func (*PublishRequest) ProtoMessage() {} func (x *PublishRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1324,11 +1304,9 @@ type PublishResponse struct { func (x *PublishResponse) Reset() { *x = PublishResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishResponse) String() string { @@ -1339,7 +1317,7 @@ func (*PublishResponse) ProtoMessage() {} func (x *PublishResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1358,9 @@ type ListTopicsRequest struct { func (x *ListTopicsRequest) Reset() { *x = ListTopicsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsRequest) String() string { @@ -1395,7 +1371,7 @@ func (*ListTopicsRequest) ProtoMessage() {} func (x *ListTopicsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,11 +1422,9 @@ type ListTopicsResponse struct { func (x *ListTopicsResponse) Reset() { *x = ListTopicsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsResponse) String() string { @@ -1461,7 +1435,7 @@ func (*ListTopicsResponse) ProtoMessage() {} func (x *ListTopicsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1509,11 +1483,9 @@ type ListTopicSubscriptionsRequest struct { func (x *ListTopicSubscriptionsRequest) Reset() { *x = ListTopicSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSubscriptionsRequest) String() string { @@ -1524,7 +1496,7 @@ func (*ListTopicSubscriptionsRequest) ProtoMessage() {} func (x *ListTopicSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1577,11 +1549,9 @@ type ListTopicSubscriptionsResponse struct { func (x *ListTopicSubscriptionsResponse) Reset() { *x = ListTopicSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSubscriptionsResponse) String() string { @@ -1592,7 +1562,7 @@ func (*ListTopicSubscriptionsResponse) ProtoMessage() {} func (x *ListTopicSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1640,11 +1610,9 @@ type ListTopicSnapshotsRequest struct { func (x *ListTopicSnapshotsRequest) Reset() { *x = ListTopicSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSnapshotsRequest) String() string { @@ -1655,7 +1623,7 @@ func (*ListTopicSnapshotsRequest) ProtoMessage() {} func (x *ListTopicSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1675,9 @@ type ListTopicSnapshotsResponse struct { func (x *ListTopicSnapshotsResponse) Reset() { *x = ListTopicSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSnapshotsResponse) String() string { @@ -1722,7 +1688,7 @@ func (*ListTopicSnapshotsResponse) ProtoMessage() {} func (x *ListTopicSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1764,11 +1730,9 @@ type DeleteTopicRequest struct { func (x *DeleteTopicRequest) Reset() { *x = DeleteTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTopicRequest) String() string { @@ -1779,7 +1743,7 @@ func (*DeleteTopicRequest) ProtoMessage() {} func (x *DeleteTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1814,11 +1778,9 @@ type DetachSubscriptionRequest struct { func (x *DetachSubscriptionRequest) Reset() { *x = DetachSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachSubscriptionRequest) String() string { @@ -1829,7 +1791,7 @@ func (*DetachSubscriptionRequest) ProtoMessage() {} func (x *DetachSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1861,11 +1823,9 @@ type DetachSubscriptionResponse struct { func (x *DetachSubscriptionResponse) Reset() { *x = DetachSubscriptionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetachSubscriptionResponse) String() string { @@ -1876,7 +1836,7 @@ func (*DetachSubscriptionResponse) ProtoMessage() {} func (x *DetachSubscriptionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2028,11 +1988,9 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription) String() string { @@ -2043,7 +2001,7 @@ func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2218,11 +2176,9 @@ type RetryPolicy struct { func (x *RetryPolicy) Reset() { *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryPolicy) String() string { @@ -2233,7 +2189,7 @@ func (*RetryPolicy) ProtoMessage() {} func (x *RetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2300,11 +2256,9 @@ type DeadLetterPolicy struct { func (x *DeadLetterPolicy) Reset() { *x = DeadLetterPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeadLetterPolicy) String() string { @@ -2315,7 +2269,7 @@ func (*DeadLetterPolicy) ProtoMessage() {} func (x *DeadLetterPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2362,11 +2316,9 @@ type ExpirationPolicy struct { func (x *ExpirationPolicy) Reset() { *x = ExpirationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpirationPolicy) String() string { @@ -2377,7 +2329,7 @@ func (*ExpirationPolicy) ProtoMessage() {} func (x *ExpirationPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2452,11 +2404,9 @@ type PushConfig struct { func (x *PushConfig) Reset() { *x = PushConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushConfig) String() string { @@ -2467,7 +2417,7 @@ func (*PushConfig) ProtoMessage() {} func (x *PushConfig) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2607,11 +2557,9 @@ type BigQueryConfig struct { func (x *BigQueryConfig) Reset() { *x = BigQueryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryConfig) String() string { @@ -2622,7 +2570,7 @@ func (*BigQueryConfig) ProtoMessage() {} func (x *BigQueryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2740,11 +2688,9 @@ type CloudStorageConfig struct { func (x *CloudStorageConfig) Reset() { *x = CloudStorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageConfig) String() string { @@ -2755,7 +2701,7 @@ func (*CloudStorageConfig) ProtoMessage() {} func (x *CloudStorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2905,11 +2851,9 @@ type ReceivedMessage struct { func (x *ReceivedMessage) Reset() { *x = ReceivedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceivedMessage) String() string { @@ -2920,7 +2864,7 @@ func (*ReceivedMessage) ProtoMessage() {} func (x *ReceivedMessage) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,11 +2913,9 @@ type GetSubscriptionRequest struct { func (x *GetSubscriptionRequest) Reset() { *x = GetSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubscriptionRequest) String() string { @@ -2984,7 +2926,7 @@ func (*GetSubscriptionRequest) ProtoMessage() {} func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +2963,9 @@ type UpdateSubscriptionRequest struct { func (x *UpdateSubscriptionRequest) Reset() { *x = UpdateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubscriptionRequest) String() string { @@ -3036,7 +2976,7 @@ func (*UpdateSubscriptionRequest) ProtoMessage() {} func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3084,11 +3024,9 @@ type ListSubscriptionsRequest struct { func (x *ListSubscriptionsRequest) Reset() { *x = ListSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsRequest) String() string { @@ -3099,7 +3037,7 @@ func (*ListSubscriptionsRequest) ProtoMessage() {} func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3151,11 +3089,9 @@ type ListSubscriptionsResponse struct { func (x *ListSubscriptionsResponse) Reset() { *x = ListSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsResponse) String() string { @@ -3166,7 +3102,7 @@ func (*ListSubscriptionsResponse) ProtoMessage() {} func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3208,11 +3144,9 @@ type DeleteSubscriptionRequest struct { func (x *DeleteSubscriptionRequest) Reset() { *x = DeleteSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubscriptionRequest) String() string { @@ -3223,7 +3157,7 @@ func (*DeleteSubscriptionRequest) ProtoMessage() {} func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3265,11 +3199,9 @@ type ModifyPushConfigRequest struct { func (x *ModifyPushConfigRequest) Reset() { *x = ModifyPushConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyPushConfigRequest) String() string { @@ -3280,7 +3212,7 @@ func (*ModifyPushConfigRequest) ProtoMessage() {} func (x *ModifyPushConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3336,11 +3268,9 @@ type PullRequest struct { func (x *PullRequest) Reset() { *x = PullRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullRequest) String() string { @@ -3351,7 +3281,7 @@ func (*PullRequest) ProtoMessage() {} func (x *PullRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3404,11 +3334,9 @@ type PullResponse struct { func (x *PullResponse) Reset() { *x = PullResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PullResponse) String() string { @@ -3419,7 +3347,7 @@ func (*PullResponse) ProtoMessage() {} func (x *PullResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3466,11 +3394,9 @@ type ModifyAckDeadlineRequest struct { func (x *ModifyAckDeadlineRequest) Reset() { *x = ModifyAckDeadlineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModifyAckDeadlineRequest) String() string { @@ -3481,7 +3407,7 @@ func (*ModifyAckDeadlineRequest) ProtoMessage() {} func (x *ModifyAckDeadlineRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3534,11 +3460,9 @@ type AcknowledgeRequest struct { func (x *AcknowledgeRequest) Reset() { *x = AcknowledgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcknowledgeRequest) String() string { @@ -3549,7 +3473,7 @@ func (*AcknowledgeRequest) ProtoMessage() {} func (x *AcknowledgeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3652,11 +3576,9 @@ type StreamingPullRequest struct { func (x *StreamingPullRequest) Reset() { *x = StreamingPullRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPullRequest) String() string { @@ -3667,7 +3589,7 @@ func (*StreamingPullRequest) ProtoMessage() {} func (x *StreamingPullRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3759,11 +3681,9 @@ type StreamingPullResponse struct { func (x *StreamingPullResponse) Reset() { *x = StreamingPullResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPullResponse) String() string { @@ -3774,7 +3694,7 @@ func (*StreamingPullResponse) ProtoMessage() {} func (x *StreamingPullResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3849,11 +3769,9 @@ type CreateSnapshotRequest struct { func (x *CreateSnapshotRequest) Reset() { *x = CreateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSnapshotRequest) String() string { @@ -3864,7 +3782,7 @@ func (*CreateSnapshotRequest) ProtoMessage() {} func (x *CreateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3915,11 +3833,9 @@ type UpdateSnapshotRequest struct { func (x *UpdateSnapshotRequest) Reset() { *x = UpdateSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSnapshotRequest) String() string { @@ -3930,7 +3846,7 @@ func (*UpdateSnapshotRequest) ProtoMessage() {} func (x *UpdateSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3992,11 +3908,9 @@ type Snapshot struct { func (x *Snapshot) Reset() { *x = Snapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Snapshot) String() string { @@ -4007,7 +3921,7 @@ func (*Snapshot) ProtoMessage() {} func (x *Snapshot) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4063,11 +3977,9 @@ type GetSnapshotRequest struct { func (x *GetSnapshotRequest) Reset() { *x = GetSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSnapshotRequest) String() string { @@ -4078,7 +3990,7 @@ func (*GetSnapshotRequest) ProtoMessage() {} func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4119,11 +4031,9 @@ type ListSnapshotsRequest struct { func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { @@ -4134,7 +4044,7 @@ func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4186,11 +4096,9 @@ type ListSnapshotsResponse struct { func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { @@ -4201,7 +4109,7 @@ func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4243,11 +4151,9 @@ type DeleteSnapshotRequest struct { func (x *DeleteSnapshotRequest) Reset() { *x = DeleteSnapshotRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSnapshotRequest) String() string { @@ -4258,7 +4164,7 @@ func (*DeleteSnapshotRequest) ProtoMessage() {} func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4297,11 +4203,9 @@ type SeekRequest struct { func (x *SeekRequest) Reset() { *x = SeekRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekRequest) String() string { @@ -4312,7 +4216,7 @@ func (*SeekRequest) ProtoMessage() {} func (x *SeekRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4394,11 +4298,9 @@ type SeekResponse struct { func (x *SeekResponse) Reset() { *x = SeekResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekResponse) String() string { @@ -4409,7 +4311,7 @@ func (*SeekResponse) ProtoMessage() {} func (x *SeekResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4451,11 +4353,9 @@ type IngestionDataSourceSettings_AwsKinesis struct { func (x *IngestionDataSourceSettings_AwsKinesis) Reset() { *x = IngestionDataSourceSettings_AwsKinesis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings_AwsKinesis) String() string { @@ -4466,7 +4366,7 @@ func (*IngestionDataSourceSettings_AwsKinesis) ProtoMessage() {} func (x *IngestionDataSourceSettings_AwsKinesis) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4548,11 +4448,9 @@ type IngestionDataSourceSettings_CloudStorage struct { func (x *IngestionDataSourceSettings_CloudStorage) Reset() { *x = IngestionDataSourceSettings_CloudStorage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings_CloudStorage) String() string { @@ -4563,7 +4461,7 @@ func (*IngestionDataSourceSettings_CloudStorage) ProtoMessage() {} func (x *IngestionDataSourceSettings_CloudStorage) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4678,11 +4576,9 @@ type IngestionDataSourceSettings_CloudStorage_TextFormat struct { func (x *IngestionDataSourceSettings_CloudStorage_TextFormat) Reset() { *x = IngestionDataSourceSettings_CloudStorage_TextFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings_CloudStorage_TextFormat) String() string { @@ -4693,7 +4589,7 @@ func (*IngestionDataSourceSettings_CloudStorage_TextFormat) ProtoMessage() {} func (x *IngestionDataSourceSettings_CloudStorage_TextFormat) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4726,11 +4622,9 @@ type IngestionDataSourceSettings_CloudStorage_AvroFormat struct { func (x *IngestionDataSourceSettings_CloudStorage_AvroFormat) Reset() { *x = IngestionDataSourceSettings_CloudStorage_AvroFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings_CloudStorage_AvroFormat) String() string { @@ -4741,7 +4635,7 @@ func (*IngestionDataSourceSettings_CloudStorage_AvroFormat) ProtoMessage() {} func (x *IngestionDataSourceSettings_CloudStorage_AvroFormat) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4768,11 +4662,9 @@ type IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat struct { func (x *IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat) Reset() { *x = IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat) String() string { @@ -4783,7 +4675,7 @@ func (*IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat) ProtoMessage() func (x *IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4814,11 +4706,9 @@ type IngestionFailureEvent_ApiViolationReason struct { func (x *IngestionFailureEvent_ApiViolationReason) Reset() { *x = IngestionFailureEvent_ApiViolationReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionFailureEvent_ApiViolationReason) String() string { @@ -4829,7 +4719,7 @@ func (*IngestionFailureEvent_ApiViolationReason) ProtoMessage() {} func (x *IngestionFailureEvent_ApiViolationReason) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4854,11 +4744,9 @@ type IngestionFailureEvent_AvroFailureReason struct { func (x *IngestionFailureEvent_AvroFailureReason) Reset() { *x = IngestionFailureEvent_AvroFailureReason{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionFailureEvent_AvroFailureReason) String() string { @@ -4869,7 +4757,7 @@ func (*IngestionFailureEvent_AvroFailureReason) ProtoMessage() {} func (x *IngestionFailureEvent_AvroFailureReason) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4909,11 +4797,9 @@ type IngestionFailureEvent_CloudStorageFailure struct { func (x *IngestionFailureEvent_CloudStorageFailure) Reset() { *x = IngestionFailureEvent_CloudStorageFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestionFailureEvent_CloudStorageFailure) String() string { @@ -4924,7 +4810,7 @@ func (*IngestionFailureEvent_CloudStorageFailure) ProtoMessage() {} func (x *IngestionFailureEvent_CloudStorageFailure) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5021,11 +4907,9 @@ type Subscription_AnalyticsHubSubscriptionInfo struct { func (x *Subscription_AnalyticsHubSubscriptionInfo) Reset() { *x = Subscription_AnalyticsHubSubscriptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription_AnalyticsHubSubscriptionInfo) String() string { @@ -5036,7 +4920,7 @@ func (*Subscription_AnalyticsHubSubscriptionInfo) ProtoMessage() {} func (x *Subscription_AnalyticsHubSubscriptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5091,11 +4975,9 @@ type PushConfig_OidcToken struct { func (x *PushConfig_OidcToken) Reset() { *x = PushConfig_OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushConfig_OidcToken) String() string { @@ -5106,7 +4988,7 @@ func (*PushConfig_OidcToken) ProtoMessage() {} func (x *PushConfig_OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5146,11 +5028,9 @@ type PushConfig_PubsubWrapper struct { func (x *PushConfig_PubsubWrapper) Reset() { *x = PushConfig_PubsubWrapper{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushConfig_PubsubWrapper) String() string { @@ -5161,7 +5041,7 @@ func (*PushConfig_PubsubWrapper) ProtoMessage() {} func (x *PushConfig_PubsubWrapper) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5190,11 +5070,9 @@ type PushConfig_NoWrapper struct { func (x *PushConfig_NoWrapper) Reset() { *x = PushConfig_NoWrapper{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PushConfig_NoWrapper) String() string { @@ -5205,7 +5083,7 @@ func (*PushConfig_NoWrapper) ProtoMessage() {} func (x *PushConfig_NoWrapper) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5238,11 +5116,9 @@ type CloudStorageConfig_TextConfig struct { func (x *CloudStorageConfig_TextConfig) Reset() { *x = CloudStorageConfig_TextConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageConfig_TextConfig) String() string { @@ -5253,7 +5129,7 @@ func (*CloudStorageConfig_TextConfig) ProtoMessage() {} func (x *CloudStorageConfig_TextConfig) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5289,11 +5165,9 @@ type CloudStorageConfig_AvroConfig struct { func (x *CloudStorageConfig_AvroConfig) Reset() { *x = CloudStorageConfig_AvroConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageConfig_AvroConfig) String() string { @@ -5304,7 +5178,7 @@ func (*CloudStorageConfig_AvroConfig) ProtoMessage() {} func (x *CloudStorageConfig_AvroConfig) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5354,11 +5228,9 @@ type StreamingPullResponse_AcknowledgeConfirmation struct { func (x *StreamingPullResponse_AcknowledgeConfirmation) Reset() { *x = StreamingPullResponse_AcknowledgeConfirmation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPullResponse_AcknowledgeConfirmation) String() string { @@ -5369,7 +5241,7 @@ func (*StreamingPullResponse_AcknowledgeConfirmation) ProtoMessage() {} func (x *StreamingPullResponse_AcknowledgeConfirmation) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5431,11 +5303,9 @@ type StreamingPullResponse_ModifyAckDeadlineConfirmation struct { func (x *StreamingPullResponse_ModifyAckDeadlineConfirmation) Reset() { *x = StreamingPullResponse_ModifyAckDeadlineConfirmation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPullResponse_ModifyAckDeadlineConfirmation) String() string { @@ -5446,7 +5316,7 @@ func (*StreamingPullResponse_ModifyAckDeadlineConfirmation) ProtoMessage() {} func (x *StreamingPullResponse_ModifyAckDeadlineConfirmation) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5497,11 +5367,9 @@ type StreamingPullResponse_SubscriptionProperties struct { func (x *StreamingPullResponse_SubscriptionProperties) Reset() { *x = StreamingPullResponse_SubscriptionProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingPullResponse_SubscriptionProperties) String() string { @@ -5512,7 +5380,7 @@ func (*StreamingPullResponse_SubscriptionProperties) ProtoMessage() {} func (x *StreamingPullResponse_SubscriptionProperties) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_pubsub_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6980,800 +6848,6 @@ func file_google_pubsub_v1_pubsub_proto_init() { return } file_google_pubsub_v1_schema_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_pubsub_v1_pubsub_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MessageStoragePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SchemaSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PlatformLogsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*IngestionFailureEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PubsubMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PublishRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PublishResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DetachSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DetachSubscriptionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeadLetterPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ExpirationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*PushConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ReceivedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ModifyPushConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*PullRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*PullResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ModifyAckDeadlineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*AcknowledgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPullRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPullResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CreateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Snapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*GetSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListSnapshotsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSnapshotRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*SeekRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*SeekResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings_AwsKinesis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings_CloudStorage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings_CloudStorage_TextFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings_CloudStorage_AvroFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*IngestionDataSourceSettings_CloudStorage_PubSubAvroFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*IngestionFailureEvent_ApiViolationReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*IngestionFailureEvent_AvroFailureReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*IngestionFailureEvent_CloudStorageFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*Subscription_AnalyticsHubSubscriptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*PushConfig_OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*PushConfig_PubsubWrapper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*PushConfig_NoWrapper); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageConfig_TextConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageConfig_AvroConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPullResponse_AcknowledgeConfirmation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPullResponse_ModifyAckDeadlineConfirmation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_pubsub_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*StreamingPullResponse_SubscriptionProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_pubsub_v1_pubsub_proto_msgTypes[2].OneofWrappers = []any{ (*IngestionDataSourceSettings_AwsKinesis_)(nil), (*IngestionDataSourceSettings_CloudStorage_)(nil), diff --git a/pubsub/apiv1/pubsubpb/schema.pb.go b/pubsub/apiv1/pubsubpb/schema.pb.go index 8b46af881667..adacafd61993 100755 --- a/pubsub/apiv1/pubsubpb/schema.pb.go +++ b/pubsub/apiv1/pubsubpb/schema.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/pubsub/v1/schema.proto @@ -226,11 +226,9 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schema) String() string { @@ -241,7 +239,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +314,9 @@ type CreateSchemaRequest struct { func (x *CreateSchemaRequest) Reset() { *x = CreateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSchemaRequest) String() string { @@ -331,7 +327,7 @@ func (*CreateSchemaRequest) ProtoMessage() {} func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -383,11 +379,9 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSchemaRequest) String() string { @@ -398,7 +392,7 @@ func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +444,9 @@ type ListSchemasRequest struct { func (x *ListSchemasRequest) Reset() { *x = ListSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasRequest) String() string { @@ -465,7 +457,7 @@ func (*ListSchemasRequest) ProtoMessage() {} func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +515,9 @@ type ListSchemasResponse struct { func (x *ListSchemasResponse) Reset() { *x = ListSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemasResponse) String() string { @@ -538,7 +528,7 @@ func (*ListSchemasResponse) ProtoMessage() {} func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +578,9 @@ type ListSchemaRevisionsRequest struct { func (x *ListSchemaRevisionsRequest) Reset() { *x = ListSchemaRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemaRevisionsRequest) String() string { @@ -603,7 +591,7 @@ func (*ListSchemaRevisionsRequest) ProtoMessage() {} func (x *ListSchemaRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +649,9 @@ type ListSchemaRevisionsResponse struct { func (x *ListSchemaRevisionsResponse) Reset() { *x = ListSchemaRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSchemaRevisionsResponse) String() string { @@ -676,7 +662,7 @@ func (*ListSchemaRevisionsResponse) ProtoMessage() {} func (x *ListSchemaRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +706,9 @@ type CommitSchemaRequest struct { func (x *CommitSchemaRequest) Reset() { *x = CommitSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitSchemaRequest) String() string { @@ -735,7 +719,7 @@ func (*CommitSchemaRequest) ProtoMessage() {} func (x *CommitSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +765,9 @@ type RollbackSchemaRequest struct { func (x *RollbackSchemaRequest) Reset() { *x = RollbackSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackSchemaRequest) String() string { @@ -796,7 +778,7 @@ func (*RollbackSchemaRequest) ProtoMessage() {} func (x *RollbackSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +828,9 @@ type DeleteSchemaRevisionRequest struct { func (x *DeleteSchemaRevisionRequest) Reset() { *x = DeleteSchemaRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaRevisionRequest) String() string { @@ -861,7 +841,7 @@ func (*DeleteSchemaRevisionRequest) ProtoMessage() {} func (x *DeleteSchemaRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +884,9 @@ type DeleteSchemaRequest struct { func (x *DeleteSchemaRequest) Reset() { *x = DeleteSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSchemaRequest) String() string { @@ -919,7 +897,7 @@ func (*DeleteSchemaRequest) ProtoMessage() {} func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +934,9 @@ type ValidateSchemaRequest struct { func (x *ValidateSchemaRequest) Reset() { *x = ValidateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateSchemaRequest) String() string { @@ -971,7 +947,7 @@ func (*ValidateSchemaRequest) ProtoMessage() {} func (x *ValidateSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +986,9 @@ type ValidateSchemaResponse struct { func (x *ValidateSchemaResponse) Reset() { *x = ValidateSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateSchemaResponse) String() string { @@ -1025,7 +999,7 @@ func (*ValidateSchemaResponse) ProtoMessage() {} func (x *ValidateSchemaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1036,9 @@ type ValidateMessageRequest struct { func (x *ValidateMessageRequest) Reset() { *x = ValidateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateMessageRequest) String() string { @@ -1077,7 +1049,7 @@ func (*ValidateMessageRequest) ProtoMessage() {} func (x *ValidateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1136,9 @@ type ValidateMessageResponse struct { func (x *ValidateMessageResponse) Reset() { *x = ValidateMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_pubsub_v1_schema_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_pubsub_v1_schema_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateMessageResponse) String() string { @@ -1179,7 +1149,7 @@ func (*ValidateMessageResponse) ProtoMessage() {} func (x *ValidateMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_pubsub_v1_schema_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1563,188 +1533,6 @@ func file_google_pubsub_v1_schema_proto_init() { if File_google_pubsub_v1_schema_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_pubsub_v1_schema_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemaRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSchemaRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CommitSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RollbackSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ValidateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ValidateSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ValidateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_pubsub_v1_schema_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ValidateMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_pubsub_v1_schema_proto_msgTypes[13].OneofWrappers = []any{ (*ValidateMessageRequest_Name)(nil), (*ValidateMessageRequest_Schema)(nil), diff --git a/pubsub/apiv1/schema_client.go b/pubsub/apiv1/schema_client.go index 18ea325b8528..0fd29804bb8e 100755 --- a/pubsub/apiv1/schema_client.go +++ b/pubsub/apiv1/schema_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -469,6 +468,8 @@ type schemaGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSchemaClient creates a new schema service client based on gRPC. @@ -495,6 +496,7 @@ func NewSchemaClient(ctx context.Context, opts ...option.ClientOption) (*SchemaC connPool: connPool, schemaClient: pubsubpb.NewSchemaServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } c.setGoogleClientInfo() @@ -542,6 +544,8 @@ type schemaRESTClient struct { // Points back to the CallOptions field of the containing SchemaClient CallOptions **SchemaCallOptions + + logger *slog.Logger } // NewSchemaRESTClient creates a new schema service rest client. @@ -559,6 +563,7 @@ func NewSchemaRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sch endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -611,7 +616,7 @@ func (c *schemaGRPCClient) CreateSchema(ctx context.Context, req *pubsubpb.Creat var resp *pubsubpb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.CreateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.CreateSchema, req, settings.GRPC, c.logger, "CreateSchema") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *schemaGRPCClient) GetSchema(ctx context.Context, req *pubsubpb.GetSchem var resp *pubsubpb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.GetSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.GetSchema, req, settings.GRPC, c.logger, "GetSchema") return err }, opts...) if err != nil { @@ -658,7 +663,7 @@ func (c *schemaGRPCClient) ListSchemas(ctx context.Context, req *pubsubpb.ListSc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ListSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ListSchemas, req, settings.GRPC, c.logger, "ListSchemas") return err }, opts...) if err != nil { @@ -704,7 +709,7 @@ func (c *schemaGRPCClient) ListSchemaRevisions(ctx context.Context, req *pubsubp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ListSchemaRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ListSchemaRevisions, req, settings.GRPC, c.logger, "ListSchemaRevisions") return err }, opts...) if err != nil { @@ -739,7 +744,7 @@ func (c *schemaGRPCClient) CommitSchema(ctx context.Context, req *pubsubpb.Commi var resp *pubsubpb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.CommitSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.CommitSchema, req, settings.GRPC, c.logger, "CommitSchema") return err }, opts...) if err != nil { @@ -757,7 +762,7 @@ func (c *schemaGRPCClient) RollbackSchema(ctx context.Context, req *pubsubpb.Rol var resp *pubsubpb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.RollbackSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.RollbackSchema, req, settings.GRPC, c.logger, "RollbackSchema") return err }, opts...) if err != nil { @@ -775,7 +780,7 @@ func (c *schemaGRPCClient) DeleteSchemaRevision(ctx context.Context, req *pubsub var resp *pubsubpb.Schema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.DeleteSchemaRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.DeleteSchemaRevision, req, settings.GRPC, c.logger, "DeleteSchemaRevision") return err }, opts...) if err != nil { @@ -792,7 +797,7 @@ func (c *schemaGRPCClient) DeleteSchema(ctx context.Context, req *pubsubpb.Delet opts = append((*c.CallOptions).DeleteSchema[0:len((*c.CallOptions).DeleteSchema):len((*c.CallOptions).DeleteSchema)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.schemaClient.DeleteSchema(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.schemaClient.DeleteSchema, req, settings.GRPC, c.logger, "DeleteSchema") return err }, opts...) return err @@ -807,7 +812,7 @@ func (c *schemaGRPCClient) ValidateSchema(ctx context.Context, req *pubsubpb.Val var resp *pubsubpb.ValidateSchemaResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ValidateSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ValidateSchema, req, settings.GRPC, c.logger, "ValidateSchema") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *schemaGRPCClient) ValidateMessage(ctx context.Context, req *pubsubpb.Va var resp *pubsubpb.ValidateMessageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.schemaClient.ValidateMessage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.schemaClient.ValidateMessage, req, settings.GRPC, c.logger, "ValidateMessage") return err }, opts...) if err != nil { @@ -843,7 +848,7 @@ func (c *schemaGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -861,7 +866,7 @@ func (c *schemaGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPo var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -879,7 +884,7 @@ func (c *schemaGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Te var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -931,17 +936,7 @@ func (c *schemaRESTClient) CreateSchema(ctx context.Context, req *pubsubpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSchema") if err != nil { return err } @@ -994,17 +989,7 @@ func (c *schemaRESTClient) GetSchema(ctx context.Context, req *pubsubpb.GetSchem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSchema") if err != nil { return err } @@ -1069,21 +1054,10 @@ func (c *schemaRESTClient) ListSchemas(ctx context.Context, req *pubsubpb.ListSc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1161,21 +1135,10 @@ func (c *schemaRESTClient) ListSchemaRevisions(ctx context.Context, req *pubsubp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSchemaRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1244,17 +1207,7 @@ func (c *schemaRESTClient) CommitSchema(ctx context.Context, req *pubsubpb.Commi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CommitSchema") if err != nil { return err } @@ -1310,17 +1263,7 @@ func (c *schemaRESTClient) RollbackSchema(ctx context.Context, req *pubsubpb.Rol httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackSchema") if err != nil { return err } @@ -1373,17 +1316,7 @@ func (c *schemaRESTClient) DeleteSchemaRevision(ctx context.Context, req *pubsub httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchemaRevision") if err != nil { return err } @@ -1430,15 +1363,8 @@ func (c *schemaRESTClient) DeleteSchema(ctx context.Context, req *pubsubpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSchema") + return err }, opts...) } @@ -1481,17 +1407,7 @@ func (c *schemaRESTClient) ValidateSchema(ctx context.Context, req *pubsubpb.Val httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateSchema") if err != nil { return err } @@ -1547,17 +1463,7 @@ func (c *schemaRESTClient) ValidateMessage(ctx context.Context, req *pubsubpb.Va httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateMessage") if err != nil { return err } @@ -1611,17 +1517,7 @@ func (c *schemaRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1681,17 +1577,7 @@ func (c *schemaRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1753,17 +1639,7 @@ func (c *schemaRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Te httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/pubsub/apiv1/schema_client_example_go123_test.go b/pubsub/apiv1/schema_client_example_go123_test.go index e641823ab801..c11f9f0c5027 100644 --- a/pubsub/apiv1/schema_client_example_go123_test.go +++ b/pubsub/apiv1/schema_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSchemaClient_ListSchemaRevisions_all() { } for resp, err := range c.ListSchemaRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSchemaClient_ListSchemas_all() { } for resp, err := range c.ListSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsub/apiv1/subscriber_client.go b/pubsub/apiv1/subscriber_client.go index 6b673129277a..38dc0fcb34e6 100755 --- a/pubsub/apiv1/subscriber_client.go +++ b/pubsub/apiv1/subscriber_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -769,6 +768,8 @@ type subscriberGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSubscriberClient creates a new subscriber client based on gRPC. @@ -797,6 +798,7 @@ func NewSubscriberClient(ctx context.Context, opts ...option.ClientOption) (*Sub connPool: connPool, subscriberClient: pubsubpb.NewSubscriberClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } c.setGoogleClientInfo() @@ -844,6 +846,8 @@ type subscriberRESTClient struct { // Points back to the CallOptions field of the containing SubscriberClient CallOptions **SubscriberCallOptions + + logger *slog.Logger } // NewSubscriberRESTClient creates a new subscriber rest client. @@ -863,6 +867,7 @@ func NewSubscriberRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -915,7 +920,7 @@ func (c *subscriberGRPCClient) CreateSubscription(ctx context.Context, req *pubs var resp *pubsubpb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.CreateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.CreateSubscription, req, settings.GRPC, c.logger, "CreateSubscription") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *subscriberGRPCClient) GetSubscription(ctx context.Context, req *pubsubp var resp *pubsubpb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.GetSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.GetSubscription, req, settings.GRPC, c.logger, "GetSubscription") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *subscriberGRPCClient) UpdateSubscription(ctx context.Context, req *pubs var resp *pubsubpb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.UpdateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.UpdateSubscription, req, settings.GRPC, c.logger, "UpdateSubscription") return err }, opts...) if err != nil { @@ -980,7 +985,7 @@ func (c *subscriberGRPCClient) ListSubscriptions(ctx context.Context, req *pubsu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.ListSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.ListSubscriptions, req, settings.GRPC, c.logger, "ListSubscriptions") return err }, opts...) if err != nil { @@ -1014,7 +1019,7 @@ func (c *subscriberGRPCClient) DeleteSubscription(ctx context.Context, req *pubs opts = append((*c.CallOptions).DeleteSubscription[0:len((*c.CallOptions).DeleteSubscription):len((*c.CallOptions).DeleteSubscription)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.subscriberClient.DeleteSubscription(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.subscriberClient.DeleteSubscription, req, settings.GRPC, c.logger, "DeleteSubscription") return err }, opts...) return err @@ -1028,7 +1033,7 @@ func (c *subscriberGRPCClient) ModifyAckDeadline(ctx context.Context, req *pubsu opts = append((*c.CallOptions).ModifyAckDeadline[0:len((*c.CallOptions).ModifyAckDeadline):len((*c.CallOptions).ModifyAckDeadline)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.subscriberClient.ModifyAckDeadline(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.subscriberClient.ModifyAckDeadline, req, settings.GRPC, c.logger, "ModifyAckDeadline") return err }, opts...) return err @@ -1042,7 +1047,7 @@ func (c *subscriberGRPCClient) Acknowledge(ctx context.Context, req *pubsubpb.Ac opts = append((*c.CallOptions).Acknowledge[0:len((*c.CallOptions).Acknowledge):len((*c.CallOptions).Acknowledge)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.subscriberClient.Acknowledge(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.subscriberClient.Acknowledge, req, settings.GRPC, c.logger, "Acknowledge") return err }, opts...) return err @@ -1057,7 +1062,7 @@ func (c *subscriberGRPCClient) Pull(ctx context.Context, req *pubsubpb.PullReque var resp *pubsubpb.PullResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.Pull(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.Pull, req, settings.GRPC, c.logger, "Pull") return err }, opts...) if err != nil { @@ -1072,7 +1077,9 @@ func (c *subscriberGRPCClient) StreamingPull(ctx context.Context, opts ...gax.Ca opts = append((*c.CallOptions).StreamingPull[0:len((*c.CallOptions).StreamingPull):len((*c.CallOptions).StreamingPull)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingPull") resp, err = c.subscriberClient.StreamingPull(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingPull") return err }, opts...) if err != nil { @@ -1089,7 +1096,7 @@ func (c *subscriberGRPCClient) ModifyPushConfig(ctx context.Context, req *pubsub opts = append((*c.CallOptions).ModifyPushConfig[0:len((*c.CallOptions).ModifyPushConfig):len((*c.CallOptions).ModifyPushConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.subscriberClient.ModifyPushConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.subscriberClient.ModifyPushConfig, req, settings.GRPC, c.logger, "ModifyPushConfig") return err }, opts...) return err @@ -1104,7 +1111,7 @@ func (c *subscriberGRPCClient) GetSnapshot(ctx context.Context, req *pubsubpb.Ge var resp *pubsubpb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.GetSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.GetSnapshot, req, settings.GRPC, c.logger, "GetSnapshot") return err }, opts...) if err != nil { @@ -1133,7 +1140,7 @@ func (c *subscriberGRPCClient) ListSnapshots(ctx context.Context, req *pubsubpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.ListSnapshots(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.ListSnapshots, req, settings.GRPC, c.logger, "ListSnapshots") return err }, opts...) if err != nil { @@ -1168,7 +1175,7 @@ func (c *subscriberGRPCClient) CreateSnapshot(ctx context.Context, req *pubsubpb var resp *pubsubpb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.CreateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.CreateSnapshot, req, settings.GRPC, c.logger, "CreateSnapshot") return err }, opts...) if err != nil { @@ -1186,7 +1193,7 @@ func (c *subscriberGRPCClient) UpdateSnapshot(ctx context.Context, req *pubsubpb var resp *pubsubpb.Snapshot err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.UpdateSnapshot(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.UpdateSnapshot, req, settings.GRPC, c.logger, "UpdateSnapshot") return err }, opts...) if err != nil { @@ -1203,7 +1210,7 @@ func (c *subscriberGRPCClient) DeleteSnapshot(ctx context.Context, req *pubsubpb opts = append((*c.CallOptions).DeleteSnapshot[0:len((*c.CallOptions).DeleteSnapshot):len((*c.CallOptions).DeleteSnapshot)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.subscriberClient.DeleteSnapshot(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.subscriberClient.DeleteSnapshot, req, settings.GRPC, c.logger, "DeleteSnapshot") return err }, opts...) return err @@ -1218,7 +1225,7 @@ func (c *subscriberGRPCClient) Seek(ctx context.Context, req *pubsubpb.SeekReque var resp *pubsubpb.SeekResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.subscriberClient.Seek(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.subscriberClient.Seek, req, settings.GRPC, c.logger, "Seek") return err }, opts...) if err != nil { @@ -1236,7 +1243,7 @@ func (c *subscriberGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1254,7 +1261,7 @@ func (c *subscriberGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetI var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1272,7 +1279,7 @@ func (c *subscriberGRPCClient) TestIamPermissions(ctx context.Context, req *iamp var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1330,17 +1337,7 @@ func (c *subscriberRESTClient) CreateSubscription(ctx context.Context, req *pubs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSubscription") if err != nil { return err } @@ -1390,17 +1387,7 @@ func (c *subscriberRESTClient) GetSubscription(ctx context.Context, req *pubsubp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubscription") if err != nil { return err } @@ -1458,17 +1445,7 @@ func (c *subscriberRESTClient) UpdateSubscription(ctx context.Context, req *pubs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSubscription") if err != nil { return err } @@ -1530,21 +1507,10 @@ func (c *subscriberRESTClient) ListSubscriptions(ctx context.Context, req *pubsu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubscriptions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1608,15 +1574,8 @@ func (c *subscriberRESTClient) DeleteSubscription(ctx context.Context, req *pubs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSubscription") + return err }, opts...) } @@ -1660,15 +1619,8 @@ func (c *subscriberRESTClient) ModifyAckDeadline(ctx context.Context, req *pubsu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyAckDeadline") + return err }, opts...) } @@ -1714,15 +1666,8 @@ func (c *subscriberRESTClient) Acknowledge(ctx context.Context, req *pubsubpb.Ac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Acknowledge") + return err }, opts...) } @@ -1765,17 +1710,7 @@ func (c *subscriberRESTClient) Pull(ctx context.Context, req *pubsubpb.PullReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Pull") if err != nil { return err } @@ -1846,15 +1781,8 @@ func (c *subscriberRESTClient) ModifyPushConfig(ctx context.Context, req *pubsub httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ModifyPushConfig") + return err }, opts...) } @@ -1895,17 +1823,7 @@ func (c *subscriberRESTClient) GetSnapshot(ctx context.Context, req *pubsubpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSnapshot") if err != nil { return err } @@ -1970,21 +1888,10 @@ func (c *subscriberRESTClient) ListSnapshots(ctx context.Context, req *pubsubpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSnapshots") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2068,17 +1975,7 @@ func (c *subscriberRESTClient) CreateSnapshot(ctx context.Context, req *pubsubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSnapshot") if err != nil { return err } @@ -2139,17 +2036,7 @@ func (c *subscriberRESTClient) UpdateSnapshot(ctx context.Context, req *pubsubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSnapshot") if err != nil { return err } @@ -2204,15 +2091,8 @@ func (c *subscriberRESTClient) DeleteSnapshot(ctx context.Context, req *pubsubpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSnapshot") + return err }, opts...) } @@ -2261,17 +2141,7 @@ func (c *subscriberRESTClient) Seek(ctx context.Context, req *pubsubpb.SeekReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Seek") if err != nil { return err } @@ -2325,17 +2195,7 @@ func (c *subscriberRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2395,17 +2255,7 @@ func (c *subscriberRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2467,17 +2317,7 @@ func (c *subscriberRESTClient) TestIamPermissions(ctx context.Context, req *iamp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/pubsub/apiv1/subscriber_client_example_go123_test.go b/pubsub/apiv1/subscriber_client_example_go123_test.go index 3b39d17b7218..d686289e1572 100644 --- a/pubsub/apiv1/subscriber_client_example_go123_test.go +++ b/pubsub/apiv1/subscriber_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSubscriberClient_ListSnapshots_all() { } for resp, err := range c.ListSnapshots(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSubscriberClient_ListSubscriptions_all() { } for resp, err := range c.ListSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/admin_client.go b/pubsublite/apiv1/admin_client.go index 4f11fc7a78eb..faff4cc118ca 100755 --- a/pubsublite/apiv1/admin_client.go +++ b/pubsublite/apiv1/admin_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -659,6 +660,8 @@ type adminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAdminClient creates a new admin service client based on gRPC. @@ -686,6 +689,7 @@ func NewAdminClient(ctx context.Context, opts ...option.ClientOption) (*AdminCli connPool: connPool, adminClient: pubsublitepb.NewAdminServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -740,7 +744,7 @@ func (c *adminGRPCClient) CreateTopic(ctx context.Context, req *pubsublitepb.Cre var resp *pubsublitepb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.CreateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.CreateTopic, req, settings.GRPC, c.logger, "CreateTopic") return err }, opts...) if err != nil { @@ -758,7 +762,7 @@ func (c *adminGRPCClient) GetTopic(ctx context.Context, req *pubsublitepb.GetTop var resp *pubsublitepb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.GetTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.GetTopic, req, settings.GRPC, c.logger, "GetTopic") return err }, opts...) if err != nil { @@ -776,7 +780,7 @@ func (c *adminGRPCClient) GetTopicPartitions(ctx context.Context, req *pubsublit var resp *pubsublitepb.TopicPartitions err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.GetTopicPartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.GetTopicPartitions, req, settings.GRPC, c.logger, "GetTopicPartitions") return err }, opts...) if err != nil { @@ -805,7 +809,7 @@ func (c *adminGRPCClient) ListTopics(ctx context.Context, req *pubsublitepb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.ListTopics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.ListTopics, req, settings.GRPC, c.logger, "ListTopics") return err }, opts...) if err != nil { @@ -840,7 +844,7 @@ func (c *adminGRPCClient) UpdateTopic(ctx context.Context, req *pubsublitepb.Upd var resp *pubsublitepb.Topic err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.UpdateTopic(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.UpdateTopic, req, settings.GRPC, c.logger, "UpdateTopic") return err }, opts...) if err != nil { @@ -857,7 +861,7 @@ func (c *adminGRPCClient) DeleteTopic(ctx context.Context, req *pubsublitepb.Del opts = append((*c.CallOptions).DeleteTopic[0:len((*c.CallOptions).DeleteTopic):len((*c.CallOptions).DeleteTopic)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adminClient.DeleteTopic(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adminClient.DeleteTopic, req, settings.GRPC, c.logger, "DeleteTopic") return err }, opts...) return err @@ -883,7 +887,7 @@ func (c *adminGRPCClient) ListTopicSubscriptions(ctx context.Context, req *pubsu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.ListTopicSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.ListTopicSubscriptions, req, settings.GRPC, c.logger, "ListTopicSubscriptions") return err }, opts...) if err != nil { @@ -918,7 +922,7 @@ func (c *adminGRPCClient) CreateSubscription(ctx context.Context, req *pubsublit var resp *pubsublitepb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.CreateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.CreateSubscription, req, settings.GRPC, c.logger, "CreateSubscription") return err }, opts...) if err != nil { @@ -936,7 +940,7 @@ func (c *adminGRPCClient) GetSubscription(ctx context.Context, req *pubsublitepb var resp *pubsublitepb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.GetSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.GetSubscription, req, settings.GRPC, c.logger, "GetSubscription") return err }, opts...) if err != nil { @@ -965,7 +969,7 @@ func (c *adminGRPCClient) ListSubscriptions(ctx context.Context, req *pubsublite } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.ListSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.ListSubscriptions, req, settings.GRPC, c.logger, "ListSubscriptions") return err }, opts...) if err != nil { @@ -1000,7 +1004,7 @@ func (c *adminGRPCClient) UpdateSubscription(ctx context.Context, req *pubsublit var resp *pubsublitepb.Subscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.UpdateSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.UpdateSubscription, req, settings.GRPC, c.logger, "UpdateSubscription") return err }, opts...) if err != nil { @@ -1017,7 +1021,7 @@ func (c *adminGRPCClient) DeleteSubscription(ctx context.Context, req *pubsublit opts = append((*c.CallOptions).DeleteSubscription[0:len((*c.CallOptions).DeleteSubscription):len((*c.CallOptions).DeleteSubscription)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adminClient.DeleteSubscription(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adminClient.DeleteSubscription, req, settings.GRPC, c.logger, "DeleteSubscription") return err }, opts...) return err @@ -1032,7 +1036,7 @@ func (c *adminGRPCClient) SeekSubscription(ctx context.Context, req *pubsublitep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.SeekSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.SeekSubscription, req, settings.GRPC, c.logger, "SeekSubscription") return err }, opts...) if err != nil { @@ -1052,7 +1056,7 @@ func (c *adminGRPCClient) CreateReservation(ctx context.Context, req *pubsublite var resp *pubsublitepb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.CreateReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.CreateReservation, req, settings.GRPC, c.logger, "CreateReservation") return err }, opts...) if err != nil { @@ -1070,7 +1074,7 @@ func (c *adminGRPCClient) GetReservation(ctx context.Context, req *pubsublitepb. var resp *pubsublitepb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.GetReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.GetReservation, req, settings.GRPC, c.logger, "GetReservation") return err }, opts...) if err != nil { @@ -1099,7 +1103,7 @@ func (c *adminGRPCClient) ListReservations(ctx context.Context, req *pubsublitep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.ListReservations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.ListReservations, req, settings.GRPC, c.logger, "ListReservations") return err }, opts...) if err != nil { @@ -1134,7 +1138,7 @@ func (c *adminGRPCClient) UpdateReservation(ctx context.Context, req *pubsublite var resp *pubsublitepb.Reservation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.UpdateReservation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.UpdateReservation, req, settings.GRPC, c.logger, "UpdateReservation") return err }, opts...) if err != nil { @@ -1151,7 +1155,7 @@ func (c *adminGRPCClient) DeleteReservation(ctx context.Context, req *pubsublite opts = append((*c.CallOptions).DeleteReservation[0:len((*c.CallOptions).DeleteReservation):len((*c.CallOptions).DeleteReservation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adminClient.DeleteReservation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adminClient.DeleteReservation, req, settings.GRPC, c.logger, "DeleteReservation") return err }, opts...) return err @@ -1177,7 +1181,7 @@ func (c *adminGRPCClient) ListReservationTopics(ctx context.Context, req *pubsub } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adminClient.ListReservationTopics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adminClient.ListReservationTopics, req, settings.GRPC, c.logger, "ListReservationTopics") return err }, opts...) if err != nil { @@ -1211,7 +1215,7 @@ func (c *adminGRPCClient) CancelOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1225,7 +1229,7 @@ func (c *adminGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1240,7 +1244,7 @@ func (c *adminGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1269,7 +1273,7 @@ func (c *adminGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/admin_client_example_go123_test.go b/pubsublite/apiv1/admin_client_example_go123_test.go index aacccc040b63..0acf43b0ad3b 100644 --- a/pubsublite/apiv1/admin_client_example_go123_test.go +++ b/pubsublite/apiv1/admin_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAdminClient_ListReservationTopics_all() { } for resp, err := range c.ListReservationTopics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAdminClient_ListReservations_all() { } for resp, err := range c.ListReservations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAdminClient_ListSubscriptions_all() { } for resp, err := range c.ListSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleAdminClient_ListTopicSubscriptions_all() { } for resp, err := range c.ListTopicSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleAdminClient_ListTopics_all() { } for resp, err := range c.ListTopics(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/cursor_client.go b/pubsublite/apiv1/cursor_client.go index d8ae12aa6f39..54791c076495 100755 --- a/pubsublite/apiv1/cursor_client.go +++ b/pubsublite/apiv1/cursor_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -238,6 +239,8 @@ type cursorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCursorClient creates a new cursor service client based on gRPC. @@ -266,6 +269,7 @@ func NewCursorClient(ctx context.Context, opts ...option.ClientOption) (*CursorC connPool: connPool, cursorClient: pubsublitepb.NewCursorServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -306,7 +310,9 @@ func (c *cursorGRPCClient) StreamingCommitCursor(ctx context.Context, opts ...ga opts = append((*c.CallOptions).StreamingCommitCursor[0:len((*c.CallOptions).StreamingCommitCursor):len((*c.CallOptions).StreamingCommitCursor)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingCommitCursor") resp, err = c.cursorClient.StreamingCommitCursor(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingCommitCursor") return err }, opts...) if err != nil { @@ -324,7 +330,7 @@ func (c *cursorGRPCClient) CommitCursor(ctx context.Context, req *pubsublitepb.C var resp *pubsublitepb.CommitCursorResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cursorClient.CommitCursor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cursorClient.CommitCursor, req, settings.GRPC, c.logger, "CommitCursor") return err }, opts...) if err != nil { @@ -353,7 +359,7 @@ func (c *cursorGRPCClient) ListPartitionCursors(ctx context.Context, req *pubsub } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cursorClient.ListPartitionCursors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cursorClient.ListPartitionCursors, req, settings.GRPC, c.logger, "ListPartitionCursors") return err }, opts...) if err != nil { @@ -387,7 +393,7 @@ func (c *cursorGRPCClient) CancelOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -401,7 +407,7 @@ func (c *cursorGRPCClient) DeleteOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -416,7 +422,7 @@ func (c *cursorGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -445,7 +451,7 @@ func (c *cursorGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/cursor_client_example_go123_test.go b/pubsublite/apiv1/cursor_client_example_go123_test.go index b01f5defcd34..478d7d20f5b8 100644 --- a/pubsublite/apiv1/cursor_client_example_go123_test.go +++ b/pubsublite/apiv1/cursor_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCursorClient_ListPartitionCursors_all() { } for resp, err := range c.ListPartitionCursors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCursorClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/helpers.go b/pubsublite/apiv1/helpers.go index 602123bcec97..fb967a09324f 100755 --- a/pubsublite/apiv1/helpers.go +++ b/pubsublite/apiv1/helpers.go @@ -18,10 +18,16 @@ package pubsublite import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "pubsublite.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/pubsublite/apiv1/partition_assignment_client.go b/pubsublite/apiv1/partition_assignment_client.go index 6b8fd9333f59..458e6d697893 100755 --- a/pubsublite/apiv1/partition_assignment_client.go +++ b/pubsublite/apiv1/partition_assignment_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -197,6 +198,8 @@ type partitionAssignmentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPartitionAssignmentClient creates a new partition assignment service client based on gRPC. @@ -224,6 +227,7 @@ func NewPartitionAssignmentClient(ctx context.Context, opts ...option.ClientOpti connPool: connPool, partitionAssignmentClient: pubsublitepb.NewPartitionAssignmentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -264,7 +268,9 @@ func (c *partitionAssignmentGRPCClient) AssignPartitions(ctx context.Context, op opts = append((*c.CallOptions).AssignPartitions[0:len((*c.CallOptions).AssignPartitions):len((*c.CallOptions).AssignPartitions)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "AssignPartitions") resp, err = c.partitionAssignmentClient.AssignPartitions(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "AssignPartitions") return err }, opts...) if err != nil { @@ -281,7 +287,7 @@ func (c *partitionAssignmentGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -295,7 +301,7 @@ func (c *partitionAssignmentGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -310,7 +316,7 @@ func (c *partitionAssignmentGRPCClient) GetOperation(ctx context.Context, req *l var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -339,7 +345,7 @@ func (c *partitionAssignmentGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/partition_assignment_client_example_go123_test.go b/pubsublite/apiv1/partition_assignment_client_example_go123_test.go index bf4b92b3412b..1392e678b791 100644 --- a/pubsublite/apiv1/partition_assignment_client_example_go123_test.go +++ b/pubsublite/apiv1/partition_assignment_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePartitionAssignmentClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/publisher_client.go b/pubsublite/apiv1/publisher_client.go index 9368d4f9f54f..bc48eb02c86f 100755 --- a/pubsublite/apiv1/publisher_client.go +++ b/pubsublite/apiv1/publisher_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -199,6 +200,8 @@ type publisherGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPublisherClient creates a new publisher service client based on gRPC. @@ -228,6 +231,7 @@ func NewPublisherClient(ctx context.Context, opts ...option.ClientOption) (*Publ connPool: connPool, publisherClient: pubsublitepb.NewPublisherServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -268,7 +272,9 @@ func (c *publisherGRPCClient) Publish(ctx context.Context, opts ...gax.CallOptio opts = append((*c.CallOptions).Publish[0:len((*c.CallOptions).Publish):len((*c.CallOptions).Publish)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "Publish") resp, err = c.publisherClient.Publish(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "Publish") return err }, opts...) if err != nil { @@ -285,7 +291,7 @@ func (c *publisherGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -299,7 +305,7 @@ func (c *publisherGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -314,7 +320,7 @@ func (c *publisherGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -343,7 +349,7 @@ func (c *publisherGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/publisher_client_example_go123_test.go b/pubsublite/apiv1/publisher_client_example_go123_test.go index 61e8d6cfef7d..749bbad0c1e4 100644 --- a/pubsublite/apiv1/publisher_client_example_go123_test.go +++ b/pubsublite/apiv1/publisher_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePublisherClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/pubsublitepb/admin.pb.go b/pubsublite/apiv1/pubsublitepb/admin.pb.go index 56dc248ea765..2bfe0656e3d2 100755 --- a/pubsublite/apiv1/pubsublitepb/admin.pb.go +++ b/pubsublite/apiv1/pubsublitepb/admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/admin.proto @@ -119,11 +119,9 @@ type CreateTopicRequest struct { func (x *CreateTopicRequest) Reset() { *x = CreateTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTopicRequest) String() string { @@ -134,7 +132,7 @@ func (*CreateTopicRequest) ProtoMessage() {} func (x *CreateTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +180,9 @@ type GetTopicRequest struct { func (x *GetTopicRequest) Reset() { *x = GetTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTopicRequest) String() string { @@ -197,7 +193,7 @@ func (*GetTopicRequest) ProtoMessage() {} func (x *GetTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type GetTopicPartitionsRequest struct { func (x *GetTopicPartitionsRequest) Reset() { *x = GetTopicPartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTopicPartitionsRequest) String() string { @@ -246,7 +240,7 @@ func (*GetTopicPartitionsRequest) ProtoMessage() {} func (x *GetTopicPartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +274,9 @@ type TopicPartitions struct { func (x *TopicPartitions) Reset() { *x = TopicPartitions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TopicPartitions) String() string { @@ -295,7 +287,7 @@ func (*TopicPartitions) ProtoMessage() {} func (x *TopicPartitions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +332,9 @@ type ListTopicsRequest struct { func (x *ListTopicsRequest) Reset() { *x = ListTopicsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsRequest) String() string { @@ -355,7 +345,7 @@ func (*ListTopicsRequest) ProtoMessage() {} func (x *ListTopicsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +397,9 @@ type ListTopicsResponse struct { func (x *ListTopicsResponse) Reset() { *x = ListTopicsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicsResponse) String() string { @@ -422,7 +410,7 @@ func (*ListTopicsResponse) ProtoMessage() {} func (x *ListTopicsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -465,11 +453,9 @@ type UpdateTopicRequest struct { func (x *UpdateTopicRequest) Reset() { *x = UpdateTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTopicRequest) String() string { @@ -480,7 +466,7 @@ func (*UpdateTopicRequest) ProtoMessage() {} func (x *UpdateTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +507,9 @@ type DeleteTopicRequest struct { func (x *DeleteTopicRequest) Reset() { *x = DeleteTopicRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTopicRequest) String() string { @@ -536,7 +520,7 @@ func (*DeleteTopicRequest) ProtoMessage() {} func (x *DeleteTopicRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +564,9 @@ type ListTopicSubscriptionsRequest struct { func (x *ListTopicSubscriptionsRequest) Reset() { *x = ListTopicSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSubscriptionsRequest) String() string { @@ -595,7 +577,7 @@ func (*ListTopicSubscriptionsRequest) ProtoMessage() {} func (x *ListTopicSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +629,9 @@ type ListTopicSubscriptionsResponse struct { func (x *ListTopicSubscriptionsResponse) Reset() { *x = ListTopicSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTopicSubscriptionsResponse) String() string { @@ -662,7 +642,7 @@ func (*ListTopicSubscriptionsResponse) ProtoMessage() {} func (x *ListTopicSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +696,9 @@ type CreateSubscriptionRequest struct { func (x *CreateSubscriptionRequest) Reset() { *x = CreateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubscriptionRequest) String() string { @@ -731,7 +709,7 @@ func (*CreateSubscriptionRequest) ProtoMessage() {} func (x *CreateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +764,9 @@ type GetSubscriptionRequest struct { func (x *GetSubscriptionRequest) Reset() { *x = GetSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubscriptionRequest) String() string { @@ -801,7 +777,7 @@ func (*GetSubscriptionRequest) ProtoMessage() {} func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +822,9 @@ type ListSubscriptionsRequest struct { func (x *ListSubscriptionsRequest) Reset() { *x = ListSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsRequest) String() string { @@ -861,7 +835,7 @@ func (*ListSubscriptionsRequest) ProtoMessage() {} func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -913,11 +887,9 @@ type ListSubscriptionsResponse struct { func (x *ListSubscriptionsResponse) Reset() { *x = ListSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubscriptionsResponse) String() string { @@ -928,7 +900,7 @@ func (*ListSubscriptionsResponse) ProtoMessage() {} func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,11 +944,9 @@ type UpdateSubscriptionRequest struct { func (x *UpdateSubscriptionRequest) Reset() { *x = UpdateSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubscriptionRequest) String() string { @@ -987,7 +957,7 @@ func (*UpdateSubscriptionRequest) ProtoMessage() {} func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +998,9 @@ type DeleteSubscriptionRequest struct { func (x *DeleteSubscriptionRequest) Reset() { *x = DeleteSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSubscriptionRequest) String() string { @@ -1043,7 +1011,7 @@ func (*DeleteSubscriptionRequest) ProtoMessage() {} func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1052,9 @@ type SeekSubscriptionRequest struct { func (x *SeekSubscriptionRequest) Reset() { *x = SeekSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekSubscriptionRequest) String() string { @@ -1099,7 +1065,7 @@ func (*SeekSubscriptionRequest) ProtoMessage() {} func (x *SeekSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,11 +1137,9 @@ type SeekSubscriptionResponse struct { func (x *SeekSubscriptionResponse) Reset() { *x = SeekSubscriptionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekSubscriptionResponse) String() string { @@ -1186,7 +1150,7 @@ func (*SeekSubscriptionResponse) ProtoMessage() {} func (x *SeekSubscriptionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1186,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1237,7 +1199,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1301,11 +1263,9 @@ type CreateReservationRequest struct { func (x *CreateReservationRequest) Reset() { *x = CreateReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReservationRequest) String() string { @@ -1316,7 +1276,7 @@ func (*CreateReservationRequest) ProtoMessage() {} func (x *CreateReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1366,11 +1326,9 @@ type GetReservationRequest struct { func (x *GetReservationRequest) Reset() { *x = GetReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReservationRequest) String() string { @@ -1381,7 +1339,7 @@ func (*GetReservationRequest) ProtoMessage() {} func (x *GetReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1384,9 @@ type ListReservationsRequest struct { func (x *ListReservationsRequest) Reset() { *x = ListReservationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationsRequest) String() string { @@ -1441,7 +1397,7 @@ func (*ListReservationsRequest) ProtoMessage() {} func (x *ListReservationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1493,11 +1449,9 @@ type ListReservationsResponse struct { func (x *ListReservationsResponse) Reset() { *x = ListReservationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationsResponse) String() string { @@ -1508,7 +1462,7 @@ func (*ListReservationsResponse) ProtoMessage() {} func (x *ListReservationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1505,9 @@ type UpdateReservationRequest struct { func (x *UpdateReservationRequest) Reset() { *x = UpdateReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReservationRequest) String() string { @@ -1566,7 +1518,7 @@ func (*UpdateReservationRequest) ProtoMessage() {} func (x *UpdateReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1561,9 @@ type DeleteReservationRequest struct { func (x *DeleteReservationRequest) Reset() { *x = DeleteReservationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReservationRequest) String() string { @@ -1624,7 +1574,7 @@ func (*DeleteReservationRequest) ProtoMessage() {} func (x *DeleteReservationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1670,11 +1620,9 @@ type ListReservationTopicsRequest struct { func (x *ListReservationTopicsRequest) Reset() { *x = ListReservationTopicsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationTopicsRequest) String() string { @@ -1685,7 +1633,7 @@ func (*ListReservationTopicsRequest) ProtoMessage() {} func (x *ListReservationTopicsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1685,9 @@ type ListReservationTopicsResponse struct { func (x *ListReservationTopicsResponse) Reset() { *x = ListReservationTopicsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReservationTopicsResponse) String() string { @@ -1752,7 +1698,7 @@ func (*ListReservationTopicsResponse) ProtoMessage() {} func (x *ListReservationTopicsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_admin_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2424,332 +2370,6 @@ func file_google_cloud_pubsublite_v1_admin_proto_init() { return } file_google_cloud_pubsublite_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetTopicPartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TopicPartitions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTopicRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListTopicSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SeekSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SeekSubscriptionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReservationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationTopicsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_admin_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListReservationTopicsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_pubsublite_v1_admin_proto_msgTypes[16].OneofWrappers = []any{ (*SeekSubscriptionRequest_NamedTarget_)(nil), (*SeekSubscriptionRequest_TimeTarget)(nil), diff --git a/pubsublite/apiv1/pubsublitepb/common.pb.go b/pubsublite/apiv1/pubsublitepb/common.pb.go index dc80dcf70ea7..e2819dc70035 100755 --- a/pubsublite/apiv1/pubsublitepb/common.pb.go +++ b/pubsublite/apiv1/pubsublitepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/common.proto @@ -169,11 +169,9 @@ type AttributeValues struct { func (x *AttributeValues) Reset() { *x = AttributeValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValues) String() string { @@ -184,7 +182,7 @@ func (*AttributeValues) ProtoMessage() {} func (x *AttributeValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +224,9 @@ type PubSubMessage struct { func (x *PubSubMessage) Reset() { *x = PubSubMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubSubMessage) String() string { @@ -241,7 +237,7 @@ func (*PubSubMessage) ProtoMessage() {} func (x *PubSubMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +293,9 @@ type Cursor struct { func (x *Cursor) Reset() { *x = Cursor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cursor) String() string { @@ -312,7 +306,7 @@ func (*Cursor) ProtoMessage() {} func (x *Cursor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +347,9 @@ type SequencedMessage struct { func (x *SequencedMessage) Reset() { *x = SequencedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SequencedMessage) String() string { @@ -368,7 +360,7 @@ func (*SequencedMessage) ProtoMessage() {} func (x *SequencedMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type Reservation struct { func (x *Reservation) Reset() { *x = Reservation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reservation) String() string { @@ -448,7 +438,7 @@ func (*Reservation) ProtoMessage() {} func (x *Reservation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -497,11 +487,9 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic) String() string { @@ -512,7 +500,7 @@ func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +566,9 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription) String() string { @@ -593,7 +579,7 @@ func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +655,9 @@ type ExportConfig struct { func (x *ExportConfig) Reset() { *x = ExportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportConfig) String() string { @@ -684,7 +668,7 @@ func (*ExportConfig) ProtoMessage() {} func (x *ExportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +748,9 @@ type TimeTarget struct { func (x *TimeTarget) Reset() { *x = TimeTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimeTarget) String() string { @@ -779,7 +761,7 @@ func (*TimeTarget) ProtoMessage() {} func (x *TimeTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +845,9 @@ type Topic_PartitionConfig struct { func (x *Topic_PartitionConfig) Reset() { *x = Topic_PartitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic_PartitionConfig) String() string { @@ -878,7 +858,7 @@ func (*Topic_PartitionConfig) ProtoMessage() {} func (x *Topic_PartitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +948,9 @@ type Topic_RetentionConfig struct { func (x *Topic_RetentionConfig) Reset() { *x = Topic_RetentionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic_RetentionConfig) String() string { @@ -983,7 +961,7 @@ func (*Topic_RetentionConfig) ProtoMessage() {} func (x *Topic_RetentionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1004,9 @@ type Topic_ReservationConfig struct { func (x *Topic_ReservationConfig) Reset() { *x = Topic_ReservationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic_ReservationConfig) String() string { @@ -1041,7 +1017,7 @@ func (*Topic_ReservationConfig) ProtoMessage() {} func (x *Topic_ReservationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,11 +1055,9 @@ type Topic_PartitionConfig_Capacity struct { func (x *Topic_PartitionConfig_Capacity) Reset() { *x = Topic_PartitionConfig_Capacity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic_PartitionConfig_Capacity) String() string { @@ -1094,7 +1068,7 @@ func (*Topic_PartitionConfig_Capacity) ProtoMessage() {} func (x *Topic_PartitionConfig_Capacity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1135,11 +1109,9 @@ type Subscription_DeliveryConfig struct { func (x *Subscription_DeliveryConfig) Reset() { *x = Subscription_DeliveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subscription_DeliveryConfig) String() string { @@ -1150,7 +1122,7 @@ func (*Subscription_DeliveryConfig) ProtoMessage() {} func (x *Subscription_DeliveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1158,9 @@ type ExportConfig_PubSubConfig struct { func (x *ExportConfig_PubSubConfig) Reset() { *x = ExportConfig_PubSubConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportConfig_PubSubConfig) String() string { @@ -1201,7 +1171,7 @@ func (*ExportConfig_PubSubConfig) ProtoMessage() {} func (x *ExportConfig_PubSubConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_common_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1515,188 +1485,6 @@ func file_google_cloud_pubsublite_v1_common_proto_init() { if File_google_cloud_pubsublite_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PubSubMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Cursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SequencedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Reservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TimeTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Topic_PartitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Topic_RetentionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Topic_ReservationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Topic_PartitionConfig_Capacity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Subscription_DeliveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_common_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExportConfig_PubSubConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_pubsublite_v1_common_proto_msgTypes[7].OneofWrappers = []any{ (*ExportConfig_PubsubConfig)(nil), } diff --git a/pubsublite/apiv1/pubsublitepb/cursor.pb.go b/pubsublite/apiv1/pubsublitepb/cursor.pb.go index 8cfafa355bf9..77560ee0e103 100755 --- a/pubsublite/apiv1/pubsublitepb/cursor.pb.go +++ b/pubsublite/apiv1/pubsublitepb/cursor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/cursor.proto @@ -57,11 +57,9 @@ type InitialCommitCursorRequest struct { func (x *InitialCommitCursorRequest) Reset() { *x = InitialCommitCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialCommitCursorRequest) String() string { @@ -72,7 +70,7 @@ func (*InitialCommitCursorRequest) ProtoMessage() {} func (x *InitialCommitCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type InitialCommitCursorResponse struct { func (x *InitialCommitCursorResponse) Reset() { *x = InitialCommitCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialCommitCursorResponse) String() string { @@ -125,7 +121,7 @@ func (*InitialCommitCursorResponse) ProtoMessage() {} func (x *InitialCommitCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,11 +149,9 @@ type SequencedCommitCursorRequest struct { func (x *SequencedCommitCursorRequest) Reset() { *x = SequencedCommitCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SequencedCommitCursorRequest) String() string { @@ -168,7 +162,7 @@ func (*SequencedCommitCursorRequest) ProtoMessage() {} func (x *SequencedCommitCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +198,9 @@ type SequencedCommitCursorResponse struct { func (x *SequencedCommitCursorResponse) Reset() { *x = SequencedCommitCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SequencedCommitCursorResponse) String() string { @@ -219,7 +211,7 @@ func (*SequencedCommitCursorResponse) ProtoMessage() {} func (x *SequencedCommitCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +250,9 @@ type StreamingCommitCursorRequest struct { func (x *StreamingCommitCursorRequest) Reset() { *x = StreamingCommitCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingCommitCursorRequest) String() string { @@ -273,7 +263,7 @@ func (*StreamingCommitCursorRequest) ProtoMessage() {} func (x *StreamingCommitCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -344,11 +334,9 @@ type StreamingCommitCursorResponse struct { func (x *StreamingCommitCursorResponse) Reset() { *x = StreamingCommitCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingCommitCursorResponse) String() string { @@ -359,7 +347,7 @@ func (*StreamingCommitCursorResponse) ProtoMessage() {} func (x *StreamingCommitCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +418,9 @@ type CommitCursorRequest struct { func (x *CommitCursorRequest) Reset() { *x = CommitCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitCursorRequest) String() string { @@ -445,7 +431,7 @@ func (*CommitCursorRequest) ProtoMessage() {} func (x *CommitCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +476,9 @@ type CommitCursorResponse struct { func (x *CommitCursorResponse) Reset() { *x = CommitCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitCursorResponse) String() string { @@ -505,7 +489,7 @@ func (*CommitCursorResponse) ProtoMessage() {} func (x *CommitCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +528,9 @@ type ListPartitionCursorsRequest struct { func (x *ListPartitionCursorsRequest) Reset() { *x = ListPartitionCursorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPartitionCursorsRequest) String() string { @@ -559,7 +541,7 @@ func (*ListPartitionCursorsRequest) ProtoMessage() {} func (x *ListPartitionCursorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +591,9 @@ type PartitionCursor struct { func (x *PartitionCursor) Reset() { *x = PartitionCursor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionCursor) String() string { @@ -624,7 +604,7 @@ func (*PartitionCursor) ProtoMessage() {} func (x *PartitionCursor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +648,9 @@ type ListPartitionCursorsResponse struct { func (x *ListPartitionCursorsResponse) Reset() { *x = ListPartitionCursorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPartitionCursorsResponse) String() string { @@ -683,7 +661,7 @@ func (*ListPartitionCursorsResponse) ProtoMessage() {} func (x *ListPartitionCursorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -926,140 +904,6 @@ func file_google_cloud_pubsublite_v1_cursor_proto_init() { return } file_google_cloud_pubsublite_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InitialCommitCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InitialCommitCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SequencedCommitCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SequencedCommitCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingCommitCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*StreamingCommitCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CommitCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CommitCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListPartitionCursorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PartitionCursor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListPartitionCursorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_pubsublite_v1_cursor_proto_msgTypes[4].OneofWrappers = []any{ (*StreamingCommitCursorRequest_Initial)(nil), (*StreamingCommitCursorRequest_Commit)(nil), diff --git a/pubsublite/apiv1/pubsublitepb/publisher.pb.go b/pubsublite/apiv1/pubsublitepb/publisher.pb.go index 2e00193e6aab..32fa328c6b1f 100755 --- a/pubsublite/apiv1/pubsublitepb/publisher.pb.go +++ b/pubsublite/apiv1/pubsublitepb/publisher.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/publisher.proto @@ -64,11 +64,9 @@ type InitialPublishRequest struct { func (x *InitialPublishRequest) Reset() { *x = InitialPublishRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialPublishRequest) String() string { @@ -79,7 +77,7 @@ func (*InitialPublishRequest) ProtoMessage() {} func (x *InitialPublishRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type InitialPublishResponse struct { func (x *InitialPublishResponse) Reset() { *x = InitialPublishResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialPublishResponse) String() string { @@ -139,7 +135,7 @@ func (*InitialPublishResponse) ProtoMessage() {} func (x *InitialPublishResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type MessagePublishRequest struct { func (x *MessagePublishRequest) Reset() { *x = MessagePublishRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessagePublishRequest) String() string { @@ -193,7 +187,7 @@ func (*MessagePublishRequest) ProtoMessage() {} func (x *MessagePublishRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +238,9 @@ type MessagePublishResponse struct { func (x *MessagePublishResponse) Reset() { *x = MessagePublishResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessagePublishResponse) String() string { @@ -259,7 +251,7 @@ func (*MessagePublishResponse) ProtoMessage() {} func (x *MessagePublishResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type PublishRequest struct { func (x *PublishRequest) Reset() { *x = PublishRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishRequest) String() string { @@ -320,7 +310,7 @@ func (*PublishRequest) ProtoMessage() {} func (x *PublishRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +381,9 @@ type PublishResponse struct { func (x *PublishResponse) Reset() { *x = PublishResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublishResponse) String() string { @@ -406,7 +394,7 @@ func (*PublishResponse) ProtoMessage() {} func (x *PublishResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +466,9 @@ type MessagePublishResponse_CursorRange struct { func (x *MessagePublishResponse_CursorRange) Reset() { *x = MessagePublishResponse_CursorRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessagePublishResponse_CursorRange) String() string { @@ -493,7 +479,7 @@ func (*MessagePublishResponse_CursorRange) ProtoMessage() {} func (x *MessagePublishResponse_CursorRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,92 +674,6 @@ func file_google_cloud_pubsublite_v1_publisher_proto_init() { return } file_google_cloud_pubsublite_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InitialPublishRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InitialPublishResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MessagePublishRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MessagePublishResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PublishRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PublishResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MessagePublishResponse_CursorRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_pubsublite_v1_publisher_proto_msgTypes[4].OneofWrappers = []any{ (*PublishRequest_InitialRequest)(nil), (*PublishRequest_MessagePublishRequest)(nil), diff --git a/pubsublite/apiv1/pubsublitepb/subscriber.pb.go b/pubsublite/apiv1/pubsublitepb/subscriber.pb.go index fc2bd780d694..20e8acfb50f3 100755 --- a/pubsublite/apiv1/pubsublitepb/subscriber.pb.go +++ b/pubsublite/apiv1/pubsublitepb/subscriber.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/subscriber.proto @@ -115,11 +115,9 @@ type InitialSubscribeRequest struct { func (x *InitialSubscribeRequest) Reset() { *x = InitialSubscribeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialSubscribeRequest) String() string { @@ -130,7 +128,7 @@ func (*InitialSubscribeRequest) ProtoMessage() {} func (x *InitialSubscribeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type InitialSubscribeResponse struct { func (x *InitialSubscribeResponse) Reset() { *x = InitialSubscribeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialSubscribeResponse) String() string { @@ -194,7 +190,7 @@ func (*InitialSubscribeResponse) ProtoMessage() {} func (x *InitialSubscribeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +234,9 @@ type SeekRequest struct { func (x *SeekRequest) Reset() { *x = SeekRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekRequest) String() string { @@ -253,7 +247,7 @@ func (*SeekRequest) ProtoMessage() {} func (x *SeekRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,11 +314,9 @@ type SeekResponse struct { func (x *SeekResponse) Reset() { *x = SeekResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeekResponse) String() string { @@ -335,7 +327,7 @@ func (*SeekResponse) ProtoMessage() {} func (x *SeekResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +364,9 @@ type FlowControlRequest struct { func (x *FlowControlRequest) Reset() { *x = FlowControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FlowControlRequest) String() string { @@ -387,7 +377,7 @@ func (*FlowControlRequest) ProtoMessage() {} func (x *FlowControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +424,9 @@ type SubscribeRequest struct { func (x *SubscribeRequest) Reset() { *x = SubscribeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeRequest) String() string { @@ -449,7 +437,7 @@ func (*SubscribeRequest) ProtoMessage() {} func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,11 +522,9 @@ type MessageResponse struct { func (x *MessageResponse) Reset() { *x = MessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageResponse) String() string { @@ -549,7 +535,7 @@ func (*MessageResponse) ProtoMessage() {} func (x *MessageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +575,9 @@ type SubscribeResponse struct { func (x *SubscribeResponse) Reset() { *x = SubscribeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscribeResponse) String() string { @@ -604,7 +588,7 @@ func (*SubscribeResponse) ProtoMessage() {} func (x *SubscribeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +680,9 @@ type InitialPartitionAssignmentRequest struct { func (x *InitialPartitionAssignmentRequest) Reset() { *x = InitialPartitionAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitialPartitionAssignmentRequest) String() string { @@ -711,7 +693,7 @@ func (*InitialPartitionAssignmentRequest) ProtoMessage() {} func (x *InitialPartitionAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +736,9 @@ type PartitionAssignment struct { func (x *PartitionAssignment) Reset() { *x = PartitionAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionAssignment) String() string { @@ -769,7 +749,7 @@ func (*PartitionAssignment) ProtoMessage() {} func (x *PartitionAssignment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +784,9 @@ type PartitionAssignmentAck struct { func (x *PartitionAssignmentAck) Reset() { *x = PartitionAssignmentAck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionAssignmentAck) String() string { @@ -819,7 +797,7 @@ func (*PartitionAssignmentAck) ProtoMessage() {} func (x *PartitionAssignmentAck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -851,11 +829,9 @@ type PartitionAssignmentRequest struct { func (x *PartitionAssignmentRequest) Reset() { *x = PartitionAssignmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionAssignmentRequest) String() string { @@ -866,7 +842,7 @@ func (*PartitionAssignmentRequest) ProtoMessage() {} func (x *PartitionAssignmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,152 +1126,6 @@ func file_google_cloud_pubsublite_v1_subscriber_proto_init() { return } file_google_cloud_pubsublite_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InitialSubscribeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InitialSubscribeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SeekRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SeekResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FlowControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SubscribeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*InitialPartitionAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*PartitionAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PartitionAssignmentAck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PartitionAssignmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_pubsublite_v1_subscriber_proto_msgTypes[2].OneofWrappers = []any{ (*SeekRequest_NamedTarget_)(nil), (*SeekRequest_Cursor)(nil), diff --git a/pubsublite/apiv1/pubsublitepb/topic_stats.pb.go b/pubsublite/apiv1/pubsublitepb/topic_stats.pb.go index 761a13893f3c..f963515457c6 100755 --- a/pubsublite/apiv1/pubsublitepb/topic_stats.pb.go +++ b/pubsublite/apiv1/pubsublitepb/topic_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/pubsublite/v1/topic_stats.proto @@ -61,11 +61,9 @@ type ComputeMessageStatsRequest struct { func (x *ComputeMessageStatsRequest) Reset() { *x = ComputeMessageStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeMessageStatsRequest) String() string { @@ -76,7 +74,7 @@ func (*ComputeMessageStatsRequest) ProtoMessage() {} func (x *ComputeMessageStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141,11 +139,9 @@ type ComputeMessageStatsResponse struct { func (x *ComputeMessageStatsResponse) Reset() { *x = ComputeMessageStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeMessageStatsResponse) String() string { @@ -156,7 +152,7 @@ func (*ComputeMessageStatsResponse) ProtoMessage() {} func (x *ComputeMessageStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type ComputeHeadCursorRequest struct { func (x *ComputeHeadCursorRequest) Reset() { *x = ComputeHeadCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeHeadCursorRequest) String() string { @@ -228,7 +222,7 @@ func (*ComputeHeadCursorRequest) ProtoMessage() {} func (x *ComputeHeadCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +263,9 @@ type ComputeHeadCursorResponse struct { func (x *ComputeHeadCursorResponse) Reset() { *x = ComputeHeadCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeHeadCursorResponse) String() string { @@ -284,7 +276,7 @@ func (*ComputeHeadCursorResponse) ProtoMessage() {} func (x *ComputeHeadCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +316,9 @@ type ComputeTimeCursorRequest struct { func (x *ComputeTimeCursorRequest) Reset() { *x = ComputeTimeCursorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTimeCursorRequest) String() string { @@ -339,7 +329,7 @@ func (*ComputeTimeCursorRequest) ProtoMessage() {} func (x *ComputeTimeCursorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +380,9 @@ type ComputeTimeCursorResponse struct { func (x *ComputeTimeCursorResponse) Reset() { *x = ComputeTimeCursorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeTimeCursorResponse) String() string { @@ -405,7 +393,7 @@ func (*ComputeTimeCursorResponse) ProtoMessage() {} func (x *ComputeTimeCursorResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,80 +614,6 @@ func file_google_cloud_pubsublite_v1_topic_stats_proto_init() { return } file_google_cloud_pubsublite_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeMessageStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeMessageStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ComputeHeadCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ComputeHeadCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTimeCursorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_pubsublite_v1_topic_stats_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ComputeTimeCursorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pubsublite/apiv1/subscriber_client.go b/pubsublite/apiv1/subscriber_client.go index 2ce3567d9d30..ece2f5eca826 100755 --- a/pubsublite/apiv1/subscriber_client.go +++ b/pubsublite/apiv1/subscriber_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -191,6 +192,8 @@ type subscriberGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSubscriberClient creates a new subscriber service client based on gRPC. @@ -218,6 +221,7 @@ func NewSubscriberClient(ctx context.Context, opts ...option.ClientOption) (*Sub connPool: connPool, subscriberClient: pubsublitepb.NewSubscriberServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -258,7 +262,9 @@ func (c *subscriberGRPCClient) Subscribe(ctx context.Context, opts ...gax.CallOp opts = append((*c.CallOptions).Subscribe[0:len((*c.CallOptions).Subscribe):len((*c.CallOptions).Subscribe)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "Subscribe") resp, err = c.subscriberClient.Subscribe(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "Subscribe") return err }, opts...) if err != nil { @@ -275,7 +281,7 @@ func (c *subscriberGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -289,7 +295,7 @@ func (c *subscriberGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -304,7 +310,7 @@ func (c *subscriberGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -333,7 +339,7 @@ func (c *subscriberGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/subscriber_client_example_go123_test.go b/pubsublite/apiv1/subscriber_client_example_go123_test.go index 361ad1ff07e0..c327323e65d0 100644 --- a/pubsublite/apiv1/subscriber_client_example_go123_test.go +++ b/pubsublite/apiv1/subscriber_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSubscriberClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/pubsublite/apiv1/topic_stats_client.go b/pubsublite/apiv1/topic_stats_client.go index faaa5d2599df..c0cf4fd7f44c 100755 --- a/pubsublite/apiv1/topic_stats_client.go +++ b/pubsublite/apiv1/topic_stats_client.go @@ -19,6 +19,7 @@ package pubsublite import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -258,6 +259,8 @@ type topicStatsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTopicStatsClient creates a new topic stats service client based on gRPC. @@ -284,6 +287,7 @@ func NewTopicStatsClient(ctx context.Context, opts ...option.ClientOption) (*Top connPool: connPool, topicStatsClient: pubsublitepb.NewTopicStatsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -327,7 +331,7 @@ func (c *topicStatsGRPCClient) ComputeMessageStats(ctx context.Context, req *pub var resp *pubsublitepb.ComputeMessageStatsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.topicStatsClient.ComputeMessageStats(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.topicStatsClient.ComputeMessageStats, req, settings.GRPC, c.logger, "ComputeMessageStats") return err }, opts...) if err != nil { @@ -345,7 +349,7 @@ func (c *topicStatsGRPCClient) ComputeHeadCursor(ctx context.Context, req *pubsu var resp *pubsublitepb.ComputeHeadCursorResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.topicStatsClient.ComputeHeadCursor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.topicStatsClient.ComputeHeadCursor, req, settings.GRPC, c.logger, "ComputeHeadCursor") return err }, opts...) if err != nil { @@ -363,7 +367,7 @@ func (c *topicStatsGRPCClient) ComputeTimeCursor(ctx context.Context, req *pubsu var resp *pubsublitepb.ComputeTimeCursorResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.topicStatsClient.ComputeTimeCursor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.topicStatsClient.ComputeTimeCursor, req, settings.GRPC, c.logger, "ComputeTimeCursor") return err }, opts...) if err != nil { @@ -380,7 +384,7 @@ func (c *topicStatsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -394,7 +398,7 @@ func (c *topicStatsGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -409,7 +413,7 @@ func (c *topicStatsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -438,7 +442,7 @@ func (c *topicStatsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/pubsublite/apiv1/topic_stats_client_example_go123_test.go b/pubsublite/apiv1/topic_stats_client_example_go123_test.go index 14df396f6f48..3040a2e6d258 100644 --- a/pubsublite/apiv1/topic_stats_client_example_go123_test.go +++ b/pubsublite/apiv1/topic_stats_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTopicStatsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/rapidmigrationassessment/apiv1/helpers.go b/rapidmigrationassessment/apiv1/helpers.go index 43b746351b8f..312badb4a8a9 100755 --- a/rapidmigrationassessment/apiv1/helpers.go +++ b/rapidmigrationassessment/apiv1/helpers.go @@ -18,10 +18,20 @@ package rapidmigrationassessment import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "rapidmigrationassessment.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/rapidmigrationassessment/apiv1/rapid_migration_assessment_client.go b/rapidmigrationassessment/apiv1/rapid_migration_assessment_client.go index 9750146c4da7..3e088ccec92c 100755 --- a/rapidmigrationassessment/apiv1/rapid_migration_assessment_client.go +++ b/rapidmigrationassessment/apiv1/rapid_migration_assessment_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" rapidmigrationassessmentpb "cloud.google.com/go/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -438,6 +437,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new rapid migration assessment client based on gRPC. @@ -464,6 +465,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: rapidmigrationassessmentpb.NewRapidMigrationAssessmentClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -528,6 +530,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new rapid migration assessment rest client. @@ -545,6 +549,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -607,7 +612,7 @@ func (c *gRPCClient) CreateCollector(ctx context.Context, req *rapidmigrationass var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCollector, req, settings.GRPC, c.logger, "CreateCollector") return err }, opts...) if err != nil { @@ -627,7 +632,7 @@ func (c *gRPCClient) CreateAnnotation(ctx context.Context, req *rapidmigrationas var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAnnotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAnnotation, req, settings.GRPC, c.logger, "CreateAnnotation") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *gRPCClient) GetAnnotation(ctx context.Context, req *rapidmigrationasses var resp *rapidmigrationassessmentpb.Annotation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAnnotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAnnotation, req, settings.GRPC, c.logger, "GetAnnotation") return err }, opts...) if err != nil { @@ -676,7 +681,7 @@ func (c *gRPCClient) ListCollectors(ctx context.Context, req *rapidmigrationasse } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCollectors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCollectors, req, settings.GRPC, c.logger, "ListCollectors") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *gRPCClient) GetCollector(ctx context.Context, req *rapidmigrationassess var resp *rapidmigrationassessmentpb.Collector err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCollector, req, settings.GRPC, c.logger, "GetCollector") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *gRPCClient) UpdateCollector(ctx context.Context, req *rapidmigrationass var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCollector, req, settings.GRPC, c.logger, "UpdateCollector") return err }, opts...) if err != nil { @@ -749,7 +754,7 @@ func (c *gRPCClient) DeleteCollector(ctx context.Context, req *rapidmigrationass var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCollector, req, settings.GRPC, c.logger, "DeleteCollector") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *gRPCClient) ResumeCollector(ctx context.Context, req *rapidmigrationass var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeCollector, req, settings.GRPC, c.logger, "ResumeCollector") return err }, opts...) if err != nil { @@ -789,7 +794,7 @@ func (c *gRPCClient) RegisterCollector(ctx context.Context, req *rapidmigrationa var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RegisterCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RegisterCollector, req, settings.GRPC, c.logger, "RegisterCollector") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *gRPCClient) PauseCollector(ctx context.Context, req *rapidmigrationasse var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PauseCollector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PauseCollector, req, settings.GRPC, c.logger, "PauseCollector") return err }, opts...) if err != nil { @@ -829,7 +834,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -892,7 +897,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -906,7 +911,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -921,7 +926,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -950,7 +955,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1020,21 +1025,10 @@ func (c *restClient) CreateCollector(ctx context.Context, req *rapidmigrationass httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCollector") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1094,21 +1088,10 @@ func (c *restClient) CreateAnnotation(ctx context.Context, req *rapidmigrationas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnnotation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1159,17 +1142,7 @@ func (c *restClient) GetAnnotation(ctx context.Context, req *rapidmigrationasses httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotation") if err != nil { return err } @@ -1237,21 +1210,10 @@ func (c *restClient) ListCollectors(ctx context.Context, req *rapidmigrationasse } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCollectors") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1314,17 +1276,7 @@ func (c *restClient) GetCollector(ctx context.Context, req *rapidmigrationassess httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCollector") if err != nil { return err } @@ -1390,21 +1342,10 @@ func (c *restClient) UpdateCollector(ctx context.Context, req *rapidmigrationass httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCollector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1458,21 +1399,10 @@ func (c *restClient) DeleteCollector(ctx context.Context, req *rapidmigrationass httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCollector") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1528,21 +1458,10 @@ func (c *restClient) ResumeCollector(ctx context.Context, req *rapidmigrationass httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeCollector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1598,21 +1517,10 @@ func (c *restClient) RegisterCollector(ctx context.Context, req *rapidmigrationa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RegisterCollector") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1668,21 +1576,10 @@ func (c *restClient) PauseCollector(ctx context.Context, req *rapidmigrationasse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseCollector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1733,17 +1630,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1808,21 +1695,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1888,15 +1764,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1930,15 +1799,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1975,17 +1837,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2050,21 +1902,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/rapidmigrationassessment/apiv1/rapid_migration_assessment_client_example_go123_test.go b/rapidmigrationassessment/apiv1/rapid_migration_assessment_client_example_go123_test.go index 176f15c19094..9e31045eef85 100644 --- a/rapidmigrationassessment/apiv1/rapid_migration_assessment_client_example_go123_test.go +++ b/rapidmigrationassessment/apiv1/rapid_migration_assessment_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListCollectors_all() { } for resp, err := range c.ListCollectors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/api_entities.pb.go b/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/api_entities.pb.go index d3822570dfcd..9c33b275e67b 100755 --- a/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/api_entities.pb.go +++ b/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/api_entities.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/rapidmigrationassessment/v1/api_entities.proto @@ -186,11 +186,9 @@ type GuestOsScan struct { func (x *GuestOsScan) Reset() { *x = GuestOsScan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GuestOsScan) String() string { @@ -201,7 +199,7 @@ func (*GuestOsScan) ProtoMessage() {} func (x *GuestOsScan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +233,9 @@ type VSphereScan struct { func (x *VSphereScan) Reset() { *x = VSphereScan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VSphereScan) String() string { @@ -250,7 +246,7 @@ func (*VSphereScan) ProtoMessage() {} func (x *VSphereScan) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +309,9 @@ type Collector struct { func (x *Collector) Reset() { *x = Collector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Collector) String() string { @@ -328,7 +322,7 @@ func (*Collector) ProtoMessage() {} func (x *Collector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -468,11 +462,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -483,7 +475,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,56 +730,6 @@ func file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_init() { if File_google_cloud_rapidmigrationassessment_v1_api_entities_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GuestOsScan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VSphereScan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Collector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/rapidmigrationassessment.pb.go b/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/rapidmigrationassessment.pb.go index f543193c8772..3aac08becefc 100755 --- a/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/rapidmigrationassessment.pb.go +++ b/rapidmigrationassessment/apiv1/rapidmigrationassessmentpb/rapidmigrationassessment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.proto @@ -59,11 +59,9 @@ type CreateAnnotationRequest struct { func (x *CreateAnnotationRequest) Reset() { *x = CreateAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnnotationRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateAnnotationRequest) ProtoMessage() {} func (x *CreateAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type GetAnnotationRequest struct { func (x *GetAnnotationRequest) Reset() { *x = GetAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationRequest) String() string { @@ -137,7 +133,7 @@ func (*GetAnnotationRequest) ProtoMessage() {} func (x *GetAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +173,9 @@ type CreateCollectorRequest struct { func (x *CreateCollectorRequest) Reset() { *x = CreateCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCollectorRequest) String() string { @@ -192,7 +186,7 @@ func (*CreateCollectorRequest) ProtoMessage() {} func (x *CreateCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +250,9 @@ type ListCollectorsRequest struct { func (x *ListCollectorsRequest) Reset() { *x = ListCollectorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectorsRequest) String() string { @@ -271,7 +263,7 @@ func (*ListCollectorsRequest) ProtoMessage() {} func (x *ListCollectorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,11 +329,9 @@ type ListCollectorsResponse struct { func (x *ListCollectorsResponse) Reset() { *x = ListCollectorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectorsResponse) String() string { @@ -352,7 +342,7 @@ func (*ListCollectorsResponse) ProtoMessage() {} func (x *ListCollectorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +390,9 @@ type GetCollectorRequest struct { func (x *GetCollectorRequest) Reset() { *x = GetCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollectorRequest) String() string { @@ -415,7 +403,7 @@ func (*GetCollectorRequest) ProtoMessage() {} func (x *GetCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,11 +451,9 @@ type DeleteCollectorRequest struct { func (x *DeleteCollectorRequest) Reset() { *x = DeleteCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCollectorRequest) String() string { @@ -478,7 +464,7 @@ func (*DeleteCollectorRequest) ProtoMessage() {} func (x *DeleteCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +525,9 @@ type UpdateCollectorRequest struct { func (x *UpdateCollectorRequest) Reset() { *x = UpdateCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCollectorRequest) String() string { @@ -554,7 +538,7 @@ func (*UpdateCollectorRequest) ProtoMessage() {} func (x *UpdateCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +600,9 @@ type ResumeCollectorRequest struct { func (x *ResumeCollectorRequest) Reset() { *x = ResumeCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeCollectorRequest) String() string { @@ -631,7 +613,7 @@ func (*ResumeCollectorRequest) ProtoMessage() {} func (x *ResumeCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +668,9 @@ type RegisterCollectorRequest struct { func (x *RegisterCollectorRequest) Reset() { *x = RegisterCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegisterCollectorRequest) String() string { @@ -701,7 +681,7 @@ func (*RegisterCollectorRequest) ProtoMessage() {} func (x *RegisterCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +736,9 @@ type PauseCollectorRequest struct { func (x *PauseCollectorRequest) Reset() { *x = PauseCollectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseCollectorRequest) String() string { @@ -771,7 +749,7 @@ func (*PauseCollectorRequest) ProtoMessage() {} func (x *PauseCollectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +806,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -843,7 +819,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,152 +1292,6 @@ func file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_prot return } file_google_cloud_rapidmigrationassessment_v1_api_entities_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RegisterCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PauseCollectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_rapidmigrationassessment_v1_rapidmigrationassessment_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recaptchaenterprise/apiv1/helpers.go b/recaptchaenterprise/apiv1/helpers.go index f9a798f79e98..96fe0400a154 100755 --- a/recaptchaenterprise/apiv1/helpers.go +++ b/recaptchaenterprise/apiv1/helpers.go @@ -18,10 +18,16 @@ package recaptchaenterprise import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "recaptchaenterprise.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go b/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go index cff330762adb..b5885f005e09 100755 --- a/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go +++ b/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go @@ -19,6 +19,7 @@ package recaptchaenterprise import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -328,6 +329,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new recaptcha enterprise service client based on gRPC. @@ -354,6 +357,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: recaptchaenterprisepb.NewRecaptchaEnterpriseServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -396,7 +400,7 @@ func (c *gRPCClient) CreateAssessment(ctx context.Context, req *recaptchaenterpr var resp *recaptchaenterprisepb.Assessment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAssessment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAssessment, req, settings.GRPC, c.logger, "CreateAssessment") return err }, opts...) if err != nil { @@ -414,7 +418,7 @@ func (c *gRPCClient) AnnotateAssessment(ctx context.Context, req *recaptchaenter var resp *recaptchaenterprisepb.AnnotateAssessmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateAssessment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateAssessment, req, settings.GRPC, c.logger, "AnnotateAssessment") return err }, opts...) if err != nil { @@ -432,7 +436,7 @@ func (c *gRPCClient) CreateKey(ctx context.Context, req *recaptchaenterprisepb.C var resp *recaptchaenterprisepb.Key err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateKey, req, settings.GRPC, c.logger, "CreateKey") return err }, opts...) if err != nil { @@ -461,7 +465,7 @@ func (c *gRPCClient) ListKeys(ctx context.Context, req *recaptchaenterprisepb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListKeys, req, settings.GRPC, c.logger, "ListKeys") return err }, opts...) if err != nil { @@ -496,7 +500,7 @@ func (c *gRPCClient) RetrieveLegacySecretKey(ctx context.Context, req *recaptcha var resp *recaptchaenterprisepb.RetrieveLegacySecretKeyResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RetrieveLegacySecretKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RetrieveLegacySecretKey, req, settings.GRPC, c.logger, "RetrieveLegacySecretKey") return err }, opts...) if err != nil { @@ -514,7 +518,7 @@ func (c *gRPCClient) GetKey(ctx context.Context, req *recaptchaenterprisepb.GetK var resp *recaptchaenterprisepb.Key err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetKey, req, settings.GRPC, c.logger, "GetKey") return err }, opts...) if err != nil { @@ -532,7 +536,7 @@ func (c *gRPCClient) UpdateKey(ctx context.Context, req *recaptchaenterprisepb.U var resp *recaptchaenterprisepb.Key err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateKey, req, settings.GRPC, c.logger, "UpdateKey") return err }, opts...) if err != nil { @@ -549,7 +553,7 @@ func (c *gRPCClient) DeleteKey(ctx context.Context, req *recaptchaenterprisepb.D opts = append((*c.CallOptions).DeleteKey[0:len((*c.CallOptions).DeleteKey):len((*c.CallOptions).DeleteKey)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteKey(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteKey, req, settings.GRPC, c.logger, "DeleteKey") return err }, opts...) return err @@ -564,7 +568,7 @@ func (c *gRPCClient) MigrateKey(ctx context.Context, req *recaptchaenterprisepb. var resp *recaptchaenterprisepb.Key err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MigrateKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MigrateKey, req, settings.GRPC, c.logger, "MigrateKey") return err }, opts...) if err != nil { @@ -582,7 +586,7 @@ func (c *gRPCClient) AddIpOverride(ctx context.Context, req *recaptchaenterprise var resp *recaptchaenterprisepb.AddIpOverrideResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AddIpOverride(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AddIpOverride, req, settings.GRPC, c.logger, "AddIpOverride") return err }, opts...) if err != nil { @@ -600,7 +604,7 @@ func (c *gRPCClient) RemoveIpOverride(ctx context.Context, req *recaptchaenterpr var resp *recaptchaenterprisepb.RemoveIpOverrideResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RemoveIpOverride(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RemoveIpOverride, req, settings.GRPC, c.logger, "RemoveIpOverride") return err }, opts...) if err != nil { @@ -629,7 +633,7 @@ func (c *gRPCClient) ListIpOverrides(ctx context.Context, req *recaptchaenterpri } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListIpOverrides(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListIpOverrides, req, settings.GRPC, c.logger, "ListIpOverrides") return err }, opts...) if err != nil { @@ -664,7 +668,7 @@ func (c *gRPCClient) GetMetrics(ctx context.Context, req *recaptchaenterprisepb. var resp *recaptchaenterprisepb.Metrics err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMetrics, req, settings.GRPC, c.logger, "GetMetrics") return err }, opts...) if err != nil { @@ -682,7 +686,7 @@ func (c *gRPCClient) CreateFirewallPolicy(ctx context.Context, req *recaptchaent var resp *recaptchaenterprisepb.FirewallPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFirewallPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFirewallPolicy, req, settings.GRPC, c.logger, "CreateFirewallPolicy") return err }, opts...) if err != nil { @@ -711,7 +715,7 @@ func (c *gRPCClient) ListFirewallPolicies(ctx context.Context, req *recaptchaent } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFirewallPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFirewallPolicies, req, settings.GRPC, c.logger, "ListFirewallPolicies") return err }, opts...) if err != nil { @@ -746,7 +750,7 @@ func (c *gRPCClient) GetFirewallPolicy(ctx context.Context, req *recaptchaenterp var resp *recaptchaenterprisepb.FirewallPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFirewallPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFirewallPolicy, req, settings.GRPC, c.logger, "GetFirewallPolicy") return err }, opts...) if err != nil { @@ -764,7 +768,7 @@ func (c *gRPCClient) UpdateFirewallPolicy(ctx context.Context, req *recaptchaent var resp *recaptchaenterprisepb.FirewallPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFirewallPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFirewallPolicy, req, settings.GRPC, c.logger, "UpdateFirewallPolicy") return err }, opts...) if err != nil { @@ -781,7 +785,7 @@ func (c *gRPCClient) DeleteFirewallPolicy(ctx context.Context, req *recaptchaent opts = append((*c.CallOptions).DeleteFirewallPolicy[0:len((*c.CallOptions).DeleteFirewallPolicy):len((*c.CallOptions).DeleteFirewallPolicy)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteFirewallPolicy(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteFirewallPolicy, req, settings.GRPC, c.logger, "DeleteFirewallPolicy") return err }, opts...) return err @@ -796,7 +800,7 @@ func (c *gRPCClient) ReorderFirewallPolicies(ctx context.Context, req *recaptcha var resp *recaptchaenterprisepb.ReorderFirewallPoliciesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReorderFirewallPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReorderFirewallPolicies, req, settings.GRPC, c.logger, "ReorderFirewallPolicies") return err }, opts...) if err != nil { @@ -825,7 +829,7 @@ func (c *gRPCClient) ListRelatedAccountGroups(ctx context.Context, req *recaptch } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRelatedAccountGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRelatedAccountGroups, req, settings.GRPC, c.logger, "ListRelatedAccountGroups") return err }, opts...) if err != nil { @@ -871,7 +875,7 @@ func (c *gRPCClient) ListRelatedAccountGroupMemberships(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRelatedAccountGroupMemberships(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRelatedAccountGroupMemberships, req, settings.GRPC, c.logger, "ListRelatedAccountGroupMemberships") return err }, opts...) if err != nil { @@ -917,7 +921,7 @@ func (c *gRPCClient) SearchRelatedAccountGroupMemberships(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchRelatedAccountGroupMemberships(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchRelatedAccountGroupMemberships, req, settings.GRPC, c.logger, "SearchRelatedAccountGroupMemberships") return err }, opts...) if err != nil { diff --git a/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_go123_test.go b/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_go123_test.go index 087f468f9063..954b6fcfe954 100644 --- a/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_go123_test.go +++ b/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListFirewallPolicies_all() { } for resp, err := range c.ListFirewallPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListIpOverrides_all() { } for resp, err := range c.ListIpOverrides(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListKeys_all() { } for resp, err := range c.ListKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListRelatedAccountGroupMemberships_all() { } for resp, err := range c.ListRelatedAccountGroupMemberships(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListRelatedAccountGroups_all() { } for resp, err := range c.ListRelatedAccountGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_SearchRelatedAccountGroupMemberships_all() { } for resp, err := range c.SearchRelatedAccountGroupMemberships(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recaptchaenterprise/apiv1/recaptchaenterprisepb/recaptchaenterprise.pb.go b/recaptchaenterprise/apiv1/recaptchaenterprisepb/recaptchaenterprise.pb.go index 862f8d02f29f..3db4e9710793 100755 --- a/recaptchaenterprise/apiv1/recaptchaenterprisepb/recaptchaenterprise.pb.go +++ b/recaptchaenterprise/apiv1/recaptchaenterprisepb/recaptchaenterprise.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -1280,11 +1280,9 @@ type CreateAssessmentRequest struct { func (x *CreateAssessmentRequest) Reset() { *x = CreateAssessmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssessmentRequest) String() string { @@ -1295,7 +1293,7 @@ func (*CreateAssessmentRequest) ProtoMessage() {} func (x *CreateAssessmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1347,11 +1345,9 @@ type TransactionEvent struct { func (x *TransactionEvent) Reset() { *x = TransactionEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionEvent) String() string { @@ -1362,7 +1358,7 @@ func (*TransactionEvent) ProtoMessage() {} func (x *TransactionEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1436,11 +1432,9 @@ type AnnotateAssessmentRequest struct { func (x *AnnotateAssessmentRequest) Reset() { *x = AnnotateAssessmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateAssessmentRequest) String() string { @@ -1451,7 +1445,7 @@ func (*AnnotateAssessmentRequest) ProtoMessage() {} func (x *AnnotateAssessmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1517,11 +1511,9 @@ type AnnotateAssessmentResponse struct { func (x *AnnotateAssessmentResponse) Reset() { *x = AnnotateAssessmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateAssessmentResponse) String() string { @@ -1532,7 +1524,7 @@ func (*AnnotateAssessmentResponse) ProtoMessage() {} func (x *AnnotateAssessmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1560,9 @@ type EndpointVerificationInfo struct { func (x *EndpointVerificationInfo) Reset() { *x = EndpointVerificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EndpointVerificationInfo) String() string { @@ -1583,7 +1573,7 @@ func (*EndpointVerificationInfo) ProtoMessage() {} func (x *EndpointVerificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1664,9 @@ type AccountVerificationInfo struct { func (x *AccountVerificationInfo) Reset() { *x = AccountVerificationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountVerificationInfo) String() string { @@ -1689,7 +1677,7 @@ func (*AccountVerificationInfo) ProtoMessage() {} func (x *AccountVerificationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1759,11 +1747,9 @@ type PrivatePasswordLeakVerification struct { func (x *PrivatePasswordLeakVerification) Reset() { *x = PrivatePasswordLeakVerification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivatePasswordLeakVerification) String() string { @@ -1774,7 +1760,7 @@ func (*PrivatePasswordLeakVerification) ProtoMessage() {} func (x *PrivatePasswordLeakVerification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1849,9 @@ type Assessment struct { func (x *Assessment) Reset() { *x = Assessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assessment) String() string { @@ -1878,7 +1862,7 @@ func (*Assessment) ProtoMessage() {} func (x *Assessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2037,11 +2021,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -2052,7 +2034,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2224,11 +2206,9 @@ type TransactionData struct { func (x *TransactionData) Reset() { *x = TransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData) String() string { @@ -2239,7 +2219,7 @@ func (*TransactionData) ProtoMessage() {} func (x *TransactionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2367,11 +2347,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -2382,7 +2360,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2434,11 +2412,9 @@ type UserId struct { func (x *UserId) Reset() { *x = UserId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserId) String() string { @@ -2449,7 +2425,7 @@ func (*UserId) ProtoMessage() {} func (x *UserId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2541,11 +2517,9 @@ type RiskAnalysis struct { func (x *RiskAnalysis) Reset() { *x = RiskAnalysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RiskAnalysis) String() string { @@ -2556,7 +2530,7 @@ func (*RiskAnalysis) ProtoMessage() {} func (x *RiskAnalysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2630,11 +2604,9 @@ type TokenProperties struct { func (x *TokenProperties) Reset() { *x = TokenProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenProperties) String() string { @@ -2645,7 +2617,7 @@ func (*TokenProperties) ProtoMessage() {} func (x *TokenProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2731,11 +2703,9 @@ type FraudPreventionAssessment struct { func (x *FraudPreventionAssessment) Reset() { *x = FraudPreventionAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment) String() string { @@ -2746,7 +2716,7 @@ func (*FraudPreventionAssessment) ProtoMessage() {} func (x *FraudPreventionAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2804,11 +2774,9 @@ type FraudSignals struct { func (x *FraudSignals) Reset() { *x = FraudSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudSignals) String() string { @@ -2819,7 +2787,7 @@ func (*FraudSignals) ProtoMessage() {} func (x *FraudSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2831,9 @@ type SmsTollFraudVerdict struct { func (x *SmsTollFraudVerdict) Reset() { *x = SmsTollFraudVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SmsTollFraudVerdict) String() string { @@ -2878,7 +2844,7 @@ func (*SmsTollFraudVerdict) ProtoMessage() {} func (x *SmsTollFraudVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2919,11 +2885,9 @@ type PhoneFraudAssessment struct { func (x *PhoneFraudAssessment) Reset() { *x = PhoneFraudAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhoneFraudAssessment) String() string { @@ -2934,7 +2898,7 @@ func (*PhoneFraudAssessment) ProtoMessage() {} func (x *PhoneFraudAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2968,11 +2932,9 @@ type AccountDefenderAssessment struct { func (x *AccountDefenderAssessment) Reset() { *x = AccountDefenderAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountDefenderAssessment) String() string { @@ -2983,7 +2945,7 @@ func (*AccountDefenderAssessment) ProtoMessage() {} func (x *AccountDefenderAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3020,11 +2982,9 @@ type CreateKeyRequest struct { func (x *CreateKeyRequest) Reset() { *x = CreateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateKeyRequest) String() string { @@ -3035,7 +2995,7 @@ func (*CreateKeyRequest) ProtoMessage() {} func (x *CreateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3083,11 +3043,9 @@ type ListKeysRequest struct { func (x *ListKeysRequest) Reset() { *x = ListKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeysRequest) String() string { @@ -3098,7 +3056,7 @@ func (*ListKeysRequest) ProtoMessage() {} func (x *ListKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3149,11 +3107,9 @@ type ListKeysResponse struct { func (x *ListKeysResponse) Reset() { *x = ListKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListKeysResponse) String() string { @@ -3164,7 +3120,7 @@ func (*ListKeysResponse) ProtoMessage() {} func (x *ListKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3206,11 +3162,9 @@ type RetrieveLegacySecretKeyRequest struct { func (x *RetrieveLegacySecretKeyRequest) Reset() { *x = RetrieveLegacySecretKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveLegacySecretKeyRequest) String() string { @@ -3221,7 +3175,7 @@ func (*RetrieveLegacySecretKeyRequest) ProtoMessage() {} func (x *RetrieveLegacySecretKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3256,11 +3210,9 @@ type GetKeyRequest struct { func (x *GetKeyRequest) Reset() { *x = GetKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetKeyRequest) String() string { @@ -3271,7 +3223,7 @@ func (*GetKeyRequest) ProtoMessage() {} func (x *GetKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3308,11 +3260,9 @@ type UpdateKeyRequest struct { func (x *UpdateKeyRequest) Reset() { *x = UpdateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateKeyRequest) String() string { @@ -3323,7 +3273,7 @@ func (*UpdateKeyRequest) ProtoMessage() {} func (x *UpdateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3365,11 +3315,9 @@ type DeleteKeyRequest struct { func (x *DeleteKeyRequest) Reset() { *x = DeleteKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteKeyRequest) String() string { @@ -3380,7 +3328,7 @@ func (*DeleteKeyRequest) ProtoMessage() {} func (x *DeleteKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3417,11 +3365,9 @@ type CreateFirewallPolicyRequest struct { func (x *CreateFirewallPolicyRequest) Reset() { *x = CreateFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFirewallPolicyRequest) String() string { @@ -3432,7 +3378,7 @@ func (*CreateFirewallPolicyRequest) ProtoMessage() {} func (x *CreateFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3480,11 +3426,9 @@ type ListFirewallPoliciesRequest struct { func (x *ListFirewallPoliciesRequest) Reset() { *x = ListFirewallPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirewallPoliciesRequest) String() string { @@ -3495,7 +3439,7 @@ func (*ListFirewallPoliciesRequest) ProtoMessage() {} func (x *ListFirewallPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3546,11 +3490,9 @@ type ListFirewallPoliciesResponse struct { func (x *ListFirewallPoliciesResponse) Reset() { *x = ListFirewallPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFirewallPoliciesResponse) String() string { @@ -3561,7 +3503,7 @@ func (*ListFirewallPoliciesResponse) ProtoMessage() {} func (x *ListFirewallPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3603,11 +3545,9 @@ type GetFirewallPolicyRequest struct { func (x *GetFirewallPolicyRequest) Reset() { *x = GetFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFirewallPolicyRequest) String() string { @@ -3618,7 +3558,7 @@ func (*GetFirewallPolicyRequest) ProtoMessage() {} func (x *GetFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3655,11 +3595,9 @@ type UpdateFirewallPolicyRequest struct { func (x *UpdateFirewallPolicyRequest) Reset() { *x = UpdateFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFirewallPolicyRequest) String() string { @@ -3670,7 +3608,7 @@ func (*UpdateFirewallPolicyRequest) ProtoMessage() {} func (x *UpdateFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3712,11 +3650,9 @@ type DeleteFirewallPolicyRequest struct { func (x *DeleteFirewallPolicyRequest) Reset() { *x = DeleteFirewallPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFirewallPolicyRequest) String() string { @@ -3727,7 +3663,7 @@ func (*DeleteFirewallPolicyRequest) ProtoMessage() {} func (x *DeleteFirewallPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3765,11 +3701,9 @@ type ReorderFirewallPoliciesRequest struct { func (x *ReorderFirewallPoliciesRequest) Reset() { *x = ReorderFirewallPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReorderFirewallPoliciesRequest) String() string { @@ -3780,7 +3714,7 @@ func (*ReorderFirewallPoliciesRequest) ProtoMessage() {} func (x *ReorderFirewallPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3818,11 +3752,9 @@ type ReorderFirewallPoliciesResponse struct { func (x *ReorderFirewallPoliciesResponse) Reset() { *x = ReorderFirewallPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReorderFirewallPoliciesResponse) String() string { @@ -3833,7 +3765,7 @@ func (*ReorderFirewallPoliciesResponse) ProtoMessage() {} func (x *ReorderFirewallPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3870,11 +3802,9 @@ type MigrateKeyRequest struct { func (x *MigrateKeyRequest) Reset() { *x = MigrateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrateKeyRequest) String() string { @@ -3885,7 +3815,7 @@ func (*MigrateKeyRequest) ProtoMessage() {} func (x *MigrateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3927,11 +3857,9 @@ type GetMetricsRequest struct { func (x *GetMetricsRequest) Reset() { *x = GetMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMetricsRequest) String() string { @@ -3942,7 +3870,7 @@ func (*GetMetricsRequest) ProtoMessage() {} func (x *GetMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3986,11 +3914,9 @@ type Metrics struct { func (x *Metrics) Reset() { *x = Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Metrics) String() string { @@ -4001,7 +3927,7 @@ func (*Metrics) ProtoMessage() {} func (x *Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4060,11 +3986,9 @@ type RetrieveLegacySecretKeyResponse struct { func (x *RetrieveLegacySecretKeyResponse) Reset() { *x = RetrieveLegacySecretKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveLegacySecretKeyResponse) String() string { @@ -4075,7 +3999,7 @@ func (*RetrieveLegacySecretKeyResponse) ProtoMessage() {} func (x *RetrieveLegacySecretKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4132,11 +4056,9 @@ type Key struct { func (x *Key) Reset() { *x = Key{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Key) String() string { @@ -4147,7 +4069,7 @@ func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4288,11 +4210,9 @@ type TestingOptions struct { func (x *TestingOptions) Reset() { *x = TestingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestingOptions) String() string { @@ -4303,7 +4223,7 @@ func (*TestingOptions) ProtoMessage() {} func (x *TestingOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4358,11 +4278,9 @@ type WebKeySettings struct { func (x *WebKeySettings) Reset() { *x = WebKeySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebKeySettings) String() string { @@ -4373,7 +4291,7 @@ func (*WebKeySettings) ProtoMessage() {} func (x *WebKeySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4442,11 +4360,9 @@ type AndroidKeySettings struct { func (x *AndroidKeySettings) Reset() { *x = AndroidKeySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AndroidKeySettings) String() string { @@ -4457,7 +4373,7 @@ func (*AndroidKeySettings) ProtoMessage() {} func (x *AndroidKeySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4514,11 +4430,9 @@ type IOSKeySettings struct { func (x *IOSKeySettings) Reset() { *x = IOSKeySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IOSKeySettings) String() string { @@ -4529,7 +4443,7 @@ func (*IOSKeySettings) ProtoMessage() {} func (x *IOSKeySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4574,11 +4488,9 @@ type ExpressKeySettings struct { func (x *ExpressKeySettings) Reset() { *x = ExpressKeySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpressKeySettings) String() string { @@ -4589,7 +4501,7 @@ func (*ExpressKeySettings) ProtoMessage() {} func (x *ExpressKeySettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4623,11 +4535,9 @@ type AppleDeveloperId struct { func (x *AppleDeveloperId) Reset() { *x = AppleDeveloperId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppleDeveloperId) String() string { @@ -4638,7 +4548,7 @@ func (*AppleDeveloperId) ProtoMessage() {} func (x *AppleDeveloperId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4688,11 +4598,9 @@ type ScoreDistribution struct { func (x *ScoreDistribution) Reset() { *x = ScoreDistribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScoreDistribution) String() string { @@ -4703,7 +4611,7 @@ func (*ScoreDistribution) ProtoMessage() {} func (x *ScoreDistribution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4740,11 +4648,9 @@ type ScoreMetrics struct { func (x *ScoreMetrics) Reset() { *x = ScoreMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScoreMetrics) String() string { @@ -4755,7 +4661,7 @@ func (*ScoreMetrics) ProtoMessage() {} func (x *ScoreMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4806,11 +4712,9 @@ type ChallengeMetrics struct { func (x *ChallengeMetrics) Reset() { *x = ChallengeMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChallengeMetrics) String() string { @@ -4821,7 +4725,7 @@ func (*ChallengeMetrics) ProtoMessage() {} func (x *ChallengeMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4881,11 +4785,9 @@ type FirewallPolicyAssessment struct { func (x *FirewallPolicyAssessment) Reset() { *x = FirewallPolicyAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicyAssessment) String() string { @@ -4896,7 +4798,7 @@ func (*FirewallPolicyAssessment) ProtoMessage() {} func (x *FirewallPolicyAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4945,11 +4847,9 @@ type FirewallAction struct { func (x *FirewallAction) Reset() { *x = FirewallAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction) String() string { @@ -4960,7 +4860,7 @@ func (*FirewallAction) ProtoMessage() {} func (x *FirewallAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5116,11 +5016,9 @@ type FirewallPolicy struct { func (x *FirewallPolicy) Reset() { *x = FirewallPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallPolicy) String() string { @@ -5131,7 +5029,7 @@ func (*FirewallPolicy) ProtoMessage() {} func (x *FirewallPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5205,11 +5103,9 @@ type ListRelatedAccountGroupMembershipsRequest struct { func (x *ListRelatedAccountGroupMembershipsRequest) Reset() { *x = ListRelatedAccountGroupMembershipsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelatedAccountGroupMembershipsRequest) String() string { @@ -5220,7 +5116,7 @@ func (*ListRelatedAccountGroupMembershipsRequest) ProtoMessage() {} func (x *ListRelatedAccountGroupMembershipsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5271,11 +5167,9 @@ type ListRelatedAccountGroupMembershipsResponse struct { func (x *ListRelatedAccountGroupMembershipsResponse) Reset() { *x = ListRelatedAccountGroupMembershipsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelatedAccountGroupMembershipsResponse) String() string { @@ -5286,7 +5180,7 @@ func (*ListRelatedAccountGroupMembershipsResponse) ProtoMessage() {} func (x *ListRelatedAccountGroupMembershipsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5339,11 +5233,9 @@ type ListRelatedAccountGroupsRequest struct { func (x *ListRelatedAccountGroupsRequest) Reset() { *x = ListRelatedAccountGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelatedAccountGroupsRequest) String() string { @@ -5354,7 +5246,7 @@ func (*ListRelatedAccountGroupsRequest) ProtoMessage() {} func (x *ListRelatedAccountGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5405,11 +5297,9 @@ type ListRelatedAccountGroupsResponse struct { func (x *ListRelatedAccountGroupsResponse) Reset() { *x = ListRelatedAccountGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelatedAccountGroupsResponse) String() string { @@ -5420,7 +5310,7 @@ func (*ListRelatedAccountGroupsResponse) ProtoMessage() {} func (x *ListRelatedAccountGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5488,11 +5378,9 @@ type SearchRelatedAccountGroupMembershipsRequest struct { func (x *SearchRelatedAccountGroupMembershipsRequest) Reset() { *x = SearchRelatedAccountGroupMembershipsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRelatedAccountGroupMembershipsRequest) String() string { @@ -5503,7 +5391,7 @@ func (*SearchRelatedAccountGroupMembershipsRequest) ProtoMessage() {} func (x *SearchRelatedAccountGroupMembershipsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5569,11 +5457,9 @@ type SearchRelatedAccountGroupMembershipsResponse struct { func (x *SearchRelatedAccountGroupMembershipsResponse) Reset() { *x = SearchRelatedAccountGroupMembershipsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRelatedAccountGroupMembershipsResponse) String() string { @@ -5584,7 +5470,7 @@ func (*SearchRelatedAccountGroupMembershipsResponse) ProtoMessage() {} func (x *SearchRelatedAccountGroupMembershipsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5628,11 +5514,9 @@ type AddIpOverrideRequest struct { func (x *AddIpOverrideRequest) Reset() { *x = AddIpOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddIpOverrideRequest) String() string { @@ -5643,7 +5527,7 @@ func (*AddIpOverrideRequest) ProtoMessage() {} func (x *AddIpOverrideRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5681,11 +5565,9 @@ type AddIpOverrideResponse struct { func (x *AddIpOverrideResponse) Reset() { *x = AddIpOverrideResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddIpOverrideResponse) String() string { @@ -5696,7 +5578,7 @@ func (*AddIpOverrideResponse) ProtoMessage() {} func (x *AddIpOverrideResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5726,11 +5608,9 @@ type RemoveIpOverrideRequest struct { func (x *RemoveIpOverrideRequest) Reset() { *x = RemoveIpOverrideRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIpOverrideRequest) String() string { @@ -5741,7 +5621,7 @@ func (*RemoveIpOverrideRequest) ProtoMessage() {} func (x *RemoveIpOverrideRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5779,11 +5659,9 @@ type RemoveIpOverrideResponse struct { func (x *RemoveIpOverrideResponse) Reset() { *x = RemoveIpOverrideResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIpOverrideResponse) String() string { @@ -5794,7 +5672,7 @@ func (*RemoveIpOverrideResponse) ProtoMessage() {} func (x *RemoveIpOverrideResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5830,11 +5708,9 @@ type ListIpOverridesRequest struct { func (x *ListIpOverridesRequest) Reset() { *x = ListIpOverridesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIpOverridesRequest) String() string { @@ -5845,7 +5721,7 @@ func (*ListIpOverridesRequest) ProtoMessage() {} func (x *ListIpOverridesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5896,11 +5772,9 @@ type ListIpOverridesResponse struct { func (x *ListIpOverridesResponse) Reset() { *x = ListIpOverridesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIpOverridesResponse) String() string { @@ -5911,7 +5785,7 @@ func (*ListIpOverridesResponse) ProtoMessage() {} func (x *ListIpOverridesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5964,11 +5838,9 @@ type RelatedAccountGroupMembership struct { func (x *RelatedAccountGroupMembership) Reset() { *x = RelatedAccountGroupMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedAccountGroupMembership) String() string { @@ -5979,7 +5851,7 @@ func (*RelatedAccountGroupMembership) ProtoMessage() {} func (x *RelatedAccountGroupMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6030,11 +5902,9 @@ type RelatedAccountGroup struct { func (x *RelatedAccountGroup) Reset() { *x = RelatedAccountGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelatedAccountGroup) String() string { @@ -6045,7 +5915,7 @@ func (*RelatedAccountGroup) ProtoMessage() {} func (x *RelatedAccountGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6082,11 +5952,9 @@ type WafSettings struct { func (x *WafSettings) Reset() { *x = WafSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WafSettings) String() string { @@ -6097,7 +5965,7 @@ func (*WafSettings) ProtoMessage() {} func (x *WafSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6147,11 +6015,9 @@ type AssessmentEnvironment struct { func (x *AssessmentEnvironment) Reset() { *x = AssessmentEnvironment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssessmentEnvironment) String() string { @@ -6162,7 +6028,7 @@ func (*AssessmentEnvironment) ProtoMessage() {} func (x *AssessmentEnvironment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6211,11 +6077,9 @@ type IpOverrideData struct { func (x *IpOverrideData) Reset() { *x = IpOverrideData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IpOverrideData) String() string { @@ -6226,7 +6090,7 @@ func (*IpOverrideData) ProtoMessage() {} func (x *IpOverrideData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6281,11 +6145,9 @@ type TransactionData_Address struct { func (x *TransactionData_Address) Reset() { *x = TransactionData_Address{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_Address) String() string { @@ -6296,7 +6158,7 @@ func (*TransactionData_Address) ProtoMessage() {} func (x *TransactionData_Address) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6379,11 +6241,9 @@ type TransactionData_User struct { func (x *TransactionData_User) Reset() { *x = TransactionData_User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_User) String() string { @@ -6394,7 +6254,7 @@ func (*TransactionData_User) ProtoMessage() {} func (x *TransactionData_User) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6471,11 +6331,9 @@ type TransactionData_Item struct { func (x *TransactionData_Item) Reset() { *x = TransactionData_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_Item) String() string { @@ -6486,7 +6344,7 @@ func (*TransactionData_Item) ProtoMessage() {} func (x *TransactionData_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6550,11 +6408,9 @@ type TransactionData_GatewayInfo struct { func (x *TransactionData_GatewayInfo) Reset() { *x = TransactionData_GatewayInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_GatewayInfo) String() string { @@ -6565,7 +6421,7 @@ func (*TransactionData_GatewayInfo) ProtoMessage() {} func (x *TransactionData_GatewayInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6622,11 +6478,9 @@ type FraudPreventionAssessment_StolenInstrumentVerdict struct { func (x *FraudPreventionAssessment_StolenInstrumentVerdict) Reset() { *x = FraudPreventionAssessment_StolenInstrumentVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_StolenInstrumentVerdict) String() string { @@ -6637,7 +6491,7 @@ func (*FraudPreventionAssessment_StolenInstrumentVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_StolenInstrumentVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6673,11 +6527,9 @@ type FraudPreventionAssessment_CardTestingVerdict struct { func (x *FraudPreventionAssessment_CardTestingVerdict) Reset() { *x = FraudPreventionAssessment_CardTestingVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_CardTestingVerdict) String() string { @@ -6688,7 +6540,7 @@ func (*FraudPreventionAssessment_CardTestingVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_CardTestingVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6724,11 +6576,9 @@ type FraudPreventionAssessment_BehavioralTrustVerdict struct { func (x *FraudPreventionAssessment_BehavioralTrustVerdict) Reset() { *x = FraudPreventionAssessment_BehavioralTrustVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_BehavioralTrustVerdict) String() string { @@ -6739,7 +6589,7 @@ func (*FraudPreventionAssessment_BehavioralTrustVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_BehavioralTrustVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6778,11 +6628,9 @@ type FraudSignals_UserSignals struct { func (x *FraudSignals_UserSignals) Reset() { *x = FraudSignals_UserSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudSignals_UserSignals) String() string { @@ -6793,7 +6641,7 @@ func (*FraudSignals_UserSignals) ProtoMessage() {} func (x *FraudSignals_UserSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6834,11 +6682,9 @@ type FraudSignals_CardSignals struct { func (x *FraudSignals_CardSignals) Reset() { *x = FraudSignals_CardSignals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudSignals_CardSignals) String() string { @@ -6849,7 +6695,7 @@ func (*FraudSignals_CardSignals) ProtoMessage() {} func (x *FraudSignals_CardSignals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6880,11 +6726,9 @@ type FirewallAction_AllowAction struct { func (x *FirewallAction_AllowAction) Reset() { *x = FirewallAction_AllowAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_AllowAction) String() string { @@ -6895,7 +6739,7 @@ func (*FirewallAction_AllowAction) ProtoMessage() {} func (x *FirewallAction_AllowAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6920,11 +6764,9 @@ type FirewallAction_BlockAction struct { func (x *FirewallAction_BlockAction) Reset() { *x = FirewallAction_BlockAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_BlockAction) String() string { @@ -6935,7 +6777,7 @@ func (*FirewallAction_BlockAction) ProtoMessage() {} func (x *FirewallAction_BlockAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6963,11 +6805,9 @@ type FirewallAction_IncludeRecaptchaScriptAction struct { func (x *FirewallAction_IncludeRecaptchaScriptAction) Reset() { *x = FirewallAction_IncludeRecaptchaScriptAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_IncludeRecaptchaScriptAction) String() string { @@ -6978,7 +6818,7 @@ func (*FirewallAction_IncludeRecaptchaScriptAction) ProtoMessage() {} func (x *FirewallAction_IncludeRecaptchaScriptAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7003,11 +6843,9 @@ type FirewallAction_RedirectAction struct { func (x *FirewallAction_RedirectAction) Reset() { *x = FirewallAction_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_RedirectAction) String() string { @@ -7018,7 +6856,7 @@ func (*FirewallAction_RedirectAction) ProtoMessage() {} func (x *FirewallAction_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7047,11 +6885,9 @@ type FirewallAction_SubstituteAction struct { func (x *FirewallAction_SubstituteAction) Reset() { *x = FirewallAction_SubstituteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_SubstituteAction) String() string { @@ -7062,7 +6898,7 @@ func (*FirewallAction_SubstituteAction) ProtoMessage() {} func (x *FirewallAction_SubstituteAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7100,11 +6936,9 @@ type FirewallAction_SetHeaderAction struct { func (x *FirewallAction_SetHeaderAction) Reset() { *x = FirewallAction_SetHeaderAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FirewallAction_SetHeaderAction) String() string { @@ -7115,7 +6949,7 @@ func (*FirewallAction_SetHeaderAction) ProtoMessage() {} func (x *FirewallAction_SetHeaderAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9092,1004 +8926,6 @@ func file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_init() { if File_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssessmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TransactionEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateAssessmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateAssessmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EndpointVerificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AccountVerificationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PrivatePasswordLeakVerification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Assessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UserId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RiskAnalysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TokenProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FraudSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SmsTollFraudVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PhoneFraudAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AccountDefenderAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveLegacySecretKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DeleteKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListFirewallPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListFirewallPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFirewallPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ReorderFirewallPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ReorderFirewallPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*MigrateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*GetMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveLegacySecretKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*TestingOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*WebKeySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AndroidKeySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*IOSKeySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ExpressKeySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*AppleDeveloperId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ScoreDistribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ScoreMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ChallengeMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicyAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*FirewallPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListRelatedAccountGroupMembershipsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ListRelatedAccountGroupMembershipsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ListRelatedAccountGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*ListRelatedAccountGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*SearchRelatedAccountGroupMembershipsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*SearchRelatedAccountGroupMembershipsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*AddIpOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*AddIpOverrideResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIpOverrideRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIpOverrideResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ListIpOverridesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*ListIpOverridesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*RelatedAccountGroupMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*RelatedAccountGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*WafSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*AssessmentEnvironment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*IpOverrideData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_GatewayInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_StolenInstrumentVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_CardTestingVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_BehavioralTrustVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*FraudSignals_UserSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*FraudSignals_CardSignals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_AllowAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_BlockAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_IncludeRecaptchaScriptAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_SubstituteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*FirewallAction_SetHeaderAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recaptchaenterprise_v1_recaptchaenterprise_proto_msgTypes[4].OneofWrappers = []any{ (*EndpointVerificationInfo_EmailAddress)(nil), (*EndpointVerificationInfo_PhoneNumber)(nil), diff --git a/recaptchaenterprise/apiv1beta1/helpers.go b/recaptchaenterprise/apiv1beta1/helpers.go index f9a798f79e98..300167fad331 100755 --- a/recaptchaenterprise/apiv1beta1/helpers.go +++ b/recaptchaenterprise/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package recaptchaenterprise import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "recaptchaenterprise.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/recaptchaenterprise/apiv1beta1/recaptcha_enterprise_service_v1_beta1_client.go b/recaptchaenterprise/apiv1beta1/recaptcha_enterprise_service_v1_beta1_client.go index b832e791d0f6..15f5f59d2019 100755 --- a/recaptchaenterprise/apiv1beta1/recaptcha_enterprise_service_v1_beta1_client.go +++ b/recaptchaenterprise/apiv1beta1/recaptcha_enterprise_service_v1_beta1_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( recaptchaenterprisepb "cloud.google.com/go/recaptchaenterprise/v2/apiv1beta1/recaptchaenterprisepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -152,6 +151,8 @@ type recaptchaEnterpriseServiceV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRecaptchaEnterpriseServiceV1Beta1Client creates a new recaptcha enterprise service v1 beta1 client based on gRPC. @@ -178,6 +179,7 @@ func NewRecaptchaEnterpriseServiceV1Beta1Client(ctx context.Context, opts ...opt connPool: connPool, recaptchaEnterpriseServiceV1Beta1Client: recaptchaenterprisepb.NewRecaptchaEnterpriseServiceV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -224,6 +226,8 @@ type recaptchaEnterpriseServiceV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing RecaptchaEnterpriseServiceV1Beta1Client CallOptions **RecaptchaEnterpriseServiceV1Beta1CallOptions + + logger *slog.Logger } // NewRecaptchaEnterpriseServiceV1Beta1RESTClient creates a new recaptcha enterprise service v1 beta1 rest client. @@ -241,6 +245,7 @@ func NewRecaptchaEnterpriseServiceV1Beta1RESTClient(ctx context.Context, opts .. endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -293,7 +298,7 @@ func (c *recaptchaEnterpriseServiceV1Beta1GRPCClient) CreateAssessment(ctx conte var resp *recaptchaenterprisepb.Assessment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.recaptchaEnterpriseServiceV1Beta1Client.CreateAssessment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.recaptchaEnterpriseServiceV1Beta1Client.CreateAssessment, req, settings.GRPC, c.logger, "CreateAssessment") return err }, opts...) if err != nil { @@ -311,7 +316,7 @@ func (c *recaptchaEnterpriseServiceV1Beta1GRPCClient) AnnotateAssessment(ctx con var resp *recaptchaenterprisepb.AnnotateAssessmentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.recaptchaEnterpriseServiceV1Beta1Client.AnnotateAssessment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.recaptchaEnterpriseServiceV1Beta1Client.AnnotateAssessment, req, settings.GRPC, c.logger, "AnnotateAssessment") return err }, opts...) if err != nil { @@ -360,17 +365,7 @@ func (c *recaptchaEnterpriseServiceV1Beta1RESTClient) CreateAssessment(ctx conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAssessment") if err != nil { return err } @@ -427,17 +422,7 @@ func (c *recaptchaEnterpriseServiceV1Beta1RESTClient) AnnotateAssessment(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateAssessment") if err != nil { return err } diff --git a/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb/recaptchaenterprise.pb.go b/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb/recaptchaenterprise.pb.go index cfd750a921f2..7a2371f4d54e 100755 --- a/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb/recaptchaenterprise.pb.go +++ b/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb/recaptchaenterprise.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -676,11 +676,9 @@ type CreateAssessmentRequest struct { func (x *CreateAssessmentRequest) Reset() { *x = CreateAssessmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssessmentRequest) String() string { @@ -691,7 +689,7 @@ func (*CreateAssessmentRequest) ProtoMessage() {} func (x *CreateAssessmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +741,9 @@ type TransactionEvent struct { func (x *TransactionEvent) Reset() { *x = TransactionEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionEvent) String() string { @@ -758,7 +754,7 @@ func (*TransactionEvent) ProtoMessage() {} func (x *TransactionEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +825,9 @@ type AnnotateAssessmentRequest struct { func (x *AnnotateAssessmentRequest) Reset() { *x = AnnotateAssessmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateAssessmentRequest) String() string { @@ -844,7 +838,7 @@ func (*AnnotateAssessmentRequest) ProtoMessage() {} func (x *AnnotateAssessmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -903,11 +897,9 @@ type AnnotateAssessmentResponse struct { func (x *AnnotateAssessmentResponse) Reset() { *x = AnnotateAssessmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateAssessmentResponse) String() string { @@ -918,7 +910,7 @@ func (*AnnotateAssessmentResponse) ProtoMessage() {} func (x *AnnotateAssessmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -953,11 +945,9 @@ type PasswordLeakVerification struct { func (x *PasswordLeakVerification) Reset() { *x = PasswordLeakVerification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PasswordLeakVerification) String() string { @@ -968,7 +958,7 @@ func (*PasswordLeakVerification) ProtoMessage() {} func (x *PasswordLeakVerification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1037,11 +1027,9 @@ type Assessment struct { func (x *Assessment) Reset() { *x = Assessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assessment) String() string { @@ -1052,7 +1040,7 @@ func (*Assessment) ProtoMessage() {} func (x *Assessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1157,11 +1145,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -1172,7 +1158,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1277,9 @@ type TransactionData struct { func (x *TransactionData) Reset() { *x = TransactionData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData) String() string { @@ -1306,7 +1290,7 @@ func (*TransactionData) ProtoMessage() {} func (x *TransactionData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1419,9 @@ type TokenProperties struct { func (x *TokenProperties) Reset() { *x = TokenProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TokenProperties) String() string { @@ -1450,7 +1432,7 @@ func (*TokenProperties) ProtoMessage() {} func (x *TokenProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,11 +1502,9 @@ type FraudPreventionAssessment struct { func (x *FraudPreventionAssessment) Reset() { *x = FraudPreventionAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment) String() string { @@ -1535,7 +1515,7 @@ func (*FraudPreventionAssessment) ProtoMessage() {} func (x *FraudPreventionAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1590,11 +1570,9 @@ type AccountDefenderAssessment struct { func (x *AccountDefenderAssessment) Reset() { *x = AccountDefenderAssessment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountDefenderAssessment) String() string { @@ -1605,7 +1583,7 @@ func (*AccountDefenderAssessment) ProtoMessage() {} func (x *AccountDefenderAssessment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1651,11 +1629,9 @@ type TransactionData_Address struct { func (x *TransactionData_Address) Reset() { *x = TransactionData_Address{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_Address) String() string { @@ -1666,7 +1642,7 @@ func (*TransactionData_Address) ProtoMessage() {} func (x *TransactionData_Address) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1749,11 +1725,9 @@ type TransactionData_User struct { func (x *TransactionData_User) Reset() { *x = TransactionData_User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_User) String() string { @@ -1764,7 +1738,7 @@ func (*TransactionData_User) ProtoMessage() {} func (x *TransactionData_User) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1841,11 +1815,9 @@ type TransactionData_Item struct { func (x *TransactionData_Item) Reset() { *x = TransactionData_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_Item) String() string { @@ -1856,7 +1828,7 @@ func (*TransactionData_Item) ProtoMessage() {} func (x *TransactionData_Item) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1919,11 +1891,9 @@ type TransactionData_GatewayInfo struct { func (x *TransactionData_GatewayInfo) Reset() { *x = TransactionData_GatewayInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionData_GatewayInfo) String() string { @@ -1934,7 +1904,7 @@ func (*TransactionData_GatewayInfo) ProtoMessage() {} func (x *TransactionData_GatewayInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1961,9 @@ type FraudPreventionAssessment_StolenInstrumentVerdict struct { func (x *FraudPreventionAssessment_StolenInstrumentVerdict) Reset() { *x = FraudPreventionAssessment_StolenInstrumentVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_StolenInstrumentVerdict) String() string { @@ -2006,7 +1974,7 @@ func (*FraudPreventionAssessment_StolenInstrumentVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_StolenInstrumentVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2042,11 +2010,9 @@ type FraudPreventionAssessment_CardTestingVerdict struct { func (x *FraudPreventionAssessment_CardTestingVerdict) Reset() { *x = FraudPreventionAssessment_CardTestingVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_CardTestingVerdict) String() string { @@ -2057,7 +2023,7 @@ func (*FraudPreventionAssessment_CardTestingVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_CardTestingVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,11 +2058,9 @@ type FraudPreventionAssessment_BehavioralTrustVerdict struct { func (x *FraudPreventionAssessment_BehavioralTrustVerdict) Reset() { *x = FraudPreventionAssessment_BehavioralTrustVerdict{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FraudPreventionAssessment_BehavioralTrustVerdict) String() string { @@ -2107,7 +2071,7 @@ func (*FraudPreventionAssessment_BehavioralTrustVerdict) ProtoMessage() {} func (x *FraudPreventionAssessment_BehavioralTrustVerdict) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2713,224 +2677,6 @@ func file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_ini if File_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssessmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TransactionEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateAssessmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateAssessmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PasswordLeakVerification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Assessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TokenProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AccountDefenderAssessment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TransactionData_GatewayInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_StolenInstrumentVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_CardTestingVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*FraudPreventionAssessment_BehavioralTrustVerdict); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recaptchaenterprise_v1beta1_recaptchaenterprise_proto_msgTypes[7].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/recommendationengine/apiv1beta1/catalog_client.go b/recommendationengine/apiv1beta1/catalog_client.go index 3158796bd5aa..f039d35ca747 100755 --- a/recommendationengine/apiv1beta1/catalog_client.go +++ b/recommendationengine/apiv1beta1/catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" recommendationenginepb "cloud.google.com/go/recommendationengine/apiv1beta1/recommendationenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -346,6 +345,8 @@ type catalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCatalogClient creates a new catalog service client based on gRPC. @@ -372,6 +373,7 @@ func NewCatalogClient(ctx context.Context, opts ...option.ClientOption) (*Catalo connPool: connPool, catalogClient: recommendationenginepb.NewCatalogServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -434,6 +436,8 @@ type catalogRESTClient struct { // Points back to the CallOptions field of the containing CatalogClient CallOptions **CatalogCallOptions + + logger *slog.Logger } // NewCatalogRESTClient creates a new catalog service rest client. @@ -451,6 +455,7 @@ func NewCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ca endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -513,7 +518,7 @@ func (c *catalogGRPCClient) CreateCatalogItem(ctx context.Context, req *recommen var resp *recommendationenginepb.CatalogItem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.CreateCatalogItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.CreateCatalogItem, req, settings.GRPC, c.logger, "CreateCatalogItem") return err }, opts...) if err != nil { @@ -531,7 +536,7 @@ func (c *catalogGRPCClient) GetCatalogItem(ctx context.Context, req *recommendat var resp *recommendationenginepb.CatalogItem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetCatalogItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetCatalogItem, req, settings.GRPC, c.logger, "GetCatalogItem") return err }, opts...) if err != nil { @@ -560,7 +565,7 @@ func (c *catalogGRPCClient) ListCatalogItems(ctx context.Context, req *recommend } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListCatalogItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListCatalogItems, req, settings.GRPC, c.logger, "ListCatalogItems") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *catalogGRPCClient) UpdateCatalogItem(ctx context.Context, req *recommen var resp *recommendationenginepb.CatalogItem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCatalogItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCatalogItem, req, settings.GRPC, c.logger, "UpdateCatalogItem") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *catalogGRPCClient) DeleteCatalogItem(ctx context.Context, req *recommen opts = append((*c.CallOptions).DeleteCatalogItem[0:len((*c.CallOptions).DeleteCatalogItem):len((*c.CallOptions).DeleteCatalogItem)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.catalogClient.DeleteCatalogItem(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.catalogClient.DeleteCatalogItem, req, settings.GRPC, c.logger, "DeleteCatalogItem") return err }, opts...) return err @@ -627,7 +632,7 @@ func (c *catalogGRPCClient) ImportCatalogItems(ctx context.Context, req *recomme var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ImportCatalogItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ImportCatalogItems, req, settings.GRPC, c.logger, "ImportCatalogItems") return err }, opts...) if err != nil { @@ -678,17 +683,7 @@ func (c *catalogRESTClient) CreateCatalogItem(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCatalogItem") if err != nil { return err } @@ -738,17 +733,7 @@ func (c *catalogRESTClient) GetCatalogItem(ctx context.Context, req *recommendat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCatalogItem") if err != nil { return err } @@ -813,21 +798,10 @@ func (c *catalogRESTClient) ListCatalogItems(ctx context.Context, req *recommend } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogItems") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -905,17 +879,7 @@ func (c *catalogRESTClient) UpdateCatalogItem(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCatalogItem") if err != nil { return err } @@ -962,15 +926,8 @@ func (c *catalogRESTClient) DeleteCatalogItem(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCatalogItem") + return err }, opts...) } @@ -1017,21 +974,10 @@ func (c *catalogRESTClient) ImportCatalogItems(ctx context.Context, req *recomme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCatalogItems") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/recommendationengine/apiv1beta1/catalog_client_example_go123_test.go b/recommendationengine/apiv1beta1/catalog_client_example_go123_test.go index b05fa4340156..d5ce1407656a 100644 --- a/recommendationengine/apiv1beta1/catalog_client_example_go123_test.go +++ b/recommendationengine/apiv1beta1/catalog_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCatalogClient_ListCatalogItems_all() { } for resp, err := range c.ListCatalogItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommendationengine/apiv1beta1/helpers.go b/recommendationengine/apiv1beta1/helpers.go index 7ff6a52c76cc..fbfc12b34a7d 100755 --- a/recommendationengine/apiv1beta1/helpers.go +++ b/recommendationengine/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package recommendationengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "recommendationengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/recommendationengine/apiv1beta1/prediction_api_key_registry_client.go b/recommendationengine/apiv1beta1/prediction_api_key_registry_client.go index 94901942e695..9193cd28c6e1 100755 --- a/recommendationengine/apiv1beta1/prediction_api_key_registry_client.go +++ b/recommendationengine/apiv1beta1/prediction_api_key_registry_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( recommendationenginepb "cloud.google.com/go/recommendationengine/apiv1beta1/recommendationenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -228,6 +227,8 @@ type predictionApiKeyRegistryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionApiKeyRegistryClient creates a new prediction api key registry client based on gRPC. @@ -258,6 +259,7 @@ func NewPredictionApiKeyRegistryClient(ctx context.Context, opts ...option.Clien connPool: connPool, predictionApiKeyRegistryClient: recommendationenginepb.NewPredictionApiKeyRegistryClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -304,6 +306,8 @@ type predictionApiKeyRegistryRESTClient struct { // Points back to the CallOptions field of the containing PredictionApiKeyRegistryClient CallOptions **PredictionApiKeyRegistryCallOptions + + logger *slog.Logger } // NewPredictionApiKeyRegistryRESTClient creates a new prediction api key registry rest client. @@ -325,6 +329,7 @@ func NewPredictionApiKeyRegistryRESTClient(ctx context.Context, opts ...option.C endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -377,7 +382,7 @@ func (c *predictionApiKeyRegistryGRPCClient) CreatePredictionApiKeyRegistration( var resp *recommendationenginepb.PredictionApiKeyRegistration err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionApiKeyRegistryClient.CreatePredictionApiKeyRegistration, req, settings.GRPC, c.logger, "CreatePredictionApiKeyRegistration") return err }, opts...) if err != nil { @@ -406,7 +411,7 @@ func (c *predictionApiKeyRegistryGRPCClient) ListPredictionApiKeyRegistrations(c } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionApiKeyRegistryClient.ListPredictionApiKeyRegistrations, req, settings.GRPC, c.logger, "ListPredictionApiKeyRegistrations") return err }, opts...) if err != nil { @@ -440,7 +445,7 @@ func (c *predictionApiKeyRegistryGRPCClient) DeletePredictionApiKeyRegistration( opts = append((*c.CallOptions).DeletePredictionApiKeyRegistration[0:len((*c.CallOptions).DeletePredictionApiKeyRegistration):len((*c.CallOptions).DeletePredictionApiKeyRegistration)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistration(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.predictionApiKeyRegistryClient.DeletePredictionApiKeyRegistration, req, settings.GRPC, c.logger, "DeletePredictionApiKeyRegistration") return err }, opts...) return err @@ -485,17 +490,7 @@ func (c *predictionApiKeyRegistryRESTClient) CreatePredictionApiKeyRegistration( httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePredictionApiKeyRegistration") if err != nil { return err } @@ -557,21 +552,10 @@ func (c *predictionApiKeyRegistryRESTClient) ListPredictionApiKeyRegistrations(c } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPredictionApiKeyRegistrations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -631,14 +615,7 @@ func (c *predictionApiKeyRegistryRESTClient) DeletePredictionApiKeyRegistration( httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePredictionApiKeyRegistration") + return err }, opts...) } diff --git a/recommendationengine/apiv1beta1/prediction_api_key_registry_client_example_go123_test.go b/recommendationengine/apiv1beta1/prediction_api_key_registry_client_example_go123_test.go index 3de431d49312..591c997ef964 100644 --- a/recommendationengine/apiv1beta1/prediction_api_key_registry_client_example_go123_test.go +++ b/recommendationengine/apiv1beta1/prediction_api_key_registry_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionApiKeyRegistryClient_ListPredictionApiKeyRegistrations_all } for resp, err := range c.ListPredictionApiKeyRegistrations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommendationengine/apiv1beta1/prediction_client.go b/recommendationengine/apiv1beta1/prediction_client.go index fa8cb2a1d033..29224caadffd 100755 --- a/recommendationengine/apiv1beta1/prediction_client.go +++ b/recommendationengine/apiv1beta1/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( recommendationenginepb "cloud.google.com/go/recommendationengine/apiv1beta1/recommendationenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -163,6 +162,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -189,6 +190,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: recommendationenginepb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -235,6 +237,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -252,6 +256,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -315,7 +320,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *recommendatione } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -389,21 +394,10 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *recommendatione } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/recommendationengine/apiv1beta1/prediction_client_example_go123_test.go b/recommendationengine/apiv1beta1/prediction_client_example_go123_test.go index b9dc1632f543..989b859e1388 100644 --- a/recommendationengine/apiv1beta1/prediction_client_example_go123_test.go +++ b/recommendationengine/apiv1beta1/prediction_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionClient_Predict_all() { } for resp, err := range c.Predict(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/catalog.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/catalog.pb.go index 1f2c97a17e54..053ae6f46698 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/catalog.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/catalog.proto @@ -164,11 +164,9 @@ type CatalogItem struct { func (x *CatalogItem) Reset() { *x = CatalogItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogItem) String() string { @@ -179,7 +177,7 @@ func (*CatalogItem) ProtoMessage() {} func (x *CatalogItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +311,9 @@ type ProductCatalogItem struct { func (x *ProductCatalogItem) Reset() { *x = ProductCatalogItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductCatalogItem) String() string { @@ -328,7 +324,7 @@ func (*ProductCatalogItem) ProtoMessage() {} func (x *ProductCatalogItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +436,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -455,7 +449,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +501,9 @@ type CatalogItem_CategoryHierarchy struct { func (x *CatalogItem_CategoryHierarchy) Reset() { *x = CatalogItem_CategoryHierarchy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogItem_CategoryHierarchy) String() string { @@ -522,7 +514,7 @@ func (*CatalogItem_CategoryHierarchy) ProtoMessage() {} func (x *CatalogItem_CategoryHierarchy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +551,9 @@ type ProductCatalogItem_ExactPrice struct { func (x *ProductCatalogItem_ExactPrice) Reset() { *x = ProductCatalogItem_ExactPrice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductCatalogItem_ExactPrice) String() string { @@ -574,7 +564,7 @@ func (*ProductCatalogItem_ExactPrice) ProtoMessage() {} func (x *ProductCatalogItem_ExactPrice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +608,9 @@ type ProductCatalogItem_PriceRange struct { func (x *ProductCatalogItem_PriceRange) Reset() { *x = ProductCatalogItem_PriceRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductCatalogItem_PriceRange) String() string { @@ -633,7 +621,7 @@ func (*ProductCatalogItem_PriceRange) ProtoMessage() {} func (x *ProductCatalogItem_PriceRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -855,80 +843,6 @@ func file_google_cloud_recommendationengine_v1beta1_catalog_proto_init() { return } file_google_cloud_recommendationengine_v1beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CatalogItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductCatalogItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CatalogItem_CategoryHierarchy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProductCatalogItem_ExactPrice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProductCatalogItem_PriceRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recommendationengine_v1beta1_catalog_proto_msgTypes[0].OneofWrappers = []any{ (*CatalogItem_ProductMetadata)(nil), } diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/catalog_service.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/catalog_service.pb.go index 82a4430ad313..54af192456e6 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/catalog_service.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/catalog_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/catalog_service.proto @@ -58,11 +58,9 @@ type CreateCatalogItemRequest struct { func (x *CreateCatalogItemRequest) Reset() { *x = CreateCatalogItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCatalogItemRequest) String() string { @@ -73,7 +71,7 @@ func (*CreateCatalogItemRequest) ProtoMessage() {} func (x *CreateCatalogItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -115,11 +113,9 @@ type GetCatalogItemRequest struct { func (x *GetCatalogItemRequest) Reset() { *x = GetCatalogItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCatalogItemRequest) String() string { @@ -130,7 +126,7 @@ func (*GetCatalogItemRequest) ProtoMessage() {} func (x *GetCatalogItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,11 +168,9 @@ type ListCatalogItemsRequest struct { func (x *ListCatalogItemsRequest) Reset() { *x = ListCatalogItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogItemsRequest) String() string { @@ -187,7 +181,7 @@ func (*ListCatalogItemsRequest) ProtoMessage() {} func (x *ListCatalogItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +239,9 @@ type ListCatalogItemsResponse struct { func (x *ListCatalogItemsResponse) Reset() { *x = ListCatalogItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogItemsResponse) String() string { @@ -260,7 +252,7 @@ func (*ListCatalogItemsResponse) ProtoMessage() {} func (x *ListCatalogItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +300,9 @@ type UpdateCatalogItemRequest struct { func (x *UpdateCatalogItemRequest) Reset() { *x = UpdateCatalogItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCatalogItemRequest) String() string { @@ -323,7 +313,7 @@ func (*UpdateCatalogItemRequest) ProtoMessage() {} func (x *UpdateCatalogItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -372,11 +362,9 @@ type DeleteCatalogItemRequest struct { func (x *DeleteCatalogItemRequest) Reset() { *x = DeleteCatalogItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCatalogItemRequest) String() string { @@ -387,7 +375,7 @@ func (*DeleteCatalogItemRequest) ProtoMessage() {} func (x *DeleteCatalogItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,80 +683,6 @@ func file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_init() file_google_cloud_recommendationengine_v1beta1_catalog_proto_init() file_google_cloud_recommendationengine_v1beta1_import_proto_init() file_google_cloud_recommendationengine_v1beta1_recommendationengine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCatalogItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCatalogItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCatalogItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_catalog_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCatalogItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/common.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/common.pb.go index a9fb49e55b5e..0a191f7248c0 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/common.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/common.proto @@ -66,11 +66,9 @@ type FeatureMap struct { func (x *FeatureMap) Reset() { *x = FeatureMap{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMap) String() string { @@ -81,7 +79,7 @@ func (*FeatureMap) ProtoMessage() {} func (x *FeatureMap) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,11 +120,9 @@ type FeatureMap_StringList struct { func (x *FeatureMap_StringList) Reset() { *x = FeatureMap_StringList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMap_StringList) String() string { @@ -137,7 +133,7 @@ func (*FeatureMap_StringList) ProtoMessage() {} func (x *FeatureMap_StringList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +167,9 @@ type FeatureMap_FloatList struct { func (x *FeatureMap_FloatList) Reset() { *x = FeatureMap_FloatList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureMap_FloatList) String() string { @@ -186,7 +180,7 @@ func (*FeatureMap_FloatList) ProtoMessage() {} func (x *FeatureMap_FloatList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,44 +308,6 @@ func file_google_cloud_recommendationengine_v1beta1_common_proto_init() { if File_google_cloud_recommendationengine_v1beta1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMap_StringList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FeatureMap_FloatList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/import.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/import.pb.go index 64f5aa7f270d..763cdd3dabe0 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/import.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/import.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/import.proto @@ -57,11 +57,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -72,7 +70,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,11 +105,9 @@ type CatalogInlineSource struct { func (x *CatalogInlineSource) Reset() { *x = CatalogInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogInlineSource) String() string { @@ -122,7 +118,7 @@ func (*CatalogInlineSource) ProtoMessage() {} func (x *CatalogInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +152,9 @@ type UserEventInlineSource struct { func (x *UserEventInlineSource) Reset() { *x = UserEventInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInlineSource) String() string { @@ -171,7 +165,7 @@ func (*UserEventInlineSource) ProtoMessage() {} func (x *UserEventInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +203,9 @@ type ImportErrorsConfig struct { func (x *ImportErrorsConfig) Reset() { *x = ImportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorsConfig) String() string { @@ -224,7 +216,7 @@ func (*ImportErrorsConfig) ProtoMessage() {} func (x *ImportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +280,9 @@ type ImportCatalogItemsRequest struct { func (x *ImportCatalogItemsRequest) Reset() { *x = ImportCatalogItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCatalogItemsRequest) String() string { @@ -303,7 +293,7 @@ func (*ImportCatalogItemsRequest) ProtoMessage() {} func (x *ImportCatalogItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +360,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -385,7 +373,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -461,7 +447,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +540,9 @@ type ImportMetadata struct { func (x *ImportMetadata) Reset() { *x = ImportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMetadata) String() string { @@ -569,7 +553,7 @@ func (*ImportMetadata) ProtoMessage() {} func (x *ImportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +626,9 @@ type ImportCatalogItemsResponse struct { func (x *ImportCatalogItemsResponse) Reset() { *x = ImportCatalogItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCatalogItemsResponse) String() string { @@ -657,7 +639,7 @@ func (*ImportCatalogItemsResponse) ProtoMessage() {} func (x *ImportCatalogItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +687,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -720,7 +700,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +752,9 @@ type UserEventImportSummary struct { func (x *UserEventImportSummary) Reset() { *x = UserEventImportSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventImportSummary) String() string { @@ -787,7 +765,7 @@ func (*UserEventImportSummary) ProtoMessage() {} func (x *UserEventImportSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,140 +1050,6 @@ func file_google_cloud_recommendationengine_v1beta1_import_proto_init() { file_google_cloud_recommendationengine_v1beta1_catalog_proto_init() file_google_cloud_recommendationengine_v1beta1_user_event_proto_init() file_google_cloud_recommendationengine_v1beta1_recommendationengine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CatalogInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportCatalogItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ImportCatalogItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserEventImportSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recommendationengine_v1beta1_import_proto_msgTypes[3].OneofWrappers = []any{ (*ImportErrorsConfig_GcsPrefix)(nil), } diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/prediction_apikey_registry_service.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/prediction_apikey_registry_service.pb.go index 975191daabb1..8908fbd9c951 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/prediction_apikey_registry_service.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/prediction_apikey_registry_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto @@ -53,11 +53,9 @@ type PredictionApiKeyRegistration struct { func (x *PredictionApiKeyRegistration) Reset() { *x = PredictionApiKeyRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictionApiKeyRegistration) String() string { @@ -68,7 +66,7 @@ func (*PredictionApiKeyRegistration) ProtoMessage() {} func (x *PredictionApiKeyRegistration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type CreatePredictionApiKeyRegistrationRequest struct { func (x *CreatePredictionApiKeyRegistrationRequest) Reset() { *x = CreatePredictionApiKeyRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePredictionApiKeyRegistrationRequest) String() string { @@ -120,7 +116,7 @@ func (*CreatePredictionApiKeyRegistrationRequest) ProtoMessage() {} func (x *CreatePredictionApiKeyRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +163,9 @@ type ListPredictionApiKeyRegistrationsRequest struct { func (x *ListPredictionApiKeyRegistrationsRequest) Reset() { *x = ListPredictionApiKeyRegistrationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPredictionApiKeyRegistrationsRequest) String() string { @@ -182,7 +176,7 @@ func (*ListPredictionApiKeyRegistrationsRequest) ProtoMessage() {} func (x *ListPredictionApiKeyRegistrationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +227,9 @@ type ListPredictionApiKeyRegistrationsResponse struct { func (x *ListPredictionApiKeyRegistrationsResponse) Reset() { *x = ListPredictionApiKeyRegistrationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPredictionApiKeyRegistrationsResponse) String() string { @@ -248,7 +240,7 @@ func (*ListPredictionApiKeyRegistrationsResponse) ProtoMessage() {} func (x *ListPredictionApiKeyRegistrationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +282,9 @@ type DeletePredictionApiKeyRegistrationRequest struct { func (x *DeletePredictionApiKeyRegistrationRequest) Reset() { *x = DeletePredictionApiKeyRegistrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePredictionApiKeyRegistrationRequest) String() string { @@ -305,7 +295,7 @@ func (*DeletePredictionApiKeyRegistrationRequest) ProtoMessage() {} func (x *DeletePredictionApiKeyRegistrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,68 +530,6 @@ func file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_s return } file_google_cloud_recommendationengine_v1beta1_recommendationengine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictionApiKeyRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreatePredictionApiKeyRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListPredictionApiKeyRegistrationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPredictionApiKeyRegistrationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_apikey_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeletePredictionApiKeyRegistrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/prediction_service.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/prediction_service.pb.go index 2c5ea2351990..b20768dfc563 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/prediction_service.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/prediction_service.proto @@ -140,11 +140,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -155,7 +153,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,11 +250,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -267,7 +263,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +341,9 @@ type PredictResponse_PredictionResult struct { func (x *PredictResponse_PredictionResult) Reset() { *x = PredictResponse_PredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse_PredictionResult) String() string { @@ -360,7 +354,7 @@ func (*PredictResponse_PredictionResult) ProtoMessage() {} func (x *PredictResponse_PredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,44 +586,6 @@ func file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_ini return } file_google_cloud_recommendationengine_v1beta1_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse_PredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/recommendationengine_resources.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/recommendationengine_resources.pb.go index 5525b861ca56..e6e1ad8ce91b 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/recommendationengine_resources.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/recommendationengine_resources.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/user_event.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/user_event.pb.go index 934cb4f924e0..5aeb015d0d6b 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/user_event.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/user_event.proto @@ -162,11 +162,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -177,7 +175,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +271,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -288,7 +284,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +388,9 @@ type EventDetail struct { func (x *EventDetail) Reset() { *x = EventDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventDetail) String() string { @@ -407,7 +401,7 @@ func (*EventDetail) ProtoMessage() {} func (x *EventDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +518,9 @@ type ProductEventDetail struct { func (x *ProductEventDetail) Reset() { *x = ProductEventDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductEventDetail) String() string { @@ -539,7 +531,7 @@ func (*ProductEventDetail) ProtoMessage() {} func (x *ProductEventDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,11 +625,9 @@ type PurchaseTransaction struct { func (x *PurchaseTransaction) Reset() { *x = PurchaseTransaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchaseTransaction) String() string { @@ -648,7 +638,7 @@ func (*PurchaseTransaction) ProtoMessage() {} func (x *PurchaseTransaction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +729,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -754,7 +742,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1079,80 +1067,6 @@ func file_google_cloud_recommendationengine_v1beta1_user_event_proto_init() { } file_google_cloud_recommendationengine_v1beta1_catalog_proto_init() file_google_cloud_recommendationengine_v1beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProductEventDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurchaseTransaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/recommendationenginepb/user_event_service.pb.go b/recommendationengine/apiv1beta1/recommendationenginepb/user_event_service.pb.go index df32ec217786..fd61a2ca096a 100755 --- a/recommendationengine/apiv1beta1/recommendationenginepb/user_event_service.pb.go +++ b/recommendationengine/apiv1beta1/recommendationenginepb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommendationengine/v1beta1/user_event_service.proto @@ -80,11 +80,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -95,7 +93,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type PurgeUserEventsMetadata struct { func (x *PurgeUserEventsMetadata) Reset() { *x = PurgeUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsMetadata) String() string { @@ -161,7 +157,7 @@ func (*PurgeUserEventsMetadata) ProtoMessage() {} func (x *PurgeUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -222,7 +216,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +260,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -281,7 +273,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -349,7 +339,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +434,9 @@ type ListUserEventsRequest struct { func (x *ListUserEventsRequest) Reset() { *x = ListUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserEventsRequest) String() string { @@ -459,7 +447,7 @@ func (*ListUserEventsRequest) ProtoMessage() {} func (x *ListUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +505,9 @@ type ListUserEventsResponse struct { func (x *ListUserEventsResponse) Reset() { *x = ListUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUserEventsResponse) String() string { @@ -532,7 +518,7 @@ func (*ListUserEventsResponse) ProtoMessage() {} func (x *ListUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,92 +832,6 @@ func file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_ini } file_google_cloud_recommendationengine_v1beta1_import_proto_init() file_google_cloud_recommendationengine_v1beta1_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommendationengine_v1beta1_user_event_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommendationengine/apiv1beta1/user_event_client.go b/recommendationengine/apiv1beta1/user_event_client.go index d8c9cb81673c..827afdd1896d 100755 --- a/recommendationengine/apiv1beta1/user_event_client.go +++ b/recommendationengine/apiv1beta1/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" recommendationenginepb "cloud.google.com/go/recommendationengine/apiv1beta1/recommendationenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -329,6 +328,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -355,6 +356,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: recommendationenginepb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -417,6 +419,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -434,6 +438,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -496,7 +501,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *recommend var resp *recommendationenginepb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *recomme var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -543,7 +548,7 @@ func (c *userEventGRPCClient) ListUserEvents(ctx context.Context, req *recommend } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ListUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ListUserEvents, req, settings.GRPC, c.logger, "ListUserEvents") return err }, opts...) if err != nil { @@ -578,7 +583,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *recommen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -598,7 +603,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *recomme var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -649,17 +654,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *recommend httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -719,17 +714,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *recomme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -795,21 +780,10 @@ func (c *userEventRESTClient) ListUserEvents(ctx context.Context, req *recommend } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -880,21 +854,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -956,21 +919,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *recomme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/recommendationengine/apiv1beta1/user_event_client_example_go123_test.go b/recommendationengine/apiv1beta1/user_event_client_example_go123_test.go index 8aa5d0b07e7b..aac7edb35a5f 100644 --- a/recommendationengine/apiv1beta1/user_event_client_example_go123_test.go +++ b/recommendationengine/apiv1beta1/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListUserEvents_all() { } for resp, err := range c.ListUserEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommender/apiv1/helpers.go b/recommender/apiv1/helpers.go index 5913d7978329..c8e247309e0d 100755 --- a/recommender/apiv1/helpers.go +++ b/recommender/apiv1/helpers.go @@ -18,10 +18,20 @@ package recommender import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "recommender.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/recommender/apiv1/recommender_client.go b/recommender/apiv1/recommender_client.go index 1fb895f1227e..04ba9d995687 100755 --- a/recommender/apiv1/recommender_client.go +++ b/recommender/apiv1/recommender_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( recommenderpb "cloud.google.com/go/recommender/apiv1/recommenderpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -406,6 +405,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new recommender client based on gRPC. @@ -435,6 +436,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: recommenderpb.NewRecommenderClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -481,6 +483,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new recommender rest client. @@ -501,6 +505,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -564,7 +569,7 @@ func (c *gRPCClient) ListInsights(ctx context.Context, req *recommenderpb.ListIn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInsights(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInsights, req, settings.GRPC, c.logger, "ListInsights") return err }, opts...) if err != nil { @@ -599,7 +604,7 @@ func (c *gRPCClient) GetInsight(ctx context.Context, req *recommenderpb.GetInsig var resp *recommenderpb.Insight err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInsight(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInsight, req, settings.GRPC, c.logger, "GetInsight") return err }, opts...) if err != nil { @@ -617,7 +622,7 @@ func (c *gRPCClient) MarkInsightAccepted(ctx context.Context, req *recommenderpb var resp *recommenderpb.Insight err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkInsightAccepted(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkInsightAccepted, req, settings.GRPC, c.logger, "MarkInsightAccepted") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *gRPCClient) ListRecommendations(ctx context.Context, req *recommenderpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRecommendations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRecommendations, req, settings.GRPC, c.logger, "ListRecommendations") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *gRPCClient) GetRecommendation(ctx context.Context, req *recommenderpb.G var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRecommendation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRecommendation, req, settings.GRPC, c.logger, "GetRecommendation") return err }, opts...) if err != nil { @@ -699,7 +704,7 @@ func (c *gRPCClient) MarkRecommendationDismissed(ctx context.Context, req *recom var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationDismissed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationDismissed, req, settings.GRPC, c.logger, "MarkRecommendationDismissed") return err }, opts...) if err != nil { @@ -717,7 +722,7 @@ func (c *gRPCClient) MarkRecommendationClaimed(ctx context.Context, req *recomme var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationClaimed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationClaimed, req, settings.GRPC, c.logger, "MarkRecommendationClaimed") return err }, opts...) if err != nil { @@ -735,7 +740,7 @@ func (c *gRPCClient) MarkRecommendationSucceeded(ctx context.Context, req *recom var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationSucceeded(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationSucceeded, req, settings.GRPC, c.logger, "MarkRecommendationSucceeded") return err }, opts...) if err != nil { @@ -753,7 +758,7 @@ func (c *gRPCClient) MarkRecommendationFailed(ctx context.Context, req *recommen var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationFailed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationFailed, req, settings.GRPC, c.logger, "MarkRecommendationFailed") return err }, opts...) if err != nil { @@ -771,7 +776,7 @@ func (c *gRPCClient) GetRecommenderConfig(ctx context.Context, req *recommenderp var resp *recommenderpb.RecommenderConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRecommenderConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRecommenderConfig, req, settings.GRPC, c.logger, "GetRecommenderConfig") return err }, opts...) if err != nil { @@ -789,7 +794,7 @@ func (c *gRPCClient) UpdateRecommenderConfig(ctx context.Context, req *recommend var resp *recommenderpb.RecommenderConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRecommenderConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRecommenderConfig, req, settings.GRPC, c.logger, "UpdateRecommenderConfig") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *gRPCClient) GetInsightTypeConfig(ctx context.Context, req *recommenderp var resp *recommenderpb.InsightTypeConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInsightTypeConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInsightTypeConfig, req, settings.GRPC, c.logger, "GetInsightTypeConfig") return err }, opts...) if err != nil { @@ -825,7 +830,7 @@ func (c *gRPCClient) UpdateInsightTypeConfig(ctx context.Context, req *recommend var resp *recommenderpb.InsightTypeConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInsightTypeConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInsightTypeConfig, req, settings.GRPC, c.logger, "UpdateInsightTypeConfig") return err }, opts...) if err != nil { @@ -883,21 +888,10 @@ func (c *restClient) ListInsights(ctx context.Context, req *recommenderpb.ListIn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInsights") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -961,17 +955,7 @@ func (c *restClient) GetInsight(ctx context.Context, req *recommenderpb.GetInsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInsight") if err != nil { return err } @@ -1032,17 +1016,7 @@ func (c *restClient) MarkInsightAccepted(ctx context.Context, req *recommenderpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkInsightAccepted") if err != nil { return err } @@ -1108,21 +1082,10 @@ func (c *restClient) ListRecommendations(ctx context.Context, req *recommenderpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecommendations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1186,17 +1149,7 @@ func (c *restClient) GetRecommendation(ctx context.Context, req *recommenderpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecommendation") if err != nil { return err } @@ -1260,17 +1213,7 @@ func (c *restClient) MarkRecommendationDismissed(ctx context.Context, req *recom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationDismissed") if err != nil { return err } @@ -1335,17 +1278,7 @@ func (c *restClient) MarkRecommendationClaimed(ctx context.Context, req *recomme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationClaimed") if err != nil { return err } @@ -1411,17 +1344,7 @@ func (c *restClient) MarkRecommendationSucceeded(ctx context.Context, req *recom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationSucceeded") if err != nil { return err } @@ -1487,17 +1410,7 @@ func (c *restClient) MarkRecommendationFailed(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationFailed") if err != nil { return err } @@ -1548,17 +1461,7 @@ func (c *restClient) GetRecommenderConfig(ctx context.Context, req *recommenderp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecommenderConfig") if err != nil { return err } @@ -1626,17 +1529,7 @@ func (c *restClient) UpdateRecommenderConfig(ctx context.Context, req *recommend httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRecommenderConfig") if err != nil { return err } @@ -1687,17 +1580,7 @@ func (c *restClient) GetInsightTypeConfig(ctx context.Context, req *recommenderp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInsightTypeConfig") if err != nil { return err } @@ -1765,17 +1648,7 @@ func (c *restClient) UpdateInsightTypeConfig(ctx context.Context, req *recommend httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInsightTypeConfig") if err != nil { return err } diff --git a/recommender/apiv1/recommender_client_example_go123_test.go b/recommender/apiv1/recommender_client_example_go123_test.go index 34e52f080229..89c55f629116 100644 --- a/recommender/apiv1/recommender_client_example_go123_test.go +++ b/recommender/apiv1/recommender_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListInsights_all() { } for resp, err := range c.ListInsights(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListRecommendations_all() { } for resp, err := range c.ListRecommendations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommender/apiv1/recommenderpb/insight.pb.go b/recommender/apiv1/recommenderpb/insight.pb.go index c2defae89771..416f6ab8f79e 100755 --- a/recommender/apiv1/recommenderpb/insight.pb.go +++ b/recommender/apiv1/recommenderpb/insight.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1/insight.proto @@ -272,11 +272,9 @@ type Insight struct { func (x *Insight) Reset() { *x = Insight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Insight) String() string { @@ -287,7 +285,7 @@ func (*Insight) ProtoMessage() {} func (x *Insight) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +398,9 @@ type InsightStateInfo struct { func (x *InsightStateInfo) Reset() { *x = InsightStateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightStateInfo) String() string { @@ -415,7 +411,7 @@ func (*InsightStateInfo) ProtoMessage() {} func (x *InsightStateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -457,11 +453,9 @@ type Insight_RecommendationReference struct { func (x *Insight_RecommendationReference) Reset() { *x = Insight_RecommendationReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Insight_RecommendationReference) String() string { @@ -472,7 +466,7 @@ func (*Insight_RecommendationReference) ProtoMessage() {} func (x *Insight_RecommendationReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_insight_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -702,44 +696,6 @@ func file_google_cloud_recommender_v1_insight_proto_init() { if File_google_cloud_recommender_v1_insight_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1_insight_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Insight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_insight_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsightStateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_insight_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Insight_RecommendationReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1/recommenderpb/insight_type_config.pb.go b/recommender/apiv1/recommenderpb/insight_type_config.pb.go index 10bc4be6838f..3e6cba7ae2c6 100755 --- a/recommender/apiv1/recommenderpb/insight_type_config.pb.go +++ b/recommender/apiv1/recommenderpb/insight_type_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1/insight_type_config.proto @@ -76,11 +76,9 @@ type InsightTypeConfig struct { func (x *InsightTypeConfig) Reset() { *x = InsightTypeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightTypeConfig) String() string { @@ -91,7 +89,7 @@ func (*InsightTypeConfig) ProtoMessage() {} func (x *InsightTypeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type InsightTypeGenerationConfig struct { func (x *InsightTypeGenerationConfig) Reset() { *x = InsightTypeGenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightTypeGenerationConfig) String() string { @@ -185,7 +181,7 @@ func (*InsightTypeGenerationConfig) ProtoMessage() {} func (x *InsightTypeGenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,32 +324,6 @@ func file_google_cloud_recommender_v1_insight_type_config_proto_init() { if File_google_cloud_recommender_v1_insight_type_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InsightTypeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_insight_type_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsightTypeGenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1/recommenderpb/recommendation.pb.go b/recommender/apiv1/recommenderpb/recommendation.pb.go index a11921979486..cd9050c3c4e1 100755 --- a/recommender/apiv1/recommenderpb/recommendation.pb.go +++ b/recommender/apiv1/recommenderpb/recommendation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1/recommendation.proto @@ -361,11 +361,9 @@ type Recommendation struct { func (x *Recommendation) Reset() { *x = Recommendation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recommendation) String() string { @@ -376,7 +374,7 @@ func (*Recommendation) ProtoMessage() {} func (x *Recommendation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +489,9 @@ type RecommendationContent struct { func (x *RecommendationContent) Reset() { *x = RecommendationContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendationContent) String() string { @@ -506,7 +502,7 @@ func (*RecommendationContent) ProtoMessage() {} func (x *RecommendationContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +544,9 @@ type OperationGroup struct { func (x *OperationGroup) Reset() { *x = OperationGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationGroup) String() string { @@ -563,7 +557,7 @@ func (*OperationGroup) ProtoMessage() {} func (x *OperationGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +671,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -692,7 +684,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +811,9 @@ type ValueMatcher struct { func (x *ValueMatcher) Reset() { *x = ValueMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueMatcher) String() string { @@ -834,7 +824,7 @@ func (*ValueMatcher) ProtoMessage() {} func (x *ValueMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -897,11 +887,9 @@ type CostProjection struct { func (x *CostProjection) Reset() { *x = CostProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CostProjection) String() string { @@ -912,7 +900,7 @@ func (*CostProjection) ProtoMessage() {} func (x *CostProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +948,9 @@ type SecurityProjection struct { func (x *SecurityProjection) Reset() { *x = SecurityProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityProjection) String() string { @@ -975,7 +961,7 @@ func (*SecurityProjection) ProtoMessage() {} func (x *SecurityProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,11 +999,9 @@ type SustainabilityProjection struct { func (x *SustainabilityProjection) Reset() { *x = SustainabilityProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SustainabilityProjection) String() string { @@ -1028,7 +1012,7 @@ func (*SustainabilityProjection) ProtoMessage() {} func (x *SustainabilityProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1055,9 @@ type ReliabilityProjection struct { func (x *ReliabilityProjection) Reset() { *x = ReliabilityProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReliabilityProjection) String() string { @@ -1086,7 +1068,7 @@ func (*ReliabilityProjection) ProtoMessage() {} func (x *ReliabilityProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1118,9 @@ type Impact struct { func (x *Impact) Reset() { *x = Impact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Impact) String() string { @@ -1151,7 +1131,7 @@ func (*Impact) ProtoMessage() {} func (x *Impact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1234,9 @@ type RecommendationStateInfo struct { func (x *RecommendationStateInfo) Reset() { *x = RecommendationStateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendationStateInfo) String() string { @@ -1269,7 +1247,7 @@ func (*RecommendationStateInfo) ProtoMessage() {} func (x *RecommendationStateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1311,11 +1289,9 @@ type Recommendation_InsightReference struct { func (x *Recommendation_InsightReference) Reset() { *x = Recommendation_InsightReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recommendation_InsightReference) String() string { @@ -1326,7 +1302,7 @@ func (*Recommendation_InsightReference) ProtoMessage() {} func (x *Recommendation_InsightReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommendation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,152 +1713,6 @@ func file_google_cloud_recommender_v1_recommendation_proto_init() { if File_google_cloud_recommender_v1_recommendation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Recommendation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommendationContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OperationGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ValueMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CostProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SecurityProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SustainabilityProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReliabilityProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Impact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RecommendationStateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommendation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Recommendation_InsightReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recommender_v1_recommendation_proto_msgTypes[3].OneofWrappers = []any{ (*Operation_Value)(nil), (*Operation_ValueMatcher)(nil), diff --git a/recommender/apiv1/recommenderpb/recommender_config.pb.go b/recommender/apiv1/recommenderpb/recommender_config.pb.go index a2af6c9ed350..ed8ef08870ae 100755 --- a/recommender/apiv1/recommenderpb/recommender_config.pb.go +++ b/recommender/apiv1/recommenderpb/recommender_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1/recommender_config.proto @@ -76,11 +76,9 @@ type RecommenderConfig struct { func (x *RecommenderConfig) Reset() { *x = RecommenderConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommenderConfig) String() string { @@ -91,7 +89,7 @@ func (*RecommenderConfig) ProtoMessage() {} func (x *RecommenderConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type RecommenderGenerationConfig struct { func (x *RecommenderGenerationConfig) Reset() { *x = RecommenderGenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommenderGenerationConfig) String() string { @@ -185,7 +181,7 @@ func (*RecommenderGenerationConfig) ProtoMessage() {} func (x *RecommenderGenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,32 +324,6 @@ func file_google_cloud_recommender_v1_recommender_config_proto_init() { if File_google_cloud_recommender_v1_recommender_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecommenderConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommenderGenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1/recommenderpb/recommender_service.pb.go b/recommender/apiv1/recommenderpb/recommender_service.pb.go index add36644af62..c6402f550ad4 100755 --- a/recommender/apiv1/recommenderpb/recommender_service.pb.go +++ b/recommender/apiv1/recommenderpb/recommender_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1/recommender_service.proto @@ -107,11 +107,9 @@ type ListInsightsRequest struct { func (x *ListInsightsRequest) Reset() { *x = ListInsightsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightsRequest) String() string { @@ -122,7 +120,7 @@ func (*ListInsightsRequest) ProtoMessage() {} func (x *ListInsightsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +178,9 @@ type ListInsightsResponse struct { func (x *ListInsightsResponse) Reset() { *x = ListInsightsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightsResponse) String() string { @@ -195,7 +191,7 @@ func (*ListInsightsResponse) ProtoMessage() {} func (x *ListInsightsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +232,9 @@ type GetInsightRequest struct { func (x *GetInsightRequest) Reset() { *x = GetInsightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInsightRequest) String() string { @@ -251,7 +245,7 @@ func (*GetInsightRequest) ProtoMessage() {} func (x *GetInsightRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type MarkInsightAcceptedRequest struct { func (x *MarkInsightAcceptedRequest) Reset() { *x = MarkInsightAcceptedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkInsightAcceptedRequest) String() string { @@ -305,7 +297,7 @@ func (*MarkInsightAcceptedRequest) ProtoMessage() {} func (x *MarkInsightAcceptedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +399,9 @@ type ListRecommendationsRequest struct { func (x *ListRecommendationsRequest) Reset() { *x = ListRecommendationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendationsRequest) String() string { @@ -422,7 +412,7 @@ func (*ListRecommendationsRequest) ProtoMessage() {} func (x *ListRecommendationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +470,9 @@ type ListRecommendationsResponse struct { func (x *ListRecommendationsResponse) Reset() { *x = ListRecommendationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendationsResponse) String() string { @@ -495,7 +483,7 @@ func (*ListRecommendationsResponse) ProtoMessage() {} func (x *ListRecommendationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +524,9 @@ type GetRecommendationRequest struct { func (x *GetRecommendationRequest) Reset() { *x = GetRecommendationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecommendationRequest) String() string { @@ -551,7 +537,7 @@ func (*GetRecommendationRequest) ProtoMessage() {} func (x *GetRecommendationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,11 +573,9 @@ type MarkRecommendationDismissedRequest struct { func (x *MarkRecommendationDismissedRequest) Reset() { *x = MarkRecommendationDismissedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationDismissedRequest) String() string { @@ -602,7 +586,7 @@ func (*MarkRecommendationDismissedRequest) ProtoMessage() {} func (x *MarkRecommendationDismissedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +634,9 @@ type MarkRecommendationClaimedRequest struct { func (x *MarkRecommendationClaimedRequest) Reset() { *x = MarkRecommendationClaimedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationClaimedRequest) String() string { @@ -665,7 +647,7 @@ func (*MarkRecommendationClaimedRequest) ProtoMessage() {} func (x *MarkRecommendationClaimedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,11 +702,9 @@ type MarkRecommendationSucceededRequest struct { func (x *MarkRecommendationSucceededRequest) Reset() { *x = MarkRecommendationSucceededRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationSucceededRequest) String() string { @@ -735,7 +715,7 @@ func (*MarkRecommendationSucceededRequest) ProtoMessage() {} func (x *MarkRecommendationSucceededRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +770,9 @@ type MarkRecommendationFailedRequest struct { func (x *MarkRecommendationFailedRequest) Reset() { *x = MarkRecommendationFailedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationFailedRequest) String() string { @@ -805,7 +783,7 @@ func (*MarkRecommendationFailedRequest) ProtoMessage() {} func (x *MarkRecommendationFailedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +841,9 @@ type GetRecommenderConfigRequest struct { func (x *GetRecommenderConfigRequest) Reset() { *x = GetRecommenderConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecommenderConfigRequest) String() string { @@ -878,7 +854,7 @@ func (*GetRecommenderConfigRequest) ProtoMessage() {} func (x *GetRecommenderConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -917,11 +893,9 @@ type UpdateRecommenderConfigRequest struct { func (x *UpdateRecommenderConfigRequest) Reset() { *x = UpdateRecommenderConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRecommenderConfigRequest) String() string { @@ -932,7 +906,7 @@ func (*UpdateRecommenderConfigRequest) ProtoMessage() {} func (x *UpdateRecommenderConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +964,9 @@ type GetInsightTypeConfigRequest struct { func (x *GetInsightTypeConfigRequest) Reset() { *x = GetInsightTypeConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInsightTypeConfigRequest) String() string { @@ -1005,7 +977,7 @@ func (*GetInsightTypeConfigRequest) ProtoMessage() {} func (x *GetInsightTypeConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,11 +1016,9 @@ type UpdateInsightTypeConfigRequest struct { func (x *UpdateInsightTypeConfigRequest) Reset() { *x = UpdateInsightTypeConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInsightTypeConfigRequest) String() string { @@ -1059,7 +1029,7 @@ func (*UpdateInsightTypeConfigRequest) ProtoMessage() {} func (x *UpdateInsightTypeConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1787,188 +1757,6 @@ func file_google_cloud_recommender_v1_recommender_service_proto_init() { file_google_cloud_recommender_v1_insight_type_config_proto_init() file_google_cloud_recommender_v1_recommendation_proto_init() file_google_cloud_recommender_v1_recommender_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetInsightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MarkInsightAcceptedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetRecommendationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationDismissedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationClaimedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationSucceededRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationFailedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetRecommenderConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRecommenderConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetInsightTypeConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1_recommender_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInsightTypeConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1beta1/helpers.go b/recommender/apiv1beta1/helpers.go index 5913d7978329..c8e247309e0d 100755 --- a/recommender/apiv1beta1/helpers.go +++ b/recommender/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package recommender import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "recommender.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/recommender/apiv1beta1/recommender_client.go b/recommender/apiv1beta1/recommender_client.go index d268f4f082c7..245508aee91d 100755 --- a/recommender/apiv1beta1/recommender_client.go +++ b/recommender/apiv1beta1/recommender_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( recommenderpb "cloud.google.com/go/recommender/apiv1beta1/recommenderpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -409,6 +408,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new recommender client based on gRPC. @@ -438,6 +439,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: recommenderpb.NewRecommenderClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,6 +486,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new recommender rest client. @@ -504,6 +508,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -567,7 +572,7 @@ func (c *gRPCClient) ListInsights(ctx context.Context, req *recommenderpb.ListIn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInsights(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInsights, req, settings.GRPC, c.logger, "ListInsights") return err }, opts...) if err != nil { @@ -602,7 +607,7 @@ func (c *gRPCClient) GetInsight(ctx context.Context, req *recommenderpb.GetInsig var resp *recommenderpb.Insight err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInsight(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInsight, req, settings.GRPC, c.logger, "GetInsight") return err }, opts...) if err != nil { @@ -620,7 +625,7 @@ func (c *gRPCClient) MarkInsightAccepted(ctx context.Context, req *recommenderpb var resp *recommenderpb.Insight err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkInsightAccepted(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkInsightAccepted, req, settings.GRPC, c.logger, "MarkInsightAccepted") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *gRPCClient) ListRecommendations(ctx context.Context, req *recommenderpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRecommendations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRecommendations, req, settings.GRPC, c.logger, "ListRecommendations") return err }, opts...) if err != nil { @@ -684,7 +689,7 @@ func (c *gRPCClient) GetRecommendation(ctx context.Context, req *recommenderpb.G var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRecommendation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRecommendation, req, settings.GRPC, c.logger, "GetRecommendation") return err }, opts...) if err != nil { @@ -702,7 +707,7 @@ func (c *gRPCClient) MarkRecommendationClaimed(ctx context.Context, req *recomme var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationClaimed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationClaimed, req, settings.GRPC, c.logger, "MarkRecommendationClaimed") return err }, opts...) if err != nil { @@ -720,7 +725,7 @@ func (c *gRPCClient) MarkRecommendationSucceeded(ctx context.Context, req *recom var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationSucceeded(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationSucceeded, req, settings.GRPC, c.logger, "MarkRecommendationSucceeded") return err }, opts...) if err != nil { @@ -738,7 +743,7 @@ func (c *gRPCClient) MarkRecommendationFailed(ctx context.Context, req *recommen var resp *recommenderpb.Recommendation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.MarkRecommendationFailed(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.MarkRecommendationFailed, req, settings.GRPC, c.logger, "MarkRecommendationFailed") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *gRPCClient) GetRecommenderConfig(ctx context.Context, req *recommenderp var resp *recommenderpb.RecommenderConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRecommenderConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRecommenderConfig, req, settings.GRPC, c.logger, "GetRecommenderConfig") return err }, opts...) if err != nil { @@ -774,7 +779,7 @@ func (c *gRPCClient) UpdateRecommenderConfig(ctx context.Context, req *recommend var resp *recommenderpb.RecommenderConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRecommenderConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRecommenderConfig, req, settings.GRPC, c.logger, "UpdateRecommenderConfig") return err }, opts...) if err != nil { @@ -792,7 +797,7 @@ func (c *gRPCClient) GetInsightTypeConfig(ctx context.Context, req *recommenderp var resp *recommenderpb.InsightTypeConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInsightTypeConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInsightTypeConfig, req, settings.GRPC, c.logger, "GetInsightTypeConfig") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *gRPCClient) UpdateInsightTypeConfig(ctx context.Context, req *recommend var resp *recommenderpb.InsightTypeConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInsightTypeConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInsightTypeConfig, req, settings.GRPC, c.logger, "UpdateInsightTypeConfig") return err }, opts...) if err != nil { @@ -836,7 +841,7 @@ func (c *gRPCClient) ListRecommenders(ctx context.Context, req *recommenderpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRecommenders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRecommenders, req, settings.GRPC, c.logger, "ListRecommenders") return err }, opts...) if err != nil { @@ -879,7 +884,7 @@ func (c *gRPCClient) ListInsightTypes(ctx context.Context, req *recommenderpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInsightTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInsightTypes, req, settings.GRPC, c.logger, "ListInsightTypes") return err }, opts...) if err != nil { @@ -954,21 +959,10 @@ func (c *restClient) ListInsights(ctx context.Context, req *recommenderpb.ListIn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInsights") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1032,17 +1026,7 @@ func (c *restClient) GetInsight(ctx context.Context, req *recommenderpb.GetInsig httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInsight") if err != nil { return err } @@ -1103,17 +1087,7 @@ func (c *restClient) MarkInsightAccepted(ctx context.Context, req *recommenderpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkInsightAccepted") if err != nil { return err } @@ -1179,21 +1153,10 @@ func (c *restClient) ListRecommendations(ctx context.Context, req *recommenderpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecommendations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1257,17 +1220,7 @@ func (c *restClient) GetRecommendation(ctx context.Context, req *recommenderpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecommendation") if err != nil { return err } @@ -1332,17 +1285,7 @@ func (c *restClient) MarkRecommendationClaimed(ctx context.Context, req *recomme httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationClaimed") if err != nil { return err } @@ -1408,17 +1351,7 @@ func (c *restClient) MarkRecommendationSucceeded(ctx context.Context, req *recom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationSucceeded") if err != nil { return err } @@ -1484,17 +1417,7 @@ func (c *restClient) MarkRecommendationFailed(ctx context.Context, req *recommen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MarkRecommendationFailed") if err != nil { return err } @@ -1545,17 +1468,7 @@ func (c *restClient) GetRecommenderConfig(ctx context.Context, req *recommenderp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecommenderConfig") if err != nil { return err } @@ -1623,17 +1536,7 @@ func (c *restClient) UpdateRecommenderConfig(ctx context.Context, req *recommend httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRecommenderConfig") if err != nil { return err } @@ -1684,17 +1587,7 @@ func (c *restClient) GetInsightTypeConfig(ctx context.Context, req *recommenderp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInsightTypeConfig") if err != nil { return err } @@ -1762,17 +1655,7 @@ func (c *restClient) UpdateInsightTypeConfig(ctx context.Context, req *recommend httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInsightTypeConfig") if err != nil { return err } @@ -1835,21 +1718,10 @@ func (c *restClient) ListRecommenders(ctx context.Context, req *recommenderpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecommenders") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1925,21 +1797,10 @@ func (c *restClient) ListInsightTypes(ctx context.Context, req *recommenderpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInsightTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/recommender/apiv1beta1/recommender_client_example_go123_test.go b/recommender/apiv1beta1/recommender_client_example_go123_test.go index e192a9231496..01dee216ab54 100644 --- a/recommender/apiv1beta1/recommender_client_example_go123_test.go +++ b/recommender/apiv1beta1/recommender_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListInsightTypes_all() { } for resp, err := range c.ListInsightTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListInsights_all() { } for resp, err := range c.ListInsights(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListRecommendations_all() { } for resp, err := range c.ListRecommendations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListRecommenders_all() { } for resp, err := range c.ListRecommenders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/recommender/apiv1beta1/recommenderpb/insight.pb.go b/recommender/apiv1beta1/recommenderpb/insight.pb.go index 19638986eeee..72143a1d4d14 100755 --- a/recommender/apiv1beta1/recommenderpb/insight.pb.go +++ b/recommender/apiv1beta1/recommenderpb/insight.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1beta1/insight.proto @@ -264,11 +264,9 @@ type Insight struct { func (x *Insight) Reset() { *x = Insight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Insight) String() string { @@ -279,7 +277,7 @@ func (*Insight) ProtoMessage() {} func (x *Insight) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +390,9 @@ type InsightStateInfo struct { func (x *InsightStateInfo) Reset() { *x = InsightStateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightStateInfo) String() string { @@ -407,7 +403,7 @@ func (*InsightStateInfo) ProtoMessage() {} func (x *InsightStateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +445,9 @@ type InsightType struct { func (x *InsightType) Reset() { *x = InsightType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightType) String() string { @@ -464,7 +458,7 @@ func (*InsightType) ProtoMessage() {} func (x *InsightType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +493,9 @@ type Insight_RecommendationReference struct { func (x *Insight_RecommendationReference) Reset() { *x = Insight_RecommendationReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Insight_RecommendationReference) String() string { @@ -514,7 +506,7 @@ func (*Insight_RecommendationReference) ProtoMessage() {} func (x *Insight_RecommendationReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,56 +741,6 @@ func file_google_cloud_recommender_v1beta1_insight_proto_init() { if File_google_cloud_recommender_v1beta1_insight_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Insight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsightStateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InsightType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_insight_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Insight_RecommendationReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1beta1/recommenderpb/insight_type_config.pb.go b/recommender/apiv1beta1/recommenderpb/insight_type_config.pb.go index 94645ec45742..9cb9d21e7826 100755 --- a/recommender/apiv1beta1/recommenderpb/insight_type_config.pb.go +++ b/recommender/apiv1beta1/recommenderpb/insight_type_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1beta1/insight_type_config.proto @@ -76,11 +76,9 @@ type InsightTypeConfig struct { func (x *InsightTypeConfig) Reset() { *x = InsightTypeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightTypeConfig) String() string { @@ -91,7 +89,7 @@ func (*InsightTypeConfig) ProtoMessage() {} func (x *InsightTypeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type InsightTypeGenerationConfig struct { func (x *InsightTypeGenerationConfig) Reset() { *x = InsightTypeGenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsightTypeGenerationConfig) String() string { @@ -185,7 +181,7 @@ func (*InsightTypeGenerationConfig) ProtoMessage() {} func (x *InsightTypeGenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,32 +321,6 @@ func file_google_cloud_recommender_v1beta1_insight_type_config_proto_init() { if File_google_cloud_recommender_v1beta1_insight_type_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*InsightTypeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_insight_type_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsightTypeGenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1beta1/recommenderpb/recommendation.pb.go b/recommender/apiv1beta1/recommenderpb/recommendation.pb.go index 6a199efab73a..73ceafa53691 100755 --- a/recommender/apiv1beta1/recommenderpb/recommendation.pb.go +++ b/recommender/apiv1beta1/recommenderpb/recommendation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1beta1/recommendation.proto @@ -299,11 +299,9 @@ type Recommendation struct { func (x *Recommendation) Reset() { *x = Recommendation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recommendation) String() string { @@ -314,7 +312,7 @@ func (*Recommendation) ProtoMessage() {} func (x *Recommendation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +427,9 @@ type RecommendationContent struct { func (x *RecommendationContent) Reset() { *x = RecommendationContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendationContent) String() string { @@ -444,7 +440,7 @@ func (*RecommendationContent) ProtoMessage() {} func (x *RecommendationContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +482,9 @@ type OperationGroup struct { func (x *OperationGroup) Reset() { *x = OperationGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationGroup) String() string { @@ -501,7 +495,7 @@ func (*OperationGroup) ProtoMessage() {} func (x *OperationGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +609,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -630,7 +622,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +749,9 @@ type ValueMatcher struct { func (x *ValueMatcher) Reset() { *x = ValueMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueMatcher) String() string { @@ -772,7 +762,7 @@ func (*ValueMatcher) ProtoMessage() {} func (x *ValueMatcher) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +823,9 @@ type CostProjection struct { func (x *CostProjection) Reset() { *x = CostProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CostProjection) String() string { @@ -848,7 +836,7 @@ func (*CostProjection) ProtoMessage() {} func (x *CostProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +878,9 @@ type SecurityProjection struct { func (x *SecurityProjection) Reset() { *x = SecurityProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityProjection) String() string { @@ -905,7 +891,7 @@ func (*SecurityProjection) ProtoMessage() {} func (x *SecurityProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +929,9 @@ type SustainabilityProjection struct { func (x *SustainabilityProjection) Reset() { *x = SustainabilityProjection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SustainabilityProjection) String() string { @@ -958,7 +942,7 @@ func (*SustainabilityProjection) ProtoMessage() {} func (x *SustainabilityProjection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +991,9 @@ type Impact struct { func (x *Impact) Reset() { *x = Impact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Impact) String() string { @@ -1022,7 +1004,7 @@ func (*Impact) ProtoMessage() {} func (x *Impact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1093,9 @@ type RecommendationStateInfo struct { func (x *RecommendationStateInfo) Reset() { *x = RecommendationStateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommendationStateInfo) String() string { @@ -1126,7 +1106,7 @@ func (*RecommendationStateInfo) ProtoMessage() {} func (x *RecommendationStateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1168,11 +1148,9 @@ type RecommenderType struct { func (x *RecommenderType) Reset() { *x = RecommenderType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommenderType) String() string { @@ -1183,7 +1161,7 @@ func (*RecommenderType) ProtoMessage() {} func (x *RecommenderType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,11 +1196,9 @@ type Recommendation_InsightReference struct { func (x *Recommendation_InsightReference) Reset() { *x = Recommendation_InsightReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recommendation_InsightReference) String() string { @@ -1233,7 +1209,7 @@ func (*Recommendation_InsightReference) ProtoMessage() {} func (x *Recommendation_InsightReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,152 +1598,6 @@ func file_google_cloud_recommender_v1beta1_recommendation_proto_init() { if File_google_cloud_recommender_v1beta1_recommendation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Recommendation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommendationContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OperationGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ValueMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CostProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SecurityProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SustainabilityProjection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Impact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RecommendationStateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RecommenderType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Recommendation_InsightReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_recommender_v1beta1_recommendation_proto_msgTypes[3].OneofWrappers = []any{ (*Operation_Value)(nil), (*Operation_ValueMatcher)(nil), diff --git a/recommender/apiv1beta1/recommenderpb/recommender_config.pb.go b/recommender/apiv1beta1/recommenderpb/recommender_config.pb.go index d77dfb058cbc..bf6d31208e89 100755 --- a/recommender/apiv1beta1/recommenderpb/recommender_config.pb.go +++ b/recommender/apiv1beta1/recommenderpb/recommender_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1beta1/recommender_config.proto @@ -76,11 +76,9 @@ type RecommenderConfig struct { func (x *RecommenderConfig) Reset() { *x = RecommenderConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommenderConfig) String() string { @@ -91,7 +89,7 @@ func (*RecommenderConfig) ProtoMessage() {} func (x *RecommenderConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type RecommenderGenerationConfig struct { func (x *RecommenderGenerationConfig) Reset() { *x = RecommenderGenerationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecommenderGenerationConfig) String() string { @@ -185,7 +181,7 @@ func (*RecommenderGenerationConfig) ProtoMessage() {} func (x *RecommenderGenerationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,32 +320,6 @@ func file_google_cloud_recommender_v1beta1_recommender_config_proto_init() { if File_google_cloud_recommender_v1beta1_recommender_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecommenderConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RecommenderGenerationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/recommender/apiv1beta1/recommenderpb/recommender_service.pb.go b/recommender/apiv1beta1/recommenderpb/recommender_service.pb.go index c9977a9ed093..b4ad92a2f55e 100755 --- a/recommender/apiv1beta1/recommenderpb/recommender_service.pb.go +++ b/recommender/apiv1beta1/recommenderpb/recommender_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/recommender/v1beta1/recommender_service.proto @@ -100,11 +100,9 @@ type ListInsightsRequest struct { func (x *ListInsightsRequest) Reset() { *x = ListInsightsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightsRequest) String() string { @@ -115,7 +113,7 @@ func (*ListInsightsRequest) ProtoMessage() {} func (x *ListInsightsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type ListInsightsResponse struct { func (x *ListInsightsResponse) Reset() { *x = ListInsightsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightsResponse) String() string { @@ -188,7 +184,7 @@ func (*ListInsightsResponse) ProtoMessage() {} func (x *ListInsightsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type GetInsightRequest struct { func (x *GetInsightRequest) Reset() { *x = GetInsightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInsightRequest) String() string { @@ -244,7 +238,7 @@ func (*GetInsightRequest) ProtoMessage() {} func (x *GetInsightRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type MarkInsightAcceptedRequest struct { func (x *MarkInsightAcceptedRequest) Reset() { *x = MarkInsightAcceptedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkInsightAcceptedRequest) String() string { @@ -298,7 +290,7 @@ func (*MarkInsightAcceptedRequest) ProtoMessage() {} func (x *MarkInsightAcceptedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +385,9 @@ type ListRecommendationsRequest struct { func (x *ListRecommendationsRequest) Reset() { *x = ListRecommendationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendationsRequest) String() string { @@ -408,7 +398,7 @@ func (*ListRecommendationsRequest) ProtoMessage() {} func (x *ListRecommendationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +456,9 @@ type ListRecommendationsResponse struct { func (x *ListRecommendationsResponse) Reset() { *x = ListRecommendationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendationsResponse) String() string { @@ -481,7 +469,7 @@ func (*ListRecommendationsResponse) ProtoMessage() {} func (x *ListRecommendationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -522,11 +510,9 @@ type GetRecommendationRequest struct { func (x *GetRecommendationRequest) Reset() { *x = GetRecommendationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecommendationRequest) String() string { @@ -537,7 +523,7 @@ func (*GetRecommendationRequest) ProtoMessage() {} func (x *GetRecommendationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -578,11 +564,9 @@ type MarkRecommendationClaimedRequest struct { func (x *MarkRecommendationClaimedRequest) Reset() { *x = MarkRecommendationClaimedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationClaimedRequest) String() string { @@ -593,7 +577,7 @@ func (*MarkRecommendationClaimedRequest) ProtoMessage() {} func (x *MarkRecommendationClaimedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +632,9 @@ type MarkRecommendationSucceededRequest struct { func (x *MarkRecommendationSucceededRequest) Reset() { *x = MarkRecommendationSucceededRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationSucceededRequest) String() string { @@ -663,7 +645,7 @@ func (*MarkRecommendationSucceededRequest) ProtoMessage() {} func (x *MarkRecommendationSucceededRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +700,9 @@ type MarkRecommendationFailedRequest struct { func (x *MarkRecommendationFailedRequest) Reset() { *x = MarkRecommendationFailedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarkRecommendationFailedRequest) String() string { @@ -733,7 +713,7 @@ func (*MarkRecommendationFailedRequest) ProtoMessage() {} func (x *MarkRecommendationFailedRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +769,9 @@ type GetRecommenderConfigRequest struct { func (x *GetRecommenderConfigRequest) Reset() { *x = GetRecommenderConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecommenderConfigRequest) String() string { @@ -804,7 +782,7 @@ func (*GetRecommenderConfigRequest) ProtoMessage() {} func (x *GetRecommenderConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +821,9 @@ type UpdateRecommenderConfigRequest struct { func (x *UpdateRecommenderConfigRequest) Reset() { *x = UpdateRecommenderConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRecommenderConfigRequest) String() string { @@ -858,7 +834,7 @@ func (*UpdateRecommenderConfigRequest) ProtoMessage() {} func (x *UpdateRecommenderConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +890,9 @@ type GetInsightTypeConfigRequest struct { func (x *GetInsightTypeConfigRequest) Reset() { *x = GetInsightTypeConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInsightTypeConfigRequest) String() string { @@ -929,7 +903,7 @@ func (*GetInsightTypeConfigRequest) ProtoMessage() {} func (x *GetInsightTypeConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +942,9 @@ type UpdateInsightTypeConfigRequest struct { func (x *UpdateInsightTypeConfigRequest) Reset() { *x = UpdateInsightTypeConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInsightTypeConfigRequest) String() string { @@ -983,7 +955,7 @@ func (*UpdateInsightTypeConfigRequest) ProtoMessage() {} func (x *UpdateInsightTypeConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1007,9 @@ type ListRecommendersRequest struct { func (x *ListRecommendersRequest) Reset() { *x = ListRecommendersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendersRequest) String() string { @@ -1050,7 +1020,7 @@ func (*ListRecommendersRequest) ProtoMessage() {} func (x *ListRecommendersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1064,9 @@ type ListRecommendersResponse struct { func (x *ListRecommendersResponse) Reset() { *x = ListRecommendersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecommendersResponse) String() string { @@ -1109,7 +1077,7 @@ func (*ListRecommendersResponse) ProtoMessage() {} func (x *ListRecommendersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1154,11 +1122,9 @@ type ListInsightTypesRequest struct { func (x *ListInsightTypesRequest) Reset() { *x = ListInsightTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightTypesRequest) String() string { @@ -1169,7 +1135,7 @@ func (*ListInsightTypesRequest) ProtoMessage() {} func (x *ListInsightTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1213,11 +1179,9 @@ type ListInsightTypesResponse struct { func (x *ListInsightTypesResponse) Reset() { *x = ListInsightTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInsightTypesResponse) String() string { @@ -1228,7 +1192,7 @@ func (*ListInsightTypesResponse) ProtoMessage() {} func (x *ListInsightTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1975,224 +1939,6 @@ func file_google_cloud_recommender_v1beta1_recommender_service_proto_init() { file_google_cloud_recommender_v1beta1_insight_type_config_proto_init() file_google_cloud_recommender_v1beta1_recommendation_proto_init() file_google_cloud_recommender_v1beta1_recommender_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetInsightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MarkInsightAcceptedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetRecommendationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationClaimedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationSucceededRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MarkRecommendationFailedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetRecommenderConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRecommenderConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetInsightTypeConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInsightTypeConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListRecommendersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_recommender_v1beta1_recommender_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListInsightTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/redis/apiv1/cloud_redis_client.go b/redis/apiv1/cloud_redis_client.go index 544f626f76a0..1ec572996001 100755 --- a/redis/apiv1/cloud_redis_client.go +++ b/redis/apiv1/cloud_redis_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" redispb "cloud.google.com/go/redis/apiv1/redispb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -458,6 +457,8 @@ type cloudRedisGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudRedisClient creates a new cloud redis client based on gRPC. @@ -503,6 +504,7 @@ func NewCloudRedisClient(ctx context.Context, opts ...option.ClientOption) (*Clo connPool: connPool, cloudRedisClient: redispb.NewCloudRedisClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -567,6 +569,8 @@ type cloudRedisRESTClient struct { // Points back to the CallOptions field of the containing CloudRedisClient CallOptions **CloudRedisCallOptions + + logger *slog.Logger } // NewCloudRedisRESTClient creates a new cloud redis rest client. @@ -603,6 +607,7 @@ func NewCloudRedisRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -676,7 +681,7 @@ func (c *cloudRedisGRPCClient) ListInstances(ctx context.Context, req *redispb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -711,7 +716,7 @@ func (c *cloudRedisGRPCClient) GetInstance(ctx context.Context, req *redispb.Get var resp *redispb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -729,7 +734,7 @@ func (c *cloudRedisGRPCClient) GetInstanceAuthString(ctx context.Context, req *r var resp *redispb.InstanceAuthString err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.GetInstanceAuthString(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.GetInstanceAuthString, req, settings.GRPC, c.logger, "GetInstanceAuthString") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *cloudRedisGRPCClient) CreateInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -767,7 +772,7 @@ func (c *cloudRedisGRPCClient) UpdateInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -787,7 +792,7 @@ func (c *cloudRedisGRPCClient) UpgradeInstance(ctx context.Context, req *redispb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.UpgradeInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.UpgradeInstance, req, settings.GRPC, c.logger, "UpgradeInstance") return err }, opts...) if err != nil { @@ -807,7 +812,7 @@ func (c *cloudRedisGRPCClient) ImportInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ImportInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ImportInstance, req, settings.GRPC, c.logger, "ImportInstance") return err }, opts...) if err != nil { @@ -827,7 +832,7 @@ func (c *cloudRedisGRPCClient) ExportInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ExportInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ExportInstance, req, settings.GRPC, c.logger, "ExportInstance") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *cloudRedisGRPCClient) FailoverInstance(ctx context.Context, req *redisp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.FailoverInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.FailoverInstance, req, settings.GRPC, c.logger, "FailoverInstance") return err }, opts...) if err != nil { @@ -867,7 +872,7 @@ func (c *cloudRedisGRPCClient) DeleteInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -887,7 +892,7 @@ func (c *cloudRedisGRPCClient) RescheduleMaintenance(ctx context.Context, req *r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.RescheduleMaintenance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.RescheduleMaintenance, req, settings.GRPC, c.logger, "RescheduleMaintenance") return err }, opts...) if err != nil { @@ -907,7 +912,7 @@ func (c *cloudRedisGRPCClient) GetLocation(ctx context.Context, req *locationpb. var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -936,7 +941,7 @@ func (c *cloudRedisGRPCClient) ListLocations(ctx context.Context, req *locationp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -970,7 +975,7 @@ func (c *cloudRedisGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -984,7 +989,7 @@ func (c *cloudRedisGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -999,7 +1004,7 @@ func (c *cloudRedisGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1028,7 +1033,7 @@ func (c *cloudRedisGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1107,21 +1112,10 @@ func (c *cloudRedisRESTClient) ListInstances(ctx context.Context, req *redispb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1184,17 +1178,7 @@ func (c *cloudRedisRESTClient) GetInstance(ctx context.Context, req *redispb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1246,17 +1230,7 @@ func (c *cloudRedisRESTClient) GetInstanceAuthString(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstanceAuthString") if err != nil { return err } @@ -1324,21 +1298,10 @@ func (c *cloudRedisRESTClient) CreateInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1406,21 +1369,10 @@ func (c *cloudRedisRESTClient) UpdateInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1477,21 +1429,10 @@ func (c *cloudRedisRESTClient) UpgradeInstance(ctx context.Context, req *redispb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1554,21 +1495,10 @@ func (c *cloudRedisRESTClient) ImportInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1629,21 +1559,10 @@ func (c *cloudRedisRESTClient) ExportInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1700,21 +1619,10 @@ func (c *cloudRedisRESTClient) FailoverInstance(ctx context.Context, req *redisp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1765,21 +1673,10 @@ func (c *cloudRedisRESTClient) DeleteInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1836,21 +1733,10 @@ func (c *cloudRedisRESTClient) RescheduleMaintenance(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RescheduleMaintenance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1901,17 +1787,7 @@ func (c *cloudRedisRESTClient) GetLocation(ctx context.Context, req *locationpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1976,21 +1852,10 @@ func (c *cloudRedisRESTClient) ListLocations(ctx context.Context, req *locationp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2050,15 +1915,8 @@ func (c *cloudRedisRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -2092,15 +1950,8 @@ func (c *cloudRedisRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2137,17 +1988,7 @@ func (c *cloudRedisRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2212,21 +2053,10 @@ func (c *cloudRedisRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/redis/apiv1/cloud_redis_client_example_go123_test.go b/redis/apiv1/cloud_redis_client_example_go123_test.go index a08151014a1a..ef61f02f5ae2 100644 --- a/redis/apiv1/cloud_redis_client_example_go123_test.go +++ b/redis/apiv1/cloud_redis_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudRedisClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudRedisClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudRedisClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/redis/apiv1/helpers.go b/redis/apiv1/helpers.go index 14888686b51b..079925209a55 100755 --- a/redis/apiv1/helpers.go +++ b/redis/apiv1/helpers.go @@ -18,10 +18,20 @@ package redis import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "redis.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/redis/apiv1/redispb/cloud_redis.pb.go b/redis/apiv1/redispb/cloud_redis.pb.go index 52cb5b14cb0b..f2b0f8a9f34d 100755 --- a/redis/apiv1/redispb/cloud_redis.pb.go +++ b/redis/apiv1/redispb/cloud_redis.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/redis/v1/cloud_redis.proto @@ -636,11 +636,9 @@ type NodeInfo struct { func (x *NodeInfo) Reset() { *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInfo) String() string { @@ -651,7 +649,7 @@ func (*NodeInfo) ProtoMessage() {} func (x *NodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +843,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -860,7 +856,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1142,9 @@ type PersistenceConfig struct { func (x *PersistenceConfig) Reset() { *x = PersistenceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistenceConfig) String() string { @@ -1161,7 +1155,7 @@ func (*PersistenceConfig) ProtoMessage() {} func (x *PersistenceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,11 +1222,9 @@ type RescheduleMaintenanceRequest struct { func (x *RescheduleMaintenanceRequest) Reset() { *x = RescheduleMaintenanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RescheduleMaintenanceRequest) String() string { @@ -1243,7 +1235,7 @@ func (*RescheduleMaintenanceRequest) ProtoMessage() {} func (x *RescheduleMaintenanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1300,11 +1292,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -1315,7 +1305,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1366,9 @@ type WeeklyMaintenanceWindow struct { func (x *WeeklyMaintenanceWindow) Reset() { *x = WeeklyMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyMaintenanceWindow) String() string { @@ -1391,7 +1379,7 @@ func (*WeeklyMaintenanceWindow) ProtoMessage() {} func (x *WeeklyMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1451,11 +1439,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -1466,7 +1452,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1524,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1553,7 +1537,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1600,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1631,7 +1613,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1683,11 +1665,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1698,7 +1678,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1717,9 @@ type GetInstanceAuthStringRequest struct { func (x *GetInstanceAuthStringRequest) Reset() { *x = GetInstanceAuthStringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceAuthStringRequest) String() string { @@ -1752,7 +1730,7 @@ func (*GetInstanceAuthStringRequest) ProtoMessage() {} func (x *GetInstanceAuthStringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1786,11 +1764,9 @@ type InstanceAuthString struct { func (x *InstanceAuthString) Reset() { *x = InstanceAuthString{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceAuthString) String() string { @@ -1801,7 +1777,7 @@ func (*InstanceAuthString) ProtoMessage() {} func (x *InstanceAuthString) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1851,11 +1827,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1866,7 +1840,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,11 +1900,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1941,7 +1913,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1989,11 +1961,9 @@ type UpgradeInstanceRequest struct { func (x *UpgradeInstanceRequest) Reset() { *x = UpgradeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceRequest) String() string { @@ -2004,7 +1974,7 @@ func (*UpgradeInstanceRequest) ProtoMessage() {} func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2050,11 +2020,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -2065,7 +2033,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2099,11 +2067,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -2114,7 +2080,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2152,11 +2118,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -2167,7 +2131,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2225,11 +2189,9 @@ type ImportInstanceRequest struct { func (x *ImportInstanceRequest) Reset() { *x = ImportInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportInstanceRequest) String() string { @@ -2240,7 +2202,7 @@ func (*ImportInstanceRequest) ProtoMessage() {} func (x *ImportInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2282,11 +2244,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -2297,7 +2257,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2335,11 +2295,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -2350,7 +2308,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2366,9 @@ type ExportInstanceRequest struct { func (x *ExportInstanceRequest) Reset() { *x = ExportInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInstanceRequest) String() string { @@ -2423,7 +2379,7 @@ func (*ExportInstanceRequest) ProtoMessage() {} func (x *ExportInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2471,11 +2427,9 @@ type FailoverInstanceRequest struct { func (x *FailoverInstanceRequest) Reset() { *x = FailoverInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverInstanceRequest) String() string { @@ -2486,7 +2440,7 @@ func (*FailoverInstanceRequest) ProtoMessage() {} func (x *FailoverInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2539,11 +2493,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2554,7 +2506,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2636,11 +2588,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -2651,7 +2601,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2683,11 +2633,9 @@ type ZoneMetadata struct { func (x *ZoneMetadata) Reset() { *x = ZoneMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneMetadata) String() string { @@ -2698,7 +2646,7 @@ func (*ZoneMetadata) ProtoMessage() {} func (x *ZoneMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2737,11 +2685,9 @@ type TlsCertificate struct { func (x *TlsCertificate) Reset() { *x = TlsCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsCertificate) String() string { @@ -2752,7 +2698,7 @@ func (*TlsCertificate) ProtoMessage() {} func (x *TlsCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3626,332 +3572,6 @@ func file_google_cloud_redis_v1_cloud_redis_proto_init() { if File_google_cloud_redis_v1_cloud_redis_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PersistenceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RescheduleMaintenanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceAuthStringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InstanceAuthString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ExportInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FailoverInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ZoneMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*TlsCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_redis_v1_cloud_redis_proto_msgTypes[17].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), } diff --git a/redis/apiv1beta1/cloud_redis_client.go b/redis/apiv1beta1/cloud_redis_client.go index 1fb6e26406d0..4a32afbbd522 100755 --- a/redis/apiv1beta1/cloud_redis_client.go +++ b/redis/apiv1beta1/cloud_redis_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" redispb "cloud.google.com/go/redis/apiv1beta1/redispb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -395,6 +394,8 @@ type cloudRedisGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudRedisClient creates a new cloud redis client based on gRPC. @@ -440,6 +441,7 @@ func NewCloudRedisClient(ctx context.Context, opts ...option.ClientOption) (*Clo connPool: connPool, cloudRedisClient: redispb.NewCloudRedisClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -502,6 +504,8 @@ type cloudRedisRESTClient struct { // Points back to the CallOptions field of the containing CloudRedisClient CallOptions **CloudRedisCallOptions + + logger *slog.Logger } // NewCloudRedisRESTClient creates a new cloud redis rest client. @@ -538,6 +542,7 @@ func NewCloudRedisRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -611,7 +616,7 @@ func (c *cloudRedisGRPCClient) ListInstances(ctx context.Context, req *redispb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -646,7 +651,7 @@ func (c *cloudRedisGRPCClient) GetInstance(ctx context.Context, req *redispb.Get var resp *redispb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -664,7 +669,7 @@ func (c *cloudRedisGRPCClient) GetInstanceAuthString(ctx context.Context, req *r var resp *redispb.InstanceAuthString err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.GetInstanceAuthString(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.GetInstanceAuthString, req, settings.GRPC, c.logger, "GetInstanceAuthString") return err }, opts...) if err != nil { @@ -682,7 +687,7 @@ func (c *cloudRedisGRPCClient) CreateInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -702,7 +707,7 @@ func (c *cloudRedisGRPCClient) UpdateInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -722,7 +727,7 @@ func (c *cloudRedisGRPCClient) UpgradeInstance(ctx context.Context, req *redispb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.UpgradeInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.UpgradeInstance, req, settings.GRPC, c.logger, "UpgradeInstance") return err }, opts...) if err != nil { @@ -742,7 +747,7 @@ func (c *cloudRedisGRPCClient) ImportInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ImportInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ImportInstance, req, settings.GRPC, c.logger, "ImportInstance") return err }, opts...) if err != nil { @@ -762,7 +767,7 @@ func (c *cloudRedisGRPCClient) ExportInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.ExportInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.ExportInstance, req, settings.GRPC, c.logger, "ExportInstance") return err }, opts...) if err != nil { @@ -782,7 +787,7 @@ func (c *cloudRedisGRPCClient) FailoverInstance(ctx context.Context, req *redisp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.FailoverInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.FailoverInstance, req, settings.GRPC, c.logger, "FailoverInstance") return err }, opts...) if err != nil { @@ -802,7 +807,7 @@ func (c *cloudRedisGRPCClient) DeleteInstance(ctx context.Context, req *redispb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *cloudRedisGRPCClient) RescheduleMaintenance(ctx context.Context, req *r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClient.RescheduleMaintenance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClient.RescheduleMaintenance, req, settings.GRPC, c.logger, "RescheduleMaintenance") return err }, opts...) if err != nil { @@ -886,21 +891,10 @@ func (c *cloudRedisRESTClient) ListInstances(ctx context.Context, req *redispb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -963,17 +957,7 @@ func (c *cloudRedisRESTClient) GetInstance(ctx context.Context, req *redispb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1025,17 +1009,7 @@ func (c *cloudRedisRESTClient) GetInstanceAuthString(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstanceAuthString") if err != nil { return err } @@ -1103,21 +1077,10 @@ func (c *cloudRedisRESTClient) CreateInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1185,21 +1148,10 @@ func (c *cloudRedisRESTClient) UpdateInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1256,21 +1208,10 @@ func (c *cloudRedisRESTClient) UpgradeInstance(ctx context.Context, req *redispb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1333,21 +1274,10 @@ func (c *cloudRedisRESTClient) ImportInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1408,21 +1338,10 @@ func (c *cloudRedisRESTClient) ExportInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1479,21 +1398,10 @@ func (c *cloudRedisRESTClient) FailoverInstance(ctx context.Context, req *redisp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FailoverInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1544,21 +1452,10 @@ func (c *cloudRedisRESTClient) DeleteInstance(ctx context.Context, req *redispb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1615,21 +1512,10 @@ func (c *cloudRedisRESTClient) RescheduleMaintenance(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RescheduleMaintenance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/redis/apiv1beta1/cloud_redis_client_example_go123_test.go b/redis/apiv1beta1/cloud_redis_client_example_go123_test.go index 9cca0cd332cd..f8b255ca065b 100644 --- a/redis/apiv1beta1/cloud_redis_client_example_go123_test.go +++ b/redis/apiv1beta1/cloud_redis_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCloudRedisClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/redis/apiv1beta1/helpers.go b/redis/apiv1beta1/helpers.go index 14888686b51b..079925209a55 100755 --- a/redis/apiv1beta1/helpers.go +++ b/redis/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package redis import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "redis.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/redis/apiv1beta1/redispb/cloud_redis.pb.go b/redis/apiv1beta1/redispb/cloud_redis.pb.go index 4d8103b472de..b91f219b3ccb 100755 --- a/redis/apiv1beta1/redispb/cloud_redis.pb.go +++ b/redis/apiv1beta1/redispb/cloud_redis.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/redis/v1beta1/cloud_redis.proto @@ -586,11 +586,9 @@ type NodeInfo struct { func (x *NodeInfo) Reset() { *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeInfo) String() string { @@ -601,7 +599,7 @@ func (*NodeInfo) ProtoMessage() {} func (x *NodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +780,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -797,7 +793,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1055,11 +1051,9 @@ type PersistenceConfig struct { func (x *PersistenceConfig) Reset() { *x = PersistenceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersistenceConfig) String() string { @@ -1070,7 +1064,7 @@ func (*PersistenceConfig) ProtoMessage() {} func (x *PersistenceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1135,11 +1129,9 @@ type RescheduleMaintenanceRequest struct { func (x *RescheduleMaintenanceRequest) Reset() { *x = RescheduleMaintenanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RescheduleMaintenanceRequest) String() string { @@ -1150,7 +1142,7 @@ func (*RescheduleMaintenanceRequest) ProtoMessage() {} func (x *RescheduleMaintenanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1199,9 @@ type MaintenancePolicy struct { func (x *MaintenancePolicy) Reset() { *x = MaintenancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenancePolicy) String() string { @@ -1222,7 +1212,7 @@ func (*MaintenancePolicy) ProtoMessage() {} func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1282,11 +1272,9 @@ type WeeklyMaintenanceWindow struct { func (x *WeeklyMaintenanceWindow) Reset() { *x = WeeklyMaintenanceWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WeeklyMaintenanceWindow) String() string { @@ -1297,7 +1285,7 @@ func (*WeeklyMaintenanceWindow) ProtoMessage() {} func (x *WeeklyMaintenanceWindow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1343,9 @@ type MaintenanceSchedule struct { func (x *MaintenanceSchedule) Reset() { *x = MaintenanceSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaintenanceSchedule) String() string { @@ -1370,7 +1356,7 @@ func (*MaintenanceSchedule) ProtoMessage() {} func (x *MaintenanceSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1427,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1456,7 +1440,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,11 +1503,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -1534,7 +1516,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1586,11 +1568,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1601,7 +1581,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1639,11 +1619,9 @@ type GetInstanceAuthStringRequest struct { func (x *GetInstanceAuthStringRequest) Reset() { *x = GetInstanceAuthStringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceAuthStringRequest) String() string { @@ -1654,7 +1632,7 @@ func (*GetInstanceAuthStringRequest) ProtoMessage() {} func (x *GetInstanceAuthStringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1688,11 +1666,9 @@ type InstanceAuthString struct { func (x *InstanceAuthString) Reset() { *x = InstanceAuthString{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceAuthString) String() string { @@ -1703,7 +1679,7 @@ func (*InstanceAuthString) ProtoMessage() {} func (x *InstanceAuthString) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1752,11 +1728,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1767,7 +1741,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1826,11 +1800,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -1841,7 +1813,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1888,11 +1860,9 @@ type UpgradeInstanceRequest struct { func (x *UpgradeInstanceRequest) Reset() { *x = UpgradeInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeInstanceRequest) String() string { @@ -1903,7 +1873,7 @@ func (*UpgradeInstanceRequest) ProtoMessage() {} func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1948,11 +1918,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -1963,7 +1931,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1997,11 +1965,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -2012,7 +1978,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2050,11 +2016,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -2065,7 +2029,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2123,11 +2087,9 @@ type ImportInstanceRequest struct { func (x *ImportInstanceRequest) Reset() { *x = ImportInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportInstanceRequest) String() string { @@ -2138,7 +2100,7 @@ func (*ImportInstanceRequest) ProtoMessage() {} func (x *ImportInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2180,11 +2142,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -2195,7 +2155,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,11 +2193,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -2248,7 +2206,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2306,11 +2264,9 @@ type ExportInstanceRequest struct { func (x *ExportInstanceRequest) Reset() { *x = ExportInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportInstanceRequest) String() string { @@ -2321,7 +2277,7 @@ func (*ExportInstanceRequest) ProtoMessage() {} func (x *ExportInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2369,11 +2325,9 @@ type FailoverInstanceRequest struct { func (x *FailoverInstanceRequest) Reset() { *x = FailoverInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FailoverInstanceRequest) String() string { @@ -2384,7 +2338,7 @@ func (*FailoverInstanceRequest) ProtoMessage() {} func (x *FailoverInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2431,11 +2385,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -2446,7 +2398,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2478,11 +2430,9 @@ type ZoneMetadata struct { func (x *ZoneMetadata) Reset() { *x = ZoneMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneMetadata) String() string { @@ -2493,7 +2443,7 @@ func (*ZoneMetadata) ProtoMessage() {} func (x *ZoneMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2532,11 +2482,9 @@ type TlsCertificate struct { func (x *TlsCertificate) Reset() { *x = TlsCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TlsCertificate) String() string { @@ -2547,7 +2495,7 @@ func (*TlsCertificate) ProtoMessage() {} func (x *TlsCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3382,320 +3330,6 @@ func file_google_cloud_redis_v1beta1_cloud_redis_proto_init() { if File_google_cloud_redis_v1beta1_cloud_redis_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PersistenceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RescheduleMaintenanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MaintenancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*WeeklyMaintenanceWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MaintenanceSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceAuthStringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InstanceAuthString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImportInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ExportInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FailoverInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ZoneMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*TlsCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_redis_v1beta1_cloud_redis_proto_msgTypes[17].OneofWrappers = []any{ (*InputConfig_GcsSource)(nil), } diff --git a/redis/cluster/apiv1/cloud_redis_cluster_client.go b/redis/cluster/apiv1/cloud_redis_cluster_client.go index 92fdc7aa7008..6bf6dd5ba7bc 100755 --- a/redis/cluster/apiv1/cloud_redis_cluster_client.go +++ b/redis/cluster/apiv1/cloud_redis_cluster_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" clusterpb "cloud.google.com/go/redis/cluster/apiv1/clusterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -347,6 +346,8 @@ type cloudRedisClusterGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudRedisClusterClient creates a new cloud redis cluster client based on gRPC. @@ -402,6 +403,7 @@ func NewCloudRedisClusterClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, cloudRedisClusterClient: clusterpb.NewCloudRedisClusterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -466,6 +468,8 @@ type cloudRedisClusterRESTClient struct { // Points back to the CallOptions field of the containing CloudRedisClusterClient CallOptions **CloudRedisClusterCallOptions + + logger *slog.Logger } // NewCloudRedisClusterRESTClient creates a new cloud redis cluster rest client. @@ -512,6 +516,7 @@ func NewCloudRedisClusterRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -585,7 +590,7 @@ func (c *cloudRedisClusterGRPCClient) ListClusters(ctx context.Context, req *clu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -620,7 +625,7 @@ func (c *cloudRedisClusterGRPCClient) GetCluster(ctx context.Context, req *clust var resp *clusterpb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -638,7 +643,7 @@ func (c *cloudRedisClusterGRPCClient) UpdateCluster(ctx context.Context, req *cl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -658,7 +663,7 @@ func (c *cloudRedisClusterGRPCClient) DeleteCluster(ctx context.Context, req *cl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -678,7 +683,7 @@ func (c *cloudRedisClusterGRPCClient) CreateCluster(ctx context.Context, req *cl var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -698,7 +703,7 @@ func (c *cloudRedisClusterGRPCClient) GetClusterCertificateAuthority(ctx context var resp *clusterpb.CertificateAuthority err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudRedisClusterClient.GetClusterCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudRedisClusterClient.GetClusterCertificateAuthority, req, settings.GRPC, c.logger, "GetClusterCertificateAuthority") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *cloudRedisClusterGRPCClient) GetLocation(ctx context.Context, req *loca var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *cloudRedisClusterGRPCClient) ListLocations(ctx context.Context, req *lo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -779,7 +784,7 @@ func (c *cloudRedisClusterGRPCClient) CancelOperation(ctx context.Context, req * opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -793,7 +798,7 @@ func (c *cloudRedisClusterGRPCClient) DeleteOperation(ctx context.Context, req * opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -808,7 +813,7 @@ func (c *cloudRedisClusterGRPCClient) GetOperation(ctx context.Context, req *lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -837,7 +842,7 @@ func (c *cloudRedisClusterGRPCClient) ListOperations(ctx context.Context, req *l } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -916,21 +921,10 @@ func (c *cloudRedisClusterRESTClient) ListClusters(ctx context.Context, req *clu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -993,17 +987,7 @@ func (c *cloudRedisClusterRESTClient) GetCluster(ctx context.Context, req *clust httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1073,21 +1057,10 @@ func (c *cloudRedisClusterRESTClient) UpdateCluster(ctx context.Context, req *cl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1141,21 +1114,10 @@ func (c *cloudRedisClusterRESTClient) DeleteCluster(ctx context.Context, req *cl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1223,21 +1185,10 @@ func (c *cloudRedisClusterRESTClient) CreateCluster(ctx context.Context, req *cl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1288,17 +1239,7 @@ func (c *cloudRedisClusterRESTClient) GetClusterCertificateAuthority(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetClusterCertificateAuthority") if err != nil { return err } @@ -1348,17 +1289,7 @@ func (c *cloudRedisClusterRESTClient) GetLocation(ctx context.Context, req *loca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1423,21 +1354,10 @@ func (c *cloudRedisClusterRESTClient) ListLocations(ctx context.Context, req *lo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1497,15 +1417,8 @@ func (c *cloudRedisClusterRESTClient) CancelOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -1539,15 +1452,8 @@ func (c *cloudRedisClusterRESTClient) DeleteOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1584,17 +1490,7 @@ func (c *cloudRedisClusterRESTClient) GetOperation(ctx context.Context, req *lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1659,21 +1555,10 @@ func (c *cloudRedisClusterRESTClient) ListOperations(ctx context.Context, req *l } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/redis/cluster/apiv1/cloud_redis_cluster_client_example_go123_test.go b/redis/cluster/apiv1/cloud_redis_cluster_client_example_go123_test.go index e2d4d7b7ddd1..44cb19f18239 100644 --- a/redis/cluster/apiv1/cloud_redis_cluster_client_example_go123_test.go +++ b/redis/cluster/apiv1/cloud_redis_cluster_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCloudRedisClusterClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCloudRedisClusterClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCloudRedisClusterClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/redis/cluster/apiv1/clusterpb/cloud_redis_cluster.pb.go b/redis/cluster/apiv1/clusterpb/cloud_redis_cluster.pb.go index 684ec7dd1bec..f8d48fc00d05 100755 --- a/redis/cluster/apiv1/clusterpb/cloud_redis_cluster.pb.go +++ b/redis/cluster/apiv1/clusterpb/cloud_redis_cluster.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto @@ -537,11 +537,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -552,7 +550,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +620,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -637,7 +633,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,11 +696,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -715,7 +709,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +767,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -788,7 +780,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,11 +832,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -855,7 +845,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +885,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -910,7 +898,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +944,9 @@ type GetClusterCertificateAuthorityRequest struct { func (x *GetClusterCertificateAuthorityRequest) Reset() { *x = GetClusterCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterCertificateAuthorityRequest) String() string { @@ -971,7 +957,7 @@ func (*GetClusterCertificateAuthorityRequest) ProtoMessage() {} func (x *GetClusterCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1055,11 +1041,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -1070,7 +1054,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1215,9 @@ type PscConfig struct { func (x *PscConfig) Reset() { *x = PscConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscConfig) String() string { @@ -1246,7 +1228,7 @@ func (*PscConfig) ProtoMessage() {} func (x *PscConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1268,9 @@ type DiscoveryEndpoint struct { func (x *DiscoveryEndpoint) Reset() { *x = DiscoveryEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscoveryEndpoint) String() string { @@ -1301,7 +1281,7 @@ func (*DiscoveryEndpoint) ProtoMessage() {} func (x *DiscoveryEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1363,11 +1343,9 @@ type PscConnection struct { func (x *PscConnection) Reset() { *x = PscConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PscConnection) String() string { @@ -1378,7 +1356,7 @@ func (*PscConnection) ProtoMessage() {} func (x *PscConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1456,11 +1434,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1471,7 +1447,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,11 +1532,9 @@ type CertificateAuthority struct { func (x *CertificateAuthority) Reset() { *x = CertificateAuthority{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority) String() string { @@ -1571,7 +1545,7 @@ func (*CertificateAuthority) ProtoMessage() {} func (x *CertificateAuthority) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1633,11 +1607,9 @@ type ClusterPersistenceConfig struct { func (x *ClusterPersistenceConfig) Reset() { *x = ClusterPersistenceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterPersistenceConfig) String() string { @@ -1648,7 +1620,7 @@ func (*ClusterPersistenceConfig) ProtoMessage() {} func (x *ClusterPersistenceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1701,11 +1673,9 @@ type ZoneDistributionConfig struct { func (x *ZoneDistributionConfig) Reset() { *x = ZoneDistributionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ZoneDistributionConfig) String() string { @@ -1716,7 +1686,7 @@ func (*ZoneDistributionConfig) ProtoMessage() {} func (x *ZoneDistributionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1759,11 +1729,9 @@ type Cluster_StateInfo struct { func (x *Cluster_StateInfo) Reset() { *x = Cluster_StateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_StateInfo) String() string { @@ -1774,7 +1742,7 @@ func (*Cluster_StateInfo) ProtoMessage() {} func (x *Cluster_StateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1828,11 +1796,9 @@ type Cluster_StateInfo_UpdateInfo struct { func (x *Cluster_StateInfo_UpdateInfo) Reset() { *x = Cluster_StateInfo_UpdateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster_StateInfo_UpdateInfo) String() string { @@ -1843,7 +1809,7 @@ func (*Cluster_StateInfo_UpdateInfo) ProtoMessage() {} func (x *Cluster_StateInfo_UpdateInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,11 +1850,9 @@ type CertificateAuthority_ManagedCertificateAuthority struct { func (x *CertificateAuthority_ManagedCertificateAuthority) Reset() { *x = CertificateAuthority_ManagedCertificateAuthority{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority_ManagedCertificateAuthority) String() string { @@ -1899,7 +1863,7 @@ func (*CertificateAuthority_ManagedCertificateAuthority) ProtoMessage() {} func (x *CertificateAuthority_ManagedCertificateAuthority) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1932,11 +1896,9 @@ type CertificateAuthority_ManagedCertificateAuthority_CertChain struct { func (x *CertificateAuthority_ManagedCertificateAuthority_CertChain) Reset() { *x = CertificateAuthority_ManagedCertificateAuthority_CertChain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority_ManagedCertificateAuthority_CertChain) String() string { @@ -1947,7 +1909,7 @@ func (*CertificateAuthority_ManagedCertificateAuthority_CertChain) ProtoMessage( func (x *CertificateAuthority_ManagedCertificateAuthority_CertChain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1985,11 +1947,9 @@ type ClusterPersistenceConfig_RDBConfig struct { func (x *ClusterPersistenceConfig_RDBConfig) Reset() { *x = ClusterPersistenceConfig_RDBConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterPersistenceConfig_RDBConfig) String() string { @@ -2000,7 +1960,7 @@ func (*ClusterPersistenceConfig_RDBConfig) ProtoMessage() {} func (x *ClusterPersistenceConfig_RDBConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,11 +2001,9 @@ type ClusterPersistenceConfig_AOFConfig struct { func (x *ClusterPersistenceConfig_AOFConfig) Reset() { *x = ClusterPersistenceConfig_AOFConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterPersistenceConfig_AOFConfig) String() string { @@ -2056,7 +2014,7 @@ func (*ClusterPersistenceConfig_AOFConfig) ProtoMessage() {} func (x *ClusterPersistenceConfig_AOFConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2680,260 +2638,6 @@ func file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_init() { if File_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PscConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DiscoveryEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PscConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ClusterPersistenceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ZoneDistributionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_StateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Cluster_StateInfo_UpdateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority_ManagedCertificateAuthority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority_ManagedCertificateAuthority_CertChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ClusterPersistenceConfig_RDBConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ClusterPersistenceConfig_AOFConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[7].OneofWrappers = []any{} file_google_cloud_redis_cluster_v1_cloud_redis_cluster_proto_msgTypes[12].OneofWrappers = []any{ (*CertificateAuthority_ManagedServerCa)(nil), diff --git a/redis/cluster/apiv1/helpers.go b/redis/cluster/apiv1/helpers.go index 27439932a61c..f9ed4b56e665 100755 --- a/redis/cluster/apiv1/helpers.go +++ b/redis/cluster/apiv1/helpers.go @@ -18,10 +18,20 @@ package cluster import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "redis.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/resourcemanager/apiv2/folders_client.go b/resourcemanager/apiv2/folders_client.go index 51d4db7237c0..6dedd6330c51 100755 --- a/resourcemanager/apiv2/folders_client.go +++ b/resourcemanager/apiv2/folders_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv2/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -357,6 +356,8 @@ type foldersGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFoldersClient creates a new folders client based on gRPC. @@ -385,6 +386,7 @@ func NewFoldersClient(ctx context.Context, opts ...option.ClientOption) (*Folder connPool: connPool, foldersClient: resourcemanagerpb.NewFoldersClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -447,6 +449,8 @@ type foldersRESTClient struct { // Points back to the CallOptions field of the containing FoldersClient CallOptions **FoldersCallOptions + + logger *slog.Logger } // NewFoldersRESTClient creates a new folders rest client. @@ -466,6 +470,7 @@ func NewFoldersRESTClient(ctx context.Context, opts ...option.ClientOption) (*Fo endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -536,7 +541,7 @@ func (c *foldersGRPCClient) ListFolders(ctx context.Context, req *resourcemanage } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.ListFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.ListFolders, req, settings.GRPC, c.logger, "ListFolders") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *foldersGRPCClient) SearchFolders(ctx context.Context, req *resourcemana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.SearchFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.SearchFolders, req, settings.GRPC, c.logger, "SearchFolders") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *foldersGRPCClient) GetFolder(ctx context.Context, req *resourcemanagerp var resp *resourcemanagerpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.GetFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.GetFolder, req, settings.GRPC, c.logger, "GetFolder") return err }, opts...) if err != nil { @@ -629,7 +634,7 @@ func (c *foldersGRPCClient) CreateFolder(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.CreateFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.CreateFolder, req, settings.GRPC, c.logger, "CreateFolder") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *foldersGRPCClient) UpdateFolder(ctx context.Context, req *resourcemanag var resp *resourcemanagerpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.UpdateFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.UpdateFolder, req, settings.GRPC, c.logger, "UpdateFolder") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *foldersGRPCClient) MoveFolder(ctx context.Context, req *resourcemanager var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.MoveFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.MoveFolder, req, settings.GRPC, c.logger, "MoveFolder") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *foldersGRPCClient) DeleteFolder(ctx context.Context, req *resourcemanag var resp *resourcemanagerpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.DeleteFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.DeleteFolder, req, settings.GRPC, c.logger, "DeleteFolder") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *foldersGRPCClient) UndeleteFolder(ctx context.Context, req *resourceman var resp *resourcemanagerpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.UndeleteFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.UndeleteFolder, req, settings.GRPC, c.logger, "UndeleteFolder") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *foldersGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *foldersGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -759,7 +764,7 @@ func (c *foldersGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -823,21 +828,10 @@ func (c *foldersRESTClient) ListFolders(ctx context.Context, req *resourcemanage } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFolders") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -917,21 +911,10 @@ func (c *foldersRESTClient) SearchFolders(ctx context.Context, req *resourcemana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchFolders") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -998,17 +981,7 @@ func (c *foldersRESTClient) GetFolder(ctx context.Context, req *resourcemanagerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFolder") if err != nil { return err } @@ -1090,21 +1063,10 @@ func (c *foldersRESTClient) CreateFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFolder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1183,17 +1145,7 @@ func (c *foldersRESTClient) UpdateFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFolder") if err != nil { return err } @@ -1264,21 +1216,10 @@ func (c *foldersRESTClient) MoveFolder(ctx context.Context, req *resourcemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveFolder") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1340,17 +1281,7 @@ func (c *foldersRESTClient) DeleteFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFolder") if err != nil { return err } @@ -1415,17 +1346,7 @@ func (c *foldersRESTClient) UndeleteFolder(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteFolder") if err != nil { return err } @@ -1485,17 +1406,7 @@ func (c *foldersRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1555,17 +1466,7 @@ func (c *foldersRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1625,17 +1526,7 @@ func (c *foldersRESTClient) TestIamPermissions(ctx context.Context, req *iampb.T httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } diff --git a/resourcemanager/apiv2/folders_client_example_go123_test.go b/resourcemanager/apiv2/folders_client_example_go123_test.go index da6efcaf3380..5a73f7da27d5 100644 --- a/resourcemanager/apiv2/folders_client_example_go123_test.go +++ b/resourcemanager/apiv2/folders_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleFoldersClient_ListFolders_all() { } for resp, err := range c.ListFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleFoldersClient_SearchFolders_all() { } for resp, err := range c.SearchFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv2/helpers.go b/resourcemanager/apiv2/helpers.go index 5c1bbe7a6be3..c1de93186fe3 100755 --- a/resourcemanager/apiv2/helpers.go +++ b/resourcemanager/apiv2/helpers.go @@ -18,10 +18,20 @@ package resourcemanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudresourcemanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/resourcemanager/apiv2/resourcemanagerpb/folders.pb.go b/resourcemanager/apiv2/resourcemanagerpb/folders.pb.go index 6d5cbafd1cb7..1dec51e7eb74 100755 --- a/resourcemanager/apiv2/resourcemanagerpb/folders.pb.go +++ b/resourcemanager/apiv2/resourcemanagerpb/folders.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v2/folders.proto @@ -186,11 +186,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -201,7 +199,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +281,9 @@ type ListFoldersRequest struct { func (x *ListFoldersRequest) Reset() { *x = ListFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersRequest) String() string { @@ -298,7 +294,7 @@ func (*ListFoldersRequest) ProtoMessage() {} func (x *ListFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +353,9 @@ type ListFoldersResponse struct { func (x *ListFoldersResponse) Reset() { *x = ListFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersResponse) String() string { @@ -372,7 +366,7 @@ func (*ListFoldersResponse) ProtoMessage() {} func (x *ListFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +434,9 @@ type SearchFoldersRequest struct { func (x *SearchFoldersRequest) Reset() { *x = SearchFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFoldersRequest) String() string { @@ -455,7 +447,7 @@ func (*SearchFoldersRequest) ProtoMessage() {} func (x *SearchFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +499,9 @@ type SearchFoldersResponse struct { func (x *SearchFoldersResponse) Reset() { *x = SearchFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFoldersResponse) String() string { @@ -522,7 +512,7 @@ func (*SearchFoldersResponse) ProtoMessage() {} func (x *SearchFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +554,9 @@ type GetFolderRequest struct { func (x *GetFolderRequest) Reset() { *x = GetFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFolderRequest) String() string { @@ -579,7 +567,7 @@ func (*GetFolderRequest) ProtoMessage() {} func (x *GetFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +605,9 @@ type CreateFolderRequest struct { func (x *CreateFolderRequest) Reset() { *x = CreateFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFolderRequest) String() string { @@ -632,7 +618,7 @@ func (*CreateFolderRequest) ProtoMessage() {} func (x *CreateFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +664,9 @@ type MoveFolderRequest struct { func (x *MoveFolderRequest) Reset() { *x = MoveFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFolderRequest) String() string { @@ -693,7 +677,7 @@ func (*MoveFolderRequest) ProtoMessage() {} func (x *MoveFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -739,11 +723,9 @@ type UpdateFolderRequest struct { func (x *UpdateFolderRequest) Reset() { *x = UpdateFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFolderRequest) String() string { @@ -754,7 +736,7 @@ func (*UpdateFolderRequest) ProtoMessage() {} func (x *UpdateFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +781,9 @@ type DeleteFolderRequest struct { func (x *DeleteFolderRequest) Reset() { *x = DeleteFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFolderRequest) String() string { @@ -814,7 +794,7 @@ func (*DeleteFolderRequest) ProtoMessage() {} func (x *DeleteFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +836,9 @@ type UndeleteFolderRequest struct { func (x *UndeleteFolderRequest) Reset() { *x = UndeleteFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteFolderRequest) String() string { @@ -871,7 +849,7 @@ func (*UndeleteFolderRequest) ProtoMessage() {} func (x *UndeleteFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -913,11 +891,9 @@ type FolderOperation struct { func (x *FolderOperation) Reset() { *x = FolderOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FolderOperation) String() string { @@ -928,7 +904,7 @@ func (*FolderOperation) ProtoMessage() {} func (x *FolderOperation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,152 +1326,6 @@ func file_google_cloud_resourcemanager_v2_folders_proto_init() { if File_google_cloud_resourcemanager_v2_folders_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MoveFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v2_folders_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FolderOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/folders_client.go b/resourcemanager/apiv3/folders_client.go index 4444f9e6da49..cda03a8efea1 100755 --- a/resourcemanager/apiv3/folders_client.go +++ b/resourcemanager/apiv3/folders_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -487,6 +486,8 @@ type foldersGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFoldersClient creates a new folders client based on gRPC. @@ -515,6 +516,7 @@ func NewFoldersClient(ctx context.Context, opts ...option.ClientOption) (*Folder connPool: connPool, foldersClient: resourcemanagerpb.NewFoldersClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -578,6 +580,8 @@ type foldersRESTClient struct { // Points back to the CallOptions field of the containing FoldersClient CallOptions **FoldersCallOptions + + logger *slog.Logger } // NewFoldersRESTClient creates a new folders rest client. @@ -597,6 +601,7 @@ func NewFoldersRESTClient(ctx context.Context, opts ...option.ClientOption) (*Fo endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -659,7 +664,7 @@ func (c *foldersGRPCClient) GetFolder(ctx context.Context, req *resourcemanagerp var resp *resourcemanagerpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.GetFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.GetFolder, req, settings.GRPC, c.logger, "GetFolder") return err }, opts...) if err != nil { @@ -685,7 +690,7 @@ func (c *foldersGRPCClient) ListFolders(ctx context.Context, req *resourcemanage } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.ListFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.ListFolders, req, settings.GRPC, c.logger, "ListFolders") return err }, opts...) if err != nil { @@ -728,7 +733,7 @@ func (c *foldersGRPCClient) SearchFolders(ctx context.Context, req *resourcemana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.SearchFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.SearchFolders, req, settings.GRPC, c.logger, "SearchFolders") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *foldersGRPCClient) CreateFolder(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.CreateFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.CreateFolder, req, settings.GRPC, c.logger, "CreateFolder") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *foldersGRPCClient) UpdateFolder(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.UpdateFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.UpdateFolder, req, settings.GRPC, c.logger, "UpdateFolder") return err }, opts...) if err != nil { @@ -800,7 +805,7 @@ func (c *foldersGRPCClient) MoveFolder(ctx context.Context, req *resourcemanager var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.MoveFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.MoveFolder, req, settings.GRPC, c.logger, "MoveFolder") return err }, opts...) if err != nil { @@ -820,7 +825,7 @@ func (c *foldersGRPCClient) DeleteFolder(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.DeleteFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.DeleteFolder, req, settings.GRPC, c.logger, "DeleteFolder") return err }, opts...) if err != nil { @@ -840,7 +845,7 @@ func (c *foldersGRPCClient) UndeleteFolder(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.UndeleteFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.UndeleteFolder, req, settings.GRPC, c.logger, "UndeleteFolder") return err }, opts...) if err != nil { @@ -860,7 +865,7 @@ func (c *foldersGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *foldersGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -896,7 +901,7 @@ func (c *foldersGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.foldersClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.foldersClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -914,7 +919,7 @@ func (c *foldersGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -960,17 +965,7 @@ func (c *foldersRESTClient) GetFolder(ctx context.Context, req *resourcemanagerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFolder") if err != nil { return err } @@ -1042,21 +1037,10 @@ func (c *foldersRESTClient) ListFolders(ctx context.Context, req *resourcemanage } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFolders") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1139,21 +1123,10 @@ func (c *foldersRESTClient) SearchFolders(ctx context.Context, req *resourcemana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchFolders") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1247,21 +1220,10 @@ func (c *foldersRESTClient) CreateFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFolder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1341,21 +1303,10 @@ func (c *foldersRESTClient) UpdateFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFolder") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1427,21 +1378,10 @@ func (c *foldersRESTClient) MoveFolder(ctx context.Context, req *resourcemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveFolder") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1501,21 +1441,10 @@ func (c *foldersRESTClient) DeleteFolder(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteFolder") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1581,21 +1510,10 @@ func (c *foldersRESTClient) UndeleteFolder(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteFolder") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1656,17 +1574,7 @@ func (c *foldersRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1726,17 +1634,7 @@ func (c *foldersRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1796,17 +1694,7 @@ func (c *foldersRESTClient) TestIamPermissions(ctx context.Context, req *iampb.T httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1856,17 +1744,7 @@ func (c *foldersRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/folders_client_example_go123_test.go b/resourcemanager/apiv3/folders_client_example_go123_test.go index bcdfa8652420..9110d4b6123e 100644 --- a/resourcemanager/apiv3/folders_client_example_go123_test.go +++ b/resourcemanager/apiv3/folders_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleFoldersClient_ListFolders_all() { } for resp, err := range c.ListFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleFoldersClient_SearchFolders_all() { } for resp, err := range c.SearchFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/helpers.go b/resourcemanager/apiv3/helpers.go index 5c1bbe7a6be3..c1de93186fe3 100755 --- a/resourcemanager/apiv3/helpers.go +++ b/resourcemanager/apiv3/helpers.go @@ -18,10 +18,20 @@ package resourcemanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudresourcemanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform.read-only", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/resourcemanager/apiv3/organizations_client.go b/resourcemanager/apiv3/organizations_client.go index 0a5db689893c..d69bdbb0260b 100755 --- a/resourcemanager/apiv3/organizations_client.go +++ b/resourcemanager/apiv3/organizations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -256,6 +255,8 @@ type organizationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOrganizationsClient creates a new organizations client based on gRPC. @@ -282,6 +283,7 @@ func NewOrganizationsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, organizationsClient: resourcemanagerpb.NewOrganizationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -329,6 +331,8 @@ type organizationsRESTClient struct { // Points back to the CallOptions field of the containing OrganizationsClient CallOptions **OrganizationsCallOptions + + logger *slog.Logger } // NewOrganizationsRESTClient creates a new organizations rest client. @@ -346,6 +350,7 @@ func NewOrganizationsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,7 +403,7 @@ func (c *organizationsGRPCClient) GetOrganization(ctx context.Context, req *reso var resp *resourcemanagerpb.Organization err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.organizationsClient.GetOrganization(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.organizationsClient.GetOrganization, req, settings.GRPC, c.logger, "GetOrganization") return err }, opts...) if err != nil { @@ -424,7 +429,7 @@ func (c *organizationsGRPCClient) SearchOrganizations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.organizationsClient.SearchOrganizations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.organizationsClient.SearchOrganizations, req, settings.GRPC, c.logger, "SearchOrganizations") return err }, opts...) if err != nil { @@ -459,7 +464,7 @@ func (c *organizationsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.organizationsClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.organizationsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -477,7 +482,7 @@ func (c *organizationsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.organizationsClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.organizationsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -495,7 +500,7 @@ func (c *organizationsGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.organizationsClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.organizationsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *organizationsGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -555,17 +560,7 @@ func (c *organizationsRESTClient) GetOrganization(ctx context.Context, req *reso httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganization") if err != nil { return err } @@ -636,21 +631,10 @@ func (c *organizationsRESTClient) SearchOrganizations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchOrganizations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -724,17 +708,7 @@ func (c *organizationsRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -795,17 +769,7 @@ func (c *organizationsRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -865,17 +829,7 @@ func (c *organizationsRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -925,17 +879,7 @@ func (c *organizationsRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/organizations_client_example_go123_test.go b/resourcemanager/apiv3/organizations_client_example_go123_test.go index 08c07e3ebda5..63061816cc22 100644 --- a/resourcemanager/apiv3/organizations_client_example_go123_test.go +++ b/resourcemanager/apiv3/organizations_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleOrganizationsClient_SearchOrganizations_all() { } for resp, err := range c.SearchOrganizations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/projects_client.go b/resourcemanager/apiv3/projects_client.go index cca00eda680a..00edb7c536cf 100755 --- a/resourcemanager/apiv3/projects_client.go +++ b/resourcemanager/apiv3/projects_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -501,6 +500,8 @@ type projectsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectsClient creates a new projects client based on gRPC. @@ -527,6 +528,7 @@ func NewProjectsClient(ctx context.Context, opts ...option.ClientOption) (*Proje connPool: connPool, projectsClient: resourcemanagerpb.NewProjectsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -590,6 +592,8 @@ type projectsRESTClient struct { // Points back to the CallOptions field of the containing ProjectsClient CallOptions **ProjectsCallOptions + + logger *slog.Logger } // NewProjectsRESTClient creates a new projects rest client. @@ -607,6 +611,7 @@ func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -669,7 +674,7 @@ func (c *projectsGRPCClient) GetProject(ctx context.Context, req *resourcemanage var resp *resourcemanagerpb.Project err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.GetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.GetProject, req, settings.GRPC, c.logger, "GetProject") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *projectsGRPCClient) ListProjects(ctx context.Context, req *resourcemana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.ListProjects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.ListProjects, req, settings.GRPC, c.logger, "ListProjects") return err }, opts...) if err != nil { @@ -738,7 +743,7 @@ func (c *projectsGRPCClient) SearchProjects(ctx context.Context, req *resourcema } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.SearchProjects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.SearchProjects, req, settings.GRPC, c.logger, "SearchProjects") return err }, opts...) if err != nil { @@ -770,7 +775,7 @@ func (c *projectsGRPCClient) CreateProject(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.CreateProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.CreateProject, req, settings.GRPC, c.logger, "CreateProject") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *projectsGRPCClient) UpdateProject(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.UpdateProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.UpdateProject, req, settings.GRPC, c.logger, "UpdateProject") return err }, opts...) if err != nil { @@ -810,7 +815,7 @@ func (c *projectsGRPCClient) MoveProject(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.MoveProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.MoveProject, req, settings.GRPC, c.logger, "MoveProject") return err }, opts...) if err != nil { @@ -830,7 +835,7 @@ func (c *projectsGRPCClient) DeleteProject(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.DeleteProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.DeleteProject, req, settings.GRPC, c.logger, "DeleteProject") return err }, opts...) if err != nil { @@ -850,7 +855,7 @@ func (c *projectsGRPCClient) UndeleteProject(ctx context.Context, req *resourcem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.UndeleteProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.UndeleteProject, req, settings.GRPC, c.logger, "UndeleteProject") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *projectsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *projectsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *projectsGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectsClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *projectsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -970,17 +975,7 @@ func (c *projectsRESTClient) GetProject(ctx context.Context, req *resourcemanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProject") if err != nil { return err } @@ -1051,21 +1046,10 @@ func (c *projectsRESTClient) ListProjects(ctx context.Context, req *resourcemana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProjects") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1152,21 +1136,10 @@ func (c *projectsRESTClient) SearchProjects(ctx context.Context, req *resourcema } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchProjects") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1236,21 +1209,10 @@ func (c *projectsRESTClient) CreateProject(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProject") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1319,21 +1281,10 @@ func (c *projectsRESTClient) UpdateProject(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1402,21 +1353,10 @@ func (c *projectsRESTClient) MoveProject(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1498,21 +1438,10 @@ func (c *projectsRESTClient) DeleteProject(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProject") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,21 +1505,10 @@ func (c *projectsRESTClient) UndeleteProject(ctx context.Context, req *resourcem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1649,17 +1567,7 @@ func (c *projectsRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1755,17 +1663,7 @@ func (c *projectsRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1822,17 +1720,7 @@ func (c *projectsRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1882,17 +1770,7 @@ func (c *projectsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/projects_client_example_go123_test.go b/resourcemanager/apiv3/projects_client_example_go123_test.go index 3632988c2082..47d121fc93fb 100644 --- a/resourcemanager/apiv3/projects_client_example_go123_test.go +++ b/resourcemanager/apiv3/projects_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectsClient_ListProjects_all() { } for resp, err := range c.ListProjects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleProjectsClient_SearchProjects_all() { } for resp, err := range c.SearchProjects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go b/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go index e8d2cde640c6..dc2d8e57575d 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/folders.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/folders.proto @@ -138,11 +138,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -153,7 +151,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +235,9 @@ type GetFolderRequest struct { func (x *GetFolderRequest) Reset() { *x = GetFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFolderRequest) String() string { @@ -252,7 +248,7 @@ func (*GetFolderRequest) ProtoMessage() {} func (x *GetFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type ListFoldersRequest struct { func (x *ListFoldersRequest) Reset() { *x = ListFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersRequest) String() string { @@ -320,7 +314,7 @@ func (*ListFoldersRequest) ProtoMessage() {} func (x *ListFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +373,9 @@ type ListFoldersResponse struct { func (x *ListFoldersResponse) Reset() { *x = ListFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersResponse) String() string { @@ -394,7 +386,7 @@ func (*ListFoldersResponse) ProtoMessage() {} func (x *ListFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +464,9 @@ type SearchFoldersRequest struct { func (x *SearchFoldersRequest) Reset() { *x = SearchFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFoldersRequest) String() string { @@ -487,7 +477,7 @@ func (*SearchFoldersRequest) ProtoMessage() {} func (x *SearchFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +529,9 @@ type SearchFoldersResponse struct { func (x *SearchFoldersResponse) Reset() { *x = SearchFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchFoldersResponse) String() string { @@ -554,7 +542,7 @@ func (*SearchFoldersResponse) ProtoMessage() {} func (x *SearchFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +584,9 @@ type CreateFolderRequest struct { func (x *CreateFolderRequest) Reset() { *x = CreateFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFolderRequest) String() string { @@ -611,7 +597,7 @@ func (*CreateFolderRequest) ProtoMessage() {} func (x *CreateFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +634,9 @@ type CreateFolderMetadata struct { func (x *CreateFolderMetadata) Reset() { *x = CreateFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFolderMetadata) String() string { @@ -663,7 +647,7 @@ func (*CreateFolderMetadata) ProtoMessage() {} func (x *CreateFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +699,9 @@ type UpdateFolderRequest struct { func (x *UpdateFolderRequest) Reset() { *x = UpdateFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFolderRequest) String() string { @@ -730,7 +712,7 @@ func (*UpdateFolderRequest) ProtoMessage() {} func (x *UpdateFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +751,9 @@ type UpdateFolderMetadata struct { func (x *UpdateFolderMetadata) Reset() { *x = UpdateFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFolderMetadata) String() string { @@ -784,7 +764,7 @@ func (*UpdateFolderMetadata) ProtoMessage() {} func (x *UpdateFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +796,9 @@ type MoveFolderRequest struct { func (x *MoveFolderRequest) Reset() { *x = MoveFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFolderRequest) String() string { @@ -831,7 +809,7 @@ func (*MoveFolderRequest) ProtoMessage() {} func (x *MoveFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -876,11 +854,9 @@ type MoveFolderMetadata struct { func (x *MoveFolderMetadata) Reset() { *x = MoveFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveFolderMetadata) String() string { @@ -891,7 +867,7 @@ func (*MoveFolderMetadata) ProtoMessage() {} func (x *MoveFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +916,9 @@ type DeleteFolderRequest struct { func (x *DeleteFolderRequest) Reset() { *x = DeleteFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFolderRequest) String() string { @@ -955,7 +929,7 @@ func (*DeleteFolderRequest) ProtoMessage() {} func (x *DeleteFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +961,9 @@ type DeleteFolderMetadata struct { func (x *DeleteFolderMetadata) Reset() { *x = DeleteFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFolderMetadata) String() string { @@ -1002,7 +974,7 @@ func (*DeleteFolderMetadata) ProtoMessage() {} func (x *DeleteFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1002,9 @@ type UndeleteFolderRequest struct { func (x *UndeleteFolderRequest) Reset() { *x = UndeleteFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteFolderRequest) String() string { @@ -1045,7 +1015,7 @@ func (*UndeleteFolderRequest) ProtoMessage() {} func (x *UndeleteFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1047,9 @@ type UndeleteFolderMetadata struct { func (x *UndeleteFolderMetadata) Reset() { *x = UndeleteFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteFolderMetadata) String() string { @@ -1092,7 +1060,7 @@ func (*UndeleteFolderMetadata) ProtoMessage() {} func (x *UndeleteFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,200 +1459,6 @@ func file_google_cloud_resourcemanager_v3_folders_proto_init() { if File_google_cloud_resourcemanager_v3_folders_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MoveFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MoveFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_folders_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go b/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go index 88452221139e..8c8dcd8eaaba 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/organizations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/organizations.proto @@ -138,11 +138,9 @@ type Organization struct { func (x *Organization) Reset() { *x = Organization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Organization) String() string { @@ -153,7 +151,7 @@ func (*Organization) ProtoMessage() {} func (x *Organization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +255,9 @@ type GetOrganizationRequest struct { func (x *GetOrganizationRequest) Reset() { *x = GetOrganizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationRequest) String() string { @@ -272,7 +268,7 @@ func (*GetOrganizationRequest) ProtoMessage() {} func (x *GetOrganizationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +326,9 @@ type SearchOrganizationsRequest struct { func (x *SearchOrganizationsRequest) Reset() { *x = SearchOrganizationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchOrganizationsRequest) String() string { @@ -345,7 +339,7 @@ func (*SearchOrganizationsRequest) ProtoMessage() {} func (x *SearchOrganizationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,11 +394,9 @@ type SearchOrganizationsResponse struct { func (x *SearchOrganizationsResponse) Reset() { *x = SearchOrganizationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchOrganizationsResponse) String() string { @@ -415,7 +407,7 @@ func (*SearchOrganizationsResponse) ProtoMessage() {} func (x *SearchOrganizationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +446,9 @@ type DeleteOrganizationMetadata struct { func (x *DeleteOrganizationMetadata) Reset() { *x = DeleteOrganizationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOrganizationMetadata) String() string { @@ -469,7 +459,7 @@ func (*DeleteOrganizationMetadata) ProtoMessage() {} func (x *DeleteOrganizationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,11 +484,9 @@ type UndeleteOrganizationMetadata struct { func (x *UndeleteOrganizationMetadata) Reset() { *x = UndeleteOrganizationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteOrganizationMetadata) String() string { @@ -509,7 +497,7 @@ func (*UndeleteOrganizationMetadata) ProtoMessage() {} func (x *UndeleteOrganizationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,80 +737,6 @@ func file_google_cloud_resourcemanager_v3_organizations_proto_init() { if File_google_cloud_resourcemanager_v3_organizations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Organization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchOrganizationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchOrganizationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOrganizationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteOrganizationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_resourcemanager_v3_organizations_proto_msgTypes[0].OneofWrappers = []any{ (*Organization_DirectoryCustomerId)(nil), } diff --git a/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go b/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go index f2076adb3513..8bad00d705ba 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/projects.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/projects.proto @@ -164,11 +164,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -179,7 +177,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +276,9 @@ type GetProjectRequest struct { func (x *GetProjectRequest) Reset() { *x = GetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectRequest) String() string { @@ -293,7 +289,7 @@ func (*GetProjectRequest) ProtoMessage() {} func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +341,9 @@ type ListProjectsRequest struct { func (x *ListProjectsRequest) Reset() { *x = ListProjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectsRequest) String() string { @@ -360,7 +354,7 @@ func (*ListProjectsRequest) ProtoMessage() {} func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +430,9 @@ type ListProjectsResponse struct { func (x *ListProjectsResponse) Reset() { *x = ListProjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProjectsResponse) String() string { @@ -451,7 +443,7 @@ func (*ListProjectsResponse) ProtoMessage() {} func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +525,9 @@ type SearchProjectsRequest struct { func (x *SearchProjectsRequest) Reset() { *x = SearchProjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProjectsRequest) String() string { @@ -548,7 +538,7 @@ func (*SearchProjectsRequest) ProtoMessage() {} func (x *SearchProjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +605,9 @@ type SearchProjectsResponse struct { func (x *SearchProjectsResponse) Reset() { *x = SearchProjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchProjectsResponse) String() string { @@ -630,7 +618,7 @@ func (*SearchProjectsResponse) ProtoMessage() {} func (x *SearchProjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +669,9 @@ type CreateProjectRequest struct { func (x *CreateProjectRequest) Reset() { *x = CreateProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProjectRequest) String() string { @@ -696,7 +682,7 @@ func (*CreateProjectRequest) ProtoMessage() {} func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +724,9 @@ type CreateProjectMetadata struct { func (x *CreateProjectMetadata) Reset() { *x = CreateProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProjectMetadata) String() string { @@ -753,7 +737,7 @@ func (*CreateProjectMetadata) ProtoMessage() {} func (x *CreateProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +793,9 @@ type UpdateProjectRequest struct { func (x *UpdateProjectRequest) Reset() { *x = UpdateProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProjectRequest) String() string { @@ -824,7 +806,7 @@ func (*UpdateProjectRequest) ProtoMessage() {} func (x *UpdateProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -863,11 +845,9 @@ type UpdateProjectMetadata struct { func (x *UpdateProjectMetadata) Reset() { *x = UpdateProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProjectMetadata) String() string { @@ -878,7 +858,7 @@ func (*UpdateProjectMetadata) ProtoMessage() {} func (x *UpdateProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +889,9 @@ type MoveProjectRequest struct { func (x *MoveProjectRequest) Reset() { *x = MoveProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveProjectRequest) String() string { @@ -924,7 +902,7 @@ func (*MoveProjectRequest) ProtoMessage() {} func (x *MoveProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,11 +941,9 @@ type MoveProjectMetadata struct { func (x *MoveProjectMetadata) Reset() { *x = MoveProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveProjectMetadata) String() string { @@ -978,7 +954,7 @@ func (*MoveProjectMetadata) ProtoMessage() {} func (x *MoveProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +982,9 @@ type DeleteProjectRequest struct { func (x *DeleteProjectRequest) Reset() { *x = DeleteProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProjectRequest) String() string { @@ -1021,7 +995,7 @@ func (*DeleteProjectRequest) ProtoMessage() {} func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1027,9 @@ type DeleteProjectMetadata struct { func (x *DeleteProjectMetadata) Reset() { *x = DeleteProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProjectMetadata) String() string { @@ -1068,7 +1040,7 @@ func (*DeleteProjectMetadata) ProtoMessage() {} func (x *DeleteProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1099,11 +1071,9 @@ type UndeleteProjectRequest struct { func (x *UndeleteProjectRequest) Reset() { *x = UndeleteProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteProjectRequest) String() string { @@ -1114,7 +1084,7 @@ func (*UndeleteProjectRequest) ProtoMessage() {} func (x *UndeleteProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1116,9 @@ type UndeleteProjectMetadata struct { func (x *UndeleteProjectMetadata) Reset() { *x = UndeleteProjectMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteProjectMetadata) String() string { @@ -1161,7 +1129,7 @@ func (*UndeleteProjectMetadata) ProtoMessage() {} func (x *UndeleteProjectMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,200 +1544,6 @@ func file_google_cloud_resourcemanager_v3_projects_proto_init() { if File_google_cloud_resourcemanager_v3_projects_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListProjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchProjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchProjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MoveProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MoveProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_projects_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteProjectMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go b/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go index 6d28133924f5..ea95898fbdda 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/tag_bindings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/tag_bindings.proto @@ -72,11 +72,9 @@ type TagBinding struct { func (x *TagBinding) Reset() { *x = TagBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagBinding) String() string { @@ -87,7 +85,7 @@ func (*TagBinding) ProtoMessage() {} func (x *TagBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,11 +137,9 @@ type CreateTagBindingMetadata struct { func (x *CreateTagBindingMetadata) Reset() { *x = CreateTagBindingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagBindingMetadata) String() string { @@ -154,7 +150,7 @@ func (*CreateTagBindingMetadata) ProtoMessage() {} func (x *CreateTagBindingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +180,9 @@ type CreateTagBindingRequest struct { func (x *CreateTagBindingRequest) Reset() { *x = CreateTagBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagBindingRequest) String() string { @@ -199,7 +193,7 @@ func (*CreateTagBindingRequest) ProtoMessage() {} func (x *CreateTagBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type DeleteTagBindingMetadata struct { func (x *DeleteTagBindingMetadata) Reset() { *x = DeleteTagBindingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagBindingMetadata) String() string { @@ -252,7 +244,7 @@ func (*DeleteTagBindingMetadata) ProtoMessage() {} func (x *DeleteTagBindingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +273,9 @@ type DeleteTagBindingRequest struct { func (x *DeleteTagBindingRequest) Reset() { *x = DeleteTagBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagBindingRequest) String() string { @@ -296,7 +286,7 @@ func (*DeleteTagBindingRequest) ProtoMessage() {} func (x *DeleteTagBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +329,9 @@ type ListTagBindingsRequest struct { func (x *ListTagBindingsRequest) Reset() { *x = ListTagBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagBindingsRequest) String() string { @@ -354,7 +342,7 @@ func (*ListTagBindingsRequest) ProtoMessage() {} func (x *ListTagBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,11 +402,9 @@ type ListTagBindingsResponse struct { func (x *ListTagBindingsResponse) Reset() { *x = ListTagBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagBindingsResponse) String() string { @@ -429,7 +415,7 @@ func (*ListTagBindingsResponse) ProtoMessage() {} func (x *ListTagBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +465,9 @@ type ListEffectiveTagsRequest struct { func (x *ListEffectiveTagsRequest) Reset() { *x = ListEffectiveTagsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveTagsRequest) String() string { @@ -494,7 +478,7 @@ func (*ListEffectiveTagsRequest) ProtoMessage() {} func (x *ListEffectiveTagsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +538,9 @@ type ListEffectiveTagsResponse struct { func (x *ListEffectiveTagsResponse) Reset() { *x = ListEffectiveTagsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveTagsResponse) String() string { @@ -569,7 +551,7 @@ func (*ListEffectiveTagsResponse) ProtoMessage() {} func (x *ListEffectiveTagsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +618,9 @@ type EffectiveTag struct { func (x *EffectiveTag) Reset() { *x = EffectiveTag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveTag) String() string { @@ -651,7 +631,7 @@ func (*EffectiveTag) ProtoMessage() {} func (x *EffectiveTag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -944,128 +924,6 @@ func file_google_cloud_resourcemanager_v3_tag_bindings_proto_init() { if File_google_cloud_resourcemanager_v3_tag_bindings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TagBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagBindingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagBindingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTagBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTagBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveTagsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveTagsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_bindings_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go b/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go index 3c2b67517bd8..f32417bf2b99 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/tag_holds.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/tag_holds.proto @@ -76,11 +76,9 @@ type TagHold struct { func (x *TagHold) Reset() { *x = TagHold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagHold) String() string { @@ -91,7 +89,7 @@ func (*TagHold) ProtoMessage() {} func (x *TagHold) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type CreateTagHoldRequest struct { func (x *CreateTagHoldRequest) Reset() { *x = CreateTagHoldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagHoldRequest) String() string { @@ -174,7 +170,7 @@ func (*CreateTagHoldRequest) ProtoMessage() {} func (x *CreateTagHoldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type CreateTagHoldMetadata struct { func (x *CreateTagHoldMetadata) Reset() { *x = CreateTagHoldMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagHoldMetadata) String() string { @@ -236,7 +230,7 @@ func (*CreateTagHoldMetadata) ProtoMessage() {} func (x *CreateTagHoldMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +261,9 @@ type DeleteTagHoldRequest struct { func (x *DeleteTagHoldRequest) Reset() { *x = DeleteTagHoldRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagHoldRequest) String() string { @@ -282,7 +274,7 @@ func (*DeleteTagHoldRequest) ProtoMessage() {} func (x *DeleteTagHoldRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -322,11 +314,9 @@ type DeleteTagHoldMetadata struct { func (x *DeleteTagHoldMetadata) Reset() { *x = DeleteTagHoldMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagHoldMetadata) String() string { @@ -337,7 +327,7 @@ func (*DeleteTagHoldMetadata) ProtoMessage() {} func (x *DeleteTagHoldMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +374,9 @@ type ListTagHoldsRequest struct { func (x *ListTagHoldsRequest) Reset() { *x = ListTagHoldsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagHoldsRequest) String() string { @@ -399,7 +387,7 @@ func (*ListTagHoldsRequest) ProtoMessage() {} func (x *ListTagHoldsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,11 +454,9 @@ type ListTagHoldsResponse struct { func (x *ListTagHoldsResponse) Reset() { *x = ListTagHoldsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagHoldsResponse) String() string { @@ -481,7 +467,7 @@ func (*ListTagHoldsResponse) ProtoMessage() {} func (x *ListTagHoldsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,92 +693,6 @@ func file_google_cloud_resourcemanager_v3_tag_holds_proto_init() { if File_google_cloud_resourcemanager_v3_tag_holds_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TagHold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagHoldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagHoldMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagHoldRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagHoldMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTagHoldsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_holds_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTagHoldsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go b/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go index c98bcd84cb3c..1e2b70566353 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/tag_keys.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/tag_keys.proto @@ -163,11 +163,9 @@ type TagKey struct { func (x *TagKey) Reset() { *x = TagKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagKey) String() string { @@ -178,7 +176,7 @@ func (*TagKey) ProtoMessage() {} func (x *TagKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +282,9 @@ type ListTagKeysRequest struct { func (x *ListTagKeysRequest) Reset() { *x = ListTagKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagKeysRequest) String() string { @@ -299,7 +295,7 @@ func (*ListTagKeysRequest) ProtoMessage() {} func (x *ListTagKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type ListTagKeysResponse struct { func (x *ListTagKeysResponse) Reset() { *x = ListTagKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagKeysResponse) String() string { @@ -365,7 +359,7 @@ func (*ListTagKeysResponse) ProtoMessage() {} func (x *ListTagKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +401,9 @@ type GetTagKeyRequest struct { func (x *GetTagKeyRequest) Reset() { *x = GetTagKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagKeyRequest) String() string { @@ -422,7 +414,7 @@ func (*GetTagKeyRequest) ProtoMessage() {} func (x *GetTagKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +451,9 @@ type GetNamespacedTagKeyRequest struct { func (x *GetNamespacedTagKeyRequest) Reset() { *x = GetNamespacedTagKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNamespacedTagKeyRequest) String() string { @@ -474,7 +464,7 @@ func (*GetNamespacedTagKeyRequest) ProtoMessage() {} func (x *GetNamespacedTagKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,11 +502,9 @@ type CreateTagKeyRequest struct { func (x *CreateTagKeyRequest) Reset() { *x = CreateTagKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagKeyRequest) String() string { @@ -527,7 +515,7 @@ func (*CreateTagKeyRequest) ProtoMessage() {} func (x *CreateTagKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +553,9 @@ type CreateTagKeyMetadata struct { func (x *CreateTagKeyMetadata) Reset() { *x = CreateTagKeyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagKeyMetadata) String() string { @@ -580,7 +566,7 @@ func (*CreateTagKeyMetadata) ProtoMessage() {} func (x *CreateTagKeyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +603,9 @@ type UpdateTagKeyRequest struct { func (x *UpdateTagKeyRequest) Reset() { *x = UpdateTagKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagKeyRequest) String() string { @@ -632,7 +616,7 @@ func (*UpdateTagKeyRequest) ProtoMessage() {} func (x *UpdateTagKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +661,9 @@ type UpdateTagKeyMetadata struct { func (x *UpdateTagKeyMetadata) Reset() { *x = UpdateTagKeyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagKeyMetadata) String() string { @@ -692,7 +674,7 @@ func (*UpdateTagKeyMetadata) ProtoMessage() {} func (x *UpdateTagKeyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,11 +709,9 @@ type DeleteTagKeyRequest struct { func (x *DeleteTagKeyRequest) Reset() { *x = DeleteTagKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagKeyRequest) String() string { @@ -742,7 +722,7 @@ func (*DeleteTagKeyRequest) ProtoMessage() {} func (x *DeleteTagKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +767,9 @@ type DeleteTagKeyMetadata struct { func (x *DeleteTagKeyMetadata) Reset() { *x = DeleteTagKeyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagKeyMetadata) String() string { @@ -802,7 +780,7 @@ func (*DeleteTagKeyMetadata) ProtoMessage() {} func (x *DeleteTagKeyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,140 +1125,6 @@ func file_google_cloud_resourcemanager_v3_tag_keys_proto_init() { if File_google_cloud_resourcemanager_v3_tag_keys_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TagKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTagKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTagKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTagKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetNamespacedTagKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagKeyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagKeyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_keys_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagKeyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go b/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go index 41dea1469443..f43501ecc2d7 100755 --- a/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go +++ b/resourcemanager/apiv3/resourcemanagerpb/tag_values.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcemanager/v3/tag_values.proto @@ -85,11 +85,9 @@ type TagValue struct { func (x *TagValue) Reset() { *x = TagValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagValue) String() string { @@ -100,7 +98,7 @@ func (*TagValue) ProtoMessage() {} func (x *TagValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type ListTagValuesRequest struct { func (x *ListTagValuesRequest) Reset() { *x = ListTagValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagValuesRequest) String() string { @@ -207,7 +203,7 @@ func (*ListTagValuesRequest) ProtoMessage() {} func (x *ListTagValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ListTagValuesResponse struct { func (x *ListTagValuesResponse) Reset() { *x = ListTagValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTagValuesResponse) String() string { @@ -275,7 +269,7 @@ func (*ListTagValuesResponse) ProtoMessage() {} func (x *ListTagValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +311,9 @@ type GetTagValueRequest struct { func (x *GetTagValueRequest) Reset() { *x = GetTagValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTagValueRequest) String() string { @@ -332,7 +324,7 @@ func (*GetTagValueRequest) ProtoMessage() {} func (x *GetTagValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +366,9 @@ type GetNamespacedTagValueRequest struct { func (x *GetNamespacedTagValueRequest) Reset() { *x = GetNamespacedTagValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNamespacedTagValueRequest) String() string { @@ -389,7 +379,7 @@ func (*GetNamespacedTagValueRequest) ProtoMessage() {} func (x *GetNamespacedTagValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +417,9 @@ type CreateTagValueRequest struct { func (x *CreateTagValueRequest) Reset() { *x = CreateTagValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagValueRequest) String() string { @@ -442,7 +430,7 @@ func (*CreateTagValueRequest) ProtoMessage() {} func (x *CreateTagValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,11 +468,9 @@ type CreateTagValueMetadata struct { func (x *CreateTagValueMetadata) Reset() { *x = CreateTagValueMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTagValueMetadata) String() string { @@ -495,7 +481,7 @@ func (*CreateTagValueMetadata) ProtoMessage() {} func (x *CreateTagValueMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +516,9 @@ type UpdateTagValueRequest struct { func (x *UpdateTagValueRequest) Reset() { *x = UpdateTagValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagValueRequest) String() string { @@ -545,7 +529,7 @@ func (*UpdateTagValueRequest) ProtoMessage() {} func (x *UpdateTagValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -590,11 +574,9 @@ type UpdateTagValueMetadata struct { func (x *UpdateTagValueMetadata) Reset() { *x = UpdateTagValueMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTagValueMetadata) String() string { @@ -605,7 +587,7 @@ func (*UpdateTagValueMetadata) ProtoMessage() {} func (x *UpdateTagValueMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +621,9 @@ type DeleteTagValueRequest struct { func (x *DeleteTagValueRequest) Reset() { *x = DeleteTagValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagValueRequest) String() string { @@ -654,7 +634,7 @@ func (*DeleteTagValueRequest) ProtoMessage() {} func (x *DeleteTagValueRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +679,9 @@ type DeleteTagValueMetadata struct { func (x *DeleteTagValueMetadata) Reset() { *x = DeleteTagValueMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTagValueMetadata) String() string { @@ -714,7 +692,7 @@ func (*DeleteTagValueMetadata) ProtoMessage() {} func (x *DeleteTagValueMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1044,140 +1022,6 @@ func file_google_cloud_resourcemanager_v3_tag_values_proto_init() { if File_google_cloud_resourcemanager_v3_tag_values_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TagValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTagValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTagValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTagValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetNamespacedTagValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateTagValueMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTagValueMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcemanager_v3_tag_values_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTagValueMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/resourcemanager/apiv3/tag_bindings_client.go b/resourcemanager/apiv3/tag_bindings_client.go index 113d9236c227..dd15ec716344 100755 --- a/resourcemanager/apiv3/tag_bindings_client.go +++ b/resourcemanager/apiv3/tag_bindings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -237,6 +236,8 @@ type tagBindingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTagBindingsClient creates a new tag bindings client based on gRPC. @@ -264,6 +265,7 @@ func NewTagBindingsClient(ctx context.Context, opts ...option.ClientOption) (*Ta connPool: connPool, tagBindingsClient: resourcemanagerpb.NewTagBindingsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -327,6 +329,8 @@ type tagBindingsRESTClient struct { // Points back to the CallOptions field of the containing TagBindingsClient CallOptions **TagBindingsCallOptions + + logger *slog.Logger } // NewTagBindingsRESTClient creates a new tag bindings rest client. @@ -345,6 +349,7 @@ func NewTagBindingsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -415,7 +420,7 @@ func (c *tagBindingsGRPCClient) ListTagBindings(ctx context.Context, req *resour } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagBindingsClient.ListTagBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagBindingsClient.ListTagBindings, req, settings.GRPC, c.logger, "ListTagBindings") return err }, opts...) if err != nil { @@ -447,7 +452,7 @@ func (c *tagBindingsGRPCClient) CreateTagBinding(ctx context.Context, req *resou var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagBindingsClient.CreateTagBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagBindingsClient.CreateTagBinding, req, settings.GRPC, c.logger, "CreateTagBinding") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *tagBindingsGRPCClient) DeleteTagBinding(ctx context.Context, req *resou var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagBindingsClient.DeleteTagBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagBindingsClient.DeleteTagBinding, req, settings.GRPC, c.logger, "DeleteTagBinding") return err }, opts...) if err != nil { @@ -495,7 +500,7 @@ func (c *tagBindingsGRPCClient) ListEffectiveTags(ctx context.Context, req *reso } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagBindingsClient.ListEffectiveTags(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagBindingsClient.ListEffectiveTags, req, settings.GRPC, c.logger, "ListEffectiveTags") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *tagBindingsGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -589,21 +594,10 @@ func (c *tagBindingsRESTClient) ListTagBindings(ctx context.Context, req *resour } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagBindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -672,21 +666,10 @@ func (c *tagBindingsRESTClient) CreateTagBinding(ctx context.Context, req *resou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -736,21 +719,10 @@ func (c *tagBindingsRESTClient) DeleteTagBinding(ctx context.Context, req *resou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -815,21 +787,10 @@ func (c *tagBindingsRESTClient) ListEffectiveTags(ctx context.Context, req *reso } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveTags") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -892,17 +853,7 @@ func (c *tagBindingsRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/tag_bindings_client_example_go123_test.go b/resourcemanager/apiv3/tag_bindings_client_example_go123_test.go index 310bac441685..1f260e119c5e 100644 --- a/resourcemanager/apiv3/tag_bindings_client_example_go123_test.go +++ b/resourcemanager/apiv3/tag_bindings_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTagBindingsClient_ListEffectiveTags_all() { } for resp, err := range c.ListEffectiveTags(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleTagBindingsClient_ListTagBindings_all() { } for resp, err := range c.ListTagBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/tag_holds_client.go b/resourcemanager/apiv3/tag_holds_client.go index 4f3400682091..fea5fb275546 100755 --- a/resourcemanager/apiv3/tag_holds_client.go +++ b/resourcemanager/apiv3/tag_holds_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -196,6 +195,8 @@ type tagHoldsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTagHoldsClient creates a new tag holds client based on gRPC. @@ -226,6 +227,7 @@ func NewTagHoldsClient(ctx context.Context, opts ...option.ClientOption) (*TagHo connPool: connPool, tagHoldsClient: resourcemanagerpb.NewTagHoldsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -289,6 +291,8 @@ type tagHoldsRESTClient struct { // Points back to the CallOptions field of the containing TagHoldsClient CallOptions **TagHoldsCallOptions + + logger *slog.Logger } // NewTagHoldsRESTClient creates a new tag holds rest client. @@ -310,6 +314,7 @@ func NewTagHoldsRESTClient(ctx context.Context, opts ...option.ClientOption) (*T endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -372,7 +377,7 @@ func (c *tagHoldsGRPCClient) CreateTagHold(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagHoldsClient.CreateTagHold(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagHoldsClient.CreateTagHold, req, settings.GRPC, c.logger, "CreateTagHold") return err }, opts...) if err != nil { @@ -392,7 +397,7 @@ func (c *tagHoldsGRPCClient) DeleteTagHold(ctx context.Context, req *resourceman var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagHoldsClient.DeleteTagHold(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagHoldsClient.DeleteTagHold, req, settings.GRPC, c.logger, "DeleteTagHold") return err }, opts...) if err != nil { @@ -423,7 +428,7 @@ func (c *tagHoldsGRPCClient) ListTagHolds(ctx context.Context, req *resourcemana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagHoldsClient.ListTagHolds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagHoldsClient.ListTagHolds, req, settings.GRPC, c.logger, "ListTagHolds") return err }, opts...) if err != nil { @@ -458,7 +463,7 @@ func (c *tagHoldsGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -510,21 +515,10 @@ func (c *tagHoldsRESTClient) CreateTagHold(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagHold") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -577,21 +571,10 @@ func (c *tagHoldsRESTClient) DeleteTagHold(ctx context.Context, req *resourceman httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagHold") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -657,21 +640,10 @@ func (c *tagHoldsRESTClient) ListTagHolds(ctx context.Context, req *resourcemana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagHolds") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -734,17 +706,7 @@ func (c *tagHoldsRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/tag_holds_client_example_go123_test.go b/resourcemanager/apiv3/tag_holds_client_example_go123_test.go index dc5d2dbdedeb..ab6495e781fe 100644 --- a/resourcemanager/apiv3/tag_holds_client_example_go123_test.go +++ b/resourcemanager/apiv3/tag_holds_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTagHoldsClient_ListTagHolds_all() { } for resp, err := range c.ListTagHolds(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/tag_keys_client.go b/resourcemanager/apiv3/tag_keys_client.go index 77d16ab629a4..f68ff2cf2e81 100755 --- a/resourcemanager/apiv3/tag_keys_client.go +++ b/resourcemanager/apiv3/tag_keys_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -354,6 +353,8 @@ type tagKeysGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTagKeysClient creates a new tag keys client based on gRPC. @@ -380,6 +381,7 @@ func NewTagKeysClient(ctx context.Context, opts ...option.ClientOption) (*TagKey connPool: connPool, tagKeysClient: resourcemanagerpb.NewTagKeysClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -443,6 +445,8 @@ type tagKeysRESTClient struct { // Points back to the CallOptions field of the containing TagKeysClient CallOptions **TagKeysCallOptions + + logger *slog.Logger } // NewTagKeysRESTClient creates a new tag keys rest client. @@ -460,6 +464,7 @@ func NewTagKeysRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ta endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -530,7 +535,7 @@ func (c *tagKeysGRPCClient) ListTagKeys(ctx context.Context, req *resourcemanage } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.ListTagKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.ListTagKeys, req, settings.GRPC, c.logger, "ListTagKeys") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *tagKeysGRPCClient) GetTagKey(ctx context.Context, req *resourcemanagerp var resp *resourcemanagerpb.TagKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.GetTagKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.GetTagKey, req, settings.GRPC, c.logger, "GetTagKey") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *tagKeysGRPCClient) GetNamespacedTagKey(ctx context.Context, req *resour var resp *resourcemanagerpb.TagKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.GetNamespacedTagKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.GetNamespacedTagKey, req, settings.GRPC, c.logger, "GetNamespacedTagKey") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *tagKeysGRPCClient) CreateTagKey(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.CreateTagKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.CreateTagKey, req, settings.GRPC, c.logger, "CreateTagKey") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *tagKeysGRPCClient) UpdateTagKey(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.UpdateTagKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.UpdateTagKey, req, settings.GRPC, c.logger, "UpdateTagKey") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *tagKeysGRPCClient) DeleteTagKey(ctx context.Context, req *resourcemanag var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.DeleteTagKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.DeleteTagKey, req, settings.GRPC, c.logger, "DeleteTagKey") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *tagKeysGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *tagKeysGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -691,7 +696,7 @@ func (c *tagKeysGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.T var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagKeysClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagKeysClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *tagKeysGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -764,21 +769,10 @@ func (c *tagKeysRESTClient) ListTagKeys(ctx context.Context, req *resourcemanage } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagKeys") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -842,17 +836,7 @@ func (c *tagKeysRESTClient) GetTagKey(ctx context.Context, req *resourcemanagerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagKey") if err != nil { return err } @@ -902,17 +886,7 @@ func (c *tagKeysRESTClient) GetNamespacedTagKey(ctx context.Context, req *resour httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespacedTagKey") if err != nil { return err } @@ -971,21 +945,10 @@ func (c *tagKeysRESTClient) CreateTagKey(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagKey") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1052,21 +1015,10 @@ func (c *tagKeysRESTClient) UpdateTagKey(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1123,21 +1075,10 @@ func (c *tagKeysRESTClient) DeleteTagKey(ctx context.Context, req *resourcemanag httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1199,17 +1140,7 @@ func (c *tagKeysRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1269,17 +1200,7 @@ func (c *tagKeysRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1339,17 +1260,7 @@ func (c *tagKeysRESTClient) TestIamPermissions(ctx context.Context, req *iampb.T httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1399,17 +1310,7 @@ func (c *tagKeysRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/tag_keys_client_example_go123_test.go b/resourcemanager/apiv3/tag_keys_client_example_go123_test.go index 9d55a2759e88..0950d0580666 100644 --- a/resourcemanager/apiv3/tag_keys_client_example_go123_test.go +++ b/resourcemanager/apiv3/tag_keys_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTagKeysClient_ListTagKeys_all() { } for resp, err := range c.ListTagKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcemanager/apiv3/tag_values_client.go b/resourcemanager/apiv3/tag_values_client.go index 0e4a1e09f234..913a2863c941 100755 --- a/resourcemanager/apiv3/tag_values_client.go +++ b/resourcemanager/apiv3/tag_values_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" resourcemanagerpb "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -354,6 +353,8 @@ type tagValuesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTagValuesClient creates a new tag values client based on gRPC. @@ -380,6 +381,7 @@ func NewTagValuesClient(ctx context.Context, opts ...option.ClientOption) (*TagV connPool: connPool, tagValuesClient: resourcemanagerpb.NewTagValuesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -443,6 +445,8 @@ type tagValuesRESTClient struct { // Points back to the CallOptions field of the containing TagValuesClient CallOptions **TagValuesCallOptions + + logger *slog.Logger } // NewTagValuesRESTClient creates a new tag values rest client. @@ -460,6 +464,7 @@ func NewTagValuesRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -530,7 +535,7 @@ func (c *tagValuesGRPCClient) ListTagValues(ctx context.Context, req *resourcema } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.ListTagValues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.ListTagValues, req, settings.GRPC, c.logger, "ListTagValues") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *tagValuesGRPCClient) GetTagValue(ctx context.Context, req *resourcemana var resp *resourcemanagerpb.TagValue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.GetTagValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.GetTagValue, req, settings.GRPC, c.logger, "GetTagValue") return err }, opts...) if err != nil { @@ -580,7 +585,7 @@ func (c *tagValuesGRPCClient) GetNamespacedTagValue(ctx context.Context, req *re var resp *resourcemanagerpb.TagValue err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.GetNamespacedTagValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.GetNamespacedTagValue, req, settings.GRPC, c.logger, "GetNamespacedTagValue") return err }, opts...) if err != nil { @@ -595,7 +600,7 @@ func (c *tagValuesGRPCClient) CreateTagValue(ctx context.Context, req *resourcem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.CreateTagValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.CreateTagValue, req, settings.GRPC, c.logger, "CreateTagValue") return err }, opts...) if err != nil { @@ -615,7 +620,7 @@ func (c *tagValuesGRPCClient) UpdateTagValue(ctx context.Context, req *resourcem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.UpdateTagValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.UpdateTagValue, req, settings.GRPC, c.logger, "UpdateTagValue") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *tagValuesGRPCClient) DeleteTagValue(ctx context.Context, req *resourcem var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.DeleteTagValue(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.DeleteTagValue, req, settings.GRPC, c.logger, "DeleteTagValue") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *tagValuesGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *tagValuesGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -691,7 +696,7 @@ func (c *tagValuesGRPCClient) TestIamPermissions(ctx context.Context, req *iampb var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tagValuesClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tagValuesClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -709,7 +714,7 @@ func (c *tagValuesGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -764,21 +769,10 @@ func (c *tagValuesRESTClient) ListTagValues(ctx context.Context, req *resourcema } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTagValues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -842,17 +836,7 @@ func (c *tagValuesRESTClient) GetTagValue(ctx context.Context, req *resourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTagValue") if err != nil { return err } @@ -902,17 +886,7 @@ func (c *tagValuesRESTClient) GetNamespacedTagValue(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespacedTagValue") if err != nil { return err } @@ -971,21 +945,10 @@ func (c *tagValuesRESTClient) CreateTagValue(ctx context.Context, req *resourcem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTagValue") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1052,21 +1015,10 @@ func (c *tagValuesRESTClient) UpdateTagValue(ctx context.Context, req *resourcem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTagValue") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1123,21 +1075,10 @@ func (c *tagValuesRESTClient) DeleteTagValue(ctx context.Context, req *resourcem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTagValue") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1199,17 +1140,7 @@ func (c *tagValuesRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1269,17 +1200,7 @@ func (c *tagValuesRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1339,17 +1260,7 @@ func (c *tagValuesRESTClient) TestIamPermissions(ctx context.Context, req *iampb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1399,17 +1310,7 @@ func (c *tagValuesRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/resourcemanager/apiv3/tag_values_client_example_go123_test.go b/resourcemanager/apiv3/tag_values_client_example_go123_test.go index 3c6239326e8f..e7bcadfbe234 100644 --- a/resourcemanager/apiv3/tag_values_client_example_go123_test.go +++ b/resourcemanager/apiv3/tag_values_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTagValuesClient_ListTagValues_all() { } for resp, err := range c.ListTagValues(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcesettings/apiv1/helpers.go b/resourcesettings/apiv1/helpers.go index 378d1834477b..144c816ee5bd 100755 --- a/resourcesettings/apiv1/helpers.go +++ b/resourcesettings/apiv1/helpers.go @@ -18,10 +18,20 @@ package resourcesettings import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "resourcesettings.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/resourcesettings/apiv1/resource_settings_client.go b/resourcesettings/apiv1/resource_settings_client.go index 80567ca602fc..eb0c2b0c9eb3 100755 --- a/resourcesettings/apiv1/resource_settings_client.go +++ b/resourcesettings/apiv1/resource_settings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( resourcesettingspb "cloud.google.com/go/resourcesettings/apiv1/resourcesettingspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -258,6 +257,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new resource settings service client based on gRPC. @@ -300,6 +301,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: resourcesettingspb.NewResourceSettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -346,6 +348,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new resource settings service rest client. @@ -379,6 +383,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -442,7 +447,7 @@ func (c *gRPCClient) ListSettings(ctx context.Context, req *resourcesettingspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSettings, req, settings.GRPC, c.logger, "ListSettings") return err }, opts...) if err != nil { @@ -477,7 +482,7 @@ func (c *gRPCClient) GetSetting(ctx context.Context, req *resourcesettingspb.Get var resp *resourcesettingspb.Setting err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSetting(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSetting, req, settings.GRPC, c.logger, "GetSetting") return err }, opts...) if err != nil { @@ -495,7 +500,7 @@ func (c *gRPCClient) UpdateSetting(ctx context.Context, req *resourcesettingspb. var resp *resourcesettingspb.Setting err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSetting(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSetting, req, settings.GRPC, c.logger, "UpdateSetting") return err }, opts...) if err != nil { @@ -552,21 +557,10 @@ func (c *restClient) ListSettings(ctx context.Context, req *resourcesettingspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSettings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -635,17 +629,7 @@ func (c *restClient) GetSetting(ctx context.Context, req *resourcesettingspb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSetting") if err != nil { return err } @@ -717,17 +701,7 @@ func (c *restClient) UpdateSetting(ctx context.Context, req *resourcesettingspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSetting") if err != nil { return err } diff --git a/resourcesettings/apiv1/resource_settings_client_example_go123_test.go b/resourcesettings/apiv1/resource_settings_client_example_go123_test.go index 2394fe0cf0ad..041196dabb3c 100644 --- a/resourcesettings/apiv1/resource_settings_client_example_go123_test.go +++ b/resourcesettings/apiv1/resource_settings_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListSettings_all() { } for resp, err := range c.ListSettings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/resourcesettings/apiv1/resourcesettingspb/resource_settings.pb.go b/resourcesettings/apiv1/resourcesettingspb/resource_settings.pb.go index 2ab714d819e4..507998e01463 100755 --- a/resourcesettings/apiv1/resourcesettingspb/resource_settings.pb.go +++ b/resourcesettings/apiv1/resourcesettingspb/resource_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/resourcesettings/v1/resource_settings.proto @@ -218,11 +218,9 @@ type Setting struct { func (x *Setting) Reset() { *x = Setting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Setting) String() string { @@ -233,7 +231,7 @@ func (*Setting) ProtoMessage() {} func (x *Setting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +306,9 @@ type SettingMetadata struct { func (x *SettingMetadata) Reset() { *x = SettingMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SettingMetadata) String() string { @@ -323,7 +319,7 @@ func (*SettingMetadata) ProtoMessage() {} func (x *SettingMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +388,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -407,7 +401,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,11 +507,9 @@ type ListSettingsRequest struct { func (x *ListSettingsRequest) Reset() { *x = ListSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSettingsRequest) String() string { @@ -528,7 +520,7 @@ func (*ListSettingsRequest) ProtoMessage() {} func (x *ListSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,11 +577,9 @@ type ListSettingsResponse struct { func (x *ListSettingsResponse) Reset() { *x = ListSettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSettingsResponse) String() string { @@ -600,7 +590,7 @@ func (*ListSettingsResponse) ProtoMessage() {} func (x *ListSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +635,9 @@ type GetSettingRequest struct { func (x *GetSettingRequest) Reset() { *x = GetSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingRequest) String() string { @@ -660,7 +648,7 @@ func (*GetSettingRequest) ProtoMessage() {} func (x *GetSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -702,11 +690,9 @@ type UpdateSettingRequest struct { func (x *UpdateSettingRequest) Reset() { *x = UpdateSettingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingRequest) String() string { @@ -717,7 +703,7 @@ func (*UpdateSettingRequest) ProtoMessage() {} func (x *UpdateSettingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +739,9 @@ type Value_StringSet struct { func (x *Value_StringSet) Reset() { *x = Value_StringSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value_StringSet) String() string { @@ -768,7 +752,7 @@ func (*Value_StringSet) ProtoMessage() {} func (x *Value_StringSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,11 +788,9 @@ type Value_EnumValue struct { func (x *Value_EnumValue) Reset() { *x = Value_EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value_EnumValue) String() string { @@ -819,7 +801,7 @@ func (*Value_EnumValue) ProtoMessage() {} func (x *Value_EnumValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1110,116 +1092,6 @@ func file_google_cloud_resourcesettings_v1_resource_settings_proto_init() { if File_google_cloud_resourcesettings_v1_resource_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Setting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SettingMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListSettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Value_StringSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Value_EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_resourcesettings_v1_resource_settings_proto_msgTypes[2].OneofWrappers = []any{ (*Value_BooleanValue)(nil), (*Value_StringValue)(nil), diff --git a/retail/apiv2/analytics_client.go b/retail/apiv2/analytics_client.go index f8f387e8727d..a8d692ed0328 100755 --- a/retail/apiv2/analytics_client.go +++ b/retail/apiv2/analytics_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -227,6 +226,8 @@ type analyticsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnalyticsClient creates a new analytics service client based on gRPC. @@ -254,6 +255,7 @@ func NewAnalyticsClient(ctx context.Context, opts ...option.ClientOption) (*Anal connPool: connPool, analyticsClient: retailpb.NewAnalyticsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -317,6 +319,8 @@ type analyticsRESTClient struct { // Points back to the CallOptions field of the containing AnalyticsClient CallOptions **AnalyticsCallOptions + + logger *slog.Logger } // NewAnalyticsRESTClient creates a new analytics service rest client. @@ -335,6 +339,7 @@ func NewAnalyticsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *analyticsGRPCClient) ExportAnalyticsMetrics(ctx context.Context, req *r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsClient.ExportAnalyticsMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsClient.ExportAnalyticsMetrics, req, settings.GRPC, c.logger, "ExportAnalyticsMetrics") return err }, opts...) if err != nil { @@ -417,7 +422,7 @@ func (c *analyticsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *analyticsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -513,21 +518,10 @@ func (c *analyticsRESTClient) ExportAnalyticsMetrics(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAnalyticsMetrics") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -578,17 +572,7 @@ func (c *analyticsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -653,21 +637,10 @@ func (c *analyticsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/analytics_client_example_go123_test.go b/retail/apiv2/analytics_client_example_go123_test.go index 45c88b921c79..37785621cb28 100644 --- a/retail/apiv2/analytics_client_example_go123_test.go +++ b/retail/apiv2/analytics_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAnalyticsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/catalog_client.go b/retail/apiv2/catalog_client.go index 589b01e4a2b9..f9e9fe61bbe5 100755 --- a/retail/apiv2/catalog_client.go +++ b/retail/apiv2/catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -585,6 +584,8 @@ type catalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCatalogClient creates a new catalog service client based on gRPC. @@ -611,6 +612,7 @@ func NewCatalogClient(ctx context.Context, opts ...option.ClientOption) (*Catalo connPool: connPool, catalogClient: retailpb.NewCatalogServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -658,6 +660,8 @@ type catalogRESTClient struct { // Points back to the CallOptions field of the containing CatalogClient CallOptions **CatalogCallOptions + + logger *slog.Logger } // NewCatalogRESTClient creates a new catalog service rest client. @@ -675,6 +679,7 @@ func NewCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ca endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -738,7 +743,7 @@ func (c *catalogGRPCClient) ListCatalogs(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListCatalogs, req, settings.GRPC, c.logger, "ListCatalogs") return err }, opts...) if err != nil { @@ -773,7 +778,7 @@ func (c *catalogGRPCClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd var resp *retailpb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCatalog, req, settings.GRPC, c.logger, "UpdateCatalog") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *catalogGRPCClient) SetDefaultBranch(ctx context.Context, req *retailpb. opts = append((*c.CallOptions).SetDefaultBranch[0:len((*c.CallOptions).SetDefaultBranch):len((*c.CallOptions).SetDefaultBranch)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.catalogClient.SetDefaultBranch(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.catalogClient.SetDefaultBranch, req, settings.GRPC, c.logger, "SetDefaultBranch") return err }, opts...) return err @@ -805,7 +810,7 @@ func (c *catalogGRPCClient) GetDefaultBranch(ctx context.Context, req *retailpb. var resp *retailpb.GetDefaultBranchResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetDefaultBranch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetDefaultBranch, req, settings.GRPC, c.logger, "GetDefaultBranch") return err }, opts...) if err != nil { @@ -823,7 +828,7 @@ func (c *catalogGRPCClient) GetCompletionConfig(ctx context.Context, req *retail var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetCompletionConfig, req, settings.GRPC, c.logger, "GetCompletionConfig") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *catalogGRPCClient) UpdateCompletionConfig(ctx context.Context, req *ret var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCompletionConfig, req, settings.GRPC, c.logger, "UpdateCompletionConfig") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *catalogGRPCClient) GetAttributesConfig(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetAttributesConfig, req, settings.GRPC, c.logger, "GetAttributesConfig") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *catalogGRPCClient) UpdateAttributesConfig(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateAttributesConfig, req, settings.GRPC, c.logger, "UpdateAttributesConfig") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *catalogGRPCClient) AddCatalogAttribute(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.AddCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.AddCatalogAttribute, req, settings.GRPC, c.logger, "AddCatalogAttribute") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *catalogGRPCClient) RemoveCatalogAttribute(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.RemoveCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.RemoveCatalogAttribute, req, settings.GRPC, c.logger, "RemoveCatalogAttribute") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *catalogGRPCClient) ReplaceCatalogAttribute(ctx context.Context, req *re var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ReplaceCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ReplaceCatalogAttribute, req, settings.GRPC, c.logger, "ReplaceCatalogAttribute") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *catalogGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -978,7 +983,7 @@ func (c *catalogGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1050,21 +1055,10 @@ func (c *catalogRESTClient) ListCatalogs(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1141,17 +1135,7 @@ func (c *catalogRESTClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCatalog") if err != nil { return err } @@ -1238,15 +1222,8 @@ func (c *catalogRESTClient) SetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultBranch") + return err }, opts...) } @@ -1285,17 +1262,7 @@ func (c *catalogRESTClient) GetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDefaultBranch") if err != nil { return err } @@ -1345,17 +1312,7 @@ func (c *catalogRESTClient) GetCompletionConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompletionConfig") if err != nil { return err } @@ -1419,17 +1376,7 @@ func (c *catalogRESTClient) UpdateCompletionConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCompletionConfig") if err != nil { return err } @@ -1479,17 +1426,7 @@ func (c *catalogRESTClient) GetAttributesConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttributesConfig") if err != nil { return err } @@ -1560,17 +1497,7 @@ func (c *catalogRESTClient) UpdateAttributesConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttributesConfig") if err != nil { return err } @@ -1631,17 +1558,7 @@ func (c *catalogRESTClient) AddCatalogAttribute(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddCatalogAttribute") if err != nil { return err } @@ -1702,17 +1619,7 @@ func (c *catalogRESTClient) RemoveCatalogAttribute(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveCatalogAttribute") if err != nil { return err } @@ -1775,17 +1682,7 @@ func (c *catalogRESTClient) ReplaceCatalogAttribute(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceCatalogAttribute") if err != nil { return err } @@ -1835,17 +1732,7 @@ func (c *catalogRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1910,21 +1797,10 @@ func (c *catalogRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/catalog_client_example_go123_test.go b/retail/apiv2/catalog_client_example_go123_test.go index 225501f0f667..3260fa310bad 100644 --- a/retail/apiv2/catalog_client_example_go123_test.go +++ b/retail/apiv2/catalog_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCatalogClient_ListCatalogs_all() { } for resp, err := range c.ListCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCatalogClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/completion_client.go b/retail/apiv2/completion_client.go index c781e829d335..86dd2338ba0c 100755 --- a/retail/apiv2/completion_client.go +++ b/retail/apiv2/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -269,6 +268,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -298,6 +299,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: retailpb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -361,6 +363,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -381,6 +385,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -443,7 +448,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *retailpb. var resp *retailpb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *completionGRPCClient) ImportCompletionData(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionData, req, settings.GRPC, c.logger, "ImportCompletionData") return err }, opts...) if err != nil { @@ -481,7 +486,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -510,7 +515,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -596,17 +601,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -669,21 +664,10 @@ func (c *completionRESTClient) ImportCompletionData(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -734,17 +718,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -809,21 +783,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/completion_client_example_go123_test.go b/retail/apiv2/completion_client_example_go123_test.go index db25c401c95a..412fb3d32aff 100644 --- a/retail/apiv2/completion_client_example_go123_test.go +++ b/retail/apiv2/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/control_client.go b/retail/apiv2/control_client.go index 518a7b253804..c6c900982a85 100755 --- a/retail/apiv2/control_client.go +++ b/retail/apiv2/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -229,6 +228,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -255,6 +256,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: retailpb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -302,6 +304,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -319,6 +323,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -371,7 +376,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *retailpb.Cre var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -403,7 +408,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *retailpb.Upd var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -421,7 +426,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *retailpb.GetCon var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -584,17 +589,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -644,15 +639,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -708,17 +696,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -768,17 +746,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *retailpb.GetCon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -844,21 +812,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -921,17 +878,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -996,21 +943,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/control_client_example_go123_test.go b/retail/apiv2/control_client_example_go123_test.go index 9ad00fb41661..6414104b79ea 100644 --- a/retail/apiv2/control_client_example_go123_test.go +++ b/retail/apiv2/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/generative_question_client.go b/retail/apiv2/generative_question_client.go index d50238a35df7..bac48bfe9007 100755 --- a/retail/apiv2/generative_question_client.go +++ b/retail/apiv2/generative_question_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -219,6 +218,8 @@ type generativeQuestionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenerativeQuestionClient creates a new generative question service client based on gRPC. @@ -245,6 +246,7 @@ func NewGenerativeQuestionClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, generativeQuestionClient: retailpb.NewGenerativeQuestionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -292,6 +294,8 @@ type generativeQuestionRESTClient struct { // Points back to the CallOptions field of the containing GenerativeQuestionClient CallOptions **GenerativeQuestionCallOptions + + logger *slog.Logger } // NewGenerativeQuestionRESTClient creates a new generative question service rest client. @@ -309,6 +313,7 @@ func NewGenerativeQuestionRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -361,7 +366,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionsFeatureConfig(ct var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -379,7 +384,7 @@ func (c *generativeQuestionGRPCClient) GetGenerativeQuestionsFeatureConfig(ctx c var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "GetGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -397,7 +402,7 @@ func (c *generativeQuestionGRPCClient) ListGenerativeQuestionConfigs(ctx context var resp *retailpb.ListGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.ListGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.ListGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "ListGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionConfig(ctx contex var resp *retailpb.GenerativeQuestionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionConfig") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *generativeQuestionGRPCClient) BatchUpdateGenerativeQuestionConfigs(ctx var resp *retailpb.BatchUpdateGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "BatchUpdateGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *generativeQuestionGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *generativeQuestionGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -554,17 +559,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionsFeatureConfig(ct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -615,17 +610,7 @@ func (c *generativeQuestionRESTClient) GetGenerativeQuestionsFeatureConfig(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -675,17 +660,7 @@ func (c *generativeQuestionRESTClient) ListGenerativeQuestionConfigs(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerativeQuestionConfigs") if err != nil { return err } @@ -749,17 +724,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionConfig(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionConfig") if err != nil { return err } @@ -815,17 +780,7 @@ func (c *generativeQuestionRESTClient) BatchUpdateGenerativeQuestionConfigs(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateGenerativeQuestionConfigs") if err != nil { return err } @@ -875,17 +830,7 @@ func (c *generativeQuestionRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -950,21 +895,10 @@ func (c *generativeQuestionRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/generative_question_client_example_go123_test.go b/retail/apiv2/generative_question_client_example_go123_test.go index 40fca1c0aec1..740f32e0aeaf 100644 --- a/retail/apiv2/generative_question_client_example_go123_test.go +++ b/retail/apiv2/generative_question_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGenerativeQuestionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/helpers.go b/retail/apiv2/helpers.go index f109b03b6c8e..4b0485f74073 100755 --- a/retail/apiv2/helpers.go +++ b/retail/apiv2/helpers.go @@ -18,10 +18,20 @@ package retail import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "retail.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/retail/apiv2/model_client.go b/retail/apiv2/model_client.go index 8210a717c34b..791b8efb7048 100755 --- a/retail/apiv2/model_client.go +++ b/retail/apiv2/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -471,6 +470,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -511,6 +512,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: retailpb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -574,6 +576,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -605,6 +609,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -667,7 +672,7 @@ func (c *modelGRPCClient) CreateModel(ctx context.Context, req *retailpb.CreateM var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *retailpb.GetModelRe var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *modelGRPCClient) PauseModel(ctx context.Context, req *retailpb.PauseMod var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.PauseModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.PauseModel, req, settings.GRPC, c.logger, "PauseModel") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *modelGRPCClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ResumeModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ResumeModel, req, settings.GRPC, c.logger, "ResumeModel") return err }, opts...) if err != nil { @@ -740,7 +745,7 @@ func (c *modelGRPCClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM opts = append((*c.CallOptions).DeleteModel[0:len((*c.CallOptions).DeleteModel):len((*c.CallOptions).DeleteModel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.modelClient.DeleteModel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.modelClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) return err @@ -766,7 +771,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *retailpb.ListMode } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *modelGRPCClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *modelGRPCClient) TuneModel(ctx context.Context, req *retailpb.TuneModel var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.TuneModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.TuneModel, req, settings.GRPC, c.logger, "TuneModel") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -936,21 +941,10 @@ func (c *modelRESTClient) CreateModel(ctx context.Context, req *retailpb.CreateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1001,17 +995,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *retailpb.GetModelRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -1067,17 +1051,7 @@ func (c *modelRESTClient) PauseModel(ctx context.Context, req *retailpb.PauseMod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseModel") if err != nil { return err } @@ -1133,17 +1107,7 @@ func (c *modelRESTClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeModel") if err != nil { return err } @@ -1190,15 +1154,8 @@ func (c *modelRESTClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") + return err }, opts...) } @@ -1247,21 +1204,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *retailpb.ListMode } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1341,17 +1287,7 @@ func (c *modelRESTClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModel") if err != nil { return err } @@ -1406,21 +1342,10 @@ func (c *modelRESTClient) TuneModel(ctx context.Context, req *retailpb.TuneModel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1471,17 +1396,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1546,21 +1461,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/model_client_example_go123_test.go b/retail/apiv2/model_client_example_go123_test.go index 7ec4299c721c..e51668a91931 100644 --- a/retail/apiv2/model_client_example_go123_test.go +++ b/retail/apiv2/model_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/prediction_client.go b/retail/apiv2/prediction_client.go index 0979d7fb5fad..d0396ff16183 100755 --- a/retail/apiv2/prediction_client.go +++ b/retail/apiv2/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -230,6 +231,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: retailpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -277,6 +279,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -294,6 +298,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -346,7 +351,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *retailpb.Predic var resp *retailpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -364,7 +369,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -393,7 +398,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -458,17 +463,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *retailpb.Predic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -518,17 +513,7 @@ func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -593,21 +578,10 @@ func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/prediction_client_example_go123_test.go b/retail/apiv2/prediction_client_example_go123_test.go index 70c44c76b715..036635632b8e 100644 --- a/retail/apiv2/prediction_client_example_go123_test.go +++ b/retail/apiv2/prediction_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/product_client.go b/retail/apiv2/product_client.go index 40ecdaddde64..12795f6d6b2c 100755 --- a/retail/apiv2/product_client.go +++ b/retail/apiv2/product_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -798,6 +797,8 @@ type productGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProductClient creates a new product service client based on gRPC. @@ -825,6 +826,7 @@ func NewProductClient(ctx context.Context, opts ...option.ClientOption) (*Produc connPool: connPool, productClient: retailpb.NewProductServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -888,6 +890,8 @@ type productRESTClient struct { // Points back to the CallOptions field of the containing ProductClient CallOptions **ProductCallOptions + + logger *slog.Logger } // NewProductRESTClient creates a new product service rest client. @@ -906,6 +910,7 @@ func NewProductRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -968,7 +973,7 @@ func (c *productGRPCClient) CreateProduct(ctx context.Context, req *retailpb.Cre var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.CreateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.CreateProduct, req, settings.GRPC, c.logger, "CreateProduct") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *productGRPCClient) GetProduct(ctx context.Context, req *retailpb.GetPro var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.GetProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.GetProduct, req, settings.GRPC, c.logger, "GetProduct") return err }, opts...) if err != nil { @@ -1015,7 +1020,7 @@ func (c *productGRPCClient) ListProducts(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -1050,7 +1055,7 @@ func (c *productGRPCClient) UpdateProduct(ctx context.Context, req *retailpb.Upd var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.UpdateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.UpdateProduct, req, settings.GRPC, c.logger, "UpdateProduct") return err }, opts...) if err != nil { @@ -1067,7 +1072,7 @@ func (c *productGRPCClient) DeleteProduct(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteProduct[0:len((*c.CallOptions).DeleteProduct):len((*c.CallOptions).DeleteProduct)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productClient.DeleteProduct(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productClient.DeleteProduct, req, settings.GRPC, c.logger, "DeleteProduct") return err }, opts...) return err @@ -1082,7 +1087,7 @@ func (c *productGRPCClient) PurgeProducts(ctx context.Context, req *retailpb.Pur var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.PurgeProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.PurgeProducts, req, settings.GRPC, c.logger, "PurgeProducts") return err }, opts...) if err != nil { @@ -1102,7 +1107,7 @@ func (c *productGRPCClient) ImportProducts(ctx context.Context, req *retailpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ImportProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ImportProducts, req, settings.GRPC, c.logger, "ImportProducts") return err }, opts...) if err != nil { @@ -1122,7 +1127,7 @@ func (c *productGRPCClient) SetInventory(ctx context.Context, req *retailpb.SetI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.SetInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.SetInventory, req, settings.GRPC, c.logger, "SetInventory") return err }, opts...) if err != nil { @@ -1142,7 +1147,7 @@ func (c *productGRPCClient) AddFulfillmentPlaces(ctx context.Context, req *retai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddFulfillmentPlaces, req, settings.GRPC, c.logger, "AddFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1162,7 +1167,7 @@ func (c *productGRPCClient) RemoveFulfillmentPlaces(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveFulfillmentPlaces, req, settings.GRPC, c.logger, "RemoveFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1182,7 +1187,7 @@ func (c *productGRPCClient) AddLocalInventories(ctx context.Context, req *retail var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddLocalInventories, req, settings.GRPC, c.logger, "AddLocalInventories") return err }, opts...) if err != nil { @@ -1202,7 +1207,7 @@ func (c *productGRPCClient) RemoveLocalInventories(ctx context.Context, req *ret var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveLocalInventories, req, settings.GRPC, c.logger, "RemoveLocalInventories") return err }, opts...) if err != nil { @@ -1222,7 +1227,7 @@ func (c *productGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *productGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1318,17 +1323,7 @@ func (c *productRESTClient) CreateProduct(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProduct") if err != nil { return err } @@ -1378,17 +1373,7 @@ func (c *productRESTClient) GetProduct(ctx context.Context, req *retailpb.GetPro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProduct") if err != nil { return err } @@ -1460,21 +1445,10 @@ func (c *productRESTClient) ListProducts(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1554,17 +1528,7 @@ func (c *productRESTClient) UpdateProduct(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProduct") if err != nil { return err } @@ -1611,15 +1575,8 @@ func (c *productRESTClient) DeleteProduct(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProduct") + return err }, opts...) } @@ -1677,21 +1634,10 @@ func (c *productRESTClient) PurgeProducts(ctx context.Context, req *retailpb.Pur httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1753,21 +1699,10 @@ func (c *productRESTClient) ImportProducts(ctx context.Context, req *retailpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1871,21 +1806,10 @@ func (c *productRESTClient) SetInventory(ctx context.Context, req *retailpb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInventory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1970,21 +1894,10 @@ func (c *productRESTClient) AddFulfillmentPlaces(ctx context.Context, req *retai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddFulfillmentPlaces") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2069,21 +1982,10 @@ func (c *productRESTClient) RemoveFulfillmentPlaces(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveFulfillmentPlaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2166,21 +2068,10 @@ func (c *productRESTClient) AddLocalInventories(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddLocalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2261,21 +2152,10 @@ func (c *productRESTClient) RemoveLocalInventories(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveLocalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2326,17 +2206,7 @@ func (c *productRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2401,21 +2271,10 @@ func (c *productRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/product_client_example_go123_test.go b/retail/apiv2/product_client_example_go123_test.go index 816d15ffb3a5..9687ecd78f92 100644 --- a/retail/apiv2/product_client_example_go123_test.go +++ b/retail/apiv2/product_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleProductClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleProductClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/retailpb/analytics_service.pb.go b/retail/apiv2/retailpb/analytics_service.pb.go index d26053d4ea48..41e882396dc5 100755 --- a/retail/apiv2/retailpb/analytics_service.pb.go +++ b/retail/apiv2/retailpb/analytics_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/analytics_service.proto diff --git a/retail/apiv2/retailpb/catalog.pb.go b/retail/apiv2/retailpb/catalog.pb.go index 6d4c880c4973..9eccdd6344d1 100755 --- a/retail/apiv2/retailpb/catalog.pb.go +++ b/retail/apiv2/retailpb/catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/catalog.proto @@ -418,11 +418,9 @@ type ProductLevelConfig struct { func (x *ProductLevelConfig) Reset() { *x = ProductLevelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductLevelConfig) String() string { @@ -433,7 +431,7 @@ func (*ProductLevelConfig) ProtoMessage() {} func (x *ProductLevelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +554,9 @@ type CatalogAttribute struct { func (x *CatalogAttribute) Reset() { *x = CatalogAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute) String() string { @@ -571,7 +567,7 @@ func (*CatalogAttribute) ProtoMessage() {} func (x *CatalogAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +672,9 @@ type AttributesConfig struct { func (x *AttributesConfig) Reset() { *x = AttributesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributesConfig) String() string { @@ -691,7 +685,7 @@ func (*AttributesConfig) ProtoMessage() {} func (x *AttributesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +788,9 @@ type CompletionConfig struct { func (x *CompletionConfig) Reset() { *x = CompletionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionConfig) String() string { @@ -809,7 +801,7 @@ func (*CompletionConfig) ProtoMessage() {} func (x *CompletionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +912,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -935,7 +925,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1014,11 +1004,9 @@ type CatalogAttribute_FacetConfig struct { func (x *CatalogAttribute_FacetConfig) Reset() { *x = CatalogAttribute_FacetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig) String() string { @@ -1029,7 +1017,7 @@ func (*CatalogAttribute_FacetConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1097,9 @@ type CatalogAttribute_FacetConfig_IgnoredFacetValues struct { func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) Reset() { *x = CatalogAttribute_FacetConfig_IgnoredFacetValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) String() string { @@ -1124,7 +1110,7 @@ func (*CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1181,11 +1167,9 @@ type CatalogAttribute_FacetConfig_MergedFacetValue struct { func (x *CatalogAttribute_FacetConfig_MergedFacetValue) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacetValue) String() string { @@ -1196,7 +1180,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacetValue) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1246,11 +1230,9 @@ type CatalogAttribute_FacetConfig_MergedFacet struct { func (x *CatalogAttribute_FacetConfig_MergedFacet) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacet) String() string { @@ -1261,7 +1243,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacet) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1289,9 @@ type CatalogAttribute_FacetConfig_RerankConfig struct { func (x *CatalogAttribute_FacetConfig_RerankConfig) Reset() { *x = CatalogAttribute_FacetConfig_RerankConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_RerankConfig) String() string { @@ -1322,7 +1302,7 @@ func (*CatalogAttribute_FacetConfig_RerankConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_RerankConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,128 +1697,6 @@ func file_google_cloud_retail_v2_catalog_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductLevelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttributesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_IgnoredFacetValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_RerankConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/catalog_service.pb.go b/retail/apiv2/retailpb/catalog_service.pb.go index 1db61008c9d6..d9d633478b51 100755 --- a/retail/apiv2/retailpb/catalog_service.pb.go +++ b/retail/apiv2/retailpb/catalog_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/catalog_service.proto @@ -79,11 +79,9 @@ type ListCatalogsRequest struct { func (x *ListCatalogsRequest) Reset() { *x = ListCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsRequest) String() string { @@ -94,7 +92,7 @@ func (*ListCatalogsRequest) ProtoMessage() {} func (x *ListCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,11 +147,9 @@ type ListCatalogsResponse struct { func (x *ListCatalogsResponse) Reset() { *x = ListCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsResponse) String() string { @@ -164,7 +160,7 @@ func (*ListCatalogsResponse) ProtoMessage() {} func (x *ListCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +216,9 @@ type UpdateCatalogRequest struct { func (x *UpdateCatalogRequest) Reset() { *x = UpdateCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCatalogRequest) String() string { @@ -235,7 +229,7 @@ func (*UpdateCatalogRequest) ProtoMessage() {} func (x *UpdateCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type SetDefaultBranchRequest struct { func (x *SetDefaultBranchRequest) Reset() { *x = SetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultBranchRequest) String() string { @@ -312,7 +304,7 @@ func (*SetDefaultBranchRequest) ProtoMessage() {} func (x *SetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type GetDefaultBranchRequest struct { func (x *GetDefaultBranchRequest) Reset() { *x = GetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchRequest) String() string { @@ -383,7 +373,7 @@ func (*GetDefaultBranchRequest) ProtoMessage() {} func (x *GetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +414,9 @@ type GetDefaultBranchResponse struct { func (x *GetDefaultBranchResponse) Reset() { *x = GetDefaultBranchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchResponse) String() string { @@ -439,7 +427,7 @@ func (*GetDefaultBranchResponse) ProtoMessage() {} func (x *GetDefaultBranchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +478,9 @@ type GetCompletionConfigRequest struct { func (x *GetCompletionConfigRequest) Reset() { *x = GetCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompletionConfigRequest) String() string { @@ -505,7 +491,7 @@ func (*GetCompletionConfigRequest) ProtoMessage() {} func (x *GetCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +546,9 @@ type UpdateCompletionConfigRequest struct { func (x *UpdateCompletionConfigRequest) Reset() { *x = UpdateCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCompletionConfigRequest) String() string { @@ -575,7 +559,7 @@ func (*UpdateCompletionConfigRequest) ProtoMessage() {} func (x *UpdateCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +603,9 @@ type GetAttributesConfigRequest struct { func (x *GetAttributesConfigRequest) Reset() { *x = GetAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttributesConfigRequest) String() string { @@ -634,7 +616,7 @@ func (*GetAttributesConfigRequest) ProtoMessage() {} func (x *GetAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +661,9 @@ type UpdateAttributesConfigRequest struct { func (x *UpdateAttributesConfigRequest) Reset() { *x = UpdateAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttributesConfigRequest) String() string { @@ -694,7 +674,7 @@ func (*UpdateAttributesConfigRequest) ProtoMessage() {} func (x *UpdateAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +721,9 @@ type AddCatalogAttributeRequest struct { func (x *AddCatalogAttributeRequest) Reset() { *x = AddCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddCatalogAttributeRequest) String() string { @@ -756,7 +734,7 @@ func (*AddCatalogAttributeRequest) ProtoMessage() {} func (x *AddCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +781,9 @@ type RemoveCatalogAttributeRequest struct { func (x *RemoveCatalogAttributeRequest) Reset() { *x = RemoveCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveCatalogAttributeRequest) String() string { @@ -818,7 +794,7 @@ func (*RemoveCatalogAttributeRequest) ProtoMessage() {} func (x *RemoveCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +849,9 @@ type ReplaceCatalogAttributeRequest struct { func (x *ReplaceCatalogAttributeRequest) Reset() { *x = ReplaceCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceCatalogAttributeRequest) String() string { @@ -888,7 +862,7 @@ func (*ReplaceCatalogAttributeRequest) ProtoMessage() {} func (x *ReplaceCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_catalog_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,164 +1302,6 @@ func file_google_cloud_retail_v2_catalog_service_proto_init() { return } file_google_cloud_retail_v2_catalog_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RemoveCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_catalog_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/common.pb.go b/retail/apiv2/retailpb/common.pb.go index 4d5ec508b1b4..a1857560ec3c 100755 --- a/retail/apiv2/retailpb/common.pb.go +++ b/retail/apiv2/retailpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/common.proto @@ -285,11 +285,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -300,7 +298,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +367,9 @@ type Rule struct { func (x *Rule) Reset() { *x = Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule) String() string { @@ -384,7 +380,7 @@ func (*Rule) ProtoMessage() {} func (x *Rule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -596,11 +592,9 @@ type Audience struct { func (x *Audience) Reset() { *x = Audience{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Audience) String() string { @@ -611,7 +605,7 @@ func (*Audience) ProtoMessage() {} func (x *Audience) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +671,9 @@ type ColorInfo struct { func (x *ColorInfo) Reset() { *x = ColorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColorInfo) String() string { @@ -692,7 +684,7 @@ func (*ColorInfo) ProtoMessage() {} func (x *ColorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +777,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -800,7 +790,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +876,9 @@ type FulfillmentInfo struct { func (x *FulfillmentInfo) Reset() { *x = FulfillmentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInfo) String() string { @@ -901,7 +889,7 @@ func (*FulfillmentInfo) ProtoMessage() {} func (x *FulfillmentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +950,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -977,7 +963,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1031,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -1060,7 +1044,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1236,11 +1220,9 @@ type PriceInfo struct { func (x *PriceInfo) Reset() { *x = PriceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo) String() string { @@ -1251,7 +1233,7 @@ func (*PriceInfo) ProtoMessage() {} func (x *PriceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,11 +1326,9 @@ type Rating struct { func (x *Rating) Reset() { *x = Rating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rating) String() string { @@ -1359,7 +1339,7 @@ func (*Rating) ProtoMessage() {} func (x *Rating) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1457,11 +1437,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -1472,7 +1450,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1575,11 +1553,9 @@ type LocalInventory struct { func (x *LocalInventory) Reset() { *x = LocalInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalInventory) String() string { @@ -1590,7 +1566,7 @@ func (*LocalInventory) ProtoMessage() {} func (x *LocalInventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,11 +1628,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -1667,7 +1641,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1711,11 +1685,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -1726,7 +1698,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1799,11 +1771,9 @@ type Rule_BoostAction struct { func (x *Rule_BoostAction) Reset() { *x = Rule_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_BoostAction) String() string { @@ -1814,7 +1784,7 @@ func (*Rule_BoostAction) ProtoMessage() {} func (x *Rule_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1885,11 +1855,9 @@ type Rule_FilterAction struct { func (x *Rule_FilterAction) Reset() { *x = Rule_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_FilterAction) String() string { @@ -1900,7 +1868,7 @@ func (*Rule_FilterAction) ProtoMessage() {} func (x *Rule_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,11 +1908,9 @@ type Rule_RedirectAction struct { func (x *Rule_RedirectAction) Reset() { *x = Rule_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RedirectAction) String() string { @@ -1955,7 +1921,7 @@ func (*Rule_RedirectAction) ProtoMessage() {} func (x *Rule_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1995,11 +1961,9 @@ type Rule_TwowaySynonymsAction struct { func (x *Rule_TwowaySynonymsAction) Reset() { *x = Rule_TwowaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_TwowaySynonymsAction) String() string { @@ -2010,7 +1974,7 @@ func (*Rule_TwowaySynonymsAction) ProtoMessage() {} func (x *Rule_TwowaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2057,11 +2021,9 @@ type Rule_OnewaySynonymsAction struct { func (x *Rule_OnewaySynonymsAction) Reset() { *x = Rule_OnewaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_OnewaySynonymsAction) String() string { @@ -2072,7 +2034,7 @@ func (*Rule_OnewaySynonymsAction) ProtoMessage() {} func (x *Rule_OnewaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2129,11 +2091,9 @@ type Rule_DoNotAssociateAction struct { func (x *Rule_DoNotAssociateAction) Reset() { *x = Rule_DoNotAssociateAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_DoNotAssociateAction) String() string { @@ -2144,7 +2104,7 @@ func (*Rule_DoNotAssociateAction) ProtoMessage() {} func (x *Rule_DoNotAssociateAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2200,11 +2160,9 @@ type Rule_ReplacementAction struct { func (x *Rule_ReplacementAction) Reset() { *x = Rule_ReplacementAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ReplacementAction) String() string { @@ -2215,7 +2173,7 @@ func (*Rule_ReplacementAction) ProtoMessage() {} func (x *Rule_ReplacementAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2264,11 +2222,9 @@ type Rule_IgnoreAction struct { func (x *Rule_IgnoreAction) Reset() { *x = Rule_IgnoreAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_IgnoreAction) String() string { @@ -2279,7 +2235,7 @@ func (*Rule_IgnoreAction) ProtoMessage() {} func (x *Rule_IgnoreAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2340,11 +2296,9 @@ type Rule_ForceReturnFacetAction struct { func (x *Rule_ForceReturnFacetAction) Reset() { *x = Rule_ForceReturnFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction) String() string { @@ -2355,7 +2309,7 @@ func (*Rule_ForceReturnFacetAction) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2409,11 +2363,9 @@ type Rule_RemoveFacetAction struct { func (x *Rule_RemoveFacetAction) Reset() { *x = Rule_RemoveFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RemoveFacetAction) String() string { @@ -2424,7 +2376,7 @@ func (*Rule_RemoveFacetAction) ProtoMessage() {} func (x *Rule_RemoveFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2464,11 +2416,9 @@ type Rule_ForceReturnFacetAction_FacetPositionAdjustment struct { func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) Reset() { *x = Rule_ForceReturnFacetAction_FacetPositionAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) String() string { @@ -2479,7 +2429,7 @@ func (*Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2533,11 +2483,9 @@ type PriceInfo_PriceRange struct { func (x *PriceInfo_PriceRange) Reset() { *x = PriceInfo_PriceRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_common_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_common_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo_PriceRange) String() string { @@ -2548,7 +2496,7 @@ func (*PriceInfo_PriceRange) ProtoMessage() {} func (x *PriceInfo_PriceRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_common_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2985,320 +2933,6 @@ func file_google_cloud_retail_v2_common_proto_init() { if File_google_cloud_retail_v2_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Audience); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ColorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Rating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LocalInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Rule_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Rule_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Rule_TwowaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Rule_OnewaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Rule_DoNotAssociateAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ReplacementAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Rule_IgnoreAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RemoveFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction_FacetPositionAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_common_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo_PriceRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_common_proto_msgTypes[1].OneofWrappers = []any{ (*Rule_BoostAction_)(nil), (*Rule_RedirectAction_)(nil), diff --git a/retail/apiv2/retailpb/completion_service.pb.go b/retail/apiv2/retailpb/completion_service.pb.go index 0e0f9f9f5391..eea57d7526d4 100755 --- a/retail/apiv2/retailpb/completion_service.pb.go +++ b/retail/apiv2/retailpb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/completion_service.proto @@ -127,11 +127,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -142,7 +140,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +269,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -286,7 +282,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type CompleteQueryResponse_CompletionResult struct { func (x *CompleteQueryResponse_CompletionResult) Reset() { *x = CompleteQueryResponse_CompletionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_CompletionResult) String() string { @@ -367,7 +361,7 @@ func (*CompleteQueryResponse_CompletionResult) ProtoMessage() {} func (x *CompleteQueryResponse_CompletionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +404,9 @@ type CompleteQueryResponse_RecentSearchResult struct { func (x *CompleteQueryResponse_RecentSearchResult) Reset() { *x = CompleteQueryResponse_RecentSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_RecentSearchResult) String() string { @@ -425,7 +417,7 @@ func (*CompleteQueryResponse_RecentSearchResult) ProtoMessage() {} func (x *CompleteQueryResponse_RecentSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +451,9 @@ type CompleteQueryResponse_AttributeResult struct { func (x *CompleteQueryResponse_AttributeResult) Reset() { *x = CompleteQueryResponse_AttributeResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_AttributeResult) String() string { @@ -474,7 +464,7 @@ func (*CompleteQueryResponse_AttributeResult) ProtoMessage() {} func (x *CompleteQueryResponse_AttributeResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_completion_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,68 +691,6 @@ func file_google_cloud_retail_v2_completion_service_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_CompletionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_completion_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_RecentSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_completion_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_AttributeResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/control.pb.go b/retail/apiv2/retailpb/control.pb.go index 2b795efd85f4..98f80b87353a 100755 --- a/retail/apiv2/retailpb/control.pb.go +++ b/retail/apiv2/retailpb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/control.proto @@ -89,11 +89,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -104,7 +102,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,20 +275,6 @@ func file_google_cloud_retail_v2_control_proto_init() { return } file_google_cloud_retail_v2_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_control_proto_msgTypes[0].OneofWrappers = []any{ (*Control_Rule)(nil), } diff --git a/retail/apiv2/retailpb/control_service.pb.go b/retail/apiv2/retailpb/control_service.pb.go index 0489f211e91f..b270fe2f531e 100755 --- a/retail/apiv2/retailpb/control_service.pb.go +++ b/retail/apiv2/retailpb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/control_service.proto @@ -63,11 +63,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -256,7 +248,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +296,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -319,7 +309,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +366,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -391,7 +379,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -621,80 +609,6 @@ func file_google_cloud_retail_v2_control_service_proto_init() { return } file_google_cloud_retail_v2_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/export_config.pb.go b/retail/apiv2/retailpb/export_config.pb.go index 05b7531872a1..e913c1176809 100755 --- a/retail/apiv2/retailpb/export_config.pb.go +++ b/retail/apiv2/retailpb/export_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/export_config.proto @@ -55,11 +55,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -70,7 +68,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type ExportErrorsConfig struct { func (x *ExportErrorsConfig) Reset() { *x = ExportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportErrorsConfig) String() string { @@ -155,7 +151,7 @@ func (*ExportErrorsConfig) ProtoMessage() {} func (x *ExportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type ExportAnalyticsMetricsRequest struct { func (x *ExportAnalyticsMetricsRequest) Reset() { *x = ExportAnalyticsMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsRequest) String() string { @@ -246,7 +240,7 @@ func (*ExportAnalyticsMetricsRequest) ProtoMessage() {} func (x *ExportAnalyticsMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +292,9 @@ type ExportMetadata struct { func (x *ExportMetadata) Reset() { *x = ExportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadata) String() string { @@ -313,7 +305,7 @@ func (*ExportMetadata) ProtoMessage() {} func (x *ExportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +352,9 @@ type ExportAnalyticsMetricsResponse struct { func (x *ExportAnalyticsMetricsResponse) Reset() { *x = ExportAnalyticsMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsResponse) String() string { @@ -375,7 +365,7 @@ func (*ExportAnalyticsMetricsResponse) ProtoMessage() {} func (x *ExportAnalyticsMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,11 +416,9 @@ type OutputResult struct { func (x *OutputResult) Reset() { *x = OutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputResult) String() string { @@ -441,7 +429,7 @@ func (*OutputResult) ProtoMessage() {} func (x *OutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +472,9 @@ type BigQueryOutputResult struct { func (x *BigQueryOutputResult) Reset() { *x = BigQueryOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryOutputResult) String() string { @@ -499,7 +485,7 @@ func (*BigQueryOutputResult) ProtoMessage() {} func (x *BigQueryOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +526,9 @@ type GcsOutputResult struct { func (x *GcsOutputResult) Reset() { *x = GcsOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputResult) String() string { @@ -555,7 +539,7 @@ func (*GcsOutputResult) ProtoMessage() {} func (x *GcsOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,11 +579,9 @@ type OutputConfig_GcsDestination struct { func (x *OutputConfig_GcsDestination) Reset() { *x = OutputConfig_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_GcsDestination) String() string { @@ -610,7 +592,7 @@ func (*OutputConfig_GcsDestination) ProtoMessage() {} func (x *OutputConfig_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +633,9 @@ type OutputConfig_BigQueryDestination struct { func (x *OutputConfig_BigQueryDestination) Reset() { *x = OutputConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_BigQueryDestination) String() string { @@ -666,7 +646,7 @@ func (*OutputConfig_BigQueryDestination) ProtoMessage() {} func (x *OutputConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_export_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,128 +848,6 @@ func file_google_cloud_retail_v2_export_config_proto_init() { if File_google_cloud_retail_v2_export_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_export_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_export_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_export_config_proto_msgTypes[0].OneofWrappers = []any{ (*OutputConfig_GcsDestination_)(nil), (*OutputConfig_BigqueryDestination)(nil), diff --git a/retail/apiv2/retailpb/generative_question.pb.go b/retail/apiv2/retailpb/generative_question.pb.go index 787e40a99757..ef0983d3bce4 100755 --- a/retail/apiv2/retailpb/generative_question.pb.go +++ b/retail/apiv2/retailpb/generative_question.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/generative_question.proto @@ -56,11 +56,9 @@ type GenerativeQuestionsFeatureConfig struct { func (x *GenerativeQuestionsFeatureConfig) Reset() { *x = GenerativeQuestionsFeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionsFeatureConfig) String() string { @@ -71,7 +69,7 @@ func (*GenerativeQuestionsFeatureConfig) ProtoMessage() {} func (x *GenerativeQuestionsFeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type GenerativeQuestionConfig struct { func (x *GenerativeQuestionConfig) Reset() { *x = GenerativeQuestionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionConfig) String() string { @@ -149,7 +145,7 @@ func (*GenerativeQuestionConfig) ProtoMessage() {} func (x *GenerativeQuestionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,32 +294,6 @@ func file_google_cloud_retail_v2_generative_question_proto_init() { if File_google_cloud_retail_v2_generative_question_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_generative_question_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionsFeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/generative_question_service.pb.go b/retail/apiv2/retailpb/generative_question_service.pb.go index 498d2dd61230..3c50c423d733 100755 --- a/retail/apiv2/retailpb/generative_question_service.pb.go +++ b/retail/apiv2/retailpb/generative_question_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/generative_question_service.proto @@ -57,11 +57,9 @@ type UpdateGenerativeQuestionsFeatureConfigRequest struct { func (x *UpdateGenerativeQuestionsFeatureConfigRequest) Reset() { *x = UpdateGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionsFeatureConfigRequest) String() string { @@ -72,7 +70,7 @@ func (*UpdateGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type GetGenerativeQuestionsFeatureConfigRequest struct { func (x *GetGenerativeQuestionsFeatureConfigRequest) Reset() { *x = GetGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGenerativeQuestionsFeatureConfigRequest) String() string { @@ -129,7 +125,7 @@ func (*GetGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *GetGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +160,9 @@ type ListGenerativeQuestionConfigsRequest struct { func (x *ListGenerativeQuestionConfigsRequest) Reset() { *x = ListGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsRequest) String() string { @@ -179,7 +173,7 @@ func (*ListGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type ListGenerativeQuestionConfigsResponse struct { func (x *ListGenerativeQuestionConfigsResponse) Reset() { *x = ListGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsResponse) String() string { @@ -228,7 +220,7 @@ func (*ListGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +262,9 @@ type UpdateGenerativeQuestionConfigRequest struct { func (x *UpdateGenerativeQuestionConfigRequest) Reset() { *x = UpdateGenerativeQuestionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionConfigRequest) String() string { @@ -285,7 +275,7 @@ func (*UpdateGenerativeQuestionConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +319,9 @@ type BatchUpdateGenerativeQuestionConfigsRequest struct { func (x *BatchUpdateGenerativeQuestionConfigsRequest) Reset() { *x = BatchUpdateGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsRequest) String() string { @@ -344,7 +332,7 @@ func (*BatchUpdateGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +373,9 @@ type BatchUpdateGenerativeQuestionConfigsResponse struct { func (x *BatchUpdateGenerativeQuestionConfigsResponse) Reset() { *x = BatchUpdateGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsResponse) String() string { @@ -400,7 +386,7 @@ func (*BatchUpdateGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,92 +677,6 @@ func file_google_cloud_retail_v2_generative_question_service_proto_init() { return } file_google_cloud_retail_v2_generative_question_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_generative_question_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/import_config.pb.go b/retail/apiv2/retailpb/import_config.pb.go index f431d0823529..264fe0d92d57 100755 --- a/retail/apiv2/retailpb/import_config.pb.go +++ b/retail/apiv2/retailpb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/import_config.proto @@ -142,11 +142,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -157,7 +155,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +243,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -260,7 +256,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type ProductInlineSource struct { func (x *ProductInlineSource) Reset() { *x = ProductInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInlineSource) String() string { @@ -367,7 +361,7 @@ func (*ProductInlineSource) ProtoMessage() {} func (x *ProductInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +395,9 @@ type UserEventInlineSource struct { func (x *UserEventInlineSource) Reset() { *x = UserEventInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInlineSource) String() string { @@ -416,7 +408,7 @@ func (*UserEventInlineSource) ProtoMessage() {} func (x *UserEventInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +446,9 @@ type ImportErrorsConfig struct { func (x *ImportErrorsConfig) Reset() { *x = ImportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorsConfig) String() string { @@ -469,7 +459,7 @@ func (*ImportErrorsConfig) ProtoMessage() {} func (x *ImportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +551,9 @@ type ImportProductsRequest struct { func (x *ImportProductsRequest) Reset() { *x = ImportProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsRequest) String() string { @@ -576,7 +564,7 @@ func (*ImportProductsRequest) ProtoMessage() {} func (x *ImportProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +646,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -673,7 +659,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +717,9 @@ type ImportCompletionDataRequest struct { func (x *ImportCompletionDataRequest) Reset() { *x = ImportCompletionDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataRequest) String() string { @@ -746,7 +730,7 @@ func (*ImportCompletionDataRequest) ProtoMessage() {} func (x *ImportCompletionDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type ProductInputConfig struct { func (x *ProductInputConfig) Reset() { *x = ProductInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInputConfig) String() string { @@ -815,7 +797,7 @@ func (*ProductInputConfig) ProtoMessage() {} func (x *ProductInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +883,9 @@ type UserEventInputConfig struct { func (x *UserEventInputConfig) Reset() { *x = UserEventInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInputConfig) String() string { @@ -916,7 +896,7 @@ func (*UserEventInputConfig) ProtoMessage() {} func (x *UserEventInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +988,9 @@ type CompletionDataInputConfig struct { func (x *CompletionDataInputConfig) Reset() { *x = CompletionDataInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDataInputConfig) String() string { @@ -1023,7 +1001,7 @@ func (*CompletionDataInputConfig) ProtoMessage() {} func (x *CompletionDataInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,11 +1075,9 @@ type ImportMetadata struct { func (x *ImportMetadata) Reset() { *x = ImportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMetadata) String() string { @@ -1112,7 +1088,7 @@ func (*ImportMetadata) ProtoMessage() {} func (x *ImportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1187,11 +1163,9 @@ type ImportProductsResponse struct { func (x *ImportProductsResponse) Reset() { *x = ImportProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsResponse) String() string { @@ -1202,7 +1176,7 @@ func (*ImportProductsResponse) ProtoMessage() {} func (x *ImportProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1224,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1265,7 +1237,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1289,9 @@ type UserEventImportSummary struct { func (x *UserEventImportSummary) Reset() { *x = UserEventImportSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventImportSummary) String() string { @@ -1332,7 +1302,7 @@ func (*UserEventImportSummary) ProtoMessage() {} func (x *UserEventImportSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1346,9 @@ type ImportCompletionDataResponse struct { func (x *ImportCompletionDataResponse) Reset() { *x = ImportCompletionDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataResponse) String() string { @@ -1391,7 +1359,7 @@ func (*ImportCompletionDataResponse) ProtoMessage() {} func (x *ImportCompletionDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1741,200 +1709,6 @@ func file_google_cloud_retail_v2_import_config_proto_init() { } file_google_cloud_retail_v2_product_proto_init() file_google_cloud_retail_v2_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProductInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ProductInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDataInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UserEventImportSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/retail/apiv2/retailpb/model.pb.go b/retail/apiv2/retailpb/model.pb.go index 0e9c88913690..cd28aa35cc84 100755 --- a/retail/apiv2/retailpb/model.pb.go +++ b/retail/apiv2/retailpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/model.proto @@ -443,11 +443,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -458,7 +456,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +590,9 @@ type Model_ServingConfigList struct { func (x *Model_ServingConfigList) Reset() { *x = Model_ServingConfigList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ServingConfigList) String() string { @@ -607,7 +603,7 @@ func (*Model_ServingConfigList) ProtoMessage() {} func (x *Model_ServingConfigList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +640,9 @@ type Model_FrequentlyBoughtTogetherFeaturesConfig struct { func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) Reset() { *x = Model_FrequentlyBoughtTogetherFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) String() string { @@ -659,7 +653,7 @@ func (*Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoMessage() {} func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +689,9 @@ type Model_ModelFeaturesConfig struct { func (x *Model_ModelFeaturesConfig) Reset() { *x = Model_ModelFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ModelFeaturesConfig) String() string { @@ -710,7 +702,7 @@ func (*Model_ModelFeaturesConfig) ProtoMessage() {} func (x *Model_ModelFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,56 +957,6 @@ func file_google_cloud_retail_v2_model_proto_init() { return } file_google_cloud_retail_v2_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Model_ServingConfigList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Model_FrequentlyBoughtTogetherFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Model_ModelFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_model_proto_msgTypes[3].OneofWrappers = []any{ (*Model_ModelFeaturesConfig_FrequentlyBoughtTogetherConfig)(nil), } diff --git a/retail/apiv2/retailpb/model_service.pb.go b/retail/apiv2/retailpb/model_service.pb.go index d277f04679e3..0d0196333b4b 100755 --- a/retail/apiv2/retailpb/model_service.pb.go +++ b/retail/apiv2/retailpb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/model_service.proto @@ -62,11 +62,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -77,7 +75,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -143,7 +139,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +182,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -201,7 +195,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type PauseModelRequest struct { func (x *PauseModelRequest) Reset() { *x = PauseModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseModelRequest) String() string { @@ -252,7 +244,7 @@ func (*PauseModelRequest) ProtoMessage() {} func (x *PauseModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +280,9 @@ type ResumeModelRequest struct { func (x *ResumeModelRequest) Reset() { *x = ResumeModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeModelRequest) String() string { @@ -303,7 +293,7 @@ func (*ResumeModelRequest) ProtoMessage() {} func (x *ResumeModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +335,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -360,7 +348,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +398,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -425,7 +411,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +447,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -476,7 +460,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +504,9 @@ type TuneModelRequest struct { func (x *TuneModelRequest) Reset() { *x = TuneModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelRequest) String() string { @@ -535,7 +517,7 @@ func (*TuneModelRequest) ProtoMessage() {} func (x *TuneModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +553,9 @@ type CreateModelMetadata struct { func (x *CreateModelMetadata) Reset() { *x = CreateModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMetadata) String() string { @@ -586,7 +566,7 @@ func (*CreateModelMetadata) ProtoMessage() {} func (x *CreateModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +602,9 @@ type TuneModelMetadata struct { func (x *TuneModelMetadata) Reset() { *x = TuneModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelMetadata) String() string { @@ -637,7 +615,7 @@ func (*TuneModelMetadata) ProtoMessage() {} func (x *TuneModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +646,9 @@ type TuneModelResponse struct { func (x *TuneModelResponse) Reset() { *x = TuneModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelResponse) String() string { @@ -683,7 +659,7 @@ func (*TuneModelResponse) ProtoMessage() {} func (x *TuneModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_model_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,152 +944,6 @@ func file_google_cloud_retail_v2_model_service_proto_init() { return } file_google_cloud_retail_v2_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PauseModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResumeModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_model_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/prediction_service.pb.go b/retail/apiv2/retailpb/prediction_service.pb.go index 128e78719029..571c60701d0b 100755 --- a/retail/apiv2/retailpb/prediction_service.pb.go +++ b/retail/apiv2/retailpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/prediction_service.proto @@ -181,11 +181,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -196,7 +194,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +288,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -305,7 +301,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type PredictResponse_PredictionResult struct { func (x *PredictResponse_PredictionResult) Reset() { *x = PredictResponse_PredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse_PredictionResult) String() string { @@ -384,7 +378,7 @@ func (*PredictResponse_PredictionResult) ProtoMessage() {} func (x *PredictResponse_PredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,44 +571,6 @@ func file_google_cloud_retail_v2_prediction_service_proto_init() { return } file_google_cloud_retail_v2_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse_PredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/product.pb.go b/retail/apiv2/retailpb/product.pb.go index d9aaef0ba6a1..76a379cb51f7 100755 --- a/retail/apiv2/retailpb/product.pb.go +++ b/retail/apiv2/retailpb/product.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/product.proto @@ -601,11 +601,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -616,7 +614,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,20 +1186,6 @@ func file_google_cloud_retail_v2_product_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_promotion_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_product_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_product_proto_msgTypes[0].OneofWrappers = []any{ (*Product_ExpireTime)(nil), (*Product_Ttl)(nil), diff --git a/retail/apiv2/retailpb/product_service.pb.go b/retail/apiv2/retailpb/product_service.pb.go index 2610dc115dfe..0e6bc3076f83 100755 --- a/retail/apiv2/retailpb/product_service.pb.go +++ b/retail/apiv2/retailpb/product_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/product_service.proto @@ -77,11 +77,9 @@ type CreateProductRequest struct { func (x *CreateProductRequest) Reset() { *x = CreateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProductRequest) String() string { @@ -92,7 +90,7 @@ func (*CreateProductRequest) ProtoMessage() {} func (x *CreateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type GetProductRequest struct { func (x *GetProductRequest) Reset() { *x = GetProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductRequest) String() string { @@ -166,7 +162,7 @@ func (*GetProductRequest) ProtoMessage() {} func (x *GetProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +224,9 @@ type UpdateProductRequest struct { func (x *UpdateProductRequest) Reset() { *x = UpdateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProductRequest) String() string { @@ -243,7 +237,7 @@ func (*UpdateProductRequest) ProtoMessage() {} func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +307,9 @@ type DeleteProductRequest struct { func (x *DeleteProductRequest) Reset() { *x = DeleteProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductRequest) String() string { @@ -328,7 +320,7 @@ func (*DeleteProductRequest) ProtoMessage() {} func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +432,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -455,7 +445,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +514,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -539,7 +527,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +646,9 @@ type SetInventoryRequest struct { func (x *SetInventoryRequest) Reset() { *x = SetInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryRequest) String() string { @@ -673,7 +659,7 @@ func (*SetInventoryRequest) ProtoMessage() {} func (x *SetInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,11 +714,9 @@ type SetInventoryMetadata struct { func (x *SetInventoryMetadata) Reset() { *x = SetInventoryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryMetadata) String() string { @@ -743,7 +727,7 @@ func (*SetInventoryMetadata) ProtoMessage() {} func (x *SetInventoryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -770,11 +754,9 @@ type SetInventoryResponse struct { func (x *SetInventoryResponse) Reset() { *x = SetInventoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryResponse) String() string { @@ -785,7 +767,7 @@ func (*SetInventoryResponse) ProtoMessage() {} func (x *SetInventoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +850,9 @@ type AddFulfillmentPlacesRequest struct { func (x *AddFulfillmentPlacesRequest) Reset() { *x = AddFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesRequest) String() string { @@ -883,7 +863,7 @@ func (*AddFulfillmentPlacesRequest) ProtoMessage() {} func (x *AddFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +925,9 @@ type AddFulfillmentPlacesMetadata struct { func (x *AddFulfillmentPlacesMetadata) Reset() { *x = AddFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesMetadata) String() string { @@ -960,7 +938,7 @@ func (*AddFulfillmentPlacesMetadata) ProtoMessage() {} func (x *AddFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,11 +965,9 @@ type AddFulfillmentPlacesResponse struct { func (x *AddFulfillmentPlacesResponse) Reset() { *x = AddFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesResponse) String() string { @@ -1002,7 +978,7 @@ func (*AddFulfillmentPlacesResponse) ProtoMessage() {} func (x *AddFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1043,9 @@ type AddLocalInventoriesRequest struct { func (x *AddLocalInventoriesRequest) Reset() { *x = AddLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesRequest) String() string { @@ -1082,7 +1056,7 @@ func (*AddLocalInventoriesRequest) ProtoMessage() {} func (x *AddLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1118,9 @@ type AddLocalInventoriesMetadata struct { func (x *AddLocalInventoriesMetadata) Reset() { *x = AddLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesMetadata) String() string { @@ -1159,7 +1131,7 @@ func (*AddLocalInventoriesMetadata) ProtoMessage() {} func (x *AddLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1160,9 @@ type AddLocalInventoriesResponse struct { func (x *AddLocalInventoriesResponse) Reset() { *x = AddLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesResponse) String() string { @@ -1203,7 +1173,7 @@ func (*AddLocalInventoriesResponse) ProtoMessage() {} func (x *AddLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,11 +1222,9 @@ type RemoveLocalInventoriesRequest struct { func (x *RemoveLocalInventoriesRequest) Reset() { *x = RemoveLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesRequest) String() string { @@ -1267,7 +1235,7 @@ func (*RemoveLocalInventoriesRequest) ProtoMessage() {} func (x *RemoveLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1322,11 +1290,9 @@ type RemoveLocalInventoriesMetadata struct { func (x *RemoveLocalInventoriesMetadata) Reset() { *x = RemoveLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesMetadata) String() string { @@ -1337,7 +1303,7 @@ func (*RemoveLocalInventoriesMetadata) ProtoMessage() {} func (x *RemoveLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1366,11 +1332,9 @@ type RemoveLocalInventoriesResponse struct { func (x *RemoveLocalInventoriesResponse) Reset() { *x = RemoveLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesResponse) String() string { @@ -1381,7 +1345,7 @@ func (*RemoveLocalInventoriesResponse) ProtoMessage() {} func (x *RemoveLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1459,11 +1423,9 @@ type RemoveFulfillmentPlacesRequest struct { func (x *RemoveFulfillmentPlacesRequest) Reset() { *x = RemoveFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesRequest) String() string { @@ -1474,7 +1436,7 @@ func (*RemoveFulfillmentPlacesRequest) ProtoMessage() {} func (x *RemoveFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1498,9 @@ type RemoveFulfillmentPlacesMetadata struct { func (x *RemoveFulfillmentPlacesMetadata) Reset() { *x = RemoveFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesMetadata) String() string { @@ -1551,7 +1511,7 @@ func (*RemoveFulfillmentPlacesMetadata) ProtoMessage() {} func (x *RemoveFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1578,11 +1538,9 @@ type RemoveFulfillmentPlacesResponse struct { func (x *RemoveFulfillmentPlacesResponse) Reset() { *x = RemoveFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesResponse) String() string { @@ -1593,7 +1551,7 @@ func (*RemoveFulfillmentPlacesResponse) ProtoMessage() {} func (x *RemoveFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_product_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2116,260 +2074,6 @@ func file_google_cloud_retail_v2_product_service_proto_init() { file_google_cloud_retail_v2_import_config_proto_init() file_google_cloud_retail_v2_product_proto_init() file_google_cloud_retail_v2_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_product_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_product_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/promotion.pb.go b/retail/apiv2/retailpb/promotion.pb.go index c4bea2682f65..78b75f8833a1 100755 --- a/retail/apiv2/retailpb/promotion.pb.go +++ b/retail/apiv2/retailpb/promotion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/promotion.proto @@ -55,11 +55,9 @@ type Promotion struct { func (x *Promotion) Reset() { *x = Promotion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_promotion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_promotion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Promotion) String() string { @@ -70,7 +68,7 @@ func (*Promotion) ProtoMessage() {} func (x *Promotion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_promotion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,20 +144,6 @@ func file_google_cloud_retail_v2_promotion_proto_init() { if File_google_cloud_retail_v2_promotion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_promotion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Promotion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/purge_config.pb.go b/retail/apiv2/retailpb/purge_config.pb.go index b993f3e82901..fa60b6bfca6a 100755 --- a/retail/apiv2/retailpb/purge_config.pb.go +++ b/retail/apiv2/retailpb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/purge_config.proto @@ -47,11 +47,9 @@ type PurgeMetadata struct { func (x *PurgeMetadata) Reset() { *x = PurgeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeMetadata) String() string { @@ -62,7 +60,7 @@ func (*PurgeMetadata) ProtoMessage() {} func (x *PurgeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97,11 +95,9 @@ type PurgeProductsMetadata struct { func (x *PurgeProductsMetadata) Reset() { *x = PurgeProductsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsMetadata) String() string { @@ -112,7 +108,7 @@ func (*PurgeProductsMetadata) ProtoMessage() {} func (x *PurgeProductsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +209,9 @@ type PurgeProductsRequest struct { func (x *PurgeProductsRequest) Reset() { *x = PurgeProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsRequest) String() string { @@ -228,7 +222,7 @@ func (*PurgeProductsRequest) ProtoMessage() {} func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +276,9 @@ type PurgeProductsResponse struct { func (x *PurgeProductsResponse) Reset() { *x = PurgeProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsResponse) String() string { @@ -297,7 +289,7 @@ func (*PurgeProductsResponse) ProtoMessage() {} func (x *PurgeProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -383,7 +373,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +423,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -448,7 +436,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,80 +568,6 @@ func file_google_cloud_retail_v2_purge_config_proto_init() { if File_google_cloud_retail_v2_purge_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/search_service.pb.go b/retail/apiv2/retailpb/search_service.pb.go index 42139b9b26b2..57fc86248698 100755 --- a/retail/apiv2/retailpb/search_service.pb.go +++ b/retail/apiv2/retailpb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/search_service.proto @@ -361,11 +361,9 @@ type ProductAttributeValue struct { func (x *ProductAttributeValue) Reset() { *x = ProductAttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeValue) String() string { @@ -376,7 +374,7 @@ func (*ProductAttributeValue) ProtoMessage() {} func (x *ProductAttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +417,9 @@ type ProductAttributeInterval struct { func (x *ProductAttributeInterval) Reset() { *x = ProductAttributeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeInterval) String() string { @@ -434,7 +430,7 @@ func (*ProductAttributeInterval) ProtoMessage() {} func (x *ProductAttributeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +480,9 @@ type Tile struct { func (x *Tile) Reset() { *x = Tile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tile) String() string { @@ -499,7 +493,7 @@ func (*Tile) ProtoMessage() {} func (x *Tile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -834,11 +828,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -849,7 +841,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1083,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1106,7 +1096,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1222,9 @@ type ExperimentInfo struct { func (x *ExperimentInfo) Reset() { *x = ExperimentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo) String() string { @@ -1247,7 +1235,7 @@ func (*ExperimentInfo) ProtoMessage() {} func (x *ExperimentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1370,11 +1358,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1385,7 +1371,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1429,9 @@ type SearchRequest_DynamicFacetSpec struct { func (x *SearchRequest_DynamicFacetSpec) Reset() { *x = SearchRequest_DynamicFacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DynamicFacetSpec) String() string { @@ -1458,7 +1442,7 @@ func (*SearchRequest_DynamicFacetSpec) ProtoMessage() {} func (x *SearchRequest_DynamicFacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1486,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1517,7 +1499,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1564,11 +1546,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1579,7 +1559,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1621,11 +1601,9 @@ type SearchRequest_PersonalizationSpec struct { func (x *SearchRequest_PersonalizationSpec) Reset() { *x = SearchRequest_PersonalizationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_PersonalizationSpec) String() string { @@ -1636,7 +1614,7 @@ func (*SearchRequest_PersonalizationSpec) ProtoMessage() {} func (x *SearchRequest_PersonalizationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1672,11 +1650,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1687,7 +1663,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1734,11 +1710,9 @@ type SearchRequest_ConversationalSearchSpec struct { func (x *SearchRequest_ConversationalSearchSpec) Reset() { *x = SearchRequest_ConversationalSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec) String() string { @@ -1749,7 +1723,7 @@ func (*SearchRequest_ConversationalSearchSpec) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1803,11 +1777,9 @@ type SearchRequest_TileNavigationSpec struct { func (x *SearchRequest_TileNavigationSpec) Reset() { *x = SearchRequest_TileNavigationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_TileNavigationSpec) String() string { @@ -1818,7 +1790,7 @@ func (*SearchRequest_TileNavigationSpec) ProtoMessage() {} func (x *SearchRequest_TileNavigationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2003,11 +1975,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -2018,7 +1988,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2138,11 +2108,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -2153,7 +2121,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2201,11 +2169,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) String() string { @@ -2216,7 +2182,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2293,11 +2259,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) String() string { @@ -2308,7 +2272,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoMe func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2428,11 +2392,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -2443,7 +2405,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2517,11 +2479,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -2532,7 +2492,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2586,11 +2546,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -2601,7 +2559,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2672,11 +2630,9 @@ type SearchResponse_ConversationalSearchResult struct { func (x *SearchResponse_ConversationalSearchResult) Reset() { *x = SearchResponse_ConversationalSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult) String() string { @@ -2687,7 +2643,7 @@ func (*SearchResponse_ConversationalSearchResult) ProtoMessage() {} func (x *SearchResponse_ConversationalSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2715,9 @@ type SearchResponse_TileNavigationResult struct { func (x *SearchResponse_TileNavigationResult) Reset() { *x = SearchResponse_TileNavigationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_TileNavigationResult) String() string { @@ -2774,7 +2728,7 @@ func (*SearchResponse_TileNavigationResult) ProtoMessage() {} func (x *SearchResponse_TileNavigationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2827,11 +2781,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -2842,7 +2794,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2930,11 +2882,9 @@ type SearchResponse_ConversationalSearchResult_SuggestedAnswer struct { func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) Reset() { *x = SearchResponse_ConversationalSearchResult_SuggestedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) String() string { @@ -2945,7 +2895,7 @@ func (*SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoMessage() func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2980,11 +2930,9 @@ type SearchResponse_ConversationalSearchResult_AdditionalFilter struct { func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) Reset() { *x = SearchResponse_ConversationalSearchResult_AdditionalFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) String() string { @@ -2995,7 +2943,7 @@ func (*SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoMessage( func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3037,11 +2985,9 @@ type ExperimentInfo_ServingConfigExperiment struct { func (x *ExperimentInfo_ServingConfigExperiment) Reset() { *x = ExperimentInfo_ServingConfigExperiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo_ServingConfigExperiment) String() string { @@ -3052,7 +2998,7 @@ func (*ExperimentInfo_ServingConfigExperiment) ProtoMessage() {} func (x *ExperimentInfo_ServingConfigExperiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3771,332 +3717,6 @@ func file_google_cloud_retail_v2_search_service_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Tile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DynamicFacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_PersonalizationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_TileNavigationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_TileNavigationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_SuggestedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_AdditionalFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo_ServingConfigExperiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*Tile_ProductAttributeValue)(nil), (*Tile_ProductAttributeInterval)(nil), diff --git a/retail/apiv2/retailpb/serving_config.pb.go b/retail/apiv2/retailpb/serving_config.pb.go index 11afe013a9ca..e636249bb793 100755 --- a/retail/apiv2/retailpb/serving_config.pb.go +++ b/retail/apiv2/retailpb/serving_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/serving_config.proto @@ -296,11 +296,9 @@ type ServingConfig struct { func (x *ServingConfig) Reset() { *x = ServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig) String() string { @@ -311,7 +309,7 @@ func (*ServingConfig) ProtoMessage() {} func (x *ServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,20 +624,6 @@ func file_google_cloud_retail_v2_serving_config_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_serving_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/serving_config_service.pb.go b/retail/apiv2/retailpb/serving_config_service.pb.go index 59d64186e7e8..919ef9330d00 100755 --- a/retail/apiv2/retailpb/serving_config_service.pb.go +++ b/retail/apiv2/retailpb/serving_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/serving_config_service.proto @@ -63,11 +63,9 @@ type CreateServingConfigRequest struct { func (x *CreateServingConfigRequest) Reset() { *x = CreateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServingConfigRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateServingConfigRequest) ProtoMessage() {} func (x *CreateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateServingConfigRequest struct { func (x *UpdateServingConfigRequest) Reset() { *x = UpdateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServingConfigRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateServingConfigRequest) ProtoMessage() {} func (x *UpdateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteServingConfigRequest struct { func (x *DeleteServingConfigRequest) Reset() { *x = DeleteServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServingConfigRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteServingConfigRequest) ProtoMessage() {} func (x *DeleteServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetServingConfigRequest struct { func (x *GetServingConfigRequest) Reset() { *x = GetServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServingConfigRequest) String() string { @@ -256,7 +248,7 @@ func (*GetServingConfigRequest) ProtoMessage() {} func (x *GetServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type ListServingConfigsRequest struct { func (x *ListServingConfigsRequest) Reset() { *x = ListServingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsRequest) String() string { @@ -313,7 +303,7 @@ func (*ListServingConfigsRequest) ProtoMessage() {} func (x *ListServingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +353,9 @@ type ListServingConfigsResponse struct { func (x *ListServingConfigsResponse) Reset() { *x = ListServingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsResponse) String() string { @@ -378,7 +366,7 @@ func (*ListServingConfigsResponse) ProtoMessage() {} func (x *ListServingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +411,9 @@ type AddControlRequest struct { func (x *AddControlRequest) Reset() { *x = AddControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddControlRequest) String() string { @@ -438,7 +424,7 @@ func (*AddControlRequest) ProtoMessage() {} func (x *AddControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type RemoveControlRequest struct { func (x *RemoveControlRequest) Reset() { *x = RemoveControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveControlRequest) String() string { @@ -498,7 +482,7 @@ func (*RemoveControlRequest) ProtoMessage() {} func (x *RemoveControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,104 +780,6 @@ func file_google_cloud_retail_v2_serving_config_service_proto_init() { return } file_google_cloud_retail_v2_serving_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AddControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_serving_config_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RemoveControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/user_event.pb.go b/retail/apiv2/retailpb/user_event.pb.go index dd2b2d521890..d73fcc19b9a1 100755 --- a/retail/apiv2/retailpb/user_event.pb.go +++ b/retail/apiv2/retailpb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/user_event.proto @@ -270,11 +270,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -285,7 +283,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +479,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -496,7 +492,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +542,9 @@ type CompletionDetail struct { func (x *CompletionDetail) Reset() { *x = CompletionDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDetail) String() string { @@ -561,7 +555,7 @@ func (*CompletionDetail) ProtoMessage() {} func (x *CompletionDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +620,9 @@ type PurchaseTransaction struct { func (x *PurchaseTransaction) Reset() { *x = PurchaseTransaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchaseTransaction) String() string { @@ -641,7 +633,7 @@ func (*PurchaseTransaction) ProtoMessage() {} func (x *PurchaseTransaction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,56 +860,6 @@ func file_google_cloud_retail_v2_user_event_proto_init() { } file_google_cloud_retail_v2_common_proto_init() file_google_cloud_retail_v2_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurchaseTransaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2/retailpb/user_event_service.pb.go b/retail/apiv2/retailpb/user_event_service.pb.go index a13f707c93cc..3c2b80a4633b 100755 --- a/retail/apiv2/retailpb/user_event_service.pb.go +++ b/retail/apiv2/retailpb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2/user_event_service.proto @@ -122,11 +122,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -137,7 +135,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +208,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -225,7 +221,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +315,9 @@ type RejoinUserEventsRequest struct { func (x *RejoinUserEventsRequest) Reset() { *x = RejoinUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsRequest) String() string { @@ -334,7 +328,7 @@ func (*RejoinUserEventsRequest) ProtoMessage() {} func (x *RejoinUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type RejoinUserEventsResponse struct { func (x *RejoinUserEventsResponse) Reset() { *x = RejoinUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsResponse) String() string { @@ -390,7 +382,7 @@ func (*RejoinUserEventsResponse) ProtoMessage() {} func (x *RejoinUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +413,9 @@ type RejoinUserEventsMetadata struct { func (x *RejoinUserEventsMetadata) Reset() { *x = RejoinUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsMetadata) String() string { @@ -436,7 +426,7 @@ func (*RejoinUserEventsMetadata) ProtoMessage() {} func (x *RejoinUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2_user_event_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,68 +663,6 @@ func file_google_cloud_retail_v2_user_event_service_proto_init() { file_google_cloud_retail_v2_import_config_proto_init() file_google_cloud_retail_v2_purge_config_proto_init() file_google_cloud_retail_v2_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2_user_event_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2_user_event_service_proto_msgTypes[1].OneofWrappers = []any{ (*CollectUserEventRequest_PrebuiltRule)(nil), } diff --git a/retail/apiv2/search_client.go b/retail/apiv2/search_client.go index 6f7c7406ce05..17fff521afac 100755 --- a/retail/apiv2/search_client.go +++ b/retail/apiv2/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -210,6 +209,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -239,6 +240,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: retailpb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -286,6 +288,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -306,6 +310,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -369,7 +374,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *retailpb.SearchReque } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -404,7 +409,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -507,21 +512,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *retailpb.SearchReque } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -584,17 +578,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -659,21 +643,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/search_client_example_go123_test.go b/retail/apiv2/search_client_example_go123_test.go index a1ff482a3329..22fbed5ab00c 100644 --- a/retail/apiv2/search_client_example_go123_test.go +++ b/retail/apiv2/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/serving_config_client.go b/retail/apiv2/serving_config_client.go index 49a3adb7fbd2..6aca03835598 100755 --- a/retail/apiv2/serving_config_client.go +++ b/retail/apiv2/serving_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -252,6 +251,8 @@ type servingConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServingConfigClient creates a new serving config service client based on gRPC. @@ -278,6 +279,7 @@ func NewServingConfigClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, servingConfigClient: retailpb.NewServingConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -325,6 +327,8 @@ type servingConfigRESTClient struct { // Points back to the CallOptions field of the containing ServingConfigClient CallOptions **ServingConfigCallOptions + + logger *slog.Logger } // NewServingConfigRESTClient creates a new serving config service rest client. @@ -342,6 +346,7 @@ func NewServingConfigRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -394,7 +399,7 @@ func (c *servingConfigGRPCClient) CreateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.CreateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.CreateServingConfig, req, settings.GRPC, c.logger, "CreateServingConfig") return err }, opts...) if err != nil { @@ -411,7 +416,7 @@ func (c *servingConfigGRPCClient) DeleteServingConfig(ctx context.Context, req * opts = append((*c.CallOptions).DeleteServingConfig[0:len((*c.CallOptions).DeleteServingConfig):len((*c.CallOptions).DeleteServingConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.servingConfigClient.DeleteServingConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.servingConfigClient.DeleteServingConfig, req, settings.GRPC, c.logger, "DeleteServingConfig") return err }, opts...) return err @@ -426,7 +431,7 @@ func (c *servingConfigGRPCClient) UpdateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.UpdateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.UpdateServingConfig, req, settings.GRPC, c.logger, "UpdateServingConfig") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *servingConfigGRPCClient) GetServingConfig(ctx context.Context, req *ret var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.GetServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.GetServingConfig, req, settings.GRPC, c.logger, "GetServingConfig") return err }, opts...) if err != nil { @@ -473,7 +478,7 @@ func (c *servingConfigGRPCClient) ListServingConfigs(ctx context.Context, req *r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.ListServingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.ListServingConfigs, req, settings.GRPC, c.logger, "ListServingConfigs") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *servingConfigGRPCClient) AddControl(ctx context.Context, req *retailpb. var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.AddControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.AddControl, req, settings.GRPC, c.logger, "AddControl") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *servingConfigGRPCClient) RemoveControl(ctx context.Context, req *retail var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.RemoveControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.RemoveControl, req, settings.GRPC, c.logger, "RemoveControl") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *servingConfigGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -573,7 +578,7 @@ func (c *servingConfigGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -644,17 +649,7 @@ func (c *servingConfigRESTClient) CreateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServingConfig") if err != nil { return err } @@ -703,15 +698,8 @@ func (c *servingConfigRESTClient) DeleteServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServingConfig") + return err }, opts...) } @@ -762,17 +750,7 @@ func (c *servingConfigRESTClient) UpdateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServingConfig") if err != nil { return err } @@ -824,17 +802,7 @@ func (c *servingConfigRESTClient) GetServingConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServingConfig") if err != nil { return err } @@ -896,21 +864,10 @@ func (c *servingConfigRESTClient) ListServingConfigs(ctx context.Context, req *r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServingConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -985,17 +942,7 @@ func (c *servingConfigRESTClient) AddControl(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddControl") if err != nil { return err } @@ -1054,17 +1001,7 @@ func (c *servingConfigRESTClient) RemoveControl(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveControl") if err != nil { return err } @@ -1114,17 +1051,7 @@ func (c *servingConfigRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1189,21 +1116,10 @@ func (c *servingConfigRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/serving_config_client_example_go123_test.go b/retail/apiv2/serving_config_client_example_go123_test.go index 0ddf9dde13d2..195ee5dfae31 100644 --- a/retail/apiv2/serving_config_client_example_go123_test.go +++ b/retail/apiv2/serving_config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServingConfigClient_ListServingConfigs_all() { } for resp, err := range c.ListServingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServingConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2/user_event_client.go b/retail/apiv2/user_event_client.go index 0a72506bd91e..25386b13cfa5 100755 --- a/retail/apiv2/user_event_client.go +++ b/retail/apiv2/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -386,6 +385,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -412,6 +413,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: retailpb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -475,6 +477,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -492,6 +496,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -554,7 +559,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *retailpb. var resp *retailpb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -572,7 +577,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *retailp var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -590,7 +595,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *retailpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -610,7 +615,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -630,7 +635,7 @@ func (c *userEventGRPCClient) RejoinUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.RejoinUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.RejoinUserEvents, req, settings.GRPC, c.logger, "RejoinUserEvents") return err }, opts...) if err != nil { @@ -650,7 +655,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -679,7 +684,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -748,17 +753,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -824,17 +819,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -893,21 +878,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *retailpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -969,21 +943,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1046,21 +1009,10 @@ func (c *userEventRESTClient) RejoinUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RejoinUserEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1111,17 +1063,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1186,21 +1128,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2/user_event_client_example_go123_test.go b/retail/apiv2/user_event_client_example_go123_test.go index e9d3a9a7d142..5cbfcadd402c 100644 --- a/retail/apiv2/user_event_client_example_go123_test.go +++ b/retail/apiv2/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/analytics_client.go b/retail/apiv2alpha/analytics_client.go index d983a1d8e0b5..e605bcca6a72 100755 --- a/retail/apiv2alpha/analytics_client.go +++ b/retail/apiv2alpha/analytics_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -227,6 +226,8 @@ type analyticsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnalyticsClient creates a new analytics service client based on gRPC. @@ -254,6 +255,7 @@ func NewAnalyticsClient(ctx context.Context, opts ...option.ClientOption) (*Anal connPool: connPool, analyticsClient: retailpb.NewAnalyticsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -317,6 +319,8 @@ type analyticsRESTClient struct { // Points back to the CallOptions field of the containing AnalyticsClient CallOptions **AnalyticsCallOptions + + logger *slog.Logger } // NewAnalyticsRESTClient creates a new analytics service rest client. @@ -335,6 +339,7 @@ func NewAnalyticsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *analyticsGRPCClient) ExportAnalyticsMetrics(ctx context.Context, req *r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsClient.ExportAnalyticsMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsClient.ExportAnalyticsMetrics, req, settings.GRPC, c.logger, "ExportAnalyticsMetrics") return err }, opts...) if err != nil { @@ -417,7 +422,7 @@ func (c *analyticsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *analyticsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -513,21 +518,10 @@ func (c *analyticsRESTClient) ExportAnalyticsMetrics(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAnalyticsMetrics") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -578,17 +572,7 @@ func (c *analyticsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -653,21 +637,10 @@ func (c *analyticsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/analytics_client_example_go123_test.go b/retail/apiv2alpha/analytics_client_example_go123_test.go index 87b201aa2a41..dd27211bfabf 100644 --- a/retail/apiv2alpha/analytics_client_example_go123_test.go +++ b/retail/apiv2alpha/analytics_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAnalyticsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/branch_client.go b/retail/apiv2alpha/branch_client.go index 9b28468957b5..bbc56753eeda 100755 --- a/retail/apiv2alpha/branch_client.go +++ b/retail/apiv2alpha/branch_client.go @@ -19,7 +19,7 @@ package retail import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -242,6 +241,8 @@ type branchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBranchClient creates a new branch service client based on gRPC. @@ -274,6 +275,7 @@ func NewBranchClient(ctx context.Context, opts ...option.ClientOption) (*BranchC connPool: connPool, branchClient: retailpb.NewBranchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -321,6 +323,8 @@ type branchRESTClient struct { // Points back to the CallOptions field of the containing BranchClient CallOptions **BranchCallOptions + + logger *slog.Logger } // NewBranchRESTClient creates a new branch service rest client. @@ -344,6 +348,7 @@ func NewBranchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Bra endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -396,7 +401,7 @@ func (c *branchGRPCClient) ListBranches(ctx context.Context, req *retailpb.ListB var resp *retailpb.ListBranchesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.branchClient.ListBranches(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.branchClient.ListBranches, req, settings.GRPC, c.logger, "ListBranches") return err }, opts...) if err != nil { @@ -414,7 +419,7 @@ func (c *branchGRPCClient) GetBranch(ctx context.Context, req *retailpb.GetBranc var resp *retailpb.Branch err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.branchClient.GetBranch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.branchClient.GetBranch, req, settings.GRPC, c.logger, "GetBranch") return err }, opts...) if err != nil { @@ -432,7 +437,7 @@ func (c *branchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *branchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -524,17 +529,7 @@ func (c *branchRESTClient) ListBranches(ctx context.Context, req *retailpb.ListB httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBranches") if err != nil { return err } @@ -587,17 +582,7 @@ func (c *branchRESTClient) GetBranch(ctx context.Context, req *retailpb.GetBranc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBranch") if err != nil { return err } @@ -647,17 +632,7 @@ func (c *branchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -722,21 +697,10 @@ func (c *branchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/branch_client_example_go123_test.go b/retail/apiv2alpha/branch_client_example_go123_test.go index fd82f1231df1..1b1a0eefa17b 100644 --- a/retail/apiv2alpha/branch_client_example_go123_test.go +++ b/retail/apiv2alpha/branch_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBranchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/catalog_client.go b/retail/apiv2alpha/catalog_client.go index 17b2b9a61e75..ef685d0288e8 100755 --- a/retail/apiv2alpha/catalog_client.go +++ b/retail/apiv2alpha/catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -621,6 +620,8 @@ type catalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCatalogClient creates a new catalog service client based on gRPC. @@ -647,6 +648,7 @@ func NewCatalogClient(ctx context.Context, opts ...option.ClientOption) (*Catalo connPool: connPool, catalogClient: retailpb.NewCatalogServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -694,6 +696,8 @@ type catalogRESTClient struct { // Points back to the CallOptions field of the containing CatalogClient CallOptions **CatalogCallOptions + + logger *slog.Logger } // NewCatalogRESTClient creates a new catalog service rest client. @@ -711,6 +715,7 @@ func NewCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ca endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -774,7 +779,7 @@ func (c *catalogGRPCClient) ListCatalogs(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListCatalogs, req, settings.GRPC, c.logger, "ListCatalogs") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *catalogGRPCClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd var resp *retailpb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCatalog, req, settings.GRPC, c.logger, "UpdateCatalog") return err }, opts...) if err != nil { @@ -826,7 +831,7 @@ func (c *catalogGRPCClient) SetDefaultBranch(ctx context.Context, req *retailpb. opts = append((*c.CallOptions).SetDefaultBranch[0:len((*c.CallOptions).SetDefaultBranch):len((*c.CallOptions).SetDefaultBranch)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.catalogClient.SetDefaultBranch(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.catalogClient.SetDefaultBranch, req, settings.GRPC, c.logger, "SetDefaultBranch") return err }, opts...) return err @@ -841,7 +846,7 @@ func (c *catalogGRPCClient) GetDefaultBranch(ctx context.Context, req *retailpb. var resp *retailpb.GetDefaultBranchResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetDefaultBranch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetDefaultBranch, req, settings.GRPC, c.logger, "GetDefaultBranch") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *catalogGRPCClient) GetCompletionConfig(ctx context.Context, req *retail var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetCompletionConfig, req, settings.GRPC, c.logger, "GetCompletionConfig") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *catalogGRPCClient) UpdateCompletionConfig(ctx context.Context, req *ret var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCompletionConfig, req, settings.GRPC, c.logger, "UpdateCompletionConfig") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *catalogGRPCClient) GetAttributesConfig(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetAttributesConfig, req, settings.GRPC, c.logger, "GetAttributesConfig") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *catalogGRPCClient) UpdateAttributesConfig(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateAttributesConfig, req, settings.GRPC, c.logger, "UpdateAttributesConfig") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *catalogGRPCClient) AddCatalogAttribute(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.AddCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.AddCatalogAttribute, req, settings.GRPC, c.logger, "AddCatalogAttribute") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *catalogGRPCClient) RemoveCatalogAttribute(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.RemoveCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.RemoveCatalogAttribute, req, settings.GRPC, c.logger, "RemoveCatalogAttribute") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *catalogGRPCClient) BatchRemoveCatalogAttributes(ctx context.Context, re var resp *retailpb.BatchRemoveCatalogAttributesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.BatchRemoveCatalogAttributes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.BatchRemoveCatalogAttributes, req, settings.GRPC, c.logger, "BatchRemoveCatalogAttributes") return err }, opts...) if err != nil { @@ -985,7 +990,7 @@ func (c *catalogGRPCClient) ReplaceCatalogAttribute(ctx context.Context, req *re var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ReplaceCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ReplaceCatalogAttribute, req, settings.GRPC, c.logger, "ReplaceCatalogAttribute") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *catalogGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1032,7 +1037,7 @@ func (c *catalogGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1104,21 +1109,10 @@ func (c *catalogRESTClient) ListCatalogs(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1195,17 +1189,7 @@ func (c *catalogRESTClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCatalog") if err != nil { return err } @@ -1292,15 +1276,8 @@ func (c *catalogRESTClient) SetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultBranch") + return err }, opts...) } @@ -1339,17 +1316,7 @@ func (c *catalogRESTClient) GetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDefaultBranch") if err != nil { return err } @@ -1399,17 +1366,7 @@ func (c *catalogRESTClient) GetCompletionConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompletionConfig") if err != nil { return err } @@ -1474,17 +1431,7 @@ func (c *catalogRESTClient) UpdateCompletionConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCompletionConfig") if err != nil { return err } @@ -1534,17 +1481,7 @@ func (c *catalogRESTClient) GetAttributesConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttributesConfig") if err != nil { return err } @@ -1616,17 +1553,7 @@ func (c *catalogRESTClient) UpdateAttributesConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttributesConfig") if err != nil { return err } @@ -1687,17 +1614,7 @@ func (c *catalogRESTClient) AddCatalogAttribute(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddCatalogAttribute") if err != nil { return err } @@ -1758,17 +1675,7 @@ func (c *catalogRESTClient) RemoveCatalogAttribute(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveCatalogAttribute") if err != nil { return err } @@ -1826,17 +1733,7 @@ func (c *catalogRESTClient) BatchRemoveCatalogAttributes(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRemoveCatalogAttributes") if err != nil { return err } @@ -1899,17 +1796,7 @@ func (c *catalogRESTClient) ReplaceCatalogAttribute(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceCatalogAttribute") if err != nil { return err } @@ -1959,17 +1846,7 @@ func (c *catalogRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2034,21 +1911,10 @@ func (c *catalogRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/catalog_client_example_go123_test.go b/retail/apiv2alpha/catalog_client_example_go123_test.go index 3b8f5ff97f35..c293a2d520be 100644 --- a/retail/apiv2alpha/catalog_client_example_go123_test.go +++ b/retail/apiv2alpha/catalog_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCatalogClient_ListCatalogs_all() { } for resp, err := range c.ListCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCatalogClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/completion_client.go b/retail/apiv2alpha/completion_client.go index 632398bc3b79..1ad88cc27d42 100755 --- a/retail/apiv2alpha/completion_client.go +++ b/retail/apiv2alpha/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -269,6 +268,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -298,6 +299,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: retailpb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -361,6 +363,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -381,6 +385,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -443,7 +448,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *retailpb. var resp *retailpb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *completionGRPCClient) ImportCompletionData(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionData, req, settings.GRPC, c.logger, "ImportCompletionData") return err }, opts...) if err != nil { @@ -481,7 +486,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -510,7 +515,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -596,17 +601,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -669,21 +664,10 @@ func (c *completionRESTClient) ImportCompletionData(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -734,17 +718,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -809,21 +783,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/completion_client_example_go123_test.go b/retail/apiv2alpha/completion_client_example_go123_test.go index c76034497efe..a84776e91243 100644 --- a/retail/apiv2alpha/completion_client_example_go123_test.go +++ b/retail/apiv2alpha/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/control_client.go b/retail/apiv2alpha/control_client.go index d30b4d52af91..a7e467c12d13 100755 --- a/retail/apiv2alpha/control_client.go +++ b/retail/apiv2alpha/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -229,6 +228,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -255,6 +256,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: retailpb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -302,6 +304,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -319,6 +323,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -371,7 +376,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *retailpb.Cre var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -403,7 +408,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *retailpb.Upd var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -421,7 +426,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *retailpb.GetCon var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -584,17 +589,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -644,15 +639,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -708,17 +696,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -768,17 +746,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *retailpb.GetCon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -844,21 +812,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -921,17 +878,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -996,21 +943,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/control_client_example_go123_test.go b/retail/apiv2alpha/control_client_example_go123_test.go index 632a1648e2d3..e19b162bbb06 100644 --- a/retail/apiv2alpha/control_client_example_go123_test.go +++ b/retail/apiv2alpha/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/generative_question_client.go b/retail/apiv2alpha/generative_question_client.go index 6ee370fc63c2..305d158217cf 100755 --- a/retail/apiv2alpha/generative_question_client.go +++ b/retail/apiv2alpha/generative_question_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -219,6 +218,8 @@ type generativeQuestionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenerativeQuestionClient creates a new generative question service client based on gRPC. @@ -245,6 +246,7 @@ func NewGenerativeQuestionClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, generativeQuestionClient: retailpb.NewGenerativeQuestionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -292,6 +294,8 @@ type generativeQuestionRESTClient struct { // Points back to the CallOptions field of the containing GenerativeQuestionClient CallOptions **GenerativeQuestionCallOptions + + logger *slog.Logger } // NewGenerativeQuestionRESTClient creates a new generative question service rest client. @@ -309,6 +313,7 @@ func NewGenerativeQuestionRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -361,7 +366,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionsFeatureConfig(ct var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -379,7 +384,7 @@ func (c *generativeQuestionGRPCClient) GetGenerativeQuestionsFeatureConfig(ctx c var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "GetGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -397,7 +402,7 @@ func (c *generativeQuestionGRPCClient) ListGenerativeQuestionConfigs(ctx context var resp *retailpb.ListGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.ListGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.ListGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "ListGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionConfig(ctx contex var resp *retailpb.GenerativeQuestionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionConfig") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *generativeQuestionGRPCClient) BatchUpdateGenerativeQuestionConfigs(ctx var resp *retailpb.BatchUpdateGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "BatchUpdateGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *generativeQuestionGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *generativeQuestionGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -554,17 +559,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionsFeatureConfig(ct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -615,17 +610,7 @@ func (c *generativeQuestionRESTClient) GetGenerativeQuestionsFeatureConfig(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -675,17 +660,7 @@ func (c *generativeQuestionRESTClient) ListGenerativeQuestionConfigs(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerativeQuestionConfigs") if err != nil { return err } @@ -749,17 +724,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionConfig(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionConfig") if err != nil { return err } @@ -815,17 +780,7 @@ func (c *generativeQuestionRESTClient) BatchUpdateGenerativeQuestionConfigs(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateGenerativeQuestionConfigs") if err != nil { return err } @@ -875,17 +830,7 @@ func (c *generativeQuestionRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -950,21 +895,10 @@ func (c *generativeQuestionRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/generative_question_client_example_go123_test.go b/retail/apiv2alpha/generative_question_client_example_go123_test.go index e85f8f2d2fef..d809d7b9a24c 100644 --- a/retail/apiv2alpha/generative_question_client_example_go123_test.go +++ b/retail/apiv2alpha/generative_question_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGenerativeQuestionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/helpers.go b/retail/apiv2alpha/helpers.go index f109b03b6c8e..4b0485f74073 100755 --- a/retail/apiv2alpha/helpers.go +++ b/retail/apiv2alpha/helpers.go @@ -18,10 +18,20 @@ package retail import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "retail.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/retail/apiv2alpha/merchant_center_account_link_client.go b/retail/apiv2alpha/merchant_center_account_link_client.go index 029d6a741607..5b79b8b5a06a 100755 --- a/retail/apiv2alpha/merchant_center_account_link_client.go +++ b/retail/apiv2alpha/merchant_center_account_link_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -225,6 +224,8 @@ type merchantCenterAccountLinkGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewMerchantCenterAccountLinkClient creates a new merchant center account link service client based on gRPC. @@ -251,6 +252,7 @@ func NewMerchantCenterAccountLinkClient(ctx context.Context, opts ...option.Clie connPool: connPool, merchantCenterAccountLinkClient: retailpb.NewMerchantCenterAccountLinkServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -314,6 +316,8 @@ type merchantCenterAccountLinkRESTClient struct { // Points back to the CallOptions field of the containing MerchantCenterAccountLinkClient CallOptions **MerchantCenterAccountLinkCallOptions + + logger *slog.Logger } // NewMerchantCenterAccountLinkRESTClient creates a new merchant center account link service rest client. @@ -331,6 +335,7 @@ func NewMerchantCenterAccountLinkRESTClient(ctx context.Context, opts ...option. endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -393,7 +398,7 @@ func (c *merchantCenterAccountLinkGRPCClient) ListMerchantCenterAccountLinks(ctx var resp *retailpb.ListMerchantCenterAccountLinksResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.merchantCenterAccountLinkClient.ListMerchantCenterAccountLinks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.merchantCenterAccountLinkClient.ListMerchantCenterAccountLinks, req, settings.GRPC, c.logger, "ListMerchantCenterAccountLinks") return err }, opts...) if err != nil { @@ -411,7 +416,7 @@ func (c *merchantCenterAccountLinkGRPCClient) CreateMerchantCenterAccountLink(ct var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.merchantCenterAccountLinkClient.CreateMerchantCenterAccountLink(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.merchantCenterAccountLinkClient.CreateMerchantCenterAccountLink, req, settings.GRPC, c.logger, "CreateMerchantCenterAccountLink") return err }, opts...) if err != nil { @@ -430,7 +435,7 @@ func (c *merchantCenterAccountLinkGRPCClient) DeleteMerchantCenterAccountLink(ct opts = append((*c.CallOptions).DeleteMerchantCenterAccountLink[0:len((*c.CallOptions).DeleteMerchantCenterAccountLink):len((*c.CallOptions).DeleteMerchantCenterAccountLink)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.merchantCenterAccountLinkClient.DeleteMerchantCenterAccountLink(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.merchantCenterAccountLinkClient.DeleteMerchantCenterAccountLink, req, settings.GRPC, c.logger, "DeleteMerchantCenterAccountLink") return err }, opts...) return err @@ -445,7 +450,7 @@ func (c *merchantCenterAccountLinkGRPCClient) GetOperation(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *merchantCenterAccountLinkGRPCClient) ListOperations(ctx context.Context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -535,17 +540,7 @@ func (c *merchantCenterAccountLinkRESTClient) ListMerchantCenterAccountLinks(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMerchantCenterAccountLinks") if err != nil { return err } @@ -602,21 +597,10 @@ func (c *merchantCenterAccountLinkRESTClient) CreateMerchantCenterAccountLink(ct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMerchantCenterAccountLink") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -668,15 +652,8 @@ func (c *merchantCenterAccountLinkRESTClient) DeleteMerchantCenterAccountLink(ct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMerchantCenterAccountLink") + return err }, opts...) } @@ -713,17 +690,7 @@ func (c *merchantCenterAccountLinkRESTClient) GetOperation(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -788,21 +755,10 @@ func (c *merchantCenterAccountLinkRESTClient) ListOperations(ctx context.Context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/merchant_center_account_link_client_example_go123_test.go b/retail/apiv2alpha/merchant_center_account_link_client_example_go123_test.go index f57d0843fe3e..7ed42e4a4ffe 100644 --- a/retail/apiv2alpha/merchant_center_account_link_client_example_go123_test.go +++ b/retail/apiv2alpha/merchant_center_account_link_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleMerchantCenterAccountLinkClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/model_client.go b/retail/apiv2alpha/model_client.go index 546af31d7f07..3596948d79a4 100755 --- a/retail/apiv2alpha/model_client.go +++ b/retail/apiv2alpha/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -471,6 +470,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -511,6 +512,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: retailpb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -574,6 +576,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -605,6 +609,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -667,7 +672,7 @@ func (c *modelGRPCClient) CreateModel(ctx context.Context, req *retailpb.CreateM var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *retailpb.GetModelRe var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *modelGRPCClient) PauseModel(ctx context.Context, req *retailpb.PauseMod var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.PauseModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.PauseModel, req, settings.GRPC, c.logger, "PauseModel") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *modelGRPCClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ResumeModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ResumeModel, req, settings.GRPC, c.logger, "ResumeModel") return err }, opts...) if err != nil { @@ -740,7 +745,7 @@ func (c *modelGRPCClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM opts = append((*c.CallOptions).DeleteModel[0:len((*c.CallOptions).DeleteModel):len((*c.CallOptions).DeleteModel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.modelClient.DeleteModel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.modelClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) return err @@ -766,7 +771,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *retailpb.ListMode } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *modelGRPCClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *modelGRPCClient) TuneModel(ctx context.Context, req *retailpb.TuneModel var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.TuneModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.TuneModel, req, settings.GRPC, c.logger, "TuneModel") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -936,21 +941,10 @@ func (c *modelRESTClient) CreateModel(ctx context.Context, req *retailpb.CreateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1001,17 +995,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *retailpb.GetModelRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -1067,17 +1051,7 @@ func (c *modelRESTClient) PauseModel(ctx context.Context, req *retailpb.PauseMod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseModel") if err != nil { return err } @@ -1133,17 +1107,7 @@ func (c *modelRESTClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeModel") if err != nil { return err } @@ -1190,15 +1154,8 @@ func (c *modelRESTClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") + return err }, opts...) } @@ -1247,21 +1204,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *retailpb.ListMode } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1341,17 +1287,7 @@ func (c *modelRESTClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModel") if err != nil { return err } @@ -1406,21 +1342,10 @@ func (c *modelRESTClient) TuneModel(ctx context.Context, req *retailpb.TuneModel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1471,17 +1396,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1546,21 +1461,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/model_client_example_go123_test.go b/retail/apiv2alpha/model_client_example_go123_test.go index 3272cbadbe16..65b3dda449d0 100644 --- a/retail/apiv2alpha/model_client_example_go123_test.go +++ b/retail/apiv2alpha/model_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/prediction_client.go b/retail/apiv2alpha/prediction_client.go index da3bf2cac4b9..9983aae2a3ec 100755 --- a/retail/apiv2alpha/prediction_client.go +++ b/retail/apiv2alpha/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -230,6 +231,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: retailpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -277,6 +279,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -294,6 +298,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -346,7 +351,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *retailpb.Predic var resp *retailpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -364,7 +369,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -393,7 +398,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -458,17 +463,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *retailpb.Predic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -518,17 +513,7 @@ func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -593,21 +578,10 @@ func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/prediction_client_example_go123_test.go b/retail/apiv2alpha/prediction_client_example_go123_test.go index 6bcf73f51b47..bd344d6a7876 100644 --- a/retail/apiv2alpha/prediction_client_example_go123_test.go +++ b/retail/apiv2alpha/prediction_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/product_client.go b/retail/apiv2alpha/product_client.go index c93932f4f5ed..f985d38a26f7 100755 --- a/retail/apiv2alpha/product_client.go +++ b/retail/apiv2alpha/product_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -837,6 +836,8 @@ type productGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProductClient creates a new product service client based on gRPC. @@ -864,6 +865,7 @@ func NewProductClient(ctx context.Context, opts ...option.ClientOption) (*Produc connPool: connPool, productClient: retailpb.NewProductServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -927,6 +929,8 @@ type productRESTClient struct { // Points back to the CallOptions field of the containing ProductClient CallOptions **ProductCallOptions + + logger *slog.Logger } // NewProductRESTClient creates a new product service rest client. @@ -945,6 +949,7 @@ func NewProductRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1007,7 +1012,7 @@ func (c *productGRPCClient) CreateProduct(ctx context.Context, req *retailpb.Cre var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.CreateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.CreateProduct, req, settings.GRPC, c.logger, "CreateProduct") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *productGRPCClient) GetProduct(ctx context.Context, req *retailpb.GetPro var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.GetProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.GetProduct, req, settings.GRPC, c.logger, "GetProduct") return err }, opts...) if err != nil { @@ -1054,7 +1059,7 @@ func (c *productGRPCClient) ListProducts(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -1089,7 +1094,7 @@ func (c *productGRPCClient) UpdateProduct(ctx context.Context, req *retailpb.Upd var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.UpdateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.UpdateProduct, req, settings.GRPC, c.logger, "UpdateProduct") return err }, opts...) if err != nil { @@ -1106,7 +1111,7 @@ func (c *productGRPCClient) DeleteProduct(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteProduct[0:len((*c.CallOptions).DeleteProduct):len((*c.CallOptions).DeleteProduct)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productClient.DeleteProduct(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productClient.DeleteProduct, req, settings.GRPC, c.logger, "DeleteProduct") return err }, opts...) return err @@ -1121,7 +1126,7 @@ func (c *productGRPCClient) PurgeProducts(ctx context.Context, req *retailpb.Pur var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.PurgeProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.PurgeProducts, req, settings.GRPC, c.logger, "PurgeProducts") return err }, opts...) if err != nil { @@ -1141,7 +1146,7 @@ func (c *productGRPCClient) ImportProducts(ctx context.Context, req *retailpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ImportProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ImportProducts, req, settings.GRPC, c.logger, "ImportProducts") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *productGRPCClient) ExportProducts(ctx context.Context, req *retailpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ExportProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ExportProducts, req, settings.GRPC, c.logger, "ExportProducts") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *productGRPCClient) SetInventory(ctx context.Context, req *retailpb.SetI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.SetInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.SetInventory, req, settings.GRPC, c.logger, "SetInventory") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *productGRPCClient) AddFulfillmentPlaces(ctx context.Context, req *retai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddFulfillmentPlaces, req, settings.GRPC, c.logger, "AddFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *productGRPCClient) RemoveFulfillmentPlaces(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveFulfillmentPlaces, req, settings.GRPC, c.logger, "RemoveFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1241,7 +1246,7 @@ func (c *productGRPCClient) AddLocalInventories(ctx context.Context, req *retail var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddLocalInventories, req, settings.GRPC, c.logger, "AddLocalInventories") return err }, opts...) if err != nil { @@ -1261,7 +1266,7 @@ func (c *productGRPCClient) RemoveLocalInventories(ctx context.Context, req *ret var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveLocalInventories, req, settings.GRPC, c.logger, "RemoveLocalInventories") return err }, opts...) if err != nil { @@ -1281,7 +1286,7 @@ func (c *productGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1310,7 +1315,7 @@ func (c *productGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1377,17 +1382,7 @@ func (c *productRESTClient) CreateProduct(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProduct") if err != nil { return err } @@ -1437,17 +1432,7 @@ func (c *productRESTClient) GetProduct(ctx context.Context, req *retailpb.GetPro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProduct") if err != nil { return err } @@ -1522,21 +1507,10 @@ func (c *productRESTClient) ListProducts(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1616,17 +1590,7 @@ func (c *productRESTClient) UpdateProduct(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProduct") if err != nil { return err } @@ -1676,15 +1640,8 @@ func (c *productRESTClient) DeleteProduct(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProduct") + return err }, opts...) } @@ -1742,21 +1699,10 @@ func (c *productRESTClient) PurgeProducts(ctx context.Context, req *retailpb.Pur httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1818,21 +1764,10 @@ func (c *productRESTClient) ImportProducts(ctx context.Context, req *retailpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1888,21 +1823,10 @@ func (c *productRESTClient) ExportProducts(ctx context.Context, req *retailpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2006,21 +1930,10 @@ func (c *productRESTClient) SetInventory(ctx context.Context, req *retailpb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInventory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2105,21 +2018,10 @@ func (c *productRESTClient) AddFulfillmentPlaces(ctx context.Context, req *retai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddFulfillmentPlaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2204,21 +2106,10 @@ func (c *productRESTClient) RemoveFulfillmentPlaces(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveFulfillmentPlaces") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2301,21 +2192,10 @@ func (c *productRESTClient) AddLocalInventories(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddLocalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2396,21 +2276,10 @@ func (c *productRESTClient) RemoveLocalInventories(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveLocalInventories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2461,17 +2330,7 @@ func (c *productRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2536,21 +2395,10 @@ func (c *productRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/product_client_example_go123_test.go b/retail/apiv2alpha/product_client_example_go123_test.go index b5f23e823c05..cd9a1c9797b4 100644 --- a/retail/apiv2alpha/product_client_example_go123_test.go +++ b/retail/apiv2alpha/product_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleProductClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleProductClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/project_client.go b/retail/apiv2alpha/project_client.go index f0266e53f4e0..7e054ecfad12 100755 --- a/retail/apiv2alpha/project_client.go +++ b/retail/apiv2alpha/project_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -463,6 +462,8 @@ type projectGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectClient creates a new project service client based on gRPC. @@ -489,6 +490,7 @@ func NewProjectClient(ctx context.Context, opts ...option.ClientOption) (*Projec connPool: connPool, projectClient: retailpb.NewProjectServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -552,6 +554,8 @@ type projectRESTClient struct { // Points back to the CallOptions field of the containing ProjectClient CallOptions **ProjectCallOptions + + logger *slog.Logger } // NewProjectRESTClient creates a new project service rest client. @@ -569,6 +573,7 @@ func NewProjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -631,7 +636,7 @@ func (c *projectGRPCClient) GetProject(ctx context.Context, req *retailpb.GetPro var resp *retailpb.Project err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.GetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.GetProject, req, settings.GRPC, c.logger, "GetProject") return err }, opts...) if err != nil { @@ -649,7 +654,7 @@ func (c *projectGRPCClient) AcceptTerms(ctx context.Context, req *retailpb.Accep var resp *retailpb.Project err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.AcceptTerms(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.AcceptTerms, req, settings.GRPC, c.logger, "AcceptTerms") return err }, opts...) if err != nil { @@ -667,7 +672,7 @@ func (c *projectGRPCClient) EnrollSolution(ctx context.Context, req *retailpb.En var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.EnrollSolution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.EnrollSolution, req, settings.GRPC, c.logger, "EnrollSolution") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *projectGRPCClient) ListEnrolledSolutions(ctx context.Context, req *reta var resp *retailpb.ListEnrolledSolutionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.ListEnrolledSolutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.ListEnrolledSolutions, req, settings.GRPC, c.logger, "ListEnrolledSolutions") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *projectGRPCClient) GetLoggingConfig(ctx context.Context, req *retailpb. var resp *retailpb.LoggingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.GetLoggingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.GetLoggingConfig, req, settings.GRPC, c.logger, "GetLoggingConfig") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *projectGRPCClient) UpdateLoggingConfig(ctx context.Context, req *retail var resp *retailpb.LoggingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.UpdateLoggingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.UpdateLoggingConfig, req, settings.GRPC, c.logger, "UpdateLoggingConfig") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *projectGRPCClient) GetAlertConfig(ctx context.Context, req *retailpb.Ge var resp *retailpb.AlertConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.GetAlertConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.GetAlertConfig, req, settings.GRPC, c.logger, "GetAlertConfig") return err }, opts...) if err != nil { @@ -759,7 +764,7 @@ func (c *projectGRPCClient) UpdateAlertConfig(ctx context.Context, req *retailpb var resp *retailpb.AlertConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.UpdateAlertConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.UpdateAlertConfig, req, settings.GRPC, c.logger, "UpdateAlertConfig") return err }, opts...) if err != nil { @@ -777,7 +782,7 @@ func (c *projectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *projectGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -868,17 +873,7 @@ func (c *projectRESTClient) GetProject(ctx context.Context, req *retailpb.GetPro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProject") if err != nil { return err } @@ -937,17 +932,7 @@ func (c *projectRESTClient) AcceptTerms(ctx context.Context, req *retailpb.Accep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AcceptTerms") if err != nil { return err } @@ -1009,21 +994,10 @@ func (c *projectRESTClient) EnrollSolution(ctx context.Context, req *retailpb.En httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnrollSolution") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1074,17 +1048,7 @@ func (c *projectRESTClient) ListEnrolledSolutions(ctx context.Context, req *reta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEnrolledSolutions") if err != nil { return err } @@ -1135,17 +1099,7 @@ func (c *projectRESTClient) GetLoggingConfig(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLoggingConfig") if err != nil { return err } @@ -1210,17 +1164,7 @@ func (c *projectRESTClient) UpdateLoggingConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLoggingConfig") if err != nil { return err } @@ -1271,17 +1215,7 @@ func (c *projectRESTClient) GetAlertConfig(ctx context.Context, req *retailpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAlertConfig") if err != nil { return err } @@ -1345,17 +1279,7 @@ func (c *projectRESTClient) UpdateAlertConfig(ctx context.Context, req *retailpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAlertConfig") if err != nil { return err } @@ -1405,17 +1329,7 @@ func (c *projectRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1480,21 +1394,10 @@ func (c *projectRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/project_client_example_go123_test.go b/retail/apiv2alpha/project_client_example_go123_test.go index 47d045fc2150..3176c98efce4 100644 --- a/retail/apiv2alpha/project_client_example_go123_test.go +++ b/retail/apiv2alpha/project_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/retailpb/analytics_service.pb.go b/retail/apiv2alpha/retailpb/analytics_service.pb.go index 0beacde40728..fc8aeffbc935 100755 --- a/retail/apiv2alpha/retailpb/analytics_service.pb.go +++ b/retail/apiv2alpha/retailpb/analytics_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/analytics_service.proto diff --git a/retail/apiv2alpha/retailpb/branch.pb.go b/retail/apiv2alpha/retailpb/branch.pb.go index 899d05f0faa5..dd09bece8e21 100755 --- a/retail/apiv2alpha/retailpb/branch.pb.go +++ b/retail/apiv2alpha/retailpb/branch.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/branch.proto @@ -184,11 +184,9 @@ type Branch struct { func (x *Branch) Reset() { *x = Branch{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Branch) String() string { @@ -199,7 +197,7 @@ func (*Branch) ProtoMessage() {} func (x *Branch) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +326,9 @@ type Branch_ProductCountStatistic struct { func (x *Branch_ProductCountStatistic) Reset() { *x = Branch_ProductCountStatistic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Branch_ProductCountStatistic) String() string { @@ -343,7 +339,7 @@ func (*Branch_ProductCountStatistic) ProtoMessage() {} func (x *Branch_ProductCountStatistic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +446,9 @@ type Branch_QualityMetric struct { func (x *Branch_QualityMetric) Reset() { *x = Branch_QualityMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Branch_QualityMetric) String() string { @@ -465,7 +459,7 @@ func (*Branch_QualityMetric) ProtoMessage() {} func (x *Branch_QualityMetric) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,44 +669,6 @@ func file_google_cloud_retail_v2alpha_branch_proto_init() { return } file_google_cloud_retail_v2alpha_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_branch_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Branch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_branch_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Branch_ProductCountStatistic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_branch_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Branch_QualityMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/branch_service.pb.go b/retail/apiv2alpha/retailpb/branch_service.pb.go index 70de885499aa..bd43bcdcb278 100755 --- a/retail/apiv2alpha/retailpb/branch_service.pb.go +++ b/retail/apiv2alpha/retailpb/branch_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/branch_service.proto @@ -60,11 +60,9 @@ type ListBranchesRequest struct { func (x *ListBranchesRequest) Reset() { *x = ListBranchesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBranchesRequest) String() string { @@ -75,7 +73,7 @@ func (*ListBranchesRequest) ProtoMessage() {} func (x *ListBranchesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type ListBranchesResponse struct { func (x *ListBranchesResponse) Reset() { *x = ListBranchesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBranchesResponse) String() string { @@ -133,7 +129,7 @@ func (*ListBranchesResponse) ProtoMessage() {} func (x *ListBranchesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +176,9 @@ type GetBranchRequest struct { func (x *GetBranchRequest) Reset() { *x = GetBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBranchRequest) String() string { @@ -195,7 +189,7 @@ func (*GetBranchRequest) ProtoMessage() {} func (x *GetBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,44 +346,6 @@ func file_google_cloud_retail_v2alpha_branch_service_proto_init() { return } file_google_cloud_retail_v2alpha_branch_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListBranchesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListBranchesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_branch_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/catalog.pb.go b/retail/apiv2alpha/retailpb/catalog.pb.go index e4a5ab4e2b54..c36ca5e6066e 100755 --- a/retail/apiv2alpha/retailpb/catalog.pb.go +++ b/retail/apiv2alpha/retailpb/catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/catalog.proto @@ -418,11 +418,9 @@ type ProductLevelConfig struct { func (x *ProductLevelConfig) Reset() { *x = ProductLevelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductLevelConfig) String() string { @@ -433,7 +431,7 @@ func (*ProductLevelConfig) ProtoMessage() {} func (x *ProductLevelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +562,9 @@ type CatalogAttribute struct { func (x *CatalogAttribute) Reset() { *x = CatalogAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute) String() string { @@ -579,7 +575,7 @@ func (*CatalogAttribute) ProtoMessage() {} func (x *CatalogAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +687,9 @@ type AttributesConfig struct { func (x *AttributesConfig) Reset() { *x = AttributesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributesConfig) String() string { @@ -706,7 +700,7 @@ func (*AttributesConfig) ProtoMessage() {} func (x *AttributesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +803,9 @@ type CompletionConfig struct { func (x *CompletionConfig) Reset() { *x = CompletionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionConfig) String() string { @@ -824,7 +816,7 @@ func (*CompletionConfig) ProtoMessage() {} func (x *CompletionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,11 +960,9 @@ type MerchantCenterLink struct { func (x *MerchantCenterLink) Reset() { *x = MerchantCenterLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterLink) String() string { @@ -983,7 +973,7 @@ func (*MerchantCenterLink) ProtoMessage() {} func (x *MerchantCenterLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1055,11 +1045,9 @@ type MerchantCenterFeedFilter struct { func (x *MerchantCenterFeedFilter) Reset() { *x = MerchantCenterFeedFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterFeedFilter) String() string { @@ -1070,7 +1058,7 @@ func (*MerchantCenterFeedFilter) ProtoMessage() {} func (x *MerchantCenterFeedFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1101,9 @@ type MerchantCenterLinkingConfig struct { func (x *MerchantCenterLinkingConfig) Reset() { *x = MerchantCenterLinkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterLinkingConfig) String() string { @@ -1128,7 +1114,7 @@ func (*MerchantCenterLinkingConfig) ProtoMessage() {} func (x *MerchantCenterLinkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1174,11 +1160,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -1189,7 +1173,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1275,11 +1259,9 @@ type CatalogAttribute_FacetConfig struct { func (x *CatalogAttribute_FacetConfig) Reset() { *x = CatalogAttribute_FacetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig) String() string { @@ -1290,7 +1272,7 @@ func (*CatalogAttribute_FacetConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1370,11 +1352,9 @@ type CatalogAttribute_FacetConfig_IgnoredFacetValues struct { func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) Reset() { *x = CatalogAttribute_FacetConfig_IgnoredFacetValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) String() string { @@ -1385,7 +1365,7 @@ func (*CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1423,9 @@ type CatalogAttribute_FacetConfig_MergedFacetValue struct { func (x *CatalogAttribute_FacetConfig_MergedFacetValue) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacetValue) String() string { @@ -1458,7 +1436,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacetValue) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1508,11 +1486,9 @@ type CatalogAttribute_FacetConfig_MergedFacet struct { func (x *CatalogAttribute_FacetConfig_MergedFacet) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacet) String() string { @@ -1523,7 +1499,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacet) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,11 +1545,9 @@ type CatalogAttribute_FacetConfig_RerankConfig struct { func (x *CatalogAttribute_FacetConfig_RerankConfig) Reset() { *x = CatalogAttribute_FacetConfig_RerankConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_RerankConfig) String() string { @@ -1584,7 +1558,7 @@ func (*CatalogAttribute_FacetConfig_RerankConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_RerankConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,164 +2018,6 @@ func file_google_cloud_retail_v2alpha_catalog_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductLevelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttributesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterFeedFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterLinkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_IgnoredFacetValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_RerankConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/catalog_service.pb.go b/retail/apiv2alpha/retailpb/catalog_service.pb.go index 782b22e7b15a..55cd63565e32 100755 --- a/retail/apiv2alpha/retailpb/catalog_service.pb.go +++ b/retail/apiv2alpha/retailpb/catalog_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/catalog_service.proto @@ -79,11 +79,9 @@ type ListCatalogsRequest struct { func (x *ListCatalogsRequest) Reset() { *x = ListCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsRequest) String() string { @@ -94,7 +92,7 @@ func (*ListCatalogsRequest) ProtoMessage() {} func (x *ListCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,11 +147,9 @@ type ListCatalogsResponse struct { func (x *ListCatalogsResponse) Reset() { *x = ListCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsResponse) String() string { @@ -164,7 +160,7 @@ func (*ListCatalogsResponse) ProtoMessage() {} func (x *ListCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +216,9 @@ type UpdateCatalogRequest struct { func (x *UpdateCatalogRequest) Reset() { *x = UpdateCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCatalogRequest) String() string { @@ -235,7 +229,7 @@ func (*UpdateCatalogRequest) ProtoMessage() {} func (x *UpdateCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type SetDefaultBranchRequest struct { func (x *SetDefaultBranchRequest) Reset() { *x = SetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultBranchRequest) String() string { @@ -312,7 +304,7 @@ func (*SetDefaultBranchRequest) ProtoMessage() {} func (x *SetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type GetDefaultBranchRequest struct { func (x *GetDefaultBranchRequest) Reset() { *x = GetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchRequest) String() string { @@ -383,7 +373,7 @@ func (*GetDefaultBranchRequest) ProtoMessage() {} func (x *GetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +414,9 @@ type GetDefaultBranchResponse struct { func (x *GetDefaultBranchResponse) Reset() { *x = GetDefaultBranchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchResponse) String() string { @@ -439,7 +427,7 @@ func (*GetDefaultBranchResponse) ProtoMessage() {} func (x *GetDefaultBranchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +478,9 @@ type GetCompletionConfigRequest struct { func (x *GetCompletionConfigRequest) Reset() { *x = GetCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompletionConfigRequest) String() string { @@ -505,7 +491,7 @@ func (*GetCompletionConfigRequest) ProtoMessage() {} func (x *GetCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +546,9 @@ type UpdateCompletionConfigRequest struct { func (x *UpdateCompletionConfigRequest) Reset() { *x = UpdateCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCompletionConfigRequest) String() string { @@ -575,7 +559,7 @@ func (*UpdateCompletionConfigRequest) ProtoMessage() {} func (x *UpdateCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +603,9 @@ type GetAttributesConfigRequest struct { func (x *GetAttributesConfigRequest) Reset() { *x = GetAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttributesConfigRequest) String() string { @@ -634,7 +616,7 @@ func (*GetAttributesConfigRequest) ProtoMessage() {} func (x *GetAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +661,9 @@ type UpdateAttributesConfigRequest struct { func (x *UpdateAttributesConfigRequest) Reset() { *x = UpdateAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttributesConfigRequest) String() string { @@ -694,7 +674,7 @@ func (*UpdateAttributesConfigRequest) ProtoMessage() {} func (x *UpdateAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +721,9 @@ type AddCatalogAttributeRequest struct { func (x *AddCatalogAttributeRequest) Reset() { *x = AddCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddCatalogAttributeRequest) String() string { @@ -756,7 +734,7 @@ func (*AddCatalogAttributeRequest) ProtoMessage() {} func (x *AddCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +781,9 @@ type RemoveCatalogAttributeRequest struct { func (x *RemoveCatalogAttributeRequest) Reset() { *x = RemoveCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveCatalogAttributeRequest) String() string { @@ -818,7 +794,7 @@ func (*RemoveCatalogAttributeRequest) ProtoMessage() {} func (x *RemoveCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +843,9 @@ type BatchRemoveCatalogAttributesRequest struct { func (x *BatchRemoveCatalogAttributesRequest) Reset() { *x = BatchRemoveCatalogAttributesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRemoveCatalogAttributesRequest) String() string { @@ -882,7 +856,7 @@ func (*BatchRemoveCatalogAttributesRequest) ProtoMessage() {} func (x *BatchRemoveCatalogAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -934,11 +908,9 @@ type BatchRemoveCatalogAttributesResponse struct { func (x *BatchRemoveCatalogAttributesResponse) Reset() { *x = BatchRemoveCatalogAttributesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRemoveCatalogAttributesResponse) String() string { @@ -949,7 +921,7 @@ func (*BatchRemoveCatalogAttributesResponse) ProtoMessage() {} func (x *BatchRemoveCatalogAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +976,9 @@ type ReplaceCatalogAttributeRequest struct { func (x *ReplaceCatalogAttributeRequest) Reset() { *x = ReplaceCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceCatalogAttributeRequest) String() string { @@ -1019,7 +989,7 @@ func (*ReplaceCatalogAttributeRequest) ProtoMessage() {} func (x *ReplaceCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1517,188 +1487,6 @@ func file_google_cloud_retail_v2alpha_catalog_service_proto_init() { return } file_google_cloud_retail_v2alpha_catalog_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RemoveCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchRemoveCatalogAttributesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchRemoveCatalogAttributesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_catalog_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/common.pb.go b/retail/apiv2alpha/retailpb/common.pb.go index 56a3f8171ea4..30a1ac79128d 100755 --- a/retail/apiv2alpha/retailpb/common.pb.go +++ b/retail/apiv2alpha/retailpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/common.proto @@ -285,11 +285,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -300,7 +298,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +368,9 @@ type Rule struct { func (x *Rule) Reset() { *x = Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule) String() string { @@ -385,7 +381,7 @@ func (*Rule) ProtoMessage() {} func (x *Rule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +593,9 @@ type Audience struct { func (x *Audience) Reset() { *x = Audience{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Audience) String() string { @@ -612,7 +606,7 @@ func (*Audience) ProtoMessage() {} func (x *Audience) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +672,9 @@ type ColorInfo struct { func (x *ColorInfo) Reset() { *x = ColorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColorInfo) String() string { @@ -693,7 +685,7 @@ func (*ColorInfo) ProtoMessage() {} func (x *ColorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +781,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -804,7 +794,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +880,9 @@ type FulfillmentInfo struct { func (x *FulfillmentInfo) Reset() { *x = FulfillmentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInfo) String() string { @@ -905,7 +893,7 @@ func (*FulfillmentInfo) ProtoMessage() {} func (x *FulfillmentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +954,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -981,7 +967,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,11 +1035,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -1064,7 +1048,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1229,9 @@ type PriceInfo struct { func (x *PriceInfo) Reset() { *x = PriceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo) String() string { @@ -1260,7 +1242,7 @@ func (*PriceInfo) ProtoMessage() {} func (x *PriceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1335,9 @@ type Rating struct { func (x *Rating) Reset() { *x = Rating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rating) String() string { @@ -1368,7 +1348,7 @@ func (*Rating) ProtoMessage() {} func (x *Rating) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1466,11 +1446,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -1481,7 +1459,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1562,9 @@ type LocalInventory struct { func (x *LocalInventory) Reset() { *x = LocalInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalInventory) String() string { @@ -1599,7 +1575,7 @@ func (*LocalInventory) ProtoMessage() {} func (x *LocalInventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1661,11 +1637,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -1676,7 +1650,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1720,11 +1694,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -1735,7 +1707,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,11 +1780,9 @@ type Rule_BoostAction struct { func (x *Rule_BoostAction) Reset() { *x = Rule_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_BoostAction) String() string { @@ -1823,7 +1793,7 @@ func (*Rule_BoostAction) ProtoMessage() {} func (x *Rule_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1895,11 +1865,9 @@ type Rule_FilterAction struct { func (x *Rule_FilterAction) Reset() { *x = Rule_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_FilterAction) String() string { @@ -1910,7 +1878,7 @@ func (*Rule_FilterAction) ProtoMessage() {} func (x *Rule_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1950,11 +1918,9 @@ type Rule_RedirectAction struct { func (x *Rule_RedirectAction) Reset() { *x = Rule_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RedirectAction) String() string { @@ -1965,7 +1931,7 @@ func (*Rule_RedirectAction) ProtoMessage() {} func (x *Rule_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2005,11 +1971,9 @@ type Rule_TwowaySynonymsAction struct { func (x *Rule_TwowaySynonymsAction) Reset() { *x = Rule_TwowaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_TwowaySynonymsAction) String() string { @@ -2020,7 +1984,7 @@ func (*Rule_TwowaySynonymsAction) ProtoMessage() {} func (x *Rule_TwowaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2067,11 +2031,9 @@ type Rule_OnewaySynonymsAction struct { func (x *Rule_OnewaySynonymsAction) Reset() { *x = Rule_OnewaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_OnewaySynonymsAction) String() string { @@ -2082,7 +2044,7 @@ func (*Rule_OnewaySynonymsAction) ProtoMessage() {} func (x *Rule_OnewaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2139,11 +2101,9 @@ type Rule_DoNotAssociateAction struct { func (x *Rule_DoNotAssociateAction) Reset() { *x = Rule_DoNotAssociateAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_DoNotAssociateAction) String() string { @@ -2154,7 +2114,7 @@ func (*Rule_DoNotAssociateAction) ProtoMessage() {} func (x *Rule_DoNotAssociateAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2210,11 +2170,9 @@ type Rule_ReplacementAction struct { func (x *Rule_ReplacementAction) Reset() { *x = Rule_ReplacementAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ReplacementAction) String() string { @@ -2225,7 +2183,7 @@ func (*Rule_ReplacementAction) ProtoMessage() {} func (x *Rule_ReplacementAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2274,11 +2232,9 @@ type Rule_IgnoreAction struct { func (x *Rule_IgnoreAction) Reset() { *x = Rule_IgnoreAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_IgnoreAction) String() string { @@ -2289,7 +2245,7 @@ func (*Rule_IgnoreAction) ProtoMessage() {} func (x *Rule_IgnoreAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2350,11 +2306,9 @@ type Rule_ForceReturnFacetAction struct { func (x *Rule_ForceReturnFacetAction) Reset() { *x = Rule_ForceReturnFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction) String() string { @@ -2365,7 +2319,7 @@ func (*Rule_ForceReturnFacetAction) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2419,11 +2373,9 @@ type Rule_RemoveFacetAction struct { func (x *Rule_RemoveFacetAction) Reset() { *x = Rule_RemoveFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RemoveFacetAction) String() string { @@ -2434,7 +2386,7 @@ func (*Rule_RemoveFacetAction) ProtoMessage() {} func (x *Rule_RemoveFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2474,11 +2426,9 @@ type Rule_ForceReturnFacetAction_FacetPositionAdjustment struct { func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) Reset() { *x = Rule_ForceReturnFacetAction_FacetPositionAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) String() string { @@ -2489,7 +2439,7 @@ func (*Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2545,11 +2495,9 @@ type PriceInfo_PriceRange struct { func (x *PriceInfo_PriceRange) Reset() { *x = PriceInfo_PriceRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo_PriceRange) String() string { @@ -2560,7 +2508,7 @@ func (*PriceInfo_PriceRange) ProtoMessage() {} func (x *PriceInfo_PriceRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_common_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3006,320 +2954,6 @@ func file_google_cloud_retail_v2alpha_common_proto_init() { if File_google_cloud_retail_v2alpha_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Audience); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ColorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Rating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LocalInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Rule_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Rule_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Rule_TwowaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Rule_OnewaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Rule_DoNotAssociateAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ReplacementAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Rule_IgnoreAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RemoveFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction_FacetPositionAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_common_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo_PriceRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_common_proto_msgTypes[1].OneofWrappers = []any{ (*Rule_BoostAction_)(nil), (*Rule_RedirectAction_)(nil), diff --git a/retail/apiv2alpha/retailpb/completion_service.pb.go b/retail/apiv2alpha/retailpb/completion_service.pb.go index 6ce08b9612a1..dad281ce8e2f 100755 --- a/retail/apiv2alpha/retailpb/completion_service.pb.go +++ b/retail/apiv2alpha/retailpb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/completion_service.proto @@ -127,11 +127,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -142,7 +140,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +269,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -286,7 +282,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +360,9 @@ type CompleteQueryResponse_CompletionResult struct { func (x *CompleteQueryResponse_CompletionResult) Reset() { *x = CompleteQueryResponse_CompletionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_CompletionResult) String() string { @@ -379,7 +373,7 @@ func (*CompleteQueryResponse_CompletionResult) ProtoMessage() {} func (x *CompleteQueryResponse_CompletionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +430,9 @@ type CompleteQueryResponse_RecentSearchResult struct { func (x *CompleteQueryResponse_RecentSearchResult) Reset() { *x = CompleteQueryResponse_RecentSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_RecentSearchResult) String() string { @@ -451,7 +443,7 @@ func (*CompleteQueryResponse_RecentSearchResult) ProtoMessage() {} func (x *CompleteQueryResponse_RecentSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +477,9 @@ type CompleteQueryResponse_AttributeResult struct { func (x *CompleteQueryResponse_AttributeResult) Reset() { *x = CompleteQueryResponse_AttributeResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_AttributeResult) String() string { @@ -500,7 +490,7 @@ func (*CompleteQueryResponse_AttributeResult) ProtoMessage() {} func (x *CompleteQueryResponse_AttributeResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,68 +737,6 @@ func file_google_cloud_retail_v2alpha_completion_service_proto_init() { file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_import_config_proto_init() file_google_cloud_retail_v2alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_CompletionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_RecentSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_completion_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_AttributeResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/control.pb.go b/retail/apiv2alpha/retailpb/control.pb.go index 69c354300dd5..589c57011b98 100755 --- a/retail/apiv2alpha/retailpb/control.pb.go +++ b/retail/apiv2alpha/retailpb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/control.proto @@ -91,11 +91,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -106,7 +104,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,20 +312,6 @@ func file_google_cloud_retail_v2alpha_control_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_control_proto_msgTypes[0].OneofWrappers = []any{ (*Control_FacetSpec)(nil), (*Control_Rule)(nil), diff --git a/retail/apiv2alpha/retailpb/control_service.pb.go b/retail/apiv2alpha/retailpb/control_service.pb.go index 160de5fb6c5f..052191e88072 100755 --- a/retail/apiv2alpha/retailpb/control_service.pb.go +++ b/retail/apiv2alpha/retailpb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/control_service.proto @@ -63,11 +63,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -256,7 +248,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +296,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -319,7 +309,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +366,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -391,7 +379,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,80 +617,6 @@ func file_google_cloud_retail_v2alpha_control_service_proto_init() { return } file_google_cloud_retail_v2alpha_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/export_config.pb.go b/retail/apiv2alpha/retailpb/export_config.pb.go index e82e8d8d0446..bc66cc8454a8 100755 --- a/retail/apiv2alpha/retailpb/export_config.pb.go +++ b/retail/apiv2alpha/retailpb/export_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/export_config.proto @@ -55,11 +55,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -70,7 +68,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type ExportErrorsConfig struct { func (x *ExportErrorsConfig) Reset() { *x = ExportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportErrorsConfig) String() string { @@ -155,7 +151,7 @@ func (*ExportErrorsConfig) ProtoMessage() {} func (x *ExportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ExportProductsRequest struct { func (x *ExportProductsRequest) Reset() { *x = ExportProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportProductsRequest) String() string { @@ -275,7 +269,7 @@ func (*ExportProductsRequest) ProtoMessage() {} func (x *ExportProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +358,9 @@ type ExportUserEventsRequest struct { func (x *ExportUserEventsRequest) Reset() { *x = ExportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportUserEventsRequest) String() string { @@ -379,7 +371,7 @@ func (*ExportUserEventsRequest) ProtoMessage() {} func (x *ExportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -448,11 +440,9 @@ type ExportAnalyticsMetricsRequest struct { func (x *ExportAnalyticsMetricsRequest) Reset() { *x = ExportAnalyticsMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsRequest) String() string { @@ -463,7 +453,7 @@ func (*ExportAnalyticsMetricsRequest) ProtoMessage() {} func (x *ExportAnalyticsMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -515,11 +505,9 @@ type ExportMetadata struct { func (x *ExportMetadata) Reset() { *x = ExportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadata) String() string { @@ -530,7 +518,7 @@ func (*ExportMetadata) ProtoMessage() {} func (x *ExportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +565,9 @@ type ExportProductsResponse struct { func (x *ExportProductsResponse) Reset() { *x = ExportProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportProductsResponse) String() string { @@ -592,7 +578,7 @@ func (*ExportProductsResponse) ProtoMessage() {} func (x *ExportProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +632,9 @@ type ExportUserEventsResponse struct { func (x *ExportUserEventsResponse) Reset() { *x = ExportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportUserEventsResponse) String() string { @@ -661,7 +645,7 @@ func (*ExportUserEventsResponse) ProtoMessage() {} func (x *ExportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -715,11 +699,9 @@ type ExportAnalyticsMetricsResponse struct { func (x *ExportAnalyticsMetricsResponse) Reset() { *x = ExportAnalyticsMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsResponse) String() string { @@ -730,7 +712,7 @@ func (*ExportAnalyticsMetricsResponse) ProtoMessage() {} func (x *ExportAnalyticsMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +763,9 @@ type OutputResult struct { func (x *OutputResult) Reset() { *x = OutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputResult) String() string { @@ -796,7 +776,7 @@ func (*OutputResult) ProtoMessage() {} func (x *OutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +819,9 @@ type BigQueryOutputResult struct { func (x *BigQueryOutputResult) Reset() { *x = BigQueryOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryOutputResult) String() string { @@ -854,7 +832,7 @@ func (*BigQueryOutputResult) ProtoMessage() {} func (x *BigQueryOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +873,9 @@ type GcsOutputResult struct { func (x *GcsOutputResult) Reset() { *x = GcsOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputResult) String() string { @@ -910,7 +886,7 @@ func (*GcsOutputResult) ProtoMessage() {} func (x *GcsOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +926,9 @@ type OutputConfig_GcsDestination struct { func (x *OutputConfig_GcsDestination) Reset() { *x = OutputConfig_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_GcsDestination) String() string { @@ -965,7 +939,7 @@ func (*OutputConfig_GcsDestination) ProtoMessage() {} func (x *OutputConfig_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +980,9 @@ type OutputConfig_BigQueryDestination struct { func (x *OutputConfig_BigQueryDestination) Reset() { *x = OutputConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_BigQueryDestination) String() string { @@ -1021,7 +993,7 @@ func (*OutputConfig_BigQueryDestination) ProtoMessage() {} func (x *OutputConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,176 +1268,6 @@ func file_google_cloud_retail_v2alpha_export_config_proto_init() { if File_google_cloud_retail_v2alpha_export_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_export_config_proto_msgTypes[0].OneofWrappers = []any{ (*OutputConfig_GcsDestination_)(nil), (*OutputConfig_BigqueryDestination)(nil), diff --git a/retail/apiv2alpha/retailpb/generative_question.pb.go b/retail/apiv2alpha/retailpb/generative_question.pb.go index a1238991a842..08ff180047bf 100755 --- a/retail/apiv2alpha/retailpb/generative_question.pb.go +++ b/retail/apiv2alpha/retailpb/generative_question.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/generative_question.proto @@ -56,11 +56,9 @@ type GenerativeQuestionsFeatureConfig struct { func (x *GenerativeQuestionsFeatureConfig) Reset() { *x = GenerativeQuestionsFeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionsFeatureConfig) String() string { @@ -71,7 +69,7 @@ func (*GenerativeQuestionsFeatureConfig) ProtoMessage() {} func (x *GenerativeQuestionsFeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type GenerativeQuestionConfig struct { func (x *GenerativeQuestionConfig) Reset() { *x = GenerativeQuestionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionConfig) String() string { @@ -149,7 +145,7 @@ func (*GenerativeQuestionConfig) ProtoMessage() {} func (x *GenerativeQuestionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,32 +296,6 @@ func file_google_cloud_retail_v2alpha_generative_question_proto_init() { if File_google_cloud_retail_v2alpha_generative_question_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionsFeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/generative_question_service.pb.go b/retail/apiv2alpha/retailpb/generative_question_service.pb.go index d30feaec47c3..253dfff04edc 100755 --- a/retail/apiv2alpha/retailpb/generative_question_service.pb.go +++ b/retail/apiv2alpha/retailpb/generative_question_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/generative_question_service.proto @@ -57,11 +57,9 @@ type UpdateGenerativeQuestionsFeatureConfigRequest struct { func (x *UpdateGenerativeQuestionsFeatureConfigRequest) Reset() { *x = UpdateGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionsFeatureConfigRequest) String() string { @@ -72,7 +70,7 @@ func (*UpdateGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type GetGenerativeQuestionsFeatureConfigRequest struct { func (x *GetGenerativeQuestionsFeatureConfigRequest) Reset() { *x = GetGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGenerativeQuestionsFeatureConfigRequest) String() string { @@ -129,7 +125,7 @@ func (*GetGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *GetGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +160,9 @@ type ListGenerativeQuestionConfigsRequest struct { func (x *ListGenerativeQuestionConfigsRequest) Reset() { *x = ListGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsRequest) String() string { @@ -179,7 +173,7 @@ func (*ListGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type ListGenerativeQuestionConfigsResponse struct { func (x *ListGenerativeQuestionConfigsResponse) Reset() { *x = ListGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsResponse) String() string { @@ -228,7 +220,7 @@ func (*ListGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +262,9 @@ type UpdateGenerativeQuestionConfigRequest struct { func (x *UpdateGenerativeQuestionConfigRequest) Reset() { *x = UpdateGenerativeQuestionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionConfigRequest) String() string { @@ -285,7 +275,7 @@ func (*UpdateGenerativeQuestionConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +319,9 @@ type BatchUpdateGenerativeQuestionConfigsRequest struct { func (x *BatchUpdateGenerativeQuestionConfigsRequest) Reset() { *x = BatchUpdateGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsRequest) String() string { @@ -344,7 +332,7 @@ func (*BatchUpdateGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +373,9 @@ type BatchUpdateGenerativeQuestionConfigsResponse struct { func (x *BatchUpdateGenerativeQuestionConfigsResponse) Reset() { *x = BatchUpdateGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsResponse) String() string { @@ -400,7 +386,7 @@ func (*BatchUpdateGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -700,92 +686,6 @@ func file_google_cloud_retail_v2alpha_generative_question_service_proto_init() { return } file_google_cloud_retail_v2alpha_generative_question_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_generative_question_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/import_config.pb.go b/retail/apiv2alpha/retailpb/import_config.pb.go index 03fba5ff6247..0a40f0f4eca6 100755 --- a/retail/apiv2alpha/retailpb/import_config.pb.go +++ b/retail/apiv2alpha/retailpb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/import_config.proto @@ -142,11 +142,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -157,7 +155,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +243,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -260,7 +256,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type ProductInlineSource struct { func (x *ProductInlineSource) Reset() { *x = ProductInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInlineSource) String() string { @@ -367,7 +361,7 @@ func (*ProductInlineSource) ProtoMessage() {} func (x *ProductInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +395,9 @@ type UserEventInlineSource struct { func (x *UserEventInlineSource) Reset() { *x = UserEventInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInlineSource) String() string { @@ -416,7 +408,7 @@ func (*UserEventInlineSource) ProtoMessage() {} func (x *UserEventInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +446,9 @@ type ImportErrorsConfig struct { func (x *ImportErrorsConfig) Reset() { *x = ImportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorsConfig) String() string { @@ -469,7 +459,7 @@ func (*ImportErrorsConfig) ProtoMessage() {} func (x *ImportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -569,11 +559,9 @@ type ImportProductsRequest struct { func (x *ImportProductsRequest) Reset() { *x = ImportProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsRequest) String() string { @@ -584,7 +572,7 @@ func (*ImportProductsRequest) ProtoMessage() {} func (x *ImportProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +661,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -688,7 +674,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -746,11 +732,9 @@ type ImportCompletionDataRequest struct { func (x *ImportCompletionDataRequest) Reset() { *x = ImportCompletionDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataRequest) String() string { @@ -761,7 +745,7 @@ func (*ImportCompletionDataRequest) ProtoMessage() {} func (x *ImportCompletionDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -815,11 +799,9 @@ type ProductInputConfig struct { func (x *ProductInputConfig) Reset() { *x = ProductInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInputConfig) String() string { @@ -830,7 +812,7 @@ func (*ProductInputConfig) ProtoMessage() {} func (x *ProductInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +898,9 @@ type UserEventInputConfig struct { func (x *UserEventInputConfig) Reset() { *x = UserEventInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInputConfig) String() string { @@ -931,7 +911,7 @@ func (*UserEventInputConfig) ProtoMessage() {} func (x *UserEventInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,11 +1003,9 @@ type CompletionDataInputConfig struct { func (x *CompletionDataInputConfig) Reset() { *x = CompletionDataInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDataInputConfig) String() string { @@ -1038,7 +1016,7 @@ func (*CompletionDataInputConfig) ProtoMessage() {} func (x *CompletionDataInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1114,11 +1092,9 @@ type ImportMetadata struct { func (x *ImportMetadata) Reset() { *x = ImportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMetadata) String() string { @@ -1129,7 +1105,7 @@ func (*ImportMetadata) ProtoMessage() {} func (x *ImportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1209,11 +1185,9 @@ type TransformedUserEventsMetadata struct { func (x *TransformedUserEventsMetadata) Reset() { *x = TransformedUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransformedUserEventsMetadata) String() string { @@ -1224,7 +1198,7 @@ func (*TransformedUserEventsMetadata) ProtoMessage() {} func (x *TransformedUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1270,11 +1244,9 @@ type ImportProductsResponse struct { func (x *ImportProductsResponse) Reset() { *x = ImportProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsResponse) String() string { @@ -1285,7 +1257,7 @@ func (*ImportProductsResponse) ProtoMessage() {} func (x *ImportProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1333,11 +1305,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1348,7 +1318,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1370,9 @@ type UserEventImportSummary struct { func (x *UserEventImportSummary) Reset() { *x = UserEventImportSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventImportSummary) String() string { @@ -1415,7 +1383,7 @@ func (*UserEventImportSummary) ProtoMessage() {} func (x *UserEventImportSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1459,11 +1427,9 @@ type ImportCompletionDataResponse struct { func (x *ImportCompletionDataResponse) Reset() { *x = ImportCompletionDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataResponse) String() string { @@ -1474,7 +1440,7 @@ func (*ImportCompletionDataResponse) ProtoMessage() {} func (x *ImportCompletionDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1856,212 +1822,6 @@ func file_google_cloud_retail_v2alpha_import_config_proto_init() { } file_google_cloud_retail_v2alpha_product_proto_init() file_google_cloud_retail_v2alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProductInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ProductInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDataInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TransformedUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UserEventImportSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/retail/apiv2alpha/retailpb/merchant_center_account_link.pb.go b/retail/apiv2alpha/retailpb/merchant_center_account_link.pb.go index b96763596699..ee5e6ec68100 100755 --- a/retail/apiv2alpha/retailpb/merchant_center_account_link.pb.go +++ b/retail/apiv2alpha/retailpb/merchant_center_account_link.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/merchant_center_account_link.proto @@ -156,11 +156,9 @@ type MerchantCenterAccountLink struct { func (x *MerchantCenterAccountLink) Reset() { *x = MerchantCenterAccountLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterAccountLink) String() string { @@ -171,7 +169,7 @@ func (*MerchantCenterAccountLink) ProtoMessage() {} func (x *MerchantCenterAccountLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +269,9 @@ type CreateMerchantCenterAccountLinkMetadata struct { func (x *CreateMerchantCenterAccountLinkMetadata) Reset() { *x = CreateMerchantCenterAccountLinkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMerchantCenterAccountLinkMetadata) String() string { @@ -286,7 +282,7 @@ func (*CreateMerchantCenterAccountLinkMetadata) ProtoMessage() {} func (x *CreateMerchantCenterAccountLinkMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +326,9 @@ type MerchantCenterAccountLink_MerchantCenterFeedFilter struct { func (x *MerchantCenterAccountLink_MerchantCenterFeedFilter) Reset() { *x = MerchantCenterAccountLink_MerchantCenterFeedFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterAccountLink_MerchantCenterFeedFilter) String() string { @@ -345,7 +339,7 @@ func (*MerchantCenterAccountLink_MerchantCenterFeedFilter) ProtoMessage() {} func (x *MerchantCenterAccountLink_MerchantCenterFeedFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,44 +503,6 @@ func file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_init() if File_google_cloud_retail_v2alpha_merchant_center_account_link_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterAccountLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateMerchantCenterAccountLinkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterAccountLink_MerchantCenterFeedFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/merchant_center_account_link_service.pb.go b/retail/apiv2alpha/retailpb/merchant_center_account_link_service.pb.go index e15371d538c8..e1d304697f26 100755 --- a/retail/apiv2alpha/retailpb/merchant_center_account_link_service.pb.go +++ b/retail/apiv2alpha/retailpb/merchant_center_account_link_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/merchant_center_account_link_service.proto @@ -58,11 +58,9 @@ type ListMerchantCenterAccountLinksRequest struct { func (x *ListMerchantCenterAccountLinksRequest) Reset() { *x = ListMerchantCenterAccountLinksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMerchantCenterAccountLinksRequest) String() string { @@ -73,7 +71,7 @@ func (*ListMerchantCenterAccountLinksRequest) ProtoMessage() {} func (x *ListMerchantCenterAccountLinksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type ListMerchantCenterAccountLinksResponse struct { func (x *ListMerchantCenterAccountLinksResponse) Reset() { *x = ListMerchantCenterAccountLinksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMerchantCenterAccountLinksResponse) String() string { @@ -124,7 +120,7 @@ func (*ListMerchantCenterAccountLinksResponse) ProtoMessage() {} func (x *ListMerchantCenterAccountLinksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +167,9 @@ type CreateMerchantCenterAccountLinkRequest struct { func (x *CreateMerchantCenterAccountLinkRequest) Reset() { *x = CreateMerchantCenterAccountLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMerchantCenterAccountLinkRequest) String() string { @@ -186,7 +180,7 @@ func (*CreateMerchantCenterAccountLinkRequest) ProtoMessage() {} func (x *CreateMerchantCenterAccountLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type DeleteMerchantCenterAccountLinkRequest struct { func (x *DeleteMerchantCenterAccountLinkRequest) Reset() { *x = DeleteMerchantCenterAccountLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMerchantCenterAccountLinkRequest) String() string { @@ -245,7 +237,7 @@ func (*DeleteMerchantCenterAccountLinkRequest) ProtoMessage() {} func (x *DeleteMerchantCenterAccountLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,56 +448,6 @@ func file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto return } file_google_cloud_retail_v2alpha_merchant_center_account_link_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListMerchantCenterAccountLinksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListMerchantCenterAccountLinksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateMerchantCenterAccountLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_merchant_center_account_link_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMerchantCenterAccountLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/model.pb.go b/retail/apiv2alpha/retailpb/model.pb.go index 2a71a1933df2..3118e7293838 100755 --- a/retail/apiv2alpha/retailpb/model.pb.go +++ b/retail/apiv2alpha/retailpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/model.proto @@ -629,11 +629,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -644,7 +642,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -834,11 +832,9 @@ type Model_PageOptimizationConfig struct { func (x *Model_PageOptimizationConfig) Reset() { *x = Model_PageOptimizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_PageOptimizationConfig) String() string { @@ -849,7 +845,7 @@ func (*Model_PageOptimizationConfig) ProtoMessage() {} func (x *Model_PageOptimizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +895,9 @@ type Model_ServingConfigList struct { func (x *Model_ServingConfigList) Reset() { *x = Model_ServingConfigList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ServingConfigList) String() string { @@ -914,7 +908,7 @@ func (*Model_ServingConfigList) ProtoMessage() {} func (x *Model_ServingConfigList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -951,11 +945,9 @@ type Model_FrequentlyBoughtTogetherFeaturesConfig struct { func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) Reset() { *x = Model_FrequentlyBoughtTogetherFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) String() string { @@ -966,7 +958,7 @@ func (*Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoMessage() {} func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +996,9 @@ type Model_ModelFeaturesConfig struct { func (x *Model_ModelFeaturesConfig) Reset() { *x = Model_ModelFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ModelFeaturesConfig) String() string { @@ -1019,7 +1009,7 @@ func (*Model_ModelFeaturesConfig) ProtoMessage() {} func (x *Model_ModelFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1083,11 +1073,9 @@ type Model_PageOptimizationConfig_Candidate struct { func (x *Model_PageOptimizationConfig_Candidate) Reset() { *x = Model_PageOptimizationConfig_Candidate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_PageOptimizationConfig_Candidate) String() string { @@ -1098,7 +1086,7 @@ func (*Model_PageOptimizationConfig_Candidate) ProtoMessage() {} func (x *Model_PageOptimizationConfig_Candidate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,11 +1150,9 @@ type Model_PageOptimizationConfig_Panel struct { func (x *Model_PageOptimizationConfig_Panel) Reset() { *x = Model_PageOptimizationConfig_Panel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_PageOptimizationConfig_Panel) String() string { @@ -1177,7 +1163,7 @@ func (*Model_PageOptimizationConfig_Panel) ProtoMessage() {} func (x *Model_PageOptimizationConfig_Panel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1228,11 +1214,9 @@ type Model_ModelFeaturesConfig_LlmEmbeddingConfig struct { func (x *Model_ModelFeaturesConfig_LlmEmbeddingConfig) Reset() { *x = Model_ModelFeaturesConfig_LlmEmbeddingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ModelFeaturesConfig_LlmEmbeddingConfig) String() string { @@ -1243,7 +1227,7 @@ func (*Model_ModelFeaturesConfig_LlmEmbeddingConfig) ProtoMessage() {} func (x *Model_ModelFeaturesConfig_LlmEmbeddingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,104 +1553,6 @@ func file_google_cloud_retail_v2alpha_model_proto_init() { return } file_google_cloud_retail_v2alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Model_PageOptimizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Model_ServingConfigList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Model_FrequentlyBoughtTogetherFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Model_ModelFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Model_PageOptimizationConfig_Candidate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Model_PageOptimizationConfig_Panel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Model_ModelFeaturesConfig_LlmEmbeddingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_model_proto_msgTypes[0].OneofWrappers = []any{ (*Model_PageOptimizationConfig_)(nil), } diff --git a/retail/apiv2alpha/retailpb/model_service.pb.go b/retail/apiv2alpha/retailpb/model_service.pb.go index 5a5057188df2..fad459a47a43 100755 --- a/retail/apiv2alpha/retailpb/model_service.pb.go +++ b/retail/apiv2alpha/retailpb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/model_service.proto @@ -62,11 +62,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -77,7 +75,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -144,7 +140,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +183,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -202,7 +196,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +232,9 @@ type PauseModelRequest struct { func (x *PauseModelRequest) Reset() { *x = PauseModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseModelRequest) String() string { @@ -253,7 +245,7 @@ func (*PauseModelRequest) ProtoMessage() {} func (x *PauseModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +281,9 @@ type ResumeModelRequest struct { func (x *ResumeModelRequest) Reset() { *x = ResumeModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeModelRequest) String() string { @@ -304,7 +294,7 @@ func (*ResumeModelRequest) ProtoMessage() {} func (x *ResumeModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +336,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -361,7 +349,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +399,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -426,7 +412,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +448,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -477,7 +461,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +505,9 @@ type TuneModelRequest struct { func (x *TuneModelRequest) Reset() { *x = TuneModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelRequest) String() string { @@ -536,7 +518,7 @@ func (*TuneModelRequest) ProtoMessage() {} func (x *TuneModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +554,9 @@ type CreateModelMetadata struct { func (x *CreateModelMetadata) Reset() { *x = CreateModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMetadata) String() string { @@ -587,7 +567,7 @@ func (*CreateModelMetadata) ProtoMessage() {} func (x *CreateModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +603,9 @@ type TuneModelMetadata struct { func (x *TuneModelMetadata) Reset() { *x = TuneModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelMetadata) String() string { @@ -638,7 +616,7 @@ func (*TuneModelMetadata) ProtoMessage() {} func (x *TuneModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +647,9 @@ type TuneModelResponse struct { func (x *TuneModelResponse) Reset() { *x = TuneModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelResponse) String() string { @@ -684,7 +660,7 @@ func (*TuneModelResponse) ProtoMessage() {} func (x *TuneModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,152 +956,6 @@ func file_google_cloud_retail_v2alpha_model_service_proto_init() { return } file_google_cloud_retail_v2alpha_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PauseModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResumeModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_model_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/prediction_service.pb.go b/retail/apiv2alpha/retailpb/prediction_service.pb.go index d86ab9538667..7c37d7216a62 100755 --- a/retail/apiv2alpha/retailpb/prediction_service.pb.go +++ b/retail/apiv2alpha/retailpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/prediction_service.proto @@ -181,11 +181,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -196,7 +194,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +288,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -305,7 +301,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type PredictResponse_PredictionResult struct { func (x *PredictResponse_PredictionResult) Reset() { *x = PredictResponse_PredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse_PredictionResult) String() string { @@ -384,7 +378,7 @@ func (*PredictResponse_PredictionResult) ProtoMessage() {} func (x *PredictResponse_PredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,44 +577,6 @@ func file_google_cloud_retail_v2alpha_prediction_service_proto_init() { return } file_google_cloud_retail_v2alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse_PredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/product.pb.go b/retail/apiv2alpha/retailpb/product.pb.go index 395ef1e807ee..37ca58a1067a 100755 --- a/retail/apiv2alpha/retailpb/product.pb.go +++ b/retail/apiv2alpha/retailpb/product.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/product.proto @@ -607,11 +607,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -622,7 +620,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1198,20 +1196,6 @@ func file_google_cloud_retail_v2alpha_product_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_promotion_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_product_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_product_proto_msgTypes[0].OneofWrappers = []any{ (*Product_ExpireTime)(nil), (*Product_Ttl)(nil), diff --git a/retail/apiv2alpha/retailpb/product_service.pb.go b/retail/apiv2alpha/retailpb/product_service.pb.go index 20f5e40b6c75..4daad893c30f 100755 --- a/retail/apiv2alpha/retailpb/product_service.pb.go +++ b/retail/apiv2alpha/retailpb/product_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/product_service.proto @@ -77,11 +77,9 @@ type CreateProductRequest struct { func (x *CreateProductRequest) Reset() { *x = CreateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProductRequest) String() string { @@ -92,7 +90,7 @@ func (*CreateProductRequest) ProtoMessage() {} func (x *CreateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type GetProductRequest struct { func (x *GetProductRequest) Reset() { *x = GetProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductRequest) String() string { @@ -166,7 +162,7 @@ func (*GetProductRequest) ProtoMessage() {} func (x *GetProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +224,9 @@ type UpdateProductRequest struct { func (x *UpdateProductRequest) Reset() { *x = UpdateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProductRequest) String() string { @@ -243,7 +237,7 @@ func (*UpdateProductRequest) ProtoMessage() {} func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,11 +317,9 @@ type DeleteProductRequest struct { func (x *DeleteProductRequest) Reset() { *x = DeleteProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductRequest) String() string { @@ -338,7 +330,7 @@ func (*DeleteProductRequest) ProtoMessage() {} func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +459,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -482,7 +472,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +561,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -586,7 +574,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +700,9 @@ type SetInventoryRequest struct { func (x *SetInventoryRequest) Reset() { *x = SetInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryRequest) String() string { @@ -727,7 +713,7 @@ func (*SetInventoryRequest) ProtoMessage() {} func (x *SetInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -782,11 +768,9 @@ type SetInventoryMetadata struct { func (x *SetInventoryMetadata) Reset() { *x = SetInventoryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryMetadata) String() string { @@ -797,7 +781,7 @@ func (*SetInventoryMetadata) ProtoMessage() {} func (x *SetInventoryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +808,9 @@ type SetInventoryResponse struct { func (x *SetInventoryResponse) Reset() { *x = SetInventoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryResponse) String() string { @@ -839,7 +821,7 @@ func (*SetInventoryResponse) ProtoMessage() {} func (x *SetInventoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -922,11 +904,9 @@ type AddFulfillmentPlacesRequest struct { func (x *AddFulfillmentPlacesRequest) Reset() { *x = AddFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesRequest) String() string { @@ -937,7 +917,7 @@ func (*AddFulfillmentPlacesRequest) ProtoMessage() {} func (x *AddFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +979,9 @@ type AddFulfillmentPlacesMetadata struct { func (x *AddFulfillmentPlacesMetadata) Reset() { *x = AddFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesMetadata) String() string { @@ -1014,7 +992,7 @@ func (*AddFulfillmentPlacesMetadata) ProtoMessage() {} func (x *AddFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1019,9 @@ type AddFulfillmentPlacesResponse struct { func (x *AddFulfillmentPlacesResponse) Reset() { *x = AddFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesResponse) String() string { @@ -1056,7 +1032,7 @@ func (*AddFulfillmentPlacesResponse) ProtoMessage() {} func (x *AddFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1098,9 @@ type AddLocalInventoriesRequest struct { func (x *AddLocalInventoriesRequest) Reset() { *x = AddLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesRequest) String() string { @@ -1137,7 +1111,7 @@ func (*AddLocalInventoriesRequest) ProtoMessage() {} func (x *AddLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1199,11 +1173,9 @@ type AddLocalInventoriesMetadata struct { func (x *AddLocalInventoriesMetadata) Reset() { *x = AddLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesMetadata) String() string { @@ -1214,7 +1186,7 @@ func (*AddLocalInventoriesMetadata) ProtoMessage() {} func (x *AddLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1243,11 +1215,9 @@ type AddLocalInventoriesResponse struct { func (x *AddLocalInventoriesResponse) Reset() { *x = AddLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesResponse) String() string { @@ -1258,7 +1228,7 @@ func (*AddLocalInventoriesResponse) ProtoMessage() {} func (x *AddLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1277,9 @@ type RemoveLocalInventoriesRequest struct { func (x *RemoveLocalInventoriesRequest) Reset() { *x = RemoveLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesRequest) String() string { @@ -1322,7 +1290,7 @@ func (*RemoveLocalInventoriesRequest) ProtoMessage() {} func (x *RemoveLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1345,9 @@ type RemoveLocalInventoriesMetadata struct { func (x *RemoveLocalInventoriesMetadata) Reset() { *x = RemoveLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesMetadata) String() string { @@ -1392,7 +1358,7 @@ func (*RemoveLocalInventoriesMetadata) ProtoMessage() {} func (x *RemoveLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1421,11 +1387,9 @@ type RemoveLocalInventoriesResponse struct { func (x *RemoveLocalInventoriesResponse) Reset() { *x = RemoveLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesResponse) String() string { @@ -1436,7 +1400,7 @@ func (*RemoveLocalInventoriesResponse) ProtoMessage() {} func (x *RemoveLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1514,11 +1478,9 @@ type RemoveFulfillmentPlacesRequest struct { func (x *RemoveFulfillmentPlacesRequest) Reset() { *x = RemoveFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesRequest) String() string { @@ -1529,7 +1491,7 @@ func (*RemoveFulfillmentPlacesRequest) ProtoMessage() {} func (x *RemoveFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1591,11 +1553,9 @@ type RemoveFulfillmentPlacesMetadata struct { func (x *RemoveFulfillmentPlacesMetadata) Reset() { *x = RemoveFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesMetadata) String() string { @@ -1606,7 +1566,7 @@ func (*RemoveFulfillmentPlacesMetadata) ProtoMessage() {} func (x *RemoveFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1633,11 +1593,9 @@ type RemoveFulfillmentPlacesResponse struct { func (x *RemoveFulfillmentPlacesResponse) Reset() { *x = RemoveFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesResponse) String() string { @@ -1648,7 +1606,7 @@ func (*RemoveFulfillmentPlacesResponse) ProtoMessage() {} func (x *RemoveFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2221,260 +2179,6 @@ func file_google_cloud_retail_v2alpha_product_service_proto_init() { file_google_cloud_retail_v2alpha_import_config_proto_init() file_google_cloud_retail_v2alpha_product_proto_init() file_google_cloud_retail_v2alpha_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_product_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/project.pb.go b/retail/apiv2alpha/retailpb/project.pb.go index d71096bcc5ff..376fe450a698 100755 --- a/retail/apiv2alpha/retailpb/project.pb.go +++ b/retail/apiv2alpha/retailpb/project.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/project.proto @@ -179,11 +179,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -194,7 +192,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +243,9 @@ type Project struct { func (x *Project) Reset() { *x = Project{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Project) String() string { @@ -260,7 +256,7 @@ func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +301,9 @@ type AlertConfig struct { func (x *AlertConfig) Reset() { *x = AlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig) String() string { @@ -320,7 +314,7 @@ func (*AlertConfig) ProtoMessage() {} func (x *AlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +370,9 @@ type LoggingConfig_LogGenerationRule struct { func (x *LoggingConfig_LogGenerationRule) Reset() { *x = LoggingConfig_LogGenerationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig_LogGenerationRule) String() string { @@ -391,7 +383,7 @@ func (*LoggingConfig_LogGenerationRule) ProtoMessage() {} func (x *LoggingConfig_LogGenerationRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +435,9 @@ type LoggingConfig_ServiceLogGenerationRule struct { func (x *LoggingConfig_ServiceLogGenerationRule) Reset() { *x = LoggingConfig_ServiceLogGenerationRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig_ServiceLogGenerationRule) String() string { @@ -458,7 +448,7 @@ func (*LoggingConfig_ServiceLogGenerationRule) ProtoMessage() {} func (x *LoggingConfig_ServiceLogGenerationRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +497,9 @@ type AlertConfig_AlertPolicy struct { func (x *AlertConfig_AlertPolicy) Reset() { *x = AlertConfig_AlertPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig_AlertPolicy) String() string { @@ -522,7 +510,7 @@ func (*AlertConfig_AlertPolicy) ProtoMessage() {} func (x *AlertConfig_AlertPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +558,9 @@ type AlertConfig_AlertPolicy_Recipient struct { func (x *AlertConfig_AlertPolicy_Recipient) Reset() { *x = AlertConfig_AlertPolicy_Recipient{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig_AlertPolicy_Recipient) String() string { @@ -585,7 +571,7 @@ func (*AlertConfig_AlertPolicy_Recipient) ProtoMessage() {} func (x *AlertConfig_AlertPolicy_Recipient) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,92 +776,6 @@ func file_google_cloud_retail_v2alpha_project_proto_init() { return } file_google_cloud_retail_v2alpha_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_project_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Project); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig_LogGenerationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig_ServiceLogGenerationRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig_AlertPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig_AlertPolicy_Recipient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_project_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/retail/apiv2alpha/retailpb/project_service.pb.go b/retail/apiv2alpha/retailpb/project_service.pb.go index 6db07feb1d62..d2faed76bae9 100755 --- a/retail/apiv2alpha/retailpb/project_service.pb.go +++ b/retail/apiv2alpha/retailpb/project_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/project_service.proto @@ -55,11 +55,9 @@ type GetProjectRequest struct { func (x *GetProjectRequest) Reset() { *x = GetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProjectRequest) String() string { @@ -70,7 +68,7 @@ func (*GetProjectRequest) ProtoMessage() {} func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type AcceptTermsRequest struct { func (x *AcceptTermsRequest) Reset() { *x = AcceptTermsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceptTermsRequest) String() string { @@ -120,7 +116,7 @@ func (*AcceptTermsRequest) ProtoMessage() {} func (x *AcceptTermsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,11 +153,9 @@ type EnrollSolutionRequest struct { func (x *EnrollSolutionRequest) Reset() { *x = EnrollSolutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnrollSolutionRequest) String() string { @@ -172,7 +166,7 @@ func (*EnrollSolutionRequest) ProtoMessage() {} func (x *EnrollSolutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type EnrollSolutionResponse struct { func (x *EnrollSolutionResponse) Reset() { *x = EnrollSolutionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnrollSolutionResponse) String() string { @@ -228,7 +220,7 @@ func (*EnrollSolutionResponse) ProtoMessage() {} func (x *EnrollSolutionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +252,9 @@ type EnrollSolutionMetadata struct { func (x *EnrollSolutionMetadata) Reset() { *x = EnrollSolutionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnrollSolutionMetadata) String() string { @@ -275,7 +265,7 @@ func (*EnrollSolutionMetadata) ProtoMessage() {} func (x *EnrollSolutionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +293,9 @@ type ListEnrolledSolutionsRequest struct { func (x *ListEnrolledSolutionsRequest) Reset() { *x = ListEnrolledSolutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnrolledSolutionsRequest) String() string { @@ -318,7 +306,7 @@ func (*ListEnrolledSolutionsRequest) ProtoMessage() {} func (x *ListEnrolledSolutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +340,9 @@ type ListEnrolledSolutionsResponse struct { func (x *ListEnrolledSolutionsResponse) Reset() { *x = ListEnrolledSolutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEnrolledSolutionsResponse) String() string { @@ -367,7 +353,7 @@ func (*ListEnrolledSolutionsResponse) ProtoMessage() {} func (x *ListEnrolledSolutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +390,9 @@ type GetLoggingConfigRequest struct { func (x *GetLoggingConfigRequest) Reset() { *x = GetLoggingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoggingConfigRequest) String() string { @@ -419,7 +403,7 @@ func (*GetLoggingConfigRequest) ProtoMessage() {} func (x *GetLoggingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,11 +456,9 @@ type UpdateLoggingConfigRequest struct { func (x *UpdateLoggingConfigRequest) Reset() { *x = UpdateLoggingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLoggingConfigRequest) String() string { @@ -487,7 +469,7 @@ func (*UpdateLoggingConfigRequest) ProtoMessage() {} func (x *UpdateLoggingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +513,9 @@ type GetAlertConfigRequest struct { func (x *GetAlertConfigRequest) Reset() { *x = GetAlertConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAlertConfigRequest) String() string { @@ -546,7 +526,7 @@ func (*GetAlertConfigRequest) ProtoMessage() {} func (x *GetAlertConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +574,9 @@ type UpdateAlertConfigRequest struct { func (x *UpdateAlertConfigRequest) Reset() { *x = UpdateAlertConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAlertConfigRequest) String() string { @@ -609,7 +587,7 @@ func (*UpdateAlertConfigRequest) ProtoMessage() {} func (x *UpdateAlertConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,140 +913,6 @@ func file_google_cloud_retail_v2alpha_project_service_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_project_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AcceptTermsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EnrollSolutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EnrollSolutionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EnrollSolutionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListEnrolledSolutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListEnrolledSolutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetLoggingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLoggingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetAlertConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_project_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAlertConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/promotion.pb.go b/retail/apiv2alpha/retailpb/promotion.pb.go index 0487f1fdb60b..a021793fa7b0 100755 --- a/retail/apiv2alpha/retailpb/promotion.pb.go +++ b/retail/apiv2alpha/retailpb/promotion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/promotion.proto @@ -55,11 +55,9 @@ type Promotion struct { func (x *Promotion) Reset() { *x = Promotion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_promotion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_promotion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Promotion) String() string { @@ -70,7 +68,7 @@ func (*Promotion) ProtoMessage() {} func (x *Promotion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_promotion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,20 +146,6 @@ func file_google_cloud_retail_v2alpha_promotion_proto_init() { if File_google_cloud_retail_v2alpha_promotion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_promotion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Promotion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/purge_config.pb.go b/retail/apiv2alpha/retailpb/purge_config.pb.go index 6cac02fdf6d7..83c3bf3940f4 100755 --- a/retail/apiv2alpha/retailpb/purge_config.pb.go +++ b/retail/apiv2alpha/retailpb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/purge_config.proto @@ -47,11 +47,9 @@ type PurgeMetadata struct { func (x *PurgeMetadata) Reset() { *x = PurgeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeMetadata) String() string { @@ -62,7 +60,7 @@ func (*PurgeMetadata) ProtoMessage() {} func (x *PurgeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97,11 +95,9 @@ type PurgeProductsMetadata struct { func (x *PurgeProductsMetadata) Reset() { *x = PurgeProductsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsMetadata) String() string { @@ -112,7 +108,7 @@ func (*PurgeProductsMetadata) ProtoMessage() {} func (x *PurgeProductsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type PurgeProductsRequest struct { func (x *PurgeProductsRequest) Reset() { *x = PurgeProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsRequest) String() string { @@ -229,7 +223,7 @@ func (*PurgeProductsRequest) ProtoMessage() {} func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type PurgeProductsResponse struct { func (x *PurgeProductsResponse) Reset() { *x = PurgeProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsResponse) String() string { @@ -298,7 +290,7 @@ func (*PurgeProductsResponse) ProtoMessage() {} func (x *PurgeProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -385,7 +375,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +425,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -450,7 +438,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,80 +572,6 @@ func file_google_cloud_retail_v2alpha_purge_config_proto_init() { if File_google_cloud_retail_v2alpha_purge_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/search_service.pb.go b/retail/apiv2alpha/retailpb/search_service.pb.go index 3b2f9a9e5d26..aa0ebd2092e1 100755 --- a/retail/apiv2alpha/retailpb/search_service.pb.go +++ b/retail/apiv2alpha/retailpb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/search_service.proto @@ -426,11 +426,9 @@ type ProductAttributeValue struct { func (x *ProductAttributeValue) Reset() { *x = ProductAttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeValue) String() string { @@ -441,7 +439,7 @@ func (*ProductAttributeValue) ProtoMessage() {} func (x *ProductAttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +482,9 @@ type ProductAttributeInterval struct { func (x *ProductAttributeInterval) Reset() { *x = ProductAttributeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeInterval) String() string { @@ -499,7 +495,7 @@ func (*ProductAttributeInterval) ProtoMessage() {} func (x *ProductAttributeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +545,9 @@ type Tile struct { func (x *Tile) Reset() { *x = Tile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tile) String() string { @@ -564,7 +558,7 @@ func (*Tile) ProtoMessage() {} func (x *Tile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +912,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -933,7 +925,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1176,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1199,7 +1189,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1326,11 +1316,9 @@ type ExperimentInfo struct { func (x *ExperimentInfo) Reset() { *x = ExperimentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo) String() string { @@ -1341,7 +1329,7 @@ func (*ExperimentInfo) ProtoMessage() {} func (x *ExperimentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1452,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1479,7 +1465,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1523,9 @@ type SearchRequest_DynamicFacetSpec struct { func (x *SearchRequest_DynamicFacetSpec) Reset() { *x = SearchRequest_DynamicFacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DynamicFacetSpec) String() string { @@ -1552,7 +1536,7 @@ func (*SearchRequest_DynamicFacetSpec) ProtoMessage() {} func (x *SearchRequest_DynamicFacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1596,11 +1580,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1611,7 +1593,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1658,11 +1640,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1673,7 +1653,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1695,9 @@ type SearchRequest_PersonalizationSpec struct { func (x *SearchRequest_PersonalizationSpec) Reset() { *x = SearchRequest_PersonalizationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_PersonalizationSpec) String() string { @@ -1730,7 +1708,7 @@ func (*SearchRequest_PersonalizationSpec) ProtoMessage() {} func (x *SearchRequest_PersonalizationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1766,11 +1744,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1781,7 +1757,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1828,11 +1804,9 @@ type SearchRequest_ConversationalSearchSpec struct { func (x *SearchRequest_ConversationalSearchSpec) Reset() { *x = SearchRequest_ConversationalSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec) String() string { @@ -1843,7 +1817,7 @@ func (*SearchRequest_ConversationalSearchSpec) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1897,11 +1871,9 @@ type SearchRequest_TileNavigationSpec struct { func (x *SearchRequest_TileNavigationSpec) Reset() { *x = SearchRequest_TileNavigationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_TileNavigationSpec) String() string { @@ -1912,7 +1884,7 @@ func (*SearchRequest_TileNavigationSpec) ProtoMessage() {} func (x *SearchRequest_TileNavigationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2098,11 +2070,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -2113,7 +2083,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,11 +2203,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -2248,7 +2216,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2296,11 +2264,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) String() string { @@ -2311,7 +2277,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2388,11 +2354,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) String() string { @@ -2403,7 +2367,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoMe func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2524,11 +2488,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -2539,7 +2501,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2613,11 +2575,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -2628,7 +2588,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,11 +2642,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -2697,7 +2655,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2768,11 +2726,9 @@ type SearchResponse_ConversationalSearchResult struct { func (x *SearchResponse_ConversationalSearchResult) Reset() { *x = SearchResponse_ConversationalSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult) String() string { @@ -2783,7 +2739,7 @@ func (*SearchResponse_ConversationalSearchResult) ProtoMessage() {} func (x *SearchResponse_ConversationalSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2855,11 +2811,9 @@ type SearchResponse_TileNavigationResult struct { func (x *SearchResponse_TileNavigationResult) Reset() { *x = SearchResponse_TileNavigationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_TileNavigationResult) String() string { @@ -2870,7 +2824,7 @@ func (*SearchResponse_TileNavigationResult) ProtoMessage() {} func (x *SearchResponse_TileNavigationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2923,11 +2877,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -2938,7 +2890,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3026,11 +2978,9 @@ type SearchResponse_ConversationalSearchResult_SuggestedAnswer struct { func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) Reset() { *x = SearchResponse_ConversationalSearchResult_SuggestedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) String() string { @@ -3041,7 +2991,7 @@ func (*SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoMessage() func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3076,11 +3026,9 @@ type SearchResponse_ConversationalSearchResult_AdditionalFilter struct { func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) Reset() { *x = SearchResponse_ConversationalSearchResult_AdditionalFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) String() string { @@ -3091,7 +3039,7 @@ func (*SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoMessage( func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3133,11 +3081,9 @@ type ExperimentInfo_ServingConfigExperiment struct { func (x *ExperimentInfo_ServingConfigExperiment) Reset() { *x = ExperimentInfo_ServingConfigExperiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo_ServingConfigExperiment) String() string { @@ -3148,7 +3094,7 @@ func (*ExperimentInfo_ServingConfigExperiment) ProtoMessage() {} func (x *ExperimentInfo_ServingConfigExperiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3900,332 +3846,6 @@ func file_google_cloud_retail_v2alpha_search_service_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Tile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DynamicFacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_PersonalizationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_TileNavigationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_TileNavigationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_SuggestedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_AdditionalFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo_ServingConfigExperiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*Tile_ProductAttributeValue)(nil), (*Tile_ProductAttributeInterval)(nil), diff --git a/retail/apiv2alpha/retailpb/serving_config.pb.go b/retail/apiv2alpha/retailpb/serving_config.pb.go index 08aa758928b0..33fd77a7b8c6 100755 --- a/retail/apiv2alpha/retailpb/serving_config.pb.go +++ b/retail/apiv2alpha/retailpb/serving_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/serving_config.proto @@ -312,11 +312,9 @@ type ServingConfig struct { func (x *ServingConfig) Reset() { *x = ServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig) String() string { @@ -327,7 +325,7 @@ func (*ServingConfig) ProtoMessage() {} func (x *ServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,20 +644,6 @@ func file_google_cloud_retail_v2alpha_serving_config_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_serving_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/serving_config_service.pb.go b/retail/apiv2alpha/retailpb/serving_config_service.pb.go index 7de0937808ef..08a7873d8906 100755 --- a/retail/apiv2alpha/retailpb/serving_config_service.pb.go +++ b/retail/apiv2alpha/retailpb/serving_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/serving_config_service.proto @@ -63,11 +63,9 @@ type CreateServingConfigRequest struct { func (x *CreateServingConfigRequest) Reset() { *x = CreateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServingConfigRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateServingConfigRequest) ProtoMessage() {} func (x *CreateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateServingConfigRequest struct { func (x *UpdateServingConfigRequest) Reset() { *x = UpdateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServingConfigRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateServingConfigRequest) ProtoMessage() {} func (x *UpdateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteServingConfigRequest struct { func (x *DeleteServingConfigRequest) Reset() { *x = DeleteServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServingConfigRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteServingConfigRequest) ProtoMessage() {} func (x *DeleteServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetServingConfigRequest struct { func (x *GetServingConfigRequest) Reset() { *x = GetServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServingConfigRequest) String() string { @@ -256,7 +248,7 @@ func (*GetServingConfigRequest) ProtoMessage() {} func (x *GetServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type ListServingConfigsRequest struct { func (x *ListServingConfigsRequest) Reset() { *x = ListServingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsRequest) String() string { @@ -313,7 +303,7 @@ func (*ListServingConfigsRequest) ProtoMessage() {} func (x *ListServingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +353,9 @@ type ListServingConfigsResponse struct { func (x *ListServingConfigsResponse) Reset() { *x = ListServingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsResponse) String() string { @@ -378,7 +366,7 @@ func (*ListServingConfigsResponse) ProtoMessage() {} func (x *ListServingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +411,9 @@ type AddControlRequest struct { func (x *AddControlRequest) Reset() { *x = AddControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddControlRequest) String() string { @@ -438,7 +424,7 @@ func (*AddControlRequest) ProtoMessage() {} func (x *AddControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type RemoveControlRequest struct { func (x *RemoveControlRequest) Reset() { *x = RemoveControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveControlRequest) String() string { @@ -498,7 +482,7 @@ func (*RemoveControlRequest) ProtoMessage() {} func (x *RemoveControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,104 +790,6 @@ func file_google_cloud_retail_v2alpha_serving_config_service_proto_init() { return } file_google_cloud_retail_v2alpha_serving_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AddControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_serving_config_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RemoveControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/user_event.pb.go b/retail/apiv2alpha/retailpb/user_event.pb.go index f40dace044c7..fdca7dce34ef 100755 --- a/retail/apiv2alpha/retailpb/user_event.pb.go +++ b/retail/apiv2alpha/retailpb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/user_event.proto @@ -273,11 +273,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -288,7 +286,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +482,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -499,7 +495,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +545,9 @@ type CompletionDetail struct { func (x *CompletionDetail) Reset() { *x = CompletionDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDetail) String() string { @@ -564,7 +558,7 @@ func (*CompletionDetail) ProtoMessage() {} func (x *CompletionDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +624,9 @@ type PurchaseTransaction struct { func (x *PurchaseTransaction) Reset() { *x = PurchaseTransaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchaseTransaction) String() string { @@ -645,7 +637,7 @@ func (*PurchaseTransaction) ProtoMessage() {} func (x *PurchaseTransaction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,56 +869,6 @@ func file_google_cloud_retail_v2alpha_user_event_proto_init() { } file_google_cloud_retail_v2alpha_common_proto_init() file_google_cloud_retail_v2alpha_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurchaseTransaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2alpha/retailpb/user_event_service.pb.go b/retail/apiv2alpha/retailpb/user_event_service.pb.go index 2c2dae3e076a..920198bbcba7 100755 --- a/retail/apiv2alpha/retailpb/user_event_service.pb.go +++ b/retail/apiv2alpha/retailpb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2alpha/user_event_service.proto @@ -122,11 +122,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -137,7 +135,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +208,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -225,7 +221,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +315,9 @@ type RejoinUserEventsRequest struct { func (x *RejoinUserEventsRequest) Reset() { *x = RejoinUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsRequest) String() string { @@ -334,7 +328,7 @@ func (*RejoinUserEventsRequest) ProtoMessage() {} func (x *RejoinUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type RejoinUserEventsResponse struct { func (x *RejoinUserEventsResponse) Reset() { *x = RejoinUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsResponse) String() string { @@ -390,7 +382,7 @@ func (*RejoinUserEventsResponse) ProtoMessage() {} func (x *RejoinUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +413,9 @@ type RejoinUserEventsMetadata struct { func (x *RejoinUserEventsMetadata) Reset() { *x = RejoinUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsMetadata) String() string { @@ -436,7 +426,7 @@ func (*RejoinUserEventsMetadata) ProtoMessage() {} func (x *RejoinUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,68 +696,6 @@ func file_google_cloud_retail_v2alpha_user_event_service_proto_init() { file_google_cloud_retail_v2alpha_import_config_proto_init() file_google_cloud_retail_v2alpha_purge_config_proto_init() file_google_cloud_retail_v2alpha_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2alpha_user_event_service_proto_msgTypes[1].OneofWrappers = []any{ (*CollectUserEventRequest_PrebuiltRule)(nil), } diff --git a/retail/apiv2alpha/search_client.go b/retail/apiv2alpha/search_client.go index 637dc2919234..9ddae2ce4c5e 100755 --- a/retail/apiv2alpha/search_client.go +++ b/retail/apiv2alpha/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -210,6 +209,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -239,6 +240,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: retailpb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -286,6 +288,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -306,6 +310,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -369,7 +374,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *retailpb.SearchReque } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -404,7 +409,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -507,21 +512,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *retailpb.SearchReque } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -584,17 +578,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -659,21 +643,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/search_client_example_go123_test.go b/retail/apiv2alpha/search_client_example_go123_test.go index d3b074dd1a21..9b67a6145f36 100644 --- a/retail/apiv2alpha/search_client_example_go123_test.go +++ b/retail/apiv2alpha/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/serving_config_client.go b/retail/apiv2alpha/serving_config_client.go index 9509c17bb2b2..2a35e418403f 100755 --- a/retail/apiv2alpha/serving_config_client.go +++ b/retail/apiv2alpha/serving_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -253,6 +252,8 @@ type servingConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServingConfigClient creates a new serving config service client based on gRPC. @@ -279,6 +280,7 @@ func NewServingConfigClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, servingConfigClient: retailpb.NewServingConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -326,6 +328,8 @@ type servingConfigRESTClient struct { // Points back to the CallOptions field of the containing ServingConfigClient CallOptions **ServingConfigCallOptions + + logger *slog.Logger } // NewServingConfigRESTClient creates a new serving config service rest client. @@ -343,6 +347,7 @@ func NewServingConfigRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -395,7 +400,7 @@ func (c *servingConfigGRPCClient) CreateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.CreateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.CreateServingConfig, req, settings.GRPC, c.logger, "CreateServingConfig") return err }, opts...) if err != nil { @@ -412,7 +417,7 @@ func (c *servingConfigGRPCClient) DeleteServingConfig(ctx context.Context, req * opts = append((*c.CallOptions).DeleteServingConfig[0:len((*c.CallOptions).DeleteServingConfig):len((*c.CallOptions).DeleteServingConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.servingConfigClient.DeleteServingConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.servingConfigClient.DeleteServingConfig, req, settings.GRPC, c.logger, "DeleteServingConfig") return err }, opts...) return err @@ -427,7 +432,7 @@ func (c *servingConfigGRPCClient) UpdateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.UpdateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.UpdateServingConfig, req, settings.GRPC, c.logger, "UpdateServingConfig") return err }, opts...) if err != nil { @@ -445,7 +450,7 @@ func (c *servingConfigGRPCClient) GetServingConfig(ctx context.Context, req *ret var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.GetServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.GetServingConfig, req, settings.GRPC, c.logger, "GetServingConfig") return err }, opts...) if err != nil { @@ -474,7 +479,7 @@ func (c *servingConfigGRPCClient) ListServingConfigs(ctx context.Context, req *r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.ListServingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.ListServingConfigs, req, settings.GRPC, c.logger, "ListServingConfigs") return err }, opts...) if err != nil { @@ -509,7 +514,7 @@ func (c *servingConfigGRPCClient) AddControl(ctx context.Context, req *retailpb. var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.AddControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.AddControl, req, settings.GRPC, c.logger, "AddControl") return err }, opts...) if err != nil { @@ -527,7 +532,7 @@ func (c *servingConfigGRPCClient) RemoveControl(ctx context.Context, req *retail var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.RemoveControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.RemoveControl, req, settings.GRPC, c.logger, "RemoveControl") return err }, opts...) if err != nil { @@ -545,7 +550,7 @@ func (c *servingConfigGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -574,7 +579,7 @@ func (c *servingConfigGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -646,17 +651,7 @@ func (c *servingConfigRESTClient) CreateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServingConfig") if err != nil { return err } @@ -705,15 +700,8 @@ func (c *servingConfigRESTClient) DeleteServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServingConfig") + return err }, opts...) } @@ -764,17 +752,7 @@ func (c *servingConfigRESTClient) UpdateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServingConfig") if err != nil { return err } @@ -826,17 +804,7 @@ func (c *servingConfigRESTClient) GetServingConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServingConfig") if err != nil { return err } @@ -898,21 +866,10 @@ func (c *servingConfigRESTClient) ListServingConfigs(ctx context.Context, req *r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServingConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -987,17 +944,7 @@ func (c *servingConfigRESTClient) AddControl(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddControl") if err != nil { return err } @@ -1056,17 +1003,7 @@ func (c *servingConfigRESTClient) RemoveControl(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveControl") if err != nil { return err } @@ -1116,17 +1053,7 @@ func (c *servingConfigRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1191,21 +1118,10 @@ func (c *servingConfigRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/serving_config_client_example_go123_test.go b/retail/apiv2alpha/serving_config_client_example_go123_test.go index 199b3ab820d8..77c15195e50b 100644 --- a/retail/apiv2alpha/serving_config_client_example_go123_test.go +++ b/retail/apiv2alpha/serving_config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServingConfigClient_ListServingConfigs_all() { } for resp, err := range c.ListServingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServingConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2alpha/user_event_client.go b/retail/apiv2alpha/user_event_client.go index dfd06f42797c..0102d7579a60 100755 --- a/retail/apiv2alpha/user_event_client.go +++ b/retail/apiv2alpha/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2alpha/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -428,6 +427,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -454,6 +455,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: retailpb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -517,6 +519,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -534,6 +538,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -596,7 +601,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *retailpb. var resp *retailpb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *retailp var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -632,7 +637,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *retailpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *userEventGRPCClient) ExportUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ExportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ExportUserEvents, req, settings.GRPC, c.logger, "ExportUserEvents") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *userEventGRPCClient) RejoinUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.RejoinUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.RejoinUserEvents, req, settings.GRPC, c.logger, "RejoinUserEvents") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -810,17 +815,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -886,17 +881,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -955,21 +940,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *retailpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1031,21 +1005,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1104,21 +1067,10 @@ func (c *userEventRESTClient) ExportUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1181,21 +1133,10 @@ func (c *userEventRESTClient) RejoinUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RejoinUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1246,17 +1187,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1321,21 +1252,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2alpha/user_event_client_example_go123_test.go b/retail/apiv2alpha/user_event_client_example_go123_test.go index 1d48c28244ab..7e570aca6cdb 100644 --- a/retail/apiv2alpha/user_event_client_example_go123_test.go +++ b/retail/apiv2alpha/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/analytics_client.go b/retail/apiv2beta/analytics_client.go index 283dec52e1e1..ab1aa777ddc0 100755 --- a/retail/apiv2beta/analytics_client.go +++ b/retail/apiv2beta/analytics_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -227,6 +226,8 @@ type analyticsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAnalyticsClient creates a new analytics service client based on gRPC. @@ -254,6 +255,7 @@ func NewAnalyticsClient(ctx context.Context, opts ...option.ClientOption) (*Anal connPool: connPool, analyticsClient: retailpb.NewAnalyticsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -317,6 +319,8 @@ type analyticsRESTClient struct { // Points back to the CallOptions field of the containing AnalyticsClient CallOptions **AnalyticsCallOptions + + logger *slog.Logger } // NewAnalyticsRESTClient creates a new analytics service rest client. @@ -335,6 +339,7 @@ func NewAnalyticsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *analyticsGRPCClient) ExportAnalyticsMetrics(ctx context.Context, req *r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.analyticsClient.ExportAnalyticsMetrics(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.analyticsClient.ExportAnalyticsMetrics, req, settings.GRPC, c.logger, "ExportAnalyticsMetrics") return err }, opts...) if err != nil { @@ -417,7 +422,7 @@ func (c *analyticsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -446,7 +451,7 @@ func (c *analyticsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -513,21 +518,10 @@ func (c *analyticsRESTClient) ExportAnalyticsMetrics(ctx context.Context, req *r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportAnalyticsMetrics") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -578,17 +572,7 @@ func (c *analyticsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -653,21 +637,10 @@ func (c *analyticsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/analytics_client_example_go123_test.go b/retail/apiv2beta/analytics_client_example_go123_test.go index 5d9035642985..97836dca0c88 100644 --- a/retail/apiv2beta/analytics_client_example_go123_test.go +++ b/retail/apiv2beta/analytics_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAnalyticsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/catalog_client.go b/retail/apiv2beta/catalog_client.go index 9b61d056df62..95f0db870b0c 100755 --- a/retail/apiv2beta/catalog_client.go +++ b/retail/apiv2beta/catalog_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -621,6 +620,8 @@ type catalogGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCatalogClient creates a new catalog service client based on gRPC. @@ -647,6 +648,7 @@ func NewCatalogClient(ctx context.Context, opts ...option.ClientOption) (*Catalo connPool: connPool, catalogClient: retailpb.NewCatalogServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -694,6 +696,8 @@ type catalogRESTClient struct { // Points back to the CallOptions field of the containing CatalogClient CallOptions **CatalogCallOptions + + logger *slog.Logger } // NewCatalogRESTClient creates a new catalog service rest client. @@ -711,6 +715,7 @@ func NewCatalogRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ca endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -774,7 +779,7 @@ func (c *catalogGRPCClient) ListCatalogs(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ListCatalogs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ListCatalogs, req, settings.GRPC, c.logger, "ListCatalogs") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *catalogGRPCClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd var resp *retailpb.Catalog err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCatalog(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCatalog, req, settings.GRPC, c.logger, "UpdateCatalog") return err }, opts...) if err != nil { @@ -826,7 +831,7 @@ func (c *catalogGRPCClient) SetDefaultBranch(ctx context.Context, req *retailpb. opts = append((*c.CallOptions).SetDefaultBranch[0:len((*c.CallOptions).SetDefaultBranch):len((*c.CallOptions).SetDefaultBranch)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.catalogClient.SetDefaultBranch(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.catalogClient.SetDefaultBranch, req, settings.GRPC, c.logger, "SetDefaultBranch") return err }, opts...) return err @@ -841,7 +846,7 @@ func (c *catalogGRPCClient) GetDefaultBranch(ctx context.Context, req *retailpb. var resp *retailpb.GetDefaultBranchResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetDefaultBranch(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetDefaultBranch, req, settings.GRPC, c.logger, "GetDefaultBranch") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *catalogGRPCClient) GetCompletionConfig(ctx context.Context, req *retail var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetCompletionConfig, req, settings.GRPC, c.logger, "GetCompletionConfig") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *catalogGRPCClient) UpdateCompletionConfig(ctx context.Context, req *ret var resp *retailpb.CompletionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateCompletionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateCompletionConfig, req, settings.GRPC, c.logger, "UpdateCompletionConfig") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *catalogGRPCClient) GetAttributesConfig(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.GetAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.GetAttributesConfig, req, settings.GRPC, c.logger, "GetAttributesConfig") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *catalogGRPCClient) UpdateAttributesConfig(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.UpdateAttributesConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.UpdateAttributesConfig, req, settings.GRPC, c.logger, "UpdateAttributesConfig") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *catalogGRPCClient) AddCatalogAttribute(ctx context.Context, req *retail var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.AddCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.AddCatalogAttribute, req, settings.GRPC, c.logger, "AddCatalogAttribute") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *catalogGRPCClient) RemoveCatalogAttribute(ctx context.Context, req *ret var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.RemoveCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.RemoveCatalogAttribute, req, settings.GRPC, c.logger, "RemoveCatalogAttribute") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *catalogGRPCClient) BatchRemoveCatalogAttributes(ctx context.Context, re var resp *retailpb.BatchRemoveCatalogAttributesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.BatchRemoveCatalogAttributes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.BatchRemoveCatalogAttributes, req, settings.GRPC, c.logger, "BatchRemoveCatalogAttributes") return err }, opts...) if err != nil { @@ -985,7 +990,7 @@ func (c *catalogGRPCClient) ReplaceCatalogAttribute(ctx context.Context, req *re var resp *retailpb.AttributesConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.catalogClient.ReplaceCatalogAttribute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.catalogClient.ReplaceCatalogAttribute, req, settings.GRPC, c.logger, "ReplaceCatalogAttribute") return err }, opts...) if err != nil { @@ -1003,7 +1008,7 @@ func (c *catalogGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1032,7 +1037,7 @@ func (c *catalogGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1104,21 +1109,10 @@ func (c *catalogRESTClient) ListCatalogs(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCatalogs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1195,17 +1189,7 @@ func (c *catalogRESTClient) UpdateCatalog(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCatalog") if err != nil { return err } @@ -1292,15 +1276,8 @@ func (c *catalogRESTClient) SetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetDefaultBranch") + return err }, opts...) } @@ -1339,17 +1316,7 @@ func (c *catalogRESTClient) GetDefaultBranch(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDefaultBranch") if err != nil { return err } @@ -1399,17 +1366,7 @@ func (c *catalogRESTClient) GetCompletionConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompletionConfig") if err != nil { return err } @@ -1474,17 +1431,7 @@ func (c *catalogRESTClient) UpdateCompletionConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCompletionConfig") if err != nil { return err } @@ -1534,17 +1481,7 @@ func (c *catalogRESTClient) GetAttributesConfig(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAttributesConfig") if err != nil { return err } @@ -1616,17 +1553,7 @@ func (c *catalogRESTClient) UpdateAttributesConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAttributesConfig") if err != nil { return err } @@ -1687,17 +1614,7 @@ func (c *catalogRESTClient) AddCatalogAttribute(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddCatalogAttribute") if err != nil { return err } @@ -1758,17 +1675,7 @@ func (c *catalogRESTClient) RemoveCatalogAttribute(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveCatalogAttribute") if err != nil { return err } @@ -1826,17 +1733,7 @@ func (c *catalogRESTClient) BatchRemoveCatalogAttributes(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRemoveCatalogAttributes") if err != nil { return err } @@ -1899,17 +1796,7 @@ func (c *catalogRESTClient) ReplaceCatalogAttribute(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReplaceCatalogAttribute") if err != nil { return err } @@ -1959,17 +1846,7 @@ func (c *catalogRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2034,21 +1911,10 @@ func (c *catalogRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/catalog_client_example_go123_test.go b/retail/apiv2beta/catalog_client_example_go123_test.go index 08f262895404..7273b9141780 100644 --- a/retail/apiv2beta/catalog_client_example_go123_test.go +++ b/retail/apiv2beta/catalog_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCatalogClient_ListCatalogs_all() { } for resp, err := range c.ListCatalogs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCatalogClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/completion_client.go b/retail/apiv2beta/completion_client.go index 438123180ddd..6579c3d597a9 100755 --- a/retail/apiv2beta/completion_client.go +++ b/retail/apiv2beta/completion_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -269,6 +268,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion service client based on gRPC. @@ -298,6 +299,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: retailpb.NewCompletionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -361,6 +363,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion service rest client. @@ -381,6 +385,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -443,7 +448,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *retailpb. var resp *retailpb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -461,7 +466,7 @@ func (c *completionGRPCClient) ImportCompletionData(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.ImportCompletionData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.ImportCompletionData, req, settings.GRPC, c.logger, "ImportCompletionData") return err }, opts...) if err != nil { @@ -481,7 +486,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -510,7 +515,7 @@ func (c *completionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -596,17 +601,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -669,21 +664,10 @@ func (c *completionRESTClient) ImportCompletionData(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportCompletionData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -734,17 +718,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -809,21 +783,10 @@ func (c *completionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/completion_client_example_go123_test.go b/retail/apiv2beta/completion_client_example_go123_test.go index fde6ae1c18d8..f7db88f0bf9c 100644 --- a/retail/apiv2beta/completion_client_example_go123_test.go +++ b/retail/apiv2beta/completion_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompletionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/control_client.go b/retail/apiv2beta/control_client.go index 1b30cec23966..309da6d5ed48 100755 --- a/retail/apiv2beta/control_client.go +++ b/retail/apiv2beta/control_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -229,6 +228,8 @@ type controlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewControlClient creates a new control service client based on gRPC. @@ -255,6 +256,7 @@ func NewControlClient(ctx context.Context, opts ...option.ClientOption) (*Contro connPool: connPool, controlClient: retailpb.NewControlServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -302,6 +304,8 @@ type controlRESTClient struct { // Points back to the CallOptions field of the containing ControlClient CallOptions **ControlCallOptions + + logger *slog.Logger } // NewControlRESTClient creates a new control service rest client. @@ -319,6 +323,7 @@ func NewControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -371,7 +376,7 @@ func (c *controlGRPCClient) CreateControl(ctx context.Context, req *retailpb.Cre var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.CreateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.CreateControl, req, settings.GRPC, c.logger, "CreateControl") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *controlGRPCClient) DeleteControl(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteControl[0:len((*c.CallOptions).DeleteControl):len((*c.CallOptions).DeleteControl)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.controlClient.DeleteControl(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.controlClient.DeleteControl, req, settings.GRPC, c.logger, "DeleteControl") return err }, opts...) return err @@ -403,7 +408,7 @@ func (c *controlGRPCClient) UpdateControl(ctx context.Context, req *retailpb.Upd var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.UpdateControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.UpdateControl, req, settings.GRPC, c.logger, "UpdateControl") return err }, opts...) if err != nil { @@ -421,7 +426,7 @@ func (c *controlGRPCClient) GetControl(ctx context.Context, req *retailpb.GetCon var resp *retailpb.Control err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.GetControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.GetControl, req, settings.GRPC, c.logger, "GetControl") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *controlGRPCClient) ListControls(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.controlClient.ListControls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.controlClient.ListControls, req, settings.GRPC, c.logger, "ListControls") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *controlGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -514,7 +519,7 @@ func (c *controlGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -584,17 +589,7 @@ func (c *controlRESTClient) CreateControl(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateControl") if err != nil { return err } @@ -644,15 +639,8 @@ func (c *controlRESTClient) DeleteControl(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteControl") + return err }, opts...) } @@ -708,17 +696,7 @@ func (c *controlRESTClient) UpdateControl(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateControl") if err != nil { return err } @@ -768,17 +746,7 @@ func (c *controlRESTClient) GetControl(ctx context.Context, req *retailpb.GetCon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetControl") if err != nil { return err } @@ -844,21 +812,10 @@ func (c *controlRESTClient) ListControls(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListControls") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -921,17 +878,7 @@ func (c *controlRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -996,21 +943,10 @@ func (c *controlRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/control_client_example_go123_test.go b/retail/apiv2beta/control_client_example_go123_test.go index b53e614eb54e..456de216a085 100644 --- a/retail/apiv2beta/control_client_example_go123_test.go +++ b/retail/apiv2beta/control_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleControlClient_ListControls_all() { } for resp, err := range c.ListControls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleControlClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/generative_question_client.go b/retail/apiv2beta/generative_question_client.go index dcc371406b67..6742302cd481 100755 --- a/retail/apiv2beta/generative_question_client.go +++ b/retail/apiv2beta/generative_question_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -219,6 +218,8 @@ type generativeQuestionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewGenerativeQuestionClient creates a new generative question service client based on gRPC. @@ -245,6 +246,7 @@ func NewGenerativeQuestionClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, generativeQuestionClient: retailpb.NewGenerativeQuestionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -292,6 +294,8 @@ type generativeQuestionRESTClient struct { // Points back to the CallOptions field of the containing GenerativeQuestionClient CallOptions **GenerativeQuestionCallOptions + + logger *slog.Logger } // NewGenerativeQuestionRESTClient creates a new generative question service rest client. @@ -309,6 +313,7 @@ func NewGenerativeQuestionRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -361,7 +366,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionsFeatureConfig(ct var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -379,7 +384,7 @@ func (c *generativeQuestionGRPCClient) GetGenerativeQuestionsFeatureConfig(ctx c var resp *retailpb.GenerativeQuestionsFeatureConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.GetGenerativeQuestionsFeatureConfig, req, settings.GRPC, c.logger, "GetGenerativeQuestionsFeatureConfig") return err }, opts...) if err != nil { @@ -397,7 +402,7 @@ func (c *generativeQuestionGRPCClient) ListGenerativeQuestionConfigs(ctx context var resp *retailpb.ListGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.ListGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.ListGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "ListGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *generativeQuestionGRPCClient) UpdateGenerativeQuestionConfig(ctx contex var resp *retailpb.GenerativeQuestionConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.UpdateGenerativeQuestionConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.UpdateGenerativeQuestionConfig, req, settings.GRPC, c.logger, "UpdateGenerativeQuestionConfig") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *generativeQuestionGRPCClient) BatchUpdateGenerativeQuestionConfigs(ctx var resp *retailpb.BatchUpdateGenerativeQuestionConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.generativeQuestionClient.BatchUpdateGenerativeQuestionConfigs, req, settings.GRPC, c.logger, "BatchUpdateGenerativeQuestionConfigs") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *generativeQuestionGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *generativeQuestionGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -554,17 +559,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionsFeatureConfig(ct httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -615,17 +610,7 @@ func (c *generativeQuestionRESTClient) GetGenerativeQuestionsFeatureConfig(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGenerativeQuestionsFeatureConfig") if err != nil { return err } @@ -675,17 +660,7 @@ func (c *generativeQuestionRESTClient) ListGenerativeQuestionConfigs(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGenerativeQuestionConfigs") if err != nil { return err } @@ -749,17 +724,7 @@ func (c *generativeQuestionRESTClient) UpdateGenerativeQuestionConfig(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGenerativeQuestionConfig") if err != nil { return err } @@ -815,17 +780,7 @@ func (c *generativeQuestionRESTClient) BatchUpdateGenerativeQuestionConfigs(ctx httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateGenerativeQuestionConfigs") if err != nil { return err } @@ -875,17 +830,7 @@ func (c *generativeQuestionRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -950,21 +895,10 @@ func (c *generativeQuestionRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/generative_question_client_example_go123_test.go b/retail/apiv2beta/generative_question_client_example_go123_test.go index 42784bc93a66..52b4288f9509 100644 --- a/retail/apiv2beta/generative_question_client_example_go123_test.go +++ b/retail/apiv2beta/generative_question_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleGenerativeQuestionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/helpers.go b/retail/apiv2beta/helpers.go index f109b03b6c8e..4b0485f74073 100755 --- a/retail/apiv2beta/helpers.go +++ b/retail/apiv2beta/helpers.go @@ -18,10 +18,20 @@ package retail import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "retail.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/retail/apiv2beta/model_client.go b/retail/apiv2beta/model_client.go index b75a948d890c..a5721191b2e1 100755 --- a/retail/apiv2beta/model_client.go +++ b/retail/apiv2beta/model_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -471,6 +470,8 @@ type modelGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewModelClient creates a new model service client based on gRPC. @@ -511,6 +512,7 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli connPool: connPool, modelClient: retailpb.NewModelServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -574,6 +576,8 @@ type modelRESTClient struct { // Points back to the CallOptions field of the containing ModelClient CallOptions **ModelCallOptions + + logger *slog.Logger } // NewModelRESTClient creates a new model service rest client. @@ -605,6 +609,7 @@ func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*Mode endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -667,7 +672,7 @@ func (c *modelGRPCClient) CreateModel(ctx context.Context, req *retailpb.CreateM var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -687,7 +692,7 @@ func (c *modelGRPCClient) GetModel(ctx context.Context, req *retailpb.GetModelRe var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *modelGRPCClient) PauseModel(ctx context.Context, req *retailpb.PauseMod var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.PauseModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.PauseModel, req, settings.GRPC, c.logger, "PauseModel") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *modelGRPCClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ResumeModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ResumeModel, req, settings.GRPC, c.logger, "ResumeModel") return err }, opts...) if err != nil { @@ -740,7 +745,7 @@ func (c *modelGRPCClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM opts = append((*c.CallOptions).DeleteModel[0:len((*c.CallOptions).DeleteModel):len((*c.CallOptions).DeleteModel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.modelClient.DeleteModel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.modelClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) return err @@ -766,7 +771,7 @@ func (c *modelGRPCClient) ListModels(ctx context.Context, req *retailpb.ListMode } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *modelGRPCClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM var resp *retailpb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.UpdateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.UpdateModel, req, settings.GRPC, c.logger, "UpdateModel") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *modelGRPCClient) TuneModel(ctx context.Context, req *retailpb.TuneModel var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.modelClient.TuneModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.modelClient.TuneModel, req, settings.GRPC, c.logger, "TuneModel") return err }, opts...) if err != nil { @@ -839,7 +844,7 @@ func (c *modelGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -868,7 +873,7 @@ func (c *modelGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -936,21 +941,10 @@ func (c *modelRESTClient) CreateModel(ctx context.Context, req *retailpb.CreateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1001,17 +995,7 @@ func (c *modelRESTClient) GetModel(ctx context.Context, req *retailpb.GetModelRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -1067,17 +1051,7 @@ func (c *modelRESTClient) PauseModel(ctx context.Context, req *retailpb.PauseMod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseModel") if err != nil { return err } @@ -1133,17 +1107,7 @@ func (c *modelRESTClient) ResumeModel(ctx context.Context, req *retailpb.ResumeM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeModel") if err != nil { return err } @@ -1190,15 +1154,8 @@ func (c *modelRESTClient) DeleteModel(ctx context.Context, req *retailpb.DeleteM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") + return err }, opts...) } @@ -1247,21 +1204,10 @@ func (c *modelRESTClient) ListModels(ctx context.Context, req *retailpb.ListMode } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1341,17 +1287,7 @@ func (c *modelRESTClient) UpdateModel(ctx context.Context, req *retailpb.UpdateM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateModel") if err != nil { return err } @@ -1406,21 +1342,10 @@ func (c *modelRESTClient) TuneModel(ctx context.Context, req *retailpb.TuneModel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TuneModel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1471,17 +1396,7 @@ func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1546,21 +1461,10 @@ func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/model_client_example_go123_test.go b/retail/apiv2beta/model_client_example_go123_test.go index 27f86924099d..4b884e839703 100644 --- a/retail/apiv2beta/model_client_example_go123_test.go +++ b/retail/apiv2beta/model_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleModelClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleModelClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/prediction_client.go b/retail/apiv2beta/prediction_client.go index 3c54a3c18797..874e9832b5f9 100755 --- a/retail/apiv2beta/prediction_client.go +++ b/retail/apiv2beta/prediction_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -204,6 +203,8 @@ type predictionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPredictionClient creates a new prediction service client based on gRPC. @@ -230,6 +231,7 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre connPool: connPool, predictionClient: retailpb.NewPredictionServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -277,6 +279,8 @@ type predictionRESTClient struct { // Points back to the CallOptions field of the containing PredictionClient CallOptions **PredictionCallOptions + + logger *slog.Logger } // NewPredictionRESTClient creates a new prediction service rest client. @@ -294,6 +298,7 @@ func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -346,7 +351,7 @@ func (c *predictionGRPCClient) Predict(ctx context.Context, req *retailpb.Predic var resp *retailpb.PredictResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.predictionClient.Predict(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.predictionClient.Predict, req, settings.GRPC, c.logger, "Predict") return err }, opts...) if err != nil { @@ -364,7 +369,7 @@ func (c *predictionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -393,7 +398,7 @@ func (c *predictionGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -458,17 +463,7 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *retailpb.Predic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Predict") if err != nil { return err } @@ -518,17 +513,7 @@ func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -593,21 +578,10 @@ func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/prediction_client_example_go123_test.go b/retail/apiv2beta/prediction_client_example_go123_test.go index d93dabbf216a..95b32db18a31 100644 --- a/retail/apiv2beta/prediction_client_example_go123_test.go +++ b/retail/apiv2beta/prediction_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExamplePredictionClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/product_client.go b/retail/apiv2beta/product_client.go index 0ed0993d6468..14c796b50933 100755 --- a/retail/apiv2beta/product_client.go +++ b/retail/apiv2beta/product_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -837,6 +836,8 @@ type productGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProductClient creates a new product service client based on gRPC. @@ -864,6 +865,7 @@ func NewProductClient(ctx context.Context, opts ...option.ClientOption) (*Produc connPool: connPool, productClient: retailpb.NewProductServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -927,6 +929,8 @@ type productRESTClient struct { // Points back to the CallOptions field of the containing ProductClient CallOptions **ProductCallOptions + + logger *slog.Logger } // NewProductRESTClient creates a new product service rest client. @@ -945,6 +949,7 @@ func NewProductRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1007,7 +1012,7 @@ func (c *productGRPCClient) CreateProduct(ctx context.Context, req *retailpb.Cre var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.CreateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.CreateProduct, req, settings.GRPC, c.logger, "CreateProduct") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *productGRPCClient) GetProduct(ctx context.Context, req *retailpb.GetPro var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.GetProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.GetProduct, req, settings.GRPC, c.logger, "GetProduct") return err }, opts...) if err != nil { @@ -1054,7 +1059,7 @@ func (c *productGRPCClient) ListProducts(ctx context.Context, req *retailpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -1089,7 +1094,7 @@ func (c *productGRPCClient) UpdateProduct(ctx context.Context, req *retailpb.Upd var resp *retailpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.UpdateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.UpdateProduct, req, settings.GRPC, c.logger, "UpdateProduct") return err }, opts...) if err != nil { @@ -1106,7 +1111,7 @@ func (c *productGRPCClient) DeleteProduct(ctx context.Context, req *retailpb.Del opts = append((*c.CallOptions).DeleteProduct[0:len((*c.CallOptions).DeleteProduct):len((*c.CallOptions).DeleteProduct)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productClient.DeleteProduct(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productClient.DeleteProduct, req, settings.GRPC, c.logger, "DeleteProduct") return err }, opts...) return err @@ -1121,7 +1126,7 @@ func (c *productGRPCClient) PurgeProducts(ctx context.Context, req *retailpb.Pur var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.PurgeProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.PurgeProducts, req, settings.GRPC, c.logger, "PurgeProducts") return err }, opts...) if err != nil { @@ -1141,7 +1146,7 @@ func (c *productGRPCClient) ImportProducts(ctx context.Context, req *retailpb.Im var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ImportProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ImportProducts, req, settings.GRPC, c.logger, "ImportProducts") return err }, opts...) if err != nil { @@ -1161,7 +1166,7 @@ func (c *productGRPCClient) ExportProducts(ctx context.Context, req *retailpb.Ex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.ExportProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.ExportProducts, req, settings.GRPC, c.logger, "ExportProducts") return err }, opts...) if err != nil { @@ -1181,7 +1186,7 @@ func (c *productGRPCClient) SetInventory(ctx context.Context, req *retailpb.SetI var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.SetInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.SetInventory, req, settings.GRPC, c.logger, "SetInventory") return err }, opts...) if err != nil { @@ -1201,7 +1206,7 @@ func (c *productGRPCClient) AddFulfillmentPlaces(ctx context.Context, req *retai var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddFulfillmentPlaces, req, settings.GRPC, c.logger, "AddFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1221,7 +1226,7 @@ func (c *productGRPCClient) RemoveFulfillmentPlaces(ctx context.Context, req *re var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveFulfillmentPlaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveFulfillmentPlaces, req, settings.GRPC, c.logger, "RemoveFulfillmentPlaces") return err }, opts...) if err != nil { @@ -1241,7 +1246,7 @@ func (c *productGRPCClient) AddLocalInventories(ctx context.Context, req *retail var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.AddLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.AddLocalInventories, req, settings.GRPC, c.logger, "AddLocalInventories") return err }, opts...) if err != nil { @@ -1261,7 +1266,7 @@ func (c *productGRPCClient) RemoveLocalInventories(ctx context.Context, req *ret var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productClient.RemoveLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productClient.RemoveLocalInventories, req, settings.GRPC, c.logger, "RemoveLocalInventories") return err }, opts...) if err != nil { @@ -1281,7 +1286,7 @@ func (c *productGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1310,7 +1315,7 @@ func (c *productGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1377,17 +1382,7 @@ func (c *productRESTClient) CreateProduct(ctx context.Context, req *retailpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProduct") if err != nil { return err } @@ -1437,17 +1432,7 @@ func (c *productRESTClient) GetProduct(ctx context.Context, req *retailpb.GetPro httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProduct") if err != nil { return err } @@ -1519,21 +1504,10 @@ func (c *productRESTClient) ListProducts(ctx context.Context, req *retailpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1613,17 +1587,7 @@ func (c *productRESTClient) UpdateProduct(ctx context.Context, req *retailpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProduct") if err != nil { return err } @@ -1670,15 +1634,8 @@ func (c *productRESTClient) DeleteProduct(ctx context.Context, req *retailpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProduct") + return err }, opts...) } @@ -1736,21 +1693,10 @@ func (c *productRESTClient) PurgeProducts(ctx context.Context, req *retailpb.Pur httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1812,21 +1758,10 @@ func (c *productRESTClient) ImportProducts(ctx context.Context, req *retailpb.Im httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1882,21 +1817,10 @@ func (c *productRESTClient) ExportProducts(ctx context.Context, req *retailpb.Ex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2000,21 +1924,10 @@ func (c *productRESTClient) SetInventory(ctx context.Context, req *retailpb.SetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetInventory") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2099,21 +2012,10 @@ func (c *productRESTClient) AddFulfillmentPlaces(ctx context.Context, req *retai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddFulfillmentPlaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2198,21 +2100,10 @@ func (c *productRESTClient) RemoveFulfillmentPlaces(ctx context.Context, req *re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveFulfillmentPlaces") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2295,21 +2186,10 @@ func (c *productRESTClient) AddLocalInventories(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddLocalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2390,21 +2270,10 @@ func (c *productRESTClient) RemoveLocalInventories(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveLocalInventories") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2455,17 +2324,7 @@ func (c *productRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2530,21 +2389,10 @@ func (c *productRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/product_client_example_go123_test.go b/retail/apiv2beta/product_client_example_go123_test.go index eed487d8c9d2..f46c1c0db076 100644 --- a/retail/apiv2beta/product_client_example_go123_test.go +++ b/retail/apiv2beta/product_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleProductClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleProductClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/project_client.go b/retail/apiv2beta/project_client.go index 45a4c311f8aa..1904b9986903 100755 --- a/retail/apiv2beta/project_client.go +++ b/retail/apiv2beta/project_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -191,6 +190,8 @@ type projectGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProjectClient creates a new project service client based on gRPC. @@ -217,6 +218,7 @@ func NewProjectClient(ctx context.Context, opts ...option.ClientOption) (*Projec connPool: connPool, projectClient: retailpb.NewProjectServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -264,6 +266,8 @@ type projectRESTClient struct { // Points back to the CallOptions field of the containing ProjectClient CallOptions **ProjectCallOptions + + logger *slog.Logger } // NewProjectRESTClient creates a new project service rest client. @@ -281,6 +285,7 @@ func NewProjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*Pr endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -333,7 +338,7 @@ func (c *projectGRPCClient) GetAlertConfig(ctx context.Context, req *retailpb.Ge var resp *retailpb.AlertConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.GetAlertConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.GetAlertConfig, req, settings.GRPC, c.logger, "GetAlertConfig") return err }, opts...) if err != nil { @@ -351,7 +356,7 @@ func (c *projectGRPCClient) UpdateAlertConfig(ctx context.Context, req *retailpb var resp *retailpb.AlertConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.projectClient.UpdateAlertConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.projectClient.UpdateAlertConfig, req, settings.GRPC, c.logger, "UpdateAlertConfig") return err }, opts...) if err != nil { @@ -369,7 +374,7 @@ func (c *projectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -398,7 +403,7 @@ func (c *projectGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -458,17 +463,7 @@ func (c *projectRESTClient) GetAlertConfig(ctx context.Context, req *retailpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAlertConfig") if err != nil { return err } @@ -532,17 +527,7 @@ func (c *projectRESTClient) UpdateAlertConfig(ctx context.Context, req *retailpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAlertConfig") if err != nil { return err } @@ -592,17 +577,7 @@ func (c *projectRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -667,21 +642,10 @@ func (c *projectRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/project_client_example_go123_test.go b/retail/apiv2beta/project_client_example_go123_test.go index af9574afe674..3deb5967a546 100644 --- a/retail/apiv2beta/project_client_example_go123_test.go +++ b/retail/apiv2beta/project_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProjectClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/retailpb/analytics_service.pb.go b/retail/apiv2beta/retailpb/analytics_service.pb.go index 432acc678b74..077d846a7b6f 100755 --- a/retail/apiv2beta/retailpb/analytics_service.pb.go +++ b/retail/apiv2beta/retailpb/analytics_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/analytics_service.proto diff --git a/retail/apiv2beta/retailpb/catalog.pb.go b/retail/apiv2beta/retailpb/catalog.pb.go index b2efd71f42fe..7dbeed6f9779 100755 --- a/retail/apiv2beta/retailpb/catalog.pb.go +++ b/retail/apiv2beta/retailpb/catalog.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/catalog.proto @@ -418,11 +418,9 @@ type ProductLevelConfig struct { func (x *ProductLevelConfig) Reset() { *x = ProductLevelConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductLevelConfig) String() string { @@ -433,7 +431,7 @@ func (*ProductLevelConfig) ProtoMessage() {} func (x *ProductLevelConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +561,9 @@ type CatalogAttribute struct { func (x *CatalogAttribute) Reset() { *x = CatalogAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute) String() string { @@ -578,7 +574,7 @@ func (*CatalogAttribute) ProtoMessage() {} func (x *CatalogAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +686,9 @@ type AttributesConfig struct { func (x *AttributesConfig) Reset() { *x = AttributesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributesConfig) String() string { @@ -705,7 +699,7 @@ func (*AttributesConfig) ProtoMessage() {} func (x *AttributesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,11 +802,9 @@ type CompletionConfig struct { func (x *CompletionConfig) Reset() { *x = CompletionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionConfig) String() string { @@ -823,7 +815,7 @@ func (*CompletionConfig) ProtoMessage() {} func (x *CompletionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -967,11 +959,9 @@ type MerchantCenterLink struct { func (x *MerchantCenterLink) Reset() { *x = MerchantCenterLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterLink) String() string { @@ -982,7 +972,7 @@ func (*MerchantCenterLink) ProtoMessage() {} func (x *MerchantCenterLink) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1054,11 +1044,9 @@ type MerchantCenterFeedFilter struct { func (x *MerchantCenterFeedFilter) Reset() { *x = MerchantCenterFeedFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterFeedFilter) String() string { @@ -1069,7 +1057,7 @@ func (*MerchantCenterFeedFilter) ProtoMessage() {} func (x *MerchantCenterFeedFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1112,11 +1100,9 @@ type MerchantCenterLinkingConfig struct { func (x *MerchantCenterLinkingConfig) Reset() { *x = MerchantCenterLinkingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterLinkingConfig) String() string { @@ -1127,7 +1113,7 @@ func (*MerchantCenterLinkingConfig) ProtoMessage() {} func (x *MerchantCenterLinkingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,11 +1159,9 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Catalog) String() string { @@ -1188,7 +1172,7 @@ func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1258,9 @@ type CatalogAttribute_FacetConfig struct { func (x *CatalogAttribute_FacetConfig) Reset() { *x = CatalogAttribute_FacetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig) String() string { @@ -1289,7 +1271,7 @@ func (*CatalogAttribute_FacetConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1369,11 +1351,9 @@ type CatalogAttribute_FacetConfig_IgnoredFacetValues struct { func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) Reset() { *x = CatalogAttribute_FacetConfig_IgnoredFacetValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) String() string { @@ -1384,7 +1364,7 @@ func (*CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_IgnoredFacetValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1422,9 @@ type CatalogAttribute_FacetConfig_MergedFacetValue struct { func (x *CatalogAttribute_FacetConfig_MergedFacetValue) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacetValue) String() string { @@ -1457,7 +1435,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacetValue) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1507,11 +1485,9 @@ type CatalogAttribute_FacetConfig_MergedFacet struct { func (x *CatalogAttribute_FacetConfig_MergedFacet) Reset() { *x = CatalogAttribute_FacetConfig_MergedFacet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_MergedFacet) String() string { @@ -1522,7 +1498,7 @@ func (*CatalogAttribute_FacetConfig_MergedFacet) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_MergedFacet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1544,9 @@ type CatalogAttribute_FacetConfig_RerankConfig struct { func (x *CatalogAttribute_FacetConfig_RerankConfig) Reset() { *x = CatalogAttribute_FacetConfig_RerankConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CatalogAttribute_FacetConfig_RerankConfig) String() string { @@ -1583,7 +1557,7 @@ func (*CatalogAttribute_FacetConfig_RerankConfig) ProtoMessage() {} func (x *CatalogAttribute_FacetConfig_RerankConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2041,164 +2015,6 @@ func file_google_cloud_retail_v2beta_catalog_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductLevelConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttributesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompletionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterFeedFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterLinkingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Catalog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_IgnoredFacetValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_MergedFacet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CatalogAttribute_FacetConfig_RerankConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/catalog_service.pb.go b/retail/apiv2beta/retailpb/catalog_service.pb.go index 444e826618e7..67d0861fbee7 100755 --- a/retail/apiv2beta/retailpb/catalog_service.pb.go +++ b/retail/apiv2beta/retailpb/catalog_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/catalog_service.proto @@ -79,11 +79,9 @@ type ListCatalogsRequest struct { func (x *ListCatalogsRequest) Reset() { *x = ListCatalogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsRequest) String() string { @@ -94,7 +92,7 @@ func (*ListCatalogsRequest) ProtoMessage() {} func (x *ListCatalogsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,11 +147,9 @@ type ListCatalogsResponse struct { func (x *ListCatalogsResponse) Reset() { *x = ListCatalogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCatalogsResponse) String() string { @@ -164,7 +160,7 @@ func (*ListCatalogsResponse) ProtoMessage() {} func (x *ListCatalogsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +216,9 @@ type UpdateCatalogRequest struct { func (x *UpdateCatalogRequest) Reset() { *x = UpdateCatalogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCatalogRequest) String() string { @@ -235,7 +229,7 @@ func (*UpdateCatalogRequest) ProtoMessage() {} func (x *UpdateCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type SetDefaultBranchRequest struct { func (x *SetDefaultBranchRequest) Reset() { *x = SetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetDefaultBranchRequest) String() string { @@ -312,7 +304,7 @@ func (*SetDefaultBranchRequest) ProtoMessage() {} func (x *SetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +360,9 @@ type GetDefaultBranchRequest struct { func (x *GetDefaultBranchRequest) Reset() { *x = GetDefaultBranchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchRequest) String() string { @@ -383,7 +373,7 @@ func (*GetDefaultBranchRequest) ProtoMessage() {} func (x *GetDefaultBranchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +414,9 @@ type GetDefaultBranchResponse struct { func (x *GetDefaultBranchResponse) Reset() { *x = GetDefaultBranchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDefaultBranchResponse) String() string { @@ -439,7 +427,7 @@ func (*GetDefaultBranchResponse) ProtoMessage() {} func (x *GetDefaultBranchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +478,9 @@ type GetCompletionConfigRequest struct { func (x *GetCompletionConfigRequest) Reset() { *x = GetCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompletionConfigRequest) String() string { @@ -505,7 +491,7 @@ func (*GetCompletionConfigRequest) ProtoMessage() {} func (x *GetCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +546,9 @@ type UpdateCompletionConfigRequest struct { func (x *UpdateCompletionConfigRequest) Reset() { *x = UpdateCompletionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCompletionConfigRequest) String() string { @@ -575,7 +559,7 @@ func (*UpdateCompletionConfigRequest) ProtoMessage() {} func (x *UpdateCompletionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +603,9 @@ type GetAttributesConfigRequest struct { func (x *GetAttributesConfigRequest) Reset() { *x = GetAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAttributesConfigRequest) String() string { @@ -634,7 +616,7 @@ func (*GetAttributesConfigRequest) ProtoMessage() {} func (x *GetAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +661,9 @@ type UpdateAttributesConfigRequest struct { func (x *UpdateAttributesConfigRequest) Reset() { *x = UpdateAttributesConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAttributesConfigRequest) String() string { @@ -694,7 +674,7 @@ func (*UpdateAttributesConfigRequest) ProtoMessage() {} func (x *UpdateAttributesConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +721,9 @@ type AddCatalogAttributeRequest struct { func (x *AddCatalogAttributeRequest) Reset() { *x = AddCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddCatalogAttributeRequest) String() string { @@ -756,7 +734,7 @@ func (*AddCatalogAttributeRequest) ProtoMessage() {} func (x *AddCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +781,9 @@ type RemoveCatalogAttributeRequest struct { func (x *RemoveCatalogAttributeRequest) Reset() { *x = RemoveCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveCatalogAttributeRequest) String() string { @@ -818,7 +794,7 @@ func (*RemoveCatalogAttributeRequest) ProtoMessage() {} func (x *RemoveCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +843,9 @@ type BatchRemoveCatalogAttributesRequest struct { func (x *BatchRemoveCatalogAttributesRequest) Reset() { *x = BatchRemoveCatalogAttributesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRemoveCatalogAttributesRequest) String() string { @@ -882,7 +856,7 @@ func (*BatchRemoveCatalogAttributesRequest) ProtoMessage() {} func (x *BatchRemoveCatalogAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -934,11 +908,9 @@ type BatchRemoveCatalogAttributesResponse struct { func (x *BatchRemoveCatalogAttributesResponse) Reset() { *x = BatchRemoveCatalogAttributesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRemoveCatalogAttributesResponse) String() string { @@ -949,7 +921,7 @@ func (*BatchRemoveCatalogAttributesResponse) ProtoMessage() {} func (x *BatchRemoveCatalogAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +976,9 @@ type ReplaceCatalogAttributeRequest struct { func (x *ReplaceCatalogAttributeRequest) Reset() { *x = ReplaceCatalogAttributeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplaceCatalogAttributeRequest) String() string { @@ -1019,7 +989,7 @@ func (*ReplaceCatalogAttributeRequest) ProtoMessage() {} func (x *ReplaceCatalogAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1514,188 +1484,6 @@ func file_google_cloud_retail_v2beta_catalog_service_proto_init() { return } file_google_cloud_retail_v2beta_catalog_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCatalogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCatalogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetDefaultBranchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCompletionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAttributesConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RemoveCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchRemoveCatalogAttributesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchRemoveCatalogAttributesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_catalog_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReplaceCatalogAttributeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/common.pb.go b/retail/apiv2beta/retailpb/common.pb.go index 2097e8f9730e..ef348fc3b256 100755 --- a/retail/apiv2beta/retailpb/common.pb.go +++ b/retail/apiv2beta/retailpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/common.proto @@ -285,11 +285,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -300,7 +298,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +368,9 @@ type Rule struct { func (x *Rule) Reset() { *x = Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule) String() string { @@ -385,7 +381,7 @@ func (*Rule) ProtoMessage() {} func (x *Rule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,11 +593,9 @@ type Audience struct { func (x *Audience) Reset() { *x = Audience{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Audience) String() string { @@ -612,7 +606,7 @@ func (*Audience) ProtoMessage() {} func (x *Audience) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +672,9 @@ type ColorInfo struct { func (x *ColorInfo) Reset() { *x = ColorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColorInfo) String() string { @@ -693,7 +685,7 @@ func (*ColorInfo) ProtoMessage() {} func (x *ColorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,11 +781,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -804,7 +794,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +880,9 @@ type FulfillmentInfo struct { func (x *FulfillmentInfo) Reset() { *x = FulfillmentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FulfillmentInfo) String() string { @@ -905,7 +893,7 @@ func (*FulfillmentInfo) ProtoMessage() {} func (x *FulfillmentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +954,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -981,7 +967,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,11 +1035,9 @@ type Interval struct { func (x *Interval) Reset() { *x = Interval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interval) String() string { @@ -1064,7 +1048,7 @@ func (*Interval) ProtoMessage() {} func (x *Interval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,11 +1228,9 @@ type PriceInfo struct { func (x *PriceInfo) Reset() { *x = PriceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo) String() string { @@ -1259,7 +1241,7 @@ func (*PriceInfo) ProtoMessage() {} func (x *PriceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1352,11 +1334,9 @@ type Rating struct { func (x *Rating) Reset() { *x = Rating{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rating) String() string { @@ -1367,7 +1347,7 @@ func (*Rating) ProtoMessage() {} func (x *Rating) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1465,11 +1445,9 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserInfo) String() string { @@ -1480,7 +1458,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1583,11 +1561,9 @@ type LocalInventory struct { func (x *LocalInventory) Reset() { *x = LocalInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalInventory) String() string { @@ -1598,7 +1574,7 @@ func (*LocalInventory) ProtoMessage() {} func (x *LocalInventory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1660,11 +1636,9 @@ type Condition_QueryTerm struct { func (x *Condition_QueryTerm) Reset() { *x = Condition_QueryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_QueryTerm) String() string { @@ -1675,7 +1649,7 @@ func (*Condition_QueryTerm) ProtoMessage() {} func (x *Condition_QueryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1719,11 +1693,9 @@ type Condition_TimeRange struct { func (x *Condition_TimeRange) Reset() { *x = Condition_TimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition_TimeRange) String() string { @@ -1734,7 +1706,7 @@ func (*Condition_TimeRange) ProtoMessage() {} func (x *Condition_TimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1807,11 +1779,9 @@ type Rule_BoostAction struct { func (x *Rule_BoostAction) Reset() { *x = Rule_BoostAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_BoostAction) String() string { @@ -1822,7 +1792,7 @@ func (*Rule_BoostAction) ProtoMessage() {} func (x *Rule_BoostAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1894,11 +1864,9 @@ type Rule_FilterAction struct { func (x *Rule_FilterAction) Reset() { *x = Rule_FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_FilterAction) String() string { @@ -1909,7 +1877,7 @@ func (*Rule_FilterAction) ProtoMessage() {} func (x *Rule_FilterAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1949,11 +1917,9 @@ type Rule_RedirectAction struct { func (x *Rule_RedirectAction) Reset() { *x = Rule_RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RedirectAction) String() string { @@ -1964,7 +1930,7 @@ func (*Rule_RedirectAction) ProtoMessage() {} func (x *Rule_RedirectAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2004,11 +1970,9 @@ type Rule_TwowaySynonymsAction struct { func (x *Rule_TwowaySynonymsAction) Reset() { *x = Rule_TwowaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_TwowaySynonymsAction) String() string { @@ -2019,7 +1983,7 @@ func (*Rule_TwowaySynonymsAction) ProtoMessage() {} func (x *Rule_TwowaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2066,11 +2030,9 @@ type Rule_OnewaySynonymsAction struct { func (x *Rule_OnewaySynonymsAction) Reset() { *x = Rule_OnewaySynonymsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_OnewaySynonymsAction) String() string { @@ -2081,7 +2043,7 @@ func (*Rule_OnewaySynonymsAction) ProtoMessage() {} func (x *Rule_OnewaySynonymsAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2138,11 +2100,9 @@ type Rule_DoNotAssociateAction struct { func (x *Rule_DoNotAssociateAction) Reset() { *x = Rule_DoNotAssociateAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_DoNotAssociateAction) String() string { @@ -2153,7 +2113,7 @@ func (*Rule_DoNotAssociateAction) ProtoMessage() {} func (x *Rule_DoNotAssociateAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2209,11 +2169,9 @@ type Rule_ReplacementAction struct { func (x *Rule_ReplacementAction) Reset() { *x = Rule_ReplacementAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ReplacementAction) String() string { @@ -2224,7 +2182,7 @@ func (*Rule_ReplacementAction) ProtoMessage() {} func (x *Rule_ReplacementAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2273,11 +2231,9 @@ type Rule_IgnoreAction struct { func (x *Rule_IgnoreAction) Reset() { *x = Rule_IgnoreAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_IgnoreAction) String() string { @@ -2288,7 +2244,7 @@ func (*Rule_IgnoreAction) ProtoMessage() {} func (x *Rule_IgnoreAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2349,11 +2305,9 @@ type Rule_ForceReturnFacetAction struct { func (x *Rule_ForceReturnFacetAction) Reset() { *x = Rule_ForceReturnFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction) String() string { @@ -2364,7 +2318,7 @@ func (*Rule_ForceReturnFacetAction) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2418,11 +2372,9 @@ type Rule_RemoveFacetAction struct { func (x *Rule_RemoveFacetAction) Reset() { *x = Rule_RemoveFacetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_RemoveFacetAction) String() string { @@ -2433,7 +2385,7 @@ func (*Rule_RemoveFacetAction) ProtoMessage() {} func (x *Rule_RemoveFacetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2473,11 +2425,9 @@ type Rule_ForceReturnFacetAction_FacetPositionAdjustment struct { func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) Reset() { *x = Rule_ForceReturnFacetAction_FacetPositionAdjustment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) String() string { @@ -2488,7 +2438,7 @@ func (*Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoMessage() {} func (x *Rule_ForceReturnFacetAction_FacetPositionAdjustment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2544,11 +2494,9 @@ type PriceInfo_PriceRange struct { func (x *PriceInfo_PriceRange) Reset() { *x = PriceInfo_PriceRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInfo_PriceRange) String() string { @@ -2559,7 +2507,7 @@ func (*PriceInfo_PriceRange) ProtoMessage() {} func (x *PriceInfo_PriceRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_common_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3003,320 +2951,6 @@ func file_google_cloud_retail_v2beta_common_proto_init() { if File_google_cloud_retail_v2beta_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Audience); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ColorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FulfillmentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Interval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Rating); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LocalInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Condition_QueryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Condition_TimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Rule_BoostAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Rule_FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Rule_TwowaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Rule_OnewaySynonymsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Rule_DoNotAssociateAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ReplacementAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Rule_IgnoreAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Rule_RemoveFacetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Rule_ForceReturnFacetAction_FacetPositionAdjustment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_common_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*PriceInfo_PriceRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_common_proto_msgTypes[1].OneofWrappers = []any{ (*Rule_BoostAction_)(nil), (*Rule_RedirectAction_)(nil), diff --git a/retail/apiv2beta/retailpb/completion_service.pb.go b/retail/apiv2beta/retailpb/completion_service.pb.go index 35a85d3deab5..2301cc7ccceb 100755 --- a/retail/apiv2beta/retailpb/completion_service.pb.go +++ b/retail/apiv2beta/retailpb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/completion_service.proto @@ -127,11 +127,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -142,7 +140,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +269,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -286,7 +282,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type CompleteQueryResponse_CompletionResult struct { func (x *CompleteQueryResponse_CompletionResult) Reset() { *x = CompleteQueryResponse_CompletionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_CompletionResult) String() string { @@ -367,7 +361,7 @@ func (*CompleteQueryResponse_CompletionResult) ProtoMessage() {} func (x *CompleteQueryResponse_CompletionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +404,9 @@ type CompleteQueryResponse_RecentSearchResult struct { func (x *CompleteQueryResponse_RecentSearchResult) Reset() { *x = CompleteQueryResponse_RecentSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_RecentSearchResult) String() string { @@ -425,7 +417,7 @@ func (*CompleteQueryResponse_RecentSearchResult) ProtoMessage() {} func (x *CompleteQueryResponse_RecentSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +451,9 @@ type CompleteQueryResponse_AttributeResult struct { func (x *CompleteQueryResponse_AttributeResult) Reset() { *x = CompleteQueryResponse_AttributeResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_AttributeResult) String() string { @@ -474,7 +464,7 @@ func (*CompleteQueryResponse_AttributeResult) ProtoMessage() {} func (x *CompleteQueryResponse_AttributeResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,68 +696,6 @@ func file_google_cloud_retail_v2beta_completion_service_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_import_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_CompletionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_RecentSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_completion_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_AttributeResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/control.pb.go b/retail/apiv2beta/retailpb/control.pb.go index 6c97a7ca4eb7..1aa96b421e85 100755 --- a/retail/apiv2beta/retailpb/control.pb.go +++ b/retail/apiv2beta/retailpb/control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/control.proto @@ -91,11 +91,9 @@ type Control struct { func (x *Control) Reset() { *x = Control{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Control) String() string { @@ -106,7 +104,7 @@ func (*Control) ProtoMessage() {} func (x *Control) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,20 +311,6 @@ func file_google_cloud_retail_v2beta_control_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Control); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_control_proto_msgTypes[0].OneofWrappers = []any{ (*Control_FacetSpec)(nil), (*Control_Rule)(nil), diff --git a/retail/apiv2beta/retailpb/control_service.pb.go b/retail/apiv2beta/retailpb/control_service.pb.go index 955557c6ab03..bf8c495af3ea 100755 --- a/retail/apiv2beta/retailpb/control_service.pb.go +++ b/retail/apiv2beta/retailpb/control_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/control_service.proto @@ -63,11 +63,9 @@ type CreateControlRequest struct { func (x *CreateControlRequest) Reset() { *x = CreateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateControlRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateControlRequest) ProtoMessage() {} func (x *CreateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateControlRequest struct { func (x *UpdateControlRequest) Reset() { *x = UpdateControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateControlRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateControlRequest) ProtoMessage() {} func (x *UpdateControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteControlRequest struct { func (x *DeleteControlRequest) Reset() { *x = DeleteControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteControlRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteControlRequest) ProtoMessage() {} func (x *DeleteControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetControlRequest struct { func (x *GetControlRequest) Reset() { *x = GetControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetControlRequest) String() string { @@ -256,7 +248,7 @@ func (*GetControlRequest) ProtoMessage() {} func (x *GetControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +296,9 @@ type ListControlsRequest struct { func (x *ListControlsRequest) Reset() { *x = ListControlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsRequest) String() string { @@ -319,7 +309,7 @@ func (*ListControlsRequest) ProtoMessage() {} func (x *ListControlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +366,9 @@ type ListControlsResponse struct { func (x *ListControlsResponse) Reset() { *x = ListControlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListControlsResponse) String() string { @@ -391,7 +379,7 @@ func (*ListControlsResponse) ProtoMessage() {} func (x *ListControlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_control_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -627,80 +615,6 @@ func file_google_cloud_retail_v2beta_control_service_proto_init() { return } file_google_cloud_retail_v2beta_control_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_control_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListControlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/export_config.pb.go b/retail/apiv2beta/retailpb/export_config.pb.go index 7c581d20697b..b838f0d4b5fc 100755 --- a/retail/apiv2beta/retailpb/export_config.pb.go +++ b/retail/apiv2beta/retailpb/export_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/export_config.proto @@ -55,11 +55,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -70,7 +68,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type ExportErrorsConfig struct { func (x *ExportErrorsConfig) Reset() { *x = ExportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportErrorsConfig) String() string { @@ -155,7 +151,7 @@ func (*ExportErrorsConfig) ProtoMessage() {} func (x *ExportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ExportProductsRequest struct { func (x *ExportProductsRequest) Reset() { *x = ExportProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportProductsRequest) String() string { @@ -275,7 +269,7 @@ func (*ExportProductsRequest) ProtoMessage() {} func (x *ExportProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +357,9 @@ type ExportUserEventsRequest struct { func (x *ExportUserEventsRequest) Reset() { *x = ExportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportUserEventsRequest) String() string { @@ -378,7 +370,7 @@ func (*ExportUserEventsRequest) ProtoMessage() {} func (x *ExportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,11 +439,9 @@ type ExportAnalyticsMetricsRequest struct { func (x *ExportAnalyticsMetricsRequest) Reset() { *x = ExportAnalyticsMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsRequest) String() string { @@ -462,7 +452,7 @@ func (*ExportAnalyticsMetricsRequest) ProtoMessage() {} func (x *ExportAnalyticsMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -514,11 +504,9 @@ type ExportMetadata struct { func (x *ExportMetadata) Reset() { *x = ExportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportMetadata) String() string { @@ -529,7 +517,7 @@ func (*ExportMetadata) ProtoMessage() {} func (x *ExportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +564,9 @@ type ExportProductsResponse struct { func (x *ExportProductsResponse) Reset() { *x = ExportProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportProductsResponse) String() string { @@ -591,7 +577,7 @@ func (*ExportProductsResponse) ProtoMessage() {} func (x *ExportProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +631,9 @@ type ExportUserEventsResponse struct { func (x *ExportUserEventsResponse) Reset() { *x = ExportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportUserEventsResponse) String() string { @@ -660,7 +644,7 @@ func (*ExportUserEventsResponse) ProtoMessage() {} func (x *ExportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +698,9 @@ type ExportAnalyticsMetricsResponse struct { func (x *ExportAnalyticsMetricsResponse) Reset() { *x = ExportAnalyticsMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportAnalyticsMetricsResponse) String() string { @@ -729,7 +711,7 @@ func (*ExportAnalyticsMetricsResponse) ProtoMessage() {} func (x *ExportAnalyticsMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +762,9 @@ type OutputResult struct { func (x *OutputResult) Reset() { *x = OutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputResult) String() string { @@ -795,7 +775,7 @@ func (*OutputResult) ProtoMessage() {} func (x *OutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,11 +818,9 @@ type BigQueryOutputResult struct { func (x *BigQueryOutputResult) Reset() { *x = BigQueryOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryOutputResult) String() string { @@ -853,7 +831,7 @@ func (*BigQueryOutputResult) ProtoMessage() {} func (x *BigQueryOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +872,9 @@ type GcsOutputResult struct { func (x *GcsOutputResult) Reset() { *x = GcsOutputResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputResult) String() string { @@ -909,7 +885,7 @@ func (*GcsOutputResult) ProtoMessage() {} func (x *GcsOutputResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +925,9 @@ type OutputConfig_GcsDestination struct { func (x *OutputConfig_GcsDestination) Reset() { *x = OutputConfig_GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_GcsDestination) String() string { @@ -964,7 +938,7 @@ func (*OutputConfig_GcsDestination) ProtoMessage() {} func (x *OutputConfig_GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,11 +979,9 @@ type OutputConfig_BigQueryDestination struct { func (x *OutputConfig_BigQueryDestination) Reset() { *x = OutputConfig_BigQueryDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig_BigQueryDestination) String() string { @@ -1020,7 +992,7 @@ func (*OutputConfig_BigQueryDestination) ProtoMessage() {} func (x *OutputConfig_BigQueryDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_export_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1293,176 +1265,6 @@ func file_google_cloud_retail_v2beta_export_config_proto_init() { if File_google_cloud_retail_v2beta_export_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ExportProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExportProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExportAnalyticsMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*OutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_export_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig_BigQueryDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_export_config_proto_msgTypes[0].OneofWrappers = []any{ (*OutputConfig_GcsDestination_)(nil), (*OutputConfig_BigqueryDestination)(nil), diff --git a/retail/apiv2beta/retailpb/generative_question.pb.go b/retail/apiv2beta/retailpb/generative_question.pb.go index ad57dbbedd78..11b60c09d128 100755 --- a/retail/apiv2beta/retailpb/generative_question.pb.go +++ b/retail/apiv2beta/retailpb/generative_question.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/generative_question.proto @@ -56,11 +56,9 @@ type GenerativeQuestionsFeatureConfig struct { func (x *GenerativeQuestionsFeatureConfig) Reset() { *x = GenerativeQuestionsFeatureConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionsFeatureConfig) String() string { @@ -71,7 +69,7 @@ func (*GenerativeQuestionsFeatureConfig) ProtoMessage() {} func (x *GenerativeQuestionsFeatureConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type GenerativeQuestionConfig struct { func (x *GenerativeQuestionConfig) Reset() { *x = GenerativeQuestionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerativeQuestionConfig) String() string { @@ -149,7 +145,7 @@ func (*GenerativeQuestionConfig) ProtoMessage() {} func (x *GenerativeQuestionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,32 +296,6 @@ func file_google_cloud_retail_v2beta_generative_question_proto_init() { if File_google_cloud_retail_v2beta_generative_question_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionsFeatureConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GenerativeQuestionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/generative_question_service.pb.go b/retail/apiv2beta/retailpb/generative_question_service.pb.go index e4314b63c74f..d1895a3a2c45 100755 --- a/retail/apiv2beta/retailpb/generative_question_service.pb.go +++ b/retail/apiv2beta/retailpb/generative_question_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/generative_question_service.proto @@ -57,11 +57,9 @@ type UpdateGenerativeQuestionsFeatureConfigRequest struct { func (x *UpdateGenerativeQuestionsFeatureConfigRequest) Reset() { *x = UpdateGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionsFeatureConfigRequest) String() string { @@ -72,7 +70,7 @@ func (*UpdateGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type GetGenerativeQuestionsFeatureConfigRequest struct { func (x *GetGenerativeQuestionsFeatureConfigRequest) Reset() { *x = GetGenerativeQuestionsFeatureConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGenerativeQuestionsFeatureConfigRequest) String() string { @@ -129,7 +125,7 @@ func (*GetGenerativeQuestionsFeatureConfigRequest) ProtoMessage() {} func (x *GetGenerativeQuestionsFeatureConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +160,9 @@ type ListGenerativeQuestionConfigsRequest struct { func (x *ListGenerativeQuestionConfigsRequest) Reset() { *x = ListGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsRequest) String() string { @@ -179,7 +173,7 @@ func (*ListGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type ListGenerativeQuestionConfigsResponse struct { func (x *ListGenerativeQuestionConfigsResponse) Reset() { *x = ListGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGenerativeQuestionConfigsResponse) String() string { @@ -228,7 +220,7 @@ func (*ListGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *ListGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +262,9 @@ type UpdateGenerativeQuestionConfigRequest struct { func (x *UpdateGenerativeQuestionConfigRequest) Reset() { *x = UpdateGenerativeQuestionConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGenerativeQuestionConfigRequest) String() string { @@ -285,7 +275,7 @@ func (*UpdateGenerativeQuestionConfigRequest) ProtoMessage() {} func (x *UpdateGenerativeQuestionConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +319,9 @@ type BatchUpdateGenerativeQuestionConfigsRequest struct { func (x *BatchUpdateGenerativeQuestionConfigsRequest) Reset() { *x = BatchUpdateGenerativeQuestionConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsRequest) String() string { @@ -344,7 +332,7 @@ func (*BatchUpdateGenerativeQuestionConfigsRequest) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,11 +373,9 @@ type BatchUpdateGenerativeQuestionConfigsResponse struct { func (x *BatchUpdateGenerativeQuestionConfigsResponse) Reset() { *x = BatchUpdateGenerativeQuestionConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateGenerativeQuestionConfigsResponse) String() string { @@ -400,7 +386,7 @@ func (*BatchUpdateGenerativeQuestionConfigsResponse) ProtoMessage() {} func (x *BatchUpdateGenerativeQuestionConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,92 +684,6 @@ func file_google_cloud_retail_v2beta_generative_question_service_proto_init() { return } file_google_cloud_retail_v2beta_generative_question_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetGenerativeQuestionsFeatureConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGenerativeQuestionConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_generative_question_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateGenerativeQuestionConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/import_config.pb.go b/retail/apiv2beta/retailpb/import_config.pb.go index 564d5c6d5897..81dd691523b7 100755 --- a/retail/apiv2beta/retailpb/import_config.pb.go +++ b/retail/apiv2beta/retailpb/import_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/import_config.proto @@ -142,11 +142,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -157,7 +155,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -245,11 +243,9 @@ type BigQuerySource struct { func (x *BigQuerySource) Reset() { *x = BigQuerySource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQuerySource) String() string { @@ -260,7 +256,7 @@ func (*BigQuerySource) ProtoMessage() {} func (x *BigQuerySource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type ProductInlineSource struct { func (x *ProductInlineSource) Reset() { *x = ProductInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInlineSource) String() string { @@ -367,7 +361,7 @@ func (*ProductInlineSource) ProtoMessage() {} func (x *ProductInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +395,9 @@ type UserEventInlineSource struct { func (x *UserEventInlineSource) Reset() { *x = UserEventInlineSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInlineSource) String() string { @@ -416,7 +408,7 @@ func (*UserEventInlineSource) ProtoMessage() {} func (x *UserEventInlineSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +446,9 @@ type ImportErrorsConfig struct { func (x *ImportErrorsConfig) Reset() { *x = ImportErrorsConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportErrorsConfig) String() string { @@ -469,7 +459,7 @@ func (*ImportErrorsConfig) ProtoMessage() {} func (x *ImportErrorsConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,11 +551,9 @@ type ImportProductsRequest struct { func (x *ImportProductsRequest) Reset() { *x = ImportProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsRequest) String() string { @@ -576,7 +564,7 @@ func (*ImportProductsRequest) ProtoMessage() {} func (x *ImportProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +646,9 @@ type ImportUserEventsRequest struct { func (x *ImportUserEventsRequest) Reset() { *x = ImportUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsRequest) String() string { @@ -673,7 +659,7 @@ func (*ImportUserEventsRequest) ProtoMessage() {} func (x *ImportUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +717,9 @@ type ImportCompletionDataRequest struct { func (x *ImportCompletionDataRequest) Reset() { *x = ImportCompletionDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataRequest) String() string { @@ -746,7 +730,7 @@ func (*ImportCompletionDataRequest) ProtoMessage() {} func (x *ImportCompletionDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +784,9 @@ type ProductInputConfig struct { func (x *ProductInputConfig) Reset() { *x = ProductInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInputConfig) String() string { @@ -815,7 +797,7 @@ func (*ProductInputConfig) ProtoMessage() {} func (x *ProductInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +883,9 @@ type UserEventInputConfig struct { func (x *UserEventInputConfig) Reset() { *x = UserEventInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventInputConfig) String() string { @@ -916,7 +896,7 @@ func (*UserEventInputConfig) ProtoMessage() {} func (x *UserEventInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +988,9 @@ type CompletionDataInputConfig struct { func (x *CompletionDataInputConfig) Reset() { *x = CompletionDataInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDataInputConfig) String() string { @@ -1023,7 +1001,7 @@ func (*CompletionDataInputConfig) ProtoMessage() {} func (x *CompletionDataInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,11 +1075,9 @@ type ImportMetadata struct { func (x *ImportMetadata) Reset() { *x = ImportMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportMetadata) String() string { @@ -1112,7 +1088,7 @@ func (*ImportMetadata) ProtoMessage() {} func (x *ImportMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1187,11 +1163,9 @@ type ImportProductsResponse struct { func (x *ImportProductsResponse) Reset() { *x = ImportProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductsResponse) String() string { @@ -1202,7 +1176,7 @@ func (*ImportProductsResponse) ProtoMessage() {} func (x *ImportProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1250,11 +1224,9 @@ type ImportUserEventsResponse struct { func (x *ImportUserEventsResponse) Reset() { *x = ImportUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportUserEventsResponse) String() string { @@ -1265,7 +1237,7 @@ func (*ImportUserEventsResponse) ProtoMessage() {} func (x *ImportUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1289,9 @@ type UserEventImportSummary struct { func (x *UserEventImportSummary) Reset() { *x = UserEventImportSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEventImportSummary) String() string { @@ -1332,7 +1302,7 @@ func (*UserEventImportSummary) ProtoMessage() {} func (x *UserEventImportSummary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1376,11 +1346,9 @@ type ImportCompletionDataResponse struct { func (x *ImportCompletionDataResponse) Reset() { *x = ImportCompletionDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportCompletionDataResponse) String() string { @@ -1391,7 +1359,7 @@ func (*ImportCompletionDataResponse) ProtoMessage() {} func (x *ImportCompletionDataResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_import_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1748,200 +1716,6 @@ func file_google_cloud_retail_v2beta_import_config_proto_init() { } file_google_cloud_retail_v2beta_product_proto_init() file_google_cloud_retail_v2beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BigQuerySource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProductInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInlineSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImportErrorsConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ProductInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UserEventInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDataInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImportMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UserEventImportSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_import_config_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ImportCompletionDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_import_config_proto_msgTypes[1].OneofWrappers = []any{ (*BigQuerySource_PartitionDate)(nil), } diff --git a/retail/apiv2beta/retailpb/model.pb.go b/retail/apiv2beta/retailpb/model.pb.go index 1da1e28b6901..772e5f29525b 100755 --- a/retail/apiv2beta/retailpb/model.pb.go +++ b/retail/apiv2beta/retailpb/model.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/model.proto @@ -443,11 +443,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -458,7 +456,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +590,9 @@ type Model_ServingConfigList struct { func (x *Model_ServingConfigList) Reset() { *x = Model_ServingConfigList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ServingConfigList) String() string { @@ -607,7 +603,7 @@ func (*Model_ServingConfigList) ProtoMessage() {} func (x *Model_ServingConfigList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +640,9 @@ type Model_FrequentlyBoughtTogetherFeaturesConfig struct { func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) Reset() { *x = Model_FrequentlyBoughtTogetherFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) String() string { @@ -659,7 +653,7 @@ func (*Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoMessage() {} func (x *Model_FrequentlyBoughtTogetherFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +689,9 @@ type Model_ModelFeaturesConfig struct { func (x *Model_ModelFeaturesConfig) Reset() { *x = Model_ModelFeaturesConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model_ModelFeaturesConfig) String() string { @@ -710,7 +702,7 @@ func (*Model_ModelFeaturesConfig) ProtoMessage() {} func (x *Model_ModelFeaturesConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -970,56 +962,6 @@ func file_google_cloud_retail_v2beta_model_proto_init() { return } file_google_cloud_retail_v2beta_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_model_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Model_ServingConfigList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Model_FrequentlyBoughtTogetherFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Model_ModelFeaturesConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_model_proto_msgTypes[3].OneofWrappers = []any{ (*Model_ModelFeaturesConfig_FrequentlyBoughtTogetherConfig)(nil), } diff --git a/retail/apiv2beta/retailpb/model_service.pb.go b/retail/apiv2beta/retailpb/model_service.pb.go index 36d2f1b8f329..152657d68ed4 100755 --- a/retail/apiv2beta/retailpb/model_service.pb.go +++ b/retail/apiv2beta/retailpb/model_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/model_service.proto @@ -62,11 +62,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -77,7 +75,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type UpdateModelRequest struct { func (x *UpdateModelRequest) Reset() { *x = UpdateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateModelRequest) String() string { @@ -144,7 +140,7 @@ func (*UpdateModelRequest) ProtoMessage() {} func (x *UpdateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +183,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -202,7 +196,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +232,9 @@ type PauseModelRequest struct { func (x *PauseModelRequest) Reset() { *x = PauseModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseModelRequest) String() string { @@ -253,7 +245,7 @@ func (*PauseModelRequest) ProtoMessage() {} func (x *PauseModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -289,11 +281,9 @@ type ResumeModelRequest struct { func (x *ResumeModelRequest) Reset() { *x = ResumeModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeModelRequest) String() string { @@ -304,7 +294,7 @@ func (*ResumeModelRequest) ProtoMessage() {} func (x *ResumeModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +336,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -361,7 +349,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +399,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -426,7 +412,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +448,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -477,7 +461,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +505,9 @@ type TuneModelRequest struct { func (x *TuneModelRequest) Reset() { *x = TuneModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelRequest) String() string { @@ -536,7 +518,7 @@ func (*TuneModelRequest) ProtoMessage() {} func (x *TuneModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +554,9 @@ type CreateModelMetadata struct { func (x *CreateModelMetadata) Reset() { *x = CreateModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMetadata) String() string { @@ -587,7 +567,7 @@ func (*CreateModelMetadata) ProtoMessage() {} func (x *CreateModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +603,9 @@ type TuneModelMetadata struct { func (x *TuneModelMetadata) Reset() { *x = TuneModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelMetadata) String() string { @@ -638,7 +616,7 @@ func (*TuneModelMetadata) ProtoMessage() {} func (x *TuneModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +647,9 @@ type TuneModelResponse struct { func (x *TuneModelResponse) Reset() { *x = TuneModelResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TuneModelResponse) String() string { @@ -684,7 +660,7 @@ func (*TuneModelResponse) ProtoMessage() {} func (x *TuneModelResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_model_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,152 +954,6 @@ func file_google_cloud_retail_v2beta_model_service_proto_init() { return } file_google_cloud_retail_v2beta_model_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PauseModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResumeModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_model_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TuneModelResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/prediction_service.pb.go b/retail/apiv2beta/retailpb/prediction_service.pb.go index 19a595f2b44b..461cf9513a37 100755 --- a/retail/apiv2beta/retailpb/prediction_service.pb.go +++ b/retail/apiv2beta/retailpb/prediction_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/prediction_service.proto @@ -181,11 +181,9 @@ type PredictRequest struct { func (x *PredictRequest) Reset() { *x = PredictRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictRequest) String() string { @@ -196,7 +194,7 @@ func (*PredictRequest) ProtoMessage() {} func (x *PredictRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +288,9 @@ type PredictResponse struct { func (x *PredictResponse) Reset() { *x = PredictResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse) String() string { @@ -305,7 +301,7 @@ func (*PredictResponse) ProtoMessage() {} func (x *PredictResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +365,9 @@ type PredictResponse_PredictionResult struct { func (x *PredictResponse_PredictionResult) Reset() { *x = PredictResponse_PredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PredictResponse_PredictionResult) String() string { @@ -384,7 +378,7 @@ func (*PredictResponse_PredictionResult) ProtoMessage() {} func (x *PredictResponse_PredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,44 +575,6 @@ func file_google_cloud_retail_v2beta_prediction_service_proto_init() { return } file_google_cloud_retail_v2beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PredictRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_prediction_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PredictResponse_PredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/product.pb.go b/retail/apiv2beta/retailpb/product.pb.go index 535af565d6d1..b7a56192c572 100755 --- a/retail/apiv2beta/retailpb/product.pb.go +++ b/retail/apiv2beta/retailpb/product.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/product.proto @@ -607,11 +607,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -622,7 +620,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,20 +1201,6 @@ func file_google_cloud_retail_v2beta_product_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_promotion_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_product_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_product_proto_msgTypes[0].OneofWrappers = []any{ (*Product_ExpireTime)(nil), (*Product_Ttl)(nil), diff --git a/retail/apiv2beta/retailpb/product_service.pb.go b/retail/apiv2beta/retailpb/product_service.pb.go index 4ede05060f26..925f5c198f0b 100755 --- a/retail/apiv2beta/retailpb/product_service.pb.go +++ b/retail/apiv2beta/retailpb/product_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/product_service.proto @@ -77,11 +77,9 @@ type CreateProductRequest struct { func (x *CreateProductRequest) Reset() { *x = CreateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProductRequest) String() string { @@ -92,7 +90,7 @@ func (*CreateProductRequest) ProtoMessage() {} func (x *CreateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type GetProductRequest struct { func (x *GetProductRequest) Reset() { *x = GetProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductRequest) String() string { @@ -166,7 +162,7 @@ func (*GetProductRequest) ProtoMessage() {} func (x *GetProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +224,9 @@ type UpdateProductRequest struct { func (x *UpdateProductRequest) Reset() { *x = UpdateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProductRequest) String() string { @@ -243,7 +237,7 @@ func (*UpdateProductRequest) ProtoMessage() {} func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type DeleteProductRequest struct { func (x *DeleteProductRequest) Reset() { *x = DeleteProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductRequest) String() string { @@ -329,7 +321,7 @@ func (*DeleteProductRequest) ProtoMessage() {} func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +435,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -458,7 +448,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +517,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -542,7 +530,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +649,9 @@ type SetInventoryRequest struct { func (x *SetInventoryRequest) Reset() { *x = SetInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryRequest) String() string { @@ -676,7 +662,7 @@ func (*SetInventoryRequest) ProtoMessage() {} func (x *SetInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +717,9 @@ type SetInventoryMetadata struct { func (x *SetInventoryMetadata) Reset() { *x = SetInventoryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryMetadata) String() string { @@ -746,7 +730,7 @@ func (*SetInventoryMetadata) ProtoMessage() {} func (x *SetInventoryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +757,9 @@ type SetInventoryResponse struct { func (x *SetInventoryResponse) Reset() { *x = SetInventoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetInventoryResponse) String() string { @@ -788,7 +770,7 @@ func (*SetInventoryResponse) ProtoMessage() {} func (x *SetInventoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +853,9 @@ type AddFulfillmentPlacesRequest struct { func (x *AddFulfillmentPlacesRequest) Reset() { *x = AddFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesRequest) String() string { @@ -886,7 +866,7 @@ func (*AddFulfillmentPlacesRequest) ProtoMessage() {} func (x *AddFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,11 +928,9 @@ type AddFulfillmentPlacesMetadata struct { func (x *AddFulfillmentPlacesMetadata) Reset() { *x = AddFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesMetadata) String() string { @@ -963,7 +941,7 @@ func (*AddFulfillmentPlacesMetadata) ProtoMessage() {} func (x *AddFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +968,9 @@ type AddFulfillmentPlacesResponse struct { func (x *AddFulfillmentPlacesResponse) Reset() { *x = AddFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFulfillmentPlacesResponse) String() string { @@ -1005,7 +981,7 @@ func (*AddFulfillmentPlacesResponse) ProtoMessage() {} func (x *AddFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1047,9 @@ type AddLocalInventoriesRequest struct { func (x *AddLocalInventoriesRequest) Reset() { *x = AddLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesRequest) String() string { @@ -1086,7 +1060,7 @@ func (*AddLocalInventoriesRequest) ProtoMessage() {} func (x *AddLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1122,9 @@ type AddLocalInventoriesMetadata struct { func (x *AddLocalInventoriesMetadata) Reset() { *x = AddLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesMetadata) String() string { @@ -1163,7 +1135,7 @@ func (*AddLocalInventoriesMetadata) ProtoMessage() {} func (x *AddLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1192,11 +1164,9 @@ type AddLocalInventoriesResponse struct { func (x *AddLocalInventoriesResponse) Reset() { *x = AddLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddLocalInventoriesResponse) String() string { @@ -1207,7 +1177,7 @@ func (*AddLocalInventoriesResponse) ProtoMessage() {} func (x *AddLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1256,11 +1226,9 @@ type RemoveLocalInventoriesRequest struct { func (x *RemoveLocalInventoriesRequest) Reset() { *x = RemoveLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesRequest) String() string { @@ -1271,7 +1239,7 @@ func (*RemoveLocalInventoriesRequest) ProtoMessage() {} func (x *RemoveLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1326,11 +1294,9 @@ type RemoveLocalInventoriesMetadata struct { func (x *RemoveLocalInventoriesMetadata) Reset() { *x = RemoveLocalInventoriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesMetadata) String() string { @@ -1341,7 +1307,7 @@ func (*RemoveLocalInventoriesMetadata) ProtoMessage() {} func (x *RemoveLocalInventoriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1370,11 +1336,9 @@ type RemoveLocalInventoriesResponse struct { func (x *RemoveLocalInventoriesResponse) Reset() { *x = RemoveLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveLocalInventoriesResponse) String() string { @@ -1385,7 +1349,7 @@ func (*RemoveLocalInventoriesResponse) ProtoMessage() {} func (x *RemoveLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1463,11 +1427,9 @@ type RemoveFulfillmentPlacesRequest struct { func (x *RemoveFulfillmentPlacesRequest) Reset() { *x = RemoveFulfillmentPlacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesRequest) String() string { @@ -1478,7 +1440,7 @@ func (*RemoveFulfillmentPlacesRequest) ProtoMessage() {} func (x *RemoveFulfillmentPlacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1540,11 +1502,9 @@ type RemoveFulfillmentPlacesMetadata struct { func (x *RemoveFulfillmentPlacesMetadata) Reset() { *x = RemoveFulfillmentPlacesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesMetadata) String() string { @@ -1555,7 +1515,7 @@ func (*RemoveFulfillmentPlacesMetadata) ProtoMessage() {} func (x *RemoveFulfillmentPlacesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1582,11 +1542,9 @@ type RemoveFulfillmentPlacesResponse struct { func (x *RemoveFulfillmentPlacesResponse) Reset() { *x = RemoveFulfillmentPlacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFulfillmentPlacesResponse) String() string { @@ -1597,7 +1555,7 @@ func (*RemoveFulfillmentPlacesResponse) ProtoMessage() {} func (x *RemoveFulfillmentPlacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_product_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2160,260 +2118,6 @@ func file_google_cloud_retail_v2beta_product_service_proto_init() { file_google_cloud_retail_v2beta_import_config_proto_init() file_google_cloud_retail_v2beta_product_proto_init() file_google_cloud_retail_v2beta_purge_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SetInventoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AddFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AddLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RemoveLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_product_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RemoveFulfillmentPlacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/project.pb.go b/retail/apiv2beta/retailpb/project.pb.go index 76aea7cfbaf8..66af91c5174d 100755 --- a/retail/apiv2beta/retailpb/project.pb.go +++ b/retail/apiv2beta/retailpb/project.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/project.proto @@ -106,11 +106,9 @@ type AlertConfig struct { func (x *AlertConfig) Reset() { *x = AlertConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig) String() string { @@ -121,7 +119,7 @@ func (*AlertConfig) ProtoMessage() {} func (x *AlertConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type AlertConfig_AlertPolicy struct { func (x *AlertConfig_AlertPolicy) Reset() { *x = AlertConfig_AlertPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig_AlertPolicy) String() string { @@ -185,7 +181,7 @@ func (*AlertConfig_AlertPolicy) ProtoMessage() {} func (x *AlertConfig_AlertPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type AlertConfig_AlertPolicy_Recipient struct { func (x *AlertConfig_AlertPolicy_Recipient) Reset() { *x = AlertConfig_AlertPolicy_Recipient{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AlertConfig_AlertPolicy_Recipient) String() string { @@ -248,7 +242,7 @@ func (*AlertConfig_AlertPolicy_Recipient) ProtoMessage() {} func (x *AlertConfig_AlertPolicy_Recipient) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_project_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,44 +363,6 @@ func file_google_cloud_retail_v2beta_project_proto_init() { if File_google_cloud_retail_v2beta_project_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_project_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_project_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig_AlertPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_project_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AlertConfig_AlertPolicy_Recipient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/project_service.pb.go b/retail/apiv2beta/retailpb/project_service.pb.go index 05f6191f7486..5e829312d6a1 100755 --- a/retail/apiv2beta/retailpb/project_service.pb.go +++ b/retail/apiv2beta/retailpb/project_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/project_service.proto @@ -56,11 +56,9 @@ type GetAlertConfigRequest struct { func (x *GetAlertConfigRequest) Reset() { *x = GetAlertConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAlertConfigRequest) String() string { @@ -71,7 +69,7 @@ func (*GetAlertConfigRequest) ProtoMessage() {} func (x *GetAlertConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type UpdateAlertConfigRequest struct { func (x *UpdateAlertConfigRequest) Reset() { *x = UpdateAlertConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAlertConfigRequest) String() string { @@ -134,7 +130,7 @@ func (*UpdateAlertConfigRequest) ProtoMessage() {} func (x *UpdateAlertConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_project_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,32 +280,6 @@ func file_google_cloud_retail_v2beta_project_service_proto_init() { return } file_google_cloud_retail_v2beta_project_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetAlertConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAlertConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/promotion.pb.go b/retail/apiv2beta/retailpb/promotion.pb.go index 15b0a8c6a62e..b2b5ff8784c7 100755 --- a/retail/apiv2beta/retailpb/promotion.pb.go +++ b/retail/apiv2beta/retailpb/promotion.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/promotion.proto @@ -55,11 +55,9 @@ type Promotion struct { func (x *Promotion) Reset() { *x = Promotion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_promotion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_promotion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Promotion) String() string { @@ -70,7 +68,7 @@ func (*Promotion) ProtoMessage() {} func (x *Promotion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_promotion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,20 +145,6 @@ func file_google_cloud_retail_v2beta_promotion_proto_init() { if File_google_cloud_retail_v2beta_promotion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_promotion_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Promotion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/purge_config.pb.go b/retail/apiv2beta/retailpb/purge_config.pb.go index b7fe86274163..314b8c1383f9 100755 --- a/retail/apiv2beta/retailpb/purge_config.pb.go +++ b/retail/apiv2beta/retailpb/purge_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/purge_config.proto @@ -47,11 +47,9 @@ type PurgeMetadata struct { func (x *PurgeMetadata) Reset() { *x = PurgeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeMetadata) String() string { @@ -62,7 +60,7 @@ func (*PurgeMetadata) ProtoMessage() {} func (x *PurgeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -97,11 +95,9 @@ type PurgeProductsMetadata struct { func (x *PurgeProductsMetadata) Reset() { *x = PurgeProductsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsMetadata) String() string { @@ -112,7 +108,7 @@ func (*PurgeProductsMetadata) ProtoMessage() {} func (x *PurgeProductsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type PurgeProductsRequest struct { func (x *PurgeProductsRequest) Reset() { *x = PurgeProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsRequest) String() string { @@ -229,7 +223,7 @@ func (*PurgeProductsRequest) ProtoMessage() {} func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type PurgeProductsResponse struct { func (x *PurgeProductsResponse) Reset() { *x = PurgeProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsResponse) String() string { @@ -298,7 +290,7 @@ func (*PurgeProductsResponse) ProtoMessage() {} func (x *PurgeProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type PurgeUserEventsRequest struct { func (x *PurgeUserEventsRequest) Reset() { *x = PurgeUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsRequest) String() string { @@ -385,7 +375,7 @@ func (*PurgeUserEventsRequest) ProtoMessage() {} func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +425,9 @@ type PurgeUserEventsResponse struct { func (x *PurgeUserEventsResponse) Reset() { *x = PurgeUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeUserEventsResponse) String() string { @@ -450,7 +438,7 @@ func (*PurgeUserEventsResponse) ProtoMessage() {} func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,80 +572,6 @@ func file_google_cloud_retail_v2beta_purge_config_proto_init() { if File_google_cloud_retail_v2beta_purge_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PurgeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_purge_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PurgeUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/search_service.pb.go b/retail/apiv2beta/retailpb/search_service.pb.go index b10702ad96e3..400b3622589c 100755 --- a/retail/apiv2beta/retailpb/search_service.pb.go +++ b/retail/apiv2beta/retailpb/search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/search_service.proto @@ -362,11 +362,9 @@ type ProductAttributeValue struct { func (x *ProductAttributeValue) Reset() { *x = ProductAttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeValue) String() string { @@ -377,7 +375,7 @@ func (*ProductAttributeValue) ProtoMessage() {} func (x *ProductAttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,11 +418,9 @@ type ProductAttributeInterval struct { func (x *ProductAttributeInterval) Reset() { *x = ProductAttributeInterval{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductAttributeInterval) String() string { @@ -435,7 +431,7 @@ func (*ProductAttributeInterval) ProtoMessage() {} func (x *ProductAttributeInterval) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -485,11 +481,9 @@ type Tile struct { func (x *Tile) Reset() { *x = Tile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tile) String() string { @@ -500,7 +494,7 @@ func (*Tile) ProtoMessage() {} func (x *Tile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +830,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -851,7 +843,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,11 +1086,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -1109,7 +1099,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1235,11 +1225,9 @@ type ExperimentInfo struct { func (x *ExperimentInfo) Reset() { *x = ExperimentInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo) String() string { @@ -1250,7 +1238,7 @@ func (*ExperimentInfo) ProtoMessage() {} func (x *ExperimentInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1373,11 +1361,9 @@ type SearchRequest_FacetSpec struct { func (x *SearchRequest_FacetSpec) Reset() { *x = SearchRequest_FacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec) String() string { @@ -1388,7 +1374,7 @@ func (*SearchRequest_FacetSpec) ProtoMessage() {} func (x *SearchRequest_FacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1446,11 +1432,9 @@ type SearchRequest_DynamicFacetSpec struct { func (x *SearchRequest_DynamicFacetSpec) Reset() { *x = SearchRequest_DynamicFacetSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_DynamicFacetSpec) String() string { @@ -1461,7 +1445,7 @@ func (*SearchRequest_DynamicFacetSpec) ProtoMessage() {} func (x *SearchRequest_DynamicFacetSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1505,11 +1489,9 @@ type SearchRequest_BoostSpec struct { func (x *SearchRequest_BoostSpec) Reset() { *x = SearchRequest_BoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec) String() string { @@ -1520,7 +1502,7 @@ func (*SearchRequest_BoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1567,11 +1549,9 @@ type SearchRequest_QueryExpansionSpec struct { func (x *SearchRequest_QueryExpansionSpec) Reset() { *x = SearchRequest_QueryExpansionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_QueryExpansionSpec) String() string { @@ -1582,7 +1562,7 @@ func (*SearchRequest_QueryExpansionSpec) ProtoMessage() {} func (x *SearchRequest_QueryExpansionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,11 +1604,9 @@ type SearchRequest_PersonalizationSpec struct { func (x *SearchRequest_PersonalizationSpec) Reset() { *x = SearchRequest_PersonalizationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_PersonalizationSpec) String() string { @@ -1639,7 +1617,7 @@ func (*SearchRequest_PersonalizationSpec) ProtoMessage() {} func (x *SearchRequest_PersonalizationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,11 +1653,9 @@ type SearchRequest_SpellCorrectionSpec struct { func (x *SearchRequest_SpellCorrectionSpec) Reset() { *x = SearchRequest_SpellCorrectionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_SpellCorrectionSpec) String() string { @@ -1690,7 +1666,7 @@ func (*SearchRequest_SpellCorrectionSpec) ProtoMessage() {} func (x *SearchRequest_SpellCorrectionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1713,9 @@ type SearchRequest_ConversationalSearchSpec struct { func (x *SearchRequest_ConversationalSearchSpec) Reset() { *x = SearchRequest_ConversationalSearchSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec) String() string { @@ -1752,7 +1726,7 @@ func (*SearchRequest_ConversationalSearchSpec) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1806,11 +1780,9 @@ type SearchRequest_TileNavigationSpec struct { func (x *SearchRequest_TileNavigationSpec) Reset() { *x = SearchRequest_TileNavigationSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_TileNavigationSpec) String() string { @@ -1821,7 +1793,7 @@ func (*SearchRequest_TileNavigationSpec) ProtoMessage() {} func (x *SearchRequest_TileNavigationSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2007,11 +1979,9 @@ type SearchRequest_FacetSpec_FacetKey struct { func (x *SearchRequest_FacetSpec_FacetKey) Reset() { *x = SearchRequest_FacetSpec_FacetKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_FacetSpec_FacetKey) String() string { @@ -2022,7 +1992,7 @@ func (*SearchRequest_FacetSpec_FacetKey) ProtoMessage() {} func (x *SearchRequest_FacetSpec_FacetKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2142,11 +2112,9 @@ type SearchRequest_BoostSpec_ConditionBoostSpec struct { func (x *SearchRequest_BoostSpec_ConditionBoostSpec) Reset() { *x = SearchRequest_BoostSpec_ConditionBoostSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_BoostSpec_ConditionBoostSpec) String() string { @@ -2157,7 +2125,7 @@ func (*SearchRequest_BoostSpec_ConditionBoostSpec) ProtoMessage() {} func (x *SearchRequest_BoostSpec_ConditionBoostSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2205,11 +2173,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) String() string { @@ -2220,7 +2186,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoMessage() {} func (x *SearchRequest_ConversationalSearchSpec_UserAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2297,11 +2263,9 @@ type SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer struct { func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) Reset() { *x = SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) String() string { @@ -2312,7 +2276,7 @@ func (*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoMe func (x *SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2433,11 +2397,9 @@ type SearchResponse_SearchResult struct { func (x *SearchResponse_SearchResult) Reset() { *x = SearchResponse_SearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_SearchResult) String() string { @@ -2448,7 +2410,7 @@ func (*SearchResponse_SearchResult) ProtoMessage() {} func (x *SearchResponse_SearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2522,11 +2484,9 @@ type SearchResponse_Facet struct { func (x *SearchResponse_Facet) Reset() { *x = SearchResponse_Facet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet) String() string { @@ -2537,7 +2497,7 @@ func (*SearchResponse_Facet) ProtoMessage() {} func (x *SearchResponse_Facet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2591,11 +2551,9 @@ type SearchResponse_QueryExpansionInfo struct { func (x *SearchResponse_QueryExpansionInfo) Reset() { *x = SearchResponse_QueryExpansionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_QueryExpansionInfo) String() string { @@ -2606,7 +2564,7 @@ func (*SearchResponse_QueryExpansionInfo) ProtoMessage() {} func (x *SearchResponse_QueryExpansionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2677,11 +2635,9 @@ type SearchResponse_ConversationalSearchResult struct { func (x *SearchResponse_ConversationalSearchResult) Reset() { *x = SearchResponse_ConversationalSearchResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult) String() string { @@ -2692,7 +2648,7 @@ func (*SearchResponse_ConversationalSearchResult) ProtoMessage() {} func (x *SearchResponse_ConversationalSearchResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2764,11 +2720,9 @@ type SearchResponse_TileNavigationResult struct { func (x *SearchResponse_TileNavigationResult) Reset() { *x = SearchResponse_TileNavigationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_TileNavigationResult) String() string { @@ -2779,7 +2733,7 @@ func (*SearchResponse_TileNavigationResult) ProtoMessage() {} func (x *SearchResponse_TileNavigationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2832,11 +2786,9 @@ type SearchResponse_Facet_FacetValue struct { func (x *SearchResponse_Facet_FacetValue) Reset() { *x = SearchResponse_Facet_FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_Facet_FacetValue) String() string { @@ -2847,7 +2799,7 @@ func (*SearchResponse_Facet_FacetValue) ProtoMessage() {} func (x *SearchResponse_Facet_FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2935,11 +2887,9 @@ type SearchResponse_ConversationalSearchResult_SuggestedAnswer struct { func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) Reset() { *x = SearchResponse_ConversationalSearchResult_SuggestedAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) String() string { @@ -2950,7 +2900,7 @@ func (*SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoMessage() func (x *SearchResponse_ConversationalSearchResult_SuggestedAnswer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2985,11 +2935,9 @@ type SearchResponse_ConversationalSearchResult_AdditionalFilter struct { func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) Reset() { *x = SearchResponse_ConversationalSearchResult_AdditionalFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) String() string { @@ -3000,7 +2948,7 @@ func (*SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoMessage( func (x *SearchResponse_ConversationalSearchResult_AdditionalFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3042,11 +2990,9 @@ type ExperimentInfo_ServingConfigExperiment struct { func (x *ExperimentInfo_ServingConfigExperiment) Reset() { *x = ExperimentInfo_ServingConfigExperiment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentInfo_ServingConfigExperiment) String() string { @@ -3057,7 +3003,7 @@ func (*ExperimentInfo_ServingConfigExperiment) ProtoMessage() {} func (x *ExperimentInfo_ServingConfigExperiment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3790,332 +3736,6 @@ func file_google_cloud_retail_v2beta_search_service_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductAttributeInterval); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Tile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_DynamicFacetSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_QueryExpansionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_PersonalizationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_SpellCorrectionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_TileNavigationSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_FacetSpec_FacetKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_BoostSpec_ConditionBoostSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest_ConversationalSearchSpec_UserAnswer_SelectedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_SearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_QueryExpansionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_TileNavigationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_Facet_FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_SuggestedAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse_ConversationalSearchResult_AdditionalFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ExperimentInfo_ServingConfigExperiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_search_service_proto_msgTypes[2].OneofWrappers = []any{ (*Tile_ProductAttributeValue)(nil), (*Tile_ProductAttributeInterval)(nil), diff --git a/retail/apiv2beta/retailpb/serving_config.pb.go b/retail/apiv2beta/retailpb/serving_config.pb.go index f47c105f9bc7..ba23f7bd2a15 100755 --- a/retail/apiv2beta/retailpb/serving_config.pb.go +++ b/retail/apiv2beta/retailpb/serving_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/serving_config.proto @@ -312,11 +312,9 @@ type ServingConfig struct { func (x *ServingConfig) Reset() { *x = ServingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServingConfig) String() string { @@ -327,7 +325,7 @@ func (*ServingConfig) ProtoMessage() {} func (x *ServingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,20 +643,6 @@ func file_google_cloud_retail_v2beta_serving_config_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_serving_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ServingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/serving_config_service.pb.go b/retail/apiv2beta/retailpb/serving_config_service.pb.go index 9ecda848419b..b24d70c21d71 100755 --- a/retail/apiv2beta/retailpb/serving_config_service.pb.go +++ b/retail/apiv2beta/retailpb/serving_config_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/serving_config_service.proto @@ -63,11 +63,9 @@ type CreateServingConfigRequest struct { func (x *CreateServingConfigRequest) Reset() { *x = CreateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServingConfigRequest) String() string { @@ -78,7 +76,7 @@ func (*CreateServingConfigRequest) ProtoMessage() {} func (x *CreateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,11 +132,9 @@ type UpdateServingConfigRequest struct { func (x *UpdateServingConfigRequest) Reset() { *x = UpdateServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServingConfigRequest) String() string { @@ -149,7 +145,7 @@ func (*UpdateServingConfigRequest) ProtoMessage() {} func (x *UpdateServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +187,9 @@ type DeleteServingConfigRequest struct { func (x *DeleteServingConfigRequest) Reset() { *x = DeleteServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServingConfigRequest) String() string { @@ -206,7 +200,7 @@ func (*DeleteServingConfigRequest) ProtoMessage() {} func (x *DeleteServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +235,9 @@ type GetServingConfigRequest struct { func (x *GetServingConfigRequest) Reset() { *x = GetServingConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServingConfigRequest) String() string { @@ -256,7 +248,7 @@ func (*GetServingConfigRequest) ProtoMessage() {} func (x *GetServingConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type ListServingConfigsRequest struct { func (x *ListServingConfigsRequest) Reset() { *x = ListServingConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsRequest) String() string { @@ -313,7 +303,7 @@ func (*ListServingConfigsRequest) ProtoMessage() {} func (x *ListServingConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +353,9 @@ type ListServingConfigsResponse struct { func (x *ListServingConfigsResponse) Reset() { *x = ListServingConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServingConfigsResponse) String() string { @@ -378,7 +366,7 @@ func (*ListServingConfigsResponse) ProtoMessage() {} func (x *ListServingConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +411,9 @@ type AddControlRequest struct { func (x *AddControlRequest) Reset() { *x = AddControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddControlRequest) String() string { @@ -438,7 +424,7 @@ func (*AddControlRequest) ProtoMessage() {} func (x *AddControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type RemoveControlRequest struct { func (x *RemoveControlRequest) Reset() { *x = RemoveControlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveControlRequest) String() string { @@ -498,7 +482,7 @@ func (*RemoveControlRequest) ProtoMessage() {} func (x *RemoveControlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -804,104 +788,6 @@ func file_google_cloud_retail_v2beta_serving_config_service_proto_init() { return } file_google_cloud_retail_v2beta_serving_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetServingConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListServingConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AddControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_serving_config_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RemoveControlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/user_event.pb.go b/retail/apiv2beta/retailpb/user_event.pb.go index e7958ff1410c..5cce165fc09c 100755 --- a/retail/apiv2beta/retailpb/user_event.pb.go +++ b/retail/apiv2beta/retailpb/user_event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/user_event.proto @@ -271,11 +271,9 @@ type UserEvent struct { func (x *UserEvent) Reset() { *x = UserEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserEvent) String() string { @@ -286,7 +284,7 @@ func (*UserEvent) ProtoMessage() {} func (x *UserEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +480,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -497,7 +493,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +543,9 @@ type CompletionDetail struct { func (x *CompletionDetail) Reset() { *x = CompletionDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompletionDetail) String() string { @@ -562,7 +556,7 @@ func (*CompletionDetail) ProtoMessage() {} func (x *CompletionDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,11 +622,9 @@ type PurchaseTransaction struct { func (x *PurchaseTransaction) Reset() { *x = PurchaseTransaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurchaseTransaction) String() string { @@ -643,7 +635,7 @@ func (*PurchaseTransaction) ProtoMessage() {} func (x *PurchaseTransaction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,56 +866,6 @@ func file_google_cloud_retail_v2beta_user_event_proto_init() { } file_google_cloud_retail_v2beta_common_proto_init() file_google_cloud_retail_v2beta_product_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_user_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UserEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompletionDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PurchaseTransaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/retail/apiv2beta/retailpb/user_event_service.pb.go b/retail/apiv2beta/retailpb/user_event_service.pb.go index 63538ed46327..81a762e7fb85 100755 --- a/retail/apiv2beta/retailpb/user_event_service.pb.go +++ b/retail/apiv2beta/retailpb/user_event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/retail/v2beta/user_event_service.proto @@ -122,11 +122,9 @@ type WriteUserEventRequest struct { func (x *WriteUserEventRequest) Reset() { *x = WriteUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteUserEventRequest) String() string { @@ -137,7 +135,7 @@ func (*WriteUserEventRequest) ProtoMessage() {} func (x *WriteUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +208,9 @@ type CollectUserEventRequest struct { func (x *CollectUserEventRequest) Reset() { *x = CollectUserEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectUserEventRequest) String() string { @@ -225,7 +221,7 @@ func (*CollectUserEventRequest) ProtoMessage() {} func (x *CollectUserEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +315,9 @@ type RejoinUserEventsRequest struct { func (x *RejoinUserEventsRequest) Reset() { *x = RejoinUserEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsRequest) String() string { @@ -334,7 +328,7 @@ func (*RejoinUserEventsRequest) ProtoMessage() {} func (x *RejoinUserEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,11 +369,9 @@ type RejoinUserEventsResponse struct { func (x *RejoinUserEventsResponse) Reset() { *x = RejoinUserEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsResponse) String() string { @@ -390,7 +382,7 @@ func (*RejoinUserEventsResponse) ProtoMessage() {} func (x *RejoinUserEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -421,11 +413,9 @@ type RejoinUserEventsMetadata struct { func (x *RejoinUserEventsMetadata) Reset() { *x = RejoinUserEventsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejoinUserEventsMetadata) String() string { @@ -436,7 +426,7 @@ func (*RejoinUserEventsMetadata) ProtoMessage() {} func (x *RejoinUserEventsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,68 +694,6 @@ func file_google_cloud_retail_v2beta_user_event_service_proto_init() { file_google_cloud_retail_v2beta_import_config_proto_init() file_google_cloud_retail_v2beta_purge_config_proto_init() file_google_cloud_retail_v2beta_user_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WriteUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CollectUserEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RejoinUserEventsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_retail_v2beta_user_event_service_proto_msgTypes[1].OneofWrappers = []any{ (*CollectUserEventRequest_PrebuiltRule)(nil), } diff --git a/retail/apiv2beta/search_client.go b/retail/apiv2beta/search_client.go index cb78993a1761..973981b813bd 100755 --- a/retail/apiv2beta/search_client.go +++ b/retail/apiv2beta/search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -210,6 +209,8 @@ type searchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSearchClient creates a new search service client based on gRPC. @@ -239,6 +240,7 @@ func NewSearchClient(ctx context.Context, opts ...option.ClientOption) (*SearchC connPool: connPool, searchClient: retailpb.NewSearchServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -286,6 +288,8 @@ type searchRESTClient struct { // Points back to the CallOptions field of the containing SearchClient CallOptions **SearchCallOptions + + logger *slog.Logger } // NewSearchRESTClient creates a new search service rest client. @@ -306,6 +310,7 @@ func NewSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*Sea endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -369,7 +374,7 @@ func (c *searchGRPCClient) Search(ctx context.Context, req *retailpb.SearchReque } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.searchClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.searchClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -404,7 +409,7 @@ func (c *searchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *searchGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -507,21 +512,10 @@ func (c *searchRESTClient) Search(ctx context.Context, req *retailpb.SearchReque } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -584,17 +578,7 @@ func (c *searchRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -659,21 +643,10 @@ func (c *searchRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/search_client_example_go123_test.go b/retail/apiv2beta/search_client_example_go123_test.go index 6b5546307165..757bcdd47a80 100644 --- a/retail/apiv2beta/search_client_example_go123_test.go +++ b/retail/apiv2beta/search_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleSearchClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleSearchClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/serving_config_client.go b/retail/apiv2beta/serving_config_client.go index aa02e087b6d1..cbed529c0290 100755 --- a/retail/apiv2beta/serving_config_client.go +++ b/retail/apiv2beta/serving_config_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -252,6 +251,8 @@ type servingConfigGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServingConfigClient creates a new serving config service client based on gRPC. @@ -278,6 +279,7 @@ func NewServingConfigClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, servingConfigClient: retailpb.NewServingConfigServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -325,6 +327,8 @@ type servingConfigRESTClient struct { // Points back to the CallOptions field of the containing ServingConfigClient CallOptions **ServingConfigCallOptions + + logger *slog.Logger } // NewServingConfigRESTClient creates a new serving config service rest client. @@ -342,6 +346,7 @@ func NewServingConfigRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -394,7 +399,7 @@ func (c *servingConfigGRPCClient) CreateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.CreateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.CreateServingConfig, req, settings.GRPC, c.logger, "CreateServingConfig") return err }, opts...) if err != nil { @@ -411,7 +416,7 @@ func (c *servingConfigGRPCClient) DeleteServingConfig(ctx context.Context, req * opts = append((*c.CallOptions).DeleteServingConfig[0:len((*c.CallOptions).DeleteServingConfig):len((*c.CallOptions).DeleteServingConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.servingConfigClient.DeleteServingConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.servingConfigClient.DeleteServingConfig, req, settings.GRPC, c.logger, "DeleteServingConfig") return err }, opts...) return err @@ -426,7 +431,7 @@ func (c *servingConfigGRPCClient) UpdateServingConfig(ctx context.Context, req * var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.UpdateServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.UpdateServingConfig, req, settings.GRPC, c.logger, "UpdateServingConfig") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *servingConfigGRPCClient) GetServingConfig(ctx context.Context, req *ret var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.GetServingConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.GetServingConfig, req, settings.GRPC, c.logger, "GetServingConfig") return err }, opts...) if err != nil { @@ -473,7 +478,7 @@ func (c *servingConfigGRPCClient) ListServingConfigs(ctx context.Context, req *r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.ListServingConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.ListServingConfigs, req, settings.GRPC, c.logger, "ListServingConfigs") return err }, opts...) if err != nil { @@ -508,7 +513,7 @@ func (c *servingConfigGRPCClient) AddControl(ctx context.Context, req *retailpb. var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.AddControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.AddControl, req, settings.GRPC, c.logger, "AddControl") return err }, opts...) if err != nil { @@ -526,7 +531,7 @@ func (c *servingConfigGRPCClient) RemoveControl(ctx context.Context, req *retail var resp *retailpb.ServingConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servingConfigClient.RemoveControl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servingConfigClient.RemoveControl, req, settings.GRPC, c.logger, "RemoveControl") return err }, opts...) if err != nil { @@ -544,7 +549,7 @@ func (c *servingConfigGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -573,7 +578,7 @@ func (c *servingConfigGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -644,17 +649,7 @@ func (c *servingConfigRESTClient) CreateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServingConfig") if err != nil { return err } @@ -703,15 +698,8 @@ func (c *servingConfigRESTClient) DeleteServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteServingConfig") + return err }, opts...) } @@ -762,17 +750,7 @@ func (c *servingConfigRESTClient) UpdateServingConfig(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateServingConfig") if err != nil { return err } @@ -824,17 +802,7 @@ func (c *servingConfigRESTClient) GetServingConfig(ctx context.Context, req *ret httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServingConfig") if err != nil { return err } @@ -896,21 +864,10 @@ func (c *servingConfigRESTClient) ListServingConfigs(ctx context.Context, req *r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServingConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -985,17 +942,7 @@ func (c *servingConfigRESTClient) AddControl(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddControl") if err != nil { return err } @@ -1054,17 +1001,7 @@ func (c *servingConfigRESTClient) RemoveControl(ctx context.Context, req *retail httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveControl") if err != nil { return err } @@ -1114,17 +1051,7 @@ func (c *servingConfigRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1189,21 +1116,10 @@ func (c *servingConfigRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/serving_config_client_example_go123_test.go b/retail/apiv2beta/serving_config_client_example_go123_test.go index 30c3f018d57b..1170b12efcb6 100644 --- a/retail/apiv2beta/serving_config_client_example_go123_test.go +++ b/retail/apiv2beta/serving_config_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServingConfigClient_ListServingConfigs_all() { } for resp, err := range c.ListServingConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServingConfigClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/retail/apiv2beta/user_event_client.go b/retail/apiv2beta/user_event_client.go index 06f3893b6b0a..df68c3f4fc83 100755 --- a/retail/apiv2beta/user_event_client.go +++ b/retail/apiv2beta/user_event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" retailpb "cloud.google.com/go/retail/apiv2beta/retailpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -428,6 +427,8 @@ type userEventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserEventClient creates a new user event service client based on gRPC. @@ -454,6 +455,7 @@ func NewUserEventClient(ctx context.Context, opts ...option.ClientOption) (*User connPool: connPool, userEventClient: retailpb.NewUserEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -517,6 +519,8 @@ type userEventRESTClient struct { // Points back to the CallOptions field of the containing UserEventClient CallOptions **UserEventCallOptions + + logger *slog.Logger } // NewUserEventRESTClient creates a new user event service rest client. @@ -534,6 +538,7 @@ func NewUserEventRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -596,7 +601,7 @@ func (c *userEventGRPCClient) WriteUserEvent(ctx context.Context, req *retailpb. var resp *retailpb.UserEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.WriteUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.WriteUserEvent, req, settings.GRPC, c.logger, "WriteUserEvent") return err }, opts...) if err != nil { @@ -614,7 +619,7 @@ func (c *userEventGRPCClient) CollectUserEvent(ctx context.Context, req *retailp var resp *httpbodypb.HttpBody err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.CollectUserEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.CollectUserEvent, req, settings.GRPC, c.logger, "CollectUserEvent") return err }, opts...) if err != nil { @@ -632,7 +637,7 @@ func (c *userEventGRPCClient) PurgeUserEvents(ctx context.Context, req *retailpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.PurgeUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.PurgeUserEvents, req, settings.GRPC, c.logger, "PurgeUserEvents") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *userEventGRPCClient) ImportUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ImportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ImportUserEvents, req, settings.GRPC, c.logger, "ImportUserEvents") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *userEventGRPCClient) ExportUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.ExportUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.ExportUserEvents, req, settings.GRPC, c.logger, "ExportUserEvents") return err }, opts...) if err != nil { @@ -692,7 +697,7 @@ func (c *userEventGRPCClient) RejoinUserEvents(ctx context.Context, req *retailp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userEventClient.RejoinUserEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userEventClient.RejoinUserEvents, req, settings.GRPC, c.logger, "RejoinUserEvents") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *userEventGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -741,7 +746,7 @@ func (c *userEventGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -810,17 +815,7 @@ func (c *userEventRESTClient) WriteUserEvent(ctx context.Context, req *retailpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WriteUserEvent") if err != nil { return err } @@ -886,17 +881,7 @@ func (c *userEventRESTClient) CollectUserEvent(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, httpRsp, err := executeHTTPRequestWithResponse(ctx, c.httpClient, httpReq, c.logger, nil, "CollectUserEvent") if err != nil { return err } @@ -955,21 +940,10 @@ func (c *userEventRESTClient) PurgeUserEvents(ctx context.Context, req *retailpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1031,21 +1005,10 @@ func (c *userEventRESTClient) ImportUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1104,21 +1067,10 @@ func (c *userEventRESTClient) ExportUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1181,21 +1133,10 @@ func (c *userEventRESTClient) RejoinUserEvents(ctx context.Context, req *retailp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RejoinUserEvents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1246,17 +1187,7 @@ func (c *userEventRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1321,21 +1252,10 @@ func (c *userEventRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/retail/apiv2beta/user_event_client_example_go123_test.go b/retail/apiv2beta/user_event_client_example_go123_test.go index 0ccc419098dc..389dd8307a31 100644 --- a/retail/apiv2beta/user_event_client_example_go123_test.go +++ b/retail/apiv2beta/user_event_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserEventClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/builds_client.go b/run/apiv2/builds_client.go index e830292a2eba..89eb12b311a0 100755 --- a/run/apiv2/builds_client.go +++ b/run/apiv2/builds_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -174,6 +173,8 @@ type buildsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBuildsClient creates a new builds client based on gRPC. @@ -200,6 +201,7 @@ func NewBuildsClient(ctx context.Context, opts ...option.ClientOption) (*BuildsC connPool: connPool, buildsClient: runpb.NewBuildsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -247,6 +249,8 @@ type buildsRESTClient struct { // Points back to the CallOptions field of the containing BuildsClient CallOptions **BuildsCallOptions + + logger *slog.Logger } // NewBuildsRESTClient creates a new builds rest client. @@ -264,6 +268,7 @@ func NewBuildsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Bui endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -316,7 +321,7 @@ func (c *buildsGRPCClient) SubmitBuild(ctx context.Context, req *runpb.SubmitBui var resp *runpb.SubmitBuildResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.buildsClient.SubmitBuild(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.buildsClient.SubmitBuild, req, settings.GRPC, c.logger, "SubmitBuild") return err }, opts...) if err != nil { @@ -333,7 +338,7 @@ func (c *buildsGRPCClient) DeleteOperation(ctx context.Context, req *longrunning opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -348,7 +353,7 @@ func (c *buildsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -377,7 +382,7 @@ func (c *buildsGRPCClient) ListOperations(ctx context.Context, req *longrunningp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -412,7 +417,7 @@ func (c *buildsGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -460,17 +465,7 @@ func (c *buildsRESTClient) SubmitBuild(ctx context.Context, req *runpb.SubmitBui httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitBuild") if err != nil { return err } @@ -517,15 +512,8 @@ func (c *buildsRESTClient) DeleteOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -562,17 +550,7 @@ func (c *buildsRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -637,21 +615,10 @@ func (c *buildsRESTClient) ListOperations(ctx context.Context, req *longrunningp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -720,17 +687,7 @@ func (c *buildsRESTClient) WaitOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/builds_client_example_go123_test.go b/run/apiv2/builds_client_example_go123_test.go index 7d2e2e95f291..f6ccaa1d901b 100644 --- a/run/apiv2/builds_client_example_go123_test.go +++ b/run/apiv2/builds_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleBuildsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/executions_client.go b/run/apiv2/executions_client.go index 2871e47196e5..4758aa6d79ba 100755 --- a/run/apiv2/executions_client.go +++ b/run/apiv2/executions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -228,6 +227,8 @@ type executionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewExecutionsClient creates a new executions client based on gRPC. @@ -254,6 +255,7 @@ func NewExecutionsClient(ctx context.Context, opts ...option.ClientOption) (*Exe connPool: connPool, executionsClient: runpb.NewExecutionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -317,6 +319,8 @@ type executionsRESTClient struct { // Points back to the CallOptions field of the containing ExecutionsClient CallOptions **ExecutionsCallOptions + + logger *slog.Logger } // NewExecutionsRESTClient creates a new executions rest client. @@ -334,6 +338,7 @@ func NewExecutionsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -396,7 +401,7 @@ func (c *executionsGRPCClient) GetExecution(ctx context.Context, req *runpb.GetE var resp *runpb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.executionsClient.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.executionsClient.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -425,7 +430,7 @@ func (c *executionsGRPCClient) ListExecutions(ctx context.Context, req *runpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.executionsClient.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.executionsClient.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -460,7 +465,7 @@ func (c *executionsGRPCClient) DeleteExecution(ctx context.Context, req *runpb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.executionsClient.DeleteExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.executionsClient.DeleteExecution, req, settings.GRPC, c.logger, "DeleteExecution") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *executionsGRPCClient) CancelExecution(ctx context.Context, req *runpb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.executionsClient.CancelExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.executionsClient.CancelExecution, req, settings.GRPC, c.logger, "CancelExecution") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *executionsGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -514,7 +519,7 @@ func (c *executionsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -543,7 +548,7 @@ func (c *executionsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -578,7 +583,7 @@ func (c *executionsGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -620,17 +625,7 @@ func (c *executionsRESTClient) GetExecution(ctx context.Context, req *runpb.GetE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExecution") if err != nil { return err } @@ -696,21 +691,10 @@ func (c *executionsRESTClient) ListExecutions(ctx context.Context, req *runpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExecutions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -778,21 +762,10 @@ func (c *executionsRESTClient) DeleteExecution(ctx context.Context, req *runpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExecution") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -848,21 +821,10 @@ func (c *executionsRESTClient) CancelExecution(ctx context.Context, req *runpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelExecution") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -910,15 +872,8 @@ func (c *executionsRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -955,17 +910,7 @@ func (c *executionsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1030,21 +975,10 @@ func (c *executionsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1113,17 +1047,7 @@ func (c *executionsRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/executions_client_example_go123_test.go b/run/apiv2/executions_client_example_go123_test.go index 067d0a3e8165..1b49d7c7bee1 100644 --- a/run/apiv2/executions_client_example_go123_test.go +++ b/run/apiv2/executions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleExecutionsClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleExecutionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/helpers.go b/run/apiv2/helpers.go index ea43e819d961..61e32e7281a6 100755 --- a/run/apiv2/helpers.go +++ b/run/apiv2/helpers.go @@ -18,10 +18,20 @@ package run import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "run.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/run/apiv2/jobs_client.go b/run/apiv2/jobs_client.go index 0b3f08eeb3e3..18aa63eae70f 100755 --- a/run/apiv2/jobs_client.go +++ b/run/apiv2/jobs_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -33,7 +33,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -293,6 +292,8 @@ type jobsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobsClient creates a new jobs client based on gRPC. @@ -319,6 +320,7 @@ func NewJobsClient(ctx context.Context, opts ...option.ClientOption) (*JobsClien connPool: connPool, jobsClient: runpb.NewJobsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -382,6 +384,8 @@ type jobsRESTClient struct { // Points back to the CallOptions field of the containing JobsClient CallOptions **JobsCallOptions + + logger *slog.Logger } // NewJobsRESTClient creates a new jobs rest client. @@ -399,6 +403,7 @@ func NewJobsRESTClient(ctx context.Context, opts ...option.ClientOption) (*JobsC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -470,7 +475,7 @@ func (c *jobsGRPCClient) CreateJob(ctx context.Context, req *runpb.CreateJobRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *jobsGRPCClient) GetJob(ctx context.Context, req *runpb.GetJobRequest, o var resp *runpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -537,7 +542,7 @@ func (c *jobsGRPCClient) ListJobs(ctx context.Context, req *runpb.ListJobsReques } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -581,7 +586,7 @@ func (c *jobsGRPCClient) UpdateJob(ctx context.Context, req *runpb.UpdateJobRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -610,7 +615,7 @@ func (c *jobsGRPCClient) DeleteJob(ctx context.Context, req *runpb.DeleteJobRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.DeleteJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) if err != nil { @@ -639,7 +644,7 @@ func (c *jobsGRPCClient) RunJob(ctx context.Context, req *runpb.RunJobRequest, o var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.RunJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.RunJob, req, settings.GRPC, c.logger, "RunJob") return err }, opts...) if err != nil { @@ -659,7 +664,7 @@ func (c *jobsGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPoli var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *jobsGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPoli var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -695,7 +700,7 @@ func (c *jobsGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.Test var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobsClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobsClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *jobsGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -727,7 +732,7 @@ func (c *jobsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Ge var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -756,7 +761,7 @@ func (c *jobsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -791,7 +796,7 @@ func (c *jobsGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.W var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -852,21 +857,10 @@ func (c *jobsRESTClient) CreateJob(ctx context.Context, req *runpb.CreateJobRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -926,17 +920,7 @@ func (c *jobsRESTClient) GetJob(ctx context.Context, req *runpb.GetJobRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -1001,21 +985,10 @@ func (c *jobsRESTClient) ListJobs(ctx context.Context, req *runpb.ListJobsReques } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1099,21 +1072,10 @@ func (c *jobsRESTClient) UpdateJob(ctx context.Context, req *runpb.UpdateJobRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1178,21 +1140,10 @@ func (c *jobsRESTClient) DeleteJob(ctx context.Context, req *runpb.DeleteJobRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1257,21 +1208,10 @@ func (c *jobsRESTClient) RunJob(ctx context.Context, req *runpb.RunJobRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1326,17 +1266,7 @@ func (c *jobsRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPoli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1393,17 +1323,7 @@ func (c *jobsRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPoli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1461,17 +1381,7 @@ func (c *jobsRESTClient) TestIamPermissions(ctx context.Context, req *iampb.Test httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1518,15 +1428,8 @@ func (c *jobsRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1563,17 +1466,7 @@ func (c *jobsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1638,21 +1531,10 @@ func (c *jobsRESTClient) ListOperations(ctx context.Context, req *longrunningpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1721,17 +1603,7 @@ func (c *jobsRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.W httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/jobs_client_example_go123_test.go b/run/apiv2/jobs_client_example_go123_test.go index bd9fed3809dc..21253917ab1f 100644 --- a/run/apiv2/jobs_client_example_go123_test.go +++ b/run/apiv2/jobs_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleJobsClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleJobsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/revisions_client.go b/run/apiv2/revisions_client.go index f4372fec58b6..a8060f071fd4 100755 --- a/run/apiv2/revisions_client.go +++ b/run/apiv2/revisions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -214,6 +213,8 @@ type revisionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRevisionsClient creates a new revisions client based on gRPC. @@ -240,6 +241,7 @@ func NewRevisionsClient(ctx context.Context, opts ...option.ClientOption) (*Revi connPool: connPool, revisionsClient: runpb.NewRevisionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -303,6 +305,8 @@ type revisionsRESTClient struct { // Points back to the CallOptions field of the containing RevisionsClient CallOptions **RevisionsCallOptions + + logger *slog.Logger } // NewRevisionsRESTClient creates a new revisions rest client. @@ -320,6 +324,7 @@ func NewRevisionsRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -391,7 +396,7 @@ func (c *revisionsGRPCClient) GetRevision(ctx context.Context, req *runpb.GetRev var resp *runpb.Revision err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.revisionsClient.GetRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.revisionsClient.GetRevision, req, settings.GRPC, c.logger, "GetRevision") return err }, opts...) if err != nil { @@ -429,7 +434,7 @@ func (c *revisionsGRPCClient) ListRevisions(ctx context.Context, req *runpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.revisionsClient.ListRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.revisionsClient.ListRevisions, req, settings.GRPC, c.logger, "ListRevisions") return err }, opts...) if err != nil { @@ -473,7 +478,7 @@ func (c *revisionsGRPCClient) DeleteRevision(ctx context.Context, req *runpb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.revisionsClient.DeleteRevision(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.revisionsClient.DeleteRevision, req, settings.GRPC, c.logger, "DeleteRevision") return err }, opts...) if err != nil { @@ -492,7 +497,7 @@ func (c *revisionsGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -507,7 +512,7 @@ func (c *revisionsGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *revisionsGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *revisionsGRPCClient) WaitOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -622,17 +627,7 @@ func (c *revisionsRESTClient) GetRevision(ctx context.Context, req *runpb.GetRev httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRevision") if err != nil { return err } @@ -698,21 +693,10 @@ func (c *revisionsRESTClient) ListRevisions(ctx context.Context, req *runpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRevisions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -789,21 +773,10 @@ func (c *revisionsRESTClient) DeleteRevision(ctx context.Context, req *runpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRevision") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -851,15 +824,8 @@ func (c *revisionsRESTClient) DeleteOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -896,17 +862,7 @@ func (c *revisionsRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -971,21 +927,10 @@ func (c *revisionsRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1054,17 +999,7 @@ func (c *revisionsRESTClient) WaitOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/revisions_client_example_go123_test.go b/run/apiv2/revisions_client_example_go123_test.go index 1c12220b2f2d..578291f2038f 100644 --- a/run/apiv2/revisions_client_example_go123_test.go +++ b/run/apiv2/revisions_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleRevisionsClient_ListRevisions_all() { } for resp, err := range c.ListRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleRevisionsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/runpb/build.pb.go b/run/apiv2/runpb/build.pb.go index f9f25611311b..46239a688486 100755 --- a/run/apiv2/runpb/build.pb.go +++ b/run/apiv2/runpb/build.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/build.proto @@ -83,11 +83,9 @@ type SubmitBuildRequest struct { func (x *SubmitBuildRequest) Reset() { *x = SubmitBuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_build_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_build_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitBuildRequest) String() string { @@ -98,7 +96,7 @@ func (*SubmitBuildRequest) ProtoMessage() {} func (x *SubmitBuildRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_build_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +227,9 @@ type SubmitBuildResponse struct { func (x *SubmitBuildResponse) Reset() { *x = SubmitBuildResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_build_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_build_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitBuildResponse) String() string { @@ -244,7 +240,7 @@ func (*SubmitBuildResponse) ProtoMessage() {} func (x *SubmitBuildResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_build_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +298,9 @@ type StorageSource struct { func (x *StorageSource) Reset() { *x = StorageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_build_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_build_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageSource) String() string { @@ -317,7 +311,7 @@ func (*StorageSource) ProtoMessage() {} func (x *StorageSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_build_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +356,9 @@ type SubmitBuildRequest_DockerBuild struct { func (x *SubmitBuildRequest_DockerBuild) Reset() { *x = SubmitBuildRequest_DockerBuild{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_build_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_build_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitBuildRequest_DockerBuild) String() string { @@ -377,7 +369,7 @@ func (*SubmitBuildRequest_DockerBuild) ProtoMessage() {} func (x *SubmitBuildRequest_DockerBuild) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_build_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,11 +415,9 @@ type SubmitBuildRequest_BuildpacksBuild struct { func (x *SubmitBuildRequest_BuildpacksBuild) Reset() { *x = SubmitBuildRequest_BuildpacksBuild{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_build_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_build_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitBuildRequest_BuildpacksBuild) String() string { @@ -438,7 +428,7 @@ func (*SubmitBuildRequest_BuildpacksBuild) ProtoMessage() {} func (x *SubmitBuildRequest_BuildpacksBuild) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_build_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,68 +655,6 @@ func file_google_cloud_run_v2_build_proto_init() { if File_google_cloud_run_v2_build_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_build_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SubmitBuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_build_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SubmitBuildResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_build_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StorageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_build_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SubmitBuildRequest_DockerBuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_build_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SubmitBuildRequest_BuildpacksBuild); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_build_proto_msgTypes[0].OneofWrappers = []any{ (*SubmitBuildRequest_StorageSource)(nil), (*SubmitBuildRequest_BuildpackBuild)(nil), diff --git a/run/apiv2/runpb/condition.pb.go b/run/apiv2/runpb/condition.pb.go index ae08b45748a5..29d382d3be1b 100755 --- a/run/apiv2/runpb/condition.pb.go +++ b/run/apiv2/runpb/condition.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/condition.proto @@ -456,11 +456,9 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_condition_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_condition_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Condition) String() string { @@ -471,7 +469,7 @@ func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_condition_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,20 +738,6 @@ func file_google_cloud_run_v2_condition_proto_init() { if File_google_cloud_run_v2_condition_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_condition_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_condition_proto_msgTypes[0].OneofWrappers = []any{ (*Condition_Reason)(nil), (*Condition_RevisionReason_)(nil), diff --git a/run/apiv2/runpb/execution.pb.go b/run/apiv2/runpb/execution.pb.go index 9fae081105bb..2f8382d01804 100755 --- a/run/apiv2/runpb/execution.pb.go +++ b/run/apiv2/runpb/execution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/execution.proto @@ -58,11 +58,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -73,7 +71,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -132,7 +128,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -205,7 +199,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +249,9 @@ type DeleteExecutionRequest struct { func (x *DeleteExecutionRequest) Reset() { *x = DeleteExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExecutionRequest) String() string { @@ -270,7 +262,7 @@ func (*DeleteExecutionRequest) ProtoMessage() {} func (x *DeleteExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +319,9 @@ type CancelExecutionRequest struct { func (x *CancelExecutionRequest) Reset() { *x = CancelExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelExecutionRequest) String() string { @@ -342,7 +332,7 @@ func (*CancelExecutionRequest) ProtoMessage() {} func (x *CancelExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +474,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -499,7 +487,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,80 +983,6 @@ func file_google_cloud_run_v2_execution_proto_init() { } file_google_cloud_run_v2_condition_proto_init() file_google_cloud_run_v2_task_template_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_execution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_execution_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_execution_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_execution_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_execution_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CancelExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_execution_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/execution_template.pb.go b/run/apiv2/runpb/execution_template.pb.go index a42a254921a6..a7737b9ce78f 100755 --- a/run/apiv2/runpb/execution_template.pb.go +++ b/run/apiv2/runpb/execution_template.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/execution_template.proto @@ -87,11 +87,9 @@ type ExecutionTemplate struct { func (x *ExecutionTemplate) Reset() { *x = ExecutionTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_execution_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_execution_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionTemplate) String() string { @@ -102,7 +100,7 @@ func (*ExecutionTemplate) ProtoMessage() {} func (x *ExecutionTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_execution_template_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,20 +235,6 @@ func file_google_cloud_run_v2_execution_template_proto_init() { return } file_google_cloud_run_v2_task_template_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_execution_template_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/job.pb.go b/run/apiv2/runpb/job.pb.go index 236b84604096..9a0eb5f9b3fb 100755 --- a/run/apiv2/runpb/job.pb.go +++ b/run/apiv2/runpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/job.proto @@ -132,11 +132,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -147,7 +145,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +202,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -219,7 +215,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -275,7 +269,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +326,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -347,7 +339,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +397,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -420,7 +410,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +459,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -484,7 +472,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +531,9 @@ type RunJobRequest struct { func (x *RunJobRequest) Reset() { *x = RunJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunJobRequest) String() string { @@ -558,7 +544,7 @@ func (*RunJobRequest) ProtoMessage() {} func (x *RunJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +716,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -745,7 +729,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +977,9 @@ type ExecutionReference struct { func (x *ExecutionReference) Reset() { *x = ExecutionReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutionReference) String() string { @@ -1008,7 +990,7 @@ func (*ExecutionReference) ProtoMessage() {} func (x *ExecutionReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1077,11 +1059,9 @@ type RunJobRequest_Overrides struct { func (x *RunJobRequest_Overrides) Reset() { *x = RunJobRequest_Overrides{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunJobRequest_Overrides) String() string { @@ -1092,7 +1072,7 @@ func (*RunJobRequest_Overrides) ProtoMessage() {} func (x *RunJobRequest_Overrides) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1148,11 +1128,9 @@ type RunJobRequest_Overrides_ContainerOverride struct { func (x *RunJobRequest_Overrides_ContainerOverride) Reset() { *x = RunJobRequest_Overrides_ContainerOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunJobRequest_Overrides_ContainerOverride) String() string { @@ -1163,7 +1141,7 @@ func (*RunJobRequest_Overrides_ContainerOverride) ProtoMessage() {} func (x *RunJobRequest_Overrides_ContainerOverride) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1692,140 +1670,6 @@ func file_google_cloud_run_v2_job_proto_init() { file_google_cloud_run_v2_execution_template_proto_init() file_google_cloud_run_v2_k8s_min_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RunJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExecutionReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RunJobRequest_Overrides); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_job_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RunJobRequest_Overrides_ContainerOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_job_proto_msgTypes[7].OneofWrappers = []any{ (*Job_StartExecutionToken)(nil), (*Job_RunExecutionToken)(nil), diff --git a/run/apiv2/runpb/k8s.min.pb.go b/run/apiv2/runpb/k8s.min.pb.go index 484fe81e805c..8f9ba8023ef9 100755 --- a/run/apiv2/runpb/k8s.min.pb.go +++ b/run/apiv2/runpb/k8s.min.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/k8s.min.proto @@ -139,11 +139,9 @@ type Container struct { func (x *Container) Reset() { *x = Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Container) String() string { @@ -154,7 +152,7 @@ func (*Container) ProtoMessage() {} func (x *Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +279,9 @@ type ResourceRequirements struct { func (x *ResourceRequirements) Reset() { *x = ResourceRequirements{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceRequirements) String() string { @@ -296,7 +292,7 @@ func (*ResourceRequirements) ProtoMessage() {} func (x *ResourceRequirements) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type EnvVar struct { func (x *EnvVar) Reset() { *x = EnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvVar) String() string { @@ -365,7 +359,7 @@ func (*EnvVar) ProtoMessage() {} func (x *EnvVar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +434,9 @@ type EnvVarSource struct { func (x *EnvVarSource) Reset() { *x = EnvVarSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvVarSource) String() string { @@ -455,7 +447,7 @@ func (*EnvVarSource) ProtoMessage() {} func (x *EnvVarSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +488,9 @@ type SecretKeySelector struct { func (x *SecretKeySelector) Reset() { *x = SecretKeySelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretKeySelector) String() string { @@ -511,7 +501,7 @@ func (*SecretKeySelector) ProtoMessage() {} func (x *SecretKeySelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +546,9 @@ type ContainerPort struct { func (x *ContainerPort) Reset() { *x = ContainerPort{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerPort) String() string { @@ -571,7 +559,7 @@ func (*ContainerPort) ProtoMessage() {} func (x *ContainerPort) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +606,9 @@ type VolumeMount struct { func (x *VolumeMount) Reset() { *x = VolumeMount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VolumeMount) String() string { @@ -633,7 +619,7 @@ func (*VolumeMount) ProtoMessage() {} func (x *VolumeMount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +668,9 @@ type Volume struct { func (x *Volume) Reset() { *x = Volume{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Volume) String() string { @@ -697,7 +681,7 @@ func (*Volume) ProtoMessage() {} func (x *Volume) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +827,9 @@ type SecretVolumeSource struct { func (x *SecretVolumeSource) Reset() { *x = SecretVolumeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVolumeSource) String() string { @@ -858,7 +840,7 @@ func (*SecretVolumeSource) ProtoMessage() {} func (x *SecretVolumeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -926,11 +908,9 @@ type VersionToPath struct { func (x *VersionToPath) Reset() { *x = VersionToPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VersionToPath) String() string { @@ -941,7 +921,7 @@ func (*VersionToPath) ProtoMessage() {} func (x *VersionToPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +976,9 @@ type CloudSqlInstance struct { func (x *CloudSqlInstance) Reset() { *x = CloudSqlInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudSqlInstance) String() string { @@ -1011,7 +989,7 @@ func (*CloudSqlInstance) ProtoMessage() {} func (x *CloudSqlInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1037,9 @@ type EmptyDirVolumeSource struct { func (x *EmptyDirVolumeSource) Reset() { *x = EmptyDirVolumeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmptyDirVolumeSource) String() string { @@ -1074,7 +1050,7 @@ func (*EmptyDirVolumeSource) ProtoMessage() {} func (x *EmptyDirVolumeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1119,11 +1095,9 @@ type NFSVolumeSource struct { func (x *NFSVolumeSource) Reset() { *x = NFSVolumeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NFSVolumeSource) String() string { @@ -1134,7 +1108,7 @@ func (*NFSVolumeSource) ProtoMessage() {} func (x *NFSVolumeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1162,9 @@ type GCSVolumeSource struct { func (x *GCSVolumeSource) Reset() { *x = GCSVolumeSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GCSVolumeSource) String() string { @@ -1203,7 +1175,7 @@ func (*GCSVolumeSource) ProtoMessage() {} func (x *GCSVolumeSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,11 +1244,9 @@ type Probe struct { func (x *Probe) Reset() { *x = Probe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Probe) String() string { @@ -1287,7 +1257,7 @@ func (*Probe) ProtoMessage() {} func (x *Probe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,11 +1375,9 @@ type HTTPGetAction struct { func (x *HTTPGetAction) Reset() { *x = HTTPGetAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HTTPGetAction) String() string { @@ -1420,7 +1388,7 @@ func (*HTTPGetAction) ProtoMessage() {} func (x *HTTPGetAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1438,9 @@ type HTTPHeader struct { func (x *HTTPHeader) Reset() { *x = HTTPHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HTTPHeader) String() string { @@ -1485,7 +1451,7 @@ func (*HTTPHeader) ProtoMessage() {} func (x *HTTPHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1528,11 +1494,9 @@ type TCPSocketAction struct { func (x *TCPSocketAction) Reset() { *x = TCPSocketAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TCPSocketAction) String() string { @@ -1543,7 +1507,7 @@ func (*TCPSocketAction) ProtoMessage() {} func (x *TCPSocketAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1584,11 +1548,9 @@ type GRPCAction struct { func (x *GRPCAction) Reset() { *x = GRPCAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GRPCAction) String() string { @@ -1599,7 +1561,7 @@ func (*GRPCAction) ProtoMessage() {} func (x *GRPCAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_k8s_min_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1938,236 +1900,6 @@ func file_google_cloud_run_v2_k8s_min_proto_init() { if File_google_cloud_run_v2_k8s_min_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_k8s_min_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceRequirements); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EnvVar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EnvVarSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SecretKeySelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ContainerPort); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VolumeMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Volume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecretVolumeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VersionToPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CloudSqlInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EmptyDirVolumeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NFSVolumeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GCSVolumeSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Probe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*HTTPGetAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*HTTPHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TCPSocketAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_k8s_min_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GRPCAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_k8s_min_proto_msgTypes[2].OneofWrappers = []any{ (*EnvVar_Value)(nil), (*EnvVar_ValueSource)(nil), diff --git a/run/apiv2/runpb/revision.pb.go b/run/apiv2/runpb/revision.pb.go index 0d31bcf59ca5..95c9f0d2df21 100755 --- a/run/apiv2/runpb/revision.pb.go +++ b/run/apiv2/runpb/revision.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/revision.proto @@ -58,11 +58,9 @@ type GetRevisionRequest struct { func (x *GetRevisionRequest) Reset() { *x = GetRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRevisionRequest) String() string { @@ -73,7 +71,7 @@ func (*GetRevisionRequest) ProtoMessage() {} func (x *GetRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type ListRevisionsRequest struct { func (x *ListRevisionsRequest) Reset() { *x = ListRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRevisionsRequest) String() string { @@ -132,7 +128,7 @@ func (*ListRevisionsRequest) ProtoMessage() {} func (x *ListRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +186,9 @@ type ListRevisionsResponse struct { func (x *ListRevisionsResponse) Reset() { *x = ListRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRevisionsResponse) String() string { @@ -205,7 +199,7 @@ func (*ListRevisionsResponse) ProtoMessage() {} func (x *ListRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +250,9 @@ type DeleteRevisionRequest struct { func (x *DeleteRevisionRequest) Reset() { *x = DeleteRevisionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRevisionRequest) String() string { @@ -271,7 +263,7 @@ func (*DeleteRevisionRequest) ProtoMessage() {} func (x *DeleteRevisionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type Revision struct { func (x *Revision) Reset() { *x = Revision{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Revision) String() string { @@ -433,7 +423,7 @@ func (*Revision) ProtoMessage() {} func (x *Revision) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1013,68 +1003,6 @@ func file_google_cloud_run_v2_revision_proto_init() { file_google_cloud_run_v2_k8s_min_proto_init() file_google_cloud_run_v2_status_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_revision_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_revision_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_revision_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_revision_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRevisionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_revision_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Revision); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/revision_template.pb.go b/run/apiv2/runpb/revision_template.pb.go index ef3e1f187512..150520bc3b0e 100755 --- a/run/apiv2/runpb/revision_template.pb.go +++ b/run/apiv2/runpb/revision_template.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/revision_template.proto @@ -116,11 +116,9 @@ type RevisionTemplate struct { func (x *RevisionTemplate) Reset() { *x = RevisionTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_revision_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_revision_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevisionTemplate) String() string { @@ -131,7 +129,7 @@ func (*RevisionTemplate) ProtoMessage() {} func (x *RevisionTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_revision_template_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,20 +444,6 @@ func file_google_cloud_run_v2_revision_template_proto_init() { } file_google_cloud_run_v2_k8s_min_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_revision_template_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RevisionTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/service.pb.go b/run/apiv2/runpb/service.pb.go index 553a995f71a7..3d68c4663669 100755 --- a/run/apiv2/runpb/service.pb.go +++ b/run/apiv2/runpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/service.proto @@ -68,11 +68,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -83,7 +81,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -162,7 +158,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -242,7 +236,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +294,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -315,7 +307,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +350,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -373,7 +363,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -430,7 +418,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +627,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -654,7 +640,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1348,92 +1334,6 @@ func file_google_cloud_run_v2_service_proto_init() { file_google_cloud_run_v2_revision_template_proto_init() file_google_cloud_run_v2_traffic_target_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/status.pb.go b/run/apiv2/runpb/status.pb.go index aec76c1505ba..4a373569cfa8 100755 --- a/run/apiv2/runpb/status.pb.go +++ b/run/apiv2/runpb/status.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/status.proto @@ -47,11 +47,9 @@ type RevisionScalingStatus struct { func (x *RevisionScalingStatus) Reset() { *x = RevisionScalingStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevisionScalingStatus) String() string { @@ -62,7 +60,7 @@ func (*RevisionScalingStatus) ProtoMessage() {} func (x *RevisionScalingStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -133,20 +131,6 @@ func file_google_cloud_run_v2_status_proto_init() { if File_google_cloud_run_v2_status_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_status_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RevisionScalingStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/task.pb.go b/run/apiv2/runpb/task.pb.go index 352fcefcc3ab..bc5efedc3fd8 100755 --- a/run/apiv2/runpb/task.pb.go +++ b/run/apiv2/runpb/task.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/task.proto @@ -57,11 +57,9 @@ type GetTaskRequest struct { func (x *GetTaskRequest) Reset() { *x = GetTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTaskRequest) String() string { @@ -72,7 +70,7 @@ func (*GetTaskRequest) ProtoMessage() {} func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type ListTasksRequest struct { func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -131,7 +127,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +185,9 @@ type ListTasksResponse struct { func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -204,7 +198,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -343,11 +337,9 @@ type Task struct { func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -358,7 +350,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +600,9 @@ type TaskAttemptResult struct { func (x *TaskAttemptResult) Reset() { *x = TaskAttemptResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskAttemptResult) String() string { @@ -623,7 +613,7 @@ func (*TaskAttemptResult) ProtoMessage() {} func (x *TaskAttemptResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,68 +923,6 @@ func file_google_cloud_run_v2_task_proto_init() { file_google_cloud_run_v2_condition_proto_init() file_google_cloud_run_v2_k8s_min_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_task_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_task_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_task_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_task_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_task_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TaskAttemptResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/task_template.pb.go b/run/apiv2/runpb/task_template.pb.go index a770f5adabce..aae91b0797cc 100755 --- a/run/apiv2/runpb/task_template.pb.go +++ b/run/apiv2/runpb/task_template.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/task_template.proto @@ -77,11 +77,9 @@ type TaskTemplate struct { func (x *TaskTemplate) Reset() { *x = TaskTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_task_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_task_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskTemplate) String() string { @@ -92,7 +90,7 @@ func (*TaskTemplate) ProtoMessage() {} func (x *TaskTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_task_template_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,20 +281,6 @@ func file_google_cloud_run_v2_task_template_proto_init() { } file_google_cloud_run_v2_k8s_min_proto_init() file_google_cloud_run_v2_vendor_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_task_template_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TaskTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_task_template_proto_msgTypes[0].OneofWrappers = []any{ (*TaskTemplate_MaxRetries)(nil), } diff --git a/run/apiv2/runpb/traffic_target.pb.go b/run/apiv2/runpb/traffic_target.pb.go index 4bd2e73df2c1..cf621b37399c 100755 --- a/run/apiv2/runpb/traffic_target.pb.go +++ b/run/apiv2/runpb/traffic_target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/traffic_target.proto @@ -111,11 +111,9 @@ type TrafficTarget struct { func (x *TrafficTarget) Reset() { *x = TrafficTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficTarget) String() string { @@ -126,7 +124,7 @@ func (*TrafficTarget) ProtoMessage() {} func (x *TrafficTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type TrafficTargetStatus struct { func (x *TrafficTargetStatus) Reset() { *x = TrafficTargetStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficTargetStatus) String() string { @@ -204,7 +200,7 @@ func (*TrafficTargetStatus) ProtoMessage() {} func (x *TrafficTargetStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_traffic_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,32 +338,6 @@ func file_google_cloud_run_v2_traffic_target_proto_init() { if File_google_cloud_run_v2_traffic_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_traffic_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TrafficTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_traffic_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TrafficTargetStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/run/apiv2/runpb/vendor_settings.pb.go b/run/apiv2/runpb/vendor_settings.pb.go index 59cfa7aa8c89..a85dd1e2ee26 100755 --- a/run/apiv2/runpb/vendor_settings.pb.go +++ b/run/apiv2/runpb/vendor_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/run/v2/vendor_settings.proto @@ -333,11 +333,9 @@ type VpcAccess struct { func (x *VpcAccess) Reset() { *x = VpcAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcAccess) String() string { @@ -348,7 +346,7 @@ func (*VpcAccess) ProtoMessage() {} func (x *VpcAccess) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +402,9 @@ type BinaryAuthorization struct { func (x *BinaryAuthorization) Reset() { *x = BinaryAuthorization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BinaryAuthorization) String() string { @@ -419,7 +415,7 @@ func (*BinaryAuthorization) ProtoMessage() {} func (x *BinaryAuthorization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,11 +496,9 @@ type RevisionScaling struct { func (x *RevisionScaling) Reset() { *x = RevisionScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevisionScaling) String() string { @@ -515,7 +509,7 @@ func (*RevisionScaling) ProtoMessage() {} func (x *RevisionScaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +553,9 @@ type ServiceMesh struct { func (x *ServiceMesh) Reset() { *x = ServiceMesh{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceMesh) String() string { @@ -574,7 +566,7 @@ func (*ServiceMesh) ProtoMessage() {} func (x *ServiceMesh) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +609,9 @@ type ServiceScaling struct { func (x *ServiceScaling) Reset() { *x = ServiceScaling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceScaling) String() string { @@ -632,7 +622,7 @@ func (*ServiceScaling) ProtoMessage() {} func (x *ServiceScaling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +670,9 @@ type NodeSelector struct { func (x *NodeSelector) Reset() { *x = NodeSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeSelector) String() string { @@ -695,7 +683,7 @@ func (*NodeSelector) ProtoMessage() {} func (x *NodeSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,11 +729,9 @@ type VpcAccess_NetworkInterface struct { func (x *VpcAccess_NetworkInterface) Reset() { *x = VpcAccess_NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VpcAccess_NetworkInterface) String() string { @@ -756,7 +742,7 @@ func (*VpcAccess_NetworkInterface) ProtoMessage() {} func (x *VpcAccess_NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_run_v2_vendor_settings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -972,92 +958,6 @@ func file_google_cloud_run_v2_vendor_settings_proto_init() { if File_google_cloud_run_v2_vendor_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VpcAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BinaryAuthorization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RevisionScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ServiceMesh); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ServiceScaling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*NodeSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_run_v2_vendor_settings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VpcAccess_NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_run_v2_vendor_settings_proto_msgTypes[1].OneofWrappers = []any{ (*BinaryAuthorization_UseDefault)(nil), (*BinaryAuthorization_Policy)(nil), diff --git a/run/apiv2/services_client.go b/run/apiv2/services_client.go index 34daaa5ae726..135a82dd316a 100755 --- a/run/apiv2/services_client.go +++ b/run/apiv2/services_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -34,7 +34,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -335,6 +334,8 @@ type servicesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServicesClient creates a new services client based on gRPC. @@ -361,6 +362,7 @@ func NewServicesClient(ctx context.Context, opts ...option.ClientOption) (*Servi connPool: connPool, servicesClient: runpb.NewServicesClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -424,6 +426,8 @@ type servicesRESTClient struct { // Points back to the CallOptions field of the containing ServicesClient CallOptions **ServicesCallOptions + + logger *slog.Logger } // NewServicesRESTClient creates a new services rest client. @@ -441,6 +445,7 @@ func NewServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*S endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -512,7 +517,7 @@ func (c *servicesGRPCClient) CreateService(ctx context.Context, req *runpb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -541,7 +546,7 @@ func (c *servicesGRPCClient) GetService(ctx context.Context, req *runpb.GetServi var resp *runpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -579,7 +584,7 @@ func (c *servicesGRPCClient) ListServices(ctx context.Context, req *runpb.ListSe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -623,7 +628,7 @@ func (c *servicesGRPCClient) UpdateService(ctx context.Context, req *runpb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *servicesGRPCClient) DeleteService(ctx context.Context, req *runpb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -672,7 +677,7 @@ func (c *servicesGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *servicesGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -708,7 +713,7 @@ func (c *servicesGRPCClient) TestIamPermissions(ctx context.Context, req *iampb. var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.servicesClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.servicesClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *servicesGRPCClient) DeleteOperation(ctx context.Context, req *longrunni opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -740,7 +745,7 @@ func (c *servicesGRPCClient) GetOperation(ctx context.Context, req *longrunningp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *servicesGRPCClient) ListOperations(ctx context.Context, req *longrunnin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -804,7 +809,7 @@ func (c *servicesGRPCClient) WaitOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -865,21 +870,10 @@ func (c *servicesRESTClient) CreateService(ctx context.Context, req *runpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -939,17 +933,7 @@ func (c *servicesRESTClient) GetService(ctx context.Context, req *runpb.GetServi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1014,21 +998,10 @@ func (c *servicesRESTClient) ListServices(ctx context.Context, req *runpb.ListSe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1119,21 +1092,10 @@ func (c *servicesRESTClient) UpdateService(ctx context.Context, req *runpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1200,21 +1162,10 @@ func (c *servicesRESTClient) DeleteService(ctx context.Context, req *runpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1269,17 +1220,7 @@ func (c *servicesRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1336,17 +1277,7 @@ func (c *servicesRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIam httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1404,17 +1335,7 @@ func (c *servicesRESTClient) TestIamPermissions(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -1461,15 +1382,8 @@ func (c *servicesRESTClient) DeleteOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1506,17 +1420,7 @@ func (c *servicesRESTClient) GetOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1581,21 +1485,10 @@ func (c *servicesRESTClient) ListOperations(ctx context.Context, req *longrunnin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1664,17 +1557,7 @@ func (c *servicesRESTClient) WaitOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/services_client_example_go123_test.go b/run/apiv2/services_client_example_go123_test.go index 9f6d966c3887..9cae6f8ab12d 100644 --- a/run/apiv2/services_client_example_go123_test.go +++ b/run/apiv2/services_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServicesClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServicesClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/run/apiv2/tasks_client.go b/run/apiv2/tasks_client.go index 99dba7264752..f4314fc15137 100755 --- a/run/apiv2/tasks_client.go +++ b/run/apiv2/tasks_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" runpb "cloud.google.com/go/run/apiv2/runpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -183,6 +182,8 @@ type tasksGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTasksClient creates a new tasks client based on gRPC. @@ -209,6 +210,7 @@ func NewTasksClient(ctx context.Context, opts ...option.ClientOption) (*TasksCli connPool: connPool, tasksClient: runpb.NewTasksClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -256,6 +258,8 @@ type tasksRESTClient struct { // Points back to the CallOptions field of the containing TasksClient CallOptions **TasksCallOptions + + logger *slog.Logger } // NewTasksRESTClient creates a new tasks rest client. @@ -273,6 +277,7 @@ func NewTasksRESTClient(ctx context.Context, opts ...option.ClientOption) (*Task endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -325,7 +330,7 @@ func (c *tasksGRPCClient) GetTask(ctx context.Context, req *runpb.GetTaskRequest var resp *runpb.Task err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tasksClient.GetTask(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tasksClient.GetTask, req, settings.GRPC, c.logger, "GetTask") return err }, opts...) if err != nil { @@ -354,7 +359,7 @@ func (c *tasksGRPCClient) ListTasks(ctx context.Context, req *runpb.ListTasksReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tasksClient.ListTasks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tasksClient.ListTasks, req, settings.GRPC, c.logger, "ListTasks") return err }, opts...) if err != nil { @@ -388,7 +393,7 @@ func (c *tasksGRPCClient) DeleteOperation(ctx context.Context, req *longrunningp opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -403,7 +408,7 @@ func (c *tasksGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -432,7 +437,7 @@ func (c *tasksGRPCClient) ListOperations(ctx context.Context, req *longrunningpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *tasksGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -509,17 +514,7 @@ func (c *tasksRESTClient) GetTask(ctx context.Context, req *runpb.GetTaskRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTask") if err != nil { return err } @@ -584,21 +579,10 @@ func (c *tasksRESTClient) ListTasks(ctx context.Context, req *runpb.ListTasksReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTasks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -658,15 +642,8 @@ func (c *tasksRESTClient) DeleteOperation(ctx context.Context, req *longrunningp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -703,17 +680,7 @@ func (c *tasksRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -778,21 +745,10 @@ func (c *tasksRESTClient) ListOperations(ctx context.Context, req *longrunningpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -861,17 +817,7 @@ func (c *tasksRESTClient) WaitOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/run/apiv2/tasks_client_example_go123_test.go b/run/apiv2/tasks_client_example_go123_test.go index 99a6a8549848..351ef0c3ab96 100644 --- a/run/apiv2/tasks_client_example_go123_test.go +++ b/run/apiv2/tasks_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleTasksClient_ListTasks_all() { } for resp, err := range c.ListTasks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleTasksClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/scheduler/apiv1/cloud_scheduler_client.go b/scheduler/apiv1/cloud_scheduler_client.go index 37cd87b59f57..2829c6e13e82 100755 --- a/scheduler/apiv1/cloud_scheduler_client.go +++ b/scheduler/apiv1/cloud_scheduler_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( schedulerpb "cloud.google.com/go/scheduler/apiv1/schedulerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -340,6 +339,8 @@ type cloudSchedulerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudSchedulerClient creates a new cloud scheduler client based on gRPC. @@ -367,6 +368,7 @@ func NewCloudSchedulerClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, cloudSchedulerClient: schedulerpb.NewCloudSchedulerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -414,6 +416,8 @@ type cloudSchedulerRESTClient struct { // Points back to the CallOptions field of the containing CloudSchedulerClient CallOptions **CloudSchedulerCallOptions + + logger *slog.Logger } // NewCloudSchedulerRESTClient creates a new cloud scheduler rest client. @@ -432,6 +436,7 @@ func NewCloudSchedulerRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -495,7 +500,7 @@ func (c *cloudSchedulerGRPCClient) ListJobs(ctx context.Context, req *schedulerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *cloudSchedulerGRPCClient) GetJob(ctx context.Context, req *schedulerpb. var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *cloudSchedulerGRPCClient) CreateJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *cloudSchedulerGRPCClient) UpdateJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *cloudSchedulerGRPCClient) DeleteJob(ctx context.Context, req *scheduler opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cloudSchedulerClient.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cloudSchedulerClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -598,7 +603,7 @@ func (c *cloudSchedulerGRPCClient) PauseJob(ctx context.Context, req *schedulerp var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.PauseJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.PauseJob, req, settings.GRPC, c.logger, "PauseJob") return err }, opts...) if err != nil { @@ -616,7 +621,7 @@ func (c *cloudSchedulerGRPCClient) ResumeJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.ResumeJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.ResumeJob, req, settings.GRPC, c.logger, "ResumeJob") return err }, opts...) if err != nil { @@ -634,7 +639,7 @@ func (c *cloudSchedulerGRPCClient) RunJob(ctx context.Context, req *schedulerpb. var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.RunJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.RunJob, req, settings.GRPC, c.logger, "RunJob") return err }, opts...) if err != nil { @@ -652,7 +657,7 @@ func (c *cloudSchedulerGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -681,7 +686,7 @@ func (c *cloudSchedulerGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -752,21 +757,10 @@ func (c *cloudSchedulerRESTClient) ListJobs(ctx context.Context, req *schedulerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -829,17 +823,7 @@ func (c *cloudSchedulerRESTClient) GetJob(ctx context.Context, req *schedulerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -896,17 +880,7 @@ func (c *cloudSchedulerRESTClient) CreateJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -979,17 +953,7 @@ func (c *cloudSchedulerRESTClient) UpdateJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -1036,15 +1000,8 @@ func (c *cloudSchedulerRESTClient) DeleteJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -1096,17 +1053,7 @@ func (c *cloudSchedulerRESTClient) PauseJob(ctx context.Context, req *schedulerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseJob") if err != nil { return err } @@ -1170,17 +1117,7 @@ func (c *cloudSchedulerRESTClient) ResumeJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeJob") if err != nil { return err } @@ -1239,17 +1176,7 @@ func (c *cloudSchedulerRESTClient) RunJob(ctx context.Context, req *schedulerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunJob") if err != nil { return err } @@ -1299,17 +1226,7 @@ func (c *cloudSchedulerRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1374,21 +1291,10 @@ func (c *cloudSchedulerRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/scheduler/apiv1/cloud_scheduler_client_example_go123_test.go b/scheduler/apiv1/cloud_scheduler_client_example_go123_test.go index f6cdaaff4b3f..3cd78d02b7d4 100644 --- a/scheduler/apiv1/cloud_scheduler_client_example_go123_test.go +++ b/scheduler/apiv1/cloud_scheduler_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCloudSchedulerClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCloudSchedulerClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/scheduler/apiv1/helpers.go b/scheduler/apiv1/helpers.go index 4333078fb400..cb8bcbe9191b 100755 --- a/scheduler/apiv1/helpers.go +++ b/scheduler/apiv1/helpers.go @@ -18,10 +18,20 @@ package scheduler import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudscheduler.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/scheduler/apiv1/schedulerpb/cloudscheduler.pb.go b/scheduler/apiv1/schedulerpb/cloudscheduler.pb.go index ac4183ebbc45..c9974d5c5d06 100755 --- a/scheduler/apiv1/schedulerpb/cloudscheduler.pb.go +++ b/scheduler/apiv1/schedulerpb/cloudscheduler.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1/cloudscheduler.proto @@ -74,11 +74,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -89,7 +87,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -162,7 +158,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -205,11 +201,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -220,7 +214,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +257,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -278,7 +270,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +318,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -341,7 +331,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +374,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -399,7 +387,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,11 +423,9 @@ type PauseJobRequest struct { func (x *PauseJobRequest) Reset() { *x = PauseJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseJobRequest) String() string { @@ -450,7 +436,7 @@ func (*PauseJobRequest) ProtoMessage() {} func (x *PauseJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +472,9 @@ type ResumeJobRequest struct { func (x *ResumeJobRequest) Reset() { *x = ResumeJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeJobRequest) String() string { @@ -501,7 +485,7 @@ func (*ResumeJobRequest) ProtoMessage() {} func (x *ResumeJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,11 +521,9 @@ type RunJobRequest struct { func (x *RunJobRequest) Reset() { *x = RunJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunJobRequest) String() string { @@ -552,7 +534,7 @@ func (*RunJobRequest) ProtoMessage() {} func (x *RunJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,116 +791,6 @@ func file_google_cloud_scheduler_v1_cloudscheduler_proto_init() { return } file_google_cloud_scheduler_v1_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PauseJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResumeJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_cloudscheduler_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RunJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/scheduler/apiv1/schedulerpb/job.pb.go b/scheduler/apiv1/schedulerpb/job.pb.go index 307a6a288bc9..5f1ba6d07f54 100755 --- a/scheduler/apiv1/schedulerpb/job.pb.go +++ b/scheduler/apiv1/schedulerpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1/job.proto @@ -227,11 +227,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -242,7 +240,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +460,9 @@ type RetryConfig struct { func (x *RetryConfig) Reset() { *x = RetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryConfig) String() string { @@ -477,7 +473,7 @@ func (*RetryConfig) ProtoMessage() {} func (x *RetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,32 +685,6 @@ func file_google_cloud_scheduler_v1_job_proto_init() { return } file_google_cloud_scheduler_v1_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_scheduler_v1_job_proto_msgTypes[0].OneofWrappers = []any{ (*Job_PubsubTarget)(nil), (*Job_AppEngineHttpTarget)(nil), diff --git a/scheduler/apiv1/schedulerpb/target.pb.go b/scheduler/apiv1/schedulerpb/target.pb.go index 280972bcdfb2..56671525faba 100755 --- a/scheduler/apiv1/schedulerpb/target.pb.go +++ b/scheduler/apiv1/schedulerpb/target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1/target.proto @@ -170,11 +170,9 @@ type HttpTarget struct { func (x *HttpTarget) Reset() { *x = HttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget) String() string { @@ -185,7 +183,7 @@ func (*HttpTarget) ProtoMessage() {} func (x *HttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +355,9 @@ type AppEngineHttpTarget struct { func (x *AppEngineHttpTarget) Reset() { *x = AppEngineHttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpTarget) String() string { @@ -372,7 +368,7 @@ func (*AppEngineHttpTarget) ProtoMessage() {} func (x *AppEngineHttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +447,9 @@ type PubsubTarget struct { func (x *PubsubTarget) Reset() { *x = PubsubTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubTarget) String() string { @@ -466,7 +460,7 @@ func (*PubsubTarget) ProtoMessage() {} func (x *PubsubTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +602,9 @@ type AppEngineRouting struct { func (x *AppEngineRouting) Reset() { *x = AppEngineRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineRouting) String() string { @@ -623,7 +615,7 @@ func (*AppEngineRouting) ProtoMessage() {} func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -688,11 +680,9 @@ type OAuthToken struct { func (x *OAuthToken) Reset() { *x = OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthToken) String() string { @@ -703,7 +693,7 @@ func (*OAuthToken) ProtoMessage() {} func (x *OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,11 +745,9 @@ type OidcToken struct { func (x *OidcToken) Reset() { *x = OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OidcToken) String() string { @@ -770,7 +758,7 @@ func (*OidcToken) ProtoMessage() {} func (x *OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1_target_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,80 +950,6 @@ func file_google_cloud_scheduler_v1_target_proto_init() { if File_google_cloud_scheduler_v1_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_target_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PubsubTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_target_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_target_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1_target_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_scheduler_v1_target_proto_msgTypes[0].OneofWrappers = []any{ (*HttpTarget_OauthToken)(nil), (*HttpTarget_OidcToken)(nil), diff --git a/scheduler/apiv1beta1/cloud_scheduler_client.go b/scheduler/apiv1beta1/cloud_scheduler_client.go index 29eef2683a4a..e56e15a8ce56 100755 --- a/scheduler/apiv1beta1/cloud_scheduler_client.go +++ b/scheduler/apiv1beta1/cloud_scheduler_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( schedulerpb "cloud.google.com/go/scheduler/apiv1beta1/schedulerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -381,6 +380,8 @@ type cloudSchedulerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudSchedulerClient creates a new cloud scheduler client based on gRPC. @@ -408,6 +409,7 @@ func NewCloudSchedulerClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, cloudSchedulerClient: schedulerpb.NewCloudSchedulerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -455,6 +457,8 @@ type cloudSchedulerRESTClient struct { // Points back to the CallOptions field of the containing CloudSchedulerClient CallOptions **CloudSchedulerCallOptions + + logger *slog.Logger } // NewCloudSchedulerRESTClient creates a new cloud scheduler rest client. @@ -473,6 +477,7 @@ func NewCloudSchedulerRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -536,7 +541,7 @@ func (c *cloudSchedulerGRPCClient) ListJobs(ctx context.Context, req *schedulerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -571,7 +576,7 @@ func (c *cloudSchedulerGRPCClient) GetJob(ctx context.Context, req *schedulerpb. var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *cloudSchedulerGRPCClient) CreateJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *cloudSchedulerGRPCClient) UpdateJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -624,7 +629,7 @@ func (c *cloudSchedulerGRPCClient) DeleteJob(ctx context.Context, req *scheduler opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cloudSchedulerClient.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cloudSchedulerClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -639,7 +644,7 @@ func (c *cloudSchedulerGRPCClient) PauseJob(ctx context.Context, req *schedulerp var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.PauseJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.PauseJob, req, settings.GRPC, c.logger, "PauseJob") return err }, opts...) if err != nil { @@ -657,7 +662,7 @@ func (c *cloudSchedulerGRPCClient) ResumeJob(ctx context.Context, req *scheduler var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.ResumeJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.ResumeJob, req, settings.GRPC, c.logger, "ResumeJob") return err }, opts...) if err != nil { @@ -675,7 +680,7 @@ func (c *cloudSchedulerGRPCClient) RunJob(ctx context.Context, req *schedulerpb. var resp *schedulerpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudSchedulerClient.RunJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudSchedulerClient.RunJob, req, settings.GRPC, c.logger, "RunJob") return err }, opts...) if err != nil { @@ -693,7 +698,7 @@ func (c *cloudSchedulerGRPCClient) GetLocation(ctx context.Context, req *locatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -722,7 +727,7 @@ func (c *cloudSchedulerGRPCClient) ListLocations(ctx context.Context, req *locat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -799,21 +804,10 @@ func (c *cloudSchedulerRESTClient) ListJobs(ctx context.Context, req *schedulerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -876,17 +870,7 @@ func (c *cloudSchedulerRESTClient) GetJob(ctx context.Context, req *schedulerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -943,17 +927,7 @@ func (c *cloudSchedulerRESTClient) CreateJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -1026,17 +1000,7 @@ func (c *cloudSchedulerRESTClient) UpdateJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -1086,15 +1050,8 @@ func (c *cloudSchedulerRESTClient) DeleteJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -1147,17 +1104,7 @@ func (c *cloudSchedulerRESTClient) PauseJob(ctx context.Context, req *schedulerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseJob") if err != nil { return err } @@ -1223,17 +1170,7 @@ func (c *cloudSchedulerRESTClient) ResumeJob(ctx context.Context, req *scheduler httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeJob") if err != nil { return err } @@ -1292,17 +1229,7 @@ func (c *cloudSchedulerRESTClient) RunJob(ctx context.Context, req *schedulerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunJob") if err != nil { return err } @@ -1352,17 +1279,7 @@ func (c *cloudSchedulerRESTClient) GetLocation(ctx context.Context, req *locatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1427,21 +1344,10 @@ func (c *cloudSchedulerRESTClient) ListLocations(ctx context.Context, req *locat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/scheduler/apiv1beta1/cloud_scheduler_client_example_go123_test.go b/scheduler/apiv1beta1/cloud_scheduler_client_example_go123_test.go index 0929e5b9247e..7e0efab4c2d8 100644 --- a/scheduler/apiv1beta1/cloud_scheduler_client_example_go123_test.go +++ b/scheduler/apiv1beta1/cloud_scheduler_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleCloudSchedulerClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleCloudSchedulerClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/scheduler/apiv1beta1/helpers.go b/scheduler/apiv1beta1/helpers.go index 4333078fb400..cb8bcbe9191b 100755 --- a/scheduler/apiv1beta1/helpers.go +++ b/scheduler/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package scheduler import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudscheduler.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/scheduler/apiv1beta1/schedulerpb/cloudscheduler.pb.go b/scheduler/apiv1beta1/schedulerpb/cloudscheduler.pb.go index 57c097d2db3c..7bbf5d56a08e 100755 --- a/scheduler/apiv1beta1/schedulerpb/cloudscheduler.pb.go +++ b/scheduler/apiv1beta1/schedulerpb/cloudscheduler.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1beta1/cloudscheduler.proto @@ -87,11 +87,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -102,7 +100,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -189,7 +185,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +228,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -247,7 +241,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -305,7 +297,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +345,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -368,7 +358,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -430,7 +418,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +461,9 @@ type PauseJobRequest struct { func (x *PauseJobRequest) Reset() { *x = PauseJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseJobRequest) String() string { @@ -488,7 +474,7 @@ func (*PauseJobRequest) ProtoMessage() {} func (x *PauseJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +510,9 @@ type ResumeJobRequest struct { func (x *ResumeJobRequest) Reset() { *x = ResumeJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeJobRequest) String() string { @@ -539,7 +523,7 @@ func (*ResumeJobRequest) ProtoMessage() {} func (x *ResumeJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +563,9 @@ type RunJobRequest struct { func (x *RunJobRequest) Reset() { *x = RunJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunJobRequest) String() string { @@ -594,7 +576,7 @@ func (*RunJobRequest) ProtoMessage() {} func (x *RunJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,116 +862,6 @@ func file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_init() { return } file_google_cloud_scheduler_v1beta1_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PauseJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ResumeJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_cloudscheduler_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RunJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/scheduler/apiv1beta1/schedulerpb/job.pb.go b/scheduler/apiv1beta1/schedulerpb/job.pb.go index a31c7d553013..1d6e56dd714f 100755 --- a/scheduler/apiv1beta1/schedulerpb/job.pb.go +++ b/scheduler/apiv1beta1/schedulerpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1beta1/job.proto @@ -234,11 +234,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -249,7 +247,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -476,11 +474,9 @@ type RetryConfig struct { func (x *RetryConfig) Reset() { *x = RetryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryConfig) String() string { @@ -491,7 +487,7 @@ func (*RetryConfig) ProtoMessage() {} func (x *RetryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,32 +708,6 @@ func file_google_cloud_scheduler_v1beta1_job_proto_init() { return } file_google_cloud_scheduler_v1beta1_target_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RetryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_scheduler_v1beta1_job_proto_msgTypes[0].OneofWrappers = []any{ (*Job_PubsubTarget)(nil), (*Job_AppEngineHttpTarget)(nil), diff --git a/scheduler/apiv1beta1/schedulerpb/target.pb.go b/scheduler/apiv1beta1/schedulerpb/target.pb.go index 48d9fbc95d6d..207edd54f5ca 100755 --- a/scheduler/apiv1beta1/schedulerpb/target.pb.go +++ b/scheduler/apiv1beta1/schedulerpb/target.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/scheduler/v1beta1/target.proto @@ -170,11 +170,9 @@ type HttpTarget struct { func (x *HttpTarget) Reset() { *x = HttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpTarget) String() string { @@ -185,7 +183,7 @@ func (*HttpTarget) ProtoMessage() {} func (x *HttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +354,9 @@ type AppEngineHttpTarget struct { func (x *AppEngineHttpTarget) Reset() { *x = AppEngineHttpTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineHttpTarget) String() string { @@ -371,7 +367,7 @@ func (*AppEngineHttpTarget) ProtoMessage() {} func (x *AppEngineHttpTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +446,9 @@ type PubsubTarget struct { func (x *PubsubTarget) Reset() { *x = PubsubTarget{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubTarget) String() string { @@ -465,7 +459,7 @@ func (*PubsubTarget) ProtoMessage() {} func (x *PubsubTarget) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,11 +604,9 @@ type AppEngineRouting struct { func (x *AppEngineRouting) Reset() { *x = AppEngineRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppEngineRouting) String() string { @@ -625,7 +617,7 @@ func (*AppEngineRouting) ProtoMessage() {} func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,11 +682,9 @@ type OAuthToken struct { func (x *OAuthToken) Reset() { *x = OAuthToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OAuthToken) String() string { @@ -705,7 +695,7 @@ func (*OAuthToken) ProtoMessage() {} func (x *OAuthToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +747,9 @@ type OidcToken struct { func (x *OidcToken) Reset() { *x = OidcToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OidcToken) String() string { @@ -772,7 +760,7 @@ func (*OidcToken) ProtoMessage() {} func (x *OidcToken) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,80 +956,6 @@ func file_google_cloud_scheduler_v1beta1_target_proto_init() { if File_google_cloud_scheduler_v1beta1_target_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineHttpTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PubsubTarget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AppEngineRouting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OAuthToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OidcToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_scheduler_v1beta1_target_proto_msgTypes[0].OneofWrappers = []any{ (*HttpTarget_OauthToken)(nil), (*HttpTarget_OidcToken)(nil), diff --git a/secretmanager/apiv1/helpers.go b/secretmanager/apiv1/helpers.go index e0a1011256cf..93acf7aca6ae 100755 --- a/secretmanager/apiv1/helpers.go +++ b/secretmanager/apiv1/helpers.go @@ -18,10 +18,20 @@ package secretmanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "secretmanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/secretmanager/apiv1/secret_manager_client.go b/secretmanager/apiv1/secret_manager_client.go index c6a796d40647..fcfebde4a9ff 100755 --- a/secretmanager/apiv1/secret_manager_client.go +++ b/secretmanager/apiv1/secret_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" secretmanagerpb "cloud.google.com/go/secretmanager/apiv1/secretmanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -410,6 +409,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new secret manager service client based on gRPC. @@ -443,6 +444,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: secretmanagerpb.NewSecretManagerServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -490,6 +492,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new secret manager service rest client. @@ -514,6 +518,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -577,7 +582,7 @@ func (c *gRPCClient) ListSecrets(ctx context.Context, req *secretmanagerpb.ListS } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecrets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecrets, req, settings.GRPC, c.logger, "ListSecrets") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *gRPCClient) CreateSecret(ctx context.Context, req *secretmanagerpb.Crea var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSecret, req, settings.GRPC, c.logger, "CreateSecret") return err }, opts...) if err != nil { @@ -630,7 +635,7 @@ func (c *gRPCClient) AddSecretVersion(ctx context.Context, req *secretmanagerpb. var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AddSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AddSecretVersion, req, settings.GRPC, c.logger, "AddSecretVersion") return err }, opts...) if err != nil { @@ -648,7 +653,7 @@ func (c *gRPCClient) GetSecret(ctx context.Context, req *secretmanagerpb.GetSecr var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecret, req, settings.GRPC, c.logger, "GetSecret") return err }, opts...) if err != nil { @@ -666,7 +671,7 @@ func (c *gRPCClient) UpdateSecret(ctx context.Context, req *secretmanagerpb.Upda var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecret, req, settings.GRPC, c.logger, "UpdateSecret") return err }, opts...) if err != nil { @@ -683,7 +688,7 @@ func (c *gRPCClient) DeleteSecret(ctx context.Context, req *secretmanagerpb.Dele opts = append((*c.CallOptions).DeleteSecret[0:len((*c.CallOptions).DeleteSecret):len((*c.CallOptions).DeleteSecret)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSecret(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSecret, req, settings.GRPC, c.logger, "DeleteSecret") return err }, opts...) return err @@ -709,7 +714,7 @@ func (c *gRPCClient) ListSecretVersions(ctx context.Context, req *secretmanagerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecretVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecretVersions, req, settings.GRPC, c.logger, "ListSecretVersions") return err }, opts...) if err != nil { @@ -744,7 +749,7 @@ func (c *gRPCClient) GetSecretVersion(ctx context.Context, req *secretmanagerpb. var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecretVersion, req, settings.GRPC, c.logger, "GetSecretVersion") return err }, opts...) if err != nil { @@ -762,7 +767,7 @@ func (c *gRPCClient) AccessSecretVersion(ctx context.Context, req *secretmanager var resp *secretmanagerpb.AccessSecretVersionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AccessSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AccessSecretVersion, req, settings.GRPC, c.logger, "AccessSecretVersion") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *gRPCClient) DisableSecretVersion(ctx context.Context, req *secretmanage var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DisableSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DisableSecretVersion, req, settings.GRPC, c.logger, "DisableSecretVersion") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *gRPCClient) EnableSecretVersion(ctx context.Context, req *secretmanager var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EnableSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EnableSecretVersion, req, settings.GRPC, c.logger, "EnableSecretVersion") return err }, opts...) if err != nil { @@ -816,7 +821,7 @@ func (c *gRPCClient) DestroySecretVersion(ctx context.Context, req *secretmanage var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DestroySecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DestroySecretVersion, req, settings.GRPC, c.logger, "DestroySecretVersion") return err }, opts...) if err != nil { @@ -834,7 +839,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -917,7 +922,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -991,21 +996,10 @@ func (c *restClient) ListSecrets(ctx context.Context, req *secretmanagerpb.ListS } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecrets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1077,17 +1071,7 @@ func (c *restClient) CreateSecret(ctx context.Context, req *secretmanagerpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecret") if err != nil { return err } @@ -1145,17 +1129,7 @@ func (c *restClient) AddSecretVersion(ctx context.Context, req *secretmanagerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddSecretVersion") if err != nil { return err } @@ -1205,17 +1179,7 @@ func (c *restClient) GetSecret(ctx context.Context, req *secretmanagerpb.GetSecr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecret") if err != nil { return err } @@ -1280,17 +1244,7 @@ func (c *restClient) UpdateSecret(ctx context.Context, req *secretmanagerpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecret") if err != nil { return err } @@ -1340,15 +1294,8 @@ func (c *restClient) DeleteSecret(ctx context.Context, req *secretmanagerpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecret") + return err }, opts...) } @@ -1401,21 +1348,10 @@ func (c *restClient) ListSecretVersions(ctx context.Context, req *secretmanagerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecretVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1482,17 +1418,7 @@ func (c *restClient) GetSecretVersion(ctx context.Context, req *secretmanagerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecretVersion") if err != nil { return err } @@ -1546,17 +1472,7 @@ func (c *restClient) AccessSecretVersion(ctx context.Context, req *secretmanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AccessSecretVersion") if err != nil { return err } @@ -1616,17 +1532,7 @@ func (c *restClient) DisableSecretVersion(ctx context.Context, req *secretmanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableSecretVersion") if err != nil { return err } @@ -1686,17 +1592,7 @@ func (c *restClient) EnableSecretVersion(ctx context.Context, req *secretmanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableSecretVersion") if err != nil { return err } @@ -1757,17 +1653,7 @@ func (c *restClient) DestroySecretVersion(ctx context.Context, req *secretmanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DestroySecretVersion") if err != nil { return err } @@ -1829,17 +1715,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1893,17 +1769,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1965,17 +1831,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2025,17 +1881,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2100,21 +1946,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/secretmanager/apiv1/secret_manager_client_example_go123_test.go b/secretmanager/apiv1/secret_manager_client_example_go123_test.go index 36e1986cfcc4..20624504df18 100644 --- a/secretmanager/apiv1/secret_manager_client_example_go123_test.go +++ b/secretmanager/apiv1/secret_manager_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListSecretVersions_all() { } for resp, err := range c.ListSecretVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListSecrets_all() { } for resp, err := range c.ListSecrets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/secretmanager/apiv1/secretmanagerpb/resources.pb.go b/secretmanager/apiv1/secretmanagerpb/resources.pb.go index 0498621b9cc3..af6ebf22cba9 100755 --- a/secretmanager/apiv1/secretmanagerpb/resources.pb.go +++ b/secretmanager/apiv1/secretmanagerpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/secretmanager/v1/resources.proto @@ -212,11 +212,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -227,7 +225,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,11 +414,9 @@ type SecretVersion struct { func (x *SecretVersion) Reset() { *x = SecretVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVersion) String() string { @@ -431,7 +427,7 @@ func (*SecretVersion) ProtoMessage() {} func (x *SecretVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +522,9 @@ type Replication struct { func (x *Replication) Reset() { *x = Replication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication) String() string { @@ -541,7 +535,7 @@ func (*Replication) ProtoMessage() {} func (x *Replication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +616,9 @@ type CustomerManagedEncryption struct { func (x *CustomerManagedEncryption) Reset() { *x = CustomerManagedEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerManagedEncryption) String() string { @@ -637,7 +629,7 @@ func (*CustomerManagedEncryption) ProtoMessage() {} func (x *CustomerManagedEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +670,9 @@ type ReplicationStatus struct { func (x *ReplicationStatus) Reset() { *x = ReplicationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus) String() string { @@ -693,7 +683,7 @@ func (*ReplicationStatus) ProtoMessage() {} func (x *ReplicationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +763,9 @@ type CustomerManagedEncryptionStatus struct { func (x *CustomerManagedEncryptionStatus) Reset() { *x = CustomerManagedEncryptionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerManagedEncryptionStatus) String() string { @@ -788,7 +776,7 @@ func (*CustomerManagedEncryptionStatus) ProtoMessage() {} func (x *CustomerManagedEncryptionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +815,9 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic) String() string { @@ -842,7 +828,7 @@ func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +886,9 @@ type Rotation struct { func (x *Rotation) Reset() { *x = Rotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rotation) String() string { @@ -915,7 +899,7 @@ func (*Rotation) ProtoMessage() {} func (x *Rotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +959,9 @@ type SecretPayload struct { func (x *SecretPayload) Reset() { *x = SecretPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretPayload) String() string { @@ -990,7 +972,7 @@ func (*SecretPayload) ProtoMessage() {} func (x *SecretPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1023,9 @@ type Replication_Automatic struct { func (x *Replication_Automatic) Reset() { *x = Replication_Automatic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_Automatic) String() string { @@ -1056,7 +1036,7 @@ func (*Replication_Automatic) ProtoMessage() {} func (x *Replication_Automatic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1095,11 +1075,9 @@ type Replication_UserManaged struct { func (x *Replication_UserManaged) Reset() { *x = Replication_UserManaged{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_UserManaged) String() string { @@ -1110,7 +1088,7 @@ func (*Replication_UserManaged) ProtoMessage() {} func (x *Replication_UserManaged) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1134,9 @@ type Replication_UserManaged_Replica struct { func (x *Replication_UserManaged_Replica) Reset() { *x = Replication_UserManaged_Replica{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_UserManaged_Replica) String() string { @@ -1171,7 +1147,7 @@ func (*Replication_UserManaged_Replica) ProtoMessage() {} func (x *Replication_UserManaged_Replica) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,11 +1195,9 @@ type ReplicationStatus_AutomaticStatus struct { func (x *ReplicationStatus_AutomaticStatus) Reset() { *x = ReplicationStatus_AutomaticStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_AutomaticStatus) String() string { @@ -1234,7 +1208,7 @@ func (*ReplicationStatus_AutomaticStatus) ProtoMessage() {} func (x *ReplicationStatus_AutomaticStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1248,9 @@ type ReplicationStatus_UserManagedStatus struct { func (x *ReplicationStatus_UserManagedStatus) Reset() { *x = ReplicationStatus_UserManagedStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_UserManagedStatus) String() string { @@ -1289,7 +1261,7 @@ func (*ReplicationStatus_UserManagedStatus) ProtoMessage() {} func (x *ReplicationStatus_UserManagedStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1329,11 +1301,9 @@ type ReplicationStatus_UserManagedStatus_ReplicaStatus struct { func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) Reset() { *x = ReplicationStatus_UserManagedStatus_ReplicaStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) String() string { @@ -1344,7 +1314,7 @@ func (*ReplicationStatus_UserManagedStatus_ReplicaStatus) ProtoMessage() {} func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1746,188 +1716,6 @@ func file_google_cloud_secretmanager_v1_resources_proto_init() { if File_google_cloud_secretmanager_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecretVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Replication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomerManagedEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomerManagedEncryptionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Rotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecretPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Replication_Automatic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Replication_UserManaged); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Replication_UserManaged_Replica); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_AutomaticStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_UserManagedStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_UserManagedStatus_ReplicaStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_secretmanager_v1_resources_proto_msgTypes[0].OneofWrappers = []any{ (*Secret_ExpireTime)(nil), (*Secret_Ttl)(nil), diff --git a/secretmanager/apiv1/secretmanagerpb/service.pb.go b/secretmanager/apiv1/secretmanagerpb/service.pb.go index 3650cc23c365..1ec7a7804af2 100755 --- a/secretmanager/apiv1/secretmanagerpb/service.pb.go +++ b/secretmanager/apiv1/secretmanagerpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/secretmanager/v1/service.proto @@ -71,11 +71,9 @@ type ListSecretsRequest struct { func (x *ListSecretsRequest) Reset() { *x = ListSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretsRequest) String() string { @@ -86,7 +84,7 @@ func (*ListSecretsRequest) ProtoMessage() {} func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListSecretsResponse struct { func (x *ListSecretsResponse) Reset() { *x = ListSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretsResponse) String() string { @@ -167,7 +163,7 @@ func (*ListSecretsResponse) ProtoMessage() {} func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type CreateSecretRequest struct { func (x *CreateSecretRequest) Reset() { *x = CreateSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecretRequest) String() string { @@ -242,7 +236,7 @@ func (*CreateSecretRequest) ProtoMessage() {} func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type AddSecretVersionRequest struct { func (x *AddSecretVersionRequest) Reset() { *x = AddSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddSecretVersionRequest) String() string { @@ -312,7 +304,7 @@ func (*AddSecretVersionRequest) ProtoMessage() {} func (x *AddSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +348,9 @@ type GetSecretRequest struct { func (x *GetSecretRequest) Reset() { *x = GetSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecretRequest) String() string { @@ -371,7 +361,7 @@ func (*GetSecretRequest) ProtoMessage() {} func (x *GetSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +412,9 @@ type ListSecretVersionsRequest struct { func (x *ListSecretVersionsRequest) Reset() { *x = ListSecretVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretVersionsRequest) String() string { @@ -437,7 +425,7 @@ func (*ListSecretVersionsRequest) ProtoMessage() {} func (x *ListSecretVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +492,9 @@ type ListSecretVersionsResponse struct { func (x *ListSecretVersionsResponse) Reset() { *x = ListSecretVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretVersionsResponse) String() string { @@ -519,7 +505,7 @@ func (*ListSecretVersionsResponse) ProtoMessage() {} func (x *ListSecretVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,11 +562,9 @@ type GetSecretVersionRequest struct { func (x *GetSecretVersionRequest) Reset() { *x = GetSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecretVersionRequest) String() string { @@ -591,7 +575,7 @@ func (*GetSecretVersionRequest) ProtoMessage() {} func (x *GetSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +613,9 @@ type UpdateSecretRequest struct { func (x *UpdateSecretRequest) Reset() { *x = UpdateSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecretRequest) String() string { @@ -644,7 +626,7 @@ func (*UpdateSecretRequest) ProtoMessage() {} func (x *UpdateSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +676,9 @@ type AccessSecretVersionRequest struct { func (x *AccessSecretVersionRequest) Reset() { *x = AccessSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessSecretVersionRequest) String() string { @@ -709,7 +689,7 @@ func (*AccessSecretVersionRequest) ProtoMessage() {} func (x *AccessSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,11 +729,9 @@ type AccessSecretVersionResponse struct { func (x *AccessSecretVersionResponse) Reset() { *x = AccessSecretVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessSecretVersionResponse) String() string { @@ -764,7 +742,7 @@ func (*AccessSecretVersionResponse) ProtoMessage() {} func (x *AccessSecretVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -812,11 +790,9 @@ type DeleteSecretRequest struct { func (x *DeleteSecretRequest) Reset() { *x = DeleteSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecretRequest) String() string { @@ -827,7 +803,7 @@ func (*DeleteSecretRequest) ProtoMessage() {} func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -877,11 +853,9 @@ type DisableSecretVersionRequest struct { func (x *DisableSecretVersionRequest) Reset() { *x = DisableSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableSecretVersionRequest) String() string { @@ -892,7 +866,7 @@ func (*DisableSecretVersionRequest) ProtoMessage() {} func (x *DisableSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,11 +916,9 @@ type EnableSecretVersionRequest struct { func (x *EnableSecretVersionRequest) Reset() { *x = EnableSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableSecretVersionRequest) String() string { @@ -957,7 +929,7 @@ func (*EnableSecretVersionRequest) ProtoMessage() {} func (x *EnableSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +979,9 @@ type DestroySecretVersionRequest struct { func (x *DestroySecretVersionRequest) Reset() { *x = DestroySecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestroySecretVersionRequest) String() string { @@ -1022,7 +992,7 @@ func (*DestroySecretVersionRequest) ProtoMessage() {} func (x *DestroySecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1554,188 +1524,6 @@ func file_google_cloud_secretmanager_v1_service_proto_init() { return } file_google_cloud_secretmanager_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_secretmanager_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AddSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AccessSecretVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DisableSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EnableSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DestroySecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/secretmanager/apiv1beta2/helpers.go b/secretmanager/apiv1beta2/helpers.go index e0a1011256cf..93acf7aca6ae 100755 --- a/secretmanager/apiv1beta2/helpers.go +++ b/secretmanager/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package secretmanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "secretmanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/secretmanager/apiv1beta2/secret_manager_client.go b/secretmanager/apiv1beta2/secret_manager_client.go index 9ac84fc17ac4..1d4068a9bed6 100755 --- a/secretmanager/apiv1beta2/secret_manager_client.go +++ b/secretmanager/apiv1beta2/secret_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" secretmanagerpb "cloud.google.com/go/secretmanager/apiv1beta2/secretmanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -417,6 +416,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new secret manager service client based on gRPC. @@ -450,6 +451,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: secretmanagerpb.NewSecretManagerServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -497,6 +499,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new secret manager service rest client. @@ -521,6 +525,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -584,7 +589,7 @@ func (c *gRPCClient) ListSecrets(ctx context.Context, req *secretmanagerpb.ListS } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecrets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecrets, req, settings.GRPC, c.logger, "ListSecrets") return err }, opts...) if err != nil { @@ -619,7 +624,7 @@ func (c *gRPCClient) CreateSecret(ctx context.Context, req *secretmanagerpb.Crea var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSecret, req, settings.GRPC, c.logger, "CreateSecret") return err }, opts...) if err != nil { @@ -637,7 +642,7 @@ func (c *gRPCClient) AddSecretVersion(ctx context.Context, req *secretmanagerpb. var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AddSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AddSecretVersion, req, settings.GRPC, c.logger, "AddSecretVersion") return err }, opts...) if err != nil { @@ -655,7 +660,7 @@ func (c *gRPCClient) GetSecret(ctx context.Context, req *secretmanagerpb.GetSecr var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecret, req, settings.GRPC, c.logger, "GetSecret") return err }, opts...) if err != nil { @@ -673,7 +678,7 @@ func (c *gRPCClient) UpdateSecret(ctx context.Context, req *secretmanagerpb.Upda var resp *secretmanagerpb.Secret err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecret(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecret, req, settings.GRPC, c.logger, "UpdateSecret") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *gRPCClient) DeleteSecret(ctx context.Context, req *secretmanagerpb.Dele opts = append((*c.CallOptions).DeleteSecret[0:len((*c.CallOptions).DeleteSecret):len((*c.CallOptions).DeleteSecret)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSecret(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSecret, req, settings.GRPC, c.logger, "DeleteSecret") return err }, opts...) return err @@ -716,7 +721,7 @@ func (c *gRPCClient) ListSecretVersions(ctx context.Context, req *secretmanagerp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecretVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecretVersions, req, settings.GRPC, c.logger, "ListSecretVersions") return err }, opts...) if err != nil { @@ -751,7 +756,7 @@ func (c *gRPCClient) GetSecretVersion(ctx context.Context, req *secretmanagerpb. var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecretVersion, req, settings.GRPC, c.logger, "GetSecretVersion") return err }, opts...) if err != nil { @@ -769,7 +774,7 @@ func (c *gRPCClient) AccessSecretVersion(ctx context.Context, req *secretmanager var resp *secretmanagerpb.AccessSecretVersionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AccessSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AccessSecretVersion, req, settings.GRPC, c.logger, "AccessSecretVersion") return err }, opts...) if err != nil { @@ -787,7 +792,7 @@ func (c *gRPCClient) DisableSecretVersion(ctx context.Context, req *secretmanage var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DisableSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DisableSecretVersion, req, settings.GRPC, c.logger, "DisableSecretVersion") return err }, opts...) if err != nil { @@ -805,7 +810,7 @@ func (c *gRPCClient) EnableSecretVersion(ctx context.Context, req *secretmanager var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EnableSecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EnableSecretVersion, req, settings.GRPC, c.logger, "EnableSecretVersion") return err }, opts...) if err != nil { @@ -823,7 +828,7 @@ func (c *gRPCClient) DestroySecretVersion(ctx context.Context, req *secretmanage var resp *secretmanagerpb.SecretVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DestroySecretVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DestroySecretVersion, req, settings.GRPC, c.logger, "DestroySecretVersion") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -859,7 +864,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -877,7 +882,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -924,7 +929,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -998,21 +1003,10 @@ func (c *restClient) ListSecrets(ctx context.Context, req *secretmanagerpb.ListS } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecrets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1085,17 +1079,7 @@ func (c *restClient) CreateSecret(ctx context.Context, req *secretmanagerpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecret") if err != nil { return err } @@ -1154,17 +1138,7 @@ func (c *restClient) AddSecretVersion(ctx context.Context, req *secretmanagerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddSecretVersion") if err != nil { return err } @@ -1215,17 +1189,7 @@ func (c *restClient) GetSecret(ctx context.Context, req *secretmanagerpb.GetSecr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecret") if err != nil { return err } @@ -1290,17 +1254,7 @@ func (c *restClient) UpdateSecret(ctx context.Context, req *secretmanagerpb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecret") if err != nil { return err } @@ -1350,15 +1304,8 @@ func (c *restClient) DeleteSecret(ctx context.Context, req *secretmanagerpb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecret") + return err }, opts...) } @@ -1411,21 +1358,10 @@ func (c *restClient) ListSecretVersions(ctx context.Context, req *secretmanagerp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecretVersions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1492,17 +1428,7 @@ func (c *restClient) GetSecretVersion(ctx context.Context, req *secretmanagerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecretVersion") if err != nil { return err } @@ -1557,17 +1483,7 @@ func (c *restClient) AccessSecretVersion(ctx context.Context, req *secretmanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AccessSecretVersion") if err != nil { return err } @@ -1628,17 +1544,7 @@ func (c *restClient) DisableSecretVersion(ctx context.Context, req *secretmanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableSecretVersion") if err != nil { return err } @@ -1699,17 +1605,7 @@ func (c *restClient) EnableSecretVersion(ctx context.Context, req *secretmanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableSecretVersion") if err != nil { return err } @@ -1771,17 +1667,7 @@ func (c *restClient) DestroySecretVersion(ctx context.Context, req *secretmanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DestroySecretVersion") if err != nil { return err } @@ -1843,17 +1729,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -1907,17 +1783,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -1979,17 +1845,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2039,17 +1895,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2114,21 +1960,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/secretmanager/apiv1beta2/secret_manager_client_example_go123_test.go b/secretmanager/apiv1beta2/secret_manager_client_example_go123_test.go index 72814d8d1050..223a70bfedac 100644 --- a/secretmanager/apiv1beta2/secret_manager_client_example_go123_test.go +++ b/secretmanager/apiv1beta2/secret_manager_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListSecretVersions_all() { } for resp, err := range c.ListSecretVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListSecrets_all() { } for resp, err := range c.ListSecrets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/secretmanager/apiv1beta2/secretmanagerpb/resources.pb.go b/secretmanager/apiv1beta2/secretmanagerpb/resources.pb.go index dc201b5b6d01..30702d1de870 100755 --- a/secretmanager/apiv1beta2/secretmanagerpb/resources.pb.go +++ b/secretmanager/apiv1beta2/secretmanagerpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/secretmanager/v1beta2/resources.proto @@ -212,11 +212,9 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Secret) String() string { @@ -227,7 +225,7 @@ func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +416,9 @@ type SecretVersion struct { func (x *SecretVersion) Reset() { *x = SecretVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretVersion) String() string { @@ -433,7 +429,7 @@ func (*SecretVersion) ProtoMessage() {} func (x *SecretVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +524,9 @@ type Replication struct { func (x *Replication) Reset() { *x = Replication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication) String() string { @@ -543,7 +537,7 @@ func (*Replication) ProtoMessage() {} func (x *Replication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +618,9 @@ type CustomerManagedEncryption struct { func (x *CustomerManagedEncryption) Reset() { *x = CustomerManagedEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerManagedEncryption) String() string { @@ -639,7 +631,7 @@ func (*CustomerManagedEncryption) ProtoMessage() {} func (x *CustomerManagedEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +672,9 @@ type ReplicationStatus struct { func (x *ReplicationStatus) Reset() { *x = ReplicationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus) String() string { @@ -695,7 +685,7 @@ func (*ReplicationStatus) ProtoMessage() {} func (x *ReplicationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -775,11 +765,9 @@ type CustomerManagedEncryptionStatus struct { func (x *CustomerManagedEncryptionStatus) Reset() { *x = CustomerManagedEncryptionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerManagedEncryptionStatus) String() string { @@ -790,7 +778,7 @@ func (*CustomerManagedEncryptionStatus) ProtoMessage() {} func (x *CustomerManagedEncryptionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -829,11 +817,9 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Topic) String() string { @@ -844,7 +830,7 @@ func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +888,9 @@ type Rotation struct { func (x *Rotation) Reset() { *x = Rotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rotation) String() string { @@ -917,7 +901,7 @@ func (*Rotation) ProtoMessage() {} func (x *Rotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -977,11 +961,9 @@ type SecretPayload struct { func (x *SecretPayload) Reset() { *x = SecretPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretPayload) String() string { @@ -992,7 +974,7 @@ func (*SecretPayload) ProtoMessage() {} func (x *SecretPayload) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1025,9 @@ type Replication_Automatic struct { func (x *Replication_Automatic) Reset() { *x = Replication_Automatic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_Automatic) String() string { @@ -1058,7 +1038,7 @@ func (*Replication_Automatic) ProtoMessage() {} func (x *Replication_Automatic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,11 +1077,9 @@ type Replication_UserManaged struct { func (x *Replication_UserManaged) Reset() { *x = Replication_UserManaged{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_UserManaged) String() string { @@ -1112,7 +1090,7 @@ func (*Replication_UserManaged) ProtoMessage() {} func (x *Replication_UserManaged) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,11 +1136,9 @@ type Replication_UserManaged_Replica struct { func (x *Replication_UserManaged_Replica) Reset() { *x = Replication_UserManaged_Replica{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Replication_UserManaged_Replica) String() string { @@ -1173,7 +1149,7 @@ func (*Replication_UserManaged_Replica) ProtoMessage() {} func (x *Replication_UserManaged_Replica) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1198,9 @@ type ReplicationStatus_AutomaticStatus struct { func (x *ReplicationStatus_AutomaticStatus) Reset() { *x = ReplicationStatus_AutomaticStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_AutomaticStatus) String() string { @@ -1237,7 +1211,7 @@ func (*ReplicationStatus_AutomaticStatus) ProtoMessage() {} func (x *ReplicationStatus_AutomaticStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1278,11 +1252,9 @@ type ReplicationStatus_UserManagedStatus struct { func (x *ReplicationStatus_UserManagedStatus) Reset() { *x = ReplicationStatus_UserManagedStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_UserManagedStatus) String() string { @@ -1293,7 +1265,7 @@ func (*ReplicationStatus_UserManagedStatus) ProtoMessage() {} func (x *ReplicationStatus_UserManagedStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1333,11 +1305,9 @@ type ReplicationStatus_UserManagedStatus_ReplicaStatus struct { func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) Reset() { *x = ReplicationStatus_UserManagedStatus_ReplicaStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) String() string { @@ -1348,7 +1318,7 @@ func (*ReplicationStatus_UserManagedStatus_ReplicaStatus) ProtoMessage() {} func (x *ReplicationStatus_UserManagedStatus_ReplicaStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1759,188 +1729,6 @@ func file_google_cloud_secretmanager_v1beta2_resources_proto_init() { if File_google_cloud_secretmanager_v1beta2_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecretVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Replication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomerManagedEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomerManagedEncryptionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Rotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecretPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Replication_Automatic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Replication_UserManaged); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Replication_UserManaged_Replica); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_AutomaticStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_UserManagedStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationStatus_UserManagedStatus_ReplicaStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_secretmanager_v1beta2_resources_proto_msgTypes[0].OneofWrappers = []any{ (*Secret_ExpireTime)(nil), (*Secret_Ttl)(nil), diff --git a/secretmanager/apiv1beta2/secretmanagerpb/service.pb.go b/secretmanager/apiv1beta2/secretmanagerpb/service.pb.go index 51d925de7604..958f0c422fca 100755 --- a/secretmanager/apiv1beta2/secretmanagerpb/service.pb.go +++ b/secretmanager/apiv1beta2/secretmanagerpb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/secretmanager/v1beta2/service.proto @@ -71,11 +71,9 @@ type ListSecretsRequest struct { func (x *ListSecretsRequest) Reset() { *x = ListSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretsRequest) String() string { @@ -86,7 +84,7 @@ func (*ListSecretsRequest) ProtoMessage() {} func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ListSecretsResponse struct { func (x *ListSecretsResponse) Reset() { *x = ListSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretsResponse) String() string { @@ -167,7 +163,7 @@ func (*ListSecretsResponse) ProtoMessage() {} func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type CreateSecretRequest struct { func (x *CreateSecretRequest) Reset() { *x = CreateSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecretRequest) String() string { @@ -242,7 +236,7 @@ func (*CreateSecretRequest) ProtoMessage() {} func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +291,9 @@ type AddSecretVersionRequest struct { func (x *AddSecretVersionRequest) Reset() { *x = AddSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddSecretVersionRequest) String() string { @@ -312,7 +304,7 @@ func (*AddSecretVersionRequest) ProtoMessage() {} func (x *AddSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -356,11 +348,9 @@ type GetSecretRequest struct { func (x *GetSecretRequest) Reset() { *x = GetSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecretRequest) String() string { @@ -371,7 +361,7 @@ func (*GetSecretRequest) ProtoMessage() {} func (x *GetSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -422,11 +412,9 @@ type ListSecretVersionsRequest struct { func (x *ListSecretVersionsRequest) Reset() { *x = ListSecretVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretVersionsRequest) String() string { @@ -437,7 +425,7 @@ func (*ListSecretVersionsRequest) ProtoMessage() {} func (x *ListSecretVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -505,11 +493,9 @@ type ListSecretVersionsResponse struct { func (x *ListSecretVersionsResponse) Reset() { *x = ListSecretVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecretVersionsResponse) String() string { @@ -520,7 +506,7 @@ func (*ListSecretVersionsResponse) ProtoMessage() {} func (x *ListSecretVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +563,9 @@ type GetSecretVersionRequest struct { func (x *GetSecretVersionRequest) Reset() { *x = GetSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecretVersionRequest) String() string { @@ -592,7 +576,7 @@ func (*GetSecretVersionRequest) ProtoMessage() {} func (x *GetSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +614,9 @@ type UpdateSecretRequest struct { func (x *UpdateSecretRequest) Reset() { *x = UpdateSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecretRequest) String() string { @@ -645,7 +627,7 @@ func (*UpdateSecretRequest) ProtoMessage() {} func (x *UpdateSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +677,9 @@ type AccessSecretVersionRequest struct { func (x *AccessSecretVersionRequest) Reset() { *x = AccessSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessSecretVersionRequest) String() string { @@ -710,7 +690,7 @@ func (*AccessSecretVersionRequest) ProtoMessage() {} func (x *AccessSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +730,9 @@ type AccessSecretVersionResponse struct { func (x *AccessSecretVersionResponse) Reset() { *x = AccessSecretVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessSecretVersionResponse) String() string { @@ -765,7 +743,7 @@ func (*AccessSecretVersionResponse) ProtoMessage() {} func (x *AccessSecretVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +791,9 @@ type DeleteSecretRequest struct { func (x *DeleteSecretRequest) Reset() { *x = DeleteSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecretRequest) String() string { @@ -828,7 +804,7 @@ func (*DeleteSecretRequest) ProtoMessage() {} func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -878,11 +854,9 @@ type DisableSecretVersionRequest struct { func (x *DisableSecretVersionRequest) Reset() { *x = DisableSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableSecretVersionRequest) String() string { @@ -893,7 +867,7 @@ func (*DisableSecretVersionRequest) ProtoMessage() {} func (x *DisableSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +917,9 @@ type EnableSecretVersionRequest struct { func (x *EnableSecretVersionRequest) Reset() { *x = EnableSecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableSecretVersionRequest) String() string { @@ -958,7 +930,7 @@ func (*EnableSecretVersionRequest) ProtoMessage() {} func (x *EnableSecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +980,9 @@ type DestroySecretVersionRequest struct { func (x *DestroySecretVersionRequest) Reset() { *x = DestroySecretVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DestroySecretVersionRequest) String() string { @@ -1023,7 +993,7 @@ func (*DestroySecretVersionRequest) ProtoMessage() {} func (x *DestroySecretVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,188 +1546,6 @@ func file_google_cloud_secretmanager_v1beta2_service_proto_init() { return } file_google_cloud_secretmanager_v1beta2_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AddSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSecretVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AccessSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AccessSecretVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DisableSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*EnableSecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_secretmanager_v1beta2_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DestroySecretVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securesourcemanager/apiv1/helpers.go b/securesourcemanager/apiv1/helpers.go index f235d192937c..77eeff28331e 100755 --- a/securesourcemanager/apiv1/helpers.go +++ b/securesourcemanager/apiv1/helpers.go @@ -18,10 +18,20 @@ package securesourcemanager import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securesourcemanager.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securesourcemanager/apiv1/secure_source_manager_client.go b/securesourcemanager/apiv1/secure_source_manager_client.go index ec29d0e8a6e7..4918a7b2f0da 100755 --- a/securesourcemanager/apiv1/secure_source_manager_client.go +++ b/securesourcemanager/apiv1/secure_source_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securesourcemanagerpb "cloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -563,6 +562,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new secure source manager client based on gRPC. @@ -604,6 +605,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securesourcemanagerpb.NewSecureSourceManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -669,6 +671,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new secure source manager rest client. @@ -701,6 +705,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -774,7 +779,7 @@ func (c *gRPCClient) ListInstances(ctx context.Context, req *securesourcemanager } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -809,7 +814,7 @@ func (c *gRPCClient) GetInstance(ctx context.Context, req *securesourcemanagerpb var resp *securesourcemanagerpb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -827,7 +832,7 @@ func (c *gRPCClient) CreateInstance(ctx context.Context, req *securesourcemanage var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *gRPCClient) DeleteInstance(ctx context.Context, req *securesourcemanage var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *gRPCClient) ListRepositories(ctx context.Context, req *securesourcemana } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRepositories, req, settings.GRPC, c.logger, "ListRepositories") return err }, opts...) if err != nil { @@ -913,7 +918,7 @@ func (c *gRPCClient) GetRepository(ctx context.Context, req *securesourcemanager var resp *securesourcemanagerpb.Repository err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRepository, req, settings.GRPC, c.logger, "GetRepository") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *gRPCClient) CreateRepository(ctx context.Context, req *securesourcemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRepository, req, settings.GRPC, c.logger, "CreateRepository") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *gRPCClient) DeleteRepository(ctx context.Context, req *securesourcemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRepository, req, settings.GRPC, c.logger, "DeleteRepository") return err }, opts...) if err != nil { @@ -971,7 +976,7 @@ func (c *gRPCClient) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPoli var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicyRepo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicyRepo, req, settings.GRPC, c.logger, "GetIamPolicyRepo") return err }, opts...) if err != nil { @@ -989,7 +994,7 @@ func (c *gRPCClient) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPoli var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicyRepo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicyRepo, req, settings.GRPC, c.logger, "SetIamPolicyRepo") return err }, opts...) if err != nil { @@ -1007,7 +1012,7 @@ func (c *gRPCClient) TestIamPermissionsRepo(ctx context.Context, req *iampb.Test var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissionsRepo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissionsRepo, req, settings.GRPC, c.logger, "TestIamPermissionsRepo") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *gRPCClient) CreateBranchRule(ctx context.Context, req *securesourcemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBranchRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBranchRule, req, settings.GRPC, c.logger, "CreateBranchRule") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *gRPCClient) ListBranchRules(ctx context.Context, req *securesourcemanag } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBranchRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBranchRules, req, settings.GRPC, c.logger, "ListBranchRules") return err }, opts...) if err != nil { @@ -1091,7 +1096,7 @@ func (c *gRPCClient) GetBranchRule(ctx context.Context, req *securesourcemanager var resp *securesourcemanagerpb.BranchRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBranchRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBranchRule, req, settings.GRPC, c.logger, "GetBranchRule") return err }, opts...) if err != nil { @@ -1109,7 +1114,7 @@ func (c *gRPCClient) UpdateBranchRule(ctx context.Context, req *securesourcemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBranchRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBranchRule, req, settings.GRPC, c.logger, "UpdateBranchRule") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *gRPCClient) DeleteBranchRule(ctx context.Context, req *securesourcemana var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteBranchRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteBranchRule, req, settings.GRPC, c.logger, "DeleteBranchRule") return err }, opts...) if err != nil { @@ -1149,7 +1154,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1178,7 +1183,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1213,7 +1218,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1231,7 +1236,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1249,7 +1254,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1266,7 +1271,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1280,7 +1285,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1295,7 +1300,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1324,7 +1329,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1401,21 +1406,10 @@ func (c *restClient) ListInstances(ctx context.Context, req *securesourcemanager } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1478,17 +1472,7 @@ func (c *restClient) GetInstance(ctx context.Context, req *securesourcemanagerpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -1548,21 +1532,10 @@ func (c *restClient) CreateInstance(ctx context.Context, req *securesourcemanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1615,21 +1588,10 @@ func (c *restClient) DeleteInstance(ctx context.Context, req *securesourcemanage httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1700,21 +1662,10 @@ func (c *restClient) ListRepositories(ctx context.Context, req *securesourcemana } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRepositories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1779,17 +1730,7 @@ func (c *restClient) GetRepository(ctx context.Context, req *securesourcemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRepository") if err != nil { return err } @@ -1848,21 +1789,10 @@ func (c *restClient) CreateRepository(ctx context.Context, req *securesourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRepository") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1917,21 +1847,10 @@ func (c *restClient) DeleteRepository(ctx context.Context, req *securesourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRepository") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1985,17 +1904,7 @@ func (c *restClient) GetIamPolicyRepo(ctx context.Context, req *iampb.GetIamPoli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicyRepo") if err != nil { return err } @@ -2051,17 +1960,7 @@ func (c *restClient) SetIamPolicyRepo(ctx context.Context, req *iampb.SetIamPoli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicyRepo") if err != nil { return err } @@ -2118,17 +2017,7 @@ func (c *restClient) TestIamPermissionsRepo(ctx context.Context, req *iampb.Test httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissionsRepo") if err != nil { return err } @@ -2185,21 +2074,10 @@ func (c *restClient) CreateBranchRule(ctx context.Context, req *securesourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBranchRule") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2262,21 +2140,10 @@ func (c *restClient) ListBranchRules(ctx context.Context, req *securesourcemanag } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBranchRules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2339,17 +2206,7 @@ func (c *restClient) GetBranchRule(ctx context.Context, req *securesourcemanager httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBranchRule") if err != nil { return err } @@ -2415,21 +2272,10 @@ func (c *restClient) UpdateBranchRule(ctx context.Context, req *securesourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBranchRule") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2482,21 +2328,10 @@ func (c *restClient) DeleteBranchRule(ctx context.Context, req *securesourcemana httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBranchRule") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2547,17 +2382,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2622,21 +2447,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2703,17 +2517,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -2773,17 +2577,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2845,17 +2639,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2908,15 +2692,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2950,15 +2727,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2995,17 +2765,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3070,21 +2830,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securesourcemanager/apiv1/secure_source_manager_client_example_go123_test.go b/securesourcemanager/apiv1/secure_source_manager_client_example_go123_test.go index b118507d8db9..aa8de2ef0ef6 100644 --- a/securesourcemanager/apiv1/secure_source_manager_client_example_go123_test.go +++ b/securesourcemanager/apiv1/secure_source_manager_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListBranchRules_all() { } for resp, err := range c.ListBranchRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListRepositories_all() { } for resp, err := range c.ListRepositories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securesourcemanager/apiv1/securesourcemanagerpb/secure_source_manager.pb.go b/securesourcemanager/apiv1/securesourcemanagerpb/secure_source_manager.pb.go index 8b6c1e52f3ba..74a23eb57e45 100755 --- a/securesourcemanager/apiv1/securesourcemanagerpb/secure_source_manager.pb.go +++ b/securesourcemanager/apiv1/securesourcemanagerpb/secure_source_manager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto @@ -207,11 +207,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -222,7 +220,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +337,9 @@ type Repository struct { func (x *Repository) Reset() { *x = Repository{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository) String() string { @@ -354,7 +350,7 @@ func (*Repository) ProtoMessage() {} func (x *Repository) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,11 +483,9 @@ type BranchRule struct { func (x *BranchRule) Reset() { *x = BranchRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BranchRule) String() string { @@ -502,7 +496,7 @@ func (*BranchRule) ProtoMessage() {} func (x *BranchRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +637,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -658,7 +650,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +715,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -738,7 +728,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +776,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -801,7 +789,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,11 +841,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -868,7 +854,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -937,11 +923,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -952,7 +936,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +993,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1024,7 +1006,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1097,9 @@ type ListRepositoriesRequest struct { func (x *ListRepositoriesRequest) Reset() { *x = ListRepositoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesRequest) String() string { @@ -1130,7 +1110,7 @@ func (*ListRepositoriesRequest) ProtoMessage() {} func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1173,9 @@ type ListRepositoriesResponse struct { func (x *ListRepositoriesResponse) Reset() { *x = ListRepositoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRepositoriesResponse) String() string { @@ -1208,7 +1186,7 @@ func (*ListRepositoriesResponse) ProtoMessage() {} func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1251,11 +1229,9 @@ type GetRepositoryRequest struct { func (x *GetRepositoryRequest) Reset() { *x = GetRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRepositoryRequest) String() string { @@ -1266,7 +1242,7 @@ func (*GetRepositoryRequest) ProtoMessage() {} func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1283,9 @@ type CreateRepositoryRequest struct { func (x *CreateRepositoryRequest) Reset() { *x = CreateRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRepositoryRequest) String() string { @@ -1322,7 +1296,7 @@ func (*CreateRepositoryRequest) ProtoMessage() {} func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1375,11 +1349,9 @@ type DeleteRepositoryRequest struct { func (x *DeleteRepositoryRequest) Reset() { *x = DeleteRepositoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRepositoryRequest) String() string { @@ -1390,7 +1362,7 @@ func (*DeleteRepositoryRequest) ProtoMessage() {} func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1433,11 +1405,9 @@ type GetBranchRuleRequest struct { func (x *GetBranchRuleRequest) Reset() { *x = GetBranchRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBranchRuleRequest) String() string { @@ -1448,7 +1418,7 @@ func (*GetBranchRuleRequest) ProtoMessage() {} func (x *GetBranchRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1483,11 +1453,9 @@ type CreateBranchRuleRequest struct { func (x *CreateBranchRuleRequest) Reset() { *x = CreateBranchRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBranchRuleRequest) String() string { @@ -1498,7 +1466,7 @@ func (*CreateBranchRuleRequest) ProtoMessage() {} func (x *CreateBranchRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1547,11 +1515,9 @@ type ListBranchRulesRequest struct { func (x *ListBranchRulesRequest) Reset() { *x = ListBranchRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBranchRulesRequest) String() string { @@ -1562,7 +1528,7 @@ func (*ListBranchRulesRequest) ProtoMessage() {} func (x *ListBranchRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,11 +1578,9 @@ type DeleteBranchRuleRequest struct { func (x *DeleteBranchRuleRequest) Reset() { *x = DeleteBranchRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBranchRuleRequest) String() string { @@ -1627,7 +1591,7 @@ func (*DeleteBranchRuleRequest) ProtoMessage() {} func (x *DeleteBranchRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1676,11 +1640,9 @@ type UpdateBranchRuleRequest struct { func (x *UpdateBranchRuleRequest) Reset() { *x = UpdateBranchRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBranchRuleRequest) String() string { @@ -1691,7 +1653,7 @@ func (*UpdateBranchRuleRequest) ProtoMessage() {} func (x *UpdateBranchRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1741,11 +1703,9 @@ type ListBranchRulesResponse struct { func (x *ListBranchRulesResponse) Reset() { *x = ListBranchRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBranchRulesResponse) String() string { @@ -1756,7 +1716,7 @@ func (*ListBranchRulesResponse) ProtoMessage() {} func (x *ListBranchRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1804,11 +1764,9 @@ type Instance_HostConfig struct { func (x *Instance_HostConfig) Reset() { *x = Instance_HostConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_HostConfig) String() string { @@ -1819,7 +1777,7 @@ func (*Instance_HostConfig) ProtoMessage() {} func (x *Instance_HostConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1887,11 +1845,9 @@ type Instance_PrivateConfig struct { func (x *Instance_PrivateConfig) Reset() { *x = Instance_PrivateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_PrivateConfig) String() string { @@ -1902,7 +1858,7 @@ func (*Instance_PrivateConfig) ProtoMessage() {} func (x *Instance_PrivateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1969,11 +1925,9 @@ type Repository_URIs struct { func (x *Repository_URIs) Reset() { *x = Repository_URIs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_URIs) String() string { @@ -1984,7 +1938,7 @@ func (*Repository_URIs) ProtoMessage() {} func (x *Repository_URIs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2162,11 +2116,9 @@ type Repository_InitialConfig struct { func (x *Repository_InitialConfig) Reset() { *x = Repository_InitialConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Repository_InitialConfig) String() string { @@ -2177,7 +2129,7 @@ func (*Repository_InitialConfig) ProtoMessage() {} func (x *Repository_InitialConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2232,11 +2184,9 @@ type BranchRule_Check struct { func (x *BranchRule_Check) Reset() { *x = BranchRule_Check{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BranchRule_Check) String() string { @@ -2247,7 +2197,7 @@ func (*BranchRule_Check) ProtoMessage() {} func (x *BranchRule_Check) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3108,308 +3058,6 @@ func file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_init() if File_google_cloud_securesourcemanager_v1_secure_source_manager_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Repository); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BranchRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListRepositoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRepositoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetBranchRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateBranchRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListBranchRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBranchRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBranchRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListBranchRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Instance_HostConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Instance_PrivateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Repository_URIs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Repository_InitialConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securesourcemanager_v1_secure_source_manager_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BranchRule_Check); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/privateca/apiv1/certificate_authority_client.go b/security/privateca/apiv1/certificate_authority_client.go index c6a32676b69f..bba1e0706a79 100755 --- a/security/privateca/apiv1/certificate_authority_client.go +++ b/security/privateca/apiv1/certificate_authority_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1372,6 +1371,8 @@ type certificateAuthorityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCertificateAuthorityClient creates a new certificate authority service client based on gRPC. @@ -1400,6 +1401,7 @@ func NewCertificateAuthorityClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, certificateAuthorityClient: privatecapb.NewCertificateAuthorityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -1465,6 +1467,8 @@ type certificateAuthorityRESTClient struct { // Points back to the CallOptions field of the containing CertificateAuthorityClient CallOptions **CertificateAuthorityCallOptions + + logger *slog.Logger } // NewCertificateAuthorityRESTClient creates a new certificate authority service rest client. @@ -1484,6 +1488,7 @@ func NewCertificateAuthorityRESTClient(ctx context.Context, opts ...option.Clien endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1546,7 +1551,7 @@ func (c *certificateAuthorityGRPCClient) CreateCertificate(ctx context.Context, var resp *privatecapb.Certificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.CreateCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.CreateCertificate, req, settings.GRPC, c.logger, "CreateCertificate") return err }, opts...) if err != nil { @@ -1564,7 +1569,7 @@ func (c *certificateAuthorityGRPCClient) GetCertificate(ctx context.Context, req var resp *privatecapb.Certificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.GetCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.GetCertificate, req, settings.GRPC, c.logger, "GetCertificate") return err }, opts...) if err != nil { @@ -1593,7 +1598,7 @@ func (c *certificateAuthorityGRPCClient) ListCertificates(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ListCertificates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ListCertificates, req, settings.GRPC, c.logger, "ListCertificates") return err }, opts...) if err != nil { @@ -1628,7 +1633,7 @@ func (c *certificateAuthorityGRPCClient) RevokeCertificate(ctx context.Context, var resp *privatecapb.Certificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.RevokeCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.RevokeCertificate, req, settings.GRPC, c.logger, "RevokeCertificate") return err }, opts...) if err != nil { @@ -1646,7 +1651,7 @@ func (c *certificateAuthorityGRPCClient) UpdateCertificate(ctx context.Context, var resp *privatecapb.Certificate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UpdateCertificate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UpdateCertificate, req, settings.GRPC, c.logger, "UpdateCertificate") return err }, opts...) if err != nil { @@ -1664,7 +1669,7 @@ func (c *certificateAuthorityGRPCClient) ActivateCertificateAuthority(ctx contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ActivateCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ActivateCertificateAuthority, req, settings.GRPC, c.logger, "ActivateCertificateAuthority") return err }, opts...) if err != nil { @@ -1684,7 +1689,7 @@ func (c *certificateAuthorityGRPCClient) CreateCertificateAuthority(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.CreateCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.CreateCertificateAuthority, req, settings.GRPC, c.logger, "CreateCertificateAuthority") return err }, opts...) if err != nil { @@ -1704,7 +1709,7 @@ func (c *certificateAuthorityGRPCClient) DisableCertificateAuthority(ctx context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.DisableCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.DisableCertificateAuthority, req, settings.GRPC, c.logger, "DisableCertificateAuthority") return err }, opts...) if err != nil { @@ -1724,7 +1729,7 @@ func (c *certificateAuthorityGRPCClient) EnableCertificateAuthority(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.EnableCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.EnableCertificateAuthority, req, settings.GRPC, c.logger, "EnableCertificateAuthority") return err }, opts...) if err != nil { @@ -1744,7 +1749,7 @@ func (c *certificateAuthorityGRPCClient) FetchCertificateAuthorityCsr(ctx contex var resp *privatecapb.FetchCertificateAuthorityCsrResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.FetchCertificateAuthorityCsr(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.FetchCertificateAuthorityCsr, req, settings.GRPC, c.logger, "FetchCertificateAuthorityCsr") return err }, opts...) if err != nil { @@ -1762,7 +1767,7 @@ func (c *certificateAuthorityGRPCClient) GetCertificateAuthority(ctx context.Con var resp *privatecapb.CertificateAuthority err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.GetCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.GetCertificateAuthority, req, settings.GRPC, c.logger, "GetCertificateAuthority") return err }, opts...) if err != nil { @@ -1791,7 +1796,7 @@ func (c *certificateAuthorityGRPCClient) ListCertificateAuthorities(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ListCertificateAuthorities(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ListCertificateAuthorities, req, settings.GRPC, c.logger, "ListCertificateAuthorities") return err }, opts...) if err != nil { @@ -1826,7 +1831,7 @@ func (c *certificateAuthorityGRPCClient) UndeleteCertificateAuthority(ctx contex var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UndeleteCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UndeleteCertificateAuthority, req, settings.GRPC, c.logger, "UndeleteCertificateAuthority") return err }, opts...) if err != nil { @@ -1846,7 +1851,7 @@ func (c *certificateAuthorityGRPCClient) DeleteCertificateAuthority(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.DeleteCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.DeleteCertificateAuthority, req, settings.GRPC, c.logger, "DeleteCertificateAuthority") return err }, opts...) if err != nil { @@ -1866,7 +1871,7 @@ func (c *certificateAuthorityGRPCClient) UpdateCertificateAuthority(ctx context. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UpdateCertificateAuthority(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UpdateCertificateAuthority, req, settings.GRPC, c.logger, "UpdateCertificateAuthority") return err }, opts...) if err != nil { @@ -1886,7 +1891,7 @@ func (c *certificateAuthorityGRPCClient) CreateCaPool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.CreateCaPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.CreateCaPool, req, settings.GRPC, c.logger, "CreateCaPool") return err }, opts...) if err != nil { @@ -1906,7 +1911,7 @@ func (c *certificateAuthorityGRPCClient) UpdateCaPool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UpdateCaPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UpdateCaPool, req, settings.GRPC, c.logger, "UpdateCaPool") return err }, opts...) if err != nil { @@ -1926,7 +1931,7 @@ func (c *certificateAuthorityGRPCClient) GetCaPool(ctx context.Context, req *pri var resp *privatecapb.CaPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.GetCaPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.GetCaPool, req, settings.GRPC, c.logger, "GetCaPool") return err }, opts...) if err != nil { @@ -1955,7 +1960,7 @@ func (c *certificateAuthorityGRPCClient) ListCaPools(ctx context.Context, req *p } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ListCaPools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ListCaPools, req, settings.GRPC, c.logger, "ListCaPools") return err }, opts...) if err != nil { @@ -1990,7 +1995,7 @@ func (c *certificateAuthorityGRPCClient) DeleteCaPool(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.DeleteCaPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.DeleteCaPool, req, settings.GRPC, c.logger, "DeleteCaPool") return err }, opts...) if err != nil { @@ -2010,7 +2015,7 @@ func (c *certificateAuthorityGRPCClient) FetchCaCerts(ctx context.Context, req * var resp *privatecapb.FetchCaCertsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.FetchCaCerts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.FetchCaCerts, req, settings.GRPC, c.logger, "FetchCaCerts") return err }, opts...) if err != nil { @@ -2028,7 +2033,7 @@ func (c *certificateAuthorityGRPCClient) GetCertificateRevocationList(ctx contex var resp *privatecapb.CertificateRevocationList err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.GetCertificateRevocationList(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.GetCertificateRevocationList, req, settings.GRPC, c.logger, "GetCertificateRevocationList") return err }, opts...) if err != nil { @@ -2057,7 +2062,7 @@ func (c *certificateAuthorityGRPCClient) ListCertificateRevocationLists(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ListCertificateRevocationLists(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ListCertificateRevocationLists, req, settings.GRPC, c.logger, "ListCertificateRevocationLists") return err }, opts...) if err != nil { @@ -2092,7 +2097,7 @@ func (c *certificateAuthorityGRPCClient) UpdateCertificateRevocationList(ctx con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UpdateCertificateRevocationList(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UpdateCertificateRevocationList, req, settings.GRPC, c.logger, "UpdateCertificateRevocationList") return err }, opts...) if err != nil { @@ -2112,7 +2117,7 @@ func (c *certificateAuthorityGRPCClient) CreateCertificateTemplate(ctx context.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.CreateCertificateTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.CreateCertificateTemplate, req, settings.GRPC, c.logger, "CreateCertificateTemplate") return err }, opts...) if err != nil { @@ -2132,7 +2137,7 @@ func (c *certificateAuthorityGRPCClient) DeleteCertificateTemplate(ctx context.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.DeleteCertificateTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.DeleteCertificateTemplate, req, settings.GRPC, c.logger, "DeleteCertificateTemplate") return err }, opts...) if err != nil { @@ -2152,7 +2157,7 @@ func (c *certificateAuthorityGRPCClient) GetCertificateTemplate(ctx context.Cont var resp *privatecapb.CertificateTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.GetCertificateTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.GetCertificateTemplate, req, settings.GRPC, c.logger, "GetCertificateTemplate") return err }, opts...) if err != nil { @@ -2181,7 +2186,7 @@ func (c *certificateAuthorityGRPCClient) ListCertificateTemplates(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.ListCertificateTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.ListCertificateTemplates, req, settings.GRPC, c.logger, "ListCertificateTemplates") return err }, opts...) if err != nil { @@ -2216,7 +2221,7 @@ func (c *certificateAuthorityGRPCClient) UpdateCertificateTemplate(ctx context.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.certificateAuthorityClient.UpdateCertificateTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.certificateAuthorityClient.UpdateCertificateTemplate, req, settings.GRPC, c.logger, "UpdateCertificateTemplate") return err }, opts...) if err != nil { @@ -2236,7 +2241,7 @@ func (c *certificateAuthorityGRPCClient) GetLocation(ctx context.Context, req *l var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2265,7 +2270,7 @@ func (c *certificateAuthorityGRPCClient) ListLocations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2300,7 +2305,7 @@ func (c *certificateAuthorityGRPCClient) GetIamPolicy(ctx context.Context, req * var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -2318,7 +2323,7 @@ func (c *certificateAuthorityGRPCClient) SetIamPolicy(ctx context.Context, req * var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2336,7 +2341,7 @@ func (c *certificateAuthorityGRPCClient) TestIamPermissions(ctx context.Context, var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2353,7 +2358,7 @@ func (c *certificateAuthorityGRPCClient) CancelOperation(ctx context.Context, re opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2367,7 +2372,7 @@ func (c *certificateAuthorityGRPCClient) DeleteOperation(ctx context.Context, re opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2382,7 +2387,7 @@ func (c *certificateAuthorityGRPCClient) GetOperation(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2411,7 +2416,7 @@ func (c *certificateAuthorityGRPCClient) ListOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2491,17 +2496,7 @@ func (c *certificateAuthorityRESTClient) CreateCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificate") if err != nil { return err } @@ -2551,17 +2546,7 @@ func (c *certificateAuthorityRESTClient) GetCertificate(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificate") if err != nil { return err } @@ -2629,21 +2614,10 @@ func (c *certificateAuthorityRESTClient) ListCertificates(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2712,17 +2686,7 @@ func (c *certificateAuthorityRESTClient) RevokeCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevokeCertificate") if err != nil { return err } @@ -2791,17 +2755,7 @@ func (c *certificateAuthorityRESTClient) UpdateCertificate(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificate") if err != nil { return err } @@ -2865,21 +2819,10 @@ func (c *certificateAuthorityRESTClient) ActivateCertificateAuthority(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ActivateCertificateAuthority") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2942,21 +2885,10 @@ func (c *certificateAuthorityRESTClient) CreateCertificateAuthority(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificateAuthority") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3013,21 +2945,10 @@ func (c *certificateAuthorityRESTClient) DisableCertificateAuthority(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableCertificateAuthority") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3084,21 +3005,10 @@ func (c *certificateAuthorityRESTClient) EnableCertificateAuthority(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableCertificateAuthority") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3159,17 +3069,7 @@ func (c *certificateAuthorityRESTClient) FetchCertificateAuthorityCsr(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchCertificateAuthorityCsr") if err != nil { return err } @@ -3220,17 +3120,7 @@ func (c *certificateAuthorityRESTClient) GetCertificateAuthority(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateAuthority") if err != nil { return err } @@ -3299,21 +3189,10 @@ func (c *certificateAuthorityRESTClient) ListCertificateAuthorities(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateAuthorities") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3383,21 +3262,10 @@ func (c *certificateAuthorityRESTClient) UndeleteCertificateAuthority(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteCertificateAuthority") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3460,21 +3328,10 @@ func (c *certificateAuthorityRESTClient) DeleteCertificateAuthority(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificateAuthority") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3542,21 +3399,10 @@ func (c *certificateAuthorityRESTClient) UpdateCertificateAuthority(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificateAuthority") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3617,21 +3463,10 @@ func (c *certificateAuthorityRESTClient) CreateCaPool(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCaPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3698,21 +3533,10 @@ func (c *certificateAuthorityRESTClient) UpdateCaPool(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCaPool") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3763,17 +3587,7 @@ func (c *certificateAuthorityRESTClient) GetCaPool(ctx context.Context, req *pri httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCaPool") if err != nil { return err } @@ -3841,21 +3655,10 @@ func (c *certificateAuthorityRESTClient) ListCaPools(ctx context.Context, req *p } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCaPools") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3923,21 +3726,10 @@ func (c *certificateAuthorityRESTClient) DeleteCaPool(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCaPool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3997,17 +3789,7 @@ func (c *certificateAuthorityRESTClient) FetchCaCerts(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchCaCerts") if err != nil { return err } @@ -4058,17 +3840,7 @@ func (c *certificateAuthorityRESTClient) GetCertificateRevocationList(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateRevocationList") if err != nil { return err } @@ -4137,21 +3909,10 @@ func (c *certificateAuthorityRESTClient) ListCertificateRevocationLists(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateRevocationLists") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4231,21 +3992,10 @@ func (c *certificateAuthorityRESTClient) UpdateCertificateRevocationList(ctx con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificateRevocationList") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4308,21 +4058,10 @@ func (c *certificateAuthorityRESTClient) CreateCertificateTemplate(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCertificateTemplate") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4376,21 +4115,10 @@ func (c *certificateAuthorityRESTClient) DeleteCertificateTemplate(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCertificateTemplate") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4442,17 +4170,7 @@ func (c *certificateAuthorityRESTClient) GetCertificateTemplate(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCertificateTemplate") if err != nil { return err } @@ -4521,21 +4239,10 @@ func (c *certificateAuthorityRESTClient) ListCertificateTemplates(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCertificateTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4615,21 +4322,10 @@ func (c *certificateAuthorityRESTClient) UpdateCertificateTemplate(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCertificateTemplate") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4680,17 +4376,7 @@ func (c *certificateAuthorityRESTClient) GetLocation(ctx context.Context, req *l httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4755,21 +4441,10 @@ func (c *certificateAuthorityRESTClient) ListLocations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4836,17 +4511,7 @@ func (c *certificateAuthorityRESTClient) GetIamPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -4906,17 +4571,7 @@ func (c *certificateAuthorityRESTClient) SetIamPolicy(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4978,17 +4633,7 @@ func (c *certificateAuthorityRESTClient) TestIamPermissions(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5041,15 +4686,8 @@ func (c *certificateAuthorityRESTClient) CancelOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -5083,15 +4721,8 @@ func (c *certificateAuthorityRESTClient) DeleteOperation(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -5128,17 +4759,7 @@ func (c *certificateAuthorityRESTClient) GetOperation(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5203,21 +4824,10 @@ func (c *certificateAuthorityRESTClient) ListOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/security/privateca/apiv1/certificate_authority_client_example_go123_test.go b/security/privateca/apiv1/certificate_authority_client_example_go123_test.go index 077b3a9656e7..d4b0d06c5f51 100644 --- a/security/privateca/apiv1/certificate_authority_client_example_go123_test.go +++ b/security/privateca/apiv1/certificate_authority_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleCertificateAuthorityClient_ListCaPools_all() { } for resp, err := range c.ListCaPools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleCertificateAuthorityClient_ListCertificateAuthorities_all() { } for resp, err := range c.ListCertificateAuthorities(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleCertificateAuthorityClient_ListCertificateRevocationLists_all() { } for resp, err := range c.ListCertificateRevocationLists(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleCertificateAuthorityClient_ListCertificateTemplates_all() { } for resp, err := range c.ListCertificateTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleCertificateAuthorityClient_ListCertificates_all() { } for resp, err := range c.ListCertificates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleCertificateAuthorityClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleCertificateAuthorityClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/security/privateca/apiv1/helpers.go b/security/privateca/apiv1/helpers.go index 48070653feed..8bd4842c2813 100755 --- a/security/privateca/apiv1/helpers.go +++ b/security/privateca/apiv1/helpers.go @@ -18,10 +18,20 @@ package privateca import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "privateca.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/security/privateca/apiv1/privatecapb/resources.pb.go b/security/privateca/apiv1/privatecapb/resources.pb.go index ca965f4d0a24..035dd30d11e5 100755 --- a/security/privateca/apiv1/privatecapb/resources.pb.go +++ b/security/privateca/apiv1/privatecapb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/privateca/v1/resources.proto @@ -934,11 +934,9 @@ type CertificateAuthority struct { func (x *CertificateAuthority) Reset() { *x = CertificateAuthority{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority) String() string { @@ -949,7 +947,7 @@ func (*CertificateAuthority) ProtoMessage() {} func (x *CertificateAuthority) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1120,9 @@ type CaPool struct { func (x *CaPool) Reset() { *x = CaPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool) String() string { @@ -1137,7 +1133,7 @@ func (*CaPool) ProtoMessage() {} func (x *CaPool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,11 +1230,9 @@ type CertificateRevocationList struct { func (x *CertificateRevocationList) Reset() { *x = CertificateRevocationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateRevocationList) String() string { @@ -1249,7 +1243,7 @@ func (*CertificateRevocationList) ProtoMessage() {} func (x *CertificateRevocationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1394,9 @@ type Certificate struct { func (x *Certificate) Reset() { *x = Certificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate) String() string { @@ -1415,7 +1407,7 @@ func (*Certificate) ProtoMessage() {} func (x *Certificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1633,11 +1625,9 @@ type CertificateTemplate struct { func (x *CertificateTemplate) Reset() { *x = CertificateTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateTemplate) String() string { @@ -1648,7 +1638,7 @@ func (*CertificateTemplate) ProtoMessage() {} func (x *CertificateTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1757,11 +1747,9 @@ type X509Parameters struct { func (x *X509Parameters) Reset() { *x = X509Parameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *X509Parameters) String() string { @@ -1772,7 +1760,7 @@ func (*X509Parameters) ProtoMessage() {} func (x *X509Parameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1835,9 @@ type SubordinateConfig struct { func (x *SubordinateConfig) Reset() { *x = SubordinateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubordinateConfig) String() string { @@ -1862,7 +1848,7 @@ func (*SubordinateConfig) ProtoMessage() {} func (x *SubordinateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1940,11 +1926,9 @@ type PublicKey struct { func (x *PublicKey) Reset() { *x = PublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicKey) String() string { @@ -1955,7 +1939,7 @@ func (*PublicKey) ProtoMessage() {} func (x *PublicKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2016,11 +2000,9 @@ type CertificateConfig struct { func (x *CertificateConfig) Reset() { *x = CertificateConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateConfig) String() string { @@ -2031,7 +2013,7 @@ func (*CertificateConfig) ProtoMessage() {} func (x *CertificateConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,11 +2091,9 @@ type CertificateDescription struct { func (x *CertificateDescription) Reset() { *x = CertificateDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateDescription) String() string { @@ -2124,7 +2104,7 @@ func (*CertificateDescription) ProtoMessage() {} func (x *CertificateDescription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2210,11 +2190,9 @@ type ObjectId struct { func (x *ObjectId) Reset() { *x = ObjectId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectId) String() string { @@ -2225,7 +2203,7 @@ func (*ObjectId) ProtoMessage() {} func (x *ObjectId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2267,11 +2245,9 @@ type X509Extension struct { func (x *X509Extension) Reset() { *x = X509Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *X509Extension) String() string { @@ -2282,7 +2258,7 @@ func (*X509Extension) ProtoMessage() {} func (x *X509Extension) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2337,11 +2313,9 @@ type KeyUsage struct { func (x *KeyUsage) Reset() { *x = KeyUsage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyUsage) String() string { @@ -2352,7 +2326,7 @@ func (*KeyUsage) ProtoMessage() {} func (x *KeyUsage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2415,11 +2389,9 @@ type Subject struct { func (x *Subject) Reset() { *x = Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subject) String() string { @@ -2430,7 +2402,7 @@ func (*Subject) ProtoMessage() {} func (x *Subject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2498,9 @@ type SubjectAltNames struct { func (x *SubjectAltNames) Reset() { *x = SubjectAltNames{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectAltNames) String() string { @@ -2541,7 +2511,7 @@ func (*SubjectAltNames) ProtoMessage() {} func (x *SubjectAltNames) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2622,11 +2592,9 @@ type CertificateIdentityConstraints struct { func (x *CertificateIdentityConstraints) Reset() { *x = CertificateIdentityConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateIdentityConstraints) String() string { @@ -2637,7 +2605,7 @@ func (*CertificateIdentityConstraints) ProtoMessage() {} func (x *CertificateIdentityConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2693,11 +2661,9 @@ type CertificateExtensionConstraints struct { func (x *CertificateExtensionConstraints) Reset() { *x = CertificateExtensionConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateExtensionConstraints) String() string { @@ -2708,7 +2674,7 @@ func (*CertificateExtensionConstraints) ProtoMessage() {} func (x *CertificateExtensionConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2759,11 +2725,9 @@ type CertificateAuthority_AccessUrls struct { func (x *CertificateAuthority_AccessUrls) Reset() { *x = CertificateAuthority_AccessUrls{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority_AccessUrls) String() string { @@ -2774,7 +2738,7 @@ func (*CertificateAuthority_AccessUrls) ProtoMessage() {} func (x *CertificateAuthority_AccessUrls) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2820,11 +2784,9 @@ type CertificateAuthority_KeyVersionSpec struct { func (x *CertificateAuthority_KeyVersionSpec) Reset() { *x = CertificateAuthority_KeyVersionSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateAuthority_KeyVersionSpec) String() string { @@ -2835,7 +2797,7 @@ func (*CertificateAuthority_KeyVersionSpec) ProtoMessage() {} func (x *CertificateAuthority_KeyVersionSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2936,11 +2898,9 @@ type CaPool_PublishingOptions struct { func (x *CaPool_PublishingOptions) Reset() { *x = CaPool_PublishingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_PublishingOptions) String() string { @@ -2951,7 +2911,7 @@ func (*CaPool_PublishingOptions) ProtoMessage() {} func (x *CaPool_PublishingOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3050,11 +3010,9 @@ type CaPool_IssuancePolicy struct { func (x *CaPool_IssuancePolicy) Reset() { *x = CaPool_IssuancePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_IssuancePolicy) String() string { @@ -3065,7 +3023,7 @@ func (*CaPool_IssuancePolicy) ProtoMessage() {} func (x *CaPool_IssuancePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3142,11 +3100,9 @@ type CaPool_IssuancePolicy_AllowedKeyType struct { func (x *CaPool_IssuancePolicy_AllowedKeyType) Reset() { *x = CaPool_IssuancePolicy_AllowedKeyType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_IssuancePolicy_AllowedKeyType) String() string { @@ -3157,7 +3113,7 @@ func (*CaPool_IssuancePolicy_AllowedKeyType) ProtoMessage() {} func (x *CaPool_IssuancePolicy_AllowedKeyType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3234,11 +3190,9 @@ type CaPool_IssuancePolicy_IssuanceModes struct { func (x *CaPool_IssuancePolicy_IssuanceModes) Reset() { *x = CaPool_IssuancePolicy_IssuanceModes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_IssuancePolicy_IssuanceModes) String() string { @@ -3249,7 +3203,7 @@ func (*CaPool_IssuancePolicy_IssuanceModes) ProtoMessage() {} func (x *CaPool_IssuancePolicy_IssuanceModes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3298,11 +3252,9 @@ type CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType struct { func (x *CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType) Reset() { *x = CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType) String() string { @@ -3313,7 +3265,7 @@ func (*CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType) ProtoMessage() {} func (x *CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3357,11 +3309,9 @@ type CaPool_IssuancePolicy_AllowedKeyType_EcKeyType struct { func (x *CaPool_IssuancePolicy_AllowedKeyType_EcKeyType) Reset() { *x = CaPool_IssuancePolicy_AllowedKeyType_EcKeyType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaPool_IssuancePolicy_AllowedKeyType_EcKeyType) String() string { @@ -3372,7 +3322,7 @@ func (*CaPool_IssuancePolicy_AllowedKeyType_EcKeyType) ProtoMessage() {} func (x *CaPool_IssuancePolicy_AllowedKeyType_EcKeyType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3416,11 +3366,9 @@ type CertificateRevocationList_RevokedCertificate struct { func (x *CertificateRevocationList_RevokedCertificate) Reset() { *x = CertificateRevocationList_RevokedCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateRevocationList_RevokedCertificate) String() string { @@ -3431,7 +3379,7 @@ func (*CertificateRevocationList_RevokedCertificate) ProtoMessage() {} func (x *CertificateRevocationList_RevokedCertificate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3486,11 +3434,9 @@ type Certificate_RevocationDetails struct { func (x *Certificate_RevocationDetails) Reset() { *x = Certificate_RevocationDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certificate_RevocationDetails) String() string { @@ -3501,7 +3447,7 @@ func (*Certificate_RevocationDetails) ProtoMessage() {} func (x *Certificate_RevocationDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3551,11 +3497,9 @@ type X509Parameters_CaOptions struct { func (x *X509Parameters_CaOptions) Reset() { *x = X509Parameters_CaOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *X509Parameters_CaOptions) String() string { @@ -3566,7 +3510,7 @@ func (*X509Parameters_CaOptions) ProtoMessage() {} func (x *X509Parameters_CaOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3648,11 +3592,9 @@ type X509Parameters_NameConstraints struct { func (x *X509Parameters_NameConstraints) Reset() { *x = X509Parameters_NameConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *X509Parameters_NameConstraints) String() string { @@ -3663,7 +3605,7 @@ func (*X509Parameters_NameConstraints) ProtoMessage() {} func (x *X509Parameters_NameConstraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3754,11 +3696,9 @@ type SubordinateConfig_SubordinateConfigChain struct { func (x *SubordinateConfig_SubordinateConfigChain) Reset() { *x = SubordinateConfig_SubordinateConfigChain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubordinateConfig_SubordinateConfigChain) String() string { @@ -3769,7 +3709,7 @@ func (*SubordinateConfig_SubordinateConfigChain) ProtoMessage() {} func (x *SubordinateConfig_SubordinateConfigChain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3807,11 +3747,9 @@ type CertificateConfig_SubjectConfig struct { func (x *CertificateConfig_SubjectConfig) Reset() { *x = CertificateConfig_SubjectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateConfig_SubjectConfig) String() string { @@ -3822,7 +3760,7 @@ func (*CertificateConfig_SubjectConfig) ProtoMessage() {} func (x *CertificateConfig_SubjectConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3865,11 +3803,9 @@ type CertificateConfig_KeyId struct { func (x *CertificateConfig_KeyId) Reset() { *x = CertificateConfig_KeyId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateConfig_KeyId) String() string { @@ -3880,7 +3816,7 @@ func (*CertificateConfig_KeyId) ProtoMessage() {} func (x *CertificateConfig_KeyId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3929,11 +3865,9 @@ type CertificateDescription_SubjectDescription struct { func (x *CertificateDescription_SubjectDescription) Reset() { *x = CertificateDescription_SubjectDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateDescription_SubjectDescription) String() string { @@ -3944,7 +3878,7 @@ func (*CertificateDescription_SubjectDescription) ProtoMessage() {} func (x *CertificateDescription_SubjectDescription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4015,11 +3949,9 @@ type CertificateDescription_KeyId struct { func (x *CertificateDescription_KeyId) Reset() { *x = CertificateDescription_KeyId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateDescription_KeyId) String() string { @@ -4030,7 +3962,7 @@ func (*CertificateDescription_KeyId) ProtoMessage() {} func (x *CertificateDescription_KeyId) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4064,11 +3996,9 @@ type CertificateDescription_CertificateFingerprint struct { func (x *CertificateDescription_CertificateFingerprint) Reset() { *x = CertificateDescription_CertificateFingerprint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CertificateDescription_CertificateFingerprint) String() string { @@ -4079,7 +4009,7 @@ func (*CertificateDescription_CertificateFingerprint) ProtoMessage() {} func (x *CertificateDescription_CertificateFingerprint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4132,11 +4062,9 @@ type KeyUsage_KeyUsageOptions struct { func (x *KeyUsage_KeyUsageOptions) Reset() { *x = KeyUsage_KeyUsageOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyUsage_KeyUsageOptions) String() string { @@ -4147,7 +4075,7 @@ func (*KeyUsage_KeyUsageOptions) ProtoMessage() {} func (x *KeyUsage_KeyUsageOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4255,11 +4183,9 @@ type KeyUsage_ExtendedKeyUsageOptions struct { func (x *KeyUsage_ExtendedKeyUsageOptions) Reset() { *x = KeyUsage_ExtendedKeyUsageOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyUsage_ExtendedKeyUsageOptions) String() string { @@ -4270,7 +4196,7 @@ func (*KeyUsage_ExtendedKeyUsageOptions) ProtoMessage() {} func (x *KeyUsage_ExtendedKeyUsageOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5471,452 +5397,6 @@ func file_google_cloud_security_privateca_v1_resources_proto_init() { if File_google_cloud_security_privateca_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CaPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CertificateRevocationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Certificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CertificateTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*X509Parameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SubordinateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CertificateConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CertificateDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ObjectId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*X509Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*KeyUsage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SubjectAltNames); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CertificateIdentityConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CertificateExtensionConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority_AccessUrls); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CertificateAuthority_KeyVersionSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_PublishingOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_IssuancePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_IssuancePolicy_AllowedKeyType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_IssuancePolicy_IssuanceModes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_IssuancePolicy_AllowedKeyType_RsaKeyType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CaPool_IssuancePolicy_AllowedKeyType_EcKeyType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CertificateRevocationList_RevokedCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Certificate_RevocationDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*X509Parameters_CaOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*X509Parameters_NameConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*SubordinateConfig_SubordinateConfigChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*CertificateConfig_SubjectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CertificateConfig_KeyId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CertificateDescription_SubjectDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*CertificateDescription_KeyId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CertificateDescription_CertificateFingerprint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*KeyUsage_KeyUsageOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*KeyUsage_ExtendedKeyUsageOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_security_privateca_v1_resources_proto_msgTypes[3].OneofWrappers = []any{ (*Certificate_PemCsr)(nil), (*Certificate_Config)(nil), diff --git a/security/privateca/apiv1/privatecapb/service.pb.go b/security/privateca/apiv1/privatecapb/service.pb.go index 2310459e6a63..7cd0e02b36b4 100755 --- a/security/privateca/apiv1/privatecapb/service.pb.go +++ b/security/privateca/apiv1/privatecapb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/privateca/v1/service.proto @@ -112,11 +112,9 @@ type CreateCertificateRequest struct { func (x *CreateCertificateRequest) Reset() { *x = CreateCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateRequest) String() string { @@ -127,7 +125,7 @@ func (*CreateCertificateRequest) ProtoMessage() {} func (x *CreateCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type GetCertificateRequest struct { func (x *GetCertificateRequest) Reset() { *x = GetCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateRequest) String() string { @@ -214,7 +210,7 @@ func (*GetCertificateRequest) ProtoMessage() {} func (x *GetCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,11 +267,9 @@ type ListCertificatesRequest struct { func (x *ListCertificatesRequest) Reset() { *x = ListCertificatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificatesRequest) String() string { @@ -286,7 +280,7 @@ func (*ListCertificatesRequest) ProtoMessage() {} func (x *ListCertificatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +349,9 @@ type ListCertificatesResponse struct { func (x *ListCertificatesResponse) Reset() { *x = ListCertificatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificatesResponse) String() string { @@ -370,7 +362,7 @@ func (*ListCertificatesResponse) ProtoMessage() {} func (x *ListCertificatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +431,9 @@ type RevokeCertificateRequest struct { func (x *RevokeCertificateRequest) Reset() { *x = RevokeCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevokeCertificateRequest) String() string { @@ -454,7 +444,7 @@ func (*RevokeCertificateRequest) ProtoMessage() {} func (x *RevokeCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +510,9 @@ type UpdateCertificateRequest struct { func (x *UpdateCertificateRequest) Reset() { *x = UpdateCertificateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateRequest) String() string { @@ -535,7 +523,7 @@ func (*UpdateCertificateRequest) ProtoMessage() {} func (x *UpdateCertificateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +594,9 @@ type ActivateCertificateAuthorityRequest struct { func (x *ActivateCertificateAuthorityRequest) Reset() { *x = ActivateCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ActivateCertificateAuthorityRequest) String() string { @@ -621,7 +607,7 @@ func (*ActivateCertificateAuthorityRequest) ProtoMessage() {} func (x *ActivateCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +687,9 @@ type CreateCertificateAuthorityRequest struct { func (x *CreateCertificateAuthorityRequest) Reset() { *x = CreateCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateAuthorityRequest) String() string { @@ -716,7 +700,7 @@ func (*CreateCertificateAuthorityRequest) ProtoMessage() {} func (x *CreateCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -793,11 +777,9 @@ type DisableCertificateAuthorityRequest struct { func (x *DisableCertificateAuthorityRequest) Reset() { *x = DisableCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableCertificateAuthorityRequest) String() string { @@ -808,7 +790,7 @@ func (*DisableCertificateAuthorityRequest) ProtoMessage() {} func (x *DisableCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +855,9 @@ type EnableCertificateAuthorityRequest struct { func (x *EnableCertificateAuthorityRequest) Reset() { *x = EnableCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableCertificateAuthorityRequest) String() string { @@ -888,7 +868,7 @@ func (*EnableCertificateAuthorityRequest) ProtoMessage() {} func (x *EnableCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,11 +912,9 @@ type FetchCertificateAuthorityCsrRequest struct { func (x *FetchCertificateAuthorityCsrRequest) Reset() { *x = FetchCertificateAuthorityCsrRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchCertificateAuthorityCsrRequest) String() string { @@ -947,7 +925,7 @@ func (*FetchCertificateAuthorityCsrRequest) ProtoMessage() {} func (x *FetchCertificateAuthorityCsrRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -982,11 +960,9 @@ type FetchCertificateAuthorityCsrResponse struct { func (x *FetchCertificateAuthorityCsrResponse) Reset() { *x = FetchCertificateAuthorityCsrResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchCertificateAuthorityCsrResponse) String() string { @@ -997,7 +973,7 @@ func (*FetchCertificateAuthorityCsrResponse) ProtoMessage() {} func (x *FetchCertificateAuthorityCsrResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +1011,9 @@ type GetCertificateAuthorityRequest struct { func (x *GetCertificateAuthorityRequest) Reset() { *x = GetCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateAuthorityRequest) String() string { @@ -1050,7 +1024,7 @@ func (*GetCertificateAuthorityRequest) ProtoMessage() {} func (x *GetCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1078,9 @@ type ListCertificateAuthoritiesRequest struct { func (x *ListCertificateAuthoritiesRequest) Reset() { *x = ListCertificateAuthoritiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateAuthoritiesRequest) String() string { @@ -1119,7 +1091,7 @@ func (*ListCertificateAuthoritiesRequest) ProtoMessage() {} func (x *ListCertificateAuthoritiesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1189,11 +1161,9 @@ type ListCertificateAuthoritiesResponse struct { func (x *ListCertificateAuthoritiesResponse) Reset() { *x = ListCertificateAuthoritiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateAuthoritiesResponse) String() string { @@ -1204,7 +1174,7 @@ func (*ListCertificateAuthoritiesResponse) ProtoMessage() {} func (x *ListCertificateAuthoritiesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1269,11 +1239,9 @@ type UndeleteCertificateAuthorityRequest struct { func (x *UndeleteCertificateAuthorityRequest) Reset() { *x = UndeleteCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteCertificateAuthorityRequest) String() string { @@ -1284,7 +1252,7 @@ func (*UndeleteCertificateAuthorityRequest) ProtoMessage() {} func (x *UndeleteCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1322,9 @@ type DeleteCertificateAuthorityRequest struct { func (x *DeleteCertificateAuthorityRequest) Reset() { *x = DeleteCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateAuthorityRequest) String() string { @@ -1369,7 +1335,7 @@ func (*DeleteCertificateAuthorityRequest) ProtoMessage() {} func (x *DeleteCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1450,11 +1416,9 @@ type UpdateCertificateAuthorityRequest struct { func (x *UpdateCertificateAuthorityRequest) Reset() { *x = UpdateCertificateAuthorityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateAuthorityRequest) String() string { @@ -1465,7 +1429,7 @@ func (*UpdateCertificateAuthorityRequest) ProtoMessage() {} func (x *UpdateCertificateAuthorityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1500,9 @@ type CreateCaPoolRequest struct { func (x *CreateCaPoolRequest) Reset() { *x = CreateCaPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCaPoolRequest) String() string { @@ -1551,7 +1513,7 @@ func (*CreateCaPoolRequest) ProtoMessage() {} func (x *CreateCaPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,11 +1586,9 @@ type UpdateCaPoolRequest struct { func (x *UpdateCaPoolRequest) Reset() { *x = UpdateCaPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCaPoolRequest) String() string { @@ -1639,7 +1599,7 @@ func (*UpdateCaPoolRequest) ProtoMessage() {} func (x *UpdateCaPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,11 +1669,9 @@ type DeleteCaPoolRequest struct { func (x *DeleteCaPoolRequest) Reset() { *x = DeleteCaPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCaPoolRequest) String() string { @@ -1724,7 +1682,7 @@ func (*DeleteCaPoolRequest) ProtoMessage() {} func (x *DeleteCaPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1747,9 @@ type FetchCaCertsRequest struct { func (x *FetchCaCertsRequest) Reset() { *x = FetchCaCertsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchCaCertsRequest) String() string { @@ -1804,7 +1760,7 @@ func (*FetchCaCertsRequest) ProtoMessage() {} func (x *FetchCaCertsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1848,11 +1804,9 @@ type FetchCaCertsResponse struct { func (x *FetchCaCertsResponse) Reset() { *x = FetchCaCertsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchCaCertsResponse) String() string { @@ -1863,7 +1817,7 @@ func (*FetchCaCertsResponse) ProtoMessage() {} func (x *FetchCaCertsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1853,9 @@ type GetCaPoolRequest struct { func (x *GetCaPoolRequest) Reset() { *x = GetCaPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCaPoolRequest) String() string { @@ -1914,7 +1866,7 @@ func (*GetCaPoolRequest) ProtoMessage() {} func (x *GetCaPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1966,11 +1918,9 @@ type ListCaPoolsRequest struct { func (x *ListCaPoolsRequest) Reset() { *x = ListCaPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCaPoolsRequest) String() string { @@ -1981,7 +1931,7 @@ func (*ListCaPoolsRequest) ProtoMessage() {} func (x *ListCaPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2050,11 +2000,9 @@ type ListCaPoolsResponse struct { func (x *ListCaPoolsResponse) Reset() { *x = ListCaPoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCaPoolsResponse) String() string { @@ -2065,7 +2013,7 @@ func (*ListCaPoolsResponse) ProtoMessage() {} func (x *ListCaPoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2118,11 +2066,9 @@ type GetCertificateRevocationListRequest struct { func (x *GetCertificateRevocationListRequest) Reset() { *x = GetCertificateRevocationListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateRevocationListRequest) String() string { @@ -2133,7 +2079,7 @@ func (*GetCertificateRevocationListRequest) ProtoMessage() {} func (x *GetCertificateRevocationListRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,11 +2132,9 @@ type ListCertificateRevocationListsRequest struct { func (x *ListCertificateRevocationListsRequest) Reset() { *x = ListCertificateRevocationListsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateRevocationListsRequest) String() string { @@ -2201,7 +2145,7 @@ func (*ListCertificateRevocationListsRequest) ProtoMessage() {} func (x *ListCertificateRevocationListsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2271,11 +2215,9 @@ type ListCertificateRevocationListsResponse struct { func (x *ListCertificateRevocationListsResponse) Reset() { *x = ListCertificateRevocationListsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateRevocationListsResponse) String() string { @@ -2286,7 +2228,7 @@ func (*ListCertificateRevocationListsResponse) ProtoMessage() {} func (x *ListCertificateRevocationListsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2353,11 +2295,9 @@ type UpdateCertificateRevocationListRequest struct { func (x *UpdateCertificateRevocationListRequest) Reset() { *x = UpdateCertificateRevocationListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateRevocationListRequest) String() string { @@ -2368,7 +2308,7 @@ func (*UpdateCertificateRevocationListRequest) ProtoMessage() {} func (x *UpdateCertificateRevocationListRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2440,11 +2380,9 @@ type CreateCertificateTemplateRequest struct { func (x *CreateCertificateTemplateRequest) Reset() { *x = CreateCertificateTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCertificateTemplateRequest) String() string { @@ -2455,7 +2393,7 @@ func (*CreateCertificateTemplateRequest) ProtoMessage() {} func (x *CreateCertificateTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2527,11 +2465,9 @@ type DeleteCertificateTemplateRequest struct { func (x *DeleteCertificateTemplateRequest) Reset() { *x = DeleteCertificateTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCertificateTemplateRequest) String() string { @@ -2542,7 +2478,7 @@ func (*DeleteCertificateTemplateRequest) ProtoMessage() {} func (x *DeleteCertificateTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2587,11 +2523,9 @@ type GetCertificateTemplateRequest struct { func (x *GetCertificateTemplateRequest) Reset() { *x = GetCertificateTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCertificateTemplateRequest) String() string { @@ -2602,7 +2536,7 @@ func (*GetCertificateTemplateRequest) ProtoMessage() {} func (x *GetCertificateTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2655,11 +2589,9 @@ type ListCertificateTemplatesRequest struct { func (x *ListCertificateTemplatesRequest) Reset() { *x = ListCertificateTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateTemplatesRequest) String() string { @@ -2670,7 +2602,7 @@ func (*ListCertificateTemplatesRequest) ProtoMessage() {} func (x *ListCertificateTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2740,11 +2672,9 @@ type ListCertificateTemplatesResponse struct { func (x *ListCertificateTemplatesResponse) Reset() { *x = ListCertificateTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCertificateTemplatesResponse) String() string { @@ -2755,7 +2685,7 @@ func (*ListCertificateTemplatesResponse) ProtoMessage() {} func (x *ListCertificateTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2822,11 +2752,9 @@ type UpdateCertificateTemplateRequest struct { func (x *UpdateCertificateTemplateRequest) Reset() { *x = UpdateCertificateTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCertificateTemplateRequest) String() string { @@ -2837,7 +2765,7 @@ func (*UpdateCertificateTemplateRequest) ProtoMessage() {} func (x *UpdateCertificateTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2901,11 +2829,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2916,7 +2842,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2991,11 +2917,9 @@ type FetchCaCertsResponse_CertChain struct { func (x *FetchCaCertsResponse_CertChain) Reset() { *x = FetchCaCertsResponse_CertChain{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchCaCertsResponse_CertChain) String() string { @@ -3006,7 +2930,7 @@ func (*FetchCaCertsResponse_CertChain) ProtoMessage() {} func (x *FetchCaCertsResponse_CertChain) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_privateca_v1_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4194,464 +4118,6 @@ func file_google_cloud_security_privateca_v1_service_proto_init() { return } file_google_cloud_security_privateca_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_privateca_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RevokeCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ActivateCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DisableCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EnableCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FetchCertificateAuthorityCsrRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FetchCertificateAuthorityCsrResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateAuthoritiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateAuthoritiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateAuthorityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateCaPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCaPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCaPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FetchCaCertsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FetchCaCertsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetCaPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListCaPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListCaPoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateRevocationListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateRevocationListsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateRevocationListsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateRevocationListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateCertificateTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCertificateTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GetCertificateTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListCertificateTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCertificateTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_security_privateca_v1_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*FetchCaCertsResponse_CertChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/publicca/apiv1/helpers.go b/security/publicca/apiv1/helpers.go index 5f2892814c30..1675af5971cf 100755 --- a/security/publicca/apiv1/helpers.go +++ b/security/publicca/apiv1/helpers.go @@ -18,10 +18,20 @@ package publicca import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "publicca.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/security/publicca/apiv1/public_certificate_authority_client.go b/security/publicca/apiv1/public_certificate_authority_client.go index 2e0314a26448..bc1b8a354771 100755 --- a/security/publicca/apiv1/public_certificate_authority_client.go +++ b/security/publicca/apiv1/public_certificate_authority_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( publiccapb "cloud.google.com/go/security/publicca/apiv1/publiccapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -160,6 +159,8 @@ type publicCertificateAuthorityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPublicCertificateAuthorityClient creates a new public certificate authority service client based on gRPC. @@ -188,6 +189,7 @@ func NewPublicCertificateAuthorityClient(ctx context.Context, opts ...option.Cli connPool: connPool, publicCertificateAuthorityClient: publiccapb.NewPublicCertificateAuthorityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -234,6 +236,8 @@ type publicCertificateAuthorityRESTClient struct { // Points back to the CallOptions field of the containing PublicCertificateAuthorityClient CallOptions **PublicCertificateAuthorityCallOptions + + logger *slog.Logger } // NewPublicCertificateAuthorityRESTClient creates a new public certificate authority service rest client. @@ -253,6 +257,7 @@ func NewPublicCertificateAuthorityRESTClient(ctx context.Context, opts ...option endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -305,7 +310,7 @@ func (c *publicCertificateAuthorityGRPCClient) CreateExternalAccountKey(ctx cont var resp *publiccapb.ExternalAccountKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publicCertificateAuthorityClient.CreateExternalAccountKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publicCertificateAuthorityClient.CreateExternalAccountKey, req, settings.GRPC, c.logger, "CreateExternalAccountKey") return err }, opts...) if err != nil { @@ -356,17 +361,7 @@ func (c *publicCertificateAuthorityRESTClient) CreateExternalAccountKey(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExternalAccountKey") if err != nil { return err } diff --git a/security/publicca/apiv1/publiccapb/resources.pb.go b/security/publicca/apiv1/publiccapb/resources.pb.go index c558f40ebdf5..42412ac9e582 100755 --- a/security/publicca/apiv1/publiccapb/resources.pb.go +++ b/security/publicca/apiv1/publiccapb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/publicca/v1/resources.proto @@ -58,11 +58,9 @@ type ExternalAccountKey struct { func (x *ExternalAccountKey) Reset() { *x = ExternalAccountKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_publicca_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_publicca_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAccountKey) String() string { @@ -73,7 +71,7 @@ func (*ExternalAccountKey) ProtoMessage() {} func (x *ExternalAccountKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_publicca_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,20 +182,6 @@ func file_google_cloud_security_publicca_v1_resources_proto_init() { if File_google_cloud_security_publicca_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_publicca_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExternalAccountKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/publicca/apiv1/publiccapb/service.pb.go b/security/publicca/apiv1/publiccapb/service.pb.go index e167d81efc5b..35318cb4cb4b 100755 --- a/security/publicca/apiv1/publiccapb/service.pb.go +++ b/security/publicca/apiv1/publiccapb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/publicca/v1/service.proto @@ -61,11 +61,9 @@ type CreateExternalAccountKeyRequest struct { func (x *CreateExternalAccountKeyRequest) Reset() { *x = CreateExternalAccountKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_publicca_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_publicca_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExternalAccountKeyRequest) String() string { @@ -76,7 +74,7 @@ func (*CreateExternalAccountKeyRequest) ProtoMessage() {} func (x *CreateExternalAccountKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_publicca_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,20 +211,6 @@ func file_google_cloud_security_publicca_v1_service_proto_init() { return } file_google_cloud_security_publicca_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_publicca_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateExternalAccountKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/publicca/apiv1beta1/helpers.go b/security/publicca/apiv1beta1/helpers.go index 5f2892814c30..1675af5971cf 100755 --- a/security/publicca/apiv1beta1/helpers.go +++ b/security/publicca/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package publicca import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "publicca.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/security/publicca/apiv1beta1/public_certificate_authority_client.go b/security/publicca/apiv1beta1/public_certificate_authority_client.go index 681c27cc1dfe..a89388881ab1 100755 --- a/security/publicca/apiv1beta1/public_certificate_authority_client.go +++ b/security/publicca/apiv1beta1/public_certificate_authority_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( publiccapb "cloud.google.com/go/security/publicca/apiv1beta1/publiccapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -158,6 +157,8 @@ type publicCertificateAuthorityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewPublicCertificateAuthorityClient creates a new public certificate authority service client based on gRPC. @@ -186,6 +187,7 @@ func NewPublicCertificateAuthorityClient(ctx context.Context, opts ...option.Cli connPool: connPool, publicCertificateAuthorityClient: publiccapb.NewPublicCertificateAuthorityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -232,6 +234,8 @@ type publicCertificateAuthorityRESTClient struct { // Points back to the CallOptions field of the containing PublicCertificateAuthorityClient CallOptions **PublicCertificateAuthorityCallOptions + + logger *slog.Logger } // NewPublicCertificateAuthorityRESTClient creates a new public certificate authority service rest client. @@ -251,6 +255,7 @@ func NewPublicCertificateAuthorityRESTClient(ctx context.Context, opts ...option endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -303,7 +308,7 @@ func (c *publicCertificateAuthorityGRPCClient) CreateExternalAccountKey(ctx cont var resp *publiccapb.ExternalAccountKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.publicCertificateAuthorityClient.CreateExternalAccountKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.publicCertificateAuthorityClient.CreateExternalAccountKey, req, settings.GRPC, c.logger, "CreateExternalAccountKey") return err }, opts...) if err != nil { @@ -352,17 +357,7 @@ func (c *publicCertificateAuthorityRESTClient) CreateExternalAccountKey(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExternalAccountKey") if err != nil { return err } diff --git a/security/publicca/apiv1beta1/publiccapb/resources.pb.go b/security/publicca/apiv1beta1/publiccapb/resources.pb.go index 69b06960b909..a93cdd7265c5 100755 --- a/security/publicca/apiv1beta1/publiccapb/resources.pb.go +++ b/security/publicca/apiv1beta1/publiccapb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/publicca/v1beta1/resources.proto @@ -58,11 +58,9 @@ type ExternalAccountKey struct { func (x *ExternalAccountKey) Reset() { *x = ExternalAccountKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_publicca_v1beta1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_publicca_v1beta1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAccountKey) String() string { @@ -73,7 +71,7 @@ func (*ExternalAccountKey) ProtoMessage() {} func (x *ExternalAccountKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_publicca_v1beta1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,20 +184,6 @@ func file_google_cloud_security_publicca_v1beta1_resources_proto_init() { if File_google_cloud_security_publicca_v1beta1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_publicca_v1beta1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExternalAccountKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/security/publicca/apiv1beta1/publiccapb/service.pb.go b/security/publicca/apiv1beta1/publiccapb/service.pb.go index 7bcafc3d11ec..0b989756c5b7 100755 --- a/security/publicca/apiv1beta1/publiccapb/service.pb.go +++ b/security/publicca/apiv1beta1/publiccapb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/security/publicca/v1beta1/service.proto @@ -59,11 +59,9 @@ type CreateExternalAccountKeyRequest struct { func (x *CreateExternalAccountKeyRequest) Reset() { *x = CreateExternalAccountKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_security_publicca_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_security_publicca_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExternalAccountKeyRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateExternalAccountKeyRequest) ProtoMessage() {} func (x *CreateExternalAccountKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_security_publicca_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,20 +213,6 @@ func file_google_cloud_security_publicca_v1beta1_service_proto_init() { return } file_google_cloud_security_publicca_v1beta1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_security_publicca_v1beta1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateExternalAccountKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/helpers.go b/securitycenter/apiv1/helpers.go index 4e919bd493b5..1825692c16a3 100755 --- a/securitycenter/apiv1/helpers.go +++ b/securitycenter/apiv1/helpers.go @@ -18,10 +18,20 @@ package securitycenter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycenter/apiv1/security_center_client.go b/securitycenter/apiv1/security_center_client.go index a1c9eb829096..51b754b308f3 100755 --- a/securitycenter/apiv1/security_center_client.go +++ b/securitycenter/apiv1/security_center_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securitycenterpb "cloud.google.com/go/securitycenter/apiv1/securitycenterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1251,6 +1250,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security center client based on gRPC. @@ -1277,6 +1278,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securitycenterpb.NewSecurityCenterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -1340,6 +1342,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security center rest client. @@ -1357,6 +1361,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1419,7 +1424,7 @@ func (c *gRPCClient) BulkMuteFindings(ctx context.Context, req *securitycenterpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkMuteFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkMuteFindings, req, settings.GRPC, c.logger, "BulkMuteFindings") return err }, opts...) if err != nil { @@ -1439,7 +1444,7 @@ func (c *gRPCClient) CreateSecurityHealthAnalyticsCustomModule(ctx context.Conte var resp *securitycenterpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "CreateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -1475,7 +1480,7 @@ func (c *gRPCClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFinding, req, settings.GRPC, c.logger, "CreateFinding") return err }, opts...) if err != nil { @@ -1493,7 +1498,7 @@ func (c *gRPCClient) CreateMuteConfig(ctx context.Context, req *securitycenterpb var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMuteConfig, req, settings.GRPC, c.logger, "CreateMuteConfig") return err }, opts...) if err != nil { @@ -1511,7 +1516,7 @@ func (c *gRPCClient) CreateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNotificationConfig, req, settings.GRPC, c.logger, "CreateNotificationConfig") return err }, opts...) if err != nil { @@ -1528,7 +1533,7 @@ func (c *gRPCClient) DeleteMuteConfig(ctx context.Context, req *securitycenterpb opts = append((*c.CallOptions).DeleteMuteConfig[0:len((*c.CallOptions).DeleteMuteConfig):len((*c.CallOptions).DeleteMuteConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteMuteConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteMuteConfig, req, settings.GRPC, c.logger, "DeleteMuteConfig") return err }, opts...) return err @@ -1542,7 +1547,7 @@ func (c *gRPCClient) DeleteNotificationConfig(ctx context.Context, req *security opts = append((*c.CallOptions).DeleteNotificationConfig[0:len((*c.CallOptions).DeleteNotificationConfig):len((*c.CallOptions).DeleteNotificationConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteNotificationConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteNotificationConfig, req, settings.GRPC, c.logger, "DeleteNotificationConfig") return err }, opts...) return err @@ -1556,7 +1561,7 @@ func (c *gRPCClient) DeleteSecurityHealthAnalyticsCustomModule(ctx context.Conte opts = append((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule[0:len((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule):len((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "DeleteSecurityHealthAnalyticsCustomModule") return err }, opts...) return err @@ -1571,7 +1576,7 @@ func (c *gRPCClient) GetSimulation(ctx context.Context, req *securitycenterpb.Ge var resp *securitycenterpb.Simulation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSimulation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSimulation, req, settings.GRPC, c.logger, "GetSimulation") return err }, opts...) if err != nil { @@ -1589,7 +1594,7 @@ func (c *gRPCClient) GetValuedResource(ctx context.Context, req *securitycenterp var resp *securitycenterpb.ValuedResource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetValuedResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetValuedResource, req, settings.GRPC, c.logger, "GetValuedResource") return err }, opts...) if err != nil { @@ -1607,7 +1612,7 @@ func (c *gRPCClient) GetBigQueryExport(ctx context.Context, req *securitycenterp var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBigQueryExport, req, settings.GRPC, c.logger, "GetBigQueryExport") return err }, opts...) if err != nil { @@ -1625,7 +1630,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1643,7 +1648,7 @@ func (c *gRPCClient) GetMuteConfig(ctx context.Context, req *securitycenterpb.Ge var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMuteConfig, req, settings.GRPC, c.logger, "GetMuteConfig") return err }, opts...) if err != nil { @@ -1661,7 +1666,7 @@ func (c *gRPCClient) GetNotificationConfig(ctx context.Context, req *securitycen var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNotificationConfig, req, settings.GRPC, c.logger, "GetNotificationConfig") return err }, opts...) if err != nil { @@ -1679,7 +1684,7 @@ func (c *gRPCClient) GetOrganizationSettings(ctx context.Context, req *securityc var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrganizationSettings, req, settings.GRPC, c.logger, "GetOrganizationSettings") return err }, opts...) if err != nil { @@ -1697,7 +1702,7 @@ func (c *gRPCClient) GetEffectiveSecurityHealthAnalyticsCustomModule(ctx context var resp *securitycenterpb.EffectiveSecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEffectiveSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEffectiveSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "GetEffectiveSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1715,7 +1720,7 @@ func (c *gRPCClient) GetSecurityHealthAnalyticsCustomModule(ctx context.Context, var resp *securitycenterpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "GetSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1733,7 +1738,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -1762,7 +1767,7 @@ func (c *gRPCClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupAssets, req, settings.GRPC, c.logger, "GroupAssets") return err }, opts...) if err != nil { @@ -1808,7 +1813,7 @@ func (c *gRPCClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupFindings, req, settings.GRPC, c.logger, "GroupFindings") return err }, opts...) if err != nil { @@ -1854,7 +1859,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1900,7 +1905,7 @@ func (c *gRPCClient) ListDescendantSecurityHealthAnalyticsCustomModules(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDescendantSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDescendantSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListDescendantSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -1946,7 +1951,7 @@ func (c *gRPCClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindings, req, settings.GRPC, c.logger, "ListFindings") return err }, opts...) if err != nil { @@ -1992,7 +1997,7 @@ func (c *gRPCClient) ListMuteConfigs(ctx context.Context, req *securitycenterpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMuteConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMuteConfigs, req, settings.GRPC, c.logger, "ListMuteConfigs") return err }, opts...) if err != nil { @@ -2038,7 +2043,7 @@ func (c *gRPCClient) ListNotificationConfigs(ctx context.Context, req *securityc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNotificationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNotificationConfigs, req, settings.GRPC, c.logger, "ListNotificationConfigs") return err }, opts...) if err != nil { @@ -2084,7 +2089,7 @@ func (c *gRPCClient) ListEffectiveSecurityHealthAnalyticsCustomModules(ctx conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEffectiveSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEffectiveSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListEffectiveSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -2130,7 +2135,7 @@ func (c *gRPCClient) ListSecurityHealthAnalyticsCustomModules(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -2176,7 +2181,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *securitycenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -2211,7 +2216,7 @@ func (c *gRPCClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunAssetDiscovery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunAssetDiscovery, req, settings.GRPC, c.logger, "RunAssetDiscovery") return err }, opts...) if err != nil { @@ -2231,7 +2236,7 @@ func (c *gRPCClient) SetFindingState(ctx context.Context, req *securitycenterpb. var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetFindingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetFindingState, req, settings.GRPC, c.logger, "SetFindingState") return err }, opts...) if err != nil { @@ -2249,7 +2254,7 @@ func (c *gRPCClient) SetMute(ctx context.Context, req *securitycenterpb.SetMuteR var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetMute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetMute, req, settings.GRPC, c.logger, "SetMute") return err }, opts...) if err != nil { @@ -2267,7 +2272,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -2285,7 +2290,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -2303,7 +2308,7 @@ func (c *gRPCClient) SimulateSecurityHealthAnalyticsCustomModule(ctx context.Con var resp *securitycenterpb.SimulateSecurityHealthAnalyticsCustomModuleResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SimulateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SimulateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "SimulateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -2321,7 +2326,7 @@ func (c *gRPCClient) UpdateExternalSystem(ctx context.Context, req *securitycent var resp *securitycenterpb.ExternalSystem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateExternalSystem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateExternalSystem, req, settings.GRPC, c.logger, "UpdateExternalSystem") return err }, opts...) if err != nil { @@ -2339,7 +2344,7 @@ func (c *gRPCClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFinding, req, settings.GRPC, c.logger, "UpdateFinding") return err }, opts...) if err != nil { @@ -2357,7 +2362,7 @@ func (c *gRPCClient) UpdateMuteConfig(ctx context.Context, req *securitycenterpb var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMuteConfig, req, settings.GRPC, c.logger, "UpdateMuteConfig") return err }, opts...) if err != nil { @@ -2375,7 +2380,7 @@ func (c *gRPCClient) UpdateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNotificationConfig, req, settings.GRPC, c.logger, "UpdateNotificationConfig") return err }, opts...) if err != nil { @@ -2393,7 +2398,7 @@ func (c *gRPCClient) UpdateOrganizationSettings(ctx context.Context, req *securi var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateOrganizationSettings, req, settings.GRPC, c.logger, "UpdateOrganizationSettings") return err }, opts...) if err != nil { @@ -2411,7 +2416,7 @@ func (c *gRPCClient) UpdateSecurityHealthAnalyticsCustomModule(ctx context.Conte var resp *securitycenterpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "UpdateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -2429,7 +2434,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -2447,7 +2452,7 @@ func (c *gRPCClient) UpdateSecurityMarks(ctx context.Context, req *securitycente var resp *securitycenterpb.SecurityMarks err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityMarks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityMarks, req, settings.GRPC, c.logger, "UpdateSecurityMarks") return err }, opts...) if err != nil { @@ -2465,7 +2470,7 @@ func (c *gRPCClient) CreateBigQueryExport(ctx context.Context, req *securitycent var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBigQueryExport, req, settings.GRPC, c.logger, "CreateBigQueryExport") return err }, opts...) if err != nil { @@ -2482,7 +2487,7 @@ func (c *gRPCClient) DeleteBigQueryExport(ctx context.Context, req *securitycent opts = append((*c.CallOptions).DeleteBigQueryExport[0:len((*c.CallOptions).DeleteBigQueryExport):len((*c.CallOptions).DeleteBigQueryExport)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteBigQueryExport(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteBigQueryExport, req, settings.GRPC, c.logger, "DeleteBigQueryExport") return err }, opts...) return err @@ -2497,7 +2502,7 @@ func (c *gRPCClient) UpdateBigQueryExport(ctx context.Context, req *securitycent var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBigQueryExport, req, settings.GRPC, c.logger, "UpdateBigQueryExport") return err }, opts...) if err != nil { @@ -2526,7 +2531,7 @@ func (c *gRPCClient) ListBigQueryExports(ctx context.Context, req *securitycente } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBigQueryExports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBigQueryExports, req, settings.GRPC, c.logger, "ListBigQueryExports") return err }, opts...) if err != nil { @@ -2561,7 +2566,7 @@ func (c *gRPCClient) CreateEventThreatDetectionCustomModule(ctx context.Context, var resp *securitycenterpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "CreateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -2578,7 +2583,7 @@ func (c *gRPCClient) DeleteEventThreatDetectionCustomModule(ctx context.Context, opts = append((*c.CallOptions).DeleteEventThreatDetectionCustomModule[0:len((*c.CallOptions).DeleteEventThreatDetectionCustomModule):len((*c.CallOptions).DeleteEventThreatDetectionCustomModule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "DeleteEventThreatDetectionCustomModule") return err }, opts...) return err @@ -2593,7 +2598,7 @@ func (c *gRPCClient) GetEventThreatDetectionCustomModule(ctx context.Context, re var resp *securitycenterpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "GetEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -2622,7 +2627,7 @@ func (c *gRPCClient) ListDescendantEventThreatDetectionCustomModules(ctx context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDescendantEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDescendantEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListDescendantEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -2668,7 +2673,7 @@ func (c *gRPCClient) ListEventThreatDetectionCustomModules(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -2703,7 +2708,7 @@ func (c *gRPCClient) UpdateEventThreatDetectionCustomModule(ctx context.Context, var resp *securitycenterpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "UpdateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -2721,7 +2726,7 @@ func (c *gRPCClient) ValidateEventThreatDetectionCustomModule(ctx context.Contex var resp *securitycenterpb.ValidateEventThreatDetectionCustomModuleResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ValidateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ValidateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "ValidateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -2739,7 +2744,7 @@ func (c *gRPCClient) GetEffectiveEventThreatDetectionCustomModule(ctx context.Co var resp *securitycenterpb.EffectiveEventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEffectiveEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEffectiveEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "GetEffectiveEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -2768,7 +2773,7 @@ func (c *gRPCClient) ListEffectiveEventThreatDetectionCustomModules(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEffectiveEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEffectiveEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListEffectiveEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -2803,7 +2808,7 @@ func (c *gRPCClient) BatchCreateResourceValueConfigs(ctx context.Context, req *s var resp *securitycenterpb.BatchCreateResourceValueConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchCreateResourceValueConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchCreateResourceValueConfigs, req, settings.GRPC, c.logger, "BatchCreateResourceValueConfigs") return err }, opts...) if err != nil { @@ -2820,7 +2825,7 @@ func (c *gRPCClient) DeleteResourceValueConfig(ctx context.Context, req *securit opts = append((*c.CallOptions).DeleteResourceValueConfig[0:len((*c.CallOptions).DeleteResourceValueConfig):len((*c.CallOptions).DeleteResourceValueConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteResourceValueConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteResourceValueConfig, req, settings.GRPC, c.logger, "DeleteResourceValueConfig") return err }, opts...) return err @@ -2835,7 +2840,7 @@ func (c *gRPCClient) GetResourceValueConfig(ctx context.Context, req *securityce var resp *securitycenterpb.ResourceValueConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetResourceValueConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetResourceValueConfig, req, settings.GRPC, c.logger, "GetResourceValueConfig") return err }, opts...) if err != nil { @@ -2864,7 +2869,7 @@ func (c *gRPCClient) ListResourceValueConfigs(ctx context.Context, req *security } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListResourceValueConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListResourceValueConfigs, req, settings.GRPC, c.logger, "ListResourceValueConfigs") return err }, opts...) if err != nil { @@ -2899,7 +2904,7 @@ func (c *gRPCClient) UpdateResourceValueConfig(ctx context.Context, req *securit var resp *securitycenterpb.ResourceValueConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateResourceValueConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateResourceValueConfig, req, settings.GRPC, c.logger, "UpdateResourceValueConfig") return err }, opts...) if err != nil { @@ -2928,7 +2933,7 @@ func (c *gRPCClient) ListValuedResources(ctx context.Context, req *securitycente } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListValuedResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListValuedResources, req, settings.GRPC, c.logger, "ListValuedResources") return err }, opts...) if err != nil { @@ -2974,7 +2979,7 @@ func (c *gRPCClient) ListAttackPaths(ctx context.Context, req *securitycenterpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAttackPaths(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAttackPaths, req, settings.GRPC, c.logger, "ListAttackPaths") return err }, opts...) if err != nil { @@ -3008,7 +3013,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -3022,7 +3027,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -3037,7 +3042,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -3066,7 +3071,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -3132,21 +3137,10 @@ func (c *restClient) BulkMuteFindings(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkMuteFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3207,17 +3201,7 @@ func (c *restClient) CreateSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -3274,17 +3258,7 @@ func (c *restClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } @@ -3343,17 +3317,7 @@ func (c *restClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFinding") if err != nil { return err } @@ -3411,17 +3375,7 @@ func (c *restClient) CreateMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMuteConfig") if err != nil { return err } @@ -3479,17 +3433,7 @@ func (c *restClient) CreateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotificationConfig") if err != nil { return err } @@ -3536,15 +3480,8 @@ func (c *restClient) DeleteMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMuteConfig") + return err }, opts...) } @@ -3578,15 +3515,8 @@ func (c *restClient) DeleteNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotificationConfig") + return err }, opts...) } @@ -3622,15 +3552,8 @@ func (c *restClient) DeleteSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecurityHealthAnalyticsCustomModule") + return err }, opts...) } @@ -3668,17 +3591,7 @@ func (c *restClient) GetSimulation(ctx context.Context, req *securitycenterpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSimulation") if err != nil { return err } @@ -3728,17 +3641,7 @@ func (c *restClient) GetValuedResource(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetValuedResource") if err != nil { return err } @@ -3788,17 +3691,7 @@ func (c *restClient) GetBigQueryExport(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBigQueryExport") if err != nil { return err } @@ -3854,17 +3747,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -3914,17 +3797,7 @@ func (c *restClient) GetMuteConfig(ctx context.Context, req *securitycenterpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMuteConfig") if err != nil { return err } @@ -3974,17 +3847,7 @@ func (c *restClient) GetNotificationConfig(ctx context.Context, req *securitycen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotificationConfig") if err != nil { return err } @@ -4034,17 +3897,7 @@ func (c *restClient) GetOrganizationSettings(ctx context.Context, req *securityc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganizationSettings") if err != nil { return err } @@ -4094,17 +3947,7 @@ func (c *restClient) GetEffectiveSecurityHealthAnalyticsCustomModule(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -4154,17 +3997,7 @@ func (c *restClient) GetSecurityHealthAnalyticsCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -4214,17 +4047,7 @@ func (c *restClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -4289,21 +4112,10 @@ func (c *restClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4384,21 +4196,10 @@ func (c *restClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4502,21 +4303,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4592,21 +4382,10 @@ func (c *restClient) ListDescendantSecurityHealthAnalyticsCustomModules(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDescendantSecurityHealthAnalyticsCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4711,21 +4490,10 @@ func (c *restClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4800,21 +4568,10 @@ func (c *restClient) ListMuteConfigs(ctx context.Context, req *securitycenterpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMuteConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4889,21 +4646,10 @@ func (c *restClient) ListNotificationConfigs(ctx context.Context, req *securityc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotificationConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4980,21 +4726,10 @@ func (c *restClient) ListEffectiveSecurityHealthAnalyticsCustomModules(ctx conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveSecurityHealthAnalyticsCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5071,21 +4806,10 @@ func (c *restClient) ListSecurityHealthAnalyticsCustomModules(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecurityHealthAnalyticsCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5160,21 +4884,10 @@ func (c *restClient) ListSources(ctx context.Context, req *securitycenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5249,21 +4962,10 @@ func (c *restClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunAssetDiscovery") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5320,17 +5022,7 @@ func (c *restClient) SetFindingState(ctx context.Context, req *securitycenterpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetFindingState") if err != nil { return err } @@ -5386,17 +5078,7 @@ func (c *restClient) SetMute(ctx context.Context, req *securitycenterpb.SetMuteR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMute") if err != nil { return err } @@ -5452,17 +5134,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -5518,17 +5190,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -5584,17 +5246,7 @@ func (c *restClient) SimulateSecurityHealthAnalyticsCustomModule(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SimulateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -5658,17 +5310,7 @@ func (c *restClient) UpdateExternalSystem(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExternalSystem") if err != nil { return err } @@ -5733,17 +5375,7 @@ func (c *restClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFinding") if err != nil { return err } @@ -5807,17 +5439,7 @@ func (c *restClient) UpdateMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMuteConfig") if err != nil { return err } @@ -5882,17 +5504,7 @@ func (c *restClient) UpdateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNotificationConfig") if err != nil { return err } @@ -5956,17 +5568,7 @@ func (c *restClient) UpdateOrganizationSettings(ctx context.Context, req *securi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOrganizationSettings") if err != nil { return err } @@ -6034,17 +5636,7 @@ func (c *restClient) UpdateSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -6108,17 +5700,7 @@ func (c *restClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } @@ -6189,17 +5771,7 @@ func (c *restClient) UpdateSecurityMarks(ctx context.Context, req *securitycente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityMarks") if err != nil { return err } @@ -6257,17 +5829,7 @@ func (c *restClient) CreateBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBigQueryExport") if err != nil { return err } @@ -6314,15 +5876,8 @@ func (c *restClient) DeleteBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBigQueryExport") + return err }, opts...) } @@ -6373,17 +5928,7 @@ func (c *restClient) UpdateBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBigQueryExport") if err != nil { return err } @@ -6449,21 +5994,10 @@ func (c *restClient) ListBigQueryExports(ctx context.Context, req *securitycente } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBigQueryExports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6536,17 +6070,7 @@ func (c *restClient) CreateEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEventThreatDetectionCustomModule") if err != nil { return err } @@ -6595,15 +6119,8 @@ func (c *restClient) DeleteEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEventThreatDetectionCustomModule") + return err }, opts...) } @@ -6640,17 +6157,7 @@ func (c *restClient) GetEventThreatDetectionCustomModule(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEventThreatDetectionCustomModule") if err != nil { return err } @@ -6713,21 +6220,10 @@ func (c *restClient) ListDescendantEventThreatDetectionCustomModules(ctx context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDescendantEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6804,21 +6300,10 @@ func (c *restClient) ListEventThreatDetectionCustomModules(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6900,17 +6385,7 @@ func (c *restClient) UpdateEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEventThreatDetectionCustomModule") if err != nil { return err } @@ -6966,17 +6441,7 @@ func (c *restClient) ValidateEventThreatDetectionCustomModule(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateEventThreatDetectionCustomModule") if err != nil { return err } @@ -7026,17 +6491,7 @@ func (c *restClient) GetEffectiveEventThreatDetectionCustomModule(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveEventThreatDetectionCustomModule") if err != nil { return err } @@ -7100,21 +6555,10 @@ func (c *restClient) ListEffectiveEventThreatDetectionCustomModules(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7184,17 +6628,7 @@ func (c *restClient) BatchCreateResourceValueConfigs(ctx context.Context, req *s httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateResourceValueConfigs") if err != nil { return err } @@ -7241,15 +6675,8 @@ func (c *restClient) DeleteResourceValueConfig(ctx context.Context, req *securit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteResourceValueConfig") + return err }, opts...) } @@ -7286,17 +6713,7 @@ func (c *restClient) GetResourceValueConfig(ctx context.Context, req *securityce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetResourceValueConfig") if err != nil { return err } @@ -7358,21 +6775,10 @@ func (c *restClient) ListResourceValueConfigs(ctx context.Context, req *security } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListResourceValueConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7449,17 +6855,7 @@ func (c *restClient) UpdateResourceValueConfig(ctx context.Context, req *securit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateResourceValueConfig") if err != nil { return err } @@ -7527,21 +6923,10 @@ func (c *restClient) ListValuedResources(ctx context.Context, req *securitycente } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListValuedResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7620,21 +7005,10 @@ func (c *restClient) ListAttackPaths(ctx context.Context, req *securitycenterpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttackPaths") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7694,15 +7068,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -7736,15 +7103,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -7781,17 +7141,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -7856,21 +7206,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securitycenter/apiv1/security_center_client_example_go123_test.go b/securitycenter/apiv1/security_center_client_example_go123_test.go index 44d38507cd1a..1cf63417ceff 100644 --- a/securitycenter/apiv1/security_center_client_example_go123_test.go +++ b/securitycenter/apiv1/security_center_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_GroupAssets_all() { } for resp, err := range c.GroupAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_GroupFindings_all() { } for resp, err := range c.GroupFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListAttackPaths_all() { } for resp, err := range c.ListAttackPaths(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListBigQueryExports_all() { } for resp, err := range c.ListBigQueryExports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListDescendantEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListDescendantEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListDescendantSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListDescendantSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListEffectiveEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListEffectiveEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_ListEffectiveSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListEffectiveSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_ListEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleClient_ListFindings_all() { } for resp, err := range c.ListFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -331,7 +331,7 @@ func ExampleClient_ListMuteConfigs_all() { } for resp, err := range c.ListMuteConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -357,7 +357,7 @@ func ExampleClient_ListNotificationConfigs_all() { } for resp, err := range c.ListNotificationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -383,7 +383,7 @@ func ExampleClient_ListResourceValueConfigs_all() { } for resp, err := range c.ListResourceValueConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -409,7 +409,7 @@ func ExampleClient_ListSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -435,7 +435,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -461,7 +461,7 @@ func ExampleClient_ListValuedResources_all() { } for resp, err := range c.ListValuedResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -487,7 +487,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycenter/apiv1/securitycenterpb/access.pb.go b/securitycenter/apiv1/securitycenterpb/access.pb.go index ed8d7d4722e9..304c9628f0a7 100755 --- a/securitycenter/apiv1/securitycenterpb/access.pb.go +++ b/securitycenter/apiv1/securitycenterpb/access.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/access.proto @@ -95,11 +95,9 @@ type Access struct { func (x *Access) Reset() { *x = Access{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Access) String() string { @@ -110,7 +108,7 @@ func (*Access) ProtoMessage() {} func (x *Access) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +220,9 @@ type ServiceAccountDelegationInfo struct { func (x *ServiceAccountDelegationInfo) Reset() { *x = ServiceAccountDelegationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccountDelegationInfo) String() string { @@ -237,7 +233,7 @@ func (*ServiceAccountDelegationInfo) ProtoMessage() {} func (x *ServiceAccountDelegationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +274,9 @@ type Geolocation struct { func (x *Geolocation) Reset() { *x = Geolocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Geolocation) String() string { @@ -293,7 +287,7 @@ func (*Geolocation) ProtoMessage() {} func (x *Geolocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_access_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,44 +413,6 @@ func file_google_cloud_securitycenter_v1_access_proto_init() { if File_google_cloud_securitycenter_v1_access_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_access_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Access); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_access_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccountDelegationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_access_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Geolocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/application.pb.go b/securitycenter/apiv1/securitycenterpb/application.pb.go index 47c0fc1108f8..e50035f5502b 100755 --- a/securitycenter/apiv1/securitycenterpb/application.pb.go +++ b/securitycenter/apiv1/securitycenterpb/application.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/application.proto @@ -51,11 +51,9 @@ type Application struct { func (x *Application) Reset() { *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_application_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_application_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application) String() string { @@ -66,7 +64,7 @@ func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_application_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,20 +152,6 @@ func file_google_cloud_securitycenter_v1_application_proto_init() { if File_google_cloud_securitycenter_v1_application_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_application_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/asset.pb.go b/securitycenter/apiv1/securitycenterpb/asset.pb.go index a711c9e0032f..1441e330ae5c 100755 --- a/securitycenter/apiv1/securitycenterpb/asset.pb.go +++ b/securitycenter/apiv1/securitycenterpb/asset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/asset.proto @@ -83,11 +83,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -98,7 +96,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type Asset_SecurityCenterProperties struct { func (x *Asset_SecurityCenterProperties) Reset() { *x = Asset_SecurityCenterProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_SecurityCenterProperties) String() string { @@ -222,7 +218,7 @@ func (*Asset_SecurityCenterProperties) ProtoMessage() {} func (x *Asset_SecurityCenterProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type Asset_IamPolicy struct { func (x *Asset_IamPolicy) Reset() { *x = Asset_IamPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_IamPolicy) String() string { @@ -332,7 +326,7 @@ func (*Asset_IamPolicy) ProtoMessage() {} func (x *Asset_IamPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_asset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,44 +517,6 @@ func file_google_cloud_securitycenter_v1_asset_proto_init() { } file_google_cloud_securitycenter_v1_folder_proto_init() file_google_cloud_securitycenter_v1_security_marks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_asset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_asset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Asset_SecurityCenterProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_asset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Asset_IamPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/attack_exposure.pb.go b/securitycenter/apiv1/securitycenterpb/attack_exposure.pb.go index 3563d9ca7620..ad372d77b9fb 100755 --- a/securitycenter/apiv1/securitycenterpb/attack_exposure.pb.go +++ b/securitycenter/apiv1/securitycenterpb/attack_exposure.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/attack_exposure.proto @@ -121,11 +121,9 @@ type AttackExposure struct { func (x *AttackExposure) Reset() { *x = AttackExposure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_exposure_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_exposure_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackExposure) String() string { @@ -136,7 +134,7 @@ func (*AttackExposure) ProtoMessage() {} func (x *AttackExposure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_exposure_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,20 +295,6 @@ func file_google_cloud_securitycenter_v1_attack_exposure_proto_init() { if File_google_cloud_securitycenter_v1_attack_exposure_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_attack_exposure_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttackExposure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/attack_path.pb.go b/securitycenter/apiv1/securitycenterpb/attack_path.pb.go index d8985c36ae9a..7419991d3146 100755 --- a/securitycenter/apiv1/securitycenterpb/attack_path.pb.go +++ b/securitycenter/apiv1/securitycenterpb/attack_path.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/attack_path.proto @@ -115,11 +115,9 @@ type AttackPath struct { func (x *AttackPath) Reset() { *x = AttackPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath) String() string { @@ -130,7 +128,7 @@ func (*AttackPath) ProtoMessage() {} func (x *AttackPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type AttackPath_AttackPathNode struct { func (x *AttackPath_AttackPathNode) Reset() { *x = AttackPath_AttackPathNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode) String() string { @@ -207,7 +203,7 @@ func (*AttackPath_AttackPathNode) ProtoMessage() {} func (x *AttackPath_AttackPathNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type AttackPath_AttackPathEdge struct { func (x *AttackPath_AttackPathEdge) Reset() { *x = AttackPath_AttackPathEdge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathEdge) String() string { @@ -294,7 +288,7 @@ func (*AttackPath_AttackPathEdge) ProtoMessage() {} func (x *AttackPath_AttackPathEdge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +334,9 @@ type AttackPath_AttackPathNode_PathNodeAssociatedFinding struct { func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) Reset() { *x = AttackPath_AttackPathNode_PathNodeAssociatedFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) String() string { @@ -355,7 +347,7 @@ func (*AttackPath_AttackPathNode_PathNodeAssociatedFinding) ProtoMessage() {} func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +403,9 @@ type AttackPath_AttackPathNode_AttackStepNode struct { func (x *AttackPath_AttackPathNode_AttackStepNode) Reset() { *x = AttackPath_AttackPathNode_AttackStepNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode_AttackStepNode) String() string { @@ -426,7 +416,7 @@ func (*AttackPath_AttackPathNode_AttackStepNode) ProtoMessage() {} func (x *AttackPath_AttackPathNode_AttackStepNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -638,68 +628,6 @@ func file_google_cloud_securitycenter_v1_attack_path_proto_init() { if File_google_cloud_securitycenter_v1_attack_path_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathEdge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode_PathNodeAssociatedFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_attack_path_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode_AttackStepNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/backup_disaster_recovery.pb.go b/securitycenter/apiv1/securitycenterpb/backup_disaster_recovery.pb.go index 849a1fbb4a6d..574d93e7f717 100755 --- a/securitycenter/apiv1/securitycenterpb/backup_disaster_recovery.pb.go +++ b/securitycenter/apiv1/securitycenterpb/backup_disaster_recovery.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/backup_disaster_recovery.proto @@ -94,11 +94,9 @@ type BackupDisasterRecovery struct { func (x *BackupDisasterRecovery) Reset() { *x = BackupDisasterRecovery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_backup_disaster_recovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_backup_disaster_recovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupDisasterRecovery) String() string { @@ -109,7 +107,7 @@ func (*BackupDisasterRecovery) ProtoMessage() {} func (x *BackupDisasterRecovery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_backup_disaster_recovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,20 +277,6 @@ func file_google_cloud_securitycenter_v1_backup_disaster_recovery_proto_init() { if File_google_cloud_securitycenter_v1_backup_disaster_recovery_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_backup_disaster_recovery_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupDisasterRecovery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/bigquery_export.pb.go b/securitycenter/apiv1/securitycenterpb/bigquery_export.pb.go index 9171cfd212e0..9abf506dfbb2 100755 --- a/securitycenter/apiv1/securitycenterpb/bigquery_export.pb.go +++ b/securitycenter/apiv1/securitycenterpb/bigquery_export.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/bigquery_export.proto @@ -99,11 +99,9 @@ type BigQueryExport struct { func (x *BigQueryExport) Reset() { *x = BigQueryExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_bigquery_export_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_bigquery_export_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryExport) String() string { @@ -114,7 +112,7 @@ func (*BigQueryExport) ProtoMessage() {} func (x *BigQueryExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_bigquery_export_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,20 +283,6 @@ func file_google_cloud_securitycenter_v1_bigquery_export_proto_init() { if File_google_cloud_securitycenter_v1_bigquery_export_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_bigquery_export_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/cloud_armor.pb.go b/securitycenter/apiv1/securitycenterpb/cloud_armor.pb.go index 18fda99f8eb5..7c927184c9b8 100755 --- a/securitycenter/apiv1/securitycenterpb/cloud_armor.pb.go +++ b/securitycenter/apiv1/securitycenterpb/cloud_armor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/cloud_armor.proto @@ -67,11 +67,9 @@ type CloudArmor struct { func (x *CloudArmor) Reset() { *x = CloudArmor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudArmor) String() string { @@ -82,7 +80,7 @@ func (*CloudArmor) ProtoMessage() {} func (x *CloudArmor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,11 +158,9 @@ type SecurityPolicy struct { func (x *SecurityPolicy) Reset() { *x = SecurityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicy) String() string { @@ -175,7 +171,7 @@ func (*SecurityPolicy) ProtoMessage() {} func (x *SecurityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type Requests struct { func (x *Requests) Reset() { *x = Requests{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Requests) String() string { @@ -246,7 +240,7 @@ func (*Requests) ProtoMessage() {} func (x *Requests) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type AdaptiveProtection struct { func (x *AdaptiveProtection) Reset() { *x = AdaptiveProtection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveProtection) String() string { @@ -321,7 +313,7 @@ func (*AdaptiveProtection) ProtoMessage() {} func (x *AdaptiveProtection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +351,9 @@ type Attack struct { func (x *Attack) Reset() { *x = Attack{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attack) String() string { @@ -374,7 +364,7 @@ func (*Attack) ProtoMessage() {} func (x *Attack) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,68 +520,6 @@ func file_google_cloud_securitycenter_v1_cloud_armor_proto_init() { if File_google_cloud_securitycenter_v1_cloud_armor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudArmor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Requests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveProtection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_cloud_armor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Attack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/cloud_dlp_data_profile.pb.go b/securitycenter/apiv1/securitycenterpb/cloud_dlp_data_profile.pb.go index 126cd714a067..e114f4e3a49c 100755 --- a/securitycenter/apiv1/securitycenterpb/cloud_dlp_data_profile.pb.go +++ b/securitycenter/apiv1/securitycenterpb/cloud_dlp_data_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto @@ -105,11 +105,9 @@ type CloudDlpDataProfile struct { func (x *CloudDlpDataProfile) Reset() { *x = CloudDlpDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDlpDataProfile) String() string { @@ -120,7 +118,7 @@ func (*CloudDlpDataProfile) ProtoMessage() {} func (x *CloudDlpDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,20 +235,6 @@ func file_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto_init() { if File_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_cloud_dlp_data_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudDlpDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/cloud_dlp_inspection.pb.go b/securitycenter/apiv1/securitycenterpb/cloud_dlp_inspection.pb.go index 3307e12249ed..1cf7b627fae6 100755 --- a/securitycenter/apiv1/securitycenterpb/cloud_dlp_inspection.pb.go +++ b/securitycenter/apiv1/securitycenterpb/cloud_dlp_inspection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/cloud_dlp_inspection.proto @@ -60,11 +60,9 @@ type CloudDlpInspection struct { func (x *CloudDlpInspection) Reset() { *x = CloudDlpInspection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDlpInspection) String() string { @@ -75,7 +73,7 @@ func (*CloudDlpInspection) ProtoMessage() {} func (x *CloudDlpInspection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,20 +193,6 @@ func file_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto_init() { if File_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_cloud_dlp_inspection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudDlpInspection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/compliance.pb.go b/securitycenter/apiv1/securitycenterpb/compliance.pb.go index 9392ee378f29..1403a0171125 100755 --- a/securitycenter/apiv1/securitycenterpb/compliance.pb.go +++ b/securitycenter/apiv1/securitycenterpb/compliance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/compliance.proto @@ -53,11 +53,9 @@ type Compliance struct { func (x *Compliance) Reset() { *x = Compliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_compliance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_compliance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Compliance) String() string { @@ -68,7 +66,7 @@ func (*Compliance) ProtoMessage() {} func (x *Compliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_compliance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,20 +162,6 @@ func file_google_cloud_securitycenter_v1_compliance_proto_init() { if File_google_cloud_securitycenter_v1_compliance_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_compliance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Compliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/connection.pb.go b/securitycenter/apiv1/securitycenterpb/connection.pb.go index 397f5365a365..ff22f66d75f6 100755 --- a/securitycenter/apiv1/securitycenterpb/connection.pb.go +++ b/securitycenter/apiv1/securitycenterpb/connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/connection.proto @@ -122,11 +122,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -137,7 +135,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,20 +263,6 @@ func file_google_cloud_securitycenter_v1_connection_proto_init() { if File_google_cloud_securitycenter_v1_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/contact_details.pb.go b/securitycenter/apiv1/securitycenterpb/contact_details.pb.go index bdf11daadca6..110711569896 100755 --- a/securitycenter/apiv1/securitycenterpb/contact_details.pb.go +++ b/securitycenter/apiv1/securitycenterpb/contact_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/contact_details.proto @@ -47,11 +47,9 @@ type ContactDetails struct { func (x *ContactDetails) Reset() { *x = ContactDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactDetails) String() string { @@ -62,7 +60,7 @@ func (*ContactDetails) ProtoMessage() {} func (x *ContactDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96,11 +94,9 @@ type Contact struct { func (x *Contact) Reset() { *x = Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Contact) String() string { @@ -111,7 +107,7 @@ func (*Contact) ProtoMessage() {} func (x *Contact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,32 +194,6 @@ func file_google_cloud_securitycenter_v1_contact_details_proto_init() { if File_google_cloud_securitycenter_v1_contact_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContactDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_contact_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/container.pb.go b/securitycenter/apiv1/securitycenterpb/container.pb.go index fc1f9f700a0b..f1d3108322fe 100755 --- a/securitycenter/apiv1/securitycenterpb/container.pb.go +++ b/securitycenter/apiv1/securitycenterpb/container.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/container.proto @@ -58,11 +58,9 @@ type Container struct { func (x *Container) Reset() { *x = Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_container_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_container_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Container) String() string { @@ -73,7 +71,7 @@ func (*Container) ProtoMessage() {} func (x *Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_container_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,20 +198,6 @@ func file_google_cloud_securitycenter_v1_container_proto_init() { return } file_google_cloud_securitycenter_v1_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_container_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/database.pb.go b/securitycenter/apiv1/securitycenterpb/database.pb.go index d74bcb677e1f..343310419951 100755 --- a/securitycenter/apiv1/securitycenterpb/database.pb.go +++ b/securitycenter/apiv1/securitycenterpb/database.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/database.proto @@ -74,11 +74,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_database_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -89,7 +87,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_database_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,20 +209,6 @@ func file_google_cloud_securitycenter_v1_database_proto_init() { if File_google_cloud_securitycenter_v1_database_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_database_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/effective_event_threat_detection_custom_module.pb.go b/securitycenter/apiv1/securitycenterpb/effective_event_threat_detection_custom_module.pb.go index 1b3e6d06c212..bdeb08b98f1d 100755 --- a/securitycenter/apiv1/securitycenterpb/effective_event_threat_detection_custom_module.pb.go +++ b/securitycenter/apiv1/securitycenterpb/effective_event_threat_detection_custom_module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto @@ -127,11 +127,9 @@ type EffectiveEventThreatDetectionCustomModule struct { func (x *EffectiveEventThreatDetectionCustomModule) Reset() { *x = EffectiveEventThreatDetectionCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_effective_event_threat_detection_custom_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_effective_event_threat_detection_custom_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveEventThreatDetectionCustomModule) String() string { @@ -142,7 +140,7 @@ func (*EffectiveEventThreatDetectionCustomModule) ProtoMessage() {} func (x *EffectiveEventThreatDetectionCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_effective_event_threat_detection_custom_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,20 +317,6 @@ func file_google_cloud_securitycenter_v1_effective_event_threat_detection_custom if File_google_cloud_securitycenter_v1_effective_event_threat_detection_custom_module_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_effective_event_threat_detection_custom_module_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveEventThreatDetectionCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/effective_security_health_analytics_custom_module.pb.go b/securitycenter/apiv1/securitycenterpb/effective_security_health_analytics_custom_module.pb.go index ea5b26701548..452fd185adcc 100755 --- a/securitycenter/apiv1/securitycenterpb/effective_security_health_analytics_custom_module.pb.go +++ b/securitycenter/apiv1/securitycenterpb/effective_security_health_analytics_custom_module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto @@ -124,11 +124,9 @@ type EffectiveSecurityHealthAnalyticsCustomModule struct { func (x *EffectiveSecurityHealthAnalyticsCustomModule) Reset() { *x = EffectiveSecurityHealthAnalyticsCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveSecurityHealthAnalyticsCustomModule) String() string { @@ -139,7 +137,7 @@ func (*EffectiveSecurityHealthAnalyticsCustomModule) ProtoMessage() {} func (x *EffectiveSecurityHealthAnalyticsCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,20 +307,6 @@ func file_google_cloud_securitycenter_v1_effective_security_health_analytics_cus return } file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveSecurityHealthAnalyticsCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module.pb.go b/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module.pb.go index 539448c95a4e..082096362941 100755 --- a/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module.pb.go +++ b/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto @@ -137,11 +137,9 @@ type EventThreatDetectionCustomModule struct { func (x *EventThreatDetectionCustomModule) Reset() { *x = EventThreatDetectionCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventThreatDetectionCustomModule) String() string { @@ -152,7 +150,7 @@ func (*EventThreatDetectionCustomModule) ProtoMessage() {} func (x *EventThreatDetectionCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,20 +359,6 @@ func file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_pr if File_google_cloud_securitycenter_v1_event_threat_detection_custom_module_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EventThreatDetectionCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module_validation_errors.pb.go b/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module_validation_errors.pb.go index 759be8338d10..4f5e55a95012 100755 --- a/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module_validation_errors.pb.go +++ b/securitycenter/apiv1/securitycenterpb/event_threat_detection_custom_module_validation_errors.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto @@ -47,11 +47,9 @@ type CustomModuleValidationErrors struct { func (x *CustomModuleValidationErrors) Reset() { *x = CustomModuleValidationErrors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomModuleValidationErrors) String() string { @@ -62,7 +60,7 @@ func (*CustomModuleValidationErrors) ProtoMessage() {} func (x *CustomModuleValidationErrors) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type CustomModuleValidationError struct { func (x *CustomModuleValidationError) Reset() { *x = CustomModuleValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomModuleValidationError) String() string { @@ -123,7 +119,7 @@ func (*CustomModuleValidationError) ProtoMessage() {} func (x *CustomModuleValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type Position struct { func (x *Position) Reset() { *x = Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Position) String() string { @@ -193,7 +187,7 @@ func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,44 +311,6 @@ func file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_va if File_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomModuleValidationErrors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomModuleValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_event_threat_detection_custom_module_validation_errors_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/exfiltration.pb.go b/securitycenter/apiv1/securitycenterpb/exfiltration.pb.go index 4334e0fc6e32..8c3fc934bd85 100755 --- a/securitycenter/apiv1/securitycenterpb/exfiltration.pb.go +++ b/securitycenter/apiv1/securitycenterpb/exfiltration.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/exfiltration.proto @@ -57,11 +57,9 @@ type Exfiltration struct { func (x *Exfiltration) Reset() { *x = Exfiltration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Exfiltration) String() string { @@ -72,7 +70,7 @@ func (*Exfiltration) ProtoMessage() {} func (x *Exfiltration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ExfilResource struct { func (x *ExfilResource) Reset() { *x = ExfilResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExfilResource) String() string { @@ -142,7 +138,7 @@ func (*ExfilResource) ProtoMessage() {} func (x *ExfilResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,32 +243,6 @@ func file_google_cloud_securitycenter_v1_exfiltration_proto_init() { if File_google_cloud_securitycenter_v1_exfiltration_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Exfiltration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_exfiltration_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExfilResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/external_system.pb.go b/securitycenter/apiv1/securitycenterpb/external_system.pb.go index 969dd584ba4a..495229c1ecec 100755 --- a/securitycenter/apiv1/securitycenterpb/external_system.pb.go +++ b/securitycenter/apiv1/securitycenterpb/external_system.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/external_system.proto @@ -76,11 +76,9 @@ type ExternalSystem struct { func (x *ExternalSystem) Reset() { *x = ExternalSystem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalSystem) String() string { @@ -91,7 +89,7 @@ func (*ExternalSystem) ProtoMessage() {} func (x *ExternalSystem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type ExternalSystem_TicketInfo struct { func (x *ExternalSystem_TicketInfo) Reset() { *x = ExternalSystem_TicketInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalSystem_TicketInfo) String() string { @@ -222,7 +218,7 @@ func (*ExternalSystem_TicketInfo) ProtoMessage() {} func (x *ExternalSystem_TicketInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,32 +412,6 @@ func file_google_cloud_securitycenter_v1_external_system_proto_init() { if File_google_cloud_securitycenter_v1_external_system_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExternalSystem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_external_system_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExternalSystem_TicketInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/file.pb.go b/securitycenter/apiv1/securitycenterpb/file.pb.go index 74f3783afd0c..e1a774888295 100755 --- a/securitycenter/apiv1/securitycenterpb/file.pb.go +++ b/securitycenter/apiv1/securitycenterpb/file.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/file.proto @@ -64,11 +64,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -79,7 +77,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type File_DiskPath struct { func (x *File_DiskPath) Reset() { *x = File_DiskPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File_DiskPath) String() string { @@ -174,7 +170,7 @@ func (*File_DiskPath) ProtoMessage() {} func (x *File_DiskPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,32 +276,6 @@ func file_google_cloud_securitycenter_v1_file_proto_init() { if File_google_cloud_securitycenter_v1_file_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_file_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_file_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*File_DiskPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/finding.pb.go b/securitycenter/apiv1/securitycenterpb/finding.pb.go index 837294458008..8ff61d9d995d 100755 --- a/securitycenter/apiv1/securitycenterpb/finding.pb.go +++ b/securitycenter/apiv1/securitycenterpb/finding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/finding.proto @@ -523,11 +523,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -538,7 +536,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,11 +917,9 @@ type Finding_MuteInfo struct { func (x *Finding_MuteInfo) Reset() { *x = Finding_MuteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo) String() string { @@ -934,7 +930,7 @@ func (*Finding_MuteInfo) ProtoMessage() {} func (x *Finding_MuteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,11 +976,9 @@ type Finding_MuteInfo_StaticMute struct { func (x *Finding_MuteInfo_StaticMute) Reset() { *x = Finding_MuteInfo_StaticMute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo_StaticMute) String() string { @@ -995,7 +989,7 @@ func (*Finding_MuteInfo_StaticMute) ProtoMessage() {} func (x *Finding_MuteInfo_StaticMute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,11 +1035,9 @@ type Finding_MuteInfo_DynamicMuteRecord struct { func (x *Finding_MuteInfo_DynamicMuteRecord) Reset() { *x = Finding_MuteInfo_DynamicMuteRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo_DynamicMuteRecord) String() string { @@ -1056,7 +1048,7 @@ func (*Finding_MuteInfo_DynamicMuteRecord) ProtoMessage() {} func (x *Finding_MuteInfo_DynamicMuteRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_finding_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,56 +1667,6 @@ func file_google_cloud_securitycenter_v1_finding_proto_init() { file_google_cloud_securitycenter_v1_security_posture_proto_init() file_google_cloud_securitycenter_v1_toxic_combination_proto_init() file_google_cloud_securitycenter_v1_vulnerability_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_finding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_finding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_finding_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo_StaticMute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_finding_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo_DynamicMuteRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/folder.pb.go b/securitycenter/apiv1/securitycenterpb/folder.pb.go index ef8e46d96de2..751495340c02 100755 --- a/securitycenter/apiv1/securitycenterpb/folder.pb.go +++ b/securitycenter/apiv1/securitycenterpb/folder.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/folder.proto @@ -51,11 +51,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_folder_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_folder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -66,7 +64,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_folder_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_cloud_securitycenter_v1_folder_proto_init() { if File_google_cloud_securitycenter_v1_folder_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_folder_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/group_membership.pb.go b/securitycenter/apiv1/securitycenterpb/group_membership.pb.go index fffdb2edafba..6bb02efd9f3a 100755 --- a/securitycenter/apiv1/securitycenterpb/group_membership.pb.go +++ b/securitycenter/apiv1/securitycenterpb/group_membership.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/group_membership.proto @@ -99,11 +99,9 @@ type GroupMembership struct { func (x *GroupMembership) Reset() { *x = GroupMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_group_membership_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_group_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupMembership) String() string { @@ -114,7 +112,7 @@ func (*GroupMembership) ProtoMessage() {} func (x *GroupMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_group_membership_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,20 +213,6 @@ func file_google_cloud_securitycenter_v1_group_membership_proto_init() { if File_google_cloud_securitycenter_v1_group_membership_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_group_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroupMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/iam_binding.pb.go b/securitycenter/apiv1/securitycenterpb/iam_binding.pb.go index 90be143fa83c..0ea831ac315b 100755 --- a/securitycenter/apiv1/securitycenterpb/iam_binding.pb.go +++ b/securitycenter/apiv1/securitycenterpb/iam_binding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/iam_binding.proto @@ -107,11 +107,9 @@ type IamBinding struct { func (x *IamBinding) Reset() { *x = IamBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_iam_binding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_iam_binding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamBinding) String() string { @@ -122,7 +120,7 @@ func (*IamBinding) ProtoMessage() {} func (x *IamBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_iam_binding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,20 +226,6 @@ func file_google_cloud_securitycenter_v1_iam_binding_proto_init() { if File_google_cloud_securitycenter_v1_iam_binding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_iam_binding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IamBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/indicator.pb.go b/securitycenter/apiv1/securitycenterpb/indicator.pb.go index 68c08357a2d5..430df25eac7b 100755 --- a/securitycenter/apiv1/securitycenterpb/indicator.pb.go +++ b/securitycenter/apiv1/securitycenterpb/indicator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/indicator.proto @@ -111,11 +111,9 @@ type Indicator struct { func (x *Indicator) Reset() { *x = Indicator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator) String() string { @@ -126,7 +124,7 @@ func (*Indicator) ProtoMessage() {} func (x *Indicator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type Indicator_ProcessSignature struct { func (x *Indicator_ProcessSignature) Reset() { *x = Indicator_ProcessSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature) String() string { @@ -201,7 +197,7 @@ func (*Indicator_ProcessSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type Indicator_ProcessSignature_MemoryHashSignature struct { func (x *Indicator_ProcessSignature_MemoryHashSignature) Reset() { *x = Indicator_ProcessSignature_MemoryHashSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_MemoryHashSignature) String() string { @@ -292,7 +286,7 @@ func (*Indicator_ProcessSignature_MemoryHashSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature_MemoryHashSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type Indicator_ProcessSignature_YaraRuleSignature struct { func (x *Indicator_ProcessSignature_YaraRuleSignature) Reset() { *x = Indicator_ProcessSignature_YaraRuleSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_YaraRuleSignature) String() string { @@ -348,7 +340,7 @@ func (*Indicator_ProcessSignature_YaraRuleSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature_YaraRuleSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type Indicator_ProcessSignature_MemoryHashSignature_Detection struct { func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) Reset() { *x = Indicator_ProcessSignature_MemoryHashSignature_Detection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) String() string { @@ -401,7 +391,7 @@ func (*Indicator_ProcessSignature_MemoryHashSignature_Detection) ProtoMessage() func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,68 +549,6 @@ func file_google_cloud_securitycenter_v1_indicator_proto_init() { if File_google_cloud_securitycenter_v1_indicator_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Indicator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_MemoryHashSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_YaraRuleSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_MemoryHashSignature_Detection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_indicator_proto_msgTypes[1].OneofWrappers = []any{ (*Indicator_ProcessSignature_MemoryHashSignature_)(nil), (*Indicator_ProcessSignature_YaraRuleSignature_)(nil), diff --git a/securitycenter/apiv1/securitycenterpb/kernel_rootkit.pb.go b/securitycenter/apiv1/securitycenterpb/kernel_rootkit.pb.go index 05e5896ec61f..d8df2243be25 100755 --- a/securitycenter/apiv1/securitycenterpb/kernel_rootkit.pb.go +++ b/securitycenter/apiv1/securitycenterpb/kernel_rootkit.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/kernel_rootkit.proto @@ -70,11 +70,9 @@ type KernelRootkit struct { func (x *KernelRootkit) Reset() { *x = KernelRootkit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kernel_rootkit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kernel_rootkit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KernelRootkit) String() string { @@ -85,7 +83,7 @@ func (*KernelRootkit) ProtoMessage() {} func (x *KernelRootkit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kernel_rootkit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,20 +253,6 @@ func file_google_cloud_securitycenter_v1_kernel_rootkit_proto_init() { if File_google_cloud_securitycenter_v1_kernel_rootkit_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_kernel_rootkit_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KernelRootkit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/kubernetes.pb.go b/securitycenter/apiv1/securitycenterpb/kubernetes.pb.go index 9083fe0f4a17..bf0008e1e4f8 100755 --- a/securitycenter/apiv1/securitycenterpb/kubernetes.pb.go +++ b/securitycenter/apiv1/securitycenterpb/kubernetes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/kubernetes.proto @@ -181,11 +181,9 @@ type Kubernetes struct { func (x *Kubernetes) Reset() { *x = Kubernetes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes) String() string { @@ -196,7 +194,7 @@ func (*Kubernetes) ProtoMessage() {} func (x *Kubernetes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +277,9 @@ type Kubernetes_Pod struct { func (x *Kubernetes_Pod) Reset() { *x = Kubernetes_Pod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Pod) String() string { @@ -294,7 +290,7 @@ func (*Kubernetes_Pod) ProtoMessage() {} func (x *Kubernetes_Pod) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type Kubernetes_Node struct { func (x *Kubernetes_Node) Reset() { *x = Kubernetes_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Node) String() string { @@ -365,7 +359,7 @@ func (*Kubernetes_Node) ProtoMessage() {} func (x *Kubernetes_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +395,9 @@ type Kubernetes_NodePool struct { func (x *Kubernetes_NodePool) Reset() { *x = Kubernetes_NodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_NodePool) String() string { @@ -416,7 +408,7 @@ func (*Kubernetes_NodePool) ProtoMessage() {} func (x *Kubernetes_NodePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type Kubernetes_Role struct { func (x *Kubernetes_Role) Reset() { *x = Kubernetes_Role{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Role) String() string { @@ -476,7 +466,7 @@ func (*Kubernetes_Role) ProtoMessage() {} func (x *Kubernetes_Role) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +521,9 @@ type Kubernetes_Binding struct { func (x *Kubernetes_Binding) Reset() { *x = Kubernetes_Binding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Binding) String() string { @@ -546,7 +534,7 @@ func (*Kubernetes_Binding) ProtoMessage() {} func (x *Kubernetes_Binding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +593,9 @@ type Kubernetes_Subject struct { func (x *Kubernetes_Subject) Reset() { *x = Kubernetes_Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Subject) String() string { @@ -620,7 +606,7 @@ func (*Kubernetes_Subject) ProtoMessage() {} func (x *Kubernetes_Subject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +672,9 @@ type Kubernetes_AccessReview struct { func (x *Kubernetes_AccessReview) Reset() { *x = Kubernetes_AccessReview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_AccessReview) String() string { @@ -701,7 +685,7 @@ func (*Kubernetes_AccessReview) ProtoMessage() {} func (x *Kubernetes_AccessReview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +774,9 @@ type Kubernetes_Object struct { func (x *Kubernetes_Object) Reset() { *x = Kubernetes_Object{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Object) String() string { @@ -805,7 +787,7 @@ func (*Kubernetes_Object) ProtoMessage() {} func (x *Kubernetes_Object) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1058,116 +1040,6 @@ func file_google_cloud_securitycenter_v1_kubernetes_proto_init() { } file_google_cloud_securitycenter_v1_container_proto_init() file_google_cloud_securitycenter_v1_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Pod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_NodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Role); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Binding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_AccessReview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_kubernetes_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Object); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/label.pb.go b/securitycenter/apiv1/securitycenterpb/label.pb.go index 91111ea3cfdf..09cdbbe8167a 100755 --- a/securitycenter/apiv1/securitycenterpb/label.pb.go +++ b/securitycenter/apiv1/securitycenterpb/label.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/label.proto @@ -52,11 +52,9 @@ type Label struct { func (x *Label) Reset() { *x = Label{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_label_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_label_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Label) String() string { @@ -67,7 +65,7 @@ func (*Label) ProtoMessage() {} func (x *Label) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_label_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,20 +151,6 @@ func file_google_cloud_securitycenter_v1_label_proto_init() { if File_google_cloud_securitycenter_v1_label_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_label_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Label); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/load_balancer.pb.go b/securitycenter/apiv1/securitycenterpb/load_balancer.pb.go index 487bad31a2b4..4e9ba28148c7 100755 --- a/securitycenter/apiv1/securitycenterpb/load_balancer.pb.go +++ b/securitycenter/apiv1/securitycenterpb/load_balancer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/load_balancer.proto @@ -48,11 +48,9 @@ type LoadBalancer struct { func (x *LoadBalancer) Reset() { *x = LoadBalancer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_load_balancer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_load_balancer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadBalancer) String() string { @@ -63,7 +61,7 @@ func (*LoadBalancer) ProtoMessage() {} func (x *LoadBalancer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_load_balancer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,20 +140,6 @@ func file_google_cloud_securitycenter_v1_load_balancer_proto_init() { if File_google_cloud_securitycenter_v1_load_balancer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_load_balancer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoadBalancer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/log_entry.pb.go b/securitycenter/apiv1/securitycenterpb/log_entry.pb.go index 1428e6a3715c..be24e8782560 100755 --- a/securitycenter/apiv1/securitycenterpb/log_entry.pb.go +++ b/securitycenter/apiv1/securitycenterpb/log_entry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/log_entry.proto @@ -50,11 +50,9 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntry) String() string { @@ -65,7 +63,7 @@ func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type CloudLoggingEntry struct { func (x *CloudLoggingEntry) Reset() { *x = CloudLoggingEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudLoggingEntry) String() string { @@ -143,7 +139,7 @@ func (*CloudLoggingEntry) ProtoMessage() {} func (x *CloudLoggingEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,32 +262,6 @@ func file_google_cloud_securitycenter_v1_log_entry_proto_init() { if File_google_cloud_securitycenter_v1_log_entry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudLoggingEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_log_entry_proto_msgTypes[0].OneofWrappers = []any{ (*LogEntry_CloudLoggingEntry)(nil), } diff --git a/securitycenter/apiv1/securitycenterpb/mitre_attack.pb.go b/securitycenter/apiv1/securitycenterpb/mitre_attack.pb.go index cf96b71e43ea..05655d5f2ffd 100755 --- a/securitycenter/apiv1/securitycenterpb/mitre_attack.pb.go +++ b/securitycenter/apiv1/securitycenterpb/mitre_attack.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/mitre_attack.proto @@ -467,11 +467,9 @@ type MitreAttack struct { func (x *MitreAttack) Reset() { *x = MitreAttack{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_mitre_attack_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_mitre_attack_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MitreAttack) String() string { @@ -482,7 +480,7 @@ func (*MitreAttack) ProtoMessage() {} func (x *MitreAttack) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_mitre_attack_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,20 +753,6 @@ func file_google_cloud_securitycenter_v1_mitre_attack_proto_init() { if File_google_cloud_securitycenter_v1_mitre_attack_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_mitre_attack_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MitreAttack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/mute_config.pb.go b/securitycenter/apiv1/securitycenterpb/mute_config.pb.go index cc9cbff51cb9..2fbc0de7aad0 100755 --- a/securitycenter/apiv1/securitycenterpb/mute_config.pb.go +++ b/securitycenter/apiv1/securitycenterpb/mute_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/mute_config.proto @@ -164,11 +164,9 @@ type MuteConfig struct { func (x *MuteConfig) Reset() { *x = MuteConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_mute_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_mute_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MuteConfig) String() string { @@ -179,7 +177,7 @@ func (*MuteConfig) ProtoMessage() {} func (x *MuteConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_mute_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,20 +385,6 @@ func file_google_cloud_securitycenter_v1_mute_config_proto_init() { if File_google_cloud_securitycenter_v1_mute_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_mute_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MuteConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/notebook.pb.go b/securitycenter/apiv1/securitycenterpb/notebook.pb.go index c57fd2c79549..0e6a9ba0a1f0 100755 --- a/securitycenter/apiv1/securitycenterpb/notebook.pb.go +++ b/securitycenter/apiv1/securitycenterpb/notebook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/notebook.proto @@ -56,11 +56,9 @@ type Notebook struct { func (x *Notebook) Reset() { *x = Notebook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_notebook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_notebook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Notebook) String() string { @@ -71,7 +69,7 @@ func (*Notebook) ProtoMessage() {} func (x *Notebook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_notebook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,20 +181,6 @@ func file_google_cloud_securitycenter_v1_notebook_proto_init() { if File_google_cloud_securitycenter_v1_notebook_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_notebook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Notebook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/notification_config.pb.go b/securitycenter/apiv1/securitycenterpb/notification_config.pb.go index f2631aa17a85..21655194ea83 100755 --- a/securitycenter/apiv1/securitycenterpb/notification_config.pb.go +++ b/securitycenter/apiv1/securitycenterpb/notification_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/notification_config.proto @@ -70,11 +70,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -85,7 +83,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type NotificationConfig_StreamingConfig struct { func (x *NotificationConfig_StreamingConfig) Reset() { *x = NotificationConfig_StreamingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_StreamingConfig) String() string { @@ -201,7 +197,7 @@ func (*NotificationConfig_StreamingConfig) ProtoMessage() {} func (x *NotificationConfig_StreamingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,32 +326,6 @@ func file_google_cloud_securitycenter_v1_notification_config_proto_init() { if File_google_cloud_securitycenter_v1_notification_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_StreamingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_notification_config_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationConfig_StreamingConfig_)(nil), } diff --git a/securitycenter/apiv1/securitycenterpb/notification_message.pb.go b/securitycenter/apiv1/securitycenterpb/notification_message.pb.go index 43b625afc1ce..3b16e9a921a6 100755 --- a/securitycenter/apiv1/securitycenterpb/notification_message.pb.go +++ b/securitycenter/apiv1/securitycenterpb/notification_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/notification_message.proto @@ -55,11 +55,9 @@ type NotificationMessage struct { func (x *NotificationMessage) Reset() { *x = NotificationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_notification_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_notification_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationMessage) String() string { @@ -70,7 +68,7 @@ func (*NotificationMessage) ProtoMessage() {} func (x *NotificationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_notification_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,20 +205,6 @@ func file_google_cloud_securitycenter_v1_notification_message_proto_init() { } file_google_cloud_securitycenter_v1_finding_proto_init() file_google_cloud_securitycenter_v1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_notification_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_notification_message_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationMessage_Finding)(nil), } diff --git a/securitycenter/apiv1/securitycenterpb/org_policy.pb.go b/securitycenter/apiv1/securitycenterpb/org_policy.pb.go index a4bc47c54ab9..da091f112100 100755 --- a/securitycenter/apiv1/securitycenterpb/org_policy.pb.go +++ b/securitycenter/apiv1/securitycenterpb/org_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/org_policy.proto @@ -50,11 +50,9 @@ type OrgPolicy struct { func (x *OrgPolicy) Reset() { *x = OrgPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_org_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_org_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrgPolicy) String() string { @@ -65,7 +63,7 @@ func (*OrgPolicy) ProtoMessage() {} func (x *OrgPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_org_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_cloud_securitycenter_v1_org_policy_proto_init() { if File_google_cloud_securitycenter_v1_org_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_org_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrgPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/organization_settings.pb.go b/securitycenter/apiv1/securitycenterpb/organization_settings.pb.go index 14b9aedc47dd..12bf8802440d 100755 --- a/securitycenter/apiv1/securitycenterpb/organization_settings.pb.go +++ b/securitycenter/apiv1/securitycenterpb/organization_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/organization_settings.proto @@ -122,11 +122,9 @@ type OrganizationSettings struct { func (x *OrganizationSettings) Reset() { *x = OrganizationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings) String() string { @@ -137,7 +135,7 @@ func (*OrganizationSettings) ProtoMessage() {} func (x *OrganizationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type OrganizationSettings_AssetDiscoveryConfig struct { func (x *OrganizationSettings_AssetDiscoveryConfig) Reset() { *x = OrganizationSettings_AssetDiscoveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings_AssetDiscoveryConfig) String() string { @@ -205,7 +201,7 @@ func (*OrganizationSettings_AssetDiscoveryConfig) ProtoMessage() {} func (x *OrganizationSettings_AssetDiscoveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,32 +341,6 @@ func file_google_cloud_securitycenter_v1_organization_settings_proto_init() { if File_google_cloud_securitycenter_v1_organization_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_organization_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings_AssetDiscoveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/process.pb.go b/securitycenter/apiv1/securitycenterpb/process.pb.go index 99c9a9b0faab..61a18498f1bd 100755 --- a/securitycenter/apiv1/securitycenterpb/process.pb.go +++ b/securitycenter/apiv1/securitycenterpb/process.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/process.proto @@ -69,11 +69,9 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Process) String() string { @@ -84,7 +82,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +182,9 @@ type EnvironmentVariable struct { func (x *EnvironmentVariable) Reset() { *x = EnvironmentVariable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentVariable) String() string { @@ -199,7 +195,7 @@ func (*EnvironmentVariable) ProtoMessage() {} func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_process_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,32 +322,6 @@ func file_google_cloud_securitycenter_v1_process_proto_init() { return } file_google_cloud_securitycenter_v1_file_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_process_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Process); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_process_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentVariable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/resource.pb.go b/securitycenter/apiv1/securitycenterpb/resource.pb.go index 3c3224065848..ef703c305557 100755 --- a/securitycenter/apiv1/securitycenterpb/resource.pb.go +++ b/securitycenter/apiv1/securitycenterpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/resource.proto @@ -232,11 +232,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -247,7 +245,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +415,9 @@ type AwsMetadata struct { func (x *AwsMetadata) Reset() { *x = AwsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata) String() string { @@ -432,7 +428,7 @@ func (*AwsMetadata) ProtoMessage() {} func (x *AwsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +482,9 @@ type AzureMetadata struct { func (x *AzureMetadata) Reset() { *x = AzureMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata) String() string { @@ -501,7 +495,7 @@ func (*AzureMetadata) ProtoMessage() {} func (x *AzureMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -551,11 +545,9 @@ type ResourcePath struct { func (x *ResourcePath) Reset() { *x = ResourcePath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePath) String() string { @@ -566,7 +558,7 @@ func (*ResourcePath) ProtoMessage() {} func (x *ResourcePath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +596,9 @@ type AwsMetadata_AwsOrganization struct { func (x *AwsMetadata_AwsOrganization) Reset() { *x = AwsMetadata_AwsOrganization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsOrganization) String() string { @@ -619,7 +609,7 @@ func (*AwsMetadata_AwsOrganization) ProtoMessage() {} func (x *AwsMetadata_AwsOrganization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +651,9 @@ type AwsMetadata_AwsOrganizationalUnit struct { func (x *AwsMetadata_AwsOrganizationalUnit) Reset() { *x = AwsMetadata_AwsOrganizationalUnit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsOrganizationalUnit) String() string { @@ -676,7 +664,7 @@ func (*AwsMetadata_AwsOrganizationalUnit) ProtoMessage() {} func (x *AwsMetadata_AwsOrganizationalUnit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +707,9 @@ type AwsMetadata_AwsAccount struct { func (x *AwsMetadata_AwsAccount) Reset() { *x = AwsMetadata_AwsAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsAccount) String() string { @@ -734,7 +720,7 @@ func (*AwsMetadata_AwsAccount) ProtoMessage() {} func (x *AwsMetadata_AwsAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +764,9 @@ type AzureMetadata_AzureManagementGroup struct { func (x *AzureMetadata_AzureManagementGroup) Reset() { *x = AzureMetadata_AzureManagementGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureManagementGroup) String() string { @@ -793,7 +777,7 @@ func (*AzureMetadata_AzureManagementGroup) ProtoMessage() {} func (x *AzureMetadata_AzureManagementGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +821,9 @@ type AzureMetadata_AzureSubscription struct { func (x *AzureMetadata_AzureSubscription) Reset() { *x = AzureMetadata_AzureSubscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureSubscription) String() string { @@ -852,7 +834,7 @@ func (*AzureMetadata_AzureSubscription) ProtoMessage() {} func (x *AzureMetadata_AzureSubscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +875,9 @@ type AzureMetadata_AzureResourceGroup struct { func (x *AzureMetadata_AzureResourceGroup) Reset() { *x = AzureMetadata_AzureResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureResourceGroup) String() string { @@ -908,7 +888,7 @@ func (*AzureMetadata_AzureResourceGroup) ProtoMessage() {} func (x *AzureMetadata_AzureResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +927,9 @@ type ResourcePath_ResourcePathNode struct { func (x *ResourcePath_ResourcePathNode) Reset() { *x = ResourcePath_ResourcePathNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePath_ResourcePathNode) String() string { @@ -962,7 +940,7 @@ func (*ResourcePath_ResourcePathNode) ProtoMessage() {} func (x *ResourcePath_ResourcePathNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1239,140 +1217,6 @@ func file_google_cloud_securitycenter_v1_resource_proto_init() { return } file_google_cloud_securitycenter_v1_folder_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsOrganization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsOrganizationalUnit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureManagementGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureSubscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePath_ResourcePathNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_resource_proto_msgTypes[0].OneofWrappers = []any{ (*Resource_AwsMetadata)(nil), (*Resource_AzureMetadata)(nil), diff --git a/securitycenter/apiv1/securitycenterpb/resource_value_config.pb.go b/securitycenter/apiv1/securitycenterpb/resource_value_config.pb.go index 941e7f9a5a56..12cb63328232 100755 --- a/securitycenter/apiv1/securitycenterpb/resource_value_config.pb.go +++ b/securitycenter/apiv1/securitycenterpb/resource_value_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/resource_value_config.proto @@ -147,11 +147,9 @@ type ResourceValueConfig struct { func (x *ResourceValueConfig) Reset() { *x = ResourceValueConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfig) String() string { @@ -162,7 +160,7 @@ func (*ResourceValueConfig) ProtoMessage() {} func (x *ResourceValueConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type ResourceValueConfig_SensitiveDataProtectionMapping struct { func (x *ResourceValueConfig_SensitiveDataProtectionMapping) Reset() { *x = ResourceValueConfig_SensitiveDataProtectionMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfig_SensitiveDataProtectionMapping) String() string { @@ -287,7 +283,7 @@ func (*ResourceValueConfig_SensitiveDataProtectionMapping) ProtoMessage() {} func (x *ResourceValueConfig_SensitiveDataProtectionMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,32 +478,6 @@ func file_google_cloud_securitycenter_v1_resource_value_config_proto_init() { return } file_google_cloud_securitycenter_v1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_resource_value_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfig_SensitiveDataProtectionMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/run_asset_discovery_response.pb.go b/securitycenter/apiv1/securitycenterpb/run_asset_discovery_response.pb.go index f08eb6abfa46..5259ef224d00 100755 --- a/securitycenter/apiv1/securitycenterpb/run_asset_discovery_response.pb.go +++ b/securitycenter/apiv1/securitycenterpb/run_asset_discovery_response.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/run_asset_discovery_response.proto @@ -108,11 +108,9 @@ type RunAssetDiscoveryResponse struct { func (x *RunAssetDiscoveryResponse) Reset() { *x = RunAssetDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_run_asset_discovery_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_run_asset_discovery_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryResponse) String() string { @@ -123,7 +121,7 @@ func (*RunAssetDiscoveryResponse) ProtoMessage() {} func (x *RunAssetDiscoveryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_run_asset_discovery_response_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,20 +228,6 @@ func file_google_cloud_securitycenter_v1_run_asset_discovery_response_proto_init if File_google_cloud_securitycenter_v1_run_asset_discovery_response_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_run_asset_discovery_response_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_config.pb.go b/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_config.pb.go index 0d629367fcac..e341e3049c0b 100755 --- a/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_config.pb.go +++ b/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/security_health_analytics_custom_config.proto @@ -128,11 +128,9 @@ type CustomConfig struct { func (x *CustomConfig) Reset() { *x = CustomConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig) String() string { @@ -143,7 +141,7 @@ func (*CustomConfig) ProtoMessage() {} func (x *CustomConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +213,9 @@ type CustomConfig_CustomOutputSpec struct { func (x *CustomConfig_CustomOutputSpec) Reset() { *x = CustomConfig_CustomOutputSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec) String() string { @@ -230,7 +226,7 @@ func (*CustomConfig_CustomOutputSpec) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +260,9 @@ type CustomConfig_ResourceSelector struct { func (x *CustomConfig_ResourceSelector) Reset() { *x = CustomConfig_ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_ResourceSelector) String() string { @@ -279,7 +273,7 @@ func (*CustomConfig_ResourceSelector) ProtoMessage() {} func (x *CustomConfig_ResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +311,9 @@ type CustomConfig_CustomOutputSpec_Property struct { func (x *CustomConfig_CustomOutputSpec_Property) Reset() { *x = CustomConfig_CustomOutputSpec_Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec_Property) String() string { @@ -332,7 +324,7 @@ func (*CustomConfig_CustomOutputSpec_Property) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec_Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,56 +474,6 @@ func file_google_cloud_securitycenter_v1_security_health_analytics_custom_config if File_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec_Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_module.pb.go b/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_module.pb.go index 3193b7ba12b7..e0bfe7cd3085 100755 --- a/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_module.pb.go +++ b/securitycenter/apiv1/securitycenterpb/security_health_analytics_custom_module.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/security_health_analytics_custom_module.proto @@ -140,11 +140,9 @@ type SecurityHealthAnalyticsCustomModule struct { func (x *SecurityHealthAnalyticsCustomModule) Reset() { *x = SecurityHealthAnalyticsCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsCustomModule) String() string { @@ -155,7 +153,7 @@ func (*SecurityHealthAnalyticsCustomModule) ProtoMessage() {} func (x *SecurityHealthAnalyticsCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_health_analytics_custom_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,20 +368,6 @@ func file_google_cloud_securitycenter_v1_security_health_analytics_custom_module return } file_google_cloud_securitycenter_v1_security_health_analytics_custom_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_security_health_analytics_custom_module_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/security_marks.pb.go b/securitycenter/apiv1/securitycenterpb/security_marks.pb.go index 7973bcc5ba48..5d93071dddc5 100755 --- a/securitycenter/apiv1/securitycenterpb/security_marks.pb.go +++ b/securitycenter/apiv1/securitycenterpb/security_marks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/security_marks.proto @@ -73,11 +73,9 @@ type SecurityMarks struct { func (x *SecurityMarks) Reset() { *x = SecurityMarks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_marks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_marks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityMarks) String() string { @@ -88,7 +86,7 @@ func (*SecurityMarks) ProtoMessage() {} func (x *SecurityMarks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_marks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,20 +220,6 @@ func file_google_cloud_securitycenter_v1_security_marks_proto_init() { if File_google_cloud_securitycenter_v1_security_marks_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_security_marks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityMarks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/security_posture.pb.go b/securitycenter/apiv1/securitycenterpb/security_posture.pb.go index 25073fd94a36..8ce9819c517d 100755 --- a/securitycenter/apiv1/securitycenterpb/security_posture.pb.go +++ b/securitycenter/apiv1/securitycenterpb/security_posture.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/security_posture.proto @@ -69,11 +69,9 @@ type SecurityPosture struct { func (x *SecurityPosture) Reset() { *x = SecurityPosture{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPosture) String() string { @@ -84,7 +82,7 @@ func (*SecurityPosture) ProtoMessage() {} func (x *SecurityPosture) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type SecurityPosture_PolicyDriftDetails struct { func (x *SecurityPosture_PolicyDriftDetails) Reset() { *x = SecurityPosture_PolicyDriftDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPosture_PolicyDriftDetails) String() string { @@ -190,7 +186,7 @@ func (*SecurityPosture_PolicyDriftDetails) ProtoMessage() {} func (x *SecurityPosture_PolicyDriftDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,32 +312,6 @@ func file_google_cloud_securitycenter_v1_security_posture_proto_init() { if File_google_cloud_securitycenter_v1_security_posture_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPosture); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_security_posture_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPosture_PolicyDriftDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/securitycenter_service.pb.go b/securitycenter/apiv1/securitycenterpb/securitycenter_service.pb.go index 5e1d61af5392..079e8570e12a 100755 --- a/securitycenter/apiv1/securitycenterpb/securitycenter_service.pb.go +++ b/securitycenter/apiv1/securitycenterpb/securitycenter_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/securitycenter_service.proto @@ -283,11 +283,9 @@ type BulkMuteFindingsRequest struct { func (x *BulkMuteFindingsRequest) Reset() { *x = BulkMuteFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkMuteFindingsRequest) String() string { @@ -298,7 +296,7 @@ func (*BulkMuteFindingsRequest) ProtoMessage() {} func (x *BulkMuteFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +349,9 @@ type BulkMuteFindingsResponse struct { func (x *BulkMuteFindingsResponse) Reset() { *x = BulkMuteFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkMuteFindingsResponse) String() string { @@ -366,7 +362,7 @@ func (*BulkMuteFindingsResponse) ProtoMessage() {} func (x *BulkMuteFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +397,9 @@ type CreateFindingRequest struct { func (x *CreateFindingRequest) Reset() { *x = CreateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFindingRequest) String() string { @@ -416,7 +410,7 @@ func (*CreateFindingRequest) ProtoMessage() {} func (x *CreateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -473,11 +467,9 @@ type CreateMuteConfigRequest struct { func (x *CreateMuteConfigRequest) Reset() { *x = CreateMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMuteConfigRequest) String() string { @@ -488,7 +480,7 @@ func (*CreateMuteConfigRequest) ProtoMessage() {} func (x *CreateMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +530,9 @@ type CreateResourceValueConfigRequest struct { func (x *CreateResourceValueConfigRequest) Reset() { *x = CreateResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateResourceValueConfigRequest) String() string { @@ -553,7 +543,7 @@ func (*CreateResourceValueConfigRequest) ProtoMessage() {} func (x *CreateResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -598,11 +588,9 @@ type BatchCreateResourceValueConfigsRequest struct { func (x *BatchCreateResourceValueConfigsRequest) Reset() { *x = BatchCreateResourceValueConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateResourceValueConfigsRequest) String() string { @@ -613,7 +601,7 @@ func (*BatchCreateResourceValueConfigsRequest) ProtoMessage() {} func (x *BatchCreateResourceValueConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,11 +642,9 @@ type BatchCreateResourceValueConfigsResponse struct { func (x *BatchCreateResourceValueConfigsResponse) Reset() { *x = BatchCreateResourceValueConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateResourceValueConfigsResponse) String() string { @@ -669,7 +655,7 @@ func (*BatchCreateResourceValueConfigsResponse) ProtoMessage() {} func (x *BatchCreateResourceValueConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,11 +689,9 @@ type DeleteResourceValueConfigRequest struct { func (x *DeleteResourceValueConfigRequest) Reset() { *x = DeleteResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteResourceValueConfigRequest) String() string { @@ -718,7 +702,7 @@ func (*DeleteResourceValueConfigRequest) ProtoMessage() {} func (x *DeleteResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,11 +737,9 @@ type GetResourceValueConfigRequest struct { func (x *GetResourceValueConfigRequest) Reset() { *x = GetResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResourceValueConfigRequest) String() string { @@ -768,7 +750,7 @@ func (*GetResourceValueConfigRequest) ProtoMessage() {} func (x *GetResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +800,9 @@ type ListResourceValueConfigsRequest struct { func (x *ListResourceValueConfigsRequest) Reset() { *x = ListResourceValueConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourceValueConfigsRequest) String() string { @@ -833,7 +813,7 @@ func (*ListResourceValueConfigsRequest) ProtoMessage() {} func (x *ListResourceValueConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +864,9 @@ type ListResourceValueConfigsResponse struct { func (x *ListResourceValueConfigsResponse) Reset() { *x = ListResourceValueConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourceValueConfigsResponse) String() string { @@ -899,7 +877,7 @@ func (*ListResourceValueConfigsResponse) ProtoMessage() {} func (x *ListResourceValueConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +921,9 @@ type UpdateResourceValueConfigRequest struct { func (x *UpdateResourceValueConfigRequest) Reset() { *x = UpdateResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateResourceValueConfigRequest) String() string { @@ -958,7 +934,7 @@ func (*UpdateResourceValueConfigRequest) ProtoMessage() {} func (x *UpdateResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +986,9 @@ type CreateNotificationConfigRequest struct { func (x *CreateNotificationConfigRequest) Reset() { *x = CreateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotificationConfigRequest) String() string { @@ -1025,7 +999,7 @@ func (*CreateNotificationConfigRequest) ProtoMessage() {} func (x *CreateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,11 +1054,9 @@ type CreateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = CreateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1095,7 +1067,7 @@ func (*CreateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1140,11 +1112,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -1155,7 +1125,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1172,9 @@ type DeleteMuteConfigRequest struct { func (x *DeleteMuteConfigRequest) Reset() { *x = DeleteMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMuteConfigRequest) String() string { @@ -1217,7 +1185,7 @@ func (*DeleteMuteConfigRequest) ProtoMessage() {} func (x *DeleteMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1222,9 @@ type DeleteNotificationConfigRequest struct { func (x *DeleteNotificationConfigRequest) Reset() { *x = DeleteNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotificationConfigRequest) String() string { @@ -1269,7 +1235,7 @@ func (*DeleteNotificationConfigRequest) ProtoMessage() {} func (x *DeleteNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,11 +1273,9 @@ type DeleteSecurityHealthAnalyticsCustomModuleRequest struct { func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = DeleteSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1322,7 +1286,7 @@ func (*DeleteSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1359,11 +1323,9 @@ type GetBigQueryExportRequest struct { func (x *GetBigQueryExportRequest) Reset() { *x = GetBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBigQueryExportRequest) String() string { @@ -1374,7 +1336,7 @@ func (*GetBigQueryExportRequest) ProtoMessage() {} func (x *GetBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1414,11 +1376,9 @@ type GetMuteConfigRequest struct { func (x *GetMuteConfigRequest) Reset() { *x = GetMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMuteConfigRequest) String() string { @@ -1429,7 +1389,7 @@ func (*GetMuteConfigRequest) ProtoMessage() {} func (x *GetMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1466,11 +1426,9 @@ type GetNotificationConfigRequest struct { func (x *GetNotificationConfigRequest) Reset() { *x = GetNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationConfigRequest) String() string { @@ -1481,7 +1439,7 @@ func (*GetNotificationConfigRequest) ProtoMessage() {} func (x *GetNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1474,9 @@ type GetOrganizationSettingsRequest struct { func (x *GetOrganizationSettingsRequest) Reset() { *x = GetOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationSettingsRequest) String() string { @@ -1531,7 +1487,7 @@ func (*GetOrganizationSettingsRequest) ProtoMessage() {} func (x *GetOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1570,11 +1526,9 @@ type GetEffectiveSecurityHealthAnalyticsCustomModuleRequest struct { func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = GetEffectiveSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1585,7 +1539,7 @@ func (*GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1623,11 +1577,9 @@ type GetSecurityHealthAnalyticsCustomModuleRequest struct { func (x *GetSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = GetSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1638,7 +1590,7 @@ func (*GetSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *GetSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1625,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -1688,7 +1638,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,11 +1796,9 @@ type GroupAssetsRequest struct { func (x *GroupAssetsRequest) Reset() { *x = GroupAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsRequest) String() string { @@ -1861,7 +1809,7 @@ func (*GroupAssetsRequest) ProtoMessage() {} func (x *GroupAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1946,11 +1894,9 @@ type GroupAssetsResponse struct { func (x *GroupAssetsResponse) Reset() { *x = GroupAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsResponse) String() string { @@ -1961,7 +1907,7 @@ func (*GroupAssetsResponse) ProtoMessage() {} func (x *GroupAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2135,11 +2081,9 @@ type GroupFindingsRequest struct { func (x *GroupFindingsRequest) Reset() { *x = GroupFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsRequest) String() string { @@ -2150,7 +2094,7 @@ func (*GroupFindingsRequest) ProtoMessage() {} func (x *GroupFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2235,11 +2179,9 @@ type GroupFindingsResponse struct { func (x *GroupFindingsResponse) Reset() { *x = GroupFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsResponse) String() string { @@ -2250,7 +2192,7 @@ func (*GroupFindingsResponse) ProtoMessage() {} func (x *GroupFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2307,11 +2249,9 @@ type GroupResult struct { func (x *GroupResult) Reset() { *x = GroupResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupResult) String() string { @@ -2322,7 +2262,7 @@ func (*GroupResult) ProtoMessage() {} func (x *GroupResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2372,11 +2312,9 @@ type ListDescendantSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListDescendantSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -2387,7 +2325,7 @@ func (*ListDescendantSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2439,11 +2377,9 @@ type ListDescendantSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListDescendantSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -2454,7 +2390,7 @@ func (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage( func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2534,11 +2470,9 @@ type ListValuedResourcesRequest struct { func (x *ListValuedResourcesRequest) Reset() { *x = ListValuedResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListValuedResourcesRequest) String() string { @@ -2549,7 +2483,7 @@ func (*ListValuedResourcesRequest) ProtoMessage() {} func (x *ListValuedResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2616,11 +2550,9 @@ type ListValuedResourcesResponse struct { func (x *ListValuedResourcesResponse) Reset() { *x = ListValuedResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListValuedResourcesResponse) String() string { @@ -2631,7 +2563,7 @@ func (*ListValuedResourcesResponse) ProtoMessage() {} func (x *ListValuedResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2698,11 +2630,9 @@ type ListAttackPathsRequest struct { func (x *ListAttackPathsRequest) Reset() { *x = ListAttackPathsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttackPathsRequest) String() string { @@ -2713,7 +2643,7 @@ func (*ListAttackPathsRequest) ProtoMessage() {} func (x *ListAttackPathsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2772,11 +2702,9 @@ type ListAttackPathsResponse struct { func (x *ListAttackPathsResponse) Reset() { *x = ListAttackPathsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttackPathsResponse) String() string { @@ -2787,7 +2715,7 @@ func (*ListAttackPathsResponse) ProtoMessage() {} func (x *ListAttackPathsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2834,11 +2762,9 @@ type GetSimulationRequest struct { func (x *GetSimulationRequest) Reset() { *x = GetSimulationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSimulationRequest) String() string { @@ -2849,7 +2775,7 @@ func (*GetSimulationRequest) ProtoMessage() {} func (x *GetSimulationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2886,11 +2812,9 @@ type GetValuedResourceRequest struct { func (x *GetValuedResourceRequest) Reset() { *x = GetValuedResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetValuedResourceRequest) String() string { @@ -2901,7 +2825,7 @@ func (*GetValuedResourceRequest) ProtoMessage() {} func (x *GetValuedResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2949,11 +2873,9 @@ type ListMuteConfigsRequest struct { func (x *ListMuteConfigsRequest) Reset() { *x = ListMuteConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMuteConfigsRequest) String() string { @@ -2964,7 +2886,7 @@ func (*ListMuteConfigsRequest) ProtoMessage() {} func (x *ListMuteConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3015,11 +2937,9 @@ type ListMuteConfigsResponse struct { func (x *ListMuteConfigsResponse) Reset() { *x = ListMuteConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMuteConfigsResponse) String() string { @@ -3030,7 +2950,7 @@ func (*ListMuteConfigsResponse) ProtoMessage() {} func (x *ListMuteConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3080,11 +3000,9 @@ type ListNotificationConfigsRequest struct { func (x *ListNotificationConfigsRequest) Reset() { *x = ListNotificationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsRequest) String() string { @@ -3095,7 +3013,7 @@ func (*ListNotificationConfigsRequest) ProtoMessage() {} func (x *ListNotificationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3146,11 +3064,9 @@ type ListNotificationConfigsResponse struct { func (x *ListNotificationConfigsResponse) Reset() { *x = ListNotificationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsResponse) String() string { @@ -3161,7 +3077,7 @@ func (*ListNotificationConfigsResponse) ProtoMessage() {} func (x *ListNotificationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3211,11 +3127,9 @@ type ListEffectiveSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListEffectiveSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -3226,7 +3140,7 @@ func (*ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3278,11 +3192,9 @@ type ListEffectiveSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -3293,7 +3205,7 @@ func (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage() func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3342,11 +3254,9 @@ type ListSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -3357,7 +3267,7 @@ func (*ListSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() {} func (x *ListSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3408,11 +3318,9 @@ type ListSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -3423,7 +3331,7 @@ func (*ListSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage() {} func (x *ListSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3473,11 +3381,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -3488,7 +3394,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3539,11 +3445,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -3554,7 +3458,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3725,11 +3629,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -3740,7 +3642,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3830,11 +3732,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -3845,7 +3745,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4033,11 +3933,9 @@ type ListFindingsRequest struct { func (x *ListFindingsRequest) Reset() { *x = ListFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsRequest) String() string { @@ -4048,7 +3946,7 @@ func (*ListFindingsRequest) ProtoMessage() {} func (x *ListFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4138,11 +4036,9 @@ type ListFindingsResponse struct { func (x *ListFindingsResponse) Reset() { *x = ListFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse) String() string { @@ -4153,7 +4049,7 @@ func (*ListFindingsResponse) ProtoMessage() {} func (x *ListFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4217,11 +4113,9 @@ type SetFindingStateRequest struct { func (x *SetFindingStateRequest) Reset() { *x = SetFindingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetFindingStateRequest) String() string { @@ -4232,7 +4126,7 @@ func (*SetFindingStateRequest) ProtoMessage() {} func (x *SetFindingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4287,11 +4181,9 @@ type SetMuteRequest struct { func (x *SetMuteRequest) Reset() { *x = SetMuteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMuteRequest) String() string { @@ -4302,7 +4194,7 @@ func (*SetMuteRequest) ProtoMessage() {} func (x *SetMuteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4344,11 +4236,9 @@ type RunAssetDiscoveryRequest struct { func (x *RunAssetDiscoveryRequest) Reset() { *x = RunAssetDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryRequest) String() string { @@ -4359,7 +4249,7 @@ func (*RunAssetDiscoveryRequest) ProtoMessage() {} func (x *RunAssetDiscoveryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4402,11 +4292,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -4417,7 +4305,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4466,11 +4354,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleResponse struct { func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) String() string { @@ -4481,7 +4367,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleResponse) ProtoMessage() {} func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4519,11 +4405,9 @@ type UpdateExternalSystemRequest struct { func (x *UpdateExternalSystemRequest) Reset() { *x = UpdateExternalSystemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExternalSystemRequest) String() string { @@ -4534,7 +4418,7 @@ func (*UpdateExternalSystemRequest) ProtoMessage() {} func (x *UpdateExternalSystemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4588,11 +4472,9 @@ type UpdateFindingRequest struct { func (x *UpdateFindingRequest) Reset() { *x = UpdateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFindingRequest) String() string { @@ -4603,7 +4485,7 @@ func (*UpdateFindingRequest) ProtoMessage() {} func (x *UpdateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4647,11 +4529,9 @@ type UpdateMuteConfigRequest struct { func (x *UpdateMuteConfigRequest) Reset() { *x = UpdateMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMuteConfigRequest) String() string { @@ -4662,7 +4542,7 @@ func (*UpdateMuteConfigRequest) ProtoMessage() {} func (x *UpdateMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4707,11 +4587,9 @@ type UpdateNotificationConfigRequest struct { func (x *UpdateNotificationConfigRequest) Reset() { *x = UpdateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotificationConfigRequest) String() string { @@ -4722,7 +4600,7 @@ func (*UpdateNotificationConfigRequest) ProtoMessage() {} func (x *UpdateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4767,11 +4645,9 @@ type UpdateOrganizationSettingsRequest struct { func (x *UpdateOrganizationSettingsRequest) Reset() { *x = UpdateOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOrganizationSettingsRequest) String() string { @@ -4782,7 +4658,7 @@ func (*UpdateOrganizationSettingsRequest) ProtoMessage() {} func (x *UpdateOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4827,11 +4703,9 @@ type UpdateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = UpdateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -4842,7 +4716,7 @@ func (*UpdateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4887,11 +4761,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -4902,7 +4774,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4954,11 +4826,9 @@ type UpdateSecurityMarksRequest struct { func (x *UpdateSecurityMarksRequest) Reset() { *x = UpdateSecurityMarksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityMarksRequest) String() string { @@ -4969,7 +4839,7 @@ func (*UpdateSecurityMarksRequest) ProtoMessage() {} func (x *UpdateSecurityMarksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5026,11 +4896,9 @@ type CreateBigQueryExportRequest struct { func (x *CreateBigQueryExportRequest) Reset() { *x = CreateBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBigQueryExportRequest) String() string { @@ -5041,7 +4909,7 @@ func (*CreateBigQueryExportRequest) ProtoMessage() {} func (x *CreateBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5092,11 +4960,9 @@ type UpdateBigQueryExportRequest struct { func (x *UpdateBigQueryExportRequest) Reset() { *x = UpdateBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBigQueryExportRequest) String() string { @@ -5107,7 +4973,7 @@ func (*UpdateBigQueryExportRequest) ProtoMessage() {} func (x *UpdateBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5161,11 +5027,9 @@ type ListBigQueryExportsRequest struct { func (x *ListBigQueryExportsRequest) Reset() { *x = ListBigQueryExportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryExportsRequest) String() string { @@ -5176,7 +5040,7 @@ func (*ListBigQueryExportsRequest) ProtoMessage() {} func (x *ListBigQueryExportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5227,11 +5091,9 @@ type ListBigQueryExportsResponse struct { func (x *ListBigQueryExportsResponse) Reset() { *x = ListBigQueryExportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryExportsResponse) String() string { @@ -5242,7 +5104,7 @@ func (*ListBigQueryExportsResponse) ProtoMessage() {} func (x *ListBigQueryExportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5286,11 +5148,9 @@ type DeleteBigQueryExportRequest struct { func (x *DeleteBigQueryExportRequest) Reset() { *x = DeleteBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBigQueryExportRequest) String() string { @@ -5301,7 +5161,7 @@ func (*DeleteBigQueryExportRequest) ProtoMessage() {} func (x *DeleteBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5345,11 +5205,9 @@ type CreateEventThreatDetectionCustomModuleRequest struct { func (x *CreateEventThreatDetectionCustomModuleRequest) Reset() { *x = CreateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventThreatDetectionCustomModuleRequest) String() string { @@ -5360,7 +5218,7 @@ func (*CreateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *CreateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5412,11 +5270,9 @@ type ValidateEventThreatDetectionCustomModuleRequest struct { func (x *ValidateEventThreatDetectionCustomModuleRequest) Reset() { *x = ValidateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleRequest) String() string { @@ -5427,7 +5283,7 @@ func (*ValidateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *ValidateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5476,11 +5332,9 @@ type ValidateEventThreatDetectionCustomModuleResponse struct { func (x *ValidateEventThreatDetectionCustomModuleResponse) Reset() { *x = ValidateEventThreatDetectionCustomModuleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleResponse) String() string { @@ -5491,7 +5345,7 @@ func (*ValidateEventThreatDetectionCustomModuleResponse) ProtoMessage() {} func (x *ValidateEventThreatDetectionCustomModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5531,11 +5385,9 @@ type DeleteEventThreatDetectionCustomModuleRequest struct { func (x *DeleteEventThreatDetectionCustomModuleRequest) Reset() { *x = DeleteEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventThreatDetectionCustomModuleRequest) String() string { @@ -5546,7 +5398,7 @@ func (*DeleteEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *DeleteEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5586,11 +5438,9 @@ type GetEventThreatDetectionCustomModuleRequest struct { func (x *GetEventThreatDetectionCustomModuleRequest) Reset() { *x = GetEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventThreatDetectionCustomModuleRequest) String() string { @@ -5601,7 +5451,7 @@ func (*GetEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *GetEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5655,11 +5505,9 @@ type ListDescendantEventThreatDetectionCustomModulesRequest struct { func (x *ListDescendantEventThreatDetectionCustomModulesRequest) Reset() { *x = ListDescendantEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantEventThreatDetectionCustomModulesRequest) String() string { @@ -5670,7 +5518,7 @@ func (*ListDescendantEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListDescendantEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5722,11 +5570,9 @@ type ListDescendantEventThreatDetectionCustomModulesResponse struct { func (x *ListDescendantEventThreatDetectionCustomModulesResponse) Reset() { *x = ListDescendantEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantEventThreatDetectionCustomModulesResponse) String() string { @@ -5737,7 +5583,7 @@ func (*ListDescendantEventThreatDetectionCustomModulesResponse) ProtoMessage() { func (x *ListDescendantEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5797,11 +5643,9 @@ type ListEventThreatDetectionCustomModulesRequest struct { func (x *ListEventThreatDetectionCustomModulesRequest) Reset() { *x = ListEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventThreatDetectionCustomModulesRequest) String() string { @@ -5812,7 +5656,7 @@ func (*ListEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5863,11 +5707,9 @@ type ListEventThreatDetectionCustomModulesResponse struct { func (x *ListEventThreatDetectionCustomModulesResponse) Reset() { *x = ListEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventThreatDetectionCustomModulesResponse) String() string { @@ -5878,7 +5720,7 @@ func (*ListEventThreatDetectionCustomModulesResponse) ProtoMessage() {} func (x *ListEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5922,11 +5764,9 @@ type UpdateEventThreatDetectionCustomModuleRequest struct { func (x *UpdateEventThreatDetectionCustomModuleRequest) Reset() { *x = UpdateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventThreatDetectionCustomModuleRequest) String() string { @@ -5937,7 +5777,7 @@ func (*UpdateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *UpdateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5985,11 +5825,9 @@ type GetEffectiveEventThreatDetectionCustomModuleRequest struct { func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) Reset() { *x = GetEffectiveEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) String() string { @@ -6000,7 +5838,7 @@ func (*GetEffectiveEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6053,11 +5891,9 @@ type ListEffectiveEventThreatDetectionCustomModulesRequest struct { func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) Reset() { *x = ListEffectiveEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) String() string { @@ -6068,7 +5904,7 @@ func (*ListEffectiveEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6119,11 +5955,9 @@ type ListEffectiveEventThreatDetectionCustomModulesResponse struct { func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) Reset() { *x = ListEffectiveEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) String() string { @@ -6134,7 +5968,7 @@ func (*ListEffectiveEventThreatDetectionCustomModulesResponse) ProtoMessage() {} func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6177,11 +6011,9 @@ type ListAssetsResponse_ListAssetsResult struct { func (x *ListAssetsResponse_ListAssetsResult) Reset() { *x = ListAssetsResponse_ListAssetsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse_ListAssetsResult) String() string { @@ -6192,7 +6024,7 @@ func (*ListAssetsResponse_ListAssetsResult) ProtoMessage() {} func (x *ListAssetsResponse_ListAssetsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6237,11 +6069,9 @@ type ListFindingsResponse_ListFindingsResult struct { func (x *ListFindingsResponse_ListFindingsResult) Reset() { *x = ListFindingsResponse_ListFindingsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult) String() string { @@ -6252,7 +6082,7 @@ func (*ListFindingsResponse_ListFindingsResult) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6344,11 +6174,9 @@ type ListFindingsResponse_ListFindingsResult_Resource struct { func (x *ListFindingsResponse_ListFindingsResult_Resource) Reset() { *x = ListFindingsResponse_ListFindingsResult_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult_Resource) String() string { @@ -6359,7 +6187,7 @@ func (*ListFindingsResponse_ListFindingsResult_Resource) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6533,11 +6361,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource struct func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) String() string { @@ -6548,7 +6374,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) Pro func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6600,11 +6426,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult struct func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) String() string { @@ -6615,7 +6439,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) Prot func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9822,1064 +9646,6 @@ func file_google_cloud_securitycenter_v1_securitycenter_service_proto_init() { file_google_cloud_securitycenter_v1_simulation_proto_init() file_google_cloud_securitycenter_v1_source_proto_init() file_google_cloud_securitycenter_v1_valued_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BulkMuteFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BulkMuteFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateResourceValueConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateResourceValueConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListResourceValueConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListResourceValueConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GroupResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListValuedResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListValuedResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListAttackPathsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListAttackPathsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetSimulationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GetValuedResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListMuteConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListMuteConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*SetFindingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*SetMuteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExternalSystemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityMarksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*CreateBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryExportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryExportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*GetEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*ListEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*ListEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse_ListAssetsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1_securitycenter_service_proto_msgTypes[86].OneofWrappers = []any{ (*ListFindingsResponse_ListFindingsResult_Resource_AwsMetadata)(nil), (*ListFindingsResponse_ListFindingsResult_Resource_AzureMetadata)(nil), diff --git a/securitycenter/apiv1/securitycenterpb/simulation.pb.go b/securitycenter/apiv1/securitycenterpb/simulation.pb.go index 00304d0cb890..7fde67874321 100755 --- a/securitycenter/apiv1/securitycenterpb/simulation.pb.go +++ b/securitycenter/apiv1/securitycenterpb/simulation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/simulation.proto @@ -57,11 +57,9 @@ type Simulation struct { func (x *Simulation) Reset() { *x = Simulation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_simulation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_simulation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Simulation) String() string { @@ -72,7 +70,7 @@ func (*Simulation) ProtoMessage() {} func (x *Simulation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_simulation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,20 +216,6 @@ func file_google_cloud_securitycenter_v1_simulation_proto_init() { } file_google_cloud_securitycenter_v1_resource_proto_init() file_google_cloud_securitycenter_v1_valued_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_simulation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Simulation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/source.pb.go b/securitycenter/apiv1/securitycenterpb/source.pb.go index 3b7c8ba566f1..46327e5c71e0 100755 --- a/securitycenter/apiv1/securitycenterpb/source.pb.go +++ b/securitycenter/apiv1/securitycenterpb/source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/source.proto @@ -75,11 +75,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -90,7 +88,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,20 +205,6 @@ func file_google_cloud_securitycenter_v1_source_proto_init() { if File_google_cloud_securitycenter_v1_source_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/toxic_combination.pb.go b/securitycenter/apiv1/securitycenterpb/toxic_combination.pb.go index 7d402a9461d5..3fcb67db3e3d 100755 --- a/securitycenter/apiv1/securitycenterpb/toxic_combination.pb.go +++ b/securitycenter/apiv1/securitycenterpb/toxic_combination.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/toxic_combination.proto @@ -56,11 +56,9 @@ type ToxicCombination struct { func (x *ToxicCombination) Reset() { *x = ToxicCombination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_toxic_combination_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_toxic_combination_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToxicCombination) String() string { @@ -71,7 +69,7 @@ func (*ToxicCombination) ProtoMessage() {} func (x *ToxicCombination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_toxic_combination_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,20 +161,6 @@ func file_google_cloud_securitycenter_v1_toxic_combination_proto_init() { if File_google_cloud_securitycenter_v1_toxic_combination_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_toxic_combination_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ToxicCombination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/valued_resource.pb.go b/securitycenter/apiv1/securitycenterpb/valued_resource.pb.go index 8f20ae1f1c80..abed058d4701 100755 --- a/securitycenter/apiv1/securitycenterpb/valued_resource.pb.go +++ b/securitycenter/apiv1/securitycenterpb/valued_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/valued_resource.proto @@ -127,11 +127,9 @@ type ValuedResource struct { func (x *ValuedResource) Reset() { *x = ValuedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValuedResource) String() string { @@ -142,7 +140,7 @@ func (*ValuedResource) ProtoMessage() {} func (x *ValuedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type ResourceValueConfigMetadata struct { func (x *ResourceValueConfigMetadata) Reset() { *x = ResourceValueConfigMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfigMetadata) String() string { @@ -233,7 +229,7 @@ func (*ResourceValueConfigMetadata) ProtoMessage() {} func (x *ResourceValueConfigMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,32 +360,6 @@ func file_google_cloud_securitycenter_v1_valued_resource_proto_init() { if File_google_cloud_securitycenter_v1_valued_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValuedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_valued_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfigMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1/securitycenterpb/vulnerability.pb.go b/securitycenter/apiv1/securitycenterpb/vulnerability.pb.go index 2ffa66682516..894cb87265dd 100755 --- a/securitycenter/apiv1/securitycenterpb/vulnerability.pb.go +++ b/securitycenter/apiv1/securitycenterpb/vulnerability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1/vulnerability.proto @@ -551,11 +551,9 @@ type Vulnerability struct { func (x *Vulnerability) Reset() { *x = Vulnerability{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vulnerability) String() string { @@ -566,7 +564,7 @@ func (*Vulnerability) ProtoMessage() {} func (x *Vulnerability) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +641,9 @@ type Cve struct { func (x *Cve) Reset() { *x = Cve{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cve) String() string { @@ -658,7 +654,7 @@ func (*Cve) ProtoMessage() {} func (x *Cve) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +747,9 @@ type Reference struct { func (x *Reference) Reset() { *x = Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reference) String() string { @@ -766,7 +760,7 @@ func (*Reference) ProtoMessage() {} func (x *Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +830,9 @@ type Cvssv3 struct { func (x *Cvssv3) Reset() { *x = Cvssv3{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cvssv3) String() string { @@ -851,7 +843,7 @@ func (*Cvssv3) ProtoMessage() {} func (x *Cvssv3) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +939,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -962,7 +952,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,11 +1012,9 @@ type SecurityBulletin struct { func (x *SecurityBulletin) Reset() { *x = SecurityBulletin{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityBulletin) String() string { @@ -1037,7 +1025,7 @@ func (*SecurityBulletin) ProtoMessage() {} func (x *SecurityBulletin) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,80 +1337,6 @@ func file_google_cloud_securitycenter_v1_vulnerability_proto_init() { if File_google_cloud_securitycenter_v1_vulnerability_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vulnerability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Cve); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cvssv3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1_vulnerability_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SecurityBulletin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/helpers.go b/securitycenter/apiv1beta1/helpers.go index 4e919bd493b5..1825692c16a3 100755 --- a/securitycenter/apiv1beta1/helpers.go +++ b/securitycenter/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package securitycenter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycenter/apiv1beta1/security_center_client.go b/securitycenter/apiv1beta1/security_center_client.go index 04824f38c261..de0ce0067511 100755 --- a/securitycenter/apiv1beta1/security_center_client.go +++ b/securitycenter/apiv1beta1/security_center_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securitycenterpb "cloud.google.com/go/securitycenter/apiv1beta1/securitycenterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -569,6 +568,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security center client based on gRPC. @@ -595,6 +596,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securitycenterpb.NewSecurityCenterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -657,6 +659,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security center rest client. @@ -674,6 +678,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -736,7 +741,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -754,7 +759,7 @@ func (c *gRPCClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFinding, req, settings.GRPC, c.logger, "CreateFinding") return err }, opts...) if err != nil { @@ -772,7 +777,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -790,7 +795,7 @@ func (c *gRPCClient) GetOrganizationSettings(ctx context.Context, req *securityc var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrganizationSettings, req, settings.GRPC, c.logger, "GetOrganizationSettings") return err }, opts...) if err != nil { @@ -808,7 +813,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -837,7 +842,7 @@ func (c *gRPCClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupAssets, req, settings.GRPC, c.logger, "GroupAssets") return err }, opts...) if err != nil { @@ -883,7 +888,7 @@ func (c *gRPCClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupFindings, req, settings.GRPC, c.logger, "GroupFindings") return err }, opts...) if err != nil { @@ -929,7 +934,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -975,7 +980,7 @@ func (c *gRPCClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindings, req, settings.GRPC, c.logger, "ListFindings") return err }, opts...) if err != nil { @@ -1021,7 +1026,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *securitycenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *gRPCClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunAssetDiscovery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunAssetDiscovery, req, settings.GRPC, c.logger, "RunAssetDiscovery") return err }, opts...) if err != nil { @@ -1076,7 +1081,7 @@ func (c *gRPCClient) SetFindingState(ctx context.Context, req *securitycenterpb. var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetFindingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetFindingState, req, settings.GRPC, c.logger, "SetFindingState") return err }, opts...) if err != nil { @@ -1094,7 +1099,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1112,7 +1117,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1130,7 +1135,7 @@ func (c *gRPCClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFinding, req, settings.GRPC, c.logger, "UpdateFinding") return err }, opts...) if err != nil { @@ -1148,7 +1153,7 @@ func (c *gRPCClient) UpdateOrganizationSettings(ctx context.Context, req *securi var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateOrganizationSettings, req, settings.GRPC, c.logger, "UpdateOrganizationSettings") return err }, opts...) if err != nil { @@ -1166,7 +1171,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -1184,7 +1189,7 @@ func (c *gRPCClient) UpdateSecurityMarks(ctx context.Context, req *securitycente var resp *securitycenterpb.SecurityMarks err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityMarks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityMarks, req, settings.GRPC, c.logger, "UpdateSecurityMarks") return err }, opts...) if err != nil { @@ -1233,17 +1238,7 @@ func (c *restClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } @@ -1302,17 +1297,7 @@ func (c *restClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFinding") if err != nil { return err } @@ -1368,17 +1353,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1428,17 +1403,7 @@ func (c *restClient) GetOrganizationSettings(ctx context.Context, req *securityc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganizationSettings") if err != nil { return err } @@ -1488,17 +1453,7 @@ func (c *restClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -1561,21 +1516,10 @@ func (c *restClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1654,21 +1598,10 @@ func (c *restClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1770,21 +1703,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1882,21 +1804,10 @@ func (c *restClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1971,21 +1882,10 @@ func (c *restClient) ListSources(ctx context.Context, req *securitycenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2058,21 +1958,10 @@ func (c *restClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunAssetDiscovery") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2129,17 +2018,7 @@ func (c *restClient) SetFindingState(ctx context.Context, req *securitycenterpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetFindingState") if err != nil { return err } @@ -2195,17 +2074,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2261,17 +2130,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2336,17 +2195,7 @@ func (c *restClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFinding") if err != nil { return err } @@ -2410,17 +2259,7 @@ func (c *restClient) UpdateOrganizationSettings(ctx context.Context, req *securi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOrganizationSettings") if err != nil { return err } @@ -2484,17 +2323,7 @@ func (c *restClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } @@ -2565,17 +2394,7 @@ func (c *restClient) UpdateSecurityMarks(ctx context.Context, req *securitycente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityMarks") if err != nil { return err } diff --git a/securitycenter/apiv1beta1/security_center_client_example_go123_test.go b/securitycenter/apiv1beta1/security_center_client_example_go123_test.go index 71942a8787a2..09d23c55421e 100644 --- a/securitycenter/apiv1beta1/security_center_client_example_go123_test.go +++ b/securitycenter/apiv1beta1/security_center_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_GroupAssets_all() { } for resp, err := range c.GroupAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_GroupFindings_all() { } for resp, err := range c.GroupFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListFindings_all() { } for resp, err := range c.ListFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycenter/apiv1beta1/securitycenterpb/asset.pb.go b/securitycenter/apiv1beta1/securitycenterpb/asset.pb.go index 47c46866160c..4d03d60466b6 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/asset.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/asset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/asset.proto @@ -73,11 +73,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -88,7 +86,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type Asset_SecurityCenterProperties struct { func (x *Asset_SecurityCenterProperties) Reset() { *x = Asset_SecurityCenterProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_SecurityCenterProperties) String() string { @@ -188,7 +184,7 @@ func (*Asset_SecurityCenterProperties) ProtoMessage() {} func (x *Asset_SecurityCenterProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,32 +362,6 @@ func file_google_cloud_securitycenter_v1beta1_asset_proto_init() { return } file_google_cloud_securitycenter_v1beta1_security_marks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_asset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Asset_SecurityCenterProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/finding.pb.go b/securitycenter/apiv1beta1/securitycenterpb/finding.pb.go index bf4b541e0e4e..c9b8cf2471a4 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/finding.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/finding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/finding.proto @@ -153,11 +153,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_finding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_finding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -168,7 +166,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_finding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,20 +375,6 @@ func file_google_cloud_securitycenter_v1beta1_finding_proto_init() { return } file_google_cloud_securitycenter_v1beta1_security_marks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_finding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/organization_settings.pb.go b/securitycenter/apiv1beta1/securitycenterpb/organization_settings.pb.go index f4103a002a2d..5bde51f1cdbe 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/organization_settings.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/organization_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/organization_settings.proto @@ -122,11 +122,9 @@ type OrganizationSettings struct { func (x *OrganizationSettings) Reset() { *x = OrganizationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings) String() string { @@ -137,7 +135,7 @@ func (*OrganizationSettings) ProtoMessage() {} func (x *OrganizationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,11 +185,9 @@ type OrganizationSettings_AssetDiscoveryConfig struct { func (x *OrganizationSettings_AssetDiscoveryConfig) Reset() { *x = OrganizationSettings_AssetDiscoveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings_AssetDiscoveryConfig) String() string { @@ -202,7 +198,7 @@ func (*OrganizationSettings_AssetDiscoveryConfig) ProtoMessage() {} func (x *OrganizationSettings_AssetDiscoveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -325,32 +321,6 @@ func file_google_cloud_securitycenter_v1beta1_organization_settings_proto_init() if File_google_cloud_securitycenter_v1beta1_organization_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_organization_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings_AssetDiscoveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/run_asset_discovery_response.pb.go b/securitycenter/apiv1beta1/securitycenterpb/run_asset_discovery_response.pb.go index 54421d520359..b8df37a3afce 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/run_asset_discovery_response.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/run_asset_discovery_response.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/run_asset_discovery_response.proto @@ -108,11 +108,9 @@ type RunAssetDiscoveryResponse struct { func (x *RunAssetDiscoveryResponse) Reset() { *x = RunAssetDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryResponse) String() string { @@ -123,7 +121,7 @@ func (*RunAssetDiscoveryResponse) ProtoMessage() {} func (x *RunAssetDiscoveryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,20 +223,6 @@ func file_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto if File_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_run_asset_discovery_response_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/security_marks.pb.go b/securitycenter/apiv1beta1/securitycenterpb/security_marks.pb.go index 54936ad56b2a..06b1215e6f58 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/security_marks.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/security_marks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/security_marks.proto @@ -64,11 +64,9 @@ type SecurityMarks struct { func (x *SecurityMarks) Reset() { *x = SecurityMarks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_security_marks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_security_marks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityMarks) String() string { @@ -79,7 +77,7 @@ func (*SecurityMarks) ProtoMessage() {} func (x *SecurityMarks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_security_marks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,20 +182,6 @@ func file_google_cloud_securitycenter_v1beta1_security_marks_proto_init() { if File_google_cloud_securitycenter_v1beta1_security_marks_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_security_marks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityMarks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/securitycenter_service.pb.go b/securitycenter/apiv1beta1/securitycenterpb/securitycenter_service.pb.go index cadb2529fb31..b759f06effaf 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/securitycenter_service.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/securitycenter_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/securitycenter_service.proto @@ -132,11 +132,9 @@ type CreateFindingRequest struct { func (x *CreateFindingRequest) Reset() { *x = CreateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFindingRequest) String() string { @@ -147,7 +145,7 @@ func (*CreateFindingRequest) ProtoMessage() {} func (x *CreateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,11 +197,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -214,7 +210,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +252,9 @@ type GetOrganizationSettingsRequest struct { func (x *GetOrganizationSettingsRequest) Reset() { *x = GetOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationSettingsRequest) String() string { @@ -271,7 +265,7 @@ func (*GetOrganizationSettingsRequest) ProtoMessage() {} func (x *GetOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -321,7 +313,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type GroupAssetsRequest struct { func (x *GroupAssetsRequest) Reset() { *x = GroupAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsRequest) String() string { @@ -448,7 +438,7 @@ func (*GroupAssetsRequest) ProtoMessage() {} func (x *GroupAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +521,9 @@ type GroupAssetsResponse struct { func (x *GroupAssetsResponse) Reset() { *x = GroupAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsResponse) String() string { @@ -546,7 +534,7 @@ func (*GroupAssetsResponse) ProtoMessage() {} func (x *GroupAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +635,9 @@ type GroupFindingsRequest struct { func (x *GroupFindingsRequest) Reset() { *x = GroupFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsRequest) String() string { @@ -662,7 +648,7 @@ func (*GroupFindingsRequest) ProtoMessage() {} func (x *GroupFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +724,9 @@ type GroupFindingsResponse struct { func (x *GroupFindingsResponse) Reset() { *x = GroupFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsResponse) String() string { @@ -753,7 +737,7 @@ func (*GroupFindingsResponse) ProtoMessage() {} func (x *GroupFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -803,11 +787,9 @@ type GroupResult struct { func (x *GroupResult) Reset() { *x = GroupResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupResult) String() string { @@ -818,7 +800,7 @@ func (*GroupResult) ProtoMessage() {} func (x *GroupResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,11 +849,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -882,7 +862,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +913,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -948,7 +926,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1045,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -1082,7 +1058,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1172,11 +1148,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -1187,7 +1161,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,11 +1269,9 @@ type ListFindingsRequest struct { func (x *ListFindingsRequest) Reset() { *x = ListFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsRequest) String() string { @@ -1310,7 +1282,7 @@ func (*ListFindingsRequest) ProtoMessage() {} func (x *ListFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1393,11 +1365,9 @@ type ListFindingsResponse struct { func (x *ListFindingsResponse) Reset() { *x = ListFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse) String() string { @@ -1408,7 +1378,7 @@ func (*ListFindingsResponse) ProtoMessage() {} func (x *ListFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,11 +1440,9 @@ type SetFindingStateRequest struct { func (x *SetFindingStateRequest) Reset() { *x = SetFindingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetFindingStateRequest) String() string { @@ -1485,7 +1453,7 @@ func (*SetFindingStateRequest) ProtoMessage() {} func (x *SetFindingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1502,9 @@ type RunAssetDiscoveryRequest struct { func (x *RunAssetDiscoveryRequest) Reset() { *x = RunAssetDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryRequest) String() string { @@ -1549,7 +1515,7 @@ func (*RunAssetDiscoveryRequest) ProtoMessage() {} func (x *RunAssetDiscoveryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1591,11 +1557,9 @@ type UpdateFindingRequest struct { func (x *UpdateFindingRequest) Reset() { *x = UpdateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFindingRequest) String() string { @@ -1606,7 +1570,7 @@ func (*UpdateFindingRequest) ProtoMessage() {} func (x *UpdateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1649,11 +1613,9 @@ type UpdateOrganizationSettingsRequest struct { func (x *UpdateOrganizationSettingsRequest) Reset() { *x = UpdateOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOrganizationSettingsRequest) String() string { @@ -1664,7 +1626,7 @@ func (*UpdateOrganizationSettingsRequest) ProtoMessage() {} func (x *UpdateOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1707,11 +1669,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -1722,7 +1682,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1767,11 +1727,9 @@ type UpdateSecurityMarksRequest struct { func (x *UpdateSecurityMarksRequest) Reset() { *x = UpdateSecurityMarksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityMarksRequest) String() string { @@ -1782,7 +1740,7 @@ func (*UpdateSecurityMarksRequest) ProtoMessage() {} func (x *UpdateSecurityMarksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1832,11 +1790,9 @@ type ListAssetsResponse_ListAssetsResult struct { func (x *ListAssetsResponse_ListAssetsResult) Reset() { *x = ListAssetsResponse_ListAssetsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse_ListAssetsResult) String() string { @@ -1847,7 +1803,7 @@ func (*ListAssetsResponse_ListAssetsResult) ProtoMessage() {} func (x *ListAssetsResponse_ListAssetsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2625,272 +2581,6 @@ func file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_init( file_google_cloud_securitycenter_v1beta1_organization_settings_proto_init() file_google_cloud_securitycenter_v1beta1_security_marks_proto_init() file_google_cloud_securitycenter_v1beta1_source_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GroupResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SetFindingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityMarksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1beta1_securitycenter_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse_ListAssetsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1beta1/securitycenterpb/source.pb.go b/securitycenter/apiv1beta1/securitycenterpb/source.pb.go index 3cce0901d4f1..857172acf310 100755 --- a/securitycenter/apiv1beta1/securitycenterpb/source.pb.go +++ b/securitycenter/apiv1beta1/securitycenterpb/source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1beta1/source.proto @@ -67,11 +67,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1beta1_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1beta1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -82,7 +80,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1beta1_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,20 +178,6 @@ func file_google_cloud_securitycenter_v1beta1_source_proto_init() { if File_google_cloud_securitycenter_v1beta1_source_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1beta1_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/helpers.go b/securitycenter/apiv1p1beta1/helpers.go index 4e919bd493b5..1825692c16a3 100755 --- a/securitycenter/apiv1p1beta1/helpers.go +++ b/securitycenter/apiv1p1beta1/helpers.go @@ -18,10 +18,20 @@ package securitycenter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycenter/apiv1p1beta1/security_center_client.go b/securitycenter/apiv1p1beta1/security_center_client.go index e5c19bd35217..76217c5801a4 100755 --- a/securitycenter/apiv1p1beta1/security_center_client.go +++ b/securitycenter/apiv1p1beta1/security_center_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securitycenterpb "cloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -675,6 +674,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security center client based on gRPC. @@ -701,6 +702,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securitycenterpb.NewSecurityCenterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -763,6 +765,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security center rest client. @@ -780,6 +784,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -842,7 +847,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -860,7 +865,7 @@ func (c *gRPCClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFinding, req, settings.GRPC, c.logger, "CreateFinding") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *gRPCClient) CreateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNotificationConfig, req, settings.GRPC, c.logger, "CreateNotificationConfig") return err }, opts...) if err != nil { @@ -895,7 +900,7 @@ func (c *gRPCClient) DeleteNotificationConfig(ctx context.Context, req *security opts = append((*c.CallOptions).DeleteNotificationConfig[0:len((*c.CallOptions).DeleteNotificationConfig):len((*c.CallOptions).DeleteNotificationConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteNotificationConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteNotificationConfig, req, settings.GRPC, c.logger, "DeleteNotificationConfig") return err }, opts...) return err @@ -910,7 +915,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -928,7 +933,7 @@ func (c *gRPCClient) GetNotificationConfig(ctx context.Context, req *securitycen var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNotificationConfig, req, settings.GRPC, c.logger, "GetNotificationConfig") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) GetOrganizationSettings(ctx context.Context, req *securityc var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrganizationSettings, req, settings.GRPC, c.logger, "GetOrganizationSettings") return err }, opts...) if err != nil { @@ -964,7 +969,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -993,7 +998,7 @@ func (c *gRPCClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupAssets, req, settings.GRPC, c.logger, "GroupAssets") return err }, opts...) if err != nil { @@ -1039,7 +1044,7 @@ func (c *gRPCClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupFindings, req, settings.GRPC, c.logger, "GroupFindings") return err }, opts...) if err != nil { @@ -1085,7 +1090,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1131,7 +1136,7 @@ func (c *gRPCClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindings, req, settings.GRPC, c.logger, "ListFindings") return err }, opts...) if err != nil { @@ -1177,7 +1182,7 @@ func (c *gRPCClient) ListNotificationConfigs(ctx context.Context, req *securityc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNotificationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNotificationConfigs, req, settings.GRPC, c.logger, "ListNotificationConfigs") return err }, opts...) if err != nil { @@ -1223,7 +1228,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *securitycenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -1258,7 +1263,7 @@ func (c *gRPCClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunAssetDiscovery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunAssetDiscovery, req, settings.GRPC, c.logger, "RunAssetDiscovery") return err }, opts...) if err != nil { @@ -1278,7 +1283,7 @@ func (c *gRPCClient) SetFindingState(ctx context.Context, req *securitycenterpb. var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetFindingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetFindingState, req, settings.GRPC, c.logger, "SetFindingState") return err }, opts...) if err != nil { @@ -1296,7 +1301,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1314,7 +1319,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1332,7 +1337,7 @@ func (c *gRPCClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFinding, req, settings.GRPC, c.logger, "UpdateFinding") return err }, opts...) if err != nil { @@ -1350,7 +1355,7 @@ func (c *gRPCClient) UpdateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNotificationConfig, req, settings.GRPC, c.logger, "UpdateNotificationConfig") return err }, opts...) if err != nil { @@ -1368,7 +1373,7 @@ func (c *gRPCClient) UpdateOrganizationSettings(ctx context.Context, req *securi var resp *securitycenterpb.OrganizationSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateOrganizationSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateOrganizationSettings, req, settings.GRPC, c.logger, "UpdateOrganizationSettings") return err }, opts...) if err != nil { @@ -1386,7 +1391,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -1404,7 +1409,7 @@ func (c *gRPCClient) UpdateSecurityMarks(ctx context.Context, req *securitycente var resp *securitycenterpb.SecurityMarks err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityMarks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityMarks, req, settings.GRPC, c.logger, "UpdateSecurityMarks") return err }, opts...) if err != nil { @@ -1453,17 +1458,7 @@ func (c *restClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } @@ -1522,17 +1517,7 @@ func (c *restClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFinding") if err != nil { return err } @@ -1590,17 +1575,7 @@ func (c *restClient) CreateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotificationConfig") if err != nil { return err } @@ -1647,15 +1622,8 @@ func (c *restClient) DeleteNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotificationConfig") + return err }, opts...) } @@ -1698,17 +1666,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -1758,17 +1716,7 @@ func (c *restClient) GetNotificationConfig(ctx context.Context, req *securitycen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotificationConfig") if err != nil { return err } @@ -1818,17 +1766,7 @@ func (c *restClient) GetOrganizationSettings(ctx context.Context, req *securityc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganizationSettings") if err != nil { return err } @@ -1878,17 +1816,7 @@ func (c *restClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -1951,21 +1879,10 @@ func (c *restClient) GroupAssets(ctx context.Context, req *securitycenterpb.Grou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2046,21 +1963,10 @@ func (c *restClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2162,21 +2068,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *securitycenterpb.ListA } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2281,21 +2176,10 @@ func (c *restClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2370,21 +2254,10 @@ func (c *restClient) ListNotificationConfigs(ctx context.Context, req *securityc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotificationConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2459,21 +2332,10 @@ func (c *restClient) ListSources(ctx context.Context, req *securitycenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2546,21 +2408,10 @@ func (c *restClient) RunAssetDiscovery(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunAssetDiscovery") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2617,17 +2468,7 @@ func (c *restClient) SetFindingState(ctx context.Context, req *securitycenterpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetFindingState") if err != nil { return err } @@ -2683,17 +2524,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2749,17 +2580,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2824,17 +2645,7 @@ func (c *restClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFinding") if err != nil { return err } @@ -2899,17 +2710,7 @@ func (c *restClient) UpdateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNotificationConfig") if err != nil { return err } @@ -2973,17 +2774,7 @@ func (c *restClient) UpdateOrganizationSettings(ctx context.Context, req *securi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOrganizationSettings") if err != nil { return err } @@ -3047,17 +2838,7 @@ func (c *restClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } @@ -3128,17 +2909,7 @@ func (c *restClient) UpdateSecurityMarks(ctx context.Context, req *securitycente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityMarks") if err != nil { return err } diff --git a/securitycenter/apiv1p1beta1/security_center_client_example_go123_test.go b/securitycenter/apiv1p1beta1/security_center_client_example_go123_test.go index c55462a7b0b7..2e5a0a58951b 100644 --- a/securitycenter/apiv1p1beta1/security_center_client_example_go123_test.go +++ b/securitycenter/apiv1p1beta1/security_center_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_GroupAssets_all() { } for resp, err := range c.GroupAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_GroupFindings_all() { } for resp, err := range c.GroupFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListFindings_all() { } for resp, err := range c.ListFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleClient_ListNotificationConfigs_all() { } for resp, err := range c.ListNotificationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -174,7 +174,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/asset.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/asset.pb.go index 868f3cfc47cc..eb7ef34d4c57 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/asset.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/asset.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/asset.proto @@ -83,11 +83,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -98,7 +96,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type Asset_SecurityCenterProperties struct { func (x *Asset_SecurityCenterProperties) Reset() { *x = Asset_SecurityCenterProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_SecurityCenterProperties) String() string { @@ -222,7 +218,7 @@ func (*Asset_SecurityCenterProperties) ProtoMessage() {} func (x *Asset_SecurityCenterProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type Asset_IamPolicy struct { func (x *Asset_IamPolicy) Reset() { *x = Asset_IamPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_IamPolicy) String() string { @@ -332,7 +326,7 @@ func (*Asset_IamPolicy) ProtoMessage() {} func (x *Asset_IamPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,44 +522,6 @@ func file_google_cloud_securitycenter_v1p1beta1_asset_proto_init() { } file_google_cloud_securitycenter_v1p1beta1_folder_proto_init() file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Asset_SecurityCenterProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_asset_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Asset_IamPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/finding.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/finding.pb.go index f77263a5d167..e2e82dbcd289 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/finding.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/finding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/finding.proto @@ -225,11 +225,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_finding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_finding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -240,7 +238,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_finding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -494,20 +492,6 @@ func file_google_cloud_securitycenter_v1p1beta1_finding_proto_init() { return } file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_finding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/folder.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/folder.pb.go index cab5f62393c4..915afb5b0962 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/folder.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/folder.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/folder.proto @@ -51,11 +51,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_folder_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_folder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -66,7 +64,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_folder_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,20 +158,6 @@ func file_google_cloud_securitycenter_v1p1beta1_folder_proto_init() { if File_google_cloud_securitycenter_v1p1beta1_folder_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_folder_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/notification_config.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/notification_config.pb.go index 9265cb425015..590c3b8f0e54 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/notification_config.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/notification_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/notification_config.proto @@ -120,11 +120,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -135,7 +133,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +241,9 @@ type NotificationConfig_StreamingConfig struct { func (x *NotificationConfig_StreamingConfig) Reset() { *x = NotificationConfig_StreamingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_StreamingConfig) String() string { @@ -258,7 +254,7 @@ func (*NotificationConfig_StreamingConfig) ProtoMessage() {} func (x *NotificationConfig_StreamingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,32 +387,6 @@ func file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_init() if File_google_cloud_securitycenter_v1p1beta1_notification_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_StreamingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1p1beta1_notification_config_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationConfig_StreamingConfig_)(nil), } diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/notification_message.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/notification_message.pb.go index 2441903b9dbd..e13c08a4856d 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/notification_message.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/notification_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/notification_message.proto @@ -55,11 +55,9 @@ type NotificationMessage struct { func (x *NotificationMessage) Reset() { *x = NotificationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationMessage) String() string { @@ -70,7 +68,7 @@ func (*NotificationMessage) ProtoMessage() {} func (x *NotificationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,20 +208,6 @@ func file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_init( } file_google_cloud_securitycenter_v1p1beta1_finding_proto_init() file_google_cloud_securitycenter_v1p1beta1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v1p1beta1_notification_message_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationMessage_Finding)(nil), } diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/organization_settings.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/organization_settings.pb.go index d44cecab8929..1783081fbf16 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/organization_settings.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/organization_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/organization_settings.proto @@ -122,11 +122,9 @@ type OrganizationSettings struct { func (x *OrganizationSettings) Reset() { *x = OrganizationSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings) String() string { @@ -137,7 +135,7 @@ func (*OrganizationSettings) ProtoMessage() {} func (x *OrganizationSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,11 +188,9 @@ type OrganizationSettings_AssetDiscoveryConfig struct { func (x *OrganizationSettings_AssetDiscoveryConfig) Reset() { *x = OrganizationSettings_AssetDiscoveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationSettings_AssetDiscoveryConfig) String() string { @@ -205,7 +201,7 @@ func (*OrganizationSettings_AssetDiscoveryConfig) ProtoMessage() {} func (x *OrganizationSettings_AssetDiscoveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,32 +342,6 @@ func file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_init if File_google_cloud_securitycenter_v1p1beta1_organization_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationSettings_AssetDiscoveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/resource.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/resource.pb.go index 750e8779af0b..90e8ce85799d 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/resource.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/resource.proto @@ -61,11 +61,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -76,7 +74,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,20 +213,6 @@ func file_google_cloud_securitycenter_v1p1beta1_resource_proto_init() { return } file_google_cloud_securitycenter_v1p1beta1_folder_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/run_asset_discovery_response.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/run_asset_discovery_response.pb.go index 5206d0ce613b..44c66c74cb16 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/run_asset_discovery_response.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/run_asset_discovery_response.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto @@ -108,11 +108,9 @@ type RunAssetDiscoveryResponse struct { func (x *RunAssetDiscoveryResponse) Reset() { *x = RunAssetDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryResponse) String() string { @@ -123,7 +121,7 @@ func (*RunAssetDiscoveryResponse) ProtoMessage() {} func (x *RunAssetDiscoveryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,20 +231,6 @@ func file_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_pro if File_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_run_asset_discovery_response_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/security_marks.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/security_marks.pb.go index 6c6770a4944e..0c289369151b 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/security_marks.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/security_marks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/security_marks.proto @@ -73,11 +73,9 @@ type SecurityMarks struct { func (x *SecurityMarks) Reset() { *x = SecurityMarks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityMarks) String() string { @@ -88,7 +86,7 @@ func (*SecurityMarks) ProtoMessage() {} func (x *SecurityMarks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,20 +223,6 @@ func file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_init() { if File_google_cloud_securitycenter_v1p1beta1_security_marks_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityMarks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/securitycenter_service.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/securitycenter_service.pb.go index 65f1073bea3b..4550fc67e2f1 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/securitycenter_service.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/securitycenter_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto @@ -198,11 +198,9 @@ type CreateFindingRequest struct { func (x *CreateFindingRequest) Reset() { *x = CreateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFindingRequest) String() string { @@ -213,7 +211,7 @@ func (*CreateFindingRequest) ProtoMessage() {} func (x *CreateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +267,9 @@ type CreateNotificationConfigRequest struct { func (x *CreateNotificationConfigRequest) Reset() { *x = CreateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotificationConfigRequest) String() string { @@ -284,7 +280,7 @@ func (*CreateNotificationConfigRequest) ProtoMessage() {} func (x *CreateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +332,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -351,7 +345,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -393,11 +387,9 @@ type DeleteNotificationConfigRequest struct { func (x *DeleteNotificationConfigRequest) Reset() { *x = DeleteNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotificationConfigRequest) String() string { @@ -408,7 +400,7 @@ func (*DeleteNotificationConfigRequest) ProtoMessage() {} func (x *DeleteNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +435,9 @@ type GetNotificationConfigRequest struct { func (x *GetNotificationConfigRequest) Reset() { *x = GetNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationConfigRequest) String() string { @@ -458,7 +448,7 @@ func (*GetNotificationConfigRequest) ProtoMessage() {} func (x *GetNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,11 +483,9 @@ type GetOrganizationSettingsRequest struct { func (x *GetOrganizationSettingsRequest) Reset() { *x = GetOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationSettingsRequest) String() string { @@ -508,7 +496,7 @@ func (*GetOrganizationSettingsRequest) ProtoMessage() {} func (x *GetOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +531,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -558,7 +544,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +702,9 @@ type GroupAssetsRequest struct { func (x *GroupAssetsRequest) Reset() { *x = GroupAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsRequest) String() string { @@ -731,7 +715,7 @@ func (*GroupAssetsRequest) ProtoMessage() {} func (x *GroupAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +800,9 @@ type GroupAssetsResponse struct { func (x *GroupAssetsResponse) Reset() { *x = GroupAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupAssetsResponse) String() string { @@ -831,7 +813,7 @@ func (*GroupAssetsResponse) ProtoMessage() {} func (x *GroupAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +986,9 @@ type GroupFindingsRequest struct { func (x *GroupFindingsRequest) Reset() { *x = GroupFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsRequest) String() string { @@ -1019,7 +999,7 @@ func (*GroupFindingsRequest) ProtoMessage() {} func (x *GroupFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1084,9 @@ type GroupFindingsResponse struct { func (x *GroupFindingsResponse) Reset() { *x = GroupFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsResponse) String() string { @@ -1119,7 +1097,7 @@ func (*GroupFindingsResponse) ProtoMessage() {} func (x *GroupFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1176,11 +1154,9 @@ type GroupResult struct { func (x *GroupResult) Reset() { *x = GroupResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupResult) String() string { @@ -1191,7 +1167,7 @@ func (*GroupResult) ProtoMessage() {} func (x *GroupResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1240,11 +1216,9 @@ type ListNotificationConfigsRequest struct { func (x *ListNotificationConfigsRequest) Reset() { *x = ListNotificationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsRequest) String() string { @@ -1255,7 +1229,7 @@ func (*ListNotificationConfigsRequest) ProtoMessage() {} func (x *ListNotificationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1306,11 +1280,9 @@ type ListNotificationConfigsResponse struct { func (x *ListNotificationConfigsResponse) Reset() { *x = ListNotificationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsResponse) String() string { @@ -1321,7 +1293,7 @@ func (*ListNotificationConfigsResponse) ProtoMessage() {} func (x *ListNotificationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1371,11 +1343,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -1386,7 +1356,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1437,11 +1407,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -1452,7 +1420,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1621,11 +1589,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -1636,7 +1602,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1726,11 +1692,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -1741,7 +1705,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1882,9 @@ type ListFindingsRequest struct { func (x *ListFindingsRequest) Reset() { *x = ListFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsRequest) String() string { @@ -1933,7 +1895,7 @@ func (*ListFindingsRequest) ProtoMessage() {} func (x *ListFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2023,11 +1985,9 @@ type ListFindingsResponse struct { func (x *ListFindingsResponse) Reset() { *x = ListFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse) String() string { @@ -2038,7 +1998,7 @@ func (*ListFindingsResponse) ProtoMessage() {} func (x *ListFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,11 +2060,9 @@ type SetFindingStateRequest struct { func (x *SetFindingStateRequest) Reset() { *x = SetFindingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetFindingStateRequest) String() string { @@ -2115,7 +2073,7 @@ func (*SetFindingStateRequest) ProtoMessage() {} func (x *SetFindingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2164,11 +2122,9 @@ type RunAssetDiscoveryRequest struct { func (x *RunAssetDiscoveryRequest) Reset() { *x = RunAssetDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunAssetDiscoveryRequest) String() string { @@ -2179,7 +2135,7 @@ func (*RunAssetDiscoveryRequest) ProtoMessage() {} func (x *RunAssetDiscoveryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2226,11 +2182,9 @@ type UpdateFindingRequest struct { func (x *UpdateFindingRequest) Reset() { *x = UpdateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFindingRequest) String() string { @@ -2241,7 +2195,7 @@ func (*UpdateFindingRequest) ProtoMessage() {} func (x *UpdateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2286,11 +2240,9 @@ type UpdateNotificationConfigRequest struct { func (x *UpdateNotificationConfigRequest) Reset() { *x = UpdateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotificationConfigRequest) String() string { @@ -2301,7 +2253,7 @@ func (*UpdateNotificationConfigRequest) ProtoMessage() {} func (x *UpdateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2346,11 +2298,9 @@ type UpdateOrganizationSettingsRequest struct { func (x *UpdateOrganizationSettingsRequest) Reset() { *x = UpdateOrganizationSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOrganizationSettingsRequest) String() string { @@ -2361,7 +2311,7 @@ func (*UpdateOrganizationSettingsRequest) ProtoMessage() {} func (x *UpdateOrganizationSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2406,11 +2356,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -2421,7 +2369,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2472,11 +2420,9 @@ type UpdateSecurityMarksRequest struct { func (x *UpdateSecurityMarksRequest) Reset() { *x = UpdateSecurityMarksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityMarksRequest) String() string { @@ -2487,7 +2433,7 @@ func (*UpdateSecurityMarksRequest) ProtoMessage() {} func (x *UpdateSecurityMarksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2537,11 +2483,9 @@ type ListAssetsResponse_ListAssetsResult struct { func (x *ListAssetsResponse_ListAssetsResult) Reset() { *x = ListAssetsResponse_ListAssetsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse_ListAssetsResult) String() string { @@ -2552,7 +2496,7 @@ func (*ListAssetsResponse_ListAssetsResult) ProtoMessage() {} func (x *ListAssetsResponse_ListAssetsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2597,11 +2541,9 @@ type ListFindingsResponse_ListFindingsResult struct { func (x *ListFindingsResponse_ListFindingsResult) Reset() { *x = ListFindingsResponse_ListFindingsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult) String() string { @@ -2612,7 +2554,7 @@ func (*ListFindingsResponse_ListFindingsResult) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2674,11 +2616,9 @@ type ListFindingsResponse_ListFindingsResult_Resource struct { func (x *ListFindingsResponse_ListFindingsResult_Resource) Reset() { *x = ListFindingsResponse_ListFindingsResult_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult_Resource) String() string { @@ -2689,7 +2629,7 @@ func (*ListFindingsResponse_ListFindingsResult_Resource) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3852,368 +3792,6 @@ func file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_ini file_google_cloud_securitycenter_v1p1beta1_organization_settings_proto_init() file_google_cloud_securitycenter_v1p1beta1_security_marks_proto_init() file_google_cloud_securitycenter_v1p1beta1_source_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GroupAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GroupResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SetFindingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RunAssetDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOrganizationSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityMarksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse_ListAssetsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v1p1beta1_securitycenter_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv1p1beta1/securitycenterpb/source.pb.go b/securitycenter/apiv1p1beta1/securitycenterpb/source.pb.go index cca30fded227..874c8395e946 100755 --- a/securitycenter/apiv1p1beta1/securitycenterpb/source.pb.go +++ b/securitycenter/apiv1p1beta1/securitycenterpb/source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v1p1beta1/source.proto @@ -74,11 +74,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v1p1beta1_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v1p1beta1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -89,7 +87,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v1p1beta1_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,20 +207,6 @@ func file_google_cloud_securitycenter_v1p1beta1_source_proto_init() { if File_google_cloud_securitycenter_v1p1beta1_source_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v1p1beta1_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/helpers.go b/securitycenter/apiv2/helpers.go index 4e919bd493b5..1825692c16a3 100755 --- a/securitycenter/apiv2/helpers.go +++ b/securitycenter/apiv2/helpers.go @@ -18,10 +18,20 @@ package securitycenter import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycenter/apiv2/security_center_client.go b/securitycenter/apiv2/security_center_client.go index 8a1aa6e5a72b..cfbac23883d3 100755 --- a/securitycenter/apiv2/security_center_client.go +++ b/securitycenter/apiv2/security_center_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -33,7 +33,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securitycenterpb "cloud.google.com/go/securitycenter/apiv2/securitycenterpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -595,6 +594,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security center client based on gRPC. @@ -621,6 +622,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securitycenterpb.NewSecurityCenterClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -684,6 +686,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security center rest client. @@ -701,6 +705,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -763,7 +768,7 @@ func (c *gRPCClient) BatchCreateResourceValueConfigs(ctx context.Context, req *s var resp *securitycenterpb.BatchCreateResourceValueConfigsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchCreateResourceValueConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchCreateResourceValueConfigs, req, settings.GRPC, c.logger, "BatchCreateResourceValueConfigs") return err }, opts...) if err != nil { @@ -781,7 +786,7 @@ func (c *gRPCClient) BulkMuteFindings(ctx context.Context, req *securitycenterpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BulkMuteFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BulkMuteFindings, req, settings.GRPC, c.logger, "BulkMuteFindings") return err }, opts...) if err != nil { @@ -801,7 +806,7 @@ func (c *gRPCClient) CreateBigQueryExport(ctx context.Context, req *securitycent var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBigQueryExport, req, settings.GRPC, c.logger, "CreateBigQueryExport") return err }, opts...) if err != nil { @@ -819,7 +824,7 @@ func (c *gRPCClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateFinding, req, settings.GRPC, c.logger, "CreateFinding") return err }, opts...) if err != nil { @@ -852,7 +857,7 @@ func (c *gRPCClient) CreateMuteConfig(ctx context.Context, req *securitycenterpb var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMuteConfig, req, settings.GRPC, c.logger, "CreateMuteConfig") return err }, opts...) if err != nil { @@ -870,7 +875,7 @@ func (c *gRPCClient) CreateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNotificationConfig, req, settings.GRPC, c.logger, "CreateNotificationConfig") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -905,7 +910,7 @@ func (c *gRPCClient) DeleteBigQueryExport(ctx context.Context, req *securitycent opts = append((*c.CallOptions).DeleteBigQueryExport[0:len((*c.CallOptions).DeleteBigQueryExport):len((*c.CallOptions).DeleteBigQueryExport)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteBigQueryExport(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteBigQueryExport, req, settings.GRPC, c.logger, "DeleteBigQueryExport") return err }, opts...) return err @@ -934,7 +939,7 @@ func (c *gRPCClient) DeleteMuteConfig(ctx context.Context, req *securitycenterpb opts = append((*c.CallOptions).DeleteMuteConfig[0:len((*c.CallOptions).DeleteMuteConfig):len((*c.CallOptions).DeleteMuteConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteMuteConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteMuteConfig, req, settings.GRPC, c.logger, "DeleteMuteConfig") return err }, opts...) return err @@ -948,7 +953,7 @@ func (c *gRPCClient) DeleteNotificationConfig(ctx context.Context, req *security opts = append((*c.CallOptions).DeleteNotificationConfig[0:len((*c.CallOptions).DeleteNotificationConfig):len((*c.CallOptions).DeleteNotificationConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteNotificationConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteNotificationConfig, req, settings.GRPC, c.logger, "DeleteNotificationConfig") return err }, opts...) return err @@ -962,7 +967,7 @@ func (c *gRPCClient) DeleteResourceValueConfig(ctx context.Context, req *securit opts = append((*c.CallOptions).DeleteResourceValueConfig[0:len((*c.CallOptions).DeleteResourceValueConfig):len((*c.CallOptions).DeleteResourceValueConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteResourceValueConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteResourceValueConfig, req, settings.GRPC, c.logger, "DeleteResourceValueConfig") return err }, opts...) return err @@ -977,7 +982,7 @@ func (c *gRPCClient) GetBigQueryExport(ctx context.Context, req *securitycenterp var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBigQueryExport, req, settings.GRPC, c.logger, "GetBigQueryExport") return err }, opts...) if err != nil { @@ -995,7 +1000,7 @@ func (c *gRPCClient) GetSimulation(ctx context.Context, req *securitycenterpb.Ge var resp *securitycenterpb.Simulation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSimulation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSimulation, req, settings.GRPC, c.logger, "GetSimulation") return err }, opts...) if err != nil { @@ -1013,7 +1018,7 @@ func (c *gRPCClient) GetValuedResource(ctx context.Context, req *securitycenterp var resp *securitycenterpb.ValuedResource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetValuedResource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetValuedResource, req, settings.GRPC, c.logger, "GetValuedResource") return err }, opts...) if err != nil { @@ -1031,7 +1036,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1064,7 +1069,7 @@ func (c *gRPCClient) GetMuteConfig(ctx context.Context, req *securitycenterpb.Ge var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMuteConfig, req, settings.GRPC, c.logger, "GetMuteConfig") return err }, opts...) if err != nil { @@ -1082,7 +1087,7 @@ func (c *gRPCClient) GetNotificationConfig(ctx context.Context, req *securitycen var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNotificationConfig, req, settings.GRPC, c.logger, "GetNotificationConfig") return err }, opts...) if err != nil { @@ -1100,7 +1105,7 @@ func (c *gRPCClient) GetResourceValueConfig(ctx context.Context, req *securityce var resp *securitycenterpb.ResourceValueConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetResourceValueConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetResourceValueConfig, req, settings.GRPC, c.logger, "GetResourceValueConfig") return err }, opts...) if err != nil { @@ -1118,7 +1123,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -1147,7 +1152,7 @@ func (c *gRPCClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GroupFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GroupFindings, req, settings.GRPC, c.logger, "GroupFindings") return err }, opts...) if err != nil { @@ -1193,7 +1198,7 @@ func (c *gRPCClient) ListAttackPaths(ctx context.Context, req *securitycenterpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAttackPaths(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAttackPaths, req, settings.GRPC, c.logger, "ListAttackPaths") return err }, opts...) if err != nil { @@ -1239,7 +1244,7 @@ func (c *gRPCClient) ListBigQueryExports(ctx context.Context, req *securitycente } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBigQueryExports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBigQueryExports, req, settings.GRPC, c.logger, "ListBigQueryExports") return err }, opts...) if err != nil { @@ -1285,7 +1290,7 @@ func (c *gRPCClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindings, req, settings.GRPC, c.logger, "ListFindings") return err }, opts...) if err != nil { @@ -1346,7 +1351,7 @@ func (c *gRPCClient) ListMuteConfigs(ctx context.Context, req *securitycenterpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMuteConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMuteConfigs, req, settings.GRPC, c.logger, "ListMuteConfigs") return err }, opts...) if err != nil { @@ -1392,7 +1397,7 @@ func (c *gRPCClient) ListNotificationConfigs(ctx context.Context, req *securityc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNotificationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNotificationConfigs, req, settings.GRPC, c.logger, "ListNotificationConfigs") return err }, opts...) if err != nil { @@ -1438,7 +1443,7 @@ func (c *gRPCClient) ListResourceValueConfigs(ctx context.Context, req *security } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListResourceValueConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListResourceValueConfigs, req, settings.GRPC, c.logger, "ListResourceValueConfigs") return err }, opts...) if err != nil { @@ -1484,7 +1489,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *securitycenterpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -1530,7 +1535,7 @@ func (c *gRPCClient) ListValuedResources(ctx context.Context, req *securitycente } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListValuedResources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListValuedResources, req, settings.GRPC, c.logger, "ListValuedResources") return err }, opts...) if err != nil { @@ -1565,7 +1570,7 @@ func (c *gRPCClient) SetFindingState(ctx context.Context, req *securitycenterpb. var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetFindingState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetFindingState, req, settings.GRPC, c.logger, "SetFindingState") return err }, opts...) if err != nil { @@ -1583,7 +1588,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1601,7 +1606,7 @@ func (c *gRPCClient) SetMute(ctx context.Context, req *securitycenterpb.SetMuteR var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetMute(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetMute, req, settings.GRPC, c.logger, "SetMute") return err }, opts...) if err != nil { @@ -1619,7 +1624,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1637,7 +1642,7 @@ func (c *gRPCClient) UpdateBigQueryExport(ctx context.Context, req *securitycent var resp *securitycenterpb.BigQueryExport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBigQueryExport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBigQueryExport, req, settings.GRPC, c.logger, "UpdateBigQueryExport") return err }, opts...) if err != nil { @@ -1655,7 +1660,7 @@ func (c *gRPCClient) UpdateExternalSystem(ctx context.Context, req *securitycent var resp *securitycenterpb.ExternalSystem err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateExternalSystem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateExternalSystem, req, settings.GRPC, c.logger, "UpdateExternalSystem") return err }, opts...) if err != nil { @@ -1673,7 +1678,7 @@ func (c *gRPCClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up var resp *securitycenterpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateFinding, req, settings.GRPC, c.logger, "UpdateFinding") return err }, opts...) if err != nil { @@ -1706,7 +1711,7 @@ func (c *gRPCClient) UpdateMuteConfig(ctx context.Context, req *securitycenterpb var resp *securitycenterpb.MuteConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMuteConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMuteConfig, req, settings.GRPC, c.logger, "UpdateMuteConfig") return err }, opts...) if err != nil { @@ -1724,7 +1729,7 @@ func (c *gRPCClient) UpdateNotificationConfig(ctx context.Context, req *security var resp *securitycenterpb.NotificationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNotificationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNotificationConfig, req, settings.GRPC, c.logger, "UpdateNotificationConfig") return err }, opts...) if err != nil { @@ -1742,7 +1747,7 @@ func (c *gRPCClient) UpdateResourceValueConfig(ctx context.Context, req *securit var resp *securitycenterpb.ResourceValueConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateResourceValueConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateResourceValueConfig, req, settings.GRPC, c.logger, "UpdateResourceValueConfig") return err }, opts...) if err != nil { @@ -1760,7 +1765,7 @@ func (c *gRPCClient) UpdateSecurityMarks(ctx context.Context, req *securitycente var resp *securitycenterpb.SecurityMarks err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityMarks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityMarks, req, settings.GRPC, c.logger, "UpdateSecurityMarks") return err }, opts...) if err != nil { @@ -1778,7 +1783,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd var resp *securitycenterpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -1795,7 +1800,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1809,7 +1814,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1824,7 +1829,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1853,7 +1858,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1919,17 +1924,7 @@ func (c *restClient) BatchCreateResourceValueConfigs(ctx context.Context, req *s httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateResourceValueConfigs") if err != nil { return err } @@ -1987,21 +1982,10 @@ func (c *restClient) BulkMuteFindings(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BulkMuteFindings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2060,17 +2044,7 @@ func (c *restClient) CreateBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBigQueryExport") if err != nil { return err } @@ -2129,17 +2103,7 @@ func (c *restClient) CreateFinding(ctx context.Context, req *securitycenterpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateFinding") if err != nil { return err } @@ -2212,17 +2176,7 @@ func (c *restClient) CreateMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMuteConfig") if err != nil { return err } @@ -2280,17 +2234,7 @@ func (c *restClient) CreateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotificationConfig") if err != nil { return err } @@ -2347,17 +2291,7 @@ func (c *restClient) CreateSource(ctx context.Context, req *securitycenterpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } @@ -2404,15 +2338,8 @@ func (c *restClient) DeleteBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBigQueryExport") + return err }, opts...) } @@ -2462,15 +2389,8 @@ func (c *restClient) DeleteMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMuteConfig") + return err }, opts...) } @@ -2504,15 +2424,8 @@ func (c *restClient) DeleteNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotificationConfig") + return err }, opts...) } @@ -2546,15 +2459,8 @@ func (c *restClient) DeleteResourceValueConfig(ctx context.Context, req *securit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteResourceValueConfig") + return err }, opts...) } @@ -2591,17 +2497,7 @@ func (c *restClient) GetBigQueryExport(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBigQueryExport") if err != nil { return err } @@ -2652,17 +2548,7 @@ func (c *restClient) GetSimulation(ctx context.Context, req *securitycenterpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSimulation") if err != nil { return err } @@ -2712,17 +2598,7 @@ func (c *restClient) GetValuedResource(ctx context.Context, req *securitycenterp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetValuedResource") if err != nil { return err } @@ -2778,17 +2654,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2854,17 +2720,7 @@ func (c *restClient) GetMuteConfig(ctx context.Context, req *securitycenterpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMuteConfig") if err != nil { return err } @@ -2914,17 +2770,7 @@ func (c *restClient) GetNotificationConfig(ctx context.Context, req *securitycen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotificationConfig") if err != nil { return err } @@ -2974,17 +2820,7 @@ func (c *restClient) GetResourceValueConfig(ctx context.Context, req *securityce httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetResourceValueConfig") if err != nil { return err } @@ -3034,17 +2870,7 @@ func (c *restClient) GetSource(ctx context.Context, req *securitycenterpb.GetSou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -3123,21 +2949,10 @@ func (c *restClient) GroupFindings(ctx context.Context, req *securitycenterpb.Gr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GroupFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3216,21 +3031,10 @@ func (c *restClient) ListAttackPaths(ctx context.Context, req *securitycenterpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttackPaths") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3309,21 +3113,10 @@ func (c *restClient) ListBigQueryExports(ctx context.Context, req *securitycente } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBigQueryExports") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3419,21 +3212,10 @@ func (c *restClient) ListFindings(ctx context.Context, req *securitycenterpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3509,21 +3291,10 @@ func (c *restClient) ListMuteConfigs(ctx context.Context, req *securitycenterpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMuteConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3598,21 +3369,10 @@ func (c *restClient) ListNotificationConfigs(ctx context.Context, req *securityc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotificationConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3687,21 +3447,10 @@ func (c *restClient) ListResourceValueConfigs(ctx context.Context, req *security } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListResourceValueConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3776,21 +3525,10 @@ func (c *restClient) ListSources(ctx context.Context, req *securitycenterpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3871,21 +3609,10 @@ func (c *restClient) ListValuedResources(ctx context.Context, req *securitycente } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListValuedResources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3955,17 +3682,7 @@ func (c *restClient) SetFindingState(ctx context.Context, req *securitycenterpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetFindingState") if err != nil { return err } @@ -4021,17 +3738,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -4088,17 +3795,7 @@ func (c *restClient) SetMute(ctx context.Context, req *securitycenterpb.SetMuteR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetMute") if err != nil { return err } @@ -4154,17 +3851,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -4228,17 +3915,7 @@ func (c *restClient) UpdateBigQueryExport(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBigQueryExport") if err != nil { return err } @@ -4303,17 +3980,7 @@ func (c *restClient) UpdateExternalSystem(ctx context.Context, req *securitycent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExternalSystem") if err != nil { return err } @@ -4379,17 +4046,7 @@ func (c *restClient) UpdateFinding(ctx context.Context, req *securitycenterpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateFinding") if err != nil { return err } @@ -4469,17 +4126,7 @@ func (c *restClient) UpdateMuteConfig(ctx context.Context, req *securitycenterpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMuteConfig") if err != nil { return err } @@ -4544,17 +4191,7 @@ func (c *restClient) UpdateNotificationConfig(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNotificationConfig") if err != nil { return err } @@ -4618,17 +4255,7 @@ func (c *restClient) UpdateResourceValueConfig(ctx context.Context, req *securit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateResourceValueConfig") if err != nil { return err } @@ -4694,17 +4321,7 @@ func (c *restClient) UpdateSecurityMarks(ctx context.Context, req *securitycente httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityMarks") if err != nil { return err } @@ -4768,17 +4385,7 @@ func (c *restClient) UpdateSource(ctx context.Context, req *securitycenterpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } @@ -4825,15 +4432,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -4867,15 +4467,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4912,17 +4505,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4987,21 +4570,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securitycenter/apiv2/security_center_client_example_go123_test.go b/securitycenter/apiv2/security_center_client_example_go123_test.go index ffc0b6c11fee..020ca26e82fa 100644 --- a/securitycenter/apiv2/security_center_client_example_go123_test.go +++ b/securitycenter/apiv2/security_center_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_GroupFindings_all() { } for resp, err := range c.GroupFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListAttackPaths_all() { } for resp, err := range c.ListAttackPaths(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListBigQueryExports_all() { } for resp, err := range c.ListBigQueryExports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListFindings_all() { } for resp, err := range c.ListFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListMuteConfigs_all() { } for resp, err := range c.ListMuteConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListNotificationConfigs_all() { } for resp, err := range c.ListNotificationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListResourceValueConfigs_all() { } for resp, err := range c.ListResourceValueConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleClient_ListValuedResources_all() { } for resp, err := range c.ListValuedResources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycenter/apiv2/securitycenterpb/access.pb.go b/securitycenter/apiv2/securitycenterpb/access.pb.go index 4c45344df554..1d5de7e0051a 100755 --- a/securitycenter/apiv2/securitycenterpb/access.pb.go +++ b/securitycenter/apiv2/securitycenterpb/access.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/access.proto @@ -95,11 +95,9 @@ type Access struct { func (x *Access) Reset() { *x = Access{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Access) String() string { @@ -110,7 +108,7 @@ func (*Access) ProtoMessage() {} func (x *Access) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +220,9 @@ type ServiceAccountDelegationInfo struct { func (x *ServiceAccountDelegationInfo) Reset() { *x = ServiceAccountDelegationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccountDelegationInfo) String() string { @@ -237,7 +233,7 @@ func (*ServiceAccountDelegationInfo) ProtoMessage() {} func (x *ServiceAccountDelegationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +274,9 @@ type Geolocation struct { func (x *Geolocation) Reset() { *x = Geolocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Geolocation) String() string { @@ -293,7 +287,7 @@ func (*Geolocation) ProtoMessage() {} func (x *Geolocation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_access_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,44 +413,6 @@ func file_google_cloud_securitycenter_v2_access_proto_init() { if File_google_cloud_securitycenter_v2_access_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_access_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Access); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_access_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccountDelegationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_access_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Geolocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/application.pb.go b/securitycenter/apiv2/securitycenterpb/application.pb.go index 986b186fccb2..11e11d24b1b3 100755 --- a/securitycenter/apiv2/securitycenterpb/application.pb.go +++ b/securitycenter/apiv2/securitycenterpb/application.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/application.proto @@ -51,11 +51,9 @@ type Application struct { func (x *Application) Reset() { *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_application_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_application_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application) String() string { @@ -66,7 +64,7 @@ func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_application_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,20 +152,6 @@ func file_google_cloud_securitycenter_v2_application_proto_init() { if File_google_cloud_securitycenter_v2_application_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_application_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/attack_exposure.pb.go b/securitycenter/apiv2/securitycenterpb/attack_exposure.pb.go index b5ec53088982..b5a903856233 100755 --- a/securitycenter/apiv2/securitycenterpb/attack_exposure.pb.go +++ b/securitycenter/apiv2/securitycenterpb/attack_exposure.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/attack_exposure.proto @@ -122,11 +122,9 @@ type AttackExposure struct { func (x *AttackExposure) Reset() { *x = AttackExposure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_exposure_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_exposure_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackExposure) String() string { @@ -137,7 +135,7 @@ func (*AttackExposure) ProtoMessage() {} func (x *AttackExposure) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_exposure_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,20 +298,6 @@ func file_google_cloud_securitycenter_v2_attack_exposure_proto_init() { if File_google_cloud_securitycenter_v2_attack_exposure_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_attack_exposure_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttackExposure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/attack_path.pb.go b/securitycenter/apiv2/securitycenterpb/attack_path.pb.go index cabd34b9d9f1..91d744defc36 100755 --- a/securitycenter/apiv2/securitycenterpb/attack_path.pb.go +++ b/securitycenter/apiv2/securitycenterpb/attack_path.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/attack_path.proto @@ -115,11 +115,9 @@ type AttackPath struct { func (x *AttackPath) Reset() { *x = AttackPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath) String() string { @@ -130,7 +128,7 @@ func (*AttackPath) ProtoMessage() {} func (x *AttackPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +190,9 @@ type AttackPath_AttackPathNode struct { func (x *AttackPath_AttackPathNode) Reset() { *x = AttackPath_AttackPathNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode) String() string { @@ -207,7 +203,7 @@ func (*AttackPath_AttackPathNode) ProtoMessage() {} func (x *AttackPath_AttackPathNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type AttackPath_AttackPathEdge struct { func (x *AttackPath_AttackPathEdge) Reset() { *x = AttackPath_AttackPathEdge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathEdge) String() string { @@ -294,7 +288,7 @@ func (*AttackPath_AttackPathEdge) ProtoMessage() {} func (x *AttackPath_AttackPathEdge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +334,9 @@ type AttackPath_AttackPathNode_PathNodeAssociatedFinding struct { func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) Reset() { *x = AttackPath_AttackPathNode_PathNodeAssociatedFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) String() string { @@ -355,7 +347,7 @@ func (*AttackPath_AttackPathNode_PathNodeAssociatedFinding) ProtoMessage() {} func (x *AttackPath_AttackPathNode_PathNodeAssociatedFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,11 +403,9 @@ type AttackPath_AttackPathNode_AttackStepNode struct { func (x *AttackPath_AttackPathNode_AttackStepNode) Reset() { *x = AttackPath_AttackPathNode_AttackStepNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttackPath_AttackPathNode_AttackStepNode) String() string { @@ -426,7 +416,7 @@ func (*AttackPath_AttackPathNode_AttackStepNode) ProtoMessage() {} func (x *AttackPath_AttackPathNode_AttackStepNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,68 +637,6 @@ func file_google_cloud_securitycenter_v2_attack_path_proto_init() { if File_google_cloud_securitycenter_v2_attack_path_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathEdge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode_PathNodeAssociatedFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_attack_path_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AttackPath_AttackPathNode_AttackStepNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/backup_disaster_recovery.pb.go b/securitycenter/apiv2/securitycenterpb/backup_disaster_recovery.pb.go index 19445f615c3b..9f6ae3b19d8b 100755 --- a/securitycenter/apiv2/securitycenterpb/backup_disaster_recovery.pb.go +++ b/securitycenter/apiv2/securitycenterpb/backup_disaster_recovery.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto @@ -94,11 +94,9 @@ type BackupDisasterRecovery struct { func (x *BackupDisasterRecovery) Reset() { *x = BackupDisasterRecovery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_backup_disaster_recovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_backup_disaster_recovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupDisasterRecovery) String() string { @@ -109,7 +107,7 @@ func (*BackupDisasterRecovery) ProtoMessage() {} func (x *BackupDisasterRecovery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_backup_disaster_recovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,20 +277,6 @@ func file_google_cloud_securitycenter_v2_backup_disaster_recovery_proto_init() { if File_google_cloud_securitycenter_v2_backup_disaster_recovery_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_backup_disaster_recovery_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupDisasterRecovery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/bigquery_export.pb.go b/securitycenter/apiv2/securitycenterpb/bigquery_export.pb.go index b094e07235cc..08c4989bb7d3 100755 --- a/securitycenter/apiv2/securitycenterpb/bigquery_export.pb.go +++ b/securitycenter/apiv2/securitycenterpb/bigquery_export.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/bigquery_export.proto @@ -103,11 +103,9 @@ type BigQueryExport struct { func (x *BigQueryExport) Reset() { *x = BigQueryExport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_bigquery_export_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_bigquery_export_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryExport) String() string { @@ -118,7 +116,7 @@ func (*BigQueryExport) ProtoMessage() {} func (x *BigQueryExport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_bigquery_export_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,20 +291,6 @@ func file_google_cloud_securitycenter_v2_bigquery_export_proto_init() { if File_google_cloud_securitycenter_v2_bigquery_export_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_bigquery_export_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryExport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/cloud_armor.pb.go b/securitycenter/apiv2/securitycenterpb/cloud_armor.pb.go index d84ce1fda700..9fe1f9faf2f1 100755 --- a/securitycenter/apiv2/securitycenterpb/cloud_armor.pb.go +++ b/securitycenter/apiv2/securitycenterpb/cloud_armor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/cloud_armor.proto @@ -67,11 +67,9 @@ type CloudArmor struct { func (x *CloudArmor) Reset() { *x = CloudArmor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudArmor) String() string { @@ -82,7 +80,7 @@ func (*CloudArmor) ProtoMessage() {} func (x *CloudArmor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,11 +158,9 @@ type SecurityPolicy struct { func (x *SecurityPolicy) Reset() { *x = SecurityPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPolicy) String() string { @@ -175,7 +171,7 @@ func (*SecurityPolicy) ProtoMessage() {} func (x *SecurityPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type Requests struct { func (x *Requests) Reset() { *x = Requests{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Requests) String() string { @@ -246,7 +240,7 @@ func (*Requests) ProtoMessage() {} func (x *Requests) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +300,9 @@ type AdaptiveProtection struct { func (x *AdaptiveProtection) Reset() { *x = AdaptiveProtection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveProtection) String() string { @@ -321,7 +313,7 @@ func (*AdaptiveProtection) ProtoMessage() {} func (x *AdaptiveProtection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +351,9 @@ type Attack struct { func (x *Attack) Reset() { *x = Attack{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attack) String() string { @@ -374,7 +364,7 @@ func (*Attack) ProtoMessage() {} func (x *Attack) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,68 +520,6 @@ func file_google_cloud_securitycenter_v2_cloud_armor_proto_init() { if File_google_cloud_securitycenter_v2_cloud_armor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudArmor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Requests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveProtection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_cloud_armor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Attack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/cloud_dlp_data_profile.pb.go b/securitycenter/apiv2/securitycenterpb/cloud_dlp_data_profile.pb.go index 070b593553d9..455daf9462e3 100755 --- a/securitycenter/apiv2/securitycenterpb/cloud_dlp_data_profile.pb.go +++ b/securitycenter/apiv2/securitycenterpb/cloud_dlp_data_profile.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto @@ -105,11 +105,9 @@ type CloudDlpDataProfile struct { func (x *CloudDlpDataProfile) Reset() { *x = CloudDlpDataProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDlpDataProfile) String() string { @@ -120,7 +118,7 @@ func (*CloudDlpDataProfile) ProtoMessage() {} func (x *CloudDlpDataProfile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,20 +235,6 @@ func file_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto_init() { if File_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_cloud_dlp_data_profile_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudDlpDataProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/cloud_dlp_inspection.pb.go b/securitycenter/apiv2/securitycenterpb/cloud_dlp_inspection.pb.go index 7452e3817b3d..9a5326ea0890 100755 --- a/securitycenter/apiv2/securitycenterpb/cloud_dlp_inspection.pb.go +++ b/securitycenter/apiv2/securitycenterpb/cloud_dlp_inspection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto @@ -60,11 +60,9 @@ type CloudDlpInspection struct { func (x *CloudDlpInspection) Reset() { *x = CloudDlpInspection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDlpInspection) String() string { @@ -75,7 +73,7 @@ func (*CloudDlpInspection) ProtoMessage() {} func (x *CloudDlpInspection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -195,20 +193,6 @@ func file_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto_init() { if File_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_cloud_dlp_inspection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CloudDlpInspection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/compliance.pb.go b/securitycenter/apiv2/securitycenterpb/compliance.pb.go index e760379b8315..e0df10f0b952 100755 --- a/securitycenter/apiv2/securitycenterpb/compliance.pb.go +++ b/securitycenter/apiv2/securitycenterpb/compliance.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/compliance.proto @@ -53,11 +53,9 @@ type Compliance struct { func (x *Compliance) Reset() { *x = Compliance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_compliance_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_compliance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Compliance) String() string { @@ -68,7 +66,7 @@ func (*Compliance) ProtoMessage() {} func (x *Compliance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_compliance_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,20 +162,6 @@ func file_google_cloud_securitycenter_v2_compliance_proto_init() { if File_google_cloud_securitycenter_v2_compliance_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_compliance_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Compliance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/connection.pb.go b/securitycenter/apiv2/securitycenterpb/connection.pb.go index 81c54cbae2e0..0e2192e728a9 100755 --- a/securitycenter/apiv2/securitycenterpb/connection.pb.go +++ b/securitycenter/apiv2/securitycenterpb/connection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/connection.proto @@ -122,11 +122,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_connection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_connection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -137,7 +135,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_connection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,20 +263,6 @@ func file_google_cloud_securitycenter_v2_connection_proto_init() { if File_google_cloud_securitycenter_v2_connection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_connection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/contact_details.pb.go b/securitycenter/apiv2/securitycenterpb/contact_details.pb.go index f917aae3cced..53dd680b5d1f 100755 --- a/securitycenter/apiv2/securitycenterpb/contact_details.pb.go +++ b/securitycenter/apiv2/securitycenterpb/contact_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/contact_details.proto @@ -47,11 +47,9 @@ type ContactDetails struct { func (x *ContactDetails) Reset() { *x = ContactDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContactDetails) String() string { @@ -62,7 +60,7 @@ func (*ContactDetails) ProtoMessage() {} func (x *ContactDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -96,11 +94,9 @@ type Contact struct { func (x *Contact) Reset() { *x = Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Contact) String() string { @@ -111,7 +107,7 @@ func (*Contact) ProtoMessage() {} func (x *Contact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,32 +194,6 @@ func file_google_cloud_securitycenter_v2_contact_details_proto_init() { if File_google_cloud_securitycenter_v2_contact_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContactDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_contact_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/container.pb.go b/securitycenter/apiv2/securitycenterpb/container.pb.go index 0f24305e1587..e2f5f1ea293a 100755 --- a/securitycenter/apiv2/securitycenterpb/container.pb.go +++ b/securitycenter/apiv2/securitycenterpb/container.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/container.proto @@ -58,11 +58,9 @@ type Container struct { func (x *Container) Reset() { *x = Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_container_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_container_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Container) String() string { @@ -73,7 +71,7 @@ func (*Container) ProtoMessage() {} func (x *Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_container_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,20 +198,6 @@ func file_google_cloud_securitycenter_v2_container_proto_init() { return } file_google_cloud_securitycenter_v2_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_container_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/database.pb.go b/securitycenter/apiv2/securitycenterpb/database.pb.go index bfb6b7163842..4cc6250312ad 100755 --- a/securitycenter/apiv2/securitycenterpb/database.pb.go +++ b/securitycenter/apiv2/securitycenterpb/database.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/database.proto @@ -74,11 +74,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_database_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -89,7 +87,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_database_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,20 +209,6 @@ func file_google_cloud_securitycenter_v2_database_proto_init() { if File_google_cloud_securitycenter_v2_database_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_database_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/exfiltration.pb.go b/securitycenter/apiv2/securitycenterpb/exfiltration.pb.go index 90e5721a4a18..f1daa8c548cb 100755 --- a/securitycenter/apiv2/securitycenterpb/exfiltration.pb.go +++ b/securitycenter/apiv2/securitycenterpb/exfiltration.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/exfiltration.proto @@ -57,11 +57,9 @@ type Exfiltration struct { func (x *Exfiltration) Reset() { *x = Exfiltration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Exfiltration) String() string { @@ -72,7 +70,7 @@ func (*Exfiltration) ProtoMessage() {} func (x *Exfiltration) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ExfilResource struct { func (x *ExfilResource) Reset() { *x = ExfilResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExfilResource) String() string { @@ -142,7 +138,7 @@ func (*ExfilResource) ProtoMessage() {} func (x *ExfilResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,32 +243,6 @@ func file_google_cloud_securitycenter_v2_exfiltration_proto_init() { if File_google_cloud_securitycenter_v2_exfiltration_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Exfiltration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_exfiltration_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExfilResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/external_system.pb.go b/securitycenter/apiv2/securitycenterpb/external_system.pb.go index bc91418e2f48..963c4e8594c3 100755 --- a/securitycenter/apiv2/securitycenterpb/external_system.pb.go +++ b/securitycenter/apiv2/securitycenterpb/external_system.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/external_system.proto @@ -84,11 +84,9 @@ type ExternalSystem struct { func (x *ExternalSystem) Reset() { *x = ExternalSystem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalSystem) String() string { @@ -99,7 +97,7 @@ func (*ExternalSystem) ProtoMessage() {} func (x *ExternalSystem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +213,9 @@ type ExternalSystem_TicketInfo struct { func (x *ExternalSystem_TicketInfo) Reset() { *x = ExternalSystem_TicketInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalSystem_TicketInfo) String() string { @@ -230,7 +226,7 @@ func (*ExternalSystem_TicketInfo) ProtoMessage() {} func (x *ExternalSystem_TicketInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,32 +439,6 @@ func file_google_cloud_securitycenter_v2_external_system_proto_init() { if File_google_cloud_securitycenter_v2_external_system_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExternalSystem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_external_system_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExternalSystem_TicketInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/file.pb.go b/securitycenter/apiv2/securitycenterpb/file.pb.go index c7a9d14309a6..4e12c9cb393a 100755 --- a/securitycenter/apiv2/securitycenterpb/file.pb.go +++ b/securitycenter/apiv2/securitycenterpb/file.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/file.proto @@ -64,11 +64,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -79,7 +77,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -159,11 +157,9 @@ type File_DiskPath struct { func (x *File_DiskPath) Reset() { *x = File_DiskPath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File_DiskPath) String() string { @@ -174,7 +170,7 @@ func (*File_DiskPath) ProtoMessage() {} func (x *File_DiskPath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_file_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,32 +276,6 @@ func file_google_cloud_securitycenter_v2_file_proto_init() { if File_google_cloud_securitycenter_v2_file_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_file_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_file_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*File_DiskPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/finding.pb.go b/securitycenter/apiv2/securitycenterpb/finding.pb.go index 8ca3fc554dfc..f4856d41632b 100755 --- a/securitycenter/apiv2/securitycenterpb/finding.pb.go +++ b/securitycenter/apiv2/securitycenterpb/finding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/finding.proto @@ -547,11 +547,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -562,7 +560,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +941,9 @@ type Finding_MuteInfo struct { func (x *Finding_MuteInfo) Reset() { *x = Finding_MuteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo) String() string { @@ -958,7 +954,7 @@ func (*Finding_MuteInfo) ProtoMessage() {} func (x *Finding_MuteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +1000,9 @@ type Finding_MuteInfo_StaticMute struct { func (x *Finding_MuteInfo_StaticMute) Reset() { *x = Finding_MuteInfo_StaticMute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo_StaticMute) String() string { @@ -1019,7 +1013,7 @@ func (*Finding_MuteInfo_StaticMute) ProtoMessage() {} func (x *Finding_MuteInfo_StaticMute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1065,11 +1059,9 @@ type Finding_MuteInfo_DynamicMuteRecord struct { func (x *Finding_MuteInfo_DynamicMuteRecord) Reset() { *x = Finding_MuteInfo_DynamicMuteRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding_MuteInfo_DynamicMuteRecord) String() string { @@ -1080,7 +1072,7 @@ func (*Finding_MuteInfo_DynamicMuteRecord) ProtoMessage() {} func (x *Finding_MuteInfo_DynamicMuteRecord) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_finding_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,56 +1709,6 @@ func file_google_cloud_securitycenter_v2_finding_proto_init() { file_google_cloud_securitycenter_v2_security_posture_proto_init() file_google_cloud_securitycenter_v2_toxic_combination_proto_init() file_google_cloud_securitycenter_v2_vulnerability_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_finding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_finding_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_finding_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo_StaticMute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_finding_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Finding_MuteInfo_DynamicMuteRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/folder.pb.go b/securitycenter/apiv2/securitycenterpb/folder.pb.go index e61545aef541..b59713171050 100755 --- a/securitycenter/apiv2/securitycenterpb/folder.pb.go +++ b/securitycenter/apiv2/securitycenterpb/folder.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/folder.proto @@ -51,11 +51,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_folder_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_folder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -66,7 +64,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_folder_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_cloud_securitycenter_v2_folder_proto_init() { if File_google_cloud_securitycenter_v2_folder_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_folder_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/group_membership.pb.go b/securitycenter/apiv2/securitycenterpb/group_membership.pb.go index 7153bce92ded..474c71c71f53 100755 --- a/securitycenter/apiv2/securitycenterpb/group_membership.pb.go +++ b/securitycenter/apiv2/securitycenterpb/group_membership.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/group_membership.proto @@ -99,11 +99,9 @@ type GroupMembership struct { func (x *GroupMembership) Reset() { *x = GroupMembership{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_group_membership_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_group_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupMembership) String() string { @@ -114,7 +112,7 @@ func (*GroupMembership) ProtoMessage() {} func (x *GroupMembership) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_group_membership_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,20 +213,6 @@ func file_google_cloud_securitycenter_v2_group_membership_proto_init() { if File_google_cloud_securitycenter_v2_group_membership_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_group_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GroupMembership); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/iam_binding.pb.go b/securitycenter/apiv2/securitycenterpb/iam_binding.pb.go index 94de5ad3a269..3283f975edf8 100755 --- a/securitycenter/apiv2/securitycenterpb/iam_binding.pb.go +++ b/securitycenter/apiv2/securitycenterpb/iam_binding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/iam_binding.proto @@ -107,11 +107,9 @@ type IamBinding struct { func (x *IamBinding) Reset() { *x = IamBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_iam_binding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_iam_binding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IamBinding) String() string { @@ -122,7 +120,7 @@ func (*IamBinding) ProtoMessage() {} func (x *IamBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_iam_binding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,20 +226,6 @@ func file_google_cloud_securitycenter_v2_iam_binding_proto_init() { if File_google_cloud_securitycenter_v2_iam_binding_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_iam_binding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*IamBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/indicator.pb.go b/securitycenter/apiv2/securitycenterpb/indicator.pb.go index f00dab52d7b1..748708bfa23c 100755 --- a/securitycenter/apiv2/securitycenterpb/indicator.pb.go +++ b/securitycenter/apiv2/securitycenterpb/indicator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/indicator.proto @@ -111,11 +111,9 @@ type Indicator struct { func (x *Indicator) Reset() { *x = Indicator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator) String() string { @@ -126,7 +124,7 @@ func (*Indicator) ProtoMessage() {} func (x *Indicator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type Indicator_ProcessSignature struct { func (x *Indicator_ProcessSignature) Reset() { *x = Indicator_ProcessSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature) String() string { @@ -201,7 +197,7 @@ func (*Indicator_ProcessSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -277,11 +273,9 @@ type Indicator_ProcessSignature_MemoryHashSignature struct { func (x *Indicator_ProcessSignature_MemoryHashSignature) Reset() { *x = Indicator_ProcessSignature_MemoryHashSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_MemoryHashSignature) String() string { @@ -292,7 +286,7 @@ func (*Indicator_ProcessSignature_MemoryHashSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature_MemoryHashSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +327,9 @@ type Indicator_ProcessSignature_YaraRuleSignature struct { func (x *Indicator_ProcessSignature_YaraRuleSignature) Reset() { *x = Indicator_ProcessSignature_YaraRuleSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_YaraRuleSignature) String() string { @@ -348,7 +340,7 @@ func (*Indicator_ProcessSignature_YaraRuleSignature) ProtoMessage() {} func (x *Indicator_ProcessSignature_YaraRuleSignature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type Indicator_ProcessSignature_MemoryHashSignature_Detection struct { func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) Reset() { *x = Indicator_ProcessSignature_MemoryHashSignature_Detection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) String() string { @@ -401,7 +391,7 @@ func (*Indicator_ProcessSignature_MemoryHashSignature_Detection) ProtoMessage() func (x *Indicator_ProcessSignature_MemoryHashSignature_Detection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,68 +549,6 @@ func file_google_cloud_securitycenter_v2_indicator_proto_init() { if File_google_cloud_securitycenter_v2_indicator_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Indicator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_MemoryHashSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_YaraRuleSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Indicator_ProcessSignature_MemoryHashSignature_Detection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_indicator_proto_msgTypes[1].OneofWrappers = []any{ (*Indicator_ProcessSignature_MemoryHashSignature_)(nil), (*Indicator_ProcessSignature_YaraRuleSignature_)(nil), diff --git a/securitycenter/apiv2/securitycenterpb/kernel_rootkit.pb.go b/securitycenter/apiv2/securitycenterpb/kernel_rootkit.pb.go index 1a4078c63b3d..55c7d2b184c7 100755 --- a/securitycenter/apiv2/securitycenterpb/kernel_rootkit.pb.go +++ b/securitycenter/apiv2/securitycenterpb/kernel_rootkit.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/kernel_rootkit.proto @@ -70,11 +70,9 @@ type KernelRootkit struct { func (x *KernelRootkit) Reset() { *x = KernelRootkit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kernel_rootkit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kernel_rootkit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KernelRootkit) String() string { @@ -85,7 +83,7 @@ func (*KernelRootkit) ProtoMessage() {} func (x *KernelRootkit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kernel_rootkit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,20 +253,6 @@ func file_google_cloud_securitycenter_v2_kernel_rootkit_proto_init() { if File_google_cloud_securitycenter_v2_kernel_rootkit_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_kernel_rootkit_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KernelRootkit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/kubernetes.pb.go b/securitycenter/apiv2/securitycenterpb/kubernetes.pb.go index f674335d4bdd..7151f059b196 100755 --- a/securitycenter/apiv2/securitycenterpb/kubernetes.pb.go +++ b/securitycenter/apiv2/securitycenterpb/kubernetes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/kubernetes.proto @@ -181,11 +181,9 @@ type Kubernetes struct { func (x *Kubernetes) Reset() { *x = Kubernetes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes) String() string { @@ -196,7 +194,7 @@ func (*Kubernetes) ProtoMessage() {} func (x *Kubernetes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +277,9 @@ type Kubernetes_Pod struct { func (x *Kubernetes_Pod) Reset() { *x = Kubernetes_Pod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Pod) String() string { @@ -294,7 +290,7 @@ func (*Kubernetes_Pod) ProtoMessage() {} func (x *Kubernetes_Pod) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type Kubernetes_Node struct { func (x *Kubernetes_Node) Reset() { *x = Kubernetes_Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Node) String() string { @@ -365,7 +359,7 @@ func (*Kubernetes_Node) ProtoMessage() {} func (x *Kubernetes_Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +395,9 @@ type Kubernetes_NodePool struct { func (x *Kubernetes_NodePool) Reset() { *x = Kubernetes_NodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_NodePool) String() string { @@ -416,7 +408,7 @@ func (*Kubernetes_NodePool) ProtoMessage() {} func (x *Kubernetes_NodePool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +453,9 @@ type Kubernetes_Role struct { func (x *Kubernetes_Role) Reset() { *x = Kubernetes_Role{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Role) String() string { @@ -476,7 +466,7 @@ func (*Kubernetes_Role) ProtoMessage() {} func (x *Kubernetes_Role) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -531,11 +521,9 @@ type Kubernetes_Binding struct { func (x *Kubernetes_Binding) Reset() { *x = Kubernetes_Binding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Binding) String() string { @@ -546,7 +534,7 @@ func (*Kubernetes_Binding) ProtoMessage() {} func (x *Kubernetes_Binding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +593,9 @@ type Kubernetes_Subject struct { func (x *Kubernetes_Subject) Reset() { *x = Kubernetes_Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Subject) String() string { @@ -620,7 +606,7 @@ func (*Kubernetes_Subject) ProtoMessage() {} func (x *Kubernetes_Subject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +672,9 @@ type Kubernetes_AccessReview struct { func (x *Kubernetes_AccessReview) Reset() { *x = Kubernetes_AccessReview{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_AccessReview) String() string { @@ -701,7 +685,7 @@ func (*Kubernetes_AccessReview) ProtoMessage() {} func (x *Kubernetes_AccessReview) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +774,9 @@ type Kubernetes_Object struct { func (x *Kubernetes_Object) Reset() { *x = Kubernetes_Object{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Kubernetes_Object) String() string { @@ -805,7 +787,7 @@ func (*Kubernetes_Object) ProtoMessage() {} func (x *Kubernetes_Object) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1058,116 +1040,6 @@ func file_google_cloud_securitycenter_v2_kubernetes_proto_init() { } file_google_cloud_securitycenter_v2_container_proto_init() file_google_cloud_securitycenter_v2_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Pod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_NodePool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Role); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Binding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_AccessReview); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_kubernetes_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Kubernetes_Object); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/label.pb.go b/securitycenter/apiv2/securitycenterpb/label.pb.go index 92bd6e3bf06b..91f461b4d532 100755 --- a/securitycenter/apiv2/securitycenterpb/label.pb.go +++ b/securitycenter/apiv2/securitycenterpb/label.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/label.proto @@ -52,11 +52,9 @@ type Label struct { func (x *Label) Reset() { *x = Label{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_label_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_label_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Label) String() string { @@ -67,7 +65,7 @@ func (*Label) ProtoMessage() {} func (x *Label) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_label_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,20 +151,6 @@ func file_google_cloud_securitycenter_v2_label_proto_init() { if File_google_cloud_securitycenter_v2_label_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_label_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Label); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/load_balancer.pb.go b/securitycenter/apiv2/securitycenterpb/load_balancer.pb.go index c16f88303150..31c6be79a8ee 100755 --- a/securitycenter/apiv2/securitycenterpb/load_balancer.pb.go +++ b/securitycenter/apiv2/securitycenterpb/load_balancer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/load_balancer.proto @@ -48,11 +48,9 @@ type LoadBalancer struct { func (x *LoadBalancer) Reset() { *x = LoadBalancer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_load_balancer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_load_balancer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoadBalancer) String() string { @@ -63,7 +61,7 @@ func (*LoadBalancer) ProtoMessage() {} func (x *LoadBalancer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_load_balancer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,20 +140,6 @@ func file_google_cloud_securitycenter_v2_load_balancer_proto_init() { if File_google_cloud_securitycenter_v2_load_balancer_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_load_balancer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LoadBalancer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/log_entry.pb.go b/securitycenter/apiv2/securitycenterpb/log_entry.pb.go index ea11de2d564c..2f2d41e17e23 100755 --- a/securitycenter/apiv2/securitycenterpb/log_entry.pb.go +++ b/securitycenter/apiv2/securitycenterpb/log_entry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/log_entry.proto @@ -50,11 +50,9 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntry) String() string { @@ -65,7 +63,7 @@ func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type CloudLoggingEntry struct { func (x *CloudLoggingEntry) Reset() { *x = CloudLoggingEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudLoggingEntry) String() string { @@ -143,7 +139,7 @@ func (*CloudLoggingEntry) ProtoMessage() {} func (x *CloudLoggingEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,32 +262,6 @@ func file_google_cloud_securitycenter_v2_log_entry_proto_init() { if File_google_cloud_securitycenter_v2_log_entry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CloudLoggingEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_log_entry_proto_msgTypes[0].OneofWrappers = []any{ (*LogEntry_CloudLoggingEntry)(nil), } diff --git a/securitycenter/apiv2/securitycenterpb/mitre_attack.pb.go b/securitycenter/apiv2/securitycenterpb/mitre_attack.pb.go index 3170d244da3a..87aaafa3536d 100755 --- a/securitycenter/apiv2/securitycenterpb/mitre_attack.pb.go +++ b/securitycenter/apiv2/securitycenterpb/mitre_attack.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/mitre_attack.proto @@ -467,11 +467,9 @@ type MitreAttack struct { func (x *MitreAttack) Reset() { *x = MitreAttack{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_mitre_attack_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_mitre_attack_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MitreAttack) String() string { @@ -482,7 +480,7 @@ func (*MitreAttack) ProtoMessage() {} func (x *MitreAttack) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_mitre_attack_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -755,20 +753,6 @@ func file_google_cloud_securitycenter_v2_mitre_attack_proto_init() { if File_google_cloud_securitycenter_v2_mitre_attack_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_mitre_attack_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MitreAttack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/mute_config.pb.go b/securitycenter/apiv2/securitycenterpb/mute_config.pb.go index e1522ce7f4bb..6ff2b36163b5 100755 --- a/securitycenter/apiv2/securitycenterpb/mute_config.pb.go +++ b/securitycenter/apiv2/securitycenterpb/mute_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/mute_config.proto @@ -161,11 +161,9 @@ type MuteConfig struct { func (x *MuteConfig) Reset() { *x = MuteConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_mute_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_mute_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MuteConfig) String() string { @@ -176,7 +174,7 @@ func (*MuteConfig) ProtoMessage() {} func (x *MuteConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_mute_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,20 +372,6 @@ func file_google_cloud_securitycenter_v2_mute_config_proto_init() { if File_google_cloud_securitycenter_v2_mute_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_mute_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MuteConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/notebook.pb.go b/securitycenter/apiv2/securitycenterpb/notebook.pb.go index e27247a67470..0c7e455c07d6 100755 --- a/securitycenter/apiv2/securitycenterpb/notebook.pb.go +++ b/securitycenter/apiv2/securitycenterpb/notebook.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/notebook.proto @@ -56,11 +56,9 @@ type Notebook struct { func (x *Notebook) Reset() { *x = Notebook{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_notebook_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_notebook_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Notebook) String() string { @@ -71,7 +69,7 @@ func (*Notebook) ProtoMessage() {} func (x *Notebook) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_notebook_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,20 +181,6 @@ func file_google_cloud_securitycenter_v2_notebook_proto_init() { if File_google_cloud_securitycenter_v2_notebook_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_notebook_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Notebook); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/notification_config.pb.go b/securitycenter/apiv2/securitycenterpb/notification_config.pb.go index 3fcd492ecfad..cecd74ea7694 100755 --- a/securitycenter/apiv2/securitycenterpb/notification_config.pb.go +++ b/securitycenter/apiv2/securitycenterpb/notification_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/notification_config.proto @@ -73,11 +73,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -88,7 +86,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type NotificationConfig_StreamingConfig struct { func (x *NotificationConfig_StreamingConfig) Reset() { *x = NotificationConfig_StreamingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig_StreamingConfig) String() string { @@ -204,7 +200,7 @@ func (*NotificationConfig_StreamingConfig) ProtoMessage() {} func (x *NotificationConfig_StreamingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -337,32 +333,6 @@ func file_google_cloud_securitycenter_v2_notification_config_proto_init() { if File_google_cloud_securitycenter_v2_notification_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig_StreamingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_notification_config_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationConfig_StreamingConfig_)(nil), } diff --git a/securitycenter/apiv2/securitycenterpb/notification_message.pb.go b/securitycenter/apiv2/securitycenterpb/notification_message.pb.go index 2fec621a570b..936f30cd7fa1 100755 --- a/securitycenter/apiv2/securitycenterpb/notification_message.pb.go +++ b/securitycenter/apiv2/securitycenterpb/notification_message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/notification_message.proto @@ -55,11 +55,9 @@ type NotificationMessage struct { func (x *NotificationMessage) Reset() { *x = NotificationMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_notification_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_notification_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationMessage) String() string { @@ -70,7 +68,7 @@ func (*NotificationMessage) ProtoMessage() {} func (x *NotificationMessage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_notification_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,20 +205,6 @@ func file_google_cloud_securitycenter_v2_notification_message_proto_init() { } file_google_cloud_securitycenter_v2_finding_proto_init() file_google_cloud_securitycenter_v2_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_notification_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NotificationMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_notification_message_proto_msgTypes[0].OneofWrappers = []any{ (*NotificationMessage_Finding)(nil), } diff --git a/securitycenter/apiv2/securitycenterpb/org_policy.pb.go b/securitycenter/apiv2/securitycenterpb/org_policy.pb.go index 5317e8128942..86d8ba1e545e 100755 --- a/securitycenter/apiv2/securitycenterpb/org_policy.pb.go +++ b/securitycenter/apiv2/securitycenterpb/org_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/org_policy.proto @@ -50,11 +50,9 @@ type OrgPolicy struct { func (x *OrgPolicy) Reset() { *x = OrgPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_org_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_org_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrgPolicy) String() string { @@ -65,7 +63,7 @@ func (*OrgPolicy) ProtoMessage() {} func (x *OrgPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_org_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,20 +155,6 @@ func file_google_cloud_securitycenter_v2_org_policy_proto_init() { if File_google_cloud_securitycenter_v2_org_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_org_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrgPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/process.pb.go b/securitycenter/apiv2/securitycenterpb/process.pb.go index 95c576d85a46..35d664ba4cf7 100755 --- a/securitycenter/apiv2/securitycenterpb/process.pb.go +++ b/securitycenter/apiv2/securitycenterpb/process.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/process.proto @@ -69,11 +69,9 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Process) String() string { @@ -84,7 +82,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +182,9 @@ type EnvironmentVariable struct { func (x *EnvironmentVariable) Reset() { *x = EnvironmentVariable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnvironmentVariable) String() string { @@ -199,7 +195,7 @@ func (*EnvironmentVariable) ProtoMessage() {} func (x *EnvironmentVariable) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_process_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,32 +322,6 @@ func file_google_cloud_securitycenter_v2_process_proto_init() { return } file_google_cloud_securitycenter_v2_file_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_process_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Process); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_process_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EnvironmentVariable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/resource.pb.go b/securitycenter/apiv2/securitycenterpb/resource.pb.go index 7dbe312ab8e5..45370dfe41cd 100755 --- a/securitycenter/apiv2/securitycenterpb/resource.pb.go +++ b/securitycenter/apiv2/securitycenterpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/resource.proto @@ -216,11 +216,9 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Resource) String() string { @@ -231,7 +229,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +378,9 @@ type GcpMetadata struct { func (x *GcpMetadata) Reset() { *x = GcpMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcpMetadata) String() string { @@ -395,7 +391,7 @@ func (*GcpMetadata) ProtoMessage() {} func (x *GcpMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +466,9 @@ type AwsMetadata struct { func (x *AwsMetadata) Reset() { *x = AwsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata) String() string { @@ -485,7 +479,7 @@ func (*AwsMetadata) ProtoMessage() {} func (x *AwsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,11 +533,9 @@ type AzureMetadata struct { func (x *AzureMetadata) Reset() { *x = AzureMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata) String() string { @@ -554,7 +546,7 @@ func (*AzureMetadata) ProtoMessage() {} func (x *AzureMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +596,9 @@ type ResourcePath struct { func (x *ResourcePath) Reset() { *x = ResourcePath{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePath) String() string { @@ -619,7 +609,7 @@ func (*ResourcePath) ProtoMessage() {} func (x *ResourcePath) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -657,11 +647,9 @@ type AwsMetadata_AwsOrganization struct { func (x *AwsMetadata_AwsOrganization) Reset() { *x = AwsMetadata_AwsOrganization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsOrganization) String() string { @@ -672,7 +660,7 @@ func (*AwsMetadata_AwsOrganization) ProtoMessage() {} func (x *AwsMetadata_AwsOrganization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -714,11 +702,9 @@ type AwsMetadata_AwsOrganizationalUnit struct { func (x *AwsMetadata_AwsOrganizationalUnit) Reset() { *x = AwsMetadata_AwsOrganizationalUnit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsOrganizationalUnit) String() string { @@ -729,7 +715,7 @@ func (*AwsMetadata_AwsOrganizationalUnit) ProtoMessage() {} func (x *AwsMetadata_AwsOrganizationalUnit) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +758,9 @@ type AwsMetadata_AwsAccount struct { func (x *AwsMetadata_AwsAccount) Reset() { *x = AwsMetadata_AwsAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsMetadata_AwsAccount) String() string { @@ -787,7 +771,7 @@ func (*AwsMetadata_AwsAccount) ProtoMessage() {} func (x *AwsMetadata_AwsAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,11 +815,9 @@ type AzureMetadata_AzureManagementGroup struct { func (x *AzureMetadata_AzureManagementGroup) Reset() { *x = AzureMetadata_AzureManagementGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureManagementGroup) String() string { @@ -846,7 +828,7 @@ func (*AzureMetadata_AzureManagementGroup) ProtoMessage() {} func (x *AzureMetadata_AzureManagementGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,11 +872,9 @@ type AzureMetadata_AzureSubscription struct { func (x *AzureMetadata_AzureSubscription) Reset() { *x = AzureMetadata_AzureSubscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureSubscription) String() string { @@ -905,7 +885,7 @@ func (*AzureMetadata_AzureSubscription) ProtoMessage() {} func (x *AzureMetadata_AzureSubscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +926,9 @@ type AzureMetadata_AzureResourceGroup struct { func (x *AzureMetadata_AzureResourceGroup) Reset() { *x = AzureMetadata_AzureResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureMetadata_AzureResourceGroup) String() string { @@ -961,7 +939,7 @@ func (*AzureMetadata_AzureResourceGroup) ProtoMessage() {} func (x *AzureMetadata_AzureResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +978,9 @@ type ResourcePath_ResourcePathNode struct { func (x *ResourcePath_ResourcePathNode) Reset() { *x = ResourcePath_ResourcePathNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourcePath_ResourcePathNode) String() string { @@ -1015,7 +991,7 @@ func (*ResourcePath_ResourcePathNode) ProtoMessage() {} func (x *ResourcePath_ResourcePathNode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1300,152 +1276,6 @@ func file_google_cloud_securitycenter_v2_resource_proto_init() { return } file_google_cloud_securitycenter_v2_folder_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GcpMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsOrganization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsOrganizationalUnit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AwsMetadata_AwsAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureManagementGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureSubscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AzureMetadata_AzureResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ResourcePath_ResourcePathNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_resource_proto_msgTypes[0].OneofWrappers = []any{ (*Resource_GcpMetadata)(nil), (*Resource_AwsMetadata)(nil), diff --git a/securitycenter/apiv2/securitycenterpb/resource_value_config.pb.go b/securitycenter/apiv2/securitycenterpb/resource_value_config.pb.go index b30c05a95cd3..128909fc81a8 100755 --- a/securitycenter/apiv2/securitycenterpb/resource_value_config.pb.go +++ b/securitycenter/apiv2/securitycenterpb/resource_value_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/resource_value_config.proto @@ -148,11 +148,9 @@ type ResourceValueConfig struct { func (x *ResourceValueConfig) Reset() { *x = ResourceValueConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfig) String() string { @@ -163,7 +161,7 @@ func (*ResourceValueConfig) ProtoMessage() {} func (x *ResourceValueConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,11 +271,9 @@ type ResourceValueConfig_SensitiveDataProtectionMapping struct { func (x *ResourceValueConfig_SensitiveDataProtectionMapping) Reset() { *x = ResourceValueConfig_SensitiveDataProtectionMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfig_SensitiveDataProtectionMapping) String() string { @@ -288,7 +284,7 @@ func (*ResourceValueConfig_SensitiveDataProtectionMapping) ProtoMessage() {} func (x *ResourceValueConfig_SensitiveDataProtectionMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,32 +484,6 @@ func file_google_cloud_securitycenter_v2_resource_value_config_proto_init() { return } file_google_cloud_securitycenter_v2_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_resource_value_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfig_SensitiveDataProtectionMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/security_marks.pb.go b/securitycenter/apiv2/securitycenterpb/security_marks.pb.go index 687ec623d1ba..2d069c75fc5a 100755 --- a/securitycenter/apiv2/securitycenterpb/security_marks.pb.go +++ b/securitycenter/apiv2/securitycenterpb/security_marks.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/security_marks.proto @@ -86,11 +86,9 @@ type SecurityMarks struct { func (x *SecurityMarks) Reset() { *x = SecurityMarks{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_security_marks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_security_marks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityMarks) String() string { @@ -101,7 +99,7 @@ func (*SecurityMarks) ProtoMessage() {} func (x *SecurityMarks) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_security_marks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,20 +251,6 @@ func file_google_cloud_securitycenter_v2_security_marks_proto_init() { if File_google_cloud_securitycenter_v2_security_marks_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_security_marks_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityMarks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/security_posture.pb.go b/securitycenter/apiv2/securitycenterpb/security_posture.pb.go index 81fecc46fc4e..6a5788b6c6ba 100755 --- a/securitycenter/apiv2/securitycenterpb/security_posture.pb.go +++ b/securitycenter/apiv2/securitycenterpb/security_posture.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/security_posture.proto @@ -69,11 +69,9 @@ type SecurityPosture struct { func (x *SecurityPosture) Reset() { *x = SecurityPosture{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPosture) String() string { @@ -84,7 +82,7 @@ func (*SecurityPosture) ProtoMessage() {} func (x *SecurityPosture) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type SecurityPosture_PolicyDriftDetails struct { func (x *SecurityPosture_PolicyDriftDetails) Reset() { *x = SecurityPosture_PolicyDriftDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityPosture_PolicyDriftDetails) String() string { @@ -190,7 +186,7 @@ func (*SecurityPosture_PolicyDriftDetails) ProtoMessage() {} func (x *SecurityPosture_PolicyDriftDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,32 +312,6 @@ func file_google_cloud_securitycenter_v2_security_posture_proto_init() { if File_google_cloud_securitycenter_v2_security_posture_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPosture); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_security_posture_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecurityPosture_PolicyDriftDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/securitycenter_service.pb.go b/securitycenter/apiv2/securitycenterpb/securitycenter_service.pb.go index 9067196a5b09..da7e5660cec5 100755 --- a/securitycenter/apiv2/securitycenterpb/securitycenter_service.pb.go +++ b/securitycenter/apiv2/securitycenterpb/securitycenter_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/securitycenter_service.proto @@ -114,11 +114,9 @@ type BatchCreateResourceValueConfigsRequest struct { func (x *BatchCreateResourceValueConfigsRequest) Reset() { *x = BatchCreateResourceValueConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateResourceValueConfigsRequest) String() string { @@ -129,7 +127,7 @@ func (*BatchCreateResourceValueConfigsRequest) ProtoMessage() {} func (x *BatchCreateResourceValueConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type BatchCreateResourceValueConfigsResponse struct { func (x *BatchCreateResourceValueConfigsResponse) Reset() { *x = BatchCreateResourceValueConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateResourceValueConfigsResponse) String() string { @@ -185,7 +181,7 @@ func (*BatchCreateResourceValueConfigsResponse) ProtoMessage() {} func (x *BatchCreateResourceValueConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +254,9 @@ type BulkMuteFindingsRequest struct { func (x *BulkMuteFindingsRequest) Reset() { *x = BulkMuteFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkMuteFindingsRequest) String() string { @@ -273,7 +267,7 @@ func (*BulkMuteFindingsRequest) ProtoMessage() {} func (x *BulkMuteFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type BulkMuteFindingsResponse struct { func (x *BulkMuteFindingsResponse) Reset() { *x = BulkMuteFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BulkMuteFindingsResponse) String() string { @@ -333,7 +325,7 @@ func (*BulkMuteFindingsResponse) ProtoMessage() {} func (x *BulkMuteFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +362,9 @@ type CreateBigQueryExportRequest struct { func (x *CreateBigQueryExportRequest) Reset() { *x = CreateBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBigQueryExportRequest) String() string { @@ -385,7 +375,7 @@ func (*CreateBigQueryExportRequest) ProtoMessage() {} func (x *CreateBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +435,9 @@ type CreateFindingRequest struct { func (x *CreateFindingRequest) Reset() { *x = CreateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFindingRequest) String() string { @@ -460,7 +448,7 @@ func (*CreateFindingRequest) ProtoMessage() {} func (x *CreateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +506,9 @@ type CreateMuteConfigRequest struct { func (x *CreateMuteConfigRequest) Reset() { *x = CreateMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMuteConfigRequest) String() string { @@ -533,7 +519,7 @@ func (*CreateMuteConfigRequest) ProtoMessage() {} func (x *CreateMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +579,9 @@ type CreateNotificationConfigRequest struct { func (x *CreateNotificationConfigRequest) Reset() { *x = CreateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotificationConfigRequest) String() string { @@ -608,7 +592,7 @@ func (*CreateNotificationConfigRequest) ProtoMessage() {} func (x *CreateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +642,9 @@ type CreateResourceValueConfigRequest struct { func (x *CreateResourceValueConfigRequest) Reset() { *x = CreateResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateResourceValueConfigRequest) String() string { @@ -673,7 +655,7 @@ func (*CreateResourceValueConfigRequest) ProtoMessage() {} func (x *CreateResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +700,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -733,7 +713,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +760,9 @@ type DeleteBigQueryExportRequest struct { func (x *DeleteBigQueryExportRequest) Reset() { *x = DeleteBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBigQueryExportRequest) String() string { @@ -795,7 +773,7 @@ func (*DeleteBigQueryExportRequest) ProtoMessage() {} func (x *DeleteBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +817,9 @@ type DeleteMuteConfigRequest struct { func (x *DeleteMuteConfigRequest) Reset() { *x = DeleteMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMuteConfigRequest) String() string { @@ -854,7 +830,7 @@ func (*DeleteMuteConfigRequest) ProtoMessage() {} func (x *DeleteMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,11 +872,9 @@ type DeleteNotificationConfigRequest struct { func (x *DeleteNotificationConfigRequest) Reset() { *x = DeleteNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotificationConfigRequest) String() string { @@ -911,7 +885,7 @@ func (*DeleteNotificationConfigRequest) ProtoMessage() {} func (x *DeleteNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -945,11 +919,9 @@ type DeleteResourceValueConfigRequest struct { func (x *DeleteResourceValueConfigRequest) Reset() { *x = DeleteResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteResourceValueConfigRequest) String() string { @@ -960,7 +932,7 @@ func (*DeleteResourceValueConfigRequest) ProtoMessage() {} func (x *DeleteResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,11 +972,9 @@ type GetBigQueryExportRequest struct { func (x *GetBigQueryExportRequest) Reset() { *x = GetBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBigQueryExportRequest) String() string { @@ -1015,7 +985,7 @@ func (*GetBigQueryExportRequest) ProtoMessage() {} func (x *GetBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1029,9 @@ type GetMuteConfigRequest struct { func (x *GetMuteConfigRequest) Reset() { *x = GetMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMuteConfigRequest) String() string { @@ -1074,7 +1042,7 @@ func (*GetMuteConfigRequest) ProtoMessage() {} func (x *GetMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1116,11 +1084,9 @@ type GetNotificationConfigRequest struct { func (x *GetNotificationConfigRequest) Reset() { *x = GetNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationConfigRequest) String() string { @@ -1131,7 +1097,7 @@ func (*GetNotificationConfigRequest) ProtoMessage() {} func (x *GetNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1166,11 +1132,9 @@ type GetResourceValueConfigRequest struct { func (x *GetResourceValueConfigRequest) Reset() { *x = GetResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetResourceValueConfigRequest) String() string { @@ -1181,7 +1145,7 @@ func (*GetResourceValueConfigRequest) ProtoMessage() {} func (x *GetResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,11 +1180,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -1231,7 +1193,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,11 +1307,9 @@ type GroupFindingsRequest struct { func (x *GroupFindingsRequest) Reset() { *x = GroupFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsRequest) String() string { @@ -1360,7 +1320,7 @@ func (*GroupFindingsRequest) ProtoMessage() {} func (x *GroupFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1429,11 +1389,9 @@ type GroupFindingsResponse struct { func (x *GroupFindingsResponse) Reset() { *x = GroupFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupFindingsResponse) String() string { @@ -1444,7 +1402,7 @@ func (*GroupFindingsResponse) ProtoMessage() {} func (x *GroupFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1452,9 @@ type GroupResult struct { func (x *GroupResult) Reset() { *x = GroupResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GroupResult) String() string { @@ -1509,7 +1465,7 @@ func (*GroupResult) ProtoMessage() {} func (x *GroupResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,11 +1525,9 @@ type ListAttackPathsRequest struct { func (x *ListAttackPathsRequest) Reset() { *x = ListAttackPathsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttackPathsRequest) String() string { @@ -1584,7 +1538,7 @@ func (*ListAttackPathsRequest) ProtoMessage() {} func (x *ListAttackPathsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1643,11 +1597,9 @@ type ListAttackPathsResponse struct { func (x *ListAttackPathsResponse) Reset() { *x = ListAttackPathsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttackPathsResponse) String() string { @@ -1658,7 +1610,7 @@ func (*ListAttackPathsResponse) ProtoMessage() {} func (x *ListAttackPathsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1705,11 +1657,9 @@ type GetSimulationRequest struct { func (x *GetSimulationRequest) Reset() { *x = GetSimulationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSimulationRequest) String() string { @@ -1720,7 +1670,7 @@ func (*GetSimulationRequest) ProtoMessage() {} func (x *GetSimulationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1757,11 +1707,9 @@ type GetValuedResourceRequest struct { func (x *GetValuedResourceRequest) Reset() { *x = GetValuedResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetValuedResourceRequest) String() string { @@ -1772,7 +1720,7 @@ func (*GetValuedResourceRequest) ProtoMessage() {} func (x *GetValuedResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1820,11 +1768,9 @@ type ListBigQueryExportsRequest struct { func (x *ListBigQueryExportsRequest) Reset() { *x = ListBigQueryExportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryExportsRequest) String() string { @@ -1835,7 +1781,7 @@ func (*ListBigQueryExportsRequest) ProtoMessage() {} func (x *ListBigQueryExportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1886,11 +1832,9 @@ type ListBigQueryExportsResponse struct { func (x *ListBigQueryExportsResponse) Reset() { *x = ListBigQueryExportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBigQueryExportsResponse) String() string { @@ -1901,7 +1845,7 @@ func (*ListBigQueryExportsResponse) ProtoMessage() {} func (x *ListBigQueryExportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2039,11 +1983,9 @@ type ListFindingsRequest struct { func (x *ListFindingsRequest) Reset() { *x = ListFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsRequest) String() string { @@ -2054,7 +1996,7 @@ func (*ListFindingsRequest) ProtoMessage() {} func (x *ListFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2128,11 +2070,9 @@ type ListFindingsResponse struct { func (x *ListFindingsResponse) Reset() { *x = ListFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse) String() string { @@ -2143,7 +2083,7 @@ func (*ListFindingsResponse) ProtoMessage() {} func (x *ListFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2209,11 +2149,9 @@ type ListMuteConfigsRequest struct { func (x *ListMuteConfigsRequest) Reset() { *x = ListMuteConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMuteConfigsRequest) String() string { @@ -2224,7 +2162,7 @@ func (*ListMuteConfigsRequest) ProtoMessage() {} func (x *ListMuteConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2275,11 +2213,9 @@ type ListMuteConfigsResponse struct { func (x *ListMuteConfigsResponse) Reset() { *x = ListMuteConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMuteConfigsResponse) String() string { @@ -2290,7 +2226,7 @@ func (*ListMuteConfigsResponse) ProtoMessage() {} func (x *ListMuteConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2342,11 +2278,9 @@ type ListNotificationConfigsRequest struct { func (x *ListNotificationConfigsRequest) Reset() { *x = ListNotificationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsRequest) String() string { @@ -2357,7 +2291,7 @@ func (*ListNotificationConfigsRequest) ProtoMessage() {} func (x *ListNotificationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2408,11 +2342,9 @@ type ListNotificationConfigsResponse struct { func (x *ListNotificationConfigsResponse) Reset() { *x = ListNotificationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationConfigsResponse) String() string { @@ -2423,7 +2355,7 @@ func (*ListNotificationConfigsResponse) ProtoMessage() {} func (x *ListNotificationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2480,11 +2412,9 @@ type ListResourceValueConfigsRequest struct { func (x *ListResourceValueConfigsRequest) Reset() { *x = ListResourceValueConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourceValueConfigsRequest) String() string { @@ -2495,7 +2425,7 @@ func (*ListResourceValueConfigsRequest) ProtoMessage() {} func (x *ListResourceValueConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2546,11 +2476,9 @@ type ListResourceValueConfigsResponse struct { func (x *ListResourceValueConfigsResponse) Reset() { *x = ListResourceValueConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListResourceValueConfigsResponse) String() string { @@ -2561,7 +2489,7 @@ func (*ListResourceValueConfigsResponse) ProtoMessage() {} func (x *ListResourceValueConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2611,11 +2539,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -2626,7 +2552,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2677,11 +2603,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -2692,7 +2616,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2768,11 +2692,9 @@ type ListValuedResourcesRequest struct { func (x *ListValuedResourcesRequest) Reset() { *x = ListValuedResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListValuedResourcesRequest) String() string { @@ -2783,7 +2705,7 @@ func (*ListValuedResourcesRequest) ProtoMessage() {} func (x *ListValuedResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2850,11 +2772,9 @@ type ListValuedResourcesResponse struct { func (x *ListValuedResourcesResponse) Reset() { *x = ListValuedResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListValuedResourcesResponse) String() string { @@ -2865,7 +2785,7 @@ func (*ListValuedResourcesResponse) ProtoMessage() {} func (x *ListValuedResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2929,11 +2849,9 @@ type SetFindingStateRequest struct { func (x *SetFindingStateRequest) Reset() { *x = SetFindingStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetFindingStateRequest) String() string { @@ -2944,7 +2862,7 @@ func (*SetFindingStateRequest) ProtoMessage() {} func (x *SetFindingStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3001,11 +2919,9 @@ type SetMuteRequest struct { func (x *SetMuteRequest) Reset() { *x = SetMuteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetMuteRequest) String() string { @@ -3016,7 +2932,7 @@ func (*SetMuteRequest) ProtoMessage() {} func (x *SetMuteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3060,11 +2976,9 @@ type UpdateBigQueryExportRequest struct { func (x *UpdateBigQueryExportRequest) Reset() { *x = UpdateBigQueryExportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBigQueryExportRequest) String() string { @@ -3075,7 +2989,7 @@ func (*UpdateBigQueryExportRequest) ProtoMessage() {} func (x *UpdateBigQueryExportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3120,11 +3034,9 @@ type UpdateExternalSystemRequest struct { func (x *UpdateExternalSystemRequest) Reset() { *x = UpdateExternalSystemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExternalSystemRequest) String() string { @@ -3135,7 +3047,7 @@ func (*UpdateExternalSystemRequest) ProtoMessage() {} func (x *UpdateExternalSystemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3189,11 +3101,9 @@ type UpdateFindingRequest struct { func (x *UpdateFindingRequest) Reset() { *x = UpdateFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateFindingRequest) String() string { @@ -3204,7 +3114,7 @@ func (*UpdateFindingRequest) ProtoMessage() {} func (x *UpdateFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3248,11 +3158,9 @@ type UpdateMuteConfigRequest struct { func (x *UpdateMuteConfigRequest) Reset() { *x = UpdateMuteConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMuteConfigRequest) String() string { @@ -3263,7 +3171,7 @@ func (*UpdateMuteConfigRequest) ProtoMessage() {} func (x *UpdateMuteConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3308,11 +3216,9 @@ type UpdateNotificationConfigRequest struct { func (x *UpdateNotificationConfigRequest) Reset() { *x = UpdateNotificationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotificationConfigRequest) String() string { @@ -3323,7 +3229,7 @@ func (*UpdateNotificationConfigRequest) ProtoMessage() {} func (x *UpdateNotificationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3371,11 +3277,9 @@ type UpdateResourceValueConfigRequest struct { func (x *UpdateResourceValueConfigRequest) Reset() { *x = UpdateResourceValueConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateResourceValueConfigRequest) String() string { @@ -3386,7 +3290,7 @@ func (*UpdateResourceValueConfigRequest) ProtoMessage() {} func (x *UpdateResourceValueConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3433,11 +3337,9 @@ type UpdateSecurityMarksRequest struct { func (x *UpdateSecurityMarksRequest) Reset() { *x = UpdateSecurityMarksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityMarksRequest) String() string { @@ -3448,7 +3350,7 @@ func (*UpdateSecurityMarksRequest) ProtoMessage() {} func (x *UpdateSecurityMarksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3493,11 +3395,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -3508,7 +3408,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3551,11 +3451,9 @@ type ListFindingsResponse_ListFindingsResult struct { func (x *ListFindingsResponse_ListFindingsResult) Reset() { *x = ListFindingsResponse_ListFindingsResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult) String() string { @@ -3566,7 +3464,7 @@ func (*ListFindingsResponse_ListFindingsResult) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3638,11 +3536,9 @@ type ListFindingsResponse_ListFindingsResult_Resource struct { func (x *ListFindingsResponse_ListFindingsResult_Resource) Reset() { *x = ListFindingsResponse_ListFindingsResult_Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse_ListFindingsResult_Resource) String() string { @@ -3653,7 +3549,7 @@ func (*ListFindingsResponse_ListFindingsResult_Resource) ProtoMessage() {} func (x *ListFindingsResponse_ListFindingsResult_Resource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5749,632 +5645,6 @@ func file_google_cloud_securitycenter_v2_securitycenter_service_proto_init() { file_google_cloud_securitycenter_v2_simulation_proto_init() file_google_cloud_securitycenter_v2_source_proto_init() file_google_cloud_securitycenter_v2_valued_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateResourceValueConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateResourceValueConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BulkMuteFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BulkMuteFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GroupFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GroupResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListAttackPathsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListAttackPathsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetSimulationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GetValuedResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryExportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListBigQueryExportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListMuteConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListMuteConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListResourceValueConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListResourceValueConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListValuedResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListValuedResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*SetFindingStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*SetMuteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBigQueryExportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExternalSystemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*UpdateFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMuteConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotificationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*UpdateResourceValueConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityMarksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse_ListFindingsResult_Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_v2_securitycenter_service_proto_msgTypes[52].OneofWrappers = []any{ (*ListFindingsResponse_ListFindingsResult_Resource_GcpMetadata)(nil), (*ListFindingsResponse_ListFindingsResult_Resource_AwsMetadata)(nil), diff --git a/securitycenter/apiv2/securitycenterpb/simulation.pb.go b/securitycenter/apiv2/securitycenterpb/simulation.pb.go index 9a931dd03e2a..4da8f9e1eb03 100755 --- a/securitycenter/apiv2/securitycenterpb/simulation.pb.go +++ b/securitycenter/apiv2/securitycenterpb/simulation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/simulation.proto @@ -57,11 +57,9 @@ type Simulation struct { func (x *Simulation) Reset() { *x = Simulation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_simulation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_simulation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Simulation) String() string { @@ -72,7 +70,7 @@ func (*Simulation) ProtoMessage() {} func (x *Simulation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_simulation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,20 +221,6 @@ func file_google_cloud_securitycenter_v2_simulation_proto_init() { } file_google_cloud_securitycenter_v2_resource_proto_init() file_google_cloud_securitycenter_v2_valued_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_simulation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Simulation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/source.pb.go b/securitycenter/apiv2/securitycenterpb/source.pb.go index d9c50bed4e8e..3a526af1dd35 100755 --- a/securitycenter/apiv2/securitycenterpb/source.pb.go +++ b/securitycenter/apiv2/securitycenterpb/source.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/source.proto @@ -75,11 +75,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -90,7 +88,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,20 +206,6 @@ func file_google_cloud_securitycenter_v2_source_proto_init() { if File_google_cloud_securitycenter_v2_source_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/toxic_combination.pb.go b/securitycenter/apiv2/securitycenterpb/toxic_combination.pb.go index 0aa4c89d30e9..7997e5c85446 100755 --- a/securitycenter/apiv2/securitycenterpb/toxic_combination.pb.go +++ b/securitycenter/apiv2/securitycenterpb/toxic_combination.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/toxic_combination.proto @@ -57,11 +57,9 @@ type ToxicCombination struct { func (x *ToxicCombination) Reset() { *x = ToxicCombination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_toxic_combination_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_toxic_combination_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ToxicCombination) String() string { @@ -72,7 +70,7 @@ func (*ToxicCombination) ProtoMessage() {} func (x *ToxicCombination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_toxic_combination_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,20 +162,6 @@ func file_google_cloud_securitycenter_v2_toxic_combination_proto_init() { if File_google_cloud_securitycenter_v2_toxic_combination_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_toxic_combination_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ToxicCombination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/valued_resource.pb.go b/securitycenter/apiv2/securitycenterpb/valued_resource.pb.go index c03a53f6938f..c2e218d6d467 100755 --- a/securitycenter/apiv2/securitycenterpb/valued_resource.pb.go +++ b/securitycenter/apiv2/securitycenterpb/valued_resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/valued_resource.proto @@ -127,11 +127,9 @@ type ValuedResource struct { func (x *ValuedResource) Reset() { *x = ValuedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValuedResource) String() string { @@ -142,7 +140,7 @@ func (*ValuedResource) ProtoMessage() {} func (x *ValuedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type ResourceValueConfigMetadata struct { func (x *ResourceValueConfigMetadata) Reset() { *x = ResourceValueConfigMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceValueConfigMetadata) String() string { @@ -233,7 +229,7 @@ func (*ResourceValueConfigMetadata) ProtoMessage() {} func (x *ResourceValueConfigMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,32 +367,6 @@ func file_google_cloud_securitycenter_v2_valued_resource_proto_init() { if File_google_cloud_securitycenter_v2_valued_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ValuedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_valued_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceValueConfigMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/apiv2/securitycenterpb/vulnerability.pb.go b/securitycenter/apiv2/securitycenterpb/vulnerability.pb.go index f15e6eb9bb06..ff45f6871eb9 100755 --- a/securitycenter/apiv2/securitycenterpb/vulnerability.pb.go +++ b/securitycenter/apiv2/securitycenterpb/vulnerability.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/v2/vulnerability.proto @@ -551,11 +551,9 @@ type Vulnerability struct { func (x *Vulnerability) Reset() { *x = Vulnerability{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vulnerability) String() string { @@ -566,7 +564,7 @@ func (*Vulnerability) ProtoMessage() {} func (x *Vulnerability) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +641,9 @@ type Cve struct { func (x *Cve) Reset() { *x = Cve{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cve) String() string { @@ -658,7 +654,7 @@ func (*Cve) ProtoMessage() {} func (x *Cve) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -751,11 +747,9 @@ type Reference struct { func (x *Reference) Reset() { *x = Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reference) String() string { @@ -766,7 +760,7 @@ func (*Reference) ProtoMessage() {} func (x *Reference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -836,11 +830,9 @@ type Cvssv3 struct { func (x *Cvssv3) Reset() { *x = Cvssv3{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cvssv3) String() string { @@ -851,7 +843,7 @@ func (*Cvssv3) ProtoMessage() {} func (x *Cvssv3) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +939,9 @@ type Package struct { func (x *Package) Reset() { *x = Package{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Package) String() string { @@ -962,7 +952,7 @@ func (*Package) ProtoMessage() {} func (x *Package) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,11 +1012,9 @@ type SecurityBulletin struct { func (x *SecurityBulletin) Reset() { *x = SecurityBulletin{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityBulletin) String() string { @@ -1037,7 +1025,7 @@ func (*SecurityBulletin) ProtoMessage() {} func (x *SecurityBulletin) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,80 +1337,6 @@ func file_google_cloud_securitycenter_v2_vulnerability_proto_init() { if File_google_cloud_securitycenter_v2_vulnerability_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vulnerability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Cve); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cvssv3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Package); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_v2_vulnerability_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SecurityBulletin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/settings/apiv1beta1/helpers.go b/securitycenter/settings/apiv1beta1/helpers.go index 2b13edc07af4..f4b5fb6edc22 100755 --- a/securitycenter/settings/apiv1beta1/helpers.go +++ b/securitycenter/settings/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package settings import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycenter.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycenter/settings/apiv1beta1/security_center_settings_client.go b/securitycenter/settings/apiv1beta1/security_center_settings_client.go index 65220c3aa6a8..de0be5d3c1f7 100755 --- a/securitycenter/settings/apiv1beta1/security_center_settings_client.go +++ b/securitycenter/settings/apiv1beta1/security_center_settings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( settingspb "cloud.google.com/go/securitycenter/settings/apiv1beta1/settingspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -582,6 +581,8 @@ type securityCenterSettingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSecurityCenterSettingsClient creates a new security center settings service client based on gRPC. @@ -611,6 +612,7 @@ func NewSecurityCenterSettingsClient(ctx context.Context, opts ...option.ClientO connPool: connPool, securityCenterSettingsClient: settingspb.NewSecurityCenterSettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -657,6 +659,8 @@ type securityCenterSettingsRESTClient struct { // Points back to the CallOptions field of the containing SecurityCenterSettingsClient CallOptions **SecurityCenterSettingsCallOptions + + logger *slog.Logger } // NewSecurityCenterSettingsRESTClient creates a new security center settings service rest client. @@ -677,6 +681,7 @@ func NewSecurityCenterSettingsRESTClient(ctx context.Context, opts ...option.Cli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -729,7 +734,7 @@ func (c *securityCenterSettingsGRPCClient) GetServiceAccount(ctx context.Context var resp *settingspb.ServiceAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.GetServiceAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.GetServiceAccount, req, settings.GRPC, c.logger, "GetServiceAccount") return err }, opts...) if err != nil { @@ -747,7 +752,7 @@ func (c *securityCenterSettingsGRPCClient) GetSettings(ctx context.Context, req var resp *settingspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.GetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.GetSettings, req, settings.GRPC, c.logger, "GetSettings") return err }, opts...) if err != nil { @@ -765,7 +770,7 @@ func (c *securityCenterSettingsGRPCClient) UpdateSettings(ctx context.Context, r var resp *settingspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.UpdateSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.UpdateSettings, req, settings.GRPC, c.logger, "UpdateSettings") return err }, opts...) if err != nil { @@ -782,7 +787,7 @@ func (c *securityCenterSettingsGRPCClient) ResetSettings(ctx context.Context, re opts = append((*c.CallOptions).ResetSettings[0:len((*c.CallOptions).ResetSettings):len((*c.CallOptions).ResetSettings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.securityCenterSettingsClient.ResetSettings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.securityCenterSettingsClient.ResetSettings, req, settings.GRPC, c.logger, "ResetSettings") return err }, opts...) return err @@ -797,7 +802,7 @@ func (c *securityCenterSettingsGRPCClient) BatchGetSettings(ctx context.Context, var resp *settingspb.BatchGetSettingsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.BatchGetSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.BatchGetSettings, req, settings.GRPC, c.logger, "BatchGetSettings") return err }, opts...) if err != nil { @@ -815,7 +820,7 @@ func (c *securityCenterSettingsGRPCClient) CalculateEffectiveSettings(ctx contex var resp *settingspb.Settings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.CalculateEffectiveSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.CalculateEffectiveSettings, req, settings.GRPC, c.logger, "CalculateEffectiveSettings") return err }, opts...) if err != nil { @@ -833,7 +838,7 @@ func (c *securityCenterSettingsGRPCClient) BatchCalculateEffectiveSettings(ctx c var resp *settingspb.BatchCalculateEffectiveSettingsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.BatchCalculateEffectiveSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.BatchCalculateEffectiveSettings, req, settings.GRPC, c.logger, "BatchCalculateEffectiveSettings") return err }, opts...) if err != nil { @@ -851,7 +856,7 @@ func (c *securityCenterSettingsGRPCClient) GetComponentSettings(ctx context.Cont var resp *settingspb.ComponentSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.GetComponentSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.GetComponentSettings, req, settings.GRPC, c.logger, "GetComponentSettings") return err }, opts...) if err != nil { @@ -869,7 +874,7 @@ func (c *securityCenterSettingsGRPCClient) UpdateComponentSettings(ctx context.C var resp *settingspb.ComponentSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.UpdateComponentSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.UpdateComponentSettings, req, settings.GRPC, c.logger, "UpdateComponentSettings") return err }, opts...) if err != nil { @@ -886,7 +891,7 @@ func (c *securityCenterSettingsGRPCClient) ResetComponentSettings(ctx context.Co opts = append((*c.CallOptions).ResetComponentSettings[0:len((*c.CallOptions).ResetComponentSettings):len((*c.CallOptions).ResetComponentSettings)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.securityCenterSettingsClient.ResetComponentSettings(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.securityCenterSettingsClient.ResetComponentSettings, req, settings.GRPC, c.logger, "ResetComponentSettings") return err }, opts...) return err @@ -901,7 +906,7 @@ func (c *securityCenterSettingsGRPCClient) CalculateEffectiveComponentSettings(c var resp *settingspb.ComponentSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.CalculateEffectiveComponentSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.CalculateEffectiveComponentSettings, req, settings.GRPC, c.logger, "CalculateEffectiveComponentSettings") return err }, opts...) if err != nil { @@ -930,7 +935,7 @@ func (c *securityCenterSettingsGRPCClient) ListDetectors(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.ListDetectors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.ListDetectors, req, settings.GRPC, c.logger, "ListDetectors") return err }, opts...) if err != nil { @@ -976,7 +981,7 @@ func (c *securityCenterSettingsGRPCClient) ListComponents(ctx context.Context, r } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.securityCenterSettingsClient.ListComponents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.securityCenterSettingsClient.ListComponents, req, settings.GRPC, c.logger, "ListComponents") return err }, opts...) if err != nil { @@ -1039,17 +1044,7 @@ func (c *securityCenterSettingsRESTClient) GetServiceAccount(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServiceAccount") if err != nil { return err } @@ -1094,17 +1089,7 @@ func (c *securityCenterSettingsRESTClient) GetSettings(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSettings") if err != nil { return err } @@ -1167,17 +1152,7 @@ func (c *securityCenterSettingsRESTClient) UpdateSettings(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSettings") if err != nil { return err } @@ -1234,15 +1209,8 @@ func (c *securityCenterSettingsRESTClient) ResetSettings(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetSettings") + return err }, opts...) } @@ -1283,17 +1251,7 @@ func (c *securityCenterSettingsRESTClient) BatchGetSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetSettings") if err != nil { return err } @@ -1351,17 +1309,7 @@ func (c *securityCenterSettingsRESTClient) CalculateEffectiveSettings(ctx contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateEffectiveSettings") if err != nil { return err } @@ -1412,17 +1360,7 @@ func (c *securityCenterSettingsRESTClient) BatchCalculateEffectiveSettings(ctx c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCalculateEffectiveSettings") if err != nil { return err } @@ -1467,17 +1405,7 @@ func (c *securityCenterSettingsRESTClient) GetComponentSettings(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetComponentSettings") if err != nil { return err } @@ -1540,17 +1468,7 @@ func (c *securityCenterSettingsRESTClient) UpdateComponentSettings(ctx context.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateComponentSettings") if err != nil { return err } @@ -1602,15 +1520,8 @@ func (c *securityCenterSettingsRESTClient) ResetComponentSettings(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetComponentSettings") + return err }, opts...) } @@ -1642,17 +1553,7 @@ func (c *securityCenterSettingsRESTClient) CalculateEffectiveComponentSettings(c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CalculateEffectiveComponentSettings") if err != nil { return err } @@ -1716,21 +1617,10 @@ func (c *securityCenterSettingsRESTClient) ListDetectors(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDetectors") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1804,21 +1694,10 @@ func (c *securityCenterSettingsRESTClient) ListComponents(ctx context.Context, r } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListComponents") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securitycenter/settings/apiv1beta1/security_center_settings_client_example_go123_test.go b/securitycenter/settings/apiv1beta1/security_center_settings_client_example_go123_test.go index d9f21d534b47..a160554454b8 100644 --- a/securitycenter/settings/apiv1beta1/security_center_settings_client_example_go123_test.go +++ b/securitycenter/settings/apiv1beta1/security_center_settings_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleSecurityCenterSettingsClient_ListComponents_all() { } for resp, err := range c.ListComponents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleSecurityCenterSettingsClient_ListDetectors_all() { } for resp, err := range c.ListDetectors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycenter/settings/apiv1beta1/settingspb/billing_settings.pb.go b/securitycenter/settings/apiv1beta1/settingspb/billing_settings.pb.go index 14231d6b1cac..d4a24d6bf405 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/billing_settings.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/billing_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/billing_settings.proto @@ -169,11 +169,9 @@ type BillingSettings struct { func (x *BillingSettings) Reset() { *x = BillingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BillingSettings) String() string { @@ -184,7 +182,7 @@ func (*BillingSettings) ProtoMessage() {} func (x *BillingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,20 +331,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_in if File_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BillingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/settings/apiv1beta1/settingspb/component_settings.pb.go b/securitycenter/settings/apiv1beta1/settingspb/component_settings.pb.go index aa1b45b3fe28..0687ad3ab56b 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/component_settings.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/component_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/component_settings.proto @@ -138,11 +138,9 @@ type ComponentSettings struct { func (x *ComponentSettings) Reset() { *x = ComponentSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentSettings) String() string { @@ -153,7 +151,7 @@ func (*ComponentSettings) ProtoMessage() {} func (x *ComponentSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +288,9 @@ type WebSecurityScanner struct { func (x *WebSecurityScanner) Reset() { *x = WebSecurityScanner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebSecurityScanner) String() string { @@ -305,7 +301,7 @@ func (*WebSecurityScanner) ProtoMessage() {} func (x *WebSecurityScanner) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +325,9 @@ type ContainerThreatDetectionSettings struct { func (x *ContainerThreatDetectionSettings) Reset() { *x = ContainerThreatDetectionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerThreatDetectionSettings) String() string { @@ -344,7 +338,7 @@ func (*ContainerThreatDetectionSettings) ProtoMessage() {} func (x *ContainerThreatDetectionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +362,9 @@ type EventThreatDetectionSettings struct { func (x *EventThreatDetectionSettings) Reset() { *x = EventThreatDetectionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventThreatDetectionSettings) String() string { @@ -383,7 +375,7 @@ func (*EventThreatDetectionSettings) ProtoMessage() {} func (x *EventThreatDetectionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +404,9 @@ type SecurityHealthAnalyticsSettings struct { func (x *SecurityHealthAnalyticsSettings) Reset() { *x = SecurityHealthAnalyticsSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsSettings) String() string { @@ -427,7 +417,7 @@ func (*SecurityHealthAnalyticsSettings) ProtoMessage() {} func (x *SecurityHealthAnalyticsSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +459,9 @@ type ComponentSettings_DetectorSettings struct { func (x *ComponentSettings_DetectorSettings) Reset() { *x = ComponentSettings_DetectorSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentSettings_DetectorSettings) String() string { @@ -484,7 +472,7 @@ func (*ComponentSettings_DetectorSettings) ProtoMessage() {} func (x *ComponentSettings_DetectorSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,11 +517,9 @@ type SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings struct { func (x *SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings) Reset() { *x = SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings) String() string { @@ -544,7 +530,7 @@ func (*SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings) ProtoMessage() { func (x *SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,11 +574,9 @@ type SecurityHealthAnalyticsSettings_AdminServiceAccountSettings struct { func (x *SecurityHealthAnalyticsSettings_AdminServiceAccountSettings) Reset() { *x = SecurityHealthAnalyticsSettings_AdminServiceAccountSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsSettings_AdminServiceAccountSettings) String() string { @@ -603,7 +587,7 @@ func (*SecurityHealthAnalyticsSettings_AdminServiceAccountSettings) ProtoMessage func (x *SecurityHealthAnalyticsSettings_AdminServiceAccountSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,104 +857,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_ if File_google_cloud_securitycenter_settings_v1beta1_component_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComponentSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WebSecurityScanner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ContainerThreatDetectionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*EventThreatDetectionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ComponentSettings_DetectorSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsSettings_NonOrgIamMemberSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsSettings_AdminServiceAccountSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_msgTypes[0].OneofWrappers = []any{ (*ComponentSettings_ContainerThreatDetectionSettings)(nil), (*ComponentSettings_EventThreatDetectionSettings)(nil), diff --git a/securitycenter/settings/apiv1beta1/settingspb/detector.pb.go b/securitycenter/settings/apiv1beta1/settingspb/detector.pb.go index 7909f3f3a7e0..5e03bcf3f939 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/detector.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/detector.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/detector.proto @@ -66,11 +66,9 @@ type Detector struct { func (x *Detector) Reset() { *x = Detector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_detector_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_detector_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Detector) String() string { @@ -81,7 +79,7 @@ func (*Detector) ProtoMessage() {} func (x *Detector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_detector_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -208,20 +206,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_detector_proto_init() { return } file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_detector_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Detector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/settings/apiv1beta1/settingspb/securitycenter_settings_service.pb.go b/securitycenter/settings/apiv1beta1/settingspb/securitycenter_settings_service.pb.go index 9be09001b8a6..a18be3aada9a 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/securitycenter_settings_service.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/securitycenter_settings_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/securitycenter_settings_service.proto @@ -56,11 +56,9 @@ type GetServiceAccountRequest struct { func (x *GetServiceAccountRequest) Reset() { *x = GetServiceAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceAccountRequest) String() string { @@ -71,7 +69,7 @@ func (*GetServiceAccountRequest) ProtoMessage() {} func (x *GetServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -113,11 +111,9 @@ type ServiceAccount struct { func (x *ServiceAccount) Reset() { *x = ServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceAccount) String() string { @@ -128,7 +124,7 @@ func (*ServiceAccount) ProtoMessage() {} func (x *ServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +172,9 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSettingsRequest) String() string { @@ -191,7 +185,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,11 +230,9 @@ type UpdateSettingsRequest struct { func (x *UpdateSettingsRequest) Reset() { *x = UpdateSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSettingsRequest) String() string { @@ -251,7 +243,7 @@ func (*UpdateSettingsRequest) ProtoMessage() {} func (x *UpdateSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +294,9 @@ type ResetSettingsRequest struct { func (x *ResetSettingsRequest) Reset() { *x = ResetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetSettingsRequest) String() string { @@ -317,7 +307,7 @@ func (*ResetSettingsRequest) ProtoMessage() {} func (x *ResetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -371,11 +361,9 @@ type BatchGetSettingsRequest struct { func (x *BatchGetSettingsRequest) Reset() { *x = BatchGetSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetSettingsRequest) String() string { @@ -386,7 +374,7 @@ func (*BatchGetSettingsRequest) ProtoMessage() {} func (x *BatchGetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +415,9 @@ type BatchGetSettingsResponse struct { func (x *BatchGetSettingsResponse) Reset() { *x = BatchGetSettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetSettingsResponse) String() string { @@ -442,7 +428,7 @@ func (*BatchGetSettingsResponse) ProtoMessage() {} func (x *BatchGetSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +469,9 @@ type CalculateEffectiveSettingsRequest struct { func (x *CalculateEffectiveSettingsRequest) Reset() { *x = CalculateEffectiveSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateEffectiveSettingsRequest) String() string { @@ -498,7 +482,7 @@ func (*CalculateEffectiveSettingsRequest) ProtoMessage() {} func (x *CalculateEffectiveSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +522,9 @@ type BatchCalculateEffectiveSettingsRequest struct { func (x *BatchCalculateEffectiveSettingsRequest) Reset() { *x = BatchCalculateEffectiveSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCalculateEffectiveSettingsRequest) String() string { @@ -553,7 +535,7 @@ func (*BatchCalculateEffectiveSettingsRequest) ProtoMessage() {} func (x *BatchCalculateEffectiveSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +576,9 @@ type BatchCalculateEffectiveSettingsResponse struct { func (x *BatchCalculateEffectiveSettingsResponse) Reset() { *x = BatchCalculateEffectiveSettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCalculateEffectiveSettingsResponse) String() string { @@ -609,7 +589,7 @@ func (*BatchCalculateEffectiveSettingsResponse) ProtoMessage() {} func (x *BatchCalculateEffectiveSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +631,9 @@ type GetComponentSettingsRequest struct { func (x *GetComponentSettingsRequest) Reset() { *x = GetComponentSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetComponentSettingsRequest) String() string { @@ -666,7 +644,7 @@ func (*GetComponentSettingsRequest) ProtoMessage() {} func (x *GetComponentSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +689,9 @@ type UpdateComponentSettingsRequest struct { func (x *UpdateComponentSettingsRequest) Reset() { *x = UpdateComponentSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateComponentSettingsRequest) String() string { @@ -726,7 +702,7 @@ func (*UpdateComponentSettingsRequest) ProtoMessage() {} func (x *UpdateComponentSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +754,9 @@ type ResetComponentSettingsRequest struct { func (x *ResetComponentSettingsRequest) Reset() { *x = ResetComponentSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetComponentSettingsRequest) String() string { @@ -793,7 +767,7 @@ func (*ResetComponentSettingsRequest) ProtoMessage() {} func (x *ResetComponentSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -842,11 +816,9 @@ type CalculateEffectiveComponentSettingsRequest struct { func (x *CalculateEffectiveComponentSettingsRequest) Reset() { *x = CalculateEffectiveComponentSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CalculateEffectiveComponentSettingsRequest) String() string { @@ -857,7 +829,7 @@ func (*CalculateEffectiveComponentSettingsRequest) ProtoMessage() {} func (x *CalculateEffectiveComponentSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -915,11 +887,9 @@ type ListDetectorsRequest struct { func (x *ListDetectorsRequest) Reset() { *x = ListDetectorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDetectorsRequest) String() string { @@ -930,7 +900,7 @@ func (*ListDetectorsRequest) ProtoMessage() {} func (x *ListDetectorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +958,9 @@ type ListDetectorsResponse struct { func (x *ListDetectorsResponse) Reset() { *x = ListDetectorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDetectorsResponse) String() string { @@ -1003,7 +971,7 @@ func (*ListDetectorsResponse) ProtoMessage() {} func (x *ListDetectorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,11 +1024,9 @@ type ListComponentsRequest struct { func (x *ListComponentsRequest) Reset() { *x = ListComponentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListComponentsRequest) String() string { @@ -1071,7 +1037,7 @@ func (*ListComponentsRequest) ProtoMessage() {} func (x *ListComponentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1088,9 @@ type ListComponentsResponse struct { func (x *ListComponentsResponse) Reset() { *x = ListComponentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListComponentsResponse) String() string { @@ -1137,7 +1101,7 @@ func (*ListComponentsResponse) ProtoMessage() {} func (x *ListComponentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1880,224 +1844,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_s file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_init() file_google_cloud_securitycenter_settings_v1beta1_detector_proto_init() file_google_cloud_securitycenter_settings_v1beta1_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetSettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CalculateEffectiveSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchCalculateEffectiveSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchCalculateEffectiveSettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetComponentSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateComponentSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ResetComponentSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CalculateEffectiveComponentSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListDetectorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListDetectorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListComponentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_securitycenter_settings_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListComponentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/settings/apiv1beta1/settingspb/settings.pb.go b/securitycenter/settings/apiv1beta1/settingspb/settings.pb.go index 1c3c38aad694..343fa7fd0108 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/settings.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/settings.proto @@ -151,11 +151,9 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings) String() string { @@ -166,7 +164,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +254,9 @@ type Settings_DetectorGroupSettings struct { func (x *Settings_DetectorGroupSettings) Reset() { *x = Settings_DetectorGroupSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Settings_DetectorGroupSettings) String() string { @@ -271,7 +267,7 @@ func (*Settings_DetectorGroupSettings) ProtoMessage() {} func (x *Settings_DetectorGroupSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,32 +494,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_settings_proto_init() { file_google_cloud_securitycenter_settings_v1beta1_billing_settings_proto_init() file_google_cloud_securitycenter_settings_v1beta1_component_settings_proto_init() file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Settings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycenter_settings_v1beta1_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Settings_DetectorGroupSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycenter/settings/apiv1beta1/settingspb/sink_settings.pb.go b/securitycenter/settings/apiv1beta1/settingspb/sink_settings.pb.go index b1a894a7614d..9f45064c9182 100755 --- a/securitycenter/settings/apiv1beta1/settingspb/sink_settings.pb.go +++ b/securitycenter/settings/apiv1beta1/settingspb/sink_settings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycenter/settings/v1beta1/sink_settings.proto @@ -51,11 +51,9 @@ type SinkSettings struct { func (x *SinkSettings) Reset() { *x = SinkSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SinkSettings) String() string { @@ -66,7 +64,7 @@ func (*SinkSettings) ProtoMessage() {} func (x *SinkSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,20 +150,6 @@ func file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_init( if File_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycenter_settings_v1beta1_sink_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SinkSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securitycentermanagement/apiv1/helpers.go b/securitycentermanagement/apiv1/helpers.go index af66f2535a54..4699690635fc 100755 --- a/securitycentermanagement/apiv1/helpers.go +++ b/securitycentermanagement/apiv1/helpers.go @@ -18,10 +18,20 @@ package securitycentermanagement import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securitycentermanagement.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securitycentermanagement/apiv1/security_center_management_client.go b/securitycentermanagement/apiv1/security_center_management_client.go index 0f94d32b592d..ac3cdf3f7379 100755 --- a/securitycentermanagement/apiv1/security_center_management_client.go +++ b/securitycentermanagement/apiv1/security_center_management_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( securitycentermanagementpb "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -694,6 +693,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security center management client based on gRPC. @@ -720,6 +721,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securitycentermanagementpb.NewSecurityCenterManagementClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -767,6 +769,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security center management rest client. @@ -784,6 +788,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -847,7 +852,7 @@ func (c *gRPCClient) ListEffectiveSecurityHealthAnalyticsCustomModules(ctx conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEffectiveSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEffectiveSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListEffectiveSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -882,7 +887,7 @@ func (c *gRPCClient) GetEffectiveSecurityHealthAnalyticsCustomModule(ctx context var resp *securitycentermanagementpb.EffectiveSecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEffectiveSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEffectiveSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "GetEffectiveSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -911,7 +916,7 @@ func (c *gRPCClient) ListSecurityHealthAnalyticsCustomModules(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -957,7 +962,7 @@ func (c *gRPCClient) ListDescendantSecurityHealthAnalyticsCustomModules(ctx cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDescendantSecurityHealthAnalyticsCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDescendantSecurityHealthAnalyticsCustomModules, req, settings.GRPC, c.logger, "ListDescendantSecurityHealthAnalyticsCustomModules") return err }, opts...) if err != nil { @@ -992,7 +997,7 @@ func (c *gRPCClient) GetSecurityHealthAnalyticsCustomModule(ctx context.Context, var resp *securitycentermanagementpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "GetSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1010,7 +1015,7 @@ func (c *gRPCClient) CreateSecurityHealthAnalyticsCustomModule(ctx context.Conte var resp *securitycentermanagementpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "CreateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1028,7 +1033,7 @@ func (c *gRPCClient) UpdateSecurityHealthAnalyticsCustomModule(ctx context.Conte var resp *securitycentermanagementpb.SecurityHealthAnalyticsCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "UpdateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1045,7 +1050,7 @@ func (c *gRPCClient) DeleteSecurityHealthAnalyticsCustomModule(ctx context.Conte opts = append((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule[0:len((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule):len((*c.CallOptions).DeleteSecurityHealthAnalyticsCustomModule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "DeleteSecurityHealthAnalyticsCustomModule") return err }, opts...) return err @@ -1060,7 +1065,7 @@ func (c *gRPCClient) SimulateSecurityHealthAnalyticsCustomModule(ctx context.Con var resp *securitycentermanagementpb.SimulateSecurityHealthAnalyticsCustomModuleResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SimulateSecurityHealthAnalyticsCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SimulateSecurityHealthAnalyticsCustomModule, req, settings.GRPC, c.logger, "SimulateSecurityHealthAnalyticsCustomModule") return err }, opts...) if err != nil { @@ -1089,7 +1094,7 @@ func (c *gRPCClient) ListEffectiveEventThreatDetectionCustomModules(ctx context. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEffectiveEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEffectiveEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListEffectiveEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -1124,7 +1129,7 @@ func (c *gRPCClient) GetEffectiveEventThreatDetectionCustomModule(ctx context.Co var resp *securitycentermanagementpb.EffectiveEventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEffectiveEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEffectiveEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "GetEffectiveEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -1153,7 +1158,7 @@ func (c *gRPCClient) ListEventThreatDetectionCustomModules(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *gRPCClient) ListDescendantEventThreatDetectionCustomModules(ctx context } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDescendantEventThreatDetectionCustomModules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDescendantEventThreatDetectionCustomModules, req, settings.GRPC, c.logger, "ListDescendantEventThreatDetectionCustomModules") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *gRPCClient) GetEventThreatDetectionCustomModule(ctx context.Context, re var resp *securitycentermanagementpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "GetEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) CreateEventThreatDetectionCustomModule(ctx context.Context, var resp *securitycentermanagementpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "CreateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *gRPCClient) UpdateEventThreatDetectionCustomModule(ctx context.Context, var resp *securitycentermanagementpb.EventThreatDetectionCustomModule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "UpdateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *gRPCClient) DeleteEventThreatDetectionCustomModule(ctx context.Context, opts = append((*c.CallOptions).DeleteEventThreatDetectionCustomModule[0:len((*c.CallOptions).DeleteEventThreatDetectionCustomModule):len((*c.CallOptions).DeleteEventThreatDetectionCustomModule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "DeleteEventThreatDetectionCustomModule") return err }, opts...) return err @@ -1302,7 +1307,7 @@ func (c *gRPCClient) ValidateEventThreatDetectionCustomModule(ctx context.Contex var resp *securitycentermanagementpb.ValidateEventThreatDetectionCustomModuleResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ValidateEventThreatDetectionCustomModule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ValidateEventThreatDetectionCustomModule, req, settings.GRPC, c.logger, "ValidateEventThreatDetectionCustomModule") return err }, opts...) if err != nil { @@ -1320,7 +1325,7 @@ func (c *gRPCClient) GetSecurityCenterService(ctx context.Context, req *security var resp *securitycentermanagementpb.SecurityCenterService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSecurityCenterService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSecurityCenterService, req, settings.GRPC, c.logger, "GetSecurityCenterService") return err }, opts...) if err != nil { @@ -1349,7 +1354,7 @@ func (c *gRPCClient) ListSecurityCenterServices(ctx context.Context, req *securi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSecurityCenterServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSecurityCenterServices, req, settings.GRPC, c.logger, "ListSecurityCenterServices") return err }, opts...) if err != nil { @@ -1384,7 +1389,7 @@ func (c *gRPCClient) UpdateSecurityCenterService(ctx context.Context, req *secur var resp *securitycentermanagementpb.SecurityCenterService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSecurityCenterService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSecurityCenterService, req, settings.GRPC, c.logger, "UpdateSecurityCenterService") return err }, opts...) if err != nil { @@ -1402,7 +1407,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1431,7 +1436,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1506,21 +1511,10 @@ func (c *restClient) ListEffectiveSecurityHealthAnalyticsCustomModules(ctx conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveSecurityHealthAnalyticsCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1584,17 +1578,7 @@ func (c *restClient) GetEffectiveSecurityHealthAnalyticsCustomModule(ctx context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -1660,21 +1644,10 @@ func (c *restClient) ListSecurityHealthAnalyticsCustomModules(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecurityHealthAnalyticsCustomModules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1752,21 +1725,10 @@ func (c *restClient) ListDescendantSecurityHealthAnalyticsCustomModules(ctx cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDescendantSecurityHealthAnalyticsCustomModules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1830,17 +1792,7 @@ func (c *restClient) GetSecurityHealthAnalyticsCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -1905,17 +1857,7 @@ func (c *restClient) CreateSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -1988,17 +1930,7 @@ func (c *restClient) UpdateSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -2051,15 +1983,8 @@ func (c *restClient) DeleteSecurityHealthAnalyticsCustomModule(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSecurityHealthAnalyticsCustomModule") + return err }, opts...) } @@ -2104,17 +2029,7 @@ func (c *restClient) SimulateSecurityHealthAnalyticsCustomModule(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SimulateSecurityHealthAnalyticsCustomModule") if err != nil { return err } @@ -2178,21 +2093,10 @@ func (c *restClient) ListEffectiveEventThreatDetectionCustomModules(ctx context. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEffectiveEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2266,17 +2170,7 @@ func (c *restClient) GetEffectiveEventThreatDetectionCustomModule(ctx context.Co httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEffectiveEventThreatDetectionCustomModule") if err != nil { return err } @@ -2340,21 +2234,10 @@ func (c *restClient) ListEventThreatDetectionCustomModules(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2430,21 +2313,10 @@ func (c *restClient) ListDescendantEventThreatDetectionCustomModules(ctx context } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDescendantEventThreatDetectionCustomModules") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2507,17 +2379,7 @@ func (c *restClient) GetEventThreatDetectionCustomModule(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEventThreatDetectionCustomModule") if err != nil { return err } @@ -2580,17 +2442,7 @@ func (c *restClient) CreateEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEventThreatDetectionCustomModule") if err != nil { return err } @@ -2662,17 +2514,7 @@ func (c *restClient) UpdateEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEventThreatDetectionCustomModule") if err != nil { return err } @@ -2724,15 +2566,8 @@ func (c *restClient) DeleteEventThreatDetectionCustomModule(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEventThreatDetectionCustomModule") + return err }, opts...) } @@ -2775,17 +2610,7 @@ func (c *restClient) ValidateEventThreatDetectionCustomModule(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ValidateEventThreatDetectionCustomModule") if err != nil { return err } @@ -2838,17 +2663,7 @@ func (c *restClient) GetSecurityCenterService(ctx context.Context, req *security httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSecurityCenterService") if err != nil { return err } @@ -2914,21 +2729,10 @@ func (c *restClient) ListSecurityCenterServices(ctx context.Context, req *securi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSecurityCenterServices") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3008,17 +2812,7 @@ func (c *restClient) UpdateSecurityCenterService(ctx context.Context, req *secur httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSecurityCenterService") if err != nil { return err } @@ -3068,17 +2862,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3143,21 +2927,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securitycentermanagement/apiv1/security_center_management_client_example_go123_test.go b/securitycentermanagement/apiv1/security_center_management_client_example_go123_test.go index 301e598aa8db..53a3ca5ae64f 100644 --- a/securitycentermanagement/apiv1/security_center_management_client_example_go123_test.go +++ b/securitycentermanagement/apiv1/security_center_management_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListDescendantEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListDescendantEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListDescendantSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListDescendantSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListEffectiveEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListEffectiveEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListEffectiveSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListEffectiveSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListEventThreatDetectionCustomModules_all() { } for resp, err := range c.ListEventThreatDetectionCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListSecurityCenterServices_all() { } for resp, err := range c.ListSecurityCenterServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleClient_ListSecurityHealthAnalyticsCustomModules_all() { } for resp, err := range c.ListSecurityHealthAnalyticsCustomModules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securitycentermanagement/apiv1/securitycentermanagementpb/security_center_management.pb.go b/securitycentermanagement/apiv1/securitycentermanagementpb/security_center_management.pb.go index 613618f0eb01..b11cb76d552d 100755 --- a/securitycentermanagement/apiv1/securitycentermanagementpb/security_center_management.pb.go +++ b/securitycentermanagement/apiv1/securitycentermanagementpb/security_center_management.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securitycentermanagement/v1/security_center_management.proto @@ -679,11 +679,9 @@ type SecurityCenterService struct { func (x *SecurityCenterService) Reset() { *x = SecurityCenterService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityCenterService) String() string { @@ -694,7 +692,7 @@ func (*SecurityCenterService) ProtoMessage() {} func (x *SecurityCenterService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,11 +781,9 @@ type EffectiveSecurityHealthAnalyticsCustomModule struct { func (x *EffectiveSecurityHealthAnalyticsCustomModule) Reset() { *x = EffectiveSecurityHealthAnalyticsCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveSecurityHealthAnalyticsCustomModule) String() string { @@ -798,7 +794,7 @@ func (*EffectiveSecurityHealthAnalyticsCustomModule) ProtoMessage() {} func (x *EffectiveSecurityHealthAnalyticsCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +864,9 @@ type ListEffectiveSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListEffectiveSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -883,7 +877,7 @@ func (*ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +929,9 @@ type ListEffectiveSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -950,7 +942,7 @@ func (*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage() func (x *ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -997,11 +989,9 @@ type GetEffectiveSecurityHealthAnalyticsCustomModuleRequest struct { func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = GetEffectiveSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1012,7 +1002,7 @@ func (*GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1074,11 +1064,9 @@ type SecurityHealthAnalyticsCustomModule struct { func (x *SecurityHealthAnalyticsCustomModule) Reset() { *x = SecurityHealthAnalyticsCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsCustomModule) String() string { @@ -1089,7 +1077,7 @@ func (*SecurityHealthAnalyticsCustomModule) ProtoMessage() {} func (x *SecurityHealthAnalyticsCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1187,11 +1175,9 @@ type CustomConfig struct { func (x *CustomConfig) Reset() { *x = CustomConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig) String() string { @@ -1202,7 +1188,7 @@ func (*CustomConfig) ProtoMessage() {} func (x *CustomConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1272,9 @@ type ListSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -1301,7 +1285,7 @@ func (*ListSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() {} func (x *ListSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1353,11 +1337,9 @@ type ListSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -1368,7 +1350,7 @@ func (*ListSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage() {} func (x *ListSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1424,11 +1406,9 @@ type ListDescendantSecurityHealthAnalyticsCustomModulesRequest struct { func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) Reset() { *x = ListDescendantSecurityHealthAnalyticsCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) String() string { @@ -1439,7 +1419,7 @@ func (*ListDescendantSecurityHealthAnalyticsCustomModulesRequest) ProtoMessage() func (x *ListDescendantSecurityHealthAnalyticsCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1491,11 +1471,9 @@ type ListDescendantSecurityHealthAnalyticsCustomModulesResponse struct { func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) Reset() { *x = ListDescendantSecurityHealthAnalyticsCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) String() string { @@ -1506,7 +1484,7 @@ func (*ListDescendantSecurityHealthAnalyticsCustomModulesResponse) ProtoMessage( func (x *ListDescendantSecurityHealthAnalyticsCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1549,11 +1527,9 @@ type GetSecurityHealthAnalyticsCustomModuleRequest struct { func (x *GetSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = GetSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1564,7 +1540,7 @@ func (*GetSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *GetSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1620,11 +1596,9 @@ type CreateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = CreateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1635,7 +1609,7 @@ func (*CreateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *CreateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,11 +1680,9 @@ type UpdateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = UpdateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1721,7 +1693,7 @@ func (*UpdateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *UpdateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1789,11 +1761,9 @@ type DeleteSecurityHealthAnalyticsCustomModuleRequest struct { func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = DeleteSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1804,7 +1774,7 @@ func (*DeleteSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *DeleteSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1854,11 +1824,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleRequest struct { func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) String() string { @@ -1869,7 +1837,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleRequest) ProtoMessage() {} func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1961,11 +1929,9 @@ type SimulatedFinding struct { func (x *SimulatedFinding) Reset() { *x = SimulatedFinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulatedFinding) String() string { @@ -1976,7 +1942,7 @@ func (*SimulatedFinding) ProtoMessage() {} func (x *SimulatedFinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2067,11 +2033,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleResponse struct { func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) String() string { @@ -2082,7 +2046,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleResponse) ProtoMessage() {} func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2138,11 +2102,9 @@ type EffectiveEventThreatDetectionCustomModule struct { func (x *EffectiveEventThreatDetectionCustomModule) Reset() { *x = EffectiveEventThreatDetectionCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EffectiveEventThreatDetectionCustomModule) String() string { @@ -2153,7 +2115,7 @@ func (*EffectiveEventThreatDetectionCustomModule) ProtoMessage() {} func (x *EffectiveEventThreatDetectionCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2237,11 +2199,9 @@ type ListEffectiveEventThreatDetectionCustomModulesRequest struct { func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) Reset() { *x = ListEffectiveEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) String() string { @@ -2252,7 +2212,7 @@ func (*ListEffectiveEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListEffectiveEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2304,11 +2264,9 @@ type ListEffectiveEventThreatDetectionCustomModulesResponse struct { func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) Reset() { *x = ListEffectiveEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) String() string { @@ -2319,7 +2277,7 @@ func (*ListEffectiveEventThreatDetectionCustomModulesResponse) ProtoMessage() {} func (x *ListEffectiveEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,11 +2324,9 @@ type GetEffectiveEventThreatDetectionCustomModuleRequest struct { func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) Reset() { *x = GetEffectiveEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) String() string { @@ -2381,7 +2337,7 @@ func (*GetEffectiveEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *GetEffectiveEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2444,11 +2400,9 @@ type EventThreatDetectionCustomModule struct { func (x *EventThreatDetectionCustomModule) Reset() { *x = EventThreatDetectionCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventThreatDetectionCustomModule) String() string { @@ -2459,7 +2413,7 @@ func (*EventThreatDetectionCustomModule) ProtoMessage() {} func (x *EventThreatDetectionCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2565,11 +2519,9 @@ type ListEventThreatDetectionCustomModulesRequest struct { func (x *ListEventThreatDetectionCustomModulesRequest) Reset() { *x = ListEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventThreatDetectionCustomModulesRequest) String() string { @@ -2580,7 +2532,7 @@ func (*ListEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2632,11 +2584,9 @@ type ListEventThreatDetectionCustomModulesResponse struct { func (x *ListEventThreatDetectionCustomModulesResponse) Reset() { *x = ListEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventThreatDetectionCustomModulesResponse) String() string { @@ -2647,7 +2597,7 @@ func (*ListEventThreatDetectionCustomModulesResponse) ProtoMessage() {} func (x *ListEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2704,11 +2654,9 @@ type ListDescendantEventThreatDetectionCustomModulesRequest struct { func (x *ListDescendantEventThreatDetectionCustomModulesRequest) Reset() { *x = ListDescendantEventThreatDetectionCustomModulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantEventThreatDetectionCustomModulesRequest) String() string { @@ -2719,7 +2667,7 @@ func (*ListDescendantEventThreatDetectionCustomModulesRequest) ProtoMessage() {} func (x *ListDescendantEventThreatDetectionCustomModulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2771,11 +2719,9 @@ type ListDescendantEventThreatDetectionCustomModulesResponse struct { func (x *ListDescendantEventThreatDetectionCustomModulesResponse) Reset() { *x = ListDescendantEventThreatDetectionCustomModulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDescendantEventThreatDetectionCustomModulesResponse) String() string { @@ -2786,7 +2732,7 @@ func (*ListDescendantEventThreatDetectionCustomModulesResponse) ProtoMessage() { func (x *ListDescendantEventThreatDetectionCustomModulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2833,11 +2779,9 @@ type GetEventThreatDetectionCustomModuleRequest struct { func (x *GetEventThreatDetectionCustomModuleRequest) Reset() { *x = GetEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventThreatDetectionCustomModuleRequest) String() string { @@ -2848,7 +2792,7 @@ func (*GetEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *GetEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2905,11 +2849,9 @@ type CreateEventThreatDetectionCustomModuleRequest struct { func (x *CreateEventThreatDetectionCustomModuleRequest) Reset() { *x = CreateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventThreatDetectionCustomModuleRequest) String() string { @@ -2920,7 +2862,7 @@ func (*CreateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *CreateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2984,11 +2926,9 @@ type UpdateEventThreatDetectionCustomModuleRequest struct { func (x *UpdateEventThreatDetectionCustomModuleRequest) Reset() { *x = UpdateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventThreatDetectionCustomModuleRequest) String() string { @@ -2999,7 +2939,7 @@ func (*UpdateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *UpdateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3067,11 +3007,9 @@ type DeleteEventThreatDetectionCustomModuleRequest struct { func (x *DeleteEventThreatDetectionCustomModuleRequest) Reset() { *x = DeleteEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventThreatDetectionCustomModuleRequest) String() string { @@ -3082,7 +3020,7 @@ func (*DeleteEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *DeleteEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3132,11 +3070,9 @@ type ValidateEventThreatDetectionCustomModuleRequest struct { func (x *ValidateEventThreatDetectionCustomModuleRequest) Reset() { *x = ValidateEventThreatDetectionCustomModuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleRequest) String() string { @@ -3147,7 +3083,7 @@ func (*ValidateEventThreatDetectionCustomModuleRequest) ProtoMessage() {} func (x *ValidateEventThreatDetectionCustomModuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3197,11 +3133,9 @@ type ValidateEventThreatDetectionCustomModuleResponse struct { func (x *ValidateEventThreatDetectionCustomModuleResponse) Reset() { *x = ValidateEventThreatDetectionCustomModuleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleResponse) String() string { @@ -3212,7 +3146,7 @@ func (*ValidateEventThreatDetectionCustomModuleResponse) ProtoMessage() {} func (x *ValidateEventThreatDetectionCustomModuleResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3263,11 +3197,9 @@ type GetSecurityCenterServiceRequest struct { func (x *GetSecurityCenterServiceRequest) Reset() { *x = GetSecurityCenterServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSecurityCenterServiceRequest) String() string { @@ -3278,7 +3210,7 @@ func (*GetSecurityCenterServiceRequest) ProtoMessage() {} func (x *GetSecurityCenterServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3337,11 +3269,9 @@ type ListSecurityCenterServicesRequest struct { func (x *ListSecurityCenterServicesRequest) Reset() { *x = ListSecurityCenterServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityCenterServicesRequest) String() string { @@ -3352,7 +3282,7 @@ func (*ListSecurityCenterServicesRequest) ProtoMessage() {} func (x *ListSecurityCenterServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3411,11 +3341,9 @@ type ListSecurityCenterServicesResponse struct { func (x *ListSecurityCenterServicesResponse) Reset() { *x = ListSecurityCenterServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSecurityCenterServicesResponse) String() string { @@ -3426,7 +3354,7 @@ func (*ListSecurityCenterServicesResponse) ProtoMessage() {} func (x *ListSecurityCenterServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3489,11 +3417,9 @@ type UpdateSecurityCenterServiceRequest struct { func (x *UpdateSecurityCenterServiceRequest) Reset() { *x = UpdateSecurityCenterServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSecurityCenterServiceRequest) String() string { @@ -3504,7 +3430,7 @@ func (*UpdateSecurityCenterServiceRequest) ProtoMessage() {} func (x *UpdateSecurityCenterServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3559,11 +3485,9 @@ type SecurityCenterService_ModuleSettings struct { func (x *SecurityCenterService_ModuleSettings) Reset() { *x = SecurityCenterService_ModuleSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityCenterService_ModuleSettings) String() string { @@ -3574,7 +3498,7 @@ func (*SecurityCenterService_ModuleSettings) ProtoMessage() {} func (x *SecurityCenterService_ModuleSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3617,11 +3541,9 @@ type CustomConfig_CustomOutputSpec struct { func (x *CustomConfig_CustomOutputSpec) Reset() { *x = CustomConfig_CustomOutputSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec) String() string { @@ -3632,7 +3554,7 @@ func (*CustomConfig_CustomOutputSpec) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3666,11 +3588,9 @@ type CustomConfig_ResourceSelector struct { func (x *CustomConfig_ResourceSelector) Reset() { *x = CustomConfig_ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_ResourceSelector) String() string { @@ -3681,7 +3601,7 @@ func (*CustomConfig_ResourceSelector) ProtoMessage() {} func (x *CustomConfig_ResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3719,11 +3639,9 @@ type CustomConfig_CustomOutputSpec_Property struct { func (x *CustomConfig_CustomOutputSpec_Property) Reset() { *x = CustomConfig_CustomOutputSpec_Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec_Property) String() string { @@ -3734,7 +3652,7 @@ func (*CustomConfig_CustomOutputSpec_Property) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec_Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3787,11 +3705,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource struct func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) String() string { @@ -3802,7 +3718,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) Pro func (x *SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3856,11 +3772,9 @@ type SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult struct func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) Reset() { *x = SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) String() string { @@ -3871,7 +3785,7 @@ func (*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) Prot func (x *SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3968,11 +3882,9 @@ type ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationErro func (x *ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError) Reset() { *x = ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError) String() string { @@ -3983,7 +3895,7 @@ func (*ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationEr func (x *ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4040,11 +3952,9 @@ type ValidateEventThreatDetectionCustomModuleResponse_Position struct { func (x *ValidateEventThreatDetectionCustomModuleResponse_Position) Reset() { *x = ValidateEventThreatDetectionCustomModuleResponse_Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValidateEventThreatDetectionCustomModuleResponse_Position) String() string { @@ -4055,7 +3965,7 @@ func (*ValidateEventThreatDetectionCustomModuleResponse_Position) ProtoMessage() func (x *ValidateEventThreatDetectionCustomModuleResponse_Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6049,548 +5959,6 @@ func file_google_cloud_securitycentermanagement_v1_security_center_management_pr if File_google_cloud_securitycentermanagement_v1_security_center_management_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityCenterService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveSecurityHealthAnalyticsCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantSecurityHealthAnalyticsCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantSecurityHealthAnalyticsCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SimulatedFinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*EffectiveEventThreatDetectionCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListEffectiveEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*GetEffectiveEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*EventThreatDetectionCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantEventThreatDetectionCustomModulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListDescendantEventThreatDetectionCustomModulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetSecurityCenterServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityCenterServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListSecurityCenterServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSecurityCenterServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*SecurityCenterService_ModuleSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec_Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleResponse_CustomModuleValidationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ValidateEventThreatDetectionCustomModuleResponse_Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securitycentermanagement_v1_security_center_management_proto_msgTypes[44].OneofWrappers = []any{ (*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_Finding)(nil), (*SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_NoViolation)(nil), diff --git a/securityposture/apiv1/helpers.go b/securityposture/apiv1/helpers.go index e0fa81431452..11a85035600c 100755 --- a/securityposture/apiv1/helpers.go +++ b/securityposture/apiv1/helpers.go @@ -18,10 +18,20 @@ package securityposture import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "securityposture.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/securityposture/apiv1/security_posture_client.go b/securityposture/apiv1/security_posture_client.go index 02ed2a10453d..31556ca90772 100755 --- a/securityposture/apiv1/security_posture_client.go +++ b/securityposture/apiv1/security_posture_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" securityposturepb "cloud.google.com/go/securityposture/apiv1/securityposturepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -705,6 +704,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new security posture client based on gRPC. @@ -731,6 +732,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: securityposturepb.NewSecurityPostureClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -795,6 +797,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new security posture rest client. @@ -812,6 +816,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -885,7 +890,7 @@ func (c *gRPCClient) ListPostures(ctx context.Context, req *securityposturepb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPostures(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPostures, req, settings.GRPC, c.logger, "ListPostures") return err }, opts...) if err != nil { @@ -931,7 +936,7 @@ func (c *gRPCClient) ListPostureRevisions(ctx context.Context, req *securitypost } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPostureRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPostureRevisions, req, settings.GRPC, c.logger, "ListPostureRevisions") return err }, opts...) if err != nil { @@ -966,7 +971,7 @@ func (c *gRPCClient) GetPosture(ctx context.Context, req *securityposturepb.GetP var resp *securityposturepb.Posture err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPosture(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPosture, req, settings.GRPC, c.logger, "GetPosture") return err }, opts...) if err != nil { @@ -984,7 +989,7 @@ func (c *gRPCClient) CreatePosture(ctx context.Context, req *securityposturepb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePosture(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePosture, req, settings.GRPC, c.logger, "CreatePosture") return err }, opts...) if err != nil { @@ -1004,7 +1009,7 @@ func (c *gRPCClient) UpdatePosture(ctx context.Context, req *securityposturepb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePosture(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePosture, req, settings.GRPC, c.logger, "UpdatePosture") return err }, opts...) if err != nil { @@ -1024,7 +1029,7 @@ func (c *gRPCClient) DeletePosture(ctx context.Context, req *securityposturepb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePosture(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePosture, req, settings.GRPC, c.logger, "DeletePosture") return err }, opts...) if err != nil { @@ -1044,7 +1049,7 @@ func (c *gRPCClient) ExtractPosture(ctx context.Context, req *securityposturepb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExtractPosture(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExtractPosture, req, settings.GRPC, c.logger, "ExtractPosture") return err }, opts...) if err != nil { @@ -1075,7 +1080,7 @@ func (c *gRPCClient) ListPostureDeployments(ctx context.Context, req *securitypo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPostureDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPostureDeployments, req, settings.GRPC, c.logger, "ListPostureDeployments") return err }, opts...) if err != nil { @@ -1110,7 +1115,7 @@ func (c *gRPCClient) GetPostureDeployment(ctx context.Context, req *securitypost var resp *securityposturepb.PostureDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPostureDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPostureDeployment, req, settings.GRPC, c.logger, "GetPostureDeployment") return err }, opts...) if err != nil { @@ -1128,7 +1133,7 @@ func (c *gRPCClient) CreatePostureDeployment(ctx context.Context, req *securityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePostureDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePostureDeployment, req, settings.GRPC, c.logger, "CreatePostureDeployment") return err }, opts...) if err != nil { @@ -1148,7 +1153,7 @@ func (c *gRPCClient) UpdatePostureDeployment(ctx context.Context, req *securityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePostureDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePostureDeployment, req, settings.GRPC, c.logger, "UpdatePostureDeployment") return err }, opts...) if err != nil { @@ -1168,7 +1173,7 @@ func (c *gRPCClient) DeletePostureDeployment(ctx context.Context, req *securityp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePostureDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePostureDeployment, req, settings.GRPC, c.logger, "DeletePostureDeployment") return err }, opts...) if err != nil { @@ -1199,7 +1204,7 @@ func (c *gRPCClient) ListPostureTemplates(ctx context.Context, req *securitypost } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPostureTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPostureTemplates, req, settings.GRPC, c.logger, "ListPostureTemplates") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *gRPCClient) GetPostureTemplate(ctx context.Context, req *securitypostur var resp *securityposturepb.PostureTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPostureTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPostureTemplate, req, settings.GRPC, c.logger, "GetPostureTemplate") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1281,7 +1286,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1315,7 +1320,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1329,7 +1334,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1344,7 +1349,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1373,7 +1378,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1450,21 +1455,10 @@ func (c *restClient) ListPostures(ctx context.Context, req *securityposturepb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPostures") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1539,21 +1533,10 @@ func (c *restClient) ListPostureRevisions(ctx context.Context, req *securitypost } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPostureRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1624,17 +1607,7 @@ func (c *restClient) GetPosture(ctx context.Context, req *securityposturepb.GetP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPosture") if err != nil { return err } @@ -1694,21 +1667,10 @@ func (c *restClient) CreatePosture(ctx context.Context, req *securityposturepb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePosture") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1784,21 +1746,10 @@ func (c *restClient) UpdatePosture(ctx context.Context, req *securityposturepb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePosture") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1853,21 +1804,10 @@ func (c *restClient) DeletePosture(ctx context.Context, req *securityposturepb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePosture") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1925,21 +1865,10 @@ func (c *restClient) ExtractPosture(ctx context.Context, req *securityposturepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExtractPosture") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2006,21 +1935,10 @@ func (c *restClient) ListPostureDeployments(ctx context.Context, req *securitypo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPostureDeployments") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2083,17 +2001,7 @@ func (c *restClient) GetPostureDeployment(ctx context.Context, req *securitypost httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPostureDeployment") if err != nil { return err } @@ -2150,21 +2058,10 @@ func (c *restClient) CreatePostureDeployment(ctx context.Context, req *securityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePostureDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2228,21 +2125,10 @@ func (c *restClient) UpdatePostureDeployment(ctx context.Context, req *securityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePostureDeployment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2295,21 +2181,10 @@ func (c *restClient) DeletePostureDeployment(ctx context.Context, req *securityp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePostureDeployment") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2376,21 +2251,10 @@ func (c *restClient) ListPostureTemplates(ctx context.Context, req *securitypost } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPostureTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2461,17 +2325,7 @@ func (c *restClient) GetPostureTemplate(ctx context.Context, req *securitypostur httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPostureTemplate") if err != nil { return err } @@ -2521,17 +2375,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2596,21 +2440,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2676,15 +2509,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2718,15 +2544,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2763,17 +2582,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2838,21 +2647,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/securityposture/apiv1/security_posture_client_example_go123_test.go b/securityposture/apiv1/security_posture_client_example_go123_test.go index 58460ac1e311..de512571d226 100644 --- a/securityposture/apiv1/security_posture_client_example_go123_test.go +++ b/securityposture/apiv1/security_posture_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListPostureDeployments_all() { } for resp, err := range c.ListPostureDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListPostureRevisions_all() { } for resp, err := range c.ListPostureRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListPostureTemplates_all() { } for resp, err := range c.ListPostureTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListPostures_all() { } for resp, err := range c.ListPostures(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/securityposture/apiv1/securityposturepb/org_policy_config.pb.go b/securityposture/apiv1/securityposturepb/org_policy_config.pb.go index da4c849d049b..87552d456b75 100755 --- a/securityposture/apiv1/securityposturepb/org_policy_config.pb.go +++ b/securityposture/apiv1/securityposturepb/org_policy_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securityposture/v1/org_policy_config.proto @@ -185,11 +185,9 @@ type PolicyRule struct { func (x *PolicyRule) Reset() { *x = PolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyRule) String() string { @@ -200,7 +198,7 @@ func (*PolicyRule) ProtoMessage() {} func (x *PolicyRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +343,9 @@ type CustomConstraint struct { func (x *CustomConstraint) Reset() { *x = CustomConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConstraint) String() string { @@ -360,7 +356,7 @@ func (*CustomConstraint) ProtoMessage() {} func (x *CustomConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +457,9 @@ type PolicyRule_StringValues struct { func (x *PolicyRule_StringValues) Reset() { *x = PolicyRule_StringValues{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyRule_StringValues) String() string { @@ -476,7 +470,7 @@ func (*PolicyRule_StringValues) ProtoMessage() {} func (x *PolicyRule_StringValues) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,44 +624,6 @@ func file_google_cloud_securityposture_v1_org_policy_config_proto_init() { if File_google_cloud_securityposture_v1_org_policy_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PolicyRule_StringValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securityposture_v1_org_policy_config_proto_msgTypes[0].OneofWrappers = []any{ (*PolicyRule_Values)(nil), (*PolicyRule_AllowAll)(nil), diff --git a/securityposture/apiv1/securityposturepb/org_policy_constraints.pb.go b/securityposture/apiv1/securityposturepb/org_policy_constraints.pb.go index 6fba032f84aa..2d314a315004 100755 --- a/securityposture/apiv1/securityposturepb/org_policy_constraints.pb.go +++ b/securityposture/apiv1/securityposturepb/org_policy_constraints.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securityposture/v1/org_policy_constraints.proto @@ -50,11 +50,9 @@ type OrgPolicyConstraint struct { func (x *OrgPolicyConstraint) Reset() { *x = OrgPolicyConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrgPolicyConstraint) String() string { @@ -65,7 +63,7 @@ func (*OrgPolicyConstraint) ProtoMessage() {} func (x *OrgPolicyConstraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type OrgPolicyConstraintCustom struct { func (x *OrgPolicyConstraintCustom) Reset() { *x = OrgPolicyConstraintCustom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrgPolicyConstraintCustom) String() string { @@ -123,7 +119,7 @@ func (*OrgPolicyConstraintCustom) ProtoMessage() {} func (x *OrgPolicyConstraintCustom) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,32 +235,6 @@ func file_google_cloud_securityposture_v1_org_policy_constraints_proto_init() { return } file_google_cloud_securityposture_v1_org_policy_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrgPolicyConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_org_policy_constraints_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OrgPolicyConstraintCustom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securityposture/apiv1/securityposturepb/securityposture.pb.go b/securityposture/apiv1/securityposturepb/securityposture.pb.go index 6894ac4e2208..e42dd3cacc2c 100755 --- a/securityposture/apiv1/securityposturepb/securityposture.pb.go +++ b/securityposture/apiv1/securityposturepb/securityposture.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securityposture/v1/securityposture.proto @@ -259,11 +259,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -274,7 +272,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +389,9 @@ type Posture struct { func (x *Posture) Reset() { *x = Posture{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Posture) String() string { @@ -406,7 +402,7 @@ func (*Posture) ProtoMessage() {} func (x *Posture) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +503,9 @@ type PolicySet struct { func (x *PolicySet) Reset() { *x = PolicySet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicySet) String() string { @@ -522,7 +516,7 @@ func (*PolicySet) ProtoMessage() {} func (x *PolicySet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,11 +571,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -592,7 +584,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +644,9 @@ type Constraint struct { func (x *Constraint) Reset() { *x = Constraint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Constraint) String() string { @@ -667,7 +657,7 @@ func (*Constraint) ProtoMessage() {} func (x *Constraint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,11 +756,9 @@ type ListPosturesRequest struct { func (x *ListPosturesRequest) Reset() { *x = ListPosturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPosturesRequest) String() string { @@ -781,7 +769,7 @@ func (*ListPosturesRequest) ProtoMessage() {} func (x *ListPosturesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +821,9 @@ type ListPosturesResponse struct { func (x *ListPosturesResponse) Reset() { *x = ListPosturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPosturesResponse) String() string { @@ -848,7 +834,7 @@ func (*ListPosturesResponse) ProtoMessage() {} func (x *ListPosturesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +887,9 @@ type ListPostureRevisionsRequest struct { func (x *ListPostureRevisionsRequest) Reset() { *x = ListPostureRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureRevisionsRequest) String() string { @@ -916,7 +900,7 @@ func (*ListPostureRevisionsRequest) ProtoMessage() {} func (x *ListPostureRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -966,11 +950,9 @@ type ListPostureRevisionsResponse struct { func (x *ListPostureRevisionsResponse) Reset() { *x = ListPostureRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureRevisionsResponse) String() string { @@ -981,7 +963,7 @@ func (*ListPostureRevisionsResponse) ProtoMessage() {} func (x *ListPostureRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +1006,9 @@ type GetPostureRequest struct { func (x *GetPostureRequest) Reset() { *x = GetPostureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPostureRequest) String() string { @@ -1039,7 +1019,7 @@ func (*GetPostureRequest) ProtoMessage() {} func (x *GetPostureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1085,11 +1065,9 @@ type CreatePostureRequest struct { func (x *CreatePostureRequest) Reset() { *x = CreatePostureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePostureRequest) String() string { @@ -1100,7 +1078,7 @@ func (*CreatePostureRequest) ProtoMessage() {} func (x *CreatePostureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1156,11 +1134,9 @@ type UpdatePostureRequest struct { func (x *UpdatePostureRequest) Reset() { *x = UpdatePostureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePostureRequest) String() string { @@ -1171,7 +1147,7 @@ func (*UpdatePostureRequest) ProtoMessage() {} func (x *UpdatePostureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1197,9 @@ type DeletePostureRequest struct { func (x *DeletePostureRequest) Reset() { *x = DeletePostureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePostureRequest) String() string { @@ -1236,7 +1210,7 @@ func (*DeletePostureRequest) ProtoMessage() {} func (x *DeletePostureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1288,11 +1262,9 @@ type ExtractPostureRequest struct { func (x *ExtractPostureRequest) Reset() { *x = ExtractPostureRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtractPostureRequest) String() string { @@ -1303,7 +1275,7 @@ func (*ExtractPostureRequest) ProtoMessage() {} func (x *ExtractPostureRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1375,9 @@ type PostureDeployment struct { func (x *PostureDeployment) Reset() { *x = PostureDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostureDeployment) String() string { @@ -1418,7 +1388,7 @@ func (*PostureDeployment) ProtoMessage() {} func (x *PostureDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,11 +1521,9 @@ type ListPostureDeploymentsRequest struct { func (x *ListPostureDeploymentsRequest) Reset() { *x = ListPostureDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureDeploymentsRequest) String() string { @@ -1566,7 +1534,7 @@ func (*ListPostureDeploymentsRequest) ProtoMessage() {} func (x *ListPostureDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1625,11 +1593,9 @@ type ListPostureDeploymentsResponse struct { func (x *ListPostureDeploymentsResponse) Reset() { *x = ListPostureDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureDeploymentsResponse) String() string { @@ -1640,7 +1606,7 @@ func (*ListPostureDeploymentsResponse) ProtoMessage() {} func (x *ListPostureDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1688,11 +1654,9 @@ type GetPostureDeploymentRequest struct { func (x *GetPostureDeploymentRequest) Reset() { *x = GetPostureDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPostureDeploymentRequest) String() string { @@ -1703,7 +1667,7 @@ func (*GetPostureDeploymentRequest) ProtoMessage() {} func (x *GetPostureDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1743,11 +1707,9 @@ type CreatePostureDeploymentRequest struct { func (x *CreatePostureDeploymentRequest) Reset() { *x = CreatePostureDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePostureDeploymentRequest) String() string { @@ -1758,7 +1720,7 @@ func (*CreatePostureDeploymentRequest) ProtoMessage() {} func (x *CreatePostureDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1812,11 +1774,9 @@ type UpdatePostureDeploymentRequest struct { func (x *UpdatePostureDeploymentRequest) Reset() { *x = UpdatePostureDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePostureDeploymentRequest) String() string { @@ -1827,7 +1787,7 @@ func (*UpdatePostureDeploymentRequest) ProtoMessage() {} func (x *UpdatePostureDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1830,9 @@ type DeletePostureDeploymentRequest struct { func (x *DeletePostureDeploymentRequest) Reset() { *x = DeletePostureDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePostureDeploymentRequest) String() string { @@ -1885,7 +1843,7 @@ func (*DeletePostureDeploymentRequest) ProtoMessage() {} func (x *DeletePostureDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1937,11 +1895,9 @@ type PostureTemplate struct { func (x *PostureTemplate) Reset() { *x = PostureTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostureTemplate) String() string { @@ -1952,7 +1908,7 @@ func (*PostureTemplate) ProtoMessage() {} func (x *PostureTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2022,11 +1978,9 @@ type ListPostureTemplatesRequest struct { func (x *ListPostureTemplatesRequest) Reset() { *x = ListPostureTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureTemplatesRequest) String() string { @@ -2037,7 +1991,7 @@ func (*ListPostureTemplatesRequest) ProtoMessage() {} func (x *ListPostureTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2094,11 +2048,9 @@ type ListPostureTemplatesResponse struct { func (x *ListPostureTemplatesResponse) Reset() { *x = ListPostureTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPostureTemplatesResponse) String() string { @@ -2109,7 +2061,7 @@ func (*ListPostureTemplatesResponse) ProtoMessage() {} func (x *ListPostureTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2153,11 +2105,9 @@ type GetPostureTemplateRequest struct { func (x *GetPostureTemplateRequest) Reset() { *x = GetPostureTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPostureTemplateRequest) String() string { @@ -2168,7 +2118,7 @@ func (*GetPostureTemplateRequest) ProtoMessage() {} func (x *GetPostureTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2211,11 +2161,9 @@ type Policy_ComplianceStandard struct { func (x *Policy_ComplianceStandard) Reset() { *x = Policy_ComplianceStandard{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy_ComplianceStandard) String() string { @@ -2226,7 +2174,7 @@ func (*Policy_ComplianceStandard) ProtoMessage() {} func (x *Policy_ComplianceStandard) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3094,320 +3042,6 @@ func file_google_cloud_securityposture_v1_securityposture_proto_init() { } file_google_cloud_securityposture_v1_org_policy_constraints_proto_init() file_google_cloud_securityposture_v1_sha_constraints_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Posture); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PolicySet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Constraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPosturesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPosturesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetPostureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreatePostureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePostureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeletePostureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ExtractPostureRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PostureDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetPostureDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreatePostureDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePostureDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DeletePostureDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PostureTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListPostureTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetPostureTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Policy_ComplianceStandard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_securityposture_v1_securityposture_proto_msgTypes[4].OneofWrappers = []any{ (*Constraint_SecurityHealthAnalyticsModule)(nil), (*Constraint_SecurityHealthAnalyticsCustomModule)(nil), diff --git a/securityposture/apiv1/securityposturepb/sha_constraints.pb.go b/securityposture/apiv1/securityposturepb/sha_constraints.pb.go index d2c18efa7cdb..cef498e0e60e 100755 --- a/securityposture/apiv1/securityposturepb/sha_constraints.pb.go +++ b/securityposture/apiv1/securityposturepb/sha_constraints.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securityposture/v1/sha_constraints.proto @@ -104,11 +104,9 @@ type SecurityHealthAnalyticsModule struct { func (x *SecurityHealthAnalyticsModule) Reset() { *x = SecurityHealthAnalyticsModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsModule) String() string { @@ -119,7 +117,7 @@ func (*SecurityHealthAnalyticsModule) ProtoMessage() {} func (x *SecurityHealthAnalyticsModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type SecurityHealthAnalyticsCustomModule struct { func (x *SecurityHealthAnalyticsCustomModule) Reset() { *x = SecurityHealthAnalyticsCustomModule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecurityHealthAnalyticsCustomModule) String() string { @@ -188,7 +184,7 @@ func (*SecurityHealthAnalyticsCustomModule) ProtoMessage() {} func (x *SecurityHealthAnalyticsCustomModule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,32 +324,6 @@ func file_google_cloud_securityposture_v1_sha_constraints_proto_init() { return } file_google_cloud_securityposture_v1_sha_custom_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_sha_constraints_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SecurityHealthAnalyticsCustomModule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/securityposture/apiv1/securityposturepb/sha_custom_config.pb.go b/securityposture/apiv1/securityposturepb/sha_custom_config.pb.go index 0bc3ee290b38..c420bbc7c7d7 100755 --- a/securityposture/apiv1/securityposturepb/sha_custom_config.pb.go +++ b/securityposture/apiv1/securityposturepb/sha_custom_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/securityposture/v1/sha_custom_config.proto @@ -130,11 +130,9 @@ type CustomConfig struct { func (x *CustomConfig) Reset() { *x = CustomConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig) String() string { @@ -145,7 +143,7 @@ func (*CustomConfig) ProtoMessage() {} func (x *CustomConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,11 +215,9 @@ type CustomConfig_CustomOutputSpec struct { func (x *CustomConfig_CustomOutputSpec) Reset() { *x = CustomConfig_CustomOutputSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec) String() string { @@ -232,7 +228,7 @@ func (*CustomConfig_CustomOutputSpec) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +262,9 @@ type CustomConfig_ResourceSelector struct { func (x *CustomConfig_ResourceSelector) Reset() { *x = CustomConfig_ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_ResourceSelector) String() string { @@ -281,7 +275,7 @@ func (*CustomConfig_ResourceSelector) ProtoMessage() {} func (x *CustomConfig_ResourceSelector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +313,9 @@ type CustomConfig_CustomOutputSpec_Property struct { func (x *CustomConfig_CustomOutputSpec_Property) Reset() { *x = CustomConfig_CustomOutputSpec_Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomConfig_CustomOutputSpec_Property) String() string { @@ -334,7 +326,7 @@ func (*CustomConfig_CustomOutputSpec_Property) ProtoMessage() {} func (x *CustomConfig_CustomOutputSpec_Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,56 +473,6 @@ func file_google_cloud_securityposture_v1_sha_custom_config_proto_init() { if File_google_cloud_securityposture_v1_sha_custom_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_securityposture_v1_sha_custom_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CustomConfig_CustomOutputSpec_Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicecontrol/apiv1/helpers.go b/servicecontrol/apiv1/helpers.go index c3d66e9d1857..b0aa45052c7d 100755 --- a/servicecontrol/apiv1/helpers.go +++ b/servicecontrol/apiv1/helpers.go @@ -18,10 +18,20 @@ package servicecontrol import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "servicecontrol.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/servicecontrol", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/servicecontrol/apiv1/quota_controller_client.go b/servicecontrol/apiv1/quota_controller_client.go index 861f09b3ec39..eea5f580c2ac 100755 --- a/servicecontrol/apiv1/quota_controller_client.go +++ b/servicecontrol/apiv1/quota_controller_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" servicecontrolpb "cloud.google.com/go/servicecontrol/apiv1/servicecontrolpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -146,6 +145,8 @@ type quotaControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewQuotaControllerClient creates a new quota controller client based on gRPC. @@ -175,6 +176,7 @@ func NewQuotaControllerClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, quotaControllerClient: servicecontrolpb.NewQuotaControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -221,6 +223,8 @@ type quotaControllerRESTClient struct { // Points back to the CallOptions field of the containing QuotaControllerClient CallOptions **QuotaControllerCallOptions + + logger *slog.Logger } // NewQuotaControllerRESTClient creates a new quota controller rest client. @@ -241,6 +245,7 @@ func NewQuotaControllerRESTClient(ctx context.Context, opts ...option.ClientOpti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -293,7 +298,7 @@ func (c *quotaControllerGRPCClient) AllocateQuota(ctx context.Context, req *serv var resp *servicecontrolpb.AllocateQuotaResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.quotaControllerClient.AllocateQuota(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.quotaControllerClient.AllocateQuota, req, settings.GRPC, c.logger, "AllocateQuota") return err }, opts...) if err != nil { @@ -351,17 +356,7 @@ func (c *quotaControllerRESTClient) AllocateQuota(ctx context.Context, req *serv httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AllocateQuota") if err != nil { return err } diff --git a/servicecontrol/apiv1/service_controller_client.go b/servicecontrol/apiv1/service_controller_client.go index b69a652e2064..e79882316d06 100755 --- a/servicecontrol/apiv1/service_controller_client.go +++ b/servicecontrol/apiv1/service_controller_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( servicecontrolpb "cloud.google.com/go/servicecontrol/apiv1/servicecontrolpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -202,6 +201,8 @@ type serviceControllerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServiceControllerClient creates a new service controller client based on gRPC. @@ -231,6 +232,7 @@ func NewServiceControllerClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, serviceControllerClient: servicecontrolpb.NewServiceControllerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -277,6 +279,8 @@ type serviceControllerRESTClient struct { // Points back to the CallOptions field of the containing ServiceControllerClient CallOptions **ServiceControllerCallOptions + + logger *slog.Logger } // NewServiceControllerRESTClient creates a new service controller rest client. @@ -297,6 +301,7 @@ func NewServiceControllerRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -349,7 +354,7 @@ func (c *serviceControllerGRPCClient) Check(ctx context.Context, req *servicecon var resp *servicecontrolpb.CheckResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceControllerClient.Check(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceControllerClient.Check, req, settings.GRPC, c.logger, "Check") return err }, opts...) if err != nil { @@ -367,7 +372,7 @@ func (c *serviceControllerGRPCClient) Report(ctx context.Context, req *serviceco var resp *servicecontrolpb.ReportResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceControllerClient.Report(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceControllerClient.Report, req, settings.GRPC, c.logger, "Report") return err }, opts...) if err != nil { @@ -431,17 +436,7 @@ func (c *serviceControllerRESTClient) Check(ctx context.Context, req *servicecon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Check") if err != nil { return err } @@ -511,17 +506,7 @@ func (c *serviceControllerRESTClient) Report(ctx context.Context, req *serviceco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Report") if err != nil { return err } diff --git a/servicecontrol/apiv1/servicecontrolpb/check_error.pb.go b/servicecontrol/apiv1/servicecontrolpb/check_error.pb.go index 26bcf9d701f4..26d3bc9abf6c 100755 --- a/servicecontrol/apiv1/servicecontrolpb/check_error.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/check_error.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/check_error.proto @@ -194,11 +194,9 @@ type CheckError struct { func (x *CheckError) Reset() { *x = CheckError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_check_error_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_check_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckError) String() string { @@ -209,7 +207,7 @@ func (*CheckError) ProtoMessage() {} func (x *CheckError) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_check_error_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,20 +356,6 @@ func file_google_api_servicecontrol_v1_check_error_proto_init() { if File_google_api_servicecontrol_v1_check_error_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_check_error_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicecontrol/apiv1/servicecontrolpb/distribution.pb.go b/servicecontrol/apiv1/servicecontrolpb/distribution.pb.go index 40456f67ba08..2bab8bdb7649 100755 --- a/servicecontrol/apiv1/servicecontrolpb/distribution.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/distribution.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/distribution.proto @@ -113,11 +113,9 @@ type Distribution struct { func (x *Distribution) Reset() { *x = Distribution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Distribution) String() string { @@ -128,7 +126,7 @@ func (*Distribution) ProtoMessage() {} func (x *Distribution) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type Distribution_LinearBuckets struct { func (x *Distribution_LinearBuckets) Reset() { *x = Distribution_LinearBuckets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Distribution_LinearBuckets) String() string { @@ -287,7 +283,7 @@ func (*Distribution_LinearBuckets) ProtoMessage() {} func (x *Distribution_LinearBuckets) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +347,9 @@ type Distribution_ExponentialBuckets struct { func (x *Distribution_ExponentialBuckets) Reset() { *x = Distribution_ExponentialBuckets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Distribution_ExponentialBuckets) String() string { @@ -366,7 +360,7 @@ func (*Distribution_ExponentialBuckets) ProtoMessage() {} func (x *Distribution_ExponentialBuckets) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +425,9 @@ type Distribution_ExplicitBuckets struct { func (x *Distribution_ExplicitBuckets) Reset() { *x = Distribution_ExplicitBuckets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Distribution_ExplicitBuckets) String() string { @@ -446,7 +438,7 @@ func (*Distribution_ExplicitBuckets) ProtoMessage() {} func (x *Distribution_ExplicitBuckets) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_distribution_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,56 +580,6 @@ func file_google_api_servicecontrol_v1_distribution_proto_init() { if File_google_api_servicecontrol_v1_distribution_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_distribution_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Distribution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_distribution_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Distribution_LinearBuckets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_distribution_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Distribution_ExponentialBuckets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_distribution_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Distribution_ExplicitBuckets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_api_servicecontrol_v1_distribution_proto_msgTypes[0].OneofWrappers = []any{ (*Distribution_LinearBuckets_)(nil), (*Distribution_ExponentialBuckets_)(nil), diff --git a/servicecontrol/apiv1/servicecontrolpb/http_request.pb.go b/servicecontrol/apiv1/servicecontrolpb/http_request.pb.go index d4bf692b1e70..adb80c2777df 100755 --- a/servicecontrol/apiv1/servicecontrolpb/http_request.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/http_request.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/http_request.proto @@ -94,11 +94,9 @@ type HttpRequest struct { func (x *HttpRequest) Reset() { *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_http_request_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_http_request_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpRequest) String() string { @@ -109,7 +107,7 @@ func (*HttpRequest) ProtoMessage() {} func (x *HttpRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_http_request_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -323,20 +321,6 @@ func file_google_api_servicecontrol_v1_http_request_proto_init() { if File_google_api_servicecontrol_v1_http_request_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_http_request_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicecontrol/apiv1/servicecontrolpb/log_entry.pb.go b/servicecontrol/apiv1/servicecontrolpb/log_entry.pb.go index 5a2828ecb9e4..20d128701e6e 100755 --- a/servicecontrol/apiv1/servicecontrolpb/log_entry.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/log_entry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/log_entry.proto @@ -86,11 +86,9 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntry) String() string { @@ -101,7 +99,7 @@ func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +255,9 @@ type LogEntryOperation struct { func (x *LogEntryOperation) Reset() { *x = LogEntryOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntryOperation) String() string { @@ -272,7 +268,7 @@ func (*LogEntryOperation) ProtoMessage() {} func (x *LogEntryOperation) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +335,9 @@ type LogEntrySourceLocation struct { func (x *LogEntrySourceLocation) Reset() { *x = LogEntrySourceLocation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntrySourceLocation) String() string { @@ -354,7 +348,7 @@ func (*LogEntrySourceLocation) ProtoMessage() {} func (x *LogEntrySourceLocation) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,44 +527,6 @@ func file_google_api_servicecontrol_v1_log_entry_proto_init() { return } file_google_api_servicecontrol_v1_http_request_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LogEntryOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LogEntrySourceLocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_api_servicecontrol_v1_log_entry_proto_msgTypes[0].OneofWrappers = []any{ (*LogEntry_ProtoPayload)(nil), (*LogEntry_TextPayload)(nil), diff --git a/servicecontrol/apiv1/servicecontrolpb/metric_value.pb.go b/servicecontrol/apiv1/servicecontrolpb/metric_value.pb.go index 3f16f7e5cf4f..fea0f714d67f 100755 --- a/servicecontrol/apiv1/servicecontrolpb/metric_value.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/metric_value.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/metric_value.proto @@ -73,11 +73,9 @@ type MetricValue struct { func (x *MetricValue) Reset() { *x = MetricValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricValue) String() string { @@ -88,7 +86,7 @@ func (*MetricValue) ProtoMessage() {} func (x *MetricValue) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +219,9 @@ type MetricValueSet struct { func (x *MetricValueSet) Reset() { *x = MetricValueSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetricValueSet) String() string { @@ -236,7 +232,7 @@ func (*MetricValueSet) ProtoMessage() {} func (x *MetricValueSet) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,32 +371,6 @@ func file_google_api_servicecontrol_v1_metric_value_proto_init() { return } file_google_api_servicecontrol_v1_distribution_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MetricValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MetricValueSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_api_servicecontrol_v1_metric_value_proto_msgTypes[0].OneofWrappers = []any{ (*MetricValue_BoolValue)(nil), (*MetricValue_Int64Value)(nil), diff --git a/servicecontrol/apiv1/servicecontrolpb/operation.pb.go b/servicecontrol/apiv1/servicecontrolpb/operation.pb.go index e162f2fe9106..79f39025b8b2 100755 --- a/servicecontrol/apiv1/servicecontrolpb/operation.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/operation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/operation.proto @@ -166,11 +166,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -181,7 +179,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_operation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,20 +388,6 @@ func file_google_api_servicecontrol_v1_operation_proto_init() { } file_google_api_servicecontrol_v1_log_entry_proto_init() file_google_api_servicecontrol_v1_metric_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicecontrol/apiv1/servicecontrolpb/quota_controller.pb.go b/servicecontrol/apiv1/servicecontrolpb/quota_controller.pb.go index ac86cf5a3892..562608a532fc 100755 --- a/servicecontrol/apiv1/servicecontrolpb/quota_controller.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/quota_controller.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/quota_controller.proto @@ -220,11 +220,9 @@ type AllocateQuotaRequest struct { func (x *AllocateQuotaRequest) Reset() { *x = AllocateQuotaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocateQuotaRequest) String() string { @@ -235,7 +233,7 @@ func (*AllocateQuotaRequest) ProtoMessage() {} func (x *AllocateQuotaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +326,9 @@ type QuotaOperation struct { func (x *QuotaOperation) Reset() { *x = QuotaOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaOperation) String() string { @@ -343,7 +339,7 @@ func (*QuotaOperation) ProtoMessage() {} func (x *QuotaOperation) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +426,9 @@ type AllocateQuotaResponse struct { func (x *AllocateQuotaResponse) Reset() { *x = AllocateQuotaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocateQuotaResponse) String() string { @@ -445,7 +439,7 @@ func (*AllocateQuotaResponse) ProtoMessage() {} func (x *AllocateQuotaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -509,11 +503,9 @@ type QuotaError struct { func (x *QuotaError) Reset() { *x = QuotaError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaError) String() string { @@ -524,7 +516,7 @@ func (*QuotaError) ProtoMessage() {} func (x *QuotaError) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,56 +746,6 @@ func file_google_api_servicecontrol_v1_quota_controller_proto_init() { return } file_google_api_servicecontrol_v1_metric_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AllocateQuotaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QuotaOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AllocateQuotaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_quota_controller_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*QuotaError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicecontrol/apiv1/servicecontrolpb/service_controller.pb.go b/servicecontrol/apiv1/servicecontrolpb/service_controller.pb.go index 76eb2a5d35f7..237af692b8b1 100755 --- a/servicecontrol/apiv1/servicecontrolpb/service_controller.pb.go +++ b/servicecontrol/apiv1/servicecontrolpb/service_controller.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicecontrol/v1/service_controller.proto @@ -130,11 +130,9 @@ type CheckRequest struct { func (x *CheckRequest) Reset() { *x = CheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckRequest) String() string { @@ -145,7 +143,7 @@ func (*CheckRequest) ProtoMessage() {} func (x *CheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +205,9 @@ type CheckResponse struct { func (x *CheckResponse) Reset() { *x = CheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckResponse) String() string { @@ -222,7 +218,7 @@ func (*CheckResponse) ProtoMessage() {} func (x *CheckResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,11 +303,9 @@ type ReportRequest struct { func (x *ReportRequest) Reset() { *x = ReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRequest) String() string { @@ -322,7 +316,7 @@ func (*ReportRequest) ProtoMessage() {} func (x *ReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +381,9 @@ type ReportResponse struct { func (x *ReportResponse) Reset() { *x = ReportResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportResponse) String() string { @@ -402,7 +394,7 @@ func (*ReportResponse) ProtoMessage() {} func (x *ReportResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +450,9 @@ type CheckResponse_CheckInfo struct { func (x *CheckResponse_CheckInfo) Reset() { *x = CheckResponse_CheckInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckResponse_CheckInfo) String() string { @@ -473,7 +463,7 @@ func (*CheckResponse_CheckInfo) ProtoMessage() {} func (x *CheckResponse_CheckInfo) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +522,9 @@ type CheckResponse_ConsumerInfo struct { func (x *CheckResponse_ConsumerInfo) Reset() { *x = CheckResponse_ConsumerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckResponse_ConsumerInfo) String() string { @@ -547,7 +535,7 @@ func (*CheckResponse_ConsumerInfo) ProtoMessage() {} func (x *CheckResponse_ConsumerInfo) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,11 +589,9 @@ type ReportResponse_ReportError struct { func (x *ReportResponse_ReportError) Reset() { *x = ReportResponse_ReportError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportResponse_ReportError) String() string { @@ -616,7 +602,7 @@ func (*ReportResponse_ReportError) ProtoMessage() {} func (x *ReportResponse_ReportError) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,92 +840,6 @@ func file_google_api_servicecontrol_v1_service_controller_proto_init() { } file_google_api_servicecontrol_v1_check_error_proto_init() file_google_api_servicecontrol_v1_operation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReportResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse_CheckInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse_ConsumerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicecontrol_v1_service_controller_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportResponse_ReportError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1/helpers.go b/servicedirectory/apiv1/helpers.go index 0e0b89b709fd..68bbb4348bfd 100755 --- a/servicedirectory/apiv1/helpers.go +++ b/servicedirectory/apiv1/helpers.go @@ -18,10 +18,20 @@ package servicedirectory import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "servicedirectory.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/servicedirectory/apiv1/lookup_client.go b/servicedirectory/apiv1/lookup_client.go index 1240abb948a9..a7fc84612085 100755 --- a/servicedirectory/apiv1/lookup_client.go +++ b/servicedirectory/apiv1/lookup_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( servicedirectorypb "cloud.google.com/go/servicedirectory/apiv1/servicedirectorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -183,6 +182,8 @@ type lookupGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLookupClient creates a new lookup service client based on gRPC. @@ -209,6 +210,7 @@ func NewLookupClient(ctx context.Context, opts ...option.ClientOption) (*LookupC connPool: connPool, lookupClient: servicedirectorypb.NewLookupServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -256,6 +258,8 @@ type lookupRESTClient struct { // Points back to the CallOptions field of the containing LookupClient CallOptions **LookupCallOptions + + logger *slog.Logger } // NewLookupRESTClient creates a new lookup service rest client. @@ -273,6 +277,7 @@ func NewLookupRESTClient(ctx context.Context, opts ...option.ClientOption) (*Loo endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -325,7 +330,7 @@ func (c *lookupGRPCClient) ResolveService(ctx context.Context, req *servicedirec var resp *servicedirectorypb.ResolveServiceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lookupClient.ResolveService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lookupClient.ResolveService, req, settings.GRPC, c.logger, "ResolveService") return err }, opts...) if err != nil { @@ -343,7 +348,7 @@ func (c *lookupGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -372,7 +377,7 @@ func (c *lookupGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -439,17 +444,7 @@ func (c *lookupRESTClient) ResolveService(ctx context.Context, req *servicedirec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResolveService") if err != nil { return err } @@ -499,17 +494,7 @@ func (c *lookupRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -574,21 +559,10 @@ func (c *lookupRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicedirectory/apiv1/lookup_client_example_go123_test.go b/servicedirectory/apiv1/lookup_client_example_go123_test.go index 09d3f0d3be08..6d3829ec8429 100644 --- a/servicedirectory/apiv1/lookup_client_example_go123_test.go +++ b/servicedirectory/apiv1/lookup_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLookupClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicedirectory/apiv1/registration_client.go b/servicedirectory/apiv1/registration_client.go index ae59a312ebc8..97144aa821f2 100755 --- a/servicedirectory/apiv1/registration_client.go +++ b/servicedirectory/apiv1/registration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" servicedirectorypb "cloud.google.com/go/servicedirectory/apiv1/servicedirectorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -742,6 +741,8 @@ type registrationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRegistrationClient creates a new registration service client based on gRPC. @@ -782,6 +783,7 @@ func NewRegistrationClient(ctx context.Context, opts ...option.ClientOption) (*R connPool: connPool, registrationClient: servicedirectorypb.NewRegistrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -829,6 +831,8 @@ type registrationRESTClient struct { // Points back to the CallOptions field of the containing RegistrationClient CallOptions **RegistrationCallOptions + + logger *slog.Logger } // NewRegistrationRESTClient creates a new registration service rest client. @@ -860,6 +864,7 @@ func NewRegistrationRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -912,7 +917,7 @@ func (c *registrationGRPCClient) CreateNamespace(ctx context.Context, req *servi var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateNamespace, req, settings.GRPC, c.logger, "CreateNamespace") return err }, opts...) if err != nil { @@ -941,7 +946,7 @@ func (c *registrationGRPCClient) ListNamespaces(ctx context.Context, req *servic } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListNamespaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListNamespaces, req, settings.GRPC, c.logger, "ListNamespaces") return err }, opts...) if err != nil { @@ -976,7 +981,7 @@ func (c *registrationGRPCClient) GetNamespace(ctx context.Context, req *serviced var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetNamespace, req, settings.GRPC, c.logger, "GetNamespace") return err }, opts...) if err != nil { @@ -994,7 +999,7 @@ func (c *registrationGRPCClient) UpdateNamespace(ctx context.Context, req *servi var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateNamespace, req, settings.GRPC, c.logger, "UpdateNamespace") return err }, opts...) if err != nil { @@ -1011,7 +1016,7 @@ func (c *registrationGRPCClient) DeleteNamespace(ctx context.Context, req *servi opts = append((*c.CallOptions).DeleteNamespace[0:len((*c.CallOptions).DeleteNamespace):len((*c.CallOptions).DeleteNamespace)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteNamespace(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteNamespace, req, settings.GRPC, c.logger, "DeleteNamespace") return err }, opts...) return err @@ -1026,7 +1031,7 @@ func (c *registrationGRPCClient) CreateService(ctx context.Context, req *service var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1055,7 +1060,7 @@ func (c *registrationGRPCClient) ListServices(ctx context.Context, req *serviced } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -1090,7 +1095,7 @@ func (c *registrationGRPCClient) GetService(ctx context.Context, req *servicedir var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *registrationGRPCClient) UpdateService(ctx context.Context, req *service var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1125,7 +1130,7 @@ func (c *registrationGRPCClient) DeleteService(ctx context.Context, req *service opts = append((*c.CallOptions).DeleteService[0:len((*c.CallOptions).DeleteService):len((*c.CallOptions).DeleteService)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteService(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) return err @@ -1140,7 +1145,7 @@ func (c *registrationGRPCClient) CreateEndpoint(ctx context.Context, req *servic var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateEndpoint, req, settings.GRPC, c.logger, "CreateEndpoint") return err }, opts...) if err != nil { @@ -1169,7 +1174,7 @@ func (c *registrationGRPCClient) ListEndpoints(ctx context.Context, req *service } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListEndpoints, req, settings.GRPC, c.logger, "ListEndpoints") return err }, opts...) if err != nil { @@ -1204,7 +1209,7 @@ func (c *registrationGRPCClient) GetEndpoint(ctx context.Context, req *servicedi var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetEndpoint, req, settings.GRPC, c.logger, "GetEndpoint") return err }, opts...) if err != nil { @@ -1222,7 +1227,7 @@ func (c *registrationGRPCClient) UpdateEndpoint(ctx context.Context, req *servic var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateEndpoint, req, settings.GRPC, c.logger, "UpdateEndpoint") return err }, opts...) if err != nil { @@ -1239,7 +1244,7 @@ func (c *registrationGRPCClient) DeleteEndpoint(ctx context.Context, req *servic opts = append((*c.CallOptions).DeleteEndpoint[0:len((*c.CallOptions).DeleteEndpoint):len((*c.CallOptions).DeleteEndpoint)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteEndpoint(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteEndpoint, req, settings.GRPC, c.logger, "DeleteEndpoint") return err }, opts...) return err @@ -1254,7 +1259,7 @@ func (c *registrationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1272,7 +1277,7 @@ func (c *registrationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1290,7 +1295,7 @@ func (c *registrationGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1308,7 +1313,7 @@ func (c *registrationGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1337,7 +1342,7 @@ func (c *registrationGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1404,17 +1409,7 @@ func (c *registrationRESTClient) CreateNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNamespace") if err != nil { return err } @@ -1482,21 +1477,10 @@ func (c *registrationRESTClient) ListNamespaces(ctx context.Context, req *servic } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNamespaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1559,17 +1543,7 @@ func (c *registrationRESTClient) GetNamespace(ctx context.Context, req *serviced httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespace") if err != nil { return err } @@ -1633,17 +1607,7 @@ func (c *registrationRESTClient) UpdateNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNamespace") if err != nil { return err } @@ -1691,15 +1655,8 @@ func (c *registrationRESTClient) DeleteNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNamespace") + return err }, opts...) } @@ -1744,17 +1701,7 @@ func (c *registrationRESTClient) CreateService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } @@ -1822,21 +1769,10 @@ func (c *registrationRESTClient) ListServices(ctx context.Context, req *serviced } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1899,17 +1835,7 @@ func (c *registrationRESTClient) GetService(ctx context.Context, req *servicedir httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1973,17 +1899,7 @@ func (c *registrationRESTClient) UpdateService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } @@ -2031,15 +1947,8 @@ func (c *registrationRESTClient) DeleteService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") + return err }, opts...) } @@ -2084,17 +1993,7 @@ func (c *registrationRESTClient) CreateEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEndpoint") if err != nil { return err } @@ -2162,21 +2061,10 @@ func (c *registrationRESTClient) ListEndpoints(ctx context.Context, req *service } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEndpoints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2239,17 +2127,7 @@ func (c *registrationRESTClient) GetEndpoint(ctx context.Context, req *servicedi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEndpoint") if err != nil { return err } @@ -2313,17 +2191,7 @@ func (c *registrationRESTClient) UpdateEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEndpoint") if err != nil { return err } @@ -2370,15 +2238,8 @@ func (c *registrationRESTClient) DeleteEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEndpoint") + return err }, opts...) } @@ -2421,17 +2282,7 @@ func (c *registrationRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2487,17 +2338,7 @@ func (c *registrationRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2553,17 +2394,7 @@ func (c *registrationRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2613,17 +2444,7 @@ func (c *registrationRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2688,21 +2509,10 @@ func (c *registrationRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicedirectory/apiv1/registration_client_example_go123_test.go b/servicedirectory/apiv1/registration_client_example_go123_test.go index d006f1903064..5f7619500a85 100644 --- a/servicedirectory/apiv1/registration_client_example_go123_test.go +++ b/servicedirectory/apiv1/registration_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleRegistrationClient_ListEndpoints_all() { } for resp, err := range c.ListEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleRegistrationClient_ListNamespaces_all() { } for resp, err := range c.ListNamespaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleRegistrationClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleRegistrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicedirectory/apiv1/servicedirectorypb/endpoint.pb.go b/servicedirectory/apiv1/servicedirectorypb/endpoint.pb.go index dd81f8ffed65..0ab46aa6bc4b 100755 --- a/servicedirectory/apiv1/servicedirectorypb/endpoint.pb.go +++ b/servicedirectory/apiv1/servicedirectorypb/endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1/endpoint.proto @@ -96,11 +96,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -111,7 +109,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,20 +265,6 @@ func file_google_cloud_servicedirectory_v1_endpoint_proto_init() { if File_google_cloud_servicedirectory_v1_endpoint_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1/servicedirectorypb/lookup_service.pb.go b/servicedirectory/apiv1/servicedirectorypb/lookup_service.pb.go index 987377b5ce5e..34f5f1391446 100755 --- a/servicedirectory/apiv1/servicedirectorypb/lookup_service.pb.go +++ b/servicedirectory/apiv1/servicedirectorypb/lookup_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1/lookup_service.proto @@ -99,11 +99,9 @@ type ResolveServiceRequest struct { func (x *ResolveServiceRequest) Reset() { *x = ResolveServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveServiceRequest) String() string { @@ -114,7 +112,7 @@ func (*ResolveServiceRequest) ProtoMessage() {} func (x *ResolveServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,11 +160,9 @@ type ResolveServiceResponse struct { func (x *ResolveServiceResponse) Reset() { *x = ResolveServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveServiceResponse) String() string { @@ -177,7 +173,7 @@ func (*ResolveServiceResponse) ProtoMessage() {} func (x *ResolveServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,32 +305,6 @@ func file_google_cloud_servicedirectory_v1_lookup_service_proto_init() { return } file_google_cloud_servicedirectory_v1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResolveServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_lookup_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResolveServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1/servicedirectorypb/namespace.pb.go b/servicedirectory/apiv1/servicedirectorypb/namespace.pb.go index 8c74bc4428d0..d01303e193d8 100755 --- a/servicedirectory/apiv1/servicedirectorypb/namespace.pb.go +++ b/servicedirectory/apiv1/servicedirectorypb/namespace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1/namespace.proto @@ -58,11 +58,9 @@ type Namespace struct { func (x *Namespace) Reset() { *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_namespace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_namespace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Namespace) String() string { @@ -73,7 +71,7 @@ func (*Namespace) ProtoMessage() {} func (x *Namespace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_namespace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,20 +189,6 @@ func file_google_cloud_servicedirectory_v1_namespace_proto_init() { if File_google_cloud_servicedirectory_v1_namespace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1_namespace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Namespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1/servicedirectorypb/registration_service.pb.go b/servicedirectory/apiv1/servicedirectorypb/registration_service.pb.go index af99293a876e..ecd95a11f1b5 100755 --- a/servicedirectory/apiv1/servicedirectorypb/registration_service.pb.go +++ b/servicedirectory/apiv1/servicedirectorypb/registration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1/registration_service.proto @@ -67,11 +67,9 @@ type CreateNamespaceRequest struct { func (x *CreateNamespaceRequest) Reset() { *x = CreateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNamespaceRequest) String() string { @@ -82,7 +80,7 @@ func (*CreateNamespaceRequest) ProtoMessage() {} func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -177,11 +175,9 @@ type ListNamespacesRequest struct { func (x *ListNamespacesRequest) Reset() { *x = ListNamespacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesRequest) String() string { @@ -192,7 +188,7 @@ func (*ListNamespacesRequest) ProtoMessage() {} func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +254,9 @@ type ListNamespacesResponse struct { func (x *ListNamespacesResponse) Reset() { *x = ListNamespacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesResponse) String() string { @@ -273,7 +267,7 @@ func (*ListNamespacesResponse) ProtoMessage() {} func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +309,9 @@ type GetNamespaceRequest struct { func (x *GetNamespaceRequest) Reset() { *x = GetNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNamespaceRequest) String() string { @@ -330,7 +322,7 @@ func (*GetNamespaceRequest) ProtoMessage() {} func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +359,9 @@ type UpdateNamespaceRequest struct { func (x *UpdateNamespaceRequest) Reset() { *x = UpdateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNamespaceRequest) String() string { @@ -382,7 +372,7 @@ func (*UpdateNamespaceRequest) ProtoMessage() {} func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -424,11 +414,9 @@ type DeleteNamespaceRequest struct { func (x *DeleteNamespaceRequest) Reset() { *x = DeleteNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNamespaceRequest) String() string { @@ -439,7 +427,7 @@ func (*DeleteNamespaceRequest) ProtoMessage() {} func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,11 +472,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -499,7 +485,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -598,11 +584,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -613,7 +597,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,11 +663,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -694,7 +676,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +720,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -753,7 +733,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +770,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -805,7 +783,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -847,11 +825,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -862,7 +838,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +883,9 @@ type CreateEndpointRequest struct { func (x *CreateEndpointRequest) Reset() { *x = CreateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointRequest) String() string { @@ -922,7 +896,7 @@ func (*CreateEndpointRequest) ProtoMessage() {} func (x *CreateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +998,9 @@ type ListEndpointsRequest struct { func (x *ListEndpointsRequest) Reset() { *x = ListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsRequest) String() string { @@ -1039,7 +1011,7 @@ func (*ListEndpointsRequest) ProtoMessage() {} func (x *ListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,11 +1077,9 @@ type ListEndpointsResponse struct { func (x *ListEndpointsResponse) Reset() { *x = ListEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsResponse) String() string { @@ -1120,7 +1090,7 @@ func (*ListEndpointsResponse) ProtoMessage() {} func (x *ListEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1134,9 @@ type GetEndpointRequest struct { func (x *GetEndpointRequest) Reset() { *x = GetEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointRequest) String() string { @@ -1179,7 +1147,7 @@ func (*GetEndpointRequest) ProtoMessage() {} func (x *GetEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,11 +1184,9 @@ type UpdateEndpointRequest struct { func (x *UpdateEndpointRequest) Reset() { *x = UpdateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointRequest) String() string { @@ -1231,7 +1197,7 @@ func (*UpdateEndpointRequest) ProtoMessage() {} func (x *UpdateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1273,11 +1239,9 @@ type DeleteEndpointRequest struct { func (x *DeleteEndpointRequest) Reset() { *x = DeleteEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointRequest) String() string { @@ -1288,7 +1252,7 @@ func (*DeleteEndpointRequest) ProtoMessage() {} func (x *DeleteEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1891,224 +1855,6 @@ func file_google_cloud_servicedirectory_v1_registration_service_proto_init() { file_google_cloud_servicedirectory_v1_endpoint_proto_init() file_google_cloud_servicedirectory_v1_namespace_proto_init() file_google_cloud_servicedirectory_v1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1_registration_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1/servicedirectorypb/service.pb.go b/servicedirectory/apiv1/servicedirectorypb/service.pb.go index 667342ec1fe7..41f52959596e 100755 --- a/servicedirectory/apiv1/servicedirectorypb/service.pb.go +++ b/servicedirectory/apiv1/servicedirectorypb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1/service.proto @@ -81,11 +81,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -96,7 +94,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,20 +231,6 @@ func file_google_cloud_servicedirectory_v1_service_proto_init() { return } file_google_cloud_servicedirectory_v1_endpoint_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1beta1/helpers.go b/servicedirectory/apiv1beta1/helpers.go index 0e0b89b709fd..68bbb4348bfd 100755 --- a/servicedirectory/apiv1beta1/helpers.go +++ b/servicedirectory/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package servicedirectory import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "servicedirectory.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/servicedirectory/apiv1beta1/lookup_client.go b/servicedirectory/apiv1beta1/lookup_client.go index 052332a90ff8..6ef85ba37a79 100755 --- a/servicedirectory/apiv1beta1/lookup_client.go +++ b/servicedirectory/apiv1beta1/lookup_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( servicedirectorypb "cloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -183,6 +182,8 @@ type lookupGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLookupClient creates a new lookup service client based on gRPC. @@ -209,6 +210,7 @@ func NewLookupClient(ctx context.Context, opts ...option.ClientOption) (*LookupC connPool: connPool, lookupClient: servicedirectorypb.NewLookupServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -256,6 +258,8 @@ type lookupRESTClient struct { // Points back to the CallOptions field of the containing LookupClient CallOptions **LookupCallOptions + + logger *slog.Logger } // NewLookupRESTClient creates a new lookup service rest client. @@ -273,6 +277,7 @@ func NewLookupRESTClient(ctx context.Context, opts ...option.ClientOption) (*Loo endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -325,7 +330,7 @@ func (c *lookupGRPCClient) ResolveService(ctx context.Context, req *servicedirec var resp *servicedirectorypb.ResolveServiceResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lookupClient.ResolveService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lookupClient.ResolveService, req, settings.GRPC, c.logger, "ResolveService") return err }, opts...) if err != nil { @@ -343,7 +348,7 @@ func (c *lookupGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetL var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -372,7 +377,7 @@ func (c *lookupGRPCClient) ListLocations(ctx context.Context, req *locationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -439,17 +444,7 @@ func (c *lookupRESTClient) ResolveService(ctx context.Context, req *servicedirec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResolveService") if err != nil { return err } @@ -499,17 +494,7 @@ func (c *lookupRESTClient) GetLocation(ctx context.Context, req *locationpb.GetL httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -574,21 +559,10 @@ func (c *lookupRESTClient) ListLocations(ctx context.Context, req *locationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicedirectory/apiv1beta1/lookup_client_example_go123_test.go b/servicedirectory/apiv1beta1/lookup_client_example_go123_test.go index f087daa32d52..0652271a82f3 100644 --- a/servicedirectory/apiv1beta1/lookup_client_example_go123_test.go +++ b/servicedirectory/apiv1beta1/lookup_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLookupClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicedirectory/apiv1beta1/registration_client.go b/servicedirectory/apiv1beta1/registration_client.go index 7dd73372753c..de468b532d5c 100755 --- a/servicedirectory/apiv1beta1/registration_client.go +++ b/servicedirectory/apiv1beta1/registration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( iampb "cloud.google.com/go/iam/apiv1/iampb" servicedirectorypb "cloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -743,6 +742,8 @@ type registrationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRegistrationClient creates a new registration service client based on gRPC. @@ -783,6 +784,7 @@ func NewRegistrationClient(ctx context.Context, opts ...option.ClientOption) (*R connPool: connPool, registrationClient: servicedirectorypb.NewRegistrationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -830,6 +832,8 @@ type registrationRESTClient struct { // Points back to the CallOptions field of the containing RegistrationClient CallOptions **RegistrationCallOptions + + logger *slog.Logger } // NewRegistrationRESTClient creates a new registration service rest client. @@ -861,6 +865,7 @@ func NewRegistrationRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -913,7 +918,7 @@ func (c *registrationGRPCClient) CreateNamespace(ctx context.Context, req *servi var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateNamespace, req, settings.GRPC, c.logger, "CreateNamespace") return err }, opts...) if err != nil { @@ -942,7 +947,7 @@ func (c *registrationGRPCClient) ListNamespaces(ctx context.Context, req *servic } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListNamespaces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListNamespaces, req, settings.GRPC, c.logger, "ListNamespaces") return err }, opts...) if err != nil { @@ -977,7 +982,7 @@ func (c *registrationGRPCClient) GetNamespace(ctx context.Context, req *serviced var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetNamespace, req, settings.GRPC, c.logger, "GetNamespace") return err }, opts...) if err != nil { @@ -995,7 +1000,7 @@ func (c *registrationGRPCClient) UpdateNamespace(ctx context.Context, req *servi var resp *servicedirectorypb.Namespace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateNamespace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateNamespace, req, settings.GRPC, c.logger, "UpdateNamespace") return err }, opts...) if err != nil { @@ -1012,7 +1017,7 @@ func (c *registrationGRPCClient) DeleteNamespace(ctx context.Context, req *servi opts = append((*c.CallOptions).DeleteNamespace[0:len((*c.CallOptions).DeleteNamespace):len((*c.CallOptions).DeleteNamespace)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteNamespace(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteNamespace, req, settings.GRPC, c.logger, "DeleteNamespace") return err }, opts...) return err @@ -1027,7 +1032,7 @@ func (c *registrationGRPCClient) CreateService(ctx context.Context, req *service var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -1056,7 +1061,7 @@ func (c *registrationGRPCClient) ListServices(ctx context.Context, req *serviced } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -1091,7 +1096,7 @@ func (c *registrationGRPCClient) GetService(ctx context.Context, req *servicedir var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -1109,7 +1114,7 @@ func (c *registrationGRPCClient) UpdateService(ctx context.Context, req *service var resp *servicedirectorypb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateService, req, settings.GRPC, c.logger, "UpdateService") return err }, opts...) if err != nil { @@ -1126,7 +1131,7 @@ func (c *registrationGRPCClient) DeleteService(ctx context.Context, req *service opts = append((*c.CallOptions).DeleteService[0:len((*c.CallOptions).DeleteService):len((*c.CallOptions).DeleteService)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteService(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) return err @@ -1141,7 +1146,7 @@ func (c *registrationGRPCClient) CreateEndpoint(ctx context.Context, req *servic var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.CreateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.CreateEndpoint, req, settings.GRPC, c.logger, "CreateEndpoint") return err }, opts...) if err != nil { @@ -1170,7 +1175,7 @@ func (c *registrationGRPCClient) ListEndpoints(ctx context.Context, req *service } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.ListEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.ListEndpoints, req, settings.GRPC, c.logger, "ListEndpoints") return err }, opts...) if err != nil { @@ -1205,7 +1210,7 @@ func (c *registrationGRPCClient) GetEndpoint(ctx context.Context, req *servicedi var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetEndpoint, req, settings.GRPC, c.logger, "GetEndpoint") return err }, opts...) if err != nil { @@ -1223,7 +1228,7 @@ func (c *registrationGRPCClient) UpdateEndpoint(ctx context.Context, req *servic var resp *servicedirectorypb.Endpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.UpdateEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.UpdateEndpoint, req, settings.GRPC, c.logger, "UpdateEndpoint") return err }, opts...) if err != nil { @@ -1240,7 +1245,7 @@ func (c *registrationGRPCClient) DeleteEndpoint(ctx context.Context, req *servic opts = append((*c.CallOptions).DeleteEndpoint[0:len((*c.CallOptions).DeleteEndpoint):len((*c.CallOptions).DeleteEndpoint)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.registrationClient.DeleteEndpoint(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.registrationClient.DeleteEndpoint, req, settings.GRPC, c.logger, "DeleteEndpoint") return err }, opts...) return err @@ -1255,7 +1260,7 @@ func (c *registrationGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.Ge var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1273,7 +1278,7 @@ func (c *registrationGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.Se var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1291,7 +1296,7 @@ func (c *registrationGRPCClient) TestIamPermissions(ctx context.Context, req *ia var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.registrationClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.registrationClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1309,7 +1314,7 @@ func (c *registrationGRPCClient) GetLocation(ctx context.Context, req *locationp var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1338,7 +1343,7 @@ func (c *registrationGRPCClient) ListLocations(ctx context.Context, req *locatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1405,17 +1410,7 @@ func (c *registrationRESTClient) CreateNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNamespace") if err != nil { return err } @@ -1483,21 +1478,10 @@ func (c *registrationRESTClient) ListNamespaces(ctx context.Context, req *servic } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNamespaces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1560,17 +1544,7 @@ func (c *registrationRESTClient) GetNamespace(ctx context.Context, req *serviced httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNamespace") if err != nil { return err } @@ -1634,17 +1608,7 @@ func (c *registrationRESTClient) UpdateNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNamespace") if err != nil { return err } @@ -1692,15 +1656,8 @@ func (c *registrationRESTClient) DeleteNamespace(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNamespace") + return err }, opts...) } @@ -1745,17 +1702,7 @@ func (c *registrationRESTClient) CreateService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } @@ -1823,21 +1770,10 @@ func (c *registrationRESTClient) ListServices(ctx context.Context, req *serviced } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1900,17 +1836,7 @@ func (c *registrationRESTClient) GetService(ctx context.Context, req *servicedir httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1974,17 +1900,7 @@ func (c *registrationRESTClient) UpdateService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateService") if err != nil { return err } @@ -2032,15 +1948,8 @@ func (c *registrationRESTClient) DeleteService(ctx context.Context, req *service httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") + return err }, opts...) } @@ -2085,17 +1994,7 @@ func (c *registrationRESTClient) CreateEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEndpoint") if err != nil { return err } @@ -2163,21 +2062,10 @@ func (c *registrationRESTClient) ListEndpoints(ctx context.Context, req *service } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEndpoints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2240,17 +2128,7 @@ func (c *registrationRESTClient) GetEndpoint(ctx context.Context, req *servicedi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEndpoint") if err != nil { return err } @@ -2314,17 +2192,7 @@ func (c *registrationRESTClient) UpdateEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEndpoint") if err != nil { return err } @@ -2371,15 +2239,8 @@ func (c *registrationRESTClient) DeleteEndpoint(ctx context.Context, req *servic httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEndpoint") + return err }, opts...) } @@ -2422,17 +2283,7 @@ func (c *registrationRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2488,17 +2339,7 @@ func (c *registrationRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2555,17 +2396,7 @@ func (c *registrationRESTClient) TestIamPermissions(ctx context.Context, req *ia httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2615,17 +2446,7 @@ func (c *registrationRESTClient) GetLocation(ctx context.Context, req *locationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -2690,21 +2511,10 @@ func (c *registrationRESTClient) ListLocations(ctx context.Context, req *locatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicedirectory/apiv1beta1/registration_client_example_go123_test.go b/servicedirectory/apiv1beta1/registration_client_example_go123_test.go index fd0fd633134c..97cfee864000 100644 --- a/servicedirectory/apiv1beta1/registration_client_example_go123_test.go +++ b/servicedirectory/apiv1beta1/registration_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleRegistrationClient_ListEndpoints_all() { } for resp, err := range c.ListEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleRegistrationClient_ListNamespaces_all() { } for resp, err := range c.ListNamespaces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleRegistrationClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleRegistrationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicedirectory/apiv1beta1/servicedirectorypb/endpoint.pb.go b/servicedirectory/apiv1beta1/servicedirectorypb/endpoint.pb.go index f72e8e2836b4..1af206395ff3 100755 --- a/servicedirectory/apiv1beta1/servicedirectorypb/endpoint.pb.go +++ b/servicedirectory/apiv1beta1/servicedirectorypb/endpoint.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1beta1/endpoint.proto @@ -101,11 +101,9 @@ type Endpoint struct { func (x *Endpoint) Reset() { *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_endpoint_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Endpoint) String() string { @@ -116,7 +114,7 @@ func (*Endpoint) ProtoMessage() {} func (x *Endpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,20 +300,6 @@ func file_google_cloud_servicedirectory_v1beta1_endpoint_proto_init() { if File_google_cloud_servicedirectory_v1beta1_endpoint_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1beta1_endpoint_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1beta1/servicedirectorypb/lookup_service.pb.go b/servicedirectory/apiv1beta1/servicedirectorypb/lookup_service.pb.go index 265804e9ef92..d32dc44ab957 100755 --- a/servicedirectory/apiv1beta1/servicedirectorypb/lookup_service.pb.go +++ b/servicedirectory/apiv1beta1/servicedirectorypb/lookup_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1beta1/lookup_service.proto @@ -99,11 +99,9 @@ type ResolveServiceRequest struct { func (x *ResolveServiceRequest) Reset() { *x = ResolveServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveServiceRequest) String() string { @@ -114,7 +112,7 @@ func (*ResolveServiceRequest) ProtoMessage() {} func (x *ResolveServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,11 +160,9 @@ type ResolveServiceResponse struct { func (x *ResolveServiceResponse) Reset() { *x = ResolveServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveServiceResponse) String() string { @@ -177,7 +173,7 @@ func (*ResolveServiceResponse) ProtoMessage() {} func (x *ResolveServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,32 +308,6 @@ func file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_init() { return } file_google_cloud_servicedirectory_v1beta1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResolveServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_lookup_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResolveServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1beta1/servicedirectorypb/namespace.pb.go b/servicedirectory/apiv1beta1/servicedirectorypb/namespace.pb.go index e3805ed31429..247a40ab2276 100755 --- a/servicedirectory/apiv1beta1/servicedirectorypb/namespace.pb.go +++ b/servicedirectory/apiv1beta1/servicedirectorypb/namespace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1beta1/namespace.proto @@ -63,11 +63,9 @@ type Namespace struct { func (x *Namespace) Reset() { *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_namespace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_namespace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Namespace) String() string { @@ -78,7 +76,7 @@ func (*Namespace) ProtoMessage() {} func (x *Namespace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_namespace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,20 +223,6 @@ func file_google_cloud_servicedirectory_v1beta1_namespace_proto_init() { if File_google_cloud_servicedirectory_v1beta1_namespace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1beta1_namespace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Namespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1beta1/servicedirectorypb/registration_service.pb.go b/servicedirectory/apiv1beta1/servicedirectorypb/registration_service.pb.go index a2f4dbf96ce3..15065e59614f 100755 --- a/servicedirectory/apiv1beta1/servicedirectorypb/registration_service.pb.go +++ b/servicedirectory/apiv1beta1/servicedirectorypb/registration_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1beta1/registration_service.proto @@ -67,11 +67,9 @@ type CreateNamespaceRequest struct { func (x *CreateNamespaceRequest) Reset() { *x = CreateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNamespaceRequest) String() string { @@ -82,7 +80,7 @@ func (*CreateNamespaceRequest) ProtoMessage() {} func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,11 +177,9 @@ type ListNamespacesRequest struct { func (x *ListNamespacesRequest) Reset() { *x = ListNamespacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesRequest) String() string { @@ -194,7 +190,7 @@ func (*ListNamespacesRequest) ProtoMessage() {} func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,11 +256,9 @@ type ListNamespacesResponse struct { func (x *ListNamespacesResponse) Reset() { *x = ListNamespacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesResponse) String() string { @@ -275,7 +269,7 @@ func (*ListNamespacesResponse) ProtoMessage() {} func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +311,9 @@ type GetNamespaceRequest struct { func (x *GetNamespaceRequest) Reset() { *x = GetNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNamespaceRequest) String() string { @@ -332,7 +324,7 @@ func (*GetNamespaceRequest) ProtoMessage() {} func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +361,9 @@ type UpdateNamespaceRequest struct { func (x *UpdateNamespaceRequest) Reset() { *x = UpdateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNamespaceRequest) String() string { @@ -384,7 +374,7 @@ func (*UpdateNamespaceRequest) ProtoMessage() {} func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -426,11 +416,9 @@ type DeleteNamespaceRequest struct { func (x *DeleteNamespaceRequest) Reset() { *x = DeleteNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNamespaceRequest) String() string { @@ -441,7 +429,7 @@ func (*DeleteNamespaceRequest) ProtoMessage() {} func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -501,7 +487,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +591,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -620,7 +604,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +670,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -701,7 +683,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,11 +727,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -760,7 +740,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +777,9 @@ type UpdateServiceRequest struct { func (x *UpdateServiceRequest) Reset() { *x = UpdateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateServiceRequest) String() string { @@ -812,7 +790,7 @@ func (*UpdateServiceRequest) ProtoMessage() {} func (x *UpdateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +832,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -869,7 +845,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,11 +890,9 @@ type CreateEndpointRequest struct { func (x *CreateEndpointRequest) Reset() { *x = CreateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEndpointRequest) String() string { @@ -929,7 +903,7 @@ func (*CreateEndpointRequest) ProtoMessage() {} func (x *CreateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1007,9 @@ type ListEndpointsRequest struct { func (x *ListEndpointsRequest) Reset() { *x = ListEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsRequest) String() string { @@ -1048,7 +1020,7 @@ func (*ListEndpointsRequest) ProtoMessage() {} func (x *ListEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1114,11 +1086,9 @@ type ListEndpointsResponse struct { func (x *ListEndpointsResponse) Reset() { *x = ListEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEndpointsResponse) String() string { @@ -1129,7 +1099,7 @@ func (*ListEndpointsResponse) ProtoMessage() {} func (x *ListEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1173,11 +1143,9 @@ type GetEndpointRequest struct { func (x *GetEndpointRequest) Reset() { *x = GetEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEndpointRequest) String() string { @@ -1188,7 +1156,7 @@ func (*GetEndpointRequest) ProtoMessage() {} func (x *GetEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,11 +1193,9 @@ type UpdateEndpointRequest struct { func (x *UpdateEndpointRequest) Reset() { *x = UpdateEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEndpointRequest) String() string { @@ -1240,7 +1206,7 @@ func (*UpdateEndpointRequest) ProtoMessage() {} func (x *UpdateEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1282,11 +1248,9 @@ type DeleteEndpointRequest struct { func (x *DeleteEndpointRequest) Reset() { *x = DeleteEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEndpointRequest) String() string { @@ -1297,7 +1261,7 @@ func (*DeleteEndpointRequest) ProtoMessage() {} func (x *DeleteEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1937,224 +1901,6 @@ func file_google_cloud_servicedirectory_v1beta1_registration_service_proto_init( file_google_cloud_servicedirectory_v1beta1_endpoint_proto_init() file_google_cloud_servicedirectory_v1beta1_namespace_proto_init() file_google_cloud_servicedirectory_v1beta1_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicedirectory_v1beta1_registration_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicedirectory/apiv1beta1/servicedirectorypb/service.pb.go b/servicedirectory/apiv1beta1/servicedirectorypb/service.pb.go index 87602b2fdeba..3a7cb83258ed 100755 --- a/servicedirectory/apiv1beta1/servicedirectorypb/service.pb.go +++ b/servicedirectory/apiv1beta1/servicedirectorypb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicedirectory/v1beta1/service.proto @@ -88,11 +88,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicedirectory_v1beta1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicedirectory_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -103,7 +101,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicedirectory_v1beta1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,20 +268,6 @@ func file_google_cloud_servicedirectory_v1beta1_service_proto_init() { return } file_google_cloud_servicedirectory_v1beta1_endpoint_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicedirectory_v1beta1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicehealth/apiv1/helpers.go b/servicehealth/apiv1/helpers.go index 871135d60e89..55b4cae90600 100755 --- a/servicehealth/apiv1/helpers.go +++ b/servicehealth/apiv1/helpers.go @@ -18,10 +18,20 @@ package servicehealth import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "servicehealth.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/servicehealth/apiv1/service_health_client.go b/servicehealth/apiv1/service_health_client.go index 89499df54712..6abc6c91f775 100755 --- a/servicehealth/apiv1/service_health_client.go +++ b/servicehealth/apiv1/service_health_client.go @@ -19,7 +19,7 @@ package servicehealth import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( servicehealthpb "cloud.google.com/go/servicehealth/apiv1/servicehealthpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -331,6 +330,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new service health client based on gRPC. @@ -357,6 +358,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: servicehealthpb.NewServiceHealthClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -404,6 +406,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new service health rest client. @@ -421,6 +425,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -484,7 +489,7 @@ func (c *gRPCClient) ListEvents(ctx context.Context, req *servicehealthpb.ListEv } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEvents, req, settings.GRPC, c.logger, "ListEvents") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *gRPCClient) GetEvent(ctx context.Context, req *servicehealthpb.GetEvent var resp *servicehealthpb.Event err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEvent, req, settings.GRPC, c.logger, "GetEvent") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *gRPCClient) ListOrganizationEvents(ctx context.Context, req *servicehea } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListOrganizationEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListOrganizationEvents, req, settings.GRPC, c.logger, "ListOrganizationEvents") return err }, opts...) if err != nil { @@ -583,7 +588,7 @@ func (c *gRPCClient) GetOrganizationEvent(ctx context.Context, req *servicehealt var resp *servicehealthpb.OrganizationEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrganizationEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrganizationEvent, req, settings.GRPC, c.logger, "GetOrganizationEvent") return err }, opts...) if err != nil { @@ -612,7 +617,7 @@ func (c *gRPCClient) ListOrganizationImpacts(ctx context.Context, req *servicehe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListOrganizationImpacts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListOrganizationImpacts, req, settings.GRPC, c.logger, "ListOrganizationImpacts") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *gRPCClient) GetOrganizationImpact(ctx context.Context, req *serviceheal var resp *servicehealthpb.OrganizationImpact err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrganizationImpact(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrganizationImpact, req, settings.GRPC, c.logger, "GetOrganizationImpact") return err }, opts...) if err != nil { @@ -665,7 +670,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -694,7 +699,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -771,21 +776,10 @@ func (c *restClient) ListEvents(ctx context.Context, req *servicehealthpb.ListEv } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -848,17 +842,7 @@ func (c *restClient) GetEvent(ctx context.Context, req *servicehealthpb.GetEvent httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvent") if err != nil { return err } @@ -926,21 +910,10 @@ func (c *restClient) ListOrganizationEvents(ctx context.Context, req *servicehea } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrganizationEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1004,17 +977,7 @@ func (c *restClient) GetOrganizationEvent(ctx context.Context, req *servicehealt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganizationEvent") if err != nil { return err } @@ -1080,21 +1043,10 @@ func (c *restClient) ListOrganizationImpacts(ctx context.Context, req *servicehe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrganizationImpacts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1158,17 +1110,7 @@ func (c *restClient) GetOrganizationImpact(ctx context.Context, req *serviceheal httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrganizationImpact") if err != nil { return err } @@ -1218,17 +1160,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1293,21 +1225,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicehealth/apiv1/service_health_client_example_go123_test.go b/servicehealth/apiv1/service_health_client_example_go123_test.go index c7e709a58f48..996f85558c42 100644 --- a/servicehealth/apiv1/service_health_client_example_go123_test.go +++ b/servicehealth/apiv1/service_health_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListEvents_all() { } for resp, err := range c.ListEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListOrganizationEvents_all() { } for resp, err := range c.ListOrganizationEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListOrganizationImpacts_all() { } for resp, err := range c.ListOrganizationImpacts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicehealth/apiv1/servicehealthpb/event_resources.pb.go b/servicehealth/apiv1/servicehealthpb/event_resources.pb.go index f4451f8885a5..174eba14ff9f 100755 --- a/servicehealth/apiv1/servicehealthpb/event_resources.pb.go +++ b/servicehealth/apiv1/servicehealthpb/event_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicehealth/v1/event_resources.proto @@ -755,11 +755,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -770,7 +768,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,11 +940,9 @@ type OrganizationEvent struct { func (x *OrganizationEvent) Reset() { *x = OrganizationEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationEvent) String() string { @@ -957,7 +953,7 @@ func (*OrganizationEvent) ProtoMessage() {} func (x *OrganizationEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1086,9 @@ type EventUpdate struct { func (x *EventUpdate) Reset() { *x = EventUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventUpdate) String() string { @@ -1105,7 +1099,7 @@ func (*EventUpdate) ProtoMessage() {} func (x *EventUpdate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1161,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -1182,7 +1174,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,11 +1210,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -1233,7 +1223,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1276,11 +1266,9 @@ type EventImpact struct { func (x *EventImpact) Reset() { *x = EventImpact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventImpact) String() string { @@ -1291,7 +1279,7 @@ func (*EventImpact) ProtoMessage() {} func (x *EventImpact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1348,11 +1336,9 @@ type OrganizationImpact struct { func (x *OrganizationImpact) Reset() { *x = OrganizationImpact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrganizationImpact) String() string { @@ -1363,7 +1349,7 @@ func (*OrganizationImpact) ProtoMessage() {} func (x *OrganizationImpact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1423,11 +1409,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -1438,7 +1422,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1500,9 @@ type ListEventsRequest struct { func (x *ListEventsRequest) Reset() { *x = ListEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsRequest) String() string { @@ -1531,7 +1513,7 @@ func (*ListEventsRequest) ProtoMessage() {} func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1601,11 +1583,9 @@ type ListEventsResponse struct { func (x *ListEventsResponse) Reset() { *x = ListEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsResponse) String() string { @@ -1616,7 +1596,7 @@ func (*ListEventsResponse) ProtoMessage() {} func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1670,11 +1650,9 @@ type GetEventRequest struct { func (x *GetEventRequest) Reset() { *x = GetEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventRequest) String() string { @@ -1685,7 +1663,7 @@ func (*GetEventRequest) ProtoMessage() {} func (x *GetEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1761,11 +1739,9 @@ type ListOrganizationEventsRequest struct { func (x *ListOrganizationEventsRequest) Reset() { *x = ListOrganizationEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrganizationEventsRequest) String() string { @@ -1776,7 +1752,7 @@ func (*ListOrganizationEventsRequest) ProtoMessage() {} func (x *ListOrganizationEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,11 +1822,9 @@ type ListOrganizationEventsResponse struct { func (x *ListOrganizationEventsResponse) Reset() { *x = ListOrganizationEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrganizationEventsResponse) String() string { @@ -1861,7 +1835,7 @@ func (*ListOrganizationEventsResponse) ProtoMessage() {} func (x *ListOrganizationEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1917,11 +1891,9 @@ type GetOrganizationEventRequest struct { func (x *GetOrganizationEventRequest) Reset() { *x = GetOrganizationEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationEventRequest) String() string { @@ -1932,7 +1904,7 @@ func (*GetOrganizationEventRequest) ProtoMessage() {} func (x *GetOrganizationEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2007,11 +1979,9 @@ type ListOrganizationImpactsRequest struct { func (x *ListOrganizationImpactsRequest) Reset() { *x = ListOrganizationImpactsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrganizationImpactsRequest) String() string { @@ -2022,7 +1992,7 @@ func (*ListOrganizationImpactsRequest) ProtoMessage() {} func (x *ListOrganizationImpactsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2087,11 +2057,9 @@ type ListOrganizationImpactsResponse struct { func (x *ListOrganizationImpactsResponse) Reset() { *x = ListOrganizationImpactsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrganizationImpactsResponse) String() string { @@ -2102,7 +2070,7 @@ func (*ListOrganizationImpactsResponse) ProtoMessage() {} func (x *ListOrganizationImpactsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2158,11 +2126,9 @@ type GetOrganizationImpactRequest struct { func (x *GetOrganizationImpactRequest) Reset() { *x = GetOrganizationImpactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrganizationImpactRequest) String() string { @@ -2173,7 +2139,7 @@ func (*GetOrganizationImpactRequest) ProtoMessage() {} func (x *GetOrganizationImpactRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2699,212 +2665,6 @@ func file_google_cloud_servicehealth_v1_event_resources_proto_init() { if File_google_cloud_servicehealth_v1_event_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EventImpact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OrganizationImpact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListOrganizationEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListOrganizationEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListOrganizationImpactsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListOrganizationImpactsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_servicehealth_v1_event_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetOrganizationImpactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/servicehealth/apiv1/servicehealthpb/event_service.pb.go b/servicehealth/apiv1/servicehealthpb/event_service.pb.go index 0cc328d7a48f..aefa2807f95e 100755 --- a/servicehealth/apiv1/servicehealthpb/event_service.pb.go +++ b/servicehealth/apiv1/servicehealthpb/event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/servicehealth/v1/event_service.proto diff --git a/servicemanagement/apiv1/helpers.go b/servicemanagement/apiv1/helpers.go index c0f772714790..440c1aaec189 100755 --- a/servicemanagement/apiv1/helpers.go +++ b/servicemanagement/apiv1/helpers.go @@ -18,10 +18,20 @@ package servicemanagement import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "servicemanagement.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -45,3 +55,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/service.management.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/servicemanagement/apiv1/service_manager_client.go b/servicemanagement/apiv1/service_manager_client.go index 37647d372493..ebb64838bb8a 100755 --- a/servicemanagement/apiv1/service_manager_client.go +++ b/servicemanagement/apiv1/service_manager_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" servicemanagementpb "cloud.google.com/go/servicemanagement/apiv1/servicemanagementpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -471,6 +470,8 @@ type serviceManagerGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewServiceManagerClient creates a new service manager client based on gRPC. @@ -498,6 +499,7 @@ func NewServiceManagerClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, serviceManagerClient: servicemanagementpb.NewServiceManagerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -562,6 +564,8 @@ type serviceManagerRESTClient struct { // Points back to the CallOptions field of the containing ServiceManagerClient CallOptions **ServiceManagerCallOptions + + logger *slog.Logger } // NewServiceManagerRESTClient creates a new service manager rest client. @@ -580,6 +584,7 @@ func NewServiceManagerRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -650,7 +655,7 @@ func (c *serviceManagerGRPCClient) ListServices(ctx context.Context, req *servic } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -685,7 +690,7 @@ func (c *serviceManagerGRPCClient) GetService(ctx context.Context, req *servicem var resp *servicemanagementpb.ManagedService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -700,7 +705,7 @@ func (c *serviceManagerGRPCClient) CreateService(ctx context.Context, req *servi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.CreateService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.CreateService, req, settings.GRPC, c.logger, "CreateService") return err }, opts...) if err != nil { @@ -720,7 +725,7 @@ func (c *serviceManagerGRPCClient) DeleteService(ctx context.Context, req *servi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.DeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.DeleteService, req, settings.GRPC, c.logger, "DeleteService") return err }, opts...) if err != nil { @@ -740,7 +745,7 @@ func (c *serviceManagerGRPCClient) UndeleteService(ctx context.Context, req *ser var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.UndeleteService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.UndeleteService, req, settings.GRPC, c.logger, "UndeleteService") return err }, opts...) if err != nil { @@ -771,7 +776,7 @@ func (c *serviceManagerGRPCClient) ListServiceConfigs(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.ListServiceConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.ListServiceConfigs, req, settings.GRPC, c.logger, "ListServiceConfigs") return err }, opts...) if err != nil { @@ -806,7 +811,7 @@ func (c *serviceManagerGRPCClient) GetServiceConfig(ctx context.Context, req *se var resp *serviceconfigpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.GetServiceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.GetServiceConfig, req, settings.GRPC, c.logger, "GetServiceConfig") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *serviceManagerGRPCClient) CreateServiceConfig(ctx context.Context, req var resp *serviceconfigpb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.CreateServiceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.CreateServiceConfig, req, settings.GRPC, c.logger, "CreateServiceConfig") return err }, opts...) if err != nil { @@ -842,7 +847,7 @@ func (c *serviceManagerGRPCClient) SubmitConfigSource(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.SubmitConfigSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.SubmitConfigSource, req, settings.GRPC, c.logger, "SubmitConfigSource") return err }, opts...) if err != nil { @@ -873,7 +878,7 @@ func (c *serviceManagerGRPCClient) ListServiceRollouts(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.ListServiceRollouts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.ListServiceRollouts, req, settings.GRPC, c.logger, "ListServiceRollouts") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *serviceManagerGRPCClient) GetServiceRollout(ctx context.Context, req *s var resp *servicemanagementpb.Rollout err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.GetServiceRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.GetServiceRollout, req, settings.GRPC, c.logger, "GetServiceRollout") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *serviceManagerGRPCClient) CreateServiceRollout(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.CreateServiceRollout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.CreateServiceRollout, req, settings.GRPC, c.logger, "CreateServiceRollout") return err }, opts...) if err != nil { @@ -943,7 +948,7 @@ func (c *serviceManagerGRPCClient) GenerateConfigReport(ctx context.Context, req var resp *servicemanagementpb.GenerateConfigReportResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.serviceManagerClient.GenerateConfigReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.serviceManagerClient.GenerateConfigReport, req, settings.GRPC, c.logger, "GenerateConfigReport") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *serviceManagerGRPCClient) GetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -979,7 +984,7 @@ func (c *serviceManagerGRPCClient) SetIamPolicy(ctx context.Context, req *iampb. var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -997,7 +1002,7 @@ func (c *serviceManagerGRPCClient) TestIamPermissions(ctx context.Context, req * var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1023,7 +1028,7 @@ func (c *serviceManagerGRPCClient) ListOperations(ctx context.Context, req *long } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1104,21 +1109,10 @@ func (c *serviceManagerRESTClient) ListServices(ctx context.Context, req *servic } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1182,17 +1176,7 @@ func (c *serviceManagerRESTClient) GetService(ctx context.Context, req *servicem httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -1255,21 +1239,10 @@ func (c *serviceManagerRESTClient) CreateService(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1326,21 +1299,10 @@ func (c *serviceManagerRESTClient) DeleteService(ctx context.Context, req *servi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1395,21 +1357,10 @@ func (c *serviceManagerRESTClient) UndeleteService(ctx context.Context, req *ser httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "UndeleteService") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1473,21 +1424,10 @@ func (c *serviceManagerRESTClient) ListServiceConfigs(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServiceConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1553,17 +1493,7 @@ func (c *serviceManagerRESTClient) GetServiceConfig(ctx context.Context, req *se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServiceConfig") if err != nil { return err } @@ -1627,17 +1557,7 @@ func (c *serviceManagerRESTClient) CreateServiceConfig(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServiceConfig") if err != nil { return err } @@ -1705,21 +1625,10 @@ func (c *serviceManagerRESTClient) SubmitConfigSource(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitConfigSource") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1784,21 +1693,10 @@ func (c *serviceManagerRESTClient) ListServiceRollouts(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServiceRollouts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1862,17 +1760,7 @@ func (c *serviceManagerRESTClient) GetServiceRollout(ctx context.Context, req *s httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetServiceRollout") if err != nil { return err } @@ -1941,21 +1829,10 @@ func (c *serviceManagerRESTClient) CreateServiceRollout(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateServiceRollout") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2019,17 +1896,7 @@ func (c *serviceManagerRESTClient) GenerateConfigReport(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateConfigReport") if err != nil { return err } @@ -2086,17 +1953,7 @@ func (c *serviceManagerRESTClient) GetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2156,17 +2013,7 @@ func (c *serviceManagerRESTClient) SetIamPolicy(ctx context.Context, req *iampb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2228,17 +2075,7 @@ func (c *serviceManagerRESTClient) TestIamPermissions(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2306,21 +2143,10 @@ func (c *serviceManagerRESTClient) ListOperations(ctx context.Context, req *long } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/servicemanagement/apiv1/service_manager_client_example_go123_test.go b/servicemanagement/apiv1/service_manager_client_example_go123_test.go index 5722e45cce3d..e6d765466169 100644 --- a/servicemanagement/apiv1/service_manager_client_example_go123_test.go +++ b/servicemanagement/apiv1/service_manager_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleServiceManagerClient_ListServiceConfigs_all() { } for resp, err := range c.ListServiceConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleServiceManagerClient_ListServiceRollouts_all() { } for resp, err := range c.ListServiceRollouts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleServiceManagerClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleServiceManagerClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/servicemanagement/apiv1/servicemanagementpb/resources.pb.go b/servicemanagement/apiv1/servicemanagementpb/resources.pb.go index 70e9caab94b0..02d9dedd370c 100755 --- a/servicemanagement/apiv1/servicemanagementpb/resources.pb.go +++ b/servicemanagement/apiv1/servicemanagementpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicemanagement/v1/resources.proto @@ -315,11 +315,9 @@ type ManagedService struct { func (x *ManagedService) Reset() { *x = ManagedService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedService) String() string { @@ -330,7 +328,7 @@ func (*ManagedService) ProtoMessage() {} func (x *ManagedService) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,11 +376,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -393,7 +389,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +448,9 @@ type Diagnostic struct { func (x *Diagnostic) Reset() { *x = Diagnostic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Diagnostic) String() string { @@ -467,7 +461,7 @@ func (*Diagnostic) ProtoMessage() {} func (x *Diagnostic) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +515,9 @@ type ConfigSource struct { func (x *ConfigSource) Reset() { *x = ConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigSource) String() string { @@ -536,7 +528,7 @@ func (*ConfigSource) ProtoMessage() {} func (x *ConfigSource) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +573,9 @@ type ConfigFile struct { func (x *ConfigFile) Reset() { *x = ConfigFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigFile) String() string { @@ -596,7 +586,7 @@ func (*ConfigFile) ProtoMessage() {} func (x *ConfigFile) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +635,9 @@ type ConfigRef struct { func (x *ConfigRef) Reset() { *x = ConfigRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigRef) String() string { @@ -660,7 +648,7 @@ func (*ConfigRef) ProtoMessage() {} func (x *ConfigRef) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +689,9 @@ type ChangeReport struct { func (x *ChangeReport) Reset() { *x = ChangeReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeReport) String() string { @@ -716,7 +702,7 @@ func (*ChangeReport) ProtoMessage() {} func (x *ChangeReport) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +765,9 @@ type Rollout struct { func (x *Rollout) Reset() { *x = Rollout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rollout) String() string { @@ -794,7 +778,7 @@ func (*Rollout) ProtoMessage() {} func (x *Rollout) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +883,9 @@ type OperationMetadata_Step struct { func (x *OperationMetadata_Step) Reset() { *x = OperationMetadata_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata_Step) String() string { @@ -914,7 +896,7 @@ func (*OperationMetadata_Step) ProtoMessage() {} func (x *OperationMetadata_Step) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +968,9 @@ type Rollout_TrafficPercentStrategy struct { func (x *Rollout_TrafficPercentStrategy) Reset() { *x = Rollout_TrafficPercentStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rollout_TrafficPercentStrategy) String() string { @@ -1001,7 +981,7 @@ func (*Rollout_TrafficPercentStrategy) ProtoMessage() {} func (x *Rollout_TrafficPercentStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1013,9 @@ type Rollout_DeleteServiceStrategy struct { func (x *Rollout_DeleteServiceStrategy) Reset() { *x = Rollout_DeleteServiceStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Rollout_DeleteServiceStrategy) String() string { @@ -1048,7 +1026,7 @@ func (*Rollout_DeleteServiceStrategy) ProtoMessage() {} func (x *Rollout_DeleteServiceStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,140 +1269,6 @@ func file_google_api_servicemanagement_v1_resources_proto_init() { if File_google_api_servicemanagement_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_servicemanagement_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ManagedService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Diagnostic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ConfigFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ConfigRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ChangeReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Rollout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Rollout_TrafficPercentStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Rollout_DeleteServiceStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_api_servicemanagement_v1_resources_proto_msgTypes[7].OneofWrappers = []any{ (*Rollout_TrafficPercentStrategy_)(nil), (*Rollout_DeleteServiceStrategy_)(nil), diff --git a/servicemanagement/apiv1/servicemanagementpb/servicemanager.pb.go b/servicemanagement/apiv1/servicemanagementpb/servicemanager.pb.go index 8bf80eb57a6c..d7c089bc1d7f 100755 --- a/servicemanagement/apiv1/servicemanagementpb/servicemanager.pb.go +++ b/servicemanagement/apiv1/servicemanagementpb/servicemanager.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/servicemanagement/v1/servicemanager.proto @@ -121,11 +121,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -136,7 +134,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +192,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -209,7 +205,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +247,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -266,7 +260,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,11 +294,9 @@ type CreateServiceRequest struct { func (x *CreateServiceRequest) Reset() { *x = CreateServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRequest) String() string { @@ -315,7 +307,7 @@ func (*CreateServiceRequest) ProtoMessage() {} func (x *CreateServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +343,9 @@ type DeleteServiceRequest struct { func (x *DeleteServiceRequest) Reset() { *x = DeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteServiceRequest) String() string { @@ -366,7 +356,7 @@ func (*DeleteServiceRequest) ProtoMessage() {} func (x *DeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,11 +392,9 @@ type UndeleteServiceRequest struct { func (x *UndeleteServiceRequest) Reset() { *x = UndeleteServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteServiceRequest) String() string { @@ -417,7 +405,7 @@ func (*UndeleteServiceRequest) ProtoMessage() {} func (x *UndeleteServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +439,9 @@ type UndeleteServiceResponse struct { func (x *UndeleteServiceResponse) Reset() { *x = UndeleteServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteServiceResponse) String() string { @@ -466,7 +452,7 @@ func (*UndeleteServiceResponse) ProtoMessage() {} func (x *UndeleteServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +496,9 @@ type GetServiceConfigRequest struct { func (x *GetServiceConfigRequest) Reset() { *x = GetServiceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceConfigRequest) String() string { @@ -525,7 +509,7 @@ func (*GetServiceConfigRequest) ProtoMessage() {} func (x *GetServiceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,11 +564,9 @@ type ListServiceConfigsRequest struct { func (x *ListServiceConfigsRequest) Reset() { *x = ListServiceConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceConfigsRequest) String() string { @@ -595,7 +577,7 @@ func (*ListServiceConfigsRequest) ProtoMessage() {} func (x *ListServiceConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,11 +627,9 @@ type ListServiceConfigsResponse struct { func (x *ListServiceConfigsResponse) Reset() { *x = ListServiceConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceConfigsResponse) String() string { @@ -660,7 +640,7 @@ func (*ListServiceConfigsResponse) ProtoMessage() {} func (x *ListServiceConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +685,9 @@ type CreateServiceConfigRequest struct { func (x *CreateServiceConfigRequest) Reset() { *x = CreateServiceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceConfigRequest) String() string { @@ -720,7 +698,7 @@ func (*CreateServiceConfigRequest) ProtoMessage() {} func (x *CreateServiceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +747,9 @@ type SubmitConfigSourceRequest struct { func (x *SubmitConfigSourceRequest) Reset() { *x = SubmitConfigSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitConfigSourceRequest) String() string { @@ -784,7 +760,7 @@ func (*SubmitConfigSourceRequest) ProtoMessage() {} func (x *SubmitConfigSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +808,9 @@ type SubmitConfigSourceResponse struct { func (x *SubmitConfigSourceResponse) Reset() { *x = SubmitConfigSourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitConfigSourceResponse) String() string { @@ -847,7 +821,7 @@ func (*SubmitConfigSourceResponse) ProtoMessage() {} func (x *SubmitConfigSourceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +859,9 @@ type CreateServiceRolloutRequest struct { func (x *CreateServiceRolloutRequest) Reset() { *x = CreateServiceRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateServiceRolloutRequest) String() string { @@ -900,7 +872,7 @@ func (*CreateServiceRolloutRequest) ProtoMessage() {} func (x *CreateServiceRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +931,9 @@ type ListServiceRolloutsRequest struct { func (x *ListServiceRolloutsRequest) Reset() { *x = ListServiceRolloutsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceRolloutsRequest) String() string { @@ -974,7 +944,7 @@ func (*ListServiceRolloutsRequest) ProtoMessage() {} func (x *ListServiceRolloutsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,11 +1001,9 @@ type ListServiceRolloutsResponse struct { func (x *ListServiceRolloutsResponse) Reset() { *x = ListServiceRolloutsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServiceRolloutsResponse) String() string { @@ -1046,7 +1014,7 @@ func (*ListServiceRolloutsResponse) ProtoMessage() {} func (x *ListServiceRolloutsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1059,9 @@ type GetServiceRolloutRequest struct { func (x *GetServiceRolloutRequest) Reset() { *x = GetServiceRolloutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRolloutRequest) String() string { @@ -1106,7 +1072,7 @@ func (*GetServiceRolloutRequest) ProtoMessage() {} func (x *GetServiceRolloutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1110,9 @@ type EnableServiceResponse struct { func (x *EnableServiceResponse) Reset() { *x = EnableServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableServiceResponse) String() string { @@ -1159,7 +1123,7 @@ func (*EnableServiceResponse) ProtoMessage() {} func (x *EnableServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1196,11 +1160,9 @@ type GenerateConfigReportRequest struct { func (x *GenerateConfigReportRequest) Reset() { *x = GenerateConfigReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConfigReportRequest) String() string { @@ -1211,7 +1173,7 @@ func (*GenerateConfigReportRequest) ProtoMessage() {} func (x *GenerateConfigReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,11 +1223,9 @@ type GenerateConfigReportResponse struct { func (x *GenerateConfigReportResponse) Reset() { *x = GenerateConfigReportResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateConfigReportResponse) String() string { @@ -1276,7 +1236,7 @@ func (*GenerateConfigReportResponse) ProtoMessage() {} func (x *GenerateConfigReportResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,248 +1789,6 @@ func file_google_api_servicemanagement_v1_servicemanager_proto_init() { return } file_google_api_servicemanagement_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SubmitConfigSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SubmitConfigSourceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateServiceRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceRolloutsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListServiceRolloutsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRolloutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*EnableServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConfigReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_servicemanagement_v1_servicemanager_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GenerateConfigReportResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/serviceusage/apiv1/helpers.go b/serviceusage/apiv1/helpers.go index b0eb96d9ad44..a6a352f06869 100755 --- a/serviceusage/apiv1/helpers.go +++ b/serviceusage/apiv1/helpers.go @@ -18,10 +18,20 @@ package serviceusage import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "serviceusage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/service.management", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/serviceusage/apiv1/service_usage_client.go b/serviceusage/apiv1/service_usage_client.go index d06e8bf8c31a..5b8a9f832d08 100755 --- a/serviceusage/apiv1/service_usage_client.go +++ b/serviceusage/apiv1/service_usage_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" serviceusagepb "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -284,6 +283,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new service usage client based on gRPC. @@ -314,6 +315,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: serviceusagepb.NewServiceUsageClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -377,6 +379,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new service usage rest client. @@ -398,6 +402,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -460,7 +465,7 @@ func (c *gRPCClient) EnableService(ctx context.Context, req *serviceusagepb.Enab var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.EnableService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.EnableService, req, settings.GRPC, c.logger, "EnableService") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *gRPCClient) DisableService(ctx context.Context, req *serviceusagepb.Dis var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DisableService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DisableService, req, settings.GRPC, c.logger, "DisableService") return err }, opts...) if err != nil { @@ -500,7 +505,7 @@ func (c *gRPCClient) GetService(ctx context.Context, req *serviceusagepb.GetServ var resp *serviceusagepb.Service err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetService, req, settings.GRPC, c.logger, "GetService") return err }, opts...) if err != nil { @@ -529,7 +534,7 @@ func (c *gRPCClient) ListServices(ctx context.Context, req *serviceusagepb.ListS } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListServices, req, settings.GRPC, c.logger, "ListServices") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) BatchEnableServices(ctx context.Context, req *serviceusagep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchEnableServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchEnableServices, req, settings.GRPC, c.logger, "BatchEnableServices") return err }, opts...) if err != nil { @@ -584,7 +589,7 @@ func (c *gRPCClient) BatchGetServices(ctx context.Context, req *serviceusagepb.B var resp *serviceusagepb.BatchGetServicesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchGetServices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchGetServices, req, settings.GRPC, c.logger, "BatchGetServices") return err }, opts...) if err != nil { @@ -602,7 +607,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -628,7 +633,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -687,21 +692,10 @@ func (c *restClient) EnableService(ctx context.Context, req *serviceusagepb.Enab httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -758,21 +752,10 @@ func (c *restClient) DisableService(ctx context.Context, req *serviceusagepb.Dis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableService") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -818,17 +801,7 @@ func (c *restClient) GetService(ctx context.Context, req *serviceusagepb.GetServ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetService") if err != nil { return err } @@ -904,21 +877,10 @@ func (c *restClient) ListServices(ctx context.Context, req *serviceusagepb.ListS } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -983,21 +945,10 @@ func (c *restClient) BatchEnableServices(ctx context.Context, req *serviceusagep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchEnableServices") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1053,17 +1004,7 @@ func (c *restClient) BatchGetServices(ctx context.Context, req *serviceusagepb.B httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetServices") if err != nil { return err } @@ -1108,17 +1049,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1185,21 +1116,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/serviceusage/apiv1/service_usage_client_example_go123_test.go b/serviceusage/apiv1/service_usage_client_example_go123_test.go index e3db8ed6a29f..c27781afb2cd 100644 --- a/serviceusage/apiv1/service_usage_client_example_go123_test.go +++ b/serviceusage/apiv1/service_usage_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListServices_all() { } for resp, err := range c.ListServices(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/serviceusage/apiv1/serviceusagepb/resources.pb.go b/serviceusage/apiv1/serviceusagepb/resources.pb.go index 76ba7ff11f72..3acfeaff5068 100755 --- a/serviceusage/apiv1/serviceusagepb/resources.pb.go +++ b/serviceusage/apiv1/serviceusagepb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/serviceusage/v1/resources.proto @@ -122,11 +122,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -137,7 +135,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -219,11 +217,9 @@ type ServiceConfig struct { func (x *ServiceConfig) Reset() { *x = ServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceConfig) String() string { @@ -234,7 +230,7 @@ func (*ServiceConfig) ProtoMessage() {} func (x *ServiceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +328,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -347,7 +341,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,44 +515,6 @@ func file_google_api_serviceusage_v1_resources_proto_init() { if File_google_api_serviceusage_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_api_serviceusage_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go b/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go index d8669c0531d8..81bc8733895b 100755 --- a/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go +++ b/serviceusage/apiv1/serviceusagepb/serviceusage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/api/serviceusage/v1/serviceusage.proto @@ -119,11 +119,9 @@ type EnableServiceRequest struct { func (x *EnableServiceRequest) Reset() { *x = EnableServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableServiceRequest) String() string { @@ -134,7 +132,7 @@ func (*EnableServiceRequest) ProtoMessage() {} func (x *EnableServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type EnableServiceResponse struct { func (x *EnableServiceResponse) Reset() { *x = EnableServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableServiceResponse) String() string { @@ -185,7 +181,7 @@ func (*EnableServiceResponse) ProtoMessage() {} func (x *EnableServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +229,9 @@ type DisableServiceRequest struct { func (x *DisableServiceRequest) Reset() { *x = DisableServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableServiceRequest) String() string { @@ -248,7 +242,7 @@ func (*DisableServiceRequest) ProtoMessage() {} func (x *DisableServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +292,9 @@ type DisableServiceResponse struct { func (x *DisableServiceResponse) Reset() { *x = DisableServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableServiceResponse) String() string { @@ -313,7 +305,7 @@ func (*DisableServiceResponse) ProtoMessage() {} func (x *DisableServiceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +343,9 @@ type GetServiceRequest struct { func (x *GetServiceRequest) Reset() { *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServiceRequest) String() string { @@ -366,7 +356,7 @@ func (*GetServiceRequest) ProtoMessage() {} func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +403,9 @@ type ListServicesRequest struct { func (x *ListServicesRequest) Reset() { *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesRequest) String() string { @@ -428,7 +416,7 @@ func (*ListServicesRequest) ProtoMessage() {} func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -486,11 +474,9 @@ type ListServicesResponse struct { func (x *ListServicesResponse) Reset() { *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListServicesResponse) String() string { @@ -501,7 +487,7 @@ func (*ListServicesResponse) ProtoMessage() {} func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,11 +545,9 @@ type BatchEnableServicesRequest struct { func (x *BatchEnableServicesRequest) Reset() { *x = BatchEnableServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEnableServicesRequest) String() string { @@ -574,7 +558,7 @@ func (*BatchEnableServicesRequest) ProtoMessage() {} func (x *BatchEnableServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +604,9 @@ type BatchEnableServicesResponse struct { func (x *BatchEnableServicesResponse) Reset() { *x = BatchEnableServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEnableServicesResponse) String() string { @@ -635,7 +617,7 @@ func (*BatchEnableServicesResponse) ProtoMessage() {} func (x *BatchEnableServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,11 +669,9 @@ type BatchGetServicesRequest struct { func (x *BatchGetServicesRequest) Reset() { *x = BatchGetServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetServicesRequest) String() string { @@ -702,7 +682,7 @@ func (*BatchGetServicesRequest) ProtoMessage() {} func (x *BatchGetServicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +723,9 @@ type BatchGetServicesResponse struct { func (x *BatchGetServicesResponse) Reset() { *x = BatchGetServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetServicesResponse) String() string { @@ -758,7 +736,7 @@ func (*BatchGetServicesResponse) ProtoMessage() {} func (x *BatchGetServicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,11 +772,9 @@ type BatchEnableServicesResponse_EnableFailure struct { func (x *BatchEnableServicesResponse_EnableFailure) Reset() { *x = BatchEnableServicesResponse_EnableFailure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchEnableServicesResponse_EnableFailure) String() string { @@ -809,7 +785,7 @@ func (*BatchEnableServicesResponse_EnableFailure) ProtoMessage() {} func (x *BatchEnableServicesResponse_EnableFailure) ProtoReflect() protoreflect.Message { mi := &file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,152 +1077,6 @@ func file_google_api_serviceusage_v1_serviceusage_proto_init() { return } file_google_api_serviceusage_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EnableServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EnableServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DisableServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DisableServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BatchEnableServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchEnableServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetServicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_serviceusage_v1_serviceusage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchEnableServicesResponse_EnableFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shell/apiv1/cloud_shell_client.go b/shell/apiv1/cloud_shell_client.go index b8fcdb200292..23e33958d93a 100755 --- a/shell/apiv1/cloud_shell_client.go +++ b/shell/apiv1/cloud_shell_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" shellpb "cloud.google.com/go/shell/apiv1/shellpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -270,6 +269,8 @@ type cloudShellGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCloudShellClient creates a new cloud shell service client based on gRPC. @@ -302,6 +303,7 @@ func NewCloudShellClient(ctx context.Context, opts ...option.ClientOption) (*Clo connPool: connPool, cloudShellClient: shellpb.NewCloudShellServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -364,6 +366,8 @@ type cloudShellRESTClient struct { // Points back to the CallOptions field of the containing CloudShellClient CallOptions **CloudShellCallOptions + + logger *slog.Logger } // NewCloudShellRESTClient creates a new cloud shell service rest client. @@ -387,6 +391,7 @@ func NewCloudShellRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -449,7 +454,7 @@ func (c *cloudShellGRPCClient) GetEnvironment(ctx context.Context, req *shellpb. var resp *shellpb.Environment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudShellClient.GetEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudShellClient.GetEnvironment, req, settings.GRPC, c.logger, "GetEnvironment") return err }, opts...) if err != nil { @@ -467,7 +472,7 @@ func (c *cloudShellGRPCClient) StartEnvironment(ctx context.Context, req *shellp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudShellClient.StartEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudShellClient.StartEnvironment, req, settings.GRPC, c.logger, "StartEnvironment") return err }, opts...) if err != nil { @@ -487,7 +492,7 @@ func (c *cloudShellGRPCClient) AuthorizeEnvironment(ctx context.Context, req *sh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudShellClient.AuthorizeEnvironment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudShellClient.AuthorizeEnvironment, req, settings.GRPC, c.logger, "AuthorizeEnvironment") return err }, opts...) if err != nil { @@ -507,7 +512,7 @@ func (c *cloudShellGRPCClient) AddPublicKey(ctx context.Context, req *shellpb.Ad var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudShellClient.AddPublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudShellClient.AddPublicKey, req, settings.GRPC, c.logger, "AddPublicKey") return err }, opts...) if err != nil { @@ -527,7 +532,7 @@ func (c *cloudShellGRPCClient) RemovePublicKey(ctx context.Context, req *shellpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cloudShellClient.RemovePublicKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cloudShellClient.RemovePublicKey, req, settings.GRPC, c.logger, "RemovePublicKey") return err }, opts...) if err != nil { @@ -571,17 +576,7 @@ func (c *cloudShellRESTClient) GetEnvironment(ctx context.Context, req *shellpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEnvironment") if err != nil { return err } @@ -641,21 +636,10 @@ func (c *cloudShellRESTClient) StartEnvironment(ctx context.Context, req *shellp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -714,21 +698,10 @@ func (c *cloudShellRESTClient) AuthorizeEnvironment(ctx context.Context, req *sh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AuthorizeEnvironment") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -786,21 +759,10 @@ func (c *cloudShellRESTClient) AddPublicKey(ctx context.Context, req *shellpb.Ad httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddPublicKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -859,21 +821,10 @@ func (c *cloudShellRESTClient) RemovePublicKey(ctx context.Context, req *shellpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemovePublicKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shell/apiv1/helpers.go b/shell/apiv1/helpers.go index 6eb58de97fbf..c169fc135d81 100755 --- a/shell/apiv1/helpers.go +++ b/shell/apiv1/helpers.go @@ -18,10 +18,20 @@ package shell import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudshell.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shell/apiv1/shellpb/cloudshell.pb.go b/shell/apiv1/shellpb/cloudshell.pb.go index 7510b896b7a3..6a084c9c1d1c 100755 --- a/shell/apiv1/shellpb/cloudshell.pb.go +++ b/shell/apiv1/shellpb/cloudshell.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/shell/v1/cloudshell.proto @@ -295,11 +295,9 @@ type Environment struct { func (x *Environment) Reset() { *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Environment) String() string { @@ -310,7 +308,7 @@ func (*Environment) ProtoMessage() {} func (x *Environment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,11 +400,9 @@ type GetEnvironmentRequest struct { func (x *GetEnvironmentRequest) Reset() { *x = GetEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEnvironmentRequest) String() string { @@ -417,7 +413,7 @@ func (*GetEnvironmentRequest) ProtoMessage() {} func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +445,9 @@ type CreateEnvironmentMetadata struct { func (x *CreateEnvironmentMetadata) Reset() { *x = CreateEnvironmentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEnvironmentMetadata) String() string { @@ -464,7 +458,7 @@ func (*CreateEnvironmentMetadata) ProtoMessage() {} func (x *CreateEnvironmentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,11 +483,9 @@ type DeleteEnvironmentMetadata struct { func (x *DeleteEnvironmentMetadata) Reset() { *x = DeleteEnvironmentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEnvironmentMetadata) String() string { @@ -504,7 +496,7 @@ func (*DeleteEnvironmentMetadata) ProtoMessage() {} func (x *DeleteEnvironmentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +533,9 @@ type StartEnvironmentRequest struct { func (x *StartEnvironmentRequest) Reset() { *x = StartEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartEnvironmentRequest) String() string { @@ -556,7 +546,7 @@ func (*StartEnvironmentRequest) ProtoMessage() {} func (x *StartEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +604,9 @@ type AuthorizeEnvironmentRequest struct { func (x *AuthorizeEnvironmentRequest) Reset() { *x = AuthorizeEnvironmentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizeEnvironmentRequest) String() string { @@ -629,7 +617,7 @@ func (*AuthorizeEnvironmentRequest) ProtoMessage() {} func (x *AuthorizeEnvironmentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +670,9 @@ type AuthorizeEnvironmentResponse struct { func (x *AuthorizeEnvironmentResponse) Reset() { *x = AuthorizeEnvironmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizeEnvironmentResponse) String() string { @@ -697,7 +683,7 @@ func (*AuthorizeEnvironmentResponse) ProtoMessage() {} func (x *AuthorizeEnvironmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -722,11 +708,9 @@ type AuthorizeEnvironmentMetadata struct { func (x *AuthorizeEnvironmentMetadata) Reset() { *x = AuthorizeEnvironmentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizeEnvironmentMetadata) String() string { @@ -737,7 +721,7 @@ func (*AuthorizeEnvironmentMetadata) ProtoMessage() {} func (x *AuthorizeEnvironmentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +749,9 @@ type StartEnvironmentMetadata struct { func (x *StartEnvironmentMetadata) Reset() { *x = StartEnvironmentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartEnvironmentMetadata) String() string { @@ -780,7 +762,7 @@ func (*StartEnvironmentMetadata) ProtoMessage() {} func (x *StartEnvironmentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +798,9 @@ type StartEnvironmentResponse struct { func (x *StartEnvironmentResponse) Reset() { *x = StartEnvironmentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartEnvironmentResponse) String() string { @@ -831,7 +811,7 @@ func (*StartEnvironmentResponse) ProtoMessage() {} func (x *StartEnvironmentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +854,9 @@ type AddPublicKeyRequest struct { func (x *AddPublicKeyRequest) Reset() { *x = AddPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddPublicKeyRequest) String() string { @@ -889,7 +867,7 @@ func (*AddPublicKeyRequest) ProtoMessage() {} func (x *AddPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +909,9 @@ type AddPublicKeyResponse struct { func (x *AddPublicKeyResponse) Reset() { *x = AddPublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddPublicKeyResponse) String() string { @@ -946,7 +922,7 @@ func (*AddPublicKeyResponse) ProtoMessage() {} func (x *AddPublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +954,9 @@ type AddPublicKeyMetadata struct { func (x *AddPublicKeyMetadata) Reset() { *x = AddPublicKeyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddPublicKeyMetadata) String() string { @@ -993,7 +967,7 @@ func (*AddPublicKeyMetadata) ProtoMessage() {} func (x *AddPublicKeyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1024,11 +998,9 @@ type RemovePublicKeyRequest struct { func (x *RemovePublicKeyRequest) Reset() { *x = RemovePublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemovePublicKeyRequest) String() string { @@ -1039,7 +1011,7 @@ func (*RemovePublicKeyRequest) ProtoMessage() {} func (x *RemovePublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1050,9 @@ type RemovePublicKeyResponse struct { func (x *RemovePublicKeyResponse) Reset() { *x = RemovePublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemovePublicKeyResponse) String() string { @@ -1093,7 +1063,7 @@ func (*RemovePublicKeyResponse) ProtoMessage() {} func (x *RemovePublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1118,11 +1088,9 @@ type RemovePublicKeyMetadata struct { func (x *RemovePublicKeyMetadata) Reset() { *x = RemovePublicKeyMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemovePublicKeyMetadata) String() string { @@ -1133,7 +1101,7 @@ func (*RemovePublicKeyMetadata) ProtoMessage() {} func (x *RemovePublicKeyMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1161,11 +1129,9 @@ type CloudShellErrorDetails struct { func (x *CloudShellErrorDetails) Reset() { *x = CloudShellErrorDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudShellErrorDetails) String() string { @@ -1176,7 +1142,7 @@ func (*CloudShellErrorDetails) ProtoMessage() {} func (x *CloudShellErrorDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_shell_v1_cloudshell_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,212 +1446,6 @@ func file_google_cloud_shell_v1_cloudshell_proto_init() { if File_google_cloud_shell_v1_cloudshell_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateEnvironmentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEnvironmentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StartEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizeEnvironmentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizeEnvironmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AuthorizeEnvironmentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*StartEnvironmentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StartEnvironmentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AddPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AddPublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AddPublicKeyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RemovePublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RemovePublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RemovePublicKeyMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_shell_v1_cloudshell_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CloudShellErrorDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/css/apiv1/account_labels_client.go b/shopping/css/apiv1/account_labels_client.go index fd431f3568c8..f4bacc6b633a 100755 --- a/shopping/css/apiv1/account_labels_client.go +++ b/shopping/css/apiv1/account_labels_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( csspb "cloud.google.com/go/shopping/css/apiv1/csspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -197,6 +196,8 @@ type accountLabelsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAccountLabelsClient creates a new account labels service client based on gRPC. @@ -223,6 +224,7 @@ func NewAccountLabelsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, accountLabelsClient: csspb.NewAccountLabelsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type accountLabelsRESTClient struct { // Points back to the CallOptions field of the containing AccountLabelsClient CallOptions **AccountLabelsCallOptions + + logger *slog.Logger } // NewAccountLabelsRESTClient creates a new account labels service rest client. @@ -286,6 +290,7 @@ func NewAccountLabelsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -349,7 +354,7 @@ func (c *accountLabelsGRPCClient) ListAccountLabels(ctx context.Context, req *cs } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountLabelsClient.ListAccountLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountLabelsClient.ListAccountLabels, req, settings.GRPC, c.logger, "ListAccountLabels") return err }, opts...) if err != nil { @@ -384,7 +389,7 @@ func (c *accountLabelsGRPCClient) CreateAccountLabel(ctx context.Context, req *c var resp *csspb.AccountLabel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountLabelsClient.CreateAccountLabel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountLabelsClient.CreateAccountLabel, req, settings.GRPC, c.logger, "CreateAccountLabel") return err }, opts...) if err != nil { @@ -402,7 +407,7 @@ func (c *accountLabelsGRPCClient) UpdateAccountLabel(ctx context.Context, req *c var resp *csspb.AccountLabel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountLabelsClient.UpdateAccountLabel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountLabelsClient.UpdateAccountLabel, req, settings.GRPC, c.logger, "UpdateAccountLabel") return err }, opts...) if err != nil { @@ -419,7 +424,7 @@ func (c *accountLabelsGRPCClient) DeleteAccountLabel(ctx context.Context, req *c opts = append((*c.CallOptions).DeleteAccountLabel[0:len((*c.CallOptions).DeleteAccountLabel):len((*c.CallOptions).DeleteAccountLabel)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.accountLabelsClient.DeleteAccountLabel(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.accountLabelsClient.DeleteAccountLabel, req, settings.GRPC, c.logger, "DeleteAccountLabel") return err }, opts...) return err @@ -470,21 +475,10 @@ func (c *accountLabelsRESTClient) ListAccountLabels(ctx context.Context, req *cs } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccountLabels") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -554,17 +548,7 @@ func (c *accountLabelsRESTClient) CreateAccountLabel(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAccountLabel") if err != nil { return err } @@ -621,17 +605,7 @@ func (c *accountLabelsRESTClient) UpdateAccountLabel(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccountLabel") if err != nil { return err } @@ -678,14 +652,7 @@ func (c *accountLabelsRESTClient) DeleteAccountLabel(ctx context.Context, req *c httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccountLabel") + return err }, opts...) } diff --git a/shopping/css/apiv1/account_labels_client_example_go123_test.go b/shopping/css/apiv1/account_labels_client_example_go123_test.go index 6f738b447beb..f7ee2809dec2 100644 --- a/shopping/css/apiv1/account_labels_client_example_go123_test.go +++ b/shopping/css/apiv1/account_labels_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAccountLabelsClient_ListAccountLabels_all() { } for resp, err := range c.ListAccountLabels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/css/apiv1/accounts_client.go b/shopping/css/apiv1/accounts_client.go index 7e67d47b5146..30c40d6e5fe8 100755 --- a/shopping/css/apiv1/accounts_client.go +++ b/shopping/css/apiv1/accounts_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( csspb "cloud.google.com/go/shopping/css/apiv1/csspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -202,6 +201,8 @@ type accountsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAccountsClient creates a new accounts service client based on gRPC. @@ -228,6 +229,7 @@ func NewAccountsClient(ctx context.Context, opts ...option.ClientOption) (*Accou connPool: connPool, accountsClient: csspb.NewAccountsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -274,6 +276,8 @@ type accountsRESTClient struct { // Points back to the CallOptions field of the containing AccountsClient CallOptions **AccountsCallOptions + + logger *slog.Logger } // NewAccountsRESTClient creates a new accounts service rest client. @@ -291,6 +295,7 @@ func NewAccountsRESTClient(ctx context.Context, opts ...option.ClientOption) (*A endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -354,7 +359,7 @@ func (c *accountsGRPCClient) ListChildAccounts(ctx context.Context, req *csspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountsClient.ListChildAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountsClient.ListChildAccounts, req, settings.GRPC, c.logger, "ListChildAccounts") return err }, opts...) if err != nil { @@ -389,7 +394,7 @@ func (c *accountsGRPCClient) GetAccount(ctx context.Context, req *csspb.GetAccou var resp *csspb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountsClient.GetAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountsClient.GetAccount, req, settings.GRPC, c.logger, "GetAccount") return err }, opts...) if err != nil { @@ -407,7 +412,7 @@ func (c *accountsGRPCClient) UpdateLabels(ctx context.Context, req *csspb.Update var resp *csspb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountsClient.UpdateLabels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountsClient.UpdateLabels, req, settings.GRPC, c.logger, "UpdateLabels") return err }, opts...) if err != nil { @@ -468,21 +473,10 @@ func (c *accountsRESTClient) ListChildAccounts(ctx context.Context, req *csspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChildAccounts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -548,17 +542,7 @@ func (c *accountsRESTClient) GetAccount(ctx context.Context, req *csspb.GetAccou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccount") if err != nil { return err } @@ -614,17 +598,7 @@ func (c *accountsRESTClient) UpdateLabels(ctx context.Context, req *csspb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLabels") if err != nil { return err } diff --git a/shopping/css/apiv1/accounts_client_example_go123_test.go b/shopping/css/apiv1/accounts_client_example_go123_test.go index 86a169c9cbf1..2aebe3a6aca0 100644 --- a/shopping/css/apiv1/accounts_client_example_go123_test.go +++ b/shopping/css/apiv1/accounts_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAccountsClient_ListChildAccounts_all() { } for resp, err := range c.ListChildAccounts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/css/apiv1/css_product_inputs_client.go b/shopping/css/apiv1/css_product_inputs_client.go index 29ad51445105..f11b3684583c 100755 --- a/shopping/css/apiv1/css_product_inputs_client.go +++ b/shopping/css/apiv1/css_product_inputs_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( csspb "cloud.google.com/go/shopping/css/apiv1/csspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -160,6 +159,8 @@ type cssProductInputsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCssProductInputsClient creates a new css product inputs service client based on gRPC. @@ -187,6 +188,7 @@ func NewCssProductInputsClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, cssProductInputsClient: csspb.NewCssProductInputsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -233,6 +235,8 @@ type cssProductInputsRESTClient struct { // Points back to the CallOptions field of the containing CssProductInputsClient CallOptions **CssProductInputsCallOptions + + logger *slog.Logger } // NewCssProductInputsRESTClient creates a new css product inputs service rest client. @@ -251,6 +255,7 @@ func NewCssProductInputsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -303,7 +308,7 @@ func (c *cssProductInputsGRPCClient) InsertCssProductInput(ctx context.Context, var resp *csspb.CssProductInput err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cssProductInputsClient.InsertCssProductInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cssProductInputsClient.InsertCssProductInput, req, settings.GRPC, c.logger, "InsertCssProductInput") return err }, opts...) if err != nil { @@ -320,7 +325,7 @@ func (c *cssProductInputsGRPCClient) DeleteCssProductInput(ctx context.Context, opts = append((*c.CallOptions).DeleteCssProductInput[0:len((*c.CallOptions).DeleteCssProductInput):len((*c.CallOptions).DeleteCssProductInput)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.cssProductInputsClient.DeleteCssProductInput(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.cssProductInputsClient.DeleteCssProductInput, req, settings.GRPC, c.logger, "DeleteCssProductInput") return err }, opts...) return err @@ -372,17 +377,7 @@ func (c *cssProductInputsRESTClient) InsertCssProductInput(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertCssProductInput") if err != nil { return err } @@ -435,14 +430,7 @@ func (c *cssProductInputsRESTClient) DeleteCssProductInput(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCssProductInput") + return err }, opts...) } diff --git a/shopping/css/apiv1/css_products_client.go b/shopping/css/apiv1/css_products_client.go index a34468088c00..1e7543d77941 100755 --- a/shopping/css/apiv1/css_products_client.go +++ b/shopping/css/apiv1/css_products_client.go @@ -19,7 +19,7 @@ package css import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( csspb "cloud.google.com/go/shopping/css/apiv1/csspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -196,6 +195,8 @@ type cssProductsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCssProductsClient creates a new css products service client based on gRPC. @@ -223,6 +224,7 @@ func NewCssProductsClient(ctx context.Context, opts ...option.ClientOption) (*Cs connPool: connPool, cssProductsClient: csspb.NewCssProductsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type cssProductsRESTClient struct { // Points back to the CallOptions field of the containing CssProductsClient CallOptions **CssProductsCallOptions + + logger *slog.Logger } // NewCssProductsRESTClient creates a new css products service rest client. @@ -287,6 +291,7 @@ func NewCssProductsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -339,7 +344,7 @@ func (c *cssProductsGRPCClient) GetCssProduct(ctx context.Context, req *csspb.Ge var resp *csspb.CssProduct err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cssProductsClient.GetCssProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cssProductsClient.GetCssProduct, req, settings.GRPC, c.logger, "GetCssProduct") return err }, opts...) if err != nil { @@ -368,7 +373,7 @@ func (c *cssProductsGRPCClient) ListCssProducts(ctx context.Context, req *csspb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.cssProductsClient.ListCssProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.cssProductsClient.ListCssProducts, req, settings.GRPC, c.logger, "ListCssProducts") return err }, opts...) if err != nil { @@ -429,17 +434,7 @@ func (c *cssProductsRESTClient) GetCssProduct(ctx context.Context, req *csspb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCssProduct") if err != nil { return err } @@ -507,21 +502,10 @@ func (c *cssProductsRESTClient) ListCssProducts(ctx context.Context, req *csspb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCssProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/css/apiv1/css_products_client_example_go123_test.go b/shopping/css/apiv1/css_products_client_example_go123_test.go index e31d04e51c53..8a9072684a3f 100644 --- a/shopping/css/apiv1/css_products_client_example_go123_test.go +++ b/shopping/css/apiv1/css_products_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCssProductsClient_ListCssProducts_all() { } for resp, err := range c.ListCssProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/css/apiv1/csspb/accounts.pb.go b/shopping/css/apiv1/csspb/accounts.pb.go index cf5ca4082725..9ffbc5d498a8 100755 --- a/shopping/css/apiv1/csspb/accounts.pb.go +++ b/shopping/css/apiv1/csspb/accounts.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/css/v1/accounts.proto @@ -146,11 +146,9 @@ type ListChildAccountsRequest struct { func (x *ListChildAccountsRequest) Reset() { *x = ListChildAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChildAccountsRequest) String() string { @@ -161,7 +159,7 @@ func (*ListChildAccountsRequest) ProtoMessage() {} func (x *ListChildAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +224,9 @@ type ListChildAccountsResponse struct { func (x *ListChildAccountsResponse) Reset() { *x = ListChildAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChildAccountsResponse) String() string { @@ -241,7 +237,7 @@ func (*ListChildAccountsResponse) ProtoMessage() {} func (x *ListChildAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +283,9 @@ type GetAccountRequest struct { func (x *GetAccountRequest) Reset() { *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountRequest) String() string { @@ -302,7 +296,7 @@ func (*GetAccountRequest) ProtoMessage() {} func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +345,9 @@ type UpdateAccountLabelsRequest struct { func (x *UpdateAccountLabelsRequest) Reset() { *x = UpdateAccountLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccountLabelsRequest) String() string { @@ -366,7 +358,7 @@ func (*UpdateAccountLabelsRequest) ProtoMessage() {} func (x *UpdateAccountLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -433,11 +425,9 @@ type Account struct { func (x *Account) Reset() { *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Account) String() string { @@ -448,7 +438,7 @@ func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,68 +702,6 @@ func file_google_shopping_css_v1_accounts_proto_init() { if File_google_shopping_css_v1_accounts_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_css_v1_accounts_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListChildAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListChildAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccountLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_css_v1_accounts_proto_msgTypes[0].OneofWrappers = []any{} file_google_shopping_css_v1_accounts_proto_msgTypes[2].OneofWrappers = []any{} file_google_shopping_css_v1_accounts_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/shopping/css/apiv1/csspb/accounts_labels.pb.go b/shopping/css/apiv1/csspb/accounts_labels.pb.go index 92fb925509e9..e95fc0e4a72a 100755 --- a/shopping/css/apiv1/csspb/accounts_labels.pb.go +++ b/shopping/css/apiv1/csspb/accounts_labels.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/css/v1/accounts_labels.proto @@ -117,11 +117,9 @@ type AccountLabel struct { func (x *AccountLabel) Reset() { *x = AccountLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountLabel) String() string { @@ -132,7 +130,7 @@ func (*AccountLabel) ProtoMessage() {} func (x *AccountLabel) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +211,9 @@ type ListAccountLabelsRequest struct { func (x *ListAccountLabelsRequest) Reset() { *x = ListAccountLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountLabelsRequest) String() string { @@ -228,7 +224,7 @@ func (*ListAccountLabelsRequest) ProtoMessage() {} func (x *ListAccountLabelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +275,9 @@ type ListAccountLabelsResponse struct { func (x *ListAccountLabelsResponse) Reset() { *x = ListAccountLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountLabelsResponse) String() string { @@ -294,7 +288,7 @@ func (*ListAccountLabelsResponse) ProtoMessage() {} func (x *ListAccountLabelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +332,9 @@ type CreateAccountLabelRequest struct { func (x *CreateAccountLabelRequest) Reset() { *x = CreateAccountLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAccountLabelRequest) String() string { @@ -353,7 +345,7 @@ func (*CreateAccountLabelRequest) ProtoMessage() {} func (x *CreateAccountLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +386,9 @@ type UpdateAccountLabelRequest struct { func (x *UpdateAccountLabelRequest) Reset() { *x = UpdateAccountLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccountLabelRequest) String() string { @@ -409,7 +399,7 @@ func (*UpdateAccountLabelRequest) ProtoMessage() {} func (x *UpdateAccountLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +434,9 @@ type DeleteAccountLabelRequest struct { func (x *DeleteAccountLabelRequest) Reset() { *x = DeleteAccountLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccountLabelRequest) String() string { @@ -459,7 +447,7 @@ func (*DeleteAccountLabelRequest) ProtoMessage() {} func (x *DeleteAccountLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_accounts_labels_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,80 +670,6 @@ func file_google_shopping_css_v1_accounts_labels_proto_init() { if File_google_shopping_css_v1_accounts_labels_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccountLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateAccountLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccountLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_accounts_labels_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccountLabelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_css_v1_accounts_labels_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/css/apiv1/csspb/css_product_common.pb.go b/shopping/css/apiv1/csspb/css_product_common.pb.go index 8fd6ec129cf7..fd774ab22510 100755 --- a/shopping/css/apiv1/csspb/css_product_common.pb.go +++ b/shopping/css/apiv1/csspb/css_product_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/css/v1/css_product_common.proto @@ -234,11 +234,9 @@ type Attributes struct { func (x *Attributes) Reset() { *x = Attributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attributes) String() string { @@ -249,7 +247,7 @@ func (*Attributes) ProtoMessage() {} func (x *Attributes) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,11 +635,9 @@ type Certification struct { func (x *Certification) Reset() { *x = Certification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certification) String() string { @@ -652,7 +648,7 @@ func (*Certification) ProtoMessage() {} func (x *Certification) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,11 +700,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -719,7 +713,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +767,9 @@ type ProductDimension struct { func (x *ProductDimension) Reset() { *x = ProductDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDimension) String() string { @@ -788,7 +780,7 @@ func (*ProductDimension) ProtoMessage() {} func (x *ProductDimension) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,11 +829,9 @@ type ProductWeight struct { func (x *ProductWeight) Reset() { *x = ProductWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductWeight) String() string { @@ -852,7 +842,7 @@ func (*ProductWeight) ProtoMessage() {} func (x *ProductWeight) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -905,11 +895,9 @@ type CssProductStatus struct { func (x *CssProductStatus) Reset() { *x = CssProductStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CssProductStatus) String() string { @@ -920,7 +908,7 @@ func (*CssProductStatus) ProtoMessage() {} func (x *CssProductStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +977,9 @@ type HeadlineOfferSubscriptionCost struct { func (x *HeadlineOfferSubscriptionCost) Reset() { *x = HeadlineOfferSubscriptionCost{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HeadlineOfferSubscriptionCost) String() string { @@ -1004,7 +990,7 @@ func (*HeadlineOfferSubscriptionCost) ProtoMessage() {} func (x *HeadlineOfferSubscriptionCost) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,11 +1042,9 @@ type HeadlineOfferInstallment struct { func (x *HeadlineOfferInstallment) Reset() { *x = HeadlineOfferInstallment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HeadlineOfferInstallment) String() string { @@ -1071,7 +1055,7 @@ func (*HeadlineOfferInstallment) ProtoMessage() {} func (x *HeadlineOfferInstallment) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1128,11 +1112,9 @@ type CssProductStatus_DestinationStatus struct { func (x *CssProductStatus_DestinationStatus) Reset() { *x = CssProductStatus_DestinationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CssProductStatus_DestinationStatus) String() string { @@ -1143,7 +1125,7 @@ func (*CssProductStatus_DestinationStatus) ProtoMessage() {} func (x *CssProductStatus_DestinationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1215,11 +1197,9 @@ type CssProductStatus_ItemLevelIssue struct { func (x *CssProductStatus_ItemLevelIssue) Reset() { *x = CssProductStatus_ItemLevelIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CssProductStatus_ItemLevelIssue) String() string { @@ -1230,7 +1210,7 @@ func (*CssProductStatus_ItemLevelIssue) ProtoMessage() {} func (x *CssProductStatus_ItemLevelIssue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1702,128 +1682,6 @@ func file_google_shopping_css_v1_css_product_common_proto_init() { if File_google_shopping_css_v1_css_product_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_css_v1_css_product_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Certification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProductDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProductWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CssProductStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*HeadlineOfferSubscriptionCost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*HeadlineOfferInstallment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CssProductStatus_DestinationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CssProductStatus_ItemLevelIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_css_v1_css_product_common_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/css/apiv1/csspb/css_product_inputs.pb.go b/shopping/css/apiv1/csspb/css_product_inputs.pb.go index a65ade2b0453..db763762cecf 100755 --- a/shopping/css/apiv1/csspb/css_product_inputs.pb.go +++ b/shopping/css/apiv1/csspb/css_product_inputs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/css/v1/css_product_inputs.proto @@ -107,11 +107,9 @@ type CssProductInput struct { func (x *CssProductInput) Reset() { *x = CssProductInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CssProductInput) String() string { @@ -122,7 +120,7 @@ func (*CssProductInput) ProtoMessage() {} func (x *CssProductInput) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +212,9 @@ type InsertCssProductInputRequest struct { func (x *InsertCssProductInputRequest) Reset() { *x = InsertCssProductInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertCssProductInputRequest) String() string { @@ -229,7 +225,7 @@ func (*InsertCssProductInputRequest) ProtoMessage() {} func (x *InsertCssProductInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +279,9 @@ type DeleteCssProductInputRequest struct { func (x *DeleteCssProductInputRequest) Reset() { *x = DeleteCssProductInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCssProductInputRequest) String() string { @@ -298,7 +292,7 @@ func (*DeleteCssProductInputRequest) ProtoMessage() {} func (x *DeleteCssProductInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,44 +489,6 @@ func file_google_shopping_css_v1_css_product_inputs_proto_init() { return } file_google_shopping_css_v1_css_product_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CssProductInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsertCssProductInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCssProductInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_css_v1_css_product_inputs_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/css/apiv1/csspb/css_products.pb.go b/shopping/css/apiv1/csspb/css_products.pb.go index 9aef27bbaf19..9801ef8508c6 100755 --- a/shopping/css/apiv1/csspb/css_products.pb.go +++ b/shopping/css/apiv1/csspb/css_products.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/css/v1/css_products.proto @@ -53,11 +53,9 @@ type GetCssProductRequest struct { func (x *GetCssProductRequest) Reset() { *x = GetCssProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCssProductRequest) String() string { @@ -68,7 +66,7 @@ func (*GetCssProductRequest) ProtoMessage() {} func (x *GetCssProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type CssProduct struct { func (x *CssProduct) Reset() { *x = CssProduct{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CssProduct) String() string { @@ -139,7 +135,7 @@ func (*CssProduct) ProtoMessage() {} func (x *CssProduct) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type ListCssProductsRequest struct { func (x *ListCssProductsRequest) Reset() { *x = ListCssProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCssProductsRequest) String() string { @@ -242,7 +236,7 @@ func (*ListCssProductsRequest) ProtoMessage() {} func (x *ListCssProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +288,9 @@ type ListCssProductsResponse struct { func (x *ListCssProductsResponse) Reset() { *x = ListCssProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCssProductsResponse) String() string { @@ -309,7 +301,7 @@ func (*ListCssProductsResponse) ProtoMessage() {} func (x *ListCssProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_css_v1_css_products_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,56 +490,6 @@ func file_google_shopping_css_v1_css_products_proto_init() { return } file_google_shopping_css_v1_css_product_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_css_v1_css_products_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetCssProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_products_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CssProduct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_products_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCssProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_css_v1_css_products_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCssProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/css/apiv1/helpers.go b/shopping/css/apiv1/helpers.go index fa6dc9a25b8f..bc8deb8a5b67 100755 --- a/shopping/css/apiv1/helpers.go +++ b/shopping/css/apiv1/helpers.go @@ -18,10 +18,20 @@ package css import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "css.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/accounts/apiv1beta/account_issue_client.go b/shopping/merchant/accounts/apiv1beta/account_issue_client.go index 5f3bb22709e1..432c5d3408db 100755 --- a/shopping/merchant/accounts/apiv1beta/account_issue_client.go +++ b/shopping/merchant/accounts/apiv1beta/account_issue_client.go @@ -19,7 +19,7 @@ package accounts import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -157,6 +156,8 @@ type accountIssueGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAccountIssueClient creates a new account issue service client based on gRPC. @@ -183,6 +184,7 @@ func NewAccountIssueClient(ctx context.Context, opts ...option.ClientOption) (*A connPool: connPool, accountIssueClient: accountspb.NewAccountIssueServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -229,6 +231,8 @@ type accountIssueRESTClient struct { // Points back to the CallOptions field of the containing AccountIssueClient CallOptions **AccountIssueCallOptions + + logger *slog.Logger } // NewAccountIssueRESTClient creates a new account issue service rest client. @@ -246,6 +250,7 @@ func NewAccountIssueRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -309,7 +314,7 @@ func (c *accountIssueGRPCClient) ListAccountIssues(ctx context.Context, req *acc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountIssueClient.ListAccountIssues(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountIssueClient.ListAccountIssues, req, settings.GRPC, c.logger, "ListAccountIssues") return err }, opts...) if err != nil { @@ -386,21 +391,10 @@ func (c *accountIssueRESTClient) ListAccountIssues(ctx context.Context, req *acc } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccountIssues") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/account_issue_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/account_issue_client_example_go123_test.go index fafc523aae27..7114060cd899 100644 --- a/shopping/merchant/accounts/apiv1beta/account_issue_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/account_issue_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAccountIssueClient_ListAccountIssues_all() { } for resp, err := range c.ListAccountIssues(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/account_tax_client.go b/shopping/merchant/accounts/apiv1beta/account_tax_client.go index 475cd8e29d42..b0a8e0c7604b 100755 --- a/shopping/merchant/accounts/apiv1beta/account_tax_client.go +++ b/shopping/merchant/accounts/apiv1beta/account_tax_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -225,6 +224,8 @@ type accountTaxGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAccountTaxClient creates a new account tax service client based on gRPC. @@ -255,6 +256,7 @@ func NewAccountTaxClient(ctx context.Context, opts ...option.ClientOption) (*Acc connPool: connPool, accountTaxClient: accountspb.NewAccountTaxServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -301,6 +303,8 @@ type accountTaxRESTClient struct { // Points back to the CallOptions field of the containing AccountTaxClient CallOptions **AccountTaxCallOptions + + logger *slog.Logger } // NewAccountTaxRESTClient creates a new account tax service rest client. @@ -322,6 +326,7 @@ func NewAccountTaxRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -374,7 +379,7 @@ func (c *accountTaxGRPCClient) GetAccountTax(ctx context.Context, req *accountsp var resp *accountspb.AccountTax err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountTaxClient.GetAccountTax(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountTaxClient.GetAccountTax, req, settings.GRPC, c.logger, "GetAccountTax") return err }, opts...) if err != nil { @@ -403,7 +408,7 @@ func (c *accountTaxGRPCClient) ListAccountTax(ctx context.Context, req *accounts } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountTaxClient.ListAccountTax(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountTaxClient.ListAccountTax, req, settings.GRPC, c.logger, "ListAccountTax") return err }, opts...) if err != nil { @@ -438,7 +443,7 @@ func (c *accountTaxGRPCClient) UpdateAccountTax(ctx context.Context, req *accoun var resp *accountspb.AccountTax err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.accountTaxClient.UpdateAccountTax(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.accountTaxClient.UpdateAccountTax, req, settings.GRPC, c.logger, "UpdateAccountTax") return err }, opts...) if err != nil { @@ -480,17 +485,7 @@ func (c *accountTaxRESTClient) GetAccountTax(ctx context.Context, req *accountsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccountTax") if err != nil { return err } @@ -555,21 +550,10 @@ func (c *accountTaxRESTClient) ListAccountTax(ctx context.Context, req *accounts } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccountTax") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -646,17 +630,7 @@ func (c *accountTaxRESTClient) UpdateAccountTax(ctx context.Context, req *accoun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccountTax") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/account_tax_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/account_tax_client_example_go123_test.go index 9da3d8203809..b1ad34d59008 100644 --- a/shopping/merchant/accounts/apiv1beta/account_tax_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/account_tax_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleAccountTaxClient_ListAccountTax_all() { } for resp, err := range c.ListAccountTax(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/accounts_client.go b/shopping/merchant/accounts/apiv1beta/accounts_client.go index 5b7d2ebad363..9859168929a1 100755 --- a/shopping/merchant/accounts/apiv1beta/accounts_client.go +++ b/shopping/merchant/accounts/apiv1beta/accounts_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -326,6 +325,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new accounts service client based on gRPC. @@ -352,6 +353,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: accountspb.NewAccountsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,6 +400,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new accounts service rest client. @@ -415,6 +419,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -467,7 +472,7 @@ func (c *gRPCClient) GetAccount(ctx context.Context, req *accountspb.GetAccountR var resp *accountspb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAccount, req, settings.GRPC, c.logger, "GetAccount") return err }, opts...) if err != nil { @@ -482,7 +487,7 @@ func (c *gRPCClient) CreateAndConfigureAccount(ctx context.Context, req *account var resp *accountspb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAndConfigureAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAndConfigureAccount, req, settings.GRPC, c.logger, "CreateAndConfigureAccount") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *gRPCClient) DeleteAccount(ctx context.Context, req *accountspb.DeleteAc opts = append((*c.CallOptions).DeleteAccount[0:len((*c.CallOptions).DeleteAccount):len((*c.CallOptions).DeleteAccount)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAccount(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAccount, req, settings.GRPC, c.logger, "DeleteAccount") return err }, opts...) return err @@ -514,7 +519,7 @@ func (c *gRPCClient) UpdateAccount(ctx context.Context, req *accountspb.UpdateAc var resp *accountspb.Account err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAccount, req, settings.GRPC, c.logger, "UpdateAccount") return err }, opts...) if err != nil { @@ -540,7 +545,7 @@ func (c *gRPCClient) ListAccounts(ctx context.Context, req *accountspb.ListAccou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAccounts, req, settings.GRPC, c.logger, "ListAccounts") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *gRPCClient) ListSubAccounts(ctx context.Context, req *accountspb.ListSu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSubAccounts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSubAccounts, req, settings.GRPC, c.logger, "ListSubAccounts") return err }, opts...) if err != nil { @@ -647,17 +652,7 @@ func (c *restClient) GetAccount(ctx context.Context, req *accountspb.GetAccountR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAccount") if err != nil { return err } @@ -711,17 +706,7 @@ func (c *restClient) CreateAndConfigureAccount(ctx context.Context, req *account httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAndConfigureAccount") if err != nil { return err } @@ -776,15 +761,8 @@ func (c *restClient) DeleteAccount(ctx context.Context, req *accountspb.DeleteAc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAccount") + return err }, opts...) } @@ -836,17 +814,7 @@ func (c *restClient) UpdateAccount(ctx context.Context, req *accountspb.UpdateAc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAccount") if err != nil { return err } @@ -916,21 +884,10 @@ func (c *restClient) ListAccounts(ctx context.Context, req *accountspb.ListAccou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAccounts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1009,21 +966,10 @@ func (c *restClient) ListSubAccounts(ctx context.Context, req *accountspb.ListSu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubAccounts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/accounts_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/accounts_client_example_go123_test.go index 11771ce48b1d..6f3be5cdac33 100644 --- a/shopping/merchant/accounts/apiv1beta/accounts_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/accounts_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListAccounts_all() { } for resp, err := range c.ListAccounts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListSubAccounts_all() { } for resp, err := range c.ListSubAccounts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/accessright.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/accessright.pb.go index 4f5e19ed26d0..9f7e13cf68a7 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/accessright.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/accessright.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/accessright.proto diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/account_tax.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/account_tax.pb.go index d6ddf67af9a4..249010c57a9c 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/account_tax.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/account_tax.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/account_tax.proto @@ -61,11 +61,9 @@ type AccountTax struct { func (x *AccountTax) Reset() { *x = AccountTax{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountTax) String() string { @@ -76,7 +74,7 @@ func (*AccountTax) ProtoMessage() {} func (x *AccountTax) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type GetAccountTaxRequest struct { func (x *GetAccountTaxRequest) Reset() { *x = GetAccountTaxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountTaxRequest) String() string { @@ -139,7 +135,7 @@ func (*GetAccountTaxRequest) ProtoMessage() {} func (x *GetAccountTaxRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type UpdateAccountTaxRequest struct { func (x *UpdateAccountTaxRequest) Reset() { *x = UpdateAccountTaxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccountTaxRequest) String() string { @@ -190,7 +184,7 @@ func (*UpdateAccountTaxRequest) ProtoMessage() {} func (x *UpdateAccountTaxRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +233,9 @@ type ListAccountTaxRequest struct { func (x *ListAccountTaxRequest) Reset() { *x = ListAccountTaxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountTaxRequest) String() string { @@ -254,7 +246,7 @@ func (*ListAccountTaxRequest) ProtoMessage() {} func (x *ListAccountTaxRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +298,9 @@ type ListAccountTaxResponse struct { func (x *ListAccountTaxResponse) Reset() { *x = ListAccountTaxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountTaxResponse) String() string { @@ -321,7 +311,7 @@ func (*ListAccountTaxResponse) ProtoMessage() {} func (x *ListAccountTaxResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,68 +522,6 @@ func file_google_shopping_merchant_accounts_v1beta_account_tax_proto_init() { return } file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccountTax); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountTaxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccountTaxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountTaxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_account_tax_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountTaxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/accountissue.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/accountissue.pb.go index be3acf9b950f..241aa728607a 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/accountissue.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/accountissue.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/accountissue.proto @@ -124,11 +124,9 @@ type AccountIssue struct { func (x *AccountIssue) Reset() { *x = AccountIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountIssue) String() string { @@ -139,7 +137,7 @@ func (*AccountIssue) ProtoMessage() {} func (x *AccountIssue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +226,9 @@ type ListAccountIssuesRequest struct { func (x *ListAccountIssuesRequest) Reset() { *x = ListAccountIssuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountIssuesRequest) String() string { @@ -243,7 +239,7 @@ func (*ListAccountIssuesRequest) ProtoMessage() {} func (x *ListAccountIssuesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +304,9 @@ type ListAccountIssuesResponse struct { func (x *ListAccountIssuesResponse) Reset() { *x = ListAccountIssuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountIssuesResponse) String() string { @@ -323,7 +317,7 @@ func (*ListAccountIssuesResponse) ProtoMessage() {} func (x *ListAccountIssuesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +360,9 @@ type AccountIssue_ImpactedDestination struct { func (x *AccountIssue_ImpactedDestination) Reset() { *x = AccountIssue_ImpactedDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountIssue_ImpactedDestination) String() string { @@ -381,7 +373,7 @@ func (*AccountIssue_ImpactedDestination) ProtoMessage() {} func (x *AccountIssue_ImpactedDestination) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,11 +417,9 @@ type AccountIssue_ImpactedDestination_Impact struct { func (x *AccountIssue_ImpactedDestination_Impact) Reset() { *x = AccountIssue_ImpactedDestination_Impact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountIssue_ImpactedDestination_Impact) String() string { @@ -440,7 +430,7 @@ func (*AccountIssue_ImpactedDestination_Impact) ProtoMessage() {} func (x *AccountIssue_ImpactedDestination_Impact) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -649,68 +639,6 @@ func file_google_shopping_merchant_accounts_v1beta_accountissue_proto_init() { if File_google_shopping_merchant_accounts_v1beta_accountissue_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccountIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountIssuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountIssuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AccountIssue_ImpactedDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AccountIssue_ImpactedDestination_Impact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_accountissue_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/accounts.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/accounts.pb.go index 17b02c9b4711..59f607286a4a 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/accounts.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/accounts.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/accounts.proto @@ -78,11 +78,9 @@ type Account struct { func (x *Account) Reset() { *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Account) String() string { @@ -93,7 +91,7 @@ func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,11 +168,9 @@ type GetAccountRequest struct { func (x *GetAccountRequest) Reset() { *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAccountRequest) String() string { @@ -185,7 +181,7 @@ func (*GetAccountRequest) ProtoMessage() {} func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +227,9 @@ type CreateAndConfigureAccountRequest struct { func (x *CreateAndConfigureAccountRequest) Reset() { *x = CreateAndConfigureAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAndConfigureAccountRequest) String() string { @@ -246,7 +240,7 @@ func (*CreateAndConfigureAccountRequest) ProtoMessage() {} func (x *CreateAndConfigureAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +299,9 @@ type DeleteAccountRequest struct { func (x *DeleteAccountRequest) Reset() { *x = DeleteAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAccountRequest) String() string { @@ -320,7 +312,7 @@ func (*DeleteAccountRequest) ProtoMessage() {} func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +355,9 @@ type UpdateAccountRequest struct { func (x *UpdateAccountRequest) Reset() { *x = UpdateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAccountRequest) String() string { @@ -378,7 +368,7 @@ func (*UpdateAccountRequest) ProtoMessage() {} func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type ListAccountsRequest struct { func (x *ListAccountsRequest) Reset() { *x = ListAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountsRequest) String() string { @@ -447,7 +435,7 @@ func (*ListAccountsRequest) ProtoMessage() {} func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +486,9 @@ type ListAccountsResponse struct { func (x *ListAccountsResponse) Reset() { *x = ListAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAccountsResponse) String() string { @@ -513,7 +499,7 @@ func (*ListAccountsResponse) ProtoMessage() {} func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +551,9 @@ type ListSubAccountsRequest struct { func (x *ListSubAccountsRequest) Reset() { *x = ListSubAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubAccountsRequest) String() string { @@ -580,7 +564,7 @@ func (*ListSubAccountsRequest) ProtoMessage() {} func (x *ListSubAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,11 +615,9 @@ type ListSubAccountsResponse struct { func (x *ListSubAccountsResponse) Reset() { *x = ListSubAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubAccountsResponse) String() string { @@ -646,7 +628,7 @@ func (*ListSubAccountsResponse) ProtoMessage() {} func (x *ListSubAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +676,9 @@ type CreateAndConfigureAccountRequest_AcceptTermsOfService struct { func (x *CreateAndConfigureAccountRequest_AcceptTermsOfService) Reset() { *x = CreateAndConfigureAccountRequest_AcceptTermsOfService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAndConfigureAccountRequest_AcceptTermsOfService) String() string { @@ -709,7 +689,7 @@ func (*CreateAndConfigureAccountRequest_AcceptTermsOfService) ProtoMessage() {} func (x *CreateAndConfigureAccountRequest_AcceptTermsOfService) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +738,9 @@ type CreateAndConfigureAccountRequest_AddAccountService struct { func (x *CreateAndConfigureAccountRequest_AddAccountService) Reset() { *x = CreateAndConfigureAccountRequest_AddAccountService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAndConfigureAccountRequest_AddAccountService) String() string { @@ -773,7 +751,7 @@ func (*CreateAndConfigureAccountRequest_AddAccountService) ProtoMessage() {} func (x *CreateAndConfigureAccountRequest_AddAccountService) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,140 +1127,6 @@ func file_google_shopping_merchant_accounts_v1beta_accounts_proto_init() { } file_google_shopping_merchant_accounts_v1beta_accountservices_proto_init() file_google_shopping_merchant_accounts_v1beta_user_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateAndConfigureAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListSubAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListSubAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateAndConfigureAccountRequest_AcceptTermsOfService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateAndConfigureAccountRequest_AddAccountService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[2].OneofWrappers = []any{} file_google_shopping_merchant_accounts_v1beta_accounts_proto_msgTypes[10].OneofWrappers = []any{ (*CreateAndConfigureAccountRequest_AddAccountService_AccountAggregation)(nil), diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/accountservices.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/accountservices.pb.go index d6f2f974b4c4..abb87534bc44 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/accountservices.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/accountservices.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/accountservices.proto @@ -45,11 +45,9 @@ type AccountAggregation struct { func (x *AccountAggregation) Reset() { *x = AccountAggregation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_accountservices_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_accountservices_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountAggregation) String() string { @@ -60,7 +58,7 @@ func (*AccountAggregation) ProtoMessage() {} func (x *AccountAggregation) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_accountservices_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,20 +133,6 @@ func file_google_shopping_merchant_accounts_v1beta_accountservices_proto_init() if File_google_shopping_merchant_accounts_v1beta_accountservices_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_accountservices_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AccountAggregation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/autofeedsettings.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/autofeedsettings.pb.go index 3111e1b418ff..0d8fc241dd0f 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/autofeedsettings.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/autofeedsettings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/autofeedsettings.proto @@ -67,11 +67,9 @@ type AutofeedSettings struct { func (x *AutofeedSettings) Reset() { *x = AutofeedSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutofeedSettings) String() string { @@ -82,7 +80,7 @@ func (*AutofeedSettings) ProtoMessage() {} func (x *AutofeedSettings) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type GetAutofeedSettingsRequest struct { func (x *GetAutofeedSettingsRequest) Reset() { *x = GetAutofeedSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAutofeedSettingsRequest) String() string { @@ -146,7 +142,7 @@ func (*GetAutofeedSettingsRequest) ProtoMessage() {} func (x *GetAutofeedSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +178,9 @@ type UpdateAutofeedSettingsRequest struct { func (x *UpdateAutofeedSettingsRequest) Reset() { *x = UpdateAutofeedSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAutofeedSettingsRequest) String() string { @@ -197,7 +191,7 @@ func (*UpdateAutofeedSettingsRequest) ProtoMessage() {} func (x *UpdateAutofeedSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,44 +363,6 @@ func file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_init() if File_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AutofeedSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAutofeedSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_autofeedsettings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAutofeedSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/businessidentity.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/businessidentity.pb.go index 468ddd9795ed..e58c472a6ac6 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/businessidentity.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/businessidentity.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/businessidentity.proto @@ -190,11 +190,9 @@ type BusinessIdentity struct { func (x *BusinessIdentity) Reset() { *x = BusinessIdentity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BusinessIdentity) String() string { @@ -205,7 +203,7 @@ func (*BusinessIdentity) ProtoMessage() {} func (x *BusinessIdentity) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +280,9 @@ type GetBusinessIdentityRequest struct { func (x *GetBusinessIdentityRequest) Reset() { *x = GetBusinessIdentityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBusinessIdentityRequest) String() string { @@ -297,7 +293,7 @@ func (*GetBusinessIdentityRequest) ProtoMessage() {} func (x *GetBusinessIdentityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -333,11 +329,9 @@ type UpdateBusinessIdentityRequest struct { func (x *UpdateBusinessIdentityRequest) Reset() { *x = UpdateBusinessIdentityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBusinessIdentityRequest) String() string { @@ -348,7 +342,7 @@ func (*UpdateBusinessIdentityRequest) ProtoMessage() {} func (x *UpdateBusinessIdentityRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +383,9 @@ type BusinessIdentity_IdentityAttribute struct { func (x *BusinessIdentity_IdentityAttribute) Reset() { *x = BusinessIdentity_IdentityAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BusinessIdentity_IdentityAttribute) String() string { @@ -404,7 +396,7 @@ func (*BusinessIdentity_IdentityAttribute) ProtoMessage() {} func (x *BusinessIdentity_IdentityAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,56 +638,6 @@ func file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_init() if File_google_shopping_merchant_accounts_v1beta_businessidentity_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BusinessIdentity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBusinessIdentityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBusinessIdentityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_businessidentity_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BusinessIdentity_IdentityAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/businessinfo.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/businessinfo.pb.go index a2fe50283785..53bba5654da9 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/businessinfo.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/businessinfo.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/businessinfo.proto @@ -68,11 +68,9 @@ type BusinessInfo struct { func (x *BusinessInfo) Reset() { *x = BusinessInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BusinessInfo) String() string { @@ -83,7 +81,7 @@ func (*BusinessInfo) ProtoMessage() {} func (x *BusinessInfo) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -153,11 +151,9 @@ type GetBusinessInfoRequest struct { func (x *GetBusinessInfoRequest) Reset() { *x = GetBusinessInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBusinessInfoRequest) String() string { @@ -168,7 +164,7 @@ func (*GetBusinessInfoRequest) ProtoMessage() {} func (x *GetBusinessInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -204,11 +200,9 @@ type UpdateBusinessInfoRequest struct { func (x *UpdateBusinessInfoRequest) Reset() { *x = UpdateBusinessInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBusinessInfoRequest) String() string { @@ -219,7 +213,7 @@ func (*UpdateBusinessInfoRequest) ProtoMessage() {} func (x *UpdateBusinessInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,44 +432,6 @@ func file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_init() { } file_google_shopping_merchant_accounts_v1beta_customerservice_proto_init() file_google_shopping_merchant_accounts_v1beta_phoneverificationstate_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BusinessInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBusinessInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBusinessInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_businessinfo_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/customerservice.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/customerservice.pb.go index c0e34f4a8ffe..443b801f3941 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/customerservice.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/customerservice.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/customerservice.proto @@ -53,11 +53,9 @@ type CustomerService struct { func (x *CustomerService) Reset() { *x = CustomerService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_customerservice_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_customerservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerService) String() string { @@ -68,7 +66,7 @@ func (*CustomerService) ProtoMessage() {} func (x *CustomerService) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_customerservice_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -172,20 +170,6 @@ func file_google_shopping_merchant_accounts_v1beta_customerservice_proto_init() if File_google_shopping_merchant_accounts_v1beta_customerservice_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_customerservice_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomerService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_customerservice_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/emailpreferences.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/emailpreferences.pb.go index de74e57f26de..6da41728099a 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/emailpreferences.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/emailpreferences.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/emailpreferences.proto @@ -117,11 +117,9 @@ type EmailPreferences struct { func (x *EmailPreferences) Reset() { *x = EmailPreferences{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmailPreferences) String() string { @@ -132,7 +130,7 @@ func (*EmailPreferences) ProtoMessage() {} func (x *EmailPreferences) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type GetEmailPreferencesRequest struct { func (x *GetEmailPreferencesRequest) Reset() { *x = GetEmailPreferencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEmailPreferencesRequest) String() string { @@ -189,7 +185,7 @@ func (*GetEmailPreferencesRequest) ProtoMessage() {} func (x *GetEmailPreferencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +221,9 @@ type UpdateEmailPreferencesRequest struct { func (x *UpdateEmailPreferencesRequest) Reset() { *x = UpdateEmailPreferencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEmailPreferencesRequest) String() string { @@ -240,7 +234,7 @@ func (*UpdateEmailPreferencesRequest) ProtoMessage() {} func (x *UpdateEmailPreferencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,44 +419,6 @@ func file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_init() if File_google_shopping_merchant_accounts_v1beta_emailpreferences_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EmailPreferences); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetEmailPreferencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEmailPreferencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/homepage.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/homepage.pb.go index d4fc35f34819..00f077e389d1 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/homepage.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/homepage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/homepage.proto @@ -59,11 +59,9 @@ type Homepage struct { func (x *Homepage) Reset() { *x = Homepage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Homepage) String() string { @@ -74,7 +72,7 @@ func (*Homepage) ProtoMessage() {} func (x *Homepage) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type GetHomepageRequest struct { func (x *GetHomepageRequest) Reset() { *x = GetHomepageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHomepageRequest) String() string { @@ -138,7 +134,7 @@ func (*GetHomepageRequest) ProtoMessage() {} func (x *GetHomepageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +170,9 @@ type UpdateHomepageRequest struct { func (x *UpdateHomepageRequest) Reset() { *x = UpdateHomepageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHomepageRequest) String() string { @@ -189,7 +183,7 @@ func (*UpdateHomepageRequest) ProtoMessage() {} func (x *UpdateHomepageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -231,11 +225,9 @@ type ClaimHomepageRequest struct { func (x *ClaimHomepageRequest) Reset() { *x = ClaimHomepageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClaimHomepageRequest) String() string { @@ -246,7 +238,7 @@ func (*ClaimHomepageRequest) ProtoMessage() {} func (x *ClaimHomepageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -281,11 +273,9 @@ type UnclaimHomepageRequest struct { func (x *UnclaimHomepageRequest) Reset() { *x = UnclaimHomepageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnclaimHomepageRequest) String() string { @@ -296,7 +286,7 @@ func (*UnclaimHomepageRequest) ProtoMessage() {} func (x *UnclaimHomepageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,68 +480,6 @@ func file_google_shopping_merchant_accounts_v1beta_homepage_proto_init() { if File_google_shopping_merchant_accounts_v1beta_homepage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Homepage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetHomepageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHomepageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClaimHomepageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UnclaimHomepageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_homepage_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/online_return_policy.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/online_return_policy.pb.go index 52cb4d2b7117..f8cac2f03041 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/online_return_policy.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/online_return_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/online_return_policy.proto @@ -274,11 +274,9 @@ type GetOnlineReturnPolicyRequest struct { func (x *GetOnlineReturnPolicyRequest) Reset() { *x = GetOnlineReturnPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOnlineReturnPolicyRequest) String() string { @@ -289,7 +287,7 @@ func (*GetOnlineReturnPolicyRequest) ProtoMessage() {} func (x *GetOnlineReturnPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,11 +337,9 @@ type ListOnlineReturnPoliciesRequest struct { func (x *ListOnlineReturnPoliciesRequest) Reset() { *x = ListOnlineReturnPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOnlineReturnPoliciesRequest) String() string { @@ -354,7 +350,7 @@ func (*ListOnlineReturnPoliciesRequest) ProtoMessage() {} func (x *ListOnlineReturnPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,11 +401,9 @@ type ListOnlineReturnPoliciesResponse struct { func (x *ListOnlineReturnPoliciesResponse) Reset() { *x = ListOnlineReturnPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOnlineReturnPoliciesResponse) String() string { @@ -420,7 +414,7 @@ func (*ListOnlineReturnPoliciesResponse) ProtoMessage() {} func (x *ListOnlineReturnPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +498,9 @@ type OnlineReturnPolicy struct { func (x *OnlineReturnPolicy) Reset() { *x = OnlineReturnPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineReturnPolicy) String() string { @@ -519,7 +511,7 @@ func (*OnlineReturnPolicy) ProtoMessage() {} func (x *OnlineReturnPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,11 +634,9 @@ type OnlineReturnPolicy_ReturnShippingFee struct { func (x *OnlineReturnPolicy_ReturnShippingFee) Reset() { *x = OnlineReturnPolicy_ReturnShippingFee{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineReturnPolicy_ReturnShippingFee) String() string { @@ -657,7 +647,7 @@ func (*OnlineReturnPolicy_ReturnShippingFee) ProtoMessage() {} func (x *OnlineReturnPolicy_ReturnShippingFee) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +691,9 @@ type OnlineReturnPolicy_RestockingFee struct { func (x *OnlineReturnPolicy_RestockingFee) Reset() { *x = OnlineReturnPolicy_RestockingFee{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineReturnPolicy_RestockingFee) String() string { @@ -716,7 +704,7 @@ func (*OnlineReturnPolicy_RestockingFee) ProtoMessage() {} func (x *OnlineReturnPolicy_RestockingFee) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,11 +775,9 @@ type OnlineReturnPolicy_Policy struct { func (x *OnlineReturnPolicy_Policy) Reset() { *x = OnlineReturnPolicy_Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlineReturnPolicy_Policy) String() string { @@ -802,7 +788,7 @@ func (*OnlineReturnPolicy_Policy) ProtoMessage() {} func (x *OnlineReturnPolicy_Policy) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,92 +1090,6 @@ func file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_in if File_google_shopping_merchant_accounts_v1beta_online_return_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetOnlineReturnPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListOnlineReturnPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOnlineReturnPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*OnlineReturnPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*OnlineReturnPolicy_ReturnShippingFee); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OnlineReturnPolicy_RestockingFee); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OnlineReturnPolicy_Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[3].OneofWrappers = []any{} file_google_shopping_merchant_accounts_v1beta_online_return_policy_proto_msgTypes[5].OneofWrappers = []any{ (*OnlineReturnPolicy_RestockingFee_FixedFee)(nil), diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/phoneverificationstate.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/phoneverificationstate.pb.go index 7c9c1f191449..60dcdede03cd 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/phoneverificationstate.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/phoneverificationstate.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/phoneverificationstate.proto diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/programs.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/programs.pb.go index 2fefcd69d1d6..c02b593999c7 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/programs.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/programs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/programs.proto @@ -131,11 +131,9 @@ type Program struct { func (x *Program) Reset() { *x = Program{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Program) String() string { @@ -146,7 +144,7 @@ func (*Program) ProtoMessage() {} func (x *Program) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +207,9 @@ type GetProgramRequest struct { func (x *GetProgramRequest) Reset() { *x = GetProgramRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProgramRequest) String() string { @@ -224,7 +220,7 @@ func (*GetProgramRequest) ProtoMessage() {} func (x *GetProgramRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +262,9 @@ type ListProgramsRequest struct { func (x *ListProgramsRequest) Reset() { *x = ListProgramsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProgramsRequest) String() string { @@ -281,7 +275,7 @@ func (*ListProgramsRequest) ProtoMessage() {} func (x *ListProgramsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +326,9 @@ type ListProgramsResponse struct { func (x *ListProgramsResponse) Reset() { *x = ListProgramsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProgramsResponse) String() string { @@ -347,7 +339,7 @@ func (*ListProgramsResponse) ProtoMessage() {} func (x *ListProgramsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +381,9 @@ type EnableProgramRequest struct { func (x *EnableProgramRequest) Reset() { *x = EnableProgramRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableProgramRequest) String() string { @@ -404,7 +394,7 @@ func (*EnableProgramRequest) ProtoMessage() {} func (x *EnableProgramRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,11 +429,9 @@ type DisableProgramRequest struct { func (x *DisableProgramRequest) Reset() { *x = DisableProgramRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableProgramRequest) String() string { @@ -454,7 +442,7 @@ func (*DisableProgramRequest) ProtoMessage() {} func (x *DisableProgramRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -497,11 +485,9 @@ type Program_Requirement struct { func (x *Program_Requirement) Reset() { *x = Program_Requirement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Program_Requirement) String() string { @@ -512,7 +498,7 @@ func (*Program_Requirement) ProtoMessage() {} func (x *Program_Requirement) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,92 +744,6 @@ func file_google_shopping_merchant_accounts_v1beta_programs_proto_init() { if File_google_shopping_merchant_accounts_v1beta_programs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Program); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProgramRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListProgramsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListProgramsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*EnableProgramRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DisableProgramRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_programs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Program_Requirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/regions.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/regions.pb.go index dc859166759a..d21dc657838a 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/regions.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/regions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/regions.proto @@ -56,11 +56,9 @@ type GetRegionRequest struct { func (x *GetRegionRequest) Reset() { *x = GetRegionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRegionRequest) String() string { @@ -71,7 +69,7 @@ func (*GetRegionRequest) ProtoMessage() {} func (x *GetRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -111,11 +109,9 @@ type CreateRegionRequest struct { func (x *CreateRegionRequest) Reset() { *x = CreateRegionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRegionRequest) String() string { @@ -126,7 +122,7 @@ func (*CreateRegionRequest) ProtoMessage() {} func (x *CreateRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type UpdateRegionRequest struct { func (x *UpdateRegionRequest) Reset() { *x = UpdateRegionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRegionRequest) String() string { @@ -193,7 +187,7 @@ func (*UpdateRegionRequest) ProtoMessage() {} func (x *UpdateRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +229,9 @@ type DeleteRegionRequest struct { func (x *DeleteRegionRequest) Reset() { *x = DeleteRegionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionRequest) String() string { @@ -250,7 +242,7 @@ func (*DeleteRegionRequest) ProtoMessage() {} func (x *DeleteRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +288,9 @@ type ListRegionsRequest struct { func (x *ListRegionsRequest) Reset() { *x = ListRegionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionsRequest) String() string { @@ -311,7 +301,7 @@ func (*ListRegionsRequest) ProtoMessage() {} func (x *ListRegionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +352,9 @@ type ListRegionsResponse struct { func (x *ListRegionsResponse) Reset() { *x = ListRegionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionsResponse) String() string { @@ -377,7 +365,7 @@ func (*ListRegionsResponse) ProtoMessage() {} func (x *ListRegionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,11 +424,9 @@ type Region struct { func (x *Region) Reset() { *x = Region{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Region) String() string { @@ -451,7 +437,7 @@ func (*Region) ProtoMessage() {} func (x *Region) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +512,9 @@ type Region_PostalCodeArea struct { func (x *Region_PostalCodeArea) Reset() { *x = Region_PostalCodeArea{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Region_PostalCodeArea) String() string { @@ -541,7 +525,7 @@ func (*Region_PostalCodeArea) ProtoMessage() {} func (x *Region_PostalCodeArea) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +568,9 @@ type Region_GeoTargetArea struct { func (x *Region_GeoTargetArea) Reset() { *x = Region_GeoTargetArea{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Region_GeoTargetArea) String() string { @@ -599,7 +581,7 @@ func (*Region_GeoTargetArea) ProtoMessage() {} func (x *Region_GeoTargetArea) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -644,11 +626,9 @@ type Region_PostalCodeArea_PostalCodeRange struct { func (x *Region_PostalCodeArea_PostalCodeRange) Reset() { *x = Region_PostalCodeArea_PostalCodeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Region_PostalCodeArea_PostalCodeRange) String() string { @@ -659,7 +639,7 @@ func (*Region_PostalCodeArea_PostalCodeRange) ProtoMessage() {} func (x *Region_PostalCodeArea_PostalCodeRange) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,128 +940,6 @@ func file_google_shopping_merchant_accounts_v1beta_regions_proto_init() { if File_google_shopping_merchant_accounts_v1beta_regions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetRegionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateRegionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRegionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Region); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Region_PostalCodeArea); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Region_GeoTargetArea); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Region_PostalCodeArea_PostalCodeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_regions_proto_msgTypes[6].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/shippingsettings.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/shippingsettings.pb.go index d57cf7a1a7bc..2f21dd842c48 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/shippingsettings.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/shippingsettings.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/shippingsettings.proto @@ -312,11 +312,9 @@ type ShippingSettings struct { func (x *ShippingSettings) Reset() { *x = ShippingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShippingSettings) String() string { @@ -327,7 +325,7 @@ func (*ShippingSettings) ProtoMessage() {} func (x *ShippingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +411,9 @@ type Service struct { func (x *Service) Reset() { *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service) String() string { @@ -428,7 +424,7 @@ func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,11 +532,9 @@ type Distance struct { func (x *Distance) Reset() { *x = Distance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Distance) String() string { @@ -551,7 +545,7 @@ func (*Distance) ProtoMessage() {} func (x *Distance) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +600,9 @@ type Warehouse struct { func (x *Warehouse) Reset() { *x = Warehouse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Warehouse) String() string { @@ -621,7 +613,7 @@ func (*Warehouse) ProtoMessage() {} func (x *Warehouse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +683,9 @@ type WarehouseCutoffTime struct { func (x *WarehouseCutoffTime) Reset() { *x = WarehouseCutoffTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WarehouseCutoffTime) String() string { @@ -706,7 +696,7 @@ func (*WarehouseCutoffTime) ProtoMessage() {} func (x *WarehouseCutoffTime) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -759,11 +749,9 @@ type Address struct { func (x *Address) Reset() { *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Address) String() string { @@ -774,7 +762,7 @@ func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +861,9 @@ type DeliveryTime struct { func (x *DeliveryTime) Reset() { *x = DeliveryTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeliveryTime) String() string { @@ -888,7 +874,7 @@ func (*DeliveryTime) ProtoMessage() {} func (x *DeliveryTime) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +972,9 @@ type CutoffTime struct { func (x *CutoffTime) Reset() { *x = CutoffTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CutoffTime) String() string { @@ -1001,7 +985,7 @@ func (*CutoffTime) ProtoMessage() {} func (x *CutoffTime) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,11 +1034,9 @@ type BusinessDayConfig struct { func (x *BusinessDayConfig) Reset() { *x = BusinessDayConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BusinessDayConfig) String() string { @@ -1065,7 +1047,7 @@ func (*BusinessDayConfig) ProtoMessage() {} func (x *BusinessDayConfig) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1108,11 +1090,9 @@ type WarehouseBasedDeliveryTime struct { func (x *WarehouseBasedDeliveryTime) Reset() { *x = WarehouseBasedDeliveryTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WarehouseBasedDeliveryTime) String() string { @@ -1123,7 +1103,7 @@ func (*WarehouseBasedDeliveryTime) ProtoMessage() {} func (x *WarehouseBasedDeliveryTime) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1194,11 +1174,9 @@ type RateGroup struct { func (x *RateGroup) Reset() { *x = RateGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RateGroup) String() string { @@ -1209,7 +1187,7 @@ func (*RateGroup) ProtoMessage() {} func (x *RateGroup) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1265,9 @@ type Table struct { func (x *Table) Reset() { *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Table) String() string { @@ -1302,7 +1278,7 @@ func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,11 +1350,9 @@ type TransitTable struct { func (x *TransitTable) Reset() { *x = TransitTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitTable) String() string { @@ -1389,7 +1363,7 @@ func (*TransitTable) ProtoMessage() {} func (x *TransitTable) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1415,9 @@ type MinimumOrderValueTable struct { func (x *MinimumOrderValueTable) Reset() { *x = MinimumOrderValueTable{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MinimumOrderValueTable) String() string { @@ -1456,7 +1428,7 @@ func (*MinimumOrderValueTable) ProtoMessage() {} func (x *MinimumOrderValueTable) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1525,11 +1497,9 @@ type Headers struct { func (x *Headers) Reset() { *x = Headers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Headers) String() string { @@ -1540,7 +1510,7 @@ func (*Headers) ProtoMessage() {} func (x *Headers) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1607,11 +1577,9 @@ type LocationIdSet struct { func (x *LocationIdSet) Reset() { *x = LocationIdSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationIdSet) String() string { @@ -1622,7 +1590,7 @@ func (*LocationIdSet) ProtoMessage() {} func (x *LocationIdSet) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1658,11 +1626,9 @@ type Row struct { func (x *Row) Reset() { *x = Row{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Row) String() string { @@ -1673,7 +1639,7 @@ func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1723,11 +1689,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -1738,7 +1702,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1816,11 +1780,9 @@ type CarrierRate struct { func (x *CarrierRate) Reset() { *x = CarrierRate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CarrierRate) String() string { @@ -1831,7 +1793,7 @@ func (*CarrierRate) ProtoMessage() {} func (x *CarrierRate) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,11 +1863,9 @@ type GetShippingSettingsRequest struct { func (x *GetShippingSettingsRequest) Reset() { *x = GetShippingSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetShippingSettingsRequest) String() string { @@ -1916,7 +1876,7 @@ func (*GetShippingSettingsRequest) ProtoMessage() {} func (x *GetShippingSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1953,11 +1913,9 @@ type InsertShippingSettingsRequest struct { func (x *InsertShippingSettingsRequest) Reset() { *x = InsertShippingSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertShippingSettingsRequest) String() string { @@ -1968,7 +1926,7 @@ func (*InsertShippingSettingsRequest) ProtoMessage() {} func (x *InsertShippingSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2019,11 +1977,9 @@ type Service_StoreConfig struct { func (x *Service_StoreConfig) Reset() { *x = Service_StoreConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_StoreConfig) String() string { @@ -2034,7 +1990,7 @@ func (*Service_StoreConfig) ProtoMessage() {} func (x *Service_StoreConfig) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2094,11 +2050,9 @@ type Service_LoyaltyProgram struct { func (x *Service_LoyaltyProgram) Reset() { *x = Service_LoyaltyProgram{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_LoyaltyProgram) String() string { @@ -2109,7 +2063,7 @@ func (*Service_LoyaltyProgram) ProtoMessage() {} func (x *Service_LoyaltyProgram) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2162,11 +2116,9 @@ type Service_StoreConfig_CutoffConfig struct { func (x *Service_StoreConfig_CutoffConfig) Reset() { *x = Service_StoreConfig_CutoffConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_StoreConfig_CutoffConfig) String() string { @@ -2177,7 +2129,7 @@ func (*Service_StoreConfig_CutoffConfig) ProtoMessage() {} func (x *Service_StoreConfig_CutoffConfig) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2229,11 +2181,9 @@ type Service_StoreConfig_CutoffConfig_LocalCutoffTime struct { func (x *Service_StoreConfig_CutoffConfig_LocalCutoffTime) Reset() { *x = Service_StoreConfig_CutoffConfig_LocalCutoffTime{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_StoreConfig_CutoffConfig_LocalCutoffTime) String() string { @@ -2244,7 +2194,7 @@ func (*Service_StoreConfig_CutoffConfig_LocalCutoffTime) ProtoMessage() {} func (x *Service_StoreConfig_CutoffConfig_LocalCutoffTime) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2288,11 +2238,9 @@ type Service_LoyaltyProgram_LoyaltyProgramTiers struct { func (x *Service_LoyaltyProgram_LoyaltyProgramTiers) Reset() { *x = Service_LoyaltyProgram_LoyaltyProgramTiers{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Service_LoyaltyProgram_LoyaltyProgramTiers) String() string { @@ -2303,7 +2251,7 @@ func (*Service_LoyaltyProgram_LoyaltyProgramTiers) ProtoMessage() {} func (x *Service_LoyaltyProgram_LoyaltyProgramTiers) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2341,11 +2289,9 @@ type TransitTable_TransitTimeRow struct { func (x *TransitTable_TransitTimeRow) Reset() { *x = TransitTable_TransitTimeRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitTable_TransitTimeRow) String() string { @@ -2356,7 +2302,7 @@ func (*TransitTable_TransitTimeRow) ProtoMessage() {} func (x *TransitTable_TransitTimeRow) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2393,11 +2339,9 @@ type TransitTable_TransitTimeRow_TransitTimeValue struct { func (x *TransitTable_TransitTimeRow_TransitTimeValue) Reset() { *x = TransitTable_TransitTimeRow_TransitTimeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransitTable_TransitTimeRow_TransitTimeValue) String() string { @@ -2408,7 +2352,7 @@ func (*TransitTable_TransitTimeRow_TransitTimeValue) ProtoMessage() {} func (x *TransitTable_TransitTimeRow_TransitTimeValue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2455,11 +2399,9 @@ type MinimumOrderValueTable_StoreCodeSetWithMov struct { func (x *MinimumOrderValueTable_StoreCodeSetWithMov) Reset() { *x = MinimumOrderValueTable_StoreCodeSetWithMov{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MinimumOrderValueTable_StoreCodeSetWithMov) String() string { @@ -2470,7 +2412,7 @@ func (*MinimumOrderValueTable_StoreCodeSetWithMov) ProtoMessage() {} func (x *MinimumOrderValueTable_StoreCodeSetWithMov) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3223,356 +3165,6 @@ func file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_init() if File_google_shopping_merchant_accounts_v1beta_shippingsettings_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ShippingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Distance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Warehouse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WarehouseCutoffTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeliveryTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CutoffTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BusinessDayConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*WarehouseBasedDeliveryTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RateGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TransitTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MinimumOrderValueTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Headers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*LocationIdSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Row); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CarrierRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetShippingSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*InsertShippingSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Service_StoreConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Service_LoyaltyProgram); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Service_StoreConfig_CutoffConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Service_StoreConfig_CutoffConfig_LocalCutoffTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Service_LoyaltyProgram_LoyaltyProgramTiers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*TransitTable_TransitTimeRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*TransitTable_TransitTimeRow_TransitTimeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*MinimumOrderValueTable_StoreCodeSetWithMov); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[1].OneofWrappers = []any{} file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[2].OneofWrappers = []any{} file_google_shopping_merchant_accounts_v1beta_shippingsettings_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/tax_rule.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/tax_rule.pb.go index f2ecb39d081c..c692e2ec69b5 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/tax_rule.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/tax_rule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/tax_rule.proto @@ -84,11 +84,9 @@ type TaxRule struct { func (x *TaxRule) Reset() { *x = TaxRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaxRule) String() string { @@ -99,7 +97,7 @@ func (*TaxRule) ProtoMessage() {} func (x *TaxRule) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,11 +231,9 @@ type TaxRule_TaxPostalCodeRange struct { func (x *TaxRule_TaxPostalCodeRange) Reset() { *x = TaxRule_TaxPostalCodeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaxRule_TaxPostalCodeRange) String() string { @@ -248,7 +244,7 @@ func (*TaxRule_TaxPostalCodeRange) ProtoMessage() {} func (x *TaxRule_TaxPostalCodeRange) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,32 +363,6 @@ func file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_init() { if File_google_shopping_merchant_accounts_v1beta_tax_rule_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TaxRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TaxRule_TaxPostalCodeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_tax_rule_proto_msgTypes[0].OneofWrappers = []any{ (*TaxRule_LocationId)(nil), (*TaxRule_PostCodeRange)(nil), diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/termsofservice.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/termsofservice.pb.go index be59c2e7cfc0..5a3adf6c2359 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/termsofservice.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/termsofservice.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/termsofservice.proto @@ -69,11 +69,9 @@ type TermsOfService struct { func (x *TermsOfService) Reset() { *x = TermsOfService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TermsOfService) String() string { @@ -84,7 +82,7 @@ func (*TermsOfService) ProtoMessage() {} func (x *TermsOfService) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type GetTermsOfServiceRequest struct { func (x *GetTermsOfServiceRequest) Reset() { *x = GetTermsOfServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTermsOfServiceRequest) String() string { @@ -162,7 +158,7 @@ func (*GetTermsOfServiceRequest) ProtoMessage() {} func (x *GetTermsOfServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +196,9 @@ type RetrieveLatestTermsOfServiceRequest struct { func (x *RetrieveLatestTermsOfServiceRequest) Reset() { *x = RetrieveLatestTermsOfServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveLatestTermsOfServiceRequest) String() string { @@ -215,7 +209,7 @@ func (*RetrieveLatestTermsOfServiceRequest) ProtoMessage() {} func (x *RetrieveLatestTermsOfServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -263,11 +257,9 @@ type AcceptTermsOfServiceRequest struct { func (x *AcceptTermsOfServiceRequest) Reset() { *x = AcceptTermsOfServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceptTermsOfServiceRequest) String() string { @@ -278,7 +270,7 @@ func (*AcceptTermsOfServiceRequest) ProtoMessage() {} func (x *AcceptTermsOfServiceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,56 +481,6 @@ func file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_init() { return } file_google_shopping_merchant_accounts_v1beta_termsofservicekind_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TermsOfService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTermsOfServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveLatestTermsOfServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AcceptTermsOfServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_termsofservice_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/termsofserviceagreementstate.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/termsofserviceagreementstate.pb.go index 8845422ced26..39bab1a14671 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/termsofserviceagreementstate.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/termsofserviceagreementstate.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/termsofserviceagreementstate.proto @@ -87,11 +87,9 @@ type TermsOfServiceAgreementState struct { func (x *TermsOfServiceAgreementState) Reset() { *x = TermsOfServiceAgreementState{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TermsOfServiceAgreementState) String() string { @@ -102,7 +100,7 @@ func (*TermsOfServiceAgreementState) ProtoMessage() {} func (x *TermsOfServiceAgreementState) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +173,9 @@ type Accepted struct { func (x *Accepted) Reset() { *x = Accepted{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Accepted) String() string { @@ -190,7 +186,7 @@ func (*Accepted) ProtoMessage() {} func (x *Accepted) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type Required struct { func (x *Required) Reset() { *x = Required{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Required) String() string { @@ -259,7 +253,7 @@ func (*Required) ProtoMessage() {} func (x *Required) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +296,9 @@ type GetTermsOfServiceAgreementStateRequest struct { func (x *GetTermsOfServiceAgreementStateRequest) Reset() { *x = GetTermsOfServiceAgreementStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTermsOfServiceAgreementStateRequest) String() string { @@ -317,7 +309,7 @@ func (*GetTermsOfServiceAgreementStateRequest) ProtoMessage() {} func (x *GetTermsOfServiceAgreementStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +345,9 @@ type RetrieveForApplicationTermsOfServiceAgreementStateRequest struct { func (x *RetrieveForApplicationTermsOfServiceAgreementStateRequest) Reset() { *x = RetrieveForApplicationTermsOfServiceAgreementStateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetrieveForApplicationTermsOfServiceAgreementStateRequest) String() string { @@ -368,7 +358,7 @@ func (*RetrieveForApplicationTermsOfServiceAgreementStateRequest) ProtoMessage() func (x *RetrieveForApplicationTermsOfServiceAgreementStateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,68 +584,6 @@ func file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_ return } file_google_shopping_merchant_accounts_v1beta_termsofservicekind_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TermsOfServiceAgreementState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Accepted); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Required); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTermsOfServiceAgreementStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RetrieveForApplicationTermsOfServiceAgreementStateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[0].OneofWrappers = []any{} file_google_shopping_merchant_accounts_v1beta_termsofserviceagreementstate_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/termsofservicekind.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/termsofservicekind.pb.go index 0ad1cf10dda2..0e10ffe56d9e 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/termsofservicekind.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/termsofservicekind.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/termsofservicekind.proto diff --git a/shopping/merchant/accounts/apiv1beta/accountspb/user.pb.go b/shopping/merchant/accounts/apiv1beta/accountspb/user.pb.go index 52add09ffe51..f1ce1e2008d4 100755 --- a/shopping/merchant/accounts/apiv1beta/accountspb/user.pb.go +++ b/shopping/merchant/accounts/apiv1beta/accountspb/user.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/accounts/v1beta/user.proto @@ -118,11 +118,9 @@ type User struct { func (x *User) Reset() { *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *User) String() string { @@ -133,7 +131,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserRequest) String() string { @@ -201,7 +197,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -241,11 +237,9 @@ type CreateUserRequest struct { func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserRequest) String() string { @@ -256,7 +250,7 @@ func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,11 +302,9 @@ type DeleteUserRequest struct { func (x *DeleteUserRequest) Reset() { *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserRequest) String() string { @@ -323,7 +315,7 @@ func (*DeleteUserRequest) ProtoMessage() {} func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +354,9 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserRequest) String() string { @@ -377,7 +367,7 @@ func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +419,9 @@ type ListUsersRequest struct { func (x *ListUsersRequest) Reset() { *x = ListUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersRequest) String() string { @@ -444,7 +432,7 @@ func (*ListUsersRequest) ProtoMessage() {} func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +483,9 @@ type ListUsersResponse struct { func (x *ListUsersResponse) Reset() { *x = ListUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsersResponse) String() string { @@ -510,7 +496,7 @@ func (*ListUsersResponse) ProtoMessage() {} func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,92 +754,6 @@ func file_google_shopping_merchant_accounts_v1beta_user_proto_init() { return } file_google_shopping_merchant_accounts_v1beta_accessright_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_accounts_v1beta_user_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/accounts/apiv1beta/autofeed_settings_client.go b/shopping/merchant/accounts/apiv1beta/autofeed_settings_client.go index 778a212a5083..5f33d29021da 100755 --- a/shopping/merchant/accounts/apiv1beta/autofeed_settings_client.go +++ b/shopping/merchant/accounts/apiv1beta/autofeed_settings_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -187,6 +186,8 @@ type autofeedSettingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAutofeedSettingsClient creates a new autofeed settings service client based on gRPC. @@ -214,6 +215,7 @@ func NewAutofeedSettingsClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, autofeedSettingsClient: accountspb.NewAutofeedSettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -260,6 +262,8 @@ type autofeedSettingsRESTClient struct { // Points back to the CallOptions field of the containing AutofeedSettingsClient CallOptions **AutofeedSettingsCallOptions + + logger *slog.Logger } // NewAutofeedSettingsRESTClient creates a new autofeed settings service rest client. @@ -278,6 +282,7 @@ func NewAutofeedSettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -330,7 +335,7 @@ func (c *autofeedSettingsGRPCClient) GetAutofeedSettings(ctx context.Context, re var resp *accountspb.AutofeedSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autofeedSettingsClient.GetAutofeedSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autofeedSettingsClient.GetAutofeedSettings, req, settings.GRPC, c.logger, "GetAutofeedSettings") return err }, opts...) if err != nil { @@ -348,7 +353,7 @@ func (c *autofeedSettingsGRPCClient) UpdateAutofeedSettings(ctx context.Context, var resp *accountspb.AutofeedSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.autofeedSettingsClient.UpdateAutofeedSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.autofeedSettingsClient.UpdateAutofeedSettings, req, settings.GRPC, c.logger, "UpdateAutofeedSettings") return err }, opts...) if err != nil { @@ -390,17 +395,7 @@ func (c *autofeedSettingsRESTClient) GetAutofeedSettings(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAutofeedSettings") if err != nil { return err } @@ -464,17 +459,7 @@ func (c *autofeedSettingsRESTClient) UpdateAutofeedSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAutofeedSettings") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/business_identity_client.go b/shopping/merchant/accounts/apiv1beta/business_identity_client.go index b814523986f3..c04f404acf75 100755 --- a/shopping/merchant/accounts/apiv1beta/business_identity_client.go +++ b/shopping/merchant/accounts/apiv1beta/business_identity_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -188,6 +187,8 @@ type businessIdentityGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBusinessIdentityClient creates a new business identity service client based on gRPC. @@ -215,6 +216,7 @@ func NewBusinessIdentityClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, businessIdentityClient: accountspb.NewBusinessIdentityServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -261,6 +263,8 @@ type businessIdentityRESTClient struct { // Points back to the CallOptions field of the containing BusinessIdentityClient CallOptions **BusinessIdentityCallOptions + + logger *slog.Logger } // NewBusinessIdentityRESTClient creates a new business identity service rest client. @@ -279,6 +283,7 @@ func NewBusinessIdentityRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -331,7 +336,7 @@ func (c *businessIdentityGRPCClient) GetBusinessIdentity(ctx context.Context, re var resp *accountspb.BusinessIdentity err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.businessIdentityClient.GetBusinessIdentity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.businessIdentityClient.GetBusinessIdentity, req, settings.GRPC, c.logger, "GetBusinessIdentity") return err }, opts...) if err != nil { @@ -349,7 +354,7 @@ func (c *businessIdentityGRPCClient) UpdateBusinessIdentity(ctx context.Context, var resp *accountspb.BusinessIdentity err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.businessIdentityClient.UpdateBusinessIdentity(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.businessIdentityClient.UpdateBusinessIdentity, req, settings.GRPC, c.logger, "UpdateBusinessIdentity") return err }, opts...) if err != nil { @@ -391,17 +396,7 @@ func (c *businessIdentityRESTClient) GetBusinessIdentity(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBusinessIdentity") if err != nil { return err } @@ -466,17 +461,7 @@ func (c *businessIdentityRESTClient) UpdateBusinessIdentity(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBusinessIdentity") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/business_info_client.go b/shopping/merchant/accounts/apiv1beta/business_info_client.go index 6837dc59cd62..5d56a4d564ce 100755 --- a/shopping/merchant/accounts/apiv1beta/business_info_client.go +++ b/shopping/merchant/accounts/apiv1beta/business_info_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -187,6 +186,8 @@ type businessInfoGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewBusinessInfoClient creates a new business info service client based on gRPC. @@ -213,6 +214,7 @@ func NewBusinessInfoClient(ctx context.Context, opts ...option.ClientOption) (*B connPool: connPool, businessInfoClient: accountspb.NewBusinessInfoServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -259,6 +261,8 @@ type businessInfoRESTClient struct { // Points back to the CallOptions field of the containing BusinessInfoClient CallOptions **BusinessInfoCallOptions + + logger *slog.Logger } // NewBusinessInfoRESTClient creates a new business info service rest client. @@ -276,6 +280,7 @@ func NewBusinessInfoRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -328,7 +333,7 @@ func (c *businessInfoGRPCClient) GetBusinessInfo(ctx context.Context, req *accou var resp *accountspb.BusinessInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.businessInfoClient.GetBusinessInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.businessInfoClient.GetBusinessInfo, req, settings.GRPC, c.logger, "GetBusinessInfo") return err }, opts...) if err != nil { @@ -346,7 +351,7 @@ func (c *businessInfoGRPCClient) UpdateBusinessInfo(ctx context.Context, req *ac var resp *accountspb.BusinessInfo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.businessInfoClient.UpdateBusinessInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.businessInfoClient.UpdateBusinessInfo, req, settings.GRPC, c.logger, "UpdateBusinessInfo") return err }, opts...) if err != nil { @@ -388,17 +393,7 @@ func (c *businessInfoRESTClient) GetBusinessInfo(ctx context.Context, req *accou httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBusinessInfo") if err != nil { return err } @@ -463,17 +458,7 @@ func (c *businessInfoRESTClient) UpdateBusinessInfo(ctx context.Context, req *ac httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBusinessInfo") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/email_preferences_client.go b/shopping/merchant/accounts/apiv1beta/email_preferences_client.go index a7cc21a1b9fd..9172d031dec9 100755 --- a/shopping/merchant/accounts/apiv1beta/email_preferences_client.go +++ b/shopping/merchant/accounts/apiv1beta/email_preferences_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -202,6 +201,8 @@ type emailPreferencesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEmailPreferencesClient creates a new email preferences service client based on gRPC. @@ -231,6 +232,7 @@ func NewEmailPreferencesClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, emailPreferencesClient: accountspb.NewEmailPreferencesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -277,6 +279,8 @@ type emailPreferencesRESTClient struct { // Points back to the CallOptions field of the containing EmailPreferencesClient CallOptions **EmailPreferencesCallOptions + + logger *slog.Logger } // NewEmailPreferencesRESTClient creates a new email preferences service rest client. @@ -297,6 +301,7 @@ func NewEmailPreferencesRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -349,7 +354,7 @@ func (c *emailPreferencesGRPCClient) GetEmailPreferences(ctx context.Context, re var resp *accountspb.EmailPreferences err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.emailPreferencesClient.GetEmailPreferences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.emailPreferencesClient.GetEmailPreferences, req, settings.GRPC, c.logger, "GetEmailPreferences") return err }, opts...) if err != nil { @@ -367,7 +372,7 @@ func (c *emailPreferencesGRPCClient) UpdateEmailPreferences(ctx context.Context, var resp *accountspb.EmailPreferences err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.emailPreferencesClient.UpdateEmailPreferences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.emailPreferencesClient.UpdateEmailPreferences, req, settings.GRPC, c.logger, "UpdateEmailPreferences") return err }, opts...) if err != nil { @@ -412,17 +417,7 @@ func (c *emailPreferencesRESTClient) GetEmailPreferences(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEmailPreferences") if err != nil { return err } @@ -496,17 +491,7 @@ func (c *emailPreferencesRESTClient) UpdateEmailPreferences(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEmailPreferences") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/helpers.go b/shopping/merchant/accounts/apiv1beta/helpers.go index 459ed3b1d21b..c0427eac31ff 100755 --- a/shopping/merchant/accounts/apiv1beta/helpers.go +++ b/shopping/merchant/accounts/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package accounts import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/accounts/apiv1beta/homepage_client.go b/shopping/merchant/accounts/apiv1beta/homepage_client.go index 116345007209..ee78ecbe2e3b 100755 --- a/shopping/merchant/accounts/apiv1beta/homepage_client.go +++ b/shopping/merchant/accounts/apiv1beta/homepage_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -259,6 +258,8 @@ type homepageGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewHomepageClient creates a new homepage service client based on gRPC. @@ -285,6 +286,7 @@ func NewHomepageClient(ctx context.Context, opts ...option.ClientOption) (*Homep connPool: connPool, homepageClient: accountspb.NewHomepageServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -331,6 +333,8 @@ type homepageRESTClient struct { // Points back to the CallOptions field of the containing HomepageClient CallOptions **HomepageCallOptions + + logger *slog.Logger } // NewHomepageRESTClient creates a new homepage service rest client. @@ -348,6 +352,7 @@ func NewHomepageRESTClient(ctx context.Context, opts ...option.ClientOption) (*H endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -400,7 +405,7 @@ func (c *homepageGRPCClient) GetHomepage(ctx context.Context, req *accountspb.Ge var resp *accountspb.Homepage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.homepageClient.GetHomepage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.homepageClient.GetHomepage, req, settings.GRPC, c.logger, "GetHomepage") return err }, opts...) if err != nil { @@ -418,7 +423,7 @@ func (c *homepageGRPCClient) UpdateHomepage(ctx context.Context, req *accountspb var resp *accountspb.Homepage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.homepageClient.UpdateHomepage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.homepageClient.UpdateHomepage, req, settings.GRPC, c.logger, "UpdateHomepage") return err }, opts...) if err != nil { @@ -436,7 +441,7 @@ func (c *homepageGRPCClient) ClaimHomepage(ctx context.Context, req *accountspb. var resp *accountspb.Homepage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.homepageClient.ClaimHomepage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.homepageClient.ClaimHomepage, req, settings.GRPC, c.logger, "ClaimHomepage") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *homepageGRPCClient) UnclaimHomepage(ctx context.Context, req *accountsp var resp *accountspb.Homepage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.homepageClient.UnclaimHomepage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.homepageClient.UnclaimHomepage, req, settings.GRPC, c.logger, "UnclaimHomepage") return err }, opts...) if err != nil { @@ -496,17 +501,7 @@ func (c *homepageRESTClient) GetHomepage(ctx context.Context, req *accountspb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHomepage") if err != nil { return err } @@ -570,17 +565,7 @@ func (c *homepageRESTClient) UpdateHomepage(ctx context.Context, req *accountspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateHomepage") if err != nil { return err } @@ -649,17 +634,7 @@ func (c *homepageRESTClient) ClaimHomepage(ctx context.Context, req *accountspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClaimHomepage") if err != nil { return err } @@ -715,17 +690,7 @@ func (c *homepageRESTClient) UnclaimHomepage(ctx context.Context, req *accountsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnclaimHomepage") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/online_return_policy_client.go b/shopping/merchant/accounts/apiv1beta/online_return_policy_client.go index 4d63c50f6047..fee1cf09f729 100755 --- a/shopping/merchant/accounts/apiv1beta/online_return_policy_client.go +++ b/shopping/merchant/accounts/apiv1beta/online_return_policy_client.go @@ -19,7 +19,7 @@ package accounts import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -190,6 +189,8 @@ type onlineReturnPolicyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOnlineReturnPolicyClient creates a new online return policy service client based on gRPC. @@ -219,6 +220,7 @@ func NewOnlineReturnPolicyClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, onlineReturnPolicyClient: accountspb.NewOnlineReturnPolicyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -265,6 +267,8 @@ type onlineReturnPolicyRESTClient struct { // Points back to the CallOptions field of the containing OnlineReturnPolicyClient CallOptions **OnlineReturnPolicyCallOptions + + logger *slog.Logger } // NewOnlineReturnPolicyRESTClient creates a new online return policy service rest client. @@ -285,6 +289,7 @@ func NewOnlineReturnPolicyRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -337,7 +342,7 @@ func (c *onlineReturnPolicyGRPCClient) GetOnlineReturnPolicy(ctx context.Context var resp *accountspb.OnlineReturnPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.onlineReturnPolicyClient.GetOnlineReturnPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.onlineReturnPolicyClient.GetOnlineReturnPolicy, req, settings.GRPC, c.logger, "GetOnlineReturnPolicy") return err }, opts...) if err != nil { @@ -366,7 +371,7 @@ func (c *onlineReturnPolicyGRPCClient) ListOnlineReturnPolicies(ctx context.Cont } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.onlineReturnPolicyClient.ListOnlineReturnPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.onlineReturnPolicyClient.ListOnlineReturnPolicies, req, settings.GRPC, c.logger, "ListOnlineReturnPolicies") return err }, opts...) if err != nil { @@ -425,17 +430,7 @@ func (c *onlineReturnPolicyRESTClient) GetOnlineReturnPolicy(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOnlineReturnPolicy") if err != nil { return err } @@ -497,21 +492,10 @@ func (c *onlineReturnPolicyRESTClient) ListOnlineReturnPolicies(ctx context.Cont } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOnlineReturnPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/online_return_policy_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/online_return_policy_client_example_go123_test.go index 79cb94661cc1..179c610a9643 100644 --- a/shopping/merchant/accounts/apiv1beta/online_return_policy_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/online_return_policy_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleOnlineReturnPolicyClient_ListOnlineReturnPolicies_all() { } for resp, err := range c.ListOnlineReturnPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/programs_client.go b/shopping/merchant/accounts/apiv1beta/programs_client.go index fea767fd1270..67cd06397545 100755 --- a/shopping/merchant/accounts/apiv1beta/programs_client.go +++ b/shopping/merchant/accounts/apiv1beta/programs_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -260,6 +259,8 @@ type programsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProgramsClient creates a new programs service client based on gRPC. @@ -296,6 +297,7 @@ func NewProgramsClient(ctx context.Context, opts ...option.ClientOption) (*Progr connPool: connPool, programsClient: accountspb.NewProgramsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -342,6 +344,8 @@ type programsRESTClient struct { // Points back to the CallOptions field of the containing ProgramsClient CallOptions **ProgramsCallOptions + + logger *slog.Logger } // NewProgramsRESTClient creates a new programs service rest client. @@ -369,6 +373,7 @@ func NewProgramsRESTClient(ctx context.Context, opts ...option.ClientOption) (*P endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -421,7 +426,7 @@ func (c *programsGRPCClient) GetProgram(ctx context.Context, req *accountspb.Get var resp *accountspb.Program err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.programsClient.GetProgram(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.programsClient.GetProgram, req, settings.GRPC, c.logger, "GetProgram") return err }, opts...) if err != nil { @@ -450,7 +455,7 @@ func (c *programsGRPCClient) ListPrograms(ctx context.Context, req *accountspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.programsClient.ListPrograms(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.programsClient.ListPrograms, req, settings.GRPC, c.logger, "ListPrograms") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *programsGRPCClient) EnableProgram(ctx context.Context, req *accountspb. var resp *accountspb.Program err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.programsClient.EnableProgram(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.programsClient.EnableProgram, req, settings.GRPC, c.logger, "EnableProgram") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *programsGRPCClient) DisableProgram(ctx context.Context, req *accountspb var resp *accountspb.Program err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.programsClient.DisableProgram(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.programsClient.DisableProgram, req, settings.GRPC, c.logger, "DisableProgram") return err }, opts...) if err != nil { @@ -545,17 +550,7 @@ func (c *programsRESTClient) GetProgram(ctx context.Context, req *accountspb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProgram") if err != nil { return err } @@ -617,21 +612,10 @@ func (c *programsRESTClient) ListPrograms(ctx context.Context, req *accountspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrograms") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -701,17 +685,7 @@ func (c *programsRESTClient) EnableProgram(ctx context.Context, req *accountspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EnableProgram") if err != nil { return err } @@ -768,17 +742,7 @@ func (c *programsRESTClient) DisableProgram(ctx context.Context, req *accountspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DisableProgram") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/programs_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/programs_client_example_go123_test.go index 571bea0f265a..9a7612f19886 100644 --- a/shopping/merchant/accounts/apiv1beta/programs_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/programs_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProgramsClient_ListPrograms_all() { } for resp, err := range c.ListPrograms(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/regions_client.go b/shopping/merchant/accounts/apiv1beta/regions_client.go index d34b838538f2..00b9fef158e4 100755 --- a/shopping/merchant/accounts/apiv1beta/regions_client.go +++ b/shopping/merchant/accounts/apiv1beta/regions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -285,6 +284,8 @@ type regionsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRegionsClient creates a new regions service client based on gRPC. @@ -315,6 +316,7 @@ func NewRegionsClient(ctx context.Context, opts ...option.ClientOption) (*Region connPool: connPool, regionsClient: accountspb.NewRegionsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -361,6 +363,8 @@ type regionsRESTClient struct { // Points back to the CallOptions field of the containing RegionsClient CallOptions **RegionsCallOptions + + logger *slog.Logger } // NewRegionsRESTClient creates a new regions service rest client. @@ -382,6 +386,7 @@ func NewRegionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*Re endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -434,7 +439,7 @@ func (c *regionsGRPCClient) GetRegion(ctx context.Context, req *accountspb.GetRe var resp *accountspb.Region err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionsClient.GetRegion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionsClient.GetRegion, req, settings.GRPC, c.logger, "GetRegion") return err }, opts...) if err != nil { @@ -452,7 +457,7 @@ func (c *regionsGRPCClient) CreateRegion(ctx context.Context, req *accountspb.Cr var resp *accountspb.Region err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionsClient.CreateRegion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionsClient.CreateRegion, req, settings.GRPC, c.logger, "CreateRegion") return err }, opts...) if err != nil { @@ -470,7 +475,7 @@ func (c *regionsGRPCClient) UpdateRegion(ctx context.Context, req *accountspb.Up var resp *accountspb.Region err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionsClient.UpdateRegion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionsClient.UpdateRegion, req, settings.GRPC, c.logger, "UpdateRegion") return err }, opts...) if err != nil { @@ -487,7 +492,7 @@ func (c *regionsGRPCClient) DeleteRegion(ctx context.Context, req *accountspb.De opts = append((*c.CallOptions).DeleteRegion[0:len((*c.CallOptions).DeleteRegion):len((*c.CallOptions).DeleteRegion)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.regionsClient.DeleteRegion(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.regionsClient.DeleteRegion, req, settings.GRPC, c.logger, "DeleteRegion") return err }, opts...) return err @@ -513,7 +518,7 @@ func (c *regionsGRPCClient) ListRegions(ctx context.Context, req *accountspb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionsClient.ListRegions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionsClient.ListRegions, req, settings.GRPC, c.logger, "ListRegions") return err }, opts...) if err != nil { @@ -572,17 +577,7 @@ func (c *regionsRESTClient) GetRegion(ctx context.Context, req *accountspb.GetRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRegion") if err != nil { return err } @@ -641,17 +636,7 @@ func (c *regionsRESTClient) CreateRegion(ctx context.Context, req *accountspb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRegion") if err != nil { return err } @@ -716,17 +701,7 @@ func (c *regionsRESTClient) UpdateRegion(ctx context.Context, req *accountspb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRegion") if err != nil { return err } @@ -774,15 +749,8 @@ func (c *regionsRESTClient) DeleteRegion(ctx context.Context, req *accountspb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRegion") + return err }, opts...) } @@ -831,21 +799,10 @@ func (c *regionsRESTClient) ListRegions(ctx context.Context, req *accountspb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRegions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/regions_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/regions_client_example_go123_test.go index 3b4a1447ec72..64d6e5297b0e 100644 --- a/shopping/merchant/accounts/apiv1beta/regions_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/regions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionsClient_ListRegions_all() { } for resp, err := range c.ListRegions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/accounts/apiv1beta/shipping_settings_client.go b/shopping/merchant/accounts/apiv1beta/shipping_settings_client.go index eed68a43bf4b..80298decbc11 100755 --- a/shopping/merchant/accounts/apiv1beta/shipping_settings_client.go +++ b/shopping/merchant/accounts/apiv1beta/shipping_settings_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -144,6 +143,8 @@ type shippingSettingsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewShippingSettingsClient creates a new shipping settings service client based on gRPC. @@ -171,6 +172,7 @@ func NewShippingSettingsClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, shippingSettingsClient: accountspb.NewShippingSettingsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -217,6 +219,8 @@ type shippingSettingsRESTClient struct { // Points back to the CallOptions field of the containing ShippingSettingsClient CallOptions **ShippingSettingsCallOptions + + logger *slog.Logger } // NewShippingSettingsRESTClient creates a new shipping settings service rest client. @@ -235,6 +239,7 @@ func NewShippingSettingsRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -287,7 +292,7 @@ func (c *shippingSettingsGRPCClient) GetShippingSettings(ctx context.Context, re var resp *accountspb.ShippingSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.shippingSettingsClient.GetShippingSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.shippingSettingsClient.GetShippingSettings, req, settings.GRPC, c.logger, "GetShippingSettings") return err }, opts...) if err != nil { @@ -305,7 +310,7 @@ func (c *shippingSettingsGRPCClient) InsertShippingSettings(ctx context.Context, var resp *accountspb.ShippingSettings err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.shippingSettingsClient.InsertShippingSettings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.shippingSettingsClient.InsertShippingSettings, req, settings.GRPC, c.logger, "InsertShippingSettings") return err }, opts...) if err != nil { @@ -347,17 +352,7 @@ func (c *shippingSettingsRESTClient) GetShippingSettings(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetShippingSettings") if err != nil { return err } @@ -415,17 +410,7 @@ func (c *shippingSettingsRESTClient) InsertShippingSettings(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertShippingSettings") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/terms_of_service_agreement_state_client.go b/shopping/merchant/accounts/apiv1beta/terms_of_service_agreement_state_client.go index 3eff14f11c52..73dd02bcd90c 100755 --- a/shopping/merchant/accounts/apiv1beta/terms_of_service_agreement_state_client.go +++ b/shopping/merchant/accounts/apiv1beta/terms_of_service_agreement_state_client.go @@ -19,7 +19,7 @@ package accounts import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -185,6 +184,8 @@ type termsOfServiceAgreementStateGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTermsOfServiceAgreementStateClient creates a new terms of service agreement state service client based on gRPC. @@ -211,6 +212,7 @@ func NewTermsOfServiceAgreementStateClient(ctx context.Context, opts ...option.C connPool: connPool, termsOfServiceAgreementStateClient: accountspb.NewTermsOfServiceAgreementStateServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -257,6 +259,8 @@ type termsOfServiceAgreementStateRESTClient struct { // Points back to the CallOptions field of the containing TermsOfServiceAgreementStateClient CallOptions **TermsOfServiceAgreementStateCallOptions + + logger *slog.Logger } // NewTermsOfServiceAgreementStateRESTClient creates a new terms of service agreement state service rest client. @@ -274,6 +278,7 @@ func NewTermsOfServiceAgreementStateRESTClient(ctx context.Context, opts ...opti endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -326,7 +331,7 @@ func (c *termsOfServiceAgreementStateGRPCClient) GetTermsOfServiceAgreementState var resp *accountspb.TermsOfServiceAgreementState err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.termsOfServiceAgreementStateClient.GetTermsOfServiceAgreementState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.termsOfServiceAgreementStateClient.GetTermsOfServiceAgreementState, req, settings.GRPC, c.logger, "GetTermsOfServiceAgreementState") return err }, opts...) if err != nil { @@ -344,7 +349,7 @@ func (c *termsOfServiceAgreementStateGRPCClient) RetrieveForApplicationTermsOfSe var resp *accountspb.TermsOfServiceAgreementState err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.termsOfServiceAgreementStateClient.RetrieveForApplicationTermsOfServiceAgreementState(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.termsOfServiceAgreementStateClient.RetrieveForApplicationTermsOfServiceAgreementState, req, settings.GRPC, c.logger, "RetrieveForApplicationTermsOfServiceAgreementState") return err }, opts...) if err != nil { @@ -386,17 +391,7 @@ func (c *termsOfServiceAgreementStateRESTClient) GetTermsOfServiceAgreementState httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTermsOfServiceAgreementState") if err != nil { return err } @@ -446,17 +441,7 @@ func (c *termsOfServiceAgreementStateRESTClient) RetrieveForApplicationTermsOfSe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveForApplicationTermsOfServiceAgreementState") if err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/terms_of_service_client.go b/shopping/merchant/accounts/apiv1beta/terms_of_service_client.go index 6970fd950e63..246e1fae1fd1 100755 --- a/shopping/merchant/accounts/apiv1beta/terms_of_service_client.go +++ b/shopping/merchant/accounts/apiv1beta/terms_of_service_client.go @@ -19,7 +19,7 @@ package accounts import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -216,6 +215,8 @@ type termsOfServiceGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTermsOfServiceClient creates a new terms of service service client based on gRPC. @@ -242,6 +243,7 @@ func NewTermsOfServiceClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, termsOfServiceClient: accountspb.NewTermsOfServiceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -288,6 +290,8 @@ type termsOfServiceRESTClient struct { // Points back to the CallOptions field of the containing TermsOfServiceClient CallOptions **TermsOfServiceCallOptions + + logger *slog.Logger } // NewTermsOfServiceRESTClient creates a new terms of service service rest client. @@ -305,6 +309,7 @@ func NewTermsOfServiceRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -357,7 +362,7 @@ func (c *termsOfServiceGRPCClient) GetTermsOfService(ctx context.Context, req *a var resp *accountspb.TermsOfService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.termsOfServiceClient.GetTermsOfService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.termsOfServiceClient.GetTermsOfService, req, settings.GRPC, c.logger, "GetTermsOfService") return err }, opts...) if err != nil { @@ -372,7 +377,7 @@ func (c *termsOfServiceGRPCClient) RetrieveLatestTermsOfService(ctx context.Cont var resp *accountspb.TermsOfService err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.termsOfServiceClient.RetrieveLatestTermsOfService(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.termsOfServiceClient.RetrieveLatestTermsOfService, req, settings.GRPC, c.logger, "RetrieveLatestTermsOfService") return err }, opts...) if err != nil { @@ -389,7 +394,7 @@ func (c *termsOfServiceGRPCClient) AcceptTermsOfService(ctx context.Context, req opts = append((*c.CallOptions).AcceptTermsOfService[0:len((*c.CallOptions).AcceptTermsOfService):len((*c.CallOptions).AcceptTermsOfService)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.termsOfServiceClient.AcceptTermsOfService(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.termsOfServiceClient.AcceptTermsOfService, req, settings.GRPC, c.logger, "AcceptTermsOfService") return err }, opts...) return err @@ -428,17 +433,7 @@ func (c *termsOfServiceRESTClient) GetTermsOfService(ctx context.Context, req *a httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTermsOfService") if err != nil { return err } @@ -488,17 +483,7 @@ func (c *termsOfServiceRESTClient) RetrieveLatestTermsOfService(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "RetrieveLatestTermsOfService") if err != nil { return err } @@ -547,14 +532,7 @@ func (c *termsOfServiceRESTClient) AcceptTermsOfService(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "AcceptTermsOfService") + return err }, opts...) } diff --git a/shopping/merchant/accounts/apiv1beta/user_client.go b/shopping/merchant/accounts/apiv1beta/user_client.go index 3c806d811182..428c7f873e01 100755 --- a/shopping/merchant/accounts/apiv1beta/user_client.go +++ b/shopping/merchant/accounts/apiv1beta/user_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -281,6 +280,8 @@ type userGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewUserClient creates a new user service client based on gRPC. @@ -307,6 +308,7 @@ func NewUserClient(ctx context.Context, opts ...option.ClientOption) (*UserClien connPool: connPool, userClient: accountspb.NewUserServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -353,6 +355,8 @@ type userRESTClient struct { // Points back to the CallOptions field of the containing UserClient CallOptions **UserCallOptions + + logger *slog.Logger } // NewUserRESTClient creates a new user service rest client. @@ -370,6 +374,7 @@ func NewUserRESTClient(ctx context.Context, opts ...option.ClientOption) (*UserC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -422,7 +427,7 @@ func (c *userGRPCClient) GetUser(ctx context.Context, req *accountspb.GetUserReq var resp *accountspb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userClient.GetUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userClient.GetUser, req, settings.GRPC, c.logger, "GetUser") return err }, opts...) if err != nil { @@ -440,7 +445,7 @@ func (c *userGRPCClient) CreateUser(ctx context.Context, req *accountspb.CreateU var resp *accountspb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userClient.CreateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userClient.CreateUser, req, settings.GRPC, c.logger, "CreateUser") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *userGRPCClient) DeleteUser(ctx context.Context, req *accountspb.DeleteU opts = append((*c.CallOptions).DeleteUser[0:len((*c.CallOptions).DeleteUser):len((*c.CallOptions).DeleteUser)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.userClient.DeleteUser(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.userClient.DeleteUser, req, settings.GRPC, c.logger, "DeleteUser") return err }, opts...) return err @@ -472,7 +477,7 @@ func (c *userGRPCClient) UpdateUser(ctx context.Context, req *accountspb.UpdateU var resp *accountspb.User err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userClient.UpdateUser(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userClient.UpdateUser, req, settings.GRPC, c.logger, "UpdateUser") return err }, opts...) if err != nil { @@ -501,7 +506,7 @@ func (c *userGRPCClient) ListUsers(ctx context.Context, req *accountspb.ListUser } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.userClient.ListUsers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.userClient.ListUsers, req, settings.GRPC, c.logger, "ListUsers") return err }, opts...) if err != nil { @@ -560,17 +565,7 @@ func (c *userRESTClient) GetUser(ctx context.Context, req *accountspb.GetUserReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUser") if err != nil { return err } @@ -629,17 +624,7 @@ func (c *userRESTClient) CreateUser(ctx context.Context, req *accountspb.CreateU httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUser") if err != nil { return err } @@ -687,15 +672,8 @@ func (c *userRESTClient) DeleteUser(ctx context.Context, req *accountspb.DeleteU httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUser") + return err }, opts...) } @@ -747,17 +725,7 @@ func (c *userRESTClient) UpdateUser(ctx context.Context, req *accountspb.UpdateU httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateUser") if err != nil { return err } @@ -819,21 +787,10 @@ func (c *userRESTClient) ListUsers(ctx context.Context, req *accountspb.ListUser } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/accounts/apiv1beta/user_client_example_go123_test.go b/shopping/merchant/accounts/apiv1beta/user_client_example_go123_test.go index 8e643ccdbd33..5fae5d29f40e 100644 --- a/shopping/merchant/accounts/apiv1beta/user_client_example_go123_test.go +++ b/shopping/merchant/accounts/apiv1beta/user_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleUserClient_ListUsers_all() { } for resp, err := range c.ListUsers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/conversions/apiv1beta/conversion_sources_client.go b/shopping/merchant/conversions/apiv1beta/conversion_sources_client.go index 0cc6b1f814f9..a6e379d33d88 100755 --- a/shopping/merchant/conversions/apiv1beta/conversion_sources_client.go +++ b/shopping/merchant/conversions/apiv1beta/conversion_sources_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( conversionspb "cloud.google.com/go/shopping/merchant/conversions/apiv1beta/conversionspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -313,6 +312,8 @@ type conversionSourcesGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewConversionSourcesClient creates a new conversion sources service client based on gRPC. @@ -339,6 +340,7 @@ func NewConversionSourcesClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, conversionSourcesClient: conversionspb.NewConversionSourcesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -385,6 +387,8 @@ type conversionSourcesRESTClient struct { // Points back to the CallOptions field of the containing ConversionSourcesClient CallOptions **ConversionSourcesCallOptions + + logger *slog.Logger } // NewConversionSourcesRESTClient creates a new conversion sources service rest client. @@ -402,6 +406,7 @@ func NewConversionSourcesRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -454,7 +459,7 @@ func (c *conversionSourcesGRPCClient) CreateConversionSource(ctx context.Context var resp *conversionspb.ConversionSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversionSourcesClient.CreateConversionSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversionSourcesClient.CreateConversionSource, req, settings.GRPC, c.logger, "CreateConversionSource") return err }, opts...) if err != nil { @@ -472,7 +477,7 @@ func (c *conversionSourcesGRPCClient) UpdateConversionSource(ctx context.Context var resp *conversionspb.ConversionSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversionSourcesClient.UpdateConversionSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversionSourcesClient.UpdateConversionSource, req, settings.GRPC, c.logger, "UpdateConversionSource") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *conversionSourcesGRPCClient) DeleteConversionSource(ctx context.Context opts = append((*c.CallOptions).DeleteConversionSource[0:len((*c.CallOptions).DeleteConversionSource):len((*c.CallOptions).DeleteConversionSource)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.conversionSourcesClient.DeleteConversionSource(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.conversionSourcesClient.DeleteConversionSource, req, settings.GRPC, c.logger, "DeleteConversionSource") return err }, opts...) return err @@ -504,7 +509,7 @@ func (c *conversionSourcesGRPCClient) UndeleteConversionSource(ctx context.Conte var resp *conversionspb.ConversionSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversionSourcesClient.UndeleteConversionSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversionSourcesClient.UndeleteConversionSource, req, settings.GRPC, c.logger, "UndeleteConversionSource") return err }, opts...) if err != nil { @@ -522,7 +527,7 @@ func (c *conversionSourcesGRPCClient) GetConversionSource(ctx context.Context, r var resp *conversionspb.ConversionSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversionSourcesClient.GetConversionSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversionSourcesClient.GetConversionSource, req, settings.GRPC, c.logger, "GetConversionSource") return err }, opts...) if err != nil { @@ -551,7 +556,7 @@ func (c *conversionSourcesGRPCClient) ListConversionSources(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.conversionSourcesClient.ListConversionSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.conversionSourcesClient.ListConversionSources, req, settings.GRPC, c.logger, "ListConversionSources") return err }, opts...) if err != nil { @@ -617,17 +622,7 @@ func (c *conversionSourcesRESTClient) CreateConversionSource(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConversionSource") if err != nil { return err } @@ -692,17 +687,7 @@ func (c *conversionSourcesRESTClient) UpdateConversionSource(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConversionSource") if err != nil { return err } @@ -752,15 +737,8 @@ func (c *conversionSourcesRESTClient) DeleteConversionSource(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConversionSource") + return err }, opts...) } @@ -804,17 +782,7 @@ func (c *conversionSourcesRESTClient) UndeleteConversionSource(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteConversionSource") if err != nil { return err } @@ -864,17 +832,7 @@ func (c *conversionSourcesRESTClient) GetConversionSource(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConversionSource") if err != nil { return err } @@ -939,21 +897,10 @@ func (c *conversionSourcesRESTClient) ListConversionSources(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConversionSources") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/conversions/apiv1beta/conversion_sources_client_example_go123_test.go b/shopping/merchant/conversions/apiv1beta/conversion_sources_client_example_go123_test.go index bef92420c7e2..0f5638d47278 100644 --- a/shopping/merchant/conversions/apiv1beta/conversion_sources_client_example_go123_test.go +++ b/shopping/merchant/conversions/apiv1beta/conversion_sources_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleConversionSourcesClient_ListConversionSources_all() { } for resp, err := range c.ListConversionSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/conversions/apiv1beta/conversionspb/conversionsources.pb.go b/shopping/merchant/conversions/apiv1beta/conversionspb/conversionsources.pb.go index ab371b314f0b..abb1a6f36985 100755 --- a/shopping/merchant/conversions/apiv1beta/conversionspb/conversionsources.pb.go +++ b/shopping/merchant/conversions/apiv1beta/conversionspb/conversionsources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/conversions/v1beta/conversionsources.proto @@ -265,11 +265,9 @@ type ConversionSource struct { func (x *ConversionSource) Reset() { *x = ConversionSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConversionSource) String() string { @@ -280,7 +278,7 @@ func (*ConversionSource) ProtoMessage() {} func (x *ConversionSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -382,11 +380,9 @@ type AttributionSettings struct { func (x *AttributionSettings) Reset() { *x = AttributionSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSettings) String() string { @@ -397,7 +393,7 @@ func (*AttributionSettings) ProtoMessage() {} func (x *AttributionSettings) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +448,9 @@ type GoogleAnalyticsLink struct { func (x *GoogleAnalyticsLink) Reset() { *x = GoogleAnalyticsLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleAnalyticsLink) String() string { @@ -467,7 +461,7 @@ func (*GoogleAnalyticsLink) ProtoMessage() {} func (x *GoogleAnalyticsLink) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +522,9 @@ type MerchantCenterDestination struct { func (x *MerchantCenterDestination) Reset() { *x = MerchantCenterDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerchantCenterDestination) String() string { @@ -543,7 +535,7 @@ func (*MerchantCenterDestination) ProtoMessage() {} func (x *MerchantCenterDestination) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +594,9 @@ type CreateConversionSourceRequest struct { func (x *CreateConversionSourceRequest) Reset() { *x = CreateConversionSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConversionSourceRequest) String() string { @@ -617,7 +607,7 @@ func (*CreateConversionSourceRequest) ProtoMessage() {} func (x *CreateConversionSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -661,11 +651,9 @@ type UpdateConversionSourceRequest struct { func (x *UpdateConversionSourceRequest) Reset() { *x = UpdateConversionSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConversionSourceRequest) String() string { @@ -676,7 +664,7 @@ func (*UpdateConversionSourceRequest) ProtoMessage() {} func (x *UpdateConversionSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +706,9 @@ type DeleteConversionSourceRequest struct { func (x *DeleteConversionSourceRequest) Reset() { *x = DeleteConversionSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConversionSourceRequest) String() string { @@ -733,7 +719,7 @@ func (*DeleteConversionSourceRequest) ProtoMessage() {} func (x *DeleteConversionSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +754,9 @@ type UndeleteConversionSourceRequest struct { func (x *UndeleteConversionSourceRequest) Reset() { *x = UndeleteConversionSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteConversionSourceRequest) String() string { @@ -783,7 +767,7 @@ func (*UndeleteConversionSourceRequest) ProtoMessage() {} func (x *UndeleteConversionSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,11 +802,9 @@ type GetConversionSourceRequest struct { func (x *GetConversionSourceRequest) Reset() { *x = GetConversionSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConversionSourceRequest) String() string { @@ -833,7 +815,7 @@ func (*GetConversionSourceRequest) ProtoMessage() {} func (x *GetConversionSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -878,11 +860,9 @@ type ListConversionSourcesRequest struct { func (x *ListConversionSourcesRequest) Reset() { *x = ListConversionSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionSourcesRequest) String() string { @@ -893,7 +873,7 @@ func (*ListConversionSourcesRequest) ProtoMessage() {} func (x *ListConversionSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +930,9 @@ type ListConversionSourcesResponse struct { func (x *ListConversionSourcesResponse) Reset() { *x = ListConversionSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConversionSourcesResponse) String() string { @@ -965,7 +943,7 @@ func (*ListConversionSourcesResponse) ProtoMessage() {} func (x *ListConversionSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +987,9 @@ type AttributionSettings_ConversionType struct { func (x *AttributionSettings_ConversionType) Reset() { *x = AttributionSettings_ConversionType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributionSettings_ConversionType) String() string { @@ -1024,7 +1000,7 @@ func (*AttributionSettings_ConversionType) ProtoMessage() {} func (x *AttributionSettings_ConversionType) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1470,152 +1446,6 @@ func file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_in if File_google_shopping_merchant_conversions_v1beta_conversionsources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ConversionSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GoogleAnalyticsLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MerchantCenterDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateConversionSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConversionSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConversionSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteConversionSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetConversionSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListConversionSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AttributionSettings_ConversionType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_conversions_v1beta_conversionsources_proto_msgTypes[0].OneofWrappers = []any{ (*ConversionSource_GoogleAnalyticsLink)(nil), (*ConversionSource_MerchantCenterDestination)(nil), diff --git a/shopping/merchant/conversions/apiv1beta/helpers.go b/shopping/merchant/conversions/apiv1beta/helpers.go index 92e66d1f1798..1b9cb66bacfe 100755 --- a/shopping/merchant/conversions/apiv1beta/helpers.go +++ b/shopping/merchant/conversions/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package conversions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/datasources/apiv1beta/data_sources_client.go b/shopping/merchant/datasources/apiv1beta/data_sources_client.go index 67f56f07dd3b..63a1ccc1c5e0 100755 --- a/shopping/merchant/datasources/apiv1beta/data_sources_client.go +++ b/shopping/merchant/datasources/apiv1beta/data_sources_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( datasourcespb "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -315,6 +314,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new data sources service client based on gRPC. @@ -343,6 +344,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: datasourcespb.NewDataSourcesServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -389,6 +391,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new data sources service rest client. @@ -408,6 +412,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -460,7 +465,7 @@ func (c *gRPCClient) GetDataSource(ctx context.Context, req *datasourcespb.GetDa var resp *datasourcespb.DataSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDataSource, req, settings.GRPC, c.logger, "GetDataSource") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *gRPCClient) ListDataSources(ctx context.Context, req *datasourcespb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDataSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDataSources, req, settings.GRPC, c.logger, "ListDataSources") return err }, opts...) if err != nil { @@ -524,7 +529,7 @@ func (c *gRPCClient) CreateDataSource(ctx context.Context, req *datasourcespb.Cr var resp *datasourcespb.DataSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDataSource, req, settings.GRPC, c.logger, "CreateDataSource") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *gRPCClient) UpdateDataSource(ctx context.Context, req *datasourcespb.Up var resp *datasourcespb.DataSource err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDataSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDataSource, req, settings.GRPC, c.logger, "UpdateDataSource") return err }, opts...) if err != nil { @@ -559,7 +564,7 @@ func (c *gRPCClient) DeleteDataSource(ctx context.Context, req *datasourcespb.De opts = append((*c.CallOptions).DeleteDataSource[0:len((*c.CallOptions).DeleteDataSource):len((*c.CallOptions).DeleteDataSource)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteDataSource(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteDataSource, req, settings.GRPC, c.logger, "DeleteDataSource") return err }, opts...) return err @@ -573,7 +578,7 @@ func (c *gRPCClient) FetchDataSource(ctx context.Context, req *datasourcespb.Fet opts = append((*c.CallOptions).FetchDataSource[0:len((*c.CallOptions).FetchDataSource):len((*c.CallOptions).FetchDataSource)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.FetchDataSource(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.FetchDataSource, req, settings.GRPC, c.logger, "FetchDataSource") return err }, opts...) return err @@ -612,17 +617,7 @@ func (c *restClient) GetDataSource(ctx context.Context, req *datasourcespb.GetDa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataSource") if err != nil { return err } @@ -684,21 +679,10 @@ func (c *restClient) ListDataSources(ctx context.Context, req *datasourcespb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataSources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -768,17 +752,7 @@ func (c *restClient) CreateDataSource(ctx context.Context, req *datasourcespb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataSource") if err != nil { return err } @@ -843,17 +817,7 @@ func (c *restClient) UpdateDataSource(ctx context.Context, req *datasourcespb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataSource") if err != nil { return err } @@ -900,15 +864,8 @@ func (c *restClient) DeleteDataSource(ctx context.Context, req *datasourcespb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataSource") + return err }, opts...) } @@ -952,14 +909,7 @@ func (c *restClient) FetchDataSource(ctx context.Context, req *datasourcespb.Fet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FetchDataSource") + return err }, opts...) } diff --git a/shopping/merchant/datasources/apiv1beta/data_sources_client_example_go123_test.go b/shopping/merchant/datasources/apiv1beta/data_sources_client_example_go123_test.go index 810020a31401..f5036869ca91 100644 --- a/shopping/merchant/datasources/apiv1beta/data_sources_client_example_go123_test.go +++ b/shopping/merchant/datasources/apiv1beta/data_sources_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListDataSources_all() { } for resp, err := range c.ListDataSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/datasources/apiv1beta/datasourcespb/datasources.pb.go b/shopping/merchant/datasources/apiv1beta/datasourcespb/datasources.pb.go index 0595c17a1686..73f49b328a94 100755 --- a/shopping/merchant/datasources/apiv1beta/datasourcespb/datasources.pb.go +++ b/shopping/merchant/datasources/apiv1beta/datasourcespb/datasources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/datasources/v1beta/datasources.proto @@ -149,11 +149,9 @@ type DataSource struct { func (x *DataSource) Reset() { *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSource) String() string { @@ -164,7 +162,7 @@ func (*DataSource) ProtoMessage() {} func (x *DataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +316,9 @@ type GetDataSourceRequest struct { func (x *GetDataSourceRequest) Reset() { *x = GetDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataSourceRequest) String() string { @@ -333,7 +329,7 @@ func (*GetDataSourceRequest) ProtoMessage() {} func (x *GetDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -379,11 +375,9 @@ type ListDataSourcesRequest struct { func (x *ListDataSourcesRequest) Reset() { *x = ListDataSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesRequest) String() string { @@ -394,7 +388,7 @@ func (*ListDataSourcesRequest) ProtoMessage() {} func (x *ListDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +439,9 @@ type ListDataSourcesResponse struct { func (x *ListDataSourcesResponse) Reset() { *x = ListDataSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSourcesResponse) String() string { @@ -460,7 +452,7 @@ func (*ListDataSourcesResponse) ProtoMessage() {} func (x *ListDataSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +496,9 @@ type CreateDataSourceRequest struct { func (x *CreateDataSourceRequest) Reset() { *x = CreateDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataSourceRequest) String() string { @@ -519,7 +509,7 @@ func (*CreateDataSourceRequest) ProtoMessage() {} func (x *CreateDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -568,11 +558,9 @@ type UpdateDataSourceRequest struct { func (x *UpdateDataSourceRequest) Reset() { *x = UpdateDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataSourceRequest) String() string { @@ -583,7 +571,7 @@ func (*UpdateDataSourceRequest) ProtoMessage() {} func (x *UpdateDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,11 +613,9 @@ type FetchDataSourceRequest struct { func (x *FetchDataSourceRequest) Reset() { *x = FetchDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchDataSourceRequest) String() string { @@ -640,7 +626,7 @@ func (*FetchDataSourceRequest) ProtoMessage() {} func (x *FetchDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -675,11 +661,9 @@ type DeleteDataSourceRequest struct { func (x *DeleteDataSourceRequest) Reset() { *x = DeleteDataSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataSourceRequest) String() string { @@ -690,7 +674,7 @@ func (*DeleteDataSourceRequest) ProtoMessage() {} func (x *DeleteDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1069,104 +1053,6 @@ func file_google_shopping_merchant_datasources_v1beta_datasources_proto_init() { } file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_init() file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FetchDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_datasources_v1beta_datasources_proto_msgTypes[0].OneofWrappers = []any{ (*DataSource_PrimaryProductDataSource)(nil), (*DataSource_SupplementalProductDataSource)(nil), diff --git a/shopping/merchant/datasources/apiv1beta/datasourcespb/datasourcetypes.pb.go b/shopping/merchant/datasources/apiv1beta/datasourcespb/datasourcetypes.pb.go index 94719ff62e00..40b0dcd52c7e 100755 --- a/shopping/merchant/datasources/apiv1beta/datasourcespb/datasourcetypes.pb.go +++ b/shopping/merchant/datasources/apiv1beta/datasourcespb/datasourcetypes.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/datasources/v1beta/datasourcetypes.proto @@ -144,11 +144,9 @@ type PrimaryProductDataSource struct { func (x *PrimaryProductDataSource) Reset() { *x = PrimaryProductDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrimaryProductDataSource) String() string { @@ -159,7 +157,7 @@ func (*PrimaryProductDataSource) ProtoMessage() {} func (x *PrimaryProductDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +253,9 @@ type SupplementalProductDataSource struct { func (x *SupplementalProductDataSource) Reset() { *x = SupplementalProductDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupplementalProductDataSource) String() string { @@ -270,7 +266,7 @@ func (*SupplementalProductDataSource) ProtoMessage() {} func (x *SupplementalProductDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +324,9 @@ type LocalInventoryDataSource struct { func (x *LocalInventoryDataSource) Reset() { *x = LocalInventoryDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalInventoryDataSource) String() string { @@ -343,7 +337,7 @@ func (*LocalInventoryDataSource) ProtoMessage() {} func (x *LocalInventoryDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,11 +388,9 @@ type RegionalInventoryDataSource struct { func (x *RegionalInventoryDataSource) Reset() { *x = RegionalInventoryDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionalInventoryDataSource) String() string { @@ -409,7 +401,7 @@ func (*RegionalInventoryDataSource) ProtoMessage() {} func (x *RegionalInventoryDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +450,9 @@ type PromotionDataSource struct { func (x *PromotionDataSource) Reset() { *x = PromotionDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromotionDataSource) String() string { @@ -473,7 +463,7 @@ func (*PromotionDataSource) ProtoMessage() {} func (x *PromotionDataSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,11 +509,9 @@ type DataSourceReference struct { func (x *DataSourceReference) Reset() { *x = DataSourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSourceReference) String() string { @@ -534,7 +522,7 @@ func (*DataSourceReference) ProtoMessage() {} func (x *DataSourceReference) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +627,9 @@ type PrimaryProductDataSource_DefaultRule struct { func (x *PrimaryProductDataSource_DefaultRule) Reset() { *x = PrimaryProductDataSource_DefaultRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrimaryProductDataSource_DefaultRule) String() string { @@ -654,7 +640,7 @@ func (*PrimaryProductDataSource_DefaultRule) ProtoMessage() {} func (x *PrimaryProductDataSource_DefaultRule) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -848,92 +834,6 @@ func file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_init if File_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PrimaryProductDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SupplementalProductDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LocalInventoryDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RegionalInventoryDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PromotionDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DataSourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PrimaryProductDataSource_DefaultRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[0].OneofWrappers = []any{} file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[1].OneofWrappers = []any{} file_google_shopping_merchant_datasources_v1beta_datasourcetypes_proto_msgTypes[5].OneofWrappers = []any{ diff --git a/shopping/merchant/datasources/apiv1beta/datasourcespb/fileinputs.pb.go b/shopping/merchant/datasources/apiv1beta/datasourcespb/fileinputs.pb.go index fb1a51e44991..d2fb5b22c4da 100755 --- a/shopping/merchant/datasources/apiv1beta/datasourcespb/fileinputs.pb.go +++ b/shopping/merchant/datasources/apiv1beta/datasourcespb/fileinputs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/datasources/v1beta/fileinputs.proto @@ -190,11 +190,9 @@ type FileInput struct { func (x *FileInput) Reset() { *x = FileInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileInput) String() string { @@ -205,7 +203,7 @@ func (*FileInput) ProtoMessage() {} func (x *FileInput) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +280,9 @@ type FileInput_FetchSettings struct { func (x *FileInput_FetchSettings) Reset() { *x = FileInput_FetchSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileInput_FetchSettings) String() string { @@ -297,7 +293,7 @@ func (*FileInput_FetchSettings) ProtoMessage() {} func (x *FileInput_FetchSettings) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,32 +507,6 @@ func file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_init() { if File_google_shopping_merchant_datasources_v1beta_fileinputs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FileInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_fileinputs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FileInput_FetchSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/datasources/apiv1beta/datasourcespb/fileuploads.pb.go b/shopping/merchant/datasources/apiv1beta/datasourcespb/fileuploads.pb.go index 23fdb854bb10..2bae2ce49d0a 100755 --- a/shopping/merchant/datasources/apiv1beta/datasourcespb/fileuploads.pb.go +++ b/shopping/merchant/datasources/apiv1beta/datasourcespb/fileuploads.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/datasources/v1beta/fileuploads.proto @@ -183,11 +183,9 @@ type FileUpload struct { func (x *FileUpload) Reset() { *x = FileUpload{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileUpload) String() string { @@ -198,7 +196,7 @@ func (*FileUpload) ProtoMessage() {} func (x *FileUpload) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +281,9 @@ type GetFileUploadRequest struct { func (x *GetFileUploadRequest) Reset() { *x = GetFileUploadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFileUploadRequest) String() string { @@ -298,7 +294,7 @@ func (*GetFileUploadRequest) ProtoMessage() {} func (x *GetFileUploadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -347,11 +343,9 @@ type FileUpload_Issue struct { func (x *FileUpload_Issue) Reset() { *x = FileUpload_Issue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileUpload_Issue) String() string { @@ -362,7 +356,7 @@ func (*FileUpload_Issue) ProtoMessage() {} func (x *FileUpload_Issue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,44 +587,6 @@ func file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_init() { if File_google_shopping_merchant_datasources_v1beta_fileuploads_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FileUpload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetFileUploadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_datasources_v1beta_fileuploads_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FileUpload_Issue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/datasources/apiv1beta/file_uploads_client.go b/shopping/merchant/datasources/apiv1beta/file_uploads_client.go index d7f353130892..2817b5d4e622 100755 --- a/shopping/merchant/datasources/apiv1beta/file_uploads_client.go +++ b/shopping/merchant/datasources/apiv1beta/file_uploads_client.go @@ -19,7 +19,7 @@ package datasources import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( datasourcespb "cloud.google.com/go/shopping/merchant/datasources/apiv1beta/datasourcespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -156,6 +155,8 @@ type fileUploadsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewFileUploadsClient creates a new file uploads service client based on gRPC. @@ -182,6 +183,7 @@ func NewFileUploadsClient(ctx context.Context, opts ...option.ClientOption) (*Fi connPool: connPool, fileUploadsClient: datasourcespb.NewFileUploadsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -228,6 +230,8 @@ type fileUploadsRESTClient struct { // Points back to the CallOptions field of the containing FileUploadsClient CallOptions **FileUploadsCallOptions + + logger *slog.Logger } // NewFileUploadsRESTClient creates a new file uploads service rest client. @@ -245,6 +249,7 @@ func NewFileUploadsRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -297,7 +302,7 @@ func (c *fileUploadsGRPCClient) GetFileUpload(ctx context.Context, req *datasour var resp *datasourcespb.FileUpload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.fileUploadsClient.GetFileUpload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.fileUploadsClient.GetFileUpload, req, settings.GRPC, c.logger, "GetFileUpload") return err }, opts...) if err != nil { @@ -340,17 +345,7 @@ func (c *fileUploadsRESTClient) GetFileUpload(ctx context.Context, req *datasour httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFileUpload") if err != nil { return err } diff --git a/shopping/merchant/datasources/apiv1beta/helpers.go b/shopping/merchant/datasources/apiv1beta/helpers.go index 8c7b156134c7..37b287753fda 100755 --- a/shopping/merchant/datasources/apiv1beta/helpers.go +++ b/shopping/merchant/datasources/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package datasources import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/inventories/apiv1beta/helpers.go b/shopping/merchant/inventories/apiv1beta/helpers.go index 44b2d4743387..c93a1c103bf9 100755 --- a/shopping/merchant/inventories/apiv1beta/helpers.go +++ b/shopping/merchant/inventories/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package inventories import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/inventories/apiv1beta/inventoriespb/localinventory.pb.go b/shopping/merchant/inventories/apiv1beta/inventoriespb/localinventory.pb.go index cd8e064216e9..3be70e1f796d 100755 --- a/shopping/merchant/inventories/apiv1beta/inventoriespb/localinventory.pb.go +++ b/shopping/merchant/inventories/apiv1beta/inventoriespb/localinventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/inventories/v1beta/localinventory.proto @@ -104,11 +104,9 @@ type LocalInventory struct { func (x *LocalInventory) Reset() { *x = LocalInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalInventory) String() string { @@ -119,7 +117,7 @@ func (*LocalInventory) ProtoMessage() {} func (x *LocalInventory) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +244,9 @@ type ListLocalInventoriesRequest struct { func (x *ListLocalInventoriesRequest) Reset() { *x = ListLocalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLocalInventoriesRequest) String() string { @@ -261,7 +257,7 @@ func (*ListLocalInventoriesRequest) ProtoMessage() {} func (x *ListLocalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +309,9 @@ type ListLocalInventoriesResponse struct { func (x *ListLocalInventoriesResponse) Reset() { *x = ListLocalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLocalInventoriesResponse) String() string { @@ -328,7 +322,7 @@ func (*ListLocalInventoriesResponse) ProtoMessage() {} func (x *ListLocalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +368,9 @@ type InsertLocalInventoryRequest struct { func (x *InsertLocalInventoryRequest) Reset() { *x = InsertLocalInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertLocalInventoryRequest) String() string { @@ -389,7 +381,7 @@ func (*InsertLocalInventoryRequest) ProtoMessage() {} func (x *InsertLocalInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +424,9 @@ type DeleteLocalInventoryRequest struct { func (x *DeleteLocalInventoryRequest) Reset() { *x = DeleteLocalInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLocalInventoryRequest) String() string { @@ -447,7 +437,7 @@ func (*DeleteLocalInventoryRequest) ProtoMessage() {} func (x *DeleteLocalInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,68 +693,6 @@ func file_google_shopping_merchant_inventories_v1beta_localinventory_proto_init( if File_google_shopping_merchant_inventories_v1beta_localinventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LocalInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListLocalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListLocalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InsertLocalInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLocalInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_inventories_v1beta_localinventory_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/inventories/apiv1beta/inventoriespb/regionalinventory.pb.go b/shopping/merchant/inventories/apiv1beta/inventoriespb/regionalinventory.pb.go index f9dffeb56398..de4330d52b53 100755 --- a/shopping/merchant/inventories/apiv1beta/inventoriespb/regionalinventory.pb.go +++ b/shopping/merchant/inventories/apiv1beta/inventoriespb/regionalinventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/inventories/v1beta/regionalinventory.proto @@ -87,11 +87,9 @@ type RegionalInventory struct { func (x *RegionalInventory) Reset() { *x = RegionalInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RegionalInventory) String() string { @@ -102,7 +100,7 @@ func (*RegionalInventory) ProtoMessage() {} func (x *RegionalInventory) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type ListRegionalInventoriesRequest struct { func (x *ListRegionalInventoriesRequest) Reset() { *x = ListRegionalInventoriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionalInventoriesRequest) String() string { @@ -215,7 +211,7 @@ func (*ListRegionalInventoriesRequest) ProtoMessage() {} func (x *ListRegionalInventoriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,11 +263,9 @@ type ListRegionalInventoriesResponse struct { func (x *ListRegionalInventoriesResponse) Reset() { *x = ListRegionalInventoriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRegionalInventoriesResponse) String() string { @@ -282,7 +276,7 @@ func (*ListRegionalInventoriesResponse) ProtoMessage() {} func (x *ListRegionalInventoriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +322,9 @@ type InsertRegionalInventoryRequest struct { func (x *InsertRegionalInventoryRequest) Reset() { *x = InsertRegionalInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertRegionalInventoryRequest) String() string { @@ -343,7 +335,7 @@ func (*InsertRegionalInventoryRequest) ProtoMessage() {} func (x *InsertRegionalInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type DeleteRegionalInventoryRequest struct { func (x *DeleteRegionalInventoryRequest) Reset() { *x = DeleteRegionalInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRegionalInventoryRequest) String() string { @@ -401,7 +391,7 @@ func (*DeleteRegionalInventoryRequest) ProtoMessage() {} func (x *DeleteRegionalInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -642,68 +632,6 @@ func file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_in if File_google_shopping_merchant_inventories_v1beta_regionalinventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RegionalInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionalInventoriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRegionalInventoriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*InsertRegionalInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRegionalInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_inventories_v1beta_regionalinventory_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/inventories/apiv1beta/local_inventory_client.go b/shopping/merchant/inventories/apiv1beta/local_inventory_client.go index 3145bc0d46f0..eab28f0529e0 100755 --- a/shopping/merchant/inventories/apiv1beta/local_inventory_client.go +++ b/shopping/merchant/inventories/apiv1beta/local_inventory_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( inventoriespb "cloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -235,6 +234,8 @@ type localInventoryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLocalInventoryClient creates a new local inventory service client based on gRPC. @@ -261,6 +262,7 @@ func NewLocalInventoryClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, localInventoryClient: inventoriespb.NewLocalInventoryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -307,6 +309,8 @@ type localInventoryRESTClient struct { // Points back to the CallOptions field of the containing LocalInventoryClient CallOptions **LocalInventoryCallOptions + + logger *slog.Logger } // NewLocalInventoryRESTClient creates a new local inventory service rest client. @@ -324,6 +328,7 @@ func NewLocalInventoryRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -387,7 +392,7 @@ func (c *localInventoryGRPCClient) ListLocalInventories(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.localInventoryClient.ListLocalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.localInventoryClient.ListLocalInventories, req, settings.GRPC, c.logger, "ListLocalInventories") return err }, opts...) if err != nil { @@ -422,7 +427,7 @@ func (c *localInventoryGRPCClient) InsertLocalInventory(ctx context.Context, req var resp *inventoriespb.LocalInventory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.localInventoryClient.InsertLocalInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.localInventoryClient.InsertLocalInventory, req, settings.GRPC, c.logger, "InsertLocalInventory") return err }, opts...) if err != nil { @@ -439,7 +444,7 @@ func (c *localInventoryGRPCClient) DeleteLocalInventory(ctx context.Context, req opts = append((*c.CallOptions).DeleteLocalInventory[0:len((*c.CallOptions).DeleteLocalInventory):len((*c.CallOptions).DeleteLocalInventory)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.localInventoryClient.DeleteLocalInventory(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.localInventoryClient.DeleteLocalInventory, req, settings.GRPC, c.logger, "DeleteLocalInventory") return err }, opts...) return err @@ -495,21 +500,10 @@ func (c *localInventoryRESTClient) ListLocalInventories(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -587,17 +581,7 @@ func (c *localInventoryRESTClient) InsertLocalInventory(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertLocalInventory") if err != nil { return err } @@ -648,14 +632,7 @@ func (c *localInventoryRESTClient) DeleteLocalInventory(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLocalInventory") + return err }, opts...) } diff --git a/shopping/merchant/inventories/apiv1beta/local_inventory_client_example_go123_test.go b/shopping/merchant/inventories/apiv1beta/local_inventory_client_example_go123_test.go index eec47148aedd..cf6312f1c147 100644 --- a/shopping/merchant/inventories/apiv1beta/local_inventory_client_example_go123_test.go +++ b/shopping/merchant/inventories/apiv1beta/local_inventory_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLocalInventoryClient_ListLocalInventories_all() { } for resp, err := range c.ListLocalInventories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/inventories/apiv1beta/regional_inventory_client.go b/shopping/merchant/inventories/apiv1beta/regional_inventory_client.go index 7c2aba55f030..ae8b6c5d40e0 100755 --- a/shopping/merchant/inventories/apiv1beta/regional_inventory_client.go +++ b/shopping/merchant/inventories/apiv1beta/regional_inventory_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( inventoriespb "cloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -236,6 +235,8 @@ type regionalInventoryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewRegionalInventoryClient creates a new regional inventory service client based on gRPC. @@ -263,6 +264,7 @@ func NewRegionalInventoryClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, regionalInventoryClient: inventoriespb.NewRegionalInventoryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -309,6 +311,8 @@ type regionalInventoryRESTClient struct { // Points back to the CallOptions field of the containing RegionalInventoryClient CallOptions **RegionalInventoryCallOptions + + logger *slog.Logger } // NewRegionalInventoryRESTClient creates a new regional inventory service rest client. @@ -327,6 +331,7 @@ func NewRegionalInventoryRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -390,7 +395,7 @@ func (c *regionalInventoryGRPCClient) ListRegionalInventories(ctx context.Contex } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionalInventoryClient.ListRegionalInventories(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionalInventoryClient.ListRegionalInventories, req, settings.GRPC, c.logger, "ListRegionalInventories") return err }, opts...) if err != nil { @@ -425,7 +430,7 @@ func (c *regionalInventoryGRPCClient) InsertRegionalInventory(ctx context.Contex var resp *inventoriespb.RegionalInventory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.regionalInventoryClient.InsertRegionalInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.regionalInventoryClient.InsertRegionalInventory, req, settings.GRPC, c.logger, "InsertRegionalInventory") return err }, opts...) if err != nil { @@ -442,7 +447,7 @@ func (c *regionalInventoryGRPCClient) DeleteRegionalInventory(ctx context.Contex opts = append((*c.CallOptions).DeleteRegionalInventory[0:len((*c.CallOptions).DeleteRegionalInventory):len((*c.CallOptions).DeleteRegionalInventory)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.regionalInventoryClient.DeleteRegionalInventory(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.regionalInventoryClient.DeleteRegionalInventory, req, settings.GRPC, c.logger, "DeleteRegionalInventory") return err }, opts...) return err @@ -498,21 +503,10 @@ func (c *regionalInventoryRESTClient) ListRegionalInventories(ctx context.Contex } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRegionalInventories") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -590,17 +584,7 @@ func (c *regionalInventoryRESTClient) InsertRegionalInventory(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertRegionalInventory") if err != nil { return err } @@ -651,14 +635,7 @@ func (c *regionalInventoryRESTClient) DeleteRegionalInventory(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRegionalInventory") + return err }, opts...) } diff --git a/shopping/merchant/inventories/apiv1beta/regional_inventory_client_example_go123_test.go b/shopping/merchant/inventories/apiv1beta/regional_inventory_client_example_go123_test.go index b3bb62048d53..84db41f6430a 100644 --- a/shopping/merchant/inventories/apiv1beta/regional_inventory_client_example_go123_test.go +++ b/shopping/merchant/inventories/apiv1beta/regional_inventory_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleRegionalInventoryClient_ListRegionalInventories_all() { } for resp, err := range c.ListRegionalInventories(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/lfp/apiv1beta/helpers.go b/shopping/merchant/lfp/apiv1beta/helpers.go index 39b5a6159c34..458f53bf5329 100755 --- a/shopping/merchant/lfp/apiv1beta/helpers.go +++ b/shopping/merchant/lfp/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package lfp import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/lfp/apiv1beta/lfp_inventory_client.go b/shopping/merchant/lfp/apiv1beta/lfp_inventory_client.go index baaa6c13070a..9c9dd50b82dd 100755 --- a/shopping/merchant/lfp/apiv1beta/lfp_inventory_client.go +++ b/shopping/merchant/lfp/apiv1beta/lfp_inventory_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( lfppb "cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -160,6 +159,8 @@ type lfpInventoryGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLfpInventoryClient creates a new lfp inventory service client based on gRPC. @@ -188,6 +189,7 @@ func NewLfpInventoryClient(ctx context.Context, opts ...option.ClientOption) (*L connPool: connPool, lfpInventoryClient: lfppb.NewLfpInventoryServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -234,6 +236,8 @@ type lfpInventoryRESTClient struct { // Points back to the CallOptions field of the containing LfpInventoryClient CallOptions **LfpInventoryCallOptions + + logger *slog.Logger } // NewLfpInventoryRESTClient creates a new lfp inventory service rest client. @@ -253,6 +257,7 @@ func NewLfpInventoryRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -305,7 +310,7 @@ func (c *lfpInventoryGRPCClient) InsertLfpInventory(ctx context.Context, req *lf var resp *lfppb.LfpInventory err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lfpInventoryClient.InsertLfpInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lfpInventoryClient.InsertLfpInventory, req, settings.GRPC, c.logger, "InsertLfpInventory") return err }, opts...) if err != nil { @@ -356,17 +361,7 @@ func (c *lfpInventoryRESTClient) InsertLfpInventory(ctx context.Context, req *lf httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertLfpInventory") if err != nil { return err } diff --git a/shopping/merchant/lfp/apiv1beta/lfp_sale_client.go b/shopping/merchant/lfp/apiv1beta/lfp_sale_client.go index aa29b90e4dab..665d90dd5ab0 100755 --- a/shopping/merchant/lfp/apiv1beta/lfp_sale_client.go +++ b/shopping/merchant/lfp/apiv1beta/lfp_sale_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( lfppb "cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -158,6 +157,8 @@ type lfpSaleGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLfpSaleClient creates a new lfp sale service client based on gRPC. @@ -186,6 +187,7 @@ func NewLfpSaleClient(ctx context.Context, opts ...option.ClientOption) (*LfpSal connPool: connPool, lfpSaleClient: lfppb.NewLfpSaleServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -232,6 +234,8 @@ type lfpSaleRESTClient struct { // Points back to the CallOptions field of the containing LfpSaleClient CallOptions **LfpSaleCallOptions + + logger *slog.Logger } // NewLfpSaleRESTClient creates a new lfp sale service rest client. @@ -251,6 +255,7 @@ func NewLfpSaleRESTClient(ctx context.Context, opts ...option.ClientOption) (*Lf endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -303,7 +308,7 @@ func (c *lfpSaleGRPCClient) InsertLfpSale(ctx context.Context, req *lfppb.Insert var resp *lfppb.LfpSale err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lfpSaleClient.InsertLfpSale(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lfpSaleClient.InsertLfpSale, req, settings.GRPC, c.logger, "InsertLfpSale") return err }, opts...) if err != nil { @@ -352,17 +357,7 @@ func (c *lfpSaleRESTClient) InsertLfpSale(ctx context.Context, req *lfppb.Insert httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertLfpSale") if err != nil { return err } diff --git a/shopping/merchant/lfp/apiv1beta/lfp_store_client.go b/shopping/merchant/lfp/apiv1beta/lfp_store_client.go index 0217e40dff55..c854231104dc 100755 --- a/shopping/merchant/lfp/apiv1beta/lfp_store_client.go +++ b/shopping/merchant/lfp/apiv1beta/lfp_store_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( lfppb "cloud.google.com/go/shopping/merchant/lfp/apiv1beta/lfppb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -252,6 +251,8 @@ type lfpStoreGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLfpStoreClient creates a new lfp store service client based on gRPC. @@ -280,6 +281,7 @@ func NewLfpStoreClient(ctx context.Context, opts ...option.ClientOption) (*LfpSt connPool: connPool, lfpStoreClient: lfppb.NewLfpStoreServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -326,6 +328,8 @@ type lfpStoreRESTClient struct { // Points back to the CallOptions field of the containing LfpStoreClient CallOptions **LfpStoreCallOptions + + logger *slog.Logger } // NewLfpStoreRESTClient creates a new lfp store service rest client. @@ -345,6 +349,7 @@ func NewLfpStoreRESTClient(ctx context.Context, opts ...option.ClientOption) (*L endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -397,7 +402,7 @@ func (c *lfpStoreGRPCClient) GetLfpStore(ctx context.Context, req *lfppb.GetLfpS var resp *lfppb.LfpStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lfpStoreClient.GetLfpStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lfpStoreClient.GetLfpStore, req, settings.GRPC, c.logger, "GetLfpStore") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *lfpStoreGRPCClient) InsertLfpStore(ctx context.Context, req *lfppb.Inse var resp *lfppb.LfpStore err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lfpStoreClient.InsertLfpStore(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lfpStoreClient.InsertLfpStore, req, settings.GRPC, c.logger, "InsertLfpStore") return err }, opts...) if err != nil { @@ -432,7 +437,7 @@ func (c *lfpStoreGRPCClient) DeleteLfpStore(ctx context.Context, req *lfppb.Dele opts = append((*c.CallOptions).DeleteLfpStore[0:len((*c.CallOptions).DeleteLfpStore):len((*c.CallOptions).DeleteLfpStore)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.lfpStoreClient.DeleteLfpStore(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.lfpStoreClient.DeleteLfpStore, req, settings.GRPC, c.logger, "DeleteLfpStore") return err }, opts...) return err @@ -458,7 +463,7 @@ func (c *lfpStoreGRPCClient) ListLfpStores(ctx context.Context, req *lfppb.ListL } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.lfpStoreClient.ListLfpStores(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.lfpStoreClient.ListLfpStores, req, settings.GRPC, c.logger, "ListLfpStores") return err }, opts...) if err != nil { @@ -517,17 +522,7 @@ func (c *lfpStoreRESTClient) GetLfpStore(ctx context.Context, req *lfppb.GetLfpS httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLfpStore") if err != nil { return err } @@ -585,17 +580,7 @@ func (c *lfpStoreRESTClient) InsertLfpStore(ctx context.Context, req *lfppb.Inse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertLfpStore") if err != nil { return err } @@ -642,15 +627,8 @@ func (c *lfpStoreRESTClient) DeleteLfpStore(ctx context.Context, req *lfppb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLfpStore") + return err }, opts...) } @@ -701,21 +679,10 @@ func (c *lfpStoreRESTClient) ListLfpStores(ctx context.Context, req *lfppb.ListL } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLfpStores") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/lfp/apiv1beta/lfp_store_client_example_go123_test.go b/shopping/merchant/lfp/apiv1beta/lfp_store_client_example_go123_test.go index 39a077dca93c..3855bc0fdac0 100644 --- a/shopping/merchant/lfp/apiv1beta/lfp_store_client_example_go123_test.go +++ b/shopping/merchant/lfp/apiv1beta/lfp_store_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleLfpStoreClient_ListLfpStores_all() { } for resp, err := range c.ListLfpStores(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/lfp/apiv1beta/lfppb/lfpinventory.pb.go b/shopping/merchant/lfp/apiv1beta/lfppb/lfpinventory.pb.go index 68cedc6a51ce..9b4558797d5b 100755 --- a/shopping/merchant/lfp/apiv1beta/lfppb/lfpinventory.pb.go +++ b/shopping/merchant/lfp/apiv1beta/lfppb/lfpinventory.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/lfp/v1beta/lfpinventory.proto @@ -104,11 +104,9 @@ type LfpInventory struct { func (x *LfpInventory) Reset() { *x = LfpInventory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LfpInventory) String() string { @@ -119,7 +117,7 @@ func (*LfpInventory) ProtoMessage() {} func (x *LfpInventory) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,11 +245,9 @@ type InsertLfpInventoryRequest struct { func (x *InsertLfpInventoryRequest) Reset() { *x = InsertLfpInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertLfpInventoryRequest) String() string { @@ -262,7 +258,7 @@ func (*InsertLfpInventoryRequest) ProtoMessage() {} func (x *InsertLfpInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -447,32 +443,6 @@ func file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_init() { if File_google_shopping_merchant_lfp_v1beta_lfpinventory_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LfpInventory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsertLfpInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_lfp_v1beta_lfpinventory_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/lfp/apiv1beta/lfppb/lfpsale.pb.go b/shopping/merchant/lfp/apiv1beta/lfppb/lfpsale.pb.go index 6aeda7a84ad1..91942e5e8550 100755 --- a/shopping/merchant/lfp/apiv1beta/lfppb/lfpsale.pb.go +++ b/shopping/merchant/lfp/apiv1beta/lfppb/lfpsale.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/lfp/v1beta/lfpsale.proto @@ -89,11 +89,9 @@ type LfpSale struct { func (x *LfpSale) Reset() { *x = LfpSale{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LfpSale) String() string { @@ -104,7 +102,7 @@ func (*LfpSale) ProtoMessage() {} func (x *LfpSale) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -218,11 +216,9 @@ type InsertLfpSaleRequest struct { func (x *InsertLfpSaleRequest) Reset() { *x = InsertLfpSaleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertLfpSaleRequest) String() string { @@ -233,7 +229,7 @@ func (*InsertLfpSaleRequest) ProtoMessage() {} func (x *InsertLfpSaleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,32 +391,6 @@ func file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_init() { if File_google_shopping_merchant_lfp_v1beta_lfpsale_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LfpSale); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsertLfpSaleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_lfp_v1beta_lfpsale_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/lfp/apiv1beta/lfppb/lfpstore.pb.go b/shopping/merchant/lfp/apiv1beta/lfppb/lfpstore.pb.go index 96b5d4a139ec..0cfe40caabe7 100755 --- a/shopping/merchant/lfp/apiv1beta/lfppb/lfpstore.pb.go +++ b/shopping/merchant/lfp/apiv1beta/lfppb/lfpstore.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/lfp/v1beta/lfpstore.proto @@ -158,11 +158,9 @@ type LfpStore struct { func (x *LfpStore) Reset() { *x = LfpStore{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LfpStore) String() string { @@ -173,7 +171,7 @@ func (*LfpStore) ProtoMessage() {} func (x *LfpStore) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +276,9 @@ type GetLfpStoreRequest struct { func (x *GetLfpStoreRequest) Reset() { *x = GetLfpStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLfpStoreRequest) String() string { @@ -293,7 +289,7 @@ func (*GetLfpStoreRequest) ProtoMessage() {} func (x *GetLfpStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +326,9 @@ type InsertLfpStoreRequest struct { func (x *InsertLfpStoreRequest) Reset() { *x = InsertLfpStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertLfpStoreRequest) String() string { @@ -345,7 +339,7 @@ func (*InsertLfpStoreRequest) ProtoMessage() {} func (x *InsertLfpStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +381,9 @@ type DeleteLfpStoreRequest struct { func (x *DeleteLfpStoreRequest) Reset() { *x = DeleteLfpStoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLfpStoreRequest) String() string { @@ -402,7 +394,7 @@ func (*DeleteLfpStoreRequest) ProtoMessage() {} func (x *DeleteLfpStoreRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +444,9 @@ type ListLfpStoresRequest struct { func (x *ListLfpStoresRequest) Reset() { *x = ListLfpStoresRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLfpStoresRequest) String() string { @@ -467,7 +457,7 @@ func (*ListLfpStoresRequest) ProtoMessage() {} func (x *ListLfpStoresRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +515,9 @@ type ListLfpStoresResponse struct { func (x *ListLfpStoresResponse) Reset() { *x = ListLfpStoresResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLfpStoresResponse) String() string { @@ -540,7 +528,7 @@ func (*ListLfpStoresResponse) ProtoMessage() {} func (x *ListLfpStoresResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,80 +785,6 @@ func file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_init() { if File_google_shopping_merchant_lfp_v1beta_lfpstore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LfpStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetLfpStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InsertLfpStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLfpStoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListLfpStoresRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListLfpStoresResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_lfp_v1beta_lfpstore_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/notifications/apiv1beta/helpers.go b/shopping/merchant/notifications/apiv1beta/helpers.go index f7f838f0e16f..fbb039491bd0 100755 --- a/shopping/merchant/notifications/apiv1beta/helpers.go +++ b/shopping/merchant/notifications/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package notifications import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/notifications/apiv1beta/notifications_api_client.go b/shopping/merchant/notifications/apiv1beta/notifications_api_client.go index 36f8c6b37c0d..e6e9cd2bf093 100755 --- a/shopping/merchant/notifications/apiv1beta/notifications_api_client.go +++ b/shopping/merchant/notifications/apiv1beta/notifications_api_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( notificationspb "cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -295,6 +294,8 @@ type notificationsApiGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewNotificationsApiClient creates a new notifications api service client based on gRPC. @@ -321,6 +322,7 @@ func NewNotificationsApiClient(ctx context.Context, opts ...option.ClientOption) connPool: connPool, notificationsApiClient: notificationspb.NewNotificationsApiServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -367,6 +369,8 @@ type notificationsApiRESTClient struct { // Points back to the CallOptions field of the containing NotificationsApiClient CallOptions **NotificationsApiCallOptions + + logger *slog.Logger } // NewNotificationsApiRESTClient creates a new notifications api service rest client. @@ -384,6 +388,7 @@ func NewNotificationsApiRESTClient(ctx context.Context, opts ...option.ClientOpt endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -436,7 +441,7 @@ func (c *notificationsApiGRPCClient) GetNotificationSubscription(ctx context.Con var resp *notificationspb.NotificationSubscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationsApiClient.GetNotificationSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationsApiClient.GetNotificationSubscription, req, settings.GRPC, c.logger, "GetNotificationSubscription") return err }, opts...) if err != nil { @@ -454,7 +459,7 @@ func (c *notificationsApiGRPCClient) CreateNotificationSubscription(ctx context. var resp *notificationspb.NotificationSubscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationsApiClient.CreateNotificationSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationsApiClient.CreateNotificationSubscription, req, settings.GRPC, c.logger, "CreateNotificationSubscription") return err }, opts...) if err != nil { @@ -472,7 +477,7 @@ func (c *notificationsApiGRPCClient) UpdateNotificationSubscription(ctx context. var resp *notificationspb.NotificationSubscription err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationsApiClient.UpdateNotificationSubscription(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationsApiClient.UpdateNotificationSubscription, req, settings.GRPC, c.logger, "UpdateNotificationSubscription") return err }, opts...) if err != nil { @@ -489,7 +494,7 @@ func (c *notificationsApiGRPCClient) DeleteNotificationSubscription(ctx context. opts = append((*c.CallOptions).DeleteNotificationSubscription[0:len((*c.CallOptions).DeleteNotificationSubscription):len((*c.CallOptions).DeleteNotificationSubscription)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.notificationsApiClient.DeleteNotificationSubscription(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.notificationsApiClient.DeleteNotificationSubscription, req, settings.GRPC, c.logger, "DeleteNotificationSubscription") return err }, opts...) return err @@ -515,7 +520,7 @@ func (c *notificationsApiGRPCClient) ListNotificationSubscriptions(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.notificationsApiClient.ListNotificationSubscriptions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.notificationsApiClient.ListNotificationSubscriptions, req, settings.GRPC, c.logger, "ListNotificationSubscriptions") return err }, opts...) if err != nil { @@ -574,17 +579,7 @@ func (c *notificationsApiRESTClient) GetNotificationSubscription(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNotificationSubscription") if err != nil { return err } @@ -658,17 +653,7 @@ func (c *notificationsApiRESTClient) CreateNotificationSubscription(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNotificationSubscription") if err != nil { return err } @@ -732,17 +717,7 @@ func (c *notificationsApiRESTClient) UpdateNotificationSubscription(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNotificationSubscription") if err != nil { return err } @@ -789,15 +764,8 @@ func (c *notificationsApiRESTClient) DeleteNotificationSubscription(ctx context. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNotificationSubscription") + return err }, opts...) } @@ -846,21 +814,10 @@ func (c *notificationsApiRESTClient) ListNotificationSubscriptions(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNotificationSubscriptions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/notifications/apiv1beta/notifications_api_client_example_go123_test.go b/shopping/merchant/notifications/apiv1beta/notifications_api_client_example_go123_test.go index 76f6e553273d..f65aba72b6be 100644 --- a/shopping/merchant/notifications/apiv1beta/notifications_api_client_example_go123_test.go +++ b/shopping/merchant/notifications/apiv1beta/notifications_api_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleNotificationsApiClient_ListNotificationSubscriptions_all() { } for resp, err := range c.ListNotificationSubscriptions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/notifications/apiv1beta/notificationspb/notificationsapi.pb.go b/shopping/merchant/notifications/apiv1beta/notificationspb/notificationsapi.pb.go index b068031c632d..70235cbb122b 100755 --- a/shopping/merchant/notifications/apiv1beta/notificationspb/notificationsapi.pb.go +++ b/shopping/merchant/notifications/apiv1beta/notificationspb/notificationsapi.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto @@ -206,11 +206,9 @@ type GetNotificationSubscriptionRequest struct { func (x *GetNotificationSubscriptionRequest) Reset() { *x = GetNotificationSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNotificationSubscriptionRequest) String() string { @@ -221,7 +219,7 @@ func (*GetNotificationSubscriptionRequest) ProtoMessage() {} func (x *GetNotificationSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,11 +256,9 @@ type CreateNotificationSubscriptionRequest struct { func (x *CreateNotificationSubscriptionRequest) Reset() { *x = CreateNotificationSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNotificationSubscriptionRequest) String() string { @@ -273,7 +269,7 @@ func (*CreateNotificationSubscriptionRequest) ProtoMessage() {} func (x *CreateNotificationSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -317,11 +313,9 @@ type UpdateNotificationSubscriptionRequest struct { func (x *UpdateNotificationSubscriptionRequest) Reset() { *x = UpdateNotificationSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNotificationSubscriptionRequest) String() string { @@ -332,7 +326,7 @@ func (*UpdateNotificationSubscriptionRequest) ProtoMessage() {} func (x *UpdateNotificationSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +367,9 @@ type DeleteNotificationSubscriptionRequest struct { func (x *DeleteNotificationSubscriptionRequest) Reset() { *x = DeleteNotificationSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNotificationSubscriptionRequest) String() string { @@ -388,7 +380,7 @@ func (*DeleteNotificationSubscriptionRequest) ProtoMessage() {} func (x *DeleteNotificationSubscriptionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +422,9 @@ type ListNotificationSubscriptionsRequest struct { func (x *ListNotificationSubscriptionsRequest) Reset() { *x = ListNotificationSubscriptionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationSubscriptionsRequest) String() string { @@ -445,7 +435,7 @@ func (*ListNotificationSubscriptionsRequest) ProtoMessage() {} func (x *ListNotificationSubscriptionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,11 +486,9 @@ type ListNotificationSubscriptionsResponse struct { func (x *ListNotificationSubscriptionsResponse) Reset() { *x = ListNotificationSubscriptionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNotificationSubscriptionsResponse) String() string { @@ -511,7 +499,7 @@ func (*ListNotificationSubscriptionsResponse) ProtoMessage() {} func (x *ListNotificationSubscriptionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +553,9 @@ type NotificationSubscription struct { func (x *NotificationSubscription) Reset() { *x = NotificationSubscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationSubscription) String() string { @@ -580,7 +566,7 @@ func (*NotificationSubscription) ProtoMessage() {} func (x *NotificationSubscription) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +663,9 @@ type ProductChange struct { func (x *ProductChange) Reset() { *x = ProductChange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductChange) String() string { @@ -692,7 +676,7 @@ func (*ProductChange) ProtoMessage() {} func (x *ProductChange) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +749,9 @@ type ProductStatusChangeMessage struct { func (x *ProductStatusChangeMessage) Reset() { *x = ProductStatusChangeMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStatusChangeMessage) String() string { @@ -780,7 +762,7 @@ func (*ProductStatusChangeMessage) ProtoMessage() {} func (x *ProductStatusChangeMessage) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1215,116 +1197,6 @@ func file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_i if File_google_shopping_merchant_notifications_v1beta_notificationsapi_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetNotificationSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateNotificationSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNotificationSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNotificationSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationSubscriptionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListNotificationSubscriptionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NotificationSubscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ProductChange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ProductStatusChangeMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_notifications_v1beta_notificationsapi_proto_msgTypes[6].OneofWrappers = []any{ (*NotificationSubscription_AllManagedAccounts)(nil), (*NotificationSubscription_TargetAccount)(nil), diff --git a/shopping/merchant/products/apiv1beta/helpers.go b/shopping/merchant/products/apiv1beta/helpers.go index 08c1148c3dd3..d604ed620cdf 100755 --- a/shopping/merchant/products/apiv1beta/helpers.go +++ b/shopping/merchant/products/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package products import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/products/apiv1beta/product_inputs_client.go b/shopping/merchant/products/apiv1beta/product_inputs_client.go index 2484c7b2b2a0..4f6d077f5abf 100755 --- a/shopping/merchant/products/apiv1beta/product_inputs_client.go +++ b/shopping/merchant/products/apiv1beta/product_inputs_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( productspb "cloud.google.com/go/shopping/merchant/products/apiv1beta/productspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -195,6 +194,8 @@ type productInputsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProductInputsClient creates a new product inputs service client based on gRPC. @@ -222,6 +223,7 @@ func NewProductInputsClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, productInputsClient: productspb.NewProductInputsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -268,6 +270,8 @@ type productInputsRESTClient struct { // Points back to the CallOptions field of the containing ProductInputsClient CallOptions **ProductInputsCallOptions + + logger *slog.Logger } // NewProductInputsRESTClient creates a new product inputs service rest client. @@ -286,6 +290,7 @@ func NewProductInputsRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -338,7 +343,7 @@ func (c *productInputsGRPCClient) InsertProductInput(ctx context.Context, req *p var resp *productspb.ProductInput err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productInputsClient.InsertProductInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productInputsClient.InsertProductInput, req, settings.GRPC, c.logger, "InsertProductInput") return err }, opts...) if err != nil { @@ -355,7 +360,7 @@ func (c *productInputsGRPCClient) DeleteProductInput(ctx context.Context, req *p opts = append((*c.CallOptions).DeleteProductInput[0:len((*c.CallOptions).DeleteProductInput):len((*c.CallOptions).DeleteProductInput)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productInputsClient.DeleteProductInput(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productInputsClient.DeleteProductInput, req, settings.GRPC, c.logger, "DeleteProductInput") return err }, opts...) return err @@ -407,17 +412,7 @@ func (c *productInputsRESTClient) InsertProductInput(ctx context.Context, req *p httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertProductInput") if err != nil { return err } @@ -468,14 +463,7 @@ func (c *productInputsRESTClient) DeleteProductInput(ctx context.Context, req *p httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProductInput") + return err }, opts...) } diff --git a/shopping/merchant/products/apiv1beta/products_client.go b/shopping/merchant/products/apiv1beta/products_client.go index 1d32b1c4c586..d364088013f2 100755 --- a/shopping/merchant/products/apiv1beta/products_client.go +++ b/shopping/merchant/products/apiv1beta/products_client.go @@ -19,7 +19,7 @@ package products import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( productspb "cloud.google.com/go/shopping/merchant/products/apiv1beta/productspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -196,6 +195,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new products service client based on gRPC. @@ -223,6 +224,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: productspb.NewProductsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new products service rest client. @@ -287,6 +291,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -339,7 +344,7 @@ func (c *gRPCClient) GetProduct(ctx context.Context, req *productspb.GetProductR var resp *productspb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetProduct, req, settings.GRPC, c.logger, "GetProduct") return err }, opts...) if err != nil { @@ -368,7 +373,7 @@ func (c *gRPCClient) ListProducts(ctx context.Context, req *productspb.ListProdu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -430,17 +435,7 @@ func (c *restClient) GetProduct(ctx context.Context, req *productspb.GetProductR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProduct") if err != nil { return err } @@ -507,21 +502,10 @@ func (c *restClient) ListProducts(ctx context.Context, req *productspb.ListProdu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/products/apiv1beta/products_client_example_go123_test.go b/shopping/merchant/products/apiv1beta/products_client_example_go123_test.go index bbb8e06eb00a..844594e8f834 100644 --- a/shopping/merchant/products/apiv1beta/products_client_example_go123_test.go +++ b/shopping/merchant/products/apiv1beta/products_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/products/apiv1beta/productspb/productinputs.pb.go b/shopping/merchant/products/apiv1beta/productspb/productinputs.pb.go index c517ca4079c0..75d324ddf938 100755 --- a/shopping/merchant/products/apiv1beta/productspb/productinputs.pb.go +++ b/shopping/merchant/products/apiv1beta/productspb/productinputs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/products/v1beta/productinputs.proto @@ -131,11 +131,9 @@ type ProductInput struct { func (x *ProductInput) Reset() { *x = ProductInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductInput) String() string { @@ -146,7 +144,7 @@ func (*ProductInput) ProtoMessage() {} func (x *ProductInput) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +242,9 @@ type InsertProductInputRequest struct { func (x *InsertProductInputRequest) Reset() { *x = InsertProductInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertProductInputRequest) String() string { @@ -259,7 +255,7 @@ func (*InsertProductInputRequest) ProtoMessage() {} func (x *InsertProductInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +312,9 @@ type DeleteProductInputRequest struct { func (x *DeleteProductInputRequest) Reset() { *x = DeleteProductInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductInputRequest) String() string { @@ -331,7 +325,7 @@ func (*DeleteProductInputRequest) ProtoMessage() {} func (x *DeleteProductInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,44 +531,6 @@ func file_google_shopping_merchant_products_v1beta_productinputs_proto_init() { return } file_google_shopping_merchant_products_v1beta_products_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsertProductInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_products_v1beta_productinputs_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/products/apiv1beta/productspb/products.pb.go b/shopping/merchant/products/apiv1beta/productspb/products.pb.go index 6bc0fc1caa56..a039265a9c1e 100755 --- a/shopping/merchant/products/apiv1beta/productspb/products.pb.go +++ b/shopping/merchant/products/apiv1beta/productspb/products.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/products/v1beta/products.proto @@ -115,11 +115,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -130,7 +128,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +230,9 @@ type GetProductRequest struct { func (x *GetProductRequest) Reset() { *x = GetProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductRequest) String() string { @@ -247,7 +243,7 @@ func (*GetProductRequest) ProtoMessage() {} func (x *GetProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -293,11 +289,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -308,7 +302,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +354,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -375,7 +367,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -586,56 +578,6 @@ func file_google_shopping_merchant_products_v1beta_products_proto_init() { return } file_google_shopping_merchant_products_v1beta_products_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_products_v1beta_products_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/products/apiv1beta/productspb/products_common.pb.go b/shopping/merchant/products/apiv1beta/productspb/products_common.pb.go index 03fed48ecd51..d71769124aaf 100755 --- a/shopping/merchant/products/apiv1beta/productspb/products_common.pb.go +++ b/shopping/merchant/products/apiv1beta/productspb/products_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/products/v1beta/products_common.proto @@ -412,11 +412,9 @@ type Attributes struct { func (x *Attributes) Reset() { *x = Attributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attributes) String() string { @@ -427,7 +425,7 @@ func (*Attributes) ProtoMessage() {} func (x *Attributes) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1115,11 +1113,9 @@ type Tax struct { func (x *Tax) Reset() { *x = Tax{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tax) String() string { @@ -1130,7 +1126,7 @@ func (*Tax) ProtoMessage() {} func (x *Tax) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1202,11 +1198,9 @@ type ShippingWeight struct { func (x *ShippingWeight) Reset() { *x = ShippingWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShippingWeight) String() string { @@ -1217,7 +1211,7 @@ func (*ShippingWeight) ProtoMessage() {} func (x *ShippingWeight) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,11 +1255,9 @@ type ShippingDimension struct { func (x *ShippingDimension) Reset() { *x = ShippingDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShippingDimension) String() string { @@ -1276,7 +1268,7 @@ func (*ShippingDimension) ProtoMessage() {} func (x *ShippingDimension) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1319,11 +1311,9 @@ type UnitPricingBaseMeasure struct { func (x *UnitPricingBaseMeasure) Reset() { *x = UnitPricingBaseMeasure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnitPricingBaseMeasure) String() string { @@ -1334,7 +1324,7 @@ func (*UnitPricingBaseMeasure) ProtoMessage() {} func (x *UnitPricingBaseMeasure) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1367,9 @@ type UnitPricingMeasure struct { func (x *UnitPricingMeasure) Reset() { *x = UnitPricingMeasure{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnitPricingMeasure) String() string { @@ -1392,7 +1380,7 @@ func (*UnitPricingMeasure) ProtoMessage() {} func (x *UnitPricingMeasure) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1440,11 +1428,9 @@ type SubscriptionCost struct { func (x *SubscriptionCost) Reset() { *x = SubscriptionCost{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubscriptionCost) String() string { @@ -1455,7 +1441,7 @@ func (*SubscriptionCost) ProtoMessage() {} func (x *SubscriptionCost) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1512,11 +1498,9 @@ type Installment struct { func (x *Installment) Reset() { *x = Installment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Installment) String() string { @@ -1527,7 +1511,7 @@ func (*Installment) ProtoMessage() {} func (x *Installment) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1589,11 +1573,9 @@ type LoyaltyPoints struct { func (x *LoyaltyPoints) Reset() { *x = LoyaltyPoints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoyaltyPoints) String() string { @@ -1604,7 +1586,7 @@ func (*LoyaltyPoints) ProtoMessage() {} func (x *LoyaltyPoints) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1675,11 +1657,9 @@ type LoyaltyProgram struct { func (x *LoyaltyProgram) Reset() { *x = LoyaltyProgram{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoyaltyProgram) String() string { @@ -1690,7 +1670,7 @@ func (*LoyaltyProgram) ProtoMessage() {} func (x *LoyaltyProgram) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1831,11 +1811,9 @@ type Shipping struct { func (x *Shipping) Reset() { *x = Shipping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Shipping) String() string { @@ -1846,7 +1824,7 @@ func (*Shipping) ProtoMessage() {} func (x *Shipping) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1933,9 @@ type FreeShippingThreshold struct { func (x *FreeShippingThreshold) Reset() { *x = FreeShippingThreshold{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FreeShippingThreshold) String() string { @@ -1970,7 +1946,7 @@ func (*FreeShippingThreshold) ProtoMessage() {} func (x *FreeShippingThreshold) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2015,11 +1991,9 @@ type ProductDetail struct { func (x *ProductDetail) Reset() { *x = ProductDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDetail) String() string { @@ -2030,7 +2004,7 @@ func (*ProductDetail) ProtoMessage() {} func (x *ProductDetail) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2092,11 +2066,9 @@ type Certification struct { func (x *Certification) Reset() { *x = Certification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Certification) String() string { @@ -2107,7 +2079,7 @@ func (*Certification) ProtoMessage() {} func (x *Certification) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2167,11 +2139,9 @@ type ProductStructuredTitle struct { func (x *ProductStructuredTitle) Reset() { *x = ProductStructuredTitle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStructuredTitle) String() string { @@ -2182,7 +2152,7 @@ func (*ProductStructuredTitle) ProtoMessage() {} func (x *ProductStructuredTitle) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2228,11 +2198,9 @@ type ProductStructuredDescription struct { func (x *ProductStructuredDescription) Reset() { *x = ProductStructuredDescription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStructuredDescription) String() string { @@ -2243,7 +2211,7 @@ func (*ProductStructuredDescription) ProtoMessage() {} func (x *ProductStructuredDescription) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2290,11 +2258,9 @@ type ProductDimension struct { func (x *ProductDimension) Reset() { *x = ProductDimension{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductDimension) String() string { @@ -2305,7 +2271,7 @@ func (*ProductDimension) ProtoMessage() {} func (x *ProductDimension) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2354,11 +2320,9 @@ type ProductWeight struct { func (x *ProductWeight) Reset() { *x = ProductWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductWeight) String() string { @@ -2369,7 +2333,7 @@ func (*ProductWeight) ProtoMessage() {} func (x *ProductWeight) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2422,11 +2386,9 @@ type ProductStatus struct { func (x *ProductStatus) Reset() { *x = ProductStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStatus) String() string { @@ -2437,7 +2399,7 @@ func (*ProductStatus) ProtoMessage() {} func (x *ProductStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2528,11 +2490,9 @@ type CloudExportAdditionalProperties struct { func (x *CloudExportAdditionalProperties) Reset() { *x = CloudExportAdditionalProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudExportAdditionalProperties) String() string { @@ -2543,7 +2503,7 @@ func (*CloudExportAdditionalProperties) ProtoMessage() {} func (x *CloudExportAdditionalProperties) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2634,11 +2594,9 @@ type ProductStatus_DestinationStatus struct { func (x *ProductStatus_DestinationStatus) Reset() { *x = ProductStatus_DestinationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStatus_DestinationStatus) String() string { @@ -2649,7 +2607,7 @@ func (*ProductStatus_DestinationStatus) ProtoMessage() {} func (x *ProductStatus_DestinationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2721,11 +2679,9 @@ type ProductStatus_ItemLevelIssue struct { func (x *ProductStatus_ItemLevelIssue) Reset() { *x = ProductStatus_ItemLevelIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductStatus_ItemLevelIssue) String() string { @@ -2736,7 +2692,7 @@ func (*ProductStatus_ItemLevelIssue) ProtoMessage() {} func (x *ProductStatus_ItemLevelIssue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3655,272 +3611,6 @@ func file_google_shopping_merchant_products_v1beta_products_common_proto_init() if File_google_shopping_merchant_products_v1beta_products_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Tax); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ShippingWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ShippingDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UnitPricingBaseMeasure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UnitPricingMeasure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SubscriptionCost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Installment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LoyaltyPoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LoyaltyProgram); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Shipping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FreeShippingThreshold); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ProductDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Certification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ProductStructuredTitle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ProductStructuredDescription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ProductDimension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ProductWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ProductStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CloudExportAdditionalProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ProductStatus_DestinationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ProductStatus_ItemLevelIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[0].OneofWrappers = []any{} file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[7].OneofWrappers = []any{} file_google_shopping_merchant_products_v1beta_products_common_proto_msgTypes[9].OneofWrappers = []any{} diff --git a/shopping/merchant/promotions/apiv1beta/helpers.go b/shopping/merchant/promotions/apiv1beta/helpers.go index ca1379cccb2a..c642c420cc39 100755 --- a/shopping/merchant/promotions/apiv1beta/helpers.go +++ b/shopping/merchant/promotions/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package promotions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/promotions/apiv1beta/promotions_client.go b/shopping/merchant/promotions/apiv1beta/promotions_client.go index 37e1dd045020..f78a8286dc4d 100755 --- a/shopping/merchant/promotions/apiv1beta/promotions_client.go +++ b/shopping/merchant/promotions/apiv1beta/promotions_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( promotionspb "cloud.google.com/go/shopping/merchant/promotions/apiv1beta/promotionspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -227,6 +226,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new promotions service client based on gRPC. @@ -253,6 +254,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: promotionspb.NewPromotionsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -299,6 +301,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new promotions service rest client. @@ -316,6 +320,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -368,7 +373,7 @@ func (c *gRPCClient) InsertPromotion(ctx context.Context, req *promotionspb.Inse var resp *promotionspb.Promotion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.InsertPromotion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.InsertPromotion, req, settings.GRPC, c.logger, "InsertPromotion") return err }, opts...) if err != nil { @@ -386,7 +391,7 @@ func (c *gRPCClient) GetPromotion(ctx context.Context, req *promotionspb.GetProm var resp *promotionspb.Promotion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPromotion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPromotion, req, settings.GRPC, c.logger, "GetPromotion") return err }, opts...) if err != nil { @@ -415,7 +420,7 @@ func (c *gRPCClient) ListPromotions(ctx context.Context, req *promotionspb.ListP } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPromotions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPromotions, req, settings.GRPC, c.logger, "ListPromotions") return err }, opts...) if err != nil { @@ -481,17 +486,7 @@ func (c *restClient) InsertPromotion(ctx context.Context, req *promotionspb.Inse httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "InsertPromotion") if err != nil { return err } @@ -544,17 +539,7 @@ func (c *restClient) GetPromotion(ctx context.Context, req *promotionspb.GetProm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPromotion") if err != nil { return err } @@ -621,21 +606,10 @@ func (c *restClient) ListPromotions(ctx context.Context, req *promotionspb.ListP } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPromotions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/promotions/apiv1beta/promotions_client_example_go123_test.go b/shopping/merchant/promotions/apiv1beta/promotions_client_example_go123_test.go index 627d226fd21e..960b80aff3dc 100644 --- a/shopping/merchant/promotions/apiv1beta/promotions_client_example_go123_test.go +++ b/shopping/merchant/promotions/apiv1beta/promotions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListPromotions_all() { } for resp, err := range c.ListPromotions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/promotions/apiv1beta/promotionspb/promotions.pb.go b/shopping/merchant/promotions/apiv1beta/promotionspb/promotions.pb.go index 7f3f31d599bd..65c214ed17aa 100755 --- a/shopping/merchant/promotions/apiv1beta/promotionspb/promotions.pb.go +++ b/shopping/merchant/promotions/apiv1beta/promotionspb/promotions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/promotions/v1beta/promotions.proto @@ -118,11 +118,9 @@ type Promotion struct { func (x *Promotion) Reset() { *x = Promotion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Promotion) String() string { @@ -133,7 +131,7 @@ func (*Promotion) ProtoMessage() {} func (x *Promotion) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +236,9 @@ type InsertPromotionRequest struct { func (x *InsertPromotionRequest) Reset() { *x = InsertPromotionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsertPromotionRequest) String() string { @@ -253,7 +249,7 @@ func (*InsertPromotionRequest) ProtoMessage() {} func (x *InsertPromotionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -302,11 +298,9 @@ type GetPromotionRequest struct { func (x *GetPromotionRequest) Reset() { *x = GetPromotionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPromotionRequest) String() string { @@ -317,7 +311,7 @@ func (*GetPromotionRequest) ProtoMessage() {} func (x *GetPromotionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +357,9 @@ type ListPromotionsRequest struct { func (x *ListPromotionsRequest) Reset() { *x = ListPromotionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPromotionsRequest) String() string { @@ -378,7 +370,7 @@ func (*ListPromotionsRequest) ProtoMessage() {} func (x *ListPromotionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,11 +421,9 @@ type ListPromotionsResponse struct { func (x *ListPromotionsResponse) Reset() { *x = ListPromotionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPromotionsResponse) String() string { @@ -444,7 +434,7 @@ func (*ListPromotionsResponse) ProtoMessage() {} func (x *ListPromotionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,68 +682,6 @@ func file_google_shopping_merchant_promotions_v1beta_promotions_proto_init() { return } file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Promotion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InsertPromotionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetPromotionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPromotionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListPromotionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_promotions_v1beta_promotions_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/shopping/merchant/promotions/apiv1beta/promotionspb/promotions_common.pb.go b/shopping/merchant/promotions/apiv1beta/promotionspb/promotions_common.pb.go index 22a863f28628..fdc5b12ea64b 100755 --- a/shopping/merchant/promotions/apiv1beta/promotionspb/promotions_common.pb.go +++ b/shopping/merchant/promotions/apiv1beta/promotionspb/promotions_common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/promotions/v1beta/promotions_common.proto @@ -661,11 +661,9 @@ type Attributes struct { func (x *Attributes) Reset() { *x = Attributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attributes) String() string { @@ -676,7 +674,7 @@ func (*Attributes) ProtoMessage() {} func (x *Attributes) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,11 +923,9 @@ type PromotionStatus struct { func (x *PromotionStatus) Reset() { *x = PromotionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromotionStatus) String() string { @@ -940,7 +936,7 @@ func (*PromotionStatus) ProtoMessage() {} func (x *PromotionStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -997,11 +993,9 @@ type PromotionStatus_DestinationStatus struct { func (x *PromotionStatus_DestinationStatus) Reset() { *x = PromotionStatus_DestinationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromotionStatus_DestinationStatus) String() string { @@ -1012,7 +1006,7 @@ func (*PromotionStatus_DestinationStatus) ProtoMessage() {} func (x *PromotionStatus_DestinationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1065,9 @@ type PromotionStatus_ItemLevelIssue struct { func (x *PromotionStatus_ItemLevelIssue) Reset() { *x = PromotionStatus_ItemLevelIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PromotionStatus_ItemLevelIssue) String() string { @@ -1086,7 +1078,7 @@ func (*PromotionStatus_ItemLevelIssue) ProtoMessage() {} func (x *PromotionStatus_ItemLevelIssue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1519,56 +1511,6 @@ func file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_ini if File_google_shopping_merchant_promotions_v1beta_promotions_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PromotionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PromotionStatus_DestinationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_promotions_v1beta_promotions_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PromotionStatus_ItemLevelIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/quota/apiv1beta/helpers.go b/shopping/merchant/quota/apiv1beta/helpers.go index f1f49a839d4b..d9b5531a6900 100755 --- a/shopping/merchant/quota/apiv1beta/helpers.go +++ b/shopping/merchant/quota/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package quota import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/quota/apiv1beta/quota_client.go b/shopping/merchant/quota/apiv1beta/quota_client.go index 3a042690281f..2cc341c7f684 100755 --- a/shopping/merchant/quota/apiv1beta/quota_client.go +++ b/shopping/merchant/quota/apiv1beta/quota_client.go @@ -19,7 +19,7 @@ package quota import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( quotapb "cloud.google.com/go/shopping/merchant/quota/apiv1beta/quotapb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -158,6 +157,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new quota service client based on gRPC. @@ -184,6 +185,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: quotapb.NewQuotaServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -230,6 +232,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new quota service rest client. @@ -247,6 +251,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -310,7 +315,7 @@ func (c *gRPCClient) ListQuotaGroups(ctx context.Context, req *quotapb.ListQuota } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListQuotaGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListQuotaGroups, req, settings.GRPC, c.logger, "ListQuotaGroups") return err }, opts...) if err != nil { @@ -382,21 +387,10 @@ func (c *restClient) ListQuotaGroups(ctx context.Context, req *quotapb.ListQuota } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListQuotaGroups") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/quota/apiv1beta/quota_client_example_go123_test.go b/shopping/merchant/quota/apiv1beta/quota_client_example_go123_test.go index 89058065a620..a322b5e6ac97 100644 --- a/shopping/merchant/quota/apiv1beta/quota_client_example_go123_test.go +++ b/shopping/merchant/quota/apiv1beta/quota_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListQuotaGroups_all() { } for resp, err := range c.ListQuotaGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/quota/apiv1beta/quotapb/quota.pb.go b/shopping/merchant/quota/apiv1beta/quotapb/quota.pb.go index db3eba250271..2084d1d2239d 100755 --- a/shopping/merchant/quota/apiv1beta/quotapb/quota.pb.go +++ b/shopping/merchant/quota/apiv1beta/quotapb/quota.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/quota/v1beta/quota.proto @@ -66,11 +66,9 @@ type QuotaGroup struct { func (x *QuotaGroup) Reset() { *x = QuotaGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QuotaGroup) String() string { @@ -81,7 +79,7 @@ func (*QuotaGroup) ProtoMessage() {} func (x *QuotaGroup) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type MethodDetails struct { func (x *MethodDetails) Reset() { *x = MethodDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MethodDetails) String() string { @@ -165,7 +161,7 @@ func (*MethodDetails) ProtoMessage() {} func (x *MethodDetails) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type ListQuotaGroupsRequest struct { func (x *ListQuotaGroupsRequest) Reset() { *x = ListQuotaGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaGroupsRequest) String() string { @@ -242,7 +236,7 @@ func (*ListQuotaGroupsRequest) ProtoMessage() {} func (x *ListQuotaGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type ListQuotaGroupsResponse struct { func (x *ListQuotaGroupsResponse) Reset() { *x = ListQuotaGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListQuotaGroupsResponse) String() string { @@ -311,7 +303,7 @@ func (*ListQuotaGroupsResponse) ProtoMessage() {} func (x *ListQuotaGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -477,56 +469,6 @@ func file_google_shopping_merchant_quota_v1beta_quota_proto_init() { if File_google_shopping_merchant_quota_v1beta_quota_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*QuotaGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MethodDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_quota_v1beta_quota_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListQuotaGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/shopping/merchant/reports/apiv1beta/helpers.go b/shopping/merchant/reports/apiv1beta/helpers.go index 1d26034f90f7..4b1fe4a756e2 100755 --- a/shopping/merchant/reports/apiv1beta/helpers.go +++ b/shopping/merchant/reports/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package reports import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "merchantapi.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/content", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/shopping/merchant/reports/apiv1beta/report_client.go b/shopping/merchant/reports/apiv1beta/report_client.go index 18f9098ce978..55cccd076205 100755 --- a/shopping/merchant/reports/apiv1beta/report_client.go +++ b/shopping/merchant/reports/apiv1beta/report_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( reportspb "cloud.google.com/go/shopping/merchant/reports/apiv1beta/reportspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -161,6 +160,8 @@ type reportGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewReportClient creates a new report service client based on gRPC. @@ -188,6 +189,7 @@ func NewReportClient(ctx context.Context, opts ...option.ClientOption) (*ReportC connPool: connPool, reportClient: reportspb.NewReportServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -234,6 +236,8 @@ type reportRESTClient struct { // Points back to the CallOptions field of the containing ReportClient CallOptions **ReportCallOptions + + logger *slog.Logger } // NewReportRESTClient creates a new report service rest client. @@ -252,6 +256,7 @@ func NewReportRESTClient(ctx context.Context, opts ...option.ClientOption) (*Rep endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -315,7 +320,7 @@ func (c *reportGRPCClient) Search(ctx context.Context, req *reportspb.SearchRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.reportClient.Search(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.reportClient.Search, req, settings.GRPC, c.logger, "Search") return err }, opts...) if err != nil { @@ -388,21 +393,10 @@ func (c *reportRESTClient) Search(ctx context.Context, req *reportspb.SearchRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Search") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/shopping/merchant/reports/apiv1beta/report_client_example_go123_test.go b/shopping/merchant/reports/apiv1beta/report_client_example_go123_test.go index 2d39a3451fa9..66c2afecc056 100644 --- a/shopping/merchant/reports/apiv1beta/report_client_example_go123_test.go +++ b/shopping/merchant/reports/apiv1beta/report_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleReportClient_Search_all() { } for resp, err := range c.Search(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/shopping/merchant/reports/apiv1beta/reportspb/reports.pb.go b/shopping/merchant/reports/apiv1beta/reportspb/reports.pb.go index 4b9788cf9a3b..ed36fe8f8968 100755 --- a/shopping/merchant/reports/apiv1beta/reportspb/reports.pb.go +++ b/shopping/merchant/reports/apiv1beta/reportspb/reports.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/merchant/reports/v1beta/reports.proto @@ -729,11 +729,9 @@ type SearchRequest struct { func (x *SearchRequest) Reset() { *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchRequest) String() string { @@ -744,7 +742,7 @@ func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +800,9 @@ type SearchResponse struct { func (x *SearchResponse) Reset() { *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResponse) String() string { @@ -817,7 +813,7 @@ func (*SearchResponse) ProtoMessage() {} func (x *SearchResponse) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -883,11 +879,9 @@ type ReportRow struct { func (x *ReportRow) Reset() { *x = ReportRow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRow) String() string { @@ -898,7 +892,7 @@ func (*ReportRow) ProtoMessage() {} func (x *ReportRow) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1100,11 +1094,9 @@ type ProductPerformanceView struct { func (x *ProductPerformanceView) Reset() { *x = ProductPerformanceView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductPerformanceView) String() string { @@ -1115,7 +1107,7 @@ func (*ProductPerformanceView) ProtoMessage() {} func (x *ProductPerformanceView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,11 +1427,9 @@ type ProductView struct { func (x *ProductView) Reset() { *x = ProductView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductView) String() string { @@ -1450,7 +1440,7 @@ func (*ProductView) ProtoMessage() {} func (x *ProductView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1732,9 @@ type PriceCompetitivenessProductView struct { func (x *PriceCompetitivenessProductView) Reset() { *x = PriceCompetitivenessProductView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceCompetitivenessProductView) String() string { @@ -1757,7 +1745,7 @@ func (*PriceCompetitivenessProductView) ProtoMessage() {} func (x *PriceCompetitivenessProductView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1967,11 +1955,9 @@ type PriceInsightsProductView struct { func (x *PriceInsightsProductView) Reset() { *x = PriceInsightsProductView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PriceInsightsProductView) String() string { @@ -1982,7 +1968,7 @@ func (*PriceInsightsProductView) ProtoMessage() {} func (x *PriceInsightsProductView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2237,11 +2223,9 @@ type BestSellersProductClusterView struct { func (x *BestSellersProductClusterView) Reset() { *x = BestSellersProductClusterView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BestSellersProductClusterView) String() string { @@ -2252,7 +2236,7 @@ func (*BestSellersProductClusterView) ProtoMessage() {} func (x *BestSellersProductClusterView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2460,11 +2444,9 @@ type BestSellersBrandView struct { func (x *BestSellersBrandView) Reset() { *x = BestSellersBrandView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BestSellersBrandView) String() string { @@ -2475,7 +2457,7 @@ func (*BestSellersBrandView) ProtoMessage() {} func (x *BestSellersBrandView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2598,11 +2580,9 @@ type NonProductPerformanceView struct { func (x *NonProductPerformanceView) Reset() { *x = NonProductPerformanceView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NonProductPerformanceView) String() string { @@ -2613,7 +2593,7 @@ func (*NonProductPerformanceView) ProtoMessage() {} func (x *NonProductPerformanceView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2745,11 +2725,9 @@ type CompetitiveVisibilityCompetitorView struct { func (x *CompetitiveVisibilityCompetitorView) Reset() { *x = CompetitiveVisibilityCompetitorView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompetitiveVisibilityCompetitorView) String() string { @@ -2760,7 +2738,7 @@ func (*CompetitiveVisibilityCompetitorView) ProtoMessage() {} func (x *CompetitiveVisibilityCompetitorView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2927,11 +2905,9 @@ type CompetitiveVisibilityTopMerchantView struct { func (x *CompetitiveVisibilityTopMerchantView) Reset() { *x = CompetitiveVisibilityTopMerchantView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompetitiveVisibilityTopMerchantView) String() string { @@ -2942,7 +2918,7 @@ func (*CompetitiveVisibilityTopMerchantView) ProtoMessage() {} func (x *CompetitiveVisibilityTopMerchantView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3078,11 +3054,9 @@ type CompetitiveVisibilityBenchmarkView struct { func (x *CompetitiveVisibilityBenchmarkView) Reset() { *x = CompetitiveVisibilityBenchmarkView{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompetitiveVisibilityBenchmarkView) String() string { @@ -3093,7 +3067,7 @@ func (*CompetitiveVisibilityBenchmarkView) ProtoMessage() {} func (x *CompetitiveVisibilityBenchmarkView) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3160,11 +3134,9 @@ type MarketingMethod struct { func (x *MarketingMethod) Reset() { *x = MarketingMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarketingMethod) String() string { @@ -3175,7 +3147,7 @@ func (*MarketingMethod) ProtoMessage() {} func (x *MarketingMethod) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3200,11 +3172,9 @@ type ReportGranularity struct { func (x *ReportGranularity) Reset() { *x = ReportGranularity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportGranularity) String() string { @@ -3215,7 +3185,7 @@ func (*ReportGranularity) ProtoMessage() {} func (x *ReportGranularity) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3239,11 +3209,9 @@ type RelativeDemand struct { func (x *RelativeDemand) Reset() { *x = RelativeDemand{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelativeDemand) String() string { @@ -3254,7 +3222,7 @@ func (*RelativeDemand) ProtoMessage() {} func (x *RelativeDemand) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3279,11 +3247,9 @@ type RelativeDemandChangeType struct { func (x *RelativeDemandChangeType) Reset() { *x = RelativeDemandChangeType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelativeDemandChangeType) String() string { @@ -3294,7 +3260,7 @@ func (*RelativeDemandChangeType) ProtoMessage() {} func (x *RelativeDemandChangeType) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3318,11 +3284,9 @@ type TrafficSource struct { func (x *TrafficSource) Reset() { *x = TrafficSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TrafficSource) String() string { @@ -3333,7 +3297,7 @@ func (*TrafficSource) ProtoMessage() {} func (x *TrafficSource) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3364,11 +3328,9 @@ type ProductView_ItemIssue struct { func (x *ProductView_ItemIssue) Reset() { *x = ProductView_ItemIssue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductView_ItemIssue) String() string { @@ -3379,7 +3341,7 @@ func (*ProductView_ItemIssue) ProtoMessage() {} func (x *ProductView_ItemIssue) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3430,11 +3392,9 @@ type ProductView_ItemIssue_ItemIssueType struct { func (x *ProductView_ItemIssue_ItemIssueType) Reset() { *x = ProductView_ItemIssue_ItemIssueType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductView_ItemIssue_ItemIssueType) String() string { @@ -3445,7 +3405,7 @@ func (*ProductView_ItemIssue_ItemIssueType) ProtoMessage() {} func (x *ProductView_ItemIssue_ItemIssueType) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3490,11 +3450,9 @@ type ProductView_ItemIssue_ItemIssueSeverity struct { func (x *ProductView_ItemIssue_ItemIssueSeverity) Reset() { *x = ProductView_ItemIssue_ItemIssueSeverity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductView_ItemIssue_ItemIssueSeverity) String() string { @@ -3505,7 +3463,7 @@ func (*ProductView_ItemIssue_ItemIssueSeverity) ProtoMessage() {} func (x *ProductView_ItemIssue_ItemIssueSeverity) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3552,11 +3510,9 @@ type ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext st func (x *ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext) Reset() { *x = ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext) String() string { @@ -3567,7 +3523,7 @@ func (*ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext) func (x *ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4726,272 +4682,6 @@ func file_google_shopping_merchant_reports_v1beta_reports_proto_init() { if File_google_shopping_merchant_reports_v1beta_reports_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReportRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProductPerformanceView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProductView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PriceCompetitivenessProductView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PriceInsightsProductView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*BestSellersProductClusterView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BestSellersBrandView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*NonProductPerformanceView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompetitiveVisibilityCompetitorView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CompetitiveVisibilityTopMerchantView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CompetitiveVisibilityBenchmarkView); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*MarketingMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReportGranularity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*RelativeDemand); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RelativeDemandChangeType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TrafficSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ProductView_ItemIssue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ProductView_ItemIssue_ItemIssueType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ProductView_ItemIssue_ItemIssueSeverity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[3].OneofWrappers = []any{} file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[4].OneofWrappers = []any{} file_google_shopping_merchant_reports_v1beta_reports_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/shopping/type/typepb/types.pb.go b/shopping/type/typepb/types.pb.go index f9cdfa60de61..6da6bf21c97d 100755 --- a/shopping/type/typepb/types.pb.go +++ b/shopping/type/typepb/types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/shopping/type/types.proto @@ -343,11 +343,9 @@ type Weight struct { func (x *Weight) Reset() { *x = Weight{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Weight) String() string { @@ -358,7 +356,7 @@ func (*Weight) ProtoMessage() {} func (x *Weight) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -404,11 +402,9 @@ type Price struct { func (x *Price) Reset() { *x = Price{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Price) String() string { @@ -419,7 +415,7 @@ func (*Price) ProtoMessage() {} func (x *Price) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,11 +463,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -482,7 +476,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +524,9 @@ type Destination struct { func (x *Destination) Reset() { *x = Destination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Destination) String() string { @@ -545,7 +537,7 @@ func (*Destination) ProtoMessage() {} func (x *Destination) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,11 +567,9 @@ type ReportingContext struct { func (x *ReportingContext) Reset() { *x = ReportingContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportingContext) String() string { @@ -590,7 +580,7 @@ func (*ReportingContext) ProtoMessage() {} func (x *ReportingContext) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +606,9 @@ type Channel struct { func (x *Channel) Reset() { *x = Channel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_shopping_type_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_shopping_type_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Channel) String() string { @@ -631,7 +619,7 @@ func (*Channel) ProtoMessage() {} func (x *Channel) ProtoReflect() protoreflect.Message { mi := &file_google_shopping_type_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -777,80 +765,6 @@ func file_google_shopping_type_types_proto_init() { if File_google_shopping_type_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_shopping_type_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Weight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_type_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Price); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_type_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_type_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Destination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_type_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReportingContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_shopping_type_types_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Channel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_shopping_type_types_proto_msgTypes[0].OneofWrappers = []any{} file_google_shopping_type_types_proto_msgTypes[1].OneofWrappers = []any{} file_google_shopping_type_types_proto_msgTypes[2].OneofWrappers = []any{} diff --git a/spanner/admin/database/apiv1/database_admin_client.go b/spanner/admin/database/apiv1/database_admin_client.go index c067a3755185..70c38d6b4f3d 100755 --- a/spanner/admin/database/apiv1/database_admin_client.go +++ b/spanner/admin/database/apiv1/database_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" databasepb "cloud.google.com/go/spanner/admin/database/apiv1/databasepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1059,6 +1058,8 @@ type databaseAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewDatabaseAdminClient creates a new database admin client based on gRPC. @@ -1095,6 +1096,7 @@ func NewDatabaseAdminClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, databaseAdminClient: databasepb.NewDatabaseAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -1158,6 +1160,8 @@ type databaseAdminRESTClient struct { // Points back to the CallOptions field of the containing DatabaseAdminClient CallOptions **DatabaseAdminCallOptions + + logger *slog.Logger } // NewDatabaseAdminRESTClient creates a new database admin rest client. @@ -1185,6 +1189,7 @@ func NewDatabaseAdminRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1258,7 +1263,7 @@ func (c *databaseAdminGRPCClient) ListDatabases(ctx context.Context, req *databa } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListDatabases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListDatabases, req, settings.GRPC, c.logger, "ListDatabases") return err }, opts...) if err != nil { @@ -1293,7 +1298,7 @@ func (c *databaseAdminGRPCClient) CreateDatabase(ctx context.Context, req *datab var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.CreateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.CreateDatabase, req, settings.GRPC, c.logger, "CreateDatabase") return err }, opts...) if err != nil { @@ -1313,7 +1318,7 @@ func (c *databaseAdminGRPCClient) GetDatabase(ctx context.Context, req *database var resp *databasepb.Database err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.GetDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.GetDatabase, req, settings.GRPC, c.logger, "GetDatabase") return err }, opts...) if err != nil { @@ -1331,7 +1336,7 @@ func (c *databaseAdminGRPCClient) UpdateDatabase(ctx context.Context, req *datab var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.UpdateDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.UpdateDatabase, req, settings.GRPC, c.logger, "UpdateDatabase") return err }, opts...) if err != nil { @@ -1351,7 +1356,7 @@ func (c *databaseAdminGRPCClient) UpdateDatabaseDdl(ctx context.Context, req *da var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.UpdateDatabaseDdl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.UpdateDatabaseDdl, req, settings.GRPC, c.logger, "UpdateDatabaseDdl") return err }, opts...) if err != nil { @@ -1370,7 +1375,7 @@ func (c *databaseAdminGRPCClient) DropDatabase(ctx context.Context, req *databas opts = append((*c.CallOptions).DropDatabase[0:len((*c.CallOptions).DropDatabase):len((*c.CallOptions).DropDatabase)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.databaseAdminClient.DropDatabase(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.databaseAdminClient.DropDatabase, req, settings.GRPC, c.logger, "DropDatabase") return err }, opts...) return err @@ -1385,7 +1390,7 @@ func (c *databaseAdminGRPCClient) GetDatabaseDdl(ctx context.Context, req *datab var resp *databasepb.GetDatabaseDdlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.GetDatabaseDdl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.GetDatabaseDdl, req, settings.GRPC, c.logger, "GetDatabaseDdl") return err }, opts...) if err != nil { @@ -1403,7 +1408,7 @@ func (c *databaseAdminGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1421,7 +1426,7 @@ func (c *databaseAdminGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1439,7 +1444,7 @@ func (c *databaseAdminGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *databaseAdminGRPCClient) CreateBackup(ctx context.Context, req *databas var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.CreateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.CreateBackup, req, settings.GRPC, c.logger, "CreateBackup") return err }, opts...) if err != nil { @@ -1477,7 +1482,7 @@ func (c *databaseAdminGRPCClient) CopyBackup(ctx context.Context, req *databasep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.CopyBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.CopyBackup, req, settings.GRPC, c.logger, "CopyBackup") return err }, opts...) if err != nil { @@ -1497,7 +1502,7 @@ func (c *databaseAdminGRPCClient) GetBackup(ctx context.Context, req *databasepb var resp *databasepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.GetBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.GetBackup, req, settings.GRPC, c.logger, "GetBackup") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *databaseAdminGRPCClient) UpdateBackup(ctx context.Context, req *databas var resp *databasepb.Backup err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.UpdateBackup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.UpdateBackup, req, settings.GRPC, c.logger, "UpdateBackup") return err }, opts...) if err != nil { @@ -1532,7 +1537,7 @@ func (c *databaseAdminGRPCClient) DeleteBackup(ctx context.Context, req *databas opts = append((*c.CallOptions).DeleteBackup[0:len((*c.CallOptions).DeleteBackup):len((*c.CallOptions).DeleteBackup)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.databaseAdminClient.DeleteBackup(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.databaseAdminClient.DeleteBackup, req, settings.GRPC, c.logger, "DeleteBackup") return err }, opts...) return err @@ -1558,7 +1563,7 @@ func (c *databaseAdminGRPCClient) ListBackups(ctx context.Context, req *database } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListBackups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListBackups, req, settings.GRPC, c.logger, "ListBackups") return err }, opts...) if err != nil { @@ -1593,7 +1598,7 @@ func (c *databaseAdminGRPCClient) RestoreDatabase(ctx context.Context, req *data var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.RestoreDatabase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.RestoreDatabase, req, settings.GRPC, c.logger, "RestoreDatabase") return err }, opts...) if err != nil { @@ -1624,7 +1629,7 @@ func (c *databaseAdminGRPCClient) ListDatabaseOperations(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListDatabaseOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListDatabaseOperations, req, settings.GRPC, c.logger, "ListDatabaseOperations") return err }, opts...) if err != nil { @@ -1670,7 +1675,7 @@ func (c *databaseAdminGRPCClient) ListBackupOperations(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListBackupOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListBackupOperations, req, settings.GRPC, c.logger, "ListBackupOperations") return err }, opts...) if err != nil { @@ -1716,7 +1721,7 @@ func (c *databaseAdminGRPCClient) ListDatabaseRoles(ctx context.Context, req *da } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListDatabaseRoles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListDatabaseRoles, req, settings.GRPC, c.logger, "ListDatabaseRoles") return err }, opts...) if err != nil { @@ -1751,7 +1756,7 @@ func (c *databaseAdminGRPCClient) CreateBackupSchedule(ctx context.Context, req var resp *databasepb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.CreateBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.CreateBackupSchedule, req, settings.GRPC, c.logger, "CreateBackupSchedule") return err }, opts...) if err != nil { @@ -1769,7 +1774,7 @@ func (c *databaseAdminGRPCClient) GetBackupSchedule(ctx context.Context, req *da var resp *databasepb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.GetBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.GetBackupSchedule, req, settings.GRPC, c.logger, "GetBackupSchedule") return err }, opts...) if err != nil { @@ -1787,7 +1792,7 @@ func (c *databaseAdminGRPCClient) UpdateBackupSchedule(ctx context.Context, req var resp *databasepb.BackupSchedule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.UpdateBackupSchedule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.UpdateBackupSchedule, req, settings.GRPC, c.logger, "UpdateBackupSchedule") return err }, opts...) if err != nil { @@ -1804,7 +1809,7 @@ func (c *databaseAdminGRPCClient) DeleteBackupSchedule(ctx context.Context, req opts = append((*c.CallOptions).DeleteBackupSchedule[0:len((*c.CallOptions).DeleteBackupSchedule):len((*c.CallOptions).DeleteBackupSchedule)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.databaseAdminClient.DeleteBackupSchedule(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.databaseAdminClient.DeleteBackupSchedule, req, settings.GRPC, c.logger, "DeleteBackupSchedule") return err }, opts...) return err @@ -1830,7 +1835,7 @@ func (c *databaseAdminGRPCClient) ListBackupSchedules(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.databaseAdminClient.ListBackupSchedules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.databaseAdminClient.ListBackupSchedules, req, settings.GRPC, c.logger, "ListBackupSchedules") return err }, opts...) if err != nil { @@ -1864,7 +1869,7 @@ func (c *databaseAdminGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1878,7 +1883,7 @@ func (c *databaseAdminGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1893,7 +1898,7 @@ func (c *databaseAdminGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1922,7 +1927,7 @@ func (c *databaseAdminGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1993,21 +1998,10 @@ func (c *databaseAdminRESTClient) ListDatabases(ctx context.Context, req *databa } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabases") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2082,21 +2076,10 @@ func (c *databaseAdminRESTClient) CreateDatabase(ctx context.Context, req *datab httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatabase") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2147,17 +2130,7 @@ func (c *databaseAdminRESTClient) GetDatabase(ctx context.Context, req *database httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatabase") if err != nil { return err } @@ -2259,21 +2232,10 @@ func (c *databaseAdminRESTClient) UpdateDatabase(ctx context.Context, req *datab httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatabase") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2336,21 +2298,10 @@ func (c *databaseAdminRESTClient) UpdateDatabaseDdl(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDatabaseDdl") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2402,15 +2353,8 @@ func (c *databaseAdminRESTClient) DropDatabase(ctx context.Context, req *databas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DropDatabase") + return err }, opts...) } @@ -2449,17 +2393,7 @@ func (c *databaseAdminRESTClient) GetDatabaseDdl(ctx context.Context, req *datab httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatabaseDdl") if err != nil { return err } @@ -2521,17 +2455,7 @@ func (c *databaseAdminRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2594,17 +2518,7 @@ func (c *databaseAdminRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2669,17 +2583,7 @@ func (c *databaseAdminRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2756,21 +2660,10 @@ func (c *databaseAdminRESTClient) CreateBackup(ctx context.Context, req *databas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2838,21 +2731,10 @@ func (c *databaseAdminRESTClient) CopyBackup(ctx context.Context, req *databasep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CopyBackup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2904,17 +2786,7 @@ func (c *databaseAdminRESTClient) GetBackup(ctx context.Context, req *databasepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackup") if err != nil { return err } @@ -2979,17 +2851,7 @@ func (c *databaseAdminRESTClient) UpdateBackup(ctx context.Context, req *databas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackup") if err != nil { return err } @@ -3037,15 +2899,8 @@ func (c *databaseAdminRESTClient) DeleteBackup(ctx context.Context, req *databas httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackup") + return err }, opts...) } @@ -3099,21 +2954,10 @@ func (c *databaseAdminRESTClient) ListBackups(ctx context.Context, req *database } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3197,21 +3041,10 @@ func (c *databaseAdminRESTClient) RestoreDatabase(ctx context.Context, req *data httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RestoreDatabase") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3284,21 +3117,10 @@ func (c *databaseAdminRESTClient) ListDatabaseOperations(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabaseOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3385,21 +3207,10 @@ func (c *databaseAdminRESTClient) ListBackupOperations(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3474,21 +3285,10 @@ func (c *databaseAdminRESTClient) ListDatabaseRoles(ctx context.Context, req *da } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatabaseRoles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3559,17 +3359,7 @@ func (c *databaseAdminRESTClient) CreateBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBackupSchedule") if err != nil { return err } @@ -3619,17 +3409,7 @@ func (c *databaseAdminRESTClient) GetBackupSchedule(ctx context.Context, req *da httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBackupSchedule") if err != nil { return err } @@ -3693,17 +3473,7 @@ func (c *databaseAdminRESTClient) UpdateBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBackupSchedule") if err != nil { return err } @@ -3750,15 +3520,8 @@ func (c *databaseAdminRESTClient) DeleteBackupSchedule(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBackupSchedule") + return err }, opts...) } @@ -3807,21 +3570,10 @@ func (c *databaseAdminRESTClient) ListBackupSchedules(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBackupSchedules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3881,15 +3633,8 @@ func (c *databaseAdminRESTClient) CancelOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CancelOperation") + return err }, opts...) } @@ -3923,15 +3668,8 @@ func (c *databaseAdminRESTClient) DeleteOperation(ctx context.Context, req *long httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3968,17 +3706,7 @@ func (c *databaseAdminRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4043,21 +3771,10 @@ func (c *databaseAdminRESTClient) ListOperations(ctx context.Context, req *longr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/spanner/admin/database/apiv1/database_admin_client_example_go123_test.go b/spanner/admin/database/apiv1/database_admin_client_example_go123_test.go index 6a14a99455b7..ae5f531c6f00 100644 --- a/spanner/admin/database/apiv1/database_admin_client_example_go123_test.go +++ b/spanner/admin/database/apiv1/database_admin_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleDatabaseAdminClient_ListBackupOperations_all() { } for resp, err := range c.ListBackupOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleDatabaseAdminClient_ListBackupSchedules_all() { } for resp, err := range c.ListBackupSchedules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleDatabaseAdminClient_ListBackups_all() { } for resp, err := range c.ListBackups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleDatabaseAdminClient_ListDatabaseOperations_all() { } for resp, err := range c.ListDatabaseOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleDatabaseAdminClient_ListDatabaseRoles_all() { } for resp, err := range c.ListDatabaseRoles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleDatabaseAdminClient_ListDatabases_all() { } for resp, err := range c.ListDatabases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleDatabaseAdminClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/spanner/admin/database/apiv1/databasepb/backup.pb.go b/spanner/admin/database/apiv1/databasepb/backup.pb.go index 7a5db895c507..bf90a02bb2e5 100755 --- a/spanner/admin/database/apiv1/databasepb/backup.pb.go +++ b/spanner/admin/database/apiv1/databasepb/backup.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/database/v1/backup.proto @@ -347,11 +347,9 @@ type Backup struct { func (x *Backup) Reset() { *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Backup) String() string { @@ -362,7 +360,7 @@ func (*Backup) ProtoMessage() {} func (x *Backup) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -533,11 +531,9 @@ type CreateBackupRequest struct { func (x *CreateBackupRequest) Reset() { *x = CreateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupRequest) String() string { @@ -548,7 +544,7 @@ func (*CreateBackupRequest) ProtoMessage() {} func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -623,11 +619,9 @@ type CreateBackupMetadata struct { func (x *CreateBackupMetadata) Reset() { *x = CreateBackupMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupMetadata) String() string { @@ -638,7 +632,7 @@ func (*CreateBackupMetadata) ProtoMessage() {} func (x *CreateBackupMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -718,11 +712,9 @@ type CopyBackupRequest struct { func (x *CopyBackupRequest) Reset() { *x = CopyBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyBackupRequest) String() string { @@ -733,7 +725,7 @@ func (*CopyBackupRequest) ProtoMessage() {} func (x *CopyBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +811,9 @@ type CopyBackupMetadata struct { func (x *CopyBackupMetadata) Reset() { *x = CopyBackupMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyBackupMetadata) String() string { @@ -834,7 +824,7 @@ func (*CopyBackupMetadata) ProtoMessage() {} func (x *CopyBackupMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +889,9 @@ type UpdateBackupRequest struct { func (x *UpdateBackupRequest) Reset() { *x = UpdateBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupRequest) String() string { @@ -914,7 +902,7 @@ func (*UpdateBackupRequest) ProtoMessage() {} func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -958,11 +946,9 @@ type GetBackupRequest struct { func (x *GetBackupRequest) Reset() { *x = GetBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupRequest) String() string { @@ -973,7 +959,7 @@ func (*GetBackupRequest) ProtoMessage() {} func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1010,11 +996,9 @@ type DeleteBackupRequest struct { func (x *DeleteBackupRequest) Reset() { *x = DeleteBackupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupRequest) String() string { @@ -1025,7 +1009,7 @@ func (*DeleteBackupRequest) ProtoMessage() {} func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1095,9 @@ type ListBackupsRequest struct { func (x *ListBackupsRequest) Reset() { *x = ListBackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsRequest) String() string { @@ -1126,7 +1108,7 @@ func (*ListBackupsRequest) ProtoMessage() {} func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1187,11 +1169,9 @@ type ListBackupsResponse struct { func (x *ListBackupsResponse) Reset() { *x = ListBackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupsResponse) String() string { @@ -1202,7 +1182,7 @@ func (*ListBackupsResponse) ProtoMessage() {} func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1325,11 +1305,9 @@ type ListBackupOperationsRequest struct { func (x *ListBackupOperationsRequest) Reset() { *x = ListBackupOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupOperationsRequest) String() string { @@ -1340,7 +1318,7 @@ func (*ListBackupOperationsRequest) ProtoMessage() {} func (x *ListBackupOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1408,11 +1386,9 @@ type ListBackupOperationsResponse struct { func (x *ListBackupOperationsResponse) Reset() { *x = ListBackupOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupOperationsResponse) String() string { @@ -1423,7 +1399,7 @@ func (*ListBackupOperationsResponse) ProtoMessage() {} func (x *ListBackupOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1476,11 +1452,9 @@ type BackupInfo struct { func (x *BackupInfo) Reset() { *x = BackupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupInfo) String() string { @@ -1491,7 +1465,7 @@ func (*BackupInfo) ProtoMessage() {} func (x *BackupInfo) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1568,11 +1542,9 @@ type CreateBackupEncryptionConfig struct { func (x *CreateBackupEncryptionConfig) Reset() { *x = CreateBackupEncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupEncryptionConfig) String() string { @@ -1583,7 +1555,7 @@ func (*CreateBackupEncryptionConfig) ProtoMessage() {} func (x *CreateBackupEncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1654,11 +1626,9 @@ type CopyBackupEncryptionConfig struct { func (x *CopyBackupEncryptionConfig) Reset() { *x = CopyBackupEncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyBackupEncryptionConfig) String() string { @@ -1669,7 +1639,7 @@ func (*CopyBackupEncryptionConfig) ProtoMessage() {} func (x *CopyBackupEncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1716,11 +1686,9 @@ type FullBackupSpec struct { func (x *FullBackupSpec) Reset() { *x = FullBackupSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FullBackupSpec) String() string { @@ -1731,7 +1699,7 @@ func (*FullBackupSpec) ProtoMessage() {} func (x *FullBackupSpec) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1760,11 +1728,9 @@ type IncrementalBackupSpec struct { func (x *IncrementalBackupSpec) Reset() { *x = IncrementalBackupSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IncrementalBackupSpec) String() string { @@ -1775,7 +1741,7 @@ func (*IncrementalBackupSpec) ProtoMessage() {} func (x *IncrementalBackupSpec) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2218,212 +2184,6 @@ func file_google_spanner_admin_database_v1_backup_proto_init() { return } file_google_spanner_admin_database_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_database_v1_backup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CopyBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CopyBackupMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BackupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupEncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CopyBackupEncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FullBackupSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*IncrementalBackupSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spanner/admin/database/apiv1/databasepb/backup_schedule.pb.go b/spanner/admin/database/apiv1/databasepb/backup_schedule.pb.go index fd7ca6b0dc38..8265207601fa 100755 --- a/spanner/admin/database/apiv1/databasepb/backup_schedule.pb.go +++ b/spanner/admin/database/apiv1/databasepb/backup_schedule.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/database/v1/backup_schedule.proto @@ -55,11 +55,9 @@ type BackupScheduleSpec struct { func (x *BackupScheduleSpec) Reset() { *x = BackupScheduleSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupScheduleSpec) String() string { @@ -70,7 +68,7 @@ func (*BackupScheduleSpec) ProtoMessage() {} func (x *BackupScheduleSpec) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,11 +153,9 @@ type BackupSchedule struct { func (x *BackupSchedule) Reset() { *x = BackupSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BackupSchedule) String() string { @@ -170,7 +166,7 @@ func (*BackupSchedule) ProtoMessage() {} func (x *BackupSchedule) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +290,9 @@ type CrontabSpec struct { func (x *CrontabSpec) Reset() { *x = CrontabSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CrontabSpec) String() string { @@ -309,7 +303,7 @@ func (*CrontabSpec) ProtoMessage() {} func (x *CrontabSpec) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +358,9 @@ type CreateBackupScheduleRequest struct { func (x *CreateBackupScheduleRequest) Reset() { *x = CreateBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBackupScheduleRequest) String() string { @@ -379,7 +371,7 @@ func (*CreateBackupScheduleRequest) ProtoMessage() {} func (x *CreateBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +422,9 @@ type GetBackupScheduleRequest struct { func (x *GetBackupScheduleRequest) Reset() { *x = GetBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBackupScheduleRequest) String() string { @@ -445,7 +435,7 @@ func (*GetBackupScheduleRequest) ProtoMessage() {} func (x *GetBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +472,9 @@ type DeleteBackupScheduleRequest struct { func (x *DeleteBackupScheduleRequest) Reset() { *x = DeleteBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBackupScheduleRequest) String() string { @@ -497,7 +485,7 @@ func (*DeleteBackupScheduleRequest) ProtoMessage() {} func (x *DeleteBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +531,9 @@ type ListBackupSchedulesRequest struct { func (x *ListBackupSchedulesRequest) Reset() { *x = ListBackupSchedulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupSchedulesRequest) String() string { @@ -558,7 +544,7 @@ func (*ListBackupSchedulesRequest) ProtoMessage() {} func (x *ListBackupSchedulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -611,11 +597,9 @@ type ListBackupSchedulesResponse struct { func (x *ListBackupSchedulesResponse) Reset() { *x = ListBackupSchedulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBackupSchedulesResponse) String() string { @@ -626,7 +610,7 @@ func (*ListBackupSchedulesResponse) ProtoMessage() {} func (x *ListBackupSchedulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -676,11 +660,9 @@ type UpdateBackupScheduleRequest struct { func (x *UpdateBackupScheduleRequest) Reset() { *x = UpdateBackupScheduleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBackupScheduleRequest) String() string { @@ -691,7 +673,7 @@ func (*UpdateBackupScheduleRequest) ProtoMessage() {} func (x *UpdateBackupScheduleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,116 +924,6 @@ func file_google_spanner_admin_database_v1_backup_schedule_proto_init() { return } file_google_spanner_admin_database_v1_backup_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BackupScheduleSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BackupSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CrontabSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupSchedulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListBackupSchedulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBackupScheduleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_admin_database_v1_backup_schedule_proto_msgTypes[0].OneofWrappers = []any{ (*BackupScheduleSpec_CronSpec)(nil), } diff --git a/spanner/admin/database/apiv1/databasepb/common.pb.go b/spanner/admin/database/apiv1/databasepb/common.pb.go index ba93d9a2640e..e7e499882b5d 100755 --- a/spanner/admin/database/apiv1/databasepb/common.pb.go +++ b/spanner/admin/database/apiv1/databasepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/database/v1/common.proto @@ -168,11 +168,9 @@ type OperationProgress struct { func (x *OperationProgress) Reset() { *x = OperationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationProgress) String() string { @@ -183,7 +181,7 @@ func (*OperationProgress) ProtoMessage() {} func (x *OperationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,11 +247,9 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionConfig) String() string { @@ -264,7 +260,7 @@ func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +308,9 @@ type EncryptionInfo struct { func (x *EncryptionInfo) Reset() { *x = EncryptionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EncryptionInfo) String() string { @@ -327,7 +321,7 @@ func (*EncryptionInfo) ProtoMessage() {} func (x *EncryptionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,44 +501,6 @@ func file_google_spanner_admin_database_v1_common_proto_init() { if File_google_spanner_admin_database_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_database_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EncryptionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spanner/admin/database/apiv1/databasepb/spanner_database_admin.pb.go b/spanner/admin/database/apiv1/databasepb/spanner_database_admin.pb.go index 2be6d9793862..eb64a73f02e4 100755 --- a/spanner/admin/database/apiv1/databasepb/spanner_database_admin.pb.go +++ b/spanner/admin/database/apiv1/databasepb/spanner_database_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/database/v1/spanner_database_admin.proto @@ -237,11 +237,9 @@ type RestoreInfo struct { func (x *RestoreInfo) Reset() { *x = RestoreInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreInfo) String() string { @@ -252,7 +250,7 @@ func (*RestoreInfo) ProtoMessage() {} func (x *RestoreInfo) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +366,9 @@ type Database struct { func (x *Database) Reset() { *x = Database{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Database) String() string { @@ -383,7 +379,7 @@ func (*Database) ProtoMessage() {} func (x *Database) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +500,9 @@ type ListDatabasesRequest struct { func (x *ListDatabasesRequest) Reset() { *x = ListDatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesRequest) String() string { @@ -519,7 +513,7 @@ func (*ListDatabasesRequest) ProtoMessage() {} func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +566,9 @@ type ListDatabasesResponse struct { func (x *ListDatabasesResponse) Reset() { *x = ListDatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabasesResponse) String() string { @@ -587,7 +579,7 @@ func (*ListDatabasesResponse) ProtoMessage() {} func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,11 +657,9 @@ type CreateDatabaseRequest struct { func (x *CreateDatabaseRequest) Reset() { *x = CreateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseRequest) String() string { @@ -680,7 +670,7 @@ func (*CreateDatabaseRequest) ProtoMessage() {} func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +740,9 @@ type CreateDatabaseMetadata struct { func (x *CreateDatabaseMetadata) Reset() { *x = CreateDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatabaseMetadata) String() string { @@ -765,7 +753,7 @@ func (*CreateDatabaseMetadata) ProtoMessage() {} func (x *CreateDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +789,9 @@ type GetDatabaseRequest struct { func (x *GetDatabaseRequest) Reset() { *x = GetDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseRequest) String() string { @@ -816,7 +802,7 @@ func (*GetDatabaseRequest) ProtoMessage() {} func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -856,11 +842,9 @@ type UpdateDatabaseRequest struct { func (x *UpdateDatabaseRequest) Reset() { *x = UpdateDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseRequest) String() string { @@ -871,7 +855,7 @@ func (*UpdateDatabaseRequest) ProtoMessage() {} func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -921,11 +905,9 @@ type UpdateDatabaseMetadata struct { func (x *UpdateDatabaseMetadata) Reset() { *x = UpdateDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseMetadata) String() string { @@ -936,7 +918,7 @@ func (*UpdateDatabaseMetadata) ProtoMessage() {} func (x *UpdateDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1040,11 +1022,9 @@ type UpdateDatabaseDdlRequest struct { func (x *UpdateDatabaseDdlRequest) Reset() { *x = UpdateDatabaseDdlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseDdlRequest) String() string { @@ -1055,7 +1035,7 @@ func (*UpdateDatabaseDdlRequest) ProtoMessage() {} func (x *UpdateDatabaseDdlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1103,9 @@ type DdlStatementActionInfo struct { func (x *DdlStatementActionInfo) Reset() { *x = DdlStatementActionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DdlStatementActionInfo) String() string { @@ -1138,7 +1116,7 @@ func (*DdlStatementActionInfo) ProtoMessage() {} func (x *DdlStatementActionInfo) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1209,11 +1187,9 @@ type UpdateDatabaseDdlMetadata struct { func (x *UpdateDatabaseDdlMetadata) Reset() { *x = UpdateDatabaseDdlMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDatabaseDdlMetadata) String() string { @@ -1224,7 +1200,7 @@ func (*UpdateDatabaseDdlMetadata) ProtoMessage() {} func (x *UpdateDatabaseDdlMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,11 +1270,9 @@ type DropDatabaseRequest struct { func (x *DropDatabaseRequest) Reset() { *x = DropDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DropDatabaseRequest) String() string { @@ -1309,7 +1283,7 @@ func (*DropDatabaseRequest) ProtoMessage() {} func (x *DropDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1320,9 @@ type GetDatabaseDdlRequest struct { func (x *GetDatabaseDdlRequest) Reset() { *x = GetDatabaseDdlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseDdlRequest) String() string { @@ -1361,7 +1333,7 @@ func (*GetDatabaseDdlRequest) ProtoMessage() {} func (x *GetDatabaseDdlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1403,11 +1375,9 @@ type GetDatabaseDdlResponse struct { func (x *GetDatabaseDdlResponse) Reset() { *x = GetDatabaseDdlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatabaseDdlResponse) String() string { @@ -1418,7 +1388,7 @@ func (*GetDatabaseDdlResponse) ProtoMessage() {} func (x *GetDatabaseDdlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,11 +1486,9 @@ type ListDatabaseOperationsRequest struct { func (x *ListDatabaseOperationsRequest) Reset() { *x = ListDatabaseOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabaseOperationsRequest) String() string { @@ -1531,7 +1499,7 @@ func (*ListDatabaseOperationsRequest) ProtoMessage() {} func (x *ListDatabaseOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1595,11 +1563,9 @@ type ListDatabaseOperationsResponse struct { func (x *ListDatabaseOperationsResponse) Reset() { *x = ListDatabaseOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabaseOperationsResponse) String() string { @@ -1610,7 +1576,7 @@ func (*ListDatabaseOperationsResponse) ProtoMessage() {} func (x *ListDatabaseOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1674,11 +1640,9 @@ type RestoreDatabaseRequest struct { func (x *RestoreDatabaseRequest) Reset() { *x = RestoreDatabaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatabaseRequest) String() string { @@ -1689,7 +1653,7 @@ func (*RestoreDatabaseRequest) ProtoMessage() {} func (x *RestoreDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1785,11 +1749,9 @@ type RestoreDatabaseEncryptionConfig struct { func (x *RestoreDatabaseEncryptionConfig) Reset() { *x = RestoreDatabaseEncryptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatabaseEncryptionConfig) String() string { @@ -1800,7 +1762,7 @@ func (*RestoreDatabaseEncryptionConfig) ProtoMessage() {} func (x *RestoreDatabaseEncryptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1888,11 +1850,9 @@ type RestoreDatabaseMetadata struct { func (x *RestoreDatabaseMetadata) Reset() { *x = RestoreDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreDatabaseMetadata) String() string { @@ -1903,7 +1863,7 @@ func (*RestoreDatabaseMetadata) ProtoMessage() {} func (x *RestoreDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1995,11 +1955,9 @@ type OptimizeRestoredDatabaseMetadata struct { func (x *OptimizeRestoredDatabaseMetadata) Reset() { *x = OptimizeRestoredDatabaseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptimizeRestoredDatabaseMetadata) String() string { @@ -2010,7 +1968,7 @@ func (*OptimizeRestoredDatabaseMetadata) ProtoMessage() {} func (x *OptimizeRestoredDatabaseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2053,11 +2011,9 @@ type DatabaseRole struct { func (x *DatabaseRole) Reset() { *x = DatabaseRole{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatabaseRole) String() string { @@ -2068,7 +2024,7 @@ func (*DatabaseRole) ProtoMessage() {} func (x *DatabaseRole) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2113,11 +2069,9 @@ type ListDatabaseRolesRequest struct { func (x *ListDatabaseRolesRequest) Reset() { *x = ListDatabaseRolesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabaseRolesRequest) String() string { @@ -2128,7 +2082,7 @@ func (*ListDatabaseRolesRequest) ProtoMessage() {} func (x *ListDatabaseRolesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2181,11 +2135,9 @@ type ListDatabaseRolesResponse struct { func (x *ListDatabaseRolesResponse) Reset() { *x = ListDatabaseRolesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatabaseRolesResponse) String() string { @@ -2196,7 +2148,7 @@ func (*ListDatabaseRolesResponse) ProtoMessage() {} func (x *ListDatabaseRolesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3218,296 +3170,6 @@ func file_google_spanner_admin_database_v1_spanner_database_admin_proto_init() { file_google_spanner_admin_database_v1_backup_proto_init() file_google_spanner_admin_database_v1_backup_schedule_proto_init() file_google_spanner_admin_database_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RestoreInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Database); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseDdlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DdlStatementActionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDatabaseDdlMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DropDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseDdlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetDatabaseDdlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabaseOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabaseOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatabaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatabaseEncryptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*RestoreDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*OptimizeRestoredDatabaseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DatabaseRole); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabaseRolesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListDatabaseRolesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_admin_database_v1_spanner_database_admin_proto_msgTypes[0].OneofWrappers = []any{ (*RestoreInfo_BackupInfo)(nil), } diff --git a/spanner/admin/database/apiv1/helpers.go b/spanner/admin/database/apiv1/helpers.go index 7ef3aa6adfa6..0c537dcfbfee 100755 --- a/spanner/admin/database/apiv1/helpers.go +++ b/spanner/admin/database/apiv1/helpers.go @@ -18,10 +18,20 @@ package database import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "spanner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/spanner.admin", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/spanner/admin/instance/apiv1/helpers.go b/spanner/admin/instance/apiv1/helpers.go index bfcfa4bf7b23..e6456bf4ba5f 100755 --- a/spanner/admin/instance/apiv1/helpers.go +++ b/spanner/admin/instance/apiv1/helpers.go @@ -18,10 +18,20 @@ package instance import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "spanner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/spanner.admin", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/spanner/admin/instance/apiv1/instance_admin_client.go b/spanner/admin/instance/apiv1/instance_admin_client.go index 9d109e4acde1..b725414e6108 100755 --- a/spanner/admin/instance/apiv1/instance_admin_client.go +++ b/spanner/admin/instance/apiv1/instance_admin_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" instancepb "cloud.google.com/go/spanner/admin/instance/apiv1/instancepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -943,6 +942,8 @@ type instanceAdminGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewInstanceAdminClient creates a new instance admin client based on gRPC. @@ -989,6 +990,7 @@ func NewInstanceAdminClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, instanceAdminClient: instancepb.NewInstanceAdminClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1051,6 +1053,8 @@ type instanceAdminRESTClient struct { // Points back to the CallOptions field of the containing InstanceAdminClient CallOptions **InstanceAdminCallOptions + + logger *slog.Logger } // NewInstanceAdminRESTClient creates a new instance admin rest client. @@ -1088,6 +1092,7 @@ func NewInstanceAdminRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1161,7 +1166,7 @@ func (c *instanceAdminGRPCClient) ListInstanceConfigs(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.ListInstanceConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.ListInstanceConfigs, req, settings.GRPC, c.logger, "ListInstanceConfigs") return err }, opts...) if err != nil { @@ -1196,7 +1201,7 @@ func (c *instanceAdminGRPCClient) GetInstanceConfig(ctx context.Context, req *in var resp *instancepb.InstanceConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.GetInstanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.GetInstanceConfig, req, settings.GRPC, c.logger, "GetInstanceConfig") return err }, opts...) if err != nil { @@ -1214,7 +1219,7 @@ func (c *instanceAdminGRPCClient) CreateInstanceConfig(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.CreateInstanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.CreateInstanceConfig, req, settings.GRPC, c.logger, "CreateInstanceConfig") return err }, opts...) if err != nil { @@ -1234,7 +1239,7 @@ func (c *instanceAdminGRPCClient) UpdateInstanceConfig(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.UpdateInstanceConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.UpdateInstanceConfig, req, settings.GRPC, c.logger, "UpdateInstanceConfig") return err }, opts...) if err != nil { @@ -1253,7 +1258,7 @@ func (c *instanceAdminGRPCClient) DeleteInstanceConfig(ctx context.Context, req opts = append((*c.CallOptions).DeleteInstanceConfig[0:len((*c.CallOptions).DeleteInstanceConfig):len((*c.CallOptions).DeleteInstanceConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.instanceAdminClient.DeleteInstanceConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.instanceAdminClient.DeleteInstanceConfig, req, settings.GRPC, c.logger, "DeleteInstanceConfig") return err }, opts...) return err @@ -1279,7 +1284,7 @@ func (c *instanceAdminGRPCClient) ListInstanceConfigOperations(ctx context.Conte } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.ListInstanceConfigOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.ListInstanceConfigOperations, req, settings.GRPC, c.logger, "ListInstanceConfigOperations") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *instanceAdminGRPCClient) ListInstances(ctx context.Context, req *instan } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -1371,7 +1376,7 @@ func (c *instanceAdminGRPCClient) ListInstancePartitions(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.ListInstancePartitions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.ListInstancePartitions, req, settings.GRPC, c.logger, "ListInstancePartitions") return err }, opts...) if err != nil { @@ -1406,7 +1411,7 @@ func (c *instanceAdminGRPCClient) GetInstance(ctx context.Context, req *instance var resp *instancepb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1424,7 +1429,7 @@ func (c *instanceAdminGRPCClient) CreateInstance(ctx context.Context, req *insta var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.CreateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.CreateInstance, req, settings.GRPC, c.logger, "CreateInstance") return err }, opts...) if err != nil { @@ -1444,7 +1449,7 @@ func (c *instanceAdminGRPCClient) UpdateInstance(ctx context.Context, req *insta var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.UpdateInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.UpdateInstance, req, settings.GRPC, c.logger, "UpdateInstance") return err }, opts...) if err != nil { @@ -1463,7 +1468,7 @@ func (c *instanceAdminGRPCClient) DeleteInstance(ctx context.Context, req *insta opts = append((*c.CallOptions).DeleteInstance[0:len((*c.CallOptions).DeleteInstance):len((*c.CallOptions).DeleteInstance)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.instanceAdminClient.DeleteInstance(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.instanceAdminClient.DeleteInstance, req, settings.GRPC, c.logger, "DeleteInstance") return err }, opts...) return err @@ -1478,7 +1483,7 @@ func (c *instanceAdminGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.S var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1496,7 +1501,7 @@ func (c *instanceAdminGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.G var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1514,7 +1519,7 @@ func (c *instanceAdminGRPCClient) TestIamPermissions(ctx context.Context, req *i var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1532,7 +1537,7 @@ func (c *instanceAdminGRPCClient) GetInstancePartition(ctx context.Context, req var resp *instancepb.InstancePartition err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.GetInstancePartition(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.GetInstancePartition, req, settings.GRPC, c.logger, "GetInstancePartition") return err }, opts...) if err != nil { @@ -1550,7 +1555,7 @@ func (c *instanceAdminGRPCClient) CreateInstancePartition(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.CreateInstancePartition(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.CreateInstancePartition, req, settings.GRPC, c.logger, "CreateInstancePartition") return err }, opts...) if err != nil { @@ -1569,7 +1574,7 @@ func (c *instanceAdminGRPCClient) DeleteInstancePartition(ctx context.Context, r opts = append((*c.CallOptions).DeleteInstancePartition[0:len((*c.CallOptions).DeleteInstancePartition):len((*c.CallOptions).DeleteInstancePartition)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.instanceAdminClient.DeleteInstancePartition(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.instanceAdminClient.DeleteInstancePartition, req, settings.GRPC, c.logger, "DeleteInstancePartition") return err }, opts...) return err @@ -1584,7 +1589,7 @@ func (c *instanceAdminGRPCClient) UpdateInstancePartition(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.UpdateInstancePartition(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.UpdateInstancePartition, req, settings.GRPC, c.logger, "UpdateInstancePartition") return err }, opts...) if err != nil { @@ -1615,7 +1620,7 @@ func (c *instanceAdminGRPCClient) ListInstancePartitionOperations(ctx context.Co } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.ListInstancePartitionOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.ListInstancePartitionOperations, req, settings.GRPC, c.logger, "ListInstancePartitionOperations") return err }, opts...) if err != nil { @@ -1650,7 +1655,7 @@ func (c *instanceAdminGRPCClient) MoveInstance(ctx context.Context, req *instanc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.instanceAdminClient.MoveInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.instanceAdminClient.MoveInstance, req, settings.GRPC, c.logger, "MoveInstance") return err }, opts...) if err != nil { @@ -1706,21 +1711,10 @@ func (c *instanceAdminRESTClient) ListInstanceConfigs(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstanceConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1783,17 +1777,7 @@ func (c *instanceAdminRESTClient) GetInstanceConfig(ctx context.Context, req *in httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstanceConfig") if err != nil { return err } @@ -1890,21 +1874,10 @@ func (c *instanceAdminRESTClient) CreateInstanceConfig(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstanceConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2007,21 +1980,10 @@ func (c *instanceAdminRESTClient) UpdateInstanceConfig(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstanceConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2082,15 +2044,8 @@ func (c *instanceAdminRESTClient) DeleteInstanceConfig(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstanceConfig") + return err }, opts...) } @@ -2152,21 +2107,10 @@ func (c *instanceAdminRESTClient) ListInstanceConfigOperations(ctx context.Conte } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstanceConfigOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2251,21 +2195,10 @@ func (c *instanceAdminRESTClient) ListInstances(ctx context.Context, req *instan } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2347,21 +2280,10 @@ func (c *instanceAdminRESTClient) ListInstancePartitions(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstancePartitions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2431,17 +2353,7 @@ func (c *instanceAdminRESTClient) GetInstance(ctx context.Context, req *instance httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -2534,21 +2446,10 @@ func (c *instanceAdminRESTClient) CreateInstance(ctx context.Context, req *insta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2647,21 +2548,10 @@ func (c *instanceAdminRESTClient) UpdateInstance(ctx context.Context, req *insta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2719,15 +2609,8 @@ func (c *instanceAdminRESTClient) DeleteInstance(ctx context.Context, req *insta httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstance") + return err }, opts...) } @@ -2774,17 +2657,7 @@ func (c *instanceAdminRESTClient) SetIamPolicy(ctx context.Context, req *iampb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -2844,17 +2717,7 @@ func (c *instanceAdminRESTClient) GetIamPolicy(ctx context.Context, req *iampb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetIamPolicy") if err != nil { return err } @@ -2915,17 +2778,7 @@ func (c *instanceAdminRESTClient) TestIamPermissions(ctx context.Context, req *i httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -2975,17 +2828,7 @@ func (c *instanceAdminRESTClient) GetInstancePartition(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstancePartition") if err != nil { return err } @@ -3081,21 +2924,10 @@ func (c *instanceAdminRESTClient) CreateInstancePartition(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInstancePartition") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3152,15 +2984,8 @@ func (c *instanceAdminRESTClient) DeleteInstancePartition(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInstancePartition") + return err }, opts...) } @@ -3249,21 +3074,10 @@ func (c *instanceAdminRESTClient) UpdateInstancePartition(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInstancePartition") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3350,21 +3164,10 @@ func (c *instanceAdminRESTClient) ListInstancePartitionOperations(ctx context.Co } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstancePartitionOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3503,21 +3306,10 @@ func (c *instanceAdminRESTClient) MoveInstance(ctx context.Context, req *instanc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MoveInstance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/spanner/admin/instance/apiv1/instance_admin_client_example_go123_test.go b/spanner/admin/instance/apiv1/instance_admin_client_example_go123_test.go index 4cd44696642c..5944a8cc144d 100644 --- a/spanner/admin/instance/apiv1/instance_admin_client_example_go123_test.go +++ b/spanner/admin/instance/apiv1/instance_admin_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleInstanceAdminClient_ListInstanceConfigOperations_all() { } for resp, err := range c.ListInstanceConfigOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleInstanceAdminClient_ListInstanceConfigs_all() { } for resp, err := range c.ListInstanceConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleInstanceAdminClient_ListInstancePartitionOperations_all() { } for resp, err := range c.ListInstancePartitionOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleInstanceAdminClient_ListInstancePartitions_all() { } for resp, err := range c.ListInstancePartitions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -148,7 +148,7 @@ func ExampleInstanceAdminClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/spanner/admin/instance/apiv1/instancepb/common.pb.go b/spanner/admin/instance/apiv1/instancepb/common.pb.go index 1732d5dff251..3a6758611d14 100755 --- a/spanner/admin/instance/apiv1/instancepb/common.pb.go +++ b/spanner/admin/instance/apiv1/instancepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/instance/v1/common.proto @@ -111,11 +111,9 @@ type OperationProgress struct { func (x *OperationProgress) Reset() { *x = OperationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationProgress) String() string { @@ -126,7 +124,7 @@ func (*OperationProgress) ProtoMessage() {} func (x *OperationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -174,11 +172,9 @@ type ReplicaSelection struct { func (x *ReplicaSelection) Reset() { *x = ReplicaSelection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicaSelection) String() string { @@ -189,7 +185,7 @@ func (*ReplicaSelection) ProtoMessage() {} func (x *ReplicaSelection) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,32 +295,6 @@ func file_google_spanner_admin_instance_v1_common_proto_init() { if File_google_spanner_admin_instance_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_instance_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReplicaSelection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spanner/admin/instance/apiv1/instancepb/spanner_instance_admin.pb.go b/spanner/admin/instance/apiv1/instancepb/spanner_instance_admin.pb.go index ec08acaed4cf..e0b15ece5271 100755 --- a/spanner/admin/instance/apiv1/instancepb/spanner_instance_admin.pb.go +++ b/spanner/admin/instance/apiv1/instancepb/spanner_instance_admin.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -475,11 +475,9 @@ type ReplicaInfo struct { func (x *ReplicaInfo) Reset() { *x = ReplicaInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicaInfo) String() string { @@ -490,7 +488,7 @@ func (*ReplicaInfo) ProtoMessage() {} func (x *ReplicaInfo) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +601,9 @@ type InstanceConfig struct { func (x *InstanceConfig) Reset() { *x = InstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstanceConfig) String() string { @@ -618,7 +614,7 @@ func (*InstanceConfig) ProtoMessage() {} func (x *InstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +731,9 @@ type ReplicaComputeCapacity struct { func (x *ReplicaComputeCapacity) Reset() { *x = ReplicaComputeCapacity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicaComputeCapacity) String() string { @@ -750,7 +744,7 @@ func (*ReplicaComputeCapacity) ProtoMessage() {} func (x *ReplicaComputeCapacity) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +835,9 @@ type AutoscalingConfig struct { func (x *AutoscalingConfig) Reset() { *x = AutoscalingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig) String() string { @@ -856,7 +848,7 @@ func (*AutoscalingConfig) ProtoMessage() {} func (x *AutoscalingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1012,11 +1004,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -1027,7 +1017,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1163,11 +1153,9 @@ type ListInstanceConfigsRequest struct { func (x *ListInstanceConfigsRequest) Reset() { *x = ListInstanceConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceConfigsRequest) String() string { @@ -1178,7 +1166,7 @@ func (*ListInstanceConfigsRequest) ProtoMessage() {} func (x *ListInstanceConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1231,11 +1219,9 @@ type ListInstanceConfigsResponse struct { func (x *ListInstanceConfigsResponse) Reset() { *x = ListInstanceConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceConfigsResponse) String() string { @@ -1246,7 +1232,7 @@ func (*ListInstanceConfigsResponse) ProtoMessage() {} func (x *ListInstanceConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1275,9 @@ type GetInstanceConfigRequest struct { func (x *GetInstanceConfigRequest) Reset() { *x = GetInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceConfigRequest) String() string { @@ -1304,7 +1288,7 @@ func (*GetInstanceConfigRequest) ProtoMessage() {} func (x *GetInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1338,9 @@ type CreateInstanceConfigRequest struct { func (x *CreateInstanceConfigRequest) Reset() { *x = CreateInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceConfigRequest) String() string { @@ -1369,7 +1351,7 @@ func (*CreateInstanceConfigRequest) ProtoMessage() {} func (x *CreateInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1423,9 @@ type UpdateInstanceConfigRequest struct { func (x *UpdateInstanceConfigRequest) Reset() { *x = UpdateInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceConfigRequest) String() string { @@ -1456,7 +1436,7 @@ func (*UpdateInstanceConfigRequest) ProtoMessage() {} func (x *UpdateInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1498,9 @@ type DeleteInstanceConfigRequest struct { func (x *DeleteInstanceConfigRequest) Reset() { *x = DeleteInstanceConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceConfigRequest) String() string { @@ -1533,7 +1511,7 @@ func (*DeleteInstanceConfigRequest) ProtoMessage() {} func (x *DeleteInstanceConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1614,9 @@ type ListInstanceConfigOperationsRequest struct { func (x *ListInstanceConfigOperationsRequest) Reset() { *x = ListInstanceConfigOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceConfigOperationsRequest) String() string { @@ -1651,7 +1627,7 @@ func (*ListInstanceConfigOperationsRequest) ProtoMessage() {} func (x *ListInstanceConfigOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1715,11 +1691,9 @@ type ListInstanceConfigOperationsResponse struct { func (x *ListInstanceConfigOperationsResponse) Reset() { *x = ListInstanceConfigOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstanceConfigOperationsResponse) String() string { @@ -1730,7 +1704,7 @@ func (*ListInstanceConfigOperationsResponse) ProtoMessage() {} func (x *ListInstanceConfigOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1778,11 +1752,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -1793,7 +1765,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1843,11 +1815,9 @@ type CreateInstanceRequest struct { func (x *CreateInstanceRequest) Reset() { *x = CreateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceRequest) String() string { @@ -1858,7 +1828,7 @@ func (*CreateInstanceRequest) ProtoMessage() {} func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1943,11 +1913,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -1958,7 +1926,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2030,11 +1998,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -2045,7 +2011,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2103,11 +2069,9 @@ type UpdateInstanceRequest struct { func (x *UpdateInstanceRequest) Reset() { *x = UpdateInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceRequest) String() string { @@ -2118,7 +2082,7 @@ func (*UpdateInstanceRequest) ProtoMessage() {} func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2161,11 +2125,9 @@ type DeleteInstanceRequest struct { func (x *DeleteInstanceRequest) Reset() { *x = DeleteInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstanceRequest) String() string { @@ -2176,7 +2138,7 @@ func (*DeleteInstanceRequest) ProtoMessage() {} func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,11 +2185,9 @@ type CreateInstanceMetadata struct { func (x *CreateInstanceMetadata) Reset() { *x = CreateInstanceMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceMetadata) String() string { @@ -2238,7 +2198,7 @@ func (*CreateInstanceMetadata) ProtoMessage() {} func (x *CreateInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2313,11 +2273,9 @@ type UpdateInstanceMetadata struct { func (x *UpdateInstanceMetadata) Reset() { *x = UpdateInstanceMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceMetadata) String() string { @@ -2328,7 +2286,7 @@ func (*UpdateInstanceMetadata) ProtoMessage() {} func (x *UpdateInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2397,11 +2355,9 @@ type CreateInstanceConfigMetadata struct { func (x *CreateInstanceConfigMetadata) Reset() { *x = CreateInstanceConfigMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstanceConfigMetadata) String() string { @@ -2412,7 +2368,7 @@ func (*CreateInstanceConfigMetadata) ProtoMessage() {} func (x *CreateInstanceConfigMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2467,11 +2423,9 @@ type UpdateInstanceConfigMetadata struct { func (x *UpdateInstanceConfigMetadata) Reset() { *x = UpdateInstanceConfigMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstanceConfigMetadata) String() string { @@ -2482,7 +2436,7 @@ func (*UpdateInstanceConfigMetadata) ProtoMessage() {} func (x *UpdateInstanceConfigMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2583,11 +2537,9 @@ type InstancePartition struct { func (x *InstancePartition) Reset() { *x = InstancePartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstancePartition) String() string { @@ -2598,7 +2550,7 @@ func (*InstancePartition) ProtoMessage() {} func (x *InstancePartition) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2750,11 +2702,9 @@ type CreateInstancePartitionMetadata struct { func (x *CreateInstancePartitionMetadata) Reset() { *x = CreateInstancePartitionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstancePartitionMetadata) String() string { @@ -2765,7 +2715,7 @@ func (*CreateInstancePartitionMetadata) ProtoMessage() {} func (x *CreateInstancePartitionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2831,11 +2781,9 @@ type CreateInstancePartitionRequest struct { func (x *CreateInstancePartitionRequest) Reset() { *x = CreateInstancePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInstancePartitionRequest) String() string { @@ -2846,7 +2794,7 @@ func (*CreateInstancePartitionRequest) ProtoMessage() {} func (x *CreateInstancePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2902,11 +2850,9 @@ type DeleteInstancePartitionRequest struct { func (x *DeleteInstancePartitionRequest) Reset() { *x = DeleteInstancePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInstancePartitionRequest) String() string { @@ -2917,7 +2863,7 @@ func (*DeleteInstancePartitionRequest) ProtoMessage() {} func (x *DeleteInstancePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2961,11 +2907,9 @@ type GetInstancePartitionRequest struct { func (x *GetInstancePartitionRequest) Reset() { *x = GetInstancePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstancePartitionRequest) String() string { @@ -2976,7 +2920,7 @@ func (*GetInstancePartitionRequest) ProtoMessage() {} func (x *GetInstancePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +2965,9 @@ type UpdateInstancePartitionRequest struct { func (x *UpdateInstancePartitionRequest) Reset() { *x = UpdateInstancePartitionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstancePartitionRequest) String() string { @@ -3036,7 +2978,7 @@ func (*UpdateInstancePartitionRequest) ProtoMessage() {} func (x *UpdateInstancePartitionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3088,11 +3030,9 @@ type UpdateInstancePartitionMetadata struct { func (x *UpdateInstancePartitionMetadata) Reset() { *x = UpdateInstancePartitionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInstancePartitionMetadata) String() string { @@ -3103,7 +3043,7 @@ func (*UpdateInstancePartitionMetadata) ProtoMessage() {} func (x *UpdateInstancePartitionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3175,11 +3115,9 @@ type ListInstancePartitionsRequest struct { func (x *ListInstancePartitionsRequest) Reset() { *x = ListInstancePartitionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancePartitionsRequest) String() string { @@ -3190,7 +3128,7 @@ func (*ListInstancePartitionsRequest) ProtoMessage() {} func (x *ListInstancePartitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3255,11 +3193,9 @@ type ListInstancePartitionsResponse struct { func (x *ListInstancePartitionsResponse) Reset() { *x = ListInstancePartitionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancePartitionsResponse) String() string { @@ -3270,7 +3206,7 @@ func (*ListInstancePartitionsResponse) ProtoMessage() {} func (x *ListInstancePartitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3379,11 +3315,9 @@ type ListInstancePartitionOperationsRequest struct { func (x *ListInstancePartitionOperationsRequest) Reset() { *x = ListInstancePartitionOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancePartitionOperationsRequest) String() string { @@ -3394,7 +3328,7 @@ func (*ListInstancePartitionOperationsRequest) ProtoMessage() {} func (x *ListInstancePartitionOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3470,11 +3404,9 @@ type ListInstancePartitionOperationsResponse struct { func (x *ListInstancePartitionOperationsResponse) Reset() { *x = ListInstancePartitionOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancePartitionOperationsResponse) String() string { @@ -3485,7 +3417,7 @@ func (*ListInstancePartitionOperationsResponse) ProtoMessage() {} func (x *ListInstancePartitionOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3538,11 +3470,9 @@ type MoveInstanceRequest struct { func (x *MoveInstanceRequest) Reset() { *x = MoveInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveInstanceRequest) String() string { @@ -3553,7 +3483,7 @@ func (*MoveInstanceRequest) ProtoMessage() {} func (x *MoveInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3592,11 +3522,9 @@ type MoveInstanceResponse struct { func (x *MoveInstanceResponse) Reset() { *x = MoveInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveInstanceResponse) String() string { @@ -3607,7 +3535,7 @@ func (*MoveInstanceResponse) ProtoMessage() {} func (x *MoveInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3644,11 +3572,9 @@ type MoveInstanceMetadata struct { func (x *MoveInstanceMetadata) Reset() { *x = MoveInstanceMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MoveInstanceMetadata) String() string { @@ -3659,7 +3585,7 @@ func (*MoveInstanceMetadata) ProtoMessage() {} func (x *MoveInstanceMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3725,11 +3651,9 @@ type AutoscalingConfig_AutoscalingLimits struct { func (x *AutoscalingConfig_AutoscalingLimits) Reset() { *x = AutoscalingConfig_AutoscalingLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig_AutoscalingLimits) String() string { @@ -3740,7 +3664,7 @@ func (*AutoscalingConfig_AutoscalingLimits) ProtoMessage() {} func (x *AutoscalingConfig_AutoscalingLimits) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3862,11 +3786,9 @@ type AutoscalingConfig_AutoscalingTargets struct { func (x *AutoscalingConfig_AutoscalingTargets) Reset() { *x = AutoscalingConfig_AutoscalingTargets{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig_AutoscalingTargets) String() string { @@ -3877,7 +3799,7 @@ func (*AutoscalingConfig_AutoscalingTargets) ProtoMessage() {} func (x *AutoscalingConfig_AutoscalingTargets) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3923,11 +3845,9 @@ type AutoscalingConfig_AsymmetricAutoscalingOption struct { func (x *AutoscalingConfig_AsymmetricAutoscalingOption) Reset() { *x = AutoscalingConfig_AsymmetricAutoscalingOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig_AsymmetricAutoscalingOption) String() string { @@ -3938,7 +3858,7 @@ func (*AutoscalingConfig_AsymmetricAutoscalingOption) ProtoMessage() {} func (x *AutoscalingConfig_AsymmetricAutoscalingOption) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3987,11 +3907,9 @@ type AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides st func (x *AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) Reset() { *x = AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) String() string { @@ -4002,7 +3920,7 @@ func (*AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) func (x *AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5322,500 +5240,6 @@ func file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_init() { return } file_google_spanner_admin_instance_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReplicaInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*InstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReplicaComputeCapacity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceConfigOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListInstanceConfigOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstanceConfigMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstanceConfigMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*InstancePartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstancePartitionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateInstancePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInstancePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetInstancePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstancePartitionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInstancePartitionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancePartitionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancePartitionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancePartitionOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancePartitionOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*MoveInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*MoveInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*MoveInstanceMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig_AutoscalingLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig_AutoscalingTargets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig_AsymmetricAutoscalingOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2].OneofWrappers = []any{ (*ReplicaComputeCapacity_NodeCount)(nil), (*ReplicaComputeCapacity_ProcessingUnits)(nil), diff --git a/spanner/apiv1/helpers.go b/spanner/apiv1/helpers.go index 9eb0d8f97673..8bdbaa4058a4 100755 --- a/spanner/apiv1/helpers.go +++ b/spanner/apiv1/helpers.go @@ -18,10 +18,20 @@ package spanner import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "spanner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/spanner.data", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/spanner/apiv1/spanner_client.go b/spanner/apiv1/spanner_client.go index e59d2c92c9e9..56d4a0137d68 100755 --- a/spanner/apiv1/spanner_client.go +++ b/spanner/apiv1/spanner_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( spannerpb "cloud.google.com/go/spanner/apiv1/spannerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -714,6 +713,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new spanner client based on gRPC. @@ -743,6 +744,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: spannerpb.NewSpannerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -789,6 +791,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new spanner rest client. @@ -809,6 +813,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -861,7 +866,7 @@ func (c *gRPCClient) CreateSession(ctx context.Context, req *spannerpb.CreateSes var resp *spannerpb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSession, req, settings.GRPC, c.logger, "CreateSession") return err }, opts...) if err != nil { @@ -879,7 +884,7 @@ func (c *gRPCClient) BatchCreateSessions(ctx context.Context, req *spannerpb.Bat var resp *spannerpb.BatchCreateSessionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchCreateSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchCreateSessions, req, settings.GRPC, c.logger, "BatchCreateSessions") return err }, opts...) if err != nil { @@ -897,7 +902,7 @@ func (c *gRPCClient) GetSession(ctx context.Context, req *spannerpb.GetSessionRe var resp *spannerpb.Session err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSession, req, settings.GRPC, c.logger, "GetSession") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *gRPCClient) ListSessions(ctx context.Context, req *spannerpb.ListSessio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSessions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSessions, req, settings.GRPC, c.logger, "ListSessions") return err }, opts...) if err != nil { @@ -960,7 +965,7 @@ func (c *gRPCClient) DeleteSession(ctx context.Context, req *spannerpb.DeleteSes opts = append((*c.CallOptions).DeleteSession[0:len((*c.CallOptions).DeleteSession):len((*c.CallOptions).DeleteSession)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteSession(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteSession, req, settings.GRPC, c.logger, "DeleteSession") return err }, opts...) return err @@ -975,7 +980,7 @@ func (c *gRPCClient) ExecuteSql(ctx context.Context, req *spannerpb.ExecuteSqlRe var resp *spannerpb.ResultSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExecuteSql(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExecuteSql, req, settings.GRPC, c.logger, "ExecuteSql") return err }, opts...) if err != nil { @@ -993,7 +998,9 @@ func (c *gRPCClient) ExecuteStreamingSql(ctx context.Context, req *spannerpb.Exe var resp spannerpb.Spanner_ExecuteStreamingSqlClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ExecuteStreamingSql") resp, err = c.client.ExecuteStreamingSql(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ExecuteStreamingSql") return err }, opts...) if err != nil { @@ -1011,7 +1018,7 @@ func (c *gRPCClient) ExecuteBatchDml(ctx context.Context, req *spannerpb.Execute var resp *spannerpb.ExecuteBatchDmlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ExecuteBatchDml(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ExecuteBatchDml, req, settings.GRPC, c.logger, "ExecuteBatchDml") return err }, opts...) if err != nil { @@ -1029,7 +1036,7 @@ func (c *gRPCClient) Read(ctx context.Context, req *spannerpb.ReadRequest, opts var resp *spannerpb.ResultSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Read(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Read, req, settings.GRPC, c.logger, "Read") return err }, opts...) if err != nil { @@ -1047,7 +1054,9 @@ func (c *gRPCClient) StreamingRead(ctx context.Context, req *spannerpb.ReadReque var resp spannerpb.Spanner_StreamingReadClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRead") resp, err = c.client.StreamingRead(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRead") return err }, opts...) if err != nil { @@ -1065,7 +1074,7 @@ func (c *gRPCClient) BeginTransaction(ctx context.Context, req *spannerpb.BeginT var resp *spannerpb.Transaction err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BeginTransaction(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BeginTransaction, req, settings.GRPC, c.logger, "BeginTransaction") return err }, opts...) if err != nil { @@ -1083,7 +1092,7 @@ func (c *gRPCClient) Commit(ctx context.Context, req *spannerpb.CommitRequest, o var resp *spannerpb.CommitResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Commit(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Commit, req, settings.GRPC, c.logger, "Commit") return err }, opts...) if err != nil { @@ -1100,7 +1109,7 @@ func (c *gRPCClient) Rollback(ctx context.Context, req *spannerpb.RollbackReques opts = append((*c.CallOptions).Rollback[0:len((*c.CallOptions).Rollback):len((*c.CallOptions).Rollback)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.Rollback(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.Rollback, req, settings.GRPC, c.logger, "Rollback") return err }, opts...) return err @@ -1115,7 +1124,7 @@ func (c *gRPCClient) PartitionQuery(ctx context.Context, req *spannerpb.Partitio var resp *spannerpb.PartitionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PartitionQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PartitionQuery, req, settings.GRPC, c.logger, "PartitionQuery") return err }, opts...) if err != nil { @@ -1133,7 +1142,7 @@ func (c *gRPCClient) PartitionRead(ctx context.Context, req *spannerpb.Partition var resp *spannerpb.PartitionResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PartitionRead(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PartitionRead, req, settings.GRPC, c.logger, "PartitionRead") return err }, opts...) if err != nil { @@ -1151,7 +1160,9 @@ func (c *gRPCClient) BatchWrite(ctx context.Context, req *spannerpb.BatchWriteRe var resp spannerpb.Spanner_BatchWriteClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "BatchWrite") resp, err = c.client.BatchWrite(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "BatchWrite") return err }, opts...) if err != nil { @@ -1217,17 +1228,7 @@ func (c *restClient) CreateSession(ctx context.Context, req *spannerpb.CreateSes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSession") if err != nil { return err } @@ -1286,17 +1287,7 @@ func (c *restClient) BatchCreateSessions(ctx context.Context, req *spannerpb.Bat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateSessions") if err != nil { return err } @@ -1348,17 +1339,7 @@ func (c *restClient) GetSession(ctx context.Context, req *spannerpb.GetSessionRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSession") if err != nil { return err } @@ -1423,21 +1404,10 @@ func (c *restClient) ListSessions(ctx context.Context, req *spannerpb.ListSessio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSessions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1499,15 +1469,8 @@ func (c *restClient) DeleteSession(ctx context.Context, req *spannerpb.DeleteSes httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSession") + return err }, opts...) } @@ -1562,17 +1525,7 @@ func (c *restClient) ExecuteSql(ctx context.Context, req *spannerpb.ExecuteSqlRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteSql") if err != nil { return err } @@ -1630,15 +1583,11 @@ func (c *restClient) ExecuteStreamingSql(ctx context.Context, req *spannerpb.Exe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteStreamingSql") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &executeStreamingSqlRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -1749,17 +1698,7 @@ func (c *restClient) ExecuteBatchDml(ctx context.Context, req *spannerpb.Execute httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteBatchDml") if err != nil { return err } @@ -1828,17 +1767,7 @@ func (c *restClient) Read(ctx context.Context, req *spannerpb.ReadRequest, opts httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Read") if err != nil { return err } @@ -1896,15 +1825,11 @@ func (c *restClient) StreamingRead(ctx context.Context, req *spannerpb.ReadReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StreamingRead") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &streamingReadRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), @@ -2008,17 +1933,7 @@ func (c *restClient) BeginTransaction(ctx context.Context, req *spannerpb.BeginT httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BeginTransaction") if err != nil { return err } @@ -2087,17 +2002,7 @@ func (c *restClient) Commit(ctx context.Context, req *spannerpb.CommitRequest, o httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Commit") if err != nil { return err } @@ -2158,15 +2063,8 @@ func (c *restClient) Rollback(ctx context.Context, req *spannerpb.RollbackReques httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Rollback") + return err }, opts...) } @@ -2220,17 +2118,7 @@ func (c *restClient) PartitionQuery(ctx context.Context, req *spannerpb.Partitio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PartitionQuery") if err != nil { return err } @@ -2299,17 +2187,7 @@ func (c *restClient) PartitionRead(ctx context.Context, req *spannerpb.Partition httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PartitionRead") if err != nil { return err } @@ -2377,15 +2255,11 @@ func (c *restClient) BatchWrite(ctx context.Context, req *spannerpb.BatchWriteRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + httpRsp, err := executeStreamingHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchWrite") if err != nil { return err } - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - streamClient = &batchWriteRESTClient{ ctx: ctx, md: metadata.MD(httpRsp.Header), diff --git a/spanner/apiv1/spanner_client_example_go123_test.go b/spanner/apiv1/spanner_client_example_go123_test.go index c8de7cade506..fcbe54a57ccf 100644 --- a/spanner/apiv1/spanner_client_example_go123_test.go +++ b/spanner/apiv1/spanner_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListSessions_all() { } for resp, err := range c.ListSessions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/spanner/apiv1/spannerpb/commit_response.pb.go b/spanner/apiv1/spannerpb/commit_response.pb.go index e00682f5f9d9..a2a840c3a186 100755 --- a/spanner/apiv1/spannerpb/commit_response.pb.go +++ b/spanner/apiv1/spannerpb/commit_response.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/commit_response.proto @@ -59,11 +59,9 @@ type CommitResponse struct { func (x *CommitResponse) Reset() { *x = CommitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_commit_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_commit_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitResponse) String() string { @@ -74,7 +72,7 @@ func (*CommitResponse) ProtoMessage() {} func (x *CommitResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_commit_response_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type CommitResponse_CommitStats struct { func (x *CommitResponse_CommitStats) Reset() { *x = CommitResponse_CommitStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_commit_response_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_commit_response_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitResponse_CommitStats) String() string { @@ -162,7 +158,7 @@ func (*CommitResponse_CommitStats) ProtoMessage() {} func (x *CommitResponse_CommitStats) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_commit_response_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -267,32 +263,6 @@ func file_google_spanner_v1_commit_response_proto_init() { return } file_google_spanner_v1_transaction_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_commit_response_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CommitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_commit_response_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CommitResponse_CommitStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_commit_response_proto_msgTypes[0].OneofWrappers = []any{ (*CommitResponse_PrecommitToken)(nil), } diff --git a/spanner/apiv1/spannerpb/keys.pb.go b/spanner/apiv1/spannerpb/keys.pb.go index 0cfb01a438f5..9a9a618437d1 100755 --- a/spanner/apiv1/spannerpb/keys.pb.go +++ b/spanner/apiv1/spannerpb/keys.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/keys.proto @@ -147,11 +147,9 @@ type KeyRange struct { func (x *KeyRange) Reset() { *x = KeyRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyRange) String() string { @@ -162,7 +160,7 @@ func (*KeyRange) ProtoMessage() {} func (x *KeyRange) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +285,9 @@ type KeySet struct { func (x *KeySet) Reset() { *x = KeySet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_keys_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeySet) String() string { @@ -302,7 +298,7 @@ func (*KeySet) ProtoMessage() {} func (x *KeySet) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,32 +419,6 @@ func file_google_spanner_v1_keys_proto_init() { if File_google_spanner_v1_keys_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_keys_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*KeyRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_keys_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*KeySet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_keys_proto_msgTypes[0].OneofWrappers = []any{ (*KeyRange_StartClosed)(nil), (*KeyRange_StartOpen)(nil), diff --git a/spanner/apiv1/spannerpb/mutation.pb.go b/spanner/apiv1/spannerpb/mutation.pb.go index bdbbac3727df..4670d854bed1 100755 --- a/spanner/apiv1/spannerpb/mutation.pb.go +++ b/spanner/apiv1/spannerpb/mutation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/mutation.proto @@ -59,11 +59,9 @@ type Mutation struct { func (x *Mutation) Reset() { *x = Mutation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_mutation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_mutation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation) String() string { @@ -74,7 +72,7 @@ func (*Mutation) ProtoMessage() {} func (x *Mutation) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_mutation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +213,9 @@ type Mutation_Write struct { func (x *Mutation_Write) Reset() { *x = Mutation_Write{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_mutation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_mutation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_Write) String() string { @@ -230,7 +226,7 @@ func (*Mutation_Write) ProtoMessage() {} func (x *Mutation_Write) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_mutation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,11 +281,9 @@ type Mutation_Delete struct { func (x *Mutation_Delete) Reset() { *x = Mutation_Delete{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_mutation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_mutation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Mutation_Delete) String() string { @@ -300,7 +294,7 @@ func (*Mutation_Delete) ProtoMessage() {} func (x *Mutation_Delete) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_mutation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,44 +425,6 @@ func file_google_spanner_v1_mutation_proto_init() { return } file_google_spanner_v1_keys_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_mutation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Mutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_mutation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_Write); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_mutation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Mutation_Delete); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_mutation_proto_msgTypes[0].OneofWrappers = []any{ (*Mutation_Insert)(nil), (*Mutation_Update)(nil), diff --git a/spanner/apiv1/spannerpb/query_plan.pb.go b/spanner/apiv1/spannerpb/query_plan.pb.go index fe4411080c87..4ed262ad5efa 100755 --- a/spanner/apiv1/spannerpb/query_plan.pb.go +++ b/spanner/apiv1/spannerpb/query_plan.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/query_plan.proto @@ -133,11 +133,9 @@ type PlanNode struct { func (x *PlanNode) Reset() { *x = PlanNode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_query_plan_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_query_plan_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanNode) String() string { @@ -148,7 +146,7 @@ func (*PlanNode) ProtoMessage() {} func (x *PlanNode) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_query_plan_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +224,9 @@ type QueryPlan struct { func (x *QueryPlan) Reset() { *x = QueryPlan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_query_plan_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_query_plan_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryPlan) String() string { @@ -241,7 +237,7 @@ func (*QueryPlan) ProtoMessage() {} func (x *QueryPlan) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_query_plan_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +286,9 @@ type PlanNode_ChildLink struct { func (x *PlanNode_ChildLink) Reset() { *x = PlanNode_ChildLink{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_query_plan_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_query_plan_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanNode_ChildLink) String() string { @@ -305,7 +299,7 @@ func (*PlanNode_ChildLink) ProtoMessage() {} func (x *PlanNode_ChildLink) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_query_plan_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +354,9 @@ type PlanNode_ShortRepresentation struct { func (x *PlanNode_ShortRepresentation) Reset() { *x = PlanNode_ShortRepresentation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_query_plan_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_query_plan_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlanNode_ShortRepresentation) String() string { @@ -375,7 +367,7 @@ func (*PlanNode_ShortRepresentation) ProtoMessage() {} func (x *PlanNode_ShortRepresentation) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_query_plan_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,56 +515,6 @@ func file_google_spanner_v1_query_plan_proto_init() { if File_google_spanner_v1_query_plan_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_query_plan_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PlanNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_query_plan_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*QueryPlan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_query_plan_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PlanNode_ChildLink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_query_plan_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PlanNode_ShortRepresentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spanner/apiv1/spannerpb/result_set.pb.go b/spanner/apiv1/spannerpb/result_set.pb.go index fde7637ddb91..896559a37c9f 100755 --- a/spanner/apiv1/spannerpb/result_set.pb.go +++ b/spanner/apiv1/spannerpb/result_set.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/result_set.proto @@ -74,11 +74,9 @@ type ResultSet struct { func (x *ResultSet) Reset() { *x = ResultSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_result_set_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_result_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResultSet) String() string { @@ -89,7 +87,7 @@ func (*ResultSet) ProtoMessage() {} func (x *ResultSet) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_result_set_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,11 +244,9 @@ type PartialResultSet struct { func (x *PartialResultSet) Reset() { *x = PartialResultSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_result_set_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_result_set_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartialResultSet) String() string { @@ -261,7 +257,7 @@ func (*PartialResultSet) ProtoMessage() {} func (x *PartialResultSet) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_result_set_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,11 +347,9 @@ type ResultSetMetadata struct { func (x *ResultSetMetadata) Reset() { *x = ResultSetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_result_set_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_result_set_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResultSetMetadata) String() string { @@ -366,7 +360,7 @@ func (*ResultSetMetadata) ProtoMessage() {} func (x *ResultSetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_result_set_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +425,9 @@ type ResultSetStats struct { func (x *ResultSetStats) Reset() { *x = ResultSetStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_result_set_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_result_set_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResultSetStats) String() string { @@ -446,7 +438,7 @@ func (*ResultSetStats) ProtoMessage() {} func (x *ResultSetStats) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_result_set_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,56 +663,6 @@ func file_google_spanner_v1_result_set_proto_init() { file_google_spanner_v1_query_plan_proto_init() file_google_spanner_v1_transaction_proto_init() file_google_spanner_v1_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_result_set_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResultSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_result_set_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PartialResultSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_result_set_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ResultSetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_result_set_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResultSetStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_result_set_proto_msgTypes[3].OneofWrappers = []any{ (*ResultSetStats_RowCountExact)(nil), (*ResultSetStats_RowCountLowerBound)(nil), diff --git a/spanner/apiv1/spannerpb/spanner.pb.go b/spanner/apiv1/spannerpb/spanner.pb.go index dd457698b153..47bf4d348f4e 100755 --- a/spanner/apiv1/spannerpb/spanner.pb.go +++ b/spanner/apiv1/spannerpb/spanner.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/spanner.proto @@ -398,11 +398,9 @@ type CreateSessionRequest struct { func (x *CreateSessionRequest) Reset() { *x = CreateSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSessionRequest) String() string { @@ -413,7 +411,7 @@ func (*CreateSessionRequest) ProtoMessage() {} func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -464,11 +462,9 @@ type BatchCreateSessionsRequest struct { func (x *BatchCreateSessionsRequest) Reset() { *x = BatchCreateSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateSessionsRequest) String() string { @@ -479,7 +475,7 @@ func (*BatchCreateSessionsRequest) ProtoMessage() {} func (x *BatchCreateSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,11 +524,9 @@ type BatchCreateSessionsResponse struct { func (x *BatchCreateSessionsResponse) Reset() { *x = BatchCreateSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateSessionsResponse) String() string { @@ -543,7 +537,7 @@ func (*BatchCreateSessionsResponse) ProtoMessage() {} func (x *BatchCreateSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +596,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -617,7 +609,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +678,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -701,7 +691,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,11 +744,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -769,7 +757,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -828,11 +816,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -843,7 +829,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -884,11 +870,9 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSessionRequest) String() string { @@ -899,7 +883,7 @@ func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +940,9 @@ type RequestOptions struct { func (x *RequestOptions) Reset() { *x = RequestOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestOptions) String() string { @@ -971,7 +953,7 @@ func (*RequestOptions) ProtoMessage() {} func (x *RequestOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,11 +1011,9 @@ type DirectedReadOptions struct { func (x *DirectedReadOptions) Reset() { *x = DirectedReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectedReadOptions) String() string { @@ -1044,7 +1024,7 @@ func (*DirectedReadOptions) ProtoMessage() {} func (x *DirectedReadOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1186,9 @@ type ExecuteSqlRequest struct { func (x *ExecuteSqlRequest) Reset() { *x = ExecuteSqlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlRequest) String() string { @@ -1221,7 +1199,7 @@ func (*ExecuteSqlRequest) ProtoMessage() {} func (x *ExecuteSqlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1358,9 @@ type ExecuteBatchDmlRequest struct { func (x *ExecuteBatchDmlRequest) Reset() { *x = ExecuteBatchDmlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteBatchDmlRequest) String() string { @@ -1395,7 +1371,7 @@ func (*ExecuteBatchDmlRequest) ProtoMessage() {} func (x *ExecuteBatchDmlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1515,11 +1491,9 @@ type ExecuteBatchDmlResponse struct { func (x *ExecuteBatchDmlResponse) Reset() { *x = ExecuteBatchDmlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteBatchDmlResponse) String() string { @@ -1530,7 +1504,7 @@ func (*ExecuteBatchDmlResponse) ProtoMessage() {} func (x *ExecuteBatchDmlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,11 +1567,9 @@ type PartitionOptions struct { func (x *PartitionOptions) Reset() { *x = PartitionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionOptions) String() string { @@ -1608,7 +1580,7 @@ func (*PartitionOptions) ProtoMessage() {} func (x *PartitionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1690,11 +1662,9 @@ type PartitionQueryRequest struct { func (x *PartitionQueryRequest) Reset() { *x = PartitionQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionQueryRequest) String() string { @@ -1705,7 +1675,7 @@ func (*PartitionQueryRequest) ProtoMessage() {} func (x *PartitionQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1802,11 +1772,9 @@ type PartitionReadRequest struct { func (x *PartitionReadRequest) Reset() { *x = PartitionReadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionReadRequest) String() string { @@ -1817,7 +1785,7 @@ func (*PartitionReadRequest) ProtoMessage() {} func (x *PartitionReadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1896,11 +1864,9 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition) String() string { @@ -1911,7 +1877,7 @@ func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1948,11 +1914,9 @@ type PartitionResponse struct { func (x *PartitionResponse) Reset() { *x = PartitionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionResponse) String() string { @@ -1963,7 +1927,7 @@ func (*PartitionResponse) ProtoMessage() {} func (x *PartitionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2074,11 +2038,9 @@ type ReadRequest struct { func (x *ReadRequest) Reset() { *x = ReadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadRequest) String() string { @@ -2089,7 +2051,7 @@ func (*ReadRequest) ProtoMessage() {} func (x *ReadRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2230,11 +2192,9 @@ type BeginTransactionRequest struct { func (x *BeginTransactionRequest) Reset() { *x = BeginTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BeginTransactionRequest) String() string { @@ -2245,7 +2205,7 @@ func (*BeginTransactionRequest) ProtoMessage() {} func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2330,11 +2290,9 @@ type CommitRequest struct { func (x *CommitRequest) Reset() { *x = CommitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRequest) String() string { @@ -2345,7 +2303,7 @@ func (*CommitRequest) ProtoMessage() {} func (x *CommitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2463,11 +2421,9 @@ type RollbackRequest struct { func (x *RollbackRequest) Reset() { *x = RollbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackRequest) String() string { @@ -2478,7 +2434,7 @@ func (*RollbackRequest) ProtoMessage() {} func (x *RollbackRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2536,11 +2492,9 @@ type BatchWriteRequest struct { func (x *BatchWriteRequest) Reset() { *x = BatchWriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteRequest) String() string { @@ -2551,7 +2505,7 @@ func (*BatchWriteRequest) ProtoMessage() {} func (x *BatchWriteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2612,11 +2566,9 @@ type BatchWriteResponse struct { func (x *BatchWriteResponse) Reset() { *x = BatchWriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteResponse) String() string { @@ -2627,7 +2579,7 @@ func (*BatchWriteResponse) ProtoMessage() {} func (x *BatchWriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2694,11 +2646,9 @@ type DirectedReadOptions_ReplicaSelection struct { func (x *DirectedReadOptions_ReplicaSelection) Reset() { *x = DirectedReadOptions_ReplicaSelection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectedReadOptions_ReplicaSelection) String() string { @@ -2709,7 +2659,7 @@ func (*DirectedReadOptions_ReplicaSelection) ProtoMessage() {} func (x *DirectedReadOptions_ReplicaSelection) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,11 +2705,9 @@ type DirectedReadOptions_IncludeReplicas struct { func (x *DirectedReadOptions_IncludeReplicas) Reset() { *x = DirectedReadOptions_IncludeReplicas{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectedReadOptions_IncludeReplicas) String() string { @@ -2770,7 +2718,7 @@ func (*DirectedReadOptions_IncludeReplicas) ProtoMessage() {} func (x *DirectedReadOptions_IncludeReplicas) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2812,11 +2760,9 @@ type DirectedReadOptions_ExcludeReplicas struct { func (x *DirectedReadOptions_ExcludeReplicas) Reset() { *x = DirectedReadOptions_ExcludeReplicas{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DirectedReadOptions_ExcludeReplicas) String() string { @@ -2827,7 +2773,7 @@ func (*DirectedReadOptions_ExcludeReplicas) ProtoMessage() {} func (x *DirectedReadOptions_ExcludeReplicas) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2907,11 +2853,9 @@ type ExecuteSqlRequest_QueryOptions struct { func (x *ExecuteSqlRequest_QueryOptions) Reset() { *x = ExecuteSqlRequest_QueryOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteSqlRequest_QueryOptions) String() string { @@ -2922,7 +2866,7 @@ func (*ExecuteSqlRequest_QueryOptions) ProtoMessage() {} func (x *ExecuteSqlRequest_QueryOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2987,11 +2931,9 @@ type ExecuteBatchDmlRequest_Statement struct { func (x *ExecuteBatchDmlRequest_Statement) Reset() { *x = ExecuteBatchDmlRequest_Statement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteBatchDmlRequest_Statement) String() string { @@ -3002,7 +2944,7 @@ func (*ExecuteBatchDmlRequest_Statement) ProtoMessage() {} func (x *ExecuteBatchDmlRequest_Statement) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3052,11 +2994,9 @@ type BatchWriteRequest_MutationGroup struct { func (x *BatchWriteRequest_MutationGroup) Reset() { *x = BatchWriteRequest_MutationGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_spanner_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_spanner_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteRequest_MutationGroup) String() string { @@ -3067,7 +3007,7 @@ func (*BatchWriteRequest_MutationGroup) ProtoMessage() {} func (x *BatchWriteRequest_MutationGroup) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_spanner_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4031,368 +3971,6 @@ func file_google_spanner_v1_spanner_proto_init() { file_google_spanner_v1_result_set_proto_init() file_google_spanner_v1_transaction_proto_init() file_google_spanner_v1_type_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_spanner_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RequestOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DirectedReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteBatchDmlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteBatchDmlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PartitionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PartitionQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PartitionReadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Partition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*PartitionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BeginTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*CommitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RollbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DirectedReadOptions_ReplicaSelection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DirectedReadOptions_IncludeReplicas); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DirectedReadOptions_ExcludeReplicas); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteSqlRequest_QueryOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteBatchDmlRequest_Statement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_spanner_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteRequest_MutationGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_spanner_proto_msgTypes[9].OneofWrappers = []any{ (*DirectedReadOptions_IncludeReplicas_)(nil), (*DirectedReadOptions_ExcludeReplicas_)(nil), diff --git a/spanner/apiv1/spannerpb/transaction.pb.go b/spanner/apiv1/spannerpb/transaction.pb.go index b5a967000a18..033ab66bb292 100755 --- a/spanner/apiv1/spannerpb/transaction.pb.go +++ b/spanner/apiv1/spannerpb/transaction.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/transaction.proto @@ -456,11 +456,9 @@ type TransactionOptions struct { func (x *TransactionOptions) Reset() { *x = TransactionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions) String() string { @@ -471,7 +469,7 @@ func (*TransactionOptions) ProtoMessage() {} func (x *TransactionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +592,9 @@ type Transaction struct { func (x *Transaction) Reset() { *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transaction) String() string { @@ -609,7 +605,7 @@ func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -669,11 +665,9 @@ type TransactionSelector struct { func (x *TransactionSelector) Reset() { *x = TransactionSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionSelector) String() string { @@ -684,7 +678,7 @@ func (*TransactionSelector) ProtoMessage() {} func (x *TransactionSelector) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +770,9 @@ type MultiplexedSessionPrecommitToken struct { func (x *MultiplexedSessionPrecommitToken) Reset() { *x = MultiplexedSessionPrecommitToken{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiplexedSessionPrecommitToken) String() string { @@ -791,7 +783,7 @@ func (*MultiplexedSessionPrecommitToken) ProtoMessage() {} func (x *MultiplexedSessionPrecommitToken) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,11 +831,9 @@ type TransactionOptions_ReadWrite struct { func (x *TransactionOptions_ReadWrite) Reset() { *x = TransactionOptions_ReadWrite{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadWrite) String() string { @@ -854,7 +844,7 @@ func (*TransactionOptions_ReadWrite) ProtoMessage() {} func (x *TransactionOptions_ReadWrite) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +882,9 @@ type TransactionOptions_PartitionedDml struct { func (x *TransactionOptions_PartitionedDml) Reset() { *x = TransactionOptions_PartitionedDml{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_PartitionedDml) String() string { @@ -907,7 +895,7 @@ func (*TransactionOptions_PartitionedDml) ProtoMessage() {} func (x *TransactionOptions_PartitionedDml) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -946,11 +934,9 @@ type TransactionOptions_ReadOnly struct { func (x *TransactionOptions_ReadOnly) Reset() { *x = TransactionOptions_ReadOnly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_transaction_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_transaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionOptions_ReadOnly) String() string { @@ -961,7 +947,7 @@ func (*TransactionOptions_ReadOnly) ProtoMessage() {} func (x *TransactionOptions_ReadOnly) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_transaction_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1282,92 +1268,6 @@ func file_google_spanner_v1_transaction_proto_init() { if File_google_spanner_v1_transaction_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TransactionSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MultiplexedSessionPrecommitToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadWrite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_PartitionedDml); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransactionOptions_ReadOnly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_v1_transaction_proto_msgTypes[0].OneofWrappers = []any{ (*TransactionOptions_ReadWrite_)(nil), (*TransactionOptions_PartitionedDml_)(nil), diff --git a/spanner/apiv1/spannerpb/type.pb.go b/spanner/apiv1/spannerpb/type.pb.go index 24959b84c241..87a053f69814 100755 --- a/spanner/apiv1/spannerpb/type.pb.go +++ b/spanner/apiv1/spannerpb/type.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/v1/type.proto @@ -290,11 +290,9 @@ type Type struct { func (x *Type) Reset() { *x = Type{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_type_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Type) String() string { @@ -305,7 +303,7 @@ func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_type_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +371,9 @@ type StructType struct { func (x *StructType) Reset() { *x = StructType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_type_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructType) String() string { @@ -388,7 +384,7 @@ func (*StructType) ProtoMessage() {} func (x *StructType) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_type_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +426,9 @@ type StructType_Field struct { func (x *StructType_Field) Reset() { *x = StructType_Field{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_v1_type_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_v1_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StructType_Field) String() string { @@ -445,7 +439,7 @@ func (*StructType_Field) ProtoMessage() {} func (x *StructType_Field) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_v1_type_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,44 +579,6 @@ func file_google_spanner_v1_type_proto_init() { if File_google_spanner_v1_type_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_v1_type_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Type); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_type_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StructType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_v1_type_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StructType_Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/spanner/executor/apiv1/executorpb/cloud_executor.pb.go b/spanner/executor/apiv1/executorpb/cloud_executor.pb.go index e40db47eaf3c..b0ac9f8eb240 100755 --- a/spanner/executor/apiv1/executorpb/cloud_executor.pb.go +++ b/spanner/executor/apiv1/executorpb/cloud_executor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/spanner/executor/v1/cloud_executor.proto @@ -175,11 +175,9 @@ type SpannerAsyncActionRequest struct { func (x *SpannerAsyncActionRequest) Reset() { *x = SpannerAsyncActionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerAsyncActionRequest) String() string { @@ -190,7 +188,7 @@ func (*SpannerAsyncActionRequest) ProtoMessage() {} func (x *SpannerAsyncActionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,11 +232,9 @@ type SpannerAsyncActionResponse struct { func (x *SpannerAsyncActionResponse) Reset() { *x = SpannerAsyncActionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerAsyncActionResponse) String() string { @@ -249,7 +245,7 @@ func (*SpannerAsyncActionResponse) ProtoMessage() {} func (x *SpannerAsyncActionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +315,9 @@ type SpannerAction struct { func (x *SpannerAction) Reset() { *x = SpannerAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerAction) String() string { @@ -334,7 +328,7 @@ func (*SpannerAction) ProtoMessage() {} func (x *SpannerAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,11 +627,9 @@ type ReadAction struct { func (x *ReadAction) Reset() { *x = ReadAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadAction) String() string { @@ -648,7 +640,7 @@ func (*ReadAction) ProtoMessage() {} func (x *ReadAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +704,9 @@ type QueryAction struct { func (x *QueryAction) Reset() { *x = QueryAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAction) String() string { @@ -727,7 +717,7 @@ func (*QueryAction) ProtoMessage() {} func (x *QueryAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +761,9 @@ type DmlAction struct { func (x *DmlAction) Reset() { *x = DmlAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DmlAction) String() string { @@ -786,7 +774,7 @@ func (*DmlAction) ProtoMessage() {} func (x *DmlAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +815,9 @@ type BatchDmlAction struct { func (x *BatchDmlAction) Reset() { *x = BatchDmlAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDmlAction) String() string { @@ -842,7 +828,7 @@ func (*BatchDmlAction) ProtoMessage() {} func (x *BatchDmlAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +879,9 @@ type Value struct { func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -908,7 +892,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1123,11 +1107,9 @@ type KeyRange struct { func (x *KeyRange) Reset() { *x = KeyRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeyRange) String() string { @@ -1138,7 +1120,7 @@ func (*KeyRange) ProtoMessage() {} func (x *KeyRange) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1196,11 +1178,9 @@ type KeySet struct { func (x *KeySet) Reset() { *x = KeySet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KeySet) String() string { @@ -1211,7 +1191,7 @@ func (*KeySet) ProtoMessage() {} func (x *KeySet) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1239,9 @@ type ValueList struct { func (x *ValueList) Reset() { *x = ValueList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueList) String() string { @@ -1274,7 +1252,7 @@ func (*ValueList) ProtoMessage() {} func (x *ValueList) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1308,11 +1286,9 @@ type MutationAction struct { func (x *MutationAction) Reset() { *x = MutationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationAction) String() string { @@ -1323,7 +1299,7 @@ func (*MutationAction) ProtoMessage() {} func (x *MutationAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,11 +1334,9 @@ type WriteMutationsAction struct { func (x *WriteMutationsAction) Reset() { *x = WriteMutationsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteMutationsAction) String() string { @@ -1373,7 +1347,7 @@ func (*WriteMutationsAction) ProtoMessage() {} func (x *WriteMutationsAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1384,9 @@ type PartitionedUpdateAction struct { func (x *PartitionedUpdateAction) Reset() { *x = PartitionedUpdateAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionedUpdateAction) String() string { @@ -1425,7 +1397,7 @@ func (*PartitionedUpdateAction) ProtoMessage() {} func (x *PartitionedUpdateAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1475,11 +1447,9 @@ type StartTransactionAction struct { func (x *StartTransactionAction) Reset() { *x = StartTransactionAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartTransactionAction) String() string { @@ -1490,7 +1460,7 @@ func (*StartTransactionAction) ProtoMessage() {} func (x *StartTransactionAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1564,11 +1534,9 @@ type Concurrency struct { func (x *Concurrency) Reset() { *x = Concurrency{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Concurrency) String() string { @@ -1579,7 +1547,7 @@ func (*Concurrency) ProtoMessage() {} func (x *Concurrency) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1728,11 +1696,9 @@ type TableMetadata struct { func (x *TableMetadata) Reset() { *x = TableMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TableMetadata) String() string { @@ -1743,7 +1709,7 @@ func (*TableMetadata) ProtoMessage() {} func (x *TableMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1793,11 +1759,9 @@ type ColumnMetadata struct { func (x *ColumnMetadata) Reset() { *x = ColumnMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColumnMetadata) String() string { @@ -1808,7 +1772,7 @@ func (*ColumnMetadata) ProtoMessage() {} func (x *ColumnMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1849,11 +1813,9 @@ type TransactionExecutionOptions struct { func (x *TransactionExecutionOptions) Reset() { *x = TransactionExecutionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionExecutionOptions) String() string { @@ -1864,7 +1826,7 @@ func (*TransactionExecutionOptions) ProtoMessage() {} func (x *TransactionExecutionOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1899,11 +1861,9 @@ type FinishTransactionAction struct { func (x *FinishTransactionAction) Reset() { *x = FinishTransactionAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinishTransactionAction) String() string { @@ -1914,7 +1874,7 @@ func (*FinishTransactionAction) ProtoMessage() {} func (x *FinishTransactionAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1940,9 @@ type AdminAction struct { func (x *AdminAction) Reset() { *x = AdminAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdminAction) String() string { @@ -1995,7 +1953,7 @@ func (*AdminAction) ProtoMessage() {} func (x *AdminAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2431,11 +2389,9 @@ type CreateUserInstanceConfigAction struct { func (x *CreateUserInstanceConfigAction) Reset() { *x = CreateUserInstanceConfigAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUserInstanceConfigAction) String() string { @@ -2446,7 +2402,7 @@ func (*CreateUserInstanceConfigAction) ProtoMessage() {} func (x *CreateUserInstanceConfigAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2507,11 +2463,9 @@ type UpdateUserInstanceConfigAction struct { func (x *UpdateUserInstanceConfigAction) Reset() { *x = UpdateUserInstanceConfigAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateUserInstanceConfigAction) String() string { @@ -2522,7 +2476,7 @@ func (*UpdateUserInstanceConfigAction) ProtoMessage() {} func (x *UpdateUserInstanceConfigAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2579,11 +2533,9 @@ type GetCloudInstanceConfigAction struct { func (x *GetCloudInstanceConfigAction) Reset() { *x = GetCloudInstanceConfigAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudInstanceConfigAction) String() string { @@ -2594,7 +2546,7 @@ func (*GetCloudInstanceConfigAction) ProtoMessage() {} func (x *GetCloudInstanceConfigAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2637,11 +2589,9 @@ type DeleteUserInstanceConfigAction struct { func (x *DeleteUserInstanceConfigAction) Reset() { *x = DeleteUserInstanceConfigAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUserInstanceConfigAction) String() string { @@ -2652,7 +2602,7 @@ func (*DeleteUserInstanceConfigAction) ProtoMessage() {} func (x *DeleteUserInstanceConfigAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2699,11 +2649,9 @@ type ListCloudInstanceConfigsAction struct { func (x *ListCloudInstanceConfigsAction) Reset() { *x = ListCloudInstanceConfigsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudInstanceConfigsAction) String() string { @@ -2714,7 +2662,7 @@ func (*ListCloudInstanceConfigsAction) ProtoMessage() {} func (x *ListCloudInstanceConfigsAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2776,11 +2724,9 @@ type CreateCloudInstanceAction struct { func (x *CreateCloudInstanceAction) Reset() { *x = CreateCloudInstanceAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloudInstanceAction) String() string { @@ -2791,7 +2737,7 @@ func (*CreateCloudInstanceAction) ProtoMessage() {} func (x *CreateCloudInstanceAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2884,11 +2830,9 @@ type UpdateCloudInstanceAction struct { func (x *UpdateCloudInstanceAction) Reset() { *x = UpdateCloudInstanceAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCloudInstanceAction) String() string { @@ -2899,7 +2843,7 @@ func (*UpdateCloudInstanceAction) ProtoMessage() {} func (x *UpdateCloudInstanceAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2977,11 +2921,9 @@ type DeleteCloudInstanceAction struct { func (x *DeleteCloudInstanceAction) Reset() { *x = DeleteCloudInstanceAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCloudInstanceAction) String() string { @@ -2992,7 +2934,7 @@ func (*DeleteCloudInstanceAction) ProtoMessage() {} func (x *DeleteCloudInstanceAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3045,11 +2987,9 @@ type CreateCloudDatabaseAction struct { func (x *CreateCloudDatabaseAction) Reset() { *x = CreateCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloudDatabaseAction) String() string { @@ -3060,7 +3000,7 @@ func (*CreateCloudDatabaseAction) ProtoMessage() {} func (x *CreateCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3147,11 +3087,9 @@ type UpdateCloudDatabaseDdlAction struct { func (x *UpdateCloudDatabaseDdlAction) Reset() { *x = UpdateCloudDatabaseDdlAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCloudDatabaseDdlAction) String() string { @@ -3162,7 +3100,7 @@ func (*UpdateCloudDatabaseDdlAction) ProtoMessage() {} func (x *UpdateCloudDatabaseDdlAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3238,11 +3176,9 @@ type UpdateCloudDatabaseAction struct { func (x *UpdateCloudDatabaseAction) Reset() { *x = UpdateCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCloudDatabaseAction) String() string { @@ -3253,7 +3189,7 @@ func (*UpdateCloudDatabaseAction) ProtoMessage() {} func (x *UpdateCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3312,11 +3248,9 @@ type DropCloudDatabaseAction struct { func (x *DropCloudDatabaseAction) Reset() { *x = DropCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DropCloudDatabaseAction) String() string { @@ -3327,7 +3261,7 @@ func (*DropCloudDatabaseAction) ProtoMessage() {} func (x *DropCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3377,11 +3311,9 @@ type ChangeQuorumCloudDatabaseAction struct { func (x *ChangeQuorumCloudDatabaseAction) Reset() { *x = ChangeQuorumCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeQuorumCloudDatabaseAction) String() string { @@ -3392,7 +3324,7 @@ func (*ChangeQuorumCloudDatabaseAction) ProtoMessage() {} func (x *ChangeQuorumCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3442,11 +3374,9 @@ type ListCloudDatabasesAction struct { func (x *ListCloudDatabasesAction) Reset() { *x = ListCloudDatabasesAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudDatabasesAction) String() string { @@ -3457,7 +3387,7 @@ func (*ListCloudDatabasesAction) ProtoMessage() {} func (x *ListCloudDatabasesAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3526,11 +3456,9 @@ type ListCloudInstancesAction struct { func (x *ListCloudInstancesAction) Reset() { *x = ListCloudInstancesAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudInstancesAction) String() string { @@ -3541,7 +3469,7 @@ func (*ListCloudInstancesAction) ProtoMessage() {} func (x *ListCloudInstancesAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3599,11 +3527,9 @@ type GetCloudInstanceAction struct { func (x *GetCloudInstanceAction) Reset() { *x = GetCloudInstanceAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudInstanceAction) String() string { @@ -3614,7 +3540,7 @@ func (*GetCloudInstanceAction) ProtoMessage() {} func (x *GetCloudInstanceAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3672,11 +3598,9 @@ type ListCloudDatabaseOperationsAction struct { func (x *ListCloudDatabaseOperationsAction) Reset() { *x = ListCloudDatabaseOperationsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudDatabaseOperationsAction) String() string { @@ -3687,7 +3611,7 @@ func (*ListCloudDatabaseOperationsAction) ProtoMessage() {} func (x *ListCloudDatabaseOperationsAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3762,11 +3686,9 @@ type RestoreCloudDatabaseAction struct { func (x *RestoreCloudDatabaseAction) Reset() { *x = RestoreCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreCloudDatabaseAction) String() string { @@ -3777,7 +3699,7 @@ func (*RestoreCloudDatabaseAction) ProtoMessage() {} func (x *RestoreCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3850,11 +3772,9 @@ type GetCloudDatabaseAction struct { func (x *GetCloudDatabaseAction) Reset() { *x = GetCloudDatabaseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudDatabaseAction) String() string { @@ -3865,7 +3785,7 @@ func (*GetCloudDatabaseAction) ProtoMessage() {} func (x *GetCloudDatabaseAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3931,11 +3851,9 @@ type CreateCloudBackupAction struct { func (x *CreateCloudBackupAction) Reset() { *x = CreateCloudBackupAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloudBackupAction) String() string { @@ -3946,7 +3864,7 @@ func (*CreateCloudBackupAction) ProtoMessage() {} func (x *CreateCloudBackupAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4033,11 +3951,9 @@ type CopyCloudBackupAction struct { func (x *CopyCloudBackupAction) Reset() { *x = CopyCloudBackupAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CopyCloudBackupAction) String() string { @@ -4048,7 +3964,7 @@ func (*CopyCloudBackupAction) ProtoMessage() {} func (x *CopyCloudBackupAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4114,11 +4030,9 @@ type GetCloudBackupAction struct { func (x *GetCloudBackupAction) Reset() { *x = GetCloudBackupAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloudBackupAction) String() string { @@ -4129,7 +4043,7 @@ func (*GetCloudBackupAction) ProtoMessage() {} func (x *GetCloudBackupAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4184,11 +4098,9 @@ type UpdateCloudBackupAction struct { func (x *UpdateCloudBackupAction) Reset() { *x = UpdateCloudBackupAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCloudBackupAction) String() string { @@ -4199,7 +4111,7 @@ func (*UpdateCloudBackupAction) ProtoMessage() {} func (x *UpdateCloudBackupAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4258,11 +4170,9 @@ type DeleteCloudBackupAction struct { func (x *DeleteCloudBackupAction) Reset() { *x = DeleteCloudBackupAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCloudBackupAction) String() string { @@ -4273,7 +4183,7 @@ func (*DeleteCloudBackupAction) ProtoMessage() {} func (x *DeleteCloudBackupAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4335,11 +4245,9 @@ type ListCloudBackupsAction struct { func (x *ListCloudBackupsAction) Reset() { *x = ListCloudBackupsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudBackupsAction) String() string { @@ -4350,7 +4258,7 @@ func (*ListCloudBackupsAction) ProtoMessage() {} func (x *ListCloudBackupsAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4428,11 +4336,9 @@ type ListCloudBackupOperationsAction struct { func (x *ListCloudBackupOperationsAction) Reset() { *x = ListCloudBackupOperationsAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloudBackupOperationsAction) String() string { @@ -4443,7 +4349,7 @@ func (*ListCloudBackupOperationsAction) ProtoMessage() {} func (x *ListCloudBackupOperationsAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4505,11 +4411,9 @@ type GetOperationAction struct { func (x *GetOperationAction) Reset() { *x = GetOperationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOperationAction) String() string { @@ -4520,7 +4424,7 @@ func (*GetOperationAction) ProtoMessage() {} func (x *GetOperationAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4557,11 +4461,9 @@ type QueryCancellationAction struct { func (x *QueryCancellationAction) Reset() { *x = QueryCancellationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryCancellationAction) String() string { @@ -4572,7 +4474,7 @@ func (*QueryCancellationAction) ProtoMessage() {} func (x *QueryCancellationAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4613,11 +4515,9 @@ type CancelOperationAction struct { func (x *CancelOperationAction) Reset() { *x = CancelOperationAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOperationAction) String() string { @@ -4628,7 +4528,7 @@ func (*CancelOperationAction) ProtoMessage() {} func (x *CancelOperationAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4704,11 +4604,9 @@ type StartBatchTransactionAction struct { func (x *StartBatchTransactionAction) Reset() { *x = StartBatchTransactionAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartBatchTransactionAction) String() string { @@ -4719,7 +4617,7 @@ func (*StartBatchTransactionAction) ProtoMessage() {} func (x *StartBatchTransactionAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4802,11 +4700,9 @@ type CloseBatchTransactionAction struct { func (x *CloseBatchTransactionAction) Reset() { *x = CloseBatchTransactionAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloseBatchTransactionAction) String() string { @@ -4817,7 +4713,7 @@ func (*CloseBatchTransactionAction) ProtoMessage() {} func (x *CloseBatchTransactionAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4860,11 +4756,9 @@ type GenerateDbPartitionsForReadAction struct { func (x *GenerateDbPartitionsForReadAction) Reset() { *x = GenerateDbPartitionsForReadAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDbPartitionsForReadAction) String() string { @@ -4875,7 +4769,7 @@ func (*GenerateDbPartitionsForReadAction) ProtoMessage() {} func (x *GenerateDbPartitionsForReadAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4934,11 +4828,9 @@ type GenerateDbPartitionsForQueryAction struct { func (x *GenerateDbPartitionsForQueryAction) Reset() { *x = GenerateDbPartitionsForQueryAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateDbPartitionsForQueryAction) String() string { @@ -4949,7 +4841,7 @@ func (*GenerateDbPartitionsForQueryAction) ProtoMessage() {} func (x *GenerateDbPartitionsForQueryAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4998,11 +4890,9 @@ type BatchPartition struct { func (x *BatchPartition) Reset() { *x = BatchPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchPartition) String() string { @@ -5013,7 +4903,7 @@ func (*BatchPartition) ProtoMessage() {} func (x *BatchPartition) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5070,11 +4960,9 @@ type ExecutePartitionAction struct { func (x *ExecutePartitionAction) Reset() { *x = ExecutePartitionAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutePartitionAction) String() string { @@ -5085,7 +4973,7 @@ func (*ExecutePartitionAction) ProtoMessage() {} func (x *ExecutePartitionAction) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5139,11 +5027,9 @@ type ExecuteChangeStreamQuery struct { func (x *ExecuteChangeStreamQuery) Reset() { *x = ExecuteChangeStreamQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteChangeStreamQuery) String() string { @@ -5154,7 +5040,7 @@ func (*ExecuteChangeStreamQuery) ProtoMessage() {} func (x *ExecuteChangeStreamQuery) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5264,11 +5150,9 @@ type SpannerActionOutcome struct { func (x *SpannerActionOutcome) Reset() { *x = SpannerActionOutcome{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerActionOutcome) String() string { @@ -5279,7 +5163,7 @@ func (*SpannerActionOutcome) ProtoMessage() {} func (x *SpannerActionOutcome) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5384,11 +5268,9 @@ type AdminResult struct { func (x *AdminResult) Reset() { *x = AdminResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdminResult) String() string { @@ -5399,7 +5281,7 @@ func (*AdminResult) ProtoMessage() {} func (x *AdminResult) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5469,11 +5351,9 @@ type CloudBackupResponse struct { func (x *CloudBackupResponse) Reset() { *x = CloudBackupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudBackupResponse) String() string { @@ -5484,7 +5364,7 @@ func (*CloudBackupResponse) ProtoMessage() {} func (x *CloudBackupResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5544,11 +5424,9 @@ type OperationResponse struct { func (x *OperationResponse) Reset() { *x = OperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationResponse) String() string { @@ -5559,7 +5437,7 @@ func (*OperationResponse) ProtoMessage() {} func (x *OperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5613,11 +5491,9 @@ type CloudInstanceResponse struct { func (x *CloudInstanceResponse) Reset() { *x = CloudInstanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudInstanceResponse) String() string { @@ -5628,7 +5504,7 @@ func (*CloudInstanceResponse) ProtoMessage() {} func (x *CloudInstanceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5682,11 +5558,9 @@ type CloudInstanceConfigResponse struct { func (x *CloudInstanceConfigResponse) Reset() { *x = CloudInstanceConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudInstanceConfigResponse) String() string { @@ -5697,7 +5571,7 @@ func (*CloudInstanceConfigResponse) ProtoMessage() {} func (x *CloudInstanceConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5753,11 +5627,9 @@ type CloudDatabaseResponse struct { func (x *CloudDatabaseResponse) Reset() { *x = CloudDatabaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudDatabaseResponse) String() string { @@ -5768,7 +5640,7 @@ func (*CloudDatabaseResponse) ProtoMessage() {} func (x *CloudDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5832,11 +5704,9 @@ type ReadResult struct { func (x *ReadResult) Reset() { *x = ReadResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadResult) String() string { @@ -5847,7 +5717,7 @@ func (*ReadResult) ProtoMessage() {} func (x *ReadResult) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5912,11 +5782,9 @@ type QueryResult struct { func (x *QueryResult) Reset() { *x = QueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryResult) String() string { @@ -5927,7 +5795,7 @@ func (*QueryResult) ProtoMessage() {} func (x *QueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5976,11 +5844,9 @@ type ChangeStreamRecord struct { func (x *ChangeStreamRecord) Reset() { *x = ChangeStreamRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangeStreamRecord) String() string { @@ -5991,7 +5857,7 @@ func (*ChangeStreamRecord) ProtoMessage() {} func (x *ChangeStreamRecord) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6097,11 +5963,9 @@ type DataChangeRecord struct { func (x *DataChangeRecord) Reset() { *x = DataChangeRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataChangeRecord) String() string { @@ -6112,7 +5976,7 @@ func (*DataChangeRecord) ProtoMessage() {} func (x *DataChangeRecord) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6238,11 +6102,9 @@ type ChildPartitionsRecord struct { func (x *ChildPartitionsRecord) Reset() { *x = ChildPartitionsRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChildPartitionsRecord) String() string { @@ -6253,7 +6115,7 @@ func (*ChildPartitionsRecord) ProtoMessage() {} func (x *ChildPartitionsRecord) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6301,11 +6163,9 @@ type HeartbeatRecord struct { func (x *HeartbeatRecord) Reset() { *x = HeartbeatRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HeartbeatRecord) String() string { @@ -6316,7 +6176,7 @@ func (*HeartbeatRecord) ProtoMessage() {} func (x *HeartbeatRecord) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6350,11 +6210,9 @@ type SpannerOptions struct { func (x *SpannerOptions) Reset() { *x = SpannerOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpannerOptions) String() string { @@ -6365,7 +6223,7 @@ func (*SpannerOptions) ProtoMessage() {} func (x *SpannerOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6400,11 +6258,9 @@ type SessionPoolOptions struct { func (x *SessionPoolOptions) Reset() { *x = SessionPoolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SessionPoolOptions) String() string { @@ -6415,7 +6271,7 @@ func (*SessionPoolOptions) ProtoMessage() {} func (x *SessionPoolOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6453,11 +6309,9 @@ type QueryAction_Parameter struct { func (x *QueryAction_Parameter) Reset() { *x = QueryAction_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryAction_Parameter) String() string { @@ -6468,7 +6322,7 @@ func (*QueryAction_Parameter) ProtoMessage() {} func (x *QueryAction_Parameter) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6520,11 +6374,9 @@ type MutationAction_InsertArgs struct { func (x *MutationAction_InsertArgs) Reset() { *x = MutationAction_InsertArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationAction_InsertArgs) String() string { @@ -6535,7 +6387,7 @@ func (*MutationAction_InsertArgs) ProtoMessage() {} func (x *MutationAction_InsertArgs) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6587,11 +6439,9 @@ type MutationAction_UpdateArgs struct { func (x *MutationAction_UpdateArgs) Reset() { *x = MutationAction_UpdateArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationAction_UpdateArgs) String() string { @@ -6602,7 +6452,7 @@ func (*MutationAction_UpdateArgs) ProtoMessage() {} func (x *MutationAction_UpdateArgs) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6663,11 +6513,9 @@ type MutationAction_Mod struct { func (x *MutationAction_Mod) Reset() { *x = MutationAction_Mod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MutationAction_Mod) String() string { @@ -6678,7 +6526,7 @@ func (*MutationAction_Mod) ProtoMessage() {} func (x *MutationAction_Mod) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6748,11 +6596,9 @@ type PartitionedUpdateAction_ExecutePartitionedUpdateOptions struct { func (x *PartitionedUpdateAction_ExecutePartitionedUpdateOptions) Reset() { *x = PartitionedUpdateAction_ExecutePartitionedUpdateOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartitionedUpdateAction_ExecutePartitionedUpdateOptions) String() string { @@ -6763,7 +6609,7 @@ func (*PartitionedUpdateAction_ExecutePartitionedUpdateOptions) ProtoMessage() { func (x *PartitionedUpdateAction_ExecutePartitionedUpdateOptions) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6810,11 +6656,9 @@ type DataChangeRecord_ColumnType struct { func (x *DataChangeRecord_ColumnType) Reset() { *x = DataChangeRecord_ColumnType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataChangeRecord_ColumnType) String() string { @@ -6825,7 +6669,7 @@ func (*DataChangeRecord_ColumnType) ProtoMessage() {} func (x *DataChangeRecord_ColumnType) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6886,11 +6730,9 @@ type DataChangeRecord_Mod struct { func (x *DataChangeRecord_Mod) Reset() { *x = DataChangeRecord_Mod{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataChangeRecord_Mod) String() string { @@ -6901,7 +6743,7 @@ func (*DataChangeRecord_Mod) ProtoMessage() {} func (x *DataChangeRecord_Mod) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6951,11 +6793,9 @@ type ChildPartitionsRecord_ChildPartition struct { func (x *ChildPartitionsRecord_ChildPartition) Reset() { *x = ChildPartitionsRecord_ChildPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChildPartitionsRecord_ChildPartition) String() string { @@ -6966,7 +6806,7 @@ func (*ChildPartitionsRecord_ChildPartition) ProtoMessage() {} func (x *ChildPartitionsRecord_ChildPartition) ProtoReflect() protoreflect.Message { mi := &file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8680,968 +8520,6 @@ func file_google_spanner_executor_v1_cloud_executor_proto_init() { if File_google_spanner_executor_v1_cloud_executor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SpannerAsyncActionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SpannerAsyncActionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpannerAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*QueryAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DmlAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*BatchDmlAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*KeyRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*KeySet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ValueList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MutationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*WriteMutationsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PartitionedUpdateAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StartTransactionAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Concurrency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TableMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ColumnMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*TransactionExecutionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FinishTransactionAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AdminAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateUserInstanceConfigAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateUserInstanceConfigAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudInstanceConfigAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUserInstanceConfigAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudInstanceConfigsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloudInstanceAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCloudInstanceAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCloudInstanceAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCloudDatabaseDdlAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DropCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ChangeQuorumCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudDatabasesAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudInstancesAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudInstanceAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudDatabaseOperationsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*RestoreCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudDatabaseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloudBackupAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*CopyCloudBackupAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*GetCloudBackupAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCloudBackupAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCloudBackupAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudBackupsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ListCloudBackupOperationsAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*GetOperationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*QueryCancellationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*CancelOperationAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*StartBatchTransactionAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*CloseBatchTransactionAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDbPartitionsForReadAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*GenerateDbPartitionsForQueryAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*BatchPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ExecutePartitionAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ExecuteChangeStreamQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*SpannerActionOutcome); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*AdminResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*CloudBackupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*OperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*CloudInstanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*CloudInstanceConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*CloudDatabaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ReadResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*QueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*ChangeStreamRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*DataChangeRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ChildPartitionsRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*HeartbeatRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*SpannerOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*SessionPoolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*QueryAction_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*MutationAction_InsertArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*MutationAction_UpdateArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*MutationAction_Mod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*PartitionedUpdateAction_ExecutePartitionedUpdateOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*DataChangeRecord_ColumnType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*DataChangeRecord_Mod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ChildPartitionsRecord_ChildPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_spanner_executor_v1_cloud_executor_proto_msgTypes[2].OneofWrappers = []any{ (*SpannerAction_Start)(nil), (*SpannerAction_Finish)(nil), diff --git a/spanner/executor/apiv1/helpers.go b/spanner/executor/apiv1/helpers.go index 19591655d811..8f4387d23285 100755 --- a/spanner/executor/apiv1/helpers.go +++ b/spanner/executor/apiv1/helpers.go @@ -18,10 +18,16 @@ package executor import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "spanner-cloud-executor.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -40,3 +46,14 @@ func getVersionClient() string { func DefaultAuthScopes() []string { return []string{} } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/spanner/executor/apiv1/spanner_executor_proxy_client.go b/spanner/executor/apiv1/spanner_executor_proxy_client.go index fcfca7687206..5de6bc0294f8 100755 --- a/spanner/executor/apiv1/spanner_executor_proxy_client.go +++ b/spanner/executor/apiv1/spanner_executor_proxy_client.go @@ -18,6 +18,7 @@ package executor import ( "context" + "log/slog" "math" executorpb "cloud.google.com/go/spanner/executor/apiv1/executorpb" @@ -127,6 +128,8 @@ type spannerExecutorProxyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewSpannerExecutorProxyClient creates a new spanner executor proxy client based on gRPC. @@ -153,6 +156,7 @@ func NewSpannerExecutorProxyClient(ctx context.Context, opts ...option.ClientOpt connPool: connPool, spannerExecutorProxyClient: executorpb.NewSpannerExecutorProxyClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -192,7 +196,9 @@ func (c *spannerExecutorProxyGRPCClient) ExecuteActionAsync(ctx context.Context, opts = append((*c.CallOptions).ExecuteActionAsync[0:len((*c.CallOptions).ExecuteActionAsync):len((*c.CallOptions).ExecuteActionAsync)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ExecuteActionAsync") resp, err = c.spannerExecutorProxyClient.ExecuteActionAsync(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ExecuteActionAsync") return err }, opts...) if err != nil { diff --git a/speech/apiv1/adaptation_client.go b/speech/apiv1/adaptation_client.go index 2e237fa5e2b6..928efbc9a7fd 100755 --- a/speech/apiv1/adaptation_client.go +++ b/speech/apiv1/adaptation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" speechpb "cloud.google.com/go/speech/apiv1/speechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -239,6 +238,8 @@ type adaptationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAdaptationClient creates a new adaptation client based on gRPC. @@ -265,6 +266,7 @@ func NewAdaptationClient(ctx context.Context, opts ...option.ClientOption) (*Ada connPool: connPool, adaptationClient: speechpb.NewAdaptationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -312,6 +314,8 @@ type adaptationRESTClient struct { // Points back to the CallOptions field of the containing AdaptationClient CallOptions **AdaptationCallOptions + + logger *slog.Logger } // NewAdaptationRESTClient creates a new adaptation rest client. @@ -329,6 +333,7 @@ func NewAdaptationRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -381,7 +386,7 @@ func (c *adaptationGRPCClient) CreatePhraseSet(ctx context.Context, req *speechp var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.CreatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.CreatePhraseSet, req, settings.GRPC, c.logger, "CreatePhraseSet") return err }, opts...) if err != nil { @@ -399,7 +404,7 @@ func (c *adaptationGRPCClient) GetPhraseSet(ctx context.Context, req *speechpb.G var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.GetPhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.GetPhraseSet, req, settings.GRPC, c.logger, "GetPhraseSet") return err }, opts...) if err != nil { @@ -428,7 +433,7 @@ func (c *adaptationGRPCClient) ListPhraseSet(ctx context.Context, req *speechpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.ListPhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.ListPhraseSet, req, settings.GRPC, c.logger, "ListPhraseSet") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *adaptationGRPCClient) UpdatePhraseSet(ctx context.Context, req *speechp var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.UpdatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.UpdatePhraseSet, req, settings.GRPC, c.logger, "UpdatePhraseSet") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *adaptationGRPCClient) DeletePhraseSet(ctx context.Context, req *speechp opts = append((*c.CallOptions).DeletePhraseSet[0:len((*c.CallOptions).DeletePhraseSet):len((*c.CallOptions).DeletePhraseSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adaptationClient.DeletePhraseSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adaptationClient.DeletePhraseSet, req, settings.GRPC, c.logger, "DeletePhraseSet") return err }, opts...) return err @@ -495,7 +500,7 @@ func (c *adaptationGRPCClient) CreateCustomClass(ctx context.Context, req *speec var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.CreateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.CreateCustomClass, req, settings.GRPC, c.logger, "CreateCustomClass") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *adaptationGRPCClient) GetCustomClass(ctx context.Context, req *speechpb var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.GetCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.GetCustomClass, req, settings.GRPC, c.logger, "GetCustomClass") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *adaptationGRPCClient) ListCustomClasses(ctx context.Context, req *speec } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.ListCustomClasses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.ListCustomClasses, req, settings.GRPC, c.logger, "ListCustomClasses") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *adaptationGRPCClient) UpdateCustomClass(ctx context.Context, req *speec var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.UpdateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.UpdateCustomClass, req, settings.GRPC, c.logger, "UpdateCustomClass") return err }, opts...) if err != nil { @@ -594,7 +599,7 @@ func (c *adaptationGRPCClient) DeleteCustomClass(ctx context.Context, req *speec opts = append((*c.CallOptions).DeleteCustomClass[0:len((*c.CallOptions).DeleteCustomClass):len((*c.CallOptions).DeleteCustomClass)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adaptationClient.DeleteCustomClass(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adaptationClient.DeleteCustomClass, req, settings.GRPC, c.logger, "DeleteCustomClass") return err }, opts...) return err @@ -609,7 +614,7 @@ func (c *adaptationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *adaptationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -702,17 +707,7 @@ func (c *adaptationRESTClient) CreatePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhraseSet") if err != nil { return err } @@ -762,17 +757,7 @@ func (c *adaptationRESTClient) GetPhraseSet(ctx context.Context, req *speechpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhraseSet") if err != nil { return err } @@ -834,21 +819,10 @@ func (c *adaptationRESTClient) ListPhraseSet(ctx context.Context, req *speechpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhraseSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -925,17 +899,7 @@ func (c *adaptationRESTClient) UpdatePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePhraseSet") if err != nil { return err } @@ -982,15 +946,8 @@ func (c *adaptationRESTClient) DeletePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhraseSet") + return err }, opts...) } @@ -1033,17 +990,7 @@ func (c *adaptationRESTClient) CreateCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomClass") if err != nil { return err } @@ -1093,17 +1040,7 @@ func (c *adaptationRESTClient) GetCustomClass(ctx context.Context, req *speechpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomClass") if err != nil { return err } @@ -1165,21 +1102,10 @@ func (c *adaptationRESTClient) ListCustomClasses(ctx context.Context, req *speec } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomClasses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1256,17 +1182,7 @@ func (c *adaptationRESTClient) UpdateCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomClass") if err != nil { return err } @@ -1313,15 +1229,8 @@ func (c *adaptationRESTClient) DeleteCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomClass") + return err }, opts...) } @@ -1358,17 +1267,7 @@ func (c *adaptationRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1436,21 +1335,10 @@ func (c *adaptationRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/speech/apiv1/adaptation_client_example_go123_test.go b/speech/apiv1/adaptation_client_example_go123_test.go index a9877ae28c9f..c73ca7c4d51f 100644 --- a/speech/apiv1/adaptation_client_example_go123_test.go +++ b/speech/apiv1/adaptation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAdaptationClient_ListCustomClasses_all() { } for resp, err := range c.ListCustomClasses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAdaptationClient_ListPhraseSet_all() { } for resp, err := range c.ListPhraseSet(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAdaptationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/speech/apiv1/helpers.go b/speech/apiv1/helpers.go index 5e2c4209f8b3..ab3d4368f0e0 100755 --- a/speech/apiv1/helpers.go +++ b/speech/apiv1/helpers.go @@ -18,10 +18,20 @@ package speech import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "speech.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/speech/apiv1/speech_client.go b/speech/apiv1/speech_client.go index 1987a5b8be66..5dba07c26c1b 100755 --- a/speech/apiv1/speech_client.go +++ b/speech/apiv1/speech_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" speechpb "cloud.google.com/go/speech/apiv1/speechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -254,6 +253,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new speech client based on gRPC. @@ -280,6 +281,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: speechpb.NewSpeechClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -343,6 +345,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new speech rest client. @@ -360,6 +364,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,7 +424,7 @@ func (c *gRPCClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque var resp *speechpb.RecognizeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Recognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Recognize, req, settings.GRPC, c.logger, "Recognize") return err }, opts...) if err != nil { @@ -434,7 +439,7 @@ func (c *gRPCClient) LongRunningRecognize(ctx context.Context, req *speechpb.Lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LongRunningRecognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LongRunningRecognize, req, settings.GRPC, c.logger, "LongRunningRecognize") return err }, opts...) if err != nil { @@ -451,7 +456,9 @@ func (c *gRPCClient) StreamingRecognize(ctx context.Context, opts ...gax.CallOpt opts = append((*c.CallOptions).StreamingRecognize[0:len((*c.CallOptions).StreamingRecognize):len((*c.CallOptions).StreamingRecognize)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRecognize") resp, err = c.client.StreamingRecognize(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRecognize") return err }, opts...) if err != nil { @@ -469,7 +476,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -495,7 +502,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -558,17 +565,7 @@ func (c *restClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recognize") if err != nil { return err } @@ -625,21 +622,10 @@ func (c *restClient) LongRunningRecognize(ctx context.Context, req *speechpb.Lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LongRunningRecognize") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -698,17 +684,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -776,21 +752,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/speech/apiv1/speech_client_example_go123_test.go b/speech/apiv1/speech_client_example_go123_test.go index 9f537e8ee634..55fa5a7c9bad 100644 --- a/speech/apiv1/speech_client_example_go123_test.go +++ b/speech/apiv1/speech_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/speech/apiv1/speechpb/cloud_speech.pb.go b/speech/apiv1/speechpb/cloud_speech.pb.go index 1b8da01a5c21..6557d82450c0 100755 --- a/speech/apiv1/speechpb/cloud_speech.pb.go +++ b/speech/apiv1/speechpb/cloud_speech.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1/cloud_speech.proto @@ -529,11 +529,9 @@ type RecognizeRequest struct { func (x *RecognizeRequest) Reset() { *x = RecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeRequest) String() string { @@ -544,7 +542,7 @@ func (*RecognizeRequest) ProtoMessage() {} func (x *RecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +589,9 @@ type LongRunningRecognizeRequest struct { func (x *LongRunningRecognizeRequest) Reset() { *x = LongRunningRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeRequest) String() string { @@ -606,7 +602,7 @@ func (*LongRunningRecognizeRequest) ProtoMessage() {} func (x *LongRunningRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +652,9 @@ type TranscriptOutputConfig struct { func (x *TranscriptOutputConfig) Reset() { *x = TranscriptOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptOutputConfig) String() string { @@ -671,7 +665,7 @@ func (*TranscriptOutputConfig) ProtoMessage() {} func (x *TranscriptOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +728,9 @@ type StreamingRecognizeRequest struct { func (x *StreamingRecognizeRequest) Reset() { *x = StreamingRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeRequest) String() string { @@ -749,7 +741,7 @@ func (*StreamingRecognizeRequest) ProtoMessage() {} func (x *StreamingRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +852,9 @@ type StreamingRecognitionConfig struct { func (x *StreamingRecognitionConfig) Reset() { *x = StreamingRecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionConfig) String() string { @@ -875,7 +865,7 @@ func (*StreamingRecognitionConfig) ProtoMessage() {} func (x *StreamingRecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1117,11 +1107,9 @@ type RecognitionConfig struct { func (x *RecognitionConfig) Reset() { *x = RecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionConfig) String() string { @@ -1132,7 +1120,7 @@ func (*RecognitionConfig) ProtoMessage() {} func (x *RecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1301,9 @@ type SpeakerDiarizationConfig struct { func (x *SpeakerDiarizationConfig) Reset() { *x = SpeakerDiarizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeakerDiarizationConfig) String() string { @@ -1328,7 +1314,7 @@ func (*SpeakerDiarizationConfig) ProtoMessage() {} func (x *SpeakerDiarizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1409,11 +1395,9 @@ type RecognitionMetadata struct { func (x *RecognitionMetadata) Reset() { *x = RecognitionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionMetadata) String() string { @@ -1424,7 +1408,7 @@ func (*RecognitionMetadata) ProtoMessage() {} func (x *RecognitionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1528,11 +1512,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -1543,7 +1525,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,11 +1575,9 @@ type RecognitionAudio struct { func (x *RecognitionAudio) Reset() { *x = RecognitionAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionAudio) String() string { @@ -1608,7 +1588,7 @@ func (*RecognitionAudio) ProtoMessage() {} func (x *RecognitionAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1673,9 @@ type RecognizeResponse struct { func (x *RecognizeResponse) Reset() { *x = RecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeResponse) String() string { @@ -1708,7 +1686,7 @@ func (*RecognizeResponse) ProtoMessage() {} func (x *RecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1779,11 +1757,9 @@ type LongRunningRecognizeResponse struct { func (x *LongRunningRecognizeResponse) Reset() { *x = LongRunningRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeResponse) String() string { @@ -1794,7 +1770,7 @@ func (*LongRunningRecognizeResponse) ProtoMessage() {} func (x *LongRunningRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1873,11 +1849,9 @@ type LongRunningRecognizeMetadata struct { func (x *LongRunningRecognizeMetadata) Reset() { *x = LongRunningRecognizeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeMetadata) String() string { @@ -1888,7 +1862,7 @@ func (*LongRunningRecognizeMetadata) ProtoMessage() {} func (x *LongRunningRecognizeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2009,11 +1983,9 @@ type StreamingRecognizeResponse struct { func (x *StreamingRecognizeResponse) Reset() { *x = StreamingRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeResponse) String() string { @@ -2024,7 +1996,7 @@ func (*StreamingRecognizeResponse) ProtoMessage() {} func (x *StreamingRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2127,11 +2099,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -2142,7 +2112,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2225,11 +2195,9 @@ type SpeechRecognitionResult struct { func (x *SpeechRecognitionResult) Reset() { *x = SpeechRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionResult) String() string { @@ -2240,7 +2208,7 @@ func (*SpeechRecognitionResult) ProtoMessage() {} func (x *SpeechRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2310,11 +2278,9 @@ type SpeechRecognitionAlternative struct { func (x *SpeechRecognitionAlternative) Reset() { *x = SpeechRecognitionAlternative{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionAlternative) String() string { @@ -2325,7 +2291,7 @@ func (*SpeechRecognitionAlternative) ProtoMessage() {} func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2411,11 +2377,9 @@ type WordInfo struct { func (x *WordInfo) Reset() { *x = WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WordInfo) String() string { @@ -2426,7 +2390,7 @@ func (*WordInfo) ProtoMessage() {} func (x *WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2500,11 +2464,9 @@ type SpeechAdaptationInfo struct { func (x *SpeechAdaptationInfo) Reset() { *x = SpeechAdaptationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptationInfo) String() string { @@ -2515,7 +2477,7 @@ func (*SpeechAdaptationInfo) ProtoMessage() {} func (x *SpeechAdaptationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2558,11 +2520,9 @@ type StreamingRecognitionConfig_VoiceActivityTimeout struct { func (x *StreamingRecognitionConfig_VoiceActivityTimeout) Reset() { *x = StreamingRecognitionConfig_VoiceActivityTimeout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionConfig_VoiceActivityTimeout) String() string { @@ -2573,7 +2533,7 @@ func (*StreamingRecognitionConfig_VoiceActivityTimeout) ProtoMessage() {} func (x *StreamingRecognitionConfig_VoiceActivityTimeout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3230,248 +3190,6 @@ func file_google_cloud_speech_v1_cloud_speech_proto_init() { return } file_google_cloud_speech_v1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpeakerDiarizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionAlternative); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionConfig_VoiceActivityTimeout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_speech_v1_cloud_speech_proto_msgTypes[2].OneofWrappers = []any{ (*TranscriptOutputConfig_GcsUri)(nil), } diff --git a/speech/apiv1/speechpb/cloud_speech_adaptation.pb.go b/speech/apiv1/speechpb/cloud_speech_adaptation.pb.go index e7803b51318a..02627c3fac04 100755 --- a/speech/apiv1/speechpb/cloud_speech_adaptation.pb.go +++ b/speech/apiv1/speechpb/cloud_speech_adaptation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1/cloud_speech_adaptation.proto @@ -71,11 +71,9 @@ type CreatePhraseSetRequest struct { func (x *CreatePhraseSetRequest) Reset() { *x = CreatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhraseSetRequest) String() string { @@ -86,7 +84,7 @@ func (*CreatePhraseSetRequest) ProtoMessage() {} func (x *CreatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type UpdatePhraseSetRequest struct { func (x *UpdatePhraseSetRequest) Reset() { *x = UpdatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePhraseSetRequest) String() string { @@ -162,7 +158,7 @@ func (*UpdatePhraseSetRequest) ProtoMessage() {} func (x *UpdatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +207,9 @@ type GetPhraseSetRequest struct { func (x *GetPhraseSetRequest) Reset() { *x = GetPhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhraseSetRequest) String() string { @@ -226,7 +220,7 @@ func (*GetPhraseSetRequest) ProtoMessage() {} func (x *GetPhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type ListPhraseSetRequest struct { func (x *ListPhraseSetRequest) Reset() { *x = ListPhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetRequest) String() string { @@ -294,7 +286,7 @@ func (*ListPhraseSetRequest) ProtoMessage() {} func (x *ListPhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +337,9 @@ type ListPhraseSetResponse struct { func (x *ListPhraseSetResponse) Reset() { *x = ListPhraseSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetResponse) String() string { @@ -360,7 +350,7 @@ func (*ListPhraseSetResponse) ProtoMessage() {} func (x *ListPhraseSetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +393,9 @@ type DeletePhraseSetRequest struct { func (x *DeletePhraseSetRequest) Reset() { *x = DeletePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhraseSetRequest) String() string { @@ -418,7 +406,7 @@ func (*DeletePhraseSetRequest) ProtoMessage() {} func (x *DeletePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +457,9 @@ type CreateCustomClassRequest struct { func (x *CreateCustomClassRequest) Reset() { *x = CreateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomClassRequest) String() string { @@ -484,7 +470,7 @@ func (*CreateCustomClassRequest) ProtoMessage() {} func (x *CreateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +531,9 @@ type UpdateCustomClassRequest struct { func (x *UpdateCustomClassRequest) Reset() { *x = UpdateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomClassRequest) String() string { @@ -560,7 +544,7 @@ func (*UpdateCustomClassRequest) ProtoMessage() {} func (x *UpdateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +587,9 @@ type GetCustomClassRequest struct { func (x *GetCustomClassRequest) Reset() { *x = GetCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomClassRequest) String() string { @@ -618,7 +600,7 @@ func (*GetCustomClassRequest) ProtoMessage() {} func (x *GetCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +653,9 @@ type ListCustomClassesRequest struct { func (x *ListCustomClassesRequest) Reset() { *x = ListCustomClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesRequest) String() string { @@ -686,7 +666,7 @@ func (*ListCustomClassesRequest) ProtoMessage() {} func (x *ListCustomClassesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +717,9 @@ type ListCustomClassesResponse struct { func (x *ListCustomClassesResponse) Reset() { *x = ListCustomClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesResponse) String() string { @@ -752,7 +730,7 @@ func (*ListCustomClassesResponse) ProtoMessage() {} func (x *ListCustomClassesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +779,9 @@ type DeleteCustomClassRequest struct { func (x *DeleteCustomClassRequest) Reset() { *x = DeleteCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomClassRequest) String() string { @@ -816,7 +792,7 @@ func (*DeleteCustomClassRequest) ProtoMessage() {} func (x *DeleteCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,152 +1145,6 @@ func file_google_cloud_speech_v1_cloud_speech_adaptation_proto_init() { return } file_google_cloud_speech_v1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetPhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_cloud_speech_adaptation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/speech/apiv1/speechpb/resource.pb.go b/speech/apiv1/speechpb/resource.pb.go index 38c9bff1e870..81344de595ab 100755 --- a/speech/apiv1/speechpb/resource.pb.go +++ b/speech/apiv1/speechpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1/resource.proto @@ -55,11 +55,9 @@ type CustomClass struct { func (x *CustomClass) Reset() { *x = CustomClass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass) String() string { @@ -70,7 +68,7 @@ func (*CustomClass) ProtoMessage() {} func (x *CustomClass) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type PhraseSet struct { func (x *PhraseSet) Reset() { *x = PhraseSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet) String() string { @@ -146,7 +142,7 @@ func (*PhraseSet) ProtoMessage() {} func (x *PhraseSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type SpeechAdaptation struct { func (x *SpeechAdaptation) Reset() { *x = SpeechAdaptation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation) String() string { @@ -222,7 +216,7 @@ func (*SpeechAdaptation) ProtoMessage() {} func (x *SpeechAdaptation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type TranscriptNormalization struct { func (x *TranscriptNormalization) Reset() { *x = TranscriptNormalization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization) String() string { @@ -298,7 +290,7 @@ func (*TranscriptNormalization) ProtoMessage() {} func (x *TranscriptNormalization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type CustomClass_ClassItem struct { func (x *CustomClass_ClassItem) Reset() { *x = CustomClass_ClassItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass_ClassItem) String() string { @@ -347,7 +337,7 @@ func (*CustomClass_ClassItem) ProtoMessage() {} func (x *CustomClass_ClassItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type PhraseSet_Phrase struct { func (x *PhraseSet_Phrase) Reset() { *x = PhraseSet_Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet_Phrase) String() string { @@ -430,7 +418,7 @@ func (*PhraseSet_Phrase) ProtoMessage() {} func (x *PhraseSet_Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +459,9 @@ type SpeechAdaptation_ABNFGrammar struct { func (x *SpeechAdaptation_ABNFGrammar) Reset() { *x = SpeechAdaptation_ABNFGrammar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation_ABNFGrammar) String() string { @@ -486,7 +472,7 @@ func (*SpeechAdaptation_ABNFGrammar) ProtoMessage() {} func (x *SpeechAdaptation_ABNFGrammar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +510,9 @@ type TranscriptNormalization_Entry struct { func (x *TranscriptNormalization_Entry) Reset() { *x = TranscriptNormalization_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization_Entry) String() string { @@ -539,7 +523,7 @@ func (*TranscriptNormalization_Entry) ProtoMessage() {} func (x *TranscriptNormalization_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,104 +693,6 @@ func file_google_cloud_speech_v1_resource_proto_init() { if File_google_cloud_speech_v1_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass_ClassItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet_Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation_ABNFGrammar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/speech/apiv1p1beta1/adaptation_client.go b/speech/apiv1p1beta1/adaptation_client.go index 791e0ba4b506..319a7a07113a 100755 --- a/speech/apiv1p1beta1/adaptation_client.go +++ b/speech/apiv1p1beta1/adaptation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" speechpb "cloud.google.com/go/speech/apiv1p1beta1/speechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -239,6 +238,8 @@ type adaptationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAdaptationClient creates a new adaptation client based on gRPC. @@ -265,6 +266,7 @@ func NewAdaptationClient(ctx context.Context, opts ...option.ClientOption) (*Ada connPool: connPool, adaptationClient: speechpb.NewAdaptationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -312,6 +314,8 @@ type adaptationRESTClient struct { // Points back to the CallOptions field of the containing AdaptationClient CallOptions **AdaptationCallOptions + + logger *slog.Logger } // NewAdaptationRESTClient creates a new adaptation rest client. @@ -329,6 +333,7 @@ func NewAdaptationRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -381,7 +386,7 @@ func (c *adaptationGRPCClient) CreatePhraseSet(ctx context.Context, req *speechp var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.CreatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.CreatePhraseSet, req, settings.GRPC, c.logger, "CreatePhraseSet") return err }, opts...) if err != nil { @@ -399,7 +404,7 @@ func (c *adaptationGRPCClient) GetPhraseSet(ctx context.Context, req *speechpb.G var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.GetPhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.GetPhraseSet, req, settings.GRPC, c.logger, "GetPhraseSet") return err }, opts...) if err != nil { @@ -428,7 +433,7 @@ func (c *adaptationGRPCClient) ListPhraseSet(ctx context.Context, req *speechpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.ListPhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.ListPhraseSet, req, settings.GRPC, c.logger, "ListPhraseSet") return err }, opts...) if err != nil { @@ -463,7 +468,7 @@ func (c *adaptationGRPCClient) UpdatePhraseSet(ctx context.Context, req *speechp var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.UpdatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.UpdatePhraseSet, req, settings.GRPC, c.logger, "UpdatePhraseSet") return err }, opts...) if err != nil { @@ -480,7 +485,7 @@ func (c *adaptationGRPCClient) DeletePhraseSet(ctx context.Context, req *speechp opts = append((*c.CallOptions).DeletePhraseSet[0:len((*c.CallOptions).DeletePhraseSet):len((*c.CallOptions).DeletePhraseSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adaptationClient.DeletePhraseSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adaptationClient.DeletePhraseSet, req, settings.GRPC, c.logger, "DeletePhraseSet") return err }, opts...) return err @@ -495,7 +500,7 @@ func (c *adaptationGRPCClient) CreateCustomClass(ctx context.Context, req *speec var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.CreateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.CreateCustomClass, req, settings.GRPC, c.logger, "CreateCustomClass") return err }, opts...) if err != nil { @@ -513,7 +518,7 @@ func (c *adaptationGRPCClient) GetCustomClass(ctx context.Context, req *speechpb var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.GetCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.GetCustomClass, req, settings.GRPC, c.logger, "GetCustomClass") return err }, opts...) if err != nil { @@ -542,7 +547,7 @@ func (c *adaptationGRPCClient) ListCustomClasses(ctx context.Context, req *speec } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.ListCustomClasses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.ListCustomClasses, req, settings.GRPC, c.logger, "ListCustomClasses") return err }, opts...) if err != nil { @@ -577,7 +582,7 @@ func (c *adaptationGRPCClient) UpdateCustomClass(ctx context.Context, req *speec var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.adaptationClient.UpdateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.adaptationClient.UpdateCustomClass, req, settings.GRPC, c.logger, "UpdateCustomClass") return err }, opts...) if err != nil { @@ -594,7 +599,7 @@ func (c *adaptationGRPCClient) DeleteCustomClass(ctx context.Context, req *speec opts = append((*c.CallOptions).DeleteCustomClass[0:len((*c.CallOptions).DeleteCustomClass):len((*c.CallOptions).DeleteCustomClass)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.adaptationClient.DeleteCustomClass(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.adaptationClient.DeleteCustomClass, req, settings.GRPC, c.logger, "DeleteCustomClass") return err }, opts...) return err @@ -609,7 +614,7 @@ func (c *adaptationGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -635,7 +640,7 @@ func (c *adaptationGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -702,17 +707,7 @@ func (c *adaptationRESTClient) CreatePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhraseSet") if err != nil { return err } @@ -762,17 +757,7 @@ func (c *adaptationRESTClient) GetPhraseSet(ctx context.Context, req *speechpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhraseSet") if err != nil { return err } @@ -834,21 +819,10 @@ func (c *adaptationRESTClient) ListPhraseSet(ctx context.Context, req *speechpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhraseSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -925,17 +899,7 @@ func (c *adaptationRESTClient) UpdatePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePhraseSet") if err != nil { return err } @@ -982,15 +946,8 @@ func (c *adaptationRESTClient) DeletePhraseSet(ctx context.Context, req *speechp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhraseSet") + return err }, opts...) } @@ -1033,17 +990,7 @@ func (c *adaptationRESTClient) CreateCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomClass") if err != nil { return err } @@ -1093,17 +1040,7 @@ func (c *adaptationRESTClient) GetCustomClass(ctx context.Context, req *speechpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomClass") if err != nil { return err } @@ -1165,21 +1102,10 @@ func (c *adaptationRESTClient) ListCustomClasses(ctx context.Context, req *speec } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomClasses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1256,17 +1182,7 @@ func (c *adaptationRESTClient) UpdateCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomClass") if err != nil { return err } @@ -1313,15 +1229,8 @@ func (c *adaptationRESTClient) DeleteCustomClass(ctx context.Context, req *speec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomClass") + return err }, opts...) } @@ -1358,17 +1267,7 @@ func (c *adaptationRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1436,21 +1335,10 @@ func (c *adaptationRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/speech/apiv1p1beta1/adaptation_client_example_go123_test.go b/speech/apiv1p1beta1/adaptation_client_example_go123_test.go index 9c469a4c6a29..2458df1bc879 100644 --- a/speech/apiv1p1beta1/adaptation_client_example_go123_test.go +++ b/speech/apiv1p1beta1/adaptation_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAdaptationClient_ListCustomClasses_all() { } for resp, err := range c.ListCustomClasses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAdaptationClient_ListPhraseSet_all() { } for resp, err := range c.ListPhraseSet(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAdaptationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/speech/apiv1p1beta1/helpers.go b/speech/apiv1p1beta1/helpers.go index 5e2c4209f8b3..ab3d4368f0e0 100755 --- a/speech/apiv1p1beta1/helpers.go +++ b/speech/apiv1p1beta1/helpers.go @@ -18,10 +18,20 @@ package speech import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "speech.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/speech/apiv1p1beta1/speech_client.go b/speech/apiv1p1beta1/speech_client.go index 28862e2cf103..6e1d4a902a68 100755 --- a/speech/apiv1p1beta1/speech_client.go +++ b/speech/apiv1p1beta1/speech_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" speechpb "cloud.google.com/go/speech/apiv1p1beta1/speechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -254,6 +253,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new speech client based on gRPC. @@ -280,6 +281,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: speechpb.NewSpeechClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -343,6 +345,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new speech rest client. @@ -360,6 +364,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -419,7 +424,7 @@ func (c *gRPCClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque var resp *speechpb.RecognizeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Recognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Recognize, req, settings.GRPC, c.logger, "Recognize") return err }, opts...) if err != nil { @@ -434,7 +439,7 @@ func (c *gRPCClient) LongRunningRecognize(ctx context.Context, req *speechpb.Lon var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LongRunningRecognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LongRunningRecognize, req, settings.GRPC, c.logger, "LongRunningRecognize") return err }, opts...) if err != nil { @@ -451,7 +456,9 @@ func (c *gRPCClient) StreamingRecognize(ctx context.Context, opts ...gax.CallOpt opts = append((*c.CallOptions).StreamingRecognize[0:len((*c.CallOptions).StreamingRecognize):len((*c.CallOptions).StreamingRecognize)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRecognize") resp, err = c.client.StreamingRecognize(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRecognize") return err }, opts...) if err != nil { @@ -469,7 +476,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -495,7 +502,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -558,17 +565,7 @@ func (c *restClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recognize") if err != nil { return err } @@ -625,21 +622,10 @@ func (c *restClient) LongRunningRecognize(ctx context.Context, req *speechpb.Lon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "LongRunningRecognize") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -698,17 +684,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -776,21 +752,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/speech/apiv1p1beta1/speech_client_example_go123_test.go b/speech/apiv1p1beta1/speech_client_example_go123_test.go index 9ed338458264..39ad47e4f245 100644 --- a/speech/apiv1p1beta1/speech_client_example_go123_test.go +++ b/speech/apiv1p1beta1/speech_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/speech/apiv1p1beta1/speechpb/cloud_speech.pb.go b/speech/apiv1p1beta1/speechpb/cloud_speech.pb.go index 9a968d85afda..4423070fdd17 100755 --- a/speech/apiv1p1beta1/speechpb/cloud_speech.pb.go +++ b/speech/apiv1p1beta1/speechpb/cloud_speech.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -529,11 +529,9 @@ type RecognizeRequest struct { func (x *RecognizeRequest) Reset() { *x = RecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeRequest) String() string { @@ -544,7 +542,7 @@ func (*RecognizeRequest) ProtoMessage() {} func (x *RecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +589,9 @@ type LongRunningRecognizeRequest struct { func (x *LongRunningRecognizeRequest) Reset() { *x = LongRunningRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeRequest) String() string { @@ -606,7 +602,7 @@ func (*LongRunningRecognizeRequest) ProtoMessage() {} func (x *LongRunningRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,11 +652,9 @@ type TranscriptOutputConfig struct { func (x *TranscriptOutputConfig) Reset() { *x = TranscriptOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptOutputConfig) String() string { @@ -671,7 +665,7 @@ func (*TranscriptOutputConfig) ProtoMessage() {} func (x *TranscriptOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +728,9 @@ type StreamingRecognizeRequest struct { func (x *StreamingRecognizeRequest) Reset() { *x = StreamingRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeRequest) String() string { @@ -749,7 +741,7 @@ func (*StreamingRecognizeRequest) ProtoMessage() {} func (x *StreamingRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,11 +852,9 @@ type StreamingRecognitionConfig struct { func (x *StreamingRecognitionConfig) Reset() { *x = StreamingRecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionConfig) String() string { @@ -875,7 +865,7 @@ func (*StreamingRecognitionConfig) ProtoMessage() {} func (x *StreamingRecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1130,11 +1120,9 @@ type RecognitionConfig struct { func (x *RecognitionConfig) Reset() { *x = RecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionConfig) String() string { @@ -1145,7 +1133,7 @@ func (*RecognitionConfig) ProtoMessage() {} func (x *RecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1342,11 +1330,9 @@ type SpeakerDiarizationConfig struct { func (x *SpeakerDiarizationConfig) Reset() { *x = SpeakerDiarizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeakerDiarizationConfig) String() string { @@ -1357,7 +1343,7 @@ func (*SpeakerDiarizationConfig) ProtoMessage() {} func (x *SpeakerDiarizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1429,9 @@ type RecognitionMetadata struct { func (x *RecognitionMetadata) Reset() { *x = RecognitionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionMetadata) String() string { @@ -1458,7 +1442,7 @@ func (*RecognitionMetadata) ProtoMessage() {} func (x *RecognitionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1570,11 +1554,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -1585,7 +1567,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1635,11 +1617,9 @@ type RecognitionAudio struct { func (x *RecognitionAudio) Reset() { *x = RecognitionAudio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionAudio) String() string { @@ -1650,7 +1630,7 @@ func (*RecognitionAudio) ProtoMessage() {} func (x *RecognitionAudio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1715,9 @@ type RecognizeResponse struct { func (x *RecognizeResponse) Reset() { *x = RecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeResponse) String() string { @@ -1750,7 +1728,7 @@ func (*RecognizeResponse) ProtoMessage() {} func (x *RecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1799,9 @@ type LongRunningRecognizeResponse struct { func (x *LongRunningRecognizeResponse) Reset() { *x = LongRunningRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeResponse) String() string { @@ -1836,7 +1812,7 @@ func (*LongRunningRecognizeResponse) ProtoMessage() {} func (x *LongRunningRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1894,9 @@ type LongRunningRecognizeMetadata struct { func (x *LongRunningRecognizeMetadata) Reset() { *x = LongRunningRecognizeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongRunningRecognizeMetadata) String() string { @@ -1933,7 +1907,7 @@ func (*LongRunningRecognizeMetadata) ProtoMessage() {} func (x *LongRunningRecognizeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2061,11 +2035,9 @@ type StreamingRecognizeResponse struct { func (x *StreamingRecognizeResponse) Reset() { *x = StreamingRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeResponse) String() string { @@ -2076,7 +2048,7 @@ func (*StreamingRecognizeResponse) ProtoMessage() {} func (x *StreamingRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2179,11 +2151,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -2194,7 +2164,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2277,11 +2247,9 @@ type SpeechRecognitionResult struct { func (x *SpeechRecognitionResult) Reset() { *x = SpeechRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionResult) String() string { @@ -2292,7 +2260,7 @@ func (*SpeechRecognitionResult) ProtoMessage() {} func (x *SpeechRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2362,11 +2330,9 @@ type SpeechRecognitionAlternative struct { func (x *SpeechRecognitionAlternative) Reset() { *x = SpeechRecognitionAlternative{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionAlternative) String() string { @@ -2377,7 +2343,7 @@ func (*SpeechRecognitionAlternative) ProtoMessage() {} func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2453,11 +2419,9 @@ type WordInfo struct { func (x *WordInfo) Reset() { *x = WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WordInfo) String() string { @@ -2468,7 +2432,7 @@ func (*WordInfo) ProtoMessage() {} func (x *WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2534,11 +2498,9 @@ type SpeechAdaptationInfo struct { func (x *SpeechAdaptationInfo) Reset() { *x = SpeechAdaptationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptationInfo) String() string { @@ -2549,7 +2511,7 @@ func (*SpeechAdaptationInfo) ProtoMessage() {} func (x *SpeechAdaptationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2592,11 +2554,9 @@ type StreamingRecognitionConfig_VoiceActivityTimeout struct { func (x *StreamingRecognitionConfig_VoiceActivityTimeout) Reset() { *x = StreamingRecognitionConfig_VoiceActivityTimeout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionConfig_VoiceActivityTimeout) String() string { @@ -2607,7 +2567,7 @@ func (*StreamingRecognitionConfig_VoiceActivityTimeout) ProtoMessage() {} func (x *StreamingRecognitionConfig_VoiceActivityTimeout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3297,248 +3257,6 @@ func file_google_cloud_speech_v1p1beta1_cloud_speech_proto_init() { return } file_google_cloud_speech_v1p1beta1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpeakerDiarizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionAudio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*LongRunningRecognizeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionAlternative); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionConfig_VoiceActivityTimeout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_speech_v1p1beta1_cloud_speech_proto_msgTypes[2].OneofWrappers = []any{ (*TranscriptOutputConfig_GcsUri)(nil), } diff --git a/speech/apiv1p1beta1/speechpb/cloud_speech_adaptation.pb.go b/speech/apiv1p1beta1/speechpb/cloud_speech_adaptation.pb.go index b5a138d08bcc..1f226b511315 100755 --- a/speech/apiv1p1beta1/speechpb/cloud_speech_adaptation.pb.go +++ b/speech/apiv1p1beta1/speechpb/cloud_speech_adaptation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto @@ -71,11 +71,9 @@ type CreatePhraseSetRequest struct { func (x *CreatePhraseSetRequest) Reset() { *x = CreatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhraseSetRequest) String() string { @@ -86,7 +84,7 @@ func (*CreatePhraseSetRequest) ProtoMessage() {} func (x *CreatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,11 +145,9 @@ type UpdatePhraseSetRequest struct { func (x *UpdatePhraseSetRequest) Reset() { *x = UpdatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePhraseSetRequest) String() string { @@ -162,7 +158,7 @@ func (*UpdatePhraseSetRequest) ProtoMessage() {} func (x *UpdatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +207,9 @@ type GetPhraseSetRequest struct { func (x *GetPhraseSetRequest) Reset() { *x = GetPhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhraseSetRequest) String() string { @@ -226,7 +220,7 @@ func (*GetPhraseSetRequest) ProtoMessage() {} func (x *GetPhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type ListPhraseSetRequest struct { func (x *ListPhraseSetRequest) Reset() { *x = ListPhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetRequest) String() string { @@ -294,7 +286,7 @@ func (*ListPhraseSetRequest) ProtoMessage() {} func (x *ListPhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,11 +337,9 @@ type ListPhraseSetResponse struct { func (x *ListPhraseSetResponse) Reset() { *x = ListPhraseSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetResponse) String() string { @@ -360,7 +350,7 @@ func (*ListPhraseSetResponse) ProtoMessage() {} func (x *ListPhraseSetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,11 +393,9 @@ type DeletePhraseSetRequest struct { func (x *DeletePhraseSetRequest) Reset() { *x = DeletePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhraseSetRequest) String() string { @@ -418,7 +406,7 @@ func (*DeletePhraseSetRequest) ProtoMessage() {} func (x *DeletePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +457,9 @@ type CreateCustomClassRequest struct { func (x *CreateCustomClassRequest) Reset() { *x = CreateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomClassRequest) String() string { @@ -484,7 +470,7 @@ func (*CreateCustomClassRequest) ProtoMessage() {} func (x *CreateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -545,11 +531,9 @@ type UpdateCustomClassRequest struct { func (x *UpdateCustomClassRequest) Reset() { *x = UpdateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomClassRequest) String() string { @@ -560,7 +544,7 @@ func (*UpdateCustomClassRequest) ProtoMessage() {} func (x *UpdateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,11 +587,9 @@ type GetCustomClassRequest struct { func (x *GetCustomClassRequest) Reset() { *x = GetCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomClassRequest) String() string { @@ -618,7 +600,7 @@ func (*GetCustomClassRequest) ProtoMessage() {} func (x *GetCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +653,9 @@ type ListCustomClassesRequest struct { func (x *ListCustomClassesRequest) Reset() { *x = ListCustomClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesRequest) String() string { @@ -686,7 +666,7 @@ func (*ListCustomClassesRequest) ProtoMessage() {} func (x *ListCustomClassesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,11 +717,9 @@ type ListCustomClassesResponse struct { func (x *ListCustomClassesResponse) Reset() { *x = ListCustomClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesResponse) String() string { @@ -752,7 +730,7 @@ func (*ListCustomClassesResponse) ProtoMessage() {} func (x *ListCustomClassesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -801,11 +779,9 @@ type DeleteCustomClassRequest struct { func (x *DeleteCustomClassRequest) Reset() { *x = DeleteCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomClassRequest) String() string { @@ -816,7 +792,7 @@ func (*DeleteCustomClassRequest) ProtoMessage() {} func (x *DeleteCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,152 +1162,6 @@ func file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_init() { return } file_google_cloud_speech_v1p1beta1_resource_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetPhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_cloud_speech_adaptation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/speech/apiv1p1beta1/speechpb/resource.pb.go b/speech/apiv1p1beta1/speechpb/resource.pb.go index 50926a724c39..b02b1090ffa1 100755 --- a/speech/apiv1p1beta1/speechpb/resource.pb.go +++ b/speech/apiv1p1beta1/speechpb/resource.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v1p1beta1/resource.proto @@ -55,11 +55,9 @@ type CustomClass struct { func (x *CustomClass) Reset() { *x = CustomClass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass) String() string { @@ -70,7 +68,7 @@ func (*CustomClass) ProtoMessage() {} func (x *CustomClass) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,11 +129,9 @@ type PhraseSet struct { func (x *PhraseSet) Reset() { *x = PhraseSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet) String() string { @@ -146,7 +142,7 @@ func (*PhraseSet) ProtoMessage() {} func (x *PhraseSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type SpeechAdaptation struct { func (x *SpeechAdaptation) Reset() { *x = SpeechAdaptation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation) String() string { @@ -222,7 +216,7 @@ func (*SpeechAdaptation) ProtoMessage() {} func (x *SpeechAdaptation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type TranscriptNormalization struct { func (x *TranscriptNormalization) Reset() { *x = TranscriptNormalization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization) String() string { @@ -298,7 +290,7 @@ func (*TranscriptNormalization) ProtoMessage() {} func (x *TranscriptNormalization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -332,11 +324,9 @@ type CustomClass_ClassItem struct { func (x *CustomClass_ClassItem) Reset() { *x = CustomClass_ClassItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass_ClassItem) String() string { @@ -347,7 +337,7 @@ func (*CustomClass_ClassItem) ProtoMessage() {} func (x *CustomClass_ClassItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -415,11 +405,9 @@ type PhraseSet_Phrase struct { func (x *PhraseSet_Phrase) Reset() { *x = PhraseSet_Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet_Phrase) String() string { @@ -430,7 +418,7 @@ func (*PhraseSet_Phrase) ProtoMessage() {} func (x *PhraseSet_Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +459,9 @@ type SpeechAdaptation_ABNFGrammar struct { func (x *SpeechAdaptation_ABNFGrammar) Reset() { *x = SpeechAdaptation_ABNFGrammar{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation_ABNFGrammar) String() string { @@ -486,7 +472,7 @@ func (*SpeechAdaptation_ABNFGrammar) ProtoMessage() {} func (x *SpeechAdaptation_ABNFGrammar) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,11 +510,9 @@ type TranscriptNormalization_Entry struct { func (x *TranscriptNormalization_Entry) Reset() { *x = TranscriptNormalization_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization_Entry) String() string { @@ -539,7 +523,7 @@ func (*TranscriptNormalization_Entry) ProtoMessage() {} func (x *TranscriptNormalization_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,104 +697,6 @@ func file_google_cloud_speech_v1p1beta1_resource_proto_init() { if File_google_cloud_speech_v1p1beta1_resource_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass_ClassItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet_Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation_ABNFGrammar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v1p1beta1_resource_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/speech/apiv2/helpers.go b/speech/apiv2/helpers.go index 5e2c4209f8b3..ab3d4368f0e0 100755 --- a/speech/apiv2/helpers.go +++ b/speech/apiv2/helpers.go @@ -18,10 +18,20 @@ package speech import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "speech.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/speech/apiv2/speech_client.go b/speech/apiv2/speech_client.go index e201ad1ec209..3197c6699dda 100755 --- a/speech/apiv2/speech_client.go +++ b/speech/apiv2/speech_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" speechpb "cloud.google.com/go/speech/apiv2/speechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1038,6 +1037,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new speech client based on gRPC. @@ -1064,6 +1065,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: speechpb.NewSpeechClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1128,6 +1130,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new speech rest client. @@ -1145,6 +1149,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1207,7 +1212,7 @@ func (c *gRPCClient) CreateRecognizer(ctx context.Context, req *speechpb.CreateR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateRecognizer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateRecognizer, req, settings.GRPC, c.logger, "CreateRecognizer") return err }, opts...) if err != nil { @@ -1238,7 +1243,7 @@ func (c *gRPCClient) ListRecognizers(ctx context.Context, req *speechpb.ListReco } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListRecognizers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListRecognizers, req, settings.GRPC, c.logger, "ListRecognizers") return err }, opts...) if err != nil { @@ -1273,7 +1278,7 @@ func (c *gRPCClient) GetRecognizer(ctx context.Context, req *speechpb.GetRecogni var resp *speechpb.Recognizer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetRecognizer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetRecognizer, req, settings.GRPC, c.logger, "GetRecognizer") return err }, opts...) if err != nil { @@ -1291,7 +1296,7 @@ func (c *gRPCClient) UpdateRecognizer(ctx context.Context, req *speechpb.UpdateR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateRecognizer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateRecognizer, req, settings.GRPC, c.logger, "UpdateRecognizer") return err }, opts...) if err != nil { @@ -1311,7 +1316,7 @@ func (c *gRPCClient) DeleteRecognizer(ctx context.Context, req *speechpb.DeleteR var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteRecognizer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteRecognizer, req, settings.GRPC, c.logger, "DeleteRecognizer") return err }, opts...) if err != nil { @@ -1331,7 +1336,7 @@ func (c *gRPCClient) UndeleteRecognizer(ctx context.Context, req *speechpb.Undel var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeleteRecognizer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeleteRecognizer, req, settings.GRPC, c.logger, "UndeleteRecognizer") return err }, opts...) if err != nil { @@ -1351,7 +1356,7 @@ func (c *gRPCClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque var resp *speechpb.RecognizeResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.Recognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.Recognize, req, settings.GRPC, c.logger, "Recognize") return err }, opts...) if err != nil { @@ -1366,7 +1371,9 @@ func (c *gRPCClient) StreamingRecognize(ctx context.Context, opts ...gax.CallOpt opts = append((*c.CallOptions).StreamingRecognize[0:len((*c.CallOptions).StreamingRecognize):len((*c.CallOptions).StreamingRecognize)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingRecognize") resp, err = c.client.StreamingRecognize(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingRecognize") return err }, opts...) if err != nil { @@ -1384,7 +1391,7 @@ func (c *gRPCClient) BatchRecognize(ctx context.Context, req *speechpb.BatchReco var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.BatchRecognize(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.BatchRecognize, req, settings.GRPC, c.logger, "BatchRecognize") return err }, opts...) if err != nil { @@ -1404,7 +1411,7 @@ func (c *gRPCClient) GetConfig(ctx context.Context, req *speechpb.GetConfigReque var resp *speechpb.Config err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConfig, req, settings.GRPC, c.logger, "GetConfig") return err }, opts...) if err != nil { @@ -1422,7 +1429,7 @@ func (c *gRPCClient) UpdateConfig(ctx context.Context, req *speechpb.UpdateConfi var resp *speechpb.Config err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateConfig, req, settings.GRPC, c.logger, "UpdateConfig") return err }, opts...) if err != nil { @@ -1440,7 +1447,7 @@ func (c *gRPCClient) CreateCustomClass(ctx context.Context, req *speechpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCustomClass, req, settings.GRPC, c.logger, "CreateCustomClass") return err }, opts...) if err != nil { @@ -1471,7 +1478,7 @@ func (c *gRPCClient) ListCustomClasses(ctx context.Context, req *speechpb.ListCu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCustomClasses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCustomClasses, req, settings.GRPC, c.logger, "ListCustomClasses") return err }, opts...) if err != nil { @@ -1506,7 +1513,7 @@ func (c *gRPCClient) GetCustomClass(ctx context.Context, req *speechpb.GetCustom var resp *speechpb.CustomClass err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCustomClass, req, settings.GRPC, c.logger, "GetCustomClass") return err }, opts...) if err != nil { @@ -1524,7 +1531,7 @@ func (c *gRPCClient) UpdateCustomClass(ctx context.Context, req *speechpb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCustomClass, req, settings.GRPC, c.logger, "UpdateCustomClass") return err }, opts...) if err != nil { @@ -1544,7 +1551,7 @@ func (c *gRPCClient) DeleteCustomClass(ctx context.Context, req *speechpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCustomClass, req, settings.GRPC, c.logger, "DeleteCustomClass") return err }, opts...) if err != nil { @@ -1564,7 +1571,7 @@ func (c *gRPCClient) UndeleteCustomClass(ctx context.Context, req *speechpb.Unde var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeleteCustomClass(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeleteCustomClass, req, settings.GRPC, c.logger, "UndeleteCustomClass") return err }, opts...) if err != nil { @@ -1584,7 +1591,7 @@ func (c *gRPCClient) CreatePhraseSet(ctx context.Context, req *speechpb.CreatePh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePhraseSet, req, settings.GRPC, c.logger, "CreatePhraseSet") return err }, opts...) if err != nil { @@ -1615,7 +1622,7 @@ func (c *gRPCClient) ListPhraseSets(ctx context.Context, req *speechpb.ListPhras } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPhraseSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPhraseSets, req, settings.GRPC, c.logger, "ListPhraseSets") return err }, opts...) if err != nil { @@ -1650,7 +1657,7 @@ func (c *gRPCClient) GetPhraseSet(ctx context.Context, req *speechpb.GetPhraseSe var resp *speechpb.PhraseSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPhraseSet, req, settings.GRPC, c.logger, "GetPhraseSet") return err }, opts...) if err != nil { @@ -1668,7 +1675,7 @@ func (c *gRPCClient) UpdatePhraseSet(ctx context.Context, req *speechpb.UpdatePh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePhraseSet, req, settings.GRPC, c.logger, "UpdatePhraseSet") return err }, opts...) if err != nil { @@ -1688,7 +1695,7 @@ func (c *gRPCClient) DeletePhraseSet(ctx context.Context, req *speechpb.DeletePh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePhraseSet, req, settings.GRPC, c.logger, "DeletePhraseSet") return err }, opts...) if err != nil { @@ -1708,7 +1715,7 @@ func (c *gRPCClient) UndeletePhraseSet(ctx context.Context, req *speechpb.Undele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeletePhraseSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeletePhraseSet, req, settings.GRPC, c.logger, "UndeletePhraseSet") return err }, opts...) if err != nil { @@ -1728,7 +1735,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1757,7 +1764,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1791,7 +1798,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1805,7 +1812,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1820,7 +1827,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1849,7 +1856,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1920,21 +1927,10 @@ func (c *restClient) CreateRecognizer(ctx context.Context, req *speechpb.CreateR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateRecognizer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2000,21 +1996,10 @@ func (c *restClient) ListRecognizers(ctx context.Context, req *speechpb.ListReco } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListRecognizers") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2080,17 +2065,7 @@ func (c *restClient) GetRecognizer(ctx context.Context, req *speechpb.GetRecogni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetRecognizer") if err != nil { return err } @@ -2156,21 +2131,10 @@ func (c *restClient) UpdateRecognizer(ctx context.Context, req *speechpb.UpdateR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateRecognizer") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2229,21 +2193,10 @@ func (c *restClient) DeleteRecognizer(ctx context.Context, req *speechpb.DeleteR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteRecognizer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2299,21 +2252,10 @@ func (c *restClient) UndeleteRecognizer(ctx context.Context, req *speechpb.Undel httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteRecognizer") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2371,17 +2313,7 @@ func (c *restClient) Recognize(ctx context.Context, req *speechpb.RecognizeReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Recognize") if err != nil { return err } @@ -2446,21 +2378,10 @@ func (c *restClient) BatchRecognize(ctx context.Context, req *speechpb.BatchReco httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRecognize") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2511,17 +2432,7 @@ func (c *restClient) GetConfig(ctx context.Context, req *speechpb.GetConfigReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConfig") if err != nil { return err } @@ -2585,17 +2496,7 @@ func (c *restClient) UpdateConfig(ctx context.Context, req *speechpb.UpdateConfi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateConfig") if err != nil { return err } @@ -2657,21 +2558,10 @@ func (c *restClient) CreateCustomClass(ctx context.Context, req *speechpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCustomClass") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2737,21 +2627,10 @@ func (c *restClient) ListCustomClasses(ctx context.Context, req *speechpb.ListCu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCustomClasses") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2815,17 +2694,7 @@ func (c *restClient) GetCustomClass(ctx context.Context, req *speechpb.GetCustom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCustomClass") if err != nil { return err } @@ -2891,21 +2760,10 @@ func (c *restClient) UpdateCustomClass(ctx context.Context, req *speechpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCustomClass") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2964,21 +2822,10 @@ func (c *restClient) DeleteCustomClass(ctx context.Context, req *speechpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCustomClass") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3034,21 +2881,10 @@ func (c *restClient) UndeleteCustomClass(ctx context.Context, req *speechpb.Unde httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeleteCustomClass") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3111,21 +2947,10 @@ func (c *restClient) CreatePhraseSet(ctx context.Context, req *speechpb.CreatePh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhraseSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3191,21 +3016,10 @@ func (c *restClient) ListPhraseSets(ctx context.Context, req *speechpb.ListPhras } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhraseSets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3269,17 +3083,7 @@ func (c *restClient) GetPhraseSet(ctx context.Context, req *speechpb.GetPhraseSe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhraseSet") if err != nil { return err } @@ -3345,21 +3149,10 @@ func (c *restClient) UpdatePhraseSet(ctx context.Context, req *speechpb.UpdatePh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePhraseSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3418,21 +3211,10 @@ func (c *restClient) DeletePhraseSet(ctx context.Context, req *speechpb.DeletePh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhraseSet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3488,21 +3270,10 @@ func (c *restClient) UndeletePhraseSet(ctx context.Context, req *speechpb.Undele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeletePhraseSet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3553,17 +3324,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3628,21 +3389,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3708,15 +3458,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3750,15 +3493,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3795,17 +3531,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3870,21 +3596,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/speech/apiv2/speech_client_example_go123_test.go b/speech/apiv2/speech_client_example_go123_test.go index aed4fea43743..826a8a25c939 100644 --- a/speech/apiv2/speech_client_example_go123_test.go +++ b/speech/apiv2/speech_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListCustomClasses_all() { } for resp, err := range c.ListCustomClasses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListPhraseSets_all() { } for resp, err := range c.ListPhraseSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListRecognizers_all() { } for resp, err := range c.ListRecognizers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/speech/apiv2/speechpb/cloud_speech.pb.go b/speech/apiv2/speechpb/cloud_speech.pb.go index bf2552c4ac64..0be67e1787ef 100755 --- a/speech/apiv2/speechpb/cloud_speech.pb.go +++ b/speech/apiv2/speechpb/cloud_speech.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v2/cloud_speech.proto @@ -460,11 +460,9 @@ type CreateRecognizerRequest struct { func (x *CreateRecognizerRequest) Reset() { *x = CreateRecognizerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRecognizerRequest) String() string { @@ -475,7 +473,7 @@ func (*CreateRecognizerRequest) ProtoMessage() {} func (x *CreateRecognizerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -574,11 +572,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -589,7 +585,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +912,9 @@ type ListRecognizersRequest struct { func (x *ListRecognizersRequest) Reset() { *x = ListRecognizersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecognizersRequest) String() string { @@ -931,7 +925,7 @@ func (*ListRecognizersRequest) ProtoMessage() {} func (x *ListRecognizersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -992,11 +986,9 @@ type ListRecognizersResponse struct { func (x *ListRecognizersResponse) Reset() { *x = ListRecognizersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecognizersResponse) String() string { @@ -1007,7 +999,7 @@ func (*ListRecognizersResponse) ProtoMessage() {} func (x *ListRecognizersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,11 +1042,9 @@ type GetRecognizerRequest struct { func (x *GetRecognizerRequest) Reset() { *x = GetRecognizerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecognizerRequest) String() string { @@ -1065,7 +1055,7 @@ func (*GetRecognizerRequest) ProtoMessage() {} func (x *GetRecognizerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1109,11 +1099,9 @@ type UpdateRecognizerRequest struct { func (x *UpdateRecognizerRequest) Reset() { *x = UpdateRecognizerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRecognizerRequest) String() string { @@ -1124,7 +1112,7 @@ func (*UpdateRecognizerRequest) ProtoMessage() {} func (x *UpdateRecognizerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1172,9 @@ type DeleteRecognizerRequest struct { func (x *DeleteRecognizerRequest) Reset() { *x = DeleteRecognizerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRecognizerRequest) String() string { @@ -1199,7 +1185,7 @@ func (*DeleteRecognizerRequest) ProtoMessage() {} func (x *DeleteRecognizerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1250,9 @@ type UndeleteRecognizerRequest struct { func (x *UndeleteRecognizerRequest) Reset() { *x = UndeleteRecognizerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteRecognizerRequest) String() string { @@ -1279,7 +1263,7 @@ func (*UndeleteRecognizerRequest) ProtoMessage() {} func (x *UndeleteRecognizerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,11 +1389,9 @@ type Recognizer struct { func (x *Recognizer) Reset() { *x = Recognizer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Recognizer) String() string { @@ -1420,7 +1402,7 @@ func (*Recognizer) ProtoMessage() {} func (x *Recognizer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1583,11 +1565,9 @@ type AutoDetectDecodingConfig struct { func (x *AutoDetectDecodingConfig) Reset() { *x = AutoDetectDecodingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoDetectDecodingConfig) String() string { @@ -1598,7 +1578,7 @@ func (*AutoDetectDecodingConfig) ProtoMessage() {} func (x *AutoDetectDecodingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1648,11 +1628,9 @@ type ExplicitDecodingConfig struct { func (x *ExplicitDecodingConfig) Reset() { *x = ExplicitDecodingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitDecodingConfig) String() string { @@ -1663,7 +1641,7 @@ func (*ExplicitDecodingConfig) ProtoMessage() {} func (x *ExplicitDecodingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1721,11 +1699,9 @@ type SpeakerDiarizationConfig struct { func (x *SpeakerDiarizationConfig) Reset() { *x = SpeakerDiarizationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeakerDiarizationConfig) String() string { @@ -1736,7 +1712,7 @@ func (*SpeakerDiarizationConfig) ProtoMessage() {} func (x *SpeakerDiarizationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1819,11 +1795,9 @@ type RecognitionFeatures struct { func (x *RecognitionFeatures) Reset() { *x = RecognitionFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionFeatures) String() string { @@ -1834,7 +1808,7 @@ func (*RecognitionFeatures) ProtoMessage() {} func (x *RecognitionFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1930,11 +1904,9 @@ type TranscriptNormalization struct { func (x *TranscriptNormalization) Reset() { *x = TranscriptNormalization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization) String() string { @@ -1945,7 +1917,7 @@ func (*TranscriptNormalization) ProtoMessage() {} func (x *TranscriptNormalization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1952,9 @@ type TranslationConfig struct { func (x *TranslationConfig) Reset() { *x = TranslationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslationConfig) String() string { @@ -1995,7 +1965,7 @@ func (*TranslationConfig) ProtoMessage() {} func (x *TranslationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2034,11 +2004,9 @@ type SpeechAdaptation struct { func (x *SpeechAdaptation) Reset() { *x = SpeechAdaptation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation) String() string { @@ -2049,7 +2017,7 @@ func (*SpeechAdaptation) ProtoMessage() {} func (x *SpeechAdaptation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2131,11 +2099,9 @@ type RecognitionConfig struct { func (x *RecognitionConfig) Reset() { *x = RecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionConfig) String() string { @@ -2146,7 +2112,7 @@ func (*RecognitionConfig) ProtoMessage() {} func (x *RecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2292,11 +2258,9 @@ type RecognizeRequest struct { func (x *RecognizeRequest) Reset() { *x = RecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeRequest) String() string { @@ -2307,7 +2271,7 @@ func (*RecognizeRequest) ProtoMessage() {} func (x *RecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2406,11 +2370,9 @@ type RecognitionResponseMetadata struct { func (x *RecognitionResponseMetadata) Reset() { *x = RecognitionResponseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionResponseMetadata) String() string { @@ -2421,7 +2383,7 @@ func (*RecognitionResponseMetadata) ProtoMessage() {} func (x *RecognitionResponseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2476,11 +2438,9 @@ type SpeechRecognitionAlternative struct { func (x *SpeechRecognitionAlternative) Reset() { *x = SpeechRecognitionAlternative{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionAlternative) String() string { @@ -2491,7 +2451,7 @@ func (*SpeechRecognitionAlternative) ProtoMessage() {} func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2568,11 +2528,9 @@ type WordInfo struct { func (x *WordInfo) Reset() { *x = WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WordInfo) String() string { @@ -2583,7 +2541,7 @@ func (*WordInfo) ProtoMessage() {} func (x *WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2659,11 +2617,9 @@ type SpeechRecognitionResult struct { func (x *SpeechRecognitionResult) Reset() { *x = SpeechRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionResult) String() string { @@ -2674,7 +2630,7 @@ func (*SpeechRecognitionResult) ProtoMessage() {} func (x *SpeechRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2733,11 +2689,9 @@ type RecognizeResponse struct { func (x *RecognizeResponse) Reset() { *x = RecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognizeResponse) String() string { @@ -2748,7 +2702,7 @@ func (*RecognizeResponse) ProtoMessage() {} func (x *RecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2798,11 +2752,9 @@ type StreamingRecognitionFeatures struct { func (x *StreamingRecognitionFeatures) Reset() { *x = StreamingRecognitionFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionFeatures) String() string { @@ -2813,7 +2765,7 @@ func (*StreamingRecognitionFeatures) ProtoMessage() {} func (x *StreamingRecognitionFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2883,11 +2835,9 @@ type StreamingRecognitionConfig struct { func (x *StreamingRecognitionConfig) Reset() { *x = StreamingRecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionConfig) String() string { @@ -2898,7 +2848,7 @@ func (*StreamingRecognitionConfig) ProtoMessage() {} func (x *StreamingRecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2973,11 +2923,9 @@ type StreamingRecognizeRequest struct { func (x *StreamingRecognizeRequest) Reset() { *x = StreamingRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeRequest) String() string { @@ -2988,7 +2936,7 @@ func (*StreamingRecognizeRequest) ProtoMessage() {} func (x *StreamingRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3097,11 +3045,9 @@ type BatchRecognizeRequest struct { func (x *BatchRecognizeRequest) Reset() { *x = BatchRecognizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeRequest) String() string { @@ -3112,7 +3058,7 @@ func (*BatchRecognizeRequest) ProtoMessage() {} func (x *BatchRecognizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3182,11 +3128,9 @@ type GcsOutputConfig struct { func (x *GcsOutputConfig) Reset() { *x = GcsOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputConfig) String() string { @@ -3197,7 +3141,7 @@ func (*GcsOutputConfig) ProtoMessage() {} func (x *GcsOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3228,11 +3172,9 @@ type InlineOutputConfig struct { func (x *InlineOutputConfig) Reset() { *x = InlineOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineOutputConfig) String() string { @@ -3243,7 +3185,7 @@ func (*InlineOutputConfig) ProtoMessage() {} func (x *InlineOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3267,11 +3209,9 @@ type NativeOutputFileFormatConfig struct { func (x *NativeOutputFileFormatConfig) Reset() { *x = NativeOutputFileFormatConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NativeOutputFileFormatConfig) String() string { @@ -3282,7 +3222,7 @@ func (*NativeOutputFileFormatConfig) ProtoMessage() {} func (x *NativeOutputFileFormatConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3307,11 +3247,9 @@ type VttOutputFileFormatConfig struct { func (x *VttOutputFileFormatConfig) Reset() { *x = VttOutputFileFormatConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VttOutputFileFormatConfig) String() string { @@ -3322,7 +3260,7 @@ func (*VttOutputFileFormatConfig) ProtoMessage() {} func (x *VttOutputFileFormatConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3348,11 +3286,9 @@ type SrtOutputFileFormatConfig struct { func (x *SrtOutputFileFormatConfig) Reset() { *x = SrtOutputFileFormatConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SrtOutputFileFormatConfig) String() string { @@ -3363,7 +3299,7 @@ func (*SrtOutputFileFormatConfig) ProtoMessage() {} func (x *SrtOutputFileFormatConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3398,11 +3334,9 @@ type OutputFormatConfig struct { func (x *OutputFormatConfig) Reset() { *x = OutputFormatConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputFormatConfig) String() string { @@ -3413,7 +3347,7 @@ func (*OutputFormatConfig) ProtoMessage() {} func (x *OutputFormatConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3467,11 +3401,9 @@ type RecognitionOutputConfig struct { func (x *RecognitionOutputConfig) Reset() { *x = RecognitionOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecognitionOutputConfig) String() string { @@ -3482,7 +3414,7 @@ func (*RecognitionOutputConfig) ProtoMessage() {} func (x *RecognitionOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3564,11 +3496,9 @@ type BatchRecognizeResponse struct { func (x *BatchRecognizeResponse) Reset() { *x = BatchRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeResponse) String() string { @@ -3579,7 +3509,7 @@ func (*BatchRecognizeResponse) ProtoMessage() {} func (x *BatchRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3625,11 +3555,9 @@ type BatchRecognizeResults struct { func (x *BatchRecognizeResults) Reset() { *x = BatchRecognizeResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeResults) String() string { @@ -3640,7 +3568,7 @@ func (*BatchRecognizeResults) ProtoMessage() {} func (x *BatchRecognizeResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3687,11 +3615,9 @@ type CloudStorageResult struct { func (x *CloudStorageResult) Reset() { *x = CloudStorageResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageResult) String() string { @@ -3702,7 +3628,7 @@ func (*CloudStorageResult) ProtoMessage() {} func (x *CloudStorageResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3756,11 +3682,9 @@ type InlineResult struct { func (x *InlineResult) Reset() { *x = InlineResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InlineResult) String() string { @@ -3771,7 +3695,7 @@ func (*InlineResult) ProtoMessage() {} func (x *InlineResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3833,11 +3757,9 @@ type BatchRecognizeFileResult struct { func (x *BatchRecognizeFileResult) Reset() { *x = BatchRecognizeFileResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeFileResult) String() string { @@ -3848,7 +3770,7 @@ func (*BatchRecognizeFileResult) ProtoMessage() {} func (x *BatchRecognizeFileResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3956,11 +3878,9 @@ type BatchRecognizeTranscriptionMetadata struct { func (x *BatchRecognizeTranscriptionMetadata) Reset() { *x = BatchRecognizeTranscriptionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeTranscriptionMetadata) String() string { @@ -3971,7 +3891,7 @@ func (*BatchRecognizeTranscriptionMetadata) ProtoMessage() {} func (x *BatchRecognizeTranscriptionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4020,11 +3940,9 @@ type BatchRecognizeMetadata struct { func (x *BatchRecognizeMetadata) Reset() { *x = BatchRecognizeMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeMetadata) String() string { @@ -4035,7 +3953,7 @@ func (*BatchRecognizeMetadata) ProtoMessage() {} func (x *BatchRecognizeMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4096,11 +4014,9 @@ type BatchRecognizeFileMetadata struct { func (x *BatchRecognizeFileMetadata) Reset() { *x = BatchRecognizeFileMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRecognizeFileMetadata) String() string { @@ -4111,7 +4027,7 @@ func (*BatchRecognizeFileMetadata) ProtoMessage() {} func (x *BatchRecognizeFileMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4206,11 +4122,9 @@ type StreamingRecognitionResult struct { func (x *StreamingRecognitionResult) Reset() { *x = StreamingRecognitionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionResult) String() string { @@ -4221,7 +4135,7 @@ func (*StreamingRecognitionResult) ProtoMessage() {} func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4349,11 +4263,9 @@ type StreamingRecognizeResponse struct { func (x *StreamingRecognizeResponse) Reset() { *x = StreamingRecognizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognizeResponse) String() string { @@ -4364,7 +4276,7 @@ func (*StreamingRecognizeResponse) ProtoMessage() {} func (x *StreamingRecognizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4432,11 +4344,9 @@ type Config struct { func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -4447,7 +4357,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4498,11 +4408,9 @@ type GetConfigRequest struct { func (x *GetConfigRequest) Reset() { *x = GetConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConfigRequest) String() string { @@ -4513,7 +4421,7 @@ func (*GetConfigRequest) ProtoMessage() {} func (x *GetConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4553,11 +4461,9 @@ type UpdateConfigRequest struct { func (x *UpdateConfigRequest) Reset() { *x = UpdateConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateConfigRequest) String() string { @@ -4568,7 +4474,7 @@ func (*UpdateConfigRequest) ProtoMessage() {} func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4651,11 +4557,9 @@ type CustomClass struct { func (x *CustomClass) Reset() { *x = CustomClass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass) String() string { @@ -4666,7 +4570,7 @@ func (*CustomClass) ProtoMessage() {} func (x *CustomClass) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4839,11 +4743,9 @@ type PhraseSet struct { func (x *PhraseSet) Reset() { *x = PhraseSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet) String() string { @@ -4854,7 +4756,7 @@ func (*PhraseSet) ProtoMessage() {} func (x *PhraseSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4999,11 +4901,9 @@ type CreateCustomClassRequest struct { func (x *CreateCustomClassRequest) Reset() { *x = CreateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCustomClassRequest) String() string { @@ -5014,7 +4914,7 @@ func (*CreateCustomClassRequest) ProtoMessage() {} func (x *CreateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5086,11 +4986,9 @@ type ListCustomClassesRequest struct { func (x *ListCustomClassesRequest) Reset() { *x = ListCustomClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesRequest) String() string { @@ -5101,7 +4999,7 @@ func (*ListCustomClassesRequest) ProtoMessage() {} func (x *ListCustomClassesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5162,11 +5060,9 @@ type ListCustomClassesResponse struct { func (x *ListCustomClassesResponse) Reset() { *x = ListCustomClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCustomClassesResponse) String() string { @@ -5177,7 +5073,7 @@ func (*ListCustomClassesResponse) ProtoMessage() {} func (x *ListCustomClassesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5220,11 +5116,9 @@ type GetCustomClassRequest struct { func (x *GetCustomClassRequest) Reset() { *x = GetCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCustomClassRequest) String() string { @@ -5235,7 +5129,7 @@ func (*GetCustomClassRequest) ProtoMessage() {} func (x *GetCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5280,11 +5174,9 @@ type UpdateCustomClassRequest struct { func (x *UpdateCustomClassRequest) Reset() { *x = UpdateCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCustomClassRequest) String() string { @@ -5295,7 +5187,7 @@ func (*UpdateCustomClassRequest) ProtoMessage() {} func (x *UpdateCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5356,11 +5248,9 @@ type DeleteCustomClassRequest struct { func (x *DeleteCustomClassRequest) Reset() { *x = DeleteCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCustomClassRequest) String() string { @@ -5371,7 +5261,7 @@ func (*DeleteCustomClassRequest) ProtoMessage() {} func (x *DeleteCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5437,11 +5327,9 @@ type UndeleteCustomClassRequest struct { func (x *UndeleteCustomClassRequest) Reset() { *x = UndeleteCustomClassRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeleteCustomClassRequest) String() string { @@ -5452,7 +5340,7 @@ func (*UndeleteCustomClassRequest) ProtoMessage() {} func (x *UndeleteCustomClassRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5513,11 +5401,9 @@ type CreatePhraseSetRequest struct { func (x *CreatePhraseSetRequest) Reset() { *x = CreatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhraseSetRequest) String() string { @@ -5528,7 +5414,7 @@ func (*CreatePhraseSetRequest) ProtoMessage() {} func (x *CreatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5599,11 +5485,9 @@ type ListPhraseSetsRequest struct { func (x *ListPhraseSetsRequest) Reset() { *x = ListPhraseSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetsRequest) String() string { @@ -5614,7 +5498,7 @@ func (*ListPhraseSetsRequest) ProtoMessage() {} func (x *ListPhraseSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5675,11 +5559,9 @@ type ListPhraseSetsResponse struct { func (x *ListPhraseSetsResponse) Reset() { *x = ListPhraseSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhraseSetsResponse) String() string { @@ -5690,7 +5572,7 @@ func (*ListPhraseSetsResponse) ProtoMessage() {} func (x *ListPhraseSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5733,11 +5615,9 @@ type GetPhraseSetRequest struct { func (x *GetPhraseSetRequest) Reset() { *x = GetPhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhraseSetRequest) String() string { @@ -5748,7 +5628,7 @@ func (*GetPhraseSetRequest) ProtoMessage() {} func (x *GetPhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5792,11 +5672,9 @@ type UpdatePhraseSetRequest struct { func (x *UpdatePhraseSetRequest) Reset() { *x = UpdatePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePhraseSetRequest) String() string { @@ -5807,7 +5685,7 @@ func (*UpdatePhraseSetRequest) ProtoMessage() {} func (x *UpdatePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5867,11 +5745,9 @@ type DeletePhraseSetRequest struct { func (x *DeletePhraseSetRequest) Reset() { *x = DeletePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhraseSetRequest) String() string { @@ -5882,7 +5758,7 @@ func (*DeletePhraseSetRequest) ProtoMessage() {} func (x *DeletePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5947,11 +5823,9 @@ type UndeletePhraseSetRequest struct { func (x *UndeletePhraseSetRequest) Reset() { *x = UndeletePhraseSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeletePhraseSetRequest) String() string { @@ -5962,7 +5836,7 @@ func (*UndeletePhraseSetRequest) ProtoMessage() {} func (x *UndeletePhraseSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6014,11 +5888,9 @@ type TranscriptNormalization_Entry struct { func (x *TranscriptNormalization_Entry) Reset() { *x = TranscriptNormalization_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranscriptNormalization_Entry) String() string { @@ -6029,7 +5901,7 @@ func (*TranscriptNormalization_Entry) ProtoMessage() {} func (x *TranscriptNormalization_Entry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6081,11 +5953,9 @@ type SpeechAdaptation_AdaptationPhraseSet struct { func (x *SpeechAdaptation_AdaptationPhraseSet) Reset() { *x = SpeechAdaptation_AdaptationPhraseSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechAdaptation_AdaptationPhraseSet) String() string { @@ -6096,7 +5966,7 @@ func (*SpeechAdaptation_AdaptationPhraseSet) ProtoMessage() {} func (x *SpeechAdaptation_AdaptationPhraseSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6171,11 +6041,9 @@ type StreamingRecognitionFeatures_VoiceActivityTimeout struct { func (x *StreamingRecognitionFeatures_VoiceActivityTimeout) Reset() { *x = StreamingRecognitionFeatures_VoiceActivityTimeout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingRecognitionFeatures_VoiceActivityTimeout) String() string { @@ -6186,7 +6054,7 @@ func (*StreamingRecognitionFeatures_VoiceActivityTimeout) ProtoMessage() {} func (x *StreamingRecognitionFeatures_VoiceActivityTimeout) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6227,11 +6095,9 @@ type CustomClass_ClassItem struct { func (x *CustomClass_ClassItem) Reset() { *x = CustomClass_ClassItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomClass_ClassItem) String() string { @@ -6242,7 +6108,7 @@ func (*CustomClass_ClassItem) ProtoMessage() {} func (x *CustomClass_ClassItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6294,11 +6160,9 @@ type PhraseSet_Phrase struct { func (x *PhraseSet_Phrase) Reset() { *x = PhraseSet_Phrase{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhraseSet_Phrase) String() string { @@ -6309,7 +6173,7 @@ func (*PhraseSet_Phrase) ProtoMessage() {} func (x *PhraseSet_Phrase) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8109,824 +7973,6 @@ func file_google_cloud_speech_v2_cloud_speech_proto_init() { if File_google_cloud_speech_v2_cloud_speech_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateRecognizerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRecognizersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListRecognizersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetRecognizerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateRecognizerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRecognizerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteRecognizerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Recognizer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AutoDetectDecodingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitDecodingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SpeakerDiarizationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TranslationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionResponseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionAlternative); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*InlineOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*NativeOutputFileFormatConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*VttOutputFileFormatConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SrtOutputFileFormatConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*OutputFormatConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*RecognitionOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*InlineResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeFileResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeTranscriptionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*BatchRecognizeFileMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*GetConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*UpdateConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*CreateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListCustomClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GetCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*UndeleteCustomClassRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*ListPhraseSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*GetPhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*UndeletePhraseSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*TranscriptNormalization_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*SpeechAdaptation_AdaptationPhraseSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*StreamingRecognitionFeatures_VoiceActivityTimeout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*CustomClass_ClassItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*PhraseSet_Phrase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_speech_v2_cloud_speech_proto_msgTypes[1].OneofWrappers = []any{ (*OperationMetadata_BatchRecognizeRequest)(nil), (*OperationMetadata_CreateRecognizerRequest)(nil), diff --git a/speech/apiv2/speechpb/locations_metadata.pb.go b/speech/apiv2/speechpb/locations_metadata.pb.go index 4e23385c8b1f..9d7f445a3943 100755 --- a/speech/apiv2/speechpb/locations_metadata.pb.go +++ b/speech/apiv2/speechpb/locations_metadata.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/speech/v2/locations_metadata.proto @@ -100,11 +100,9 @@ type ModelFeature struct { func (x *ModelFeature) Reset() { *x = ModelFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelFeature) String() string { @@ -115,7 +113,7 @@ func (*ModelFeature) ProtoMessage() {} func (x *ModelFeature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -156,11 +154,9 @@ type ModelFeatures struct { func (x *ModelFeatures) Reset() { *x = ModelFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelFeatures) String() string { @@ -171,7 +167,7 @@ func (*ModelFeatures) ProtoMessage() {} func (x *ModelFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,11 +202,9 @@ type ModelMetadata struct { func (x *ModelMetadata) Reset() { *x = ModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ModelMetadata) String() string { @@ -221,7 +215,7 @@ func (*ModelMetadata) ProtoMessage() {} func (x *ModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -256,11 +250,9 @@ type LanguageMetadata struct { func (x *LanguageMetadata) Reset() { *x = LanguageMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LanguageMetadata) String() string { @@ -271,7 +263,7 @@ func (*LanguageMetadata) ProtoMessage() {} func (x *LanguageMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +298,9 @@ type AccessMetadata struct { func (x *AccessMetadata) Reset() { *x = AccessMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccessMetadata) String() string { @@ -321,7 +311,7 @@ func (*AccessMetadata) ProtoMessage() {} func (x *AccessMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +349,9 @@ type LocationsMetadata struct { func (x *LocationsMetadata) Reset() { *x = LocationsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationsMetadata) String() string { @@ -374,7 +362,7 @@ func (*LocationsMetadata) ProtoMessage() {} func (x *LocationsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -528,80 +516,6 @@ func file_google_cloud_speech_v2_locations_metadata_proto_init() { if File_google_cloud_speech_v2_locations_metadata_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ModelFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ModelFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LanguageMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AccessMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_speech_v2_locations_metadata_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LocationsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/storage/control/apiv2/controlpb/storage_control.pb.go b/storage/control/apiv2/controlpb/storage_control.pb.go index c885f6ab9519..d8607a0435d1 100755 --- a/storage/control/apiv2/controlpb/storage_control.pb.go +++ b/storage/control/apiv2/controlpb/storage_control.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/storage/control/v2/storage_control.proto @@ -55,11 +55,9 @@ type PendingRenameInfo struct { func (x *PendingRenameInfo) Reset() { *x = PendingRenameInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingRenameInfo) String() string { @@ -70,7 +68,7 @@ func (*PendingRenameInfo) ProtoMessage() {} func (x *PendingRenameInfo) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type Folder struct { func (x *Folder) Reset() { *x = Folder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Folder) String() string { @@ -134,7 +130,7 @@ func (*Folder) ProtoMessage() {} func (x *Folder) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +203,9 @@ type GetFolderRequest struct { func (x *GetFolderRequest) Reset() { *x = GetFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFolderRequest) String() string { @@ -222,7 +216,7 @@ func (*GetFolderRequest) ProtoMessage() {} func (x *GetFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +290,9 @@ type CreateFolderRequest struct { func (x *CreateFolderRequest) Reset() { *x = CreateFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateFolderRequest) String() string { @@ -311,7 +303,7 @@ func (*CreateFolderRequest) ProtoMessage() {} func (x *CreateFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,11 +376,9 @@ type DeleteFolderRequest struct { func (x *DeleteFolderRequest) Reset() { *x = DeleteFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteFolderRequest) String() string { @@ -399,7 +389,7 @@ func (*DeleteFolderRequest) ProtoMessage() {} func (x *DeleteFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -482,11 +472,9 @@ type ListFoldersRequest struct { func (x *ListFoldersRequest) Reset() { *x = ListFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersRequest) String() string { @@ -497,7 +485,7 @@ func (*ListFoldersRequest) ProtoMessage() {} func (x *ListFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +571,9 @@ type ListFoldersResponse struct { func (x *ListFoldersResponse) Reset() { *x = ListFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFoldersResponse) String() string { @@ -598,7 +584,7 @@ func (*ListFoldersResponse) ProtoMessage() {} func (x *ListFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,11 +639,9 @@ type RenameFolderRequest struct { func (x *RenameFolderRequest) Reset() { *x = RenameFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameFolderRequest) String() string { @@ -668,7 +652,7 @@ func (*RenameFolderRequest) ProtoMessage() {} func (x *RenameFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +727,9 @@ type CommonLongRunningOperationMetadata struct { func (x *CommonLongRunningOperationMetadata) Reset() { *x = CommonLongRunningOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonLongRunningOperationMetadata) String() string { @@ -758,7 +740,7 @@ func (*CommonLongRunningOperationMetadata) ProtoMessage() {} func (x *CommonLongRunningOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -832,11 +814,9 @@ type RenameFolderMetadata struct { func (x *RenameFolderMetadata) Reset() { *x = RenameFolderMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenameFolderMetadata) String() string { @@ -847,7 +827,7 @@ func (*RenameFolderMetadata) ProtoMessage() {} func (x *RenameFolderMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +887,9 @@ type StorageLayout struct { func (x *StorageLayout) Reset() { *x = StorageLayout{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageLayout) String() string { @@ -922,7 +900,7 @@ func (*StorageLayout) ProtoMessage() {} func (x *StorageLayout) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -991,11 +969,9 @@ type GetStorageLayoutRequest struct { func (x *GetStorageLayoutRequest) Reset() { *x = GetStorageLayoutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStorageLayoutRequest) String() string { @@ -1006,7 +982,7 @@ func (*GetStorageLayoutRequest) ProtoMessage() {} func (x *GetStorageLayoutRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1040,9 @@ type ManagedFolder struct { func (x *ManagedFolder) Reset() { *x = ManagedFolder{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagedFolder) String() string { @@ -1079,7 +1053,7 @@ func (*ManagedFolder) ProtoMessage() {} func (x *ManagedFolder) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1119,9 @@ type GetManagedFolderRequest struct { func (x *GetManagedFolderRequest) Reset() { *x = GetManagedFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetManagedFolderRequest) String() string { @@ -1160,7 +1132,7 @@ func (*GetManagedFolderRequest) ProtoMessage() {} func (x *GetManagedFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1226,11 +1198,9 @@ type CreateManagedFolderRequest struct { func (x *CreateManagedFolderRequest) Reset() { *x = CreateManagedFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateManagedFolderRequest) String() string { @@ -1241,7 +1211,7 @@ func (*CreateManagedFolderRequest) ProtoMessage() {} func (x *CreateManagedFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1312,11 +1282,9 @@ type DeleteManagedFolderRequest struct { func (x *DeleteManagedFolderRequest) Reset() { *x = DeleteManagedFolderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteManagedFolderRequest) String() string { @@ -1327,7 +1295,7 @@ func (*DeleteManagedFolderRequest) ProtoMessage() {} func (x *DeleteManagedFolderRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1369,9 @@ type ListManagedFoldersRequest struct { func (x *ListManagedFoldersRequest) Reset() { *x = ListManagedFoldersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagedFoldersRequest) String() string { @@ -1416,7 +1382,7 @@ func (*ListManagedFoldersRequest) ProtoMessage() {} func (x *ListManagedFoldersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1481,11 +1447,9 @@ type ListManagedFoldersResponse struct { func (x *ListManagedFoldersResponse) Reset() { *x = ListManagedFoldersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagedFoldersResponse) String() string { @@ -1496,7 +1460,7 @@ func (*ListManagedFoldersResponse) ProtoMessage() {} func (x *ListManagedFoldersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1539,11 +1503,9 @@ type StorageLayout_CustomPlacementConfig struct { func (x *StorageLayout_CustomPlacementConfig) Reset() { *x = StorageLayout_CustomPlacementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageLayout_CustomPlacementConfig) String() string { @@ -1554,7 +1516,7 @@ func (*StorageLayout_CustomPlacementConfig) ProtoMessage() {} func (x *StorageLayout_CustomPlacementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1588,11 +1550,9 @@ type StorageLayout_HierarchicalNamespace struct { func (x *StorageLayout_HierarchicalNamespace) Reset() { *x = StorageLayout_HierarchicalNamespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StorageLayout_HierarchicalNamespace) String() string { @@ -1603,7 +1563,7 @@ func (*StorageLayout_HierarchicalNamespace) ProtoMessage() {} func (x *StorageLayout_HierarchicalNamespace) ProtoReflect() protoreflect.Message { mi := &file_google_storage_control_v2_storage_control_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2212,248 +2172,6 @@ func file_google_storage_control_v2_storage_control_proto_init() { if File_google_storage_control_v2_storage_control_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_storage_control_v2_storage_control_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PendingRenameInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Folder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RenameFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CommonLongRunningOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RenameFolderMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StorageLayout); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetStorageLayoutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ManagedFolder); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetManagedFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateManagedFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteManagedFolderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListManagedFoldersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListManagedFoldersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*StorageLayout_CustomPlacementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_control_v2_storage_control_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*StorageLayout_HierarchicalNamespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_storage_control_v2_storage_control_proto_msgTypes[2].OneofWrappers = []any{} file_google_storage_control_v2_storage_control_proto_msgTypes[4].OneofWrappers = []any{} file_google_storage_control_v2_storage_control_proto_msgTypes[7].OneofWrappers = []any{} diff --git a/storage/control/apiv2/helpers.go b/storage/control/apiv2/helpers.go index 13d69ee871f6..d3736512ecde 100755 --- a/storage/control/apiv2/helpers.go +++ b/storage/control/apiv2/helpers.go @@ -18,10 +18,16 @@ package control import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "storage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -46,3 +52,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/devstorage.read_write", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/storage/control/apiv2/storage_control_client.go b/storage/control/apiv2/storage_control_client.go index 87f9cc0bdedc..582e42d166b8 100755 --- a/storage/control/apiv2/storage_control_client.go +++ b/storage/control/apiv2/storage_control_client.go @@ -19,6 +19,7 @@ package control import ( "context" "fmt" + "log/slog" "math" "net/url" "regexp" @@ -325,6 +326,8 @@ type storageControlGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewStorageControlClient creates a new storage control client based on gRPC. @@ -351,6 +354,7 @@ func NewStorageControlClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, storageControlClient: controlpb.NewStorageControlClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -416,7 +420,7 @@ func (c *storageControlGRPCClient) CreateFolder(ctx context.Context, req *contro var resp *controlpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.CreateFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.CreateFolder, req, settings.GRPC, c.logger, "CreateFolder") return err }, opts...) if err != nil { @@ -445,7 +449,7 @@ func (c *storageControlGRPCClient) DeleteFolder(ctx context.Context, req *contro opts = append((*c.CallOptions).DeleteFolder[0:len((*c.CallOptions).DeleteFolder):len((*c.CallOptions).DeleteFolder)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.storageControlClient.DeleteFolder(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.storageControlClient.DeleteFolder, req, settings.GRPC, c.logger, "DeleteFolder") return err }, opts...) return err @@ -472,7 +476,7 @@ func (c *storageControlGRPCClient) GetFolder(ctx context.Context, req *controlpb var resp *controlpb.Folder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.GetFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.GetFolder, req, settings.GRPC, c.logger, "GetFolder") return err }, opts...) if err != nil { @@ -510,7 +514,7 @@ func (c *storageControlGRPCClient) ListFolders(ctx context.Context, req *control } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.ListFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.ListFolders, req, settings.GRPC, c.logger, "ListFolders") return err }, opts...) if err != nil { @@ -554,7 +558,7 @@ func (c *storageControlGRPCClient) RenameFolder(ctx context.Context, req *contro var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.RenameFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.RenameFolder, req, settings.GRPC, c.logger, "RenameFolder") return err }, opts...) if err != nil { @@ -586,7 +590,7 @@ func (c *storageControlGRPCClient) GetStorageLayout(ctx context.Context, req *co var resp *controlpb.StorageLayout err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.GetStorageLayout(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.GetStorageLayout, req, settings.GRPC, c.logger, "GetStorageLayout") return err }, opts...) if err != nil { @@ -616,7 +620,7 @@ func (c *storageControlGRPCClient) CreateManagedFolder(ctx context.Context, req var resp *controlpb.ManagedFolder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.CreateManagedFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.CreateManagedFolder, req, settings.GRPC, c.logger, "CreateManagedFolder") return err }, opts...) if err != nil { @@ -645,7 +649,7 @@ func (c *storageControlGRPCClient) DeleteManagedFolder(ctx context.Context, req opts = append((*c.CallOptions).DeleteManagedFolder[0:len((*c.CallOptions).DeleteManagedFolder):len((*c.CallOptions).DeleteManagedFolder)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.storageControlClient.DeleteManagedFolder(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.storageControlClient.DeleteManagedFolder, req, settings.GRPC, c.logger, "DeleteManagedFolder") return err }, opts...) return err @@ -672,7 +676,7 @@ func (c *storageControlGRPCClient) GetManagedFolder(ctx context.Context, req *co var resp *controlpb.ManagedFolder err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.GetManagedFolder(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.GetManagedFolder, req, settings.GRPC, c.logger, "GetManagedFolder") return err }, opts...) if err != nil { @@ -710,7 +714,7 @@ func (c *storageControlGRPCClient) ListManagedFolders(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.storageControlClient.ListManagedFolders(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.storageControlClient.ListManagedFolders, req, settings.GRPC, c.logger, "ListManagedFolders") return err }, opts...) if err != nil { diff --git a/storage/control/apiv2/storage_control_client_example_go123_test.go b/storage/control/apiv2/storage_control_client_example_go123_test.go index dceb910dfa32..0132787b5b83 100644 --- a/storage/control/apiv2/storage_control_client_example_go123_test.go +++ b/storage/control/apiv2/storage_control_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleStorageControlClient_ListFolders_all() { } for resp, err := range c.ListFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleStorageControlClient_ListManagedFolders_all() { } for resp, err := range c.ListManagedFolders(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/storage/internal/apiv2/helpers.go b/storage/internal/apiv2/helpers.go index 762882d1d9e7..601d5fa2a646 100755 --- a/storage/internal/apiv2/helpers.go +++ b/storage/internal/apiv2/helpers.go @@ -18,10 +18,16 @@ package storage import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "storage.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -46,3 +52,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/devstorage.read_write", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/storage/internal/apiv2/storage_client.go b/storage/internal/apiv2/storage_client.go index 7890a6b399a1..f0d234a47fd3 100755 --- a/storage/internal/apiv2/storage_client.go +++ b/storage/internal/apiv2/storage_client.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "log/slog" "math" "net/url" "regexp" @@ -693,6 +694,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new storage client based on gRPC. @@ -740,6 +743,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: storagepb.NewStorageClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -790,7 +794,7 @@ func (c *gRPCClient) DeleteBucket(ctx context.Context, req *storagepb.DeleteBuck opts = append((*c.CallOptions).DeleteBucket[0:len((*c.CallOptions).DeleteBucket):len((*c.CallOptions).DeleteBucket)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteBucket(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteBucket, req, settings.GRPC, c.logger, "DeleteBucket") return err }, opts...) return err @@ -814,7 +818,7 @@ func (c *gRPCClient) GetBucket(ctx context.Context, req *storagepb.GetBucketRequ var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBucket, req, settings.GRPC, c.logger, "GetBucket") return err }, opts...) if err != nil { @@ -844,7 +848,7 @@ func (c *gRPCClient) CreateBucket(ctx context.Context, req *storagepb.CreateBuck var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBucket, req, settings.GRPC, c.logger, "CreateBucket") return err }, opts...) if err != nil { @@ -882,7 +886,7 @@ func (c *gRPCClient) ListBuckets(ctx context.Context, req *storagepb.ListBuckets } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBuckets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBuckets, req, settings.GRPC, c.logger, "ListBuckets") return err }, opts...) if err != nil { @@ -926,7 +930,7 @@ func (c *gRPCClient) LockBucketRetentionPolicy(ctx context.Context, req *storage var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.LockBucketRetentionPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.LockBucketRetentionPolicy, req, settings.GRPC, c.logger, "LockBucketRetentionPolicy") return err }, opts...) if err != nil { @@ -953,7 +957,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -980,7 +984,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1013,7 +1017,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1040,7 +1044,7 @@ func (c *gRPCClient) UpdateBucket(ctx context.Context, req *storagepb.UpdateBuck var resp *storagepb.Bucket err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBucket(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBucket, req, settings.GRPC, c.logger, "UpdateBucket") return err }, opts...) if err != nil { @@ -1067,7 +1071,7 @@ func (c *gRPCClient) ComposeObject(ctx context.Context, req *storagepb.ComposeOb var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComposeObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComposeObject, req, settings.GRPC, c.logger, "ComposeObject") return err }, opts...) if err != nil { @@ -1093,7 +1097,7 @@ func (c *gRPCClient) DeleteObject(ctx context.Context, req *storagepb.DeleteObje opts = append((*c.CallOptions).DeleteObject[0:len((*c.CallOptions).DeleteObject):len((*c.CallOptions).DeleteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteObject(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteObject, req, settings.GRPC, c.logger, "DeleteObject") return err }, opts...) return err @@ -1117,7 +1121,7 @@ func (c *gRPCClient) RestoreObject(ctx context.Context, req *storagepb.RestoreOb var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RestoreObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RestoreObject, req, settings.GRPC, c.logger, "RestoreObject") return err }, opts...) if err != nil { @@ -1144,7 +1148,7 @@ func (c *gRPCClient) CancelResumableWrite(ctx context.Context, req *storagepb.Ca var resp *storagepb.CancelResumableWriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelResumableWrite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelResumableWrite, req, settings.GRPC, c.logger, "CancelResumableWrite") return err }, opts...) if err != nil { @@ -1171,7 +1175,7 @@ func (c *gRPCClient) GetObject(ctx context.Context, req *storagepb.GetObjectRequ var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetObject, req, settings.GRPC, c.logger, "GetObject") return err }, opts...) if err != nil { @@ -1198,7 +1202,9 @@ func (c *gRPCClient) ReadObject(ctx context.Context, req *storagepb.ReadObjectRe var resp storagepb.Storage_ReadObjectClient err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReadObject") resp, err = c.client.ReadObject(ctx, req, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReadObject") return err }, opts...) if err != nil { @@ -1225,7 +1231,7 @@ func (c *gRPCClient) UpdateObject(ctx context.Context, req *storagepb.UpdateObje var resp *storagepb.Object err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateObject, req, settings.GRPC, c.logger, "UpdateObject") return err }, opts...) if err != nil { @@ -1240,7 +1246,9 @@ func (c *gRPCClient) WriteObject(ctx context.Context, opts ...gax.CallOption) (s opts = append((*c.CallOptions).WriteObject[0:len((*c.CallOptions).WriteObject):len((*c.CallOptions).WriteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "WriteObject") resp, err = c.client.WriteObject(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "WriteObject") return err }, opts...) if err != nil { @@ -1255,7 +1263,9 @@ func (c *gRPCClient) BidiWriteObject(ctx context.Context, opts ...gax.CallOption opts = append((*c.CallOptions).BidiWriteObject[0:len((*c.CallOptions).BidiWriteObject):len((*c.CallOptions).BidiWriteObject)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "BidiWriteObject") resp, err = c.client.BidiWriteObject(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "BidiWriteObject") return err }, opts...) if err != nil { @@ -1293,7 +1303,7 @@ func (c *gRPCClient) ListObjects(ctx context.Context, req *storagepb.ListObjects } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListObjects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListObjects, req, settings.GRPC, c.logger, "ListObjects") return err }, opts...) if err != nil { @@ -1340,7 +1350,7 @@ func (c *gRPCClient) RewriteObject(ctx context.Context, req *storagepb.RewriteOb var resp *storagepb.RewriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RewriteObject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RewriteObject, req, settings.GRPC, c.logger, "RewriteObject") return err }, opts...) if err != nil { @@ -1367,7 +1377,7 @@ func (c *gRPCClient) StartResumableWrite(ctx context.Context, req *storagepb.Sta var resp *storagepb.StartResumableWriteResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartResumableWrite(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartResumableWrite, req, settings.GRPC, c.logger, "StartResumableWrite") return err }, opts...) if err != nil { @@ -1394,7 +1404,7 @@ func (c *gRPCClient) QueryWriteStatus(ctx context.Context, req *storagepb.QueryW var resp *storagepb.QueryWriteStatusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.QueryWriteStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.QueryWriteStatus, req, settings.GRPC, c.logger, "QueryWriteStatus") return err }, opts...) if err != nil { diff --git a/storage/internal/apiv2/storage_client_example_go123_test.go b/storage/internal/apiv2/storage_client_example_go123_test.go index 304039e9c659..a5ce2c0bee21 100644 --- a/storage/internal/apiv2/storage_client_example_go123_test.go +++ b/storage/internal/apiv2/storage_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListBuckets_all() { } for resp, err := range c.ListBuckets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListObjects_all() { } for resp, err := range c.ListObjects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/storage/internal/apiv2/storagepb/storage.pb.go b/storage/internal/apiv2/storagepb/storage.pb.go index 349200cfc814..39bb3c29b786 100755 --- a/storage/internal/apiv2/storagepb/storage.pb.go +++ b/storage/internal/apiv2/storagepb/storage.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/storage/v2/storage.proto @@ -197,11 +197,9 @@ type DeleteBucketRequest struct { func (x *DeleteBucketRequest) Reset() { *x = DeleteBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBucketRequest) String() string { @@ -212,7 +210,7 @@ func (*DeleteBucketRequest) ProtoMessage() {} func (x *DeleteBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +268,9 @@ type GetBucketRequest struct { func (x *GetBucketRequest) Reset() { *x = GetBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBucketRequest) String() string { @@ -285,7 +281,7 @@ func (*GetBucketRequest) ProtoMessage() {} func (x *GetBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,11 +356,9 @@ type CreateBucketRequest struct { func (x *CreateBucketRequest) Reset() { *x = CreateBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBucketRequest) String() string { @@ -375,7 +369,7 @@ func (*CreateBucketRequest) ProtoMessage() {} func (x *CreateBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +446,9 @@ type ListBucketsRequest struct { func (x *ListBucketsRequest) Reset() { *x = ListBucketsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBucketsRequest) String() string { @@ -467,7 +459,7 @@ func (*ListBucketsRequest) ProtoMessage() {} func (x *ListBucketsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,11 +524,9 @@ type ListBucketsResponse struct { func (x *ListBucketsResponse) Reset() { *x = ListBucketsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBucketsResponse) String() string { @@ -547,7 +537,7 @@ func (*ListBucketsResponse) ProtoMessage() {} func (x *ListBucketsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,11 +581,9 @@ type LockBucketRetentionPolicyRequest struct { func (x *LockBucketRetentionPolicyRequest) Reset() { *x = LockBucketRetentionPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LockBucketRetentionPolicyRequest) String() string { @@ -606,7 +594,7 @@ func (*LockBucketRetentionPolicyRequest) ProtoMessage() {} func (x *LockBucketRetentionPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +659,9 @@ type UpdateBucketRequest struct { func (x *UpdateBucketRequest) Reset() { *x = UpdateBucketRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBucketRequest) String() string { @@ -686,7 +672,7 @@ func (*UpdateBucketRequest) ProtoMessage() {} func (x *UpdateBucketRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +764,9 @@ type ComposeObjectRequest struct { func (x *ComposeObjectRequest) Reset() { *x = ComposeObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComposeObjectRequest) String() string { @@ -793,7 +777,7 @@ func (*ComposeObjectRequest) ProtoMessage() {} func (x *ComposeObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +885,9 @@ type DeleteObjectRequest struct { func (x *DeleteObjectRequest) Reset() { *x = DeleteObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteObjectRequest) String() string { @@ -916,7 +898,7 @@ func (*DeleteObjectRequest) ProtoMessage() {} func (x *DeleteObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,11 +1013,9 @@ type RestoreObjectRequest struct { func (x *RestoreObjectRequest) Reset() { *x = RestoreObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RestoreObjectRequest) String() string { @@ -1046,7 +1026,7 @@ func (*RestoreObjectRequest) ProtoMessage() {} func (x *RestoreObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,11 +1125,9 @@ type CancelResumableWriteRequest struct { func (x *CancelResumableWriteRequest) Reset() { *x = CancelResumableWriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelResumableWriteRequest) String() string { @@ -1160,7 +1138,7 @@ func (*CancelResumableWriteRequest) ProtoMessage() {} func (x *CancelResumableWriteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1192,11 +1170,9 @@ type CancelResumableWriteResponse struct { func (x *CancelResumableWriteResponse) Reset() { *x = CancelResumableWriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelResumableWriteResponse) String() string { @@ -1207,7 +1183,7 @@ func (*CancelResumableWriteResponse) ProtoMessage() {} func (x *CancelResumableWriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1280,11 +1256,9 @@ type ReadObjectRequest struct { func (x *ReadObjectRequest) Reset() { *x = ReadObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadObjectRequest) String() string { @@ -1295,7 +1269,7 @@ func (*ReadObjectRequest) ProtoMessage() {} func (x *ReadObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1408,9 @@ type GetObjectRequest struct { func (x *GetObjectRequest) Reset() { *x = GetObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetObjectRequest) String() string { @@ -1449,7 +1421,7 @@ func (*GetObjectRequest) ProtoMessage() {} func (x *GetObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1567,11 +1539,9 @@ type ReadObjectResponse struct { func (x *ReadObjectResponse) Reset() { *x = ReadObjectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadObjectResponse) String() string { @@ -1582,7 +1552,7 @@ func (*ReadObjectResponse) ProtoMessage() {} func (x *ReadObjectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1664,11 +1634,9 @@ type WriteObjectSpec struct { func (x *WriteObjectSpec) Reset() { *x = WriteObjectSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteObjectSpec) String() string { @@ -1679,7 +1647,7 @@ func (*WriteObjectSpec) ProtoMessage() {} func (x *WriteObjectSpec) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1794,11 +1762,9 @@ type WriteObjectRequest struct { func (x *WriteObjectRequest) Reset() { *x = WriteObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteObjectRequest) String() string { @@ -1809,7 +1775,7 @@ func (*WriteObjectRequest) ProtoMessage() {} func (x *WriteObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1936,11 +1902,9 @@ type WriteObjectResponse struct { func (x *WriteObjectResponse) Reset() { *x = WriteObjectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WriteObjectResponse) String() string { @@ -1951,7 +1915,7 @@ func (*WriteObjectResponse) ProtoMessage() {} func (x *WriteObjectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2073,11 +2037,9 @@ type BidiWriteObjectRequest struct { func (x *BidiWriteObjectRequest) Reset() { *x = BidiWriteObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BidiWriteObjectRequest) String() string { @@ -2088,7 +2050,7 @@ func (*BidiWriteObjectRequest) ProtoMessage() {} func (x *BidiWriteObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2229,11 +2191,9 @@ type BidiWriteObjectResponse struct { func (x *BidiWriteObjectResponse) Reset() { *x = BidiWriteObjectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BidiWriteObjectResponse) String() string { @@ -2244,7 +2204,7 @@ func (*BidiWriteObjectResponse) ProtoMessage() {} func (x *BidiWriteObjectResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2364,11 +2324,9 @@ type ListObjectsRequest struct { func (x *ListObjectsRequest) Reset() { *x = ListObjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListObjectsRequest) String() string { @@ -2379,7 +2337,7 @@ func (*ListObjectsRequest) ProtoMessage() {} func (x *ListObjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2500,11 +2458,9 @@ type QueryWriteStatusRequest struct { func (x *QueryWriteStatusRequest) Reset() { *x = QueryWriteStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWriteStatusRequest) String() string { @@ -2515,7 +2471,7 @@ func (*QueryWriteStatusRequest) ProtoMessage() {} func (x *QueryWriteStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2561,11 +2517,9 @@ type QueryWriteStatusResponse struct { func (x *QueryWriteStatusResponse) Reset() { *x = QueryWriteStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueryWriteStatusResponse) String() string { @@ -2576,7 +2530,7 @@ func (*QueryWriteStatusResponse) ProtoMessage() {} func (x *QueryWriteStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2745,11 +2699,9 @@ type RewriteObjectRequest struct { func (x *RewriteObjectRequest) Reset() { *x = RewriteObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RewriteObjectRequest) String() string { @@ -2760,7 +2712,7 @@ func (*RewriteObjectRequest) ProtoMessage() {} func (x *RewriteObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2961,11 +2913,9 @@ type RewriteResponse struct { func (x *RewriteResponse) Reset() { *x = RewriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RewriteResponse) String() string { @@ -2976,7 +2926,7 @@ func (*RewriteResponse) ProtoMessage() {} func (x *RewriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3046,11 +2996,9 @@ type StartResumableWriteRequest struct { func (x *StartResumableWriteRequest) Reset() { *x = StartResumableWriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartResumableWriteRequest) String() string { @@ -3061,7 +3009,7 @@ func (*StartResumableWriteRequest) ProtoMessage() {} func (x *StartResumableWriteRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3110,11 +3058,9 @@ type StartResumableWriteResponse struct { func (x *StartResumableWriteResponse) Reset() { *x = StartResumableWriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartResumableWriteResponse) String() string { @@ -3125,7 +3071,7 @@ func (*StartResumableWriteResponse) ProtoMessage() {} func (x *StartResumableWriteResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3193,11 +3139,9 @@ type UpdateObjectRequest struct { func (x *UpdateObjectRequest) Reset() { *x = UpdateObjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateObjectRequest) String() string { @@ -3208,7 +3152,7 @@ func (*UpdateObjectRequest) ProtoMessage() {} func (x *UpdateObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3298,11 +3242,9 @@ type CommonObjectRequestParams struct { func (x *CommonObjectRequestParams) Reset() { *x = CommonObjectRequestParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonObjectRequestParams) String() string { @@ -3313,7 +3255,7 @@ func (*CommonObjectRequestParams) ProtoMessage() {} func (x *CommonObjectRequestParams) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3358,11 +3300,9 @@ type ServiceConstants struct { func (x *ServiceConstants) Reset() { *x = ServiceConstants{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceConstants) String() string { @@ -3373,7 +3313,7 @@ func (*ServiceConstants) ProtoMessage() {} func (x *ServiceConstants) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3519,11 +3459,9 @@ type Bucket struct { func (x *Bucket) Reset() { *x = Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket) String() string { @@ -3534,7 +3472,7 @@ func (*Bucket) ProtoMessage() {} func (x *Bucket) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3808,11 +3746,9 @@ type BucketAccessControl struct { func (x *BucketAccessControl) Reset() { *x = BucketAccessControl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BucketAccessControl) String() string { @@ -3823,7 +3759,7 @@ func (*BucketAccessControl) ProtoMessage() {} func (x *BucketAccessControl) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3916,11 +3852,9 @@ type ChecksummedData struct { func (x *ChecksummedData) Reset() { *x = ChecksummedData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChecksummedData) String() string { @@ -3931,7 +3865,7 @@ func (*ChecksummedData) ProtoMessage() {} func (x *ChecksummedData) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3983,11 +3917,9 @@ type ObjectChecksums struct { func (x *ObjectChecksums) Reset() { *x = ObjectChecksums{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectChecksums) String() string { @@ -3998,7 +3930,7 @@ func (*ObjectChecksums) ProtoMessage() {} func (x *ObjectChecksums) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4043,11 +3975,9 @@ type CustomerEncryption struct { func (x *CustomerEncryption) Reset() { *x = CustomerEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomerEncryption) String() string { @@ -4058,7 +3988,7 @@ func (*CustomerEncryption) ProtoMessage() {} func (x *CustomerEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4225,11 +4155,9 @@ type Object struct { func (x *Object) Reset() { *x = Object{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Object) String() string { @@ -4240,7 +4168,7 @@ func (*Object) ProtoMessage() {} func (x *Object) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4517,11 +4445,9 @@ type ObjectAccessControl struct { func (x *ObjectAccessControl) Reset() { *x = ObjectAccessControl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectAccessControl) String() string { @@ -4532,7 +4458,7 @@ func (*ObjectAccessControl) ProtoMessage() {} func (x *ObjectAccessControl) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4628,11 +4554,9 @@ type ListObjectsResponse struct { func (x *ListObjectsResponse) Reset() { *x = ListObjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListObjectsResponse) String() string { @@ -4643,7 +4567,7 @@ func (*ListObjectsResponse) ProtoMessage() {} func (x *ListObjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4693,11 +4617,9 @@ type ProjectTeam struct { func (x *ProjectTeam) Reset() { *x = ProjectTeam{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProjectTeam) String() string { @@ -4708,7 +4630,7 @@ func (*ProjectTeam) ProtoMessage() {} func (x *ProjectTeam) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4751,11 +4673,9 @@ type Owner struct { func (x *Owner) Reset() { *x = Owner{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Owner) String() string { @@ -4766,7 +4686,7 @@ func (*Owner) ProtoMessage() {} func (x *Owner) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4811,11 +4731,9 @@ type ContentRange struct { func (x *ContentRange) Reset() { *x = ContentRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContentRange) String() string { @@ -4826,7 +4744,7 @@ func (*ContentRange) ProtoMessage() {} func (x *ContentRange) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4879,11 +4797,9 @@ type ComposeObjectRequest_SourceObject struct { func (x *ComposeObjectRequest_SourceObject) Reset() { *x = ComposeObjectRequest_SourceObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComposeObjectRequest_SourceObject) String() string { @@ -4894,7 +4810,7 @@ func (*ComposeObjectRequest_SourceObject) ProtoMessage() {} func (x *ComposeObjectRequest_SourceObject) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4944,11 +4860,9 @@ type ComposeObjectRequest_SourceObject_ObjectPreconditions struct { func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) Reset() { *x = ComposeObjectRequest_SourceObject_ObjectPreconditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) String() string { @@ -4959,7 +4873,7 @@ func (*ComposeObjectRequest_SourceObject_ObjectPreconditions) ProtoMessage() {} func (x *ComposeObjectRequest_SourceObject_ObjectPreconditions) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4993,11 +4907,9 @@ type Bucket_Billing struct { func (x *Bucket_Billing) Reset() { *x = Bucket_Billing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Billing) String() string { @@ -5008,7 +4920,7 @@ func (*Bucket_Billing) ProtoMessage() {} func (x *Bucket_Billing) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5059,11 +4971,9 @@ type Bucket_Cors struct { func (x *Bucket_Cors) Reset() { *x = Bucket_Cors{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Cors) String() string { @@ -5074,7 +4984,7 @@ func (*Bucket_Cors) ProtoMessage() {} func (x *Bucket_Cors) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5130,11 +5040,9 @@ type Bucket_Encryption struct { func (x *Bucket_Encryption) Reset() { *x = Bucket_Encryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Encryption) String() string { @@ -5145,7 +5053,7 @@ func (*Bucket_Encryption) ProtoMessage() {} func (x *Bucket_Encryption) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5182,11 +5090,9 @@ type Bucket_IamConfig struct { func (x *Bucket_IamConfig) Reset() { *x = Bucket_IamConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_IamConfig) String() string { @@ -5197,7 +5103,7 @@ func (*Bucket_IamConfig) ProtoMessage() {} func (x *Bucket_IamConfig) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5240,11 +5146,9 @@ type Bucket_Lifecycle struct { func (x *Bucket_Lifecycle) Reset() { *x = Bucket_Lifecycle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Lifecycle) String() string { @@ -5255,7 +5159,7 @@ func (*Bucket_Lifecycle) ProtoMessage() {} func (x *Bucket_Lifecycle) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5292,11 +5196,9 @@ type Bucket_Logging struct { func (x *Bucket_Logging) Reset() { *x = Bucket_Logging{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Logging) String() string { @@ -5307,7 +5209,7 @@ func (*Bucket_Logging) ProtoMessage() {} func (x *Bucket_Logging) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5357,11 +5259,9 @@ type Bucket_RetentionPolicy struct { func (x *Bucket_RetentionPolicy) Reset() { *x = Bucket_RetentionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_RetentionPolicy) String() string { @@ -5372,7 +5272,7 @@ func (*Bucket_RetentionPolicy) ProtoMessage() {} func (x *Bucket_RetentionPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5424,11 +5324,9 @@ type Bucket_SoftDeletePolicy struct { func (x *Bucket_SoftDeletePolicy) Reset() { *x = Bucket_SoftDeletePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_SoftDeletePolicy) String() string { @@ -5439,7 +5337,7 @@ func (*Bucket_SoftDeletePolicy) ProtoMessage() {} func (x *Bucket_SoftDeletePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5482,11 +5380,9 @@ type Bucket_Versioning struct { func (x *Bucket_Versioning) Reset() { *x = Bucket_Versioning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Versioning) String() string { @@ -5497,7 +5393,7 @@ func (*Bucket_Versioning) ProtoMessage() {} func (x *Bucket_Versioning) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5542,11 +5438,9 @@ type Bucket_Website struct { func (x *Bucket_Website) Reset() { *x = Bucket_Website{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Website) String() string { @@ -5557,7 +5451,7 @@ func (*Bucket_Website) ProtoMessage() {} func (x *Bucket_Website) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5600,11 +5494,9 @@ type Bucket_CustomPlacementConfig struct { func (x *Bucket_CustomPlacementConfig) Reset() { *x = Bucket_CustomPlacementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_CustomPlacementConfig) String() string { @@ -5615,7 +5507,7 @@ func (*Bucket_CustomPlacementConfig) ProtoMessage() {} func (x *Bucket_CustomPlacementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5661,11 +5553,9 @@ type Bucket_Autoclass struct { func (x *Bucket_Autoclass) Reset() { *x = Bucket_Autoclass{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Autoclass) String() string { @@ -5676,7 +5566,7 @@ func (*Bucket_Autoclass) ProtoMessage() {} func (x *Bucket_Autoclass) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5731,11 +5621,9 @@ type Bucket_HierarchicalNamespace struct { func (x *Bucket_HierarchicalNamespace) Reset() { *x = Bucket_HierarchicalNamespace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_HierarchicalNamespace) String() string { @@ -5746,7 +5634,7 @@ func (*Bucket_HierarchicalNamespace) ProtoMessage() {} func (x *Bucket_HierarchicalNamespace) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5786,11 +5674,9 @@ type Bucket_IamConfig_UniformBucketLevelAccess struct { func (x *Bucket_IamConfig_UniformBucketLevelAccess) Reset() { *x = Bucket_IamConfig_UniformBucketLevelAccess{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_IamConfig_UniformBucketLevelAccess) String() string { @@ -5801,7 +5687,7 @@ func (*Bucket_IamConfig_UniformBucketLevelAccess) ProtoMessage() {} func (x *Bucket_IamConfig_UniformBucketLevelAccess) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5845,11 +5731,9 @@ type Bucket_Lifecycle_Rule struct { func (x *Bucket_Lifecycle_Rule) Reset() { *x = Bucket_Lifecycle_Rule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Lifecycle_Rule) String() string { @@ -5860,7 +5744,7 @@ func (*Bucket_Lifecycle_Rule) ProtoMessage() {} func (x *Bucket_Lifecycle_Rule) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5905,11 +5789,9 @@ type Bucket_Lifecycle_Rule_Action struct { func (x *Bucket_Lifecycle_Rule_Action) Reset() { *x = Bucket_Lifecycle_Rule_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Lifecycle_Rule_Action) String() string { @@ -5920,7 +5802,7 @@ func (*Bucket_Lifecycle_Rule_Action) ProtoMessage() {} func (x *Bucket_Lifecycle_Rule_Action) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6003,11 +5885,9 @@ type Bucket_Lifecycle_Rule_Condition struct { func (x *Bucket_Lifecycle_Rule_Condition) Reset() { *x = Bucket_Lifecycle_Rule_Condition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storage_v2_storage_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storage_v2_storage_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Bucket_Lifecycle_Rule_Condition) String() string { @@ -6018,7 +5898,7 @@ func (*Bucket_Lifecycle_Rule_Condition) ProtoMessage() {} func (x *Bucket_Lifecycle_Rule_Condition) ProtoReflect() protoreflect.Message { mi := &file_google_storage_v2_storage_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7903,728 +7783,6 @@ func file_google_storage_v2_storage_proto_init() { if File_google_storage_v2_storage_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_storage_v2_storage_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListBucketsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListBucketsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LockBucketRetentionPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBucketRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ComposeObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RestoreObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CancelResumableWriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CancelResumableWriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReadObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReadObjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*WriteObjectSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*WriteObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*WriteObjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BidiWriteObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BidiWriteObjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListObjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*QueryWriteStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*QueryWriteStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*RewriteObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RewriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*StartResumableWriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*StartResumableWriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*UpdateObjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CommonObjectRequestParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ServiceConstants); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*BucketAccessControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ChecksummedData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ObjectChecksums); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*CustomerEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Object); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ObjectAccessControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListObjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ProjectTeam); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Owner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ContentRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ComposeObjectRequest_SourceObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ComposeObjectRequest_SourceObject_ObjectPreconditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Billing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Cors); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Encryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_IamConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Lifecycle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Logging); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_RetentionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_SoftDeletePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Versioning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Website); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_CustomPlacementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Autoclass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_HierarchicalNamespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_IamConfig_UniformBucketLevelAccess); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Lifecycle_Rule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Lifecycle_Rule_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storage_v2_storage_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*Bucket_Lifecycle_Rule_Condition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_storage_v2_storage_proto_msgTypes[0].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[1].OneofWrappers = []any{} file_google_storage_v2_storage_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/storageinsights/apiv1/helpers.go b/storageinsights/apiv1/helpers.go index cc8b4b6d62f9..3193eaa8151e 100755 --- a/storageinsights/apiv1/helpers.go +++ b/storageinsights/apiv1/helpers.go @@ -18,10 +18,20 @@ package storageinsights import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "storageinsights.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/storageinsights/apiv1/storage_insights_client.go b/storageinsights/apiv1/storage_insights_client.go index b022f76c389c..64c07af58190 100755 --- a/storageinsights/apiv1/storage_insights_client.go +++ b/storageinsights/apiv1/storage_insights_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" storageinsightspb "cloud.google.com/go/storageinsights/apiv1/storageinsightspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -347,6 +346,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new storage insights client based on gRPC. @@ -373,6 +374,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: storageinsightspb.NewStorageInsightsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -421,6 +423,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new storage insights rest client. @@ -438,6 +442,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -501,7 +506,7 @@ func (c *gRPCClient) ListReportConfigs(ctx context.Context, req *storageinsights } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReportConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReportConfigs, req, settings.GRPC, c.logger, "ListReportConfigs") return err }, opts...) if err != nil { @@ -536,7 +541,7 @@ func (c *gRPCClient) GetReportConfig(ctx context.Context, req *storageinsightspb var resp *storageinsightspb.ReportConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReportConfig, req, settings.GRPC, c.logger, "GetReportConfig") return err }, opts...) if err != nil { @@ -554,7 +559,7 @@ func (c *gRPCClient) CreateReportConfig(ctx context.Context, req *storageinsight var resp *storageinsightspb.ReportConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateReportConfig, req, settings.GRPC, c.logger, "CreateReportConfig") return err }, opts...) if err != nil { @@ -572,7 +577,7 @@ func (c *gRPCClient) UpdateReportConfig(ctx context.Context, req *storageinsight var resp *storageinsightspb.ReportConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateReportConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateReportConfig, req, settings.GRPC, c.logger, "UpdateReportConfig") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *gRPCClient) DeleteReportConfig(ctx context.Context, req *storageinsight opts = append((*c.CallOptions).DeleteReportConfig[0:len((*c.CallOptions).DeleteReportConfig):len((*c.CallOptions).DeleteReportConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteReportConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteReportConfig, req, settings.GRPC, c.logger, "DeleteReportConfig") return err }, opts...) return err @@ -615,7 +620,7 @@ func (c *gRPCClient) ListReportDetails(ctx context.Context, req *storageinsights } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReportDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReportDetails, req, settings.GRPC, c.logger, "ListReportDetails") return err }, opts...) if err != nil { @@ -650,7 +655,7 @@ func (c *gRPCClient) GetReportDetail(ctx context.Context, req *storageinsightspb var resp *storageinsightspb.ReportDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReportDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReportDetail, req, settings.GRPC, c.logger, "GetReportDetail") return err }, opts...) if err != nil { @@ -668,7 +673,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -697,7 +702,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -731,7 +736,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -745,7 +750,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -760,7 +765,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -789,7 +794,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -866,21 +871,10 @@ func (c *restClient) ListReportConfigs(ctx context.Context, req *storageinsights } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReportConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -943,17 +937,7 @@ func (c *restClient) GetReportConfig(ctx context.Context, req *storageinsightspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReportConfig") if err != nil { return err } @@ -1013,17 +997,7 @@ func (c *restClient) CreateReportConfig(ctx context.Context, req *storageinsight httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReportConfig") if err != nil { return err } @@ -1090,17 +1064,7 @@ func (c *restClient) UpdateReportConfig(ctx context.Context, req *storageinsight httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateReportConfig") if err != nil { return err } @@ -1153,15 +1117,8 @@ func (c *restClient) DeleteReportConfig(ctx context.Context, req *storageinsight httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReportConfig") + return err }, opts...) } @@ -1216,21 +1173,10 @@ func (c *restClient) ListReportDetails(ctx context.Context, req *storageinsights } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReportDetails") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1293,17 +1239,7 @@ func (c *restClient) GetReportDetail(ctx context.Context, req *storageinsightspb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReportDetail") if err != nil { return err } @@ -1353,17 +1289,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1428,21 +1354,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1508,15 +1423,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1550,15 +1458,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1595,17 +1496,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1670,21 +1561,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/storageinsights/apiv1/storage_insights_client_example_go123_test.go b/storageinsights/apiv1/storage_insights_client_example_go123_test.go index 47154dfc4f59..df837d330319 100644 --- a/storageinsights/apiv1/storage_insights_client_example_go123_test.go +++ b/storageinsights/apiv1/storage_insights_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListReportConfigs_all() { } for resp, err := range c.ListReportConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListReportDetails_all() { } for resp, err := range c.ListReportDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/storageinsights/apiv1/storageinsightspb/storageinsights.pb.go b/storageinsights/apiv1/storageinsightspb/storageinsights.pb.go index 5352353374ce..f705009f8bcb 100755 --- a/storageinsights/apiv1/storageinsightspb/storageinsights.pb.go +++ b/storageinsights/apiv1/storageinsightspb/storageinsights.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/storageinsights/v1/storageinsights.proto @@ -120,11 +120,9 @@ type ListReportConfigsRequest struct { func (x *ListReportConfigsRequest) Reset() { *x = ListReportConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportConfigsRequest) String() string { @@ -135,7 +133,7 @@ func (*ListReportConfigsRequest) ProtoMessage() {} func (x *ListReportConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,11 +199,9 @@ type ListReportConfigsResponse struct { func (x *ListReportConfigsResponse) Reset() { *x = ListReportConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportConfigsResponse) String() string { @@ -216,7 +212,7 @@ func (*ListReportConfigsResponse) ProtoMessage() {} func (x *ListReportConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +260,9 @@ type GetReportConfigRequest struct { func (x *GetReportConfigRequest) Reset() { *x = GetReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReportConfigRequest) String() string { @@ -279,7 +273,7 @@ func (*GetReportConfigRequest) ProtoMessage() {} func (x *GetReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -329,11 +323,9 @@ type CreateReportConfigRequest struct { func (x *CreateReportConfigRequest) Reset() { *x = CreateReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReportConfigRequest) String() string { @@ -344,7 +336,7 @@ func (*CreateReportConfigRequest) ProtoMessage() {} func (x *CreateReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +404,9 @@ type UpdateReportConfigRequest struct { func (x *UpdateReportConfigRequest) Reset() { *x = UpdateReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateReportConfigRequest) String() string { @@ -427,7 +417,7 @@ func (*UpdateReportConfigRequest) ProtoMessage() {} func (x *UpdateReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +481,9 @@ type DeleteReportConfigRequest struct { func (x *DeleteReportConfigRequest) Reset() { *x = DeleteReportConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReportConfigRequest) String() string { @@ -506,7 +494,7 @@ func (*DeleteReportConfigRequest) ProtoMessage() {} func (x *DeleteReportConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +567,9 @@ type ReportDetail struct { func (x *ReportDetail) Reset() { *x = ReportDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportDetail) String() string { @@ -594,7 +580,7 @@ func (*ReportDetail) ProtoMessage() {} func (x *ReportDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -686,11 +672,9 @@ type ListReportDetailsRequest struct { func (x *ListReportDetailsRequest) Reset() { *x = ListReportDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportDetailsRequest) String() string { @@ -701,7 +685,7 @@ func (*ListReportDetailsRequest) ProtoMessage() {} func (x *ListReportDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -767,11 +751,9 @@ type ListReportDetailsResponse struct { func (x *ListReportDetailsResponse) Reset() { *x = ListReportDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReportDetailsResponse) String() string { @@ -782,7 +764,7 @@ func (*ListReportDetailsResponse) ProtoMessage() {} func (x *ListReportDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,11 +812,9 @@ type GetReportDetailRequest struct { func (x *GetReportDetailRequest) Reset() { *x = GetReportDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReportDetailRequest) String() string { @@ -845,7 +825,7 @@ func (*GetReportDetailRequest) ProtoMessage() {} func (x *GetReportDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +875,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -910,7 +888,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -994,11 +972,9 @@ type FrequencyOptions struct { func (x *FrequencyOptions) Reset() { *x = FrequencyOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FrequencyOptions) String() string { @@ -1009,7 +985,7 @@ func (*FrequencyOptions) ProtoMessage() {} func (x *FrequencyOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1061,11 +1037,9 @@ type CSVOptions struct { func (x *CSVOptions) Reset() { *x = CSVOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CSVOptions) String() string { @@ -1076,7 +1050,7 @@ func (*CSVOptions) ProtoMessage() {} func (x *CSVOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1095,9 @@ type ParquetOptions struct { func (x *ParquetOptions) Reset() { *x = ParquetOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParquetOptions) String() string { @@ -1136,7 +1108,7 @@ func (*ParquetOptions) ProtoMessage() {} func (x *ParquetOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1136,9 @@ type CloudStorageFilters struct { func (x *CloudStorageFilters) Reset() { *x = CloudStorageFilters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageFilters) String() string { @@ -1179,7 +1149,7 @@ func (*CloudStorageFilters) ProtoMessage() {} func (x *CloudStorageFilters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1187,9 @@ type CloudStorageDestinationOptions struct { func (x *CloudStorageDestinationOptions) Reset() { *x = CloudStorageDestinationOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloudStorageDestinationOptions) String() string { @@ -1232,7 +1200,7 @@ func (*CloudStorageDestinationOptions) ProtoMessage() {} func (x *CloudStorageDestinationOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1286,11 +1254,9 @@ type ObjectMetadataReportOptions struct { func (x *ObjectMetadataReportOptions) Reset() { *x = ObjectMetadataReportOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectMetadataReportOptions) String() string { @@ -1301,7 +1267,7 @@ func (*ObjectMetadataReportOptions) ProtoMessage() {} func (x *ObjectMetadataReportOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1416,11 +1382,9 @@ type ReportConfig struct { func (x *ReportConfig) Reset() { *x = ReportConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportConfig) String() string { @@ -1431,7 +1395,7 @@ func (*ReportConfig) ProtoMessage() {} func (x *ReportConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1564,11 +1528,9 @@ type ReportDetail_Metrics struct { func (x *ReportDetail_Metrics) Reset() { *x = ReportDetail_Metrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportDetail_Metrics) String() string { @@ -1579,7 +1541,7 @@ func (*ReportDetail_Metrics) ProtoMessage() {} func (x *ReportDetail_Metrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,236 +2084,6 @@ func file_google_cloud_storageinsights_v1_storageinsights_proto_init() { if File_google_cloud_storageinsights_v1_storageinsights_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListReportConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListReportConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReportConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ReportDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListReportDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListReportDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetReportDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*FrequencyOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CSVOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ParquetOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageFilters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CloudStorageDestinationOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ObjectMetadataReportOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ReportConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReportDetail_Metrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_storageinsights_v1_storageinsights_proto_msgTypes[16].OneofWrappers = []any{ (*ObjectMetadataReportOptions_StorageFilters)(nil), (*ObjectMetadataReportOptions_StorageDestinationOptions)(nil), diff --git a/storagetransfer/apiv1/helpers.go b/storagetransfer/apiv1/helpers.go index 3379d19a0739..668d41f0ffe4 100755 --- a/storagetransfer/apiv1/helpers.go +++ b/storagetransfer/apiv1/helpers.go @@ -18,10 +18,20 @@ package storagetransfer import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "storagetransfer.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/storagetransfer/apiv1/storage_transfer_client.go b/storagetransfer/apiv1/storage_transfer_client.go index 8a3869c3ec80..bd215a2fd10e 100755 --- a/storagetransfer/apiv1/storage_transfer_client.go +++ b/storagetransfer/apiv1/storage_transfer_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" storagetransferpb "cloud.google.com/go/storagetransfer/apiv1/storagetransferpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -684,6 +683,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new storage transfer service client based on gRPC. @@ -712,6 +713,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: storagetransferpb.NewStorageTransferServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -775,6 +777,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new storage transfer service rest client. @@ -794,6 +798,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -856,7 +861,7 @@ func (c *gRPCClient) GetGoogleServiceAccount(ctx context.Context, req *storagetr var resp *storagetransferpb.GoogleServiceAccount err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGoogleServiceAccount(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGoogleServiceAccount, req, settings.GRPC, c.logger, "GetGoogleServiceAccount") return err }, opts...) if err != nil { @@ -871,7 +876,7 @@ func (c *gRPCClient) CreateTransferJob(ctx context.Context, req *storagetransfer var resp *storagetransferpb.TransferJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTransferJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTransferJob, req, settings.GRPC, c.logger, "CreateTransferJob") return err }, opts...) if err != nil { @@ -889,7 +894,7 @@ func (c *gRPCClient) UpdateTransferJob(ctx context.Context, req *storagetransfer var resp *storagetransferpb.TransferJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTransferJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTransferJob, req, settings.GRPC, c.logger, "UpdateTransferJob") return err }, opts...) if err != nil { @@ -907,7 +912,7 @@ func (c *gRPCClient) GetTransferJob(ctx context.Context, req *storagetransferpb. var resp *storagetransferpb.TransferJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTransferJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTransferJob, req, settings.GRPC, c.logger, "GetTransferJob") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *gRPCClient) ListTransferJobs(ctx context.Context, req *storagetransferp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTransferJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTransferJobs, req, settings.GRPC, c.logger, "ListTransferJobs") return err }, opts...) if err != nil { @@ -967,7 +972,7 @@ func (c *gRPCClient) PauseTransferOperation(ctx context.Context, req *storagetra opts = append((*c.CallOptions).PauseTransferOperation[0:len((*c.CallOptions).PauseTransferOperation):len((*c.CallOptions).PauseTransferOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PauseTransferOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PauseTransferOperation, req, settings.GRPC, c.logger, "PauseTransferOperation") return err }, opts...) return err @@ -981,7 +986,7 @@ func (c *gRPCClient) ResumeTransferOperation(ctx context.Context, req *storagetr opts = append((*c.CallOptions).ResumeTransferOperation[0:len((*c.CallOptions).ResumeTransferOperation):len((*c.CallOptions).ResumeTransferOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.ResumeTransferOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.ResumeTransferOperation, req, settings.GRPC, c.logger, "ResumeTransferOperation") return err }, opts...) return err @@ -996,7 +1001,7 @@ func (c *gRPCClient) RunTransferJob(ctx context.Context, req *storagetransferpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RunTransferJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RunTransferJob, req, settings.GRPC, c.logger, "RunTransferJob") return err }, opts...) if err != nil { @@ -1015,7 +1020,7 @@ func (c *gRPCClient) DeleteTransferJob(ctx context.Context, req *storagetransfer opts = append((*c.CallOptions).DeleteTransferJob[0:len((*c.CallOptions).DeleteTransferJob):len((*c.CallOptions).DeleteTransferJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteTransferJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteTransferJob, req, settings.GRPC, c.logger, "DeleteTransferJob") return err }, opts...) return err @@ -1030,7 +1035,7 @@ func (c *gRPCClient) CreateAgentPool(ctx context.Context, req *storagetransferpb var resp *storagetransferpb.AgentPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAgentPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAgentPool, req, settings.GRPC, c.logger, "CreateAgentPool") return err }, opts...) if err != nil { @@ -1048,7 +1053,7 @@ func (c *gRPCClient) UpdateAgentPool(ctx context.Context, req *storagetransferpb var resp *storagetransferpb.AgentPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateAgentPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateAgentPool, req, settings.GRPC, c.logger, "UpdateAgentPool") return err }, opts...) if err != nil { @@ -1066,7 +1071,7 @@ func (c *gRPCClient) GetAgentPool(ctx context.Context, req *storagetransferpb.Ge var resp *storagetransferpb.AgentPool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAgentPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAgentPool, req, settings.GRPC, c.logger, "GetAgentPool") return err }, opts...) if err != nil { @@ -1095,7 +1100,7 @@ func (c *gRPCClient) ListAgentPools(ctx context.Context, req *storagetransferpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAgentPools(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAgentPools, req, settings.GRPC, c.logger, "ListAgentPools") return err }, opts...) if err != nil { @@ -1129,7 +1134,7 @@ func (c *gRPCClient) DeleteAgentPool(ctx context.Context, req *storagetransferpb opts = append((*c.CallOptions).DeleteAgentPool[0:len((*c.CallOptions).DeleteAgentPool):len((*c.CallOptions).DeleteAgentPool)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteAgentPool(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteAgentPool, req, settings.GRPC, c.logger, "DeleteAgentPool") return err }, opts...) return err @@ -1143,7 +1148,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1158,7 +1163,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1187,7 +1192,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1253,17 +1258,7 @@ func (c *restClient) GetGoogleServiceAccount(ctx context.Context, req *storagetr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGoogleServiceAccount") if err != nil { return err } @@ -1317,17 +1312,7 @@ func (c *restClient) CreateTransferJob(ctx context.Context, req *storagetransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTransferJob") if err != nil { return err } @@ -1390,17 +1375,7 @@ func (c *restClient) UpdateTransferJob(ctx context.Context, req *storagetransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTransferJob") if err != nil { return err } @@ -1451,17 +1426,7 @@ func (c *restClient) GetTransferJob(ctx context.Context, req *storagetransferpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTransferJob") if err != nil { return err } @@ -1524,21 +1489,10 @@ func (c *restClient) ListTransferJobs(ctx context.Context, req *storagetransferp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTransferJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1604,15 +1558,8 @@ func (c *restClient) PauseTransferOperation(ctx context.Context, req *storagetra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseTransferOperation") + return err }, opts...) } @@ -1652,15 +1599,8 @@ func (c *restClient) ResumeTransferOperation(ctx context.Context, req *storagetr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeTransferOperation") + return err }, opts...) } @@ -1705,21 +1645,10 @@ func (c *restClient) RunTransferJob(ctx context.Context, req *storagetransferpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RunTransferJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1769,15 +1698,8 @@ func (c *restClient) DeleteTransferJob(ctx context.Context, req *storagetransfer httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTransferJob") + return err }, opts...) } @@ -1822,17 +1744,7 @@ func (c *restClient) CreateAgentPool(ctx context.Context, req *storagetransferpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAgentPool") if err != nil { return err } @@ -1896,17 +1808,7 @@ func (c *restClient) UpdateAgentPool(ctx context.Context, req *storagetransferpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAgentPool") if err != nil { return err } @@ -1956,17 +1858,7 @@ func (c *restClient) GetAgentPool(ctx context.Context, req *storagetransferpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAgentPool") if err != nil { return err } @@ -2031,21 +1923,10 @@ func (c *restClient) ListAgentPools(ctx context.Context, req *storagetransferpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAgentPools") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2105,15 +1986,8 @@ func (c *restClient) DeleteAgentPool(ctx context.Context, req *storagetransferpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAgentPool") + return err }, opts...) } @@ -2173,15 +2047,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2218,17 +2085,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2294,21 +2151,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/storagetransfer/apiv1/storage_transfer_client_example_go123_test.go b/storagetransfer/apiv1/storage_transfer_client_example_go123_test.go index c665abc7053e..18ed10e7c683 100644 --- a/storagetransfer/apiv1/storage_transfer_client_example_go123_test.go +++ b/storagetransfer/apiv1/storage_transfer_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListAgentPools_all() { } for resp, err := range c.ListAgentPools(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListTransferJobs_all() { } for resp, err := range c.ListTransferJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/storagetransfer/apiv1/storagetransferpb/transfer.pb.go b/storagetransfer/apiv1/storagetransferpb/transfer.pb.go index 31b750dd52cb..1cd82a8bcd23 100755 --- a/storagetransfer/apiv1/storagetransferpb/transfer.pb.go +++ b/storagetransfer/apiv1/storagetransferpb/transfer.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/storagetransfer/v1/transfer.proto @@ -56,11 +56,9 @@ type GetGoogleServiceAccountRequest struct { func (x *GetGoogleServiceAccountRequest) Reset() { *x = GetGoogleServiceAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGoogleServiceAccountRequest) String() string { @@ -71,7 +69,7 @@ func (*GetGoogleServiceAccountRequest) ProtoMessage() {} func (x *GetGoogleServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type CreateTransferJobRequest struct { func (x *CreateTransferJobRequest) Reset() { *x = CreateTransferJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTransferJobRequest) String() string { @@ -120,7 +116,7 @@ func (*CreateTransferJobRequest) ProtoMessage() {} func (x *CreateTransferJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,11 +178,9 @@ type UpdateTransferJobRequest struct { func (x *UpdateTransferJobRequest) Reset() { *x = UpdateTransferJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTransferJobRequest) String() string { @@ -197,7 +191,7 @@ func (*UpdateTransferJobRequest) ProtoMessage() {} func (x *UpdateTransferJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +249,9 @@ type GetTransferJobRequest struct { func (x *GetTransferJobRequest) Reset() { *x = GetTransferJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTransferJobRequest) String() string { @@ -270,7 +262,7 @@ func (*GetTransferJobRequest) ProtoMessage() {} func (x *GetTransferJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +306,9 @@ type DeleteTransferJobRequest struct { func (x *DeleteTransferJobRequest) Reset() { *x = DeleteTransferJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTransferJobRequest) String() string { @@ -329,7 +319,7 @@ func (*DeleteTransferJobRequest) ProtoMessage() {} func (x *DeleteTransferJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +377,9 @@ type ListTransferJobsRequest struct { func (x *ListTransferJobsRequest) Reset() { *x = ListTransferJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferJobsRequest) String() string { @@ -402,7 +390,7 @@ func (*ListTransferJobsRequest) ProtoMessage() {} func (x *ListTransferJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,11 +440,9 @@ type ListTransferJobsResponse struct { func (x *ListTransferJobsResponse) Reset() { *x = ListTransferJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTransferJobsResponse) String() string { @@ -467,7 +453,7 @@ func (*ListTransferJobsResponse) ProtoMessage() {} func (x *ListTransferJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +494,9 @@ type PauseTransferOperationRequest struct { func (x *PauseTransferOperationRequest) Reset() { *x = PauseTransferOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseTransferOperationRequest) String() string { @@ -523,7 +507,7 @@ func (*PauseTransferOperationRequest) ProtoMessage() {} func (x *PauseTransferOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +541,9 @@ type ResumeTransferOperationRequest struct { func (x *ResumeTransferOperationRequest) Reset() { *x = ResumeTransferOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeTransferOperationRequest) String() string { @@ -572,7 +554,7 @@ func (*ResumeTransferOperationRequest) ProtoMessage() {} func (x *ResumeTransferOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +591,9 @@ type RunTransferJobRequest struct { func (x *RunTransferJobRequest) Reset() { *x = RunTransferJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunTransferJobRequest) String() string { @@ -624,7 +604,7 @@ func (*RunTransferJobRequest) ProtoMessage() {} func (x *RunTransferJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,11 +662,9 @@ type CreateAgentPoolRequest struct { func (x *CreateAgentPoolRequest) Reset() { *x = CreateAgentPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAgentPoolRequest) String() string { @@ -697,7 +675,7 @@ func (*CreateAgentPoolRequest) ProtoMessage() {} func (x *CreateAgentPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +741,9 @@ type UpdateAgentPoolRequest struct { func (x *UpdateAgentPoolRequest) Reset() { *x = UpdateAgentPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAgentPoolRequest) String() string { @@ -778,7 +754,7 @@ func (*UpdateAgentPoolRequest) ProtoMessage() {} func (x *UpdateAgentPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +795,9 @@ type GetAgentPoolRequest struct { func (x *GetAgentPoolRequest) Reset() { *x = GetAgentPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAgentPoolRequest) String() string { @@ -834,7 +808,7 @@ func (*GetAgentPoolRequest) ProtoMessage() {} func (x *GetAgentPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -868,11 +842,9 @@ type DeleteAgentPoolRequest struct { func (x *DeleteAgentPoolRequest) Reset() { *x = DeleteAgentPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAgentPoolRequest) String() string { @@ -883,7 +855,7 @@ func (*DeleteAgentPoolRequest) ProtoMessage() {} func (x *DeleteAgentPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -930,11 +902,9 @@ type ListAgentPoolsRequest struct { func (x *ListAgentPoolsRequest) Reset() { *x = ListAgentPoolsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentPoolsRequest) String() string { @@ -945,7 +915,7 @@ func (*ListAgentPoolsRequest) ProtoMessage() {} func (x *ListAgentPoolsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1002,11 +972,9 @@ type ListAgentPoolsResponse struct { func (x *ListAgentPoolsResponse) Reset() { *x = ListAgentPoolsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAgentPoolsResponse) String() string { @@ -1017,7 +985,7 @@ func (*ListAgentPoolsResponse) ProtoMessage() {} func (x *ListAgentPoolsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,200 +1409,6 @@ func file_google_storagetransfer_v1_transfer_proto_init() { return } file_google_storagetransfer_v1_transfer_types_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_storagetransfer_v1_transfer_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetGoogleServiceAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTransferJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTransferJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTransferJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTransferJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListTransferJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PauseTransferOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ResumeTransferOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RunTransferJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateAgentPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAgentPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetAgentPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAgentPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentPoolsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListAgentPoolsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/storagetransfer/apiv1/storagetransferpb/transfer_types.pb.go b/storagetransfer/apiv1/storagetransferpb/transfer_types.pb.go index 8e6684c549f0..a541c7e72e4e 100755 --- a/storagetransfer/apiv1/storagetransferpb/transfer_types.pb.go +++ b/storagetransfer/apiv1/storagetransferpb/transfer_types.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/storagetransfer/v1/transfer_types.proto @@ -1263,11 +1263,9 @@ type GoogleServiceAccount struct { func (x *GoogleServiceAccount) Reset() { *x = GoogleServiceAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleServiceAccount) String() string { @@ -1278,7 +1276,7 @@ func (*GoogleServiceAccount) ProtoMessage() {} func (x *GoogleServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1327,11 +1325,9 @@ type AwsAccessKey struct { func (x *AwsAccessKey) Reset() { *x = AwsAccessKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsAccessKey) String() string { @@ -1342,7 +1338,7 @@ func (*AwsAccessKey) ProtoMessage() {} func (x *AwsAccessKey) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1387,9 @@ type AzureCredentials struct { func (x *AzureCredentials) Reset() { *x = AzureCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureCredentials) String() string { @@ -1406,7 +1400,7 @@ func (*AzureCredentials) ProtoMessage() {} func (x *AzureCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1548,11 +1542,9 @@ type ObjectConditions struct { func (x *ObjectConditions) Reset() { *x = ObjectConditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectConditions) String() string { @@ -1563,7 +1555,7 @@ func (*ObjectConditions) ProtoMessage() {} func (x *ObjectConditions) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1659,11 +1651,9 @@ type GcsData struct { func (x *GcsData) Reset() { *x = GcsData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsData) String() string { @@ -1674,7 +1664,7 @@ func (*GcsData) ProtoMessage() {} func (x *GcsData) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1786,11 +1776,9 @@ type AwsS3Data struct { func (x *AwsS3Data) Reset() { *x = AwsS3Data{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsS3Data) String() string { @@ -1801,7 +1789,7 @@ func (*AwsS3Data) ProtoMessage() {} func (x *AwsS3Data) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1936,11 +1924,9 @@ type AzureBlobStorageData struct { func (x *AzureBlobStorageData) Reset() { *x = AzureBlobStorageData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AzureBlobStorageData) String() string { @@ -1951,7 +1937,7 @@ func (*AzureBlobStorageData) ProtoMessage() {} func (x *AzureBlobStorageData) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2054,11 +2040,9 @@ type HttpData struct { func (x *HttpData) Reset() { *x = HttpData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HttpData) String() string { @@ -2069,7 +2053,7 @@ func (*HttpData) ProtoMessage() {} func (x *HttpData) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2103,11 +2087,9 @@ type PosixFilesystem struct { func (x *PosixFilesystem) Reset() { *x = PosixFilesystem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PosixFilesystem) String() string { @@ -2118,7 +2100,7 @@ func (*PosixFilesystem) ProtoMessage() {} func (x *PosixFilesystem) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2155,11 +2137,9 @@ type HdfsData struct { func (x *HdfsData) Reset() { *x = HdfsData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HdfsData) String() string { @@ -2170,7 +2150,7 @@ func (*HdfsData) ProtoMessage() {} func (x *HdfsData) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,11 +2203,9 @@ type AwsS3CompatibleData struct { func (x *AwsS3CompatibleData) Reset() { *x = AwsS3CompatibleData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsS3CompatibleData) String() string { @@ -2238,7 +2216,7 @@ func (*AwsS3CompatibleData) ProtoMessage() {} func (x *AwsS3CompatibleData) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2331,11 +2309,9 @@ type S3CompatibleMetadata struct { func (x *S3CompatibleMetadata) Reset() { *x = S3CompatibleMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *S3CompatibleMetadata) String() string { @@ -2346,7 +2322,7 @@ func (*S3CompatibleMetadata) ProtoMessage() {} func (x *S3CompatibleMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2410,11 +2386,9 @@ type AgentPool struct { func (x *AgentPool) Reset() { *x = AgentPool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentPool) String() string { @@ -2425,7 +2399,7 @@ func (*AgentPool) ProtoMessage() {} func (x *AgentPool) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2502,11 +2476,9 @@ type TransferOptions struct { func (x *TransferOptions) Reset() { *x = TransferOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOptions) String() string { @@ -2517,7 +2489,7 @@ func (*TransferOptions) ProtoMessage() {} func (x *TransferOptions) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2620,11 +2592,9 @@ type TransferSpec struct { func (x *TransferSpec) Reset() { *x = TransferSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferSpec) String() string { @@ -2635,7 +2605,7 @@ func (*TransferSpec) ProtoMessage() {} func (x *TransferSpec) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2913,11 +2883,9 @@ type MetadataOptions struct { func (x *MetadataOptions) Reset() { *x = MetadataOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MetadataOptions) String() string { @@ -2928,7 +2896,7 @@ func (*MetadataOptions) ProtoMessage() {} func (x *MetadataOptions) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +2989,9 @@ type TransferManifest struct { func (x *TransferManifest) Reset() { *x = TransferManifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferManifest) String() string { @@ -3036,7 +3002,7 @@ func (*TransferManifest) ProtoMessage() {} func (x *TransferManifest) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3134,11 +3100,9 @@ type Schedule struct { func (x *Schedule) Reset() { *x = Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Schedule) String() string { @@ -3149,7 +3113,7 @@ func (*Schedule) ProtoMessage() {} func (x *Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3224,11 +3188,9 @@ type EventStream struct { func (x *EventStream) Reset() { *x = EventStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventStream) String() string { @@ -3239,7 +3201,7 @@ func (*EventStream) ProtoMessage() {} func (x *EventStream) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3350,11 +3312,9 @@ type TransferJob struct { func (x *TransferJob) Reset() { *x = TransferJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferJob) String() string { @@ -3365,7 +3325,7 @@ func (*TransferJob) ProtoMessage() {} func (x *TransferJob) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3486,11 +3446,9 @@ type ErrorLogEntry struct { func (x *ErrorLogEntry) Reset() { *x = ErrorLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorLogEntry) String() string { @@ -3501,7 +3459,7 @@ func (*ErrorLogEntry) ProtoMessage() {} func (x *ErrorLogEntry) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3550,11 +3508,9 @@ type ErrorSummary struct { func (x *ErrorSummary) Reset() { *x = ErrorSummary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorSummary) String() string { @@ -3565,7 +3521,7 @@ func (*ErrorSummary) ProtoMessage() {} func (x *ErrorSummary) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3673,11 +3629,9 @@ type TransferCounters struct { func (x *TransferCounters) Reset() { *x = TransferCounters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferCounters) String() string { @@ -3688,7 +3642,7 @@ func (*TransferCounters) ProtoMessage() {} func (x *TransferCounters) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3891,11 +3845,9 @@ type NotificationConfig struct { func (x *NotificationConfig) Reset() { *x = NotificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotificationConfig) String() string { @@ -3906,7 +3858,7 @@ func (*NotificationConfig) ProtoMessage() {} func (x *NotificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3969,11 +3921,9 @@ type LoggingConfig struct { func (x *LoggingConfig) Reset() { *x = LoggingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingConfig) String() string { @@ -3984,7 +3934,7 @@ func (*LoggingConfig) ProtoMessage() {} func (x *LoggingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4052,11 +4002,9 @@ type TransferOperation struct { func (x *TransferOperation) Reset() { *x = TransferOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransferOperation) String() string { @@ -4067,7 +4015,7 @@ func (*TransferOperation) ProtoMessage() {} func (x *TransferOperation) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4172,11 +4120,9 @@ type AgentPool_BandwidthLimit struct { func (x *AgentPool_BandwidthLimit) Reset() { *x = AgentPool_BandwidthLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AgentPool_BandwidthLimit) String() string { @@ -4187,7 +4133,7 @@ func (*AgentPool_BandwidthLimit) ProtoMessage() {} func (x *AgentPool_BandwidthLimit) ProtoReflect() protoreflect.Message { mi := &file_google_storagetransfer_v1_transfer_types_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5124,332 +5070,6 @@ func file_google_storagetransfer_v1_transfer_types_proto_init() { if File_google_storagetransfer_v1_transfer_types_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GoogleServiceAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AwsAccessKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AzureCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ObjectConditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GcsData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AwsS3Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AzureBlobStorageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*HttpData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PosixFilesystem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*HdfsData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AwsS3CompatibleData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*S3CompatibleMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AgentPool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*TransferOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TransferSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*MetadataOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TransferManifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*EventStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TransferJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ErrorLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ErrorSummary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*TransferCounters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*NotificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*LoggingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*TransferOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_storagetransfer_v1_transfer_types_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AgentPool_BandwidthLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_storagetransfer_v1_transfer_types_proto_msgTypes[5].OneofWrappers = []any{ (*AwsS3Data_ManagedPrivateNetwork)(nil), } diff --git a/streetview/publish/apiv1/helpers.go b/streetview/publish/apiv1/helpers.go index 0a93d78a8a23..4d02f53cef9c 100755 --- a/streetview/publish/apiv1/helpers.go +++ b/streetview/publish/apiv1/helpers.go @@ -18,10 +18,20 @@ package publish import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "streetviewpublish.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/streetviewpublish", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/streetview/publish/apiv1/publishpb/resources.pb.go b/streetview/publish/apiv1/publishpb/resources.pb.go index 82efc69010c2..0bc90a9e46d0 100755 --- a/streetview/publish/apiv1/publishpb/resources.pb.go +++ b/streetview/publish/apiv1/publishpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/streetview/publish/v1/resources.proto @@ -457,11 +457,9 @@ type UploadRef struct { func (x *UploadRef) Reset() { *x = UploadRef{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadRef) String() string { @@ -472,7 +470,7 @@ func (*UploadRef) ProtoMessage() {} func (x *UploadRef) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -526,11 +524,9 @@ type PhotoId struct { func (x *PhotoId) Reset() { *x = PhotoId{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhotoId) String() string { @@ -541,7 +537,7 @@ func (*PhotoId) ProtoMessage() {} func (x *PhotoId) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -581,11 +577,9 @@ type Level struct { func (x *Level) Reset() { *x = Level{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Level) String() string { @@ -596,7 +590,7 @@ func (*Level) ProtoMessage() {} func (x *Level) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,11 +665,9 @@ type Pose struct { func (x *Pose) Reset() { *x = Pose{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pose) String() string { @@ -686,7 +678,7 @@ func (*Pose) ProtoMessage() {} func (x *Pose) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +768,9 @@ type Imu struct { func (x *Imu) Reset() { *x = Imu{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Imu) String() string { @@ -791,7 +781,7 @@ func (*Imu) ProtoMessage() {} func (x *Imu) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,11 +835,9 @@ type Place struct { func (x *Place) Reset() { *x = Place{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Place) String() string { @@ -860,7 +848,7 @@ func (*Place) ProtoMessage() {} func (x *Place) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -909,11 +897,9 @@ type Connection struct { func (x *Connection) Reset() { *x = Connection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connection) String() string { @@ -924,7 +910,7 @@ func (*Connection) ProtoMessage() {} func (x *Connection) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +979,9 @@ type Photo struct { func (x *Photo) Reset() { *x = Photo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Photo) String() string { @@ -1008,7 +992,7 @@ func (*Photo) ProtoMessage() {} func (x *Photo) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1178,11 +1162,9 @@ type PhotoSequence struct { func (x *PhotoSequence) Reset() { *x = PhotoSequence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhotoSequence) String() string { @@ -1193,7 +1175,7 @@ func (*PhotoSequence) ProtoMessage() {} func (x *PhotoSequence) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1327,11 +1309,9 @@ type LatLngBounds struct { func (x *LatLngBounds) Reset() { *x = LatLngBounds{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatLngBounds) String() string { @@ -1342,7 +1322,7 @@ func (*LatLngBounds) ProtoMessage() {} func (x *LatLngBounds) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1395,11 +1375,9 @@ type ProcessingFailureDetails struct { func (x *ProcessingFailureDetails) Reset() { *x = ProcessingFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessingFailureDetails) String() string { @@ -1410,7 +1388,7 @@ func (*ProcessingFailureDetails) ProtoMessage() {} func (x *ProcessingFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1518,11 +1496,9 @@ type InsufficientGpsFailureDetails struct { func (x *InsufficientGpsFailureDetails) Reset() { *x = InsufficientGpsFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InsufficientGpsFailureDetails) String() string { @@ -1533,7 +1509,7 @@ func (*InsufficientGpsFailureDetails) ProtoMessage() {} func (x *InsufficientGpsFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1547,9 @@ type GpsDataGapFailureDetails struct { func (x *GpsDataGapFailureDetails) Reset() { *x = GpsDataGapFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GpsDataGapFailureDetails) String() string { @@ -1586,7 +1560,7 @@ func (*GpsDataGapFailureDetails) ProtoMessage() {} func (x *GpsDataGapFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1631,11 +1605,9 @@ type ImuDataGapFailureDetails struct { func (x *ImuDataGapFailureDetails) Reset() { *x = ImuDataGapFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImuDataGapFailureDetails) String() string { @@ -1646,7 +1618,7 @@ func (*ImuDataGapFailureDetails) ProtoMessage() {} func (x *ImuDataGapFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1689,11 +1661,9 @@ type NotOutdoorsFailureDetails struct { func (x *NotOutdoorsFailureDetails) Reset() { *x = NotOutdoorsFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NotOutdoorsFailureDetails) String() string { @@ -1704,7 +1674,7 @@ func (*NotOutdoorsFailureDetails) ProtoMessage() {} func (x *NotOutdoorsFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1744,11 +1714,9 @@ type NoOverlapGpsFailureDetails struct { func (x *NoOverlapGpsFailureDetails) Reset() { *x = NoOverlapGpsFailureDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NoOverlapGpsFailureDetails) String() string { @@ -1759,7 +1727,7 @@ func (*NoOverlapGpsFailureDetails) ProtoMessage() {} func (x *NoOverlapGpsFailureDetails) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1820,11 +1788,9 @@ type Imu_Measurement3D struct { func (x *Imu_Measurement3D) Reset() { *x = Imu_Measurement3D{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Imu_Measurement3D) String() string { @@ -1835,7 +1801,7 @@ func (*Imu_Measurement3D) ProtoMessage() {} func (x *Imu_Measurement3D) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2364,212 +2330,6 @@ func file_google_streetview_publish_v1_resources_proto_init() { if File_google_streetview_publish_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_streetview_publish_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UploadRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PhotoId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Level); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Pose); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Imu); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Place); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Connection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Photo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PhotoSequence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LatLngBounds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ProcessingFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InsufficientGpsFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GpsDataGapFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImuDataGapFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*NotOutdoorsFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*NoOverlapGpsFailureDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Imu_Measurement3D); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_streetview_publish_v1_resources_proto_msgTypes[0].OneofWrappers = []any{ (*UploadRef_UploadUrl)(nil), } diff --git a/streetview/publish/apiv1/publishpb/rpcmessages.pb.go b/streetview/publish/apiv1/publishpb/rpcmessages.pb.go index 9e8b5e756d9e..b16214a9f97d 100755 --- a/streetview/publish/apiv1/publishpb/rpcmessages.pb.go +++ b/streetview/publish/apiv1/publishpb/rpcmessages.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/streetview/publish/v1/rpcmessages.proto @@ -156,11 +156,9 @@ type CreatePhotoRequest struct { func (x *CreatePhotoRequest) Reset() { *x = CreatePhotoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhotoRequest) String() string { @@ -171,7 +169,7 @@ func (*CreatePhotoRequest) ProtoMessage() {} func (x *CreatePhotoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +220,9 @@ type GetPhotoRequest struct { func (x *GetPhotoRequest) Reset() { *x = GetPhotoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhotoRequest) String() string { @@ -237,7 +233,7 @@ func (*GetPhotoRequest) ProtoMessage() {} func (x *GetPhotoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,11 +299,9 @@ type BatchGetPhotosRequest struct { func (x *BatchGetPhotosRequest) Reset() { *x = BatchGetPhotosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetPhotosRequest) String() string { @@ -318,7 +312,7 @@ func (*BatchGetPhotosRequest) ProtoMessage() {} func (x *BatchGetPhotosRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +363,9 @@ type BatchGetPhotosResponse struct { func (x *BatchGetPhotosResponse) Reset() { *x = BatchGetPhotosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchGetPhotosResponse) String() string { @@ -384,7 +376,7 @@ func (*BatchGetPhotosResponse) ProtoMessage() {} func (x *BatchGetPhotosResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -427,11 +419,9 @@ type PhotoResponse struct { func (x *PhotoResponse) Reset() { *x = PhotoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PhotoResponse) String() string { @@ -442,7 +432,7 @@ func (*PhotoResponse) ProtoMessage() {} func (x *PhotoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,11 +515,9 @@ type ListPhotosRequest struct { func (x *ListPhotosRequest) Reset() { *x = ListPhotosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhotosRequest) String() string { @@ -540,7 +528,7 @@ func (*ListPhotosRequest) ProtoMessage() {} func (x *ListPhotosRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +595,9 @@ type ListPhotosResponse struct { func (x *ListPhotosResponse) Reset() { *x = ListPhotosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhotosResponse) String() string { @@ -622,7 +608,7 @@ func (*ListPhotosResponse) ProtoMessage() {} func (x *ListPhotosResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +678,9 @@ type UpdatePhotoRequest struct { func (x *UpdatePhotoRequest) Reset() { *x = UpdatePhotoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePhotoRequest) String() string { @@ -707,7 +691,7 @@ func (*UpdatePhotoRequest) ProtoMessage() {} func (x *UpdatePhotoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +734,9 @@ type BatchUpdatePhotosRequest struct { func (x *BatchUpdatePhotosRequest) Reset() { *x = BatchUpdatePhotosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdatePhotosRequest) String() string { @@ -765,7 +747,7 @@ func (*BatchUpdatePhotosRequest) ProtoMessage() {} func (x *BatchUpdatePhotosRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +784,9 @@ type BatchUpdatePhotosResponse struct { func (x *BatchUpdatePhotosResponse) Reset() { *x = BatchUpdatePhotosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdatePhotosResponse) String() string { @@ -817,7 +797,7 @@ func (*BatchUpdatePhotosResponse) ProtoMessage() {} func (x *BatchUpdatePhotosResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -851,11 +831,9 @@ type DeletePhotoRequest struct { func (x *DeletePhotoRequest) Reset() { *x = DeletePhotoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhotoRequest) String() string { @@ -866,7 +844,7 @@ func (*DeletePhotoRequest) ProtoMessage() {} func (x *DeletePhotoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,11 +880,9 @@ type BatchDeletePhotosRequest struct { func (x *BatchDeletePhotosRequest) Reset() { *x = BatchDeletePhotosRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePhotosRequest) String() string { @@ -917,7 +893,7 @@ func (*BatchDeletePhotosRequest) ProtoMessage() {} func (x *BatchDeletePhotosRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,11 +932,9 @@ type CreatePhotoSequenceRequest struct { func (x *CreatePhotoSequenceRequest) Reset() { *x = CreatePhotoSequenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePhotoSequenceRequest) String() string { @@ -971,7 +945,7 @@ func (*CreatePhotoSequenceRequest) ProtoMessage() {} func (x *CreatePhotoSequenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1036,11 +1010,9 @@ type GetPhotoSequenceRequest struct { func (x *GetPhotoSequenceRequest) Reset() { *x = GetPhotoSequenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPhotoSequenceRequest) String() string { @@ -1051,7 +1023,7 @@ func (*GetPhotoSequenceRequest) ProtoMessage() {} func (x *GetPhotoSequenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1102,11 +1074,9 @@ type DeletePhotoSequenceRequest struct { func (x *DeletePhotoSequenceRequest) Reset() { *x = DeletePhotoSequenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePhotoSequenceRequest) String() string { @@ -1117,7 +1087,7 @@ func (*DeletePhotoSequenceRequest) ProtoMessage() {} func (x *DeletePhotoSequenceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1153,11 +1123,9 @@ type BatchDeletePhotosResponse struct { func (x *BatchDeletePhotosResponse) Reset() { *x = BatchDeletePhotosResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeletePhotosResponse) String() string { @@ -1168,7 +1136,7 @@ func (*BatchDeletePhotosResponse) ProtoMessage() {} func (x *BatchDeletePhotosResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1200,9 @@ type ListPhotoSequencesRequest struct { func (x *ListPhotoSequencesRequest) Reset() { *x = ListPhotoSequencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhotoSequencesRequest) String() string { @@ -1247,7 +1213,7 @@ func (*ListPhotoSequencesRequest) ProtoMessage() {} func (x *ListPhotoSequencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1281,9 @@ type ListPhotoSequencesResponse struct { func (x *ListPhotoSequencesResponse) Reset() { *x = ListPhotoSequencesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPhotoSequencesResponse) String() string { @@ -1330,7 +1294,7 @@ func (*ListPhotoSequencesResponse) ProtoMessage() {} func (x *ListPhotoSequencesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1613,224 +1577,6 @@ func file_google_streetview_publish_v1_rpcmessages_proto_init() { return } file_google_streetview_publish_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhotoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetPhotoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetPhotosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BatchGetPhotosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PhotoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListPhotosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListPhotosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePhotoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdatePhotosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdatePhotosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhotoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePhotosRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreatePhotoSequenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetPhotoSequenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeletePhotoSequenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeletePhotosResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListPhotoSequencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_streetview_publish_v1_rpcmessages_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListPhotoSequencesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/streetview/publish/apiv1/publishpb/streetview_publish.pb.go b/streetview/publish/apiv1/publishpb/streetview_publish.pb.go index fd3c44d752d0..94554f494842 100755 --- a/streetview/publish/apiv1/publishpb/streetview_publish.pb.go +++ b/streetview/publish/apiv1/publishpb/streetview_publish.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/streetview/publish/v1/streetview_publish.proto diff --git a/streetview/publish/apiv1/street_view_publish_client.go b/streetview/publish/apiv1/street_view_publish_client.go index 3e12ec397d9c..604eda55de4f 100755 --- a/streetview/publish/apiv1/street_view_publish_client.go +++ b/streetview/publish/apiv1/street_view_publish_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" publishpb "cloud.google.com/go/streetview/publish/apiv1/publishpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -645,6 +644,8 @@ type streetViewPublishGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewStreetViewPublishClient creates a new street view publish service client based on gRPC. @@ -671,6 +672,7 @@ func NewStreetViewPublishClient(ctx context.Context, opts ...option.ClientOption connPool: connPool, streetViewPublishClient: publishpb.NewStreetViewPublishServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -733,6 +735,8 @@ type streetViewPublishRESTClient struct { // Points back to the CallOptions field of the containing StreetViewPublishClient CallOptions **StreetViewPublishCallOptions + + logger *slog.Logger } // NewStreetViewPublishRESTClient creates a new street view publish service rest client. @@ -750,6 +754,7 @@ func NewStreetViewPublishRESTClient(ctx context.Context, opts ...option.ClientOp endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -809,7 +814,7 @@ func (c *streetViewPublishGRPCClient) StartUpload(ctx context.Context, req *empt var resp *publishpb.UploadRef err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.StartUpload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.StartUpload, req, settings.GRPC, c.logger, "StartUpload") return err }, opts...) if err != nil { @@ -824,7 +829,7 @@ func (c *streetViewPublishGRPCClient) CreatePhoto(ctx context.Context, req *publ var resp *publishpb.Photo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.CreatePhoto(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.CreatePhoto, req, settings.GRPC, c.logger, "CreatePhoto") return err }, opts...) if err != nil { @@ -842,7 +847,7 @@ func (c *streetViewPublishGRPCClient) GetPhoto(ctx context.Context, req *publish var resp *publishpb.Photo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.GetPhoto(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.GetPhoto, req, settings.GRPC, c.logger, "GetPhoto") return err }, opts...) if err != nil { @@ -857,7 +862,7 @@ func (c *streetViewPublishGRPCClient) BatchGetPhotos(ctx context.Context, req *p var resp *publishpb.BatchGetPhotosResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.BatchGetPhotos(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.BatchGetPhotos, req, settings.GRPC, c.logger, "BatchGetPhotos") return err }, opts...) if err != nil { @@ -883,7 +888,7 @@ func (c *streetViewPublishGRPCClient) ListPhotos(ctx context.Context, req *publi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.ListPhotos(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.ListPhotos, req, settings.GRPC, c.logger, "ListPhotos") return err }, opts...) if err != nil { @@ -918,7 +923,7 @@ func (c *streetViewPublishGRPCClient) UpdatePhoto(ctx context.Context, req *publ var resp *publishpb.Photo err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.UpdatePhoto(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.UpdatePhoto, req, settings.GRPC, c.logger, "UpdatePhoto") return err }, opts...) if err != nil { @@ -933,7 +938,7 @@ func (c *streetViewPublishGRPCClient) BatchUpdatePhotos(ctx context.Context, req var resp *publishpb.BatchUpdatePhotosResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.BatchUpdatePhotos(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.BatchUpdatePhotos, req, settings.GRPC, c.logger, "BatchUpdatePhotos") return err }, opts...) if err != nil { @@ -950,7 +955,7 @@ func (c *streetViewPublishGRPCClient) DeletePhoto(ctx context.Context, req *publ opts = append((*c.CallOptions).DeletePhoto[0:len((*c.CallOptions).DeletePhoto):len((*c.CallOptions).DeletePhoto)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.streetViewPublishClient.DeletePhoto(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.streetViewPublishClient.DeletePhoto, req, settings.GRPC, c.logger, "DeletePhoto") return err }, opts...) return err @@ -962,7 +967,7 @@ func (c *streetViewPublishGRPCClient) BatchDeletePhotos(ctx context.Context, req var resp *publishpb.BatchDeletePhotosResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.BatchDeletePhotos(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.BatchDeletePhotos, req, settings.GRPC, c.logger, "BatchDeletePhotos") return err }, opts...) if err != nil { @@ -977,7 +982,7 @@ func (c *streetViewPublishGRPCClient) StartPhotoSequenceUpload(ctx context.Conte var resp *publishpb.UploadRef err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.StartPhotoSequenceUpload(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.StartPhotoSequenceUpload, req, settings.GRPC, c.logger, "StartPhotoSequenceUpload") return err }, opts...) if err != nil { @@ -992,7 +997,7 @@ func (c *streetViewPublishGRPCClient) CreatePhotoSequence(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.CreatePhotoSequence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.CreatePhotoSequence, req, settings.GRPC, c.logger, "CreatePhotoSequence") return err }, opts...) if err != nil { @@ -1012,7 +1017,7 @@ func (c *streetViewPublishGRPCClient) GetPhotoSequence(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.GetPhotoSequence(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.GetPhotoSequence, req, settings.GRPC, c.logger, "GetPhotoSequence") return err }, opts...) if err != nil { @@ -1040,7 +1045,7 @@ func (c *streetViewPublishGRPCClient) ListPhotoSequences(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streetViewPublishClient.ListPhotoSequences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streetViewPublishClient.ListPhotoSequences, req, settings.GRPC, c.logger, "ListPhotoSequences") return err }, opts...) if err != nil { @@ -1074,7 +1079,7 @@ func (c *streetViewPublishGRPCClient) DeletePhotoSequence(ctx context.Context, r opts = append((*c.CallOptions).DeletePhotoSequence[0:len((*c.CallOptions).DeletePhotoSequence):len((*c.CallOptions).DeletePhotoSequence)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.streetViewPublishClient.DeletePhotoSequence(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.streetViewPublishClient.DeletePhotoSequence, req, settings.GRPC, c.logger, "DeletePhotoSequence") return err }, opts...) return err @@ -1136,17 +1141,7 @@ func (c *streetViewPublishRESTClient) StartUpload(ctx context.Context, req *empt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartUpload") if err != nil { return err } @@ -1221,17 +1216,7 @@ func (c *streetViewPublishRESTClient) CreatePhoto(ctx context.Context, req *publ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhoto") if err != nil { return err } @@ -1299,17 +1284,7 @@ func (c *streetViewPublishRESTClient) GetPhoto(ctx context.Context, req *publish httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhoto") if err != nil { return err } @@ -1380,17 +1355,7 @@ func (c *streetViewPublishRESTClient) BatchGetPhotos(ctx context.Context, req *p httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "BatchGetPhotos") if err != nil { return err } @@ -1463,21 +1428,10 @@ func (c *streetViewPublishRESTClient) ListPhotos(ctx context.Context, req *publi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhotos") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1576,17 +1530,7 @@ func (c *streetViewPublishRESTClient) UpdatePhoto(ctx context.Context, req *publ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePhoto") if err != nil { return err } @@ -1671,17 +1615,7 @@ func (c *streetViewPublishRESTClient) BatchUpdatePhotos(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdatePhotos") if err != nil { return err } @@ -1736,15 +1670,8 @@ func (c *streetViewPublishRESTClient) DeletePhoto(ctx context.Context, req *publ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhoto") + return err }, opts...) } @@ -1799,17 +1726,7 @@ func (c *streetViewPublishRESTClient) BatchDeletePhotos(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeletePhotos") if err != nil { return err } @@ -1871,17 +1788,7 @@ func (c *streetViewPublishRESTClient) StartPhotoSequenceUpload(ctx context.Conte httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartPhotoSequenceUpload") if err != nil { return err } @@ -1953,21 +1860,10 @@ func (c *streetViewPublishRESTClient) CreatePhotoSequence(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePhotoSequence") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2047,21 +1943,10 @@ func (c *streetViewPublishRESTClient) GetPhotoSequence(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPhotoSequence") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2128,21 +2013,10 @@ func (c *streetViewPublishRESTClient) ListPhotoSequences(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPhotoSequences") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2214,15 +2088,8 @@ func (c *streetViewPublishRESTClient) DeletePhotoSequence(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePhotoSequence") + return err }, opts...) } diff --git a/streetview/publish/apiv1/street_view_publish_client_example_go123_test.go b/streetview/publish/apiv1/street_view_publish_client_example_go123_test.go index d87e8d000118..90a12c91ad79 100644 --- a/streetview/publish/apiv1/street_view_publish_client_example_go123_test.go +++ b/streetview/publish/apiv1/street_view_publish_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleStreetViewPublishClient_ListPhotoSequences_all() { } for resp, err := range c.ListPhotoSequences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleStreetViewPublishClient_ListPhotos_all() { } for resp, err := range c.ListPhotos(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/support/apiv2/case_attachment_client.go b/support/apiv2/case_attachment_client.go index 0d3532802cbc..27531d7d1323 100755 --- a/support/apiv2/case_attachment_client.go +++ b/support/apiv2/case_attachment_client.go @@ -19,7 +19,7 @@ package support import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( supportpb "cloud.google.com/go/support/apiv2/supportpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -157,6 +156,8 @@ type caseAttachmentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCaseAttachmentClient creates a new case attachment service client based on gRPC. @@ -183,6 +184,7 @@ func NewCaseAttachmentClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, caseAttachmentClient: supportpb.NewCaseAttachmentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -229,6 +231,8 @@ type caseAttachmentRESTClient struct { // Points back to the CallOptions field of the containing CaseAttachmentClient CallOptions **CaseAttachmentCallOptions + + logger *slog.Logger } // NewCaseAttachmentRESTClient creates a new case attachment service rest client. @@ -246,6 +250,7 @@ func NewCaseAttachmentRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -309,7 +314,7 @@ func (c *caseAttachmentGRPCClient) ListAttachments(ctx context.Context, req *sup } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseAttachmentClient.ListAttachments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseAttachmentClient.ListAttachments, req, settings.GRPC, c.logger, "ListAttachments") return err }, opts...) if err != nil { @@ -380,21 +385,10 @@ func (c *caseAttachmentRESTClient) ListAttachments(ctx context.Context, req *sup } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAttachments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/support/apiv2/case_attachment_client_example_go123_test.go b/support/apiv2/case_attachment_client_example_go123_test.go index 0d92203c7423..81114ab9875d 100644 --- a/support/apiv2/case_attachment_client_example_go123_test.go +++ b/support/apiv2/case_attachment_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCaseAttachmentClient_ListAttachments_all() { } for resp, err := range c.ListAttachments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/support/apiv2/case_client.go b/support/apiv2/case_client.go index 69e48746fb73..c42d4fe382de 100755 --- a/support/apiv2/case_client.go +++ b/support/apiv2/case_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( supportpb "cloud.google.com/go/support/apiv2/supportpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -316,6 +315,8 @@ type caseGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCaseClient creates a new case service client based on gRPC. @@ -342,6 +343,7 @@ func NewCaseClient(ctx context.Context, opts ...option.ClientOption) (*CaseClien connPool: connPool, caseClient: supportpb.NewCaseServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -388,6 +390,8 @@ type caseRESTClient struct { // Points back to the CallOptions field of the containing CaseClient CallOptions **CaseCallOptions + + logger *slog.Logger } // NewCaseRESTClient creates a new case service rest client. @@ -405,6 +409,7 @@ func NewCaseRESTClient(ctx context.Context, opts ...option.ClientOption) (*CaseC endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -457,7 +462,7 @@ func (c *caseGRPCClient) GetCase(ctx context.Context, req *supportpb.GetCaseRequ var resp *supportpb.Case err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.GetCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.GetCase, req, settings.GRPC, c.logger, "GetCase") return err }, opts...) if err != nil { @@ -486,7 +491,7 @@ func (c *caseGRPCClient) ListCases(ctx context.Context, req *supportpb.ListCases } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.ListCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.ListCases, req, settings.GRPC, c.logger, "ListCases") return err }, opts...) if err != nil { @@ -532,7 +537,7 @@ func (c *caseGRPCClient) SearchCases(ctx context.Context, req *supportpb.SearchC } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.SearchCases(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.SearchCases, req, settings.GRPC, c.logger, "SearchCases") return err }, opts...) if err != nil { @@ -567,7 +572,7 @@ func (c *caseGRPCClient) CreateCase(ctx context.Context, req *supportpb.CreateCa var resp *supportpb.Case err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.CreateCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.CreateCase, req, settings.GRPC, c.logger, "CreateCase") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *caseGRPCClient) UpdateCase(ctx context.Context, req *supportpb.UpdateCa var resp *supportpb.Case err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.UpdateCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.UpdateCase, req, settings.GRPC, c.logger, "UpdateCase") return err }, opts...) if err != nil { @@ -603,7 +608,7 @@ func (c *caseGRPCClient) EscalateCase(ctx context.Context, req *supportpb.Escala var resp *supportpb.Case err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.EscalateCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.EscalateCase, req, settings.GRPC, c.logger, "EscalateCase") return err }, opts...) if err != nil { @@ -621,7 +626,7 @@ func (c *caseGRPCClient) CloseCase(ctx context.Context, req *supportpb.CloseCase var resp *supportpb.Case err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.CloseCase(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.CloseCase, req, settings.GRPC, c.logger, "CloseCase") return err }, opts...) if err != nil { @@ -647,7 +652,7 @@ func (c *caseGRPCClient) SearchCaseClassifications(ctx context.Context, req *sup } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.caseClient.SearchCaseClassifications(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.caseClient.SearchCaseClassifications, req, settings.GRPC, c.logger, "SearchCaseClassifications") return err }, opts...) if err != nil { @@ -706,17 +711,7 @@ func (c *caseRESTClient) GetCase(ctx context.Context, req *supportpb.GetCaseRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCase") if err != nil { return err } @@ -786,21 +781,10 @@ func (c *caseRESTClient) ListCases(ctx context.Context, req *supportpb.ListCases } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -878,21 +862,10 @@ func (c *caseRESTClient) SearchCases(ctx context.Context, req *supportpb.SearchC } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchCases") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -964,17 +937,7 @@ func (c *caseRESTClient) CreateCase(ctx context.Context, req *supportpb.CreateCa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCase") if err != nil { return err } @@ -1038,17 +1001,7 @@ func (c *caseRESTClient) UpdateCase(ctx context.Context, req *supportpb.UpdateCa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCase") if err != nil { return err } @@ -1110,17 +1063,7 @@ func (c *caseRESTClient) EscalateCase(ctx context.Context, req *supportpb.Escala httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "EscalateCase") if err != nil { return err } @@ -1176,17 +1119,7 @@ func (c *caseRESTClient) CloseCase(ctx context.Context, req *supportpb.CloseCase httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CloseCase") if err != nil { return err } @@ -1254,21 +1187,10 @@ func (c *caseRESTClient) SearchCaseClassifications(ctx context.Context, req *sup } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchCaseClassifications") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/support/apiv2/case_client_example_go123_test.go b/support/apiv2/case_client_example_go123_test.go index f59d9ffdf98b..81a9af77dbe8 100644 --- a/support/apiv2/case_client_example_go123_test.go +++ b/support/apiv2/case_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCaseClient_ListCases_all() { } for resp, err := range c.ListCases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleCaseClient_SearchCaseClassifications_all() { } for resp, err := range c.SearchCaseClassifications(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleCaseClient_SearchCases_all() { } for resp, err := range c.SearchCases(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/support/apiv2/comment_client.go b/support/apiv2/comment_client.go index 0a32806946fa..dd9e41e84780 100755 --- a/support/apiv2/comment_client.go +++ b/support/apiv2/comment_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( supportpb "cloud.google.com/go/support/apiv2/supportpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -172,6 +171,8 @@ type commentGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCommentClient creates a new comment service client based on gRPC. @@ -198,6 +199,7 @@ func NewCommentClient(ctx context.Context, opts ...option.ClientOption) (*Commen connPool: connPool, commentClient: supportpb.NewCommentServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -244,6 +246,8 @@ type commentRESTClient struct { // Points back to the CallOptions field of the containing CommentClient CallOptions **CommentCallOptions + + logger *slog.Logger } // NewCommentRESTClient creates a new comment service rest client. @@ -261,6 +265,7 @@ func NewCommentRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -324,7 +329,7 @@ func (c *commentGRPCClient) ListComments(ctx context.Context, req *supportpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.commentClient.ListComments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.commentClient.ListComments, req, settings.GRPC, c.logger, "ListComments") return err }, opts...) if err != nil { @@ -359,7 +364,7 @@ func (c *commentGRPCClient) CreateComment(ctx context.Context, req *supportpb.Cr var resp *supportpb.Comment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.commentClient.CreateComment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.commentClient.CreateComment, req, settings.GRPC, c.logger, "CreateComment") return err }, opts...) if err != nil { @@ -413,21 +418,10 @@ func (c *commentRESTClient) ListComments(ctx context.Context, req *supportpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListComments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -498,17 +492,7 @@ func (c *commentRESTClient) CreateComment(ctx context.Context, req *supportpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateComment") if err != nil { return err } diff --git a/support/apiv2/comment_client_example_go123_test.go b/support/apiv2/comment_client_example_go123_test.go index 7e12a351af1b..d12a0014a3e4 100644 --- a/support/apiv2/comment_client_example_go123_test.go +++ b/support/apiv2/comment_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCommentClient_ListComments_all() { } for resp, err := range c.ListComments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/support/apiv2/helpers.go b/support/apiv2/helpers.go index eaa936bccd8c..535610391ace 100755 --- a/support/apiv2/helpers.go +++ b/support/apiv2/helpers.go @@ -18,10 +18,20 @@ package support import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudsupport.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/support/apiv2/supportpb/actor.pb.go b/support/apiv2/supportpb/actor.pb.go index fc7f46ecfc7e..fdf4da60cc1d 100755 --- a/support/apiv2/supportpb/actor.pb.go +++ b/support/apiv2/supportpb/actor.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/actor.proto @@ -60,11 +60,9 @@ type Actor struct { func (x *Actor) Reset() { *x = Actor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_actor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_actor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Actor) String() string { @@ -75,7 +73,7 @@ func (*Actor) ProtoMessage() {} func (x *Actor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_actor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,20 +168,6 @@ func file_google_cloud_support_v2_actor_proto_init() { if File_google_cloud_support_v2_actor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_actor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Actor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/attachment.pb.go b/support/apiv2/supportpb/attachment.pb.go index ca7cc9312cc6..318f7347a1e9 100755 --- a/support/apiv2/supportpb/attachment.pb.go +++ b/support/apiv2/supportpb/attachment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/attachment.proto @@ -60,11 +60,9 @@ type Attachment struct { func (x *Attachment) Reset() { *x = Attachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_attachment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_attachment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Attachment) String() string { @@ -75,7 +73,7 @@ func (*Attachment) ProtoMessage() {} func (x *Attachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_attachment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,20 +222,6 @@ func file_google_cloud_support_v2_attachment_proto_init() { return } file_google_cloud_support_v2_actor_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_attachment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Attachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/attachment_service.pb.go b/support/apiv2/supportpb/attachment_service.pb.go index 21eea8c07cda..8080c7fd4609 100755 --- a/support/apiv2/supportpb/attachment_service.pb.go +++ b/support/apiv2/supportpb/attachment_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/attachment_service.proto @@ -60,11 +60,9 @@ type ListAttachmentsRequest struct { func (x *ListAttachmentsRequest) Reset() { *x = ListAttachmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachmentsRequest) String() string { @@ -75,7 +73,7 @@ func (*ListAttachmentsRequest) ProtoMessage() {} func (x *ListAttachmentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ListAttachmentsResponse struct { func (x *ListAttachmentsResponse) Reset() { *x = ListAttachmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAttachmentsResponse) String() string { @@ -142,7 +138,7 @@ func (*ListAttachmentsResponse) ProtoMessage() {} func (x *ListAttachmentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_attachment_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,32 +274,6 @@ func file_google_cloud_support_v2_attachment_service_proto_init() { return } file_google_cloud_support_v2_attachment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_attachment_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_attachment_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListAttachmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/case.pb.go b/support/apiv2/supportpb/case.pb.go index e18fbdc74de2..9d7ce0e96137 100755 --- a/support/apiv2/supportpb/case.pb.go +++ b/support/apiv2/supportpb/case.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/case.proto @@ -225,11 +225,9 @@ type Case struct { func (x *Case) Reset() { *x = Case{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Case) String() string { @@ -240,7 +238,7 @@ func (*Case) ProtoMessage() {} func (x *Case) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -377,11 +375,9 @@ type CaseClassification struct { func (x *CaseClassification) Reset() { *x = CaseClassification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CaseClassification) String() string { @@ -392,7 +388,7 @@ func (*CaseClassification) ProtoMessage() {} func (x *CaseClassification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -562,32 +558,6 @@ func file_google_cloud_support_v2_case_proto_init() { return } file_google_cloud_support_v2_actor_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_case_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Case); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CaseClassification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/case_service.pb.go b/support/apiv2/supportpb/case_service.pb.go index adba6f984489..c9490853c948 100755 --- a/support/apiv2/supportpb/case_service.pb.go +++ b/support/apiv2/supportpb/case_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/case_service.proto @@ -53,11 +53,9 @@ type GetCaseRequest struct { func (x *GetCaseRequest) Reset() { *x = GetCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCaseRequest) String() string { @@ -68,7 +66,7 @@ func (*GetCaseRequest) ProtoMessage() {} func (x *GetCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type CreateCaseRequest struct { func (x *CreateCaseRequest) Reset() { *x = CreateCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCaseRequest) String() string { @@ -120,7 +116,7 @@ func (*CreateCaseRequest) ProtoMessage() {} func (x *CreateCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,11 +180,9 @@ type ListCasesRequest struct { func (x *ListCasesRequest) Reset() { *x = ListCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCasesRequest) String() string { @@ -199,7 +193,7 @@ func (*ListCasesRequest) ProtoMessage() {} func (x *ListCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,11 +253,9 @@ type ListCasesResponse struct { func (x *ListCasesResponse) Reset() { *x = ListCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCasesResponse) String() string { @@ -274,7 +266,7 @@ func (*ListCasesResponse) ProtoMessage() {} func (x *ListCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -357,11 +349,9 @@ type SearchCasesRequest struct { func (x *SearchCasesRequest) Reset() { *x = SearchCasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCasesRequest) String() string { @@ -372,7 +362,7 @@ func (*SearchCasesRequest) ProtoMessage() {} func (x *SearchCasesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -432,11 +422,9 @@ type SearchCasesResponse struct { func (x *SearchCasesResponse) Reset() { *x = SearchCasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCasesResponse) String() string { @@ -447,7 +435,7 @@ func (*SearchCasesResponse) ProtoMessage() {} func (x *SearchCasesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -490,11 +478,9 @@ type EscalateCaseRequest struct { func (x *EscalateCaseRequest) Reset() { *x = EscalateCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EscalateCaseRequest) String() string { @@ -505,7 +491,7 @@ func (*EscalateCaseRequest) ProtoMessage() {} func (x *EscalateCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,11 +542,9 @@ type UpdateCaseRequest struct { func (x *UpdateCaseRequest) Reset() { *x = UpdateCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCaseRequest) String() string { @@ -571,7 +555,7 @@ func (*UpdateCaseRequest) ProtoMessage() {} func (x *UpdateCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +596,9 @@ type CloseCaseRequest struct { func (x *CloseCaseRequest) Reset() { *x = CloseCaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloseCaseRequest) String() string { @@ -627,7 +609,7 @@ func (*CloseCaseRequest) ProtoMessage() {} func (x *CloseCaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +650,9 @@ type SearchCaseClassificationsRequest struct { func (x *SearchCaseClassificationsRequest) Reset() { *x = SearchCaseClassificationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCaseClassificationsRequest) String() string { @@ -683,7 +663,7 @@ func (*SearchCaseClassificationsRequest) ProtoMessage() {} func (x *SearchCaseClassificationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +715,9 @@ type SearchCaseClassificationsResponse struct { func (x *SearchCaseClassificationsResponse) Reset() { *x = SearchCaseClassificationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCaseClassificationsResponse) String() string { @@ -750,7 +728,7 @@ func (*SearchCaseClassificationsResponse) ProtoMessage() {} func (x *SearchCaseClassificationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_case_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,140 +1051,6 @@ func file_google_cloud_support_v2_case_service_proto_init() { } file_google_cloud_support_v2_case_proto_init() file_google_cloud_support_v2_escalation_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_case_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchCasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchCasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EscalateCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CloseCaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SearchCaseClassificationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_case_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SearchCaseClassificationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/comment.pb.go b/support/apiv2/supportpb/comment.pb.go index afb628eb808b..8fbd008746e4 100755 --- a/support/apiv2/supportpb/comment.pb.go +++ b/support/apiv2/supportpb/comment.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/comment.proto @@ -59,11 +59,9 @@ type Comment struct { func (x *Comment) Reset() { *x = Comment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_comment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_comment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Comment) String() string { @@ -74,7 +72,7 @@ func (*Comment) ProtoMessage() {} func (x *Comment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_comment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,20 +210,6 @@ func file_google_cloud_support_v2_comment_proto_init() { return } file_google_cloud_support_v2_actor_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_comment_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Comment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/comment_service.pb.go b/support/apiv2/supportpb/comment_service.pb.go index bed1145edaba..41144ff37c11 100755 --- a/support/apiv2/supportpb/comment_service.pb.go +++ b/support/apiv2/supportpb/comment_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/comment_service.proto @@ -58,11 +58,9 @@ type ListCommentsRequest struct { func (x *ListCommentsRequest) Reset() { *x = ListCommentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCommentsRequest) String() string { @@ -73,7 +71,7 @@ func (*ListCommentsRequest) ProtoMessage() {} func (x *ListCommentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +123,9 @@ type ListCommentsResponse struct { func (x *ListCommentsResponse) Reset() { *x = ListCommentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCommentsResponse) String() string { @@ -140,7 +136,7 @@ func (*ListCommentsResponse) ProtoMessage() {} func (x *ListCommentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,11 +179,9 @@ type CreateCommentRequest struct { func (x *CreateCommentRequest) Reset() { *x = CreateCommentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCommentRequest) String() string { @@ -198,7 +192,7 @@ func (*CreateCommentRequest) ProtoMessage() {} func (x *CreateCommentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_comment_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -360,44 +354,6 @@ func file_google_cloud_support_v2_comment_service_proto_init() { return } file_google_cloud_support_v2_comment_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_comment_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListCommentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_comment_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCommentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_support_v2_comment_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CreateCommentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/support/apiv2/supportpb/escalation.pb.go b/support/apiv2/supportpb/escalation.pb.go index d845e10914a7..34e0406618ca 100755 --- a/support/apiv2/supportpb/escalation.pb.go +++ b/support/apiv2/supportpb/escalation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/support/v2/escalation.proto @@ -109,11 +109,9 @@ type Escalation struct { func (x *Escalation) Reset() { *x = Escalation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_support_v2_escalation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_support_v2_escalation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Escalation) String() string { @@ -124,7 +122,7 @@ func (*Escalation) ProtoMessage() {} func (x *Escalation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_support_v2_escalation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,20 +221,6 @@ func file_google_cloud_support_v2_escalation_proto_init() { if File_google_cloud_support_v2_escalation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_support_v2_escalation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Escalation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/company_client.go b/talent/apiv4/company_client.go index dd0ce81d4c0f..b3c67951ffba 100755 --- a/talent/apiv4/company_client.go +++ b/talent/apiv4/company_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -263,6 +262,8 @@ type companyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompanyClient creates a new company service client based on gRPC. @@ -289,6 +290,7 @@ func NewCompanyClient(ctx context.Context, opts ...option.ClientOption) (*Compan connPool: connPool, companyClient: talentpb.NewCompanyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -336,6 +338,8 @@ type companyRESTClient struct { // Points back to the CallOptions field of the containing CompanyClient CallOptions **CompanyCallOptions + + logger *slog.Logger } // NewCompanyRESTClient creates a new company service rest client. @@ -353,6 +357,7 @@ func NewCompanyRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -405,7 +410,7 @@ func (c *companyGRPCClient) CreateCompany(ctx context.Context, req *talentpb.Cre var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.CreateCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.CreateCompany, req, settings.GRPC, c.logger, "CreateCompany") return err }, opts...) if err != nil { @@ -423,7 +428,7 @@ func (c *companyGRPCClient) GetCompany(ctx context.Context, req *talentpb.GetCom var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.GetCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.GetCompany, req, settings.GRPC, c.logger, "GetCompany") return err }, opts...) if err != nil { @@ -441,7 +446,7 @@ func (c *companyGRPCClient) UpdateCompany(ctx context.Context, req *talentpb.Upd var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.UpdateCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.UpdateCompany, req, settings.GRPC, c.logger, "UpdateCompany") return err }, opts...) if err != nil { @@ -458,7 +463,7 @@ func (c *companyGRPCClient) DeleteCompany(ctx context.Context, req *talentpb.Del opts = append((*c.CallOptions).DeleteCompany[0:len((*c.CallOptions).DeleteCompany):len((*c.CallOptions).DeleteCompany)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.companyClient.DeleteCompany(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.companyClient.DeleteCompany, req, settings.GRPC, c.logger, "DeleteCompany") return err }, opts...) return err @@ -484,7 +489,7 @@ func (c *companyGRPCClient) ListCompanies(ctx context.Context, req *talentpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.ListCompanies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.ListCompanies, req, settings.GRPC, c.logger, "ListCompanies") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *companyGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -568,17 +573,7 @@ func (c *companyRESTClient) CreateCompany(ctx context.Context, req *talentpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCompany") if err != nil { return err } @@ -628,17 +623,7 @@ func (c *companyRESTClient) GetCompany(ctx context.Context, req *talentpb.GetCom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompany") if err != nil { return err } @@ -702,17 +687,7 @@ func (c *companyRESTClient) UpdateCompany(ctx context.Context, req *talentpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCompany") if err != nil { return err } @@ -760,15 +735,8 @@ func (c *companyRESTClient) DeleteCompany(ctx context.Context, req *talentpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCompany") + return err }, opts...) } @@ -820,21 +788,10 @@ func (c *companyRESTClient) ListCompanies(ctx context.Context, req *talentpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCompanies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -897,17 +854,7 @@ func (c *companyRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4/company_client_example_go123_test.go b/talent/apiv4/company_client_example_go123_test.go index 54935a118126..e9b0e44601c0 100644 --- a/talent/apiv4/company_client_example_go123_test.go +++ b/talent/apiv4/company_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompanyClient_ListCompanies_all() { } for resp, err := range c.ListCompanies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/talent/apiv4/completion_client.go b/talent/apiv4/completion_client.go index 7cd8099b4421..94ca772328fd 100755 --- a/talent/apiv4/completion_client.go +++ b/talent/apiv4/completion_client.go @@ -19,7 +19,7 @@ package talent import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -170,6 +169,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion client based on gRPC. @@ -196,6 +197,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: talentpb.NewCompletionClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -243,6 +245,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion rest client. @@ -260,6 +264,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -312,7 +317,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *talentpb. var resp *talentpb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -330,7 +335,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -389,17 +394,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *talentpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -449,17 +444,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4/event_client.go b/talent/apiv4/event_client.go index 93ce5a751693..999b061a33d2 100755 --- a/talent/apiv4/event_client.go +++ b/talent/apiv4/event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -156,6 +155,8 @@ type eventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEventClient creates a new event service client based on gRPC. @@ -182,6 +183,7 @@ func NewEventClient(ctx context.Context, opts ...option.ClientOption) (*EventCli connPool: connPool, eventClient: talentpb.NewEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -229,6 +231,8 @@ type eventRESTClient struct { // Points back to the CallOptions field of the containing EventClient CallOptions **EventCallOptions + + logger *slog.Logger } // NewEventRESTClient creates a new event service rest client. @@ -246,6 +250,7 @@ func NewEventRESTClient(ctx context.Context, opts ...option.ClientOption) (*Even endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -298,7 +303,7 @@ func (c *eventGRPCClient) CreateClientEvent(ctx context.Context, req *talentpb.C var resp *talentpb.ClientEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.eventClient.CreateClientEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.eventClient.CreateClientEvent, req, settings.GRPC, c.logger, "CreateClientEvent") return err }, opts...) if err != nil { @@ -316,7 +321,7 @@ func (c *eventGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -371,17 +376,7 @@ func (c *eventRESTClient) CreateClientEvent(ctx context.Context, req *talentpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateClientEvent") if err != nil { return err } @@ -431,17 +426,7 @@ func (c *eventRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4/helpers.go b/talent/apiv4/helpers.go index 6d7ffc1665b2..8d1e4398c348 100755 --- a/talent/apiv4/helpers.go +++ b/talent/apiv4/helpers.go @@ -18,10 +18,20 @@ package talent import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "jobs.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/jobs", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/talent/apiv4/job_client.go b/talent/apiv4/job_client.go index e699972c348d..91e9fbab5304 100755 --- a/talent/apiv4/job_client.go +++ b/talent/apiv4/job_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -383,6 +382,8 @@ type jobGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobClient creates a new job service client based on gRPC. @@ -409,6 +410,7 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, connPool: connPool, jobClient: talentpb.NewJobServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -472,6 +474,8 @@ type jobRESTClient struct { // Points back to the CallOptions field of the containing JobClient CallOptions **JobCallOptions + + logger *slog.Logger } // NewJobRESTClient creates a new job service rest client. @@ -489,6 +493,7 @@ func NewJobRESTClient(ctx context.Context, opts ...option.ClientOption) (*JobCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -551,7 +556,7 @@ func (c *jobGRPCClient) CreateJob(ctx context.Context, req *talentpb.CreateJobRe var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -569,7 +574,7 @@ func (c *jobGRPCClient) BatchCreateJobs(ctx context.Context, req *talentpb.Batch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.BatchCreateJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.BatchCreateJobs, req, settings.GRPC, c.logger, "BatchCreateJobs") return err }, opts...) if err != nil { @@ -589,7 +594,7 @@ func (c *jobGRPCClient) GetJob(ctx context.Context, req *talentpb.GetJobRequest, var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -607,7 +612,7 @@ func (c *jobGRPCClient) UpdateJob(ctx context.Context, req *talentpb.UpdateJobRe var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -625,7 +630,7 @@ func (c *jobGRPCClient) BatchUpdateJobs(ctx context.Context, req *talentpb.Batch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.BatchUpdateJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.BatchUpdateJobs, req, settings.GRPC, c.logger, "BatchUpdateJobs") return err }, opts...) if err != nil { @@ -644,7 +649,7 @@ func (c *jobGRPCClient) DeleteJob(ctx context.Context, req *talentpb.DeleteJobRe opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -659,7 +664,7 @@ func (c *jobGRPCClient) BatchDeleteJobs(ctx context.Context, req *talentpb.Batch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.BatchDeleteJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.BatchDeleteJobs, req, settings.GRPC, c.logger, "BatchDeleteJobs") return err }, opts...) if err != nil { @@ -690,7 +695,7 @@ func (c *jobGRPCClient) ListJobs(ctx context.Context, req *talentpb.ListJobsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -725,7 +730,7 @@ func (c *jobGRPCClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobs var resp *talentpb.SearchJobsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchJobs, req, settings.GRPC, c.logger, "SearchJobs") return err }, opts...) if err != nil { @@ -743,7 +748,7 @@ func (c *jobGRPCClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Se var resp *talentpb.SearchJobsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchJobsForAlert(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchJobsForAlert, req, settings.GRPC, c.logger, "SearchJobsForAlert") return err }, opts...) if err != nil { @@ -761,7 +766,7 @@ func (c *jobGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -813,17 +818,7 @@ func (c *jobRESTClient) CreateJob(ctx context.Context, req *talentpb.CreateJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -878,21 +873,10 @@ func (c *jobRESTClient) BatchCreateJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -944,17 +928,7 @@ func (c *jobRESTClient) GetJob(ctx context.Context, req *talentpb.GetJobRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -1021,17 +995,7 @@ func (c *jobRESTClient) UpdateJob(ctx context.Context, req *talentpb.UpdateJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -1086,21 +1050,10 @@ func (c *jobRESTClient) BatchUpdateJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1151,15 +1104,8 @@ func (c *jobRESTClient) DeleteJob(ctx context.Context, req *talentpb.DeleteJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -1201,21 +1147,10 @@ func (c *jobRESTClient) BatchDeleteJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1282,21 +1217,10 @@ func (c *jobRESTClient) ListJobs(ctx context.Context, req *talentpb.ListJobsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1371,17 +1295,7 @@ func (c *jobRESTClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchJobs") if err != nil { return err } @@ -1448,17 +1362,7 @@ func (c *jobRESTClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Se httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchJobsForAlert") if err != nil { return err } @@ -1508,17 +1412,7 @@ func (c *jobRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4/job_client_example_go123_test.go b/talent/apiv4/job_client_example_go123_test.go index 37372df4566e..72e0e81fae15 100644 --- a/talent/apiv4/job_client_example_go123_test.go +++ b/talent/apiv4/job_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleJobClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/talent/apiv4/talentpb/common.pb.go b/talent/apiv4/talentpb/common.pb.go index fa31a830502f..610d1d0ce4cc 100755 --- a/talent/apiv4/talentpb/common.pb.go +++ b/talent/apiv4/talentpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/common.proto @@ -1336,11 +1336,9 @@ type TimestampRange struct { func (x *TimestampRange) Reset() { *x = TimestampRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampRange) String() string { @@ -1351,7 +1349,7 @@ func (*TimestampRange) ProtoMessage() {} func (x *TimestampRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1410,11 +1408,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -1425,7 +1421,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1541,11 +1537,9 @@ type RequestMetadata struct { func (x *RequestMetadata) Reset() { *x = RequestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestMetadata) String() string { @@ -1556,7 +1550,7 @@ func (*RequestMetadata) ProtoMessage() {} func (x *RequestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1619,11 +1613,9 @@ type ResponseMetadata struct { func (x *ResponseMetadata) Reset() { *x = ResponseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMetadata) String() string { @@ -1634,7 +1626,7 @@ func (*ResponseMetadata) ProtoMessage() {} func (x *ResponseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1673,11 +1665,9 @@ type DeviceInfo struct { func (x *DeviceInfo) Reset() { *x = DeviceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceInfo) String() string { @@ -1688,7 +1678,7 @@ func (*DeviceInfo) ProtoMessage() {} func (x *DeviceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1766,11 +1756,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -1781,7 +1769,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1846,11 +1834,9 @@ type SpellingCorrection struct { func (x *SpellingCorrection) Reset() { *x = SpellingCorrection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpellingCorrection) String() string { @@ -1861,7 +1847,7 @@ func (*SpellingCorrection) ProtoMessage() {} func (x *SpellingCorrection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1933,11 +1919,9 @@ type CompensationInfo struct { func (x *CompensationInfo) Reset() { *x = CompensationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo) String() string { @@ -1948,7 +1932,7 @@ func (*CompensationInfo) ProtoMessage() {} func (x *CompensationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2016,11 +2000,9 @@ type BatchOperationMetadata struct { func (x *BatchOperationMetadata) Reset() { *x = BatchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOperationMetadata) String() string { @@ -2031,7 +2013,7 @@ func (*BatchOperationMetadata) ProtoMessage() {} func (x *BatchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2159,11 +2141,9 @@ type CompensationInfo_CompensationEntry struct { func (x *CompensationInfo_CompensationEntry) Reset() { *x = CompensationInfo_CompensationEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo_CompensationEntry) String() string { @@ -2174,7 +2154,7 @@ func (*CompensationInfo_CompensationEntry) ProtoMessage() {} func (x *CompensationInfo_CompensationEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2277,11 +2257,9 @@ type CompensationInfo_CompensationRange struct { func (x *CompensationInfo_CompensationRange) Reset() { *x = CompensationInfo_CompensationRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo_CompensationRange) String() string { @@ -2292,7 +2270,7 @@ func (*CompensationInfo_CompensationRange) ProtoMessage() {} func (x *CompensationInfo_CompensationRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2776,140 +2754,6 @@ func file_google_cloud_talent_v4_common_proto_init() { if File_google_cloud_talent_v4_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimestampRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RequestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeviceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpellingCorrection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo_CompensationEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo_CompensationRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4_common_proto_msgTypes[9].OneofWrappers = []any{ (*CompensationInfo_CompensationEntry_Amount)(nil), (*CompensationInfo_CompensationEntry_Range)(nil), diff --git a/talent/apiv4/talentpb/company.pb.go b/talent/apiv4/talentpb/company.pb.go index fcf9e6378ecf..a9d511378b69 100755 --- a/talent/apiv4/talentpb/company.pb.go +++ b/talent/apiv4/talentpb/company.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/company.proto @@ -114,11 +114,9 @@ type Company struct { func (x *Company) Reset() { *x = Company{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Company) String() string { @@ -129,7 +127,7 @@ func (*Company) ProtoMessage() {} func (x *Company) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,11 +248,9 @@ type Company_DerivedInfo struct { func (x *Company_DerivedInfo) Reset() { *x = Company_DerivedInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Company_DerivedInfo) String() string { @@ -265,7 +261,7 @@ func (*Company_DerivedInfo) ProtoMessage() {} func (x *Company_DerivedInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,32 +391,6 @@ func file_google_cloud_talent_v4_company_proto_init() { return } file_google_cloud_talent_v4_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_company_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Company); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Company_DerivedInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/company_service.pb.go b/talent/apiv4/talentpb/company_service.pb.go index 0b23d359d5ae..bc1940350d73 100755 --- a/talent/apiv4/talentpb/company_service.pb.go +++ b/talent/apiv4/talentpb/company_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/company_service.proto @@ -59,11 +59,9 @@ type CreateCompanyRequest struct { func (x *CreateCompanyRequest) Reset() { *x = CreateCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCompanyRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateCompanyRequest) ProtoMessage() {} func (x *CreateCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type GetCompanyRequest struct { func (x *GetCompanyRequest) Reset() { *x = GetCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompanyRequest) String() string { @@ -134,7 +130,7 @@ func (*GetCompanyRequest) ProtoMessage() {} func (x *GetCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +176,9 @@ type UpdateCompanyRequest struct { func (x *UpdateCompanyRequest) Reset() { *x = UpdateCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCompanyRequest) String() string { @@ -195,7 +189,7 @@ func (*UpdateCompanyRequest) ProtoMessage() {} func (x *UpdateCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +234,9 @@ type DeleteCompanyRequest struct { func (x *DeleteCompanyRequest) Reset() { *x = DeleteCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCompanyRequest) String() string { @@ -255,7 +247,7 @@ func (*DeleteCompanyRequest) ProtoMessage() {} func (x *DeleteCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +297,9 @@ type ListCompaniesRequest struct { func (x *ListCompaniesRequest) Reset() { *x = ListCompaniesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompaniesRequest) String() string { @@ -320,7 +310,7 @@ func (*ListCompaniesRequest) ProtoMessage() {} func (x *ListCompaniesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type ListCompaniesResponse struct { func (x *ListCompaniesResponse) Reset() { *x = ListCompaniesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompaniesResponse) String() string { @@ -395,7 +383,7 @@ func (*ListCompaniesResponse) ProtoMessage() {} func (x *ListCompaniesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_company_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,80 +620,6 @@ func file_google_cloud_talent_v4_company_service_proto_init() { } file_google_cloud_talent_v4_common_proto_init() file_google_cloud_talent_v4_company_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_company_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCompaniesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_company_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCompaniesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/completion_service.pb.go b/talent/apiv4/talentpb/completion_service.pb.go index be6fe0a8b981..ef67e433e2d9 100755 --- a/talent/apiv4/talentpb/completion_service.pb.go +++ b/talent/apiv4/talentpb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/completion_service.proto @@ -213,11 +213,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -228,7 +226,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -307,11 +305,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -322,7 +318,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -368,11 +364,9 @@ type CompleteQueryResponse_CompletionResult struct { func (x *CompleteQueryResponse_CompletionResult) Reset() { *x = CompleteQueryResponse_CompletionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_CompletionResult) String() string { @@ -383,7 +377,7 @@ func (*CompleteQueryResponse_CompletionResult) ProtoMessage() {} func (x *CompleteQueryResponse_CompletionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,44 +561,6 @@ func file_google_cloud_talent_v4_completion_service_proto_init() { return } file_google_cloud_talent_v4_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_CompletionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/event.pb.go b/talent/apiv4/talentpb/event.pb.go index d89c68843f87..6d84d27a8a50 100755 --- a/talent/apiv4/talentpb/event.pb.go +++ b/talent/apiv4/talentpb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/event.proto @@ -224,11 +224,9 @@ type ClientEvent struct { func (x *ClientEvent) Reset() { *x = ClientEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientEvent) String() string { @@ -239,7 +237,7 @@ func (*ClientEvent) ProtoMessage() {} func (x *ClientEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +332,9 @@ type JobEvent struct { func (x *JobEvent) Reset() { *x = JobEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobEvent) String() string { @@ -349,7 +345,7 @@ func (*JobEvent) ProtoMessage() {} func (x *JobEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,32 +477,6 @@ func file_google_cloud_talent_v4_event_proto_init() { if File_google_cloud_talent_v4_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*JobEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4_event_proto_msgTypes[0].OneofWrappers = []any{ (*ClientEvent_JobEvent)(nil), } diff --git a/talent/apiv4/talentpb/event_service.pb.go b/talent/apiv4/talentpb/event_service.pb.go index 9f4adaf791f0..bef22354d14f 100755 --- a/talent/apiv4/talentpb/event_service.pb.go +++ b/talent/apiv4/talentpb/event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/event_service.proto @@ -58,11 +58,9 @@ type CreateClientEventRequest struct { func (x *CreateClientEventRequest) Reset() { *x = CreateClientEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClientEventRequest) String() string { @@ -73,7 +71,7 @@ func (*CreateClientEventRequest) ProtoMessage() {} func (x *CreateClientEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,20 +191,6 @@ func file_google_cloud_talent_v4_event_service_proto_init() { return } file_google_cloud_talent_v4_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateClientEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/filters.pb.go b/talent/apiv4/talentpb/filters.pb.go index 5ac26f6f8d35..b3755290bfd4 100755 --- a/talent/apiv4/talentpb/filters.pb.go +++ b/talent/apiv4/talentpb/filters.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/filters.proto @@ -403,11 +403,9 @@ type JobQuery struct { func (x *JobQuery) Reset() { *x = JobQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobQuery) String() string { @@ -418,7 +416,7 @@ func (*JobQuery) ProtoMessage() {} func (x *JobQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +590,9 @@ type LocationFilter struct { func (x *LocationFilter) Reset() { *x = LocationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter) String() string { @@ -607,7 +603,7 @@ func (*LocationFilter) ProtoMessage() {} func (x *LocationFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +673,9 @@ type CompensationFilter struct { func (x *CompensationFilter) Reset() { *x = CompensationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationFilter) String() string { @@ -692,7 +686,7 @@ func (*CompensationFilter) ProtoMessage() {} func (x *CompensationFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,11 +760,9 @@ type CommuteFilter struct { func (x *CommuteFilter) Reset() { *x = CommuteFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommuteFilter) String() string { @@ -781,7 +773,7 @@ func (*CommuteFilter) ProtoMessage() {} func (x *CommuteFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_filters_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1101,56 +1093,6 @@ func file_google_cloud_talent_v4_filters_proto_init() { return } file_google_cloud_talent_v4_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_filters_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*JobQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_filters_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_filters_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompensationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_filters_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CommuteFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4_filters_proto_msgTypes[3].OneofWrappers = []any{ (*CommuteFilter_RoadTraffic_)(nil), (*CommuteFilter_DepartureTime)(nil), diff --git a/talent/apiv4/talentpb/histogram.pb.go b/talent/apiv4/talentpb/histogram.pb.go index 48ff18a5dc88..ae066e70e4d4 100755 --- a/talent/apiv4/talentpb/histogram.pb.go +++ b/talent/apiv4/talentpb/histogram.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/histogram.proto @@ -52,11 +52,9 @@ type HistogramQuery struct { func (x *HistogramQuery) Reset() { *x = HistogramQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HistogramQuery) String() string { @@ -67,7 +65,7 @@ func (*HistogramQuery) ProtoMessage() {} func (x *HistogramQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type HistogramQueryResult struct { func (x *HistogramQueryResult) Reset() { *x = HistogramQueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HistogramQueryResult) String() string { @@ -129,7 +125,7 @@ func (*HistogramQueryResult) ProtoMessage() {} func (x *HistogramQueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_histogram_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,32 +220,6 @@ func file_google_cloud_talent_v4_histogram_proto_init() { if File_google_cloud_talent_v4_histogram_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_histogram_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HistogramQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_histogram_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*HistogramQueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/job.pb.go b/talent/apiv4/talentpb/job.pb.go index 6d3551da3a32..c0c77c861b59 100755 --- a/talent/apiv4/talentpb/job.pb.go +++ b/talent/apiv4/talentpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/job.proto @@ -295,11 +295,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -310,7 +308,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -564,11 +562,9 @@ type Job_ApplicationInfo struct { func (x *Job_ApplicationInfo) Reset() { *x = Job_ApplicationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_ApplicationInfo) String() string { @@ -579,7 +575,7 @@ func (*Job_ApplicationInfo) ProtoMessage() {} func (x *Job_ApplicationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +631,9 @@ type Job_DerivedInfo struct { func (x *Job_DerivedInfo) Reset() { *x = Job_DerivedInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_DerivedInfo) String() string { @@ -650,7 +644,7 @@ func (*Job_DerivedInfo) ProtoMessage() {} func (x *Job_DerivedInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -706,11 +700,9 @@ type Job_ProcessingOptions struct { func (x *Job_ProcessingOptions) Reset() { *x = Job_ProcessingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_ProcessingOptions) String() string { @@ -721,7 +713,7 @@ func (*Job_ProcessingOptions) ProtoMessage() {} func (x *Job_ProcessingOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,56 +987,6 @@ func file_google_cloud_talent_v4_job_proto_init() { return } file_google_cloud_talent_v4_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Job_ApplicationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Job_DerivedInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Job_ProcessingOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/job_service.pb.go b/talent/apiv4/talentpb/job_service.pb.go index 820810be05b7..5d0d89b2d438 100755 --- a/talent/apiv4/talentpb/job_service.pb.go +++ b/talent/apiv4/talentpb/job_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/job_service.proto @@ -460,11 +460,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -475,7 +473,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +518,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -535,7 +531,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +575,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -594,7 +588,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +633,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -654,7 +646,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -731,11 +723,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -746,7 +736,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -816,11 +806,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -831,7 +819,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1177,11 +1165,9 @@ type SearchJobsRequest struct { func (x *SearchJobsRequest) Reset() { *x = SearchJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsRequest) String() string { @@ -1192,7 +1178,7 @@ func (*SearchJobsRequest) ProtoMessage() {} func (x *SearchJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1340,9 @@ type SearchJobsResponse struct { func (x *SearchJobsResponse) Reset() { *x = SearchJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse) String() string { @@ -1369,7 +1353,7 @@ func (*SearchJobsResponse) ProtoMessage() {} func (x *SearchJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1458,11 +1442,9 @@ type BatchCreateJobsRequest struct { func (x *BatchCreateJobsRequest) Reset() { *x = BatchCreateJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateJobsRequest) String() string { @@ -1473,7 +1455,7 @@ func (*BatchCreateJobsRequest) ProtoMessage() {} func (x *BatchCreateJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1519,9 @@ type BatchUpdateJobsRequest struct { func (x *BatchUpdateJobsRequest) Reset() { *x = BatchUpdateJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateJobsRequest) String() string { @@ -1552,7 +1532,7 @@ func (*BatchUpdateJobsRequest) ProtoMessage() {} func (x *BatchUpdateJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,11 +1592,9 @@ type BatchDeleteJobsRequest struct { func (x *BatchDeleteJobsRequest) Reset() { *x = BatchDeleteJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteJobsRequest) String() string { @@ -1627,7 +1605,7 @@ func (*BatchDeleteJobsRequest) ProtoMessage() {} func (x *BatchDeleteJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1676,11 +1654,9 @@ type JobResult struct { func (x *JobResult) Reset() { *x = JobResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobResult) String() string { @@ -1691,7 +1667,7 @@ func (*JobResult) ProtoMessage() {} func (x *JobResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1737,11 +1713,9 @@ type BatchCreateJobsResponse struct { func (x *BatchCreateJobsResponse) Reset() { *x = BatchCreateJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateJobsResponse) String() string { @@ -1752,7 +1726,7 @@ func (*BatchCreateJobsResponse) ProtoMessage() {} func (x *BatchCreateJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1791,11 +1765,9 @@ type BatchUpdateJobsResponse struct { func (x *BatchUpdateJobsResponse) Reset() { *x = BatchUpdateJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateJobsResponse) String() string { @@ -1806,7 +1778,7 @@ func (*BatchUpdateJobsResponse) ProtoMessage() {} func (x *BatchUpdateJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1845,11 +1817,9 @@ type BatchDeleteJobsResponse struct { func (x *BatchDeleteJobsResponse) Reset() { *x = BatchDeleteJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteJobsResponse) String() string { @@ -1860,7 +1830,7 @@ func (*BatchDeleteJobsResponse) ProtoMessage() {} func (x *BatchDeleteJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1923,11 +1893,9 @@ type SearchJobsRequest_CustomRankingInfo struct { func (x *SearchJobsRequest_CustomRankingInfo) Reset() { *x = SearchJobsRequest_CustomRankingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsRequest_CustomRankingInfo) String() string { @@ -1938,7 +1906,7 @@ func (*SearchJobsRequest_CustomRankingInfo) ProtoMessage() {} func (x *SearchJobsRequest_CustomRankingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1999,11 +1967,9 @@ type SearchJobsResponse_MatchingJob struct { func (x *SearchJobsResponse_MatchingJob) Reset() { *x = SearchJobsResponse_MatchingJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse_MatchingJob) String() string { @@ -2014,7 +1980,7 @@ func (*SearchJobsResponse_MatchingJob) ProtoMessage() {} func (x *SearchJobsResponse_MatchingJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2081,11 +2047,9 @@ type SearchJobsResponse_CommuteInfo struct { func (x *SearchJobsResponse_CommuteInfo) Reset() { *x = SearchJobsResponse_CommuteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse_CommuteInfo) String() string { @@ -2096,7 +2060,7 @@ func (*SearchJobsResponse_CommuteInfo) ProtoMessage() {} func (x *SearchJobsResponse_CommuteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_job_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2692,224 +2656,6 @@ func file_google_cloud_talent_v4_job_service_proto_init() { file_google_cloud_talent_v4_filters_proto_init() file_google_cloud_talent_v4_histogram_proto_init() file_google_cloud_talent_v4_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_job_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*JobResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsRequest_CustomRankingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse_MatchingJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_job_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse_CommuteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/tenant.pb.go b/talent/apiv4/talentpb/tenant.pb.go index 4229802b1f22..3d06015251df 100755 --- a/talent/apiv4/talentpb/tenant.pb.go +++ b/talent/apiv4/talentpb/tenant.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/tenant.proto @@ -62,11 +62,9 @@ type Tenant struct { func (x *Tenant) Reset() { *x = Tenant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tenant) String() string { @@ -77,7 +75,7 @@ func (*Tenant) ProtoMessage() {} func (x *Tenant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,20 +162,6 @@ func file_google_cloud_talent_v4_tenant_proto_init() { if File_google_cloud_talent_v4_tenant_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_tenant_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tenant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/talentpb/tenant_service.pb.go b/talent/apiv4/talentpb/tenant_service.pb.go index ae152dc4fecb..73cd97368342 100755 --- a/talent/apiv4/talentpb/tenant_service.pb.go +++ b/talent/apiv4/talentpb/tenant_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4/tenant_service.proto @@ -59,11 +59,9 @@ type CreateTenantRequest struct { func (x *CreateTenantRequest) Reset() { *x = CreateTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTenantRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateTenantRequest) ProtoMessage() {} func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetTenantRequest struct { func (x *GetTenantRequest) Reset() { *x = GetTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTenantRequest) String() string { @@ -133,7 +129,7 @@ func (*GetTenantRequest) ProtoMessage() {} func (x *GetTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,11 +174,9 @@ type UpdateTenantRequest struct { func (x *UpdateTenantRequest) Reset() { *x = UpdateTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTenantRequest) String() string { @@ -193,7 +187,7 @@ func (*UpdateTenantRequest) ProtoMessage() {} func (x *UpdateTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type DeleteTenantRequest struct { func (x *DeleteTenantRequest) Reset() { *x = DeleteTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTenantRequest) String() string { @@ -252,7 +244,7 @@ func (*DeleteTenantRequest) ProtoMessage() {} func (x *DeleteTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +286,9 @@ type ListTenantsRequest struct { func (x *ListTenantsRequest) Reset() { *x = ListTenantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTenantsRequest) String() string { @@ -309,7 +299,7 @@ func (*ListTenantsRequest) ProtoMessage() {} func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +352,9 @@ type ListTenantsResponse struct { func (x *ListTenantsResponse) Reset() { *x = ListTenantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTenantsResponse) String() string { @@ -377,7 +365,7 @@ func (*ListTenantsResponse) ProtoMessage() {} func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4_tenant_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,80 +595,6 @@ func file_google_cloud_talent_v4_tenant_service_proto_init() { } file_google_cloud_talent_v4_common_proto_init() file_google_cloud_talent_v4_tenant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTenantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4_tenant_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTenantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4/tenant_client.go b/talent/apiv4/tenant_client.go index d89bc9acaa66..fdb64a454139 100755 --- a/talent/apiv4/tenant_client.go +++ b/talent/apiv4/tenant_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -262,6 +261,8 @@ type tenantGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTenantClient creates a new tenant service client based on gRPC. @@ -288,6 +289,7 @@ func NewTenantClient(ctx context.Context, opts ...option.ClientOption) (*TenantC connPool: connPool, tenantClient: talentpb.NewTenantServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -335,6 +337,8 @@ type tenantRESTClient struct { // Points back to the CallOptions field of the containing TenantClient CallOptions **TenantCallOptions + + logger *slog.Logger } // NewTenantRESTClient creates a new tenant service rest client. @@ -352,6 +356,7 @@ func NewTenantRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ten endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -404,7 +409,7 @@ func (c *tenantGRPCClient) CreateTenant(ctx context.Context, req *talentpb.Creat var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.CreateTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.CreateTenant, req, settings.GRPC, c.logger, "CreateTenant") return err }, opts...) if err != nil { @@ -422,7 +427,7 @@ func (c *tenantGRPCClient) GetTenant(ctx context.Context, req *talentpb.GetTenan var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.GetTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.GetTenant, req, settings.GRPC, c.logger, "GetTenant") return err }, opts...) if err != nil { @@ -440,7 +445,7 @@ func (c *tenantGRPCClient) UpdateTenant(ctx context.Context, req *talentpb.Updat var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.UpdateTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.UpdateTenant, req, settings.GRPC, c.logger, "UpdateTenant") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *tenantGRPCClient) DeleteTenant(ctx context.Context, req *talentpb.Delet opts = append((*c.CallOptions).DeleteTenant[0:len((*c.CallOptions).DeleteTenant):len((*c.CallOptions).DeleteTenant)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.tenantClient.DeleteTenant(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.tenantClient.DeleteTenant, req, settings.GRPC, c.logger, "DeleteTenant") return err }, opts...) return err @@ -483,7 +488,7 @@ func (c *tenantGRPCClient) ListTenants(ctx context.Context, req *talentpb.ListTe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.ListTenants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.ListTenants, req, settings.GRPC, c.logger, "ListTenants") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *tenantGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -567,17 +572,7 @@ func (c *tenantRESTClient) CreateTenant(ctx context.Context, req *talentpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTenant") if err != nil { return err } @@ -627,17 +622,7 @@ func (c *tenantRESTClient) GetTenant(ctx context.Context, req *talentpb.GetTenan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTenant") if err != nil { return err } @@ -701,17 +686,7 @@ func (c *tenantRESTClient) UpdateTenant(ctx context.Context, req *talentpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTenant") if err != nil { return err } @@ -758,15 +733,8 @@ func (c *tenantRESTClient) DeleteTenant(ctx context.Context, req *talentpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTenant") + return err }, opts...) } @@ -815,21 +783,10 @@ func (c *tenantRESTClient) ListTenants(ctx context.Context, req *talentpb.ListTe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTenants") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -892,17 +849,7 @@ func (c *tenantRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4/tenant_client_example_go123_test.go b/talent/apiv4/tenant_client_example_go123_test.go index 501d5ceaf366..5efe59e90cd8 100644 --- a/talent/apiv4/tenant_client_example_go123_test.go +++ b/talent/apiv4/tenant_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTenantClient_ListTenants_all() { } for resp, err := range c.ListTenants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/talent/apiv4beta1/company_client.go b/talent/apiv4beta1/company_client.go index efe15d1e6476..aedad14f19d2 100755 --- a/talent/apiv4beta1/company_client.go +++ b/talent/apiv4beta1/company_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4beta1/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -263,6 +262,8 @@ type companyGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompanyClient creates a new company service client based on gRPC. @@ -289,6 +290,7 @@ func NewCompanyClient(ctx context.Context, opts ...option.ClientOption) (*Compan connPool: connPool, companyClient: talentpb.NewCompanyServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -336,6 +338,8 @@ type companyRESTClient struct { // Points back to the CallOptions field of the containing CompanyClient CallOptions **CompanyCallOptions + + logger *slog.Logger } // NewCompanyRESTClient creates a new company service rest client. @@ -353,6 +357,7 @@ func NewCompanyRESTClient(ctx context.Context, opts ...option.ClientOption) (*Co endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -405,7 +410,7 @@ func (c *companyGRPCClient) CreateCompany(ctx context.Context, req *talentpb.Cre var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.CreateCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.CreateCompany, req, settings.GRPC, c.logger, "CreateCompany") return err }, opts...) if err != nil { @@ -423,7 +428,7 @@ func (c *companyGRPCClient) GetCompany(ctx context.Context, req *talentpb.GetCom var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.GetCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.GetCompany, req, settings.GRPC, c.logger, "GetCompany") return err }, opts...) if err != nil { @@ -441,7 +446,7 @@ func (c *companyGRPCClient) UpdateCompany(ctx context.Context, req *talentpb.Upd var resp *talentpb.Company err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.UpdateCompany(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.UpdateCompany, req, settings.GRPC, c.logger, "UpdateCompany") return err }, opts...) if err != nil { @@ -458,7 +463,7 @@ func (c *companyGRPCClient) DeleteCompany(ctx context.Context, req *talentpb.Del opts = append((*c.CallOptions).DeleteCompany[0:len((*c.CallOptions).DeleteCompany):len((*c.CallOptions).DeleteCompany)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.companyClient.DeleteCompany(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.companyClient.DeleteCompany, req, settings.GRPC, c.logger, "DeleteCompany") return err }, opts...) return err @@ -484,7 +489,7 @@ func (c *companyGRPCClient) ListCompanies(ctx context.Context, req *talentpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.companyClient.ListCompanies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.companyClient.ListCompanies, req, settings.GRPC, c.logger, "ListCompanies") return err }, opts...) if err != nil { @@ -519,7 +524,7 @@ func (c *companyGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -567,17 +572,7 @@ func (c *companyRESTClient) CreateCompany(ctx context.Context, req *talentpb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCompany") if err != nil { return err } @@ -627,17 +622,7 @@ func (c *companyRESTClient) GetCompany(ctx context.Context, req *talentpb.GetCom httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCompany") if err != nil { return err } @@ -693,17 +678,7 @@ func (c *companyRESTClient) UpdateCompany(ctx context.Context, req *talentpb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCompany") if err != nil { return err } @@ -751,15 +726,8 @@ func (c *companyRESTClient) DeleteCompany(ctx context.Context, req *talentpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCompany") + return err }, opts...) } @@ -811,21 +779,10 @@ func (c *companyRESTClient) ListCompanies(ctx context.Context, req *talentpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCompanies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -888,17 +845,7 @@ func (c *companyRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4beta1/company_client_example_go123_test.go b/talent/apiv4beta1/company_client_example_go123_test.go index 7bb4eef14ba9..c2b2370ec9e3 100644 --- a/talent/apiv4beta1/company_client_example_go123_test.go +++ b/talent/apiv4beta1/company_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleCompanyClient_ListCompanies_all() { } for resp, err := range c.ListCompanies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/talent/apiv4beta1/completion_client.go b/talent/apiv4beta1/completion_client.go index 7a91f17dda6b..cc3148466635 100755 --- a/talent/apiv4beta1/completion_client.go +++ b/talent/apiv4beta1/completion_client.go @@ -19,7 +19,7 @@ package talent import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4beta1/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -170,6 +169,8 @@ type completionGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewCompletionClient creates a new completion client based on gRPC. @@ -196,6 +197,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com connPool: connPool, completionClient: talentpb.NewCompletionClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -243,6 +245,8 @@ type completionRESTClient struct { // Points back to the CallOptions field of the containing CompletionClient CallOptions **CompletionCallOptions + + logger *slog.Logger } // NewCompletionRESTClient creates a new completion rest client. @@ -260,6 +264,7 @@ func NewCompletionRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -312,7 +317,7 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *talentpb. var resp *talentpb.CompleteQueryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.completionClient.CompleteQuery(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.completionClient.CompleteQuery, req, settings.GRPC, c.logger, "CompleteQuery") return err }, opts...) if err != nil { @@ -330,7 +335,7 @@ func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -389,17 +394,7 @@ func (c *completionRESTClient) CompleteQuery(ctx context.Context, req *talentpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "CompleteQuery") if err != nil { return err } @@ -449,17 +444,7 @@ func (c *completionRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4beta1/event_client.go b/talent/apiv4beta1/event_client.go index f9ba2e510de0..4e986d104978 100755 --- a/talent/apiv4beta1/event_client.go +++ b/talent/apiv4beta1/event_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4beta1/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -156,6 +155,8 @@ type eventGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewEventClient creates a new event service client based on gRPC. @@ -182,6 +183,7 @@ func NewEventClient(ctx context.Context, opts ...option.ClientOption) (*EventCli connPool: connPool, eventClient: talentpb.NewEventServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -229,6 +231,8 @@ type eventRESTClient struct { // Points back to the CallOptions field of the containing EventClient CallOptions **EventCallOptions + + logger *slog.Logger } // NewEventRESTClient creates a new event service rest client. @@ -246,6 +250,7 @@ func NewEventRESTClient(ctx context.Context, opts ...option.ClientOption) (*Even endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -298,7 +303,7 @@ func (c *eventGRPCClient) CreateClientEvent(ctx context.Context, req *talentpb.C var resp *talentpb.ClientEvent err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.eventClient.CreateClientEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.eventClient.CreateClientEvent, req, settings.GRPC, c.logger, "CreateClientEvent") return err }, opts...) if err != nil { @@ -316,7 +321,7 @@ func (c *eventGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.G var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -370,17 +375,7 @@ func (c *eventRESTClient) CreateClientEvent(ctx context.Context, req *talentpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateClientEvent") if err != nil { return err } @@ -430,17 +425,7 @@ func (c *eventRESTClient) GetOperation(ctx context.Context, req *longrunningpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4beta1/helpers.go b/talent/apiv4beta1/helpers.go index 6d7ffc1665b2..8d1e4398c348 100755 --- a/talent/apiv4beta1/helpers.go +++ b/talent/apiv4beta1/helpers.go @@ -18,10 +18,20 @@ package talent import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "jobs.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/jobs", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/talent/apiv4beta1/job_client.go b/talent/apiv4beta1/job_client.go index bd1640b15b70..bf825bd1366b 100755 --- a/talent/apiv4beta1/job_client.go +++ b/talent/apiv4beta1/job_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4beta1/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -380,6 +379,8 @@ type jobGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewJobClient creates a new job service client based on gRPC. @@ -406,6 +407,7 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, connPool: connPool, jobClient: talentpb.NewJobServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -469,6 +471,8 @@ type jobRESTClient struct { // Points back to the CallOptions field of the containing JobClient CallOptions **JobCallOptions + + logger *slog.Logger } // NewJobRESTClient creates a new job service rest client. @@ -486,6 +490,7 @@ func NewJobRESTClient(ctx context.Context, opts ...option.ClientOption) (*JobCli endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -548,7 +553,7 @@ func (c *jobGRPCClient) CreateJob(ctx context.Context, req *talentpb.CreateJobRe var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *jobGRPCClient) BatchCreateJobs(ctx context.Context, req *talentpb.Batch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.BatchCreateJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.BatchCreateJobs, req, settings.GRPC, c.logger, "BatchCreateJobs") return err }, opts...) if err != nil { @@ -586,7 +591,7 @@ func (c *jobGRPCClient) GetJob(ctx context.Context, req *talentpb.GetJobRequest, var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -604,7 +609,7 @@ func (c *jobGRPCClient) UpdateJob(ctx context.Context, req *talentpb.UpdateJobRe var resp *talentpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.UpdateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.UpdateJob, req, settings.GRPC, c.logger, "UpdateJob") return err }, opts...) if err != nil { @@ -622,7 +627,7 @@ func (c *jobGRPCClient) BatchUpdateJobs(ctx context.Context, req *talentpb.Batch var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.BatchUpdateJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.BatchUpdateJobs, req, settings.GRPC, c.logger, "BatchUpdateJobs") return err }, opts...) if err != nil { @@ -641,7 +646,7 @@ func (c *jobGRPCClient) DeleteJob(ctx context.Context, req *talentpb.DeleteJobRe opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -655,7 +660,7 @@ func (c *jobGRPCClient) BatchDeleteJobs(ctx context.Context, req *talentpb.Batch opts = append((*c.CallOptions).BatchDeleteJobs[0:len((*c.CallOptions).BatchDeleteJobs):len((*c.CallOptions).BatchDeleteJobs)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.jobClient.BatchDeleteJobs(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.jobClient.BatchDeleteJobs, req, settings.GRPC, c.logger, "BatchDeleteJobs") return err }, opts...) return err @@ -681,7 +686,7 @@ func (c *jobGRPCClient) ListJobs(ctx context.Context, req *talentpb.ListJobsRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -716,7 +721,7 @@ func (c *jobGRPCClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobs var resp *talentpb.SearchJobsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchJobs, req, settings.GRPC, c.logger, "SearchJobs") return err }, opts...) if err != nil { @@ -745,7 +750,7 @@ func (c *jobGRPCClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Se } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.jobClient.SearchJobsForAlert(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.jobClient.SearchJobsForAlert, req, settings.GRPC, c.logger, "SearchJobsForAlert") return err }, opts...) if err != nil { @@ -780,7 +785,7 @@ func (c *jobGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.Get var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -831,17 +836,7 @@ func (c *jobRESTClient) CreateJob(ctx context.Context, req *talentpb.CreateJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -896,21 +891,10 @@ func (c *jobRESTClient) BatchCreateJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -962,17 +946,7 @@ func (c *jobRESTClient) GetJob(ctx context.Context, req *talentpb.GetJobRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -1031,17 +1005,7 @@ func (c *jobRESTClient) UpdateJob(ctx context.Context, req *talentpb.UpdateJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateJob") if err != nil { return err } @@ -1096,21 +1060,10 @@ func (c *jobRESTClient) BatchUpdateJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1161,15 +1114,8 @@ func (c *jobRESTClient) DeleteJob(ctx context.Context, req *talentpb.DeleteJobRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -1209,15 +1155,8 @@ func (c *jobRESTClient) BatchDeleteJobs(ctx context.Context, req *talentpb.Batch httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteJobs") + return err }, opts...) } @@ -1270,21 +1209,10 @@ func (c *jobRESTClient) ListJobs(ctx context.Context, req *talentpb.ListJobsRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1359,17 +1287,7 @@ func (c *jobRESTClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchJobs") if err != nil { return err } @@ -1442,21 +1360,10 @@ func (c *jobRESTClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Se } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchJobsForAlert") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1519,17 +1426,7 @@ func (c *jobRESTClient) GetOperation(ctx context.Context, req *longrunningpb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4beta1/job_client_example_go123_test.go b/talent/apiv4beta1/job_client_example_go123_test.go index a33101331555..9b0fd60de187 100644 --- a/talent/apiv4beta1/job_client_example_go123_test.go +++ b/talent/apiv4beta1/job_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleJobClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleJobClient_SearchJobsForAlert_all() { } for resp, err := range c.SearchJobsForAlert(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/talent/apiv4beta1/talentpb/batch.pb.go b/talent/apiv4beta1/talentpb/batch.pb.go index 5e442f75e16d..b4b36a68b993 100755 --- a/talent/apiv4beta1/talentpb/batch.pb.go +++ b/talent/apiv4beta1/talentpb/batch.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/batch.proto diff --git a/talent/apiv4beta1/talentpb/common.pb.go b/talent/apiv4beta1/talentpb/common.pb.go index f9470d49df35..4428d830f9f7 100755 --- a/talent/apiv4beta1/talentpb/common.pb.go +++ b/talent/apiv4beta1/talentpb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/common.proto @@ -1330,11 +1330,9 @@ type TimestampRange struct { func (x *TimestampRange) Reset() { *x = TimestampRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampRange) String() string { @@ -1345,7 +1343,7 @@ func (*TimestampRange) ProtoMessage() {} func (x *TimestampRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1402,9 @@ type Location struct { func (x *Location) Reset() { *x = Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Location) String() string { @@ -1419,7 +1415,7 @@ func (*Location) ProtoMessage() {} func (x *Location) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1536,11 +1532,9 @@ type RequestMetadata struct { func (x *RequestMetadata) Reset() { *x = RequestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestMetadata) String() string { @@ -1551,7 +1545,7 @@ func (*RequestMetadata) ProtoMessage() {} func (x *RequestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1614,11 +1608,9 @@ type ResponseMetadata struct { func (x *ResponseMetadata) Reset() { *x = ResponseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMetadata) String() string { @@ -1629,7 +1621,7 @@ func (*ResponseMetadata) ProtoMessage() {} func (x *ResponseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1668,11 +1660,9 @@ type DeviceInfo struct { func (x *DeviceInfo) Reset() { *x = DeviceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeviceInfo) String() string { @@ -1683,7 +1673,7 @@ func (*DeviceInfo) ProtoMessage() {} func (x *DeviceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1761,11 +1751,9 @@ type CustomAttribute struct { func (x *CustomAttribute) Reset() { *x = CustomAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomAttribute) String() string { @@ -1776,7 +1764,7 @@ func (*CustomAttribute) ProtoMessage() {} func (x *CustomAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1841,11 +1829,9 @@ type SpellingCorrection struct { func (x *SpellingCorrection) Reset() { *x = SpellingCorrection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpellingCorrection) String() string { @@ -1856,7 +1842,7 @@ func (*SpellingCorrection) ProtoMessage() {} func (x *SpellingCorrection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1928,11 +1914,9 @@ type CompensationInfo struct { func (x *CompensationInfo) Reset() { *x = CompensationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo) String() string { @@ -1943,7 +1927,7 @@ func (*CompensationInfo) ProtoMessage() {} func (x *CompensationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2011,11 +1995,9 @@ type BatchOperationMetadata struct { func (x *BatchOperationMetadata) Reset() { *x = BatchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOperationMetadata) String() string { @@ -2026,7 +2008,7 @@ func (*BatchOperationMetadata) ProtoMessage() {} func (x *BatchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2154,11 +2136,9 @@ type CompensationInfo_CompensationEntry struct { func (x *CompensationInfo_CompensationEntry) Reset() { *x = CompensationInfo_CompensationEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo_CompensationEntry) String() string { @@ -2169,7 +2149,7 @@ func (*CompensationInfo_CompensationEntry) ProtoMessage() {} func (x *CompensationInfo_CompensationEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2272,11 +2252,9 @@ type CompensationInfo_CompensationRange struct { func (x *CompensationInfo_CompensationRange) Reset() { *x = CompensationInfo_CompensationRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationInfo_CompensationRange) String() string { @@ -2287,7 +2265,7 @@ func (*CompensationInfo_CompensationRange) ProtoMessage() {} func (x *CompensationInfo_CompensationRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2774,140 +2752,6 @@ func file_google_cloud_talent_v4beta1_common_proto_init() { if File_google_cloud_talent_v4beta1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TimestampRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*RequestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeviceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SpellingCorrection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BatchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo_CompensationEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CompensationInfo_CompensationRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4beta1_common_proto_msgTypes[9].OneofWrappers = []any{ (*CompensationInfo_CompensationEntry_Amount)(nil), (*CompensationInfo_CompensationEntry_Range)(nil), diff --git a/talent/apiv4beta1/talentpb/company.pb.go b/talent/apiv4beta1/talentpb/company.pb.go index 01e1e13a6645..a48e6ffe978b 100755 --- a/talent/apiv4beta1/talentpb/company.pb.go +++ b/talent/apiv4beta1/talentpb/company.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/company.proto @@ -117,11 +117,9 @@ type Company struct { func (x *Company) Reset() { *x = Company{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Company) String() string { @@ -132,7 +130,7 @@ func (*Company) ProtoMessage() {} func (x *Company) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +251,9 @@ type Company_DerivedInfo struct { func (x *Company_DerivedInfo) Reset() { *x = Company_DerivedInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Company_DerivedInfo) String() string { @@ -268,7 +264,7 @@ func (*Company_DerivedInfo) ProtoMessage() {} func (x *Company_DerivedInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,32 +399,6 @@ func file_google_cloud_talent_v4beta1_company_proto_init() { return } file_google_cloud_talent_v4beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_company_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Company); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Company_DerivedInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/company_service.pb.go b/talent/apiv4beta1/talentpb/company_service.pb.go index 2810c6f5ebaf..526dfe918d47 100755 --- a/talent/apiv4beta1/talentpb/company_service.pb.go +++ b/talent/apiv4beta1/talentpb/company_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/company_service.proto @@ -60,11 +60,9 @@ type CreateCompanyRequest struct { func (x *CreateCompanyRequest) Reset() { *x = CreateCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCompanyRequest) String() string { @@ -75,7 +73,7 @@ func (*CreateCompanyRequest) ProtoMessage() {} func (x *CreateCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type GetCompanyRequest struct { func (x *GetCompanyRequest) Reset() { *x = GetCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCompanyRequest) String() string { @@ -138,7 +134,7 @@ func (*GetCompanyRequest) ProtoMessage() {} func (x *GetCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -185,11 +181,9 @@ type UpdateCompanyRequest struct { func (x *UpdateCompanyRequest) Reset() { *x = UpdateCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCompanyRequest) String() string { @@ -200,7 +194,7 @@ func (*UpdateCompanyRequest) ProtoMessage() {} func (x *UpdateCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +242,9 @@ type DeleteCompanyRequest struct { func (x *DeleteCompanyRequest) Reset() { *x = DeleteCompanyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCompanyRequest) String() string { @@ -263,7 +255,7 @@ func (*DeleteCompanyRequest) ProtoMessage() {} func (x *DeleteCompanyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +308,9 @@ type ListCompaniesRequest struct { func (x *ListCompaniesRequest) Reset() { *x = ListCompaniesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompaniesRequest) String() string { @@ -331,7 +321,7 @@ func (*ListCompaniesRequest) ProtoMessage() {} func (x *ListCompaniesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +381,9 @@ type ListCompaniesResponse struct { func (x *ListCompaniesResponse) Reset() { *x = ListCompaniesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCompaniesResponse) String() string { @@ -406,7 +394,7 @@ func (*ListCompaniesResponse) ProtoMessage() {} func (x *ListCompaniesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,80 +652,6 @@ func file_google_cloud_talent_v4beta1_company_service_proto_init() { } file_google_cloud_talent_v4beta1_common_proto_init() file_google_cloud_talent_v4beta1_company_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCompanyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListCompaniesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_company_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListCompaniesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/completion_service.pb.go b/talent/apiv4beta1/talentpb/completion_service.pb.go index 66ad99256685..01ec9b70d08f 100755 --- a/talent/apiv4beta1/talentpb/completion_service.pb.go +++ b/talent/apiv4beta1/talentpb/completion_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/completion_service.proto @@ -219,11 +219,9 @@ type CompleteQueryRequest struct { func (x *CompleteQueryRequest) Reset() { *x = CompleteQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryRequest) String() string { @@ -234,7 +232,7 @@ func (*CompleteQueryRequest) ProtoMessage() {} func (x *CompleteQueryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,11 +311,9 @@ type CompleteQueryResponse struct { func (x *CompleteQueryResponse) Reset() { *x = CompleteQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse) String() string { @@ -328,7 +324,7 @@ func (*CompleteQueryResponse) ProtoMessage() {} func (x *CompleteQueryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,11 +370,9 @@ type CompleteQueryResponse_CompletionResult struct { func (x *CompleteQueryResponse_CompletionResult) Reset() { *x = CompleteQueryResponse_CompletionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompleteQueryResponse_CompletionResult) String() string { @@ -389,7 +383,7 @@ func (*CompleteQueryResponse_CompletionResult) ProtoMessage() {} func (x *CompleteQueryResponse_CompletionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -580,44 +574,6 @@ func file_google_cloud_talent_v4beta1_completion_service_proto_init() { return } file_google_cloud_talent_v4beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_completion_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompleteQueryResponse_CompletionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/event.pb.go b/talent/apiv4beta1/talentpb/event.pb.go index 123af583cf09..ebd3c6c0c045 100755 --- a/talent/apiv4beta1/talentpb/event.pb.go +++ b/talent/apiv4beta1/talentpb/event.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/event.proto @@ -225,11 +225,9 @@ type ClientEvent struct { func (x *ClientEvent) Reset() { *x = ClientEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClientEvent) String() string { @@ -240,7 +238,7 @@ func (*ClientEvent) ProtoMessage() {} func (x *ClientEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +340,9 @@ type JobEvent struct { func (x *JobEvent) Reset() { *x = JobEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobEvent) String() string { @@ -357,7 +353,7 @@ func (*JobEvent) ProtoMessage() {} func (x *JobEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,32 +495,6 @@ func file_google_cloud_talent_v4beta1_event_proto_init() { if File_google_cloud_talent_v4beta1_event_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ClientEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*JobEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4beta1_event_proto_msgTypes[0].OneofWrappers = []any{ (*ClientEvent_JobEvent)(nil), } diff --git a/talent/apiv4beta1/talentpb/event_service.pb.go b/talent/apiv4beta1/talentpb/event_service.pb.go index 21bbe9d11622..a23a338b547d 100755 --- a/talent/apiv4beta1/talentpb/event_service.pb.go +++ b/talent/apiv4beta1/talentpb/event_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/event_service.proto @@ -59,11 +59,9 @@ type CreateClientEventRequest struct { func (x *CreateClientEventRequest) Reset() { *x = CreateClientEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_event_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_event_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClientEventRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateClientEventRequest) ProtoMessage() {} func (x *CreateClientEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_event_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,20 +198,6 @@ func file_google_cloud_talent_v4beta1_event_service_proto_init() { return } file_google_cloud_talent_v4beta1_event_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_event_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateClientEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/filters.pb.go b/talent/apiv4beta1/talentpb/filters.pb.go index ed62c0f68468..593a944c7ef0 100755 --- a/talent/apiv4beta1/talentpb/filters.pb.go +++ b/talent/apiv4beta1/talentpb/filters.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/filters.proto @@ -410,11 +410,9 @@ type JobQuery struct { func (x *JobQuery) Reset() { *x = JobQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobQuery) String() string { @@ -425,7 +423,7 @@ func (*JobQuery) ProtoMessage() {} func (x *JobQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -604,11 +602,9 @@ type LocationFilter struct { func (x *LocationFilter) Reset() { *x = LocationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationFilter) String() string { @@ -619,7 +615,7 @@ func (*LocationFilter) ProtoMessage() {} func (x *LocationFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +692,9 @@ type CompensationFilter struct { func (x *CompensationFilter) Reset() { *x = CompensationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompensationFilter) String() string { @@ -711,7 +705,7 @@ func (*CompensationFilter) ProtoMessage() {} func (x *CompensationFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,11 +779,9 @@ type CommuteFilter struct { func (x *CommuteFilter) Reset() { *x = CommuteFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommuteFilter) String() string { @@ -800,7 +792,7 @@ func (*CommuteFilter) ProtoMessage() {} func (x *CommuteFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_filters_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1127,56 +1119,6 @@ func file_google_cloud_talent_v4beta1_filters_proto_init() { return } file_google_cloud_talent_v4beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_filters_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*JobQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_filters_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LocationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_filters_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CompensationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_filters_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CommuteFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_talent_v4beta1_filters_proto_msgTypes[3].OneofWrappers = []any{ (*CommuteFilter_RoadTraffic_)(nil), (*CommuteFilter_DepartureTime)(nil), diff --git a/talent/apiv4beta1/talentpb/histogram.pb.go b/talent/apiv4beta1/talentpb/histogram.pb.go index 0a83294e1449..0df1d44573e5 100755 --- a/talent/apiv4beta1/talentpb/histogram.pb.go +++ b/talent/apiv4beta1/talentpb/histogram.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/histogram.proto @@ -54,11 +54,9 @@ type HistogramQuery struct { func (x *HistogramQuery) Reset() { *x = HistogramQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HistogramQuery) String() string { @@ -69,7 +67,7 @@ func (*HistogramQuery) ProtoMessage() {} func (x *HistogramQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type HistogramQueryResult struct { func (x *HistogramQueryResult) Reset() { *x = HistogramQueryResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HistogramQueryResult) String() string { @@ -131,7 +127,7 @@ func (*HistogramQueryResult) ProtoMessage() {} func (x *HistogramQueryResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,32 +224,6 @@ func file_google_cloud_talent_v4beta1_histogram_proto_init() { if File_google_cloud_talent_v4beta1_histogram_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HistogramQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_histogram_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*HistogramQueryResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/job.pb.go b/talent/apiv4beta1/talentpb/job.pb.go index 113a5b7fd989..e30728e6d80b 100755 --- a/talent/apiv4beta1/talentpb/job.pb.go +++ b/talent/apiv4beta1/talentpb/job.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/job.proto @@ -294,11 +294,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -309,7 +307,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,11 +561,9 @@ type Job_ApplicationInfo struct { func (x *Job_ApplicationInfo) Reset() { *x = Job_ApplicationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_ApplicationInfo) String() string { @@ -578,7 +574,7 @@ func (*Job_ApplicationInfo) ProtoMessage() {} func (x *Job_ApplicationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,11 +632,9 @@ type Job_DerivedInfo struct { func (x *Job_DerivedInfo) Reset() { *x = Job_DerivedInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_DerivedInfo) String() string { @@ -651,7 +645,7 @@ func (*Job_DerivedInfo) ProtoMessage() {} func (x *Job_DerivedInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +701,9 @@ type Job_ProcessingOptions struct { func (x *Job_ProcessingOptions) Reset() { *x = Job_ProcessingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job_ProcessingOptions) String() string { @@ -722,7 +714,7 @@ func (*Job_ProcessingOptions) ProtoMessage() {} func (x *Job_ProcessingOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1005,56 +997,6 @@ func file_google_cloud_talent_v4beta1_job_proto_init() { return } file_google_cloud_talent_v4beta1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_job_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Job_ApplicationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Job_DerivedInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Job_ProcessingOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/job_service.pb.go b/talent/apiv4beta1/talentpb/job_service.pb.go index ce9ff3351555..64a43bb39437 100755 --- a/talent/apiv4beta1/talentpb/job_service.pb.go +++ b/talent/apiv4beta1/talentpb/job_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/job_service.proto @@ -435,11 +435,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -450,7 +448,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +496,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -513,7 +509,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +553,9 @@ type UpdateJobRequest struct { func (x *UpdateJobRequest) Reset() { *x = UpdateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateJobRequest) String() string { @@ -572,7 +566,7 @@ func (*UpdateJobRequest) ProtoMessage() {} func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +614,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -635,7 +627,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -685,11 +677,9 @@ type BatchDeleteJobsRequest struct { func (x *BatchDeleteJobsRequest) Reset() { *x = BatchDeleteJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDeleteJobsRequest) String() string { @@ -700,7 +690,7 @@ func (*BatchDeleteJobsRequest) ProtoMessage() {} func (x *BatchDeleteJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +776,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -801,7 +789,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -871,11 +859,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -886,7 +872,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1238,11 +1224,9 @@ type SearchJobsRequest struct { func (x *SearchJobsRequest) Reset() { *x = SearchJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsRequest) String() string { @@ -1253,7 +1237,7 @@ func (*SearchJobsRequest) ProtoMessage() {} func (x *SearchJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1427,11 +1411,9 @@ type SearchJobsResponse struct { func (x *SearchJobsResponse) Reset() { *x = SearchJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse) String() string { @@ -1442,7 +1424,7 @@ func (*SearchJobsResponse) ProtoMessage() {} func (x *SearchJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,11 +1520,9 @@ type BatchCreateJobsRequest struct { func (x *BatchCreateJobsRequest) Reset() { *x = BatchCreateJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchCreateJobsRequest) String() string { @@ -1553,7 +1533,7 @@ func (*BatchCreateJobsRequest) ProtoMessage() {} func (x *BatchCreateJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1620,11 +1600,9 @@ type BatchUpdateJobsRequest struct { func (x *BatchUpdateJobsRequest) Reset() { *x = BatchUpdateJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchUpdateJobsRequest) String() string { @@ -1635,7 +1613,7 @@ func (*BatchUpdateJobsRequest) ProtoMessage() {} func (x *BatchUpdateJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1690,11 +1668,9 @@ type JobOperationResult struct { func (x *JobOperationResult) Reset() { *x = JobOperationResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobOperationResult) String() string { @@ -1705,7 +1681,7 @@ func (*JobOperationResult) ProtoMessage() {} func (x *JobOperationResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1768,11 +1744,9 @@ type SearchJobsRequest_CustomRankingInfo struct { func (x *SearchJobsRequest_CustomRankingInfo) Reset() { *x = SearchJobsRequest_CustomRankingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsRequest_CustomRankingInfo) String() string { @@ -1783,7 +1757,7 @@ func (*SearchJobsRequest_CustomRankingInfo) ProtoMessage() {} func (x *SearchJobsRequest_CustomRankingInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1845,11 +1819,9 @@ type SearchJobsResponse_MatchingJob struct { func (x *SearchJobsResponse_MatchingJob) Reset() { *x = SearchJobsResponse_MatchingJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse_MatchingJob) String() string { @@ -1860,7 +1832,7 @@ func (*SearchJobsResponse_MatchingJob) ProtoMessage() {} func (x *SearchJobsResponse_MatchingJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1927,11 +1899,9 @@ type SearchJobsResponse_CommuteInfo struct { func (x *SearchJobsResponse_CommuteInfo) Reset() { *x = SearchJobsResponse_CommuteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchJobsResponse_CommuteInfo) String() string { @@ -1942,7 +1912,7 @@ func (*SearchJobsResponse_CommuteInfo) ProtoMessage() {} func (x *SearchJobsResponse_CommuteInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1994,11 +1964,9 @@ type JobOperationResult_JobResult struct { func (x *JobOperationResult_JobResult) Reset() { *x = JobOperationResult_JobResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobOperationResult_JobResult) String() string { @@ -2009,7 +1977,7 @@ func (*JobOperationResult_JobResult) ProtoMessage() {} func (x *JobOperationResult_JobResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2630,200 +2598,6 @@ func file_google_cloud_talent_v4beta1_job_service_proto_init() { file_google_cloud_talent_v4beta1_filters_proto_init() file_google_cloud_talent_v4beta1_histogram_proto_init() file_google_cloud_talent_v4beta1_job_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BatchDeleteJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*BatchCreateJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BatchUpdateJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*JobOperationResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsRequest_CustomRankingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse_MatchingJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SearchJobsResponse_CommuteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_job_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*JobOperationResult_JobResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/tenant.pb.go b/talent/apiv4beta1/talentpb/tenant.pb.go index 8f1e4dc0a7db..edcdd9aa2d45 100755 --- a/talent/apiv4beta1/talentpb/tenant.pb.go +++ b/talent/apiv4beta1/talentpb/tenant.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/tenant.proto @@ -132,11 +132,9 @@ type Tenant struct { func (x *Tenant) Reset() { *x = Tenant{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Tenant) String() string { @@ -147,7 +145,7 @@ func (*Tenant) ProtoMessage() {} func (x *Tenant) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,20 +267,6 @@ func file_google_cloud_talent_v4beta1_tenant_proto_init() { if File_google_cloud_talent_v4beta1_tenant_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_tenant_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Tenant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/talentpb/tenant_service.pb.go b/talent/apiv4beta1/talentpb/tenant_service.pb.go index 59b882c3e45b..d51659f437ed 100755 --- a/talent/apiv4beta1/talentpb/tenant_service.pb.go +++ b/talent/apiv4beta1/talentpb/tenant_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/talent/v4beta1/tenant_service.proto @@ -59,11 +59,9 @@ type CreateTenantRequest struct { func (x *CreateTenantRequest) Reset() { *x = CreateTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTenantRequest) String() string { @@ -74,7 +72,7 @@ func (*CreateTenantRequest) ProtoMessage() {} func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +116,9 @@ type GetTenantRequest struct { func (x *GetTenantRequest) Reset() { *x = GetTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTenantRequest) String() string { @@ -133,7 +129,7 @@ func (*GetTenantRequest) ProtoMessage() {} func (x *GetTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -180,11 +176,9 @@ type UpdateTenantRequest struct { func (x *UpdateTenantRequest) Reset() { *x = UpdateTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTenantRequest) String() string { @@ -195,7 +189,7 @@ func (*UpdateTenantRequest) ProtoMessage() {} func (x *UpdateTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +233,9 @@ type DeleteTenantRequest struct { func (x *DeleteTenantRequest) Reset() { *x = DeleteTenantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTenantRequest) String() string { @@ -254,7 +246,7 @@ func (*DeleteTenantRequest) ProtoMessage() {} func (x *DeleteTenantRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,11 +288,9 @@ type ListTenantsRequest struct { func (x *ListTenantsRequest) Reset() { *x = ListTenantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTenantsRequest) String() string { @@ -311,7 +301,7 @@ func (*ListTenantsRequest) ProtoMessage() {} func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +354,9 @@ type ListTenantsResponse struct { func (x *ListTenantsResponse) Reset() { *x = ListTenantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTenantsResponse) String() string { @@ -379,7 +367,7 @@ func (*ListTenantsResponse) ProtoMessage() {} func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,80 +603,6 @@ func file_google_cloud_talent_v4beta1_tenant_service_proto_init() { } file_google_cloud_talent_v4beta1_common_proto_init() file_google_cloud_talent_v4beta1_tenant_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTenantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTenantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_talent_v4beta1_tenant_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListTenantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/talent/apiv4beta1/tenant_client.go b/talent/apiv4beta1/tenant_client.go index bea510352f43..96c80eb618f8 100755 --- a/talent/apiv4beta1/tenant_client.go +++ b/talent/apiv4beta1/tenant_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" talentpb "cloud.google.com/go/talent/apiv4beta1/talentpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -262,6 +261,8 @@ type tenantGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTenantClient creates a new tenant service client based on gRPC. @@ -288,6 +289,7 @@ func NewTenantClient(ctx context.Context, opts ...option.ClientOption) (*TenantC connPool: connPool, tenantClient: talentpb.NewTenantServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -335,6 +337,8 @@ type tenantRESTClient struct { // Points back to the CallOptions field of the containing TenantClient CallOptions **TenantCallOptions + + logger *slog.Logger } // NewTenantRESTClient creates a new tenant service rest client. @@ -352,6 +356,7 @@ func NewTenantRESTClient(ctx context.Context, opts ...option.ClientOption) (*Ten endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -404,7 +409,7 @@ func (c *tenantGRPCClient) CreateTenant(ctx context.Context, req *talentpb.Creat var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.CreateTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.CreateTenant, req, settings.GRPC, c.logger, "CreateTenant") return err }, opts...) if err != nil { @@ -422,7 +427,7 @@ func (c *tenantGRPCClient) GetTenant(ctx context.Context, req *talentpb.GetTenan var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.GetTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.GetTenant, req, settings.GRPC, c.logger, "GetTenant") return err }, opts...) if err != nil { @@ -440,7 +445,7 @@ func (c *tenantGRPCClient) UpdateTenant(ctx context.Context, req *talentpb.Updat var resp *talentpb.Tenant err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.UpdateTenant(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.UpdateTenant, req, settings.GRPC, c.logger, "UpdateTenant") return err }, opts...) if err != nil { @@ -457,7 +462,7 @@ func (c *tenantGRPCClient) DeleteTenant(ctx context.Context, req *talentpb.Delet opts = append((*c.CallOptions).DeleteTenant[0:len((*c.CallOptions).DeleteTenant):len((*c.CallOptions).DeleteTenant)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.tenantClient.DeleteTenant(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.tenantClient.DeleteTenant, req, settings.GRPC, c.logger, "DeleteTenant") return err }, opts...) return err @@ -483,7 +488,7 @@ func (c *tenantGRPCClient) ListTenants(ctx context.Context, req *talentpb.ListTe } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.tenantClient.ListTenants(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.tenantClient.ListTenants, req, settings.GRPC, c.logger, "ListTenants") return err }, opts...) if err != nil { @@ -518,7 +523,7 @@ func (c *tenantGRPCClient) GetOperation(ctx context.Context, req *longrunningpb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -566,17 +571,7 @@ func (c *tenantRESTClient) CreateTenant(ctx context.Context, req *talentpb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTenant") if err != nil { return err } @@ -626,17 +621,7 @@ func (c *tenantRESTClient) GetTenant(ctx context.Context, req *talentpb.GetTenan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTenant") if err != nil { return err } @@ -692,17 +677,7 @@ func (c *tenantRESTClient) UpdateTenant(ctx context.Context, req *talentpb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTenant") if err != nil { return err } @@ -749,15 +724,8 @@ func (c *tenantRESTClient) DeleteTenant(ctx context.Context, req *talentpb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTenant") + return err }, opts...) } @@ -806,21 +774,10 @@ func (c *tenantRESTClient) ListTenants(ctx context.Context, req *talentpb.ListTe } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTenants") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -883,17 +840,7 @@ func (c *tenantRESTClient) GetOperation(ctx context.Context, req *longrunningpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/talent/apiv4beta1/tenant_client_example_go123_test.go b/talent/apiv4beta1/tenant_client_example_go123_test.go index a5246c647c48..85d0977bc46f 100644 --- a/talent/apiv4beta1/tenant_client_example_go123_test.go +++ b/talent/apiv4beta1/tenant_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTenantClient_ListTenants_all() { } for resp, err := range c.ListTenants(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/telcoautomation/apiv1/helpers.go b/telcoautomation/apiv1/helpers.go index a147e7c3c75d..cee5075c1dab 100755 --- a/telcoautomation/apiv1/helpers.go +++ b/telcoautomation/apiv1/helpers.go @@ -18,10 +18,20 @@ package telcoautomation import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "telcoautomation.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/telcoautomation/apiv1/telco_automation_client.go b/telcoautomation/apiv1/telco_automation_client.go index 1c7af0421b93..4b7eee06f7fe 100755 --- a/telcoautomation/apiv1/telco_automation_client.go +++ b/telcoautomation/apiv1/telco_automation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" telcoautomationpb "cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -561,6 +560,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new telco automation client based on gRPC. @@ -591,6 +592,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: telcoautomationpb.NewTelcoAutomationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -655,6 +657,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new telco automation rest client. @@ -676,6 +680,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -749,7 +754,7 @@ func (c *gRPCClient) ListOrchestrationClusters(ctx context.Context, req *telcoau } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListOrchestrationClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListOrchestrationClusters, req, settings.GRPC, c.logger, "ListOrchestrationClusters") return err }, opts...) if err != nil { @@ -784,7 +789,7 @@ func (c *gRPCClient) GetOrchestrationCluster(ctx context.Context, req *telcoauto var resp *telcoautomationpb.OrchestrationCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetOrchestrationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetOrchestrationCluster, req, settings.GRPC, c.logger, "GetOrchestrationCluster") return err }, opts...) if err != nil { @@ -802,7 +807,7 @@ func (c *gRPCClient) CreateOrchestrationCluster(ctx context.Context, req *telcoa var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateOrchestrationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateOrchestrationCluster, req, settings.GRPC, c.logger, "CreateOrchestrationCluster") return err }, opts...) if err != nil { @@ -822,7 +827,7 @@ func (c *gRPCClient) DeleteOrchestrationCluster(ctx context.Context, req *telcoa var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteOrchestrationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteOrchestrationCluster, req, settings.GRPC, c.logger, "DeleteOrchestrationCluster") return err }, opts...) if err != nil { @@ -853,7 +858,7 @@ func (c *gRPCClient) ListEdgeSlms(ctx context.Context, req *telcoautomationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEdgeSlms(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEdgeSlms, req, settings.GRPC, c.logger, "ListEdgeSlms") return err }, opts...) if err != nil { @@ -888,7 +893,7 @@ func (c *gRPCClient) GetEdgeSlm(ctx context.Context, req *telcoautomationpb.GetE var resp *telcoautomationpb.EdgeSlm err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEdgeSlm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEdgeSlm, req, settings.GRPC, c.logger, "GetEdgeSlm") return err }, opts...) if err != nil { @@ -906,7 +911,7 @@ func (c *gRPCClient) CreateEdgeSlm(ctx context.Context, req *telcoautomationpb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEdgeSlm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEdgeSlm, req, settings.GRPC, c.logger, "CreateEdgeSlm") return err }, opts...) if err != nil { @@ -926,7 +931,7 @@ func (c *gRPCClient) DeleteEdgeSlm(ctx context.Context, req *telcoautomationpb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteEdgeSlm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteEdgeSlm, req, settings.GRPC, c.logger, "DeleteEdgeSlm") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) CreateBlueprint(ctx context.Context, req *telcoautomationpb var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateBlueprint, req, settings.GRPC, c.logger, "CreateBlueprint") return err }, opts...) if err != nil { @@ -964,7 +969,7 @@ func (c *gRPCClient) UpdateBlueprint(ctx context.Context, req *telcoautomationpb var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateBlueprint, req, settings.GRPC, c.logger, "UpdateBlueprint") return err }, opts...) if err != nil { @@ -982,7 +987,7 @@ func (c *gRPCClient) GetBlueprint(ctx context.Context, req *telcoautomationpb.Ge var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetBlueprint, req, settings.GRPC, c.logger, "GetBlueprint") return err }, opts...) if err != nil { @@ -999,7 +1004,7 @@ func (c *gRPCClient) DeleteBlueprint(ctx context.Context, req *telcoautomationpb opts = append((*c.CallOptions).DeleteBlueprint[0:len((*c.CallOptions).DeleteBlueprint):len((*c.CallOptions).DeleteBlueprint)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteBlueprint(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteBlueprint, req, settings.GRPC, c.logger, "DeleteBlueprint") return err }, opts...) return err @@ -1025,7 +1030,7 @@ func (c *gRPCClient) ListBlueprints(ctx context.Context, req *telcoautomationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBlueprints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBlueprints, req, settings.GRPC, c.logger, "ListBlueprints") return err }, opts...) if err != nil { @@ -1060,7 +1065,7 @@ func (c *gRPCClient) ApproveBlueprint(ctx context.Context, req *telcoautomationp var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApproveBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApproveBlueprint, req, settings.GRPC, c.logger, "ApproveBlueprint") return err }, opts...) if err != nil { @@ -1078,7 +1083,7 @@ func (c *gRPCClient) ProposeBlueprint(ctx context.Context, req *telcoautomationp var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ProposeBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ProposeBlueprint, req, settings.GRPC, c.logger, "ProposeBlueprint") return err }, opts...) if err != nil { @@ -1096,7 +1101,7 @@ func (c *gRPCClient) RejectBlueprint(ctx context.Context, req *telcoautomationpb var resp *telcoautomationpb.Blueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RejectBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RejectBlueprint, req, settings.GRPC, c.logger, "RejectBlueprint") return err }, opts...) if err != nil { @@ -1125,7 +1130,7 @@ func (c *gRPCClient) ListBlueprintRevisions(ctx context.Context, req *telcoautom } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListBlueprintRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListBlueprintRevisions, req, settings.GRPC, c.logger, "ListBlueprintRevisions") return err }, opts...) if err != nil { @@ -1171,7 +1176,7 @@ func (c *gRPCClient) SearchBlueprintRevisions(ctx context.Context, req *telcoaut } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchBlueprintRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchBlueprintRevisions, req, settings.GRPC, c.logger, "SearchBlueprintRevisions") return err }, opts...) if err != nil { @@ -1217,7 +1222,7 @@ func (c *gRPCClient) SearchDeploymentRevisions(ctx context.Context, req *telcoau } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchDeploymentRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchDeploymentRevisions, req, settings.GRPC, c.logger, "SearchDeploymentRevisions") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *gRPCClient) DiscardBlueprintChanges(ctx context.Context, req *telcoauto var resp *telcoautomationpb.DiscardBlueprintChangesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiscardBlueprintChanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiscardBlueprintChanges, req, settings.GRPC, c.logger, "DiscardBlueprintChanges") return err }, opts...) if err != nil { @@ -1281,7 +1286,7 @@ func (c *gRPCClient) ListPublicBlueprints(ctx context.Context, req *telcoautomat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPublicBlueprints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPublicBlueprints, req, settings.GRPC, c.logger, "ListPublicBlueprints") return err }, opts...) if err != nil { @@ -1316,7 +1321,7 @@ func (c *gRPCClient) GetPublicBlueprint(ctx context.Context, req *telcoautomatio var resp *telcoautomationpb.PublicBlueprint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPublicBlueprint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPublicBlueprint, req, settings.GRPC, c.logger, "GetPublicBlueprint") return err }, opts...) if err != nil { @@ -1334,7 +1339,7 @@ func (c *gRPCClient) CreateDeployment(ctx context.Context, req *telcoautomationp var resp *telcoautomationpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDeployment, req, settings.GRPC, c.logger, "CreateDeployment") return err }, opts...) if err != nil { @@ -1352,7 +1357,7 @@ func (c *gRPCClient) UpdateDeployment(ctx context.Context, req *telcoautomationp var resp *telcoautomationpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDeployment, req, settings.GRPC, c.logger, "UpdateDeployment") return err }, opts...) if err != nil { @@ -1370,7 +1375,7 @@ func (c *gRPCClient) GetDeployment(ctx context.Context, req *telcoautomationpb.G var resp *telcoautomationpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDeployment, req, settings.GRPC, c.logger, "GetDeployment") return err }, opts...) if err != nil { @@ -1387,7 +1392,7 @@ func (c *gRPCClient) RemoveDeployment(ctx context.Context, req *telcoautomationp opts = append((*c.CallOptions).RemoveDeployment[0:len((*c.CallOptions).RemoveDeployment):len((*c.CallOptions).RemoveDeployment)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.RemoveDeployment(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.RemoveDeployment, req, settings.GRPC, c.logger, "RemoveDeployment") return err }, opts...) return err @@ -1413,7 +1418,7 @@ func (c *gRPCClient) ListDeployments(ctx context.Context, req *telcoautomationpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeployments, req, settings.GRPC, c.logger, "ListDeployments") return err }, opts...) if err != nil { @@ -1459,7 +1464,7 @@ func (c *gRPCClient) ListDeploymentRevisions(ctx context.Context, req *telcoauto } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDeploymentRevisions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDeploymentRevisions, req, settings.GRPC, c.logger, "ListDeploymentRevisions") return err }, opts...) if err != nil { @@ -1494,7 +1499,7 @@ func (c *gRPCClient) DiscardDeploymentChanges(ctx context.Context, req *telcoaut var resp *telcoautomationpb.DiscardDeploymentChangesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DiscardDeploymentChanges(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DiscardDeploymentChanges, req, settings.GRPC, c.logger, "DiscardDeploymentChanges") return err }, opts...) if err != nil { @@ -1512,7 +1517,7 @@ func (c *gRPCClient) ApplyDeployment(ctx context.Context, req *telcoautomationpb var resp *telcoautomationpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApplyDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApplyDeployment, req, settings.GRPC, c.logger, "ApplyDeployment") return err }, opts...) if err != nil { @@ -1530,7 +1535,7 @@ func (c *gRPCClient) ComputeDeploymentStatus(ctx context.Context, req *telcoauto var resp *telcoautomationpb.ComputeDeploymentStatusResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComputeDeploymentStatus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComputeDeploymentStatus, req, settings.GRPC, c.logger, "ComputeDeploymentStatus") return err }, opts...) if err != nil { @@ -1548,7 +1553,7 @@ func (c *gRPCClient) RollbackDeployment(ctx context.Context, req *telcoautomatio var resp *telcoautomationpb.Deployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RollbackDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RollbackDeployment, req, settings.GRPC, c.logger, "RollbackDeployment") return err }, opts...) if err != nil { @@ -1566,7 +1571,7 @@ func (c *gRPCClient) GetHydratedDeployment(ctx context.Context, req *telcoautoma var resp *telcoautomationpb.HydratedDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetHydratedDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetHydratedDeployment, req, settings.GRPC, c.logger, "GetHydratedDeployment") return err }, opts...) if err != nil { @@ -1595,7 +1600,7 @@ func (c *gRPCClient) ListHydratedDeployments(ctx context.Context, req *telcoauto } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListHydratedDeployments(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListHydratedDeployments, req, settings.GRPC, c.logger, "ListHydratedDeployments") return err }, opts...) if err != nil { @@ -1630,7 +1635,7 @@ func (c *gRPCClient) UpdateHydratedDeployment(ctx context.Context, req *telcoaut var resp *telcoautomationpb.HydratedDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateHydratedDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateHydratedDeployment, req, settings.GRPC, c.logger, "UpdateHydratedDeployment") return err }, opts...) if err != nil { @@ -1648,7 +1653,7 @@ func (c *gRPCClient) ApplyHydratedDeployment(ctx context.Context, req *telcoauto var resp *telcoautomationpb.HydratedDeployment err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ApplyHydratedDeployment(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ApplyHydratedDeployment, req, settings.GRPC, c.logger, "ApplyHydratedDeployment") return err }, opts...) if err != nil { @@ -1666,7 +1671,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1695,7 +1700,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1729,7 +1734,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1743,7 +1748,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1758,7 +1763,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1787,7 +1792,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1864,21 +1869,10 @@ func (c *restClient) ListOrchestrationClusters(ctx context.Context, req *telcoau } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOrchestrationClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1941,17 +1935,7 @@ func (c *restClient) GetOrchestrationCluster(ctx context.Context, req *telcoauto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOrchestrationCluster") if err != nil { return err } @@ -2011,21 +1995,10 @@ func (c *restClient) CreateOrchestrationCluster(ctx context.Context, req *telcoa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOrchestrationCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2078,21 +2051,10 @@ func (c *restClient) DeleteOrchestrationCluster(ctx context.Context, req *telcoa httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOrchestrationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2161,21 +2123,10 @@ func (c *restClient) ListEdgeSlms(ctx context.Context, req *telcoautomationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEdgeSlms") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2238,17 +2189,7 @@ func (c *restClient) GetEdgeSlm(ctx context.Context, req *telcoautomationpb.GetE httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEdgeSlm") if err != nil { return err } @@ -2308,21 +2249,10 @@ func (c *restClient) CreateEdgeSlm(ctx context.Context, req *telcoautomationpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEdgeSlm") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2375,21 +2305,10 @@ func (c *restClient) DeleteEdgeSlm(ctx context.Context, req *telcoautomationpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEdgeSlm") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2450,17 +2369,7 @@ func (c *restClient) CreateBlueprint(ctx context.Context, req *telcoautomationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateBlueprint") if err != nil { return err } @@ -2524,17 +2433,7 @@ func (c *restClient) UpdateBlueprint(ctx context.Context, req *telcoautomationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateBlueprint") if err != nil { return err } @@ -2587,17 +2486,7 @@ func (c *restClient) GetBlueprint(ctx context.Context, req *telcoautomationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetBlueprint") if err != nil { return err } @@ -2644,15 +2533,8 @@ func (c *restClient) DeleteBlueprint(ctx context.Context, req *telcoautomationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteBlueprint") + return err }, opts...) } @@ -2704,21 +2586,10 @@ func (c *restClient) ListBlueprints(ctx context.Context, req *telcoautomationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBlueprints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2787,17 +2658,7 @@ func (c *restClient) ApproveBlueprint(ctx context.Context, req *telcoautomationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveBlueprint") if err != nil { return err } @@ -2853,17 +2714,7 @@ func (c *restClient) ProposeBlueprint(ctx context.Context, req *telcoautomationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ProposeBlueprint") if err != nil { return err } @@ -2919,17 +2770,7 @@ func (c *restClient) RejectBlueprint(ctx context.Context, req *telcoautomationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RejectBlueprint") if err != nil { return err } @@ -2991,21 +2832,10 @@ func (c *restClient) ListBlueprintRevisions(ctx context.Context, req *telcoautom } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListBlueprintRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3081,21 +2911,10 @@ func (c *restClient) SearchBlueprintRevisions(ctx context.Context, req *telcoaut } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchBlueprintRevisions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3171,21 +2990,10 @@ func (c *restClient) SearchDeploymentRevisions(ctx context.Context, req *telcoau } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchDeploymentRevisions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3256,17 +3064,7 @@ func (c *restClient) DiscardBlueprintChanges(ctx context.Context, req *telcoauto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiscardBlueprintChanges") if err != nil { return err } @@ -3329,21 +3127,10 @@ func (c *restClient) ListPublicBlueprints(ctx context.Context, req *telcoautomat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPublicBlueprints") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3406,17 +3193,7 @@ func (c *restClient) GetPublicBlueprint(ctx context.Context, req *telcoautomatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPublicBlueprint") if err != nil { return err } @@ -3476,17 +3253,7 @@ func (c *restClient) CreateDeployment(ctx context.Context, req *telcoautomationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDeployment") if err != nil { return err } @@ -3550,17 +3317,7 @@ func (c *restClient) UpdateDeployment(ctx context.Context, req *telcoautomationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDeployment") if err != nil { return err } @@ -3613,17 +3370,7 @@ func (c *restClient) GetDeployment(ctx context.Context, req *telcoautomationpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeployment") if err != nil { return err } @@ -3677,15 +3424,8 @@ func (c *restClient) RemoveDeployment(ctx context.Context, req *telcoautomationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveDeployment") + return err }, opts...) } @@ -3737,21 +3477,10 @@ func (c *restClient) ListDeployments(ctx context.Context, req *telcoautomationpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeployments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3826,21 +3555,10 @@ func (c *restClient) ListDeploymentRevisions(ctx context.Context, req *telcoauto } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDeploymentRevisions") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3911,17 +3629,7 @@ func (c *restClient) DiscardDeploymentChanges(ctx context.Context, req *telcoaut httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DiscardDeploymentChanges") if err != nil { return err } @@ -3977,17 +3685,7 @@ func (c *restClient) ApplyDeployment(ctx context.Context, req *telcoautomationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyDeployment") if err != nil { return err } @@ -4037,17 +3735,7 @@ func (c *restClient) ComputeDeploymentStatus(ctx context.Context, req *telcoauto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ComputeDeploymentStatus") if err != nil { return err } @@ -4104,17 +3792,7 @@ func (c *restClient) RollbackDeployment(ctx context.Context, req *telcoautomatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RollbackDeployment") if err != nil { return err } @@ -4164,17 +3842,7 @@ func (c *restClient) GetHydratedDeployment(ctx context.Context, req *telcoautoma httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHydratedDeployment") if err != nil { return err } @@ -4236,21 +3904,10 @@ func (c *restClient) ListHydratedDeployments(ctx context.Context, req *telcoauto } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHydratedDeployments") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4327,17 +3984,7 @@ func (c *restClient) UpdateHydratedDeployment(ctx context.Context, req *telcoaut httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateHydratedDeployment") if err != nil { return err } @@ -4393,17 +4040,7 @@ func (c *restClient) ApplyHydratedDeployment(ctx context.Context, req *telcoauto httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApplyHydratedDeployment") if err != nil { return err } @@ -4453,17 +4090,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4528,21 +4155,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4608,15 +4224,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4650,15 +4259,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4695,17 +4297,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -4770,21 +4362,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/telcoautomation/apiv1/telco_automation_client_example_go123_test.go b/telcoautomation/apiv1/telco_automation_client_example_go123_test.go index 82edc3234a59..3fe197dc08f9 100644 --- a/telcoautomation/apiv1/telco_automation_client_example_go123_test.go +++ b/telcoautomation/apiv1/telco_automation_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListBlueprintRevisions_all() { } for resp, err := range c.ListBlueprintRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListBlueprints_all() { } for resp, err := range c.ListBlueprints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListDeploymentRevisions_all() { } for resp, err := range c.ListDeploymentRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListDeployments_all() { } for resp, err := range c.ListDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListEdgeSlms_all() { } for resp, err := range c.ListEdgeSlms(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListHydratedDeployments_all() { } for resp, err := range c.ListHydratedDeployments(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListOrchestrationClusters_all() { } for resp, err := range c.ListOrchestrationClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListPublicBlueprints_all() { } for resp, err := range c.ListPublicBlueprints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_SearchBlueprintRevisions_all() { } for resp, err := range c.SearchBlueprintRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_SearchDeploymentRevisions_all() { } for resp, err := range c.SearchDeploymentRevisions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -332,7 +332,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/telcoautomation/apiv1/telcoautomationpb/telcoautomation.pb.go b/telcoautomation/apiv1/telcoautomationpb/telcoautomation.pb.go index fe901e3007c8..f0b9334e7242 100755 --- a/telcoautomation/apiv1/telcoautomationpb/telcoautomation.pb.go +++ b/telcoautomation/apiv1/telcoautomationpb/telcoautomation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/telcoautomation/v1/telcoautomation.proto @@ -741,11 +741,9 @@ type OrchestrationCluster struct { func (x *OrchestrationCluster) Reset() { *x = OrchestrationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OrchestrationCluster) String() string { @@ -756,7 +754,7 @@ func (*OrchestrationCluster) ProtoMessage() {} func (x *OrchestrationCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,11 +850,9 @@ type EdgeSlm struct { func (x *EdgeSlm) Reset() { *x = EdgeSlm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EdgeSlm) String() string { @@ -867,7 +863,7 @@ func (*EdgeSlm) ProtoMessage() {} func (x *EdgeSlm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +989,9 @@ type Blueprint struct { func (x *Blueprint) Reset() { *x = Blueprint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Blueprint) String() string { @@ -1008,7 +1002,7 @@ func (*Blueprint) ProtoMessage() {} func (x *Blueprint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1144,9 @@ type PublicBlueprint struct { func (x *PublicBlueprint) Reset() { *x = PublicBlueprint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicBlueprint) String() string { @@ -1165,7 +1157,7 @@ func (*PublicBlueprint) ProtoMessage() {} func (x *PublicBlueprint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1276,11 +1268,9 @@ type Deployment struct { func (x *Deployment) Reset() { *x = Deployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Deployment) String() string { @@ -1291,7 +1281,7 @@ func (*Deployment) ProtoMessage() {} func (x *Deployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1424,9 @@ type HydratedDeployment struct { func (x *HydratedDeployment) Reset() { *x = HydratedDeployment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HydratedDeployment) String() string { @@ -1449,7 +1437,7 @@ func (*HydratedDeployment) ProtoMessage() {} func (x *HydratedDeployment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1513,11 +1501,9 @@ type ListOrchestrationClustersRequest struct { func (x *ListOrchestrationClustersRequest) Reset() { *x = ListOrchestrationClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrchestrationClustersRequest) String() string { @@ -1528,7 +1514,7 @@ func (*ListOrchestrationClustersRequest) ProtoMessage() {} func (x *ListOrchestrationClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,11 +1580,9 @@ type ListOrchestrationClustersResponse struct { func (x *ListOrchestrationClustersResponse) Reset() { *x = ListOrchestrationClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOrchestrationClustersResponse) String() string { @@ -1609,7 +1593,7 @@ func (*ListOrchestrationClustersResponse) ProtoMessage() {} func (x *ListOrchestrationClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1657,11 +1641,9 @@ type GetOrchestrationClusterRequest struct { func (x *GetOrchestrationClusterRequest) Reset() { *x = GetOrchestrationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOrchestrationClusterRequest) String() string { @@ -1672,7 +1654,7 @@ func (*GetOrchestrationClusterRequest) ProtoMessage() {} func (x *GetOrchestrationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1726,11 +1708,9 @@ type CreateOrchestrationClusterRequest struct { func (x *CreateOrchestrationClusterRequest) Reset() { *x = CreateOrchestrationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOrchestrationClusterRequest) String() string { @@ -1741,7 +1721,7 @@ func (*CreateOrchestrationClusterRequest) ProtoMessage() {} func (x *CreateOrchestrationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1810,11 +1790,9 @@ type DeleteOrchestrationClusterRequest struct { func (x *DeleteOrchestrationClusterRequest) Reset() { *x = DeleteOrchestrationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOrchestrationClusterRequest) String() string { @@ -1825,7 +1803,7 @@ func (*DeleteOrchestrationClusterRequest) ProtoMessage() {} func (x *DeleteOrchestrationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1875,11 +1853,9 @@ type ListEdgeSlmsRequest struct { func (x *ListEdgeSlmsRequest) Reset() { *x = ListEdgeSlmsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEdgeSlmsRequest) String() string { @@ -1890,7 +1866,7 @@ func (*ListEdgeSlmsRequest) ProtoMessage() {} func (x *ListEdgeSlmsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1932,9 @@ type ListEdgeSlmsResponse struct { func (x *ListEdgeSlmsResponse) Reset() { *x = ListEdgeSlmsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEdgeSlmsResponse) String() string { @@ -1971,7 +1945,7 @@ func (*ListEdgeSlmsResponse) ProtoMessage() {} func (x *ListEdgeSlmsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2019,11 +1993,9 @@ type GetEdgeSlmRequest struct { func (x *GetEdgeSlmRequest) Reset() { *x = GetEdgeSlmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEdgeSlmRequest) String() string { @@ -2034,7 +2006,7 @@ func (*GetEdgeSlmRequest) ProtoMessage() {} func (x *GetEdgeSlmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2088,11 +2060,9 @@ type CreateEdgeSlmRequest struct { func (x *CreateEdgeSlmRequest) Reset() { *x = CreateEdgeSlmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEdgeSlmRequest) String() string { @@ -2103,7 +2073,7 @@ func (*CreateEdgeSlmRequest) ProtoMessage() {} func (x *CreateEdgeSlmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2172,11 +2142,9 @@ type DeleteEdgeSlmRequest struct { func (x *DeleteEdgeSlmRequest) Reset() { *x = DeleteEdgeSlmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEdgeSlmRequest) String() string { @@ -2187,7 +2155,7 @@ func (*DeleteEdgeSlmRequest) ProtoMessage() {} func (x *DeleteEdgeSlmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,11 +2202,9 @@ type CreateBlueprintRequest struct { func (x *CreateBlueprintRequest) Reset() { *x = CreateBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBlueprintRequest) String() string { @@ -2249,7 +2215,7 @@ func (*CreateBlueprintRequest) ProtoMessage() {} func (x *CreateBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2300,11 +2266,9 @@ type UpdateBlueprintRequest struct { func (x *UpdateBlueprintRequest) Reset() { *x = UpdateBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateBlueprintRequest) String() string { @@ -2315,7 +2279,7 @@ func (*UpdateBlueprintRequest) ProtoMessage() {} func (x *UpdateBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2363,11 +2327,9 @@ type GetBlueprintRequest struct { func (x *GetBlueprintRequest) Reset() { *x = GetBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBlueprintRequest) String() string { @@ -2378,7 +2340,7 @@ func (*GetBlueprintRequest) ProtoMessage() {} func (x *GetBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2422,11 +2384,9 @@ type DeleteBlueprintRequest struct { func (x *DeleteBlueprintRequest) Reset() { *x = DeleteBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBlueprintRequest) String() string { @@ -2437,7 +2397,7 @@ func (*DeleteBlueprintRequest) ProtoMessage() {} func (x *DeleteBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2482,11 +2442,9 @@ type ListBlueprintsRequest struct { func (x *ListBlueprintsRequest) Reset() { *x = ListBlueprintsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBlueprintsRequest) String() string { @@ -2497,7 +2455,7 @@ func (*ListBlueprintsRequest) ProtoMessage() {} func (x *ListBlueprintsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2555,11 +2513,9 @@ type ListBlueprintsResponse struct { func (x *ListBlueprintsResponse) Reset() { *x = ListBlueprintsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBlueprintsResponse) String() string { @@ -2570,7 +2526,7 @@ func (*ListBlueprintsResponse) ProtoMessage() {} func (x *ListBlueprintsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2612,11 +2568,9 @@ type ApproveBlueprintRequest struct { func (x *ApproveBlueprintRequest) Reset() { *x = ApproveBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApproveBlueprintRequest) String() string { @@ -2627,7 +2581,7 @@ func (*ApproveBlueprintRequest) ProtoMessage() {} func (x *ApproveBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2661,11 +2615,9 @@ type ProposeBlueprintRequest struct { func (x *ProposeBlueprintRequest) Reset() { *x = ProposeBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProposeBlueprintRequest) String() string { @@ -2676,7 +2628,7 @@ func (*ProposeBlueprintRequest) ProtoMessage() {} func (x *ProposeBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2710,11 +2662,9 @@ type RejectBlueprintRequest struct { func (x *RejectBlueprintRequest) Reset() { *x = RejectBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RejectBlueprintRequest) String() string { @@ -2725,7 +2675,7 @@ func (*RejectBlueprintRequest) ProtoMessage() {} func (x *RejectBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2764,11 +2714,9 @@ type ListBlueprintRevisionsRequest struct { func (x *ListBlueprintRevisionsRequest) Reset() { *x = ListBlueprintRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBlueprintRevisionsRequest) String() string { @@ -2779,7 +2727,7 @@ func (*ListBlueprintRevisionsRequest) ProtoMessage() {} func (x *ListBlueprintRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2830,11 +2778,9 @@ type ListBlueprintRevisionsResponse struct { func (x *ListBlueprintRevisionsResponse) Reset() { *x = ListBlueprintRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListBlueprintRevisionsResponse) String() string { @@ -2845,7 +2791,7 @@ func (*ListBlueprintRevisionsResponse) ProtoMessage() {} func (x *ListBlueprintRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2902,11 +2848,9 @@ type SearchBlueprintRevisionsRequest struct { func (x *SearchBlueprintRevisionsRequest) Reset() { *x = SearchBlueprintRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchBlueprintRevisionsRequest) String() string { @@ -2917,7 +2861,7 @@ func (*SearchBlueprintRevisionsRequest) ProtoMessage() {} func (x *SearchBlueprintRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2975,11 +2919,9 @@ type SearchBlueprintRevisionsResponse struct { func (x *SearchBlueprintRevisionsResponse) Reset() { *x = SearchBlueprintRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchBlueprintRevisionsResponse) String() string { @@ -2990,7 +2932,7 @@ func (*SearchBlueprintRevisionsResponse) ProtoMessage() {} func (x *SearchBlueprintRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3031,11 +2973,9 @@ type DiscardBlueprintChangesRequest struct { func (x *DiscardBlueprintChangesRequest) Reset() { *x = DiscardBlueprintChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscardBlueprintChangesRequest) String() string { @@ -3046,7 +2986,7 @@ func (*DiscardBlueprintChangesRequest) ProtoMessage() {} func (x *DiscardBlueprintChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3077,11 +3017,9 @@ type DiscardBlueprintChangesResponse struct { func (x *DiscardBlueprintChangesResponse) Reset() { *x = DiscardBlueprintChangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscardBlueprintChangesResponse) String() string { @@ -3092,7 +3030,7 @@ func (*DiscardBlueprintChangesResponse) ProtoMessage() {} func (x *DiscardBlueprintChangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3126,11 +3064,9 @@ type ListPublicBlueprintsRequest struct { func (x *ListPublicBlueprintsRequest) Reset() { *x = ListPublicBlueprintsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicBlueprintsRequest) String() string { @@ -3141,7 +3077,7 @@ func (*ListPublicBlueprintsRequest) ProtoMessage() {} func (x *ListPublicBlueprintsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3192,11 +3128,9 @@ type ListPublicBlueprintsResponse struct { func (x *ListPublicBlueprintsResponse) Reset() { *x = ListPublicBlueprintsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicBlueprintsResponse) String() string { @@ -3207,7 +3141,7 @@ func (*ListPublicBlueprintsResponse) ProtoMessage() {} func (x *ListPublicBlueprintsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3248,11 +3182,9 @@ type GetPublicBlueprintRequest struct { func (x *GetPublicBlueprintRequest) Reset() { *x = GetPublicBlueprintRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPublicBlueprintRequest) String() string { @@ -3263,7 +3195,7 @@ func (*GetPublicBlueprintRequest) ProtoMessage() {} func (x *GetPublicBlueprintRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3303,11 +3235,9 @@ type CreateDeploymentRequest struct { func (x *CreateDeploymentRequest) Reset() { *x = CreateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDeploymentRequest) String() string { @@ -3318,7 +3248,7 @@ func (*CreateDeploymentRequest) ProtoMessage() {} func (x *CreateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3369,11 +3299,9 @@ type UpdateDeploymentRequest struct { func (x *UpdateDeploymentRequest) Reset() { *x = UpdateDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDeploymentRequest) String() string { @@ -3384,7 +3312,7 @@ func (*UpdateDeploymentRequest) ProtoMessage() {} func (x *UpdateDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3433,11 +3361,9 @@ type GetDeploymentRequest struct { func (x *GetDeploymentRequest) Reset() { *x = GetDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDeploymentRequest) String() string { @@ -3448,7 +3374,7 @@ func (*GetDeploymentRequest) ProtoMessage() {} func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3489,11 +3415,9 @@ type RemoveDeploymentRequest struct { func (x *RemoveDeploymentRequest) Reset() { *x = RemoveDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveDeploymentRequest) String() string { @@ -3504,7 +3428,7 @@ func (*RemoveDeploymentRequest) ProtoMessage() {} func (x *RemoveDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3549,11 +3473,9 @@ type ListDeploymentsRequest struct { func (x *ListDeploymentsRequest) Reset() { *x = ListDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsRequest) String() string { @@ -3564,7 +3486,7 @@ func (*ListDeploymentsRequest) ProtoMessage() {} func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3622,11 +3544,9 @@ type ListDeploymentsResponse struct { func (x *ListDeploymentsResponse) Reset() { *x = ListDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentsResponse) String() string { @@ -3637,7 +3557,7 @@ func (*ListDeploymentsResponse) ProtoMessage() {} func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3683,11 +3603,9 @@ type ListDeploymentRevisionsRequest struct { func (x *ListDeploymentRevisionsRequest) Reset() { *x = ListDeploymentRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentRevisionsRequest) String() string { @@ -3698,7 +3616,7 @@ func (*ListDeploymentRevisionsRequest) ProtoMessage() {} func (x *ListDeploymentRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3749,11 +3667,9 @@ type ListDeploymentRevisionsResponse struct { func (x *ListDeploymentRevisionsResponse) Reset() { *x = ListDeploymentRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDeploymentRevisionsResponse) String() string { @@ -3764,7 +3680,7 @@ func (*ListDeploymentRevisionsResponse) ProtoMessage() {} func (x *ListDeploymentRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3822,11 +3738,9 @@ type SearchDeploymentRevisionsRequest struct { func (x *SearchDeploymentRevisionsRequest) Reset() { *x = SearchDeploymentRevisionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDeploymentRevisionsRequest) String() string { @@ -3837,7 +3751,7 @@ func (*SearchDeploymentRevisionsRequest) ProtoMessage() {} func (x *SearchDeploymentRevisionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3895,11 +3809,9 @@ type SearchDeploymentRevisionsResponse struct { func (x *SearchDeploymentRevisionsResponse) Reset() { *x = SearchDeploymentRevisionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchDeploymentRevisionsResponse) String() string { @@ -3910,7 +3822,7 @@ func (*SearchDeploymentRevisionsResponse) ProtoMessage() {} func (x *SearchDeploymentRevisionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3951,11 +3863,9 @@ type DiscardDeploymentChangesRequest struct { func (x *DiscardDeploymentChangesRequest) Reset() { *x = DiscardDeploymentChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscardDeploymentChangesRequest) String() string { @@ -3966,7 +3876,7 @@ func (*DiscardDeploymentChangesRequest) ProtoMessage() {} func (x *DiscardDeploymentChangesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3997,11 +3907,9 @@ type DiscardDeploymentChangesResponse struct { func (x *DiscardDeploymentChangesResponse) Reset() { *x = DiscardDeploymentChangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DiscardDeploymentChangesResponse) String() string { @@ -4012,7 +3920,7 @@ func (*DiscardDeploymentChangesResponse) ProtoMessage() {} func (x *DiscardDeploymentChangesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4041,11 +3949,9 @@ type ApplyDeploymentRequest struct { func (x *ApplyDeploymentRequest) Reset() { *x = ApplyDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyDeploymentRequest) String() string { @@ -4056,7 +3962,7 @@ func (*ApplyDeploymentRequest) ProtoMessage() {} func (x *ApplyDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4090,11 +3996,9 @@ type ComputeDeploymentStatusRequest struct { func (x *ComputeDeploymentStatusRequest) Reset() { *x = ComputeDeploymentStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeDeploymentStatusRequest) String() string { @@ -4105,7 +4009,7 @@ func (*ComputeDeploymentStatusRequest) ProtoMessage() {} func (x *ComputeDeploymentStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4143,11 +4047,9 @@ type ComputeDeploymentStatusResponse struct { func (x *ComputeDeploymentStatusResponse) Reset() { *x = ComputeDeploymentStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeDeploymentStatusResponse) String() string { @@ -4158,7 +4060,7 @@ func (*ComputeDeploymentStatusResponse) ProtoMessage() {} func (x *ComputeDeploymentStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4208,11 +4110,9 @@ type RollbackDeploymentRequest struct { func (x *RollbackDeploymentRequest) Reset() { *x = RollbackDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RollbackDeploymentRequest) String() string { @@ -4223,7 +4123,7 @@ func (*RollbackDeploymentRequest) ProtoMessage() {} func (x *RollbackDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4280,11 +4180,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -4295,7 +4193,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4371,11 +4269,9 @@ type GetHydratedDeploymentRequest struct { func (x *GetHydratedDeploymentRequest) Reset() { *x = GetHydratedDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHydratedDeploymentRequest) String() string { @@ -4386,7 +4282,7 @@ func (*GetHydratedDeploymentRequest) ProtoMessage() {} func (x *GetHydratedDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4428,11 +4324,9 @@ type ListHydratedDeploymentsRequest struct { func (x *ListHydratedDeploymentsRequest) Reset() { *x = ListHydratedDeploymentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHydratedDeploymentsRequest) String() string { @@ -4443,7 +4337,7 @@ func (*ListHydratedDeploymentsRequest) ProtoMessage() {} func (x *ListHydratedDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4494,11 +4388,9 @@ type ListHydratedDeploymentsResponse struct { func (x *ListHydratedDeploymentsResponse) Reset() { *x = ListHydratedDeploymentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHydratedDeploymentsResponse) String() string { @@ -4509,7 +4401,7 @@ func (*ListHydratedDeploymentsResponse) ProtoMessage() {} func (x *ListHydratedDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4553,11 +4445,9 @@ type UpdateHydratedDeploymentRequest struct { func (x *UpdateHydratedDeploymentRequest) Reset() { *x = UpdateHydratedDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateHydratedDeploymentRequest) String() string { @@ -4568,7 +4458,7 @@ func (*UpdateHydratedDeploymentRequest) ProtoMessage() {} func (x *UpdateHydratedDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4609,11 +4499,9 @@ type ApplyHydratedDeploymentRequest struct { func (x *ApplyHydratedDeploymentRequest) Reset() { *x = ApplyHydratedDeploymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplyHydratedDeploymentRequest) String() string { @@ -4624,7 +4512,7 @@ func (*ApplyHydratedDeploymentRequest) ProtoMessage() {} func (x *ApplyHydratedDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4664,11 +4552,9 @@ type ManagementConfig struct { func (x *ManagementConfig) Reset() { *x = ManagementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagementConfig) String() string { @@ -4679,7 +4565,7 @@ func (*ManagementConfig) ProtoMessage() {} func (x *ManagementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4778,11 +4664,9 @@ type StandardManagementConfig struct { func (x *StandardManagementConfig) Reset() { *x = StandardManagementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StandardManagementConfig) String() string { @@ -4793,7 +4677,7 @@ func (*StandardManagementConfig) ProtoMessage() {} func (x *StandardManagementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4907,11 +4791,9 @@ type FullManagementConfig struct { func (x *FullManagementConfig) Reset() { *x = FullManagementConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FullManagementConfig) String() string { @@ -4922,7 +4804,7 @@ func (*FullManagementConfig) ProtoMessage() {} func (x *FullManagementConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5006,11 +4888,9 @@ type MasterAuthorizedNetworksConfig struct { func (x *MasterAuthorizedNetworksConfig) Reset() { *x = MasterAuthorizedNetworksConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig) String() string { @@ -5021,7 +4901,7 @@ func (*MasterAuthorizedNetworksConfig) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5063,11 +4943,9 @@ type File struct { func (x *File) Reset() { *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *File) String() string { @@ -5078,7 +4956,7 @@ func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5147,11 +5025,9 @@ type ResourceStatus struct { func (x *ResourceStatus) Reset() { *x = ResourceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceStatus) String() string { @@ -5162,7 +5038,7 @@ func (*ResourceStatus) ProtoMessage() {} func (x *ResourceStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5250,11 +5126,9 @@ type NFDeployStatus struct { func (x *NFDeployStatus) Reset() { *x = NFDeployStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NFDeployStatus) String() string { @@ -5265,7 +5139,7 @@ func (*NFDeployStatus) ProtoMessage() {} func (x *NFDeployStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5319,11 +5193,9 @@ type NFDeploySiteStatus struct { func (x *NFDeploySiteStatus) Reset() { *x = NFDeploySiteStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NFDeploySiteStatus) String() string { @@ -5334,7 +5206,7 @@ func (*NFDeploySiteStatus) ProtoMessage() {} func (x *NFDeploySiteStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5391,11 +5263,9 @@ type HydrationStatus struct { func (x *HydrationStatus) Reset() { *x = HydrationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HydrationStatus) String() string { @@ -5406,7 +5276,7 @@ func (*HydrationStatus) ProtoMessage() {} func (x *HydrationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5451,11 +5321,9 @@ type SiteVersion struct { func (x *SiteVersion) Reset() { *x = SiteVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SiteVersion) String() string { @@ -5466,7 +5334,7 @@ func (*SiteVersion) ProtoMessage() {} func (x *SiteVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5516,11 +5384,9 @@ type WorkloadStatus struct { func (x *WorkloadStatus) Reset() { *x = WorkloadStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkloadStatus) String() string { @@ -5531,7 +5397,7 @@ func (*WorkloadStatus) ProtoMessage() {} func (x *WorkloadStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5578,11 +5444,9 @@ type MasterAuthorizedNetworksConfig_CidrBlock struct { func (x *MasterAuthorizedNetworksConfig_CidrBlock) Reset() { *x = MasterAuthorizedNetworksConfig_CidrBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MasterAuthorizedNetworksConfig_CidrBlock) String() string { @@ -5593,7 +5457,7 @@ func (*MasterAuthorizedNetworksConfig_CidrBlock) ProtoMessage() {} func (x *MasterAuthorizedNetworksConfig_CidrBlock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7505,824 +7369,6 @@ func file_google_cloud_telcoautomation_v1_telcoautomation_proto_init() { if File_google_cloud_telcoautomation_v1_telcoautomation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OrchestrationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EdgeSlm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Blueprint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PublicBlueprint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Deployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*HydratedDeployment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListOrchestrationClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListOrchestrationClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetOrchestrationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateOrchestrationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOrchestrationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListEdgeSlmsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListEdgeSlmsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetEdgeSlmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateEdgeSlmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEdgeSlmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CreateBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UpdateBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListBlueprintsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListBlueprintsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ApproveBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ProposeBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*RejectBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListBlueprintRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListBlueprintRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SearchBlueprintRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchBlueprintRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DiscardBlueprintChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DiscardBlueprintChangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicBlueprintsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicBlueprintsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicBlueprintRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*CreateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*RemoveDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListDeploymentRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*SearchDeploymentRevisionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*SearchDeploymentRevisionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*DiscardDeploymentChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*DiscardDeploymentChangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ApplyDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ComputeDeploymentStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ComputeDeploymentStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*RollbackDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*GetHydratedDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ListHydratedDeploymentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*ListHydratedDeploymentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*UpdateHydratedDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ApplyHydratedDeploymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ManagementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*StandardManagementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*FullManagementConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ResourceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*NFDeployStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*NFDeploySiteStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*HydrationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*SiteVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*WorkloadStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*MasterAuthorizedNetworksConfig_CidrBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_telcoautomation_v1_telcoautomation_proto_msgTypes[56].OneofWrappers = []any{ (*ManagementConfig_StandardManagementConfig)(nil), (*ManagementConfig_FullManagementConfig)(nil), diff --git a/texttospeech/apiv1/helpers.go b/texttospeech/apiv1/helpers.go index a974dfc9b9f4..0d527e510052 100755 --- a/texttospeech/apiv1/helpers.go +++ b/texttospeech/apiv1/helpers.go @@ -18,10 +18,20 @@ package texttospeech import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "texttospeech.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/texttospeech/apiv1/text_to_speech_client.go b/texttospeech/apiv1/text_to_speech_client.go index 05dbb1008da2..7981ca28614e 100755 --- a/texttospeech/apiv1/text_to_speech_client.go +++ b/texttospeech/apiv1/text_to_speech_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" texttospeechpb "cloud.google.com/go/texttospeech/apiv1/texttospeechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -249,6 +248,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new text to speech client based on gRPC. @@ -275,6 +276,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: texttospeechpb.NewTextToSpeechClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -322,6 +324,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new text to speech rest client. @@ -339,6 +343,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -388,7 +393,7 @@ func (c *gRPCClient) ListVoices(ctx context.Context, req *texttospeechpb.ListVoi var resp *texttospeechpb.ListVoicesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVoices(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVoices, req, settings.GRPC, c.logger, "ListVoices") return err }, opts...) if err != nil { @@ -403,7 +408,7 @@ func (c *gRPCClient) SynthesizeSpeech(ctx context.Context, req *texttospeechpb.S var resp *texttospeechpb.SynthesizeSpeechResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SynthesizeSpeech(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SynthesizeSpeech, req, settings.GRPC, c.logger, "SynthesizeSpeech") return err }, opts...) if err != nil { @@ -418,7 +423,9 @@ func (c *gRPCClient) StreamingSynthesize(ctx context.Context, opts ...gax.CallOp opts = append((*c.CallOptions).StreamingSynthesize[0:len((*c.CallOptions).StreamingSynthesize):len((*c.CallOptions).StreamingSynthesize)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingSynthesize") resp, err = c.client.StreamingSynthesize(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingSynthesize") return err }, opts...) if err != nil { @@ -436,7 +443,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -465,7 +472,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -524,17 +531,7 @@ func (c *restClient) ListVoices(ctx context.Context, req *texttospeechpb.ListVoi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVoices") if err != nil { return err } @@ -588,17 +585,7 @@ func (c *restClient) SynthesizeSpeech(ctx context.Context, req *texttospeechpb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SynthesizeSpeech") if err != nil { return err } @@ -656,17 +643,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -731,21 +708,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/texttospeech/apiv1/text_to_speech_client_example_go123_test.go b/texttospeech/apiv1/text_to_speech_client_example_go123_test.go index bc5c4d93dc78..27a6523547fa 100644 --- a/texttospeech/apiv1/text_to_speech_client_example_go123_test.go +++ b/texttospeech/apiv1/text_to_speech_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client.go b/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client.go index 8102d9cd516d..8cd48a517509 100755 --- a/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client.go +++ b/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" texttospeechpb "cloud.google.com/go/texttospeech/apiv1/texttospeechpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -180,6 +179,8 @@ type textToSpeechLongAudioSynthesizeGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTextToSpeechLongAudioSynthesizeClient creates a new text to speech long audio synthesize client based on gRPC. @@ -206,6 +207,7 @@ func NewTextToSpeechLongAudioSynthesizeClient(ctx context.Context, opts ...optio connPool: connPool, textToSpeechLongAudioSynthesizeClient: texttospeechpb.NewTextToSpeechLongAudioSynthesizeClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type textToSpeechLongAudioSynthesizeRESTClient struct { // Points back to the CallOptions field of the containing TextToSpeechLongAudioSynthesizeClient CallOptions **TextToSpeechLongAudioSynthesizeCallOptions + + logger *slog.Logger } // NewTextToSpeechLongAudioSynthesizeRESTClient creates a new text to speech long audio synthesize rest client. @@ -286,6 +290,7 @@ func NewTextToSpeechLongAudioSynthesizeRESTClient(ctx context.Context, opts ...o endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -348,7 +353,7 @@ func (c *textToSpeechLongAudioSynthesizeGRPCClient) SynthesizeLongAudio(ctx cont var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio, req, settings.GRPC, c.logger, "SynthesizeLongAudio") return err }, opts...) if err != nil { @@ -368,7 +373,7 @@ func (c *textToSpeechLongAudioSynthesizeGRPCClient) GetOperation(ctx context.Con var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -397,7 +402,7 @@ func (c *textToSpeechLongAudioSynthesizeGRPCClient) ListOperations(ctx context.C } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -461,21 +466,10 @@ func (c *textToSpeechLongAudioSynthesizeRESTClient) SynthesizeLongAudio(ctx cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SynthesizeLongAudio") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -526,17 +520,7 @@ func (c *textToSpeechLongAudioSynthesizeRESTClient) GetOperation(ctx context.Con httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -601,21 +585,10 @@ func (c *textToSpeechLongAudioSynthesizeRESTClient) ListOperations(ctx context.C } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client_example_go123_test.go b/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client_example_go123_test.go index 4b191db4a752..1e3858fd4997 100644 --- a/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client_example_go123_test.go +++ b/texttospeech/apiv1/text_to_speech_long_audio_synthesize_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleTextToSpeechLongAudioSynthesizeClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/texttospeech/apiv1/texttospeechpb/cloud_tts.pb.go b/texttospeech/apiv1/texttospeechpb/cloud_tts.pb.go index 16bcc940578e..9b5cf254c8f8 100755 --- a/texttospeech/apiv1/texttospeechpb/cloud_tts.pb.go +++ b/texttospeech/apiv1/texttospeechpb/cloud_tts.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/texttospeech/v1/cloud_tts.proto @@ -306,11 +306,9 @@ type ListVoicesRequest struct { func (x *ListVoicesRequest) Reset() { *x = ListVoicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVoicesRequest) String() string { @@ -321,7 +319,7 @@ func (*ListVoicesRequest) ProtoMessage() {} func (x *ListVoicesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,11 +353,9 @@ type ListVoicesResponse struct { func (x *ListVoicesResponse) Reset() { *x = ListVoicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVoicesResponse) String() string { @@ -370,7 +366,7 @@ func (*ListVoicesResponse) ProtoMessage() {} func (x *ListVoicesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +408,9 @@ type Voice struct { func (x *Voice) Reset() { *x = Voice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Voice) String() string { @@ -427,7 +421,7 @@ func (*Voice) ProtoMessage() {} func (x *Voice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +477,9 @@ type AdvancedVoiceOptions struct { func (x *AdvancedVoiceOptions) Reset() { *x = AdvancedVoiceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdvancedVoiceOptions) String() string { @@ -498,7 +490,7 @@ func (*AdvancedVoiceOptions) ProtoMessage() {} func (x *AdvancedVoiceOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,11 +530,9 @@ type SynthesizeSpeechRequest struct { func (x *SynthesizeSpeechRequest) Reset() { *x = SynthesizeSpeechRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechRequest) String() string { @@ -553,7 +543,7 @@ func (*SynthesizeSpeechRequest) ProtoMessage() {} func (x *SynthesizeSpeechRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,11 +605,9 @@ type CustomPronunciationParams struct { func (x *CustomPronunciationParams) Reset() { *x = CustomPronunciationParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomPronunciationParams) String() string { @@ -630,7 +618,7 @@ func (*CustomPronunciationParams) ProtoMessage() {} func (x *CustomPronunciationParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -678,11 +666,9 @@ type CustomPronunciations struct { func (x *CustomPronunciations) Reset() { *x = CustomPronunciations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomPronunciations) String() string { @@ -693,7 +679,7 @@ func (*CustomPronunciations) ProtoMessage() {} func (x *CustomPronunciations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,11 +713,9 @@ type MultiSpeakerMarkup struct { func (x *MultiSpeakerMarkup) Reset() { *x = MultiSpeakerMarkup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiSpeakerMarkup) String() string { @@ -742,7 +726,7 @@ func (*MultiSpeakerMarkup) ProtoMessage() {} func (x *MultiSpeakerMarkup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,11 +782,9 @@ type SynthesisInput struct { func (x *SynthesisInput) Reset() { *x = SynthesisInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesisInput) String() string { @@ -813,7 +795,7 @@ func (*SynthesisInput) ProtoMessage() {} func (x *SynthesisInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +915,9 @@ type VoiceSelectionParams struct { func (x *VoiceSelectionParams) Reset() { *x = VoiceSelectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceSelectionParams) String() string { @@ -948,7 +928,7 @@ func (*VoiceSelectionParams) ProtoMessage() {} func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,11 +1023,9 @@ type AudioConfig struct { func (x *AudioConfig) Reset() { *x = AudioConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioConfig) String() string { @@ -1058,7 +1036,7 @@ func (*AudioConfig) ProtoMessage() {} func (x *AudioConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1131,11 +1109,9 @@ type CustomVoiceParams struct { func (x *CustomVoiceParams) Reset() { *x = CustomVoiceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomVoiceParams) String() string { @@ -1146,7 +1122,7 @@ func (*CustomVoiceParams) ProtoMessage() {} func (x *CustomVoiceParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1164,9 @@ type VoiceCloneParams struct { func (x *VoiceCloneParams) Reset() { *x = VoiceCloneParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VoiceCloneParams) String() string { @@ -1203,7 +1177,7 @@ func (*VoiceCloneParams) ProtoMessage() {} func (x *VoiceCloneParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1241,11 +1215,9 @@ type SynthesizeSpeechResponse struct { func (x *SynthesizeSpeechResponse) Reset() { *x = SynthesizeSpeechResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeSpeechResponse) String() string { @@ -1256,7 +1228,7 @@ func (*SynthesizeSpeechResponse) ProtoMessage() {} func (x *SynthesizeSpeechResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1290,11 +1262,9 @@ type StreamingSynthesizeConfig struct { func (x *StreamingSynthesizeConfig) Reset() { *x = StreamingSynthesizeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingSynthesizeConfig) String() string { @@ -1305,7 +1275,7 @@ func (*StreamingSynthesizeConfig) ProtoMessage() {} func (x *StreamingSynthesizeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1341,11 +1311,9 @@ type StreamingSynthesisInput struct { func (x *StreamingSynthesisInput) Reset() { *x = StreamingSynthesisInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingSynthesisInput) String() string { @@ -1356,7 +1324,7 @@ func (*StreamingSynthesisInput) ProtoMessage() {} func (x *StreamingSynthesisInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1421,11 +1389,9 @@ type StreamingSynthesizeRequest struct { func (x *StreamingSynthesizeRequest) Reset() { *x = StreamingSynthesizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingSynthesizeRequest) String() string { @@ -1436,7 +1402,7 @@ func (*StreamingSynthesizeRequest) ProtoMessage() {} func (x *StreamingSynthesizeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1507,11 +1473,9 @@ type StreamingSynthesizeResponse struct { func (x *StreamingSynthesizeResponse) Reset() { *x = StreamingSynthesizeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingSynthesizeResponse) String() string { @@ -1522,7 +1486,7 @@ func (*StreamingSynthesizeResponse) ProtoMessage() {} func (x *StreamingSynthesizeResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1559,11 +1523,9 @@ type MultiSpeakerMarkup_Turn struct { func (x *MultiSpeakerMarkup_Turn) Reset() { *x = MultiSpeakerMarkup_Turn{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MultiSpeakerMarkup_Turn) String() string { @@ -1574,7 +1536,7 @@ func (*MultiSpeakerMarkup_Turn) ProtoMessage() {} func (x *MultiSpeakerMarkup_Turn) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1979,236 +1941,6 @@ func file_google_cloud_texttospeech_v1_cloud_tts_proto_init() { if File_google_cloud_texttospeech_v1_cloud_tts_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListVoicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListVoicesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Voice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AdvancedVoiceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CustomPronunciationParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CustomPronunciations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*MultiSpeakerMarkup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SynthesisInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VoiceSelectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AudioConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CustomVoiceParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*VoiceCloneParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeSpeechResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StreamingSynthesizeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*StreamingSynthesisInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*StreamingSynthesizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*StreamingSynthesizeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*MultiSpeakerMarkup_Turn); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[3].OneofWrappers = []any{} file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[4].OneofWrappers = []any{} file_google_cloud_texttospeech_v1_cloud_tts_proto_msgTypes[5].OneofWrappers = []any{} diff --git a/texttospeech/apiv1/texttospeechpb/cloud_tts_lrs.pb.go b/texttospeech/apiv1/texttospeechpb/cloud_tts_lrs.pb.go index 63bdc6a2c5f3..6e29a49c852e 100755 --- a/texttospeech/apiv1/texttospeechpb/cloud_tts_lrs.pb.go +++ b/texttospeech/apiv1/texttospeechpb/cloud_tts_lrs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/texttospeech/v1/cloud_tts_lrs.proto @@ -66,11 +66,9 @@ type SynthesizeLongAudioRequest struct { func (x *SynthesizeLongAudioRequest) Reset() { *x = SynthesizeLongAudioRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeLongAudioRequest) String() string { @@ -81,7 +79,7 @@ func (*SynthesizeLongAudioRequest) ProtoMessage() {} func (x *SynthesizeLongAudioRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type SynthesizeLongAudioResponse struct { func (x *SynthesizeLongAudioResponse) Reset() { *x = SynthesizeLongAudioResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeLongAudioResponse) String() string { @@ -155,7 +151,7 @@ func (*SynthesizeLongAudioResponse) ProtoMessage() {} func (x *SynthesizeLongAudioResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +184,9 @@ type SynthesizeLongAudioMetadata struct { func (x *SynthesizeLongAudioMetadata) Reset() { *x = SynthesizeLongAudioMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SynthesizeLongAudioMetadata) String() string { @@ -203,7 +197,7 @@ func (*SynthesizeLongAudioMetadata) ProtoMessage() {} func (x *SynthesizeLongAudioMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -385,44 +379,6 @@ func file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_init() { return } file_google_cloud_texttospeech_v1_cloud_tts_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeLongAudioRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeLongAudioResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_texttospeech_v1_cloud_tts_lrs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SynthesizeLongAudioMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/tpu/apiv1/helpers.go b/tpu/apiv1/helpers.go index 63f9d7b54b7a..5c77e487ddaa 100755 --- a/tpu/apiv1/helpers.go +++ b/tpu/apiv1/helpers.go @@ -18,10 +18,16 @@ package tpu import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "tpu.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/tpu/apiv1/tpu_client.go b/tpu/apiv1/tpu_client.go index c47f49d92ae5..97bb2d91147a 100755 --- a/tpu/apiv1/tpu_client.go +++ b/tpu/apiv1/tpu_client.go @@ -19,6 +19,7 @@ package tpu import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -329,6 +330,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new tpu client based on gRPC. @@ -357,6 +360,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: tpupb.NewTpuClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -423,7 +427,7 @@ func (c *gRPCClient) ListNodes(ctx context.Context, req *tpupb.ListNodesRequest, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNodes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNodes, req, settings.GRPC, c.logger, "ListNodes") return err }, opts...) if err != nil { @@ -458,7 +462,7 @@ func (c *gRPCClient) GetNode(ctx context.Context, req *tpupb.GetNodeRequest, opt var resp *tpupb.Node err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNode, req, settings.GRPC, c.logger, "GetNode") return err }, opts...) if err != nil { @@ -476,7 +480,7 @@ func (c *gRPCClient) CreateNode(ctx context.Context, req *tpupb.CreateNodeReques var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNode, req, settings.GRPC, c.logger, "CreateNode") return err }, opts...) if err != nil { @@ -496,7 +500,7 @@ func (c *gRPCClient) DeleteNode(ctx context.Context, req *tpupb.DeleteNodeReques var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNode, req, settings.GRPC, c.logger, "DeleteNode") return err }, opts...) if err != nil { @@ -516,7 +520,7 @@ func (c *gRPCClient) ReimageNode(ctx context.Context, req *tpupb.ReimageNodeRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ReimageNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ReimageNode, req, settings.GRPC, c.logger, "ReimageNode") return err }, opts...) if err != nil { @@ -536,7 +540,7 @@ func (c *gRPCClient) StopNode(ctx context.Context, req *tpupb.StopNodeRequest, o var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopNode, req, settings.GRPC, c.logger, "StopNode") return err }, opts...) if err != nil { @@ -556,7 +560,7 @@ func (c *gRPCClient) StartNode(ctx context.Context, req *tpupb.StartNodeRequest, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartNode, req, settings.GRPC, c.logger, "StartNode") return err }, opts...) if err != nil { @@ -587,7 +591,7 @@ func (c *gRPCClient) ListTensorFlowVersions(ctx context.Context, req *tpupb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTensorFlowVersions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTensorFlowVersions, req, settings.GRPC, c.logger, "ListTensorFlowVersions") return err }, opts...) if err != nil { @@ -622,7 +626,7 @@ func (c *gRPCClient) GetTensorFlowVersion(ctx context.Context, req *tpupb.GetTen var resp *tpupb.TensorFlowVersion err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTensorFlowVersion(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTensorFlowVersion, req, settings.GRPC, c.logger, "GetTensorFlowVersion") return err }, opts...) if err != nil { @@ -651,7 +655,7 @@ func (c *gRPCClient) ListAcceleratorTypes(ctx context.Context, req *tpupb.ListAc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAcceleratorTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAcceleratorTypes, req, settings.GRPC, c.logger, "ListAcceleratorTypes") return err }, opts...) if err != nil { @@ -686,7 +690,7 @@ func (c *gRPCClient) GetAcceleratorType(ctx context.Context, req *tpupb.GetAccel var resp *tpupb.AcceleratorType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAcceleratorType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAcceleratorType, req, settings.GRPC, c.logger, "GetAcceleratorType") return err }, opts...) if err != nil { @@ -704,7 +708,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -733,7 +737,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -767,7 +771,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -781,7 +785,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -796,7 +800,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -825,7 +829,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/tpu/apiv1/tpu_client_example_go123_test.go b/tpu/apiv1/tpu_client_example_go123_test.go index 4f0b304c03a0..3f7e1b421acf 100644 --- a/tpu/apiv1/tpu_client_example_go123_test.go +++ b/tpu/apiv1/tpu_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAcceleratorTypes_all() { } for resp, err := range c.ListAcceleratorTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListNodes_all() { } for resp, err := range c.ListNodes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListTensorFlowVersions_all() { } for resp, err := range c.ListTensorFlowVersions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/tpu/apiv1/tpupb/cloud_tpu.pb.go b/tpu/apiv1/tpupb/cloud_tpu.pb.go index 8795b985626b..ff2947bfeb14 100755 --- a/tpu/apiv1/tpupb/cloud_tpu.pb.go +++ b/tpu/apiv1/tpupb/cloud_tpu.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/tpu/v1/cloud_tpu.proto @@ -354,11 +354,9 @@ type SchedulingConfig struct { func (x *SchedulingConfig) Reset() { *x = SchedulingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulingConfig) String() string { @@ -369,7 +367,7 @@ func (*SchedulingConfig) ProtoMessage() {} func (x *SchedulingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +410,9 @@ type NetworkEndpoint struct { func (x *NetworkEndpoint) Reset() { *x = NetworkEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkEndpoint) String() string { @@ -427,7 +423,7 @@ func (*NetworkEndpoint) ProtoMessage() {} func (x *NetworkEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +526,9 @@ type Node struct { func (x *Node) Reset() { *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Node) String() string { @@ -545,7 +539,7 @@ func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +705,9 @@ type ListNodesRequest struct { func (x *ListNodesRequest) Reset() { *x = ListNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodesRequest) String() string { @@ -726,7 +718,7 @@ func (*ListNodesRequest) ProtoMessage() {} func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -778,11 +770,9 @@ type ListNodesResponse struct { func (x *ListNodesResponse) Reset() { *x = ListNodesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodesResponse) String() string { @@ -793,7 +783,7 @@ func (*ListNodesResponse) ProtoMessage() {} func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +831,9 @@ type GetNodeRequest struct { func (x *GetNodeRequest) Reset() { *x = GetNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeRequest) String() string { @@ -856,7 +844,7 @@ func (*GetNodeRequest) ProtoMessage() {} func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,11 +882,9 @@ type CreateNodeRequest struct { func (x *CreateNodeRequest) Reset() { *x = CreateNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNodeRequest) String() string { @@ -909,7 +895,7 @@ func (*CreateNodeRequest) ProtoMessage() {} func (x *CreateNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -957,11 +943,9 @@ type DeleteNodeRequest struct { func (x *DeleteNodeRequest) Reset() { *x = DeleteNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNodeRequest) String() string { @@ -972,7 +956,7 @@ func (*DeleteNodeRequest) ProtoMessage() {} func (x *DeleteNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +992,9 @@ type ReimageNodeRequest struct { func (x *ReimageNodeRequest) Reset() { *x = ReimageNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReimageNodeRequest) String() string { @@ -1023,7 +1005,7 @@ func (*ReimageNodeRequest) ProtoMessage() {} func (x *ReimageNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1064,11 +1046,9 @@ type StopNodeRequest struct { func (x *StopNodeRequest) Reset() { *x = StopNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopNodeRequest) String() string { @@ -1079,7 +1059,7 @@ func (*StopNodeRequest) ProtoMessage() {} func (x *StopNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1093,9 @@ type StartNodeRequest struct { func (x *StartNodeRequest) Reset() { *x = StartNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartNodeRequest) String() string { @@ -1128,7 +1106,7 @@ func (*StartNodeRequest) ProtoMessage() {} func (x *StartNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,11 +1142,9 @@ type TensorFlowVersion struct { func (x *TensorFlowVersion) Reset() { *x = TensorFlowVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TensorFlowVersion) String() string { @@ -1179,7 +1155,7 @@ func (*TensorFlowVersion) ProtoMessage() {} func (x *TensorFlowVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,11 +1197,9 @@ type GetTensorFlowVersionRequest struct { func (x *GetTensorFlowVersionRequest) Reset() { *x = GetTensorFlowVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTensorFlowVersionRequest) String() string { @@ -1236,7 +1210,7 @@ func (*GetTensorFlowVersionRequest) ProtoMessage() {} func (x *GetTensorFlowVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1279,11 +1253,9 @@ type ListTensorFlowVersionsRequest struct { func (x *ListTensorFlowVersionsRequest) Reset() { *x = ListTensorFlowVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorFlowVersionsRequest) String() string { @@ -1294,7 +1266,7 @@ func (*ListTensorFlowVersionsRequest) ProtoMessage() {} func (x *ListTensorFlowVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,11 +1333,9 @@ type ListTensorFlowVersionsResponse struct { func (x *ListTensorFlowVersionsResponse) Reset() { *x = ListTensorFlowVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTensorFlowVersionsResponse) String() string { @@ -1376,7 +1346,7 @@ func (*ListTensorFlowVersionsResponse) ProtoMessage() {} func (x *ListTensorFlowVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1426,11 +1396,9 @@ type AcceleratorType struct { func (x *AcceleratorType) Reset() { *x = AcceleratorType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcceleratorType) String() string { @@ -1441,7 +1409,7 @@ func (*AcceleratorType) ProtoMessage() {} func (x *AcceleratorType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1482,11 +1450,9 @@ type GetAcceleratorTypeRequest struct { func (x *GetAcceleratorTypeRequest) Reset() { *x = GetAcceleratorTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAcceleratorTypeRequest) String() string { @@ -1497,7 +1463,7 @@ func (*GetAcceleratorTypeRequest) ProtoMessage() {} func (x *GetAcceleratorTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1540,11 +1506,9 @@ type ListAcceleratorTypesRequest struct { func (x *ListAcceleratorTypesRequest) Reset() { *x = ListAcceleratorTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAcceleratorTypesRequest) String() string { @@ -1555,7 +1519,7 @@ func (*ListAcceleratorTypesRequest) ProtoMessage() {} func (x *ListAcceleratorTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1622,11 +1586,9 @@ type ListAcceleratorTypesResponse struct { func (x *ListAcceleratorTypesResponse) Reset() { *x = ListAcceleratorTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAcceleratorTypesResponse) String() string { @@ -1637,7 +1599,7 @@ func (*ListAcceleratorTypesResponse) ProtoMessage() {} func (x *ListAcceleratorTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1698,11 +1660,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -1713,7 +1673,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1795,11 +1755,9 @@ type Symptom struct { func (x *Symptom) Reset() { *x = Symptom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Symptom) String() string { @@ -1810,7 +1768,7 @@ func (*Symptom) ProtoMessage() {} func (x *Symptom) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2384,260 +2342,6 @@ func file_google_cloud_tpu_v1_cloud_tpu_proto_init() { if File_google_cloud_tpu_v1_cloud_tpu_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SchedulingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NetworkEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListNodesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReimageNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StopNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StartNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TensorFlowVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetTensorFlowVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorFlowVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListTensorFlowVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AcceleratorType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetAcceleratorTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListAcceleratorTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListAcceleratorTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_tpu_v1_cloud_tpu_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Symptom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/trace/apiv1/helpers.go b/trace/apiv1/helpers.go index a25c91e8a75e..bb4937625b60 100755 --- a/trace/apiv1/helpers.go +++ b/trace/apiv1/helpers.go @@ -18,10 +18,20 @@ package trace import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudtrace.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -44,3 +54,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/trace.readonly", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/trace/apiv1/trace_client.go b/trace/apiv1/trace_client.go index 955b1a002dea..1bd94690e65c 100755 --- a/trace/apiv1/trace_client.go +++ b/trace/apiv1/trace_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( tracepb "cloud.google.com/go/trace/apiv1/tracepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -232,6 +231,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new trace service client based on gRPC. @@ -262,6 +263,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: tracepb.NewTraceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -308,6 +310,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new trace service rest client. @@ -329,6 +333,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -392,7 +397,7 @@ func (c *gRPCClient) ListTraces(ctx context.Context, req *tracepb.ListTracesRequ } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTraces(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTraces, req, settings.GRPC, c.logger, "ListTraces") return err }, opts...) if err != nil { @@ -427,7 +432,7 @@ func (c *gRPCClient) GetTrace(ctx context.Context, req *tracepb.GetTraceRequest, var resp *tracepb.Trace err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTrace(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTrace, req, settings.GRPC, c.logger, "GetTrace") return err }, opts...) if err != nil { @@ -444,7 +449,7 @@ func (c *gRPCClient) PatchTraces(ctx context.Context, req *tracepb.PatchTracesRe opts = append((*c.CallOptions).PatchTraces[0:len((*c.CallOptions).PatchTraces):len((*c.CallOptions).PatchTraces)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.PatchTraces(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.PatchTraces, req, settings.GRPC, c.logger, "PatchTraces") return err }, opts...) return err @@ -518,21 +523,10 @@ func (c *restClient) ListTraces(ctx context.Context, req *tracepb.ListTracesRequ } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTraces") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -595,17 +589,7 @@ func (c *restClient) GetTrace(ctx context.Context, req *tracepb.GetTraceRequest, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTrace") if err != nil { return err } @@ -663,14 +647,7 @@ func (c *restClient) PatchTraces(ctx context.Context, req *tracepb.PatchTracesRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PatchTraces") + return err }, opts...) } diff --git a/trace/apiv1/trace_client_example_go123_test.go b/trace/apiv1/trace_client_example_go123_test.go index 308197a9b68d..2b130b53ec1e 100644 --- a/trace/apiv1/trace_client_example_go123_test.go +++ b/trace/apiv1/trace_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListTraces_all() { } for resp, err := range c.ListTraces(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/trace/apiv1/tracepb/trace.pb.go b/trace/apiv1/tracepb/trace.pb.go index 8033fa7f4831..cbe48552a58a 100755 --- a/trace/apiv1/tracepb/trace.pb.go +++ b/trace/apiv1/tracepb/trace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudtrace/v1/trace.proto @@ -179,11 +179,9 @@ type Trace struct { func (x *Trace) Reset() { *x = Trace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trace) String() string { @@ -194,7 +192,7 @@ func (*Trace) ProtoMessage() {} func (x *Trace) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -242,11 +240,9 @@ type Traces struct { func (x *Traces) Reset() { *x = Traces{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Traces) String() string { @@ -257,7 +253,7 @@ func (*Traces) ProtoMessage() {} func (x *Traces) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type TraceSpan struct { func (x *TraceSpan) Reset() { *x = TraceSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TraceSpan) String() string { @@ -365,7 +359,7 @@ func (*TraceSpan) ProtoMessage() {} func (x *TraceSpan) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +497,9 @@ type ListTracesRequest struct { func (x *ListTracesRequest) Reset() { *x = ListTracesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTracesRequest) String() string { @@ -518,7 +510,7 @@ func (*ListTracesRequest) ProtoMessage() {} func (x *ListTracesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,11 +597,9 @@ type ListTracesResponse struct { func (x *ListTracesResponse) Reset() { *x = ListTracesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTracesResponse) String() string { @@ -620,7 +610,7 @@ func (*ListTracesResponse) ProtoMessage() {} func (x *ListTracesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +653,9 @@ type GetTraceRequest struct { func (x *GetTraceRequest) Reset() { *x = GetTraceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTraceRequest) String() string { @@ -678,7 +666,7 @@ func (*GetTraceRequest) ProtoMessage() {} func (x *GetTraceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -721,11 +709,9 @@ type PatchTracesRequest struct { func (x *PatchTracesRequest) Reset() { *x = PatchTracesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PatchTracesRequest) String() string { @@ -736,7 +722,7 @@ func (*PatchTracesRequest) ProtoMessage() {} func (x *PatchTracesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -991,92 +977,6 @@ func file_google_devtools_cloudtrace_v1_trace_proto_init() { if File_google_devtools_cloudtrace_v1_trace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Trace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Traces); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TraceSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListTracesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListTracesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetTraceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v1_trace_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PatchTracesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/trace/apiv2/helpers.go b/trace/apiv2/helpers.go index be637de9d72c..413848b5eaf0 100755 --- a/trace/apiv2/helpers.go +++ b/trace/apiv2/helpers.go @@ -18,10 +18,20 @@ package trace import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "cloudtrace.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/trace.append", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/trace/apiv2/trace_client.go b/trace/apiv2/trace_client.go index 05881bda7cf6..c753a8dba08a 100755 --- a/trace/apiv2/trace_client.go +++ b/trace/apiv2/trace_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( tracepb "cloud.google.com/go/trace/apiv2/tracepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -197,6 +196,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new trace service client based on gRPC. @@ -229,6 +230,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: tracepb.NewTraceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -275,6 +277,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new trace service rest client. @@ -298,6 +302,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -349,7 +354,7 @@ func (c *gRPCClient) BatchWriteSpans(ctx context.Context, req *tracepb.BatchWrit opts = append((*c.CallOptions).BatchWriteSpans[0:len((*c.CallOptions).BatchWriteSpans):len((*c.CallOptions).BatchWriteSpans)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.BatchWriteSpans(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.BatchWriteSpans, req, settings.GRPC, c.logger, "BatchWriteSpans") return err }, opts...) return err @@ -364,7 +369,7 @@ func (c *gRPCClient) CreateSpan(ctx context.Context, req *tracepb.Span, opts ... var resp *tracepb.Span err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSpan(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSpan, req, settings.GRPC, c.logger, "CreateSpan") return err }, opts...) if err != nil { @@ -410,15 +415,8 @@ func (c *restClient) BatchWriteSpans(ctx context.Context, req *tracepb.BatchWrit httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchWriteSpans") + return err }, opts...) } @@ -461,17 +459,7 @@ func (c *restClient) CreateSpan(ctx context.Context, req *tracepb.Span, opts ... httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSpan") if err != nil { return err } diff --git a/trace/apiv2/tracepb/trace.pb.go b/trace/apiv2/tracepb/trace.pb.go index c7c760af9be3..b4f774fa3723 100755 --- a/trace/apiv2/tracepb/trace.pb.go +++ b/trace/apiv2/tracepb/trace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudtrace/v2/trace.proto @@ -296,11 +296,9 @@ type Span struct { func (x *Span) Reset() { *x = Span{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span) String() string { @@ -311,7 +309,7 @@ func (*Span) ProtoMessage() {} func (x *Span) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,11 +440,9 @@ type AttributeValue struct { func (x *AttributeValue) Reset() { *x = AttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValue) String() string { @@ -457,7 +453,7 @@ func (*AttributeValue) ProtoMessage() {} func (x *AttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +543,9 @@ type StackTrace struct { func (x *StackTrace) Reset() { *x = StackTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StackTrace) String() string { @@ -562,7 +556,7 @@ func (*StackTrace) ProtoMessage() {} func (x *StackTrace) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -607,11 +601,9 @@ type Module struct { func (x *Module) Reset() { *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Module) String() string { @@ -622,7 +614,7 @@ func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +664,9 @@ type TruncatableString struct { func (x *TruncatableString) Reset() { *x = TruncatableString{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TruncatableString) String() string { @@ -687,7 +677,7 @@ func (*TruncatableString) ProtoMessage() {} func (x *TruncatableString) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +728,9 @@ type Span_Attributes struct { func (x *Span_Attributes) Reset() { *x = Span_Attributes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_Attributes) String() string { @@ -753,7 +741,7 @@ func (*Span_Attributes) ProtoMessage() {} func (x *Span_Attributes) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +790,9 @@ type Span_TimeEvent struct { func (x *Span_TimeEvent) Reset() { *x = Span_TimeEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_TimeEvent) String() string { @@ -817,7 +803,7 @@ func (*Span_TimeEvent) ProtoMessage() {} func (x *Span_TimeEvent) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -898,11 +884,9 @@ type Span_TimeEvents struct { func (x *Span_TimeEvents) Reset() { *x = Span_TimeEvents{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_TimeEvents) String() string { @@ -913,7 +897,7 @@ func (*Span_TimeEvents) ProtoMessage() {} func (x *Span_TimeEvents) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,11 +955,9 @@ type Span_Link struct { func (x *Span_Link) Reset() { *x = Span_Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_Link) String() string { @@ -986,7 +968,7 @@ func (*Span_Link) ProtoMessage() {} func (x *Span_Link) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1045,11 +1027,9 @@ type Span_Links struct { func (x *Span_Links) Reset() { *x = Span_Links{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_Links) String() string { @@ -1060,7 +1040,7 @@ func (*Span_Links) ProtoMessage() {} func (x *Span_Links) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,11 +1085,9 @@ type Span_TimeEvent_Annotation struct { func (x *Span_TimeEvent_Annotation) Reset() { *x = Span_TimeEvent_Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_TimeEvent_Annotation) String() string { @@ -1120,7 +1098,7 @@ func (*Span_TimeEvent_Annotation) ProtoMessage() {} func (x *Span_TimeEvent_Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,11 +1149,9 @@ type Span_TimeEvent_MessageEvent struct { func (x *Span_TimeEvent_MessageEvent) Reset() { *x = Span_TimeEvent_MessageEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span_TimeEvent_MessageEvent) String() string { @@ -1186,7 +1162,7 @@ func (*Span_TimeEvent_MessageEvent) ProtoMessage() {} func (x *Span_TimeEvent_MessageEvent) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1259,11 +1235,9 @@ type StackTrace_StackFrame struct { func (x *StackTrace_StackFrame) Reset() { *x = StackTrace_StackFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StackTrace_StackFrame) String() string { @@ -1274,7 +1248,7 @@ func (*StackTrace_StackFrame) ProtoMessage() {} func (x *StackTrace_StackFrame) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1328,9 @@ type StackTrace_StackFrames struct { func (x *StackTrace_StackFrames) Reset() { *x = StackTrace_StackFrames{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StackTrace_StackFrames) String() string { @@ -1369,7 +1341,7 @@ func (*StackTrace_StackFrames) ProtoMessage() {} func (x *StackTrace_StackFrames) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1762,176 +1734,6 @@ func file_google_devtools_cloudtrace_v2_trace_proto_init() { if File_google_devtools_cloudtrace_v2_trace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Span); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StackTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TruncatableString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Span_Attributes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Span_TimeEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Span_TimeEvents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Span_Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Span_Links); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Span_TimeEvent_Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Span_TimeEvent_MessageEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*StackTrace_StackFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*StackTrace_StackFrames); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_devtools_cloudtrace_v2_trace_proto_msgTypes[1].OneofWrappers = []any{ (*AttributeValue_StringValue)(nil), (*AttributeValue_IntValue)(nil), diff --git a/trace/apiv2/tracepb/tracing.pb.go b/trace/apiv2/tracepb/tracing.pb.go index b490f6ba28f6..a230ae8f3740 100755 --- a/trace/apiv2/tracepb/tracing.pb.go +++ b/trace/apiv2/tracepb/tracing.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/devtools/cloudtrace/v2/tracing.proto @@ -57,11 +57,9 @@ type BatchWriteSpansRequest struct { func (x *BatchWriteSpansRequest) Reset() { *x = BatchWriteSpansRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_devtools_cloudtrace_v2_tracing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_devtools_cloudtrace_v2_tracing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchWriteSpansRequest) String() string { @@ -72,7 +70,7 @@ func (*BatchWriteSpansRequest) ProtoMessage() {} func (x *BatchWriteSpansRequest) ProtoReflect() protoreflect.Message { mi := &file_google_devtools_cloudtrace_v2_tracing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,20 +208,6 @@ func file_google_devtools_cloudtrace_v2_tracing_proto_init() { return } file_google_devtools_cloudtrace_v2_trace_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_devtools_cloudtrace_v2_tracing_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*BatchWriteSpansRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/translate/apiv3/helpers.go b/translate/apiv3/helpers.go index 154999e5e937..6c9a722bd463 100755 --- a/translate/apiv3/helpers.go +++ b/translate/apiv3/helpers.go @@ -18,10 +18,20 @@ package translate import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "translate.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-translation", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/translate/apiv3/translatepb/adaptive_mt.pb.go b/translate/apiv3/translatepb/adaptive_mt.pb.go index a3c10a5df4f7..067b750ec9b3 100755 --- a/translate/apiv3/translatepb/adaptive_mt.pb.go +++ b/translate/apiv3/translatepb/adaptive_mt.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/translate/v3/adaptive_mt.proto @@ -64,11 +64,9 @@ type AdaptiveMtDataset struct { func (x *AdaptiveMtDataset) Reset() { *x = AdaptiveMtDataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtDataset) String() string { @@ -79,7 +77,7 @@ func (*AdaptiveMtDataset) ProtoMessage() {} func (x *AdaptiveMtDataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,11 +156,9 @@ type CreateAdaptiveMtDatasetRequest struct { func (x *CreateAdaptiveMtDatasetRequest) Reset() { *x = CreateAdaptiveMtDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAdaptiveMtDatasetRequest) String() string { @@ -173,7 +169,7 @@ func (*CreateAdaptiveMtDatasetRequest) ProtoMessage() {} func (x *CreateAdaptiveMtDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type DeleteAdaptiveMtDatasetRequest struct { func (x *DeleteAdaptiveMtDatasetRequest) Reset() { *x = DeleteAdaptiveMtDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAdaptiveMtDatasetRequest) String() string { @@ -230,7 +224,7 @@ func (*DeleteAdaptiveMtDatasetRequest) ProtoMessage() {} func (x *DeleteAdaptiveMtDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,11 +259,9 @@ type GetAdaptiveMtDatasetRequest struct { func (x *GetAdaptiveMtDatasetRequest) Reset() { *x = GetAdaptiveMtDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAdaptiveMtDatasetRequest) String() string { @@ -280,7 +272,7 @@ func (*GetAdaptiveMtDatasetRequest) ProtoMessage() {} func (x *GetAdaptiveMtDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +320,9 @@ type ListAdaptiveMtDatasetsRequest struct { func (x *ListAdaptiveMtDatasetsRequest) Reset() { *x = ListAdaptiveMtDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtDatasetsRequest) String() string { @@ -343,7 +333,7 @@ func (*ListAdaptiveMtDatasetsRequest) ProtoMessage() {} func (x *ListAdaptiveMtDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,11 +392,9 @@ type ListAdaptiveMtDatasetsResponse struct { func (x *ListAdaptiveMtDatasetsResponse) Reset() { *x = ListAdaptiveMtDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtDatasetsResponse) String() string { @@ -417,7 +405,7 @@ func (*ListAdaptiveMtDatasetsResponse) ProtoMessage() {} func (x *ListAdaptiveMtDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +459,9 @@ type AdaptiveMtTranslateRequest struct { func (x *AdaptiveMtTranslateRequest) Reset() { *x = AdaptiveMtTranslateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateRequest) String() string { @@ -486,7 +472,7 @@ func (*AdaptiveMtTranslateRequest) ProtoMessage() {} func (x *AdaptiveMtTranslateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +534,9 @@ type AdaptiveMtTranslation struct { func (x *AdaptiveMtTranslation) Reset() { *x = AdaptiveMtTranslation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslation) String() string { @@ -563,7 +547,7 @@ func (*AdaptiveMtTranslation) ProtoMessage() {} func (x *AdaptiveMtTranslation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,11 +586,9 @@ type AdaptiveMtTranslateResponse struct { func (x *AdaptiveMtTranslateResponse) Reset() { *x = AdaptiveMtTranslateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateResponse) String() string { @@ -617,7 +599,7 @@ func (*AdaptiveMtTranslateResponse) ProtoMessage() {} func (x *AdaptiveMtTranslateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +656,9 @@ type AdaptiveMtFile struct { func (x *AdaptiveMtFile) Reset() { *x = AdaptiveMtFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtFile) String() string { @@ -689,7 +669,7 @@ func (*AdaptiveMtFile) ProtoMessage() {} func (x *AdaptiveMtFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +732,9 @@ type GetAdaptiveMtFileRequest struct { func (x *GetAdaptiveMtFileRequest) Reset() { *x = GetAdaptiveMtFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAdaptiveMtFileRequest) String() string { @@ -767,7 +745,7 @@ func (*GetAdaptiveMtFileRequest) ProtoMessage() {} func (x *GetAdaptiveMtFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -802,11 +780,9 @@ type DeleteAdaptiveMtFileRequest struct { func (x *DeleteAdaptiveMtFileRequest) Reset() { *x = DeleteAdaptiveMtFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAdaptiveMtFileRequest) String() string { @@ -817,7 +793,7 @@ func (*DeleteAdaptiveMtFileRequest) ProtoMessage() {} func (x *DeleteAdaptiveMtFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +835,9 @@ type ImportAdaptiveMtFileRequest struct { func (x *ImportAdaptiveMtFileRequest) Reset() { *x = ImportAdaptiveMtFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAdaptiveMtFileRequest) String() string { @@ -874,7 +848,7 @@ func (*ImportAdaptiveMtFileRequest) ProtoMessage() {} func (x *ImportAdaptiveMtFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -947,11 +921,9 @@ type ImportAdaptiveMtFileResponse struct { func (x *ImportAdaptiveMtFileResponse) Reset() { *x = ImportAdaptiveMtFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAdaptiveMtFileResponse) String() string { @@ -962,7 +934,7 @@ func (*ImportAdaptiveMtFileResponse) ProtoMessage() {} func (x *ImportAdaptiveMtFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1006,11 +978,9 @@ type ListAdaptiveMtFilesRequest struct { func (x *ListAdaptiveMtFilesRequest) Reset() { *x = ListAdaptiveMtFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtFilesRequest) String() string { @@ -1021,7 +991,7 @@ func (*ListAdaptiveMtFilesRequest) ProtoMessage() {} func (x *ListAdaptiveMtFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1073,11 +1043,9 @@ type ListAdaptiveMtFilesResponse struct { func (x *ListAdaptiveMtFilesResponse) Reset() { *x = ListAdaptiveMtFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtFilesResponse) String() string { @@ -1088,7 +1056,7 @@ func (*ListAdaptiveMtFilesResponse) ProtoMessage() {} func (x *ListAdaptiveMtFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,11 +1106,9 @@ type AdaptiveMtSentence struct { func (x *AdaptiveMtSentence) Reset() { *x = AdaptiveMtSentence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtSentence) String() string { @@ -1153,7 +1119,7 @@ func (*AdaptiveMtSentence) ProtoMessage() {} func (x *AdaptiveMtSentence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1226,11 +1192,9 @@ type ListAdaptiveMtSentencesRequest struct { func (x *ListAdaptiveMtSentencesRequest) Reset() { *x = ListAdaptiveMtSentencesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtSentencesRequest) String() string { @@ -1241,7 +1205,7 @@ func (*ListAdaptiveMtSentencesRequest) ProtoMessage() {} func (x *ListAdaptiveMtSentencesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1255,9 @@ type ListAdaptiveMtSentencesResponse struct { func (x *ListAdaptiveMtSentencesResponse) Reset() { *x = ListAdaptiveMtSentencesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAdaptiveMtSentencesResponse) String() string { @@ -1306,7 +1268,7 @@ func (*ListAdaptiveMtSentencesResponse) ProtoMessage() {} func (x *ListAdaptiveMtSentencesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1311,9 @@ type AdaptiveMtTranslateRequest_ReferenceSentencePair struct { func (x *AdaptiveMtTranslateRequest_ReferenceSentencePair) Reset() { *x = AdaptiveMtTranslateRequest_ReferenceSentencePair{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateRequest_ReferenceSentencePair) String() string { @@ -1364,7 +1324,7 @@ func (*AdaptiveMtTranslateRequest_ReferenceSentencePair) ProtoMessage() {} func (x *AdaptiveMtTranslateRequest_ReferenceSentencePair) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,11 +1365,9 @@ type AdaptiveMtTranslateRequest_ReferenceSentencePairList struct { func (x *AdaptiveMtTranslateRequest_ReferenceSentencePairList) Reset() { *x = AdaptiveMtTranslateRequest_ReferenceSentencePairList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateRequest_ReferenceSentencePairList) String() string { @@ -1420,7 +1378,7 @@ func (*AdaptiveMtTranslateRequest_ReferenceSentencePairList) ProtoMessage() {} func (x *AdaptiveMtTranslateRequest_ReferenceSentencePairList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1461,11 +1419,9 @@ type AdaptiveMtTranslateRequest_ReferenceSentenceConfig struct { func (x *AdaptiveMtTranslateRequest_ReferenceSentenceConfig) Reset() { *x = AdaptiveMtTranslateRequest_ReferenceSentenceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateRequest_ReferenceSentenceConfig) String() string { @@ -1476,7 +1432,7 @@ func (*AdaptiveMtTranslateRequest_ReferenceSentenceConfig) ProtoMessage() {} func (x *AdaptiveMtTranslateRequest_ReferenceSentenceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1537,11 +1493,9 @@ type AdaptiveMtTranslateRequest_GlossaryConfig struct { func (x *AdaptiveMtTranslateRequest_GlossaryConfig) Reset() { *x = AdaptiveMtTranslateRequest_GlossaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptiveMtTranslateRequest_GlossaryConfig) String() string { @@ -1552,7 +1506,7 @@ func (*AdaptiveMtTranslateRequest_GlossaryConfig) ProtoMessage() {} func (x *AdaptiveMtTranslateRequest_GlossaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2022,284 +1976,6 @@ func file_google_cloud_translate_v3_adaptive_mt_proto_init() { return } file_google_cloud_translate_v3_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtDataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateAdaptiveMtDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAdaptiveMtDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAdaptiveMtDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetAdaptiveMtFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAdaptiveMtFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImportAdaptiveMtFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ImportAdaptiveMtFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtSentence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtSentencesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListAdaptiveMtSentencesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateRequest_ReferenceSentencePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateRequest_ReferenceSentencePairList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateRequest_ReferenceSentenceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AdaptiveMtTranslateRequest_GlossaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[6].OneofWrappers = []any{} file_google_cloud_translate_v3_adaptive_mt_proto_msgTypes[12].OneofWrappers = []any{ (*ImportAdaptiveMtFileRequest_FileInputSource)(nil), diff --git a/translate/apiv3/translatepb/automl_translation.pb.go b/translate/apiv3/translatepb/automl_translation.pb.go index 00016115ef9c..ff64aaa30dbf 100755 --- a/translate/apiv3/translatepb/automl_translation.pb.go +++ b/translate/apiv3/translatepb/automl_translation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/translate/v3/automl_translation.proto @@ -53,11 +53,9 @@ type ImportDataRequest struct { func (x *ImportDataRequest) Reset() { *x = ImportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataRequest) String() string { @@ -68,7 +66,7 @@ func (*ImportDataRequest) ProtoMessage() {} func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,11 +107,9 @@ type DatasetInputConfig struct { func (x *DatasetInputConfig) Reset() { *x = DatasetInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetInputConfig) String() string { @@ -124,7 +120,7 @@ func (*DatasetInputConfig) ProtoMessage() {} func (x *DatasetInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +160,9 @@ type ImportDataMetadata struct { func (x *ImportDataMetadata) Reset() { *x = ImportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportDataMetadata) String() string { @@ -179,7 +173,7 @@ func (*ImportDataMetadata) ProtoMessage() {} func (x *ImportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type ExportDataRequest struct { func (x *ExportDataRequest) Reset() { *x = ExportDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataRequest) String() string { @@ -252,7 +244,7 @@ func (*ExportDataRequest) ProtoMessage() {} func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,11 +289,9 @@ type DatasetOutputConfig struct { func (x *DatasetOutputConfig) Reset() { *x = DatasetOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetOutputConfig) String() string { @@ -312,7 +302,7 @@ func (*DatasetOutputConfig) ProtoMessage() {} func (x *DatasetOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -370,11 +360,9 @@ type ExportDataMetadata struct { func (x *ExportDataMetadata) Reset() { *x = ExportDataMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExportDataMetadata) String() string { @@ -385,7 +373,7 @@ func (*ExportDataMetadata) ProtoMessage() {} func (x *ExportDataMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,11 +428,9 @@ type DeleteDatasetRequest struct { func (x *DeleteDatasetRequest) Reset() { *x = DeleteDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetRequest) String() string { @@ -455,7 +441,7 @@ func (*DeleteDatasetRequest) ProtoMessage() {} func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +481,9 @@ type DeleteDatasetMetadata struct { func (x *DeleteDatasetMetadata) Reset() { *x = DeleteDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatasetMetadata) String() string { @@ -510,7 +494,7 @@ func (*DeleteDatasetMetadata) ProtoMessage() {} func (x *DeleteDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +549,9 @@ type GetDatasetRequest struct { func (x *GetDatasetRequest) Reset() { *x = GetDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatasetRequest) String() string { @@ -580,7 +562,7 @@ func (*GetDatasetRequest) ProtoMessage() {} func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +604,9 @@ type ListDatasetsRequest struct { func (x *ListDatasetsRequest) Reset() { *x = ListDatasetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsRequest) String() string { @@ -637,7 +617,7 @@ func (*ListDatasetsRequest) ProtoMessage() {} func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,11 +669,9 @@ type ListDatasetsResponse struct { func (x *ListDatasetsResponse) Reset() { *x = ListDatasetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatasetsResponse) String() string { @@ -704,7 +682,7 @@ func (*ListDatasetsResponse) ProtoMessage() {} func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -747,11 +725,9 @@ type CreateDatasetRequest struct { func (x *CreateDatasetRequest) Reset() { *x = CreateDatasetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetRequest) String() string { @@ -762,7 +738,7 @@ func (*CreateDatasetRequest) ProtoMessage() {} func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +785,9 @@ type CreateDatasetMetadata struct { func (x *CreateDatasetMetadata) Reset() { *x = CreateDatasetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatasetMetadata) String() string { @@ -824,7 +798,7 @@ func (*CreateDatasetMetadata) ProtoMessage() {} func (x *CreateDatasetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +865,9 @@ type ListExamplesRequest struct { func (x *ListExamplesRequest) Reset() { *x = ListExamplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesRequest) String() string { @@ -906,7 +878,7 @@ func (*ListExamplesRequest) ProtoMessage() {} func (x *ListExamplesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -965,11 +937,9 @@ type ListExamplesResponse struct { func (x *ListExamplesResponse) Reset() { *x = ListExamplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExamplesResponse) String() string { @@ -980,7 +950,7 @@ func (*ListExamplesResponse) ProtoMessage() {} func (x *ListExamplesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1028,11 +998,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -1043,7 +1011,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1098,11 +1066,9 @@ type BatchTransferResourcesResponse struct { func (x *BatchTransferResourcesResponse) Reset() { *x = BatchTransferResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTransferResourcesResponse) String() string { @@ -1113,7 +1079,7 @@ func (*BatchTransferResourcesResponse) ProtoMessage() {} func (x *BatchTransferResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1169,11 +1135,9 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Dataset) String() string { @@ -1184,7 +1148,7 @@ func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1284,11 +1248,9 @@ type CreateModelRequest struct { func (x *CreateModelRequest) Reset() { *x = CreateModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelRequest) String() string { @@ -1299,7 +1261,7 @@ func (*CreateModelRequest) ProtoMessage() {} func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1346,11 +1308,9 @@ type CreateModelMetadata struct { func (x *CreateModelMetadata) Reset() { *x = CreateModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateModelMetadata) String() string { @@ -1361,7 +1321,7 @@ func (*CreateModelMetadata) ProtoMessage() {} func (x *CreateModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1428,11 +1388,9 @@ type ListModelsRequest struct { func (x *ListModelsRequest) Reset() { *x = ListModelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsRequest) String() string { @@ -1443,7 +1401,7 @@ func (*ListModelsRequest) ProtoMessage() {} func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1502,11 +1460,9 @@ type ListModelsResponse struct { func (x *ListModelsResponse) Reset() { *x = ListModelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListModelsResponse) String() string { @@ -1517,7 +1473,7 @@ func (*ListModelsResponse) ProtoMessage() {} func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,11 +1514,9 @@ type GetModelRequest struct { func (x *GetModelRequest) Reset() { *x = GetModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetModelRequest) String() string { @@ -1573,7 +1527,7 @@ func (*GetModelRequest) ProtoMessage() {} func (x *GetModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1607,11 +1561,9 @@ type DeleteModelRequest struct { func (x *DeleteModelRequest) Reset() { *x = DeleteModelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelRequest) String() string { @@ -1622,7 +1574,7 @@ func (*DeleteModelRequest) ProtoMessage() {} func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1662,11 +1614,9 @@ type DeleteModelMetadata struct { func (x *DeleteModelMetadata) Reset() { *x = DeleteModelMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteModelMetadata) String() string { @@ -1677,7 +1627,7 @@ func (*DeleteModelMetadata) ProtoMessage() {} func (x *DeleteModelMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1756,11 +1706,9 @@ type Model struct { func (x *Model) Reset() { *x = Model{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Model) String() string { @@ -1771,7 +1719,7 @@ func (*Model) ProtoMessage() {} func (x *Model) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1877,11 +1825,9 @@ type DatasetInputConfig_InputFile struct { func (x *DatasetInputConfig_InputFile) Reset() { *x = DatasetInputConfig_InputFile{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatasetInputConfig_InputFile) String() string { @@ -1892,7 +1838,7 @@ func (*DatasetInputConfig_InputFile) ProtoMessage() {} func (x *DatasetInputConfig_InputFile) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1902,9 @@ type BatchTransferResourcesResponse_TransferResourceResponse struct { func (x *BatchTransferResourcesResponse_TransferResourceResponse) Reset() { *x = BatchTransferResourcesResponse_TransferResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTransferResourcesResponse_TransferResourceResponse) String() string { @@ -1971,7 +1915,7 @@ func (*BatchTransferResourcesResponse_TransferResourceResponse) ProtoMessage() { func (x *BatchTransferResourcesResponse_TransferResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_automl_translation_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2485,344 +2429,6 @@ func file_google_cloud_translate_v3_automl_translation_proto_init() { return } file_google_cloud_translate_v3_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DatasetInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DatasetOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExportDataMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListDatasetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatasetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListExamplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*BatchTransferResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Dataset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListModelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteModelMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Model); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*DatasetInputConfig_InputFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_automl_translation_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BatchTransferResourcesResponse_TransferResourceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_translate_v3_automl_translation_proto_msgTypes[4].OneofWrappers = []any{ (*DatasetOutputConfig_GcsDestination)(nil), } diff --git a/translate/apiv3/translatepb/common.pb.go b/translate/apiv3/translatepb/common.pb.go index 8ed3b21f3bdc..4ee898a2c643 100755 --- a/translate/apiv3/translatepb/common.pb.go +++ b/translate/apiv3/translatepb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/translate/v3/common.proto @@ -114,11 +114,9 @@ type GcsInputSource struct { func (x *GcsInputSource) Reset() { *x = GcsInputSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsInputSource) String() string { @@ -129,7 +127,7 @@ func (*GcsInputSource) ProtoMessage() {} func (x *GcsInputSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +165,9 @@ type FileInputSource struct { func (x *FileInputSource) Reset() { *x = FileInputSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileInputSource) String() string { @@ -182,7 +178,7 @@ func (*FileInputSource) ProtoMessage() {} func (x *FileInputSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +228,9 @@ type GcsOutputDestination struct { func (x *GcsOutputDestination) Reset() { *x = GcsOutputDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputDestination) String() string { @@ -247,7 +241,7 @@ func (*GcsOutputDestination) ProtoMessage() {} func (x *GcsOutputDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,11 +288,9 @@ type GlossaryEntry struct { func (x *GlossaryEntry) Reset() { *x = GlossaryEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlossaryEntry) String() string { @@ -309,7 +301,7 @@ func (*GlossaryEntry) ProtoMessage() {} func (x *GlossaryEntry) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +383,9 @@ type GlossaryTerm struct { func (x *GlossaryTerm) Reset() { *x = GlossaryTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlossaryTerm) String() string { @@ -406,7 +396,7 @@ func (*GlossaryTerm) ProtoMessage() {} func (x *GlossaryTerm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +439,9 @@ type GlossaryEntry_GlossaryTermsPair struct { func (x *GlossaryEntry_GlossaryTermsPair) Reset() { *x = GlossaryEntry_GlossaryTermsPair{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlossaryEntry_GlossaryTermsPair) String() string { @@ -464,7 +452,7 @@ func (*GlossaryEntry_GlossaryTermsPair) ProtoMessage() {} func (x *GlossaryEntry_GlossaryTermsPair) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +496,9 @@ type GlossaryEntry_GlossaryTermsSet struct { func (x *GlossaryEntry_GlossaryTermsSet) Reset() { *x = GlossaryEntry_GlossaryTermsSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlossaryEntry_GlossaryTermsSet) String() string { @@ -523,7 +509,7 @@ func (*GlossaryEntry_GlossaryTermsSet) ProtoMessage() {} func (x *GlossaryEntry_GlossaryTermsSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,92 +676,6 @@ func file_google_cloud_translate_v3_common_proto_init() { if File_google_cloud_translate_v3_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_translate_v3_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GcsInputSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FileInputSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GlossaryEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GlossaryTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GlossaryEntry_GlossaryTermsPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GlossaryEntry_GlossaryTermsSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_translate_v3_common_proto_msgTypes[3].OneofWrappers = []any{ (*GlossaryEntry_TermsPair)(nil), (*GlossaryEntry_TermsSet)(nil), diff --git a/translate/apiv3/translatepb/translation_service.pb.go b/translate/apiv3/translatepb/translation_service.pb.go index d4bd85b0bf91..f3c092226d06 100755 --- a/translate/apiv3/translatepb/translation_service.pb.go +++ b/translate/apiv3/translatepb/translation_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/translate/v3/translation_service.proto @@ -392,11 +392,9 @@ type TransliterationConfig struct { func (x *TransliterationConfig) Reset() { *x = TransliterationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransliterationConfig) String() string { @@ -407,7 +405,7 @@ func (*TransliterationConfig) ProtoMessage() {} func (x *TransliterationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +504,9 @@ type TranslateTextRequest struct { func (x *TranslateTextRequest) Reset() { *x = TranslateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateTextRequest) String() string { @@ -521,7 +517,7 @@ func (*TranslateTextRequest) ProtoMessage() {} func (x *TranslateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,11 +614,9 @@ type TranslateTextResponse struct { func (x *TranslateTextResponse) Reset() { *x = TranslateTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateTextResponse) String() string { @@ -633,7 +627,7 @@ func (*TranslateTextResponse) ProtoMessage() {} func (x *TranslateTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +686,9 @@ type Translation struct { func (x *Translation) Reset() { *x = Translation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Translation) String() string { @@ -707,7 +699,7 @@ func (*Translation) ProtoMessage() {} func (x *Translation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +768,9 @@ type RomanizeTextRequest struct { func (x *RomanizeTextRequest) Reset() { *x = RomanizeTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RomanizeTextRequest) String() string { @@ -791,7 +781,7 @@ func (*RomanizeTextRequest) ProtoMessage() {} func (x *RomanizeTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +836,9 @@ type Romanization struct { func (x *Romanization) Reset() { *x = Romanization{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Romanization) String() string { @@ -861,7 +849,7 @@ func (*Romanization) ProtoMessage() {} func (x *Romanization) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,11 +892,9 @@ type RomanizeTextResponse struct { func (x *RomanizeTextResponse) Reset() { *x = RomanizeTextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RomanizeTextResponse) String() string { @@ -919,7 +905,7 @@ func (*RomanizeTextResponse) ProtoMessage() {} func (x *RomanizeTextResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -992,11 +978,9 @@ type DetectLanguageRequest struct { func (x *DetectLanguageRequest) Reset() { *x = DetectLanguageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectLanguageRequest) String() string { @@ -1007,7 +991,7 @@ func (*DetectLanguageRequest) ProtoMessage() {} func (x *DetectLanguageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1074,9 @@ type DetectedLanguage struct { func (x *DetectedLanguage) Reset() { *x = DetectedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectedLanguage) String() string { @@ -1105,7 +1087,7 @@ func (*DetectedLanguage) ProtoMessage() {} func (x *DetectedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,11 +1129,9 @@ type DetectLanguageResponse struct { func (x *DetectLanguageResponse) Reset() { *x = DetectLanguageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectLanguageResponse) String() string { @@ -1162,7 +1142,7 @@ func (*DetectLanguageResponse) ProtoMessage() {} func (x *DetectLanguageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,11 +1205,9 @@ type GetSupportedLanguagesRequest struct { func (x *GetSupportedLanguagesRequest) Reset() { *x = GetSupportedLanguagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSupportedLanguagesRequest) String() string { @@ -1240,7 +1218,7 @@ func (*GetSupportedLanguagesRequest) ProtoMessage() {} func (x *GetSupportedLanguagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1267,9 @@ type SupportedLanguages struct { func (x *SupportedLanguages) Reset() { *x = SupportedLanguages{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedLanguages) String() string { @@ -1304,7 +1280,7 @@ func (*SupportedLanguages) ProtoMessage() {} func (x *SupportedLanguages) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1349,11 +1325,9 @@ type SupportedLanguage struct { func (x *SupportedLanguage) Reset() { *x = SupportedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SupportedLanguage) String() string { @@ -1364,7 +1338,7 @@ func (*SupportedLanguage) ProtoMessage() {} func (x *SupportedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1419,11 +1393,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -1434,7 +1406,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1477,11 +1449,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -1492,7 +1462,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1574,11 +1544,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -1589,7 +1557,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1627,11 +1595,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -1642,7 +1608,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1786,11 +1752,9 @@ type DocumentInputConfig struct { func (x *DocumentInputConfig) Reset() { *x = DocumentInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentInputConfig) String() string { @@ -1801,7 +1765,7 @@ func (*DocumentInputConfig) ProtoMessage() {} func (x *DocumentInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1894,11 +1858,9 @@ type DocumentOutputConfig struct { func (x *DocumentOutputConfig) Reset() { *x = DocumentOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentOutputConfig) String() string { @@ -1909,7 +1871,7 @@ func (*DocumentOutputConfig) ProtoMessage() {} func (x *DocumentOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2080,11 +2042,9 @@ type TranslateDocumentRequest struct { func (x *TranslateDocumentRequest) Reset() { *x = TranslateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateDocumentRequest) String() string { @@ -2095,7 +2055,7 @@ func (*TranslateDocumentRequest) ProtoMessage() {} func (x *TranslateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2216,11 +2176,9 @@ type DocumentTranslation struct { func (x *DocumentTranslation) Reset() { *x = DocumentTranslation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DocumentTranslation) String() string { @@ -2231,7 +2189,7 @@ func (*DocumentTranslation) ProtoMessage() {} func (x *DocumentTranslation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2294,11 +2252,9 @@ type TranslateDocumentResponse struct { func (x *TranslateDocumentResponse) Reset() { *x = TranslateDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateDocumentResponse) String() string { @@ -2309,7 +2265,7 @@ func (*TranslateDocumentResponse) ProtoMessage() {} func (x *TranslateDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2413,11 +2369,9 @@ type BatchTranslateTextRequest struct { func (x *BatchTranslateTextRequest) Reset() { *x = BatchTranslateTextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateTextRequest) String() string { @@ -2428,7 +2382,7 @@ func (*BatchTranslateTextRequest) ProtoMessage() {} func (x *BatchTranslateTextRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2522,11 +2476,9 @@ type BatchTranslateMetadata struct { func (x *BatchTranslateMetadata) Reset() { *x = BatchTranslateMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateMetadata) String() string { @@ -2537,7 +2489,7 @@ func (*BatchTranslateMetadata) ProtoMessage() {} func (x *BatchTranslateMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2612,11 +2564,9 @@ type BatchTranslateResponse struct { func (x *BatchTranslateResponse) Reset() { *x = BatchTranslateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateResponse) String() string { @@ -2627,7 +2577,7 @@ func (*BatchTranslateResponse) ProtoMessage() {} func (x *BatchTranslateResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2693,11 +2643,9 @@ type GlossaryInputConfig struct { func (x *GlossaryInputConfig) Reset() { *x = GlossaryInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GlossaryInputConfig) String() string { @@ -2708,7 +2656,7 @@ func (*GlossaryInputConfig) ProtoMessage() {} func (x *GlossaryInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2799,11 +2747,9 @@ type Glossary struct { func (x *Glossary) Reset() { *x = Glossary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Glossary) String() string { @@ -2814,7 +2760,7 @@ func (*Glossary) ProtoMessage() {} func (x *Glossary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2924,11 +2870,9 @@ type CreateGlossaryRequest struct { func (x *CreateGlossaryRequest) Reset() { *x = CreateGlossaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGlossaryRequest) String() string { @@ -2939,7 +2883,7 @@ func (*CreateGlossaryRequest) ProtoMessage() {} func (x *CreateGlossaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2983,11 +2927,9 @@ type UpdateGlossaryRequest struct { func (x *UpdateGlossaryRequest) Reset() { *x = UpdateGlossaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGlossaryRequest) String() string { @@ -2998,7 +2940,7 @@ func (*UpdateGlossaryRequest) ProtoMessage() {} func (x *UpdateGlossaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3039,11 +2981,9 @@ type GetGlossaryRequest struct { func (x *GetGlossaryRequest) Reset() { *x = GetGlossaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlossaryRequest) String() string { @@ -3054,7 +2994,7 @@ func (*GetGlossaryRequest) ProtoMessage() {} func (x *GetGlossaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3088,11 +3028,9 @@ type DeleteGlossaryRequest struct { func (x *DeleteGlossaryRequest) Reset() { *x = DeleteGlossaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlossaryRequest) String() string { @@ -3103,7 +3041,7 @@ func (*DeleteGlossaryRequest) ProtoMessage() {} func (x *DeleteGlossaryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3162,11 +3100,9 @@ type ListGlossariesRequest struct { func (x *ListGlossariesRequest) Reset() { *x = ListGlossariesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlossariesRequest) String() string { @@ -3177,7 +3113,7 @@ func (*ListGlossariesRequest) ProtoMessage() {} func (x *ListGlossariesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3236,11 +3172,9 @@ type ListGlossariesResponse struct { func (x *ListGlossariesResponse) Reset() { *x = ListGlossariesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlossariesResponse) String() string { @@ -3251,7 +3185,7 @@ func (*ListGlossariesResponse) ProtoMessage() {} func (x *ListGlossariesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3292,11 +3226,9 @@ type GetGlossaryEntryRequest struct { func (x *GetGlossaryEntryRequest) Reset() { *x = GetGlossaryEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlossaryEntryRequest) String() string { @@ -3307,7 +3239,7 @@ func (*GetGlossaryEntryRequest) ProtoMessage() {} func (x *GetGlossaryEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3341,11 +3273,9 @@ type DeleteGlossaryEntryRequest struct { func (x *DeleteGlossaryEntryRequest) Reset() { *x = DeleteGlossaryEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlossaryEntryRequest) String() string { @@ -3356,7 +3286,7 @@ func (*DeleteGlossaryEntryRequest) ProtoMessage() {} func (x *DeleteGlossaryEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3399,11 +3329,9 @@ type ListGlossaryEntriesRequest struct { func (x *ListGlossaryEntriesRequest) Reset() { *x = ListGlossaryEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlossaryEntriesRequest) String() string { @@ -3414,7 +3342,7 @@ func (*ListGlossaryEntriesRequest) ProtoMessage() {} func (x *ListGlossaryEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3465,11 +3393,9 @@ type ListGlossaryEntriesResponse struct { func (x *ListGlossaryEntriesResponse) Reset() { *x = ListGlossaryEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGlossaryEntriesResponse) String() string { @@ -3480,7 +3406,7 @@ func (*ListGlossaryEntriesResponse) ProtoMessage() {} func (x *ListGlossaryEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3523,11 +3449,9 @@ type CreateGlossaryEntryRequest struct { func (x *CreateGlossaryEntryRequest) Reset() { *x = CreateGlossaryEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGlossaryEntryRequest) String() string { @@ -3538,7 +3462,7 @@ func (*CreateGlossaryEntryRequest) ProtoMessage() {} func (x *CreateGlossaryEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3579,11 +3503,9 @@ type UpdateGlossaryEntryRequest struct { func (x *UpdateGlossaryEntryRequest) Reset() { *x = UpdateGlossaryEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGlossaryEntryRequest) String() string { @@ -3594,7 +3516,7 @@ func (*UpdateGlossaryEntryRequest) ProtoMessage() {} func (x *UpdateGlossaryEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3634,11 +3556,9 @@ type CreateGlossaryMetadata struct { func (x *CreateGlossaryMetadata) Reset() { *x = CreateGlossaryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGlossaryMetadata) String() string { @@ -3649,7 +3569,7 @@ func (*CreateGlossaryMetadata) ProtoMessage() {} func (x *CreateGlossaryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3704,11 +3624,9 @@ type UpdateGlossaryMetadata struct { func (x *UpdateGlossaryMetadata) Reset() { *x = UpdateGlossaryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGlossaryMetadata) String() string { @@ -3719,7 +3637,7 @@ func (*UpdateGlossaryMetadata) ProtoMessage() {} func (x *UpdateGlossaryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3773,11 +3691,9 @@ type DeleteGlossaryMetadata struct { func (x *DeleteGlossaryMetadata) Reset() { *x = DeleteGlossaryMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlossaryMetadata) String() string { @@ -3788,7 +3704,7 @@ func (*DeleteGlossaryMetadata) ProtoMessage() {} func (x *DeleteGlossaryMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3844,11 +3760,9 @@ type DeleteGlossaryResponse struct { func (x *DeleteGlossaryResponse) Reset() { *x = DeleteGlossaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGlossaryResponse) String() string { @@ -3859,7 +3773,7 @@ func (*DeleteGlossaryResponse) ProtoMessage() {} func (x *DeleteGlossaryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3971,11 +3885,9 @@ type BatchTranslateDocumentRequest struct { func (x *BatchTranslateDocumentRequest) Reset() { *x = BatchTranslateDocumentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateDocumentRequest) String() string { @@ -3986,7 +3898,7 @@ func (*BatchTranslateDocumentRequest) ProtoMessage() {} func (x *BatchTranslateDocumentRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4094,11 +4006,9 @@ type BatchDocumentInputConfig struct { func (x *BatchDocumentInputConfig) Reset() { *x = BatchDocumentInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDocumentInputConfig) String() string { @@ -4109,7 +4019,7 @@ func (*BatchDocumentInputConfig) ProtoMessage() {} func (x *BatchDocumentInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4184,11 +4094,9 @@ type BatchDocumentOutputConfig struct { func (x *BatchDocumentOutputConfig) Reset() { *x = BatchDocumentOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchDocumentOutputConfig) String() string { @@ -4199,7 +4107,7 @@ func (*BatchDocumentOutputConfig) ProtoMessage() {} func (x *BatchDocumentOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4325,11 +4233,9 @@ type BatchTranslateDocumentResponse struct { func (x *BatchTranslateDocumentResponse) Reset() { *x = BatchTranslateDocumentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateDocumentResponse) String() string { @@ -4340,7 +4246,7 @@ func (*BatchTranslateDocumentResponse) ProtoMessage() {} func (x *BatchTranslateDocumentResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4462,11 +4368,9 @@ type BatchTranslateDocumentMetadata struct { func (x *BatchTranslateDocumentMetadata) Reset() { *x = BatchTranslateDocumentMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchTranslateDocumentMetadata) String() string { @@ -4477,7 +4381,7 @@ func (*BatchTranslateDocumentMetadata) ProtoMessage() {} func (x *BatchTranslateDocumentMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4586,11 +4490,9 @@ type TranslateTextGlossaryConfig struct { func (x *TranslateTextGlossaryConfig) Reset() { *x = TranslateTextGlossaryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TranslateTextGlossaryConfig) String() string { @@ -4601,7 +4503,7 @@ func (*TranslateTextGlossaryConfig) ProtoMessage() {} func (x *TranslateTextGlossaryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4653,11 +4555,9 @@ type Glossary_LanguageCodePair struct { func (x *Glossary_LanguageCodePair) Reset() { *x = Glossary_LanguageCodePair{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Glossary_LanguageCodePair) String() string { @@ -4668,7 +4568,7 @@ func (*Glossary_LanguageCodePair) ProtoMessage() {} func (x *Glossary_LanguageCodePair) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4711,11 +4611,9 @@ type Glossary_LanguageCodesSet struct { func (x *Glossary_LanguageCodesSet) Reset() { *x = Glossary_LanguageCodesSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Glossary_LanguageCodesSet) String() string { @@ -4726,7 +4624,7 @@ func (*Glossary_LanguageCodesSet) ProtoMessage() {} func (x *Glossary_LanguageCodesSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_translate_v3_translation_service_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6416,620 +6314,6 @@ func file_google_cloud_translate_v3_translation_service_proto_init() { file_google_cloud_translate_v3_adaptive_mt_proto_init() file_google_cloud_translate_v3_automl_translation_proto_init() file_google_cloud_translate_v3_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_translate_v3_translation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransliterationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TranslateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TranslateTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Translation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RomanizeTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Romanization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RomanizeTextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*DetectLanguageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DetectedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DetectLanguageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetSupportedLanguagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SupportedLanguages); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SupportedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DocumentInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*DocumentOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*TranslateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*DocumentTranslation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*TranslateDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateTextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*GlossaryInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Glossary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateGlossaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGlossaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*GetGlossaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlossaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*ListGlossariesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListGlossariesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*GetGlossaryEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlossaryEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListGlossaryEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListGlossaryEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateGlossaryEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGlossaryEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*CreateGlossaryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGlossaryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlossaryMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGlossaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateDocumentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*BatchDocumentInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*BatchDocumentOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateDocumentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*BatchTranslateDocumentMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*TranslateTextGlossaryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Glossary_LanguageCodePair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_translate_v3_translation_service_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*Glossary_LanguageCodesSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_translate_v3_translation_service_proto_msgTypes[7].OneofWrappers = []any{ (*DetectLanguageRequest_Content)(nil), } diff --git a/translate/apiv3/translation_client.go b/translate/apiv3/translation_client.go index 175c2966df45..eabdf1a741d4 100755 --- a/translate/apiv3/translation_client.go +++ b/translate/apiv3/translation_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" translatepb "cloud.google.com/go/translate/apiv3/translatepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -764,6 +763,8 @@ type translationGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewTranslationClient creates a new translation service client based on gRPC. @@ -790,6 +791,7 @@ func NewTranslationClient(ctx context.Context, opts ...option.ClientOption) (*Tr connPool: connPool, translationClient: translatepb.NewTranslationServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -854,6 +856,8 @@ type translationRESTClient struct { // Points back to the CallOptions field of the containing TranslationClient CallOptions **TranslationCallOptions + + logger *slog.Logger } // NewTranslationRESTClient creates a new translation service rest client. @@ -871,6 +875,7 @@ func NewTranslationRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -933,7 +938,7 @@ func (c *translationGRPCClient) TranslateText(ctx context.Context, req *translat var resp *translatepb.TranslateTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.TranslateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.TranslateText, req, settings.GRPC, c.logger, "TranslateText") return err }, opts...) if err != nil { @@ -951,7 +956,7 @@ func (c *translationGRPCClient) RomanizeText(ctx context.Context, req *translate var resp *translatepb.RomanizeTextResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.RomanizeText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.RomanizeText, req, settings.GRPC, c.logger, "RomanizeText") return err }, opts...) if err != nil { @@ -969,7 +974,7 @@ func (c *translationGRPCClient) DetectLanguage(ctx context.Context, req *transla var resp *translatepb.DetectLanguageResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.DetectLanguage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.DetectLanguage, req, settings.GRPC, c.logger, "DetectLanguage") return err }, opts...) if err != nil { @@ -987,7 +992,7 @@ func (c *translationGRPCClient) GetSupportedLanguages(ctx context.Context, req * var resp *translatepb.SupportedLanguages err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetSupportedLanguages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetSupportedLanguages, req, settings.GRPC, c.logger, "GetSupportedLanguages") return err }, opts...) if err != nil { @@ -1005,7 +1010,7 @@ func (c *translationGRPCClient) TranslateDocument(ctx context.Context, req *tran var resp *translatepb.TranslateDocumentResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.TranslateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.TranslateDocument, req, settings.GRPC, c.logger, "TranslateDocument") return err }, opts...) if err != nil { @@ -1023,7 +1028,7 @@ func (c *translationGRPCClient) BatchTranslateText(ctx context.Context, req *tra var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.BatchTranslateText(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.BatchTranslateText, req, settings.GRPC, c.logger, "BatchTranslateText") return err }, opts...) if err != nil { @@ -1043,7 +1048,7 @@ func (c *translationGRPCClient) BatchTranslateDocument(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.BatchTranslateDocument(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.BatchTranslateDocument, req, settings.GRPC, c.logger, "BatchTranslateDocument") return err }, opts...) if err != nil { @@ -1063,7 +1068,7 @@ func (c *translationGRPCClient) CreateGlossary(ctx context.Context, req *transla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.CreateGlossary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.CreateGlossary, req, settings.GRPC, c.logger, "CreateGlossary") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *translationGRPCClient) UpdateGlossary(ctx context.Context, req *transla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.UpdateGlossary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.UpdateGlossary, req, settings.GRPC, c.logger, "UpdateGlossary") return err }, opts...) if err != nil { @@ -1114,7 +1119,7 @@ func (c *translationGRPCClient) ListGlossaries(ctx context.Context, req *transla } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListGlossaries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListGlossaries, req, settings.GRPC, c.logger, "ListGlossaries") return err }, opts...) if err != nil { @@ -1149,7 +1154,7 @@ func (c *translationGRPCClient) GetGlossary(ctx context.Context, req *translatep var resp *translatepb.Glossary err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetGlossary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetGlossary, req, settings.GRPC, c.logger, "GetGlossary") return err }, opts...) if err != nil { @@ -1167,7 +1172,7 @@ func (c *translationGRPCClient) DeleteGlossary(ctx context.Context, req *transla var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.DeleteGlossary(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.DeleteGlossary, req, settings.GRPC, c.logger, "DeleteGlossary") return err }, opts...) if err != nil { @@ -1187,7 +1192,7 @@ func (c *translationGRPCClient) GetGlossaryEntry(ctx context.Context, req *trans var resp *translatepb.GlossaryEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetGlossaryEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetGlossaryEntry, req, settings.GRPC, c.logger, "GetGlossaryEntry") return err }, opts...) if err != nil { @@ -1216,7 +1221,7 @@ func (c *translationGRPCClient) ListGlossaryEntries(ctx context.Context, req *tr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListGlossaryEntries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListGlossaryEntries, req, settings.GRPC, c.logger, "ListGlossaryEntries") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *translationGRPCClient) CreateGlossaryEntry(ctx context.Context, req *tr var resp *translatepb.GlossaryEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.CreateGlossaryEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.CreateGlossaryEntry, req, settings.GRPC, c.logger, "CreateGlossaryEntry") return err }, opts...) if err != nil { @@ -1269,7 +1274,7 @@ func (c *translationGRPCClient) UpdateGlossaryEntry(ctx context.Context, req *tr var resp *translatepb.GlossaryEntry err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.UpdateGlossaryEntry(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.UpdateGlossaryEntry, req, settings.GRPC, c.logger, "UpdateGlossaryEntry") return err }, opts...) if err != nil { @@ -1286,7 +1291,7 @@ func (c *translationGRPCClient) DeleteGlossaryEntry(ctx context.Context, req *tr opts = append((*c.CallOptions).DeleteGlossaryEntry[0:len((*c.CallOptions).DeleteGlossaryEntry):len((*c.CallOptions).DeleteGlossaryEntry)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.translationClient.DeleteGlossaryEntry(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.translationClient.DeleteGlossaryEntry, req, settings.GRPC, c.logger, "DeleteGlossaryEntry") return err }, opts...) return err @@ -1301,7 +1306,7 @@ func (c *translationGRPCClient) CreateDataset(ctx context.Context, req *translat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.CreateDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.CreateDataset, req, settings.GRPC, c.logger, "CreateDataset") return err }, opts...) if err != nil { @@ -1321,7 +1326,7 @@ func (c *translationGRPCClient) GetDataset(ctx context.Context, req *translatepb var resp *translatepb.Dataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetDataset, req, settings.GRPC, c.logger, "GetDataset") return err }, opts...) if err != nil { @@ -1350,7 +1355,7 @@ func (c *translationGRPCClient) ListDatasets(ctx context.Context, req *translate } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListDatasets, req, settings.GRPC, c.logger, "ListDatasets") return err }, opts...) if err != nil { @@ -1385,7 +1390,7 @@ func (c *translationGRPCClient) DeleteDataset(ctx context.Context, req *translat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.DeleteDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.DeleteDataset, req, settings.GRPC, c.logger, "DeleteDataset") return err }, opts...) if err != nil { @@ -1405,7 +1410,7 @@ func (c *translationGRPCClient) CreateAdaptiveMtDataset(ctx context.Context, req var resp *translatepb.AdaptiveMtDataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.CreateAdaptiveMtDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.CreateAdaptiveMtDataset, req, settings.GRPC, c.logger, "CreateAdaptiveMtDataset") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *translationGRPCClient) DeleteAdaptiveMtDataset(ctx context.Context, req opts = append((*c.CallOptions).DeleteAdaptiveMtDataset[0:len((*c.CallOptions).DeleteAdaptiveMtDataset):len((*c.CallOptions).DeleteAdaptiveMtDataset)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.translationClient.DeleteAdaptiveMtDataset(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.translationClient.DeleteAdaptiveMtDataset, req, settings.GRPC, c.logger, "DeleteAdaptiveMtDataset") return err }, opts...) return err @@ -1437,7 +1442,7 @@ func (c *translationGRPCClient) GetAdaptiveMtDataset(ctx context.Context, req *t var resp *translatepb.AdaptiveMtDataset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetAdaptiveMtDataset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetAdaptiveMtDataset, req, settings.GRPC, c.logger, "GetAdaptiveMtDataset") return err }, opts...) if err != nil { @@ -1466,7 +1471,7 @@ func (c *translationGRPCClient) ListAdaptiveMtDatasets(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListAdaptiveMtDatasets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListAdaptiveMtDatasets, req, settings.GRPC, c.logger, "ListAdaptiveMtDatasets") return err }, opts...) if err != nil { @@ -1501,7 +1506,7 @@ func (c *translationGRPCClient) AdaptiveMtTranslate(ctx context.Context, req *tr var resp *translatepb.AdaptiveMtTranslateResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.AdaptiveMtTranslate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.AdaptiveMtTranslate, req, settings.GRPC, c.logger, "AdaptiveMtTranslate") return err }, opts...) if err != nil { @@ -1519,7 +1524,7 @@ func (c *translationGRPCClient) GetAdaptiveMtFile(ctx context.Context, req *tran var resp *translatepb.AdaptiveMtFile err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetAdaptiveMtFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetAdaptiveMtFile, req, settings.GRPC, c.logger, "GetAdaptiveMtFile") return err }, opts...) if err != nil { @@ -1536,7 +1541,7 @@ func (c *translationGRPCClient) DeleteAdaptiveMtFile(ctx context.Context, req *t opts = append((*c.CallOptions).DeleteAdaptiveMtFile[0:len((*c.CallOptions).DeleteAdaptiveMtFile):len((*c.CallOptions).DeleteAdaptiveMtFile)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.translationClient.DeleteAdaptiveMtFile(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.translationClient.DeleteAdaptiveMtFile, req, settings.GRPC, c.logger, "DeleteAdaptiveMtFile") return err }, opts...) return err @@ -1551,7 +1556,7 @@ func (c *translationGRPCClient) ImportAdaptiveMtFile(ctx context.Context, req *t var resp *translatepb.ImportAdaptiveMtFileResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ImportAdaptiveMtFile(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ImportAdaptiveMtFile, req, settings.GRPC, c.logger, "ImportAdaptiveMtFile") return err }, opts...) if err != nil { @@ -1580,7 +1585,7 @@ func (c *translationGRPCClient) ListAdaptiveMtFiles(ctx context.Context, req *tr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListAdaptiveMtFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListAdaptiveMtFiles, req, settings.GRPC, c.logger, "ListAdaptiveMtFiles") return err }, opts...) if err != nil { @@ -1626,7 +1631,7 @@ func (c *translationGRPCClient) ListAdaptiveMtSentences(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListAdaptiveMtSentences(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListAdaptiveMtSentences, req, settings.GRPC, c.logger, "ListAdaptiveMtSentences") return err }, opts...) if err != nil { @@ -1661,7 +1666,7 @@ func (c *translationGRPCClient) ImportData(ctx context.Context, req *translatepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ImportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ImportData, req, settings.GRPC, c.logger, "ImportData") return err }, opts...) if err != nil { @@ -1681,7 +1686,7 @@ func (c *translationGRPCClient) ExportData(ctx context.Context, req *translatepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ExportData(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ExportData, req, settings.GRPC, c.logger, "ExportData") return err }, opts...) if err != nil { @@ -1712,7 +1717,7 @@ func (c *translationGRPCClient) ListExamples(ctx context.Context, req *translate } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListExamples(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListExamples, req, settings.GRPC, c.logger, "ListExamples") return err }, opts...) if err != nil { @@ -1747,7 +1752,7 @@ func (c *translationGRPCClient) CreateModel(ctx context.Context, req *translatep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.CreateModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.CreateModel, req, settings.GRPC, c.logger, "CreateModel") return err }, opts...) if err != nil { @@ -1778,7 +1783,7 @@ func (c *translationGRPCClient) ListModels(ctx context.Context, req *translatepb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.ListModels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.ListModels, req, settings.GRPC, c.logger, "ListModels") return err }, opts...) if err != nil { @@ -1813,7 +1818,7 @@ func (c *translationGRPCClient) GetModel(ctx context.Context, req *translatepb.G var resp *translatepb.Model err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.GetModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.GetModel, req, settings.GRPC, c.logger, "GetModel") return err }, opts...) if err != nil { @@ -1831,7 +1836,7 @@ func (c *translationGRPCClient) DeleteModel(ctx context.Context, req *translatep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.translationClient.DeleteModel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.translationClient.DeleteModel, req, settings.GRPC, c.logger, "DeleteModel") return err }, opts...) if err != nil { @@ -1851,7 +1856,7 @@ func (c *translationGRPCClient) GetLocation(ctx context.Context, req *locationpb var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1880,7 +1885,7 @@ func (c *translationGRPCClient) ListLocations(ctx context.Context, req *location } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1914,7 +1919,7 @@ func (c *translationGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1928,7 +1933,7 @@ func (c *translationGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1943,7 +1948,7 @@ func (c *translationGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1972,7 +1977,7 @@ func (c *translationGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2007,7 +2012,7 @@ func (c *translationGRPCClient) WaitOperation(ctx context.Context, req *longrunn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -2055,17 +2060,7 @@ func (c *translationRESTClient) TranslateText(ctx context.Context, req *translat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TranslateText") if err != nil { return err } @@ -2121,17 +2116,7 @@ func (c *translationRESTClient) RomanizeText(ctx context.Context, req *translate httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RomanizeText") if err != nil { return err } @@ -2187,17 +2172,7 @@ func (c *translationRESTClient) DetectLanguage(ctx context.Context, req *transla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DetectLanguage") if err != nil { return err } @@ -2253,17 +2228,7 @@ func (c *translationRESTClient) GetSupportedLanguages(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSupportedLanguages") if err != nil { return err } @@ -2319,17 +2284,7 @@ func (c *translationRESTClient) TranslateDocument(ctx context.Context, req *tran httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TranslateDocument") if err != nil { return err } @@ -2390,21 +2345,10 @@ func (c *translationRESTClient) BatchTranslateText(ctx context.Context, req *tra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchTranslateText") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2466,21 +2410,10 @@ func (c *translationRESTClient) BatchTranslateDocument(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchTranslateDocument") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2538,21 +2471,10 @@ func (c *translationRESTClient) CreateGlossary(ctx context.Context, req *transla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGlossary") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2617,21 +2539,10 @@ func (c *translationRESTClient) UpdateGlossary(ctx context.Context, req *transla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGlossary") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2698,21 +2609,10 @@ func (c *translationRESTClient) ListGlossaries(ctx context.Context, req *transla } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGlossaries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2776,17 +2676,7 @@ func (c *translationRESTClient) GetGlossary(ctx context.Context, req *translatep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGlossary") if err != nil { return err } @@ -2837,21 +2727,10 @@ func (c *translationRESTClient) DeleteGlossary(ctx context.Context, req *transla httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGlossary") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2902,17 +2781,7 @@ func (c *translationRESTClient) GetGlossaryEntry(ctx context.Context, req *trans httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGlossaryEntry") if err != nil { return err } @@ -2974,21 +2843,10 @@ func (c *translationRESTClient) ListGlossaryEntries(ctx context.Context, req *tr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGlossaryEntries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3058,17 +2916,7 @@ func (c *translationRESTClient) CreateGlossaryEntry(ctx context.Context, req *tr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGlossaryEntry") if err != nil { return err } @@ -3125,17 +2973,7 @@ func (c *translationRESTClient) UpdateGlossaryEntry(ctx context.Context, req *tr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGlossaryEntry") if err != nil { return err } @@ -3182,15 +3020,8 @@ func (c *translationRESTClient) DeleteGlossaryEntry(ctx context.Context, req *tr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGlossaryEntry") + return err }, opts...) } @@ -3233,21 +3064,10 @@ func (c *translationRESTClient) CreateDataset(ctx context.Context, req *translat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3298,17 +3118,7 @@ func (c *translationRESTClient) GetDataset(ctx context.Context, req *translatepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataset") if err != nil { return err } @@ -3370,21 +3180,10 @@ func (c *translationRESTClient) ListDatasets(ctx context.Context, req *translate } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatasets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3446,21 +3245,10 @@ func (c *translationRESTClient) DeleteDataset(ctx context.Context, req *translat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3518,17 +3306,7 @@ func (c *translationRESTClient) CreateAdaptiveMtDataset(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAdaptiveMtDataset") if err != nil { return err } @@ -3576,15 +3354,8 @@ func (c *translationRESTClient) DeleteAdaptiveMtDataset(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAdaptiveMtDataset") + return err }, opts...) } @@ -3621,17 +3392,7 @@ func (c *translationRESTClient) GetAdaptiveMtDataset(ctx context.Context, req *t httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAdaptiveMtDataset") if err != nil { return err } @@ -3696,21 +3457,10 @@ func (c *translationRESTClient) ListAdaptiveMtDatasets(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAdaptiveMtDatasets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3779,17 +3529,7 @@ func (c *translationRESTClient) AdaptiveMtTranslate(ctx context.Context, req *tr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AdaptiveMtTranslate") if err != nil { return err } @@ -3839,17 +3579,7 @@ func (c *translationRESTClient) GetAdaptiveMtFile(ctx context.Context, req *tran httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAdaptiveMtFile") if err != nil { return err } @@ -3896,15 +3626,8 @@ func (c *translationRESTClient) DeleteAdaptiveMtFile(ctx context.Context, req *t httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAdaptiveMtFile") + return err }, opts...) } @@ -3948,17 +3671,7 @@ func (c *translationRESTClient) ImportAdaptiveMtFile(ctx context.Context, req *t httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAdaptiveMtFile") if err != nil { return err } @@ -4020,21 +3733,10 @@ func (c *translationRESTClient) ListAdaptiveMtFiles(ctx context.Context, req *tr } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAdaptiveMtFiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4109,21 +3811,10 @@ func (c *translationRESTClient) ListAdaptiveMtSentences(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAdaptiveMtSentences") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4191,21 +3882,10 @@ func (c *translationRESTClient) ImportData(ctx context.Context, req *translatepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportData") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4261,21 +3941,10 @@ func (c *translationRESTClient) ExportData(ctx context.Context, req *translatepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExportData") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4341,21 +4010,10 @@ func (c *translationRESTClient) ListExamples(ctx context.Context, req *translate } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExamples") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4424,21 +4082,10 @@ func (c *translationRESTClient) CreateModel(ctx context.Context, req *translatep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4504,21 +4151,10 @@ func (c *translationRESTClient) ListModels(ctx context.Context, req *translatepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListModels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4581,17 +4217,7 @@ func (c *translationRESTClient) GetModel(ctx context.Context, req *translatepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetModel") if err != nil { return err } @@ -4640,21 +4266,10 @@ func (c *translationRESTClient) DeleteModel(ctx context.Context, req *translatep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteModel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4705,17 +4320,7 @@ func (c *translationRESTClient) GetLocation(ctx context.Context, req *locationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -4780,21 +4385,10 @@ func (c *translationRESTClient) ListLocations(ctx context.Context, req *location } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4860,15 +4454,8 @@ func (c *translationRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -4902,15 +4489,8 @@ func (c *translationRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -4947,17 +4527,7 @@ func (c *translationRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -5022,21 +4592,10 @@ func (c *translationRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5105,17 +4664,7 @@ func (c *translationRESTClient) WaitOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "WaitOperation") if err != nil { return err } diff --git a/translate/apiv3/translation_client_example_go123_test.go b/translate/apiv3/translation_client_example_go123_test.go index 6e7632f673aa..0630b92e7c22 100644 --- a/translate/apiv3/translation_client_example_go123_test.go +++ b/translate/apiv3/translation_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleTranslationClient_ListAdaptiveMtDatasets_all() { } for resp, err := range c.ListAdaptiveMtDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleTranslationClient_ListAdaptiveMtFiles_all() { } for resp, err := range c.ListAdaptiveMtFiles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleTranslationClient_ListAdaptiveMtSentences_all() { } for resp, err := range c.ListAdaptiveMtSentences(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleTranslationClient_ListDatasets_all() { } for resp, err := range c.ListDatasets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleTranslationClient_ListExamples_all() { } for resp, err := range c.ListExamples(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleTranslationClient_ListGlossaries_all() { } for resp, err := range c.ListGlossaries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleTranslationClient_ListGlossaryEntries_all() { } for resp, err := range c.ListGlossaryEntries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleTranslationClient_ListModels_all() { } for resp, err := range c.ListModels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleTranslationClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleTranslationClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/video/livestream/apiv1/helpers.go b/video/livestream/apiv1/helpers.go index 9cce958acc70..1ee62624b1bf 100755 --- a/video/livestream/apiv1/helpers.go +++ b/video/livestream/apiv1/helpers.go @@ -18,10 +18,20 @@ package livestream import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "livestream.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/video/livestream/apiv1/livestream_client.go b/video/livestream/apiv1/livestream_client.go index 05c751534be5..c51748d44e9e 100755 --- a/video/livestream/apiv1/livestream_client.go +++ b/video/livestream/apiv1/livestream_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -700,6 +699,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new livestream service client based on gRPC. @@ -730,6 +731,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: livestreampb.NewLivestreamServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -794,6 +796,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new livestream service rest client. @@ -815,6 +819,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -877,7 +882,7 @@ func (c *gRPCClient) CreateChannel(ctx context.Context, req *livestreampb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateChannel, req, settings.GRPC, c.logger, "CreateChannel") return err }, opts...) if err != nil { @@ -908,7 +913,7 @@ func (c *gRPCClient) ListChannels(ctx context.Context, req *livestreampb.ListCha } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListChannels(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListChannels, req, settings.GRPC, c.logger, "ListChannels") return err }, opts...) if err != nil { @@ -943,7 +948,7 @@ func (c *gRPCClient) GetChannel(ctx context.Context, req *livestreampb.GetChanne var resp *livestreampb.Channel err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetChannel, req, settings.GRPC, c.logger, "GetChannel") return err }, opts...) if err != nil { @@ -961,7 +966,7 @@ func (c *gRPCClient) DeleteChannel(ctx context.Context, req *livestreampb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteChannel, req, settings.GRPC, c.logger, "DeleteChannel") return err }, opts...) if err != nil { @@ -981,7 +986,7 @@ func (c *gRPCClient) UpdateChannel(ctx context.Context, req *livestreampb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateChannel, req, settings.GRPC, c.logger, "UpdateChannel") return err }, opts...) if err != nil { @@ -1001,7 +1006,7 @@ func (c *gRPCClient) StartChannel(ctx context.Context, req *livestreampb.StartCh var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartChannel, req, settings.GRPC, c.logger, "StartChannel") return err }, opts...) if err != nil { @@ -1021,7 +1026,7 @@ func (c *gRPCClient) StopChannel(ctx context.Context, req *livestreampb.StopChan var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopChannel, req, settings.GRPC, c.logger, "StopChannel") return err }, opts...) if err != nil { @@ -1041,7 +1046,7 @@ func (c *gRPCClient) CreateInput(ctx context.Context, req *livestreampb.CreateIn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateInput, req, settings.GRPC, c.logger, "CreateInput") return err }, opts...) if err != nil { @@ -1072,7 +1077,7 @@ func (c *gRPCClient) ListInputs(ctx context.Context, req *livestreampb.ListInput } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListInputs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListInputs, req, settings.GRPC, c.logger, "ListInputs") return err }, opts...) if err != nil { @@ -1107,7 +1112,7 @@ func (c *gRPCClient) GetInput(ctx context.Context, req *livestreampb.GetInputReq var resp *livestreampb.Input err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetInput, req, settings.GRPC, c.logger, "GetInput") return err }, opts...) if err != nil { @@ -1125,7 +1130,7 @@ func (c *gRPCClient) DeleteInput(ctx context.Context, req *livestreampb.DeleteIn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteInput, req, settings.GRPC, c.logger, "DeleteInput") return err }, opts...) if err != nil { @@ -1145,7 +1150,7 @@ func (c *gRPCClient) UpdateInput(ctx context.Context, req *livestreampb.UpdateIn var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateInput, req, settings.GRPC, c.logger, "UpdateInput") return err }, opts...) if err != nil { @@ -1165,7 +1170,7 @@ func (c *gRPCClient) CreateEvent(ctx context.Context, req *livestreampb.CreateEv var resp *livestreampb.Event err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateEvent, req, settings.GRPC, c.logger, "CreateEvent") return err }, opts...) if err != nil { @@ -1194,7 +1199,7 @@ func (c *gRPCClient) ListEvents(ctx context.Context, req *livestreampb.ListEvent } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListEvents, req, settings.GRPC, c.logger, "ListEvents") return err }, opts...) if err != nil { @@ -1229,7 +1234,7 @@ func (c *gRPCClient) GetEvent(ctx context.Context, req *livestreampb.GetEventReq var resp *livestreampb.Event err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetEvent, req, settings.GRPC, c.logger, "GetEvent") return err }, opts...) if err != nil { @@ -1246,7 +1251,7 @@ func (c *gRPCClient) DeleteEvent(ctx context.Context, req *livestreampb.DeleteEv opts = append((*c.CallOptions).DeleteEvent[0:len((*c.CallOptions).DeleteEvent):len((*c.CallOptions).DeleteEvent)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteEvent(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteEvent, req, settings.GRPC, c.logger, "DeleteEvent") return err }, opts...) return err @@ -1272,7 +1277,7 @@ func (c *gRPCClient) ListClips(ctx context.Context, req *livestreampb.ListClipsR } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClips(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClips, req, settings.GRPC, c.logger, "ListClips") return err }, opts...) if err != nil { @@ -1307,7 +1312,7 @@ func (c *gRPCClient) GetClip(ctx context.Context, req *livestreampb.GetClipReque var resp *livestreampb.Clip err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetClip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetClip, req, settings.GRPC, c.logger, "GetClip") return err }, opts...) if err != nil { @@ -1325,7 +1330,7 @@ func (c *gRPCClient) CreateClip(ctx context.Context, req *livestreampb.CreateCli var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateClip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateClip, req, settings.GRPC, c.logger, "CreateClip") return err }, opts...) if err != nil { @@ -1345,7 +1350,7 @@ func (c *gRPCClient) DeleteClip(ctx context.Context, req *livestreampb.DeleteCli var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteClip(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteClip, req, settings.GRPC, c.logger, "DeleteClip") return err }, opts...) if err != nil { @@ -1365,7 +1370,7 @@ func (c *gRPCClient) CreateAsset(ctx context.Context, req *livestreampb.CreateAs var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateAsset, req, settings.GRPC, c.logger, "CreateAsset") return err }, opts...) if err != nil { @@ -1385,7 +1390,7 @@ func (c *gRPCClient) DeleteAsset(ctx context.Context, req *livestreampb.DeleteAs var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteAsset, req, settings.GRPC, c.logger, "DeleteAsset") return err }, opts...) if err != nil { @@ -1405,7 +1410,7 @@ func (c *gRPCClient) GetAsset(ctx context.Context, req *livestreampb.GetAssetReq var resp *livestreampb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetAsset, req, settings.GRPC, c.logger, "GetAsset") return err }, opts...) if err != nil { @@ -1434,7 +1439,7 @@ func (c *gRPCClient) ListAssets(ctx context.Context, req *livestreampb.ListAsset } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -1469,7 +1474,7 @@ func (c *gRPCClient) GetPool(ctx context.Context, req *livestreampb.GetPoolReque var resp *livestreampb.Pool err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPool, req, settings.GRPC, c.logger, "GetPool") return err }, opts...) if err != nil { @@ -1487,7 +1492,7 @@ func (c *gRPCClient) UpdatePool(ctx context.Context, req *livestreampb.UpdatePoo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePool(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePool, req, settings.GRPC, c.logger, "UpdatePool") return err }, opts...) if err != nil { @@ -1507,7 +1512,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -1536,7 +1541,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -1570,7 +1575,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1584,7 +1589,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1599,7 +1604,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1628,7 +1633,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1698,21 +1703,10 @@ func (c *restClient) CreateChannel(ctx context.Context, req *livestreampb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateChannel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1781,21 +1775,10 @@ func (c *restClient) ListChannels(ctx context.Context, req *livestreampb.ListCha } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListChannels") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1858,17 +1841,7 @@ func (c *restClient) GetChannel(ctx context.Context, req *livestreampb.GetChanne httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetChannel") if err != nil { return err } @@ -1923,21 +1896,10 @@ func (c *restClient) DeleteChannel(ctx context.Context, req *livestreampb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteChannel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2004,21 +1966,10 @@ func (c *restClient) UpdateChannel(ctx context.Context, req *livestreampb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateChannel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2075,21 +2026,10 @@ func (c *restClient) StartChannel(ctx context.Context, req *livestreampb.StartCh httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartChannel") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2146,21 +2086,10 @@ func (c *restClient) StopChannel(ctx context.Context, req *livestreampb.StopChan httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopChannel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2221,21 +2150,10 @@ func (c *restClient) CreateInput(ctx context.Context, req *livestreampb.CreateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateInput") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2304,21 +2222,10 @@ func (c *restClient) ListInputs(ctx context.Context, req *livestreampb.ListInput } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInputs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2381,17 +2288,7 @@ func (c *restClient) GetInput(ctx context.Context, req *livestreampb.GetInputReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInput") if err != nil { return err } @@ -2443,21 +2340,10 @@ func (c *restClient) DeleteInput(ctx context.Context, req *livestreampb.DeleteIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteInput") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2524,21 +2410,10 @@ func (c *restClient) UpdateInput(ctx context.Context, req *livestreampb.UpdateIn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateInput") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2600,17 +2475,7 @@ func (c *restClient) CreateEvent(ctx context.Context, req *livestreampb.CreateEv httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEvent") if err != nil { return err } @@ -2678,21 +2543,10 @@ func (c *restClient) ListEvents(ctx context.Context, req *livestreampb.ListEvent } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2755,17 +2609,7 @@ func (c *restClient) GetEvent(ctx context.Context, req *livestreampb.GetEventReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvent") if err != nil { return err } @@ -2815,15 +2659,8 @@ func (c *restClient) DeleteEvent(ctx context.Context, req *livestreampb.DeleteEv httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEvent") + return err }, opts...) } @@ -2878,21 +2715,10 @@ func (c *restClient) ListClips(ctx context.Context, req *livestreampb.ListClipsR } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClips") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2955,17 +2781,7 @@ func (c *restClient) GetClip(ctx context.Context, req *livestreampb.GetClipReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetClip") if err != nil { return err } @@ -3025,21 +2841,10 @@ func (c *restClient) CreateClip(ctx context.Context, req *livestreampb.CreateCli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateClip") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3093,21 +2898,10 @@ func (c *restClient) DeleteClip(ctx context.Context, req *livestreampb.DeleteCli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteClip") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3169,21 +2963,10 @@ func (c *restClient) CreateAsset(ctx context.Context, req *livestreampb.CreateAs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAsset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3236,21 +3019,10 @@ func (c *restClient) DeleteAsset(ctx context.Context, req *livestreampb.DeleteAs httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAsset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3301,17 +3073,7 @@ func (c *restClient) GetAsset(ctx context.Context, req *livestreampb.GetAssetReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAsset") if err != nil { return err } @@ -3379,21 +3141,10 @@ func (c *restClient) ListAssets(ctx context.Context, req *livestreampb.ListAsset } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3456,17 +3207,7 @@ func (c *restClient) GetPool(ctx context.Context, req *livestreampb.GetPoolReque httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPool") if err != nil { return err } @@ -3532,21 +3273,10 @@ func (c *restClient) UpdatePool(ctx context.Context, req *livestreampb.UpdatePoo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePool") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3597,17 +3327,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -3672,21 +3392,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3752,15 +3461,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3794,15 +3496,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3839,17 +3534,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3914,21 +3599,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/video/livestream/apiv1/livestream_client_example_go123_test.go b/video/livestream/apiv1/livestream_client_example_go123_test.go index c930c4ad35f0..ea495ce534ab 100644 --- a/video/livestream/apiv1/livestream_client_example_go123_test.go +++ b/video/livestream/apiv1/livestream_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListChannels_all() { } for resp, err := range c.ListChannels(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListClips_all() { } for resp, err := range c.ListClips(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListEvents_all() { } for resp, err := range c.ListEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListInputs_all() { } for resp, err := range c.ListInputs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/video/livestream/apiv1/livestreampb/outputs.pb.go b/video/livestream/apiv1/livestreampb/outputs.pb.go index bd6bfe5bf7a0..2dffc45457d7 100755 --- a/video/livestream/apiv1/livestreampb/outputs.pb.go +++ b/video/livestream/apiv1/livestreampb/outputs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/livestream/v1/outputs.proto @@ -168,11 +168,9 @@ type ElementaryStream struct { func (x *ElementaryStream) Reset() { *x = ElementaryStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ElementaryStream) String() string { @@ -183,7 +181,7 @@ func (*ElementaryStream) ProtoMessage() {} func (x *ElementaryStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +290,9 @@ type MuxStream struct { func (x *MuxStream) Reset() { *x = MuxStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MuxStream) String() string { @@ -307,7 +303,7 @@ func (*MuxStream) ProtoMessage() {} func (x *MuxStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +406,9 @@ type Manifest struct { func (x *Manifest) Reset() { *x = Manifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Manifest) String() string { @@ -425,7 +419,7 @@ func (*Manifest) ProtoMessage() {} func (x *Manifest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -530,11 +524,9 @@ type SpriteSheet struct { func (x *SpriteSheet) Reset() { *x = SpriteSheet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpriteSheet) String() string { @@ -545,7 +537,7 @@ func (*SpriteSheet) ProtoMessage() {} func (x *SpriteSheet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,11 +624,9 @@ type PreprocessingConfig struct { func (x *PreprocessingConfig) Reset() { *x = PreprocessingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig) String() string { @@ -647,7 +637,7 @@ func (*PreprocessingConfig) ProtoMessage() {} func (x *PreprocessingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +689,9 @@ type VideoStream struct { func (x *VideoStream) Reset() { *x = VideoStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream) String() string { @@ -714,7 +702,7 @@ func (*VideoStream) ProtoMessage() {} func (x *VideoStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -796,11 +784,9 @@ type AudioStream struct { func (x *AudioStream) Reset() { *x = AudioStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioStream) String() string { @@ -811,7 +797,7 @@ func (*AudioStream) ProtoMessage() {} func (x *AudioStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +878,9 @@ type TextStream struct { func (x *TextStream) Reset() { *x = TextStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextStream) String() string { @@ -907,7 +891,7 @@ func (*TextStream) ProtoMessage() {} func (x *TextStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,11 +933,9 @@ type SegmentSettings struct { func (x *SegmentSettings) Reset() { *x = SegmentSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SegmentSettings) String() string { @@ -964,7 +946,7 @@ func (*SegmentSettings) ProtoMessage() {} func (x *SegmentSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1009,11 +991,9 @@ type TimecodeConfig struct { func (x *TimecodeConfig) Reset() { *x = TimecodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimecodeConfig) String() string { @@ -1024,7 +1004,7 @@ func (*TimecodeConfig) ProtoMessage() {} func (x *TimecodeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,11 +1087,9 @@ type PreprocessingConfig_Audio struct { func (x *PreprocessingConfig_Audio) Reset() { *x = PreprocessingConfig_Audio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Audio) String() string { @@ -1122,7 +1100,7 @@ func (*PreprocessingConfig_Audio) ProtoMessage() {} func (x *PreprocessingConfig_Audio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1163,11 +1141,9 @@ type PreprocessingConfig_Crop struct { func (x *PreprocessingConfig_Crop) Reset() { *x = PreprocessingConfig_Crop{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Crop) String() string { @@ -1178,7 +1154,7 @@ func (*PreprocessingConfig_Crop) ProtoMessage() {} func (x *PreprocessingConfig_Crop) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1240,11 +1216,9 @@ type PreprocessingConfig_Pad struct { func (x *PreprocessingConfig_Pad) Reset() { *x = PreprocessingConfig_Pad{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Pad) String() string { @@ -1255,7 +1229,7 @@ func (*PreprocessingConfig_Pad) ProtoMessage() {} func (x *PreprocessingConfig_Pad) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1360,9 @@ type VideoStream_H264CodecSettings struct { func (x *VideoStream_H264CodecSettings) Reset() { *x = VideoStream_H264CodecSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream_H264CodecSettings) String() string { @@ -1401,7 +1373,7 @@ func (*VideoStream_H264CodecSettings) ProtoMessage() {} func (x *VideoStream_H264CodecSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1587,11 +1559,9 @@ type AudioStream_AudioMapping struct { func (x *AudioStream_AudioMapping) Reset() { *x = AudioStream_AudioMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioStream_AudioMapping) String() string { @@ -1602,7 +1572,7 @@ func (*AudioStream_AudioMapping) ProtoMessage() {} func (x *AudioStream_AudioMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1972,188 +1942,6 @@ func file_google_cloud_video_livestream_v1_outputs_proto_init() { if File_google_cloud_video_livestream_v1_outputs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ElementaryStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*MuxStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Manifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SpriteSheet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AudioStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TextStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SegmentSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*TimecodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Audio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Crop); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Pad); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream_H264CodecSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AudioStream_AudioMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_video_livestream_v1_outputs_proto_msgTypes[0].OneofWrappers = []any{ (*ElementaryStream_VideoStream)(nil), (*ElementaryStream_AudioStream)(nil), diff --git a/video/livestream/apiv1/livestreampb/resources.pb.go b/video/livestream/apiv1/livestreampb/resources.pb.go index bbcdd5a208ae..e952b79c72e7 100755 --- a/video/livestream/apiv1/livestreampb/resources.pb.go +++ b/video/livestream/apiv1/livestreampb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/livestream/v1/resources.proto @@ -595,11 +595,9 @@ type Input struct { func (x *Input) Reset() { *x = Input{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Input) String() string { @@ -610,7 +608,7 @@ func (*Input) ProtoMessage() {} func (x *Input) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,11 +761,9 @@ type Channel struct { func (x *Channel) Reset() { *x = Channel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Channel) String() string { @@ -778,7 +774,7 @@ func (*Channel) ProtoMessage() {} func (x *Channel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +936,9 @@ type NormalizedCoordinate struct { func (x *NormalizedCoordinate) Reset() { *x = NormalizedCoordinate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedCoordinate) String() string { @@ -955,7 +949,7 @@ func (*NormalizedCoordinate) ProtoMessage() {} func (x *NormalizedCoordinate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -998,11 +992,9 @@ type NormalizedResolution struct { func (x *NormalizedResolution) Reset() { *x = NormalizedResolution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedResolution) String() string { @@ -1013,7 +1005,7 @@ func (*NormalizedResolution) ProtoMessage() {} func (x *NormalizedResolution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1063,9 @@ type StaticOverlay struct { func (x *StaticOverlay) Reset() { *x = StaticOverlay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticOverlay) String() string { @@ -1086,7 +1076,7 @@ func (*StaticOverlay) ProtoMessage() {} func (x *StaticOverlay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1141,11 +1131,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -1156,7 +1144,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1181,9 @@ type LogConfig struct { func (x *LogConfig) Reset() { *x = LogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogConfig) String() string { @@ -1208,7 +1194,7 @@ func (*LogConfig) ProtoMessage() {} func (x *LogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1244,9 @@ type RetentionConfig struct { func (x *RetentionConfig) Reset() { *x = RetentionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetentionConfig) String() string { @@ -1273,7 +1257,7 @@ func (*RetentionConfig) ProtoMessage() {} func (x *RetentionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1312,11 +1296,9 @@ type InputStreamProperty struct { func (x *InputStreamProperty) Reset() { *x = InputStreamProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputStreamProperty) String() string { @@ -1327,7 +1309,7 @@ func (*InputStreamProperty) ProtoMessage() {} func (x *InputStreamProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,11 +1359,9 @@ type VideoStreamProperty struct { func (x *VideoStreamProperty) Reset() { *x = VideoStreamProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStreamProperty) String() string { @@ -1392,7 +1372,7 @@ func (*VideoStreamProperty) ProtoMessage() {} func (x *VideoStreamProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1439,11 +1419,9 @@ type VideoFormat struct { func (x *VideoFormat) Reset() { *x = VideoFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoFormat) String() string { @@ -1454,7 +1432,7 @@ func (*VideoFormat) ProtoMessage() {} func (x *VideoFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1511,11 +1489,9 @@ type AudioStreamProperty struct { func (x *AudioStreamProperty) Reset() { *x = AudioStreamProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioStreamProperty) String() string { @@ -1526,7 +1502,7 @@ func (*AudioStreamProperty) ProtoMessage() {} func (x *AudioStreamProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1547,9 @@ type AudioFormat struct { func (x *AudioFormat) Reset() { *x = AudioFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioFormat) String() string { @@ -1586,7 +1560,7 @@ func (*AudioFormat) ProtoMessage() {} func (x *AudioFormat) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1641,11 +1615,9 @@ type InputAttachment struct { func (x *InputAttachment) Reset() { *x = InputAttachment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAttachment) String() string { @@ -1656,7 +1628,7 @@ func (*InputAttachment) ProtoMessage() {} func (x *InputAttachment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1714,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -1757,7 +1727,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1970,11 +1940,9 @@ type Clip struct { func (x *Clip) Reset() { *x = Clip{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Clip) String() string { @@ -1985,7 +1953,7 @@ func (*Clip) ProtoMessage() {} func (x *Clip) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2114,11 +2082,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -2129,7 +2095,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2263,11 +2229,9 @@ type Encryption struct { func (x *Encryption) Reset() { *x = Encryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption) String() string { @@ -2278,7 +2242,7 @@ func (*Encryption) ProtoMessage() {} func (x *Encryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2409,11 +2373,9 @@ type Pool struct { func (x *Pool) Reset() { *x = Pool{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pool) String() string { @@ -2424,7 +2386,7 @@ func (*Pool) ProtoMessage() {} func (x *Pool) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2490,11 +2452,9 @@ type Input_SecurityRule struct { func (x *Input_SecurityRule) Reset() { *x = Input_SecurityRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Input_SecurityRule) String() string { @@ -2505,7 +2465,7 @@ func (*Input_SecurityRule) ProtoMessage() {} func (x *Input_SecurityRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2539,11 +2499,9 @@ type Channel_Output struct { func (x *Channel_Output) Reset() { *x = Channel_Output{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Channel_Output) String() string { @@ -2554,7 +2512,7 @@ func (*Channel_Output) ProtoMessage() {} func (x *Channel_Output) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2591,11 +2549,9 @@ type InputAttachment_AutomaticFailover struct { func (x *InputAttachment_AutomaticFailover) Reset() { *x = InputAttachment_AutomaticFailover{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputAttachment_AutomaticFailover) String() string { @@ -2606,7 +2562,7 @@ func (*InputAttachment_AutomaticFailover) ProtoMessage() {} func (x *InputAttachment_AutomaticFailover) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2642,11 +2598,9 @@ type Event_InputSwitchTask struct { func (x *Event_InputSwitchTask) Reset() { *x = Event_InputSwitchTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_InputSwitchTask) String() string { @@ -2657,7 +2611,7 @@ func (*Event_InputSwitchTask) ProtoMessage() {} func (x *Event_InputSwitchTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2691,11 +2645,9 @@ type Event_AdBreakTask struct { func (x *Event_AdBreakTask) Reset() { *x = Event_AdBreakTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_AdBreakTask) String() string { @@ -2706,7 +2658,7 @@ func (*Event_AdBreakTask) ProtoMessage() {} func (x *Event_AdBreakTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2746,11 +2698,9 @@ type Event_SlateTask struct { func (x *Event_SlateTask) Reset() { *x = Event_SlateTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_SlateTask) String() string { @@ -2761,7 +2711,7 @@ func (*Event_SlateTask) ProtoMessage() {} func (x *Event_SlateTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2800,11 +2750,9 @@ type Event_ReturnToProgramTask struct { func (x *Event_ReturnToProgramTask) Reset() { *x = Event_ReturnToProgramTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_ReturnToProgramTask) String() string { @@ -2815,7 +2763,7 @@ func (*Event_ReturnToProgramTask) ProtoMessage() {} func (x *Event_ReturnToProgramTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2843,11 +2791,9 @@ type Event_MuteTask struct { func (x *Event_MuteTask) Reset() { *x = Event_MuteTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_MuteTask) String() string { @@ -2858,7 +2804,7 @@ func (*Event_MuteTask) ProtoMessage() {} func (x *Event_MuteTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2889,11 +2835,9 @@ type Event_UnmuteTask struct { func (x *Event_UnmuteTask) Reset() { *x = Event_UnmuteTask{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event_UnmuteTask) String() string { @@ -2904,7 +2848,7 @@ func (*Event_UnmuteTask) ProtoMessage() {} func (x *Event_UnmuteTask) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2934,11 +2878,9 @@ type Clip_TimeSlice struct { func (x *Clip_TimeSlice) Reset() { *x = Clip_TimeSlice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Clip_TimeSlice) String() string { @@ -2949,7 +2891,7 @@ func (*Clip_TimeSlice) ProtoMessage() {} func (x *Clip_TimeSlice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2994,11 +2936,9 @@ type Clip_Slice struct { func (x *Clip_Slice) Reset() { *x = Clip_Slice{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Clip_Slice) String() string { @@ -3009,7 +2949,7 @@ func (*Clip_Slice) ProtoMessage() {} func (x *Clip_Slice) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3070,11 +3010,9 @@ type Clip_ClipManifest struct { func (x *Clip_ClipManifest) Reset() { *x = Clip_ClipManifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Clip_ClipManifest) String() string { @@ -3085,7 +3023,7 @@ func (*Clip_ClipManifest) ProtoMessage() {} func (x *Clip_ClipManifest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3128,11 +3066,9 @@ type Asset_VideoAsset struct { func (x *Asset_VideoAsset) Reset() { *x = Asset_VideoAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_VideoAsset) String() string { @@ -3143,7 +3079,7 @@ func (*Asset_VideoAsset) ProtoMessage() {} func (x *Asset_VideoAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3177,11 +3113,9 @@ type Asset_ImageAsset struct { func (x *Asset_ImageAsset) Reset() { *x = Asset_ImageAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset_ImageAsset) String() string { @@ -3192,7 +3126,7 @@ func (*Asset_ImageAsset) ProtoMessage() {} func (x *Asset_ImageAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3227,11 +3161,9 @@ type Encryption_SecretManagerSource struct { func (x *Encryption_SecretManagerSource) Reset() { *x = Encryption_SecretManagerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_SecretManagerSource) String() string { @@ -3242,7 +3174,7 @@ func (*Encryption_SecretManagerSource) ProtoMessage() {} func (x *Encryption_SecretManagerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3273,11 +3205,9 @@ type Encryption_Widevine struct { func (x *Encryption_Widevine) Reset() { *x = Encryption_Widevine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Widevine) String() string { @@ -3288,7 +3218,7 @@ func (*Encryption_Widevine) ProtoMessage() {} func (x *Encryption_Widevine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3312,11 +3242,9 @@ type Encryption_Fairplay struct { func (x *Encryption_Fairplay) Reset() { *x = Encryption_Fairplay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Fairplay) String() string { @@ -3327,7 +3255,7 @@ func (*Encryption_Fairplay) ProtoMessage() {} func (x *Encryption_Fairplay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3351,11 +3279,9 @@ type Encryption_Playready struct { func (x *Encryption_Playready) Reset() { *x = Encryption_Playready{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Playready) String() string { @@ -3366,7 +3292,7 @@ func (*Encryption_Playready) ProtoMessage() {} func (x *Encryption_Playready) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3390,11 +3316,9 @@ type Encryption_Clearkey struct { func (x *Encryption_Clearkey) Reset() { *x = Encryption_Clearkey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Clearkey) String() string { @@ -3405,7 +3329,7 @@ func (*Encryption_Clearkey) ProtoMessage() {} func (x *Encryption_Clearkey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3439,11 +3363,9 @@ type Encryption_DrmSystems struct { func (x *Encryption_DrmSystems) Reset() { *x = Encryption_DrmSystems{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_DrmSystems) String() string { @@ -3454,7 +3376,7 @@ func (*Encryption_DrmSystems) ProtoMessage() {} func (x *Encryption_DrmSystems) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3506,11 +3428,9 @@ type Encryption_Aes128Encryption struct { func (x *Encryption_Aes128Encryption) Reset() { *x = Encryption_Aes128Encryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Aes128Encryption) String() string { @@ -3521,7 +3441,7 @@ func (*Encryption_Aes128Encryption) ProtoMessage() {} func (x *Encryption_Aes128Encryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3545,11 +3465,9 @@ type Encryption_SampleAesEncryption struct { func (x *Encryption_SampleAesEncryption) Reset() { *x = Encryption_SampleAesEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_SampleAesEncryption) String() string { @@ -3560,7 +3478,7 @@ func (*Encryption_SampleAesEncryption) ProtoMessage() {} func (x *Encryption_SampleAesEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3589,11 +3507,9 @@ type Encryption_MpegCommonEncryption struct { func (x *Encryption_MpegCommonEncryption) Reset() { *x = Encryption_MpegCommonEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_MpegCommonEncryption) String() string { @@ -3604,7 +3520,7 @@ func (*Encryption_MpegCommonEncryption) ProtoMessage() {} func (x *Encryption_MpegCommonEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3644,11 +3560,9 @@ type Pool_NetworkConfig struct { func (x *Pool_NetworkConfig) Reset() { *x = Pool_NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pool_NetworkConfig) String() string { @@ -3659,7 +3573,7 @@ func (*Pool_NetworkConfig) ProtoMessage() {} func (x *Pool_NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4541,524 +4455,6 @@ func file_google_cloud_video_livestream_v1_resources_proto_init() { return } file_google_cloud_video_livestream_v1_outputs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Input); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Channel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedCoordinate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedResolution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StaticOverlay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*LogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RetentionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*InputStreamProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VideoStreamProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*VideoFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*AudioStreamProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*AudioFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*InputAttachment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Clip); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Encryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Pool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*Input_SecurityRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Channel_Output); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*InputAttachment_AutomaticFailover); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Event_InputSwitchTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Event_AdBreakTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Event_SlateTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Event_ReturnToProgramTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*Event_MuteTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*Event_UnmuteTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Clip_TimeSlice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Clip_Slice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Clip_ClipManifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Asset_VideoAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*Asset_ImageAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_SecretManagerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Widevine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Fairplay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Playready); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Clearkey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_DrmSystems); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Aes128Encryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_SampleAesEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_MpegCommonEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Pool_NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_video_livestream_v1_resources_proto_msgTypes[14].OneofWrappers = []any{ (*Event_InputSwitch)(nil), (*Event_AdBreak)(nil), diff --git a/video/livestream/apiv1/livestreampb/service.pb.go b/video/livestream/apiv1/livestreampb/service.pb.go index 7245d51a996e..cd269f90aec7 100755 --- a/video/livestream/apiv1/livestreampb/service.pb.go +++ b/video/livestream/apiv1/livestreampb/service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/livestream/v1/service.proto @@ -77,11 +77,9 @@ type CreateAssetRequest struct { func (x *CreateAssetRequest) Reset() { *x = CreateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssetRequest) String() string { @@ -92,7 +90,7 @@ func (*CreateAssetRequest) ProtoMessage() {} func (x *CreateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -162,11 +160,9 @@ type DeleteAssetRequest struct { func (x *DeleteAssetRequest) Reset() { *x = DeleteAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssetRequest) String() string { @@ -177,7 +173,7 @@ func (*DeleteAssetRequest) ProtoMessage() {} func (x *DeleteAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,11 +224,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -243,7 +237,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +303,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -324,7 +316,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -373,11 +365,9 @@ type GetAssetRequest struct { func (x *GetAssetRequest) Reset() { *x = GetAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssetRequest) String() string { @@ -388,7 +378,7 @@ func (*GetAssetRequest) ProtoMessage() {} func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +433,9 @@ type CreateChannelRequest struct { func (x *CreateChannelRequest) Reset() { *x = CreateChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateChannelRequest) String() string { @@ -458,7 +446,7 @@ func (*CreateChannelRequest) ProtoMessage() {} func (x *CreateChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -527,11 +515,9 @@ type ListChannelsRequest struct { func (x *ListChannelsRequest) Reset() { *x = ListChannelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelsRequest) String() string { @@ -542,7 +528,7 @@ func (*ListChannelsRequest) ProtoMessage() {} func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -609,11 +595,9 @@ type ListChannelsResponse struct { func (x *ListChannelsResponse) Reset() { *x = ListChannelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListChannelsResponse) String() string { @@ -624,7 +608,7 @@ func (*ListChannelsResponse) ProtoMessage() {} func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -673,11 +657,9 @@ type GetChannelRequest struct { func (x *GetChannelRequest) Reset() { *x = GetChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetChannelRequest) String() string { @@ -688,7 +670,7 @@ func (*GetChannelRequest) ProtoMessage() {} func (x *GetChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,11 +724,9 @@ type DeleteChannelRequest struct { func (x *DeleteChannelRequest) Reset() { *x = DeleteChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteChannelRequest) String() string { @@ -757,7 +737,7 @@ func (*DeleteChannelRequest) ProtoMessage() {} func (x *DeleteChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,11 +820,9 @@ type UpdateChannelRequest struct { func (x *UpdateChannelRequest) Reset() { *x = UpdateChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateChannelRequest) String() string { @@ -855,7 +833,7 @@ func (*UpdateChannelRequest) ProtoMessage() {} func (x *UpdateChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -918,11 +896,9 @@ type StartChannelRequest struct { func (x *StartChannelRequest) Reset() { *x = StartChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartChannelRequest) String() string { @@ -933,7 +909,7 @@ func (*StartChannelRequest) ProtoMessage() {} func (x *StartChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,11 +965,9 @@ type StopChannelRequest struct { func (x *StopChannelRequest) Reset() { *x = StopChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopChannelRequest) String() string { @@ -1004,7 +978,7 @@ func (*StopChannelRequest) ProtoMessage() {} func (x *StopChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1066,11 +1040,9 @@ type CreateInputRequest struct { func (x *CreateInputRequest) Reset() { *x = CreateInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateInputRequest) String() string { @@ -1081,7 +1053,7 @@ func (*CreateInputRequest) ProtoMessage() {} func (x *CreateInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1122,9 @@ type ListInputsRequest struct { func (x *ListInputsRequest) Reset() { *x = ListInputsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInputsRequest) String() string { @@ -1165,7 +1135,7 @@ func (*ListInputsRequest) ProtoMessage() {} func (x *ListInputsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1202,9 @@ type ListInputsResponse struct { func (x *ListInputsResponse) Reset() { *x = ListInputsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInputsResponse) String() string { @@ -1247,7 +1215,7 @@ func (*ListInputsResponse) ProtoMessage() {} func (x *ListInputsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,11 +1264,9 @@ type GetInputRequest struct { func (x *GetInputRequest) Reset() { *x = GetInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInputRequest) String() string { @@ -1311,7 +1277,7 @@ func (*GetInputRequest) ProtoMessage() {} func (x *GetInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1360,11 +1326,9 @@ type DeleteInputRequest struct { func (x *DeleteInputRequest) Reset() { *x = DeleteInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteInputRequest) String() string { @@ -1375,7 +1339,7 @@ func (*DeleteInputRequest) ProtoMessage() {} func (x *DeleteInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1407,9 @@ type UpdateInputRequest struct { func (x *UpdateInputRequest) Reset() { *x = UpdateInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateInputRequest) String() string { @@ -1458,7 +1420,7 @@ func (*UpdateInputRequest) ProtoMessage() {} func (x *UpdateInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1527,11 +1489,9 @@ type CreateEventRequest struct { func (x *CreateEventRequest) Reset() { *x = CreateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventRequest) String() string { @@ -1542,7 +1502,7 @@ func (*CreateEventRequest) ProtoMessage() {} func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1611,11 +1571,9 @@ type ListEventsRequest struct { func (x *ListEventsRequest) Reset() { *x = ListEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsRequest) String() string { @@ -1626,7 +1584,7 @@ func (*ListEventsRequest) ProtoMessage() {} func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1693,11 +1651,9 @@ type ListEventsResponse struct { func (x *ListEventsResponse) Reset() { *x = ListEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsResponse) String() string { @@ -1708,7 +1664,7 @@ func (*ListEventsResponse) ProtoMessage() {} func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1757,11 +1713,9 @@ type GetEventRequest struct { func (x *GetEventRequest) Reset() { *x = GetEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventRequest) String() string { @@ -1772,7 +1726,7 @@ func (*GetEventRequest) ProtoMessage() {} func (x *GetEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1775,9 @@ type DeleteEventRequest struct { func (x *DeleteEventRequest) Reset() { *x = DeleteEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventRequest) String() string { @@ -1836,7 +1788,7 @@ func (*DeleteEventRequest) ProtoMessage() {} func (x *DeleteEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1874,11 +1826,9 @@ type ChannelOperationResponse struct { func (x *ChannelOperationResponse) Reset() { *x = ChannelOperationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChannelOperationResponse) String() string { @@ -1889,7 +1839,7 @@ func (*ChannelOperationResponse) ProtoMessage() {} func (x *ChannelOperationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1925,11 +1875,9 @@ type ListClipsRequest struct { func (x *ListClipsRequest) Reset() { *x = ListClipsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClipsRequest) String() string { @@ -1940,7 +1888,7 @@ func (*ListClipsRequest) ProtoMessage() {} func (x *ListClipsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2006,11 +1954,9 @@ type ListClipsResponse struct { func (x *ListClipsResponse) Reset() { *x = ListClipsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClipsResponse) String() string { @@ -2021,7 +1967,7 @@ func (*ListClipsResponse) ProtoMessage() {} func (x *ListClipsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2070,11 +2016,9 @@ type GetClipRequest struct { func (x *GetClipRequest) Reset() { *x = GetClipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClipRequest) String() string { @@ -2085,7 +2029,7 @@ func (*GetClipRequest) ProtoMessage() {} func (x *GetClipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2141,11 +2085,9 @@ type CreateClipRequest struct { func (x *CreateClipRequest) Reset() { *x = CreateClipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClipRequest) String() string { @@ -2156,7 +2098,7 @@ func (*CreateClipRequest) ProtoMessage() {} func (x *CreateClipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2226,11 +2168,9 @@ type DeleteClipRequest struct { func (x *DeleteClipRequest) Reset() { *x = DeleteClipRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClipRequest) String() string { @@ -2241,7 +2181,7 @@ func (*DeleteClipRequest) ProtoMessage() {} func (x *DeleteClipRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2296,11 +2236,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2311,7 +2249,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2381,11 +2319,9 @@ type GetPoolRequest struct { func (x *GetPoolRequest) Reset() { *x = GetPoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPoolRequest) String() string { @@ -2396,7 +2332,7 @@ func (*GetPoolRequest) ProtoMessage() {} func (x *GetPoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2452,11 +2388,9 @@ type UpdatePoolRequest struct { func (x *UpdatePoolRequest) Reset() { *x = UpdatePoolRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePoolRequest) String() string { @@ -2467,7 +2401,7 @@ func (*UpdatePoolRequest) ProtoMessage() {} func (x *UpdatePoolRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_livestream_v1_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3348,404 +3282,6 @@ func file_google_cloud_video_livestream_v1_service_proto_init() { return } file_google_cloud_video_livestream_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_livestream_v1_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListChannelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DeleteChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*StartChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*StopChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListInputsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListInputsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UpdateInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GetEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ChannelOperationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListClipsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListClipsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetClipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateClipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClipRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*GetPoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_livestream_v1_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePoolRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/helpers.go b/video/stitcher/apiv1/helpers.go index 9c99939b7d71..4c7b78bb9393 100755 --- a/video/stitcher/apiv1/helpers.go +++ b/video/stitcher/apiv1/helpers.go @@ -18,10 +18,16 @@ package stitcher import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "videostitcher.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/video/stitcher/apiv1/stitcherpb/ad_tag_details.pb.go b/video/stitcher/apiv1/stitcherpb/ad_tag_details.pb.go index d357da06f007..975194fd54e3 100755 --- a/video/stitcher/apiv1/stitcherpb/ad_tag_details.pb.go +++ b/video/stitcher/apiv1/stitcherpb/ad_tag_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/ad_tag_details.proto @@ -55,11 +55,9 @@ type LiveAdTagDetail struct { func (x *LiveAdTagDetail) Reset() { *x = LiveAdTagDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LiveAdTagDetail) String() string { @@ -70,7 +68,7 @@ func (*LiveAdTagDetail) ProtoMessage() {} func (x *LiveAdTagDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -116,11 +114,9 @@ type VodAdTagDetail struct { func (x *VodAdTagDetail) Reset() { *x = VodAdTagDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodAdTagDetail) String() string { @@ -131,7 +127,7 @@ func (*VodAdTagDetail) ProtoMessage() {} func (x *VodAdTagDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +172,9 @@ type AdRequest struct { func (x *AdRequest) Reset() { *x = AdRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdRequest) String() string { @@ -191,7 +185,7 @@ func (*AdRequest) ProtoMessage() {} func (x *AdRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -239,11 +233,9 @@ type RequestMetadata struct { func (x *RequestMetadata) Reset() { *x = RequestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestMetadata) String() string { @@ -254,7 +246,7 @@ func (*RequestMetadata) ProtoMessage() {} func (x *RequestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,11 +290,9 @@ type ResponseMetadata struct { func (x *ResponseMetadata) Reset() { *x = ResponseMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResponseMetadata) String() string { @@ -313,7 +303,7 @@ func (*ResponseMetadata) ProtoMessage() {} func (x *ResponseMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,68 +493,6 @@ func file_google_cloud_video_stitcher_v1_ad_tag_details_proto_init() { if File_google_cloud_video_stitcher_v1_ad_tag_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LiveAdTagDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VodAdTagDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AdRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RequestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_ad_tag_details_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResponseMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/cdn_keys.pb.go b/video/stitcher/apiv1/stitcherpb/cdn_keys.pb.go index 345ce3967bed..dab89b79102a 100755 --- a/video/stitcher/apiv1/stitcherpb/cdn_keys.pb.go +++ b/video/stitcher/apiv1/stitcherpb/cdn_keys.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/cdn_keys.proto @@ -62,11 +62,9 @@ type CdnKey struct { func (x *CdnKey) Reset() { *x = CdnKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CdnKey) String() string { @@ -77,7 +75,7 @@ func (*CdnKey) ProtoMessage() {} func (x *CdnKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type GoogleCdnKey struct { func (x *GoogleCdnKey) Reset() { *x = GoogleCdnKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoogleCdnKey) String() string { @@ -188,7 +184,7 @@ func (*GoogleCdnKey) ProtoMessage() {} func (x *GoogleCdnKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,11 +225,9 @@ type AkamaiCdnKey struct { func (x *AkamaiCdnKey) Reset() { *x = AkamaiCdnKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AkamaiCdnKey) String() string { @@ -244,7 +238,7 @@ func (*AkamaiCdnKey) ProtoMessage() {} func (x *AkamaiCdnKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type MediaCdnKey struct { func (x *MediaCdnKey) Reset() { *x = MediaCdnKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaCdnKey) String() string { @@ -298,7 +290,7 @@ func (*MediaCdnKey) ProtoMessage() {} func (x *MediaCdnKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -353,11 +345,9 @@ type MediaCdnKey_TokenConfig struct { func (x *MediaCdnKey_TokenConfig) Reset() { *x = MediaCdnKey_TokenConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaCdnKey_TokenConfig) String() string { @@ -368,7 +358,7 @@ func (*MediaCdnKey_TokenConfig) ProtoMessage() {} func (x *MediaCdnKey_TokenConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,68 +489,6 @@ func file_google_cloud_video_stitcher_v1_cdn_keys_proto_init() { if File_google_cloud_video_stitcher_v1_cdn_keys_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CdnKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GoogleCdnKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AkamaiCdnKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*MediaCdnKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*MediaCdnKey_TokenConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_video_stitcher_v1_cdn_keys_proto_msgTypes[0].OneofWrappers = []any{ (*CdnKey_GoogleCdnKey)(nil), (*CdnKey_AkamaiCdnKey)(nil), diff --git a/video/stitcher/apiv1/stitcherpb/companions.pb.go b/video/stitcher/apiv1/stitcherpb/companions.pb.go index e0e216ec0288..5595498bf700 100755 --- a/video/stitcher/apiv1/stitcherpb/companions.pb.go +++ b/video/stitcher/apiv1/stitcherpb/companions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/companions.proto @@ -106,11 +106,9 @@ type CompanionAds struct { func (x *CompanionAds) Reset() { *x = CompanionAds{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CompanionAds) String() string { @@ -121,7 +119,7 @@ func (*CompanionAds) ProtoMessage() {} func (x *CompanionAds) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,11 +186,9 @@ type Companion struct { func (x *Companion) Reset() { *x = Companion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Companion) String() string { @@ -203,7 +199,7 @@ func (*Companion) ProtoMessage() {} func (x *Companion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +342,9 @@ type HtmlAdResource struct { func (x *HtmlAdResource) Reset() { *x = HtmlAdResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HtmlAdResource) String() string { @@ -361,7 +355,7 @@ func (*HtmlAdResource) ProtoMessage() {} func (x *HtmlAdResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -395,11 +389,9 @@ type IframeAdResource struct { func (x *IframeAdResource) Reset() { *x = IframeAdResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IframeAdResource) String() string { @@ -410,7 +402,7 @@ func (*IframeAdResource) ProtoMessage() {} func (x *IframeAdResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +438,9 @@ type StaticAdResource struct { func (x *StaticAdResource) Reset() { *x = StaticAdResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StaticAdResource) String() string { @@ -461,7 +451,7 @@ func (*StaticAdResource) ProtoMessage() {} func (x *StaticAdResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -625,68 +615,6 @@ func file_google_cloud_video_stitcher_v1_companions_proto_init() { return } file_google_cloud_video_stitcher_v1_events_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CompanionAds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Companion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*HtmlAdResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*IframeAdResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StaticAdResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_video_stitcher_v1_companions_proto_msgTypes[1].OneofWrappers = []any{ (*Companion_IframeAdResource)(nil), (*Companion_StaticAdResource)(nil), diff --git a/video/stitcher/apiv1/stitcherpb/events.pb.go b/video/stitcher/apiv1/stitcherpb/events.pb.go index fced08081839..0e50e8c8e559 100755 --- a/video/stitcher/apiv1/stitcherpb/events.pb.go +++ b/video/stitcher/apiv1/stitcherpb/events.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/events.proto @@ -195,11 +195,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -210,7 +208,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -272,11 +270,9 @@ type ProgressEvent struct { func (x *ProgressEvent) Reset() { *x = ProgressEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProgressEvent) String() string { @@ -287,7 +283,7 @@ func (*ProgressEvent) ProtoMessage() {} func (x *ProgressEvent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_events_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,32 +412,6 @@ func file_google_cloud_video_stitcher_v1_events_proto_init() { if File_google_cloud_video_stitcher_v1_events_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_events_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_events_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProgressEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/fetch_options.pb.go b/video/stitcher/apiv1/stitcherpb/fetch_options.pb.go index abc477bfd124..073d7a86cf7a 100755 --- a/video/stitcher/apiv1/stitcherpb/fetch_options.pb.go +++ b/video/stitcher/apiv1/stitcherpb/fetch_options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/fetch_options.proto @@ -50,11 +50,9 @@ type FetchOptions struct { func (x *FetchOptions) Reset() { *x = FetchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_fetch_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_fetch_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchOptions) String() string { @@ -65,7 +63,7 @@ func (*FetchOptions) ProtoMessage() {} func (x *FetchOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_fetch_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,20 +145,6 @@ func file_google_cloud_video_stitcher_v1_fetch_options_proto_init() { if File_google_cloud_video_stitcher_v1_fetch_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_fetch_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FetchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/live_configs.pb.go b/video/stitcher/apiv1/stitcherpb/live_configs.pb.go index 784feb0fc106..8256b776c26a 100755 --- a/video/stitcher/apiv1/stitcherpb/live_configs.pb.go +++ b/video/stitcher/apiv1/stitcherpb/live_configs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/live_configs.proto @@ -240,11 +240,9 @@ type LiveConfig struct { func (x *LiveConfig) Reset() { *x = LiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LiveConfig) String() string { @@ -255,7 +253,7 @@ func (*LiveConfig) ProtoMessage() {} func (x *LiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +357,9 @@ type PrefetchConfig struct { func (x *PrefetchConfig) Reset() { *x = PrefetchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrefetchConfig) String() string { @@ -374,7 +370,7 @@ func (*PrefetchConfig) ProtoMessage() {} func (x *PrefetchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -419,11 +415,9 @@ type GamLiveConfig struct { func (x *GamLiveConfig) Reset() { *x = GamLiveConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GamLiveConfig) String() string { @@ -434,7 +428,7 @@ func (*GamLiveConfig) ProtoMessage() {} func (x *GamLiveConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,44 +620,6 @@ func file_google_cloud_video_stitcher_v1_live_configs_proto_init() { return } file_google_cloud_video_stitcher_v1_fetch_options_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PrefetchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_live_configs_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GamLiveConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/sessions.pb.go b/video/stitcher/apiv1/stitcherpb/sessions.pb.go index deef7660971d..f3b84666d1c4 100755 --- a/video/stitcher/apiv1/stitcherpb/sessions.pb.go +++ b/video/stitcher/apiv1/stitcherpb/sessions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/sessions.proto @@ -141,11 +141,9 @@ type VodSession struct { func (x *VodSession) Reset() { *x = VodSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodSession) String() string { @@ -156,7 +154,7 @@ func (*VodSession) ProtoMessage() {} func (x *VodSession) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,11 +260,9 @@ type Interstitials struct { func (x *Interstitials) Reset() { *x = Interstitials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Interstitials) String() string { @@ -277,7 +273,7 @@ func (*Interstitials) ProtoMessage() {} func (x *Interstitials) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +322,9 @@ type VodSessionAd struct { func (x *VodSessionAd) Reset() { *x = VodSessionAd{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodSessionAd) String() string { @@ -341,7 +335,7 @@ func (*VodSessionAd) ProtoMessage() {} func (x *VodSessionAd) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -390,11 +384,9 @@ type VodSessionContent struct { func (x *VodSessionContent) Reset() { *x = VodSessionContent{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodSessionContent) String() string { @@ -405,7 +397,7 @@ func (*VodSessionContent) ProtoMessage() {} func (x *VodSessionContent) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +437,9 @@ type VodSessionAdBreak struct { func (x *VodSessionAdBreak) Reset() { *x = VodSessionAdBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodSessionAdBreak) String() string { @@ -460,7 +450,7 @@ func (*VodSessionAdBreak) ProtoMessage() {} func (x *VodSessionAdBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,11 +534,9 @@ type LiveSession struct { func (x *LiveSession) Reset() { *x = LiveSession{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LiveSession) String() string { @@ -559,7 +547,7 @@ func (*LiveSession) ProtoMessage() {} func (x *LiveSession) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -639,11 +627,9 @@ type ManifestOptions struct { func (x *ManifestOptions) Reset() { *x = ManifestOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManifestOptions) String() string { @@ -654,7 +640,7 @@ func (*ManifestOptions) ProtoMessage() {} func (x *ManifestOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +685,9 @@ type RenditionFilter struct { func (x *RenditionFilter) Reset() { *x = RenditionFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenditionFilter) String() string { @@ -714,7 +698,7 @@ func (*RenditionFilter) ProtoMessage() {} func (x *RenditionFilter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +742,9 @@ type VodSession_GamSettings struct { func (x *VodSession_GamSettings) Reset() { *x = VodSession_GamSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodSession_GamSettings) String() string { @@ -773,7 +755,7 @@ func (*VodSession_GamSettings) ProtoMessage() {} func (x *VodSession_GamSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +802,9 @@ type LiveSession_GamSettings struct { func (x *LiveSession_GamSettings) Reset() { *x = LiveSession_GamSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LiveSession_GamSettings) String() string { @@ -835,7 +815,7 @@ func (*LiveSession_GamSettings) ProtoMessage() {} func (x *LiveSession_GamSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1164,128 +1144,6 @@ func file_google_cloud_video_stitcher_v1_sessions_proto_init() { file_google_cloud_video_stitcher_v1_companions_proto_init() file_google_cloud_video_stitcher_v1_events_proto_init() file_google_cloud_video_stitcher_v1_live_configs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VodSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Interstitials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VodSessionAd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VodSessionContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VodSessionAdBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*LiveSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ManifestOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RenditionFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*VodSession_GamSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_sessions_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LiveSession_GamSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/slates.pb.go b/video/stitcher/apiv1/stitcherpb/slates.pb.go index bd9b1144d735..e462a0ebc97d 100755 --- a/video/stitcher/apiv1/stitcherpb/slates.pb.go +++ b/video/stitcher/apiv1/stitcherpb/slates.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/slates.proto @@ -54,11 +54,9 @@ type Slate struct { func (x *Slate) Reset() { *x = Slate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Slate) String() string { @@ -69,7 +67,7 @@ func (*Slate) ProtoMessage() {} func (x *Slate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,11 +118,9 @@ type Slate_GamSlate struct { func (x *Slate_GamSlate) Reset() { *x = Slate_GamSlate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Slate_GamSlate) String() string { @@ -135,7 +131,7 @@ func (*Slate_GamSlate) ProtoMessage() {} func (x *Slate_GamSlate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,32 +233,6 @@ func file_google_cloud_video_stitcher_v1_slates_proto_init() { if File_google_cloud_video_stitcher_v1_slates_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Slate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_slates_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Slate_GamSlate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/stitch_details.pb.go b/video/stitcher/apiv1/stitcherpb/stitch_details.pb.go index 6d51021684b4..35137d5d9e6d 100755 --- a/video/stitcher/apiv1/stitcherpb/stitch_details.pb.go +++ b/video/stitcher/apiv1/stitcherpb/stitch_details.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/stitch_details.proto @@ -55,11 +55,9 @@ type VodStitchDetail struct { func (x *VodStitchDetail) Reset() { *x = VodStitchDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodStitchDetail) String() string { @@ -70,7 +68,7 @@ func (*VodStitchDetail) ProtoMessage() {} func (x *VodStitchDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +117,9 @@ type AdStitchDetail struct { func (x *AdStitchDetail) Reset() { *x = AdStitchDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdStitchDetail) String() string { @@ -134,7 +130,7 @@ func (*AdStitchDetail) ProtoMessage() {} func (x *AdStitchDetail) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,32 +284,6 @@ func file_google_cloud_video_stitcher_v1_stitch_details_proto_init() { if File_google_cloud_video_stitcher_v1_stitch_details_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VodStitchDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_stitch_details_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AdStitchDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/video_stitcher_service.pb.go b/video/stitcher/apiv1/stitcherpb/video_stitcher_service.pb.go index 90768c76b2dd..4a075b52850e 100755 --- a/video/stitcher/apiv1/stitcherpb/video_stitcher_service.pb.go +++ b/video/stitcher/apiv1/stitcherpb/video_stitcher_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/video_stitcher_service.proto @@ -66,11 +66,9 @@ type CreateCdnKeyRequest struct { func (x *CreateCdnKeyRequest) Reset() { *x = CreateCdnKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCdnKeyRequest) String() string { @@ -81,7 +79,7 @@ func (*CreateCdnKeyRequest) ProtoMessage() {} func (x *CreateCdnKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,11 +137,9 @@ type ListCdnKeysRequest struct { func (x *ListCdnKeysRequest) Reset() { *x = ListCdnKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCdnKeysRequest) String() string { @@ -154,7 +150,7 @@ func (*ListCdnKeysRequest) ProtoMessage() {} func (x *ListCdnKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -220,11 +216,9 @@ type ListCdnKeysResponse struct { func (x *ListCdnKeysResponse) Reset() { *x = ListCdnKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCdnKeysResponse) String() string { @@ -235,7 +229,7 @@ func (*ListCdnKeysResponse) ProtoMessage() {} func (x *ListCdnKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,11 +278,9 @@ type GetCdnKeyRequest struct { func (x *GetCdnKeyRequest) Reset() { *x = GetCdnKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCdnKeyRequest) String() string { @@ -299,7 +291,7 @@ func (*GetCdnKeyRequest) ProtoMessage() {} func (x *GetCdnKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,11 +326,9 @@ type DeleteCdnKeyRequest struct { func (x *DeleteCdnKeyRequest) Reset() { *x = DeleteCdnKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCdnKeyRequest) String() string { @@ -349,7 +339,7 @@ func (*DeleteCdnKeyRequest) ProtoMessage() {} func (x *DeleteCdnKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +377,9 @@ type UpdateCdnKeyRequest struct { func (x *UpdateCdnKeyRequest) Reset() { *x = UpdateCdnKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCdnKeyRequest) String() string { @@ -402,7 +390,7 @@ func (*UpdateCdnKeyRequest) ProtoMessage() {} func (x *UpdateCdnKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +434,9 @@ type CreateVodSessionRequest struct { func (x *CreateVodSessionRequest) Reset() { *x = CreateVodSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVodSessionRequest) String() string { @@ -461,7 +447,7 @@ func (*CreateVodSessionRequest) ProtoMessage() {} func (x *CreateVodSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -503,11 +489,9 @@ type GetVodSessionRequest struct { func (x *GetVodSessionRequest) Reset() { *x = GetVodSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVodSessionRequest) String() string { @@ -518,7 +502,7 @@ func (*GetVodSessionRequest) ProtoMessage() {} func (x *GetVodSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +541,9 @@ type ListVodStitchDetailsRequest struct { func (x *ListVodStitchDetailsRequest) Reset() { *x = ListVodStitchDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodStitchDetailsRequest) String() string { @@ -572,7 +554,7 @@ func (*ListVodStitchDetailsRequest) ProtoMessage() {} func (x *ListVodStitchDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,11 +604,9 @@ type ListVodStitchDetailsResponse struct { func (x *ListVodStitchDetailsResponse) Reset() { *x = ListVodStitchDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodStitchDetailsResponse) String() string { @@ -637,7 +617,7 @@ func (*ListVodStitchDetailsResponse) ProtoMessage() {} func (x *ListVodStitchDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +660,9 @@ type GetVodStitchDetailRequest struct { func (x *GetVodStitchDetailRequest) Reset() { *x = GetVodStitchDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVodStitchDetailRequest) String() string { @@ -695,7 +673,7 @@ func (*GetVodStitchDetailRequest) ProtoMessage() {} func (x *GetVodStitchDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +712,9 @@ type ListVodAdTagDetailsRequest struct { func (x *ListVodAdTagDetailsRequest) Reset() { *x = ListVodAdTagDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodAdTagDetailsRequest) String() string { @@ -749,7 +725,7 @@ func (*ListVodAdTagDetailsRequest) ProtoMessage() {} func (x *ListVodAdTagDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +775,9 @@ type ListVodAdTagDetailsResponse struct { func (x *ListVodAdTagDetailsResponse) Reset() { *x = ListVodAdTagDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodAdTagDetailsResponse) String() string { @@ -814,7 +788,7 @@ func (*ListVodAdTagDetailsResponse) ProtoMessage() {} func (x *ListVodAdTagDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -857,11 +831,9 @@ type GetVodAdTagDetailRequest struct { func (x *GetVodAdTagDetailRequest) Reset() { *x = GetVodAdTagDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVodAdTagDetailRequest) String() string { @@ -872,7 +844,7 @@ func (*GetVodAdTagDetailRequest) ProtoMessage() {} func (x *GetVodAdTagDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -911,11 +883,9 @@ type ListLiveAdTagDetailsRequest struct { func (x *ListLiveAdTagDetailsRequest) Reset() { *x = ListLiveAdTagDetailsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLiveAdTagDetailsRequest) String() string { @@ -926,7 +896,7 @@ func (*ListLiveAdTagDetailsRequest) ProtoMessage() {} func (x *ListLiveAdTagDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,11 +946,9 @@ type ListLiveAdTagDetailsResponse struct { func (x *ListLiveAdTagDetailsResponse) Reset() { *x = ListLiveAdTagDetailsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLiveAdTagDetailsResponse) String() string { @@ -991,7 +959,7 @@ func (*ListLiveAdTagDetailsResponse) ProtoMessage() {} func (x *ListLiveAdTagDetailsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1001,9 @@ type GetLiveAdTagDetailRequest struct { func (x *GetLiveAdTagDetailRequest) Reset() { *x = GetLiveAdTagDetailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLiveAdTagDetailRequest) String() string { @@ -1048,7 +1014,7 @@ func (*GetLiveAdTagDetailRequest) ProtoMessage() {} func (x *GetLiveAdTagDetailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,11 +1070,9 @@ type CreateSlateRequest struct { func (x *CreateSlateRequest) Reset() { *x = CreateSlateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSlateRequest) String() string { @@ -1119,7 +1083,7 @@ func (*CreateSlateRequest) ProtoMessage() {} func (x *CreateSlateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1175,11 +1139,9 @@ type GetSlateRequest struct { func (x *GetSlateRequest) Reset() { *x = GetSlateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSlateRequest) String() string { @@ -1190,7 +1152,7 @@ func (*GetSlateRequest) ProtoMessage() {} func (x *GetSlateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1234,11 +1196,9 @@ type ListSlatesRequest struct { func (x *ListSlatesRequest) Reset() { *x = ListSlatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSlatesRequest) String() string { @@ -1249,7 +1209,7 @@ func (*ListSlatesRequest) ProtoMessage() {} func (x *ListSlatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1315,11 +1275,9 @@ type ListSlatesResponse struct { func (x *ListSlatesResponse) Reset() { *x = ListSlatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSlatesResponse) String() string { @@ -1330,7 +1288,7 @@ func (*ListSlatesResponse) ProtoMessage() {} func (x *ListSlatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,11 +1338,9 @@ type UpdateSlateRequest struct { func (x *UpdateSlateRequest) Reset() { *x = UpdateSlateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSlateRequest) String() string { @@ -1395,7 +1351,7 @@ func (*UpdateSlateRequest) ProtoMessage() {} func (x *UpdateSlateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1437,11 +1393,9 @@ type DeleteSlateRequest struct { func (x *DeleteSlateRequest) Reset() { *x = DeleteSlateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSlateRequest) String() string { @@ -1452,7 +1406,7 @@ func (*DeleteSlateRequest) ProtoMessage() {} func (x *DeleteSlateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,11 +1443,9 @@ type CreateLiveSessionRequest struct { func (x *CreateLiveSessionRequest) Reset() { *x = CreateLiveSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLiveSessionRequest) String() string { @@ -1504,7 +1456,7 @@ func (*CreateLiveSessionRequest) ProtoMessage() {} func (x *CreateLiveSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1546,11 +1498,9 @@ type GetLiveSessionRequest struct { func (x *GetLiveSessionRequest) Reset() { *x = GetLiveSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLiveSessionRequest) String() string { @@ -1561,7 +1511,7 @@ func (*GetLiveSessionRequest) ProtoMessage() {} func (x *GetLiveSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1614,11 +1564,9 @@ type CreateLiveConfigRequest struct { func (x *CreateLiveConfigRequest) Reset() { *x = CreateLiveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLiveConfigRequest) String() string { @@ -1629,7 +1577,7 @@ func (*CreateLiveConfigRequest) ProtoMessage() {} func (x *CreateLiveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1696,11 +1644,9 @@ type ListLiveConfigsRequest struct { func (x *ListLiveConfigsRequest) Reset() { *x = ListLiveConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLiveConfigsRequest) String() string { @@ -1711,7 +1657,7 @@ func (*ListLiveConfigsRequest) ProtoMessage() {} func (x *ListLiveConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1777,11 +1723,9 @@ type ListLiveConfigsResponse struct { func (x *ListLiveConfigsResponse) Reset() { *x = ListLiveConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLiveConfigsResponse) String() string { @@ -1792,7 +1736,7 @@ func (*ListLiveConfigsResponse) ProtoMessage() {} func (x *ListLiveConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1842,11 +1786,9 @@ type GetLiveConfigRequest struct { func (x *GetLiveConfigRequest) Reset() { *x = GetLiveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLiveConfigRequest) String() string { @@ -1857,7 +1799,7 @@ func (*GetLiveConfigRequest) ProtoMessage() {} func (x *GetLiveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1892,11 +1834,9 @@ type DeleteLiveConfigRequest struct { func (x *DeleteLiveConfigRequest) Reset() { *x = DeleteLiveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLiveConfigRequest) String() string { @@ -1907,7 +1847,7 @@ func (*DeleteLiveConfigRequest) ProtoMessage() {} func (x *DeleteLiveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1946,11 +1886,9 @@ type UpdateLiveConfigRequest struct { func (x *UpdateLiveConfigRequest) Reset() { *x = UpdateLiveConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLiveConfigRequest) String() string { @@ -1961,7 +1899,7 @@ func (*UpdateLiveConfigRequest) ProtoMessage() {} func (x *UpdateLiveConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2021,11 +1959,9 @@ type CreateVodConfigRequest struct { func (x *CreateVodConfigRequest) Reset() { *x = CreateVodConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVodConfigRequest) String() string { @@ -2036,7 +1972,7 @@ func (*CreateVodConfigRequest) ProtoMessage() {} func (x *CreateVodConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2104,11 +2040,9 @@ type ListVodConfigsRequest struct { func (x *ListVodConfigsRequest) Reset() { *x = ListVodConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodConfigsRequest) String() string { @@ -2119,7 +2053,7 @@ func (*ListVodConfigsRequest) ProtoMessage() {} func (x *ListVodConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2185,11 +2119,9 @@ type ListVodConfigsResponse struct { func (x *ListVodConfigsResponse) Reset() { *x = ListVodConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVodConfigsResponse) String() string { @@ -2200,7 +2132,7 @@ func (*ListVodConfigsResponse) ProtoMessage() {} func (x *ListVodConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2249,11 +2181,9 @@ type GetVodConfigRequest struct { func (x *GetVodConfigRequest) Reset() { *x = GetVodConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVodConfigRequest) String() string { @@ -2264,7 +2194,7 @@ func (*GetVodConfigRequest) ProtoMessage() {} func (x *GetVodConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2299,11 +2229,9 @@ type DeleteVodConfigRequest struct { func (x *DeleteVodConfigRequest) Reset() { *x = DeleteVodConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVodConfigRequest) String() string { @@ -2314,7 +2242,7 @@ func (*DeleteVodConfigRequest) ProtoMessage() {} func (x *DeleteVodConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2353,11 +2281,9 @@ type UpdateVodConfigRequest struct { func (x *UpdateVodConfigRequest) Reset() { *x = UpdateVodConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVodConfigRequest) String() string { @@ -2368,7 +2294,7 @@ func (*UpdateVodConfigRequest) ProtoMessage() {} func (x *UpdateVodConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2415,11 +2341,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2430,7 +2354,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3505,464 +3429,6 @@ func file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_init() { file_google_cloud_video_stitcher_v1_slates_proto_init() file_google_cloud_video_stitcher_v1_stitch_details_proto_init() file_google_cloud_video_stitcher_v1_vod_configs_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateCdnKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListCdnKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListCdnKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetCdnKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCdnKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCdnKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateVodSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetVodSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListVodStitchDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListVodStitchDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetVodStitchDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListVodAdTagDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListVodAdTagDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetVodAdTagDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListLiveAdTagDetailsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListLiveAdTagDetailsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetLiveAdTagDetailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CreateSlateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetSlateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListSlatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListSlatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSlateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSlateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*CreateLiveSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetLiveSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateLiveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListLiveConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ListLiveConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GetLiveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLiveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLiveConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateVodConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListVodConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListVodConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GetVodConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVodConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVodConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_video_stitcher_service_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/stitcherpb/vod_configs.pb.go b/video/stitcher/apiv1/stitcherpb/vod_configs.pb.go index 5cef1dd76e8e..4ad0ea8491c2 100755 --- a/video/stitcher/apiv1/stitcherpb/vod_configs.pb.go +++ b/video/stitcher/apiv1/stitcherpb/vod_configs.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/stitcher/v1/vod_configs.proto @@ -116,11 +116,9 @@ type VodConfig struct { func (x *VodConfig) Reset() { *x = VodConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VodConfig) String() string { @@ -131,7 +129,7 @@ func (*VodConfig) ProtoMessage() {} func (x *VodConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type GamVodConfig struct { func (x *GamVodConfig) Reset() { *x = GamVodConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GamVodConfig) String() string { @@ -215,7 +211,7 @@ func (*GamVodConfig) ProtoMessage() {} func (x *GamVodConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,32 +334,6 @@ func file_google_cloud_video_stitcher_v1_vod_configs_proto_init() { return } file_google_cloud_video_stitcher_v1_fetch_options_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*VodConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_stitcher_v1_vod_configs_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GamVodConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/video/stitcher/apiv1/video_stitcher_client.go b/video/stitcher/apiv1/video_stitcher_client.go index 070418ef1b52..a86a8ae58d55 100755 --- a/video/stitcher/apiv1/video_stitcher_client.go +++ b/video/stitcher/apiv1/video_stitcher_client.go @@ -19,6 +19,7 @@ package stitcher import ( "context" "fmt" + "log/slog" "math" "net/url" "time" @@ -618,6 +619,8 @@ type videoStitcherGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewVideoStitcherClient creates a new video stitcher service client based on gRPC. @@ -648,6 +651,7 @@ func NewVideoStitcherClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, videoStitcherClient: stitcherpb.NewVideoStitcherServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -702,7 +706,7 @@ func (c *videoStitcherGRPCClient) CreateCdnKey(ctx context.Context, req *stitche var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateCdnKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateCdnKey, req, settings.GRPC, c.logger, "CreateCdnKey") return err }, opts...) if err != nil { @@ -733,7 +737,7 @@ func (c *videoStitcherGRPCClient) ListCdnKeys(ctx context.Context, req *stitcher } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListCdnKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListCdnKeys, req, settings.GRPC, c.logger, "ListCdnKeys") return err }, opts...) if err != nil { @@ -768,7 +772,7 @@ func (c *videoStitcherGRPCClient) GetCdnKey(ctx context.Context, req *stitcherpb var resp *stitcherpb.CdnKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetCdnKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetCdnKey, req, settings.GRPC, c.logger, "GetCdnKey") return err }, opts...) if err != nil { @@ -786,7 +790,7 @@ func (c *videoStitcherGRPCClient) DeleteCdnKey(ctx context.Context, req *stitche var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.DeleteCdnKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.DeleteCdnKey, req, settings.GRPC, c.logger, "DeleteCdnKey") return err }, opts...) if err != nil { @@ -806,7 +810,7 @@ func (c *videoStitcherGRPCClient) UpdateCdnKey(ctx context.Context, req *stitche var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.UpdateCdnKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.UpdateCdnKey, req, settings.GRPC, c.logger, "UpdateCdnKey") return err }, opts...) if err != nil { @@ -826,7 +830,7 @@ func (c *videoStitcherGRPCClient) CreateVodSession(ctx context.Context, req *sti var resp *stitcherpb.VodSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateVodSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateVodSession, req, settings.GRPC, c.logger, "CreateVodSession") return err }, opts...) if err != nil { @@ -844,7 +848,7 @@ func (c *videoStitcherGRPCClient) GetVodSession(ctx context.Context, req *stitch var resp *stitcherpb.VodSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetVodSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetVodSession, req, settings.GRPC, c.logger, "GetVodSession") return err }, opts...) if err != nil { @@ -873,7 +877,7 @@ func (c *videoStitcherGRPCClient) ListVodStitchDetails(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListVodStitchDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListVodStitchDetails, req, settings.GRPC, c.logger, "ListVodStitchDetails") return err }, opts...) if err != nil { @@ -908,7 +912,7 @@ func (c *videoStitcherGRPCClient) GetVodStitchDetail(ctx context.Context, req *s var resp *stitcherpb.VodStitchDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetVodStitchDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetVodStitchDetail, req, settings.GRPC, c.logger, "GetVodStitchDetail") return err }, opts...) if err != nil { @@ -937,7 +941,7 @@ func (c *videoStitcherGRPCClient) ListVodAdTagDetails(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListVodAdTagDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListVodAdTagDetails, req, settings.GRPC, c.logger, "ListVodAdTagDetails") return err }, opts...) if err != nil { @@ -972,7 +976,7 @@ func (c *videoStitcherGRPCClient) GetVodAdTagDetail(ctx context.Context, req *st var resp *stitcherpb.VodAdTagDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetVodAdTagDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetVodAdTagDetail, req, settings.GRPC, c.logger, "GetVodAdTagDetail") return err }, opts...) if err != nil { @@ -1001,7 +1005,7 @@ func (c *videoStitcherGRPCClient) ListLiveAdTagDetails(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListLiveAdTagDetails(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListLiveAdTagDetails, req, settings.GRPC, c.logger, "ListLiveAdTagDetails") return err }, opts...) if err != nil { @@ -1036,7 +1040,7 @@ func (c *videoStitcherGRPCClient) GetLiveAdTagDetail(ctx context.Context, req *s var resp *stitcherpb.LiveAdTagDetail err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetLiveAdTagDetail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetLiveAdTagDetail, req, settings.GRPC, c.logger, "GetLiveAdTagDetail") return err }, opts...) if err != nil { @@ -1054,7 +1058,7 @@ func (c *videoStitcherGRPCClient) CreateSlate(ctx context.Context, req *stitcher var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateSlate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateSlate, req, settings.GRPC, c.logger, "CreateSlate") return err }, opts...) if err != nil { @@ -1085,7 +1089,7 @@ func (c *videoStitcherGRPCClient) ListSlates(ctx context.Context, req *stitcherp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListSlates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListSlates, req, settings.GRPC, c.logger, "ListSlates") return err }, opts...) if err != nil { @@ -1120,7 +1124,7 @@ func (c *videoStitcherGRPCClient) GetSlate(ctx context.Context, req *stitcherpb. var resp *stitcherpb.Slate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetSlate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetSlate, req, settings.GRPC, c.logger, "GetSlate") return err }, opts...) if err != nil { @@ -1138,7 +1142,7 @@ func (c *videoStitcherGRPCClient) UpdateSlate(ctx context.Context, req *stitcher var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.UpdateSlate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.UpdateSlate, req, settings.GRPC, c.logger, "UpdateSlate") return err }, opts...) if err != nil { @@ -1158,7 +1162,7 @@ func (c *videoStitcherGRPCClient) DeleteSlate(ctx context.Context, req *stitcher var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.DeleteSlate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.DeleteSlate, req, settings.GRPC, c.logger, "DeleteSlate") return err }, opts...) if err != nil { @@ -1178,7 +1182,7 @@ func (c *videoStitcherGRPCClient) CreateLiveSession(ctx context.Context, req *st var resp *stitcherpb.LiveSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateLiveSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateLiveSession, req, settings.GRPC, c.logger, "CreateLiveSession") return err }, opts...) if err != nil { @@ -1196,7 +1200,7 @@ func (c *videoStitcherGRPCClient) GetLiveSession(ctx context.Context, req *stitc var resp *stitcherpb.LiveSession err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetLiveSession(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetLiveSession, req, settings.GRPC, c.logger, "GetLiveSession") return err }, opts...) if err != nil { @@ -1214,7 +1218,7 @@ func (c *videoStitcherGRPCClient) CreateLiveConfig(ctx context.Context, req *sti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateLiveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateLiveConfig, req, settings.GRPC, c.logger, "CreateLiveConfig") return err }, opts...) if err != nil { @@ -1245,7 +1249,7 @@ func (c *videoStitcherGRPCClient) ListLiveConfigs(ctx context.Context, req *stit } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListLiveConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListLiveConfigs, req, settings.GRPC, c.logger, "ListLiveConfigs") return err }, opts...) if err != nil { @@ -1280,7 +1284,7 @@ func (c *videoStitcherGRPCClient) GetLiveConfig(ctx context.Context, req *stitch var resp *stitcherpb.LiveConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetLiveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetLiveConfig, req, settings.GRPC, c.logger, "GetLiveConfig") return err }, opts...) if err != nil { @@ -1298,7 +1302,7 @@ func (c *videoStitcherGRPCClient) DeleteLiveConfig(ctx context.Context, req *sti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.DeleteLiveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.DeleteLiveConfig, req, settings.GRPC, c.logger, "DeleteLiveConfig") return err }, opts...) if err != nil { @@ -1318,7 +1322,7 @@ func (c *videoStitcherGRPCClient) UpdateLiveConfig(ctx context.Context, req *sti var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.UpdateLiveConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.UpdateLiveConfig, req, settings.GRPC, c.logger, "UpdateLiveConfig") return err }, opts...) if err != nil { @@ -1338,7 +1342,7 @@ func (c *videoStitcherGRPCClient) CreateVodConfig(ctx context.Context, req *stit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.CreateVodConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.CreateVodConfig, req, settings.GRPC, c.logger, "CreateVodConfig") return err }, opts...) if err != nil { @@ -1369,7 +1373,7 @@ func (c *videoStitcherGRPCClient) ListVodConfigs(ctx context.Context, req *stitc } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.ListVodConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.ListVodConfigs, req, settings.GRPC, c.logger, "ListVodConfigs") return err }, opts...) if err != nil { @@ -1404,7 +1408,7 @@ func (c *videoStitcherGRPCClient) GetVodConfig(ctx context.Context, req *stitche var resp *stitcherpb.VodConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.GetVodConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.GetVodConfig, req, settings.GRPC, c.logger, "GetVodConfig") return err }, opts...) if err != nil { @@ -1422,7 +1426,7 @@ func (c *videoStitcherGRPCClient) DeleteVodConfig(ctx context.Context, req *stit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.DeleteVodConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.DeleteVodConfig, req, settings.GRPC, c.logger, "DeleteVodConfig") return err }, opts...) if err != nil { @@ -1442,7 +1446,7 @@ func (c *videoStitcherGRPCClient) UpdateVodConfig(ctx context.Context, req *stit var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.videoStitcherClient.UpdateVodConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.videoStitcherClient.UpdateVodConfig, req, settings.GRPC, c.logger, "UpdateVodConfig") return err }, opts...) if err != nil { @@ -1461,7 +1465,7 @@ func (c *videoStitcherGRPCClient) CancelOperation(ctx context.Context, req *long opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1475,7 +1479,7 @@ func (c *videoStitcherGRPCClient) DeleteOperation(ctx context.Context, req *long opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1490,7 +1494,7 @@ func (c *videoStitcherGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1519,7 +1523,7 @@ func (c *videoStitcherGRPCClient) ListOperations(ctx context.Context, req *longr } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { diff --git a/video/stitcher/apiv1/video_stitcher_client_example_go123_test.go b/video/stitcher/apiv1/video_stitcher_client_example_go123_test.go index 07c06a6bf2d5..e9c4af45488f 100644 --- a/video/stitcher/apiv1/video_stitcher_client_example_go123_test.go +++ b/video/stitcher/apiv1/video_stitcher_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleVideoStitcherClient_ListCdnKeys_all() { } for resp, err := range c.ListCdnKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleVideoStitcherClient_ListLiveAdTagDetails_all() { } for resp, err := range c.ListLiveAdTagDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleVideoStitcherClient_ListLiveConfigs_all() { } for resp, err := range c.ListLiveConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleVideoStitcherClient_ListSlates_all() { } for resp, err := range c.ListSlates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleVideoStitcherClient_ListVodAdTagDetails_all() { } for resp, err := range c.ListVodAdTagDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleVideoStitcherClient_ListVodConfigs_all() { } for resp, err := range c.ListVodConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleVideoStitcherClient_ListVodStitchDetails_all() { } for resp, err := range c.ListVodStitchDetails(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleVideoStitcherClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/video/transcoder/apiv1/helpers.go b/video/transcoder/apiv1/helpers.go index aa9b78c5a34c..4fa2f47c9c3a 100755 --- a/video/transcoder/apiv1/helpers.go +++ b/video/transcoder/apiv1/helpers.go @@ -18,10 +18,20 @@ package transcoder import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "transcoder.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/video/transcoder/apiv1/transcoder_client.go b/video/transcoder/apiv1/transcoder_client.go index 8663b2acf83e..f69904e1deb7 100755 --- a/video/transcoder/apiv1/transcoder_client.go +++ b/video/transcoder/apiv1/transcoder_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( transcoderpb "cloud.google.com/go/video/transcoder/apiv1/transcoderpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -236,6 +235,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new transcoder service client based on gRPC. @@ -267,6 +268,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: transcoderpb.NewTranscoderServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -313,6 +315,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new transcoder service rest client. @@ -335,6 +339,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -387,7 +392,7 @@ func (c *gRPCClient) CreateJob(ctx context.Context, req *transcoderpb.CreateJobR var resp *transcoderpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateJob, req, settings.GRPC, c.logger, "CreateJob") return err }, opts...) if err != nil { @@ -416,7 +421,7 @@ func (c *gRPCClient) ListJobs(ctx context.Context, req *transcoderpb.ListJobsReq } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListJobs, req, settings.GRPC, c.logger, "ListJobs") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *gRPCClient) GetJob(ctx context.Context, req *transcoderpb.GetJobRequest var resp *transcoderpb.Job err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetJob, req, settings.GRPC, c.logger, "GetJob") return err }, opts...) if err != nil { @@ -468,7 +473,7 @@ func (c *gRPCClient) DeleteJob(ctx context.Context, req *transcoderpb.DeleteJobR opts = append((*c.CallOptions).DeleteJob[0:len((*c.CallOptions).DeleteJob):len((*c.CallOptions).DeleteJob)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteJob(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteJob, req, settings.GRPC, c.logger, "DeleteJob") return err }, opts...) return err @@ -483,7 +488,7 @@ func (c *gRPCClient) CreateJobTemplate(ctx context.Context, req *transcoderpb.Cr var resp *transcoderpb.JobTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateJobTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateJobTemplate, req, settings.GRPC, c.logger, "CreateJobTemplate") return err }, opts...) if err != nil { @@ -512,7 +517,7 @@ func (c *gRPCClient) ListJobTemplates(ctx context.Context, req *transcoderpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListJobTemplates(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListJobTemplates, req, settings.GRPC, c.logger, "ListJobTemplates") return err }, opts...) if err != nil { @@ -547,7 +552,7 @@ func (c *gRPCClient) GetJobTemplate(ctx context.Context, req *transcoderpb.GetJo var resp *transcoderpb.JobTemplate err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetJobTemplate(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetJobTemplate, req, settings.GRPC, c.logger, "GetJobTemplate") return err }, opts...) if err != nil { @@ -564,7 +569,7 @@ func (c *gRPCClient) DeleteJobTemplate(ctx context.Context, req *transcoderpb.De opts = append((*c.CallOptions).DeleteJobTemplate[0:len((*c.CallOptions).DeleteJobTemplate):len((*c.CallOptions).DeleteJobTemplate)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteJobTemplate(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteJobTemplate, req, settings.GRPC, c.logger, "DeleteJobTemplate") return err }, opts...) return err @@ -610,17 +615,7 @@ func (c *restClient) CreateJob(ctx context.Context, req *transcoderpb.CreateJobR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJob") if err != nil { return err } @@ -688,21 +683,10 @@ func (c *restClient) ListJobs(ctx context.Context, req *transcoderpb.ListJobsReq } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -765,17 +749,7 @@ func (c *restClient) GetJob(ctx context.Context, req *transcoderpb.GetJobRequest httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJob") if err != nil { return err } @@ -825,15 +799,8 @@ func (c *restClient) DeleteJob(ctx context.Context, req *transcoderpb.DeleteJobR httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJob") + return err }, opts...) } @@ -878,17 +845,7 @@ func (c *restClient) CreateJobTemplate(ctx context.Context, req *transcoderpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateJobTemplate") if err != nil { return err } @@ -956,21 +913,10 @@ func (c *restClient) ListJobTemplates(ctx context.Context, req *transcoderpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListJobTemplates") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1033,17 +979,7 @@ func (c *restClient) GetJobTemplate(ctx context.Context, req *transcoderpb.GetJo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetJobTemplate") if err != nil { return err } @@ -1093,14 +1029,7 @@ func (c *restClient) DeleteJobTemplate(ctx context.Context, req *transcoderpb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteJobTemplate") + return err }, opts...) } diff --git a/video/transcoder/apiv1/transcoder_client_example_go123_test.go b/video/transcoder/apiv1/transcoder_client_example_go123_test.go index 0812afb33848..3888a03a2725 100644 --- a/video/transcoder/apiv1/transcoder_client_example_go123_test.go +++ b/video/transcoder/apiv1/transcoder_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListJobTemplates_all() { } for resp, err := range c.ListJobTemplates(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListJobs_all() { } for resp, err := range c.ListJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/video/transcoder/apiv1/transcoderpb/resources.pb.go b/video/transcoder/apiv1/transcoderpb/resources.pb.go index 22afd2e47ad6..b815ffac78d4 100755 --- a/video/transcoder/apiv1/transcoderpb/resources.pb.go +++ b/video/transcoder/apiv1/transcoderpb/resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/transcoder/v1/resources.proto @@ -434,11 +434,9 @@ type Job struct { func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -449,7 +447,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +614,9 @@ type JobTemplate struct { func (x *JobTemplate) Reset() { *x = JobTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobTemplate) String() string { @@ -631,7 +627,7 @@ func (*JobTemplate) ProtoMessage() {} func (x *JobTemplate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +701,9 @@ type JobConfig struct { func (x *JobConfig) Reset() { *x = JobConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JobConfig) String() string { @@ -720,7 +714,7 @@ func (*JobConfig) ProtoMessage() {} func (x *JobConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -833,11 +827,9 @@ type Input struct { func (x *Input) Reset() { *x = Input{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Input) String() string { @@ -848,7 +840,7 @@ func (*Input) ProtoMessage() {} func (x *Input) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +891,9 @@ type Output struct { func (x *Output) Reset() { *x = Output{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Output) String() string { @@ -914,7 +904,7 @@ func (*Output) ProtoMessage() {} func (x *Output) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,11 +949,9 @@ type EditAtom struct { func (x *EditAtom) Reset() { *x = EditAtom{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EditAtom) String() string { @@ -974,7 +962,7 @@ func (*EditAtom) ProtoMessage() {} func (x *EditAtom) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,11 +1018,9 @@ type AdBreak struct { func (x *AdBreak) Reset() { *x = AdBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdBreak) String() string { @@ -1045,7 +1031,7 @@ func (*AdBreak) ProtoMessage() {} func (x *AdBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1089,11 +1075,9 @@ type ElementaryStream struct { func (x *ElementaryStream) Reset() { *x = ElementaryStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ElementaryStream) String() string { @@ -1104,7 +1088,7 @@ func (*ElementaryStream) ProtoMessage() {} func (x *ElementaryStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1218,11 +1202,9 @@ type MuxStream struct { func (x *MuxStream) Reset() { *x = MuxStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MuxStream) String() string { @@ -1233,7 +1215,7 @@ func (*MuxStream) ProtoMessage() {} func (x *MuxStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1318,11 +1300,9 @@ type Manifest struct { func (x *Manifest) Reset() { *x = Manifest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Manifest) String() string { @@ -1333,7 +1313,7 @@ func (*Manifest) ProtoMessage() {} func (x *Manifest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,11 +1387,9 @@ type PubsubDestination struct { func (x *PubsubDestination) Reset() { *x = PubsubDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PubsubDestination) String() string { @@ -1422,7 +1400,7 @@ func (*PubsubDestination) ProtoMessage() {} func (x *PubsubDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1517,11 +1495,9 @@ type SpriteSheet struct { func (x *SpriteSheet) Reset() { *x = SpriteSheet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpriteSheet) String() string { @@ -1532,7 +1508,7 @@ func (*SpriteSheet) ProtoMessage() {} func (x *SpriteSheet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1667,11 +1643,9 @@ type Overlay struct { func (x *Overlay) Reset() { *x = Overlay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay) String() string { @@ -1682,7 +1656,7 @@ func (*Overlay) ProtoMessage() {} func (x *Overlay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,11 +1709,9 @@ type PreprocessingConfig struct { func (x *PreprocessingConfig) Reset() { *x = PreprocessingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig) String() string { @@ -1750,7 +1722,7 @@ func (*PreprocessingConfig) ProtoMessage() {} func (x *PreprocessingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1832,11 +1804,9 @@ type VideoStream struct { func (x *VideoStream) Reset() { *x = VideoStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream) String() string { @@ -1847,7 +1817,7 @@ func (*VideoStream) ProtoMessage() {} func (x *VideoStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1966,11 +1936,9 @@ type AudioStream struct { func (x *AudioStream) Reset() { *x = AudioStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioStream) String() string { @@ -1981,7 +1949,7 @@ func (*AudioStream) ProtoMessage() {} func (x *AudioStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,11 +2050,9 @@ type TextStream struct { func (x *TextStream) Reset() { *x = TextStream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextStream) String() string { @@ -2097,7 +2063,7 @@ func (*TextStream) ProtoMessage() {} func (x *TextStream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2157,11 +2123,9 @@ type SegmentSettings struct { func (x *SegmentSettings) Reset() { *x = SegmentSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SegmentSettings) String() string { @@ -2172,7 +2136,7 @@ func (*SegmentSettings) ProtoMessage() {} func (x *SegmentSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2230,11 +2194,9 @@ type Encryption struct { func (x *Encryption) Reset() { *x = Encryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption) String() string { @@ -2245,7 +2207,7 @@ func (*Encryption) ProtoMessage() {} func (x *Encryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2365,11 +2327,9 @@ type Manifest_DashConfig struct { func (x *Manifest_DashConfig) Reset() { *x = Manifest_DashConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Manifest_DashConfig) String() string { @@ -2380,7 +2340,7 @@ func (*Manifest_DashConfig) ProtoMessage() {} func (x *Manifest_DashConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2416,11 +2376,9 @@ type Overlay_NormalizedCoordinate struct { func (x *Overlay_NormalizedCoordinate) Reset() { *x = Overlay_NormalizedCoordinate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_NormalizedCoordinate) String() string { @@ -2431,7 +2389,7 @@ func (*Overlay_NormalizedCoordinate) ProtoMessage() {} func (x *Overlay_NormalizedCoordinate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2481,11 +2439,9 @@ type Overlay_Image struct { func (x *Overlay_Image) Reset() { *x = Overlay_Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_Image) String() string { @@ -2496,7 +2452,7 @@ func (*Overlay_Image) ProtoMessage() {} func (x *Overlay_Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2550,11 +2506,9 @@ type Overlay_AnimationStatic struct { func (x *Overlay_AnimationStatic) Reset() { *x = Overlay_AnimationStatic{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_AnimationStatic) String() string { @@ -2565,7 +2519,7 @@ func (*Overlay_AnimationStatic) ProtoMessage() {} func (x *Overlay_AnimationStatic) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2617,11 +2571,9 @@ type Overlay_AnimationFade struct { func (x *Overlay_AnimationFade) Reset() { *x = Overlay_AnimationFade{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_AnimationFade) String() string { @@ -2632,7 +2584,7 @@ func (*Overlay_AnimationFade) ProtoMessage() {} func (x *Overlay_AnimationFade) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2689,11 +2641,9 @@ type Overlay_AnimationEnd struct { func (x *Overlay_AnimationEnd) Reset() { *x = Overlay_AnimationEnd{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_AnimationEnd) String() string { @@ -2704,7 +2654,7 @@ func (*Overlay_AnimationEnd) ProtoMessage() {} func (x *Overlay_AnimationEnd) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2744,11 +2694,9 @@ type Overlay_Animation struct { func (x *Overlay_Animation) Reset() { *x = Overlay_Animation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Overlay_Animation) String() string { @@ -2759,7 +2707,7 @@ func (*Overlay_Animation) ProtoMessage() {} func (x *Overlay_Animation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2851,11 +2799,9 @@ type PreprocessingConfig_Color struct { func (x *PreprocessingConfig_Color) Reset() { *x = PreprocessingConfig_Color{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Color) String() string { @@ -2866,7 +2812,7 @@ func (*PreprocessingConfig_Color) ProtoMessage() {} func (x *PreprocessingConfig_Color) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2924,11 +2870,9 @@ type PreprocessingConfig_Denoise struct { func (x *PreprocessingConfig_Denoise) Reset() { *x = PreprocessingConfig_Denoise{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Denoise) String() string { @@ -2939,7 +2883,7 @@ func (*PreprocessingConfig_Denoise) ProtoMessage() {} func (x *PreprocessingConfig_Denoise) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2986,11 +2930,9 @@ type PreprocessingConfig_Deblock struct { func (x *PreprocessingConfig_Deblock) Reset() { *x = PreprocessingConfig_Deblock{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Deblock) String() string { @@ -3001,7 +2943,7 @@ func (*PreprocessingConfig_Deblock) ProtoMessage() {} func (x *PreprocessingConfig_Deblock) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3060,11 +3002,9 @@ type PreprocessingConfig_Audio struct { func (x *PreprocessingConfig_Audio) Reset() { *x = PreprocessingConfig_Audio{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Audio) String() string { @@ -3075,7 +3015,7 @@ func (*PreprocessingConfig_Audio) ProtoMessage() {} func (x *PreprocessingConfig_Audio) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3130,11 +3070,9 @@ type PreprocessingConfig_Crop struct { func (x *PreprocessingConfig_Crop) Reset() { *x = PreprocessingConfig_Crop{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Crop) String() string { @@ -3145,7 +3083,7 @@ func (*PreprocessingConfig_Crop) ProtoMessage() {} func (x *PreprocessingConfig_Crop) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3207,11 +3145,9 @@ type PreprocessingConfig_Pad struct { func (x *PreprocessingConfig_Pad) Reset() { *x = PreprocessingConfig_Pad{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Pad) String() string { @@ -3222,7 +3158,7 @@ func (*PreprocessingConfig_Pad) ProtoMessage() {} func (x *PreprocessingConfig_Pad) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3282,11 +3218,9 @@ type PreprocessingConfig_Deinterlace struct { func (x *PreprocessingConfig_Deinterlace) Reset() { *x = PreprocessingConfig_Deinterlace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Deinterlace) String() string { @@ -3297,7 +3231,7 @@ func (*PreprocessingConfig_Deinterlace) ProtoMessage() {} func (x *PreprocessingConfig_Deinterlace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3384,11 +3318,9 @@ type PreprocessingConfig_Deinterlace_YadifConfig struct { func (x *PreprocessingConfig_Deinterlace_YadifConfig) Reset() { *x = PreprocessingConfig_Deinterlace_YadifConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Deinterlace_YadifConfig) String() string { @@ -3399,7 +3331,7 @@ func (*PreprocessingConfig_Deinterlace_YadifConfig) ProtoMessage() {} func (x *PreprocessingConfig_Deinterlace_YadifConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3470,11 +3402,9 @@ type PreprocessingConfig_Deinterlace_BwdifConfig struct { func (x *PreprocessingConfig_Deinterlace_BwdifConfig) Reset() { *x = PreprocessingConfig_Deinterlace_BwdifConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreprocessingConfig_Deinterlace_BwdifConfig) String() string { @@ -3485,7 +3415,7 @@ func (*PreprocessingConfig_Deinterlace_BwdifConfig) ProtoMessage() {} func (x *PreprocessingConfig_Deinterlace_BwdifConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3648,11 +3578,9 @@ type VideoStream_H264CodecSettings struct { func (x *VideoStream_H264CodecSettings) Reset() { *x = VideoStream_H264CodecSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream_H264CodecSettings) String() string { @@ -3663,7 +3591,7 @@ func (*VideoStream_H264CodecSettings) ProtoMessage() {} func (x *VideoStream_H264CodecSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3985,11 +3913,9 @@ type VideoStream_H265CodecSettings struct { func (x *VideoStream_H265CodecSettings) Reset() { *x = VideoStream_H265CodecSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream_H265CodecSettings) String() string { @@ -4000,7 +3926,7 @@ func (*VideoStream_H265CodecSettings) ProtoMessage() {} func (x *VideoStream_H265CodecSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4263,11 +4189,9 @@ type VideoStream_Vp9CodecSettings struct { func (x *VideoStream_Vp9CodecSettings) Reset() { *x = VideoStream_Vp9CodecSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStream_Vp9CodecSettings) String() string { @@ -4278,7 +4202,7 @@ func (*VideoStream_Vp9CodecSettings) ProtoMessage() {} func (x *VideoStream_Vp9CodecSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4417,11 +4341,9 @@ type AudioStream_AudioMapping struct { func (x *AudioStream_AudioMapping) Reset() { *x = AudioStream_AudioMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AudioStream_AudioMapping) String() string { @@ -4432,7 +4354,7 @@ func (*AudioStream_AudioMapping) ProtoMessage() {} func (x *AudioStream_AudioMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4506,11 +4428,9 @@ type TextStream_TextMapping struct { func (x *TextStream_TextMapping) Reset() { *x = TextStream_TextMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextStream_TextMapping) String() string { @@ -4521,7 +4441,7 @@ func (*TextStream_TextMapping) ProtoMessage() {} func (x *TextStream_TextMapping) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4566,11 +4486,9 @@ type Encryption_Aes128Encryption struct { func (x *Encryption_Aes128Encryption) Reset() { *x = Encryption_Aes128Encryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Aes128Encryption) String() string { @@ -4581,7 +4499,7 @@ func (*Encryption_Aes128Encryption) ProtoMessage() {} func (x *Encryption_Aes128Encryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4605,11 +4523,9 @@ type Encryption_SampleAesEncryption struct { func (x *Encryption_SampleAesEncryption) Reset() { *x = Encryption_SampleAesEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_SampleAesEncryption) String() string { @@ -4620,7 +4536,7 @@ func (*Encryption_SampleAesEncryption) ProtoMessage() {} func (x *Encryption_SampleAesEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4652,11 +4568,9 @@ type Encryption_MpegCommonEncryption struct { func (x *Encryption_MpegCommonEncryption) Reset() { *x = Encryption_MpegCommonEncryption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_MpegCommonEncryption) String() string { @@ -4667,7 +4581,7 @@ func (*Encryption_MpegCommonEncryption) ProtoMessage() {} func (x *Encryption_MpegCommonEncryption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4706,11 +4620,9 @@ type Encryption_SecretManagerSource struct { func (x *Encryption_SecretManagerSource) Reset() { *x = Encryption_SecretManagerSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_SecretManagerSource) String() string { @@ -4721,7 +4633,7 @@ func (*Encryption_SecretManagerSource) ProtoMessage() {} func (x *Encryption_SecretManagerSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4752,11 +4664,9 @@ type Encryption_Widevine struct { func (x *Encryption_Widevine) Reset() { *x = Encryption_Widevine{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Widevine) String() string { @@ -4767,7 +4677,7 @@ func (*Encryption_Widevine) ProtoMessage() {} func (x *Encryption_Widevine) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4791,11 +4701,9 @@ type Encryption_Fairplay struct { func (x *Encryption_Fairplay) Reset() { *x = Encryption_Fairplay{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Fairplay) String() string { @@ -4806,7 +4714,7 @@ func (*Encryption_Fairplay) ProtoMessage() {} func (x *Encryption_Fairplay) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4830,11 +4738,9 @@ type Encryption_Playready struct { func (x *Encryption_Playready) Reset() { *x = Encryption_Playready{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Playready) String() string { @@ -4845,7 +4751,7 @@ func (*Encryption_Playready) ProtoMessage() {} func (x *Encryption_Playready) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4869,11 +4775,9 @@ type Encryption_Clearkey struct { func (x *Encryption_Clearkey) Reset() { *x = Encryption_Clearkey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_Clearkey) String() string { @@ -4884,7 +4788,7 @@ func (*Encryption_Clearkey) ProtoMessage() {} func (x *Encryption_Clearkey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4917,11 +4821,9 @@ type Encryption_DrmSystems struct { func (x *Encryption_DrmSystems) Reset() { *x = Encryption_DrmSystems{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Encryption_DrmSystems) String() string { @@ -4932,7 +4834,7 @@ func (*Encryption_DrmSystems) ProtoMessage() {} func (x *Encryption_DrmSystems) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5936,596 +5838,6 @@ func file_google_cloud_video_transcoder_v1_resources_proto_init() { if File_google_cloud_video_transcoder_v1_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*JobTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*JobConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Input); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Output); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*EditAtom); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AdBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ElementaryStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*MuxStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Manifest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PubsubDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SpriteSheet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Overlay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AudioStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TextStream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SegmentSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Encryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Manifest_DashConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_NormalizedCoordinate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_AnimationStatic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_AnimationFade); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_AnimationEnd); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Overlay_Animation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Color); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Denoise); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Deblock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Audio); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Crop); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Pad); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Deinterlace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Deinterlace_YadifConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*PreprocessingConfig_Deinterlace_BwdifConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream_H264CodecSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream_H265CodecSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*VideoStream_Vp9CodecSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*AudioStream_AudioMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*TextStream_TextMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Aes128Encryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_SampleAesEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_MpegCommonEncryption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_SecretManagerSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Widevine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Fairplay); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Playready); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_Clearkey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*Encryption_DrmSystems); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_video_transcoder_v1_resources_proto_msgTypes[0].OneofWrappers = []any{ (*Job_TemplateId)(nil), (*Job_Config)(nil), diff --git a/video/transcoder/apiv1/transcoderpb/services.pb.go b/video/transcoder/apiv1/transcoderpb/services.pb.go index 2fa49b2540b4..1bd62b5c7601 100755 --- a/video/transcoder/apiv1/transcoderpb/services.pb.go +++ b/video/transcoder/apiv1/transcoderpb/services.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/video/transcoder/v1/services.proto @@ -56,11 +56,9 @@ type CreateJobRequest struct { func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -71,7 +69,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -124,11 +122,9 @@ type ListJobsRequest struct { func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -139,7 +135,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +198,9 @@ type GetJobRequest struct { func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -217,7 +211,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +249,9 @@ type DeleteJobRequest struct { func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -270,7 +262,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +307,9 @@ type ListJobsResponse struct { func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -330,7 +320,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,11 +377,9 @@ type CreateJobTemplateRequest struct { func (x *CreateJobTemplateRequest) Reset() { *x = CreateJobTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobTemplateRequest) String() string { @@ -402,7 +390,7 @@ func (*CreateJobTemplateRequest) ProtoMessage() {} func (x *CreateJobTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +450,9 @@ type ListJobTemplatesRequest struct { func (x *ListJobTemplatesRequest) Reset() { *x = ListJobTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobTemplatesRequest) String() string { @@ -477,7 +463,7 @@ func (*ListJobTemplatesRequest) ProtoMessage() {} func (x *ListJobTemplatesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -541,11 +527,9 @@ type GetJobTemplateRequest struct { func (x *GetJobTemplateRequest) Reset() { *x = GetJobTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobTemplateRequest) String() string { @@ -556,7 +540,7 @@ func (*GetJobTemplateRequest) ProtoMessage() {} func (x *GetJobTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +578,9 @@ type DeleteJobTemplateRequest struct { func (x *DeleteJobTemplateRequest) Reset() { *x = DeleteJobTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobTemplateRequest) String() string { @@ -609,7 +591,7 @@ func (*DeleteJobTemplateRequest) ProtoMessage() {} func (x *DeleteJobTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -654,11 +636,9 @@ type ListJobTemplatesResponse struct { func (x *ListJobTemplatesResponse) Reset() { *x = ListJobTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobTemplatesResponse) String() string { @@ -669,7 +649,7 @@ func (*ListJobTemplatesResponse) ProtoMessage() {} func (x *ListJobTemplatesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_video_transcoder_v1_services_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,128 +979,6 @@ func file_google_cloud_video_transcoder_v1_services_proto_init() { return } file_google_cloud_video_transcoder_v1_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CreateJobTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListJobTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetJobTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteJobTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_video_transcoder_v1_services_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListJobTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/videointelligence/apiv1/helpers.go b/videointelligence/apiv1/helpers.go index 85e387c0cb73..43eda5d19350 100755 --- a/videointelligence/apiv1/helpers.go +++ b/videointelligence/apiv1/helpers.go @@ -18,10 +18,20 @@ package videointelligence import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "videointelligence.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/videointelligence/apiv1/video_intelligence_client.go b/videointelligence/apiv1/video_intelligence_client.go index a6a6621e0af8..24d23c4b788a 100755 --- a/videointelligence/apiv1/video_intelligence_client.go +++ b/videointelligence/apiv1/video_intelligence_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" videointelligencepb "cloud.google.com/go/videointelligence/apiv1/videointelligencepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -181,6 +180,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new video intelligence service client based on gRPC. @@ -207,6 +208,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: videointelligencepb.NewVideoIntelligenceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new video intelligence service rest client. @@ -286,6 +290,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +350,7 @@ func (c *gRPCClient) AnnotateVideo(ctx context.Context, req *videointelligencepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateVideo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateVideo, req, settings.GRPC, c.logger, "AnnotateVideo") return err }, opts...) if err != nil { @@ -394,21 +399,10 @@ func (c *restClient) AnnotateVideo(ctx context.Context, req *videointelligencepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateVideo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/videointelligence/apiv1/videointelligencepb/video_intelligence.pb.go b/videointelligence/apiv1/videointelligencepb/video_intelligence.pb.go index 8c5c3a124889..40a00b9a16e3 100755 --- a/videointelligence/apiv1/videointelligencepb/video_intelligence.pb.go +++ b/videointelligence/apiv1/videointelligencepb/video_intelligence.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/videointelligence/v1/video_intelligence.proto @@ -290,11 +290,9 @@ type AnnotateVideoRequest struct { func (x *AnnotateVideoRequest) Reset() { *x = AnnotateVideoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoRequest) String() string { @@ -305,7 +303,7 @@ func (*AnnotateVideoRequest) ProtoMessage() {} func (x *AnnotateVideoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,11 +390,9 @@ type VideoContext struct { func (x *VideoContext) Reset() { *x = VideoContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoContext) String() string { @@ -407,7 +403,7 @@ func (*VideoContext) ProtoMessage() {} func (x *VideoContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +517,9 @@ type LabelDetectionConfig struct { func (x *LabelDetectionConfig) Reset() { *x = LabelDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelDetectionConfig) String() string { @@ -536,7 +530,7 @@ func (*LabelDetectionConfig) ProtoMessage() {} func (x *LabelDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -600,11 +594,9 @@ type ShotChangeDetectionConfig struct { func (x *ShotChangeDetectionConfig) Reset() { *x = ShotChangeDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShotChangeDetectionConfig) String() string { @@ -615,7 +607,7 @@ func (*ShotChangeDetectionConfig) ProtoMessage() {} func (x *ShotChangeDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,11 +643,9 @@ type ObjectTrackingConfig struct { func (x *ObjectTrackingConfig) Reset() { *x = ObjectTrackingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingConfig) String() string { @@ -666,7 +656,7 @@ func (*ObjectTrackingConfig) ProtoMessage() {} func (x *ObjectTrackingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -707,11 +697,9 @@ type FaceDetectionConfig struct { func (x *FaceDetectionConfig) Reset() { *x = FaceDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceDetectionConfig) String() string { @@ -722,7 +710,7 @@ func (*FaceDetectionConfig) ProtoMessage() {} func (x *FaceDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +767,9 @@ type PersonDetectionConfig struct { func (x *PersonDetectionConfig) Reset() { *x = PersonDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonDetectionConfig) String() string { @@ -794,7 +780,7 @@ func (*PersonDetectionConfig) ProtoMessage() {} func (x *PersonDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +830,9 @@ type ExplicitContentDetectionConfig struct { func (x *ExplicitContentDetectionConfig) Reset() { *x = ExplicitContentDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentDetectionConfig) String() string { @@ -859,7 +843,7 @@ func (*ExplicitContentDetectionConfig) ProtoMessage() {} func (x *ExplicitContentDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +885,9 @@ type TextDetectionConfig struct { func (x *TextDetectionConfig) Reset() { *x = TextDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextDetectionConfig) String() string { @@ -916,7 +898,7 @@ func (*TextDetectionConfig) ProtoMessage() {} func (x *TextDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +943,9 @@ type VideoSegment struct { func (x *VideoSegment) Reset() { *x = VideoSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoSegment) String() string { @@ -976,7 +956,7 @@ func (*VideoSegment) ProtoMessage() {} func (x *VideoSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1019,11 +999,9 @@ type LabelSegment struct { func (x *LabelSegment) Reset() { *x = LabelSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelSegment) String() string { @@ -1034,7 +1012,7 @@ func (*LabelSegment) ProtoMessage() {} func (x *LabelSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,11 +1056,9 @@ type LabelFrame struct { func (x *LabelFrame) Reset() { *x = LabelFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelFrame) String() string { @@ -1093,7 +1069,7 @@ func (*LabelFrame) ProtoMessage() {} func (x *LabelFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1140,11 +1116,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -1155,7 +1129,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1214,11 +1188,9 @@ type LabelAnnotation struct { func (x *LabelAnnotation) Reset() { *x = LabelAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelAnnotation) String() string { @@ -1229,7 +1201,7 @@ func (*LabelAnnotation) ProtoMessage() {} func (x *LabelAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1294,11 +1266,9 @@ type ExplicitContentFrame struct { func (x *ExplicitContentFrame) Reset() { *x = ExplicitContentFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentFrame) String() string { @@ -1309,7 +1279,7 @@ func (*ExplicitContentFrame) ProtoMessage() {} func (x *ExplicitContentFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1354,11 +1324,9 @@ type ExplicitContentAnnotation struct { func (x *ExplicitContentAnnotation) Reset() { *x = ExplicitContentAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentAnnotation) String() string { @@ -1369,7 +1337,7 @@ func (*ExplicitContentAnnotation) ProtoMessage() {} func (x *ExplicitContentAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1418,11 +1386,9 @@ type NormalizedBoundingBox struct { func (x *NormalizedBoundingBox) Reset() { *x = NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingBox) String() string { @@ -1433,7 +1399,7 @@ func (*NormalizedBoundingBox) ProtoMessage() {} func (x *NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1458,9 @@ type FaceDetectionAnnotation struct { func (x *FaceDetectionAnnotation) Reset() { *x = FaceDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceDetectionAnnotation) String() string { @@ -1507,7 +1471,7 @@ func (*FaceDetectionAnnotation) ProtoMessage() {} func (x *FaceDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1557,11 +1521,9 @@ type PersonDetectionAnnotation struct { func (x *PersonDetectionAnnotation) Reset() { *x = PersonDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonDetectionAnnotation) String() string { @@ -1572,7 +1534,7 @@ func (*PersonDetectionAnnotation) ProtoMessage() {} func (x *PersonDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1613,11 +1575,9 @@ type FaceSegment struct { func (x *FaceSegment) Reset() { *x = FaceSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceSegment) String() string { @@ -1628,7 +1588,7 @@ func (*FaceSegment) ProtoMessage() {} func (x *FaceSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1669,11 +1629,9 @@ type FaceFrame struct { func (x *FaceFrame) Reset() { *x = FaceFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceFrame) String() string { @@ -1684,7 +1642,7 @@ func (*FaceFrame) ProtoMessage() {} func (x *FaceFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1689,9 @@ type FaceAnnotation struct { func (x *FaceAnnotation) Reset() { *x = FaceAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation) String() string { @@ -1746,7 +1702,7 @@ func (*FaceAnnotation) ProtoMessage() {} func (x *FaceAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1803,11 +1759,9 @@ type TimestampedObject struct { func (x *TimestampedObject) Reset() { *x = TimestampedObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampedObject) String() string { @@ -1818,7 +1772,7 @@ func (*TimestampedObject) ProtoMessage() {} func (x *TimestampedObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1879,11 +1833,9 @@ type Track struct { func (x *Track) Reset() { *x = Track{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Track) String() string { @@ -1894,7 +1846,7 @@ func (*Track) ProtoMessage() {} func (x *Track) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1955,11 +1907,9 @@ type DetectedAttribute struct { func (x *DetectedAttribute) Reset() { *x = DetectedAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectedAttribute) String() string { @@ -1970,7 +1920,7 @@ func (*DetectedAttribute) ProtoMessage() {} func (x *DetectedAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2024,11 +1974,9 @@ type DetectedLandmark struct { func (x *DetectedLandmark) Reset() { *x = DetectedLandmark{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectedLandmark) String() string { @@ -2039,7 +1987,7 @@ func (*DetectedLandmark) ProtoMessage() {} func (x *DetectedLandmark) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2137,11 +2085,9 @@ type VideoAnnotationResults struct { func (x *VideoAnnotationResults) Reset() { *x = VideoAnnotationResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationResults) String() string { @@ -2152,7 +2098,7 @@ func (*VideoAnnotationResults) ProtoMessage() {} func (x *VideoAnnotationResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2301,11 +2247,9 @@ type AnnotateVideoResponse struct { func (x *AnnotateVideoResponse) Reset() { *x = AnnotateVideoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoResponse) String() string { @@ -2316,7 +2260,7 @@ func (*AnnotateVideoResponse) ProtoMessage() {} func (x *AnnotateVideoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2364,11 +2308,9 @@ type VideoAnnotationProgress struct { func (x *VideoAnnotationProgress) Reset() { *x = VideoAnnotationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationProgress) String() string { @@ -2379,7 +2321,7 @@ func (*VideoAnnotationProgress) ProtoMessage() {} func (x *VideoAnnotationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2450,11 +2392,9 @@ type AnnotateVideoProgress struct { func (x *AnnotateVideoProgress) Reset() { *x = AnnotateVideoProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoProgress) String() string { @@ -2465,7 +2405,7 @@ func (*AnnotateVideoProgress) ProtoMessage() {} func (x *AnnotateVideoProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2542,11 +2482,9 @@ type SpeechTranscriptionConfig struct { func (x *SpeechTranscriptionConfig) Reset() { *x = SpeechTranscriptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechTranscriptionConfig) String() string { @@ -2557,7 +2495,7 @@ func (*SpeechTranscriptionConfig) ProtoMessage() {} func (x *SpeechTranscriptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2653,11 +2591,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -2668,7 +2604,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2709,11 +2645,9 @@ type SpeechTranscription struct { func (x *SpeechTranscription) Reset() { *x = SpeechTranscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechTranscription) String() string { @@ -2724,7 +2658,7 @@ func (*SpeechTranscription) ProtoMessage() {} func (x *SpeechTranscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2776,11 +2710,9 @@ type SpeechRecognitionAlternative struct { func (x *SpeechRecognitionAlternative) Reset() { *x = SpeechRecognitionAlternative{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionAlternative) String() string { @@ -2791,7 +2723,7 @@ func (*SpeechRecognitionAlternative) ProtoMessage() {} func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2863,11 +2795,9 @@ type WordInfo struct { func (x *WordInfo) Reset() { *x = WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WordInfo) String() string { @@ -2878,7 +2808,7 @@ func (*WordInfo) ProtoMessage() {} func (x *WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2944,11 +2874,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -2959,7 +2887,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3018,11 +2946,9 @@ type NormalizedBoundingPoly struct { func (x *NormalizedBoundingPoly) Reset() { *x = NormalizedBoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingPoly) String() string { @@ -3033,7 +2959,7 @@ func (*NormalizedBoundingPoly) ProtoMessage() {} func (x *NormalizedBoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3072,11 +2998,9 @@ type TextSegment struct { func (x *TextSegment) Reset() { *x = TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSegment) String() string { @@ -3087,7 +3011,7 @@ func (*TextSegment) ProtoMessage() {} func (x *TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3139,11 +3063,9 @@ type TextFrame struct { func (x *TextFrame) Reset() { *x = TextFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextFrame) String() string { @@ -3154,7 +3076,7 @@ func (*TextFrame) ProtoMessage() {} func (x *TextFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3201,11 +3123,9 @@ type TextAnnotation struct { func (x *TextAnnotation) Reset() { *x = TextAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation) String() string { @@ -3216,7 +3136,7 @@ func (*TextAnnotation) ProtoMessage() {} func (x *TextAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3267,11 +3187,9 @@ type ObjectTrackingFrame struct { func (x *ObjectTrackingFrame) Reset() { *x = ObjectTrackingFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingFrame) String() string { @@ -3282,7 +3200,7 @@ func (*ObjectTrackingFrame) ProtoMessage() {} func (x *ObjectTrackingFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3340,11 +3258,9 @@ type ObjectTrackingAnnotation struct { func (x *ObjectTrackingAnnotation) Reset() { *x = ObjectTrackingAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingAnnotation) String() string { @@ -3355,7 +3271,7 @@ func (*ObjectTrackingAnnotation) ProtoMessage() {} func (x *ObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3462,11 +3378,9 @@ type LogoRecognitionAnnotation struct { func (x *LogoRecognitionAnnotation) Reset() { *x = LogoRecognitionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogoRecognitionAnnotation) String() string { @@ -3477,7 +3391,7 @@ func (*LogoRecognitionAnnotation) ProtoMessage() {} func (x *LogoRecognitionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4405,524 +4319,6 @@ func file_google_cloud_videointelligence_v1_video_intelligence_proto_init() { if File_google_cloud_videointelligence_v1_video_intelligence_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LabelDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ShotChangeDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FaceDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PersonDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VideoSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LabelSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LabelFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*LabelAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*FaceDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PersonDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FaceSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*FaceFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*TimestampedObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*Track); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DetectedAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DetectedLandmark); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SpeechTranscriptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SpeechTranscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionAlternative); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TextFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*LogoRecognitionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_videointelligence_v1_video_intelligence_proto_msgTypes[41].OneofWrappers = []any{ (*ObjectTrackingAnnotation_Segment)(nil), (*ObjectTrackingAnnotation_TrackId)(nil), diff --git a/videointelligence/apiv1beta2/helpers.go b/videointelligence/apiv1beta2/helpers.go index 85e387c0cb73..43eda5d19350 100755 --- a/videointelligence/apiv1beta2/helpers.go +++ b/videointelligence/apiv1beta2/helpers.go @@ -18,10 +18,20 @@ package videointelligence import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "videointelligence.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/videointelligence/apiv1beta2/video_intelligence_client.go b/videointelligence/apiv1beta2/video_intelligence_client.go index c67b5da09637..7b37395f8fe4 100755 --- a/videointelligence/apiv1beta2/video_intelligence_client.go +++ b/videointelligence/apiv1beta2/video_intelligence_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" videointelligencepb "cloud.google.com/go/videointelligence/apiv1beta2/videointelligencepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -181,6 +180,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new video intelligence service client based on gRPC. @@ -207,6 +208,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: videointelligencepb.NewVideoIntelligenceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new video intelligence service rest client. @@ -286,6 +290,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +350,7 @@ func (c *gRPCClient) AnnotateVideo(ctx context.Context, req *videointelligencepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateVideo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateVideo, req, settings.GRPC, c.logger, "AnnotateVideo") return err }, opts...) if err != nil { @@ -394,21 +399,10 @@ func (c *restClient) AnnotateVideo(ctx context.Context, req *videointelligencepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateVideo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/videointelligence/apiv1beta2/videointelligencepb/video_intelligence.pb.go b/videointelligence/apiv1beta2/videointelligencepb/video_intelligence.pb.go index d773f9fcf65e..13e8ca7e340b 100755 --- a/videointelligence/apiv1beta2/videointelligencepb/video_intelligence.pb.go +++ b/videointelligence/apiv1beta2/videointelligencepb/video_intelligence.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/videointelligence/v1beta2/video_intelligence.proto @@ -270,11 +270,9 @@ type AnnotateVideoRequest struct { func (x *AnnotateVideoRequest) Reset() { *x = AnnotateVideoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoRequest) String() string { @@ -285,7 +283,7 @@ func (*AnnotateVideoRequest) ProtoMessage() {} func (x *AnnotateVideoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +362,9 @@ type VideoContext struct { func (x *VideoContext) Reset() { *x = VideoContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoContext) String() string { @@ -379,7 +375,7 @@ func (*VideoContext) ProtoMessage() {} func (x *VideoContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +447,9 @@ type LabelDetectionConfig struct { func (x *LabelDetectionConfig) Reset() { *x = LabelDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelDetectionConfig) String() string { @@ -466,7 +460,7 @@ func (*LabelDetectionConfig) ProtoMessage() {} func (x *LabelDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +510,9 @@ type ShotChangeDetectionConfig struct { func (x *ShotChangeDetectionConfig) Reset() { *x = ShotChangeDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShotChangeDetectionConfig) String() string { @@ -531,7 +523,7 @@ func (*ShotChangeDetectionConfig) ProtoMessage() {} func (x *ShotChangeDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -567,11 +559,9 @@ type ExplicitContentDetectionConfig struct { func (x *ExplicitContentDetectionConfig) Reset() { *x = ExplicitContentDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentDetectionConfig) String() string { @@ -582,7 +572,7 @@ func (*ExplicitContentDetectionConfig) ProtoMessage() {} func (x *ExplicitContentDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +610,9 @@ type FaceDetectionConfig struct { func (x *FaceDetectionConfig) Reset() { *x = FaceDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceDetectionConfig) String() string { @@ -635,7 +623,7 @@ func (*FaceDetectionConfig) ProtoMessage() {} func (x *FaceDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +668,9 @@ type VideoSegment struct { func (x *VideoSegment) Reset() { *x = VideoSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoSegment) String() string { @@ -695,7 +681,7 @@ func (*VideoSegment) ProtoMessage() {} func (x *VideoSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -738,11 +724,9 @@ type LabelSegment struct { func (x *LabelSegment) Reset() { *x = LabelSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelSegment) String() string { @@ -753,7 +737,7 @@ func (*LabelSegment) ProtoMessage() {} func (x *LabelSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +781,9 @@ type LabelFrame struct { func (x *LabelFrame) Reset() { *x = LabelFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelFrame) String() string { @@ -812,7 +794,7 @@ func (*LabelFrame) ProtoMessage() {} func (x *LabelFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -859,11 +841,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -874,7 +854,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -931,11 +911,9 @@ type LabelAnnotation struct { func (x *LabelAnnotation) Reset() { *x = LabelAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelAnnotation) String() string { @@ -946,7 +924,7 @@ func (*LabelAnnotation) ProtoMessage() {} func (x *LabelAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +982,9 @@ type ExplicitContentFrame struct { func (x *ExplicitContentFrame) Reset() { *x = ExplicitContentFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentFrame) String() string { @@ -1019,7 +995,7 @@ func (*ExplicitContentFrame) ProtoMessage() {} func (x *ExplicitContentFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1062,11 +1038,9 @@ type ExplicitContentAnnotation struct { func (x *ExplicitContentAnnotation) Reset() { *x = ExplicitContentAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentAnnotation) String() string { @@ -1077,7 +1051,7 @@ func (*ExplicitContentAnnotation) ProtoMessage() {} func (x *ExplicitContentAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1119,11 +1093,9 @@ type NormalizedBoundingBox struct { func (x *NormalizedBoundingBox) Reset() { *x = NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingBox) String() string { @@ -1134,7 +1106,7 @@ func (*NormalizedBoundingBox) ProtoMessage() {} func (x *NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1189,11 +1161,9 @@ type FaceSegment struct { func (x *FaceSegment) Reset() { *x = FaceSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceSegment) String() string { @@ -1204,7 +1174,7 @@ func (*FaceSegment) ProtoMessage() {} func (x *FaceSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1243,11 +1213,9 @@ type FaceFrame struct { func (x *FaceFrame) Reset() { *x = FaceFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceFrame) String() string { @@ -1258,7 +1226,7 @@ func (*FaceFrame) ProtoMessage() {} func (x *FaceFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1303,11 +1271,9 @@ type FaceAnnotation struct { func (x *FaceAnnotation) Reset() { *x = FaceAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation) String() string { @@ -1318,7 +1284,7 @@ func (*FaceAnnotation) ProtoMessage() {} func (x *FaceAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1385,11 +1351,9 @@ type VideoAnnotationResults struct { func (x *VideoAnnotationResults) Reset() { *x = VideoAnnotationResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationResults) String() string { @@ -1400,7 +1364,7 @@ func (*VideoAnnotationResults) ProtoMessage() {} func (x *VideoAnnotationResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1485,11 +1449,9 @@ type AnnotateVideoResponse struct { func (x *AnnotateVideoResponse) Reset() { *x = AnnotateVideoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoResponse) String() string { @@ -1500,7 +1462,7 @@ func (*AnnotateVideoResponse) ProtoMessage() {} func (x *AnnotateVideoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1542,11 +1504,9 @@ type VideoAnnotationProgress struct { func (x *VideoAnnotationProgress) Reset() { *x = VideoAnnotationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationProgress) String() string { @@ -1557,7 +1517,7 @@ func (*VideoAnnotationProgress) ProtoMessage() {} func (x *VideoAnnotationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1614,11 +1574,9 @@ type AnnotateVideoProgress struct { func (x *AnnotateVideoProgress) Reset() { *x = AnnotateVideoProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoProgress) String() string { @@ -1629,7 +1587,7 @@ func (*AnnotateVideoProgress) ProtoMessage() {} func (x *AnnotateVideoProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2106,260 +2064,6 @@ func file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_init() if File_google_cloud_videointelligence_v1beta2_video_intelligence_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LabelDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ShotChangeDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*FaceDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VideoSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LabelSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LabelFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LabelAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*FaceSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*FaceFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1beta2_video_intelligence_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/videointelligence/apiv1p3beta1/helpers.go b/videointelligence/apiv1p3beta1/helpers.go index 85e387c0cb73..43eda5d19350 100755 --- a/videointelligence/apiv1p3beta1/helpers.go +++ b/videointelligence/apiv1p3beta1/helpers.go @@ -18,10 +18,20 @@ package videointelligence import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "videointelligence.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/videointelligence/apiv1p3beta1/streaming_video_intelligence_client.go b/videointelligence/apiv1p3beta1/streaming_video_intelligence_client.go index 24feb4efc4ff..b0b6a1f81882 100755 --- a/videointelligence/apiv1p3beta1/streaming_video_intelligence_client.go +++ b/videointelligence/apiv1p3beta1/streaming_video_intelligence_client.go @@ -18,6 +18,7 @@ package videointelligence import ( "context" + "log/slog" "math" "time" @@ -134,6 +135,8 @@ type streamingVideoIntelligenceGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewStreamingVideoIntelligenceClient creates a new streaming video intelligence service client based on gRPC. @@ -160,6 +163,7 @@ func NewStreamingVideoIntelligenceClient(ctx context.Context, opts ...option.Cli connPool: connPool, streamingVideoIntelligenceClient: videointelligencepb.NewStreamingVideoIntelligenceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -199,7 +203,9 @@ func (c *streamingVideoIntelligenceGRPCClient) StreamingAnnotateVideo(ctx contex opts = append((*c.CallOptions).StreamingAnnotateVideo[0:len((*c.CallOptions).StreamingAnnotateVideo):len((*c.CallOptions).StreamingAnnotateVideo)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "StreamingAnnotateVideo") resp, err = c.streamingVideoIntelligenceClient.StreamingAnnotateVideo(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "StreamingAnnotateVideo") return err }, opts...) if err != nil { diff --git a/videointelligence/apiv1p3beta1/video_intelligence_client.go b/videointelligence/apiv1p3beta1/video_intelligence_client.go index adf1eb06daf4..41ecde8896a3 100755 --- a/videointelligence/apiv1p3beta1/video_intelligence_client.go +++ b/videointelligence/apiv1p3beta1/video_intelligence_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" videointelligencepb "cloud.google.com/go/videointelligence/apiv1p3beta1/videointelligencepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -181,6 +180,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new video intelligence service client based on gRPC. @@ -207,6 +208,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: videointelligencepb.NewVideoIntelligenceServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -269,6 +271,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new video intelligence service rest client. @@ -286,6 +290,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -345,7 +350,7 @@ func (c *gRPCClient) AnnotateVideo(ctx context.Context, req *videointelligencepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AnnotateVideo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AnnotateVideo, req, settings.GRPC, c.logger, "AnnotateVideo") return err }, opts...) if err != nil { @@ -394,21 +399,10 @@ func (c *restClient) AnnotateVideo(ctx context.Context, req *videointelligencepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnnotateVideo") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/videointelligence/apiv1p3beta1/videointelligencepb/video_intelligence.pb.go b/videointelligence/apiv1p3beta1/videointelligencepb/video_intelligence.pb.go index c42046a41b08..7e2d3b97e349 100755 --- a/videointelligence/apiv1p3beta1/videointelligencepb/video_intelligence.pb.go +++ b/videointelligence/apiv1p3beta1/videointelligencepb/video_intelligence.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/videointelligence/v1p3beta1/video_intelligence.proto @@ -367,11 +367,9 @@ type AnnotateVideoRequest struct { func (x *AnnotateVideoRequest) Reset() { *x = AnnotateVideoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoRequest) String() string { @@ -382,7 +380,7 @@ func (*AnnotateVideoRequest) ProtoMessage() {} func (x *AnnotateVideoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -469,11 +467,9 @@ type VideoContext struct { func (x *VideoContext) Reset() { *x = VideoContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoContext) String() string { @@ -484,7 +480,7 @@ func (*VideoContext) ProtoMessage() {} func (x *VideoContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -598,11 +594,9 @@ type LabelDetectionConfig struct { func (x *LabelDetectionConfig) Reset() { *x = LabelDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelDetectionConfig) String() string { @@ -613,7 +607,7 @@ func (*LabelDetectionConfig) ProtoMessage() {} func (x *LabelDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -677,11 +671,9 @@ type ShotChangeDetectionConfig struct { func (x *ShotChangeDetectionConfig) Reset() { *x = ShotChangeDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShotChangeDetectionConfig) String() string { @@ -692,7 +684,7 @@ func (*ShotChangeDetectionConfig) ProtoMessage() {} func (x *ShotChangeDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -728,11 +720,9 @@ type ObjectTrackingConfig struct { func (x *ObjectTrackingConfig) Reset() { *x = ObjectTrackingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingConfig) String() string { @@ -743,7 +733,7 @@ func (*ObjectTrackingConfig) ProtoMessage() {} func (x *ObjectTrackingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,11 +769,9 @@ type ExplicitContentDetectionConfig struct { func (x *ExplicitContentDetectionConfig) Reset() { *x = ExplicitContentDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentDetectionConfig) String() string { @@ -794,7 +782,7 @@ func (*ExplicitContentDetectionConfig) ProtoMessage() {} func (x *ExplicitContentDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -835,11 +823,9 @@ type FaceDetectionConfig struct { func (x *FaceDetectionConfig) Reset() { *x = FaceDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceDetectionConfig) String() string { @@ -850,7 +836,7 @@ func (*FaceDetectionConfig) ProtoMessage() {} func (x *FaceDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,11 +893,9 @@ type PersonDetectionConfig struct { func (x *PersonDetectionConfig) Reset() { *x = PersonDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonDetectionConfig) String() string { @@ -922,7 +906,7 @@ func (*PersonDetectionConfig) ProtoMessage() {} func (x *PersonDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +962,9 @@ type TextDetectionConfig struct { func (x *TextDetectionConfig) Reset() { *x = TextDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextDetectionConfig) String() string { @@ -993,7 +975,7 @@ func (*TextDetectionConfig) ProtoMessage() {} func (x *TextDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1038,11 +1020,9 @@ type VideoSegment struct { func (x *VideoSegment) Reset() { *x = VideoSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoSegment) String() string { @@ -1053,7 +1033,7 @@ func (*VideoSegment) ProtoMessage() {} func (x *VideoSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1096,11 +1076,9 @@ type LabelSegment struct { func (x *LabelSegment) Reset() { *x = LabelSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelSegment) String() string { @@ -1111,7 +1089,7 @@ func (*LabelSegment) ProtoMessage() {} func (x *LabelSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1155,11 +1133,9 @@ type LabelFrame struct { func (x *LabelFrame) Reset() { *x = LabelFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelFrame) String() string { @@ -1170,7 +1146,7 @@ func (*LabelFrame) ProtoMessage() {} func (x *LabelFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,11 +1193,9 @@ type Entity struct { func (x *Entity) Reset() { *x = Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Entity) String() string { @@ -1232,7 +1206,7 @@ func (*Entity) ProtoMessage() {} func (x *Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1263,9 @@ type LabelAnnotation struct { func (x *LabelAnnotation) Reset() { *x = LabelAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LabelAnnotation) String() string { @@ -1304,7 +1276,7 @@ func (*LabelAnnotation) ProtoMessage() {} func (x *LabelAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1362,11 +1334,9 @@ type ExplicitContentFrame struct { func (x *ExplicitContentFrame) Reset() { *x = ExplicitContentFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentFrame) String() string { @@ -1377,7 +1347,7 @@ func (*ExplicitContentFrame) ProtoMessage() {} func (x *ExplicitContentFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1420,11 +1390,9 @@ type ExplicitContentAnnotation struct { func (x *ExplicitContentAnnotation) Reset() { *x = ExplicitContentAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExplicitContentAnnotation) String() string { @@ -1435,7 +1403,7 @@ func (*ExplicitContentAnnotation) ProtoMessage() {} func (x *ExplicitContentAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1477,11 +1445,9 @@ type NormalizedBoundingBox struct { func (x *NormalizedBoundingBox) Reset() { *x = NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingBox) String() string { @@ -1492,7 +1458,7 @@ func (*NormalizedBoundingBox) ProtoMessage() {} func (x *NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,11 +1522,9 @@ type TimestampedObject struct { func (x *TimestampedObject) Reset() { *x = TimestampedObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TimestampedObject) String() string { @@ -1571,7 +1535,7 @@ func (*TimestampedObject) ProtoMessage() {} func (x *TimestampedObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1632,11 +1596,9 @@ type Track struct { func (x *Track) Reset() { *x = Track{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Track) String() string { @@ -1647,7 +1609,7 @@ func (*Track) ProtoMessage() {} func (x *Track) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1708,11 +1670,9 @@ type DetectedAttribute struct { func (x *DetectedAttribute) Reset() { *x = DetectedAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectedAttribute) String() string { @@ -1723,7 +1683,7 @@ func (*DetectedAttribute) ProtoMessage() {} func (x *DetectedAttribute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1779,11 +1739,9 @@ type Celebrity struct { func (x *Celebrity) Reset() { *x = Celebrity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Celebrity) String() string { @@ -1794,7 +1752,7 @@ func (*Celebrity) ProtoMessage() {} func (x *Celebrity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1845,11 +1803,9 @@ type CelebrityTrack struct { func (x *CelebrityTrack) Reset() { *x = CelebrityTrack{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CelebrityTrack) String() string { @@ -1860,7 +1816,7 @@ func (*CelebrityTrack) ProtoMessage() {} func (x *CelebrityTrack) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1858,9 @@ type CelebrityRecognitionAnnotation struct { func (x *CelebrityRecognitionAnnotation) Reset() { *x = CelebrityRecognitionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CelebrityRecognitionAnnotation) String() string { @@ -1917,7 +1871,7 @@ func (*CelebrityRecognitionAnnotation) ProtoMessage() {} func (x *CelebrityRecognitionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1957,11 +1911,9 @@ type DetectedLandmark struct { func (x *DetectedLandmark) Reset() { *x = DetectedLandmark{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DetectedLandmark) String() string { @@ -1972,7 +1924,7 @@ func (*DetectedLandmark) ProtoMessage() {} func (x *DetectedLandmark) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2022,11 +1974,9 @@ type FaceDetectionAnnotation struct { func (x *FaceDetectionAnnotation) Reset() { *x = FaceDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceDetectionAnnotation) String() string { @@ -2037,7 +1987,7 @@ func (*FaceDetectionAnnotation) ProtoMessage() {} func (x *FaceDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2078,11 +2028,9 @@ type PersonDetectionAnnotation struct { func (x *PersonDetectionAnnotation) Reset() { *x = PersonDetectionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonDetectionAnnotation) String() string { @@ -2093,7 +2041,7 @@ func (*PersonDetectionAnnotation) ProtoMessage() {} func (x *PersonDetectionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2175,11 +2123,9 @@ type VideoAnnotationResults struct { func (x *VideoAnnotationResults) Reset() { *x = VideoAnnotationResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationResults) String() string { @@ -2190,7 +2136,7 @@ func (*VideoAnnotationResults) ProtoMessage() {} func (x *VideoAnnotationResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2338,11 +2284,9 @@ type AnnotateVideoResponse struct { func (x *AnnotateVideoResponse) Reset() { *x = AnnotateVideoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoResponse) String() string { @@ -2353,7 +2297,7 @@ func (*AnnotateVideoResponse) ProtoMessage() {} func (x *AnnotateVideoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2401,11 +2345,9 @@ type VideoAnnotationProgress struct { func (x *VideoAnnotationProgress) Reset() { *x = VideoAnnotationProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoAnnotationProgress) String() string { @@ -2416,7 +2358,7 @@ func (*VideoAnnotationProgress) ProtoMessage() {} func (x *VideoAnnotationProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2487,11 +2429,9 @@ type AnnotateVideoProgress struct { func (x *AnnotateVideoProgress) Reset() { *x = AnnotateVideoProgress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateVideoProgress) String() string { @@ -2502,7 +2442,7 @@ func (*AnnotateVideoProgress) ProtoMessage() {} func (x *AnnotateVideoProgress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2579,11 +2519,9 @@ type SpeechTranscriptionConfig struct { func (x *SpeechTranscriptionConfig) Reset() { *x = SpeechTranscriptionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechTranscriptionConfig) String() string { @@ -2594,7 +2532,7 @@ func (*SpeechTranscriptionConfig) ProtoMessage() {} func (x *SpeechTranscriptionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2690,11 +2628,9 @@ type SpeechContext struct { func (x *SpeechContext) Reset() { *x = SpeechContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechContext) String() string { @@ -2705,7 +2641,7 @@ func (*SpeechContext) ProtoMessage() {} func (x *SpeechContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2746,11 +2682,9 @@ type SpeechTranscription struct { func (x *SpeechTranscription) Reset() { *x = SpeechTranscription{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechTranscription) String() string { @@ -2761,7 +2695,7 @@ func (*SpeechTranscription) ProtoMessage() {} func (x *SpeechTranscription) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2813,11 +2747,9 @@ type SpeechRecognitionAlternative struct { func (x *SpeechRecognitionAlternative) Reset() { *x = SpeechRecognitionAlternative{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SpeechRecognitionAlternative) String() string { @@ -2828,7 +2760,7 @@ func (*SpeechRecognitionAlternative) ProtoMessage() {} func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2900,11 +2832,9 @@ type WordInfo struct { func (x *WordInfo) Reset() { *x = WordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WordInfo) String() string { @@ -2915,7 +2845,7 @@ func (*WordInfo) ProtoMessage() {} func (x *WordInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2981,11 +2911,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -2996,7 +2924,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3055,11 +2983,9 @@ type NormalizedBoundingPoly struct { func (x *NormalizedBoundingPoly) Reset() { *x = NormalizedBoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedBoundingPoly) String() string { @@ -3070,7 +2996,7 @@ func (*NormalizedBoundingPoly) ProtoMessage() {} func (x *NormalizedBoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3109,11 +3035,9 @@ type TextSegment struct { func (x *TextSegment) Reset() { *x = TextSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextSegment) String() string { @@ -3124,7 +3048,7 @@ func (*TextSegment) ProtoMessage() {} func (x *TextSegment) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3176,11 +3100,9 @@ type TextFrame struct { func (x *TextFrame) Reset() { *x = TextFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextFrame) String() string { @@ -3191,7 +3113,7 @@ func (*TextFrame) ProtoMessage() {} func (x *TextFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3236,11 +3158,9 @@ type TextAnnotation struct { func (x *TextAnnotation) Reset() { *x = TextAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation) String() string { @@ -3251,7 +3171,7 @@ func (*TextAnnotation) ProtoMessage() {} func (x *TextAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3295,11 +3215,9 @@ type ObjectTrackingFrame struct { func (x *ObjectTrackingFrame) Reset() { *x = ObjectTrackingFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingFrame) String() string { @@ -3310,7 +3228,7 @@ func (*ObjectTrackingFrame) ProtoMessage() {} func (x *ObjectTrackingFrame) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3366,11 +3284,9 @@ type ObjectTrackingAnnotation struct { func (x *ObjectTrackingAnnotation) Reset() { *x = ObjectTrackingAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectTrackingAnnotation) String() string { @@ -3381,7 +3297,7 @@ func (*ObjectTrackingAnnotation) ProtoMessage() {} func (x *ObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3481,11 +3397,9 @@ type LogoRecognitionAnnotation struct { func (x *LogoRecognitionAnnotation) Reset() { *x = LogoRecognitionAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogoRecognitionAnnotation) String() string { @@ -3496,7 +3410,7 @@ func (*LogoRecognitionAnnotation) ProtoMessage() {} func (x *LogoRecognitionAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3553,11 +3467,9 @@ type StreamingAnnotateVideoRequest struct { func (x *StreamingAnnotateVideoRequest) Reset() { *x = StreamingAnnotateVideoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnnotateVideoRequest) String() string { @@ -3568,7 +3480,7 @@ func (*StreamingAnnotateVideoRequest) ProtoMessage() {} func (x *StreamingAnnotateVideoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3659,11 +3571,9 @@ type StreamingVideoConfig struct { func (x *StreamingVideoConfig) Reset() { *x = StreamingVideoConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingVideoConfig) String() string { @@ -3674,7 +3584,7 @@ func (*StreamingVideoConfig) ProtoMessage() {} func (x *StreamingVideoConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3835,11 +3745,9 @@ type StreamingAnnotateVideoResponse struct { func (x *StreamingAnnotateVideoResponse) Reset() { *x = StreamingAnnotateVideoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAnnotateVideoResponse) String() string { @@ -3850,7 +3758,7 @@ func (*StreamingAnnotateVideoResponse) ProtoMessage() {} func (x *StreamingAnnotateVideoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3905,11 +3813,9 @@ type StreamingVideoAnnotationResults struct { func (x *StreamingVideoAnnotationResults) Reset() { *x = StreamingVideoAnnotationResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingVideoAnnotationResults) String() string { @@ -3920,7 +3826,7 @@ func (*StreamingVideoAnnotationResults) ProtoMessage() {} func (x *StreamingVideoAnnotationResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3972,11 +3878,9 @@ type StreamingShotChangeDetectionConfig struct { func (x *StreamingShotChangeDetectionConfig) Reset() { *x = StreamingShotChangeDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingShotChangeDetectionConfig) String() string { @@ -3987,7 +3891,7 @@ func (*StreamingShotChangeDetectionConfig) ProtoMessage() {} func (x *StreamingShotChangeDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4016,11 +3920,9 @@ type StreamingLabelDetectionConfig struct { func (x *StreamingLabelDetectionConfig) Reset() { *x = StreamingLabelDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingLabelDetectionConfig) String() string { @@ -4031,7 +3933,7 @@ func (*StreamingLabelDetectionConfig) ProtoMessage() {} func (x *StreamingLabelDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4062,11 +3964,9 @@ type StreamingExplicitContentDetectionConfig struct { func (x *StreamingExplicitContentDetectionConfig) Reset() { *x = StreamingExplicitContentDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingExplicitContentDetectionConfig) String() string { @@ -4077,7 +3977,7 @@ func (*StreamingExplicitContentDetectionConfig) ProtoMessage() {} func (x *StreamingExplicitContentDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4101,11 +4001,9 @@ type StreamingObjectTrackingConfig struct { func (x *StreamingObjectTrackingConfig) Reset() { *x = StreamingObjectTrackingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingObjectTrackingConfig) String() string { @@ -4116,7 +4014,7 @@ func (*StreamingObjectTrackingConfig) ProtoMessage() {} func (x *StreamingObjectTrackingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4144,11 +4042,9 @@ type StreamingAutomlActionRecognitionConfig struct { func (x *StreamingAutomlActionRecognitionConfig) Reset() { *x = StreamingAutomlActionRecognitionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAutomlActionRecognitionConfig) String() string { @@ -4159,7 +4055,7 @@ func (*StreamingAutomlActionRecognitionConfig) ProtoMessage() {} func (x *StreamingAutomlActionRecognitionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4195,11 +4091,9 @@ type StreamingAutomlClassificationConfig struct { func (x *StreamingAutomlClassificationConfig) Reset() { *x = StreamingAutomlClassificationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAutomlClassificationConfig) String() string { @@ -4210,7 +4104,7 @@ func (*StreamingAutomlClassificationConfig) ProtoMessage() {} func (x *StreamingAutomlClassificationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4245,11 +4139,9 @@ type StreamingAutomlObjectTrackingConfig struct { func (x *StreamingAutomlObjectTrackingConfig) Reset() { *x = StreamingAutomlObjectTrackingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingAutomlObjectTrackingConfig) String() string { @@ -4260,7 +4152,7 @@ func (*StreamingAutomlObjectTrackingConfig) ProtoMessage() {} func (x *StreamingAutomlObjectTrackingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4305,11 +4197,9 @@ type StreamingStorageConfig struct { func (x *StreamingStorageConfig) Reset() { *x = StreamingStorageConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamingStorageConfig) String() string { @@ -4320,7 +4210,7 @@ func (*StreamingStorageConfig) ProtoMessage() {} func (x *StreamingStorageConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4363,11 +4253,9 @@ type CelebrityTrack_RecognizedCelebrity struct { func (x *CelebrityTrack_RecognizedCelebrity) Reset() { *x = CelebrityTrack_RecognizedCelebrity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CelebrityTrack_RecognizedCelebrity) String() string { @@ -4378,7 +4266,7 @@ func (*CelebrityTrack_RecognizedCelebrity) ProtoMessage() {} func (x *CelebrityTrack_RecognizedCelebrity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5574,680 +5462,6 @@ func file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_init if File_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*VideoContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LabelDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ShotChangeDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*FaceDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PersonDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*VideoSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LabelSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LabelFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*LabelAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ExplicitContentAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TimestampedObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Track); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DetectedAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*Celebrity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CelebrityTrack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CelebrityRecognitionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DetectedLandmark); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*FaceDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*PersonDetectionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*VideoAnnotationProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateVideoProgress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*SpeechTranscriptionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SpeechContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*SpeechTranscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*SpeechRecognitionAlternative); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*WordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedBoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*TextSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*TextFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ObjectTrackingAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*LogoRecognitionAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnnotateVideoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*StreamingVideoConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAnnotateVideoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*StreamingVideoAnnotationResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*StreamingShotChangeDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*StreamingLabelDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*StreamingExplicitContentDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*StreamingObjectTrackingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAutomlActionRecognitionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAutomlClassificationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*StreamingAutomlObjectTrackingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*StreamingStorageConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*CelebrityTrack_RecognizedCelebrity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_videointelligence_v1p3beta1_video_intelligence_proto_msgTypes[41].OneofWrappers = []any{ (*ObjectTrackingAnnotation_Segment)(nil), (*ObjectTrackingAnnotation_TrackId)(nil), diff --git a/vision/apiv1/helpers.go b/vision/apiv1/helpers.go index a9679971aabb..22f53cc7fd34 100755 --- a/vision/apiv1/helpers.go +++ b/vision/apiv1/helpers.go @@ -18,10 +18,20 @@ package vision import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "vision.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-vision", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vision/apiv1/image_annotator_client.go b/vision/apiv1/image_annotator_client.go index e4a010d45413..ffad3943bc5e 100755 --- a/vision/apiv1/image_annotator_client.go +++ b/vision/apiv1/image_annotator_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionpb "cloud.google.com/go/vision/v2/apiv1/visionpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -313,6 +312,8 @@ type imageAnnotatorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewImageAnnotatorClient creates a new image annotator client based on gRPC. @@ -341,6 +342,7 @@ func NewImageAnnotatorClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, imageAnnotatorClient: visionpb.NewImageAnnotatorClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -404,6 +406,8 @@ type imageAnnotatorRESTClient struct { // Points back to the CallOptions field of the containing ImageAnnotatorClient CallOptions **ImageAnnotatorCallOptions + + logger *slog.Logger } // NewImageAnnotatorRESTClient creates a new image annotator rest client. @@ -423,6 +427,7 @@ func NewImageAnnotatorRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -485,7 +490,7 @@ func (c *imageAnnotatorGRPCClient) BatchAnnotateImages(ctx context.Context, req var resp *visionpb.BatchAnnotateImagesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageAnnotatorClient.BatchAnnotateImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageAnnotatorClient.BatchAnnotateImages, req, settings.GRPC, c.logger, "BatchAnnotateImages") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *imageAnnotatorGRPCClient) BatchAnnotateFiles(ctx context.Context, req * var resp *visionpb.BatchAnnotateFilesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageAnnotatorClient.BatchAnnotateFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageAnnotatorClient.BatchAnnotateFiles, req, settings.GRPC, c.logger, "BatchAnnotateFiles") return err }, opts...) if err != nil { @@ -521,7 +526,7 @@ func (c *imageAnnotatorGRPCClient) AsyncBatchAnnotateImages(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageAnnotatorClient.AsyncBatchAnnotateImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageAnnotatorClient.AsyncBatchAnnotateImages, req, settings.GRPC, c.logger, "AsyncBatchAnnotateImages") return err }, opts...) if err != nil { @@ -541,7 +546,7 @@ func (c *imageAnnotatorGRPCClient) AsyncBatchAnnotateFiles(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageAnnotatorClient.AsyncBatchAnnotateFiles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageAnnotatorClient.AsyncBatchAnnotateFiles, req, settings.GRPC, c.logger, "AsyncBatchAnnotateFiles") return err }, opts...) if err != nil { @@ -561,7 +566,7 @@ func (c *imageAnnotatorGRPCClient) GetOperation(ctx context.Context, req *longru var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -609,17 +614,7 @@ func (c *imageAnnotatorRESTClient) BatchAnnotateImages(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchAnnotateImages") if err != nil { return err } @@ -681,17 +676,7 @@ func (c *imageAnnotatorRESTClient) BatchAnnotateFiles(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchAnnotateFiles") if err != nil { return err } @@ -754,21 +739,10 @@ func (c *imageAnnotatorRESTClient) AsyncBatchAnnotateImages(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AsyncBatchAnnotateImages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -829,21 +803,10 @@ func (c *imageAnnotatorRESTClient) AsyncBatchAnnotateFiles(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AsyncBatchAnnotateFiles") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -894,17 +857,7 @@ func (c *imageAnnotatorRESTClient) GetOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/vision/apiv1/product_search_client.go b/vision/apiv1/product_search_client.go index 2e9874cc43b3..532ab6b87a2f 100755 --- a/vision/apiv1/product_search_client.go +++ b/vision/apiv1/product_search_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionpb "cloud.google.com/go/vision/v2/apiv1/visionpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -876,6 +875,8 @@ type productSearchGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewProductSearchClient creates a new product search client based on gRPC. @@ -917,6 +918,7 @@ func NewProductSearchClient(ctx context.Context, opts ...option.ClientOption) (* connPool: connPool, productSearchClient: visionpb.NewProductSearchClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -980,6 +982,8 @@ type productSearchRESTClient struct { // Points back to the CallOptions field of the containing ProductSearchClient CallOptions **ProductSearchCallOptions + + logger *slog.Logger } // NewProductSearchRESTClient creates a new product search rest client. @@ -1012,6 +1016,7 @@ func NewProductSearchRESTClient(ctx context.Context, opts ...option.ClientOption endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1074,7 +1079,7 @@ func (c *productSearchGRPCClient) CreateProductSet(ctx context.Context, req *vis var resp *visionpb.ProductSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.CreateProductSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.CreateProductSet, req, settings.GRPC, c.logger, "CreateProductSet") return err }, opts...) if err != nil { @@ -1103,7 +1108,7 @@ func (c *productSearchGRPCClient) ListProductSets(ctx context.Context, req *visi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.ListProductSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.ListProductSets, req, settings.GRPC, c.logger, "ListProductSets") return err }, opts...) if err != nil { @@ -1138,7 +1143,7 @@ func (c *productSearchGRPCClient) GetProductSet(ctx context.Context, req *vision var resp *visionpb.ProductSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.GetProductSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.GetProductSet, req, settings.GRPC, c.logger, "GetProductSet") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *productSearchGRPCClient) UpdateProductSet(ctx context.Context, req *vis var resp *visionpb.ProductSet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.UpdateProductSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.UpdateProductSet, req, settings.GRPC, c.logger, "UpdateProductSet") return err }, opts...) if err != nil { @@ -1173,7 +1178,7 @@ func (c *productSearchGRPCClient) DeleteProductSet(ctx context.Context, req *vis opts = append((*c.CallOptions).DeleteProductSet[0:len((*c.CallOptions).DeleteProductSet):len((*c.CallOptions).DeleteProductSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productSearchClient.DeleteProductSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productSearchClient.DeleteProductSet, req, settings.GRPC, c.logger, "DeleteProductSet") return err }, opts...) return err @@ -1188,7 +1193,7 @@ func (c *productSearchGRPCClient) CreateProduct(ctx context.Context, req *vision var resp *visionpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.CreateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.CreateProduct, req, settings.GRPC, c.logger, "CreateProduct") return err }, opts...) if err != nil { @@ -1217,7 +1222,7 @@ func (c *productSearchGRPCClient) ListProducts(ctx context.Context, req *visionp } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.ListProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.ListProducts, req, settings.GRPC, c.logger, "ListProducts") return err }, opts...) if err != nil { @@ -1252,7 +1257,7 @@ func (c *productSearchGRPCClient) GetProduct(ctx context.Context, req *visionpb. var resp *visionpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.GetProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.GetProduct, req, settings.GRPC, c.logger, "GetProduct") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *productSearchGRPCClient) UpdateProduct(ctx context.Context, req *vision var resp *visionpb.Product err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.UpdateProduct(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.UpdateProduct, req, settings.GRPC, c.logger, "UpdateProduct") return err }, opts...) if err != nil { @@ -1287,7 +1292,7 @@ func (c *productSearchGRPCClient) DeleteProduct(ctx context.Context, req *vision opts = append((*c.CallOptions).DeleteProduct[0:len((*c.CallOptions).DeleteProduct):len((*c.CallOptions).DeleteProduct)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productSearchClient.DeleteProduct(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productSearchClient.DeleteProduct, req, settings.GRPC, c.logger, "DeleteProduct") return err }, opts...) return err @@ -1302,7 +1307,7 @@ func (c *productSearchGRPCClient) CreateReferenceImage(ctx context.Context, req var resp *visionpb.ReferenceImage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.CreateReferenceImage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.CreateReferenceImage, req, settings.GRPC, c.logger, "CreateReferenceImage") return err }, opts...) if err != nil { @@ -1319,7 +1324,7 @@ func (c *productSearchGRPCClient) DeleteReferenceImage(ctx context.Context, req opts = append((*c.CallOptions).DeleteReferenceImage[0:len((*c.CallOptions).DeleteReferenceImage):len((*c.CallOptions).DeleteReferenceImage)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productSearchClient.DeleteReferenceImage(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productSearchClient.DeleteReferenceImage, req, settings.GRPC, c.logger, "DeleteReferenceImage") return err }, opts...) return err @@ -1345,7 +1350,7 @@ func (c *productSearchGRPCClient) ListReferenceImages(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.ListReferenceImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.ListReferenceImages, req, settings.GRPC, c.logger, "ListReferenceImages") return err }, opts...) if err != nil { @@ -1380,7 +1385,7 @@ func (c *productSearchGRPCClient) GetReferenceImage(ctx context.Context, req *vi var resp *visionpb.ReferenceImage err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.GetReferenceImage(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.GetReferenceImage, req, settings.GRPC, c.logger, "GetReferenceImage") return err }, opts...) if err != nil { @@ -1397,7 +1402,7 @@ func (c *productSearchGRPCClient) AddProductToProductSet(ctx context.Context, re opts = append((*c.CallOptions).AddProductToProductSet[0:len((*c.CallOptions).AddProductToProductSet):len((*c.CallOptions).AddProductToProductSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productSearchClient.AddProductToProductSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productSearchClient.AddProductToProductSet, req, settings.GRPC, c.logger, "AddProductToProductSet") return err }, opts...) return err @@ -1411,7 +1416,7 @@ func (c *productSearchGRPCClient) RemoveProductFromProductSet(ctx context.Contex opts = append((*c.CallOptions).RemoveProductFromProductSet[0:len((*c.CallOptions).RemoveProductFromProductSet):len((*c.CallOptions).RemoveProductFromProductSet)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.productSearchClient.RemoveProductFromProductSet(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.productSearchClient.RemoveProductFromProductSet, req, settings.GRPC, c.logger, "RemoveProductFromProductSet") return err }, opts...) return err @@ -1437,7 +1442,7 @@ func (c *productSearchGRPCClient) ListProductsInProductSet(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.ListProductsInProductSet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.ListProductsInProductSet, req, settings.GRPC, c.logger, "ListProductsInProductSet") return err }, opts...) if err != nil { @@ -1472,7 +1477,7 @@ func (c *productSearchGRPCClient) ImportProductSets(ctx context.Context, req *vi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.ImportProductSets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.ImportProductSets, req, settings.GRPC, c.logger, "ImportProductSets") return err }, opts...) if err != nil { @@ -1492,7 +1497,7 @@ func (c *productSearchGRPCClient) PurgeProducts(ctx context.Context, req *vision var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.productSearchClient.PurgeProducts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.productSearchClient.PurgeProducts, req, settings.GRPC, c.logger, "PurgeProducts") return err }, opts...) if err != nil { @@ -1512,7 +1517,7 @@ func (c *productSearchGRPCClient) GetOperation(ctx context.Context, req *longrun var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1569,17 +1574,7 @@ func (c *productSearchRESTClient) CreateProductSet(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProductSet") if err != nil { return err } @@ -1646,21 +1641,10 @@ func (c *productSearchRESTClient) ListProductSets(ctx context.Context, req *visi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProductSets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1727,17 +1711,7 @@ func (c *productSearchRESTClient) GetProductSet(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProductSet") if err != nil { return err } @@ -1809,17 +1783,7 @@ func (c *productSearchRESTClient) UpdateProductSet(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProductSet") if err != nil { return err } @@ -1869,15 +1833,8 @@ func (c *productSearchRESTClient) DeleteProductSet(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProductSet") + return err }, opts...) } @@ -1933,17 +1890,7 @@ func (c *productSearchRESTClient) CreateProduct(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProduct") if err != nil { return err } @@ -2009,21 +1956,10 @@ func (c *productSearchRESTClient) ListProducts(ctx context.Context, req *visionp } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProducts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2090,17 +2026,7 @@ func (c *productSearchRESTClient) GetProduct(ctx context.Context, req *visionpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProduct") if err != nil { return err } @@ -2181,17 +2107,7 @@ func (c *productSearchRESTClient) UpdateProduct(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProduct") if err != nil { return err } @@ -2242,15 +2158,8 @@ func (c *productSearchRESTClient) DeleteProduct(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProduct") + return err }, opts...) } @@ -2318,17 +2227,7 @@ func (c *productSearchRESTClient) CreateReferenceImage(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateReferenceImage") if err != nil { return err } @@ -2381,15 +2280,8 @@ func (c *productSearchRESTClient) DeleteReferenceImage(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteReferenceImage") + return err }, opts...) } @@ -2445,21 +2337,10 @@ func (c *productSearchRESTClient) ListReferenceImages(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReferenceImages") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2526,17 +2407,7 @@ func (c *productSearchRESTClient) GetReferenceImage(ctx context.Context, req *vi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReferenceImage") if err != nil { return err } @@ -2596,15 +2467,8 @@ func (c *productSearchRESTClient) AddProductToProductSet(ctx context.Context, re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddProductToProductSet") + return err }, opts...) } @@ -2644,15 +2508,8 @@ func (c *productSearchRESTClient) RemoveProductFromProductSet(ctx context.Contex httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveProductFromProductSet") + return err }, opts...) } @@ -2707,21 +2564,10 @@ func (c *productSearchRESTClient) ListProductsInProductSet(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProductsInProductSet") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2799,21 +2645,10 @@ func (c *productSearchRESTClient) ImportProductSets(ctx context.Context, req *vi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportProductSets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2892,21 +2727,10 @@ func (c *productSearchRESTClient) PurgeProducts(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PurgeProducts") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2957,17 +2781,7 @@ func (c *productSearchRESTClient) GetOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } diff --git a/vision/apiv1/product_search_client_example_go123_test.go b/vision/apiv1/product_search_client_example_go123_test.go index 5ee9e640fa80..bd11a19c7d79 100644 --- a/vision/apiv1/product_search_client_example_go123_test.go +++ b/vision/apiv1/product_search_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleProductSearchClient_ListProductSets_all() { } for resp, err := range c.ListProductSets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleProductSearchClient_ListProducts_all() { } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleProductSearchClient_ListProductsInProductSet_all() { } for resp, err := range c.ListProductsInProductSet(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleProductSearchClient_ListReferenceImages_all() { } for resp, err := range c.ListReferenceImages(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/vision/apiv1/visionpb/geometry.pb.go b/vision/apiv1/visionpb/geometry.pb.go index 4f5eae616ae1..8bbdd423069c 100755 --- a/vision/apiv1/visionpb/geometry.pb.go +++ b/vision/apiv1/visionpb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/geometry.proto @@ -50,11 +50,9 @@ type Vertex struct { func (x *Vertex) Reset() { *x = Vertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vertex) String() string { @@ -65,7 +63,7 @@ func (*Vertex) ProtoMessage() {} func (x *Vertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,11 +108,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -125,7 +121,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -183,7 +177,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -230,11 +224,9 @@ type Position struct { func (x *Position) Reset() { *x = Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Position) String() string { @@ -245,7 +237,7 @@ func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_geometry_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,56 +343,6 @@ func file_google_cloud_vision_v1_geometry_proto_init() { if File_google_cloud_vision_v1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_geometry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_geometry_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1/visionpb/image_annotator.pb.go b/vision/apiv1/visionpb/image_annotator.pb.go index 049b730b9ed1..0bbd20fbfb3e 100755 --- a/vision/apiv1/visionpb/image_annotator.pb.go +++ b/vision/apiv1/visionpb/image_annotator.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/image_annotator.proto @@ -484,11 +484,9 @@ type Feature struct { func (x *Feature) Reset() { *x = Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature) String() string { @@ -499,7 +497,7 @@ func (*Feature) ProtoMessage() {} func (x *Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +568,9 @@ type ImageSource struct { func (x *ImageSource) Reset() { *x = ImageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageSource) String() string { @@ -585,7 +581,7 @@ func (*ImageSource) ProtoMessage() {} func (x *ImageSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +631,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -650,7 +644,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +729,9 @@ type FaceAnnotation struct { func (x *FaceAnnotation) Reset() { *x = FaceAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation) String() string { @@ -750,7 +742,7 @@ func (*FaceAnnotation) ProtoMessage() {} func (x *FaceAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -882,11 +874,9 @@ type LocationInfo struct { func (x *LocationInfo) Reset() { *x = LocationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationInfo) String() string { @@ -897,7 +887,7 @@ func (*LocationInfo) ProtoMessage() {} func (x *LocationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,11 +925,9 @@ type Property struct { func (x *Property) Reset() { *x = Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Property) String() string { @@ -950,7 +938,7 @@ func (*Property) ProtoMessage() {} func (x *Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1021,9 @@ type EntityAnnotation struct { func (x *EntityAnnotation) Reset() { *x = EntityAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityAnnotation) String() string { @@ -1048,7 +1034,7 @@ func (*EntityAnnotation) ProtoMessage() {} func (x *EntityAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,11 +1135,9 @@ type LocalizedObjectAnnotation struct { func (x *LocalizedObjectAnnotation) Reset() { *x = LocalizedObjectAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocalizedObjectAnnotation) String() string { @@ -1164,7 +1148,7 @@ func (*LocalizedObjectAnnotation) ProtoMessage() {} func (x *LocalizedObjectAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1245,11 +1229,9 @@ type SafeSearchAnnotation struct { func (x *SafeSearchAnnotation) Reset() { *x = SafeSearchAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafeSearchAnnotation) String() string { @@ -1260,7 +1242,7 @@ func (*SafeSearchAnnotation) ProtoMessage() {} func (x *SafeSearchAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1324,11 +1306,9 @@ type LatLongRect struct { func (x *LatLongRect) Reset() { *x = LatLongRect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatLongRect) String() string { @@ -1339,7 +1319,7 @@ func (*LatLongRect) ProtoMessage() {} func (x *LatLongRect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1386,11 +1366,9 @@ type ColorInfo struct { func (x *ColorInfo) Reset() { *x = ColorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColorInfo) String() string { @@ -1401,7 +1379,7 @@ func (*ColorInfo) ProtoMessage() {} func (x *ColorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1449,11 +1427,9 @@ type DominantColorsAnnotation struct { func (x *DominantColorsAnnotation) Reset() { *x = DominantColorsAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DominantColorsAnnotation) String() string { @@ -1464,7 +1440,7 @@ func (*DominantColorsAnnotation) ProtoMessage() {} func (x *DominantColorsAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1498,11 +1474,9 @@ type ImageProperties struct { func (x *ImageProperties) Reset() { *x = ImageProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageProperties) String() string { @@ -1513,7 +1487,7 @@ func (*ImageProperties) ProtoMessage() {} func (x *ImageProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1553,11 +1527,9 @@ type CropHint struct { func (x *CropHint) Reset() { *x = CropHint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHint) String() string { @@ -1568,7 +1540,7 @@ func (*CropHint) ProtoMessage() {} func (x *CropHint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,11 +1588,9 @@ type CropHintsAnnotation struct { func (x *CropHintsAnnotation) Reset() { *x = CropHintsAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHintsAnnotation) String() string { @@ -1631,7 +1601,7 @@ func (*CropHintsAnnotation) ProtoMessage() {} func (x *CropHintsAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1670,11 +1640,9 @@ type CropHintsParams struct { func (x *CropHintsParams) Reset() { *x = CropHintsParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHintsParams) String() string { @@ -1685,7 +1653,7 @@ func (*CropHintsParams) ProtoMessage() {} func (x *CropHintsParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1721,11 +1689,9 @@ type WebDetectionParams struct { func (x *WebDetectionParams) Reset() { *x = WebDetectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetectionParams) String() string { @@ -1736,7 +1702,7 @@ func (*WebDetectionParams) ProtoMessage() {} func (x *WebDetectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1782,11 +1748,9 @@ type TextDetectionParams struct { func (x *TextDetectionParams) Reset() { *x = TextDetectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextDetectionParams) String() string { @@ -1797,7 +1761,7 @@ func (*TextDetectionParams) ProtoMessage() {} func (x *TextDetectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1855,11 +1819,9 @@ type ImageContext struct { func (x *ImageContext) Reset() { *x = ImageContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageContext) String() string { @@ -1870,7 +1832,7 @@ func (*ImageContext) ProtoMessage() {} func (x *ImageContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1944,11 +1906,9 @@ type AnnotateImageRequest struct { func (x *AnnotateImageRequest) Reset() { *x = AnnotateImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateImageRequest) String() string { @@ -1959,7 +1919,7 @@ func (*AnnotateImageRequest) ProtoMessage() {} func (x *AnnotateImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2011,11 +1971,9 @@ type ImageAnnotationContext struct { func (x *ImageAnnotationContext) Reset() { *x = ImageAnnotationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageAnnotationContext) String() string { @@ -2026,7 +1984,7 @@ func (*ImageAnnotationContext) ProtoMessage() {} func (x *ImageAnnotationContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2100,11 +2058,9 @@ type AnnotateImageResponse struct { func (x *AnnotateImageResponse) Reset() { *x = AnnotateImageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateImageResponse) String() string { @@ -2115,7 +2071,7 @@ func (*AnnotateImageResponse) ProtoMessage() {} func (x *AnnotateImageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2261,11 +2217,9 @@ type BatchAnnotateImagesRequest struct { func (x *BatchAnnotateImagesRequest) Reset() { *x = BatchAnnotateImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateImagesRequest) String() string { @@ -2276,7 +2230,7 @@ func (*BatchAnnotateImagesRequest) ProtoMessage() {} func (x *BatchAnnotateImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2324,11 +2278,9 @@ type BatchAnnotateImagesResponse struct { func (x *BatchAnnotateImagesResponse) Reset() { *x = BatchAnnotateImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateImagesResponse) String() string { @@ -2339,7 +2291,7 @@ func (*BatchAnnotateImagesResponse) ProtoMessage() {} func (x *BatchAnnotateImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2392,11 +2344,9 @@ type AnnotateFileRequest struct { func (x *AnnotateFileRequest) Reset() { *x = AnnotateFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateFileRequest) String() string { @@ -2407,7 +2357,7 @@ func (*AnnotateFileRequest) ProtoMessage() {} func (x *AnnotateFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2471,11 +2421,9 @@ type AnnotateFileResponse struct { func (x *AnnotateFileResponse) Reset() { *x = AnnotateFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateFileResponse) String() string { @@ -2486,7 +2434,7 @@ func (*AnnotateFileResponse) ProtoMessage() {} func (x *AnnotateFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2563,11 +2511,9 @@ type BatchAnnotateFilesRequest struct { func (x *BatchAnnotateFilesRequest) Reset() { *x = BatchAnnotateFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateFilesRequest) String() string { @@ -2578,7 +2524,7 @@ func (*BatchAnnotateFilesRequest) ProtoMessage() {} func (x *BatchAnnotateFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2627,11 +2573,9 @@ type BatchAnnotateFilesResponse struct { func (x *BatchAnnotateFilesResponse) Reset() { *x = BatchAnnotateFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateFilesResponse) String() string { @@ -2642,7 +2586,7 @@ func (*BatchAnnotateFilesResponse) ProtoMessage() {} func (x *BatchAnnotateFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,11 +2626,9 @@ type AsyncAnnotateFileRequest struct { func (x *AsyncAnnotateFileRequest) Reset() { *x = AsyncAnnotateFileRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncAnnotateFileRequest) String() string { @@ -2697,7 +2639,7 @@ func (*AsyncAnnotateFileRequest) ProtoMessage() {} func (x *AsyncAnnotateFileRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2752,11 +2694,9 @@ type AsyncAnnotateFileResponse struct { func (x *AsyncAnnotateFileResponse) Reset() { *x = AsyncAnnotateFileResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncAnnotateFileResponse) String() string { @@ -2767,7 +2707,7 @@ func (*AsyncAnnotateFileResponse) ProtoMessage() {} func (x *AsyncAnnotateFileResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2824,11 +2764,9 @@ type AsyncBatchAnnotateImagesRequest struct { func (x *AsyncBatchAnnotateImagesRequest) Reset() { *x = AsyncBatchAnnotateImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncBatchAnnotateImagesRequest) String() string { @@ -2839,7 +2777,7 @@ func (*AsyncBatchAnnotateImagesRequest) ProtoMessage() {} func (x *AsyncBatchAnnotateImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2894,11 +2832,9 @@ type AsyncBatchAnnotateImagesResponse struct { func (x *AsyncBatchAnnotateImagesResponse) Reset() { *x = AsyncBatchAnnotateImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncBatchAnnotateImagesResponse) String() string { @@ -2909,7 +2845,7 @@ func (*AsyncBatchAnnotateImagesResponse) ProtoMessage() {} func (x *AsyncBatchAnnotateImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2965,11 +2901,9 @@ type AsyncBatchAnnotateFilesRequest struct { func (x *AsyncBatchAnnotateFilesRequest) Reset() { *x = AsyncBatchAnnotateFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncBatchAnnotateFilesRequest) String() string { @@ -2980,7 +2914,7 @@ func (*AsyncBatchAnnotateFilesRequest) ProtoMessage() {} func (x *AsyncBatchAnnotateFilesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3029,11 +2963,9 @@ type AsyncBatchAnnotateFilesResponse struct { func (x *AsyncBatchAnnotateFilesResponse) Reset() { *x = AsyncBatchAnnotateFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AsyncBatchAnnotateFilesResponse) String() string { @@ -3044,7 +2976,7 @@ func (*AsyncBatchAnnotateFilesResponse) ProtoMessage() {} func (x *AsyncBatchAnnotateFilesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3088,11 +3020,9 @@ type InputConfig struct { func (x *InputConfig) Reset() { *x = InputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InputConfig) String() string { @@ -3103,7 +3033,7 @@ func (*InputConfig) ProtoMessage() {} func (x *InputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3163,11 +3093,9 @@ type OutputConfig struct { func (x *OutputConfig) Reset() { *x = OutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutputConfig) String() string { @@ -3178,7 +3106,7 @@ func (*OutputConfig) ProtoMessage() {} func (x *OutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3220,11 +3148,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -3235,7 +3161,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3290,11 +3216,9 @@ type GcsDestination struct { func (x *GcsDestination) Reset() { *x = GcsDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsDestination) String() string { @@ -3305,7 +3229,7 @@ func (*GcsDestination) ProtoMessage() {} func (x *GcsDestination) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3343,11 +3267,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3358,7 +3280,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3408,11 +3330,9 @@ type FaceAnnotation_Landmark struct { func (x *FaceAnnotation_Landmark) Reset() { *x = FaceAnnotation_Landmark{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation_Landmark) String() string { @@ -3423,7 +3343,7 @@ func (*FaceAnnotation_Landmark) ProtoMessage() {} func (x *FaceAnnotation_Landmark) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_image_annotator_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4395,488 +4315,6 @@ func file_google_cloud_vision_v1_image_annotator_proto_init() { file_google_cloud_vision_v1_product_search_proto_init() file_google_cloud_vision_v1_text_annotation_proto_init() file_google_cloud_vision_v1_web_detection_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LocationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EntityAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*LocalizedObjectAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SafeSearchAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LatLongRect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ColorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DominantColorsAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ImageProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CropHint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CropHintsAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CropHintsParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*WebDetectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TextDetectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ImageContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ImageAnnotationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateImageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*AsyncAnnotateFileRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*AsyncAnnotateFileResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*AsyncBatchAnnotateImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AsyncBatchAnnotateImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AsyncBatchAnnotateFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*AsyncBatchAnnotateFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*InputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*OutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*GcsDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_image_annotator_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation_Landmark); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1/visionpb/product_search.pb.go b/vision/apiv1/visionpb/product_search.pb.go index 9afe2045174c..e0b062009188 100755 --- a/vision/apiv1/visionpb/product_search.pb.go +++ b/vision/apiv1/visionpb/product_search.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/product_search.proto @@ -73,11 +73,9 @@ type ProductSearchParams struct { func (x *ProductSearchParams) Reset() { *x = ProductSearchParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSearchParams) String() string { @@ -88,7 +86,7 @@ func (*ProductSearchParams) ProtoMessage() {} func (x *ProductSearchParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type ProductSearchResults struct { func (x *ProductSearchResults) Reset() { *x = ProductSearchResults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSearchResults) String() string { @@ -167,7 +163,7 @@ func (*ProductSearchResults) ProtoMessage() {} func (x *ProductSearchResults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type ProductSearchResults_Result struct { func (x *ProductSearchResults_Result) Reset() { *x = ProductSearchResults_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSearchResults_Result) String() string { @@ -236,7 +230,7 @@ func (*ProductSearchResults_Result) ProtoMessage() {} func (x *ProductSearchResults_Result) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,11 +286,9 @@ type ProductSearchResults_ObjectAnnotation struct { func (x *ProductSearchResults_ObjectAnnotation) Reset() { *x = ProductSearchResults_ObjectAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSearchResults_ObjectAnnotation) String() string { @@ -307,7 +299,7 @@ func (*ProductSearchResults_ObjectAnnotation) ProtoMessage() {} func (x *ProductSearchResults_ObjectAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,11 +359,9 @@ type ProductSearchResults_GroupedResult struct { func (x *ProductSearchResults_GroupedResult) Reset() { *x = ProductSearchResults_GroupedResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSearchResults_GroupedResult) String() string { @@ -382,7 +372,7 @@ func (*ProductSearchResults_GroupedResult) ProtoMessage() {} func (x *ProductSearchResults_GroupedResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,68 +546,6 @@ func file_google_cloud_vision_v1_product_search_proto_init() { } file_google_cloud_vision_v1_geometry_proto_init() file_google_cloud_vision_v1_product_search_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_product_search_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProductSearchParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductSearchResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ProductSearchResults_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ProductSearchResults_ObjectAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ProductSearchResults_GroupedResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1/visionpb/product_search_service.pb.go b/vision/apiv1/visionpb/product_search_service.pb.go index 4ff6ade30369..71c1576a1237 100755 --- a/vision/apiv1/visionpb/product_search_service.pb.go +++ b/vision/apiv1/visionpb/product_search_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/product_search_service.proto @@ -152,11 +152,9 @@ type Product struct { func (x *Product) Reset() { *x = Product{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product) String() string { @@ -167,7 +165,7 @@ func (*Product) ProtoMessage() {} func (x *Product) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +249,9 @@ type ProductSet struct { func (x *ProductSet) Reset() { *x = ProductSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSet) String() string { @@ -266,7 +262,7 @@ func (*ProductSet) ProtoMessage() {} func (x *ProductSet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,11 +336,9 @@ type ReferenceImage struct { func (x *ReferenceImage) Reset() { *x = ReferenceImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReferenceImage) String() string { @@ -355,7 +349,7 @@ func (*ReferenceImage) ProtoMessage() {} func (x *ReferenceImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +407,9 @@ type CreateProductRequest struct { func (x *CreateProductRequest) Reset() { *x = CreateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProductRequest) String() string { @@ -428,7 +420,7 @@ func (*CreateProductRequest) ProtoMessage() {} func (x *CreateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,11 +475,9 @@ type ListProductsRequest struct { func (x *ListProductsRequest) Reset() { *x = ListProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsRequest) String() string { @@ -498,7 +488,7 @@ func (*ListProductsRequest) ProtoMessage() {} func (x *ListProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +539,9 @@ type ListProductsResponse struct { func (x *ListProductsResponse) Reset() { *x = ListProductsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsResponse) String() string { @@ -564,7 +552,7 @@ func (*ListProductsResponse) ProtoMessage() {} func (x *ListProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +596,9 @@ type GetProductRequest struct { func (x *GetProductRequest) Reset() { *x = GetProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductRequest) String() string { @@ -623,7 +609,7 @@ func (*GetProductRequest) ProtoMessage() {} func (x *GetProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -664,11 +650,9 @@ type UpdateProductRequest struct { func (x *UpdateProductRequest) Reset() { *x = UpdateProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProductRequest) String() string { @@ -679,7 +663,7 @@ func (*UpdateProductRequest) ProtoMessage() {} func (x *UpdateProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -723,11 +707,9 @@ type DeleteProductRequest struct { func (x *DeleteProductRequest) Reset() { *x = DeleteProductRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductRequest) String() string { @@ -738,7 +720,7 @@ func (*DeleteProductRequest) ProtoMessage() {} func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,11 +763,9 @@ type CreateProductSetRequest struct { func (x *CreateProductSetRequest) Reset() { *x = CreateProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProductSetRequest) String() string { @@ -796,7 +776,7 @@ func (*CreateProductSetRequest) ProtoMessage() {} func (x *CreateProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -850,11 +830,9 @@ type ListProductSetsRequest struct { func (x *ListProductSetsRequest) Reset() { *x = ListProductSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductSetsRequest) String() string { @@ -865,7 +843,7 @@ func (*ListProductSetsRequest) ProtoMessage() {} func (x *ListProductSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -916,11 +894,9 @@ type ListProductSetsResponse struct { func (x *ListProductSetsResponse) Reset() { *x = ListProductSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductSetsResponse) String() string { @@ -931,7 +907,7 @@ func (*ListProductSetsResponse) ProtoMessage() {} func (x *ListProductSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -975,11 +951,9 @@ type GetProductSetRequest struct { func (x *GetProductSetRequest) Reset() { *x = GetProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProductSetRequest) String() string { @@ -990,7 +964,7 @@ func (*GetProductSetRequest) ProtoMessage() {} func (x *GetProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,11 +1003,9 @@ type UpdateProductSetRequest struct { func (x *UpdateProductSetRequest) Reset() { *x = UpdateProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProductSetRequest) String() string { @@ -1044,7 +1016,7 @@ func (*UpdateProductSetRequest) ProtoMessage() {} func (x *UpdateProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1088,11 +1060,9 @@ type DeleteProductSetRequest struct { func (x *DeleteProductSetRequest) Reset() { *x = DeleteProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProductSetRequest) String() string { @@ -1103,7 +1073,7 @@ func (*DeleteProductSetRequest) ProtoMessage() {} func (x *DeleteProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1149,11 +1119,9 @@ type CreateReferenceImageRequest struct { func (x *CreateReferenceImageRequest) Reset() { *x = CreateReferenceImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateReferenceImageRequest) String() string { @@ -1164,7 +1132,7 @@ func (*CreateReferenceImageRequest) ProtoMessage() {} func (x *CreateReferenceImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1222,11 +1190,9 @@ type ListReferenceImagesRequest struct { func (x *ListReferenceImagesRequest) Reset() { *x = ListReferenceImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReferenceImagesRequest) String() string { @@ -1237,7 +1203,7 @@ func (*ListReferenceImagesRequest) ProtoMessage() {} func (x *ListReferenceImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1289,11 +1255,9 @@ type ListReferenceImagesResponse struct { func (x *ListReferenceImagesResponse) Reset() { *x = ListReferenceImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReferenceImagesResponse) String() string { @@ -1304,7 +1268,7 @@ func (*ListReferenceImagesResponse) ProtoMessage() {} func (x *ListReferenceImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1355,11 +1319,9 @@ type GetReferenceImageRequest struct { func (x *GetReferenceImageRequest) Reset() { *x = GetReferenceImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReferenceImageRequest) String() string { @@ -1370,7 +1332,7 @@ func (*GetReferenceImageRequest) ProtoMessage() {} func (x *GetReferenceImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,11 +1369,9 @@ type DeleteReferenceImageRequest struct { func (x *DeleteReferenceImageRequest) Reset() { *x = DeleteReferenceImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteReferenceImageRequest) String() string { @@ -1422,7 +1382,7 @@ func (*DeleteReferenceImageRequest) ProtoMessage() {} func (x *DeleteReferenceImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1464,11 +1424,9 @@ type AddProductToProductSetRequest struct { func (x *AddProductToProductSetRequest) Reset() { *x = AddProductToProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddProductToProductSetRequest) String() string { @@ -1479,7 +1437,7 @@ func (*AddProductToProductSetRequest) ProtoMessage() {} func (x *AddProductToProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1529,11 +1487,9 @@ type RemoveProductFromProductSetRequest struct { func (x *RemoveProductFromProductSetRequest) Reset() { *x = RemoveProductFromProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveProductFromProductSetRequest) String() string { @@ -1544,7 +1500,7 @@ func (*RemoveProductFromProductSetRequest) ProtoMessage() {} func (x *RemoveProductFromProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1592,11 +1548,9 @@ type ListProductsInProductSetRequest struct { func (x *ListProductsInProductSetRequest) Reset() { *x = ListProductsInProductSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsInProductSetRequest) String() string { @@ -1607,7 +1561,7 @@ func (*ListProductsInProductSetRequest) ProtoMessage() {} func (x *ListProductsInProductSetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1658,11 +1612,9 @@ type ListProductsInProductSetResponse struct { func (x *ListProductsInProductSetResponse) Reset() { *x = ListProductsInProductSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProductsInProductSetResponse) String() string { @@ -1673,7 +1625,7 @@ func (*ListProductsInProductSetResponse) ProtoMessage() {} func (x *ListProductsInProductSetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1777,11 +1729,9 @@ type ImportProductSetsGcsSource struct { func (x *ImportProductSetsGcsSource) Reset() { *x = ImportProductSetsGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductSetsGcsSource) String() string { @@ -1792,7 +1742,7 @@ func (*ImportProductSetsGcsSource) ProtoMessage() {} func (x *ImportProductSetsGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1830,11 +1780,9 @@ type ImportProductSetsInputConfig struct { func (x *ImportProductSetsInputConfig) Reset() { *x = ImportProductSetsInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductSetsInputConfig) String() string { @@ -1845,7 +1793,7 @@ func (*ImportProductSetsInputConfig) ProtoMessage() {} func (x *ImportProductSetsInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1902,11 +1850,9 @@ type ImportProductSetsRequest struct { func (x *ImportProductSetsRequest) Reset() { *x = ImportProductSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductSetsRequest) String() string { @@ -1917,7 +1863,7 @@ func (*ImportProductSetsRequest) ProtoMessage() {} func (x *ImportProductSetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1971,11 +1917,9 @@ type ImportProductSetsResponse struct { func (x *ImportProductSetsResponse) Reset() { *x = ImportProductSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportProductSetsResponse) String() string { @@ -1986,7 +1930,7 @@ func (*ImportProductSetsResponse) ProtoMessage() {} func (x *ImportProductSetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2036,11 +1980,9 @@ type BatchOperationMetadata struct { func (x *BatchOperationMetadata) Reset() { *x = BatchOperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOperationMetadata) String() string { @@ -2051,7 +1993,7 @@ func (*BatchOperationMetadata) ProtoMessage() {} func (x *BatchOperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2043,9 @@ type ProductSetPurgeConfig struct { func (x *ProductSetPurgeConfig) Reset() { *x = ProductSetPurgeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductSetPurgeConfig) String() string { @@ -2116,7 +2056,7 @@ func (*ProductSetPurgeConfig) ProtoMessage() {} func (x *ProductSetPurgeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2162,11 +2102,9 @@ type PurgeProductsRequest struct { func (x *PurgeProductsRequest) Reset() { *x = PurgeProductsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PurgeProductsRequest) String() string { @@ -2177,7 +2115,7 @@ func (*PurgeProductsRequest) ProtoMessage() {} func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2262,11 +2200,9 @@ type Product_KeyValue struct { func (x *Product_KeyValue) Reset() { *x = Product_KeyValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Product_KeyValue) String() string { @@ -2277,7 +2213,7 @@ func (*Product_KeyValue) ProtoMessage() {} func (x *Product_KeyValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_product_search_service_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3036,392 +2972,6 @@ func file_google_cloud_vision_v1_product_search_service_proto_init() { return } file_google_cloud_vision_v1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Product); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProductSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReferenceImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListProductSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListProductSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateReferenceImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListReferenceImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListReferenceImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetReferenceImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*DeleteReferenceImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*AddProductToProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RemoveProductFromProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsInProductSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListProductsInProductSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductSetsGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductSetsInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ImportProductSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*BatchOperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ProductSetPurgeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*PurgeProductsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_product_search_service_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Product_KeyValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_vision_v1_product_search_service_proto_msgTypes[25].OneofWrappers = []any{ (*ImportProductSetsInputConfig_GcsSource)(nil), } diff --git a/vision/apiv1/visionpb/text_annotation.pb.go b/vision/apiv1/visionpb/text_annotation.pb.go index 1f06149a48a6..fca6363824d0 100755 --- a/vision/apiv1/visionpb/text_annotation.pb.go +++ b/vision/apiv1/visionpb/text_annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/text_annotation.proto @@ -189,11 +189,9 @@ type TextAnnotation struct { func (x *TextAnnotation) Reset() { *x = TextAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation) String() string { @@ -204,7 +202,7 @@ func (*TextAnnotation) ProtoMessage() {} func (x *TextAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,11 +253,9 @@ type Page struct { func (x *Page) Reset() { *x = Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Page) String() string { @@ -270,7 +266,7 @@ func (*Page) ProtoMessage() {} func (x *Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,11 +355,9 @@ type Block struct { func (x *Block) Reset() { *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Block) String() string { @@ -374,7 +368,7 @@ func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,11 +450,9 @@ type Paragraph struct { func (x *Paragraph) Reset() { *x = Paragraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Paragraph) String() string { @@ -471,7 +463,7 @@ func (*Paragraph) ProtoMessage() {} func (x *Paragraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +539,9 @@ type Word struct { func (x *Word) Reset() { *x = Word{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Word) String() string { @@ -562,7 +552,7 @@ func (*Word) ProtoMessage() {} func (x *Word) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,11 +627,9 @@ type Symbol struct { func (x *Symbol) Reset() { *x = Symbol{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Symbol) String() string { @@ -652,7 +640,7 @@ func (*Symbol) ProtoMessage() {} func (x *Symbol) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -711,11 +699,9 @@ type TextAnnotation_DetectedLanguage struct { func (x *TextAnnotation_DetectedLanguage) Reset() { *x = TextAnnotation_DetectedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_DetectedLanguage) String() string { @@ -726,7 +712,7 @@ func (*TextAnnotation_DetectedLanguage) ProtoMessage() {} func (x *TextAnnotation_DetectedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +755,9 @@ type TextAnnotation_DetectedBreak struct { func (x *TextAnnotation_DetectedBreak) Reset() { *x = TextAnnotation_DetectedBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_DetectedBreak) String() string { @@ -784,7 +768,7 @@ func (*TextAnnotation_DetectedBreak) ProtoMessage() {} func (x *TextAnnotation_DetectedBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -827,11 +811,9 @@ type TextAnnotation_TextProperty struct { func (x *TextAnnotation_TextProperty) Reset() { *x = TextAnnotation_TextProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_TextProperty) String() string { @@ -842,7 +824,7 @@ func (*TextAnnotation_TextProperty) ProtoMessage() {} func (x *TextAnnotation_TextProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_text_annotation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1076,116 +1058,6 @@ func file_google_cloud_vision_v1_text_annotation_proto_init() { return } file_google_cloud_vision_v1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Paragraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Word); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Symbol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_DetectedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_DetectedBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_text_annotation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_TextProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1/visionpb/web_detection.pb.go b/vision/apiv1/visionpb/web_detection.pb.go index 96cb64a6c6b5..b5a7b6baaf71 100755 --- a/vision/apiv1/visionpb/web_detection.pb.go +++ b/vision/apiv1/visionpb/web_detection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1/web_detection.proto @@ -61,11 +61,9 @@ type WebDetection struct { func (x *WebDetection) Reset() { *x = WebDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection) String() string { @@ -76,7 +74,7 @@ func (*WebDetection) ProtoMessage() {} func (x *WebDetection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,11 +148,9 @@ type WebDetection_WebEntity struct { func (x *WebDetection_WebEntity) Reset() { *x = WebDetection_WebEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebEntity) String() string { @@ -165,7 +161,7 @@ func (*WebDetection_WebEntity) ProtoMessage() {} func (x *WebDetection_WebEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +211,9 @@ type WebDetection_WebImage struct { func (x *WebDetection_WebImage) Reset() { *x = WebDetection_WebImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebImage) String() string { @@ -230,7 +224,7 @@ func (*WebDetection_WebImage) ProtoMessage() {} func (x *WebDetection_WebImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +277,9 @@ type WebDetection_WebPage struct { func (x *WebDetection_WebPage) Reset() { *x = WebDetection_WebPage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebPage) String() string { @@ -298,7 +290,7 @@ func (*WebDetection_WebPage) ProtoMessage() {} func (x *WebDetection_WebPage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,11 +356,9 @@ type WebDetection_WebLabel struct { func (x *WebDetection_WebLabel) Reset() { *x = WebDetection_WebLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebLabel) String() string { @@ -379,7 +369,7 @@ func (*WebDetection_WebLabel) ProtoMessage() {} func (x *WebDetection_WebLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1_web_detection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,68 +526,6 @@ func file_google_cloud_vision_v1_web_detection_proto_init() { if File_google_cloud_vision_v1_web_detection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1_web_detection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_web_detection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_web_detection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_web_detection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebPage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1_web_detection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1p1beta1/helpers.go b/vision/apiv1p1beta1/helpers.go index a9679971aabb..22f53cc7fd34 100755 --- a/vision/apiv1p1beta1/helpers.go +++ b/vision/apiv1p1beta1/helpers.go @@ -18,10 +18,20 @@ package vision import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "vision.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -43,3 +53,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-vision", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vision/apiv1p1beta1/image_annotator_client.go b/vision/apiv1p1beta1/image_annotator_client.go index bb6c438a34c6..9de150778bd1 100755 --- a/vision/apiv1p1beta1/image_annotator_client.go +++ b/vision/apiv1p1beta1/image_annotator_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( visionpb "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -160,6 +159,8 @@ type imageAnnotatorGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewImageAnnotatorClient creates a new image annotator client based on gRPC. @@ -188,6 +189,7 @@ func NewImageAnnotatorClient(ctx context.Context, opts ...option.ClientOption) ( connPool: connPool, imageAnnotatorClient: visionpb.NewImageAnnotatorClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -234,6 +236,8 @@ type imageAnnotatorRESTClient struct { // Points back to the CallOptions field of the containing ImageAnnotatorClient CallOptions **ImageAnnotatorCallOptions + + logger *slog.Logger } // NewImageAnnotatorRESTClient creates a new image annotator rest client. @@ -253,6 +257,7 @@ func NewImageAnnotatorRESTClient(ctx context.Context, opts ...option.ClientOptio endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -302,7 +307,7 @@ func (c *imageAnnotatorGRPCClient) BatchAnnotateImages(ctx context.Context, req var resp *visionpb.BatchAnnotateImagesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.imageAnnotatorClient.BatchAnnotateImages(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.imageAnnotatorClient.BatchAnnotateImages, req, settings.GRPC, c.logger, "BatchAnnotateImages") return err }, opts...) if err != nil { @@ -347,17 +352,7 @@ func (c *imageAnnotatorRESTClient) BatchAnnotateImages(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchAnnotateImages") if err != nil { return err } diff --git a/vision/apiv1p1beta1/visionpb/geometry.pb.go b/vision/apiv1p1beta1/visionpb/geometry.pb.go index f4f1d49a44f2..7e08586eb9cc 100755 --- a/vision/apiv1p1beta1/visionpb/geometry.pb.go +++ b/vision/apiv1p1beta1/visionpb/geometry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1p1beta1/geometry.proto @@ -50,11 +50,9 @@ type Vertex struct { func (x *Vertex) Reset() { *x = Vertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vertex) String() string { @@ -65,7 +63,7 @@ func (*Vertex) ProtoMessage() {} func (x *Vertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106,11 +104,9 @@ type BoundingPoly struct { func (x *BoundingPoly) Reset() { *x = BoundingPoly{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoundingPoly) String() string { @@ -121,7 +117,7 @@ func (*BoundingPoly) ProtoMessage() {} func (x *BoundingPoly) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +157,9 @@ type Position struct { func (x *Position) Reset() { *x = Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Position) String() string { @@ -176,7 +170,7 @@ func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,44 +267,6 @@ func file_google_cloud_vision_v1p1beta1_geometry_proto_init() { if File_google_cloud_vision_v1p1beta1_geometry_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Vertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*BoundingPoly); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_geometry_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1p1beta1/visionpb/image_annotator.pb.go b/vision/apiv1p1beta1/visionpb/image_annotator.pb.go index b86570a933da..71e03a552a8e 100755 --- a/vision/apiv1p1beta1/visionpb/image_annotator.pb.go +++ b/vision/apiv1p1beta1/visionpb/image_annotator.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1p1beta1/image_annotator.proto @@ -402,11 +402,9 @@ type Feature struct { func (x *Feature) Reset() { *x = Feature{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Feature) String() string { @@ -417,7 +415,7 @@ func (*Feature) ProtoMessage() {} func (x *Feature) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,11 +479,9 @@ type ImageSource struct { func (x *ImageSource) Reset() { *x = ImageSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageSource) String() string { @@ -496,7 +492,7 @@ func (*ImageSource) ProtoMessage() {} func (x *ImageSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -543,11 +539,9 @@ type Image struct { func (x *Image) Reset() { *x = Image{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Image) String() string { @@ -558,7 +552,7 @@ func (*Image) ProtoMessage() {} func (x *Image) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +637,9 @@ type FaceAnnotation struct { func (x *FaceAnnotation) Reset() { *x = FaceAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation) String() string { @@ -658,7 +650,7 @@ func (*FaceAnnotation) ProtoMessage() {} func (x *FaceAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -790,11 +782,9 @@ type LocationInfo struct { func (x *LocationInfo) Reset() { *x = LocationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationInfo) String() string { @@ -805,7 +795,7 @@ func (*LocationInfo) ProtoMessage() {} func (x *LocationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,11 +833,9 @@ type Property struct { func (x *Property) Reset() { *x = Property{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Property) String() string { @@ -858,7 +846,7 @@ func (*Property) ProtoMessage() {} func (x *Property) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +926,9 @@ type EntityAnnotation struct { func (x *EntityAnnotation) Reset() { *x = EntityAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntityAnnotation) String() string { @@ -953,7 +939,7 @@ func (*EntityAnnotation) ProtoMessage() {} func (x *EntityAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,11 +1046,9 @@ type SafeSearchAnnotation struct { func (x *SafeSearchAnnotation) Reset() { *x = SafeSearchAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SafeSearchAnnotation) String() string { @@ -1075,7 +1059,7 @@ func (*SafeSearchAnnotation) ProtoMessage() {} func (x *SafeSearchAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1139,11 +1123,9 @@ type LatLongRect struct { func (x *LatLongRect) Reset() { *x = LatLongRect{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LatLongRect) String() string { @@ -1154,7 +1136,7 @@ func (*LatLongRect) ProtoMessage() {} func (x *LatLongRect) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1201,11 +1183,9 @@ type ColorInfo struct { func (x *ColorInfo) Reset() { *x = ColorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ColorInfo) String() string { @@ -1216,7 +1196,7 @@ func (*ColorInfo) ProtoMessage() {} func (x *ColorInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1244,9 @@ type DominantColorsAnnotation struct { func (x *DominantColorsAnnotation) Reset() { *x = DominantColorsAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DominantColorsAnnotation) String() string { @@ -1279,7 +1257,7 @@ func (*DominantColorsAnnotation) ProtoMessage() {} func (x *DominantColorsAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1313,11 +1291,9 @@ type ImageProperties struct { func (x *ImageProperties) Reset() { *x = ImageProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageProperties) String() string { @@ -1328,7 +1304,7 @@ func (*ImageProperties) ProtoMessage() {} func (x *ImageProperties) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,11 +1344,9 @@ type CropHint struct { func (x *CropHint) Reset() { *x = CropHint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHint) String() string { @@ -1383,7 +1357,7 @@ func (*CropHint) ProtoMessage() {} func (x *CropHint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1431,11 +1405,9 @@ type CropHintsAnnotation struct { func (x *CropHintsAnnotation) Reset() { *x = CropHintsAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHintsAnnotation) String() string { @@ -1446,7 +1418,7 @@ func (*CropHintsAnnotation) ProtoMessage() {} func (x *CropHintsAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1485,11 +1457,9 @@ type CropHintsParams struct { func (x *CropHintsParams) Reset() { *x = CropHintsParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CropHintsParams) String() string { @@ -1500,7 +1470,7 @@ func (*CropHintsParams) ProtoMessage() {} func (x *CropHintsParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1534,11 +1504,9 @@ type WebDetectionParams struct { func (x *WebDetectionParams) Reset() { *x = WebDetectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetectionParams) String() string { @@ -1549,7 +1517,7 @@ func (*WebDetectionParams) ProtoMessage() {} func (x *WebDetectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1588,11 +1556,9 @@ type TextDetectionParams struct { func (x *TextDetectionParams) Reset() { *x = TextDetectionParams{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextDetectionParams) String() string { @@ -1603,7 +1569,7 @@ func (*TextDetectionParams) ProtoMessage() {} func (x *TextDetectionParams) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1659,11 +1625,9 @@ type ImageContext struct { func (x *ImageContext) Reset() { *x = ImageContext{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageContext) String() string { @@ -1674,7 +1638,7 @@ func (*ImageContext) ProtoMessage() {} func (x *ImageContext) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1741,11 +1705,9 @@ type AnnotateImageRequest struct { func (x *AnnotateImageRequest) Reset() { *x = AnnotateImageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateImageRequest) String() string { @@ -1756,7 +1718,7 @@ func (*AnnotateImageRequest) ProtoMessage() {} func (x *AnnotateImageRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1791,9 @@ type AnnotateImageResponse struct { func (x *AnnotateImageResponse) Reset() { *x = AnnotateImageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotateImageResponse) String() string { @@ -1844,7 +1804,7 @@ func (*AnnotateImageResponse) ProtoMessage() {} func (x *AnnotateImageResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1948,11 +1908,9 @@ type BatchAnnotateImagesRequest struct { func (x *BatchAnnotateImagesRequest) Reset() { *x = BatchAnnotateImagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateImagesRequest) String() string { @@ -1963,7 +1921,7 @@ func (*BatchAnnotateImagesRequest) ProtoMessage() {} func (x *BatchAnnotateImagesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1997,11 +1955,9 @@ type BatchAnnotateImagesResponse struct { func (x *BatchAnnotateImagesResponse) Reset() { *x = BatchAnnotateImagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchAnnotateImagesResponse) String() string { @@ -2012,7 +1968,7 @@ func (*BatchAnnotateImagesResponse) ProtoMessage() {} func (x *BatchAnnotateImagesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2048,11 +2004,9 @@ type FaceAnnotation_Landmark struct { func (x *FaceAnnotation_Landmark) Reset() { *x = FaceAnnotation_Landmark{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FaceAnnotation_Landmark) String() string { @@ -2063,7 +2017,7 @@ func (*FaceAnnotation_Landmark) ProtoMessage() {} func (x *FaceAnnotation_Landmark) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,284 +2636,6 @@ func file_google_cloud_vision_v1p1beta1_image_annotator_proto_init() { file_google_cloud_vision_v1p1beta1_geometry_proto_init() file_google_cloud_vision_v1p1beta1_text_annotation_proto_init() file_google_cloud_vision_v1p1beta1_web_detection_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Feature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ImageSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Image); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*LocationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Property); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EntityAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SafeSearchAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*LatLongRect); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ColorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DominantColorsAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ImageProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CropHint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CropHintsAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CropHintsParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*WebDetectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TextDetectionParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ImageContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateImageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AnnotateImageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateImagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*BatchAnnotateImagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_image_annotator_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*FaceAnnotation_Landmark); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1p1beta1/visionpb/text_annotation.pb.go b/vision/apiv1p1beta1/visionpb/text_annotation.pb.go index 93996e10cc9f..b7256bd1e6e8 100755 --- a/vision/apiv1p1beta1/visionpb/text_annotation.pb.go +++ b/vision/apiv1p1beta1/visionpb/text_annotation.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1p1beta1/text_annotation.proto @@ -189,11 +189,9 @@ type TextAnnotation struct { func (x *TextAnnotation) Reset() { *x = TextAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation) String() string { @@ -204,7 +202,7 @@ func (*TextAnnotation) ProtoMessage() {} func (x *TextAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -253,11 +251,9 @@ type Page struct { func (x *Page) Reset() { *x = Page{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Page) String() string { @@ -268,7 +264,7 @@ func (*Page) ProtoMessage() {} func (x *Page) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,11 +348,9 @@ type Block struct { func (x *Block) Reset() { *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Block) String() string { @@ -367,7 +361,7 @@ func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -449,11 +443,9 @@ type Paragraph struct { func (x *Paragraph) Reset() { *x = Paragraph{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Paragraph) String() string { @@ -464,7 +456,7 @@ func (*Paragraph) ProtoMessage() {} func (x *Paragraph) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +532,9 @@ type Word struct { func (x *Word) Reset() { *x = Word{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Word) String() string { @@ -555,7 +545,7 @@ func (*Word) ProtoMessage() {} func (x *Word) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +620,9 @@ type Symbol struct { func (x *Symbol) Reset() { *x = Symbol{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Symbol) String() string { @@ -645,7 +633,7 @@ func (*Symbol) ProtoMessage() {} func (x *Symbol) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,11 +692,9 @@ type TextAnnotation_DetectedLanguage struct { func (x *TextAnnotation_DetectedLanguage) Reset() { *x = TextAnnotation_DetectedLanguage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_DetectedLanguage) String() string { @@ -719,7 +705,7 @@ func (*TextAnnotation_DetectedLanguage) ProtoMessage() {} func (x *TextAnnotation_DetectedLanguage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -762,11 +748,9 @@ type TextAnnotation_DetectedBreak struct { func (x *TextAnnotation_DetectedBreak) Reset() { *x = TextAnnotation_DetectedBreak{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_DetectedBreak) String() string { @@ -777,7 +761,7 @@ func (*TextAnnotation_DetectedBreak) ProtoMessage() {} func (x *TextAnnotation_DetectedBreak) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +804,9 @@ type TextAnnotation_TextProperty struct { func (x *TextAnnotation_TextProperty) Reset() { *x = TextAnnotation_TextProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TextAnnotation_TextProperty) String() string { @@ -835,7 +817,7 @@ func (*TextAnnotation_TextProperty) ProtoMessage() {} func (x *TextAnnotation_TextProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,116 +1060,6 @@ func file_google_cloud_vision_v1p1beta1_text_annotation_proto_init() { return } file_google_cloud_vision_v1p1beta1_geometry_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Page); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Paragraph); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Word); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Symbol); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_DetectedLanguage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_DetectedBreak); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_text_annotation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TextAnnotation_TextProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vision/apiv1p1beta1/visionpb/web_detection.pb.go b/vision/apiv1p1beta1/visionpb/web_detection.pb.go index cfaefd54f64f..267e07f8d732 100755 --- a/vision/apiv1p1beta1/visionpb/web_detection.pb.go +++ b/vision/apiv1p1beta1/visionpb/web_detection.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vision/v1p1beta1/web_detection.proto @@ -60,11 +60,9 @@ type WebDetection struct { func (x *WebDetection) Reset() { *x = WebDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection) String() string { @@ -75,7 +73,7 @@ func (*WebDetection) ProtoMessage() {} func (x *WebDetection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,11 +147,9 @@ type WebDetection_WebEntity struct { func (x *WebDetection_WebEntity) Reset() { *x = WebDetection_WebEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebEntity) String() string { @@ -164,7 +160,7 @@ func (*WebDetection_WebEntity) ProtoMessage() {} func (x *WebDetection_WebEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -214,11 +210,9 @@ type WebDetection_WebImage struct { func (x *WebDetection_WebImage) Reset() { *x = WebDetection_WebImage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebImage) String() string { @@ -229,7 +223,7 @@ func (*WebDetection_WebImage) ProtoMessage() {} func (x *WebDetection_WebImage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +276,9 @@ type WebDetection_WebPage struct { func (x *WebDetection_WebPage) Reset() { *x = WebDetection_WebPage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebPage) String() string { @@ -297,7 +289,7 @@ func (*WebDetection_WebPage) ProtoMessage() {} func (x *WebDetection_WebPage) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +355,9 @@ type WebDetection_WebLabel struct { func (x *WebDetection_WebLabel) Reset() { *x = WebDetection_WebLabel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WebDetection_WebLabel) String() string { @@ -378,7 +368,7 @@ func (*WebDetection_WebLabel) ProtoMessage() {} func (x *WebDetection_WebLabel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -539,68 +529,6 @@ func file_google_cloud_vision_v1p1beta1_web_detection_proto_init() { if File_google_cloud_vision_v1p1beta1_web_detection_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebImage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebPage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vision_v1p1beta1_web_detection_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*WebDetection_WebLabel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/app_platform_client.go b/visionai/apiv1/app_platform_client.go index df3065d78fd3..7e9320b51bd5 100755 --- a/visionai/apiv1/app_platform_client.go +++ b/visionai/apiv1/app_platform_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -546,6 +545,8 @@ type appPlatformGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewAppPlatformClient creates a new app platform client based on gRPC. @@ -572,6 +573,7 @@ func NewAppPlatformClient(ctx context.Context, opts ...option.ClientOption) (*Ap connPool: connPool, appPlatformClient: visionaipb.NewAppPlatformClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -635,6 +637,8 @@ type appPlatformRESTClient struct { // Points back to the CallOptions field of the containing AppPlatformClient CallOptions **AppPlatformCallOptions + + logger *slog.Logger } // NewAppPlatformRESTClient creates a new app platform rest client. @@ -652,6 +656,7 @@ func NewAppPlatformRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -725,7 +730,7 @@ func (c *appPlatformGRPCClient) ListApplications(ctx context.Context, req *visio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.ListApplications(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.ListApplications, req, settings.GRPC, c.logger, "ListApplications") return err }, opts...) if err != nil { @@ -760,7 +765,7 @@ func (c *appPlatformGRPCClient) GetApplication(ctx context.Context, req *visiona var resp *visionaipb.Application err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.GetApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.GetApplication, req, settings.GRPC, c.logger, "GetApplication") return err }, opts...) if err != nil { @@ -778,7 +783,7 @@ func (c *appPlatformGRPCClient) CreateApplication(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.CreateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.CreateApplication, req, settings.GRPC, c.logger, "CreateApplication") return err }, opts...) if err != nil { @@ -798,7 +803,7 @@ func (c *appPlatformGRPCClient) UpdateApplication(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UpdateApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UpdateApplication, req, settings.GRPC, c.logger, "UpdateApplication") return err }, opts...) if err != nil { @@ -818,7 +823,7 @@ func (c *appPlatformGRPCClient) DeleteApplication(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.DeleteApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.DeleteApplication, req, settings.GRPC, c.logger, "DeleteApplication") return err }, opts...) if err != nil { @@ -838,7 +843,7 @@ func (c *appPlatformGRPCClient) DeployApplication(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.DeployApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.DeployApplication, req, settings.GRPC, c.logger, "DeployApplication") return err }, opts...) if err != nil { @@ -858,7 +863,7 @@ func (c *appPlatformGRPCClient) UndeployApplication(ctx context.Context, req *vi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UndeployApplication(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UndeployApplication, req, settings.GRPC, c.logger, "UndeployApplication") return err }, opts...) if err != nil { @@ -878,7 +883,7 @@ func (c *appPlatformGRPCClient) AddApplicationStreamInput(ctx context.Context, r var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.AddApplicationStreamInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.AddApplicationStreamInput, req, settings.GRPC, c.logger, "AddApplicationStreamInput") return err }, opts...) if err != nil { @@ -898,7 +903,7 @@ func (c *appPlatformGRPCClient) RemoveApplicationStreamInput(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.RemoveApplicationStreamInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.RemoveApplicationStreamInput, req, settings.GRPC, c.logger, "RemoveApplicationStreamInput") return err }, opts...) if err != nil { @@ -918,7 +923,7 @@ func (c *appPlatformGRPCClient) UpdateApplicationStreamInput(ctx context.Context var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UpdateApplicationStreamInput(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UpdateApplicationStreamInput, req, settings.GRPC, c.logger, "UpdateApplicationStreamInput") return err }, opts...) if err != nil { @@ -949,7 +954,7 @@ func (c *appPlatformGRPCClient) ListInstances(ctx context.Context, req *visionai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.ListInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.ListInstances, req, settings.GRPC, c.logger, "ListInstances") return err }, opts...) if err != nil { @@ -984,7 +989,7 @@ func (c *appPlatformGRPCClient) GetInstance(ctx context.Context, req *visionaipb var resp *visionaipb.Instance err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.GetInstance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.GetInstance, req, settings.GRPC, c.logger, "GetInstance") return err }, opts...) if err != nil { @@ -1002,7 +1007,7 @@ func (c *appPlatformGRPCClient) CreateApplicationInstances(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.CreateApplicationInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.CreateApplicationInstances, req, settings.GRPC, c.logger, "CreateApplicationInstances") return err }, opts...) if err != nil { @@ -1022,7 +1027,7 @@ func (c *appPlatformGRPCClient) DeleteApplicationInstances(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.DeleteApplicationInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.DeleteApplicationInstances, req, settings.GRPC, c.logger, "DeleteApplicationInstances") return err }, opts...) if err != nil { @@ -1042,7 +1047,7 @@ func (c *appPlatformGRPCClient) UpdateApplicationInstances(ctx context.Context, var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UpdateApplicationInstances(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UpdateApplicationInstances, req, settings.GRPC, c.logger, "UpdateApplicationInstances") return err }, opts...) if err != nil { @@ -1073,7 +1078,7 @@ func (c *appPlatformGRPCClient) ListDrafts(ctx context.Context, req *visionaipb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.ListDrafts(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.ListDrafts, req, settings.GRPC, c.logger, "ListDrafts") return err }, opts...) if err != nil { @@ -1108,7 +1113,7 @@ func (c *appPlatformGRPCClient) GetDraft(ctx context.Context, req *visionaipb.Ge var resp *visionaipb.Draft err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.GetDraft(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.GetDraft, req, settings.GRPC, c.logger, "GetDraft") return err }, opts...) if err != nil { @@ -1126,7 +1131,7 @@ func (c *appPlatformGRPCClient) CreateDraft(ctx context.Context, req *visionaipb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.CreateDraft(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.CreateDraft, req, settings.GRPC, c.logger, "CreateDraft") return err }, opts...) if err != nil { @@ -1146,7 +1151,7 @@ func (c *appPlatformGRPCClient) UpdateDraft(ctx context.Context, req *visionaipb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UpdateDraft(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UpdateDraft, req, settings.GRPC, c.logger, "UpdateDraft") return err }, opts...) if err != nil { @@ -1166,7 +1171,7 @@ func (c *appPlatformGRPCClient) DeleteDraft(ctx context.Context, req *visionaipb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.DeleteDraft(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.DeleteDraft, req, settings.GRPC, c.logger, "DeleteDraft") return err }, opts...) if err != nil { @@ -1197,7 +1202,7 @@ func (c *appPlatformGRPCClient) ListProcessors(ctx context.Context, req *visiona } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.ListProcessors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.ListProcessors, req, settings.GRPC, c.logger, "ListProcessors") return err }, opts...) if err != nil { @@ -1232,7 +1237,7 @@ func (c *appPlatformGRPCClient) ListPrebuiltProcessors(ctx context.Context, req var resp *visionaipb.ListPrebuiltProcessorsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.ListPrebuiltProcessors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.ListPrebuiltProcessors, req, settings.GRPC, c.logger, "ListPrebuiltProcessors") return err }, opts...) if err != nil { @@ -1250,7 +1255,7 @@ func (c *appPlatformGRPCClient) GetProcessor(ctx context.Context, req *visionaip var resp *visionaipb.Processor err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.GetProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.GetProcessor, req, settings.GRPC, c.logger, "GetProcessor") return err }, opts...) if err != nil { @@ -1268,7 +1273,7 @@ func (c *appPlatformGRPCClient) CreateProcessor(ctx context.Context, req *vision var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.CreateProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.CreateProcessor, req, settings.GRPC, c.logger, "CreateProcessor") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *appPlatformGRPCClient) UpdateProcessor(ctx context.Context, req *vision var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.UpdateProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.UpdateProcessor, req, settings.GRPC, c.logger, "UpdateProcessor") return err }, opts...) if err != nil { @@ -1308,7 +1313,7 @@ func (c *appPlatformGRPCClient) DeleteProcessor(ctx context.Context, req *vision var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.appPlatformClient.DeleteProcessor(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.appPlatformClient.DeleteProcessor, req, settings.GRPC, c.logger, "DeleteProcessor") return err }, opts...) if err != nil { @@ -1327,7 +1332,7 @@ func (c *appPlatformGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1341,7 +1346,7 @@ func (c *appPlatformGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1356,7 +1361,7 @@ func (c *appPlatformGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1385,7 +1390,7 @@ func (c *appPlatformGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1462,21 +1467,10 @@ func (c *appPlatformRESTClient) ListApplications(ctx context.Context, req *visio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListApplications") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1539,17 +1533,7 @@ func (c *appPlatformRESTClient) GetApplication(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetApplication") if err != nil { return err } @@ -1609,21 +1593,10 @@ func (c *appPlatformRESTClient) CreateApplication(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1690,21 +1663,10 @@ func (c *appPlatformRESTClient) UpdateApplication(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1760,21 +1722,10 @@ func (c *appPlatformRESTClient) DeleteApplication(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1830,21 +1781,10 @@ func (c *appPlatformRESTClient) DeployApplication(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployApplication") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1900,21 +1840,10 @@ func (c *appPlatformRESTClient) UndeployApplication(ctx context.Context, req *vi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployApplication") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1973,21 +1902,10 @@ func (c *appPlatformRESTClient) AddApplicationStreamInput(ctx context.Context, r httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddApplicationStreamInput") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2045,21 +1963,10 @@ func (c *appPlatformRESTClient) RemoveApplicationStreamInput(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveApplicationStreamInput") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2117,21 +2024,10 @@ func (c *appPlatformRESTClient) UpdateApplicationStreamInput(ctx context.Context httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApplicationStreamInput") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2200,21 +2096,10 @@ func (c *appPlatformRESTClient) ListInstances(ctx context.Context, req *visionai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListInstances") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2277,17 +2162,7 @@ func (c *appPlatformRESTClient) GetInstance(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetInstance") if err != nil { return err } @@ -2345,21 +2220,10 @@ func (c *appPlatformRESTClient) CreateApplicationInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateApplicationInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2417,21 +2281,10 @@ func (c *appPlatformRESTClient) DeleteApplicationInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeleteApplicationInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2490,21 +2343,10 @@ func (c *appPlatformRESTClient) UpdateApplicationInstances(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateApplicationInstances") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2573,21 +2415,10 @@ func (c *appPlatformRESTClient) ListDrafts(ctx context.Context, req *visionaipb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDrafts") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2650,17 +2481,7 @@ func (c *appPlatformRESTClient) GetDraft(ctx context.Context, req *visionaipb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDraft") if err != nil { return err } @@ -2720,21 +2541,10 @@ func (c *appPlatformRESTClient) CreateDraft(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDraft") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2804,21 +2614,10 @@ func (c *appPlatformRESTClient) UpdateDraft(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDraft") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2871,21 +2670,10 @@ func (c *appPlatformRESTClient) DeleteDraft(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDraft") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2954,21 +2742,10 @@ func (c *appPlatformRESTClient) ListProcessors(ctx context.Context, req *visiona } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcessors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3038,17 +2815,7 @@ func (c *appPlatformRESTClient) ListPrebuiltProcessors(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ListPrebuiltProcessors") if err != nil { return err } @@ -3098,17 +2865,7 @@ func (c *appPlatformRESTClient) GetProcessor(ctx context.Context, req *visionaip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcessor") if err != nil { return err } @@ -3168,21 +2925,10 @@ func (c *appPlatformRESTClient) CreateProcessor(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProcessor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3249,21 +2995,10 @@ func (c *appPlatformRESTClient) UpdateProcessor(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProcessor") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3316,21 +3051,10 @@ func (c *appPlatformRESTClient) DeleteProcessor(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcessor") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3384,15 +3108,8 @@ func (c *appPlatformRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3426,15 +3143,8 @@ func (c *appPlatformRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3471,17 +3181,7 @@ func (c *appPlatformRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3546,21 +3246,10 @@ func (c *appPlatformRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/app_platform_client_example_go123_test.go b/visionai/apiv1/app_platform_client_example_go123_test.go index 188c8edd3019..b7752d69607e 100644 --- a/visionai/apiv1/app_platform_client_example_go123_test.go +++ b/visionai/apiv1/app_platform_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleAppPlatformClient_ListApplications_all() { } for resp, err := range c.ListApplications(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleAppPlatformClient_ListDrafts_all() { } for resp, err := range c.ListDrafts(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleAppPlatformClient_ListInstances_all() { } for resp, err := range c.ListInstances(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleAppPlatformClient_ListProcessors_all() { } for resp, err := range c.ListProcessors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleAppPlatformClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/visionai/apiv1/health_check_client.go b/visionai/apiv1/health_check_client.go index fc6501320341..436e30c46953 100755 --- a/visionai/apiv1/health_check_client.go +++ b/visionai/apiv1/health_check_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -175,6 +174,8 @@ type healthCheckGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewHealthCheckClient creates a new health check service client based on gRPC. @@ -202,6 +203,7 @@ func NewHealthCheckClient(ctx context.Context, opts ...option.ClientOption) (*He connPool: connPool, healthCheckClient: visionaipb.NewHealthCheckServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -249,6 +251,8 @@ type healthCheckRESTClient struct { // Points back to the CallOptions field of the containing HealthCheckClient CallOptions **HealthCheckCallOptions + + logger *slog.Logger } // NewHealthCheckRESTClient creates a new health check service rest client. @@ -267,6 +271,7 @@ func NewHealthCheckRESTClient(ctx context.Context, opts ...option.ClientOption) endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -319,7 +324,7 @@ func (c *healthCheckGRPCClient) HealthCheck(ctx context.Context, req *visionaipb var resp *visionaipb.HealthCheckResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.healthCheckClient.HealthCheck(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.healthCheckClient.HealthCheck, req, settings.GRPC, c.logger, "HealthCheck") return err }, opts...) if err != nil { @@ -336,7 +341,7 @@ func (c *healthCheckGRPCClient) CancelOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -350,7 +355,7 @@ func (c *healthCheckGRPCClient) DeleteOperation(ctx context.Context, req *longru opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -365,7 +370,7 @@ func (c *healthCheckGRPCClient) GetOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -394,7 +399,7 @@ func (c *healthCheckGRPCClient) ListOperations(ctx context.Context, req *longrun } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -453,17 +458,7 @@ func (c *healthCheckRESTClient) HealthCheck(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "HealthCheck") if err != nil { return err } @@ -516,15 +511,8 @@ func (c *healthCheckRESTClient) CancelOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -558,15 +546,8 @@ func (c *healthCheckRESTClient) DeleteOperation(ctx context.Context, req *longru httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -603,17 +584,7 @@ func (c *healthCheckRESTClient) GetOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -678,21 +649,10 @@ func (c *healthCheckRESTClient) ListOperations(ctx context.Context, req *longrun } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/health_check_client_example_go123_test.go b/visionai/apiv1/health_check_client_example_go123_test.go index 8c442e437817..2746244cd0ba 100644 --- a/visionai/apiv1/health_check_client_example_go123_test.go +++ b/visionai/apiv1/health_check_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleHealthCheckClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/visionai/apiv1/helpers.go b/visionai/apiv1/helpers.go index cc317b784dff..4d88f60bc7f9 100755 --- a/visionai/apiv1/helpers.go +++ b/visionai/apiv1/helpers.go @@ -18,10 +18,20 @@ package visionai import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "visionai.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/visionai/apiv1/live_video_analytics_client.go b/visionai/apiv1/live_video_analytics_client.go index 7654867d43d7..6023bac1d3cd 100755 --- a/visionai/apiv1/live_video_analytics_client.go +++ b/visionai/apiv1/live_video_analytics_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -621,6 +620,8 @@ type liveVideoAnalyticsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewLiveVideoAnalyticsClient creates a new live video analytics client based on gRPC. @@ -648,6 +649,7 @@ func NewLiveVideoAnalyticsClient(ctx context.Context, opts ...option.ClientOptio connPool: connPool, liveVideoAnalyticsClient: visionaipb.NewLiveVideoAnalyticsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -711,6 +713,8 @@ type liveVideoAnalyticsRESTClient struct { // Points back to the CallOptions field of the containing LiveVideoAnalyticsClient CallOptions **LiveVideoAnalyticsCallOptions + + logger *slog.Logger } // NewLiveVideoAnalyticsRESTClient creates a new live video analytics rest client. @@ -729,6 +733,7 @@ func NewLiveVideoAnalyticsRESTClient(ctx context.Context, opts ...option.ClientO endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -802,7 +807,7 @@ func (c *liveVideoAnalyticsGRPCClient) ListPublicOperators(ctx context.Context, } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.ListPublicOperators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.ListPublicOperators, req, settings.GRPC, c.logger, "ListPublicOperators") return err }, opts...) if err != nil { @@ -837,7 +842,7 @@ func (c *liveVideoAnalyticsGRPCClient) ResolveOperatorInfo(ctx context.Context, var resp *visionaipb.ResolveOperatorInfoResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.ResolveOperatorInfo(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.ResolveOperatorInfo, req, settings.GRPC, c.logger, "ResolveOperatorInfo") return err }, opts...) if err != nil { @@ -866,7 +871,7 @@ func (c *liveVideoAnalyticsGRPCClient) ListOperators(ctx context.Context, req *v } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.ListOperators(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.ListOperators, req, settings.GRPC, c.logger, "ListOperators") return err }, opts...) if err != nil { @@ -901,7 +906,7 @@ func (c *liveVideoAnalyticsGRPCClient) GetOperator(ctx context.Context, req *vis var resp *visionaipb.Operator err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.GetOperator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.GetOperator, req, settings.GRPC, c.logger, "GetOperator") return err }, opts...) if err != nil { @@ -919,7 +924,7 @@ func (c *liveVideoAnalyticsGRPCClient) CreateOperator(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.CreateOperator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.CreateOperator, req, settings.GRPC, c.logger, "CreateOperator") return err }, opts...) if err != nil { @@ -939,7 +944,7 @@ func (c *liveVideoAnalyticsGRPCClient) UpdateOperator(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.UpdateOperator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.UpdateOperator, req, settings.GRPC, c.logger, "UpdateOperator") return err }, opts...) if err != nil { @@ -959,7 +964,7 @@ func (c *liveVideoAnalyticsGRPCClient) DeleteOperator(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.DeleteOperator(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.DeleteOperator, req, settings.GRPC, c.logger, "DeleteOperator") return err }, opts...) if err != nil { @@ -990,7 +995,7 @@ func (c *liveVideoAnalyticsGRPCClient) ListAnalyses(ctx context.Context, req *vi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.ListAnalyses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.ListAnalyses, req, settings.GRPC, c.logger, "ListAnalyses") return err }, opts...) if err != nil { @@ -1025,7 +1030,7 @@ func (c *liveVideoAnalyticsGRPCClient) GetAnalysis(ctx context.Context, req *vis var resp *visionaipb.Analysis err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.GetAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.GetAnalysis, req, settings.GRPC, c.logger, "GetAnalysis") return err }, opts...) if err != nil { @@ -1043,7 +1048,7 @@ func (c *liveVideoAnalyticsGRPCClient) CreateAnalysis(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.CreateAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.CreateAnalysis, req, settings.GRPC, c.logger, "CreateAnalysis") return err }, opts...) if err != nil { @@ -1063,7 +1068,7 @@ func (c *liveVideoAnalyticsGRPCClient) UpdateAnalysis(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.UpdateAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.UpdateAnalysis, req, settings.GRPC, c.logger, "UpdateAnalysis") return err }, opts...) if err != nil { @@ -1083,7 +1088,7 @@ func (c *liveVideoAnalyticsGRPCClient) DeleteAnalysis(ctx context.Context, req * var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.DeleteAnalysis(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.DeleteAnalysis, req, settings.GRPC, c.logger, "DeleteAnalysis") return err }, opts...) if err != nil { @@ -1114,7 +1119,7 @@ func (c *liveVideoAnalyticsGRPCClient) ListProcesses(ctx context.Context, req *v } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.ListProcesses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.ListProcesses, req, settings.GRPC, c.logger, "ListProcesses") return err }, opts...) if err != nil { @@ -1149,7 +1154,7 @@ func (c *liveVideoAnalyticsGRPCClient) GetProcess(ctx context.Context, req *visi var resp *visionaipb.Process err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.GetProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.GetProcess, req, settings.GRPC, c.logger, "GetProcess") return err }, opts...) if err != nil { @@ -1167,7 +1172,7 @@ func (c *liveVideoAnalyticsGRPCClient) CreateProcess(ctx context.Context, req *v var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.CreateProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.CreateProcess, req, settings.GRPC, c.logger, "CreateProcess") return err }, opts...) if err != nil { @@ -1187,7 +1192,7 @@ func (c *liveVideoAnalyticsGRPCClient) UpdateProcess(ctx context.Context, req *v var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.UpdateProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.UpdateProcess, req, settings.GRPC, c.logger, "UpdateProcess") return err }, opts...) if err != nil { @@ -1207,7 +1212,7 @@ func (c *liveVideoAnalyticsGRPCClient) DeleteProcess(ctx context.Context, req *v var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.DeleteProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.DeleteProcess, req, settings.GRPC, c.logger, "DeleteProcess") return err }, opts...) if err != nil { @@ -1227,7 +1232,7 @@ func (c *liveVideoAnalyticsGRPCClient) BatchRunProcess(ctx context.Context, req var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.liveVideoAnalyticsClient.BatchRunProcess(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.liveVideoAnalyticsClient.BatchRunProcess, req, settings.GRPC, c.logger, "BatchRunProcess") return err }, opts...) if err != nil { @@ -1246,7 +1251,7 @@ func (c *liveVideoAnalyticsGRPCClient) CancelOperation(ctx context.Context, req opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1260,7 +1265,7 @@ func (c *liveVideoAnalyticsGRPCClient) DeleteOperation(ctx context.Context, req opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1275,7 +1280,7 @@ func (c *liveVideoAnalyticsGRPCClient) GetOperation(ctx context.Context, req *lo var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1304,7 +1309,7 @@ func (c *liveVideoAnalyticsGRPCClient) ListOperations(ctx context.Context, req * } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1381,21 +1386,10 @@ func (c *liveVideoAnalyticsRESTClient) ListPublicOperators(ctx context.Context, } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPublicOperators") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1464,17 +1458,7 @@ func (c *liveVideoAnalyticsRESTClient) ResolveOperatorInfo(ctx context.Context, httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResolveOperatorInfo") if err != nil { return err } @@ -1542,21 +1526,10 @@ func (c *liveVideoAnalyticsRESTClient) ListOperators(ctx context.Context, req *v } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperators") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1619,17 +1592,7 @@ func (c *liveVideoAnalyticsRESTClient) GetOperator(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperator") if err != nil { return err } @@ -1689,21 +1652,10 @@ func (c *liveVideoAnalyticsRESTClient) CreateOperator(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateOperator") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1770,21 +1722,10 @@ func (c *liveVideoAnalyticsRESTClient) UpdateOperator(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateOperator") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1837,21 +1778,10 @@ func (c *liveVideoAnalyticsRESTClient) DeleteOperator(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperator") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1920,21 +1850,10 @@ func (c *liveVideoAnalyticsRESTClient) ListAnalyses(ctx context.Context, req *vi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnalyses") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1997,17 +1916,7 @@ func (c *liveVideoAnalyticsRESTClient) GetAnalysis(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnalysis") if err != nil { return err } @@ -2067,21 +1976,10 @@ func (c *liveVideoAnalyticsRESTClient) CreateAnalysis(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnalysis") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2148,21 +2046,10 @@ func (c *liveVideoAnalyticsRESTClient) UpdateAnalysis(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAnalysis") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2215,21 +2102,10 @@ func (c *liveVideoAnalyticsRESTClient) DeleteAnalysis(ctx context.Context, req * httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnalysis") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2298,21 +2174,10 @@ func (c *liveVideoAnalyticsRESTClient) ListProcesses(ctx context.Context, req *v } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListProcesses") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2375,17 +2240,7 @@ func (c *liveVideoAnalyticsRESTClient) GetProcess(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetProcess") if err != nil { return err } @@ -2445,21 +2300,10 @@ func (c *liveVideoAnalyticsRESTClient) CreateProcess(ctx context.Context, req *v httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateProcess") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2526,21 +2370,10 @@ func (c *liveVideoAnalyticsRESTClient) UpdateProcess(ctx context.Context, req *v httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateProcess") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2593,21 +2426,10 @@ func (c *liveVideoAnalyticsRESTClient) DeleteProcess(ctx context.Context, req *v httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteProcess") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2664,21 +2486,10 @@ func (c *liveVideoAnalyticsRESTClient) BatchRunProcess(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchRunProcess") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2732,15 +2543,8 @@ func (c *liveVideoAnalyticsRESTClient) CancelOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -2774,15 +2578,8 @@ func (c *liveVideoAnalyticsRESTClient) DeleteOperation(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -2819,17 +2616,7 @@ func (c *liveVideoAnalyticsRESTClient) GetOperation(ctx context.Context, req *lo httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -2894,21 +2681,10 @@ func (c *liveVideoAnalyticsRESTClient) ListOperations(ctx context.Context, req * } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/live_video_analytics_client_example_go123_test.go b/visionai/apiv1/live_video_analytics_client_example_go123_test.go index ccd4924343b3..70458852dd11 100644 --- a/visionai/apiv1/live_video_analytics_client_example_go123_test.go +++ b/visionai/apiv1/live_video_analytics_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleLiveVideoAnalyticsClient_ListAnalyses_all() { } for resp, err := range c.ListAnalyses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleLiveVideoAnalyticsClient_ListOperators_all() { } for resp, err := range c.ListOperators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleLiveVideoAnalyticsClient_ListProcesses_all() { } for resp, err := range c.ListProcesses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleLiveVideoAnalyticsClient_ListPublicOperators_all() { } for resp, err := range c.ListPublicOperators(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleLiveVideoAnalyticsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/visionai/apiv1/streaming_client.go b/visionai/apiv1/streaming_client.go index 7a4b1f4c8b5b..25e7ad30a637 100755 --- a/visionai/apiv1/streaming_client.go +++ b/visionai/apiv1/streaming_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -29,7 +29,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -226,6 +225,8 @@ type streamingGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewStreamingClient creates a new streaming service client based on gRPC. @@ -252,6 +253,7 @@ func NewStreamingClient(ctx context.Context, opts ...option.ClientOption) (*Stre connPool: connPool, streamingClient: visionaipb.NewStreamingServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -299,6 +301,8 @@ type streamingRESTClient struct { // Points back to the CallOptions field of the containing StreamingClient CallOptions **StreamingCallOptions + + logger *slog.Logger } // NewStreamingRESTClient creates a new streaming service rest client. @@ -316,6 +320,7 @@ func NewStreamingRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -365,7 +370,9 @@ func (c *streamingGRPCClient) SendPackets(ctx context.Context, opts ...gax.CallO opts = append((*c.CallOptions).SendPackets[0:len((*c.CallOptions).SendPackets):len((*c.CallOptions).SendPackets)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "SendPackets") resp, err = c.streamingClient.SendPackets(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "SendPackets") return err }, opts...) if err != nil { @@ -380,7 +387,9 @@ func (c *streamingGRPCClient) ReceivePackets(ctx context.Context, opts ...gax.Ca opts = append((*c.CallOptions).ReceivePackets[0:len((*c.CallOptions).ReceivePackets):len((*c.CallOptions).ReceivePackets)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReceivePackets") resp, err = c.streamingClient.ReceivePackets(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReceivePackets") return err }, opts...) if err != nil { @@ -395,7 +404,9 @@ func (c *streamingGRPCClient) ReceiveEvents(ctx context.Context, opts ...gax.Cal opts = append((*c.CallOptions).ReceiveEvents[0:len((*c.CallOptions).ReceiveEvents):len((*c.CallOptions).ReceiveEvents)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "ReceiveEvents") resp, err = c.streamingClient.ReceiveEvents(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "ReceiveEvents") return err }, opts...) if err != nil { @@ -413,7 +424,7 @@ func (c *streamingGRPCClient) AcquireLease(ctx context.Context, req *visionaipb. var resp *visionaipb.Lease err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamingClient.AcquireLease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamingClient.AcquireLease, req, settings.GRPC, c.logger, "AcquireLease") return err }, opts...) if err != nil { @@ -431,7 +442,7 @@ func (c *streamingGRPCClient) RenewLease(ctx context.Context, req *visionaipb.Re var resp *visionaipb.Lease err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamingClient.RenewLease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamingClient.RenewLease, req, settings.GRPC, c.logger, "RenewLease") return err }, opts...) if err != nil { @@ -449,7 +460,7 @@ func (c *streamingGRPCClient) ReleaseLease(ctx context.Context, req *visionaipb. var resp *visionaipb.ReleaseLeaseResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamingClient.ReleaseLease(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamingClient.ReleaseLease, req, settings.GRPC, c.logger, "ReleaseLease") return err }, opts...) if err != nil { @@ -466,7 +477,7 @@ func (c *streamingGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -480,7 +491,7 @@ func (c *streamingGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -495,7 +506,7 @@ func (c *streamingGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -524,7 +535,7 @@ func (c *streamingGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -610,17 +621,7 @@ func (c *streamingRESTClient) AcquireLease(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AcquireLease") if err != nil { return err } @@ -676,17 +677,7 @@ func (c *streamingRESTClient) RenewLease(ctx context.Context, req *visionaipb.Re httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RenewLease") if err != nil { return err } @@ -742,17 +733,7 @@ func (c *streamingRESTClient) ReleaseLease(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ReleaseLease") if err != nil { return err } @@ -805,15 +786,8 @@ func (c *streamingRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -847,15 +821,8 @@ func (c *streamingRESTClient) DeleteOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -892,17 +859,7 @@ func (c *streamingRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -967,21 +924,10 @@ func (c *streamingRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/streaming_client_example_go123_test.go b/visionai/apiv1/streaming_client_example_go123_test.go index 5bcd98734be9..83f2b5126610 100644 --- a/visionai/apiv1/streaming_client_example_go123_test.go +++ b/visionai/apiv1/streaming_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleStreamingClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/visionai/apiv1/streams_client.go b/visionai/apiv1/streams_client.go index 4f3120e0489c..48b4c0c39398 100755 --- a/visionai/apiv1/streams_client.go +++ b/visionai/apiv1/streams_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -485,6 +484,8 @@ type streamsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewStreamsClient creates a new streams service client based on gRPC. @@ -514,6 +515,7 @@ func NewStreamsClient(ctx context.Context, opts ...option.ClientOption) (*Stream connPool: connPool, streamsClient: visionaipb.NewStreamsServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -577,6 +579,8 @@ type streamsRESTClient struct { // Points back to the CallOptions field of the containing StreamsClient CallOptions **StreamsCallOptions + + logger *slog.Logger } // NewStreamsRESTClient creates a new streams service rest client. @@ -597,6 +601,7 @@ func NewStreamsRESTClient(ctx context.Context, opts ...option.ClientOption) (*St endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -670,7 +675,7 @@ func (c *streamsGRPCClient) ListClusters(ctx context.Context, req *visionaipb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -705,7 +710,7 @@ func (c *streamsGRPCClient) GetCluster(ctx context.Context, req *visionaipb.GetC var resp *visionaipb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -723,7 +728,7 @@ func (c *streamsGRPCClient) CreateCluster(ctx context.Context, req *visionaipb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -743,7 +748,7 @@ func (c *streamsGRPCClient) UpdateCluster(ctx context.Context, req *visionaipb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -763,7 +768,7 @@ func (c *streamsGRPCClient) DeleteCluster(ctx context.Context, req *visionaipb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -794,7 +799,7 @@ func (c *streamsGRPCClient) ListStreams(ctx context.Context, req *visionaipb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.ListStreams(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.ListStreams, req, settings.GRPC, c.logger, "ListStreams") return err }, opts...) if err != nil { @@ -829,7 +834,7 @@ func (c *streamsGRPCClient) GetStream(ctx context.Context, req *visionaipb.GetSt var resp *visionaipb.Stream err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GetStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GetStream, req, settings.GRPC, c.logger, "GetStream") return err }, opts...) if err != nil { @@ -847,7 +852,7 @@ func (c *streamsGRPCClient) CreateStream(ctx context.Context, req *visionaipb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.CreateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.CreateStream, req, settings.GRPC, c.logger, "CreateStream") return err }, opts...) if err != nil { @@ -867,7 +872,7 @@ func (c *streamsGRPCClient) UpdateStream(ctx context.Context, req *visionaipb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.UpdateStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.UpdateStream, req, settings.GRPC, c.logger, "UpdateStream") return err }, opts...) if err != nil { @@ -887,7 +892,7 @@ func (c *streamsGRPCClient) DeleteStream(ctx context.Context, req *visionaipb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.DeleteStream(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.DeleteStream, req, settings.GRPC, c.logger, "DeleteStream") return err }, opts...) if err != nil { @@ -907,7 +912,7 @@ func (c *streamsGRPCClient) GetStreamThumbnail(ctx context.Context, req *visiona var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GetStreamThumbnail(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GetStreamThumbnail, req, settings.GRPC, c.logger, "GetStreamThumbnail") return err }, opts...) if err != nil { @@ -927,7 +932,7 @@ func (c *streamsGRPCClient) GenerateStreamHlsToken(ctx context.Context, req *vis var resp *visionaipb.GenerateStreamHlsTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GenerateStreamHlsToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GenerateStreamHlsToken, req, settings.GRPC, c.logger, "GenerateStreamHlsToken") return err }, opts...) if err != nil { @@ -956,7 +961,7 @@ func (c *streamsGRPCClient) ListEvents(ctx context.Context, req *visionaipb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.ListEvents(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.ListEvents, req, settings.GRPC, c.logger, "ListEvents") return err }, opts...) if err != nil { @@ -991,7 +996,7 @@ func (c *streamsGRPCClient) GetEvent(ctx context.Context, req *visionaipb.GetEve var resp *visionaipb.Event err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GetEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GetEvent, req, settings.GRPC, c.logger, "GetEvent") return err }, opts...) if err != nil { @@ -1009,7 +1014,7 @@ func (c *streamsGRPCClient) CreateEvent(ctx context.Context, req *visionaipb.Cre var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.CreateEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.CreateEvent, req, settings.GRPC, c.logger, "CreateEvent") return err }, opts...) if err != nil { @@ -1029,7 +1034,7 @@ func (c *streamsGRPCClient) UpdateEvent(ctx context.Context, req *visionaipb.Upd var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.UpdateEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.UpdateEvent, req, settings.GRPC, c.logger, "UpdateEvent") return err }, opts...) if err != nil { @@ -1049,7 +1054,7 @@ func (c *streamsGRPCClient) DeleteEvent(ctx context.Context, req *visionaipb.Del var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.DeleteEvent(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.DeleteEvent, req, settings.GRPC, c.logger, "DeleteEvent") return err }, opts...) if err != nil { @@ -1080,7 +1085,7 @@ func (c *streamsGRPCClient) ListSeries(ctx context.Context, req *visionaipb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.ListSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.ListSeries, req, settings.GRPC, c.logger, "ListSeries") return err }, opts...) if err != nil { @@ -1115,7 +1120,7 @@ func (c *streamsGRPCClient) GetSeries(ctx context.Context, req *visionaipb.GetSe var resp *visionaipb.Series err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.GetSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.GetSeries, req, settings.GRPC, c.logger, "GetSeries") return err }, opts...) if err != nil { @@ -1133,7 +1138,7 @@ func (c *streamsGRPCClient) CreateSeries(ctx context.Context, req *visionaipb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.CreateSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.CreateSeries, req, settings.GRPC, c.logger, "CreateSeries") return err }, opts...) if err != nil { @@ -1153,7 +1158,7 @@ func (c *streamsGRPCClient) UpdateSeries(ctx context.Context, req *visionaipb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.UpdateSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.UpdateSeries, req, settings.GRPC, c.logger, "UpdateSeries") return err }, opts...) if err != nil { @@ -1173,7 +1178,7 @@ func (c *streamsGRPCClient) DeleteSeries(ctx context.Context, req *visionaipb.De var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.DeleteSeries(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.DeleteSeries, req, settings.GRPC, c.logger, "DeleteSeries") return err }, opts...) if err != nil { @@ -1193,7 +1198,7 @@ func (c *streamsGRPCClient) MaterializeChannel(ctx context.Context, req *visiona var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.streamsClient.MaterializeChannel(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.streamsClient.MaterializeChannel, req, settings.GRPC, c.logger, "MaterializeChannel") return err }, opts...) if err != nil { @@ -1212,7 +1217,7 @@ func (c *streamsGRPCClient) CancelOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1226,7 +1231,7 @@ func (c *streamsGRPCClient) DeleteOperation(ctx context.Context, req *longrunnin opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1241,7 +1246,7 @@ func (c *streamsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1270,7 +1275,7 @@ func (c *streamsGRPCClient) ListOperations(ctx context.Context, req *longrunning } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1347,21 +1352,10 @@ func (c *streamsRESTClient) ListClusters(ctx context.Context, req *visionaipb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1424,17 +1418,7 @@ func (c *streamsRESTClient) GetCluster(ctx context.Context, req *visionaipb.GetC httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -1494,21 +1478,10 @@ func (c *streamsRESTClient) CreateCluster(ctx context.Context, req *visionaipb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1575,21 +1548,10 @@ func (c *streamsRESTClient) UpdateCluster(ctx context.Context, req *visionaipb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1642,21 +1604,10 @@ func (c *streamsRESTClient) DeleteCluster(ctx context.Context, req *visionaipb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1725,21 +1676,10 @@ func (c *streamsRESTClient) ListStreams(ctx context.Context, req *visionaipb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListStreams") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1802,17 +1742,7 @@ func (c *streamsRESTClient) GetStream(ctx context.Context, req *visionaipb.GetSt httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetStream") if err != nil { return err } @@ -1872,21 +1802,10 @@ func (c *streamsRESTClient) CreateStream(ctx context.Context, req *visionaipb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1953,21 +1872,10 @@ func (c *streamsRESTClient) UpdateStream(ctx context.Context, req *visionaipb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateStream") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2020,21 +1928,10 @@ func (c *streamsRESTClient) DeleteStream(ctx context.Context, req *visionaipb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteStream") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2090,21 +1987,10 @@ func (c *streamsRESTClient) GetStreamThumbnail(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GetStreamThumbnail") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2161,17 +2047,7 @@ func (c *streamsRESTClient) GenerateStreamHlsToken(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateStreamHlsToken") if err != nil { return err } @@ -2239,21 +2115,10 @@ func (c *streamsRESTClient) ListEvents(ctx context.Context, req *visionaipb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListEvents") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2316,17 +2181,7 @@ func (c *streamsRESTClient) GetEvent(ctx context.Context, req *visionaipb.GetEve httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetEvent") if err != nil { return err } @@ -2386,21 +2241,10 @@ func (c *streamsRESTClient) CreateEvent(ctx context.Context, req *visionaipb.Cre httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateEvent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2467,21 +2311,10 @@ func (c *streamsRESTClient) UpdateEvent(ctx context.Context, req *visionaipb.Upd httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateEvent") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2534,21 +2367,10 @@ func (c *streamsRESTClient) DeleteEvent(ctx context.Context, req *visionaipb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteEvent") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2617,21 +2439,10 @@ func (c *streamsRESTClient) ListSeries(ctx context.Context, req *visionaipb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSeries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2694,17 +2505,7 @@ func (c *streamsRESTClient) GetSeries(ctx context.Context, req *visionaipb.GetSe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSeries") if err != nil { return err } @@ -2764,21 +2565,10 @@ func (c *streamsRESTClient) CreateSeries(ctx context.Context, req *visionaipb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSeries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2845,21 +2635,10 @@ func (c *streamsRESTClient) UpdateSeries(ctx context.Context, req *visionaipb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSeries") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2912,21 +2691,10 @@ func (c *streamsRESTClient) DeleteSeries(ctx context.Context, req *visionaipb.De httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSeries") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2987,21 +2755,10 @@ func (c *streamsRESTClient) MaterializeChannel(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "MaterializeChannel") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3055,15 +2812,8 @@ func (c *streamsRESTClient) CancelOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3097,15 +2847,8 @@ func (c *streamsRESTClient) DeleteOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3142,17 +2885,7 @@ func (c *streamsRESTClient) GetOperation(ctx context.Context, req *longrunningpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3217,21 +2950,10 @@ func (c *streamsRESTClient) ListOperations(ctx context.Context, req *longrunning } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/streams_client_example_go123_test.go b/visionai/apiv1/streams_client_example_go123_test.go index a55782206122..a655106e2f96 100644 --- a/visionai/apiv1/streams_client_example_go123_test.go +++ b/visionai/apiv1/streams_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleStreamsClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleStreamsClient_ListEvents_all() { } for resp, err := range c.ListEvents(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleStreamsClient_ListSeries_all() { } for resp, err := range c.ListSeries(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleStreamsClient_ListStreams_all() { } for resp, err := range c.ListStreams(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleStreamsClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/visionai/apiv1/visionaipb/annotations.pb.go b/visionai/apiv1/visionaipb/annotations.pb.go index 7752f26a8283..a22a39f2cfbf 100755 --- a/visionai/apiv1/visionaipb/annotations.pb.go +++ b/visionai/apiv1/visionaipb/annotations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/annotations.proto @@ -109,11 +109,9 @@ type PersonalProtectiveEquipmentDetectionOutput struct { func (x *PersonalProtectiveEquipmentDetectionOutput) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput) String() string { @@ -124,7 +122,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput) ProtoMessage() {} func (x *PersonalProtectiveEquipmentDetectionOutput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,11 +165,9 @@ type ObjectDetectionPredictionResult struct { func (x *ObjectDetectionPredictionResult) Reset() { *x = ObjectDetectionPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionPredictionResult) String() string { @@ -182,7 +178,7 @@ func (*ObjectDetectionPredictionResult) ProtoMessage() {} func (x *ObjectDetectionPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,11 +234,9 @@ type ImageObjectDetectionPredictionResult struct { func (x *ImageObjectDetectionPredictionResult) Reset() { *x = ImageObjectDetectionPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageObjectDetectionPredictionResult) String() string { @@ -253,7 +247,7 @@ func (*ImageObjectDetectionPredictionResult) ProtoMessage() {} func (x *ImageObjectDetectionPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -314,11 +308,9 @@ type ClassificationPredictionResult struct { func (x *ClassificationPredictionResult) Reset() { *x = ClassificationPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClassificationPredictionResult) String() string { @@ -329,7 +321,7 @@ func (*ClassificationPredictionResult) ProtoMessage() {} func (x *ClassificationPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,11 +380,9 @@ type ImageSegmentationPredictionResult struct { func (x *ImageSegmentationPredictionResult) Reset() { *x = ImageSegmentationPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageSegmentationPredictionResult) String() string { @@ -403,7 +393,7 @@ func (*ImageSegmentationPredictionResult) ProtoMessage() {} func (x *ImageSegmentationPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -451,11 +441,9 @@ type VideoActionRecognitionPredictionResult struct { func (x *VideoActionRecognitionPredictionResult) Reset() { *x = VideoActionRecognitionPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoActionRecognitionPredictionResult) String() string { @@ -466,7 +454,7 @@ func (*VideoActionRecognitionPredictionResult) ProtoMessage() {} func (x *VideoActionRecognitionPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -521,11 +509,9 @@ type VideoObjectTrackingPredictionResult struct { func (x *VideoObjectTrackingPredictionResult) Reset() { *x = VideoObjectTrackingPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingPredictionResult) String() string { @@ -536,7 +522,7 @@ func (*VideoObjectTrackingPredictionResult) ProtoMessage() {} func (x *VideoObjectTrackingPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -592,11 +578,9 @@ type VideoClassificationPredictionResult struct { func (x *VideoClassificationPredictionResult) Reset() { *x = VideoClassificationPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationPredictionResult) String() string { @@ -607,7 +591,7 @@ func (*VideoClassificationPredictionResult) ProtoMessage() {} func (x *VideoClassificationPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,11 +651,9 @@ type OccupancyCountingPredictionResult struct { func (x *OccupancyCountingPredictionResult) Reset() { *x = OccupancyCountingPredictionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult) String() string { @@ -682,7 +664,7 @@ func (*OccupancyCountingPredictionResult) ProtoMessage() {} func (x *OccupancyCountingPredictionResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -764,11 +746,9 @@ type StreamAnnotation struct { func (x *StreamAnnotation) Reset() { *x = StreamAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamAnnotation) String() string { @@ -779,7 +759,7 @@ func (*StreamAnnotation) ProtoMessage() {} func (x *StreamAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,11 +853,9 @@ type StreamAnnotations struct { func (x *StreamAnnotations) Reset() { *x = StreamAnnotations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamAnnotations) String() string { @@ -888,7 +866,7 @@ func (*StreamAnnotations) ProtoMessage() {} func (x *StreamAnnotations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,11 +901,9 @@ type NormalizedPolygon struct { func (x *NormalizedPolygon) Reset() { *x = NormalizedPolygon{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedPolygon) String() string { @@ -938,7 +914,7 @@ func (*NormalizedPolygon) ProtoMessage() {} func (x *NormalizedPolygon) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -973,11 +949,9 @@ type NormalizedPolyline struct { func (x *NormalizedPolyline) Reset() { *x = NormalizedPolyline{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedPolyline) String() string { @@ -988,7 +962,7 @@ func (*NormalizedPolyline) ProtoMessage() {} func (x *NormalizedPolyline) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1026,11 +1000,9 @@ type NormalizedVertex struct { func (x *NormalizedVertex) Reset() { *x = NormalizedVertex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NormalizedVertex) String() string { @@ -1041,7 +1013,7 @@ func (*NormalizedVertex) ProtoMessage() {} func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,11 +1063,9 @@ type AppPlatformMetadata struct { func (x *AppPlatformMetadata) Reset() { *x = AppPlatformMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformMetadata) String() string { @@ -1106,7 +1076,7 @@ func (*AppPlatformMetadata) ProtoMessage() {} func (x *AppPlatformMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1167,11 +1137,9 @@ type AppPlatformCloudFunctionRequest struct { func (x *AppPlatformCloudFunctionRequest) Reset() { *x = AppPlatformCloudFunctionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformCloudFunctionRequest) String() string { @@ -1182,7 +1150,7 @@ func (*AppPlatformCloudFunctionRequest) ProtoMessage() {} func (x *AppPlatformCloudFunctionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1200,9 @@ type AppPlatformCloudFunctionResponse struct { func (x *AppPlatformCloudFunctionResponse) Reset() { *x = AppPlatformCloudFunctionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformCloudFunctionResponse) String() string { @@ -1247,7 +1213,7 @@ func (*AppPlatformCloudFunctionResponse) ProtoMessage() {} func (x *AppPlatformCloudFunctionResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1270,9 @@ type AppPlatformEventBody struct { func (x *AppPlatformEventBody) Reset() { *x = AppPlatformEventBody{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformEventBody) String() string { @@ -1319,7 +1283,7 @@ func (*AppPlatformEventBody) ProtoMessage() {} func (x *AppPlatformEventBody) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1367,11 +1331,9 @@ type PersonalProtectiveEquipmentDetectionOutput_PersonEntity struct { func (x *PersonalProtectiveEquipmentDetectionOutput_PersonEntity) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_PersonEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_PersonEntity) String() string { @@ -1382,7 +1344,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_PersonEntity) ProtoMessage() { func (x *PersonalProtectiveEquipmentDetectionOutput_PersonEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1423,11 +1385,9 @@ type PersonalProtectiveEquipmentDetectionOutput_PPEEntity struct { func (x *PersonalProtectiveEquipmentDetectionOutput_PPEEntity) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_PPEEntity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_PPEEntity) String() string { @@ -1438,7 +1398,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_PPEEntity) ProtoMessage() {} func (x *PersonalProtectiveEquipmentDetectionOutput_PPEEntity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,11 +1459,9 @@ type PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox struct { func (x *PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox) String() string { @@ -1514,7 +1472,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox) ProtoMe func (x *PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1576,11 +1534,9 @@ type PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox struct { func (x *PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox) String() string { @@ -1591,7 +1547,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox) ProtoMess func (x *PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,11 +1608,9 @@ type PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox struct { func (x *PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox) String() string { @@ -1667,7 +1621,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox) ProtoMessage func (x *PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1740,11 +1694,9 @@ type PersonalProtectiveEquipmentDetectionOutput_DetectedPerson struct { func (x *PersonalProtectiveEquipmentDetectionOutput_DetectedPerson) Reset() { *x = PersonalProtectiveEquipmentDetectionOutput_DetectedPerson{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionOutput_DetectedPerson) String() string { @@ -1755,7 +1707,7 @@ func (*PersonalProtectiveEquipmentDetectionOutput_DetectedPerson) ProtoMessage() func (x *PersonalProtectiveEquipmentDetectionOutput_DetectedPerson) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1799,9 @@ type ObjectDetectionPredictionResult_Entity struct { func (x *ObjectDetectionPredictionResult_Entity) Reset() { *x = ObjectDetectionPredictionResult_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionPredictionResult_Entity) String() string { @@ -1862,7 +1812,7 @@ func (*ObjectDetectionPredictionResult_Entity) ProtoMessage() {} func (x *ObjectDetectionPredictionResult_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1909,11 +1859,9 @@ type ObjectDetectionPredictionResult_IdentifiedBox struct { func (x *ObjectDetectionPredictionResult_IdentifiedBox) Reset() { *x = ObjectDetectionPredictionResult_IdentifiedBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionPredictionResult_IdentifiedBox) String() string { @@ -1924,7 +1872,7 @@ func (*ObjectDetectionPredictionResult_IdentifiedBox) ProtoMessage() {} func (x *ObjectDetectionPredictionResult_IdentifiedBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1985,11 +1933,9 @@ type ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox struct func (x *ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox) Reset() { *x = ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox) String() string { @@ -2000,7 +1946,7 @@ func (*ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox) Prot func (x *ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2062,11 +2008,9 @@ type VideoActionRecognitionPredictionResult_IdentifiedAction struct { func (x *VideoActionRecognitionPredictionResult_IdentifiedAction) Reset() { *x = VideoActionRecognitionPredictionResult_IdentifiedAction{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoActionRecognitionPredictionResult_IdentifiedAction) String() string { @@ -2077,7 +2021,7 @@ func (*VideoActionRecognitionPredictionResult_IdentifiedAction) ProtoMessage() { func (x *VideoActionRecognitionPredictionResult_IdentifiedAction) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2133,11 +2077,9 @@ type VideoObjectTrackingPredictionResult_BoundingBox struct { func (x *VideoObjectTrackingPredictionResult_BoundingBox) Reset() { *x = VideoObjectTrackingPredictionResult_BoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingPredictionResult_BoundingBox) String() string { @@ -2148,7 +2090,7 @@ func (*VideoObjectTrackingPredictionResult_BoundingBox) ProtoMessage() {} func (x *VideoObjectTrackingPredictionResult_BoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2217,11 +2159,9 @@ type VideoObjectTrackingPredictionResult_DetectedObject struct { func (x *VideoObjectTrackingPredictionResult_DetectedObject) Reset() { *x = VideoObjectTrackingPredictionResult_DetectedObject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoObjectTrackingPredictionResult_DetectedObject) String() string { @@ -2232,7 +2172,7 @@ func (*VideoObjectTrackingPredictionResult_DetectedObject) ProtoMessage() {} func (x *VideoObjectTrackingPredictionResult_DetectedObject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2301,11 +2241,9 @@ type VideoClassificationPredictionResult_IdentifiedClassification struct { func (x *VideoClassificationPredictionResult_IdentifiedClassification) Reset() { *x = VideoClassificationPredictionResult_IdentifiedClassification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoClassificationPredictionResult_IdentifiedClassification) String() string { @@ -2316,7 +2254,7 @@ func (*VideoClassificationPredictionResult_IdentifiedClassification) ProtoMessag func (x *VideoClassificationPredictionResult_IdentifiedClassification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,11 +2304,9 @@ type OccupancyCountingPredictionResult_Entity struct { func (x *OccupancyCountingPredictionResult_Entity) Reset() { *x = OccupancyCountingPredictionResult_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Entity) String() string { @@ -2381,7 +2317,7 @@ func (*OccupancyCountingPredictionResult_Entity) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_Entity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2431,11 +2367,9 @@ type OccupancyCountingPredictionResult_IdentifiedBox struct { func (x *OccupancyCountingPredictionResult_IdentifiedBox) Reset() { *x = OccupancyCountingPredictionResult_IdentifiedBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_IdentifiedBox) String() string { @@ -2446,7 +2380,7 @@ func (*OccupancyCountingPredictionResult_IdentifiedBox) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_IdentifiedBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2512,11 +2446,9 @@ type OccupancyCountingPredictionResult_Stats struct { func (x *OccupancyCountingPredictionResult_Stats) Reset() { *x = OccupancyCountingPredictionResult_Stats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Stats) String() string { @@ -2527,7 +2459,7 @@ func (*OccupancyCountingPredictionResult_Stats) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_Stats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2577,11 +2509,9 @@ type OccupancyCountingPredictionResult_TrackInfo struct { func (x *OccupancyCountingPredictionResult_TrackInfo) Reset() { *x = OccupancyCountingPredictionResult_TrackInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_TrackInfo) String() string { @@ -2592,7 +2522,7 @@ func (*OccupancyCountingPredictionResult_TrackInfo) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_TrackInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2639,11 +2569,9 @@ type OccupancyCountingPredictionResult_DwellTimeInfo struct { func (x *OccupancyCountingPredictionResult_DwellTimeInfo) Reset() { *x = OccupancyCountingPredictionResult_DwellTimeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_DwellTimeInfo) String() string { @@ -2654,7 +2582,7 @@ func (*OccupancyCountingPredictionResult_DwellTimeInfo) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_DwellTimeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2715,11 +2643,9 @@ type OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox struc func (x *OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox) Reset() { *x = OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox) String() string { @@ -2730,7 +2656,7 @@ func (*OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox) Pr func (x *OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2788,11 +2714,9 @@ type OccupancyCountingPredictionResult_Stats_ObjectCount struct { func (x *OccupancyCountingPredictionResult_Stats_ObjectCount) Reset() { *x = OccupancyCountingPredictionResult_Stats_ObjectCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Stats_ObjectCount) String() string { @@ -2803,7 +2727,7 @@ func (*OccupancyCountingPredictionResult_Stats_ObjectCount) ProtoMessage() {} func (x *OccupancyCountingPredictionResult_Stats_ObjectCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2847,11 +2771,9 @@ type OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount struct { func (x *OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount) Reset() { *x = OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount) String() string { @@ -2862,7 +2784,7 @@ func (*OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount) ProtoMess func (x *OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2911,11 +2833,9 @@ type OccupancyCountingPredictionResult_Stats_CrossingLineCount struct { func (x *OccupancyCountingPredictionResult_Stats_CrossingLineCount) Reset() { *x = OccupancyCountingPredictionResult_Stats_CrossingLineCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Stats_CrossingLineCount) String() string { @@ -2926,7 +2846,7 @@ func (*OccupancyCountingPredictionResult_Stats_CrossingLineCount) ProtoMessage() func (x *OccupancyCountingPredictionResult_Stats_CrossingLineCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2990,11 +2910,9 @@ type OccupancyCountingPredictionResult_Stats_ActiveZoneCount struct { func (x *OccupancyCountingPredictionResult_Stats_ActiveZoneCount) Reset() { *x = OccupancyCountingPredictionResult_Stats_ActiveZoneCount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountingPredictionResult_Stats_ActiveZoneCount) String() string { @@ -3005,7 +2923,7 @@ func (*OccupancyCountingPredictionResult_Stats_ActiveZoneCount) ProtoMessage() { func (x *OccupancyCountingPredictionResult_Stats_ActiveZoneCount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3049,11 +2967,9 @@ type AppPlatformCloudFunctionRequest_StructedInputAnnotation struct { func (x *AppPlatformCloudFunctionRequest_StructedInputAnnotation) Reset() { *x = AppPlatformCloudFunctionRequest_StructedInputAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformCloudFunctionRequest_StructedInputAnnotation) String() string { @@ -3064,7 +2980,7 @@ func (*AppPlatformCloudFunctionRequest_StructedInputAnnotation) ProtoMessage() { func (x *AppPlatformCloudFunctionRequest_StructedInputAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3106,11 +3022,9 @@ type AppPlatformCloudFunctionResponse_StructedOutputAnnotation struct { func (x *AppPlatformCloudFunctionResponse_StructedOutputAnnotation) Reset() { *x = AppPlatformCloudFunctionResponse_StructedOutputAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppPlatformCloudFunctionResponse_StructedOutputAnnotation) String() string { @@ -3121,7 +3035,7 @@ func (*AppPlatformCloudFunctionResponse_StructedOutputAnnotation) ProtoMessage() func (x *AppPlatformCloudFunctionResponse_StructedOutputAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_annotations_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3911,524 +3825,6 @@ func file_google_cloud_visionai_v1_annotations_proto_init() { if File_google_cloud_visionai_v1_annotations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_annotations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ImageObjectDetectionPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ClassificationPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ImageSegmentationPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*VideoActionRecognitionPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StreamAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StreamAnnotations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedPolygon); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedPolyline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*NormalizedVertex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformCloudFunctionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformCloudFunctionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformEventBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_PersonEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_PPEEntity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionOutput_DetectedPerson); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionPredictionResult_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionPredictionResult_IdentifiedBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*VideoActionRecognitionPredictionResult_IdentifiedAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingPredictionResult_BoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*VideoObjectTrackingPredictionResult_DetectedObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*VideoClassificationPredictionResult_IdentifiedClassification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_IdentifiedBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Stats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_TrackInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_DwellTimeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Stats_ObjectCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Stats_CrossingLineCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountingPredictionResult_Stats_ActiveZoneCount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformCloudFunctionRequest_StructedInputAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_annotations_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*AppPlatformCloudFunctionResponse_StructedOutputAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_annotations_proto_msgTypes[8].OneofWrappers = []any{} file_google_cloud_visionai_v1_annotations_proto_msgTypes[9].OneofWrappers = []any{ (*StreamAnnotation_ActiveZone)(nil), diff --git a/visionai/apiv1/visionaipb/common.pb.go b/visionai/apiv1/visionaipb/common.pb.go index d90a302243c0..372f549993d9 100755 --- a/visionai/apiv1/visionaipb/common.pb.go +++ b/visionai/apiv1/visionaipb/common.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/common.proto @@ -126,11 +126,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -141,7 +139,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -240,11 +238,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -255,7 +251,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +327,9 @@ type GcsSource struct { func (x *GcsSource) Reset() { *x = GcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsSource) String() string { @@ -346,7 +340,7 @@ func (*GcsSource) ProtoMessage() {} func (x *GcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -513,44 +507,6 @@ func file_google_cloud_visionai_v1_common_proto_init() { if File_google_cloud_visionai_v1_common_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/health_service.pb.go b/visionai/apiv1/visionaipb/health_service.pb.go index 5f4ccc1d337c..acc649e9c5be 100755 --- a/visionai/apiv1/visionaipb/health_service.pb.go +++ b/visionai/apiv1/visionaipb/health_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/health_service.proto @@ -52,11 +52,9 @@ type HealthCheckRequest struct { func (x *HealthCheckRequest) Reset() { *x = HealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckRequest) String() string { @@ -67,7 +65,7 @@ func (*HealthCheckRequest) ProtoMessage() {} func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type HealthCheckResponse struct { func (x *HealthCheckResponse) Reset() { *x = HealthCheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthCheckResponse) String() string { @@ -120,7 +116,7 @@ func (*HealthCheckResponse) ProtoMessage() {} func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -169,11 +165,9 @@ type ClusterInfo struct { func (x *ClusterInfo) Reset() { *x = ClusterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClusterInfo) String() string { @@ -184,7 +178,7 @@ func (*ClusterInfo) ProtoMessage() {} func (x *ClusterInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_health_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -313,44 +307,6 @@ func file_google_cloud_visionai_v1_health_service_proto_init() { if File_google_cloud_visionai_v1_health_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_health_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_health_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*HealthCheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_health_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ClusterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/lva.pb.go b/visionai/apiv1/visionaipb/lva.pb.go index 6dc9ff5e074c..4f47adfe7393 100755 --- a/visionai/apiv1/visionaipb/lva.pb.go +++ b/visionai/apiv1/visionaipb/lva.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/lva.proto @@ -187,11 +187,9 @@ type OperatorDefinition struct { func (x *OperatorDefinition) Reset() { *x = OperatorDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperatorDefinition) String() string { @@ -202,7 +200,7 @@ func (*OperatorDefinition) ProtoMessage() {} func (x *OperatorDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +325,9 @@ type ResourceSpecification struct { func (x *ResourceSpecification) Reset() { *x = ResourceSpecification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceSpecification) String() string { @@ -342,7 +338,7 @@ func (*ResourceSpecification) ProtoMessage() {} func (x *ResourceSpecification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +414,9 @@ type AttributeValue struct { func (x *AttributeValue) Reset() { *x = AttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AttributeValue) String() string { @@ -433,7 +427,7 @@ func (*AttributeValue) ProtoMessage() {} func (x *AttributeValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,11 +543,9 @@ type AnalyzerDefinition struct { func (x *AnalyzerDefinition) Reset() { *x = AnalyzerDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerDefinition) String() string { @@ -564,7 +556,7 @@ func (*AnalyzerDefinition) ProtoMessage() {} func (x *AnalyzerDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +632,9 @@ type AnalysisDefinition struct { func (x *AnalysisDefinition) Reset() { *x = AnalysisDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalysisDefinition) String() string { @@ -655,7 +645,7 @@ func (*AnalysisDefinition) ProtoMessage() {} func (x *AnalysisDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -691,11 +681,9 @@ type RunStatus struct { func (x *RunStatus) Reset() { *x = RunStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunStatus) String() string { @@ -706,7 +694,7 @@ func (*RunStatus) ProtoMessage() {} func (x *RunStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +744,9 @@ type OperatorDefinition_ArgumentDefinition struct { func (x *OperatorDefinition_ArgumentDefinition) Reset() { *x = OperatorDefinition_ArgumentDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperatorDefinition_ArgumentDefinition) String() string { @@ -771,7 +757,7 @@ func (*OperatorDefinition_ArgumentDefinition) ProtoMessage() {} func (x *OperatorDefinition_ArgumentDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -821,11 +807,9 @@ type OperatorDefinition_AttributeDefinition struct { func (x *OperatorDefinition_AttributeDefinition) Reset() { *x = OperatorDefinition_AttributeDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperatorDefinition_AttributeDefinition) String() string { @@ -836,7 +820,7 @@ func (*OperatorDefinition_AttributeDefinition) ProtoMessage() {} func (x *OperatorDefinition_AttributeDefinition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -901,11 +885,9 @@ type AnalyzerDefinition_StreamInput struct { func (x *AnalyzerDefinition_StreamInput) Reset() { *x = AnalyzerDefinition_StreamInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerDefinition_StreamInput) String() string { @@ -916,7 +898,7 @@ func (*AnalyzerDefinition_StreamInput) ProtoMessage() {} func (x *AnalyzerDefinition_StreamInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +932,9 @@ type AnalyzerDefinition_DebugOptions struct { func (x *AnalyzerDefinition_DebugOptions) Reset() { *x = AnalyzerDefinition_DebugOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerDefinition_DebugOptions) String() string { @@ -965,7 +945,7 @@ func (*AnalyzerDefinition_DebugOptions) ProtoMessage() {} func (x *AnalyzerDefinition_DebugOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1001,11 +981,9 @@ type AnalyzerDefinition_OperatorOption struct { func (x *AnalyzerDefinition_OperatorOption) Reset() { *x = AnalyzerDefinition_OperatorOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzerDefinition_OperatorOption) String() string { @@ -1016,7 +994,7 @@ func (*AnalyzerDefinition_OperatorOption) ProtoMessage() {} func (x *AnalyzerDefinition_OperatorOption) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,140 +1242,6 @@ func file_google_cloud_visionai_v1_lva_proto_init() { if File_google_cloud_visionai_v1_lva_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_lva_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*OperatorDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceSpecification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*AnalysisDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*RunStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OperatorDefinition_ArgumentDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperatorDefinition_AttributeDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerDefinition_StreamInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerDefinition_DebugOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzerDefinition_OperatorOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_lva_proto_msgTypes[2].OneofWrappers = []any{ (*AttributeValue_I)(nil), (*AttributeValue_F)(nil), diff --git a/visionai/apiv1/visionaipb/lva_resources.pb.go b/visionai/apiv1/visionaipb/lva_resources.pb.go index 53d2f268aa9f..5b9e22b4c734 100755 --- a/visionai/apiv1/visionaipb/lva_resources.pb.go +++ b/visionai/apiv1/visionaipb/lva_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/lva_resources.proto @@ -59,11 +59,9 @@ type Operator struct { func (x *Operator) Reset() { *x = Operator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operator) String() string { @@ -74,7 +72,7 @@ func (*Operator) ProtoMessage() {} func (x *Operator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,11 +164,9 @@ type Analysis struct { func (x *Analysis) Reset() { *x = Analysis{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Analysis) String() string { @@ -181,7 +177,7 @@ func (*Analysis) ProtoMessage() {} func (x *Analysis) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,11 +284,9 @@ type Process struct { func (x *Process) Reset() { *x = Process{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Process) String() string { @@ -303,7 +297,7 @@ func (*Process) ProtoMessage() {} func (x *Process) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -605,44 +599,6 @@ func file_google_cloud_visionai_v1_lva_resources_proto_init() { return } file_google_cloud_visionai_v1_lva_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Operator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Analysis); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Process); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/lva_service.pb.go b/visionai/apiv1/visionaipb/lva_service.pb.go index 092b27db0011..7543f2f0074f 100755 --- a/visionai/apiv1/visionaipb/lva_service.pb.go +++ b/visionai/apiv1/visionaipb/lva_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/lva_service.proto @@ -117,11 +117,9 @@ type ListOperatorsRequest struct { func (x *ListOperatorsRequest) Reset() { *x = ListOperatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperatorsRequest) String() string { @@ -132,7 +130,7 @@ func (*ListOperatorsRequest) ProtoMessage() {} func (x *ListOperatorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +196,9 @@ type ListOperatorsResponse struct { func (x *ListOperatorsResponse) Reset() { *x = ListOperatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperatorsResponse) String() string { @@ -213,7 +209,7 @@ func (*ListOperatorsResponse) ProtoMessage() {} func (x *ListOperatorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,11 +257,9 @@ type GetOperatorRequest struct { func (x *GetOperatorRequest) Reset() { *x = GetOperatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOperatorRequest) String() string { @@ -276,7 +270,7 @@ func (*GetOperatorRequest) ProtoMessage() {} func (x *GetOperatorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +322,9 @@ type CreateOperatorRequest struct { func (x *CreateOperatorRequest) Reset() { *x = CreateOperatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOperatorRequest) String() string { @@ -343,7 +335,7 @@ func (*CreateOperatorRequest) ProtoMessage() {} func (x *CreateOperatorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type UpdateOperatorRequest struct { func (x *UpdateOperatorRequest) Reset() { *x = UpdateOperatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateOperatorRequest) String() string { @@ -433,7 +423,7 @@ func (*UpdateOperatorRequest) ProtoMessage() {} func (x *UpdateOperatorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +485,9 @@ type DeleteOperatorRequest struct { func (x *DeleteOperatorRequest) Reset() { *x = DeleteOperatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperatorRequest) String() string { @@ -510,7 +498,7 @@ func (*DeleteOperatorRequest) ProtoMessage() {} func (x *DeleteOperatorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +548,9 @@ type ListAnalysesRequest struct { func (x *ListAnalysesRequest) Reset() { *x = ListAnalysesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysesRequest) String() string { @@ -575,7 +561,7 @@ func (*ListAnalysesRequest) ProtoMessage() {} func (x *ListAnalysesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -641,11 +627,9 @@ type ListAnalysesResponse struct { func (x *ListAnalysesResponse) Reset() { *x = ListAnalysesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnalysesResponse) String() string { @@ -656,7 +640,7 @@ func (*ListAnalysesResponse) ProtoMessage() {} func (x *ListAnalysesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -704,11 +688,9 @@ type GetAnalysisRequest struct { func (x *GetAnalysisRequest) Reset() { *x = GetAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnalysisRequest) String() string { @@ -719,7 +701,7 @@ func (*GetAnalysisRequest) ProtoMessage() {} func (x *GetAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -771,11 +753,9 @@ type CreateAnalysisRequest struct { func (x *CreateAnalysisRequest) Reset() { *x = CreateAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnalysisRequest) String() string { @@ -786,7 +766,7 @@ func (*CreateAnalysisRequest) ProtoMessage() {} func (x *CreateAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -861,11 +841,9 @@ type UpdateAnalysisRequest struct { func (x *UpdateAnalysisRequest) Reset() { *x = UpdateAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAnalysisRequest) String() string { @@ -876,7 +854,7 @@ func (*UpdateAnalysisRequest) ProtoMessage() {} func (x *UpdateAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +916,9 @@ type DeleteAnalysisRequest struct { func (x *DeleteAnalysisRequest) Reset() { *x = DeleteAnalysisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnalysisRequest) String() string { @@ -953,7 +929,7 @@ func (*DeleteAnalysisRequest) ProtoMessage() {} func (x *DeleteAnalysisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,11 +979,9 @@ type ListProcessesRequest struct { func (x *ListProcessesRequest) Reset() { *x = ListProcessesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessesRequest) String() string { @@ -1018,7 +992,7 @@ func (*ListProcessesRequest) ProtoMessage() {} func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,11 +1058,9 @@ type ListProcessesResponse struct { func (x *ListProcessesResponse) Reset() { *x = ListProcessesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessesResponse) String() string { @@ -1099,7 +1071,7 @@ func (*ListProcessesResponse) ProtoMessage() {} func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1147,11 +1119,9 @@ type GetProcessRequest struct { func (x *GetProcessRequest) Reset() { *x = GetProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessRequest) String() string { @@ -1162,7 +1132,7 @@ func (*GetProcessRequest) ProtoMessage() {} func (x *GetProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1214,11 +1184,9 @@ type CreateProcessRequest struct { func (x *CreateProcessRequest) Reset() { *x = CreateProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProcessRequest) String() string { @@ -1229,7 +1197,7 @@ func (*CreateProcessRequest) ProtoMessage() {} func (x *CreateProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1272,9 @@ type UpdateProcessRequest struct { func (x *UpdateProcessRequest) Reset() { *x = UpdateProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProcessRequest) String() string { @@ -1319,7 +1285,7 @@ func (*UpdateProcessRequest) ProtoMessage() {} func (x *UpdateProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1381,11 +1347,9 @@ type DeleteProcessRequest struct { func (x *DeleteProcessRequest) Reset() { *x = DeleteProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessRequest) String() string { @@ -1396,7 +1360,7 @@ func (*DeleteProcessRequest) ProtoMessage() {} func (x *DeleteProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1443,11 +1407,9 @@ type BatchRunProcessRequest struct { func (x *BatchRunProcessRequest) Reset() { *x = BatchRunProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunProcessRequest) String() string { @@ -1458,7 +1420,7 @@ func (*BatchRunProcessRequest) ProtoMessage() {} func (x *BatchRunProcessRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1515,11 +1477,9 @@ type BatchRunProcessResponse struct { func (x *BatchRunProcessResponse) Reset() { *x = BatchRunProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunProcessResponse) String() string { @@ -1530,7 +1490,7 @@ func (*BatchRunProcessResponse) ProtoMessage() {} func (x *BatchRunProcessResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1573,11 +1533,9 @@ type ResolveOperatorInfoRequest struct { func (x *ResolveOperatorInfoRequest) Reset() { *x = ResolveOperatorInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveOperatorInfoRequest) String() string { @@ -1588,7 +1546,7 @@ func (*ResolveOperatorInfoRequest) ProtoMessage() {} func (x *ResolveOperatorInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1633,11 +1591,9 @@ type OperatorQuery struct { func (x *OperatorQuery) Reset() { *x = OperatorQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperatorQuery) String() string { @@ -1648,7 +1604,7 @@ func (*OperatorQuery) ProtoMessage() {} func (x *OperatorQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1696,11 +1652,9 @@ type ResolveOperatorInfoResponse struct { func (x *ResolveOperatorInfoResponse) Reset() { *x = ResolveOperatorInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResolveOperatorInfoResponse) String() string { @@ -1711,7 +1665,7 @@ func (*ResolveOperatorInfoResponse) ProtoMessage() {} func (x *ResolveOperatorInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,11 +1708,9 @@ type ListPublicOperatorsRequest struct { func (x *ListPublicOperatorsRequest) Reset() { *x = ListPublicOperatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicOperatorsRequest) String() string { @@ -1769,7 +1721,7 @@ func (*ListPublicOperatorsRequest) ProtoMessage() {} func (x *ListPublicOperatorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1833,11 +1785,9 @@ type ListPublicOperatorsResponse struct { func (x *ListPublicOperatorsResponse) Reset() { *x = ListPublicOperatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPublicOperatorsResponse) String() string { @@ -1848,7 +1798,7 @@ func (*ListPublicOperatorsResponse) ProtoMessage() {} func (x *ListPublicOperatorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1891,11 +1841,9 @@ type BatchRunProcessRequest_BatchRunProcessOptions struct { func (x *BatchRunProcessRequest_BatchRunProcessOptions) Reset() { *x = BatchRunProcessRequest_BatchRunProcessOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchRunProcessRequest_BatchRunProcessOptions) String() string { @@ -1906,7 +1854,7 @@ func (*BatchRunProcessRequest_BatchRunProcessOptions) ProtoMessage() {} func (x *BatchRunProcessRequest_BatchRunProcessOptions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_lva_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2606,320 +2554,6 @@ func file_google_cloud_visionai_v1_lva_service_proto_init() { } file_google_cloud_visionai_v1_common_proto_init() file_google_cloud_visionai_v1_lva_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListOperatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListOperatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetOperatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateOperatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateOperatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListAnalysesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnalysisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ResolveOperatorInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*OperatorQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ResolveOperatorInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicOperatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListPublicOperatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_lva_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*BatchRunProcessRequest_BatchRunProcessOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/platform.pb.go b/visionai/apiv1/visionaipb/platform.pb.go index 530f70bb84e6..85896d20d274 100755 --- a/visionai/apiv1/visionaipb/platform.pb.go +++ b/visionai/apiv1/visionaipb/platform.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/platform.proto @@ -861,11 +861,9 @@ type DeleteApplicationInstancesResponse struct { func (x *DeleteApplicationInstancesResponse) Reset() { *x = DeleteApplicationInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApplicationInstancesResponse) String() string { @@ -876,7 +874,7 @@ func (*DeleteApplicationInstancesResponse) ProtoMessage() {} func (x *DeleteApplicationInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +898,9 @@ type CreateApplicationInstancesResponse struct { func (x *CreateApplicationInstancesResponse) Reset() { *x = CreateApplicationInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApplicationInstancesResponse) String() string { @@ -915,7 +911,7 @@ func (*CreateApplicationInstancesResponse) ProtoMessage() {} func (x *CreateApplicationInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +935,9 @@ type UpdateApplicationInstancesResponse struct { func (x *UpdateApplicationInstancesResponse) Reset() { *x = UpdateApplicationInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationInstancesResponse) String() string { @@ -954,7 +948,7 @@ func (*UpdateApplicationInstancesResponse) ProtoMessage() {} func (x *UpdateApplicationInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +993,9 @@ type CreateApplicationInstancesRequest struct { func (x *CreateApplicationInstancesRequest) Reset() { *x = CreateApplicationInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApplicationInstancesRequest) String() string { @@ -1014,7 +1006,7 @@ func (*CreateApplicationInstancesRequest) ProtoMessage() {} func (x *CreateApplicationInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,11 +1072,9 @@ type DeleteApplicationInstancesRequest struct { func (x *DeleteApplicationInstancesRequest) Reset() { *x = DeleteApplicationInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApplicationInstancesRequest) String() string { @@ -1095,7 +1085,7 @@ func (*DeleteApplicationInstancesRequest) ProtoMessage() {} func (x *DeleteApplicationInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1141,11 +1131,9 @@ type DeployApplicationResponse struct { func (x *DeployApplicationResponse) Reset() { *x = DeployApplicationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployApplicationResponse) String() string { @@ -1156,7 +1144,7 @@ func (*DeployApplicationResponse) ProtoMessage() {} func (x *DeployApplicationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,11 +1168,9 @@ type UndeployApplicationResponse struct { func (x *UndeployApplicationResponse) Reset() { *x = UndeployApplicationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployApplicationResponse) String() string { @@ -1195,7 +1181,7 @@ func (*UndeployApplicationResponse) ProtoMessage() {} func (x *UndeployApplicationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,11 +1205,9 @@ type RemoveApplicationStreamInputResponse struct { func (x *RemoveApplicationStreamInputResponse) Reset() { *x = RemoveApplicationStreamInputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveApplicationStreamInputResponse) String() string { @@ -1234,7 +1218,7 @@ func (*RemoveApplicationStreamInputResponse) ProtoMessage() {} func (x *RemoveApplicationStreamInputResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1242,9 @@ type AddApplicationStreamInputResponse struct { func (x *AddApplicationStreamInputResponse) Reset() { *x = AddApplicationStreamInputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddApplicationStreamInputResponse) String() string { @@ -1273,7 +1255,7 @@ func (*AddApplicationStreamInputResponse) ProtoMessage() {} func (x *AddApplicationStreamInputResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1297,11 +1279,9 @@ type UpdateApplicationStreamInputResponse struct { func (x *UpdateApplicationStreamInputResponse) Reset() { *x = UpdateApplicationStreamInputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationStreamInputResponse) String() string { @@ -1312,7 +1292,7 @@ func (*UpdateApplicationStreamInputResponse) ProtoMessage() {} func (x *UpdateApplicationStreamInputResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1348,11 +1328,9 @@ type ListApplicationsRequest struct { func (x *ListApplicationsRequest) Reset() { *x = ListApplicationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApplicationsRequest) String() string { @@ -1363,7 +1341,7 @@ func (*ListApplicationsRequest) ProtoMessage() {} func (x *ListApplicationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1429,11 +1407,9 @@ type ListApplicationsResponse struct { func (x *ListApplicationsResponse) Reset() { *x = ListApplicationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListApplicationsResponse) String() string { @@ -1444,7 +1420,7 @@ func (*ListApplicationsResponse) ProtoMessage() {} func (x *ListApplicationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1492,11 +1468,9 @@ type GetApplicationRequest struct { func (x *GetApplicationRequest) Reset() { *x = GetApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetApplicationRequest) String() string { @@ -1507,7 +1481,7 @@ func (*GetApplicationRequest) ProtoMessage() {} func (x *GetApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1559,11 +1533,9 @@ type CreateApplicationRequest struct { func (x *CreateApplicationRequest) Reset() { *x = CreateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateApplicationRequest) String() string { @@ -1574,7 +1546,7 @@ func (*CreateApplicationRequest) ProtoMessage() {} func (x *CreateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1649,11 +1621,9 @@ type UpdateApplicationRequest struct { func (x *UpdateApplicationRequest) Reset() { *x = UpdateApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationRequest) String() string { @@ -1664,7 +1634,7 @@ func (*UpdateApplicationRequest) ProtoMessage() {} func (x *UpdateApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1730,11 +1700,9 @@ type DeleteApplicationRequest struct { func (x *DeleteApplicationRequest) Reset() { *x = DeleteApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteApplicationRequest) String() string { @@ -1745,7 +1713,7 @@ func (*DeleteApplicationRequest) ProtoMessage() {} func (x *DeleteApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1815,11 +1783,9 @@ type DeployApplicationRequest struct { func (x *DeployApplicationRequest) Reset() { *x = DeployApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployApplicationRequest) String() string { @@ -1830,7 +1796,7 @@ func (*DeployApplicationRequest) ProtoMessage() {} func (x *DeployApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1901,11 +1867,9 @@ type UndeployApplicationRequest struct { func (x *UndeployApplicationRequest) Reset() { *x = UndeployApplicationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployApplicationRequest) String() string { @@ -1916,7 +1880,7 @@ func (*UndeployApplicationRequest) ProtoMessage() {} func (x *UndeployApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1956,11 +1920,9 @@ type ApplicationStreamInput struct { func (x *ApplicationStreamInput) Reset() { *x = ApplicationStreamInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationStreamInput) String() string { @@ -1971,7 +1933,7 @@ func (*ApplicationStreamInput) ProtoMessage() {} func (x *ApplicationStreamInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2024,11 +1986,9 @@ type AddApplicationStreamInputRequest struct { func (x *AddApplicationStreamInputRequest) Reset() { *x = AddApplicationStreamInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddApplicationStreamInputRequest) String() string { @@ -2039,7 +1999,7 @@ func (*AddApplicationStreamInputRequest) ProtoMessage() {} func (x *AddApplicationStreamInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2109,11 +2069,9 @@ type UpdateApplicationStreamInputRequest struct { func (x *UpdateApplicationStreamInputRequest) Reset() { *x = UpdateApplicationStreamInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationStreamInputRequest) String() string { @@ -2124,7 +2082,7 @@ func (*UpdateApplicationStreamInputRequest) ProtoMessage() {} func (x *UpdateApplicationStreamInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2197,11 +2155,9 @@ type RemoveApplicationStreamInputRequest struct { func (x *RemoveApplicationStreamInputRequest) Reset() { *x = RemoveApplicationStreamInputRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveApplicationStreamInputRequest) String() string { @@ -2212,7 +2168,7 @@ func (*RemoveApplicationStreamInputRequest) ProtoMessage() {} func (x *RemoveApplicationStreamInputRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2269,11 +2225,9 @@ type ListInstancesRequest struct { func (x *ListInstancesRequest) Reset() { *x = ListInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesRequest) String() string { @@ -2284,7 +2238,7 @@ func (*ListInstancesRequest) ProtoMessage() {} func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2350,11 +2304,9 @@ type ListInstancesResponse struct { func (x *ListInstancesResponse) Reset() { *x = ListInstancesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListInstancesResponse) String() string { @@ -2365,7 +2317,7 @@ func (*ListInstancesResponse) ProtoMessage() {} func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2413,11 +2365,9 @@ type GetInstanceRequest struct { func (x *GetInstanceRequest) Reset() { *x = GetInstanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetInstanceRequest) String() string { @@ -2428,7 +2378,7 @@ func (*GetInstanceRequest) ProtoMessage() {} func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2471,11 +2421,9 @@ type ListDraftsRequest struct { func (x *ListDraftsRequest) Reset() { *x = ListDraftsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDraftsRequest) String() string { @@ -2486,7 +2434,7 @@ func (*ListDraftsRequest) ProtoMessage() {} func (x *ListDraftsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2552,11 +2500,9 @@ type ListDraftsResponse struct { func (x *ListDraftsResponse) Reset() { *x = ListDraftsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDraftsResponse) String() string { @@ -2567,7 +2513,7 @@ func (*ListDraftsResponse) ProtoMessage() {} func (x *ListDraftsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2615,11 +2561,9 @@ type GetDraftRequest struct { func (x *GetDraftRequest) Reset() { *x = GetDraftRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDraftRequest) String() string { @@ -2630,7 +2574,7 @@ func (*GetDraftRequest) ProtoMessage() {} func (x *GetDraftRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2682,11 +2626,9 @@ type CreateDraftRequest struct { func (x *CreateDraftRequest) Reset() { *x = CreateDraftRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDraftRequest) String() string { @@ -2697,7 +2639,7 @@ func (*CreateDraftRequest) ProtoMessage() {} func (x *CreateDraftRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2775,11 +2717,9 @@ type UpdateDraftRequest struct { func (x *UpdateDraftRequest) Reset() { *x = UpdateDraftRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDraftRequest) String() string { @@ -2790,7 +2730,7 @@ func (*UpdateDraftRequest) ProtoMessage() {} func (x *UpdateDraftRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2865,11 +2805,9 @@ type UpdateApplicationInstancesRequest struct { func (x *UpdateApplicationInstancesRequest) Reset() { *x = UpdateApplicationInstancesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationInstancesRequest) String() string { @@ -2880,7 +2818,7 @@ func (*UpdateApplicationInstancesRequest) ProtoMessage() {} func (x *UpdateApplicationInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2949,11 +2887,9 @@ type DeleteDraftRequest struct { func (x *DeleteDraftRequest) Reset() { *x = DeleteDraftRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDraftRequest) String() string { @@ -2964,7 +2900,7 @@ func (*DeleteDraftRequest) ProtoMessage() {} func (x *DeleteDraftRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3014,11 +2950,9 @@ type ListProcessorsRequest struct { func (x *ListProcessorsRequest) Reset() { *x = ListProcessorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsRequest) String() string { @@ -3029,7 +2963,7 @@ func (*ListProcessorsRequest) ProtoMessage() {} func (x *ListProcessorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3095,11 +3029,9 @@ type ListProcessorsResponse struct { func (x *ListProcessorsResponse) Reset() { *x = ListProcessorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListProcessorsResponse) String() string { @@ -3110,7 +3042,7 @@ func (*ListProcessorsResponse) ProtoMessage() {} func (x *ListProcessorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3158,11 +3090,9 @@ type ListPrebuiltProcessorsRequest struct { func (x *ListPrebuiltProcessorsRequest) Reset() { *x = ListPrebuiltProcessorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrebuiltProcessorsRequest) String() string { @@ -3173,7 +3103,7 @@ func (*ListPrebuiltProcessorsRequest) ProtoMessage() {} func (x *ListPrebuiltProcessorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3207,11 +3137,9 @@ type ListPrebuiltProcessorsResponse struct { func (x *ListPrebuiltProcessorsResponse) Reset() { *x = ListPrebuiltProcessorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrebuiltProcessorsResponse) String() string { @@ -3222,7 +3150,7 @@ func (*ListPrebuiltProcessorsResponse) ProtoMessage() {} func (x *ListPrebuiltProcessorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3256,11 +3184,9 @@ type GetProcessorRequest struct { func (x *GetProcessorRequest) Reset() { *x = GetProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetProcessorRequest) String() string { @@ -3271,7 +3197,7 @@ func (*GetProcessorRequest) ProtoMessage() {} func (x *GetProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3323,11 +3249,9 @@ type CreateProcessorRequest struct { func (x *CreateProcessorRequest) Reset() { *x = CreateProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateProcessorRequest) String() string { @@ -3338,7 +3262,7 @@ func (*CreateProcessorRequest) ProtoMessage() {} func (x *CreateProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3413,11 +3337,9 @@ type UpdateProcessorRequest struct { func (x *UpdateProcessorRequest) Reset() { *x = UpdateProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateProcessorRequest) String() string { @@ -3428,7 +3350,7 @@ func (*UpdateProcessorRequest) ProtoMessage() {} func (x *UpdateProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3490,11 +3412,9 @@ type DeleteProcessorRequest struct { func (x *DeleteProcessorRequest) Reset() { *x = DeleteProcessorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteProcessorRequest) String() string { @@ -3505,7 +3425,7 @@ func (*DeleteProcessorRequest) ProtoMessage() {} func (x *DeleteProcessorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3565,11 +3485,9 @@ type Application struct { func (x *Application) Reset() { *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application) String() string { @@ -3580,7 +3498,7 @@ func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3679,11 +3597,9 @@ type ApplicationConfigs struct { func (x *ApplicationConfigs) Reset() { *x = ApplicationConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationConfigs) String() string { @@ -3694,7 +3610,7 @@ func (*ApplicationConfigs) ProtoMessage() {} func (x *ApplicationConfigs) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3749,11 +3665,9 @@ type Node struct { func (x *Node) Reset() { *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Node) String() string { @@ -3764,7 +3678,7 @@ func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3879,11 +3793,9 @@ type Draft struct { func (x *Draft) Reset() { *x = Draft{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Draft) String() string { @@ -3894,7 +3806,7 @@ func (*Draft) ProtoMessage() {} func (x *Draft) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3992,11 +3904,9 @@ type Instance struct { func (x *Instance) Reset() { *x = Instance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance) String() string { @@ -4007,7 +3917,7 @@ func (*Instance) ProtoMessage() {} func (x *Instance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4106,11 +4016,9 @@ type ApplicationInstance struct { func (x *ApplicationInstance) Reset() { *x = ApplicationInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationInstance) String() string { @@ -4121,7 +4029,7 @@ func (*ApplicationInstance) ProtoMessage() {} func (x *ApplicationInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4194,11 +4102,9 @@ type Processor struct { func (x *Processor) Reset() { *x = Processor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Processor) String() string { @@ -4209,7 +4115,7 @@ func (*Processor) ProtoMessage() {} func (x *Processor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4351,11 +4257,9 @@ type ProcessorIOSpec struct { func (x *ProcessorIOSpec) Reset() { *x = ProcessorIOSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorIOSpec) String() string { @@ -4366,7 +4270,7 @@ func (*ProcessorIOSpec) ProtoMessage() {} func (x *ProcessorIOSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4437,11 +4341,9 @@ type CustomProcessorSourceInfo struct { func (x *CustomProcessorSourceInfo) Reset() { *x = CustomProcessorSourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomProcessorSourceInfo) String() string { @@ -4452,7 +4354,7 @@ func (*CustomProcessorSourceInfo) ProtoMessage() {} func (x *CustomProcessorSourceInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4560,11 +4462,9 @@ type ProcessorConfig struct { func (x *ProcessorConfig) Reset() { *x = ProcessorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorConfig) String() string { @@ -4575,7 +4475,7 @@ func (*ProcessorConfig) ProtoMessage() {} func (x *ProcessorConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4857,11 +4757,9 @@ type StreamWithAnnotation struct { func (x *StreamWithAnnotation) Reset() { *x = StreamWithAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamWithAnnotation) String() string { @@ -4872,7 +4770,7 @@ func (*StreamWithAnnotation) ProtoMessage() {} func (x *StreamWithAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4923,11 +4821,9 @@ type ApplicationNodeAnnotation struct { func (x *ApplicationNodeAnnotation) Reset() { *x = ApplicationNodeAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationNodeAnnotation) String() string { @@ -4938,7 +4834,7 @@ func (*ApplicationNodeAnnotation) ProtoMessage() {} func (x *ApplicationNodeAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4988,11 +4884,9 @@ type ResourceAnnotations struct { func (x *ResourceAnnotations) Reset() { *x = ResourceAnnotations{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceAnnotations) String() string { @@ -5003,7 +4897,7 @@ func (*ResourceAnnotations) ProtoMessage() {} func (x *ResourceAnnotations) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5049,11 +4943,9 @@ type VideoStreamInputConfig struct { func (x *VideoStreamInputConfig) Reset() { *x = VideoStreamInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VideoStreamInputConfig) String() string { @@ -5064,7 +4956,7 @@ func (*VideoStreamInputConfig) ProtoMessage() {} func (x *VideoStreamInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5104,11 +4996,9 @@ type AIEnabledDevicesInputConfig struct { func (x *AIEnabledDevicesInputConfig) Reset() { *x = AIEnabledDevicesInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AIEnabledDevicesInputConfig) String() string { @@ -5119,7 +5009,7 @@ func (*AIEnabledDevicesInputConfig) ProtoMessage() {} func (x *AIEnabledDevicesInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5155,11 +5045,9 @@ type MediaWarehouseConfig struct { func (x *MediaWarehouseConfig) Reset() { *x = MediaWarehouseConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MediaWarehouseConfig) String() string { @@ -5170,7 +5058,7 @@ func (*MediaWarehouseConfig) ProtoMessage() {} func (x *MediaWarehouseConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5221,11 +5109,9 @@ type PersonBlurConfig struct { func (x *PersonBlurConfig) Reset() { *x = PersonBlurConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonBlurConfig) String() string { @@ -5236,7 +5122,7 @@ func (*PersonBlurConfig) ProtoMessage() {} func (x *PersonBlurConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5284,11 +5170,9 @@ type OccupancyCountConfig struct { func (x *OccupancyCountConfig) Reset() { *x = OccupancyCountConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OccupancyCountConfig) String() string { @@ -5299,7 +5183,7 @@ func (*OccupancyCountConfig) ProtoMessage() {} func (x *OccupancyCountConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5353,11 +5237,9 @@ type PersonVehicleDetectionConfig struct { func (x *PersonVehicleDetectionConfig) Reset() { *x = PersonVehicleDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonVehicleDetectionConfig) String() string { @@ -5368,7 +5250,7 @@ func (*PersonVehicleDetectionConfig) ProtoMessage() {} func (x *PersonVehicleDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5413,11 +5295,9 @@ type PersonalProtectiveEquipmentDetectionConfig struct { func (x *PersonalProtectiveEquipmentDetectionConfig) Reset() { *x = PersonalProtectiveEquipmentDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PersonalProtectiveEquipmentDetectionConfig) String() string { @@ -5428,7 +5308,7 @@ func (*PersonalProtectiveEquipmentDetectionConfig) ProtoMessage() {} func (x *PersonalProtectiveEquipmentDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5473,11 +5353,9 @@ type GeneralObjectDetectionConfig struct { func (x *GeneralObjectDetectionConfig) Reset() { *x = GeneralObjectDetectionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneralObjectDetectionConfig) String() string { @@ -5488,7 +5366,7 @@ func (*GeneralObjectDetectionConfig) ProtoMessage() {} func (x *GeneralObjectDetectionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5557,11 +5435,9 @@ type BigQueryConfig struct { func (x *BigQueryConfig) Reset() { *x = BigQueryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BigQueryConfig) String() string { @@ -5572,7 +5448,7 @@ func (*BigQueryConfig) ProtoMessage() {} func (x *BigQueryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5624,11 +5500,9 @@ type VertexAutoMLVisionConfig struct { func (x *VertexAutoMLVisionConfig) Reset() { *x = VertexAutoMLVisionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexAutoMLVisionConfig) String() string { @@ -5639,7 +5513,7 @@ func (*VertexAutoMLVisionConfig) ProtoMessage() {} func (x *VertexAutoMLVisionConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5690,11 +5564,9 @@ type VertexAutoMLVideoConfig struct { func (x *VertexAutoMLVideoConfig) Reset() { *x = VertexAutoMLVideoConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexAutoMLVideoConfig) String() string { @@ -5705,7 +5577,7 @@ func (*VertexAutoMLVideoConfig) ProtoMessage() {} func (x *VertexAutoMLVideoConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5801,11 +5673,9 @@ type VertexCustomConfig struct { func (x *VertexCustomConfig) Reset() { *x = VertexCustomConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VertexCustomConfig) String() string { @@ -5816,7 +5686,7 @@ func (*VertexCustomConfig) ProtoMessage() {} func (x *VertexCustomConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5878,11 +5748,9 @@ type GcsOutputConfig struct { func (x *GcsOutputConfig) Reset() { *x = GcsOutputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GcsOutputConfig) String() string { @@ -5893,7 +5761,7 @@ func (*GcsOutputConfig) ProtoMessage() {} func (x *GcsOutputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5924,11 +5792,9 @@ type UniversalInputConfig struct { func (x *UniversalInputConfig) Reset() { *x = UniversalInputConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UniversalInputConfig) String() string { @@ -5939,7 +5805,7 @@ func (*UniversalInputConfig) ProtoMessage() {} func (x *UniversalInputConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5982,11 +5848,9 @@ type MachineSpec struct { func (x *MachineSpec) Reset() { *x = MachineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MachineSpec) String() string { @@ -5997,7 +5861,7 @@ func (*MachineSpec) ProtoMessage() {} func (x *MachineSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6057,11 +5921,9 @@ type AutoscalingMetricSpec struct { func (x *AutoscalingMetricSpec) Reset() { *x = AutoscalingMetricSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingMetricSpec) String() string { @@ -6072,7 +5934,7 @@ func (*AutoscalingMetricSpec) ProtoMessage() {} func (x *AutoscalingMetricSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6162,11 +6024,9 @@ type DedicatedResources struct { func (x *DedicatedResources) Reset() { *x = DedicatedResources{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DedicatedResources) String() string { @@ -6177,7 +6037,7 @@ func (*DedicatedResources) ProtoMessage() {} func (x *DedicatedResources) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6235,11 +6095,9 @@ type ProductRecognizerConfig struct { func (x *ProductRecognizerConfig) Reset() { *x = ProductRecognizerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProductRecognizerConfig) String() string { @@ -6250,7 +6108,7 @@ func (*ProductRecognizerConfig) ProtoMessage() {} func (x *ProductRecognizerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6294,11 +6152,9 @@ type TagRecognizerConfig struct { func (x *TagRecognizerConfig) Reset() { *x = TagRecognizerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagRecognizerConfig) String() string { @@ -6309,7 +6165,7 @@ func (*TagRecognizerConfig) ProtoMessage() {} func (x *TagRecognizerConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6351,11 +6207,9 @@ type TagParsingConfig struct { func (x *TagParsingConfig) Reset() { *x = TagParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagParsingConfig) String() string { @@ -6366,7 +6220,7 @@ func (*TagParsingConfig) ProtoMessage() {} func (x *TagParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6399,11 +6253,9 @@ type RemoveApplicationStreamInputRequest_TargetStreamInput struct { func (x *RemoveApplicationStreamInputRequest_TargetStreamInput) Reset() { *x = RemoveApplicationStreamInputRequest_TargetStreamInput{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveApplicationStreamInputRequest_TargetStreamInput) String() string { @@ -6414,7 +6266,7 @@ func (*RemoveApplicationStreamInputRequest_TargetStreamInput) ProtoMessage() {} func (x *RemoveApplicationStreamInputRequest_TargetStreamInput) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6455,11 +6307,9 @@ type UpdateApplicationInstancesRequest_UpdateApplicationInstance struct { func (x *UpdateApplicationInstancesRequest_UpdateApplicationInstance) Reset() { *x = UpdateApplicationInstancesRequest_UpdateApplicationInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateApplicationInstancesRequest_UpdateApplicationInstance) String() string { @@ -6470,7 +6320,7 @@ func (*UpdateApplicationInstancesRequest_UpdateApplicationInstance) ProtoMessage func (x *UpdateApplicationInstancesRequest_UpdateApplicationInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6522,11 +6372,9 @@ type Application_ApplicationRuntimeInfo struct { func (x *Application_ApplicationRuntimeInfo) Reset() { *x = Application_ApplicationRuntimeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application_ApplicationRuntimeInfo) String() string { @@ -6537,7 +6385,7 @@ func (*Application_ApplicationRuntimeInfo) ProtoMessage() {} func (x *Application_ApplicationRuntimeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6595,11 +6443,9 @@ type Application_ApplicationRuntimeInfo_GlobalOutputResource struct { func (x *Application_ApplicationRuntimeInfo_GlobalOutputResource) Reset() { *x = Application_ApplicationRuntimeInfo_GlobalOutputResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application_ApplicationRuntimeInfo_GlobalOutputResource) String() string { @@ -6610,7 +6456,7 @@ func (*Application_ApplicationRuntimeInfo_GlobalOutputResource) ProtoMessage() { func (x *Application_ApplicationRuntimeInfo_GlobalOutputResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6658,11 +6504,9 @@ type Application_ApplicationRuntimeInfo_MonitoringConfig struct { func (x *Application_ApplicationRuntimeInfo_MonitoringConfig) Reset() { *x = Application_ApplicationRuntimeInfo_MonitoringConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Application_ApplicationRuntimeInfo_MonitoringConfig) String() string { @@ -6673,7 +6517,7 @@ func (*Application_ApplicationRuntimeInfo_MonitoringConfig) ProtoMessage() {} func (x *Application_ApplicationRuntimeInfo_MonitoringConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6715,11 +6559,9 @@ type ApplicationConfigs_EventDeliveryConfig struct { func (x *ApplicationConfigs_EventDeliveryConfig) Reset() { *x = ApplicationConfigs_EventDeliveryConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplicationConfigs_EventDeliveryConfig) String() string { @@ -6730,7 +6572,7 @@ func (*ApplicationConfigs_EventDeliveryConfig) ProtoMessage() {} func (x *ApplicationConfigs_EventDeliveryConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6777,11 +6619,9 @@ type Node_InputEdge struct { func (x *Node_InputEdge) Reset() { *x = Node_InputEdge{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Node_InputEdge) String() string { @@ -6792,7 +6632,7 @@ func (*Node_InputEdge) ProtoMessage() {} func (x *Node_InputEdge) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6858,11 +6698,9 @@ type Instance_InputResource struct { func (x *Instance_InputResource) Reset() { *x = Instance_InputResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_InputResource) String() string { @@ -6873,7 +6711,7 @@ func (*Instance_InputResource) ProtoMessage() {} func (x *Instance_InputResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6992,11 +6830,9 @@ type Instance_OutputResource struct { func (x *Instance_OutputResource) Reset() { *x = Instance_OutputResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Instance_OutputResource) String() string { @@ -7007,7 +6843,7 @@ func (*Instance_OutputResource) ProtoMessage() {} func (x *Instance_OutputResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7085,11 +6921,9 @@ type ProcessorIOSpec_GraphInputChannelSpec struct { func (x *ProcessorIOSpec_GraphInputChannelSpec) Reset() { *x = ProcessorIOSpec_GraphInputChannelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorIOSpec_GraphInputChannelSpec) String() string { @@ -7100,7 +6934,7 @@ func (*ProcessorIOSpec_GraphInputChannelSpec) ProtoMessage() {} func (x *ProcessorIOSpec_GraphInputChannelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7165,11 +6999,9 @@ type ProcessorIOSpec_GraphOutputChannelSpec struct { func (x *ProcessorIOSpec_GraphOutputChannelSpec) Reset() { *x = ProcessorIOSpec_GraphOutputChannelSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorIOSpec_GraphOutputChannelSpec) String() string { @@ -7180,7 +7012,7 @@ func (*ProcessorIOSpec_GraphOutputChannelSpec) ProtoMessage() {} func (x *ProcessorIOSpec_GraphOutputChannelSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7236,11 +7068,9 @@ type ProcessorIOSpec_InstanceResourceInputBindingSpec struct { func (x *ProcessorIOSpec_InstanceResourceInputBindingSpec) Reset() { *x = ProcessorIOSpec_InstanceResourceInputBindingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorIOSpec_InstanceResourceInputBindingSpec) String() string { @@ -7251,7 +7081,7 @@ func (*ProcessorIOSpec_InstanceResourceInputBindingSpec) ProtoMessage() {} func (x *ProcessorIOSpec_InstanceResourceInputBindingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7332,11 +7162,9 @@ type ProcessorIOSpec_InstanceResourceOutputBindingSpec struct { func (x *ProcessorIOSpec_InstanceResourceOutputBindingSpec) Reset() { *x = ProcessorIOSpec_InstanceResourceOutputBindingSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ProcessorIOSpec_InstanceResourceOutputBindingSpec) String() string { @@ -7347,7 +7175,7 @@ func (*ProcessorIOSpec_InstanceResourceOutputBindingSpec) ProtoMessage() {} func (x *ProcessorIOSpec_InstanceResourceOutputBindingSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7400,11 +7228,9 @@ type CustomProcessorSourceInfo_ProductRecognizerArtifact struct { func (x *CustomProcessorSourceInfo_ProductRecognizerArtifact) Reset() { *x = CustomProcessorSourceInfo_ProductRecognizerArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomProcessorSourceInfo_ProductRecognizerArtifact) String() string { @@ -7415,7 +7241,7 @@ func (*CustomProcessorSourceInfo_ProductRecognizerArtifact) ProtoMessage() {} func (x *CustomProcessorSourceInfo_ProductRecognizerArtifact) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7464,11 +7290,9 @@ type CustomProcessorSourceInfo_ModelSchema struct { func (x *CustomProcessorSourceInfo_ModelSchema) Reset() { *x = CustomProcessorSourceInfo_ModelSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CustomProcessorSourceInfo_ModelSchema) String() string { @@ -7479,7 +7303,7 @@ func (*CustomProcessorSourceInfo_ModelSchema) ProtoMessage() {} func (x *CustomProcessorSourceInfo_ModelSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7529,11 +7353,9 @@ type StreamWithAnnotation_NodeAnnotation struct { func (x *StreamWithAnnotation_NodeAnnotation) Reset() { *x = StreamWithAnnotation_NodeAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamWithAnnotation_NodeAnnotation) String() string { @@ -7544,7 +7366,7 @@ func (*StreamWithAnnotation_NodeAnnotation) ProtoMessage() {} func (x *StreamWithAnnotation_NodeAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7590,11 +7412,9 @@ type TagParsingConfig_EntityParsingConfig struct { func (x *TagParsingConfig_EntityParsingConfig) Reset() { *x = TagParsingConfig_EntityParsingConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TagParsingConfig_EntityParsingConfig) String() string { @@ -7605,7 +7425,7 @@ func (*TagParsingConfig_EntityParsingConfig) ProtoMessage() {} func (x *TagParsingConfig_EntityParsingConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_platform_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9751,1088 +9571,6 @@ func file_google_cloud_visionai_v1_platform_proto_init() { } file_google_cloud_visionai_v1_annotations_proto_init() file_google_cloud_visionai_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_platform_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApplicationInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateApplicationInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateApplicationInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApplicationInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeployApplicationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UndeployApplicationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RemoveApplicationStreamInputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*AddApplicationStreamInputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationStreamInputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListApplicationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListApplicationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CreateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DeleteApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeployApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*UndeployApplicationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationStreamInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*AddApplicationStreamInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationStreamInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RemoveApplicationStreamInputRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListInstancesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetInstanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListDraftsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ListDraftsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GetDraftRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*CreateDraftRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDraftRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationInstancesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDraftRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*ListProcessorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListPrebuiltProcessorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListPrebuiltProcessorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*UpdateProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DeleteProcessorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*Draft); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Instance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Processor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorIOSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*CustomProcessorSourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*StreamWithAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationNodeAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ResourceAnnotations); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*VideoStreamInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*AIEnabledDevicesInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*MediaWarehouseConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*PersonBlurConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*OccupancyCountConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*PersonVehicleDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*PersonalProtectiveEquipmentDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*GeneralObjectDetectionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*BigQueryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*VertexAutoMLVisionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*VertexAutoMLVideoConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*VertexCustomConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*GcsOutputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*UniversalInputConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*MachineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingMetricSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*DedicatedResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*ProductRecognizerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*TagRecognizerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*TagParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*RemoveApplicationStreamInputRequest_TargetStreamInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*UpdateApplicationInstancesRequest_UpdateApplicationInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*Application_ApplicationRuntimeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*Application_ApplicationRuntimeInfo_GlobalOutputResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*Application_ApplicationRuntimeInfo_MonitoringConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*ApplicationConfigs_EventDeliveryConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*Node_InputEdge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*Instance_InputResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*Instance_OutputResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorIOSpec_GraphInputChannelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorIOSpec_GraphOutputChannelSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorIOSpec_InstanceResourceInputBindingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*ProcessorIOSpec_InstanceResourceOutputBindingSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*CustomProcessorSourceInfo_ProductRecognizerArtifact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*CustomProcessorSourceInfo_ModelSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*StreamWithAnnotation_NodeAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_platform_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*TagParsingConfig_EntityParsingConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_platform_proto_msgTypes[42].OneofWrappers = []any{ (*Node_OutputAllOutputChannelsToStream)(nil), } diff --git a/visionai/apiv1/visionaipb/streaming_resources.pb.go b/visionai/apiv1/visionaipb/streaming_resources.pb.go index 4539ee7bbee1..87eefdeaaa3a 100755 --- a/visionai/apiv1/visionaipb/streaming_resources.pb.go +++ b/visionai/apiv1/visionaipb/streaming_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/streaming_resources.proto @@ -59,11 +59,9 @@ type GstreamerBufferDescriptor struct { func (x *GstreamerBufferDescriptor) Reset() { *x = GstreamerBufferDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GstreamerBufferDescriptor) String() string { @@ -74,7 +72,7 @@ func (*GstreamerBufferDescriptor) ProtoMessage() {} func (x *GstreamerBufferDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,11 +138,9 @@ type RawImageDescriptor struct { func (x *RawImageDescriptor) Reset() { *x = RawImageDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawImageDescriptor) String() string { @@ -155,7 +151,7 @@ func (*RawImageDescriptor) ProtoMessage() {} func (x *RawImageDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,11 +202,9 @@ type PacketType struct { func (x *PacketType) Reset() { *x = PacketType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketType) String() string { @@ -221,7 +215,7 @@ func (*PacketType) ProtoMessage() {} func (x *PacketType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +263,9 @@ type ServerMetadata struct { func (x *ServerMetadata) Reset() { *x = ServerMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerMetadata) String() string { @@ -284,7 +276,7 @@ func (*ServerMetadata) ProtoMessage() {} func (x *ServerMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +318,9 @@ type SeriesMetadata struct { func (x *SeriesMetadata) Reset() { *x = SeriesMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SeriesMetadata) String() string { @@ -341,7 +331,7 @@ func (*SeriesMetadata) ProtoMessage() {} func (x *SeriesMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,11 +392,9 @@ type PacketHeader struct { func (x *PacketHeader) Reset() { *x = PacketHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketHeader) String() string { @@ -417,7 +405,7 @@ func (*PacketHeader) ProtoMessage() {} func (x *PacketHeader) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +483,9 @@ type Packet struct { func (x *Packet) Reset() { *x = Packet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Packet) String() string { @@ -510,7 +496,7 @@ func (*Packet) ProtoMessage() {} func (x *Packet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +556,9 @@ type PacketType_TypeDescriptor struct { func (x *PacketType_TypeDescriptor) Reset() { *x = PacketType_TypeDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PacketType_TypeDescriptor) String() string { @@ -585,7 +569,7 @@ func (*PacketType_TypeDescriptor) ProtoMessage() {} func (x *PacketType_TypeDescriptor) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,104 +810,6 @@ func file_google_cloud_visionai_v1_streaming_resources_proto_init() { if File_google_cloud_visionai_v1_streaming_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GstreamerBufferDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RawImageDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*PacketType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ServerMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SeriesMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PacketHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Packet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*PacketType_TypeDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_streaming_resources_proto_msgTypes[7].OneofWrappers = []any{ (*PacketType_TypeDescriptor_GstreamerBufferDescriptor)(nil), (*PacketType_TypeDescriptor_RawImageDescriptor)(nil), diff --git a/visionai/apiv1/visionaipb/streaming_service.pb.go b/visionai/apiv1/visionaipb/streaming_service.pb.go index 7c2150bd75ef..7d544c4e3036 100755 --- a/visionai/apiv1/visionaipb/streaming_service.pb.go +++ b/visionai/apiv1/visionaipb/streaming_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/streaming_service.proto @@ -110,11 +110,9 @@ type ReceiveEventsRequest struct { func (x *ReceiveEventsRequest) Reset() { *x = ReceiveEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveEventsRequest) String() string { @@ -125,7 +123,7 @@ func (*ReceiveEventsRequest) ProtoMessage() {} func (x *ReceiveEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,11 +198,9 @@ type EventUpdate struct { func (x *EventUpdate) Reset() { *x = EventUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventUpdate) String() string { @@ -215,7 +211,7 @@ func (*EventUpdate) ProtoMessage() {} func (x *EventUpdate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,11 +278,9 @@ type ReceiveEventsControlResponse struct { func (x *ReceiveEventsControlResponse) Reset() { *x = ReceiveEventsControlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveEventsControlResponse) String() string { @@ -297,7 +291,7 @@ func (*ReceiveEventsControlResponse) ProtoMessage() {} func (x *ReceiveEventsControlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +370,9 @@ type ReceiveEventsResponse struct { func (x *ReceiveEventsResponse) Reset() { *x = ReceiveEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveEventsResponse) String() string { @@ -391,7 +383,7 @@ func (*ReceiveEventsResponse) ProtoMessage() {} func (x *ReceiveEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -465,11 +457,9 @@ type Lease struct { func (x *Lease) Reset() { *x = Lease{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Lease) String() string { @@ -480,7 +470,7 @@ func (*Lease) ProtoMessage() {} func (x *Lease) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +538,9 @@ type AcquireLeaseRequest struct { func (x *AcquireLeaseRequest) Reset() { *x = AcquireLeaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AcquireLeaseRequest) String() string { @@ -563,7 +551,7 @@ func (*AcquireLeaseRequest) ProtoMessage() {} func (x *AcquireLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,11 +612,9 @@ type RenewLeaseRequest struct { func (x *RenewLeaseRequest) Reset() { *x = RenewLeaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RenewLeaseRequest) String() string { @@ -639,7 +625,7 @@ func (*RenewLeaseRequest) ProtoMessage() {} func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +684,9 @@ type ReleaseLeaseRequest struct { func (x *ReleaseLeaseRequest) Reset() { *x = ReleaseLeaseRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseLeaseRequest) String() string { @@ -713,7 +697,7 @@ func (*ReleaseLeaseRequest) ProtoMessage() {} func (x *ReleaseLeaseRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +742,9 @@ type ReleaseLeaseResponse struct { func (x *ReleaseLeaseResponse) Reset() { *x = ReleaseLeaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReleaseLeaseResponse) String() string { @@ -773,7 +755,7 @@ func (*ReleaseLeaseResponse) ProtoMessage() {} func (x *ReleaseLeaseResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -813,11 +795,9 @@ type RequestMetadata struct { func (x *RequestMetadata) Reset() { *x = RequestMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RequestMetadata) String() string { @@ -828,7 +808,7 @@ func (*RequestMetadata) ProtoMessage() {} func (x *RequestMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +880,9 @@ type SendPacketsRequest struct { func (x *SendPacketsRequest) Reset() { *x = SendPacketsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendPacketsRequest) String() string { @@ -915,7 +893,7 @@ func (*SendPacketsRequest) ProtoMessage() {} func (x *SendPacketsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,11 +956,9 @@ type SendPacketsResponse struct { func (x *SendPacketsResponse) Reset() { *x = SendPacketsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendPacketsResponse) String() string { @@ -993,7 +969,7 @@ func (*SendPacketsResponse) ProtoMessage() {} func (x *SendPacketsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1025,11 +1001,9 @@ type ReceivePacketsRequest struct { func (x *ReceivePacketsRequest) Reset() { *x = ReceivePacketsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceivePacketsRequest) String() string { @@ -1040,7 +1014,7 @@ func (*ReceivePacketsRequest) ProtoMessage() {} func (x *ReceivePacketsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1087,9 @@ type ReceivePacketsControlResponse struct { func (x *ReceivePacketsControlResponse) Reset() { *x = ReceivePacketsControlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceivePacketsControlResponse) String() string { @@ -1128,7 +1100,7 @@ func (*ReceivePacketsControlResponse) ProtoMessage() {} func (x *ReceivePacketsControlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,11 +1179,9 @@ type ReceivePacketsResponse struct { func (x *ReceivePacketsResponse) Reset() { *x = ReceivePacketsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceivePacketsResponse) String() string { @@ -1222,7 +1192,7 @@ func (*ReceivePacketsResponse) ProtoMessage() {} func (x *ReceivePacketsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1285,11 +1255,9 @@ type EagerMode struct { func (x *EagerMode) Reset() { *x = EagerMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EagerMode) String() string { @@ -1300,7 +1268,7 @@ func (*EagerMode) ProtoMessage() {} func (x *EagerMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1340,11 +1308,9 @@ type ControlledMode struct { func (x *ControlledMode) Reset() { *x = ControlledMode{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ControlledMode) String() string { @@ -1355,7 +1321,7 @@ func (*ControlledMode) ProtoMessage() {} func (x *ControlledMode) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1428,11 +1394,9 @@ type CommitRequest struct { func (x *CommitRequest) Reset() { *x = CommitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommitRequest) String() string { @@ -1443,7 +1407,7 @@ func (*CommitRequest) ProtoMessage() {} func (x *CommitRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1500,11 +1464,9 @@ type ReceiveEventsRequest_SetupRequest struct { func (x *ReceiveEventsRequest_SetupRequest) Reset() { *x = ReceiveEventsRequest_SetupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceiveEventsRequest_SetupRequest) String() string { @@ -1515,7 +1477,7 @@ func (*ReceiveEventsRequest_SetupRequest) ProtoMessage() {} func (x *ReceiveEventsRequest_SetupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1609,11 +1571,9 @@ type ReceivePacketsRequest_SetupRequest struct { func (x *ReceivePacketsRequest_SetupRequest) Reset() { *x = ReceivePacketsRequest_SetupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReceivePacketsRequest_SetupRequest) String() string { @@ -1624,7 +1584,7 @@ func (*ReceivePacketsRequest_SetupRequest) ProtoMessage() {} func (x *ReceivePacketsRequest_SetupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2105,248 +2065,6 @@ func file_google_cloud_visionai_v1_streaming_service_proto_init() { return } file_google_cloud_visionai_v1_streaming_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EventUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveEventsControlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Lease); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*AcquireLeaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RenewLeaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseLeaseRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReleaseLeaseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RequestMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*SendPacketsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SendPacketsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ReceivePacketsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ReceivePacketsControlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ReceivePacketsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*EagerMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ControlledMode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CommitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ReceiveEventsRequest_SetupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ReceivePacketsRequest_SetupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_streaming_service_proto_msgTypes[0].OneofWrappers = []any{ (*ReceiveEventsRequest_SetupRequest_)(nil), (*ReceiveEventsRequest_CommitRequest)(nil), diff --git a/visionai/apiv1/visionaipb/streams_resources.pb.go b/visionai/apiv1/visionaipb/streams_resources.pb.go index d7f0f4a29ac0..ce773f7350a3 100755 --- a/visionai/apiv1/visionaipb/streams_resources.pb.go +++ b/visionai/apiv1/visionaipb/streams_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/streams_resources.proto @@ -122,11 +122,9 @@ type Stream struct { func (x *Stream) Reset() { *x = Stream{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Stream) String() string { @@ -137,7 +135,7 @@ func (*Stream) ProtoMessage() {} func (x *Stream) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -235,11 +233,9 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Event) String() string { @@ -250,7 +246,7 @@ func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,11 +334,9 @@ type Series struct { func (x *Series) Reset() { *x = Series{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Series) String() string { @@ -353,7 +347,7 @@ func (*Series) ProtoMessage() {} func (x *Series) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -441,11 +435,9 @@ type Channel struct { func (x *Channel) Reset() { *x = Channel{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Channel) String() string { @@ -456,7 +448,7 @@ func (*Channel) ProtoMessage() {} func (x *Channel) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,56 +780,6 @@ func file_google_cloud_visionai_v1_streams_resources_proto_init() { if File_google_cloud_visionai_v1_streams_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Stream); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Series); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Channel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/streams_service.pb.go b/visionai/apiv1/visionaipb/streams_service.pb.go index c74fc0fe797b..b1aa09e0391e 100755 --- a/visionai/apiv1/visionaipb/streams_service.pb.go +++ b/visionai/apiv1/visionaipb/streams_service.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/streams_service.proto @@ -65,11 +65,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -80,7 +78,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -146,11 +144,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -161,7 +157,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +205,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -224,7 +218,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -276,11 +270,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -291,7 +283,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,11 +358,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -381,7 +371,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +433,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -458,7 +446,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,11 +496,9 @@ type ListStreamsRequest struct { func (x *ListStreamsRequest) Reset() { *x = ListStreamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsRequest) String() string { @@ -523,7 +509,7 @@ func (*ListStreamsRequest) ProtoMessage() {} func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -589,11 +575,9 @@ type ListStreamsResponse struct { func (x *ListStreamsResponse) Reset() { *x = ListStreamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListStreamsResponse) String() string { @@ -604,7 +588,7 @@ func (*ListStreamsResponse) ProtoMessage() {} func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -652,11 +636,9 @@ type GetStreamRequest struct { func (x *GetStreamRequest) Reset() { *x = GetStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamRequest) String() string { @@ -667,7 +649,7 @@ func (*GetStreamRequest) ProtoMessage() {} func (x *GetStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +701,9 @@ type CreateStreamRequest struct { func (x *CreateStreamRequest) Reset() { *x = CreateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateStreamRequest) String() string { @@ -734,7 +714,7 @@ func (*CreateStreamRequest) ProtoMessage() {} func (x *CreateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,11 +789,9 @@ type UpdateStreamRequest struct { func (x *UpdateStreamRequest) Reset() { *x = UpdateStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateStreamRequest) String() string { @@ -824,7 +802,7 @@ func (*UpdateStreamRequest) ProtoMessage() {} func (x *UpdateStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -886,11 +864,9 @@ type DeleteStreamRequest struct { func (x *DeleteStreamRequest) Reset() { *x = DeleteStreamRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteStreamRequest) String() string { @@ -901,7 +877,7 @@ func (*DeleteStreamRequest) ProtoMessage() {} func (x *DeleteStreamRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -961,11 +937,9 @@ type GetStreamThumbnailRequest struct { func (x *GetStreamThumbnailRequest) Reset() { *x = GetStreamThumbnailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamThumbnailRequest) String() string { @@ -976,7 +950,7 @@ func (*GetStreamThumbnailRequest) ProtoMessage() {} func (x *GetStreamThumbnailRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1029,11 +1003,9 @@ type GetStreamThumbnailResponse struct { func (x *GetStreamThumbnailResponse) Reset() { *x = GetStreamThumbnailResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStreamThumbnailResponse) String() string { @@ -1044,7 +1016,7 @@ func (*GetStreamThumbnailResponse) ProtoMessage() {} func (x *GetStreamThumbnailResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1043,9 @@ type GenerateStreamHlsTokenRequest struct { func (x *GenerateStreamHlsTokenRequest) Reset() { *x = GenerateStreamHlsTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStreamHlsTokenRequest) String() string { @@ -1086,7 +1056,7 @@ func (*GenerateStreamHlsTokenRequest) ProtoMessage() {} func (x *GenerateStreamHlsTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1128,11 +1098,9 @@ type GenerateStreamHlsTokenResponse struct { func (x *GenerateStreamHlsTokenResponse) Reset() { *x = GenerateStreamHlsTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateStreamHlsTokenResponse) String() string { @@ -1143,7 +1111,7 @@ func (*GenerateStreamHlsTokenResponse) ProtoMessage() {} func (x *GenerateStreamHlsTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1161,9 @@ type ListEventsRequest struct { func (x *ListEventsRequest) Reset() { *x = ListEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsRequest) String() string { @@ -1208,7 +1174,7 @@ func (*ListEventsRequest) ProtoMessage() {} func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,11 +1240,9 @@ type ListEventsResponse struct { func (x *ListEventsResponse) Reset() { *x = ListEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsResponse) String() string { @@ -1289,7 +1253,7 @@ func (*ListEventsResponse) ProtoMessage() {} func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1337,11 +1301,9 @@ type GetEventRequest struct { func (x *GetEventRequest) Reset() { *x = GetEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEventRequest) String() string { @@ -1352,7 +1314,7 @@ func (*GetEventRequest) ProtoMessage() {} func (x *GetEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1404,11 +1366,9 @@ type CreateEventRequest struct { func (x *CreateEventRequest) Reset() { *x = CreateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventRequest) String() string { @@ -1419,7 +1379,7 @@ func (*CreateEventRequest) ProtoMessage() {} func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,11 +1454,9 @@ type UpdateEventRequest struct { func (x *UpdateEventRequest) Reset() { *x = UpdateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventRequest) String() string { @@ -1509,7 +1467,7 @@ func (*UpdateEventRequest) ProtoMessage() {} func (x *UpdateEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1571,11 +1529,9 @@ type DeleteEventRequest struct { func (x *DeleteEventRequest) Reset() { *x = DeleteEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventRequest) String() string { @@ -1586,7 +1542,7 @@ func (*DeleteEventRequest) ProtoMessage() {} func (x *DeleteEventRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1636,11 +1592,9 @@ type ListSeriesRequest struct { func (x *ListSeriesRequest) Reset() { *x = ListSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSeriesRequest) String() string { @@ -1651,7 +1605,7 @@ func (*ListSeriesRequest) ProtoMessage() {} func (x *ListSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1717,11 +1671,9 @@ type ListSeriesResponse struct { func (x *ListSeriesResponse) Reset() { *x = ListSeriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSeriesResponse) String() string { @@ -1732,7 +1684,7 @@ func (*ListSeriesResponse) ProtoMessage() {} func (x *ListSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1780,11 +1732,9 @@ type GetSeriesRequest struct { func (x *GetSeriesRequest) Reset() { *x = GetSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSeriesRequest) String() string { @@ -1795,7 +1745,7 @@ func (*GetSeriesRequest) ProtoMessage() {} func (x *GetSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1847,11 +1797,9 @@ type CreateSeriesRequest struct { func (x *CreateSeriesRequest) Reset() { *x = CreateSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSeriesRequest) String() string { @@ -1862,7 +1810,7 @@ func (*CreateSeriesRequest) ProtoMessage() {} func (x *CreateSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1937,11 +1885,9 @@ type UpdateSeriesRequest struct { func (x *UpdateSeriesRequest) Reset() { *x = UpdateSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSeriesRequest) String() string { @@ -1952,7 +1898,7 @@ func (*UpdateSeriesRequest) ProtoMessage() {} func (x *UpdateSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2014,11 +1960,9 @@ type DeleteSeriesRequest struct { func (x *DeleteSeriesRequest) Reset() { *x = DeleteSeriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSeriesRequest) String() string { @@ -2029,7 +1973,7 @@ func (*DeleteSeriesRequest) ProtoMessage() {} func (x *DeleteSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2088,11 +2032,9 @@ type MaterializeChannelRequest struct { func (x *MaterializeChannelRequest) Reset() { *x = MaterializeChannelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MaterializeChannelRequest) String() string { @@ -2103,7 +2045,7 @@ func (*MaterializeChannelRequest) ProtoMessage() {} func (x *MaterializeChannelRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_streams_service_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2901,356 +2843,6 @@ func file_google_cloud_visionai_v1_streams_service_proto_init() { } file_google_cloud_visionai_v1_common_proto_init() file_google_cloud_visionai_v1_streams_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListStreamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*UpdateStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*DeleteStreamRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamThumbnailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetStreamThumbnailResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStreamHlsTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GenerateStreamHlsTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*CreateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*UpdateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*DeleteEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ListSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ListSeriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GetSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*CreateSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSeriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_streams_service_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*MaterializeChannelRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/visionai/apiv1/visionaipb/warehouse.pb.go b/visionai/apiv1/visionaipb/warehouse.pb.go index 63137c6a8101..d917aab52ee9 100755 --- a/visionai/apiv1/visionaipb/warehouse.pb.go +++ b/visionai/apiv1/visionaipb/warehouse.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/visionai/v1/warehouse.proto @@ -939,11 +939,9 @@ type CreateAssetRequest struct { func (x *CreateAssetRequest) Reset() { *x = CreateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAssetRequest) String() string { @@ -954,7 +952,7 @@ func (*CreateAssetRequest) ProtoMessage() {} func (x *CreateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1004,11 +1002,9 @@ type GetAssetRequest struct { func (x *GetAssetRequest) Reset() { *x = GetAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAssetRequest) String() string { @@ -1019,7 +1015,7 @@ func (*GetAssetRequest) ProtoMessage() {} func (x *GetAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1071,11 +1067,9 @@ type ListAssetsRequest struct { func (x *ListAssetsRequest) Reset() { *x = ListAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsRequest) String() string { @@ -1086,7 +1080,7 @@ func (*ListAssetsRequest) ProtoMessage() {} func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,11 +1138,9 @@ type ListAssetsResponse struct { func (x *ListAssetsResponse) Reset() { *x = ListAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAssetsResponse) String() string { @@ -1159,7 +1151,7 @@ func (*ListAssetsResponse) ProtoMessage() {} func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1206,11 +1198,9 @@ type UpdateAssetRequest struct { func (x *UpdateAssetRequest) Reset() { *x = UpdateAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAssetRequest) String() string { @@ -1221,7 +1211,7 @@ func (*UpdateAssetRequest) ProtoMessage() {} func (x *UpdateAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1264,11 +1254,9 @@ type DeleteAssetRequest struct { func (x *DeleteAssetRequest) Reset() { *x = DeleteAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssetRequest) String() string { @@ -1279,7 +1267,7 @@ func (*DeleteAssetRequest) ProtoMessage() {} func (x *DeleteAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1304,9 @@ type AssetSource struct { func (x *AssetSource) Reset() { *x = AssetSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetSource) String() string { @@ -1331,7 +1317,7 @@ func (*AssetSource) ProtoMessage() {} func (x *AssetSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1401,11 +1387,9 @@ type UploadAssetRequest struct { func (x *UploadAssetRequest) Reset() { *x = UploadAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadAssetRequest) String() string { @@ -1416,7 +1400,7 @@ func (*UploadAssetRequest) ProtoMessage() {} func (x *UploadAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1454,11 +1438,9 @@ type UploadAssetResponse struct { func (x *UploadAssetResponse) Reset() { *x = UploadAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadAssetResponse) String() string { @@ -1469,7 +1451,7 @@ func (*UploadAssetResponse) ProtoMessage() {} func (x *UploadAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1498,11 +1480,9 @@ type UploadAssetMetadata struct { func (x *UploadAssetMetadata) Reset() { *x = UploadAssetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadAssetMetadata) String() string { @@ -1513,7 +1493,7 @@ func (*UploadAssetMetadata) ProtoMessage() {} func (x *UploadAssetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,11 +1536,9 @@ type GenerateRetrievalUrlRequest struct { func (x *GenerateRetrievalUrlRequest) Reset() { *x = GenerateRetrievalUrlRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateRetrievalUrlRequest) String() string { @@ -1571,7 +1549,7 @@ func (*GenerateRetrievalUrlRequest) ProtoMessage() {} func (x *GenerateRetrievalUrlRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1605,11 +1583,9 @@ type GenerateRetrievalUrlResponse struct { func (x *GenerateRetrievalUrlResponse) Reset() { *x = GenerateRetrievalUrlResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateRetrievalUrlResponse) String() string { @@ -1620,7 +1596,7 @@ func (*GenerateRetrievalUrlResponse) ProtoMessage() {} func (x *GenerateRetrievalUrlResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,11 +1642,9 @@ type Asset struct { func (x *Asset) Reset() { *x = Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Asset) String() string { @@ -1681,7 +1655,7 @@ func (*Asset) ProtoMessage() {} func (x *Asset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1731,11 +1705,9 @@ type AnalyzeAssetRequest struct { func (x *AnalyzeAssetRequest) Reset() { *x = AnalyzeAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeAssetRequest) String() string { @@ -1746,7 +1718,7 @@ func (*AnalyzeAssetRequest) ProtoMessage() {} func (x *AnalyzeAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1784,11 +1756,9 @@ type AnalyzeAssetMetadata struct { func (x *AnalyzeAssetMetadata) Reset() { *x = AnalyzeAssetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeAssetMetadata) String() string { @@ -1799,7 +1769,7 @@ func (*AnalyzeAssetMetadata) ProtoMessage() {} func (x *AnalyzeAssetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1844,11 +1814,9 @@ type AnalyzeAssetResponse struct { func (x *AnalyzeAssetResponse) Reset() { *x = AnalyzeAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeAssetResponse) String() string { @@ -1859,7 +1827,7 @@ func (*AnalyzeAssetResponse) ProtoMessage() {} func (x *AnalyzeAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1888,11 +1856,9 @@ type IndexingStatus struct { func (x *IndexingStatus) Reset() { *x = IndexingStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexingStatus) String() string { @@ -1903,7 +1869,7 @@ func (*IndexingStatus) ProtoMessage() {} func (x *IndexingStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1950,11 +1916,9 @@ type IndexAssetRequest struct { func (x *IndexAssetRequest) Reset() { *x = IndexAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexAssetRequest) String() string { @@ -1965,7 +1929,7 @@ func (*IndexAssetRequest) ProtoMessage() {} func (x *IndexAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2010,11 +1974,9 @@ type IndexAssetMetadata struct { func (x *IndexAssetMetadata) Reset() { *x = IndexAssetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexAssetMetadata) String() string { @@ -2025,7 +1987,7 @@ func (*IndexAssetMetadata) ProtoMessage() {} func (x *IndexAssetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2070,11 +2032,9 @@ type IndexAssetResponse struct { func (x *IndexAssetResponse) Reset() { *x = IndexAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexAssetResponse) String() string { @@ -2085,7 +2045,7 @@ func (*IndexAssetResponse) ProtoMessage() {} func (x *IndexAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2118,11 +2078,9 @@ type RemoveIndexAssetRequest struct { func (x *RemoveIndexAssetRequest) Reset() { *x = RemoveIndexAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIndexAssetRequest) String() string { @@ -2133,7 +2091,7 @@ func (*RemoveIndexAssetRequest) ProtoMessage() {} func (x *RemoveIndexAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2178,11 +2136,9 @@ type RemoveIndexAssetMetadata struct { func (x *RemoveIndexAssetMetadata) Reset() { *x = RemoveIndexAssetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIndexAssetMetadata) String() string { @@ -2193,7 +2149,7 @@ func (*RemoveIndexAssetMetadata) ProtoMessage() {} func (x *RemoveIndexAssetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2238,11 +2194,9 @@ type RemoveIndexAssetResponse struct { func (x *RemoveIndexAssetResponse) Reset() { *x = RemoveIndexAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveIndexAssetResponse) String() string { @@ -2253,7 +2207,7 @@ func (*RemoveIndexAssetResponse) ProtoMessage() {} func (x *RemoveIndexAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2290,11 +2244,9 @@ type IndexedAsset struct { func (x *IndexedAsset) Reset() { *x = IndexedAsset{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexedAsset) String() string { @@ -2305,7 +2257,7 @@ func (*IndexedAsset) ProtoMessage() {} func (x *IndexedAsset) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2378,11 +2330,9 @@ type ViewIndexedAssetsRequest struct { func (x *ViewIndexedAssetsRequest) Reset() { *x = ViewIndexedAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewIndexedAssetsRequest) String() string { @@ -2393,7 +2343,7 @@ func (*ViewIndexedAssetsRequest) ProtoMessage() {} func (x *ViewIndexedAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2451,11 +2401,9 @@ type ViewIndexedAssetsResponse struct { func (x *ViewIndexedAssetsResponse) Reset() { *x = ViewIndexedAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewIndexedAssetsResponse) String() string { @@ -2466,7 +2414,7 @@ func (*ViewIndexedAssetsResponse) ProtoMessage() {} func (x *ViewIndexedAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2509,11 +2457,9 @@ type CreateCorpusRequest struct { func (x *CreateCorpusRequest) Reset() { *x = CreateCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCorpusRequest) String() string { @@ -2524,7 +2470,7 @@ func (*CreateCorpusRequest) ProtoMessage() {} func (x *CreateCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2567,11 +2513,9 @@ type CreateCorpusMetadata struct { func (x *CreateCorpusMetadata) Reset() { *x = CreateCorpusMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCorpusMetadata) String() string { @@ -2582,7 +2526,7 @@ func (*CreateCorpusMetadata) ProtoMessage() {} func (x *CreateCorpusMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2623,11 +2567,9 @@ type SearchCapability struct { func (x *SearchCapability) Reset() { *x = SearchCapability{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCapability) String() string { @@ -2638,7 +2580,7 @@ func (*SearchCapability) ProtoMessage() {} func (x *SearchCapability) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2672,11 +2614,9 @@ type SearchCapabilitySetting struct { func (x *SearchCapabilitySetting) Reset() { *x = SearchCapabilitySetting{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCapabilitySetting) String() string { @@ -2687,7 +2627,7 @@ func (*SearchCapabilitySetting) ProtoMessage() {} func (x *SearchCapabilitySetting) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2721,11 +2661,9 @@ type CreateCollectionMetadata struct { func (x *CreateCollectionMetadata) Reset() { *x = CreateCollectionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCollectionMetadata) String() string { @@ -2736,7 +2674,7 @@ func (*CreateCollectionMetadata) ProtoMessage() {} func (x *CreateCollectionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2781,11 +2719,9 @@ type CreateCollectionRequest struct { func (x *CreateCollectionRequest) Reset() { *x = CreateCollectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCollectionRequest) String() string { @@ -2796,7 +2732,7 @@ func (*CreateCollectionRequest) ProtoMessage() {} func (x *CreateCollectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2844,11 +2780,9 @@ type DeleteCollectionMetadata struct { func (x *DeleteCollectionMetadata) Reset() { *x = DeleteCollectionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCollectionMetadata) String() string { @@ -2859,7 +2793,7 @@ func (*DeleteCollectionMetadata) ProtoMessage() {} func (x *DeleteCollectionMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2894,11 +2828,9 @@ type DeleteCollectionRequest struct { func (x *DeleteCollectionRequest) Reset() { *x = DeleteCollectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCollectionRequest) String() string { @@ -2909,7 +2841,7 @@ func (*DeleteCollectionRequest) ProtoMessage() {} func (x *DeleteCollectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2944,11 +2876,9 @@ type GetCollectionRequest struct { func (x *GetCollectionRequest) Reset() { *x = GetCollectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCollectionRequest) String() string { @@ -2959,7 +2889,7 @@ func (*GetCollectionRequest) ProtoMessage() {} func (x *GetCollectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3007,11 +2937,9 @@ type UpdateCollectionRequest struct { func (x *UpdateCollectionRequest) Reset() { *x = UpdateCollectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCollectionRequest) String() string { @@ -3022,7 +2950,7 @@ func (*UpdateCollectionRequest) ProtoMessage() {} func (x *UpdateCollectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3074,11 +3002,9 @@ type ListCollectionsRequest struct { func (x *ListCollectionsRequest) Reset() { *x = ListCollectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectionsRequest) String() string { @@ -3089,7 +3015,7 @@ func (*ListCollectionsRequest) ProtoMessage() {} func (x *ListCollectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3140,11 +3066,9 @@ type ListCollectionsResponse struct { func (x *ListCollectionsResponse) Reset() { *x = ListCollectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCollectionsResponse) String() string { @@ -3155,7 +3079,7 @@ func (*ListCollectionsResponse) ProtoMessage() {} func (x *ListCollectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3196,11 +3120,9 @@ type AddCollectionItemRequest struct { func (x *AddCollectionItemRequest) Reset() { *x = AddCollectionItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddCollectionItemRequest) String() string { @@ -3211,7 +3133,7 @@ func (*AddCollectionItemRequest) ProtoMessage() {} func (x *AddCollectionItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3245,11 +3167,9 @@ type AddCollectionItemResponse struct { func (x *AddCollectionItemResponse) Reset() { *x = AddCollectionItemResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddCollectionItemResponse) String() string { @@ -3260,7 +3180,7 @@ func (*AddCollectionItemResponse) ProtoMessage() {} func (x *AddCollectionItemResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3294,11 +3214,9 @@ type RemoveCollectionItemRequest struct { func (x *RemoveCollectionItemRequest) Reset() { *x = RemoveCollectionItemRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveCollectionItemRequest) String() string { @@ -3309,7 +3227,7 @@ func (*RemoveCollectionItemRequest) ProtoMessage() {} func (x *RemoveCollectionItemRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3343,11 +3261,9 @@ type RemoveCollectionItemResponse struct { func (x *RemoveCollectionItemResponse) Reset() { *x = RemoveCollectionItemResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveCollectionItemResponse) String() string { @@ -3358,7 +3274,7 @@ func (*RemoveCollectionItemResponse) ProtoMessage() {} func (x *RemoveCollectionItemResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3404,11 +3320,9 @@ type ViewCollectionItemsRequest struct { func (x *ViewCollectionItemsRequest) Reset() { *x = ViewCollectionItemsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewCollectionItemsRequest) String() string { @@ -3419,7 +3333,7 @@ func (*ViewCollectionItemsRequest) ProtoMessage() {} func (x *ViewCollectionItemsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3470,11 +3384,9 @@ type ViewCollectionItemsResponse struct { func (x *ViewCollectionItemsResponse) Reset() { *x = ViewCollectionItemsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViewCollectionItemsResponse) String() string { @@ -3485,7 +3397,7 @@ func (*ViewCollectionItemsResponse) ProtoMessage() {} func (x *ViewCollectionItemsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3534,11 +3446,9 @@ type Collection struct { func (x *Collection) Reset() { *x = Collection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Collection) String() string { @@ -3549,7 +3459,7 @@ func (*Collection) ProtoMessage() {} func (x *Collection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3605,11 +3515,9 @@ type CollectionItem struct { func (x *CollectionItem) Reset() { *x = CollectionItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CollectionItem) String() string { @@ -3620,7 +3528,7 @@ func (*CollectionItem) ProtoMessage() {} func (x *CollectionItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3680,11 +3588,9 @@ type CreateIndexRequest struct { func (x *CreateIndexRequest) Reset() { *x = CreateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexRequest) String() string { @@ -3695,7 +3601,7 @@ func (*CreateIndexRequest) ProtoMessage() {} func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3743,11 +3649,9 @@ type CreateIndexMetadata struct { func (x *CreateIndexMetadata) Reset() { *x = CreateIndexMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexMetadata) String() string { @@ -3758,7 +3662,7 @@ func (*CreateIndexMetadata) ProtoMessage() {} func (x *CreateIndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3799,11 +3703,9 @@ type UpdateIndexRequest struct { func (x *UpdateIndexRequest) Reset() { *x = UpdateIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexRequest) String() string { @@ -3814,7 +3716,7 @@ func (*UpdateIndexRequest) ProtoMessage() {} func (x *UpdateIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3855,11 +3757,9 @@ type UpdateIndexMetadata struct { func (x *UpdateIndexMetadata) Reset() { *x = UpdateIndexMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexMetadata) String() string { @@ -3870,7 +3770,7 @@ func (*UpdateIndexMetadata) ProtoMessage() {} func (x *UpdateIndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3906,11 +3806,9 @@ type GetIndexRequest struct { func (x *GetIndexRequest) Reset() { *x = GetIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexRequest) String() string { @@ -3921,7 +3819,7 @@ func (*GetIndexRequest) ProtoMessage() {} func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3968,11 +3866,9 @@ type ListIndexesRequest struct { func (x *ListIndexesRequest) Reset() { *x = ListIndexesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesRequest) String() string { @@ -3983,7 +3879,7 @@ func (*ListIndexesRequest) ProtoMessage() {} func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4034,11 +3930,9 @@ type ListIndexesResponse struct { func (x *ListIndexesResponse) Reset() { *x = ListIndexesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexesResponse) String() string { @@ -4049,7 +3943,7 @@ func (*ListIndexesResponse) ProtoMessage() {} func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4092,11 +3986,9 @@ type DeleteIndexRequest struct { func (x *DeleteIndexRequest) Reset() { *x = DeleteIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexRequest) String() string { @@ -4107,7 +3999,7 @@ func (*DeleteIndexRequest) ProtoMessage() {} func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4138,11 +4030,9 @@ type DeleteIndexMetadata struct { func (x *DeleteIndexMetadata) Reset() { *x = DeleteIndexMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexMetadata) String() string { @@ -4153,7 +4043,7 @@ func (*DeleteIndexMetadata) ProtoMessage() {} func (x *DeleteIndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4215,11 +4105,9 @@ type Index struct { func (x *Index) Reset() { *x = Index{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Index) String() string { @@ -4230,7 +4118,7 @@ func (*Index) ProtoMessage() {} func (x *Index) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4345,11 +4233,9 @@ type DeployedIndexReference struct { func (x *DeployedIndexReference) Reset() { *x = DeployedIndexReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndexReference) String() string { @@ -4360,7 +4246,7 @@ func (*DeployedIndexReference) ProtoMessage() {} func (x *DeployedIndexReference) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4421,11 +4307,9 @@ type Corpus struct { func (x *Corpus) Reset() { *x = Corpus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Corpus) String() string { @@ -4436,7 +4320,7 @@ func (*Corpus) ProtoMessage() {} func (x *Corpus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4519,11 +4403,9 @@ type GetCorpusRequest struct { func (x *GetCorpusRequest) Reset() { *x = GetCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCorpusRequest) String() string { @@ -4534,7 +4416,7 @@ func (*GetCorpusRequest) ProtoMessage() {} func (x *GetCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4570,11 +4452,9 @@ type UpdateCorpusRequest struct { func (x *UpdateCorpusRequest) Reset() { *x = UpdateCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateCorpusRequest) String() string { @@ -4585,7 +4465,7 @@ func (*UpdateCorpusRequest) ProtoMessage() {} func (x *UpdateCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4644,11 +4524,9 @@ type ListCorporaRequest struct { func (x *ListCorporaRequest) Reset() { *x = ListCorporaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCorporaRequest) String() string { @@ -4659,7 +4537,7 @@ func (*ListCorporaRequest) ProtoMessage() {} func (x *ListCorporaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4719,11 +4597,9 @@ type ListCorporaResponse struct { func (x *ListCorporaResponse) Reset() { *x = ListCorporaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCorporaResponse) String() string { @@ -4734,7 +4610,7 @@ func (*ListCorporaResponse) ProtoMessage() {} func (x *ListCorporaResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4775,11 +4651,9 @@ type DeleteCorpusRequest struct { func (x *DeleteCorpusRequest) Reset() { *x = DeleteCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteCorpusRequest) String() string { @@ -4790,7 +4664,7 @@ func (*DeleteCorpusRequest) ProtoMessage() {} func (x *DeleteCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4826,11 +4700,9 @@ type AnalyzeCorpusRequest struct { func (x *AnalyzeCorpusRequest) Reset() { *x = AnalyzeCorpusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeCorpusRequest) String() string { @@ -4841,7 +4713,7 @@ func (*AnalyzeCorpusRequest) ProtoMessage() {} func (x *AnalyzeCorpusRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4875,11 +4747,9 @@ type AnalyzeCorpusMetadata struct { func (x *AnalyzeCorpusMetadata) Reset() { *x = AnalyzeCorpusMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeCorpusMetadata) String() string { @@ -4890,7 +4760,7 @@ func (*AnalyzeCorpusMetadata) ProtoMessage() {} func (x *AnalyzeCorpusMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4921,11 +4791,9 @@ type AnalyzeCorpusResponse struct { func (x *AnalyzeCorpusResponse) Reset() { *x = AnalyzeCorpusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeCorpusResponse) String() string { @@ -4936,7 +4804,7 @@ func (*AnalyzeCorpusResponse) ProtoMessage() {} func (x *AnalyzeCorpusResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4967,11 +4835,9 @@ type CreateDataSchemaRequest struct { func (x *CreateDataSchemaRequest) Reset() { *x = CreateDataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDataSchemaRequest) String() string { @@ -4982,7 +4848,7 @@ func (*CreateDataSchemaRequest) ProtoMessage() {} func (x *CreateDataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5033,11 +4899,9 @@ type DataSchema struct { func (x *DataSchema) Reset() { *x = DataSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchema) String() string { @@ -5048,7 +4912,7 @@ func (*DataSchema) ProtoMessage() {} func (x *DataSchema) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5107,11 +4971,9 @@ type DataSchemaDetails struct { func (x *DataSchemaDetails) Reset() { *x = DataSchemaDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails) String() string { @@ -5122,7 +4984,7 @@ func (*DataSchemaDetails) ProtoMessage() {} func (x *DataSchemaDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5195,11 +5057,9 @@ type UpdateDataSchemaRequest struct { func (x *UpdateDataSchemaRequest) Reset() { *x = UpdateDataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDataSchemaRequest) String() string { @@ -5210,7 +5070,7 @@ func (*UpdateDataSchemaRequest) ProtoMessage() {} func (x *UpdateDataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5253,11 +5113,9 @@ type GetDataSchemaRequest struct { func (x *GetDataSchemaRequest) Reset() { *x = GetDataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDataSchemaRequest) String() string { @@ -5268,7 +5126,7 @@ func (*GetDataSchemaRequest) ProtoMessage() {} func (x *GetDataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5304,11 +5162,9 @@ type DeleteDataSchemaRequest struct { func (x *DeleteDataSchemaRequest) Reset() { *x = DeleteDataSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDataSchemaRequest) String() string { @@ -5319,7 +5175,7 @@ func (*DeleteDataSchemaRequest) ProtoMessage() {} func (x *DeleteDataSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5365,11 +5221,9 @@ type ListDataSchemasRequest struct { func (x *ListDataSchemasRequest) Reset() { *x = ListDataSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSchemasRequest) String() string { @@ -5380,7 +5234,7 @@ func (*ListDataSchemasRequest) ProtoMessage() {} func (x *ListDataSchemasRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5431,11 +5285,9 @@ type ListDataSchemasResponse struct { func (x *ListDataSchemasResponse) Reset() { *x = ListDataSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDataSchemasResponse) String() string { @@ -5446,7 +5298,7 @@ func (*ListDataSchemasResponse) ProtoMessage() {} func (x *ListDataSchemasResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5499,11 +5351,9 @@ type CreateAnnotationRequest struct { func (x *CreateAnnotationRequest) Reset() { *x = CreateAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateAnnotationRequest) String() string { @@ -5514,7 +5364,7 @@ func (*CreateAnnotationRequest) ProtoMessage() {} func (x *CreateAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5567,11 +5417,9 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Annotation) String() string { @@ -5582,7 +5430,7 @@ func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5629,11 +5477,9 @@ type UserSpecifiedAnnotation struct { func (x *UserSpecifiedAnnotation) Reset() { *x = UserSpecifiedAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UserSpecifiedAnnotation) String() string { @@ -5644,7 +5490,7 @@ func (*UserSpecifiedAnnotation) ProtoMessage() {} func (x *UserSpecifiedAnnotation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5694,11 +5540,9 @@ type GeoCoordinate struct { func (x *GeoCoordinate) Reset() { *x = GeoCoordinate{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeoCoordinate) String() string { @@ -5709,7 +5553,7 @@ func (*GeoCoordinate) ProtoMessage() {} func (x *GeoCoordinate) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5761,11 +5605,9 @@ type AnnotationValue struct { func (x *AnnotationValue) Reset() { *x = AnnotationValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationValue) String() string { @@ -5776,7 +5618,7 @@ func (*AnnotationValue) ProtoMessage() {} func (x *AnnotationValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5955,11 +5797,9 @@ type AnnotationList struct { func (x *AnnotationList) Reset() { *x = AnnotationList{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationList) String() string { @@ -5970,7 +5810,7 @@ func (*AnnotationList) ProtoMessage() {} func (x *AnnotationList) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6004,11 +5844,9 @@ type AnnotationCustomizedStruct struct { func (x *AnnotationCustomizedStruct) Reset() { *x = AnnotationCustomizedStruct{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationCustomizedStruct) String() string { @@ -6019,7 +5857,7 @@ func (*AnnotationCustomizedStruct) ProtoMessage() {} func (x *AnnotationCustomizedStruct) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6081,11 +5919,9 @@ type ListAnnotationsRequest struct { func (x *ListAnnotationsRequest) Reset() { *x = ListAnnotationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsRequest) String() string { @@ -6096,7 +5932,7 @@ func (*ListAnnotationsRequest) ProtoMessage() {} func (x *ListAnnotationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6154,11 +5990,9 @@ type ListAnnotationsResponse struct { func (x *ListAnnotationsResponse) Reset() { *x = ListAnnotationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListAnnotationsResponse) String() string { @@ -6169,7 +6003,7 @@ func (*ListAnnotationsResponse) ProtoMessage() {} func (x *ListAnnotationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6212,11 +6046,9 @@ type GetAnnotationRequest struct { func (x *GetAnnotationRequest) Reset() { *x = GetAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAnnotationRequest) String() string { @@ -6227,7 +6059,7 @@ func (*GetAnnotationRequest) ProtoMessage() {} func (x *GetAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6266,11 +6098,9 @@ type UpdateAnnotationRequest struct { func (x *UpdateAnnotationRequest) Reset() { *x = UpdateAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateAnnotationRequest) String() string { @@ -6281,7 +6111,7 @@ func (*UpdateAnnotationRequest) ProtoMessage() {} func (x *UpdateAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6324,11 +6154,9 @@ type DeleteAnnotationRequest struct { func (x *DeleteAnnotationRequest) Reset() { *x = DeleteAnnotationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAnnotationRequest) String() string { @@ -6339,7 +6167,7 @@ func (*DeleteAnnotationRequest) ProtoMessage() {} func (x *DeleteAnnotationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6381,11 +6209,9 @@ type ImportAssetsRequest struct { func (x *ImportAssetsRequest) Reset() { *x = ImportAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAssetsRequest) String() string { @@ -6396,7 +6222,7 @@ func (*ImportAssetsRequest) ProtoMessage() {} func (x *ImportAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6461,11 +6287,9 @@ type ImportAssetsMetadata struct { func (x *ImportAssetsMetadata) Reset() { *x = ImportAssetsMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAssetsMetadata) String() string { @@ -6476,7 +6300,7 @@ func (*ImportAssetsMetadata) ProtoMessage() {} func (x *ImportAssetsMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6521,11 +6345,9 @@ type BatchOperationStatus struct { func (x *BatchOperationStatus) Reset() { *x = BatchOperationStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BatchOperationStatus) String() string { @@ -6536,7 +6358,7 @@ func (*BatchOperationStatus) ProtoMessage() {} func (x *BatchOperationStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6574,11 +6396,9 @@ type ImportAssetsResponse struct { func (x *ImportAssetsResponse) Reset() { *x = ImportAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImportAssetsResponse) String() string { @@ -6589,7 +6409,7 @@ func (*ImportAssetsResponse) ProtoMessage() {} func (x *ImportAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6625,11 +6445,9 @@ type CreateSearchConfigRequest struct { func (x *CreateSearchConfigRequest) Reset() { *x = CreateSearchConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSearchConfigRequest) String() string { @@ -6640,7 +6458,7 @@ func (*CreateSearchConfigRequest) ProtoMessage() {} func (x *CreateSearchConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6695,11 +6513,9 @@ type UpdateSearchConfigRequest struct { func (x *UpdateSearchConfigRequest) Reset() { *x = UpdateSearchConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSearchConfigRequest) String() string { @@ -6710,7 +6526,7 @@ func (*UpdateSearchConfigRequest) ProtoMessage() {} func (x *UpdateSearchConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6753,11 +6569,9 @@ type GetSearchConfigRequest struct { func (x *GetSearchConfigRequest) Reset() { *x = GetSearchConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSearchConfigRequest) String() string { @@ -6768,7 +6582,7 @@ func (*GetSearchConfigRequest) ProtoMessage() {} func (x *GetSearchConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6804,11 +6618,9 @@ type DeleteSearchConfigRequest struct { func (x *DeleteSearchConfigRequest) Reset() { *x = DeleteSearchConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSearchConfigRequest) String() string { @@ -6819,7 +6631,7 @@ func (*DeleteSearchConfigRequest) ProtoMessage() {} func (x *DeleteSearchConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6866,11 +6678,9 @@ type ListSearchConfigsRequest struct { func (x *ListSearchConfigsRequest) Reset() { *x = ListSearchConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchConfigsRequest) String() string { @@ -6881,7 +6691,7 @@ func (*ListSearchConfigsRequest) ProtoMessage() {} func (x *ListSearchConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6932,11 +6742,9 @@ type ListSearchConfigsResponse struct { func (x *ListSearchConfigsResponse) Reset() { *x = ListSearchConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchConfigsResponse) String() string { @@ -6947,7 +6755,7 @@ func (*ListSearchConfigsResponse) ProtoMessage() {} func (x *ListSearchConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6998,11 +6806,9 @@ type SearchConfig struct { func (x *SearchConfig) Reset() { *x = SearchConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchConfig) String() string { @@ -7013,7 +6819,7 @@ func (*SearchConfig) ProtoMessage() {} func (x *SearchConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7106,11 +6912,9 @@ type IndexEndpoint struct { func (x *IndexEndpoint) Reset() { *x = IndexEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IndexEndpoint) String() string { @@ -7121,7 +6925,7 @@ func (*IndexEndpoint) ProtoMessage() {} func (x *IndexEndpoint) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7228,11 +7032,9 @@ type CreateIndexEndpointRequest struct { func (x *CreateIndexEndpointRequest) Reset() { *x = CreateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointRequest) String() string { @@ -7243,7 +7045,7 @@ func (*CreateIndexEndpointRequest) ProtoMessage() {} func (x *CreateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7291,11 +7093,9 @@ type CreateIndexEndpointMetadata struct { func (x *CreateIndexEndpointMetadata) Reset() { *x = CreateIndexEndpointMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateIndexEndpointMetadata) String() string { @@ -7306,7 +7106,7 @@ func (*CreateIndexEndpointMetadata) ProtoMessage() {} func (x *CreateIndexEndpointMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7340,11 +7140,9 @@ type GetIndexEndpointRequest struct { func (x *GetIndexEndpointRequest) Reset() { *x = GetIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIndexEndpointRequest) String() string { @@ -7355,7 +7153,7 @@ func (*GetIndexEndpointRequest) ProtoMessage() {} func (x *GetIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7411,11 +7209,9 @@ type ListIndexEndpointsRequest struct { func (x *ListIndexEndpointsRequest) Reset() { *x = ListIndexEndpointsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsRequest) String() string { @@ -7426,7 +7222,7 @@ func (*ListIndexEndpointsRequest) ProtoMessage() {} func (x *ListIndexEndpointsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7483,11 +7279,9 @@ type ListIndexEndpointsResponse struct { func (x *ListIndexEndpointsResponse) Reset() { *x = ListIndexEndpointsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListIndexEndpointsResponse) String() string { @@ -7498,7 +7292,7 @@ func (*ListIndexEndpointsResponse) ProtoMessage() {} func (x *ListIndexEndpointsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7547,11 +7341,9 @@ type UpdateIndexEndpointRequest struct { func (x *UpdateIndexEndpointRequest) Reset() { *x = UpdateIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexEndpointRequest) String() string { @@ -7562,7 +7354,7 @@ func (*UpdateIndexEndpointRequest) ProtoMessage() {} func (x *UpdateIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7603,11 +7395,9 @@ type UpdateIndexEndpointMetadata struct { func (x *UpdateIndexEndpointMetadata) Reset() { *x = UpdateIndexEndpointMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateIndexEndpointMetadata) String() string { @@ -7618,7 +7408,7 @@ func (*UpdateIndexEndpointMetadata) ProtoMessage() {} func (x *UpdateIndexEndpointMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7652,11 +7442,9 @@ type DeleteIndexEndpointRequest struct { func (x *DeleteIndexEndpointRequest) Reset() { *x = DeleteIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexEndpointRequest) String() string { @@ -7667,7 +7455,7 @@ func (*DeleteIndexEndpointRequest) ProtoMessage() {} func (x *DeleteIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7701,11 +7489,9 @@ type DeleteIndexEndpointMetadata struct { func (x *DeleteIndexEndpointMetadata) Reset() { *x = DeleteIndexEndpointMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteIndexEndpointMetadata) String() string { @@ -7716,7 +7502,7 @@ func (*DeleteIndexEndpointMetadata) ProtoMessage() {} func (x *DeleteIndexEndpointMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7754,11 +7540,9 @@ type DeployIndexRequest struct { func (x *DeployIndexRequest) Reset() { *x = DeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[107] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexRequest) String() string { @@ -7769,7 +7553,7 @@ func (*DeployIndexRequest) ProtoMessage() {} func (x *DeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[107] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7807,11 +7591,9 @@ type DeployIndexResponse struct { func (x *DeployIndexResponse) Reset() { *x = DeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[108] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexResponse) String() string { @@ -7822,7 +7604,7 @@ func (*DeployIndexResponse) ProtoMessage() {} func (x *DeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[108] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7851,11 +7633,9 @@ type DeployIndexMetadata struct { func (x *DeployIndexMetadata) Reset() { *x = DeployIndexMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployIndexMetadata) String() string { @@ -7866,7 +7646,7 @@ func (*DeployIndexMetadata) ProtoMessage() {} func (x *DeployIndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7909,11 +7689,9 @@ type UndeployIndexMetadata struct { func (x *UndeployIndexMetadata) Reset() { *x = UndeployIndexMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexMetadata) String() string { @@ -7924,7 +7702,7 @@ func (*UndeployIndexMetadata) ProtoMessage() {} func (x *UndeployIndexMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7967,11 +7745,9 @@ type UndeployIndexRequest struct { func (x *UndeployIndexRequest) Reset() { *x = UndeployIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[111] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[111] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexRequest) String() string { @@ -7982,7 +7758,7 @@ func (*UndeployIndexRequest) ProtoMessage() {} func (x *UndeployIndexRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[111] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8013,11 +7789,9 @@ type UndeployIndexResponse struct { func (x *UndeployIndexResponse) Reset() { *x = UndeployIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[112] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[112] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeployIndexResponse) String() string { @@ -8028,7 +7802,7 @@ func (*UndeployIndexResponse) ProtoMessage() {} func (x *UndeployIndexResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[112] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8057,11 +7831,9 @@ type DeployedIndex struct { func (x *DeployedIndex) Reset() { *x = DeployedIndex{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[113] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[113] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeployedIndex) String() string { @@ -8072,7 +7844,7 @@ func (*DeployedIndex) ProtoMessage() {} func (x *DeployedIndex) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[113] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8133,11 +7905,9 @@ type FacetProperty struct { func (x *FacetProperty) Reset() { *x = FacetProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[114] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[114] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetProperty) String() string { @@ -8148,7 +7918,7 @@ func (*FacetProperty) ProtoMessage() {} func (x *FacetProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[114] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8269,11 +8039,9 @@ type SearchHypernym struct { func (x *SearchHypernym) Reset() { *x = SearchHypernym{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[115] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[115] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHypernym) String() string { @@ -8284,7 +8052,7 @@ func (*SearchHypernym) ProtoMessage() {} func (x *SearchHypernym) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[115] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8338,11 +8106,9 @@ type CreateSearchHypernymRequest struct { func (x *CreateSearchHypernymRequest) Reset() { *x = CreateSearchHypernymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[116] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[116] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSearchHypernymRequest) String() string { @@ -8353,7 +8119,7 @@ func (*CreateSearchHypernymRequest) ProtoMessage() {} func (x *CreateSearchHypernymRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[116] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8407,11 +8173,9 @@ type UpdateSearchHypernymRequest struct { func (x *UpdateSearchHypernymRequest) Reset() { *x = UpdateSearchHypernymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[117] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[117] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSearchHypernymRequest) String() string { @@ -8422,7 +8186,7 @@ func (*UpdateSearchHypernymRequest) ProtoMessage() {} func (x *UpdateSearchHypernymRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[117] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8465,11 +8229,9 @@ type GetSearchHypernymRequest struct { func (x *GetSearchHypernymRequest) Reset() { *x = GetSearchHypernymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[118] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[118] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSearchHypernymRequest) String() string { @@ -8480,7 +8242,7 @@ func (*GetSearchHypernymRequest) ProtoMessage() {} func (x *GetSearchHypernymRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[118] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8516,11 +8278,9 @@ type DeleteSearchHypernymRequest struct { func (x *DeleteSearchHypernymRequest) Reset() { *x = DeleteSearchHypernymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[119] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSearchHypernymRequest) String() string { @@ -8531,7 +8291,7 @@ func (*DeleteSearchHypernymRequest) ProtoMessage() {} func (x *DeleteSearchHypernymRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[119] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8578,11 +8338,9 @@ type ListSearchHypernymsRequest struct { func (x *ListSearchHypernymsRequest) Reset() { *x = ListSearchHypernymsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[120] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchHypernymsRequest) String() string { @@ -8593,7 +8351,7 @@ func (*ListSearchHypernymsRequest) ProtoMessage() {} func (x *ListSearchHypernymsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[120] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8644,11 +8402,9 @@ type ListSearchHypernymsResponse struct { func (x *ListSearchHypernymsResponse) Reset() { *x = ListSearchHypernymsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[121] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[121] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSearchHypernymsResponse) String() string { @@ -8659,7 +8415,7 @@ func (*ListSearchHypernymsResponse) ProtoMessage() {} func (x *ListSearchHypernymsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[121] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8723,11 +8479,9 @@ type SearchCriteriaProperty struct { func (x *SearchCriteriaProperty) Reset() { *x = SearchCriteriaProperty{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[122] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[122] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchCriteriaProperty) String() string { @@ -8738,7 +8492,7 @@ func (*SearchCriteriaProperty) ProtoMessage() {} func (x *SearchCriteriaProperty) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[122] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8776,11 +8530,9 @@ type FacetValue struct { func (x *FacetValue) Reset() { *x = FacetValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[123] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[123] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetValue) String() string { @@ -8791,7 +8543,7 @@ func (*FacetValue) ProtoMessage() {} func (x *FacetValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[123] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8881,11 +8633,9 @@ type FacetBucket struct { func (x *FacetBucket) Reset() { *x = FacetBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[124] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[124] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetBucket) String() string { @@ -8896,7 +8646,7 @@ func (*FacetBucket) ProtoMessage() {} func (x *FacetBucket) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[124] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8983,11 +8733,9 @@ type FacetGroup struct { func (x *FacetGroup) Reset() { *x = FacetGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[125] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[125] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetGroup) String() string { @@ -8998,7 +8746,7 @@ func (*FacetGroup) ProtoMessage() {} func (x *FacetGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[125] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9063,11 +8811,9 @@ type IngestAssetRequest struct { func (x *IngestAssetRequest) Reset() { *x = IngestAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[126] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestAssetRequest) String() string { @@ -9078,7 +8824,7 @@ func (*IngestAssetRequest) ProtoMessage() {} func (x *IngestAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[126] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9146,11 +8892,9 @@ type IngestAssetResponse struct { func (x *IngestAssetResponse) Reset() { *x = IngestAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[127] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestAssetResponse) String() string { @@ -9161,7 +8905,7 @@ func (*IngestAssetResponse) ProtoMessage() {} func (x *IngestAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[127] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9199,11 +8943,9 @@ type ClipAssetRequest struct { func (x *ClipAssetRequest) Reset() { *x = ClipAssetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[128] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClipAssetRequest) String() string { @@ -9214,7 +8956,7 @@ func (*ClipAssetRequest) ProtoMessage() {} func (x *ClipAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[128] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9256,11 +8998,9 @@ type ClipAssetResponse struct { func (x *ClipAssetResponse) Reset() { *x = ClipAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[129] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClipAssetResponse) String() string { @@ -9271,7 +9011,7 @@ func (*ClipAssetResponse) ProtoMessage() {} func (x *ClipAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[129] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9313,11 +9053,9 @@ type GenerateHlsUriRequest struct { func (x *GenerateHlsUriRequest) Reset() { *x = GenerateHlsUriRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[130] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[130] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateHlsUriRequest) String() string { @@ -9328,7 +9066,7 @@ func (*GenerateHlsUriRequest) ProtoMessage() {} func (x *GenerateHlsUriRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[130] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9380,11 +9118,9 @@ type GenerateHlsUriResponse struct { func (x *GenerateHlsUriResponse) Reset() { *x = GenerateHlsUriResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[131] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[131] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateHlsUriResponse) String() string { @@ -9395,7 +9131,7 @@ func (*GenerateHlsUriResponse) ProtoMessage() {} func (x *GenerateHlsUriResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[131] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9470,11 +9206,9 @@ type SearchAssetsRequest struct { func (x *SearchAssetsRequest) Reset() { *x = SearchAssetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[132] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[132] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAssetsRequest) String() string { @@ -9485,7 +9219,7 @@ func (*SearchAssetsRequest) ProtoMessage() {} func (x *SearchAssetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[132] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9616,11 +9350,9 @@ type SearchIndexEndpointRequest struct { func (x *SearchIndexEndpointRequest) Reset() { *x = SearchIndexEndpointRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[133] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[133] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchIndexEndpointRequest) String() string { @@ -9631,7 +9363,7 @@ func (*SearchIndexEndpointRequest) ProtoMessage() {} func (x *SearchIndexEndpointRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[133] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9735,11 +9467,9 @@ type ImageQuery struct { func (x *ImageQuery) Reset() { *x = ImageQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[134] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[134] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImageQuery) String() string { @@ -9750,7 +9480,7 @@ func (*ImageQuery) ProtoMessage() {} func (x *ImageQuery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[134] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9818,11 +9548,9 @@ type SchemaKeySortingStrategy struct { func (x *SchemaKeySortingStrategy) Reset() { *x = SchemaKeySortingStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[135] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[135] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaKeySortingStrategy) String() string { @@ -9833,7 +9561,7 @@ func (*SchemaKeySortingStrategy) ProtoMessage() {} func (x *SchemaKeySortingStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[135] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9865,11 +9593,9 @@ type DeleteAssetMetadata struct { func (x *DeleteAssetMetadata) Reset() { *x = DeleteAssetMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[136] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[136] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteAssetMetadata) String() string { @@ -9880,7 +9606,7 @@ func (*DeleteAssetMetadata) ProtoMessage() {} func (x *DeleteAssetMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[136] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9914,11 +9640,9 @@ type AnnotationMatchingResult struct { func (x *AnnotationMatchingResult) Reset() { *x = AnnotationMatchingResult{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[137] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[137] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnnotationMatchingResult) String() string { @@ -9929,7 +9653,7 @@ func (*AnnotationMatchingResult) ProtoMessage() {} func (x *AnnotationMatchingResult) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[137] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10001,11 +9725,9 @@ type SearchResultItem struct { func (x *SearchResultItem) Reset() { *x = SearchResultItem{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[138] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[138] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchResultItem) String() string { @@ -10016,7 +9738,7 @@ func (*SearchResultItem) ProtoMessage() {} func (x *SearchResultItem) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[138] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10091,11 +9813,9 @@ type SearchAssetsResponse struct { func (x *SearchAssetsResponse) Reset() { *x = SearchAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[139] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[139] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchAssetsResponse) String() string { @@ -10106,7 +9826,7 @@ func (*SearchAssetsResponse) ProtoMessage() {} func (x *SearchAssetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[139] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10157,11 +9877,9 @@ type SearchIndexEndpointResponse struct { func (x *SearchIndexEndpointResponse) Reset() { *x = SearchIndexEndpointResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[140] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[140] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchIndexEndpointResponse) String() string { @@ -10172,7 +9890,7 @@ func (*SearchIndexEndpointResponse) ProtoMessage() {} func (x *SearchIndexEndpointResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[140] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10215,11 +9933,9 @@ type IntRange struct { func (x *IntRange) Reset() { *x = IntRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[141] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[141] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntRange) String() string { @@ -10230,7 +9946,7 @@ func (*IntRange) ProtoMessage() {} func (x *IntRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[141] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10273,11 +9989,9 @@ type FloatRange struct { func (x *FloatRange) Reset() { *x = FloatRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[142] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[142] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FloatRange) String() string { @@ -10288,7 +10002,7 @@ func (*FloatRange) ProtoMessage() {} func (x *FloatRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[142] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10329,11 +10043,9 @@ type StringArray struct { func (x *StringArray) Reset() { *x = StringArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[143] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[143] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringArray) String() string { @@ -10344,7 +10056,7 @@ func (*StringArray) ProtoMessage() {} func (x *StringArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[143] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10378,11 +10090,9 @@ type IntRangeArray struct { func (x *IntRangeArray) Reset() { *x = IntRangeArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[144] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[144] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntRangeArray) String() string { @@ -10393,7 +10103,7 @@ func (*IntRangeArray) ProtoMessage() {} func (x *IntRangeArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[144] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10427,11 +10137,9 @@ type FloatRangeArray struct { func (x *FloatRangeArray) Reset() { *x = FloatRangeArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[145] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[145] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FloatRangeArray) String() string { @@ -10442,7 +10150,7 @@ func (*FloatRangeArray) ProtoMessage() {} func (x *FloatRangeArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[145] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10478,11 +10186,9 @@ type DateTimeRange struct { func (x *DateTimeRange) Reset() { *x = DateTimeRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[146] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[146] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateTimeRange) String() string { @@ -10493,7 +10199,7 @@ func (*DateTimeRange) ProtoMessage() {} func (x *DateTimeRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[146] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10534,11 +10240,9 @@ type DateTimeRangeArray struct { func (x *DateTimeRangeArray) Reset() { *x = DateTimeRangeArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[147] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[147] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DateTimeRangeArray) String() string { @@ -10549,7 +10253,7 @@ func (*DateTimeRangeArray) ProtoMessage() {} func (x *DateTimeRangeArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[147] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10587,11 +10291,9 @@ type CircleArea struct { func (x *CircleArea) Reset() { *x = CircleArea{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[148] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[148] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CircleArea) String() string { @@ -10602,7 +10304,7 @@ func (*CircleArea) ProtoMessage() {} func (x *CircleArea) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[148] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10650,11 +10352,9 @@ type GeoLocationArray struct { func (x *GeoLocationArray) Reset() { *x = GeoLocationArray{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[149] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[149] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeoLocationArray) String() string { @@ -10665,7 +10365,7 @@ func (*GeoLocationArray) ProtoMessage() {} func (x *GeoLocationArray) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[149] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10697,11 +10397,9 @@ type BoolValue struct { func (x *BoolValue) Reset() { *x = BoolValue{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[150] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[150] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoolValue) String() string { @@ -10712,7 +10410,7 @@ func (*BoolValue) ProtoMessage() {} func (x *BoolValue) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[150] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10764,11 +10462,9 @@ type Criteria struct { func (x *Criteria) Reset() { *x = Criteria{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[151] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[151] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Criteria) String() string { @@ -10779,7 +10475,7 @@ func (*Criteria) ProtoMessage() {} func (x *Criteria) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[151] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10920,11 +10616,9 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[152] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[152] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition) String() string { @@ -10935,7 +10629,7 @@ func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[152] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10983,11 +10677,9 @@ type AssetSource_AssetGcsSource struct { func (x *AssetSource_AssetGcsSource) Reset() { *x = AssetSource_AssetGcsSource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[153] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[153] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetSource_AssetGcsSource) String() string { @@ -10998,7 +10690,7 @@ func (*AssetSource_AssetGcsSource) ProtoMessage() {} func (x *AssetSource_AssetGcsSource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[153] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11031,11 +10723,9 @@ type AssetSource_AssetContentData struct { func (x *AssetSource_AssetContentData) Reset() { *x = AssetSource_AssetContentData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[154] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[154] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssetSource_AssetContentData) String() string { @@ -11046,7 +10736,7 @@ func (*AssetSource_AssetContentData) ProtoMessage() {} func (x *AssetSource_AssetContentData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[154] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11082,11 +10772,9 @@ type AnalyzeAssetMetadata_AnalysisStatus struct { func (x *AnalyzeAssetMetadata_AnalysisStatus) Reset() { *x = AnalyzeAssetMetadata_AnalysisStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[155] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[155] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AnalyzeAssetMetadata_AnalysisStatus) String() string { @@ -11097,7 +10785,7 @@ func (*AnalyzeAssetMetadata_AnalysisStatus) ProtoMessage() {} func (x *AnalyzeAssetMetadata_AnalysisStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[155] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11145,11 +10833,9 @@ type DataSchemaDetails_ProtoAnyConfig struct { func (x *DataSchemaDetails_ProtoAnyConfig) Reset() { *x = DataSchemaDetails_ProtoAnyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[156] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[156] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails_ProtoAnyConfig) String() string { @@ -11160,7 +10846,7 @@ func (*DataSchemaDetails_ProtoAnyConfig) ProtoMessage() {} func (x *DataSchemaDetails_ProtoAnyConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[156] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11194,11 +10880,9 @@ type DataSchemaDetails_ListConfig struct { func (x *DataSchemaDetails_ListConfig) Reset() { *x = DataSchemaDetails_ListConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[157] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[157] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails_ListConfig) String() string { @@ -11209,7 +10893,7 @@ func (*DataSchemaDetails_ListConfig) ProtoMessage() {} func (x *DataSchemaDetails_ListConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[157] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11243,11 +10927,9 @@ type DataSchemaDetails_CustomizedStructConfig struct { func (x *DataSchemaDetails_CustomizedStructConfig) Reset() { *x = DataSchemaDetails_CustomizedStructConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[158] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[158] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails_CustomizedStructConfig) String() string { @@ -11258,7 +10940,7 @@ func (*DataSchemaDetails_CustomizedStructConfig) ProtoMessage() {} func (x *DataSchemaDetails_CustomizedStructConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[158] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11301,11 +10983,9 @@ type DataSchemaDetails_SearchStrategy struct { func (x *DataSchemaDetails_SearchStrategy) Reset() { *x = DataSchemaDetails_SearchStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[159] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[159] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails_SearchStrategy) String() string { @@ -11316,7 +10996,7 @@ func (*DataSchemaDetails_SearchStrategy) ProtoMessage() {} func (x *DataSchemaDetails_SearchStrategy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[159] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11420,11 +11100,9 @@ type DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig struct { func (x *DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig) Reset() { *x = DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[161] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[161] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig) String() string { @@ -11435,7 +11113,7 @@ func (*DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig) ProtoMessage func (x *DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[161] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11488,11 +11166,9 @@ type FacetProperty_FixedRangeBucketSpec struct { func (x *FacetProperty_FixedRangeBucketSpec) Reset() { *x = FacetProperty_FixedRangeBucketSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[164] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[164] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetProperty_FixedRangeBucketSpec) String() string { @@ -11503,7 +11179,7 @@ func (*FacetProperty_FixedRangeBucketSpec) ProtoMessage() {} func (x *FacetProperty_FixedRangeBucketSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[164] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11558,11 +11234,9 @@ type FacetProperty_CustomRangeBucketSpec struct { func (x *FacetProperty_CustomRangeBucketSpec) Reset() { *x = FacetProperty_CustomRangeBucketSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[165] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[165] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetProperty_CustomRangeBucketSpec) String() string { @@ -11573,7 +11247,7 @@ func (*FacetProperty_CustomRangeBucketSpec) ProtoMessage() {} func (x *FacetProperty_CustomRangeBucketSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[165] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11607,11 +11281,9 @@ type FacetProperty_DateTimeBucketSpec struct { func (x *FacetProperty_DateTimeBucketSpec) Reset() { *x = FacetProperty_DateTimeBucketSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[166] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[166] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetProperty_DateTimeBucketSpec) String() string { @@ -11622,7 +11294,7 @@ func (*FacetProperty_DateTimeBucketSpec) ProtoMessage() {} func (x *FacetProperty_DateTimeBucketSpec) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[166] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11658,11 +11330,9 @@ type FacetBucket_Range struct { func (x *FacetBucket_Range) Reset() { *x = FacetBucket_Range{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[167] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[167] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FacetBucket_Range) String() string { @@ -11673,7 +11343,7 @@ func (*FacetBucket_Range) ProtoMessage() {} func (x *FacetBucket_Range) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[167] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11719,11 +11389,9 @@ type IngestAssetRequest_Config struct { func (x *IngestAssetRequest_Config) Reset() { *x = IngestAssetRequest_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[168] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[168] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestAssetRequest_Config) String() string { @@ -11734,7 +11402,7 @@ func (*IngestAssetRequest_Config) ProtoMessage() {} func (x *IngestAssetRequest_Config) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[168] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11795,11 +11463,9 @@ type IngestAssetRequest_TimeIndexedData struct { func (x *IngestAssetRequest_TimeIndexedData) Reset() { *x = IngestAssetRequest_TimeIndexedData{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[169] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[169] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestAssetRequest_TimeIndexedData) String() string { @@ -11810,7 +11476,7 @@ func (*IngestAssetRequest_TimeIndexedData) ProtoMessage() {} func (x *IngestAssetRequest_TimeIndexedData) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[169] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11851,11 +11517,9 @@ type IngestAssetRequest_Config_VideoType struct { func (x *IngestAssetRequest_Config_VideoType) Reset() { *x = IngestAssetRequest_Config_VideoType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[170] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[170] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IngestAssetRequest_Config_VideoType) String() string { @@ -11866,7 +11530,7 @@ func (*IngestAssetRequest_Config_VideoType) ProtoMessage() {} func (x *IngestAssetRequest_Config_VideoType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[170] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11902,11 +11566,9 @@ type ClipAssetResponse_TimeIndexedUri struct { func (x *ClipAssetResponse_TimeIndexedUri) Reset() { *x = ClipAssetResponse_TimeIndexedUri{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[171] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[171] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClipAssetResponse_TimeIndexedUri) String() string { @@ -11917,7 +11579,7 @@ func (*ClipAssetResponse_TimeIndexedUri) ProtoMessage() {} func (x *ClipAssetResponse_TimeIndexedUri) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[171] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -11963,11 +11625,9 @@ type SchemaKeySortingStrategy_Option struct { func (x *SchemaKeySortingStrategy_Option) Reset() { *x = SchemaKeySortingStrategy_Option{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[172] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[172] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchemaKeySortingStrategy_Option) String() string { @@ -11978,7 +11638,7 @@ func (*SchemaKeySortingStrategy_Option) ProtoMessage() {} func (x *SchemaKeySortingStrategy_Option) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[172] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12029,11 +11689,9 @@ type Partition_TemporalPartition struct { func (x *Partition_TemporalPartition) Reset() { *x = Partition_TemporalPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[173] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[173] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition_TemporalPartition) String() string { @@ -12044,7 +11702,7 @@ func (*Partition_TemporalPartition) ProtoMessage() {} func (x *Partition_TemporalPartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[173] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12091,11 +11749,9 @@ type Partition_SpatialPartition struct { func (x *Partition_SpatialPartition) Reset() { *x = Partition_SpatialPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[174] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[174] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition_SpatialPartition) String() string { @@ -12106,7 +11762,7 @@ func (*Partition_SpatialPartition) ProtoMessage() {} func (x *Partition_SpatialPartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[174] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -12164,11 +11820,9 @@ type Partition_RelativeTemporalPartition struct { func (x *Partition_RelativeTemporalPartition) Reset() { *x = Partition_RelativeTemporalPartition{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[175] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[175] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Partition_RelativeTemporalPartition) String() string { @@ -12179,7 +11833,7 @@ func (*Partition_RelativeTemporalPartition) ProtoMessage() {} func (x *Partition_RelativeTemporalPartition) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_visionai_v1_warehouse_proto_msgTypes[175] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -15508,2084 +15162,6 @@ func file_google_cloud_visionai_v1_warehouse_proto_init() { return } file_google_cloud_visionai_v1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AssetSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UploadAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*UploadAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*UploadAssetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateRetrievalUrlRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GenerateRetrievalUrlResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeAssetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*IndexingStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*IndexAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*IndexAssetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*IndexAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIndexAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIndexAssetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*RemoveIndexAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*IndexedAsset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ViewIndexedAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ViewIndexedAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*CreateCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*CreateCorpusMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*SearchCapability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*SearchCapabilitySetting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*CreateCollectionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateCollectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCollectionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCollectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*GetCollectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCollectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*ListCollectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*AddCollectionItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AddCollectionItemResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*RemoveCollectionItemRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*RemoveCollectionItemResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ViewCollectionItemsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*ViewCollectionItemsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*Collection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*CollectionItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*Index); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndexReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*Corpus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*GetCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*UpdateCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ListCorporaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ListCorporaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*DeleteCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeCorpusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeCorpusMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeCorpusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*CreateDataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*DataSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*GetDataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDataSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*ListDataSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*CreateAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*UserSpecifiedAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*GeoCoordinate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationCustomizedStruct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*ListAnnotationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*GetAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*UpdateAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAnnotationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ImportAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ImportAssetsMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*BatchOperationStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*ImportAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*CreateSearchConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSearchConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*GetSearchConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSearchConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*SearchConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*IndexEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*CreateIndexEndpointMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*GetIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*ListIndexEndpointsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*UpdateIndexEndpointMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*DeleteIndexEndpointMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[107].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[108].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*DeployIndexMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[111].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[112].Exporter = func(v any, i int) any { - switch v := v.(*UndeployIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[113].Exporter = func(v any, i int) any { - switch v := v.(*DeployedIndex); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[114].Exporter = func(v any, i int) any { - switch v := v.(*FacetProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[115].Exporter = func(v any, i int) any { - switch v := v.(*SearchHypernym); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[116].Exporter = func(v any, i int) any { - switch v := v.(*CreateSearchHypernymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[117].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSearchHypernymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[118].Exporter = func(v any, i int) any { - switch v := v.(*GetSearchHypernymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[119].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSearchHypernymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[120].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchHypernymsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[121].Exporter = func(v any, i int) any { - switch v := v.(*ListSearchHypernymsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[122].Exporter = func(v any, i int) any { - switch v := v.(*SearchCriteriaProperty); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[123].Exporter = func(v any, i int) any { - switch v := v.(*FacetValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[124].Exporter = func(v any, i int) any { - switch v := v.(*FacetBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[125].Exporter = func(v any, i int) any { - switch v := v.(*FacetGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[126].Exporter = func(v any, i int) any { - switch v := v.(*IngestAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[127].Exporter = func(v any, i int) any { - switch v := v.(*IngestAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[128].Exporter = func(v any, i int) any { - switch v := v.(*ClipAssetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[129].Exporter = func(v any, i int) any { - switch v := v.(*ClipAssetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[130].Exporter = func(v any, i int) any { - switch v := v.(*GenerateHlsUriRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[131].Exporter = func(v any, i int) any { - switch v := v.(*GenerateHlsUriResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[132].Exporter = func(v any, i int) any { - switch v := v.(*SearchAssetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[133].Exporter = func(v any, i int) any { - switch v := v.(*SearchIndexEndpointRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[134].Exporter = func(v any, i int) any { - switch v := v.(*ImageQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[135].Exporter = func(v any, i int) any { - switch v := v.(*SchemaKeySortingStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[136].Exporter = func(v any, i int) any { - switch v := v.(*DeleteAssetMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[137].Exporter = func(v any, i int) any { - switch v := v.(*AnnotationMatchingResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[138].Exporter = func(v any, i int) any { - switch v := v.(*SearchResultItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[139].Exporter = func(v any, i int) any { - switch v := v.(*SearchAssetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[140].Exporter = func(v any, i int) any { - switch v := v.(*SearchIndexEndpointResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[141].Exporter = func(v any, i int) any { - switch v := v.(*IntRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[142].Exporter = func(v any, i int) any { - switch v := v.(*FloatRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[143].Exporter = func(v any, i int) any { - switch v := v.(*StringArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[144].Exporter = func(v any, i int) any { - switch v := v.(*IntRangeArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[145].Exporter = func(v any, i int) any { - switch v := v.(*FloatRangeArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[146].Exporter = func(v any, i int) any { - switch v := v.(*DateTimeRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[147].Exporter = func(v any, i int) any { - switch v := v.(*DateTimeRangeArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[148].Exporter = func(v any, i int) any { - switch v := v.(*CircleArea); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[149].Exporter = func(v any, i int) any { - switch v := v.(*GeoLocationArray); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[150].Exporter = func(v any, i int) any { - switch v := v.(*BoolValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[151].Exporter = func(v any, i int) any { - switch v := v.(*Criteria); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[152].Exporter = func(v any, i int) any { - switch v := v.(*Partition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[153].Exporter = func(v any, i int) any { - switch v := v.(*AssetSource_AssetGcsSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[154].Exporter = func(v any, i int) any { - switch v := v.(*AssetSource_AssetContentData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[155].Exporter = func(v any, i int) any { - switch v := v.(*AnalyzeAssetMetadata_AnalysisStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[156].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails_ProtoAnyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[157].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails_ListConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[158].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails_CustomizedStructConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[159].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails_SearchStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[161].Exporter = func(v any, i int) any { - switch v := v.(*DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[164].Exporter = func(v any, i int) any { - switch v := v.(*FacetProperty_FixedRangeBucketSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[165].Exporter = func(v any, i int) any { - switch v := v.(*FacetProperty_CustomRangeBucketSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[166].Exporter = func(v any, i int) any { - switch v := v.(*FacetProperty_DateTimeBucketSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[167].Exporter = func(v any, i int) any { - switch v := v.(*FacetBucket_Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[168].Exporter = func(v any, i int) any { - switch v := v.(*IngestAssetRequest_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[169].Exporter = func(v any, i int) any { - switch v := v.(*IngestAssetRequest_TimeIndexedData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[170].Exporter = func(v any, i int) any { - switch v := v.(*IngestAssetRequest_Config_VideoType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[171].Exporter = func(v any, i int) any { - switch v := v.(*ClipAssetResponse_TimeIndexedUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[172].Exporter = func(v any, i int) any { - switch v := v.(*SchemaKeySortingStrategy_Option); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[173].Exporter = func(v any, i int) any { - switch v := v.(*Partition_TemporalPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[174].Exporter = func(v any, i int) any { - switch v := v.(*Partition_SpatialPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_visionai_v1_warehouse_proto_msgTypes[175].Exporter = func(v any, i int) any { - switch v := v.(*Partition_RelativeTemporalPartition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_visionai_v1_warehouse_proto_msgTypes[0].OneofWrappers = []any{} file_google_cloud_visionai_v1_warehouse_proto_msgTypes[6].OneofWrappers = []any{ (*AssetSource_AssetGcsSource_)(nil), diff --git a/visionai/apiv1/warehouse_client.go b/visionai/apiv1/warehouse_client.go index 4a1f3b6bed77..28c4bfcc3354 100755 --- a/visionai/apiv1/warehouse_client.go +++ b/visionai/apiv1/warehouse_client.go @@ -21,7 +21,7 @@ import ( "context" "errors" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -2268,6 +2267,8 @@ type warehouseGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWarehouseClient creates a new warehouse client based on gRPC. @@ -2294,6 +2295,7 @@ func NewWarehouseClient(ctx context.Context, opts ...option.ClientOption) (*Ware connPool: connPool, warehouseClient: visionaipb.NewWarehouseClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -2357,6 +2359,8 @@ type warehouseRESTClient struct { // Points back to the CallOptions field of the containing WarehouseClient CallOptions **WarehouseCallOptions + + logger *slog.Logger } // NewWarehouseRESTClient creates a new warehouse rest client. @@ -2374,6 +2378,7 @@ func NewWarehouseRESTClient(ctx context.Context, opts ...option.ClientOption) (* endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -2436,7 +2441,7 @@ func (c *warehouseGRPCClient) CreateAsset(ctx context.Context, req *visionaipb.C var resp *visionaipb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateAsset, req, settings.GRPC, c.logger, "CreateAsset") return err }, opts...) if err != nil { @@ -2454,7 +2459,7 @@ func (c *warehouseGRPCClient) UpdateAsset(ctx context.Context, req *visionaipb.U var resp *visionaipb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateAsset, req, settings.GRPC, c.logger, "UpdateAsset") return err }, opts...) if err != nil { @@ -2472,7 +2477,7 @@ func (c *warehouseGRPCClient) GetAsset(ctx context.Context, req *visionaipb.GetA var resp *visionaipb.Asset err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetAsset, req, settings.GRPC, c.logger, "GetAsset") return err }, opts...) if err != nil { @@ -2501,7 +2506,7 @@ func (c *warehouseGRPCClient) ListAssets(ctx context.Context, req *visionaipb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListAssets, req, settings.GRPC, c.logger, "ListAssets") return err }, opts...) if err != nil { @@ -2536,7 +2541,7 @@ func (c *warehouseGRPCClient) DeleteAsset(ctx context.Context, req *visionaipb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.DeleteAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.DeleteAsset, req, settings.GRPC, c.logger, "DeleteAsset") return err }, opts...) if err != nil { @@ -2556,7 +2561,7 @@ func (c *warehouseGRPCClient) UploadAsset(ctx context.Context, req *visionaipb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UploadAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UploadAsset, req, settings.GRPC, c.logger, "UploadAsset") return err }, opts...) if err != nil { @@ -2576,7 +2581,7 @@ func (c *warehouseGRPCClient) GenerateRetrievalUrl(ctx context.Context, req *vis var resp *visionaipb.GenerateRetrievalUrlResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GenerateRetrievalUrl(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GenerateRetrievalUrl, req, settings.GRPC, c.logger, "GenerateRetrievalUrl") return err }, opts...) if err != nil { @@ -2594,7 +2599,7 @@ func (c *warehouseGRPCClient) AnalyzeAsset(ctx context.Context, req *visionaipb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.AnalyzeAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.AnalyzeAsset, req, settings.GRPC, c.logger, "AnalyzeAsset") return err }, opts...) if err != nil { @@ -2614,7 +2619,7 @@ func (c *warehouseGRPCClient) IndexAsset(ctx context.Context, req *visionaipb.In var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.IndexAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.IndexAsset, req, settings.GRPC, c.logger, "IndexAsset") return err }, opts...) if err != nil { @@ -2634,7 +2639,7 @@ func (c *warehouseGRPCClient) RemoveIndexAsset(ctx context.Context, req *visiona var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.RemoveIndexAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.RemoveIndexAsset, req, settings.GRPC, c.logger, "RemoveIndexAsset") return err }, opts...) if err != nil { @@ -2665,7 +2670,7 @@ func (c *warehouseGRPCClient) ViewIndexedAssets(ctx context.Context, req *vision } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ViewIndexedAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ViewIndexedAssets, req, settings.GRPC, c.logger, "ViewIndexedAssets") return err }, opts...) if err != nil { @@ -2700,7 +2705,7 @@ func (c *warehouseGRPCClient) CreateIndex(ctx context.Context, req *visionaipb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") return err }, opts...) if err != nil { @@ -2720,7 +2725,7 @@ func (c *warehouseGRPCClient) UpdateIndex(ctx context.Context, req *visionaipb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateIndex, req, settings.GRPC, c.logger, "UpdateIndex") return err }, opts...) if err != nil { @@ -2740,7 +2745,7 @@ func (c *warehouseGRPCClient) GetIndex(ctx context.Context, req *visionaipb.GetI var resp *visionaipb.Index err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetIndex, req, settings.GRPC, c.logger, "GetIndex") return err }, opts...) if err != nil { @@ -2769,7 +2774,7 @@ func (c *warehouseGRPCClient) ListIndexes(ctx context.Context, req *visionaipb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListIndexes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") return err }, opts...) if err != nil { @@ -2804,7 +2809,7 @@ func (c *warehouseGRPCClient) DeleteIndex(ctx context.Context, req *visionaipb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.DeleteIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") return err }, opts...) if err != nil { @@ -2824,7 +2829,7 @@ func (c *warehouseGRPCClient) CreateCorpus(ctx context.Context, req *visionaipb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateCorpus, req, settings.GRPC, c.logger, "CreateCorpus") return err }, opts...) if err != nil { @@ -2844,7 +2849,7 @@ func (c *warehouseGRPCClient) GetCorpus(ctx context.Context, req *visionaipb.Get var resp *visionaipb.Corpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetCorpus, req, settings.GRPC, c.logger, "GetCorpus") return err }, opts...) if err != nil { @@ -2862,7 +2867,7 @@ func (c *warehouseGRPCClient) UpdateCorpus(ctx context.Context, req *visionaipb. var resp *visionaipb.Corpus err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateCorpus, req, settings.GRPC, c.logger, "UpdateCorpus") return err }, opts...) if err != nil { @@ -2891,7 +2896,7 @@ func (c *warehouseGRPCClient) ListCorpora(ctx context.Context, req *visionaipb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListCorpora(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListCorpora, req, settings.GRPC, c.logger, "ListCorpora") return err }, opts...) if err != nil { @@ -2925,7 +2930,7 @@ func (c *warehouseGRPCClient) DeleteCorpus(ctx context.Context, req *visionaipb. opts = append((*c.CallOptions).DeleteCorpus[0:len((*c.CallOptions).DeleteCorpus):len((*c.CallOptions).DeleteCorpus)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.warehouseClient.DeleteCorpus(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.warehouseClient.DeleteCorpus, req, settings.GRPC, c.logger, "DeleteCorpus") return err }, opts...) return err @@ -2940,7 +2945,7 @@ func (c *warehouseGRPCClient) AnalyzeCorpus(ctx context.Context, req *visionaipb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.AnalyzeCorpus(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.AnalyzeCorpus, req, settings.GRPC, c.logger, "AnalyzeCorpus") return err }, opts...) if err != nil { @@ -2960,7 +2965,7 @@ func (c *warehouseGRPCClient) CreateDataSchema(ctx context.Context, req *visiona var resp *visionaipb.DataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateDataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateDataSchema, req, settings.GRPC, c.logger, "CreateDataSchema") return err }, opts...) if err != nil { @@ -2978,7 +2983,7 @@ func (c *warehouseGRPCClient) UpdateDataSchema(ctx context.Context, req *visiona var resp *visionaipb.DataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateDataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateDataSchema, req, settings.GRPC, c.logger, "UpdateDataSchema") return err }, opts...) if err != nil { @@ -2996,7 +3001,7 @@ func (c *warehouseGRPCClient) GetDataSchema(ctx context.Context, req *visionaipb var resp *visionaipb.DataSchema err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetDataSchema(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetDataSchema, req, settings.GRPC, c.logger, "GetDataSchema") return err }, opts...) if err != nil { @@ -3013,7 +3018,7 @@ func (c *warehouseGRPCClient) DeleteDataSchema(ctx context.Context, req *visiona opts = append((*c.CallOptions).DeleteDataSchema[0:len((*c.CallOptions).DeleteDataSchema):len((*c.CallOptions).DeleteDataSchema)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.warehouseClient.DeleteDataSchema(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.warehouseClient.DeleteDataSchema, req, settings.GRPC, c.logger, "DeleteDataSchema") return err }, opts...) return err @@ -3039,7 +3044,7 @@ func (c *warehouseGRPCClient) ListDataSchemas(ctx context.Context, req *visionai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListDataSchemas(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListDataSchemas, req, settings.GRPC, c.logger, "ListDataSchemas") return err }, opts...) if err != nil { @@ -3074,7 +3079,7 @@ func (c *warehouseGRPCClient) CreateAnnotation(ctx context.Context, req *visiona var resp *visionaipb.Annotation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateAnnotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateAnnotation, req, settings.GRPC, c.logger, "CreateAnnotation") return err }, opts...) if err != nil { @@ -3092,7 +3097,7 @@ func (c *warehouseGRPCClient) GetAnnotation(ctx context.Context, req *visionaipb var resp *visionaipb.Annotation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetAnnotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetAnnotation, req, settings.GRPC, c.logger, "GetAnnotation") return err }, opts...) if err != nil { @@ -3121,7 +3126,7 @@ func (c *warehouseGRPCClient) ListAnnotations(ctx context.Context, req *visionai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListAnnotations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListAnnotations, req, settings.GRPC, c.logger, "ListAnnotations") return err }, opts...) if err != nil { @@ -3156,7 +3161,7 @@ func (c *warehouseGRPCClient) UpdateAnnotation(ctx context.Context, req *visiona var resp *visionaipb.Annotation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateAnnotation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateAnnotation, req, settings.GRPC, c.logger, "UpdateAnnotation") return err }, opts...) if err != nil { @@ -3173,7 +3178,7 @@ func (c *warehouseGRPCClient) DeleteAnnotation(ctx context.Context, req *visiona opts = append((*c.CallOptions).DeleteAnnotation[0:len((*c.CallOptions).DeleteAnnotation):len((*c.CallOptions).DeleteAnnotation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.warehouseClient.DeleteAnnotation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.warehouseClient.DeleteAnnotation, req, settings.GRPC, c.logger, "DeleteAnnotation") return err }, opts...) return err @@ -3185,7 +3190,9 @@ func (c *warehouseGRPCClient) IngestAsset(ctx context.Context, opts ...gax.CallO opts = append((*c.CallOptions).IngestAsset[0:len((*c.CallOptions).IngestAsset):len((*c.CallOptions).IngestAsset)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error + c.logger.DebugContext(ctx, "api streaming client request", "serviceName", serviceName, "rpcName", "IngestAsset") resp, err = c.warehouseClient.IngestAsset(ctx, settings.GRPC...) + c.logger.DebugContext(ctx, "api streaming client response", "serviceName", serviceName, "rpcName", "IngestAsset") return err }, opts...) if err != nil { @@ -3203,7 +3210,7 @@ func (c *warehouseGRPCClient) ClipAsset(ctx context.Context, req *visionaipb.Cli var resp *visionaipb.ClipAssetResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ClipAsset(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ClipAsset, req, settings.GRPC, c.logger, "ClipAsset") return err }, opts...) if err != nil { @@ -3221,7 +3228,7 @@ func (c *warehouseGRPCClient) GenerateHlsUri(ctx context.Context, req *visionaip var resp *visionaipb.GenerateHlsUriResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GenerateHlsUri(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GenerateHlsUri, req, settings.GRPC, c.logger, "GenerateHlsUri") return err }, opts...) if err != nil { @@ -3239,7 +3246,7 @@ func (c *warehouseGRPCClient) ImportAssets(ctx context.Context, req *visionaipb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ImportAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ImportAssets, req, settings.GRPC, c.logger, "ImportAssets") return err }, opts...) if err != nil { @@ -3259,7 +3266,7 @@ func (c *warehouseGRPCClient) CreateSearchConfig(ctx context.Context, req *visio var resp *visionaipb.SearchConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateSearchConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateSearchConfig, req, settings.GRPC, c.logger, "CreateSearchConfig") return err }, opts...) if err != nil { @@ -3277,7 +3284,7 @@ func (c *warehouseGRPCClient) UpdateSearchConfig(ctx context.Context, req *visio var resp *visionaipb.SearchConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateSearchConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateSearchConfig, req, settings.GRPC, c.logger, "UpdateSearchConfig") return err }, opts...) if err != nil { @@ -3295,7 +3302,7 @@ func (c *warehouseGRPCClient) GetSearchConfig(ctx context.Context, req *visionai var resp *visionaipb.SearchConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetSearchConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetSearchConfig, req, settings.GRPC, c.logger, "GetSearchConfig") return err }, opts...) if err != nil { @@ -3312,7 +3319,7 @@ func (c *warehouseGRPCClient) DeleteSearchConfig(ctx context.Context, req *visio opts = append((*c.CallOptions).DeleteSearchConfig[0:len((*c.CallOptions).DeleteSearchConfig):len((*c.CallOptions).DeleteSearchConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.warehouseClient.DeleteSearchConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.warehouseClient.DeleteSearchConfig, req, settings.GRPC, c.logger, "DeleteSearchConfig") return err }, opts...) return err @@ -3338,7 +3345,7 @@ func (c *warehouseGRPCClient) ListSearchConfigs(ctx context.Context, req *vision } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListSearchConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListSearchConfigs, req, settings.GRPC, c.logger, "ListSearchConfigs") return err }, opts...) if err != nil { @@ -3373,7 +3380,7 @@ func (c *warehouseGRPCClient) CreateSearchHypernym(ctx context.Context, req *vis var resp *visionaipb.SearchHypernym err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateSearchHypernym(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateSearchHypernym, req, settings.GRPC, c.logger, "CreateSearchHypernym") return err }, opts...) if err != nil { @@ -3391,7 +3398,7 @@ func (c *warehouseGRPCClient) UpdateSearchHypernym(ctx context.Context, req *vis var resp *visionaipb.SearchHypernym err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateSearchHypernym(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateSearchHypernym, req, settings.GRPC, c.logger, "UpdateSearchHypernym") return err }, opts...) if err != nil { @@ -3409,7 +3416,7 @@ func (c *warehouseGRPCClient) GetSearchHypernym(ctx context.Context, req *vision var resp *visionaipb.SearchHypernym err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetSearchHypernym(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetSearchHypernym, req, settings.GRPC, c.logger, "GetSearchHypernym") return err }, opts...) if err != nil { @@ -3426,7 +3433,7 @@ func (c *warehouseGRPCClient) DeleteSearchHypernym(ctx context.Context, req *vis opts = append((*c.CallOptions).DeleteSearchHypernym[0:len((*c.CallOptions).DeleteSearchHypernym):len((*c.CallOptions).DeleteSearchHypernym)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.warehouseClient.DeleteSearchHypernym(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.warehouseClient.DeleteSearchHypernym, req, settings.GRPC, c.logger, "DeleteSearchHypernym") return err }, opts...) return err @@ -3452,7 +3459,7 @@ func (c *warehouseGRPCClient) ListSearchHypernyms(ctx context.Context, req *visi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListSearchHypernyms(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListSearchHypernyms, req, settings.GRPC, c.logger, "ListSearchHypernyms") return err }, opts...) if err != nil { @@ -3498,7 +3505,7 @@ func (c *warehouseGRPCClient) SearchAssets(ctx context.Context, req *visionaipb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.SearchAssets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.SearchAssets, req, settings.GRPC, c.logger, "SearchAssets") return err }, opts...) if err != nil { @@ -3544,7 +3551,7 @@ func (c *warehouseGRPCClient) SearchIndexEndpoint(ctx context.Context, req *visi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.SearchIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.SearchIndexEndpoint, req, settings.GRPC, c.logger, "SearchIndexEndpoint") return err }, opts...) if err != nil { @@ -3579,7 +3586,7 @@ func (c *warehouseGRPCClient) CreateIndexEndpoint(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateIndexEndpoint, req, settings.GRPC, c.logger, "CreateIndexEndpoint") return err }, opts...) if err != nil { @@ -3599,7 +3606,7 @@ func (c *warehouseGRPCClient) GetIndexEndpoint(ctx context.Context, req *visiona var resp *visionaipb.IndexEndpoint err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetIndexEndpoint, req, settings.GRPC, c.logger, "GetIndexEndpoint") return err }, opts...) if err != nil { @@ -3628,7 +3635,7 @@ func (c *warehouseGRPCClient) ListIndexEndpoints(ctx context.Context, req *visio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListIndexEndpoints(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListIndexEndpoints, req, settings.GRPC, c.logger, "ListIndexEndpoints") return err }, opts...) if err != nil { @@ -3663,7 +3670,7 @@ func (c *warehouseGRPCClient) UpdateIndexEndpoint(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateIndexEndpoint, req, settings.GRPC, c.logger, "UpdateIndexEndpoint") return err }, opts...) if err != nil { @@ -3683,7 +3690,7 @@ func (c *warehouseGRPCClient) DeleteIndexEndpoint(ctx context.Context, req *visi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.DeleteIndexEndpoint(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.DeleteIndexEndpoint, req, settings.GRPC, c.logger, "DeleteIndexEndpoint") return err }, opts...) if err != nil { @@ -3703,7 +3710,7 @@ func (c *warehouseGRPCClient) DeployIndex(ctx context.Context, req *visionaipb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.DeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.DeployIndex, req, settings.GRPC, c.logger, "DeployIndex") return err }, opts...) if err != nil { @@ -3723,7 +3730,7 @@ func (c *warehouseGRPCClient) UndeployIndex(ctx context.Context, req *visionaipb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UndeployIndex(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UndeployIndex, req, settings.GRPC, c.logger, "UndeployIndex") return err }, opts...) if err != nil { @@ -3743,7 +3750,7 @@ func (c *warehouseGRPCClient) CreateCollection(ctx context.Context, req *visiona var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.CreateCollection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.CreateCollection, req, settings.GRPC, c.logger, "CreateCollection") return err }, opts...) if err != nil { @@ -3763,7 +3770,7 @@ func (c *warehouseGRPCClient) DeleteCollection(ctx context.Context, req *visiona var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.DeleteCollection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.DeleteCollection, req, settings.GRPC, c.logger, "DeleteCollection") return err }, opts...) if err != nil { @@ -3783,7 +3790,7 @@ func (c *warehouseGRPCClient) GetCollection(ctx context.Context, req *visionaipb var resp *visionaipb.Collection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.GetCollection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.GetCollection, req, settings.GRPC, c.logger, "GetCollection") return err }, opts...) if err != nil { @@ -3801,7 +3808,7 @@ func (c *warehouseGRPCClient) UpdateCollection(ctx context.Context, req *visiona var resp *visionaipb.Collection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.UpdateCollection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.UpdateCollection, req, settings.GRPC, c.logger, "UpdateCollection") return err }, opts...) if err != nil { @@ -3830,7 +3837,7 @@ func (c *warehouseGRPCClient) ListCollections(ctx context.Context, req *visionai } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ListCollections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ListCollections, req, settings.GRPC, c.logger, "ListCollections") return err }, opts...) if err != nil { @@ -3865,7 +3872,7 @@ func (c *warehouseGRPCClient) AddCollectionItem(ctx context.Context, req *vision var resp *visionaipb.AddCollectionItemResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.AddCollectionItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.AddCollectionItem, req, settings.GRPC, c.logger, "AddCollectionItem") return err }, opts...) if err != nil { @@ -3883,7 +3890,7 @@ func (c *warehouseGRPCClient) RemoveCollectionItem(ctx context.Context, req *vis var resp *visionaipb.RemoveCollectionItemResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.RemoveCollectionItem(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.RemoveCollectionItem, req, settings.GRPC, c.logger, "RemoveCollectionItem") return err }, opts...) if err != nil { @@ -3912,7 +3919,7 @@ func (c *warehouseGRPCClient) ViewCollectionItems(ctx context.Context, req *visi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.warehouseClient.ViewCollectionItems(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.warehouseClient.ViewCollectionItems, req, settings.GRPC, c.logger, "ViewCollectionItems") return err }, opts...) if err != nil { @@ -3946,7 +3953,7 @@ func (c *warehouseGRPCClient) CancelOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -3960,7 +3967,7 @@ func (c *warehouseGRPCClient) DeleteOperation(ctx context.Context, req *longrunn opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -3975,7 +3982,7 @@ func (c *warehouseGRPCClient) GetOperation(ctx context.Context, req *longrunning var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -4004,7 +4011,7 @@ func (c *warehouseGRPCClient) ListOperations(ctx context.Context, req *longrunni } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -4073,17 +4080,7 @@ func (c *warehouseRESTClient) CreateAsset(ctx context.Context, req *visionaipb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAsset") if err != nil { return err } @@ -4147,17 +4144,7 @@ func (c *warehouseRESTClient) UpdateAsset(ctx context.Context, req *visionaipb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAsset") if err != nil { return err } @@ -4207,17 +4194,7 @@ func (c *warehouseRESTClient) GetAsset(ctx context.Context, req *visionaipb.GetA httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAsset") if err != nil { return err } @@ -4282,21 +4259,10 @@ func (c *warehouseRESTClient) ListAssets(ctx context.Context, req *visionaipb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4358,21 +4324,10 @@ func (c *warehouseRESTClient) DeleteAsset(ctx context.Context, req *visionaipb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAsset") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4437,21 +4392,10 @@ func (c *warehouseRESTClient) UploadAsset(ctx context.Context, req *visionaipb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UploadAsset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4510,17 +4454,7 @@ func (c *warehouseRESTClient) GenerateRetrievalUrl(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateRetrievalUrl") if err != nil { return err } @@ -4575,21 +4509,10 @@ func (c *warehouseRESTClient) AnalyzeAsset(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeAsset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4646,21 +4569,10 @@ func (c *warehouseRESTClient) IndexAsset(ctx context.Context, req *visionaipb.In httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "IndexAsset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4717,21 +4629,10 @@ func (c *warehouseRESTClient) RemoveIndexAsset(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveIndexAsset") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4797,21 +4698,10 @@ func (c *warehouseRESTClient) ViewIndexedAssets(ctx context.Context, req *vision } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ViewIndexedAssets") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4883,21 +4773,10 @@ func (c *warehouseRESTClient) CreateIndex(ctx context.Context, req *visionaipb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4963,21 +4842,10 @@ func (c *warehouseRESTClient) UpdateIndex(ctx context.Context, req *visionaipb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5028,17 +4896,7 @@ func (c *warehouseRESTClient) GetIndex(ctx context.Context, req *visionaipb.GetI httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndex") if err != nil { return err } @@ -5100,21 +4958,10 @@ func (c *warehouseRESTClient) ListIndexes(ctx context.Context, req *visionaipb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5177,21 +5024,10 @@ func (c *warehouseRESTClient) DeleteIndex(ctx context.Context, req *visionaipb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5248,21 +5084,10 @@ func (c *warehouseRESTClient) CreateCorpus(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCorpus") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5313,17 +5138,7 @@ func (c *warehouseRESTClient) GetCorpus(ctx context.Context, req *visionaipb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCorpus") if err != nil { return err } @@ -5387,17 +5202,7 @@ func (c *warehouseRESTClient) UpdateCorpus(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCorpus") if err != nil { return err } @@ -5462,21 +5267,10 @@ func (c *warehouseRESTClient) ListCorpora(ctx context.Context, req *visionaipb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCorpora") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5537,15 +5331,8 @@ func (c *warehouseRESTClient) DeleteCorpus(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCorpus") + return err }, opts...) } @@ -5587,21 +5374,10 @@ func (c *warehouseRESTClient) AnalyzeCorpus(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AnalyzeCorpus") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5659,17 +5435,7 @@ func (c *warehouseRESTClient) CreateDataSchema(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataSchema") if err != nil { return err } @@ -5733,17 +5499,7 @@ func (c *warehouseRESTClient) UpdateDataSchema(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataSchema") if err != nil { return err } @@ -5793,17 +5549,7 @@ func (c *warehouseRESTClient) GetDataSchema(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataSchema") if err != nil { return err } @@ -5850,15 +5596,8 @@ func (c *warehouseRESTClient) DeleteDataSchema(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataSchema") + return err }, opts...) } @@ -5907,21 +5646,10 @@ func (c *warehouseRESTClient) ListDataSchemas(ctx context.Context, req *visionai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDataSchemas") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5994,17 +5722,7 @@ func (c *warehouseRESTClient) CreateAnnotation(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateAnnotation") if err != nil { return err } @@ -6054,17 +5772,7 @@ func (c *warehouseRESTClient) GetAnnotation(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetAnnotation") if err != nil { return err } @@ -6129,21 +5837,10 @@ func (c *warehouseRESTClient) ListAnnotations(ctx context.Context, req *visionai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListAnnotations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6220,17 +5917,7 @@ func (c *warehouseRESTClient) UpdateAnnotation(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateAnnotation") if err != nil { return err } @@ -6277,15 +5964,8 @@ func (c *warehouseRESTClient) DeleteAnnotation(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteAnnotation") + return err }, opts...) } @@ -6343,17 +6023,7 @@ func (c *warehouseRESTClient) ClipAsset(ctx context.Context, req *visionaipb.Cli httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ClipAsset") if err != nil { return err } @@ -6411,17 +6081,7 @@ func (c *warehouseRESTClient) GenerateHlsUri(ctx context.Context, req *visionaip httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateHlsUri") if err != nil { return err } @@ -6478,21 +6138,10 @@ func (c *warehouseRESTClient) ImportAssets(ctx context.Context, req *visionaipb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6571,17 +6220,7 @@ func (c *warehouseRESTClient) CreateSearchConfig(ctx context.Context, req *visio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSearchConfig") if err != nil { return err } @@ -6664,17 +6303,7 @@ func (c *warehouseRESTClient) UpdateSearchConfig(ctx context.Context, req *visio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSearchConfig") if err != nil { return err } @@ -6724,17 +6353,7 @@ func (c *warehouseRESTClient) GetSearchConfig(ctx context.Context, req *visionai httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSearchConfig") if err != nil { return err } @@ -6784,15 +6403,8 @@ func (c *warehouseRESTClient) DeleteSearchConfig(ctx context.Context, req *visio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSearchConfig") + return err }, opts...) } @@ -6841,21 +6453,10 @@ func (c *warehouseRESTClient) ListSearchConfigs(ctx context.Context, req *vision } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSearchConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6928,17 +6529,7 @@ func (c *warehouseRESTClient) CreateSearchHypernym(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSearchHypernym") if err != nil { return err } @@ -7002,17 +6593,7 @@ func (c *warehouseRESTClient) UpdateSearchHypernym(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSearchHypernym") if err != nil { return err } @@ -7062,17 +6643,7 @@ func (c *warehouseRESTClient) GetSearchHypernym(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSearchHypernym") if err != nil { return err } @@ -7119,15 +6690,8 @@ func (c *warehouseRESTClient) DeleteSearchHypernym(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSearchHypernym") + return err }, opts...) } @@ -7176,21 +6740,10 @@ func (c *warehouseRESTClient) ListSearchHypernyms(ctx context.Context, req *visi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSearchHypernyms") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7265,21 +6818,10 @@ func (c *warehouseRESTClient) SearchAssets(ctx context.Context, req *visionaipb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchAssets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7354,21 +6896,10 @@ func (c *warehouseRESTClient) SearchIndexEndpoint(ctx context.Context, req *visi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchIndexEndpoint") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7440,21 +6971,10 @@ func (c *warehouseRESTClient) CreateIndexEndpoint(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndexEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7505,17 +7025,7 @@ func (c *warehouseRESTClient) GetIndexEndpoint(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndexEndpoint") if err != nil { return err } @@ -7580,21 +7090,10 @@ func (c *warehouseRESTClient) ListIndexEndpoints(ctx context.Context, req *visio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexEndpoints") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7670,21 +7169,10 @@ func (c *warehouseRESTClient) UpdateIndexEndpoint(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateIndexEndpoint") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7734,21 +7222,10 @@ func (c *warehouseRESTClient) DeleteIndexEndpoint(ctx context.Context, req *visi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndexEndpoint") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7804,21 +7281,10 @@ func (c *warehouseRESTClient) DeployIndex(ctx context.Context, req *visionaipb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "DeployIndex") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7874,21 +7340,10 @@ func (c *warehouseRESTClient) UndeployIndex(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeployIndex") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7948,21 +7403,10 @@ func (c *warehouseRESTClient) CreateCollection(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCollection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8012,21 +7456,10 @@ func (c *warehouseRESTClient) DeleteCollection(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCollection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8077,17 +7510,7 @@ func (c *warehouseRESTClient) GetCollection(ctx context.Context, req *visionaipb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCollection") if err != nil { return err } @@ -8151,17 +7574,7 @@ func (c *warehouseRESTClient) UpdateCollection(ctx context.Context, req *visiona httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCollection") if err != nil { return err } @@ -8223,21 +7636,10 @@ func (c *warehouseRESTClient) ListCollections(ctx context.Context, req *visionai } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCollections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8306,17 +7708,7 @@ func (c *warehouseRESTClient) AddCollectionItem(ctx context.Context, req *vision httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddCollectionItem") if err != nil { return err } @@ -8372,17 +7764,7 @@ func (c *warehouseRESTClient) RemoveCollectionItem(ctx context.Context, req *vis httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveCollectionItem") if err != nil { return err } @@ -8444,21 +7826,10 @@ func (c *warehouseRESTClient) ViewCollectionItems(ctx context.Context, req *visi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ViewCollectionItems") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8524,15 +7895,8 @@ func (c *warehouseRESTClient) CancelOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -8566,15 +7930,8 @@ func (c *warehouseRESTClient) DeleteOperation(ctx context.Context, req *longrunn httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -8611,17 +7968,7 @@ func (c *warehouseRESTClient) GetOperation(ctx context.Context, req *longrunning httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -8686,21 +8033,10 @@ func (c *warehouseRESTClient) ListOperations(ctx context.Context, req *longrunni } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/visionai/apiv1/warehouse_client_example_go123_test.go b/visionai/apiv1/warehouse_client_example_go123_test.go index 805f60e89e2b..430d2420465c 100644 --- a/visionai/apiv1/warehouse_client_example_go123_test.go +++ b/visionai/apiv1/warehouse_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleWarehouseClient_ListAnnotations_all() { } for resp, err := range c.ListAnnotations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleWarehouseClient_ListAssets_all() { } for resp, err := range c.ListAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleWarehouseClient_ListCollections_all() { } for resp, err := range c.ListCollections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleWarehouseClient_ListCorpora_all() { } for resp, err := range c.ListCorpora(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleWarehouseClient_ListDataSchemas_all() { } for resp, err := range c.ListDataSchemas(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleWarehouseClient_ListIndexEndpoints_all() { } for resp, err := range c.ListIndexEndpoints(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -201,7 +201,7 @@ func ExampleWarehouseClient_ListIndexes_all() { } for resp, err := range c.ListIndexes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -227,7 +227,7 @@ func ExampleWarehouseClient_ListSearchConfigs_all() { } for resp, err := range c.ListSearchConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -253,7 +253,7 @@ func ExampleWarehouseClient_ListSearchHypernyms_all() { } for resp, err := range c.ListSearchHypernyms(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -279,7 +279,7 @@ func ExampleWarehouseClient_SearchAssets_all() { } for resp, err := range c.SearchAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -305,7 +305,7 @@ func ExampleWarehouseClient_SearchIndexEndpoint_all() { } for resp, err := range c.SearchIndexEndpoint(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -331,7 +331,7 @@ func ExampleWarehouseClient_ViewCollectionItems_all() { } for resp, err := range c.ViewCollectionItems(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -357,7 +357,7 @@ func ExampleWarehouseClient_ViewIndexedAssets_all() { } for resp, err := range c.ViewIndexedAssets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -383,7 +383,7 @@ func ExampleWarehouseClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/vmmigration/apiv1/helpers.go b/vmmigration/apiv1/helpers.go index ffa24846d393..8aaf981e44cf 100755 --- a/vmmigration/apiv1/helpers.go +++ b/vmmigration/apiv1/helpers.go @@ -18,10 +18,20 @@ package vmmigration import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "vmmigration.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vmmigration/apiv1/vm_migration_client.go b/vmmigration/apiv1/vm_migration_client.go index 64d3754dbaea..f125327c5df6 100755 --- a/vmmigration/apiv1/vm_migration_client.go +++ b/vmmigration/apiv1/vm_migration_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -1015,6 +1014,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new vm migration client based on gRPC. @@ -1041,6 +1042,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: vmmigrationpb.NewVmMigrationClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -1105,6 +1107,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new vm migration rest client. @@ -1122,6 +1126,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -1195,7 +1200,7 @@ func (c *gRPCClient) ListSources(ctx context.Context, req *vmmigrationpb.ListSou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSources(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSources, req, settings.GRPC, c.logger, "ListSources") return err }, opts...) if err != nil { @@ -1230,7 +1235,7 @@ func (c *gRPCClient) GetSource(ctx context.Context, req *vmmigrationpb.GetSource var resp *vmmigrationpb.Source err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSource, req, settings.GRPC, c.logger, "GetSource") return err }, opts...) if err != nil { @@ -1248,7 +1253,7 @@ func (c *gRPCClient) CreateSource(ctx context.Context, req *vmmigrationpb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSource, req, settings.GRPC, c.logger, "CreateSource") return err }, opts...) if err != nil { @@ -1268,7 +1273,7 @@ func (c *gRPCClient) UpdateSource(ctx context.Context, req *vmmigrationpb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSource, req, settings.GRPC, c.logger, "UpdateSource") return err }, opts...) if err != nil { @@ -1288,7 +1293,7 @@ func (c *gRPCClient) DeleteSource(ctx context.Context, req *vmmigrationpb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteSource(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteSource, req, settings.GRPC, c.logger, "DeleteSource") return err }, opts...) if err != nil { @@ -1308,7 +1313,7 @@ func (c *gRPCClient) FetchInventory(ctx context.Context, req *vmmigrationpb.Fetc var resp *vmmigrationpb.FetchInventoryResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchInventory(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchInventory, req, settings.GRPC, c.logger, "FetchInventory") return err }, opts...) if err != nil { @@ -1337,7 +1342,7 @@ func (c *gRPCClient) ListUtilizationReports(ctx context.Context, req *vmmigratio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListUtilizationReports(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListUtilizationReports, req, settings.GRPC, c.logger, "ListUtilizationReports") return err }, opts...) if err != nil { @@ -1372,7 +1377,7 @@ func (c *gRPCClient) GetUtilizationReport(ctx context.Context, req *vmmigrationp var resp *vmmigrationpb.UtilizationReport err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetUtilizationReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetUtilizationReport, req, settings.GRPC, c.logger, "GetUtilizationReport") return err }, opts...) if err != nil { @@ -1390,7 +1395,7 @@ func (c *gRPCClient) CreateUtilizationReport(ctx context.Context, req *vmmigrati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateUtilizationReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateUtilizationReport, req, settings.GRPC, c.logger, "CreateUtilizationReport") return err }, opts...) if err != nil { @@ -1410,7 +1415,7 @@ func (c *gRPCClient) DeleteUtilizationReport(ctx context.Context, req *vmmigrati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteUtilizationReport(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteUtilizationReport, req, settings.GRPC, c.logger, "DeleteUtilizationReport") return err }, opts...) if err != nil { @@ -1441,7 +1446,7 @@ func (c *gRPCClient) ListDatacenterConnectors(ctx context.Context, req *vmmigrat } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListDatacenterConnectors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListDatacenterConnectors, req, settings.GRPC, c.logger, "ListDatacenterConnectors") return err }, opts...) if err != nil { @@ -1476,7 +1481,7 @@ func (c *gRPCClient) GetDatacenterConnector(ctx context.Context, req *vmmigratio var resp *vmmigrationpb.DatacenterConnector err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDatacenterConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDatacenterConnector, req, settings.GRPC, c.logger, "GetDatacenterConnector") return err }, opts...) if err != nil { @@ -1494,7 +1499,7 @@ func (c *gRPCClient) CreateDatacenterConnector(ctx context.Context, req *vmmigra var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateDatacenterConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateDatacenterConnector, req, settings.GRPC, c.logger, "CreateDatacenterConnector") return err }, opts...) if err != nil { @@ -1514,7 +1519,7 @@ func (c *gRPCClient) DeleteDatacenterConnector(ctx context.Context, req *vmmigra var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteDatacenterConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteDatacenterConnector, req, settings.GRPC, c.logger, "DeleteDatacenterConnector") return err }, opts...) if err != nil { @@ -1534,7 +1539,7 @@ func (c *gRPCClient) UpgradeAppliance(ctx context.Context, req *vmmigrationpb.Up var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpgradeAppliance(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpgradeAppliance, req, settings.GRPC, c.logger, "UpgradeAppliance") return err }, opts...) if err != nil { @@ -1554,7 +1559,7 @@ func (c *gRPCClient) CreateMigratingVm(ctx context.Context, req *vmmigrationpb.C var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateMigratingVm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateMigratingVm, req, settings.GRPC, c.logger, "CreateMigratingVm") return err }, opts...) if err != nil { @@ -1585,7 +1590,7 @@ func (c *gRPCClient) ListMigratingVms(ctx context.Context, req *vmmigrationpb.Li } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListMigratingVms(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListMigratingVms, req, settings.GRPC, c.logger, "ListMigratingVms") return err }, opts...) if err != nil { @@ -1620,7 +1625,7 @@ func (c *gRPCClient) GetMigratingVm(ctx context.Context, req *vmmigrationpb.GetM var resp *vmmigrationpb.MigratingVm err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetMigratingVm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetMigratingVm, req, settings.GRPC, c.logger, "GetMigratingVm") return err }, opts...) if err != nil { @@ -1638,7 +1643,7 @@ func (c *gRPCClient) UpdateMigratingVm(ctx context.Context, req *vmmigrationpb.U var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateMigratingVm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateMigratingVm, req, settings.GRPC, c.logger, "UpdateMigratingVm") return err }, opts...) if err != nil { @@ -1658,7 +1663,7 @@ func (c *gRPCClient) DeleteMigratingVm(ctx context.Context, req *vmmigrationpb.D var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteMigratingVm(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteMigratingVm, req, settings.GRPC, c.logger, "DeleteMigratingVm") return err }, opts...) if err != nil { @@ -1678,7 +1683,7 @@ func (c *gRPCClient) StartMigration(ctx context.Context, req *vmmigrationpb.Star var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartMigration, req, settings.GRPC, c.logger, "StartMigration") return err }, opts...) if err != nil { @@ -1698,7 +1703,7 @@ func (c *gRPCClient) ResumeMigration(ctx context.Context, req *vmmigrationpb.Res var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResumeMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResumeMigration, req, settings.GRPC, c.logger, "ResumeMigration") return err }, opts...) if err != nil { @@ -1718,7 +1723,7 @@ func (c *gRPCClient) PauseMigration(ctx context.Context, req *vmmigrationpb.Paus var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.PauseMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.PauseMigration, req, settings.GRPC, c.logger, "PauseMigration") return err }, opts...) if err != nil { @@ -1738,7 +1743,7 @@ func (c *gRPCClient) FinalizeMigration(ctx context.Context, req *vmmigrationpb.F var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FinalizeMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FinalizeMigration, req, settings.GRPC, c.logger, "FinalizeMigration") return err }, opts...) if err != nil { @@ -1758,7 +1763,7 @@ func (c *gRPCClient) CreateCloneJob(ctx context.Context, req *vmmigrationpb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCloneJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCloneJob, req, settings.GRPC, c.logger, "CreateCloneJob") return err }, opts...) if err != nil { @@ -1778,7 +1783,7 @@ func (c *gRPCClient) CancelCloneJob(ctx context.Context, req *vmmigrationpb.Canc var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelCloneJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelCloneJob, req, settings.GRPC, c.logger, "CancelCloneJob") return err }, opts...) if err != nil { @@ -1809,7 +1814,7 @@ func (c *gRPCClient) ListCloneJobs(ctx context.Context, req *vmmigrationpb.ListC } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCloneJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCloneJobs, req, settings.GRPC, c.logger, "ListCloneJobs") return err }, opts...) if err != nil { @@ -1844,7 +1849,7 @@ func (c *gRPCClient) GetCloneJob(ctx context.Context, req *vmmigrationpb.GetClon var resp *vmmigrationpb.CloneJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCloneJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCloneJob, req, settings.GRPC, c.logger, "GetCloneJob") return err }, opts...) if err != nil { @@ -1862,7 +1867,7 @@ func (c *gRPCClient) CreateCutoverJob(ctx context.Context, req *vmmigrationpb.Cr var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCutoverJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCutoverJob, req, settings.GRPC, c.logger, "CreateCutoverJob") return err }, opts...) if err != nil { @@ -1882,7 +1887,7 @@ func (c *gRPCClient) CancelCutoverJob(ctx context.Context, req *vmmigrationpb.Ca var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelCutoverJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelCutoverJob, req, settings.GRPC, c.logger, "CancelCutoverJob") return err }, opts...) if err != nil { @@ -1913,7 +1918,7 @@ func (c *gRPCClient) ListCutoverJobs(ctx context.Context, req *vmmigrationpb.Lis } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCutoverJobs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCutoverJobs, req, settings.GRPC, c.logger, "ListCutoverJobs") return err }, opts...) if err != nil { @@ -1948,7 +1953,7 @@ func (c *gRPCClient) GetCutoverJob(ctx context.Context, req *vmmigrationpb.GetCu var resp *vmmigrationpb.CutoverJob err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCutoverJob(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCutoverJob, req, settings.GRPC, c.logger, "GetCutoverJob") return err }, opts...) if err != nil { @@ -1977,7 +1982,7 @@ func (c *gRPCClient) ListGroups(ctx context.Context, req *vmmigrationpb.ListGrou } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListGroups(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListGroups, req, settings.GRPC, c.logger, "ListGroups") return err }, opts...) if err != nil { @@ -2012,7 +2017,7 @@ func (c *gRPCClient) GetGroup(ctx context.Context, req *vmmigrationpb.GetGroupRe var resp *vmmigrationpb.Group err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetGroup, req, settings.GRPC, c.logger, "GetGroup") return err }, opts...) if err != nil { @@ -2030,7 +2035,7 @@ func (c *gRPCClient) CreateGroup(ctx context.Context, req *vmmigrationpb.CreateG var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateGroup, req, settings.GRPC, c.logger, "CreateGroup") return err }, opts...) if err != nil { @@ -2050,7 +2055,7 @@ func (c *gRPCClient) UpdateGroup(ctx context.Context, req *vmmigrationpb.UpdateG var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateGroup, req, settings.GRPC, c.logger, "UpdateGroup") return err }, opts...) if err != nil { @@ -2070,7 +2075,7 @@ func (c *gRPCClient) DeleteGroup(ctx context.Context, req *vmmigrationpb.DeleteG var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteGroup(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteGroup, req, settings.GRPC, c.logger, "DeleteGroup") return err }, opts...) if err != nil { @@ -2090,7 +2095,7 @@ func (c *gRPCClient) AddGroupMigration(ctx context.Context, req *vmmigrationpb.A var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.AddGroupMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.AddGroupMigration, req, settings.GRPC, c.logger, "AddGroupMigration") return err }, opts...) if err != nil { @@ -2110,7 +2115,7 @@ func (c *gRPCClient) RemoveGroupMigration(ctx context.Context, req *vmmigrationp var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RemoveGroupMigration(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RemoveGroupMigration, req, settings.GRPC, c.logger, "RemoveGroupMigration") return err }, opts...) if err != nil { @@ -2141,7 +2146,7 @@ func (c *gRPCClient) ListTargetProjects(ctx context.Context, req *vmmigrationpb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListTargetProjects(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListTargetProjects, req, settings.GRPC, c.logger, "ListTargetProjects") return err }, opts...) if err != nil { @@ -2176,7 +2181,7 @@ func (c *gRPCClient) GetTargetProject(ctx context.Context, req *vmmigrationpb.Ge var resp *vmmigrationpb.TargetProject err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetTargetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetTargetProject, req, settings.GRPC, c.logger, "GetTargetProject") return err }, opts...) if err != nil { @@ -2194,7 +2199,7 @@ func (c *gRPCClient) CreateTargetProject(ctx context.Context, req *vmmigrationpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateTargetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateTargetProject, req, settings.GRPC, c.logger, "CreateTargetProject") return err }, opts...) if err != nil { @@ -2214,7 +2219,7 @@ func (c *gRPCClient) UpdateTargetProject(ctx context.Context, req *vmmigrationpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateTargetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateTargetProject, req, settings.GRPC, c.logger, "UpdateTargetProject") return err }, opts...) if err != nil { @@ -2234,7 +2239,7 @@ func (c *gRPCClient) DeleteTargetProject(ctx context.Context, req *vmmigrationpb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteTargetProject(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteTargetProject, req, settings.GRPC, c.logger, "DeleteTargetProject") return err }, opts...) if err != nil { @@ -2265,7 +2270,7 @@ func (c *gRPCClient) ListReplicationCycles(ctx context.Context, req *vmmigration } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListReplicationCycles(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListReplicationCycles, req, settings.GRPC, c.logger, "ListReplicationCycles") return err }, opts...) if err != nil { @@ -2300,7 +2305,7 @@ func (c *gRPCClient) GetReplicationCycle(ctx context.Context, req *vmmigrationpb var resp *vmmigrationpb.ReplicationCycle err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetReplicationCycle(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetReplicationCycle, req, settings.GRPC, c.logger, "GetReplicationCycle") return err }, opts...) if err != nil { @@ -2318,7 +2323,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -2347,7 +2352,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -2381,7 +2386,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -2395,7 +2400,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -2410,7 +2415,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -2439,7 +2444,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -2514,21 +2519,10 @@ func (c *restClient) ListSources(ctx context.Context, req *vmmigrationpb.ListSou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSources") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2591,17 +2585,7 @@ func (c *restClient) GetSource(ctx context.Context, req *vmmigrationpb.GetSource httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSource") if err != nil { return err } @@ -2661,21 +2645,10 @@ func (c *restClient) CreateSource(ctx context.Context, req *vmmigrationpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSource") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2742,21 +2715,10 @@ func (c *restClient) UpdateSource(ctx context.Context, req *vmmigrationpb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2809,21 +2771,10 @@ func (c *restClient) DeleteSource(ctx context.Context, req *vmmigrationpb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSource") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2881,17 +2832,7 @@ func (c *restClient) FetchInventory(ctx context.Context, req *vmmigrationpb.Fetc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchInventory") if err != nil { return err } @@ -2960,21 +2901,10 @@ func (c *restClient) ListUtilizationReports(ctx context.Context, req *vmmigratio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUtilizationReports") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3040,17 +2970,7 @@ func (c *restClient) GetUtilizationReport(ctx context.Context, req *vmmigrationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetUtilizationReport") if err != nil { return err } @@ -3110,21 +3030,10 @@ func (c *restClient) CreateUtilizationReport(ctx context.Context, req *vmmigrati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateUtilizationReport") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3177,21 +3086,10 @@ func (c *restClient) DeleteUtilizationReport(ctx context.Context, req *vmmigrati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteUtilizationReport") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3258,21 +3156,10 @@ func (c *restClient) ListDatacenterConnectors(ctx context.Context, req *vmmigrat } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListDatacenterConnectors") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3335,17 +3222,7 @@ func (c *restClient) GetDatacenterConnector(ctx context.Context, req *vmmigratio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDatacenterConnector") if err != nil { return err } @@ -3405,21 +3282,10 @@ func (c *restClient) CreateDatacenterConnector(ctx context.Context, req *vmmigra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDatacenterConnector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3472,21 +3338,10 @@ func (c *restClient) DeleteDatacenterConnector(ctx context.Context, req *vmmigra httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDatacenterConnector") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3543,21 +3398,10 @@ func (c *restClient) UpgradeAppliance(ctx context.Context, req *vmmigrationpb.Up httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpgradeAppliance") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3618,21 +3462,10 @@ func (c *restClient) CreateMigratingVm(ctx context.Context, req *vmmigrationpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateMigratingVm") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3702,21 +3535,10 @@ func (c *restClient) ListMigratingVms(ctx context.Context, req *vmmigrationpb.Li } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMigratingVms") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3782,17 +3604,7 @@ func (c *restClient) GetMigratingVm(ctx context.Context, req *vmmigrationpb.GetM httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMigratingVm") if err != nil { return err } @@ -3858,21 +3670,10 @@ func (c *restClient) UpdateMigratingVm(ctx context.Context, req *vmmigrationpb.U httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateMigratingVm") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3922,21 +3723,10 @@ func (c *restClient) DeleteMigratingVm(ctx context.Context, req *vmmigrationpb.D httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteMigratingVm") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3993,21 +3783,10 @@ func (c *restClient) StartMigration(ctx context.Context, req *vmmigrationpb.Star httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartMigration") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4066,21 +3845,10 @@ func (c *restClient) ResumeMigration(ctx context.Context, req *vmmigrationpb.Res httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResumeMigration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4138,21 +3906,10 @@ func (c *restClient) PauseMigration(ctx context.Context, req *vmmigrationpb.Paus httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "PauseMigration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4209,21 +3966,10 @@ func (c *restClient) FinalizeMigration(ctx context.Context, req *vmmigrationpb.F httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "FinalizeMigration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4284,21 +4030,10 @@ func (c *restClient) CreateCloneJob(ctx context.Context, req *vmmigrationpb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCloneJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4354,21 +4089,10 @@ func (c *restClient) CancelCloneJob(ctx context.Context, req *vmmigrationpb.Canc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelCloneJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4435,21 +4159,10 @@ func (c *restClient) ListCloneJobs(ctx context.Context, req *vmmigrationpb.ListC } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCloneJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4512,17 +4225,7 @@ func (c *restClient) GetCloneJob(ctx context.Context, req *vmmigrationpb.GetClon httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCloneJob") if err != nil { return err } @@ -4584,21 +4287,10 @@ func (c *restClient) CreateCutoverJob(ctx context.Context, req *vmmigrationpb.Cr httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCutoverJob") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4654,21 +4346,10 @@ func (c *restClient) CancelCutoverJob(ctx context.Context, req *vmmigrationpb.Ca httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelCutoverJob") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4735,21 +4416,10 @@ func (c *restClient) ListCutoverJobs(ctx context.Context, req *vmmigrationpb.Lis } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCutoverJobs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4812,17 +4482,7 @@ func (c *restClient) GetCutoverJob(ctx context.Context, req *vmmigrationpb.GetCu httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCutoverJob") if err != nil { return err } @@ -4888,21 +4548,10 @@ func (c *restClient) ListGroups(ctx context.Context, req *vmmigrationpb.ListGrou } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListGroups") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4965,17 +4614,7 @@ func (c *restClient) GetGroup(ctx context.Context, req *vmmigrationpb.GetGroupRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetGroup") if err != nil { return err } @@ -5035,21 +4674,10 @@ func (c *restClient) CreateGroup(ctx context.Context, req *vmmigrationpb.CreateG httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5116,21 +4744,10 @@ func (c *restClient) UpdateGroup(ctx context.Context, req *vmmigrationpb.UpdateG httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateGroup") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5183,21 +4800,10 @@ func (c *restClient) DeleteGroup(ctx context.Context, req *vmmigrationpb.DeleteG httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteGroup") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5253,21 +4859,10 @@ func (c *restClient) AddGroupMigration(ctx context.Context, req *vmmigrationpb.A httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AddGroupMigration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5323,21 +4918,10 @@ func (c *restClient) RemoveGroupMigration(ctx context.Context, req *vmmigrationp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RemoveGroupMigration") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5407,21 +4991,10 @@ func (c *restClient) ListTargetProjects(ctx context.Context, req *vmmigrationpb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListTargetProjects") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5487,17 +5060,7 @@ func (c *restClient) GetTargetProject(ctx context.Context, req *vmmigrationpb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetTargetProject") if err != nil { return err } @@ -5560,21 +5123,10 @@ func (c *restClient) CreateTargetProject(ctx context.Context, req *vmmigrationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateTargetProject") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5644,21 +5196,10 @@ func (c *restClient) UpdateTargetProject(ctx context.Context, req *vmmigrationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateTargetProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5714,21 +5255,10 @@ func (c *restClient) DeleteTargetProject(ctx context.Context, req *vmmigrationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteTargetProject") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5795,21 +5325,10 @@ func (c *restClient) ListReplicationCycles(ctx context.Context, req *vmmigration } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListReplicationCycles") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5872,17 +5391,7 @@ func (c *restClient) GetReplicationCycle(ctx context.Context, req *vmmigrationpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetReplicationCycle") if err != nil { return err } @@ -5932,17 +5441,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -6007,21 +5506,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6087,15 +5575,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -6129,15 +5610,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -6174,17 +5648,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -6249,21 +5713,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/vmmigration/apiv1/vm_migration_client_example_go123_test.go b/vmmigration/apiv1/vm_migration_client_example_go123_test.go index 4def199e811d..cc7a38653b77 100644 --- a/vmmigration/apiv1/vm_migration_client_example_go123_test.go +++ b/vmmigration/apiv1/vm_migration_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListCloneJobs_all() { } for resp, err := range c.ListCloneJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListCutoverJobs_all() { } for resp, err := range c.ListCutoverJobs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListDatacenterConnectors_all() { } for resp, err := range c.ListDatacenterConnectors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListGroups_all() { } for resp, err := range c.ListGroups(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListMigratingVms_all() { } for resp, err := range c.ListMigratingVms(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListReplicationCycles_all() { } for resp, err := range c.ListReplicationCycles(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListSources_all() { } for resp, err := range c.ListSources(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListTargetProjects_all() { } for resp, err := range c.ListTargetProjects(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListUtilizationReports_all() { } for resp, err := range c.ListUtilizationReports(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/vmmigration/apiv1/vmmigrationpb/vmmigration.pb.go b/vmmigration/apiv1/vmmigrationpb/vmmigration.pb.go index 6bac4d1a19ff..a7aad9d388d9 100755 --- a/vmmigration/apiv1/vmmigrationpb/vmmigration.pb.go +++ b/vmmigration/apiv1/vmmigrationpb/vmmigration.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vmmigration/v1/vmmigration.proto @@ -1648,11 +1648,9 @@ type ReplicationCycle struct { func (x *ReplicationCycle) Reset() { *x = ReplicationCycle{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationCycle) String() string { @@ -1663,7 +1661,7 @@ func (*ReplicationCycle) ProtoMessage() {} func (x *ReplicationCycle) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1762,11 +1760,9 @@ type CycleStep struct { func (x *CycleStep) Reset() { *x = CycleStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CycleStep) String() string { @@ -1777,7 +1773,7 @@ func (*CycleStep) ProtoMessage() {} func (x *CycleStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1868,11 +1864,9 @@ type InitializingReplicationStep struct { func (x *InitializingReplicationStep) Reset() { *x = InitializingReplicationStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InitializingReplicationStep) String() string { @@ -1883,7 +1877,7 @@ func (*InitializingReplicationStep) ProtoMessage() {} func (x *InitializingReplicationStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1912,9 @@ type ReplicatingStep struct { func (x *ReplicatingStep) Reset() { *x = ReplicatingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicatingStep) String() string { @@ -1933,7 +1925,7 @@ func (*ReplicatingStep) ProtoMessage() {} func (x *ReplicatingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1985,11 +1977,9 @@ type PostProcessingStep struct { func (x *PostProcessingStep) Reset() { *x = PostProcessingStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PostProcessingStep) String() string { @@ -2000,7 +1990,7 @@ func (*PostProcessingStep) ProtoMessage() {} func (x *PostProcessingStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2028,11 +2018,9 @@ type ReplicationSync struct { func (x *ReplicationSync) Reset() { *x = ReplicationSync{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReplicationSync) String() string { @@ -2043,7 +2031,7 @@ func (*ReplicationSync) ProtoMessage() {} func (x *ReplicationSync) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2137,11 +2125,9 @@ type MigratingVm struct { func (x *MigratingVm) Reset() { *x = MigratingVm{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigratingVm) String() string { @@ -2152,7 +2138,7 @@ func (*MigratingVm) ProtoMessage() {} func (x *MigratingVm) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2370,11 +2356,9 @@ type CloneJob struct { func (x *CloneJob) Reset() { *x = CloneJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloneJob) String() string { @@ -2385,7 +2369,7 @@ func (*CloneJob) ProtoMessage() {} func (x *CloneJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2494,11 +2478,9 @@ type CloneStep struct { func (x *CloneStep) Reset() { *x = CloneStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CloneStep) String() string { @@ -2509,7 +2491,7 @@ func (*CloneStep) ProtoMessage() {} func (x *CloneStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2600,11 +2582,9 @@ type AdaptingOSStep struct { func (x *AdaptingOSStep) Reset() { *x = AdaptingOSStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AdaptingOSStep) String() string { @@ -2615,7 +2595,7 @@ func (*AdaptingOSStep) ProtoMessage() {} func (x *AdaptingOSStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2639,11 +2619,9 @@ type PreparingVMDisksStep struct { func (x *PreparingVMDisksStep) Reset() { *x = PreparingVMDisksStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PreparingVMDisksStep) String() string { @@ -2654,7 +2632,7 @@ func (*PreparingVMDisksStep) ProtoMessage() {} func (x *PreparingVMDisksStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2678,11 +2656,9 @@ type InstantiatingMigratedVMStep struct { func (x *InstantiatingMigratedVMStep) Reset() { *x = InstantiatingMigratedVMStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InstantiatingMigratedVMStep) String() string { @@ -2693,7 +2669,7 @@ func (*InstantiatingMigratedVMStep) ProtoMessage() {} func (x *InstantiatingMigratedVMStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2747,11 +2723,9 @@ type CutoverJob struct { func (x *CutoverJob) Reset() { *x = CutoverJob{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CutoverJob) String() string { @@ -2762,7 +2736,7 @@ func (*CutoverJob) ProtoMessage() {} func (x *CutoverJob) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2887,11 +2861,9 @@ type CutoverStep struct { func (x *CutoverStep) Reset() { *x = CutoverStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CutoverStep) String() string { @@ -2902,7 +2874,7 @@ func (*CutoverStep) ProtoMessage() {} func (x *CutoverStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3021,11 +2993,9 @@ type ShuttingDownSourceVMStep struct { func (x *ShuttingDownSourceVMStep) Reset() { *x = ShuttingDownSourceVMStep{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShuttingDownSourceVMStep) String() string { @@ -3036,7 +3006,7 @@ func (*ShuttingDownSourceVMStep) ProtoMessage() {} func (x *ShuttingDownSourceVMStep) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3081,11 +3051,9 @@ type CreateCloneJobRequest struct { func (x *CreateCloneJobRequest) Reset() { *x = CreateCloneJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCloneJobRequest) String() string { @@ -3096,7 +3064,7 @@ func (*CreateCloneJobRequest) ProtoMessage() {} func (x *CreateCloneJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3151,11 +3119,9 @@ type CancelCloneJobRequest struct { func (x *CancelCloneJobRequest) Reset() { *x = CancelCloneJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCloneJobRequest) String() string { @@ -3166,7 +3132,7 @@ func (*CancelCloneJobRequest) ProtoMessage() {} func (x *CancelCloneJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3197,11 +3163,9 @@ type CancelCloneJobResponse struct { func (x *CancelCloneJobResponse) Reset() { *x = CancelCloneJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCloneJobResponse) String() string { @@ -3212,7 +3176,7 @@ func (*CancelCloneJobResponse) ProtoMessage() {} func (x *CancelCloneJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3254,11 +3218,9 @@ type ListCloneJobsRequest struct { func (x *ListCloneJobsRequest) Reset() { *x = ListCloneJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloneJobsRequest) String() string { @@ -3269,7 +3231,7 @@ func (*ListCloneJobsRequest) ProtoMessage() {} func (x *ListCloneJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3336,11 +3298,9 @@ type ListCloneJobsResponse struct { func (x *ListCloneJobsResponse) Reset() { *x = ListCloneJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCloneJobsResponse) String() string { @@ -3351,7 +3311,7 @@ func (*ListCloneJobsResponse) ProtoMessage() {} func (x *ListCloneJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3399,11 +3359,9 @@ type GetCloneJobRequest struct { func (x *GetCloneJobRequest) Reset() { *x = GetCloneJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCloneJobRequest) String() string { @@ -3414,7 +3372,7 @@ func (*GetCloneJobRequest) ProtoMessage() {} func (x *GetCloneJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3462,11 +3420,9 @@ type Source struct { func (x *Source) Reset() { *x = Source{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Source) String() string { @@ -3477,7 +3433,7 @@ func (*Source) ProtoMessage() {} func (x *Source) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3586,11 +3542,9 @@ type VmwareSourceDetails struct { func (x *VmwareSourceDetails) Reset() { *x = VmwareSourceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareSourceDetails) String() string { @@ -3601,7 +3555,7 @@ func (*VmwareSourceDetails) ProtoMessage() {} func (x *VmwareSourceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3679,11 +3633,9 @@ type AwsSourceDetails struct { func (x *AwsSourceDetails) Reset() { *x = AwsSourceDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSourceDetails) String() string { @@ -3694,7 +3646,7 @@ func (*AwsSourceDetails) ProtoMessage() {} func (x *AwsSourceDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3836,11 +3788,9 @@ type DatacenterConnector struct { func (x *DatacenterConnector) Reset() { *x = DatacenterConnector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DatacenterConnector) String() string { @@ -3851,7 +3801,7 @@ func (*DatacenterConnector) ProtoMessage() {} func (x *DatacenterConnector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3984,11 +3934,9 @@ type UpgradeStatus struct { func (x *UpgradeStatus) Reset() { *x = UpgradeStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeStatus) String() string { @@ -3999,7 +3947,7 @@ func (*UpgradeStatus) ProtoMessage() {} func (x *UpgradeStatus) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4067,11 +4015,9 @@ type AvailableUpdates struct { func (x *AvailableUpdates) Reset() { *x = AvailableUpdates{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AvailableUpdates) String() string { @@ -4082,7 +4028,7 @@ func (*AvailableUpdates) ProtoMessage() {} func (x *AvailableUpdates) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4129,11 +4075,9 @@ type ApplianceVersion struct { func (x *ApplianceVersion) Reset() { *x = ApplianceVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ApplianceVersion) String() string { @@ -4144,7 +4088,7 @@ func (*ApplianceVersion) ProtoMessage() {} func (x *ApplianceVersion) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4214,11 +4158,9 @@ type ListSourcesRequest struct { func (x *ListSourcesRequest) Reset() { *x = ListSourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesRequest) String() string { @@ -4229,7 +4171,7 @@ func (*ListSourcesRequest) ProtoMessage() {} func (x *ListSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4296,11 +4238,9 @@ type ListSourcesResponse struct { func (x *ListSourcesResponse) Reset() { *x = ListSourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSourcesResponse) String() string { @@ -4311,7 +4251,7 @@ func (*ListSourcesResponse) ProtoMessage() {} func (x *ListSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4359,11 +4299,9 @@ type GetSourceRequest struct { func (x *GetSourceRequest) Reset() { *x = GetSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSourceRequest) String() string { @@ -4374,7 +4312,7 @@ func (*GetSourceRequest) ProtoMessage() {} func (x *GetSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4426,11 +4364,9 @@ type CreateSourceRequest struct { func (x *CreateSourceRequest) Reset() { *x = CreateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSourceRequest) String() string { @@ -4441,7 +4377,7 @@ func (*CreateSourceRequest) ProtoMessage() {} func (x *CreateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4516,11 +4452,9 @@ type UpdateSourceRequest struct { func (x *UpdateSourceRequest) Reset() { *x = UpdateSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSourceRequest) String() string { @@ -4531,7 +4465,7 @@ func (*UpdateSourceRequest) ProtoMessage() {} func (x *UpdateSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4593,11 +4527,9 @@ type DeleteSourceRequest struct { func (x *DeleteSourceRequest) Reset() { *x = DeleteSourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteSourceRequest) String() string { @@ -4608,7 +4540,7 @@ func (*DeleteSourceRequest) ProtoMessage() {} func (x *DeleteSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4653,11 +4585,9 @@ type FetchInventoryRequest struct { func (x *FetchInventoryRequest) Reset() { *x = FetchInventoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchInventoryRequest) String() string { @@ -4668,7 +4598,7 @@ func (*FetchInventoryRequest) ProtoMessage() {} func (x *FetchInventoryRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4734,11 +4664,9 @@ type VmwareVmDetails struct { func (x *VmwareVmDetails) Reset() { *x = VmwareVmDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareVmDetails) String() string { @@ -4749,7 +4677,7 @@ func (*VmwareVmDetails) ProtoMessage() {} func (x *VmwareVmDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4894,11 +4822,9 @@ type AwsVmDetails struct { func (x *AwsVmDetails) Reset() { *x = AwsVmDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsVmDetails) String() string { @@ -4909,7 +4835,7 @@ func (*AwsVmDetails) ProtoMessage() {} func (x *AwsVmDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5064,11 +4990,9 @@ type AwsSecurityGroup struct { func (x *AwsSecurityGroup) Reset() { *x = AwsSecurityGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSecurityGroup) String() string { @@ -5079,7 +5003,7 @@ func (*AwsSecurityGroup) ProtoMessage() {} func (x *AwsSecurityGroup) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5120,11 +5044,9 @@ type VmwareVmsDetails struct { func (x *VmwareVmsDetails) Reset() { *x = VmwareVmsDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareVmsDetails) String() string { @@ -5135,7 +5057,7 @@ func (*VmwareVmsDetails) ProtoMessage() {} func (x *VmwareVmsDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5169,11 +5091,9 @@ type AwsVmsDetails struct { func (x *AwsVmsDetails) Reset() { *x = AwsVmsDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsVmsDetails) String() string { @@ -5184,7 +5104,7 @@ func (*AwsVmsDetails) ProtoMessage() {} func (x *AwsVmsDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5225,11 +5145,9 @@ type FetchInventoryResponse struct { func (x *FetchInventoryResponse) Reset() { *x = FetchInventoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchInventoryResponse) String() string { @@ -5240,7 +5158,7 @@ func (*FetchInventoryResponse) ProtoMessage() {} func (x *FetchInventoryResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5340,11 +5258,9 @@ type UtilizationReport struct { func (x *UtilizationReport) Reset() { *x = UtilizationReport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UtilizationReport) String() string { @@ -5355,7 +5271,7 @@ func (*UtilizationReport) ProtoMessage() {} func (x *UtilizationReport) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5458,11 +5374,9 @@ type VmUtilizationInfo struct { func (x *VmUtilizationInfo) Reset() { *x = VmUtilizationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmUtilizationInfo) String() string { @@ -5473,7 +5387,7 @@ func (*VmUtilizationInfo) ProtoMessage() {} func (x *VmUtilizationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5555,11 +5469,9 @@ type VmUtilizationMetrics struct { func (x *VmUtilizationMetrics) Reset() { *x = VmUtilizationMetrics{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmUtilizationMetrics) String() string { @@ -5570,7 +5482,7 @@ func (*VmUtilizationMetrics) ProtoMessage() {} func (x *VmUtilizationMetrics) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5671,11 +5583,9 @@ type ListUtilizationReportsRequest struct { func (x *ListUtilizationReportsRequest) Reset() { *x = ListUtilizationReportsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUtilizationReportsRequest) String() string { @@ -5686,7 +5596,7 @@ func (*ListUtilizationReportsRequest) ProtoMessage() {} func (x *ListUtilizationReportsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5760,11 +5670,9 @@ type ListUtilizationReportsResponse struct { func (x *ListUtilizationReportsResponse) Reset() { *x = ListUtilizationReportsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUtilizationReportsResponse) String() string { @@ -5775,7 +5683,7 @@ func (*ListUtilizationReportsResponse) ProtoMessage() {} func (x *ListUtilizationReportsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5826,11 +5734,9 @@ type GetUtilizationReportRequest struct { func (x *GetUtilizationReportRequest) Reset() { *x = GetUtilizationReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUtilizationReportRequest) String() string { @@ -5841,7 +5747,7 @@ func (*GetUtilizationReportRequest) ProtoMessage() {} func (x *GetUtilizationReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5905,11 +5811,9 @@ type CreateUtilizationReportRequest struct { func (x *CreateUtilizationReportRequest) Reset() { *x = CreateUtilizationReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateUtilizationReportRequest) String() string { @@ -5920,7 +5824,7 @@ func (*CreateUtilizationReportRequest) ProtoMessage() {} func (x *CreateUtilizationReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5989,11 +5893,9 @@ type DeleteUtilizationReportRequest struct { func (x *DeleteUtilizationReportRequest) Reset() { *x = DeleteUtilizationReportRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteUtilizationReportRequest) String() string { @@ -6004,7 +5906,7 @@ func (*DeleteUtilizationReportRequest) ProtoMessage() {} func (x *DeleteUtilizationReportRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6050,11 +5952,9 @@ type ListDatacenterConnectorsResponse struct { func (x *ListDatacenterConnectorsResponse) Reset() { *x = ListDatacenterConnectorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatacenterConnectorsResponse) String() string { @@ -6065,7 +5965,7 @@ func (*ListDatacenterConnectorsResponse) ProtoMessage() {} func (x *ListDatacenterConnectorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6113,11 +6013,9 @@ type GetDatacenterConnectorRequest struct { func (x *GetDatacenterConnectorRequest) Reset() { *x = GetDatacenterConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDatacenterConnectorRequest) String() string { @@ -6128,7 +6026,7 @@ func (*GetDatacenterConnectorRequest) ProtoMessage() {} func (x *GetDatacenterConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6183,11 +6081,9 @@ type CreateDatacenterConnectorRequest struct { func (x *CreateDatacenterConnectorRequest) Reset() { *x = CreateDatacenterConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateDatacenterConnectorRequest) String() string { @@ -6198,7 +6094,7 @@ func (*CreateDatacenterConnectorRequest) ProtoMessage() {} func (x *CreateDatacenterConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6267,11 +6163,9 @@ type DeleteDatacenterConnectorRequest struct { func (x *DeleteDatacenterConnectorRequest) Reset() { *x = DeleteDatacenterConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteDatacenterConnectorRequest) String() string { @@ -6282,7 +6176,7 @@ func (*DeleteDatacenterConnectorRequest) ProtoMessage() {} func (x *DeleteDatacenterConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6337,11 +6231,9 @@ type UpgradeApplianceRequest struct { func (x *UpgradeApplianceRequest) Reset() { *x = UpgradeApplianceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeApplianceRequest) String() string { @@ -6352,7 +6244,7 @@ func (*UpgradeApplianceRequest) ProtoMessage() {} func (x *UpgradeApplianceRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6390,11 +6282,9 @@ type UpgradeApplianceResponse struct { func (x *UpgradeApplianceResponse) Reset() { *x = UpgradeApplianceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpgradeApplianceResponse) String() string { @@ -6405,7 +6295,7 @@ func (*UpgradeApplianceResponse) ProtoMessage() {} func (x *UpgradeApplianceResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6448,11 +6338,9 @@ type ListDatacenterConnectorsRequest struct { func (x *ListDatacenterConnectorsRequest) Reset() { *x = ListDatacenterConnectorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListDatacenterConnectorsRequest) String() string { @@ -6463,7 +6351,7 @@ func (*ListDatacenterConnectorsRequest) ProtoMessage() {} func (x *ListDatacenterConnectorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6562,11 +6450,9 @@ type ComputeEngineTargetDefaults struct { func (x *ComputeEngineTargetDefaults) Reset() { *x = ComputeEngineTargetDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeEngineTargetDefaults) String() string { @@ -6577,7 +6463,7 @@ func (*ComputeEngineTargetDefaults) ProtoMessage() {} func (x *ComputeEngineTargetDefaults) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6766,11 +6652,9 @@ type ComputeEngineTargetDetails struct { func (x *ComputeEngineTargetDetails) Reset() { *x = ComputeEngineTargetDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeEngineTargetDetails) String() string { @@ -6781,7 +6665,7 @@ func (*ComputeEngineTargetDetails) ProtoMessage() {} func (x *ComputeEngineTargetDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6942,11 +6826,9 @@ type NetworkInterface struct { func (x *NetworkInterface) Reset() { *x = NetworkInterface{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkInterface) String() string { @@ -6957,7 +6839,7 @@ func (*NetworkInterface) ProtoMessage() {} func (x *NetworkInterface) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7014,11 +6896,9 @@ type AppliedLicense struct { func (x *AppliedLicense) Reset() { *x = AppliedLicense{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AppliedLicense) String() string { @@ -7029,7 +6909,7 @@ func (*AppliedLicense) ProtoMessage() {} func (x *AppliedLicense) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7077,11 +6957,9 @@ type SchedulingNodeAffinity struct { func (x *SchedulingNodeAffinity) Reset() { *x = SchedulingNodeAffinity{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulingNodeAffinity) String() string { @@ -7092,7 +6970,7 @@ func (*SchedulingNodeAffinity) ProtoMessage() {} func (x *SchedulingNodeAffinity) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7156,11 +7034,9 @@ type ComputeScheduling struct { func (x *ComputeScheduling) Reset() { *x = ComputeScheduling{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeScheduling) String() string { @@ -7171,7 +7047,7 @@ func (*ComputeScheduling) ProtoMessage() {} func (x *ComputeScheduling) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7230,11 +7106,9 @@ type SchedulePolicy struct { func (x *SchedulePolicy) Reset() { *x = SchedulePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SchedulePolicy) String() string { @@ -7245,7 +7119,7 @@ func (*SchedulePolicy) ProtoMessage() {} func (x *SchedulePolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7304,11 +7178,9 @@ type CreateMigratingVmRequest struct { func (x *CreateMigratingVmRequest) Reset() { *x = CreateMigratingVmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateMigratingVmRequest) String() string { @@ -7319,7 +7191,7 @@ func (*CreateMigratingVmRequest) ProtoMessage() {} func (x *CreateMigratingVmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7391,11 +7263,9 @@ type ListMigratingVmsRequest struct { func (x *ListMigratingVmsRequest) Reset() { *x = ListMigratingVmsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigratingVmsRequest) String() string { @@ -7406,7 +7276,7 @@ func (*ListMigratingVmsRequest) ProtoMessage() {} func (x *ListMigratingVmsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7480,11 +7350,9 @@ type ListMigratingVmsResponse struct { func (x *ListMigratingVmsResponse) Reset() { *x = ListMigratingVmsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListMigratingVmsResponse) String() string { @@ -7495,7 +7363,7 @@ func (*ListMigratingVmsResponse) ProtoMessage() {} func (x *ListMigratingVmsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7545,11 +7413,9 @@ type GetMigratingVmRequest struct { func (x *GetMigratingVmRequest) Reset() { *x = GetMigratingVmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMigratingVmRequest) String() string { @@ -7560,7 +7426,7 @@ func (*GetMigratingVmRequest) ProtoMessage() {} func (x *GetMigratingVmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7621,11 +7487,9 @@ type UpdateMigratingVmRequest struct { func (x *UpdateMigratingVmRequest) Reset() { *x = UpdateMigratingVmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateMigratingVmRequest) String() string { @@ -7636,7 +7500,7 @@ func (*UpdateMigratingVmRequest) ProtoMessage() {} func (x *UpdateMigratingVmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7684,11 +7548,9 @@ type DeleteMigratingVmRequest struct { func (x *DeleteMigratingVmRequest) Reset() { *x = DeleteMigratingVmRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteMigratingVmRequest) String() string { @@ -7699,7 +7561,7 @@ func (*DeleteMigratingVmRequest) ProtoMessage() {} func (x *DeleteMigratingVmRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7733,11 +7595,9 @@ type StartMigrationRequest struct { func (x *StartMigrationRequest) Reset() { *x = StartMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMigrationRequest) String() string { @@ -7748,7 +7608,7 @@ func (*StartMigrationRequest) ProtoMessage() {} func (x *StartMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7779,11 +7639,9 @@ type StartMigrationResponse struct { func (x *StartMigrationResponse) Reset() { *x = StartMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartMigrationResponse) String() string { @@ -7794,7 +7652,7 @@ func (*StartMigrationResponse) ProtoMessage() {} func (x *StartMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7821,11 +7679,9 @@ type PauseMigrationRequest struct { func (x *PauseMigrationRequest) Reset() { *x = PauseMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseMigrationRequest) String() string { @@ -7836,7 +7692,7 @@ func (*PauseMigrationRequest) ProtoMessage() {} func (x *PauseMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7867,11 +7723,9 @@ type PauseMigrationResponse struct { func (x *PauseMigrationResponse) Reset() { *x = PauseMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PauseMigrationResponse) String() string { @@ -7882,7 +7736,7 @@ func (*PauseMigrationResponse) ProtoMessage() {} func (x *PauseMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7909,11 +7763,9 @@ type ResumeMigrationRequest struct { func (x *ResumeMigrationRequest) Reset() { *x = ResumeMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeMigrationRequest) String() string { @@ -7924,7 +7776,7 @@ func (*ResumeMigrationRequest) ProtoMessage() {} func (x *ResumeMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7955,11 +7807,9 @@ type ResumeMigrationResponse struct { func (x *ResumeMigrationResponse) Reset() { *x = ResumeMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResumeMigrationResponse) String() string { @@ -7970,7 +7820,7 @@ func (*ResumeMigrationResponse) ProtoMessage() {} func (x *ResumeMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7997,11 +7847,9 @@ type FinalizeMigrationRequest struct { func (x *FinalizeMigrationRequest) Reset() { *x = FinalizeMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMigrationRequest) String() string { @@ -8012,7 +7860,7 @@ func (*FinalizeMigrationRequest) ProtoMessage() {} func (x *FinalizeMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8043,11 +7891,9 @@ type FinalizeMigrationResponse struct { func (x *FinalizeMigrationResponse) Reset() { *x = FinalizeMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FinalizeMigrationResponse) String() string { @@ -8058,7 +7904,7 @@ func (*FinalizeMigrationResponse) ProtoMessage() {} func (x *FinalizeMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8095,11 +7941,9 @@ type TargetProject struct { func (x *TargetProject) Reset() { *x = TargetProject{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TargetProject) String() string { @@ -8110,7 +7954,7 @@ func (*TargetProject) ProtoMessage() {} func (x *TargetProject) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8172,11 +8016,9 @@ type GetTargetProjectRequest struct { func (x *GetTargetProjectRequest) Reset() { *x = GetTargetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTargetProjectRequest) String() string { @@ -8187,7 +8029,7 @@ func (*GetTargetProjectRequest) ProtoMessage() {} func (x *GetTargetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8236,11 +8078,9 @@ type ListTargetProjectsRequest struct { func (x *ListTargetProjectsRequest) Reset() { *x = ListTargetProjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetProjectsRequest) String() string { @@ -8251,7 +8091,7 @@ func (*ListTargetProjectsRequest) ProtoMessage() {} func (x *ListTargetProjectsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8318,11 +8158,9 @@ type ListTargetProjectsResponse struct { func (x *ListTargetProjectsResponse) Reset() { *x = ListTargetProjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTargetProjectsResponse) String() string { @@ -8333,7 +8171,7 @@ func (*ListTargetProjectsResponse) ProtoMessage() {} func (x *ListTargetProjectsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8399,11 +8237,9 @@ type CreateTargetProjectRequest struct { func (x *CreateTargetProjectRequest) Reset() { *x = CreateTargetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTargetProjectRequest) String() string { @@ -8414,7 +8250,7 @@ func (*CreateTargetProjectRequest) ProtoMessage() {} func (x *CreateTargetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8489,11 +8325,9 @@ type UpdateTargetProjectRequest struct { func (x *UpdateTargetProjectRequest) Reset() { *x = UpdateTargetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateTargetProjectRequest) String() string { @@ -8504,7 +8338,7 @@ func (*UpdateTargetProjectRequest) ProtoMessage() {} func (x *UpdateTargetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8566,11 +8400,9 @@ type DeleteTargetProjectRequest struct { func (x *DeleteTargetProjectRequest) Reset() { *x = DeleteTargetProjectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteTargetProjectRequest) String() string { @@ -8581,7 +8413,7 @@ func (*DeleteTargetProjectRequest) ProtoMessage() {} func (x *DeleteTargetProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8631,11 +8463,9 @@ type Group struct { func (x *Group) Reset() { *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Group) String() string { @@ -8646,7 +8476,7 @@ func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8723,11 +8553,9 @@ type ListGroupsRequest struct { func (x *ListGroupsRequest) Reset() { *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsRequest) String() string { @@ -8738,7 +8566,7 @@ func (*ListGroupsRequest) ProtoMessage() {} func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8805,11 +8633,9 @@ type ListGroupsResponse struct { func (x *ListGroupsResponse) Reset() { *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGroupsResponse) String() string { @@ -8820,7 +8646,7 @@ func (*ListGroupsResponse) ProtoMessage() {} func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8868,11 +8694,9 @@ type GetGroupRequest struct { func (x *GetGroupRequest) Reset() { *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGroupRequest) String() string { @@ -8883,7 +8707,7 @@ func (*GetGroupRequest) ProtoMessage() {} func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8935,11 +8759,9 @@ type CreateGroupRequest struct { func (x *CreateGroupRequest) Reset() { *x = CreateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateGroupRequest) String() string { @@ -8950,7 +8772,7 @@ func (*CreateGroupRequest) ProtoMessage() {} func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9025,11 +8847,9 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGroupRequest) String() string { @@ -9040,7 +8860,7 @@ func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9102,11 +8922,9 @@ type DeleteGroupRequest struct { func (x *DeleteGroupRequest) Reset() { *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteGroupRequest) String() string { @@ -9117,7 +8935,7 @@ func (*DeleteGroupRequest) ProtoMessage() {} func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9160,11 +8978,9 @@ type AddGroupMigrationRequest struct { func (x *AddGroupMigrationRequest) Reset() { *x = AddGroupMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddGroupMigrationRequest) String() string { @@ -9175,7 +8991,7 @@ func (*AddGroupMigrationRequest) ProtoMessage() {} func (x *AddGroupMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9213,11 +9029,9 @@ type AddGroupMigrationResponse struct { func (x *AddGroupMigrationResponse) Reset() { *x = AddGroupMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddGroupMigrationResponse) String() string { @@ -9228,7 +9042,7 @@ func (*AddGroupMigrationResponse) ProtoMessage() {} func (x *AddGroupMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[92] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9257,11 +9071,9 @@ type RemoveGroupMigrationRequest struct { func (x *RemoveGroupMigrationRequest) Reset() { *x = RemoveGroupMigrationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveGroupMigrationRequest) String() string { @@ -9272,7 +9084,7 @@ func (*RemoveGroupMigrationRequest) ProtoMessage() {} func (x *RemoveGroupMigrationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[93] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9310,11 +9122,9 @@ type RemoveGroupMigrationResponse struct { func (x *RemoveGroupMigrationResponse) Reset() { *x = RemoveGroupMigrationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[94] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveGroupMigrationResponse) String() string { @@ -9325,7 +9135,7 @@ func (*RemoveGroupMigrationResponse) ProtoMessage() {} func (x *RemoveGroupMigrationResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[94] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9370,11 +9180,9 @@ type CreateCutoverJobRequest struct { func (x *CreateCutoverJobRequest) Reset() { *x = CreateCutoverJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateCutoverJobRequest) String() string { @@ -9385,7 +9193,7 @@ func (*CreateCutoverJobRequest) ProtoMessage() {} func (x *CreateCutoverJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9440,11 +9248,9 @@ type CancelCutoverJobRequest struct { func (x *CancelCutoverJobRequest) Reset() { *x = CancelCutoverJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCutoverJobRequest) String() string { @@ -9455,7 +9261,7 @@ func (*CancelCutoverJobRequest) ProtoMessage() {} func (x *CancelCutoverJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9486,11 +9292,9 @@ type CancelCutoverJobResponse struct { func (x *CancelCutoverJobResponse) Reset() { *x = CancelCutoverJobResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelCutoverJobResponse) String() string { @@ -9501,7 +9305,7 @@ func (*CancelCutoverJobResponse) ProtoMessage() {} func (x *CancelCutoverJobResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9543,11 +9347,9 @@ type ListCutoverJobsRequest struct { func (x *ListCutoverJobsRequest) Reset() { *x = ListCutoverJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[98] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCutoverJobsRequest) String() string { @@ -9558,7 +9360,7 @@ func (*ListCutoverJobsRequest) ProtoMessage() {} func (x *ListCutoverJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[98] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9625,11 +9427,9 @@ type ListCutoverJobsResponse struct { func (x *ListCutoverJobsResponse) Reset() { *x = ListCutoverJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[99] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCutoverJobsResponse) String() string { @@ -9640,7 +9440,7 @@ func (*ListCutoverJobsResponse) ProtoMessage() {} func (x *ListCutoverJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[99] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9688,11 +9488,9 @@ type GetCutoverJobRequest struct { func (x *GetCutoverJobRequest) Reset() { *x = GetCutoverJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[100] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetCutoverJobRequest) String() string { @@ -9703,7 +9501,7 @@ func (*GetCutoverJobRequest) ProtoMessage() {} func (x *GetCutoverJobRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[100] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9753,11 +9551,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[101] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -9768,7 +9564,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[101] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9855,11 +9651,9 @@ type MigrationError struct { func (x *MigrationError) Reset() { *x = MigrationError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[102] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[102] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MigrationError) String() string { @@ -9870,7 +9664,7 @@ func (*MigrationError) ProtoMessage() {} func (x *MigrationError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[102] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -9934,11 +9728,9 @@ type AwsSourceVmDetails struct { func (x *AwsSourceVmDetails) Reset() { *x = AwsSourceVmDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[103] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[103] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSourceVmDetails) String() string { @@ -9949,7 +9741,7 @@ func (*AwsSourceVmDetails) ProtoMessage() {} func (x *AwsSourceVmDetails) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[103] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10005,11 +9797,9 @@ type ListReplicationCyclesRequest struct { func (x *ListReplicationCyclesRequest) Reset() { *x = ListReplicationCyclesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[104] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[104] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplicationCyclesRequest) String() string { @@ -10020,7 +9810,7 @@ func (*ListReplicationCyclesRequest) ProtoMessage() {} func (x *ListReplicationCyclesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[104] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10087,11 +9877,9 @@ type ListReplicationCyclesResponse struct { func (x *ListReplicationCyclesResponse) Reset() { *x = ListReplicationCyclesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[105] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[105] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListReplicationCyclesResponse) String() string { @@ -10102,7 +9890,7 @@ func (*ListReplicationCyclesResponse) ProtoMessage() {} func (x *ListReplicationCyclesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[105] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10150,11 +9938,9 @@ type GetReplicationCycleRequest struct { func (x *GetReplicationCycleRequest) Reset() { *x = GetReplicationCycleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[106] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[106] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetReplicationCycleRequest) String() string { @@ -10165,7 +9951,7 @@ func (*GetReplicationCycleRequest) ProtoMessage() {} func (x *GetReplicationCycleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[106] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10201,11 +9987,9 @@ type AwsSourceDetails_AccessKeyCredentials struct { func (x *AwsSourceDetails_AccessKeyCredentials) Reset() { *x = AwsSourceDetails_AccessKeyCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[109] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSourceDetails_AccessKeyCredentials) String() string { @@ -10216,7 +10000,7 @@ func (*AwsSourceDetails_AccessKeyCredentials) ProtoMessage() {} func (x *AwsSourceDetails_AccessKeyCredentials) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[109] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10259,11 +10043,9 @@ type AwsSourceDetails_Tag struct { func (x *AwsSourceDetails_Tag) Reset() { *x = AwsSourceDetails_Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[110] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[110] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AwsSourceDetails_Tag) String() string { @@ -10274,7 +10056,7 @@ func (*AwsSourceDetails_Tag) ProtoMessage() {} func (x *AwsSourceDetails_Tag) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[110] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -13335,1316 +13117,6 @@ func file_google_cloud_vmmigration_v1_vmmigration_proto_init() { if File_google_cloud_vmmigration_v1_vmmigration_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationCycle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CycleStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*InitializingReplicationStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReplicatingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PostProcessingStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ReplicationSync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*MigratingVm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CloneJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CloneStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*AdaptingOSStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*PreparingVMDisksStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*InstantiatingMigratedVMStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*CutoverJob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*CutoverStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ShuttingDownSourceVMStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*CreateCloneJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*CancelCloneJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*CancelCloneJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListCloneJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListCloneJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetCloneJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*VmwareSourceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*AwsSourceDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DatacenterConnector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*AvailableUpdates); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*ApplianceVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListSourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteSourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*FetchInventoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*VmwareVmDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*AwsVmDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*AwsSecurityGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*VmwareVmsDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*AwsVmsDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*FetchInventoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*UtilizationReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*VmUtilizationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*VmUtilizationMetrics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ListUtilizationReportsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ListUtilizationReportsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*GetUtilizationReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*CreateUtilizationReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*DeleteUtilizationReportRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListDatacenterConnectorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*GetDatacenterConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*CreateDatacenterConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*DeleteDatacenterConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeApplianceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*UpgradeApplianceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*ListDatacenterConnectorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*ComputeEngineTargetDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ComputeEngineTargetDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*NetworkInterface); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*AppliedLicense); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*SchedulingNodeAffinity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ComputeScheduling); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*SchedulePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*CreateMigratingVmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*ListMigratingVmsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*ListMigratingVmsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*GetMigratingVmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*UpdateMigratingVmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*DeleteMigratingVmRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*StartMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*StartMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*PauseMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*PauseMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*ResumeMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*ResumeMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*FinalizeMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*TargetProject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*GetTargetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetProjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*ListTargetProjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*CreateTargetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*UpdateTargetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTargetProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*CreateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*AddGroupMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[92].Exporter = func(v any, i int) any { - switch v := v.(*AddGroupMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[93].Exporter = func(v any, i int) any { - switch v := v.(*RemoveGroupMigrationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[94].Exporter = func(v any, i int) any { - switch v := v.(*RemoveGroupMigrationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[95].Exporter = func(v any, i int) any { - switch v := v.(*CreateCutoverJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[96].Exporter = func(v any, i int) any { - switch v := v.(*CancelCutoverJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[97].Exporter = func(v any, i int) any { - switch v := v.(*CancelCutoverJobResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[98].Exporter = func(v any, i int) any { - switch v := v.(*ListCutoverJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[99].Exporter = func(v any, i int) any { - switch v := v.(*ListCutoverJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[100].Exporter = func(v any, i int) any { - switch v := v.(*GetCutoverJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[101].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[102].Exporter = func(v any, i int) any { - switch v := v.(*MigrationError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[103].Exporter = func(v any, i int) any { - switch v := v.(*AwsSourceVmDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[104].Exporter = func(v any, i int) any { - switch v := v.(*ListReplicationCyclesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[105].Exporter = func(v any, i int) any { - switch v := v.(*ListReplicationCyclesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[106].Exporter = func(v any, i int) any { - switch v := v.(*GetReplicationCycleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[109].Exporter = func(v any, i int) any { - switch v := v.(*AwsSourceDetails_AccessKeyCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[110].Exporter = func(v any, i int) any { - switch v := v.(*AwsSourceDetails_Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_vmmigration_v1_vmmigration_proto_msgTypes[1].OneofWrappers = []any{ (*CycleStep_InitializingReplication)(nil), (*CycleStep_Replicating)(nil), diff --git a/vmwareengine/apiv1/helpers.go b/vmwareengine/apiv1/helpers.go index d0f9799b2c70..b2fdf517d8a7 100755 --- a/vmwareengine/apiv1/helpers.go +++ b/vmwareengine/apiv1/helpers.go @@ -18,10 +18,20 @@ package vmwareengine import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "vmwareengine.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vmwareengine/apiv1/vmware_engine_client.go b/vmwareengine/apiv1/vmware_engine_client.go index 250e1a55f55b..4d4e87e9086d 100755 --- a/vmwareengine/apiv1/vmware_engine_client.go +++ b/vmwareengine/apiv1/vmware_engine_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vmwareenginepb "cloud.google.com/go/vmwareengine/apiv1/vmwareenginepb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -2167,6 +2166,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new vmware engine client based on gRPC. @@ -2193,6 +2194,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: vmwareenginepb.NewVmwareEngineClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), @@ -2258,6 +2260,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new vmware engine rest client. @@ -2275,6 +2279,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -2348,7 +2353,7 @@ func (c *gRPCClient) ListPrivateClouds(ctx context.Context, req *vmwareenginepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPrivateClouds(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPrivateClouds, req, settings.GRPC, c.logger, "ListPrivateClouds") return err }, opts...) if err != nil { @@ -2383,7 +2388,7 @@ func (c *gRPCClient) GetPrivateCloud(ctx context.Context, req *vmwareenginepb.Ge var resp *vmwareenginepb.PrivateCloud err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPrivateCloud(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPrivateCloud, req, settings.GRPC, c.logger, "GetPrivateCloud") return err }, opts...) if err != nil { @@ -2401,7 +2406,7 @@ func (c *gRPCClient) CreatePrivateCloud(ctx context.Context, req *vmwareenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePrivateCloud(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePrivateCloud, req, settings.GRPC, c.logger, "CreatePrivateCloud") return err }, opts...) if err != nil { @@ -2421,7 +2426,7 @@ func (c *gRPCClient) UpdatePrivateCloud(ctx context.Context, req *vmwareenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePrivateCloud(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePrivateCloud, req, settings.GRPC, c.logger, "UpdatePrivateCloud") return err }, opts...) if err != nil { @@ -2441,7 +2446,7 @@ func (c *gRPCClient) DeletePrivateCloud(ctx context.Context, req *vmwareenginepb var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePrivateCloud(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePrivateCloud, req, settings.GRPC, c.logger, "DeletePrivateCloud") return err }, opts...) if err != nil { @@ -2461,7 +2466,7 @@ func (c *gRPCClient) UndeletePrivateCloud(ctx context.Context, req *vmwareengine var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UndeletePrivateCloud(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UndeletePrivateCloud, req, settings.GRPC, c.logger, "UndeletePrivateCloud") return err }, opts...) if err != nil { @@ -2492,7 +2497,7 @@ func (c *gRPCClient) ListClusters(ctx context.Context, req *vmwareenginepb.ListC } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListClusters, req, settings.GRPC, c.logger, "ListClusters") return err }, opts...) if err != nil { @@ -2527,7 +2532,7 @@ func (c *gRPCClient) GetCluster(ctx context.Context, req *vmwareenginepb.GetClus var resp *vmwareenginepb.Cluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetCluster, req, settings.GRPC, c.logger, "GetCluster") return err }, opts...) if err != nil { @@ -2545,7 +2550,7 @@ func (c *gRPCClient) CreateCluster(ctx context.Context, req *vmwareenginepb.Crea var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateCluster, req, settings.GRPC, c.logger, "CreateCluster") return err }, opts...) if err != nil { @@ -2565,7 +2570,7 @@ func (c *gRPCClient) UpdateCluster(ctx context.Context, req *vmwareenginepb.Upda var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateCluster, req, settings.GRPC, c.logger, "UpdateCluster") return err }, opts...) if err != nil { @@ -2585,7 +2590,7 @@ func (c *gRPCClient) DeleteCluster(ctx context.Context, req *vmwareenginepb.Dele var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteCluster, req, settings.GRPC, c.logger, "DeleteCluster") return err }, opts...) if err != nil { @@ -2616,7 +2621,7 @@ func (c *gRPCClient) ListNodes(ctx context.Context, req *vmwareenginepb.ListNode } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNodes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNodes, req, settings.GRPC, c.logger, "ListNodes") return err }, opts...) if err != nil { @@ -2651,7 +2656,7 @@ func (c *gRPCClient) GetNode(ctx context.Context, req *vmwareenginepb.GetNodeReq var resp *vmwareenginepb.Node err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNode(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNode, req, settings.GRPC, c.logger, "GetNode") return err }, opts...) if err != nil { @@ -2680,7 +2685,7 @@ func (c *gRPCClient) ListExternalAddresses(ctx context.Context, req *vmwareengin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListExternalAddresses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListExternalAddresses, req, settings.GRPC, c.logger, "ListExternalAddresses") return err }, opts...) if err != nil { @@ -2726,7 +2731,7 @@ func (c *gRPCClient) FetchNetworkPolicyExternalAddresses(ctx context.Context, re } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.FetchNetworkPolicyExternalAddresses(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.FetchNetworkPolicyExternalAddresses, req, settings.GRPC, c.logger, "FetchNetworkPolicyExternalAddresses") return err }, opts...) if err != nil { @@ -2761,7 +2766,7 @@ func (c *gRPCClient) GetExternalAddress(ctx context.Context, req *vmwareenginepb var resp *vmwareenginepb.ExternalAddress err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetExternalAddress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetExternalAddress, req, settings.GRPC, c.logger, "GetExternalAddress") return err }, opts...) if err != nil { @@ -2779,7 +2784,7 @@ func (c *gRPCClient) CreateExternalAddress(ctx context.Context, req *vmwareengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateExternalAddress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateExternalAddress, req, settings.GRPC, c.logger, "CreateExternalAddress") return err }, opts...) if err != nil { @@ -2799,7 +2804,7 @@ func (c *gRPCClient) UpdateExternalAddress(ctx context.Context, req *vmwareengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateExternalAddress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateExternalAddress, req, settings.GRPC, c.logger, "UpdateExternalAddress") return err }, opts...) if err != nil { @@ -2819,7 +2824,7 @@ func (c *gRPCClient) DeleteExternalAddress(ctx context.Context, req *vmwareengin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteExternalAddress(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteExternalAddress, req, settings.GRPC, c.logger, "DeleteExternalAddress") return err }, opts...) if err != nil { @@ -2850,7 +2855,7 @@ func (c *gRPCClient) ListSubnets(ctx context.Context, req *vmwareenginepb.ListSu } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListSubnets(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListSubnets, req, settings.GRPC, c.logger, "ListSubnets") return err }, opts...) if err != nil { @@ -2885,7 +2890,7 @@ func (c *gRPCClient) GetSubnet(ctx context.Context, req *vmwareenginepb.GetSubne var resp *vmwareenginepb.Subnet err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetSubnet, req, settings.GRPC, c.logger, "GetSubnet") return err }, opts...) if err != nil { @@ -2903,7 +2908,7 @@ func (c *gRPCClient) UpdateSubnet(ctx context.Context, req *vmwareenginepb.Updat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateSubnet(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateSubnet, req, settings.GRPC, c.logger, "UpdateSubnet") return err }, opts...) if err != nil { @@ -2934,7 +2939,7 @@ func (c *gRPCClient) ListExternalAccessRules(ctx context.Context, req *vmwareeng } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListExternalAccessRules(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListExternalAccessRules, req, settings.GRPC, c.logger, "ListExternalAccessRules") return err }, opts...) if err != nil { @@ -2969,7 +2974,7 @@ func (c *gRPCClient) GetExternalAccessRule(ctx context.Context, req *vmwareengin var resp *vmwareenginepb.ExternalAccessRule err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetExternalAccessRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetExternalAccessRule, req, settings.GRPC, c.logger, "GetExternalAccessRule") return err }, opts...) if err != nil { @@ -2987,7 +2992,7 @@ func (c *gRPCClient) CreateExternalAccessRule(ctx context.Context, req *vmwareen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateExternalAccessRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateExternalAccessRule, req, settings.GRPC, c.logger, "CreateExternalAccessRule") return err }, opts...) if err != nil { @@ -3007,7 +3012,7 @@ func (c *gRPCClient) UpdateExternalAccessRule(ctx context.Context, req *vmwareen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateExternalAccessRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateExternalAccessRule, req, settings.GRPC, c.logger, "UpdateExternalAccessRule") return err }, opts...) if err != nil { @@ -3027,7 +3032,7 @@ func (c *gRPCClient) DeleteExternalAccessRule(ctx context.Context, req *vmwareen var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteExternalAccessRule(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteExternalAccessRule, req, settings.GRPC, c.logger, "DeleteExternalAccessRule") return err }, opts...) if err != nil { @@ -3058,7 +3063,7 @@ func (c *gRPCClient) ListLoggingServers(ctx context.Context, req *vmwareenginepb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListLoggingServers(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListLoggingServers, req, settings.GRPC, c.logger, "ListLoggingServers") return err }, opts...) if err != nil { @@ -3093,7 +3098,7 @@ func (c *gRPCClient) GetLoggingServer(ctx context.Context, req *vmwareenginepb.G var resp *vmwareenginepb.LoggingServer err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetLoggingServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetLoggingServer, req, settings.GRPC, c.logger, "GetLoggingServer") return err }, opts...) if err != nil { @@ -3111,7 +3116,7 @@ func (c *gRPCClient) CreateLoggingServer(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateLoggingServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateLoggingServer, req, settings.GRPC, c.logger, "CreateLoggingServer") return err }, opts...) if err != nil { @@ -3131,7 +3136,7 @@ func (c *gRPCClient) UpdateLoggingServer(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateLoggingServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateLoggingServer, req, settings.GRPC, c.logger, "UpdateLoggingServer") return err }, opts...) if err != nil { @@ -3151,7 +3156,7 @@ func (c *gRPCClient) DeleteLoggingServer(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteLoggingServer(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteLoggingServer, req, settings.GRPC, c.logger, "DeleteLoggingServer") return err }, opts...) if err != nil { @@ -3182,7 +3187,7 @@ func (c *gRPCClient) ListNodeTypes(ctx context.Context, req *vmwareenginepb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNodeTypes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNodeTypes, req, settings.GRPC, c.logger, "ListNodeTypes") return err }, opts...) if err != nil { @@ -3217,7 +3222,7 @@ func (c *gRPCClient) GetNodeType(ctx context.Context, req *vmwareenginepb.GetNod var resp *vmwareenginepb.NodeType err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNodeType(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNodeType, req, settings.GRPC, c.logger, "GetNodeType") return err }, opts...) if err != nil { @@ -3235,7 +3240,7 @@ func (c *gRPCClient) ShowNsxCredentials(ctx context.Context, req *vmwareenginepb var resp *vmwareenginepb.Credentials err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ShowNsxCredentials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ShowNsxCredentials, req, settings.GRPC, c.logger, "ShowNsxCredentials") return err }, opts...) if err != nil { @@ -3253,7 +3258,7 @@ func (c *gRPCClient) ShowVcenterCredentials(ctx context.Context, req *vmwareengi var resp *vmwareenginepb.Credentials err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ShowVcenterCredentials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ShowVcenterCredentials, req, settings.GRPC, c.logger, "ShowVcenterCredentials") return err }, opts...) if err != nil { @@ -3271,7 +3276,7 @@ func (c *gRPCClient) ResetNsxCredentials(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResetNsxCredentials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResetNsxCredentials, req, settings.GRPC, c.logger, "ResetNsxCredentials") return err }, opts...) if err != nil { @@ -3291,7 +3296,7 @@ func (c *gRPCClient) ResetVcenterCredentials(ctx context.Context, req *vmwareeng var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ResetVcenterCredentials(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ResetVcenterCredentials, req, settings.GRPC, c.logger, "ResetVcenterCredentials") return err }, opts...) if err != nil { @@ -3311,7 +3316,7 @@ func (c *gRPCClient) GetDnsForwarding(ctx context.Context, req *vmwareenginepb.G var resp *vmwareenginepb.DnsForwarding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDnsForwarding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDnsForwarding, req, settings.GRPC, c.logger, "GetDnsForwarding") return err }, opts...) if err != nil { @@ -3329,7 +3334,7 @@ func (c *gRPCClient) UpdateDnsForwarding(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateDnsForwarding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateDnsForwarding, req, settings.GRPC, c.logger, "UpdateDnsForwarding") return err }, opts...) if err != nil { @@ -3349,7 +3354,7 @@ func (c *gRPCClient) GetNetworkPeering(ctx context.Context, req *vmwareenginepb. var resp *vmwareenginepb.NetworkPeering err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNetworkPeering(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNetworkPeering, req, settings.GRPC, c.logger, "GetNetworkPeering") return err }, opts...) if err != nil { @@ -3378,7 +3383,7 @@ func (c *gRPCClient) ListNetworkPeerings(ctx context.Context, req *vmwareenginep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNetworkPeerings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNetworkPeerings, req, settings.GRPC, c.logger, "ListNetworkPeerings") return err }, opts...) if err != nil { @@ -3413,7 +3418,7 @@ func (c *gRPCClient) CreateNetworkPeering(ctx context.Context, req *vmwareengine var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNetworkPeering(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNetworkPeering, req, settings.GRPC, c.logger, "CreateNetworkPeering") return err }, opts...) if err != nil { @@ -3433,7 +3438,7 @@ func (c *gRPCClient) DeleteNetworkPeering(ctx context.Context, req *vmwareengine var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNetworkPeering(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNetworkPeering, req, settings.GRPC, c.logger, "DeleteNetworkPeering") return err }, opts...) if err != nil { @@ -3453,7 +3458,7 @@ func (c *gRPCClient) UpdateNetworkPeering(ctx context.Context, req *vmwareengine var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNetworkPeering(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNetworkPeering, req, settings.GRPC, c.logger, "UpdateNetworkPeering") return err }, opts...) if err != nil { @@ -3484,7 +3489,7 @@ func (c *gRPCClient) ListPeeringRoutes(ctx context.Context, req *vmwareenginepb. } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPeeringRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPeeringRoutes, req, settings.GRPC, c.logger, "ListPeeringRoutes") return err }, opts...) if err != nil { @@ -3519,7 +3524,7 @@ func (c *gRPCClient) CreateHcxActivationKey(ctx context.Context, req *vmwareengi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateHcxActivationKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateHcxActivationKey, req, settings.GRPC, c.logger, "CreateHcxActivationKey") return err }, opts...) if err != nil { @@ -3550,7 +3555,7 @@ func (c *gRPCClient) ListHcxActivationKeys(ctx context.Context, req *vmwareengin } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListHcxActivationKeys(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListHcxActivationKeys, req, settings.GRPC, c.logger, "ListHcxActivationKeys") return err }, opts...) if err != nil { @@ -3585,7 +3590,7 @@ func (c *gRPCClient) GetHcxActivationKey(ctx context.Context, req *vmwareenginep var resp *vmwareenginepb.HcxActivationKey err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetHcxActivationKey(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetHcxActivationKey, req, settings.GRPC, c.logger, "GetHcxActivationKey") return err }, opts...) if err != nil { @@ -3603,7 +3608,7 @@ func (c *gRPCClient) GetNetworkPolicy(ctx context.Context, req *vmwareenginepb.G var resp *vmwareenginepb.NetworkPolicy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetNetworkPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetNetworkPolicy, req, settings.GRPC, c.logger, "GetNetworkPolicy") return err }, opts...) if err != nil { @@ -3632,7 +3637,7 @@ func (c *gRPCClient) ListNetworkPolicies(ctx context.Context, req *vmwareenginep } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListNetworkPolicies(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListNetworkPolicies, req, settings.GRPC, c.logger, "ListNetworkPolicies") return err }, opts...) if err != nil { @@ -3667,7 +3672,7 @@ func (c *gRPCClient) CreateNetworkPolicy(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateNetworkPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateNetworkPolicy, req, settings.GRPC, c.logger, "CreateNetworkPolicy") return err }, opts...) if err != nil { @@ -3687,7 +3692,7 @@ func (c *gRPCClient) UpdateNetworkPolicy(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateNetworkPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateNetworkPolicy, req, settings.GRPC, c.logger, "UpdateNetworkPolicy") return err }, opts...) if err != nil { @@ -3707,7 +3712,7 @@ func (c *gRPCClient) DeleteNetworkPolicy(ctx context.Context, req *vmwareenginep var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteNetworkPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteNetworkPolicy, req, settings.GRPC, c.logger, "DeleteNetworkPolicy") return err }, opts...) if err != nil { @@ -3738,7 +3743,7 @@ func (c *gRPCClient) ListManagementDnsZoneBindings(ctx context.Context, req *vmw } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListManagementDnsZoneBindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListManagementDnsZoneBindings, req, settings.GRPC, c.logger, "ListManagementDnsZoneBindings") return err }, opts...) if err != nil { @@ -3773,7 +3778,7 @@ func (c *gRPCClient) GetManagementDnsZoneBinding(ctx context.Context, req *vmwar var resp *vmwareenginepb.ManagementDnsZoneBinding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetManagementDnsZoneBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetManagementDnsZoneBinding, req, settings.GRPC, c.logger, "GetManagementDnsZoneBinding") return err }, opts...) if err != nil { @@ -3791,7 +3796,7 @@ func (c *gRPCClient) CreateManagementDnsZoneBinding(ctx context.Context, req *vm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateManagementDnsZoneBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateManagementDnsZoneBinding, req, settings.GRPC, c.logger, "CreateManagementDnsZoneBinding") return err }, opts...) if err != nil { @@ -3811,7 +3816,7 @@ func (c *gRPCClient) UpdateManagementDnsZoneBinding(ctx context.Context, req *vm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateManagementDnsZoneBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateManagementDnsZoneBinding, req, settings.GRPC, c.logger, "UpdateManagementDnsZoneBinding") return err }, opts...) if err != nil { @@ -3831,7 +3836,7 @@ func (c *gRPCClient) DeleteManagementDnsZoneBinding(ctx context.Context, req *vm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteManagementDnsZoneBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteManagementDnsZoneBinding, req, settings.GRPC, c.logger, "DeleteManagementDnsZoneBinding") return err }, opts...) if err != nil { @@ -3851,7 +3856,7 @@ func (c *gRPCClient) RepairManagementDnsZoneBinding(ctx context.Context, req *vm var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RepairManagementDnsZoneBinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RepairManagementDnsZoneBinding, req, settings.GRPC, c.logger, "RepairManagementDnsZoneBinding") return err }, opts...) if err != nil { @@ -3871,7 +3876,7 @@ func (c *gRPCClient) CreateVmwareEngineNetwork(ctx context.Context, req *vmwaree var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateVmwareEngineNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateVmwareEngineNetwork, req, settings.GRPC, c.logger, "CreateVmwareEngineNetwork") return err }, opts...) if err != nil { @@ -3891,7 +3896,7 @@ func (c *gRPCClient) UpdateVmwareEngineNetwork(ctx context.Context, req *vmwaree var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateVmwareEngineNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateVmwareEngineNetwork, req, settings.GRPC, c.logger, "UpdateVmwareEngineNetwork") return err }, opts...) if err != nil { @@ -3911,7 +3916,7 @@ func (c *gRPCClient) DeleteVmwareEngineNetwork(ctx context.Context, req *vmwaree var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteVmwareEngineNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteVmwareEngineNetwork, req, settings.GRPC, c.logger, "DeleteVmwareEngineNetwork") return err }, opts...) if err != nil { @@ -3931,7 +3936,7 @@ func (c *gRPCClient) GetVmwareEngineNetwork(ctx context.Context, req *vmwareengi var resp *vmwareenginepb.VmwareEngineNetwork err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetVmwareEngineNetwork(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetVmwareEngineNetwork, req, settings.GRPC, c.logger, "GetVmwareEngineNetwork") return err }, opts...) if err != nil { @@ -3960,7 +3965,7 @@ func (c *gRPCClient) ListVmwareEngineNetworks(ctx context.Context, req *vmwareen } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListVmwareEngineNetworks(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListVmwareEngineNetworks, req, settings.GRPC, c.logger, "ListVmwareEngineNetworks") return err }, opts...) if err != nil { @@ -3995,7 +4000,7 @@ func (c *gRPCClient) CreatePrivateConnection(ctx context.Context, req *vmwareeng var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreatePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreatePrivateConnection, req, settings.GRPC, c.logger, "CreatePrivateConnection") return err }, opts...) if err != nil { @@ -4015,7 +4020,7 @@ func (c *gRPCClient) GetPrivateConnection(ctx context.Context, req *vmwareengine var resp *vmwareenginepb.PrivateConnection err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetPrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetPrivateConnection, req, settings.GRPC, c.logger, "GetPrivateConnection") return err }, opts...) if err != nil { @@ -4044,7 +4049,7 @@ func (c *gRPCClient) ListPrivateConnections(ctx context.Context, req *vmwareengi } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPrivateConnections(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPrivateConnections, req, settings.GRPC, c.logger, "ListPrivateConnections") return err }, opts...) if err != nil { @@ -4079,7 +4084,7 @@ func (c *gRPCClient) UpdatePrivateConnection(ctx context.Context, req *vmwareeng var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdatePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdatePrivateConnection, req, settings.GRPC, c.logger, "UpdatePrivateConnection") return err }, opts...) if err != nil { @@ -4099,7 +4104,7 @@ func (c *gRPCClient) DeletePrivateConnection(ctx context.Context, req *vmwareeng var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeletePrivateConnection(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeletePrivateConnection, req, settings.GRPC, c.logger, "DeletePrivateConnection") return err }, opts...) if err != nil { @@ -4130,7 +4135,7 @@ func (c *gRPCClient) ListPrivateConnectionPeeringRoutes(ctx context.Context, req } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListPrivateConnectionPeeringRoutes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListPrivateConnectionPeeringRoutes, req, settings.GRPC, c.logger, "ListPrivateConnectionPeeringRoutes") return err }, opts...) if err != nil { @@ -4165,7 +4170,7 @@ func (c *gRPCClient) GrantDnsBindPermission(ctx context.Context, req *vmwareengi var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GrantDnsBindPermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GrantDnsBindPermission, req, settings.GRPC, c.logger, "GrantDnsBindPermission") return err }, opts...) if err != nil { @@ -4185,7 +4190,7 @@ func (c *gRPCClient) GetDnsBindPermission(ctx context.Context, req *vmwareengine var resp *vmwareenginepb.DnsBindPermission err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetDnsBindPermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetDnsBindPermission, req, settings.GRPC, c.logger, "GetDnsBindPermission") return err }, opts...) if err != nil { @@ -4203,7 +4208,7 @@ func (c *gRPCClient) RevokeDnsBindPermission(ctx context.Context, req *vmwareeng var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.RevokeDnsBindPermission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.RevokeDnsBindPermission, req, settings.GRPC, c.logger, "RevokeDnsBindPermission") return err }, opts...) if err != nil { @@ -4223,7 +4228,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -4252,7 +4257,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -4287,7 +4292,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -4305,7 +4310,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -4323,7 +4328,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -4340,7 +4345,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -4355,7 +4360,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -4384,7 +4389,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -4461,21 +4466,10 @@ func (c *restClient) ListPrivateClouds(ctx context.Context, req *vmwareenginepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrivateClouds") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4538,17 +4532,7 @@ func (c *restClient) GetPrivateCloud(ctx context.Context, req *vmwareenginepb.Ge httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPrivateCloud") if err != nil { return err } @@ -4617,21 +4601,10 @@ func (c *restClient) CreatePrivateCloud(ctx context.Context, req *vmwareenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePrivateCloud") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4705,21 +4678,10 @@ func (c *restClient) UpdatePrivateCloud(ctx context.Context, req *vmwareenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePrivateCloud") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4792,21 +4754,10 @@ func (c *restClient) DeletePrivateCloud(ctx context.Context, req *vmwareenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePrivateCloud") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4865,21 +4816,10 @@ func (c *restClient) UndeletePrivateCloud(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UndeletePrivateCloud") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -4948,21 +4888,10 @@ func (c *restClient) ListClusters(ctx context.Context, req *vmwareenginepb.ListC } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5025,17 +4954,7 @@ func (c *restClient) GetCluster(ctx context.Context, req *vmwareenginepb.GetClus httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCluster") if err != nil { return err } @@ -5101,21 +5020,10 @@ func (c *restClient) CreateCluster(ctx context.Context, req *vmwareenginepb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5191,21 +5099,10 @@ func (c *restClient) UpdateCluster(ctx context.Context, req *vmwareenginepb.Upda httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5261,21 +5158,10 @@ func (c *restClient) DeleteCluster(ctx context.Context, req *vmwareenginepb.Dele httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5338,21 +5224,10 @@ func (c *restClient) ListNodes(ctx context.Context, req *vmwareenginepb.ListNode } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5415,17 +5290,7 @@ func (c *restClient) GetNode(ctx context.Context, req *vmwareenginepb.GetNodeReq httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNode") if err != nil { return err } @@ -5494,21 +5359,10 @@ func (c *restClient) ListExternalAddresses(ctx context.Context, req *vmwareengin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExternalAddresses") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5584,21 +5438,10 @@ func (c *restClient) FetchNetworkPolicyExternalAddresses(ctx context.Context, re } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "FetchNetworkPolicyExternalAddresses") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5661,17 +5504,7 @@ func (c *restClient) GetExternalAddress(ctx context.Context, req *vmwareenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExternalAddress") if err != nil { return err } @@ -5733,21 +5566,10 @@ func (c *restClient) CreateExternalAddress(ctx context.Context, req *vmwareengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExternalAddress") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5820,21 +5642,10 @@ func (c *restClient) UpdateExternalAddress(ctx context.Context, req *vmwareengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExternalAddress") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5889,21 +5700,10 @@ func (c *restClient) DeleteExternalAddress(ctx context.Context, req *vmwareengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExternalAddress") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -5966,21 +5766,10 @@ func (c *restClient) ListSubnets(ctx context.Context, req *vmwareenginepb.ListSu } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSubnets") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6043,17 +5832,7 @@ func (c *restClient) GetSubnet(ctx context.Context, req *vmwareenginepb.GetSubne httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSubnet") if err != nil { return err } @@ -6121,21 +5900,10 @@ func (c *restClient) UpdateSubnet(ctx context.Context, req *vmwareenginepb.Updat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateSubnet") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6204,21 +5972,10 @@ func (c *restClient) ListExternalAccessRules(ctx context.Context, req *vmwareeng } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExternalAccessRules") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6281,17 +6038,7 @@ func (c *restClient) GetExternalAccessRule(ctx context.Context, req *vmwareengin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExternalAccessRule") if err != nil { return err } @@ -6351,21 +6098,10 @@ func (c *restClient) CreateExternalAccessRule(ctx context.Context, req *vmwareen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExternalAccessRule") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6433,21 +6169,10 @@ func (c *restClient) UpdateExternalAccessRule(ctx context.Context, req *vmwareen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateExternalAccessRule") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6500,21 +6225,10 @@ func (c *restClient) DeleteExternalAccessRule(ctx context.Context, req *vmwareen httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteExternalAccessRule") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6584,21 +6298,10 @@ func (c *restClient) ListLoggingServers(ctx context.Context, req *vmwareenginepb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLoggingServers") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6661,17 +6364,7 @@ func (c *restClient) GetLoggingServer(ctx context.Context, req *vmwareenginepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLoggingServer") if err != nil { return err } @@ -6731,21 +6424,10 @@ func (c *restClient) CreateLoggingServer(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateLoggingServer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6813,21 +6495,10 @@ func (c *restClient) UpdateLoggingServer(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateLoggingServer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6880,21 +6551,10 @@ func (c *restClient) DeleteLoggingServer(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteLoggingServer") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -6960,22 +6620,11 @@ func (c *restClient) ListNodeTypes(ctx context.Context, req *vmwareenginepb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNodeTypes") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { + if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7037,17 +6686,7 @@ func (c *restClient) GetNodeType(ctx context.Context, req *vmwareenginepb.GetNod httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNodeType") if err != nil { return err } @@ -7097,17 +6736,7 @@ func (c *restClient) ShowNsxCredentials(ctx context.Context, req *vmwareenginepb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ShowNsxCredentials") if err != nil { return err } @@ -7160,17 +6789,7 @@ func (c *restClient) ShowVcenterCredentials(ctx context.Context, req *vmwareengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ShowVcenterCredentials") if err != nil { return err } @@ -7225,21 +6844,10 @@ func (c *restClient) ResetNsxCredentials(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetNsxCredentials") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7295,21 +6903,10 @@ func (c *restClient) ResetVcenterCredentials(ctx context.Context, req *vmwareeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ResetVcenterCredentials") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7360,17 +6957,7 @@ func (c *restClient) GetDnsForwarding(ctx context.Context, req *vmwareenginepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDnsForwarding") if err != nil { return err } @@ -7437,21 +7024,10 @@ func (c *restClient) UpdateDnsForwarding(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDnsForwarding") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7505,17 +7081,7 @@ func (c *restClient) GetNetworkPeering(ctx context.Context, req *vmwareenginepb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNetworkPeering") if err != nil { return err } @@ -7584,21 +7150,10 @@ func (c *restClient) ListNetworkPeerings(ctx context.Context, req *vmwareenginep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworkPeerings") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7673,21 +7228,10 @@ func (c *restClient) CreateNetworkPeering(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNetworkPeering") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7743,21 +7287,10 @@ func (c *restClient) DeleteNetworkPeering(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNetworkPeering") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7826,21 +7359,10 @@ func (c *restClient) UpdateNetworkPeering(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNetworkPeering") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7907,21 +7429,10 @@ func (c *restClient) ListPeeringRoutes(ctx context.Context, req *vmwareenginepb. } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPeeringRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -7994,21 +7505,10 @@ func (c *restClient) CreateHcxActivationKey(ctx context.Context, req *vmwareengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateHcxActivationKey") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8071,21 +7571,10 @@ func (c *restClient) ListHcxActivationKeys(ctx context.Context, req *vmwareengin } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListHcxActivationKeys") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8148,17 +7637,7 @@ func (c *restClient) GetHcxActivationKey(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetHcxActivationKey") if err != nil { return err } @@ -8208,17 +7687,7 @@ func (c *restClient) GetNetworkPolicy(ctx context.Context, req *vmwareenginepb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetNetworkPolicy") if err != nil { return err } @@ -8286,21 +7755,10 @@ func (c *restClient) ListNetworkPolicies(ctx context.Context, req *vmwareenginep } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListNetworkPolicies") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8375,21 +7833,10 @@ func (c *restClient) CreateNetworkPolicy(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateNetworkPolicy") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8467,21 +7914,10 @@ func (c *restClient) UpdateNetworkPolicy(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateNetworkPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8536,21 +7972,10 @@ func (c *restClient) DeleteNetworkPolicy(ctx context.Context, req *vmwareenginep httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteNetworkPolicy") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8619,21 +8044,10 @@ func (c *restClient) ListManagementDnsZoneBindings(ctx context.Context, req *vmw } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListManagementDnsZoneBindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8696,17 +8110,7 @@ func (c *restClient) GetManagementDnsZoneBinding(ctx context.Context, req *vmwar httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetManagementDnsZoneBinding") if err != nil { return err } @@ -8772,21 +8176,10 @@ func (c *restClient) CreateManagementDnsZoneBinding(ctx context.Context, req *vm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateManagementDnsZoneBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8854,21 +8247,10 @@ func (c *restClient) UpdateManagementDnsZoneBinding(ctx context.Context, req *vm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateManagementDnsZoneBinding") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8923,21 +8305,10 @@ func (c *restClient) DeleteManagementDnsZoneBinding(ctx context.Context, req *vm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteManagementDnsZoneBinding") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -8994,21 +8365,10 @@ func (c *restClient) RepairManagementDnsZoneBinding(ctx context.Context, req *vm httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RepairManagementDnsZoneBinding") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9069,21 +8429,10 @@ func (c *restClient) CreateVmwareEngineNetwork(ctx context.Context, req *vmwaree httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateVmwareEngineNetwork") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9152,21 +8501,10 @@ func (c *restClient) UpdateVmwareEngineNetwork(ctx context.Context, req *vmwaree httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateVmwareEngineNetwork") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9225,21 +8563,10 @@ func (c *restClient) DeleteVmwareEngineNetwork(ctx context.Context, req *vmwaree httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteVmwareEngineNetwork") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9293,17 +8620,7 @@ func (c *restClient) GetVmwareEngineNetwork(ctx context.Context, req *vmwareengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetVmwareEngineNetwork") if err != nil { return err } @@ -9371,21 +8688,10 @@ func (c *restClient) ListVmwareEngineNetworks(ctx context.Context, req *vmwareen } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListVmwareEngineNetworks") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9459,21 +8765,10 @@ func (c *restClient) CreatePrivateConnection(ctx context.Context, req *vmwareeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreatePrivateConnection") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9526,17 +8821,7 @@ func (c *restClient) GetPrivateConnection(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetPrivateConnection") if err != nil { return err } @@ -9604,21 +8889,10 @@ func (c *restClient) ListPrivateConnections(ctx context.Context, req *vmwareengi } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrivateConnections") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9699,21 +8973,10 @@ func (c *restClient) UpdatePrivateConnection(ctx context.Context, req *vmwareeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdatePrivateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9768,21 +9031,10 @@ func (c *restClient) DeletePrivateConnection(ctx context.Context, req *vmwareeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeletePrivateConnection") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9845,21 +9097,10 @@ func (c *restClient) ListPrivateConnectionPeeringRoutes(ctx context.Context, req } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListPrivateConnectionPeeringRoutes") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9930,21 +9171,10 @@ func (c *restClient) GrantDnsBindPermission(ctx context.Context, req *vmwareengi httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GrantDnsBindPermission") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -9997,17 +9227,7 @@ func (c *restClient) GetDnsBindPermission(ctx context.Context, req *vmwareengine httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDnsBindPermission") if err != nil { return err } @@ -10064,21 +9284,10 @@ func (c *restClient) RevokeDnsBindPermission(ctx context.Context, req *vmwareeng httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RevokeDnsBindPermission") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10129,17 +9338,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -10204,21 +9403,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -10285,17 +9473,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -10355,17 +9533,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -10427,17 +9595,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -10484,15 +9642,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -10529,17 +9680,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -10604,21 +9745,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/vmwareengine/apiv1/vmware_engine_client_example_go123_test.go b/vmwareengine/apiv1/vmware_engine_client_example_go123_test.go index f12e4936beba..b04f67d18599 100644 --- a/vmwareengine/apiv1/vmware_engine_client_example_go123_test.go +++ b/vmwareengine/apiv1/vmware_engine_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_FetchNetworkPolicyExternalAddresses_all() { } for resp, err := range c.FetchNetworkPolicyExternalAddresses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListClusters_all() { } for resp, err := range c.ListClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListExternalAccessRules_all() { } for resp, err := range c.ListExternalAccessRules(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -124,7 +124,7 @@ func ExampleClient_ListExternalAddresses_all() { } for resp, err := range c.ListExternalAddresses(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -150,7 +150,7 @@ func ExampleClient_ListHcxActivationKeys_all() { } for resp, err := range c.ListHcxActivationKeys(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -176,7 +176,7 @@ func ExampleClient_ListLoggingServers_all() { } for resp, err := range c.ListLoggingServers(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -202,7 +202,7 @@ func ExampleClient_ListManagementDnsZoneBindings_all() { } for resp, err := range c.ListManagementDnsZoneBindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -228,7 +228,7 @@ func ExampleClient_ListNetworkPeerings_all() { } for resp, err := range c.ListNetworkPeerings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -254,7 +254,7 @@ func ExampleClient_ListNetworkPolicies_all() { } for resp, err := range c.ListNetworkPolicies(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -280,7 +280,7 @@ func ExampleClient_ListNodeTypes_all() { } for resp, err := range c.ListNodeTypes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -306,7 +306,7 @@ func ExampleClient_ListNodes_all() { } for resp, err := range c.ListNodes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -332,7 +332,7 @@ func ExampleClient_ListPeeringRoutes_all() { } for resp, err := range c.ListPeeringRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -358,7 +358,7 @@ func ExampleClient_ListPrivateClouds_all() { } for resp, err := range c.ListPrivateClouds(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -384,7 +384,7 @@ func ExampleClient_ListPrivateConnectionPeeringRoutes_all() { } for resp, err := range c.ListPrivateConnectionPeeringRoutes(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -410,7 +410,7 @@ func ExampleClient_ListPrivateConnections_all() { } for resp, err := range c.ListPrivateConnections(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -436,7 +436,7 @@ func ExampleClient_ListSubnets_all() { } for resp, err := range c.ListSubnets(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -462,7 +462,7 @@ func ExampleClient_ListVmwareEngineNetworks_all() { } for resp, err := range c.ListVmwareEngineNetworks(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -488,7 +488,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -514,7 +514,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/vmwareengine/apiv1/vmwareenginepb/vmwareengine.pb.go b/vmwareengine/apiv1/vmwareenginepb/vmwareengine.pb.go index b31ada7e2e77..2da46d775a0c 100755 --- a/vmwareengine/apiv1/vmwareenginepb/vmwareengine.pb.go +++ b/vmwareengine/apiv1/vmwareenginepb/vmwareengine.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vmwareengine/v1/vmwareengine.proto @@ -105,11 +105,9 @@ type ListPrivateCloudsRequest struct { func (x *ListPrivateCloudsRequest) Reset() { *x = ListPrivateCloudsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateCloudsRequest) String() string { @@ -120,7 +118,7 @@ func (*ListPrivateCloudsRequest) ProtoMessage() {} func (x *ListPrivateCloudsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,11 +187,9 @@ type ListPrivateCloudsResponse struct { func (x *ListPrivateCloudsResponse) Reset() { *x = ListPrivateCloudsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateCloudsResponse) String() string { @@ -204,7 +200,7 @@ func (*ListPrivateCloudsResponse) ProtoMessage() {} func (x *ListPrivateCloudsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,11 +253,9 @@ type GetPrivateCloudRequest struct { func (x *GetPrivateCloudRequest) Reset() { *x = GetPrivateCloudRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPrivateCloudRequest) String() string { @@ -272,7 +266,7 @@ func (*GetPrivateCloudRequest) ProtoMessage() {} func (x *GetPrivateCloudRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,11 +325,9 @@ type CreatePrivateCloudRequest struct { func (x *CreatePrivateCloudRequest) Reset() { *x = CreatePrivateCloudRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePrivateCloudRequest) String() string { @@ -346,7 +338,7 @@ func (*CreatePrivateCloudRequest) ProtoMessage() {} func (x *CreatePrivateCloudRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -418,11 +410,9 @@ type UpdatePrivateCloudRequest struct { func (x *UpdatePrivateCloudRequest) Reset() { *x = UpdatePrivateCloudRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePrivateCloudRequest) String() string { @@ -433,7 +423,7 @@ func (*UpdatePrivateCloudRequest) ProtoMessage() {} func (x *UpdatePrivateCloudRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -504,11 +494,9 @@ type DeletePrivateCloudRequest struct { func (x *DeletePrivateCloudRequest) Reset() { *x = DeletePrivateCloudRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePrivateCloudRequest) String() string { @@ -519,7 +507,7 @@ func (*DeletePrivateCloudRequest) ProtoMessage() {} func (x *DeletePrivateCloudRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +570,9 @@ type UndeletePrivateCloudRequest struct { func (x *UndeletePrivateCloudRequest) Reset() { *x = UndeletePrivateCloudRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UndeletePrivateCloudRequest) String() string { @@ -597,7 +583,7 @@ func (*UndeletePrivateCloudRequest) ProtoMessage() {} func (x *UndeletePrivateCloudRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +660,9 @@ type ListClustersRequest struct { func (x *ListClustersRequest) Reset() { *x = ListClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersRequest) String() string { @@ -689,7 +673,7 @@ func (*ListClustersRequest) ProtoMessage() {} func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,11 +742,9 @@ type ListClustersResponse struct { func (x *ListClustersResponse) Reset() { *x = ListClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListClustersResponse) String() string { @@ -773,7 +755,7 @@ func (*ListClustersResponse) ProtoMessage() {} func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -826,11 +808,9 @@ type GetClusterRequest struct { func (x *GetClusterRequest) Reset() { *x = GetClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetClusterRequest) String() string { @@ -841,7 +821,7 @@ func (*GetClusterRequest) ProtoMessage() {} func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,11 +880,9 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateClusterRequest) String() string { @@ -915,7 +893,7 @@ func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -990,11 +968,9 @@ type UpdateClusterRequest struct { func (x *UpdateClusterRequest) Reset() { *x = UpdateClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateClusterRequest) String() string { @@ -1005,7 +981,7 @@ func (*UpdateClusterRequest) ProtoMessage() {} func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1068,11 +1044,9 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteClusterRequest) String() string { @@ -1083,7 +1057,7 @@ func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1141,11 +1115,9 @@ type ListNodesRequest struct { func (x *ListNodesRequest) Reset() { *x = ListNodesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodesRequest) String() string { @@ -1156,7 +1128,7 @@ func (*ListNodesRequest) ProtoMessage() {} func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1208,11 +1180,9 @@ type ListNodesResponse struct { func (x *ListNodesResponse) Reset() { *x = ListNodesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodesResponse) String() string { @@ -1223,7 +1193,7 @@ func (*ListNodesResponse) ProtoMessage() {} func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1267,11 +1237,9 @@ type GetNodeRequest struct { func (x *GetNodeRequest) Reset() { *x = GetNodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeRequest) String() string { @@ -1282,7 +1250,7 @@ func (*GetNodeRequest) ProtoMessage() {} func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1365,11 +1333,9 @@ type ListExternalAddressesRequest struct { func (x *ListExternalAddressesRequest) Reset() { *x = ListExternalAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalAddressesRequest) String() string { @@ -1380,7 +1346,7 @@ func (*ListExternalAddressesRequest) ProtoMessage() {} func (x *ListExternalAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1449,11 +1415,9 @@ type ListExternalAddressesResponse struct { func (x *ListExternalAddressesResponse) Reset() { *x = ListExternalAddressesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalAddressesResponse) String() string { @@ -1464,7 +1428,7 @@ func (*ListExternalAddressesResponse) ProtoMessage() {} func (x *ListExternalAddressesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1530,11 +1494,9 @@ type FetchNetworkPolicyExternalAddressesRequest struct { func (x *FetchNetworkPolicyExternalAddressesRequest) Reset() { *x = FetchNetworkPolicyExternalAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchNetworkPolicyExternalAddressesRequest) String() string { @@ -1545,7 +1507,7 @@ func (*FetchNetworkPolicyExternalAddressesRequest) ProtoMessage() {} func (x *FetchNetworkPolicyExternalAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,11 +1560,9 @@ type FetchNetworkPolicyExternalAddressesResponse struct { func (x *FetchNetworkPolicyExternalAddressesResponse) Reset() { *x = FetchNetworkPolicyExternalAddressesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FetchNetworkPolicyExternalAddressesResponse) String() string { @@ -1613,7 +1573,7 @@ func (*FetchNetworkPolicyExternalAddressesResponse) ProtoMessage() {} func (x *FetchNetworkPolicyExternalAddressesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1659,11 +1619,9 @@ type GetExternalAddressRequest struct { func (x *GetExternalAddressRequest) Reset() { *x = GetExternalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExternalAddressRequest) String() string { @@ -1674,7 +1632,7 @@ func (*GetExternalAddressRequest) ProtoMessage() {} func (x *GetExternalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1743,11 +1701,9 @@ type CreateExternalAddressRequest struct { func (x *CreateExternalAddressRequest) Reset() { *x = CreateExternalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExternalAddressRequest) String() string { @@ -1758,7 +1714,7 @@ func (*CreateExternalAddressRequest) ProtoMessage() {} func (x *CreateExternalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1835,11 +1791,9 @@ type UpdateExternalAddressRequest struct { func (x *UpdateExternalAddressRequest) Reset() { *x = UpdateExternalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExternalAddressRequest) String() string { @@ -1850,7 +1804,7 @@ func (*UpdateExternalAddressRequest) ProtoMessage() {} func (x *UpdateExternalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1918,11 +1872,9 @@ type DeleteExternalAddressRequest struct { func (x *DeleteExternalAddressRequest) Reset() { *x = DeleteExternalAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExternalAddressRequest) String() string { @@ -1933,7 +1885,7 @@ func (*DeleteExternalAddressRequest) ProtoMessage() {} func (x *DeleteExternalAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1991,11 +1943,9 @@ type ListSubnetsRequest struct { func (x *ListSubnetsRequest) Reset() { *x = ListSubnetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubnetsRequest) String() string { @@ -2006,7 +1956,7 @@ func (*ListSubnetsRequest) ProtoMessage() {} func (x *ListSubnetsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2061,11 +2011,9 @@ type ListSubnetsResponse struct { func (x *ListSubnetsResponse) Reset() { *x = ListSubnetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSubnetsResponse) String() string { @@ -2076,7 +2024,7 @@ func (*ListSubnetsResponse) ProtoMessage() {} func (x *ListSubnetsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2129,11 +2077,9 @@ type GetSubnetRequest struct { func (x *GetSubnetRequest) Reset() { *x = GetSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSubnetRequest) String() string { @@ -2144,7 +2090,7 @@ func (*GetSubnetRequest) ProtoMessage() {} func (x *GetSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2185,11 +2131,9 @@ type UpdateSubnetRequest struct { func (x *UpdateSubnetRequest) Reset() { *x = UpdateSubnetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateSubnetRequest) String() string { @@ -2200,7 +2144,7 @@ func (*UpdateSubnetRequest) ProtoMessage() {} func (x *UpdateSubnetRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2290,11 +2234,9 @@ type ListExternalAccessRulesRequest struct { func (x *ListExternalAccessRulesRequest) Reset() { *x = ListExternalAccessRulesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalAccessRulesRequest) String() string { @@ -2305,7 +2247,7 @@ func (*ListExternalAccessRulesRequest) ProtoMessage() {} func (x *ListExternalAccessRulesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2374,11 +2316,9 @@ type ListExternalAccessRulesResponse struct { func (x *ListExternalAccessRulesResponse) Reset() { *x = ListExternalAccessRulesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExternalAccessRulesResponse) String() string { @@ -2389,7 +2329,7 @@ func (*ListExternalAccessRulesResponse) ProtoMessage() {} func (x *ListExternalAccessRulesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2442,11 +2382,9 @@ type GetExternalAccessRuleRequest struct { func (x *GetExternalAccessRuleRequest) Reset() { *x = GetExternalAccessRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExternalAccessRuleRequest) String() string { @@ -2457,7 +2395,7 @@ func (*GetExternalAccessRuleRequest) ProtoMessage() {} func (x *GetExternalAccessRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,11 +2464,9 @@ type CreateExternalAccessRuleRequest struct { func (x *CreateExternalAccessRuleRequest) Reset() { *x = CreateExternalAccessRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExternalAccessRuleRequest) String() string { @@ -2541,7 +2477,7 @@ func (*CreateExternalAccessRuleRequest) ProtoMessage() {} func (x *CreateExternalAccessRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2618,11 +2554,9 @@ type UpdateExternalAccessRuleRequest struct { func (x *UpdateExternalAccessRuleRequest) Reset() { *x = UpdateExternalAccessRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateExternalAccessRuleRequest) String() string { @@ -2633,7 +2567,7 @@ func (*UpdateExternalAccessRuleRequest) ProtoMessage() {} func (x *UpdateExternalAccessRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2701,11 +2635,9 @@ type DeleteExternalAccessRuleRequest struct { func (x *DeleteExternalAccessRuleRequest) Reset() { *x = DeleteExternalAccessRuleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExternalAccessRuleRequest) String() string { @@ -2716,7 +2648,7 @@ func (*DeleteExternalAccessRuleRequest) ProtoMessage() {} func (x *DeleteExternalAccessRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2807,11 +2739,9 @@ type ListLoggingServersRequest struct { func (x *ListLoggingServersRequest) Reset() { *x = ListLoggingServersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLoggingServersRequest) String() string { @@ -2822,7 +2752,7 @@ func (*ListLoggingServersRequest) ProtoMessage() {} func (x *ListLoggingServersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2891,11 +2821,9 @@ type ListLoggingServersResponse struct { func (x *ListLoggingServersResponse) Reset() { *x = ListLoggingServersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListLoggingServersResponse) String() string { @@ -2906,7 +2834,7 @@ func (*ListLoggingServersResponse) ProtoMessage() {} func (x *ListLoggingServersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2959,11 +2887,9 @@ type GetLoggingServerRequest struct { func (x *GetLoggingServerRequest) Reset() { *x = GetLoggingServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoggingServerRequest) String() string { @@ -2974,7 +2900,7 @@ func (*GetLoggingServerRequest) ProtoMessage() {} func (x *GetLoggingServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3043,11 +2969,9 @@ type CreateLoggingServerRequest struct { func (x *CreateLoggingServerRequest) Reset() { *x = CreateLoggingServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLoggingServerRequest) String() string { @@ -3058,7 +2982,7 @@ func (*CreateLoggingServerRequest) ProtoMessage() {} func (x *CreateLoggingServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3135,11 +3059,9 @@ type UpdateLoggingServerRequest struct { func (x *UpdateLoggingServerRequest) Reset() { *x = UpdateLoggingServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateLoggingServerRequest) String() string { @@ -3150,7 +3072,7 @@ func (*UpdateLoggingServerRequest) ProtoMessage() {} func (x *UpdateLoggingServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3218,11 +3140,9 @@ type DeleteLoggingServerRequest struct { func (x *DeleteLoggingServerRequest) Reset() { *x = DeleteLoggingServerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLoggingServerRequest) String() string { @@ -3233,7 +3153,7 @@ func (*DeleteLoggingServerRequest) ProtoMessage() {} func (x *DeleteLoggingServerRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3291,11 +3211,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -3306,7 +3224,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3424,11 +3342,9 @@ type ListNodeTypesRequest struct { func (x *ListNodeTypesRequest) Reset() { *x = ListNodeTypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodeTypesRequest) String() string { @@ -3439,7 +3355,7 @@ func (*ListNodeTypesRequest) ProtoMessage() {} func (x *ListNodeTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3501,11 +3417,9 @@ type ListNodeTypesResponse struct { func (x *ListNodeTypesResponse) Reset() { *x = ListNodeTypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNodeTypesResponse) String() string { @@ -3516,7 +3430,7 @@ func (*ListNodeTypesResponse) ProtoMessage() {} func (x *ListNodeTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3569,11 +3483,9 @@ type GetNodeTypeRequest struct { func (x *GetNodeTypeRequest) Reset() { *x = GetNodeTypeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNodeTypeRequest) String() string { @@ -3584,7 +3496,7 @@ func (*GetNodeTypeRequest) ProtoMessage() {} func (x *GetNodeTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3624,11 +3536,9 @@ type ShowNsxCredentialsRequest struct { func (x *ShowNsxCredentialsRequest) Reset() { *x = ShowNsxCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShowNsxCredentialsRequest) String() string { @@ -3639,7 +3549,7 @@ func (*ShowNsxCredentialsRequest) ProtoMessage() {} func (x *ShowNsxCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3690,11 +3600,9 @@ type ShowVcenterCredentialsRequest struct { func (x *ShowVcenterCredentialsRequest) Reset() { *x = ShowVcenterCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ShowVcenterCredentialsRequest) String() string { @@ -3705,7 +3613,7 @@ func (*ShowVcenterCredentialsRequest) ProtoMessage() {} func (x *ShowVcenterCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3767,11 +3675,9 @@ type ResetNsxCredentialsRequest struct { func (x *ResetNsxCredentialsRequest) Reset() { *x = ResetNsxCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetNsxCredentialsRequest) String() string { @@ -3782,7 +3688,7 @@ func (*ResetNsxCredentialsRequest) ProtoMessage() {} func (x *ResetNsxCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3854,11 +3760,9 @@ type ResetVcenterCredentialsRequest struct { func (x *ResetVcenterCredentialsRequest) Reset() { *x = ResetVcenterCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResetVcenterCredentialsRequest) String() string { @@ -3869,7 +3773,7 @@ func (*ResetVcenterCredentialsRequest) ProtoMessage() {} func (x *ResetVcenterCredentialsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3924,11 +3828,9 @@ type ListHcxActivationKeysResponse struct { func (x *ListHcxActivationKeysResponse) Reset() { *x = ListHcxActivationKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHcxActivationKeysResponse) String() string { @@ -3939,7 +3841,7 @@ func (*ListHcxActivationKeysResponse) ProtoMessage() {} func (x *ListHcxActivationKeysResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4005,11 +3907,9 @@ type ListHcxActivationKeysRequest struct { func (x *ListHcxActivationKeysRequest) Reset() { *x = ListHcxActivationKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListHcxActivationKeysRequest) String() string { @@ -4020,7 +3920,7 @@ func (*ListHcxActivationKeysRequest) ProtoMessage() {} func (x *ListHcxActivationKeysRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4072,11 +3972,9 @@ type GetHcxActivationKeyRequest struct { func (x *GetHcxActivationKeyRequest) Reset() { *x = GetHcxActivationKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHcxActivationKeyRequest) String() string { @@ -4087,7 +3985,7 @@ func (*GetHcxActivationKeyRequest) ProtoMessage() {} func (x *GetHcxActivationKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4156,11 +4054,9 @@ type CreateHcxActivationKeyRequest struct { func (x *CreateHcxActivationKeyRequest) Reset() { *x = CreateHcxActivationKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateHcxActivationKeyRequest) String() string { @@ -4171,7 +4067,7 @@ func (*CreateHcxActivationKeyRequest) ProtoMessage() {} func (x *CreateHcxActivationKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4231,11 +4127,9 @@ type GetDnsForwardingRequest struct { func (x *GetDnsForwardingRequest) Reset() { *x = GetDnsForwardingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDnsForwardingRequest) String() string { @@ -4246,7 +4140,7 @@ func (*GetDnsForwardingRequest) ProtoMessage() {} func (x *GetDnsForwardingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4302,11 +4196,9 @@ type UpdateDnsForwardingRequest struct { func (x *UpdateDnsForwardingRequest) Reset() { *x = UpdateDnsForwardingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateDnsForwardingRequest) String() string { @@ -4317,7 +4209,7 @@ func (*UpdateDnsForwardingRequest) ProtoMessage() {} func (x *UpdateDnsForwardingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4399,11 +4291,9 @@ type CreateNetworkPeeringRequest struct { func (x *CreateNetworkPeeringRequest) Reset() { *x = CreateNetworkPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNetworkPeeringRequest) String() string { @@ -4414,7 +4304,7 @@ func (*CreateNetworkPeeringRequest) ProtoMessage() {} func (x *CreateNetworkPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4489,11 +4379,9 @@ type DeleteNetworkPeeringRequest struct { func (x *DeleteNetworkPeeringRequest) Reset() { *x = DeleteNetworkPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkPeeringRequest) String() string { @@ -4504,7 +4392,7 @@ func (*DeleteNetworkPeeringRequest) ProtoMessage() {} func (x *DeleteNetworkPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4550,11 +4438,9 @@ type GetNetworkPeeringRequest struct { func (x *GetNetworkPeeringRequest) Reset() { *x = GetNetworkPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkPeeringRequest) String() string { @@ -4565,7 +4451,7 @@ func (*GetNetworkPeeringRequest) ProtoMessage() {} func (x *GetNetworkPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4646,11 +4532,9 @@ type ListNetworkPeeringsRequest struct { func (x *ListNetworkPeeringsRequest) Reset() { *x = ListNetworkPeeringsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkPeeringsRequest) String() string { @@ -4661,7 +4545,7 @@ func (*ListNetworkPeeringsRequest) ProtoMessage() {} func (x *ListNetworkPeeringsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4745,11 +4629,9 @@ type UpdateNetworkPeeringRequest struct { func (x *UpdateNetworkPeeringRequest) Reset() { *x = UpdateNetworkPeeringRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNetworkPeeringRequest) String() string { @@ -4760,7 +4642,7 @@ func (*UpdateNetworkPeeringRequest) ProtoMessage() {} func (x *UpdateNetworkPeeringRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[58] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4814,11 +4696,9 @@ type ListNetworkPeeringsResponse struct { func (x *ListNetworkPeeringsResponse) Reset() { *x = ListNetworkPeeringsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkPeeringsResponse) String() string { @@ -4829,7 +4709,7 @@ func (*ListNetworkPeeringsResponse) ProtoMessage() {} func (x *ListNetworkPeeringsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4897,11 +4777,9 @@ type ListPeeringRoutesRequest struct { func (x *ListPeeringRoutesRequest) Reset() { *x = ListPeeringRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPeeringRoutesRequest) String() string { @@ -4912,7 +4790,7 @@ func (*ListPeeringRoutesRequest) ProtoMessage() {} func (x *ListPeeringRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4971,11 +4849,9 @@ type ListPeeringRoutesResponse struct { func (x *ListPeeringRoutesResponse) Reset() { *x = ListPeeringRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPeeringRoutesResponse) String() string { @@ -4986,7 +4862,7 @@ func (*ListPeeringRoutesResponse) ProtoMessage() {} func (x *ListPeeringRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[61] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5075,11 +4951,9 @@ type ListNetworkPoliciesRequest struct { func (x *ListNetworkPoliciesRequest) Reset() { *x = ListNetworkPoliciesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkPoliciesRequest) String() string { @@ -5090,7 +4964,7 @@ func (*ListNetworkPoliciesRequest) ProtoMessage() {} func (x *ListNetworkPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[62] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5159,11 +5033,9 @@ type ListNetworkPoliciesResponse struct { func (x *ListNetworkPoliciesResponse) Reset() { *x = ListNetworkPoliciesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNetworkPoliciesResponse) String() string { @@ -5174,7 +5046,7 @@ func (*ListNetworkPoliciesResponse) ProtoMessage() {} func (x *ListNetworkPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5227,11 +5099,9 @@ type GetNetworkPolicyRequest struct { func (x *GetNetworkPolicyRequest) Reset() { *x = GetNetworkPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetNetworkPolicyRequest) String() string { @@ -5242,7 +5112,7 @@ func (*GetNetworkPolicyRequest) ProtoMessage() {} func (x *GetNetworkPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5298,11 +5168,9 @@ type UpdateNetworkPolicyRequest struct { func (x *UpdateNetworkPolicyRequest) Reset() { *x = UpdateNetworkPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateNetworkPolicyRequest) String() string { @@ -5313,7 +5181,7 @@ func (*UpdateNetworkPolicyRequest) ProtoMessage() {} func (x *UpdateNetworkPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5398,11 +5266,9 @@ type CreateNetworkPolicyRequest struct { func (x *CreateNetworkPolicyRequest) Reset() { *x = CreateNetworkPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateNetworkPolicyRequest) String() string { @@ -5413,7 +5279,7 @@ func (*CreateNetworkPolicyRequest) ProtoMessage() {} func (x *CreateNetworkPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5488,11 +5354,9 @@ type DeleteNetworkPolicyRequest struct { func (x *DeleteNetworkPolicyRequest) Reset() { *x = DeleteNetworkPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteNetworkPolicyRequest) String() string { @@ -5503,7 +5367,7 @@ func (*DeleteNetworkPolicyRequest) ProtoMessage() {} func (x *DeleteNetworkPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5594,11 +5458,9 @@ type ListManagementDnsZoneBindingsRequest struct { func (x *ListManagementDnsZoneBindingsRequest) Reset() { *x = ListManagementDnsZoneBindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagementDnsZoneBindingsRequest) String() string { @@ -5609,7 +5471,7 @@ func (*ListManagementDnsZoneBindingsRequest) ProtoMessage() {} func (x *ListManagementDnsZoneBindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[68] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5678,11 +5540,9 @@ type ListManagementDnsZoneBindingsResponse struct { func (x *ListManagementDnsZoneBindingsResponse) Reset() { *x = ListManagementDnsZoneBindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListManagementDnsZoneBindingsResponse) String() string { @@ -5693,7 +5553,7 @@ func (*ListManagementDnsZoneBindingsResponse) ProtoMessage() {} func (x *ListManagementDnsZoneBindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[69] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5746,11 +5606,9 @@ type GetManagementDnsZoneBindingRequest struct { func (x *GetManagementDnsZoneBindingRequest) Reset() { *x = GetManagementDnsZoneBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetManagementDnsZoneBindingRequest) String() string { @@ -5761,7 +5619,7 @@ func (*GetManagementDnsZoneBindingRequest) ProtoMessage() {} func (x *GetManagementDnsZoneBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[70] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5830,11 +5688,9 @@ type CreateManagementDnsZoneBindingRequest struct { func (x *CreateManagementDnsZoneBindingRequest) Reset() { *x = CreateManagementDnsZoneBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateManagementDnsZoneBindingRequest) String() string { @@ -5845,7 +5701,7 @@ func (*CreateManagementDnsZoneBindingRequest) ProtoMessage() {} func (x *CreateManagementDnsZoneBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[71] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5922,11 +5778,9 @@ type UpdateManagementDnsZoneBindingRequest struct { func (x *UpdateManagementDnsZoneBindingRequest) Reset() { *x = UpdateManagementDnsZoneBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateManagementDnsZoneBindingRequest) String() string { @@ -5937,7 +5791,7 @@ func (*UpdateManagementDnsZoneBindingRequest) ProtoMessage() {} func (x *UpdateManagementDnsZoneBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6005,11 +5859,9 @@ type DeleteManagementDnsZoneBindingRequest struct { func (x *DeleteManagementDnsZoneBindingRequest) Reset() { *x = DeleteManagementDnsZoneBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteManagementDnsZoneBindingRequest) String() string { @@ -6020,7 +5872,7 @@ func (*DeleteManagementDnsZoneBindingRequest) ProtoMessage() {} func (x *DeleteManagementDnsZoneBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6080,11 +5932,9 @@ type RepairManagementDnsZoneBindingRequest struct { func (x *RepairManagementDnsZoneBindingRequest) Reset() { *x = RepairManagementDnsZoneBindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepairManagementDnsZoneBindingRequest) String() string { @@ -6095,7 +5945,7 @@ func (*RepairManagementDnsZoneBindingRequest) ProtoMessage() {} func (x *RepairManagementDnsZoneBindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6175,11 +6025,9 @@ type CreateVmwareEngineNetworkRequest struct { func (x *CreateVmwareEngineNetworkRequest) Reset() { *x = CreateVmwareEngineNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVmwareEngineNetworkRequest) String() string { @@ -6190,7 +6038,7 @@ func (*CreateVmwareEngineNetworkRequest) ProtoMessage() {} func (x *CreateVmwareEngineNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6268,11 +6116,9 @@ type UpdateVmwareEngineNetworkRequest struct { func (x *UpdateVmwareEngineNetworkRequest) Reset() { *x = UpdateVmwareEngineNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateVmwareEngineNetworkRequest) String() string { @@ -6283,7 +6129,7 @@ func (*UpdateVmwareEngineNetworkRequest) ProtoMessage() {} func (x *UpdateVmwareEngineNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6356,11 +6202,9 @@ type DeleteVmwareEngineNetworkRequest struct { func (x *DeleteVmwareEngineNetworkRequest) Reset() { *x = DeleteVmwareEngineNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteVmwareEngineNetworkRequest) String() string { @@ -6371,7 +6215,7 @@ func (*DeleteVmwareEngineNetworkRequest) ProtoMessage() {} func (x *DeleteVmwareEngineNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6424,11 +6268,9 @@ type GetVmwareEngineNetworkRequest struct { func (x *GetVmwareEngineNetworkRequest) Reset() { *x = GetVmwareEngineNetworkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVmwareEngineNetworkRequest) String() string { @@ -6439,7 +6281,7 @@ func (*GetVmwareEngineNetworkRequest) ProtoMessage() {} func (x *GetVmwareEngineNetworkRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6520,11 +6362,9 @@ type ListVmwareEngineNetworksRequest struct { func (x *ListVmwareEngineNetworksRequest) Reset() { *x = ListVmwareEngineNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVmwareEngineNetworksRequest) String() string { @@ -6535,7 +6375,7 @@ func (*ListVmwareEngineNetworksRequest) ProtoMessage() {} func (x *ListVmwareEngineNetworksRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6603,11 +6443,9 @@ type ListVmwareEngineNetworksResponse struct { func (x *ListVmwareEngineNetworksResponse) Reset() { *x = ListVmwareEngineNetworksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListVmwareEngineNetworksResponse) String() string { @@ -6618,7 +6456,7 @@ func (*ListVmwareEngineNetworksResponse) ProtoMessage() {} func (x *ListVmwareEngineNetworksResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6700,11 +6538,9 @@ type CreatePrivateConnectionRequest struct { func (x *CreatePrivateConnectionRequest) Reset() { *x = CreatePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePrivateConnectionRequest) String() string { @@ -6715,7 +6551,7 @@ func (*CreatePrivateConnectionRequest) ProtoMessage() {} func (x *CreatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6775,11 +6611,9 @@ type GetPrivateConnectionRequest struct { func (x *GetPrivateConnectionRequest) Reset() { *x = GetPrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPrivateConnectionRequest) String() string { @@ -6790,7 +6624,7 @@ func (*GetPrivateConnectionRequest) ProtoMessage() {} func (x *GetPrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6871,11 +6705,9 @@ type ListPrivateConnectionsRequest struct { func (x *ListPrivateConnectionsRequest) Reset() { *x = ListPrivateConnectionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsRequest) String() string { @@ -6886,7 +6718,7 @@ func (*ListPrivateConnectionsRequest) ProtoMessage() {} func (x *ListPrivateConnectionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[83] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6954,11 +6786,9 @@ type ListPrivateConnectionsResponse struct { func (x *ListPrivateConnectionsResponse) Reset() { *x = ListPrivateConnectionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionsResponse) String() string { @@ -6969,7 +6799,7 @@ func (*ListPrivateConnectionsResponse) ProtoMessage() {} func (x *ListPrivateConnectionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7039,11 +6869,9 @@ type UpdatePrivateConnectionRequest struct { func (x *UpdatePrivateConnectionRequest) Reset() { *x = UpdatePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePrivateConnectionRequest) String() string { @@ -7054,7 +6882,7 @@ func (*UpdatePrivateConnectionRequest) ProtoMessage() {} func (x *UpdatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7122,11 +6950,9 @@ type DeletePrivateConnectionRequest struct { func (x *DeletePrivateConnectionRequest) Reset() { *x = DeletePrivateConnectionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePrivateConnectionRequest) String() string { @@ -7137,7 +6963,7 @@ func (*DeletePrivateConnectionRequest) ProtoMessage() {} func (x *DeletePrivateConnectionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7192,11 +7018,9 @@ type ListPrivateConnectionPeeringRoutesRequest struct { func (x *ListPrivateConnectionPeeringRoutesRequest) Reset() { *x = ListPrivateConnectionPeeringRoutesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionPeeringRoutesRequest) String() string { @@ -7207,7 +7031,7 @@ func (*ListPrivateConnectionPeeringRoutesRequest) ProtoMessage() {} func (x *ListPrivateConnectionPeeringRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7259,11 +7083,9 @@ type ListPrivateConnectionPeeringRoutesResponse struct { func (x *ListPrivateConnectionPeeringRoutesResponse) Reset() { *x = ListPrivateConnectionPeeringRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPrivateConnectionPeeringRoutesResponse) String() string { @@ -7274,7 +7096,7 @@ func (*ListPrivateConnectionPeeringRoutesResponse) ProtoMessage() {} func (x *ListPrivateConnectionPeeringRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7340,11 +7162,9 @@ type GrantDnsBindPermissionRequest struct { func (x *GrantDnsBindPermissionRequest) Reset() { *x = GrantDnsBindPermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GrantDnsBindPermissionRequest) String() string { @@ -7355,7 +7175,7 @@ func (*GrantDnsBindPermissionRequest) ProtoMessage() {} func (x *GrantDnsBindPermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[89] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7428,11 +7248,9 @@ type RevokeDnsBindPermissionRequest struct { func (x *RevokeDnsBindPermissionRequest) Reset() { *x = RevokeDnsBindPermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RevokeDnsBindPermissionRequest) String() string { @@ -7443,7 +7261,7 @@ func (*RevokeDnsBindPermissionRequest) ProtoMessage() {} func (x *RevokeDnsBindPermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[90] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7497,11 +7315,9 @@ type GetDnsBindPermissionRequest struct { func (x *GetDnsBindPermissionRequest) Reset() { *x = GetDnsBindPermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetDnsBindPermissionRequest) String() string { @@ -7512,7 +7328,7 @@ func (*GetDnsBindPermissionRequest) ProtoMessage() {} func (x *GetDnsBindPermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10162,1112 +9978,6 @@ func file_google_cloud_vmwareengine_v1_vmwareengine_proto_init() { return } file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateCloudsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateCloudsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetPrivateCloudRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreatePrivateCloudRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePrivateCloudRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeletePrivateCloudRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UndeletePrivateCloudRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*CreateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*UpdateClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*DeleteClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListNodesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListNodesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalAddressesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*FetchNetworkPolicyExternalAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FetchNetworkPolicyExternalAddressesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetExternalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*CreateExternalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExternalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExternalAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*ListSubnetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ListSubnetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*GetSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*UpdateSubnetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalAccessRulesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*ListExternalAccessRulesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*GetExternalAccessRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*CreateExternalAccessRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*UpdateExternalAccessRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*DeleteExternalAccessRuleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*ListLoggingServersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*ListLoggingServersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*GetLoggingServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*CreateLoggingServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*UpdateLoggingServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*DeleteLoggingServerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*ListNodeTypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*ListNodeTypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeTypeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*ShowNsxCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*ShowVcenterCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*ResetNsxCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ResetVcenterCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ListHcxActivationKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[49].Exporter = func(v any, i int) any { - switch v := v.(*ListHcxActivationKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[50].Exporter = func(v any, i int) any { - switch v := v.(*GetHcxActivationKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[51].Exporter = func(v any, i int) any { - switch v := v.(*CreateHcxActivationKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[52].Exporter = func(v any, i int) any { - switch v := v.(*GetDnsForwardingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*UpdateDnsForwardingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*CreateNetworkPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[55].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[56].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[57].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkPeeringsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[58].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNetworkPeeringRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[59].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkPeeringsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[60].Exporter = func(v any, i int) any { - switch v := v.(*ListPeeringRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[61].Exporter = func(v any, i int) any { - switch v := v.(*ListPeeringRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[62].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkPoliciesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[63].Exporter = func(v any, i int) any { - switch v := v.(*ListNetworkPoliciesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[64].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[65].Exporter = func(v any, i int) any { - switch v := v.(*UpdateNetworkPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[66].Exporter = func(v any, i int) any { - switch v := v.(*CreateNetworkPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[67].Exporter = func(v any, i int) any { - switch v := v.(*DeleteNetworkPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[68].Exporter = func(v any, i int) any { - switch v := v.(*ListManagementDnsZoneBindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[69].Exporter = func(v any, i int) any { - switch v := v.(*ListManagementDnsZoneBindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[70].Exporter = func(v any, i int) any { - switch v := v.(*GetManagementDnsZoneBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[71].Exporter = func(v any, i int) any { - switch v := v.(*CreateManagementDnsZoneBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[72].Exporter = func(v any, i int) any { - switch v := v.(*UpdateManagementDnsZoneBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[73].Exporter = func(v any, i int) any { - switch v := v.(*DeleteManagementDnsZoneBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[74].Exporter = func(v any, i int) any { - switch v := v.(*RepairManagementDnsZoneBindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[75].Exporter = func(v any, i int) any { - switch v := v.(*CreateVmwareEngineNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[76].Exporter = func(v any, i int) any { - switch v := v.(*UpdateVmwareEngineNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[77].Exporter = func(v any, i int) any { - switch v := v.(*DeleteVmwareEngineNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[78].Exporter = func(v any, i int) any { - switch v := v.(*GetVmwareEngineNetworkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[79].Exporter = func(v any, i int) any { - switch v := v.(*ListVmwareEngineNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[80].Exporter = func(v any, i int) any { - switch v := v.(*ListVmwareEngineNetworksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[81].Exporter = func(v any, i int) any { - switch v := v.(*CreatePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[82].Exporter = func(v any, i int) any { - switch v := v.(*GetPrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[83].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[84].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[85].Exporter = func(v any, i int) any { - switch v := v.(*UpdatePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[86].Exporter = func(v any, i int) any { - switch v := v.(*DeletePrivateConnectionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[87].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionPeeringRoutesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[88].Exporter = func(v any, i int) any { - switch v := v.(*ListPrivateConnectionPeeringRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[89].Exporter = func(v any, i int) any { - switch v := v.(*GrantDnsBindPermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[90].Exporter = func(v any, i int) any { - switch v := v.(*RevokeDnsBindPermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[91].Exporter = func(v any, i int) any { - switch v := v.(*GetDnsBindPermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_vmwareengine_v1_vmwareengine_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/vmwareengine/apiv1/vmwareenginepb/vmwareengine_resources.pb.go b/vmwareengine/apiv1/vmwareenginepb/vmwareengine_resources.pb.go index abe47484e706..7f3ae4bcf49a 100755 --- a/vmwareengine/apiv1/vmwareenginepb/vmwareengine_resources.pb.go +++ b/vmwareengine/apiv1/vmwareenginepb/vmwareengine_resources.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vmwareengine/v1/vmwareengine_resources.proto @@ -1859,11 +1859,9 @@ type NetworkConfig struct { func (x *NetworkConfig) Reset() { *x = NetworkConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkConfig) String() string { @@ -1874,7 +1872,7 @@ func (*NetworkConfig) ProtoMessage() {} func (x *NetworkConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1941,11 +1939,9 @@ type NodeTypeConfig struct { func (x *NodeTypeConfig) Reset() { *x = NodeTypeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeTypeConfig) String() string { @@ -1956,7 +1952,7 @@ func (*NodeTypeConfig) ProtoMessage() {} func (x *NodeTypeConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2007,11 +2003,9 @@ type StretchedClusterConfig struct { func (x *StretchedClusterConfig) Reset() { *x = StretchedClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StretchedClusterConfig) String() string { @@ -2022,7 +2016,7 @@ func (*StretchedClusterConfig) ProtoMessage() {} func (x *StretchedClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2101,11 +2095,9 @@ type PrivateCloud struct { func (x *PrivateCloud) Reset() { *x = PrivateCloud{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateCloud) String() string { @@ -2116,7 +2108,7 @@ func (*PrivateCloud) ProtoMessage() {} func (x *PrivateCloud) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2265,11 +2257,9 @@ type Cluster struct { func (x *Cluster) Reset() { *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Cluster) String() string { @@ -2280,7 +2270,7 @@ func (*Cluster) ProtoMessage() {} func (x *Cluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2389,11 +2379,9 @@ type Node struct { func (x *Node) Reset() { *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Node) String() string { @@ -2404,7 +2392,7 @@ func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2499,11 +2487,9 @@ type ExternalAddress struct { func (x *ExternalAddress) Reset() { *x = ExternalAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAddress) String() string { @@ -2514,7 +2500,7 @@ func (*ExternalAddress) ProtoMessage() {} func (x *ExternalAddress) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2614,11 +2600,9 @@ type Subnet struct { func (x *Subnet) Reset() { *x = Subnet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subnet) String() string { @@ -2629,7 +2613,7 @@ func (*Subnet) ProtoMessage() {} func (x *Subnet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2754,11 +2738,9 @@ type ExternalAccessRule struct { func (x *ExternalAccessRule) Reset() { *x = ExternalAccessRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAccessRule) String() string { @@ -2769,7 +2751,7 @@ func (*ExternalAccessRule) ProtoMessage() {} func (x *ExternalAccessRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2907,11 +2889,9 @@ type LoggingServer struct { func (x *LoggingServer) Reset() { *x = LoggingServer{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoggingServer) String() string { @@ -2922,7 +2902,7 @@ func (*LoggingServer) ProtoMessage() {} func (x *LoggingServer) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3033,11 +3013,9 @@ type NodeType struct { func (x *NodeType) Reset() { *x = NodeType{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeType) String() string { @@ -3048,7 +3026,7 @@ func (*NodeType) ProtoMessage() {} func (x *NodeType) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3154,11 +3132,9 @@ type Credentials struct { func (x *Credentials) Reset() { *x = Credentials{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Credentials) String() string { @@ -3169,7 +3145,7 @@ func (*Credentials) ProtoMessage() {} func (x *Credentials) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3229,11 +3205,9 @@ type HcxActivationKey struct { func (x *HcxActivationKey) Reset() { *x = HcxActivationKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HcxActivationKey) String() string { @@ -3244,7 +3218,7 @@ func (*HcxActivationKey) ProtoMessage() {} func (x *HcxActivationKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3312,11 +3286,9 @@ type Hcx struct { func (x *Hcx) Reset() { *x = Hcx{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Hcx) String() string { @@ -3327,7 +3299,7 @@ func (*Hcx) ProtoMessage() {} func (x *Hcx) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3388,11 +3360,9 @@ type Nsx struct { func (x *Nsx) Reset() { *x = Nsx{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Nsx) String() string { @@ -3403,7 +3373,7 @@ func (*Nsx) ProtoMessage() {} func (x *Nsx) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3464,11 +3434,9 @@ type Vcenter struct { func (x *Vcenter) Reset() { *x = Vcenter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Vcenter) String() string { @@ -3479,7 +3447,7 @@ func (*Vcenter) ProtoMessage() {} func (x *Vcenter) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3558,11 +3526,9 @@ type AutoscalingSettings struct { func (x *AutoscalingSettings) Reset() { *x = AutoscalingSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingSettings) String() string { @@ -3573,7 +3539,7 @@ func (*AutoscalingSettings) ProtoMessage() {} func (x *AutoscalingSettings) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3640,11 +3606,9 @@ type DnsForwarding struct { func (x *DnsForwarding) Reset() { *x = DnsForwarding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsForwarding) String() string { @@ -3655,7 +3619,7 @@ func (*DnsForwarding) ProtoMessage() {} func (x *DnsForwarding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3772,11 +3736,9 @@ type NetworkPeering struct { func (x *NetworkPeering) Reset() { *x = NetworkPeering{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPeering) String() string { @@ -3787,7 +3749,7 @@ func (*NetworkPeering) ProtoMessage() {} func (x *NetworkPeering) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3946,11 +3908,9 @@ type PeeringRoute struct { func (x *PeeringRoute) Reset() { *x = PeeringRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeeringRoute) String() string { @@ -3961,7 +3921,7 @@ func (*PeeringRoute) ProtoMessage() {} func (x *PeeringRoute) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4066,11 +4026,9 @@ type NetworkPolicy struct { func (x *NetworkPolicy) Reset() { *x = NetworkPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPolicy) String() string { @@ -4081,7 +4039,7 @@ func (*NetworkPolicy) ProtoMessage() {} func (x *NetworkPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4205,11 +4163,9 @@ type ManagementDnsZoneBinding struct { func (x *ManagementDnsZoneBinding) Reset() { *x = ManagementDnsZoneBinding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ManagementDnsZoneBinding) String() string { @@ -4220,7 +4176,7 @@ func (*ManagementDnsZoneBinding) ProtoMessage() {} func (x *ManagementDnsZoneBinding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4360,11 +4316,9 @@ type VmwareEngineNetwork struct { func (x *VmwareEngineNetwork) Reset() { *x = VmwareEngineNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareEngineNetwork) String() string { @@ -4375,7 +4329,7 @@ func (*VmwareEngineNetwork) ProtoMessage() {} func (x *VmwareEngineNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4517,11 +4471,9 @@ type PrivateConnection struct { func (x *PrivateConnection) Reset() { *x = PrivateConnection{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateConnection) String() string { @@ -4532,7 +4484,7 @@ func (*PrivateConnection) ProtoMessage() {} func (x *PrivateConnection) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4652,11 +4604,9 @@ type LocationMetadata struct { func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LocationMetadata) String() string { @@ -4667,7 +4617,7 @@ func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4711,11 +4661,9 @@ type DnsBindPermission struct { func (x *DnsBindPermission) Reset() { *x = DnsBindPermission{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsBindPermission) String() string { @@ -4726,7 +4674,7 @@ func (*DnsBindPermission) ProtoMessage() {} func (x *DnsBindPermission) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4775,11 +4723,9 @@ type Principal struct { func (x *Principal) Reset() { *x = Principal{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Principal) String() string { @@ -4790,7 +4736,7 @@ func (*Principal) ProtoMessage() {} func (x *Principal) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4870,11 +4816,9 @@ type PrivateCloud_ManagementCluster struct { func (x *PrivateCloud_ManagementCluster) Reset() { *x = PrivateCloud_ManagementCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateCloud_ManagementCluster) String() string { @@ -4885,7 +4829,7 @@ func (*PrivateCloud_ManagementCluster) ProtoMessage() {} func (x *PrivateCloud_ManagementCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4937,11 +4881,9 @@ type ExternalAccessRule_IpRange struct { func (x *ExternalAccessRule_IpRange) Reset() { *x = ExternalAccessRule_IpRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExternalAccessRule_IpRange) String() string { @@ -4952,7 +4894,7 @@ func (*ExternalAccessRule_IpRange) ProtoMessage() {} func (x *ExternalAccessRule_IpRange) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5040,11 +4982,9 @@ type AutoscalingSettings_Thresholds struct { func (x *AutoscalingSettings_Thresholds) Reset() { *x = AutoscalingSettings_Thresholds{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingSettings_Thresholds) String() string { @@ -5055,7 +4995,7 @@ func (*AutoscalingSettings_Thresholds) ProtoMessage() {} func (x *AutoscalingSettings_Thresholds) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5116,11 +5056,9 @@ type AutoscalingSettings_AutoscalingPolicy struct { func (x *AutoscalingSettings_AutoscalingPolicy) Reset() { *x = AutoscalingSettings_AutoscalingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AutoscalingSettings_AutoscalingPolicy) String() string { @@ -5131,7 +5069,7 @@ func (*AutoscalingSettings_AutoscalingPolicy) ProtoMessage() {} func (x *AutoscalingSettings_AutoscalingPolicy) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5205,11 +5143,9 @@ type DnsForwarding_ForwardingRule struct { func (x *DnsForwarding_ForwardingRule) Reset() { *x = DnsForwarding_ForwardingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DnsForwarding_ForwardingRule) String() string { @@ -5220,7 +5156,7 @@ func (*DnsForwarding_ForwardingRule) ProtoMessage() {} func (x *DnsForwarding_ForwardingRule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5268,11 +5204,9 @@ type NetworkPolicy_NetworkService struct { func (x *NetworkPolicy_NetworkService) Reset() { *x = NetworkPolicy_NetworkService{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NetworkPolicy_NetworkService) String() string { @@ -5283,7 +5217,7 @@ func (*NetworkPolicy_NetworkService) ProtoMessage() {} func (x *NetworkPolicy_NetworkService) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5330,11 +5264,9 @@ type VmwareEngineNetwork_VpcNetwork struct { func (x *VmwareEngineNetwork_VpcNetwork) Reset() { *x = VmwareEngineNetwork_VpcNetwork{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VmwareEngineNetwork_VpcNetwork) String() string { @@ -5345,7 +5277,7 @@ func (*VmwareEngineNetwork_VpcNetwork) ProtoMessage() {} func (x *VmwareEngineNetwork_VpcNetwork) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6693,416 +6625,6 @@ func file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_init() { if File_google_cloud_vmwareengine_v1_vmwareengine_resources_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NetworkConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NodeTypeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*StretchedClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*PrivateCloud); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ExternalAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Subnet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ExternalAccessRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*LoggingServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*NodeType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Credentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*HcxActivationKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Hcx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Nsx); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Vcenter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*DnsForwarding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPeering); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*PeeringRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ManagementDnsZoneBinding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*VmwareEngineNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*PrivateConnection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*LocationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*DnsBindPermission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Principal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*PrivateCloud_ManagementCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ExternalAccessRule_IpRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingSettings_Thresholds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*AutoscalingSettings_AutoscalingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*DnsForwarding_ForwardingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*NetworkPolicy_NetworkService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*VmwareEngineNetwork_VpcNetwork); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[18].OneofWrappers = []any{} file_google_cloud_vmwareengine_v1_vmwareengine_resources_proto_msgTypes[21].OneofWrappers = []any{ (*ManagementDnsZoneBinding_VpcNetwork)(nil), diff --git a/vpcaccess/apiv1/helpers.go b/vpcaccess/apiv1/helpers.go index 5c930a189604..6bc551f7ab8b 100755 --- a/vpcaccess/apiv1/helpers.go +++ b/vpcaccess/apiv1/helpers.go @@ -18,10 +18,20 @@ package vpcaccess import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "vpcaccess.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vpcaccess/apiv1/vpc_access_client.go b/vpcaccess/apiv1/vpc_access_client.go index 86864c2e1866..ec3907259505 100755 --- a/vpcaccess/apiv1/vpc_access_client.go +++ b/vpcaccess/apiv1/vpc_access_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" vpcaccesspb "cloud.google.com/go/vpcaccess/apiv1/vpcaccesspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -242,6 +241,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new vpc access service client based on gRPC. @@ -270,6 +271,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: vpcaccesspb.NewVpcAccessServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -334,6 +336,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new vpc access service rest client. @@ -353,6 +357,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -415,7 +420,7 @@ func (c *gRPCClient) CreateConnector(ctx context.Context, req *vpcaccesspb.Creat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateConnector, req, settings.GRPC, c.logger, "CreateConnector") return err }, opts...) if err != nil { @@ -435,7 +440,7 @@ func (c *gRPCClient) GetConnector(ctx context.Context, req *vpcaccesspb.GetConne var resp *vpcaccesspb.Connector err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetConnector, req, settings.GRPC, c.logger, "GetConnector") return err }, opts...) if err != nil { @@ -464,7 +469,7 @@ func (c *gRPCClient) ListConnectors(ctx context.Context, req *vpcaccesspb.ListCo } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListConnectors(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListConnectors, req, settings.GRPC, c.logger, "ListConnectors") return err }, opts...) if err != nil { @@ -499,7 +504,7 @@ func (c *gRPCClient) DeleteConnector(ctx context.Context, req *vpcaccesspb.Delet var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteConnector(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteConnector, req, settings.GRPC, c.logger, "DeleteConnector") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -565,7 +570,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -594,7 +599,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -660,21 +665,10 @@ func (c *restClient) CreateConnector(ctx context.Context, req *vpcaccesspb.Creat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateConnector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -726,17 +720,7 @@ func (c *restClient) GetConnector(ctx context.Context, req *vpcaccesspb.GetConne httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetConnector") if err != nil { return err } @@ -798,21 +782,10 @@ func (c *restClient) ListConnectors(ctx context.Context, req *vpcaccesspb.ListCo } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListConnectors") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -875,21 +848,10 @@ func (c *restClient) DeleteConnector(ctx context.Context, req *vpcaccesspb.Delet httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteConnector") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -955,21 +917,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1032,17 +983,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1107,21 +1048,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/vpcaccess/apiv1/vpc_access_client_example_go123_test.go b/vpcaccess/apiv1/vpc_access_client_example_go123_test.go index 2dceb5c16021..d968a1f8f2ea 100644 --- a/vpcaccess/apiv1/vpc_access_client_example_go123_test.go +++ b/vpcaccess/apiv1/vpc_access_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListConnectors_all() { } for resp, err := range c.ListConnectors(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/vpcaccess/apiv1/vpcaccesspb/vpc_access.pb.go b/vpcaccess/apiv1/vpcaccesspb/vpc_access.pb.go index f36ba912429b..f3e3bf803a24 100755 --- a/vpcaccess/apiv1/vpcaccesspb/vpc_access.pb.go +++ b/vpcaccess/apiv1/vpcaccesspb/vpc_access.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/vpcaccess/v1/vpc_access.proto @@ -140,11 +140,9 @@ type Connector struct { func (x *Connector) Reset() { *x = Connector{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connector) String() string { @@ -155,7 +153,7 @@ func (*Connector) ProtoMessage() {} func (x *Connector) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type CreateConnectorRequest struct { func (x *CreateConnectorRequest) Reset() { *x = CreateConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateConnectorRequest) String() string { @@ -279,7 +275,7 @@ func (*CreateConnectorRequest) ProtoMessage() {} func (x *CreateConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -327,11 +323,9 @@ type GetConnectorRequest struct { func (x *GetConnectorRequest) Reset() { *x = GetConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetConnectorRequest) String() string { @@ -342,7 +336,7 @@ func (*GetConnectorRequest) ProtoMessage() {} func (x *GetConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +374,9 @@ type ListConnectorsRequest struct { func (x *ListConnectorsRequest) Reset() { *x = ListConnectorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectorsRequest) String() string { @@ -395,7 +387,7 @@ func (*ListConnectorsRequest) ProtoMessage() {} func (x *ListConnectorsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,11 +437,9 @@ type ListConnectorsResponse struct { func (x *ListConnectorsResponse) Reset() { *x = ListConnectorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListConnectorsResponse) String() string { @@ -460,7 +450,7 @@ func (*ListConnectorsResponse) ProtoMessage() {} func (x *ListConnectorsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -501,11 +491,9 @@ type DeleteConnectorRequest struct { func (x *DeleteConnectorRequest) Reset() { *x = DeleteConnectorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteConnectorRequest) String() string { @@ -516,7 +504,7 @@ func (*DeleteConnectorRequest) ProtoMessage() {} func (x *DeleteConnectorRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +546,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -573,7 +559,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -635,11 +621,9 @@ type Connector_Subnet struct { func (x *Connector_Subnet) Reset() { *x = Connector_Subnet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Connector_Subnet) String() string { @@ -650,7 +634,7 @@ func (*Connector_Subnet) ProtoMessage() {} func (x *Connector_Subnet) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -927,104 +911,6 @@ func file_google_cloud_vpcaccess_v1_vpc_access_proto_init() { if File_google_cloud_vpcaccess_v1_vpc_access_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Connector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListConnectorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteConnectorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_vpcaccess_v1_vpc_access_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Connector_Subnet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/webrisk/apiv1/helpers.go b/webrisk/apiv1/helpers.go index d6d3c74b563e..9470bc847f0b 100755 --- a/webrisk/apiv1/helpers.go +++ b/webrisk/apiv1/helpers.go @@ -18,10 +18,20 @@ package webrisk import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "webrisk.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/webrisk/apiv1/web_risk_client.go b/webrisk/apiv1/web_risk_client.go index 1c816397417d..e7c6770de470 100755 --- a/webrisk/apiv1/web_risk_client.go +++ b/webrisk/apiv1/web_risk_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -31,7 +31,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" webriskpb "cloud.google.com/go/webrisk/apiv1/webriskpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -333,6 +332,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new web risk service client based on gRPC. @@ -360,6 +361,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: webriskpb.NewWebRiskServiceClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -423,6 +425,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new web risk service rest client. @@ -441,6 +445,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -500,7 +505,7 @@ func (c *gRPCClient) ComputeThreatListDiff(ctx context.Context, req *webriskpb.C var resp *webriskpb.ComputeThreatListDiffResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ComputeThreatListDiff(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ComputeThreatListDiff, req, settings.GRPC, c.logger, "ComputeThreatListDiff") return err }, opts...) if err != nil { @@ -515,7 +520,7 @@ func (c *gRPCClient) SearchUris(ctx context.Context, req *webriskpb.SearchUrisRe var resp *webriskpb.SearchUrisResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchUris(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchUris, req, settings.GRPC, c.logger, "SearchUris") return err }, opts...) if err != nil { @@ -530,7 +535,7 @@ func (c *gRPCClient) SearchHashes(ctx context.Context, req *webriskpb.SearchHash var resp *webriskpb.SearchHashesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SearchHashes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SearchHashes, req, settings.GRPC, c.logger, "SearchHashes") return err }, opts...) if err != nil { @@ -548,7 +553,7 @@ func (c *gRPCClient) CreateSubmission(ctx context.Context, req *webriskpb.Create var resp *webriskpb.Submission err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateSubmission(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateSubmission, req, settings.GRPC, c.logger, "CreateSubmission") return err }, opts...) if err != nil { @@ -566,7 +571,7 @@ func (c *gRPCClient) SubmitUri(ctx context.Context, req *webriskpb.SubmitUriRequ var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.SubmitUri(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.SubmitUri, req, settings.GRPC, c.logger, "SubmitUri") return err }, opts...) if err != nil { @@ -585,7 +590,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -599,7 +604,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -614,7 +619,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -643,7 +648,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -719,17 +724,7 @@ func (c *restClient) ComputeThreatListDiff(ctx context.Context, req *webriskpb.C httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ComputeThreatListDiff") if err != nil { return err } @@ -786,17 +781,7 @@ func (c *restClient) SearchUris(ctx context.Context, req *webriskpb.SearchUrisRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchUris") if err != nil { return err } @@ -855,17 +840,7 @@ func (c *restClient) SearchHashes(ctx context.Context, req *webriskpb.SearchHash httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchHashes") if err != nil { return err } @@ -928,17 +903,7 @@ func (c *restClient) CreateSubmission(ctx context.Context, req *webriskpb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSubmission") if err != nil { return err } @@ -1002,21 +967,10 @@ func (c *restClient) SubmitUri(ctx context.Context, req *webriskpb.SubmitUriRequ httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SubmitUri") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1070,15 +1024,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -1112,15 +1059,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1157,17 +1097,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1232,21 +1162,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/webrisk/apiv1/web_risk_client_example_go123_test.go b/webrisk/apiv1/web_risk_client_example_go123_test.go index 309d394d11cf..3f491a22bde0 100644 --- a/webrisk/apiv1/web_risk_client_example_go123_test.go +++ b/webrisk/apiv1/web_risk_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/webrisk/apiv1/webriskpb/webrisk.pb.go b/webrisk/apiv1/webriskpb/webrisk.pb.go index 256499e28b1a..5e272af8fab3 100755 --- a/webrisk/apiv1/webriskpb/webrisk.pb.go +++ b/webrisk/apiv1/webriskpb/webrisk.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/webrisk/v1/webrisk.proto @@ -532,11 +532,9 @@ type ComputeThreatListDiffRequest struct { func (x *ComputeThreatListDiffRequest) Reset() { *x = ComputeThreatListDiffRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffRequest) String() string { @@ -547,7 +545,7 @@ func (*ComputeThreatListDiffRequest) ProtoMessage() {} func (x *ComputeThreatListDiffRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +612,9 @@ type ComputeThreatListDiffResponse struct { func (x *ComputeThreatListDiffResponse) Reset() { *x = ComputeThreatListDiffResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffResponse) String() string { @@ -629,7 +625,7 @@ func (*ComputeThreatListDiffResponse) ProtoMessage() {} func (x *ComputeThreatListDiffResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +697,9 @@ type SearchUrisRequest struct { func (x *SearchUrisRequest) Reset() { *x = SearchUrisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisRequest) String() string { @@ -716,7 +710,7 @@ func (*SearchUrisRequest) ProtoMessage() {} func (x *SearchUrisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,11 +750,9 @@ type SearchUrisResponse struct { func (x *SearchUrisResponse) Reset() { *x = SearchUrisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisResponse) String() string { @@ -771,7 +763,7 @@ func (*SearchUrisResponse) ProtoMessage() {} func (x *SearchUrisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -811,11 +803,9 @@ type SearchHashesRequest struct { func (x *SearchHashesRequest) Reset() { *x = SearchHashesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesRequest) String() string { @@ -826,7 +816,7 @@ func (*SearchHashesRequest) ProtoMessage() {} func (x *SearchHashesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -870,11 +860,9 @@ type SearchHashesResponse struct { func (x *SearchHashesResponse) Reset() { *x = SearchHashesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesResponse) String() string { @@ -885,7 +873,7 @@ func (*SearchHashesResponse) ProtoMessage() {} func (x *SearchHashesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,11 +920,9 @@ type ThreatEntryAdditions struct { func (x *ThreatEntryAdditions) Reset() { *x = ThreatEntryAdditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatEntryAdditions) String() string { @@ -947,7 +933,7 @@ func (*ThreatEntryAdditions) ProtoMessage() {} func (x *ThreatEntryAdditions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +979,9 @@ type ThreatEntryRemovals struct { func (x *ThreatEntryRemovals) Reset() { *x = ThreatEntryRemovals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatEntryRemovals) String() string { @@ -1008,7 +992,7 @@ func (*ThreatEntryRemovals) ProtoMessage() {} func (x *ThreatEntryRemovals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,11 +1033,9 @@ type RawIndices struct { func (x *RawIndices) Reset() { *x = RawIndices{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawIndices) String() string { @@ -1064,7 +1046,7 @@ func (*RawIndices) ProtoMessage() {} func (x *RawIndices) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1111,11 +1093,9 @@ type RawHashes struct { func (x *RawHashes) Reset() { *x = RawHashes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawHashes) String() string { @@ -1126,7 +1106,7 @@ func (*RawHashes) ProtoMessage() {} func (x *RawHashes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1179,11 +1159,9 @@ type RiceDeltaEncoding struct { func (x *RiceDeltaEncoding) Reset() { *x = RiceDeltaEncoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RiceDeltaEncoding) String() string { @@ -1194,7 +1172,7 @@ func (*RiceDeltaEncoding) ProtoMessage() {} func (x *RiceDeltaEncoding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,11 +1232,9 @@ type Submission struct { func (x *Submission) Reset() { *x = Submission{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Submission) String() string { @@ -1269,7 +1245,7 @@ func (*Submission) ProtoMessage() {} func (x *Submission) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1316,11 +1292,9 @@ type ThreatInfo struct { func (x *ThreatInfo) Reset() { *x = ThreatInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatInfo) String() string { @@ -1331,7 +1305,7 @@ func (*ThreatInfo) ProtoMessage() {} func (x *ThreatInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1382,11 +1356,9 @@ type ThreatDiscovery struct { func (x *ThreatDiscovery) Reset() { *x = ThreatDiscovery{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatDiscovery) String() string { @@ -1397,7 +1369,7 @@ func (*ThreatDiscovery) ProtoMessage() {} func (x *ThreatDiscovery) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1441,11 +1413,9 @@ type CreateSubmissionRequest struct { func (x *CreateSubmissionRequest) Reset() { *x = CreateSubmissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateSubmissionRequest) String() string { @@ -1456,7 +1426,7 @@ func (*CreateSubmissionRequest) ProtoMessage() {} func (x *CreateSubmissionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1504,11 +1474,9 @@ type SubmitUriRequest struct { func (x *SubmitUriRequest) Reset() { *x = SubmitUriRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitUriRequest) String() string { @@ -1519,7 +1487,7 @@ func (*SubmitUriRequest) ProtoMessage() {} func (x *SubmitUriRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1579,11 +1547,9 @@ type SubmitUriMetadata struct { func (x *SubmitUriMetadata) Reset() { *x = SubmitUriMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubmitUriMetadata) String() string { @@ -1594,7 +1560,7 @@ func (*SubmitUriMetadata) ProtoMessage() {} func (x *SubmitUriMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1650,11 +1616,9 @@ type ComputeThreatListDiffRequest_Constraints struct { func (x *ComputeThreatListDiffRequest_Constraints) Reset() { *x = ComputeThreatListDiffRequest_Constraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffRequest_Constraints) String() string { @@ -1665,7 +1629,7 @@ func (*ComputeThreatListDiffRequest_Constraints) ProtoMessage() {} func (x *ComputeThreatListDiffRequest_Constraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1714,11 +1678,9 @@ type ComputeThreatListDiffResponse_Checksum struct { func (x *ComputeThreatListDiffResponse_Checksum) Reset() { *x = ComputeThreatListDiffResponse_Checksum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffResponse_Checksum) String() string { @@ -1729,7 +1691,7 @@ func (*ComputeThreatListDiffResponse_Checksum) ProtoMessage() {} func (x *ComputeThreatListDiffResponse_Checksum) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1766,11 +1728,9 @@ type SearchUrisResponse_ThreatUri struct { func (x *SearchUrisResponse_ThreatUri) Reset() { *x = SearchUrisResponse_ThreatUri{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisResponse_ThreatUri) String() string { @@ -1781,7 +1741,7 @@ func (*SearchUrisResponse_ThreatUri) ProtoMessage() {} func (x *SearchUrisResponse_ThreatUri) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1829,11 +1789,9 @@ type SearchHashesResponse_ThreatHash struct { func (x *SearchHashesResponse_ThreatHash) Reset() { *x = SearchHashesResponse_ThreatHash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesResponse_ThreatHash) String() string { @@ -1844,7 +1802,7 @@ func (*SearchHashesResponse_ThreatHash) ProtoMessage() {} func (x *SearchHashesResponse_ThreatHash) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1895,11 +1853,9 @@ type ThreatInfo_Confidence struct { func (x *ThreatInfo_Confidence) Reset() { *x = ThreatInfo_Confidence{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatInfo_Confidence) String() string { @@ -1910,7 +1866,7 @@ func (*ThreatInfo_Confidence) ProtoMessage() {} func (x *ThreatInfo_Confidence) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1980,11 +1936,9 @@ type ThreatInfo_ThreatJustification struct { func (x *ThreatInfo_ThreatJustification) Reset() { *x = ThreatInfo_ThreatJustification{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatInfo_ThreatJustification) String() string { @@ -1995,7 +1949,7 @@ func (*ThreatInfo_ThreatJustification) ProtoMessage() {} func (x *ThreatInfo_ThreatJustification) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2526,284 +2480,6 @@ func file_google_cloud_webrisk_v1_webrisk_proto_init() { if File_google_cloud_webrisk_v1_webrisk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ThreatEntryAdditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ThreatEntryRemovals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RawIndices); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RawHashes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RiceDeltaEncoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Submission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ThreatInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ThreatDiscovery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateSubmissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*SubmitUriRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SubmitUriMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffRequest_Constraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffResponse_Checksum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisResponse_ThreatUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesResponse_ThreatHash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ThreatInfo_Confidence); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*ThreatInfo_ThreatJustification); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_webrisk_v1_webrisk_proto_msgTypes[21].OneofWrappers = []any{ (*ThreatInfo_Confidence_Score)(nil), (*ThreatInfo_Confidence_Level)(nil), diff --git a/webrisk/apiv1beta1/helpers.go b/webrisk/apiv1beta1/helpers.go index d6d3c74b563e..9470bc847f0b 100755 --- a/webrisk/apiv1beta1/helpers.go +++ b/webrisk/apiv1beta1/helpers.go @@ -18,10 +18,20 @@ package webrisk import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "webrisk.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/webrisk/apiv1beta1/web_risk_service_v1_beta1_client.go b/webrisk/apiv1beta1/web_risk_service_v1_beta1_client.go index 7ba6ba8906a8..ef218e664325 100755 --- a/webrisk/apiv1beta1/web_risk_service_v1_beta1_client.go +++ b/webrisk/apiv1beta1/web_risk_service_v1_beta1_client.go @@ -19,7 +19,7 @@ package webrisk import ( "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -27,7 +27,6 @@ import ( webriskpb "cloud.google.com/go/webrisk/apiv1beta1/webriskpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" @@ -226,6 +225,8 @@ type webRiskServiceV1Beta1GRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewWebRiskServiceV1Beta1Client creates a new web risk service v1 beta1 client based on gRPC. @@ -253,6 +254,7 @@ func NewWebRiskServiceV1Beta1Client(ctx context.Context, opts ...option.ClientOp connPool: connPool, webRiskServiceV1Beta1Client: webriskpb.NewWebRiskServiceV1Beta1Client(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -299,6 +301,8 @@ type webRiskServiceV1Beta1RESTClient struct { // Points back to the CallOptions field of the containing WebRiskServiceV1Beta1Client CallOptions **WebRiskServiceV1Beta1CallOptions + + logger *slog.Logger } // NewWebRiskServiceV1Beta1RESTClient creates a new web risk service v1 beta1 rest client. @@ -317,6 +321,7 @@ func NewWebRiskServiceV1Beta1RESTClient(ctx context.Context, opts ...option.Clie endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -366,7 +371,7 @@ func (c *webRiskServiceV1Beta1GRPCClient) ComputeThreatListDiff(ctx context.Cont var resp *webriskpb.ComputeThreatListDiffResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webRiskServiceV1Beta1Client.ComputeThreatListDiff(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webRiskServiceV1Beta1Client.ComputeThreatListDiff, req, settings.GRPC, c.logger, "ComputeThreatListDiff") return err }, opts...) if err != nil { @@ -381,7 +386,7 @@ func (c *webRiskServiceV1Beta1GRPCClient) SearchUris(ctx context.Context, req *w var resp *webriskpb.SearchUrisResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webRiskServiceV1Beta1Client.SearchUris(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webRiskServiceV1Beta1Client.SearchUris, req, settings.GRPC, c.logger, "SearchUris") return err }, opts...) if err != nil { @@ -396,7 +401,7 @@ func (c *webRiskServiceV1Beta1GRPCClient) SearchHashes(ctx context.Context, req var resp *webriskpb.SearchHashesResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.webRiskServiceV1Beta1Client.SearchHashes(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.webRiskServiceV1Beta1Client.SearchHashes, req, settings.GRPC, c.logger, "SearchHashes") return err }, opts...) if err != nil { @@ -450,17 +455,7 @@ func (c *webRiskServiceV1Beta1RESTClient) ComputeThreatListDiff(ctx context.Cont httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ComputeThreatListDiff") if err != nil { return err } @@ -513,17 +508,7 @@ func (c *webRiskServiceV1Beta1RESTClient) SearchUris(ctx context.Context, req *w httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchUris") if err != nil { return err } @@ -582,17 +567,7 @@ func (c *webRiskServiceV1Beta1RESTClient) SearchHashes(ctx context.Context, req httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SearchHashes") if err != nil { return err } diff --git a/webrisk/apiv1beta1/webriskpb/webrisk.pb.go b/webrisk/apiv1beta1/webriskpb/webrisk.pb.go index 50fee661b757..9742a45406e4 100755 --- a/webrisk/apiv1beta1/webriskpb/webrisk.pb.go +++ b/webrisk/apiv1beta1/webriskpb/webrisk.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/webrisk/v1beta1/webrisk.proto @@ -225,11 +225,9 @@ type ComputeThreatListDiffRequest struct { func (x *ComputeThreatListDiffRequest) Reset() { *x = ComputeThreatListDiffRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffRequest) String() string { @@ -240,7 +238,7 @@ func (*ComputeThreatListDiffRequest) ProtoMessage() {} func (x *ComputeThreatListDiffRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +303,9 @@ type ComputeThreatListDiffResponse struct { func (x *ComputeThreatListDiffResponse) Reset() { *x = ComputeThreatListDiffResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffResponse) String() string { @@ -320,7 +316,7 @@ func (*ComputeThreatListDiffResponse) ProtoMessage() {} func (x *ComputeThreatListDiffResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,11 +387,9 @@ type SearchUrisRequest struct { func (x *SearchUrisRequest) Reset() { *x = SearchUrisRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisRequest) String() string { @@ -406,7 +400,7 @@ func (*SearchUrisRequest) ProtoMessage() {} func (x *SearchUrisRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,11 +440,9 @@ type SearchUrisResponse struct { func (x *SearchUrisResponse) Reset() { *x = SearchUrisResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisResponse) String() string { @@ -461,7 +453,7 @@ func (*SearchUrisResponse) ProtoMessage() {} func (x *SearchUrisResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,11 +490,9 @@ type SearchHashesRequest struct { func (x *SearchHashesRequest) Reset() { *x = SearchHashesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesRequest) String() string { @@ -513,7 +503,7 @@ func (*SearchHashesRequest) ProtoMessage() {} func (x *SearchHashesRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,11 +547,9 @@ type SearchHashesResponse struct { func (x *SearchHashesResponse) Reset() { *x = SearchHashesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesResponse) String() string { @@ -572,7 +560,7 @@ func (*SearchHashesResponse) ProtoMessage() {} func (x *SearchHashesResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,11 +607,9 @@ type ThreatEntryAdditions struct { func (x *ThreatEntryAdditions) Reset() { *x = ThreatEntryAdditions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatEntryAdditions) String() string { @@ -634,7 +620,7 @@ func (*ThreatEntryAdditions) ProtoMessage() {} func (x *ThreatEntryAdditions) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -680,11 +666,9 @@ type ThreatEntryRemovals struct { func (x *ThreatEntryRemovals) Reset() { *x = ThreatEntryRemovals{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ThreatEntryRemovals) String() string { @@ -695,7 +679,7 @@ func (*ThreatEntryRemovals) ProtoMessage() {} func (x *ThreatEntryRemovals) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,11 +720,9 @@ type RawIndices struct { func (x *RawIndices) Reset() { *x = RawIndices{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawIndices) String() string { @@ -751,7 +733,7 @@ func (*RawIndices) ProtoMessage() {} func (x *RawIndices) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +779,9 @@ type RawHashes struct { func (x *RawHashes) Reset() { *x = RawHashes{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RawHashes) String() string { @@ -812,7 +792,7 @@ func (*RawHashes) ProtoMessage() {} func (x *RawHashes) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -865,11 +845,9 @@ type RiceDeltaEncoding struct { func (x *RiceDeltaEncoding) Reset() { *x = RiceDeltaEncoding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RiceDeltaEncoding) String() string { @@ -880,7 +858,7 @@ func (*RiceDeltaEncoding) ProtoMessage() {} func (x *RiceDeltaEncoding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,11 +921,9 @@ type ComputeThreatListDiffRequest_Constraints struct { func (x *ComputeThreatListDiffRequest_Constraints) Reset() { *x = ComputeThreatListDiffRequest_Constraints{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffRequest_Constraints) String() string { @@ -958,7 +934,7 @@ func (*ComputeThreatListDiffRequest_Constraints) ProtoMessage() {} func (x *ComputeThreatListDiffRequest_Constraints) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +983,9 @@ type ComputeThreatListDiffResponse_Checksum struct { func (x *ComputeThreatListDiffResponse_Checksum) Reset() { *x = ComputeThreatListDiffResponse_Checksum{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComputeThreatListDiffResponse_Checksum) String() string { @@ -1022,7 +996,7 @@ func (*ComputeThreatListDiffResponse_Checksum) ProtoMessage() {} func (x *ComputeThreatListDiffResponse_Checksum) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,11 +1033,9 @@ type SearchUrisResponse_ThreatUri struct { func (x *SearchUrisResponse_ThreatUri) Reset() { *x = SearchUrisResponse_ThreatUri{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchUrisResponse_ThreatUri) String() string { @@ -1074,7 +1046,7 @@ func (*SearchUrisResponse_ThreatUri) ProtoMessage() {} func (x *SearchUrisResponse_ThreatUri) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1122,11 +1094,9 @@ type SearchHashesResponse_ThreatHash struct { func (x *SearchHashesResponse_ThreatHash) Reset() { *x = SearchHashesResponse_ThreatHash{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchHashesResponse_ThreatHash) String() string { @@ -1137,7 +1107,7 @@ func (*SearchHashesResponse_ThreatHash) ProtoMessage() {} func (x *SearchHashesResponse_ThreatHash) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1497,188 +1467,6 @@ func file_google_cloud_webrisk_v1beta1_webrisk_proto_init() { if File_google_cloud_webrisk_v1beta1_webrisk_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ThreatEntryAdditions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ThreatEntryRemovals); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*RawIndices); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*RawHashes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*RiceDeltaEncoding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffRequest_Constraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ComputeThreatListDiffResponse_Checksum); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*SearchUrisResponse_ThreatUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_webrisk_v1beta1_webrisk_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*SearchHashesResponse_ThreatHash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/helpers.go b/websecurityscanner/apiv1/helpers.go index d2134f5dc5a9..252ef6f2f5ab 100755 --- a/websecurityscanner/apiv1/helpers.go +++ b/websecurityscanner/apiv1/helpers.go @@ -18,10 +18,20 @@ package websecurityscanner import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "websecurityscanner.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/websecurityscanner/apiv1/web_security_scanner_client.go b/websecurityscanner/apiv1/web_security_scanner_client.go index e40f9e2756d7..4c0186e55a91 100755 --- a/websecurityscanner/apiv1/web_security_scanner_client.go +++ b/websecurityscanner/apiv1/web_security_scanner_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( websecurityscannerpb "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -471,6 +470,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new web security scanner client based on gRPC. @@ -499,6 +500,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: websecurityscannerpb.NewWebSecurityScannerClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -545,6 +547,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new web security scanner rest client. @@ -564,6 +568,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -616,7 +621,7 @@ func (c *gRPCClient) CreateScanConfig(ctx context.Context, req *websecurityscann var resp *websecurityscannerpb.ScanConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateScanConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateScanConfig, req, settings.GRPC, c.logger, "CreateScanConfig") return err }, opts...) if err != nil { @@ -633,7 +638,7 @@ func (c *gRPCClient) DeleteScanConfig(ctx context.Context, req *websecurityscann opts = append((*c.CallOptions).DeleteScanConfig[0:len((*c.CallOptions).DeleteScanConfig):len((*c.CallOptions).DeleteScanConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.client.DeleteScanConfig(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.client.DeleteScanConfig, req, settings.GRPC, c.logger, "DeleteScanConfig") return err }, opts...) return err @@ -648,7 +653,7 @@ func (c *gRPCClient) GetScanConfig(ctx context.Context, req *websecurityscannerp var resp *websecurityscannerpb.ScanConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetScanConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetScanConfig, req, settings.GRPC, c.logger, "GetScanConfig") return err }, opts...) if err != nil { @@ -677,7 +682,7 @@ func (c *gRPCClient) ListScanConfigs(ctx context.Context, req *websecurityscanne } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListScanConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListScanConfigs, req, settings.GRPC, c.logger, "ListScanConfigs") return err }, opts...) if err != nil { @@ -712,7 +717,7 @@ func (c *gRPCClient) UpdateScanConfig(ctx context.Context, req *websecurityscann var resp *websecurityscannerpb.ScanConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateScanConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateScanConfig, req, settings.GRPC, c.logger, "UpdateScanConfig") return err }, opts...) if err != nil { @@ -730,7 +735,7 @@ func (c *gRPCClient) StartScanRun(ctx context.Context, req *websecurityscannerpb var resp *websecurityscannerpb.ScanRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartScanRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartScanRun, req, settings.GRPC, c.logger, "StartScanRun") return err }, opts...) if err != nil { @@ -748,7 +753,7 @@ func (c *gRPCClient) GetScanRun(ctx context.Context, req *websecurityscannerpb.G var resp *websecurityscannerpb.ScanRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetScanRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetScanRun, req, settings.GRPC, c.logger, "GetScanRun") return err }, opts...) if err != nil { @@ -777,7 +782,7 @@ func (c *gRPCClient) ListScanRuns(ctx context.Context, req *websecurityscannerpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListScanRuns(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListScanRuns, req, settings.GRPC, c.logger, "ListScanRuns") return err }, opts...) if err != nil { @@ -812,7 +817,7 @@ func (c *gRPCClient) StopScanRun(ctx context.Context, req *websecurityscannerpb. var resp *websecurityscannerpb.ScanRun err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopScanRun(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopScanRun, req, settings.GRPC, c.logger, "StopScanRun") return err }, opts...) if err != nil { @@ -841,7 +846,7 @@ func (c *gRPCClient) ListCrawledUrls(ctx context.Context, req *websecurityscanne } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListCrawledUrls(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListCrawledUrls, req, settings.GRPC, c.logger, "ListCrawledUrls") return err }, opts...) if err != nil { @@ -876,7 +881,7 @@ func (c *gRPCClient) GetFinding(ctx context.Context, req *websecurityscannerpb.G var resp *websecurityscannerpb.Finding err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetFinding(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetFinding, req, settings.GRPC, c.logger, "GetFinding") return err }, opts...) if err != nil { @@ -905,7 +910,7 @@ func (c *gRPCClient) ListFindings(ctx context.Context, req *websecurityscannerpb } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindings(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindings, req, settings.GRPC, c.logger, "ListFindings") return err }, opts...) if err != nil { @@ -940,7 +945,7 @@ func (c *gRPCClient) ListFindingTypeStats(ctx context.Context, req *websecuritys var resp *websecurityscannerpb.ListFindingTypeStatsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListFindingTypeStats(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListFindingTypeStats, req, settings.GRPC, c.logger, "ListFindingTypeStats") return err }, opts...) if err != nil { @@ -989,17 +994,7 @@ func (c *restClient) CreateScanConfig(ctx context.Context, req *websecurityscann httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateScanConfig") if err != nil { return err } @@ -1046,15 +1041,8 @@ func (c *restClient) DeleteScanConfig(ctx context.Context, req *websecurityscann httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteScanConfig") + return err }, opts...) } @@ -1091,17 +1079,7 @@ func (c *restClient) GetScanConfig(ctx context.Context, req *websecurityscannerp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetScanConfig") if err != nil { return err } @@ -1163,21 +1141,10 @@ func (c *restClient) ListScanConfigs(ctx context.Context, req *websecurityscanne } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListScanConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1254,17 +1221,7 @@ func (c *restClient) UpdateScanConfig(ctx context.Context, req *websecurityscann httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateScanConfig") if err != nil { return err } @@ -1320,17 +1277,7 @@ func (c *restClient) StartScanRun(ctx context.Context, req *websecurityscannerpb httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartScanRun") if err != nil { return err } @@ -1380,17 +1327,7 @@ func (c *restClient) GetScanRun(ctx context.Context, req *websecurityscannerpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetScanRun") if err != nil { return err } @@ -1453,21 +1390,10 @@ func (c *restClient) ListScanRuns(ctx context.Context, req *websecurityscannerpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListScanRuns") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1536,17 +1462,7 @@ func (c *restClient) StopScanRun(ctx context.Context, req *websecurityscannerpb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopScanRun") if err != nil { return err } @@ -1608,21 +1524,10 @@ func (c *restClient) ListCrawledUrls(ctx context.Context, req *websecurityscanne } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCrawledUrls") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1685,17 +1590,7 @@ func (c *restClient) GetFinding(ctx context.Context, req *websecurityscannerpb.G httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetFinding") if err != nil { return err } @@ -1760,21 +1655,10 @@ func (c *restClient) ListFindings(ctx context.Context, req *websecurityscannerpb } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindings") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1837,17 +1721,7 @@ func (c *restClient) ListFindingTypeStats(ctx context.Context, req *websecuritys httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListFindingTypeStats") if err != nil { return err } diff --git a/websecurityscanner/apiv1/web_security_scanner_client_example_go123_test.go b/websecurityscanner/apiv1/web_security_scanner_client_example_go123_test.go index 8330afc588c3..2dc6def9c1d7 100644 --- a/websecurityscanner/apiv1/web_security_scanner_client_example_go123_test.go +++ b/websecurityscanner/apiv1/web_security_scanner_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListCrawledUrls_all() { } for resp, err := range c.ListCrawledUrls(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -70,7 +70,7 @@ func ExampleClient_ListFindings_all() { } for resp, err := range c.ListFindings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -96,7 +96,7 @@ func ExampleClient_ListScanConfigs_all() { } for resp, err := range c.ListScanConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -122,7 +122,7 @@ func ExampleClient_ListScanRuns_all() { } for resp, err := range c.ListScanRuns(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/websecurityscanner/apiv1/websecurityscannerpb/crawled_url.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/crawled_url.pb.go index 1da5931fd376..66d7b01f0766 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/crawled_url.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/crawled_url.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/crawled_url.proto @@ -54,11 +54,9 @@ type CrawledUrl struct { func (x *CrawledUrl) Reset() { *x = CrawledUrl{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_crawled_url_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_crawled_url_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CrawledUrl) String() string { @@ -69,7 +67,7 @@ func (*CrawledUrl) ProtoMessage() {} func (x *CrawledUrl) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_crawled_url_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -167,20 +165,6 @@ func file_google_cloud_websecurityscanner_v1_crawled_url_proto_init() { if File_google_cloud_websecurityscanner_v1_crawled_url_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_crawled_url_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CrawledUrl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/finding.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/finding.pb.go index 2dffe052fc72..972b9c87747d 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/finding.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/finding.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/finding.proto @@ -156,11 +156,9 @@ type Finding struct { func (x *Finding) Reset() { *x = Finding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finding) String() string { @@ -171,7 +169,7 @@ func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,20 +468,6 @@ func file_google_cloud_websecurityscanner_v1_finding_proto_init() { return } file_google_cloud_websecurityscanner_v1_finding_addon_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_finding_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Finding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/finding_addon.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/finding_addon.pb.go index 00eab1c3ca4b..fd2f30765688 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/finding_addon.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/finding_addon.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/finding_addon.proto @@ -204,11 +204,9 @@ type Form struct { func (x *Form) Reset() { *x = Form{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Form) String() string { @@ -219,7 +217,7 @@ func (*Form) ProtoMessage() {} func (x *Form) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -264,11 +262,9 @@ type OutdatedLibrary struct { func (x *OutdatedLibrary) Reset() { *x = OutdatedLibrary{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OutdatedLibrary) String() string { @@ -279,7 +275,7 @@ func (*OutdatedLibrary) ProtoMessage() {} func (x *OutdatedLibrary) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +326,9 @@ type ViolatingResource struct { func (x *ViolatingResource) Reset() { *x = ViolatingResource{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ViolatingResource) String() string { @@ -345,7 +339,7 @@ func (*ViolatingResource) ProtoMessage() {} func (x *ViolatingResource) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +380,9 @@ type VulnerableParameters struct { func (x *VulnerableParameters) Reset() { *x = VulnerableParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerableParameters) String() string { @@ -401,7 +393,7 @@ func (*VulnerableParameters) ProtoMessage() {} func (x *VulnerableParameters) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -437,11 +429,9 @@ type VulnerableHeaders struct { func (x *VulnerableHeaders) Reset() { *x = VulnerableHeaders{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerableHeaders) String() string { @@ -452,7 +442,7 @@ func (*VulnerableHeaders) ProtoMessage() {} func (x *VulnerableHeaders) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -499,11 +489,9 @@ type Xss struct { func (x *Xss) Reset() { *x = Xss{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Xss) String() string { @@ -514,7 +502,7 @@ func (*Xss) ProtoMessage() {} func (x *Xss) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -572,11 +560,9 @@ type Xxe struct { func (x *Xxe) Reset() { *x = Xxe{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Xxe) String() string { @@ -587,7 +573,7 @@ func (*Xxe) ProtoMessage() {} func (x *Xxe) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -630,11 +616,9 @@ type VulnerableHeaders_Header struct { func (x *VulnerableHeaders_Header) Reset() { *x = VulnerableHeaders_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *VulnerableHeaders_Header) String() string { @@ -645,7 +629,7 @@ func (*VulnerableHeaders_Header) ProtoMessage() {} func (x *VulnerableHeaders_Header) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -830,104 +814,6 @@ func file_google_cloud_websecurityscanner_v1_finding_addon_proto_init() { if File_google_cloud_websecurityscanner_v1_finding_addon_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Form); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*OutdatedLibrary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ViolatingResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VulnerableParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*VulnerableHeaders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Xss); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Xxe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_finding_addon_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*VulnerableHeaders_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/finding_type_stats.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/finding_type_stats.pb.go index 06b205839fd4..a26d8b05c97f 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/finding_type_stats.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/finding_type_stats.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/finding_type_stats.proto @@ -50,11 +50,9 @@ type FindingTypeStats struct { func (x *FindingTypeStats) Reset() { *x = FindingTypeStats{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FindingTypeStats) String() string { @@ -65,7 +63,7 @@ func (*FindingTypeStats) ProtoMessage() {} func (x *FindingTypeStats) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,20 +156,6 @@ func file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_init() { if File_google_cloud_websecurityscanner_v1_finding_type_stats_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FindingTypeStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_config.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_config.pb.go index 0b79e38c473c..fd5dde8327a6 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_config.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_config.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_config.proto @@ -249,11 +249,9 @@ type ScanConfig struct { func (x *ScanConfig) Reset() { *x = ScanConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig) String() string { @@ -264,7 +262,7 @@ func (*ScanConfig) ProtoMessage() {} func (x *ScanConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +387,9 @@ type ScanConfig_Authentication struct { func (x *ScanConfig_Authentication) Reset() { *x = ScanConfig_Authentication{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Authentication) String() string { @@ -404,7 +400,7 @@ func (*ScanConfig_Authentication) ProtoMessage() {} func (x *ScanConfig_Authentication) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +488,9 @@ type ScanConfig_Schedule struct { func (x *ScanConfig_Schedule) Reset() { *x = ScanConfig_Schedule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Schedule) String() string { @@ -507,7 +501,7 @@ func (*ScanConfig_Schedule) ProtoMessage() {} func (x *ScanConfig_Schedule) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +547,9 @@ type ScanConfig_Authentication_GoogleAccount struct { func (x *ScanConfig_Authentication_GoogleAccount) Reset() { *x = ScanConfig_Authentication_GoogleAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Authentication_GoogleAccount) String() string { @@ -568,7 +560,7 @@ func (*ScanConfig_Authentication_GoogleAccount) ProtoMessage() {} func (x *ScanConfig_Authentication_GoogleAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -614,11 +606,9 @@ type ScanConfig_Authentication_CustomAccount struct { func (x *ScanConfig_Authentication_CustomAccount) Reset() { *x = ScanConfig_Authentication_CustomAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Authentication_CustomAccount) String() string { @@ -629,7 +619,7 @@ func (*ScanConfig_Authentication_CustomAccount) ProtoMessage() {} func (x *ScanConfig_Authentication_CustomAccount) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +671,9 @@ type ScanConfig_Authentication_IapCredential struct { func (x *ScanConfig_Authentication_IapCredential) Reset() { *x = ScanConfig_Authentication_IapCredential{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Authentication_IapCredential) String() string { @@ -696,7 +684,7 @@ func (*ScanConfig_Authentication_IapCredential) ProtoMessage() {} func (x *ScanConfig_Authentication_IapCredential) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +740,9 @@ type ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo struct { func (x *ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo) Reset() { *x = ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo) String() string { @@ -767,7 +753,7 @@ func (*ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo) ProtoM func (x *ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1003,92 +989,6 @@ func file_google_cloud_websecurityscanner_v1_scan_config_proto_init() { if File_google_cloud_websecurityscanner_v1_scan_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Authentication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Schedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Authentication_GoogleAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Authentication_CustomAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Authentication_IapCredential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfig_Authentication_IapCredential_IapTestServiceAccountInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_websecurityscanner_v1_scan_config_proto_msgTypes[1].OneofWrappers = []any{ (*ScanConfig_Authentication_GoogleAccount_)(nil), (*ScanConfig_Authentication_CustomAccount_)(nil), diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_config_error.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_config_error.pb.go index 493d35e61a3d..6cbf202c4121 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_config_error.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_config_error.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_config_error.proto @@ -282,11 +282,9 @@ type ScanConfigError struct { func (x *ScanConfigError) Reset() { *x = ScanConfigError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_config_error_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_config_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanConfigError) String() string { @@ -297,7 +295,7 @@ func (*ScanConfigError) ProtoMessage() {} func (x *ScanConfigError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_config_error_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,20 +481,6 @@ func file_google_cloud_websecurityscanner_v1_scan_config_error_proto_init() { if File_google_cloud_websecurityscanner_v1_scan_config_error_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_config_error_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanConfigError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_run.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_run.pb.go index 439dcef99cf1..543306c7b642 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_run.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_run.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_run.proto @@ -197,11 +197,9 @@ type ScanRun struct { func (x *ScanRun) Reset() { *x = ScanRun{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanRun) String() string { @@ -212,7 +210,7 @@ func (*ScanRun) ProtoMessage() {} func (x *ScanRun) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,20 +438,6 @@ func file_google_cloud_websecurityscanner_v1_scan_run_proto_init() { } file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_init() file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_run_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_error_trace.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_error_trace.pb.go index 95a405dff010..8d68a628c16b 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_error_trace.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_error_trace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_run_error_trace.proto @@ -132,11 +132,9 @@ type ScanRunErrorTrace struct { func (x *ScanRunErrorTrace) Reset() { *x = ScanRunErrorTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanRunErrorTrace) String() string { @@ -147,7 +145,7 @@ func (*ScanRunErrorTrace) ProtoMessage() {} func (x *ScanRunErrorTrace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,20 +277,6 @@ func file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_init() { return } file_google_cloud_websecurityscanner_v1_scan_config_error_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanRunErrorTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_log.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_log.pb.go index 1682f19e042a..53f893be19bc 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_log.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_log.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_run_log.proto @@ -61,11 +61,9 @@ type ScanRunLog struct { func (x *ScanRunLog) Reset() { *x = ScanRunLog{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_run_log_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_run_log_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanRunLog) String() string { @@ -76,7 +74,7 @@ func (*ScanRunLog) ProtoMessage() {} func (x *ScanRunLog) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_run_log_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,20 +246,6 @@ func file_google_cloud_websecurityscanner_v1_scan_run_log_proto_init() { } file_google_cloud_websecurityscanner_v1_scan_run_proto_init() file_google_cloud_websecurityscanner_v1_scan_run_error_trace_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_run_log_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanRunLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_warning_trace.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_warning_trace.pb.go index 960ec7a1933e..9c91f23db44c 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/scan_run_warning_trace.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/scan_run_warning_trace.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto @@ -121,11 +121,9 @@ type ScanRunWarningTrace struct { func (x *ScanRunWarningTrace) Reset() { *x = ScanRunWarningTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScanRunWarningTrace) String() string { @@ -136,7 +134,7 @@ func (*ScanRunWarningTrace) ProtoMessage() {} func (x *ScanRunWarningTrace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,20 +235,6 @@ func file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_init() if File_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_scan_run_warning_trace_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ScanRunWarningTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/websecurityscanner/apiv1/websecurityscannerpb/web_security_scanner.pb.go b/websecurityscanner/apiv1/websecurityscannerpb/web_security_scanner.pb.go index 25a594ea8d9f..2186c7830890 100755 --- a/websecurityscanner/apiv1/websecurityscannerpb/web_security_scanner.pb.go +++ b/websecurityscanner/apiv1/websecurityscannerpb/web_security_scanner.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/websecurityscanner/v1/web_security_scanner.proto @@ -57,11 +57,9 @@ type CreateScanConfigRequest struct { func (x *CreateScanConfigRequest) Reset() { *x = CreateScanConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateScanConfigRequest) String() string { @@ -72,7 +70,7 @@ func (*CreateScanConfigRequest) ProtoMessage() {} func (x *CreateScanConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -114,11 +112,9 @@ type DeleteScanConfigRequest struct { func (x *DeleteScanConfigRequest) Reset() { *x = DeleteScanConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteScanConfigRequest) String() string { @@ -129,7 +125,7 @@ func (*DeleteScanConfigRequest) ProtoMessage() {} func (x *DeleteScanConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +160,9 @@ type GetScanConfigRequest struct { func (x *GetScanConfigRequest) Reset() { *x = GetScanConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScanConfigRequest) String() string { @@ -179,7 +173,7 @@ func (*GetScanConfigRequest) ProtoMessage() {} func (x *GetScanConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +216,9 @@ type ListScanConfigsRequest struct { func (x *ListScanConfigsRequest) Reset() { *x = ListScanConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListScanConfigsRequest) String() string { @@ -237,7 +229,7 @@ func (*ListScanConfigsRequest) ProtoMessage() {} func (x *ListScanConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -291,11 +283,9 @@ type UpdateScanConfigRequest struct { func (x *UpdateScanConfigRequest) Reset() { *x = UpdateScanConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateScanConfigRequest) String() string { @@ -306,7 +296,7 @@ func (*UpdateScanConfigRequest) ProtoMessage() {} func (x *UpdateScanConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +340,9 @@ type ListScanConfigsResponse struct { func (x *ListScanConfigsResponse) Reset() { *x = ListScanConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListScanConfigsResponse) String() string { @@ -365,7 +353,7 @@ func (*ListScanConfigsResponse) ProtoMessage() {} func (x *ListScanConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,11 +395,9 @@ type StartScanRunRequest struct { func (x *StartScanRunRequest) Reset() { *x = StartScanRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartScanRunRequest) String() string { @@ -422,7 +408,7 @@ func (*StartScanRunRequest) ProtoMessage() {} func (x *StartScanRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,11 +444,9 @@ type GetScanRunRequest struct { func (x *GetScanRunRequest) Reset() { *x = GetScanRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetScanRunRequest) String() string { @@ -473,7 +457,7 @@ func (*GetScanRunRequest) ProtoMessage() {} func (x *GetScanRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,11 +500,9 @@ type ListScanRunsRequest struct { func (x *ListScanRunsRequest) Reset() { *x = ListScanRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListScanRunsRequest) String() string { @@ -531,7 +513,7 @@ func (*ListScanRunsRequest) ProtoMessage() {} func (x *ListScanRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -582,11 +564,9 @@ type ListScanRunsResponse struct { func (x *ListScanRunsResponse) Reset() { *x = ListScanRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListScanRunsResponse) String() string { @@ -597,7 +577,7 @@ func (*ListScanRunsResponse) ProtoMessage() {} func (x *ListScanRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -640,11 +620,9 @@ type StopScanRunRequest struct { func (x *StopScanRunRequest) Reset() { *x = StopScanRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopScanRunRequest) String() string { @@ -655,7 +633,7 @@ func (*StopScanRunRequest) ProtoMessage() {} func (x *StopScanRunRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +677,9 @@ type ListCrawledUrlsRequest struct { func (x *ListCrawledUrlsRequest) Reset() { *x = ListCrawledUrlsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCrawledUrlsRequest) String() string { @@ -714,7 +690,7 @@ func (*ListCrawledUrlsRequest) ProtoMessage() {} func (x *ListCrawledUrlsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +741,9 @@ type ListCrawledUrlsResponse struct { func (x *ListCrawledUrlsResponse) Reset() { *x = ListCrawledUrlsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListCrawledUrlsResponse) String() string { @@ -780,7 +754,7 @@ func (*ListCrawledUrlsResponse) ProtoMessage() {} func (x *ListCrawledUrlsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,11 +797,9 @@ type GetFindingRequest struct { func (x *GetFindingRequest) Reset() { *x = GetFindingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFindingRequest) String() string { @@ -838,7 +810,7 @@ func (*GetFindingRequest) ProtoMessage() {} func (x *GetFindingRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,11 +859,9 @@ type ListFindingsRequest struct { func (x *ListFindingsRequest) Reset() { *x = ListFindingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsRequest) String() string { @@ -902,7 +872,7 @@ func (*ListFindingsRequest) ProtoMessage() {} func (x *ListFindingsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,11 +930,9 @@ type ListFindingsResponse struct { func (x *ListFindingsResponse) Reset() { *x = ListFindingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingsResponse) String() string { @@ -975,7 +943,7 @@ func (*ListFindingsResponse) ProtoMessage() {} func (x *ListFindingsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,11 +986,9 @@ type ListFindingTypeStatsRequest struct { func (x *ListFindingTypeStatsRequest) Reset() { *x = ListFindingTypeStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingTypeStatsRequest) String() string { @@ -1033,7 +999,7 @@ func (*ListFindingTypeStatsRequest) ProtoMessage() {} func (x *ListFindingTypeStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1067,11 +1033,9 @@ type ListFindingTypeStatsResponse struct { func (x *ListFindingTypeStatsResponse) Reset() { *x = ListFindingTypeStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListFindingTypeStatsResponse) String() string { @@ -1082,7 +1046,7 @@ func (*ListFindingTypeStatsResponse) ProtoMessage() {} func (x *ListFindingTypeStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1520,224 +1484,6 @@ func file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_init() { file_google_cloud_websecurityscanner_v1_finding_type_stats_proto_init() file_google_cloud_websecurityscanner_v1_scan_config_proto_init() file_google_cloud_websecurityscanner_v1_scan_run_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateScanConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DeleteScanConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetScanConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListScanConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*UpdateScanConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListScanConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*StartScanRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetScanRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ListScanRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ListScanRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*StopScanRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListCrawledUrlsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListCrawledUrlsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetFindingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingTypeStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_websecurityscanner_v1_web_security_scanner_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*ListFindingTypeStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/workflows/apiv1/helpers.go b/workflows/apiv1/helpers.go index e179c12d2dfa..35a8846f05a7 100755 --- a/workflows/apiv1/helpers.go +++ b/workflows/apiv1/helpers.go @@ -18,10 +18,20 @@ package workflows import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workflows.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workflows/apiv1/workflows_client.go b/workflows/apiv1/workflows_client.go index ef6837f8bca2..26cd9d0b6520 100755 --- a/workflows/apiv1/workflows_client.go +++ b/workflows/apiv1/workflows_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" workflowspb "cloud.google.com/go/workflows/apiv1/workflowspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -266,6 +265,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new workflows client based on gRPC. @@ -294,6 +295,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: workflowspb.NewWorkflowsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } @@ -358,6 +360,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new workflows rest client. @@ -377,6 +381,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -450,7 +455,7 @@ func (c *gRPCClient) ListWorkflows(ctx context.Context, req *workflowspb.ListWor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkflows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkflows, req, settings.GRPC, c.logger, "ListWorkflows") return err }, opts...) if err != nil { @@ -485,7 +490,7 @@ func (c *gRPCClient) GetWorkflow(ctx context.Context, req *workflowspb.GetWorkfl var resp *workflowspb.Workflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkflow, req, settings.GRPC, c.logger, "GetWorkflow") return err }, opts...) if err != nil { @@ -503,7 +508,7 @@ func (c *gRPCClient) CreateWorkflow(ctx context.Context, req *workflowspb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkflow, req, settings.GRPC, c.logger, "CreateWorkflow") return err }, opts...) if err != nil { @@ -523,7 +528,7 @@ func (c *gRPCClient) DeleteWorkflow(ctx context.Context, req *workflowspb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkflow, req, settings.GRPC, c.logger, "DeleteWorkflow") return err }, opts...) if err != nil { @@ -543,7 +548,7 @@ func (c *gRPCClient) UpdateWorkflow(ctx context.Context, req *workflowspb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkflow, req, settings.GRPC, c.logger, "UpdateWorkflow") return err }, opts...) if err != nil { @@ -563,7 +568,7 @@ func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio var resp *locationpb.Location err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") return err }, opts...) if err != nil { @@ -592,7 +597,7 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") return err }, opts...) if err != nil { @@ -626,7 +631,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -641,7 +646,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -670,7 +675,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -748,21 +753,10 @@ func (c *restClient) ListWorkflows(ctx context.Context, req *workflowspb.ListWor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflows") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -828,17 +822,7 @@ func (c *restClient) GetWorkflow(ctx context.Context, req *workflowspb.GetWorkfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflow") if err != nil { return err } @@ -897,21 +881,10 @@ func (c *restClient) CreateWorkflow(ctx context.Context, req *workflowspb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -963,21 +936,10 @@ func (c *restClient) DeleteWorkflow(ctx context.Context, req *workflowspb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1045,21 +1007,10 @@ func (c *restClient) UpdateWorkflow(ctx context.Context, req *workflowspb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkflow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1110,17 +1061,7 @@ func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocatio httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") if err != nil { return err } @@ -1185,21 +1126,10 @@ func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLoca } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1259,15 +1189,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -1304,17 +1227,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -1379,21 +1292,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/workflows/apiv1/workflows_client_example_go123_test.go b/workflows/apiv1/workflows_client_example_go123_test.go index 17b9cd0812c2..d2fc064cbd95 100644 --- a/workflows/apiv1/workflows_client_example_go123_test.go +++ b/workflows/apiv1/workflows_client_example_go123_test.go @@ -46,7 +46,7 @@ func ExampleClient_ListWorkflows_all() { } for resp, err := range c.ListWorkflows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -72,7 +72,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -98,7 +98,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workflows/apiv1/workflowspb/workflows.pb.go b/workflows/apiv1/workflowspb/workflows.pb.go index 6069321cd21a..0ec46fb66eef 100755 --- a/workflows/apiv1/workflowspb/workflows.pb.go +++ b/workflows/apiv1/workflowspb/workflows.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workflows/v1/workflows.proto @@ -295,11 +295,9 @@ type Workflow struct { func (x *Workflow) Reset() { *x = Workflow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workflow) String() string { @@ -310,7 +308,7 @@ func (*Workflow) ProtoMessage() {} func (x *Workflow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -474,11 +472,9 @@ type ListWorkflowsRequest struct { func (x *ListWorkflowsRequest) Reset() { *x = ListWorkflowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowsRequest) String() string { @@ -489,7 +485,7 @@ func (*ListWorkflowsRequest) ProtoMessage() {} func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,11 +554,9 @@ type ListWorkflowsResponse struct { func (x *ListWorkflowsResponse) Reset() { *x = ListWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowsResponse) String() string { @@ -573,7 +567,7 @@ func (*ListWorkflowsResponse) ProtoMessage() {} func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +623,9 @@ type GetWorkflowRequest struct { func (x *GetWorkflowRequest) Reset() { *x = GetWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowRequest) String() string { @@ -644,7 +636,7 @@ func (*GetWorkflowRequest) ProtoMessage() {} func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -699,11 +691,9 @@ type CreateWorkflowRequest struct { func (x *CreateWorkflowRequest) Reset() { *x = CreateWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowRequest) String() string { @@ -714,7 +704,7 @@ func (*CreateWorkflowRequest) ProtoMessage() {} func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -765,11 +755,9 @@ type DeleteWorkflowRequest struct { func (x *DeleteWorkflowRequest) Reset() { *x = DeleteWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowRequest) String() string { @@ -780,7 +768,7 @@ func (*DeleteWorkflowRequest) ProtoMessage() {} func (x *DeleteWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -819,11 +807,9 @@ type UpdateWorkflowRequest struct { func (x *UpdateWorkflowRequest) Reset() { *x = UpdateWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkflowRequest) String() string { @@ -834,7 +820,7 @@ func (*UpdateWorkflowRequest) ProtoMessage() {} func (x *UpdateWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -883,11 +869,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -898,7 +882,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -962,11 +946,9 @@ type Workflow_StateError struct { func (x *Workflow_StateError) Reset() { *x = Workflow_StateError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workflow_StateError) String() string { @@ -977,7 +959,7 @@ func (*Workflow_StateError) ProtoMessage() {} func (x *Workflow_StateError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1_workflows_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,116 +1332,6 @@ func file_google_cloud_workflows_v1_workflows_proto_init() { if File_google_cloud_workflows_v1_workflows_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workflows_v1_workflows_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Workflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1_workflows_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Workflow_StateError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_workflows_v1_workflows_proto_msgTypes[0].OneofWrappers = []any{ (*Workflow_SourceContents)(nil), } diff --git a/workflows/apiv1beta/helpers.go b/workflows/apiv1beta/helpers.go index e179c12d2dfa..35a8846f05a7 100755 --- a/workflows/apiv1beta/helpers.go +++ b/workflows/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package workflows import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workflows.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workflows/apiv1beta/workflows_client.go b/workflows/apiv1beta/workflows_client.go index 135f06dd303e..d7ede3549970 100755 --- a/workflows/apiv1beta/workflows_client.go +++ b/workflows/apiv1beta/workflows_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -30,7 +30,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" workflowspb "cloud.google.com/go/workflows/apiv1beta/workflowspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -216,6 +215,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new workflows client based on gRPC. @@ -244,6 +245,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: workflowspb.NewWorkflowsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -306,6 +308,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new workflows rest client. @@ -325,6 +329,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -398,7 +403,7 @@ func (c *gRPCClient) ListWorkflows(ctx context.Context, req *workflowspb.ListWor } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkflows(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkflows, req, settings.GRPC, c.logger, "ListWorkflows") return err }, opts...) if err != nil { @@ -433,7 +438,7 @@ func (c *gRPCClient) GetWorkflow(ctx context.Context, req *workflowspb.GetWorkfl var resp *workflowspb.Workflow err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkflow, req, settings.GRPC, c.logger, "GetWorkflow") return err }, opts...) if err != nil { @@ -451,7 +456,7 @@ func (c *gRPCClient) CreateWorkflow(ctx context.Context, req *workflowspb.Create var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkflow, req, settings.GRPC, c.logger, "CreateWorkflow") return err }, opts...) if err != nil { @@ -471,7 +476,7 @@ func (c *gRPCClient) DeleteWorkflow(ctx context.Context, req *workflowspb.Delete var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkflow, req, settings.GRPC, c.logger, "DeleteWorkflow") return err }, opts...) if err != nil { @@ -491,7 +496,7 @@ func (c *gRPCClient) UpdateWorkflow(ctx context.Context, req *workflowspb.Update var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkflow(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkflow, req, settings.GRPC, c.logger, "UpdateWorkflow") return err }, opts...) if err != nil { @@ -554,21 +559,10 @@ func (c *restClient) ListWorkflows(ctx context.Context, req *workflowspb.ListWor } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkflows") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -631,17 +625,7 @@ func (c *restClient) GetWorkflow(ctx context.Context, req *workflowspb.GetWorkfl httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkflow") if err != nil { return err } @@ -700,21 +684,10 @@ func (c *restClient) CreateWorkflow(ctx context.Context, req *workflowspb.Create httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkflow") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -766,21 +739,10 @@ func (c *restClient) DeleteWorkflow(ctx context.Context, req *workflowspb.Delete httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkflow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -848,21 +810,10 @@ func (c *restClient) UpdateWorkflow(ctx context.Context, req *workflowspb.Update httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkflow") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/workflows/apiv1beta/workflows_client_example_go123_test.go b/workflows/apiv1beta/workflows_client_example_go123_test.go index dcd81d1de994..49ff47a8090b 100644 --- a/workflows/apiv1beta/workflows_client_example_go123_test.go +++ b/workflows/apiv1beta/workflows_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListWorkflows_all() { } for resp, err := range c.ListWorkflows(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workflows/apiv1beta/workflowspb/workflows.pb.go b/workflows/apiv1beta/workflowspb/workflows.pb.go index 89e27efa71d6..3a4ed7a18f27 100755 --- a/workflows/apiv1beta/workflowspb/workflows.pb.go +++ b/workflows/apiv1beta/workflowspb/workflows.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workflows/v1beta/workflows.proto @@ -154,11 +154,9 @@ type Workflow struct { func (x *Workflow) Reset() { *x = Workflow{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workflow) String() string { @@ -169,7 +167,7 @@ func (*Workflow) ProtoMessage() {} func (x *Workflow) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -305,11 +303,9 @@ type ListWorkflowsRequest struct { func (x *ListWorkflowsRequest) Reset() { *x = ListWorkflowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowsRequest) String() string { @@ -320,7 +316,7 @@ func (*ListWorkflowsRequest) ProtoMessage() {} func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,11 +385,9 @@ type ListWorkflowsResponse struct { func (x *ListWorkflowsResponse) Reset() { *x = ListWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkflowsResponse) String() string { @@ -404,7 +398,7 @@ func (*ListWorkflowsResponse) ProtoMessage() {} func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +448,9 @@ type GetWorkflowRequest struct { func (x *GetWorkflowRequest) Reset() { *x = GetWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkflowRequest) String() string { @@ -469,7 +461,7 @@ func (*GetWorkflowRequest) ProtoMessage() {} func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -517,11 +509,9 @@ type CreateWorkflowRequest struct { func (x *CreateWorkflowRequest) Reset() { *x = CreateWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkflowRequest) String() string { @@ -532,7 +522,7 @@ func (*CreateWorkflowRequest) ProtoMessage() {} func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -583,11 +573,9 @@ type DeleteWorkflowRequest struct { func (x *DeleteWorkflowRequest) Reset() { *x = DeleteWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkflowRequest) String() string { @@ -598,7 +586,7 @@ func (*DeleteWorkflowRequest) ProtoMessage() {} func (x *DeleteWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,11 +625,9 @@ type UpdateWorkflowRequest struct { func (x *UpdateWorkflowRequest) Reset() { *x = UpdateWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkflowRequest) String() string { @@ -652,7 +638,7 @@ func (*UpdateWorkflowRequest) ProtoMessage() {} func (x *UpdateWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,11 +687,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -716,7 +700,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,104 +1036,6 @@ func file_google_cloud_workflows_v1beta_workflows_proto_init() { if File_google_cloud_workflows_v1beta_workflows_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Workflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkflowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_workflows_v1beta_workflows_proto_msgTypes[0].OneofWrappers = []any{ (*Workflow_SourceContents)(nil), } diff --git a/workflows/executions/apiv1/executions_client.go b/workflows/executions/apiv1/executions_client.go index 46295f1da564..97face3895b7 100755 --- a/workflows/executions/apiv1/executions_client.go +++ b/workflows/executions/apiv1/executions_client.go @@ -19,6 +19,7 @@ package executions import ( "context" "fmt" + "log/slog" "math" "net/url" @@ -151,6 +152,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new executions client based on gRPC. @@ -178,6 +181,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: executionspb.NewExecutionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -231,7 +235,7 @@ func (c *gRPCClient) ListExecutions(ctx context.Context, req *executionspb.ListE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -266,7 +270,7 @@ func (c *gRPCClient) CreateExecution(ctx context.Context, req *executionspb.Crea var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateExecution, req, settings.GRPC, c.logger, "CreateExecution") return err }, opts...) if err != nil { @@ -284,7 +288,7 @@ func (c *gRPCClient) GetExecution(ctx context.Context, req *executionspb.GetExec var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -302,7 +306,7 @@ func (c *gRPCClient) CancelExecution(ctx context.Context, req *executionspb.Canc var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelExecution, req, settings.GRPC, c.logger, "CancelExecution") return err }, opts...) if err != nil { diff --git a/workflows/executions/apiv1/executions_client_example_go123_test.go b/workflows/executions/apiv1/executions_client_example_go123_test.go index 47a17da0f9f9..482badf88368 100644 --- a/workflows/executions/apiv1/executions_client_example_go123_test.go +++ b/workflows/executions/apiv1/executions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workflows/executions/apiv1/executionspb/executions.pb.go b/workflows/executions/apiv1/executionspb/executions.pb.go index 8ac81e5ab6ac..87440cbcede2 100755 --- a/workflows/executions/apiv1/executionspb/executions.pb.go +++ b/workflows/executions/apiv1/executionspb/executions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workflows/executions/v1/executions.proto @@ -331,11 +331,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -346,7 +344,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -495,11 +493,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -510,7 +506,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -584,11 +580,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -599,7 +593,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +640,9 @@ type CreateExecutionRequest struct { func (x *CreateExecutionRequest) Reset() { *x = CreateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExecutionRequest) String() string { @@ -661,7 +653,7 @@ func (*CreateExecutionRequest) ProtoMessage() {} func (x *CreateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +701,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -724,7 +714,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -769,11 +759,9 @@ type CancelExecutionRequest struct { func (x *CancelExecutionRequest) Reset() { *x = CancelExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelExecutionRequest) String() string { @@ -784,7 +772,7 @@ func (*CancelExecutionRequest) ProtoMessage() {} func (x *CancelExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,11 +810,9 @@ type Execution_StackTraceElement struct { func (x *Execution_StackTraceElement) Reset() { *x = Execution_StackTraceElement{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_StackTraceElement) String() string { @@ -837,7 +823,7 @@ func (*Execution_StackTraceElement) ProtoMessage() {} func (x *Execution_StackTraceElement) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -885,11 +871,9 @@ type Execution_StackTrace struct { func (x *Execution_StackTrace) Reset() { *x = Execution_StackTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_StackTrace) String() string { @@ -900,7 +884,7 @@ func (*Execution_StackTrace) ProtoMessage() {} func (x *Execution_StackTrace) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +922,9 @@ type Execution_Error struct { func (x *Execution_Error) Reset() { *x = Execution_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_Error) String() string { @@ -953,7 +935,7 @@ func (*Execution_Error) ProtoMessage() {} func (x *Execution_Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,11 +989,9 @@ type Execution_Status struct { func (x *Execution_Status) Reset() { *x = Execution_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_Status) String() string { @@ -1022,7 +1002,7 @@ func (*Execution_Status) ProtoMessage() {} func (x *Execution_Status) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1058,11 +1038,9 @@ type Execution_StateError struct { func (x *Execution_StateError) Reset() { *x = Execution_StateError{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_StateError) String() string { @@ -1073,7 +1051,7 @@ func (*Execution_StateError) ProtoMessage() {} func (x *Execution_StateError) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1121,11 +1099,9 @@ type Execution_StackTraceElement_Position struct { func (x *Execution_StackTraceElement_Position) Reset() { *x = Execution_StackTraceElement_Position{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_StackTraceElement_Position) String() string { @@ -1136,7 +1112,7 @@ func (*Execution_StackTraceElement_Position) ProtoMessage() {} func (x *Execution_StackTraceElement_Position) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1186,11 +1162,9 @@ type Execution_Status_Step struct { func (x *Execution_Status_Step) Reset() { *x = Execution_Status_Step{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_Status_Step) String() string { @@ -1201,7 +1175,7 @@ func (*Execution_Status_Step) ProtoMessage() {} func (x *Execution_Status_Step) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1597,164 +1571,6 @@ func file_google_cloud_workflows_executions_v1_executions_proto_init() { if File_google_cloud_workflows_executions_v1_executions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CancelExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Execution_StackTraceElement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Execution_StackTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Execution_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Execution_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Execution_StateError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Execution_StackTraceElement_Position); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1_executions_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Execution_Status_Step); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/workflows/executions/apiv1/helpers.go b/workflows/executions/apiv1/helpers.go index 5334fb3c9d50..ef9c6b9ac92b 100755 --- a/workflows/executions/apiv1/helpers.go +++ b/workflows/executions/apiv1/helpers.go @@ -18,10 +18,16 @@ package executions import ( "context" + "log/slog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workflowexecutions.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +48,14 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workflows/executions/apiv1beta/executions_client.go b/workflows/executions/apiv1beta/executions_client.go index 43d35569c4c6..4ceebf560ae5 100755 --- a/workflows/executions/apiv1beta/executions_client.go +++ b/workflows/executions/apiv1beta/executions_client.go @@ -20,14 +20,13 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" executionspb "cloud.google.com/go/workflows/executions/apiv1beta/executionspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -166,6 +165,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new executions client based on gRPC. @@ -193,6 +194,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: executionspb.NewExecutionsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -239,6 +241,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new executions rest client. @@ -257,6 +261,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -320,7 +325,7 @@ func (c *gRPCClient) ListExecutions(ctx context.Context, req *executionspb.ListE } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListExecutions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListExecutions, req, settings.GRPC, c.logger, "ListExecutions") return err }, opts...) if err != nil { @@ -355,7 +360,7 @@ func (c *gRPCClient) CreateExecution(ctx context.Context, req *executionspb.Crea var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateExecution, req, settings.GRPC, c.logger, "CreateExecution") return err }, opts...) if err != nil { @@ -373,7 +378,7 @@ func (c *gRPCClient) GetExecution(ctx context.Context, req *executionspb.GetExec var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetExecution, req, settings.GRPC, c.logger, "GetExecution") return err }, opts...) if err != nil { @@ -391,7 +396,7 @@ func (c *gRPCClient) CancelExecution(ctx context.Context, req *executionspb.Canc var resp *executionspb.Execution err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CancelExecution(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CancelExecution, req, settings.GRPC, c.logger, "CancelExecution") return err }, opts...) if err != nil { @@ -450,21 +455,10 @@ func (c *restClient) ListExecutions(ctx context.Context, req *executionspb.ListE } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListExecutions") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -529,17 +523,7 @@ func (c *restClient) CreateExecution(ctx context.Context, req *executionspb.Crea httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateExecution") if err != nil { return err } @@ -591,17 +575,7 @@ func (c *restClient) GetExecution(ctx context.Context, req *executionspb.GetExec httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetExecution") if err != nil { return err } @@ -652,17 +626,7 @@ func (c *restClient) CancelExecution(ctx context.Context, req *executionspb.Canc httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelExecution") if err != nil { return err } diff --git a/workflows/executions/apiv1beta/executions_client_example_go123_test.go b/workflows/executions/apiv1beta/executions_client_example_go123_test.go index 3d7d72362244..d02960e2adf5 100644 --- a/workflows/executions/apiv1beta/executions_client_example_go123_test.go +++ b/workflows/executions/apiv1beta/executions_client_example_go123_test.go @@ -44,7 +44,7 @@ func ExampleClient_ListExecutions_all() { } for resp, err := range c.ListExecutions(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workflows/executions/apiv1beta/executionspb/executions.pb.go b/workflows/executions/apiv1beta/executionspb/executions.pb.go index 276283c7172d..2989e59bb989 100755 --- a/workflows/executions/apiv1beta/executionspb/executions.pb.go +++ b/workflows/executions/apiv1beta/executionspb/executions.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workflows/executions/v1beta/executions.proto @@ -190,11 +190,9 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution) String() string { @@ -205,7 +203,7 @@ func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,11 +304,9 @@ type ListExecutionsRequest struct { func (x *ListExecutionsRequest) Reset() { *x = ListExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsRequest) String() string { @@ -321,7 +317,7 @@ func (*ListExecutionsRequest) ProtoMessage() {} func (x *ListExecutionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,11 +377,9 @@ type ListExecutionsResponse struct { func (x *ListExecutionsResponse) Reset() { *x = ListExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExecutionsResponse) String() string { @@ -396,7 +390,7 @@ func (*ListExecutionsResponse) ProtoMessage() {} func (x *ListExecutionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -443,11 +437,9 @@ type CreateExecutionRequest struct { func (x *CreateExecutionRequest) Reset() { *x = CreateExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExecutionRequest) String() string { @@ -458,7 +450,7 @@ func (*CreateExecutionRequest) ProtoMessage() {} func (x *CreateExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +498,9 @@ type GetExecutionRequest struct { func (x *GetExecutionRequest) Reset() { *x = GetExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExecutionRequest) String() string { @@ -521,7 +511,7 @@ func (*GetExecutionRequest) ProtoMessage() {} func (x *GetExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,11 +556,9 @@ type CancelExecutionRequest struct { func (x *CancelExecutionRequest) Reset() { *x = CancelExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelExecutionRequest) String() string { @@ -581,7 +569,7 @@ func (*CancelExecutionRequest) ProtoMessage() {} func (x *CancelExecutionRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,11 +605,9 @@ type Execution_Error struct { func (x *Execution_Error) Reset() { *x = Execution_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Execution_Error) String() string { @@ -632,7 +618,7 @@ func (*Execution_Error) ProtoMessage() {} func (x *Execution_Error) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,92 +905,6 @@ func file_google_cloud_workflows_executions_v1beta_executions_proto_init() { if File_google_cloud_workflows_executions_v1beta_executions_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Execution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*CancelExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workflows_executions_v1beta_executions_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Execution_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/workflows/executions/apiv1beta/helpers.go b/workflows/executions/apiv1beta/helpers.go index 5334fb3c9d50..dc7cd37b62c9 100755 --- a/workflows/executions/apiv1beta/helpers.go +++ b/workflows/executions/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package executions import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workflowexecutions.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workstations/apiv1/helpers.go b/workstations/apiv1/helpers.go index ea493708e858..06b3ac681580 100755 --- a/workstations/apiv1/helpers.go +++ b/workstations/apiv1/helpers.go @@ -18,10 +18,20 @@ package workstations import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workstations.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workstations/apiv1/workstations_client.go b/workstations/apiv1/workstations_client.go index 430b8ee5cd28..e76fe52b13c9 100755 --- a/workstations/apiv1/workstations_client.go +++ b/workstations/apiv1/workstations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" workstationspb "cloud.google.com/go/workstations/apiv1/workstationspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -713,6 +712,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new workstations client based on gRPC. @@ -739,6 +740,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: workstationspb.NewWorkstationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -803,6 +805,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new workstations rest client. @@ -820,6 +824,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -882,7 +887,7 @@ func (c *gRPCClient) GetWorkstationCluster(ctx context.Context, req *workstation var resp *workstationspb.WorkstationCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstationCluster, req, settings.GRPC, c.logger, "GetWorkstationCluster") return err }, opts...) if err != nil { @@ -911,7 +916,7 @@ func (c *gRPCClient) ListWorkstationClusters(ctx context.Context, req *workstati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstationClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstationClusters, req, settings.GRPC, c.logger, "ListWorkstationClusters") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) CreateWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstationCluster, req, settings.GRPC, c.logger, "CreateWorkstationCluster") return err }, opts...) if err != nil { @@ -966,7 +971,7 @@ func (c *gRPCClient) UpdateWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstationCluster, req, settings.GRPC, c.logger, "UpdateWorkstationCluster") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *gRPCClient) DeleteWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstationCluster, req, settings.GRPC, c.logger, "DeleteWorkstationCluster") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *gRPCClient) GetWorkstationConfig(ctx context.Context, req *workstations var resp *workstationspb.WorkstationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstationConfig, req, settings.GRPC, c.logger, "GetWorkstationConfig") return err }, opts...) if err != nil { @@ -1035,7 +1040,7 @@ func (c *gRPCClient) ListWorkstationConfigs(ctx context.Context, req *workstatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstationConfigs, req, settings.GRPC, c.logger, "ListWorkstationConfigs") return err }, opts...) if err != nil { @@ -1081,7 +1086,7 @@ func (c *gRPCClient) ListUsableWorkstationConfigs(ctx context.Context, req *work } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListUsableWorkstationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListUsableWorkstationConfigs, req, settings.GRPC, c.logger, "ListUsableWorkstationConfigs") return err }, opts...) if err != nil { @@ -1116,7 +1121,7 @@ func (c *gRPCClient) CreateWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstationConfig, req, settings.GRPC, c.logger, "CreateWorkstationConfig") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *gRPCClient) UpdateWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstationConfig, req, settings.GRPC, c.logger, "UpdateWorkstationConfig") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *gRPCClient) DeleteWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstationConfig, req, settings.GRPC, c.logger, "DeleteWorkstationConfig") return err }, opts...) if err != nil { @@ -1176,7 +1181,7 @@ func (c *gRPCClient) GetWorkstation(ctx context.Context, req *workstationspb.Get var resp *workstationspb.Workstation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstation, req, settings.GRPC, c.logger, "GetWorkstation") return err }, opts...) if err != nil { @@ -1205,7 +1210,7 @@ func (c *gRPCClient) ListWorkstations(ctx context.Context, req *workstationspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstations, req, settings.GRPC, c.logger, "ListWorkstations") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *gRPCClient) ListUsableWorkstations(ctx context.Context, req *workstatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListUsableWorkstations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListUsableWorkstations, req, settings.GRPC, c.logger, "ListUsableWorkstations") return err }, opts...) if err != nil { @@ -1286,7 +1291,7 @@ func (c *gRPCClient) CreateWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstation, req, settings.GRPC, c.logger, "CreateWorkstation") return err }, opts...) if err != nil { @@ -1306,7 +1311,7 @@ func (c *gRPCClient) UpdateWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstation, req, settings.GRPC, c.logger, "UpdateWorkstation") return err }, opts...) if err != nil { @@ -1326,7 +1331,7 @@ func (c *gRPCClient) DeleteWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstation, req, settings.GRPC, c.logger, "DeleteWorkstation") return err }, opts...) if err != nil { @@ -1346,7 +1351,7 @@ func (c *gRPCClient) StartWorkstation(ctx context.Context, req *workstationspb.S var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartWorkstation, req, settings.GRPC, c.logger, "StartWorkstation") return err }, opts...) if err != nil { @@ -1366,7 +1371,7 @@ func (c *gRPCClient) StopWorkstation(ctx context.Context, req *workstationspb.St var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopWorkstation, req, settings.GRPC, c.logger, "StopWorkstation") return err }, opts...) if err != nil { @@ -1386,7 +1391,7 @@ func (c *gRPCClient) GenerateAccessToken(ctx context.Context, req *workstationsp var resp *workstationspb.GenerateAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GenerateAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GenerateAccessToken, req, settings.GRPC, c.logger, "GenerateAccessToken") return err }, opts...) if err != nil { @@ -1404,7 +1409,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1440,7 +1445,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1471,7 +1476,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1486,7 +1491,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1574,17 +1579,7 @@ func (c *restClient) GetWorkstationCluster(ctx context.Context, req *workstation httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstationCluster") if err != nil { return err } @@ -1646,21 +1641,10 @@ func (c *restClient) ListWorkstationClusters(ctx context.Context, req *workstati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstationClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1733,21 +1717,10 @@ func (c *restClient) CreateWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1817,21 +1790,10 @@ func (c *restClient) UpdateWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1890,21 +1852,10 @@ func (c *restClient) DeleteWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1955,17 +1906,7 @@ func (c *restClient) GetWorkstationConfig(ctx context.Context, req *workstations httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstationConfig") if err != nil { return err } @@ -2027,21 +1968,10 @@ func (c *restClient) ListWorkstationConfigs(ctx context.Context, req *workstatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstationConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2117,21 +2047,10 @@ func (c *restClient) ListUsableWorkstationConfigs(ctx context.Context, req *work } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableWorkstationConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2204,21 +2123,10 @@ func (c *restClient) CreateWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2288,21 +2196,10 @@ func (c *restClient) UpdateWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2361,21 +2258,10 @@ func (c *restClient) DeleteWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2426,17 +2312,7 @@ func (c *restClient) GetWorkstation(ctx context.Context, req *workstationspb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstation") if err != nil { return err } @@ -2498,21 +2374,10 @@ func (c *restClient) ListWorkstations(ctx context.Context, req *workstationspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2588,21 +2453,10 @@ func (c *restClient) ListUsableWorkstations(ctx context.Context, req *workstatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableWorkstations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2675,21 +2529,10 @@ func (c *restClient) CreateWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2759,21 +2602,10 @@ func (c *restClient) UpdateWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2829,21 +2661,10 @@ func (c *restClient) DeleteWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2899,21 +2720,10 @@ func (c *restClient) StartWorkstation(ctx context.Context, req *workstationspb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2969,21 +2779,10 @@ func (c *restClient) StopWorkstation(ctx context.Context, req *workstationspb.St httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopWorkstation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3041,17 +2840,7 @@ func (c *restClient) GenerateAccessToken(ctx context.Context, req *workstationsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateAccessToken") if err != nil { return err } @@ -3105,17 +2894,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3175,17 +2954,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3247,17 +3016,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3310,15 +3069,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3352,15 +3104,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3397,17 +3142,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3472,21 +3207,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/workstations/apiv1/workstations_client_example_go123_test.go b/workstations/apiv1/workstations_client_example_go123_test.go index 30d603bbfa2b..82f52dbb5489 100644 --- a/workstations/apiv1/workstations_client_example_go123_test.go +++ b/workstations/apiv1/workstations_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListUsableWorkstationConfigs_all() { } for resp, err := range c.ListUsableWorkstationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListUsableWorkstations_all() { } for resp, err := range c.ListUsableWorkstations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListWorkstationClusters_all() { } for resp, err := range c.ListWorkstationClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListWorkstationConfigs_all() { } for resp, err := range c.ListWorkstationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListWorkstations_all() { } for resp, err := range c.ListWorkstations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workstations/apiv1/workstationspb/workstations.pb.go b/workstations/apiv1/workstationspb/workstations.pb.go index 9684aa05c43b..d564b4d29e4b 100755 --- a/workstations/apiv1/workstationspb/workstations.pb.go +++ b/workstations/apiv1/workstationspb/workstations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workstations/v1/workstations.proto @@ -225,11 +225,9 @@ type WorkstationCluster struct { func (x *WorkstationCluster) Reset() { *x = WorkstationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationCluster) String() string { @@ -240,7 +238,7 @@ func (*WorkstationCluster) ProtoMessage() {} func (x *WorkstationCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,11 +489,9 @@ type WorkstationConfig struct { func (x *WorkstationConfig) Reset() { *x = WorkstationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig) String() string { @@ -506,7 +502,7 @@ func (*WorkstationConfig) ProtoMessage() {} func (x *WorkstationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,11 +704,9 @@ type Workstation struct { func (x *Workstation) Reset() { *x = Workstation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workstation) String() string { @@ -723,7 +717,7 @@ func (*Workstation) ProtoMessage() {} func (x *Workstation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -841,11 +835,9 @@ type GetWorkstationClusterRequest struct { func (x *GetWorkstationClusterRequest) Reset() { *x = GetWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationClusterRequest) String() string { @@ -856,7 +848,7 @@ func (*GetWorkstationClusterRequest) ProtoMessage() {} func (x *GetWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -895,11 +887,9 @@ type ListWorkstationClustersRequest struct { func (x *ListWorkstationClustersRequest) Reset() { *x = ListWorkstationClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationClustersRequest) String() string { @@ -910,7 +900,7 @@ func (*ListWorkstationClustersRequest) ProtoMessage() {} func (x *ListWorkstationClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,11 +953,9 @@ type ListWorkstationClustersResponse struct { func (x *ListWorkstationClustersResponse) Reset() { *x = ListWorkstationClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationClustersResponse) String() string { @@ -978,7 +966,7 @@ func (*ListWorkstationClustersResponse) ProtoMessage() {} func (x *ListWorkstationClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1021,9 @@ type CreateWorkstationClusterRequest struct { func (x *CreateWorkstationClusterRequest) Reset() { *x = CreateWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationClusterRequest) String() string { @@ -1048,7 +1034,7 @@ func (*CreateWorkstationClusterRequest) ProtoMessage() {} func (x *CreateWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,11 +1099,9 @@ type UpdateWorkstationClusterRequest struct { func (x *UpdateWorkstationClusterRequest) Reset() { *x = UpdateWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationClusterRequest) String() string { @@ -1128,7 +1112,7 @@ func (*UpdateWorkstationClusterRequest) ProtoMessage() {} func (x *UpdateWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,11 +1177,9 @@ type DeleteWorkstationClusterRequest struct { func (x *DeleteWorkstationClusterRequest) Reset() { *x = DeleteWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationClusterRequest) String() string { @@ -1208,7 +1190,7 @@ func (*DeleteWorkstationClusterRequest) ProtoMessage() {} func (x *DeleteWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1263,11 +1245,9 @@ type GetWorkstationConfigRequest struct { func (x *GetWorkstationConfigRequest) Reset() { *x = GetWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationConfigRequest) String() string { @@ -1278,7 +1258,7 @@ func (*GetWorkstationConfigRequest) ProtoMessage() {} func (x *GetWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,11 +1297,9 @@ type ListWorkstationConfigsRequest struct { func (x *ListWorkstationConfigsRequest) Reset() { *x = ListWorkstationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationConfigsRequest) String() string { @@ -1332,7 +1310,7 @@ func (*ListWorkstationConfigsRequest) ProtoMessage() {} func (x *ListWorkstationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1385,11 +1363,9 @@ type ListWorkstationConfigsResponse struct { func (x *ListWorkstationConfigsResponse) Reset() { *x = ListWorkstationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationConfigsResponse) String() string { @@ -1400,7 +1376,7 @@ func (*ListWorkstationConfigsResponse) ProtoMessage() {} func (x *ListWorkstationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1453,11 +1429,9 @@ type ListUsableWorkstationConfigsRequest struct { func (x *ListUsableWorkstationConfigsRequest) Reset() { *x = ListUsableWorkstationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationConfigsRequest) String() string { @@ -1468,7 +1442,7 @@ func (*ListUsableWorkstationConfigsRequest) ProtoMessage() {} func (x *ListUsableWorkstationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1521,11 +1495,9 @@ type ListUsableWorkstationConfigsResponse struct { func (x *ListUsableWorkstationConfigsResponse) Reset() { *x = ListUsableWorkstationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationConfigsResponse) String() string { @@ -1536,7 +1508,7 @@ func (*ListUsableWorkstationConfigsResponse) ProtoMessage() {} func (x *ListUsableWorkstationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1591,11 +1563,9 @@ type CreateWorkstationConfigRequest struct { func (x *CreateWorkstationConfigRequest) Reset() { *x = CreateWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationConfigRequest) String() string { @@ -1606,7 +1576,7 @@ func (*CreateWorkstationConfigRequest) ProtoMessage() {} func (x *CreateWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1671,11 +1641,9 @@ type UpdateWorkstationConfigRequest struct { func (x *UpdateWorkstationConfigRequest) Reset() { *x = UpdateWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationConfigRequest) String() string { @@ -1686,7 +1654,7 @@ func (*UpdateWorkstationConfigRequest) ProtoMessage() {} func (x *UpdateWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1751,11 +1719,9 @@ type DeleteWorkstationConfigRequest struct { func (x *DeleteWorkstationConfigRequest) Reset() { *x = DeleteWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationConfigRequest) String() string { @@ -1766,7 +1732,7 @@ func (*DeleteWorkstationConfigRequest) ProtoMessage() {} func (x *DeleteWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1821,11 +1787,9 @@ type GetWorkstationRequest struct { func (x *GetWorkstationRequest) Reset() { *x = GetWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationRequest) String() string { @@ -1836,7 +1800,7 @@ func (*GetWorkstationRequest) ProtoMessage() {} func (x *GetWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1875,11 +1839,9 @@ type ListWorkstationsRequest struct { func (x *ListWorkstationsRequest) Reset() { *x = ListWorkstationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationsRequest) String() string { @@ -1890,7 +1852,7 @@ func (*ListWorkstationsRequest) ProtoMessage() {} func (x *ListWorkstationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1943,11 +1905,9 @@ type ListWorkstationsResponse struct { func (x *ListWorkstationsResponse) Reset() { *x = ListWorkstationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationsResponse) String() string { @@ -1958,7 +1918,7 @@ func (*ListWorkstationsResponse) ProtoMessage() {} func (x *ListWorkstationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2011,11 +1971,9 @@ type ListUsableWorkstationsRequest struct { func (x *ListUsableWorkstationsRequest) Reset() { *x = ListUsableWorkstationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationsRequest) String() string { @@ -2026,7 +1984,7 @@ func (*ListUsableWorkstationsRequest) ProtoMessage() {} func (x *ListUsableWorkstationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2079,11 +2037,9 @@ type ListUsableWorkstationsResponse struct { func (x *ListUsableWorkstationsResponse) Reset() { *x = ListUsableWorkstationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationsResponse) String() string { @@ -2094,7 +2050,7 @@ func (*ListUsableWorkstationsResponse) ProtoMessage() {} func (x *ListUsableWorkstationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2149,11 +2105,9 @@ type CreateWorkstationRequest struct { func (x *CreateWorkstationRequest) Reset() { *x = CreateWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationRequest) String() string { @@ -2164,7 +2118,7 @@ func (*CreateWorkstationRequest) ProtoMessage() {} func (x *CreateWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2229,11 +2183,9 @@ type UpdateWorkstationRequest struct { func (x *UpdateWorkstationRequest) Reset() { *x = UpdateWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationRequest) String() string { @@ -2244,7 +2196,7 @@ func (*UpdateWorkstationRequest) ProtoMessage() {} func (x *UpdateWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2305,11 +2257,9 @@ type DeleteWorkstationRequest struct { func (x *DeleteWorkstationRequest) Reset() { *x = DeleteWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationRequest) String() string { @@ -2320,7 +2270,7 @@ func (*DeleteWorkstationRequest) ProtoMessage() {} func (x *DeleteWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2374,11 +2324,9 @@ type StartWorkstationRequest struct { func (x *StartWorkstationRequest) Reset() { *x = StartWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartWorkstationRequest) String() string { @@ -2389,7 +2337,7 @@ func (*StartWorkstationRequest) ProtoMessage() {} func (x *StartWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2443,11 +2391,9 @@ type StopWorkstationRequest struct { func (x *StopWorkstationRequest) Reset() { *x = StopWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopWorkstationRequest) String() string { @@ -2458,7 +2404,7 @@ func (*StopWorkstationRequest) ProtoMessage() {} func (x *StopWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2514,11 +2460,9 @@ type GenerateAccessTokenRequest struct { func (x *GenerateAccessTokenRequest) Reset() { *x = GenerateAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenRequest) String() string { @@ -2529,7 +2473,7 @@ func (*GenerateAccessTokenRequest) ProtoMessage() {} func (x *GenerateAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2612,11 +2556,9 @@ type GenerateAccessTokenResponse struct { func (x *GenerateAccessTokenResponse) Reset() { *x = GenerateAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenResponse) String() string { @@ -2627,7 +2569,7 @@ func (*GenerateAccessTokenResponse) ProtoMessage() {} func (x *GenerateAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2681,11 +2623,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2696,7 +2636,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2788,11 +2728,9 @@ type WorkstationCluster_PrivateClusterConfig struct { func (x *WorkstationCluster_PrivateClusterConfig) Reset() { *x = WorkstationCluster_PrivateClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationCluster_PrivateClusterConfig) String() string { @@ -2803,7 +2741,7 @@ func (*WorkstationCluster_PrivateClusterConfig) ProtoMessage() {} func (x *WorkstationCluster_PrivateClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2862,11 +2800,9 @@ type WorkstationConfig_Host struct { func (x *WorkstationConfig_Host) Reset() { *x = WorkstationConfig_Host{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host) String() string { @@ -2877,7 +2813,7 @@ func (*WorkstationConfig_Host) ProtoMessage() {} func (x *WorkstationConfig_Host) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2935,11 +2871,9 @@ type WorkstationConfig_PersistentDirectory struct { func (x *WorkstationConfig_PersistentDirectory) Reset() { *x = WorkstationConfig_PersistentDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_PersistentDirectory) String() string { @@ -2950,7 +2884,7 @@ func (*WorkstationConfig_PersistentDirectory) ProtoMessage() {} func (x *WorkstationConfig_PersistentDirectory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3033,11 +2967,9 @@ type WorkstationConfig_Container struct { func (x *WorkstationConfig_Container) Reset() { *x = WorkstationConfig_Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Container) String() string { @@ -3048,7 +2980,7 @@ func (*WorkstationConfig_Container) ProtoMessage() {} func (x *WorkstationConfig_Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3132,11 +3064,9 @@ type WorkstationConfig_CustomerEncryptionKey struct { func (x *WorkstationConfig_CustomerEncryptionKey) Reset() { *x = WorkstationConfig_CustomerEncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_CustomerEncryptionKey) String() string { @@ -3147,7 +3077,7 @@ func (*WorkstationConfig_CustomerEncryptionKey) ProtoMessage() {} func (x *WorkstationConfig_CustomerEncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3190,11 +3120,9 @@ type WorkstationConfig_ReadinessCheck struct { func (x *WorkstationConfig_ReadinessCheck) Reset() { *x = WorkstationConfig_ReadinessCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_ReadinessCheck) String() string { @@ -3205,7 +3133,7 @@ func (*WorkstationConfig_ReadinessCheck) ProtoMessage() {} func (x *WorkstationConfig_ReadinessCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3339,11 +3267,9 @@ type WorkstationConfig_Host_GceInstance struct { func (x *WorkstationConfig_Host_GceInstance) Reset() { *x = WorkstationConfig_Host_GceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance) String() string { @@ -3354,7 +3280,7 @@ func (*WorkstationConfig_Host_GceInstance) ProtoMessage() {} func (x *WorkstationConfig_Host_GceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3462,11 +3388,9 @@ type WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig struct { func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) Reset() { *x = WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) String() string { @@ -3477,7 +3401,7 @@ func (*WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) ProtoMessag func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3525,11 +3449,9 @@ type WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig struct { func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) Reset() { *x = WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) String() string { @@ -3540,7 +3462,7 @@ func (*WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) ProtoMe func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3613,11 +3535,9 @@ type WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk struct { func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) Reset() { *x = WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) String() string { @@ -3628,7 +3548,7 @@ func (*WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) ProtoMes func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1_workstations_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4990,488 +4910,6 @@ func file_google_cloud_workstations_v1_workstations_proto_init() { if File_google_cloud_workstations_v1_workstations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workstations_v1_workstations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Workstation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*StartWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*StopWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationCluster_PrivateClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_PersistentDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_CustomerEncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_ReadinessCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1_workstations_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_workstations_v1_workstations_proto_msgTypes[27].OneofWrappers = []any{ (*GenerateAccessTokenRequest_ExpireTime)(nil), (*GenerateAccessTokenRequest_Ttl)(nil), diff --git a/workstations/apiv1beta/helpers.go b/workstations/apiv1beta/helpers.go index ea493708e858..06b3ac681580 100755 --- a/workstations/apiv1beta/helpers.go +++ b/workstations/apiv1beta/helpers.go @@ -18,10 +18,20 @@ package workstations import ( "context" + "io" + "log/slog" + "net/http" + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" ) +const serviceName = "workstations.googleapis.com" + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} @@ -42,3 +52,50 @@ func DefaultAuthScopes() []string { "https://www.googleapis.com/auth/cloud-platform", } } + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + 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 { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/workstations/apiv1beta/workstations_client.go b/workstations/apiv1beta/workstations_client.go index b48406e50688..0e9368aad785 100755 --- a/workstations/apiv1beta/workstations_client.go +++ b/workstations/apiv1beta/workstations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -32,7 +32,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" workstationspb "cloud.google.com/go/workstations/apiv1beta/workstationspb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -713,6 +712,8 @@ type gRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewClient creates a new workstations client based on gRPC. @@ -739,6 +740,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error connPool: connPool, client: workstationspb.NewWorkstationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), operationsClient: longrunningpb.NewOperationsClient(connPool), iamPolicyClient: iampb.NewIAMPolicyClient(connPool), } @@ -803,6 +805,8 @@ type restClient struct { // Points back to the CallOptions field of the containing Client CallOptions **CallOptions + + logger *slog.Logger } // NewRESTClient creates a new workstations rest client. @@ -820,6 +824,7 @@ func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, e endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -882,7 +887,7 @@ func (c *gRPCClient) GetWorkstationCluster(ctx context.Context, req *workstation var resp *workstationspb.WorkstationCluster err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstationCluster, req, settings.GRPC, c.logger, "GetWorkstationCluster") return err }, opts...) if err != nil { @@ -911,7 +916,7 @@ func (c *gRPCClient) ListWorkstationClusters(ctx context.Context, req *workstati } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstationClusters(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstationClusters, req, settings.GRPC, c.logger, "ListWorkstationClusters") return err }, opts...) if err != nil { @@ -946,7 +951,7 @@ func (c *gRPCClient) CreateWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstationCluster, req, settings.GRPC, c.logger, "CreateWorkstationCluster") return err }, opts...) if err != nil { @@ -966,7 +971,7 @@ func (c *gRPCClient) UpdateWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstationCluster, req, settings.GRPC, c.logger, "UpdateWorkstationCluster") return err }, opts...) if err != nil { @@ -986,7 +991,7 @@ func (c *gRPCClient) DeleteWorkstationCluster(ctx context.Context, req *workstat var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstationCluster(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstationCluster, req, settings.GRPC, c.logger, "DeleteWorkstationCluster") return err }, opts...) if err != nil { @@ -1006,7 +1011,7 @@ func (c *gRPCClient) GetWorkstationConfig(ctx context.Context, req *workstations var resp *workstationspb.WorkstationConfig err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstationConfig, req, settings.GRPC, c.logger, "GetWorkstationConfig") return err }, opts...) if err != nil { @@ -1035,7 +1040,7 @@ func (c *gRPCClient) ListWorkstationConfigs(ctx context.Context, req *workstatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstationConfigs, req, settings.GRPC, c.logger, "ListWorkstationConfigs") return err }, opts...) if err != nil { @@ -1081,7 +1086,7 @@ func (c *gRPCClient) ListUsableWorkstationConfigs(ctx context.Context, req *work } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListUsableWorkstationConfigs(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListUsableWorkstationConfigs, req, settings.GRPC, c.logger, "ListUsableWorkstationConfigs") return err }, opts...) if err != nil { @@ -1116,7 +1121,7 @@ func (c *gRPCClient) CreateWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstationConfig, req, settings.GRPC, c.logger, "CreateWorkstationConfig") return err }, opts...) if err != nil { @@ -1136,7 +1141,7 @@ func (c *gRPCClient) UpdateWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstationConfig, req, settings.GRPC, c.logger, "UpdateWorkstationConfig") return err }, opts...) if err != nil { @@ -1156,7 +1161,7 @@ func (c *gRPCClient) DeleteWorkstationConfig(ctx context.Context, req *workstati var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstationConfig(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstationConfig, req, settings.GRPC, c.logger, "DeleteWorkstationConfig") return err }, opts...) if err != nil { @@ -1176,7 +1181,7 @@ func (c *gRPCClient) GetWorkstation(ctx context.Context, req *workstationspb.Get var resp *workstationspb.Workstation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GetWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GetWorkstation, req, settings.GRPC, c.logger, "GetWorkstation") return err }, opts...) if err != nil { @@ -1205,7 +1210,7 @@ func (c *gRPCClient) ListWorkstations(ctx context.Context, req *workstationspb.L } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListWorkstations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListWorkstations, req, settings.GRPC, c.logger, "ListWorkstations") return err }, opts...) if err != nil { @@ -1251,7 +1256,7 @@ func (c *gRPCClient) ListUsableWorkstations(ctx context.Context, req *workstatio } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.ListUsableWorkstations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.ListUsableWorkstations, req, settings.GRPC, c.logger, "ListUsableWorkstations") return err }, opts...) if err != nil { @@ -1286,7 +1291,7 @@ func (c *gRPCClient) CreateWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.CreateWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.CreateWorkstation, req, settings.GRPC, c.logger, "CreateWorkstation") return err }, opts...) if err != nil { @@ -1306,7 +1311,7 @@ func (c *gRPCClient) UpdateWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.UpdateWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.UpdateWorkstation, req, settings.GRPC, c.logger, "UpdateWorkstation") return err }, opts...) if err != nil { @@ -1326,7 +1331,7 @@ func (c *gRPCClient) DeleteWorkstation(ctx context.Context, req *workstationspb. var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.DeleteWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.DeleteWorkstation, req, settings.GRPC, c.logger, "DeleteWorkstation") return err }, opts...) if err != nil { @@ -1346,7 +1351,7 @@ func (c *gRPCClient) StartWorkstation(ctx context.Context, req *workstationspb.S var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StartWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StartWorkstation, req, settings.GRPC, c.logger, "StartWorkstation") return err }, opts...) if err != nil { @@ -1366,7 +1371,7 @@ func (c *gRPCClient) StopWorkstation(ctx context.Context, req *workstationspb.St var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.StopWorkstation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.StopWorkstation, req, settings.GRPC, c.logger, "StopWorkstation") return err }, opts...) if err != nil { @@ -1386,7 +1391,7 @@ func (c *gRPCClient) GenerateAccessToken(ctx context.Context, req *workstationsp var resp *workstationspb.GenerateAccessTokenResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.client.GenerateAccessToken(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.client.GenerateAccessToken, req, settings.GRPC, c.logger, "GenerateAccessToken") return err }, opts...) if err != nil { @@ -1404,7 +1409,7 @@ func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") return err }, opts...) if err != nil { @@ -1422,7 +1427,7 @@ func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe var resp *iampb.Policy err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") return err }, opts...) if err != nil { @@ -1440,7 +1445,7 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP var resp *iampb.TestIamPermissionsResponse err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") return err }, opts...) if err != nil { @@ -1457,7 +1462,7 @@ func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.Can opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -1471,7 +1476,7 @@ func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -1486,7 +1491,7 @@ func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -1515,7 +1520,7 @@ func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.List } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -1574,17 +1579,7 @@ func (c *restClient) GetWorkstationCluster(ctx context.Context, req *workstation httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstationCluster") if err != nil { return err } @@ -1646,21 +1641,10 @@ func (c *restClient) ListWorkstationClusters(ctx context.Context, req *workstati } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstationClusters") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1733,21 +1717,10 @@ func (c *restClient) CreateWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1817,21 +1790,10 @@ func (c *restClient) UpdateWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1890,21 +1852,10 @@ func (c *restClient) DeleteWorkstationCluster(ctx context.Context, req *workstat httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstationCluster") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -1955,17 +1906,7 @@ func (c *restClient) GetWorkstationConfig(ctx context.Context, req *workstations httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstationConfig") if err != nil { return err } @@ -2027,21 +1968,10 @@ func (c *restClient) ListWorkstationConfigs(ctx context.Context, req *workstatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstationConfigs") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2117,21 +2047,10 @@ func (c *restClient) ListUsableWorkstationConfigs(ctx context.Context, req *work } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableWorkstationConfigs") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2204,21 +2123,10 @@ func (c *restClient) CreateWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2288,21 +2196,10 @@ func (c *restClient) UpdateWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2361,21 +2258,10 @@ func (c *restClient) DeleteWorkstationConfig(ctx context.Context, req *workstati httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstationConfig") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2426,17 +2312,7 @@ func (c *restClient) GetWorkstation(ctx context.Context, req *workstationspb.Get httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetWorkstation") if err != nil { return err } @@ -2498,21 +2374,10 @@ func (c *restClient) ListWorkstations(ctx context.Context, req *workstationspb.L } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListWorkstations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2588,21 +2453,10 @@ func (c *restClient) ListUsableWorkstations(ctx context.Context, req *workstatio } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListUsableWorkstations") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2675,21 +2529,10 @@ func (c *restClient) CreateWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateWorkstation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2759,21 +2602,10 @@ func (c *restClient) UpdateWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2829,21 +2661,10 @@ func (c *restClient) DeleteWorkstation(ctx context.Context, req *workstationspb. httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2899,21 +2720,10 @@ func (c *restClient) StartWorkstation(ctx context.Context, req *workstationspb.S httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StartWorkstation") if err != nil { return err } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) - if err != nil { - return err - } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -2969,21 +2779,10 @@ func (c *restClient) StopWorkstation(ctx context.Context, req *workstationspb.St httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "StopWorkstation") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -3041,17 +2840,7 @@ func (c *restClient) GenerateAccessToken(ctx context.Context, req *workstationsp httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "GenerateAccessToken") if err != nil { return err } @@ -3105,17 +2894,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") if err != nil { return err } @@ -3175,17 +2954,7 @@ func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") if err != nil { return err } @@ -3247,17 +3016,7 @@ func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") if err != nil { return err } @@ -3310,15 +3069,8 @@ func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.Can httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -3352,15 +3104,8 @@ func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.Del httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -3397,17 +3142,7 @@ func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOpe httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -3472,21 +3207,10 @@ func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.List } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } diff --git a/workstations/apiv1beta/workstations_client_example_go123_test.go b/workstations/apiv1beta/workstations_client_example_go123_test.go index 7251b7f1be68..b7cb8250a371 100644 --- a/workstations/apiv1beta/workstations_client_example_go123_test.go +++ b/workstations/apiv1beta/workstations_client_example_go123_test.go @@ -45,7 +45,7 @@ func ExampleClient_ListUsableWorkstationConfigs_all() { } for resp, err := range c.ListUsableWorkstationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -71,7 +71,7 @@ func ExampleClient_ListUsableWorkstations_all() { } for resp, err := range c.ListUsableWorkstations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -97,7 +97,7 @@ func ExampleClient_ListWorkstationClusters_all() { } for resp, err := range c.ListWorkstationClusters(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -123,7 +123,7 @@ func ExampleClient_ListWorkstationConfigs_all() { } for resp, err := range c.ListWorkstationConfigs(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -149,7 +149,7 @@ func ExampleClient_ListWorkstations_all() { } for resp, err := range c.ListWorkstations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -175,7 +175,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/workstations/apiv1beta/workstationspb/workstations.pb.go b/workstations/apiv1beta/workstationspb/workstations.pb.go index 1ee620dab7ad..589ae092abdc 100755 --- a/workstations/apiv1beta/workstationspb/workstations.pb.go +++ b/workstations/apiv1beta/workstationspb/workstations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/cloud/workstations/v1beta/workstations.proto @@ -225,11 +225,9 @@ type WorkstationCluster struct { func (x *WorkstationCluster) Reset() { *x = WorkstationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationCluster) String() string { @@ -240,7 +238,7 @@ func (*WorkstationCluster) ProtoMessage() {} func (x *WorkstationCluster) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,11 +498,9 @@ type WorkstationConfig struct { func (x *WorkstationConfig) Reset() { *x = WorkstationConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig) String() string { @@ -515,7 +511,7 @@ func (*WorkstationConfig) ProtoMessage() {} func (x *WorkstationConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,11 +730,9 @@ type Workstation struct { func (x *Workstation) Reset() { *x = Workstation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Workstation) String() string { @@ -749,7 +743,7 @@ func (*Workstation) ProtoMessage() {} func (x *Workstation) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -874,11 +868,9 @@ type GetWorkstationClusterRequest struct { func (x *GetWorkstationClusterRequest) Reset() { *x = GetWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationClusterRequest) String() string { @@ -889,7 +881,7 @@ func (*GetWorkstationClusterRequest) ProtoMessage() {} func (x *GetWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -928,11 +920,9 @@ type ListWorkstationClustersRequest struct { func (x *ListWorkstationClustersRequest) Reset() { *x = ListWorkstationClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationClustersRequest) String() string { @@ -943,7 +933,7 @@ func (*ListWorkstationClustersRequest) ProtoMessage() {} func (x *ListWorkstationClustersRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,11 +986,9 @@ type ListWorkstationClustersResponse struct { func (x *ListWorkstationClustersResponse) Reset() { *x = ListWorkstationClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationClustersResponse) String() string { @@ -1011,7 +999,7 @@ func (*ListWorkstationClustersResponse) ProtoMessage() {} func (x *ListWorkstationClustersResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1066,11 +1054,9 @@ type CreateWorkstationClusterRequest struct { func (x *CreateWorkstationClusterRequest) Reset() { *x = CreateWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationClusterRequest) String() string { @@ -1081,7 +1067,7 @@ func (*CreateWorkstationClusterRequest) ProtoMessage() {} func (x *CreateWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1146,11 +1132,9 @@ type UpdateWorkstationClusterRequest struct { func (x *UpdateWorkstationClusterRequest) Reset() { *x = UpdateWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationClusterRequest) String() string { @@ -1161,7 +1145,7 @@ func (*UpdateWorkstationClusterRequest) ProtoMessage() {} func (x *UpdateWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1226,11 +1210,9 @@ type DeleteWorkstationClusterRequest struct { func (x *DeleteWorkstationClusterRequest) Reset() { *x = DeleteWorkstationClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationClusterRequest) String() string { @@ -1241,7 +1223,7 @@ func (*DeleteWorkstationClusterRequest) ProtoMessage() {} func (x *DeleteWorkstationClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1296,11 +1278,9 @@ type GetWorkstationConfigRequest struct { func (x *GetWorkstationConfigRequest) Reset() { *x = GetWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationConfigRequest) String() string { @@ -1311,7 +1291,7 @@ func (*GetWorkstationConfigRequest) ProtoMessage() {} func (x *GetWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1350,11 +1330,9 @@ type ListWorkstationConfigsRequest struct { func (x *ListWorkstationConfigsRequest) Reset() { *x = ListWorkstationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationConfigsRequest) String() string { @@ -1365,7 +1343,7 @@ func (*ListWorkstationConfigsRequest) ProtoMessage() {} func (x *ListWorkstationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1418,11 +1396,9 @@ type ListWorkstationConfigsResponse struct { func (x *ListWorkstationConfigsResponse) Reset() { *x = ListWorkstationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationConfigsResponse) String() string { @@ -1433,7 +1409,7 @@ func (*ListWorkstationConfigsResponse) ProtoMessage() {} func (x *ListWorkstationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1486,11 +1462,9 @@ type ListUsableWorkstationConfigsRequest struct { func (x *ListUsableWorkstationConfigsRequest) Reset() { *x = ListUsableWorkstationConfigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationConfigsRequest) String() string { @@ -1501,7 +1475,7 @@ func (*ListUsableWorkstationConfigsRequest) ProtoMessage() {} func (x *ListUsableWorkstationConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1554,11 +1528,9 @@ type ListUsableWorkstationConfigsResponse struct { func (x *ListUsableWorkstationConfigsResponse) Reset() { *x = ListUsableWorkstationConfigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationConfigsResponse) String() string { @@ -1569,7 +1541,7 @@ func (*ListUsableWorkstationConfigsResponse) ProtoMessage() {} func (x *ListUsableWorkstationConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1624,11 +1596,9 @@ type CreateWorkstationConfigRequest struct { func (x *CreateWorkstationConfigRequest) Reset() { *x = CreateWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationConfigRequest) String() string { @@ -1639,7 +1609,7 @@ func (*CreateWorkstationConfigRequest) ProtoMessage() {} func (x *CreateWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1704,11 +1674,9 @@ type UpdateWorkstationConfigRequest struct { func (x *UpdateWorkstationConfigRequest) Reset() { *x = UpdateWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationConfigRequest) String() string { @@ -1719,7 +1687,7 @@ func (*UpdateWorkstationConfigRequest) ProtoMessage() {} func (x *UpdateWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1784,11 +1752,9 @@ type DeleteWorkstationConfigRequest struct { func (x *DeleteWorkstationConfigRequest) Reset() { *x = DeleteWorkstationConfigRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationConfigRequest) String() string { @@ -1799,7 +1765,7 @@ func (*DeleteWorkstationConfigRequest) ProtoMessage() {} func (x *DeleteWorkstationConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1854,11 +1820,9 @@ type GetWorkstationRequest struct { func (x *GetWorkstationRequest) Reset() { *x = GetWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetWorkstationRequest) String() string { @@ -1869,7 +1833,7 @@ func (*GetWorkstationRequest) ProtoMessage() {} func (x *GetWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1908,11 +1872,9 @@ type ListWorkstationsRequest struct { func (x *ListWorkstationsRequest) Reset() { *x = ListWorkstationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationsRequest) String() string { @@ -1923,7 +1885,7 @@ func (*ListWorkstationsRequest) ProtoMessage() {} func (x *ListWorkstationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1976,11 +1938,9 @@ type ListWorkstationsResponse struct { func (x *ListWorkstationsResponse) Reset() { *x = ListWorkstationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListWorkstationsResponse) String() string { @@ -1991,7 +1951,7 @@ func (*ListWorkstationsResponse) ProtoMessage() {} func (x *ListWorkstationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2044,11 +2004,9 @@ type ListUsableWorkstationsRequest struct { func (x *ListUsableWorkstationsRequest) Reset() { *x = ListUsableWorkstationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationsRequest) String() string { @@ -2059,7 +2017,7 @@ func (*ListUsableWorkstationsRequest) ProtoMessage() {} func (x *ListUsableWorkstationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2112,11 +2070,9 @@ type ListUsableWorkstationsResponse struct { func (x *ListUsableWorkstationsResponse) Reset() { *x = ListUsableWorkstationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListUsableWorkstationsResponse) String() string { @@ -2127,7 +2083,7 @@ func (*ListUsableWorkstationsResponse) ProtoMessage() {} func (x *ListUsableWorkstationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2182,11 +2138,9 @@ type CreateWorkstationRequest struct { func (x *CreateWorkstationRequest) Reset() { *x = CreateWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateWorkstationRequest) String() string { @@ -2197,7 +2151,7 @@ func (*CreateWorkstationRequest) ProtoMessage() {} func (x *CreateWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2262,11 +2216,9 @@ type UpdateWorkstationRequest struct { func (x *UpdateWorkstationRequest) Reset() { *x = UpdateWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateWorkstationRequest) String() string { @@ -2277,7 +2229,7 @@ func (*UpdateWorkstationRequest) ProtoMessage() {} func (x *UpdateWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2338,11 +2290,9 @@ type DeleteWorkstationRequest struct { func (x *DeleteWorkstationRequest) Reset() { *x = DeleteWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteWorkstationRequest) String() string { @@ -2353,7 +2303,7 @@ func (*DeleteWorkstationRequest) ProtoMessage() {} func (x *DeleteWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2407,11 +2357,9 @@ type StartWorkstationRequest struct { func (x *StartWorkstationRequest) Reset() { *x = StartWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StartWorkstationRequest) String() string { @@ -2422,7 +2370,7 @@ func (*StartWorkstationRequest) ProtoMessage() {} func (x *StartWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2476,11 +2424,9 @@ type StopWorkstationRequest struct { func (x *StopWorkstationRequest) Reset() { *x = StopWorkstationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopWorkstationRequest) String() string { @@ -2491,7 +2437,7 @@ func (*StopWorkstationRequest) ProtoMessage() {} func (x *StopWorkstationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2547,11 +2493,9 @@ type GenerateAccessTokenRequest struct { func (x *GenerateAccessTokenRequest) Reset() { *x = GenerateAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenRequest) String() string { @@ -2562,7 +2506,7 @@ func (*GenerateAccessTokenRequest) ProtoMessage() {} func (x *GenerateAccessTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2645,11 +2589,9 @@ type GenerateAccessTokenResponse struct { func (x *GenerateAccessTokenResponse) Reset() { *x = GenerateAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateAccessTokenResponse) String() string { @@ -2660,7 +2602,7 @@ func (*GenerateAccessTokenResponse) ProtoMessage() {} func (x *GenerateAccessTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2714,11 +2656,9 @@ type OperationMetadata struct { func (x *OperationMetadata) Reset() { *x = OperationMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationMetadata) String() string { @@ -2729,7 +2669,7 @@ func (*OperationMetadata) ProtoMessage() {} func (x *OperationMetadata) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2821,11 +2761,9 @@ type WorkstationCluster_PrivateClusterConfig struct { func (x *WorkstationCluster_PrivateClusterConfig) Reset() { *x = WorkstationCluster_PrivateClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationCluster_PrivateClusterConfig) String() string { @@ -2836,7 +2774,7 @@ func (*WorkstationCluster_PrivateClusterConfig) ProtoMessage() {} func (x *WorkstationCluster_PrivateClusterConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2895,11 +2833,9 @@ type WorkstationConfig_Host struct { func (x *WorkstationConfig_Host) Reset() { *x = WorkstationConfig_Host{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host) String() string { @@ -2910,7 +2846,7 @@ func (*WorkstationConfig_Host) ProtoMessage() {} func (x *WorkstationConfig_Host) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2968,11 +2904,9 @@ type WorkstationConfig_PersistentDirectory struct { func (x *WorkstationConfig_PersistentDirectory) Reset() { *x = WorkstationConfig_PersistentDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_PersistentDirectory) String() string { @@ -2983,7 +2917,7 @@ func (*WorkstationConfig_PersistentDirectory) ProtoMessage() {} func (x *WorkstationConfig_PersistentDirectory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3050,11 +2984,9 @@ type WorkstationConfig_EphemeralDirectory struct { func (x *WorkstationConfig_EphemeralDirectory) Reset() { *x = WorkstationConfig_EphemeralDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_EphemeralDirectory) String() string { @@ -3065,7 +2997,7 @@ func (*WorkstationConfig_EphemeralDirectory) ProtoMessage() {} func (x *WorkstationConfig_EphemeralDirectory) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3148,11 +3080,9 @@ type WorkstationConfig_Container struct { func (x *WorkstationConfig_Container) Reset() { *x = WorkstationConfig_Container{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Container) String() string { @@ -3163,7 +3093,7 @@ func (*WorkstationConfig_Container) ProtoMessage() {} func (x *WorkstationConfig_Container) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3247,11 +3177,9 @@ type WorkstationConfig_CustomerEncryptionKey struct { func (x *WorkstationConfig_CustomerEncryptionKey) Reset() { *x = WorkstationConfig_CustomerEncryptionKey{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_CustomerEncryptionKey) String() string { @@ -3262,7 +3190,7 @@ func (*WorkstationConfig_CustomerEncryptionKey) ProtoMessage() {} func (x *WorkstationConfig_CustomerEncryptionKey) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3305,11 +3233,9 @@ type WorkstationConfig_ReadinessCheck struct { func (x *WorkstationConfig_ReadinessCheck) Reset() { *x = WorkstationConfig_ReadinessCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_ReadinessCheck) String() string { @@ -3320,7 +3246,7 @@ func (*WorkstationConfig_ReadinessCheck) ProtoMessage() {} func (x *WorkstationConfig_ReadinessCheck) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3457,11 +3383,9 @@ type WorkstationConfig_Host_GceInstance struct { func (x *WorkstationConfig_Host_GceInstance) Reset() { *x = WorkstationConfig_Host_GceInstance{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance) String() string { @@ -3472,7 +3396,7 @@ func (*WorkstationConfig_Host_GceInstance) ProtoMessage() {} func (x *WorkstationConfig_Host_GceInstance) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3587,11 +3511,9 @@ type WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig struct { func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) Reset() { *x = WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) String() string { @@ -3602,7 +3524,7 @@ func (*WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) ProtoMessag func (x *WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3650,11 +3572,9 @@ type WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig struct { func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) Reset() { *x = WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) String() string { @@ -3665,7 +3585,7 @@ func (*WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) ProtoMe func (x *WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3703,11 +3623,9 @@ type WorkstationConfig_Host_GceInstance_Accelerator struct { func (x *WorkstationConfig_Host_GceInstance_Accelerator) Reset() { *x = WorkstationConfig_Host_GceInstance_Accelerator{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_Host_GceInstance_Accelerator) String() string { @@ -3718,7 +3636,7 @@ func (*WorkstationConfig_Host_GceInstance_Accelerator) ProtoMessage() {} func (x *WorkstationConfig_Host_GceInstance_Accelerator) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3798,11 +3716,9 @@ type WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk struct { func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) Reset() { *x = WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) String() string { @@ -3813,7 +3729,7 @@ func (*WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) ProtoMes func (x *WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3896,11 +3812,9 @@ type WorkstationConfig_EphemeralDirectory_GcePersistentDisk struct { func (x *WorkstationConfig_EphemeralDirectory_GcePersistentDisk) Reset() { *x = WorkstationConfig_EphemeralDirectory_GcePersistentDisk{} - if protoimpl.UnsafeEnabled { - mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkstationConfig_EphemeralDirectory_GcePersistentDisk) String() string { @@ -3911,7 +3825,7 @@ func (*WorkstationConfig_EphemeralDirectory_GcePersistentDisk) ProtoMessage() {} func (x *WorkstationConfig_EphemeralDirectory_GcePersistentDisk) ProtoReflect() protoreflect.Message { mi := &file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5350,524 +5264,6 @@ func file_google_cloud_workstations_v1beta_workstations_proto_init() { if File_google_cloud_workstations_v1beta_workstations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Workstation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationConfigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationConfigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationConfigRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*ListWorkstationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ListUsableWorkstationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*CreateWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*UpdateWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DeleteWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*StartWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*StopWorkstationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*GenerateAccessTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*OperationMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationCluster_PrivateClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_PersistentDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_EphemeralDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Container); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_CustomerEncryptionKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_ReadinessCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance_GceShieldedInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance_GceConfidentialInstanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_Host_GceInstance_Accelerator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_PersistentDirectory_GceRegionalPersistentDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*WorkstationConfig_EphemeralDirectory_GcePersistentDisk); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_cloud_workstations_v1beta_workstations_proto_msgTypes[27].OneofWrappers = []any{ (*GenerateAccessTokenRequest_ExpireTime)(nil), (*GenerateAccessTokenRequest_Ttl)(nil),